summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2016-06-10 22:02:23 -0500
committerAaron Piotrowski <aaron@trowski.com>2016-06-10 22:02:23 -0500
commite3c681aa5cc71122a8d2fae42e6513fc413ccac8 (patch)
tree5f1df62f7b666028edb0ee1adf083a52d63df45a
parentfb4e3085cbaa76eb8f28eebf848a81d1c0190067 (diff)
parent792e89385ca6fc722a03590722eb7745a2374720 (diff)
downloadphp-git-e3c681aa5cc71122a8d2fae42e6513fc413ccac8.tar.gz
Merge branch 'master' into throw-error-in-extensions
-rw-r--r--.gdbinit8
-rw-r--r--.gitignore7
-rw-r--r--.travis.yml35
-rw-r--r--CODING_STANDARDS4
-rw-r--r--INSTALL204
-rw-r--r--LICENSE2
-rw-r--r--Makefile.gcov2
-rw-r--r--Makefile.global2
-rw-r--r--NEWS467
-rw-r--r--README.EXT_SKEL2
-rw-r--r--README.GIT-RULES14
-rw-r--r--README.NEW-OUTPUT-API74
-rw-r--r--README.PARAMETER_PARSING_API32
-rw-r--r--README.REDIST.BINS63
-rw-r--r--README.RELEASE_PROCESS12
-rw-r--r--README.STREAMS6
-rw-r--r--README.input_filter4
-rw-r--r--README.md2
-rw-r--r--TSRM/TSRM.h12
-rw-r--r--TSRM/m4/gethostbyname.m4197
-rw-r--r--TSRM/tsrm.m44
-rw-r--r--TSRM/tsrm_nw.c2
-rw-r--r--TSRM/tsrm_nw.h2
-rw-r--r--TSRM/tsrm_win32.c20
-rw-r--r--TSRM/tsrm_win32.h4
-rw-r--r--UPGRADING785
-rw-r--r--UPGRADING.INTERNALS258
-rw-r--r--Zend/Zend.m45
-rw-r--r--Zend/tests/ArrayAccess_indirect_append.phpt43
-rw-r--r--Zend/tests/add_006.phpt8
-rw-r--r--Zend/tests/add_007.phpt5
-rw-r--r--Zend/tests/anon/011.phpt14
-rw-r--r--Zend/tests/anon/012.phpt11
-rw-r--r--Zend/tests/anon/013.phpt15
-rw-r--r--Zend/tests/anon/014.phpt16
-rw-r--r--Zend/tests/arg_unpack/by_ref_separation.phpt36
-rw-r--r--Zend/tests/array_addition_not_commutative.phpt19
-rw-r--r--Zend/tests/assert/bug70208.phpt23
-rw-r--r--Zend/tests/assert/bug70528.phpt23
-rw-r--r--Zend/tests/assert/expect_015.phpt2
-rw-r--r--Zend/tests/assert/expect_016.phpt2
-rw-r--r--Zend/tests/assert/expect_018.phpt4
-rw-r--r--Zend/tests/assert/expect_empty_stmt_bug.phpt11
-rw-r--r--Zend/tests/assert/indirect_var_access_misoptimization.phpt19
-rw-r--r--Zend/tests/ast_serialize_backtick_literal.phpt11
-rw-r--r--Zend/tests/break_error_001.phpt10
-rw-r--r--Zend/tests/break_error_002.phpt10
-rw-r--r--Zend/tests/break_error_003.phpt10
-rw-r--r--Zend/tests/break_error_004.phpt12
-rw-r--r--Zend/tests/bug26166.phpt4
-rw-r--r--Zend/tests/bug29015.phpt11
-rw-r--r--Zend/tests/bug29883.phpt2
-rw-r--r--Zend/tests/bug31098.phpt2
-rw-r--r--Zend/tests/bug34617.phpt3
-rw-r--r--Zend/tests/bug41117_1.phpt3
-rw-r--r--Zend/tests/bug41813.phpt2
-rw-r--r--Zend/tests/bug42802.phpt2
-rw-r--r--Zend/tests/bug49866.phpt2
-rw-r--r--Zend/tests/bug52355.phpt20
-rw-r--r--Zend/tests/bug52484.phpt6
-rw-r--r--Zend/tests/bug52484_2.phpt6
-rw-r--r--Zend/tests/bug52484_3.phpt6
-rw-r--r--Zend/tests/bug52879.phpt2
-rw-r--r--Zend/tests/bug53432.phpt65
-rw-r--r--Zend/tests/bug60909_2.phpt2
-rw-r--r--Zend/tests/bug62358.phpt8
-rw-r--r--Zend/tests/bug62441.phpt20
-rw-r--r--Zend/tests/bug62814.phpt20
-rw-r--r--Zend/tests/bug65784.phpt11
-rw-r--r--Zend/tests/bug68412.phpt6
-rw-r--r--Zend/tests/bug68652.phpt1
-rw-r--r--Zend/tests/bug69467.phpt2
-rw-r--r--Zend/tests/bug69537.phpt19
-rw-r--r--Zend/tests/bug69640.phpt2
-rw-r--r--Zend/tests/bug69732.phpt7
-rw-r--r--Zend/tests/bug69761.phpt3
-rw-r--r--Zend/tests/bug69767.phpt2
-rw-r--r--Zend/tests/bug69955.phpt2
-rw-r--r--Zend/tests/bug69957.phpt5
-rw-r--r--Zend/tests/bug69989_1.phpt15
-rw-r--r--Zend/tests/bug69989_2.phpt42
-rw-r--r--Zend/tests/bug69989_3.phpt44
-rw-r--r--Zend/tests/bug69996.phpt25
-rw-r--r--Zend/tests/bug70012.phpt32
-rw-r--r--Zend/tests/bug70083.phpt26
-rw-r--r--Zend/tests/bug70089.phpt37
-rw-r--r--Zend/tests/bug70117.phpt21
-rw-r--r--Zend/tests/bug70121.phpt9
-rw-r--r--Zend/tests/bug70124.phpt47
-rw-r--r--Zend/tests/bug70156.phpt37
-rw-r--r--Zend/tests/bug70164.phpt30
-rw-r--r--Zend/tests/bug70173.phpt13
-rw-r--r--Zend/tests/bug70179.phpt16
-rw-r--r--Zend/tests/bug70182.phpt14
-rw-r--r--Zend/tests/bug70183.phpt8
-rw-r--r--Zend/tests/bug70187.phpt19
-rw-r--r--Zend/tests/bug70187_2.phpt11
-rw-r--r--Zend/tests/bug70215.phpt21
-rw-r--r--Zend/tests/bug70223.phpt20
-rw-r--r--Zend/tests/bug70240.phpt8
-rw-r--r--Zend/tests/bug70241.phpt17
-rw-r--r--Zend/tests/bug70253.phpt17
-rw-r--r--Zend/tests/bug70258.phpt28
-rw-r--r--Zend/tests/bug70262.phpt30
-rw-r--r--Zend/tests/bug70288.phpt19
-rw-r--r--Zend/tests/bug70293.phpt16
-rw-r--r--Zend/tests/bug70321.phpt49
-rw-r--r--Zend/tests/bug70332.phpt24
-rw-r--r--Zend/tests/bug70397.phpt15
-rw-r--r--Zend/tests/bug70398.phpt18
-rw-r--r--Zend/tests/bug70430.phpt10
-rw-r--r--Zend/tests/bug70478.phpt20
-rw-r--r--Zend/tests/bug70547.phpt83
-rw-r--r--Zend/tests/bug70630.phpt10
-rw-r--r--Zend/tests/bug70662.phpt18
-rw-r--r--Zend/tests/bug70681.phpt16
-rw-r--r--Zend/tests/bug70685.phpt22
-rw-r--r--Zend/tests/bug70689.phpt22
-rw-r--r--Zend/tests/bug70748.phpt20
-rw-r--r--Zend/tests/bug70782.phpt10
-rw-r--r--Zend/tests/bug70785.phpt25
-rw-r--r--Zend/tests/bug70804.phpt17
-rw-r--r--Zend/tests/bug70805.phpt46
-rw-r--r--Zend/tests/bug70805_1.phpt43
-rw-r--r--Zend/tests/bug70805_2.phpt37
-rw-r--r--Zend/tests/bug70873.phpt34
-rw-r--r--Zend/tests/bug70895.phpt15
-rw-r--r--Zend/tests/bug70898.phpt22
-rw-r--r--Zend/tests/bug70912.phpt10
-rw-r--r--Zend/tests/bug70914.phpt17
-rw-r--r--Zend/tests/bug70918.phpt47
-rw-r--r--Zend/tests/bug70944.phpt37
-rw-r--r--Zend/tests/bug70957.phpt22
-rw-r--r--Zend/tests/bug70958.phpt21
-rw-r--r--Zend/tests/bug70967.phpt14
-rw-r--r--Zend/tests/bug70987.phpt15
-rw-r--r--Zend/tests/bug70997.phpt26
-rw-r--r--Zend/tests/bug71067.phpt31
-rw-r--r--Zend/tests/bug71086.phpt14
-rw-r--r--Zend/tests/bug71154.phpt19
-rw-r--r--Zend/tests/bug71163.phpt25
-rw-r--r--Zend/tests/bug71196.phpt13
-rw-r--r--Zend/tests/bug71221.phpt10
-rw-r--r--Zend/tests/bug71248.phpt28
-rw-r--r--Zend/tests/bug71266.phpt22
-rw-r--r--Zend/tests/bug71275.phpt27
-rw-r--r--Zend/tests/bug71300.phpt28
-rw-r--r--Zend/tests/bug71336.phpt48
-rw-r--r--Zend/tests/bug71359.phpt61
-rw-r--r--Zend/tests/bug71414.phpt25
-rw-r--r--Zend/tests/bug71428.1.phpt13
-rw-r--r--Zend/tests/bug71428.2.phpt23
-rw-r--r--Zend/tests/bug71428.3.phpt11
-rw-r--r--Zend/tests/bug71470.phpt13
-rw-r--r--Zend/tests/bug71474.phpt23
-rw-r--r--Zend/tests/bug71529.phpt23
-rw-r--r--Zend/tests/bug71572.phpt27
-rw-r--r--Zend/tests/bug71622.phpt30
-rw-r--r--Zend/tests/bug71695.phpt17
-rw-r--r--Zend/tests/bug71724.phpt19
-rw-r--r--Zend/tests/bug71731.phpt64
-rw-r--r--Zend/tests/bug71737.phpt16
-rw-r--r--Zend/tests/bug71756.phpt27
-rw-r--r--Zend/tests/bug71841.phpt23
-rw-r--r--Zend/tests/bug71859.phpt28
-rw-r--r--Zend/tests/bug71871.phpt12
-rw-r--r--Zend/tests/bug71871_2.phpt12
-rw-r--r--Zend/tests/bug71914.phpt40
-rw-r--r--Zend/tests/bug71922.phpt21
-rw-r--r--Zend/tests/bug71930.phpt30
-rw-r--r--Zend/tests/bug71980.phpt43
-rw-r--r--Zend/tests/bug72038.phpt27
-rw-r--r--Zend/tests/bug72057.phpt21
-rw-r--r--Zend/tests/bug72101.phpt85
-rw-r--r--Zend/tests/bug72107.phpt14
-rw-r--r--Zend/tests/bug72119.phpt19
-rw-r--r--Zend/tests/bug72162.phpt10
-rw-r--r--Zend/tests/bug72177.phpt35
-rw-r--r--Zend/tests/bug72177_2.phpt34
-rw-r--r--Zend/tests/bug72188.phpt27
-rw-r--r--Zend/tests/bug72221.phpt11
-rw-r--r--Zend/tests/bug72335.phpt18
-rw-r--r--Zend/tests/bug72373.phpt20
-rw-r--r--Zend/tests/call_user_func_array_prefer_ref.phpt73
-rw-r--r--Zend/tests/closure_033.phpt2
-rw-r--r--Zend/tests/closure_041.phpt8
-rw-r--r--Zend/tests/closure_043.phpt20
-rw-r--r--Zend/tests/closure_059.phpt2
-rw-r--r--Zend/tests/closure_061.phpt241
-rw-r--r--Zend/tests/closure_call.phpt2
-rw-r--r--Zend/tests/closure_invoke_case_insensitive.phpt16
-rw-r--r--Zend/tests/closure_use_auto_global.phpt16
-rw-r--r--Zend/tests/closure_use_parameter_name.phpt14
-rw-r--r--Zend/tests/closure_use_variable_twice.phpt15
-rw-r--r--Zend/tests/concat_003.phpt52
-rw-r--r--Zend/tests/constant_expressions_coalesce.phpt47
-rw-r--r--Zend/tests/constant_expressions_coalesce_empty_dim.phpt11
-rw-r--r--Zend/tests/constant_expressions_dynamic.phpt9
-rw-r--r--Zend/tests/constant_expressions_self_referencing_array.phpt2
-rw-r--r--Zend/tests/declare_005.phpt18
-rw-r--r--Zend/tests/dynamic_call_005.phpt29
-rw-r--r--Zend/tests/dynamic_call_006.phpt48
-rw-r--r--Zend/tests/dynamic_call_007.phpt17
-rw-r--r--Zend/tests/dynamic_call_008.phpt13
-rw-r--r--Zend/tests/dynamic_fully_qualified_call.phpt15
-rw-r--r--Zend/tests/each_002.phpt6
-rw-r--r--Zend/tests/empty_str_offset.phpt12
-rw-r--r--Zend/tests/entry_block_with_predecessors.phpt33
-rw-r--r--Zend/tests/errmsg_013.phpt4
-rw-r--r--Zend/tests/exception_023.phpt16
-rw-r--r--Zend/tests/exception_in_nested_rope.phpt17
-rw-r--r--Zend/tests/exception_in_rope_end.phpt17
-rw-r--r--Zend/tests/foreach_017.phpt2
-rw-r--r--Zend/tests/foreach_list_keyed.phpt36
-rw-r--r--Zend/tests/func_get_args.phpt10
-rw-r--r--Zend/tests/gc_013.phpt4
-rw-r--r--Zend/tests/gc_014.phpt4
-rw-r--r--Zend/tests/gc_015.phpt4
-rw-r--r--Zend/tests/gc_017.phpt5
-rw-r--r--Zend/tests/generators/bug70904.phpt43
-rw-r--r--Zend/tests/generators/bug70965.phpt32
-rw-r--r--Zend/tests/generators/bug71013.phpt49
-rw-r--r--Zend/tests/generators/bug71297.phpt25
-rw-r--r--Zend/tests/generators/bug71441.phpt29
-rw-r--r--Zend/tests/generators/bug71601.phpt40
-rw-r--r--Zend/tests/generators/dangling_send_target.phpt22
-rw-r--r--Zend/tests/generators/gc_with_yield_from.phpt45
-rw-r--r--Zend/tests/generators/generator_return_return_type.phpt18
-rw-r--r--Zend/tests/generators/generator_with_arg_unpacking.phpt12
-rw-r--r--Zend/tests/generators/generator_with_type_check.phpt13
-rw-r--r--Zend/tests/generators/generator_with_type_check_2.phpt22
-rw-r--r--Zend/tests/generators/get_return.phpt2
-rw-r--r--Zend/tests/generators/multiple_yield_from_on_same_generator.phpt3
-rw-r--r--Zend/tests/generators/throw_into_yield_from_array.phpt43
-rw-r--r--Zend/tests/generators/yield_from_by_reference.phpt12
-rw-r--r--Zend/tests/generators/yield_from_force_closed.phpt37
-rw-r--r--Zend/tests/generators/yield_from_iterator_agregate.phpt17
-rw-r--r--Zend/tests/global_with_side_effect_name.phpt22
-rw-r--r--Zend/tests/goto_in_foreach.phpt16
-rw-r--r--Zend/tests/grammar/regression_004.phpt2
-rw-r--r--Zend/tests/grammar/semi_reserved_001.phpt75
-rw-r--r--Zend/tests/grammar/semi_reserved_002.phpt75
-rw-r--r--Zend/tests/grammar/semi_reserved_003.phpt36
-rw-r--r--Zend/tests/grammar/semi_reserved_004.phpt33
-rw-r--r--Zend/tests/grammar/semi_reserved_005.phpt66
-rw-r--r--Zend/tests/indexing_001.phpt41
-rw-r--r--Zend/tests/inference_infinite_loop.phpt17
-rw-r--r--Zend/tests/int_conversion_exponents.phpt52
-rw-r--r--Zend/tests/int_static_prop_name.phpt43
-rw-r--r--Zend/tests/invalid_parent_const_ref_leak.phpt18
-rw-r--r--Zend/tests/isset_str_offset.phpt6
-rw-r--r--Zend/tests/jump15.phpt29
-rw-r--r--Zend/tests/jump16.phpt27
-rw-r--r--Zend/tests/jump17.phpt22
-rw-r--r--Zend/tests/list_001.phpt6
-rw-r--r--Zend/tests/list_008.phpt10
-rw-r--r--Zend/tests/list_009.phpt14
-rw-r--r--Zend/tests/list_010.phpt11
-rw-r--r--Zend/tests/list_011.phpt10
-rw-r--r--Zend/tests/list_012.phpt10
-rw-r--r--Zend/tests/list_keyed.phpt71
-rw-r--r--Zend/tests/list_keyed_ArrayAccess.phpt54
-rw-r--r--Zend/tests/list_keyed_conversions.phpt34
-rw-r--r--Zend/tests/list_keyed_evaluation_order.inc60
-rw-r--r--Zend/tests/list_keyed_evaluation_order.phpt35
-rw-r--r--Zend/tests/list_keyed_evaluation_order_2.phpt77
-rw-r--r--Zend/tests/list_keyed_evaluation_order_3.phpt24
-rw-r--r--Zend/tests/list_keyed_evaluation_order_nested.phpt77
-rw-r--r--Zend/tests/list_keyed_non_literals.phpt30
-rw-r--r--Zend/tests/list_keyed_trailing_comma.phpt38
-rw-r--r--Zend/tests/list_keyed_undefined.phpt22
-rw-r--r--Zend/tests/list_mixed_keyed_unkeyed.phpt16
-rw-r--r--Zend/tests/list_mixed_nested_keyed_unkeyed.phpt34
-rw-r--r--Zend/tests/memory_get_peak_usage.phpt26
-rw-r--r--Zend/tests/method_argument_binding.phpt47
-rw-r--r--Zend/tests/modify_isref_value_return.phpt25
-rw-r--r--Zend/tests/name_collision_07.phpt15
-rw-r--r--Zend/tests/name_collision_08.phpt15
-rw-r--r--Zend/tests/name_collision_09.phpt15
-rw-r--r--Zend/tests/nested_method_and_function.phpt39
-rw-r--r--Zend/tests/new_args_without_ctor.phpt10
-rw-r--r--Zend/tests/ns_055.phpt2
-rw-r--r--Zend/tests/ns_068.phpt2
-rw-r--r--Zend/tests/ns_083.phpt2
-rw-r--r--Zend/tests/ns_094.phpt5
-rw-r--r--Zend/tests/ns_095.phpt51
-rw-r--r--Zend/tests/ns_096.phpt10
-rw-r--r--Zend/tests/nullable_types/array.phpt17
-rw-r--r--Zend/tests/nullable_types/contravariant_nullable_param_succeeds.phpt19
-rw-r--r--Zend/tests/nullable_types/contravariant_nullable_return_fails.phpt17
-rw-r--r--Zend/tests/nullable_types/covariant_nullable_param_fails.phpt17
-rw-r--r--Zend/tests/nullable_types/covariant_nullable_return_succeds.phpt16
-rw-r--r--Zend/tests/nullable_types/float.phpt16
-rw-r--r--Zend/tests/nullable_types/int.phpt16
-rw-r--r--Zend/tests/nullable_types/invariant_param_and_return_succeeds.phpt24
-rw-r--r--Zend/tests/nullable_types/nullable_type_parameters_do_not_have_default_value.phpt17
-rw-r--r--Zend/tests/nullable_types/string.phpt16
-rw-r--r--Zend/tests/numeric_string_errors.phpt195
-rw-r--r--Zend/tests/numeric_string_errors_assign.phpt236
-rw-r--r--Zend/tests/oct_overflow_char.phpt10
-rw-r--r--Zend/tests/overloaded_func_001.phpt15
-rw-r--r--Zend/tests/overloaded_func_002.phpt13
-rw-r--r--Zend/tests/parse_str_with_unpack.phpt15
-rw-r--r--Zend/tests/php_errormsg_misoptimization.phpt20
-rw-r--r--Zend/tests/qm_assign_ref_unwrap_leak.phpt20
-rw-r--r--Zend/tests/return_types/028.phpt2
-rw-r--r--Zend/tests/return_types/029.phpt28
-rw-r--r--Zend/tests/return_types/030.phpt23
-rw-r--r--Zend/tests/return_types/031.phpt14
-rw-r--r--Zend/tests/return_types/032.phpt14
-rw-r--r--Zend/tests/return_types/bug70557.phpt19
-rw-r--r--Zend/tests/return_types/bug71092.phpt23
-rw-r--r--Zend/tests/return_types/bug71978.phpt21
-rw-r--r--Zend/tests/return_types/internal_functions001.phpt2
-rw-r--r--Zend/tests/return_types/internal_functions002.phpt2
-rw-r--r--Zend/tests/return_types/reflection001.phpt2
-rw-r--r--Zend/tests/return_types/void_allowed.phpt20
-rw-r--r--Zend/tests/return_types/void_disallowed1.phpt12
-rw-r--r--Zend/tests/return_types/void_disallowed2.phpt12
-rw-r--r--Zend/tests/return_types/void_parameter.phpt8
-rw-r--r--Zend/tests/self_and.phpt4
-rw-r--r--Zend/tests/self_instanceof_outside_class.phpt17
-rw-r--r--Zend/tests/self_method_or_prop_outside_class.phpt36
-rw-r--r--Zend/tests/self_mod.phpt4
-rw-r--r--Zend/tests/self_or.phpt4
-rw-r--r--Zend/tests/self_xor.phpt4
-rw-r--r--Zend/tests/shift_001.phpt4
-rw-r--r--Zend/tests/shift_002.phpt4
-rw-r--r--Zend/tests/str_offset_001.phpt97
-rw-r--r--Zend/tests/str_offset_003.phpt37
-rw-r--r--Zend/tests/str_offset_004.phpt49
-rw-r--r--Zend/tests/temporary_cleaning_001.phpt23
-rw-r--r--Zend/tests/temporary_cleaning_002.phpt32
-rw-r--r--Zend/tests/temporary_cleaning_003.phpt19
-rw-r--r--Zend/tests/temporary_cleaning_004.phpt44
-rw-r--r--Zend/tests/temporary_cleaning_005.phpt48
-rw-r--r--Zend/tests/temporary_cleaning_006.phpt18
-rw-r--r--Zend/tests/temporary_cleaning_007.phpt22
-rw-r--r--Zend/tests/temporary_cleaning_008.phpt15
-rw-r--r--Zend/tests/temporary_cleaning_009.phpt27
-rw-r--r--Zend/tests/temporary_cleaning_010.phpt21
-rw-r--r--Zend/tests/temporary_cleaning_011.phpt20
-rw-r--r--Zend/tests/temporary_cleaning_012.phpt20
-rw-r--r--Zend/tests/this_in_eval.phpt18
-rw-r--r--Zend/tests/traits/bug60153.phpt2
-rw-r--r--Zend/tests/traits/no_static_arg_binding.phpt28
-rw-r--r--Zend/tests/try/bug70228.phpt14
-rw-r--r--Zend/tests/try/bug70228_2.phpt20
-rw-r--r--Zend/tests/try/bug70228_3.phpt31
-rw-r--r--Zend/tests/try/bug70228_4.phpt32
-rw-r--r--Zend/tests/try/bug70228_5.phpt20
-rw-r--r--Zend/tests/try/bug70228_6.phpt18
-rw-r--r--Zend/tests/try/bug70228_7.phpt29
-rw-r--r--Zend/tests/try/bug70228_8.phpt30
-rw-r--r--Zend/tests/try/bug71604.phpt25
-rw-r--r--Zend/tests/try/bug71604_2.phpt39
-rw-r--r--Zend/tests/try/bug71604_3.phpt38
-rw-r--r--Zend/tests/try/bug72213.phpt25
-rw-r--r--Zend/tests/try/bug72213_2.phpt25
-rw-r--r--Zend/tests/try/catch_002.phpt (renamed from Zend/tests/catch_002.phpt)0
-rw-r--r--Zend/tests/try/catch_003.phpt (renamed from Zend/tests/catch_003.phpt)0
-rw-r--r--Zend/tests/try/catch_004.phpt (renamed from Zend/tests/catch_004.phpt)0
-rw-r--r--Zend/tests/try/catch_finally_001.phpt (renamed from Zend/tests/catch_finally_001.phpt)0
-rw-r--r--Zend/tests/try/catch_finally_002.phpt (renamed from Zend/tests/catch_finally_002.phpt)0
-rw-r--r--Zend/tests/try/catch_finally_003.phpt (renamed from Zend/tests/catch_finally_003.phpt)0
-rw-r--r--Zend/tests/try/catch_finally_004.phpt (renamed from Zend/tests/catch_finally_004.phpt)0
-rw-r--r--Zend/tests/try/catch_finally_005.phpt (renamed from Zend/tests/catch_finally_005.phpt)0
-rw-r--r--Zend/tests/try/catch_finally_006.phpt (renamed from Zend/tests/catch_finally_006.phpt)0
-rw-r--r--Zend/tests/try/exceptions.inc6
-rw-r--r--Zend/tests/try/finally_goto_001.phpt (renamed from Zend/tests/finally_goto_001.phpt)0
-rw-r--r--Zend/tests/try/finally_goto_002.phpt (renamed from Zend/tests/finally_goto_002.phpt)0
-rw-r--r--Zend/tests/try/finally_goto_003.phpt (renamed from Zend/tests/finally_goto_003.phpt)0
-rw-r--r--Zend/tests/try/finally_goto_004.phpt (renamed from Zend/tests/finally_goto_004.phpt)0
-rw-r--r--Zend/tests/try/finally_goto_005.phpt15
-rw-r--r--Zend/tests/try/try_catch_finally_001.phpt (renamed from Zend/tests/try_catch_finally_001.phpt)0
-rw-r--r--Zend/tests/try/try_catch_finally_002.phpt (renamed from Zend/tests/try_catch_finally_002.phpt)0
-rw-r--r--Zend/tests/try/try_catch_finally_003.phpt (renamed from Zend/tests/try_catch_finally_003.phpt)0
-rw-r--r--Zend/tests/try/try_catch_finally_004.phpt (renamed from Zend/tests/try_catch_finally_004.phpt)0
-rw-r--r--Zend/tests/try/try_catch_finally_005.phpt (renamed from Zend/tests/try_catch_finally_005.phpt)0
-rw-r--r--Zend/tests/try/try_catch_finally_006.phpt (renamed from Zend/tests/try_catch_finally_006.phpt)0
-rw-r--r--Zend/tests/try/try_catch_finally_007.phpt (renamed from Zend/tests/try_catch_finally_007.phpt)0
-rw-r--r--Zend/tests/try/try_finally_001.phpt (renamed from Zend/tests/try_finally_001.phpt)0
-rw-r--r--Zend/tests/try/try_finally_002.phpt (renamed from Zend/tests/try_finally_002.phpt)0
-rw-r--r--Zend/tests/try/try_finally_003.phpt (renamed from Zend/tests/try_finally_003.phpt)0
-rw-r--r--Zend/tests/try/try_finally_004.phpt (renamed from Zend/tests/try_finally_004.phpt)0
-rw-r--r--Zend/tests/try/try_finally_005.phpt (renamed from Zend/tests/try_finally_005.phpt)0
-rw-r--r--Zend/tests/try/try_finally_006.phpt (renamed from Zend/tests/try_finally_006.phpt)0
-rw-r--r--Zend/tests/try/try_finally_007.phpt (renamed from Zend/tests/try_finally_007.phpt)0
-rw-r--r--Zend/tests/try/try_finally_008.phpt (renamed from Zend/tests/try_finally_008.phpt)0
-rw-r--r--Zend/tests/try/try_finally_009.phpt (renamed from Zend/tests/try_finally_009.phpt)0
-rw-r--r--Zend/tests/try/try_finally_010.phpt (renamed from Zend/tests/try_finally_010.phpt)0
-rw-r--r--Zend/tests/try/try_finally_011.phpt (renamed from Zend/tests/try_finally_011.phpt)0
-rw-r--r--Zend/tests/try/try_finally_012.phpt32
-rw-r--r--Zend/tests/try/try_finally_013.phpt25
-rw-r--r--Zend/tests/try/try_finally_014.phpt27
-rw-r--r--Zend/tests/try/try_finally_015.phpt29
-rw-r--r--Zend/tests/try/try_finally_016.phpt39
-rw-r--r--Zend/tests/try/try_finally_017.phpt42
-rw-r--r--Zend/tests/try/try_finally_018.phpt24
-rw-r--r--Zend/tests/try/try_finally_019.phpt40
-rw-r--r--Zend/tests/try/try_finally_020.phpt42
-rw-r--r--Zend/tests/try/try_finally_021.phpt20
-rw-r--r--Zend/tests/try/try_finally_022.phpt41
-rw-r--r--Zend/tests/try/try_finally_023.phpt37
-rw-r--r--Zend/tests/try/try_finally_024.phpt38
-rw-r--r--Zend/tests/try/try_finally_025.phpt28
-rw-r--r--Zend/tests/try/try_finally_026.phpt37
-rw-r--r--Zend/tests/try/try_finally_027.phpt34
-rw-r--r--Zend/tests/try/try_multicatch_001.phpt19
-rw-r--r--Zend/tests/try/try_multicatch_002.phpt21
-rw-r--r--Zend/tests/try/try_multicatch_003.phpt21
-rw-r--r--Zend/tests/try/try_multicatch_004.phpt21
-rw-r--r--Zend/tests/try/try_multicatch_005.phpt25
-rw-r--r--Zend/tests/try/try_multicatch_006.phpt22
-rw-r--r--Zend/tests/try/try_multicatch_007.phpt22
-rw-r--r--Zend/tests/type_declarations/add_return_type.phpt (renamed from Zend/tests/typehints/add_return_type.phpt)0
-rw-r--r--Zend/tests/type_declarations/array_001.phpt (renamed from Zend/tests/array_type_hint_001.phpt)6
-rw-r--r--Zend/tests/type_declarations/callable_001.phpt (renamed from Zend/tests/callable_type_hint_001.phpt)4
-rw-r--r--Zend/tests/type_declarations/callable_002.phpt (renamed from Zend/tests/callable_type_hint_002.phpt)2
-rw-r--r--Zend/tests/type_declarations/callable_003.phpt (renamed from Zend/tests/callable_type_hint_003.phpt)2
-rw-r--r--Zend/tests/type_declarations/closure_with_variadic.phpt15
-rw-r--r--Zend/tests/type_declarations/default_boolean_hint_values.phpt (renamed from Zend/tests/typehints/default_boolean_hint_values.phpt)0
-rw-r--r--Zend/tests/type_declarations/explicit_weak_include_strict.phpt (renamed from Zend/tests/typehints/explicit_weak_include_strict.phpt)0
-rw-r--r--Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt (renamed from Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt)2
-rw-r--r--Zend/tests/type_declarations/internal_function_strict_mode.phpt (renamed from Zend/tests/typehints/internal_function_strict_mode.phpt)4
-rw-r--r--Zend/tests/type_declarations/nullable_typed_return_without_value.phpt14
-rw-r--r--Zend/tests/type_declarations/nullable_void.phpt11
-rw-r--r--Zend/tests/type_declarations/return_separation.phpt (renamed from Zend/tests/typehints/return_separation.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_basic.phpt (renamed from Zend/tests/typehints/scalar_basic.phpt)12
-rw-r--r--Zend/tests/type_declarations/scalar_constant_defaults.phpt (renamed from Zend/tests/typehints/scalar_constant_defaults.phpt)4
-rw-r--r--Zend/tests/type_declarations/scalar_constant_defaults_error.phpt (renamed from Zend/tests/typehints/scalar_constant_defaults_error.phpt)4
-rw-r--r--Zend/tests/type_declarations/scalar_float_with_integer_default_strict.phpt (renamed from Zend/tests/typehints/scalar_float_with_integer_default_strict.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_float_with_integer_default_weak.phpt (renamed from Zend/tests/typehints/scalar_float_with_integer_default_weak.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt16
-rw-r--r--Zend/tests/type_declarations/scalar_none.phpt (renamed from Zend/tests/typehints/scalar_none.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_null.phpt (renamed from Zend/tests/typehints/scalar_null.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_relative_typehint_disallowed.phpt (renamed from Zend/tests/typehints/scalar_relative_typehint_disallowed.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved2.phpt (renamed from Zend/tests/typehints/scalar_reserved2.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved2_class_alias.phpt (renamed from Zend/tests/typehints/scalar_reserved2_class_alias.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved2_use.phpt (renamed from Zend/tests/typehints/scalar_reserved2_use.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved3.phpt (renamed from Zend/tests/typehints/scalar_reserved3.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved3_class_alias.phpt (renamed from Zend/tests/typehints/scalar_reserved3_class_alias.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved3_use.phpt (renamed from Zend/tests/typehints/scalar_reserved3_use.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved4.phpt (renamed from Zend/tests/typehints/scalar_reserved4.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved4_class_alias.phpt (renamed from Zend/tests/typehints/scalar_reserved4_class_alias.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved4_use.phpt (renamed from Zend/tests/typehints/scalar_reserved4_use.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved6.phpt (renamed from Zend/tests/typehints/scalar_reserved6.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved6_class_alias.phpt (renamed from Zend/tests/typehints/scalar_reserved6_class_alias.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved6_use.phpt (renamed from Zend/tests/typehints/scalar_reserved6_use.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_reserved7.phpt (renamed from Zend/tests/typehints/scalar_reserved7.phpt)2
-rw-r--r--Zend/tests/type_declarations/scalar_return_basic.phpt (renamed from Zend/tests/typehints/scalar_return_basic.phpt)14
-rw-r--r--Zend/tests/type_declarations/scalar_return_basic_64bit.phpt (renamed from Zend/tests/typehints/scalar_return_basic_64bit.phpt)14
-rw-r--r--Zend/tests/type_declarations/scalar_strict.phpt (renamed from Zend/tests/typehints/scalar_strict.phpt)12
-rw-r--r--Zend/tests/type_declarations/scalar_strict_64bit.phpt (renamed from Zend/tests/typehints/scalar_strict_64bit.phpt)12
-rw-r--r--Zend/tests/type_declarations/scalar_strict_basic.phpt (renamed from Zend/tests/typehints/scalar_strict_basic.phpt)12
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_001.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_001.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_002.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_002.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_003.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_003.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_004.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_004.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_005.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_005.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_006.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_006.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_007.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_007.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_strict_declaration_placement_008.phpt (renamed from Zend/tests/typehints/scalar_strict_declaration_placement_008.phpt)0
-rw-r--r--Zend/tests/type_declarations/scalar_weak_reference.phpt (renamed from Zend/tests/typehints/scalar_weak_reference.phpt)4
-rw-r--r--Zend/tests/type_declarations/self_on_closure_in_method.phpt (renamed from Zend/tests/typehints/self_on_closure_in_method.phpt)0
-rw-r--r--Zend/tests/type_declarations/strict_call_weak.phpt (renamed from Zend/tests/typehints/strict_call_weak.phpt)0
-rw-r--r--Zend/tests/type_declarations/strict_call_weak_2.inc (renamed from Zend/tests/typehints/strict_call_weak_2.inc)0
-rw-r--r--Zend/tests/type_declarations/strict_call_weak_explicit.phpt (renamed from Zend/tests/typehints/strict_call_weak_explicit.phpt)0
-rw-r--r--Zend/tests/type_declarations/strict_call_weak_explicit_2.inc (renamed from Zend/tests/typehints/strict_call_weak_explicit_2.inc)0
-rw-r--r--Zend/tests/type_declarations/strict_include_explicit_weak.phpt (renamed from Zend/tests/typehints/strict_include_explicit_weak.phpt)0
-rw-r--r--Zend/tests/type_declarations/strict_include_explicit_weak_2.inc (renamed from Zend/tests/typehints/strict_include_explicit_weak_2.inc)0
-rw-r--r--Zend/tests/type_declarations/strict_include_weak.phpt (renamed from Zend/tests/typehints/strict_include_weak.phpt)0
-rw-r--r--Zend/tests/type_declarations/strict_include_weak_2.inc (renamed from Zend/tests/typehints/strict_include_weak_2.inc)0
-rw-r--r--Zend/tests/type_declarations/strict_nested.phpt (renamed from Zend/tests/typehints/strict_nested.phpt)0
-rw-r--r--Zend/tests/type_declarations/typed_return_without_value.phpt14
-rw-r--r--Zend/tests/type_declarations/weak_call_strict.phpt (renamed from Zend/tests/typehints/weak_call_strict.phpt)0
-rw-r--r--Zend/tests/type_declarations/weak_call_strict_2.inc (renamed from Zend/tests/typehints/weak_call_strict_2.inc)0
-rw-r--r--Zend/tests/type_declarations/weak_explicit_call_strict.phpt (renamed from Zend/tests/typehints/weak_explicit_call_strict.phpt)0
-rw-r--r--Zend/tests/type_declarations/weak_include_strict.phpt (renamed from Zend/tests/typehints/weak_include_strict.phpt)0
-rw-r--r--Zend/tests/type_declarations/weak_include_strict_2.inc (renamed from Zend/tests/typehints/weak_include_strict_2.inc)0
-rw-r--r--Zend/tests/typehints/fully_qualified_scalar.phpt13
-rw-r--r--Zend/tests/typehints/namespace_relative_scalar.phpt11
-rw-r--r--Zend/tests/typehints/scalar_float_with_invalid_default.phpt16
-rw-r--r--Zend/tests/varSyntax/static_prop_on_expr_class.phpt13
-rw-r--r--Zend/tests/varSyntax/static_prop_on_expr_class_with_backslash.phpt13
-rw-r--r--Zend/tests/varSyntax/static_prop_on_int_expr_class.phpt11
-rw-r--r--Zend/tests/variadic/adding_additional_optional_parameter_error.phpt2
-rw-r--r--Zend/tests/variadic/typehint_error.phpt2
-rw-r--r--Zend/tests/variadic/typehint_suppressed_error.phpt2
-rw-r--r--Zend/zend.c174
-rw-r--r--Zend/zend.h41
-rw-r--r--Zend/zend_API.c332
-rw-r--r--Zend/zend_API.h66
-rw-r--r--Zend/zend_alloc.c580
-rw-r--r--Zend/zend_alloc.h51
-rw-r--r--Zend/zend_alloc_sizes.h18
-rw-r--r--Zend/zend_arena.h5
-rw-r--r--Zend/zend_ast.c132
-rw-r--r--Zend/zend_ast.h7
-rw-r--r--Zend/zend_bitset.h256
-rw-r--r--Zend/zend_build.h2
-rw-r--r--Zend/zend_builtin_functions.c347
-rw-r--r--Zend/zend_builtin_functions.h2
-rw-r--r--Zend/zend_closures.c237
-rw-r--r--Zend/zend_closures.h4
-rw-r--r--Zend/zend_compile.c2020
-rw-r--r--Zend/zend_compile.h195
-rw-r--r--Zend/zend_config.nw.h2
-rw-r--r--Zend/zend_config.w32.h6
-rw-r--r--Zend/zend_constants.c99
-rw-r--r--Zend/zend_constants.h7
-rw-r--r--Zend/zend_default_classes.c2
-rw-r--r--Zend/zend_dtrace.c10
-rw-r--r--Zend/zend_dtrace.h6
-rw-r--r--Zend/zend_errors.h2
-rw-r--r--Zend/zend_exceptions.c318
-rw-r--r--Zend/zend_exceptions.h12
-rw-r--r--Zend/zend_execute.c1697
-rw-r--r--Zend/zend_execute.h82
-rw-r--r--Zend/zend_execute_API.c343
-rw-r--r--Zend/zend_extensions.c94
-rw-r--r--Zend/zend_extensions.h47
-rw-r--r--Zend/zend_float.c2
-rw-r--r--Zend/zend_float.h2
-rw-r--r--Zend/zend_gc.c9
-rw-r--r--Zend/zend_gc.h2
-rw-r--r--Zend/zend_generators.c458
-rw-r--r--Zend/zend_generators.h37
-rw-r--r--Zend/zend_globals.h11
-rw-r--r--Zend/zend_globals_macros.h30
-rw-r--r--Zend/zend_hash.c275
-rw-r--r--Zend/zend_hash.h44
-rw-r--r--Zend/zend_highlight.c9
-rw-r--r--Zend/zend_highlight.h2
-rw-r--r--Zend/zend_inheritance.c216
-rw-r--r--Zend/zend_inheritance.h2
-rw-r--r--Zend/zend_ini.c2
-rw-r--r--Zend/zend_ini.h2
-rw-r--r--Zend/zend_ini_parser.y38
-rw-r--r--Zend/zend_ini_scanner.c10
-rw-r--r--Zend/zend_ini_scanner.h6
-rw-r--r--Zend/zend_ini_scanner.l10
-rw-r--r--Zend/zend_interfaces.c6
-rw-r--r--Zend/zend_interfaces.h2
-rw-r--r--Zend/zend_istdiostream.h2
-rw-r--r--Zend/zend_iterators.c8
-rw-r--r--Zend/zend_iterators.h2
-rw-r--r--Zend/zend_language_parser.y247
-rw-r--r--Zend/zend_language_scanner.c953
-rw-r--r--Zend/zend_language_scanner.h3
-rw-r--r--Zend/zend_language_scanner.l171
-rw-r--r--Zend/zend_list.c16
-rw-r--r--Zend/zend_list.h2
-rw-r--r--Zend/zend_llist.c2
-rw-r--r--Zend/zend_llist.h2
-rw-r--r--Zend/zend_long.h6
-rw-r--r--Zend/zend_modules.h4
-rw-r--r--Zend/zend_multibyte.c2
-rw-r--r--Zend/zend_multibyte.h2
-rw-r--r--Zend/zend_multiply.h29
-rw-r--r--Zend/zend_object_handlers.c383
-rw-r--r--Zend/zend_object_handlers.h10
-rw-r--r--Zend/zend_objects.c74
-rw-r--r--Zend/zend_objects.h2
-rw-r--r--Zend/zend_objects_API.c15
-rw-r--r--Zend/zend_objects_API.h4
-rw-r--r--Zend/zend_opcode.c360
-rw-r--r--Zend/zend_operators.c328
-rw-r--r--Zend/zend_operators.h220
-rw-r--r--Zend/zend_portability.h22
-rw-r--r--Zend/zend_ptr_stack.c2
-rw-r--r--Zend/zend_ptr_stack.h2
-rw-r--r--Zend/zend_range_check.h75
-rw-r--r--Zend/zend_signal.c4
-rw-r--r--Zend/zend_signal.h2
-rw-r--r--Zend/zend_smart_str.c62
-rw-r--r--Zend/zend_smart_str.h3
-rw-r--r--Zend/zend_smart_str_public.h2
-rw-r--r--Zend/zend_sort.c4
-rw-r--r--Zend/zend_sort.h2
-rw-r--r--Zend/zend_sprintf.c7
-rw-r--r--Zend/zend_stack.c2
-rw-r--r--Zend/zend_stack.h2
-rw-r--r--Zend/zend_stream.c2
-rw-r--r--Zend/zend_stream.h2
-rw-r--r--Zend/zend_string.c53
-rw-r--r--Zend/zend_string.h63
-rw-r--r--Zend/zend_strtod.c18
-rw-r--r--Zend/zend_strtod.h2
-rw-r--r--Zend/zend_strtod_int.h2
-rw-r--r--Zend/zend_ts_hash.c2
-rw-r--r--Zend/zend_ts_hash.h2
-rw-r--r--Zend/zend_type_info.h68
-rw-r--r--Zend/zend_types.h107
-rw-r--r--Zend/zend_variables.c117
-rw-r--r--Zend/zend_variables.h21
-rw-r--r--Zend/zend_virtual_cwd.c94
-rw-r--r--Zend/zend_virtual_cwd.h26
-rw-r--r--Zend/zend_vm.h5
-rw-r--r--Zend/zend_vm_def.h4711
-rw-r--r--Zend/zend_vm_execute.h42781
-rw-r--r--Zend/zend_vm_execute.skl42
-rw-r--r--Zend/zend_vm_gen.php1653
-rw-r--r--Zend/zend_vm_opcodes.c213
-rw-r--r--Zend/zend_vm_opcodes.h51
-rw-r--r--acinclude.m4118
-rw-r--r--build/build.mk2
-rw-r--r--build/build2.mk2
-rwxr-xr-xbuild/buildcheck.sh2
-rwxr-xr-xbuild/config-stubs6
-rw-r--r--build/genif.sh3
-rw-r--r--build/libtool.m44
-rw-r--r--build/order_by_dep.awk14
-rw-r--r--configure.in18
-rw-r--r--ext/bcmath/bcmath.c30
-rw-r--r--ext/bcmath/php_bcmath.h12
-rw-r--r--ext/bcmath/tests/bug72093-win32.phpt18
-rw-r--r--ext/bcmath/tests/bug72093.phpt18
-rw-r--r--ext/bz2/bz2.c2
-rw-r--r--ext/bz2/bz2_filter.c2
-rw-r--r--ext/bz2/php_bz2.h2
-rw-r--r--ext/calendar/cal_unix.c2
-rw-r--r--ext/calendar/calendar.c2
-rw-r--r--ext/calendar/easter.c2
-rw-r--r--ext/com_dotnet/com_com.c14
-rw-r--r--ext/com_dotnet/com_dotnet.c2
-rw-r--r--ext/com_dotnet/com_extension.c4
-rw-r--r--ext/com_dotnet/com_handlers.c2
-rw-r--r--ext/com_dotnet/com_iterator.c2
-rw-r--r--ext/com_dotnet/com_misc.c2
-rw-r--r--ext/com_dotnet/com_olechar.c2
-rw-r--r--ext/com_dotnet/com_persist.c2
-rw-r--r--ext/com_dotnet/com_saproxy.c2
-rw-r--r--ext/com_dotnet/com_typeinfo.c2
-rw-r--r--ext/com_dotnet/com_variant.c18
-rw-r--r--ext/com_dotnet/com_wrapper.c2
-rw-r--r--ext/com_dotnet/php_com_dotnet.h12
-rw-r--r--ext/com_dotnet/php_com_dotnet_internal.h2
-rw-r--r--ext/ctype/ctype.c2
-rw-r--r--ext/ctype/php_ctype.h2
-rw-r--r--ext/curl/config.w322
-rw-r--r--ext/curl/curl_file.c2
-rw-r--r--ext/curl/interface.c274
-rw-r--r--ext/curl/multi.c13
-rw-r--r--ext/curl/php_curl.h4
-rw-r--r--ext/curl/share.c2
-rw-r--r--ext/curl/tests/bug52202.phpt2
-rw-r--r--ext/curl/tests/bug55767.phpt2
-rw-r--r--ext/curl/tests/bug64267.phpt5
-rw-r--r--ext/curl/tests/bug68937.phpt12
-rw-r--r--ext/curl/tests/bug68937_2.phpt11
-rw-r--r--ext/curl/tests/bug70330.phpt17
-rw-r--r--ext/curl/tests/bug71144.phpt13
-rw-r--r--ext/curl/tests/bug71523.phpt31
-rw-r--r--ext/curl/tests/bug72202.phpt36
-rw-r--r--ext/curl/tests/check_win_config.phpt3
-rwxr-xr-xext/date/config.w326
-rw-r--r--ext/date/config0.m48
-rw-r--r--ext/date/lib/LICENSE.rst21
-rw-r--r--ext/date/lib/README7
-rw-r--r--ext/date/lib/README.rst8
-rw-r--r--ext/date/lib/astro.c41
-rw-r--r--ext/date/lib/astro.h24
-rw-r--r--ext/date/lib/dow.c38
-rw-r--r--ext/date/lib/interval.c40
-rw-r--r--ext/date/lib/parse_date.c296
-rw-r--r--ext/date/lib/parse_date.re107
-rw-r--r--ext/date/lib/parse_iso_intervals.c196
-rw-r--r--ext/date/lib/parse_iso_intervals.re62
-rw-r--r--ext/date/lib/parse_tz.c98
-rw-r--r--ext/date/lib/timelib.c149
-rw-r--r--ext/date/lib/timelib.h50
-rw-r--r--ext/date/lib/timelib_structs.h38
-rw-r--r--ext/date/lib/timezonedb.h57920
-rw-r--r--ext/date/lib/timezonemap.h110
-rw-r--r--ext/date/lib/tm2unixtime.c52
-rw-r--r--ext/date/lib/unixtime2tm.c48
-rw-r--r--ext/date/php_date.c78
-rw-r--r--ext/date/php_date.h8
-rw-r--r--ext/date/tests/010.phpt13
-rw-r--r--ext/date/tests/DateTimeZone_getLocation.phpt82
-rw-r--r--ext/date/tests/bug17988.phpt4
-rw-r--r--ext/date/tests/bug63740.phpt41
-rw-r--r--ext/date/tests/bug66985.phpt2
-rw-r--r--ext/date/tests/bug68078.phpt19
-rw-r--r--ext/date/tests/bug68078_negative.phpt19
-rw-r--r--ext/date/tests/bug70245.phpt10
-rw-r--r--ext/date/tests/bug70266.phpt8
-rw-r--r--ext/date/tests/bug70277.phpt17
-rw-r--r--ext/date/tests/bug71525.phpt20
-rw-r--r--ext/date/tests/bug71635.phpt11
-rw-r--r--ext/date/tests/bug71889.phpt11
-rw-r--r--ext/date/tests/date_sun_info_003.phpt42
-rw-r--r--ext/date/tests/gmmktime_basic.phpt2
-rw-r--r--ext/date/tests/mktime_error.phpt2
-rw-r--r--ext/dba/config.m46
-rw-r--r--ext/dba/dba.c27
-rw-r--r--ext/dba/dba_cdb.c2
-rw-r--r--ext/dba/dba_db1.c2
-rw-r--r--ext/dba/dba_db2.c2
-rw-r--r--ext/dba/dba_db3.c2
-rw-r--r--ext/dba/dba_db4.c2
-rw-r--r--ext/dba/dba_dbm.c2
-rw-r--r--ext/dba/dba_flatfile.c2
-rw-r--r--ext/dba/dba_gdbm.c2
-rw-r--r--ext/dba/dba_inifile.c2
-rw-r--r--ext/dba/dba_ndbm.c2
-rw-r--r--ext/dba/dba_qdbm.c2
-rw-r--r--ext/dba/dba_tcadb.c2
-rw-r--r--ext/dba/libcdb/cdb.c2
-rw-r--r--ext/dba/libcdb/cdb.h2
-rw-r--r--ext/dba/libcdb/cdb_make.c2
-rw-r--r--ext/dba/libcdb/cdb_make.h2
-rw-r--r--ext/dba/libcdb/uint32.c2
-rw-r--r--ext/dba/libcdb/uint32.h2
-rw-r--r--ext/dba/libflatfile/flatfile.c2
-rw-r--r--ext/dba/libflatfile/flatfile.h2
-rw-r--r--ext/dba/libinifile/inifile.c2
-rw-r--r--ext/dba/libinifile/inifile.h2
-rw-r--r--ext/dba/php_dba.h4
-rw-r--r--ext/dba/php_tcadb.h2
-rw-r--r--ext/dba/tests/bug72157.phpt22
-rw-r--r--ext/dom/attr.c2
-rw-r--r--ext/dom/cdatasection.c2
-rw-r--r--ext/dom/characterdata.c24
-rw-r--r--ext/dom/comment.c2
-rw-r--r--ext/dom/document.c41
-rw-r--r--ext/dom/documentfragment.c2
-rw-r--r--ext/dom/documenttype.c4
-rw-r--r--ext/dom/dom_ce.h2
-rw-r--r--ext/dom/dom_fe.h2
-rw-r--r--ext/dom/dom_iterators.c2
-rw-r--r--ext/dom/dom_properties.h2
-rw-r--r--ext/dom/domconfiguration.c2
-rw-r--r--ext/dom/domerror.c2
-rw-r--r--ext/dom/domerrorhandler.c2
-rw-r--r--ext/dom/domexception.c2
-rw-r--r--ext/dom/domimplementation.c2
-rw-r--r--ext/dom/domimplementationlist.c2
-rw-r--r--ext/dom/domimplementationsource.c2
-rw-r--r--ext/dom/domlocator.c2
-rw-r--r--ext/dom/domstringlist.c2
-rw-r--r--ext/dom/element.c2
-rw-r--r--ext/dom/entity.c2
-rw-r--r--ext/dom/entityreference.c2
-rw-r--r--ext/dom/namednodemap.c7
-rw-r--r--ext/dom/namelist.c2
-rw-r--r--ext/dom/node.c13
-rw-r--r--ext/dom/nodelist.c2
-rw-r--r--ext/dom/notation.c2
-rw-r--r--ext/dom/php_dom.c10
-rw-r--r--ext/dom/php_dom.h2
-rw-r--r--ext/dom/processinginstruction.c2
-rw-r--r--ext/dom/string_extend.c2
-rw-r--r--ext/dom/tests/bug70001.phpt17
-rw-r--r--ext/dom/tests/bug70558.phpt18
-rw-r--r--ext/dom/tests/node_textcontent.phpt5
-rw-r--r--ext/dom/text.c8
-rw-r--r--ext/dom/typeinfo.c2
-rw-r--r--ext/dom/userdatahandler.c2
-rw-r--r--ext/dom/xml_common.h2
-rw-r--r--ext/dom/xpath.c8
-rwxr-xr-xext/enchant/config.m42
-rw-r--r--ext/enchant/enchant.c6
-rw-r--r--ext/enchant/php_enchant.h4
-rw-r--r--ext/enchant/tests/broker_describe.phpt42
-rw-r--r--ext/enchant/tests/broker_dict_exists.phpt23
-rw-r--r--ext/enchant/tests/broker_free.phpt17
-rw-r--r--ext/enchant/tests/broker_free_01.phpt29
-rw-r--r--ext/enchant/tests/broker_free_02.phpt59
-rw-r--r--ext/enchant/tests/broker_free_dict.phpt52
-rw-r--r--ext/enchant/tests/broker_get_error.phpt30
-rw-r--r--ext/enchant/tests/broker_init.phpt11
-rw-r--r--ext/enchant/tests/broker_list_dicts.phpt28
-rw-r--r--ext/enchant/tests/broker_request_dict.phpt32
-rw-r--r--ext/enchant/tests/broker_request_dict_01.phpt30
-rw-r--r--ext/enchant/tests/broker_request_pwl_dict.phpt40
-rw-r--r--ext/enchant/tests/broker_set_ordering.phpt32
-rw-r--r--ext/enchant/tests/dict_add_to_personal.phpt46
-rw-r--r--ext/enchant/tests/dict_add_to_session.phpt45
-rw-r--r--ext/enchant/tests/dict_check.phpt46
-rw-r--r--ext/enchant/tests/dict_describe.phpt40
-rw-r--r--ext/enchant/tests/dict_get_error.phpt33
-rw-r--r--ext/enchant/tests/dict_is_in_session.phpt42
-rw-r--r--ext/enchant/tests/dict_quick_check.phpt4
-rw-r--r--ext/enchant/tests/dict_quick_check_01.phpt38
-rw-r--r--ext/enchant/tests/dict_store_replacement.phpt43
-rw-r--r--ext/enchant/tests/dict_suggest.phpt43
-rw-r--r--ext/enchant/tests/enchant_broker_request_pwl_dict.pwl10
-rw-r--r--ext/enchant/tests/enchant_broker_set_dict_path.phpt53
-rw-r--r--ext/exif/exif.c39
-rw-r--r--ext/exif/php_exif.h2
-rw-r--r--ext/exif/tests/bug72094.phpt61
-rw-r--r--ext/exif/tests/bug72094_1.jpgbin0 -> 140 bytes
-rw-r--r--ext/exif/tests/bug72094_2.jpgbin0 -> 140 bytes
-rw-r--r--ext/exif/tests/bug72094_3.jpgbin0 -> 112 bytes
-rw-r--r--ext/exif/tests/bug72094_4.jpgbin0 -> 32 bytes
-rwxr-xr-xext/ext_skel4
-rw-r--r--ext/fileinfo/fileinfo.c8
-rw-r--r--ext/fileinfo/libmagic.patch338
-rw-r--r--ext/fileinfo/libmagic/apprentice.c1
-rw-r--r--ext/fileinfo/libmagic/funcs.c7
-rw-r--r--ext/fileinfo/libmagic/softmagic.c68
-rw-r--r--ext/fileinfo/php_fileinfo.h2
-rw-r--r--ext/fileinfo/tests/bug68819_002.phpt2
-rw-r--r--ext/fileinfo/tests/bug68996.phpt2
-rw-r--r--ext/fileinfo/tests/bug71434.phpt17
-rw-r--r--ext/fileinfo/tests/bug71527.magic1
-rw-r--r--ext/fileinfo/tests/bug71527.phpt19
-rw-r--r--ext/filter/callback_filter.c2
-rw-r--r--ext/filter/filter.c13
-rw-r--r--ext/filter/filter_private.h2
-rw-r--r--ext/filter/logical_filters.c2
-rw-r--r--ext/filter/php_filter.h10
-rw-r--r--ext/filter/sanitizing_filters.c4
-rw-r--r--ext/filter/tests/bug67167.01.phpt16
-rw-r--r--ext/filter/tests/bug67167.02.phpt20
-rw-r--r--ext/filter/tests/bug71063.phpt16
-rw-r--r--ext/filter/tests/filter_var_array_with_ref.phpt2
-rw-r--r--ext/ftp/config.w326
-rw-r--r--ext/ftp/ftp.c10
-rw-r--r--ext/ftp/ftp.h4
-rw-r--r--ext/ftp/php_ftp.c17
-rw-r--r--ext/ftp/php_ftp.h3
-rw-r--r--ext/gd/config.m448
-rw-r--r--ext/gd/config.w3218
-rw-r--r--ext/gd/gd.c40
-rw-r--r--ext/gd/gd_compat.c4
-rw-r--r--ext/gd/gd_ctx.c9
-rw-r--r--ext/gd/libgd/gd.c30
-rw-r--r--ext/gd/libgd/gd_arc.c8
-rw-r--r--ext/gd/libgd/gd_crop.c6
-rw-r--r--ext/gd/libgd/gd_gd2.c6
-rw-r--r--ext/gd/libgd/gd_interpolation.c60
-rw-r--r--ext/gd/libgd/gd_webp.c231
-rw-r--r--ext/gd/libgd/webpimg.c900
-rw-r--r--ext/gd/libgd/webpimg.h181
-rw-r--r--ext/gd/libgd/xbm.c2
-rw-r--r--ext/gd/php_gd.h2
-rw-r--r--ext/gd/tests/bug53154.phpt21
-rw-r--r--ext/gd/tests/bug53156.phpt57
-rw-r--r--ext/gd/tests/bug53640.phpt22
-rw-r--r--ext/gd/tests/bug66339.phpt31
-rw-r--r--ext/gd/tests/bug66387.phpt15
-rw-r--r--ext/gd/tests/bug66590.phpt27
-rw-r--r--ext/gd/tests/bug66590_1.phpt17
-rw-r--r--ext/gd/tests/bug66882.phpt14
-rw-r--r--ext/gd/tests/bug67447.phpt26
-rw-r--r--ext/gd/tests/bug69024.phpt15
-rw-r--r--ext/gd/tests/bug70047.phpt15
-rw-r--r--ext/gd/tests/bug70102.phpt30
-rw-r--r--ext/gd/tests/bug70976.phpt13
-rw-r--r--ext/gd/tests/bug71912.phpt16
-rw-r--r--ext/gd/tests/bug71952.phpt14
-rw-r--r--ext/gd/tests/bug72227.phpt15
-rw-r--r--ext/gd/tests/bug72337.phpt14
-rw-r--r--ext/gd/tests/github_bug_215.phpt43
-rw-r--r--ext/gd/tests/imagefilledellipse_basic.phpt25
-rw-r--r--ext/gd/tests/imagewebp_nullbyte_injection.phpt6
-rw-r--r--ext/gd/tests/invalid_neg_size.gd2bin0 -> 1676 bytes
-rw-r--r--ext/gd/tests/similarity.inc64
-rw-r--r--ext/gd/tests/webp_basic.phpt35
-rw-r--r--ext/gettext/gettext.c2
-rw-r--r--ext/gettext/php_gettext.h2
-rw-r--r--ext/gmp/gmp.c31
-rw-r--r--ext/gmp/php_gmp.h13
-rw-r--r--ext/gmp/tests/bug70284.phpt50
-rw-r--r--ext/gmp/tests/gmp_random_seed-32bit.phpt230
-rw-r--r--ext/gmp/tests/gmp_random_seed.phpt1
-rw-r--r--ext/gmp/tests/serialize.phpt2
-rw-r--r--ext/hash/config.m44
-rw-r--r--ext/hash/config.w324
-rw-r--r--ext/hash/hash.c26
-rw-r--r--ext/hash/hash_adler32.c4
-rw-r--r--ext/hash/hash_crc32.c2
-rw-r--r--ext/hash/hash_fnv.c18
-rw-r--r--ext/hash/hash_gost.c16
-rw-r--r--ext/hash/hash_haval.c56
-rw-r--r--ext/hash/hash_joaat.c6
-rw-r--r--ext/hash/hash_md.c44
-rw-r--r--ext/hash/hash_ripemd.c68
-rw-r--r--ext/hash/hash_sha.c164
-rw-r--r--ext/hash/hash_sha3.c238
-rw-r--r--ext/hash/hash_snefru.c16
-rw-r--r--ext/hash/hash_tiger.c32
-rw-r--r--ext/hash/hash_whirlpool.c34
-rw-r--r--ext/hash/php_hash.h12
-rw-r--r--ext/hash/php_hash_adler32.h4
-rw-r--r--ext/hash/php_hash_crc32.h4
-rw-r--r--ext/hash/php_hash_crc32_tables.h6
-rw-r--r--ext/hash/php_hash_fnv.h18
-rw-r--r--ext/hash/php_hash_gost.h8
-rw-r--r--ext/hash/php_hash_gost_tables.h4
-rw-r--r--ext/hash/php_hash_haval.h8
-rw-r--r--ext/hash/php_hash_joaat.h6
-rw-r--r--ext/hash/php_hash_md.h10
-rw-r--r--ext/hash/php_hash_ripemd.h18
-rw-r--r--ext/hash/php_hash_sha.h30
-rw-r--r--ext/hash/php_hash_sha3.h59
-rw-r--r--ext/hash/php_hash_snefru.h6
-rw-r--r--ext/hash/php_hash_snefru_tables.h4
-rw-r--r--ext/hash/php_hash_tiger.h6
-rw-r--r--ext/hash/php_hash_tiger_tables.h4
-rw-r--r--ext/hash/php_hash_whirlpool.h4
-rw-r--r--ext/hash/php_hash_whirlpool_tables.h20
-rw-r--r--ext/hash/tests/bug70312.phpt18
-rw-r--r--ext/hash/tests/hash_algos.phpt14
-rw-r--r--ext/hash/tests/hash_copy_001.phpt36
-rw-r--r--ext/hash/tests/hash_file_basic1.phpt2
-rw-r--r--ext/hash/tests/hash_hmac_basic.phpt2
-rw-r--r--ext/hash/tests/hash_hmac_file_basic.phpt2
-rw-r--r--ext/hash/tests/sha3.phpt56
-rw-r--r--ext/hash/tests/sha512-224.phpt13
-rw-r--r--ext/hash/tests/sha512-256.phpt13
-rw-r--r--ext/iconv/iconv.c24
-rw-r--r--ext/iconv/php_iconv.h13
-rw-r--r--ext/iconv/tests/iconv_strpos.phpt5
-rw-r--r--ext/iconv/tests/iconv_strpos_variation3.phpt135
-rw-r--r--ext/iconv/tests/iconv_strpos_variation3_64bit.phpt133
-rw-r--r--ext/iconv/tests/iconv_strpos_variation5.phpt17
-rw-r--r--ext/imap/config.m415
-rw-r--r--ext/imap/config.w322
-rw-r--r--ext/imap/php_imap.c26
-rw-r--r--ext/imap/php_imap.h2
-rw-r--r--ext/interbase/config.m42
-rw-r--r--ext/interbase/config.w322
-rw-r--r--ext/interbase/ibase_blobs.c32
-rw-r--r--ext/interbase/ibase_events.c68
-rw-r--r--ext/interbase/ibase_query.c135
-rw-r--r--ext/interbase/ibase_service.c19
-rw-r--r--ext/interbase/interbase.c132
-rw-r--r--ext/interbase/php_ibase_includes.h41
-rw-r--r--ext/interbase/php_ibase_udf.c10
-rw-r--r--ext/interbase/php_interbase.h2
-rw-r--r--ext/interbase/tests/004.phpt2
-rw-r--r--ext/interbase/tests/005.phpt4
-rw-r--r--ext/interbase/tests/bug46543.phpt8
-rw-r--r--ext/interbase/tests/ibase_close_001.phpt4
-rw-r--r--ext/interbase/tests/ibase_trans_001.phpt4
-rw-r--r--ext/intl/ERROR.CONVENTIONS20
-rw-r--r--ext/intl/calendar/calendar_class.cpp4
-rw-r--r--ext/intl/calendar/calendar_methods.cpp56
-rw-r--r--ext/intl/collator/collator_convert.c8
-rw-r--r--ext/intl/collator/collator_is_numeric.c15
-rw-r--r--ext/intl/collator/collator_sort.c15
-rw-r--r--ext/intl/common/common_enum.cpp2
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp74
-rw-r--r--ext/intl/dateformat/dateformat_format_object.cpp14
-rw-r--r--ext/intl/formatter/formatter_format.c1
-rw-r--r--ext/intl/grapheme/grapheme_string.c42
-rw-r--r--ext/intl/intl_data.h12
-rw-r--r--ext/intl/locale/locale_methods.c127
-rw-r--r--ext/intl/msgformat/msgformat.c1
-rw-r--r--ext/intl/msgformat/msgformat_attr.c2
-rw-r--r--ext/intl/msgformat/msgformat_format.c3
-rw-r--r--ext/intl/msgformat/msgformat_helpers.cpp4
-rw-r--r--ext/intl/msgformat/msgformat_parse.c3
-rw-r--r--ext/intl/php_intl.c2
-rw-r--r--ext/intl/php_intl.h12
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.c2
-rw-r--r--ext/intl/tests/bug53735.phpt32
-rw-r--r--ext/intl/tests/bug67052.phpt4
-rw-r--r--ext/intl/tests/bug69374.phpt24
-rw-r--r--ext/intl/tests/bug69398.phpt22
-rw-r--r--ext/intl/tests/bug70451.phpt12
-rw-r--r--ext/intl/tests/bug70452.phpt21
-rw-r--r--ext/intl/tests/bug71020.phpt15
-rw-r--r--ext/intl/tests/bug72061.phpt15
-rw-r--r--ext/intl/tests/bug72241.phpt14
-rw-r--r--ext/intl/tests/calendar_before_after_error.phpt4
-rw-r--r--ext/intl/tests/calendar_clear_error.phpt3
-rw-r--r--ext/intl/tests/calendar_equals_error.phpt8
-rw-r--r--ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt8
-rw-r--r--ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt6
-rw-r--r--ext/intl/tests/calendar_isEquivalentTo_error.phpt8
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt1
-rw-r--r--ext/intl/tests/calendar_setTimeZone_error.phpt2
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant4.phpt2
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant5.phpt1
-rw-r--r--ext/intl/tests/collator_get_sort_key_variant6.phpt98
-rw-r--r--ext/intl/tests/dateformat_bug68893.phpt19
-rw-r--r--ext/intl/tests/dateformat_bug71516.phpt25
-rw-r--r--ext/intl/tests/formatter_format5.phpt3
-rw-r--r--ext/intl/tests/formatter_format6.phpt130
-rw-r--r--ext/intl/tests/formatter_get_set_text_attribute.phpt3
-rw-r--r--ext/intl/tests/formatter_get_set_text_attribute_var2.phpt122
-rw-r--r--ext/intl/tests/grapheme.phpt24
-rw-r--r--ext/intl/tests/locale_bug66289.phpt27
-rw-r--r--ext/intl/tests/msgfmt_bug70484.phpt97
-rw-r--r--ext/intl/tests/timezone_IDforWindowsID_basic.phpt46
-rw-r--r--ext/intl/tests/timezone_getCanonicalID_error.phpt6
-rw-r--r--ext/intl/tests/timezone_hasSameRules_error.phpt4
-rw-r--r--ext/intl/tests/timezone_windowsID_basic.phpt43
-rw-r--r--ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt8
-rw-r--r--ext/intl/timezone/timezone_class.cpp15
-rw-r--r--ext/intl/timezone/timezone_methods.cpp82
-rw-r--r--ext/intl/timezone/timezone_methods.h5
-rw-r--r--ext/intl/transliterator/transliterator_class.c8
-rw-r--r--ext/intl/transliterator/transliterator_methods.c1
-rw-r--r--ext/intl/uchar/tests/basic-functionality.phpt2
-rw-r--r--ext/intl/uchar/tests/bug70453.phpt18
-rw-r--r--ext/intl/uchar/tests/bug70454.phpt18
-rw-r--r--ext/intl/uchar/tests/bug70455.phpt13
-rw-r--r--ext/intl/uchar/uchar.c50
-rw-r--r--ext/json/json.c69
-rw-r--r--ext/json/json_encoder.c17
-rw-r--r--ext/json/json_parser.tab.c1147
-rw-r--r--ext/json/json_parser.tab.h72
-rw-r--r--ext/json/json_parser.y165
-rw-r--r--ext/json/json_scanner.c1097
-rw-r--r--ext/json/json_scanner.re2
-rw-r--r--ext/json/php_json.h43
-rw-r--r--ext/json/php_json_encoder.h2
-rw-r--r--ext/json/php_json_parser.h60
-rw-r--r--ext/json/php_json_scanner.h2
-rw-r--r--ext/json/php_json_scanner_defs.h2
-rw-r--r--ext/json/tests/002.phpt1
-rw-r--r--ext/json/tests/006.phpt13
-rw-r--r--ext/json/tests/007.phpt1
-rw-r--r--ext/json/tests/bug40503.phpt8
-rw-r--r--ext/json/tests/bug41034.phpt2
-rw-r--r--ext/json/tests/bug41403.phpt2
-rw-r--r--ext/json/tests/bug42785.phpt13
-rw-r--r--ext/json/tests/bug46215.phpt8
-rw-r--r--ext/json/tests/bug46944.phpt4
-rw-r--r--ext/json/tests/bug47644.phpt4
-rw-r--r--ext/json/tests/bug54058.phpt4
-rw-r--r--ext/json/tests/bug54484.phpt3
-rw-r--r--ext/json/tests/bug61978.phpt32
-rw-r--r--ext/json/tests/bug62369.phpt28
-rw-r--r--ext/json/tests/bug63737.phpt8
-rw-r--r--ext/json/tests/bug64874_part1.phpt6
-rw-r--r--ext/json/tests/bug64874_part2.phpt4
-rw-r--r--ext/json/tests/bug66021.phpt2
-rw-r--r--ext/json/tests/bug71835.phpt27
-rw-r--r--ext/json/tests/bug72069.phpt29
-rw-r--r--ext/json/tests/fail001.phpt65
-rw-r--r--ext/json/tests/json_decode_basic.phpt57
-rw-r--r--ext/json/tests/json_decode_error.phpt15
-rw-r--r--ext/json/tests/json_encode_basic.phpt98
-rw-r--r--ext/json/tests/json_encode_basic_utf8.phpt11
-rw-r--r--ext/json/tests/json_encode_error.phpt16
-rw-r--r--ext/json/tests/json_encode_numeric.phpt6
-rw-r--r--ext/json/tests/json_encode_u2028_u2029.phpt36
-rw-r--r--ext/json/tests/json_last_error_error.phpt21
-rw-r--r--ext/json/tests/json_last_error_msg_error.phpt21
-rw-r--r--ext/json/tests/pass001.1.phpt4
-rw-r--r--ext/json/tests/pass001.1_64bit.phpt4
-rw-r--r--ext/json/tests/pass001.phpt2
-rw-r--r--ext/json/tests/pass002.phpt4
-rw-r--r--ext/json/tests/pass003.phpt4
-rw-r--r--ext/ldap/config.m42
-rw-r--r--ext/ldap/config.w321
-rw-r--r--ext/ldap/ldap.c114
-rw-r--r--ext/ldap/php_ldap.h2
-rw-r--r--ext/ldap/tests/README10
-rw-r--r--ext/ldap/tests/connect.inc14
-rw-r--r--ext/ldap/tests/ldap_control_paged_results_variation1.phpt2
-rw-r--r--ext/ldap/tests/ldap_control_paged_results_variation2.phpt2
-rw-r--r--ext/ldap/tests/ldap_get_option_variation.phpt5
-rw-r--r--ext/ldap/tests/ldap_option_reqcert_basic.phpt24
-rw-r--r--ext/ldap/tests/ldap_option_reqcert_error.phpt24
-rw-r--r--ext/ldap/tests/ldap_search_overrides.phpt215
-rw-r--r--ext/ldap/tests/ldap_set_option_reqcert_basic.phpt36
-rw-r--r--ext/ldap/tests/ldap_set_option_reqcert_error.phpt17
-rw-r--r--ext/libxml/libxml.c8
-rw-r--r--ext/libxml/php_libxml.h15
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c2
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c2
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c2
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_utf8.c15
-rw-r--r--ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c14
-rw-r--r--ext/mbstring/libmbfl/mbfl/mbfilter.c8
-rw-r--r--ext/mbstring/mb_gpc.c8
-rw-r--r--ext/mbstring/mbstring.c317
-rw-r--r--ext/mbstring/mbstring.h11
-rw-r--r--ext/mbstring/oniguruma/regint.h19
-rw-r--r--ext/mbstring/oniguruma/win32/config.h5
-rw-r--r--ext/mbstring/php_mbregex.c56
-rw-r--r--ext/mbstring/php_mbregex.h2
-rw-r--r--ext/mbstring/php_unicode.c2
-rw-r--r--ext/mbstring/php_unicode.h2
-rw-r--r--ext/mbstring/tests/bug45923.phpt234
-rw-r--r--ext/mbstring/tests/bug72164.phpt14
-rw-r--r--ext/mbstring/tests/mb_ereg_search_setpos.phpt70
-rw-r--r--ext/mbstring/tests/mb_strimwidth.phpt36
-rw-r--r--ext/mbstring/tests/mb_stripos.phpt122
-rw-r--r--ext/mbstring/tests/mb_stripos_variation3.phpt67
-rw-r--r--ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt22
-rw-r--r--ext/mbstring/tests/mb_strpos.phpt97
-rw-r--r--ext/mbstring/tests/mb_strpos_variation3.phpt62
-rw-r--r--ext/mbstring/tests/mb_strpos_variation5.phpt16
-rw-r--r--ext/mbstring/unicode_data.h3378
-rw-r--r--ext/mcrypt/config.m42
-rw-r--r--ext/mcrypt/config.w322
-rw-r--r--ext/mcrypt/mcrypt.c54
-rw-r--r--ext/mcrypt/mcrypt_filter.c12
-rw-r--r--ext/mcrypt/php_mcrypt.h8
-rw-r--r--ext/mcrypt/php_mcrypt_filter.h2
-rw-r--r--ext/mcrypt/tests/bug70625.phpt17
-rw-r--r--ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt5
-rw-r--r--ext/mcrypt/tests/mcrypt_module_get_algo_key_size.phpt5
-rw-r--r--ext/mysqli/mysqli.c31
-rw-r--r--ext/mysqli/mysqli_api.c18
-rw-r--r--ext/mysqli/mysqli_driver.c2
-rw-r--r--ext/mysqli/mysqli_embedded.c20
-rw-r--r--ext/mysqli/mysqli_exception.c2
-rw-r--r--ext/mysqli/mysqli_fe.c8
-rw-r--r--ext/mysqli/mysqli_fe.h3
-rw-r--r--ext/mysqli/mysqli_libmysql.h2
-rw-r--r--ext/mysqli/mysqli_mysqlnd.h8
-rw-r--r--ext/mysqli/mysqli_nonapi.c4
-rw-r--r--ext/mysqli/mysqli_priv.h6
-rw-r--r--ext/mysqli/mysqli_prop.c10
-rw-r--r--ext/mysqli/mysqli_report.c2
-rw-r--r--ext/mysqli/mysqli_result_iterator.c2
-rw-r--r--ext/mysqli/mysqli_warning.c2
-rw-r--r--ext/mysqli/php_mysqli.h2
-rw-r--r--ext/mysqli/php_mysqli_structs.h16
-rw-r--r--ext/mysqli/tests/bug32490.phpt13
-rw-r--r--ext/mysqli/tests/bug38003.phpt6
-rw-r--r--ext/mysqli/tests/bug51647.phpt47
-rw-r--r--ext/mysqli/tests/bug55283.phpt2
-rw-r--r--ext/mysqli/tests/bug68077.phpt80
-rw-r--r--ext/mysqli/tests/bug70384.phpt62
-rw-r--r--ext/mysqli/tests/bug70949.phpt62
-rw-r--r--ext/mysqli/tests/cacert.pem92
-rw-r--r--ext/mysqli/tests/client-cert.pem110
-rw-r--r--ext/mysqli/tests/client-key.pem38
-rw-r--r--ext/mysqli/tests/connect.inc9
-rw-r--r--ext/mysqli/tests/mysqli_change_user_new.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_interface.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt130
-rw-r--r--ext/mysqli/tests/mysqli_connect_oo.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_constants.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_flags.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_oo.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_get_client_stats.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_options_openbasedir.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_result_references.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt2
-rw-r--r--ext/mysqlnd/config.w327
-rw-r--r--ext/mysqlnd/config9.m48
-rw-r--r--ext/mysqlnd/mysql_float_to_double.h2
-rw-r--r--ext/mysqlnd/mysqlnd.h127
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.c222
-rw-r--r--ext/mysqlnd/mysqlnd_alloc.h48
-rw-r--r--ext/mysqlnd/mysqlnd_auth.c358
-rw-r--r--ext/mysqlnd/mysqlnd_auth.h126
-rw-r--r--ext/mysqlnd/mysqlnd_block_alloc.c31
-rw-r--r--ext/mysqlnd/mysqlnd_block_alloc.h9
-rw-r--r--ext/mysqlnd/mysqlnd_charset.c12
-rw-r--r--ext/mysqlnd/mysqlnd_charset.h8
-rw-r--r--ext/mysqlnd/mysqlnd_commands.c1470
-rw-r--r--ext/mysqlnd/mysqlnd_commands.h34
-rw-r--r--ext/mysqlnd/mysqlnd_connection.c (renamed from ext/mysqlnd/mysqlnd.c)2106
-rw-r--r--ext/mysqlnd/mysqlnd_connection.h87
-rw-r--r--ext/mysqlnd/mysqlnd_debug.c11
-rw-r--r--ext/mysqlnd/mysqlnd_debug.h21
-rw-r--r--ext/mysqlnd/mysqlnd_driver.c193
-rw-r--r--ext/mysqlnd/mysqlnd_enum_n_def.h59
-rw-r--r--ext/mysqlnd/mysqlnd_ext_plugin.c338
-rw-r--r--ext/mysqlnd/mysqlnd_ext_plugin.h202
-rw-r--r--ext/mysqlnd/mysqlnd_libmysql_compat.h13
-rw-r--r--ext/mysqlnd/mysqlnd_loaddata.c41
-rw-r--r--ext/mysqlnd/mysqlnd_net.c112
-rw-r--r--ext/mysqlnd/mysqlnd_plugin.c12
-rw-r--r--ext/mysqlnd/mysqlnd_plugin.h41
-rw-r--r--ext/mysqlnd/mysqlnd_portability.h2
-rw-r--r--ext/mysqlnd/mysqlnd_priv.h227
-rw-r--r--ext/mysqlnd/mysqlnd_protocol_frame_codec.c508
-rw-r--r--ext/mysqlnd/mysqlnd_protocol_frame_codec.h (renamed from ext/mysqlnd/mysqlnd_net.h)19
-rw-r--r--ext/mysqlnd/mysqlnd_ps.c786
-rw-r--r--ext/mysqlnd/mysqlnd_ps.h54
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c82
-rw-r--r--ext/mysqlnd/mysqlnd_read_buffer.c96
-rw-r--r--ext/mysqlnd/mysqlnd_read_buffer.h25
-rw-r--r--ext/mysqlnd/mysqlnd_result.c456
-rw-r--r--ext/mysqlnd/mysqlnd_result.h17
-rw-r--r--ext/mysqlnd/mysqlnd_result_meta.c33
-rw-r--r--ext/mysqlnd/mysqlnd_result_meta.h10
-rw-r--r--ext/mysqlnd/mysqlnd_reverse_api.c9
-rw-r--r--ext/mysqlnd/mysqlnd_reverse_api.h9
-rw-r--r--ext/mysqlnd/mysqlnd_statistics.c69
-rw-r--r--ext/mysqlnd/mysqlnd_statistics.h57
-rw-r--r--ext/mysqlnd/mysqlnd_structs.h698
-rw-r--r--ext/mysqlnd/mysqlnd_vio.c805
-rw-r--r--ext/mysqlnd/mysqlnd_vio.h35
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c988
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.h58
-rw-r--r--ext/mysqlnd/php_mysqlnd.c11
-rw-r--r--ext/mysqlnd/php_mysqlnd.h9
-rw-r--r--ext/oci8/LICENSE2
-rw-r--r--ext/oci8/README22
-rw-r--r--ext/oci8/oci8.c411
-rw-r--r--ext/oci8/oci8_collection.c4
-rw-r--r--ext/oci8/oci8_dtrace.d6
-rw-r--r--ext/oci8/oci8_interface.c240
-rw-r--r--ext/oci8/oci8_lob.c45
-rw-r--r--ext/oci8/oci8_statement.c255
-rw-r--r--ext/oci8/package.xml191
-rw-r--r--ext/oci8/php_oci8.h4
-rw-r--r--ext/oci8/php_oci8_int.h33
-rw-r--r--ext/oci8/tests/bind_char_1.phpt8
-rw-r--r--ext/oci8/tests/bind_char_1_11gR1.phpt12
-rw-r--r--ext/oci8/tests/bind_char_2.phpt7
-rw-r--r--ext/oci8/tests/bind_char_2_11gR1.phpt6
-rw-r--r--ext/oci8/tests/bind_char_3.phpt11
-rw-r--r--ext/oci8/tests/bind_char_3_11gR1.phpt5
-rw-r--r--ext/oci8/tests/bind_char_4.phpt11
-rw-r--r--ext/oci8/tests/bind_char_4_11gR1.phpt5
-rw-r--r--ext/oci8/tests/bind_long.phpt4
-rw-r--r--ext/oci8/tests/bind_sqltnum.phpt40
-rw-r--r--ext/oci8/tests/bind_sqltnum_11g.phpt279
-rw-r--r--ext/oci8/tests/bug27303_1_11gR1.phpt380
-rw-r--r--ext/oci8/tests/bug27303_2_11gR1.phpt202
-rw-r--r--ext/oci8/tests/bug27303_4_11gR1.phpt380
-rw-r--r--ext/oci8/tests/bug47281.phpt2
-rw-r--r--ext/oci8/tests/bug51253.phpt8
-rw-r--r--ext/oci8/tests/bug68298.phpt51
-rw-r--r--ext/oci8/tests/bug71422.phpt65
-rw-r--r--ext/oci8/tests/bug71600.phpt96
-rw-r--r--ext/oci8/tests/coll_002.phpt2
-rw-r--r--ext/oci8/tests/coll_002_func.phpt2
-rw-r--r--ext/oci8/tests/coll_006.phpt2
-rw-r--r--ext/oci8/tests/coll_006_func.phpt2
-rw-r--r--ext/oci8/tests/conn_attr_2.phpt2
-rw-r--r--ext/oci8/tests/define4.phpt2
-rw-r--r--ext/oci8/tests/drcp_cclass1.phpt3
-rw-r--r--ext/oci8/tests/drcp_privileged.phpt3
-rw-r--r--ext/oci8/tests/driver_name.phpt25
-rw-r--r--ext/oci8/tests/driver_name_11gR2.phpt64
-rw-r--r--ext/oci8/tests/extauth_01.phpt4
-rw-r--r--ext/oci8/tests/extauth_02.phpt4
-rw-r--r--ext/oci8/tests/extauth_03.phpt4
-rw-r--r--ext/oci8/tests/extauth_04.phpt3
-rw-r--r--ext/oci8/tests/imp_res_close.phpt3
-rw-r--r--ext/oci8/tests/imp_res_get_close_1.phpt6
-rw-r--r--ext/oci8/tests/imp_res_get_close_2.phpt3
-rw-r--r--ext/oci8/tests/lob_009.phpt2
-rw-r--r--ext/oci8/tests/lob_014.phpt2
-rw-r--r--ext/oci8/tests/lob_021.phpt4
-rw-r--r--ext/oci8/tests/lob_023.phpt2
-rw-r--r--ext/oci8/tests/lob_041.phpt2
-rw-r--r--ext/oci8/tests/old_oci_close1.phpt4
-rw-r--r--ext/oci8/tests/xmltype_01.phpt2
-rw-r--r--ext/odbc/birdstep.c4
-rw-r--r--ext/odbc/php_birdstep.h2
-rw-r--r--ext/odbc/php_odbc.c70
-rw-r--r--ext/odbc/php_odbc.h10
-rw-r--r--ext/odbc/php_odbc_includes.h23
-rw-r--r--ext/odbc/tests/bug47803.phpt185
-rw-r--r--ext/odbc/tests/bug71171.phpt43
-rw-r--r--ext/odbc/tests/config.inc17
-rw-r--r--ext/opcache/Optimizer/block_pass.c2558
-rw-r--r--ext/opcache/Optimizer/compact_literals.c87
-rw-r--r--ext/opcache/Optimizer/dfa_pass.c632
-rw-r--r--ext/opcache/Optimizer/nop_removal.c81
-rw-r--r--ext/opcache/Optimizer/optimize_func_calls.c54
-rw-r--r--ext/opcache/Optimizer/optimize_temp_vars_5.c154
-rw-r--r--ext/opcache/Optimizer/pass1_5.c112
-rw-r--r--ext/opcache/Optimizer/pass2.c57
-rw-r--r--ext/opcache/Optimizer/pass3.c146
-rw-r--r--ext/opcache/Optimizer/zend_call_graph.c300
-rw-r--r--ext/opcache/Optimizer/zend_call_graph.h83
-rw-r--r--ext/opcache/Optimizer/zend_cfg.c844
-rw-r--r--ext/opcache/Optimizer/zend_cfg.h132
-rw-r--r--ext/opcache/Optimizer/zend_dfg.c248
-rw-r--r--ext/opcache/Optimizer/zend_dfg.h58
-rw-r--r--ext/opcache/Optimizer/zend_dump.c1171
-rw-r--r--ext/opcache/Optimizer/zend_dump.h51
-rw-r--r--ext/opcache/Optimizer/zend_func_info.c1288
-rw-r--r--ext/opcache/Optimizer/zend_func_info.h70
-rw-r--r--ext/opcache/Optimizer/zend_inference.c4051
-rw-r--r--ext/opcache/Optimizer/zend_inference.h263
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.c943
-rw-r--r--ext/opcache/Optimizer/zend_optimizer.h54
-rw-r--r--ext/opcache/Optimizer/zend_optimizer_internal.h95
-rw-r--r--ext/opcache/Optimizer/zend_ssa.c1103
-rw-r--r--ext/opcache/Optimizer/zend_ssa.h157
-rw-r--r--ext/opcache/Optimizer/zend_worklist.h137
-rw-r--r--ext/opcache/README3
-rw-r--r--ext/opcache/ZendAccelerator.c528
-rw-r--r--ext/opcache/ZendAccelerator.h74
-rw-r--r--ext/opcache/config.m428
-rw-r--r--ext/opcache/config.w324
-rw-r--r--ext/opcache/shared_alloc_mmap.c2
-rw-r--r--ext/opcache/shared_alloc_posix.c2
-rw-r--r--ext/opcache/shared_alloc_shm.c2
-rw-r--r--ext/opcache/shared_alloc_win32.c74
-rw-r--r--ext/opcache/tests/bug65915.phpt4
-rw-r--r--ext/opcache/tests/bug66338.phpt4
-rw-r--r--ext/opcache/tests/bug67215.phpt2
-rw-r--r--ext/opcache/tests/bug70111.phpt18
-rw-r--r--ext/opcache/tests/bug70207.phpt23
-rw-r--r--ext/opcache/tests/bug70237.phpt20
-rw-r--r--ext/opcache/tests/bug70423.phpt70
-rw-r--r--ext/opcache/tests/bug71127.phpt25
-rw-r--r--ext/opcache/tests/bug71443.phpt17
-rw-r--r--ext/opcache/tests/bug71843.phpt25
-rw-r--r--ext/opcache/tests/bug72014.phpt29
-rw-r--r--ext/opcache/tests/issue0140.phpt1
-rw-r--r--ext/opcache/tests/revalidate_path_01.phpt28
-rw-r--r--ext/opcache/tests/ssa_bug_001.phpt19
-rw-r--r--ext/opcache/tests/ssa_bug_002.phpt16
-rw-r--r--ext/opcache/tests/ssa_bug_003.phpt38
-rw-r--r--ext/opcache/zend_accelerator_blacklist.c2
-rw-r--r--ext/opcache/zend_accelerator_blacklist.h2
-rw-r--r--ext/opcache/zend_accelerator_debug.c2
-rw-r--r--ext/opcache/zend_accelerator_debug.h2
-rw-r--r--ext/opcache/zend_accelerator_hash.c2
-rw-r--r--ext/opcache/zend_accelerator_hash.h2
-rw-r--r--ext/opcache/zend_accelerator_module.c44
-rw-r--r--ext/opcache/zend_accelerator_module.h2
-rw-r--r--ext/opcache/zend_accelerator_util_funcs.c147
-rw-r--r--ext/opcache/zend_accelerator_util_funcs.h2
-rw-r--r--ext/opcache/zend_file_cache.c240
-rw-r--r--ext/opcache/zend_file_cache.h2
-rw-r--r--ext/opcache/zend_persist.c246
-rw-r--r--ext/opcache/zend_persist.h2
-rw-r--r--ext/opcache/zend_persist_calc.c65
-rw-r--r--ext/opcache/zend_shared_alloc.c45
-rw-r--r--ext/opcache/zend_shared_alloc.h9
-rw-r--r--ext/openssl/config0.m44
-rw-r--r--ext/openssl/openssl.c674
-rw-r--r--ext/openssl/php_openssl.h2
-rw-r--r--ext/openssl/tests/002.phpt32
-rw-r--r--ext/openssl/tests/007.phpt60
-rw-r--r--ext/openssl/tests/008.phpt79
-rw-r--r--ext/openssl/tests/012.phpt27
-rw-r--r--ext/openssl/tests/026.phpt12
-rw-r--r--ext/openssl/tests/bug55259.phpt29
-rw-r--r--ext/openssl/tests/bug60632.phpt27
-rw-r--r--ext/openssl/tests/bug70395.phpt19
-rw-r--r--ext/openssl/tests/bug70438.phpt29
-rw-r--r--ext/openssl/tests/bug71475.phpt16
-rw-r--r--ext/openssl/tests/bug72165.phpt17
-rw-r--r--ext/openssl/tests/cert.csr (renamed from ext/openssl/tests/005_crt.txt)0
-rw-r--r--ext/openssl/tests/check_default_conf_path.phpt24
-rw-r--r--ext/openssl/tests/openssl_csr_export_bacis.phpt (renamed from ext/openssl/tests/022.phpt)4
-rw-r--r--ext/openssl/tests/openssl_csr_get_subject_basic.phpt (renamed from ext/openssl/tests/005.phpt)2
-rw-r--r--ext/openssl/tests/openssl_csr_new_basic.phpt (renamed from ext/openssl/tests/004.phpt)13
-rw-r--r--ext/openssl/tests/openssl_csr_sign_basic.phpt (renamed from ext/openssl/tests/021.phpt)2
-rw-r--r--ext/openssl/tests/openssl_decrypt_basic.phpt (renamed from ext/openssl/tests/011.phpt)2
-rw-r--r--ext/openssl/tests/openssl_error_string_basic.phpt182
-rw-r--r--ext/openssl/tests/openssl_get_cipher_methods.phpt16
-rw-r--r--ext/openssl/tests/openssl_get_md_methods.phpt16
-rw-r--r--ext/openssl/tests/openssl_open_basic.phpt (renamed from ext/openssl/tests/013.phpt)2
-rw-r--r--ext/openssl/tests/openssl_pbkdf2_basic.phpt (renamed from ext/openssl/tests/openssl_pbkdf2.phpt)0
-rw-r--r--ext/openssl/tests/openssl_peer_fingerprint_basic.phpt (renamed from ext/openssl/tests/openssl_peer_fingerprint.phpt)0
-rw-r--r--ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt (renamed from ext/openssl/tests/024.phpt)2
-rw-r--r--ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt (renamed from ext/openssl/tests/003.phpt)2
-rw-r--r--ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt (renamed from ext/openssl/tests/023.phpt)2
-rw-r--r--ext/openssl/tests/openssl_pkcs7_sign_basic.phpt (renamed from ext/openssl/tests/025.phpt)5
-rw-r--r--ext/openssl/tests/openssl_pkey_export_basic.phpt (renamed from ext/openssl/tests/027.phpt)8
-rw-r--r--ext/openssl/tests/openssl_pkey_get_details_basic.phpt (renamed from ext/openssl/tests/028.phpt)0
-rw-r--r--ext/openssl/tests/openssl_pkey_new_basic.phpt106
-rw-r--r--ext/openssl/tests/openssl_pkey_new_error.phpt (renamed from ext/openssl/tests/006.phpt)2
-rw-r--r--ext/openssl/tests/openssl_private_decrypt_basic.phpt (renamed from ext/openssl/tests/017.phpt)2
-rw-r--r--ext/openssl/tests/openssl_private_encrypt_basic.phpt (renamed from ext/openssl/tests/014.phpt)9
-rw-r--r--ext/openssl/tests/openssl_public_decrypt_basic.phpt (renamed from ext/openssl/tests/016.phpt)2
-rw-r--r--ext/openssl/tests/openssl_public_encrypt_basic.phpt (renamed from ext/openssl/tests/015.phpt)9
-rw-r--r--ext/openssl/tests/openssl_random_pseudo_bytes_basic.phpt (renamed from ext/openssl/tests/openssl_random_pseudo_bytes.phpt)0
-rw-r--r--ext/openssl/tests/openssl_seal_basic.phpt58
-rw-r--r--ext/openssl/tests/openssl_sign_basic.phpt (renamed from ext/openssl/tests/018.phpt)2
-rw-r--r--ext/openssl/tests/openssl_spki_export.phpt62
-rw-r--r--ext/openssl/tests/openssl_spki_export_basic.phpt60
-rw-r--r--ext/openssl/tests/openssl_spki_export_challenge_basic.phpt (renamed from ext/openssl/tests/openssl_spki_export_challenge.phpt)56
-rw-r--r--ext/openssl/tests/openssl_spki_new.phpt77
-rw-r--r--ext/openssl/tests/openssl_spki_new_basic.phpt73
-rw-r--r--ext/openssl/tests/openssl_spki_verify.phpt91
-rw-r--r--ext/openssl/tests/openssl_spki_verify_basic.phpt88
-rw-r--r--ext/openssl/tests/openssl_verify_basic.phpt (renamed from ext/openssl/tests/019.phpt)2
-rw-r--r--ext/openssl/tests/openssl_x509_check_private_key_basic.phpt (renamed from ext/openssl/tests/009.phpt)8
-rw-r--r--ext/openssl/tests/openssl_x509_checkpurpose.phpt149
-rw-r--r--ext/openssl/tests/openssl_x509_export_basic.phpt45
-rw-r--r--ext/openssl/tests/openssl_x509_export_to_file_basic.phpt42
-rw-r--r--ext/openssl/tests/openssl_x509_fingerprint_basic.phpt (renamed from ext/openssl/tests/openssl_x509_fingerprint.phpt)2
-rw-r--r--ext/openssl/tests/openssl_x509_free_basic.phpt16
-rw-r--r--ext/openssl/tests/openssl_x509_parse_basic.phpt2
-rw-r--r--ext/openssl/tests/openssl_x509_parse_basic_v9.phpt276
-rw-r--r--ext/openssl/tests/openssl_x509_read_basic.phpt37
-rw-r--r--ext/openssl/tests/private_rsa_1024.key (renamed from ext/openssl/tests/private.key)0
-rw-r--r--ext/openssl/tests/private_rsa_2048.key27
-rw-r--r--ext/openssl/tests/private_rsa_2048_pass_php.key30
-rw-r--r--ext/openssl/tests/private_rsa_4096.key51
-rw-r--r--ext/openssl/tests/sni_001.phpt184
-rw-r--r--ext/openssl/xp_ssl.c59
-rw-r--r--ext/pcntl/pcntl.c41
-rw-r--r--ext/pcntl/php_pcntl.h6
-rw-r--r--ext/pcntl/php_signal.c2
-rw-r--r--ext/pcntl/php_signal.h2
-rw-r--r--ext/pcntl/tests/bug72154.phpt21
-rw-r--r--ext/pcre/pcrelib/ChangeLog176
-rw-r--r--ext/pcre/pcrelib/NEWS8
-rw-r--r--ext/pcre/pcrelib/config.h210
-rw-r--r--ext/pcre/pcrelib/doc/pcre.txt2130
-rw-r--r--ext/pcre/pcrelib/pcre.h4
-rw-r--r--ext/pcre/pcrelib/pcre_compile.c334
-rw-r--r--ext/pcre/pcrelib/pcre_exec.c5
-rw-r--r--ext/pcre/pcrelib/pcre_internal.h17
-rw-r--r--ext/pcre/pcrelib/pcre_jit_compile.c77
-rw-r--r--ext/pcre/pcrelib/pcre_study.c19
-rw-r--r--ext/pcre/pcrelib/pcre_xclass.c2
-rw-r--r--ext/pcre/pcrelib/sljit/sljitConfig.h9
-rw-r--r--ext/pcre/pcrelib/sljit/sljitConfigInternal.h13
-rw-r--r--ext/pcre/pcrelib/sljit/sljitLir.c10
-rw-r--r--ext/pcre/pcrelib/sljit/sljitLir.h128
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeARM_32.c27
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeARM_64.c48
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeARM_T2_32.c58
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c15
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativePPC_common.c23
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeSPARC_common.c19
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c311
-rw-r--r--ext/pcre/pcrelib/sljit/sljitNativeX86_common.c129
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutput12
-rw-r--r--ext/pcre/pcrelib/testdata/testinput113
-rw-r--r--ext/pcre/pcrelib/testdata/testinput114
-rw-r--r--ext/pcre/pcrelib/testdata/testinput1217
-rw-r--r--ext/pcre/pcrelib/testdata/testinput142
-rw-r--r--ext/pcre/pcrelib/testdata/testinput172
-rw-r--r--ext/pcre/pcrelib/testdata/testinput2139
-rw-r--r--ext/pcre/pcrelib/testdata/testinput45
-rw-r--r--ext/pcre/pcrelib/testdata/testinput58
-rw-r--r--ext/pcre/pcrelib/testdata/testinput657
-rw-r--r--ext/pcre/pcrelib/testdata/testinput715
-rw-r--r--ext/pcre/pcrelib/testdata/testinput84
-rw-r--r--ext/pcre/pcrelib/testdata/testinputEBC3
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput123
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput11-1650
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput11-3250
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput11-850
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput1225
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput142
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput172
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput2380
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput46
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput545
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput696
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput757
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput86
-rw-r--r--ext/pcre/pcrelib/testdata/testoutputEBC6
-rw-r--r--ext/pcre/php_pcre.c147
-rw-r--r--ext/pcre/php_pcre.h11
-rw-r--r--ext/pcre/tests/backtrack_limit.phpt1
-rw-r--r--ext/pcre/tests/bug69864.phpt6
-rw-r--r--ext/pcre/tests/bug70232.phpt68
-rw-r--r--ext/pcre/tests/bug70345.phpt24
-rw-r--r--ext/pcre/tests/bug71537.phpt9
-rw-r--r--ext/pcre/tests/cache_limit.phpt4
-rw-r--r--ext/pcre/tests/preg_match_error3.phpt10
-rw-r--r--ext/pcre/tests/preg_match_error4.phpt935
-rw-r--r--ext/pdo/Makefile.frag2
-rw-r--r--ext/pdo/pdo.c24
-rw-r--r--ext/pdo/pdo_dbh.c94
-rw-r--r--ext/pdo/pdo_sql_parser.c209
-rw-r--r--ext/pdo/pdo_sql_parser.re7
-rw-r--r--ext/pdo/pdo_sqlstate.c2
-rw-r--r--ext/pdo/pdo_stmt.c51
-rw-r--r--ext/pdo/php_pdo.h2
-rw-r--r--ext/pdo/php_pdo_driver.h12
-rw-r--r--ext/pdo/php_pdo_error.h2
-rw-r--r--ext/pdo/php_pdo_int.h2
-rw-r--r--ext/pdo/tests/bug_44159.phpt2
-rw-r--r--ext/pdo/tests/bug_47769.phpt (renamed from ext/pdo/tests/bug47769.phpt)2
-rw-r--r--ext/pdo/tests/bug_52098.phpt59
-rw-r--r--ext/pdo/tests/bug_61292.phpt (renamed from ext/pdo/tests/bug61292.phpt)2
-rw-r--r--ext/pdo/tests/bug_64172.phpt84
-rw-r--r--ext/pdo/tests/bug_65946.phpt (renamed from ext/pdo/tests/bug65946.phpt)5
-rw-r--r--ext/pdo/tests/bug_71447.phpt104
-rw-r--r--ext/pdo_dblib/dblib_driver.c28
-rw-r--r--ext/pdo_dblib/dblib_stmt.c267
-rw-r--r--ext/pdo_dblib/pdo_dblib.c11
-rw-r--r--ext/pdo_dblib/php_pdo_dblib.h2
-rw-r--r--ext/pdo_dblib/php_pdo_dblib_int.h10
-rw-r--r--ext/pdo_dblib/tests/bug_38955.phpt8
-rw-r--r--ext/pdo_dblib/tests/bug_45876.phpt12
-rw-r--r--ext/pdo_dblib/tests/bug_47588.phpt6
-rw-r--r--ext/pdo_dblib/tests/bug_54648.phpt26
-rw-r--r--ext/pdo_dblib/tests/bug_68957.phpt29
-rw-r--r--ext/pdo_dblib/tests/bug_69757.phpt32
-rw-r--r--ext/pdo_dblib/tests/bug_71667.phpt34
-rw-r--r--ext/pdo_dblib/tests/pdo_dblib_quote.phpt24
-rw-r--r--ext/pdo_dblib/tests/timeout.phpt51
-rw-r--r--ext/pdo_dblib/tests/types.phpt66
-rw-r--r--ext/pdo_firebird/firebird_driver.c77
-rw-r--r--ext/pdo_firebird/firebird_statement.c13
-rw-r--r--ext/pdo_firebird/pdo_firebird.c2
-rw-r--r--ext/pdo_firebird/php_pdo_firebird.h2
-rw-r--r--ext/pdo_firebird/php_pdo_firebird_int.h8
-rw-r--r--ext/pdo_mysql/mysql_driver.c85
-rw-r--r--ext/pdo_mysql/mysql_statement.c12
-rw-r--r--ext/pdo_mysql/pdo_mysql.c6
-rw-r--r--ext/pdo_mysql/php_pdo_mysql.h2
-rw-r--r--ext/pdo_mysql/php_pdo_mysql_int.h25
-rw-r--r--ext/pdo_mysql/tests/PDO_getAvaliableDrivers.phpt11
-rw-r--r--ext/pdo_mysql/tests/bug54929.phpt2
-rw-r--r--ext/pdo_mysql/tests/bug70272.phpt31
-rw-r--r--ext/pdo_mysql/tests/bug70389.phpt33
-rw-r--r--ext/pdo_mysql/tests/bug70862.phpt46
-rw-r--r--ext/pdo_mysql/tests/bug71569.phpt23
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt79
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt3
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt4
-rw-r--r--ext/pdo_oci/EXPERIMENTAL0
-rw-r--r--ext/pdo_oci/oci_driver.c29
-rw-r--r--ext/pdo_oci/oci_statement.c72
-rw-r--r--ext/pdo_oci/pdo_oci.c4
-rw-r--r--ext/pdo_oci/php_pdo_oci.h2
-rw-r--r--ext/pdo_oci/php_pdo_oci_int.h3
-rw-r--r--ext/pdo_oci/tests/bug44301.phpt2
-rw-r--r--ext/pdo_oci/tests/bug46274.phpt2
-rw-r--r--ext/pdo_oci/tests/bug46274_2.phpt2
-rw-r--r--ext/pdo_oci/tests/bug57702.phpt24
-rw-r--r--ext/pdo_oci/tests/checkliveness.phpt55
-rw-r--r--ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt49
-rw-r--r--ext/pdo_oci/tests/pdo_oci_stream_2a.phpt74
-rw-r--r--ext/pdo_oci/tests/pdo_oci_stream_2b.phpt70
-rw-r--r--ext/pdo_oci/tests/pdo_oci_templob_1.phpt85
-rw-r--r--ext/pdo_odbc/odbc_driver.c4
-rw-r--r--ext/pdo_odbc/odbc_stmt.c20
-rw-r--r--ext/pdo_odbc/pdo_odbc.c8
-rw-r--r--ext/pdo_odbc/php_pdo_odbc.h12
-rw-r--r--ext/pdo_odbc/php_pdo_odbc_int.h6
-rw-r--r--ext/pdo_odbc/tests/max_columns.phpt46
-rw-r--r--ext/pdo_pgsql/pdo_pgsql.c4
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c9
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c148
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql.h2
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h2
-rw-r--r--ext/pdo_pgsql/tests/bug62498-32bit.phpt221
-rw-r--r--ext/pdo_pgsql/tests/bug62498.phpt221
-rw-r--r--ext/pdo_pgsql/tests/bug70861.phpt46
-rw-r--r--ext/pdo_pgsql/tests/bug71573.phpt21
-rw-r--r--ext/pdo_pgsql/tests/bug72294.phpt149
-rw-r--r--ext/pdo_pgsql/tests/common.phpt2
-rw-r--r--ext/pdo_pgsql/tests/copy_from.phpt6
-rw-r--r--ext/pdo_pgsql/tests/copy_to.phpt6
-rw-r--r--ext/pdo_sqlite/pdo_sqlite.c4
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite.h12
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite_int.h2
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c9
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c9
-rw-r--r--ext/pdo_sqlite/tests/bug70221.phpt18
-rw-r--r--ext/pdo_sqlite/tests/bug70862.phpt36
-rw-r--r--ext/pdo_sqlite/tests/common.phpt2
-rw-r--r--ext/pgsql/config.w322
-rw-r--r--ext/pgsql/pgsql.c201
-rw-r--r--ext/pgsql/php_pgsql.h17
-rw-r--r--ext/pgsql/tests/09notice.phpt55
-rw-r--r--ext/pgsql/tests/14pg_update.phpt3
-rw-r--r--ext/pgsql/tests/bug46408.phpt2
-rw-r--r--ext/pgsql/tests/bug71062.phpt39
-rw-r--r--ext/pgsql/tests/bug71998.phpt196
-rw-r--r--ext/pgsql/tests/bug72028.phpt52
-rw-r--r--ext/pgsql/tests/bug72195.phpt17
-rw-r--r--ext/pgsql/tests/bug72197.phpt35
-rw-r--r--ext/phar/dirstream.c5
-rw-r--r--ext/phar/dirstream.h2
-rw-r--r--ext/phar/func_interceptors.c56
-rw-r--r--ext/phar/func_interceptors.h2
-rw-r--r--ext/phar/phar.1.in4
-rw-r--r--ext/phar/phar.c90
-rw-r--r--ext/phar/phar_internal.h73
-rw-r--r--ext/phar/phar_object.c235
-rw-r--r--ext/phar/phar_path_check.c2
-rw-r--r--ext/phar/phar_path_check.re2
-rw-r--r--ext/phar/pharzip.h2
-rw-r--r--ext/phar/php_phar.h2
-rw-r--r--ext/phar/stream.c2
-rw-r--r--ext/phar/stream.h2
-rw-r--r--ext/phar/stub.h2
-rw-r--r--ext/phar/tar.c61
-rw-r--r--ext/phar/tar.h2
-rw-r--r--ext/phar/tests/badparameters.phpt18
-rw-r--r--ext/phar/tests/bug64931/bug64931.phpt7
-rw-r--r--ext/phar/tests/bug69720.pharbin0 -> 8192 bytes
-rw-r--r--ext/phar/tests/bug69720.phpt40
-rw-r--r--ext/phar/tests/bug69958.phpt16
-rw-r--r--ext/phar/tests/bug69958.tarbin0 -> 513 bytes
-rw-r--r--ext/phar/tests/bug70019.phpt24
-rw-r--r--ext/phar/tests/bug70019.zipbin0 -> 184 bytes
-rw-r--r--ext/phar/tests/bug70433.phpt23
-rwxr-xr-xext/phar/tests/bug70433.zipbin0 -> 269 bytes
-rw-r--r--ext/phar/tests/bug71331.phpt15
-rw-r--r--ext/phar/tests/bug71331.tarbin0 -> 2560 bytes
-rw-r--r--ext/phar/tests/bug71354.phpt13
-rw-r--r--ext/phar/tests/bug71354.tarbin0 -> 1536 bytes
-rw-r--r--ext/phar/tests/bug71391.phpt18
-rw-r--r--ext/phar/tests/bug71391.tarbin0 -> 3584 bytes
-rw-r--r--ext/phar/tests/bug71488.phpt17
-rw-r--r--ext/phar/tests/bug71488.tarbin0 -> 10240 bytes
-rw-r--r--ext/phar/tests/bug71498.phpt17
-rw-r--r--ext/phar/tests/bug71498.zipbin0 -> 65677 bytes
-rw-r--r--ext/phar/tests/bug71625.phpt25
-rw-r--r--ext/phar/tests/create_path_error.phpt3
-rw-r--r--ext/phar/tests/phar_extract.phpt2
-rw-r--r--ext/phar/tests/phar_isvalidpharfilename.phpt2
-rw-r--r--ext/phar/tests/phar_unlinkarchive.phpt2
-rw-r--r--ext/phar/tests/pharfileinfo_construct.phpt2
-rw-r--r--ext/phar/tests/tar/bug71317-duplicate-filename.phpt50
-rw-r--r--ext/phar/tests/tar/bug71504.phpt18
-rw-r--r--ext/phar/tests/tar/files/HTML_CSS-1.5.4.tgzbin0 -> 45553 bytes
-rw-r--r--ext/phar/util.c22
-rw-r--r--ext/phar/zip.c44
-rw-r--r--ext/posix/config.m42
-rw-r--r--ext/posix/php_posix.h6
-rw-r--r--ext/posix/posix.c100
-rw-r--r--ext/posix/tests/posix_setrlimit.phpt18
-rw-r--r--ext/pspell/php_pspell.h2
-rw-r--r--ext/pspell/pspell.c2
-rw-r--r--ext/readline/config.w3216
-rw-r--r--ext/readline/php_readline.h4
-rw-r--r--ext/readline/readline.c28
-rw-r--r--ext/readline/readline_cli.c44
-rw-r--r--ext/readline/readline_cli.h2
-rw-r--r--ext/readline/tests/libedit_info_001-win32.phpt42
-rw-r--r--ext/readline/tests/libedit_info_001.phpt3
-rw-r--r--ext/readline/tests/libedit_write_history_001-win32.phpt29
-rw-r--r--ext/readline/tests/libedit_write_history_001.phpt3
-rw-r--r--ext/readline/tests/readline_read_history_error_001.phpt2
-rw-r--r--ext/recode/php_recode.h2
-rw-r--r--ext/recode/recode.c2
-rw-r--r--ext/recode/tests/001.phpt38
-rw-r--r--ext/recode/tests/002.phpt32
-rw-r--r--ext/recode/tests/html.raw1
-rw-r--r--ext/reflection/php_reflection.c750
-rw-r--r--ext/reflection/php_reflection.h2
-rw-r--r--ext/reflection/tests/017.phpt4
-rw-r--r--ext/reflection/tests/ReflectionClassConstant_basic1.phpt194
-rw-r--r--ext/reflection/tests/ReflectionClassConstant_getValue.phpt47
-rw-r--r--ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt2
-rw-r--r--ext/reflection/tests/ReflectionClass_isArray.phpt24
-rw-r--r--ext/reflection/tests/ReflectionClass_toString_001.phpt21
-rw-r--r--ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt11
-rw-r--r--ext/reflection/tests/ReflectionGenerator_basic.phpt6
-rw-r--r--ext/reflection/tests/ReflectionGenerator_getTrace.phpt53
-rw-r--r--ext/reflection/tests/ReflectionGenerator_in_Generator.phpt6
-rw-r--r--ext/reflection/tests/ReflectionMethod_defaultArg.phpt44
-rw-r--r--ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt41
-rw-r--r--ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt29
-rw-r--r--ext/reflection/tests/ReflectionProperty_getValue_error.phpt15
-rw-r--r--ext/reflection/tests/ReflectionProperty_setAccessible.phpt2
-rw-r--r--ext/reflection/tests/ReflectionType_possible_types.phpt31
-rw-r--r--ext/reflection/tests/bug29986.phpt10
-rw-r--r--ext/reflection/tests/bug45765.phpt2
-rw-r--r--ext/reflection/tests/bug70674.phpt8
-rw-r--r--ext/reflection/tests/bug70960.phpt10
-rw-r--r--ext/reflection/tests/bug70982.phpt22
-rw-r--r--ext/reflection/tests/bug71018.phpt43
-rw-r--r--ext/reflection/tests/bug71767.phpt44
-rw-r--r--ext/reflection/tests/bug72174.phpt36
-rw-r--r--ext/reflection/tests/reflectionclass_for_traits.phpt (renamed from ext/reflection/reflectionclass_for_traits.phpt)0
-rw-r--r--ext/session/mod_files.c5
-rw-r--r--ext/session/mod_files.h2
-rw-r--r--ext/session/mod_files.sh2
-rw-r--r--ext/session/mod_mm.c24
-rw-r--r--ext/session/mod_mm.h2
-rw-r--r--ext/session/mod_user.c13
-rw-r--r--ext/session/mod_user.h2
-rw-r--r--ext/session/mod_user_class.c32
-rw-r--r--ext/session/php_session.h4
-rw-r--r--ext/session/session.c280
-rw-r--r--ext/session/tests/016.phpt2
-rw-r--r--ext/session/tests/bug55688.phpt2
-rw-r--r--ext/session/tests/bug60634.phpt9
-rw-r--r--ext/session/tests/bug60634_error_1.phpt6
-rw-r--r--ext/session/tests/bug61728.phpt30
-rw-r--r--ext/session/tests/bug67694.phpt2
-rw-r--r--ext/session/tests/bug67972.phpt3
-rw-r--r--ext/session/tests/bug68063.phpt14
-rw-r--r--ext/session/tests/bug69111.phpt22
-rw-r--r--ext/session/tests/bug70013.phpt28
-rw-r--r--ext/session/tests/bug70133.phpt41
-rw-r--r--ext/session/tests/bug70876.phpt17
-rw-r--r--ext/session/tests/bug71162.phpt79
-rw-r--r--ext/session/tests/bug71186.phpt32
-rw-r--r--ext/session/tests/bug71603.phpt16
-rw-r--r--ext/session/tests/bug71972.phpt28
-rw-r--r--ext/session/tests/bug71974.phpt23
-rw-r--r--ext/session/tests/rfc1867_sid_invalid.phpt4
-rw-r--r--ext/session/tests/session_basic3.phpt104
-rw-r--r--ext/session/tests/session_decode_error2.phpt418
-rw-r--r--ext/session/tests/session_regenerate_id_cookie.phpt85
-rw-r--r--ext/session/tests/session_save_path_variation2.phpt8
-rw-r--r--ext/session/tests/session_save_path_variation3.phpt8
-rw-r--r--ext/session/tests/session_set_save_handler_class_002.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_class_005.phpt13
-rw-r--r--ext/session/tests/session_set_save_handler_class_012.phpt13
-rw-r--r--ext/session/tests/session_set_save_handler_class_016.phpt6
-rw-r--r--ext/session/tests/session_set_save_handler_class_017.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_error4.phpt5
-rw-r--r--ext/session/tests/session_set_save_handler_iface_001.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_iface_002.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_variation4.phpt2
-rw-r--r--ext/session/tests/session_set_save_handler_variation5.phpt2
-rw-r--r--ext/session/tests/sessionhandler_open_001.phpt7
-rw-r--r--ext/shmop/php_shmop.h4
-rw-r--r--ext/shmop/shmop.c3
-rw-r--r--ext/shmop/tests/002.phpt115
-rw-r--r--ext/simplexml/php_simplexml.h5
-rw-r--r--ext/simplexml/php_simplexml_exports.h2
-rw-r--r--ext/simplexml/simplexml.c49
-rw-r--r--ext/simplexml/sxe.c2
-rw-r--r--ext/simplexml/sxe.h2
-rw-r--r--ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt9
-rw-r--r--ext/simplexml/tests/bug66084_1.phpt2
-rwxr-xr-xext/skeleton/create_stubs2
-rw-r--r--ext/skeleton/php_skeleton.h10
-rw-r--r--ext/skeleton/skeleton.c2
-rw-r--r--ext/snmp/php_snmp.h2
-rw-r--r--ext/snmp/snmp.c35
-rw-r--r--ext/snmp/tests/reflection.phpt102
-rw-r--r--ext/snmp/tests/wrong_hostname.phpt2
-rw-r--r--ext/soap/php_encoding.c41
-rw-r--r--ext/soap/php_encoding.h2
-rw-r--r--ext/soap/php_http.c179
-rw-r--r--ext/soap/php_http.h15
-rw-r--r--ext/soap/php_packet_soap.c4
-rw-r--r--ext/soap/php_packet_soap.h2
-rw-r--r--ext/soap/php_schema.c45
-rw-r--r--ext/soap/php_schema.h2
-rw-r--r--ext/soap/php_sdl.c10
-rw-r--r--ext/soap/php_sdl.h2
-rw-r--r--ext/soap/php_soap.h12
-rw-r--r--ext/soap/php_xml.c2
-rw-r--r--ext/soap/php_xml.h2
-rw-r--r--ext/soap/soap.c58
-rw-r--r--ext/soap/tests/bug70211.phpt24
-rw-r--r--ext/soap/tests/bug70388.phpt17
-rw-r--r--ext/soap/tests/bug70875.phpt50
-rw-r--r--ext/soap/tests/bug70875.wsdl156
-rw-r--r--ext/soap/tests/bug71610.phpt15
-rw-r--r--ext/soap/tests/bugs/bug44811.phpt1
-rw-r--r--ext/sockets/conversions.c8
-rw-r--r--ext/sockets/multicast.c6
-rw-r--r--ext/sockets/multicast.h2
-rw-r--r--ext/sockets/php_sockets.h11
-rw-r--r--ext/sockets/sendrecvmsg.c2
-rw-r--r--ext/sockets/sockaddr_conv.c2
-rw-r--r--ext/sockets/sockets.c124
-rw-r--r--ext/sockets/tests/socket_clear_error-win32.phpt32
-rw-r--r--ext/sockets/tests/socket_clear_error.phpt31
-rw-r--r--ext/sockets/tests/socket_cmsg_rights.phpt4
-rw-r--r--ext/sockets/tests/socket_export_stream-1.phpt27
-rw-r--r--ext/sockets/tests/socket_export_stream-2.phpt48
-rw-r--r--ext/sockets/tests/socket_export_stream-3.phpt47
-rw-r--r--ext/sockets/tests/socket_export_stream-4-win.phpt108
-rw-r--r--ext/sockets/tests/socket_export_stream-4.phpt105
-rw-r--r--ext/sockets/tests/socket_export_stream-5.phpt25
-rw-r--r--ext/sockets/tests/socket_getopt.phpt73
-rw-r--r--ext/sockets/tests/socket_send.phpt53
-rw-r--r--ext/sockets/tests/socket_send_win32.phpt43
-rw-r--r--ext/sockets/tests/socket_shutdown-win32.phpt59
-rw-r--r--ext/sockets/tests/socket_shutdown.phpt57
-rw-r--r--ext/sockets/unix_socket_constants.h2
-rw-r--r--ext/sockets/win32_socket_constants.h2
-rw-r--r--ext/sockets/windows_common.h2
-rwxr-xr-xext/spl/config.m420
-rw-r--r--ext/spl/php_spl.c47
-rw-r--r--ext/spl/php_spl.h11
-rw-r--r--ext/spl/spl_array.c318
-rw-r--r--ext/spl/spl_array.h2
-rw-r--r--ext/spl/spl_directory.c19
-rw-r--r--ext/spl/spl_directory.h13
-rw-r--r--ext/spl/spl_dllist.c25
-rw-r--r--ext/spl/spl_dllist.h2
-rw-r--r--ext/spl/spl_engine.c8
-rw-r--r--ext/spl/spl_engine.h6
-rw-r--r--ext/spl/spl_exceptions.c2
-rw-r--r--ext/spl/spl_exceptions.h2
-rw-r--r--ext/spl/spl_fixedarray.c4
-rw-r--r--ext/spl/spl_fixedarray.h2
-rw-r--r--ext/spl/spl_functions.c2
-rw-r--r--ext/spl/spl_functions.h2
-rw-r--r--ext/spl/spl_heap.c8
-rw-r--r--ext/spl/spl_heap.h2
-rw-r--r--ext/spl/spl_iterators.c61
-rw-r--r--ext/spl/spl_iterators.h2
-rw-r--r--ext/spl/spl_observer.c174
-rw-r--r--ext/spl/spl_observer.h2
-rw-r--r--ext/spl/tests/ArrayObject_clone_other_std_props.phpt23
-rw-r--r--ext/spl/tests/ArrayObject_dump_during_sort.phpt27
-rw-r--r--ext/spl/tests/ArrayObject_exchange_array_during_sorting.phpt29
-rw-r--r--ext/spl/tests/ArrayObject_illegal_offset_leak.phpt11
-rw-r--r--ext/spl/tests/ArrayObject_modify_shared_object_properties.phpt19
-rw-r--r--ext/spl/tests/ArrayObject_overloaded_object_incompatible.phpt27
-rw-r--r--ext/spl/tests/ArrayObject_sort_different_backing_storage.phpt72
-rw-r--r--ext/spl/tests/ArrayObject_std_props_no_recursion.phpt28
-rw-r--r--ext/spl/tests/SplObjectStorage_unserialize_bad.phpt2
-rw-r--r--ext/spl/tests/arrayObject___construct_basic7.phpt34
-rw-r--r--ext/spl/tests/bug38325.phpt7
-rw-r--r--ext/spl/tests/bug52339.phpt11
-rw-r--r--ext/spl/tests/bug62059.phpt70
-rw-r--r--ext/spl/tests/bug67582.phpt24
-rw-r--r--ext/spl/tests/bug69970.phpt45
-rw-r--r--ext/spl/tests/bug70053.phpt21
-rw-r--r--ext/spl/tests/bug70068.phpt9
-rw-r--r--ext/spl/tests/bug70155.phpt50
-rw-r--r--ext/spl/tests/bug70166.phpt29
-rw-r--r--ext/spl/tests/bug70168.phpt36
-rw-r--r--ext/spl/tests/bug70169.phpt30
-rw-r--r--ext/spl/tests/bug70303.phpt12
-rw-r--r--ext/spl/tests/bug70365.phpt50
-rw-r--r--ext/spl/tests/bug70366.phpt54
-rw-r--r--ext/spl/tests/bug70561.phpt23
-rw-r--r--ext/spl/tests/bug70573.phpt15
-rw-r--r--ext/spl/tests/bug70730.phpt44
-rw-r--r--ext/spl/tests/bug70852.phpt17
-rw-r--r--ext/spl/tests/bug70853.phpt15
-rw-r--r--ext/spl/tests/bug70868.phpt32
-rw-r--r--ext/spl/tests/bug70959.phpt24
-rw-r--r--ext/spl/tests/bug71028.phpt24
-rw-r--r--ext/spl/tests/bug71153.phpt16
-rw-r--r--ext/spl/tests/bug71202.phpt38
-rw-r--r--ext/spl/tests/bug71204.phpt19
-rw-r--r--ext/spl/tests/bug71617.phpt50
-rw-r--r--ext/spl/tests/bug71735.phpt15
-rw-r--r--ext/spl/tests/bug71838.phpt24
-rw-r--r--ext/spl/tests/bug72051.phpt26
-rw-r--r--ext/spl/tests/dit_006.phpt12
-rw-r--r--ext/spl/tests/iterator_036.phpt2
-rw-r--r--ext/spl/tests/spl_autoload_001.phpt71
-rw-r--r--ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt13
-rw-r--r--ext/sqlite3/libsqlite/sqlite3.c41813
-rw-r--r--ext/sqlite3/libsqlite/sqlite3.h684
-rw-r--r--ext/sqlite3/libsqlite/sqlite3ext.h23
-rw-r--r--ext/sqlite3/php_sqlite3.h4
-rw-r--r--ext/sqlite3/php_sqlite3_structs.h2
-rw-r--r--ext/sqlite3/sqlite3.c97
-rw-r--r--ext/sqlite3/tests/bug69972.phpt28
-rw-r--r--ext/sqlite3/tests/bug71049.phpt21
-rw-r--r--ext/sqlite3/tests/sqlite3_bind_bug68849.phpt71
-rw-r--r--ext/sqlite3/tests/sqlite3_blob_bind_resource.phpt39
-rw-r--r--ext/standard/array.c1256
-rw-r--r--ext/standard/assert.c16
-rw-r--r--ext/standard/base64.c2
-rw-r--r--ext/standard/base64.h2
-rw-r--r--ext/standard/basic_functions.c109
-rw-r--r--ext/standard/basic_functions.h22
-rw-r--r--ext/standard/browscap.c9
-rw-r--r--ext/standard/config.m4197
-rw-r--r--ext/standard/crc32.c6
-rw-r--r--ext/standard/crc32.h2
-rw-r--r--ext/standard/credits.c2
-rw-r--r--ext/standard/credits.h2
-rw-r--r--ext/standard/credits_ext.h6
-rw-r--r--ext/standard/crypt.c97
-rw-r--r--ext/standard/crypt_freesec.c10
-rw-r--r--ext/standard/crypt_sha256.c4
-rw-r--r--ext/standard/crypt_sha512.c4
-rw-r--r--ext/standard/css.c4
-rw-r--r--ext/standard/css.h2
-rw-r--r--ext/standard/cyr_convert.c2
-rw-r--r--ext/standard/cyr_convert.h2
-rw-r--r--ext/standard/datetime.c2
-rw-r--r--ext/standard/datetime.h2
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/dl.c6
-rw-r--r--ext/standard/dl.h2
-rw-r--r--ext/standard/dns.c6
-rw-r--r--ext/standard/dns_win32.c4
-rw-r--r--ext/standard/exec.c85
-rw-r--r--ext/standard/exec.h3
-rw-r--r--ext/standard/file.c143
-rw-r--r--ext/standard/file.h7
-rw-r--r--ext/standard/filestat.c56
-rw-r--r--ext/standard/filters.c2
-rw-r--r--ext/standard/flock_compat.c4
-rw-r--r--ext/standard/flock_compat.h2
-rw-r--r--ext/standard/formatted_print.c9
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/fsock.h2
-rw-r--r--ext/standard/ftok.c6
-rw-r--r--ext/standard/ftp_fopen_wrapper.c2
-rw-r--r--ext/standard/head.c8
-rw-r--r--ext/standard/head.h2
-rw-r--r--ext/standard/html.c2
-rw-r--r--ext/standard/html.h2
-rw-r--r--ext/standard/html_tables.h2
-rw-r--r--ext/standard/http.c2
-rw-r--r--ext/standard/http_fopen_wrapper.c22
-rw-r--r--ext/standard/image.c42
-rw-r--r--ext/standard/incomplete_class.c5
-rw-r--r--ext/standard/info.c2
-rw-r--r--ext/standard/info.h4
-rw-r--r--ext/standard/iptc.c19
-rw-r--r--ext/standard/lcg.c6
-rw-r--r--ext/standard/levenshtein.c2
-rw-r--r--ext/standard/link.c2
-rw-r--r--ext/standard/link_win32.c2
-rw-r--r--ext/standard/mail.c4
-rw-r--r--ext/standard/math.c50
-rw-r--r--ext/standard/md5.c22
-rw-r--r--ext/standard/md5.h8
-rw-r--r--ext/standard/metaphone.c2
-rw-r--r--ext/standard/microtime.c2
-rw-r--r--ext/standard/microtime.h2
-rw-r--r--ext/standard/pack.c42
-rw-r--r--ext/standard/pack.h2
-rw-r--r--ext/standard/pageinfo.c2
-rw-r--r--ext/standard/pageinfo.h2
-rw-r--r--ext/standard/password.c86
-rw-r--r--ext/standard/php_array.h11
-rw-r--r--ext/standard/php_assert.h2
-rw-r--r--ext/standard/php_browscap.h2
-rw-r--r--ext/standard/php_crypt.h4
-rw-r--r--ext/standard/php_crypt_r.c14
-rw-r--r--ext/standard/php_crypt_r.h2
-rw-r--r--ext/standard/php_dir.h2
-rw-r--r--ext/standard/php_dns.h2
-rw-r--r--ext/standard/php_ext_syslog.h2
-rw-r--r--ext/standard/php_filestat.h2
-rw-r--r--ext/standard/php_fopen_wrapper.c2
-rw-r--r--ext/standard/php_fopen_wrappers.h2
-rw-r--r--ext/standard/php_ftok.h2
-rw-r--r--ext/standard/php_http.h2
-rw-r--r--ext/standard/php_image.h2
-rw-r--r--ext/standard/php_incomplete_class.h2
-rw-r--r--ext/standard/php_iptc.h2
-rw-r--r--ext/standard/php_lcg.h6
-rw-r--r--ext/standard/php_link.h2
-rw-r--r--ext/standard/php_mail.h2
-rw-r--r--ext/standard/php_math.h2
-rw-r--r--ext/standard/php_metaphone.h2
-rw-r--r--ext/standard/php_password.h2
-rw-r--r--ext/standard/php_rand.h6
-rw-r--r--ext/standard/php_random.h7
-rw-r--r--ext/standard/php_smart_string.h6
-rw-r--r--ext/standard/php_smart_string_public.h2
-rw-r--r--ext/standard/php_standard.h2
-rw-r--r--ext/standard/php_string.h4
-rw-r--r--ext/standard/php_type.h2
-rw-r--r--ext/standard/php_uuencode.h2
-rw-r--r--ext/standard/php_var.h4
-rw-r--r--ext/standard/php_versioning.h2
-rw-r--r--ext/standard/proc_open.c4
-rw-r--r--ext/standard/proc_open.h2
-rw-r--r--ext/standard/quot_print.c2
-rw-r--r--ext/standard/quot_print.h2
-rw-r--r--ext/standard/rand.c20
-rw-r--r--ext/standard/random.c121
-rw-r--r--ext/standard/scanf.c2
-rw-r--r--ext/standard/scanf.h2
-rw-r--r--ext/standard/sha1.c40
-rw-r--r--ext/standard/sha1.h6
-rw-r--r--ext/standard/soundex.c2
-rw-r--r--ext/standard/streamsfuncs.c226
-rw-r--r--ext/standard/streamsfuncs.h2
-rw-r--r--ext/standard/string.c229
-rw-r--r--ext/standard/syslog.c2
-rw-r--r--ext/standard/tests/array/array_column_numeric_string_key.phpt23
-rw-r--r--ext/standard/tests/array/array_column_property_visibility.phpt27
-rw-r--r--ext/standard/tests/array/bug24766.phpt16
-rw-r--r--ext/standard/tests/array/bug25708.phpt264
-rw-r--r--ext/standard/tests/array/bug69674.phpt8
-rw-r--r--ext/standard/tests/array/bug70250.phpt21
-rw-r--r--ext/standard/tests/array/bug70668.phpt63
-rw-r--r--ext/standard/tests/array/bug70808.phpt23
-rw-r--r--ext/standard/tests/array/bug70910.phpt13
-rw-r--r--ext/standard/tests/array/bug71220.phpt10
-rw-r--r--ext/standard/tests/array/bug71334.phpt38
-rw-r--r--ext/standard/tests/array/bug71603.phpt15
-rw-r--r--ext/standard/tests/array/bug71660.phpt18
-rw-r--r--ext/standard/tests/array/bug71837.phpt27
-rw-r--r--ext/standard/tests/array/bug72031.phpt48
-rw-r--r--ext/standard/tests/array/bug72116.phpt18
-rw-r--r--ext/standard/tests/array/bug72369.phpt16
-rw-r--r--ext/standard/tests/array/count_symbol_table.phpt22
-rw-r--r--ext/standard/tests/array/extract_variation1.phpt4
-rw-r--r--ext/standard/tests/array/range_bug70239_0.phpt10
-rw-r--r--ext/standard/tests/array/range_bug70239_1.phpt10
-rw-r--r--ext/standard/tests/array/range_bug70239_2.phpt11
-rw-r--r--ext/standard/tests/array/range_bug70239_3.phpt11
-rw-r--r--ext/standard/tests/array/range_bug71132.phpt10
-rw-r--r--ext/standard/tests/array/range_bug71197.phpt8
-rw-r--r--ext/standard/tests/array/range_bug72017.phpt17
-rw-r--r--ext/standard/tests/array/unexpected_array_mod_bug.phpt21
-rw-r--r--ext/standard/tests/array/unexpected_array_mod_bug_variation1.phpt33
-rw-r--r--ext/standard/tests/assert/assert_basic.phpt4
-rw-r--r--ext/standard/tests/assert/assert_basic5.phpt2
-rw-r--r--ext/standard/tests/assert/assert_custom_exception.phpt15
-rw-r--r--ext/standard/tests/assert/assert_return_value.phpt15
-rw-r--r--ext/standard/tests/assert/assert_variation.phpt12
-rw-r--r--ext/standard/tests/bug71827.phpt10
-rw-r--r--ext/standard/tests/class_object/bug71442.phpt37
-rw-r--r--ext/standard/tests/file/bug39673.phpt6
-rw-r--r--ext/standard/tests/file/bug47517.phpt17
-rw-r--r--ext/standard/tests/file/bug52624.phpt2
-rw-r--r--ext/standard/tests/file/bug71287.phpt19
-rw-r--r--ext/standard/tests/file/bug72035.phpt40
-rw-r--r--ext/standard/tests/file/dirname_error.phpt6
-rw-r--r--ext/standard/tests/file/file_get_contents_variation5_32bit.phpt236
-rw-r--r--ext/standard/tests/file/file_get_contents_variation5_64bit.phpt (renamed from ext/standard/tests/file/file_get_contents_variation5.phpt)19
-rw-r--r--ext/standard/tests/file/file_put_contents_variation7-win32.phpt6
-rw-r--r--ext/standard/tests/file/file_put_contents_variation7.phpt6
-rw-r--r--ext/standard/tests/file/filetype_variation2.phpt6
-rw-r--r--ext/standard/tests/file/fscanf.phpt2
-rw-r--r--ext/standard/tests/file/stream_rfc2397_002.phpt56
-rw-r--r--ext/standard/tests/file/tempnam_variation2-win32.phpt10
-rw-r--r--ext/standard/tests/file/tempnam_variation2.phpt10
-rw-r--r--ext/standard/tests/file/tempnam_variation3-win32.phpt2
-rw-r--r--ext/standard/tests/file/tempnam_variation4-0.phpt638
-rw-r--r--ext/standard/tests/file/tempnam_variation4-1.phpt638
-rw-r--r--ext/standard/tests/file/tempnam_variation4.phpt1092
-rw-r--r--ext/standard/tests/file/tempnam_variation7-win32.phpt10
-rw-r--r--ext/standard/tests/file/tempnam_variation7.phpt10
-rw-r--r--ext/standard/tests/file/tempnam_variation8-win32.phpt6
-rw-r--r--ext/standard/tests/general_functions/bug70018.phpt28
-rw-r--r--ext/standard/tests/general_functions/bug70157.phpt29
-rw-r--r--ext/standard/tests/general_functions/bug70249.phpt28
-rw-r--r--ext/standard/tests/general_functions/bug70947.phpt12
-rw-r--r--ext/standard/tests/general_functions/bug71891.phpt14
-rw-r--r--ext/standard/tests/general_functions/bug72300.phpt22
-rw-r--r--ext/standard/tests/general_functions/connection_aborted.phpt10
-rw-r--r--ext/standard/tests/general_functions/connection_status.phpt10
-rw-r--r--ext/standard/tests/general_functions/debug_zval_dump_b.phptbin4585 -> 4554 bytes
-rw-r--r--ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phptbin4585 -> 4554 bytes
-rw-r--r--ext/standard/tests/general_functions/debug_zval_dump_o.phpt442
-rw-r--r--ext/standard/tests/general_functions/debug_zval_dump_v.phpt26
-rw-r--r--ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt10
-rw-r--r--ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt12
-rw-r--r--ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt10
-rw-r--r--ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt12
-rw-r--r--ext/standard/tests/general_functions/floatval.phpt4
-rw-r--r--ext/standard/tests/general_functions/floatval_variation1.phpt7
-rw-r--r--ext/standard/tests/general_functions/getenv.phpt16
-rw-r--r--ext/standard/tests/general_functions/gettype_settype_variation2.phpt16
-rw-r--r--ext/standard/tests/general_functions/print_r.phpt12
-rw-r--r--ext/standard/tests/general_functions/print_r_64bit.phpt12
-rw-r--r--ext/standard/tests/general_functions/var_dump.phpt8
-rw-r--r--ext/standard/tests/general_functions/var_dump_64bit.phpt8
-rw-r--r--ext/standard/tests/general_functions/var_export-locale.phpt138
-rw-r--r--ext/standard/tests/general_functions/var_export_basic1.phpt4
-rw-r--r--ext/standard/tests/general_functions/var_export_basic3.phpt96
-rw-r--r--ext/standard/tests/general_functions/var_export_bug66179.phpt29
-rw-r--r--ext/standard/tests/general_functions/var_export_bug71314.phpt15
-rw-r--r--ext/standard/tests/http/bug38802.phpt26
-rw-r--r--ext/standard/tests/http/bug48929.phpt8
-rw-r--r--ext/standard/tests/http/bug53198.phpt9
-rw-r--r--ext/standard/tests/http/bug61548.phpt13
-rw-r--r--ext/standard/tests/http/bug65634.phpt2
-rw-r--r--ext/standard/tests/http/bug67430.phpt3
-rw-r--r--ext/standard/tests/http/http_response_header_01.phpt38
-rw-r--r--ext/standard/tests/http/http_response_header_02.phpt44
-rw-r--r--ext/standard/tests/http/http_response_header_03.phpt45
-rw-r--r--ext/standard/tests/http/ignore_errors.phpt20
-rw-r--r--ext/standard/tests/image/bug70052.phpt21
-rw-r--r--ext/standard/tests/image/bug70052_1.wbmpbin0 -> 12 bytes
-rw-r--r--ext/standard/tests/image/bug70052_2.wbmpbin0 -> 7 bytes
-rw-r--r--ext/standard/tests/image/bug70096.phpt32
-rw-r--r--ext/standard/tests/math/decbin_basic.phpt2
-rw-r--r--ext/standard/tests/math/dechex_basic.phpt2
-rw-r--r--ext/standard/tests/math/decoct_basic.phpt2
-rw-r--r--ext/standard/tests/math/mt_rand_value.phpt44
-rw-r--r--ext/standard/tests/math/pow_variation1.phpt10
-rw-r--r--ext/standard/tests/math/pow_variation1_64bit.phpt10
-rw-r--r--ext/standard/tests/math/pow_variation2.phpt10
-rw-r--r--ext/standard/tests/math/round_bug71201.phpt10
-rw-r--r--ext/standard/tests/network/bug55472.phpt8
-rw-r--r--ext/standard/tests/network/gethostname.phpt20
-rw-r--r--ext/standard/tests/network/getprotobyname_basic.phpt10
-rw-r--r--ext/standard/tests/network/getprotobyname_error.phpt16
-rw-r--r--ext/standard/tests/network/getprotobynumber_basic.phpt10
-rw-r--r--ext/standard/tests/network/getprotobynumber_error.phpt16
-rw-r--r--ext/standard/tests/network/ip.phpt12
-rw-r--r--ext/standard/tests/network/ip_x86_64.phpt12
-rw-r--r--ext/standard/tests/network/long2ip_variation1.phpt33
-rw-r--r--ext/standard/tests/network/setcookie.phpt5
-rw-r--r--ext/standard/tests/network/socket_get_status_basic.phpt12
-rw-r--r--ext/standard/tests/network/udp4loop.phpt10
-rw-r--r--ext/standard/tests/random/random_bytes.phpt3
-rw-r--r--ext/standard/tests/random/random_bytes_error.phpt21
-rw-r--r--ext/standard/tests/random/random_int.phpt3
-rw-r--r--ext/standard/tests/random/random_int_error.phpt31
-rw-r--r--ext/standard/tests/serialize/bug69152.phpt1
-rw-r--r--ext/standard/tests/serialize/bug69793.phpt17
-rw-r--r--ext/standard/tests/serialize/bug70172.phpt52
-rw-r--r--ext/standard/tests/serialize/bug70172_2.phpt70
-rw-r--r--ext/standard/tests/serialize/bug70219.phpt42
-rw-r--r--ext/standard/tests/serialize/bug70219_1.phpt52
-rw-r--r--ext/standard/tests/serialize/bug70963.phpt38
-rw-r--r--ext/standard/tests/serialize/bug71311.phpt16
-rw-r--r--ext/standard/tests/serialize/bug71313.phpt14
-rw-r--r--ext/standard/tests/serialize/bug71840.phpt9
-rw-r--r--ext/standard/tests/serialize/bug71940.phpt67
-rw-r--r--ext/standard/tests/serialize/bug71995.phpt27
-rw-r--r--ext/standard/tests/serialize/bug72229.phpt53
-rw-r--r--ext/standard/tests/serialize/unserialize_error_001.phpt52
-rw-r--r--ext/standard/tests/serialize/unserialize_subclasses.phpt29
-rw-r--r--ext/standard/tests/streams/bug70198.phpt61
-rw-r--r--ext/standard/tests/streams/bug71245.phpt39
-rw-r--r--ext/standard/tests/streams/bug71323.phpt31
-rw-r--r--ext/standard/tests/streams/bug71884.phpt10
-rw-r--r--ext/standard/tests/streams/bug72075.phpt15
-rw-r--r--ext/standard/tests/streams/bug72221.phpt11
-rw-r--r--ext/standard/tests/streams/set_file_buffer.phpt47
-rw-r--r--ext/standard/tests/streams/stream_context_set_option_error_001.phpt4
-rw-r--r--ext/standard/tests/streams/stream_context_set_option_error_002.phpt4
-rw-r--r--ext/standard/tests/streams/stream_context_tcp_nodelay.phpt22
-rw-r--r--ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt21
-rw-r--r--ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt47
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt16
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt12
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt104
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt46
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt20
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt24
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt12
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt12
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt44
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt46
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt36
-rw-r--r--ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt34
-rw-r--r--ext/standard/tests/streams/stream_get_transports.phpt16
-rw-r--r--ext/standard/tests/streams/stream_get_wrappers.phpt21
-rw-r--r--ext/standard/tests/streams/stream_socket_enable_crypto-win32.phpt70
-rw-r--r--ext/standard/tests/streams/stream_socket_enable_crypto.phpt69
-rw-r--r--ext/standard/tests/streams/stream_socket_get_name.phpt26
-rw-r--r--ext/standard/tests/streams/stream_socket_recvfrom.phpt34
-rw-r--r--ext/standard/tests/strings/basename_invalid_path.phpt22
-rw-r--r--ext/standard/tests/strings/basename_invalid_path_win.phpt22
-rw-r--r--ext/standard/tests/strings/basename_variation.phpt2
-rw-r--r--ext/standard/tests/strings/bug40754.phpt6
-rw-r--r--ext/standard/tests/strings/bug53021.phpt6
-rw-r--r--ext/standard/tests/strings/bug55871.phpt2
-rw-r--r--ext/standard/tests/strings/bug65769.phpt2
-rw-r--r--ext/standard/tests/strings/bug70487.phpt10
-rw-r--r--ext/standard/tests/strings/bug70667.phpt9
-rw-r--r--ext/standard/tests/strings/bug70720.phpt16
-rw-r--r--ext/standard/tests/strings/bug71188.phpt28
-rw-r--r--ext/standard/tests/strings/bug71190.phpt27
-rw-r--r--ext/standard/tests/strings/bug71806.dat3
-rw-r--r--ext/standard/tests/strings/bug71806.phpt11
-rw-r--r--ext/standard/tests/strings/bug71969.phpt28
-rw-r--r--ext/standard/tests/strings/bug72100.phpt18
-rw-r--r--ext/standard/tests/strings/dirname_error.phpt12
-rw-r--r--ext/standard/tests/strings/dirname_multi.phpt27
-rw-r--r--ext/standard/tests/strings/dirname_multi_win.phpt31
-rw-r--r--ext/standard/tests/strings/html_entity_decode3.phpt45
-rw-r--r--ext/standard/tests/strings/money_format_error.phpt12
-rw-r--r--ext/standard/tests/strings/moneyformat.phpt4
-rw-r--r--ext/standard/tests/strings/str_pad_variation5.phpt2
-rw-r--r--ext/standard/tests/strings/stripos_basic2.phpt20
-rw-r--r--ext/standard/tests/strings/stripos_error.phpt15
-rw-r--r--ext/standard/tests/strings/stripos_variation14.phpt6
-rw-r--r--ext/standard/tests/strings/strpos.phptbin9999 -> 10239 bytes
-rw-r--r--ext/standard/tests/strings/substr_count_basic.phpt8
-rw-r--r--ext/standard/tests/strings/substr_count_error.phpt40
-rw-r--r--ext/standard/tests/strings/substr_replace_error.phpt10
-rw-r--r--ext/standard/tests/strings/unpack_error.phpt6
-rw-r--r--ext/standard/tests/strings/unpack_offset.phpt17
-rw-r--r--ext/standard/tests/strings/url_t.phpt34
-rw-r--r--ext/standard/tests/url/get_headers_error_001.phpt7
-rw-r--r--ext/standard/tests/url/get_headers_error_003.phpt31
-rw-r--r--ext/standard/tests/url/parse_url_basic_001.phpt40
-rw-r--r--ext/standard/tests/url/parse_url_basic_002.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_003.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_004.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_005.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_006.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_007.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_008.phpt5
-rw-r--r--ext/standard/tests/url/parse_url_basic_009.phpt5
-rw-r--r--ext/standard/tests/url/urls.inc5
-rw-r--r--ext/standard/type.c9
-rw-r--r--ext/standard/uniqid.c2
-rw-r--r--ext/standard/uniqid.h2
-rw-r--r--ext/standard/url.c35
-rw-r--r--ext/standard/url.h2
-rw-r--r--ext/standard/url_scanner_ex.c2
-rw-r--r--ext/standard/url_scanner_ex.h2
-rw-r--r--ext/standard/url_scanner_ex.re2
-rw-r--r--ext/standard/user_filters.c6
-rw-r--r--ext/standard/uuencode.c4
-rw-r--r--ext/standard/var.c173
-rw-r--r--ext/standard/var_unserializer.c221
-rw-r--r--ext/standard/var_unserializer.re159
-rw-r--r--ext/standard/versioning.c2
-rw-r--r--ext/sysvmsg/php_sysvmsg.h2
-rw-r--r--ext/sysvmsg/sysvmsg.c2
-rw-r--r--ext/sysvsem/php_sysvsem.h2
-rw-r--r--ext/sysvsem/sysvsem.c2
-rw-r--r--ext/sysvshm/php_sysvshm.h4
-rw-r--r--ext/sysvshm/sysvshm.c2
-rw-r--r--ext/sysvshm/tests/002.phpt2
-rw-r--r--ext/sysvshm/tests/007.phpt2
-rw-r--r--ext/sysvshm/tests/shutdown_crash_0.phpt22
-rw-r--r--ext/tidy/php_tidy.h13
-rw-r--r--ext/tidy/tidy.c63
-rw-r--r--ext/tokenizer/Makefile.frag1
-rw-r--r--ext/tokenizer/php_tokenizer.h2
-rw-r--r--ext/tokenizer/tests/parse_errors.phpt42
-rw-r--r--ext/tokenizer/tests/token_get_all_TOKEN_PARSE_001.phpt31
-rw-r--r--ext/tokenizer/tokenizer.c38
-rw-r--r--ext/tokenizer/tokenizer_data.c2
-rwxr-xr-xext/tokenizer/tokenizer_data_gen.sh6
-rw-r--r--ext/wddx/php_wddx.h2
-rw-r--r--ext/wddx/php_wddx_api.h2
-rw-r--r--ext/wddx/tests/bug70661.phpt69
-rw-r--r--ext/wddx/tests/bug70741.phpt26
-rw-r--r--ext/wddx/tests/bug71335.phpt33
-rw-r--r--ext/wddx/tests/bug71587.phpt43
-rw-r--r--ext/wddx/wddx.c68
-rw-r--r--ext/xml/compat.c2
-rw-r--r--ext/xml/expat_compat.h2
-rw-r--r--ext/xml/php_xml.h13
-rw-r--r--ext/xml/tests/bug32001.phpt2
-rw-r--r--ext/xml/tests/bug72099.phpt17
-rw-r--r--ext/xml/xml.c29
-rw-r--r--ext/xmlreader/php_xmlreader.c2
-rw-r--r--ext/xmlreader/php_xmlreader.h2
-rw-r--r--ext/xmlreader/tests/XMLReaderBad_bug71805.xml7
-rw-r--r--ext/xmlreader/tests/XMLReaderGood_bug71805.xml7
-rw-r--r--ext/xmlreader/tests/bug70309.phpt43
-rw-r--r--ext/xmlreader/tests/bug71805.phpt39
-rw-r--r--ext/xmlrpc/php_xmlrpc.h2
-rw-r--r--ext/xmlrpc/tests/bug70526.phpt14
-rw-r--r--ext/xmlrpc/tests/bug70728.phpt31
-rw-r--r--ext/xmlrpc/tests/bug70728_64bit.phpt31
-rw-r--r--ext/xmlrpc/tests/bug71501.phpt23
-rw-r--r--ext/xmlrpc/tests/bug72155.phpt27
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c91
-rw-r--r--ext/xmlwriter/php_xmlwriter.c4
-rw-r--r--ext/xmlwriter/php_xmlwriter.h2
-rw-r--r--ext/xsl/php_xsl.c2
-rw-r--r--ext/xsl/php_xsl.h12
-rw-r--r--ext/xsl/tests/bug70535.phpt22
-rw-r--r--ext/xsl/tests/bug71540.phpt70
-rw-r--r--ext/xsl/xsl_fe.h2
-rw-r--r--ext/xsl/xsltprocessor.c44
-rw-r--r--ext/zip/config.m41
-rw-r--r--ext/zip/config.w326
-rw-r--r--ext/zip/lib/config.h4
-rw-r--r--ext/zip/lib/zip_add_entry.c17
-rw-r--r--ext/zip/lib/zip_buffer.c11
-rw-r--r--ext/zip/lib/zip_close.c1
-rw-r--r--ext/zip/lib/zip_delete.c12
-rw-r--r--ext/zip/lib/zip_dirent.c109
-rw-r--r--ext/zip/lib/zip_discard.c4
-rw-r--r--ext/zip/lib/zip_error.c3
-rw-r--r--ext/zip/lib/zip_error_strerror.c3
-rw-r--r--ext/zip/lib/zip_error_to_str.c3
-rw-r--r--ext/zip/lib/zip_extra_field.c55
-rw-r--r--ext/zip/lib/zip_fdopen.c3
-rw-r--r--ext/zip/lib/zip_file_get_offset.c3
-rw-r--r--ext/zip/lib/zip_filerange_crc.c3
-rw-r--r--ext/zip/lib/zip_fopen_index.c3
-rw-r--r--ext/zip/lib/zip_fopen_index_encrypted.c3
-rw-r--r--ext/zip/lib/zip_hash.c267
-rw-r--r--ext/zip/lib/zip_io_util.c3
-rw-r--r--ext/zip/lib/zip_name_locate.c48
-rw-r--r--ext/zip/lib/zip_new.c7
-rw-r--r--ext/zip/lib/zip_open.c73
-rw-r--r--ext/zip/lib/zip_set_default_password.c3
-rw-r--r--ext/zip/lib/zip_set_name.c93
-rw-r--r--ext/zip/lib/zip_source_buffer.c5
-rw-r--r--ext/zip/lib/zip_source_crc.c100
-rw-r--r--ext/zip/lib/zip_source_file.c1
-rw-r--r--ext/zip/lib/zip_source_filep.c29
-rw-r--r--ext/zip/lib/zip_source_pkware.c4
-rw-r--r--ext/zip/lib/zip_source_stat.c4
-rw-r--r--ext/zip/lib/zip_source_supports.c4
-rw-r--r--ext/zip/lib/zip_source_win32a.c13
-rw-r--r--ext/zip/lib/zip_source_win32handle.c6
-rw-r--r--ext/zip/lib/zip_source_win32utf8.c1
-rw-r--r--ext/zip/lib/zip_source_win32w.c15
-rw-r--r--ext/zip/lib/zip_unchange.c32
-rw-r--r--ext/zip/lib/zip_unchange_all.c4
-rw-r--r--ext/zip/lib/zipconf.h6
-rw-r--r--ext/zip/lib/zipint.h59
-rw-r--r--ext/zip/php_zip.c71
-rw-r--r--ext/zip/php_zip.h22
-rw-r--r--ext/zip/tests/bug70322.phpt29
-rw-r--r--ext/zip/tests/bug70350.phpt33
-rw-r--r--ext/zip/tests/bug72258.phpt26
-rw-r--r--ext/zip/tests/bug72258.zipbin0 -> 110 bytes
-rw-r--r--ext/zip/tests/compression_methods.phpt35
-rw-r--r--ext/zip/tests/compression_methods.zipbin0 -> 2402 bytes
-rw-r--r--ext/zip/tests/oo_addglob.phpt1
-rw-r--r--ext/zip/tests/oo_delete.phpt3
-rw-r--r--ext/zip/tests/stream_meta_data.phpt16
-rw-r--r--ext/zip/zip_stream.c7
-rw-r--r--ext/zlib/php_zlib.h11
-rw-r--r--ext/zlib/tests/gzgetss.gzbin0 -> 183 bytes
-rw-r--r--ext/zlib/tests/gzgetss.phpt22
-rw-r--r--ext/zlib/tests/gzgetss.test5
-rw-r--r--ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt20
-rw-r--r--ext/zlib/zlib.c8
-rw-r--r--ext/zlib/zlib_filter.c18
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c2
-rw-r--r--header2
-rw-r--r--main/SAPI.c68
-rw-r--r--main/SAPI.h3
-rw-r--r--main/build-defs.h.in2
-rw-r--r--main/fastcgi.c23
-rw-r--r--main/fastcgi.h2
-rw-r--r--main/fopen_wrappers.c11
-rw-r--r--main/fopen_wrappers.h13
-rw-r--r--main/getopt.c2
-rw-r--r--main/http_status_codes.h3
-rw-r--r--main/internal_functions.c.in2
-rw-r--r--main/internal_functions_nw.c2
-rw-r--r--main/internal_functions_win32.c8
-rw-r--r--main/main.c97
-rw-r--r--main/network.c122
-rw-r--r--main/output.c10
-rw-r--r--main/php.h42
-rw-r--r--main/php_compat.h2
-rw-r--r--main/php_content_types.c2
-rw-r--r--main/php_content_types.h2
-rw-r--r--main/php_getopt.h2
-rw-r--r--main/php_globals.h3
-rw-r--r--main/php_ini.c9
-rw-r--r--main/php_ini.h2
-rw-r--r--main/php_main.h2
-rw-r--r--main/php_memory_streams.h2
-rw-r--r--main/php_network.h23
-rw-r--r--main/php_open_temporary_file.c10
-rw-r--r--main/php_open_temporary_file.h7
-rw-r--r--main/php_output.h9
-rw-r--r--main/php_reentrancy.h2
-rw-r--r--main/php_scandir.c2
-rw-r--r--main/php_scandir.h2
-rw-r--r--main/php_sprintf.c2
-rw-r--r--main/php_stdint.h21
-rw-r--r--main/php_streams.h18
-rw-r--r--main/php_syslog.h2
-rw-r--r--main/php_ticks.c37
-rw-r--r--main/php_ticks.h6
-rw-r--r--main/php_variables.c25
-rw-r--r--main/php_variables.h3
-rw-r--r--main/php_version.h6
-rw-r--r--main/reentrancy.c2
-rw-r--r--main/rfc1867.c2
-rw-r--r--main/rfc1867.h2
-rw-r--r--main/snprintf.c2
-rw-r--r--main/snprintf.h12
-rw-r--r--main/spprintf.c19
-rw-r--r--main/spprintf.h6
-rw-r--r--main/streams/cast.c2
-rw-r--r--main/streams/filter.c2
-rw-r--r--main/streams/glob_wrapper.c2
-rw-r--r--main/streams/memory.c10
-rw-r--r--main/streams/mmap.c2
-rw-r--r--main/streams/php_stream_context.h2
-rw-r--r--main/streams/php_stream_filter_api.h2
-rw-r--r--main/streams/php_stream_glob_wrapper.h2
-rw-r--r--main/streams/php_stream_mmap.h2
-rw-r--r--main/streams/php_stream_plain_wrapper.h2
-rw-r--r--main/streams/php_stream_transport.h2
-rw-r--r--main/streams/php_stream_userspace.h2
-rw-r--r--main/streams/php_streams_int.h2
-rw-r--r--main/streams/plain_wrapper.c10
-rw-r--r--main/streams/streams.c19
-rw-r--r--main/streams/transports.c2
-rw-r--r--main/streams/userspace.c10
-rw-r--r--main/streams/xp_socket.c93
-rw-r--r--main/strlcat.c2
-rw-r--r--main/strlcpy.c2
-rw-r--r--main/win95nt.h2
-rwxr-xr-xmakedist18
-rw-r--r--netware/start.c2
-rw-r--r--pear/Makefile.frag7
-rw-r--r--pear/install-pear-nozlib.phar97196
-rw-r--r--php.ini-development40
-rw-r--r--php.ini-production46
-rwxr-xr-xrun-tests.php207
-rw-r--r--sapi/apache2handler/apache_config.c23
-rw-r--r--sapi/apache2handler/mod_php7.c2
-rw-r--r--sapi/apache2handler/php_apache.h10
-rw-r--r--sapi/apache2handler/php_functions.c2
-rw-r--r--sapi/apache2handler/sapi_apache2.c27
-rw-r--r--sapi/cgi/cgi_main.c164
-rw-r--r--sapi/cgi/config9.m44
-rw-r--r--sapi/cgi/tests/003.phpt5
-rw-r--r--sapi/cgi/tests/004.phpt6
-rw-r--r--sapi/cgi/tests/005-win32.phpt34
-rw-r--r--sapi/cgi/tests/005.phpt9
-rw-r--r--sapi/cgi/tests/006.phpt6
-rw-r--r--sapi/cgi/tests/include.inc29
-rw-r--r--sapi/cgi/tests/skipif.inc4
-rw-r--r--sapi/cli/cli.h2
-rw-r--r--sapi/cli/config.m44
-rw-r--r--sapi/cli/config.w325
-rw-r--r--sapi/cli/generate_mime_type_map.php14
-rw-r--r--sapi/cli/mime_type_map.h3
-rw-r--r--sapi/cli/php.1.in4
-rw-r--r--sapi/cli/php_cli.c46
-rw-r--r--sapi/cli/php_cli_process_title.c2
-rw-r--r--sapi/cli/php_cli_process_title.h2
-rw-r--r--sapi/cli/php_cli_server.c62
-rw-r--r--sapi/cli/php_cli_server.h4
-rw-r--r--sapi/cli/php_http_parser.c8
-rw-r--r--sapi/cli/php_http_parser.h1
-rw-r--r--sapi/cli/ps_title.h2
-rw-r--r--sapi/cli/tests/005.phpt11
-rw-r--r--sapi/cli/tests/006.phpt5
-rw-r--r--sapi/cli/tests/bug43177.phpt4
-rw-r--r--sapi/cli/tests/bug64529.phpt3
-rw-r--r--sapi/cli/tests/bug65066_100.phpt1
-rw-r--r--sapi/cli/tests/bug65066_422.phpt1
-rw-r--r--sapi/cli/tests/bug65066_511.phpt1
-rw-r--r--sapi/cli/tests/bug65633.phpt1
-rw-r--r--sapi/cli/tests/bug66606_1.phpt17
-rw-r--r--sapi/cli/tests/bug66606_2.phpt47
-rw-r--r--sapi/cli/tests/bug66830.phpt1
-rw-r--r--sapi/cli/tests/bug67429.phpt2
-rw-r--r--sapi/cli/tests/bug68291.phpt21
-rw-r--r--sapi/cli/tests/bug68745.phpt1
-rw-r--r--sapi/cli/tests/bug69655.phpt5
-rw-r--r--sapi/cli/tests/bug69953.phpt17
-rw-r--r--sapi/cli/tests/bug70006.phpt18
-rw-r--r--sapi/cli/tests/bug70264.phpt21
-rw-r--r--sapi/cli/tests/bug70470.phpt45
-rw-r--r--sapi/cli/tests/bug71005.phpt47
-rw-r--r--sapi/cli/tests/bug71624.phpt43
-rw-r--r--sapi/cli/tests/cli_process_title_windows.phpt10
-rw-r--r--sapi/cli/tests/php_cli_server_004.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_005.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_006.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_007.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_008.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_009.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_010.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_012.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_013.phpt3
-rw-r--r--sapi/cli/tests/php_cli_server_014.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_015.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_017.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_018.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_019.phpt1
-rw-r--r--sapi/cli/tests/php_cli_server_020.phpt1
-rw-r--r--sapi/cli/tests/upload_2G.phpt5
-rw-r--r--sapi/embed/php_embed.c8
-rw-r--r--sapi/embed/php_embed.h4
-rw-r--r--sapi/fpm/Makefile.frag2
-rw-r--r--sapi/fpm/config.m42
-rw-r--r--sapi/fpm/fpm/events/devpoll.c2
-rw-r--r--sapi/fpm/fpm/events/devpoll.h2
-rw-r--r--sapi/fpm/fpm/events/epoll.c2
-rw-r--r--sapi/fpm/fpm/events/epoll.h2
-rw-r--r--sapi/fpm/fpm/events/kqueue.c2
-rw-r--r--sapi/fpm/fpm/events/kqueue.h2
-rw-r--r--sapi/fpm/fpm/events/poll.c2
-rw-r--r--sapi/fpm/fpm/events/poll.h2
-rw-r--r--sapi/fpm/fpm/events/port.c2
-rw-r--r--sapi/fpm/fpm/events/port.h2
-rw-r--r--sapi/fpm/fpm/events/select.c2
-rw-r--r--sapi/fpm/fpm/events/select.h2
-rw-r--r--sapi/fpm/fpm/fpm_conf.c2
-rw-r--r--sapi/fpm/fpm/fpm_events.c3
-rw-r--r--sapi/fpm/fpm/fpm_log.c5
-rw-r--r--sapi/fpm/fpm/fpm_main.c39
-rw-r--r--sapi/fpm/fpm/fpm_signals.c4
-rw-r--r--sapi/fpm/php-fpm.8.in4
-rw-r--r--sapi/fpm/tests/008.phpt17
-rw-r--r--sapi/fpm/tests/010.phpt6
-rw-r--r--sapi/fpm/tests/016.phpt19
-rw-r--r--sapi/fpm/tests/021-uds-acl.phpt11
-rw-r--r--sapi/fpm/tests/include.inc19
-rw-r--r--sapi/litespeed/Makefile.frag2
-rw-r--r--sapi/litespeed/lsapi_main.c34
-rw-r--r--sapi/litespeed/lsapidef.h2
-rw-r--r--sapi/litespeed/lsapilib.c75
-rw-r--r--sapi/litespeed/lsapilib.h2
-rw-r--r--sapi/phpdbg/Makefile.frag2
-rw-r--r--sapi/phpdbg/config.m419
-rw-r--r--sapi/phpdbg/config.w323
-rw-r--r--sapi/phpdbg/create-test.php150
-rw-r--r--sapi/phpdbg/phpdbg.c621
-rw-r--r--sapi/phpdbg/phpdbg.h38
-rw-r--r--sapi/phpdbg/phpdbg_bp.c134
-rw-r--r--sapi/phpdbg/phpdbg_bp.h2
-rw-r--r--sapi/phpdbg/phpdbg_break.c4
-rw-r--r--sapi/phpdbg/phpdbg_break.h2
-rw-r--r--sapi/phpdbg/phpdbg_btree.c57
-rw-r--r--sapi/phpdbg/phpdbg_btree.h2
-rw-r--r--sapi/phpdbg/phpdbg_cmd.c143
-rw-r--r--sapi/phpdbg/phpdbg_cmd.h3
-rw-r--r--sapi/phpdbg/phpdbg_eol.c4
-rw-r--r--sapi/phpdbg/phpdbg_eol.h2
-rw-r--r--sapi/phpdbg/phpdbg_frame.c16
-rw-r--r--sapi/phpdbg/phpdbg_frame.h2
-rw-r--r--sapi/phpdbg/phpdbg_help.c13
-rw-r--r--sapi/phpdbg/phpdbg_help.h2
-rw-r--r--sapi/phpdbg/phpdbg_info.c55
-rw-r--r--sapi/phpdbg/phpdbg_info.h2
-rw-r--r--sapi/phpdbg/phpdbg_io.c50
-rw-r--r--sapi/phpdbg/phpdbg_io.h7
-rw-r--r--sapi/phpdbg/phpdbg_lexer.c2226
-rw-r--r--sapi/phpdbg/phpdbg_lexer.h3
-rw-r--r--sapi/phpdbg/phpdbg_lexer.l75
-rw-r--r--sapi/phpdbg/phpdbg_list.c149
-rw-r--r--sapi/phpdbg/phpdbg_list.h5
-rw-r--r--sapi/phpdbg/phpdbg_opcode.c176
-rw-r--r--sapi/phpdbg/phpdbg_opcode.h12
-rw-r--r--sapi/phpdbg/phpdbg_out.c5
-rw-r--r--sapi/phpdbg/phpdbg_out.h17
-rw-r--r--sapi/phpdbg/phpdbg_parser.c1069
-rw-r--r--sapi/phpdbg/phpdbg_parser.h92
-rw-r--r--sapi/phpdbg/phpdbg_parser.y27
-rw-r--r--sapi/phpdbg/phpdbg_print.c125
-rw-r--r--sapi/phpdbg/phpdbg_print.h2
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c327
-rw-r--r--sapi/phpdbg/phpdbg_prompt.h8
-rw-r--r--sapi/phpdbg/phpdbg_rinit_hook.c2
-rw-r--r--sapi/phpdbg/phpdbg_rinit_hook.h2
-rw-r--r--sapi/phpdbg/phpdbg_set.c42
-rw-r--r--sapi/phpdbg/phpdbg_set.h4
-rw-r--r--sapi/phpdbg/phpdbg_sigio_win32.c4
-rw-r--r--sapi/phpdbg/phpdbg_sigio_win32.h2
-rw-r--r--sapi/phpdbg/phpdbg_sigsafe.c10
-rw-r--r--sapi/phpdbg/phpdbg_sigsafe.h5
-rw-r--r--sapi/phpdbg/phpdbg_utils.c126
-rw-r--r--sapi/phpdbg/phpdbg_utils.h15
-rw-r--r--sapi/phpdbg/phpdbg_wait.c23
-rw-r--r--sapi/phpdbg/phpdbg_wait.h2
-rw-r--r--sapi/phpdbg/phpdbg_watch.c130
-rw-r--r--sapi/phpdbg/phpdbg_watch.h2
-rw-r--r--sapi/phpdbg/phpdbg_webdata_transfer.c2
-rw-r--r--sapi/phpdbg/phpdbg_webdata_transfer.h2
-rw-r--r--sapi/phpdbg/phpdbg_win.c2
-rw-r--r--sapi/phpdbg/phpdbg_win.h2
-rw-r--r--sapi/phpdbg/tests/basic_run.phpt8
-rw-r--r--sapi/phpdbg/tests/breakpoints_001.phpt33
-rw-r--r--sapi/phpdbg/tests/breakpoints_002.phpt40
-rw-r--r--sapi/phpdbg/tests/breakpoints_003.phpt33
-rw-r--r--sapi/phpdbg/tests/breakpoints_004.phpt41
-rw-r--r--sapi/phpdbg/tests/breakpoints_005.phpt28
-rw-r--r--sapi/phpdbg/tests/breakpoints_006.phpt26
-rw-r--r--sapi/phpdbg/tests/breakpoints_007.phpt25
-rw-r--r--sapi/phpdbg/tests/breakpoints_008.phpt34
-rw-r--r--sapi/phpdbg/tests/clean_001.phpt60
-rw-r--r--sapi/phpdbg/tests/clear_001.phpt44
-rw-r--r--sapi/phpdbg/tests/commands/0001_basic.test8
-rw-r--r--sapi/phpdbg/tests/commands/0002_set.test21
-rw-r--r--sapi/phpdbg/tests/commands/0101_info.test19
-rw-r--r--sapi/phpdbg/tests/commands/0102_print.test27
-rw-r--r--sapi/phpdbg/tests/commands/0103_register.test28
-rw-r--r--sapi/phpdbg/tests/commands/0104_clean.test14
-rw-r--r--sapi/phpdbg/tests/commands/0105_clear.test18
-rw-r--r--sapi/phpdbg/tests/commands/0106_compile.test18
-rw-r--r--sapi/phpdbg/tests/commands/0107_compile.test17
-rw-r--r--sapi/phpdbg/tests/delimiter.phpt7
-rw-r--r--sapi/phpdbg/tests/exceptions_001.phpt46
-rw-r--r--sapi/phpdbg/tests/exceptions_002.phpt51
-rw-r--r--sapi/phpdbg/tests/exceptions_003.phpt54
-rw-r--r--sapi/phpdbg/tests/finish_leave_001.phpt41
-rw-r--r--sapi/phpdbg/tests/generator_run.phpt24
-rw-r--r--sapi/phpdbg/tests/info_001.phpt80
-rw-r--r--sapi/phpdbg/tests/info_002.phpt31
-rw-r--r--sapi/phpdbg/tests/normal_exit.phpt15
-rw-r--r--sapi/phpdbg/tests/phpdbg_break_next.phpt22
-rw-r--r--sapi/phpdbg/tests/phpdbg_oplog_001.phpt58
-rw-r--r--sapi/phpdbg/tests/phpdbg_oplog_002.phpt16
-rw-r--r--sapi/phpdbg/tests/print_001.phpt67
-rw-r--r--sapi/phpdbg/tests/print_002.phpt51
-rw-r--r--sapi/phpdbg/tests/run-tests.php597
-rw-r--r--sapi/phpdbg/tests/run_001.phpt56
-rw-r--r--sapi/phpdbg/tests/stepping_001.phpt69
-rw-r--r--sapi/phpdbg/tests/watch_001.phpt46
-rw-r--r--sapi/phpdbg/zend_mm_structs.h102
-rw-r--r--sapi/tests/bug69487.phpt20
-rw-r--r--scripts/dev/check_parameters.php130
-rw-r--r--scripts/dev/find_tested.php12
-rwxr-xr-xscripts/dev/gen_verify_stub51
-rw-r--r--scripts/man1/php-config.1.in4
-rw-r--r--scripts/man1/phpize.1.in4
-rwxr-xr-xserver-tests.php16
-rw-r--r--tests/basic/bug71273.phpt21
-rw-r--r--tests/basic/header_register_callback.phpt8
-rw-r--r--tests/basic/timeout_config.inc4
-rw-r--r--tests/basic/timeout_variation_5.phpt2
-rw-r--r--tests/basic/timeout_variation_6.phpt2
-rw-r--r--tests/classes/constants_comments_001.phpt34
-rw-r--r--tests/classes/constants_visibility_001.phpt23
-rw-r--r--tests/classes/constants_visibility_002.phpt30
-rw-r--r--tests/classes/constants_visibility_003.phpt30
-rw-r--r--tests/classes/constants_visibility_004.phpt28
-rw-r--r--tests/classes/constants_visibility_005.phpt10
-rw-r--r--tests/classes/constants_visibility_006.phpt11
-rw-r--r--tests/classes/constants_visibility_007.phpt10
-rw-r--r--tests/classes/constants_visibility_error_001.phpt16
-rw-r--r--tests/classes/constants_visibility_error_002.phpt16
-rw-r--r--tests/classes/constants_visibility_error_003.phpt16
-rw-r--r--tests/classes/constants_visibility_error_004.phpt16
-rw-r--r--tests/classes/interface_constant_inheritance_005.phpt12
-rw-r--r--tests/classes/interface_constant_inheritance_006.phpt10
-rw-r--r--tests/classes/interface_constant_inheritance_007.phpt10
-rw-r--r--tests/classes/tostring_003.phpt2
-rw-r--r--tests/classes/type_hinting_004.phpt12
-rw-r--r--tests/lang/030.phpt3
-rw-r--r--tests/lang/045.phpt3
-rw-r--r--tests/lang/bug22592.phpt5
-rw-r--r--tests/lang/bug24640.phpt4
-rw-r--r--tests/lang/bug28800.phpt14
-rw-r--r--tests/lang/bug71897.phpt16
-rw-r--r--tests/lang/operators/bitwiseShiftLeft_variationStr.phpt2
-rw-r--r--tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt20
-rw-r--r--tests/lang/operators/bitwiseShiftRight_variationStr.phpt20
-rw-r--r--tests/lang/operators/modulus_variationStr.phpt28
-rw-r--r--tests/lang/operators/negate_variationStr.phpt18
-rw-r--r--tests/lang/type_hints_003.phpt4
-rw-r--r--tests/output/bug65593.phpt4
-rw-r--r--tests/output/bug70970.phpt28
-rw-r--r--tests/output/ob_010.phpt2
-rw-r--r--tests/output/ob_011.phpt2
-rw-r--r--tests/output/ob_start_error_005.phpt2
-rw-r--r--tests/run-test/test005.phpt9
-rw-r--r--tests/run-test/test006.phpt4
-rw-r--r--tests/run-test/test008.phpt11
-rw-r--r--tests/run-test/test008a.phpt9
-rwxr-xr-xtravis/compile.sh11
-rw-r--r--travis/de2
-rwxr-xr-xtravis/ext/curl/setup.sh6
-rw-r--r--travis/ext/imap/dovecot.conf22
-rw-r--r--travis/ext/imap/dovecotpass1
-rw-r--r--travis/ext/imap/imap.exp29
-rw-r--r--travis/ext/imap/setup.sh11
-rwxr-xr-xtravis/install.sh2
-rw-r--r--win32/build/Makefile15
-rw-r--r--win32/build/Makefile.phpize2
-rw-r--r--win32/build/buildconf.js2
-rw-r--r--win32/build/config.w323
-rw-r--r--win32/build/config.w32.h.in12
-rw-r--r--win32/build/confutils.js187
-rw-r--r--win32/build/default.manifest9
-rw-r--r--win32/build/deplister.c2
-rw-r--r--win32/build/libs_version.txt18
-rw-r--r--win32/build/mkdist.php2
-rw-r--r--win32/build/template.rc2
-rw-r--r--win32/dllmain.c2
-rw-r--r--win32/ftok.c52
-rw-r--r--win32/getrusage.c2
-rw-r--r--win32/getrusage.h2
-rw-r--r--win32/globals.c2
-rw-r--r--win32/grp.h2
-rw-r--r--win32/inet.c2
-rw-r--r--win32/inet.h2
-rw-r--r--win32/install.txt13
-rw-r--r--win32/ipc.h29
-rw-r--r--win32/php_inttypes.h9
-rw-r--r--win32/php_registry.h2
-rw-r--r--win32/php_win32_globals.h2
-rw-r--r--win32/readdir.h2
-rw-r--r--win32/registry.c2
-rw-r--r--win32/select.c2
-rw-r--r--win32/select.h2
-rw-r--r--win32/sendmail.c57
-rw-r--r--win32/sockets.c2
-rw-r--r--win32/sockets.h2
-rw-r--r--win32/syslog.h2
-rw-r--r--win32/winutil.c2
-rw-r--r--win32/winutil.h2
2658 files changed, 182882 insertions, 184054 deletions
diff --git a/.gdbinit b/.gdbinit
index 7782138e95..1c399c102c 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -101,7 +101,7 @@ define dump_bt
____print_str $zvalue->value.str->val $zvalue->value.str->len
end
if $type == 7
- printf "array(%d)[%p]", $zvalue->value.arr->ht->nNumOfElements, $zvalue
+ printf "array(%d)[%p]", $zvalue->value.arr->nNumOfElements, $zvalue
end
if $type == 8
printf "object[%p]", $zvalue
@@ -152,8 +152,8 @@ define ____printzv_contents
set $type = $zvalue->u1.v.type
# 15 == IS_INDIRECT
- if $type >= 5 && $type != 15
- printf "(refcount=%d) ", $zvalue->value.counted->refcount
+ if $type > 5 && $type != 15
+ printf "(refcount=%d) ", $zvalue->value.counted->gc.refcount
end
if $type == 0
@@ -181,7 +181,7 @@ define ____printzv_contents
printf "array: "
if ! $arg1
set $ind = $ind + 1
- ____print_ht $zvalue->value.arr
+ ____print_ht $zvalue->value.arr 1
set $ind = $ind - 1
set $i = $ind
while $i > 0
diff --git a/.gitignore b/.gitignore
index 5f267911a0..a00615f966 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,9 @@
*.tar.gz
*.tar.bz2
*.tar.xz
+*.tar.gz.asc
+*.tar.bz2.asc
+*.tar.xz.asc
.FBCIndex
.FBCLockFolder
.deps
@@ -242,10 +245,6 @@ ext/reflection/spl.chm
ext/simplexml/examples/security.new.xml
ext/spl/examples/.htaccess
ext/spl/examples/*.phps
-ext/sqlite/weztest.sqlite
-ext/sqlite/libsqlite/src/sqlite.h
-ext/sqlite/libsqlite/src/parse.out
-ext/sqlite/libsqlite/src/libsqlite.dsw
ext/sqlite3/tests/phpsql*
ext/sqlite3/tests/*.db
ext/sqlite3/tests/*.tmp
diff --git a/.travis.yml b/.travis.yml
index 929c769d21..527ae8db32 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,29 @@
language: c
-
-branches:
- except:
- - phpng
+sudo: false
+addons:
+ apt:
+ packages:
+ - locales
+ - language-pack-de
+ - re2c
+ - libgmp-dev
+ - libicu-dev
+ - libmcrypt-dev
+ - libtidy-dev
+ - libenchant-dev
+ - libaspell-dev
+ - libpspell-dev
+ - librecode-dev
+ - libsasl2-dev
+ - libxpm-dev
+ - libt1-dev
notifications:
email:
on_failure: change
irc:
+ template:
+ - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} - Change view : %{compare_url} - Build details : %{build_url}"
channels:
- "irc.efnet.org#php.pecl"
on_success: change
@@ -29,13 +45,6 @@ env:
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
-before_install:
- - sudo apt-get update -qq
- - sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev libsasl2-dev libxpm-dev libt1-dev libc-client2007e-dev
- - sudo cp ./travis/de /var/lib/locales/supported.d/de
- - sudo dpkg-reconfigure locales
- - ./travis/install.sh
-
before_script:
# Compile PHP
- ./travis/compile.sh
@@ -45,9 +54,7 @@ before_script:
- . ./travis/ext/pdo_mysql/setup.sh
- . ./travis/ext/pgsql/setup.sh
- . ./travis/ext/pdo_pgsql/setup.sh
- - . ./travis/ext/imap/setup.sh
# Run PHPs run-tests.php
script:
- - ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
- - ./sapi/cli/php sapi/phpdbg/tests/run-tests.php -diff2stdout --phpdbg sapi/phpdbg/phpdbg
+ - ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php $(if [ $ENABLE_DEBUG == 1 ]; then echo "-d opcache.enable_cli=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --set-timeout 120
diff --git a/CODING_STANDARDS b/CODING_STANDARDS
index 0cfcff18f6..5cf70c92b5 100644
--- a/CODING_STANDARDS
+++ b/CODING_STANDARDS
@@ -165,7 +165,7 @@ User Functions/Methods Naming Conventions
'foobar'
'foo_bar'
-Internal Function Naming Convensions
+Internal Function Naming Conventions
----------------------
1. Functions that are part of the external API should be named
@@ -178,7 +178,7 @@ Internal Function Naming Convensions
Unexposed module function should be static and should not be defined in
'php_modulename.h'.
- static int php_session_destroy(TSRMLS_D)
+ static int php_session_destroy()
2. Main module source file must be named 'modulename.c'.
diff --git a/INSTALL b/INSTALL
index a37d9a2c8d..958035fd60 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,7 +5,6 @@ Installing PHP
* General Installation Considerations
* Installation on Unix systems
- + Apache 1.3.x on Unix systems
+ Apache 2.x on Unix systems
+ Lighttpd 1.4 on Unix systems
+ Sun, iPlanet and Netscape servers on Sun Solaris
@@ -103,7 +102,6 @@ Installation on Unix systems
Table of Contents
- * Apache 1.3.x on Unix systems
* Apache 2.x on Unix systems
* Lighttpd 1.4 on Unix systems
* Sun, iPlanet and Netscape servers on Sun Solaris
@@ -163,208 +161,6 @@ Table of Contents
you can't figure out why, see the Problems section.
__________________________________________________________________
-Apache 1.3.x on Unix systems
-
- This section contains notes and hints specific to Apache installs of
- PHP on Unix platforms. We also have instructions and notes for Apache 2
- on a separate page.
-
- You can select arguments to add to the configure on line 10 below from
- the list of core configure options and from extension specific options
- described at the respective places in the manual. The version numbers
- have been omitted here, to ensure the instructions are not incorrect.
- You will need to replace the 'xxx' here with the correct values from
- your files.
-
- Example #1 Installation Instructions (Apache Shared Module Version) for
- PHP
-1. gunzip apache_xxx.tar.gz
-2. tar -xvf apache_xxx.tar
-3. gunzip php-xxx.tar.gz
-4. tar -xvf php-xxx.tar
-5. cd apache_xxx
-6. ./configure --prefix=/www --enable-module=so
-7. make
-8. make install
-9. cd ../php-xxx
-
-10. Now, configure your PHP. This is where you customize your PHP
- with various options, like which extensions will be enabled. Do a
- ./configure --help for a list of available options. In our example
- we'll do a simple configure with Apache 1 and MySQL support. Your
- path to apxs may differ from our example.
-
- ./configure --with-mysql --with-apxs=/www/bin/apxs
-
-11. make
-12. make install
-
- If you decide to change your configure options after installation,
- you only need to repeat the last three steps. You only need to
- restart apache for the new module to take effect. A recompile of
- Apache is not needed.
-
- Note that unless told otherwise, 'make install' will also install PEAR,
- various PHP tools such as phpize, install the PHP CLI, and more.
-
-13. Setup your php.ini file:
-
- cp php.ini-development /usr/local/lib/php.ini
-
- You may edit your .ini file to set PHP options. If you prefer your
- php.ini in another location, use --with-config-file-path=/some/path in
- step 10.
-
- If you instead choose php.ini-production, be certain to read the list
- of changes within, as they affect how PHP behaves.
-
-14. Edit your httpd.conf to load the PHP module. The path on the right hand
- side of the LoadModule statement must point to the path of the PHP
- module on your system. The make install from above may have already
- added this for you, but be sure to check.
-
- LoadModule php7_module libexec/libphp7.so
-
-15. And in the AddModule section of httpd.conf, somewhere under the
- ClearModuleList, add this:
-
- AddModule mod_php7.c
-
-16. Tell Apache to parse certain extensions as PHP. For example,
- let's have Apache parse the .php extension as PHP. You could
- have any extension(s) parse as PHP by simply adding more, with
- each separated by a space. We'll add .phtml to demonstrate.
-
- AddType application/x-httpd-php .php .phtml
-
- It's also common to setup the .phps extension to show highlighted PHP
- source, this can be done with:
-
- AddType application/x-httpd-php-source .phps
-
-17. Use your normal procedure for starting the Apache server. (You must
- stop and restart the server, not just cause the server to reload by
- using a HUP or USR1 signal.)
-
- Alternatively, to install PHP as a static object:
-
- Example #2 Installation Instructions (Static Module Installation for
- Apache) for PHP
-1. gunzip -c apache_1.3.x.tar.gz | tar xf -
-2. cd apache_1.3.x
-3. ./configure
-4. cd ..
-
-5. gunzip -c php-5.x.y.tar.gz | tar xf -
-6. cd php-5.x.y
-7. ./configure --with-mysql --with-apache=../apache_1.3.x
-8. make
-9. make install
-
-10. cd ../apache_1.3.x
-
-11. ./configure --prefix=/www --activate-module=src/modules/php7/libphp7.a
- (The above line is correct! Yes, we know libphp7.a does not exist at this
- stage. It isn't supposed to. It will be created.)
-
-12. make
- (you should now have an httpd binary which you can copy to your Apache bin d
-ir if
- it is your first install then you need to "make install" as well)
-
-13. cd ../php-5.x.y
-14. cp php.ini-development /usr/local/lib/php.ini
-
-15. You can edit /usr/local/lib/php.ini file to set PHP options.
- Edit your httpd.conf or srm.conf file and add:
- AddType application/x-httpd-php .php
-
- Depending on your Apache install and Unix variant, there are many
- possible ways to stop and restart the server. Below are some typical
- lines used in restarting the server, for different apache/unix
- installations. You should replace /path/to/ with the path to these
- applications on your systems.
-
- Example #3 Example commands for restarting Apache
-1. Several Linux and SysV variants:
-/etc/rc.d/init.d/httpd restart
-
-2. Using apachectl scripts:
-/path/to/apachectl stop
-/path/to/apachectl start
-
-3. httpdctl and httpsdctl (Using OpenSSL), similar to apachectl:
-/path/to/httpsdctl stop
-/path/to/httpsdctl start
-
-4. Using mod_ssl, or another SSL server, you may want to manually
-stop and start:
-/path/to/apachectl stop
-/path/to/apachectl startssl
-
- The locations of the apachectl and http(s)dctl binaries often vary. If
- your system has locate or whereis or which commands, these can assist
- you in finding your server control programs.
-
- Different examples of compiling PHP for apache are as follows:
-./configure --with-apxs --with-pgsql
-
- This will create a libphp7.so shared library that is loaded into Apache
- using a LoadModule line in Apache's httpd.conf file. The PostgreSQL
- support is embedded into this library.
-
-./configure --with-apxs --with-pgsql=shared
-
- This will create a libphp7.so shared library for Apache, but it will
- also create a pgsql.so shared library that is loaded into PHP either by
- using the extension directive in php.ini file or by loading it
- explicitly in a script using the dl() function.
-
-./configure --with-apache=/path/to/apache_source --with-pgsql
-
- This will create a libmodphp7.a library, a mod_php7.c and some
- accompanying files and copy this into the src/modules/php7 directory in
- the Apache source tree. Then you compile Apache using
- --activate-module=src/modules/php7/libphp7.a and the Apache build
- system will create libphp7.a and link it statically into the httpd
- binary. The PostgreSQL support is included directly into this httpd
- binary, so the final result here is a single httpd binary that includes
- all of Apache and all of PHP.
-
-./configure --with-apache=/path/to/apache_source --with-pgsql=shared
-
- Same as before, except instead of including PostgreSQL support directly
- into the final httpd you will get a pgsql.so shared library that you
- can load into PHP from either the php.ini file or directly using dl().
-
- When choosing to build PHP in different ways, you should consider the
- advantages and drawbacks of each method. Building as a shared object
- will mean that you can compile apache separately, and don't have to
- recompile everything as you add to, or change, PHP. Building PHP into
- apache (static method) means that PHP will load and run faster. For
- more information, see the Apache » web page on DSO support.
-
- Note:
-
- Apache's default httpd.conf currently ships with a section that
- looks like this:
-
-User nobody
-Group "#-1"
-
- Unless you change that to "Group nogroup" or something like that
- ("Group daemon" is also very common) PHP will not be able to open
- files.
-
- Note:
-
- Make sure you specify the installed version of apxs when using
- --with-apxs=/path/to/apxs . You must NOT use the apxs version that
- is in the apache sources but the one that is actually installed on
- your system.
- __________________________________________________________________
- __________________________________________________________________
-
Apache 2.x on Unix systems
This section contains notes and hints specific to Apache 2.x installs
diff --git a/LICENSE b/LICENSE
index c881c92454..e0bc44cac1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.01
-Copyright (c) 1999 - 2015 The PHP Group. All rights reserved.
+Copyright (c) 1999 - 2016 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/Makefile.gcov b/Makefile.gcov
index 8d30f34ae8..e7c9c7054a 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -57,7 +57,7 @@ php_lcov.info: lcov-test
cp $$x.bbg lcov_data/$$y.bbg ; \
fi; \
done; \
- for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
+ for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
if test -d lcov_data/$$dir; then \
rm -rf lcov_data/$$dir ; \
fi; \
diff --git a/Makefile.global b/Makefile.global
index c571f3455d..9b29d5112b 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -53,7 +53,7 @@ install-headers:
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
done; \
$(mkinstalldirs) $$paths && \
- echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
+ echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
for i in `echo $(INSTALL_HEADERS)`; do \
if test "$(PHP_PECL_EXTENSION)"; then \
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
diff --git a/NEWS b/NEWS
index 73c5afcaf3..e67720a5a8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,387 +1,122 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-09 Jul 2015, PHP 7.0.0 Beta 1
+?? ??? 2016, PHP 7.1.0alpha2
- Core:
- . Fixed bug #69521 (Segfault in gc_collect_cycles()).
- (arjen at react dot com, Laruence)
- . Improved zend_string API (Francois Laupretre)
- . Fixed bug #69955 (Segfault when trying to combine [] and assign-op on
- ArrayAccess object). (Laruence)
- . Fixed bug #69957 (Different ways of handling div/mod/intdiv). (Bob)
+ . Fixed bug #72373 (TypeError after Generator function w/declared return type
+ finishes). (Nikita)
-- CLI server:
- . Fixed bug #69655 (php -S changes MKCALENDAR request method to MKCOL). (cmb)
- . Fixed bug #64878 (304 responses return Content-Type header). (cmb)
-- COM:
- . Fixed bug #69939 (Casting object to bool returns false). (Kalle)
-
-- JSON
- . Fixed bug #62010 (json_decode produces invalid byte-sequences).
- (Jakub Zelenka)
-
-- OCI8:
- . Corrected oci8 hash destructors to prevent segfaults, and a few other fixes.
- (Cameron Porter)
-
-- ODBC:
- . Fixed bug #69975 (PHP segfaults when accessing nvarchar(max) defined
- columns). (cmb)
-
-- OpenSSL:
- . Fixed bug #69882 (OpenSSL error "key values mismatch" after
- openssl_pkcs12_read with extra cert) (Tomasz Sawicki)
-
-- PCRE:
- . Fixed bug #53823 (preg_replace: * qualifier on unicode replace garbles the
- string). (cmb)
-
-- Session:
- . Fixed bug #69952 (Data integrity issues accessing superglobals by
- reference). (Bob)
-
-- Standard:
- . Fixed bug #69983 (get_browser fails with user agent of null).
- (Kalle, cmb, Laruence)
- . Fixed bug #69976 (Unable to parse "all" urls with colon char). (cmb)
- . Fixed bug #69768 (escapeshell*() doesn't cater to !). (cmb)
-
-25 Jun 2015, PHP 7.0.0 Alpha 2
+09 Jun 2016, PHP 7.1.0alpha1
- Core:
- . Fixed bug #69872 (uninitialised value in strtr with array). (Laruence)
- . Fixed bug #69868 (Invalid read of size 1 in zend_compile_short_circuiting).
- (Laruence)
- . Fixed bug #69849 (Broken output of apache_request_headers). (Kalle)
- . Fixed bug #69840 (iconv_substr() doesn't work with UTF-16BE). (Kalle)
- . Fixed bug #69823 (PHP 7.0.0alpha1 segmentation fault when exactly 33
- extensions are loaded). (Laruence)
- . Fixed bug #69805 (null ptr deref and seg fault in zend_resolve_class_name).
- (Laruence)
- . Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class
- name). (Dmitry)
- . Fixed bug #69761 (Serialization of anonymous classes should be prevented).
- (Laruence)
- . Fixed bug #69551 (parse_ini_file() and parse_ini_string() segmentation
- fault). (Christoph M. Becker)
- . Fixed bug #69781 (phpinfo() reports Professional Editions of Windows
- 7/8/8.1/10 as "Business"). (Christian Wenz)
- . Fixed bug #69835 (phpinfo() does not report many Windows SKUs).
- (Christian Wenz)
- . Fixed bug #69889 (Null coalesce operator doesn't work for string offsets).
+ . Added nullable types. (Levi, Dmitry)
+ . Added DFA optimization framework based on e-SSA form. (Dmitry, Nikita)
+ . Added specialized opcode handlers (e.g. ZEND_ADD_LONG_NO_OVERFLOW).
+ (Dmitry)
+ . Change statement and fcall extension handlers to accept frame. (Joe)
+ . Implemented safe execution timeout handling, that prevents random crashes
+ after "Maximum execution time exceeded" error. (Dmitry)
+ . Fixed bug #53432 (Assignment via string index access on an empty string
+ converts to array). (Nikita)
+ . Fixed bug #62210 (Exceptions can leak temporary variables). (Dmitry, Bob)
+ . Fixed bug #62814 (It is possible to stiffen child class members visibility).
(Nikita)
- . Fixed bug #69891 (Unexpected array comparison result). (Nikita)
- . Fixed bug #69892 (Different arrays compare indentical due to integer key
- truncation). (Nikita)
- . Fixed bug #69893 (Strict comparison between integer and empty string keys
- crashes). (Nikita)
-
-- DOM:
- . Fixed bug #69846 (Segmenation fault (access violation) when iterating over
- DOMNodeList). (Anatol Belski)
-
-- GD:
- . Fixed bug #61221 (imagegammacorrect function loses alpha channel). (cmb)
-
-- mysqlnd:
- . Fixed Bug #69796 (mysqli_stmt::fetch doesn't assign null values to
- bound variables). (Laruence)
-
-- Curl:
- . Fixed bug #69831 (Segmentation fault in curl_getinfo). (im dot denisenko at
- yahoo dot com)
-
-- Opcache:
- . Removed opcache.load_comments configuration directive. Now doc comments
- loading costs nothing and always enabled. (Dmitry)
- . Fixed bug #69838 (Wrong size calculation for function table). (Anatol)
-
-- PCRE:
- . Fixed bug #69864 (Segfault in preg_replace_callback) (cmb, ab)
-
-- PDO_pgsql:
- . Fixed bug #69752 (PDOStatement::execute() leaks memory with DML
- Statements when closeCuror() is u). (Philip Hofstetter)
-
-- SPL
- . Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken). (Dmitry)
-
-- SQLite3
- . Fixed bug #69897 (segfault when manually constructing SQLite3Result).
- (Kalle)
-
-- Standard
- . Fixed bug #62922 (Truncating entire string should result in string).
+ . Fixed bug #69989 (Generators don't participate in cycle GC). (Nikita)
+ . Fixed bug #70228 (Memleak if return in finally block). (Dmitry)
+ . Fixed bug #71266 (Missing separation of properties HT in foreach etc).
+ (Dmitry)
+ . Fixed bug #71604 (Aborted Generators continue after nested finally).
(Nikita)
-
-11 Jun 2015, PHP 7.0.0 Alpha 1
-
-- Core:
- . Fixed bug #69767 (Default parameter value with wrong type segfaults).
- (cmb, Laruence)
- . Fixed bug #69756 (Fatal error: Nesting level too deep - recursive dependency
- ? with ===). (Dmitry, Laruence)
- . Fixed bug #69758 (Item added to array not being removed by array_pop/shift
- ). (Laruence)
- . Fixed bug #68475 (Add support for $callable() sytnax with 'Class::method').
- (Julien, Aaron Piotrowski)
- . Fixed bug #69485 (Double free on zend_list_dtor). (Laruence)
- . Fixed bug #69427 (Segfault on magic method __call of private method in
- superclass). (Laruence)
- . Improved __call() and __callStatic() magic method handling. Now they are
- called in a stackless way using ZEND_CALL_TRAMPOLINE opcode, without
- additional stack frame. (Laruence, Dmitry)
- . Optimized strings concatenation. (Dmitry, Laruence)
- . Fixed weird operators behavior. Division by zero now emits warning and
- returns +/-INF, modulo by zero and intdid() throws an exception, shifts
- by negative offset throw exceptions. Compile-time evaluation of division
- by zero is disabled. (Dmitry, Andrea, Nikita)
- . Fixed bug #69371 (Hash table collision leads to inaccessible array keys).
- (Laruence)
- . Fixed bug #68933 (Invalid read of size 8 in zend_std_read_property).
- (Laruence, arjen at react dot com)
- . Fixed bug #68252 (segfault in Zend/zend_hash.c in function
- _zend_hash_del_el). (Laruence)
- . Fixed bug #65598 (Closure executed via static autoload incorrectly marked as
- static). (Nikita)
- . Fixed bug #66811 (Cannot access static::class in lambda, writen outside of a
- class). (Nikita)
- . Fixed bug #69568 (call a private function in closure failed). (Nikita)
- . Added PHP_INT_MIN constant. (Andrea)
- . Added Closure::call() method. (Andrea)
- . Fixed bug #67959 (Segfault when calling phpversion('spl')). (Florian)
- . Implemented the RFC `Catchable "Call to a member function bar() on a
- non-object"`. (Timm)
- . Added options parameter for unserialize allowing to specify acceptable
- classes (https://wiki.php.net/rfc/secure_unserialize). (Stas)
- . Fixed bug #63734 (Garbage collector can free zvals that are still
- referenced). (Dmitry)
- . Removed ZEND_ACC_FINAL_CLASS, promoting ZEND_ACC_FINAL as final class
- modifier. (Guilherme Blanco)
- . is_long() & is_integer() is now an alias of is_int(). (Kalle)
- . Implemented FR #55467 (phpinfo: PHP Variables with $ and single quotes). (Kalle)
- . Added ?? operator. (Andrea)
- . Added <=> operator. (Andrea)
- . Added \u{xxxxx} Unicode Codepoint Escape Syntax. (Andrea)
- . Fixed oversight where define() did not support arrays yet const syntax did.
- (Andrea, Dmitry)
- . Use "integer" and "float" instead of "long" and "double" in ZPP, type hint
- and conversion error messages. (Andrea)
- . Implemented FR #55428 (E_RECOVERABLE_ERROR when output buffering in output
- buffering handler). (Kalle)
- . Removed scoped calls of non-static methods from an incompatible $this
- context. (Nikita)
- . Removed support for #-style comments in ini files. (Nikita)
- . Removed support for assigning the result of new by reference. (Nikita)
- . Invalid octal literals in source code now produce compile errors, fixes
- PHPSadness #31. (Andrea)
- . Removed dl() function on fpm-fcgi. (Nikita)
- . Removed support for hexadecimal numeric strings. (Nikita)
- . Removed obsolete extensions and SAPIs. See the full list in UPGRADING. (Anatol)
- . Added NULL byte protection to exec, system and passthru. (Yasuo)
- . Added error_clear_last() function. (Reeze Xia)
- . Fixed bug #68797 (Number 2.2250738585072012e-308 converted incorrectly).
- (Anatol)
- . Improved zend_qsort(using hybrid sorting algo) for better performance,
- and also renamed zend_qsort to zend_sort. (Laruence)
- . Added stable sorting algo zend_insert_sort. (Laruence)
- . Implemented the RFC `Scalar Type Decalarations v0.5`. (Anthony)
- . Implemented the RFC `Group Use Declarations`. (Marcio)
- . Implemented the RFC `Continue Output Buffering`. (Mike)
- . Implemented the RFC `Constructor behaviour of internal classes`. (Dan, Dmitry)
- . Implemented the RFC `Fix "foreach" behavior`. (Dmitry)
- . Implemented the RFC `Generator Delegation`. (Bob)
- . Implemented the RFC `Anonymous Class Support`. (Joe, Nikita, Dmitry)
- . Implemented the RFC `Context Sensitive Lexer`. (Marcio Almada)
- . Fixed bug #69511 (Off-by-one buffer overflow in php_sys_readlink).
- (Jan Starke, Anatol)
-
-- CLI server:
- . Refactor MIME type handling to use a hash table instead of linear search.
- (Adam)
- . Update the MIME type list from the one shipped by Apache HTTPD. (Adam)
- . Added support for SEARCH WebDav method. (Mats Lindh)
-
-- Curl:
- . Fixed bug #68937 (Segfault in curl_multi_exec). (Laruence)
- . Removed support for unsafe file uploads. (Nikita)
-
-- Date:
- . Fixed day_of_week function as it could sometimes return negative values
- internally. (Derick)
- . Removed $is_dst parameter from mktime() and gmmktime(). (Nikita)
- . Removed date.timezone warning
- (https://wiki.php.net/rfc/date.timezone_warning_removal). (Bob)
- . Added "v" DateTime format modifier to get the 3-digit version of fraction
- of seconds. (Mariano Iglesias)
- . Implemented FR #69089: Added DateTime::RFC3339_EXTENDED to output in
- RFC3339 Extended format which includes fraction of seconds (Mariano
- Iglesias)
-
-- DBA:
- . Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
- . Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)
-
-- DOM:
- . Made DOMNode::textContent writeable. (Tjerk)
-
-- GD:
- . Made fontFetch's path parser thread-safe. (Sara)
- . Removed T1Lib support. (Kalle)
-
-- Fileinfo:
- . Fixed bug #66242 (libmagic: don't assume char is signed). (ArdB)
-
-- Filter:
- . New FILTER_VALIDATE_DOMAIN and better RFC conformance for FILTER_VALIDATE_URL. (Kevin Dunglas)
-
-- FPM:
- . Fixed bug #68945 (Unknown admin values segfault pools). (Laruence)
- . Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes). (Chris Wright)
- . Implement request #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
+ . Fixed bug #71572 (String offset assignment from an empty string inserts
+ null byte). (Francois)
+ . Fixed bug #71897 (ASCII 0x7F Delete control character permitted in
+ identifiers). (Andrea)
+ . Fixed bug #72188 (Nested try/finally blocks losing return value). (Dmitry)
+ . Fixed bug #72213 (Finally leaks on nested exceptions). (Dmitry, Nikita)
+ . Implemented the RFC `Support Class Constant Visibility`. (Sean DuBois,
+ Reeze Xia, Dmitry)
+ . Added void return type. (Andrea)
+ . Added support for negative string offsets in string offset syntax and
+ various string functions. (Francois)
+ . Added a form of the list() construct where keys can be specified. (Andrea)
+ . Number operators taking numeric strings now emit E_NOTICEs or E_WARNINGs
+ when given malformed numeric strings. (Andrea)
+ . (int), intval() where $base is 10 or unspecified, settype(), decbin(),
+ decoct(), dechex(), integer operators and other conversions now always
+ respect scientific notation in numeric strings. (Andrea)
+ . Implemented the RFC `Catching multiple exception types`. (Bronislaw Bialek,
+ Pierrick)
+ . Raise a compile-time warning on octal escape sequence overflow. (Sara)
+ . Added [] = as alternative construct to list() =. (Bob)
+ . Implemented logging to syslog with dynamic error levels. (Jani Ollikainen)
+ . Fixed bug #47517 (php-cgi.exe missing UAC manifest).
+ (maxdax15801 at users noreply github com)
+
+- Apache2handler:
+ . Enable per-module logging in Apache 2.4+. (Martin Vobruba)
+
+- CLI Server:
+ . Fixed bug #71276 (Built-in webserver does not send Date header).
+ (see at seos fr)
- FTP:
- . Fixed bug #69082 (FTPS support on Windows). (Anatol)
+ . Implemented FR #55651 (Option to ignore the returned FTP PASV address).
+ (abrender at elitehosts dot com)
- Intl:
- . Removed deprecated aliases datefmt_set_timezone_id() and
- IntlDateFormatter::setTimeZoneID(). (Nikita)
-
-- JSON
- . Replace non-free JSON parser with a parser from Jsond extension, fixes #63520
- (JSON extension includes a problematic license statement). (Jakub Zelenka)
- . Fixed bug #68938 (json_decode() decodes empty string without error).
- (jeremy at bat-country dot us)
- . Fixed bug #68546 (json_decode() Fatal error: Cannot access property
- started with '\0'). (Jakub Zelenka)
-
-- LDAP
- . Fixed bug #47222 (Implement LDAP_OPT_DIAGNOSTIC_MESSAGE). (Andreas Heigl)
-
-- LiteSpeed:
- . Updated LiteSpeed SAPI code from V5.5 to V6.6. (George Wang)
-
-- libxml:
- . Fixed handling of big lines in error messages with libxml >= 2.9.0.
- (Christoph M. Becker)
-
-- Mcrypt:
- . Fixed possible read after end of buffer and use after free. (Dmitry)
- . Removed mcrypt_generic_end() alias. (Nikita)
- . Removed mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb(), mcrypt_ofb(). (Nikita)
-
-- Opcache:
- . Fixed bug #69688 (segfault with eval and opcache fast shutdown).
- (Laruence)
- . Added experimental (disabled by default) file based opcode cache.
- (Dmitry, Laruence, Anatol)
- . Fixed bug with try blocks being removed when extended_info opcode
- generation is turned on. (Laruence)
- . Fixed bug #68644 (strlen incorrect : mbstring + func_overload=2 +UTF-8
- + Opcache). (Laruence)
-
-- OpenSSL:
- . Added "alpn_protocols" SSL context option allowing encrypted client/server
- streams to negotiate alternative protocols using the ALPN TLS extension when
- built against OpenSSL 1.0.2 or newer. Negotiated protocol information is
- accessible through stream_get_meta_data() output.
- . Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic
- detection or the "peer_name" option instead. (Nikita)
-
-- pcntl:
- . Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
- when setting SIG_DFL). (Julien)
- . Added wifcontinued and wcontinued. (xilon-jul)
- . Added rusage support to pcntl_wait() and pcntl_waitpid(). (Anton Stepanenko,
- Tony)
-
-- PCRE:
- . Removed support for the /e (PREG_REPLACE_EVAL) modifier. (Nikita)
-
-- PDO:
- . Fixed bug #59450 (./configure fails with "Cannot find php_pdo_driver.h").
- (maxime dot besson at smile dot fr)
-
-- PDO_mysql:
- . Fixed bug #68424 (Add new PDO mysql connection attr to control multi
- statements option). (peter dot wolanin at acquia dot com)
-
-- PDO_pgsql:
- . Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute in favor of
- ATTR_EMULATE_PREPARES). (Nikita)
-
-- Reflection
- . Fixed inheritance chain of Reflector interface. (Tjerk)
- . Added ReflectionGenerator class. (Bob)
- . Added reflection support for return types and type declarations. (Sara,
- Matteo)
+ . Added IntlTimeZone::getWindowsID() and
+ IntlTimeZone::getIDForWindowsID(). (Sara)
+ . Fixed bug #69374 (IntlDateFormatter formatObject returns wrong utf8 value).
+ (lenhatanh86 at gmail com)
+ . Fixed bug #69398 (IntlDateFormatter formatObject returns wrong value when
+ time style is NONE). (lenhatanh86 at gmail com)
+
+- Hash:
+ . Added SHA3 fixed mode algorithms (224, 256, 384, and 512 bit). (Sara)
+ . Added SHA512/256 and SHA512/224 algorithms. (Sara)
+
+- JSON:
+ . Exported JSON parser API including json_parser_method that can be used
+ for implementing custom logic when parsing JSON. (Jakub Zelenka)
+ . Escaped U+2028 and U+2029 when JSON_UNESCAPED_UNICODE is supplied as
+ json_encode options and added JSON_UNESCAPED_LINE_TERMINATORS to restore
+ the previous behaviour. (Eddie Kohler)
+
+- PDO_Firebird:
+ . Fixed bug #60052 (Integer returned as a 64bit integer on X86_64). (Mariuz)
+
+- Pgsql:
+ . Implemented FR #31021 (pg_last_notice() is needed to get all notice
+ messages). (Yasuo)
+ . Implemented FR #48532 (Allow pg_fetch_all() to index numerically). (Yasuo)
+
+- Reflection:
+ . Fix #72209 (ReflectionProperty::getValue() doesn't fail if object doesn't match type). (Joe)
- Session:
- . Fixed bug #67694 (Regression in session_regenerate_id()). (Tjerk)
- . Fixed bug #68941 (mod_files.sh is a bash-script). (bugzilla at ii.nl, Yasuo)
-
-- SOAP:
- . Fixed bug #68361 (Segmentation fault on SoapClient::__getTypes). (Laruence)
-
-- SPL:
- . Changed ArrayIterator implementation using zend_hash_iterator_... API.
- Allowed modification of iterated ArrayObject using the same behavior
- as proposed in `Fix "foreach" behavior`. Removed "Array was modified
- outside object and internal position is no longer valid" hack. (Dmitry)
- . Implemented #67886 (SplPriorityQueue/SplHeap doesn't expose extractFlags
- nor curruption state). (Julien)
- . Fixed bug #66405 (RecursiveDirectoryIterator::CURRENT_AS_PATHNAME
- breaks the RecursiveIterator). (Paul Garvin)
-
-- Sqlite3:
- . Fixed bug #68260 (SQLite3Result::fetchArray declares wrong
- required_num_args). (Julien)
+ . Improved fix for bug #68063 (Empty session IDs do still start sessions).
+ (Yasuo)
+ . Fixed bug #71038 (session_start() returns TRUE on failure).
+ Session save handlers must return 'string' always for successful read.
+ i.e. Non-existing session read must return empty string. PHP 7.0 is made
+ not to tolerate buggy return value. (Yasuo)
+ . Fixed bug #71394 (session_regenerate_id() must close opened session on
+ errors). (Yasuo)
+
+- SQLite3:
+ . Implemented FR #71159 (Upgraded bundled SQLite lib to 3.9.2). (Laruence)
- Standard:
- . Fixed bug #69723 (Passing parameters by reference and array_column).
+ . Fixed bug #71100 (long2ip() doesn't accept integers in strict mode).
(Laruence)
- . Fixed bug #69523 (Cookie name cannot be empty). (Christoph M. Becker)
- . Fixed bug #69325 (php_copy_file_ex does not pass the argument).
- (imbolk at gmail dot com)
- . Fixed bug #69299 (Regression in array_filter's $flag argument in PHP 7).
- (Laruence)
- . Removed call_user_method() and call_user_method_array() functions. (Kalle)
- . Fixed user session handlers (See rfc:session.user.return-value). (Sara)
- . Added intdiv() function. (Andrea)
- . Improved precision of log() function for base 2 and 10. (Marc Bennewitz)
- . Remove string category support in setlocale(). (Nikita)
- . Remove set_magic_quotes_runtime() and its alias magic_quotes_runtime().
- (Nikita)
- . Fixed bug #65272 (flock() out parameter not set correctly in windows).
- (Daniel Lowrey)
- . Added preg_replace_callback_array function. (Wei Dai)
- . Deprecated salt option to password_hash. (Anthony)
- . Fixed bug #69686 (password_verify reports back error on PHP7 will null
- string). (Anthony)
- . Added Windows support for getrusage(). (Kalle)
- . Removed hardcoded limit on number of pipes in proc_open(). (Tony)
-
-- Streams:
- . Fixed bug #68532 (convert.base64-encode omits padding bytes).
- (blaesius at krumedia dot de)
- . Removed set_socket_blocking() in favor of its alias stream_set_blocking().
- (Nikita)
-
-- XSL:
- . Fixed bug #64776 (The XSLT extension is not thread safe). (Mike)
- . Removed xsl.security_prefs ini option. (Nikita)
-
-- Zlib:
- . Added deflate_init(), deflate_add(), inflate_init(), inflate_add()
- functions allowing incremental/streaming compression/decompression.
- (Daniel Lowrey & Bob Weinand)
-
-- Zip:
- . Added ZipArchive::setCompressionName and ZipArchive::setCompressionIndex
- methods (Remi, Cedric Delmas)
- . Update bundled libzip to 1.0.1 (Remi, Anatol)
- . Fixed bug #67161. (ZipArchive::getStream() returns NULL for certain file)
- (Christoph M. Becker)
+ . Implemented FR #55716 (Add an option to pass a custom stream context to
+ get_headers()). (Ferenc)
+ . Additional validation for parse_url() for login/pass components).
+ (Ilia) (Julien)
+ . Implemented FR #69359 (Provide a way to fetch the current environment
+ variables). (Ferenc)
+ . unpack() function accepts an additional optional argument $offset. (Dmitry)
+ . Implemented #51879 stream context socket option tcp_nodelay (Joe)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
diff --git a/README.EXT_SKEL b/README.EXT_SKEL
index fdf7ad0e90..5ac48ec4fa 100644
--- a/README.EXT_SKEL
+++ b/README.EXT_SKEL
@@ -172,7 +172,7 @@ PHP_FUNCTION(module_name_drawtext)
zval *image = NULL;
zval *font = NULL;
- if (zend_parse_parameters(argc TSRMLS_CC, "rsrll|l", &image, &text, &text_len, &font, &x, &y, &color) == FAILURE)
+ if (zend_parse_parameters(argc, "rsrll|l", &image, &text, &text_len, &font, &x, &y, &color) == FAILURE)
return;
if (image) {
diff --git a/README.GIT-RULES b/README.GIT-RULES
index 0fa185c9a4..a88a8c9f32 100644
--- a/README.GIT-RULES
+++ b/README.GIT-RULES
@@ -12,7 +12,7 @@ Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
some basic rules with regards to Git usage will::
a. Make everybody happier, especially those responsible for maintaining
- Git itself.
+ PHP itself.
b. Keep the changes consistently well documented and easily trackable.
@@ -48,11 +48,11 @@ Currently we have the following branches in use::
PHP-5.6 Is used to release the PHP 5.6.x series. This is a current
stable version and is open for bugfixes only.
- PHP-5.5 Is used to release the PHP 5.5.x series. This is a current
- stable version and is open for bugfixes only.
+ PHP-5.5 Is used to release the PHP 5.5.x series. This is an old
+ stable version and is open for security fixes only.
- PHP-5.4 Is used to release the PHP 5.4.x series. This is a current
- stable version and is open for bugfixes only.
+ PHP-5.4 Is used to release the PHP 5.4.x series. This is an old
+ stable version and is open for security fixes only.
PHP-5.3 This branch is closed.
@@ -67,7 +67,7 @@ Currently we have the following branches in use::
The next few rules are more of a technical nature::
- 1. All changes should first go to the lowest branch (i.e. 5.4) and then
+ 1. All changes should first go to the lowest branch (i.e. 5.6) and then
get merged up to all other branches. If a change is not needed for
later branches (i.e. fixes for features which where dropped from later
branches) an empty merge should be done.
@@ -79,7 +79,7 @@ The next few rules are more of a technical nature::
should be noted in both PHP-5.4/NEWS and PHP-5.5/NEWS but
not master, which is not a public released version yet.
- 3. Do not commit multiple file and dump all messages in one commit. If you
+ 3. Do not commit multiple files and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
diff --git a/README.NEW-OUTPUT-API b/README.NEW-OUTPUT-API
index c43649a837..fa4ace05a9 100644
--- a/README.NEW-OUTPUT-API
+++ b/README.NEW-OUTPUT-API
@@ -8,98 +8,98 @@ API adjustment to the old output control code:
Checking output control layers status:
// Using OG()
- php_output_get_status(TSRMLS_C);
+ php_output_get_status();
Starting the default output handler:
- // php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
- php_output_start_default(TSRMLS_C);
+ // php_start_ob_buffer(NULL, 0, 1);
+ php_output_start_default();
Starting an user handler by zval:
- // php_start_ob_buffer(zhandler, chunk_size, erase TSRMLS_CC);
- php_output_start_user(zhandler, chunk_size, flags TSRMLS_CC);
+ // php_start_ob_buffer(zhandler, chunk_size, erase);
+ php_output_start_user(zhandler, chunk_size, flags);
Starting an internal handler whithout context:
- // php_ob_set_internal_handler(my_php_output_handler_func_t, buffer_size, "output handler name", erase TSRMLS_CC);
- php_output_start_internal(handler_name, handler_name_len, my_php_output_handler_func_t, chunk_size, flags TSRMLS_CC);
+ // php_ob_set_internal_handler(my_php_output_handler_func_t, buffer_size, "output handler name", erase);
+ php_output_start_internal(handler_name, handler_name_len, my_php_output_handler_func_t, chunk_size, flags);
Starting an internal handler with context:
// not possible with old API
php_output_handler *h;
- h = php_output_handler_create_internal(handler_name, handler_name_len, my_php_output_handler_context_func_t, chunk_size, flags TSRMLS_CC);
+ h = php_output_handler_create_internal(handler_name, handler_name_len, my_php_output_handler_context_func_t, chunk_size, flags);
php_output_handler_set_context(h, my_context, my_context_dtor);
- php_output_handler_start(h TSRMLS_CC);
+ php_output_handler_start(h);
Testing whether a certain output handler has already been started:
- // php_ob_handler_used("output handler name" TSRMLS_CC);
- php_output_handler_started(handler_name, handler_name_len TSRMLS_CC);
+ // php_ob_handler_used("output handler name");
+ php_output_handler_started(handler_name, handler_name_len);
Flushing one output buffer:
- // php_end_ob_buffer(1, 1 TSRMLS_CC);
- php_output_flush(TSRMLS_C);
+ // php_end_ob_buffer(1, 1);
+ php_output_flush();
Flushing all output buffers:
// not possible with old API
- php_output_flush_all(TSRMLS_C);
+ php_output_flush_all();
Cleaning one output buffer:
- // php_ob_end_buffer(0, 1 TSRMLS_CC);
- php_output_clean(TSRMLS_C);
+ // php_ob_end_buffer(0, 1);
+ php_output_clean();
Cleaning all output buffers:
// not possible with old API
- php_output_clean_all(TSRMLS_C);
+ php_output_clean_all();
Discarding one output buffer:
- // php_ob_end_buffer(0, 0 TSRMLS_CC);
- php_output_discard(TSRMLS_C);
+ // php_ob_end_buffer(0, 0);
+ php_output_discard();
Discarding all output buffers:
- // php_ob_end_buffers(0 TSRMLS_CC);
- php_output_discard_all(TSRMLS_C);
+ // php_ob_end_buffers(0);
+ php_output_discard_all();
Stopping (and dropping) one output buffer:
- // php_ob_end_buffer(1, 0 TSRMLS_CC)
- php_output_end(TSRMLS_C);
+ // php_ob_end_buffer(1, 0)
+ php_output_end();
Stopping (and dropping) all output buffers:
- // php_ob_end_buffers(1, 0 TSRMLS_CC);
- php_output_end_all(TSRMLS_C);
+ // php_ob_end_buffers(1, 0);
+ php_output_end_all();
Retrieving output buffers contents:
- // php_ob_get_buffer(zstring TSRMLS_CC);
- php_output_get_contents(zstring TSRMLS_CC);
+ // php_ob_get_buffer(zstring);
+ php_output_get_contents(zstring);
Retrieving output buffers length:
- // php_ob_get_length(zlength TSRMLS_CC);
- php_output_get_length(zlength TSRMLS_CC);
+ // php_ob_get_length(zlength);
+ php_output_get_length(zlength);
Retrieving output buffering level:
// OG(nesting_level);
- php_output_get_level(TSRMLS_C);
+ php_output_get_level();
Issue a warning because of an output handler conflict:
- // php_ob_init_conflict("to be started handler name", "to be tested if already started handler name" TSRMLS_CC);
- php_output_handler_conflict(new_handler_name, new_handler_name_len, set_handler_name, set_handler_name_len TSRMLS_CC);
+ // php_ob_init_conflict("to be started handler name", "to be tested if already started handler name");
+ php_output_handler_conflict(new_handler_name, new_handler_name_len, set_handler_name, set_handler_name_len);
Registering a conflict checking function, which will be checked prior starting the handler:
// not possible with old API, unless hardcoding into output.c
- php_output_handler_conflict_register(handler_name, handler_name_len, my_php_output_handler_conflict_check_t TSRMLS_CC);
+ php_output_handler_conflict_register(handler_name, handler_name_len, my_php_output_handler_conflict_check_t);
Registering a reverse conflict checking function, which will be checked prior starting the specified foreign handler:
// not possible with old API
- php_output_handler_reverse_conflict_register(foreign_handler_name, foreign_handler_name_len, my_php_output_handler_conflict_check_t TSRMLS_CC);
+ php_output_handler_reverse_conflict_register(foreign_handler_name, foreign_handler_name_len, my_php_output_handler_conflict_check_t);
Facilitating a context from within an output handler callable with ob_start():
// not possible with old API
- php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ, (void *) &custom_ctx_ptr_ptr TSRMLS_CC);
+ php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ, (void *) &custom_ctx_ptr_ptr);
Disabling of the output handler by itself:
//not possible with old API
- php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_DISABLE, NULL TSRMLS_CC);
+ php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_DISABLE, NULL);
Marking an output handler immutable by itself because of irreversibility of its operation:
// not possible with old API
- php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL TSRMLS_CC);
+ php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL);
Restarting the output handler because of a CLEAN operation:
// not possible with old API
diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API
index 097b4978a5..7f3da76f80 100644
--- a/README.PARAMETER_PARSING_API
+++ b/README.PARAMETER_PARSING_API
@@ -13,8 +13,8 @@ meaningful error messages.
Prototypes
----------
/* Implemented. */
-int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...);
-int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...);
+int zend_parse_parameters(int num_args, char *type_spec, ...);
+int zend_parse_parameters_ex(int flags, int num_args, char *type_spec, ...);
The zend_parse_parameters() function takes the number of parameters
passed to the extension function, the type specifier string, and the
@@ -30,7 +30,7 @@ resources cannot be auto-converted.
PHP 5.5 includes a new function:
-int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg, const char *spec, ...);
+int zend_parse_parameter(int flags, int arg_num, zval **arg, const char *spec, ...);
This function behaves like zend_parse_parameters_ex() except that instead of
reading the arguments from the stack, it receives a single zval to convert
@@ -63,10 +63,10 @@ Type specifiers
o - object of any type (zval*)
O - object of specific type given by class entry (zval*, zend_class_entry)
p - valid path (string without null bytes in the middle) and its length (char*, size_t)
- P - valid path (string without null bytes in the middle) as zend_string (zend_string)
+ P - valid path (string without null bytes in the middle) as zend_string (zend_string*)
r - resource (zval*)
s - string (with possible null bytes) and its length (char*, size_t)
- S - string (with possible null bytes) as zend_string (zend_string)
+ S - string (with possible null bytes) as zend_string (zend_string*)
z - the actual zval (zval*)
* - variable arguments list (0 or more)
+ - variable arguments list (1 or more)
@@ -97,11 +97,11 @@ Both mistakes might cause memory corruptions and segfaults:
1)
char *str;
long str_len; /* XXX THIS IS WRONG!! Use size_t instead. */
- zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len)
+ zend_parse_parameters(ZEND_NUM_ARGS(), "s", &str, &str_len)
2)
int num; /* XXX THIS IS WRONG!! Use zend_long instead. */
- zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &num)
+ zend_parse_parameters(ZEND_NUM_ARGS(), "l", &num)
If you're in doubt, use check_parameters.php script to the parameters
and their types (it can be found in ./scripts/dev/ directory of PHP sources):
@@ -116,7 +116,7 @@ zend_long l;
char *s;
size_t s_len;
zval *param;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "lsz",
&l, &s, &s_len, &param) == FAILURE) {
return;
}
@@ -126,7 +126,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
zval *obj;
double d = 0.5;
zend_class_entry *my_ce;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|d",
&obj, my_ce, &d) == FAILURE) {
return;
}
@@ -136,7 +136,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
If null is passed for object, obj will be set to NULL. */
zval *obj;
zval *arr;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a",
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "o!a",
&obj, &arr) == FAILURE) {
return;
}
@@ -144,7 +144,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a",
/* Gets a separated array which can also be null. */
zval *arr;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!",
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/!",
&arr) == FAILURE) {
return;
}
@@ -161,10 +161,10 @@ char *s;
*/
size_t length;
-if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
+if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
"lll", &l1, &l2, &l3) == SUCCESS) {
/* manipulate longs */
-} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
+} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
"s", &s, &length) == SUCCESS) {
/* manipulate string */
} else {
@@ -180,7 +180,7 @@ int i, num_varargs;
zval *varargs = NULL;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", &varargs, &num_varargs) == FAILURE) {
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "*", &varargs, &num_varargs) == FAILURE) {
return;
}
@@ -200,7 +200,7 @@ size_t str_len;
int i, num_varargs;
zval *varargs = NULL;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s+", &str, &str_len, &varargs, &num_varargs) == FAILURE) {
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "s+", &str, &str_len, &varargs, &num_varargs) == FAILURE) {
return;
}
@@ -214,7 +214,7 @@ zval *array;
int i, num_varargs;
zval *varargs = NULL;
-if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a*l", &array, &varargs, &num_varargs, &num) == FAILURE) {
+if (zend_parse_parameters(ZEND_NUM_ARGS(), "a*l", &array, &varargs, &num_varargs, &num) == FAILURE) {
return;
}
diff --git a/README.REDIST.BINS b/README.REDIST.BINS
index 968c3ec0c8..9779827534 100644
--- a/README.REDIST.BINS
+++ b/README.REDIST.BINS
@@ -5,17 +5,16 @@
5. ext/standard crypt
6. ext/standard crypt's blowfish implementation
7. Sqlite/Sqlite3 ext/sqlite3 ext/sqlite
-8. ext/json/json_parser
-9. ext/standard/rand
-10. ext/standard/scanf
-11. ext/standard/strnatcmp.c
-12. ext/standard/uuencode
-13. libxmlrpc ext/xmlrpc
-14. libzip ext/zip
-15. main/snprintf.c
-16. main/strlcat
-17. main/strlcpy
-18. libgd see ext/gd/libgd/COPYING
+8. ext/standard/rand
+9. ext/standard/scanf
+10. ext/standard/strnatcmp.c
+11. ext/standard/uuencode
+12. libxmlrpc ext/xmlrpc
+13. libzip ext/zip
+14. main/snprintf.c
+15. main/strlcat
+16. main/strlcpy
+17. libgd see ext/gd/libgd/COPYING
5. ext/standard crypt
@@ -104,31 +103,7 @@ a legal notice, here is a blessing:
May you share freely, never taking more than you give.
-8. ext/json/json_parser
-Copyright (c) 2005 JSON.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-The Software shall be used for Good, not Evil.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
-9. ext/standard/rand
+8. ext/standard/rand
The following php_mt_...() functions are based on a C++ class MTRand by
Richard J. Wagner. For more information see the web page at
http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html
@@ -181,7 +156,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-10. ext/standard/scanf
+9. ext/standard/scanf
scanf.c --
This file contains the base code which implements sscanf and by extension
@@ -227,7 +202,7 @@ authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.
-11. ext/standard/strnatcmp.c
+10. ext/standard/strnatcmp.c
strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
@@ -248,7 +223,7 @@ freely, subject to the following restrictions:
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-12. ext/standard/uuencode
+11. ext/standard/uuencode
Portions of this code are based on Berkeley's uuencode/uudecode
implementation.
@@ -284,7 +259,7 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-13. libxmlrpc ext/xmlrpc
+12. libxmlrpc ext/xmlrpc
Copyright 2000 Epinions, Inc.
@@ -308,7 +283,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING
NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH
DAMAGES.
-14. libzip ext/zip
+13. libzip ext/zip
zip.h -- exported declarations.
Copyright (C) 1999-2009 Dieter Baron and Thomas Klausner
@@ -340,7 +315,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-15. main/snprintf.c
+14. main/snprintf.c
Copyright (c) 2002, 2006 Todd C. Miller <Todd.Miller@courtesan.com>
Permission to use, copy, modify, and distribute this software for any
@@ -413,8 +388,8 @@ This code is based on, and used with the permission of, the
SIO stdio-replacement strx_* functions by Panos Tsirigotis
<panos@alumni.cs.colorado.edu> for xinetd.
-16. main/strlcat
-17. main/strlcpy
+15. main/strlcat
+16. main/strlcpy
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
All rights reserved.
diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS
index 227df6e920..3411ed903e 100644
--- a/README.RELEASE_PROCESS
+++ b/README.RELEASE_PROCESS
@@ -17,7 +17,7 @@ It is recommended to do so a couple of days before the packaging day, to
have enough time to investigate failures, communicate with the authors and
commit the fixes.
The RM for the branch is also responsible for keeping the CI green on
-ongoing bases between the releases. Check the CI status for your branch
+ongoing basis between the releases. Check the CI status for your branch
periodically and resolve the failures ASAP. See more in:
https://wiki.php.net/rfc/travis_ci
@@ -31,7 +31,7 @@ team (Bjori) on hand.
6. Verify the tags to be extra sure everything was tagged properly.
-7. Moving extensions from/to PECL requires write acces to the destination.
+7. Moving extensions from/to PECL requires write access to the destination.
Most developers should have this.
Moving extensions from php-src to PECL
@@ -271,8 +271,8 @@ to upgrade.
10. Wait an hour or two, then send a mail to php-announce@lists.php.net,
php-general@lists.php.net and internals@lists.php.net with a text similar to
http://news.php.net/php.internals/17222.
-Please make sure that the mail to php-announce@ is its own completely seperate email.
-This is to make sure that repiles to the announcement on php-general@ or internals@
+Please make sure that the mail to php-announce@ is its own completely separate email.
+This is to make sure that replies to the announcement on php-general@ or internals@
will not accidentally hit the php-announce@ mailinglist.
Re-releasing the same version (or -pl)
@@ -309,6 +309,6 @@ to upgrade.
5. Wait an hour or two, then send a mail to php-announce@lists.php.net,
php-general@lists.php.net and internals@lists.php.net with a text similar to
the news entry.
-Please make sure that the mail to php-announce@ is its own completely seperate email.
-This is to make sure that repiles to the announcement on php-general@ or internals@
+Please make sure that the mail to php-announce@ is its own completely separate email.
+This is to make sure that replies to the announcement on php-general@ or internals@
will not accidentally hit the php-announce@ mailinglist.
diff --git a/README.STREAMS b/README.STREAMS
index 0046e6a754..e95950bde0 100644
--- a/README.STREAMS
+++ b/README.STREAMS
@@ -28,7 +28,7 @@ The main functions are:
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
count);
-PHPAPI size_t php_stream_printf(php_stream * stream TSRMLS_DC,
+PHPAPI size_t php_stream_printf(php_stream * stream,
const char * fmt, ...);
PHPAPI int php_stream_eof(php_stream * stream);
PHPAPI int php_stream_getc(php_stream * stream);
@@ -47,7 +47,7 @@ Opening Streams
In most cases, you should use this API:
PHPAPI php_stream *php_stream_open_wrapper(const char *path, const char *mode,
- int options, char **opened_path TSRMLS_DC);
+ int options, char **opened_path);
Where:
path is the file or resource to open.
@@ -80,7 +80,7 @@ PHPAPI php_stream *php_stream_fopen_tmpfile(void);
Open a FILE * with tmpfile() and convert into a stream.
PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir,
- const char *pfx, char **opened_path TSRMLS_DC);
+ const char *pfx, char **opened_path);
Generate a temporary file name and open it.
There are some network enabled relatives in php_network.h:
diff --git a/README.input_filter b/README.input_filter
index 78e2edd2ec..be260013ac 100644
--- a/README.input_filter
+++ b/README.input_filter
@@ -138,7 +138,7 @@ SAPI_INPUT_FILTER_FUNC(my_sapi_input_filter)
strcpy(raw_var, "RAW_");
strlcat(raw_var,var,var_len+5);
- php_register_variable_ex(raw_var, &new_var, array_ptr TSRMLS_DC);
+ php_register_variable_ex(raw_var, &new_var, array_ptr);
php_strip_tags(*val, val_len, NULL, NULL, 0);
@@ -154,7 +154,7 @@ PHP_FUNCTION(my_get_raw)
zval **tmp;
zval *array_ptr = NULL;
- if(zend_parse_parameters(2 TSRMLS_CC, "ls", &arg, &var, &var_len) == FAILURE) {
+ if(zend_parse_parameters(2, "ls", &arg, &var, &var_len) == FAILURE) {
return;
}
diff --git a/README.md b/README.md
index 7618ffe383..074481b1c8 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Pull Requests
=============
PHP accepts pull requests via github. Discussions are done on github, but
depending on the topic can also be relayed to the official PHP developer
-mailinglist internals@lists.php.net.
+mailing list internals@lists.php.net.
New features require an RFC and must be accepted by the developers.
See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index 859b3fac01..f9bb241050 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -165,11 +165,13 @@ TSRM_API void *tsrm_get_ls_cache(void);
#define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_get_ls_cache()
-#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
+#define TSRMG(id, type, element) (TSRMG_BULK(id, type)->element)
+#define TSRMG_BULK(id, type) ((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)])
-#define TSRMG_STATIC(id, type, element) (((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
-#define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE
-#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL
+#define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element)
+#define TSRMG_BULK_STATIC(id, type) ((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)])
+#define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE;
+#define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL;
#if ZEND_DEBUG
#define TSRMLS_CACHE_UPDATE() TSRMLS_CACHE = tsrm_get_ls_cache()
#else
@@ -200,6 +202,8 @@ TSRM_API void *tsrm_get_ls_cache(void);
#define TSRMLS_CACHE_UPDATE()
#define TSRMLS_CACHE
+#define TSRM_TLS
+
/* BC only */
#define TSRMLS_D void
#define TSRMLS_DC
diff --git a/TSRM/m4/gethostbyname.m4 b/TSRM/m4/gethostbyname.m4
new file mode 100644
index 0000000000..ac3eb06018
--- /dev/null
+++ b/TSRM/m4/gethostbyname.m4
@@ -0,0 +1,197 @@
+# =================================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_func_which_gethostbyname_r.html
+# =================================================================================
+#
+# SYNOPSIS
+#
+# AX_FUNC_WHICH_GETHOSTBYNAME_R
+#
+# DESCRIPTION
+#
+# Determines which historical variant of the gethostbyname_r() call
+# (taking three, five, or six arguments) is available on the system and
+# defines one of the following macros accordingly:
+#
+# HAVE_FUNC_GETHOSTBYNAME_R_6
+# HAVE_FUNC_GETHOSTBYNAME_R_5
+# HAVE_FUNC_GETHOSTBYNAME_R_3
+#
+# as well as
+#
+# HAVE_GETHOSTBYNAME_R
+#
+# If used in conjunction with gethostname.c, the API demonstrated in
+# test.c can be used regardless of which gethostbyname_r() is available.
+# These example files can be found at
+# http://www.csn.ul.ie/~caolan/publink/gethostbyname_r
+#
+# based on David Arnold's autoconf suggestion in the threads faq
+#
+# Originally named "AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R". Rewritten for
+# Autoconf 2.5x, and updated for 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Caolan McNamara <caolan@skynet.ie>
+# Copyright (c) 2008 Daniel Richard G. <skunk@iskunk.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 7
+
+AC_DEFUN([AX_FUNC_WHICH_GETHOSTBYNAME_R], [
+
+ AC_LANG_PUSH([C])
+ AC_MSG_CHECKING([how many arguments gethostbyname_r() takes])
+
+ AC_CACHE_VAL([ac_cv_func_which_gethostbyname_r], [
+
+################################################################
+
+ac_cv_func_which_gethostbyname_r=unknown
+
+#
+# ONE ARGUMENT (sanity check)
+#
+
+# This should fail, as there is no variant of gethostbyname_r() that takes
+# a single argument. If it actually compiles, then we can assume that
+# netdb.h is not declaring the function, and the compiler is thereby
+# assuming an implicit prototype. In which case, we're out of luck.
+#
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
+ [
+ char *name = "www.gnu.org";
+ (void)gethostbyname_r(name) /* ; */
+ ])],
+ [ac_cv_func_which_gethostbyname_r=no])
+
+#
+# SIX ARGUMENTS
+# (e.g. Linux)
+#
+
+if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
+ [
+ char *name = "www.gnu.org";
+ struct hostent ret, *retp;
+ char buf@<:@1024@:>@;
+ int buflen = 1024;
+ int my_h_errno;
+ (void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
+ ])],
+ [ac_cv_func_which_gethostbyname_r=six])
+
+fi
+
+#
+# FIVE ARGUMENTS
+# (e.g. Solaris)
+#
+
+if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
+ [
+ char *name = "www.gnu.org";
+ struct hostent ret;
+ char buf@<:@1024@:>@;
+ int buflen = 1024;
+ int my_h_errno;
+ (void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
+ ])],
+ [ac_cv_func_which_gethostbyname_r=five])
+
+fi
+
+#
+# THREE ARGUMENTS
+# (e.g. AIX, HP-UX, Tru64)
+#
+
+if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
+ [
+ char *name = "www.gnu.org";
+ struct hostent ret;
+ struct hostent_data data;
+ (void)gethostbyname_r(name, &ret, &data) /* ; */
+ ])],
+ [ac_cv_func_which_gethostbyname_r=three])
+
+fi
+
+################################################################
+
+]) dnl end AC_CACHE_VAL
+
+case "$ac_cv_func_which_gethostbyname_r" in
+ three|five|six)
+ AC_DEFINE([HAVE_GETHOSTBYNAME_R], [1],
+ [Define to 1 if you have some form of gethostbyname_r().])
+ ;;
+esac
+
+case "$ac_cv_func_which_gethostbyname_r" in
+ three)
+ AC_MSG_RESULT([three])
+ AC_DEFINE([HAVE_FUNC_GETHOSTBYNAME_R_3], [1],
+ [Define to 1 if you have the three-argument form of gethostbyname_r().])
+ ;;
+
+ five)
+ AC_MSG_RESULT([five])
+ AC_DEFINE([HAVE_FUNC_GETHOSTBYNAME_R_5], [1],
+ [Define to 1 if you have the five-argument form of gethostbyname_r().])
+ ;;
+
+ six)
+ AC_MSG_RESULT([six])
+ AC_DEFINE([HAVE_FUNC_GETHOSTBYNAME_R_6], [1],
+ [Define to 1 if you have the six-argument form of gethostbyname_r().])
+ ;;
+
+ no)
+ AC_MSG_RESULT([cannot find function declaration in netdb.h])
+ ;;
+
+ unknown)
+ AC_MSG_RESULT([can't tell])
+ ;;
+
+ *)
+ AC_MSG_ERROR([internal error])
+ ;;
+esac
+
+AC_LANG_POP
+
+]) dnl end AC_DEFUN
+
diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4
index b53a4bb805..98aa2b8c91 100644
--- a/TSRM/tsrm.m4
+++ b/TSRM/tsrm.m4
@@ -1,3 +1,4 @@
+m4_include([TSRM/m4/gethostbyname.m4])
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
AC_DEFUN([TSRM_CHECK_GCC_ARG],[
@@ -32,6 +33,8 @@ AC_CHECK_HEADERS(stdarg.h)
AC_CHECK_FUNCS(sigprocmask)
+AX_FUNC_WHICH_GETHOSTBYNAME_R()
+
])
@@ -89,7 +92,6 @@ else
fi
])
-
AC_DEFUN([TSRM_THREADS_CHECKS],[
dnl For the thread implementations, we always use --with-*
diff --git a/TSRM/tsrm_nw.c b/TSRM/tsrm_nw.c
index 072d53a216..09f5ad3f29 100644
--- a/TSRM/tsrm_nw.c
+++ b/TSRM/tsrm_nw.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/TSRM/tsrm_nw.h b/TSRM/tsrm_nw.h
index 358696162a..d7bbee89b8 100644
--- a/TSRM/tsrm_nw.h
+++ b/TSRM/tsrm_nw.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index e596741680..6eba067c06 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -49,7 +49,7 @@ TSRMLS_CACHE_UPDATE();
globals->shm = NULL;
globals->process_size = 0;
globals->shm_size = 0;
- globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
+ globals->comspec = _strdup("cmd.exe");
/* Set it to INVALID_HANDLE_VALUE
* It will be initialized correctly in tsrm_win32_access or set to
@@ -437,6 +437,7 @@ static shm_pair *shm_get(int key, void *addr)
TWG(shm) = newptr;
ptr = newptr + TWG(shm_size);
TWG(shm_size)++;
+ memset(ptr, 0, sizeof(*ptr));
return ptr;
}
@@ -598,8 +599,8 @@ TSRM_API int shmget(int key, int size, int flags)
return -1;
}
- sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
- sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
+ snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
+ snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
@@ -611,6 +612,12 @@ TSRM_API int shmget(int key, int size, int flags)
created = TRUE;
}
if (!shm_handle || !info_handle) {
+ if (shm_handle) {
+ CloseHandle(shm_handle);
+ }
+ if (info_handle) {
+ CloseHandle(info_handle);
+ }
return -1;
}
} else {
@@ -620,6 +627,11 @@ TSRM_API int shmget(int key, int size, int flags)
}
shm = shm_get(key, NULL);
+ if (!shm) {
+ CloseHandle(shm_handle);
+ CloseHandle(info_handle);
+ return -1;
+ }
shm->segment = shm_handle;
shm->info = info_handle;
shm->descriptor = MapViewOfFileEx(shm->info, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h
index 8d8bcf109e..fbeac07b01 100644
--- a/TSRM/tsrm_win32.h
+++ b/TSRM/tsrm_win32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -72,7 +72,7 @@ typedef struct {
#ifdef ZTS
# define TWG(v) TSRMG_STATIC(win32_globals_id, tsrm_win32_globals *, v)
-TSRMLS_CACHE_EXTERN();
+TSRMLS_CACHE_EXTERN()
#else
# define TWG(v) (win32_globals.v)
#endif
diff --git a/UPGRADING b/UPGRADING
index 6ae9b52e99..30cf107525 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -1,6 +1,4 @@
-$Id$
-
-PHP X.Y UPGRADE NOTES
+PHP 7.1 UPGRADE NOTES
1. Backward Incompatible Changes
2. New Features
@@ -21,744 +19,157 @@ PHP X.Y UPGRADE NOTES
1. Backward Incompatible Changes
========================================
-Language changes
-================
-
-Changes to variable handling
-----------------------------
-
-* Indirect variable, property and method references are now interpreted with
- left-to-right semantics. Some examples:
-
- $$foo['bar']['baz'] // interpreted as ($$foo)['bar']['baz']
- $foo->$bar['baz'] // interpreted as ($foo->$bar)['baz']
- $foo->$bar['baz']() // interpreted as ($foo->$bar)['baz']()
- Foo::$bar['baz']() // interpreted as (Foo::$bar)['baz']()
-
- To restore the previous behavior add explicit curly braces:
-
- ${$foo['bar']['baz']}
- $foo->{$bar['baz']}
- $foo->{$bar['baz']}()
- Foo::{$bar['baz']}()
-
-* The global keyword now only accepts simple variables. Instead of
-
- global $$foo->bar;
-
- it is now required to write the following:
-
- global ${$foo->bar};
-
-* Parentheses around variables or function calls no longer have any influence
- on behavior. For example the following code, where the result of a function
- call is passed to a by-reference function
-
- function getArray() { return [1, 2, 3]; }
-
- $last = array_pop(getArray());
- // Strict Standards: Only variables should be passed by reference
- $last = array_pop((getArray()));
- // Strict Standards: Only variables should be passed by reference
-
- will now throw a strict standards error regardless of whether parentheses
- are used. Previously no notice was generated in the second case.
-
-* Array elements or object properties that are automatically created during
- by-reference assignments will now result in a different order. For example
-
- $array = [];
- $array["a"] =& $array["b"];
- $array["b"] = 1;
- var_dump($array);
-
- now results in the array ["a" => 1, "b" => 1], while previously the result
- was ["b" => 1, "a" => 1];
-
-Relevant RFCs:
-* https://wiki.php.net/rfc/uniform_variable_syntax
-* https://wiki.php.net/rfc/abstract_syntax_tree
-
-Changes to list()
------------------
-
-* list() will no longer assign variables in reverse order. For example
-
- list($array[], $array[], $array[]) = [1, 2, 3];
- var_dump($array);
-
- will now result in $array == [1, 2, 3] rather than [3, 2, 1]. Note that only
- the **order** of the assignments changed, but the assigned values stay the
- same. E.g. a normal usage like
-
- list($a, $b, $c) = [1, 2, 3];
- // $a = 1; $b = 2; $c = 3;
-
- will retain its current behavior.
-
-* Empty list() assignments are no longer allowed. As such all of the following
- are invalid:
-
- list() = $a;
- list(,,) = $a;
- list($x, list(), $y) = $a;
-
-* list() no longer supports unpacking strings (while previously this was only
- supported in some cases). The code
-
- $string = "xy";
- list($x, $y) = $string;
-
- will now result in $x == null and $y == null (without notices) instead of
- $x == "x" and $y == "y". Furthermore list() is now always guaranteed to
- work with objects implementing ArrayAccess, e.g.
-
- list($a, $b) = (object) new ArrayObject([0, 1]);
-
- will now result in $a == 0 and $b == 1. Previously both $a and $b were null.
-
-Relevant RFCs:
-* https://wiki.php.net/rfc/abstract_syntax_tree#changes_to_list
-* https://wiki.php.net/rfc/fix_list_behavior_inconsistency
-
-Changes to foreach
-------------------
-
-* Iteration with foreach() no longer has any effect on the internal array
- pointer, which can be accessed through the current()/next()/etc family of
- functions. For example
-
- $array = [0, 1, 2];
- foreach ($array as &$val) {
- var_dump(current($array));
- }
-
- will now print the value int(0) three times. Previously the output was int(1),
- int(2) and bool(false).
-
-* When iterating arrays by-value, foreach will now always operate on a copy of
- the array, as such changes to the array during iteration will not influence
- iteration behavior. For example
-
- $array = [0, 1, 2];
- $ref =& $array; // Necessary to trigger the old behavior
- foreach ($array as $val) {
- var_dump($val);
- unset($array[1]);
- }
-
- will now print all three elements (0 1 2), while previously the second element
- 1 was skipped (0 2).
-
-* When iterating arrays by-reference, modifications to the array will continue
- to influence the iteration. However PHP will now do a better job of
- maintaining a correct position in a number of cases. E.g. appending to an
- array during by-reference iteration
-
- $array = [0];
- foreach ($array as &$val) {
- var_dump($val);
- $array[1] = 1;
- }
-
- will now iterate over the appended element as well. As such the output of this
- example will now be "int(0) int(1)", while previously it was only "int(0)".
-
-* Iteration of plain (non-Traversable) objects by-value or by-reference will
- behave like by-reference iteration of arrays. This matches the previous
- behavior apart from the more accurate position management mentioned in the
- previous point.
-
-* Iteration of Traversable objects remains unchanged.
-
-Relevant RFC: https://wiki.php.net/rfc/php7_foreach
-
-Changes to parameter handling
------------------------------
-
-* It is no longer possible to define two function parameters with the same name.
- For example, the following method will trigger a compile-time error:
-
- public function foo($a, $b, $unused, $unused) {
- // ...
- }
-
- Code like this should be changed to use distinct parameter names, for example:
-
- public function foo($a, $b, $unused1, $unused2) {
- // ...
- }
-
-* The func_get_arg() and func_get_args() functions will no longer return the
- original value that was passed to a parameter and will instead provide the
- current value (which might have been modified). For example
-
- function foo($x) {
- $x++;
- var_dump(func_get_arg(0));
- }
- foo(1);
-
- will now print "2" instead of "1". This code should be changed to either
- perform modifications only after calling func_get_arg(s)
-
- function foo($x) {
- var_dump(func_get_arg(0));
- $x++;
- }
-
- or avoid modifying the parameters altogether:
-
- function foo($x) {
- $newX = $x + 1;
- var_dump(func_get_arg(0));
- }
-
-* Similarly exception backtraces will no longer display the original value that
- was passed to a function and show the modified value instead. For example
-
- function foo($x) {
- $x = 42;
- throw new Exception;
- }
- foo("string");
-
- will now result in the stack trace
-
- Stack trace:
- #0 file.php(4): foo(42)
- #1 {main}
-
- while previously it was:
-
- Stack trace:
- #0 file.php(4): foo('string')
- #1 {main}
-
- While this should not impact runtime behavior of your code, it is worthwhile
- to be aware of this difference for debugging purposes.
-
- The same limitation also applies to debug_backtrace() and other functions
- inspecting function arguments.
-
-Relevant RFC: https://wiki.php.net/phpng
-
-Changes to integer handling
----------------------------
-
-* Invalid octal literals (containing digits larger than 7) now produce compile
- errors. For example, the following is no longer valid:
-
- $i = 0781; // 8 is not a valid octal digit!
-
- Previously the invalid digits (and any following valid digits) were simply
- ignored. As such $i previously held the value 7, because the last two digits
- were silently discarded.
-
-* Bitwise shifts by negative numbers will now throw a warning and return false:
-
- var_dump(1 >> -1); // bool(false)
- // Warning: Bit shift by negative number
-
-* Left bitwise shifts by a number of bits beyond the bit width of an integer
- will always result in 0:
-
- var_dump(1 << 64); // int(0)
-
- Previously the behavior of this code was dependent on the used CPU
- architecture. For example on x86 (including x86-64) the result was int(1),
- because the shift operand was wrapped.
-
-* Similarly right bitwise shifts by a number of bits beyond the bit width of an
- integer will always result in 0 or -1 (depending on sign):
-
- var_dump(1 >> 64); // int(0)
- var_dump(-1 >> 64); // int(-1)
-
-Relevant RFC: https://wiki.php.net/rfc/integer_semantics
-
-Changes to string handling
---------------------------
-
-* Strings that contain hexadecimal numbers are no longer considered to be
- numeric and don't receive special treatment anymore. Some examples of the
- new behavior:
-
- var_dump("0x123" == "291"); // bool(false) (previously true)
- var_dump(is_numeric("0x123")); // bool(false) (previously true)
- var_dump("0xe" + "0x1"); // int(0) (previously 16)
-
- var_dump(substr("foo", "0x1")); // string(3) "foo" (previously "oo")
- // Notice: A non well formed numeric value encountered
-
- filter_var() can be used to check if a string contains a hexadecimal number
- or convert such a string into an integer:
-
- $str = "0xffff";
- $int = filter_var($str, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX);
- if (false === $int) {
- throw new Exception("Invalid integer!");
- }
- var_dump($int); // int(65535)
-
-* Due to the addition of the Unicode Codepoint Escape Syntax for double-quoted
- strings and heredocs, "\u{" followed by an invalid sequence will now result in
- an error:
-
- $str = "\u{xyz}"; // Fatal error: Invalid UTF-8 codepoint escape sequence
-
- To avoid this the leading backslash should be escaped:
-
- $str = "\\u{xyz}"; // Works fine
-
- However, "\u" without a following { is unaffected. As such the following code
- won't error and will work the same as before:
-
- $str = "\u202e"; // Works fine
-
-Relevant RFCs:
-* https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
-* https://wiki.php.net/rfc/unicode_escape
-
-Changes to error handling
--------------------------
-
-* There are now two exception classes: Exception and Error. Both classes
- implement a new interface Throwable. Type hints in exception handling code
- may need to be changed to account for this.
-
-* Some fatal errors and recoverable fatal errors now throw an Error instead.
- As Error is a separate class from Exception, these exceptions will not be
- caught by existing try/catch blocks.
-
- For the recoverable fatal errors which have been converted into an exception,
- it is no longer possible to silently ignore the error from an error handler.
- In particular, it is no longer possible to ignore type hint failures.
-
-* Parser errors now generate a ParseError that extends Error. Error
- handling for eval()s on potentially invalid code should be changed to catch
- ParseError in addition to the previous return value / error_get_last()
- based handling.
-
-* Constructors of internal classes will now always throw an exception on
- failure. Previously some constructors returned NULL or an unusable object.
-
-* The error level of some E_STRICT notices has been changed.
-
-Relevant RFCs:
-* https://wiki.php.net/rfc/engine_exceptions_for_php7
-* https://wiki.php.net/rfc/throwable-interface
-* https://wiki.php.net/rfc/internal_constructor_behaviour
-* https://wiki.php.net/rfc/reclassify_e_strict
-
-Other language changes
-----------------------
-
-* Removed support for static calls to non-static calls form an incompatible
- $this context. In this case $this will not be defined, but the call will be
- allowed with a deprecation notice. An example:
-
- class A {
- public function test() { var_dump($this); }
- }
-
- // Note: Does NOT extend A
- class B {
- public function callNonStaticMethodOfA() { A::test(); }
- }
-
- (new B)->callNonStaticMethodOfA();
-
- // Deprecated: Non-static method A::test() should not be called statically
- // Notice: Undefined variable $this
- NULL
-
- Note that this only applies to calls from an incompatible context. If class B
- extended from A the call would be allowed without any notices.
-
-* It is no longer possible to use the following class, interface and trait names
- (case-insensitive):
-
- bool
- int
- float
- string
- null
- false
- true
-
- This applies to class/interface/trait declarations, class_alias() and use
- statements.
-
- Furthermore the following class, interface and trait names are now reserved
- for future use, but do not yet throw an error when used:
-
- resource
- object
- mixed
- numeric
-
-* The yield language construct no longer requires parentheses when used in an
- expression context. It is now a right-associative operator with precedence
- between the "print" and "=>" operators. This can result in different behavior
- in some cases, for example:
-
- echo yield -1;
- // Was previously interpreted as
- echo (yield) - 1;
- // And is now interpreted as
- echo yield (-1);
-
- yield $foo or die;
- // Was previously interpreted as
- yield ($foo or die);
- // And is now interpreted as
- (yield $foo) or die;
-
- Such cases can always be resolved by adding additional parentheses.
-
- . Removed ASP (<%) and script (<script language=php>) tags.
- (RFC: https://wiki.php.net/rfc/remove_alternative_php_tags)
- . Removed support for assigning the result of new by reference.
- . Removed support for scoped calls to non-static methods from an incompatible
- $this context. See details in https://wiki.php.net/rfc/incompat_ctx.
- . Removed support for #-style comments in ini files. Use ;-style comments
- instead.
- . $HTTP_RAW_POST_DATA is no longer available. Use the php://input stream instead.
-
-Standard library changes
-========================
-
- . call_user_method() and call_user_method_array() no longer exists.
- . ob_start() no longer issues an E_ERROR, but instead an E_RECOVERABLE_ERROR in case an
- output buffer is created in an output buffer handler.
- . Improved zend_qsort(using hybrid sorting algo) for better performance,
- and also renamed zend_qsort to zend_sort.
- . Added stable sorting algo zend_insert_sort.
- . Removed dl() function on fpm-fcgi.
- . setcookie() with an empty cookie name now issues a WARNING and doesn't send an empty set-cookie header line anymore.
-
-Other
-=====
-
-- Curl:
- . Removed support for disabling the CURLOPT_SAFE_UPLOAD option. All curl file
- uploads must use the curl_file / CURLFile APIs.
-
-- Date:
- . Removed $is_dst parameter from mktime() and gmmktime().
-
-- DBA
- . dba_delete() now returns false if the key was not found for the inifile
- handler, too.
-
-- GMP
- . Requires libgmp version 4.2 or newer now.
- . gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making
- them consistent with other GMP functions.
-
-- Intl:
- . Removed deprecated aliases datefmt_set_timezone_id() and
- IntlDateFormatter::setTimeZoneID(). Use datefmt_set_timezone() and
- IntlDateFormatter::setTimeZone() instead.
-
-- libxml:
- . Added LIBXML_BIGLINES parser option. It's available starting with libxml 2.9.0
- and adds suppport for line numbers >16-bit in the error reporting.
-
-- Mcrypt
- . Removed deprecated mcrypt_generic_end() alias in favor of
- mcrypt_generic_deinit().
- . Removed deprecated mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb()
- functions in favor of mcrypt_encrypt() and mcrypt_decrypt() with an
- MCRYPT_MODE_* flag.
-
-- Session
- . session_start() accepts all INI settings as array. e.g. ['cache_limiter'=>'private']
- sets session.cache_limiter=private. It also supports 'read_and_close' which closes
- session data immediately after read data.
- . Save handler accepts validate_sid(), update_timestamp() which validates session
- ID existence, updates timestamp of session data. Compatibility of old user defined
- save handler is retained.
- . SessionUpdateTimestampHandlerInterface is added. validateSid(), updateTimestamp()
- is defined in the interface.
- . session.lazy_write(default=On) INI setting enables only write session data when
- session data is updated.
-
-- Opcache
- . Removed opcache.load_comments configuration directive. Now doc comments
- loading costs nothing and always enabled.
-
-- OpenSSL:
- . Removed the "rsa_key_size" SSL context option in favor of automatically
- setting the appropriate size given the negotiated crypto algorithm.
- . Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic
- detection or the "peer_name" option instead.
-
-- PCRE:
- . Removed support for /e (PREG_REPLACE_EVAL) modifier. Use
- preg_replace_callback() instead.
-
-- PDO_pgsql:
- . Removed PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute in favor of
- ATTR_EMULATE_PREPARES.
-
-- Standard:
- . Removed string category support in setlocale(). Use the LC_* constants
- instead.
- . Removed set_magic_quotes_runtime() and its alias magic_quotes_runtime().
+- Core:
+ . 'void' can no longer be used as the name of a class, interface, or trait.
+ This applies to declarations, class_alias() and use statements.
+ . (int), intval() where $base is 10 or unspecified, settype(), decbin(),
+ decoct(), dechex(), integer operators and other conversions now always
+ respect scientific notation in numeric strings.
+ (RFC: https://wiki.php.net/rfc/invalid_strings_in_arithmetic)
+ . The ASCII 0x7F Delete control character is no longer permitted in unquoted
+ identifiers in source code.
+ . The following functions may no longer be called dynamically using $func(),
+ call_user_func(), array_map() or similar:
+ . extract()
+ . compact()
+ . get_defined_vars()
+ . func_get_args()
+ . func_get_arg()
+ . func_num_args()
+ . parse_str() with one argument
+ . mb_parse_str() with one argument
+ . assert() with a string argument
+ (RFC: https://wiki.php.net/rfc/forbid_dynamic_scope_introspection)
+ . If the error_log is set to syslog, the PHP error levels are mapped to the
+ syslog error levels. This brings finer differentiation in the error logs
+ in contrary to the previous approach where all the errors are loggged with
+ the notice level only.
- JSON:
- . Rejected RFC 7159 incompatible number formats in json_decode string -
- top level (07, 0xff, .1, -.1) and all levels ([1.], [1.e1])
- . Calling json_decode with 1st argument equal to empty PHP string or value that
- after casting to string is empty string (NULL, FALSE) results in JSON syntax error.
-
-- Stream:
- . Removed set_socket_blocking() in favor of its alias stream_set_blocking().
-
-- XSL:
- . Removed xsl.security_prefs ini option. Use XsltProcessor::setSecurityPrefs()
- instead.
+ . When calling json_encode with JSON_UNESCAPED_UNICODE option, U+2028 and
+ U+2029 are escaped.
========================================
2. New Features
========================================
-
- Core
- . Added group use declarations.
- (RFC: https://wiki.php.net/rfc/group_use_declarations)
- . Added null coalesce operator (??).
- (RFC: https://wiki.php.net/rfc/isset_ternary)
- . Support for strings with length >= 2^31 bytes in 64 bit builds.
- . Closure::call() method added (works only with userland classes).
- . Added \u{xxxxxx} Unicode Codepoint Escape Syntax for double-quoted strings
- and heredocs.
- . define() now supports arrays as constant values, fixing an oversight where define() did not support arrays yet const syntax did.
- . Added the comparison operator (<=>), aka the spaceship operator.
- (RFC: https://wiki.php.net/rfc/combined-comparison-operator)
- . Added the yield from operator for delegating Generators like coroutines.
- (RFC: https://wiki.php.net/rfc/generator-delegation)
- . Reserved keywords can now be used in various new contexts.
- (RFC: https://wiki.php.net/rfc/context_sensitive_lexer)
- . Added support for scalar type declarations and strict mode using
- declare(strict_types=1) (RFC: https://wiki.php.net/rfc/scalar_type_hints_v5)
- . Added support for cryptographically secure user land RNG
- (RFC: https://wiki.php.net/rfc/easy_userland_csprng)
-
-- Opcache
- . Added second level file based opcode cache (experimental - disabled by
- default). To enable it, PHP should be configured and built with
- --enable-opcache-file, then opcache.file_cache=<DIR> configuration directive
- should be set in php.ini. The second level cache may improve performance
- at server restart or SHM reset. In addition, it's possibe to use file cache
- without SHM at all, using opcache.file_cache_only=1 (this may be useful for
- sharing hosting), and disable file cache consistency check, to speedup
- loading at the cost of safety, using opcache.file_cache_consistency_checks=0.
-
-- OpenSSL
- . Added "alpn_protocols" SSL context option allowing encrypted client/server
- streams to negotiate alternative protocols using the ALPN TLS extension when
- built against OpenSSL 1.0.2 or newer. Negotiated protocol information is
- accessible through stream_get_meta_data() output.
-
-- Reflection
- . Added a ReflectionGenerator class (yield from Traces, current file/line,
- etc.)
- . Added a ReflectionType class to better support the new return type and
- scalar type declarations features. The new ReflectionParameter::getType()
- and ReflectionFunctionAbstract::getReturnType() methods both return an
- instance of ReflectionType.
+ . Added void return type, which requires that a function not return a value.
+ (RFC: https://wiki.php.net/rfc/void_return_type)
+ . String offset access now supports negative references, which will be
+ counted from the end of the string.
+ (RFC: https://wiki.php.net/rfc/negative-string-offsets)
+ . Added a form of the list() construct where keys can be specified.
+ (RFC: https://wiki.php.net/rfc/list_keys)
+ . Added [] = as alternative construct to list() =.
+ (RFC: https://wiki.php.net/rfc/short_list_syntax)
+ . Number operators taking numeric strings now emit "A non well formed numeric
+ value encountered" E_NOTICEs for leading-numeric strings, and "A
+ non-numeric value encountered" E_WARNINGs for non-numeric strings.
+ This always applies to the +, -, *, /, **, %, << and >> operators, and
+ their assignment counterparts +=, -=, *=, /=, **=, %=, <<= and >>=.
+ For the bitwise operators |, & and ^, and their assignment counterparts
+ |=, &= and ^=, this only applies where only one operand is a string.
+ Note that this never applies to the bitwise NOT operator, ~, which does not
+ handle numeric strings, nor to the increment and decrement operators
+ ++ and --, which have a unique approach to handling numeric strings.
+ (RFC: https://wiki.php.net/rfc/invalid_strings_in_arithmetic)
========================================
3. Changes in SAPI modules
========================================
-- FPM
- . Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes).
- . Listen = port now listen on all addresses (IPv6 and IPv4-mapped).
-
========================================
4. Deprecated Functionality
========================================
-- Core
- . PHP 4 style constructors, where the constructor name is the same as the
- class name, are now deprecated.
- . Static calls to non-static methods are now deprecated.
-
-- OpenSSL
- . The "capture_session_meta" SSL context option is now deprecated. Meta
- data concerning active crypto on a stream resource is now accessible
- through the return result from stream_get_meta_data().
-
========================================
5. Changed Functions
========================================
-
-- parse_ini_file():
-- parse_ini_string():
- . Added scanner mode INI_SCANNER_TYPED to yield typed .ini values.
-- unserialize():
- . Added second parameter for unserialize function
- (RFC: https://wiki.php.net/rfc/secure_unserialize) allowing to specify
- acceptable classes:
- unserialize($foo, ["allowed_classes" => ["MyClass", "MyClass2"]]);
-
-- proc_open():
- . The maximum number of pipes used by proc_open() was previously limited by
- hardcoded value of 16. This limit is now removed and the number of pipes is
- effectively limited by the amount of memory available to PHP.
- . New Windows only configuration option "blocking_pipes" can be used to
- force blocking reads on child process pipes. This covers several
- edge cases in CLI usage however can lead to dead locks. Also, this
- correlates with the new stream context options for pipes.
-
-- array_column():
- The function now supports an array of objects as well as two-dimensional
- arrays. Only public properties are considered, and objects that make use of
- __get() for dynamic properties must also implement __isset().
-
-- stream_context_create()
- It accepts now a Windows only configuration
- array("pipe" => array("blocking" => <boolean>)) which forces blocking reads
- on pipes. This option should be used carefully because due to the
- platform restrictions dead locks on pipe buffers are possible.
+- get_headers() has an extra parameter which allows passing a custom stream
+ context.
+- The first $varname argument for getenv() is no longer mandatory, the
+ current environment variables will be returned as an associative array
+ when omitted.
+- json_encode() accepts new option JSON_UNESCAPED_LINE_TERMINATORS that
+ disables escaping of U+2028 and U+2029 characters when
+ JSON_UNESCAPED_UNICODE is supplied.
+- long2ip() accepts integer as parameter now
+- pg_last_notice() accepts optional long parameter to specify operation.
+ PGSQL_NOTICE_LAST - Get last notice (Default)
+ PGSQL_NOTICE_ALL - Get all stored notices
+ PGSQL_NOTICE_CLEAR - Remove all stored notices
+ It returns empty string or array on successful PGSQL_NOTICE_LAST/ALL calls.
+ It returned FALSE for empty notice previously.
+- pg_fetch_all() accepts 2nd optional result type parameter like
+ pg_fetch_row().
+- pg_select() accepts 4th optional result type parameter like pg_fetch_row().
+- parse_url() is more restrictive now and supports RFC3986.
+- unpack() accepts an additional optional $offset argument. '@' format code
+ (that specifes an absolute position) is applyed to input data after
+ the $offset argument.
+- strpos(), stripos(), substr_count(), grapheme_strpos(), grapheme_stripos(),
+ grapheme_extract(), iconv_strpos(), mb_strimwidth(), mb_ereg_search_setpos(),
+ mb_strpos() and mb_stripos() now accept negative string offsets.
+- substr_count() and mb_strimwidth() additionally also accept negative length.
+- file_get_contents() accepts a negative seek offset if the stream is seekable.
========================================
6. New Functions
========================================
-- GMP
- . Added gmp_random_seed().
-
-- PCRE:
- . Added preg_replace_callback_array function
- (RFC: https://wiki.php.net/rfc/preg_replace_callback_array)
-
-- Standard
- . Added intdiv() function for integer division.
- . Added error_clear_last() function to reset error state.
-
-- Zlib:
- . Added deflate_init(), deflate_add(), inflate_init(), inflate_add()
- functions allowing incremental/streaming compression/decompression.
========================================
7. New Classes and Interfaces
========================================
-
========================================
8. Removed Extensions and SAPIs
========================================
-- sapi/aolserver
-- sapi/apache
-- sapi/apache_hooks
-- sapi/apache2filter
-- sapi/caudium
-- sapi/continuity
-- sapi/isapi
-- sapi/milter
-- sapi/nsapi
-- sapi/phttpd
-- sapi/pi3web
-- sapi/roxen
-- sapi/thttpd
-- sapi/tux
-- sapi/webjames
-- ext/mssql
-- ext/mysql
-- ext/sybase_ct
-- ext/ereg
-
-For more details see
-
-https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts
-https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7
-
-NOTE: NSAPI was not voted in the RFC, however it was removed afterwards. It turned
-out, that the corresponding SDK isn't available anymore.
-
========================================
9. Other Changes to Extensions
========================================
-
-- Mhash
- Mhash is not an extension anymore, use function_exists("mhash") to check whether
- it is avaliable.
+- SQLite3:
+ . Upgraded bundled SQLite lib to 3.9.2
========================================
10. New Global Constants
========================================
-- Core
- . PHP_INT_MIN added.
-
-- Zlib
- . These constants are added to control flush behavior with the new
- incremental deflate_add() and inflate_add() functions:
- . ZLIB_NO_FLUSH
- . ZLIB_PARTIAL_FLUSH
- . ZLIB_SYNC_FLUSH
- . ZLIB_FULL_FLUSH
- . ZLIB_BLOCK
- . ZLIB_FINISH
-
-- GD
- . T1Lib support removed, thus lifting the optional dependency on T1Lib, the
- following is therefore not available anymore:
-
- Functions:
- - imagepsbbox()
- - imagepsencodefont()
- - imagepsextendedfont()
- - imagepsfreefont()
- - imagepsloadfont()
- - imagepsslantfont()
- - imagepstext()
+- JSON:
+ . JSON_UNESCAPED_LINE_TERMINATORS
- Resources:
- - 'gd PS font'
- - 'gd PS encoding'
+- Pgsql:
+ PGSQL_NOTICE_LAST
+ PGSQL_NOTICE_ALL
+ PGSQL_NOTICE_CLEAR
========================================
11. Changes to INI File Handling
========================================
-- Core
- . Removed asp_tags ini directive. Trying to enable it will result in a fatal
- error.
- . Removed always_populate_raw_post_data ini directive.
-
========================================
12. Windows Support
========================================
-- Core
- . Support for native 64 bit integers in 64 bit builds.
- . Support for large files in 64 bit builds.
- . Support for getrusage()
+- Core:
+ . Support for ftok()
-- ftp
- . The ftp extension is always shipped shared
- . For SSL support, the dependency on the openssl extension was abolished. Instead
- it depends alone on the openssl library. If it's present at the compile time,
- ftp_ssl_connect() is enabled automatically.
+- FCGI
+ . PHP_FCGI_CHILDREN is respected. If this environment variable is defined,
+ the first php-fcgi.exe process will exec the specified number of children.
+ Those will share the same TCP socket.
-- odbc
- . The odbc extension is always shipped shared
+- readline:
+ . The readline extension is supported through the WinEditLine library
+ (http://mingweditline.sourceforge.net/). Thereby, the interactive CLI
+ shell is supported as well (php.exe -a).
+
+ It is well known, but nevertheless is worth mentioning again, that
+ the readline extension is not thread safe and will never be. Thus,
+ the usage of it with any true thread safe SAPI (like Apache mod_winnt) is
+ strongely discouraged.
========================================
13. Other Changes
========================================
-- Core
- . Instead of being undefined and platform-dependent, NaN and Infinity will
- always be zero when cast to integer.
- . Calling a method on a non-object now raises a catchable error instead of a
- fatal error; see: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object
- . Error messages for zend_parse_parameters, type hints and conversions now
- always say "integer" and "float" instead of "long" and "double".
- . Output buffering now continues to work for an aborted connection if
- ignore_user_abort is set to true.
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index ce97cba0a1..6e30f7cad8 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -1,26 +1,7 @@
-$Id$
-
-PHP 7.0 INTERNALS UPGRADE NOTES
+PHP 7.1 INTERNALS UPGRADE NOTES
0. Wiki Examples
1. Internal API changes
- e. New data types
- f. zend_parse_parameters() specs
- g. sprintf() formats
- h. HashTable API
- i. New portable macros for large file support
- j. New portable macros for integers
- k. get_class_entry object handler info
- l. get_class_name object handler info
- m. Other portable macros info
- n. ZEND_ENGINE_2 removal
- o. Updated final class modifier
- p. TSRM changes
- q. gc_collect_cycles() is now hookable
- r. PDO uses size_t for lengths
- s. Resource API changes
- t. Optimized strings concatenation.
- u. Streams changes
2. Build system changes
a. Unix build system changes
@@ -40,185 +21,6 @@ changes. See: https://wiki.php.net/phpng-upgrading
1. Internal API changes
========================
- e. New data types
-
- String
-
- Besides the old way of accepting the strings with 's', the new 'S' ZPP spec
- was introduced. It expects an argument of the type zend_string *. String lengths
- in it are bound to the size_t datatype.
-
- Integer types
-
- Integers do no more depend on the firm 'long' type. Instead a platform
- dependent integer type is used, it is called zend_long. That datatype is
- defined dynamically to guarantee the consistent 64 bit support. The zval
- field representing user land integer it bound to zend_long.
-
- Signed integer is defined as zend_long, unsigned integer as zend_ulong
- inside Zend.
-
- Other datatypes
-
- zend_off_t - portable off_t analogue
- zend_stat_t - portable 'struct stat' analogue
-
- These datatypes are declared to be portable across platforms. Thus, direct
- usage of the functions like fseek, stat, etc. as well as direct usage of
- off_t and struct stat is strongly not recommended. Instead the portable
- macros should be used.
-
- zend_fseek - portable fseek equivalent
- zend_ftell - portable ftell equivalent
- zend_lseek - portable lseek equivalent
- zend_fstat - portable fstat equivalent
- zend_stat - portable stat equivalent
-
- f. zend_parse_parameters() specs
-
- The new spec 'S' introduced, which expects an argument of type zend_string *.
- The 'l' spec expects a parameter of the type zend_long, not long anymore.
- The 's' spec expects parameters of the type char * and size_t, no int anymore.
-
- g. sprintf() formats
-
- New printf modifier 'p' was implemented to platform independently output zend_long,
- zend_ulong and php_size_t datatypes. That modifier can be used with 'd', 'u', 'x' and 'o'
- printf format specs with spprintf, snprintf and the wrapping printf implementations.
- %pu is sufficient for both zend_ulong and php_size_t. the code using %p spec to output
- pointer address might need to be enclosed into #ifdef when it unlickily followed by 'd',
- 'u', 'x' or 'o'.
-
- The only exceptions are the snprintf and zend_sprintf functions yet, because in some cases
- they can use the implemenations available on the system, not the PHP one. With snprintf the
- macros ZEND_INT_FMT and ZEND_UINT_FMT should be used.
-
- h. HashTable API
-
- Datatype for array indexes was changed to zend_ulong, for string keys to zend_string *.
-
- i. New portable macros for large file support
-
- Function(s) Alias Comment
- stat, _stat64 zend_stat for use with zend_stat_t
- fstat, _fstat64 zend_fstat for use with zend_stat_t
- lseek, _lseeki64 zend_lseek for use with zend_off_t
- ftell, _ftelli64 zend_ftell for use with zend_off_t
- fseek, _fseeki64 zend_fseek for use with zend_off_t
-
- j. New portable macros for integers
-
- Function(s) Alias Comment
- snprintf with "%ld" or "%lld", _ltoa_s, _i64toa_s ZEND_LTOA for use with zend_long
- atol, atoll, _atoi64 ZEND_ATOL for use with zend_long
- strtol, strtoll, _strtoi64 ZEND_STRTOL for use with zend_long
- strtoul, strtoull, _strtoui64 ZEND_STRTOUL for use with zend_long
- abs, llabs, _abs64 ZEND_ABS for use with zend_long
- - ZEND_LONG_MAX replaces LONG_MAX where appropriate
- - ZEND_LONG_MIN replaces LONG_MIN where appropriate
- - ZEND_ULONG_MAX replaces ULONG_MAX where appropriate
- - SIZEOF_ZEND_LONG reworked SIZEOF_ZEND_LONG representing the size of zend_long datatype
- - ZEND_SIZE_MAX Max value of size_t
- - Z_L casts an integral constant to zend_long
- - Z_UL casts an integral constant to zend_ulong
-
- The macro ZEND_ENABLE_ZVAL_LONG64 reveals whether zval operates on 64 or 32 bit integer.
-
- k. The get_class_entry object handler is no longer available. Instead
- zend_object.ce is always used.
-
- l. The get_class_name object handler is now only used for displaying class
- names in debugging functions like var_dump(). It is no longer used in
- get_class(), get_parent_class() or similar.
-
- The handler is now obligatory, no longer accepts a `parent` argument and
- must return a non-NULL zend_string*, which will be released by the caller.
-
- m. Other portable macros info
-
- ZEND_SECURE_ZERO - zeroes chunk of memory
- ZEND_VALID_SOCKET - validates a php_socket_t variable
-
- ZEND_FASTCALL is defined to use __vectorcall convention on VS2013 and above
- ZEND_NORETURN is defined as __declspec(noreturn) on VS
-
- n. The ZEND_ENGINE_2 macro has been removed. A ZEND_ENGINE_3 macro has been added.
-
- o. Removed ZEND_ACC_FINAL_CLASS in favour of ZEND_ACC_FINAL, turning final class
- modifier now a different class entry flag. Update your extensions.
-
- p. TSRM changes
-
- The TSRM layer undergone significant changes. It is not necessary anymore to
- pass the tsrm_ls pointer explicitly. The TSRMLS_* macros should not be used
- in any new developments.
-
- The recommended way accessing globals in TS builds is by implementing it
- to use a local thread unique pointer to the corresponding data pool. These
- are the new macros that serve to achieve this goal:
-
- - ZEND_TSRMG - based on TSRMG and if static pointer for data pool access is
- implemented, will use it
- - ZEND_TSRMLS_CACHE_EXTERN - to be used in a header shared across multiple
- C/C++ files
- - ZEND_TSRMLS_CACHE_DEFINE - to be used in the main extension C/C++ file
- - ZEND_TSRMLS_CACHE_UPDATE - to be integrated at the top of the globals
- ctor or RINIT function
- - ZEND_ENABLE_STATIC_TSRMLS_CACHE - to be used in the config.[m4|w32] for
- enabling the globals access per thread unique pointer
- - TSRMLS_CACHE - expands to the variable name which links to the thread
- unique data pool
-
- Note that usually it will work without implementing the globals access per
- a thread unique pointer, however it might cause a slowdown. The reason is
- that the access model to the extension/SAPI own globals as well as the
- access to the core globals is determined in the compilation phase depending
- on whether ZEND_ENABLE_STATIC_TSRMLS_CACHE macro is defined.
-
- Due to the current compiler evolution state, the TSRMLS_CACHE pointer
- (when implemented) has to be present and updated in every binary unit which
- is not compiled statically into PHP. So any DLL, DSO, EXE, etc. has to take
- care about defining and updating it's TSRMLS cache. An update should happen
- before any globals was accessed.
-
- Porting an extension or SAPI is usually as easy as removing all the TSRMLS_*
- occurrences and integrating the macros mentioned above. However if tsrm_ls
- is used explicitly, its usage can be considered obsolete in most cases.
- Additionally, if an extension triggers its own threads, TSRMLS_CACHE shouldn't
- be passed to that threads directly.
-
- When working with CTOR/DTOR for the extension globals, only the data passed
- as parameters should be touched. For example, don't use code like
- free(MYEXT_G(vars)); inside globals destructor, as it possibly can destroy
- the data from a wrong thread. Instead use the pointer to the data delivered
- into the destructor. So the previous example could look like
- free(my_struct->vars); given the income was casted to (struct my_struct *).
-
- q. gc_collect_cycles() is now a function pointer, and can be replaced in the
- same manner as zend_execute_ex() if needed (for example, to include the
- time spent in the garbage collector in a profiler). The default
- implementation has been renamed to zend_gc_collect_cycles(), and is
- exported with ZEND_API.
-
- r. In accordance with general use of size_t as string length, all PDO API
- functions now use size_t for string length.
-
- s. Removed ZEND_REGISTER/FETCH_RESOURCE, use zend_fetch_resource and
- and zend_register_resource instead, zend_fetch_resource accepts a zend_resource *
- as first argument, if you still need to fetch a resource from zval, use
- zend_fetch_resource_ex. More details can be found in Zend/zend_list.c.
-
- t. Optimized strings concatenation.
- ZEND_ADD_STRING/VAR/CHAR are replaced with ZEND_ROPE_INIT, ZEND_ROPE_ADD,
- ZEND_ROPE_END.
- Instead of reallocation and copying string on each ZEND_ADD_STRING/VAR/CAHR,
- collect all the strings and then allocate and construct the resulting string once.
-
- u. Streams changes
- - It is possible to do blocking reads on Windows pipes. It can be done either
- using context stream option PHP_STREAM_OPTION_PIPE_BLOCKING or
- adding STREAM_USE_BLOCKING_PIPE when opening the stream.
-
========================
2. Build system changes
========================
@@ -227,65 +29,7 @@ changes. See: https://wiki.php.net/phpng-upgrading
b. Windows build system changes
- - Besides Visual Studio, building with Clang or Intel Composer is now
- possible. To enable an alternative toolset, add the option
- --with-toolset=[vs,clang,icc] to the configure line. The default
- toolset is vs. Still clang or icc need the correct environment
- which involves many tools from the vs toolset.
-
- The toolset option is supported by phpize as well.
-
- AWARENESS The only recommended and supported toolset to produce production
- ready binaries is Visual Studio. Still other compilers can be used now for
- testing and analyzing purposes.
-
- - configure.js now produces response files which are passed to the linker
- and library manager. This solves the issues with the long command lines
- which can exceed the OS limit.
-
- - with clang toolset, an option --with-uncritical-warn-choke is available,
- which suppresses the most frequent false positive warnings
-
- - the --with-mp option will by default utilize all the available cores. It's
- enabled by default for release builds and can be disabled with the special
- "disable" keyword.
-
========================
3. Module changes
========================
- Session:
-
- - PS_MOD_UPDATE_TIMESTAMP() session save handler definition is added. New
- save handler should use PS_MOD_UPDATE_TIMESTAMP() definition. Save handler
- must not refer/change PS() variables directly from save handler. Use
- parameters.
- - PS_MOD()/PS_MOD_SID() macro exist only for transition. Beware these
- save handlers are less secure and slower than PS_MOD_UPDATE_TIMESTAMP().
- - PS(invalid_session_id) was removed. It was never worked as it supposed.
- To report invalid session ID, use PS_VALIDATE_SID() handler.
- - PS_VALIDATE_SID() defines session ID validation handler. This handler
- must validate if requested session ID exists in session data storage or not.
- Do not access PS(id) directly, but use this handler and it's parameter.
- - PS_UPDATE_TIMESTAMP() defines timestamp updating handler. This handler
- must update session data timestamp for GC if it is needed. e.g. Memcache
- updates timestamp on read, so it does not need to update timestamp. Return
- SUCCESS simply for this case.
- - PS_CREATE_SID() should check session ID collision. Return NULL for failure.
- - More documentation can be found in ext/session/mod_files.c as comments.
- mod_files.c may be used as reference implementation.
-
- Openssl:
- - several ext/openssl functions require the inclusion of the applink shim
- as documented in the OpenSSL FAQ https://www.openssl.org/support/faq.html#PROG2
- to properly work on Windows. While this primarily affects the OpenSSL
- functionality, the shim needs to be included into the executable file
- which loads the extension DLL, not into the extension DLL itself. Alternatively
- it can be compiled and linked with the main program as a separate object file.
- More information and explanation in the linked OpenSSL FAQ.
-
- Thus, this primarily affects any WAMP or other redistributions bundling the
- official PHP release zipballs or building from sources. The applink shim is
- already integrated with all the PHP executables from the official distribution
- starting with 7.0.0beta1.
-
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 6104dc0bc9..bdeac672b4 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -421,7 +421,6 @@ AC_ARG_ENABLE(gcc-global-regs,
AC_MSG_CHECKING(for global register variables support)
if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
AC_TRY_COMPILE([
- ],[
#if defined(__GNUC__)
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#else
@@ -436,6 +435,9 @@ if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
#elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__powerpc64__)
# define ZEND_VM_FP_GLOBAL_REG "r28"
# define ZEND_VM_IP_GLOBAL_REG "r29"
+#elif defined(__IBMC__) && ZEND_GCC_VERSION >= 4002 && defined(__powerpc64__)
+# define ZEND_VM_FP_GLOBAL_REG "r28"
+# define ZEND_VM_IP_GLOBAL_REG "r29"
#else
# error "global register variables are not supported"
#endif
@@ -452,6 +454,7 @@ int emu(const opcode_handler_t *ip, void *fp) {
IP = orig_ip;
}
], [
+ ], [
ZEND_GCC_GLOBAL_REGS=yes
], [
ZEND_GCC_GLOBAL_REGS=no
diff --git a/Zend/tests/ArrayAccess_indirect_append.phpt b/Zend/tests/ArrayAccess_indirect_append.phpt
new file mode 100644
index 0000000000..6f3da7c46c
--- /dev/null
+++ b/Zend/tests/ArrayAccess_indirect_append.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Using indirect append on ArrayAccess object
+--FILE--
+<?php
+
+class AA implements ArrayAccess {
+ private $data = [];
+ public function &offsetGet($name) {
+ if (null === $name) {
+ return $this->data[];
+ } else {
+ return $this->data[$name];
+ }
+ }
+ public function offsetSet($name, $value) {
+ $this->data[$name] = $value;
+ }
+ public function offsetUnset($name) {}
+ public function offsetExists($name) {}
+}
+
+$aa = new AA;
+$aa[3] = 1;
+$aa[][][0] = 2;
+var_dump($aa);
+
+?>
+--EXPECT--
+object(AA)#1 (1) {
+ ["data":"AA":private]=>
+ array(2) {
+ [3]=>
+ int(1)
+ [4]=>
+ array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ int(2)
+ }
+ }
+ }
+}
diff --git a/Zend/tests/add_006.phpt b/Zend/tests/add_006.phpt
index d56df2f329..fe1c0830e2 100644
--- a/Zend/tests/add_006.phpt
+++ b/Zend/tests/add_006.phpt
@@ -38,11 +38,19 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
+
+Warning: A non-numeric value encountered in %s on line %d
int(75636)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(951858)
int(48550510)
float(75661.68)
+
+Warning: A non-numeric value encountered in %s on line %d
int(75636)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(951858)
int(48550510)
float(75661.68)
diff --git a/Zend/tests/add_007.phpt b/Zend/tests/add_007.phpt
index 66f5405706..089b24ae0b 100644
--- a/Zend/tests/add_007.phpt
+++ b/Zend/tests/add_007.phpt
@@ -19,8 +19,13 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
+
+Warning: A non-numeric value encountered in %s on line %d
+
Exception: Unsupported operand types
+Warning: A non-numeric value encountered in %s on line %d
+
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
diff --git a/Zend/tests/anon/011.phpt b/Zend/tests/anon/011.phpt
new file mode 100644
index 0000000000..0d16c874e8
--- /dev/null
+++ b/Zend/tests/anon/011.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Ensure proper inheritance with get_class(anon class instance) used via class_alias (see also bug #70106)
+--FILE--
+<?php
+
+class_alias(get_class(new class { protected $foo = 1; }), "AnonBase");
+var_dump((new class extends AnonBase {
+ function getFoo() {
+ return $this->foo;
+ }
+})->getFoo());
+?>
+--EXPECT--
+int(1)
diff --git a/Zend/tests/anon/012.phpt b/Zend/tests/anon/012.phpt
new file mode 100644
index 0000000000..d82f237c1c
--- /dev/null
+++ b/Zend/tests/anon/012.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Ensure correct unmangling of private property names for anonymous class instances
+--FILE--
+<?php
+var_dump(new class { private $foo; });
+?>
+--EXPECT--
+object(class@anonymous)#1 (1) {
+ ["foo":"class@anonymous":private]=>
+ NULL
+}
diff --git a/Zend/tests/anon/013.phpt b/Zend/tests/anon/013.phpt
new file mode 100644
index 0000000000..72ba3d61b7
--- /dev/null
+++ b/Zend/tests/anon/013.phpt
@@ -0,0 +1,15 @@
+--TEST--
+closure binding to anonymous class
+--FILE--
+<?php
+$class = new class {};
+$foo = function() {
+ return $this;
+};
+
+$closure = Closure::bind($foo, $class, $class);
+var_dump($closure());
+?>
+--EXPECTF--
+object(class@anonymous)#1 (0) {
+}
diff --git a/Zend/tests/anon/014.phpt b/Zend/tests/anon/014.phpt
new file mode 100644
index 0000000000..cacac47857
--- /dev/null
+++ b/Zend/tests/anon/014.phpt
@@ -0,0 +1,16 @@
+--TEST--
+anonymous class trait binding
+--FILE--
+<?php
+trait TaskTrait {
+ function run() {
+ return 'Running...';
+ }
+}
+$class = new class() {
+ use TaskTrait;
+};
+var_dump($class->run());
+?>
+--EXPECTF--
+string(10) "Running..."
diff --git a/Zend/tests/arg_unpack/by_ref_separation.phpt b/Zend/tests/arg_unpack/by_ref_separation.phpt
new file mode 100644
index 0000000000..b52c28168a
--- /dev/null
+++ b/Zend/tests/arg_unpack/by_ref_separation.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Array must be separated if unpacking by reference
+--FILE--
+<?php
+
+function inc(&... $args) {
+ foreach ($args as &$arg) {
+ $arg++;
+ }
+}
+
+$arr = [1, 2];
+$arr[] = 3;
+$arr2 = $arr;
+inc(...$arr);
+var_dump($arr);
+var_dump($arr2);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+ [2]=>
+ int(4)
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
diff --git a/Zend/tests/array_addition_not_commutative.phpt b/Zend/tests/array_addition_not_commutative.phpt
new file mode 100644
index 0000000000..f4e534231e
--- /dev/null
+++ b/Zend/tests/array_addition_not_commutative.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Array addition is not commutative -- do not swap operands
+--FILE--
+<?php
+
+$array = [1, 2, 3];
+$array = [4, 5, 6] + $array;
+var_dump($array);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(4)
+ [1]=>
+ int(5)
+ [2]=>
+ int(6)
+}
diff --git a/Zend/tests/assert/bug70208.phpt b/Zend/tests/assert/bug70208.phpt
new file mode 100644
index 0000000000..ec9325334c
--- /dev/null
+++ b/Zend/tests/assert/bug70208.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #70208 (scope information must be preserved with assert())
+--FILE--
+<?php
+
+function non_class_scope() {
+ return true;
+}
+
+class test {
+ protected $prop = 1;
+
+ public function __construct() {
+ assert('non_class_scope();');
+ var_dump($this->prop);
+ }
+}
+
+new test;
+
+?>
+--EXPECT--
+int(1)
diff --git a/Zend/tests/assert/bug70528.phpt b/Zend/tests/assert/bug70528.phpt
new file mode 100644
index 0000000000..1b5803859c
--- /dev/null
+++ b/Zend/tests/assert/bug70528.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #70528 (assert() with instanceof adds apostrophes around class name)
+--INI--
+zend.assertions=1
+assert.exception=0
+assert.warning=1
+--FILE--
+<?php
+
+namespace Foo;
+class Bar {}
+
+$bar = "Bar";
+assert(new \stdClass instanceof $bar);
+assert(new \stdClass instanceof Bar);
+assert(new \stdClass instanceof \Foo\Bar);
+?>
+--EXPECTF--
+Warning: assert(): assert(new \stdClass() instanceof $bar) failed in %sbug70528.php on line %d
+
+Warning: assert(): assert(new \stdClass() instanceof Bar) failed in %sbug70528.php on line %d
+
+Warning: assert(): assert(new \stdClass() instanceof \Foo\Bar) failed in %sbug70528.php on line %d
diff --git a/Zend/tests/assert/expect_015.phpt b/Zend/tests/assert/expect_015.phpt
index 030913f7f9..0c53c75c4d 100644
--- a/Zend/tests/assert/expect_015.phpt
+++ b/Zend/tests/assert/expect_015.phpt
@@ -154,7 +154,7 @@ Warning: assert(): assert(0 && ($a = function () {
$x = $a ? $b : $c;
$x = $a ?: $c;
$x = $a ?? $b;
- list($a, $b, $c) = [1, 2 => 'x', 'z' => 'c'];
+ [$a, $b, $c] = [1, 2 => 'x', 'z' => 'c'];
@foo();
$y = clone $x;
yield 1 => 2;
diff --git a/Zend/tests/assert/expect_016.phpt b/Zend/tests/assert/expect_016.phpt
index 84e71ff47b..4d474350b3 100644
--- a/Zend/tests/assert/expect_016.phpt
+++ b/Zend/tests/assert/expect_016.phpt
@@ -18,7 +18,7 @@ bool(true)
bool(true)
Warning: assert(): assert(false) failed in %sexpect_016.php on line 6
-NULL
+bool(false)
bool(true)
Warning: zend.assertions may be completely enabled or disabled only in php.ini in %sexpect_016.php on line 8
diff --git a/Zend/tests/assert/expect_018.phpt b/Zend/tests/assert/expect_018.phpt
index 0c9b9fe40f..18c31bbae6 100644
--- a/Zend/tests/assert/expect_018.phpt
+++ b/Zend/tests/assert/expect_018.phpt
@@ -25,9 +25,9 @@ bool(true)
bool(true)
Warning: assert(): assert(false) failed in %sexpect_018.php on line 10
-NULL
+bool(false)
bool(true)
Warning: assert(): assert(false) failed in %sexpect_018.php on line 12
-NULL
+bool(false)
bool(true)
diff --git a/Zend/tests/assert/expect_empty_stmt_bug.phpt b/Zend/tests/assert/expect_empty_stmt_bug.phpt
new file mode 100644
index 0000000000..f5dcff3ba5
--- /dev/null
+++ b/Zend/tests/assert/expect_empty_stmt_bug.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Empty statement in assert() shouldn't segfault
+--FILE--
+<?php
+
+assert((function () { return true;; })());
+echo "ok";
+
+?>
+--EXPECT--
+ok
diff --git a/Zend/tests/assert/indirect_var_access_misoptimization.phpt b/Zend/tests/assert/indirect_var_access_misoptimization.phpt
new file mode 100644
index 0000000000..61c193ab60
--- /dev/null
+++ b/Zend/tests/assert/indirect_var_access_misoptimization.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Misoptimization when variable is modified by assert()
+--INI--
+zend.assertions=1
+--FILE--
+<?php
+
+function test() {
+ $i = 0;
+ assert('$i = new stdClass');
+ $i += 1;
+ var_dump($i);
+}
+test();
+
+?>
+--EXPECTF--
+Notice: Object of class stdClass could not be converted to int in %s on line %d
+int(2)
diff --git a/Zend/tests/ast_serialize_backtick_literal.phpt b/Zend/tests/ast_serialize_backtick_literal.phpt
new file mode 100644
index 0000000000..4dd65963c5
--- /dev/null
+++ b/Zend/tests/ast_serialize_backtick_literal.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Serialization of backtick literal is incorrect
+--INI--
+zend.assertions=1
+--FILE--
+<?php
+
+assert_options(ASSERT_WARNING);
+assert(false && `echo -n ""`);
+--EXPECTF--
+Warning: assert(): assert(false && `echo -n ""`) failed in %s%east_serialize_backtick_literal.php on line %d
diff --git a/Zend/tests/break_error_001.phpt b/Zend/tests/break_error_001.phpt
new file mode 100644
index 0000000000..eb8ce2efef
--- /dev/null
+++ b/Zend/tests/break_error_001.phpt
@@ -0,0 +1,10 @@
+--TEST--
+'break' error (non positive numbers)
+--FILE--
+<?php
+function foo () {
+ break 0;
+}
+?>
+--EXPECTF--
+Fatal error: 'break' operator accepts only positive numbers in %sbreak_error_001.php on line 3
diff --git a/Zend/tests/break_error_002.phpt b/Zend/tests/break_error_002.phpt
new file mode 100644
index 0000000000..a1c172d198
--- /dev/null
+++ b/Zend/tests/break_error_002.phpt
@@ -0,0 +1,10 @@
+--TEST--
+'break' error (operator with non-constant operand)
+--FILE--
+<?php
+function foo () {
+ break $x;
+}
+?>
+--EXPECTF--
+Fatal error: 'break' operator with non-constant operand is no longer supported in %sbreak_error_002.php on line 3
diff --git a/Zend/tests/break_error_003.phpt b/Zend/tests/break_error_003.phpt
new file mode 100644
index 0000000000..fa782343b1
--- /dev/null
+++ b/Zend/tests/break_error_003.phpt
@@ -0,0 +1,10 @@
+--TEST--
+'break' error (not in the loop context)
+--FILE--
+<?php
+function foo () {
+ break;
+}
+?>
+--EXPECTF--
+Fatal error: 'break' not in the 'loop' or 'switch' context in %sbreak_error_003.php on line 3
diff --git a/Zend/tests/break_error_004.phpt b/Zend/tests/break_error_004.phpt
new file mode 100644
index 0000000000..1b99a99ee9
--- /dev/null
+++ b/Zend/tests/break_error_004.phpt
@@ -0,0 +1,12 @@
+--TEST--
+'break' error (wrong level)
+--FILE--
+<?php
+function foo () {
+ while (1) {
+ break 2;
+ }
+}
+?>
+--EXPECTF--
+Fatal error: Cannot 'break' 2 levels in %sbreak_error_004.php on line 4
diff --git a/Zend/tests/bug26166.phpt b/Zend/tests/bug26166.phpt
index 9e31efa442..a77989c7c2 100644
--- a/Zend/tests/bug26166.phpt
+++ b/Zend/tests/bug26166.phpt
@@ -68,7 +68,7 @@ catch (Exception $e) {
--EXPECTF--
Hello World!
===NONE===
-string(56) "Method NoneTest::__toString() must return a string value"
+string(%d) "Method NoneTest::__toString() must return a string value"
===THROW===
-Fatal error: Method ErrorTest::__toString() must not throw an exception in %sbug26166.php on line %d
+Fatal error: Method ErrorTest::__toString() must not throw an exception, caught Exception: This is an error! in %sbug26166.php on line %d
diff --git a/Zend/tests/bug29015.phpt b/Zend/tests/bug29015.phpt
index a36ed923f3..d4231d10b1 100644
--- a/Zend/tests/bug29015.phpt
+++ b/Zend/tests/bug29015.phpt
@@ -6,9 +6,16 @@ $a = new stdClass();
$x = "";
$a->$x = "string('')";
var_dump($a);
+$a->{"\0"} = 42;
+var_dump($a);
?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot access empty property in %sbug29015.php:4
+object(stdClass)#1 (1) {
+ [""]=>
+ string(10) "string('')"
+}
+
+Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Stack trace:
#0 {main}
- thrown in %sbug29015.php on line 4
+ thrown in %s on line %d
diff --git a/Zend/tests/bug29883.phpt b/Zend/tests/bug29883.phpt
index c92f147ff7..b6ad99aeaf 100644
--- a/Zend/tests/bug29883.phpt
+++ b/Zend/tests/bug29883.phpt
@@ -3,7 +3,7 @@ Bug #29883 (isset gives invalid values on strings)
--FILE--
<?php
$x = "bug";
-var_dump(isset($x[-1]));
+var_dump(isset($x[-10]));
var_dump(isset($x["1"]));
echo $x["1"]."\n";
?>
diff --git a/Zend/tests/bug31098.phpt b/Zend/tests/bug31098.phpt
index 23cec9bbf4..31823a1aa5 100644
--- a/Zend/tests/bug31098.phpt
+++ b/Zend/tests/bug31098.phpt
@@ -18,7 +18,7 @@ var_dump(isset($a['b']));
$simpleString = "Bogus String Text";
echo isset($simpleString->wrong)?"bug\n":"ok\n";
echo isset($simpleString["wrong"])?"bug\n":"ok\n";
-echo isset($simpleString[-1])?"bug\n":"ok\n";
+echo isset($simpleString[-20])?"bug\n":"ok\n";
echo isset($simpleString[0])?"ok\n":"bug\n";
echo isset($simpleString["0"])?"ok\n":"bug\n";
echo isset($simpleString["16"])?"ok\n":"bug\n";
diff --git a/Zend/tests/bug34617.phpt b/Zend/tests/bug34617.phpt
index 25f785f909..ded1aec2fd 100644
--- a/Zend/tests/bug34617.phpt
+++ b/Zend/tests/bug34617.phpt
@@ -8,7 +8,8 @@ class Thing {}
function boom()
{
$reader = xml_parser_create();
- xml_set_object($reader, new Thing());
+ $thing = new Thing();
+ xml_set_object($reader, $thing);
die("ok\n");
xml_parser_free($reader);
}
diff --git a/Zend/tests/bug41117_1.phpt b/Zend/tests/bug41117_1.phpt
index f555b637ad..a612f07fed 100644
--- a/Zend/tests/bug41117_1.phpt
+++ b/Zend/tests/bug41117_1.phpt
@@ -10,5 +10,4 @@ class foo {
$obj = new foo("Hello world");
?>
--EXPECTF--
-Fatal error: Cannot re-assign $this in %sbug41117_1.php on line 3
-
+Fatal error: Cannot use $this as parameter in %s on line %d
diff --git a/Zend/tests/bug41813.phpt b/Zend/tests/bug41813.phpt
index 0bb693075a..9a609d09c8 100644
--- a/Zend/tests/bug41813.phpt
+++ b/Zend/tests/bug41813.phpt
@@ -9,7 +9,7 @@ $foo[0]->bar = "xyz";
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot use string offset as an array in %s:%d
+Fatal error: Uncaught Error: Cannot use string offset as an object in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt
index 3b00408e01..ebfb528827 100644
--- a/Zend/tests/bug42802.phpt
+++ b/Zend/tests/bug42802.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #42802 (Namespace not supported in typehints)
+Bug #42802 (Namespace not supported in types)
--FILE--
<?php
namespace foo;
diff --git a/Zend/tests/bug49866.phpt b/Zend/tests/bug49866.phpt
index 3d96a59cd5..0b7c224c01 100644
--- a/Zend/tests/bug49866.phpt
+++ b/Zend/tests/bug49866.phpt
@@ -7,7 +7,7 @@ $b = &$a[1];
$b = "f";
echo $a;
--EXPECTF--
-Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3
+Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sbug49866.php:3
Stack trace:
#0 {main}
thrown in %sbug49866.php on line 3
diff --git a/Zend/tests/bug52355.phpt b/Zend/tests/bug52355.phpt
new file mode 100644
index 0000000000..7f46c71d46
--- /dev/null
+++ b/Zend/tests/bug52355.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #52355 (Negating zero does not produce negative zero)
+--FILE--
+<?php
+
+var_dump(-0.0);
+var_dump(-(float)"0");
+
+$foo = -sin(0);
+
+var_dump($foo);
+
+var_dump(@(1.0 / -0.0));
+
+?>
+--EXPECT--
+float(-0)
+float(-0)
+float(-0)
+float(-INF)
diff --git a/Zend/tests/bug52484.phpt b/Zend/tests/bug52484.phpt
index 053529614d..1d2c2d7cdc 100644
--- a/Zend/tests/bug52484.phpt
+++ b/Zend/tests/bug52484.phpt
@@ -10,14 +10,14 @@ class A {
}
$a = new A();
-$prop = null;
+$prop = "\0";
unset($a->$prop);
?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot access empty property in %s:%d
+Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Stack trace:
-#0 %s(%d): A->__unset('')
+#0 %s(%d): A->__unset('\x00')
#1 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug52484_2.phpt b/Zend/tests/bug52484_2.phpt
index 6bb927535c..3b12950c66 100644
--- a/Zend/tests/bug52484_2.phpt
+++ b/Zend/tests/bug52484_2.phpt
@@ -10,14 +10,14 @@ class A {
}
$a = new A();
-$prop = null;
+$prop = "\0";
$a->$prop = 2;
?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot access empty property in %s:%d
+Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Stack trace:
-#0 %s(%d): A->__set('', 2)
+#0 %s(%d): A->__set('\x00', 2)
#1 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug52484_3.phpt b/Zend/tests/bug52484_3.phpt
index af32bc9be7..408dd453fd 100644
--- a/Zend/tests/bug52484_3.phpt
+++ b/Zend/tests/bug52484_3.phpt
@@ -10,14 +10,14 @@ class A {
}
$a = new A();
-$prop = null;
+$prop = "\0";
var_dump($a->$prop);
?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot access empty property in %s:%d
+Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
Stack trace:
-#0 %s(%d): A->__get('')
+#0 %s(%d): A->__get('\x00')
#1 {main}
thrown in %s on line %d
diff --git a/Zend/tests/bug52879.phpt b/Zend/tests/bug52879.phpt
index 0193be4b45..6c3232f32d 100644
--- a/Zend/tests/bug52879.phpt
+++ b/Zend/tests/bug52879.phpt
@@ -8,7 +8,7 @@ class MyClass {
$this->myRef = $value;
}
}
-$myGlobal=new MyClass($myGlobal);
+$myGlobal=new MyClass();
$myGlobal->myRef=&$myGlobal;
$myGlobal->myNonExistentProperty="ok\n";
echo $myGlobal;
diff --git a/Zend/tests/bug53432.phpt b/Zend/tests/bug53432.phpt
new file mode 100644
index 0000000000..83df599313
--- /dev/null
+++ b/Zend/tests/bug53432.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Bug #53432: Assignment via string index access on an empty string converts to array
+--FILE--
+<?php
+
+$str = '';
+var_dump($str[0] = 'a');
+var_dump($str);
+
+$str = '';
+var_dump($str[5] = 'a');
+var_dump($str);
+
+$str = '';
+var_dump($str[-1] = 'a');
+var_dump($str);
+
+$str = '';
+var_dump($str['foo'] = 'a');
+var_dump($str);
+
+$str = '';
+try {
+ var_dump($str[] = 'a');
+} catch (Error $e) {
+ echo "Error: {$e->getMessage()}\n";
+}
+var_dump($str);
+
+$str = '';
+try {
+ var_dump($str[0] += 1);
+} catch (Error $e) {
+ echo "Error: {$e->getMessage()}\n";
+}
+var_dump($str);
+
+$str = '';
+try {
+ var_dump($str[0][0] = 'a');
+} catch (Error $e) {
+ echo "Error: {$e->getMessage()}\n";
+}
+var_dump($str);
+
+?>
+--EXPECTF--
+string(1) "a"
+string(1) "a"
+string(1) "a"
+string(6) " a"
+
+Warning: Illegal string offset: -1 in %s on line %d
+NULL
+string(0) ""
+
+Warning: Illegal string offset 'foo' in %s on line %d
+string(1) "a"
+string(1) "a"
+Error: [] operator not supported for strings
+string(0) ""
+Error: Cannot use assign-op operators with string offsets
+string(0) ""
+Error: Cannot use string offset as an array
+string(0) ""
diff --git a/Zend/tests/bug60909_2.phpt b/Zend/tests/bug60909_2.phpt
index d08d9f90fa..1808b1c2fe 100644
--- a/Zend/tests/bug60909_2.phpt
+++ b/Zend/tests/bug60909_2.phpt
@@ -14,7 +14,7 @@ class Bad {
$bad = new Bad();
echo "$bad";
--EXPECTF--
-Fatal error: Method Bad::__toString() must not throw an exception in %sbug60909_2.php on line 0
+Fatal error: Method Bad::__toString() must not throw an exception, caught Exception: Oops, I cannot do this in %sbug60909_2.php on line %d
!!!shutdown!!!
diff --git a/Zend/tests/bug62358.phpt b/Zend/tests/bug62358.phpt
index 552a1e1908..35bbc33835 100644
--- a/Zend/tests/bug62358.phpt
+++ b/Zend/tests/bug62358.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug #62358 (Segfault when using traits a lot)
---SKIPIF--
-<?php
-if (getenv("USE_ZEND_ALLOC") !== "0") {
- die("skip Need Zend MM enabled");
-}
-?>
--FILE--
<?php
@@ -29,4 +23,4 @@ class B extends A {
}
?>
--EXPECTF--
-Warning: Declaration of B::foo() should be compatible with A::foo() in %sbug62358.php on line %d
+Fatal error: Declaration of B::foo($var) must be compatible with I::foo() in %sbug62358.php on line 17
diff --git a/Zend/tests/bug62441.phpt b/Zend/tests/bug62441.phpt
new file mode 100644
index 0000000000..3299f4967d
--- /dev/null
+++ b/Zend/tests/bug62441.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #62441: Incorrect strong typing in namespaced child classes
+--FILE--
+<?php
+namespace {
+ interface Iface {
+ function method(stdClass $o);
+ }
+}
+namespace ns {
+ class Foo implements \Iface {
+ function method(stdClass $o) { }
+ }
+
+ (new Foo)->method(new \stdClass);
+}
+?>
+--EXPECTF--
+Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d
+
diff --git a/Zend/tests/bug62814.phpt b/Zend/tests/bug62814.phpt
new file mode 100644
index 0000000000..6646aa283f
--- /dev/null
+++ b/Zend/tests/bug62814.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #62814: It is possible to stiffen child class members visibility
+--FILE--
+<?php
+
+class A {
+ private function test() { }
+}
+
+class B extends A {
+ protected function test() { }
+}
+
+class C extends B {
+ private function test() { }
+}
+
+?>
+--EXPECTF--
+Fatal error: Access level to C::test() must be protected (as in class B) or weaker in %s on line %d
diff --git a/Zend/tests/bug65784.phpt b/Zend/tests/bug65784.phpt
index c079b3d282..663ea95761 100644
--- a/Zend/tests/bug65784.phpt
+++ b/Zend/tests/bug65784.phpt
@@ -57,8 +57,13 @@ $bar = foo3();
string(9) "not catch"
NULL
-Fatal error: Uncaught Error: Class 'NotExists' not found in %sbug65784.php:%d
+Fatal error: Uncaught Exception: not catched in %sbug65784.php:42
Stack trace:
-#0 %s(%d): foo3()
+#0 %sbug65784.php(52): foo3()
#1 {main}
- thrown in %sbug65784.php on line %d
+
+Next Error: Class 'NotExists' not found in %sbug65784.php:46
+Stack trace:
+#0 %sbug65784.php(52): foo3()
+#1 {main}
+ thrown in %sbug65784.php on line 46
diff --git a/Zend/tests/bug68412.phpt b/Zend/tests/bug68412.phpt
index c6f413cc32..4f07111043 100644
--- a/Zend/tests/bug68412.phpt
+++ b/Zend/tests/bug68412.phpt
@@ -1,5 +1,11 @@
--TEST--
Bug #68412 (Infinite recursion with __call can make the program crash/segfault)
+--SKIPIF--
+<?php
+if (getenv("USE_ZEND_ALLOC") !== "1") {
+ die("skip Need Zend MM enabled");
+}
+?>
--FILE--
<?php
class C {
diff --git a/Zend/tests/bug68652.phpt b/Zend/tests/bug68652.phpt
index e86312ba63..8e54af2e34 100644
--- a/Zend/tests/bug68652.phpt
+++ b/Zend/tests/bug68652.phpt
@@ -28,6 +28,7 @@ class Bar {
}
public function __destruct() {
+ if (!isset(self::$instance)) return;
Foo::getInstance();
}
}
diff --git a/Zend/tests/bug69467.phpt b/Zend/tests/bug69467.phpt
index 22283003df..11ff72df18 100644
--- a/Zend/tests/bug69467.phpt
+++ b/Zend/tests/bug69467.phpt
@@ -18,4 +18,4 @@ $test = new Foo();
var_dump($test instanceof Baz);
?>
--EXPECTF--
-Fatal error: Access level to Bar::bad() must be public (as in class Baz) in %sbug69467.php on line %d
+Fatal error: Access level to Foo::bad() must be public (as in class Baz) in %sbug69467.php on line %d
diff --git a/Zend/tests/bug69537.phpt b/Zend/tests/bug69537.phpt
new file mode 100644
index 0000000000..3151c35081
--- /dev/null
+++ b/Zend/tests/bug69537.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #69537 (__debugInfo with empty string for key gives error)
+--FILE--
+<?php
+class Foo {
+
+ public function __debugInfo(){
+ return ['' => 1];
+ }
+}
+
+var_dump(new Foo);
+?>
+--EXPECTF--
+object(Foo)#%d (%d) {
+ [""]=>
+ int(1)
+}
+
diff --git a/Zend/tests/bug69640.phpt b/Zend/tests/bug69640.phpt
index e7ff7c99c1..bdc7814712 100644
--- a/Zend/tests/bug69640.phpt
+++ b/Zend/tests/bug69640.phpt
@@ -5,4 +5,4 @@ Bug #69640 Unhandled Error thrown from userland do not produce any output
throw new \ParseError('I mess everything up! :trollface:');
?>
--EXPECTF--
-Fatal error: I mess everything up! :trollface: in %sbug69640.php on line 2
+Parse error: I mess everything up! :trollface: in %sbug69640.php on line 2
diff --git a/Zend/tests/bug69732.phpt b/Zend/tests/bug69732.phpt
index bc6206d113..8d5fccd712 100644
--- a/Zend/tests/bug69732.phpt
+++ b/Zend/tests/bug69732.phpt
@@ -24,7 +24,8 @@ Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
Notice: Indirect modification of overloaded property wpq::$interesting has no effect in %sbug69732.php on line 16
-Notice: Only variables should be assigned by reference in %sbug69732.php on line 16
+Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
-Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
-XXX
diff --git a/Zend/tests/bug69761.phpt b/Zend/tests/bug69761.phpt
index 4b7e2787d8..2ec7cc10e1 100644
--- a/Zend/tests/bug69761.phpt
+++ b/Zend/tests/bug69761.phpt
@@ -11,5 +11,6 @@ var_dump(serialize($instance));
--EXPECTF--
Fatal error: Uncaught Exception: Serialization of 'class@%s' is not allowed in %sbug69761.php:%d
Stack trace:
-#0 %sbug69761.php(%d): serialize(Object(class@%s
+#0 %sbug69761.php(%d): serialize(Object(class@anonymous))
+#1 {main}
thrown in %sbug69761.php on line %d
diff --git a/Zend/tests/bug69767.phpt b/Zend/tests/bug69767.phpt
index cf4d4e7f93..9458546dea 100644
--- a/Zend/tests/bug69767.phpt
+++ b/Zend/tests/bug69767.phpt
@@ -5,4 +5,4 @@ Bug #69767 (Default parameter value with wrong type segfaults)
function foo(String $bar = 0) {}
?>
--EXPECTF--
-Fatal error: Default value for parameters with a string type hint can only be string or NULL in %sbug69767.php on line %d
+Fatal error: Default value for parameters with a string type can only be string or NULL in %sbug69767.php on line %d
diff --git a/Zend/tests/bug69955.phpt b/Zend/tests/bug69955.phpt
index b6d74242ee..33c36850c0 100644
--- a/Zend/tests/bug69955.phpt
+++ b/Zend/tests/bug69955.phpt
@@ -27,8 +27,6 @@ $c10 = new C10;
var_dump($c10[] += 5);
--EXPECTF--
Inside C10::offsetGet
-
-Notice: Undefined variable: offset in %sbug69955.php on line 10
NULL
Inside C10::offsetSet
diff --git a/Zend/tests/bug69957.phpt b/Zend/tests/bug69957.phpt
index d8d3a6f1fc..d578f9c8d2 100644
--- a/Zend/tests/bug69957.phpt
+++ b/Zend/tests/bug69957.phpt
@@ -61,16 +61,21 @@ try {
?>
--EXPECTF--
+Warning: Division by zero in %sbug69957.php on line %d
float(INF)
Variable mod
Type: DivisionByZeroError
Message: Modulo by zero
+
+Warning: Division by zero in %sbug69957.php on line %d
float(INF)
Literal mod
Type: DivisionByZeroError
Message: Modulo by zero
+
+Warning: Division by zero in %sbug69957.php on line %d
float(INF)
Double mod
diff --git a/Zend/tests/bug69989_1.phpt b/Zend/tests/bug69989_1.phpt
new file mode 100644
index 0000000000..816c55410e
--- /dev/null
+++ b/Zend/tests/bug69989_1.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #69989: Cycle collection for yielded values
+--FILE--
+<?php
+
+function gen() {
+ yield yield;
+}
+$gen = gen();
+$gen->send($gen);
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/Zend/tests/bug69989_2.phpt b/Zend/tests/bug69989_2.phpt
new file mode 100644
index 0000000000..a6f320da3b
--- /dev/null
+++ b/Zend/tests/bug69989_2.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Collection of some cycles on unfinished generators
+--FILE--
+<?php
+
+// CV
+function gen1() {
+ $gen = yield;
+ yield;
+}
+
+$gen = gen1();
+$gen->send($gen);
+
+// This
+class Test {
+ public $gen;
+ public function gen2() {
+ yield;
+ }
+}
+
+$test = new Test;
+$test->gen = $test->gen2();
+
+// Closure object
+$gen3 = (function() use (&$gen3) {
+ yield;
+})();
+
+// Yield from array
+function gen4() {
+ yield from [yield];
+}
+
+$gen = gen4();
+$gen->send($gen);
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/Zend/tests/bug69989_3.phpt b/Zend/tests/bug69989_3.phpt
new file mode 100644
index 0000000000..260819197b
--- /dev/null
+++ b/Zend/tests/bug69989_3.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Generator cycle collection edge cases
+--FILE--
+<?php
+
+// Extra args
+function gen1() {
+ yield;
+}
+$obj = new stdClass;
+$obj->gen = gen1($obj);
+
+// Symtable
+function gen2() {
+ $varName = 'a';
+ $$varName = yield;
+ yield;
+}
+$gen = gen2();
+$gen->send($gen);
+
+// Symtable indirect
+function gen3() {
+ $varName = 'a';
+ $$varName = 42;
+ $var = yield;
+ yield;
+}
+$gen = gen3();
+$gen->send($gen);
+
+// Yield from root
+function gen4() {
+ yield from yield;
+}
+$gen = gen4();
+$gen2 = gen4($gen);
+$gen2->send([1, 2, 3]);
+$gen->send($gen2);
+
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/Zend/tests/bug69996.phpt b/Zend/tests/bug69996.phpt
new file mode 100644
index 0000000000..178e36837a
--- /dev/null
+++ b/Zend/tests/bug69996.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #69996 (Changing the property of a cloned object affects the original)
+--FILE--
+<?php
+
+function method($cache) {
+ $prepared = clone $cache;
+ var_dump($prepared->data);
+ $prepared->data = "bad";
+ return $prepared;
+}
+
+$cache = new stdClass();
+$cache->data = "good";
+
+for ($i = 0; $i < 5; ++$i) {
+ method($cache);
+}
+?>
+--EXPECT--
+string(4) "good"
+string(4) "good"
+string(4) "good"
+string(4) "good"
+string(4) "good"
diff --git a/Zend/tests/bug70012.phpt b/Zend/tests/bug70012.phpt
new file mode 100644
index 0000000000..5337649d2d
--- /dev/null
+++ b/Zend/tests/bug70012.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #70012 (Exception lost with nested finally block)
+--FILE--
+<?php
+try {
+ echo "Outer try\n";
+ try {
+ echo " Middle try\n";
+ throw new Exception();
+ } finally {
+ echo " Middle finally\n";
+ try {
+ echo " Inner try\n";
+ } finally {
+ echo " Inner finally\n";
+ }
+ }
+ echo "Outer shouldnt get here\n";
+} catch (Exception $e) {
+ echo "Outer catch\n";
+} finally {
+ echo "Outer finally\n";
+}
+?>
+--EXPECT--
+Outer try
+ Middle try
+ Middle finally
+ Inner try
+ Inner finally
+Outer catch
+Outer finally
diff --git a/Zend/tests/bug70083.phpt b/Zend/tests/bug70083.phpt
new file mode 100644
index 0000000000..0391ea2327
--- /dev/null
+++ b/Zend/tests/bug70083.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #70083 (Use after free with assign by ref to overloaded objects)
+--FILE--
+<?php
+
+class foo {
+ private $var;
+ function __get($e) {
+ return $this;
+ }
+}
+
+function &noref() { $foo = 1; return $foo; }
+
+$foo = new foo;
+$foo->i = &noref();
+var_dump($foo);
+
+?>
+--EXPECTF--
+
+Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
+
diff --git a/Zend/tests/bug70089.phpt b/Zend/tests/bug70089.phpt
new file mode 100644
index 0000000000..e1884d9dac
--- /dev/null
+++ b/Zend/tests/bug70089.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #70089 (segfault in PHP 7 at ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER ())
+--INI--
+opcache.enable=0
+--FILE--
+<?php
+function dummy($a) {
+}
+
+try {
+ chr(0)[0][] = 1;
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+try {
+ unset(chr(0)[0][0]);
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+eval("function runtimetest(&\$a) {} ");
+try {
+ runtimetest(chr(0)[0]);
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ ++chr(0)[0];
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+?>
+--EXPECTF--
+string(36) "Cannot use string offset as an array"
+string(27) "Cannot unset string offsets"
+string(41) "Only variables can be passed by reference"
+string(41) "Cannot increment/decrement string offsets"
diff --git a/Zend/tests/bug70117.phpt b/Zend/tests/bug70117.phpt
new file mode 100644
index 0000000000..4bdd12caef
--- /dev/null
+++ b/Zend/tests/bug70117.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70117 (Unexpected return type error)
+--FILE--
+<?php
+
+function &foo() :string {
+ $a = array(1);
+ $b = &$a[0];
+ return $b;
+}
+
+function &foo1() :string {
+ $a = array("ref");
+ return $a[0];
+}
+
+var_dump(foo());
+var_dump(foo1());
+--EXPECT--
+string(1) "1"
+string(3) "ref"
diff --git a/Zend/tests/bug70121.phpt b/Zend/tests/bug70121.phpt
new file mode 100644
index 0000000000..9f8b7d6055
--- /dev/null
+++ b/Zend/tests/bug70121.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
+--FILE--
+<?php
+unserialize('O:12:"DateInterval":1:{s:4:"days";O:9:"Exception":7:{s:10:"'."\0".'*'."\0".'message";s:1:"x";s:17:"'."\0".'Exception'."\0".'string";s:1:"A";s:7:"'."\0".'*'."\0".'code";i:0;s:7:"'."\0".'*'."\0".'file";s:1:"a";s:7:"'."\0".'*'."\0".'line";i:1337;s:16:"'."\0".'Exception'."\0".'trace";a:0:{}s:19:"'."\0".'Exception'."\0".'previous";O:8:"stdClass":0:{}}}');
+?>
+OK
+--EXPECT--
+OK
diff --git a/Zend/tests/bug70124.phpt b/Zend/tests/bug70124.phpt
new file mode 100644
index 0000000000..3138430b8f
--- /dev/null
+++ b/Zend/tests/bug70124.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #70124 (null ptr deref / seg fault in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER)
+--FILE--
+<?php
+
+try {
+ echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),$f("test"))],chr(48));
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+class A {
+}
+
+try {
+ echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),a::y("test"))],chr(48));
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+$a = new A;
+
+try {
+ echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),$a->y("test"))],chr(48));
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),\bar\y("test"))],chr(48));
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ echo base_convert([array_search(chr(48),chr(48),chr(48),chr(48),chr(48),y("test"))],chr(48));
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+?>
+--EXPECTF--
+Notice: Undefined variable: f in %sbug70124.php on line %d
+string(30) "Function name must be a string"
+string(31) "Call to undefined method A::y()"
+string(31) "Call to undefined method A::y()"
+string(34) "Call to undefined function bar\y()"
+string(30) "Call to undefined function y()"
diff --git a/Zend/tests/bug70156.phpt b/Zend/tests/bug70156.phpt
new file mode 100644
index 0000000000..6b5e383337
--- /dev/null
+++ b/Zend/tests/bug70156.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #70156 (Segfault in zend_find_alias_name)
+--FILE--
+<?php
+trait T1 {
+ protected function foo1()
+ {
+ $this->bar();
+ }
+}
+
+trait T2 {
+ protected function foo2()
+ {
+ debug_print_backtrace();
+ }
+}
+
+class dummy {
+ use T1 {
+ foo1 as private;
+ }
+ use T2 {
+ foo2 as bar;
+ }
+ public function __construct()
+ {
+ $this->foo1();
+ }
+}
+
+new dummy();
+?>
+--EXPECTF--
+#0 dummy->bar() called at [%sbug70156.php:%d]
+#1 dummy->foo1() called at [%sbug70156.php:%d]
+#2 dummy->__construct() called at [%sbug70156.php:%d]
diff --git a/Zend/tests/bug70164.phpt b/Zend/tests/bug70164.phpt
new file mode 100644
index 0000000000..7777be4ee0
--- /dev/null
+++ b/Zend/tests/bug70164.phpt
@@ -0,0 +1,30 @@
+--TEST--
+__COMPILER_HALT_OFFSET__ is a "magic" constant, which should work if referenced directly, even in a namespace
+--FILE--
+<?php
+
+namespace {
+ echo __COMPILER_HALT_OFFSET__, "\n";
+ echo \__COMPILER_HALT_OFFSET__, "\n";
+}
+
+namespace Foo {
+ echo __COMPILER_HALT_OFFSET__, "\n";
+ echo \__COMPILER_HALT_OFFSET__, "\n";
+ echo namespace\__COMPILER_HALT_OFFSET__, "\n";
+
+}
+
+__halt_compiler();
+
+?>
+--EXPECTF--
+%d
+%d
+%d
+%d
+
+Fatal error: Uncaught Error: Undefined constant 'Foo\__COMPILER_HALT_OFFSET__' in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/bug70173.phpt b/Zend/tests/bug70173.phpt
new file mode 100644
index 0000000000..767973449a
--- /dev/null
+++ b/Zend/tests/bug70173.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
+?>
+--FILE--
+<?php
+$var = 2900000000;
+var_dump($var);
+?>
+--EXPECT--
+float(2900000000)
diff --git a/Zend/tests/bug70179.phpt b/Zend/tests/bug70179.phpt
new file mode 100644
index 0000000000..a5bdb98805
--- /dev/null
+++ b/Zend/tests/bug70179.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #70179 ($this refcount issue)
+--FILE--
+<?php
+
+class X {
+ function __invoke() {
+ var_dump($this);
+ }
+}
+(new X)();
+
+?>
+--EXPECT--
+object(X)#1 (0) {
+}
diff --git a/Zend/tests/bug70182.phpt b/Zend/tests/bug70182.phpt
new file mode 100644
index 0000000000..0b8111d3ee
--- /dev/null
+++ b/Zend/tests/bug70182.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #70182 ($string[] assignment with +=)
+--FILE--
+<?php
+
+$str = "abc";
+$str[] += $str;
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: [] operator not supported for strings in %sbug70182.php:%d
+Stack trace:
+#0 {main}
+ thrown in %sbug70182.php on line %d
diff --git a/Zend/tests/bug70183.phpt b/Zend/tests/bug70183.phpt
new file mode 100644
index 0000000000..d9b9972576
--- /dev/null
+++ b/Zend/tests/bug70183.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #70183 (null pointer deref (segfault) in zend_eval_const_expr)
+--FILE--
+<?php
+[[][]]
+?>
+--EXPECTF--
+Fatal error: Cannot use [] for reading in %sbug70183.php on line %d
diff --git a/Zend/tests/bug70187.phpt b/Zend/tests/bug70187.phpt
new file mode 100644
index 0000000000..a30f13b3ea
--- /dev/null
+++ b/Zend/tests/bug70187.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #70187 (Notice: unserialize(): Unexpected end of serialized data)
+--FILE--
+<?php
+class A {
+ public $b;
+}
+
+$a = new A;
+var_dump($a); // force properties HT
+unset($a->b);
+var_dump(serialize($a));
+?>
+--EXPECT--
+object(A)#1 (1) {
+ ["b"]=>
+ NULL
+}
+string(12) "O:1:"A":0:{}"
diff --git a/Zend/tests/bug70187_2.phpt b/Zend/tests/bug70187_2.phpt
new file mode 100644
index 0000000000..76a0b60063
--- /dev/null
+++ b/Zend/tests/bug70187_2.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #70187 (Notice: unserialize(): Unexpected end of serialized data)
+--FILE--
+<?php
+$a = 1;
+unset($a);
+unserialize(serialize($GLOBALS));
+echo "ok\n";
+?>
+--EXPECT--
+ok
diff --git a/Zend/tests/bug70215.phpt b/Zend/tests/bug70215.phpt
new file mode 100644
index 0000000000..527920cbb5
--- /dev/null
+++ b/Zend/tests/bug70215.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70215 (Segfault when invoke is static)
+--FILE--
+<?php
+
+class A {
+ public static function __invoke() {
+ echo __CLASS__;
+ }
+}
+
+class B extends A { }
+
+$b = new B;
+
+$b();
+
+?>
+--EXPECTF--
+Warning: The magic method __invoke() must have public visibility and cannot be static in %s on line %d
+A
diff --git a/Zend/tests/bug70223.phpt b/Zend/tests/bug70223.phpt
new file mode 100644
index 0000000000..7f1633a78e
--- /dev/null
+++ b/Zend/tests/bug70223.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #70223 (Incrementing value returned by magic getter)
+--FILE--
+<?php
+
+class A {
+
+ private $foo = 0;
+
+ public function &__get($foo){ return $this->foo; }
+
+}
+
+$a = new A;
+echo $a->f++;
+echo $a->f++;
+echo $a->f++;
+?>
+--EXPECT--
+012
diff --git a/Zend/tests/bug70240.phpt b/Zend/tests/bug70240.phpt
new file mode 100644
index 0000000000..d2aae2137d
--- /dev/null
+++ b/Zend/tests/bug70240.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #70240 (Segfault when doing unset($var()))
+--FILE--
+<?php
+unset($var());
+?>
+--EXPECTF--
+Fatal error: Can't use function return value in write context in %sbug70240.php on line %d
diff --git a/Zend/tests/bug70241.phpt b/Zend/tests/bug70241.phpt
new file mode 100644
index 0000000000..74218e9bf9
--- /dev/null
+++ b/Zend/tests/bug70241.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70241 (Skipped assertions affect Generator returns)
+--INI--
+zend.assertions=-1
+--FILE--
+<?php
+
+function foo () {
+ assert(yield 1);
+ return null;
+}
+
+var_dump(foo() instanceof Generator);
+
+?>
+--EXPECT--
+bool(true)
diff --git a/Zend/tests/bug70253.phpt b/Zend/tests/bug70253.phpt
new file mode 100644
index 0000000000..dd760df28b
--- /dev/null
+++ b/Zend/tests/bug70253.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70253 (segfault at _efree () in zend_alloc.c:1389)
+--INI--
+memory_limit=2M
+--SKIPIF--
+<?php
+$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
+if ($zend_mm_enabled === "0") {
+ die("skip Zend MM disabled");
+}
+?>
+--FILE--
+<?php
+unserialize('a:2:{i:0;O:9:"000000000":10000000');
+?>
+--EXPECTF--
+Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/Zend/tests/bug70258.phpt b/Zend/tests/bug70258.phpt
new file mode 100644
index 0000000000..5ffd7bf512
--- /dev/null
+++ b/Zend/tests/bug70258.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #70258 (Segfault if do_resize fails to allocated memory)
+--INI--
+memory_limit=2M
+--SKIPIF--
+<?php
+$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
+if ($zend_mm_enabled === "0") {
+ die("skip Zend MM disabled");
+}
+?>
+--FILE--
+<?php
+class A {
+ public $arr;
+ public function core() {
+ $this->arr["no_pack"] = 1;
+ while (1) {
+ $this->arr[] = 1;
+ }
+ }
+}
+
+$a = new A;
+$a->core();
+?>
+--EXPECTF--
+Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/Zend/tests/bug70262.phpt b/Zend/tests/bug70262.phpt
new file mode 100644
index 0000000000..7e285e8002
--- /dev/null
+++ b/Zend/tests/bug70262.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #70262 (Accessing array crashes)
+--FILE--
+<?php
+
+$array = array();
+$array[] = 1; // make this not immutable
+
+$extra = $array; // make the refcount == 2
+
+class A {
+ public function getObj($array) {
+ $obj = new Stdclass;
+ $obj->arr = $array; // make the refcount == 3;
+ return $obj;
+ }
+}
+
+$a = new A;
+$a->getObj($array) //use function call to get a refcount == 1 IS_VAR object
+ ->arr // FETCH_OBJ_W will EXTRACT_ZVAL_PTR because getObj() result a refcount == 1 object (READY_TO_DESTROY)
+ [0] = "test"; //We will get a refcount == 3 array (not a IS_INDIRCT) in ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER
+
+var_dump($array);
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ int(1)
+}
diff --git a/Zend/tests/bug70288.phpt b/Zend/tests/bug70288.phpt
new file mode 100644
index 0000000000..4b55d0b476
--- /dev/null
+++ b/Zend/tests/bug70288.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #70288 (Apache crash related to ZEND_SEND_REF)
+--FILE--
+<?php
+class A {
+ public function __get($name) {
+ return new Stdclass();
+ }
+}
+
+function test(&$obj) {
+ var_dump($obj);
+}
+$a = new A;
+test($a->dummy);
+?>
+--EXPECTF--
+object(stdClass)#%d (0) {
+}
diff --git a/Zend/tests/bug70293.phpt b/Zend/tests/bug70293.phpt
new file mode 100644
index 0000000000..0722fb5fcf
--- /dev/null
+++ b/Zend/tests/bug70293.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Crash with specific assertions and zend.assertions=-1
+--INI--
+zend.assertions=-1
+--FILE--
+<?php
+
+function f() {
+ assert(@$a ?: 1);
+ echo "OK";
+};
+f();
+
+?>
+--EXPECT--
+OK
diff --git a/Zend/tests/bug70321.phpt b/Zend/tests/bug70321.phpt
new file mode 100644
index 0000000000..19f691f418
--- /dev/null
+++ b/Zend/tests/bug70321.phpt
@@ -0,0 +1,49 @@
+--TEST--
+bug #70321 (Magic getter breaks reference to array property)
+--FILE--
+<?php
+class foo implements arrayAccess
+{
+ private $bar;
+ public function __construct()
+ {
+ $this->bar = new bar();
+ }
+ public function & __get($key)
+ {
+ $bar = $this->bar;
+ return $bar;
+ }
+
+ public function & offsetGet($key) {
+ $bar = $this->bar;
+ return $bar;
+ }
+ public function offsetSet($key, $val) {
+ }
+ public function offsetUnset($key) {
+ }
+ public function offsetExists($key) {
+ }
+}
+class bar { public $onBaz = []; }
+
+$foo = new foo();
+$foo->bar->onBaz[] = function() {};
+var_dump($foo->bar->onBaz);
+
+$foo = new foo();
+$foo["bar"]->onBaz[] = function() {};
+var_dump($foo->bar->onBaz);
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+}
+array(1) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+}
diff --git a/Zend/tests/bug70332.phpt b/Zend/tests/bug70332.phpt
new file mode 100644
index 0000000000..217070f133
--- /dev/null
+++ b/Zend/tests/bug70332.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #70332 (Wrong behavior while returning reference on object)
+--FILE--
+<?php
+function & test($arg) {
+ return $arg;
+}
+
+$arg = new Stdclass();
+$arg->name = array();
+
+test($arg)->name[1] = "xxxx";
+
+print_r($arg);
+?>
+--EXPECT--
+stdClass Object
+(
+ [name] => Array
+ (
+ [1] => xxxx
+ )
+
+)
diff --git a/Zend/tests/bug70397.phpt b/Zend/tests/bug70397.phpt
new file mode 100644
index 0000000000..fdfb1d4363
--- /dev/null
+++ b/Zend/tests/bug70397.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70397 (Segmentation fault when using Closure::call and yield)
+--FILE--
+<?php
+
+$f = function () {
+ $this->value = true;
+ yield $this->value;
+};
+
+var_dump($f->call(new class {})->current());
+
+?>
+--EXPECT--
+bool(true)
diff --git a/Zend/tests/bug70398.phpt b/Zend/tests/bug70398.phpt
new file mode 100644
index 0000000000..6f7b6f3844
--- /dev/null
+++ b/Zend/tests/bug70398.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70398 (SIGSEGV, Segmentation fault zend_ast_destroy_ex)
+--FILE--
+<?php
+
+define("FILE_STREAM", fopen("php://temp", "r"));
+
+define("FILE_STREAMS", array(fopen("php://temp", "r")));
+
+var_dump(FILE_STREAM);
+var_dump(FILE_STREAMS);
+?>
+--EXPECTF--
+resource(%d) of type (stream)
+array(1) {
+ [0]=>
+ resource(%d) of type (stream)
+}
diff --git a/Zend/tests/bug70430.phpt b/Zend/tests/bug70430.phpt
new file mode 100644
index 0000000000..59983653e9
--- /dev/null
+++ b/Zend/tests/bug70430.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70430: Stack buffer overflow in zend_language_parser()
+--FILE--
+<?php
+
+$"*** Testing function() : ***\n";
+
+?>
+--EXPECTF--
+Parse error: syntax error, unexpected '"*** Testing function() : ***' (T_CONSTANT_ENCAPSED_STRING), expecting variable (T_VARIABLE) or '{' or '$' in %s on line %d
diff --git a/Zend/tests/bug70478.phpt b/Zend/tests/bug70478.phpt
new file mode 100644
index 0000000000..1785a97324
--- /dev/null
+++ b/Zend/tests/bug70478.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #70478 (**= does no longer work)
+--FILE--
+<?php
+
+class foo {
+ public $a = 3;
+ private $b = 4;
+
+ function __construct() {
+ $this->a **= $this->b;
+ }
+}
+
+$a = new foo;
+var_dump($a->a);
+
+?>
+--EXPECT--
+int(81)
diff --git a/Zend/tests/bug70547.phpt b/Zend/tests/bug70547.phpt
new file mode 100644
index 0000000000..1b4c35d65f
--- /dev/null
+++ b/Zend/tests/bug70547.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Bug #70547 (unsetting function variables corrupts backtrace)
+--FILE--
+<?php
+function brokenTrace($arg1, &$arg2, $arg3){
+ backtraceWrapper();
+ var_dump(func_get_args());
+ unset($arg3);
+ var_dump(func_get_arg(0));
+ var_dump(func_get_arg(1));
+ var_dump(func_get_arg(2));
+ var_dump(func_get_arg(3));
+ backtraceWrapper();
+ unset($arg1);
+ var_dump(func_get_args());
+ backtraceWrapper();
+ unset($arg2);
+ backtraceWrapper();
+ var_dump(func_get_arg(0));
+ var_dump(func_get_arg(1));
+ var_dump(func_get_arg(2));
+ var_dump(func_get_arg(3));
+}
+$arg2 = "2nd";
+brokenTrace("1st", $arg2, "3th", "4th");
+function backtraceWrapper(){
+ $bt = debug_backtrace();
+ var_dump($bt[1]['args']);
+}
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ string(3) "1st"
+ [1]=>
+ &string(3) "2nd"
+ [2]=>
+ string(3) "3th"
+ [3]=>
+ string(3) "4th"
+}
+array(4) {
+ [0]=>
+ string(3) "1st"
+ [1]=>
+ string(3) "2nd"
+ [2]=>
+ string(3) "3th"
+ [3]=>
+ string(3) "4th"
+}
+string(3) "1st"
+string(3) "2nd"
+NULL
+string(3) "4th"
+array(3) {
+ [0]=>
+ string(3) "1st"
+ [1]=>
+ &string(3) "2nd"
+ [3]=>
+ string(3) "4th"
+}
+array(2) {
+ [1]=>
+ string(3) "2nd"
+ [3]=>
+ string(3) "4th"
+}
+array(2) {
+ [1]=>
+ &string(3) "2nd"
+ [3]=>
+ string(3) "4th"
+}
+array(1) {
+ [3]=>
+ string(3) "4th"
+}
+NULL
+NULL
+NULL
+string(3) "4th"
diff --git a/Zend/tests/bug70630.phpt b/Zend/tests/bug70630.phpt
new file mode 100644
index 0000000000..d78ee62c6a
--- /dev/null
+++ b/Zend/tests/bug70630.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
+--FILE--
+<?php
+class a {}
+$x = (new ReflectionFunction("substr"))->getClosure();
+$x->call(new a);
+?>
+--EXPECTF--
+Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
diff --git a/Zend/tests/bug70662.phpt b/Zend/tests/bug70662.phpt
new file mode 100644
index 0000000000..2bda8141ba
--- /dev/null
+++ b/Zend/tests/bug70662.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70662: Duplicate array key via undefined index error handler
+--FILE--
+<?php
+
+$a = [];
+set_error_handler(function() use(&$a) {
+ $a['b'] = 2;
+});
+$a['b'] += 1;
+var_dump($a);
+
+?>
+--EXPECT--
+array(1) {
+ ["b"]=>
+ int(1)
+}
diff --git a/Zend/tests/bug70681.phpt b/Zend/tests/bug70681.phpt
new file mode 100644
index 0000000000..9dd09b07b8
--- /dev/null
+++ b/Zend/tests/bug70681.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #70681: Segfault when binding $this of internal instance method to null
+--FILE--
+<?php
+
+$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
+$c = $c->bindTo(null);
+
+$c = (new ReflectionFunction('strlen'))->getClosure();
+$c = $c->bindTo(null);
+var_dump($c("foo"));
+
+?>
+--EXPECTF--
+Warning: Cannot unbind $this of internal method in %s on line %d
+int(3)
diff --git a/Zend/tests/bug70685.phpt b/Zend/tests/bug70685.phpt
new file mode 100644
index 0000000000..8ae97f1bf0
--- /dev/null
+++ b/Zend/tests/bug70685.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70685: Segfault for getClosure() internal method rebind with invalid $this
+--FILE--
+<?php
+
+class cls {}
+
+$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
+$c = $c->bindTo(new cls);
+var_dump($c);
+
+$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
+$c = $c->bindTo(new SplStack, 'cls');
+var_dump($c);
+
+?>
+--EXPECTF--
+Warning: Cannot bind method SplDoublyLinkedList::count() to object of class cls in %s on line %d
+NULL
+
+Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
+NULL
diff --git a/Zend/tests/bug70689.phpt b/Zend/tests/bug70689.phpt
new file mode 100644
index 0000000000..e3feeed9b0
--- /dev/null
+++ b/Zend/tests/bug70689.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70689 (Exception handler does not work as expected)
+--FILE--
+<?php
+
+function foo($foo) {
+ echo "Executing foo\n";
+}
+
+set_error_handler(function($errno, $errstr) {
+ throw new Exception($errstr);
+});
+
+try {
+ foo();
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECTF--
+Missing argument 1 for foo(), called in %sbug70689.php on line %d and defined
diff --git a/Zend/tests/bug70748.phpt b/Zend/tests/bug70748.phpt
new file mode 100644
index 0000000000..feb0e2a59d
--- /dev/null
+++ b/Zend/tests/bug70748.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #70748 (Segfault in ini_lex () at Zend/zend_ini_scanner.l)
+--FILE--
+<?php
+$ini = '[${ ';
+
+$ini_file = __DIR__ . "/bug70748.ini";
+
+file_put_contents($ini_file, $ini);
+
+var_dump(parse_ini_file($ini_file));
+?>
+--CLEAN--
+<?php
+unlink(__DIR__ . "/bug70748.ini");
+?>
+--EXPECTF--
+Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d
+ in %sbug70748.php on line %d
+bool(false)
diff --git a/Zend/tests/bug70782.phpt b/Zend/tests/bug70782.phpt
new file mode 100644
index 0000000000..bbe63ffec2
--- /dev/null
+++ b/Zend/tests/bug70782.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70782: null ptr deref and segfault (zend_get_class_fetch_type)
+--FILE--
+<?php
+
+(-0)::$prop;
+
+?>
+--EXPECTF--
+Fatal error: Illegal class name in %s on line %d
diff --git a/Zend/tests/bug70785.phpt b/Zend/tests/bug70785.phpt
new file mode 100644
index 0000000000..3c427ba069
--- /dev/null
+++ b/Zend/tests/bug70785.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #70785 (Infinite loop due to exception during identical comparison)
+--FILE--
+<?php
+
+set_error_handler(function($no, $msg) {
+ throw new Exception($msg);
+});
+
+try {
+ if ($a === null) { // ZEND_VM_SMART_BRANCH
+ undefined_function('Null');
+ }
+} catch (Exception $e) {
+}
+
+try {
+ $c === 3; // ZEND_VM_NEXT_OPCODE
+ undefined_function();
+} catch (Exception $e) {
+}
+?>
+okey
+--EXPECT--
+okey
diff --git a/Zend/tests/bug70804.phpt b/Zend/tests/bug70804.phpt
new file mode 100644
index 0000000000..d7fd18d98d
--- /dev/null
+++ b/Zend/tests/bug70804.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70804 (Unary add on negative zero produces positive zero)
+--FILE--
+<?php
+
+var_dump(+(-0.0));
+var_dump(+(float)"-0");
+
+$foo = +(-sin(0));
+
+var_dump($foo);
+
+?>
+--EXPECT--
+float(-0)
+float(-0)
+float(-0)
diff --git a/Zend/tests/bug70805.phpt b/Zend/tests/bug70805.phpt
new file mode 100644
index 0000000000..256f52eed5
--- /dev/null
+++ b/Zend/tests/bug70805.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #70805 (Segmentation faults whilst running Drupal 8 test suite)
+--FILE--
+<?php
+class A {
+}
+
+class B {
+}
+
+class C {
+ public function __destruct() {
+ if (isset($GLOBALS["a"])) {
+ unset($GLOBALS["array"]);
+ unset($GLOBALS["a"]); // this will be called in gc_colloct_roots and put $a into gc roots buf
+ }
+ }
+}
+
+$a = new A;
+$a->b = new B;
+$a->b->a = $a;
+
+$i = 0;
+
+$c = new A;
+$array = array($c); //This is used to leave a room for $GLOBALS["a"]
+unset($c);
+
+while ($i++ < 9997) {
+ $t = [];
+ $t[] = &$t;
+ unset($t);
+}
+$t = [new C];
+$t[] = &$t;
+unset($t); // This is used to trigger C::__destruct while doing gc_colloct_roots
+
+$e = $a;
+unset($a); // This one can not be putted into roots buf because it's full, thus gc_colloct_roots will be called,
+ // but C::__destructor which is called in gc_colloct_roots will put $a into buf
+ // which will make $a be putted into gc roots buf twice
+var_dump(gc_collect_cycles());
+?>
+--EXPECT--
+int(0)
diff --git a/Zend/tests/bug70805_1.phpt b/Zend/tests/bug70805_1.phpt
new file mode 100644
index 0000000000..0225b4ce82
--- /dev/null
+++ b/Zend/tests/bug70805_1.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Crash)
+--FILE--
+<?php
+class A {
+}
+
+class B {
+}
+
+class C {
+ public function __destruct() {
+ if (isset($GLOBALS["a"])) {
+ unset($GLOBALS["array"]);
+ unset($GLOBALS["a"]);
+ }
+ }
+}
+
+$a = new A;
+$a->b = new B;
+$a->b->a = $a;
+
+$i = 0;
+
+$c = new A;
+$array = array($c);
+unset($c);
+
+while ($i++ < 9997) {
+ $t = [];
+ $t[] = &$t;
+ unset($t);
+}
+$t = [new C];
+$t[] = &$t;
+unset($t);
+unset($a);
+
+var_dump(gc_collect_cycles());
+?>
+--EXPECT--
+int(2)
diff --git a/Zend/tests/bug70805_2.phpt b/Zend/tests/bug70805_2.phpt
new file mode 100644
index 0000000000..a9b11684f5
--- /dev/null
+++ b/Zend/tests/bug70805_2.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Memleak)
+--FILE--
+<?php
+class A {
+}
+
+class B {
+}
+
+class C {
+ public function __destruct() {
+ if (isset($GLOBALS["a"])) {
+ unset($GLOBALS["a"]);
+ }
+ }
+}
+
+$a = new A;
+$a->b = new B;
+$a->b->a = $a;
+
+$i = 0;
+
+while ($i++ < 9998) {
+ $t = [];
+ $t[] = &$t;
+ unset($t);
+}
+$t = [new C];
+$t[] = &$t;
+unset($t);
+
+unset($a);
+var_dump(gc_collect_cycles());
+--EXPECT--
+int(2)
diff --git a/Zend/tests/bug70873.phpt b/Zend/tests/bug70873.phpt
new file mode 100644
index 0000000000..3edb7eac43
--- /dev/null
+++ b/Zend/tests/bug70873.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #70873 (Regression on private static properties access)
+--FILE--
+<?php
+
+class A {
+ private static $x = 1;
+}
+
+class B extends A {
+ function bar() {
+ var_dump(self::$x);
+ }
+};
+
+class C extends A {
+ function bar() {
+ var_dump(A::$x);
+ }
+};
+
+
+$a = new B;
+$a->bar();
+
+$b = new C;
+$b->bar();
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Cannot access property B::$x in %sbug70873.php:%d
+Stack trace:
+#0 %sbug70873.php(%d): B->bar()
+#1 {main}
+ thrown in %sbug70873.php on line %d
diff --git a/Zend/tests/bug70895.phpt b/Zend/tests/bug70895.phpt
new file mode 100644
index 0000000000..896bf00a7b
--- /dev/null
+++ b/Zend/tests/bug70895.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70895 null ptr deref and segfault with crafted callable
+--FILE--
+<?php
+
+array_map("%n", 0);
+array_map("%n %i", 0);
+array_map("%n %i aoeu %f aoeu %p", 0);
+?>
+--EXPECTREGEX--
+Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n' not found or invalid function name in .+
+
+Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n %i' not found or invalid function name in .+
+
+Warning: array_map\(\) expects parameter 1 to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name in .+bug70895.php on line \d+
diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt
new file mode 100644
index 0000000000..41777072cc
--- /dev/null
+++ b/Zend/tests/bug70898.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70895 null ptr deref and segfault with crafted callable
+--FILE--
+<?php
+ function m($f,$a){
+ return array_map($f,0);
+ }
+
+ echo implode(m("",m("",m("",m("",m("0000000000000000000000000000000000",("")))))));
+?>
+--EXPECTF--
+Warning: array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
+
+Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %sbug70898.php on line %d
+
+Warning: implode(): Argument must be an array in %sbug70898.php on line %d
diff --git a/Zend/tests/bug70912.phpt b/Zend/tests/bug70912.phpt
new file mode 100644
index 0000000000..3d6d4303a6
--- /dev/null
+++ b/Zend/tests/bug70912.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70912 (Null ptr dereference when class property is initialised to a dereferenced value)
+--FILE--
+<?php
+class A {
+ public $a=[][];
+}
+?>
+--EXPECTF--
+Fatal error: Cannot use [] for reading in %sbug70912.php on line %d
diff --git a/Zend/tests/bug70914.phpt b/Zend/tests/bug70914.phpt
new file mode 100644
index 0000000000..e5f5d7460e
--- /dev/null
+++ b/Zend/tests/bug70914.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70914 zend_throw_or_error() format string vulnerability
+--SKIPIF--
+<?php
+if (!extension_loaded("pdo_sqlite")) {
+ die("skip pdo_sqlite required");
+}
+?>
+--FILE--
+<?php
+
+$db = new PDO('sqlite::memory:');
+$st = $db->query('SELECT 1');
+$re = $st->fetchObject('%Z');
+?>
+--EXPECTREGEX--
+Fatal error: Class '%Z' not found in .+bug70914.php on line \d+
diff --git a/Zend/tests/bug70918.phpt b/Zend/tests/bug70918.phpt
new file mode 100644
index 0000000000..81e2192d8a
--- /dev/null
+++ b/Zend/tests/bug70918.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #70918 (Segfault using static outside of class scope)
+--FILE--
+<?php
+try {
+ static::x;
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ parent::x;
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ self::x;
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ new static;
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ static::x();
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ static::$i;
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+?>
+--EXPECT--
+string(52) "Cannot access static:: when no class scope is active"
+string(52) "Cannot access parent:: when no class scope is active"
+string(50) "Cannot access self:: when no class scope is active"
+string(52) "Cannot access static:: when no class scope is active"
+string(52) "Cannot access static:: when no class scope is active"
+string(52) "Cannot access static:: when no class scope is active"
diff --git a/Zend/tests/bug70944.phpt b/Zend/tests/bug70944.phpt
new file mode 100644
index 0000000000..afb10bc27f
--- /dev/null
+++ b/Zend/tests/bug70944.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #70944 (try{ } finally{} can create infinite chains of exceptions)
+--FILE--
+<?php
+try {
+ $e = new Exception("Foo");
+ try {
+ throw new Exception("Bar", 0, $e);
+ } finally {
+ throw $e;
+ }
+} catch (Exception $e) {
+ var_dump((string)$e);
+}
+
+try {
+ $e = new Exception("Foo");
+ try {
+ throw new Exception("Bar", 0, $e);
+ } finally {
+ throw new Exception("Dummy", 0, $e);
+ }
+} catch (Exception $e) {
+ var_dump((string)$e);
+}
+?>
+--EXPECTF--
+string(%d) "Exception: Foo in %sbug70944.php:%d
+Stack trace:
+#0 {main}"
+string(%d) "Exception: Foo in %sbug70944.php:%d
+Stack trace:
+#0 {main}
+
+Next Exception: Dummy in %sbug70944.php:%d
+Stack trace:
+#0 {main}"
diff --git a/Zend/tests/bug70957.phpt b/Zend/tests/bug70957.phpt
new file mode 100644
index 0000000000..7db7d7d023
--- /dev/null
+++ b/Zend/tests/bug70957.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70957 (self::class can not be resolved with reflection for abstract class)
+--FILE--
+<?php
+
+abstract class Foo
+{
+ function bar($a = self::class) {}
+}
+
+trait T {
+ public function bar() {
+ }
+}
+
+class B extends Foo
+{
+ use T;
+}
+?>
+--EXPECTF--
+Warning: Declaration of T::bar() should be compatible with Foo::bar($a = 'Foo') in %sbug70957.php on line %d
diff --git a/Zend/tests/bug70958.phpt b/Zend/tests/bug70958.phpt
new file mode 100644
index 0000000000..b00d7aea81
--- /dev/null
+++ b/Zend/tests/bug70958.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70958 (Invalid opcode while using ::class as trait method paramater default value)
+--FILE--
+<?php
+trait Foo
+{
+ function bar($a = self::class) {
+ var_dump($a);
+ }
+}
+
+class B {
+ use Foo;
+}
+
+$b = new B;
+
+$b->bar();
+?>
+--EXPECT--
+string(1) "B"
diff --git a/Zend/tests/bug70967.phpt b/Zend/tests/bug70967.phpt
new file mode 100644
index 0000000000..89fc80b3f7
--- /dev/null
+++ b/Zend/tests/bug70967.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #70967 (Weird error handling for __toString when Error is thrown)
+--FILE--
+<?php
+class A {
+ public function __toString() {
+ undefined_function();
+ }
+}
+
+echo (new A);
+?>
+--EXPECTF--
+Fatal error: Method A::__toString() must not throw an exception, caught Error: Call to undefined function undefined_function() in %sbug70967.php on line %d
diff --git a/Zend/tests/bug70987.phpt b/Zend/tests/bug70987.phpt
new file mode 100644
index 0000000000..d31a1d2c6e
--- /dev/null
+++ b/Zend/tests/bug70987.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70987 (static::class within Closure::call() causes segfault)
+--FILE--
+<?php
+
+class foo {}
+$bar = function () {
+ return static::class;
+};
+
+var_dump($bar->call(new foo));
+
+?>
+--EXPECTF--
+string(3) "foo"
diff --git a/Zend/tests/bug70997.phpt b/Zend/tests/bug70997.phpt
new file mode 100644
index 0000000000..bdb3377c74
--- /dev/null
+++ b/Zend/tests/bug70997.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #70997 (When using parentClass:: instead of parent::, static context changed)
+--FILE--
+<?php
+class A {
+ const TEST = false;
+
+ public function test()
+ {
+ var_dump(static::TEST);
+ }
+}
+
+class B extends A {
+ const TEST = true;
+
+ public function test()
+ {
+ A::test();
+ }
+}
+
+$b = new B;
+$b->test();
+--EXPECT--
+bool(true)
diff --git a/Zend/tests/bug71067.phpt b/Zend/tests/bug71067.phpt
new file mode 100644
index 0000000000..b2a1b31811
--- /dev/null
+++ b/Zend/tests/bug71067.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #71067 (Local object in class method stays in memory for each call)
+--INI--
+opcache.enable=0
+error_reporting=0
+--FILE--
+<?php
+class Test {
+ public function test(){
+ $arr = (object) [
+ 'children' => []
+ ];
+ $arr->children[] = 1;
+ return $arr;
+ }
+}
+
+$o = new Test();
+$o->test();
+
+print_r($o->test());
+?>
+--EXPECT--
+stdClass Object
+(
+ [children] => Array
+ (
+ [0] => 1
+ )
+
+)
diff --git a/Zend/tests/bug71086.phpt b/Zend/tests/bug71086.phpt
new file mode 100644
index 0000000000..a7600c51fd
--- /dev/null
+++ b/Zend/tests/bug71086.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #71086: Invalid numeric literal parse error within highlight_string() function
+--FILE--
+<?php
+
+$highlightedString = highlight_string("<?php \n 09 09 09;", true);
+var_dump($highlightedString);
+
+?>
+--EXPECT--
+string(169) "<code><span style="color: #000000">
+<span style="color: #0000BB">&lt;?php&nbsp;<br />&nbsp;</span><span style="color: #007700">09&nbsp;09&nbsp;09;</span>
+</span>
+</code>"
diff --git a/Zend/tests/bug71154.phpt b/Zend/tests/bug71154.phpt
new file mode 100644
index 0000000000..6186453816
--- /dev/null
+++ b/Zend/tests/bug71154.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #71154: Incorrect HT iterator invalidation causes iterator reuse
+--FILE--
+<?php
+
+$array = [1, 2, 3];
+foreach ($array as &$ref) {
+ /* Free array, causing free of iterator */
+ $array = [];
+ /* Reuse the iterator.
+ * However it will also be reused on next foreach iteration */
+ $it = new ArrayIterator([1, 2, 3]);
+ $it->rewind();
+}
+var_dump($it->current());
+
+?>
+--EXPECT--
+int(1)
diff --git a/Zend/tests/bug71163.phpt b/Zend/tests/bug71163.phpt
new file mode 100644
index 0000000000..102b1b93ec
--- /dev/null
+++ b/Zend/tests/bug71163.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71163 (Segmentation Fault (cleanup_unfinished_calls))
+--FILE--
+<?php
+function __autoload($name) {
+ eval ("class $name extends Exception { public static function foo() {}}");
+ throw new Exception("boom");
+}
+
+function test2() {
+ try {
+ Test::foo();
+ } catch (Exception $e) {
+ echo "okey";
+ }
+}
+
+function test() {
+ test2();
+}
+
+test();
+?>
+--EXPECT--
+okey
diff --git a/Zend/tests/bug71196.phpt b/Zend/tests/bug71196.phpt
new file mode 100644
index 0000000000..ca25f9f4fc
--- /dev/null
+++ b/Zend/tests/bug71196.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #71196 (Memory leak with out-of-order live ranges)
+--FILE--
+<?php
+try {
+ $a = "1";
+ [1, (y().$a.$a) . ($a.$a)];
+} catch (Error $e) {
+ var_dump($e->getMessage());
+}
+?>
+--EXPECT--
+string(30) "Call to undefined function y()"
diff --git a/Zend/tests/bug71221.phpt b/Zend/tests/bug71221.phpt
new file mode 100644
index 0000000000..e735302d9e
--- /dev/null
+++ b/Zend/tests/bug71221.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #71221 (Null pointer deref (segfault) in get_defined_vars via ob_start)
+--FILE--
+<?php
+ob_start("get_defined_vars");
+ob_end_clean();
+?>
+okey
+--EXPECT--
+okey
diff --git a/Zend/tests/bug71248.phpt b/Zend/tests/bug71248.phpt
new file mode 100644
index 0000000000..6be2585767
--- /dev/null
+++ b/Zend/tests/bug71248.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71248 (Wrong interface is enforced)
+--FILE--
+<?php
+class Hint1 { }
+class Hint2 { }
+
+abstract class Base {
+ public function __construct(Hint1 $x) { }
+}
+
+interface Iface {
+ public function __construct(Hint1 $x);
+}
+
+class Foo extends Base implements Iface {
+}
+
+$code = <<<'PHP'
+abstract class Bar extends Base {
+ public function __construct(Hint2 $x) { }
+}
+PHP;
+eval($code);
+?>
+OK
+--EXPECT--
+OK
diff --git a/Zend/tests/bug71266.phpt b/Zend/tests/bug71266.phpt
new file mode 100644
index 0000000000..d67c6f6363
--- /dev/null
+++ b/Zend/tests/bug71266.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #71266 (Missing separation of properties HT in foreach etc)
+--FILE--
+<?php
+$one = 1;
+$two = 2;
+$arr = ['foo' => $one, 'bar' => $two];
+$obj = (object) $arr;
+foreach ($obj as $val) {
+ var_dump($val);
+ $obj->bar = 42;
+}
+
+$arr = ['foo' => $one, 'bar' => $two];
+$obj = (object) $arr;
+next($obj);
+var_dump(current($arr));
+?>
+--EXPECT--
+int(1)
+int(42)
+int(1)
diff --git a/Zend/tests/bug71275.phpt b/Zend/tests/bug71275.phpt
new file mode 100644
index 0000000000..52443734b7
--- /dev/null
+++ b/Zend/tests/bug71275.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71275 (Bad method called on cloning an object having a trait)
+--FILE--
+<?php
+
+trait MyTrait {
+ public function _() {
+ throw new RuntimeException('Should not be called');
+ }
+}
+
+
+class MyClass {
+ use MyTrait;
+
+ public function __clone() {
+ echo "I'm working hard to clone";
+ }
+}
+
+
+$instance = new MyClass();
+clone $instance;
+
+?>
+--EXPECT--
+I'm working hard to clone
diff --git a/Zend/tests/bug71300.phpt b/Zend/tests/bug71300.phpt
new file mode 100644
index 0000000000..3589c4764e
--- /dev/null
+++ b/Zend/tests/bug71300.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71300 (Segfault in zend_fetch_string_offset)
+--FILE--
+<?php
+function test1() {
+ for ($n = 'a'; $n < 'g'; $n++) {
+ $$n = 1;
+ }
+ $$n = $$n[++$n] = "test";
+ return $$n;
+}
+
+var_dump(test1());
+
+function test2() {
+ /* See #71303 for why not using for loop here */
+ $n = "a";
+ $$n .= $$n[++$n] = "test";
+ return $$n;
+}
+
+var_dump(test2());
+?>
+--EXPECTF--
+string(4) "test"
+
+Notice: Array to string conversion in %sbug71300.php on line %d
+string(9) "Arraytest"
diff --git a/Zend/tests/bug71336.phpt b/Zend/tests/bug71336.phpt
new file mode 100644
index 0000000000..c5da420da0
--- /dev/null
+++ b/Zend/tests/bug71336.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Bug #71336 (Wrong is_ref on properties as exposed via get_object_vars())
+--FILE--
+<?php
+class A
+{
+ protected $bar = array('baz');
+
+ function bar()
+ {
+ array_pop($this->bar);
+ $vars = get_object_vars($this);
+ $this->bar[] = array('buz');
+ print_r($vars);
+ }
+
+ function foo() {
+ array_pop($this->bar);
+ $dummy = &$this->bar;
+ $vars = get_object_vars($this);
+ $this->bar[] = array('buz');
+ print_r($vars);
+ }
+}
+
+(new A())->bar();
+(new A())->foo();
+?>
+--EXPECT--
+Array
+(
+ [bar] => Array
+ (
+ )
+
+)
+Array
+(
+ [bar] => Array
+ (
+ [0] => Array
+ (
+ [0] => buz
+ )
+
+ )
+
+)
diff --git a/Zend/tests/bug71359.phpt b/Zend/tests/bug71359.phpt
new file mode 100644
index 0000000000..b239549ee2
--- /dev/null
+++ b/Zend/tests/bug71359.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Bug #71359: Null coalescing operator and magic
+--FILE--
+<?php
+class AA {
+ private $data = [];
+ public function __isset($name) {
+ echo "__isset($name)\n";
+ return array_key_exists($name, $this->data);
+ }
+ public function &__get($name) {
+ echo "__get($name)\n";
+ if (!array_key_exists($name, $this->data)) {
+ throw new Exception('Unknown offset');
+ }
+ return $this->data[$name];
+ }
+ public function __set($name, $value) {
+ echo "__set($name)\n";
+ $this->data[$name] = $value;
+ }
+ public function __unset($name) {
+ echo "__unset($name)\n";
+ unset($this->data[$name]);
+ }
+}
+
+$aa = new AA;
+var_dump(isset($aa->zero->one->two));
+var_dump(isset($aa->zero->foo));
+var_dump($aa->zero ?? 42);
+var_dump($aa->zero->one->two ?? 42);
+$aa->zero = new AA;
+$aa->zero->one = new AA;
+var_dump(isset($aa->zero->one->two));
+var_dump($aa->zero->one->two ?? 42);
+?>
+--EXPECT--
+__isset(zero)
+bool(false)
+__isset(zero)
+bool(false)
+__isset(zero)
+int(42)
+__isset(zero)
+int(42)
+__set(zero)
+__get(zero)
+__set(one)
+__isset(zero)
+__get(zero)
+__isset(one)
+__get(one)
+__isset(two)
+bool(false)
+__isset(zero)
+__get(zero)
+__isset(one)
+__get(one)
+__isset(two)
+int(42)
diff --git a/Zend/tests/bug71414.phpt b/Zend/tests/bug71414.phpt
new file mode 100644
index 0000000000..09f8b7dd32
--- /dev/null
+++ b/Zend/tests/bug71414.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71414 (Interface method override inherited method and implemented in a trait causes fatal error)
+--FILE--
+<?php
+interface InterfaceY {
+ public function z(): string;
+}
+
+trait TraitY {
+ public function z(): string {
+ }
+}
+
+class X {
+ public function z() {
+ }
+}
+
+class Y extends X implements InterfaceY {
+ use TraitY;
+}
+
+echo "ok";
+--EXPECT--
+ok
diff --git a/Zend/tests/bug71428.1.phpt b/Zend/tests/bug71428.1.phpt
new file mode 100644
index 0000000000..e4d3a22f67
--- /dev/null
+++ b/Zend/tests/bug71428.1.phpt
@@ -0,0 +1,13 @@
+--TEST--
+bug #71428.1: inheritance with null default values
+--FILE--
+<?php
+class A {
+ public function m(array $a = null) {}
+}
+class B extends A {
+ public function m(array $a = []) {}
+}
+--EXPECTF--
+Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 7
+
diff --git a/Zend/tests/bug71428.2.phpt b/Zend/tests/bug71428.2.phpt
new file mode 100644
index 0000000000..9a98ba7760
--- /dev/null
+++ b/Zend/tests/bug71428.2.phpt
@@ -0,0 +1,23 @@
+--TEST--
+bug #71428.2: inheritance of ye olde dynamic interfaces
+--SKIPIF--
+<?php if (!extension_loaded('pdo')) die("skip PDO is not available"); ?>
+--FILE--
+<?php
+interface StatementInterface {
+ public function fetch($first = null, $second, $third);
+}
+
+class Statement extends PDOStatement implements StatementInterface {}
+
+interface StatementInterface1 {
+ public function fetch($first = null, $second = null, $third = null);
+}
+
+class Statement1 extends PDOStatement implements StatementInterface1 {}
+
+echo "ok";
+?>
+--EXPECT--
+ok
+
diff --git a/Zend/tests/bug71428.3.phpt b/Zend/tests/bug71428.3.phpt
new file mode 100644
index 0000000000..558e87c56e
--- /dev/null
+++ b/Zend/tests/bug71428.3.phpt
@@ -0,0 +1,11 @@
+--TEST--
+bug #71428: Validation type inheritance with = NULL
+--FILE--
+<?php
+class A { }
+class B { public function m(A $a = NULL, $n) { echo "B.m";} };
+class C extends B { public function m(A $a , $n) { echo "C.m";} };
+?>
+--EXPECTF--
+Warning: Declaration of C::m(A $a, $n) should be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4
+
diff --git a/Zend/tests/bug71470.phpt b/Zend/tests/bug71470.phpt
new file mode 100644
index 0000000000..6f8b4f0103
--- /dev/null
+++ b/Zend/tests/bug71470.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #71470: Leaked 1 hashtable iterators
+--FILE--
+<?php
+
+$array = [1, 2, 3];
+foreach ($array as &$v) {
+ die("foo\n");
+}
+
+?>
+--EXPECT--
+foo
diff --git a/Zend/tests/bug71474.phpt b/Zend/tests/bug71474.phpt
new file mode 100644
index 0000000000..e67bb9b240
--- /dev/null
+++ b/Zend/tests/bug71474.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71474: Crash because of VM stack corruption on Magento2
+--FILE--
+<?php
+class foo {
+ function __call($name, $args) {
+ $a = $b = $c = $d = $e = $f = 1;
+ }
+}
+
+function test($n, $x) {
+// var_dump($n);
+ if ($n > 0) {
+ $x->bug();
+ test($n - 1, $x);
+ }
+}
+
+test(3000, new foo());
+echo "OK\n";
+?>
+--EXPECT--
+OK
diff --git a/Zend/tests/bug71529.phpt b/Zend/tests/bug71529.phpt
new file mode 100644
index 0000000000..5a5e323414
--- /dev/null
+++ b/Zend/tests/bug71529.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71529: Variable references on array elements don't work when using count
+--FILE--
+<?php
+
+$a = [1];
+$a[] = &$a[out(count($a) - 1)];
+var_dump($a);
+
+function out($what) {
+ var_dump($what);
+ return $what;
+}
+
+?>
+--EXPECT--
+int(0)
+array(2) {
+ [0]=>
+ &int(1)
+ [1]=>
+ &int(1)
+}
diff --git a/Zend/tests/bug71572.phpt b/Zend/tests/bug71572.phpt
new file mode 100644
index 0000000000..4a823ec72f
--- /dev/null
+++ b/Zend/tests/bug71572.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71572: String offset assignment from an empty string inserts null byte
+--FILE--
+<?php
+
+$str = "abc";
+var_dump($str{0} = "");
+var_dump($str{1} = "");
+var_dump($str{3} = "");
+var_dump($str{10} = "");
+var_dump($str);
+?>
+==DONE==
+--EXPECTF--
+Warning: Cannot assign an empty string to a string offset in %s on line %d
+NULL
+
+Warning: Cannot assign an empty string to a string offset in %s on line %d
+NULL
+
+Warning: Cannot assign an empty string to a string offset in %s on line %d
+NULL
+
+Warning: Cannot assign an empty string to a string offset in %s on line %d
+NULL
+string(3) "abc"
+==DONE== \ No newline at end of file
diff --git a/Zend/tests/bug71622.phpt b/Zend/tests/bug71622.phpt
new file mode 100644
index 0000000000..3ef0ba80e1
--- /dev/null
+++ b/Zend/tests/bug71622.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
+--FILE--
+<?php
+
+function getMethodName(&$methodName) {
+ $methodName = Abc::METHOD_NAME;
+}
+
+class Abc {
+ const METHOD_NAME = "goal";
+
+ private static function goal() {
+ echo "success\n";
+ }
+
+ public static function run() {
+ $method = "foobar";
+ getMethodName($method);
+ var_dump(is_callable("self::$method"));
+ self::$method();
+ }
+}
+
+Abc::run();
+
+?>
+--EXPECT--
+bool(true)
+success
diff --git a/Zend/tests/bug71695.phpt b/Zend/tests/bug71695.phpt
new file mode 100644
index 0000000000..6747ce0e14
--- /dev/null
+++ b/Zend/tests/bug71695.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #71695 (Global variables are reserved before execution)
+--FILE--
+<?php
+function provideGlobals() {
+ var_dump(array_key_exists("foo", $GLOBALS));
+ var_dump(isset($GLOBALS["foo"]));
+ $GLOBALS += array("foo" => "foo");
+}
+
+provideGlobals();
+echo $foo;
+?>
+--EXPECT--
+bool(false)
+bool(false)
+foo
diff --git a/Zend/tests/bug71724.phpt b/Zend/tests/bug71724.phpt
new file mode 100644
index 0000000000..2f5e4ba9da
--- /dev/null
+++ b/Zend/tests/bug71724.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #71724: yield from does not count EOLs
+--FILE--
+<?php
+
+function test()
+{
+ yield
+
+
+
+
+ from [__LINE__];
+}
+var_dump(test()->current());
+
+?>
+--EXPECT--
+int(10)
diff --git a/Zend/tests/bug71731.phpt b/Zend/tests/bug71731.phpt
new file mode 100644
index 0000000000..46a79f1a34
--- /dev/null
+++ b/Zend/tests/bug71731.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Bug #71731: Null coalescing operator and ArrayAccess
+--FILE--
+<?php
+
+class AA implements ArrayAccess {
+ private $data = [];
+ public function offsetExists($name) {
+ echo "offsetExists($name)\n";
+ return array_key_exists($name, $this->data);
+ }
+ public function &offsetGet($name) {
+ echo "offsetGet($name)\n";
+ if (!array_key_exists($name, $this->data)) {
+ throw new Exception('Unknown offset');
+ }
+ return $this->data[$name];
+ }
+ public function offsetSet($name, $value) {
+ echo "offsetSet($name)\n";
+ $this->data[$name] = $value;
+ }
+ public function offsetUnset($name) {
+ echo "offsetUnset($name)\n";
+ unset($this->data[$name]);
+ }
+}
+
+$aa = new AA;
+var_dump(isset($aa[0][1][2]));
+var_dump(isset($aa[0]->foo));
+var_dump($aa[0] ?? 42);
+var_dump($aa[0][1][2] ?? 42);
+
+$aa[0] = new AA;
+$aa[0][1] = new AA;
+var_dump(isset($aa[0][1][2]));
+var_dump($aa[0][1][2] ?? 42);
+
+?>
+--EXPECT--
+offsetExists(0)
+bool(false)
+offsetExists(0)
+bool(false)
+offsetExists(0)
+int(42)
+offsetExists(0)
+int(42)
+offsetSet(0)
+offsetGet(0)
+offsetSet(1)
+offsetExists(0)
+offsetGet(0)
+offsetExists(1)
+offsetGet(1)
+offsetExists(2)
+bool(false)
+offsetExists(0)
+offsetGet(0)
+offsetExists(1)
+offsetGet(1)
+offsetExists(2)
+int(42)
diff --git a/Zend/tests/bug71737.phpt b/Zend/tests/bug71737.phpt
new file mode 100644
index 0000000000..b44de8e78e
--- /dev/null
+++ b/Zend/tests/bug71737.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71737: Memory leak in closure with parameter named $this
+--FILE--
+<?php
+
+class Test {
+ public function method() {
+ return function($this) {};
+ }
+}
+
+(new Test)->method()(new stdClass);
+
+?>
+--EXPECTF--
+Fatal error: Cannot use $this as parameter in %s on line %d
diff --git a/Zend/tests/bug71756.phpt b/Zend/tests/bug71756.phpt
new file mode 100644
index 0000000000..42066f3c2e
--- /dev/null
+++ b/Zend/tests/bug71756.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71756 (Call-by-reference widens scope to uninvolved functions when used in switch)
+--FILE--
+<?php
+function a ($option) {
+ b($option['bla']);
+ c($option);
+ var_dump($option);
+}
+function b (&$string) {
+ $string = 'changed';
+}
+function c ($option) {
+ switch ($option['bla']) {
+ case 'changed':
+ $copy = $option;
+ $copy['bla'] = 'copy';
+ break;
+ }
+}
+a(array('bla' => 'false'));
+?>
+--EXPECTF--
+array(1) {
+ ["bla"]=>
+ string(7) "changed"
+}
diff --git a/Zend/tests/bug71841.phpt b/Zend/tests/bug71841.phpt
new file mode 100644
index 0000000000..f66761b3c9
--- /dev/null
+++ b/Zend/tests/bug71841.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71841 (EG(error_zval) is not handled well)
+--INI--
+error_reporting=0
+--FILE--
+<?php
+$z = unserialize('O:1:"A":0:{}');
+var_dump($z->e.=0);
+var_dump(++$z->x);
+var_dump($z->y++);
+
+$y = array(PHP_INT_MAX => 0);
+var_dump($y[] .= 0);
+var_dump(++$y[]);
+var_dump($y[]++);
+?>
+--EXPECT--
+NULL
+NULL
+NULL
+NULL
+NULL
+NULL
diff --git a/Zend/tests/bug71859.phpt b/Zend/tests/bug71859.phpt
new file mode 100644
index 0000000000..5b62209a1b
--- /dev/null
+++ b/Zend/tests/bug71859.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71859 (zend_objects_store_call_destructors operates on realloced memory, crashing)
+--FILE--
+<?php
+class constructs_in_destructor {
+ public function __destruct() {
+ //We are now in zend_objects_store_call_destructors
+ //This causes a realloc in zend_objects_store_put
+ for ($i = 0; $i < 10000; ++$i) {
+ $GLOBALS["a$i"] = new stdClass;
+ }
+ //Returns to zend_objects_store_call_destructors, to access freed memory.
+ }
+}
+
+$a = new constructs_in_destructor;
+//Create cycle so destructors are ran only in zend_objects_store_call_destructors
+$a->a = $a;
+
+// Create some objects so zend_objects_store_call_destructors has something
+// to do after constructs_in_destructor is destroyed.
+for ($i = 0; $i < 200; ++$i) {
+ $GLOBALS["b$i"] = new stdClass;
+}
+?>
+okey
+--EXPECT--
+okey
diff --git a/Zend/tests/bug71871.phpt b/Zend/tests/bug71871.phpt
new file mode 100644
index 0000000000..1781ff07aa
--- /dev/null
+++ b/Zend/tests/bug71871.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #71871: Interfaces allow final and abstract functions
+--FILE--
+<?php
+
+interface test {
+ final function test();
+}
+
+?>
+--EXPECTF--
+Fatal error: Access type for interface method test::test() must be omitted in %s on line %d
diff --git a/Zend/tests/bug71871_2.phpt b/Zend/tests/bug71871_2.phpt
new file mode 100644
index 0000000000..6a9404ea37
--- /dev/null
+++ b/Zend/tests/bug71871_2.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #71871: Interfaces allow final and abstract functions
+--FILE--
+<?php
+
+interface test {
+ abstract function test();
+}
+
+?>
+--EXPECTF--
+Fatal error: Access type for interface method test::test() must be omitted in %s on line %d
diff --git a/Zend/tests/bug71914.phpt b/Zend/tests/bug71914.phpt
new file mode 100644
index 0000000000..a43eb56bbd
--- /dev/null
+++ b/Zend/tests/bug71914.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #71914 (Reference is lost in "switch")
+--FILE--
+<?php
+
+function bug(&$value) {
+ switch ($value) {
+ case "xxxx":
+ $value = true;
+ break;
+ }
+}
+
+function returnArray() {
+ $array = array();
+ $array["str"] = "xxxx";
+ return $array;
+}
+
+class Foo {
+ public $array = array("str" => "xxxx");
+}
+
+function test($arr, &$dummy) {
+ bug($arr["str"]);
+ var_dump($arr["str"]);
+}
+
+$foo = new Foo();
+$arr = returnArray();
+
+$array = array("str" => "xxxx");
+test($array, $array["str"]);
+test($arr, $arr["str"]);
+test($foo->array, $foo->array["str"]);
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
diff --git a/Zend/tests/bug71922.phpt b/Zend/tests/bug71922.phpt
new file mode 100644
index 0000000000..986254cab7
--- /dev/null
+++ b/Zend/tests/bug71922.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #71922: Crash on assert(new class{});
+--INI--
+zend.assertions=1
+assert.exception=1
+--FILE--
+<?php
+
+try {
+ assert(0 && new class {
+ } && new class(42) extends stdclass {
+ });
+} catch (AssertionError $e) {
+ echo "Assertion failure: ", $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+Assertion failure: assert(0 && new class {
+} && new class(42) extends stdclass {
+})
diff --git a/Zend/tests/bug71930.phpt b/Zend/tests/bug71930.phpt
new file mode 100644
index 0000000000..4604b88493
--- /dev/null
+++ b/Zend/tests/bug71930.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ die("skip Require a resource which is able to hold a callbck");
+}
+?>
+--FILE--
+<?php
+
+class A {
+ public static function dummy() {
+ }
+}
+
+$a = array();
+$a[] = "A";
+$a[] = "dummy";
+
+$ch1 = curl_init();
+curl_setopt($ch1, CURLOPT_HEADERFUNCTION, $a);
+
+set_error_handler($a);
+set_error_handler(function()use($ch1){});
+set_error_handler(function(){});
+?>
+okey
+--EXPECT--
+okey
diff --git a/Zend/tests/bug71980.phpt b/Zend/tests/bug71980.phpt
new file mode 100644
index 0000000000..cd98f6567d
--- /dev/null
+++ b/Zend/tests/bug71980.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #71980: Decorated/Nested Generator is Uncloseable in Finally
+--FILE--
+<?php
+
+class Dtor {
+ public function __destruct() {
+ echo "Dtor\n";
+ }
+}
+
+function gen1() {
+ try {
+ foreach ([42, new Dtor] as $value) {
+ yield $value;
+ }
+ } finally {
+ echo "Finally\n";
+ }
+}
+
+function gen2() {
+ try {
+ var_dump(new Dtor, yield);
+ } finally {
+ echo "Finally\n";
+ }
+}
+
+$gen = gen1();
+$gen->rewind();
+unset($gen);
+
+$gen = gen2();
+$gen->rewind();
+unset($gen);
+
+?>
+--EXPECT--
+Dtor
+Finally
+Dtor
+Finally
diff --git a/Zend/tests/bug72038.phpt b/Zend/tests/bug72038.phpt
new file mode 100644
index 0000000000..1e32af4c18
--- /dev/null
+++ b/Zend/tests/bug72038.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #72038 (Function calls with values to a by-ref parameter don't always throw a notice)
+--FILE--
+<?php
+
+test($foo = new stdClass);
+var_dump($foo);
+test($bar = 2);
+var_dump($bar);
+test($baz = &$bar);
+var_dump($baz);
+
+function test(&$param) {
+ $param = 1;
+}
+
+?>
+--EXPECTF--
+
+Notice: Only variables should be passed by reference in %s on line %d
+object(stdClass)#1 (0) {
+}
+
+Notice: Only variables should be passed by reference in %s on line %d
+int(2)
+int(1)
+
diff --git a/Zend/tests/bug72057.phpt b/Zend/tests/bug72057.phpt
new file mode 100644
index 0000000000..e1a129bbc2
--- /dev/null
+++ b/Zend/tests/bug72057.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #72057 (PHP hangs when user error handler throws exception after Notice from type coercion)
+--FILE--
+<?php
+
+set_error_handler(
+ function() {
+ throw new Exception("My custom error");
+ }
+);
+
+(function (int $i) { bar(); })("7as");
+
+--EXPECTF--
+
+Fatal error: Uncaught Exception: My custom error in %s:%d
+Stack trace:
+#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d, Array)
+#1 %s(%d): {closure}('7as')
+#2 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/bug72101.phpt b/Zend/tests/bug72101.phpt
new file mode 100644
index 0000000000..a04425cee4
--- /dev/null
+++ b/Zend/tests/bug72101.phpt
@@ -0,0 +1,85 @@
+--TEST--
+Bug #72101 (crash on complex code)
+--FILE--
+<?php
+class PHPUnit_Framework_MockObject_Stub_ReturnCallback {
+ protected $callback;
+ public function __construct($callback) {
+ $this->callback = $callback;
+ }
+ public function invoke($invocation) {
+ return call_user_func_array($this->callback, $invocation->parameters);
+ }
+}
+
+class PHPUnit_Framework_MockObject_InvocationMocker {
+ protected $matchers = [];
+ public function addMatcher( $matcher) {
+ $this->matchers[] = $matcher;
+ }
+ public function invoke( $invocation) {
+ foreach ($this->matchers as $match) {
+ $match->invoked($invocation);
+ }
+ }
+}
+
+class PHPUnit_Framework_MockObject_Matcher {
+ public $stub = null;
+ public function invoked($invocation) {
+ return $this->stub->invoke($invocation);
+ }
+}
+
+class MethodCallbackByReference {
+ public function bar(&$a, &$b, $c) {
+ Legacy::bar($a, $b, $c);
+ }
+ public function callback(&$a, &$b, $c) {
+ $b = 1;
+ }
+}
+class PHPUnit_Framework_MockObject_Invocation_Static {
+ public $parameters;
+ public function __construct(array $parameters) {
+ $this->parameters = $parameters;
+ }
+}
+
+class Mock_MethodCallbackByReference_7b180d26 extends MethodCallbackByReference {
+ public $inv_mocker;
+ public function bar(&$a, &$b, $c) {
+ $arguments = array($a, $b, $c);
+ $result = $this->inv_mocker->invoke(
+ new PHPUnit_Framework_MockObject_Invocation_Static(
+ $arguments
+ )
+ );
+ return $result;
+ }
+}
+
+set_error_handler(function() {
+// var_dump(func_get_args());
+ DoesNotExists::$nope = true;
+}, E_ALL | E_STRICT);
+
+$foo = new Mock_MethodCallbackByReference_7b180d26();
+$InvMocker = new PHPUnit_Framework_MockObject_InvocationMocker();
+$foo->inv_mocker = $InvMocker;
+$OuterMatcher = new PHPUnit_Framework_MockObject_Matcher();
+$InvMocker->addMatcher($OuterMatcher);
+$OuterMatcher->methodNameMatcher = null;
+$OuterMatcher->stub = new PHPUnit_Framework_MockObject_Stub_ReturnCallback([$foo, 'callback']);
+$a = $b = $c = 0;
+$foo->bar($a, $b, $c);
+--EXPECTF--
+Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61
+Stack trace:
+#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array)
+#1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
+#2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
+#3 %sbug72101.php(51): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
+#4 %sbug72101.php(72): Mock_MethodCallbackByReference_7b180d26->bar(0, 0, 0)
+#5 {main}
+ thrown in %sbug72101.php on line 61
diff --git a/Zend/tests/bug72107.phpt b/Zend/tests/bug72107.phpt
new file mode 100644
index 0000000000..3f4c46cf70
--- /dev/null
+++ b/Zend/tests/bug72107.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #72107: Segfault when using func_get_args as error handler
+--FILE--
+<?php
+set_error_handler('func_get_args');
+function test($a) {
+ echo $undef;
+}
+test(1);
+?>
+--EXPECTF--
+Warning: Cannot call func_get_args() dynamically in %s on line %d
+
+Notice: Undefined variable: undef in %s on line %d
diff --git a/Zend/tests/bug72119.phpt b/Zend/tests/bug72119.phpt
new file mode 100644
index 0000000000..064381ada0
--- /dev/null
+++ b/Zend/tests/bug72119.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #72119 (Interface declaration compatibility regression with default values)
+--FILE--
+<?php
+interface Foo {
+ public function bar(array $baz = null);
+}
+
+class Hello implements Foo {
+ public function bar(array $baz = [])
+ {
+
+ }
+}
+echo "OK\n";
+?>
+--EXPECTF--
+Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d
+
diff --git a/Zend/tests/bug72162.phpt b/Zend/tests/bug72162.phpt
new file mode 100644
index 0000000000..5902c585d8
--- /dev/null
+++ b/Zend/tests/bug72162.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #72162 (use-after-free - error_reporting)
+--FILE--
+<?php
+error_reporting(E_ALL);
+$var11 = new StdClass();
+$var16 = error_reporting($var11);
+?>
+--EXPECTF--
+Catchable fatal error: Object of class stdClass could not be converted to string in %sbug72162.php on line %d
diff --git a/Zend/tests/bug72177.phpt b/Zend/tests/bug72177.phpt
new file mode 100644
index 0000000000..b5658d354a
--- /dev/null
+++ b/Zend/tests/bug72177.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue()
+--FILE--
+<?php
+class Child
+{
+ protected $bar;
+
+ public function __destruct()
+ {
+ $this->bar = null;
+ }
+}
+
+class Parnt
+{
+ protected $child;
+
+ public function doSomething()
+ {
+ $this->child = new Child();
+
+ $prop = new \ReflectionProperty($this, 'child');
+ $prop->setAccessible(true);
+ $prop->setValue($this, null);
+ }
+}
+
+$p = new Parnt();
+$p->doSomething();
+
+echo "OK\n";
+?>
+--EXPECT--
+OK
diff --git a/Zend/tests/bug72177_2.phpt b/Zend/tests/bug72177_2.phpt
new file mode 100644
index 0000000000..718d6c061e
--- /dev/null
+++ b/Zend/tests/bug72177_2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue()
+--FILE--
+<?php
+class Foo
+{
+ private $bar = 'bar';
+
+ public function __construct()
+ {
+ unset($this->bar);
+ }
+}
+
+class Bar extends Foo
+{
+ private $baz = 'baz';
+ private static $tab = 'tab';
+
+ public function __get(string $name)
+ {
+ var_dump($this->baz);
+ var_dump(self::$tab);
+ return $name;
+ }
+}
+
+$r = new ReflectionProperty(Foo::class, 'bar');
+
+$r->setAccessible(true);
+echo "OK\n";
+?>
+--EXPECT--
+OK
diff --git a/Zend/tests/bug72188.phpt b/Zend/tests/bug72188.phpt
new file mode 100644
index 0000000000..0deab6b81b
--- /dev/null
+++ b/Zend/tests/bug72188.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #72188 (Nested try/finally blocks losing return value)
+--FILE--
+<?php
+function test() {
+ try {
+ return 5;
+ } finally {
+ try {
+ echo 1;
+ } finally {
+ echo 2;
+ }
+ }
+}
+
+
+
+$a = test();
+if($a !== 5) {
+ echo "FAILED: expected 5, received ", var_export($a), PHP_EOL;
+} else {
+ echo "Passed", PHP_EOL;
+}
+?>
+--EXPECT--
+12Passed
diff --git a/Zend/tests/bug72221.phpt b/Zend/tests/bug72221.phpt
new file mode 100644
index 0000000000..8f30099cab
--- /dev/null
+++ b/Zend/tests/bug72221.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #72221 (Segmentation fault in stream_get_line / zend_memnstr_ex)
+--FILE--
+<?php
+$fp = fopen("php://memory", "r+");
+fwrite($fp, str_repeat("baad", 1024*1024));
+rewind($fp);
+stream_get_line($fp, 1024*1024*2, "aaaa");
+echo "Done\n";
+--EXPECT--
+Done
diff --git a/Zend/tests/bug72335.phpt b/Zend/tests/bug72335.phpt
new file mode 100644
index 0000000000..854de34281
--- /dev/null
+++ b/Zend/tests/bug72335.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Misoptimize due to type narrowing
+--FILE--
+<?php
+
+function test() {
+ $b = false;
+ $x = (1<<53)+1;
+ do {
+ $x = 1.0 * ($x - (1<<53));
+ } while ($b);
+ return $x;
+}
+var_dump(test());
+
+?>
+--EXPECT--
+float(1)
diff --git a/Zend/tests/bug72373.phpt b/Zend/tests/bug72373.phpt
new file mode 100644
index 0000000000..67377c5ba7
--- /dev/null
+++ b/Zend/tests/bug72373.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #72373: TypeError after Generator function w/declared return type finishes
+--FILE--
+<?php
+
+function foo() : Generator {
+ yield 1;
+ yield 2;
+ yield 3;
+}
+
+foreach (foo() as $bar) {
+ echo $bar . "\n";
+}
+
+?>
+--EXPECT--
+1
+2
+3
diff --git a/Zend/tests/call_user_func_array_prefer_ref.phpt b/Zend/tests/call_user_func_array_prefer_ref.phpt
new file mode 100644
index 0000000000..d7a5fd913a
--- /dev/null
+++ b/Zend/tests/call_user_func_array_prefer_ref.phpt
@@ -0,0 +1,73 @@
+--TEST--
+call_user_func_array() passes value to prefer-ref arg if element wasn't a reference
+--FILE--
+<?php
+
+namespace {
+ call_user_func_array('array_multisort', [[3, 2, 1]]);
+
+ $args = [[3, 2, 1]];
+ call_user_func_array('array_multisort', $args);
+ var_dump($args);
+ unset($args);
+
+ $array = [3, 2, 1];
+ call_user_func('array_multisort', $array);
+ var_dump($array);
+ unset($array);
+}
+
+namespace Foo {
+ call_user_func_array('array_multisort', [[3, 2, 1]]);
+
+ $args = [[3, 2, 1]];
+ call_user_func_array('array_multisort', $args);
+ var_dump($args);
+ unset($args);
+
+ $array = [3, 2, 1];
+ call_user_func('array_multisort', $array);
+ var_dump($array);
+ unset($array);
+}
+
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(2)
+ [2]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(2)
+ [2]=>
+ int(1)
+}
+array(1) {
+ [0]=>
+ array(3) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(2)
+ [2]=>
+ int(1)
+ }
+}
+array(3) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(2)
+ [2]=>
+ int(1)
+}
diff --git a/Zend/tests/closure_033.phpt b/Zend/tests/closure_033.phpt
index d92716aacc..c83a53898d 100644
--- a/Zend/tests/closure_033.phpt
+++ b/Zend/tests/closure_033.phpt
@@ -23,7 +23,7 @@ $o->func();
?>
===DONE===
--EXPECTF--
-Test::{closure}()
+{closure}()
Fatal error: Uncaught Error: Call to private method Test::func() from context '' in %sclosure_033.php:%d
Stack trace:
diff --git a/Zend/tests/closure_041.phpt b/Zend/tests/closure_041.phpt
index 947517b4ed..a7e9eab482 100644
--- a/Zend/tests/closure_041.phpt
+++ b/Zend/tests/closure_041.phpt
@@ -53,9 +53,9 @@ $d = $nonstaticScoped->bindTo(null); $d(); echo "\n";
$d->bindTo($d);
echo "After binding, with same-class instance for the bound ones", "\n";
-$d = $staticUnscoped->bindTo(new A); $d(); echo "\n";
+$d = $staticUnscoped->bindTo(new A);
$d = $nonstaticUnscoped->bindTo(new A); $d(); echo " (should be scoped to dummy class)\n";
-$d = $staticScoped->bindTo(new A); $d(); echo "\n";
+$d = $staticScoped->bindTo(new A);
$d = $nonstaticScoped->bindTo(new A); $d(); echo "\n";
echo "After binding, with different instance for the bound ones", "\n";
@@ -87,14 +87,10 @@ After binding, with same-class instance for the bound ones
Warning: Cannot bind an instance to a static closure in %s on line %d
scoped to A: bool(false)
-bound: no
-scoped to A: bool(false)
bound: A (should be scoped to dummy class)
Warning: Cannot bind an instance to a static closure in %s on line %d
scoped to A: bool(true)
-bound: no
-scoped to A: bool(true)
bound: A
After binding, with different instance for the bound ones
scoped to A: bool(false)
diff --git a/Zend/tests/closure_043.phpt b/Zend/tests/closure_043.phpt
index 98c88fda39..92b96575b5 100644
--- a/Zend/tests/closure_043.phpt
+++ b/Zend/tests/closure_043.phpt
@@ -26,16 +26,16 @@ $d = $staticUnscoped->bindTo(null, null); $d(); echo "\n";
$d = $staticScoped->bindTo(null, null); $d(); echo "\n";
echo "After binding, null scope, with instance", "\n";
-$d = $staticUnscoped->bindTo(new A, null); $d(); echo "\n";
-$d = $staticScoped->bindTo(new A, null); $d(); echo "\n";
+$d = $staticUnscoped->bindTo(new A, null);
+$d = $staticScoped->bindTo(new A, null);
echo "After binding, with scope, no instance", "\n";
$d = $staticUnscoped->bindTo(null, 'A'); $d(); echo "\n";
$d = $staticScoped->bindTo(null, 'A'); $d(); echo "\n";
echo "After binding, with scope, with instance", "\n";
-$d = $staticUnscoped->bindTo(new A, 'A'); $d(); echo "\n";
-$d = $staticScoped->bindTo(new A, 'A'); $d(); echo "\n";
+$d = $staticUnscoped->bindTo(new A, 'A');
+$d = $staticScoped->bindTo(new A, 'A');
echo "Done.\n";
@@ -57,14 +57,8 @@ bool(false)
After binding, null scope, with instance
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(false)
-bool(false)
-
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(false)
-bool(false)
-
After binding, with scope, no instance
bool(true)
bool(false)
@@ -75,12 +69,6 @@ bool(false)
After binding, with scope, with instance
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(true)
-bool(false)
-
Warning: Cannot bind an instance to a static closure in %s on line %d
-bool(true)
-bool(false)
-
Done.
diff --git a/Zend/tests/closure_059.phpt b/Zend/tests/closure_059.phpt
index 1ee7fe6695..299d8f5d9d 100644
--- a/Zend/tests/closure_059.phpt
+++ b/Zend/tests/closure_059.phpt
@@ -1,5 +1,5 @@
--TEST--
-Closure 059: Closure type hinting
+Closure 059: Closure type declaration
--FILE--
<?php
class A {
diff --git a/Zend/tests/closure_061.phpt b/Zend/tests/closure_061.phpt
new file mode 100644
index 0000000000..1aa579a409
--- /dev/null
+++ b/Zend/tests/closure_061.phpt
@@ -0,0 +1,241 @@
+--TEST--
+Rebinding of ::getClosure()s
+--FILE--
+<?php
+
+use SplDoublyLinkedList as DLL;
+
+function func($arg) { }
+
+class Cls {
+ public function method() {}
+ public static function staticMethod($arg) {}
+}
+
+class ClsChild extends Cls {}
+
+class ClsUnrelated {}
+
+/* Format: [Function, [Obj, Scope]] */
+$tests = [
+ ['func', [
+ [null, null],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, 'Cls'],
+ [null, 'stdClass'],
+ [new stdClass, null],
+ ]],
+
+ ['strlen', [
+ [null, null],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, 'Cls'],
+ [null, 'stdClass'],
+ [new stdClass, null],
+ ]],
+
+ [['Cls', 'staticMethod'], [
+ [null, 'Cls'],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, null],
+ [null, 'ClsChild'],
+ [null, 'ClsUnrelated'],
+ ]],
+
+ [[new Cls, 'method'], [
+ [null, 'Cls'],
+ [new Cls, 'Cls'],
+ [new ClsChild, 'Cls'],
+ [new ClsUnrelated, 'Cls'],
+ [new Cls, null],
+ [new Cls, 'ClsUnrelated'],
+ [new Cls, 'ClsChild'],
+ ]],
+
+ [[new DLL, 'count'], [
+ [new DLL, DLL::class],
+ [new SplStack, DLL::class],
+ [new ClsUnrelated, DLL::class],
+ [null, null],
+ [null, DLL::class],
+ [new DLL, null],
+ [new DLL, ClsUnrelated::class],
+ ]],
+
+ [function() {}, [
+ [null, null],
+ [new Cls, null],
+ [new Cls, 'Cls'],
+ [null, 'Cls'],
+ [null, 'stdClass'],
+ [new stdClass, null],
+ ]],
+];
+
+set_error_handler(function($errno, $errstr) {
+ echo "$errstr\n\n";
+});
+
+foreach ($tests as list($fn, $bindings)) {
+ if (is_array($fn)) {
+ $r = new ReflectionMethod($fn[0], $fn[1]);
+ $c = $r->getClosure(is_object($fn[0]) ? $fn[0] : null);
+ $fnStr = is_object($fn[0]) ? "(new " . get_class($fn[0]) . ")->$fn[1]" : "$fn[0]::$fn[1]";
+ } else {
+ $c = (new ReflectionFunction($fn))->getClosure();
+ $fnStr = $fn;
+ }
+ if ($fn instanceof Closure) {
+ $fnStr = "(function() {})";
+ }
+
+ echo "$fnStr()\n" . str_repeat('-', strlen($fnStr) + 2), "\n\n";
+
+ foreach ($bindings as list($obj, $scope)) {
+ $objStr = $obj ? "new " . get_class($obj) : "null";
+ $scopeStr = $scope ? "$scope::class" : "null";
+ echo "bindTo($objStr, $scopeStr):\n";
+
+ $ret = $c->bindTo($obj, $scope);
+ if ($ret !== null) {
+ echo "Success!\n\n";
+ }
+ }
+}
+
+?>
+--EXPECT--
+func()
+------
+
+bindTo(null, null):
+Success!
+
+bindTo(new Cls, null):
+Success!
+
+bindTo(new Cls, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, stdClass::class):
+Cannot bind closure to scope of internal class stdClass
+
+bindTo(new stdClass, null):
+Success!
+
+strlen()
+--------
+
+bindTo(null, null):
+Success!
+
+bindTo(new Cls, null):
+Success!
+
+bindTo(new Cls, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, Cls::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, stdClass::class):
+Cannot bind closure to scope of internal class stdClass
+
+bindTo(new stdClass, null):
+Success!
+
+Cls::staticMethod()
+-------------------
+
+bindTo(null, Cls::class):
+Success!
+
+bindTo(new Cls, null):
+Cannot bind an instance to a static closure
+
+bindTo(new Cls, Cls::class):
+Cannot bind an instance to a static closure
+
+bindTo(null, null):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, ClsChild::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(null, ClsUnrelated::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+(new Cls)->method()
+-------------------
+
+bindTo(null, Cls::class):
+Success!
+
+bindTo(new Cls, Cls::class):
+Success!
+
+bindTo(new ClsChild, Cls::class):
+Success!
+
+bindTo(new ClsUnrelated, Cls::class):
+Cannot bind method Cls::method() to object of class ClsUnrelated
+
+bindTo(new Cls, null):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(new Cls, ClsUnrelated::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(new Cls, ClsChild::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+(new SplDoublyLinkedList)->count()
+----------------------------------
+
+bindTo(new SplDoublyLinkedList, SplDoublyLinkedList::class):
+Success!
+
+bindTo(new SplStack, SplDoublyLinkedList::class):
+Success!
+
+bindTo(new ClsUnrelated, SplDoublyLinkedList::class):
+Cannot bind method SplDoublyLinkedList::count() to object of class ClsUnrelated
+
+bindTo(null, null):
+Cannot unbind $this of internal method
+
+bindTo(null, SplDoublyLinkedList::class):
+Cannot unbind $this of internal method
+
+bindTo(new SplDoublyLinkedList, null):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+bindTo(new SplDoublyLinkedList, ClsUnrelated::class):
+Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()
+
+(function() {})()
+-----------------
+
+bindTo(null, null):
+Success!
+
+bindTo(new Cls, null):
+Success!
+
+bindTo(new Cls, Cls::class):
+Success!
+
+bindTo(null, Cls::class):
+Success!
+
+bindTo(null, stdClass::class):
+Cannot bind closure to scope of internal class stdClass
+
+bindTo(new stdClass, null):
+Success!
diff --git a/Zend/tests/closure_call.phpt b/Zend/tests/closure_call.phpt
index e8bed36aec..f665c67ff6 100644
--- a/Zend/tests/closure_call.phpt
+++ b/Zend/tests/closure_call.phpt
@@ -61,7 +61,7 @@ int(0)
int(0)
int(3)
-Warning: Cannot bind closure to object of internal class stdClass in %s line %d
+Warning: Cannot bind closure to scope of internal class stdClass in %s line %d
NULL
int(21)
int(3)
diff --git a/Zend/tests/closure_invoke_case_insensitive.phpt b/Zend/tests/closure_invoke_case_insensitive.phpt
new file mode 100644
index 0000000000..d41d58a747
--- /dev/null
+++ b/Zend/tests/closure_invoke_case_insensitive.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Closure::__invoke() is case insensitive
+--FILE--
+<?php
+
+$inc = function(&$n) {
+ $n++;
+};
+
+$n = 1;
+$inc->__INVOKE($n);
+var_dump($n);
+
+?>
+--EXPECT--
+int(2)
diff --git a/Zend/tests/closure_use_auto_global.phpt b/Zend/tests/closure_use_auto_global.phpt
new file mode 100644
index 0000000000..9ab0897e12
--- /dev/null
+++ b/Zend/tests/closure_use_auto_global.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Cannot use() auto-global
+--FILE--
+<?php
+
+function test() {
+ $fn = function() use($GLOBALS) {
+ var_dump($GLOBALS);
+ };
+ $fn();
+}
+test();
+
+?>
+--EXPECTF--
+Fatal error: Cannot use auto-global as lexical variable in %s on line %d
diff --git a/Zend/tests/closure_use_parameter_name.phpt b/Zend/tests/closure_use_parameter_name.phpt
new file mode 100644
index 0000000000..7ecc6d8dd1
--- /dev/null
+++ b/Zend/tests/closure_use_parameter_name.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Can't use name of lexical variable for parameter
+--FILE--
+<?php
+
+$a = 1;
+$fn = function ($a) use ($a) {
+ var_dump($a);
+};
+$fn(2);
+
+?>
+--EXPECTF--
+Fatal error: Cannot use lexical variable $a as a parameter name in %s on line %d
diff --git a/Zend/tests/closure_use_variable_twice.phpt b/Zend/tests/closure_use_variable_twice.phpt
new file mode 100644
index 0000000000..06c2645809
--- /dev/null
+++ b/Zend/tests/closure_use_variable_twice.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Closure cannot use one variable twice
+--FILE--
+<?php
+
+$a = 1;
+$fn = function() use ($a, &$a) {
+ $a = 2;
+};
+$fn();
+var_dump($a);
+
+?>
+--EXPECTF--
+Fatal error: Cannot use variable $a twice in %s on line %d
diff --git a/Zend/tests/concat_003.phpt b/Zend/tests/concat_003.phpt
new file mode 100644
index 0000000000..07fabd1113
--- /dev/null
+++ b/Zend/tests/concat_003.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Concatenating many small strings should not slowdown allocations
+--SKIPIF--
+<?php if (PHP_DEBUG) { die ("skip debug version is slow"); } ?>
+--INI--
+memory_limit=256m
+--FILE--
+<?php
+
+/* To note is that memory usage can vary depending on whether opcache is on. The actual
+ measuring that matters is timing here. */
+
+$time = microtime(TRUE);
+
+/* This might vary on Linux/Windows, so the worst case and also count in slow machines. */
+$t0_max = 0.1;
+$t1_max = 0.4;
+
+$datas = [];
+for ($i = 0; $i < 220000; $i++)
+{
+ $datas[] = [
+ '000.000.000.000',
+ '000.255.255.255',
+ 'ä¿ç•™åœ°å€',
+ 'ä¿ç•™åœ°å€',
+ 'ä¿ç•™åœ°å€',
+ 'ä¿ç•™åœ°å€',
+ 'ä¿ç•™åœ°å€',
+ 'ä¿ç•™åœ°å€',
+ ];
+}
+
+$t0 = microtime(TRUE) - $time;
+var_dump($t0 < $t0_max);
+
+
+$texts = '';
+foreach ($datas AS $data)
+{
+ $texts .= implode("\t", $data) . "\r\n";
+}
+
+$t1 = microtime(TRUE) - $time;
+var_dump($t1 < $t1_max);
+
+?>
++++DONE+++
+--EXPECT--
+bool(true)
+bool(true)
++++DONE+++
diff --git a/Zend/tests/constant_expressions_coalesce.phpt b/Zend/tests/constant_expressions_coalesce.phpt
new file mode 100644
index 0000000000..425aba69c4
--- /dev/null
+++ b/Zend/tests/constant_expressions_coalesce.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Constant expressions with null coalescing operator ??
+--FILE--
+<?php
+
+const A = [1 => [[]]];
+
+const T_1 = null ?? A[1]['undefined']['index'] ?? 1;
+const T_2 = null ?? A['undefined']['index'] ?? 2;
+const T_3 = null ?? A[1][0][2] ?? 3;
+const T_4 = A[1][0][2] ?? 4;
+const T_5 = null ?? __LINE__;
+const T_6 = __LINE__ ?? "bar";
+
+var_dump(T_1);
+var_dump(T_2);
+var_dump(T_3);
+var_dump(T_4);
+var_dump(T_5);
+var_dump(T_6);
+
+var_dump((function(){ static $var = null ?? A[1]['undefined']['index'] ?? 1; return $var; })());
+var_dump((function(){ static $var = null ?? A['undefined']['index'] ?? 2; return $var; })());
+var_dump((function(){ static $var = null ?? A[1][0][2] ?? 3; return $var; })());
+var_dump((function(){ static $var = A[1][0][2] ?? 4; return $var; })());
+
+var_dump((new class { public $var = null ?? A[1]['undefined']['index'] ?? 1; })->var);
+var_dump((new class { public $var = null ?? A['undefined']['index'] ?? 2; })->var);
+var_dump((new class { public $var = null ?? A[1][0][2] ?? 3; })->var);
+var_dump((new class { public $var = A[1][0][2] ?? 4; })->var);
+
+?>
+--EXPECTF--
+int(1)
+int(2)
+int(3)
+int(4)
+int(%d)
+int(%d)
+int(1)
+int(2)
+int(3)
+int(4)
+int(1)
+int(2)
+int(3)
+int(4)
diff --git a/Zend/tests/constant_expressions_coalesce_empty_dim.phpt b/Zend/tests/constant_expressions_coalesce_empty_dim.phpt
new file mode 100644
index 0000000000..56ee43b789
--- /dev/null
+++ b/Zend/tests/constant_expressions_coalesce_empty_dim.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Constant expressions with empty dimension fetch on coalesce
+--FILE--
+<?php
+
+const A = [][] ?? 1;
+
+?>
+--EXPECTF--
+Fatal error: Cannot use [] for reading in %s.php on line %d
+
diff --git a/Zend/tests/constant_expressions_dynamic.phpt b/Zend/tests/constant_expressions_dynamic.phpt
index d4e06ee258..686dcc1d11 100644
--- a/Zend/tests/constant_expressions_dynamic.phpt
+++ b/Zend/tests/constant_expressions_dynamic.phpt
@@ -35,14 +35,18 @@ const T_19 = [
false => false,
true => true,
];
+eval("const T_20x = 'a';");
+const T_20 = null ?: (T_20x . 'bc');
var_dump(
T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9, T_10,
- T_11, T_12, T_13, T_14, T_15, T_16, T_17, T_18, T_19
+ T_11, T_12, T_13, T_14, T_15, T_16, T_17, T_18, T_19, T_20
);
?>
---EXPECT--
+--EXPECTF--
+
+Warning: A non-numeric value encountered in %s on line %d
int(3)
string(4) "1foo"
bool(false)
@@ -75,3 +79,4 @@ array(6) {
[1]=>
bool(true)
}
+string(3) "abc"
diff --git a/Zend/tests/constant_expressions_self_referencing_array.phpt b/Zend/tests/constant_expressions_self_referencing_array.phpt
index 63f2b20ef5..c584b5d503 100644
--- a/Zend/tests/constant_expressions_self_referencing_array.phpt
+++ b/Zend/tests/constant_expressions_self_referencing_array.phpt
@@ -9,7 +9,7 @@ class A {
var_dump(A::FOO);
?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::FOO' in %s:%d
+Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::BAR' in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
diff --git a/Zend/tests/declare_005.phpt b/Zend/tests/declare_005.phpt
new file mode 100644
index 0000000000..8f5adcfbd2
--- /dev/null
+++ b/Zend/tests/declare_005.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Testing declare statement with ticks
+--SKIPIF--
+--FILE--
+<?php
+register_tick_function(function () { echo "tick\n"; });
+function foo() { }
+
+declare(ticks=1) {
+
+$statement;
+foo();
+
+}
+?>
+--EXPECTF--
+tick
+tick
diff --git a/Zend/tests/dynamic_call_005.phpt b/Zend/tests/dynamic_call_005.phpt
new file mode 100644
index 0000000000..840e298b82
--- /dev/null
+++ b/Zend/tests/dynamic_call_005.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Dynamic calls to scope introspection functions are forbidden
+--FILE--
+<?php
+
+function test_calls($func) {
+ $i = 1;
+
+ array_map($func, [['i' => new stdClass]]);
+ var_dump($i);
+
+ $func(['i' => new stdClass]);
+ var_dump($i);
+
+ call_user_func($func, ['i' => new stdClass]);
+ var_dump($i);
+}
+test_calls('extract');
+
+?>
+--EXPECTF--
+Warning: Cannot call extract() dynamically in %s on line %d
+int(1)
+
+Warning: Cannot call extract() dynamically in %s on line %d
+int(1)
+
+Warning: Cannot call extract() dynamically in %s on line %d
+int(1)
diff --git a/Zend/tests/dynamic_call_006.phpt b/Zend/tests/dynamic_call_006.phpt
new file mode 100644
index 0000000000..058e22fda0
--- /dev/null
+++ b/Zend/tests/dynamic_call_006.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Dynamic calls to scope introspection functions are forbidden (function variations)
+--FILE--
+<?php
+function test() {
+ $func = 'extract';
+ $func(['a' => 'b']);
+
+ $func = 'compact';
+ $func(['a']);
+
+ $func = 'parse_str';
+ $func('a=b');
+
+ $func = 'get_defined_vars';
+ $func();
+
+ $func = 'assert';
+ $func('1==2');
+
+ $func = 'func_get_args';
+ $func();
+
+ $func = 'func_get_arg';
+ $func(1);
+
+ $func = 'func_num_args';
+ $func();
+}
+test();
+
+?>
+--EXPECTF--
+Warning: Cannot call extract() dynamically in %s on line %d
+
+Warning: Cannot call compact() dynamically in %s on line %d
+
+Warning: Cannot call parse_str() with a single argument dynamically in %s on line %d
+
+Warning: Cannot call get_defined_vars() dynamically in %s on line %d
+
+Warning: Cannot call assert() with string argument dynamically in %s on line %d
+
+Warning: Cannot call func_get_args() dynamically in %s on line %d
+
+Warning: Cannot call func_get_arg() dynamically in %s on line %d
+
+Warning: Cannot call func_num_args() dynamically in %s on line %d
diff --git a/Zend/tests/dynamic_call_007.phpt b/Zend/tests/dynamic_call_007.phpt
new file mode 100644
index 0000000000..61ae182914
--- /dev/null
+++ b/Zend/tests/dynamic_call_007.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Dynamic calls to scope introspection functions are forbidden (misoptimization)
+--FILE--
+<?php
+
+function test() {
+ $i = 1;
+ array_map('extract', [['i' => new stdClass]]);
+ $i += 1;
+ var_dump($i);
+}
+test();
+
+?>
+--EXPECTF--
+Warning: Cannot call extract() dynamically in %s on line %d
+int(2)
diff --git a/Zend/tests/dynamic_call_008.phpt b/Zend/tests/dynamic_call_008.phpt
new file mode 100644
index 0000000000..24240472d1
--- /dev/null
+++ b/Zend/tests/dynamic_call_008.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Don't optimize dynamic call to non-dynamic one if it drops the warning
+--FILE--
+<?php
+
+function test() {
+ ((string) 'extract')(['a' => 42]);
+}
+test();
+
+?>
+--EXPECTF--
+Warning: Cannot call extract() dynamically in %s on line %d
diff --git a/Zend/tests/dynamic_fully_qualified_call.phpt b/Zend/tests/dynamic_fully_qualified_call.phpt
new file mode 100644
index 0000000000..cca6fa38b6
--- /dev/null
+++ b/Zend/tests/dynamic_fully_qualified_call.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Crash when using dynamic call syntax with fully qualified name in a namespace
+--FILE--
+<?php
+
+namespace Foo;
+try {
+ ('\bar')();
+} catch (\Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+Call to undefined function bar()
diff --git a/Zend/tests/each_002.phpt b/Zend/tests/each_002.phpt
index f47ded4b14..31b749e5fd 100644
--- a/Zend/tests/each_002.phpt
+++ b/Zend/tests/each_002.phpt
@@ -3,10 +3,12 @@ Testing each() with array and object
--FILE--
<?php
-$foo = each(new stdClass);
+$a = new stdClass;
+$foo = each($a);
var_dump($foo);
-var_dump(each(new stdClass));
+$a = new stdClass;
+var_dump(each($a));
$a = array(new stdClass);
var_dump(each($a));
diff --git a/Zend/tests/empty_str_offset.phpt b/Zend/tests/empty_str_offset.phpt
index 486c052dc4..49e175dd21 100644
--- a/Zend/tests/empty_str_offset.phpt
+++ b/Zend/tests/empty_str_offset.phpt
@@ -8,6 +8,8 @@ print "- empty ---\n";
$str = "test0123";
var_dump(empty($str[-1]));
+var_dump(empty($str[-10]));
+var_dump(empty($str[-4])); // 0
var_dump(empty($str[0]));
var_dump(empty($str[1]));
var_dump(empty($str[4])); // 0
@@ -17,6 +19,8 @@ var_dump(empty($str[10000]));
// non-numeric offsets
print "- string ---\n";
var_dump(empty($str['-1']));
+var_dump(empty($str['-10']));
+var_dump(empty($str['-4'])); // 0
var_dump(empty($str['0']));
var_dump(empty($str['1']));
var_dump(empty($str['4'])); // 0
@@ -31,6 +35,8 @@ print "- null ---\n";
var_dump(empty($str[null]));
print "- double ---\n";
var_dump(empty($str[-1.1]));
+var_dump(empty($str[-10.5]));
+var_dump(empty($str[-4.1]));
var_dump(empty($str[-0.8]));
var_dump(empty($str[-0.1]));
var_dump(empty($str[0.2]));
@@ -50,6 +56,8 @@ print "done\n";
?>
--EXPECTF--
- empty ---
+bool(false)
+bool(true)
bool(true)
bool(false)
bool(false)
@@ -58,6 +66,8 @@ bool(false)
bool(true)
bool(true)
- string ---
+bool(false)
+bool(true)
bool(true)
bool(false)
bool(false)
@@ -72,6 +82,8 @@ bool(true)
- null ---
bool(false)
- double ---
+bool(false)
+bool(true)
bool(true)
bool(false)
bool(false)
diff --git a/Zend/tests/entry_block_with_predecessors.phpt b/Zend/tests/entry_block_with_predecessors.phpt
new file mode 100644
index 0000000000..ffc3147f1c
--- /dev/null
+++ b/Zend/tests/entry_block_with_predecessors.phpt
@@ -0,0 +1,33 @@
+--TEST--
+For SSA form the entry block should have no predecessors
+--FILE--
+<?php
+
+function test() {
+ while (true) {
+ var_dump($a + 1);
+ $a = 1;
+ if (@$i++) {
+ break;
+ }
+ }
+}
+
+function test2() {
+ while (true) {
+ $a = 42;
+ if (@$i++ > 1) {
+ break;
+ }
+ $a = new stdClass;
+ }
+}
+
+test();
+test2();
+
+?>
+--EXPECTF--
+Notice: Undefined variable: a in %s on line %d
+int(1)
+int(2)
diff --git a/Zend/tests/errmsg_013.phpt b/Zend/tests/errmsg_013.phpt
index d1f248ec28..327d75eae7 100644
--- a/Zend/tests/errmsg_013.phpt
+++ b/Zend/tests/errmsg_013.phpt
@@ -1,5 +1,5 @@
--TEST--
-errmsg: default value for parameters with array type hint can only be an array or NULL
+errmsg: default value for parameters with array type can only be an array or NULL
--FILE--
<?php
@@ -11,4 +11,4 @@ class test {
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Default value for parameters with array type hint can only be an array or NULL in %s on line %d
+Fatal error: Default value for parameters with array type can only be an array or NULL in %s on line %d
diff --git a/Zend/tests/exception_023.phpt b/Zend/tests/exception_023.phpt
new file mode 100644
index 0000000000..34de77a476
--- /dev/null
+++ b/Zend/tests/exception_023.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Ensure proper backtraces with anon classes
+--FILE--
+<?php
+
+(function($obj) {
+ throw new Exception();
+})(new class {});
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Exception in %s:%d
+Stack trace:
+#0 %s(%d): {closure}(Object(class@anonymous))
+#1 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/exception_in_nested_rope.phpt b/Zend/tests/exception_in_nested_rope.phpt
new file mode 100644
index 0000000000..df0d6fbf8d
--- /dev/null
+++ b/Zend/tests/exception_in_nested_rope.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Exception during nested rope
+--FILE--
+<?php
+
+set_error_handler(function() { throw new Exception; });
+
+try {
+ $a = "foo";
+ $str = "$a${"y$a$a"}y";
+} catch (Exception $e) {
+ echo "Exception\n";
+}
+
+?>
+--EXPECT--
+Exception
diff --git a/Zend/tests/exception_in_rope_end.phpt b/Zend/tests/exception_in_rope_end.phpt
new file mode 100644
index 0000000000..3e6402c60f
--- /dev/null
+++ b/Zend/tests/exception_in_rope_end.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Exception during rope finalization
+--FILE--
+<?php
+
+set_error_handler(function() { throw new Exception; });
+
+try {
+ $b = "foo";
+ $str = "y$b$a";
+} catch (Exception $e) {
+ echo "Exception\n";
+}
+
+?>
+--EXPECT--
+Exception
diff --git a/Zend/tests/foreach_017.phpt b/Zend/tests/foreach_017.phpt
index 55eeeb0891..e27b04c934 100644
--- a/Zend/tests/foreach_017.phpt
+++ b/Zend/tests/foreach_017.phpt
@@ -45,7 +45,7 @@ $done = 0;
$a = [0,1,2,3,4];
foreach($a as &$v) {
echo "$v\n";
- if ($done && $v == 3) {
+ if (!$done && $v == 3) {
$done = 1;
array_splice($a, 1, 2, $replacement);
}
diff --git a/Zend/tests/foreach_list_keyed.phpt b/Zend/tests/foreach_list_keyed.phpt
new file mode 100644
index 0000000000..f5fab4e342
--- /dev/null
+++ b/Zend/tests/foreach_list_keyed.phpt
@@ -0,0 +1,36 @@
+--TEST--
+foreach with list syntax, keyed
+--FILE--
+<?php
+
+$points = [
+ ["x" => 1, "y" => 2],
+ ["x" => 2, "y" => 1]
+];
+
+foreach ($points as list("x" => $x, "y" => $y)) {
+ var_dump($x, $y);
+}
+
+echo PHP_EOL;
+
+$invertedPoints = [
+ "x" => [1, 2],
+ "y" => [2, 1]
+];
+
+foreach ($invertedPoints as list(0 => $row1, 1 => $row2)) {
+ var_dump($row1, $row2);
+}
+
+?>
+--EXPECT--
+int(1)
+int(2)
+int(2)
+int(1)
+
+int(1)
+int(2)
+int(2)
+int(1)
diff --git a/Zend/tests/func_get_args.phpt b/Zend/tests/func_get_args.phpt
new file mode 100644
index 0000000000..eea8ae4354
--- /dev/null
+++ b/Zend/tests/func_get_args.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Testing func_get_args()
+--FILE--
+<?php
+
+func_get_args();
+
+?>
+--EXPECTF--
+Warning: func_get_args(): Called from the global scope - no function context in %s on line 3
diff --git a/Zend/tests/gc_013.phpt b/Zend/tests/gc_013.phpt
index 9209ca2b40..0c5424086a 100644
--- a/Zend/tests/gc_013.phpt
+++ b/Zend/tests/gc_013.phpt
@@ -10,9 +10,9 @@ for ($i = 0; $i < 10001; $i++) {
}
$a[] = "xxx";
unset($a);
-var_dump(gc_collect_cycles());
+var_dump(gc_collect_cycles() > 0);
echo "ok\n";
?>
--EXPECT--
-int(2)
+bool(true)
ok
diff --git a/Zend/tests/gc_014.phpt b/Zend/tests/gc_014.phpt
index cd5a15e681..4fd8948af5 100644
--- a/Zend/tests/gc_014.phpt
+++ b/Zend/tests/gc_014.phpt
@@ -12,9 +12,9 @@ for ($i = 0; $i < 10001; $i++) {
unset($b);
$a->b = "xxx";
unset($a);
-var_dump(gc_collect_cycles());
+var_dump(gc_collect_cycles() > 0);
echo "ok\n";
?>
--EXPECT--
-int(2)
+bool(true)
ok
diff --git a/Zend/tests/gc_015.phpt b/Zend/tests/gc_015.phpt
index df85836ed8..24acddeae1 100644
--- a/Zend/tests/gc_015.phpt
+++ b/Zend/tests/gc_015.phpt
@@ -12,9 +12,9 @@ $a->b = "xxx";
unset($c);
unset($a);
unset($b);
-var_dump(gc_collect_cycles());
+var_dump(gc_collect_cycles() > 0);
echo "ok\n";
?>
--EXPECT--
-int(2)
+bool(true)
ok
diff --git a/Zend/tests/gc_017.phpt b/Zend/tests/gc_017.phpt
index 50be61025f..a1a8c3eaf6 100644
--- a/Zend/tests/gc_017.phpt
+++ b/Zend/tests/gc_017.phpt
@@ -10,7 +10,6 @@ class Node {
public $parent;
function __construct($name) {
$this->name = $name;
- $this->children = array();
$this->parent = null;
}
function insert($node) {
@@ -32,12 +31,12 @@ $a->insert($c);
unset($a);
unset($b);
unset($c);
-var_dump(gc_collect_cycles());
+var_dump(gc_collect_cycles() >= 7);
echo "ok\n"
?>
--EXPECTF--
string(1) "%s"
string(1) "%s"
string(1) "%s"
-int(10)
+bool(true)
ok
diff --git a/Zend/tests/generators/bug70904.phpt b/Zend/tests/generators/bug70904.phpt
new file mode 100644
index 0000000000..cd00e0bb34
--- /dev/null
+++ b/Zend/tests/generators/bug70904.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #70904 (yield from incorrectly marks valid generator as finished)
+--FILE--
+<?php
+
+function g1() {
+ yield 1;
+}
+
+function g2($g1) {
+ yield from $g1;
+ echo "reached!\n";
+ yield 2;
+}
+
+$g1 = g1();
+$g2 = g2($g1);
+
+var_dump($g2->valid());
+var_dump($g2->current());
+$g1->next();
+var_dump($g1->valid());
+var_dump($g2->valid());
+var_dump($g2->current());
+$g2->next();
+var_dump($g2->valid());
+var_dump($g2->current());
+$g2->next();
+var_dump($g2->valid());
+var_dump($g2->current());
+
+?>
+--EXPECT--
+bool(true)
+int(1)
+bool(false)
+bool(true)
+int(1)
+reached!
+bool(true)
+int(2)
+bool(false)
+NULL
diff --git a/Zend/tests/generators/bug70965.phpt b/Zend/tests/generators/bug70965.phpt
new file mode 100644
index 0000000000..4ed34fd640
--- /dev/null
+++ b/Zend/tests/generators/bug70965.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #70965 (yield from with a common iterator primes too much)
+--FILE--
+<?php
+
+function it() {
+ yield from [1, 2, 3, 4, 5];
+}
+
+function bar($g) {
+ yield from $g;
+}
+
+$gen = it();
+$gens[] = bar($gen);
+$gens[] = bar($gen);
+
+do {
+ foreach($gens as $g) {
+ var_dump($g->current());
+ $gen->next();
+ }
+} while ($gen->valid());
+
+?>
+--EXPECT--
+int(1)
+int(2)
+int(3)
+int(4)
+int(5)
+int(5)
diff --git a/Zend/tests/generators/bug71013.phpt b/Zend/tests/generators/bug71013.phpt
new file mode 100644
index 0000000000..6ede86e3ba
--- /dev/null
+++ b/Zend/tests/generators/bug71013.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Bug #71013 (Incorrect exception handler with yield from)
+--FILE--
+<?php
+
+class FooBar implements Iterator {
+ function __construct() { echo "Constructing new FooBar\n"; }
+ function __destruct() { echo "Destructing FooBar\n"; }
+ function current () { throw new Exception; }
+ function key () { return 0; }
+ function next () {}
+ function rewind () {}
+ function valid () { return true; }
+}
+
+function foo() {
+ try {
+ $f = new FooBar;
+ yield from $f;
+ } catch (Exception $e) {
+ echo "[foo()] Caught Exception\n";
+ }
+}
+
+function bar() {
+ echo "Starting bar()\n";
+ $x = foo();
+ try {
+ var_dump($x->current());
+ } catch (Exception $e) {
+ echo "[bar()] Caught Exception\n";
+ }
+ echo "Unsetting \$x\n";
+ unset($x);
+ echo "Finishing bar()\n";
+}
+
+bar();
+
+?>
+--EXPECT--
+Starting bar()
+Constructing new FooBar
+[foo()] Caught Exception
+Destructing FooBar
+NULL
+Unsetting $x
+Finishing bar()
+
diff --git a/Zend/tests/generators/bug71297.phpt b/Zend/tests/generators/bug71297.phpt
new file mode 100644
index 0000000000..eed7278601
--- /dev/null
+++ b/Zend/tests/generators/bug71297.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71297 (Memory leak with consecutive yield from)
+--FILE--
+<?php
+
+function foo() {
+ yield array_fill(0, 10000, 4);
+}
+
+function genLeak() {
+ $i = 0;
+ while (1) {
+ yield from foo();
+ print $i++;
+ }
+}
+
+$x = 0;
+foreach (genLeak() as $i) {
+ if ($x++ == 3) break;
+}
+
+?>
+--EXPECT--
+012
diff --git a/Zend/tests/generators/bug71441.phpt b/Zend/tests/generators/bug71441.phpt
new file mode 100644
index 0000000000..3a103888b0
--- /dev/null
+++ b/Zend/tests/generators/bug71441.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #71441 (Typehinted Generator with return in try/finally crashes)
+--FILE--
+<?php
+
+$num = 2000; /* to be sure to be in wild memory */
+$add = str_repeat("1 +", $num);
+$gen = (eval(<<<PHP
+return function (): \Generator {
+ try {
+ \$a = 1;
+ \$foo = \$a + $add \$a;
+ return yield \$foo;
+ } finally {
+ print "Ok\n";
+ }
+};
+PHP
+))();
+var_dump($gen->current());
+$gen->send("Success");
+var_dump($gen->getReturn());
+
+?>
+--EXPECT--
+int(2002)
+Ok
+string(7) "Success"
+
diff --git a/Zend/tests/generators/bug71601.phpt b/Zend/tests/generators/bug71601.phpt
new file mode 100644
index 0000000000..e3f21692e7
--- /dev/null
+++ b/Zend/tests/generators/bug71601.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #71601 (finally block not executed after yield from)
+--FILE--
+<?php
+
+function gen1() {
+ try {
+ yield 1;
+ yield 2;
+ return true;
+ } finally {
+ echo "Inner finally\n";
+ }
+}
+
+function gen2() {
+ try {
+ echo "Entered try/catch\n";
+ var_dump(yield from gen1());
+ } finally {
+ echo "Finally\n";
+ }
+}
+
+$generator = gen2();
+
+var_dump($generator->current());
+
+unset($generator);
+
+echo "Done\n";
+
+?>
+--EXPECT--
+Entered try/catch
+int(1)
+Inner finally
+Finally
+Done
+
diff --git a/Zend/tests/generators/dangling_send_target.phpt b/Zend/tests/generators/dangling_send_target.phpt
new file mode 100644
index 0000000000..c62c24a2f5
--- /dev/null
+++ b/Zend/tests/generators/dangling_send_target.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Yield from does not leave a dangling send target
+--FILE--
+<?php
+function gen1() {
+ yield from [yield];
+}
+
+$gen = gen1();
+$gen->send(new stdClass);
+
+function gen2() {
+ $x = yield;
+ yield from [1, 2, 3];
+}
+$gen = gen2();
+$gen->send(new stdClass);
+$gen->send(new stdClass);
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/Zend/tests/generators/gc_with_yield_from.phpt b/Zend/tests/generators/gc_with_yield_from.phpt
new file mode 100644
index 0000000000..8c05561990
--- /dev/null
+++ b/Zend/tests/generators/gc_with_yield_from.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Verify yield from on generators being properly cycle collected
+--FILE--
+<?php
+
+function root() {
+ global $gens; // create cyclic reference to root
+ try {
+ yield 1;
+ } finally {
+ var_dump($gens);
+ }
+}
+
+function gen($x) {
+ global $gens;
+ yield from $gens[] = $x ? gen(--$x) : root();
+}
+
+$gen = $gens[] = gen(2);
+var_dump($gen->current());
+unset($gen, $gens);
+print "collect\n";
+gc_collect_cycles();
+print "end\n";
+
+?>
+--EXPECT--
+int(1)
+collect
+array(4) {
+ [0]=>
+ object(Generator)#1 (0) {
+ }
+ [1]=>
+ object(Generator)#2 (0) {
+ }
+ [2]=>
+ object(Generator)#3 (0) {
+ }
+ [3]=>
+ object(Generator)#4 (0) {
+ }
+}
+end
diff --git a/Zend/tests/generators/generator_return_return_type.phpt b/Zend/tests/generators/generator_return_return_type.phpt
new file mode 100644
index 0000000000..345e0065c2
--- /dev/null
+++ b/Zend/tests/generators/generator_return_return_type.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Generators must return a valid variable with return type specified
+--FILE--
+<?php
+
+$gen = (function (): Generator {
+ 1 + $a = 1; // force a temporary
+ return true;
+ yield;
+})();
+
+var_dump($gen->valid());
+var_dump($gen->getReturn());
+
+?>
+--EXPECT--
+bool(false)
+bool(true)
diff --git a/Zend/tests/generators/generator_with_arg_unpacking.phpt b/Zend/tests/generators/generator_with_arg_unpacking.phpt
new file mode 100644
index 0000000000..edf0bafd31
--- /dev/null
+++ b/Zend/tests/generators/generator_with_arg_unpacking.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Generators with arguments unpacking
+--FILE--
+<?php
+(function() { yield; })(...range(1, 16384));
+call_user_func_array(function() { yield; }, range(1, 16384));
+$g = (function() { yield; })(...range(1, 16384));
+$g = call_user_func_array(function() { yield; }, range(1, 16384));
+echo "OK\n";
+?>
+--EXPECT--
+OK \ No newline at end of file
diff --git a/Zend/tests/generators/generator_with_type_check.phpt b/Zend/tests/generators/generator_with_type_check.phpt
new file mode 100644
index 0000000000..2aa16532dc
--- /dev/null
+++ b/Zend/tests/generators/generator_with_type_check.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Generator wit type check
+--FILE--
+<?php
+function gen(array $a) { yield; }
+gen(42);
+?>
+--EXPECTF--
+Fatal error: Uncaught TypeError: Argument 1 passed to gen() must be of the type array, integer given, called in %sgenerator_with_type_check.php on line 3 and defined in %sgenerator_with_type_check.php:2
+Stack trace:
+#0 %sgenerator_with_type_check.php(3): gen(42)
+#1 {main}
+ thrown in %sgenerator_with_type_check.php on line 2
diff --git a/Zend/tests/generators/generator_with_type_check_2.phpt b/Zend/tests/generators/generator_with_type_check_2.phpt
new file mode 100644
index 0000000000..d8ea4fbf0d
--- /dev/null
+++ b/Zend/tests/generators/generator_with_type_check_2.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Generator wit type check
+--FILE--
+<?php
+function gen(array $a) { yield; }
+try {
+ gen(42);
+} catch (TypeError $e) {
+ echo $e->getMessage()."\n";
+}
+
+try {
+ foreach (gen(42) as $val) {
+ var_dump($val);
+ }
+} catch (TypeError $e) {
+ echo $e->getMessage()."\n";
+}
+?>
+--EXPECTF--
+Argument 1 passed to gen() must be of the type array, integer given, called in %sgenerator_with_type_check_2.php on line 4
+Argument 1 passed to gen() must be of the type array, integer given, called in %sgenerator_with_type_check_2.php on line 10
diff --git a/Zend/tests/generators/get_return.phpt b/Zend/tests/generators/get_return.phpt
index c996eb4101..0d3e32af14 100644
--- a/Zend/tests/generators/get_return.phpt
+++ b/Zend/tests/generators/get_return.phpt
@@ -58,7 +58,7 @@ $gen->next();
var_dump($gen->getReturn());
// Explicit value-less return also results in a NULL generator
-// return value and there is no interference with type hints
+// return value and there is no interference with type declarations
function gen6() : Generator {
return;
yield 24;
diff --git a/Zend/tests/generators/multiple_yield_from_on_same_generator.phpt b/Zend/tests/generators/multiple_yield_from_on_same_generator.phpt
index 198377f8a1..f56a325684 100644
--- a/Zend/tests/generators/multiple_yield_from_on_same_generator.phpt
+++ b/Zend/tests/generators/multiple_yield_from_on_same_generator.phpt
@@ -37,5 +37,8 @@ int(4)
int(6)
int(3)
int(5)
+int(3)
+int(5)
+NULL
bool(false)
diff --git a/Zend/tests/generators/throw_into_yield_from_array.phpt b/Zend/tests/generators/throw_into_yield_from_array.phpt
new file mode 100644
index 0000000000..b1571f6639
--- /dev/null
+++ b/Zend/tests/generators/throw_into_yield_from_array.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Throwing into a generator yielding from an array/iterator
+--FILE--
+<?php
+
+$data = [1, 2, 3];
+
+function yielditer($arr) {
+ foreach($arr as $val) {
+ yield $val;
+ }
+}
+
+function yf($in) {
+ yield from $in;
+}
+
+function test($g) {
+ var_dump($g->current());
+ try {
+ $g->throw(new Exception("Exception!"));
+ } catch (Exception $e) {
+ echo "{$e->getMessage()}\n";
+ }
+ var_dump($g->current());
+}
+
+$yfiter = yf($data);
+$yfgen = yf(yielditer($data));
+
+test(yf($data));
+echo "\n";
+test(yf(yielditer($data)));
+
+?>
+--EXPECT--
+int(1)
+Exception!
+NULL
+
+int(1)
+Exception!
+NULL
diff --git a/Zend/tests/generators/yield_from_by_reference.phpt b/Zend/tests/generators/yield_from_by_reference.phpt
new file mode 100644
index 0000000000..8412a32af5
--- /dev/null
+++ b/Zend/tests/generators/yield_from_by_reference.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Yield from by reference is not supported
+--FILE--
+<?php
+
+function &gen() {
+ yield from [];
+}
+
+?>
+--EXPECTF--
+Fatal error: Cannot use "yield from" inside a by-reference generator in %s on line %d
diff --git a/Zend/tests/generators/yield_from_force_closed.phpt b/Zend/tests/generators/yield_from_force_closed.phpt
new file mode 100644
index 0000000000..87fcd2e8ed
--- /dev/null
+++ b/Zend/tests/generators/yield_from_force_closed.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Cannot "yield from" from force closed generator
+--FILE--
+<?php
+
+function gen1() {
+ echo "gen1\n";
+ yield 1;
+}
+
+function gen2() {
+ try {
+ echo "try\n";
+ yield from gen1();
+ } finally {
+ echo "finally\n";
+ yield from gen1();
+ }
+}
+
+try {
+ $gen = gen2();
+ $gen->rewind();
+ unset($gen);
+} catch (Error $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+try
+gen1
+finally
+Error: Cannot use "yield from" in a force-closed generator in %s:%d
+Stack trace:
+#0 %s(%d): gen2()
+#1 {main}
diff --git a/Zend/tests/generators/yield_from_iterator_agregate.phpt b/Zend/tests/generators/yield_from_iterator_agregate.phpt
new file mode 100644
index 0000000000..3bd61e0b5a
--- /dev/null
+++ b/Zend/tests/generators/yield_from_iterator_agregate.phpt
@@ -0,0 +1,17 @@
+--TEST--
+yield from with an IteratorAggregate
+--FILE--
+<?php
+class foo implements \IteratorAggregate {
+ public $prop = 1;
+ function getIterator() {
+ var_dump($this->prop);
+ yield;
+ }
+}
+(function(){
+ yield from new foo;
+})()->next();
+?>
+--EXPECT--
+int(1)
diff --git a/Zend/tests/global_with_side_effect_name.phpt b/Zend/tests/global_with_side_effect_name.phpt
new file mode 100644
index 0000000000..a1ee240c48
--- /dev/null
+++ b/Zend/tests/global_with_side_effect_name.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Global variable import using a name with side effects
+--FILE--
+<?php
+
+function sf($arg) {
+ echo "called\n";
+ return $arg;
+}
+
+function test() {
+ global ${sf("a")};
+ var_dump($a);
+}
+
+$a = 42;
+test();
+
+?>
+--EXPECT--
+called
+int(42)
diff --git a/Zend/tests/goto_in_foreach.phpt b/Zend/tests/goto_in_foreach.phpt
new file mode 100644
index 0000000000..e618772ba6
--- /dev/null
+++ b/Zend/tests/goto_in_foreach.phpt
@@ -0,0 +1,16 @@
+--TEST--
+goto inside foreach
+--FILE--
+<?php
+
+foreach ([0] as $x) {
+ goto a;
+a:
+ echo "loop\n";
+}
+
+echo "done\n";
+?>
+--EXPECT--
+loop
+done
diff --git a/Zend/tests/grammar/regression_004.phpt b/Zend/tests/grammar/regression_004.phpt
index e95674d8c9..edb32032ea 100644
--- a/Zend/tests/grammar/regression_004.phpt
+++ b/Zend/tests/grammar/regression_004.phpt
@@ -12,4 +12,4 @@ class Obj
function echo(){} // not valid
--EXPECTF--
-Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting identifier (T_STRING) or '(' in %s on line 9
+Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting %s in %s on line 9
diff --git a/Zend/tests/grammar/semi_reserved_001.phpt b/Zend/tests/grammar/semi_reserved_001.phpt
index c6bfd46611..48937de39e 100644
--- a/Zend/tests/grammar/semi_reserved_001.phpt
+++ b/Zend/tests/grammar/semi_reserved_001.phpt
@@ -7,9 +7,16 @@ class Obj
{
function empty(){ echo __METHOD__, PHP_EOL; }
function callable(){ echo __METHOD__, PHP_EOL; }
+ function class(){ echo __METHOD__, PHP_EOL; }
function trait(){ echo __METHOD__, PHP_EOL; }
function extends(){ echo __METHOD__, PHP_EOL; }
function implements(){ echo __METHOD__, PHP_EOL; }
+ function static(){ echo __METHOD__, PHP_EOL; }
+ function abstract(){ echo __METHOD__, PHP_EOL; }
+ function final(){ echo __METHOD__, PHP_EOL; }
+ function public(){ echo __METHOD__, PHP_EOL; }
+ function protected(){ echo __METHOD__, PHP_EOL; }
+ function private(){ echo __METHOD__, PHP_EOL; }
function const(){ echo __METHOD__, PHP_EOL; }
function enddeclare(){ echo __METHOD__, PHP_EOL; }
function endfor(){ echo __METHOD__, PHP_EOL; }
@@ -22,6 +29,7 @@ class Obj
function instanceof(){ echo __METHOD__, PHP_EOL; }
function insteadof(){ echo __METHOD__, PHP_EOL; }
function interface(){ echo __METHOD__, PHP_EOL; }
+ function namespace(){ echo __METHOD__, PHP_EOL; }
function new(){ echo __METHOD__, PHP_EOL; }
function or(){ echo __METHOD__, PHP_EOL; }
function xor(){ echo __METHOD__, PHP_EOL; }
@@ -62,22 +70,32 @@ class Obj
function die(){ echo __METHOD__, PHP_EOL; }
function self(){ echo __METHOD__, PHP_EOL; }
function parent(){ echo __METHOD__, PHP_EOL; }
- function public(){ echo __METHOD__, PHP_EOL; }
- function protected(){ echo __METHOD__, PHP_EOL; }
- function private(){ echo __METHOD__, PHP_EOL; }
- function static(){ echo __METHOD__, PHP_EOL; }
- function abstract(){ echo __METHOD__, PHP_EOL; }
- function final(){ echo __METHOD__, PHP_EOL; }
- function class(){ echo __METHOD__, PHP_EOL; }
+ function isset(){ echo __METHOD__, PHP_EOL; }
+ function unset(){ echo __METHOD__, PHP_EOL; }
+ function __CLASS__(){ echo __METHOD__, PHP_EOL; }
+ function __TRAIT__(){ echo __METHOD__, PHP_EOL; }
+ function __FUNCTION__(){ echo __METHOD__, PHP_EOL; }
+ function __METHOD__(){ echo __METHOD__, PHP_EOL; }
+ function __LINE__(){ echo __METHOD__, PHP_EOL; }
+ function __FILE__(){ echo __METHOD__, PHP_EOL; }
+ function __DIR__(){ echo __METHOD__, PHP_EOL; }
+ function __NAMESPACE__(){ echo __METHOD__, PHP_EOL; }
}
$obj = new Obj;
$obj->empty();
$obj->callable();
+$obj->class();
$obj->trait();
$obj->extends();
$obj->implements();
+$obj->static();
+$obj->abstract();
+$obj->final();
+$obj->public();
+$obj->protected();
+$obj->private();
$obj->const();
$obj->enddeclare();
$obj->endfor();
@@ -90,6 +108,7 @@ $obj->goto();
$obj->instanceof();
$obj->insteadof();
$obj->interface();
+$obj->namespace();
$obj->new();
$obj->or();
$obj->xor();
@@ -130,22 +149,32 @@ $obj->catch();
$obj->die();
$obj->self();
$obj->parent();
-$obj->public();
-$obj->protected();
-$obj->private();
-$obj->static();
-$obj->abstract();
-$obj->final();
-$obj->class();
+$obj->isset();
+$obj->unset();
+$obj->__CLASS__();
+$obj->__TRAIT__();
+$obj->__FUNCTION__();
+$obj->__METHOD__();
+$obj->__LINE__();
+$obj->__FILE__();
+$obj->__DIR__();
+$obj->__NAMESPACE__();
echo "\nDone\n";
--EXPECTF--
Obj::empty
Obj::callable
+Obj::class
Obj::trait
Obj::extends
Obj::implements
+Obj::static
+Obj::abstract
+Obj::final
+Obj::public
+Obj::protected
+Obj::private
Obj::const
Obj::enddeclare
Obj::endfor
@@ -158,6 +187,7 @@ Obj::goto
Obj::instanceof
Obj::insteadof
Obj::interface
+Obj::namespace
Obj::new
Obj::or
Obj::xor
@@ -198,12 +228,15 @@ Obj::catch
Obj::die
Obj::self
Obj::parent
-Obj::public
-Obj::protected
-Obj::private
-Obj::static
-Obj::abstract
-Obj::final
-Obj::class
+Obj::isset
+Obj::unset
+Obj::__CLASS__
+Obj::__TRAIT__
+Obj::__FUNCTION__
+Obj::__METHOD__
+Obj::__LINE__
+Obj::__FILE__
+Obj::__DIR__
+Obj::__NAMESPACE__
Done
diff --git a/Zend/tests/grammar/semi_reserved_002.phpt b/Zend/tests/grammar/semi_reserved_002.phpt
index b2c20028ca..a082f9ddbb 100644
--- a/Zend/tests/grammar/semi_reserved_002.phpt
+++ b/Zend/tests/grammar/semi_reserved_002.phpt
@@ -7,9 +7,16 @@ class Obj
{
static function empty(){ echo __METHOD__, PHP_EOL; }
static function callable(){ echo __METHOD__, PHP_EOL; }
+ static function class(){ echo __METHOD__, PHP_EOL; }
static function trait(){ echo __METHOD__, PHP_EOL; }
static function extends(){ echo __METHOD__, PHP_EOL; }
static function implements(){ echo __METHOD__, PHP_EOL; }
+ static function static(){ echo __METHOD__, PHP_EOL; }
+ static function abstract(){ echo __METHOD__, PHP_EOL; }
+ static function final(){ echo __METHOD__, PHP_EOL; }
+ static function public(){ echo __METHOD__, PHP_EOL; }
+ static function protected(){ echo __METHOD__, PHP_EOL; }
+ static function private(){ echo __METHOD__, PHP_EOL; }
static function const(){ echo __METHOD__, PHP_EOL; }
static function enddeclare(){ echo __METHOD__, PHP_EOL; }
static function endfor(){ echo __METHOD__, PHP_EOL; }
@@ -22,6 +29,7 @@ class Obj
static function instanceof(){ echo __METHOD__, PHP_EOL; }
static function insteadof(){ echo __METHOD__, PHP_EOL; }
static function interface(){ echo __METHOD__, PHP_EOL; }
+ static function namespace(){ echo __METHOD__, PHP_EOL; }
static function new(){ echo __METHOD__, PHP_EOL; }
static function or(){ echo __METHOD__, PHP_EOL; }
static function xor(){ echo __METHOD__, PHP_EOL; }
@@ -62,20 +70,30 @@ class Obj
static function die(){ echo __METHOD__, PHP_EOL; }
static function self(){ echo __METHOD__, PHP_EOL; }
static function parent(){ echo __METHOD__, PHP_EOL; }
- static function public(){ echo __METHOD__, PHP_EOL; }
- static function protected(){ echo __METHOD__, PHP_EOL; }
- static function private(){ echo __METHOD__, PHP_EOL; }
- static function static(){ echo __METHOD__, PHP_EOL; }
- static function abstract(){ echo __METHOD__, PHP_EOL; }
- static function final(){ echo __METHOD__, PHP_EOL; }
- static function class(){ echo __METHOD__, PHP_EOL; }
+ static function isset(){ echo __METHOD__, PHP_EOL; }
+ static function unset(){ echo __METHOD__, PHP_EOL; }
+ static function __CLASS__(){ echo __METHOD__, PHP_EOL; }
+ static function __TRAIT__(){ echo __METHOD__, PHP_EOL; }
+ static function __FUNCTION__(){ echo __METHOD__, PHP_EOL; }
+ static function __METHOD__(){ echo __METHOD__, PHP_EOL; }
+ static function __LINE__(){ echo __METHOD__, PHP_EOL; }
+ static function __FILE__(){ echo __METHOD__, PHP_EOL; }
+ static function __DIR__(){ echo __METHOD__, PHP_EOL; }
+ static function __NAMESPACE__(){ echo __METHOD__, PHP_EOL; }
}
Obj::empty();
Obj::callable();
+Obj::class();
Obj::trait();
Obj::extends();
Obj::implements();
+Obj::static();
+Obj::abstract();
+Obj::final();
+Obj::public();
+Obj::protected();
+Obj::private();
Obj::const();
Obj::enddeclare();
Obj::endfor();
@@ -88,6 +106,7 @@ Obj::goto();
Obj::instanceof();
Obj::insteadof();
Obj::interface();
+Obj::namespace();
Obj::new();
Obj::or();
Obj::xor();
@@ -128,22 +147,32 @@ Obj::catch();
Obj::die();
Obj::self();
Obj::parent();
-Obj::public();
-Obj::protected();
-Obj::private();
-Obj::static();
-Obj::abstract();
-Obj::final();
-Obj::class();
+Obj::isset();
+Obj::unset();
+Obj::__CLASS__();
+Obj::__TRAIT__();
+Obj::__FUNCTION__();
+Obj::__METHOD__();
+Obj::__LINE__();
+Obj::__FILE__();
+Obj::__DIR__();
+Obj::__NAMESPACE__();
echo "\nDone\n";
--EXPECTF--
Obj::empty
Obj::callable
+Obj::class
Obj::trait
Obj::extends
Obj::implements
+Obj::static
+Obj::abstract
+Obj::final
+Obj::public
+Obj::protected
+Obj::private
Obj::const
Obj::enddeclare
Obj::endfor
@@ -156,6 +185,7 @@ Obj::goto
Obj::instanceof
Obj::insteadof
Obj::interface
+Obj::namespace
Obj::new
Obj::or
Obj::xor
@@ -196,12 +226,15 @@ Obj::catch
Obj::die
Obj::self
Obj::parent
-Obj::public
-Obj::protected
-Obj::private
-Obj::static
-Obj::abstract
-Obj::final
-Obj::class
+Obj::isset
+Obj::unset
+Obj::__CLASS__
+Obj::__TRAIT__
+Obj::__FUNCTION__
+Obj::__METHOD__
+Obj::__LINE__
+Obj::__FILE__
+Obj::__DIR__
+Obj::__NAMESPACE__
Done
diff --git a/Zend/tests/grammar/semi_reserved_003.phpt b/Zend/tests/grammar/semi_reserved_003.phpt
index fe2c44dc4c..d63824017e 100644
--- a/Zend/tests/grammar/semi_reserved_003.phpt
+++ b/Zend/tests/grammar/semi_reserved_003.phpt
@@ -69,6 +69,18 @@ class Obj
var $catch = 'catch';
var $die = 'die';
var $self = 'self';
+ var $parent = 'parent';
+ var $isset = 'isset';
+ var $unset = 'unset';
+ var $__CLASS__ = '__CLASS__';
+ var $__TRAIT__ = '__TRAIT__';
+ var $__FUNCTION__ = '__FUNCTION__';
+ var $__METHOD__ = '__METHOD__';
+ var $__LINE__ = '__LINE__';
+ var $__FILE__ = '__FILE__';
+ var $__DIR__ = '__DIR__';
+ var $__NAMESPACE__ = '__NAMESPACE__';
+ var $__halt_compiler = '__halt_compiler';
}
$obj = new Obj;
@@ -137,6 +149,18 @@ echo $obj->as, PHP_EOL;
echo $obj->catch, PHP_EOL;
echo $obj->die, PHP_EOL;
echo $obj->self, PHP_EOL;
+echo $obj->parent, PHP_EOL;
+echo $obj->isset, PHP_EOL;
+echo $obj->unset, PHP_EOL;
+echo $obj->__CLASS__, PHP_EOL;
+echo $obj->__TRAIT__, PHP_EOL;
+echo $obj->__FUNCTION__, PHP_EOL;
+echo $obj->__METHOD__, PHP_EOL;
+echo $obj->__LINE__, PHP_EOL;
+echo $obj->__FILE__, PHP_EOL;
+echo $obj->__DIR__, PHP_EOL;
+echo $obj->__NAMESPACE__, PHP_EOL;
+echo $obj->__halt_compiler, PHP_EOL;
echo "\nDone\n";
@@ -206,5 +230,17 @@ as
catch
die
self
+parent
+isset
+unset
+__CLASS__
+__TRAIT__
+__FUNCTION__
+__METHOD__
+__LINE__
+__FILE__
+__DIR__
+__NAMESPACE__
+__halt_compiler
Done
diff --git a/Zend/tests/grammar/semi_reserved_004.phpt b/Zend/tests/grammar/semi_reserved_004.phpt
index 40c5df14ef..38963870a0 100644
--- a/Zend/tests/grammar/semi_reserved_004.phpt
+++ b/Zend/tests/grammar/semi_reserved_004.phpt
@@ -70,6 +70,17 @@ class Obj
static $die = 'die';
static $self = 'self';
static $parent = 'parent';
+ static $isset = 'isset';
+ static $unset = 'unset';
+ static $__CLASS__ = '__CLASS__';
+ static $__TRAIT__ = '__TRAIT__';
+ static $__FUNCTION__ = '__FUNCTION__';
+ static $__METHOD__ = '__METHOD__';
+ static $__LINE__ = '__LINE__';
+ static $__FILE__ = '__FILE__';
+ static $__DIR__ = '__DIR__';
+ static $__NAMESPACE__ = '__NAMESPACE__';
+ static $__halt_compiler = '__halt_compiler';
}
echo Obj::$empty, PHP_EOL;
@@ -137,6 +148,17 @@ echo Obj::$catch, PHP_EOL;
echo Obj::$die, PHP_EOL;
echo Obj::$self, PHP_EOL;
echo Obj::$parent, PHP_EOL;
+echo Obj::$isset, PHP_EOL;
+echo Obj::$unset, PHP_EOL;
+echo Obj::$__CLASS__, PHP_EOL;
+echo Obj::$__TRAIT__, PHP_EOL;
+echo Obj::$__FUNCTION__, PHP_EOL;
+echo Obj::$__METHOD__, PHP_EOL;
+echo Obj::$__LINE__, PHP_EOL;
+echo Obj::$__FILE__, PHP_EOL;
+echo Obj::$__DIR__, PHP_EOL;
+echo Obj::$__NAMESPACE__, PHP_EOL;
+echo Obj::$__halt_compiler, PHP_EOL;
echo "\nDone\n";
@@ -206,5 +228,16 @@ catch
die
self
parent
+isset
+unset
+__CLASS__
+__TRAIT__
+__FUNCTION__
+__METHOD__
+__LINE__
+__FILE__
+__DIR__
+__NAMESPACE__
+__halt_compiler
Done
diff --git a/Zend/tests/grammar/semi_reserved_005.phpt b/Zend/tests/grammar/semi_reserved_005.phpt
index 3ad0830b09..45d20ad0d8 100644
--- a/Zend/tests/grammar/semi_reserved_005.phpt
+++ b/Zend/tests/grammar/semi_reserved_005.phpt
@@ -10,6 +10,12 @@ class Obj
const TRAIT = 'trait';
const EXTENDS = 'extends';
const IMPLEMENTS = 'implements';
+ const STATIC = 'static';
+ const ABSTRACT = 'abstract';
+ const FINAL = 'final';
+ const PUBLIC = 'public';
+ const PROTECTED = 'protected';
+ const PRIVATE = 'private';
const CONST = 'const';
const ENDDECLARE = 'enddeclare';
const ENDFOR = 'endfor';
@@ -63,12 +69,16 @@ class Obj
const DIE = 'die';
const SELF = 'self';
const PARENT = 'parent';
- const PUBLIC = 'public';
- const PROTECTED = 'protected';
- const PRIVATE = 'private';
- const STATIC = 'static';
- const ABSTRACT = 'abstract';
- const FINAL = 'final';
+ const ISSET = 'isset';
+ const UNSET = 'unset';
+ const __CLASS__ = '__CLASS__';
+ const __TRAIT__ = '__TRAIT__';
+ const __FUNCTION__ = '__FUNCTION__';
+ const __METHOD__ = '__METHOD__';
+ const __LINE__ = '__LINE__';
+ const __FILE__ = '__FILE__';
+ const __DIR__ = '__DIR__';
+ const __NAMESPACE__ = '__NAMESPACE__';
}
echo Obj::EMPTY, PHP_EOL;
@@ -76,6 +86,12 @@ echo Obj::CALLABLE, PHP_EOL;
echo Obj::TRAIT, PHP_EOL;
echo Obj::EXTENDS, PHP_EOL;
echo Obj::IMPLEMENTS, PHP_EOL;
+echo Obj::STATIC, PHP_EOL;
+echo Obj::ABSTRACT, PHP_EOL;
+echo Obj::FINAL, PHP_EOL;
+echo Obj::PUBLIC, PHP_EOL;
+echo Obj::PROTECTED, PHP_EOL;
+echo Obj::PRIVATE, PHP_EOL;
echo Obj::CONST, PHP_EOL;
echo Obj::ENDDECLARE, PHP_EOL;
echo Obj::ENDFOR, PHP_EOL;
@@ -129,12 +145,16 @@ echo Obj::CATCH, PHP_EOL;
echo Obj::DIE, PHP_EOL;
echo Obj::SELF, PHP_EOL;
echo Obj::PARENT, PHP_EOL;
-echo Obj::PUBLIC, PHP_EOL;
-echo Obj::PROTECTED, PHP_EOL;
-echo Obj::PRIVATE, PHP_EOL;
-echo Obj::STATIC, PHP_EOL;
-echo Obj::ABSTRACT, PHP_EOL;
-echo Obj::FINAL, PHP_EOL;
+echo Obj::ISSET, PHP_EOL;
+echo Obj::UNSET, PHP_EOL;
+echo Obj::__CLASS__, PHP_EOL;
+echo Obj::__TRAIT__, PHP_EOL;
+echo Obj::__FUNCTION__, PHP_EOL;
+echo Obj::__METHOD__, PHP_EOL;
+echo Obj::__LINE__, PHP_EOL;
+echo Obj::__FILE__, PHP_EOL;
+echo Obj::__DIR__, PHP_EOL;
+echo Obj::__NAMESPACE__, PHP_EOL;
echo "\nDone\n";
@@ -144,6 +164,12 @@ callable
trait
extends
implements
+static
+abstract
+final
+public
+protected
+private
const
enddeclare
endfor
@@ -197,11 +223,15 @@ catch
die
self
parent
-public
-protected
-private
-static
-abstract
-final
+isset
+unset
+__CLASS__
+__TRAIT__
+__FUNCTION__
+__METHOD__
+__LINE__
+__FILE__
+__DIR__
+__NAMESPACE__
Done
diff --git a/Zend/tests/indexing_001.phpt b/Zend/tests/indexing_001.phpt
index 0e466ab8ce..f247a420b5 100644
--- a/Zend/tests/indexing_001.phpt
+++ b/Zend/tests/indexing_001.phpt
@@ -12,7 +12,7 @@ foreach ($testvalues as $testvalue) {
}
echo "\n*** Indexing - Testing reference assignment with key ***\n";
-$testvalues=array(null, 0, 1, true, false,'',0.1,array());
+$testvalues=array(null, 0, 1, true, false,0.1,array());
foreach ($testvalues as $testvalue) {
$testvalue['foo']=&$array;
@@ -20,7 +20,7 @@ foreach ($testvalues as $testvalue) {
}
echo "*** Indexing - Testing value assignment no key ***\n";
$array=array(1);
-$testvalues=array(null, 0, 1, true, false,'',0.1,array());
+$testvalues=array(null, 0, 1, true, false,0.1,array());
foreach ($testvalues as $testvalue) {
$testvalue[]=$array;
@@ -28,7 +28,7 @@ foreach ($testvalues as $testvalue) {
}
echo "\n*** Indexing - Testing reference assignment no key ***\n";
-$testvalues=array(null, 0, 1, true, false,'',0.1,array());
+$testvalues=array(null, 0, 1, true, false,0.1,array());
foreach ($testvalues as $testvalue) {
$testvalue[]=&$array;
@@ -63,13 +63,11 @@ array(1) {
int(1)
}
}
-array(1) {
- ["foo"]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
+
+Warning: Illegal string offset 'foo' in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+string(1) "A"
Warning: Illegal string offset 'foo' in %s on line %d
@@ -110,13 +108,6 @@ array(1) {
int(1)
}
}
-array(1) {
- ["foo"]=>
- &array(1) {
- [0]=>
- int(1)
- }
-}
Warning: Cannot use a scalar value as an array in %s on line %d
float(0.1)
@@ -151,13 +142,6 @@ array(1) {
int(1)
}
}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
Warning: Cannot use a scalar value as an array in %s on line %d
float(0.1)
@@ -193,13 +177,6 @@ array(1) {
int(1)
}
}
-array(1) {
- [0]=>
- &array(1) {
- [0]=>
- int(1)
- }
-}
Warning: Cannot use a scalar value as an array in %s on line %d
float(0.1)
@@ -211,4 +188,4 @@ array(1) {
}
}
-Done \ No newline at end of file
+Done
diff --git a/Zend/tests/inference_infinite_loop.phpt b/Zend/tests/inference_infinite_loop.phpt
new file mode 100644
index 0000000000..1e94ea8040
--- /dev/null
+++ b/Zend/tests/inference_infinite_loop.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Type inference should not result in infinite loop
+--FILE--
+<?php
+
+function test() {
+ $b = false;
+ do {
+ $a = $a + PHP_INT_MAX + 2;
+ $a = 0;
+ } while ($b);
+}
+test();
+
+?>
+--EXPECTF--
+Notice: Undefined variable: a in %s on line %d
diff --git a/Zend/tests/int_conversion_exponents.phpt b/Zend/tests/int_conversion_exponents.phpt
new file mode 100644
index 0000000000..d924cb7b81
--- /dev/null
+++ b/Zend/tests/int_conversion_exponents.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Integer conversion from scientific notation
+--FILE--
+<?php
+
+var_dump((int)"1.2345e9");
+var_dump((int)"-1.2345e9");
+var_dump(intval("1.2345e9"));
+var_dump(intval("-1.2345e9"));
+var_dump("1.2345e9" % PHP_INT_MAX);
+var_dump("-1.2345e9" % PHP_INT_MIN);
+var_dump("1.2345e9" | 0);
+var_dump("-1.2345e9" | 0);
+
+echo PHP_EOL;
+
+var_dump((int)" 1.2345e9 abc");
+var_dump((int)" -1.2345e9 abc");
+var_dump(intval(" 1.2345e9 abc"));
+var_dump(intval(" -1.2345e9 abc"));
+var_dump(" 1.2345e9 abc" % PHP_INT_MAX);
+var_dump(" -1.2345e9 abc" % PHP_INT_MIN);
+var_dump(" 1.2345e9 abc" | 0);
+var_dump(" -1.2345e9 abc" | 0);
+
+?>
+--EXPECTF--
+int(1234500000)
+int(-1234500000)
+int(1234500000)
+int(-1234500000)
+int(1234500000)
+int(-1234500000)
+int(1234500000)
+int(-1234500000)
+
+int(1234500000)
+int(-1234500000)
+int(1234500000)
+int(-1234500000)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(1234500000)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(-1234500000)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(1234500000)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(-1234500000)
diff --git a/Zend/tests/int_static_prop_name.phpt b/Zend/tests/int_static_prop_name.phpt
new file mode 100644
index 0000000000..bfdfc42052
--- /dev/null
+++ b/Zend/tests/int_static_prop_name.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Using an integer as a static property name
+--FILE--
+<?php
+
+class Foo {
+ public static $bar = 42;
+}
+
+$n = 42;
+
+${42} = 24;
+var_dump(${42});
+var_dump(${(int) 42});
+var_dump(${(int) $n});
+
+try {
+ var_dump(Foo::${42});
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump(Foo::${(int) 42});
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+try {
+ var_dump(Foo::${(int) $n});
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+int(24)
+int(24)
+int(24)
+Access to undeclared static property: Foo::$42
+Access to undeclared static property: Foo::$42
+Access to undeclared static property: Foo::$42
+
diff --git a/Zend/tests/invalid_parent_const_ref_leak.phpt b/Zend/tests/invalid_parent_const_ref_leak.phpt
new file mode 100644
index 0000000000..33e2548f31
--- /dev/null
+++ b/Zend/tests/invalid_parent_const_ref_leak.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Leak when using an invalid parent:: reference in a constant definition
+--FILE--
+<?php
+
+class A {
+ const B = parent::C;
+}
+
+try {
+ A::B;
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+Cannot access parent:: when current class scope has no parent
diff --git a/Zend/tests/isset_str_offset.phpt b/Zend/tests/isset_str_offset.phpt
index 7a9164a381..d693f80a52 100644
--- a/Zend/tests/isset_str_offset.phpt
+++ b/Zend/tests/isset_str_offset.phpt
@@ -8,6 +8,7 @@ print "- isset ---\n";
$str = "test0123";
var_dump(isset($str[-1]));
+var_dump(isset($str[-10]));
var_dump(isset($str[0]));
var_dump(isset($str[1]));
var_dump(isset($str[4])); // 0
@@ -17,6 +18,7 @@ var_dump(isset($str[10000]));
// non-numeric offsets
print "- string ---\n";
var_dump(isset($str['-1']));
+var_dump(isset($str['-10']));
var_dump(isset($str['0']));
var_dump(isset($str['1']));
var_dump(isset($str['4'])); // 0
@@ -31,6 +33,7 @@ print "- null ---\n";
var_dump(isset($str[null]));
print "- double ---\n";
var_dump(isset($str[-1.1]));
+var_dump(isset($str[-10.5]));
var_dump(isset($str[-0.8]));
var_dump(isset($str[-0.1]));
var_dump(isset($str[0.2]));
@@ -50,6 +53,7 @@ print "done\n";
?>
--EXPECTF--
- isset ---
+bool(true)
bool(false)
bool(true)
bool(true)
@@ -58,6 +62,7 @@ bool(true)
bool(false)
bool(false)
- string ---
+bool(true)
bool(false)
bool(true)
bool(true)
@@ -72,6 +77,7 @@ bool(false)
- null ---
bool(true)
- double ---
+bool(true)
bool(false)
bool(true)
bool(true)
diff --git a/Zend/tests/jump15.phpt b/Zend/tests/jump15.phpt
new file mode 100644
index 0000000000..456d27785d
--- /dev/null
+++ b/Zend/tests/jump15.phpt
@@ -0,0 +1,29 @@
+--TEST--
+jump 15: goto from loop (forward)
+--FILE--
+<?php
+$ar = array("1","2","3");
+foreach ($ar as $val) {
+ switch ($val) {
+ case "1":
+ echo "1: ok\n";
+ break;
+ case "2":
+ echo "2: ok\n";
+ goto L1;
+ case "3":
+ echo "bug\n";
+ break;
+ }
+}
+echo "bug\n";
+L1:
+try {
+ echo "3: ok\n";
+} finally {
+}
+?>
+--EXPECT--
+1: ok
+2: ok
+3: ok
diff --git a/Zend/tests/jump16.phpt b/Zend/tests/jump16.phpt
new file mode 100644
index 0000000000..cc820c4a6c
--- /dev/null
+++ b/Zend/tests/jump16.phpt
@@ -0,0 +1,27 @@
+--TEST--
+jump 16: goto into try/catch
+--FILE--
+<?php
+goto a;
+try {
+ echo "1";
+a:
+ echo "2";
+ throw new Exception();
+} catch (Exception $e) {
+ echo "3";
+}
+echo "4";
+goto b;
+try {
+ echo "5";
+ throw new Exception();
+} catch (Exception $e) {
+ echo "6";
+b:
+ echo "7";
+}
+echo "8\n";
+?>
+--EXPECT--
+23478
diff --git a/Zend/tests/jump17.phpt b/Zend/tests/jump17.phpt
new file mode 100644
index 0000000000..92d3be511b
--- /dev/null
+++ b/Zend/tests/jump17.phpt
@@ -0,0 +1,22 @@
+--TEST--
+jump 17: goto into try/catch with finally
+--FILE--
+<?php
+goto b;
+try {
+ echo "1";
+a:
+ echo "2";
+ throw new Exception();
+} catch (Exception $e) {
+ echo "3";
+b:
+ echo "4";
+} finally {
+ echo "5";
+c:
+ echo "6";
+}
+echo "7\n";
+--EXPECT--
+4567
diff --git a/Zend/tests/list_001.phpt b/Zend/tests/list_001.phpt
index a9fff55004..4e0053edee 100644
--- a/Zend/tests/list_001.phpt
+++ b/Zend/tests/list_001.phpt
@@ -5,6 +5,8 @@
list($a, list($b)) = array(new stdclass, array(new stdclass));
var_dump($a, $b);
+[$a, [$b]] = array(new stdclass, array(new stdclass));
+var_dump($a, $b);
?>
--EXPECT--
@@ -12,3 +14,7 @@ object(stdClass)#1 (0) {
}
object(stdClass)#2 (0) {
}
+object(stdClass)#3 (0) {
+}
+object(stdClass)#4 (0) {
+}
diff --git a/Zend/tests/list_008.phpt b/Zend/tests/list_008.phpt
new file mode 100644
index 0000000000..de8160c77e
--- /dev/null
+++ b/Zend/tests/list_008.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Assignment to invalid list() value
+--FILE--
+<?php
+
+[42] = [1];
+
+?>
+--EXPECTF--
+Fatal error: Assignments can only happen to writable values in %s on line %d
diff --git a/Zend/tests/list_009.phpt b/Zend/tests/list_009.phpt
new file mode 100644
index 0000000000..c28ca8000a
--- /dev/null
+++ b/Zend/tests/list_009.phpt
@@ -0,0 +1,14 @@
+--TEST--
+list with by-reference assignment should fail
+--FILE--
+<?php
+
+$a = [1];
+[&$foo] = $a;
+$foo = 2;
+
+var_dump($a);
+
+?>
+--EXPECTF--
+Fatal error: [] and list() assignments cannot be by reference in %s on line %d
diff --git a/Zend/tests/list_010.phpt b/Zend/tests/list_010.phpt
new file mode 100644
index 0000000000..a89ffda5cd
--- /dev/null
+++ b/Zend/tests/list_010.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Do not allow mixing [] and list()
+--FILE--
+<?php
+
+list([$a]) = [[1]];
+var_dump($a);
+
+?>
+--EXPECTF--
+Fatal error: Cannot mix [] and list() in %s on line %d
diff --git a/Zend/tests/list_011.phpt b/Zend/tests/list_011.phpt
new file mode 100644
index 0000000000..316498c411
--- /dev/null
+++ b/Zend/tests/list_011.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Disallow list() usage as if it were an array
+--FILE--
+<?php
+
+var_dump(list(1, 2, 3));
+
+?>
+--EXPECTF--
+Parse error: syntax error, unexpected ')', expecting '=' in %s on line %d
diff --git a/Zend/tests/list_012.phpt b/Zend/tests/list_012.phpt
new file mode 100644
index 0000000000..072d28c01d
--- /dev/null
+++ b/Zend/tests/list_012.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Disallow empty elements in normal arrays
+--FILE--
+<?php
+
+var_dump([, 1, 2]);
+
+?>
+--EXPECTF--
+Fatal error: Cannot use empty array elements in arrays in %s on line %d
diff --git a/Zend/tests/list_keyed.phpt b/Zend/tests/list_keyed.phpt
new file mode 100644
index 0000000000..b549ed9bf5
--- /dev/null
+++ b/Zend/tests/list_keyed.phpt
@@ -0,0 +1,71 @@
+--TEST--
+list() with keys
+--FILE--
+<?php
+
+$antonyms = [
+ "good" => "bad",
+ "happy" => "sad",
+];
+
+list("good" => $good_antonym, "happy" => $happy_antonym) = $antonyms;
+var_dump($good_antonym, $happy_antonym);
+
+echo PHP_EOL;
+
+$powersOfTwo = [
+ 1 => 2,
+ 2 => 4,
+ 3 => 8
+];
+
+list(1 => $two_1, 2 => $two_2, 3 => $two_3) = $powersOfTwo;
+var_dump($two_1, $two_2, $two_3);
+
+echo PHP_EOL;
+
+$contrivedMixedKeyTypesExample = [
+ 7 => "the best PHP version",
+ "elePHPant" => "the cutest mascot"
+];
+
+list(7 => $seven, "elePHPant" => $elePHPant) = $contrivedMixedKeyTypesExample;
+var_dump($seven, $elePHPant);
+
+echo PHP_EOL;
+
+$allTogetherNow = [
+ "antonyms" => $antonyms,
+ "powersOfTwo" => $powersOfTwo,
+ "contrivedMixedKeyTypesExample" => $contrivedMixedKeyTypesExample
+];
+
+list(
+ "antonyms" => list("good" => $good_antonym, "happy" => $happy_antonym),
+ "powersOfTwo" => list(1 => $two_1, 2 => $two_2, 3 => $two_3),
+ "contrivedMixedKeyTypesExample" => list(7 => $seven, "elePHPant" => $elePHPant)
+) = $allTogetherNow;
+
+var_dump($good_antonym, $happy_antonym);
+var_dump($two_1, $two_2, $two_3);
+var_dump($seven, $elePHPant);
+
+?>
+--EXPECT--
+string(3) "bad"
+string(3) "sad"
+
+int(2)
+int(4)
+int(8)
+
+string(20) "the best PHP version"
+string(17) "the cutest mascot"
+
+string(3) "bad"
+string(3) "sad"
+int(2)
+int(4)
+int(8)
+string(20) "the best PHP version"
+string(17) "the cutest mascot"
diff --git a/Zend/tests/list_keyed_ArrayAccess.phpt b/Zend/tests/list_keyed_ArrayAccess.phpt
new file mode 100644
index 0000000000..1bb2013036
--- /dev/null
+++ b/Zend/tests/list_keyed_ArrayAccess.phpt
@@ -0,0 +1,54 @@
+--TEST--
+list() with keys and ArrayAccess
+--FILE--
+<?php
+
+$antonymObject = new ArrayObject;
+$antonymObject["good"] = "bad";
+$antonymObject["happy"] = "sad";
+
+list("good" => $good, "happy" => $happy) = $antonymObject;
+var_dump($good, $happy);
+
+echo PHP_EOL;
+
+$stdClassCollection = new SplObjectStorage;
+$foo = new StdClass;
+$stdClassCollection[$foo] = "foo";
+$bar = new StdClass;
+$stdClassCollection[$bar] = "bar";
+
+list($foo => $fooStr, $bar => $barStr) = $stdClassCollection;
+var_dump($fooStr, $barStr);
+
+echo PHP_EOL;
+
+class IndexPrinter implements ArrayAccess
+{
+ public function offsetGet($offset) {
+ echo "GET ";
+ var_dump($offset);
+ }
+ public function offsetSet($offset, $value) {
+ }
+ public function offsetExists($offset) {
+ }
+ public function offsetUnset($offset) {
+ }
+}
+
+$op = new IndexPrinter;
+list(123 => $x) = $op;
+// PHP shouldn't convert this to an integer offset, because it's ArrayAccess
+list("123" => $x) = $op;
+
+?>
+--EXPECT--
+string(3) "bad"
+string(3) "sad"
+
+string(3) "foo"
+string(3) "bar"
+
+GET int(123)
+GET string(3) "123"
diff --git a/Zend/tests/list_keyed_conversions.phpt b/Zend/tests/list_keyed_conversions.phpt
new file mode 100644
index 0000000000..bf0349b327
--- /dev/null
+++ b/Zend/tests/list_keyed_conversions.phpt
@@ -0,0 +1,34 @@
+--TEST--
+list() with non-integer-or-string keys
+--FILE--
+<?php
+
+$results = [
+ 0 => 0,
+ 1 => 1,
+ "" => ""
+];
+
+list(NULL => $NULL, 1.5 => $float, FALSE => $FALSE, TRUE => $TRUE) = $results;
+var_dump($NULL, $float, $FALSE, $TRUE);
+
+echo PHP_EOL;
+
+list("0" => $zeroString, "1" => $oneString) = $results;
+var_dump($zeroString, $oneString);
+
+list(STDIN => $resource) = [];
+
+?>
+--EXPECTF--
+string(0) ""
+int(1)
+int(0)
+int(1)
+
+int(0)
+int(1)
+
+Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
+
+Notice: Undefined offset: 1 in %s on line %d
diff --git a/Zend/tests/list_keyed_evaluation_order.inc b/Zend/tests/list_keyed_evaluation_order.inc
new file mode 100644
index 0000000000..490a6d84fe
--- /dev/null
+++ b/Zend/tests/list_keyed_evaluation_order.inc
@@ -0,0 +1,60 @@
+<?php declare(strict_types=1);
+
+// Observer objects for the Zend/tests/list_keyed_evaluation_order.* tests
+
+class Stringable
+{
+ private $name;
+ public function __construct(string $name) {
+ $this->name = $name;
+ }
+
+ public function __toString(): string {
+ echo "$this->name evaluated.", PHP_EOL;
+ return $this->name;
+ }
+}
+
+class Indexable implements ArrayAccess
+{
+ private $array;
+ public function __construct(array $array) {
+ $this->array = $array;
+ }
+
+ public function offsetExists($offset): bool {
+ echo "Existence of offset $offset checked for.", PHP_EOL;
+ return isset($this->array[$offset]);
+ }
+
+ public function offsetUnset($offset): void {
+ unset($this->array[$offset]);
+ echo "Offset $offset removed.", PHP_EOL;
+ }
+
+ public function offsetGet($offset) {
+ echo "Offset $offset retrieved.", PHP_EOL;
+ return $this->array[$offset];
+ }
+
+ public function offsetSet($offset, $value): void {
+ $this->array[$offset] = $value;
+ echo "Offset $offset set to $value.", PHP_EOL;
+ }
+}
+
+class IndexableRetrievable
+{
+ private $label;
+ private $indexable;
+
+ public function __construct(string $label, Indexable $indexable) {
+ $this->label = $label;
+ $this->indexable = $indexable;
+ }
+
+ public function getIndexable(): Indexable {
+ echo "Indexable $this->label retrieved.", PHP_EOL;
+ return $this->indexable;
+ }
+}
diff --git a/Zend/tests/list_keyed_evaluation_order.phpt b/Zend/tests/list_keyed_evaluation_order.phpt
new file mode 100644
index 0000000000..0f0652b6a9
--- /dev/null
+++ b/Zend/tests/list_keyed_evaluation_order.phpt
@@ -0,0 +1,35 @@
+--TEST--
+list() with keys, evaluation order
+--FILE--
+<?php
+
+require_once "list_keyed_evaluation_order.inc";
+
+$a = new Stringable("A");
+$c = new Stringable("C");
+
+$e = new IndexableRetrievable("E", new Indexable(["A" => "value for offset A", "C" => "value for offset C"]));
+
+$store = new Indexable([]);
+
+// list($a => $b, $c => $d) = $e;
+// Should be evaluated in the order:
+// 1. Evaluate $e
+// 2. Evaluate $a
+// 3. Evaluate $e[$a]
+// 4. Assign $b from $e[$a]
+// 5. Evaluate $c
+// 6. Evaluate $e[$c]
+// 7. Assign $c from $e[$a]
+
+list((string)$a => $store["B"], (string)$c => $store["D"]) = $e->getIndexable();
+
+?>
+--EXPECT--
+Indexable E retrieved.
+A evaluated.
+Offset A retrieved.
+Offset B set to value for offset A.
+C evaluated.
+Offset C retrieved.
+Offset D set to value for offset C.
diff --git a/Zend/tests/list_keyed_evaluation_order_2.phpt b/Zend/tests/list_keyed_evaluation_order_2.phpt
new file mode 100644
index 0000000000..ddfba68c46
--- /dev/null
+++ b/Zend/tests/list_keyed_evaluation_order_2.phpt
@@ -0,0 +1,77 @@
+--TEST--
+list() with keys, evaluation order #2
+--FILE--
+<?php
+
+// All the following should print 'a' then 'b'
+
+list($a, $b) = ['a', 'b'];
+var_dump($a);
+var_dump($b);
+
+list(0 => $a, 1 => $b) = ['a', 'b'];
+var_dump($a);
+var_dump($b);
+
+list(1 => $b, 0 => $a) = ['a', 'b'];
+var_dump($a);
+var_dump($b);
+
+$arr = [];
+list($arr[], $arr[]) = ['a', 'b'];
+var_dump($arr[0]);
+var_dump($arr[1]);
+
+$arr = [];
+list(0 => $arr[], 1 => $arr[]) = ['a', 'b'];
+var_dump($arr[0]);
+var_dump($arr[1]);
+
+$arr = [];
+list(1 => $arr[], 0 => $arr[]) = ['b', 'a'];
+var_dump($arr[0]);
+var_dump($arr[1]);
+
+$arr = [];
+list(list(1 => $arr[], 0 => $arr[])) = [['b', 'a']];
+var_dump($arr[0]);
+var_dump($arr[1]);
+
+$arr = [];
+list('key1' => $arr[], 'key2' => $arr[]) = ['key2' => 'b', 'key1' => 'a'];
+var_dump($arr[0]);
+var_dump($arr[1]);
+
+// This should print 'foo'
+$a = 0;
+list($a => $a) = ['foo', 'bar'];
+var_dump($a);
+
+// This should print 'bar' then 'foo'
+$a = 0;
+$b = 1;
+list($b => $a, $a => $c) = ['bar' => 'foo', 1 => 'bar'];
+var_dump($a);
+var_dump($c);
+
+?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(1) "a"
+string(1) "b"
+string(3) "foo"
+string(3) "bar"
+string(3) "foo"
diff --git a/Zend/tests/list_keyed_evaluation_order_3.phpt b/Zend/tests/list_keyed_evaluation_order_3.phpt
new file mode 100644
index 0000000000..7850834c3b
--- /dev/null
+++ b/Zend/tests/list_keyed_evaluation_order_3.phpt
@@ -0,0 +1,24 @@
+--TEST--
+list() with keys, evaluation order #3
+--FILE--
+<?php
+
+$i = 0;
+$a = [
+ 0 => [
+ 'b' => 'bar',
+ 'a' => 'foo',
+ ],
+ 1 => 'a',
+ 3 => 'b',
+];
+list($a[$i++] => $a[$i++], $a[$i++] => $a[$i++]) = $a[$i++];
+var_dump($i); // should be 5
+var_dump($a[2]); // should be 'foo'
+var_dump($a[4]); // should be 'bar'
+
+?>
+--EXPECT--
+int(5)
+string(3) "foo"
+string(3) "bar"
diff --git a/Zend/tests/list_keyed_evaluation_order_nested.phpt b/Zend/tests/list_keyed_evaluation_order_nested.phpt
new file mode 100644
index 0000000000..8a7725d4ea
--- /dev/null
+++ b/Zend/tests/list_keyed_evaluation_order_nested.phpt
@@ -0,0 +1,77 @@
+--TEST--
+list() with keys, evaluation order: nested
+--FILE--
+<?php
+
+require_once "list_keyed_evaluation_order.inc";
+
+$a = new Stringable("A");
+$c = new Stringable("C");
+$f = new Stringable("F");
+$g = new Stringable("G");
+$i = new Stringable("I");
+
+$k = new IndexableRetrievable("K", new Indexable([
+ "A" => "offset value for A",
+ "C" => new Indexable([
+ 0 => "offset value for 0",
+ 1 => "offset value for 1"
+ ]),
+ "F" => new Indexable([
+ "G" => "offset value for G",
+ "I" => "offset value for I"
+ ])
+]));
+
+$store = new Indexable([]);
+
+// list($a => $b, $c => list($d, $e), $f => list($g => $h, $i => $j)) = $k;
+// Should be evaluated in the order:
+// 1. Evaluate $k
+// 2. Evaluate $a
+// 3. Evaluate $k[$a]
+// 4. Assign $b from $k[$a]
+// 5. Evaluate $c
+// 6. Evaluate $k[$c]
+// 7. Evaluate $k[$c][0]
+// 8. Assign $d from $k[$c][0]
+// 9. Evaluate $k[$c][1]
+// 10. Assign $e from $k[$c][1]
+// 11. Evaluate $f
+// 12. Evaluate $k[$f]
+// 13. Evaluate $g
+// 14. Evaluate $k[$f][$g]
+// 15. Assign $h from $k[$f][$g]
+// 16. Evaluate $i
+// 17. Evaluate $k[$f][$i]
+// 18. Assign $j from $k[$f][$i]
+
+list(
+ (string)$a => $store["B"],
+ (string)$c => list($store["D"], $store["E"]),
+ (string)$f => list(
+ (string)$g => $store["H"],
+ (string)$i => $store["J"]
+ )
+) = $k->getIndexable();
+
+?>
+--EXPECT--
+Indexable K retrieved.
+A evaluated.
+Offset A retrieved.
+Offset B set to offset value for A.
+C evaluated.
+Offset C retrieved.
+Offset 0 retrieved.
+Offset D set to offset value for 0.
+Offset 1 retrieved.
+Offset E set to offset value for 1.
+F evaluated.
+Offset F retrieved.
+G evaluated.
+Offset G retrieved.
+Offset H set to offset value for G.
+I evaluated.
+Offset I retrieved.
+Offset J set to offset value for I.
diff --git a/Zend/tests/list_keyed_non_literals.phpt b/Zend/tests/list_keyed_non_literals.phpt
new file mode 100644
index 0000000000..80f22eda22
--- /dev/null
+++ b/Zend/tests/list_keyed_non_literals.phpt
@@ -0,0 +1,30 @@
+--TEST--
+list() with constant keys
+--FILE--
+<?php
+
+$arr = [
+ 1 => "one",
+ 2 => "two",
+ 3 => "three"
+];
+
+const COMPILE_TIME_RESOLVABLE = 1;
+
+define('PROBABLY_NOT_COMPILE_TIME_RESOLVABLE', file_get_contents("data:text/plain,2"));
+
+$probablyNotCompileTimeResolvable3 = cos(0) * 3;
+
+list(
+ COMPILE_TIME_RESOLVABLE => $one,
+ PROBABLY_NOT_COMPILE_TIME_RESOLVABLE => $two,
+ $probablyNotCompileTimeResolvable3 => $three
+) = $arr;
+
+var_dump($one, $two, $three);
+
+?>
+--EXPECTF--
+string(3) "one"
+string(3) "two"
+string(5) "three"
diff --git a/Zend/tests/list_keyed_trailing_comma.phpt b/Zend/tests/list_keyed_trailing_comma.phpt
new file mode 100644
index 0000000000..e0af0aed21
--- /dev/null
+++ b/Zend/tests/list_keyed_trailing_comma.phpt
@@ -0,0 +1,38 @@
+--TEST--
+list() with keys and a trailing comma
+--FILE--
+<?php
+
+$antonyms = [
+ "good" => "bad",
+ "happy" => "sad",
+];
+
+list(
+ "good" => $good,
+ "happy" => $happy
+) = $antonyms;
+
+var_dump($good, $happy);
+
+echo PHP_EOL;
+
+$antonyms = [
+ "good" => "bad",
+ "happy" => "sad",
+];
+
+list(
+ "good" => $good,
+ "happy" => $happy,
+) = $antonyms;
+
+var_dump($good, $happy);
+
+?>
+--EXPECT--
+string(3) "bad"
+string(3) "sad"
+
+string(3) "bad"
+string(3) "sad"
diff --git a/Zend/tests/list_keyed_undefined.phpt b/Zend/tests/list_keyed_undefined.phpt
new file mode 100644
index 0000000000..a18e3b4d20
--- /dev/null
+++ b/Zend/tests/list_keyed_undefined.phpt
@@ -0,0 +1,22 @@
+--TEST--
+list() with undefined keys
+--FILE--
+<?php
+
+$contrivedMixedKeyTypesExample = [
+ 7 => "the best PHP version",
+ "elePHPant" => "the cutest mascot"
+];
+
+list(5 => $five, "duke" => $duke) = $contrivedMixedKeyTypesExample;
+
+var_dump($five, $duke);
+
+?>
+--EXPECTF--
+
+Notice: Undefined offset: 5 in %s on line %d
+
+Notice: Undefined index: duke in %s on line %d
+NULL
+NULL
diff --git a/Zend/tests/list_mixed_keyed_unkeyed.phpt b/Zend/tests/list_mixed_keyed_unkeyed.phpt
new file mode 100644
index 0000000000..245d20f31f
--- /dev/null
+++ b/Zend/tests/list_mixed_keyed_unkeyed.phpt
@@ -0,0 +1,16 @@
+--TEST--
+list() with both keyed and unkeyed elements
+--FILE--
+<?php
+
+$contrivedKeyedAndUnkeyedArrayExample = [
+ 0,
+ 1 => 1,
+ "foo" => "bar"
+];
+
+list($zero, 1 => $one, "foo" => $foo) = $contrivedKeyedAndUnkeyedArrayExample;
+
+?>
+--EXPECTF--
+Fatal error: Cannot mix keyed and unkeyed array entries in assignments in %s on line %d
diff --git a/Zend/tests/list_mixed_nested_keyed_unkeyed.phpt b/Zend/tests/list_mixed_nested_keyed_unkeyed.phpt
new file mode 100644
index 0000000000..3087775b76
--- /dev/null
+++ b/Zend/tests/list_mixed_nested_keyed_unkeyed.phpt
@@ -0,0 +1,34 @@
+--TEST--
+list() with nested unkeyed and keyed list()
+--FILE--
+<?php
+
+$points = [
+ ["x" => 1, "y" => 2],
+ ["x" => 2, "y" => 1]
+];
+
+list(list("x" => $x1, "y" => $y1), list("x" => $x2, "y" => $y2)) = $points;
+var_dump($x1, $y1, $x2, $y2);
+
+echo PHP_EOL;
+
+$invertedPoints = [
+ "x" => [1, 2],
+ "y" => [2, 1]
+];
+
+list("x" => list($x1, $x2), "y" => list($y1, $y2)) = $invertedPoints;
+var_dump($x1, $y1, $x2, $y2);
+
+?>
+--EXPECT--
+int(1)
+int(2)
+int(2)
+int(1)
+
+int(1)
+int(2)
+int(2)
+int(1)
diff --git a/Zend/tests/memory_get_peak_usage.phpt b/Zend/tests/memory_get_peak_usage.phpt
new file mode 100644
index 0000000000..aeca951304
--- /dev/null
+++ b/Zend/tests/memory_get_peak_usage.phpt
@@ -0,0 +1,26 @@
+--TEST--
+int memory_get_peak_usage ([ bool $real_usage = false ] );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
+if ($zend_mm_enabled === "0") {
+ die("skip Zend MM disabled");
+}
+?>
+--INI--
+memory_limit=-1
+--FILE--
+<?php
+var_dump($a = memory_get_peak_usage());
+var_dump(memory_get_peak_usage(true));
+var_dump(memory_get_peak_usage(false));
+$array = range(1,1024*1024);
+var_dump(memory_get_peak_usage() > $a);
+?>
+--EXPECTF--
+int(%d)
+int(%d)
+int(%d)
+bool(true)
diff --git a/Zend/tests/method_argument_binding.phpt b/Zend/tests/method_argument_binding.phpt
new file mode 100644
index 0000000000..731cc4fb32
--- /dev/null
+++ b/Zend/tests/method_argument_binding.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Edge cases in compile-time method argument binding
+--FILE--
+<?php
+
+class A {
+ private function method($x) {}
+}
+
+class B extends A {
+ public function test() {
+ $x = 1;
+ $this->method($x);
+ var_dump($x);
+ }
+}
+
+class C extends B {
+ public function method(&$x) {
+ ++$x;
+ }
+}
+
+(new C)->test();
+
+class D {
+ private final function method(&$x) {
+ ++$x;
+ }
+}
+
+class E extends D {
+ public function __call($name, $args) { }
+
+ public function test() {
+ $this->method($x);
+ }
+}
+
+(new E)->test();
+
+?>
+--EXPECTF--
+Warning: Declaration of C::method(&$x) should be compatible with A::method($x) in %s on line %d
+int(2)
+
+Notice: Undefined variable: x in %s on line %d
diff --git a/Zend/tests/modify_isref_value_return.phpt b/Zend/tests/modify_isref_value_return.phpt
new file mode 100644
index 0000000000..1b3122711e
--- /dev/null
+++ b/Zend/tests/modify_isref_value_return.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Indirect modification of isref by-value return value not possible
+--FILE--
+<?php
+
+class A {
+ public $b;
+}
+
+$arr = [];
+
+$a = new A;
+$a->b =& $arr;
+
+(new ReflectionProperty('A', 'b'))->getValue($a)[] = 42;
+
+var_dump($a);
+
+?>
+--EXPECT--
+object(A)#1 (1) {
+ ["b"]=>
+ &array(0) {
+ }
+}
diff --git a/Zend/tests/name_collision_07.phpt b/Zend/tests/name_collision_07.phpt
new file mode 100644
index 0000000000..bc596a3549
--- /dev/null
+++ b/Zend/tests/name_collision_07.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Class declaration colliding with import (in namespace)
+--FILE--
+<?php
+
+namespace Foo {
+ class Bar {}
+}
+
+namespace Bazzle {
+ use Foo\Bar;
+ class Bar {}
+}
+--EXPECTF--
+Fatal error: Cannot declare class Bazzle\Bar because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_08.phpt b/Zend/tests/name_collision_08.phpt
new file mode 100644
index 0000000000..d897419102
--- /dev/null
+++ b/Zend/tests/name_collision_08.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Function declaration colliding with import (in namespace)
+--FILE--
+<?php
+
+namespace Foo {
+ function bar() {}
+}
+
+namespace Bazzle {
+ use function Foo\bar;
+ function bar() {}
+}
+--EXPECTF--
+Fatal error: Cannot declare function Bazzle\bar because the name is already in use in %s on line %d
diff --git a/Zend/tests/name_collision_09.phpt b/Zend/tests/name_collision_09.phpt
new file mode 100644
index 0000000000..b46459eef6
--- /dev/null
+++ b/Zend/tests/name_collision_09.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Class declaration colliding with import (in namespace)
+--FILE--
+<?php
+
+namespace Foo {
+ const BAR = 42;
+}
+
+namespace Bazzle {
+ use const Foo\BAR;
+ const BAR = 24;
+}
+--EXPECTF--
+Fatal error: Cannot declare const Bazzle\BAR because the name is already in use in %s on line %d
diff --git a/Zend/tests/nested_method_and_function.phpt b/Zend/tests/nested_method_and_function.phpt
new file mode 100644
index 0000000000..19f92ad260
--- /dev/null
+++ b/Zend/tests/nested_method_and_function.phpt
@@ -0,0 +1,39 @@
+--TEST--
+active_class_entry must be always correct (__METHOD__ should not depend on declaring function ce)
+--FILE--
+<?php
+
+namespace Baz;
+
+class Foo {
+ public static function bar() {
+ function foo() {
+ var_dump(__FUNCTION__);
+ var_dump(__METHOD__);
+ var_dump(__CLASS__);
+ }
+
+ foo();
+
+ var_dump(__FUNCTION__);
+ var_dump(__METHOD__);
+ var_dump(__CLASS__);
+
+ return function() {var_dump(__FUNCTION__); var_dump(__METHOD__); var_dump(__CLASS__); };
+ }
+}
+
+$c = Foo::bar();
+
+$c();
+?>
+--EXPECT--
+string(7) "Baz\foo"
+string(7) "Baz\foo"
+string(7) "Baz\Foo"
+string(3) "bar"
+string(12) "Baz\Foo::bar"
+string(7) "Baz\Foo"
+string(13) "Baz\{closure}"
+string(13) "Baz\{closure}"
+string(7) "Baz\Foo" \ No newline at end of file
diff --git a/Zend/tests/new_args_without_ctor.phpt b/Zend/tests/new_args_without_ctor.phpt
new file mode 100644
index 0000000000..91456890d2
--- /dev/null
+++ b/Zend/tests/new_args_without_ctor.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Argument of new on class without constructor are evaluated
+--FILE--
+<?php
+
+new stdClass(print 'a', print 'b');
+
+?>
+--EXPECT--
+ab
diff --git a/Zend/tests/ns_055.phpt b/Zend/tests/ns_055.phpt
index a692e47601..16e3e69777 100644
--- a/Zend/tests/ns_055.phpt
+++ b/Zend/tests/ns_055.phpt
@@ -1,5 +1,5 @@
--TEST--
-055: typehints in namespaces
+055: types in namespaces
--FILE--
<?php
namespace test\ns1;
diff --git a/Zend/tests/ns_068.phpt b/Zend/tests/ns_068.phpt
index 97e43568e5..b6dc258fd3 100644
--- a/Zend/tests/ns_068.phpt
+++ b/Zend/tests/ns_068.phpt
@@ -11,4 +11,4 @@ echo __NAMESPACE__ . "\n";
===DONE===
--EXPECTF--
-Fatal error: Namespace declaration statement has to be the very first statement in the script in %sns_068.php on line %d
+Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in %sns_068.php on line %d
diff --git a/Zend/tests/ns_083.phpt b/Zend/tests/ns_083.phpt
index 4b821dbf0b..350b335590 100644
--- a/Zend/tests/ns_083.phpt
+++ b/Zend/tests/ns_083.phpt
@@ -11,4 +11,4 @@ echo "ok\n";
}
?>
--EXPECTF--
-Fatal error: Namespace declaration statement has to be the very first statement in the script in %s on line %d
+Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in %sns_083.php on line %d
diff --git a/Zend/tests/ns_094.phpt b/Zend/tests/ns_094.phpt
index 792b2eba1d..16001da67e 100644
--- a/Zend/tests/ns_094.phpt
+++ b/Zend/tests/ns_094.phpt
@@ -3,7 +3,7 @@ Type group use declarations should not allow override on inner itens
--FILE--
<?php
-// should not throw syntax errors
+// should throw syntax errors
use const Foo\Bar\{
A,
@@ -12,5 +12,4 @@ use const Foo\Bar\{
};
--EXPECTF--
-
-Parse error: syntax error, unexpected 'const' (T_CONST), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in %s on line 7
+Parse error: syntax error, unexpected 'const' (T_CONST), expecting identifier (T_STRING) in %s on line 7
diff --git a/Zend/tests/ns_095.phpt b/Zend/tests/ns_095.phpt
new file mode 100644
index 0000000000..9c4496473d
--- /dev/null
+++ b/Zend/tests/ns_095.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Absolute namespaces should be allowed
+--FILE--
+<?php
+
+namespace Foo\Bar {
+ class ClassA{}
+ class ClassB{}
+ class ClassC{}
+
+ function fn_a(){ return __FUNCTION__; }
+ function fn_b(){ return __FUNCTION__; }
+ function fn_c(){ return __FUNCTION__; }
+
+ const CONST_A = 1;
+ const CONST_B = 2;
+ const CONST_C = 3;
+}
+
+namespace Baz {
+
+ use \Foo\Bar\{ClassA, ClassB, ClassC};
+ use function \Foo\Bar\{fn_a, fn_b, fn_c};
+ use const \Foo\Bar\{CONST_A, CONST_B, CONST_C};
+
+ var_dump(ClassA::class);
+ var_dump(ClassB::class);
+ var_dump(ClassC::class);
+ var_dump(fn_a());
+ var_dump(fn_b());
+ var_dump(fn_c());
+ var_dump(CONST_A);
+ var_dump(CONST_B);
+ var_dump(CONST_C);
+
+ echo "\nDone\n";
+}
+?>
+--EXPECTF--
+
+string(14) "Foo\Bar\ClassA"
+string(14) "Foo\Bar\ClassB"
+string(14) "Foo\Bar\ClassC"
+string(12) "Foo\Bar\fn_a"
+string(12) "Foo\Bar\fn_b"
+string(12) "Foo\Bar\fn_c"
+int(1)
+int(2)
+int(3)
+
+Done
diff --git a/Zend/tests/ns_096.phpt b/Zend/tests/ns_096.phpt
new file mode 100644
index 0000000000..48f0c75387
--- /dev/null
+++ b/Zend/tests/ns_096.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Group use declaration list should not contain leading separator
+--FILE--
+<?php
+
+use Foo\Bar\{\Baz};
+
+?>
+--EXPECTF--
+Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting identifier (T_STRING) or function (T_FUNCTION) or const (T_CONST) in %s on line 3
diff --git a/Zend/tests/nullable_types/array.phpt b/Zend/tests/nullable_types/array.phpt
new file mode 100644
index 0000000000..7b0a2ed4d5
--- /dev/null
+++ b/Zend/tests/nullable_types/array.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Explicitly nullable array type
+--FILE--
+<?php
+
+function _array_(?array $v): ?array {
+ return $v;
+}
+
+var_dump(_array_(null));
+var_dump(_array_([]));
+
+--EXPECT--
+NULL
+array(0) {
+}
+
diff --git a/Zend/tests/nullable_types/contravariant_nullable_param_succeeds.phpt b/Zend/tests/nullable_types/contravariant_nullable_param_succeeds.phpt
new file mode 100644
index 0000000000..f4d1e315fc
--- /dev/null
+++ b/Zend/tests/nullable_types/contravariant_nullable_param_succeeds.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Subtype can add nullability to a parameter (contravariance)
+
+--FILE--
+<?php
+
+interface A {
+ function method(int $p);
+}
+
+class B implements A {
+ function method(?int $p) { }
+}
+
+$b = new B();
+$b->method(null);
+
+--EXPECT--
+
diff --git a/Zend/tests/nullable_types/contravariant_nullable_return_fails.phpt b/Zend/tests/nullable_types/contravariant_nullable_return_fails.phpt
new file mode 100644
index 0000000000..c9be479ead
--- /dev/null
+++ b/Zend/tests/nullable_types/contravariant_nullable_return_fails.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Return type cannot add nullability (contravariance)
+
+--FILE--
+<?php
+
+interface A {
+ function method(): int;
+}
+
+interface B extends A {
+ function method(): ?int;
+}
+
+--EXPECTF--
+Fatal error: Declaration of B::method(): ?int must be compatible with A::method(): int in %s on line %d
+
diff --git a/Zend/tests/nullable_types/covariant_nullable_param_fails.phpt b/Zend/tests/nullable_types/covariant_nullable_param_fails.phpt
new file mode 100644
index 0000000000..65b2858e6b
--- /dev/null
+++ b/Zend/tests/nullable_types/covariant_nullable_param_fails.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Subtype cannot remove nullable parameter (covariance)
+
+--FILE--
+<?php
+
+interface A {
+ function method(?int $p);
+}
+
+class B implements A {
+ function method(int $p) { }
+}
+
+--EXPECTF--
+Fatal error: Declaration of B::method(int $p) must be compatible with A::method(?int $p) in %s on line %d
+
diff --git a/Zend/tests/nullable_types/covariant_nullable_return_succeds.phpt b/Zend/tests/nullable_types/covariant_nullable_return_succeds.phpt
new file mode 100644
index 0000000000..5776f9b99d
--- /dev/null
+++ b/Zend/tests/nullable_types/covariant_nullable_return_succeds.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Nullable covariant return types
+
+--FILE--
+<?php
+
+interface A {
+ function method(): ?int;
+}
+
+interface B extends A {
+ function method(): int;
+}
+
+--EXPECT--
+
diff --git a/Zend/tests/nullable_types/float.phpt b/Zend/tests/nullable_types/float.phpt
new file mode 100644
index 0000000000..8e44524cf0
--- /dev/null
+++ b/Zend/tests/nullable_types/float.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Explicitly nullable float type
+--FILE--
+<?php
+
+function _float_(?float $v): ?float {
+ return $v;
+}
+
+var_dump(_float_(null));
+var_dump(_float_(1.3));
+
+--EXPECT--
+NULL
+float(1.3)
+
diff --git a/Zend/tests/nullable_types/int.phpt b/Zend/tests/nullable_types/int.phpt
new file mode 100644
index 0000000000..ec75132edb
--- /dev/null
+++ b/Zend/tests/nullable_types/int.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Explicitly nullable int type
+--FILE--
+<?php
+
+function _int_(?int $v): ?int {
+ return $v;
+}
+
+var_dump(_int_(null));
+var_dump(_int_(1));
+
+--EXPECT--
+NULL
+int(1)
+
diff --git a/Zend/tests/nullable_types/invariant_param_and_return_succeeds.phpt b/Zend/tests/nullable_types/invariant_param_and_return_succeeds.phpt
new file mode 100644
index 0000000000..0542e52c0f
--- /dev/null
+++ b/Zend/tests/nullable_types/invariant_param_and_return_succeeds.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Invariant parameter and return types work with nullable types
+
+--FILE--
+<?php
+
+interface A {
+ function method(?int $i): ?int;
+}
+
+class B implements A {
+ function method(?int $i): ?int {
+ return $i;
+ }
+}
+
+$b = new B();
+var_dump($b->method(null));
+var_dump($b->method(1));
+
+--EXPECT--
+NULL
+int(1)
+
diff --git a/Zend/tests/nullable_types/nullable_type_parameters_do_not_have_default_value.phpt b/Zend/tests/nullable_types/nullable_type_parameters_do_not_have_default_value.phpt
new file mode 100644
index 0000000000..13b25e0dac
--- /dev/null
+++ b/Zend/tests/nullable_types/nullable_type_parameters_do_not_have_default_value.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Explicit nullable types do not imply a default value
+
+--FILE--
+<?php
+
+function f(?callable $p) {}
+
+f();
+
+--EXPECTF--
+Fatal error: Uncaught TypeError: Argument 1 passed to f() must be callable, none given, called in %s on line %d and defined in %s:%d
+Stack trace:
+#%d %s
+#%d %s
+ thrown in %s on line %d
+
diff --git a/Zend/tests/nullable_types/string.phpt b/Zend/tests/nullable_types/string.phpt
new file mode 100644
index 0000000000..ffc6591b6b
--- /dev/null
+++ b/Zend/tests/nullable_types/string.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Explicitly nullable string type
+--FILE--
+<?php
+
+function _string_(?string $v): ?string {
+ return $v;
+}
+
+var_dump(_string_(null));
+var_dump(_string_("php"));
+
+--EXPECT--
+NULL
+string(3) "php"
+
diff --git a/Zend/tests/numeric_string_errors.phpt b/Zend/tests/numeric_string_errors.phpt
new file mode 100644
index 0000000000..e98c58dda7
--- /dev/null
+++ b/Zend/tests/numeric_string_errors.phpt
@@ -0,0 +1,195 @@
+--TEST--
+Invalid numeric string E_WARNINGs and E_NOTICEs
+--FILE--
+<?php
+
+var_dump("2 Lorem" + "3 ipsum");
+var_dump("dolor" + "sit");
+echo "---", PHP_EOL;
+var_dump("5 amet," - "7 consectetur");
+var_dump("adipiscing" - "elit,");
+echo "---", PHP_EOL;
+var_dump("11 sed" * "13 do");
+var_dump("eiusmod" * "tempor");
+echo "---", PHP_EOL;
+var_dump("17 incididunt" / "19 ut");
+var_dump("labore" / "et");
+echo "---", PHP_EOL;
+var_dump("23 dolore" ** "29 magna");
+var_dump("aliqua." ** "Ut");
+echo "---", PHP_EOL;
+var_dump("31 enim" % "37 ad");
+try {
+ var_dump("minim" % "veniam,");
+} catch (DivisionByZeroError $e) {
+}
+echo "---", PHP_EOL;
+var_dump("41 minim" << "43 veniam,");
+var_dump("quis" << "nostrud");
+echo "---", PHP_EOL;
+var_dump("47 exercitation" >> "53 ullamco");
+var_dump("laboris" >> "nisi");
+echo "---", PHP_EOL;
+var_dump("59 ut" | 61);
+var_dump(67 | "71 aliquip");
+var_dump("ex" | 73);
+var_dump(79 | "ea");
+echo "---", PHP_EOL;
+var_dump("83 commodo" & 89);
+var_dump(97 & "101 consequat.");
+var_dump("Duis" & 103);
+var_dump(107 & "aute");
+echo "---", PHP_EOL;
+var_dump("109 irure" ^ 113);
+var_dump(127 ^ "131 dolor");
+var_dump("in" ^ 137);
+var_dump(139 ^ "reprehenderit");
+echo "---", PHP_EOL;
+var_dump(+"149 in");
+var_dump(+"voluptate");
+echo "---", PHP_EOL;
+var_dump(-"151 velit");
+var_dump(-"esse");
+?>
+--EXPECTF--
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(5)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(-2)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(143)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+float(0.89473684210526)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: Division by zero in %s on line %d
+float(NAN)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+float(3.0910586430935E+39)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(1)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(31)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(%d)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(0)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(63)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(71)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(73)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(79)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(81)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(97)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(28)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(252)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(137)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(139)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(149)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(-151)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
diff --git a/Zend/tests/numeric_string_errors_assign.phpt b/Zend/tests/numeric_string_errors_assign.phpt
new file mode 100644
index 0000000000..8d882aadcc
--- /dev/null
+++ b/Zend/tests/numeric_string_errors_assign.phpt
@@ -0,0 +1,236 @@
+--TEST--
+Invalid numeric string E_WARNINGs and E_NOTICEs, combined assignment operations
+--FILE--
+<?php
+
+// prevents CT eval
+function foxcache($val) {
+ return [$val][0];
+}
+
+$a = foxcache("2 Lorem");
+$a += "3 ipsum";
+var_dump($a);
+$a = foxcache("dolor");
+$a += "sit";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("5 amet,");
+$a -= "7 consectetur";
+var_dump($a);
+$a = foxcache("adipiscing");
+$a -= "elit,";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("11 sed");
+$a *= "13 do";
+var_dump($a);
+$a = foxcache("eiusmod");
+$a *= "tempor";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("17 incididunt");
+$a /= "19 ut";
+var_dump($a);
+$a = foxcache("labore");
+$a /= "et";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("23 dolore");
+$a **= "29 magna";
+var_dump($a);
+$a = foxcache("aliqua.");
+$a **= "Ut";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("31 enim");
+$a %= "37 ad";
+var_dump($a);
+try {
+ $a = foxcache("minim");
+ $a %= "veniam,";
+ var_dump($a);
+} catch (DivisionByZeroError $e) {
+}
+echo "---", PHP_EOL;
+$a = foxcache("41 minim");
+$a <<= "43 veniam,";
+var_dump($a);
+$a = foxcache("quis");
+$a <<= "nostrud";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("47 exercitation");
+$a >>= "53 ullamco";
+var_dump($a);
+$a = foxcache("laboris");
+$a >>= "nisi";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("59 ut");
+$a |= 61;
+var_dump($a);
+$a = foxcache(67);
+$a |= "71 aliquip";
+var_dump($a);
+$a = foxcache("ex");
+$a |= 73;
+var_dump($a);
+$a = foxcache(79);
+$a |= "ea";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("83 commodo");
+$a &= 89;
+var_dump($a);
+$a = foxcache(97);
+$a &= "101 consequat.";
+var_dump($a);
+$a = foxcache("Duis");
+$a &= 103;
+var_dump($a);
+$a = foxcache(107);
+$a &= "aute";
+var_dump($a);
+echo "---", PHP_EOL;
+$a = foxcache("109 irure");
+$a ^= 113;
+var_dump($a);
+$a = foxcache(127);
+$a ^= "131 dolor";
+var_dump($a);
+$a = foxcache("in");
+$a ^= 137;
+var_dump($a);
+$a = foxcache(139);
+$a ^= "reprehenderit";
+var_dump($a);
+?>
+--EXPECTF--
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(5)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(-2)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(143)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+float(0.89473684210526)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: Division by zero in %s on line %d
+float(NAN)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+float(3.0910586430935E+39)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(1)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(31)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(%d)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(0)
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(63)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(71)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(73)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(79)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(81)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(97)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(0)
+---
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(28)
+
+Notice: A non well formed numeric value encountered in %s on line %d
+int(252)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(137)
+
+Warning: A non-numeric value encountered in %s on line %d
+int(139)
diff --git a/Zend/tests/oct_overflow_char.phpt b/Zend/tests/oct_overflow_char.phpt
new file mode 100644
index 0000000000..32060d8593
--- /dev/null
+++ b/Zend/tests/oct_overflow_char.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Octal overflow in string interpolation
+--FILE--
+<?php
+
+// "abc", ordinarily 'b' would be \142, but we'll deliberately overflow the value by \400
+echo "\141\542\143\n";
+--EXPECTF--
+Warning: Octal escape sequence overflow \542 is greater than \377 in %s%eoct_overflow_char.php on line 4
+abc
diff --git a/Zend/tests/overloaded_func_001.phpt b/Zend/tests/overloaded_func_001.phpt
new file mode 100644
index 0000000000..2702772a46
--- /dev/null
+++ b/Zend/tests/overloaded_func_001.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Overloaded function 001
+--SKIPIF--
+<?php
+if (!PHP_DEBUG) die("skip only run in debug version");
+?>
+--FILE--
+<?php
+var_dump(_ZendTestClass::test());
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Cannot call overloaded function for non-object in %soverloaded_func_001.php:%d
+Stack trace:
+#0 {main}
+ thrown in %soverloaded_func_001.php on line %d
diff --git a/Zend/tests/overloaded_func_002.phpt b/Zend/tests/overloaded_func_002.phpt
new file mode 100644
index 0000000000..6c16965919
--- /dev/null
+++ b/Zend/tests/overloaded_func_002.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Overloaded function 002
+--SKIPIF--
+<?php
+if (!PHP_DEBUG) die("skip only run in debug version");
+?>
+--FILE--
+<?php
+$a = new _ZendTestClass();
+var_dump($a->{trim(" test")}());
+?>
+--EXPECT--
+string(4) "test"
diff --git a/Zend/tests/parse_str_with_unpack.phpt b/Zend/tests/parse_str_with_unpack.phpt
new file mode 100644
index 0000000000..50b296d710
--- /dev/null
+++ b/Zend/tests/parse_str_with_unpack.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Calling parse_str through argument unpacking
+--FILE--
+<?php
+
+function test() {
+ $i = 0;
+ parse_str(...["i=41"]);
+ var_dump($i + 1);
+}
+test();
+
+?>
+--EXPECT--
+int(42)
diff --git a/Zend/tests/php_errormsg_misoptimization.phpt b/Zend/tests/php_errormsg_misoptimization.phpt
new file mode 100644
index 0000000000..c121c1021a
--- /dev/null
+++ b/Zend/tests/php_errormsg_misoptimization.phpt
@@ -0,0 +1,20 @@
+--TEST--
+The variable $php_errormsg shouldn't be optimized as it may be unpredictably modified
+--INI--
+track_errors=1
+--FILE--
+<?php
+
+function test() {
+ $php_errormsg = 1;
+ echo $undef;
+ var_dump($php_errormsg + 1);
+}
+test();
+
+?>
+--EXPECTF--
+Notice: Undefined variable: undef in %s on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+int(1)
diff --git a/Zend/tests/qm_assign_ref_unwrap_leak.phpt b/Zend/tests/qm_assign_ref_unwrap_leak.phpt
new file mode 100644
index 0000000000..137aff5212
--- /dev/null
+++ b/Zend/tests/qm_assign_ref_unwrap_leak.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Leak in QM_ASSIGN when unwrapping references (rc=1)
+--FILE--
+<?php
+
+function &ref() {
+ $str = "str";
+ $str .= "str";
+ return $str;
+}
+
+var_dump(true ? ref() : ref());
+var_dump(ref() ?: ref());
+var_dump(ref() ?? ref());
+
+?>
+--EXPECT--
+string(6) "strstr"
+string(6) "strstr"
+string(6) "strstr"
diff --git a/Zend/tests/return_types/028.phpt b/Zend/tests/return_types/028.phpt
index d2a78ede4a..8ded158a82 100644
--- a/Zend/tests/return_types/028.phpt
+++ b/Zend/tests/return_types/028.phpt
@@ -12,7 +12,7 @@ function foo(): stdClass {
try {
foo();
} catch (Error $e) {
- print $e->getMessage();
+ echo $e->getMessage(), " in ", $e->getFile(), " on line ", $e->getLine();
}
?>
diff --git a/Zend/tests/return_types/029.phpt b/Zend/tests/return_types/029.phpt
new file mode 100644
index 0000000000..adc07cde7f
--- /dev/null
+++ b/Zend/tests/return_types/029.phpt
@@ -0,0 +1,28 @@
+--TEST--
+return type with finally
+--INI--
+opcache.enable=0
+--FILE--
+<?php
+
+function foo() : array {
+ try {
+ throw new Exception("xxxx");
+ } finally {
+ return null;
+ }
+}
+
+foo();
+?>
+--EXPECTF--
+Fatal error: Uncaught Exception: xxxx in %s:%d
+Stack trace:
+#0 %s(%d): foo()
+#1 {main}
+
+Next TypeError: Return value of foo() must be of the type array, null returned in %s29.php:%d
+Stack trace:
+#0 %s(%d): foo()
+#1 {main}
+ thrown in %s029.php on line %d
diff --git a/Zend/tests/return_types/030.phpt b/Zend/tests/return_types/030.phpt
new file mode 100644
index 0000000000..d1ceac8329
--- /dev/null
+++ b/Zend/tests/return_types/030.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Nullable return value
+--FILE--
+<?php
+function foo($x) : ?array {
+ return $x;
+}
+
+foo([]);
+echo "ok\n";
+foo(null);
+echo "ok\n";
+foo(0);
+?>
+--EXPECTF--
+ok
+ok
+
+Fatal error: Uncaught TypeError: Return value of foo() must be of the type array, integer returned in %s030.php:3
+Stack trace:
+#0 %s030.php(10): foo(0)
+#1 {main}
+ thrown in %s030.php on line 3
diff --git a/Zend/tests/return_types/031.phpt b/Zend/tests/return_types/031.phpt
new file mode 100644
index 0000000000..91ee2f8ce4
--- /dev/null
+++ b/Zend/tests/return_types/031.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Nullable return type inheritance rules (non-nullable and nullable)
+--FILE--
+<?php
+class A {
+ function foo(): int {}
+}
+class B extends A {
+ function foo(): ?int {}
+}
+?>
+DONE
+--EXPECTF--
+Fatal error: Declaration of B::foo(): ?int must be compatible with A::foo(): int in %s031.php on line 7 \ No newline at end of file
diff --git a/Zend/tests/return_types/032.phpt b/Zend/tests/return_types/032.phpt
new file mode 100644
index 0000000000..00790b5d60
--- /dev/null
+++ b/Zend/tests/return_types/032.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Nullable return type inheritance rules (nullable and non-nullable)
+--FILE--
+<?php
+class A {
+ function foo(): ?int {}
+}
+class B extends A {
+ function foo(): int {}
+}
+?>
+DONE
+--EXPECT--
+DONE
diff --git a/Zend/tests/return_types/bug70557.phpt b/Zend/tests/return_types/bug70557.phpt
new file mode 100644
index 0000000000..8cc123a581
--- /dev/null
+++ b/Zend/tests/return_types/bug70557.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #70557 (Memleak on return type verifying failed).
+--INI--
+opcache.enable=0
+--FILE--
+<?php
+
+function getNumber() : int {
+ return "foo";
+}
+
+try {
+ getNumber();
+} catch (TypeError $e) {
+ var_dump($e->getMessage());
+}
+?>
+--EXPECT--
+string(72) "Return value of getNumber() must be of the type integer, string returned"
diff --git a/Zend/tests/return_types/bug71092.phpt b/Zend/tests/return_types/bug71092.phpt
new file mode 100644
index 0000000000..1d4fe983b3
--- /dev/null
+++ b/Zend/tests/return_types/bug71092.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71092 (Segmentation fault with return type hinting)
+--INI--
+opcache.enable=0
+--FILE--
+<?php
+
+function boom(): array {
+ $data = [['id']];
+ switch ($data[0]) {
+ case ['id']:
+ return null;
+ }
+}
+
+boom();
+?>
+--EXPECTF--
+Fatal error: Uncaught TypeError: Return value of boom() must be of the type array, null returned in %sbug71092.php:%d
+Stack trace:
+#0 %s(%d): boom()
+#1 {main}
+ thrown in %sbug71092.php on line %d
diff --git a/Zend/tests/return_types/bug71978.phpt b/Zend/tests/return_types/bug71978.phpt
new file mode 100644
index 0000000000..e3c8440212
--- /dev/null
+++ b/Zend/tests/return_types/bug71978.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #71978 (Existence of return type hint affects other compatibility rules)
+--FILE--
+<?php
+class A {
+ function foo(int $a) {}
+}
+class B extends A {
+ function foo(string $a) {}
+}
+class A1 {
+ function foo(int $a): int {}
+}
+class B1 extends A1 {
+ function foo(string $a): int {}
+}
+?>
+--EXPECTF--
+Warning: Declaration of B::foo(string $a) should be compatible with A::foo(int $a) in %s on line %d
+
+Warning: Declaration of B1::foo(string $a): int should be compatible with A1::foo(int $a): int in %s on line %d
diff --git a/Zend/tests/return_types/internal_functions001.phpt b/Zend/tests/return_types/internal_functions001.phpt
index 66c7123a4d..fffaf54574 100644
--- a/Zend/tests/return_types/internal_functions001.phpt
+++ b/Zend/tests/return_types/internal_functions001.phpt
@@ -1,5 +1,5 @@
--TEST--
-Return type hinting for internal functions
+Return type for internal functions
--SKIPIF--
<?php
diff --git a/Zend/tests/return_types/internal_functions002.phpt b/Zend/tests/return_types/internal_functions002.phpt
index 65838a1a67..7cdb2b884a 100644
--- a/Zend/tests/return_types/internal_functions002.phpt
+++ b/Zend/tests/return_types/internal_functions002.phpt
@@ -1,5 +1,5 @@
--TEST--
-Return type hinting for internal functions 2
+Return type for internal functions 2
--SKIPIF--
<?php
diff --git a/Zend/tests/return_types/reflection001.phpt b/Zend/tests/return_types/reflection001.phpt
index f616504747..6492ee1906 100644
--- a/Zend/tests/return_types/reflection001.phpt
+++ b/Zend/tests/return_types/reflection001.phpt
@@ -1,5 +1,5 @@
--TEST--
-Return type hinting and Reflection::export()
+Return type and Reflection::export()
--SKIPIF--
<?php
diff --git a/Zend/tests/return_types/void_allowed.phpt b/Zend/tests/return_types/void_allowed.phpt
new file mode 100644
index 0000000000..8f07c7392e
--- /dev/null
+++ b/Zend/tests/return_types/void_allowed.phpt
@@ -0,0 +1,20 @@
+--TEST--
+void return type: acceptable cases
+--FILE--
+<?php
+
+function foo(): void {
+ // okay
+}
+
+foo();
+
+function bar(): void {
+ return; // okay
+}
+
+bar();
+
+echo "OK!", PHP_EOL;
+--EXPECT--
+OK!
diff --git a/Zend/tests/return_types/void_disallowed1.phpt b/Zend/tests/return_types/void_disallowed1.phpt
new file mode 100644
index 0000000000..365e2060bf
--- /dev/null
+++ b/Zend/tests/return_types/void_disallowed1.phpt
@@ -0,0 +1,12 @@
+--TEST--
+void return type: unacceptable cases: explicit NULL return
+--FILE--
+<?php
+
+function foo(): void {
+ return NULL; // not permitted in a void function
+}
+
+// Note the lack of function call: function validated at compile-time
+--EXPECTF--
+Fatal error: A void function must not return a value (did you mean "return;" instead of "return null;"?) in %s on line %d
diff --git a/Zend/tests/return_types/void_disallowed2.phpt b/Zend/tests/return_types/void_disallowed2.phpt
new file mode 100644
index 0000000000..7bbc3ac24f
--- /dev/null
+++ b/Zend/tests/return_types/void_disallowed2.phpt
@@ -0,0 +1,12 @@
+--TEST--
+void return type: unacceptable cases: explicit return of some other value
+--FILE--
+<?php
+
+function foo(): void {
+ return -1; // not permitted in a void function
+}
+
+// Note the lack of function call: function validated at compile-time
+--EXPECTF--
+Fatal error: A void function must not return a value in %s on line %d
diff --git a/Zend/tests/return_types/void_parameter.phpt b/Zend/tests/return_types/void_parameter.phpt
new file mode 100644
index 0000000000..4c6e918406
--- /dev/null
+++ b/Zend/tests/return_types/void_parameter.phpt
@@ -0,0 +1,8 @@
+--TEST--
+void return type: not valid as a parameter type
+--FILE--
+<?php
+
+function foobar(void $a) {}
+--EXPECTF--
+Fatal error: void cannot be used as a parameter type in %s on line %d
diff --git a/Zend/tests/self_and.phpt b/Zend/tests/self_and.phpt
index cdcde77992..44db877e92 100644
--- a/Zend/tests/self_and.phpt
+++ b/Zend/tests/self_and.phpt
@@ -20,6 +20,10 @@ echo "Done\n";
?>
--EXPECTF--
int(18)
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(33)
Done
diff --git a/Zend/tests/self_instanceof_outside_class.phpt b/Zend/tests/self_instanceof_outside_class.phpt
new file mode 100644
index 0000000000..4caef37883
--- /dev/null
+++ b/Zend/tests/self_instanceof_outside_class.phpt
@@ -0,0 +1,17 @@
+--TEST--
+instanceof self outside a class
+--FILE--
+<?php
+
+$fn = function() {
+ try {
+ new stdClass instanceof self;
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+};
+$fn();
+
+?>
+--EXPECT--
+Cannot access self:: when no class scope is active
diff --git a/Zend/tests/self_method_or_prop_outside_class.phpt b/Zend/tests/self_method_or_prop_outside_class.phpt
new file mode 100644
index 0000000000..e4a499def8
--- /dev/null
+++ b/Zend/tests/self_method_or_prop_outside_class.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Accessing self:: properties or methods outside a class
+--FILE--
+<?php
+
+$fn = function() {
+ $str = "foo";
+ try {
+ self::${$str . "bar"};
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ unset(self::${$str . "bar"});
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ isset(self::${$str . "bar"});
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+ try {
+ self::{$str . "bar"}();
+ } catch (Error $e) {
+ echo $e->getMessage(), "\n";
+ }
+};
+$fn();
+
+?>
+--EXPECT--
+Cannot access self:: when no class scope is active
+Cannot access self:: when no class scope is active
+Cannot access self:: when no class scope is active
+Cannot access self:: when no class scope is active
diff --git a/Zend/tests/self_mod.phpt b/Zend/tests/self_mod.phpt
index 19e45d88fc..0b10987aeb 100644
--- a/Zend/tests/self_mod.phpt
+++ b/Zend/tests/self_mod.phpt
@@ -20,6 +20,10 @@ echo "Done\n";
?>
--EXPECTF--
int(13)
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(3)
Done
diff --git a/Zend/tests/self_or.phpt b/Zend/tests/self_or.phpt
index ae667bff16..8ace518bde 100644
--- a/Zend/tests/self_or.phpt
+++ b/Zend/tests/self_or.phpt
@@ -20,6 +20,10 @@ echo "Done\n";
?>
--EXPECTF--
int(127)
+
+Warning: A non-numeric value encountered in %s on line %d
int(11)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(45345)
Done
diff --git a/Zend/tests/self_xor.phpt b/Zend/tests/self_xor.phpt
index a7e43f539d..c097930d6d 100644
--- a/Zend/tests/self_xor.phpt
+++ b/Zend/tests/self_xor.phpt
@@ -20,6 +20,10 @@ echo "Done\n";
?>
--EXPECTF--
int(109)
+
+Warning: A non-numeric value encountered in %s on line %d
int(11)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(45312)
Done
diff --git a/Zend/tests/shift_001.phpt b/Zend/tests/shift_001.phpt
index aeb399452d..7546f1a6d8 100644
--- a/Zend/tests/shift_001.phpt
+++ b/Zend/tests/shift_001.phpt
@@ -20,6 +20,10 @@ echo "Done\n";
?>
--EXPECTF--
int(492)
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(362760)
Done
diff --git a/Zend/tests/shift_002.phpt b/Zend/tests/shift_002.phpt
index 4d8421a566..6288152585 100644
--- a/Zend/tests/shift_002.phpt
+++ b/Zend/tests/shift_002.phpt
@@ -20,6 +20,10 @@ echo "Done\n";
?>
--EXPECTF--
int(30)
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(5668)
Done
diff --git a/Zend/tests/str_offset_001.phpt b/Zend/tests/str_offset_001.phpt
index 8a6b91b49a..3317674857 100644
--- a/Zend/tests/str_offset_001.phpt
+++ b/Zend/tests/str_offset_001.phpt
@@ -1,51 +1,46 @@
---TEST--
-string offset 001
---FILE--
-<?php
-function foo($x) {
- var_dump($x);
-}
-
-$str = "abc";
-var_dump($str[-1]);
-var_dump($str[0]);
-var_dump($str[1]);
-var_dump($str[2]);
-var_dump($str[3]);
-var_dump($str[1][0]);
-var_dump($str[2][1]);
-
-foo($str[-1]);
-foo($str[0]);
-foo($str[1]);
-foo($str[2]);
-foo($str[3]);
-foo($str[1][0]);
-foo($str[2][1]);
-?>
---EXPECTF--
-Notice: Uninitialized string offset: -1 in %sstr_offset_001.php on line %d
-string(0) ""
-string(1) "a"
-string(1) "b"
-string(1) "c"
-
-Notice: Uninitialized string offset: 3 in %sstr_offset_001.php on line %d
-string(0) ""
-string(1) "b"
-
-Notice: Uninitialized string offset: 1 in %sstr_offset_001.php on line %d
-string(0) ""
-
-Notice: Uninitialized string offset: -1 in %sstr_offset_001.php on line %d
-string(0) ""
-string(1) "a"
-string(1) "b"
-string(1) "c"
-
-Notice: Uninitialized string offset: 3 in %sstr_offset_001.php on line %d
-string(0) ""
-string(1) "b"
-
-Notice: Uninitialized string offset: 1 in %sstr_offset_001.php on line %d
-string(0) ""
+--TEST--
+string offset 001
+--FILE--
+<?php
+// Test positive or null string offsets
+
+function foo($x) {
+ var_dump($x);
+}
+
+$str = "abc";
+var_dump($str[0]);
+var_dump($str[1]);
+var_dump($str[2]);
+var_dump($str[3]);
+var_dump($str[1][0]);
+var_dump($str[2][1]);
+
+foo($str[0]);
+foo($str[1]);
+foo($str[2]);
+foo($str[3]);
+foo($str[1][0]);
+foo($str[2][1]);
+?>
+--EXPECTF--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+
+Notice: Uninitialized string offset: 3 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "b"
+
+Notice: Uninitialized string offset: 1 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "a"
+string(1) "b"
+string(1) "c"
+
+Notice: Uninitialized string offset: 3 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "b"
+
+Notice: Uninitialized string offset: 1 in %sstr_offset_001.php on line %d
+string(0) ""
diff --git a/Zend/tests/str_offset_003.phpt b/Zend/tests/str_offset_003.phpt
new file mode 100644
index 0000000000..e357ac0c01
--- /dev/null
+++ b/Zend/tests/str_offset_003.phpt
@@ -0,0 +1,37 @@
+--TEST--
+string offset 003
+--FILE--
+<?php
+// Test negative string offsets
+
+function foo($x) {
+ var_dump($x);
+}
+
+$str = "abcdef";
+var_dump($str[-10]);
+var_dump($str[-3]);
+var_dump($str[2][-2]);
+var_dump($str[2][-1]);
+
+foo($str[-10]);
+foo($str[-3]);
+foo($str[2][-2]);
+foo($str[2][-1]);
+?>
+--EXPECTF--
+Notice: Uninitialized string offset: -10 in %sstr_offset_003.php on line %d
+string(0) ""
+string(1) "d"
+
+Notice: Uninitialized string offset: -2 in %sstr_offset_003.php on line %d
+string(0) ""
+string(1) "c"
+
+Notice: Uninitialized string offset: -10 in %sstr_offset_003.php on line %d
+string(0) ""
+string(1) "d"
+
+Notice: Uninitialized string offset: -2 in %sstr_offset_003.php on line %d
+string(0) ""
+string(1) "c"
diff --git a/Zend/tests/str_offset_004.phpt b/Zend/tests/str_offset_004.phpt
new file mode 100644
index 0000000000..c8ce607535
--- /dev/null
+++ b/Zend/tests/str_offset_004.phpt
@@ -0,0 +1,49 @@
+--TEST--
+string offset 004
+--FILE--
+<?php
+// Test assignments using (positive and negative) string offsets
+
+$str = "abcdefghijklmno";
+$i = 3;
+$j = -4;
+
+$str{2} = 'C';
+var_dump($str);
+
+$str{$i} = 'Z';
+var_dump($str);
+
+$str{-5} = 'P';
+var_dump($str);
+
+$str{$j} = 'Q';
+var_dump($str);
+
+$str{-20} = 'Y';
+var_dump($str);
+
+$str{-strlen($str)} = strtoupper($str{0}); /* An exotic ucfirst() ;) */
+var_dump($str);
+
+$str{20} = 'N';
+var_dump($str);
+
+$str{-2} = 'UFO';
+var_dump($str);
+
+$str{-$i} = $str{$j*2};
+var_dump($str);
+?>
+--EXPECTF--
+string(15) "abCdefghijklmno"
+string(15) "abCZefghijklmno"
+string(15) "abCZefghijPlmno"
+string(15) "abCZefghijPQmno"
+
+Warning: Illegal string offset: -20 in %sstr_offset_004.php on line %d
+string(15) "abCZefghijPQmno"
+string(15) "AbCZefghijPQmno"
+string(21) "AbCZefghijPQmno N"
+string(21) "AbCZefghijPQmno UN"
+string(21) "AbCZefghijPQmno nUN"
diff --git a/Zend/tests/temporary_cleaning_001.phpt b/Zend/tests/temporary_cleaning_001.phpt
new file mode 100644
index 0000000000..f2ccbb35b8
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_001.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Temporary leak on exception
+--FILE--
+<?php
+
+function ops() {
+ throw new Exception();
+}
+
+try {
+ $x = 2;
+ $y = new stdClass;
+ while ($x-- && new stdClass) {
+ $r = [$x] + ($y ? ((array) $x) + [2] : ops());
+ $y = (array) $y;
+ }
+} catch (Exception $e) {
+}
+
+?>
+==DONE==
+--EXPECT--
+==DONE==
diff --git a/Zend/tests/temporary_cleaning_002.phpt b/Zend/tests/temporary_cleaning_002.phpt
new file mode 100644
index 0000000000..bea54e7f77
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Temporary leak on rope (encapsed string)
+--FILE--
+<?php
+class Obj {
+ function __get($x) {
+ throw new Exception();
+ }
+}
+
+$x = new Obj;
+$y = 0;
+
+try {
+ $r = "$y|$x->x|";
+} catch (Exception $e) {
+}
+
+try {
+ $r = "$x->x|$y|";
+} catch (Exception $e) {
+}
+
+try {
+ $r = "$y|$y|$x->x";
+} catch (Exception $e) {
+}
+
+?>
+==DONE==
+--EXPECT--
+==DONE==
diff --git a/Zend/tests/temporary_cleaning_003.phpt b/Zend/tests/temporary_cleaning_003.phpt
new file mode 100644
index 0000000000..acff8c85f0
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_003.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Fundamental memory leak test on temporaries
+--FILE--
+<?php
+
+function ops() {
+ throw new Exception();
+}
+
+try{
+ $x = 1;
+ $r = [$x] + ops();
+} catch (Exception $e) {
+}
+
+?>
+==DONE==
+--EXPECT--
+==DONE==
diff --git a/Zend/tests/temporary_cleaning_004.phpt b/Zend/tests/temporary_cleaning_004.phpt
new file mode 100644
index 0000000000..b8a02516b0
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_004.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Temporary leak with switch
+--FILE--
+<?php
+
+function ops() {
+ throw new Exception();
+}
+
+$a = [new stdClass, new stdClass];
+switch ($a[0]) {
+ case false:
+ break;
+ default:
+ try {
+ $x = 2;
+ $y = new stdClass;
+ while ($x-- && new stdClass) {
+ $r = [$x] + ($y ? ((array) $x) + [2] : ops());
+ $y = (array) $y;
+ }
+ } catch (Exception $e) {
+ }
+}
+
+try {
+ switch ($a[0]) {
+ case false:
+ break;
+ default:
+ $x = 2;
+ $y = new stdClass;
+ while ($x-- && new stdClass) {
+ $r = [$x] + ($y ? ((array) $x) + [2] : ops());
+ $y = (array) $y;
+ }
+ }
+} catch (Exception $e) {
+}
+
+?>
+==DONE==
+--EXPECT--
+==DONE==
diff --git a/Zend/tests/temporary_cleaning_005.phpt b/Zend/tests/temporary_cleaning_005.phpt
new file mode 100644
index 0000000000..e8c7febe0b
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_005.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Temporary leak with foreach
+--FILE--
+<?php
+
+function ops() {
+ throw new Exception();
+}
+
+$a = [new stdClass, new stdClass];
+foreach ([$a, [new stdClass]] as $b) {
+ switch ($b[0]) {
+ case false:
+ break;
+ default:
+ try {
+ $x = 2;
+ $y = new stdClass;
+ while ($x-- && new stdClass) {
+ $r = [$x] + ($y ? ((array) $x) + [2] : ops());
+ $y = (array) $y;
+ }
+ } catch (Exception $e) {
+ }
+ }
+}
+
+foreach ([$a, [new stdClass]] as $b) {
+ try {
+ switch ($b[0]) {
+ case false:
+ break;
+ default:
+ $x = 2;
+ $y = new stdClass;
+ while ($x-- && new stdClass) {
+ $r = [$x] + ($y ? ((array) $x) + [2] : ops());
+ $y = (array) $y;
+ }
+ }
+ } catch (Exception $e) {
+ }
+}
+
+?>
+==DONE==
+--EXPECT--
+==DONE==
diff --git a/Zend/tests/temporary_cleaning_006.phpt b/Zend/tests/temporary_cleaning_006.phpt
new file mode 100644
index 0000000000..a7936d3915
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_006.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Exception after separation during indirect write to fcall result
+--FILE--
+<?php
+
+function throwing() { throw new Exception; }
+
+function getArray($x) { return [$x]; }
+
+try {
+ getArray(0)[throwing()] = 1;
+} catch (Exception $e) {
+ echo "Exception\n";
+}
+
+?>
+--EXPECT--
+Exception
diff --git a/Zend/tests/temporary_cleaning_007.phpt b/Zend/tests/temporary_cleaning_007.phpt
new file mode 100644
index 0000000000..0e29ed6c33
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_007.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Exception inside a foreach loop with return
+--FILE--
+<?php
+class saboteurTestController {
+ public function isConsistent() { throw new \Exception(); }
+}
+
+$controllers = array(new saboteurTestController(),new saboteurTestController());
+foreach ($controllers as $controller) {
+ try {
+ if ($controller->isConsistent()) {
+ return $controller;
+ }
+ } catch (\Exception $e) {
+ echo "Exception\n";
+ }
+}
+?>
+--EXPECT--
+Exception
+Exception
diff --git a/Zend/tests/temporary_cleaning_008.phpt b/Zend/tests/temporary_cleaning_008.phpt
new file mode 100644
index 0000000000..fabd3b4b38
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_008.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Optimization of constant switch expression
+--FILE--
+<?php
+try {
+ switch ("1" . (int)2) {
+ case 12:
+ throw new Exception();
+ }
+} catch (Exception $e) {
+ echo "exception\n";
+}
+?>
+--EXPECT--
+exception
diff --git a/Zend/tests/temporary_cleaning_009.phpt b/Zend/tests/temporary_cleaning_009.phpt
new file mode 100644
index 0000000000..32a84a6ffd
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_009.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Live range & free on return
+--FILE--
+<?php
+class bar {
+ public $foo = 1;
+ public $bar = 1;
+
+ function __destruct() {
+ throw $this->foo;
+ }
+}
+foreach (new bar as &$foo) {
+ try {
+ $foo = new Exception;
+ return; // frees the loop variable
+ } catch (Exception $e) {
+ echo "exception\n";
+ }
+}
+echo "end\n";
+?>
+--EXPECTF--
+Fatal error: Uncaught Exception in %stemporary_cleaning_009.php:12
+Stack trace:
+#0 {main}
+ thrown in %stemporary_cleaning_009.php on line 12
diff --git a/Zend/tests/temporary_cleaning_010.phpt b/Zend/tests/temporary_cleaning_010.phpt
new file mode 100644
index 0000000000..e4456041b2
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_010.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Live range & throw from finally
+--FILE--
+<?php
+function test() {
+ try {
+ $a = [1, 2, 3];
+ return $a + [];
+ } finally {
+ throw new Exception;
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo "exception\n";
+}
+?>
+--EXPECT--
+exception
diff --git a/Zend/tests/temporary_cleaning_011.phpt b/Zend/tests/temporary_cleaning_011.phpt
new file mode 100644
index 0000000000..e4a6af3ab9
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_011.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Live range & lists
+--FILE--
+<?php
+class A {
+ function __destruct() {
+ throw new Exception();
+ }
+}
+$b = new A();
+$x = 0;
+$c = [[$x,$x]];
+try {
+ list($a, $b) = $c[0];
+} catch (Exception $e) {
+ echo "exception\n";
+}
+?>
+--EXPECT--
+exception
diff --git a/Zend/tests/temporary_cleaning_012.phpt b/Zend/tests/temporary_cleaning_012.phpt
new file mode 100644
index 0000000000..fdbea6d41d
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_012.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Live range of ZEND_NEW must be assigned to correct variable
+--FILE--
+<?php
+
+class Foo {
+ public static function test() {
+ self::$property = new self;
+ }
+}
+
+try {
+ Foo::test();
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECT--
+Access to undeclared static property: Foo::$property
diff --git a/Zend/tests/this_in_eval.phpt b/Zend/tests/this_in_eval.phpt
new file mode 100644
index 0000000000..ed3926cd66
--- /dev/null
+++ b/Zend/tests/this_in_eval.phpt
@@ -0,0 +1,18 @@
+--TEST--
+$this in eval() block
+--FILE--
+<?php
+class C {
+ function foo() {
+ eval('var_dump($this);');
+ eval('var_dump($this);');
+ }
+}
+$x = new C;
+$x->foo();
+--EXPECT--
+object(C)#1 (0) {
+}
+object(C)#1 (0) {
+}
+
diff --git a/Zend/tests/traits/bug60153.phpt b/Zend/tests/traits/bug60153.phpt
index 979eced1fb..8f01e72c2d 100644
--- a/Zend/tests/traits/bug60153.phpt
+++ b/Zend/tests/traits/bug60153.phpt
@@ -16,4 +16,4 @@ class C implements IFoo {
}
--EXPECTF--
-Fatal error: Declaration of TFoo::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d
+Fatal error: Declaration of C::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d
diff --git a/Zend/tests/traits/no_static_arg_binding.phpt b/Zend/tests/traits/no_static_arg_binding.phpt
new file mode 100644
index 0000000000..3134cf621b
--- /dev/null
+++ b/Zend/tests/traits/no_static_arg_binding.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Don't statically bind arguments for self:: calls in traits
+--FILE--
+<?php
+
+trait T {
+ public static function method($arg) {
+ }
+ public static function call() {
+ $i = 0;
+ self::method($i);
+ var_dump($i);
+ }
+}
+
+class C {
+ use T;
+
+ public static function method(&$arg) {
+ $arg++;
+ }
+}
+
+C::call();
+
+?>
+--EXPECT--
+int(1)
diff --git a/Zend/tests/try/bug70228.phpt b/Zend/tests/try/bug70228.phpt
new file mode 100644
index 0000000000..8b812517a3
--- /dev/null
+++ b/Zend/tests/try/bug70228.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+
+function foo() {
+ try { return str_repeat("a", 2); }
+ finally { return str_repeat("b", 2); }
+}
+
+var_dump(foo());
+?>
+--EXPECT--
+string(2) "bb"
diff --git a/Zend/tests/try/bug70228_2.phpt b/Zend/tests/try/bug70228_2.phpt
new file mode 100644
index 0000000000..c988e706ce
--- /dev/null
+++ b/Zend/tests/try/bug70228_2.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ throw new Exception(2);
+ } finally {
+ return 42;
+ }
+ }
+}
+
+var_dump(test());
+?>
+--EXPECT--
+int(42)
diff --git a/Zend/tests/try/bug70228_3.phpt b/Zend/tests/try/bug70228_3.phpt
new file mode 100644
index 0000000000..55dbe4f891
--- /dev/null
+++ b/Zend/tests/try/bug70228_3.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ try {
+ } finally {
+ return 42;
+ }
+ } finally {
+ throw new Exception(2);
+ }
+ }
+}
+
+try {
+ var_dump(test());
+} catch (Exception $e) {
+ do {
+ echo $e->getMessage() . "\n";
+ $e = $e->getPrevious();
+ } while ($e);
+}
+?>
+--EXPECT--
+2
+1
diff --git a/Zend/tests/try/bug70228_4.phpt b/Zend/tests/try/bug70228_4.phpt
new file mode 100644
index 0000000000..f0ab3b0c2c
--- /dev/null
+++ b/Zend/tests/try/bug70228_4.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ try {
+ try {
+ } finally {
+ return 42;
+ }
+ } finally {
+ throw new Exception(3);
+ }
+ } catch (Exception $e) {}
+ }
+}
+
+try {
+ var_dump(test());
+} catch (Exception $e) {
+ do {
+ echo $e->getMessage() . "\n";
+ $e = $e->getPrevious();
+ } while ($e);
+}
+?>
+--EXPECT--
+1
diff --git a/Zend/tests/try/bug70228_5.phpt b/Zend/tests/try/bug70228_5.phpt
new file mode 100644
index 0000000000..29cbf4910d
--- /dev/null
+++ b/Zend/tests/try/bug70228_5.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #70228 (memleak if return hidden by throw in finally block)
+--FILE--
+<?php
+function test() {
+ try {
+ return str_repeat("a", 2);
+ } finally {
+ throw new Exception("ops");
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+?>
+--EXPECT--
+ops
diff --git a/Zend/tests/try/bug70228_6.phpt b/Zend/tests/try/bug70228_6.phpt
new file mode 100644
index 0000000000..fc68657f4c
--- /dev/null
+++ b/Zend/tests/try/bug70228_6.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+function test($x) {
+ foreach ($x as $v) {
+ try {
+ return str_repeat("a", 2);
+ } finally {
+ return 42;
+ }
+ }
+}
+
+var_dump(test([1]));
+?>
+--EXPECT--
+int(42)
diff --git a/Zend/tests/try/bug70228_7.phpt b/Zend/tests/try/bug70228_7.phpt
new file mode 100644
index 0000000000..4b8a80351c
--- /dev/null
+++ b/Zend/tests/try/bug70228_7.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+
+function foo() {
+ $array = [1, 2, $n = 3];
+ foreach ($array as $value) {
+ var_dump($value);
+ try {
+ try {
+ foreach ($array as $_) {
+ return str_repeat("a", 2);
+ }
+ } finally {
+ throw new Exception;
+ }
+ } catch (Exception $e) { }
+ }
+}
+
+foo();
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(2)
+int(3)
+===DONE===
diff --git a/Zend/tests/try/bug70228_8.phpt b/Zend/tests/try/bug70228_8.phpt
new file mode 100644
index 0000000000..ad13113c71
--- /dev/null
+++ b/Zend/tests/try/bug70228_8.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #70228 (memleak if return in finally block)
+--FILE--
+<?php
+
+function foo() {
+ $array = [1, 2, $n = 3];
+ foreach ($array as $value) {
+ var_dump($value);
+ try {
+ try {
+ switch (str_repeat("b", 2)) {
+ case "bb":
+ return str_repeat("a", 2);
+ }
+ } finally {
+ throw new Exception;
+ }
+ } catch (Exception $e) { }
+ }
+}
+
+foo();
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(2)
+int(3)
+===DONE===
diff --git a/Zend/tests/try/bug71604.phpt b/Zend/tests/try/bug71604.phpt
new file mode 100644
index 0000000000..79803b93ea
--- /dev/null
+++ b/Zend/tests/try/bug71604.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71604: Aborted Generators continue after nested finally
+--FILE--
+<?php
+function gen() {
+ try {
+ try {
+ yield;
+ } finally {
+ print "INNER\n";
+ }
+ } catch (Exception $e) {
+ print "EX\n";
+ } finally {
+ print "OUTER\n";
+ }
+ print "NOTREACHED\n";
+}
+
+gen()->current();
+
+?>
+--EXPECT--
+INNER
+OUTER
diff --git a/Zend/tests/try/bug71604_2.phpt b/Zend/tests/try/bug71604_2.phpt
new file mode 100644
index 0000000000..8736cd8347
--- /dev/null
+++ b/Zend/tests/try/bug71604_2.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #71604: Aborted Generators continue after nested finally (2)
+--FILE--
+<?php
+
+function gen() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ throw new Exception(2);
+ } finally {
+ try {
+ yield;
+ } finally {
+ }
+ }
+ }
+}
+
+try {
+ gen()->rewind();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+Exception: 1 in %s:%d
+Stack trace:
+#0 [internal function]: gen()
+#1 %s(%d): Generator->rewind()
+#2 {main}
+
+Next Exception: 2 in %s:%d
+Stack trace:
+#0 [internal function]: gen()
+#1 %s(%d): Generator->rewind()
+#2 {main}
diff --git a/Zend/tests/try/bug71604_3.phpt b/Zend/tests/try/bug71604_3.phpt
new file mode 100644
index 0000000000..058c9a70a8
--- /dev/null
+++ b/Zend/tests/try/bug71604_3.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #71604: Aborted Generators continue after nested finally (3)
+--FILE--
+<?php
+
+function gen() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ yield;
+ } finally {
+ try {
+ throw new Exception(2);
+ } finally {
+ }
+ }
+ }
+}
+
+try {
+ gen()->rewind();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+Exception: 1 in %s:%d
+Stack trace:
+#0 [internal function]: gen()
+#1 %s(%d): Generator->rewind()
+#2 {main}
+
+Next Exception: 2 in %s:%d
+Stack trace:
+#0 %s(%d): gen()
+#1 {main}
diff --git a/Zend/tests/try/bug72213.phpt b/Zend/tests/try/bug72213.phpt
new file mode 100644
index 0000000000..624050295e
--- /dev/null
+++ b/Zend/tests/try/bug72213.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #72213 (Finally leaks on nested exceptions)
+--FILE--
+<?php
+function test() {
+ try {
+ throw new Exception('a');
+ } finally {
+ try {
+ throw new Exception('b');
+ } finally {
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+ var_dump($e->getPrevious()->getMessage());
+}
+?>
+--EXPECT--
+string(1) "b"
+string(1) "a"
diff --git a/Zend/tests/try/bug72213_2.phpt b/Zend/tests/try/bug72213_2.phpt
new file mode 100644
index 0000000000..790abe125d
--- /dev/null
+++ b/Zend/tests/try/bug72213_2.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #72213 (Finally leaks on nested exceptions)
+--FILE--
+<?php
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ try {
+ throw new Exception(2);
+ } finally {
+ }
+ } catch (Exception $e) {
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo "caught {$e->getMessage()}\n";
+}
+--EXPECT--
+caught 1
diff --git a/Zend/tests/catch_002.phpt b/Zend/tests/try/catch_002.phpt
index 11d736abe2..11d736abe2 100644
--- a/Zend/tests/catch_002.phpt
+++ b/Zend/tests/try/catch_002.phpt
diff --git a/Zend/tests/catch_003.phpt b/Zend/tests/try/catch_003.phpt
index 414d50f815..414d50f815 100644
--- a/Zend/tests/catch_003.phpt
+++ b/Zend/tests/try/catch_003.phpt
diff --git a/Zend/tests/catch_004.phpt b/Zend/tests/try/catch_004.phpt
index 54920b8947..54920b8947 100644
--- a/Zend/tests/catch_004.phpt
+++ b/Zend/tests/try/catch_004.phpt
diff --git a/Zend/tests/catch_finally_001.phpt b/Zend/tests/try/catch_finally_001.phpt
index 0c3f597a0a..0c3f597a0a 100644
--- a/Zend/tests/catch_finally_001.phpt
+++ b/Zend/tests/try/catch_finally_001.phpt
diff --git a/Zend/tests/catch_finally_002.phpt b/Zend/tests/try/catch_finally_002.phpt
index c54477ff8c..c54477ff8c 100644
--- a/Zend/tests/catch_finally_002.phpt
+++ b/Zend/tests/try/catch_finally_002.phpt
diff --git a/Zend/tests/catch_finally_003.phpt b/Zend/tests/try/catch_finally_003.phpt
index 24e468d335..24e468d335 100644
--- a/Zend/tests/catch_finally_003.phpt
+++ b/Zend/tests/try/catch_finally_003.phpt
diff --git a/Zend/tests/catch_finally_004.phpt b/Zend/tests/try/catch_finally_004.phpt
index a2c22beab1..a2c22beab1 100644
--- a/Zend/tests/catch_finally_004.phpt
+++ b/Zend/tests/try/catch_finally_004.phpt
diff --git a/Zend/tests/catch_finally_005.phpt b/Zend/tests/try/catch_finally_005.phpt
index c2fd55df27..c2fd55df27 100644
--- a/Zend/tests/catch_finally_005.phpt
+++ b/Zend/tests/try/catch_finally_005.phpt
diff --git a/Zend/tests/catch_finally_006.phpt b/Zend/tests/try/catch_finally_006.phpt
index 216219b6a5..216219b6a5 100644
--- a/Zend/tests/catch_finally_006.phpt
+++ b/Zend/tests/try/catch_finally_006.phpt
diff --git a/Zend/tests/try/exceptions.inc b/Zend/tests/try/exceptions.inc
new file mode 100644
index 0000000000..68cb1c62f7
--- /dev/null
+++ b/Zend/tests/try/exceptions.inc
@@ -0,0 +1,6 @@
+<?php
+
+class Exception1 extends Exception {}
+class Exception2 extends Exception {}
+class Exception3 extends Exception {}
+class Exception4 extends Exception {}
diff --git a/Zend/tests/finally_goto_001.phpt b/Zend/tests/try/finally_goto_001.phpt
index 990f78d4c7..990f78d4c7 100644
--- a/Zend/tests/finally_goto_001.phpt
+++ b/Zend/tests/try/finally_goto_001.phpt
diff --git a/Zend/tests/finally_goto_002.phpt b/Zend/tests/try/finally_goto_002.phpt
index a6bd9e307f..a6bd9e307f 100644
--- a/Zend/tests/finally_goto_002.phpt
+++ b/Zend/tests/try/finally_goto_002.phpt
diff --git a/Zend/tests/finally_goto_003.phpt b/Zend/tests/try/finally_goto_003.phpt
index 8529ff7865..8529ff7865 100644
--- a/Zend/tests/finally_goto_003.phpt
+++ b/Zend/tests/try/finally_goto_003.phpt
diff --git a/Zend/tests/finally_goto_004.phpt b/Zend/tests/try/finally_goto_004.phpt
index d88ceedf52..d88ceedf52 100644
--- a/Zend/tests/finally_goto_004.phpt
+++ b/Zend/tests/try/finally_goto_004.phpt
diff --git a/Zend/tests/try/finally_goto_005.phpt b/Zend/tests/try/finally_goto_005.phpt
new file mode 100644
index 0000000000..36b4155d81
--- /dev/null
+++ b/Zend/tests/try/finally_goto_005.phpt
@@ -0,0 +1,15 @@
+--TEST--
+There must be a difference between label: try { ... } and try { label: ... }
+--FILE--
+<?php
+
+label: try {
+ goto label;
+} finally {
+ print "success";
+ return; // don't loop
+}
+
+?>
+--EXPECT--
+success
diff --git a/Zend/tests/try_catch_finally_001.phpt b/Zend/tests/try/try_catch_finally_001.phpt
index 3d478f461a..3d478f461a 100644
--- a/Zend/tests/try_catch_finally_001.phpt
+++ b/Zend/tests/try/try_catch_finally_001.phpt
diff --git a/Zend/tests/try_catch_finally_002.phpt b/Zend/tests/try/try_catch_finally_002.phpt
index 79efcb3de8..79efcb3de8 100644
--- a/Zend/tests/try_catch_finally_002.phpt
+++ b/Zend/tests/try/try_catch_finally_002.phpt
diff --git a/Zend/tests/try_catch_finally_003.phpt b/Zend/tests/try/try_catch_finally_003.phpt
index 7ec8ec82db..7ec8ec82db 100644
--- a/Zend/tests/try_catch_finally_003.phpt
+++ b/Zend/tests/try/try_catch_finally_003.phpt
diff --git a/Zend/tests/try_catch_finally_004.phpt b/Zend/tests/try/try_catch_finally_004.phpt
index eb8d0966a1..eb8d0966a1 100644
--- a/Zend/tests/try_catch_finally_004.phpt
+++ b/Zend/tests/try/try_catch_finally_004.phpt
diff --git a/Zend/tests/try_catch_finally_005.phpt b/Zend/tests/try/try_catch_finally_005.phpt
index dafeb6bbe0..dafeb6bbe0 100644
--- a/Zend/tests/try_catch_finally_005.phpt
+++ b/Zend/tests/try/try_catch_finally_005.phpt
diff --git a/Zend/tests/try_catch_finally_006.phpt b/Zend/tests/try/try_catch_finally_006.phpt
index dab6af6a58..dab6af6a58 100644
--- a/Zend/tests/try_catch_finally_006.phpt
+++ b/Zend/tests/try/try_catch_finally_006.phpt
diff --git a/Zend/tests/try_catch_finally_007.phpt b/Zend/tests/try/try_catch_finally_007.phpt
index ad33c68131..ad33c68131 100644
--- a/Zend/tests/try_catch_finally_007.phpt
+++ b/Zend/tests/try/try_catch_finally_007.phpt
diff --git a/Zend/tests/try_finally_001.phpt b/Zend/tests/try/try_finally_001.phpt
index 33744d064c..33744d064c 100644
--- a/Zend/tests/try_finally_001.phpt
+++ b/Zend/tests/try/try_finally_001.phpt
diff --git a/Zend/tests/try_finally_002.phpt b/Zend/tests/try/try_finally_002.phpt
index 99a34f62fb..99a34f62fb 100644
--- a/Zend/tests/try_finally_002.phpt
+++ b/Zend/tests/try/try_finally_002.phpt
diff --git a/Zend/tests/try_finally_003.phpt b/Zend/tests/try/try_finally_003.phpt
index b0fee7c6d7..b0fee7c6d7 100644
--- a/Zend/tests/try_finally_003.phpt
+++ b/Zend/tests/try/try_finally_003.phpt
diff --git a/Zend/tests/try_finally_004.phpt b/Zend/tests/try/try_finally_004.phpt
index 08930a40c5..08930a40c5 100644
--- a/Zend/tests/try_finally_004.phpt
+++ b/Zend/tests/try/try_finally_004.phpt
diff --git a/Zend/tests/try_finally_005.phpt b/Zend/tests/try/try_finally_005.phpt
index 8664d6b1bf..8664d6b1bf 100644
--- a/Zend/tests/try_finally_005.phpt
+++ b/Zend/tests/try/try_finally_005.phpt
diff --git a/Zend/tests/try_finally_006.phpt b/Zend/tests/try/try_finally_006.phpt
index f53e6b5bc1..f53e6b5bc1 100644
--- a/Zend/tests/try_finally_006.phpt
+++ b/Zend/tests/try/try_finally_006.phpt
diff --git a/Zend/tests/try_finally_007.phpt b/Zend/tests/try/try_finally_007.phpt
index 634937495c..634937495c 100644
--- a/Zend/tests/try_finally_007.phpt
+++ b/Zend/tests/try/try_finally_007.phpt
diff --git a/Zend/tests/try_finally_008.phpt b/Zend/tests/try/try_finally_008.phpt
index cee37aedab..cee37aedab 100644
--- a/Zend/tests/try_finally_008.phpt
+++ b/Zend/tests/try/try_finally_008.phpt
diff --git a/Zend/tests/try_finally_009.phpt b/Zend/tests/try/try_finally_009.phpt
index b29930a75e..b29930a75e 100644
--- a/Zend/tests/try_finally_009.phpt
+++ b/Zend/tests/try/try_finally_009.phpt
diff --git a/Zend/tests/try_finally_010.phpt b/Zend/tests/try/try_finally_010.phpt
index 91eb7821ee..91eb7821ee 100644
--- a/Zend/tests/try_finally_010.phpt
+++ b/Zend/tests/try/try_finally_010.phpt
diff --git a/Zend/tests/try_finally_011.phpt b/Zend/tests/try/try_finally_011.phpt
index 8a9dc62ca4..8a9dc62ca4 100644
--- a/Zend/tests/try_finally_011.phpt
+++ b/Zend/tests/try/try_finally_011.phpt
diff --git a/Zend/tests/try/try_finally_012.phpt b/Zend/tests/try/try_finally_012.phpt
new file mode 100644
index 0000000000..32fec7ab29
--- /dev/null
+++ b/Zend/tests/try/try_finally_012.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Try finally (exception in "return" statement)
+--FILE--
+<?php
+class A {
+ public $x = 1;
+ public $y = 2;
+ function __destruct() {
+ throw new Exception();
+ }
+}
+function foo() {
+ foreach(new A() as $a) {
+ try {
+ return $a;
+ } catch (Exception $e) {
+ echo "exception in foo\n";
+ } finally {
+ echo "finally\n";
+ }
+ }
+}
+try {
+ foo();
+} catch (Exception $e) {
+ echo "exception in main\n";
+}
+?>
+--EXPECT--
+finally
+exception in main
+
diff --git a/Zend/tests/try/try_finally_013.phpt b/Zend/tests/try/try_finally_013.phpt
new file mode 100644
index 0000000000..a37df5147d
--- /dev/null
+++ b/Zend/tests/try/try_finally_013.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Return in try and finally inside loop
+--FILE--
+<?php
+
+function foo() {
+ $array = [1, 2, $n = 3];
+ foreach ($array as $value) {
+ try {
+ echo "try\n";
+ return;
+ } finally {
+ echo "finally\n";
+ return;
+ }
+ }
+}
+
+foo();
+?>
+===DONE===
+--EXPECT--
+try
+finally
+===DONE===
diff --git a/Zend/tests/try/try_finally_014.phpt b/Zend/tests/try/try_finally_014.phpt
new file mode 100644
index 0000000000..284892a8b5
--- /dev/null
+++ b/Zend/tests/try/try_finally_014.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Break 2 in try and return in finally inside nested loop
+--FILE--
+<?php
+
+function foo() {
+ $array = [1, 2, $n = 3];
+ foreach ($array as $value) {
+ foreach ($array as $value) {
+ try {
+ echo "try\n";
+ break 2;
+ } finally {
+ echo "finally\n";
+ return;
+ }
+ }
+ }
+}
+
+foo();
+?>
+===DONE===
+--EXPECT--
+try
+finally
+===DONE===
diff --git a/Zend/tests/try/try_finally_015.phpt b/Zend/tests/try/try_finally_015.phpt
new file mode 100644
index 0000000000..d2580a2e33
--- /dev/null
+++ b/Zend/tests/try/try_finally_015.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Ignoring return inside loop using finally
+--FILE--
+<?php
+
+function foo() {
+ $array = [1, 2, $n = 3];
+ foreach ($array as $value) {
+ var_dump($value);
+ try {
+ try {
+ foreach ($array as $_) {
+ return;
+ }
+ } finally {
+ throw new Exception;
+ }
+ } catch (Exception $e) { }
+ }
+}
+
+foo();
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(2)
+int(3)
+===DONE===
diff --git a/Zend/tests/try/try_finally_016.phpt b/Zend/tests/try/try_finally_016.phpt
new file mode 100644
index 0000000000..dc91b42b50
--- /dev/null
+++ b/Zend/tests/try/try_finally_016.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Exception during break 2
+--FILE--
+<?php
+
+class A {
+ public $a = 1;
+ public $b = 2;
+
+ public function __destruct() {
+ throw new Exception;
+ }
+}
+
+function foo() {
+ foreach ([0] as $_) {
+ foreach (new A as $value) {
+ try {
+ break 2;
+ } catch (Exception $e) {
+ echo "catch\n";
+ } finally {
+ echo "finally\n";
+ }
+ }
+ }
+}
+
+try {
+ foo();
+} catch (Exception $e) {
+ echo "outer catch\n";
+}
+?>
+===DONE===
+--EXPECT--
+finally
+outer catch
+===DONE===
diff --git a/Zend/tests/try/try_finally_017.phpt b/Zend/tests/try/try_finally_017.phpt
new file mode 100644
index 0000000000..5ba58afdea
--- /dev/null
+++ b/Zend/tests/try/try_finally_017.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Exception during break 2 with multiple try/catch
+--FILE--
+<?php
+
+class A {
+ public $a = 1;
+ public $b = 2;
+
+ public function __destruct() {
+ throw new Exception;
+ }
+}
+
+function foo() {
+ foreach ([0] as $_) {
+ try {
+ foreach (new A as $value) {
+ try {
+ break 2;
+ } catch (Exception $e) {
+ echo "catch1\n";
+ } finally {
+ echo "finally1\n";
+ }
+ }
+ } catch (Exception $e) {
+ echo "catch2\n";
+ } finally {
+ echo "finally2\n";
+ }
+ }
+}
+
+foo();
+?>
+===DONE===
+--EXPECT--
+finally1
+catch2
+finally2
+===DONE===
diff --git a/Zend/tests/try/try_finally_018.phpt b/Zend/tests/try/try_finally_018.phpt
new file mode 100644
index 0000000000..383b44844e
--- /dev/null
+++ b/Zend/tests/try/try_finally_018.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Combination of foreach, finally and goto
+--FILE--
+<?php
+foreach ([new stdClass] as $a) {
+ try {
+ foreach ([new stdClass] as $a) {
+ try {
+ foreach ([new stdClass] as $a) {
+ goto out;
+ }
+ } finally {
+ echo "finally1\n";
+ }
+out: ;
+ }
+ } finally {
+ echo "finally2\n";
+ }
+}
+?>
+--EXPECT--
+finally1
+finally2
diff --git a/Zend/tests/try/try_finally_019.phpt b/Zend/tests/try/try_finally_019.phpt
new file mode 100644
index 0000000000..2e2069d1be
--- /dev/null
+++ b/Zend/tests/try/try_finally_019.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Combination of foreach, finally and goto (call order)
+--FILE--
+<?php
+class A {
+ public $n = 0;
+ function __construct($n) {
+ $this->n = $n;
+ }
+ function __destruct() {
+ echo "destruct" . $this->n . "\n";
+ }
+}
+
+foreach ([new A(1)] as $a) {
+ $a = null;
+ try {
+ foreach ([new A(2)] as $a) {
+ $a = null;
+ try {
+ foreach ([new A(3)] as $a) {
+ $a = null;
+ goto out;
+ }
+ } finally {
+ echo "finally1\n";
+ }
+out: ;
+ }
+ } finally {
+ echo "finally2\n";
+ }
+}
+?>
+--EXPECT--
+destruct3
+finally1
+destruct2
+finally2
+destruct1
diff --git a/Zend/tests/try/try_finally_020.phpt b/Zend/tests/try/try_finally_020.phpt
new file mode 100644
index 0000000000..cfb72d0c55
--- /dev/null
+++ b/Zend/tests/try/try_finally_020.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Combination of foreach, finally and exception (call order)
+--FILE--
+<?php
+class A {
+ public $n = 0;
+ function __construct($n) {
+ $this->n = $n;
+ }
+ function __destruct() {
+ echo "destruct" . $this->n . "\n";
+ }
+}
+
+foreach ([new A(1)] as $a) {
+ $a = null;
+ try {
+ foreach ([new A(2)] as $a) {
+ $a = null;
+ try {
+ foreach ([new A(3)] as $a) {
+ $a = null;
+ throw new Exception();
+ }
+ } finally {
+ echo "finally1\n";
+ }
+ }
+ } catch (Exception $e) {
+ echo "catch\n";
+ } finally {
+ echo "finally2\n";
+ }
+}
+?>
+--EXPECT--
+destruct3
+finally1
+destruct2
+catch
+finally2
+destruct1
diff --git a/Zend/tests/try/try_finally_021.phpt b/Zend/tests/try/try_finally_021.phpt
new file mode 100644
index 0000000000..ed162f40d0
--- /dev/null
+++ b/Zend/tests/try/try_finally_021.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Live range & return from finally
+--FILE--
+<?php
+$array = [1];
+foreach ([0] as $_) {
+ foreach ($array as $v) {
+ try {
+ echo "ok\n";
+ return;
+ } finally {
+ echo "ok\n";
+ return;
+ }
+ }
+}
+?>
+--EXPECT--
+ok
+ok
diff --git a/Zend/tests/try/try_finally_022.phpt b/Zend/tests/try/try_finally_022.phpt
new file mode 100644
index 0000000000..51f6a26419
--- /dev/null
+++ b/Zend/tests/try/try_finally_022.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Try finally (exception in "return" statement)
+--FILE--
+<?php
+class A {
+ public $x = 1;
+ public $y = 2;
+ function __destruct() {
+ throw new Exception();
+ }
+}
+try{
+ $a = 0;
+ switch ($a) {
+ case 0:
+ }
+ switch ($a) {
+ case 0:
+ }
+ switch ($a) {
+ case 0:
+ }
+ foreach([new stdClass()] as $x) {
+ foreach(new A() as $a) {
+ foreach([new stdClass()] as $y) {
+ try {
+ if (0) { echo "0" . (int)5; }
+ return $a;
+ } catch (Exception $e) {
+ echo "exception1\n";
+ }
+ }
+ }
+ }
+} catch (Exception $e) {
+ echo "exception2\n";
+}
+?>
+--EXPECT--
+exception2
+
diff --git a/Zend/tests/try/try_finally_023.phpt b/Zend/tests/try/try_finally_023.phpt
new file mode 100644
index 0000000000..e88eddb3b2
--- /dev/null
+++ b/Zend/tests/try/try_finally_023.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Loop var dtor throwing exception during return inside try/catch inside finally
+--FILE--
+<?php
+
+class Dtor {
+ public function __destruct() {
+ throw new Exception(2);
+ }
+}
+
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ foreach ([new Dtor] as $v) {
+ unset($v);
+ return 42;
+ }
+ } catch (Exception $e) {
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+Exception: 1 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
diff --git a/Zend/tests/try/try_finally_024.phpt b/Zend/tests/try/try_finally_024.phpt
new file mode 100644
index 0000000000..eb0b26acbf
--- /dev/null
+++ b/Zend/tests/try/try_finally_024.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Exception in finally inside finally following try/catch containing throwing try/finally
+--FILE--
+<?php
+
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ try {
+ } finally {
+ throw new Exception(2);
+ }
+ } catch (Exception $e) {}
+ try {
+ } finally {
+ throw new Exception(3);
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+?>
+--EXPECTF--
+Exception: 1 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
+
+Next Exception: 3 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
diff --git a/Zend/tests/try/try_finally_025.phpt b/Zend/tests/try/try_finally_025.phpt
new file mode 100644
index 0000000000..7ca535bcf6
--- /dev/null
+++ b/Zend/tests/try/try_finally_025.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Throw in try of try/finally inside catch
+--FILE--
+<?php
+
+function test() {
+ try {
+ throw new Exception(1);
+ } catch (Exception $e) {
+ try {
+ throw new Exception(2);
+ } finally {
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+Exception: 2 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
diff --git a/Zend/tests/try/try_finally_026.phpt b/Zend/tests/try/try_finally_026.phpt
new file mode 100644
index 0000000000..29a5de3b3a
--- /dev/null
+++ b/Zend/tests/try/try_finally_026.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Throw in finally inside catch inside finally
+--FILE--
+<?php
+
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ throw new Exception(2);
+ } catch (Exception $e) {
+ try {
+ } finally {
+ throw new Exception(3);
+ }
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+Exception: 1 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
+
+Next Exception: 3 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
diff --git a/Zend/tests/try/try_finally_027.phpt b/Zend/tests/try/try_finally_027.phpt
new file mode 100644
index 0000000000..1e66479eb0
--- /dev/null
+++ b/Zend/tests/try/try_finally_027.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Return in try with throw in finally, inside other finally
+--FILE--
+<?php
+
+function test() {
+ try {
+ throw new Exception(1);
+ } finally {
+ try {
+ return 42;
+ } finally {
+ throw new Exception(2);
+ }
+ }
+}
+
+try {
+ test();
+} catch (Exception $e) {
+ echo $e, "\n";
+}
+
+?>
+--EXPECTF--
+Exception: 1 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
+
+Next Exception: 2 in %s:%d
+Stack trace:
+#0 %s(%d): test()
+#1 {main}
diff --git a/Zend/tests/try/try_multicatch_001.phpt b/Zend/tests/try/try_multicatch_001.phpt
new file mode 100644
index 0000000000..0dffd32c72
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_001.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Parsing test
+--FILE--
+<?php
+
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ echo 'TRY' . PHP_EOL;
+} catch(Exception1 | Exception2 $e) {
+ echo 'Exception';
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+
+?>
+--EXPECT--
+TRY
+FINALLY
diff --git a/Zend/tests/try/try_multicatch_002.phpt b/Zend/tests/try/try_multicatch_002.phpt
new file mode 100644
index 0000000000..0e70fec7eb
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_002.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Catch first exception in the multicatch
+--FILE--
+<?php
+
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ echo 'TRY' . PHP_EOL;
+ throw new Exception1;
+} catch(Exception1 | Exception2 | Exception3 $e) {
+ echo get_class($e) . PHP_EOL;
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+
+?>
+--EXPECT--
+TRY
+Exception1
+FINALLY
diff --git a/Zend/tests/try/try_multicatch_003.phpt b/Zend/tests/try/try_multicatch_003.phpt
new file mode 100644
index 0000000000..6aed1a2b09
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_003.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Catch second exception in the multicatch
+--FILE--
+<?php
+
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ echo 'TRY' . PHP_EOL;
+ throw new Exception2;
+} catch(Exception1 | Exception2 | Exception3 $e) {
+ echo get_class($e) . PHP_EOL;
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+
+?>
+--EXPECT--
+TRY
+Exception2
+FINALLY
diff --git a/Zend/tests/try/try_multicatch_004.phpt b/Zend/tests/try/try_multicatch_004.phpt
new file mode 100644
index 0000000000..d8b245a767
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_004.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Catch last exception in the multicatch
+--FILE--
+<?php
+
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ echo 'TRY' . PHP_EOL;
+ throw new Exception3;
+} catch(Exception1 | Exception2 | Exception3 $e) {
+ echo get_class($e) . PHP_EOL;
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+
+?>
+--EXPECT--
+TRY
+Exception3
+FINALLY
diff --git a/Zend/tests/try/try_multicatch_005.phpt b/Zend/tests/try/try_multicatch_005.phpt
new file mode 100644
index 0000000000..cc3fc890fa
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_005.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Catch exception in the nested multicatch
+--FILE--
+<?php
+
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ try {
+ echo 'TRY' . PHP_EOL;
+ throw new Exception3;
+ } catch (Exception1 | Exception3 $e) {
+ echo get_class($e) . PHP_EOL;
+ }
+} catch(Exception2 | Exception3 $e) {
+ echo 'Should never be executed';
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+
+?>
+--EXPECT--
+TRY
+Exception3
+FINALLY
diff --git a/Zend/tests/try/try_multicatch_006.phpt b/Zend/tests/try/try_multicatch_006.phpt
new file mode 100644
index 0000000000..e4505f1b24
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_006.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Catch first exception in the second multicatch
+--FILE--
+<?php
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ echo 'TRY' . PHP_EOL;
+ throw new Exception3;
+} catch(Exception1 | Exception2 $e) {
+ echo get_class($e) . PHP_EOL;
+} catch(Exception3 | Exception4 $e) {
+ echo get_class($e) . PHP_EOL;
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+?>
+--EXPECT--
+TRY
+Exception3
+FINALLY
+
diff --git a/Zend/tests/try/try_multicatch_007.phpt b/Zend/tests/try/try_multicatch_007.phpt
new file mode 100644
index 0000000000..aa073b0592
--- /dev/null
+++ b/Zend/tests/try/try_multicatch_007.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Catch second exception in the second multicatch
+--FILE--
+<?php
+require_once __DIR__ . '/exceptions.inc';
+
+try {
+ echo 'TRY' . PHP_EOL;
+ throw new Exception4;
+} catch(Exception1 | Exception2 $e) {
+ echo get_class($e) . PHP_EOL;
+} catch(Exception3 | Exception4 $e) {
+ echo get_class($e) . PHP_EOL;
+} finally {
+ echo 'FINALLY' . PHP_EOL;
+}
+?>
+--EXPECT--
+TRY
+Exception4
+FINALLY
+
diff --git a/Zend/tests/typehints/add_return_type.phpt b/Zend/tests/type_declarations/add_return_type.phpt
index de8a17d8c0..de8a17d8c0 100644
--- a/Zend/tests/typehints/add_return_type.phpt
+++ b/Zend/tests/type_declarations/add_return_type.phpt
diff --git a/Zend/tests/array_type_hint_001.phpt b/Zend/tests/type_declarations/array_001.phpt
index 2b473c56b4..8fc368e288 100644
--- a/Zend/tests/array_type_hint_001.phpt
+++ b/Zend/tests/type_declarations/array_001.phpt
@@ -1,5 +1,5 @@
--TEST--
-Array type hint
+Array type declaration
--FILE--
<?php
function foo(array $a) {
@@ -12,8 +12,8 @@ foo(123);
--EXPECTF--
3
-Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
+Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %s on line 7 and defined in %s:2
Stack trace:
#0 %s(%d): foo(123)
#1 {main}
- thrown in %sarray_type_hint_001.php on line 2
+ thrown in %s on line 2
diff --git a/Zend/tests/callable_type_hint_001.phpt b/Zend/tests/type_declarations/callable_001.phpt
index 5ab892cd7c..0466288d59 100644
--- a/Zend/tests/callable_type_hint_001.phpt
+++ b/Zend/tests/type_declarations/callable_001.phpt
@@ -1,5 +1,5 @@
--TEST--
-callable type hint#001
+callable type#001
--FILE--
<?php
@@ -21,7 +21,7 @@ foo($closure);
string(6) "strpos"
string(3) "foo"
-Deprecated: Non-static method bar::baz() should not be called statically in %scallable_type_hint_001.php on line %d
+Deprecated: Non-static method bar::baz() should not be called statically in %s on line %d
array(2) {
[0]=>
string(3) "bar"
diff --git a/Zend/tests/callable_type_hint_002.phpt b/Zend/tests/type_declarations/callable_002.phpt
index b1b7339c31..01b6945755 100644
--- a/Zend/tests/callable_type_hint_002.phpt
+++ b/Zend/tests/type_declarations/callable_002.phpt
@@ -1,5 +1,5 @@
--TEST--
-callable type hint#002 - Reflection
+callable type#002 - Reflection
--FILE--
<?php
diff --git a/Zend/tests/callable_type_hint_003.phpt b/Zend/tests/type_declarations/callable_003.phpt
index 83f5090afa..b5e722cae3 100644
--- a/Zend/tests/callable_type_hint_003.phpt
+++ b/Zend/tests/type_declarations/callable_003.phpt
@@ -1,5 +1,5 @@
--TEST--
-callable type hint#003
+callable type#003
--FILE--
<?php
diff --git a/Zend/tests/type_declarations/closure_with_variadic.phpt b/Zend/tests/type_declarations/closure_with_variadic.phpt
new file mode 100644
index 0000000000..acbf57fa55
--- /dev/null
+++ b/Zend/tests/type_declarations/closure_with_variadic.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Closure with variadic type declaration
+--FILE--
+<?php
+$f = function (stdClass ...$a) {
+ var_dump($a);
+};
+$f(new stdClass);
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ object(stdClass)#2 (0) {
+ }
+}
diff --git a/Zend/tests/typehints/default_boolean_hint_values.phpt b/Zend/tests/type_declarations/default_boolean_hint_values.phpt
index 6ba262848d..6ba262848d 100644
--- a/Zend/tests/typehints/default_boolean_hint_values.phpt
+++ b/Zend/tests/type_declarations/default_boolean_hint_values.phpt
diff --git a/Zend/tests/typehints/explicit_weak_include_strict.phpt b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt
index fb53d8ce11..fb53d8ce11 100644
--- a/Zend/tests/typehints/explicit_weak_include_strict.phpt
+++ b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt
diff --git a/Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt
index 3bacf826d5..2f6c881017 100644
--- a/Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt
+++ b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt
@@ -1,5 +1,5 @@
--TEST--
-Inexistent class as typehint receiving scalar argument
+Inexistent class as type receiving scalar argument
--FILE--
<?php
diff --git a/Zend/tests/typehints/internal_function_strict_mode.phpt b/Zend/tests/type_declarations/internal_function_strict_mode.phpt
index f501c2b75f..4e792fa8d1 100644
--- a/Zend/tests/typehints/internal_function_strict_mode.phpt
+++ b/Zend/tests/type_declarations/internal_function_strict_mode.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint - internal function strict mode
+Scalar type - internal function strict mode
--FILE--
<?php
declare(strict_types=1);
@@ -32,4 +32,4 @@ try {
*** Trying Array Map With Invalid Callback
*** Caught array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
*** Trying Strlen With Float
-*** Caught strlen() expects parameter 1 to be string, float given \ No newline at end of file
+*** Caught strlen() expects parameter 1 to be string, float given
diff --git a/Zend/tests/type_declarations/nullable_typed_return_without_value.phpt b/Zend/tests/type_declarations/nullable_typed_return_without_value.phpt
new file mode 100644
index 0000000000..b16e7c6434
--- /dev/null
+++ b/Zend/tests/type_declarations/nullable_typed_return_without_value.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Nullable typed return without value generates friendlier error message
+--FILE--
+<?php
+
+function test() : ?int {
+ return;
+}
+
+test();
+
+?>
+--EXPECTF--
+Fatal error: A function with return type must return a value (did you mean "return null;" instead of "return;"?) in %s on line %d
diff --git a/Zend/tests/type_declarations/nullable_void.phpt b/Zend/tests/type_declarations/nullable_void.phpt
new file mode 100644
index 0000000000..4ff0edb0d8
--- /dev/null
+++ b/Zend/tests/type_declarations/nullable_void.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Void cannot be nullable
+--FILE--
+<?php
+
+function test() : ?void {
+}
+
+?>
+--EXPECTF--
+Fatal error: Void type cannot be nullable in %s on line %d
diff --git a/Zend/tests/typehints/return_separation.phpt b/Zend/tests/type_declarations/return_separation.phpt
index 7e9d095184..7e9d095184 100644
--- a/Zend/tests/typehints/return_separation.phpt
+++ b/Zend/tests/type_declarations/return_separation.phpt
diff --git a/Zend/tests/typehints/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt
index f27dc2b885..51c3664737 100644
--- a/Zend/tests/typehints/scalar_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint basics
+Scalar type basics
--FILE--
<?php
@@ -45,7 +45,7 @@ $values = [
];
foreach ($functions as $type => $function) {
- echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+ echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
foreach ($values as $value) {
echo PHP_EOL . "*** Trying ";
var_dump($value);
@@ -60,7 +60,7 @@ echo PHP_EOL . "Done";
?>
--EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
*** Trying int(1)
int(1)
@@ -114,7 +114,7 @@ int(0)
*** Trying resource(%d) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
-Testing 'float' typehint:
+Testing 'float' type:
*** Trying int(1)
float(1)
@@ -168,7 +168,7 @@ float(0)
*** Trying resource(%d) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
-Testing 'string' typehint:
+Testing 'string' type:
*** Trying int(1)
string(1) "1"
@@ -221,7 +221,7 @@ string(6) "foobar"
*** Trying resource(%d) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
-Testing 'bool' typehint:
+Testing 'bool' type:
*** Trying int(1)
bool(true)
diff --git a/Zend/tests/typehints/scalar_constant_defaults.phpt b/Zend/tests/type_declarations/scalar_constant_defaults.phpt
index 4441022e16..2982d9b2af 100644
--- a/Zend/tests/typehints/scalar_constant_defaults.phpt
+++ b/Zend/tests/type_declarations/scalar_constant_defaults.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint - default via constants
+Scalar type - default via constants
--FILE--
<?php
@@ -80,4 +80,4 @@ string(14) "this is a test"
Testing int with default null constant
NULL
Testing int with null null constant
-NULL \ No newline at end of file
+NULL
diff --git a/Zend/tests/typehints/scalar_constant_defaults_error.phpt b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt
index f341d205af..dcbb3e87f4 100644
--- a/Zend/tests/typehints/scalar_constant_defaults_error.phpt
+++ b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint - default via constants - error condition
+Scalar type - default via constants - error condition
--FILE--
<?php
@@ -17,4 +17,4 @@ Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the t
Stack trace:
#0 %s(%d): int_val()
#1 {main}
- thrown in %s on line %d \ No newline at end of file
+ thrown in %s on line %d
diff --git a/Zend/tests/typehints/scalar_float_with_integer_default_strict.phpt b/Zend/tests/type_declarations/scalar_float_with_integer_default_strict.phpt
index b1aab433f9..5e85eba17c 100644
--- a/Zend/tests/typehints/scalar_float_with_integer_default_strict.phpt
+++ b/Zend/tests/type_declarations/scalar_float_with_integer_default_strict.phpt
@@ -1,5 +1,5 @@
--TEST--
-Float type hint should allow an integer as default even with strict types
+Float type should allow an integer as default even with strict types
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_float_with_integer_default_weak.phpt b/Zend/tests/type_declarations/scalar_float_with_integer_default_weak.phpt
index ab3206691a..0289e13ccd 100644
--- a/Zend/tests/typehints/scalar_float_with_integer_default_weak.phpt
+++ b/Zend/tests/type_declarations/scalar_float_with_integer_default_weak.phpt
@@ -1,5 +1,5 @@
--TEST--
-Float type hint should allow an integer as default
+Float type should allow an integer as default
--FILE--
<?php
diff --git a/Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt b/Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt
new file mode 100644
index 0000000000..7bc2fda2b9
--- /dev/null
+++ b/Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Float type should not allow invalid types as default
+--FILE--
+<?php
+
+function test(float $arg = true)
+{
+ var_dump($arg);
+}
+
+test();
+
+?>
+--EXPECTF--
+
+Fatal error: Default value for parameters with a float type can only be float, integer, or NULL in %s on line %d
diff --git a/Zend/tests/typehints/scalar_none.phpt b/Zend/tests/type_declarations/scalar_none.phpt
index 5a98377022..3bec609599 100644
--- a/Zend/tests/typehints/scalar_none.phpt
+++ b/Zend/tests/type_declarations/scalar_none.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint missing parameters
+Scalar type missing parameters
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_null.phpt b/Zend/tests/type_declarations/scalar_null.phpt
index f409e34867..6b9930f297 100644
--- a/Zend/tests/typehints/scalar_null.phpt
+++ b/Zend/tests/type_declarations/scalar_null.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint nullability
+Scalar type nullability
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_relative_typehint_disallowed.phpt b/Zend/tests/type_declarations/scalar_relative_typehint_disallowed.phpt
index d85091253c..b093983717 100644
--- a/Zend/tests/typehints/scalar_relative_typehint_disallowed.phpt
+++ b/Zend/tests/type_declarations/scalar_relative_typehint_disallowed.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint - disallow relative typehints
+Scalar type - disallow relative types
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved2.phpt b/Zend/tests/type_declarations/scalar_reserved2.phpt
index 01f36fd154..893f4b542a 100644
--- a/Zend/tests/typehints/scalar_reserved2.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved2.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (2)
+Scalar type names cannot be used as class, trait or interface names (2)
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved2_class_alias.phpt b/Zend/tests/type_declarations/scalar_reserved2_class_alias.phpt
index 02d6bb4a83..777cf9cebe 100644
--- a/Zend/tests/typehints/scalar_reserved2_class_alias.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved2_class_alias.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (2) - class_alias
+Scalar type names cannot be used as class, trait or interface names (2) - class_alias
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved2_use.phpt b/Zend/tests/type_declarations/scalar_reserved2_use.phpt
index e61db5c87a..3e8d1be88d 100644
--- a/Zend/tests/typehints/scalar_reserved2_use.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved2_use.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (2) - use
+Scalar type names cannot be used as class, trait or interface names (2) - use
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved3.phpt b/Zend/tests/type_declarations/scalar_reserved3.phpt
index 425365bc65..433673e714 100644
--- a/Zend/tests/typehints/scalar_reserved3.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved3.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (3)
+Scalar type names cannot be used as class, trait or interface names (3)
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved3_class_alias.phpt b/Zend/tests/type_declarations/scalar_reserved3_class_alias.phpt
index 39c2e2a62c..dc8f319886 100644
--- a/Zend/tests/typehints/scalar_reserved3_class_alias.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved3_class_alias.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (3) - class_alias
+Scalar type names cannot be used as class, trait or interface names (3) - class_alias
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved3_use.phpt b/Zend/tests/type_declarations/scalar_reserved3_use.phpt
index 23be15e1a3..af76abf498 100644
--- a/Zend/tests/typehints/scalar_reserved3_use.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved3_use.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (3) - use
+Scalar type names cannot be used as class, trait or interface names (3) - use
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved4.phpt b/Zend/tests/type_declarations/scalar_reserved4.phpt
index 5a190ce51a..dd5ff8922e 100644
--- a/Zend/tests/typehints/scalar_reserved4.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved4.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (4)
+Scalar type names cannot be used as class, trait or interface names (4)
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved4_class_alias.phpt b/Zend/tests/type_declarations/scalar_reserved4_class_alias.phpt
index ffaf934a01..ebb6ac3201 100644
--- a/Zend/tests/typehints/scalar_reserved4_class_alias.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved4_class_alias.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (4) - class_alias
+Scalar type names cannot be used as class, trait or interface names (4) - class_alias
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved4_use.phpt b/Zend/tests/type_declarations/scalar_reserved4_use.phpt
index 05a2ea1069..e2fc0aeafe 100644
--- a/Zend/tests/typehints/scalar_reserved4_use.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved4_use.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (4) - use
+Scalar type names cannot be used as class, trait or interface names (4) - use
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved6.phpt b/Zend/tests/type_declarations/scalar_reserved6.phpt
index 1dee41ff58..f84ec94790 100644
--- a/Zend/tests/typehints/scalar_reserved6.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved6.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (6)
+Scalar type names cannot be used as class, trait or interface names (6)
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved6_class_alias.phpt b/Zend/tests/type_declarations/scalar_reserved6_class_alias.phpt
index fd3c328504..8a777eca7e 100644
--- a/Zend/tests/typehints/scalar_reserved6_class_alias.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved6_class_alias.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (6) - class_alias
+Scalar type names cannot be used as class, trait or interface names (6) - class_alias
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved6_use.phpt b/Zend/tests/type_declarations/scalar_reserved6_use.phpt
index 9cb7857a50..e9de61ff87 100644
--- a/Zend/tests/typehints/scalar_reserved6_use.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved6_use.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (6) - use
+Scalar type names cannot be used as class, trait or interface names (6) - use
--FILE--
<?php
diff --git a/Zend/tests/typehints/scalar_reserved7.phpt b/Zend/tests/type_declarations/scalar_reserved7.phpt
index d641d178d1..1e23d59d79 100644
--- a/Zend/tests/typehints/scalar_reserved7.phpt
+++ b/Zend/tests/type_declarations/scalar_reserved7.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint names cannot be used as class, trait or interface names (7)
+Scalar type names cannot be used as class, trait or interface names (7)
--FILE--
<?php
namespace foo;
diff --git a/Zend/tests/typehints/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt
index b01a930485..4e0650e7e9 100644
--- a/Zend/tests/typehints/scalar_return_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_return_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Return scalar type hint basics
+Return scalar type basics
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--FILE--
@@ -48,14 +48,14 @@ $values = [
];
foreach ($functions as $type => $function) {
- echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+ echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
foreach ($values as $value) {
echo "*** Trying ";
var_dump($value);
try {
var_dump($function($value));
} catch (TypeError $e) {
- echo "*** Caught " . $e->getMessage() . PHP_EOL;
+ echo "*** Caught ", $e->getMessage(), " in ", $e->getFile(), " on line ", $e->getLine(), PHP_EOL;
}
}
}
@@ -63,7 +63,7 @@ foreach ($functions as $type => $function) {
echo PHP_EOL . "Done";
?>
--EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
*** Trying int(1)
int(1)
*** Trying string(1) "1"
@@ -101,7 +101,7 @@ int(0)
*** Trying resource(5) of type (stream)
*** Caught Return value of {closure}() must be of the type integer, resource returned in %s on line %d
-Testing 'float' typehint:
+Testing 'float' type:
*** Trying int(1)
float(1)
*** Trying string(1) "1"
@@ -139,7 +139,7 @@ float(0)
*** Trying resource(5) of type (stream)
*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
-Testing 'string' typehint:
+Testing 'string' type:
*** Trying int(1)
string(1) "1"
*** Trying string(1) "1"
@@ -176,7 +176,7 @@ string(6) "foobar"
*** Trying resource(5) of type (stream)
*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
-Testing 'bool' typehint:
+Testing 'bool' type:
*** Trying int(1)
bool(true)
*** Trying string(1) "1"
diff --git a/Zend/tests/typehints/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
index 6994817404..e8f69bc699 100644
--- a/Zend/tests/typehints/scalar_return_basic_64bit.phpt
+++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
@@ -1,5 +1,5 @@
--TEST--
-Return scalar type hint basics
+Return scalar type basics
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
@@ -48,14 +48,14 @@ $values = [
];
foreach ($functions as $type => $function) {
- echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+ echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
foreach ($values as $value) {
echo "*** Trying ";
var_dump($value);
try {
var_dump($function($value));
} catch (TypeError $e) {
- echo "*** Caught " . $e->getMessage() . PHP_EOL;
+ echo "*** Caught ", $e->getMessage(), " in ", $e->getFile(), " on line ", $e->getLine(), PHP_EOL;
}
}
}
@@ -63,7 +63,7 @@ foreach ($functions as $type => $function) {
echo PHP_EOL . "Done";
?>
--EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
*** Trying int(1)
int(1)
*** Trying string(1) "1"
@@ -101,7 +101,7 @@ int(0)
*** Trying resource(5) of type (stream)
*** Caught Return value of {closure}() must be of the type integer, resource returned in %s on line %d
-Testing 'float' typehint:
+Testing 'float' type:
*** Trying int(1)
float(1)
*** Trying string(1) "1"
@@ -139,7 +139,7 @@ float(0)
*** Trying resource(5) of type (stream)
*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
-Testing 'string' typehint:
+Testing 'string' type:
*** Trying int(1)
string(1) "1"
*** Trying string(1) "1"
@@ -176,7 +176,7 @@ string(6) "foobar"
*** Trying resource(5) of type (stream)
*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
-Testing 'bool' typehint:
+Testing 'bool' type:
*** Trying int(1)
bool(true)
*** Trying string(1) "1"
diff --git a/Zend/tests/typehints/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt
index 59ec45ac4f..40b036e1d4 100644
--- a/Zend/tests/typehints/scalar_strict.phpt
+++ b/Zend/tests/type_declarations/scalar_strict.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint strict mode
+Scalar type strict mode
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--FILE--
@@ -49,7 +49,7 @@ $values = [
];
foreach ($functions as $type => $function) {
- echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+ echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
foreach ($values as $value) {
echo PHP_EOL . "*** Trying ";
var_dump($value);
@@ -64,7 +64,7 @@ foreach ($functions as $type => $function) {
echo PHP_EOL . "Done";
?>
--EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
*** Trying int(1)
int(1)
@@ -117,7 +117,7 @@ int(2147483647)
*** Trying resource(5) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
-Testing 'float' typehint:
+Testing 'float' type:
*** Trying int(1)
float(1)
@@ -170,7 +170,7 @@ float(NAN)
*** Trying resource(5) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
-Testing 'string' typehint:
+Testing 'string' type:
*** Trying int(1)
*** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
@@ -223,7 +223,7 @@ string(0) ""
*** Trying resource(5) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
-Testing 'bool' typehint:
+Testing 'bool' type:
*** Trying int(1)
*** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
diff --git a/Zend/tests/typehints/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt
index 4671b07609..3e748ede34 100644
--- a/Zend/tests/typehints/scalar_strict_64bit.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt
@@ -1,5 +1,5 @@
--TEST--
-Scalar type hint strict mode
+Scalar type strict mode
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
@@ -49,7 +49,7 @@ $values = [
];
foreach ($functions as $type => $function) {
- echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+ echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
foreach ($values as $value) {
echo PHP_EOL . "*** Trying ";
var_dump($value);
@@ -64,7 +64,7 @@ foreach ($functions as $type => $function) {
echo PHP_EOL . "Done";
?>
--EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
*** Trying int(1)
int(1)
@@ -117,7 +117,7 @@ int(9223372036854775807)
*** Trying resource(5) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
-Testing 'float' typehint:
+Testing 'float' type:
*** Trying int(1)
float(1)
@@ -170,7 +170,7 @@ float(NAN)
*** Trying resource(5) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
-Testing 'string' typehint:
+Testing 'string' type:
*** Trying int(1)
*** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
@@ -223,7 +223,7 @@ string(0) ""
*** Trying resource(5) of type (stream)
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
-Testing 'bool' typehint:
+Testing 'bool' type:
*** Trying int(1)
*** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
diff --git a/Zend/tests/typehints/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt
index 15030e1c86..3ee94a2059 100644
--- a/Zend/tests/typehints/scalar_strict_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Strict scalar type hint basics
+Strict scalar type basics
--FILE--
<?php
@@ -48,7 +48,7 @@ function type($value) {
}
foreach ($functions as $type => $function) {
- echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+ echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
foreach ($values as $value) {
$errored = false;
echo PHP_EOL . "*** Trying ", type($value), " value", PHP_EOL;
@@ -62,7 +62,7 @@ foreach ($functions as $type => $function) {
echo PHP_EOL . "Done";
?>
--EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
*** Trying integer value
int(1)
@@ -91,7 +91,7 @@ int(1)
*** Trying resource value
*** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
-Testing 'float' typehint:
+Testing 'float' type:
*** Trying integer value
float(1)
@@ -120,7 +120,7 @@ float(1)
*** Trying resource value
*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
-Testing 'string' typehint:
+Testing 'string' type:
*** Trying integer value
*** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
@@ -149,7 +149,7 @@ string(1) "1"
*** Trying resource value
*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
-Testing 'bool' typehint:
+Testing 'bool' type:
*** Trying integer value
*** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_001.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_001.phpt
index 2a2b3e6fd3..2a2b3e6fd3 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_001.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_001.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_002.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_002.phpt
index 09ac1119ab..09ac1119ab 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_002.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_002.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_003.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_003.phpt
index 6ec5b59b98..6ec5b59b98 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_003.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_003.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_004.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_004.phpt
index 60003241cf..60003241cf 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_004.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_004.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_005.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_005.phpt
index 8611a205cf..8611a205cf 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_005.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_005.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_006.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_006.phpt
index 2af05b6c65..2af05b6c65 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_006.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_006.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_007.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_007.phpt
index 3e4c693afb..3e4c693afb 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_007.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_007.phpt
diff --git a/Zend/tests/typehints/scalar_strict_declaration_placement_008.phpt b/Zend/tests/type_declarations/scalar_strict_declaration_placement_008.phpt
index 87a09af96c..87a09af96c 100644
--- a/Zend/tests/typehints/scalar_strict_declaration_placement_008.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_declaration_placement_008.phpt
diff --git a/Zend/tests/typehints/scalar_weak_reference.phpt b/Zend/tests/type_declarations/scalar_weak_reference.phpt
index f397ceaa8d..74069689e6 100644
--- a/Zend/tests/typehints/scalar_weak_reference.phpt
+++ b/Zend/tests/type_declarations/scalar_weak_reference.phpt
@@ -1,5 +1,5 @@
--TEST--
-Weak scalar type hints, with references
+Weak scalar types, with references
--FILE--
<?php
@@ -12,7 +12,7 @@ function to_bool(bool &$x) {}
$x = 1.0;
var_dump($x);
-to_int($x); // because $x is by-reference, the weak type hint converts it
+to_int($x); // because $x is by-reference, the weak type converts it
var_dump($x);
to_float($x);
var_dump($x);
diff --git a/Zend/tests/typehints/self_on_closure_in_method.phpt b/Zend/tests/type_declarations/self_on_closure_in_method.phpt
index 2d5bd82ef2..2d5bd82ef2 100644
--- a/Zend/tests/typehints/self_on_closure_in_method.phpt
+++ b/Zend/tests/type_declarations/self_on_closure_in_method.phpt
diff --git a/Zend/tests/typehints/strict_call_weak.phpt b/Zend/tests/type_declarations/strict_call_weak.phpt
index e3a606ec12..e3a606ec12 100644
--- a/Zend/tests/typehints/strict_call_weak.phpt
+++ b/Zend/tests/type_declarations/strict_call_weak.phpt
diff --git a/Zend/tests/typehints/strict_call_weak_2.inc b/Zend/tests/type_declarations/strict_call_weak_2.inc
index cba5512897..cba5512897 100644
--- a/Zend/tests/typehints/strict_call_weak_2.inc
+++ b/Zend/tests/type_declarations/strict_call_weak_2.inc
diff --git a/Zend/tests/typehints/strict_call_weak_explicit.phpt b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt
index 22c5b4319c..22c5b4319c 100644
--- a/Zend/tests/typehints/strict_call_weak_explicit.phpt
+++ b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt
diff --git a/Zend/tests/typehints/strict_call_weak_explicit_2.inc b/Zend/tests/type_declarations/strict_call_weak_explicit_2.inc
index d26c84761c..d26c84761c 100644
--- a/Zend/tests/typehints/strict_call_weak_explicit_2.inc
+++ b/Zend/tests/type_declarations/strict_call_weak_explicit_2.inc
diff --git a/Zend/tests/typehints/strict_include_explicit_weak.phpt b/Zend/tests/type_declarations/strict_include_explicit_weak.phpt
index a42d633f47..a42d633f47 100644
--- a/Zend/tests/typehints/strict_include_explicit_weak.phpt
+++ b/Zend/tests/type_declarations/strict_include_explicit_weak.phpt
diff --git a/Zend/tests/typehints/strict_include_explicit_weak_2.inc b/Zend/tests/type_declarations/strict_include_explicit_weak_2.inc
index 3da32e1738..3da32e1738 100644
--- a/Zend/tests/typehints/strict_include_explicit_weak_2.inc
+++ b/Zend/tests/type_declarations/strict_include_explicit_weak_2.inc
diff --git a/Zend/tests/typehints/strict_include_weak.phpt b/Zend/tests/type_declarations/strict_include_weak.phpt
index ce29db7e75..ce29db7e75 100644
--- a/Zend/tests/typehints/strict_include_weak.phpt
+++ b/Zend/tests/type_declarations/strict_include_weak.phpt
diff --git a/Zend/tests/typehints/strict_include_weak_2.inc b/Zend/tests/type_declarations/strict_include_weak_2.inc
index d4ee8a836b..d4ee8a836b 100644
--- a/Zend/tests/typehints/strict_include_weak_2.inc
+++ b/Zend/tests/type_declarations/strict_include_weak_2.inc
diff --git a/Zend/tests/typehints/strict_nested.phpt b/Zend/tests/type_declarations/strict_nested.phpt
index 2001f8b1f4..2001f8b1f4 100644
--- a/Zend/tests/typehints/strict_nested.phpt
+++ b/Zend/tests/type_declarations/strict_nested.phpt
diff --git a/Zend/tests/type_declarations/typed_return_without_value.phpt b/Zend/tests/type_declarations/typed_return_without_value.phpt
new file mode 100644
index 0000000000..1bf932becb
--- /dev/null
+++ b/Zend/tests/type_declarations/typed_return_without_value.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Typed return without value generates compile-time error
+--FILE--
+<?php
+
+function test() : int {
+ return;
+}
+
+test();
+
+?>
+--EXPECTF--
+Fatal error: A function with return type must return a value in %s on line %d
diff --git a/Zend/tests/typehints/weak_call_strict.phpt b/Zend/tests/type_declarations/weak_call_strict.phpt
index b0ea78ce67..b0ea78ce67 100644
--- a/Zend/tests/typehints/weak_call_strict.phpt
+++ b/Zend/tests/type_declarations/weak_call_strict.phpt
diff --git a/Zend/tests/typehints/weak_call_strict_2.inc b/Zend/tests/type_declarations/weak_call_strict_2.inc
index fe2a17f682..fe2a17f682 100644
--- a/Zend/tests/typehints/weak_call_strict_2.inc
+++ b/Zend/tests/type_declarations/weak_call_strict_2.inc
diff --git a/Zend/tests/typehints/weak_explicit_call_strict.phpt b/Zend/tests/type_declarations/weak_explicit_call_strict.phpt
index b07cef5ece..b07cef5ece 100644
--- a/Zend/tests/typehints/weak_explicit_call_strict.phpt
+++ b/Zend/tests/type_declarations/weak_explicit_call_strict.phpt
diff --git a/Zend/tests/typehints/weak_include_strict.phpt b/Zend/tests/type_declarations/weak_include_strict.phpt
index e49485dbe5..e49485dbe5 100644
--- a/Zend/tests/typehints/weak_include_strict.phpt
+++ b/Zend/tests/type_declarations/weak_include_strict.phpt
diff --git a/Zend/tests/typehints/weak_include_strict_2.inc b/Zend/tests/type_declarations/weak_include_strict_2.inc
index 8acfc039e8..8acfc039e8 100644
--- a/Zend/tests/typehints/weak_include_strict_2.inc
+++ b/Zend/tests/type_declarations/weak_include_strict_2.inc
diff --git a/Zend/tests/typehints/fully_qualified_scalar.phpt b/Zend/tests/typehints/fully_qualified_scalar.phpt
new file mode 100644
index 0000000000..d780b44dcd
--- /dev/null
+++ b/Zend/tests/typehints/fully_qualified_scalar.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Fully qualified (leading backslash) type names must fail
+--FILE--
+<?php
+
+function foo(\int $foo) {
+ var_dump($foo);
+}
+foo(1);
+
+?>
+--EXPECTF--
+Fatal error: Scalar type declaration 'int' must be unqualified in %s on line %d
diff --git a/Zend/tests/typehints/namespace_relative_scalar.phpt b/Zend/tests/typehints/namespace_relative_scalar.phpt
new file mode 100644
index 0000000000..1bc91788cc
--- /dev/null
+++ b/Zend/tests/typehints/namespace_relative_scalar.phpt
@@ -0,0 +1,11 @@
+--TEST--
+namespace\int is not a valid type hint
+--FILE--
+<?php
+
+function test(namespace\int $i) {}
+test(0);
+
+?>
+--EXPECTF--
+Fatal error: Scalar type declaration 'int' must be unqualified in %s on line %d
diff --git a/Zend/tests/typehints/scalar_float_with_invalid_default.phpt b/Zend/tests/typehints/scalar_float_with_invalid_default.phpt
deleted file mode 100644
index 6b67985fd1..0000000000
--- a/Zend/tests/typehints/scalar_float_with_invalid_default.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Float type hint should not allow invalid types as default
---FILE--
-<?php
-
-function test(float $arg = true)
-{
- var_dump($arg);
-}
-
-test();
-
-?>
---EXPECTF--
-
-Fatal error: Default value for parameters with a float type hint can only be float, integer, or NULL in %s on line %d
diff --git a/Zend/tests/varSyntax/static_prop_on_expr_class.phpt b/Zend/tests/varSyntax/static_prop_on_expr_class.phpt
new file mode 100644
index 0000000000..d17b6cdb0b
--- /dev/null
+++ b/Zend/tests/varSyntax/static_prop_on_expr_class.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Accessing a static property on a statically evaluable class expression
+--FILE--
+<?php
+
+class A {
+ public static $b = 42;
+}
+var_dump(('A' . (string) '')::$b);
+
+?>
+--EXPECT--
+int(42)
diff --git a/Zend/tests/varSyntax/static_prop_on_expr_class_with_backslash.phpt b/Zend/tests/varSyntax/static_prop_on_expr_class_with_backslash.phpt
new file mode 100644
index 0000000000..c78610401f
--- /dev/null
+++ b/Zend/tests/varSyntax/static_prop_on_expr_class_with_backslash.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Static property on constexpr class with leading backslash
+--FILE--
+<?php
+
+class A {
+ public static $b = 42;
+}
+var_dump(('\A' . (string) '')::$b);
+
+?>
+--EXPECT--
+int(42)
diff --git a/Zend/tests/varSyntax/static_prop_on_int_expr_class.phpt b/Zend/tests/varSyntax/static_prop_on_int_expr_class.phpt
new file mode 100644
index 0000000000..c7c44d5694
--- /dev/null
+++ b/Zend/tests/varSyntax/static_prop_on_int_expr_class.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Static property access on constexpr class evaluating to integer
+--FILE--
+<?php
+((int)1)::$b;
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Class name must be a valid object or a string in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt b/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt
index da96264609..4c6f36f10b 100644
--- a/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt
+++ b/Zend/tests/variadic/adding_additional_optional_parameter_error.phpt
@@ -13,4 +13,4 @@ class MySQL implements DB {
?>
--EXPECTF--
-Fatal error: Declaration of MySQL::query($query, int $extraParam = NULL, string ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d
+Fatal error: Declaration of MySQL::query($query, ?int $extraParam = NULL, string ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d
diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt
index 26842bbcc2..153161a09d 100644
--- a/Zend/tests/variadic/typehint_error.phpt
+++ b/Zend/tests/variadic/typehint_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Variadic arguments enforce typehints
+Variadic arguments enforce types
--FILE--
<?php
diff --git a/Zend/tests/variadic/typehint_suppressed_error.phpt b/Zend/tests/variadic/typehint_suppressed_error.phpt
index 24109e0891..ef217b2be0 100644
--- a/Zend/tests/variadic/typehint_suppressed_error.phpt
+++ b/Zend/tests/variadic/typehint_suppressed_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Error suppression for typehints on variadic arguments works
+Error suppression for types on variadic arguments works
--FILE--
<?php
diff --git a/Zend/zend.c b/Zend/zend.c
index 9e8613aa55..f2fa4b12d9 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -129,7 +129,7 @@ static ZEND_INI_MH(OnUpdateAssertions) /* {{{ */
ZEND_INI_BEGIN()
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
- STD_ZEND_INI_BOOLEAN("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals)
+ STD_ZEND_INI_ENTRY("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals)
STD_ZEND_INI_BOOLEAN("zend.enable_gc", "1", ZEND_INI_ALL, OnUpdateGCEnabled, gc_enabled, zend_gc_globals, gc_globals)
STD_ZEND_INI_BOOLEAN("zend.multibyte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte, zend_compiler_globals, compiler_globals)
ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding)
@@ -148,7 +148,7 @@ static HashTable *global_class_table = NULL;
static HashTable *global_constants_table = NULL;
static HashTable *global_auto_globals_table = NULL;
static HashTable *global_persistent_list = NULL;
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_API zend_utility_values zend_uv;
@@ -156,7 +156,7 @@ ZEND_API zend_utility_values zend_uv;
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
-#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2015 Zend Technologies\n"
+#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2016 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent, zend_bool is_object) /* {{{ */
@@ -446,14 +446,34 @@ static void zend_init_call_trampoline_op(void) /* {{{ */
}
/* }}} */
+static void auto_global_dtor(zval *zv) /* {{{ */
+{
+ free(Z_PTR_P(zv));
+}
+/* }}} */
+
#ifdef ZTS
-static void function_copy_ctor(zval *zv)
+static void function_copy_ctor(zval *zv) /* {{{ */
{
zend_function *old_func = Z_FUNC_P(zv);
Z_FUNC_P(zv) = pemalloc(sizeof(zend_internal_function), 1);
memcpy(Z_FUNC_P(zv), old_func, sizeof(zend_internal_function));
function_add_ref(Z_FUNC_P(zv));
}
+/* }}} */
+
+static void auto_global_copy_ctor(zval *zv) /* {{{ */
+{
+ zend_auto_global *old_ag = (zend_auto_global *) Z_PTR_P(zv);
+ zend_auto_global *new_ag = pemalloc(sizeof(zend_auto_global), 1);
+
+ new_ag->name = old_ag->name;
+ new_ag->auto_global_callback = old_ag->auto_global_callback;
+ new_ag->jit = old_ag->jit;
+
+ Z_PTR_P(zv) = new_ag;
+}
+/* }}} */
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{{ */
{
@@ -470,8 +490,8 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{
zend_set_default_compile_time_values();
compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable));
- zend_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, 0);
- zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, NULL /* empty element */);
+ zend_hash_init_ex(compiler_globals->auto_globals, 8, NULL, auto_global_dtor, 1, 0);
+ zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, auto_global_copy_ctor);
compiler_globals->last_static_member = zend_hash_num_elements(compiler_globals->class_table);
if (compiler_globals->last_static_member) {
@@ -481,11 +501,11 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{
}
compiler_globals->script_encoding_list = NULL;
-#ifdef ZTS
- zend_interned_empty_string_init(&compiler_globals->empty_string);
+ compiler_globals->empty_string = zend_zts_interned_string_init("", sizeof("")-1);
memset(compiler_globals->one_char_string, 0, sizeof(compiler_globals->one_char_string));
-#endif
+
+ zend_known_interned_strings_init(&compiler_globals->known_strings, &compiler_globals->known_strings_count);
}
/* }}} */
@@ -511,9 +531,10 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals) /* {{
}
compiler_globals->last_static_member = 0;
-#ifdef ZTS
- zend_interned_empty_string_free(&compiler_globals->empty_string);
-#endif
+ zend_zts_interned_string_free(&compiler_globals->empty_string);
+
+ compiler_globals->known_strings = NULL;
+ compiler_globals->known_strings_count = 0;
}
/* }}} */
@@ -552,11 +573,8 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{
static void executor_globals_dtor(zend_executor_globals *executor_globals) /* {{{ */
{
-#ifdef ZTS
zend_ini_dtor(executor_globals->ini_directives);
-#else
- zend_ini_shutdown();
-#endif
+
if (&executor_globals->persistent_list != global_persistent_list) {
zend_destroy_rsrc_list(&executor_globals->persistent_list);
}
@@ -604,18 +622,12 @@ static void module_destructor_zval(zval *zv) /* {{{ */
}
/* }}} */
-static void auto_global_dtor(zval *zv) /* {{{ */
-{
- free(Z_PTR_P(zv));
-}
-/* }}} */
-
static zend_bool php_auto_globals_create_globals(zend_string *name) /* {{{ */
{
zval globals;
ZVAL_ARR(&globals, &EG(symbol_table));
- Z_TYPE_INFO_P(&globals) = IS_ARRAY | (IS_TYPE_SYMBOLTABLE << Z_TYPE_FLAGS_SHIFT);
+ Z_TYPE_INFO_P(&globals) = IS_ARRAY;
ZVAL_NEW_REF(&globals, &globals);
zend_hash_update(&EG(symbol_table), name, &globals);
return 0;
@@ -750,10 +762,6 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
#endif
-#ifdef ZEND_SIGNALS
- zend_signal_startup();
-#endif
-
return SUCCESS;
}
/* }}} */
@@ -875,19 +883,19 @@ void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */
/* }}} */
/* this should be compatible with the standard zenderror */
-void zenderror(const char *error) /* {{{ */
+ZEND_COLD void zenderror(const char *error) /* {{{ */
{
if (EG(exception)) {
/* An exception was thrown in the lexer, don't throw another in the parser. */
return;
}
- zend_throw_exception(zend_ce_parse_error, error, E_PARSE);
+ zend_throw_exception(zend_ce_parse_error, error, 0);
}
/* }}} */
BEGIN_EXTERN_C()
-ZEND_API void _zend_bailout(char *filename, uint lineno) /* {{{ */
+ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint lineno) /* {{{ */
{
if (!EG(bailout)) {
@@ -964,6 +972,10 @@ ZEND_API void zend_deactivate(void) /* {{{ */
shutdown_executor();
zend_try {
+ zend_ini_deactivate();
+ } zend_end_try();
+
+ zend_try {
shutdown_compiler();
} zend_end_try();
@@ -980,12 +992,7 @@ ZEND_API void zend_deactivate(void) /* {{{ */
fprintf(stderr, " Root Buffered buffer grey\n");
fprintf(stderr, " -------- -------- ----------- ------\n");
fprintf(stderr, "ZVAL %8d %8d %9d %8d\n", GC_G(zval_possible_root), GC_G(zval_buffered), GC_G(zval_remove_from_buffer), GC_G(zval_marked_grey));
- fprintf(stderr, "ZOBJ %8d %8d %9d %8d\n", GC_G(zobj_possible_root), GC_G(zobj_buffered), GC_G(zobj_remove_from_buffer), GC_G(zobj_marked_grey));
#endif
-
- zend_try {
- zend_ini_deactivate();
- } zend_end_try();
}
/* }}} */
@@ -1027,9 +1034,9 @@ ZEND_API zval *zend_get_configuration_directive(zend_string *name) /* {{{ */
} while (0)
#if !defined(HAVE_NORETURN) || defined(HAVE_NORETURN_ALIAS)
-ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) /* {{{ */
#else
-static void zend_error_va_list(int type, const char *format, va_list args)
+static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list args)
#endif
{
char *str;
@@ -1269,9 +1276,9 @@ static void zend_error_va_list(int type, const char *format, va_list args)
#ifdef HAVE_NORETURN
# ifdef HAVE_NORETURN_ALIAS
-void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
+ZEND_COLD void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
# else
-ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) /* {{{ */
{
va_list va;
@@ -1280,7 +1287,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
va_end(va);
}
-ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...)
+ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...)
{
va_list va;
@@ -1292,19 +1299,28 @@ ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ..
# endif
#endif
-ZEND_API void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...) /* {{{ */
{
va_list va;
char *message = NULL;
+
+ if (exception_ce) {
+ if (!instanceof_function(exception_ce, zend_ce_error)) {
+ zend_error(E_NOTICE, "Error exceptions must be derived from Error");
+ exception_ce = zend_ce_error;
+ }
+ } else {
+ exception_ce = zend_ce_error;
+ }
va_start(va, format);
zend_vspprintf(&message, 0, format, va);
- // TODO: we can't convert compile-time errors to exceptions yet???
+ //TODO: we can't convert compile-time errors to exceptions yet???
if (EG(current_execute_data) && !CG(in_compilation)) {
zend_throw_exception(exception_ce, message, 0);
} else {
- zend_error(E_ERROR, message);
+ zend_error(E_ERROR, "%s", message);
}
efree(message);
@@ -1312,19 +1328,19 @@ ZEND_API void zend_throw_error(zend_class_entry *exception_ce, const char *forma
}
/* }}} */
-ZEND_API void zend_type_error(const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD void zend_type_error(const char *format, ...) /* {{{ */
{
va_list va;
char *message = NULL;
va_start(va, format);
zend_vspprintf(&message, 0, format, va);
- zend_throw_exception(zend_ce_type_error, message, E_ERROR);
+ zend_throw_exception(zend_ce_type_error, message, 0);
efree(message);
va_end(va);
} /* }}} */
-ZEND_API void zend_internal_type_error(zend_bool throw_exception, const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool throw_exception, const char *format, ...) /* {{{ */
{
va_list va;
char *message = NULL;
@@ -1332,16 +1348,16 @@ ZEND_API void zend_internal_type_error(zend_bool throw_exception, const char *fo
va_start(va, format);
zend_vspprintf(&message, 0, format, va);
if (throw_exception) {
- zend_throw_exception(zend_ce_type_error, message, E_ERROR);
+ zend_throw_exception(zend_ce_type_error, message, 0);
} else {
- zend_error(E_WARNING, message);
+ zend_error(E_WARNING, "%s", message);
}
efree(message);
va_end(va);
} /* }}} */
-ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */
{
#if ZEND_DEBUG
va_list args;
@@ -1367,6 +1383,32 @@ ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *form
}
/* }}} */
+ZEND_API void zend_try_exception_handler() /* {{{ */
+{
+ if (EG(exception)) {
+ if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
+ zval orig_user_exception_handler;
+ zval params[1], retval2;
+ zend_object *old_exception;
+ old_exception = EG(exception);
+ EG(exception) = NULL;
+ ZVAL_OBJ(&params[0], old_exception);
+ ZVAL_COPY_VALUE(&orig_user_exception_handler, &EG(user_exception_handler));
+
+ if (call_user_function_ex(CG(function_table), NULL, &orig_user_exception_handler, &retval2, 1, params, 1, NULL) == SUCCESS) {
+ zval_ptr_dtor(&retval2);
+ if (EG(exception)) {
+ OBJ_RELEASE(EG(exception));
+ EG(exception) = NULL;
+ }
+ OBJ_RELEASE(old_exception);
+ } else {
+ EG(exception) = old_exception;
+ }
+ }
+ }
+} /* }}} */
+
ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...) /* {{{ */
{
va_list files;
@@ -1389,30 +1431,9 @@ ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...) /
if (op_array) {
zend_execute(op_array, retval);
zend_exception_restore();
+ zend_try_exception_handler();
if (EG(exception)) {
- if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
- zval orig_user_exception_handler;
- zval params[1], retval2;
- zend_object *old_exception;
- old_exception = EG(exception);
- EG(exception) = NULL;
- ZVAL_OBJ(&params[0], old_exception);
- ZVAL_COPY_VALUE(&orig_user_exception_handler, &EG(user_exception_handler));
-
- if (call_user_function_ex(CG(function_table), NULL, &orig_user_exception_handler, &retval2, 1, params, 1, NULL) == SUCCESS) {
- zval_ptr_dtor(&retval2);
- if (EG(exception)) {
- OBJ_RELEASE(EG(exception));
- EG(exception) = NULL;
- }
- OBJ_RELEASE(old_exception);
- } else {
- EG(exception) = old_exception;
- zend_exception_error(EG(exception), E_ERROR);
- }
- } else {
- zend_exception_error(EG(exception), E_ERROR);
- }
+ zend_exception_error(EG(exception), E_ERROR);
}
destroy_op_array(op_array);
efree_size(op_array, sizeof(zend_op_array));
@@ -1457,13 +1478,6 @@ void free_estring(char **str_p) /* {{{ */
}
/* }}} */
-void free_string_zval(zval *zv) /* {{{ */
-{
- zend_string *str = Z_PTR_P(zv);
- zend_string_release(str);
-}
-/* }}} */
-
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend.h b/Zend/zend.h
index 2d90424208..e886ba20d3 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,7 @@
#ifndef ZEND_H
#define ZEND_H
-#define ZEND_VERSION "3.0.0-dev"
+#define ZEND_VERSION "3.1.0-dev"
#define ZEND_ENGINE_3
@@ -45,8 +45,11 @@
#endif
#ifndef ZEND_SIGNALS
-# define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
-# define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
+/* block/unblock interruptions callbacks might be used by SAPI, and were used
+ * by mod_php for Apache 1, but now they are not usefull anymore.
+ */
+# define HANDLE_BLOCK_INTERRUPTIONS() /*if (zend_block_interruptions) { zend_block_interruptions(); }*/
+# define HANDLE_UNBLOCK_INTERRUPTIONS() /*if (zend_unblock_interruptions) { zend_unblock_interruptions(); }*/
#else
# define HANDLE_BLOCK_INTERRUPTIONS() ZEND_SIGNAL_BLOCK_INTERRUPUTIONS()
# define HANDLE_UNBLOCK_INTERRUPTIONS() ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS()
@@ -58,7 +61,7 @@
#define USED_RET() \
(!EX(prev_execute_data) || \
!ZEND_USER_CODE(EX(prev_execute_data)->func->common.type) || \
- !(EX(prev_execute_data)->opline->result_type & EXT_TYPE_UNUSED))
+ (EX(prev_execute_data)->opline->result_type != IS_UNUSED))
#ifdef ZEND_ENABLE_STATIC_TSRMLS_CACHE
#define ZEND_TSRMG TSRMG_STATIC
@@ -74,23 +77,18 @@
#define ZEND_TSRMLS_CACHE
#endif
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
#ifdef HAVE_NORETURN
-# ifdef ZEND_NORETRUN_ALIAS
-void zend_error_noreturn(int type, const char *format, ...) ZEND_NORETURN;
+# ifdef ZEND_NORETURN_ALIAS
+ZEND_COLD void zend_error_noreturn(int type, const char *format, ...) ZEND_NORETURN;
# else
-ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...);
+ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...);
# endif
#else
# define zend_error_noreturn zend_error
#endif
-/* overloaded elements data types */
-#define OE_IS_ARRAY (1<<0)
-#define OE_IS_OBJECT (1<<1)
-#define OE_IS_METHOD (1<<2)
-
struct _zend_serialize_data;
struct _zend_unserialize_data;
@@ -240,7 +238,7 @@ void zend_register_standard_ini_entries(void);
void zend_post_startup(void);
void zend_set_utility_values(zend_utility_values *utility_values);
-ZEND_API void _zend_bailout(char *filename, uint lineno);
+ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint lineno);
ZEND_API char *get_zend_version(void);
ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy);
@@ -249,7 +247,7 @@ ZEND_API size_t zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int
ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API void zend_print_flat_zval_r(zval *expr);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
-ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
+ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
ZEND_API void zend_activate(void);
ZEND_API void zend_deactivate(void);
@@ -259,7 +257,6 @@ ZEND_API void zend_deactivate_modules(void);
ZEND_API void zend_post_deactivate_modules(void);
ZEND_API void free_estring(char **str_p);
-ZEND_API void free_string_zval(zval *zv);
END_EXTERN_C()
/* output support */
@@ -284,12 +281,12 @@ extern zend_string *(*zend_vstrpprintf)(size_t max_len, const char *format, va_l
extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len);
extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, int filename_len);
-ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
-ZEND_API void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...);
-ZEND_API void zend_type_error(const char *format, ...);
-ZEND_API void zend_internal_type_error(zend_bool throw_exception, const char *format, ...);
+ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
+ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format, ...);
+ZEND_API ZEND_COLD void zend_type_error(const char *format, ...);
+ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool throw_exception, const char *format, ...);
-void zenderror(const char *error);
+ZEND_COLD void zenderror(const char *error);
/* The following #define is used for code duality in PHP for Engine 1 & 2 */
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 55d325c8fa..18d8382934 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,6 +15,7 @@
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
| Andrei Zmievski <andrei@php.net> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -24,6 +25,7 @@
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_modules.h"
+#include "zend_extensions.h"
#include "zend_constants.h"
#include "zend_exceptions.h"
#include "zend_closures.h"
@@ -149,7 +151,7 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array) /
}
/* }}} */
-ZEND_API void zend_wrong_param_count(void) /* {{{ */
+ZEND_API ZEND_COLD void zend_wrong_param_count(void) /* {{{ */
{
const char *space;
const char *class_name = get_active_class_name(&space);
@@ -182,6 +184,8 @@ ZEND_API char *zend_get_type_by_const(int type) /* {{{ */
return "callable";
case IS_ARRAY:
return "array";
+ case IS_VOID:
+ return "void";
default:
return "unknown";
}
@@ -196,7 +200,7 @@ ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */
/* }}} */
#ifdef FAST_ZPP
-ZEND_API void ZEND_FASTCALL zend_wrong_paramers_count_error(int num_args, int min_num_args, int max_num_args) /* {{{ */
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int num_args, int min_num_args, int max_num_args) /* {{{ */
{
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : "";
@@ -212,7 +216,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_paramers_count_error(int num_args, int mi
}
/* }}} */
-ZEND_API void ZEND_FASTCALL zend_wrong_paramer_type_error(int num, zend_expected_type expected_type, zval *arg) /* {{{ */
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg) /* {{{ */
{
const char *space;
const char *class_name = get_active_class_name(&space);
@@ -226,7 +230,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_paramer_type_error(int num, zend_expected
}
/* }}} */
-ZEND_API void ZEND_FASTCALL zend_wrong_paramer_class_error(int num, char *name, zval *arg) /* {{{ */
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, char *name, zval *arg) /* {{{ */
{
const char *space;
const char *class_name = get_active_class_name(&space);
@@ -236,7 +240,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_paramer_class_error(int num, char *name,
}
/* }}} */
-ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, char *error) /* {{{ */
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, char *error) /* {{{ */
{
const char *space;
const char *class_name = get_active_class_name(&space);
@@ -245,7 +249,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
zend_internal_type_error(ZEND_ARG_USES_STRICT_TYPES(), "%s%s%s() expects parameter %d to be a valid callback, %s",
class_name, space, get_active_function_name(), num, error);
} else if (severity == E_ERROR) {
- zend_throw_error(zend_ce_error, "%s%s%s() expects parameter %d to be a valid callback, %s",
+ zend_throw_error(zend_ce_type_error, "%s%s%s() expects parameter %d to be a valid callback, %s",
class_name, space, get_active_function_name(), num, error);
} else {
zend_error(severity, "%s%s%s() expects parameter %d to be a valid callback, %s",
@@ -366,11 +370,7 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_long_cap_weak(zval *arg, zend_long *de
if (UNEXPECTED(zend_isnan(Z_DVAL_P(arg)))) {
return 0;
}
- if (UNEXPECTED(!ZEND_DOUBLE_FITS_LONG(Z_DVAL_P(arg)))) {
- *dest = (Z_DVAL_P(arg) > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
- } else {
- *dest = zend_dval_to_lval(Z_DVAL_P(arg));
- }
+ *dest = zend_dval_to_lval_cap(Z_DVAL_P(arg));
} else if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) {
double d;
int type;
@@ -380,11 +380,7 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_long_cap_weak(zval *arg, zend_long *de
if (UNEXPECTED(zend_isnan(d))) {
return 0;
}
- if (UNEXPECTED(!ZEND_DOUBLE_FITS_LONG(d))) {
- *dest = (d > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
- } else {
- *dest = zend_dval_to_lval(d);
- }
+ *dest = zend_dval_to_lval_cap(d);
} else {
return 0;
}
@@ -499,14 +495,16 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
const char *spec_walk = *spec;
char c = *spec_walk++;
int check_null = 0;
+ int separate = 0;
zval *real_arg = arg;
/* scan through modifiers */
ZVAL_DEREF(arg);
while (1) {
if (*spec_walk == '/') {
- SEPARATE_ZVAL(arg);
+ SEPARATE_ZVAL_NOREF(arg);
real_arg = arg;
+ separate = 1;
} else if (*spec_walk == '!') {
check_null = 1;
} else {
@@ -626,7 +624,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
{
HashTable **p = va_arg(*va, HashTable **);
- if (!zend_parse_arg_array_ht(arg, p, check_null, c == 'H')) {
+ if (!zend_parse_arg_array_ht(arg, p, check_null, c == 'H', separate)) {
return "array";
}
}
@@ -790,7 +788,7 @@ ZEND_API int zend_parse_parameter(int flags, int arg_num, zval *arg, const char
return ret;
}
-static void zend_parse_parameters_debug_error(const char *msg) {
+static ZEND_COLD void zend_parse_parameters_debug_error(const char *msg) {
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope
? ZSTR_VAL(active_function->common.scope->name) : "";
@@ -869,12 +867,11 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va,
max_num_args = -1;
}
- if (num_args < min_num_args || (num_args > max_num_args && max_num_args > 0)) {
+ if (num_args < min_num_args || (num_args > max_num_args && max_num_args >= 0)) {
if (!(flags & ZEND_PARSE_PARAMS_QUIET)) {
zend_function *active_function = EG(current_execute_data)->func;
const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : "";
- zend_bool throw_exception =
- ZEND_ARG_USES_STRICT_TYPES() || (flags & ZEND_PARSE_PARAMS_THROW);
+ zend_bool throw_exception = ZEND_ARG_USES_STRICT_TYPES() || (flags & ZEND_PARSE_PARAMS_THROW);
zend_internal_type_error(throw_exception, "%s%s%s() expects %s %d parameter%s, %d given",
class_name,
class_name[0] ? "::" : "",
@@ -937,27 +934,11 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va,
}
/* }}} */
-#define RETURN_IF_ZERO_ARGS(num_args, type_spec, flags) do { \
- int __num_args = (num_args); \
- if (0 == (type_spec)[0] && 0 != __num_args && !(flags & ZEND_PARSE_PARAMS_QUIET)) { \
- const char *__space; \
- const char * __class_name = get_active_class_name(&__space); \
- zend_bool throw_exception = \
- ZEND_ARG_USES_STRICT_TYPES() || (flags & ZEND_PARSE_PARAMS_THROW); \
- zend_internal_type_error(throw_exception, \
- "%s%s%s() expects exactly 0 parameters, %d given", \
- __class_name, __space, get_active_function_name(), __num_args); \
- return FAILURE; \
- } \
-} while(0)
-
ZEND_API int zend_parse_parameters_ex(int flags, int num_args, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
- RETURN_IF_ZERO_ARGS(num_args, type_spec, flags);
-
va_start(va, type_spec);
retval = zend_parse_va_args(num_args, type_spec, &va, flags);
va_end(va);
@@ -972,8 +953,6 @@ ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...) /*
int retval;
int flags = 0;
- RETURN_IF_ZERO_ARGS(num_args, type_spec, flags);
-
va_start(va, type_spec);
retval = zend_parse_va_args(num_args, type_spec, &va, flags);
va_end(va);
@@ -988,8 +967,6 @@ ZEND_API int zend_parse_parameters_throw(int num_args, const char *type_spec, ..
int retval;
int flags = ZEND_PARSE_PARAMS_THROW;
- RETURN_IF_ZERO_ARGS(num_args, type_spec, flags);
-
va_start(va, type_spec);
retval = zend_parse_va_args(num_args, type_spec, &va, flags);
va_end(va);
@@ -1014,14 +991,11 @@ ZEND_API int zend_parse_method_parameters(int num_args, zval *this_ptr, const ch
zend_bool is_method = EG(current_execute_data)->func->common.scope != NULL;
if (!is_method || !this_ptr || Z_TYPE_P(this_ptr) != IS_OBJECT) {
- RETURN_IF_ZERO_ARGS(num_args, p, flags);
-
va_start(va, type_spec);
retval = zend_parse_va_args(num_args, type_spec, &va, flags);
va_end(va);
} else {
p++;
- RETURN_IF_ZERO_ARGS(num_args, p, flags);
va_start(va, type_spec);
@@ -1050,15 +1024,11 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args, zval *this
zend_class_entry *ce;
if (!this_ptr) {
- RETURN_IF_ZERO_ARGS(num_args, p, flags);
-
va_start(va, type_spec);
retval = zend_parse_va_args(num_args, type_spec, &va, flags);
va_end(va);
} else {
p++;
- RETURN_IF_ZERO_ARGS(num_args, p, flags);
-
va_start(va, type_spec);
object = va_arg(va, zval **);
@@ -1095,11 +1065,11 @@ ZEND_API int _array_init(zval *arg, uint32_t size ZEND_FILE_LINE_DC) /* {{{ */
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
{
const zend_object_handlers *obj_ht = Z_OBJ_HT_P(obj);
- zend_class_entry *old_scope = EG(scope);
+ zend_class_entry *old_scope = EG(fake_scope);
zend_string *key;
zval *value;
- EG(scope) = Z_OBJCE_P(obj);
+ EG(fake_scope) = Z_OBJCE_P(obj);
ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, value) {
if (key) {
zval member;
@@ -1108,7 +1078,7 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */
obj_ht->write_property(obj, &member, value, NULL);
}
} ZEND_HASH_FOREACH_END();
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
}
/* }}} */
@@ -1151,17 +1121,15 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
}
}
} else {
- zend_class_entry **scope = EG(current_execute_data) ? &EG(scope) : &CG(active_class_entry);
- zend_class_entry *old_scope = *scope;
zend_class_entry *ce;
+ zend_class_constant *c;
zval *val;
zend_property_info *prop_info;
- *scope = class_type;
- ZEND_HASH_FOREACH_VAL(&class_type->constants_table, val) {
- ZVAL_DEREF(val);
+ ZEND_HASH_FOREACH_PTR(&class_type->constants_table, c) {
+ val = &c->value;
if (Z_CONSTANT_P(val)) {
- if (UNEXPECTED(zval_update_constant_ex(val, 1, class_type) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(val, class_type) != SUCCESS)) {
return FAILURE;
}
}
@@ -1178,8 +1146,7 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
}
ZVAL_DEREF(val);
if (Z_CONSTANT_P(val)) {
- *scope = ce;
- if (UNEXPECTED(zval_update_constant_ex(val, 1, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(val, ce) != SUCCESS)) {
return FAILURE;
}
}
@@ -1187,8 +1154,6 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
} ZEND_HASH_FOREACH_END();
ce = ce->parent;
}
-
- *scope = old_scope;
}
}
return SUCCESS;
@@ -1220,11 +1185,11 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti
{
object->properties = properties;
if (object->ce->default_properties_count) {
- zval *prop;
- zend_string *key;
- zend_property_info *property_info;
+ zval *prop;
+ zend_string *key;
+ zend_property_info *property_info;
- ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
property_info = zend_get_property_info(object->ce, key, 1);
if (property_info != ZEND_WRONG_PROPERTY_INFO &&
property_info &&
@@ -1242,26 +1207,54 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
{
zval *prop, tmp;
zend_string *key;
+ zend_long h;
zend_property_info *property_info;
- ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
- property_info = zend_get_property_info(object->ce, key, 1);
- if (property_info != ZEND_WRONG_PROPERTY_INFO &&
- property_info &&
- (property_info->flags & ZEND_ACC_STATIC) == 0) {
- zval *slot = OBJ_PROP(object, property_info->offset);
- zval_ptr_dtor(slot);
- ZVAL_COPY_VALUE(slot, prop);
- zval_add_ref(slot);
- if (object->properties) {
- ZVAL_INDIRECT(&tmp, slot);
- zend_hash_update(object->properties, key, &tmp);
+ ZEND_HASH_FOREACH_KEY_VAL(properties, h, key, prop) {
+ if (key) {
+ if (ZSTR_VAL(key)[0] == '\0') {
+ const char *class_name, *prop_name;
+ size_t prop_name_len;
+ if (zend_unmangle_property_name_ex(key, &class_name, &prop_name, &prop_name_len) == SUCCESS) {
+ zend_string *pname = zend_string_init(prop_name, prop_name_len, 0);
+ zend_class_entry *prev_scope = EG(fake_scope);
+ if (class_name && class_name[0] != '*') {
+ zend_string *cname = zend_string_init(class_name, strlen(class_name), 0);
+ EG(fake_scope) = zend_lookup_class(cname);
+ zend_string_release(cname);
+ }
+ property_info = zend_get_property_info(object->ce, pname, 1);
+ zend_string_release(pname);
+ EG(fake_scope) = prev_scope;
+ } else {
+ property_info = ZEND_WRONG_PROPERTY_INFO;
+ }
+ } else {
+ property_info = zend_get_property_info(object->ce, key, 1);
+ }
+ if (property_info != ZEND_WRONG_PROPERTY_INFO &&
+ property_info &&
+ (property_info->flags & ZEND_ACC_STATIC) == 0) {
+ zval *slot = OBJ_PROP(object, property_info->offset);
+ zval_ptr_dtor(slot);
+ ZVAL_COPY_VALUE(slot, prop);
+ zval_add_ref(slot);
+ if (object->properties) {
+ ZVAL_INDIRECT(&tmp, slot);
+ zend_hash_update(object->properties, key, &tmp);
+ }
+ } else {
+ if (!object->properties) {
+ rebuild_object_properties(object);
+ }
+ prop = zend_hash_update(object->properties, key, prop);
+ zval_add_ref(prop);
}
} else {
if (!object->properties) {
rebuild_object_properties(object);
}
- prop = zend_hash_update(object->properties, key, prop);
+ prop = zend_hash_index_update(object->properties, h, prop);
zval_add_ref(prop);
}
} ZEND_HASH_FOREACH_END();
@@ -1276,11 +1269,11 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
{
if (UNEXPECTED(class_type->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) {
if (class_type->ce_flags & ZEND_ACC_INTERFACE) {
- zend_throw_error(zend_ce_error, "Cannot instantiate interface %s", ZSTR_VAL(class_type->name));
+ zend_throw_error(NULL, "Cannot instantiate interface %s", ZSTR_VAL(class_type->name));
} else if (class_type->ce_flags & ZEND_ACC_TRAIT) {
- zend_throw_error(zend_ce_error, "Cannot instantiate trait %s", ZSTR_VAL(class_type->name));
+ zend_throw_error(NULL, "Cannot instantiate trait %s", ZSTR_VAL(class_type->name));
} else {
- zend_throw_error(zend_ce_error, "Cannot instantiate abstract class %s", ZSTR_VAL(class_type->name));
+ zend_throw_error(NULL, "Cannot instantiate abstract class %s", ZSTR_VAL(class_type->name));
}
ZVAL_NULL(arg);
Z_OBJ_P(arg) = NULL;
@@ -1321,13 +1314,6 @@ ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC) /* {{{ */
}
/* }}} */
-ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)) /* {{{ */
-{
- zend_error(E_WARNING, "add_assoc_function() is no longer supported");
- return FAILURE;
-}
-/* }}} */
-
ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
{
zval *ret, tmp;
@@ -1650,7 +1636,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
result = zend_symtable_update(ht, ZSTR_EMPTY_ALLOC(), value);
break;
case IS_RESOURCE:
- zend_error(E_NOTICE, "Resource ID#" ZEND_LONG_FMT " used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));
+ zend_error(E_NOTICE, "Resource ID#%d used as offset, casting to integer (%d)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));
result = zend_hash_index_update(ht, Z_RES_HANDLE_P(key), value);
break;
case IS_FALSE:
@@ -2014,7 +2000,7 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
lcname = zend_string_alloc(name_len, 0);
zend_str_tolower_copy(ZSTR_VAL(lcname), dep->name, name_len);
- if (zend_hash_exists(&module_registry, lcname)) {
+ if (zend_hash_exists(&module_registry, lcname) || zend_get_extension(dep->name)) {
zend_string_free(lcname);
/* TODO: Check version relationship */
zend_error(E_CORE_WARNING, "Cannot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name);
@@ -2148,6 +2134,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
internal_function->type = ZEND_INTERNAL_FUNCTION;
internal_function->module = EG(current_module);
+ memset(internal_function->reserved, 0, ZEND_MAX_RESERVED_RESOURCES * sizeof(void*));
if (scope) {
class_name_len = ZSTR_LEN(scope->name);
@@ -2828,7 +2815,7 @@ ZEND_API int zend_disable_class(char *class_name, size_t class_name_length) /* {
}
/* }}} */
-static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache *fcc, int *strict_class, char **error) /* {{{ */
+static int zend_is_callable_check_class(zend_string *name, zend_class_entry *scope, zend_fcall_info_cache *fcc, int *strict_class, char **error) /* {{{ */
{
int ret = 0;
zend_class_entry *ce;
@@ -2841,24 +2828,24 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache
*strict_class = 0;
if (zend_string_equals_literal(lcname, "self")) {
- if (!EG(scope)) {
+ if (!scope) {
if (error) *error = estrdup("cannot access self:: when no class scope is active");
} else {
fcc->called_scope = zend_get_called_scope(EG(current_execute_data));
- fcc->calling_scope = EG(scope);
+ fcc->calling_scope = scope;
if (!fcc->object) {
fcc->object = zend_get_this_object(EG(current_execute_data));
}
ret = 1;
}
} else if (zend_string_equals_literal(lcname, "parent")) {
- if (!EG(scope)) {
+ if (!scope) {
if (error) *error = estrdup("cannot access parent:: when no class scope is active");
- } else if (!EG(scope)->parent) {
+ } else if (!scope->parent) {
if (error) *error = estrdup("cannot access parent:: when current class scope has no parent");
} else {
fcc->called_scope = zend_get_called_scope(EG(current_execute_data));
- fcc->calling_scope = EG(scope)->parent;
+ fcc->calling_scope = scope->parent;
if (!fcc->object) {
fcc->object = zend_get_this_object(EG(current_execute_data));
}
@@ -2920,9 +2907,9 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
zend_string *lmname;
const char *colon;
size_t clen, mlen;
- zend_class_entry *last_scope;
HashTable *ftable;
int call_via_handler = 0;
+ zend_class_entry *scope;
ALLOCA_FLAG(use_heap)
if (error) {
@@ -2947,6 +2934,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
if (lmname != Z_STR_P(callable)) {
ZSTR_ALLOCA_FREE(lmname, use_heap);
}
+ fcc->initialized = 1;
return 1;
} else {
if (lmname == Z_STR_P(callable)) {
@@ -2957,6 +2945,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
zend_str_tolower(ZSTR_VAL(lmname), ZSTR_LEN(lmname));
if ((fcc->function_handler = zend_hash_find_ptr(EG(function_table), lmname)) != NULL) {
ZSTR_ALLOCA_FREE(lmname, use_heap);
+ fcc->initialized = 1;
return 1;
}
}
@@ -2981,19 +2970,18 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
/* This is a compound name.
* Try to fetch class and then find static method. */
- last_scope = EG(scope);
if (ce_org) {
- EG(scope) = ce_org;
+ scope = ce_org;
+ } else {
+ scope = zend_get_executed_scope();
}
cname = zend_string_init(Z_STRVAL_P(callable), clen, 0);
- if (!zend_is_callable_check_class(cname, fcc, &strict_class, error)) {
+ if (!zend_is_callable_check_class(cname, scope, fcc, &strict_class, error)) {
zend_string_release(cname);
- EG(scope) = last_scope;
return 0;
}
zend_string_release(cname);
- EG(scope) = last_scope;
ftable = &fcc->calling_scope->function_table;
if (ce_org && !instanceof_function(ce_org, fcc->calling_scope)) {
@@ -3027,14 +3015,17 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
} else if ((fcc->function_handler = zend_hash_find_ptr(ftable, lmname)) != NULL) {
retval = 1;
if ((fcc->function_handler->op_array.fn_flags & ZEND_ACC_CHANGED) &&
- !strict_class && EG(scope) &&
- instanceof_function(fcc->function_handler->common.scope, EG(scope))) {
- zend_function *priv_fbc;
-
- if ((priv_fbc = zend_hash_find_ptr(&EG(scope)->function_table, lmname)) != NULL
- && priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
- && priv_fbc->common.scope == EG(scope)) {
- fcc->function_handler = priv_fbc;
+ !strict_class) {
+ scope = zend_get_executed_scope();
+ if (scope &&
+ instanceof_function(fcc->function_handler->common.scope, scope)) {
+ zend_function *priv_fbc;
+
+ if ((priv_fbc = zend_hash_find_ptr(&scope->function_table, lmname)) != NULL
+ && priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
+ && priv_fbc->common.scope == scope) {
+ fcc->function_handler = priv_fbc;
+ }
}
}
if ((check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0 &&
@@ -3042,13 +3033,15 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
((fcc->object && fcc->calling_scope->__call) ||
(!fcc->object && fcc->calling_scope->__callstatic)))) {
if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) {
- if (!zend_check_private(fcc->function_handler, fcc->object ? fcc->object->ce : EG(scope), lmname)) {
+ scope = zend_get_executed_scope();
+ if (!zend_check_private(fcc->function_handler, fcc->object ? fcc->object->ce : scope, lmname)) {
retval = 0;
fcc->function_handler = NULL;
goto get_function_via_handler;
}
} else if (fcc->function_handler->common.fn_flags & ZEND_ACC_PROTECTED) {
- if (!zend_check_protected(fcc->function_handler->common.scope, EG(scope))) {
+ scope = zend_get_executed_scope();
+ if (!zend_check_protected(fcc->function_handler->common.scope, scope)) {
retval = 0;
fcc->function_handler = NULL;
goto get_function_via_handler;
@@ -3107,7 +3100,7 @@ get_function_via_handler:
zend_spprintf(error, 0, "cannot call abstract method %s::%s()", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(fcc->function_handler->common.function_name));
retval = 0;
} else {
- zend_throw_error(zend_ce_error, "Cannot call abstract method %s::%s()", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(fcc->function_handler->common.function_name));
+ zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(fcc->function_handler->common.function_name));
return 0;
}
} else if (!fcc->object && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) {
@@ -3131,7 +3124,7 @@ get_function_via_handler:
}
} else if (retval) {
if (severity == E_ERROR) {
- zend_throw_error(zend_ce_error, "Non-static method %s::%s() %s be called statically", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(fcc->function_handler->common.function_name), verb);
+ zend_throw_error(NULL, "Non-static method %s::%s() %s be called statically", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(fcc->function_handler->common.function_name), verb);
} else {
zend_error(severity, "Non-static method %s::%s() %s be called statically", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(fcc->function_handler->common.function_name), verb);
}
@@ -3139,7 +3132,8 @@ get_function_via_handler:
}
if (retval && (check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0) {
if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) {
- if (!zend_check_private(fcc->function_handler, fcc->object ? fcc->object->ce : EG(scope), lmname)) {
+ scope = zend_get_executed_scope();
+ if (!zend_check_private(fcc->function_handler, fcc->object ? fcc->object->ce : scope, lmname)) {
if (error) {
if (*error) {
efree(*error);
@@ -3149,7 +3143,8 @@ get_function_via_handler:
retval = 0;
}
} else if ((fcc->function_handler->common.fn_flags & ZEND_ACC_PROTECTED)) {
- if (!zend_check_protected(fcc->function_handler->common.scope, EG(scope))) {
+ scope = zend_get_executed_scope();
+ if (!zend_check_protected(fcc->function_handler->common.scope, scope)) {
if (error) {
if (*error) {
efree(*error);
@@ -3286,7 +3281,7 @@ again:
return 1;
}
- if (!zend_is_callable_check_class(Z_STR_P(obj), fcc, &strict_class, error)) {
+ if (!zend_is_callable_check_class(Z_STR_P(obj), zend_get_executed_scope(), fcc, &strict_class, error)) {
return 0;
}
@@ -3360,6 +3355,7 @@ again:
memcpy(ZSTR_VAL(*callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name));
memcpy(ZSTR_VAL(*callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke"));
}
+ fcc->initialized = 1;
return 1;
}
if (callable_name) {
@@ -3419,14 +3415,12 @@ ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_i
}
fci->size = sizeof(*fci);
- fci->function_table = fcc->calling_scope ? &fcc->calling_scope->function_table : EG(function_table);
fci->object = fcc->object;
ZVAL_COPY_VALUE(&fci->function_name, callable);
fci->retval = NULL;
fci->param_count = 0;
fci->params = NULL;
fci->no_separation = 1;
- fci->symbol_table = NULL;
return SUCCESS;
}
@@ -3745,13 +3739,51 @@ ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *nam
}
/* }}} */
-ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */
+ZEND_API int zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment) /* {{{ */
{
+ zend_class_constant *c;
+
+ if (ce->ce_flags & ZEND_ACC_INTERFACE) {
+ if (access_type != ZEND_ACC_PUBLIC) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Access type for interface constant %s::%s must be public", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ }
+ }
+
+ if (zend_string_equals_literal_ci(name, "class")) {
+ zend_error_noreturn(ce->type == ZEND_INTERNAL_CLASS ? E_CORE_ERROR : E_COMPILE_ERROR,
+ "A class constant must not be called 'class'; it is reserved for class name fetching");
+ }
+
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ c = pemalloc(sizeof(zend_class_constant), 1);
+ } else {
+ c = zend_arena_alloc(&CG(arena), sizeof(zend_class_constant));
+ }
+ ZVAL_COPY_VALUE(&c->value, value);
+ Z_ACCESS_FLAGS(c->value) = access_type;
+ c->doc_comment = doc_comment;
+ c->ce = ce;
if (Z_CONSTANT_P(value)) {
ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
}
- return zend_hash_str_update(&ce->constants_table, name, name_length, value) ?
- SUCCESS : FAILURE;
+
+ if (!zend_hash_add_ptr(&ce->constants_table, name, c)) {
+ zend_error_noreturn(ce->type == ZEND_INTERNAL_CLASS ? E_CORE_ERROR : E_COMPILE_ERROR,
+ "Cannot redefine class constant %s::%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */
+{
+ int ret;
+
+ zend_string *key = zend_string_init(name, name_length, ce->type & ZEND_INTERNAL_CLASS);
+ ret = zend_declare_class_constant_ex(ce, key, value, ZEND_ACC_PUBLIC, NULL);
+ zend_string_release(key);
+ return ret;
}
/* }}} */
@@ -3809,9 +3841,9 @@ ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char
ZEND_API void zend_update_property_ex(zend_class_entry *scope, zval *object, zend_string *name, zval *value) /* {{{ */
{
zval property;
- zend_class_entry *old_scope = EG(scope);
+ zend_class_entry *old_scope = EG(fake_scope);
- EG(scope) = scope;
+ EG(fake_scope) = scope;
if (!Z_OBJ_HT_P(object)->write_property) {
zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be updated", name, ZSTR_VAL(Z_OBJCE_P(object)->name));
@@ -3819,16 +3851,16 @@ ZEND_API void zend_update_property_ex(zend_class_entry *scope, zval *object, zen
ZVAL_STR(&property, name);
Z_OBJ_HT_P(object)->write_property(object, &property, value, NULL);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
}
/* }}} */
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zval *value) /* {{{ */
{
zval property;
- zend_class_entry *old_scope = EG(scope);
+ zend_class_entry *old_scope = EG(fake_scope);
- EG(scope) = scope;
+ EG(fake_scope) = scope;
if (!Z_OBJ_HT_P(object)->write_property) {
zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be updated", name, ZSTR_VAL(Z_OBJCE_P(object)->name));
@@ -3837,7 +3869,7 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const
Z_OBJ_HT_P(object)->write_property(object, &property, value, NULL);
zval_ptr_dtor(&property);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
}
/* }}} */
@@ -3909,12 +3941,12 @@ ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object
ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value) /* {{{ */
{
zval *property;
- zend_class_entry *old_scope = EG(scope);
+ zend_class_entry *old_scope = EG(fake_scope);
zend_string *key = zend_string_init(name, name_length, 0);
- EG(scope) = scope;
+ EG(fake_scope) = scope;
property = zend_std_get_static_property(scope, key, 0);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
zend_string_free(key);
if (!property) {
return FAILURE;
@@ -3923,7 +3955,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na
if (Z_ISREF_P(property)) {
zval_dtor(property);
ZVAL_COPY_VALUE(property, value);
- if (Z_REFCOUNT_P(value) > 0) {
+ if (Z_REFCOUNTED_P(value) && Z_REFCOUNT_P(value) > 0) {
zval_opt_copy_ctor(property);
}
} else {
@@ -4001,22 +4033,33 @@ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const
}
/* }}} */
-ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_bool silent, zval *rv) /* {{{ */
+ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zval *object, zend_string *name, zend_bool silent, zval *rv) /* {{{ */
{
zval property, *value;
- zend_class_entry *old_scope = EG(scope);
+ zend_class_entry *old_scope = EG(fake_scope);
- EG(scope) = scope;
+ EG(fake_scope) = scope;
if (!Z_OBJ_HT_P(object)->read_property) {
zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be read", name, ZSTR_VAL(Z_OBJCE_P(object)->name));
}
- ZVAL_STRINGL(&property, name, name_length);
+ ZVAL_STR(&property, name);
value = Z_OBJ_HT_P(object)->read_property(object, &property, silent?BP_VAR_IS:BP_VAR_R, NULL, rv);
- zval_ptr_dtor(&property);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
+ return value;
+}
+/* }}} */
+
+ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_bool silent, zval *rv) /* {{{ */
+{
+ zval *value;
+ zend_string *str;
+
+ str = zend_string_init(name, name_length, 0);
+ value = zend_read_property_ex(scope, object, str, silent, rv);
+ zend_string_release(str);
return value;
}
/* }}} */
@@ -4024,12 +4067,12 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const c
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent) /* {{{ */
{
zval *property;
- zend_class_entry *old_scope = EG(scope);
+ zend_class_entry *old_scope = EG(fake_scope);
zend_string *key = zend_string_init(name, name_length, 0);
- EG(scope) = scope;
+ EG(fake_scope) = scope;
property = zend_std_get_static_property(scope, key, silent);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
zend_string_free(key);
return property;
@@ -4106,8 +4149,7 @@ ZEND_API zend_string* zend_find_alias_name(zend_class_entry *ce, zend_string *na
if ((alias_ptr = ce->trait_aliases)) {
alias = *alias_ptr;
while (alias) {
- if (ZSTR_LEN(alias->alias) == ZSTR_LEN(name) &&
- !strncasecmp(ZSTR_VAL(name), ZSTR_VAL(alias->alias), ZSTR_LEN(alias->alias))) {
+ if (alias->alias && zend_string_equals_ci(alias->alias, name)) {
return alias->alias;
}
alias_ptr++;
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index df006e3396..85ae8b91d4 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,6 +15,7 @@
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
| Andrei Zmievski <andrei@php.net> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -42,9 +43,7 @@ typedef struct _zend_function_entry {
typedef struct _zend_fcall_info {
size_t size;
- HashTable *function_table;
zval function_name;
- zend_array *symbol_table;
zval *retval;
zval *params;
zend_object *object;
@@ -158,6 +157,8 @@ typedef struct _zend_fcall_info_cache {
extern ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
ts_allocate_id(&module_name##_globals_id, sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
+#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) ZEND_TSRMG(module_name##_globals_id, zend_##module_name##_globals *, v)
+#define ZEND_MODULE_GLOBALS_BULK(module_name) TSRMG_BULK(module_name##_globals_id, zend_##module_name##_globals *)
#else
@@ -167,6 +168,8 @@ typedef struct _zend_fcall_info_cache {
extern zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
globals_ctor(&module_name##_globals);
+#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) (module_name##_globals.v)
+#define ZEND_MODULE_GLOBALS_BULK(module_name) (&module_name##_globals)
#endif
@@ -247,12 +250,12 @@ ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array
/* internal function to efficiently copy parameters when executing __call() */
ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array);
-#define zend_get_parameters_array(ht, param_count, argument_array) \
+#define zend_get_parameters_array(ht, param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array)
-#define zend_get_parameters_array_ex(param_count, argument_array) \
+#define zend_get_parameters_array_ex(param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array)
-#define zend_parse_parameters_none() \
- zend_parse_parameters(ZEND_NUM_ARGS(), "")
+#define zend_parse_parameters_none() \
+ (EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : zend_parse_parameters(ZEND_NUM_ARGS(), ""))
/* Parameter parsing API -- andrei */
@@ -296,7 +299,7 @@ ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zen
ZEND_API int zend_disable_function(char *function_name, size_t function_name_length);
ZEND_API int zend_disable_class(char *class_name, size_t class_name_length);
-ZEND_API void zend_wrong_param_count(void);
+ZEND_API ZEND_COLD void zend_wrong_param_count(void);
#define IS_CALLABLE_CHECK_SYNTAX_ONLY (1<<0)
#define IS_CALLABLE_CHECK_NO_ACCESS (1<<1)
@@ -319,6 +322,7 @@ ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name
ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type);
ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type);
+ZEND_API int zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment);
ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value);
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length);
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value);
@@ -347,13 +351,14 @@ ZEND_API int zend_update_static_property_double(zend_class_entry *scope, const c
ZEND_API int zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value);
ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_length);
+ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zval *object, zend_string *name, zend_bool silent, zval *rv);
ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_bool silent, zval *rv);
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, zend_bool silent);
ZEND_API char *zend_get_type_by_const(int type);
-#define getThis() (Z_OBJ(EX(This)) ? &EX(This) : NULL)
+#define getThis() ((Z_TYPE(EX(This)) == IS_OBJECT) ? &EX(This) : NULL)
#define ZEND_IS_METHOD_CALL() (EX(func)->common.scope != NULL)
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
@@ -382,9 +387,6 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties);
-/* no longer supported */
-ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
-
ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n);
ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len);
ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b);
@@ -466,16 +468,19 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zv
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key), __value)
-ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);
-ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table);
+ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation);
+
+#define call_user_function(function_table, object, function_name, retval_ptr, param_count, params) \
+ _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
+#define call_user_function_ex(function_table, object, function_name, retval_ptr, param_count, params, no_separation, symbol_table) \
+ _call_user_function_ex(object, function_name, retval_ptr, param_count, params, no_separation)
ZEND_API extern const zend_fcall_info empty_fcall_info;
ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
/** Build zend_call_info/cache from a zval*
*
- * Caller is responsible to provide a return value, otherwise the we will crash.
- * fci->retval_ptr_ptr = NULL;
+ * Caller is responsible to provide a return value (fci->retval), otherwise the we will crash.
* In order to pass parameters the following members need to be set:
* fci->param_count = 0;
* fci->params = NULL;
@@ -538,6 +543,7 @@ ZEND_API void zend_attach_symbol_table(zend_execute_data *execute_data);
ZEND_API void zend_detach_symbol_table(zend_execute_data *execute_data);
ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force);
ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, int force);
+ZEND_API int zend_forbid_dynamic_call(const char *func_name);
ZEND_API zend_string *zend_find_alias_name(zend_class_entry *ce, zend_string *name);
ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f);
@@ -690,10 +696,10 @@ typedef enum _zend_expected_type {
Z_EXPECTED_LAST
} zend_expected_type;
-ZEND_API void ZEND_FASTCALL zend_wrong_paramers_count_error(int num_args, int min_num_args, int max_num_args);
-ZEND_API void ZEND_FASTCALL zend_wrong_paramer_type_error(int num, zend_expected_type expected_type, zval *arg);
-ZEND_API void ZEND_FASTCALL zend_wrong_paramer_class_error(int num, char *name, zval *arg);
-ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, char *error);
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int num_args, int min_num_args, int max_num_args);
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg);
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, char *name, zval *arg);
+ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, char *error);
#define ZPP_ERROR_OK 0
#define ZPP_ERROR_FAILURE 1
@@ -727,7 +733,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
(UNEXPECTED(_num_args > _max_num_args) && \
EXPECTED(_max_num_args >= 0))) { \
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
- zend_wrong_paramers_count_error(_num_args, _min_num_args, _max_num_args); \
+ zend_wrong_parameters_count_error(_num_args, _min_num_args, _max_num_args); \
} \
error_code = ZPP_ERROR_FAILURE; \
break; \
@@ -745,9 +751,9 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
if (error_code == ZPP_ERROR_WRONG_CALLBACK) { \
zend_wrong_callback_error(E_WARNING, _i, _error); \
} else if (error_code == ZPP_ERROR_WRONG_CLASS) { \
- zend_wrong_paramer_class_error(_i, _error, _arg); \
+ zend_wrong_parameter_class_error(_i, _error, _arg); \
} else if (error_code == ZPP_ERROR_WRONG_ARG) { \
- zend_wrong_paramer_type_error(_i, _expected_type, _arg); \
+ zend_wrong_parameter_type_error(_i, _expected_type, _arg); \
} \
} \
failure; \
@@ -856,7 +862,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
/* old "h" */
#define Z_PARAM_ARRAY_HT_EX(dest, check_null, separate) \
Z_PARAM_PROLOGUE(separate); \
- if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 0))) { \
+ if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 0, separate))) { \
_expected_type = Z_EXPECTED_ARRAY; \
error_code = ZPP_ERROR_WRONG_ARG; \
break; \
@@ -868,7 +874,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
/* old "H" */
#define Z_PARAM_ARRAY_OR_OBJECT_HT_EX(dest, check_null, separate) \
Z_PARAM_PROLOGUE(separate); \
- if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 1))) { \
+ if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 1, separate))) { \
_expected_type = Z_EXPECTED_ARRAY; \
error_code = ZPP_ERROR_WRONG_ARG; \
break; \
@@ -1171,11 +1177,19 @@ static zend_always_inline int zend_parse_arg_array(zval *arg, zval **dest, int c
return 1;
}
-static zend_always_inline int zend_parse_arg_array_ht(zval *arg, HashTable **dest, int check_null, int or_object)
+static zend_always_inline int zend_parse_arg_array_ht(zval *arg, HashTable **dest, int check_null, int or_object, int separate)
{
if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) {
*dest = Z_ARRVAL_P(arg);
} else if (or_object && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
+ if (separate
+ && Z_OBJ_P(arg)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(arg)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(arg)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(arg)->properties)--;
+ }
+ Z_OBJ_P(arg)->properties = zend_array_dup(Z_OBJ_P(arg)->properties);
+ }
*dest = Z_OBJ_HT_P(arg)->get_properties(arg);
} else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) {
*dest = NULL;
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index f788737bf4..a7e3808e7c 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -58,6 +58,7 @@
#include "zend_globals.h"
#include "zend_operators.h"
#include "zend_multiply.h"
+#include "zend_bitset.h"
#ifdef HAVE_SIGNAL_H
# include <signal.h>
@@ -149,8 +150,6 @@ typedef zend_ulong zend_mm_bitset; /* 4-byte or 8-byte integer */
(((size_t)(size)) & ((alignment) - 1))
#define ZEND_MM_ALIGNED_BASE(size, alignment) \
(((size_t)(size)) & ~((alignment) - 1))
-#define ZEND_MM_ALIGNED_SIZE_EX(size, alignment) \
- (((size_t)(size) + ((alignment) - 1)) & ~((alignment) - 1))
#define ZEND_MM_SIZE_TO_NUM(size, alignment) \
(((size_t)(size) + ((alignment) - 1)) / (alignment))
@@ -169,12 +168,22 @@ typedef zend_mm_bitset zend_mm_page_map[ZEND_MM_PAGE_MAP_LEN]; /* 64B */
#define ZEND_MM_SRUN_BIN_NUM_MASK 0x0000001f
#define ZEND_MM_SRUN_BIN_NUM_OFFSET 0
+#define ZEND_MM_SRUN_FREE_COUNTER_MASK 0x01ff0000
+#define ZEND_MM_SRUN_FREE_COUNTER_OFFSET 16
+
+#define ZEND_MM_NRUN_OFFSET_MASK 0x01ff0000
+#define ZEND_MM_NRUN_OFFSET_OFFSET 16
+
#define ZEND_MM_LRUN_PAGES(info) (((info) & ZEND_MM_LRUN_PAGES_MASK) >> ZEND_MM_LRUN_PAGES_OFFSET)
#define ZEND_MM_SRUN_BIN_NUM(info) (((info) & ZEND_MM_SRUN_BIN_NUM_MASK) >> ZEND_MM_SRUN_BIN_NUM_OFFSET)
+#define ZEND_MM_SRUN_FREE_COUNTER(info) (((info) & ZEND_MM_SRUN_FREE_COUNTER_MASK) >> ZEND_MM_SRUN_FREE_COUNTER_OFFSET)
+#define ZEND_MM_NRUN_OFFSET(info) (((info) & ZEND_MM_NRUN_OFFSET_MASK) >> ZEND_MM_NRUN_OFFSET_OFFSET)
#define ZEND_MM_FRUN() ZEND_MM_IS_FRUN
#define ZEND_MM_LRUN(count) (ZEND_MM_IS_LRUN | ((count) << ZEND_MM_LRUN_PAGES_OFFSET))
#define ZEND_MM_SRUN(bin_num) (ZEND_MM_IS_SRUN | ((bin_num) << ZEND_MM_SRUN_BIN_NUM_OFFSET))
+#define ZEND_MM_SRUN_EX(bin_num, count) (ZEND_MM_IS_SRUN | ((bin_num) << ZEND_MM_SRUN_BIN_NUM_OFFSET) | ((count) << ZEND_MM_SRUN_FREE_COUNTER_OFFSET))
+#define ZEND_MM_NRUN(bin_num, offset) (ZEND_MM_IS_SRUN | ZEND_MM_IS_LRUN | ((bin_num) << ZEND_MM_SRUN_BIN_NUM_OFFSET) | ((offset) << ZEND_MM_NRUN_OFFSET_OFFSET))
#define ZEND_MM_BINS 30
@@ -192,6 +201,10 @@ typedef struct _zend_mm_huge_list zend_mm_huge_list;
# define PTR_FMT "0x%0.8lx"
#endif
+#ifdef MAP_HUGETLB
+int zend_mm_use_huge_pages = 0;
+#endif
+
/*
* Memory is retrived from OS by chunks of fixed size 2MB.
* Inside chunk it's managed by pages of fixed size 4096B.
@@ -256,9 +269,18 @@ struct _zend_mm_heap {
int cached_chunks_count; /* number of cached chunks */
double avg_chunks_count; /* average number of chunks allocated per request */
#if ZEND_MM_CUSTOM
- void *(*_malloc)(size_t);
- void (*_free)(void*);
- void *(*_realloc)(void*, size_t);
+ union {
+ struct {
+ void *(*_malloc)(size_t);
+ void (*_free)(void*);
+ void *(*_realloc)(void*, size_t);
+ } std;
+ struct {
+ void *(*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+ void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+ void *(*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+ } debug;
+ } custom_heap;
#endif
};
@@ -319,7 +341,7 @@ static const int bin_pages[] = {
};
#if ZEND_DEBUG
-void zend_debug_alloc_output(char *format, ...)
+ZEND_COLD void zend_debug_alloc_output(char *format, ...)
{
char output_buf[256];
va_list args;
@@ -336,11 +358,11 @@ void zend_debug_alloc_output(char *format, ...)
}
#endif
-static ZEND_NORETURN void zend_mm_panic(const char *message)
+static ZEND_COLD ZEND_NORETURN void zend_mm_panic(const char *message)
{
fprintf(stderr, "%s\n", message);
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
@@ -349,7 +371,7 @@ static ZEND_NORETURN void zend_mm_panic(const char *message)
exit(1);
}
-static ZEND_NORETURN void zend_mm_safe_error(zend_mm_heap *heap,
+static ZEND_COLD ZEND_NORETURN void zend_mm_safe_error(zend_mm_heap *heap,
const char *format,
size_t limit,
#if ZEND_DEBUG
@@ -442,7 +464,18 @@ static void *zend_mm_mmap(size_t size)
}
return ptr;
#else
- void *ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON /*| MAP_POPULATE | MAP_HUGETLB*/, -1, 0);
+ void *ptr;
+
+#ifdef MAP_HUGETLB
+ if (zend_mm_use_huge_pages && size == ZEND_MM_CHUNK_SIZE) {
+ ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_HUGETLB, -1, 0);
+ if (ptr != MAP_FAILED) {
+ return ptr;
+ }
+ }
+#endif
+
+ ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
if (ptr == MAP_FAILED) {
#if ZEND_MM_ERROR
@@ -478,9 +511,9 @@ static void zend_mm_munmap(void *addr, size_t size)
/* number of trailing set (1) bits */
static zend_always_inline int zend_mm_bitset_nts(zend_mm_bitset bitset)
{
-#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) && SIZEOF_ZEND_LONG == SIZEOF_LONG
+#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL)
return __builtin_ctzl(~bitset);
-#elif defined(__GNUC__) || __has_builtin(__builtin_ctzll)
+#elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL)
return __builtin_ctzll(~bitset);
#elif defined(_WIN32)
unsigned long index;
@@ -514,45 +547,6 @@ static zend_always_inline int zend_mm_bitset_nts(zend_mm_bitset bitset)
#endif
}
-/* number of trailing zero bits (0x01 -> 1; 0x40 -> 6; 0x00 -> LEN) */
-static zend_always_inline int zend_mm_bitset_ntz(zend_mm_bitset bitset)
-{
-#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) && SIZEOF_ZEND_LONG == SIZEOF_LONG
- return __builtin_ctzl(bitset);
-#elif defined(__GNUC__) || __has_builtin(__builtin_ctzll)
- return __builtin_ctzll(bitset);
-#elif defined(_WIN32)
- unsigned long index;
-
-#if defined(_WIN64)
- if (!BitScanForward64(&index, bitset)) {
-#else
- if (!BitScanForward(&index, bitset)) {
-#endif
- /* undefined behavior */
- return 32;
- }
-
- return (int)index;
-#else
- int n;
-
- if (bitset == (zend_mm_bitset)0) return ZEND_MM_BITSET_LEN;
-
- n = 1;
-#if SIZEOF_ZEND_LONG == 8
- if (sizeof(zend_mm_bitset) == 8) {
- if ((bitset & 0xffffffff) == 0) {n += 32; bitset = bitset >> Z_UL(32);}
- }
-#endif
- if ((bitset & 0x0000ffff) == 0) {n += 16; bitset = bitset >> 16;}
- if ((bitset & 0x000000ff) == 0) {n += 8; bitset = bitset >> 8;}
- if ((bitset & 0x0000000f) == 0) {n += 4; bitset = bitset >> 4;}
- if ((bitset & 0x00000003) == 0) {n += 2; bitset = bitset >> 2;}
- return n - (bitset & 1);
-#endif
-}
-
static zend_always_inline int zend_mm_bitset_find_zero(zend_mm_bitset *bitset, int size)
{
int i = 0;
@@ -574,7 +568,7 @@ static zend_always_inline int zend_mm_bitset_find_one(zend_mm_bitset *bitset, in
do {
zend_mm_bitset tmp = bitset[i];
if (tmp != 0) {
- return i * ZEND_MM_BITSET_LEN + zend_mm_bitset_ntz(tmp);
+ return i * ZEND_MM_BITSET_LEN + zend_ulong_ntz(tmp);
}
i++;
} while (i < size);
@@ -909,7 +903,7 @@ static void *zend_mm_alloc_pages(zend_mm_heap *heap, int pages_count ZEND_FILE_L
tmp = *(bitset++);
}
/* find first 1 bit */
- len = (i + zend_mm_bitset_ntz(tmp)) - page_num;
+ len = (i + zend_ulong_ntz(tmp)) - page_num;
if (len >= pages_count) {
goto found;
}
@@ -947,7 +941,7 @@ static void *zend_mm_alloc_pages(zend_mm_heap *heap, int pages_count ZEND_FILE_L
/* skip free blocks */
while (tmp == 0) {
i += ZEND_MM_BITSET_LEN;
- if (i >= free_tail) {
+ if (i >= free_tail || i == ZEND_MM_PAGES) {
len = ZEND_MM_PAGES - page_num;
if (len >= pages_count && len < best_len) {
chunk->free_tail = page_num + pages_count;
@@ -966,7 +960,7 @@ static void *zend_mm_alloc_pages(zend_mm_heap *heap, int pages_count ZEND_FILE_L
tmp = *(bitset++);
}
/* find first 1 bit */
- len = i + zend_mm_bitset_ntz(tmp) - page_num;
+ len = i + zend_ulong_ntz(tmp) - page_num;
if (len >= pages_count) {
if (len == pages_count) {
goto found;
@@ -982,14 +976,17 @@ static void *zend_mm_alloc_pages(zend_mm_heap *heap, int pages_count ZEND_FILE_L
not_found:
if (chunk->next == heap->main_chunk) {
+get_chunk:
if (heap->cached_chunks) {
heap->cached_chunks_count--;
chunk = heap->cached_chunks;
heap->cached_chunks = chunk->next;
} else {
#if ZEND_MM_LIMIT
- if (heap->real_size + ZEND_MM_CHUNK_SIZE > heap->limit) {
- if (heap->overflow == 0) {
+ if (UNEXPECTED(heap->real_size + ZEND_MM_CHUNK_SIZE > heap->limit)) {
+ if (zend_mm_gc(heap)) {
+ goto get_chunk;
+ } else if (heap->overflow == 0) {
#if ZEND_DEBUG
zend_mm_safe_error(heap, "Allowed memory size of %zu bytes exhausted at %s:%d (tried to allocate %zu bytes)", heap->limit, __zend_filename, __zend_lineno, size);
#else
@@ -1002,14 +999,19 @@ not_found:
chunk = (zend_mm_chunk*)zend_mm_chunk_alloc(heap, ZEND_MM_CHUNK_SIZE, ZEND_MM_CHUNK_SIZE);
if (UNEXPECTED(chunk == NULL)) {
/* insufficient memory */
+ if (zend_mm_gc(heap) &&
+ (chunk = (zend_mm_chunk*)zend_mm_chunk_alloc(heap, ZEND_MM_CHUNK_SIZE, ZEND_MM_CHUNK_SIZE)) != NULL) {
+ /* pass */
+ } else {
#if !ZEND_MM_LIMIT
- zend_mm_safe_error(heap, "Out of memory");
+ zend_mm_safe_error(heap, "Out of memory");
#elif ZEND_DEBUG
- zend_mm_safe_error(heap, "Out of memory (allocated %zu) at %s:%d (tried to allocate %zu bytes)", heap->real_size, __zend_filename, __zend_lineno, size);
+ zend_mm_safe_error(heap, "Out of memory (allocated %zu) at %s:%d (tried to allocate %zu bytes)", heap->real_size, __zend_filename, __zend_lineno, size);
#else
- zend_mm_safe_error(heap, "Out of memory (allocated %zu) (tried to allocate %zu bytes)", heap->real_size, ZEND_MM_PAGE_SIZE * pages_count);
+ zend_mm_safe_error(heap, "Out of memory (allocated %zu) (tried to allocate %zu bytes)", heap->real_size, ZEND_MM_PAGE_SIZE * pages_count);
#endif
- return NULL;
+ return NULL;
+ }
}
#if ZEND_MM_STAT
do {
@@ -1066,7 +1068,32 @@ static zend_always_inline void *zend_mm_alloc_large(zend_mm_heap *heap, size_t s
return ptr;
}
-static void zend_mm_free_pages(zend_mm_heap *heap, zend_mm_chunk *chunk, int page_num, int pages_count)
+static zend_always_inline void zend_mm_delete_chunk(zend_mm_heap *heap, zend_mm_chunk *chunk)
+{
+ chunk->next->prev = chunk->prev;
+ chunk->prev->next = chunk->next;
+ heap->chunks_count--;
+ if (heap->chunks_count + heap->cached_chunks_count < heap->avg_chunks_count + 0.1) {
+ /* delay deletion */
+ heap->cached_chunks_count++;
+ chunk->next = heap->cached_chunks;
+ heap->cached_chunks = chunk;
+ } else {
+#if ZEND_MM_STAT || ZEND_MM_LIMIT
+ heap->real_size -= ZEND_MM_CHUNK_SIZE;
+#endif
+ if (!heap->cached_chunks || chunk->num > heap->cached_chunks->num) {
+ zend_mm_chunk_free(heap, chunk, ZEND_MM_CHUNK_SIZE);
+ } else {
+//TODO: select the best chunk to delete???
+ chunk->next = heap->cached_chunks->next;
+ zend_mm_chunk_free(heap, heap->cached_chunks, ZEND_MM_CHUNK_SIZE);
+ heap->cached_chunks = chunk;
+ }
+ }
+}
+
+static zend_always_inline void zend_mm_free_pages_ex(zend_mm_heap *heap, zend_mm_chunk *chunk, int page_num, int pages_count, int free_chunk)
{
chunk->free_pages += pages_count;
zend_mm_bitset_reset_range(chunk->free_map, page_num, pages_count);
@@ -1075,32 +1102,16 @@ static void zend_mm_free_pages(zend_mm_heap *heap, zend_mm_chunk *chunk, int pag
/* this setting may be not accurate */
chunk->free_tail = page_num;
}
- if (chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE) {
- /* delete chunk */
- chunk->next->prev = chunk->prev;
- chunk->prev->next = chunk->next;
- heap->chunks_count--;
- if (heap->chunks_count + heap->cached_chunks_count < heap->avg_chunks_count + 0.1) {
- /* delay deletion */
- heap->cached_chunks_count++;
- chunk->next = heap->cached_chunks;
- heap->cached_chunks = chunk;
- } else {
-#if ZEND_MM_STAT || ZEND_MM_LIMIT
- heap->real_size -= ZEND_MM_CHUNK_SIZE;
-#endif
- if (!heap->cached_chunks || chunk->num > heap->cached_chunks->num) {
- zend_mm_chunk_free(heap, chunk, ZEND_MM_CHUNK_SIZE);
- } else {
-//TODO: select the best chunk to delete???
- chunk->next = heap->cached_chunks->next;
- zend_mm_chunk_free(heap, heap->cached_chunks, ZEND_MM_CHUNK_SIZE);
- heap->cached_chunks = chunk;
- }
- }
+ if (free_chunk && chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE) {
+ zend_mm_delete_chunk(heap, chunk);
}
}
+static void zend_mm_free_pages(zend_mm_heap *heap, zend_mm_chunk *chunk, int page_num, int pages_count)
+{
+ zend_mm_free_pages_ex(heap, chunk, page_num, pages_count, 1);
+}
+
static zend_always_inline void zend_mm_free_large(zend_mm_heap *heap, zend_mm_chunk *chunk, int page_num, int pages_count)
{
#if ZEND_MM_STAT
@@ -1116,7 +1127,7 @@ static zend_always_inline void zend_mm_free_large(zend_mm_heap *heap, zend_mm_ch
/* higher set bit number (0->N/A, 1->1, 2->2, 4->3, 8->4, 127->7, 128->8 etc) */
static zend_always_inline int zend_mm_small_size_to_bit(int size)
{
-#if defined(__GNUC__) || __has_builtin(__builtin_clz)
+#if (defined(__GNUC__) || __has_builtin(__builtin_clz)) && defined(PHP_HAVE_BUILTIN_CLZ)
return (__builtin_clz(size) ^ 0x1f) + 1;
#elif defined(_WIN32)
unsigned long index;
@@ -1157,17 +1168,19 @@ static zend_always_inline int zend_mm_small_size_to_bin(size_t size)
n = zend_mm_small_size_to_bit(size - 1);
return ((size-1) >> f1[n]) + f2[n];
#else
- int t1, t2, t3;
+ unsigned int t1, t2;
- if (UNEXPECTED(size <= 8)) return 0;
- t1 = (int)(size - 1);
- t2 = zend_mm_small_size_to_bit(t1);
- t3 = t2 - 6;
- t3 = (t3 < 0) ? 0 : t3;
- t2 = t3 + 3;
- t1 = t1 >> t2;
- t3 = t3 << 2;
- return t1 + t3;
+ if (size <= 64) {
+ /* we need to support size == 0 ... */
+ return (size - !!size) >> 3;
+ } else {
+ t1 = size - 1;
+ t2 = zend_mm_small_size_to_bit(t1) - 3;
+ t1 = t1 >> t2;
+ t2 = t2 - 3;
+ t2 = t2 << 2;
+ return (int)(t1 + t2);
+ }
#endif
}
@@ -1196,7 +1209,7 @@ static zend_never_inline void *zend_mm_alloc_small_slow(zend_mm_heap *heap, int
if (bin_pages[bin_num] > 1) {
int i = 1;
do {
- chunk->map[page_num+i] = ZEND_MM_SRUN(bin_num);
+ chunk->map[page_num+i] = ZEND_MM_NRUN(bin_num, i);
i++;
} while (i < bin_pages[bin_num]);
}
@@ -1306,6 +1319,10 @@ static zend_always_inline void *zend_mm_alloc_heap(zend_mm_heap *heap, size_t si
/* special handling for zero-size allocation */
size = MAX(size, 1);
size = ZEND_MM_ALIGNED_SIZE(size) + ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info));
+ if (UNEXPECTED(size < real_size)) {
+ zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu + %zu)", ZEND_MM_ALIGNED_SIZE(real_size), ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info)));
+ return NULL;
+ }
#endif
if (size <= ZEND_MM_MAX_SMALL_SIZE) {
ptr = zend_mm_alloc_small(heap, size, ZEND_MM_SMALL_SIZE_TO_BIN(size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -1415,7 +1432,15 @@ static void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, si
#if ZEND_DEBUG
size = real_size;
#endif
+#ifdef ZEND_WIN32
+ /* On Windows we don't have ability to extend huge blocks in-place.
+ * We allocate them with 2MB size granularity, to avoid many
+ * reallocations when they are extended by small pieces
+ */
+ new_size = ZEND_MM_ALIGNED_SIZE_EX(size, MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE));
+#else
new_size = ZEND_MM_ALIGNED_SIZE_EX(size, REAL_PAGE_SIZE);
+#endif
if (new_size == old_size) {
#if ZEND_DEBUG
zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -1441,8 +1466,10 @@ static void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, si
}
} else /* if (new_size > old_size) */ {
#if ZEND_MM_LIMIT
- if (heap->real_size + (new_size - old_size) > heap->limit) {
- if (heap->overflow == 0) {
+ if (UNEXPECTED(heap->real_size + (new_size - old_size) > heap->limit)) {
+ if (zend_mm_gc(heap) && heap->real_size + (new_size - old_size) <= heap->limit) {
+ /* pass */
+ } else if (heap->overflow == 0) {
#if ZEND_DEBUG
zend_mm_safe_error(heap, "Allowed memory size of %zu bytes exhausted at %s:%d (tried to allocate %zu bytes)", heap->limit, __zend_filename, __zend_lineno, size);
#else
@@ -1458,7 +1485,9 @@ static void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, si
heap->real_size += new_size - old_size;
#endif
#if ZEND_MM_STAT
+ heap->real_peak = MAX(heap->real_peak, heap->real_size);
heap->size += new_size - old_size;
+ heap->peak = MAX(heap->peak, heap->size);
#endif
#if ZEND_DEBUG
zend_mm_change_huge_block_size(heap, ptr, new_size, real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -1569,9 +1598,19 @@ static void *zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, si
}
/* Naive reallocation */
+#if ZEND_MM_STAT
+ do {
+ size_t orig_peak = heap->peak;
+ size_t orig_real_peak = heap->real_peak;
+#endif
ret = zend_mm_alloc_heap(heap, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
memcpy(ret, ptr, MIN(old_size, copy_size));
zend_mm_free_heap(heap, ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+#if ZEND_MM_STAT
+ heap->peak = MAX(orig_peak, heap->size);
+ heap->real_peak = MAX(orig_real_peak, heap->real_size);
+ } while (0);
+#endif
return ret;
}
@@ -1661,12 +1700,22 @@ static void zend_mm_change_huge_block_size(zend_mm_heap *heap, void *ptr, size_t
static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
+#ifdef ZEND_WIN32
+ /* On Windows we don't have ability to extend huge blocks in-place.
+ * We allocate them with 2MB size granularity, to avoid many
+ * reallocations when they are extended by small pieces
+ */
+ size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, MAX(REAL_PAGE_SIZE, ZEND_MM_CHUNK_SIZE));
+#else
size_t new_size = ZEND_MM_ALIGNED_SIZE_EX(size, REAL_PAGE_SIZE);
+#endif
void *ptr;
#if ZEND_MM_LIMIT
- if (heap->real_size + new_size > heap->limit) {
- if (heap->overflow == 0) {
+ if (UNEXPECTED(heap->real_size + new_size > heap->limit)) {
+ if (zend_mm_gc(heap) && heap->real_size + new_size <= heap->limit) {
+ /* pass */
+ } else if (heap->overflow == 0) {
#if ZEND_DEBUG
zend_mm_safe_error(heap, "Allowed memory size of %zu bytes exhausted at %s:%d (tried to allocate %zu bytes)", heap->limit, __zend_filename, __zend_lineno, size);
#else
@@ -1679,14 +1728,19 @@ static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
ptr = zend_mm_chunk_alloc(heap, new_size, ZEND_MM_CHUNK_SIZE);
if (UNEXPECTED(ptr == NULL)) {
/* insufficient memory */
+ if (zend_mm_gc(heap) &&
+ (ptr = zend_mm_chunk_alloc(heap, new_size, ZEND_MM_CHUNK_SIZE)) != NULL) {
+ /* pass */
+ } else {
#if !ZEND_MM_LIMIT
- zend_mm_safe_error(heap, "Out of memory");
+ zend_mm_safe_error(heap, "Out of memory");
#elif ZEND_DEBUG
- zend_mm_safe_error(heap, "Out of memory (allocated %zu) at %s:%d (tried to allocate %zu bytes)", heap->real_size, __zend_filename, __zend_lineno, size);
+ zend_mm_safe_error(heap, "Out of memory (allocated %zu) at %s:%d (tried to allocate %zu bytes)", heap->real_size, __zend_filename, __zend_lineno, size);
#else
- zend_mm_safe_error(heap, "Out of memory (allocated %zu) (tried to allocate %zu bytes)", heap->real_size, size);
+ zend_mm_safe_error(heap, "Out of memory (allocated %zu) (tried to allocate %zu bytes)", heap->real_size, size);
#endif
- return NULL;
+ return NULL;
+ }
}
#if ZEND_DEBUG
zend_mm_add_huge_block(heap, ptr, new_size, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -1770,11 +1824,11 @@ static zend_mm_heap *zend_mm_init(void)
heap->peak = 0;
#endif
#if ZEND_MM_LIMIT
- heap->limit = (Z_L(-1) >> Z_L(1));
+ heap->limit = ((size_t)Z_L(-1) >> (size_t)Z_L(1));
heap->overflow = 0;
#endif
#if ZEND_MM_CUSTOM
- heap->use_custom_heap = 0;
+ heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_NONE;
#endif
#if ZEND_MM_STORAGE
heap->storage = NULL;
@@ -1783,6 +1837,119 @@ static zend_mm_heap *zend_mm_init(void)
return heap;
}
+ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
+{
+ zend_mm_free_slot *p, **q;
+ zend_mm_chunk *chunk;
+ size_t page_offset;
+ int page_num;
+ zend_mm_page_info info;
+ int i, has_free_pages, free_counter;
+ size_t collected = 0;
+
+#if ZEND_MM_CUSTOM
+ if (heap->use_custom_heap) {
+ return 0;
+ }
+#endif
+
+ for (i = 0; i < ZEND_MM_BINS; i++) {
+ has_free_pages = 0;
+ p = heap->free_slot[i];
+ while (p != NULL) {
+ chunk = (zend_mm_chunk*)ZEND_MM_ALIGNED_BASE(p, ZEND_MM_CHUNK_SIZE);
+ ZEND_MM_CHECK(chunk->heap == heap, "zend_mm_heap corrupted");
+ page_offset = ZEND_MM_ALIGNED_OFFSET(p, ZEND_MM_CHUNK_SIZE);
+ ZEND_ASSERT(page_offset != 0);
+ page_num = (int)(page_offset / ZEND_MM_PAGE_SIZE);
+ info = chunk->map[page_num];
+ ZEND_ASSERT(info & ZEND_MM_IS_SRUN);
+ if (info & ZEND_MM_IS_LRUN) {
+ page_num -= ZEND_MM_NRUN_OFFSET(info);
+ info = chunk->map[page_num];
+ ZEND_ASSERT(info & ZEND_MM_IS_SRUN);
+ ZEND_ASSERT(!(info & ZEND_MM_IS_LRUN));
+ }
+ ZEND_ASSERT(ZEND_MM_SRUN_BIN_NUM(info) == i);
+ free_counter = ZEND_MM_SRUN_FREE_COUNTER(info) + 1;
+ if (free_counter == bin_elements[i]) {
+ has_free_pages = 1;
+ }
+ chunk->map[page_num] = ZEND_MM_SRUN_EX(i, free_counter);;
+ p = p->next_free_slot;
+ }
+
+ if (!has_free_pages) {
+ continue;
+ }
+
+ q = &heap->free_slot[i];
+ p = *q;
+ while (p != NULL) {
+ chunk = (zend_mm_chunk*)ZEND_MM_ALIGNED_BASE(p, ZEND_MM_CHUNK_SIZE);
+ ZEND_MM_CHECK(chunk->heap == heap, "zend_mm_heap corrupted");
+ page_offset = ZEND_MM_ALIGNED_OFFSET(p, ZEND_MM_CHUNK_SIZE);
+ ZEND_ASSERT(page_offset != 0);
+ page_num = (int)(page_offset / ZEND_MM_PAGE_SIZE);
+ info = chunk->map[page_num];
+ ZEND_ASSERT(info & ZEND_MM_IS_SRUN);
+ if (info & ZEND_MM_IS_LRUN) {
+ page_num -= ZEND_MM_NRUN_OFFSET(info);
+ info = chunk->map[page_num];
+ ZEND_ASSERT(info & ZEND_MM_IS_SRUN);
+ ZEND_ASSERT(!(info & ZEND_MM_IS_LRUN));
+ }
+ ZEND_ASSERT(ZEND_MM_SRUN_BIN_NUM(info) == i);
+ if (ZEND_MM_SRUN_FREE_COUNTER(info) == bin_elements[i]) {
+ /* remove from cache */
+ p = p->next_free_slot;;
+ *q = p;
+ } else {
+ q = &p->next_free_slot;
+ p = *q;
+ }
+ }
+ }
+
+ chunk = heap->main_chunk;
+ do {
+ i = ZEND_MM_FIRST_PAGE;
+ while (i < chunk->free_tail) {
+ if (zend_mm_bitset_is_set(chunk->free_map, i)) {
+ info = chunk->map[i];
+ if (info & ZEND_MM_IS_SRUN) {
+ int bin_num = ZEND_MM_SRUN_BIN_NUM(info);
+ int pages_count = bin_pages[bin_num];
+
+ if (ZEND_MM_SRUN_FREE_COUNTER(info) == bin_elements[bin_num]) {
+ /* all elemens are free */
+ zend_mm_free_pages_ex(heap, chunk, i, pages_count, 0);
+ collected += pages_count;
+ } else {
+ /* reset counter */
+ chunk->map[i] = ZEND_MM_SRUN(bin_num);
+ }
+ i += bin_pages[bin_num];
+ } else /* if (info & ZEND_MM_IS_LRUN) */ {
+ i += ZEND_MM_LRUN_PAGES(info);
+ }
+ } else {
+ i++;
+ }
+ }
+ if (chunk->free_pages == ZEND_MM_PAGES - ZEND_MM_FIRST_PAGE) {
+ zend_mm_chunk *next_chunk = chunk->next;
+
+ zend_mm_delete_chunk(heap, chunk);
+ chunk = next_chunk;
+ } else {
+ chunk = chunk->next;
+ }
+ } while (chunk != heap->main_chunk);
+
+ return collected * ZEND_MM_PAGE_SIZE;
+}
+
#if ZEND_DEBUG
/******************/
/* Leak detection */
@@ -1845,6 +2012,27 @@ static zend_long zend_mm_find_leaks(zend_mm_heap *heap, zend_mm_chunk *p, int i,
return count;
}
+static zend_long zend_mm_find_leaks_huge(zend_mm_heap *heap, zend_mm_huge_list *list)
+{
+ zend_long count = 0;
+ zend_mm_huge_list *prev = list;
+ zend_mm_huge_list *p = list->next;
+
+ while (p) {
+ if (p->dbg.filename == list->dbg.filename && p->dbg.lineno == list->dbg.lineno) {
+ prev->next = p->next;
+ zend_mm_chunk_free(heap, p->ptr, p->size);
+ zend_mm_free_heap(heap, p, NULL, 0, NULL, 0);
+ count++;
+ } else {
+ prev = p;
+ }
+ p = prev->next;
+ }
+
+ return count;
+}
+
static void zend_mm_check_leaks(zend_mm_heap *heap)
{
zend_mm_huge_list *list;
@@ -1859,8 +2047,6 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
while (list) {
zend_mm_huge_list *q = list;
- heap->huge_list = list->next;
-
leak.addr = list->ptr;
leak.size = list->dbg.size;
leak.filename = list->dbg.filename;
@@ -1870,13 +2056,13 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, &leak);
-//??? repeated = zend_mm_find_leaks_huge(segment, p);
+ repeated = zend_mm_find_leaks_huge(heap, list);
total += 1 + repeated;
if (repeated) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)(zend_uintptr_t)repeated);
}
- list = list->next;
+ heap->huge_list = list = list->next;
zend_mm_chunk_free(heap, q->ptr, q->size);
zend_mm_free_heap(heap, q, NULL, 0, NULL, 0);
}
@@ -1962,7 +2148,11 @@ void zend_mm_shutdown(zend_mm_heap *heap, int full, int silent)
#if ZEND_MM_CUSTOM
if (heap->use_custom_heap) {
if (full) {
- heap->_free(heap);
+ if (ZEND_DEBUG && heap->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) {
+ heap->custom_heap.debug._free(heap ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC);
+ } else {
+ heap->custom_heap.std._free(heap);
+ }
}
return;
}
@@ -1976,6 +2166,7 @@ void zend_mm_shutdown(zend_mm_heap *heap, int full, int silent)
/* free huge blocks */
list = heap->huge_list;
+ heap->huge_list = NULL;
while (list) {
zend_mm_huge_list *q = list;
list = list->next;
@@ -2103,18 +2294,26 @@ ZEND_API int is_zend_mm(void)
#endif
}
-#if !ZEND_DEBUG && !defined(_WIN32)
+#if !ZEND_DEBUG && (!defined(_WIN32) || defined(__clang__))
#undef _emalloc
#if ZEND_MM_CUSTOM
# define ZEND_MM_CUSTOM_ALLOCATOR(size) do { \
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) { \
- return AG(mm_heap)->_malloc(size); \
+ if (ZEND_DEBUG && AG(mm_heap)->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) { \
+ return AG(mm_heap)->custom_heap.debug._malloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); \
+ } else { \
+ return AG(mm_heap)->custom_heap.std._malloc(size); \
+ } \
} \
} while (0)
# define ZEND_MM_CUSTOM_DEALLOCATOR(ptr) do { \
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) { \
- AG(mm_heap)->_free(ptr); \
+ if (ZEND_DEBUG && AG(mm_heap)->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) { \
+ AG(mm_heap)->custom_heap.debug._free(ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); \
+ } else { \
+ AG(mm_heap)->custom_heap.std._free(ptr); \
+ } \
return; \
} \
} while (0)
@@ -2194,7 +2393,6 @@ ZEND_API void ZEND_FASTCALL _efree_huge(void *ptr, size_t size)
{
ZEND_MM_CUSTOM_DEALLOCATOR(ptr);
- // TODO: use size???
zend_mm_free_huge(AG(mm_heap), ptr);
}
#endif
@@ -2204,7 +2402,11 @@ ZEND_API void* ZEND_FASTCALL _emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LI
#if ZEND_MM_CUSTOM
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) {
- return AG(mm_heap)->_malloc(size);
+ if (ZEND_DEBUG && AG(mm_heap)->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) {
+ return AG(mm_heap)->custom_heap.debug._malloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ } else {
+ return AG(mm_heap)->custom_heap.std._malloc(size);
+ }
}
#endif
return zend_mm_alloc_heap(AG(mm_heap), size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -2215,7 +2417,11 @@ ZEND_API void ZEND_FASTCALL _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_OR
#if ZEND_MM_CUSTOM
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) {
- AG(mm_heap)->_free(ptr);
+ if (ZEND_DEBUG && AG(mm_heap)->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) {
+ AG(mm_heap)->custom_heap.debug._free(ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ } else {
+ AG(mm_heap)->custom_heap.std._free(ptr);
+ }
return;
}
#endif
@@ -2226,7 +2432,11 @@ ZEND_API void* ZEND_FASTCALL _erealloc(void *ptr, size_t size ZEND_FILE_LINE_DC
{
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) {
- return AG(mm_heap)->_realloc(ptr, size);
+ if (ZEND_DEBUG && AG(mm_heap)->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) {
+ return AG(mm_heap)->custom_heap.debug._realloc(ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ } else {
+ return AG(mm_heap)->custom_heap.std._realloc(ptr, size);
+ }
}
return zend_mm_realloc_heap(AG(mm_heap), ptr, size, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
@@ -2235,7 +2445,11 @@ ZEND_API void* ZEND_FASTCALL _erealloc2(void *ptr, size_t size, size_t copy_size
{
if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) {
- return AG(mm_heap)->_realloc(ptr, size);
+ if (ZEND_DEBUG && AG(mm_heap)->use_custom_heap == ZEND_MM_CUSTOM_HEAP_DEBUG) {
+ return AG(mm_heap)->custom_heap.debug._realloc(ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ } else {
+ return AG(mm_heap)->custom_heap.std._realloc(ptr, size);
+ }
}
return zend_mm_realloc_heap(AG(mm_heap), ptr, size, copy_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
@@ -2286,15 +2500,11 @@ ZEND_API void* ZEND_FASTCALL _ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_D
{
void *p;
- HANDLE_BLOCK_INTERRUPTIONS();
-
p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (UNEXPECTED(p == NULL)) {
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
memset(p, 0, size * nmemb);
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2303,16 +2513,15 @@ ZEND_API char* ZEND_FASTCALL _estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_
size_t length;
char *p;
- HANDLE_BLOCK_INTERRUPTIONS();
-
length = strlen(s);
- p = (char *) _emalloc(safe_address(length, 1, 1) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ if (UNEXPECTED(length + 1 == 0)) {
+ zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", 1, length, 1);
+ }
+ p = (char *) _emalloc(length + 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (UNEXPECTED(p == NULL)) {
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
memcpy(p, s, length+1);
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2320,16 +2529,15 @@ ZEND_API char* ZEND_FASTCALL _estrndup(const char *s, size_t length ZEND_FILE_LI
{
char *p;
- HANDLE_BLOCK_INTERRUPTIONS();
-
- p = (char *) _emalloc(safe_address(length, 1, 1) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ if (UNEXPECTED(length + 1 == 0)) {
+ zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", 1, length, 1);
+ }
+ p = (char *) _emalloc(length + 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (UNEXPECTED(p == NULL)) {
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
memcpy(p, s, length);
p[length] = 0;
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2338,18 +2546,17 @@ ZEND_API char* ZEND_FASTCALL zend_strndup(const char *s, size_t length)
{
char *p;
- HANDLE_BLOCK_INTERRUPTIONS();
-
- p = (char *) malloc(safe_address(length, 1, 1));
+ if (UNEXPECTED(length + 1 == 0)) {
+ zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", 1, length, 1);
+ }
+ p = (char *) malloc(length + 1);
if (UNEXPECTED(p == NULL)) {
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
- if (length) {
+ if (EXPECTED(length)) {
memcpy(p, s, length);
}
p[length] = 0;
- HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2400,13 +2607,19 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
if (tmp && !zend_atoi(tmp, 0)) {
alloc_globals->mm_heap = malloc(sizeof(zend_mm_heap));
memset(alloc_globals->mm_heap, 0, sizeof(zend_mm_heap));
- alloc_globals->mm_heap->use_custom_heap = 1;
- alloc_globals->mm_heap->_malloc = malloc;
- alloc_globals->mm_heap->_free = free;
- alloc_globals->mm_heap->_realloc = realloc;
+ alloc_globals->mm_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD;
+ alloc_globals->mm_heap->custom_heap.std._malloc = malloc;
+ alloc_globals->mm_heap->custom_heap.std._free = free;
+ alloc_globals->mm_heap->custom_heap.std._realloc = realloc;
return;
}
#endif
+#ifdef MAP_HUGETLB
+ tmp = getenv("USE_ZEND_ALLOC_HUGE_PAGES");
+ if (tmp && zend_atoi(tmp, 0)) {
+ zend_mm_use_huge_pages = 1;
+ }
+#endif
ZEND_TSRMLS_CACHE_UPDATE();
alloc_globals->mm_heap = zend_mm_init();
}
@@ -2443,6 +2656,20 @@ ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap)
return (zend_mm_heap*)old_heap;
}
+ZEND_API zend_mm_heap *zend_mm_get_heap(void)
+{
+ return AG(mm_heap);
+}
+
+ZEND_API int zend_mm_is_custom_heap(zend_mm_heap *new_heap)
+{
+#if ZEND_MM_CUSTOM
+ return AG(mm_heap)->use_custom_heap;
+#else
+ return 0;
+#endif
+}
+
ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap,
void* (*_malloc)(size_t),
void (*_free)(void*),
@@ -2451,10 +2678,10 @@ ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap,
#if ZEND_MM_CUSTOM
zend_mm_heap *_heap = (zend_mm_heap*)heap;
- _heap->use_custom_heap = 1;
- _heap->_malloc = _malloc;
- _heap->_free = _free;
- _heap->_realloc = _realloc;
+ _heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD;
+ _heap->custom_heap.std._malloc = _malloc;
+ _heap->custom_heap.std._free = _free;
+ _heap->custom_heap.std._realloc = _realloc;
#endif
}
@@ -2467,9 +2694,9 @@ ZEND_API void zend_mm_get_custom_handlers(zend_mm_heap *heap,
zend_mm_heap *_heap = (zend_mm_heap*)heap;
if (heap->use_custom_heap) {
- *_malloc = _heap->_malloc;
- *_free = _heap->_free;
- *_realloc = _heap->_realloc;
+ *_malloc = _heap->custom_heap.std._malloc;
+ *_free = _heap->custom_heap.std._free;
+ *_realloc = _heap->custom_heap.std._realloc;
} else {
*_malloc = NULL;
*_free = NULL;
@@ -2482,6 +2709,23 @@ ZEND_API void zend_mm_get_custom_handlers(zend_mm_heap *heap,
#endif
}
+#if ZEND_DEBUG
+ZEND_API void zend_mm_set_custom_debug_handlers(zend_mm_heap *heap,
+ void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
+ void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
+ void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC))
+{
+#if ZEND_MM_CUSTOM
+ zend_mm_heap *_heap = (zend_mm_heap*)heap;
+
+ _heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_DEBUG;
+ _heap->custom_heap.debug._malloc = _malloc;
+ _heap->custom_heap.debug._free = _free;
+ _heap->custom_heap.debug._realloc = _realloc;
+#endif
+}
+#endif
+
ZEND_API zend_mm_storage *zend_mm_get_storage(zend_mm_heap *heap)
{
#if ZEND_MM_STORAGE
@@ -2548,6 +2792,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void
#endif
heap->storage = &tmp_storage;
heap->huge_list = NULL;
+ memset(heap->free_slot, 0, sizeof(heap->free_slot));
storage = _zend_mm_alloc(heap, sizeof(zend_mm_storage) + data_size ZEND_FILE_LINE_CC ZEND_FILE_LINE_CC);
if (!storage) {
handlers->chunk_free(&tmp_storage, chunk, ZEND_MM_CHUNK_SIZE);
@@ -2572,6 +2817,37 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_handlers *handlers, void
#endif
}
+static ZEND_COLD ZEND_NORETURN void zend_out_of_memory(void)
+{
+ fprintf(stderr, "Out of memory\n");
+ exit(1);
+}
+
+ZEND_API void * __zend_malloc(size_t len)
+{
+ void *tmp = malloc(len);
+ if (EXPECTED(tmp)) {
+ return tmp;
+ }
+ zend_out_of_memory();
+}
+
+ZEND_API void * __zend_calloc(size_t nmemb, size_t len)
+{
+ void *tmp = _safe_malloc(nmemb, len, 0);
+ memset(tmp, 0, nmemb * len);
+ return tmp;
+}
+
+ZEND_API void * __zend_realloc(void *p, size_t len)
+{
+ p = realloc(p, len);
+ if (EXPECTED(p)) {
+ return p;
+ }
+ zend_out_of_memory();
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index 6c12b4247d..2168f965e8 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -41,6 +42,9 @@
#define ZEND_MM_ALIGNED_SIZE(size) (((size) + ZEND_MM_ALIGNMENT - Z_L(1)) & ZEND_MM_ALIGNMENT_MASK)
+#define ZEND_MM_ALIGNED_SIZE_EX(size, alignment) \
+ (((size) + ((alignment) - Z_L(1))) & ~((alignment) - Z_L(1)))
+
typedef struct _zend_leak_info {
void *addr;
size_t size;
@@ -183,33 +187,9 @@ ZEND_API void ZEND_FASTCALL _efree_huge(void *, size_t size);
#define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define zend_mem_block_size_rel(ptr) _zend_mem_block_size((ptr) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
-zend_always_inline static void * __zend_malloc(size_t len)
-{
- void *tmp = malloc(len);
- if (tmp) {
- return tmp;
- }
- fprintf(stderr, "Out of memory\n");
- exit(1);
-}
-
-zend_always_inline static void * __zend_calloc(size_t nmemb, size_t len)
-{
- void *tmp = _safe_malloc(nmemb, len, 0);
- memset(tmp, 0, nmemb * len);
- return tmp;
-}
-
-zend_always_inline static void * __zend_realloc(void *p, size_t len)
-{
- p = realloc(p, len);
- if (p) {
- return p;
- }
- fprintf(stderr, "Out of memory\n");
- exit(1);
-}
-
+ZEND_API void * __zend_malloc(size_t len) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE(1);
+ZEND_API void * __zend_calloc(size_t nmemb, size_t len) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2(1,2);
+ZEND_API void * __zend_realloc(void *p, size_t len) ZEND_ATTRIBUTE_ALLOC_SIZE(2);
/* Selective persistent/non persistent allocation macros */
#define pemalloc(size, persistent) ((persistent)?__zend_malloc(size):emalloc(size))
@@ -280,7 +260,15 @@ ZEND_API size_t ZEND_FASTCALL _zend_mm_block_size(zend_mm_heap *heap, void *p ZE
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap);
+ZEND_API zend_mm_heap *zend_mm_get_heap(void);
+
+ZEND_API size_t zend_mm_gc(zend_mm_heap *heap);
+#define ZEND_MM_CUSTOM_HEAP_NONE 0
+#define ZEND_MM_CUSTOM_HEAP_STD 1
+#define ZEND_MM_CUSTOM_HEAP_DEBUG 2
+
+ZEND_API int zend_mm_is_custom_heap(zend_mm_heap *new_heap);
ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap,
void* (*_malloc)(size_t),
void (*_free)(void*),
@@ -290,6 +278,13 @@ ZEND_API void zend_mm_get_custom_handlers(zend_mm_heap *heap,
void (**_free)(void*),
void* (**_realloc)(void*, size_t));
+#if ZEND_DEBUG
+ZEND_API void zend_mm_set_custom_debug_handlers(zend_mm_heap *heap,
+ void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
+ void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
+ void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC));
+#endif
+
typedef struct _zend_mm_storage zend_mm_storage;
typedef void* (*zend_mm_chunk_alloc_t)(zend_mm_storage *storage, size_t size, size_t alignment);
diff --git a/Zend/zend_alloc_sizes.h b/Zend/zend_alloc_sizes.h
index 177238ae34..e3286c43f1 100644
--- a/Zend/zend_alloc_sizes.h
+++ b/Zend/zend_alloc_sizes.h
@@ -1,3 +1,21 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
#ifndef ZEND_ALLOC_SIZES_H
#define ZEND_ALLOC_SIZES_H
diff --git a/Zend/zend_arena.h b/Zend/zend_arena.h
index b39493a799..e89e06b1b0 100644
--- a/Zend/zend_arena.h
+++ b/Zend/zend_arena.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -103,11 +103,12 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
zend_arena *arena = *arena_ptr;
while (UNEXPECTED((char*)checkpoint > arena->end) ||
- UNEXPECTED((char*)checkpoint < (char*)arena)) {
+ UNEXPECTED((char*)checkpoint <= (char*)arena)) {
zend_arena *prev = arena->prev;
efree(arena);
*arena_ptr = arena = prev;
}
+ ZEND_ASSERT((char*)checkpoint > (char*)arena && (char*)checkpoint <= arena->end);
arena->ptr = (char*)checkpoint;
}
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index 58119c2598..236d0783fc 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -203,7 +203,7 @@ static int zend_ast_add_array_element(zval *result, zval *offset, zval *expr)
zend_hash_index_update(Z_ARRVAL_P(result), zend_dval_to_lval(Z_DVAL_P(offset)), expr);
break;
default:
- zend_throw_error(zend_ce_error, "Illegal offset type");
+ zend_throw_error(NULL, "Illegal offset type");
return FAILURE;
}
return SUCCESS;
@@ -256,23 +256,23 @@ ZEND_API int zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *sc
case ZEND_AST_ZVAL:
{
zval *zv = zend_ast_get_zval(ast);
- if (scope) {
- /* class constants may be updated in-place */
- if (Z_OPT_CONSTANT_P(zv)) {
- if (UNEXPECTED(zval_update_constant_ex(zv, 1, scope) != SUCCESS)) {
+
+ if (Z_OPT_CONSTANT_P(zv)) {
+ if (!(Z_TYPE_FLAGS_P(zv) & IS_TYPE_IMMUTABLE)) {
+ if (UNEXPECTED(zval_update_constant_ex(zv, scope) != SUCCESS)) {
ret = FAILURE;
break;
}
- }
- ZVAL_DUP(result, zv);
- } else {
- ZVAL_DUP(result, zv);
- if (Z_OPT_CONSTANT_P(result)) {
- if (UNEXPECTED(zval_update_constant_ex(result, 1, scope) != SUCCESS)) {
+ ZVAL_COPY(result, zv);
+ } else {
+ ZVAL_COPY_VALUE(result, zv);
+ if (UNEXPECTED(zval_update_constant_ex(result, scope) != SUCCESS)) {
ret = FAILURE;
break;
}
}
+ } else {
+ ZVAL_COPY(result, zv);
}
break;
}
@@ -337,6 +337,22 @@ ZEND_API int zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *sc
zval_dtor(&op1);
}
break;
+ case ZEND_AST_COALESCE:
+ if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) {
+ ret = FAILURE;
+ break;
+ }
+ if (Z_TYPE(op1) > IS_NULL) {
+ *result = op1;
+ } else {
+ if (UNEXPECTED(zend_ast_evaluate(result, ast->child[1], scope) != SUCCESS)) {
+ zval_dtor(&op1);
+ ret = FAILURE;
+ break;
+ }
+ zval_dtor(&op1);
+ }
+ break;
case ZEND_AST_UNARY_PLUS:
if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[0], scope) != SUCCESS)) {
ret = FAILURE;
@@ -385,6 +401,10 @@ ZEND_API int zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *sc
}
break;
case ZEND_AST_DIM:
+ if (ast->child[1] == NULL) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use [] for reading");
+ }
+
if (UNEXPECTED(zend_ast_evaluate(&op1, ast->child[0], scope) != SUCCESS)) {
ret = FAILURE;
} else if (UNEXPECTED(zend_ast_evaluate(&op2, ast->child[1], scope) != SUCCESS)) {
@@ -393,7 +413,12 @@ ZEND_API int zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *sc
} else {
zval tmp;
- zend_fetch_dimension_by_zval(&tmp, &op1, &op2);
+ if (ast->attr == ZEND_DIM_IS) {
+ zend_fetch_dimension_by_zval_is(&tmp, &op1, &op2, IS_CONST);
+ } else {
+ zend_fetch_dimension_by_zval(&tmp, &op1, &op2);
+ }
+
if (UNEXPECTED(Z_ISREF(tmp))) {
ZVAL_DUP(result, Z_REFVAL(tmp));
} else {
@@ -405,7 +430,7 @@ ZEND_API int zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *sc
}
break;
default:
- zend_throw_error(zend_ce_error, "Unsupported constant expression");
+ zend_throw_error(NULL, "Unsupported constant expression");
ret = FAILURE;
}
return ret;
@@ -591,7 +616,7 @@ static void zend_ast_export_qstr(smart_str *str, char quote, zend_string *s)
case '\v':
smart_str_appends(str, "\\v");
break;
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
case VK_ESCAPE:
#else
case '\e':
@@ -751,19 +776,22 @@ static void zend_ast_export_encaps_list(smart_str *str, char quote, zend_ast_lis
}
}
-static void zend_ast_export_name_list(smart_str *str, zend_ast_list *list, int indent)
+static void zend_ast_export_name_list_ex(smart_str *str, zend_ast_list *list, int indent, const char *separator)
{
uint32_t i = 0;
while (i < list->children) {
if (i != 0) {
- smart_str_appends(str, ", ");
+ smart_str_appends(str, separator);
}
zend_ast_export_name(str, list->child[i], 0, indent);
i++;
}
}
+#define zend_ast_export_name_list(s, l, i) zend_ast_export_name_list_ex(s, l, i, ", ")
+#define zend_ast_export_catch_name_list(s, l, i) zend_ast_export_name_list_ex(s, l, i, "|")
+
static void zend_ast_export_var_list(smart_str *str, zend_ast_list *list, int indent)
{
uint32_t i = 0;
@@ -783,6 +811,10 @@ static void zend_ast_export_var_list(smart_str *str, zend_ast_list *list, int in
static void zend_ast_export_stmt(smart_str *str, zend_ast *ast, int indent)
{
+ if (!ast) {
+ return;
+ }
+
if (ast->kind == ZEND_AST_STMT_LIST ||
ast->kind == ZEND_AST_TRAIT_ADAPTATIONS) {
zend_ast_list *list = (zend_ast_list*)ast;
@@ -918,6 +950,21 @@ static void zend_ast_export_zval(smart_str *str, zval *zv, int priority, int ind
}
}
+static void zend_ast_export_class_no_header(smart_str *str, zend_ast_decl *decl, int indent) {
+ if (decl->child[0]) {
+ smart_str_appends(str, " extends ");
+ zend_ast_export_ns_name(str, decl->child[0], 0, indent);
+ }
+ if (decl->child[1]) {
+ smart_str_appends(str, " implements ");
+ zend_ast_export_ex(str, decl->child[1], 0, indent);
+ }
+ smart_str_appends(str, " {\n");
+ zend_ast_export_stmt(str, decl->child[2], indent + 1);
+ zend_ast_export_indent(str, indent);
+ smart_str_appends(str, "}");
+}
+
#define BINARY_OP(_op, _p, _pl, _pr) do { \
op = _op; \
p = _p; \
@@ -1044,18 +1091,8 @@ tail_call:
smart_str_appends(str, "class ");
}
smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name));
- if (decl->child[0]) {
- smart_str_appends(str, " extends ");
- zend_ast_export_ns_name(str, decl->child[0], 0, indent);
- }
- if (decl->child[1]) {
- smart_str_appends(str, " implements ");
- zend_ast_export_ex(str, decl->child[1], 0, indent);
- }
- smart_str_appends(str, " {\n");
- zend_ast_export_stmt(str, decl->child[2], indent + 1);
- zend_ast_export_indent(str, indent);
- smart_str_appends(str, "}\n");
+ zend_ast_export_class_no_header(str, decl, indent);
+ smart_str_appendc(str, '\n');
break;
/* list nodes */
@@ -1065,11 +1102,6 @@ tail_call:
simple_list:
zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent);
break;
- case ZEND_AST_LIST:
- smart_str_appends(str, "list(");
- zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent);
- smart_str_appendc(str, ')');
- break;
case ZEND_AST_ARRAY:
smart_str_appendc(str, '[');
zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent);
@@ -1183,7 +1215,11 @@ simple_list:
if (ast->child[0]->kind == ZEND_AST_ENCAPS_LIST) {
zend_ast_export_encaps_list(str, '`', (zend_ast_list*)ast->child[0], indent);
} else {
- zend_ast_export_ex(str, ast->child[0], 0, indent);
+ zval *zv;
+ ZEND_ASSERT(ast->child[0]->kind == ZEND_AST_ZVAL);
+ zv = zend_ast_get_zval(ast->child[0]);
+ ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING);
+ zend_ast_export_qstr(str, '`', Z_STR_P(zv));
}
smart_str_appendc(str, '`');
break;
@@ -1340,12 +1376,26 @@ simple_list:
break;
case ZEND_AST_NEW:
smart_str_appends(str, "new ");
- zend_ast_export_ns_name(str, ast->child[0], 0, indent);
- smart_str_appendc(str, '(');
- zend_ast_export_ex(str, ast->child[1], 0, indent);
- smart_str_appendc(str, ')');
+ if (ast->child[0]->kind == ZEND_AST_CLASS) {
+ smart_str_appends(str, "class");
+ if (zend_ast_get_list(ast->child[1])->children) {
+ smart_str_appendc(str, '(');
+ zend_ast_export_ex(str, ast->child[1], 0, indent);
+ smart_str_appendc(str, ')');
+ }
+ zend_ast_export_class_no_header(str, (zend_ast_decl *) ast->child[0], indent);
+ } else {
+ zend_ast_export_ns_name(str, ast->child[0], 0, indent);
+ smart_str_appendc(str, '(');
+ zend_ast_export_ex(str, ast->child[1], 0, indent);
+ smart_str_appendc(str, ')');
+ }
+ break;
+ case ZEND_AST_INSTANCEOF:
+ zend_ast_export_ex(str, ast->child[0], 0, indent);
+ smart_str_appends(str, " instanceof ");
+ zend_ast_export_ns_name(str, ast->child[1], 0, indent);
break;
- case ZEND_AST_INSTANCEOF: BINARY_OP(" instanceof ", 230, 231, 231);
case ZEND_AST_YIELD:
if (priority > 70) smart_str_appendc(str, '(');
smart_str_appends(str, "yield ");
@@ -1536,7 +1586,7 @@ simple_list:
break;
case ZEND_AST_CATCH:
smart_str_appends(str, "} catch (");
- zend_ast_export_ns_name(str, ast->child[0], 0, indent);
+ zend_ast_export_catch_name_list(str, zend_ast_get_list(ast->child[0]), indent);
smart_str_appends(str, " $");
zend_ast_export_var(str, ast->child[1], 0, indent);
smart_str_appends(str, ") {\n");
diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h
index 2b8d4d37b8..886b106228 100644
--- a/Zend/zend_ast.h
+++ b/Zend/zend_ast.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,7 +42,6 @@ enum _zend_ast_kind {
/* list nodes */
ZEND_AST_ARG_LIST = 1 << ZEND_AST_IS_LIST_SHIFT,
- ZEND_AST_LIST,
ZEND_AST_ARRAY,
ZEND_AST_ENCAPS_LIST,
ZEND_AST_EXPR_LIST,
@@ -124,8 +123,6 @@ enum _zend_ast_kind {
ZEND_AST_SWITCH,
ZEND_AST_SWITCH_CASE,
ZEND_AST_DECLARE,
- ZEND_AST_PROP_ELEM,
- ZEND_AST_CONST_ELEM,
ZEND_AST_USE_TRAIT,
ZEND_AST_TRAIT_PRECEDENCE,
ZEND_AST_METHOD_REFERENCE,
@@ -142,6 +139,8 @@ enum _zend_ast_kind {
ZEND_AST_TRY,
ZEND_AST_CATCH,
ZEND_AST_PARAM,
+ ZEND_AST_PROP_ELEM,
+ ZEND_AST_CONST_ELEM,
/* 4 child nodes */
ZEND_AST_FOR = 4 << ZEND_AST_NUM_CHILDREN_SHIFT,
diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h
new file mode 100644
index 0000000000..12c58b1a41
--- /dev/null
+++ b/Zend/zend_bitset.h
@@ -0,0 +1,256 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend OPcache JIT |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2014 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id:$ */
+
+#ifndef _ZEND_BITSET_H_
+#define _ZEND_BITSET_H_
+
+typedef zend_ulong *zend_bitset;
+
+#define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong)
+
+#if SIZEOF_ZEND_LONG == 4
+# define ZEND_BITSET_ELM_NUM(n) ((n) >> 5)
+# define ZEND_BITSET_BIT_NUM(n) ((zend_ulong)(n) & Z_UL(0x1f))
+#elif SIZEOF_ZEND_LONG == 8
+# define ZEND_BITSET_ELM_NUM(n) ((n) >> 6)
+# define ZEND_BITSET_BIT_NUM(n) ((zend_ulong)(n) & Z_UL(0x3f))
+#else
+# define ZEND_BITSET_ELM_NUM(n) ((n) / (sizeof(zend_long) * 8))
+# define ZEND_BITSET_BIT_NUM(n) ((n) % (sizeof(zend_long) * 8))
+#endif
+
+#define ZEND_BITSET_ALLOCA(n, use_heap) \
+ (zend_bitset)do_alloca((n) * ZEND_BITSET_ELM_SIZE, use_heap)
+
+/* Number of trailing zero bits (0x01 -> 0; 0x40 -> 6; 0x00 -> LEN) */
+static zend_always_inline int zend_ulong_ntz(zend_ulong num)
+{
+#if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \
+ && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL)
+ return __builtin_ctzl(num);
+#elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL)
+ return __builtin_ctzll(num);
+#elif defined(_WIN32)
+ unsigned long index;
+
+#if defined(_WIN64)
+ if (!BitScanForward64(&index, num)) {
+#else
+ if (!BitScanForward(&index, num)) {
+#endif
+ /* undefined behavior */
+ return 32;
+ }
+
+ return (int) index;
+#else
+ int n;
+
+ if (num == Z_UL(0)) return ZEND_MM_BITSET_LEN;
+
+ n = 1;
+#if SIZEOF_ZEND_LONG == 8
+ if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);}
+#endif
+ if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;}
+ if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;}
+ if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;}
+ if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;}
+ return n - (num & 1);
+#endif
+}
+
+/* Returns the number of zend_ulong words needed to store a bitset that is N
+ bits long. */
+static inline uint32_t zend_bitset_len(uint32_t n)
+{
+ return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8);
+}
+
+static inline zend_bool zend_bitset_in(zend_bitset set, uint32_t n)
+{
+ return (set[ZEND_BITSET_ELM_NUM(n)] & (Z_UL(1) << ZEND_BITSET_BIT_NUM(n))) != Z_UL(0);
+}
+
+static inline void zend_bitset_incl(zend_bitset set, uint32_t n)
+{
+ set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n);
+}
+
+static inline void zend_bitset_excl(zend_bitset set, uint32_t n)
+{
+ set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n));
+}
+
+static inline void zend_bitset_clear(zend_bitset set, uint32_t len)
+{
+ memset(set, 0, len * ZEND_BITSET_ELM_SIZE);
+}
+
+static inline int zend_bitset_empty(zend_bitset set, uint32_t len)
+{
+ uint32_t i;
+ for (i = 0; i < len; i++) {
+ if (set[i]) {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static inline void zend_bitset_fill(zend_bitset set, uint32_t len)
+{
+ memset(set, 0xff, len * ZEND_BITSET_ELM_SIZE);
+}
+
+static inline zend_bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len)
+{
+ return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0;
+}
+
+static inline void zend_bitset_copy(zend_bitset set1, zend_bitset set2, uint32_t len)
+{
+ memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE);
+}
+
+static inline void zend_bitset_intersection(zend_bitset set1, zend_bitset set2, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ set1[i] &= set2[i];
+ }
+}
+
+static inline void zend_bitset_union(zend_bitset set1, zend_bitset set2, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ set1[i] |= set2[i];
+ }
+}
+
+static inline void zend_bitset_difference(zend_bitset set1, zend_bitset set2, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ set1[i] = set1[i] & ~set2[i];
+ }
+}
+
+static inline void zend_bitset_union_with_intersection(zend_bitset set1, zend_bitset set2, zend_bitset set3, zend_bitset set4, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ set1[i] = set2[i] | (set3[i] & set4[i]);
+ }
+}
+
+static inline void zend_bitset_union_with_difference(zend_bitset set1, zend_bitset set2, zend_bitset set3, zend_bitset set4, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ set1[i] = set2[i] | (set3[i] & ~set4[i]);
+ }
+}
+
+static inline zend_bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ if (set1[i] & ~set2[i]) {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static inline int zend_bitset_first(zend_bitset set, uint32_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; i++) {
+ if (set[i]) {
+ return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]);
+ }
+ }
+ return -1; /* empty set */
+}
+
+static inline int zend_bitset_last(zend_bitset set, uint32_t len)
+{
+ uint32_t i = len;
+
+ while (i > 0) {
+ i--;
+ if (set[i]) {
+ int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1;
+ zend_ulong x = set[i];
+ while (x != Z_UL(0)) {
+ x = x >> Z_UL(1);
+ j++;
+ }
+ return j;
+ }
+ }
+ return -1; /* empty set */
+}
+
+#define ZEND_BITSET_FOREACH(set, len, bit) do { \
+ zend_bitset _set = (set); \
+ uint32_t _i, _len = (len); \
+ for (_i = 0; _i < _len; _i++) { \
+ zend_ulong _x = _set[_i]; \
+ if (_x) { \
+ (bit) = ZEND_BITSET_ELM_SIZE * 8 * _i; \
+ for (; _x != 0; _x >>= Z_UL(1), (bit)++) { \
+ if (!(_x & Z_UL(1))) continue;
+
+#define ZEND_BITSET_REVERSE_FOREACH(set, len, bit) do { \
+ zend_bitset _set = (set); \
+ uint32_t _i = (len); \
+ zend_ulong _test = Z_UL(1) << (ZEND_BITSET_ELM_SIZE * 8 - 1); \
+ while (_i-- > 0) { \
+ zend_ulong _x = _set[_i]; \
+ if (_x) { \
+ (bit) = ZEND_BITSET_ELM_SIZE * 8 * (_i + 1) - 1; \
+ for (; _x != 0; _x <<= Z_UL(1), (bit)--) { \
+ if (!(_x & _test)) continue; \
+
+#define ZEND_BITSET_FOREACH_END() \
+ } \
+ } \
+ } \
+} while (0)
+
+#endif /* _ZEND_BITSET_H_ */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_build.h b/Zend/zend_build.h
index 2fb9ed5499..caea3b0c64 100644
--- a/Zend/zend_build.h
+++ b/Zend/zend_build.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 1a5ba2e5dd..5ae536f425 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,6 +31,12 @@
#undef ZEND_TEST_EXCEPTIONS
+#if ZEND_DEBUG
+static zend_class_entry *zend_test_interface;
+static zend_class_entry *zend_test_class;
+static zend_object_handlers zend_test_class_handlers;
+#endif
+
static ZEND_FUNCTION(zend_version);
static ZEND_FUNCTION(func_num_args);
static ZEND_FUNCTION(func_get_arg);
@@ -93,6 +99,7 @@ static ZEND_FUNCTION(zend_test_func2);
static ZEND_FUNCTION(zend_thread_id);
#endif
#endif
+static ZEND_FUNCTION(gc_mem_caches);
static ZEND_FUNCTION(gc_collect_cycles);
static ZEND_FUNCTION(gc_enabled);
static ZEND_FUNCTION(gc_enable);
@@ -247,7 +254,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_extension_loaded, 0, 0, 1)
ZEND_ARG_INFO(0, extension_name)
ZEND_END_ARG_INFO()
-#ifdef ZEND_DEBUG
+#if ZEND_DEBUG
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_func, IS_ARRAY, NULL, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_zend_test_func2, IS_ARRAY, NULL, 1)
@@ -256,6 +263,51 @@ ZEND_END_ARG_INFO()
/* }}} */
+#if ZEND_DEBUG
+static zend_object *zend_test_class_new(zend_class_entry *class_type) /* {{{ */ {
+ zend_object *obj = zend_objects_new(class_type);
+ obj->handlers = &zend_test_class_handlers;
+ return obj;
+}
+/* }}} */
+
+static zend_function *zend_test_class_method_get(zend_object **object, zend_string *name, const zval *key) /* {{{ */ {
+ zend_internal_function *fptr = emalloc(sizeof(zend_internal_function));
+ fptr->type = ZEND_OVERLOADED_FUNCTION_TEMPORARY;
+ fptr->num_args = 1;
+ fptr->arg_info = NULL;
+ fptr->scope = (*object)->ce;
+ fptr->fn_flags = ZEND_ACC_CALL_VIA_HANDLER;
+ fptr->function_name = zend_string_copy(name);
+ fptr->handler = ZEND_FN(zend_test_func);
+ zend_set_function_arg_flags((zend_function*)fptr);
+
+ return (zend_function*)fptr;
+}
+/* }}} */
+
+static zend_function *zend_test_class_static_method_get(zend_class_entry *ce, zend_string *name) /* {{{ */ {
+ zend_internal_function *fptr = emalloc(sizeof(zend_internal_function));
+ fptr->type = ZEND_OVERLOADED_FUNCTION;
+ fptr->num_args = 1;
+ fptr->arg_info = NULL;
+ fptr->scope = ce;
+ fptr->fn_flags = ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_STATIC;
+ fptr->function_name = name;
+ fptr->handler = ZEND_FN(zend_test_func);
+ zend_set_function_arg_flags((zend_function*)fptr);
+
+ return (zend_function*)fptr;
+}
+/* }}} */
+
+static int zend_test_class_call_method(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS) /* {{{ */ {
+ RETVAL_STR(zend_string_copy(method));
+ return 0;
+}
+/* }}} */
+#endif
+
static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(zend_version, arginfo_zend__void)
ZEND_FE(func_num_args, arginfo_zend__void)
@@ -321,6 +373,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(zend_thread_id, NULL)
#endif
#endif
+ ZEND_FE(gc_mem_caches, arginfo_zend__void)
ZEND_FE(gc_collect_cycles, arginfo_zend__void)
ZEND_FE(gc_enabled, arginfo_zend__void)
ZEND_FE(gc_enable, arginfo_zend__void)
@@ -337,6 +390,21 @@ ZEND_MINIT_FUNCTION(core) { /* {{{ */
zend_register_default_classes();
+#if ZEND_DEBUG
+ INIT_CLASS_ENTRY(class_entry, "_ZendTestInterface", NULL);
+ zend_test_interface = zend_register_internal_interface(&class_entry);
+ zend_declare_class_constant_long(zend_test_interface, ZEND_STRL("DUMMY"), 0);
+ INIT_CLASS_ENTRY(class_entry, "_ZendTestClass", NULL);
+ zend_test_class = zend_register_internal_class_ex(&class_entry, NULL);
+ zend_class_implements(zend_test_class, 1, zend_test_interface);
+ zend_test_class->create_object = zend_test_class_new;
+ zend_test_class->get_static_method = zend_test_class_static_method_get;
+
+ memcpy(&zend_test_class_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ zend_test_class_handlers.get_method = zend_test_class_method_get;
+ zend_test_class_handlers.call_method = zend_test_class_call_method;
+#endif
+
return SUCCESS;
}
/* }}} */
@@ -371,6 +439,15 @@ ZEND_FUNCTION(zend_version)
}
/* }}} */
+/* {{{ proto int gc_mem_caches(void)
+ Reclaims memory used by MM caches.
+ Returns number of freed bytes */
+ZEND_FUNCTION(gc_mem_caches)
+{
+ RETURN_LONG(zend_mm_gc(zend_mm_get_heap()));
+}
+/* }}} */
+
/* {{{ proto int gc_collect_cycles(void)
Forces collection of any existing garbage cycles.
Returns number of freed zvals */
@@ -414,12 +491,16 @@ ZEND_FUNCTION(func_num_args)
{
zend_execute_data *ex = EX(prev_execute_data);
- if (!(ZEND_CALL_INFO(ex) & ZEND_CALL_CODE)) {
- RETURN_LONG(ZEND_CALL_NUM_ARGS(ex));
- } else {
+ if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
zend_error(E_WARNING, "func_num_args(): Called from the global scope - no function context");
RETURN_LONG(-1);
}
+
+ if (zend_forbid_dynamic_call("func_num_args()") == FAILURE) {
+ RETURN_LONG(-1);
+ }
+
+ RETURN_LONG(ZEND_CALL_NUM_ARGS(ex));
}
/* }}} */
@@ -447,21 +528,27 @@ ZEND_FUNCTION(func_get_arg)
RETURN_FALSE;
}
+ if (zend_forbid_dynamic_call("func_get_arg()") == FAILURE) {
+ RETURN_FALSE;
+ }
+
arg_count = ZEND_CALL_NUM_ARGS(ex);
- if (requested_offset >= arg_count) {
+ if ((zend_ulong)requested_offset >= arg_count) {
zend_error(E_WARNING, "func_get_arg(): Argument " ZEND_LONG_FMT " not passed to function", requested_offset);
RETURN_FALSE;
}
first_extra_arg = ex->func->op_array.num_args;
- if (requested_offset >= first_extra_arg && (ZEND_CALL_NUM_ARGS(ex) > first_extra_arg)) {
+ if ((zend_ulong)requested_offset >= first_extra_arg && (ZEND_CALL_NUM_ARGS(ex) > first_extra_arg)) {
arg = ZEND_CALL_VAR_NUM(ex, ex->func->op_array.last_var + ex->func->op_array.T) + (requested_offset - first_extra_arg);
} else {
arg = ZEND_CALL_ARG(ex, requested_offset + 1);
}
- ZVAL_DEREF(arg);
- ZVAL_COPY(return_value, arg);
+ if (EXPECTED(!Z_ISUNDEF_P(arg))) {
+ ZVAL_DEREF(arg);
+ ZVAL_COPY(return_value, arg);
+ }
}
/* }}} */
@@ -471,7 +558,7 @@ ZEND_FUNCTION(func_get_args)
{
zval *p, *q;
uint32_t arg_count, first_extra_arg;
- uint32_t i;
+ uint32_t i, n;
zend_execute_data *ex = EX(prev_execute_data);
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
@@ -479,6 +566,10 @@ ZEND_FUNCTION(func_get_args)
RETURN_FALSE;
}
+ if (zend_forbid_dynamic_call("func_get_args()") == FAILURE) {
+ RETURN_FALSE;
+ }
+
arg_count = ZEND_CALL_NUM_ARGS(ex);
array_init_size(return_value, arg_count);
@@ -487,12 +578,18 @@ ZEND_FUNCTION(func_get_args)
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
i = 0;
+ n = 0;
p = ZEND_CALL_ARG(ex, 1);
if (arg_count > first_extra_arg) {
while (i < first_extra_arg) {
q = p;
- ZVAL_DEREF(q);
- if (Z_OPT_REFCOUNTED_P(q)) Z_ADDREF_P(q);
+ if (EXPECTED(Z_TYPE_INFO_P(q) != IS_UNDEF)) {
+ ZVAL_DEREF(q);
+ if (Z_OPT_REFCOUNTED_P(q)) {
+ Z_ADDREF_P(q);
+ }
+ n++;
+ }
ZEND_HASH_FILL_ADD(q);
p++;
i++;
@@ -501,13 +598,19 @@ ZEND_FUNCTION(func_get_args)
}
while (i < arg_count) {
q = p;
- ZVAL_DEREF(q);
- if (Z_OPT_REFCOUNTED_P(q)) Z_ADDREF_P(q);
+ if (EXPECTED(Z_TYPE_INFO_P(q) != IS_UNDEF)) {
+ ZVAL_DEREF(q);
+ if (Z_OPT_REFCOUNTED_P(q)) {
+ Z_ADDREF_P(q);
+ }
+ n++;
+ }
ZEND_HASH_FILL_ADD(q);
p++;
i++;
}
} ZEND_HASH_FILL_END();
+ Z_ARRVAL_P(return_value)->nNumOfElements = n;
}
}
/* }}} */
@@ -645,7 +748,7 @@ ZEND_FUNCTION(each)
if (Z_REFCOUNTED_P(entry)) Z_ADDREF_P(entry);
}
zend_hash_index_add_new(Z_ARRVAL_P(return_value), 1, entry);
- zend_hash_str_add_new(Z_ARRVAL_P(return_value), "value", sizeof("value")-1, entry);
+ zend_hash_add_new(Z_ARRVAL_P(return_value), CG(known_strings)[ZEND_STR_VALUE], entry);
/* add the key elements */
if (zend_hash_get_current_key(target_hash, &key, &num_key) == HASH_KEY_IS_STRING) {
@@ -655,7 +758,7 @@ ZEND_FUNCTION(each)
ZVAL_LONG(&tmp, num_key);
}
zend_hash_index_add_new(Z_ARRVAL_P(return_value), 0, &tmp);
- zend_hash_str_add_new(Z_ARRVAL_P(return_value), "key", sizeof("key")-1, &tmp);
+ zend_hash_add_new(Z_ARRVAL_P(return_value), CG(known_strings)[ZEND_STR_KEY], &tmp);
zend_hash_move_forward(target_hash);
}
/* }}} */
@@ -679,12 +782,13 @@ ZEND_FUNCTION(error_reporting)
#endif
old_error_reporting = EG(error_reporting);
- if(ZEND_NUM_ARGS() != 0) {
+ if (ZEND_NUM_ARGS() != 0) {
+ zend_string *new_val = zval_get_string(err);
do {
zend_ini_entry *p = EG(error_reporting_ini_entry);
if (!p) {
- p = zend_hash_str_find_ptr(EG(ini_directives), "error_reporting", sizeof("error_reporting")-1);
+ p = zend_hash_find_ptr(EG(ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING]);
if (p) {
EG(error_reporting_ini_entry) = p;
} else {
@@ -696,7 +800,7 @@ ZEND_FUNCTION(error_reporting)
ALLOC_HASHTABLE(EG(modified_ini_directives));
zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
}
- if (EXPECTED(zend_hash_str_add_ptr(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting")-1, p) != NULL)) {
+ if (EXPECTED(zend_hash_add_ptr(EG(modified_ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING], p) != NULL)) {
p->orig_value = p->value;
p->orig_modifiable = p->modifiable;
p->modified = 1;
@@ -705,7 +809,7 @@ ZEND_FUNCTION(error_reporting)
zend_string_release(p->value);
}
- p->value = zval_get_string(err);
+ p->value = new_val;
if (Z_TYPE_P(err) == IS_LONG) {
EG(error_reporting) = Z_LVAL_P(err);
} else {
@@ -771,6 +875,9 @@ static void copy_constant_array(zval *dst, zval *src) /* {{{ */
}
} else if (Z_REFCOUNTED_P(val)) {
Z_ADDREF_P(val);
+ if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_RESOURCE_EX)) {
+ Z_TYPE_INFO_P(new_val) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT);
+ }
}
} ZEND_HASH_FOREACH_END();
}
@@ -799,7 +906,7 @@ ZEND_FUNCTION(define)
ZEND_PARSE_PARAMETERS_END();
#endif
- if(non_cs) {
+ if (non_cs) {
case_sensitive = 0;
}
@@ -818,9 +925,14 @@ repeat:
case IS_STRING:
case IS_FALSE:
case IS_TRUE:
- case IS_RESOURCE:
case IS_NULL:
break;
+ case IS_RESOURCE:
+ ZVAL_COPY(&val_free, val);
+ /* TODO: better solution than this tricky disable dtor on resource? */
+ Z_TYPE_INFO(val_free) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT);
+ val = &val_free;
+ break;
case IS_ARRAY:
if (!Z_IMMUTABLE_P(val)) {
if (!validate_constant_array(Z_ARRVAL_P(val))) {
@@ -883,7 +995,7 @@ ZEND_FUNCTION(defined)
ZEND_PARSE_PARAMETERS_END();
#endif
- if (zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT)) {
+ if (zend_get_constant_ex(name, zend_get_executed_scope(), ZEND_FETCH_CLASS_SILENT)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -902,8 +1014,10 @@ ZEND_FUNCTION(get_class)
}
if (!obj) {
- if (EG(scope)) {
- RETURN_STR_COPY(EG(scope)->name);
+ zend_class_entry *scope = zend_get_executed_scope();
+
+ if (scope) {
+ RETURN_STR_COPY(scope->name);
} else {
zend_error(E_WARNING, "get_class() called without object from outside a class");
RETURN_FALSE;
@@ -927,8 +1041,11 @@ ZEND_FUNCTION(get_called_class)
called_scope = zend_get_called_scope(execute_data);
if (called_scope) {
RETURN_STR_COPY(called_scope->name);
- } else if (!EG(scope)) {
- zend_error(E_WARNING, "get_called_class() called from outside a class");
+ } else {
+ zend_class_entry *scope = zend_get_executed_scope();
+ if (!scope) {
+ zend_error(E_WARNING, "get_called_class() called from outside a class");
+ }
}
RETURN_FALSE;
}
@@ -946,7 +1063,7 @@ ZEND_FUNCTION(get_parent_class)
}
if (!ZEND_NUM_ARGS()) {
- ce = EG(scope);
+ ce = zend_get_executed_scope();
if (ce && ce->parent) {
RETURN_STR_COPY(ce->parent->name);
} else {
@@ -1043,7 +1160,7 @@ ZEND_FUNCTION(is_a)
/* }}} */
/* {{{ add_class_vars */
-static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value)
+static void add_class_vars(zend_class_entry *scope, zend_class_entry *ce, int statics, zval *return_value)
{
zend_property_info *prop_info;
zval *prop, prop_copy;
@@ -1051,12 +1168,12 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->properties_info, key, prop_info) {
if (((prop_info->flags & ZEND_ACC_SHADOW) &&
- prop_info->ce != EG(scope)) ||
+ prop_info->ce != scope) ||
((prop_info->flags & ZEND_ACC_PROTECTED) &&
- !zend_check_protected(prop_info->ce, EG(scope))) ||
+ !zend_check_protected(prop_info->ce, scope)) ||
((prop_info->flags & ZEND_ACC_PRIVATE) &&
- ce != EG(scope) &&
- prop_info->ce != EG(scope))) {
+ ce != scope &&
+ prop_info->ce != scope)) {
continue;
}
prop = NULL;
@@ -1081,7 +1198,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
/* this is necessary to make it able to work with default array
* properties, returned to user */
if (Z_OPT_CONSTANT_P(prop)) {
- if (UNEXPECTED(zval_update_constant_ex(prop, 0, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(prop, NULL) != SUCCESS)) {
return;
}
}
@@ -1096,7 +1213,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
ZEND_FUNCTION(get_class_vars)
{
zend_string *class_name;
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &class_name) == FAILURE) {
return;
@@ -1112,8 +1229,9 @@ ZEND_FUNCTION(get_class_vars)
return;
}
}
- add_class_vars(ce, 0, return_value);
- add_class_vars(ce, 1, return_value);
+ scope = zend_get_executed_scope();
+ add_class_vars(scope, ce, 0, return_value);
+ add_class_vars(scope, ce, 1, return_value);
}
}
/* }}} */
@@ -1150,7 +1268,7 @@ ZEND_FUNCTION(get_object_vars)
zobj = Z_OBJ_P(obj);
- if (!zobj->ce->default_properties_count && properties == zobj->properties) {
+ if (!zobj->ce->default_properties_count && properties == zobj->properties && !ZEND_HASH_GET_APPLY_COUNT(properties)) {
/* fast copy */
if (EXPECTED(zobj->handlers == &std_object_handlers)) {
if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) {
@@ -1165,8 +1283,12 @@ ZEND_FUNCTION(get_object_vars)
ZEND_HASH_FOREACH_STR_KEY_VAL_IND(properties, key, value) {
if (key) {
if (zend_check_property_access(zobj, key) == SUCCESS) {
- /* Not separating references */
- if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_ISREF_P(value) && Z_REFCOUNT_P(value) == 1) {
+ value = Z_REFVAL_P(value);
+ }
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
if (ZSTR_VAL(key)[0] == 0) {
const char *prop_name, *class_name;
size_t prop_len;
@@ -1207,6 +1329,7 @@ ZEND_FUNCTION(get_class_methods)
zval *klass;
zval method_name;
zend_class_entry *ce = NULL;
+ zend_class_entry *scope;
zend_function *mptr;
zend_string *key;
@@ -1225,15 +1348,16 @@ ZEND_FUNCTION(get_class_methods)
}
array_init(return_value);
+ scope = zend_get_executed_scope();
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, key, mptr) {
if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC)
- || (EG(scope) &&
+ || (scope &&
(((mptr->common.fn_flags & ZEND_ACC_PROTECTED) &&
- zend_check_protected(mptr->common.scope, EG(scope)))
+ zend_check_protected(mptr->common.scope, scope))
|| ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) &&
- EG(scope) == mptr->common.scope)))) {
+ scope == mptr->common.scope)))) {
size_t len = ZSTR_LEN(mptr->common.function_name);
/* Do not display old-style inherited constructors */
@@ -1912,7 +2036,15 @@ ZEND_FUNCTION(get_defined_functions)
Returns an associative array of names and values of all currently defined variable names (variables in the current scope) */
ZEND_FUNCTION(get_defined_vars)
{
- zend_array *symbol_table = zend_rebuild_symbol_table();
+ zend_array *symbol_table;
+ if (zend_forbid_dynamic_call("get_defined_vars()") == FAILURE) {
+ return;
+ }
+
+ symbol_table = zend_rebuild_symbol_table();
+ if (UNEXPECTED(symbol_table == NULL)) {
+ return;
+ }
RETURN_ARR(zend_array_dup(symbol_table));
}
@@ -1995,17 +2127,16 @@ ZEND_FUNCTION(zend_test_func)
{
zval *arg1, *arg2;
- zend_get_parameters(ZEND_NUM_ARGS(), 2, &arg1, &arg2);
+ zend_parse_parameters(ZEND_NUM_ARGS(), "|zz", &arg1, &arg2);
}
ZEND_FUNCTION(zend_test_func2)
{
zval *arg1, *arg2;
- zend_get_parameters(ZEND_NUM_ARGS(), 2, &arg1, &arg2);
+ zend_parse_parameters(ZEND_NUM_ARGS(), "|zz", &arg1, &arg2);
}
-
#ifdef ZTS
ZEND_FUNCTION(zend_thread_id)
{
@@ -2205,6 +2336,7 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
array_init_size(arg_array, num_args);
if (num_args) {
uint32_t i = 0;
+ uint32_t n = 0;
zval *p = ZEND_CALL_ARG(call, 1);
zend_hash_real_init(Z_ARRVAL_P(arg_array), 1);
@@ -2214,9 +2346,13 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
if (ZEND_CALL_NUM_ARGS(call) > first_extra_arg) {
while (i < first_extra_arg) {
- if (Z_OPT_REFCOUNTED_P(p)) Z_ADDREF_P(p);
+ if (EXPECTED(Z_TYPE_INFO_P(p) != IS_UNDEF)) {
+ if (Z_OPT_REFCOUNTED_P(p)) {
+ Z_ADDREF_P(p);
+ }
+ n++;
+ }
ZEND_HASH_FILL_ADD(p);
- zend_hash_next_index_insert_new(Z_ARRVAL_P(arg_array), p);
p++;
i++;
}
@@ -2225,12 +2361,18 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
}
while (i < num_args) {
- if (Z_OPT_REFCOUNTED_P(p)) Z_ADDREF_P(p);
+ if (EXPECTED(Z_TYPE_INFO_P(p) != IS_UNDEF)) {
+ if (Z_OPT_REFCOUNTED_P(p)) {
+ Z_ADDREF_P(p);
+ }
+ n++;
+ }
ZEND_HASH_FILL_ADD(p);
p++;
i++;
}
} ZEND_HASH_FILL_END();
+ Z_ARRVAL_P(arg_array)->nNumOfElements = n;
}
}
/* }}} */
@@ -2316,7 +2458,7 @@ ZEND_FUNCTION(debug_print_backtrace)
}
/* $this may be passed into regular internal functions */
- object = Z_OBJ(call->This);
+ object = (Z_TYPE(call->This) == IS_OBJECT) ? Z_OBJ(call->This) : NULL;
if (call->func) {
func = call->func;
@@ -2437,17 +2579,21 @@ ZEND_FUNCTION(debug_print_backtrace)
ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options, int limit) /* {{{ */
{
- zend_execute_data *call, *ptr, *skip;
+ zend_execute_data *ptr, *skip, *call = NULL;
zend_object *object;
int lineno, frameno = 0;
zend_function *func;
- const char *function_name;
- const char *filename;
- const char *include_filename = NULL;
- zval stack_frame;
+ zend_string *function_name;
+ zend_string *filename;
+ zend_string *include_filename = NULL;
+ zval stack_frame, tmp;
+
+ array_init(return_value);
+
+ if (!(ptr = EG(current_execute_data))) {
+ return;
+ }
- call = NULL;
- ptr = EG(current_execute_data);
if (!ptr->func || !ZEND_USER_CODE(ptr->func->common.type)) {
call = ptr;
ptr = ptr->prev_execute_data;
@@ -2465,13 +2611,11 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
ptr = ptr->prev_execute_data;
}
}
+ if (!call) {
+ call = ptr;
+ ptr = ptr->prev_execute_data;
+ }
}
- if (!call) {
- call = ptr;
- ptr = ptr->prev_execute_data;
- }
-
- array_init(return_value);
while (ptr && (limit == 0 || frameno < limit)) {
frameno++;
@@ -2494,7 +2638,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
}
if (skip->func && ZEND_USER_CODE(skip->func->common.type)) {
- filename = ZSTR_VAL(skip->func->op_array.filename);
+ filename = skip->func->op_array.filename;
if (skip->opline->opcode == ZEND_HANDLE_EXCEPTION) {
if (EG(opline_before_exception)) {
lineno = EG(opline_before_exception)->lineno;
@@ -2504,8 +2648,10 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
} else {
lineno = skip->opline->lineno;
}
- add_assoc_string_ex(&stack_frame, "file", sizeof("file")-1, (char*)filename);
- add_assoc_long_ex(&stack_frame, "line", sizeof("line")-1, lineno);
+ ZVAL_STR_COPY(&tmp, filename);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_FILE], &tmp);
+ ZVAL_LONG(&tmp, lineno);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_LINE], &tmp);
/* try to fetch args only if an FCALL was just made - elsewise we're in the middle of a function
* and debug_baktrace() might have been called by the error_handler. in this case we don't
@@ -2522,8 +2668,10 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
break;
}
if (prev->func && ZEND_USER_CODE(prev->func->common.type)) {
- add_assoc_str_ex(&stack_frame, "file", sizeof("file")-1, zend_string_copy(prev->func->op_array.filename));
- add_assoc_long_ex(&stack_frame, "line", sizeof("line")-1, prev->opline->lineno);
+ ZVAL_STR_COPY(&tmp, prev->func->op_array.filename);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_FILE], &tmp);
+ ZVAL_LONG(&tmp, prev->opline->lineno);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_LINE], &tmp);
break;
}
prev_call = prev;
@@ -2533,81 +2681,84 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
}
/* $this may be passed into regular internal functions */
- object = call ? Z_OBJ(call->This) : NULL;
+ object = (call && (Z_TYPE(call->This) == IS_OBJECT)) ? Z_OBJ(call->This) : NULL;
if (call && call->func) {
func = call->func;
function_name = (func->common.scope &&
func->common.scope->trait_aliases) ?
- ZSTR_VAL(zend_resolve_method_name(
- (object ? object->ce : func->common.scope), func)) :
- (func->common.function_name ?
- ZSTR_VAL(func->common.function_name) : NULL);
+ zend_resolve_method_name(
+ (object ? object->ce : func->common.scope), func) :
+ func->common.function_name;
} else {
func = NULL;
function_name = NULL;
}
if (function_name) {
- add_assoc_string_ex(&stack_frame, "function", sizeof("function")-1, (char*)function_name);
+ ZVAL_STR_COPY(&tmp, function_name);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_FUNCTION], &tmp);
if (object) {
if (func->common.scope) {
- add_assoc_str_ex(&stack_frame, "class", sizeof("class")-1, zend_string_copy(func->common.scope->name));
+ ZVAL_STR_COPY(&tmp, func->common.scope->name);
} else {
- add_assoc_str_ex(&stack_frame, "class", sizeof("class")-1, zend_string_copy(object->ce->name));
+ ZVAL_STR_COPY(&tmp, object->ce->name);
}
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_CLASS], &tmp);
if ((options & DEBUG_BACKTRACE_PROVIDE_OBJECT) != 0) {
- zval zv;
- ZVAL_OBJ(&zv, object);
- add_assoc_zval_ex(&stack_frame, "object", sizeof("object")-1, &zv);
- Z_ADDREF(zv);
+ ZVAL_OBJ(&tmp, object);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_OBJECT], &tmp);
+ Z_ADDREF(tmp);
}
- add_assoc_string_ex(&stack_frame, "type", sizeof("type")-1, "->");
+ ZVAL_INTERNED_STR(&tmp, CG(known_strings)[ZEND_STR_OBJECT_OPERATOR]);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_TYPE], &tmp);
} else if (func->common.scope) {
- add_assoc_str_ex(&stack_frame, "class", sizeof("class")-1, zend_string_copy(func->common.scope->name));
- add_assoc_string_ex(&stack_frame, "type", sizeof("type")-1, "::");
+ ZVAL_STR_COPY(&tmp, func->common.scope->name);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_CLASS], &tmp);
+ ZVAL_INTERNED_STR(&tmp, CG(known_strings)[ZEND_STR_PAAMAYIM_NEKUDOTAYIM]);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_TYPE], &tmp);
}
if ((options & DEBUG_BACKTRACE_IGNORE_ARGS) == 0 &&
func->type != ZEND_EVAL_CODE) {
- zval args;
- debug_backtrace_get_args(call, &args);
- add_assoc_zval_ex(&stack_frame, "args", sizeof("args")-1, &args);
+ debug_backtrace_get_args(call, &tmp);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_ARGS], &tmp);
}
} else {
/* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */
zend_bool build_filename_arg = 1;
+ zend_string *pseudo_function_name;
if (!ptr->func || !ZEND_USER_CODE(ptr->func->common.type) || ptr->opline->opcode != ZEND_INCLUDE_OR_EVAL) {
/* can happen when calling eval from a custom sapi */
- function_name = "unknown";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_UNKNOWN];
build_filename_arg = 0;
} else
switch (ptr->opline->extended_value) {
case ZEND_EVAL:
- function_name = "eval";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_EVAL];
build_filename_arg = 0;
break;
case ZEND_INCLUDE:
- function_name = "include";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_INCLUDE];
break;
case ZEND_REQUIRE:
- function_name = "require";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_REQUIRE];
break;
case ZEND_INCLUDE_ONCE:
- function_name = "include_once";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_INCLUDE_ONCE];
break;
case ZEND_REQUIRE_ONCE:
- function_name = "require_once";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_REQUIRE_ONCE];
break;
default:
/* this can actually happen if you use debug_backtrace() in your error_handler and
* you're in the top-scope */
- function_name = "unknown";
+ pseudo_function_name = CG(known_strings)[ZEND_STR_UNKNOWN];
build_filename_arg = 0;
break;
}
@@ -2621,11 +2772,13 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
if we have called include in the frame above - this is the file we have included.
*/
- add_next_index_string(&arg_array, (char*)include_filename);
- add_assoc_zval_ex(&stack_frame, "args", sizeof("args")-1, &arg_array);
+ ZVAL_STR_COPY(&tmp, include_filename);
+ zend_hash_next_index_insert_new(Z_ARRVAL(arg_array), &tmp);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_ARGS], &arg_array);
}
- add_assoc_string_ex(&stack_frame, "function", sizeof("function")-1, (char*)function_name);
+ ZVAL_INTERNED_STR(&tmp, pseudo_function_name);
+ zend_hash_add_new(Z_ARRVAL(stack_frame), CG(known_strings)[ZEND_STR_FUNCTION], &tmp);
}
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &stack_frame);
diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h
index 95a9f9f358..c14156d307 100644
--- a/Zend/zend_builtin_functions.h
+++ b/Zend/zend_builtin_functions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 7d2025c56f..810ac6a66c 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,13 +32,17 @@
#define ZEND_CLOSURE_PRINT_NAME "Closure object"
#define ZEND_CLOSURE_PROPERTY_ERROR() \
- zend_throw_error(zend_ce_error, "Closure object cannot have properties")
+ zend_throw_error(NULL, "Closure object cannot have properties")
+
+/* reuse bit to mark "fake" closures (it wasn't used for functions before) */
+#define ZEND_ACC_FAKE_CLOSURE ZEND_ACC_INTERFACE
typedef struct _zend_closure {
zend_object std;
zend_function func;
zval this_ptr;
zend_class_entry *called_scope;
+ void (*orig_internal_handler)(INTERNAL_FUNCTION_PARAMETERS);
} zend_closure;
/* non-static since it needs to be referenced */
@@ -48,17 +52,11 @@ static zend_object_handlers closure_handlers;
ZEND_METHOD(Closure, __invoke) /* {{{ */
{
zend_function *func = EX(func);
- zval *arguments;
+ zval *arguments = ZEND_CALL_ARG(execute_data, 1);
- arguments = emalloc(sizeof(zval) * ZEND_NUM_ARGS());
- if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), arguments) == FAILURE) {
- efree(arguments);
- zend_throw_error(zend_ce_error, "Cannot get arguments for calling closure");
- RETVAL_FALSE;
- } else if (call_user_function_ex(CG(function_table), NULL, getThis(), return_value, ZEND_NUM_ARGS(), arguments, 1, NULL) == FAILURE) {
+ if (call_user_function_ex(CG(function_table), NULL, getThis(), return_value, ZEND_NUM_ARGS(), arguments, 1, NULL) == FAILURE) {
RETVAL_FALSE;
}
- efree(arguments);
/* destruct the function also, then - we have allocated it in get_method */
zend_string_release(func->internal_function.function_name);
@@ -69,6 +67,48 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
}
/* }}} */
+static zend_bool zend_valid_closure_binding(
+ zend_closure *closure, zval *newthis, zend_class_entry *scope) /* {{{ */
+{
+ zend_function *func = &closure->func;
+ zend_bool is_fake_closure = (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) != 0;
+ if (newthis) {
+ if (func->common.fn_flags & ZEND_ACC_STATIC) {
+ zend_error(E_WARNING, "Cannot bind an instance to a static closure");
+ return 0;
+ }
+
+ if (is_fake_closure && func->common.scope &&
+ !instanceof_function(Z_OBJCE_P(newthis), func->common.scope)) {
+ /* Binding incompatible $this to an internal method is not supported. */
+ zend_error(E_WARNING, "Cannot bind method %s::%s() to object of class %s",
+ ZSTR_VAL(func->common.scope->name),
+ ZSTR_VAL(func->common.function_name),
+ ZSTR_VAL(Z_OBJCE_P(newthis)->name));
+ return 0;
+ }
+ } else if (!(func->common.fn_flags & ZEND_ACC_STATIC) && func->common.scope
+ && func->type == ZEND_INTERNAL_FUNCTION) {
+ zend_error(E_WARNING, "Cannot unbind $this of internal method");
+ return 0;
+ }
+
+ if (scope && scope != func->common.scope && scope->type == ZEND_INTERNAL_CLASS) {
+ /* rebinding to internal class is not allowed */
+ zend_error(E_WARNING, "Cannot bind closure to scope of internal class %s",
+ ZSTR_VAL(scope->name));
+ return 0;
+ }
+
+ if (is_fake_closure && scope != func->common.scope) {
+ zend_error(E_WARNING, "Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure()");
+ return 0;
+ }
+
+ return 1;
+}
+/* }}} */
+
/* {{{ proto mixed Closure::call(object to [, mixed parameter] [, mixed ...] )
Call closure, binding to a given object with its class as the scope */
ZEND_METHOD(Closure, call)
@@ -87,27 +127,11 @@ ZEND_METHOD(Closure, call)
}
zclosure = getThis();
- closure = (zend_closure *)Z_OBJ_P(zclosure);
-
- if (closure->func.common.fn_flags & ZEND_ACC_STATIC) {
- zend_error(E_WARNING, "Cannot bind an instance to a static closure");
- return;
- }
-
- if (closure->func.type == ZEND_INTERNAL_FUNCTION) {
- /* verify that we aren't binding internal function to a wrong object */
- if ((closure->func.common.fn_flags & ZEND_ACC_STATIC) == 0 &&
- !instanceof_function(Z_OBJCE_P(newthis), closure->func.common.scope)) {
- zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", ZSTR_VAL(closure->func.common.scope->name), ZSTR_VAL(closure->func.common.function_name), ZSTR_VAL(Z_OBJCE_P(newthis)->name));
- return;
- }
- }
+ closure = (zend_closure *) Z_OBJ_P(zclosure);
newobj = Z_OBJ_P(newthis);
- if (newobj->ce != closure->func.common.scope && newobj->ce->type == ZEND_INTERNAL_CLASS) {
- /* rebinding to internal class is not allowed */
- zend_error(E_WARNING, "Cannot bind closure to object of internal class %s", ZSTR_VAL(newobj->ce->name));
+ if (!zend_valid_closure_binding(closure, newthis, Z_OBJCE_P(newthis))) {
return;
}
@@ -121,23 +145,34 @@ ZEND_METHOD(Closure, call)
fci.param_count = my_param_count;
fci.object = fci_cache.object = newobj;
fci_cache.initialized = 1;
+ fci_cache.called_scope = Z_OBJCE_P(newthis);
- my_function = *fci_cache.function_handler;
- /* use scope of passed object */
- my_function.common.scope = Z_OBJCE_P(newthis);
- fci_cache.function_handler = &my_function;
-
- /* Runtime cache relies on bound scope to be immutable, hence we need a separate rt cache in case scope changed */
- if (ZEND_USER_CODE(my_function.type) && closure->func.common.scope != Z_OBJCE_P(newthis)) {
- my_function.op_array.run_time_cache = emalloc(my_function.op_array.cache_size);
- memset(my_function.op_array.run_time_cache, 0, my_function.op_array.cache_size);
+ if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_GENERATOR) {
+ zval new_closure;
+ zend_create_closure(&new_closure, fci_cache.function_handler, Z_OBJCE_P(newthis), closure->called_scope, newthis);
+ closure = (zend_closure *) Z_OBJ(new_closure);
+ fci_cache.function_handler = &closure->func;
+ } else {
+ memcpy(&my_function, fci_cache.function_handler, fci_cache.function_handler->type == ZEND_USER_FUNCTION ? sizeof(zend_op_array) : sizeof(zend_internal_function));
+ /* use scope of passed object */
+ my_function.common.scope = Z_OBJCE_P(newthis);
+ fci_cache.function_handler = &my_function;
+
+ /* Runtime cache relies on bound scope to be immutable, hence we need a separate rt cache in case scope changed */
+ if (ZEND_USER_CODE(my_function.type) && closure->func.common.scope != Z_OBJCE_P(newthis)) {
+ my_function.op_array.run_time_cache = emalloc(my_function.op_array.cache_size);
+ memset(my_function.op_array.run_time_cache, 0, my_function.op_array.cache_size);
+ }
}
if (zend_call_function(&fci, &fci_cache) == SUCCESS && Z_TYPE(closure_result) != IS_UNDEF) {
ZVAL_COPY_VALUE(return_value, &closure_result);
}
- if (ZEND_USER_CODE(my_function.type) && closure->func.common.scope != Z_OBJCE_P(newthis)) {
+ if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_GENERATOR) {
+ /* copied upon generator creation */
+ --GC_REFCOUNT(&closure->std);
+ } else if (ZEND_USER_CODE(my_function.type) && closure->func.common.scope != Z_OBJCE_P(newthis)) {
efree(my_function.op_array.run_time_cache);
}
}
@@ -152,15 +187,11 @@ ZEND_METHOD(Closure, bind)
zend_class_entry *ce, *called_scope;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {
- RETURN_NULL();
+ return;
}
closure = (zend_closure *)Z_OBJ_P(zclosure);
- if ((newthis != NULL) && (closure->func.common.fn_flags & ZEND_ACC_STATIC)) {
- zend_error(E_WARNING, "Cannot bind an instance to a static closure");
- }
-
if (scope_arg != NULL) { /* scope argument was given */
if (Z_TYPE_P(scope_arg) == IS_OBJECT) {
ce = Z_OBJCE_P(scope_arg);
@@ -177,15 +208,14 @@ ZEND_METHOD(Closure, bind)
}
zend_string_release(class_name);
}
- if(ce && ce != closure->func.common.scope && ce->type == ZEND_INTERNAL_CLASS) {
- /* rebinding to internal class is not allowed */
- zend_error(E_WARNING, "Cannot bind closure to scope of internal class %s", ZSTR_VAL(ce->name));
- return;
- }
} else { /* scope argument not given; do not change the scope by default */
ce = closure->func.common.scope;
}
+ if (!zend_valid_closure_binding(closure, newthis, ce)) {
+ return;
+ }
+
if (newthis) {
called_scope = Z_OBJCE_P(newthis);
} else {
@@ -205,9 +235,9 @@ ZEND_METHOD(Closure, bind)
}
/* }}} */
-static zend_function *zend_closure_get_constructor(zend_object *object) /* {{{ */
+static ZEND_COLD zend_function *zend_closure_get_constructor(zend_object *object) /* {{{ */
{
- zend_throw_error(zend_ce_error, "Instantiation of 'Closure' is not allowed");
+ zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed");
return NULL;
}
/* }}} */
@@ -241,7 +271,7 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zend_object *object) /* {
invoke->internal_function.handler = ZEND_MN(Closure___invoke);
invoke->internal_function.module = 0;
invoke->internal_function.scope = zend_ce_closure;
- invoke->internal_function.function_name = zend_string_init(ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1, 0);
+ invoke->internal_function.function_name = CG(known_strings)[ZEND_STR_MAGIC_INVOKE];
return invoke;
}
/* }}} */
@@ -262,14 +292,10 @@ ZEND_API zval* zend_get_closure_this_ptr(zval *obj) /* {{{ */
static zend_function *zend_closure_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */
{
- zend_string *lc_name;
-
- lc_name = zend_string_tolower(method);
- if (zend_string_equals_literal(method, ZEND_INVOKE_FUNC_NAME)) {
- zend_string_release(lc_name);
+ if (zend_string_equals_literal_ci(method, ZEND_INVOKE_FUNC_NAME)) {
return zend_get_closure_invoke_method(*object);
}
- zend_string_release(lc_name);
+
return std_object_handlers.get_method(object, method, key);
}
/* }}} */
@@ -356,23 +382,16 @@ static zend_object *zend_closure_clone(zval *zobject) /* {{{ */
int zend_closure_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */
{
- zend_closure *closure;
-
- if (Z_TYPE_P(obj) != IS_OBJECT) {
- return FAILURE;
- }
-
- closure = (zend_closure *)Z_OBJ_P(obj);
+ zend_closure *closure = (zend_closure *)Z_OBJ_P(obj);
*fptr_ptr = &closure->func;
*ce_ptr = closure->called_scope;
- if (obj_ptr) {
- if (Z_TYPE(closure->this_ptr) != IS_UNDEF) {
- *obj_ptr = Z_OBJ(closure->this_ptr);
- } else {
- *obj_ptr = NULL;
- }
+ if (Z_TYPE(closure->this_ptr) != IS_UNDEF) {
+ *obj_ptr = Z_OBJ(closure->this_ptr);
+ } else {
+ *obj_ptr = NULL;
}
+
return SUCCESS;
}
/* }}} */
@@ -392,12 +411,12 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
if (closure->func.type == ZEND_USER_FUNCTION && closure->func.op_array.static_variables) {
HashTable *static_variables = closure->func.op_array.static_variables;
ZVAL_ARR(&val, zend_array_dup(static_variables));
- zend_hash_str_update(debug_info, "static", sizeof("static")-1, &val);
+ zend_hash_update(debug_info, CG(known_strings)[ZEND_STR_STATIC], &val);
}
if (Z_TYPE(closure->this_ptr) != IS_UNDEF) {
Z_ADDREF(closure->this_ptr);
- zend_hash_str_update(debug_info, "this", sizeof("this")-1, &closure->this_ptr);
+ zend_hash_update(debug_info, CG(known_strings)[ZEND_STR_THIS], &closure->this_ptr);
}
if (arg_info &&
@@ -448,9 +467,9 @@ static HashTable *zend_closure_get_gc(zval *obj, zval **table, int *n) /* {{{ */
/* {{{ proto Closure::__construct()
Private constructor preventing instantiation */
-ZEND_METHOD(Closure, __construct)
+ZEND_COLD ZEND_METHOD(Closure, __construct)
{
- zend_throw_error(zend_ce_error, "Instantiation of 'Closure' is not allowed");
+ zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed");
}
/* }}} */
@@ -491,7 +510,6 @@ void zend_register_closure_ce(void) /* {{{ */
memcpy(&closure_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
closure_handlers.free_obj = zend_closure_free_storage;
- closure_handlers.clone_obj = NULL;
closure_handlers.get_constructor = zend_closure_get_constructor;
closure_handlers.get_method = zend_closure_get_method;
closure_handlers.write_property = zend_closure_write_property;
@@ -507,6 +525,15 @@ void zend_register_closure_ce(void) /* {{{ */
}
/* }}} */
+static void zend_closure_internal_handler(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
+{
+ zend_closure *closure = (zend_closure*)EX(func)->common.prototype;
+ closure->orig_internal_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ OBJ_RELEASE((zend_object*)closure);
+ EX(func) = NULL;
+}
+/* }}} */
+
ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr) /* {{{ */
{
zend_closure *closure;
@@ -515,23 +542,19 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
closure = (zend_closure *)Z_OBJ_P(res);
- memcpy(&closure->func, func, func->type == ZEND_USER_FUNCTION ? sizeof(zend_op_array) : sizeof(zend_internal_function));
- closure->func.common.prototype = (zend_function*)closure;
- closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
-
if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) {
/* use dummy scope if we're binding an object without specifying a scope */
/* maybe it would be better to create one for this purpose */
scope = zend_ce_closure;
}
- if (closure->func.type == ZEND_USER_FUNCTION) {
+ if (func->type == ZEND_USER_FUNCTION) {
+ memcpy(&closure->func, func, sizeof(zend_op_array));
+ closure->func.common.prototype = (zend_function*)closure;
+ closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
if (closure->func.op_array.static_variables) {
- HashTable *static_variables = closure->func.op_array.static_variables;
-
- ALLOC_HASHTABLE(closure->func.op_array.static_variables);
- zend_hash_init(closure->func.op_array.static_variables, zend_hash_num_elements(static_variables), NULL, ZVAL_PTR_DTOR, 0);
- zend_hash_apply_with_arguments(static_variables, zval_copy_static_var, 1, closure->func.op_array.static_variables);
+ closure->func.op_array.static_variables =
+ zend_array_dup(closure->func.op_array.static_variables);
}
if (UNEXPECTED(!closure->func.op_array.run_time_cache)) {
closure->func.op_array.run_time_cache = func->op_array.run_time_cache = zend_arena_alloc(&CG(arena), func->op_array.cache_size);
@@ -541,19 +564,20 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
(*closure->func.op_array.refcount)++;
}
} else {
- /* verify that we aren't binding internal function to a wrong scope */
- if(func->common.scope != NULL) {
- if(scope && !instanceof_function(scope, func->common.scope)) {
- zend_error(E_WARNING, "Cannot bind function %s::%s to scope class %s", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name), ZSTR_VAL(scope->name));
- scope = NULL;
- }
- if(scope && this_ptr && (func->common.fn_flags & ZEND_ACC_STATIC) == 0 &&
- !instanceof_function(Z_OBJCE_P(this_ptr), closure->func.common.scope)) {
- zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name), ZSTR_VAL(Z_OBJCE_P(this_ptr)->name));
- scope = NULL;
- this_ptr = NULL;
- }
+ memcpy(&closure->func, func, sizeof(zend_internal_function));
+ closure->func.common.prototype = (zend_function*)closure;
+ closure->func.common.fn_flags |= ZEND_ACC_CLOSURE;
+ /* wrap internal function handler to avoid memory leak */
+ if (UNEXPECTED(closure->func.internal_function.handler == zend_closure_internal_handler)) {
+ /* avoid infinity recursion, by taking handler from nested closure */
+ zend_closure *nested = (zend_closure*)((char*)func - XtOffsetOf(zend_closure, func));
+ ZEND_ASSERT(nested->std.ce == zend_ce_closure);
+ closure->orig_internal_handler = nested->orig_internal_handler;
} else {
+ closure->orig_internal_handler = closure->func.internal_function.handler;
+ }
+ closure->func.internal_function.handler = zend_closure_internal_handler;
+ if (!func->common.scope) {
/* if it's a free function, we won't set scope & this since they're meaningless */
this_ptr = NULL;
scope = NULL;
@@ -574,6 +598,25 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
}
/* }}} */
+ZEND_API void zend_create_fake_closure(zval *res, zend_function *func, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr) /* {{{ */
+{
+ zend_closure *closure;
+
+ zend_create_closure(res, func, scope, called_scope, this_ptr);
+
+ closure = (zend_closure *)Z_OBJ_P(res);
+ closure->func.common.fn_flags |= ZEND_ACC_FAKE_CLOSURE;
+}
+/* }}} */
+
+void zend_closure_bind_var(zval *closure_zv, zend_string *var_name, zval *var) /* {{{ */
+{
+ zend_closure *closure = (zend_closure *) Z_OBJ_P(closure_zv);
+ HashTable *static_variables = closure->func.op_array.static_variables;
+ zend_hash_update(static_variables, var_name, var);
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_closures.h b/Zend/zend_closures.h
index 8d0963ec17..7f8bac430c 100644
--- a/Zend/zend_closures.h
+++ b/Zend/zend_closures.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,10 +25,12 @@
BEGIN_EXTERN_C()
void zend_register_closure_ce(void);
+void zend_closure_bind_var(zval *closure_zv, zend_string *var_name, zval *var);
extern ZEND_API zend_class_entry *zend_ce_closure;
ZEND_API void zend_create_closure(zval *res, zend_function *op_array, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr);
+ZEND_API void zend_create_fake_closure(zval *res, zend_function *op_array, zend_class_entry *scope, zend_class_entry *called_scope, zval *this_ptr);
ZEND_API zend_function *zend_get_closure_invoke_method(zend_object *obj);
ZEND_API const zend_function *zend_get_closure_method_def(zval *obj);
ZEND_API zval* zend_get_closure_this_ptr(zval *obj);
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 5a15392fe9..2b935a8f4d 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,6 +32,7 @@
#include "zend_multibyte.h"
#include "zend_language_scanner.h"
#include "zend_inheritance.h"
+#include "zend_vm.h"
#define SET_NODE(target, src) do { \
target ## _type = (src)->op_type; \
@@ -53,6 +54,16 @@
#define FC(member) (CG(file_context).member)
+typedef struct _zend_loop_var {
+ zend_uchar opcode;
+ zend_uchar var_type;
+ uint32_t var_num;
+ union {
+ uint32_t try_catch_offset;
+ uint32_t live_range_offset;
+ } u;
+} zend_loop_var;
+
static inline void zend_alloc_cache_slot(uint32_t literal) {
zend_op_array *op_array = CG(active_op_array);
Z_CACHE_SLOT(op_array->literals[literal]) = op_array->cache_size;
@@ -75,6 +86,8 @@ ZEND_API zend_compiler_globals compiler_globals;
ZEND_API zend_executor_globals executor_globals;
#endif
+static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2);
+
static void zend_destroy_property_info_internal(zval *zv) /* {{{ */
{
zend_property_info *property_info = Z_PTR_P(zv);
@@ -84,6 +97,12 @@ static void zend_destroy_property_info_internal(zval *zv) /* {{{ */
}
/* }}} */
+static void zend_destroy_class_constant_internal(zval *zv) /* {{{ */
+{
+ free(Z_PTR_P(zv));
+}
+/* }}} */
+
static zend_string *zend_new_interned_string_safe(zend_string *str) /* {{{ */ {
zend_string *interned_str;
@@ -140,6 +159,7 @@ static const struct reserved_class_name reserved_class_names[] = {
{ZEND_STRL("static")},
{ZEND_STRL("string")},
{ZEND_STRL("true")},
+ {ZEND_STRL("void")},
{NULL, 0}
};
@@ -179,10 +199,11 @@ typedef struct _builtin_type_info {
} builtin_type_info;
static const builtin_type_info builtin_types[] = {
- {"int", sizeof("int") - 1, IS_LONG},
- {"float", sizeof("float") - 1, IS_DOUBLE},
- {"string", sizeof("string") - 1, IS_STRING},
- {"bool", sizeof("bool") - 1, _IS_BOOL},
+ {ZEND_STRL("int"), IS_LONG},
+ {ZEND_STRL("float"), IS_DOUBLE},
+ {ZEND_STRL("string"), IS_STRING},
+ {ZEND_STRL("bool"), _IS_BOOL},
+ {ZEND_STRL("void"), IS_VOID},
{NULL, 0, IS_UNDEF}
};
@@ -210,16 +231,23 @@ void zend_oparray_context_begin(zend_oparray_context *prev_context) /* {{{ */
CG(context).opcodes_size = INITIAL_OP_ARRAY_SIZE;
CG(context).vars_size = 0;
CG(context).literals_size = 0;
- CG(context).current_brk_cont = -1;
CG(context).backpatch_count = 0;
CG(context).in_finally = 0;
CG(context).fast_call_var = -1;
+ CG(context).try_catch_offset = -1;
+ CG(context).current_brk_cont = -1;
+ CG(context).last_brk_cont = 0;
+ CG(context).brk_cont_array = NULL;
CG(context).labels = NULL;
}
/* }}} */
void zend_oparray_context_end(zend_oparray_context *prev_context) /* {{{ */
{
+ if (CG(context).brk_cont_array) {
+ efree(CG(context).brk_cont_array);
+ CG(context).brk_cont_array = NULL;
+ }
if (CG(context).labels) {
zend_hash_destroy(CG(context).labels);
FREE_HASHTABLE(CG(context).labels);
@@ -283,7 +311,7 @@ void zend_file_context_end(zend_file_context *prev_context) /* {{{ */
void zend_init_compiler_data_structures(void) /* {{{ */
{
- zend_stack_init(&CG(loop_var_stack), sizeof(znode));
+ zend_stack_init(&CG(loop_var_stack), sizeof(zend_loop_var));
zend_stack_init(&CG(delayed_oplines_stack), sizeof(zend_op));
CG(active_class_entry) = NULL;
CG(in_compilation) = 0;
@@ -308,7 +336,7 @@ void init_compiler(void) /* {{{ */
memset(&CG(context), 0, sizeof(CG(context)));
zend_init_compiler_data_structures();
zend_init_rsrc_list();
- zend_hash_init(&CG(filenames_table), 8, NULL, free_string_zval, 0);
+ zend_hash_init(&CG(filenames_table), 8, NULL, ZVAL_PTR_DTOR, 0);
zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) file_handle_dtor, 0);
CG(unclean_shutdown) = 0;
}
@@ -326,17 +354,19 @@ void shutdown_compiler(void) /* {{{ */
ZEND_API zend_string *zend_set_compiled_filename(zend_string *new_compiled_filename) /* {{{ */
{
- zend_string *p;
+ zval *p, rv;
- p = zend_hash_find_ptr(&CG(filenames_table), new_compiled_filename);
- if (p != NULL) {
- CG(compiled_filename) = p;
- return p;
+ if ((p = zend_hash_find(&CG(filenames_table), new_compiled_filename))) {
+ ZEND_ASSERT(Z_TYPE_P(p) == IS_STRING);
+ CG(compiled_filename) = Z_STR_P(p);
+ return Z_STR_P(p);
}
- p = zend_string_copy(new_compiled_filename);
- zend_hash_update_ptr(&CG(filenames_table), new_compiled_filename, p);
- CG(compiled_filename) = p;
- return p;
+
+ ZVAL_STR_COPY(&rv, new_compiled_filename);
+ zend_hash_update(&CG(filenames_table), new_compiled_filename, &rv);
+
+ CG(compiled_filename) = new_compiled_filename;
+ return new_compiled_filename;
}
/* }}} */
@@ -557,90 +587,190 @@ void zend_stop_lexing(void)
LANG_SCNG(yy_cursor) = LANG_SCNG(yy_limit);
}
-static inline void zend_begin_loop(const znode *loop_var) /* {{{ */
+static uint32_t zend_start_live_range(zend_op_array *op_array, uint32_t start) /* {{{ */
+{
+ zend_live_range *range;
+
+ op_array->last_live_range++;
+ op_array->live_range = erealloc(op_array->live_range, sizeof(zend_live_range) * op_array->last_live_range);
+ range = op_array->live_range + op_array->last_live_range - 1;
+ range->start = start;
+ return op_array->last_live_range - 1;
+}
+/* }}} */
+
+static uint32_t zend_start_live_range_ex(zend_op_array *op_array, uint32_t start) /* {{{ */
+{
+ if (op_array->last_live_range == 0 ||
+ op_array->live_range[op_array->last_live_range - 1].start <= start) {
+ return zend_start_live_range(op_array, start);
+ } else {
+ /* Live ranges have to be sorted by "start" field */
+ uint32_t n = op_array->last_live_range;
+
+ /* move early ranges to make a room */
+ op_array->last_live_range = n + 1;
+ op_array->live_range = erealloc(op_array->live_range, sizeof(zend_live_range) * op_array->last_live_range);
+ do {
+ op_array->live_range[n] = op_array->live_range[n-1];
+ n--;
+ } while (n != 0 && op_array->live_range[n-1].start > start);
+
+ /* initialize new range */
+ op_array->live_range[n].start = start;
+
+ /* update referens to live-ranges from stack */
+ if (!zend_stack_is_empty(&CG(loop_var_stack))) {
+ zend_loop_var *loop_var = zend_stack_top(&CG(loop_var_stack));
+ zend_loop_var *base = zend_stack_base(&CG(loop_var_stack));
+ int check_opcodes = 0;
+
+ for (; loop_var >= base; loop_var--) {
+ if (loop_var->opcode == ZEND_RETURN) {
+ /* Stack separator */
+ break;
+ } else if (loop_var->opcode == ZEND_FREE ||
+ loop_var->opcode == ZEND_FE_FREE) {
+ if (loop_var->u.live_range_offset >= n) {
+ loop_var->u.live_range_offset++;
+ check_opcodes = 1;
+ } else {
+ break;
+ }
+ }
+ }
+
+ /* update previously generated FREE/FE_FREE opcodes */
+ if (check_opcodes) {
+ zend_op *opline = op_array->opcodes + op_array->live_range[n+1].start;
+ zend_op *end = op_array->opcodes + op_array->last;
+
+ while (opline < end) {
+ if ((opline->opcode == ZEND_FREE ||
+ opline->opcode == ZEND_FE_FREE) &&
+ (opline->extended_value & ZEND_FREE_ON_RETURN) &&
+ opline->op2.num >= n) {
+ opline->op2.num++;
+ }
+ opline++;
+ }
+ }
+ }
+ return n;
+ }
+}
+/* }}} */
+
+static void zend_end_live_range(zend_op_array *op_array, uint32_t offset, uint32_t end, uint32_t kind, uint32_t var) /* {{{ */
+{
+ zend_live_range *range = op_array->live_range + offset;
+
+ if (range->start == end && offset == op_array->last_live_range - 1) {
+ op_array->last_live_range--;
+ } else {
+ range->end = end;
+ range->var = (var * sizeof(zval)) | kind;
+ }
+}
+/* }}} */
+
+static inline void zend_begin_loop(zend_uchar free_opcode, const znode *loop_var) /* {{{ */
{
zend_brk_cont_element *brk_cont_element;
int parent = CG(context).current_brk_cont;
+ zend_loop_var info = {0};
- CG(context).current_brk_cont = CG(active_op_array)->last_brk_cont;
- brk_cont_element = get_next_brk_cont_element(CG(active_op_array));
+ CG(context).current_brk_cont = CG(context).last_brk_cont;
+ brk_cont_element = get_next_brk_cont_element();
brk_cont_element->parent = parent;
- if (loop_var) {
- zend_stack_push(&CG(loop_var_stack), loop_var);
- brk_cont_element->start = get_next_op_number(CG(active_op_array));
+ if (loop_var && (loop_var->op_type & (IS_VAR|IS_TMP_VAR))) {
+ uint32_t start = get_next_op_number(CG(active_op_array));
+
+ info.opcode = free_opcode;
+ info.var_type = loop_var->op_type;
+ info.var_num = loop_var->u.op.var;
+ info.u.live_range_offset = zend_start_live_range(CG(active_op_array), start);
+ brk_cont_element->start = start;
} else {
+ info.opcode = ZEND_NOP;
/* The start field is used to free temporary variables in case of exceptions.
* We won't try to free something of we don't have loop variable. */
brk_cont_element->start = -1;
}
+
+ zend_stack_push(&CG(loop_var_stack), &info);
}
/* }}} */
-static inline void zend_end_loop(int cont_addr) /* {{{ */
+static inline void zend_end_loop(int cont_addr, const znode *var_node) /* {{{ */
{
+ uint32_t end = get_next_op_number(CG(active_op_array));
zend_brk_cont_element *brk_cont_element
- = &CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont];
+ = &CG(context).brk_cont_array[CG(context).current_brk_cont];
brk_cont_element->cont = cont_addr;
- brk_cont_element->brk = get_next_op_number(CG(active_op_array));
+ brk_cont_element->brk = end;
CG(context).current_brk_cont = brk_cont_element->parent;
- if (brk_cont_element->start >= 0) {
- zend_stack_del_top(&CG(loop_var_stack));
+ if (brk_cont_element->start != -1) {
+ zend_loop_var *loop_var = zend_stack_top(&CG(loop_var_stack));
+ zend_end_live_range(CG(active_op_array), loop_var->u.live_range_offset, end,
+ loop_var->opcode == ZEND_FE_FREE ? ZEND_LIVE_LOOP : ZEND_LIVE_TMPVAR,
+ var_node->u.op.var);
}
+
+ zend_stack_del_top(&CG(loop_var_stack));
}
/* }}} */
void zend_do_free(znode *op1) /* {{{ */
{
- if (op1->op_type==IS_TMP_VAR) {
- zend_op *opline = get_next_op(CG(active_op_array));
-
- opline->opcode = ZEND_FREE;
- SET_NODE(opline->op1, op1);
- SET_UNUSED(opline->op2);
- } else if (op1->op_type==IS_VAR) {
+ if (op1->op_type == IS_TMP_VAR) {
zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
- while (opline->opcode == ZEND_END_SILENCE || opline->opcode == ZEND_EXT_FCALL_END || opline->opcode == ZEND_OP_DATA) {
+ while (opline->opcode == ZEND_END_SILENCE) {
+ opline--;
+ }
+
+ if (opline->result_type == IS_TMP_VAR && opline->result.var == op1->u.op.var) {
+ if (opline->opcode == ZEND_BOOL || opline->opcode == ZEND_BOOL_NOT) {
+ return;
+ }
+ }
+
+ zend_emit_op(NULL, ZEND_FREE, op1, NULL);
+ } else if (op1->op_type == IS_VAR) {
+ zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
+ while (opline->opcode == ZEND_END_SILENCE ||
+ opline->opcode == ZEND_EXT_FCALL_END ||
+ opline->opcode == ZEND_OP_DATA) {
opline--;
}
if (opline->result_type == IS_VAR
&& opline->result.var == op1->u.op.var) {
if (opline->opcode == ZEND_FETCH_R ||
opline->opcode == ZEND_FETCH_DIM_R ||
- opline->opcode == ZEND_FETCH_OBJ_R) {
+ opline->opcode == ZEND_FETCH_OBJ_R ||
+ opline->opcode == ZEND_FETCH_STATIC_PROP_R) {
/* It's very rare and useless case. It's better to use
additional FREE opcode and simplify the FETCH handlers
their selves */
- opline = get_next_op(CG(active_op_array));
- opline->opcode = ZEND_FREE;
- SET_NODE(opline->op1, op1);
- SET_UNUSED(opline->op2);
+ zend_emit_op(NULL, ZEND_FREE, op1, NULL);
} else {
- opline->result_type |= EXT_TYPE_UNUSED;
+ opline->result_type = IS_UNUSED;
}
} else {
while (opline >= CG(active_op_array)->opcodes) {
if (opline->opcode == ZEND_FETCH_LIST &&
opline->op1_type == IS_VAR &&
opline->op1.var == op1->u.op.var) {
- opline = get_next_op(CG(active_op_array));
-
- opline->opcode = ZEND_FREE;
- SET_NODE(opline->op1, op1);
- SET_UNUSED(opline->op2);
+ zend_emit_op(NULL, ZEND_FREE, op1, NULL);
return;
}
- if (opline->result_type==IS_VAR
+ if (opline->result_type == IS_VAR
&& opline->result.var == op1->u.op.var) {
if (opline->opcode == ZEND_NEW) {
- opline->result_type |= EXT_TYPE_UNUSED;
- opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
- while (opline->opcode != ZEND_DO_FCALL || opline->op1.num != ZEND_CALL_CTOR) {
- opline--;
- }
- opline->op1.num |= ZEND_CALL_CTOR_RESULT_UNUSED;
+ zend_emit_op(NULL, ZEND_FREE, op1, NULL);
}
break;
}
@@ -742,6 +872,7 @@ zend_string *zend_resolve_non_class_name(
if (ZSTR_VAL(name)[0] == '\\') {
/* Remove \ prefix (only relevant if this is a string rather than a label) */
+ *is_fully_qualified = 1;
return zend_string_init(ZSTR_VAL(name) + 1, ZSTR_LEN(name) - 1, 0);
}
@@ -863,9 +994,9 @@ zend_string *zend_resolve_class_name_ast(zend_ast *ast) /* {{{ */
}
/* }}} */
-static void ptr_dtor(zval *zv) /* {{{ */
+static void label_ptr_dtor(zval *zv) /* {{{ */
{
- efree(Z_PTR_P(zv));
+ efree_size(Z_PTR_P(zv), sizeof(zend_label));
}
/* }}} */
@@ -874,84 +1005,8 @@ static void str_dtor(zval *zv) /* {{{ */ {
}
/* }}} */
-void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2) /* {{{ */
-{
- zend_label *dest;
- int current, distance;
- zval *label;
-
- if (pass2) {
- label = RT_CONSTANT(op_array, opline->op2);
- } else {
- label = CT_CONSTANT_EX(op_array, opline->op2.constant);
- }
- if (CG(context).labels == NULL ||
- (dest = zend_hash_find_ptr(CG(context).labels, Z_STR_P(label))) == NULL) {
-
- if (pass2) {
- CG(in_compilation) = 1;
- CG(active_op_array) = op_array;
- CG(zend_lineno) = opline->lineno;
- zend_error_noreturn(E_COMPILE_ERROR, "'goto' to undefined label '%s'", Z_STRVAL_P(label));
- } else {
- /* Label is not defined. Delay to pass 2. */
- return;
- }
- }
-
- opline->op1.opline_num = dest->opline_num;
- zval_dtor(label);
- ZVAL_NULL(label);
-
- /* Check that we are not moving into loop or switch */
- current = opline->extended_value;
- for (distance = 0; current != dest->brk_cont; distance++) {
- if (current == -1) {
- if (pass2) {
- CG(in_compilation) = 1;
- CG(active_op_array) = op_array;
- CG(zend_lineno) = opline->lineno;
- }
- zend_error_noreturn(E_COMPILE_ERROR, "'goto' into loop or switch statement is disallowed");
- }
- current = op_array->brk_cont_array[current].parent;
- }
-
- if (distance == 0) {
- /* Nothing to break out of, optimize to ZEND_JMP */
- opline->opcode = ZEND_JMP;
- opline->extended_value = 0;
- SET_UNUSED(opline->op2);
- } else {
- /* Set real break distance */
- ZVAL_LONG(label, distance);
- }
-}
-/* }}} */
-
static zend_bool zend_is_call(zend_ast *ast);
-static int generate_free_loop_var(znode *var) /* {{{ */
-{
- switch (var->op_type) {
- case IS_UNUSED:
- /* Stack separator on function boundary, stop applying */
- return 1;
- case IS_VAR:
- case IS_TMP_VAR:
- {
- zend_op *opline = get_next_op(CG(active_op_array));
-
- opline->opcode = var->flag ? ZEND_FE_FREE : ZEND_FREE;
- SET_NODE(opline->op1, var);
- SET_UNUSED(opline->op2);
- }
- }
-
- return 0;
-}
-/* }}} */
-
static uint32_t zend_add_try_element(uint32_t try_op) /* {{{ */
{
zend_op_array *op_array = CG(active_op_array);
@@ -996,24 +1051,24 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */
ZEND_API int do_bind_function(const zend_op_array *op_array, const zend_op *opline, HashTable *function_table, zend_bool compile_time) /* {{{ */
{
zend_function *function, *new_function;
- zval *op1, *op2;
+ zval *lcname, *rtd_key;
if (compile_time) {
- op1 = CT_CONSTANT_EX(op_array, opline->op1.constant);
- op2 = CT_CONSTANT_EX(op_array, opline->op2.constant);
+ lcname = CT_CONSTANT_EX(op_array, opline->op1.constant);
+ rtd_key = lcname + 1;
} else {
- op1 = RT_CONSTANT(op_array, opline->op1);
- op2 = RT_CONSTANT(op_array, opline->op2);
+ lcname = RT_CONSTANT(op_array, opline->op1);
+ rtd_key = lcname + 1;
}
- function = zend_hash_find_ptr(function_table, Z_STR_P(op1));
+ function = zend_hash_find_ptr(function_table, Z_STR_P(rtd_key));
new_function = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
memcpy(new_function, function, sizeof(zend_op_array));
- if (zend_hash_add_ptr(function_table, Z_STR_P(op2), new_function) == NULL) {
+ if (zend_hash_add_ptr(function_table, Z_STR_P(lcname), new_function) == NULL) {
int error_level = compile_time ? E_COMPILE_ERROR : E_ERROR;
zend_function *old_function;
- if ((old_function = zend_hash_find_ptr(function_table, Z_STR_P(op2))) != NULL
+ if ((old_function = zend_hash_find_ptr(function_table, Z_STR_P(lcname))) != NULL
&& old_function->type == ZEND_USER_FUNCTION
&& old_function->op_array.last > 0) {
zend_error_noreturn(error_level, "Cannot redeclare %s() (previously declared in %s:%d)",
@@ -1037,21 +1092,21 @@ ZEND_API int do_bind_function(const zend_op_array *op_array, const zend_op *opli
ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time) /* {{{ */
{
zend_class_entry *ce;
- zval *op1, *op2;
+ zval *lcname, *rtd_key;
if (compile_time) {
- op1 = CT_CONSTANT_EX(op_array, opline->op1.constant);
- op2 = CT_CONSTANT_EX(op_array, opline->op2.constant);
+ lcname = CT_CONSTANT_EX(op_array, opline->op1.constant);
+ rtd_key = lcname + 1;
} else {
- op1 = RT_CONSTANT(op_array, opline->op1);
- op2 = RT_CONSTANT(op_array, opline->op2);
+ lcname = RT_CONSTANT(op_array, opline->op1);
+ rtd_key = lcname + 1;
}
- if ((ce = zend_hash_find_ptr(class_table, Z_STR_P(op1))) == NULL) {
- zend_error_noreturn(E_COMPILE_ERROR, "Internal Zend error - Missing class information for %s", Z_STRVAL_P(op1));
+ if ((ce = zend_hash_find_ptr(class_table, Z_STR_P(rtd_key))) == NULL) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Internal Zend error - Missing class information for %s", Z_STRVAL_P(rtd_key));
return NULL;
}
ce->refcount++;
- if (zend_hash_add_ptr(class_table, Z_STR_P(op2), ce) == NULL) {
+ if (zend_hash_add_ptr(class_table, Z_STR_P(lcname), ce) == NULL) {
ce->refcount--;
if (!compile_time) {
/* If we're in compile time, in practice, it's quite possible
@@ -1074,17 +1129,17 @@ ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const ze
ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time) /* {{{ */
{
zend_class_entry *ce;
- zval *op1, *op2;
+ zval *lcname, *rtd_key;
if (compile_time) {
- op1 = CT_CONSTANT_EX(op_array, opline->op1.constant);
- op2 = CT_CONSTANT_EX(op_array, opline->op2.constant);
+ lcname = CT_CONSTANT_EX(op_array, opline->op1.constant);
+ rtd_key = lcname + 1;
} else {
- op1 = RT_CONSTANT(op_array, opline->op1);
- op2 = RT_CONSTANT(op_array, opline->op2);
+ lcname = RT_CONSTANT(op_array, opline->op1);
+ rtd_key = lcname + 1;
}
- ce = zend_hash_find_ptr(class_table, Z_STR_P(op1));
+ ce = zend_hash_find_ptr(class_table, Z_STR_P(rtd_key));
if (!ce) {
if (!compile_time) {
@@ -1093,12 +1148,12 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array
* so we shut up about it. This allows the if (!defined('FOO')) { return; }
* approach to work.
*/
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare %s %s, because the name is already in use", zend_get_object_type(Z_OBJCE_P(op2)), Z_STRVAL_P(op2));
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare %s, because the name is already in use", zend_get_object_type(Z_OBJCE_P(lcname)), Z_STRVAL_P(lcname));
}
return NULL;
}
- if (zend_hash_exists(class_table, Z_STR_P(op2))) {
+ if (zend_hash_exists(class_table, Z_STR_P(lcname))) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare %s %s, because the name is already in use", zend_get_object_type(ce), ZSTR_VAL(ce->name));
}
@@ -1107,7 +1162,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array
ce->refcount++;
/* Register the derived class */
- if (zend_hash_add_ptr(class_table, Z_STR_P(op2), ce) == NULL) {
+ if (zend_hash_add_ptr(class_table, Z_STR_P(lcname), ce) == NULL) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare %s %s, because the name is already in use", zend_get_object_type(ce), ZSTR_VAL(ce->name));
}
return ce;
@@ -1181,13 +1236,39 @@ void zend_do_early_binding(void) /* {{{ */
return;
}
- zend_hash_del(table, Z_STR_P(CT_CONSTANT(opline->op1)));
+ zend_hash_del(table, Z_STR_P(CT_CONSTANT(opline->op1)+1));
+ zend_del_literal(CG(active_op_array), opline->op1.constant+1);
zend_del_literal(CG(active_op_array), opline->op1.constant);
- zend_del_literal(CG(active_op_array), opline->op2.constant);
MAKE_NOP(opline);
}
/* }}} */
+static void zend_mark_function_as_generator() /* {{{ */
+{
+ if (!CG(active_op_array)->function_name) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "The \"yield\" expression can only be used inside a function");
+ }
+
+ if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
+ const char *msg = "Generators may only declare a return type of Generator, Iterator or Traversable, %s is not permitted";
+ zend_arg_info return_info = CG(active_op_array)->arg_info[-1];
+
+ if (!return_info.class_name) {
+ zend_error_noreturn(E_COMPILE_ERROR, msg, zend_get_type_by_const(return_info.type_hint));
+ }
+
+ if (!zend_string_equals_literal_ci(return_info.class_name, "Traversable")
+ && !zend_string_equals_literal_ci(return_info.class_name, "Iterator")
+ && !zend_string_equals_literal_ci(return_info.class_name, "Generator")) {
+ zend_error_noreturn(E_COMPILE_ERROR, msg, ZSTR_VAL(return_info.class_name));
+ }
+ }
+
+ CG(active_op_array)->fn_flags |= ZEND_ACC_GENERATOR;
+}
+/* }}} */
+
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array) /* {{{ */
{
if (op_array->early_binding != (uint32_t)-1) {
@@ -1231,10 +1312,11 @@ static zend_always_inline size_t zend_strnlen(const char* s, size_t maxlen) /* {
ZEND_API int zend_unmangle_property_name_ex(const zend_string *name, const char **class_name, const char **prop_name, size_t *prop_len) /* {{{ */
{
size_t class_name_len;
+ size_t anonclass_src_len;
*class_name = NULL;
- if (ZSTR_VAL(name)[0] != '\0') {
+ if (!ZSTR_LEN(name) || ZSTR_VAL(name)[0] != '\0') {
*prop_name = ZSTR_VAL(name);
if (prop_len) {
*prop_len = ZSTR_LEN(name);
@@ -1261,6 +1343,10 @@ ZEND_API int zend_unmangle_property_name_ex(const zend_string *name, const char
}
*class_name = ZSTR_VAL(name) + 1;
+ anonclass_src_len = zend_strnlen(*class_name + class_name_len + 1, ZSTR_LEN(name) - class_name_len - 2);
+ if (class_name_len + anonclass_src_len + 2 != ZSTR_LEN(name)) {
+ class_name_len += anonclass_src_len + 1;
+ }
*prop_name = ZSTR_VAL(name) + class_name_len + 2;
if (prop_len) {
*prop_len = ZSTR_LEN(name) - class_name_len - 2;
@@ -1429,14 +1515,15 @@ static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_a
static zend_bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name, zend_string *name) /* {{{ */
{
uint32_t fetch_type = zend_get_class_fetch_type(class_name);
+ zend_class_constant *cc;
zval *c;
if (class_name_refers_to_active_ce(class_name, fetch_type)) {
- c = zend_hash_find(&CG(active_class_entry)->constants_table, name);
+ cc = zend_hash_find_ptr(&CG(active_class_entry)->constants_table, name);
} else if (fetch_type == ZEND_FETCH_CLASS_DEFAULT && !(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION)) {
zend_class_entry *ce = zend_hash_find_ptr_lc(CG(class_table), ZSTR_VAL(class_name), ZSTR_LEN(class_name));
if (ce) {
- c = zend_hash_find(&ce->constants_table, name);
+ cc = zend_hash_find_ptr(&ce->constants_table, name);
} else {
return 0;
}
@@ -1448,8 +1535,14 @@ static zend_bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name,
return 0;
}
+ if (!cc || !zend_verify_const_access(cc, CG(active_class_entry))) {
+ return 0;
+ }
+
+ c = &cc->value;
+
/* Substitute case-sensitive (or lowercase) persistent class constants */
- if (c && Z_TYPE_P(c) < IS_OBJECT) {
+ if (Z_TYPE_P(c) < IS_OBJECT) {
ZVAL_DUP(zv, c);
return 1;
}
@@ -1598,6 +1691,10 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
again:
ZVAL_UNDEF(&zv);
retval = lex_scan(&zv);
+ if (EG(exception)) {
+ return T_ERROR;
+ }
+
switch (retval) {
case T_COMMENT:
case T_DOC_COMMENT:
@@ -1626,15 +1723,18 @@ again:
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers) /* {{{ */
{
zend_bool persistent_hashes = (ce->type == ZEND_INTERNAL_CLASS) ? 1 : 0;
- dtor_func_t zval_ptr_dtor_func = ((persistent_hashes) ? ZVAL_INTERNAL_PTR_DTOR : ZVAL_PTR_DTOR);
ce->refcount = 1;
ce->ce_flags = ZEND_ACC_CONSTANTS_UPDATED;
+ if (CG(compiler_options) & ZEND_COMPILE_GUARDS) {
+ ce->ce_flags |= ZEND_ACC_USE_GUARDS;
+ }
+
ce->default_properties_table = NULL;
ce->default_static_members_table = NULL;
zend_hash_init_ex(&ce->properties_info, 8, NULL, (persistent_hashes ? zend_destroy_property_info_internal : NULL), persistent_hashes, 0);
- zend_hash_init_ex(&ce->constants_table, 8, NULL, zval_ptr_dtor_func, persistent_hashes, 0);
+ zend_hash_init_ex(&ce->constants_table, 8, NULL, (persistent_hashes ? zend_destroy_class_constant_internal : NULL), persistent_hashes, 0);
zend_hash_init_ex(&ce->function_table, 8, NULL, ZEND_FUNCTION_DTOR, persistent_hashes, 0);
if (ce->type == ZEND_INTERNAL_CLASS) {
@@ -1722,18 +1822,6 @@ zend_ast *zend_ast_append_str(zend_ast *left_ast, zend_ast *right_ast) /* {{{ */
}
/* }}} */
-/* A hacky way that is used to store the doc comment for properties */
-zend_ast *zend_ast_append_doc_comment(zend_ast *list) /* {{{ */
-{
- if (CG(doc_comment)) {
- list = zend_ast_list_add(list, zend_ast_create_zval_from_str(CG(doc_comment)));
- CG(doc_comment) = NULL;
- }
-
- return list;
-}
-/* }}} */
-
void zend_verify_namespace(void) /* {{{ */
{
if (FC(has_bracketed_namespaces) && !FC(in_namespace)) {
@@ -1749,7 +1837,7 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
register char *end = path + len - 1;
unsigned int len_adjust = 0;
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
/* Note that on Win32 CWD is per drive (heritage from CP/M).
* This means dirname("c:foo") maps to "c:." or "c:" - which means CWD on C: drive.
*/
@@ -1838,25 +1926,26 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
static void zend_adjust_for_fetch_type(zend_op *opline, uint32_t type) /* {{{ */
{
+ zend_uchar factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3;
+
switch (type & BP_VAR_MASK) {
case BP_VAR_R:
return;
case BP_VAR_W:
- case BP_VAR_REF:
- opline->opcode += 3;
+ opline->opcode += 1 * factor;
return;
case BP_VAR_RW:
- opline->opcode += 6;
+ opline->opcode += 2 * factor;
return;
case BP_VAR_IS:
- opline->opcode += 9;
+ opline->opcode += 3 * factor;
return;
case BP_VAR_FUNC_ARG:
- opline->opcode += 12;
+ opline->opcode += 4 * factor;
opline->extended_value |= type >> BP_VAR_SHIFT;
return;
case BP_VAR_UNSET:
- opline->opcode += 15;
+ opline->opcode += 5 * factor;
return;
EMPTY_SWITCH_DEFAULT_CASE()
}
@@ -1879,6 +1968,136 @@ static inline void zend_make_tmp_result(znode *result, zend_op *opline) /* {{{ *
}
/* }}} */
+static void zend_find_live_range(zend_op *opline, zend_uchar type, uint32_t var) /* {{{ */
+{
+ zend_op *def = opline;
+
+ while (def != CG(active_op_array)->opcodes) {
+ def--;
+ if (def->result_type == type && def->result.var == var) {
+ if (def->opcode == ZEND_ADD_ARRAY_ELEMENT ||
+ def->opcode == ZEND_ROPE_ADD) {
+ /* not a real definition */
+ continue;
+ } else if (def->opcode == ZEND_JMPZ_EX ||
+ def->opcode == ZEND_JMPNZ_EX ||
+ def->opcode == ZEND_BOOL ||
+ def->opcode == ZEND_BOOL_NOT) {
+ /* result IS_BOOL, it does't have to be destroyed */
+ break;
+ } else if (def->opcode == ZEND_DECLARE_CLASS ||
+ def->opcode == ZEND_DECLARE_INHERITED_CLASS ||
+ def->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED ||
+ def->opcode == ZEND_DECLARE_ANON_CLASS ||
+ def->opcode == ZEND_DECLARE_ANON_INHERITED_CLASS) {
+ /* classes don't have to be destroyed */
+ break;
+ } else if (def->opcode == ZEND_FAST_CALL) {
+ /* fast_calls don't have to be destroyed */
+ break;
+ } else if (def->opcode == ZEND_NEW) {
+ /* Objects created via ZEND_NEW are only fully initialized
+ * after the DO_FCALL (constructor call) */
+ def = CG(active_op_array)->opcodes + def->op2.opline_num - 1;
+ if (def + 1 == opline) {
+ break;
+ }
+ }
+
+ zend_end_live_range(CG(active_op_array),
+ zend_start_live_range_ex(CG(active_op_array),
+ def + 1 - CG(active_op_array)->opcodes),
+ opline - CG(active_op_array)->opcodes,
+ ZEND_LIVE_TMPVAR, var);
+ break;
+ }
+ }
+}
+/* }}} */
+
+static zend_always_inline int zend_is_def_range(zend_op *opline, zend_uchar type, uint32_t var) /* {{{ */
+{
+ while (1) {
+ if (opline->result_type == type && opline->result.var == var) {
+ return opline->opcode != ZEND_ADD_ARRAY_ELEMENT &&
+ opline->opcode != ZEND_ROPE_ADD;
+ } else if (opline->opcode == ZEND_OP_DATA) {
+ return (opline-1)->result_type == type &&
+ (opline-1)->result.var == var;
+ } else if (opline->opcode == ZEND_END_SILENCE ||
+ opline->opcode == ZEND_NOP ||
+ opline->opcode == ZEND_EXT_NOP ||
+ opline->opcode == ZEND_EXT_STMT ||
+ opline->opcode == ZEND_EXT_FCALL_BEGIN ||
+ opline->opcode == ZEND_EXT_FCALL_END ||
+ opline->opcode == ZEND_TICKS) {
+ opline--;
+ } else {
+ return 0;
+ }
+ }
+}
+/* }}} */
+
+static void zend_check_live_ranges(zend_op *opline) /* {{{ */
+{
+ if ((opline->op1_type & (IS_VAR|IS_TMP_VAR)) &&
+ !zend_is_def_range(opline - 1, opline->op1_type, opline->op1.var)) {
+
+ if (opline->opcode == ZEND_OP_DATA) {
+ if (!zend_is_def_range(opline - 2, opline->op1_type, opline->op1.var)) {
+ zend_find_live_range(opline - 1, opline->op1_type, opline->op1.var);
+ }
+ } else if (opline->opcode == ZEND_INIT_STATIC_METHOD_CALL ||
+ opline->opcode == ZEND_NEW ||
+ opline->opcode == ZEND_FETCH_CLASS_CONSTANT ||
+ opline->opcode == ZEND_ADD_INTERFACE ||
+ opline->opcode == ZEND_ADD_TRAIT ||
+ opline->opcode == ZEND_BIND_TRAITS ||
+ opline->opcode == ZEND_VERIFY_ABSTRACT_CLASS) {
+ /* classes don't have to be destroyed */
+ } else if (opline->opcode == ZEND_FAST_RET) {
+ /* fast_calls don't have to be destroyed */
+ } else if (opline->opcode == ZEND_CASE ||
+ opline->opcode == ZEND_FE_FETCH_R ||
+ opline->opcode == ZEND_FE_FETCH_RW ||
+ opline->opcode == ZEND_FE_FREE ||
+ opline->opcode == ZEND_ROPE_ADD ||
+ opline->opcode == ZEND_ROPE_END ||
+ opline->opcode == ZEND_END_SILENCE ||
+ opline->opcode == ZEND_FETCH_LIST ||
+ opline->opcode == ZEND_VERIFY_RETURN_TYPE ||
+ opline->opcode == ZEND_BIND_LEXICAL) {
+ /* these opcodes are handled separately */
+ } else {
+ zend_find_live_range(opline, opline->op1_type, opline->op1.var);
+ }
+ }
+
+ if ((opline->op2_type & (IS_VAR|IS_TMP_VAR)) &&
+ !zend_is_def_range(opline - 1, opline->op2_type, opline->op2.var)) {
+
+ if (opline->opcode == ZEND_OP_DATA) {
+ if (!zend_is_def_range(opline - 2, opline->op2_type, opline->op2.var)) {
+ zend_find_live_range(opline-1, opline->op2_type, opline->op2.var);
+ }
+ } else if (opline->opcode == ZEND_FETCH_STATIC_PROP_R ||
+ opline->opcode == ZEND_FETCH_STATIC_PROP_W ||
+ opline->opcode == ZEND_FETCH_STATIC_PROP_RW ||
+ opline->opcode == ZEND_FETCH_STATIC_PROP_IS ||
+ opline->opcode == ZEND_FETCH_STATIC_PROP_FUNC_ARG ||
+ opline->opcode == ZEND_FETCH_STATIC_PROP_UNSET ||
+ opline->opcode == ZEND_UNSET_STATIC_PROP ||
+ opline->opcode == ZEND_ISSET_ISEMPTY_STATIC_PROP ||
+ opline->opcode == ZEND_INSTANCEOF) {
+ /* classes don't have to be destroyed */
+ } else {
+ zend_find_live_range(opline, opline->op2_type, opline->op2.var);
+ }
+ }
+}
+/* }}} */
+
static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode *op2) /* {{{ */
{
zend_op *opline = get_next_op(CG(active_op_array));
@@ -1896,6 +2115,8 @@ static zend_op *zend_emit_op(znode *result, zend_uchar opcode, znode *op1, znode
SET_NODE(opline->op2, op2);
}
+ zend_check_live_ranges(opline);
+
if (result) {
zend_make_var_result(result, opline);
}
@@ -1920,6 +2141,8 @@ static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, z
SET_NODE(opline->op2, op2);
}
+ zend_check_live_ranges(opline);
+
if (result) {
zend_make_tmp_result(result, opline);
}
@@ -1930,7 +2153,14 @@ static zend_op *zend_emit_op_tmp(znode *result, zend_uchar opcode, znode *op1, z
static void zend_emit_tick(void) /* {{{ */
{
- zend_op *opline = get_next_op(CG(active_op_array));
+ zend_op *opline;
+
+ /* This prevents a double TICK generated by the parser statement of "declare()" */
+ if (CG(active_op_array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) {
+ return;
+ }
+
+ opline = get_next_op(CG(active_op_array));
opline->opcode = ZEND_TICKS;
SET_UNUSED(opline->op1);
@@ -1974,6 +2204,7 @@ static inline void zend_update_jump_target(uint32_t opnum_jump, uint32_t opnum_t
case ZEND_JMPNZ:
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
+ case ZEND_JMP_SET:
opline->op2.opline_num = opnum_target;
break;
EMPTY_SWITCH_DEFAULT_CASE()
@@ -2022,20 +2253,62 @@ static zend_op *zend_delayed_compile_end(uint32_t offset) /* {{{ */
zend_op *opline = NULL, *oplines = zend_stack_base(&CG(delayed_oplines_stack));
uint32_t i, count = zend_stack_count(&CG(delayed_oplines_stack));
- ZEND_ASSERT(count > offset);
+ ZEND_ASSERT(count >= offset);
for (i = offset; i < count; ++i) {
opline = get_next_op(CG(active_op_array));
memcpy(opline, &oplines[i], sizeof(zend_op));
+ zend_check_live_ranges(opline);
}
CG(delayed_oplines_stack).top = offset;
return opline;
}
/* }}} */
-static void zend_emit_return_type_check(znode *expr, zend_arg_info *return_info) /* {{{ */
+static void zend_emit_return_type_check(
+ znode *expr, zend_arg_info *return_info, zend_bool implicit) /* {{{ */
{
+ /* `return ...;` is illegal in a void function (but `return;` isn't) */
+ if (return_info->type_hint == IS_VOID) {
+ if (expr) {
+ if (expr->op_type == IS_CONST && Z_TYPE(expr->u.constant) == IS_NULL) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "A void function must not return a value "
+ "(did you mean \"return;\" instead of \"return null;\"?)");
+ } else {
+ zend_error_noreturn(E_COMPILE_ERROR, "A void function must not return a value");
+ }
+ }
+ /* we don't need run-time check */
+ return;
+ }
+
if (return_info->type_hint != IS_UNDEF) {
- zend_op *opline = zend_emit_op(NULL, ZEND_VERIFY_RETURN_TYPE, expr, NULL);
+ zend_op *opline;
+
+ if (!expr && !implicit) {
+ if (return_info->allow_null) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "A function with return type must return a value "
+ "(did you mean \"return null;\" instead of \"return;\"?)");
+ } else {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "A function with return type must return a value");
+ }
+ }
+
+ if (expr && expr->op_type == IS_CONST) {
+ if ((return_info->type_hint == Z_TYPE(expr->u.constant))
+ ||((return_info->type_hint == _IS_BOOL)
+ && (Z_TYPE(expr->u.constant) == IS_FALSE
+ || Z_TYPE(expr->u.constant) == IS_TRUE))
+ || (return_info->allow_null
+ && Z_TYPE(expr->u.constant) == IS_NULL)) {
+ /* we don't need run-time check */
+ return;
+ }
+ }
+
+ opline = zend_emit_op(NULL, ZEND_VERIFY_RETURN_TYPE, expr, NULL);
if (expr && expr->op_type == IS_CONST) {
opline->result_type = expr->op_type = IS_TMP_VAR;
opline->result.var = expr->u.op.var = get_temporary_variable(CG(active_op_array));
@@ -2050,23 +2323,26 @@ static void zend_emit_return_type_check(znode *expr, zend_arg_info *return_info)
}
/* }}} */
-void zend_emit_final_return(zval *zv) /* {{{ */
+void zend_emit_final_return(int return_one) /* {{{ */
{
znode zn;
+ zend_op *ret;
zend_bool returns_reference = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
- if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
- zend_emit_return_type_check(NULL, CG(active_op_array)->arg_info - 1);
+ if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE
+ && !(CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR)) {
+ zend_emit_return_type_check(NULL, CG(active_op_array)->arg_info - 1, 1);
}
zn.op_type = IS_CONST;
- if (zv) {
- ZVAL_COPY_VALUE(&zn.u.constant, zv);
+ if (return_one) {
+ ZVAL_LONG(&zn.u.constant, 1);
} else {
ZVAL_NULL(&zn.u.constant);
}
- zend_emit_op(NULL, returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN, &zn, NULL);
+ ret = zend_emit_op(NULL, returns_reference ? ZEND_RETURN_BY_REF : ZEND_RETURN, &zn, NULL);
+ ret->extended_value = -1;
}
/* }}} */
@@ -2089,7 +2365,9 @@ static inline zend_bool zend_is_call(zend_ast *ast) /* {{{ */
static inline zend_bool zend_is_unticked_stmt(zend_ast *ast) /* {{{ */
{
- return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL;
+ return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL
+ || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_DECL
+ || ast->kind == ZEND_AST_USE_TRAIT || ast->kind == ZEND_AST_METHOD;
}
/* }}} */
@@ -2145,8 +2423,15 @@ static zend_op *zend_compile_class_ref(znode *result, zend_ast *name_ast, int th
zend_compile_expr(&name_node, name_ast);
if (name_node.op_type == IS_CONST) {
- zend_string *name = Z_STR(name_node.u.constant);
- uint32_t fetch_type = zend_get_class_fetch_type(name);
+ zend_string *name;
+ uint32_t fetch_type;
+
+ if (Z_TYPE(name_node.u.constant) != IS_STRING) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Illegal class name");
+ }
+
+ name = Z_STR(name_node.u.constant);
+ fetch_type = zend_get_class_fetch_type(name);
opline = zend_emit_op(result, ZEND_FETCH_CLASS, NULL, NULL);
opline->extended_value = fetch_type | (throw_exception ? ZEND_FETCH_CLASS_EXCEPTION : 0);
@@ -2170,6 +2455,61 @@ static zend_op *zend_compile_class_ref(znode *result, zend_ast *name_ast, int th
}
/* }}} */
+static void zend_compile_class_ref_ex(znode *result, zend_ast *name_ast, uint32_t fetch_flags) /* {{{ */
+{
+ uint32_t fetch_type;
+
+ if (name_ast->kind != ZEND_AST_ZVAL) {
+ znode name_node;
+
+ zend_compile_expr(&name_node, name_ast);
+
+ if (name_node.op_type == IS_CONST) {
+ zend_string *name;
+
+ if (Z_TYPE(name_node.u.constant) != IS_STRING) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Illegal class name");
+ }
+
+ name = Z_STR(name_node.u.constant);
+ fetch_type = zend_get_class_fetch_type(name);
+
+ if (fetch_type == ZEND_FETCH_CLASS_DEFAULT) {
+ result->op_type = IS_CONST;
+ ZVAL_STR(&result->u.constant, zend_resolve_class_name(name, ZEND_NAME_FQ));
+ } else {
+ zend_ensure_valid_class_fetch_type(fetch_type);
+ result->op_type = IS_UNUSED;
+ result->u.op.num = fetch_type | fetch_flags;
+ }
+
+ zend_string_release(name);
+ } else {
+ zend_op *opline = zend_emit_op(result, ZEND_FETCH_CLASS, NULL, &name_node);
+ opline->extended_value = ZEND_FETCH_CLASS_DEFAULT | fetch_flags;
+ }
+ return;
+ }
+
+ /* Fully qualified names are always default refs */
+ if (name_ast->attr == ZEND_NAME_FQ) {
+ result->op_type = IS_CONST;
+ ZVAL_STR(&result->u.constant, zend_resolve_class_name_ast(name_ast));
+ return;
+ }
+
+ fetch_type = zend_get_class_fetch_type(zend_ast_get_str(name_ast));
+ if (ZEND_FETCH_CLASS_DEFAULT == fetch_type) {
+ result->op_type = IS_CONST;
+ ZVAL_STR(&result->u.constant, zend_resolve_class_name_ast(name_ast));
+ } else {
+ zend_ensure_valid_class_fetch_type(fetch_type);
+ result->op_type = IS_UNUSED;
+ result->u.op.num = fetch_type | fetch_flags;
+ }
+}
+/* }}} */
+
static int zend_try_compile_cv(znode *result, zend_ast *ast) /* {{{ */
{
zend_ast *name_ast = ast->child[0];
@@ -2224,7 +2564,7 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint
if (ast->kind != ZEND_AST_ZVAL
&& CG(active_op_array)->scope && CG(active_op_array)->this_var == (uint32_t)-1
) {
- zend_string *key = zend_string_init("this", sizeof("this") - 1, 0);
+ zend_string *key = CG(known_strings)[ZEND_STR_THIS];
CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), key);
}
}
@@ -2258,13 +2598,13 @@ static void zend_separate_if_call_and_write(znode *node, zend_ast *ast, uint32_t
void zend_delayed_compile_var(znode *result, zend_ast *ast, uint32_t type);
void zend_compile_assign(znode *result, zend_ast *ast);
-static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node);
+static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node, zend_bool old_style);
static inline void zend_emit_assign_znode(zend_ast *var_ast, znode *value_node) /* {{{ */
{
znode dummy_node;
- if (var_ast->kind == ZEND_AST_LIST) {
- zend_compile_list_assign(&dummy_node, var_ast, value_node);
+ if (var_ast->kind == ZEND_AST_ARRAY) {
+ zend_compile_list_assign(&dummy_node, var_ast, value_node, var_ast->attr);
} else {
zend_ast *assign_ast = zend_ast_create(ZEND_AST_ASSIGN, var_ast,
zend_ast_create_znode(value_node));
@@ -2376,21 +2716,17 @@ zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t
znode class_node, prop_node;
zend_op *opline;
- if (zend_is_const_default_class_ref(class_ast)) {
- class_node.op_type = IS_CONST;
- ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast));
- } else {
- zend_compile_class_ref(&class_node, class_ast, 1);
- }
+ zend_compile_class_ref_ex(&class_node, class_ast, ZEND_FETCH_CLASS_EXCEPTION);
zend_compile_expr(&prop_node, prop_ast);
if (delayed) {
- opline = zend_delayed_emit_op(result, ZEND_FETCH_R, &prop_node, NULL);
+ opline = zend_delayed_emit_op(result, ZEND_FETCH_STATIC_PROP_R, &prop_node, NULL);
} else {
- opline = zend_emit_op(result, ZEND_FETCH_R, &prop_node, NULL);
+ opline = zend_emit_op(result, ZEND_FETCH_STATIC_PROP_R, &prop_node, NULL);
}
if (opline->op1_type == IS_CONST) {
+ convert_to_string(CT_CONSTANT(opline->op1));
zend_alloc_polymorphic_cache_slot(opline->op1.constant);
}
if (class_node.op_type == IS_CONST) {
@@ -2400,7 +2736,6 @@ zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t
} else {
SET_NODE(opline->op2, &class_node);
}
- opline->extended_value |= ZEND_FETCH_STATIC_MEMBER;
return opline;
}
@@ -2413,19 +2748,35 @@ void zend_compile_static_prop(znode *result, zend_ast *ast, uint32_t type, int d
}
/* }}} */
-static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node) /* {{{ */
+static void zend_verify_list_assign_target(zend_ast *var_ast, zend_bool old_style) /* {{{ */ {
+ if (var_ast->kind == ZEND_AST_ARRAY) {
+ if (old_style != var_ast->attr) {
+ zend_error(E_COMPILE_ERROR, "Cannot mix [] and list()");
+ }
+ } else if (!zend_can_write_to_variable(var_ast)) {
+ zend_error(E_COMPILE_ERROR, "Assignments can only happen to writable values");
+ }
+}
+/* }}} */
+
+static void zend_compile_unkeyed_list_assign(zend_ast_list *list, znode *expr_node, zend_bool old_style) /* {{{ */
{
- zend_ast_list *list = zend_ast_get_list(ast);
uint32_t i;
zend_bool has_elems = 0;
for (i = 0; i < list->children; ++i) {
- zend_ast *var_ast = list->child[i];
+ zend_ast *elem_ast = list->child[i];
+ zend_ast *var_ast;
znode fetch_result, dim_node;
- if (var_ast == NULL) {
+ if (elem_ast == NULL) {
continue;
}
+ if (elem_ast->attr) {
+ zend_error(E_COMPILE_ERROR, "[] and list() assignments cannot be by reference");
+ }
+
+ var_ast = elem_ast->child[0];
has_elems = 1;
dim_node.op_type = IS_CONST;
@@ -2435,6 +2786,12 @@ static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_n
Z_TRY_ADDREF(expr_node->u.constant);
}
+ if (elem_ast->child[1] != NULL) {
+ zend_error(E_COMPILE_ERROR, "Cannot mix keyed and unkeyed array entries in assignments");
+ }
+
+ zend_verify_list_assign_target(var_ast, old_style);
+
zend_emit_op(&fetch_result, ZEND_FETCH_LIST, expr_node, &dim_node);
zend_emit_assign_znode(var_ast, &fetch_result);
}
@@ -2442,6 +2799,54 @@ static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_n
if (!has_elems) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use empty list");
}
+}
+/* }}} */
+
+static void zend_compile_keyed_list_assign(zend_ast_list *list, znode *expr_node, zend_bool old_style) /* {{{ */
+{
+ uint32_t i;
+
+ for (i = 0; i < list->children; ++i) {
+ zend_ast *pair_ast = list->child[i];
+ zend_ast *var_ast = pair_ast->child[0];
+ zend_ast *key_ast = pair_ast->child[1];
+ znode fetch_result, dim_node;
+
+ if (pair_ast->attr) {
+ zend_error(E_COMPILE_ERROR, "[] and list() assignments cannot be by reference");
+ }
+
+ zend_compile_expr(&dim_node, key_ast);
+
+ if (expr_node->op_type == IS_CONST) {
+ Z_TRY_ADDREF(expr_node->u.constant);
+ }
+
+ if (var_ast == NULL) {
+ zend_error(E_COMPILE_ERROR, "Cannot use empty array entries in keyed array");
+ }
+
+ if (key_ast == NULL) {
+ zend_error(E_COMPILE_ERROR, "Cannot mix keyed and unkeyed array entries in assignments");
+ }
+
+ zend_verify_list_assign_target(var_ast, old_style);
+
+ zend_emit_op(&fetch_result, ZEND_FETCH_LIST, expr_node, &dim_node);
+ zend_emit_assign_znode(var_ast, &fetch_result);
+ }
+}
+/* }}} */
+
+static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_node, zend_bool old_style) /* {{{ */
+{
+ zend_ast_list *list = zend_ast_get_list(ast);
+
+ if (list->children > 0 && list->child[0] != NULL && list->child[0]->child[1] != NULL /* has key */) {
+ zend_compile_keyed_list_assign(list, expr_node, old_style);
+ } else {
+ zend_compile_unkeyed_list_assign(list, expr_node, old_style);
+ }
*result = *expr_node;
}
@@ -2490,13 +2895,16 @@ zend_bool zend_list_has_assign_to(zend_ast *list_ast, zend_string *name) /* {{{
zend_ast_list *list = zend_ast_get_list(list_ast);
uint32_t i;
for (i = 0; i < list->children; i++) {
- zend_ast *var_ast = list->child[i];
- if (!var_ast) {
+ zend_ast *elem_ast = list->child[i];
+ zend_ast *var_ast;
+
+ if (!elem_ast) {
continue;
}
+ var_ast = elem_ast->child[0];
/* Recursively check nested list()s */
- if (var_ast->kind == ZEND_AST_LIST && zend_list_has_assign_to(var_ast, name)) {
+ if (var_ast->kind == ZEND_AST_ARRAY && zend_list_has_assign_to(var_ast, name)) {
return 1;
}
@@ -2546,8 +2954,10 @@ void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */
switch (var_ast->kind) {
case ZEND_AST_VAR:
case ZEND_AST_STATIC_PROP:
- zend_compile_var(&var_node, var_ast, BP_VAR_W);
+ offset = zend_delayed_compile_begin();
+ zend_delayed_compile_var(&var_node, var_ast, BP_VAR_W);
zend_compile_expr(&expr_node, expr_ast);
+ zend_delayed_compile_end(offset);
zend_emit_op(result, ZEND_ASSIGN, &var_node, &expr_node);
return;
case ZEND_AST_DIM:
@@ -2576,7 +2986,7 @@ void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */
zend_emit_op_data(&expr_node);
return;
- case ZEND_AST_LIST:
+ case ZEND_AST_ARRAY:
if (zend_list_has_assign_to_self(var_ast, expr_ast)) {
/* list($a, $b) = $a should evaluate the right $a first */
zend_compile_simple_var_no_cv(&expr_node, expr_ast, BP_VAR_R, 0);
@@ -2584,7 +2994,7 @@ void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */
zend_compile_expr(&expr_node, expr_ast);
}
- zend_compile_list_assign(result, var_ast, &expr_node);
+ zend_compile_list_assign(result, var_ast, &expr_node, var_ast->attr);
return;
EMPTY_SWITCH_DEFAULT_CASE();
}
@@ -2598,23 +3008,23 @@ void zend_compile_assign_ref(znode *result, zend_ast *ast) /* {{{ */
znode target_node, source_node;
zend_op *opline;
+ uint32_t offset;
if (is_this_fetch(target_ast)) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot re-assign $this");
}
zend_ensure_writable_variable(target_ast);
- zend_compile_var(&target_node, target_ast, BP_VAR_W);
- zend_compile_var(&source_node, source_ast, BP_VAR_REF);
+ offset = zend_delayed_compile_begin();
+ zend_delayed_compile_var(&target_node, target_ast, BP_VAR_W);
+ zend_delayed_compile_var(&source_node, source_ast, BP_VAR_W);
+ zend_delayed_compile_end(offset);
if (source_node.op_type != IS_VAR && zend_is_call(source_ast)) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use result of built-in function in write context");
}
opline = zend_emit_op(result, ZEND_ASSIGN_REF, &target_node, &source_node);
- if (!result) {
- opline->result_type |= EXT_TYPE_UNUSED;
- }
if (zend_is_call(source_ast)) {
opline->extended_value = ZEND_RETURNS_FUNCTION;
@@ -2645,8 +3055,10 @@ void zend_compile_compound_assign(znode *result, zend_ast *ast) /* {{{ */
switch (var_ast->kind) {
case ZEND_AST_VAR:
case ZEND_AST_STATIC_PROP:
- zend_compile_var(&var_node, var_ast, BP_VAR_RW);
+ offset = zend_delayed_compile_begin();
+ zend_delayed_compile_var(&var_node, var_ast, BP_VAR_RW);
zend_compile_expr(&expr_node, expr_ast);
+ zend_delayed_compile_end(offset);
zend_emit_op(result, opcode, &var_node, &expr_node);
return;
case ZEND_AST_DIM:
@@ -2678,7 +3090,6 @@ void zend_compile_compound_assign(znode *result, zend_ast *ast) /* {{{ */
uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
{
- /* TODO.AST &var error */
zend_ast_list *args = zend_ast_get_list(ast);
uint32_t i;
zend_bool uses_arg_unpack = 0;
@@ -2691,7 +3102,6 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
znode arg_node;
zend_op *opline;
zend_uchar opcode;
- zend_ulong flags = 0;
if (arg->kind == ZEND_AST_UNPACK) {
uses_arg_unpack = 1;
@@ -2717,13 +3127,16 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
/* Function call was converted into builtin instruction */
opcode = ZEND_SEND_VAL;
} else {
- opcode = ZEND_SEND_VAR_NO_REF;
- flags |= ZEND_ARG_SEND_FUNCTION;
- if (fbc && ARG_SHOULD_BE_SENT_BY_REF(fbc, arg_num)) {
- flags |= ZEND_ARG_SEND_BY_REF;
- if (ARG_MAY_BE_SENT_BY_REF(fbc, arg_num)) {
- flags |= ZEND_ARG_SEND_SILENT;
+ if (fbc) {
+ if (ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) {
+ opcode = ZEND_SEND_VAR_NO_REF;
+ } else if (ARG_MAY_BE_SENT_BY_REF(fbc, arg_num)) {
+ opcode = ZEND_SEND_VAL;
+ } else {
+ opcode = ZEND_SEND_VAR;
}
+ } else {
+ opcode = ZEND_SEND_VAR_NO_REF_EX;
}
}
} else if (fbc) {
@@ -2741,10 +3154,19 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
}
} else {
zend_compile_expr(&arg_node, arg);
- if (arg_node.op_type & (IS_VAR|IS_CV)) {
- opcode = ZEND_SEND_VAR_NO_REF;
- if (fbc && ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) {
- flags |= ZEND_ARG_SEND_BY_REF;
+ ZEND_ASSERT(arg_node.op_type != IS_CV);
+ if (arg_node.op_type == IS_VAR) {
+ /* pass ++$a or something similar */
+ if (fbc) {
+ if (ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) {
+ opcode = ZEND_SEND_VAR_NO_REF;
+ } else if (ARG_MAY_BE_SENT_BY_REF(fbc, arg_num)) {
+ opcode = ZEND_SEND_VAL;
+ } else {
+ opcode = ZEND_SEND_VAR;
+ }
+ } else {
+ opcode = ZEND_SEND_VAR_NO_REF_EX;
}
} else {
if (fbc) {
@@ -2758,51 +3180,35 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
}
}
- opline = get_next_op(CG(active_op_array));
- opline->opcode = opcode;
- SET_NODE(opline->op1, &arg_node);
- SET_UNUSED(opline->op2);
+ opline = zend_emit_op(NULL, opcode, &arg_node, NULL);
opline->op2.opline_num = arg_num;
opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, arg_num);
-
- if (opcode == ZEND_SEND_VAR_NO_REF) {
- if (fbc) {
- flags |= ZEND_ARG_COMPILE_TIME_BOUND;
- }
- if ((flags & ZEND_ARG_COMPILE_TIME_BOUND) && !(flags & ZEND_ARG_SEND_BY_REF)) {
- opline->opcode = ZEND_SEND_VAR;
- opline->extended_value = ZEND_ARG_COMPILE_TIME_BOUND;
- } else {
- opline->extended_value = flags;
- }
- } else if (fbc) {
- opline->extended_value = ZEND_ARG_COMPILE_TIME_BOUND;
- }
}
return arg_count;
}
/* }}} */
-ZEND_API zend_uchar zend_get_call_op(zend_uchar init_op, zend_function *fbc) /* {{{ */
+ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */
{
- if (fbc) {
+ if (fbc && init_op->opcode == ZEND_INIT_FCALL) {
if (fbc->type == ZEND_INTERNAL_FUNCTION) {
- if (!zend_execute_internal &&
- !fbc->common.scope &&
- !(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) {
- return ZEND_DO_ICALL;
+ if (!zend_execute_internal) {
+ if (!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) {
+ return ZEND_DO_ICALL;
+ } else {
+ return ZEND_DO_FCALL_BY_NAME;
+ }
}
} else {
- if (zend_execute_ex == execute_ex &&
- !(fbc->common.fn_flags & ZEND_ACC_GENERATOR)) {
+ if (zend_execute_ex == execute_ex) {
return ZEND_DO_UCALL;
}
}
} else if (zend_execute_ex == execute_ex &&
!zend_execute_internal &&
- (init_op == ZEND_INIT_FCALL_BY_NAME ||
- init_op == ZEND_INIT_NS_FCALL_BY_NAME)) {
+ (init_op->opcode == ZEND_INIT_FCALL_BY_NAME ||
+ init_op->opcode == ZEND_INIT_NS_FCALL_BY_NAME)) {
return ZEND_DO_FCALL_BY_NAME;
}
return ZEND_DO_FCALL;
@@ -2828,7 +3234,7 @@ void zend_compile_call_common(znode *result, zend_ast *args_ast, zend_function *
}
call_flags = (opline->opcode == ZEND_NEW ? ZEND_CALL_CTOR : 0);
- opline = zend_emit_op(result, zend_get_call_op(opline->opcode, fbc), NULL, NULL);
+ opline = zend_emit_op(result, zend_get_call_op(opline, fbc), NULL, NULL);
opline->op1.num = call_flags;
zend_do_extended_fcall_end();
@@ -2864,13 +3270,14 @@ void zend_compile_ns_call(znode *result, znode *name_node, zend_ast *args_ast) /
void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast *args_ast) /* {{{ */
{
- zend_op *opline = get_next_op(CG(active_op_array));
if (name_node->op_type == IS_CONST && Z_TYPE(name_node->u.constant) == IS_STRING) {
const char *colon;
zend_string *str = Z_STR(name_node->u.constant);
if ((colon = zend_memrchr(ZSTR_VAL(str), ':', ZSTR_LEN(str))) != NULL && colon > ZSTR_VAL(str) && *(colon - 1) == ':') {
zend_string *class = zend_string_init(ZSTR_VAL(str), colon - ZSTR_VAL(str) - 1, 0);
zend_string *method = zend_string_init(colon + 1, ZSTR_LEN(str) - (colon - ZSTR_VAL(str)) - 1, 0);
+ zend_op *opline = get_next_op(CG(active_op_array));
+
opline->opcode = ZEND_INIT_STATIC_METHOD_CALL;
opline->op1_type = IS_CONST;
opline->op1.constant = zend_add_class_name_literal(CG(active_op_array), class);
@@ -2879,6 +3286,8 @@ void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast *args_a
zend_alloc_cache_slot(opline->op2.constant);
zval_ptr_dtor(&name_node->u.constant);
} else {
+ zend_op *opline = get_next_op(CG(active_op_array));
+
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
SET_UNUSED(opline->op1);
opline->op2_type = IS_CONST;
@@ -2886,9 +3295,7 @@ void zend_compile_dynamic_call(znode *result, znode *name_node, zend_ast *args_a
zend_alloc_cache_slot(opline->op2.constant);
}
} else {
- opline->opcode = ZEND_INIT_DYNAMIC_CALL;
- SET_UNUSED(opline->op1);
- SET_NODE(opline->op2, name_node);
+ zend_emit_op(NULL, ZEND_INIT_DYNAMIC_CALL, NULL, name_node);
}
zend_compile_call_common(result, args_ast, NULL);
@@ -2960,6 +3367,14 @@ int zend_compile_func_defined(znode *result, zend_ast_list *args) /* {{{ */
return FAILURE;
}
+ if (zend_try_ct_eval_const(&result->u.constant, name, 0)) {
+ zend_string_release(name);
+ zval_ptr_dtor(&result->u.constant);
+ ZVAL_TRUE(&result->u.constant);
+ result->op_type = IS_CONST;
+ return SUCCESS;
+ }
+
opline = zend_emit_op_tmp(result, ZEND_DEFINED, NULL, NULL);
opline->op1_type = IS_CONST;
LITERAL_STR(opline->op1, name);
@@ -2976,6 +3391,46 @@ int zend_compile_func_defined(znode *result, zend_ast_list *args) /* {{{ */
}
/* }}} */
+int zend_compile_func_chr(znode *result, zend_ast_list *args) /* {{{ */
+{
+
+ if (args->children == 1 &&
+ args->child[0]->kind == ZEND_AST_ZVAL &&
+ Z_TYPE_P(zend_ast_get_zval(args->child[0])) == IS_LONG) {
+
+ zend_long c = Z_LVAL_P(zend_ast_get_zval(args->child[0])) & 0xff;
+
+ result->op_type = IS_CONST;
+ if (CG(one_char_string)[c]) {
+ ZVAL_INTERNED_STR(&result->u.constant, CG(one_char_string)[c]);
+ } else {
+ ZVAL_NEW_STR(&result->u.constant, zend_string_alloc(1, 0));
+ Z_STRVAL_P(&result->u.constant)[0] = (char)c;
+ Z_STRVAL_P(&result->u.constant)[1] = '\0';
+ }
+ return SUCCESS;
+ } else {
+ return FAILURE;
+ }
+}
+/* }}} */
+
+int zend_compile_func_ord(znode *result, zend_ast_list *args) /* {{{ */
+{
+ if (args->children == 1 &&
+ args->child[0]->kind == ZEND_AST_ZVAL &&
+ Z_TYPE_P(zend_ast_get_zval(args->child[0])) == IS_STRING) {
+
+ result->op_type = IS_CONST;
+ ZVAL_LONG(&result->u.constant, (unsigned char)Z_STRVAL_P(zend_ast_get_zval(args->child[0]))[0]);
+ return SUCCESS;
+ } else {
+ return FAILURE;
+ }
+}
+/* }}} */
+
+
static int zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, uint32_t num_args) /* {{{ */
{
zend_string *name, *lcname;
@@ -2990,8 +3445,9 @@ static int zend_try_compile_ct_bound_init_user_func(zend_ast *name_ast, uint32_t
lcname = zend_string_tolower(name);
fbc = zend_hash_find_ptr(CG(function_table), lcname);
- if (!fbc || (fbc->type == ZEND_INTERNAL_FUNCTION &&
- (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ if (!fbc
+ || (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
) {
zend_string_release(lcname);
return FAILURE;
@@ -3118,7 +3574,9 @@ static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *
zend_compile_call_common(result, (zend_ast*)args, fbc);
- CG(active_op_array)->opcodes[check_op_number].op2.opline_num = get_next_op_number(CG(active_op_array));
+ opline = &CG(active_op_array)->opcodes[check_op_number];
+ opline->op2.opline_num = get_next_op_number(CG(active_op_array));
+ SET_NODE(opline->result, result);
} else {
if (!fbc) {
zend_string_release(name);
@@ -3131,12 +3589,20 @@ static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *
}
/* }}} */
-int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_list *args, zend_function *fbc) /* {{{ */
+int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_list *args, zend_function *fbc, uint32_t type) /* {{{ */
{
if (fbc->internal_function.handler == ZEND_FN(display_disabled_function)) {
return FAILURE;
}
+ if (zend_string_equals_literal(lcname, "assert")) {
+ return zend_compile_assert(result, args, lcname, fbc);
+ }
+
+ if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) {
+ return FAILURE;
+ }
+
if (zend_string_equals_literal(lcname, "strlen")) {
return zend_compile_func_strlen(result, args);
} else if (zend_string_equals_literal(lcname, "is_null")) {
@@ -3163,12 +3629,14 @@ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_l
return zend_compile_func_typecheck(result, args, IS_RESOURCE);
} else if (zend_string_equals_literal(lcname, "defined")) {
return zend_compile_func_defined(result, args);
+ } else if (zend_string_equals_literal(lcname, "chr") && type == BP_VAR_R) {
+ return zend_compile_func_chr(result, args);
+ } else if (zend_string_equals_literal(lcname, "ord") && type == BP_VAR_R) {
+ return zend_compile_func_ord(result, args);
} else if (zend_string_equals_literal(lcname, "call_user_func_array")) {
return zend_compile_func_cufa(result, args, lcname);
} else if (zend_string_equals_literal(lcname, "call_user_func")) {
return zend_compile_func_cuf(result, args, lcname);
- } else if (zend_string_equals_literal(lcname, "assert")) {
- return zend_compile_assert(result, args, lcname, fbc);
} else {
return FAILURE;
}
@@ -3209,8 +3677,9 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
lcname = zend_string_tolower(Z_STR_P(name));
fbc = zend_hash_find_ptr(CG(function_table), lcname);
- if (!fbc || (fbc->type == ZEND_INTERNAL_FUNCTION &&
- (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ if (!fbc
+ || (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
) {
zend_string_release(lcname);
zend_compile_dynamic_call(result, &name_node, args_ast);
@@ -3218,7 +3687,7 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
}
if (zend_try_compile_special_func(result, lcname,
- zend_ast_get_list(args_ast), fbc) == SUCCESS
+ zend_ast_get_list(args_ast), fbc, type) == SUCCESS
) {
zend_string_release(lcname);
zval_ptr_dtor(&name_node.u.constant);
@@ -3244,6 +3713,7 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type) /* {{
znode obj_node, method_node;
zend_op *opline;
+ zend_function *fbc = NULL;
if (is_this_fetch(obj_ast)) {
obj_node.op_type = IS_UNUSED;
@@ -3267,7 +3737,20 @@ void zend_compile_method_call(znode *result, zend_ast *ast, uint32_t type) /* {{
SET_NODE(opline->op2, &method_node);
}
- zend_compile_call_common(result, args_ast, NULL);
+ /* Check if this calls a known method on $this */
+ if (opline->op1_type == IS_UNUSED && opline->op2_type == IS_CONST &&
+ CG(active_class_entry) && zend_is_scope_known()) {
+ zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op2) + 1);
+ fbc = zend_hash_find_ptr(&CG(active_class_entry)->function_table, lcname);
+
+ /* We only know the exact method that is being called if it is either private or final.
+ * Otherwise an overriding method in a child class may be called. */
+ if (fbc && !(fbc->common.fn_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_FINAL))) {
+ fbc = NULL;
+ }
+ }
+
+ zend_compile_call_common(result, args_ast, fbc);
}
/* }}} */
@@ -3285,15 +3768,9 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{
znode class_node, method_node;
zend_op *opline;
- zend_ulong extended_value = 0;
+ zend_function *fbc = NULL;
- if (zend_is_const_default_class_ref(class_ast)) {
- class_node.op_type = IS_CONST;
- ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast));
- } else {
- opline = zend_compile_class_ref(&class_node, class_ast, 1);
- extended_value = opline->extended_value;
- }
+ zend_compile_class_ref_ex(&class_node, class_ast, ZEND_FETCH_CLASS_EXCEPTION);
zend_compile_expr(&method_node, method_ast);
if (method_node.op_type == IS_CONST) {
@@ -3309,7 +3786,6 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{
opline = get_next_op(CG(active_op_array));
opline->opcode = ZEND_INIT_STATIC_METHOD_CALL;
- opline->extended_value = extended_value;
zend_set_class_name_op1(opline, &class_node);
@@ -3325,8 +3801,30 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{
} else {
SET_NODE(opline->op2, &method_node);
}
+ zend_check_live_ranges(opline);
- zend_compile_call_common(result, args_ast, NULL);
+ /* Check if we already know which method we're calling */
+ if (opline->op2_type == IS_CONST) {
+ zend_class_entry *ce = NULL;
+ if (opline->op1_type == IS_CONST) {
+ zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op1) + 1);
+ ce = zend_hash_find_ptr(CG(class_table), lcname);
+ if (!ce && CG(active_class_entry)
+ && zend_string_equals_ci(CG(active_class_entry)->name, lcname)) {
+ ce = CG(active_class_entry);
+ }
+ } else if (opline->op1_type == IS_UNUSED
+ && (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF
+ && zend_is_scope_known()) {
+ ce = CG(active_class_entry);
+ }
+ if (ce) {
+ zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op2) + 1);
+ fbc = zend_hash_find_ptr(&ce->function_table, lcname);
+ }
+ }
+
+ zend_compile_call_common(result, args_ast, fbc);
}
/* }}} */
@@ -3341,10 +3839,7 @@ void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */
zend_op *opline;
uint32_t opnum;
- if (zend_is_const_default_class_ref(class_ast)) {
- class_node.op_type = IS_CONST;
- ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast));
- } else if (class_ast->kind == ZEND_AST_CLASS) {
+ if (class_ast->kind == ZEND_AST_CLASS) {
uint32_t dcl_opnum = get_next_op_number(CG(active_op_array));
zend_compile_class_decl(class_ast);
/* jump over anon class declaration */
@@ -3354,9 +3849,9 @@ void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */
}
class_node.op_type = opline->result_type;
class_node.u.op.var = opline->result.var;
- opline->op1.opline_num = get_next_op_number(CG(active_op_array));
+ opline->extended_value = get_next_op_number(CG(active_op_array));
} else {
- zend_compile_class_ref(&class_node, class_ast, 1);
+ zend_compile_class_ref_ex(&class_node, class_ast, ZEND_FETCH_CLASS_EXCEPTION);
}
opnum = get_next_op_number(CG(active_op_array));
@@ -3373,7 +3868,8 @@ void zend_compile_new(znode *result, zend_ast *ast) /* {{{ */
zend_compile_call_common(&ctor_result, args_ast, NULL);
zend_do_free(&ctor_result);
- /* New jumps over ctor call if ctor does not exist */
+ /* We save the position of DO_FCALL for convenience in find_live_range().
+ * This info is not preserved for runtime. */
opline = &CG(active_op_array)->opcodes[opnum];
opline->op2.opline_num = get_next_op_number(CG(active_op_array));
}
@@ -3386,7 +3882,7 @@ void zend_compile_clone(znode *result, zend_ast *ast) /* {{{ */
znode obj_node;
zend_compile_expr(&obj_node, obj_ast);
- zend_emit_op(result, ZEND_CLONE, &obj_node, NULL);
+ zend_emit_op_tmp(result, ZEND_CLONE, &obj_node, NULL);
}
/* }}} */
@@ -3406,19 +3902,27 @@ void zend_compile_global_var(zend_ast *ast) /* {{{ */
zend_op *opline = zend_emit_op(NULL, ZEND_BIND_GLOBAL, &result, &name_node);
zend_alloc_cache_slot(opline->op2.constant);
} else {
- zend_emit_op(&result, ZEND_FETCH_W, &name_node, NULL);
+ /* name_ast should be evaluated only. FETCH_GLOBAL_LOCK instructs FETCH_W
+ * to not free the name_node operand, so it can be reused in the following
+ * ASSIGN_REF, which then frees it. */
+ zend_op *opline = zend_emit_op(&result, ZEND_FETCH_W, &name_node, NULL);
+ opline->extended_value = ZEND_FETCH_GLOBAL_LOCK;
- // TODO.AST Avoid double fetch
- //opline->extended_value = ZEND_FETCH_GLOBAL_LOCK;
+ if (name_node.op_type == IS_CONST) {
+ zend_string_addref(Z_STR(name_node.u.constant));
+ }
- zend_emit_assign_ref_znode(var_ast, &result);
+ zend_emit_assign_ref_znode(
+ zend_ast_create(ZEND_AST_VAR, zend_ast_create_znode(&name_node)),
+ &result
+ );
}
}
/* }}} */
static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, zend_bool by_ref) /* {{{ */
{
- znode var_node, result;
+ znode var_node;
zend_op *opline;
zend_compile_expr(&var_node, var_ast);
@@ -3439,16 +3943,10 @@ static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, zend_
}
zend_hash_update(CG(active_op_array)->static_variables, Z_STR(var_node.u.constant), value);
- opline = zend_emit_op(&result, by_ref ? ZEND_FETCH_W : ZEND_FETCH_R, &var_node, NULL);
- opline->extended_value = ZEND_FETCH_STATIC;
-
- if (by_ref) {
- zend_ast *fetch_ast = zend_ast_create(ZEND_AST_VAR, var_ast);
- zend_emit_assign_ref_znode(fetch_ast, &result);
- } else {
- zend_ast *fetch_ast = zend_ast_create(ZEND_AST_VAR, var_ast);
- zend_emit_assign_znode(fetch_ast, &result);
- }
+ opline = zend_emit_op(NULL, ZEND_BIND_STATIC, NULL, &var_node);
+ opline->op1_type = IS_CV;
+ opline->op1.var = lookup_cv(CG(active_op_array), zend_string_copy(Z_STR(var_node.u.constant)));
+ opline->extended_value = by_ref;
}
/* }}} */
@@ -3471,9 +3969,11 @@ void zend_compile_static_var(zend_ast *ast) /* {{{ */
void zend_compile_unset(zend_ast *ast) /* {{{ */
{
zend_ast *var_ast = ast->child[0];
-
znode var_node;
zend_op *opline;
+
+ zend_ensure_writable_variable(var_ast);
+
switch (var_ast->kind) {
case ZEND_AST_VAR:
if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) {
@@ -3494,19 +3994,73 @@ void zend_compile_unset(zend_ast *ast) /* {{{ */
return;
case ZEND_AST_STATIC_PROP:
opline = zend_compile_static_prop_common(NULL, var_ast, BP_VAR_UNSET, 0);
- opline->opcode = ZEND_UNSET_VAR;
+ opline->opcode = ZEND_UNSET_STATIC_PROP;
return;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
/* }}} */
-static void zend_free_foreach_and_switch_variables(void) /* {{{ */
+static int zend_handle_loops_and_finally_ex(zend_long depth, znode *return_value) /* {{{ */
{
- zend_stack_apply(&CG(loop_var_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element)) generate_free_loop_var);
+ zend_loop_var *base;
+ zend_loop_var *loop_var = zend_stack_top(&CG(loop_var_stack));
+
+ if (!loop_var) {
+ return 1;
+ }
+ base = zend_stack_base(&CG(loop_var_stack));
+ for (; loop_var >= base; loop_var--) {
+ if (loop_var->opcode == ZEND_FAST_CALL) {
+ zend_op *opline = get_next_op(CG(active_op_array));
+
+ opline->opcode = ZEND_FAST_CALL;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = loop_var->var_num;
+ SET_UNUSED(opline->op1);
+ if (return_value) {
+ SET_NODE(opline->op2, return_value);
+ } else {
+ SET_UNUSED(opline->op2);
+ }
+ opline->op1.num = loop_var->u.try_catch_offset;
+ } else if (loop_var->opcode == ZEND_DISCARD_EXCEPTION) {
+ zend_op *opline = get_next_op(CG(active_op_array));
+ opline->opcode = ZEND_DISCARD_EXCEPTION;
+ opline->op1_type = IS_TMP_VAR;
+ opline->op1.var = loop_var->var_num;
+ SET_UNUSED(opline->op2);
+ } else if (loop_var->opcode == ZEND_RETURN) {
+ /* Stack separator */
+ break;
+ } else if (depth <= 1) {
+ return 1;
+ } else if (loop_var->opcode == ZEND_NOP) {
+ /* Loop doesn't have freeable variable */
+ depth--;
+ } else {
+ zend_op *opline;
+
+ ZEND_ASSERT(loop_var->var_type & (IS_VAR|IS_TMP_VAR));
+ opline = get_next_op(CG(active_op_array));
+ opline->opcode = loop_var->opcode;
+ opline->op1_type = loop_var->var_type;
+ opline->op1.var = loop_var->var_num;
+ SET_UNUSED(opline->op2);
+ opline->op2.num = loop_var->u.live_range_offset;
+ opline->extended_value = ZEND_FREE_ON_RETURN;
+ depth--;
+ }
+ }
+ return (depth == 0);
}
/* }}} */
+static int zend_handle_loops_and_finally(znode *return_value) /* {{{ */
+{
+ return zend_handle_loops_and_finally_ex(zend_stack_count(&CG(loop_var_stack)) + 1, return_value);
+}
+/* }}} */
void zend_compile_return(zend_ast *ast) /* {{{ */
{
@@ -3520,23 +4074,19 @@ void zend_compile_return(zend_ast *ast) /* {{{ */
expr_node.op_type = IS_CONST;
ZVAL_NULL(&expr_node.u.constant);
} else if (by_ref && zend_is_variable(expr_ast) && !zend_is_call(expr_ast)) {
- zend_compile_var(&expr_node, expr_ast, BP_VAR_REF);
+ zend_compile_var(&expr_node, expr_ast, BP_VAR_W);
} else {
zend_compile_expr(&expr_node, expr_ast);
}
- zend_free_foreach_and_switch_variables();
-
- if (CG(context).in_finally) {
- opline = zend_emit_op(NULL, ZEND_DISCARD_EXCEPTION, NULL, NULL);
- opline->op1_type = IS_TMP_VAR;
- opline->op1.var = CG(context).fast_call_var;
- }
-
/* Generator return types are handled separately */
if (!(CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) && CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
- zend_emit_return_type_check(expr_ast ? &expr_node : NULL, CG(active_op_array)->arg_info - 1);
+ zend_emit_return_type_check(
+ expr_ast ? &expr_node : NULL, CG(active_op_array)->arg_info - 1, 0);
}
+
+ zend_handle_loops_and_finally((expr_node.op_type & (IS_TMP_VAR | IS_VAR)) ? &expr_node : NULL);
+
opline = zend_emit_op(NULL, by_ref ? ZEND_RETURN_BY_REF : ZEND_RETURN,
&expr_node, NULL);
@@ -3552,12 +4102,14 @@ void zend_compile_return(zend_ast *ast) /* {{{ */
void zend_compile_echo(zend_ast *ast) /* {{{ */
{
+ zend_op *opline;
zend_ast *expr_ast = ast->child[0];
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
- zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline->extended_value = 0;
}
/* }}} */
@@ -3603,24 +4155,11 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
zend_error_noreturn(E_COMPILE_ERROR, "'%s' not in the 'loop' or 'switch' context",
ast->kind == ZEND_AST_BREAK ? "break" : "continue");
} else {
- int array_offset = CG(context).current_brk_cont;
- zend_long nest_level = depth;
- znode *loop_var = zend_stack_top(&CG(loop_var_stack));
-
- do {
- if (array_offset == -1) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot '%s' %d level%s",
- ast->kind == ZEND_AST_BREAK ? "break" : "continue",
- depth, depth == 1 ? "" : "s");
- }
-
- if (nest_level > 1 && CG(active_op_array)->brk_cont_array[array_offset].start >= 0) {
- generate_free_loop_var(loop_var);
- loop_var--;
- }
-
- array_offset = CG(active_op_array)->brk_cont_array[array_offset].parent;
- } while (--nest_level > 0);
+ if (!zend_handle_loops_and_finally_ex(depth, NULL)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot '%s' %d level%s",
+ ast->kind == ZEND_AST_BREAK ? "break" : "continue",
+ depth, depth == 1 ? "" : "s");
+ }
}
opline = zend_emit_op(NULL, ast->kind == ZEND_AST_BREAK ? ZEND_BRK : ZEND_CONT, NULL, NULL);
opline->op1.num = CG(context).current_brk_cont;
@@ -3628,16 +4167,81 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
}
/* }}} */
+void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline) /* {{{ */
+{
+ zend_label *dest;
+ int current, remove_oplines = opline->op1.num;
+ zval *label;
+ uint32_t opnum = opline - op_array->opcodes;
+
+ label = CT_CONSTANT_EX(op_array, opline->op2.constant);
+ if (CG(context).labels == NULL ||
+ (dest = zend_hash_find_ptr(CG(context).labels, Z_STR_P(label))) == NULL
+ ) {
+ CG(in_compilation) = 1;
+ CG(active_op_array) = op_array;
+ CG(zend_lineno) = opline->lineno;
+ zend_error_noreturn(E_COMPILE_ERROR, "'goto' to undefined label '%s'", Z_STRVAL_P(label));
+ }
+
+ zval_dtor(label);
+ ZVAL_NULL(label);
+
+ current = opline->extended_value;
+ for (; current != dest->brk_cont; current = CG(context).brk_cont_array[current].parent) {
+ if (current == -1) {
+ CG(in_compilation) = 1;
+ CG(active_op_array) = op_array;
+ CG(zend_lineno) = opline->lineno;
+ zend_error_noreturn(E_COMPILE_ERROR, "'goto' into loop or switch statement is disallowed");
+ }
+ if (CG(context).brk_cont_array[current].start >= 0) {
+ remove_oplines--;
+ }
+ }
+
+ for (current = 0; current < op_array->last_try_catch; ++current) {
+ zend_try_catch_element *elem = &op_array->try_catch_array[current];
+ if (elem->try_op > opnum) {
+ break;
+ }
+ if (elem->finally_op && opnum < elem->finally_op - 1
+ && (dest->opline_num > elem->finally_end || dest->opline_num < elem->try_op)
+ ) {
+ remove_oplines--;
+ }
+ }
+
+ opline->opcode = ZEND_JMP;
+ opline->op1.opline_num = dest->opline_num;
+ opline->extended_value = 0;
+ SET_UNUSED(opline->op1);
+ SET_UNUSED(opline->op2);
+ SET_UNUSED(opline->result);
+
+ ZEND_ASSERT(remove_oplines >= 0);
+ while (remove_oplines--) {
+ opline--;
+ MAKE_NOP(opline);
+ ZEND_VM_SET_OPCODE_HANDLER(opline);
+ }
+}
+/* }}} */
+
void zend_compile_goto(zend_ast *ast) /* {{{ */
{
zend_ast *label_ast = ast->child[0];
znode label_node;
zend_op *opline;
+ uint32_t opnum_start = get_next_op_number(CG(active_op_array));
zend_compile_expr(&label_node, label_ast);
+
+ /* Label resolution and unwinding adjustments happen in pass two. */
+ zend_handle_loops_and_finally(NULL);
opline = zend_emit_op(NULL, ZEND_GOTO, NULL, &label_node);
+ opline->op1.num = get_next_op_number(CG(active_op_array)) - opnum_start - 1;
opline->extended_value = CG(context).current_brk_cont;
- zend_resolve_goto_label(CG(active_op_array), opline, 0);
}
/* }}} */
@@ -3648,7 +4252,7 @@ void zend_compile_label(zend_ast *ast) /* {{{ */
if (!CG(context).labels) {
ALLOC_HASHTABLE(CG(context).labels);
- zend_hash_init(CG(context).labels, 8, NULL, ptr_dtor, 0);
+ zend_hash_init(CG(context).labels, 8, NULL, label_ptr_dtor, 0);
}
dest.brk_cont = CG(context).current_brk_cont;
@@ -3669,7 +4273,7 @@ void zend_compile_while(zend_ast *ast) /* {{{ */
opnum_jmp = zend_emit_jump(0);
- zend_begin_loop(NULL);
+ zend_begin_loop(ZEND_NOP, NULL);
opnum_start = get_next_op_number(CG(active_op_array));
zend_compile_stmt(stmt_ast);
@@ -3680,7 +4284,7 @@ void zend_compile_while(zend_ast *ast) /* {{{ */
zend_emit_cond_jump(ZEND_JMPNZ, &cond_node, opnum_start);
- zend_end_loop(opnum_cond);
+ zend_end_loop(opnum_cond, NULL);
}
/* }}} */
@@ -3692,7 +4296,7 @@ void zend_compile_do_while(zend_ast *ast) /* {{{ */
znode cond_node;
uint32_t opnum_start, opnum_cond;
- zend_begin_loop(NULL);
+ zend_begin_loop(ZEND_NOP, NULL);
opnum_start = get_next_op_number(CG(active_op_array));
zend_compile_stmt(stmt_ast);
@@ -3702,7 +4306,7 @@ void zend_compile_do_while(zend_ast *ast) /* {{{ */
zend_emit_cond_jump(ZEND_JMPNZ, &cond_node, opnum_start);
- zend_end_loop(opnum_cond);
+ zend_end_loop(opnum_cond, NULL);
}
/* }}} */
@@ -3743,7 +4347,7 @@ void zend_compile_for(zend_ast *ast) /* {{{ */
opnum_jmp = zend_emit_jump(0);
- zend_begin_loop(NULL);
+ zend_begin_loop(ZEND_NOP, NULL);
opnum_start = get_next_op_number(CG(active_op_array));
zend_compile_stmt(stmt_ast);
@@ -3758,7 +4362,7 @@ void zend_compile_for(zend_ast *ast) /* {{{ */
zend_emit_cond_jump(ZEND_JMPNZ, &result, opnum_start);
- zend_end_loop(opnum_loop);
+ zend_end_loop(opnum_loop, NULL);
}
/* }}} */
@@ -3780,7 +4384,7 @@ void zend_compile_foreach(zend_ast *ast) /* {{{ */
if (key_ast->kind == ZEND_AST_REF) {
zend_error_noreturn(E_COMPILE_ERROR, "Key element cannot be a reference");
}
- if (key_ast->kind == ZEND_AST_LIST) {
+ if (key_ast->kind == ZEND_AST_ARRAY) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use list as key element");
}
}
@@ -3802,6 +4406,8 @@ void zend_compile_foreach(zend_ast *ast) /* {{{ */
opnum_reset = get_next_op_number(CG(active_op_array));
opline = zend_emit_op(&reset_node, by_ref ? ZEND_FE_RESET_RW : ZEND_FE_RESET_R, &expr_node, NULL);
+ zend_begin_loop(ZEND_FE_FREE, &reset_node);
+
opnum_fetch = get_next_op_number(CG(active_op_array));
opline = zend_emit_op(NULL, by_ref ? ZEND_FE_FETCH_RW : ZEND_FE_FETCH_R, &reset_node, NULL);
@@ -3825,9 +4431,6 @@ void zend_compile_foreach(zend_ast *ast) /* {{{ */
zend_emit_assign_znode(key_ast, &key_node);
}
- reset_node.flag = 1; /* generate FE_FREE */
- zend_begin_loop(&reset_node);
-
zend_compile_stmt(stmt_ast);
zend_emit_jump(opnum_fetch);
@@ -3838,9 +4441,9 @@ void zend_compile_foreach(zend_ast *ast) /* {{{ */
opline = &CG(active_op_array)->opcodes[opnum_fetch];
opline->extended_value = get_next_op_number(CG(active_op_array));
- zend_end_loop(opnum_fetch);
+ zend_end_loop(opnum_fetch, &reset_node);
- generate_free_loop_var(&reset_node);
+ opline = zend_emit_op(NULL, ZEND_FE_FREE, &reset_node, NULL);
}
/* }}} */
@@ -3901,8 +4504,7 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */
zend_compile_expr(&expr_node, expr_ast);
- expr_node.flag = 0; /* Generate normal FREE */
- zend_begin_loop(&expr_node);
+ zend_begin_loop(ZEND_FREE, &expr_node);
case_node.op_type = IS_TMP_VAR;
case_node.u.op.var = get_temporary_variable(CG(active_op_array));
@@ -3961,10 +4563,14 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */
zend_update_jump_target_to_next(opnum_default_jmp);
}
- zend_end_loop(get_next_op_number(CG(active_op_array)));
+ zend_end_loop(get_next_op_number(CG(active_op_array)), &expr_node);
- if (expr_node.op_type == IS_VAR || expr_node.op_type == IS_TMP_VAR) {
- zend_emit_op(NULL, ZEND_FREE, &expr_node, NULL);
+ if (expr_node.op_type & (IS_VAR|IS_TMP_VAR)) {
+ /* don't use emit_op() to prevent automatic live-range construction */
+ opline = get_next_op(CG(active_op_array));
+ opline->opcode = ZEND_FREE;
+ SET_NODE(opline->op1, &expr_node);
+ SET_UNUSED(opline->op2);
} else if (expr_node.op_type == IS_CONST) {
zval_dtor(&expr_node.u.constant);
}
@@ -3979,16 +4585,47 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
zend_ast_list *catches = zend_ast_get_list(ast->child[1]);
zend_ast *finally_ast = ast->child[2];
- uint32_t i;
+ uint32_t i, j;
zend_op *opline;
- uint32_t try_catch_offset = zend_add_try_element(
- get_next_op_number(CG(active_op_array)));
+ uint32_t try_catch_offset;
uint32_t *jmp_opnums = safe_emalloc(sizeof(uint32_t), catches->children, 0);
+ uint32_t orig_fast_call_var = CG(context).fast_call_var;
+ uint32_t orig_try_catch_offset = CG(context).try_catch_offset;
if (catches->children == 0 && !finally_ast) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use try without catch or finally");
}
+ /* label: try { } must not be equal to try { label: } */
+ if (CG(context).labels) {
+ zend_label *label;
+ ZEND_HASH_REVERSE_FOREACH_PTR(CG(context).labels, label) {
+ if (label->opline_num == get_next_op_number(CG(active_op_array))) {
+ zend_emit_op(NULL, ZEND_NOP, NULL, NULL);
+ }
+ break;
+ } ZEND_HASH_FOREACH_END();
+ }
+
+ try_catch_offset = zend_add_try_element(get_next_op_number(CG(active_op_array)));
+
+ if (finally_ast) {
+ zend_loop_var fast_call;
+ if (!(CG(active_op_array)->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
+ CG(active_op_array)->fn_flags |= ZEND_ACC_HAS_FINALLY_BLOCK;
+ }
+ CG(context).fast_call_var = get_temporary_variable(CG(active_op_array));
+
+ /* Push FAST_CALL on unwind stack */
+ fast_call.opcode = ZEND_FAST_CALL;
+ fast_call.var_type = IS_TMP_VAR;
+ fast_call.var_num = CG(context).fast_call_var;
+ fast_call.u.try_catch_offset = try_catch_offset;
+ zend_stack_push(&CG(loop_var_stack), &fast_call);
+ }
+
+ CG(context).try_catch_offset = try_catch_offset;
+
zend_compile_stmt(try_ast);
if (catches->children != 0) {
@@ -3997,34 +4634,53 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
for (i = 0; i < catches->children; ++i) {
zend_ast *catch_ast = catches->child[i];
- zend_ast *class_ast = catch_ast->child[0];
+ zend_ast_list *classes = zend_ast_get_list(catch_ast->child[0]);
zend_ast *var_ast = catch_ast->child[1];
zend_ast *stmt_ast = catch_ast->child[2];
zval *var_name = zend_ast_get_zval(var_ast);
zend_bool is_last_catch = (i + 1 == catches->children);
+ uint32_t *jmp_multicatch = safe_emalloc(sizeof(uint32_t), classes->children - 1, 0);
uint32_t opnum_catch;
- if (!zend_is_const_default_class_ref(class_ast)) {
- zend_error_noreturn(E_COMPILE_ERROR, "Bad class name in the catch statement");
- }
+ CG(zend_lineno) = catch_ast->lineno;
- opnum_catch = get_next_op_number(CG(active_op_array));
- if (i == 0) {
- CG(active_op_array)->try_catch_array[try_catch_offset].catch_op = opnum_catch;
- }
+ for (j = 0; j < classes->children; j++) {
- CG(zend_lineno) = catch_ast->lineno;
+ zend_ast *class_ast = classes->child[j];
+ zend_bool is_last_class = (j + 1 == classes->children);
- opline = get_next_op(CG(active_op_array));
- opline->opcode = ZEND_CATCH;
- opline->op1_type = IS_CONST;
- opline->op1.constant = zend_add_class_name_literal(CG(active_op_array),
- zend_resolve_class_name_ast(class_ast));
+ if (!zend_is_const_default_class_ref(class_ast)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Bad class name in the catch statement");
+ }
- opline->op2_type = IS_CV;
- opline->op2.var = lookup_cv(CG(active_op_array), zend_string_copy(Z_STR_P(var_name)));
- opline->result.num = is_last_catch;
+ opnum_catch = get_next_op_number(CG(active_op_array));
+ if (i == 0 && j == 0) {
+ CG(active_op_array)->try_catch_array[try_catch_offset].catch_op = opnum_catch;
+ }
+
+ opline = get_next_op(CG(active_op_array));
+ opline->opcode = ZEND_CATCH;
+ opline->op1_type = IS_CONST;
+ opline->op1.constant = zend_add_class_name_literal(CG(active_op_array),
+ zend_resolve_class_name_ast(class_ast));
+
+ opline->op2_type = IS_CV;
+ opline->op2.var = lookup_cv(CG(active_op_array), zend_string_copy(Z_STR_P(var_name)));
+
+ opline->result.num = is_last_catch && is_last_class;
+
+ if (!is_last_class) {
+ jmp_multicatch[j] = zend_emit_jump(0);
+ opline->extended_value = get_next_op_number(CG(active_op_array));
+ }
+ }
+
+ for (j = 0; j < classes->children - 1; j++) {
+ zend_update_jump_target_to_next(jmp_multicatch[j]);
+ }
+
+ efree(jmp_multicatch);
zend_compile_stmt(stmt_ast);
@@ -4033,7 +4689,9 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
}
opline = &CG(active_op_array)->opcodes[opnum_catch];
- opline->extended_value = get_next_op_number(CG(active_op_array));
+ if (!is_last_catch) {
+ opline->extended_value = get_next_op_number(CG(active_op_array));
+ }
}
for (i = 0; i < catches->children; ++i) {
@@ -4041,15 +4699,22 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
}
if (finally_ast) {
+ zend_loop_var discard_exception;
uint32_t opnum_jmp = get_next_op_number(CG(active_op_array)) + 1;
+
+ /* Pop FAST_CALL from unwind stack */
+ zend_stack_del_top(&CG(loop_var_stack));
- if (!(CG(active_op_array)->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
- CG(active_op_array)->fn_flags |= ZEND_ACC_HAS_FINALLY_BLOCK;
- CG(context).fast_call_var = get_temporary_variable(CG(active_op_array));
- }
+ /* Push DISCARD_EXCEPTION on unwind stack */
+ discard_exception.opcode = ZEND_DISCARD_EXCEPTION;
+ discard_exception.var_type = IS_TMP_VAR;
+ discard_exception.var_num = CG(context).fast_call_var;
+ zend_stack_push(&CG(loop_var_stack), &discard_exception);
+
+ CG(zend_lineno) = finally_ast->lineno;
opline = zend_emit_op(NULL, ZEND_FAST_CALL, NULL, NULL);
- opline->op1.opline_num = opnum_jmp + 1;
+ opline->op1.num = try_catch_offset;
opline->result_type = IS_TMP_VAR;
opline->result.var = CG(context).fast_call_var;
@@ -4066,10 +4731,18 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
opline = zend_emit_op(NULL, ZEND_FAST_RET, NULL, NULL);
opline->op1_type = IS_TMP_VAR;
opline->op1.var = CG(context).fast_call_var;
+ opline->op2.num = orig_try_catch_offset;
zend_update_jump_target_to_next(opnum_jmp);
+
+ CG(context).fast_call_var = orig_fast_call_var;
+
+ /* Pop DISCARD_EXCEPTION from unwind stack */
+ zend_stack_del_top(&CG(loop_var_stack));
}
+ CG(context).try_catch_offset = orig_try_catch_offset;
+
efree(jmp_opnums);
}
/* }}} */
@@ -4249,6 +4922,11 @@ static void zend_compile_typename(zend_ast *ast, zend_arg_info *arg_info) /* {{{
zend_uchar type = zend_lookup_builtin_type_by_name(class_name);
if (type != 0) {
+ if ((ast->attr & ZEND_NAME_NOT_FQ) != ZEND_NAME_NOT_FQ) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "Scalar type declaration '%s' must be unqualified",
+ ZSTR_VAL(zend_string_tolower(class_name)));
+ }
arg_info->type_hint = type;
} else {
uint32_t fetch_type = zend_get_class_fetch_type_ast(ast);
@@ -4275,7 +4953,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
zend_arg_info *arg_infos;
if (return_type_ast) {
- /* Use op_array->arg_info[-1] for return type hinting */
+ /* Use op_array->arg_info[-1] for return type */
arg_infos = safe_emalloc(sizeof(zend_arg_info), list->children + 1, 0);
arg_infos->name = NULL;
arg_infos->pass_by_reference = (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
@@ -4284,8 +4962,17 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
arg_infos->allow_null = 0;
arg_infos->class_name = NULL;
+ if (return_type_ast->attr & ZEND_TYPE_NULLABLE) {
+ arg_infos->allow_null = 1;
+ return_type_ast->attr &= ~ZEND_TYPE_NULLABLE;
+ }
+
zend_compile_typename(return_type_ast, arg_infos);
+ if (arg_infos->type_hint == IS_VOID && arg_infos->allow_null) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Void type cannot be nullable");
+ }
+
arg_infos++;
op_array->fn_flags |= ZEND_ACC_HAS_RETURN_TYPE;
} else {
@@ -4321,8 +5008,9 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
zend_error_noreturn(E_COMPILE_ERROR, "Redefinition of parameter $%s",
ZSTR_VAL(name));
} else if (zend_string_equals_literal(name, "this")) {
- if (op_array->scope && (op_array->fn_flags & ZEND_ACC_STATIC) == 0) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot re-assign $this");
+ if ((op_array->scope || (op_array->fn_flags & ZEND_ACC_CLOSURE))
+ && (op_array->fn_flags & ZEND_ACC_STATIC) == 0) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use $this as parameter");
}
op_array->this_var = var_node.u.op.var;
}
@@ -4371,12 +5059,17 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
&& (Z_TYPE(default_node.u.constant) == IS_NULL
|| (Z_TYPE(default_node.u.constant) == IS_CONSTANT
&& strcasecmp(Z_STRVAL(default_node.u.constant), "NULL") == 0));
+ zend_bool is_explicitly_nullable = (type_ast->attr & ZEND_TYPE_NULLABLE) == ZEND_TYPE_NULLABLE;
op_array->fn_flags |= ZEND_ACC_HAS_TYPE_HINTS;
- arg_info->allow_null = has_null_default;
+ arg_info->allow_null = has_null_default || is_explicitly_nullable;
zend_compile_typename(type_ast, arg_info);
+ if (arg_info->type_hint == IS_VOID) {
+ zend_error_noreturn(E_COMPILE_ERROR, "void cannot be used as a parameter type");
+ }
+
if (type_ast->kind == ZEND_AST_TYPE) {
if (arg_info->type_hint == IS_ARRAY) {
if (default_ast && !has_null_default
@@ -4384,31 +5077,31 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
&& !Z_CONSTANT(default_node.u.constant)
) {
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
- "with array type hint can only be an array or NULL");
+ "with array type can only be an array or NULL");
}
} else if (arg_info->type_hint == IS_CALLABLE && default_ast) {
if (!has_null_default && !Z_CONSTANT(default_node.u.constant)) {
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
- "with callable type hint can only be NULL");
+ "with callable type can only be NULL");
}
}
} else {
if (default_ast && !has_null_default && !Z_CONSTANT(default_node.u.constant)) {
if (arg_info->class_name) {
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
- "with a class type hint can only be NULL");
+ "with a class type can only be NULL");
} else switch (arg_info->type_hint) {
case IS_DOUBLE:
if (Z_TYPE(default_node.u.constant) != IS_DOUBLE && Z_TYPE(default_node.u.constant) != IS_LONG) {
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
- "with a float type hint can only be float, integer, or NULL");
+ "with a float type can only be float, integer, or NULL");
}
break;
default:
if (!ZEND_SAME_FAKE_TYPE(arg_info->type_hint, Z_TYPE(default_node.u.constant))) {
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
- "with a %s type hint can only be %s or NULL",
+ "with a %s type can only be %s or NULL",
zend_get_type_by_const(arg_info->type_hint), zend_get_type_by_const(arg_info->type_hint));
}
break;
@@ -4452,23 +5145,61 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
}
/* }}} */
+static void zend_compile_closure_binding(znode *closure, zend_ast *uses_ast) /* {{{ */
+{
+ zend_ast_list *list = zend_ast_get_list(uses_ast);
+ uint32_t i;
+
+ for (i = 0; i < list->children; ++i) {
+ zend_ast *var_name_ast = list->child[i];
+ zend_string *var_name = zend_ast_get_str(var_name_ast);
+ zend_bool by_ref = var_name_ast->attr;
+ zend_op *opline;
+
+ if (zend_string_equals_literal(var_name, "this")) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use $this as lexical variable");
+ }
+
+ if (zend_is_auto_global(var_name)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use auto-global as lexical variable");
+ }
+
+ opline = zend_emit_op(NULL, ZEND_BIND_LEXICAL, closure, NULL);
+ opline->op2_type = IS_CV;
+ opline->op2.var = lookup_cv(CG(active_op_array), zend_string_copy(var_name));
+ opline->extended_value = by_ref;
+ }
+}
+/* }}} */
+
void zend_compile_closure_uses(zend_ast *ast) /* {{{ */
{
+ zend_op_array *op_array = CG(active_op_array);
zend_ast_list *list = zend_ast_get_list(ast);
uint32_t i;
for (i = 0; i < list->children; ++i) {
zend_ast *var_ast = list->child[i];
- zend_string *name = zend_ast_get_str(var_ast);
+ zend_string *var_name = zend_ast_get_str(var_ast);
zend_bool by_ref = var_ast->attr;
zval zv;
+ ZVAL_NULL(&zv);
- if (zend_string_equals_literal(name, "this")) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot use $this as lexical variable");
+ if (op_array->static_variables
+ && zend_hash_exists(op_array->static_variables, var_name)) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "Cannot use variable $%s twice", ZSTR_VAL(var_name));
}
- ZVAL_NULL(&zv);
- Z_CONST_FLAGS(zv) = by_ref ? IS_LEXICAL_REF : IS_LEXICAL_VAR;
+ {
+ int i;
+ for (i = 0; i < op_array->last_var; i++) {
+ if (zend_string_equals(op_array->vars[i], var_name)) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "Cannot use lexical variable $%s as a parameter name", ZSTR_VAL(var_name));
+ }
+ }
+ }
zend_compile_static_var_common(var_ast, &zv, by_ref);
}
@@ -4486,7 +5217,7 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo
zend_string *lcname;
if (in_interface) {
- if ((op_array->fn_flags & ZEND_ACC_PPP_MASK) != ZEND_ACC_PUBLIC) {
+ if (!is_public || (op_array->fn_flags & (ZEND_ACC_FINAL|ZEND_ACC_ABSTRACT))) {
zend_error_noreturn(E_COMPILE_ERROR, "Access type for interface method "
"%s::%s() must be omitted", ZSTR_VAL(ce->name), ZSTR_VAL(name));
}
@@ -4648,15 +5379,16 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo
static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_ast_decl *decl) /* {{{ */
{
zend_ast *params_ast = decl->child[0];
- zend_string *name = decl->name, *lcname;
+ zend_string *unqualified_name, *name, *lcname, *key;
zend_op *opline;
- op_array->function_name = name = zend_prefix_with_ns(name);
-
+ unqualified_name = decl->name;
+ op_array->function_name = name = zend_prefix_with_ns(unqualified_name);
lcname = zend_string_tolower(name);
if (FC(imports_function)) {
- zend_string *import_name = zend_hash_find_ptr(FC(imports_function), lcname);
+ zend_string *import_name = zend_hash_find_ptr_lc(
+ FC(imports_function), ZSTR_VAL(unqualified_name), ZSTR_LEN(unqualified_name));
if (import_name && !zend_string_equals_ci(lcname, import_name)) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare function %s "
"because the name is already in use", ZSTR_VAL(name));
@@ -4670,22 +5402,21 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
ZEND_AUTOLOAD_FUNC_NAME);
}
+ key = zend_build_runtime_definition_key(lcname, decl->lex_pos);
+ zend_hash_update_ptr(CG(function_table), key, op_array);
+
if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
opline = zend_emit_op_tmp(result, ZEND_DECLARE_LAMBDA_FUNCTION, NULL, NULL);
+ opline->op1_type = IS_CONST;
+ LITERAL_STR(opline->op1, key);
} else {
opline = get_next_op(CG(active_op_array));
opline->opcode = ZEND_DECLARE_FUNCTION;
- opline->op2_type = IS_CONST;
- LITERAL_STR(opline->op2, zend_string_copy(lcname));
- }
-
- {
- zend_string *key = zend_build_runtime_definition_key(lcname, decl->lex_pos);
-
opline->op1_type = IS_CONST;
- LITERAL_STR(opline->op1, key);
-
- zend_hash_update_ptr(CG(function_table), key, op_array);
+ LITERAL_STR(opline->op1, zend_string_copy(lcname));
+ /* RTD key is placed after lcname literal in op1 */
+ zend_add_literal_string(CG(active_op_array), &key);
+ SET_UNUSED(opline->op2);
}
zend_string_release(lcname);
@@ -4723,9 +5454,13 @@ void zend_compile_func_decl(znode *result, zend_ast *ast) /* {{{ */
zend_begin_method_decl(op_array, decl->name, has_body);
} else {
zend_begin_func_decl(result, op_array, decl);
+ if (uses_ast) {
+ zend_compile_closure_binding(result, uses_ast);
+ }
}
CG(active_op_array) = op_array;
+
zend_oparray_context_begin(&orig_oparray_context);
if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) {
@@ -4735,13 +5470,17 @@ void zend_compile_func_decl(znode *result, zend_ast *ast) /* {{{ */
{
/* Push a separator to the loop variable stack */
- znode dummy_var;
- dummy_var.op_type = IS_UNUSED;
+ zend_loop_var dummy_var;
+ dummy_var.opcode = ZEND_RETURN;
zend_stack_push(&CG(loop_var_stack), (void *) &dummy_var);
}
zend_compile_params(params_ast, return_type_ast);
+ if (CG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
+ zend_mark_function_as_generator();
+ zend_emit_op(NULL, ZEND_GENERATOR_CREATE, NULL, NULL);
+ }
if (uses_ast) {
zend_compile_closure_uses(uses_ast);
}
@@ -4752,8 +5491,11 @@ void zend_compile_func_decl(znode *result, zend_ast *ast) /* {{{ */
CG(active_class_entry), (zend_function *) op_array, E_COMPILE_ERROR);
}
+ /* put the implicit return on the really last line */
+ CG(zend_lineno) = decl->end_lineno;
+
zend_do_extended_info();
- zend_emit_final_return(NULL);
+ zend_emit_final_return(0);
pass_two(CG(active_op_array));
zend_oparray_context_end(&orig_oparray_context);
@@ -4771,7 +5513,6 @@ void zend_compile_prop_decl(zend_ast *ast) /* {{{ */
uint32_t flags = list->attr;
zend_class_entry *ce = CG(active_class_entry);
uint32_t i, children = list->children;
- zend_string *doc_comment = NULL;
if (ce->ce_flags & ZEND_ACC_INTERFACE) {
zend_error_noreturn(E_COMPILE_ERROR, "Interfaces may not include member variables");
@@ -4781,19 +5522,20 @@ void zend_compile_prop_decl(zend_ast *ast) /* {{{ */
zend_error_noreturn(E_COMPILE_ERROR, "Properties cannot be declared abstract");
}
- /* Doc comment has been appended as last element in property list */
- if (list->child[children - 1]->kind == ZEND_AST_ZVAL) {
- doc_comment = zend_string_copy(zend_ast_get_str(list->child[children - 1]));
- children -= 1;
- }
-
for (i = 0; i < children; ++i) {
zend_ast *prop_ast = list->child[i];
zend_ast *name_ast = prop_ast->child[0];
zend_ast *value_ast = prop_ast->child[1];
+ zend_ast *doc_comment_ast = prop_ast->child[2];
zend_string *name = zend_ast_get_str(name_ast);
+ zend_string *doc_comment = NULL;
zval value_zv;
+ /* Doc comment has been appended as last element in ZEND_AST_PROP_ELEM ast */
+ if (doc_comment_ast) {
+ doc_comment = zend_string_copy(zend_ast_get_str(doc_comment_ast));
+ }
+
if (flags & ZEND_ACC_FINAL) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, "
"the final modifier is allowed only for methods and classes",
@@ -4813,9 +5555,6 @@ void zend_compile_prop_decl(zend_ast *ast) /* {{{ */
name = zend_new_interned_string_safe(name);
zend_declare_property_ex(ce, name, &value_zv, flags, doc_comment);
-
- /* Doc comment is only assigned to first property */
- doc_comment = NULL;
}
}
/* }}} */
@@ -4835,25 +5574,25 @@ void zend_compile_class_const_decl(zend_ast *ast) /* {{{ */
zend_ast *const_ast = list->child[i];
zend_ast *name_ast = const_ast->child[0];
zend_ast *value_ast = const_ast->child[1];
+ zend_ast *doc_comment_ast = const_ast->child[2];
zend_string *name = zend_ast_get_str(name_ast);
+ zend_string *doc_comment = doc_comment_ast ? zend_string_copy(zend_ast_get_str(doc_comment_ast)) : NULL;
zval value_zv;
- if (zend_string_equals_literal_ci(name, "class")) {
- zend_error(E_COMPILE_ERROR,
- "A class constant must not be called 'class'; it is reserved for class name fetching");
+ if (UNEXPECTED(ast->attr & (ZEND_ACC_STATIC|ZEND_ACC_ABSTRACT|ZEND_ACC_FINAL))) {
+ if (ast->attr & ZEND_ACC_STATIC) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use 'static' as constant modifier");
+ } else if (ast->attr & ZEND_ACC_ABSTRACT) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use 'abstract' as constant modifier");
+ } else if (ast->attr & ZEND_ACC_FINAL) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use 'final' as constant modifier");
+ }
}
zend_const_expr_to_zval(&value_zv, value_ast);
name = zend_new_interned_string_safe(name);
- if (zend_hash_add(&ce->constants_table, name, &value_zv) == NULL) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot redefine class constant %s::%s",
- ZSTR_VAL(ce->name), ZSTR_VAL(name));
- }
-
- if (Z_CONSTANT(value_zv)) {
- ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
- }
+ zend_declare_class_constant_ex(ce, name, &value_zv, ast->attr, doc_comment);
}
}
/* }}} */
@@ -5038,7 +5777,7 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
zend_ast *extends_ast = decl->child[0];
zend_ast *implements_ast = decl->child[1];
zend_ast *stmt_ast = decl->child[2];
- zend_string *name, *lcname, *import_name = NULL;
+ zend_string *name, *lcname;
zend_class_entry *ce = zend_arena_alloc(&CG(arena), sizeof(zend_class_entry));
zend_op *opline;
znode declare_node, extends_node;
@@ -5047,35 +5786,30 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
znode original_implementing_class = FC(implementing_class);
if (EXPECTED((decl->flags & ZEND_ACC_ANON_CLASS) == 0)) {
+ zend_string *unqualified_name = decl->name;
+
if (CG(active_class_entry)) {
zend_error_noreturn(E_COMPILE_ERROR, "Class declarations may not be nested");
}
- name = decl->name;
- zend_assert_valid_class_name(name);
- lcname = zend_string_tolower(name);
- if (FC(current_namespace)) {
- name = zend_prefix_with_ns(name);
- zend_string_release(lcname);
- lcname = zend_string_tolower(name);
- } else {
- zend_string_addref(name);
- }
+ zend_assert_valid_class_name(unqualified_name);
+ name = zend_prefix_with_ns(unqualified_name);
+ name = zend_new_interned_string(name);
+ lcname = zend_string_tolower(name);
if (FC(imports)) {
- import_name = zend_hash_find_ptr(FC(imports), lcname);
- }
-
- if (import_name && !zend_string_equals_ci(lcname, import_name)) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare class %s "
- "because the name is already in use", ZSTR_VAL(name));
+ zend_string *import_name = zend_hash_find_ptr_lc(
+ FC(imports), ZSTR_VAL(unqualified_name), ZSTR_LEN(unqualified_name));
+ if (import_name && !zend_string_equals_ci(lcname, import_name)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare class %s "
+ "because the name is already in use", ZSTR_VAL(name));
+ }
}
-
- name = zend_new_interned_string(name);
- lcname = zend_new_interned_string(lcname);
} else {
- lcname = name = zend_generate_anon_class_name(decl->lex_pos);
+ name = zend_generate_anon_class_name(decl->lex_pos);
+ lcname = zend_string_tolower(name);
}
+ lcname = zend_new_interned_string(lcname);
ce->type = ZEND_USER_CLASS;
ce->name = name;
@@ -5109,49 +5843,45 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
opline = get_next_op(CG(active_op_array));
zend_make_var_result(&declare_node, opline);
- // TODO.AST drop this
GET_NODE(&FC(implementing_class), opline->result);
- opline->op2_type = IS_CONST;
- LITERAL_STR(opline->op2, lcname);
+ opline->op1_type = IS_CONST;
+ LITERAL_STR(opline->op1, lcname);
if (decl->flags & ZEND_ACC_ANON_CLASS) {
if (extends_ast) {
opline->opcode = ZEND_DECLARE_ANON_INHERITED_CLASS;
- opline->extended_value = extends_node.u.op.var;
+ SET_NODE(opline->op2, &extends_node);
} else {
opline->opcode = ZEND_DECLARE_ANON_CLASS;
}
- opline->op1_type = IS_UNUSED;
-
zend_hash_update_ptr(CG(class_table), lcname, ce);
} else {
zend_string *key;
if (extends_ast) {
opline->opcode = ZEND_DECLARE_INHERITED_CLASS;
- opline->extended_value = extends_node.u.op.var;
+ SET_NODE(opline->op2, &extends_node);
} else {
opline->opcode = ZEND_DECLARE_CLASS;
+ SET_UNUSED(opline->op2);
}
key = zend_build_runtime_definition_key(lcname, decl->lex_pos);
-
- opline->op1_type = IS_CONST;
- LITERAL_STR(opline->op1, key);
+ /* RTD key is placed after lcname literal in op1 */
+ zend_add_literal_string(CG(active_op_array), &key);
zend_hash_update_ptr(CG(class_table), key, ce);
}
CG(active_class_entry) = ce;
- if (implements_ast) {
- zend_compile_implements(&declare_node, implements_ast);
- }
-
zend_compile_stmt(stmt_ast);
+ /* Reset lineno for final opcodes and errors */
+ CG(zend_lineno) = ast->lineno;
+
if (ce->num_traits == 0) {
/* For traits this check is delayed until after trait binding */
zend_check_deprecated_constructor(ce);
@@ -5203,11 +5933,15 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL);
}
+ if (implements_ast) {
+ zend_compile_implements(&declare_node, implements_ast);
+ }
+
if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))
- && (extends_ast || ce->num_interfaces > 0)
+ && (extends_ast || implements_ast)
) {
zend_verify_abstract_class(ce);
- if (ce->num_interfaces && !(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) {
+ if (implements_ast) {
zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL);
}
}
@@ -5418,26 +6152,26 @@ void zend_compile_const_decl(zend_ast *ast) /* {{{ */
zend_ast *const_ast = list->child[i];
zend_ast *name_ast = const_ast->child[0];
zend_ast *value_ast = const_ast->child[1];
- zend_string *name = zend_ast_get_str(name_ast);
+ zend_string *unqualified_name = zend_ast_get_str(name_ast);
- zend_string *import_name;
+ zend_string *name;
znode name_node, value_node;
zval *value_zv = &value_node.u.constant;
value_node.op_type = IS_CONST;
zend_const_expr_to_zval(value_zv, value_ast);
- if (zend_lookup_reserved_const(ZSTR_VAL(name), ZSTR_LEN(name))) {
- zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare constant '%s'", ZSTR_VAL(name));
+ if (zend_lookup_reserved_const(ZSTR_VAL(unqualified_name), ZSTR_LEN(unqualified_name))) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "Cannot redeclare constant '%s'", ZSTR_VAL(unqualified_name));
}
- name = zend_prefix_with_ns(name);
+ name = zend_prefix_with_ns(unqualified_name);
name = zend_new_interned_string(name);
- if (FC(imports_const)
- && (import_name = zend_hash_find_ptr(FC(imports_const), name))
- ) {
- if (!zend_string_equals(import_name, name)) {
+ if (FC(imports_const)) {
+ zend_string *import_name = zend_hash_find_ptr(FC(imports_const), unqualified_name);
+ if (import_name && !zend_string_equals(import_name, name)) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare const %s because "
"the name is already in use", ZSTR_VAL(name));
}
@@ -5491,7 +6225,7 @@ void zend_compile_namespace(zend_ast *ast) /* {{{ */
}
if (num > 0) {
zend_error_noreturn(E_COMPILE_ERROR, "Namespace declaration statement has to be "
- "the very first statement in the script");
+ "the very first statement or after any declare call in the script");
}
}
@@ -5568,9 +6302,9 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
if (strcmp(ZSTR_VAL(dirname), ".") == 0) {
dirname = zend_string_extend(dirname, MAXPATHLEN, 0);
#if HAVE_GETCWD
- VCWD_GETCWD(ZSTR_VAL(dirname), MAXPATHLEN);
+ ZEND_IGNORE_VALUE(VCWD_GETCWD(ZSTR_VAL(dirname), MAXPATHLEN));
#elif HAVE_GETWD
- VCWD_GETWD(ZSTR_VAL(dirname));
+ ZEND_IGNORE_VALUE(VCWD_GETWD(ZSTR_VAL(dirname)));
#endif
}
@@ -5586,7 +6320,9 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
}
break;
case T_METHOD_C:
- if (ce) {
+ if ((op_array && !op_array->scope && op_array->function_name) || (op_array->fn_flags & ZEND_ACC_CLOSURE)) {
+ ZVAL_STR_COPY(zv, op_array->function_name);
+ } else if (ce) {
if (op_array && op_array->function_name) {
ZVAL_NEW_STR(zv, zend_concat3(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), "::", 2,
ZSTR_VAL(op_array->function_name), ZSTR_LEN(op_array->function_name)));
@@ -5631,14 +6367,50 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
}
/* }}} */
+ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode, zval *op1, zval *op2) /* {{{ */
+{
+ if (!(opcode == ZEND_ADD || opcode == ZEND_SUB || opcode == ZEND_MUL || opcode == ZEND_DIV
+ || opcode == ZEND_POW || opcode == ZEND_MOD || opcode == ZEND_SL || opcode == ZEND_SR
+ || opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)) {
+ return 0;
+ }
+
+ /* While basic arithmetic operators always produce numeric string errors,
+ * bitwise operators don't produce errors if both operands are strings */
+ if ((opcode == ZEND_BW_OR || opcode == ZEND_BW_AND || opcode == ZEND_BW_XOR)
+ && Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) {
+ return 0;
+ }
+
+ if (Z_TYPE_P(op1) == IS_STRING
+ && !is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), NULL, NULL, 0)) {
+ return 1;
+ }
+
+ if (Z_TYPE_P(op2) == IS_STRING
+ && !is_numeric_string(Z_STRVAL_P(op2), Z_STRLEN_P(op2), NULL, NULL, 0)) {
+ return 1;
+ }
+
+ return 0;
+}
+/* }}} */
+
static inline zend_bool zend_try_ct_eval_binary_op(zval *result, uint32_t opcode, zval *op1, zval *op2) /* {{{ */
{
binary_op_type fn = get_binary_op(opcode);
/* don't evaluate division by zero at compile-time */
- if (opcode == ZEND_MOD && zval_get_long(op2) == 0) {
+ if ((opcode == ZEND_DIV || opcode == ZEND_MOD) &&
+ zval_get_long(op2) == 0) {
return 0;
- } else if ((opcode == ZEND_SL || opcode == ZEND_SR) && zval_get_long(op2) < 0) {
+ } else if ((opcode == ZEND_SL || opcode == ZEND_SR) &&
+ zval_get_long(op2) < 0) {
+ return 0;
+ }
+
+ /* don't evaluate numeric string error-producing operations at compile-time */
+ if (zend_binary_op_produces_numeric_string_error(opcode, op1, op2)) {
return 0;
}
@@ -5654,14 +6426,11 @@ static inline void zend_ct_eval_unary_op(zval *result, uint32_t opcode, zval *op
}
/* }}} */
-static inline void zend_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op) /* {{{ */
+static inline zend_bool zend_try_ct_eval_unary_pm(zval *result, zend_ast_kind kind, zval *op) /* {{{ */
{
- binary_op_type fn = kind == ZEND_AST_UNARY_PLUS
- ? add_function : sub_function;
-
zval left;
- ZVAL_LONG(&left, 0);
- fn(result, &left, op);
+ ZVAL_LONG(&left, (kind == ZEND_AST_UNARY_PLUS) ? 1 : -1);
+ return zend_try_ct_eval_binary_op(result, ZEND_MUL, &left, op);
}
/* }}} */
@@ -5679,14 +6448,22 @@ static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */
uint32_t i;
zend_bool is_constant = 1;
+ if (ast->attr) {
+ zend_error(E_COMPILE_ERROR, "Cannot use list() as standalone expression");
+ }
+
/* First ensure that *all* child nodes are constant and by-val */
for (i = 0; i < list->children; ++i) {
zend_ast *elem_ast = list->child[i];
- zend_bool by_ref = elem_ast->attr;
+
+ if (elem_ast == NULL) {
+ zend_error(E_COMPILE_ERROR, "Cannot use empty array elements in arrays");
+ }
+
zend_eval_const_expr(&elem_ast->child[0]);
zend_eval_const_expr(&elem_ast->child[1]);
- if (by_ref || elem_ast->child[0]->kind != ZEND_AST_ZVAL
+ if (elem_ast->attr /* by_ref */ || elem_ast->child[0]->kind != ZEND_AST_ZVAL
|| (elem_ast->child[1] && elem_ast->child[1]->kind != ZEND_AST_ZVAL)
) {
is_constant = 0;
@@ -5851,24 +6628,24 @@ void zend_compile_unary_op(znode *result, zend_ast *ast) /* {{{ */
void zend_compile_unary_pm(znode *result, zend_ast *ast) /* {{{ */
{
zend_ast *expr_ast = ast->child[0];
- znode zero_node, expr_node;
+ znode expr_node;
+ znode lefthand_node;
ZEND_ASSERT(ast->kind == ZEND_AST_UNARY_PLUS || ast->kind == ZEND_AST_UNARY_MINUS);
zend_compile_expr(&expr_node, expr_ast);
if (expr_node.op_type == IS_CONST) {
- result->op_type = IS_CONST;
- zend_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant);
- zval_ptr_dtor(&expr_node.u.constant);
- return;
+ if (zend_try_ct_eval_unary_pm(&result->u.constant, ast->kind, &expr_node.u.constant)) {
+ result->op_type = IS_CONST;
+ zval_ptr_dtor(&expr_node.u.constant);
+ return;
+ }
}
- zero_node.op_type = IS_CONST;
- ZVAL_LONG(&zero_node.u.constant, 0);
-
- zend_emit_op_tmp(result, ast->kind == ZEND_AST_UNARY_PLUS ? ZEND_ADD : ZEND_SUB,
- &zero_node, &expr_node);
+ lefthand_node.op_type = IS_CONST;
+ ZVAL_LONG(&lefthand_node.u.constant, (ast->kind == ZEND_AST_UNARY_PLUS) ? 1 : -1);
+ zend_emit_op_tmp(result, ZEND_MUL, &lefthand_node, &expr_node);
}
/* }}} */
@@ -5899,7 +6676,7 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast) /* {{{ */
zval_ptr_dtor(&right_node.u.constant);
} else {
- zend_emit_op(result, ZEND_BOOL, &right_node, NULL);
+ zend_emit_op_tmp(result, ZEND_BOOL, &right_node, NULL);
}
}
@@ -5986,7 +6763,7 @@ static void zend_compile_shorthand_conditional(znode *result, zend_ast *ast) /*
zend_ast *false_ast = ast->child[2];
znode cond_node, false_node;
- zend_op *opline_jmp_set, *opline_qm_assign;
+ zend_op *opline_qm_assign;
uint32_t opnum_jmp_set;
ZEND_ASSERT(ast->child[1] == NULL);
@@ -5998,10 +6775,10 @@ static void zend_compile_shorthand_conditional(znode *result, zend_ast *ast) /*
zend_compile_expr(&false_node, false_ast);
- opline_jmp_set = &CG(active_op_array)->opcodes[opnum_jmp_set];
- opline_jmp_set->op2.opline_num = get_next_op_number(CG(active_op_array)) + 1;
opline_qm_assign = zend_emit_op_tmp(NULL, ZEND_QM_ASSIGN, &false_node, NULL);
SET_NODE(opline_qm_assign->result, result);
+
+ zend_update_jump_target_to_next(opnum_jmp_set);
}
/* }}} */
@@ -6012,8 +6789,8 @@ void zend_compile_conditional(znode *result, zend_ast *ast) /* {{{ */
zend_ast *false_ast = ast->child[2];
znode cond_node, true_node, false_node;
- zend_op *opline_qm_assign1, *opline_qm_assign2;
- uint32_t opnum_jmpz, opnum_jmp, opnum_qm_assign1;
+ zend_op *opline_qm_assign2;
+ uint32_t opnum_jmpz, opnum_jmp;
if (!true_ast) {
zend_compile_shorthand_conditional(result, ast);
@@ -6026,7 +6803,6 @@ void zend_compile_conditional(znode *result, zend_ast *ast) /* {{{ */
zend_compile_expr(&true_node, true_ast);
- opnum_qm_assign1 = get_next_op_number(CG(active_op_array));
zend_emit_op_tmp(result, ZEND_QM_ASSIGN, &true_node, NULL);
opnum_jmp = zend_emit_jump(0);
@@ -6035,8 +6811,7 @@ void zend_compile_conditional(znode *result, zend_ast *ast) /* {{{ */
zend_compile_expr(&false_node, false_ast);
- opline_qm_assign1 = &CG(active_op_array)->opcodes[opnum_qm_assign1];
- opline_qm_assign2 = zend_emit_op(NULL, opline_qm_assign1->opcode, &false_node, NULL);
+ opline_qm_assign2 = zend_emit_op(NULL, ZEND_QM_ASSIGN, &false_node, NULL);
SET_NODE(opline_qm_assign2->result, result);
zend_update_jump_target_to_next(opnum_jmp);
@@ -6069,12 +6844,14 @@ void zend_compile_coalesce(znode *result, zend_ast *ast) /* {{{ */
void zend_compile_print(znode *result, zend_ast *ast) /* {{{ */
{
+ zend_op *opline;
zend_ast *expr_ast = ast->child[0];
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
- zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline->extended_value = 1;
result->op_type = IS_CONST;
ZVAL_LONG(&result->u.constant, 1);
@@ -6098,32 +6875,6 @@ void zend_compile_exit(znode *result, zend_ast *ast) /* {{{ */
}
/* }}} */
-static void zend_mark_function_as_generator() /* {{{ */
-{
- if (!CG(active_op_array)->function_name) {
- zend_error_noreturn(E_COMPILE_ERROR,
- "The \"yield\" expression can only be used inside a function");
- }
- if (CG(active_op_array)->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
- const char *msg = "Generators may only declare a return type of Generator, Iterator or Traversable, %s is not permitted";
- if (!CG(active_op_array)->arg_info[-1].class_name) {
- zend_error_noreturn(E_COMPILE_ERROR, msg,
- zend_get_type_by_const(CG(active_op_array)->arg_info[-1].type_hint));
- }
- if (!(ZSTR_LEN(CG(active_op_array)->arg_info[-1].class_name) == sizeof("Traversable")-1
- && zend_binary_strcasecmp(ZSTR_VAL(CG(active_op_array)->arg_info[-1].class_name), sizeof("Traversable")-1, "Traversable", sizeof("Traversable")-1) == 0) &&
- !(ZSTR_LEN(CG(active_op_array)->arg_info[-1].class_name) == sizeof("Iterator")-1
- && zend_binary_strcasecmp(ZSTR_VAL(CG(active_op_array)->arg_info[-1].class_name), sizeof("Iterator")-1, "Iterator", sizeof("Iterator")-1) == 0) &&
- !(ZSTR_LEN(CG(active_op_array)->arg_info[-1].class_name) == sizeof("Generator")-1
- && zend_binary_strcasecmp(ZSTR_VAL(CG(active_op_array)->arg_info[-1].class_name), sizeof("Generator")-1, "Generator", sizeof("Generator")-1) == 0)) {
- zend_error_noreturn(E_COMPILE_ERROR, msg, ZSTR_VAL(CG(active_op_array)->arg_info[-1].class_name));
- }
- }
-
- CG(active_op_array)->fn_flags |= ZEND_ACC_GENERATOR;
-}
-/* }}} */
-
void zend_compile_yield(znode *result, zend_ast *ast) /* {{{ */
{
zend_ast *value_ast = ast->child[0];
@@ -6143,7 +6894,7 @@ void zend_compile_yield(znode *result, zend_ast *ast) /* {{{ */
if (value_ast) {
if (returns_by_ref && zend_is_variable(value_ast) && !zend_is_call(value_ast)) {
- zend_compile_var(&value_node, value_ast, BP_VAR_REF);
+ zend_compile_var(&value_node, value_ast, BP_VAR_W);
} else {
zend_compile_expr(&value_node, value_ast);
}
@@ -6165,6 +6916,11 @@ void zend_compile_yield_from(znode *result, zend_ast *ast) /* {{{ */
zend_mark_function_as_generator();
+ if (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ zend_error_noreturn(E_COMPILE_ERROR,
+ "Cannot use \"yield from\" inside a by-reference generator");
+ }
+
zend_compile_expr(&expr_node, expr_ast);
zend_emit_op_tmp(result, ZEND_YIELD_FROM, &expr_node, NULL);
}
@@ -6184,13 +6940,8 @@ void zend_compile_instanceof(znode *result, zend_ast *ast) /* {{{ */
"instanceof expects an object instance, constant given");
}
- if (zend_is_const_default_class_ref(class_ast)) {
- class_node.op_type = IS_CONST;
- ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast));
- } else {
- opline = zend_compile_class_ref(&class_node, class_ast, 0);
- opline->extended_value |= ZEND_FETCH_CLASS_NO_AUTOLOAD;
- }
+ zend_compile_class_ref_ex(&class_node, class_ast,
+ ZEND_FETCH_CLASS_NO_AUTOLOAD | ZEND_FETCH_CLASS_EXCEPTION);
opline = zend_emit_op_tmp(result, ZEND_INSTANCEOF, &obj_node, NULL);
@@ -6262,7 +7013,7 @@ void zend_compile_isset_or_empty(znode *result, zend_ast *ast) /* {{{ */
break;
case ZEND_AST_STATIC_PROP:
opline = zend_compile_static_prop_common(result, var_ast, BP_VAR_IS, 0);
- opline->opcode = ZEND_ISSET_ISEMPTY_VAR;
+ opline->opcode = ZEND_ISSET_ISEMPTY_STATIC_PROP;
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
@@ -6276,10 +7027,9 @@ void zend_compile_silence(znode *result, zend_ast *ast) /* {{{ */
{
zend_ast *expr_ast = ast->child[0];
znode silence_node;
- uint32_t begin_opline_num, end_opline_num;
- zend_brk_cont_element *brk_cont_element;
+ uint32_t range;
- begin_opline_num = get_next_op_number(CG(active_op_array));
+ range = zend_start_live_range(CG(active_op_array), get_next_op_number(CG(active_op_array)));
zend_emit_op_tmp(&silence_node, ZEND_BEGIN_SILENCE, NULL, NULL);
if (expr_ast->kind == ZEND_AST_VAR) {
@@ -6290,15 +7040,12 @@ void zend_compile_silence(znode *result, zend_ast *ast) /* {{{ */
zend_compile_expr(result, expr_ast);
}
- end_opline_num = get_next_op_number(CG(active_op_array));
- zend_emit_op(NULL, ZEND_END_SILENCE, &silence_node, NULL);
-
/* Store BEGIN_SILENCE/END_SILENCE pair to restore previous
* EG(error_reporting) value on exception */
- brk_cont_element = get_next_brk_cont_element(CG(active_op_array));
- brk_cont_element->start = begin_opline_num;
- brk_cont_element->cont = brk_cont_element->brk = end_opline_num;
- brk_cont_element->parent = -1;
+ zend_end_live_range(CG(active_op_array), range, get_next_op_number(CG(active_op_array)),
+ ZEND_LIVE_SILENCE, silence_node.u.op.var);
+
+ zend_emit_op(NULL, ZEND_END_SILENCE, &silence_node, NULL);
}
/* }}} */
@@ -6334,9 +7081,16 @@ void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */
for (i = 0; i < list->children; ++i) {
zend_ast *elem_ast = list->child[i];
- zend_ast *value_ast = elem_ast->child[0];
- zend_ast *key_ast = elem_ast->child[1];
- zend_bool by_ref = elem_ast->attr;
+ zend_ast *value_ast, *key_ast;
+ zend_bool by_ref;
+
+ if (elem_ast == NULL) {
+ zend_error(E_COMPILE_ERROR, "Cannot use empty array elements in arrays");
+ }
+
+ value_ast = elem_ast->child[0];
+ key_ast = elem_ast->child[1];
+ by_ref = elem_ast->attr;
znode value_node, key_node, *key_node_ptr = NULL;
@@ -6376,7 +7130,7 @@ void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */
/* Add a flag to INIT_ARRAY if we know this array cannot be packed */
if (!packed) {
- ZEND_ASSERT(opnum_init != -1);
+ ZEND_ASSERT(opnum_init != (uint32_t)-1);
opline = &CG(active_op_array)->opcodes[opnum_init];
opline->extended_value |= ZEND_ARRAY_NOT_PACKED;
}
@@ -6391,16 +7145,9 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
zend_bool is_fully_qualified;
zend_string *orig_name = zend_ast_get_str(name_ast);
- zend_string *resolved_name = zend_resolve_const_name(
- orig_name, name_ast->attr, &is_fully_qualified);
+ zend_string *resolved_name = zend_resolve_const_name(orig_name, name_ast->attr, &is_fully_qualified);
- if (zend_try_ct_eval_const(&result->u.constant, resolved_name, is_fully_qualified)) {
- result->op_type = IS_CONST;
- zend_string_release(resolved_name);
- return;
- }
-
- if (zend_string_equals_literal(resolved_name, "__COMPILER_HALT_OFFSET__")) {
+ if (zend_string_equals_literal(resolved_name, "__COMPILER_HALT_OFFSET__") || (name_ast->attr != ZEND_NAME_RELATIVE && zend_string_equals_literal(orig_name, "__COMPILER_HALT_OFFSET__"))) {
zend_ast *last = CG(ast);
while (last->kind == ZEND_AST_STMT_LIST) {
@@ -6409,13 +7156,18 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
}
if (last->kind == ZEND_AST_HALT_COMPILER) {
result->op_type = IS_CONST;
- ZVAL_LONG(&result->u.constant,
- Z_LVAL_P(zend_ast_get_zval(last->child[0])));
+ ZVAL_LONG(&result->u.constant, Z_LVAL_P(zend_ast_get_zval(last->child[0])));
zend_string_release(resolved_name);
return;
}
}
+ if (zend_try_ct_eval_const(&result->u.constant, resolved_name, is_fully_qualified)) {
+ result->op_type = IS_CONST;
+ zend_string_release(resolved_name);
+ return;
+ }
+
opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, NULL);
opline->op2_type = IS_CONST;
@@ -6444,7 +7196,6 @@ void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */
znode class_node, const_node;
zend_op *opline;
- zend_string *resolved_name;
if (zend_try_compile_const_expr_resolve_class_name(&result->u.constant, class_ast, const_ast, 0)) {
if (Z_TYPE(result->u.constant) == IS_NULL) {
@@ -6460,31 +7211,26 @@ void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */
zend_eval_const_expr(&const_ast);
if (class_ast->kind == ZEND_AST_ZVAL) {
+ zend_string *resolved_name;
+
resolved_name = zend_resolve_class_name_ast(class_ast);
if (const_ast->kind == ZEND_AST_ZVAL && zend_try_ct_eval_class_const(&result->u.constant, resolved_name, zend_ast_get_str(const_ast))) {
result->op_type = IS_CONST;
zend_string_release(resolved_name);
return;
}
+ zend_string_release(resolved_name);
}
if (const_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(const_ast), "class")) {
zend_error_noreturn(E_COMPILE_ERROR,
"Dynamic class names are not allowed in compile-time ::class fetch");
}
- if (zend_is_const_default_class_ref(class_ast)) {
- class_node.op_type = IS_CONST;
- ZVAL_STR(&class_node.u.constant, resolved_name);
- } else {
- if (class_ast->kind == ZEND_AST_ZVAL) {
- zend_string_release(resolved_name);
- }
- zend_compile_class_ref(&class_node, class_ast, 1);
- }
+ zend_compile_class_ref_ex(&class_node, class_ast, ZEND_FETCH_CLASS_EXCEPTION);
zend_compile_expr(&const_node, const_ast);
- opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, &const_node);
+ opline = zend_emit_op_tmp(result, ZEND_FETCH_CLASS_CONSTANT, NULL, &const_node);
zend_set_class_name_op1(opline, &class_node);
@@ -6626,10 +7372,7 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
GET_NODE(result, opline->result);
} else {
uint32_t var;
- zend_brk_cont_element *info = get_next_brk_cont_element(CG(active_op_array));
- info->start = rope_init_lineno;
- info->parent = CG(context).current_brk_cont;
- info->cont = info->brk = opline - CG(active_op_array)->opcodes;
+ uint32_t range = zend_start_live_range(CG(active_op_array), rope_init_lineno);
init_opline->extended_value = j;
opline->opcode = ZEND_ROPE_END;
@@ -6643,15 +7386,19 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
get_temporary_variable(CG(active_op_array));
i--;
}
+
+ zend_end_live_range(CG(active_op_array), range, opline - CG(active_op_array)->opcodes,
+ ZEND_LIVE_ROPE, var);
+
/* Update all the previous opcodes to use the same variable */
while (opline != init_opline) {
opline--;
if (opline->opcode == ZEND_ROPE_ADD &&
- opline->result.var == -1) {
+ opline->result.var == (uint32_t)-1) {
opline->op1.var = var;
opline->result.var = var;
} else if (opline->opcode == ZEND_ROPE_INIT &&
- opline->result.var == -1) {
+ opline->result.var == (uint32_t)-1) {
opline->result.var = var;
}
}
@@ -6687,7 +7434,7 @@ zend_bool zend_is_allowed_in_const_expr(zend_ast_kind kind) /* {{{ */
|| kind == ZEND_AST_CONDITIONAL || kind == ZEND_AST_DIM
|| kind == ZEND_AST_ARRAY || kind == ZEND_AST_ARRAY_ELEM
|| kind == ZEND_AST_CONST || kind == ZEND_AST_CLASS_CONST
- || kind == ZEND_AST_MAGIC_CONST;
+ || kind == ZEND_AST_MAGIC_CONST || kind == ZEND_AST_COALESCE;
}
/* }}} */
@@ -6821,14 +7568,16 @@ void zend_const_expr_to_zval(zval *result, zend_ast *ast) /* {{{ */
zend_compile_const_expr(&ast);
if (ast->kind == ZEND_AST_ZVAL) {
ZVAL_COPY_VALUE(result, zend_ast_get_zval(ast));
-
- /* Kill this branch of the original AST, as it was already destroyed.
- * It would be nice to find a better solution to this problem in the
- * future. */
- orig_ast->kind = 0;
} else {
ZVAL_NEW_AST(result, zend_ast_copy(ast));
+ /* destroy the ast here, it might have been replaced */
+ zend_ast_destroy(ast);
}
+
+ /* Kill this branch of the original AST, as it was already destroyed.
+ * It would be nice to find a better solution to this problem in the
+ * future. */
+ orig_ast->kind = 0;
}
/* }}} */
@@ -6868,6 +7617,10 @@ void zend_compile_stmt(zend_ast *ast) /* {{{ */
CG(zend_lineno) = ast->lineno;
+ if ((CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) && !zend_is_unticked_stmt(ast)) {
+ zend_do_extended_info();
+ }
+
switch (ast->kind) {
case ZEND_AST_STMT_LIST:
zend_compile_stmt_list(ast);
@@ -7121,9 +7874,7 @@ void zend_compile_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
*result = *zend_ast_get_znode(ast);
return;
default:
- if (type == BP_VAR_W || type == BP_VAR_REF
- || type == BP_VAR_RW || type == BP_VAR_UNSET
- ) {
+ if (type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) {
zend_error_noreturn(E_COMPILE_ERROR,
"Cannot use temporary expression in write context");
}
@@ -7233,8 +7984,34 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
return;
}
- zend_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]));
+ if (!zend_try_ct_eval_unary_pm(&result, ast->kind, zend_ast_get_zval(ast->child[0]))) {
+ return;
+ }
break;
+ case ZEND_AST_COALESCE:
+ /* Set isset fetch indicator here, opcache disallows runtime altering of the AST */
+ if (ast->child[0]->kind == ZEND_AST_DIM) {
+ ast->child[0]->attr = ZEND_DIM_IS;
+ }
+ zend_eval_const_expr(&ast->child[0]);
+
+ if (ast->child[0]->kind != ZEND_AST_ZVAL) {
+ /* ensure everything was compile-time evaluated at least once */
+ zend_eval_const_expr(&ast->child[1]);
+ return;
+ }
+
+ if (Z_TYPE_P(zend_ast_get_zval(ast->child[0])) == IS_NULL) {
+ zend_eval_const_expr(&ast->child[1]);
+ *ast_ptr = ast->child[1];
+ ast->child[1] = NULL;
+ zend_ast_destroy(ast);
+ } else {
+ *ast_ptr = ast->child[0];
+ ast->child[0] = NULL;
+ zend_ast_destroy(ast);
+ }
+ return;
case ZEND_AST_CONDITIONAL:
{
zend_ast **child, *child_ast;
@@ -7262,9 +8039,17 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
case ZEND_AST_DIM:
{
/* constant expression should be always read context ... */
-
zval *container, *dim;
+ if (ast->child[1] == NULL) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot use [] for reading");
+ }
+
+ /* Set isset fetch indicator here, opcache disallows runtime altering of the AST */
+ if (ast->attr == ZEND_DIM_IS && ast->child[0]->kind == ZEND_AST_DIM) {
+ ast->child[0]->attr = ZEND_DIM_IS;
+ }
+
zend_eval_const_expr(&ast->child[0]);
zend_eval_const_expr(&ast->child[1]);
if (ast->child[0]->kind != ZEND_AST_ZVAL || ast->child[1]->kind != ZEND_AST_ZVAL) {
@@ -7301,7 +8086,7 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
} else if (Z_TYPE_P(dim) != IS_STRING || is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), &offset, NULL, 1) != IS_LONG) {
return;
}
- if (offset < 0 || offset >= Z_STRLEN_P(container)) {
+ if (offset < 0 || (size_t)offset >= Z_STRLEN_P(container)) {
return;
}
c = (zend_uchar) Z_STRVAL_P(container)[offset];
@@ -7350,10 +8135,13 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
if (zend_try_compile_const_expr_resolve_class_name(&result, class_ast, name_ast, 0)) {
if (Z_TYPE(result) == IS_NULL) {
+ if (zend_get_class_fetch_type(zend_ast_get_str(class_ast)) == ZEND_FETCH_CLASS_SELF) {
+ zend_ast_destroy(ast);
+ *ast_ptr = zend_ast_create_ex(ZEND_AST_MAGIC_CONST, T_CLASS_C);
+ }
return;
- } else {
- break;
}
+ break;
}
zend_eval_const_expr(&class_ast);
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index a3bc17f425..fda7fe6014 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,16 +31,16 @@
#include "zend_llist.h"
-#define DEBUG_ZEND 0
-
#define SET_UNUSED(op) op ## _type = IS_UNUSED
#define MAKE_NOP(opline) do { \
- opline->opcode = ZEND_NOP; \
- memset(&opline->result, 0, sizeof(opline->result)); \
- memset(&opline->op1, 0, sizeof(opline->op1)); \
- memset(&opline->op2, 0, sizeof(opline->op2)); \
- opline->result_type = opline->op1_type = opline->op2_type = IS_UNUSED; \
+ (opline)->op1.num = 0; \
+ (opline)->op2.num = 0; \
+ (opline)->result.num = 0; \
+ (opline)->opcode = ZEND_NOP; \
+ (opline)->op1_type = IS_UNUSED; \
+ (opline)->op2_type = IS_UNUSED; \
+ (opline)->result_type = IS_UNUSED; \
} while (0)
#define RESET_DOC_COMMENT() do { \
@@ -109,18 +109,6 @@ typedef struct _zend_declarables {
zend_long ticks;
} zend_declarables;
-/* Compilation context that is different for each op array. */
-typedef struct _zend_oparray_context {
- uint32_t opcodes_size;
- int vars_size;
- int literals_size;
- int current_brk_cont;
- int backpatch_count;
- int in_finally;
- uint32_t fast_call_var;
- HashTable *labels;
-} zend_oparray_context;
-
/* Compilation context that is different for each file, but shared between op arrays. */
typedef struct _zend_file_context {
zend_declarables declarables;
@@ -183,6 +171,33 @@ typedef struct _zend_try_catch_element {
uint32_t finally_end;
} zend_try_catch_element;
+#define ZEND_LIVE_TMPVAR 0
+#define ZEND_LIVE_LOOP 1
+#define ZEND_LIVE_SILENCE 2
+#define ZEND_LIVE_ROPE 3
+#define ZEND_LIVE_MASK 3
+
+typedef struct _zend_live_range {
+ uint32_t var; /* low bits are used for variable type (ZEND_LIVE_* macros) */
+ uint32_t start;
+ uint32_t end;
+} zend_live_range;
+
+/* Compilation context that is different for each op array. */
+typedef struct _zend_oparray_context {
+ uint32_t opcodes_size;
+ int vars_size;
+ int literals_size;
+ int backpatch_count;
+ int in_finally;
+ uint32_t fast_call_var;
+ uint32_t try_catch_offset;
+ int current_brk_cont;
+ int last_brk_cont;
+ zend_brk_cont_element *brk_cont_array;
+ HashTable *labels;
+} zend_oparray_context;
+
/* method flags (types) */
#define ZEND_ACC_STATIC 0x01
#define ZEND_ACC_ABSTRACT 0x02
@@ -259,7 +274,7 @@ typedef struct _zend_try_catch_element {
/* class has magic methods __get/__set/__unset/__isset that use guards */
#define ZEND_ACC_USE_GUARDS 0x1000000
-/* function has arguments with type hinting */
+/* function has typed arguments */
#define ZEND_ACC_HAS_TYPE_HINTS 0x10000000
/* op_array has finally blocks */
@@ -268,7 +283,7 @@ typedef struct _zend_try_catch_element {
/* internal function is allocated at arena */
#define ZEND_ACC_ARENA_ALLOCATED 0x20000000
-/* Function has a return type hint (or class has such non-private function) */
+/* Function has a return type (or class has such non-private function) */
#define ZEND_ACC_HAS_RETURN_TYPE 0x40000000
/* op_array uses strict mode types */
@@ -294,6 +309,12 @@ typedef struct _zend_property_info {
#define OBJ_PROP_TO_NUM(offset) \
((offset - OBJ_PROP_TO_OFFSET(0)) / sizeof(zval))
+typedef struct _zend_class_constant {
+ zval value; /* access flags are stored in reserved: zval.u2.access_flags */
+ zend_string *doc_comment;
+ zend_class_entry *ce;
+} zend_class_constant;
+
/* arg_info for internal functions */
typedef struct _zend_internal_arg_info {
const char *name;
@@ -317,7 +338,7 @@ typedef struct _zend_arg_info {
/* the following structure repeats the layout of zend_internal_arg_info,
* but its fields have different meaning. It's used as the first element of
* arg_info array to define properties of internal functions.
- * It's also used for return type hinting.
+ * It's also used for the return type.
*/
typedef struct _zend_internal_function_info {
zend_uintptr_t required_num_args;
@@ -352,9 +373,9 @@ struct _zend_op_array {
uint32_t T;
zend_string **vars;
- int last_brk_cont;
+ int last_live_range;
int last_try_catch;
- zend_brk_cont_element *brk_cont_array;
+ zend_live_range *live_range;
zend_try_catch_element *try_catch_array;
/* static variables support */
@@ -394,12 +415,14 @@ typedef struct _zend_internal_function {
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
struct _zend_module_entry *module;
+ void *reserved[ZEND_MAX_RESERVED_RESOURCES];
} zend_internal_function;
#define ZEND_FN_SCOPE_NAME(function) ((function) && (function)->common.scope ? ZSTR_VAL((function)->common.scope->name) : "")
union _zend_function {
zend_uchar type; /* MUST be the first element of this struct! */
+ uint32_t quick_arg_flags;
struct {
zend_uchar type; /* never used */
@@ -428,17 +451,16 @@ struct _zend_execute_data {
const zend_op *opline; /* executed opline */
zend_execute_data *call; /* current call */
zval *return_value;
- zend_function *func; /* executed op_array */
- zval This;
+ zend_function *func; /* executed funcrion */
+ zval This; /* this + call_info + num_args */
+ zend_execute_data *prev_execute_data;
+ zend_array *symbol_table;
#if ZEND_EX_USE_RUN_TIME_CACHE
- void **run_time_cache;
+ void **run_time_cache; /* cache op_array->run_time_cache */
#endif
#if ZEND_EX_USE_LITERALS
- zval *literals;
+ zval *literals; /* cache op_array->literals */
#endif
- zend_class_entry *called_scope;
- zend_execute_data *prev_execute_data;
- zend_array *symbol_table;
};
#define ZEND_CALL_FUNCTION (0 << 0)
@@ -447,13 +469,17 @@ struct _zend_execute_data {
#define ZEND_CALL_TOP (1 << 1)
#define ZEND_CALL_FREE_EXTRA_ARGS (1 << 2) /* equal to IS_TYPE_REFCOUNTED */
#define ZEND_CALL_CTOR (1 << 3)
-#define ZEND_CALL_CTOR_RESULT_UNUSED (1 << 4)
+#define ZEND_CALL_HAS_SYMBOL_TABLE (1 << 4)
#define ZEND_CALL_CLOSURE (1 << 5)
#define ZEND_CALL_RELEASE_THIS (1 << 6)
#define ZEND_CALL_ALLOCATED (1 << 7)
+#define ZEND_CALL_GENERATOR (1 << 8)
+#define ZEND_CALL_DYNAMIC (1 << 9)
+
+#define ZEND_CALL_INFO_SHIFT 16
#define ZEND_CALL_INFO(call) \
- (Z_TYPE_INFO((call)->This) >> 24)
+ (Z_TYPE_INFO((call)->This) >> ZEND_CALL_INFO_SHIFT)
#define ZEND_CALL_KIND_EX(call_info) \
(call_info & (ZEND_CALL_CODE | ZEND_CALL_TOP))
@@ -461,12 +487,12 @@ struct _zend_execute_data {
#define ZEND_CALL_KIND(call) \
ZEND_CALL_KIND_EX(ZEND_CALL_INFO(call))
-#define ZEND_SET_CALL_INFO(call, info) do { \
- Z_TYPE_INFO((call)->This) = IS_OBJECT_EX | ((info) << 24); \
+#define ZEND_SET_CALL_INFO(call, object, info) do { \
+ Z_TYPE_INFO((call)->This) = ((object) ? IS_OBJECT_EX : IS_UNDEF) | ((info) << ZEND_CALL_INFO_SHIFT); \
} while (0)
#define ZEND_ADD_CALL_FLAG_EX(call_info, flag) do { \
- call_info |= ((flag) << 24); \
+ call_info |= ((flag) << ZEND_CALL_INFO_SHIFT); \
} while (0)
#define ZEND_ADD_CALL_FLAG(call, flag) do { \
@@ -511,7 +537,10 @@ struct _zend_execute_data {
#define EX_VAR(n) ZEND_CALL_VAR(execute_data, n)
#define EX_VAR_NUM(n) ZEND_CALL_VAR_NUM(execute_data, n)
-#define EX_VAR_TO_NUM(n) (ZEND_CALL_VAR(NULL, n) - ZEND_CALL_VAR_NUM(NULL, 0))
+#define EX_VAR_TO_NUM(n) ((uint32_t)(ZEND_CALL_VAR(NULL, n) - ZEND_CALL_VAR_NUM(NULL, 0)))
+
+#define ZEND_OPLINE_TO_OFFSET(opline, target) \
+ ((char*)(target) - (char*)(opline))
#define ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline_num) \
((char*)&(op_array)->opcodes[opline_num] - (char*)(opline))
@@ -528,6 +557,10 @@ struct _zend_execute_data {
# define OP_JMP_ADDR(opline, node) \
(node).jmp_addr
+# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
+ (node).jmp_addr = (val); \
+ } while (0)
+
/* convert jump target from compile-time to run-time */
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
(node).jmp_addr = (op_array)->opcodes + (node).opline_num; \
@@ -544,6 +577,10 @@ struct _zend_execute_data {
# define OP_JMP_ADDR(opline, node) \
ZEND_OFFSET_TO_OPLINE(opline, (node).jmp_offset)
+# define ZEND_SET_OP_JMP_ADDR(opline, node, val) do { \
+ (node).jmp_offset = ZEND_OPLINE_TO_OFFSET(opline, val); \
+ } while (0)
+
/* convert jump target from compile-time to run-time */
# define ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, node) do { \
(node).jmp_offset = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, (node).opline_num); \
@@ -649,8 +686,6 @@ struct _zend_execute_data {
#define IS_UNUSED (1<<3) /* Unused variable */
#define IS_CV (1<<4) /* Compiled variable */
-#define EXT_TYPE_UNUSED (1<<5)
-
#include "zend_globals.h"
BEGIN_EXTERN_C()
@@ -691,11 +726,10 @@ ZEND_API unary_op_type get_unary_op(int opcode);
ZEND_API binary_op_type get_binary_op(int opcode);
void zend_stop_lexing(void);
-void zend_emit_final_return(zval *zv);
+void zend_emit_final_return(int return_one);
zend_ast *zend_ast_append_str(zend_ast *left, zend_ast *right);
uint32_t zend_add_class_modifier(uint32_t flags, uint32_t new_flag);
uint32_t zend_add_member_modifier(uint32_t flags, uint32_t new_flag);
-zend_ast *zend_ast_append_doc_comment(zend_ast *list);
void zend_handle_encoding_declaration(zend_ast *ast);
/* parser-driven code generators */
@@ -712,7 +746,7 @@ void zend_do_extended_fcall_end(void);
void zend_verify_namespace(void);
-void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2);
+void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline);
ZEND_API void function_add_ref(zend_function *function);
@@ -723,6 +757,7 @@ ZEND_API void function_add_ref(zend_function *function);
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename);
ZEND_API zend_op_array *compile_filename(int type, zval *filename);
+ZEND_API void zend_try_exception_handler();
ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size);
@@ -751,15 +786,13 @@ ZEND_API int zend_unmangle_property_name_ex(const zend_string *name, const char
zend_op *get_next_op(zend_op_array *op_array);
void init_op(zend_op *op);
int get_next_op_number(zend_op_array *op_array);
-int print_class(zend_class_entry *class_entry);
-void print_op_array(zend_op_array *op_array, int optimizations);
ZEND_API int pass_two(zend_op_array *op_array);
-zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
+zend_brk_cont_element *get_next_brk_cont_element(void);
ZEND_API zend_bool zend_is_compiling(void);
ZEND_API char *zend_make_compiled_string_description(const char *name);
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers);
uint32_t zend_get_class_fetch_type(zend_string *name);
-ZEND_API zend_uchar zend_get_call_op(zend_uchar init_op, zend_function *fbc);
+ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc);
typedef zend_bool (*zend_auto_global_callback)(zend_string *name);
typedef struct _zend_auto_global {
@@ -801,16 +834,6 @@ ZEND_API void zend_assert_valid_class_name(const zend_string *const_name);
#define ZEND_FETCH_CLASS_SILENT 0x0100
#define ZEND_FETCH_CLASS_EXCEPTION 0x0200
-/* variable parsing type (compile-time) */
-#define ZEND_PARSED_MEMBER (1<<0)
-#define ZEND_PARSED_METHOD_CALL (1<<1)
-#define ZEND_PARSED_STATIC_MEMBER (1<<2)
-#define ZEND_PARSED_FUNCTION_CALL (1<<3)
-#define ZEND_PARSED_VARIABLE (1<<4)
-#define ZEND_PARSED_REFERENCE_VARIABLE (1<<5)
-#define ZEND_PARSED_NEW (1<<6)
-#define ZEND_PARSED_LIST_EXPR (1<<7)
-
#define ZEND_PARAM_REF (1<<0)
#define ZEND_PARAM_VARIADIC (1<<1)
@@ -818,8 +841,7 @@ ZEND_API void zend_assert_valid_class_name(const zend_string *const_name);
#define ZEND_NAME_NOT_FQ 1
#define ZEND_NAME_RELATIVE 2
-/* unset types */
-#define ZEND_UNSET_REG 0
+#define ZEND_TYPE_NULLABLE (1<<8)
/* var status for backpatching */
#define BP_VAR_R 0
@@ -828,7 +850,6 @@ ZEND_API void zend_assert_valid_class_name(const zend_string *const_name);
#define BP_VAR_IS 3
#define BP_VAR_FUNC_ARG 4
#define BP_VAR_UNSET 5
-#define BP_VAR_REF 6 /* right-hand side of by-ref assignment */
/* Bottom 3 bits are the type, top bits are arg num for BP_VAR_FUNC_ARG */
#define BP_VAR_SHIFT 3
@@ -859,10 +880,7 @@ ZEND_API void zend_assert_valid_class_name(const zend_string *const_name);
/* global/local fetches */
#define ZEND_FETCH_GLOBAL 0x00000000
#define ZEND_FETCH_LOCAL 0x10000000
-#define ZEND_FETCH_STATIC 0x20000000
-#define ZEND_FETCH_STATIC_MEMBER 0x30000000
#define ZEND_FETCH_GLOBAL_LOCK 0x40000000
-#define ZEND_FETCH_LEXICAL 0x50000000
#define ZEND_FETCH_TYPE_MASK 0x70000000
@@ -875,17 +893,14 @@ ZEND_API void zend_assert_valid_class_name(const zend_string *const_name);
#define ZEND_FETCH_ARG_MASK 0x000fffff
-#define ZEND_MEMBER_FUNC_CALL 1<<0
-
-#define ZEND_ARG_SEND_BY_REF (1<<0)
-#define ZEND_ARG_COMPILE_TIME_BOUND (1<<1)
-#define ZEND_ARG_SEND_FUNCTION (1<<2)
-#define ZEND_ARG_SEND_SILENT (1<<3)
+#define ZEND_FREE_ON_RETURN (1<<0)
#define ZEND_SEND_BY_VAL 0
#define ZEND_SEND_BY_REF 1
#define ZEND_SEND_PREFER_REF 2
+#define ZEND_DIM_IS 1
+
static zend_always_inline int zend_check_arg_send_type(const zend_function *zf, uint32_t arg_num, uint32_t mask)
{
arg_num--;
@@ -912,16 +927,16 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf,
#ifdef WORDS_BIGENDIAN
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
- *(uint32_t*)&(zf)->type |= ((mask) << ((arg_num) - 1) * 2); \
+ (zf)->quick_arg_flags |= ((mask) << ((arg_num) - 1) * 2); \
} while (0)
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
- (((*((uint32_t*)&((zf)->type))) >> (((arg_num) - 1) * 2)) & (mask))
+ (((zf)->quick_arg_flags >> (((arg_num) - 1) * 2)) & (mask))
#else
# define ZEND_SET_ARG_FLAG(zf, arg_num, mask) do { \
- *(uint32_t*)&(zf)->type |= (((mask) << 6) << (arg_num) * 2); \
+ (zf)->quick_arg_flags |= (((mask) << 6) << (arg_num) * 2); \
} while (0)
# define ZEND_CHECK_ARG_FLAG(zf, arg_num, mask) \
- (((*(uint32_t*)&(zf)->type) >> (((arg_num) + 3) * 2)) & (mask))
+ (((zf)->quick_arg_flags >> (((arg_num) + 3) * 2)) & (mask))
#endif
#define QUICK_ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
@@ -940,19 +955,14 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf,
#define ZEND_RETURNS_FUNCTION 1<<0
#define ZEND_RETURNS_VALUE 1<<1
-#define ZEND_FAST_RET_TO_CATCH 1
-#define ZEND_FAST_RET_TO_FINALLY 2
-
-#define ZEND_FAST_CALL_FROM_CATCH 1
-#define ZEND_FAST_CALL_FROM_FINALLY 2
-
#define ZEND_ARRAY_ELEMENT_REF (1<<0)
#define ZEND_ARRAY_NOT_PACKED (1<<1)
#define ZEND_ARRAY_SIZE_SHIFT 2
/* Pseudo-opcodes that are used only temporarily during compilation */
-#define ZEND_BRK 254
-#define ZEND_CONT 255
+#define ZEND_GOTO 253
+#define ZEND_BRK 254
+#define ZEND_CONT 255
END_EXTERN_C()
@@ -975,37 +985,48 @@ END_EXTERN_C()
* to change the default compiler behavior */
/* generate extended debug information */
-#define ZEND_COMPILE_EXTENDED_INFO (1<<0)
+#define ZEND_COMPILE_EXTENDED_INFO (1<<0)
/* call op_array handler of extendions */
#define ZEND_COMPILE_HANDLE_OP_ARRAY (1<<1)
/* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */
-#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<2)
+#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<2)
/* don't perform early binding for classes inherited form internal ones;
* in namespaces assume that internal class that doesn't exist at compile-time
* may apper in run-time */
-#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<3)
+#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<3)
/* generate ZEND_DECLARE_INHERITED_CLASS_DELAYED opcode to delay early binding */
-#define ZEND_COMPILE_DELAYED_BINDING (1<<4)
+#define ZEND_COMPILE_DELAYED_BINDING (1<<4)
/* disable constant substitution at compile-time */
-#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION (1<<5)
+#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION (1<<5)
/* disable usage of builtin instruction for strlen() */
-#define ZEND_COMPILE_NO_BUILTIN_STRLEN (1<<6)
+#define ZEND_COMPILE_NO_BUILTIN_STRLEN (1<<6)
/* disable substitution of persistent constants at compile-time */
#define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION (1<<7)
+/* generate ZEND_INIT_FCALL_BY_NAME for userland functions instead of ZEND_INIT_FCALL */
+#define ZEND_COMPILE_IGNORE_USER_FUNCTIONS (1<<8)
+
+/* force IS_OBJ_USE_GUARDS for all classes */
+#define ZEND_COMPILE_GUARDS (1<<9)
+
+/* disable builtin special case function calls */
+#define ZEND_COMPILE_NO_BUILTINS (1<<10)
+
/* The default value for CG(compiler_options) */
#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY
/* The default value for CG(compiler_options) during eval() */
#define ZEND_COMPILE_DEFAULT_FOR_EVAL 0
+ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode, zval *op1, zval *op2);
+
#endif /* ZEND_COMPILE_H */
/*
diff --git a/Zend/zend_config.nw.h b/Zend/zend_config.nw.h
index d01891bebd..bb9218b26b 100644
--- a/Zend/zend_config.nw.h
+++ b/Zend/zend_config.nw.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h
index 10d4a0b06e..5dd3d8313e 100644
--- a/Zend/zend_config.w32.h
+++ b/Zend/zend_config.w32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -50,8 +50,8 @@ typedef unsigned int uint;
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
-#define strcasecmp(s1, s2) stricmp(s1, s2)
-#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
+#define strcasecmp(s1, s2) _stricmp(s1, s2)
+#define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
#define zend_isinf(a) ((_fpclass(a) == _FPCLASS_PINF) || (_fpclass(a) == _FPCLASS_NINF))
#define zend_finite(x) _finite(x)
#define zend_isnan(x) _isnan(x)
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 168c23a850..3e09f0cbb8 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@ void free_zend_constant(zval *zv)
zend_constant *c = Z_PTR_P(zv);
if (!(c->flags & CONST_PERSISTENT)) {
- zval_dtor(&c->value);
+ zval_ptr_dtor(&c->value);
} else {
zval_internal_dtor(&c->value);
}
@@ -251,6 +251,18 @@ static zend_constant *zend_get_special_constant(const char *name, size_t name_le
}
}
+ZEND_API int zend_verify_const_access(zend_class_constant *c, zend_class_entry *scope) /* {{{ */
+{
+ if (Z_ACCESS_FLAGS(c->value) & ZEND_ACC_PUBLIC) {
+ return 1;
+ } else if (Z_ACCESS_FLAGS(c->value) & ZEND_ACC_PRIVATE) {
+ return (c->ce == scope);
+ } else {
+ ZEND_ASSERT(Z_ACCESS_FLAGS(c->value) & ZEND_ACC_PROTECTED);
+ return zend_check_protected(c->ce, scope);
+ }
+}
+/* }}} */
ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len)
{
@@ -294,12 +306,11 @@ ZEND_API zval *zend_get_constant(zend_string *name)
return c ? &c->value : NULL;
}
-ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, zend_ulong flags)
+ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, uint32_t flags)
{
zend_constant *c;
const char *colon;
zend_class_entry *ce = NULL;
- zend_string *class_name;
const char *name = ZSTR_VAL(cname);
size_t name_len = ZSTR_LEN(cname);
@@ -315,70 +326,68 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
int class_name_len = colon - name - 1;
size_t const_name_len = name_len - class_name_len - 2;
zend_string *constant_name = zend_string_init(colon + 1, const_name_len, 0);
- char *lcname;
+ zend_string *class_name = zend_string_init(name, class_name_len, 0);
zval *ret_constant = NULL;
- ALLOCA_FLAG(use_heap)
-
- class_name = zend_string_init(name, class_name_len, 0);
- lcname = do_alloca(class_name_len + 1, use_heap);
- zend_str_tolower_copy(lcname, name, class_name_len);
- if (!scope) {
- if (EG(current_execute_data)) {
- scope = EG(scope);
- } else {
- scope = CG(active_class_entry);
- }
- }
- if (class_name_len == sizeof("self")-1 &&
- !memcmp(lcname, "self", sizeof("self")-1)) {
+ if (zend_string_equals_literal_ci(class_name, "self")) {
if (UNEXPECTED(!scope)) {
- zend_throw_error(zend_ce_error, "Cannot access self:: when no class scope is active");
- return NULL;
+ zend_throw_error(NULL, "Cannot access self:: when no class scope is active");
+ goto failure;
}
ce = scope;
- } else if (class_name_len == sizeof("parent")-1 &&
- !memcmp(lcname, "parent", sizeof("parent")-1)) {
+ } else if (zend_string_equals_literal_ci(class_name, "parent")) {
if (UNEXPECTED(!scope)) {
- zend_throw_error(zend_ce_error, "Cannot access parent:: when no class scope is active");
- return NULL;
+ zend_throw_error(NULL, "Cannot access parent:: when no class scope is active");
+ goto failure;
} else if (UNEXPECTED(!scope->parent)) {
- zend_throw_error(zend_ce_error, "Cannot access parent:: when current class scope has no parent");
- return NULL;
+ zend_throw_error(NULL, "Cannot access parent:: when current class scope has no parent");
+ goto failure;
} else {
ce = scope->parent;
}
- } else if (class_name_len == sizeof("static")-1 &&
- !memcmp(lcname, "static", sizeof("static")-1)) {
+ } else if (zend_string_equals_literal_ci(class_name, "static")) {
ce = zend_get_called_scope(EG(current_execute_data));
if (UNEXPECTED(!ce)) {
- zend_throw_error(zend_ce_error, "Cannot access static:: when no class scope is active");
- return NULL;
+ zend_throw_error(NULL, "Cannot access static:: when no class scope is active");
+ goto failure;
}
} else {
ce = zend_fetch_class(class_name, flags);
}
- free_alloca(lcname, use_heap);
if (ce) {
- ret_constant = zend_hash_find(&ce->constants_table, constant_name);
- if (ret_constant == NULL) {
+ zend_class_constant *c = zend_hash_find_ptr(&ce->constants_table, constant_name);
+ if (c == NULL) {
if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
- zend_throw_error(zend_ce_error, "Undefined class constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
- zend_string_release(class_name);
- zend_string_free(constant_name);
- return NULL;
+ zend_throw_error(NULL, "Undefined class constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
+ goto failure;
+ }
+ ret_constant = NULL;
+ } else {
+ if (!zend_verify_const_access(c, scope)) {
+ zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
+ goto failure;
}
- } else if (Z_ISREF_P(ret_constant)) {
- ret_constant = Z_REFVAL_P(ret_constant);
+ ret_constant = &c->value;
}
}
- zend_string_release(class_name);
- zend_string_free(constant_name);
+
if (ret_constant && Z_CONSTANT_P(ret_constant)) {
- if (UNEXPECTED(zval_update_constant_ex(ret_constant, 1, ce) != SUCCESS)) {
- return NULL;
+ if (Z_TYPE_P(ret_constant) == IS_CONSTANT_AST) {
+ if (IS_CONSTANT_VISITED(ret_constant)) {
+ zend_throw_error(NULL, "Cannot declare self-referencing constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
+ goto failure;
+ }
+ MARK_CONSTANT_VISITED(ret_constant);
+ }
+ if (UNEXPECTED(zval_update_constant_ex(ret_constant, ce) != SUCCESS)) {
+ RESET_CONSTANT_VISITED(ret_constant);
+ goto failure;
}
+ RESET_CONSTANT_VISITED(ret_constant);
}
+failure:
+ zend_string_release(class_name);
+ zend_string_free(constant_name);
return ret_constant;
}
@@ -427,7 +436,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
}
}
-zend_constant *zend_quick_get_constant(const zval *key, zend_ulong flags)
+zend_constant *zend_quick_get_constant(const zval *key, uint32_t flags)
{
zend_constant *c;
diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h
index 9ccf53e43a..cd9a51950a 100644
--- a/Zend/zend_constants.h
+++ b/Zend/zend_constants.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -65,9 +65,10 @@ int zend_startup_constants(void);
int zend_shutdown_constants(void);
void zend_register_standard_constants(void);
void clean_non_persistent_constants(void);
+ZEND_API int zend_verify_const_access(zend_class_constant *c, zend_class_entry *ce);
ZEND_API zval *zend_get_constant(zend_string *name);
ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len);
-ZEND_API zval *zend_get_constant_ex(zend_string *name, zend_class_entry *scope, zend_ulong flags);
+ZEND_API zval *zend_get_constant_ex(zend_string *name, zend_class_entry *scope, uint32_t flags);
ZEND_API void zend_register_bool_constant(const char *name, size_t name_len, zend_bool bval, int flags, int module_number);
ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_number);
ZEND_API void zend_register_long_constant(const char *name, size_t name_len, zend_long lval, int flags, int module_number);
@@ -76,7 +77,7 @@ ZEND_API void zend_register_string_constant(const char *name, size_t name_len, c
ZEND_API void zend_register_stringl_constant(const char *name, size_t name_len, char *strval, size_t strlen, int flags, int module_number);
ZEND_API int zend_register_constant(zend_constant *c);
void zend_copy_constants(HashTable *target, HashTable *sourc);
-zend_constant *zend_quick_get_constant(const zval *key, zend_ulong flags);
+zend_constant *zend_quick_get_constant(const zval *key, uint32_t flags);
END_EXTERN_C()
#define ZEND_CONSTANT_DTOR free_zend_constant
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c
index 2b2dce76db..638d337ac1 100644
--- a/Zend/zend_default_classes.c
+++ b/Zend/zend_default_classes.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_dtrace.c b/Zend/zend_dtrace.c
index 613596dc38..a92ba40546 100644
--- a/Zend/zend_dtrace.c
+++ b/Zend/zend_dtrace.c
@@ -23,6 +23,11 @@
#include "zend_dtrace.h"
#ifdef HAVE_DTRACE
+
+ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
+ZEND_API void (*zend_dtrace_execute)(zend_op_array *op_array);
+ZEND_API void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data, zval *return_value);
+
/* PHP DTrace probes {{{ */
static inline const char *dtrace_get_executed_filename(void)
{
@@ -41,9 +46,9 @@ static inline const char *dtrace_get_executed_filename(void)
ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type)
{
zend_op_array *res;
- DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, (char *)file_handle->filename);
+ DTRACE_COMPILE_FILE_ENTRY(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename);
res = compile_file(file_handle, type);
- DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, (char *)file_handle->filename);
+ DTRACE_COMPILE_FILE_RETURN(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename);
return res;
}
@@ -107,5 +112,6 @@ ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data, zval *ret
}
/* }}} */
+
#endif /* HAVE_DTRACE */
diff --git a/Zend/zend_dtrace.h b/Zend/zend_dtrace.h
index 17b5b538b6..f2250eccae 100644
--- a/Zend/zend_dtrace.h
+++ b/Zend/zend_dtrace.h
@@ -30,9 +30,9 @@ extern "C" {
#endif
#ifdef HAVE_DTRACE
-ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
-ZEND_API void (*zend_dtrace_execute)(zend_op_array *op_array);
-ZEND_API void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data, zval *return_value);
+ZEND_API extern zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
+ZEND_API extern void (*zend_dtrace_execute)(zend_op_array *op_array);
+ZEND_API extern void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data, zval *return_value);
ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type);
ZEND_API void dtrace_execute_ex(zend_execute_data *execute_data);
diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h
index 25bb68de7a..c9573acee3 100644
--- a/Zend/zend_errors.h
+++ b/Zend/zend_errors.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index df61fb741f..4a85e4e73a 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -58,42 +58,54 @@ static int zend_implement_throwable(zend_class_entry *interface, zend_class_entr
}
/* }}} */
-static inline zend_class_entry *i_get_exception_base(zval *object)
+static inline zend_class_entry *i_get_exception_base(zval *object) /* {{{ */
{
return instanceof_function(Z_OBJCE_P(object), zend_ce_exception) ? zend_ce_exception : zend_ce_error;
}
+/* }}} */
-ZEND_API zend_class_entry *zend_get_exception_base(zval *object)
+ZEND_API zend_class_entry *zend_get_exception_base(zval *object) /* {{{ */
{
return i_get_exception_base(object);
}
+/* }}} */
-void zend_exception_set_previous(zend_object *exception, zend_object *add_previous)
+void zend_exception_set_previous(zend_object *exception, zend_object *add_previous) /* {{{ */
{
- zval tmp, *previous, zv, *pzv, rv;
+ zval *previous, *ancestor, *ex;
+ zval pv, zv, rv;
zend_class_entry *base_ce;
if (exception == add_previous || !add_previous || !exception) {
return;
}
- ZVAL_OBJ(&tmp, add_previous);
- if (!instanceof_function(Z_OBJCE(tmp), zend_ce_throwable)) {
+ ZVAL_OBJ(&pv, add_previous);
+ if (!instanceof_function(Z_OBJCE(pv), zend_ce_throwable)) {
zend_error_noreturn(E_CORE_ERROR, "Previous exception must implement Throwable");
return;
}
ZVAL_OBJ(&zv, exception);
- pzv = &zv;
+ ex = &zv;
do {
- base_ce = i_get_exception_base(pzv);
- previous = zend_read_property(base_ce, pzv, "previous", sizeof("previous")-1, 1, &rv);
+ ancestor = zend_read_property_ex(i_get_exception_base(&pv), &pv, CG(known_strings)[ZEND_STR_PREVIOUS], 1, &rv);
+ while (Z_TYPE_P(ancestor) == IS_OBJECT) {
+ if (Z_OBJ_P(ancestor) == Z_OBJ_P(ex)) {
+ OBJ_RELEASE(add_previous);
+ return;
+ }
+ ancestor = zend_read_property_ex(i_get_exception_base(ancestor), ancestor, CG(known_strings)[ZEND_STR_PREVIOUS], 1, &rv);
+ }
+ base_ce = i_get_exception_base(ex);
+ previous = zend_read_property_ex(base_ce, ex, CG(known_strings)[ZEND_STR_PREVIOUS], 1, &rv);
if (Z_TYPE_P(previous) == IS_NULL) {
- zend_update_property(base_ce, pzv, "previous", sizeof("previous")-1, &tmp);
+ zend_update_property_ex(base_ce, ex, CG(known_strings)[ZEND_STR_PREVIOUS], &pv);
GC_REFCOUNT(add_previous)--;
return;
}
- pzv = previous;
- } while (pzv && Z_OBJ_P(pzv) != add_previous);
+ ex = previous;
+ } while (Z_OBJ_P(ex) != add_previous);
}
+/* }}} */
void zend_exception_save(void) /* {{{ */
{
@@ -120,7 +132,7 @@ void zend_exception_restore(void) /* {{{ */
}
/* }}} */
-ZEND_API void zend_throw_exception_internal(zval *exception) /* {{{ */
+ZEND_API ZEND_COLD void zend_throw_exception_internal(zval *exception) /* {{{ */
{
#ifdef HAVE_DTRACE
if (DTRACE_EXCEPTION_THROWN_ENABLED()) {
@@ -186,7 +198,7 @@ ZEND_API void zend_clear_exception(void) /* {{{ */
static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type, int skip_top_traces) /* {{{ */
{
- zval obj;
+ zval obj, tmp;
zend_object *object;
zval trace;
zend_class_entry *base_ce;
@@ -203,17 +215,22 @@ static zend_object *zend_default_exception_new_ex(zend_class_entry *class_type,
array_init(&trace);
}
Z_SET_REFCOUNT(trace, 0);
-
+
base_ce = i_get_exception_base(&obj);
if (EXPECTED(class_type != zend_ce_parse_error || !(filename = zend_get_compiled_filename()))) {
- zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename());
- zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno());
+ ZVAL_STRING(&tmp, zend_get_executed_filename());
+ zend_update_property_ex(base_ce, &obj, CG(known_strings)[ZEND_STR_FILE], &tmp);
+ zval_ptr_dtor(&tmp);
+ ZVAL_LONG(&tmp, zend_get_executed_lineno());
+ zend_update_property_ex(base_ce, &obj, CG(known_strings)[ZEND_STR_LINE], &tmp);
} else {
- zend_update_property_string(base_ce, &obj, "file", sizeof("file")-1, ZSTR_VAL(filename));
- zend_update_property_long(base_ce, &obj, "line", sizeof("line")-1, zend_get_compiled_lineno());
+ ZVAL_STR(&tmp, filename);
+ zend_update_property_ex(base_ce, &obj, CG(known_strings)[ZEND_STR_FILE], &tmp);
+ ZVAL_LONG(&tmp, zend_get_compiled_lineno());
+ zend_update_property_ex(base_ce, &obj, CG(known_strings)[ZEND_STR_LINE], &tmp);
}
- zend_update_property(base_ce, &obj, "trace", sizeof("trace")-1, &trace);
+ zend_update_property_ex(base_ce, &obj, CG(known_strings)[ZEND_STR_TRACE], &trace);
return object;
}
@@ -233,7 +250,7 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{
/* {{{ proto Exception|Error Exception|Error::__clone()
Clone the exception object */
-ZEND_METHOD(exception, __clone)
+ZEND_COLD ZEND_METHOD(exception, __clone)
{
/* Should never be executable */
zend_throw_exception(NULL, "Cannot clone object using __clone()", 0);
@@ -246,7 +263,7 @@ ZEND_METHOD(exception, __construct)
{
zend_string *message = NULL;
zend_long code = 0;
- zval *object, *previous = NULL;
+ zval tmp, *object, *previous = NULL;
zend_class_entry *base_ce;
int argc = ZEND_NUM_ARGS();
@@ -256,26 +273,56 @@ ZEND_METHOD(exception, __construct)
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, zend_ce_throwable) == FAILURE) {
zend_class_entry *ce;
- if (execute_data->called_scope) {
- ce = execute_data->called_scope;
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else if (Z_CE(EX(This))) {
+ ce = Z_CE(EX(This));
} else {
ce = base_ce;
}
- zend_throw_error(zend_ce_error, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", ZSTR_VAL(ce->name));
return;
}
if (message) {
- zend_update_property_str(base_ce, object, "message", sizeof("message")-1, message);
+ ZVAL_STR(&tmp, message);
+ zend_update_property_ex(base_ce, object, CG(known_strings)[ZEND_STR_MESSAGE], &tmp);
}
if (code) {
- zend_update_property_long(base_ce, object, "code", sizeof("code")-1, code);
+ ZVAL_LONG(&tmp, code);
+ zend_update_property_ex(base_ce, object, CG(known_strings)[ZEND_STR_CODE], &tmp);
}
if (previous) {
- zend_update_property(base_ce, object, "previous", sizeof("previous")-1, previous);
+ zend_update_property_ex(base_ce, object, CG(known_strings)[ZEND_STR_PREVIOUS], previous);
+ }
+}
+/* }}} */
+
+/* {{{ proto Exception::__wakeup()
+ Exception unserialize checks */
+#define CHECK_EXC_TYPE(id, type) \
+ ZVAL_UNDEF(&value); \
+ pvalue = zend_read_property_ex(i_get_exception_base(object), (object), CG(known_strings)[id], 1, &value); \
+ if(Z_TYPE_P(pvalue) != IS_UNDEF && Z_TYPE_P(pvalue) != type) { \
+ zval tmp; \
+ ZVAL_STR_COPY(&tmp, CG(known_strings)[id]); \
+ Z_OBJ_HANDLER_P(object, unset_property)(object, &tmp, NULL); \
+ zval_ptr_dtor(&tmp); \
}
+
+ZEND_METHOD(exception, __wakeup)
+{
+ zval value, *pvalue;
+ zval *object = getThis();
+ CHECK_EXC_TYPE(ZEND_STR_MESSAGE, IS_STRING);
+ CHECK_EXC_TYPE(ZEND_STR_STRING, IS_STRING);
+ CHECK_EXC_TYPE(ZEND_STR_CODE, IS_LONG);
+ CHECK_EXC_TYPE(ZEND_STR_FILE, IS_STRING);
+ CHECK_EXC_TYPE(ZEND_STR_LINE, IS_LONG);
+ CHECK_EXC_TYPE(ZEND_STR_TRACE, IS_ARRAY);
+ CHECK_EXC_TYPE(ZEND_STR_PREVIOUS, IS_OBJECT);
}
/* }}} */
@@ -285,44 +332,53 @@ ZEND_METHOD(error_exception, __construct)
{
char *message = NULL, *filename = NULL;
zend_long code = 0, severity = E_ERROR, lineno;
- zval *object, *previous = NULL;
+ zval tmp, *object, *previous = NULL;
int argc = ZEND_NUM_ARGS();
size_t message_len, filename_len;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, zend_ce_throwable) == FAILURE) {
zend_class_entry *ce;
- if (execute_data->called_scope) {
- ce = execute_data->called_scope;
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else if (Z_CE(EX(This))) {
+ ce = Z_CE(EX(This));
} else {
ce = zend_ce_error_exception;
}
- zend_throw_error(zend_ce_error, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Wrong parameters for %s([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])", ZSTR_VAL(ce->name));
return;
}
object = getThis();
if (message) {
- zend_update_property_string(zend_ce_exception, object, "message", sizeof("message")-1, message);
+ ZVAL_STRING(&tmp, message);
+ zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_MESSAGE], &tmp);
+ zval_ptr_dtor(&tmp);
}
if (code) {
- zend_update_property_long(zend_ce_exception, object, "code", sizeof("code")-1, code);
+ ZVAL_LONG(&tmp, code);
+ zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_CODE], &tmp);
}
if (previous) {
- zend_update_property(zend_ce_exception, object, "previous", sizeof("previous")-1, previous);
+ zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_PREVIOUS], previous);
}
- zend_update_property_long(zend_ce_error_exception, object, "severity", sizeof("severity")-1, severity);
+ ZVAL_LONG(&tmp, severity);
+ zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_SEVERITY], &tmp);
if (argc >= 4) {
- zend_update_property_string(zend_ce_exception, object, "file", sizeof("file")-1, filename);
+ ZVAL_STRING(&tmp, filename);
+ zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_FILE], &tmp);
+ zval_ptr_dtor(&tmp);
if (argc < 5) {
lineno = 0; /* invalidate lineno */
}
- zend_update_property_long(zend_ce_exception, object, "line", sizeof("line")-1, lineno);
+ ZVAL_LONG(&tmp, lineno);
+ zend_update_property_ex(zend_ce_exception, object, CG(known_strings)[ZEND_STR_LINE], &tmp);
}
}
/* }}} */
@@ -332,10 +388,10 @@ ZEND_METHOD(error_exception, __construct)
return; \
}
-#define GET_PROPERTY(object, name) \
- zend_read_property(i_get_exception_base(object), (object), name, sizeof(name) - 1, 0, &rv)
-#define GET_PROPERTY_SILENT(object, name) \
- zend_read_property(i_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &rv)
+#define GET_PROPERTY(object, id) \
+ zend_read_property_ex(i_get_exception_base(object), (object), CG(known_strings)[id], 0, &rv)
+#define GET_PROPERTY_SILENT(object, id) \
+ zend_read_property_ex(i_get_exception_base(object), (object), CG(known_strings)[id], 1, &rv)
/* {{{ proto string Exception|Error::getFile()
Get the file in which the exception occurred */
@@ -345,7 +401,7 @@ ZEND_METHOD(exception, getFile)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), "file"));
+ ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_FILE));
}
/* }}} */
@@ -357,7 +413,7 @@ ZEND_METHOD(exception, getLine)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), "line"));
+ ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_LINE));
}
/* }}} */
@@ -369,7 +425,7 @@ ZEND_METHOD(exception, getMessage)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), "message"));
+ ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_MESSAGE));
}
/* }}} */
@@ -381,7 +437,7 @@ ZEND_METHOD(exception, getCode)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), "code"));
+ ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_CODE));
}
/* }}} */
@@ -393,7 +449,7 @@ ZEND_METHOD(exception, getTrace)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), "trace"));
+ ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_TRACE));
}
/* }}} */
@@ -405,80 +461,23 @@ ZEND_METHOD(error_exception, getSeverity)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), "severity"));
+ ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_SEVERITY));
}
/* }}} */
#define TRACE_APPEND_KEY(key) do { \
- tmp = zend_hash_str_find(ht, key, sizeof(key)-1); \
+ tmp = zend_hash_find(ht, key); \
if (tmp) { \
if (Z_TYPE_P(tmp) != IS_STRING) { \
- zend_error(E_WARNING, "Value for %s is no string", key); \
+ zend_error(E_WARNING, "Value for %s is no string", \
+ ZSTR_VAL(key)); \
smart_str_appends(str, "[unknown]"); \
} else { \
- smart_str_append(str, Z_STR_P(tmp)); \
+ smart_str_appends(str, Z_STRVAL_P(tmp)); \
} \
} \
} while (0)
-/* Windows uses VK_ESCAPE instead of \e */
-#ifndef VK_ESCAPE
-#define VK_ESCAPE '\e'
-#endif
-
-static size_t compute_escaped_string_len(const char *s, size_t l) {
- size_t i, len = l;
- for (i = 0; i < l; ++i) {
- char c = s[i];
- if (c == '\n' || c == '\r' || c == '\t' ||
- c == '\f' || c == '\v' || c == '\\' || c == VK_ESCAPE) {
- len += 1;
- } else if (c < 32 || c > 126) {
- len += 3;
- }
- }
- return len;
-}
-
-static void smart_str_append_escaped(smart_str *str, const char *s, size_t l) {
- char *res;
- size_t i, len = compute_escaped_string_len(s, l);
-
- smart_str_alloc(str, len, 0);
- res = &ZSTR_VAL(str->s)[ZSTR_LEN(str->s)];
- ZSTR_LEN(str->s) += len;
-
- for (i = 0; i < l; ++i) {
- unsigned char c = s[i];
- if (c < 32 || c == '\\' || c > 126) {
- *res++ = '\\';
- switch (c) {
- case '\n': *res++ = 'n'; break;
- case '\r': *res++ = 'r'; break;
- case '\t': *res++ = 't'; break;
- case '\f': *res++ = 'f'; break;
- case '\v': *res++ = 'v'; break;
- case '\\': *res++ = '\\'; break;
- case VK_ESCAPE: *res++ = 'e'; break;
- default:
- *res++ = 'x';
- if ((c >> 4) < 10) {
- *res++ = (c >> 4) + '0';
- } else {
- *res++ = (c >> 4) + 'A' - 10;
- }
- if ((c & 0xf) < 10) {
- *res++ = (c & 0xf) + '0';
- } else {
- *res++ = (c & 0xf) + 'A' - 10;
- }
- }
- } else {
- *res++ = c;
- }
- }
-}
-
static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
{
/* the trivial way would be to do
@@ -530,7 +529,7 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
break;
case IS_OBJECT:
smart_str_appends(str, "Object(");
- smart_str_append(str, Z_OBJCE_P(arg)->name);
+ smart_str_appends(str, ZSTR_VAL(Z_OBJCE_P(arg)->name));
smart_str_appends(str, "), ");
break;
}
@@ -545,14 +544,14 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /*
smart_str_append_long(str, num);
smart_str_appendc(str, ' ');
- file = zend_hash_str_find(ht, "file", sizeof("file")-1);
+ file = zend_hash_find(ht, CG(known_strings)[ZEND_STR_FILE]);
if (file) {
if (Z_TYPE_P(file) != IS_STRING) {
zend_error(E_WARNING, "Function name is no string");
smart_str_appends(str, "[unknown function]");
} else{
zend_long line;
- tmp = zend_hash_str_find(ht, "line", sizeof("line")-1);
+ tmp = zend_hash_find(ht, CG(known_strings)[ZEND_STR_LINE]);
if (tmp) {
if (Z_TYPE_P(tmp) == IS_LONG) {
line = Z_LVAL_P(tmp);
@@ -571,11 +570,11 @@ static void _build_trace_string(smart_str *str, HashTable *ht, uint32_t num) /*
} else {
smart_str_appends(str, "[internal function]: ");
}
- TRACE_APPEND_KEY("class");
- TRACE_APPEND_KEY("type");
- TRACE_APPEND_KEY("function");
+ TRACE_APPEND_KEY(CG(known_strings)[ZEND_STR_CLASS]);
+ TRACE_APPEND_KEY(CG(known_strings)[ZEND_STR_TYPE]);
+ TRACE_APPEND_KEY(CG(known_strings)[ZEND_STR_FUNCTION]);
smart_str_appendc(str, '(');
- tmp = zend_hash_str_find(ht, "args", sizeof("args")-1);
+ tmp = zend_hash_find(ht, CG(known_strings)[ZEND_STR_ARGS]);
if (tmp) {
if (Z_TYPE_P(tmp) == IS_ARRAY) {
size_t last_len = ZSTR_LEN(str->s);
@@ -608,11 +607,11 @@ ZEND_METHOD(exception, getTraceAsString)
uint32_t num = 0;
DEFAULT_0_PARAMS;
-
+
object = getThis();
base_ce = i_get_exception_base(object);
- trace = zend_read_property(base_ce, object, "trace", sizeof("trace")-1, 1, &rv);
+ trace = zend_read_property_ex(base_ce, object, CG(known_strings)[ZEND_STR_TRACE], 1, &rv);
if (Z_TYPE_P(trace) != IS_ARRAY) {
RETURN_FALSE;
}
@@ -642,7 +641,7 @@ ZEND_METHOD(exception, getPrevious)
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY_SILENT(getThis(), "previous"));
+ ZVAL_COPY(return_value, GET_PROPERTY_SILENT(getThis(), ZEND_STR_PREVIOUS));
} /* }}} */
size_t zend_spprintf(char **message, size_t max_len, const char *format, ...) /* {{{ */
@@ -677,25 +676,24 @@ ZEND_METHOD(exception, __toString)
zend_class_entry *base_ce;
zend_string *str;
zend_fcall_info fci;
- zval fname, rv;
+ zval rv, tmp;
+ zend_string *fname;
DEFAULT_0_PARAMS;
str = ZSTR_EMPTY_ALLOC();
exception = getThis();
- ZVAL_STRINGL(&fname, "gettraceasstring", sizeof("gettraceasstring")-1);
+ fname = zend_string_init("gettraceasstring", sizeof("gettraceasstring")-1, 0);
- while (exception && Z_TYPE_P(exception) == IS_OBJECT) {
+ while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), zend_ce_throwable)) {
zend_string *prev_str = str;
- zend_string *message = zval_get_string(GET_PROPERTY(exception, "message"));
- zend_string *file = zval_get_string(GET_PROPERTY(exception, "file"));
- zend_long line = zval_get_long(GET_PROPERTY(exception, "line"));
+ zend_string *message = zval_get_string(GET_PROPERTY(exception, ZEND_STR_MESSAGE));
+ zend_string *file = zval_get_string(GET_PROPERTY(exception, ZEND_STR_FILE));
+ zend_long line = zval_get_long(GET_PROPERTY(exception, ZEND_STR_LINE));
fci.size = sizeof(fci);
- fci.function_table = &Z_OBJCE_P(exception)->function_table;
- ZVAL_COPY_VALUE(&fci.function_name, &fname);
- fci.symbol_table = NULL;
+ ZVAL_STR(&fci.function_name, fname);
fci.object = Z_OBJ_P(exception);
fci.retval = &trace;
fci.param_count = 0;
@@ -734,16 +732,17 @@ ZEND_METHOD(exception, __toString)
zend_string_release(file);
zval_ptr_dtor(&trace);
- exception = GET_PROPERTY(exception, "previous");
+ exception = GET_PROPERTY(exception, ZEND_STR_PREVIOUS);
}
- zval_dtor(&fname);
+ zend_string_release(fname);
exception = getThis();
base_ce = i_get_exception_base(exception);
/* We store the result in the private property string so we can access
* the result in uncaught exception handlers without memleaks. */
- zend_update_property_str(base_ce, exception, "string", sizeof("string")-1, str);
+ ZVAL_STR(&tmp, str);
+ zend_update_property_ex(base_ce, exception, CG(known_strings)[ZEND_STR_STRING], &tmp);
RETURN_STR(str);
}
@@ -782,6 +781,7 @@ ZEND_END_ARG_INFO()
static const zend_function_entry default_exception_functions[] = {
ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
+ ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
@@ -812,7 +812,7 @@ static const zend_function_entry error_exception_functions[] = {
void zend_register_default_exception(void) /* {{{ */
{
zend_class_entry ce;
-
+
REGISTER_MAGIC_INTERFACE(throwable, Throwable);
memcpy(&default_exception_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
@@ -868,7 +868,7 @@ void zend_register_default_exception(void) /* {{{ */
/* }}} */
/* {{{ Deprecated - Use zend_ce_exception directly instead */
-ZEND_API zend_class_entry *zend_exception_get_default(void)
+ZEND_API zend_class_entry *zend_exception_get_default(void)
{
return zend_ce_exception;
}
@@ -881,9 +881,9 @@ ZEND_API zend_class_entry *zend_get_error_exception(void)
}
/* }}} */
-ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code) /* {{{ */
+ZEND_API ZEND_COLD zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code) /* {{{ */
{
- zval ex;
+ zval ex, tmp;
if (exception_ce) {
if (!instanceof_function(exception_ce, zend_ce_throwable)) {
@@ -897,10 +897,13 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const
if (message) {
- zend_update_property_string(exception_ce, &ex, "message", sizeof("message")-1, message);
+ ZVAL_STRING(&tmp, message);
+ zend_update_property_ex(exception_ce, &ex, CG(known_strings)[ZEND_STR_MESSAGE], &tmp);
+ zval_ptr_dtor(&tmp);
}
if (code) {
- zend_update_property_long(exception_ce, &ex, "code", sizeof("code")-1, code);
+ ZVAL_LONG(&tmp, code);
+ zend_update_property_ex(exception_ce, &ex, CG(known_strings)[ZEND_STR_CODE], &tmp);
}
zend_throw_exception_internal(&ex);
@@ -908,7 +911,7 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const
}
/* }}} */
-ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) /* {{{ */
+ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) /* {{{ */
{
va_list arg;
char *message;
@@ -923,12 +926,13 @@ ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, ze
}
/* }}} */
-ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, zend_long code, int severity) /* {{{ */
+ZEND_API ZEND_COLD zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, zend_long code, int severity) /* {{{ */
{
- zval ex;
+ zval ex, tmp;
zend_object *obj = zend_throw_exception(exception_ce, message, code);
ZVAL_OBJ(&ex, obj);
- zend_update_property_long(zend_ce_error_exception, &ex, "severity", sizeof("severity")-1, severity);
+ ZVAL_LONG(&tmp, severity);
+ zend_update_property_ex(zend_ce_error_exception, &ex, CG(known_strings)[ZEND_STR_SEVERITY], &tmp);
return obj;
}
/* }}} */
@@ -943,7 +947,7 @@ static void zend_error_va(int type, const char *file, uint lineno, const char *f
}
/* }}} */
-static void zend_error_helper(int type, const char *filename, const uint lineno, const char *format, ...)
+static void zend_error_helper(int type, const char *filename, const uint lineno, const char *format, ...) /* {{{ */
{
va_list va;
@@ -951,9 +955,10 @@ static void zend_error_helper(int type, const char *filename, const uint lineno,
zend_error_cb(type, filename, lineno, format, va);
va_end(va);
}
+/* }}} */
/* This function doesn't return if it uses E_ERROR */
-ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
+ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* {{{ */
{
zval exception, rv;
zend_class_entry *ce_exception;
@@ -962,12 +967,11 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
ce_exception = Z_OBJCE(exception);
EG(exception) = NULL;
if (ce_exception == zend_ce_parse_error) {
- zend_string *message = zval_get_string(GET_PROPERTY(&exception, "message"));
- zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, "file"));
- zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line"));
- zend_long code = zval_get_long(GET_PROPERTY_SILENT(&exception, "code"));
+ zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE));
+ zend_string *file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE));
+ zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE));
- zend_error_helper(code? code : E_ERROR, ZSTR_VAL(file), line, "%s", ZSTR_VAL(message));
+ zend_error_helper(E_PARSE, ZSTR_VAL(file), line, "%s", ZSTR_VAL(message));
zend_string_release(file);
zend_string_release(message);
@@ -981,7 +985,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
if (Z_TYPE(tmp) != IS_STRING) {
zend_error(E_WARNING, "%s::__toString() must return a string", ZSTR_VAL(ce_exception->name));
} else {
- zend_update_property_string(i_get_exception_base(&exception), &exception, "string", sizeof("string")-1, EG(exception) ? ZSTR_VAL(ce_exception->name) : Z_STRVAL(tmp));
+ zend_update_property_ex(i_get_exception_base(&exception), &exception, CG(known_strings)[ZEND_STR_STRING], &tmp);
}
}
zval_ptr_dtor(&tmp);
@@ -992,8 +996,8 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
ZVAL_OBJ(&zv, EG(exception));
/* do the best we can to inform about the inner exception */
if (instanceof_function(ce_exception, zend_ce_exception) || instanceof_function(ce_exception, zend_ce_error)) {
- file = zval_get_string(GET_PROPERTY_SILENT(&zv, "file"));
- line = zval_get_long(GET_PROPERTY_SILENT(&zv, "line"));
+ file = zval_get_string(GET_PROPERTY_SILENT(&zv, ZEND_STR_FILE));
+ line = zval_get_long(GET_PROPERTY_SILENT(&zv, ZEND_STR_LINE));
}
zend_error_va(E_WARNING, (file && ZSTR_LEN(file) > 0) ? ZSTR_VAL(file) : NULL, line,
@@ -1005,9 +1009,9 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
}
}
- str = zval_get_string(GET_PROPERTY_SILENT(&exception, "string"));
- file = zval_get_string(GET_PROPERTY_SILENT(&exception, "file"));
- line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line"));
+ str = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_STRING));
+ file = zval_get_string(GET_PROPERTY_SILENT(&exception, ZEND_STR_FILE));
+ line = zval_get_long(GET_PROPERTY_SILENT(&exception, ZEND_STR_LINE));
zend_error_va(severity, (file && ZSTR_LEN(file) > 0) ? ZSTR_VAL(file) : NULL, line,
"Uncaught %s\n thrown", ZSTR_VAL(str));
@@ -1022,7 +1026,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */
}
/* }}} */
-ZEND_API void zend_throw_exception_object(zval *exception) /* {{{ */
+ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */
{
zend_class_entry *exception_ce;
@@ -1033,7 +1037,7 @@ ZEND_API void zend_throw_exception_object(zval *exception) /* {{{ */
exception_ce = Z_OBJCE_P(exception);
if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) {
- zend_throw_error(zend_ce_error, "Cannot throw objects that do not implement Throwable");
+ zend_throw_error(NULL, "Cannot throw objects that do not implement Throwable");
return;
}
zend_throw_exception_internal(exception);
diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h
index f9bf24b4c2..d351c2468d 100644
--- a/Zend/zend_exceptions.h
+++ b/Zend/zend_exceptions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,7 +39,7 @@ ZEND_API void zend_exception_set_previous(zend_object *exception, zend_object *a
ZEND_API void zend_exception_save(void);
ZEND_API void zend_exception_restore(void);
-ZEND_API void zend_throw_exception_internal(zval *exception);
+ZEND_API ZEND_COLD void zend_throw_exception_internal(zval *exception);
void zend_register_default_exception(void);
@@ -55,9 +55,9 @@ ZEND_API void zend_register_default_classes(void);
/* exception_ce NULL, zend_ce_exception, zend_ce_error, or a derived class
* message NULL or the message of the exception */
-ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code);
-ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...);
-ZEND_API void zend_throw_exception_object(zval *exception);
+ZEND_API ZEND_COLD zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code);
+ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...);
+ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception);
ZEND_API void zend_clear_exception(void);
ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, zend_long code, int severity);
@@ -65,7 +65,7 @@ ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce,
extern ZEND_API void (*zend_throw_exception_hook)(zval *ex);
/* show an exception using zend_error(severity,...), severity should be E_ERROR */
-ZEND_API void zend_exception_error(zend_object *exception, int severity);
+ZEND_API ZEND_COLD void zend_exception_error(zend_object *exception, int severity);
/* do not export, in php it's available thru spprintf directly */
size_t zend_spprintf(char **message, size_t max_len, const char *format, ...);
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index bbe1537b88..b2769ad6fb 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -39,6 +40,7 @@
#include "zend_vm.h"
#include "zend_dtrace.h"
#include "zend_inheritance.h"
+#include "zend_type_info.h"
/* Virtual current working directory support */
#include "zend_virtual_cwd.h"
@@ -53,6 +55,8 @@ typedef int (ZEND_FASTCALL *incdec_t)(zval *);
#define get_zval_ptr(op_type, node, ex, should_free, type) _get_zval_ptr(op_type, node, ex, should_free, type)
#define get_zval_ptr_deref(op_type, node, ex, should_free, type) _get_zval_ptr_deref(op_type, node, ex, should_free, type)
+#define get_zval_ptr_r(op_type, node, ex, should_free) _get_zval_ptr_r(op_type, node, ex, should_free)
+#define get_zval_ptr_r_deref(op_type, node, ex, should_free) _get_zval_ptr_r_deref(op_type, node, ex, should_free)
#define get_zval_ptr_undef(op_type, node, ex, should_free, type) _get_zval_ptr_undef(op_type, node, ex, should_free, type)
#define get_zval_ptr_ptr(op_type, node, ex, should_free, type) _get_zval_ptr_ptr(op_type, node, ex, should_free, type)
#define get_zval_ptr_ptr_undef(op_type, node, ex, should_free, type) _get_zval_ptr_ptr(op_type, node, ex, should_free, type)
@@ -61,17 +65,17 @@ typedef int (ZEND_FASTCALL *incdec_t)(zval *);
#define get_obj_zval_ptr_ptr(op_type, node, ex, should_free, type) _get_obj_zval_ptr_ptr(op_type, node, ex, should_free, type)
/* Prototypes */
-static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array);
-static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array);
-static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array);
+static void zend_extension_statement_handler(const zend_extension *extension, zend_execute_data *frame);
+static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_execute_data *frame);
+static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_execute_data *frame);
-#define RETURN_VALUE_USED(opline) (!((opline)->result_type & EXT_TYPE_UNUSED))
+#define RETURN_VALUE_USED(opline) ((opline)->result_type != IS_UNUSED)
static ZEND_FUNCTION(pass)
{
}
-static const zend_internal_function zend_pass_function = {
+ZEND_API const zend_internal_function zend_pass_function = {
ZEND_INTERNAL_FUNCTION, /* type */
{0, 0, 0}, /* arg_flags */
0, /* fn_flags */
@@ -82,24 +86,22 @@ static const zend_internal_function zend_pass_function = {
0, /* required_num_args */
NULL, /* arg_info */
ZEND_FN(pass), /* handler */
- NULL /* module */
+ NULL, /* module */
+ {NULL,NULL,NULL,NULL} /* reserved */
};
#undef zval_ptr_dtor
#define zval_ptr_dtor(zv) i_zval_ptr_dtor(zv ZEND_FILE_LINE_CC)
-#define PZVAL_LOCK(z) if (Z_REFCOUNTED_P(z)) Z_ADDREF_P((z))
-#define SELECTIVE_PZVAL_LOCK(pzv, opline) if (RETURN_VALUE_USED(opline)) { PZVAL_LOCK(pzv); }
-
#define READY_TO_DESTROY(zv) \
- (zv && Z_REFCOUNTED_P(zv) && Z_REFCOUNT_P(zv) == 1)
+ (UNEXPECTED(zv) && Z_REFCOUNTED_P(zv) && Z_REFCOUNT_P(zv) == 1)
-#define EXTRACT_ZVAL_PTR(zv) do { \
- zval *__zv = (zv); \
- if (Z_TYPE_P(__zv) == IS_INDIRECT) { \
- ZVAL_COPY(__zv, Z_INDIRECT_P(__zv)); \
- } \
- } while (0)
+#define EXTRACT_ZVAL_PTR(zv) do { \
+ zval *__zv = (zv); \
+ if (EXPECTED(Z_TYPE_P(__zv) == IS_INDIRECT)) { \
+ ZVAL_COPY(__zv, Z_INDIRECT_P(__zv)); \
+ } \
+} while (0)
#define FREE_OP(should_free) \
if (should_free) { \
@@ -116,21 +118,8 @@ static const zend_internal_function zend_pass_function = {
zval_ptr_dtor_nogc(should_free); \
}
-/* End of zend_execute_locks.h */
-
#define CV_DEF_OF(i) (EX(func)->op_array.vars[i])
-#define CTOR_CALL_BIT 0x1
-#define CTOR_USED_BIT 0x2
-
-#define IS_CTOR_CALL(ce) (((zend_uintptr_t)(ce)) & CTOR_CALL_BIT)
-#define IS_CTOR_USED(ce) (((zend_uintptr_t)(ce)) & CTOR_USED_BIT)
-
-#define ENCODE_CTOR(ce, used) \
- ((zend_class_entry*)(((zend_uintptr_t)(ce)) | CTOR_CALL_BIT | ((used) ? CTOR_USED_BIT : 0)))
-#define DECODE_CTOR(ce) \
- ((zend_class_entry*)(((zend_uintptr_t)(ce)) & ~(CTOR_CALL_BIT|CTOR_USED_BIT)))
-
#define ZEND_VM_MAIN_STACK_PAGE_SLOTS (16 * 1024) /* should be a power of 2 */
#define ZEND_VM_GENERATOR_STACK_PAGE_SLOTS (256)
@@ -147,7 +136,7 @@ static const zend_internal_function zend_pass_function = {
static zend_always_inline zend_vm_stack zend_vm_stack_new_page(size_t size, zend_vm_stack prev) {
zend_vm_stack page = (zend_vm_stack)emalloc(size);
- page->top = ZEND_VM_STACK_ELEMETS(page);
+ page->top = ZEND_VM_STACK_ELEMENTS(page);
page->end = (zval*)((char*)page + size);
page->prev = prev;
return page;
@@ -221,22 +210,25 @@ static zend_always_inline zval *_get_zval_ptr_var_deref(uint32_t var, const zend
return ret;
}
-static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int type, const zend_execute_data *execute_data)
+static zend_never_inline ZEND_COLD void zval_undefined_cv(uint32_t var, const zend_execute_data *execute_data)
{
- zend_string *cv;
+ zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
+
+ zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
+}
+static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int type, const zend_execute_data *execute_data)
+{
switch (type) {
case BP_VAR_R:
case BP_VAR_UNSET:
- cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
- zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
+ zval_undefined_cv(var, execute_data);
/* break missing intentionally */
case BP_VAR_IS:
ptr = &EG(uninitialized_zval);
break;
case BP_VAR_RW:
- cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
- zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
+ zval_undefined_cv(var, execute_data);
/* break missing intentionally */
case BP_VAR_W:
ZVAL_NULL(ptr);
@@ -247,26 +239,20 @@ static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int
static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_R(zval *ptr, uint32_t var, const zend_execute_data *execute_data)
{
- zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
-
- zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
+ zval_undefined_cv(var, execute_data);
return &EG(uninitialized_zval);
}
static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_UNSET(zval *ptr, uint32_t var, const zend_execute_data *execute_data)
{
- zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
-
- zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
+ zval_undefined_cv(var, execute_data);
return &EG(uninitialized_zval);
}
static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_RW(zval *ptr, uint32_t var, const zend_execute_data *execute_data)
{
- zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
-
ZVAL_NULL(ptr);
- zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
+ zval_undefined_cv(var, execute_data);
return ptr;
}
@@ -400,6 +386,11 @@ static zend_always_inline zval *_get_zval_ptr_cv_undef_BP_VAR_RW(const zend_exec
return EX_VAR(var);
}
+static zend_always_inline zval *_get_zval_ptr_cv_undef_BP_VAR_UNSET(const zend_execute_data *execute_data, uint32_t var)
+{
+ return EX_VAR(var);
+}
+
static zend_always_inline zval *_get_zval_ptr_cv_deref_BP_VAR_W(const zend_execute_data *execute_data, uint32_t var)
{
zval *ret = EX_VAR(var);
@@ -432,6 +423,27 @@ static zend_always_inline zval *_get_zval_ptr(int op_type, znode_op node, const
}
}
+static zend_always_inline zval *_get_zval_ptr_r(int op_type, znode_op node, const zend_execute_data *execute_data, zend_free_op *should_free)
+{
+ if (op_type & (IS_TMP_VAR|IS_VAR)) {
+ if (op_type == IS_TMP_VAR) {
+ return _get_zval_ptr_tmp(node.var, execute_data, should_free);
+ } else {
+ ZEND_ASSERT(op_type == IS_VAR);
+ return _get_zval_ptr_var(node.var, execute_data, should_free);
+ }
+ } else {
+ *should_free = NULL;
+ if (op_type == IS_CONST) {
+ return EX_CONSTANT(node);
+ } else if (op_type == IS_CV) {
+ return _get_zval_ptr_cv_BP_VAR_R(execute_data, node.var);
+ } else {
+ return NULL;
+ }
+ }
+}
+
static zend_always_inline zval *_get_zval_ptr_deref(int op_type, znode_op node, const zend_execute_data *execute_data, zend_free_op *should_free, int type)
{
if (op_type & (IS_TMP_VAR|IS_VAR)) {
@@ -453,6 +465,27 @@ static zend_always_inline zval *_get_zval_ptr_deref(int op_type, znode_op node,
}
}
+static zend_always_inline zval *_get_zval_ptr_r_deref(int op_type, znode_op node, const zend_execute_data *execute_data, zend_free_op *should_free)
+{
+ if (op_type & (IS_TMP_VAR|IS_VAR)) {
+ if (op_type == IS_TMP_VAR) {
+ return _get_zval_ptr_tmp(node.var, execute_data, should_free);
+ } else {
+ ZEND_ASSERT(op_type == IS_VAR);
+ return _get_zval_ptr_var_deref(node.var, execute_data, should_free);
+ }
+ } else {
+ *should_free = NULL;
+ if (op_type == IS_CONST) {
+ return EX_CONSTANT(node);
+ } else if (op_type == IS_CV) {
+ return _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, node.var);
+ } else {
+ return NULL;
+ }
+ }
+}
+
static zend_always_inline zval *_get_zval_ptr_undef(int op_type, znode_op node, const zend_execute_data *execute_data, zend_free_op *should_free, int type)
{
if (op_type & (IS_TMP_VAR|IS_VAR)) {
@@ -481,13 +514,8 @@ static zend_always_inline zval *_get_zval_ptr_ptr_var(uint32_t var, const zend_e
if (EXPECTED(Z_TYPE_P(ret) == IS_INDIRECT)) {
*should_free = NULL;
ret = Z_INDIRECT_P(ret);
- } else if (!Z_REFCOUNTED_P(ret)) {
- *should_free = ret; /* immutable array may be converted to regular */
- } else if (Z_REFCOUNT_P(ret) == 1) {
- *should_free = ret;
} else {
- *should_free = NULL;
- Z_DELREF_P(ret);
+ *should_free = ret;
}
return ret;
}
@@ -568,7 +596,7 @@ static inline int make_real_object(zval *object)
return 1;
}
-ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce)
+static char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce)
{
zend_string *key;
ALLOCA_FLAG(use_heap);
@@ -590,7 +618,7 @@ static zend_always_inline zend_class_entry* zend_verify_arg_class_kind(const zen
return zend_fetch_class(cur_arg_info->class_name, (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD));
}
-ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg)
+static ZEND_COLD void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind)
{
zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data;
const char *fname = ZSTR_VAL(zf->common.function_name);
@@ -618,19 +646,19 @@ ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, c
}
}
-static int is_null_constant(zval *default_value)
+static int is_null_constant(zend_class_entry *scope, zval *default_value)
{
if (Z_CONSTANT_P(default_value)) {
zval constant;
- ZVAL_COPY_VALUE(&constant, default_value);
- if (UNEXPECTED(zval_update_constant_ex(&constant, 0, NULL) != SUCCESS)) {
+ ZVAL_COPY(&constant, default_value);
+ if (UNEXPECTED(zval_update_constant_ex(&constant, scope) != SUCCESS)) {
return 0;
}
if (Z_TYPE(constant) == IS_NULL) {
return 1;
}
- zval_dtor(&constant);
+ zval_ptr_dtor(&constant);
}
return 0;
}
@@ -696,7 +724,7 @@ static zend_bool zend_verify_scalar_type_hint(zend_uchar type_hint, zval *arg, z
return zend_verify_weak_scalar_type_hint(type_hint, arg);
}
-static void zend_verify_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg)
+static int zend_verify_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg)
{
zend_internal_arg_info *cur_arg_info;
char *need_msg, *class_name;
@@ -707,7 +735,7 @@ static void zend_verify_internal_arg_type(zend_function *zf, uint32_t arg_num, z
} else if (zf->internal_function.fn_flags & ZEND_ACC_VARIADIC) {
cur_arg_info = &zf->internal_function.arg_info[zf->internal_function.num_args];
} else {
- return;
+ return 1;
}
if (cur_arg_info->type_hint) {
@@ -716,25 +744,47 @@ static void zend_verify_internal_arg_type(zend_function *zf, uint32_t arg_num, z
if (cur_arg_info->class_name) {
need_msg = zend_verify_internal_arg_class_kind((zend_internal_arg_info*)cur_arg_info, &class_name, &ce);
if (!ce || !instanceof_function(Z_OBJCE_P(arg), ce)) {
- zend_verify_arg_error(zf, arg_num, need_msg, class_name, "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name), arg);
+ zend_verify_arg_error(zf, arg_num, need_msg, class_name, "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name));
+ return 0;
}
}
} else if (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null) {
if (cur_arg_info->class_name) {
need_msg = zend_verify_internal_arg_class_kind((zend_internal_arg_info*)cur_arg_info, &class_name, &ce);
- zend_verify_arg_error(zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "");
+ return 0;
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) {
- zend_verify_arg_error(zf, arg_num, "be callable", "", zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(zf, arg_num, "be callable", "", zend_zval_type_name(arg), "");
+ return 0;
}
} else if (cur_arg_info->type_hint == _IS_BOOL &&
EXPECTED(Z_TYPE_P(arg) == IS_FALSE || Z_TYPE_P(arg) == IS_TRUE)) {
/* pass */
} else if (UNEXPECTED(!zend_verify_scalar_type_hint(cur_arg_info->type_hint, arg, ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))))) {
- zend_verify_arg_error(zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "");
+ return 0;
}
}
}
+ return 1;
+}
+
+static zend_never_inline int zend_verify_internal_arg_types(zend_function *fbc, zend_execute_data *call)
+{
+ uint32_t i;
+ uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
+ zval *p = ZEND_CALL_ARG(call, 1);
+
+ for (i = 0; i < num_args; ++i) {
+ if (UNEXPECTED(!zend_verify_internal_arg_type(fbc, i + 1, p))) {
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ return 0;
+ }
+ p++;
+ }
+ return 1;
}
static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot)
@@ -760,7 +810,7 @@ static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t a
} else {
ce = zend_verify_arg_class_kind(cur_arg_info);
if (UNEXPECTED(!ce)) {
- zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name), arg);
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name));
return 0;
}
*cache_slot = (void*)ce;
@@ -769,11 +819,11 @@ static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t a
need_msg =
(ce->ce_flags & ZEND_ACC_INTERFACE) ?
"implement interface " : "be an instance of ";
- zend_verify_arg_error(zf, arg_num, need_msg, ZSTR_VAL(ce->name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name), arg);
+ zend_verify_arg_error(zf, arg_num, need_msg, ZSTR_VAL(ce->name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name));
return 0;
}
}
- } else if (Z_TYPE_P(arg) != IS_NULL || !(cur_arg_info->allow_null || (default_value && is_null_constant(default_value)))) {
+ } else if (Z_TYPE_P(arg) != IS_NULL || !(cur_arg_info->allow_null || (default_value && is_null_constant(zf->common.scope, default_value)))) {
if (cur_arg_info->class_name) {
if (EXPECTED(*cache_slot)) {
ce = (zend_class_entry*)*cache_slot;
@@ -781,9 +831,9 @@ static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t a
ce = zend_verify_arg_class_kind(cur_arg_info);
if (UNEXPECTED(!ce)) {
if (Z_TYPE_P(arg) == IS_OBJECT) {
- zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name), arg);
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "instance of ", ZSTR_VAL(Z_OBJCE_P(arg)->name));
} else {
- zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "", zend_zval_type_name(arg), arg);
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "", zend_zval_type_name(arg));
}
return 0;
}
@@ -792,18 +842,18 @@ static zend_always_inline int zend_verify_arg_type(zend_function *zf, uint32_t a
need_msg =
(ce->ce_flags & ZEND_ACC_INTERFACE) ?
"implement interface " : "be an instance of ";
- zend_verify_arg_error(zf, arg_num, need_msg, ZSTR_VAL(ce->name), zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(zf, arg_num, need_msg, ZSTR_VAL(ce->name), zend_zval_type_name(arg), "");
return 0;
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) {
- zend_verify_arg_error(zf, arg_num, "be callable", "", zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(zf, arg_num, "be callable", "", zend_zval_type_name(arg), "");
return 0;
}
} else if (cur_arg_info->type_hint == _IS_BOOL &&
EXPECTED(Z_TYPE_P(arg) == IS_FALSE || Z_TYPE_P(arg) == IS_TRUE)) {
/* pass */
} else if (UNEXPECTED(!zend_verify_scalar_type_hint(cur_arg_info->type_hint, arg, ZEND_ARG_USES_STRICT_TYPES()))) {
- zend_verify_arg_error(zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "", arg);
+ zend_verify_arg_error(zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), zend_zval_type_name(arg), "");
return 0;
}
}
@@ -832,7 +882,7 @@ static zend_always_inline int zend_verify_missing_arg_type(zend_function *zf, ui
} else {
ce = zend_verify_arg_class_kind(cur_arg_info);
if (UNEXPECTED(!ce)) {
- zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "none", "", NULL);
+ zend_verify_arg_error(zf, arg_num, "be an instance of ", ZSTR_VAL(cur_arg_info->class_name), "none", "");
return 0;
}
*cache_slot = (void*)ce;
@@ -840,21 +890,21 @@ static zend_always_inline int zend_verify_missing_arg_type(zend_function *zf, ui
need_msg =
(ce->ce_flags & ZEND_ACC_INTERFACE) ?
"implement interface " : "be an instance of ";
- zend_verify_arg_error(zf, arg_num, need_msg, ZSTR_VAL(ce->name), "none", "", NULL);
+ zend_verify_arg_error(zf, arg_num, need_msg, ZSTR_VAL(ce->name), "none", "");
} else if (cur_arg_info->type_hint == IS_CALLABLE) {
- zend_verify_arg_error(zf, arg_num, "be callable", "", "none", "", NULL);
+ zend_verify_arg_error(zf, arg_num, "be callable", "", "none", "");
} else {
- zend_verify_arg_error(zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), "none", "", NULL);
+ zend_verify_arg_error(zf, arg_num, "be of the type ", zend_get_type_by_const(cur_arg_info->type_hint), "none", "");
}
return 0;
}
return 1;
}
-static zend_always_inline int zend_verify_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot)
+static ZEND_COLD void zend_verify_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot)
{
if (EXPECTED(!(EX(func)->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) ||
- zend_verify_missing_arg_type(EX(func), arg_num, cache_slot)) {
+ UNEXPECTED(zend_verify_missing_arg_type(EX(func), arg_num, cache_slot))) {
const char *class_name = EX(func)->common.scope ? ZSTR_VAL(EX(func)->common.scope->name) : "";
const char *space = EX(func)->common.scope ? "::" : "";
const char *func_name = EX(func)->common.function_name ? ZSTR_VAL(EX(func)->common.function_name) : "main";
@@ -865,12 +915,10 @@ static zend_always_inline int zend_verify_missing_arg(zend_execute_data *execute
} else {
zend_error(E_WARNING, "Missing argument %u for %s%s%s()", arg_num, class_name, space, func_name);
}
- return 1;
}
- return 0;
}
-ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
+static ZEND_COLD void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
{
const char *fname = ZSTR_VAL(zf->common.function_name);
const char *fsep;
@@ -884,17 +932,12 @@ ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need
fclass = "";
}
- if (zf->common.type == ZEND_USER_FUNCTION) {
- zend_type_error("Return value of %s%s%s() must %s%s, %s%s returned in %s on line %d",
- fclass, fsep, fname, need_msg, need_kind, returned_msg, returned_kind,
- ZSTR_VAL(zf->op_array.filename), EG(current_execute_data)->opline->lineno);
- } else {
- zend_type_error("Return value of %s%s%s() must %s%s, %s%s returned",
- fclass, fsep, fname, need_msg, need_kind, returned_msg, returned_kind);
- }
+ zend_type_error("Return value of %s%s%s() must %s%s, %s%s returned",
+ fclass, fsep, fname, need_msg, need_kind, returned_msg, returned_kind);
}
-ZEND_API void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
+#if ZEND_DEBUG
+static ZEND_COLD void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind)
{
const char *fname = ZSTR_VAL(zf->common.function_name);
const char *fsep;
@@ -912,7 +955,24 @@ ZEND_API void zend_verify_internal_return_error(const zend_function *zf, const c
fclass, fsep, fname, need_msg, need_kind, returned_msg, returned_kind);
}
-#if ZEND_DEBUG
+static ZEND_COLD void zend_verify_void_return_error(const zend_function *zf, const char *returned_msg, const char *returned_kind)
+{
+ const char *fname = ZSTR_VAL(zf->common.function_name);
+ const char *fsep;
+ const char *fclass;
+
+ if (zf->common.scope) {
+ fsep = "::";
+ fclass = ZSTR_VAL(zf->common.scope->name);
+ } else {
+ fsep = "";
+ fclass = "";
+ }
+
+ zend_type_error("%s%s%s() must not return a value, %s%s returned",
+ fclass, fsep, fname, returned_msg, returned_kind);
+}
+
static int zend_verify_internal_return_type(zend_function *zf, zval *ret)
{
zend_arg_info *ret_info = zf->common.arg_info - 1;
@@ -941,6 +1001,8 @@ static int zend_verify_internal_return_type(zend_function *zf, zval *ret)
} else if (ret_info->type_hint == _IS_BOOL &&
EXPECTED(Z_TYPE_P(ret) == IS_FALSE || Z_TYPE_P(ret) == IS_TRUE)) {
/* pass */
+ } else if (ret_info->type_hint == IS_VOID) {
+ zend_verify_void_return_error(zf, zend_zval_type_name(ret), "");
} else {
/* Use strict check to verify return value of internal function */
zend_verify_internal_return_error(zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), zend_zval_type_name(ret), "");
@@ -1001,6 +1063,12 @@ static zend_always_inline void zend_verify_return_type(zend_function *zf, zval *
} else if (ret_info->type_hint == _IS_BOOL &&
EXPECTED(Z_TYPE_P(ret) == IS_FALSE || Z_TYPE_P(ret) == IS_TRUE)) {
/* pass */
+ /* There would be a check here for the IS_VOID type hint, which
+ * would trigger an error because a value had been returned.
+ * However, zend_compile.c already does a compile-time check
+ * that bans `return ...;` within a void function. Thus we can skip
+ * this part of the runtime check for non-internal functions.
+ */
} else if (UNEXPECTED(!zend_verify_scalar_type_hint(ret_info->type_hint, ret, ZEND_RET_USES_STRICT_TYPES()))) {
zend_verify_return_error(zf, "be of the type ", zend_get_type_by_const(ret_info->type_hint), zend_zval_type_name(ret), "");
}
@@ -1008,13 +1076,13 @@ static zend_always_inline void zend_verify_return_type(zend_function *zf, zval *
}
}
-static zend_always_inline int zend_verify_missing_return_type(zend_function *zf, void **cache_slot)
+static ZEND_COLD int zend_verify_missing_return_type(zend_function *zf, void **cache_slot)
{
zend_arg_info *ret_info = zf->common.arg_info - 1;
char *need_msg;
zend_class_entry *ce;
- if (ret_info->type_hint) {
+ if (ret_info->type_hint && EXPECTED(ret_info->type_hint != IS_VOID)) {
if (ret_info->class_name) {
if (EXPECTED(*cache_slot)) {
ce = (zend_class_entry*)*cache_slot;
@@ -1041,190 +1109,14 @@ static zend_always_inline int zend_verify_missing_return_type(zend_function *zf,
return 1;
}
-static zend_always_inline void zend_assign_to_object(zval *retval, zval *object, uint32_t object_op_type, zval *property_name, uint32_t property_op_type, int value_type, znode_op value_op, const zend_execute_data *execute_data, void **cache_slot)
-{
- zend_free_op free_value;
- zval *value = get_zval_ptr(value_type, value_op, execute_data, &free_value, BP_VAR_R);
- zval tmp;
-
- if (object_op_type != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
- do {
- if (object_op_type == IS_VAR && UNEXPECTED(object == &EG(error_zval))) {
- if (retval) {
- ZVAL_NULL(retval);
- }
- FREE_OP(free_value);
- return;
- }
- if (Z_ISREF_P(object)) {
- object = Z_REFVAL_P(object);
- if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
- break;
- }
- }
- if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
- (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
- zend_object *obj;
-
- zval_ptr_dtor(object);
- object_init(object);
- Z_ADDREF_P(object);
- obj = Z_OBJ_P(object);
- zend_error(E_WARNING, "Creating default object from empty value");
- if (GC_REFCOUNT(obj) == 1) {
- /* the enclosing container was deleted, obj is unreferenced */
- if (retval) {
- ZVAL_NULL(retval);
- }
- FREE_OP(free_value);
- OBJ_RELEASE(obj);
- return;
- }
- Z_DELREF_P(object);
- } else {
- zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (retval) {
- ZVAL_NULL(retval);
- }
- FREE_OP(free_value);
- return;
- }
- } while (0);
- }
-
- if (property_op_type == IS_CONST &&
- EXPECTED(Z_OBJCE_P(object) == CACHED_PTR_EX(cache_slot))) {
- uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR_EX(cache_slot + 1);
- zend_object *zobj = Z_OBJ_P(object);
- zval *property;
-
- if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
- property = OBJ_PROP(zobj, prop_offset);
- if (Z_TYPE_P(property) != IS_UNDEF) {
-fast_assign:
- value = zend_assign_to_variable(property, value, value_type);
- if (retval && EXPECTED(!EG(exception))) {
- ZVAL_COPY(retval, value);
- }
- return;
- }
- } else {
- if (EXPECTED(zobj->properties != NULL)) {
- property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
- if (property) {
- goto fast_assign;
- }
- }
-
- if (!zobj->ce->__set) {
-
- if (EXPECTED(zobj->properties == NULL)) {
- rebuild_object_properties(zobj);
- }
- /* separate our value if necessary */
- if (value_type == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- ZVAL_COPY_VALUE(&tmp, value);
- zval_copy_ctor_func(&tmp);
- value = &tmp;
- }
- } else if (value_type != IS_TMP_VAR) {
- if (Z_ISREF_P(value)) {
- if (value_type == IS_VAR) {
- zend_reference *ref = Z_REF_P(value);
- if (--(GC_REFCOUNT(ref)) == 0) {
- ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
- efree_size(ref, sizeof(zend_reference));
- value = &tmp;
- } else {
- value = Z_REFVAL_P(value);
- if (Z_REFCOUNTED_P(value)) {
- Z_ADDREF_P(value);
- }
- }
- } else {
- value = Z_REFVAL_P(value);
- if (Z_REFCOUNTED_P(value)) {
- Z_ADDREF_P(value);
- }
- }
- } else if (value_type == IS_CV && Z_REFCOUNTED_P(value)) {
- Z_ADDREF_P(value);
- }
- }
- zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
- if (retval) {
- ZVAL_COPY(retval, value);
- }
- return;
- }
- }
- }
-
- if (!Z_OBJ_HT_P(object)->write_property) {
- zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (retval) {
- ZVAL_NULL(retval);
- }
- FREE_OP(free_value);
- return;
- }
-
- /* separate our value if necessary */
- if (value_type == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- ZVAL_COPY_VALUE(&tmp, value);
- zval_copy_ctor_func(&tmp);
- value = &tmp;
- }
- } else if (value_type != IS_TMP_VAR) {
- ZVAL_DEREF(value);
- }
-
- Z_OBJ_HT_P(object)->write_property(object, property_name, value, cache_slot);
-
- if (retval && EXPECTED(!EG(exception))) {
- ZVAL_COPY(retval, value);
- }
- if (value_type == IS_CONST) {
- zval_ptr_dtor_nogc(value);
- } else {
- FREE_OP(free_value);
- }
-}
-
-static zend_never_inline void zend_assign_to_object_dim(zval *retval, zval *object, zval *property_name, int value_type, znode_op value_op, const zend_execute_data *execute_data)
+static zend_never_inline void zend_assign_to_object_dim(zval *object, zval *dim, zval *value)
{
- zend_free_op free_value;
- zval *value = get_zval_ptr_deref(value_type, value_op, execute_data, &free_value, BP_VAR_R);
- zval tmp;
-
- /* Note: property_name in this case is really the array index! */
- if (!Z_OBJ_HT_P(object)->write_dimension) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
- FREE_OP(free_value);
+ if (UNEXPECTED(!Z_OBJ_HT_P(object)->write_dimension)) {
+ zend_throw_error(NULL, "Cannot use object as array");
return;
}
- /* separate our value if necessary */
- if (value_type == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- ZVAL_COPY_VALUE(&tmp, value);
- zval_copy_ctor_func(&tmp);
- value = &tmp;
- }
- }
-
- Z_OBJ_HT_P(object)->write_dimension(object, property_name, value);
-
- if (retval && EXPECTED(!EG(exception))) {
- ZVAL_COPY(retval, value);
- }
- if (value_type == IS_CONST) {
- zval_ptr_dtor_nogc(value);
- } else {
- FREE_OP(free_value);
- }
+ Z_OBJ_HT_P(object)->write_dimension(object, dim, value);
}
static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *property, zval *value, zval *retval, binary_op_type binary_op)
@@ -1261,48 +1153,221 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *
}
}
-static void zend_assign_to_string_offset(zval *str, zend_long offset, zval *value, zval *result)
+static zend_never_inline zend_long zend_check_string_offset(zval *dim, int type)
+{
+ zend_long offset;
+
+try_again:
+ if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
+ switch(Z_TYPE_P(dim)) {
+ case IS_STRING:
+ if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
+ break;
+ }
+ if (type != BP_VAR_UNSET) {
+ zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
+ }
+ break;
+ case IS_UNDEF:
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
+ case IS_DOUBLE:
+ case IS_NULL:
+ case IS_FALSE:
+ case IS_TRUE:
+ zend_error(E_NOTICE, "String offset cast occurred");
+ break;
+ case IS_REFERENCE:
+ dim = Z_REFVAL_P(dim);
+ goto try_again;
+ default:
+ zend_error(E_WARNING, "Illegal offset type");
+ break;
+ }
+
+ offset = _zval_get_long_func(dim);
+ } else {
+ offset = Z_LVAL_P(dim);
+ }
+
+ return offset;
+}
+
+static zend_never_inline ZEND_COLD void zend_wrong_string_offset(void)
+{
+ const char *msg = NULL;
+ const zend_op *opline = EG(current_execute_data)->opline;
+ const zend_op *end;
+ uint32_t var;
+
+ switch (opline->opcode) {
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_ASSIGN_POW:
+ msg = "Cannot use assign-op operators with string offsets";
+ break;
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_FETCH_DIM_UNSET:
+ /* TODO: Encode the "reason" into opline->extended_value??? */
+ var = opline->result.var;
+ opline++;
+ end = EG(current_execute_data)->func->op_array.opcodes +
+ EG(current_execute_data)->func->op_array.last;
+ while (opline < end) {
+ if (opline->op1_type == IS_VAR && opline->op1.var == var) {
+ switch (opline->opcode) {
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_ASSIGN_POW:
+ if (opline->extended_value == ZEND_ASSIGN_OBJ) {
+ msg = "Cannot use string offset as an object";
+ } else if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ msg = "Cannot use string offset as an array";
+ } else {
+ msg = "Cannot use assign-op operators with string offsets";
+ }
+ break;
+ case ZEND_PRE_INC_OBJ:
+ case ZEND_PRE_DEC_OBJ:
+ case ZEND_POST_INC_OBJ:
+ case ZEND_POST_DEC_OBJ:
+ case ZEND_PRE_INC:
+ case ZEND_PRE_DEC:
+ case ZEND_POST_INC:
+ case ZEND_POST_DEC:
+ msg = "Cannot increment/decrement string offsets";
+ break;
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_FETCH_DIM_UNSET:
+ case ZEND_ASSIGN_DIM:
+ msg = "Cannot use string offset as an array";
+ break;
+ case ZEND_FETCH_OBJ_W:
+ case ZEND_FETCH_OBJ_RW:
+ case ZEND_FETCH_OBJ_FUNC_ARG:
+ case ZEND_FETCH_OBJ_UNSET:
+ case ZEND_ASSIGN_OBJ:
+ msg = "Cannot use string offset as an object";
+ break;
+ case ZEND_ASSIGN_REF:
+ case ZEND_ADD_ARRAY_ELEMENT:
+ case ZEND_INIT_ARRAY:
+ msg = "Cannot create references to/from string offsets";
+ break;
+ case ZEND_RETURN_BY_REF:
+ msg = "Cannot return string offsets by reference";
+ break;
+ case ZEND_UNSET_DIM:
+ case ZEND_UNSET_OBJ:
+ msg = "Cannot unset string offsets";
+ break;
+ case ZEND_YIELD:
+ msg = "Cannot yield string offsets by reference";
+ break;
+ case ZEND_SEND_REF:
+ case ZEND_SEND_VAR_EX:
+ msg = "Only variables can be passed by reference";
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE();
+ }
+ break;
+ }
+ if (opline->op2_type == IS_VAR && opline->op2.var == var) {
+ ZEND_ASSERT(opline->opcode == ZEND_ASSIGN_REF);
+ msg = "Cannot create references to/from string offsets";
+ break;
+ }
+ }
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE();
+ }
+ ZEND_ASSERT(msg != NULL);
+ zend_throw_error(NULL, msg);
+}
+
+static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim, zval *value, zval *result)
{
zend_string *old_str;
+ zend_uchar c;
+ size_t string_len;
+ zend_long offset;
- if (offset < 0) {
+ offset = zend_check_string_offset(dim, BP_VAR_W);
+ if (offset < (zend_long)(-Z_STRLEN_P(str))) {
+ /* Error on negative offset */
zend_error(E_WARNING, "Illegal string offset: " ZEND_LONG_FMT, offset);
- zend_string_release(Z_STR_P(str));
if (result) {
ZVAL_NULL(result);
}
return;
}
- old_str = Z_STR_P(str);
+ if (Z_TYPE_P(value) != IS_STRING) {
+ /* Convert to string, just the time to pick the 1st byte */
+ zend_string *tmp = zval_get_string(value);
+
+ string_len = ZSTR_LEN(tmp);
+ c = (zend_uchar)ZSTR_VAL(tmp)[0];
+ zend_string_release(tmp);
+ } else {
+ string_len = Z_STRLEN_P(value);
+ c = (zend_uchar)Z_STRVAL_P(value)[0];
+ }
+
+ if (string_len == 0) {
+ /* Error on empty input string */
+ zend_error(E_WARNING, "Cannot assign an empty string to a string offset");
+ if (result) {
+ ZVAL_NULL(result);
+ }
+ return;
+ }
+
+ if (offset < 0) { /* Handle negative offset */
+ offset += (zend_long)Z_STRLEN_P(str);
+ }
+
if ((size_t)offset >= Z_STRLEN_P(str)) {
+ /* Extend string if needed */
zend_long old_len = Z_STRLEN_P(str);
Z_STR_P(str) = zend_string_extend(Z_STR_P(str), offset + 1, 0);
Z_TYPE_INFO_P(str) = IS_STRING_EX;
memset(Z_STRVAL_P(str) + old_len, ' ', offset - old_len);
Z_STRVAL_P(str)[offset+1] = 0;
} else if (!Z_REFCOUNTED_P(str)) {
+ old_str = Z_STR_P(str);
Z_STR_P(str) = zend_string_init(Z_STRVAL_P(str), Z_STRLEN_P(str), 0);
Z_TYPE_INFO_P(str) = IS_STRING_EX;
- }
-
- if (Z_TYPE_P(value) != IS_STRING) {
- zend_string *tmp = zval_get_string(value);
-
- Z_STRVAL_P(str)[offset] = ZSTR_VAL(tmp)[0];
- zend_string_release(tmp);
+ zend_string_release(old_str);
} else {
- Z_STRVAL_P(str)[offset] = Z_STRVAL_P(value)[0];
+ SEPARATE_STRING(str);
}
- /*
- * the value of an assignment to a string offset is undefined
- T(result->u.var).var = &T->str_offset.str;
- */
- zend_string_release(old_str);
- if (result) {
- zend_uchar c = (zend_uchar)Z_STRVAL_P(str)[offset];
+ Z_STRVAL_P(str)[offset] = c;
+ if (result) {
+ /* Return the new character */
if (CG(one_char_string)[c]) {
ZVAL_INTERNED_STR(result, CG(one_char_string)[c]);
} else {
@@ -1334,14 +1399,18 @@ static zend_never_inline void zend_post_incdec_overloaded_property(zval *object,
}
ZVAL_COPY_VALUE(z, value);
}
- ZVAL_COPY(result, z);
- ZVAL_DUP(&z_copy, z);
+
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_REFERENCE)) {
+ ZVAL_COPY(result, Z_REFVAL_P(z));
+ } else {
+ ZVAL_COPY(result, z);
+ }
+ ZVAL_DUP(&z_copy, result);
if (inc) {
increment_function(&z_copy);
} else {
decrement_function(&z_copy);
}
- if (Z_REFCOUNTED_P(z)) Z_ADDREF_P(z);
Z_OBJ_HT(obj)->write_property(&obj, property, &z_copy, cache_slot);
OBJ_RELEASE(Z_OBJ(obj));
zval_ptr_dtor(&z_copy);
@@ -1405,8 +1474,8 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z
ZVAL_OBJ(&obj, Z_OBJ_P(object));
Z_ADDREF(obj);
- if (Z_OBJ_HT(obj)->read_property &&
- (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv)) != NULL) {
+ if (EXPECTED(Z_OBJ_HT(obj)->read_property)) {
+ z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv);
if (UNEXPECTED(EG(exception))) {
OBJ_RELEASE(Z_OBJ(obj));
return;
@@ -1439,26 +1508,26 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z
}
/* Utility Functions for Extensions */
-static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array)
+static void zend_extension_statement_handler(const zend_extension *extension, zend_execute_data *frame)
{
if (extension->statement_handler) {
- extension->statement_handler(op_array);
+ extension->statement_handler(frame);
}
}
-static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array)
+static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_execute_data *frame)
{
if (extension->fcall_begin_handler) {
- extension->fcall_begin_handler(op_array);
+ extension->fcall_begin_handler(frame);
}
}
-static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array)
+static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_execute_data *frame)
{
if (extension->fcall_end_handler) {
- extension->fcall_end_handler(op_array);
+ extension->fcall_end_handler(frame);
}
}
@@ -1470,18 +1539,9 @@ static zend_always_inline HashTable *zend_get_target_symbol_table(zend_execute_d
if (EXPECTED(fetch_type == ZEND_FETCH_GLOBAL_LOCK) ||
EXPECTED(fetch_type == ZEND_FETCH_GLOBAL)) {
ht = &EG(symbol_table);
- } else if (EXPECTED(fetch_type == ZEND_FETCH_STATIC)) {
- ZEND_ASSERT(EX(func)->op_array.static_variables != NULL);
- ht = EX(func)->op_array.static_variables;
- if (GC_REFCOUNT(ht) > 1) {
- if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
- GC_REFCOUNT(ht)--;
- }
- EX(func)->op_array.static_variables = ht = zend_array_dup(ht);
- }
} else {
ZEND_ASSERT(fetch_type == ZEND_FETCH_LOCAL);
- if (!EX(symbol_table)) {
+ if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) {
zend_rebuild_symbol_table();
}
ht = EX(symbol_table);
@@ -1499,23 +1559,24 @@ try_again:
if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
hval = Z_LVAL_P(dim);
num_index:
- retval = zend_hash_index_find(ht, hval);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
- /* break missing intentionally */
- case BP_VAR_UNSET:
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_index_add_new(ht, hval, &EG(uninitialized_zval));
- break;
- }
+ ZEND_HASH_INDEX_FIND(ht, hval, retval, num_undef);
+ return retval;
+num_undef:
+ switch (type) {
+ case BP_VAR_R:
+ zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
+ /* break missing intentionally */
+ case BP_VAR_UNSET:
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval);
+ retval = zend_hash_index_update(ht, hval, &EG(uninitialized_zval));
+ break;
+ case BP_VAR_W:
+ retval = zend_hash_index_add_new(ht, hval, &EG(uninitialized_zval));
+ break;
}
} else if (EXPECTED(Z_TYPE_P(dim) == IS_STRING)) {
offset_key = Z_STR_P(dim);
@@ -1559,7 +1620,8 @@ str_index:
break;
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined index: %s", ZSTR_VAL(offset_key));
- /* break missing intentionally */
+ retval = zend_hash_update(ht, offset_key, &EG(uninitialized_zval));
+ break;
case BP_VAR_W:
retval = zend_hash_add_new(ht, offset_key, &EG(uninitialized_zval));
break;
@@ -1567,6 +1629,9 @@ str_index:
}
} else {
switch (Z_TYPE_P(dim)) {
+ case IS_UNDEF:
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
+ /* break missing intentionally */
case IS_NULL:
offset_key = ZSTR_EMPTY_ALLOC();
goto str_index;
@@ -1589,61 +1654,30 @@ str_index:
default:
zend_error(E_WARNING, "Illegal offset type");
retval = (type == BP_VAR_W || type == BP_VAR_RW) ?
- &EG(error_zval) : &EG(uninitialized_zval);
+ NULL : &EG(uninitialized_zval);
}
}
return retval;
}
-static zend_never_inline zend_long zend_check_string_offset(zval *dim, int type)
+static zend_never_inline zval* ZEND_FASTCALL zend_fetch_dimension_address_inner_W(HashTable *ht, const zval *dim)
{
- zend_long offset;
-
-try_again:
- if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
- switch(Z_TYPE_P(dim)) {
- case IS_STRING:
- if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
- break;
- }
- if (type != BP_VAR_UNSET) {
- zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
- }
- break;
- case IS_DOUBLE:
- case IS_NULL:
- case IS_FALSE:
- case IS_TRUE:
- zend_error(E_NOTICE, "String offset cast occurred");
- break;
- case IS_REFERENCE:
- dim = Z_REFVAL_P(dim);
- goto try_again;
- default:
- zend_error(E_WARNING, "Illegal offset type");
- break;
- }
-
- offset = zval_get_long(dim);
- } else {
- offset = Z_LVAL_P(dim);
- }
+ return zend_fetch_dimension_address_inner(ht, dim, IS_TMP_VAR, BP_VAR_W);
+}
- return offset;
+static zend_never_inline zval* ZEND_FASTCALL zend_fetch_dimension_address_inner_W_CONST(HashTable *ht, const zval *dim)
+{
+ return zend_fetch_dimension_address_inner(ht, dim, IS_CONST, BP_VAR_W);
}
-static zend_always_inline zend_long zend_fetch_string_offset(zval *container, zval *dim, int type)
+static zend_never_inline zval* ZEND_FASTCALL zend_fetch_dimension_address_inner_RW(HashTable *ht, const zval *dim)
{
- zend_long offset = zend_check_string_offset(dim, type);
+ return zend_fetch_dimension_address_inner(ht, dim, IS_TMP_VAR, BP_VAR_RW);
+}
- if (Z_REFCOUNTED_P(container)) {
- if (Z_REFCOUNT_P(container) > 1) {
- Z_DELREF_P(container);
- zval_copy_ctor_func(container);
- }
- Z_ADDREF_P(container);
- }
- return offset;
+static zend_never_inline zval* ZEND_FASTCALL zend_fetch_dimension_address_inner_RW_CONST(HashTable *ht, const zval *dim)
+{
+ return zend_fetch_dimension_address_inner(ht, dim, IS_CONST, BP_VAR_RW);
}
static zend_always_inline void zend_fetch_dimension_address(zval *result, zval *container, zval *dim, int dim_type, int type)
@@ -1658,10 +1692,15 @@ fetch_from_array:
retval = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
if (UNEXPECTED(retval == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- retval = &EG(error_zval);
+ ZVAL_ERROR(result);
+ return;
}
} else {
retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type);
+ if (UNEXPECTED(!retval)) {
+ ZVAL_ERROR(result);
+ return;
+ }
}
ZVAL_INDIRECT(result, retval);
return;
@@ -1671,26 +1710,22 @@ fetch_from_array:
goto try_array;
}
}
- if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- if (type != BP_VAR_UNSET && UNEXPECTED(Z_STRLEN_P(container) == 0)) {
- zval_ptr_dtor_nogc(container);
-convert_to_array:
- ZVAL_NEW_ARR(container);
- zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
- goto fetch_from_array;
- }
-
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
if (dim == NULL) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- ZVAL_NULL(result);
+ zend_throw_error(NULL, "[] operator not supported for strings");
} else {
zend_check_string_offset(dim, type);
- ZVAL_INDIRECT(result, NULL); /* wrong string offset */
+ zend_wrong_string_offset();
}
+ ZVAL_ERROR(result);
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ if (/*dim_type == IS_CV &&*/ dim && UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
+ dim = &EG(uninitialized_zval);
+ }
if (!Z_OBJ_HT_P(container)->read_dimension) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
- retval = &EG(error_zval);
+ zend_throw_error(NULL, "Cannot use object as array");
+ ZVAL_ERROR(result);
} else {
retval = Z_OBJ_HT_P(container)->read_dimension(container, dim, type, result);
@@ -1708,7 +1743,7 @@ convert_to_array:
ZVAL_DUP(result, retval);
retval = result;
} else {
- ZVAL_COPY(result, retval);
+ ZVAL_COPY_VALUE(result, retval);
retval = result;
}
}
@@ -1716,30 +1751,42 @@ convert_to_array:
zend_class_entry *ce = Z_OBJCE_P(container);
zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ZSTR_VAL(ce->name));
}
+ } else if (UNEXPECTED(Z_REFCOUNT_P(retval) == 1)) {
+ ZVAL_UNREF(retval);
}
if (result != retval) {
ZVAL_INDIRECT(result, retval);
}
} else {
- ZVAL_INDIRECT(result, &EG(error_zval));
+ ZVAL_ERROR(result);
}
}
- } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
- if (UNEXPECTED(container == &EG(error_zval))) {
- ZVAL_INDIRECT(result, &EG(error_zval));
- } else if (type != BP_VAR_UNSET) {
- goto convert_to_array;
- } else {
- /* for read-mode only */
- ZVAL_NULL(result);
- }
} else {
- if (type == BP_VAR_UNSET) {
- zend_error(E_WARNING, "Cannot unset offset in a non-array variable");
- ZVAL_NULL(result);
+ if (type != BP_VAR_W && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zval_undefined_cv(EG(current_execute_data)->opline->op1.var, EG(current_execute_data));
+ }
+ if (/*dim_type == IS_CV &&*/ dim && UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
+ }
+ if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ if (type != BP_VAR_UNSET) {
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto fetch_from_array;
+ } else {
+ /* for read-mode only */
+ ZVAL_NULL(result);
+ }
+ } else if (EXPECTED(Z_ISERROR_P(container))) {
+ ZVAL_ERROR(result);
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
- ZVAL_INDIRECT(result, &EG(error_zval));
+ if (type == BP_VAR_UNSET) {
+ zend_error(E_WARNING, "Cannot unset offset in a non-array variable");
+ ZVAL_NULL(result);
+ } else {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ ZVAL_ERROR(result);
+ }
}
}
}
@@ -1759,27 +1806,29 @@ static zend_never_inline void zend_fetch_dimension_address_UNSET(zval *result, z
zend_fetch_dimension_address(result, container_ptr, dim, dim_type, BP_VAR_UNSET);
}
-static zend_always_inline void zend_fetch_dimension_address_read(zval *result, zval *container, zval *dim, int dim_type, int type)
+static zend_always_inline void zend_fetch_dimension_address_read(zval *result, zval *container, zval *dim, int dim_type, int type, int support_strings, int slow)
{
zval *retval;
- if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
-try_array:
- retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type);
- ZVAL_COPY(result, retval);
- return;
- } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
- container = Z_REFVAL_P(container);
+ if (!slow) {
if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
- goto try_array;
+try_array:
+ retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type);
+ ZVAL_COPY(result, retval);
+ return;
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto try_array;
+ }
}
}
- if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (support_strings && EXPECTED(Z_TYPE_P(container) == IS_STRING)) {
zend_long offset;
try_string_offset:
if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
- switch(Z_TYPE_P(dim)) {
+ switch (Z_TYPE_P(dim)) {
/* case IS_LONG: */
case IS_STRING:
if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
@@ -1791,6 +1840,8 @@ try_string_offset:
}
zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim));
break;
+ case IS_UNDEF:
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
case IS_DOUBLE:
case IS_NULL:
case IS_FALSE:
@@ -1807,12 +1858,12 @@ try_string_offset:
break;
}
- offset = zval_get_long(dim);
+ offset = _zval_get_long_func(dim);
} else {
offset = Z_LVAL_P(dim);
}
- if (UNEXPECTED(offset < 0) || UNEXPECTED(Z_STRLEN_P(container) <= (size_t)offset)) {
+ if (UNEXPECTED(Z_STRLEN_P(container) < (size_t)((offset < 0) ? -offset : (offset + 1)))) {
if (type != BP_VAR_IS) {
zend_error(E_NOTICE, "Uninitialized string offset: %pd", offset);
ZVAL_EMPTY_STRING(result);
@@ -1820,17 +1871,26 @@ try_string_offset:
ZVAL_NULL(result);
}
} else {
- zend_uchar c = (zend_uchar)Z_STRVAL_P(container)[offset];
+ zend_uchar c;
+ zend_long real_offset;
+
+ real_offset = (UNEXPECTED(offset < 0)) /* Handle negative offset */
+ ? (zend_long)Z_STRLEN_P(container) + offset : offset;
+ c = (zend_uchar)Z_STRVAL_P(container)[real_offset];
if (CG(one_char_string)[c]) {
ZVAL_INTERNED_STR(result, CG(one_char_string)[c]);
} else {
- ZVAL_NEW_STR(result, zend_string_init(Z_STRVAL_P(container) + offset, 1, 0));
+ ZVAL_NEW_STR(result, zend_string_init(Z_STRVAL_P(container) + real_offset, 1, 0));
}
}
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ if (/*dim_type == IS_CV &&*/ UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
+ dim = &EG(uninitialized_zval);
+ }
if (!Z_OBJ_HT_P(container)->read_dimension) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
ZVAL_NULL(result);
} else {
retval = Z_OBJ_HT_P(container)->read_dimension(container, dim, type, result);
@@ -1845,18 +1905,34 @@ try_string_offset:
}
}
} else {
+ if (type != BP_VAR_IS && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zval_undefined_cv(EG(current_execute_data)->opline->op1.var, EG(current_execute_data));
+ }
+ if (/*dim_type == IS_CV &&*/ UNEXPECTED(Z_TYPE_P(dim) == IS_UNDEF)) {
+ zval_undefined_cv(EG(current_execute_data)->opline->op2.var, EG(current_execute_data));
+ }
ZVAL_NULL(result);
}
}
static zend_never_inline void zend_fetch_dimension_address_read_R(zval *result, zval *container, zval *dim, int dim_type)
{
- zend_fetch_dimension_address_read(result, container, dim, dim_type, BP_VAR_R);
+ zend_fetch_dimension_address_read(result, container, dim, dim_type, BP_VAR_R, 1, 0);
+}
+
+static zend_never_inline void zend_fetch_dimension_address_read_R_slow(zval *result, zval *container, zval *dim)
+{
+ zend_fetch_dimension_address_read(result, container, dim, IS_CV, BP_VAR_R, 1, 1);
}
static zend_never_inline void zend_fetch_dimension_address_read_IS(zval *result, zval *container, zval *dim, int dim_type)
{
- zend_fetch_dimension_address_read(result, container, dim, dim_type, BP_VAR_IS);
+ zend_fetch_dimension_address_read(result, container, dim, dim_type, BP_VAR_IS, 1, 0);
+}
+
+static zend_never_inline void zend_fetch_dimension_address_read_LIST(zval *result, zval *container, zval *dim)
+{
+ zend_fetch_dimension_address_read(result, container, dim, IS_TMP_VAR, BP_VAR_R, 0, 0);
}
ZEND_API void zend_fetch_dimension_by_zval(zval *result, zval *container, zval *dim)
@@ -1864,15 +1940,16 @@ ZEND_API void zend_fetch_dimension_by_zval(zval *result, zval *container, zval *
zend_fetch_dimension_address_read_R(result, container, dim, IS_TMP_VAR);
}
+ZEND_API void zend_fetch_dimension_by_zval_is(zval *result, zval *container, zval *dim, int dim_type)
+{
+ zend_fetch_dimension_address_read(result, container, dim, dim_type, BP_VAR_IS, 1, 0);
+}
+
+
static zend_always_inline void zend_fetch_property_address(zval *result, zval *container, uint32_t container_op_type, zval *prop_ptr, uint32_t prop_op_type, void **cache_slot, int type)
{
if (container_op_type != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
do {
- if (container_op_type == IS_VAR && UNEXPECTED(container == &EG(error_zval))) {
- ZVAL_INDIRECT(result, &EG(error_zval));
- return;
- }
-
if (Z_ISREF_P(container)) {
container = Z_REFVAL_P(container);
if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
@@ -1887,8 +1964,10 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
zval_ptr_dtor_nogc(container);
object_init(container);
} else {
- zend_error(E_WARNING, "Attempt to modify property of non-object");
- ZVAL_INDIRECT(result, &EG(error_zval));
+ if (container_op_type != IS_VAR || EXPECTED(!Z_ISERROR_P(container))) {
+ zend_error(E_WARNING, "Attempt to modify property of non-object");
+ }
+ ZVAL_ERROR(result);
return;
}
} while (0);
@@ -1906,6 +1985,12 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
return;
}
} else if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
retval = zend_hash_find(zobj->properties, Z_STR_P(prop_ptr));
if (EXPECTED(retval)) {
ZVAL_INDIRECT(result, retval);
@@ -1916,54 +2001,29 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
if (EXPECTED(Z_OBJ_HT_P(container)->get_property_ptr_ptr)) {
zval *ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, type, cache_slot);
if (NULL == ptr) {
- if (Z_OBJ_HT_P(container)->read_property &&
- (ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result)) != NULL) {
+ if (EXPECTED(Z_OBJ_HT_P(container)->read_property)) {
+use_read_property:
+ ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result);
if (ptr != result) {
ZVAL_INDIRECT(result, ptr);
+ } else if (UNEXPECTED(Z_ISREF_P(ptr) && Z_REFCOUNT_P(ptr) == 1)) {
+ ZVAL_UNREF(ptr);
}
} else {
- zend_throw_error(zend_ce_error, "Cannot access undefined property for object with overloaded property access");
- ZVAL_INDIRECT(result, &EG(error_zval));
+ zend_throw_error(NULL, "Cannot access undefined property for object with overloaded property access");
+ ZVAL_ERROR(result);
}
} else {
ZVAL_INDIRECT(result, ptr);
}
} else if (EXPECTED(Z_OBJ_HT_P(container)->read_property)) {
- zval *ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result);
- if (ptr != result) {
- ZVAL_INDIRECT(result, ptr);
- }
+ goto use_read_property;
} else {
zend_error(E_WARNING, "This object doesn't support property references");
- ZVAL_INDIRECT(result, &EG(error_zval));
+ ZVAL_ERROR(result);
}
}
-static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const zend_execute_data *execute_data)
-{
- zend_brk_cont_element *jmp_to;
-
- do {
- ZEND_ASSERT(array_offset != -1);
- jmp_to = &op_array->brk_cont_array[array_offset];
- if (nest_levels > 1 && jmp_to->start >= 0) {
- zend_op *brk_opline = &op_array->opcodes[jmp_to->brk];
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
- zend_hash_iterator_del(Z_FE_ITER_P(var));
- }
- zval_ptr_dtor_nogc(var);
- }
- }
- array_offset = jmp_to->parent;
- } while (--nest_levels > 0);
- return jmp_to;
-}
-
#if ZEND_INTENSIVE_DEBUGGING
#define CHECK_SYMBOL_TABLES() \
@@ -1980,7 +2040,7 @@ static int zend_check_symbol(zval *pz)
if (Z_TYPE_P(pz) > 10) {
fprintf(stderr, "Warning! %x has invalid type!\n", *pz);
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
} else if (Z_TYPE_P(pz) == IS_ARRAY) {
@@ -2025,7 +2085,7 @@ static zend_always_inline void i_free_compiled_variables(zend_execute_data *exec
if (!Z_DELREF_P(cv)) {
zend_refcounted *r = Z_COUNTED_P(cv);
ZVAL_NULL(cv);
- zval_dtor_func_for_ptr(r);
+ zval_dtor_func(r);
} else {
GC_ZVAL_CHECK_POSSIBLE_ROOT(cv);
}
@@ -2041,16 +2101,17 @@ void zend_free_compiled_variables(zend_execute_data *execute_data) /* {{{ */
}
/* }}} */
-#ifdef ZEND_WIN32
-# define ZEND_VM_INTERRUPT_CHECK() do { \
- if (EG(timed_out)) { \
- zend_timeout(0); \
+static zend_never_inline ZEND_COLD ZEND_NORETURN void ZEND_FASTCALL zend_interrupt(void) /* {{{ */
+{
+ zend_timeout(0);
+}
+/* }}} */
+
+#define ZEND_VM_INTERRUPT_CHECK() do { \
+ if (UNEXPECTED(EG(timed_out))) { \
+ zend_interrupt(); \
} \
} while (0)
-#else
-# define ZEND_VM_INTERRUPT_CHECK() do { \
- } while (0)
-#endif
/*
* Stack Frame Layout (the whole stack frame is allocated at once)
@@ -2085,33 +2146,35 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data *execu
first_extra_arg = op_array->num_args;
num_args = EX_NUM_ARGS();
if (UNEXPECTED(num_args > first_extra_arg)) {
- zval *end, *src, *dst;
- uint32_t type_flags = 0;
+ if (EXPECTED(!(op_array->fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE))) {
+ zval *end, *src, *dst;
+ uint32_t type_flags = 0;
- if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
- /* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
- EX(opline) += first_extra_arg;
- }
+ if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
+ /* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
+ EX(opline) += first_extra_arg;
+ }
- /* move extra args into separate array after all CV and TMP vars */
- end = EX_VAR_NUM(first_extra_arg - 1);
- src = end + (num_args - first_extra_arg);
- dst = src + (op_array->last_var + op_array->T - first_extra_arg);
- if (EXPECTED(src != dst)) {
- do {
- type_flags |= Z_TYPE_INFO_P(src);
- ZVAL_COPY_VALUE(dst, src);
- ZVAL_UNDEF(src);
- src--;
- dst--;
- } while (src != end);
- } else {
- do {
- type_flags |= Z_TYPE_INFO_P(src);
- src--;
- } while (src != end);
+ /* move extra args into separate array after all CV and TMP vars */
+ end = EX_VAR_NUM(first_extra_arg - 1);
+ src = end + (num_args - first_extra_arg);
+ dst = src + (op_array->last_var + op_array->T - first_extra_arg);
+ if (EXPECTED(src != dst)) {
+ do {
+ type_flags |= Z_TYPE_INFO_P(src);
+ ZVAL_COPY_VALUE(dst, src);
+ ZVAL_UNDEF(src);
+ src--;
+ dst--;
+ } while (src != end);
+ } else {
+ do {
+ type_flags |= Z_TYPE_INFO_P(src);
+ src--;
+ } while (src != end);
+ }
+ ZEND_ADD_CALL_FLAG(execute_data, ((type_flags >> Z_TYPE_FLAGS_SHIFT) & IS_TYPE_REFCOUNTED));
}
- ZEND_ADD_CALL_FLAG(execute_data, ((type_flags >> Z_TYPE_FLAGS_SHIFT) & IS_TYPE_REFCOUNTED));
} else if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
/* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
EX(opline) += num_args;
@@ -2128,20 +2191,23 @@ static zend_always_inline void i_init_func_execute_data(zend_execute_data *execu
} while (var != end);
}
- if (check_this && op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) {
+ if (check_this && op_array->this_var != (uint32_t)-1 && EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) {
ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
GC_REFCOUNT(Z_OBJ(EX(This)))++;
}
- if (UNEXPECTED(!op_array->run_time_cache)) {
- op_array->run_time_cache = zend_arena_alloc(&CG(arena), op_array->cache_size);
- memset(op_array->run_time_cache, 0, op_array->cache_size);
- }
EX_LOAD_RUN_TIME_CACHE(op_array);
EX_LOAD_LITERALS(op_array);
EG(current_execute_data) = execute_data;
- ZEND_VM_INTERRUPT_CHECK();
+}
+/* }}} */
+
+static zend_never_inline void ZEND_FASTCALL init_func_run_time_cache(zend_op_array *op_array) /* {{{ */
+{
+ ZEND_ASSERT(op_array->run_time_cache == NULL);
+ op_array->run_time_cache = zend_arena_alloc(&CG(arena), op_array->cache_size);
+ memset(op_array->run_time_cache, 0, op_array->cache_size);
}
/* }}} */
@@ -2153,13 +2219,15 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
EX(call) = NULL;
EX(return_value) = return_value;
- zend_attach_symbol_table(execute_data);
-
- if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) {
- ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
+ if (UNEXPECTED(op_array->this_var != (uint32_t)-1) && EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) {
GC_REFCOUNT(Z_OBJ(EX(This)))++;
+ if (!zend_hash_add(EX(symbol_table), CG(known_strings)[ZEND_STR_THIS], &EX(This))) {
+ GC_REFCOUNT(Z_OBJ(EX(This)))--;
+ }
}
+ zend_attach_symbol_table(execute_data);
+
if (!op_array->run_time_cache) {
op_array->run_time_cache = emalloc(op_array->cache_size);
memset(op_array->run_time_cache, 0, op_array->cache_size);
@@ -2168,7 +2236,6 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
EX_LOAD_LITERALS(op_array);
EG(current_execute_data) = execute_data;
- ZEND_VM_INTERRUPT_CHECK();
}
/* }}} */
@@ -2180,7 +2247,14 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da
EX(call) = NULL;
EX(return_value) = return_value;
- if (UNEXPECTED(EX(symbol_table) != NULL)) {
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
+ if (UNEXPECTED(op_array->this_var != (uint32_t)-1) && EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) {
+ GC_REFCOUNT(Z_OBJ(EX(This)))++;
+ if (!zend_hash_add(EX(symbol_table), CG(known_strings)[ZEND_STR_THIS], &EX(This))) {
+ GC_REFCOUNT(Z_OBJ(EX(This)))--;
+ }
+ }
+
zend_attach_symbol_table(execute_data);
} else {
uint32_t first_extra_arg, num_args;
@@ -2189,33 +2263,35 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da
first_extra_arg = op_array->num_args;
num_args = EX_NUM_ARGS();
if (UNEXPECTED(num_args > first_extra_arg)) {
- zval *end, *src, *dst;
- uint32_t type_flags = 0;
+ if (EXPECTED(!(op_array->fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE))) {
+ zval *end, *src, *dst;
+ uint32_t type_flags = 0;
- if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
- /* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
- EX(opline) += first_extra_arg;
- }
+ if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
+ /* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
+ EX(opline) += first_extra_arg;
+ }
- /* move extra args into separate array after all CV and TMP vars */
- end = EX_VAR_NUM(first_extra_arg - 1);
- src = end + (num_args - first_extra_arg);
- dst = src + (op_array->last_var + op_array->T - first_extra_arg);
- if (EXPECTED(src != dst)) {
- do {
- type_flags |= Z_TYPE_INFO_P(src);
- ZVAL_COPY_VALUE(dst, src);
- ZVAL_UNDEF(src);
- src--;
- dst--;
- } while (src != end);
- } else {
- do {
- type_flags |= Z_TYPE_INFO_P(src);
- src--;
- } while (src != end);
+ /* move extra args into separate array after all CV and TMP vars */
+ end = EX_VAR_NUM(first_extra_arg - 1);
+ src = end + (num_args - first_extra_arg);
+ dst = src + (op_array->last_var + op_array->T - first_extra_arg);
+ if (EXPECTED(src != dst)) {
+ do {
+ type_flags |= Z_TYPE_INFO_P(src);
+ ZVAL_COPY_VALUE(dst, src);
+ ZVAL_UNDEF(src);
+ src--;
+ dst--;
+ } while (src != end);
+ } else {
+ do {
+ type_flags |= Z_TYPE_INFO_P(src);
+ src--;
+ } while (src != end);
+ }
+ ZEND_ADD_CALL_FLAG(execute_data, ((type_flags >> Z_TYPE_FLAGS_SHIFT) & IS_TYPE_REFCOUNTED));
}
- ZEND_ADD_CALL_FLAG(execute_data, ((type_flags >> Z_TYPE_FLAGS_SHIFT) & IS_TYPE_REFCOUNTED));
} else if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
/* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
EX(opline) += num_args;
@@ -2231,11 +2307,11 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da
var++;
} while (var != end);
}
- }
- if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_OBJ(EX(This)))) {
- ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
- GC_REFCOUNT(Z_OBJ(EX(This)))++;
+ if (op_array->this_var != (uint32_t)-1 && EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) {
+ ZVAL_OBJ(EX_VAR(op_array->this_var), Z_OBJ(EX(This)));
+ GC_REFCOUNT(Z_OBJ(EX(This)))++;
+ }
}
if (!op_array->run_time_cache) {
@@ -2250,65 +2326,6 @@ static zend_always_inline void i_init_execute_data(zend_execute_data *execute_da
EX_LOAD_LITERALS(op_array);
EG(current_execute_data) = execute_data;
- ZEND_VM_INTERRUPT_CHECK();
-}
-/* }}} */
-
-ZEND_API zend_execute_data *zend_create_generator_execute_data(zend_execute_data *call, zend_op_array *op_array, zval *return_value) /* {{{ */
-{
- /*
- * Normally the execute_data is allocated on the VM stack (because it does
- * not actually do any allocation and thus is faster). For generators
- * though this behavior would be suboptimal, because the (rather large)
- * structure would have to be copied back and forth every time execution is
- * suspended or resumed. That's why for generators the execution context
- * is allocated using a separate VM stack, thus allowing to save and
- * restore it simply by replacing a pointer.
- */
- zend_execute_data *execute_data;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- size_t stack_size = (ZEND_CALL_FRAME_SLOT + MAX(op_array->last_var + op_array->T, num_args)) * sizeof(zval);
- uint32_t call_info;
-
- EG(vm_stack) = zend_vm_stack_new_page(
- EXPECTED(stack_size < ZEND_VM_STACK_FREE_PAGE_SIZE(1)) ?
- ZEND_VM_STACK_PAGE_SIZE(1) :
- ZEND_VM_STACK_PAGE_ALIGNED_SIZE(1, stack_size),
- NULL);
- EG(vm_stack_top) = EG(vm_stack)->top;
- EG(vm_stack_end) = EG(vm_stack)->end;
-
- call_info = ZEND_CALL_TOP_FUNCTION | ZEND_CALL_ALLOCATED | (ZEND_CALL_INFO(call) & (ZEND_CALL_CLOSURE|ZEND_CALL_RELEASE_THIS));
- if (Z_OBJ(call->This)) {
- call_info |= ZEND_CALL_RELEASE_THIS;
- }
- execute_data = zend_vm_stack_push_call_frame(
- call_info,
- (zend_function*)op_array,
- num_args,
- call->called_scope,
- Z_OBJ(call->This));
- EX(prev_execute_data) = NULL;
- EX_NUM_ARGS() = num_args;
-
- /* copy arguments */
- if (num_args > 0) {
- zval *arg_src = ZEND_CALL_ARG(call, 1);
- zval *arg_dst = ZEND_CALL_ARG(execute_data, 1);
- zval *end = arg_src + num_args;
-
- do {
- ZVAL_COPY_VALUE(arg_dst, arg_src);
- arg_src++;
- arg_dst++;
- } while (arg_src != end);
- }
-
- EX(symbol_table) = NULL;
-
- i_init_func_execute_data(execute_data, op_array, return_value, 1);
-
- return execute_data;
}
/* }}} */
@@ -2322,6 +2339,10 @@ ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_ar
static zend_always_inline zend_bool zend_is_by_ref_func_arg_fetch(const zend_op *opline, zend_execute_data *call) /* {{{ */
{
uint32_t arg_num = opline->extended_value & ZEND_FETCH_ARG_MASK;
+
+ if (EXPECTED(arg_num <= MAX_ARG_FLAG_NUM)) {
+ return QUICK_ARG_SHOULD_BE_SENT_BY_REF(call->func, arg_num);
+ }
return ARG_SHOULD_BE_SENT_BY_REF(call->func, arg_num);
}
/* }}} */
@@ -2334,7 +2355,7 @@ static zend_execute_data *zend_vm_stack_copy_call_frame(zend_execute_data *call,
/* copy call frame into new stack segment */
new_call = zend_vm_stack_extend(used_stack * sizeof(zval));
*new_call = *call;
- ZEND_SET_CALL_INFO(new_call, ZEND_CALL_INFO(new_call) | ZEND_CALL_ALLOCATED);
+ ZEND_ADD_CALL_FLAG(new_call, ZEND_CALL_ALLOCATED);
if (passed_args) {
zval *src = ZEND_CALL_ARG(call, 1);
@@ -2351,7 +2372,7 @@ static zend_execute_data *zend_vm_stack_copy_call_frame(zend_execute_data *call,
EG(vm_stack)->prev->top = (zval*)call;
/* delete previous stack segment if it becames empty */
- if (UNEXPECTED(EG(vm_stack)->prev->top == ZEND_VM_STACK_ELEMETS(EG(vm_stack)->prev))) {
+ if (UNEXPECTED(EG(vm_stack)->prev->top == ZEND_VM_STACK_ELEMENTS(EG(vm_stack)->prev))) {
zend_vm_stack r = EG(vm_stack)->prev;
EG(vm_stack)->prev = r->prev;
@@ -2382,14 +2403,22 @@ static zend_always_inline zend_generator *zend_get_running_generator(zend_execut
}
/* }}} */
-static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num) /* {{{ */
+static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t op_num) /* {{{ */
{
- int i;
if (UNEXPECTED(EX(call))) {
zend_execute_data *call = EX(call);
zend_op *opline = EX(func)->op_array.opcodes + op_num;
int level;
int do_exit;
+
+ if (UNEXPECTED(opline->opcode == ZEND_INIT_FCALL ||
+ opline->opcode == ZEND_INIT_FCALL_BY_NAME ||
+ opline->opcode == ZEND_INIT_DYNAMIC_CALL ||
+ opline->opcode == ZEND_INIT_METHOD_CALL ||
+ opline->opcode == ZEND_INIT_STATIC_METHOD_CALL)) {
+ ZEND_ASSERT(op_num);
+ opline--;
+ }
do {
/* If the exception was thrown during a function call there might be
@@ -2426,6 +2455,7 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data
case ZEND_SEND_VAR_EX:
case ZEND_SEND_REF:
case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_VAR_NO_REF_EX:
case ZEND_SEND_USER:
if (level == 0) {
ZEND_CALL_NUM_ARGS(call) = opline->op2.num;
@@ -2477,9 +2507,7 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data
if (ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS) {
if (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR) {
- if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
- GC_REFCOUNT(Z_OBJ(call->This))--;
- }
+ GC_REFCOUNT(Z_OBJ(call->This))--;
if (GC_REFCOUNT(Z_OBJ(call->This)) == 1) {
zend_object_store_ctor_failed(Z_OBJ(call->This));
}
@@ -2488,8 +2516,7 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data
}
if (call->func->common.fn_flags & ZEND_ACC_CLOSURE) {
zend_object_release((zend_object *) call->func->common.prototype);
- }
- if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
+ } else if (call->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
zend_string_release(call->func->common.function_name);
zend_free_trampoline(call->func);
}
@@ -2499,30 +2526,36 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data
call = EX(call);
} while (call);
}
+}
+/* }}} */
+
+static void cleanup_live_vars(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num) /* {{{ */
+{
+ int i;
- for (i = 0; i < EX(func)->op_array.last_brk_cont; i++) {
- const zend_brk_cont_element *brk_cont = &EX(func)->op_array.brk_cont_array[i];
- if (brk_cont->start < 0) {
- continue;
- } else if (brk_cont->start > op_num) {
+ for (i = 0; i < EX(func)->op_array.last_live_range; i++) {
+ const zend_live_range *range = &EX(func)->op_array.live_range[i];
+ if (range->start > op_num) {
/* further blocks will not be relevant... */
break;
- } else if (op_num < brk_cont->brk) {
- if (!catch_op_num || catch_op_num >= brk_cont->brk) {
- zend_op *brk_opline = &EX(func)->op_array.opcodes[brk_cont->brk];
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
+ } else if (op_num < range->end) {
+ if (!catch_op_num || catch_op_num >= range->end) {
+ uint32_t kind = range->var & ZEND_LIVE_MASK;
+ uint32_t var_num = range->var & ~ZEND_LIVE_MASK;
+ zval *var = EX_VAR(var_num);
+
+ if (kind == ZEND_LIVE_TMPVAR) {
+ zval_ptr_dtor_nogc(var);
+ } else if (kind == ZEND_LIVE_LOOP) {
if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
zend_hash_iterator_del(Z_FE_ITER_P(var));
}
zval_ptr_dtor_nogc(var);
- } else if (brk_opline->opcode == ZEND_ROPE_END) {
- zend_string **rope = (zend_string **) EX_VAR(brk_opline->op1.var);
+ } else if (kind == ZEND_LIVE_ROPE) {
+ zend_string **rope = (zend_string **)var;
zend_op *last = EX(func)->op_array.opcodes + op_num;
- while (last->opcode != ZEND_ROPE_ADD && last->opcode != ZEND_ROPE_INIT) {
+ while ((last->opcode != ZEND_ROPE_ADD && last->opcode != ZEND_ROPE_INIT)
+ || last->result.var != var_num) {
ZEND_ASSERT(last >= EX(func)->op_array.opcodes);
last--;
}
@@ -2534,10 +2567,10 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data
zend_string_release(rope[j]);
} while (j--);
}
- } else if (brk_opline->opcode == ZEND_END_SILENCE) {
+ } else if (kind == ZEND_LIVE_SILENCE) {
/* restore previous error_reporting value */
- if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(brk_opline->op1.var)) != 0) {
- EG(error_reporting) = Z_LVAL_P(EX_VAR(brk_opline->op1.var));
+ if (!EG(error_reporting) && Z_LVAL_P(var) != 0) {
+ EG(error_reporting) = Z_LVAL_P(var);
}
}
}
@@ -2547,8 +2580,359 @@ static zend_always_inline void i_cleanup_unfinished_execution(zend_execute_data
/* }}} */
void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t op_num, uint32_t catch_op_num) {
- i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
+ cleanup_unfinished_calls(execute_data, op_num);
+ cleanup_live_vars(execute_data, op_num, catch_op_num);
+}
+
+static void zend_swap_operands(zend_op *op) /* {{{ */
+{
+ znode_op tmp;
+ zend_uchar tmp_type;
+
+ tmp = op->op1;
+ tmp_type = op->op1_type;
+ op->op1 = op->op2;
+ op->op1_type = op->op2_type;
+ op->op2 = tmp;
+ op->op2_type = tmp_type;
}
+/* }}} */
+
+static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_string *function, uint32_t num_args) /* {{{ */
+{
+ zend_function *fbc;
+ zval *func;
+ zend_class_entry *called_scope;
+ zend_string *lcname;
+ const char *colon;
+
+ if ((colon = zend_memrchr(ZSTR_VAL(function), ':', ZSTR_LEN(function))) != NULL &&
+ colon > ZSTR_VAL(function) &&
+ *(colon-1) == ':'
+ ) {
+ zend_string *mname;
+ size_t cname_length = colon - ZSTR_VAL(function) - 1;
+ size_t mname_length = ZSTR_LEN(function) - cname_length - (sizeof("::") - 1);
+
+ lcname = zend_string_init(ZSTR_VAL(function), cname_length, 0);
+
+ called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(called_scope == NULL)) {
+ zend_string_release(lcname);
+ return NULL;
+ }
+
+ mname = zend_string_init(ZSTR_VAL(function) + (cname_length + sizeof("::") - 1), mname_length, 0);
+
+ if (called_scope->get_static_method) {
+ fbc = called_scope->get_static_method(called_scope, mname);
+ } else {
+ fbc = zend_std_get_static_method(called_scope, mname, NULL);
+ }
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), ZSTR_VAL(mname));
+ }
+ zend_string_release(lcname);
+ zend_string_release(mname);
+ return NULL;
+ }
+
+ zend_string_release(lcname);
+ zend_string_release(mname);
+
+ if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ zend_error(E_DEPRECATED,
+ "Non-static method %s::%s() should not be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ return NULL;
+ }
+ } else {
+ zend_throw_error(
+ zend_ce_error,
+ "Non-static method %s::%s() cannot be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ return NULL;
+ }
+ }
+ } else {
+ if (ZSTR_VAL(function)[0] == '\\') {
+ lcname = zend_string_alloc(ZSTR_LEN(function) - 1, 0);
+ zend_str_tolower_copy(ZSTR_VAL(lcname), ZSTR_VAL(function) + 1, ZSTR_LEN(function) - 1);
+ } else {
+ lcname = zend_string_tolower(function);
+ }
+ if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
+ zend_throw_error(NULL, "Call to undefined function %s()", ZSTR_VAL(function));
+ zend_string_release(lcname);
+ return NULL;
+ }
+ zend_string_release(lcname);
+
+ fbc = Z_FUNC_P(func);
+ called_scope = NULL;
+ }
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+
+ return zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC,
+ fbc, num_args, called_scope, NULL);
+}
+/* }}} */
+
+static zend_never_inline zend_execute_data *zend_init_dynamic_call_object(zval *function, uint32_t num_args) /* {{{ */
+{
+ zend_function *fbc;
+ zend_class_entry *called_scope;
+ zend_object *object;
+ uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
+
+ if (EXPECTED(Z_OBJ_HANDLER_P(function, get_closure)) &&
+ EXPECTED(Z_OBJ_HANDLER_P(function, get_closure)(function, &called_scope, &fbc, &object) == SUCCESS)) {
+
+ if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
+ /* Delay closure destruction until its invocation */
+ ZEND_ASSERT(GC_TYPE((zend_object*)fbc->common.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)fbc->common.prototype)++;
+ call_info |= ZEND_CALL_CLOSURE;
+ } else if (object) {
+ call_info |= ZEND_CALL_RELEASE_THIS;
+ GC_REFCOUNT(object)++; /* For $this pointer */
+ }
+ } else {
+ zend_throw_error(NULL, "Function name must be a string");
+ return NULL;
+ }
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+
+ return zend_vm_stack_push_call_frame(call_info,
+ fbc, num_args, called_scope, object);
+}
+/* }}} */
+
+static zend_never_inline zend_execute_data *zend_init_dynamic_call_array(zend_array *function, uint32_t num_args) /* {{{ */
+{
+ zend_function *fbc;
+ zend_class_entry *called_scope;
+ zend_object *object;
+ uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
+
+ if (zend_hash_num_elements(function) == 2) {
+ zval *obj;
+ zval *method;
+ obj = zend_hash_index_find(function, 0);
+ method = zend_hash_index_find(function, 1);
+
+ if (UNEXPECTED(!obj) || UNEXPECTED(!method)) {
+ zend_throw_error(NULL, "Array callback has to contain indices 0 and 1");
+ return NULL;
+ }
+
+ ZVAL_DEREF(obj);
+ if (UNEXPECTED(Z_TYPE_P(obj) != IS_STRING) && UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
+ zend_throw_error(NULL, "First array member is not a valid class name or object");
+ return NULL;
+ }
+
+ ZVAL_DEREF(method);
+ if (UNEXPECTED(Z_TYPE_P(method) != IS_STRING)) {
+ zend_throw_error(NULL, "Second array member is not a valid method");
+ return NULL;
+ }
+
+ if (Z_TYPE_P(obj) == IS_STRING) {
+ object = NULL;
+ called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(called_scope == NULL)) {
+ return NULL;
+ }
+
+ if (called_scope->get_static_method) {
+ fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
+ } else {
+ fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
+ }
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), Z_STRVAL_P(method));
+ }
+ return NULL;
+ }
+ if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ zend_error(E_DEPRECATED,
+ "Non-static method %s::%s() should not be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ return NULL;
+ }
+ } else {
+ zend_throw_error(
+ zend_ce_error,
+ "Non-static method %s::%s() cannot be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ return NULL;
+ }
+ }
+ } else {
+ called_scope = Z_OBJCE_P(obj);
+ object = Z_OBJ_P(obj);
+
+ fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(object->ce->name), Z_STRVAL_P(method));
+ }
+ return NULL;
+ }
+
+ if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ object = NULL;
+ } else {
+ call_info |= ZEND_CALL_RELEASE_THIS;
+ GC_REFCOUNT(object)++; /* For $this pointer */
+ }
+ }
+ } else {
+ zend_throw_error(NULL, "Function name must be a string");
+ return NULL;
+ }
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+
+ return zend_vm_stack_push_call_frame(call_info,
+ fbc, num_args, called_scope, object);
+}
+/* }}} */
+
+#define ZEND_FAKE_OP_ARRAY ((zend_op_array*)(zend_intptr_t)-1)
+
+static zend_never_inline zend_op_array* ZEND_FASTCALL zend_include_or_eval(zval *inc_filename, int type) /* {{{ */
+{
+ zend_op_array *new_op_array = NULL;
+ zval tmp_inc_filename;
+
+ ZVAL_UNDEF(&tmp_inc_filename);
+ if (Z_TYPE_P(inc_filename) != IS_STRING) {
+ ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
+ inc_filename = &tmp_inc_filename;
+ }
+
+ if (type != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
+ if (type == ZEND_INCLUDE_ONCE || type == ZEND_INCLUDE) {
+ zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
+ } else {
+ zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
+ }
+ } else {
+ switch (type) {
+ case ZEND_INCLUDE_ONCE:
+ case ZEND_REQUIRE_ONCE: {
+ zend_file_handle file_handle;
+ zend_string *resolved_path;
+
+ resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename));
+ if (resolved_path) {
+ if (zend_hash_exists(&EG(included_files), resolved_path)) {
+ goto already_compiled;
+ }
+ } else {
+ resolved_path = zend_string_copy(Z_STR_P(inc_filename));
+ }
+
+ if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
+
+ if (!file_handle.opened_path) {
+ file_handle.opened_path = zend_string_copy(resolved_path);
+ }
+
+ if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
+ zend_op_array *op_array = zend_compile_file(&file_handle, (type==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
+ zend_destroy_file_handle(&file_handle);
+ zend_string_release(resolved_path);
+ if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp_inc_filename));
+ }
+ return op_array;
+ } else {
+ zend_file_handle_dtor(&file_handle);
+already_compiled:
+ new_op_array = ZEND_FAKE_OP_ARRAY;
+ }
+ } else {
+ if (type == ZEND_INCLUDE_ONCE) {
+ zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
+ } else {
+ zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
+ }
+ }
+ zend_string_release(resolved_path);
+ }
+ break;
+ case ZEND_INCLUDE:
+ case ZEND_REQUIRE:
+ new_op_array = compile_filename(type, inc_filename);
+ break;
+ case ZEND_EVAL: {
+ char *eval_desc = zend_make_compiled_string_description("eval()'d code");
+ new_op_array = zend_compile_string(inc_filename, eval_desc);
+ efree(eval_desc);
+ }
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp_inc_filename));
+ }
+ return new_op_array;
+}
+/* }}} */
+
+static zend_never_inline int zend_do_fcall_overloaded(zend_function *fbc, zend_execute_data *call, zval *ret) /* {{{ */
+{
+ zend_object *object;
+
+ /* Not sure what should be done here if it's a static method */
+ if (UNEXPECTED(Z_TYPE(call->This) != IS_OBJECT)) {
+ zend_vm_stack_free_args(call);
+ if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
+ zend_string_release(fbc->common.function_name);
+ }
+ efree(fbc);
+ zend_vm_stack_free_call_frame(call);
+
+ zend_throw_error(NULL, "Cannot call overloaded function for non-object");
+ return 0;
+ }
+
+ object = Z_OBJ(call->This);
+
+ ZVAL_NULL(ret);
+
+ EG(current_execute_data) = call;
+ object->handlers->call_method(fbc->common.function_name, object, call, ret);
+ EG(current_execute_data) = call->prev_execute_data;
+
+ zend_vm_stack_free_args(call);
+
+ if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
+ zend_string_release(fbc->common.function_name);
+ }
+ efree(fbc);
+
+ return 1;
+}
+/* }}} */
#ifdef HAVE_GCC_GLOBAL_REGS
# if defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(i386)
@@ -2560,14 +2944,27 @@ void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t
# elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__powerpc64__)
# define ZEND_VM_FP_GLOBAL_REG "r28"
# define ZEND_VM_IP_GLOBAL_REG "r29"
+# elif defined(__IBMC__) && ZEND_GCC_VERSION >= 4002 && defined(__powerpc64__)
+# define ZEND_VM_FP_GLOBAL_REG "r28"
+# define ZEND_VM_IP_GLOBAL_REG "r29"
# endif
#endif
-#define ZEND_VM_NEXT_OPCODE() \
+#define ZEND_VM_NEXT_OPCODE_EX(check_exception, skip) \
CHECK_SYMBOL_TABLES() \
- ZEND_VM_INC_OPCODE(); \
+ if (check_exception) { \
+ OPLINE = EX(opline) + (skip); \
+ } else { \
+ OPLINE = opline + (skip); \
+ } \
ZEND_VM_CONTINUE()
+#define ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION() \
+ ZEND_VM_NEXT_OPCODE_EX(1, 1)
+
+#define ZEND_VM_NEXT_OPCODE() \
+ ZEND_VM_NEXT_OPCODE_EX(0, 1)
+
#define ZEND_VM_SET_NEXT_OPCODE(new_op) \
CHECK_SYMBOL_TABLES() \
OPLINE = new_op
@@ -2622,10 +3019,34 @@ void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t
} \
ZEND_VM_CONTINUE(); \
} while (0)
+# define ZEND_VM_SMART_BRANCH_JMPZ(_result, _check) do { \
+ if ((_check) && UNEXPECTED(EG(exception))) { \
+ HANDLE_EXCEPTION(); \
+ } \
+ if (_result) { \
+ ZEND_VM_SET_NEXT_OPCODE(opline + 2); \
+ } else { \
+ ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline + 1, (opline+1)->op2)); \
+ } \
+ ZEND_VM_CONTINUE(); \
+ } while (0)
+# define ZEND_VM_SMART_BRANCH_JMPNZ(_result, _check) do { \
+ if ((_check) && UNEXPECTED(EG(exception))) { \
+ HANDLE_EXCEPTION(); \
+ } \
+ if (!(_result)) { \
+ ZEND_VM_SET_NEXT_OPCODE(opline + 2); \
+ } else { \
+ ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline + 1, (opline+1)->op2)); \
+ } \
+ ZEND_VM_CONTINUE(); \
+ } while (0)
#else
# define ZEND_VM_REPEATABLE_OPCODE
# define ZEND_VM_REPEAT_OPCODE(_opcode)
# define ZEND_VM_SMART_BRANCH(_result, _check)
+# define ZEND_VM_SMART_BRANCH_JMPZ(_result, _check)
+# define ZEND_VM_SMART_BRANCH_JMPNZ(_result, _check)
#endif
#ifdef __GNUC__
@@ -2661,10 +3082,26 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
return zend_user_opcode_handlers[opcode];
}
-ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type) {
+ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type)
+{
return get_zval_ptr(op_type, *node, execute_data, should_free, type);
}
+ZEND_API void ZEND_FASTCALL zend_check_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg)
+{
+ zend_verify_internal_arg_type(zf, arg_num, arg);
+}
+
+ZEND_API int ZEND_FASTCALL zend_check_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot)
+{
+ return zend_verify_arg_type(zf, arg_num, arg, default_value, cache_slot);
+}
+
+ZEND_API void ZEND_FASTCALL zend_check_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot)
+{
+ zend_verify_missing_arg(execute_data, arg_num, cache_slot);
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index f595edca9b..e70465fdc6 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -36,7 +37,6 @@ void init_executor(void);
void shutdown_executor(void);
void shutdown_destructors(void);
ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value);
-ZEND_API zend_execute_data *zend_create_generator_execute_data(zend_execute_data *call, zend_op_array *op_array, zval *return_value);
ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value);
ZEND_API void execute_ex(zend_execute_data *execute_data);
ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_value);
@@ -49,10 +49,12 @@ ZEND_API int zend_eval_stringl(char *str, size_t str_len, zval *retval_ptr, char
ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions);
ZEND_API int zend_eval_stringl_ex(char *str, size_t str_len, zval *retval_ptr, char *string_name, int handle_exceptions);
-ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info *cur_arg_info, char **class_name, zend_class_entry **pce);
-ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind, zval *arg);
-ZEND_API void zend_verify_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind);
-ZEND_API void zend_verify_internal_return_error(const zend_function *zf, const char *need_msg, const char *need_kind, const char *returned_msg, const char *returned_kind);
+/* export zend_pass_function to allow comparisons against it */
+extern ZEND_API const zend_internal_function zend_pass_function;
+
+ZEND_API void ZEND_FASTCALL zend_check_internal_arg_type(zend_function *zf, uint32_t arg_num, zval *arg);
+ZEND_API int ZEND_FASTCALL zend_check_arg_type(zend_function *zf, uint32_t arg_num, zval *arg, zval *default_value, void **cache_slot);
+ZEND_API void ZEND_FASTCALL zend_check_missing_arg(zend_execute_data *execute_data, uint32_t arg_num, void **cache_slot);
static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval *value, zend_uchar value_type)
{
@@ -84,12 +86,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
garbage = Z_COUNTED_P(variable_ptr);
if (--GC_REFCOUNT(garbage) == 0) {
ZVAL_COPY_VALUE(variable_ptr, value);
- if (value_type == IS_CONST) {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE_P(variable_ptr))) {
- zval_copy_ctor_func(variable_ptr);
- }
- } else if (value_type == IS_CV) {
+ if (value_type & (IS_CONST|IS_CV)) {
if (UNEXPECTED(Z_OPT_REFCOUNTED_P(variable_ptr))) {
Z_ADDREF_P(variable_ptr);
}
@@ -100,7 +97,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
Z_ADDREF_P(variable_ptr);
}
}
- zval_dtor_func_for_ptr(garbage);
+ zval_dtor_func(garbage);
return variable_ptr;
} else { /* we need to split */
/* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */
@@ -113,12 +110,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
} while (0);
ZVAL_COPY_VALUE(variable_ptr, value);
- if (value_type == IS_CONST) {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE_P(variable_ptr))) {
- zval_copy_ctor_func(variable_ptr);
- }
- } else if (value_type == IS_CV) {
+ if (value_type & (IS_CONST|IS_CV)) {
if (UNEXPECTED(Z_OPT_REFCOUNTED_P(variable_ptr))) {
Z_ADDREF_P(variable_ptr);
}
@@ -132,8 +124,8 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval
return variable_ptr;
}
-ZEND_API int zval_update_constant(zval *pp, zend_bool inline_change);
-ZEND_API int zval_update_constant_ex(zval *pp, zend_bool inline_change, zend_class_entry *scope);
+ZEND_API int zval_update_constant(zval *pp);
+ZEND_API int zval_update_constant_ex(zval *pp, zend_class_entry *scope);
/* dedicated Zend executor functions - do not use! */
struct _zend_vm_stack {
@@ -145,7 +137,7 @@ struct _zend_vm_stack {
#define ZEND_VM_STACK_HEADER_SLOTS \
((ZEND_MM_ALIGNED_SIZE(sizeof(struct _zend_vm_stack)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval)) - 1) / ZEND_MM_ALIGNED_SIZE(sizeof(zval)))
-#define ZEND_VM_STACK_ELEMETS(stack) \
+#define ZEND_VM_STACK_ELEMENTS(stack) \
(((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS)
/*
@@ -167,6 +159,19 @@ ZEND_API void zend_vm_stack_init(void);
ZEND_API void zend_vm_stack_destroy(void);
ZEND_API void* zend_vm_stack_extend(size_t size);
+static zend_always_inline void zend_vm_init_call_frame(zend_execute_data *call, uint32_t call_info, zend_function *func, uint32_t num_args, zend_class_entry *called_scope, zend_object *object)
+{
+ call->func = func;
+ if (object) {
+ Z_OBJ(call->This) = object;
+ ZEND_SET_CALL_INFO(call, 1, call_info);
+ } else {
+ Z_CE(call->This) = called_scope;
+ ZEND_SET_CALL_INFO(call, 0, call_info);
+ }
+ ZEND_CALL_NUM_ARGS(call) = num_args;
+}
+
static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame_ex(uint32_t used_stack, uint32_t call_info, zend_function *func, uint32_t num_args, zend_class_entry *called_scope, zend_object *object)
{
zend_execute_data *call = (zend_execute_data*)EG(vm_stack_top);
@@ -175,19 +180,14 @@ static zend_always_inline zend_execute_data *zend_vm_stack_push_call_frame_ex(ui
if (UNEXPECTED(used_stack > (size_t)(((char*)EG(vm_stack_end)) - (char*)call))) {
call = (zend_execute_data*)zend_vm_stack_extend(used_stack);
- ZEND_SET_CALL_INFO(call, call_info | ZEND_CALL_ALLOCATED);
+ ZEND_ASSERT_VM_STACK_GLOBAL;
+ zend_vm_init_call_frame(call, call_info | ZEND_CALL_ALLOCATED, func, num_args, called_scope, object);
+ return call;
} else {
EG(vm_stack_top) = (zval*)((char*)call + used_stack);
- ZEND_SET_CALL_INFO(call, call_info);
+ zend_vm_init_call_frame(call, call_info, func, num_args, called_scope, object);
+ return call;
}
-
- ZEND_ASSERT_VM_STACK_GLOBAL;
-
- call->func = func;
- Z_OBJ(call->This) = object;
- ZEND_CALL_NUM_ARGS(call) = num_args;
- call->called_scope = called_scope;
- return call;
}
static zend_always_inline uint32_t zend_vm_calc_used_stack(uint32_t num_args, zend_function *func)
@@ -219,7 +219,7 @@ static zend_always_inline void zend_vm_stack_free_extra_args_ex(uint32_t call_in
if (!Z_DELREF_P(p)) {
zend_refcounted *r = Z_COUNTED_P(p);
ZVAL_NULL(p);
- zval_dtor_func_for_ptr(r);
+ zval_dtor_func(r);
} else {
GC_ZVAL_CHECK_POSSIBLE_ROOT(p);
}
@@ -247,7 +247,7 @@ static zend_always_inline void zend_vm_stack_free_args(zend_execute_data *call)
if (!Z_DELREF_P(p)) {
zend_refcounted *r = Z_COUNTED_P(p);
ZVAL_NULL(p);
- zval_dtor_func_for_ptr(r);
+ zval_dtor_func(r);
}
}
} while (p != end);
@@ -260,14 +260,13 @@ static zend_always_inline void zend_vm_stack_free_call_frame_ex(uint32_t call_in
if (UNEXPECTED(call_info & ZEND_CALL_ALLOCATED)) {
zend_vm_stack p = EG(vm_stack);
-
zend_vm_stack prev = p->prev;
+ ZEND_ASSERT(call == (zend_execute_data*)ZEND_VM_STACK_ELEMENTS(EG(vm_stack)));
EG(vm_stack_top) = prev->top;
EG(vm_stack_end) = prev->end;
EG(vm_stack) = prev;
efree(p);
-
} else {
EG(vm_stack_top) = (zval*)call;
}
@@ -286,16 +285,18 @@ ZEND_API const char *get_active_function_name(void);
ZEND_API const char *zend_get_executed_filename(void);
ZEND_API zend_string *zend_get_executed_filename_ex(void);
ZEND_API uint zend_get_executed_lineno(void);
+ZEND_API zend_class_entry *zend_get_executed_scope(void);
ZEND_API zend_bool zend_is_executing(void);
ZEND_API void zend_set_timeout(zend_long seconds, int reset_signals);
ZEND_API void zend_unset_timeout(void);
-ZEND_API void zend_timeout(int dummy);
+ZEND_API ZEND_NORETURN void zend_timeout(int dummy);
ZEND_API zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type);
ZEND_API zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, const zval *key, int fetch_type);
void zend_verify_abstract_class(zend_class_entry *ce);
ZEND_API void zend_fetch_dimension_by_zval(zval *result, zval *container, zval *dim);
+ZEND_API void zend_fetch_dimension_by_zval_is(zval *result, zval *container, zval *dim, int dim_type);
ZEND_API zval* zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, uint32_t var);
@@ -355,6 +356,13 @@ void zend_cleanup_unfinished_execution(zend_execute_data *execute_data, uint32_t
(slot)[1] = (ptr); \
} while (0)
+#define SKIP_EXT_OPLINE(opline) do { \
+ while (UNEXPECTED((opline)->opcode >= ZEND_EXT_STMT \
+ && (opline)->opcode <= ZEND_TICKS)) { \
+ (opline)--; \
+ } \
+ } while (0)
+
END_EXTERN_C()
#endif /* ZEND_EXECUTE_H */
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index dde4b20b0b..f7bce4f4e5 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -37,19 +38,19 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
ZEND_API void (*zend_execute_ex)(zend_execute_data *execute_data);
ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data, zval *return_value);
/* true globals */
-ZEND_API const zend_fcall_info empty_fcall_info = { 0, NULL, {{0}, {{0}}, {0}}, NULL, NULL, NULL, NULL, 0, 0 };
+ZEND_API const zend_fcall_info empty_fcall_info = { 0, {{0}, {{0}}, {0}}, NULL, NULL, NULL, 0, 0 };
ZEND_API const zend_fcall_info_cache empty_fcall_info_cache = { 0, NULL, NULL, NULL, NULL };
#ifdef ZEND_WIN32
-#ifdef ZTS
-__declspec(thread)
-#endif
-HANDLE tq_timer = NULL;
+ZEND_TLS HANDLE tq_timer = NULL;
#endif
#if 0&&ZEND_DEBUG
@@ -72,7 +73,7 @@ static void zend_handle_sigsegv(int dummy) /* {{{ */
zend_get_executed_filename(),
zend_get_executed_lineno());
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
}
@@ -132,7 +133,7 @@ void init_executor(void) /* {{{ */
zend_init_fpu();
ZVAL_NULL(&EG(uninitialized_zval));
- ZVAL_NULL(&EG(error_zval));
+ ZVAL_ERROR(&EG(error_zval));
/* destroys stack frame, therefore makes core dumps worthless */
#if 0&&ZEND_DEBUG
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
@@ -171,14 +172,12 @@ void init_executor(void) /* {{{ */
zend_objects_store_init(&EG(objects_store), 1024);
EG(full_tables_cleanup) = 0;
-#ifdef ZEND_WIN32
EG(timed_out) = 0;
-#endif
EG(exception) = NULL;
EG(prev_exception) = NULL;
- EG(scope) = NULL;
+ EG(fake_scope) = NULL;
EG(ht_iterators_count) = sizeof(EG(ht_iterators_slots)) / sizeof(HashTableIterator);
EG(ht_iterators_used) = 0;
@@ -220,9 +219,9 @@ static void zend_throw_or_error(int fetch_type, zend_class_entry *exception_ce,
zend_vspprintf(&message, 0, format, va);
if (fetch_type & ZEND_FETCH_CLASS_EXCEPTION) {
- zend_throw_error(exception_ce, message);
+ zend_throw_error(exception_ce, "%s", message);
} else {
- zend_error(E_ERROR, message);
+ zend_error(E_ERROR, "%s", message);
}
efree(message);
@@ -297,8 +296,8 @@ void shutdown_executor(void) /* {{{ */
}
zend_stack_clean(&EG(user_error_handlers_error_reporting), NULL, 1);
- zend_stack_clean(&EG(user_error_handlers), (void (*)(void *))ZVAL_DESTRUCTOR, 1);
- zend_stack_clean(&EG(user_exception_handlers), (void (*)(void *))ZVAL_DESTRUCTOR, 1);
+ zend_stack_clean(&EG(user_error_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
+ zend_stack_clean(&EG(user_exception_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
} zend_end_try();
zend_try {
@@ -399,6 +398,12 @@ void shutdown_executor(void) /* {{{ */
zend_shutdown_fpu();
+#if ZEND_DEBUG
+ if (EG(ht_iterators_used) && !CG(unclean_shutdown)) {
+ zend_error(E_WARNING, "Leaked %" PRIu32 " hashtable iterators", EG(ht_iterators_used));
+ }
+#endif
+
EG(ht_iterators_used) = 0;
if (EG(ht_iterators) != EG(ht_iterators_slots)) {
efree(EG(ht_iterators));
@@ -518,6 +523,21 @@ ZEND_API uint zend_get_executed_lineno(void) /* {{{ */
}
/* }}} */
+ZEND_API zend_class_entry *zend_get_executed_scope(void) /* {{{ */
+{
+ zend_execute_data *ex = EG(current_execute_data);
+
+ while (1) {
+ if (!ex) {
+ return NULL;
+ } else if (ex->func && (ZEND_USER_CODE(ex->func->type) || ex->func->common.scope)) {
+ return ex->func->common.scope;
+ }
+ ex = ex->prev_execute_data;
+ }
+}
+/* }}} */
+
ZEND_API zend_bool zend_is_executing(void) /* {{{ */
{
return EG(current_execute_data) != 0;
@@ -541,32 +561,27 @@ ZEND_API void _zval_internal_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC) /* {{{ *
}
/* }}} */
-#define IS_VISITED_CONSTANT 0x80
-#define IS_CONSTANT_VISITED(p) (Z_TYPE_P(p) & IS_VISITED_CONSTANT)
-#define MARK_CONSTANT_VISITED(p) Z_TYPE_INFO_P(p) |= IS_VISITED_CONSTANT
-#define RESET_CONSTANT_VISITED(p) Z_TYPE_INFO_P(p) &= ~IS_VISITED_CONSTANT
-
-ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_class_entry *scope) /* {{{ */
+ZEND_API int zval_update_constant_ex(zval *p, zend_class_entry *scope) /* {{{ */
{
zval *const_value;
char *colon;
+ zend_bool inline_change;
- if (IS_CONSTANT_VISITED(p)) {
- zend_throw_error(zend_ce_error, "Cannot declare self-referencing constant '%s'", Z_STRVAL_P(p));
- return FAILURE;
- } else if (Z_TYPE_P(p) == IS_CONSTANT) {
- int refcount;
-
+ if (Z_TYPE_P(p) == IS_CONSTANT) {
+ if (IS_CONSTANT_VISITED(p)) {
+ zend_throw_error(NULL, "Cannot declare self-referencing constant '%s'", Z_STRVAL_P(p));
+ return FAILURE;
+ }
+ inline_change = (Z_TYPE_FLAGS_P(p) & IS_TYPE_IMMUTABLE) == 0;
SEPARATE_ZVAL_NOREF(p);
MARK_CONSTANT_VISITED(p);
- refcount = Z_REFCOUNTED_P(p) ? Z_REFCOUNT_P(p) : 1;
if (Z_CONST_FLAGS_P(p) & IS_CONSTANT_CLASS) {
ZEND_ASSERT(EG(current_execute_data));
if (inline_change) {
zend_string_release(Z_STR_P(p));
}
- if (EG(scope) && EG(scope)->name) {
- ZVAL_STR_COPY(p, EG(scope)->name);
+ if (scope && scope->name) {
+ ZVAL_STR_COPY(p, scope->name);
} else {
ZVAL_EMPTY_STRING(p);
}
@@ -577,7 +592,7 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
RESET_CONSTANT_VISITED(p);
return FAILURE;
} else if ((colon = (char*)zend_memrchr(Z_STRVAL_P(p), ':', Z_STRLEN_P(p)))) {
- zend_throw_error(zend_ce_error, "Undefined class constant '%s'", Z_STRVAL_P(p));
+ zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(p));
RESET_CONSTANT_VISITED(p);
return FAILURE;
} else {
@@ -593,21 +608,8 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
Z_TYPE_FLAGS_P(p) = IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE;
}
}
- if (actual[0] == '\\') {
- if (inline_change) {
- memmove(Z_STRVAL_P(p), Z_STRVAL_P(p)+1, Z_STRLEN_P(p));
- --Z_STRLEN_P(p);
- } else {
- ++actual;
- }
- --actual_len;
- }
if ((Z_CONST_FLAGS_P(p) & IS_CONSTANT_UNQUALIFIED) == 0) {
- if (ZSTR_VAL(save)[0] == '\\') {
- zend_throw_error(zend_ce_error, "Undefined constant '%s'", ZSTR_VAL(save) + 1);
- } else {
- zend_throw_error(zend_ce_error, "Undefined constant '%s'", ZSTR_VAL(save));
- }
+ zend_throw_error(NULL, "Undefined constant '%s'", ZSTR_VAL(save));
if (inline_change) {
zend_string_release(save);
}
@@ -631,19 +633,12 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
zend_string_release(Z_STR_P(p));
}
ZVAL_COPY_VALUE(p, const_value);
- if (Z_OPT_CONSTANT_P(p)) {
- if (UNEXPECTED(zval_update_constant_ex(p, 1, NULL) != SUCCESS)) {
- RESET_CONSTANT_VISITED(p);
- return FAILURE;
- }
- }
zval_opt_copy_ctor(p);
}
-
- if (Z_REFCOUNTED_P(p)) Z_SET_REFCOUNT_P(p, refcount);
} else if (Z_TYPE_P(p) == IS_CONSTANT_AST) {
zval tmp;
+ inline_change = (Z_TYPE_FLAGS_P(p) & IS_TYPE_IMMUTABLE) == 0;
if (UNEXPECTED(zend_ast_evaluate(&tmp, Z_ASTVAL_P(p), scope) != SUCCESS)) {
return FAILURE;
}
@@ -656,31 +651,23 @@ ZEND_API int zval_update_constant_ex(zval *p, zend_bool inline_change, zend_clas
}
/* }}} */
-ZEND_API int zval_update_constant(zval *pp, zend_bool inline_change) /* {{{ */
-{
- return zval_update_constant_ex(pp, inline_change, NULL);
-}
-/* }}} */
-
-int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]) /* {{{ */
+ZEND_API int zval_update_constant(zval *pp) /* {{{ */
{
- return call_user_function_ex(function_table, object, function_name, retval_ptr, param_count, params, 1, NULL);
+ return zval_update_constant_ex(pp, EG(current_execute_data) ? zend_get_executed_scope() : CG(active_class_entry));
}
/* }}} */
-int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table) /* {{{ */
+int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation) /* {{{ */
{
zend_fcall_info fci;
fci.size = sizeof(fci);
- fci.function_table = function_table;
fci.object = object ? Z_OBJ_P(object) : NULL;
ZVAL_COPY_VALUE(&fci.function_name, function_name);
fci.retval = retval_ptr;
fci.param_count = param_count;
fci.params = params;
fci.no_separation = (zend_bool) no_separation;
- fci.symbol_table = symbol_table;
return zend_call_function(&fci, NULL);
}
@@ -689,11 +676,9 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /* {{{ */
{
uint32_t i;
- zend_class_entry *calling_scope = NULL;
zend_execute_data *call, dummy_execute_data;
zend_fcall_info_cache fci_cache_local;
zend_function *func;
- zend_class_entry *orig_scope;
ZVAL_UNDEF(fci->retval);
@@ -713,8 +698,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
break;
}
- orig_scope = EG(scope);
-
/* Initialize execute_data */
if (!EG(current_execute_data)) {
/* This only happens when we're called outside any execute()'s
@@ -770,10 +753,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
}
func = fci_cache->function_handler;
- call = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_FUNCTION,
- func, fci->param_count, fci_cache->called_scope, fci_cache->object);
- calling_scope = fci_cache->calling_scope;
- fci->object = fci_cache->object;
+ fci->object = (func->common.fn_flags & ZEND_ACC_STATIC) ?
+ NULL : fci_cache->object;
+
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_FUNCTION | ZEND_CALL_DYNAMIC,
+ func, fci->param_count, fci_cache->called_scope, fci->object);
if (fci->object &&
(!EG(objects_store).object_buckets ||
!IS_OBJ_VALID(EG(objects_store).object_buckets[fci->object->handle]))) {
@@ -785,7 +769,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
if (func->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
if (func->common.fn_flags & ZEND_ACC_ABSTRACT) {
- zend_throw_error(zend_ce_error, "Cannot call abstract method %s::%s()", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ if (EG(current_execute_data) == &dummy_execute_data) {
+ EG(current_execute_data) = dummy_execute_data.prev_execute_data;
+ }
return FAILURE;
}
if (func->common.fn_flags & ZEND_ACC_DEPRECATED) {
@@ -839,27 +826,16 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
ZVAL_COPY_VALUE(param, arg);
}
- EG(scope) = calling_scope;
- if (func->common.fn_flags & ZEND_ACC_STATIC) {
- fci->object = NULL;
+ if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
+ ZEND_ASSERT(GC_TYPE((zend_object*)func->op_array.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)func->op_array.prototype)++;
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
}
- Z_OBJ(call->This) = fci->object;
if (func->type == ZEND_USER_FUNCTION) {
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
- EG(scope) = func->common.scope;
- call->symbol_table = fci->symbol_table;
- if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
- ZEND_ASSERT(GC_TYPE(func->op_array.prototype) == IS_OBJECT);
- GC_REFCOUNT(func->op_array.prototype)++;
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
- }
- if (EXPECTED((func->op_array.fn_flags & ZEND_ACC_GENERATOR) == 0)) {
- zend_init_execute_data(call, &func->op_array, fci->retval);
- zend_execute_ex(call);
- } else {
- zend_generator_create_zval(call, &func->op_array, fci->retval);
- }
+ zend_init_execute_data(call, &func->op_array, fci->retval);
+ zend_execute_ex(call);
if (call_via_handler) {
/* We must re-initialize function again */
fci_cache->initialized = 0;
@@ -867,9 +843,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
} else if (func->type == ZEND_INTERNAL_FUNCTION) {
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
ZVAL_NULL(fci->retval);
- if (func->common.scope) {
- EG(scope) = func->common.scope;
- }
call->prev_execute_data = EG(current_execute_data);
call->return_value = NULL; /* this is not a constructor call */
EG(current_execute_data) = call;
@@ -907,7 +880,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
fci->object->handlers->call_method(func->common.function_name, fci->object, call, fci->retval);
EG(current_execute_data) = call->prev_execute_data;
} else {
- zend_throw_error(zend_ce_error, "Cannot call overloaded function for non-object");
+ zend_throw_error(NULL, "Cannot call overloaded function for non-object");
}
zend_vm_stack_free_args(call);
@@ -923,7 +896,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
}
}
- EG(scope) = orig_scope;
zend_vm_stack_free_call_frame(call);
if (EG(current_execute_data) == &dummy_execute_data) {
@@ -942,7 +914,6 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
zend_class_entry *ce = NULL;
zval args[1];
zval local_retval;
- int retval;
zend_string *lc_name;
zend_fcall_info fcall_info;
zend_fcall_info_cache fcall_cache;
@@ -981,7 +952,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
}
if (!EG(autoload_func)) {
- zend_function *func = zend_hash_str_find_ptr(EG(function_table), ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME) - 1);
+ zend_function *func = zend_hash_find_ptr(EG(function_table), CG(known_strings)[ZEND_STR_MAGIC_AUTOLOAD]);
if (func) {
EG(autoload_func) = func;
} else {
@@ -994,7 +965,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
}
/* Verify class name before passing it to __autoload() */
- if (strspn(ZSTR_VAL(name), "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377\\") != ZSTR_LEN(name)) {
+ if (strspn(ZSTR_VAL(name), "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377\\") != ZSTR_LEN(name)) {
if (!key) {
zend_string_release(lc_name);
}
@@ -1022,9 +993,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
}
fcall_info.size = sizeof(fcall_info);
- fcall_info.function_table = EG(function_table);
ZVAL_STR_COPY(&fcall_info.function_name, EG(autoload_func)->common.function_name);
- fcall_info.symbol_table = NULL;
fcall_info.retval = &local_retval;
fcall_info.param_count = 1;
fcall_info.params = args;
@@ -1038,7 +1007,9 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
fcall_cache.object = NULL;
zend_exception_save();
- retval = zend_call_function(&fcall_info, &fcall_cache);
+ if ((zend_call_function(&fcall_info, &fcall_cache) == SUCCESS) && !EG(exception)) {
+ ce = zend_hash_find_ptr(EG(class_table), lc_name);
+ }
zend_exception_restore();
zval_ptr_dtor(&args[0]);
@@ -1048,9 +1019,6 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
zval_ptr_dtor(&local_retval);
- if (retval == SUCCESS) {
- ce = zend_hash_find_ptr(EG(class_table), lc_name);
- }
if (!key) {
zend_string_release(lc_name);
}
@@ -1067,11 +1035,13 @@ ZEND_API zend_class_entry *zend_lookup_class(zend_string *name) /* {{{ */
ZEND_API zend_class_entry *zend_get_called_scope(zend_execute_data *ex) /* {{{ */
{
while (ex) {
- if (ex->called_scope) {
- return ex->called_scope;
+ if (Z_TYPE(ex->This) == IS_OBJECT) {
+ return Z_OBJCE(ex->This);
+ } else if (Z_CE(ex->This)) {
+ return Z_CE(ex->This);
} else if (ex->func) {
if (ex->func->type != ZEND_INTERNAL_FUNCTION || ex->func->common.scope) {
- return ex->called_scope;
+ return NULL;
}
}
ex = ex->prev_execute_data;
@@ -1083,11 +1053,11 @@ ZEND_API zend_class_entry *zend_get_called_scope(zend_execute_data *ex) /* {{{ *
ZEND_API zend_object *zend_get_this_object(zend_execute_data *ex) /* {{{ */
{
while (ex) {
- if (Z_OBJ(ex->This)) {
+ if (Z_TYPE(ex->This) == IS_OBJECT) {
return Z_OBJ(ex->This);
} else if (ex->func) {
if (ex->func->type != ZEND_INTERNAL_FUNCTION || ex->func->common.scope) {
- return Z_OBJ(ex->This);
+ return NULL;
}
}
ex = ex->prev_execute_data;
@@ -1183,8 +1153,63 @@ ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name,
}
/* }}} */
-ZEND_API void zend_timeout(int dummy) /* {{{ */
+static void zend_set_timeout_ex(zend_long seconds, int reset_signals);
+
+ZEND_API ZEND_NORETURN void zend_timeout(int dummy) /* {{{ */
{
+#if defined(PHP_WIN32)
+# ifndef ZTS
+ /* No action is needed if we're timed out because zero seconds are
+ just ignored. Also, the hard timeout needs to be respected. If the
+ timer is not restarted properly, it could hang in the shutdown
+ function. */
+ if (EG(hard_timeout) > 0) {
+ EG(timed_out) = 0;
+ zend_set_timeout_ex(EG(hard_timeout), 1);
+ /* XXX Abused, introduce an additional flag if the value needs to be kept. */
+ EG(hard_timeout) = 0;
+ }
+# endif
+#else
+ EG(timed_out) = 0;
+ zend_set_timeout_ex(0, 1);
+#endif
+
+ zend_error_noreturn(E_ERROR, "Maximum execution time of %pd second%s exceeded", EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
+}
+/* }}} */
+
+#ifndef ZEND_WIN32
+static void zend_timeout_handler(int dummy) /* {{{ */
+{
+#ifndef ZTS
+ if (EG(timed_out)) {
+ /* Die on hard timeout */
+ const char *error_filename = NULL;
+ uint error_lineno = 0;
+ char *log_buffer = NULL;
+
+ if (zend_is_compiling()) {
+ error_filename = ZSTR_VAL(zend_get_compiled_filename());
+ error_lineno = zend_get_compiled_lineno();
+ } else if (zend_is_executing()) {
+ error_filename = zend_get_executed_filename();
+ if (error_filename[0] == '[') { /* [no active file] */
+ error_filename = NULL;
+ error_lineno = 0;
+ } else {
+ error_lineno = zend_get_executed_lineno();
+ }
+ }
+ if (!error_filename) {
+ error_filename = "Unknown";
+ }
+
+ zend_spprintf(&log_buffer, 0, "\nFatal error: Maximum execution time of %pd+%pd seconds exceeded (terminated) in %s on line %d\n", EG(timeout_seconds), EG(hard_timeout), error_filename, error_lineno);
+ write(2, log_buffer, strlen(log_buffer));
+ _exit(1);
+ }
+#endif
if (zend_on_timeout) {
#ifdef ZEND_SIGNALS
@@ -1199,9 +1224,17 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */
zend_on_timeout(EG(timeout_seconds));
}
- zend_error_noreturn(E_ERROR, "Maximum execution time of %pd second%s exceeded", EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
+ EG(timed_out) = 1;
+
+#ifndef ZTS
+ if (EG(hard_timeout) > 0) {
+ /* Set hard timeout */
+ zend_set_timeout_ex(EG(hard_timeout), 1);
+ }
+#endif
}
/* }}} */
+#endif
#ifdef ZEND_WIN32
VOID CALLBACK tq_timer_cb(PVOID arg, BOOLEAN timed_out)
@@ -1224,11 +1257,9 @@ VOID CALLBACK tq_timer_cb(PVOID arg, BOOLEAN timed_out)
#define SIGPROF 27
#endif
-void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
+static void zend_set_timeout_ex(zend_long seconds, int reset_signals) /* {{{ */
{
- EG(timeout_seconds) = seconds;
-
#ifdef ZEND_WIN32
if(!seconds) {
return;
@@ -1239,7 +1270,6 @@ void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
delete and recreate. */
if (NULL != tq_timer) {
if (!DeleteTimerQueueTimer(NULL, tq_timer, NULL)) {
- EG(timed_out) = 0;
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not delete queued timer");
return;
@@ -1249,12 +1279,10 @@ void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
/* XXX passing NULL means the default timer queue provided by the system is used */
if (!CreateTimerQueueTimer(&tq_timer, NULL, (WAITORTIMERCALLBACK)tq_timer_cb, (VOID*)&EG(timed_out), seconds*1000, 0, WT_EXECUTEONLYONCE)) {
- EG(timed_out) = 0;
tq_timer = NULL;
zend_error_noreturn(E_ERROR, "Could not queue new timer");
return;
}
- EG(timed_out) = 0;
#else
# ifdef HAVE_SETITIMER
{
@@ -1277,15 +1305,23 @@ void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
if (reset_signals) {
# ifdef ZEND_SIGNALS
- zend_signal(signo, zend_timeout);
+ zend_signal(signo, zend_timeout_handler);
# else
sigset_t sigset;
-
- signal(signo, zend_timeout);
+# ifdef HAVE_SIGACTION
+ struct sigaction act;
+
+ act.sa_handler = zend_timeout_handler;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = SA_RESETHAND | SA_NODEFER;
+ sigaction(signo, &act, NULL);
+# else
+ signal(signo, zend_timeout_handler);
+# endif /* HAVE_SIGACTION */
sigemptyset(&sigset);
sigaddset(&sigset, signo);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
-# endif
+# endif /* ZEND_SIGNALS */
}
}
# endif /* HAVE_SETITIMER */
@@ -1293,6 +1329,15 @@ void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
}
/* }}} */
+void zend_set_timeout(zend_long seconds, int reset_signals) /* {{{ */
+{
+
+ EG(timeout_seconds) = seconds;
+ zend_set_timeout_ex(seconds, reset_signals);
+ EG(timed_out) = 0;
+}
+/* }}} */
+
void zend_unset_timeout(void) /* {{{ */
{
#ifdef ZEND_WIN32
@@ -1320,35 +1365,38 @@ void zend_unset_timeout(void) /* {{{ */
#endif
}
# endif
+ EG(timed_out) = 0;
#endif
}
/* }}} */
zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type) /* {{{ */
{
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
int fetch_sub_type = fetch_type & ZEND_FETCH_CLASS_MASK;
check_fetch_type:
switch (fetch_sub_type) {
case ZEND_FETCH_CLASS_SELF:
- if (UNEXPECTED(!EG(scope))) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Cannot access self:: when no class scope is active");
+ scope = zend_get_executed_scope();
+ if (UNEXPECTED(!scope)) {
+ zend_throw_or_error(fetch_type, NULL, "Cannot access self:: when no class scope is active");
}
- return EG(scope);
+ return scope;
case ZEND_FETCH_CLASS_PARENT:
- if (UNEXPECTED(!EG(scope))) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Cannot access parent:: when no class scope is active");
+ scope = zend_get_executed_scope();
+ if (UNEXPECTED(!scope)) {
+ zend_throw_or_error(fetch_type, NULL, "Cannot access parent:: when no class scope is active");
return NULL;
}
- if (UNEXPECTED(!EG(scope)->parent)) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Cannot access parent:: when current class scope has no parent");
+ if (UNEXPECTED(!scope->parent)) {
+ zend_throw_or_error(fetch_type, NULL, "Cannot access parent:: when current class scope has no parent");
}
- return EG(scope)->parent;
+ return scope->parent;
case ZEND_FETCH_CLASS_STATIC:
ce = zend_get_called_scope(EG(current_execute_data));
if (UNEXPECTED(!ce)) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Cannot access static:: when no class scope is active");
+ zend_throw_or_error(fetch_type, NULL, "Cannot access static:: when no class scope is active");
return NULL;
}
return ce;
@@ -1366,11 +1414,11 @@ check_fetch_type:
} else if ((ce = zend_lookup_class_ex(class_name, NULL, 1)) == NULL) {
if (!(fetch_type & ZEND_FETCH_CLASS_SILENT) && !EG(exception)) {
if (fetch_sub_type == ZEND_FETCH_CLASS_INTERFACE) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Interface '%s' not found", ZSTR_VAL(class_name));
+ zend_throw_or_error(fetch_type, NULL, "Interface '%s' not found", ZSTR_VAL(class_name));
} else if (fetch_sub_type == ZEND_FETCH_CLASS_TRAIT) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Trait '%s' not found", ZSTR_VAL(class_name));
+ zend_throw_or_error(fetch_type, NULL, "Trait '%s' not found", ZSTR_VAL(class_name));
} else {
- zend_throw_or_error(fetch_type, zend_ce_error, "Class '%s' not found", ZSTR_VAL(class_name));
+ zend_throw_or_error(fetch_type, NULL, "Class '%s' not found", ZSTR_VAL(class_name));
}
}
return NULL;
@@ -1388,11 +1436,11 @@ zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, const zval *
} else if ((ce = zend_lookup_class_ex(class_name, key, 1)) == NULL) {
if ((fetch_type & ZEND_FETCH_CLASS_SILENT) == 0 && !EG(exception)) {
if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_INTERFACE) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Interface '%s' not found", ZSTR_VAL(class_name));
+ zend_throw_or_error(fetch_type, NULL, "Interface '%s' not found", ZSTR_VAL(class_name));
} else if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_TRAIT) {
- zend_throw_or_error(fetch_type, zend_ce_error, "Trait '%s' not found", ZSTR_VAL(class_name));
+ zend_throw_or_error(fetch_type, NULL, "Trait '%s' not found", ZSTR_VAL(class_name));
} else {
- zend_throw_or_error(fetch_type, zend_ce_error, "Class '%s' not found", ZSTR_VAL(class_name));
+ zend_throw_or_error(fetch_type, NULL, "Class '%s' not found", ZSTR_VAL(class_name));
}
}
return NULL;
@@ -1479,10 +1527,11 @@ ZEND_API zend_array *zend_rebuild_symbol_table(void) /* {{{ */
if (!ex) {
return NULL;
}
- if (ex->symbol_table) {
+ if (ZEND_CALL_INFO(ex) & ZEND_CALL_HAS_SYMBOL_TABLE) {
return ex->symbol_table;
}
+ ZEND_ADD_CALL_FLAG(ex, ZEND_CALL_HAS_SYMBOL_TABLE);
if (EG(symtable_cache_ptr) >= EG(symtable_cache)) {
/*printf("Cache hit! Reusing %x\n", symtable_cache[symtable_cache_ptr]);*/
symbol_table = ex->symbol_table = *(EG(symtable_cache_ptr)--);
@@ -1583,7 +1632,7 @@ ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force) /* {{
}
if (execute_data) {
- if (!execute_data->symbol_table) {
+ if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) {
zend_ulong h = zend_string_hash_val(name);
zend_op_array *op_array = &execute_data->func->op_array;
@@ -1625,7 +1674,7 @@ ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, i
}
if (execute_data) {
- if (!execute_data->symbol_table) {
+ if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) {
zend_ulong h = zend_hash_func(name, len);
zend_op_array *op_array = &execute_data->func->op_array;
if (EXPECTED(op_array->last_var)) {
@@ -1658,6 +1707,20 @@ ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, i
}
/* }}} */
+ZEND_API int zend_forbid_dynamic_call(const char *func_name) /* {{{ */
+{
+ zend_execute_data *ex = EG(current_execute_data);
+ ZEND_ASSERT(ex != NULL && ex->func != NULL);
+
+ if (ZEND_CALL_INFO(ex) & ZEND_CALL_DYNAMIC) {
+ zend_error(E_WARNING, "Cannot call %s dynamically", func_name);
+ return FAILURE;
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c
index 65d215d5eb..2cf68293ec 100644
--- a/Zend/zend_extensions.c
+++ b/Zend/zend_extensions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,6 +22,7 @@
#include "zend_extensions.h"
ZEND_API zend_llist zend_extensions;
+ZEND_API uint32_t zend_extension_flags = 0;
static int last_resource_number;
int zend_load_extension(const char *path)
@@ -35,12 +36,10 @@ int zend_load_extension(const char *path)
if (!handle) {
#ifndef ZEND_WIN32
fprintf(stderr, "Failed loading %s: %s\n", path, DL_ERROR());
-/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
- fflush(stderr);
-#endif
#else
fprintf(stderr, "Failed loading %s\n", path);
+ /* See http://support.microsoft.com/kb/190351 */
+ fflush(stderr);
#endif
return FAILURE;
}
@@ -56,7 +55,7 @@ int zend_load_extension(const char *path)
if (!extension_version_info || !new_extension) {
fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
DL_UNLOAD(handle);
@@ -73,7 +72,7 @@ int zend_load_extension(const char *path)
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
DL_UNLOAD(handle);
@@ -89,7 +88,7 @@ int zend_load_extension(const char *path)
new_extension->URL,
new_extension->name);
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
DL_UNLOAD(handle);
@@ -100,7 +99,7 @@ int zend_load_extension(const char *path)
fprintf(stderr, "Cannot load %s - it was built with configuration %s, whereas running engine is %s\n",
new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID);
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
DL_UNLOAD(handle);
@@ -108,6 +107,14 @@ int zend_load_extension(const char *path)
} else if (zend_get_extension(new_extension->name)) {
fprintf(stderr, "Cannot load %s - it was already loaded\n", new_extension->name);
/* See http://support.microsoft.com/kb/190351 */
+#ifdef ZEND_WIN32
+ fflush(stderr);
+#endif
+ DL_UNLOAD(handle);
+ return FAILURE;
+ } else if (zend_get_extension(new_extension->name)) {
+ fprintf(stderr, "Cannot load %s - extension already loaded\n", new_extension->name);
+/* See http://support.microsoft.com/kb/190351 */
#ifdef PHP_WIN32
fflush(stderr);
#endif
@@ -119,7 +126,7 @@ int zend_load_extension(const char *path)
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
/* See http://support.microsoft.com/kb/190351 */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
fflush(stderr);
#endif
return FAILURE;
@@ -139,6 +146,21 @@ int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
zend_llist_add_element(&zend_extensions, &extension);
+ if (extension.op_array_ctor) {
+ zend_extension_flags |= ZEND_EXTENSIONS_HAVE_OP_ARRAY_CTOR;
+ }
+ if (extension.op_array_dtor) {
+ zend_extension_flags |= ZEND_EXTENSIONS_HAVE_OP_ARRAY_DTOR;
+ }
+ if (extension.op_array_handler) {
+ zend_extension_flags |= ZEND_EXTENSIONS_HAVE_OP_ARRAY_HANDLER;
+ }
+ if (extension.op_array_persist_calc) {
+ zend_extension_flags |= ZEND_EXTENSIONS_HAVE_OP_ARRAY_PERSIST_CALC;
+ }
+ if (extension.op_array_persist) {
+ zend_extension_flags |= ZEND_EXTENSIONS_HAVE_OP_ARRAY_PERSIST;
+ }
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
#endif
@@ -247,6 +269,58 @@ ZEND_API zend_extension *zend_get_extension(const char *extension_name)
return NULL;
}
+typedef struct _zend_extension_persist_data {
+ zend_op_array *op_array;
+ size_t size;
+ char *mem;
+} zend_extension_persist_data;
+
+static void zend_extension_op_array_persist_calc_handler(zend_extension *extension, zend_extension_persist_data *data)
+{
+ if (extension->op_array_persist_calc) {
+ data->size += extension->op_array_persist_calc(data->op_array);
+ }
+}
+
+static void zend_extension_op_array_persist_handler(zend_extension *extension, zend_extension_persist_data *data)
+{
+ if (extension->op_array_persist) {
+ size_t size = extension->op_array_persist(data->op_array, data->mem);
+ if (size) {
+ data->mem = (void*)((char*)data->mem + size);
+ data->size += size;
+ }
+ }
+}
+
+ZEND_API size_t zend_extensions_op_array_persist_calc(zend_op_array *op_array)
+{
+ if (zend_extension_flags & ZEND_EXTENSIONS_HAVE_OP_ARRAY_PERSIST_CALC) {
+ zend_extension_persist_data data;
+
+ data.op_array = op_array;
+ data.size = 0;
+ data.mem = NULL;
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_persist_calc_handler, &data);
+ return data.size;
+ }
+ return 0;
+}
+
+ZEND_API size_t zend_extensions_op_array_persist(zend_op_array *op_array, void *mem)
+{
+ if (zend_extension_flags & ZEND_EXTENSIONS_HAVE_OP_ARRAY_PERSIST) {
+ zend_extension_persist_data data;
+
+ data.op_array = op_array;
+ data.size = 0;
+ data.mem = mem;
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_persist_handler, &data);
+ return data.size;
+ }
+ return 0;
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index 8ef773badf..862c18ad75 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,10 +25,28 @@
#include "zend_compile.h"
#include "zend_build.h"
+/*
+The constants below are derived from ext/opcache/ZendAccelerator.h
+
+You can use the following macro to check the extension API version for compatibilities:
+
+#define ZEND_EXTENSION_API_NO_5_0_X 220040412
+#define ZEND_EXTENSION_API_NO_5_1_X 220051025
+#define ZEND_EXTENSION_API_NO_5_2_X 220060519
+#define ZEND_EXTENSION_API_NO_5_3_X 220090626
+#define ZEND_EXTENSION_API_NO_5_4_X 220100525
+#define ZEND_EXTENSION_API_NO_5_5_X 220121212
+#define ZEND_EXTENSION_API_NO_5_6_X 220131226
+#define ZEND_EXTENSION_API_NO_7_0_X 320151012
+
+#if ZEND_EXTENSION_API_NO < ZEND_EXTENSION_API_NO_5_5_X
+ // do something for php versions lower than 5.5.x
+#endif
+*/
+
/* The first number is the engine version and the rest is the date (YYYYMMDD).
- * This way engine 2/3 API no. is always greater than engine 1 API no..
- */
-#define ZEND_EXTENSION_API_NO 320140815
+ * This way engine 2/3 API no. is always greater than engine 1 API no.. */
+#define ZEND_EXTENSION_API_NO 320160303
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -49,12 +67,14 @@ typedef void (*message_handler_func_t)(int message, void *arg);
typedef void (*op_array_handler_func_t)(zend_op_array *op_array);
-typedef void (*statement_handler_func_t)(zend_op_array *op_array);
-typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array);
-typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array);
+typedef void (*statement_handler_func_t)(zend_execute_data *frame);
+typedef void (*fcall_begin_handler_func_t)(zend_execute_data *frame);
+typedef void (*fcall_end_handler_func_t)(zend_execute_data *frame);
typedef void (*op_array_ctor_func_t)(zend_op_array *op_array);
typedef void (*op_array_dtor_func_t)(zend_op_array *op_array);
+typedef size_t (*op_array_persist_calc_func_t)(zend_op_array *op_array);
+typedef size_t (*op_array_persist_func_t)(zend_op_array *op_array, void *mem);
struct _zend_extension {
char *name;
@@ -81,8 +101,8 @@ struct _zend_extension {
int (*api_no_check)(int api_no);
int (*build_id_check)(const char* build_id);
- void *reserved3;
- void *reserved4;
+ op_array_persist_calc_func_t op_array_persist_calc;
+ op_array_persist_func_t op_array_persist;
void *reserved5;
void *reserved6;
void *reserved7;
@@ -109,6 +129,13 @@ END_EXTERN_C()
ZEND_API extern zend_llist zend_extensions;
+ZEND_API extern uint32_t zend_extension_flags;
+
+#define ZEND_EXTENSIONS_HAVE_OP_ARRAY_CTOR (1<<0)
+#define ZEND_EXTENSIONS_HAVE_OP_ARRAY_DTOR (1<<1)
+#define ZEND_EXTENSIONS_HAVE_OP_ARRAY_HANDLER (1<<2)
+#define ZEND_EXTENSIONS_HAVE_OP_ARRAY_PERSIST_CALC (1<<3)
+#define ZEND_EXTENSIONS_HAVE_OP_ARRAY_PERSIST (1<<4)
void zend_extension_dtor(zend_extension *extension);
ZEND_API void zend_append_version_info(const zend_extension *extension);
@@ -120,6 +147,8 @@ BEGIN_EXTERN_C()
ZEND_API int zend_load_extension(const char *path);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
ZEND_API zend_extension *zend_get_extension(const char *extension_name);
+ZEND_API size_t zend_extensions_op_array_persist_calc(zend_op_array *op_array);
+ZEND_API size_t zend_extensions_op_array_persist(zend_op_array *op_array, void *mem);
END_EXTERN_C()
#endif /* ZEND_EXTENSIONS_H */
diff --git a/Zend/zend_float.c b/Zend/zend_float.c
index d7bfb32e85..db3e7785c7 100644
--- a/Zend/zend_float.c
+++ b/Zend/zend_float.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_float.h b/Zend/zend_float.h
index 2ba3eb7fe7..941e54d9db 100644
--- a/Zend/zend_float.h
+++ b/Zend/zend_float.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index e223a49906..87f4fb87d6 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -242,6 +242,13 @@ ZEND_API void ZEND_FASTCALL gc_possible_root(zend_refcounted *ref)
GC_REFCOUNT(ref)++;
gc_collect_cycles();
GC_REFCOUNT(ref)--;
+ if (UNEXPECTED(GC_REFCOUNT(ref)) == 0) {
+ zval_dtor_func(ref);
+ return;
+ }
+ if (UNEXPECTED(GC_INFO(ref))) {
+ return;
+ }
newRoot = GC_G(unused);
if (!newRoot) {
#if ZEND_GC_DEBUG
diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h
index 1e458292ae..eb8e500b03 100644
--- a/Zend/zend_gc.h
+++ b/Zend/zend_gc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
index ee7cfa6a67..8460b9da14 100644
--- a/Zend/zend_generators.c
+++ b/Zend/zend_generators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,81 +31,116 @@ static zend_object_handlers zend_generator_handlers;
static zend_object *zend_generator_create(zend_class_entry *class_type);
-static void zend_generator_cleanup_unfinished_execution(zend_generator *generator) /* {{{ */
+static void zend_restore_call_stack(zend_generator *generator) /* {{{ */
{
- zend_execute_data *execute_data = generator->execute_data;
+ zend_execute_data *call, *new_call, *prev_call = NULL;
+
+ call = generator->frozen_call_stack;
+ do {
+ new_call = zend_vm_stack_push_call_frame(
+ (ZEND_CALL_INFO(call) & ~ZEND_CALL_ALLOCATED),
+ call->func,
+ ZEND_CALL_NUM_ARGS(call),
+ (Z_TYPE(call->This) == IS_UNDEF) ?
+ (zend_class_entry*)Z_OBJ(call->This) : NULL,
+ (Z_TYPE(call->This) != IS_UNDEF) ?
+ Z_OBJ(call->This) : NULL);
+ memcpy(((zval*)new_call) + ZEND_CALL_FRAME_SLOT, ((zval*)call) + ZEND_CALL_FRAME_SLOT, ZEND_CALL_NUM_ARGS(call) * sizeof(zval));
+ new_call->prev_execute_data = prev_call;
+ prev_call = new_call;
+
+ call = call->prev_execute_data;
+ } while (call);
+ generator->execute_data->call = prev_call;
+ efree(generator->frozen_call_stack);
+ generator->frozen_call_stack = NULL;
+}
+/* }}} */
- if (generator->send_target) {
- Z_TRY_DELREF_P(generator->send_target);
- generator->send_target = NULL;
- }
+static zend_execute_data* zend_freeze_call_stack(zend_execute_data *execute_data) /* {{{ */
+{
+ size_t used_stack;
+ zend_execute_data *call, *new_call, *prev_call = NULL;
+ zval *stack;
+
+ /* calculate required stack size */
+ used_stack = 0;
+ call = EX(call);
+ do {
+ used_stack += ZEND_CALL_FRAME_SLOT + ZEND_CALL_NUM_ARGS(call);
+ call = call->prev_execute_data;
+ } while (call);
+
+ stack = emalloc(used_stack * sizeof(zval));
+
+ /* save stack, linking frames in reverse order */
+ call = EX(call);
+ do {
+ size_t frame_size = ZEND_CALL_FRAME_SLOT + ZEND_CALL_NUM_ARGS(call);
+
+ new_call = (zend_execute_data*)(stack + used_stack - frame_size);
+ memcpy(new_call, call, frame_size * sizeof(zval));
+ used_stack -= frame_size;
+ new_call->prev_execute_data = prev_call;
+ prev_call = new_call;
+
+ new_call = call->prev_execute_data;
+ zend_vm_stack_free_call_frame(call);
+ call = new_call;
+ } while (call);
+
+ execute_data->call = NULL;
+ ZEND_ASSERT(prev_call == (zend_execute_data*)stack);
+
+ return prev_call;
+}
+/* }}} */
+
+static void zend_generator_cleanup_unfinished_execution(
+ zend_generator *generator, uint32_t catch_op_num) /* {{{ */
+{
+ zend_execute_data *execute_data = generator->execute_data;
if (execute_data->opline != execute_data->func->op_array.opcodes) {
/* -1 required because we want the last run opcode, not the next to-be-run one. */
uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1;
- /* There may be calls to zend_vm_stack_free_call_frame(), which modifies the VM stack
- * globals, so need to load/restore those. */
- zend_vm_stack original_stack = EG(vm_stack);
- original_stack->top = EG(vm_stack_top);
- EG(vm_stack_top) = generator->stack->top;
- EG(vm_stack_end) = generator->stack->end;
- EG(vm_stack) = generator->stack;
-
+ if (UNEXPECTED(generator->frozen_call_stack)) {
+ zend_restore_call_stack(generator);
+ }
zend_cleanup_unfinished_execution(execute_data, op_num, 0);
-
- generator->stack = EG(vm_stack);
- generator->stack->top = EG(vm_stack_top);
- EG(vm_stack_top) = original_stack->top;
- EG(vm_stack_end) = original_stack->end;
- EG(vm_stack) = original_stack;
}
}
/* }}} */
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution) /* {{{ */
{
- if (Z_TYPE(generator->value) != IS_UNDEF) {
- zval_ptr_dtor(&generator->value);
- ZVAL_UNDEF(&generator->value);
- }
-
- if (Z_TYPE(generator->key) != IS_UNDEF) {
- zval_ptr_dtor(&generator->key);
- ZVAL_UNDEF(&generator->key);
- }
-
- if (Z_TYPE(generator->values) != IS_UNDEF) {
- zval_ptr_dtor(&generator->values);
- ZVAL_UNDEF(&generator->values);
- }
-
- if (generator->execute_data) {
+ if (EXPECTED(generator->execute_data)) {
zend_execute_data *execute_data = generator->execute_data;
- if (execute_data->symbol_table) {
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
zend_clean_and_cache_symbol_table(execute_data->symbol_table);
}
/* always free the CV's, in the symtable are only not-free'd IS_INDIRECT's */
zend_free_compiled_variables(execute_data);
- if (Z_OBJ(execute_data->This)) {
+ if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
OBJ_RELEASE(Z_OBJ(execute_data->This));
}
- /* A fatal error / die occurred during the generator execution. Trying to clean
- * up the stack may not be safe in this case. */
- if (CG(unclean_shutdown)) {
+ /* A fatal error / die occurred during the generator execution.
+ * Trying to clean up the stack may not be safe in this case. */
+ if (UNEXPECTED(CG(unclean_shutdown))) {
generator->execute_data = NULL;
return;
}
zend_vm_stack_free_extra_args(generator->execute_data);
- /* Some cleanups are only necessary if the generator was closued
+ /* Some cleanups are only necessary if the generator was closed
* before it could finish execution (reach a return statement). */
- if (!finished_execution) {
- zend_generator_cleanup_unfinished_execution(generator);
+ if (UNEXPECTED(!finished_execution)) {
+ zend_generator_cleanup_unfinished_execution(generator, 0);
}
/* Free closure object */
@@ -113,12 +148,20 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
OBJ_RELEASE((zend_object *) EX(func)->common.prototype);
}
- efree(generator->stack);
+ /* Free GC buffer. GC for closed generators doesn't need an allocated buffer */
+ if (generator->gc_buffer) {
+ efree(generator->gc_buffer);
+ generator->gc_buffer = NULL;
+ }
+
+ efree(generator->execute_data);
generator->execute_data = NULL;
}
}
/* }}} */
+static zend_generator *zend_generator_get_child(zend_generator_node *node, zend_generator *leaf);
+
static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
{
zend_generator *generator = (zend_generator*) object;
@@ -126,7 +169,23 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
uint32_t op_num, finally_op_num, finally_op_end;
int i;
- if (!ex || !(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
+ /* leave yield from mode to properly allow finally execution */
+ if (UNEXPECTED(Z_TYPE(generator->values) != IS_UNDEF)) {
+ zval_ptr_dtor(&generator->values);
+ ZVAL_UNDEF(&generator->values);
+ }
+
+ if (EXPECTED(generator->node.children == 0)) {
+ zend_generator *root = generator->node.ptr.root, *next;
+ while (UNEXPECTED(root != generator)) {
+ next = zend_generator_get_child(&root->node, generator);
+ OBJ_RELEASE(&root->std);
+ root = next;
+ }
+ generator->node.parent = NULL;
+ }
+
+ if (EXPECTED(!ex) || EXPECTED(!(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK))) {
return;
}
@@ -153,8 +212,11 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
/* If a finally block was found we jump directly to it and
* resume the generator. */
if (finally_op_num) {
- zval *fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
+ zval *fast_call;
+ zend_generator_cleanup_unfinished_execution(generator, finally_op_num);
+
+ fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
Z_OBJ_P(fast_call) = EG(exception);
EG(exception) = NULL;
fast_call->u2.lineno = (uint32_t)-1;
@@ -166,19 +228,21 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
}
/* }}} */
-static zend_generator *zend_generator_get_child(zend_generator_node *node, zend_generator *leaf);
-
static void zend_generator_free_storage(zend_object *object) /* {{{ */
{
zend_generator *generator = (zend_generator*) object;
zend_generator_close(generator, 0);
- if (!Z_ISUNDEF(generator->retval)) {
+ /* we can't immediately free them in zend_generator_close() else yield from won't be able to fetch it */
+ zval_ptr_dtor(&generator->value);
+ zval_ptr_dtor(&generator->key);
+
+ if (EXPECTED(!Z_ISUNDEF(generator->retval))) {
zval_ptr_dtor(&generator->retval);
}
- if (generator->node.children > 4) {
+ if (UNEXPECTED(generator->node.children > 4)) {
zend_hash_destroy(&generator->node.child.ht);
}
@@ -187,15 +251,106 @@ static void zend_generator_free_storage(zend_object *object) /* {{{ */
if (generator->iterator) {
zend_iterator_dtor(generator->iterator);
}
+}
+/* }}} */
+
+static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */
+{
+ uint32_t size = 4; /* value, key, retval, values */
+ if (generator->execute_data) {
+ zend_execute_data *execute_data = generator->execute_data;
+ zend_op_array *op_array = &EX(func)->op_array;
+
+ /* Compiled variables */
+ if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) {
+ size += op_array->last_var;
+ }
+ /* Extra args */
+ if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
+ size += EX_NUM_ARGS() - op_array->num_args;
+ }
+ size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
+ size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
+
+ /* Yield from root references */
+ if (generator->node.children == 0) {
+ zend_generator *child = generator, *root = generator->node.ptr.root;
+ while (root != child) {
+ child = child->node.parent;
+ size++;
+ }
+ }
+ }
+ return size;
+}
+/* }}} */
+
+static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {{{ */
+{
+ zend_generator *generator = (zend_generator*) Z_OBJ_P(object);
+ zend_execute_data *execute_data = generator->execute_data;
+ zend_op_array *op_array;
+ zval *gc_buffer;
+ uint32_t gc_buffer_size;
+
+ if (!execute_data) {
+ /* If the generator has been closed, it can only hold on to three values: The value, key
+ * and retval. These three zvals are stored sequentially starting at &generator->value. */
+ *table = &generator->value;
+ *n = 3;
+ return NULL;
+ }
+
+ op_array = &EX(func)->op_array;
+ gc_buffer_size = calc_gc_buffer_size(generator);
+ if (generator->gc_buffer_size < gc_buffer_size) {
+ generator->gc_buffer = safe_erealloc(generator->gc_buffer, sizeof(zval), gc_buffer_size, 0);
+ generator->gc_buffer_size = gc_buffer_size;
+ }
+
+ *n = gc_buffer_size;
+ *table = gc_buffer = generator->gc_buffer;
+
+ ZVAL_COPY_VALUE(gc_buffer++, &generator->value);
+ ZVAL_COPY_VALUE(gc_buffer++, &generator->key);
+ ZVAL_COPY_VALUE(gc_buffer++, &generator->retval);
+ ZVAL_COPY_VALUE(gc_buffer++, &generator->values);
+
+ if (!(EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE)) {
+ uint32_t i, num_cvs = EX(func)->op_array.last_var;
+ for (i = 0; i < num_cvs; i++) {
+ ZVAL_COPY_VALUE(gc_buffer++, EX_VAR_NUM(i));
+ }
+ }
+
+ if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
+ zval *zv = EX_VAR_NUM(op_array->last_var + op_array->T);
+ zval *end = zv + (EX_NUM_ARGS() - op_array->num_args);
+ while (zv != end) {
+ ZVAL_COPY_VALUE(gc_buffer++, zv++);
+ }
+ }
+
+ if (Z_TYPE(execute_data->This) == IS_OBJECT) {
+ ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
+ }
+ if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {
+ ZVAL_OBJ(gc_buffer++, (zend_object *) EX(func)->common.prototype);
+ }
if (generator->node.children == 0) {
- zend_generator *root = generator->node.ptr.root, *next;
- while (root != generator) {
- next = zend_generator_get_child(&root->node, generator);
- OBJ_RELEASE(&root->std);
- root = next;
+ zend_generator *child = generator, *root = generator->node.ptr.root;
+ while (root != child) {
+ child = child->node.parent;
+ ZVAL_OBJ(gc_buffer++, &child->std);
}
}
+
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
+ return execute_data->symbol_table;
+ } else {
+ return NULL;
+ }
}
/* }}} */
@@ -224,48 +379,9 @@ static zend_object *zend_generator_create(zend_class_entry *class_type) /* {{{ *
}
/* }}} */
-/* Requires globals EG(scope), EG(This) and EG(current_execute_data). */
-ZEND_API void zend_generator_create_zval(zend_execute_data *call, zend_op_array *op_array, zval *return_value) /* {{{ */
-{
- zend_generator *generator;
- zend_execute_data *current_execute_data;
- zend_execute_data *execute_data;
- zend_vm_stack current_stack = EG(vm_stack);
-
- current_stack->top = EG(vm_stack_top);
-
- /* Create new execution context. We have to back up and restore
- * EG(current_execute_data) here. */
- current_execute_data = EG(current_execute_data);
- execute_data = zend_create_generator_execute_data(call, op_array, return_value);
- EG(current_execute_data) = current_execute_data;
-
- object_init_ex(return_value, zend_ce_generator);
-
- if (Z_OBJ(call->This)) {
- Z_ADDREF(call->This);
- }
-
- /* Save execution context in generator object. */
- generator = (zend_generator *) Z_OBJ_P(return_value);
- generator->execute_data = execute_data;
- generator->stack = EG(vm_stack);
- generator->stack->top = EG(vm_stack_top);
- EG(vm_stack_top) = current_stack->top;
- EG(vm_stack_end) = current_stack->end;
- EG(vm_stack) = current_stack;
-
- /* EX(return_value) keeps pointer to zend_object (not a real zval) */
- execute_data->return_value = (zval*)generator;
-
- memset(&generator->execute_fake, 0, sizeof(zend_execute_data));
- Z_OBJ(generator->execute_fake.This) = (zend_object *) generator;
-}
-/* }}} */
-
-static zend_function *zend_generator_get_constructor(zend_object *object) /* {{{ */
+static ZEND_COLD zend_function *zend_generator_get_constructor(zend_object *object) /* {{{ */
{
- zend_throw_error(zend_ce_error, "The \"Generator\" class is reserved for internal use and cannot be manually instantiated");
+ zend_throw_error(NULL, "The \"Generator\" class is reserved for internal use and cannot be manually instantiated");
return NULL;
}
@@ -273,7 +389,7 @@ static zend_function *zend_generator_get_constructor(zend_object *object) /* {{{
ZEND_API zend_execute_data *zend_generator_check_placeholder_frame(zend_execute_data *ptr)
{
- if (!ptr->func && ptr->prev_execute_data && Z_OBJ(ptr->This)) {
+ if (!ptr->func && Z_TYPE(ptr->This) == IS_OBJECT) {
if (Z_OBJCE(ptr->This) == zend_ce_generator) {
zend_generator *generator = (zend_generator *) Z_OBJ(ptr->This);
zend_generator *root = (generator->node.children < 1 ? generator : generator->node.ptr.leaf)->node.ptr.root;
@@ -294,9 +410,16 @@ ZEND_API zend_execute_data *zend_generator_check_placeholder_frame(zend_execute_
static void zend_generator_throw_exception(zend_generator *generator, zval *exception)
{
+ zend_execute_data *original_execute_data = EG(current_execute_data);
+
+ /* if we don't stop an array/iterator yield from, the exception will only reach the generator after the values were all iterated over */
+ if (UNEXPECTED(Z_TYPE(generator->values) != IS_UNDEF)) {
+ zval_ptr_dtor(&generator->values);
+ ZVAL_UNDEF(&generator->values);
+ }
+
/* Throw the exception in the context of the generator. Decrementing the opline
* to pretend the exception happened during the YIELD opcode. */
- zend_execute_data *original_execute_data = EG(current_execute_data);
EG(current_execute_data) = generator->execute_data;
generator->execute_data->opline--;
if (exception) {
@@ -463,32 +586,18 @@ static void zend_generator_add_child(zend_generator *generator, zend_generator *
}
}
-void zend_generator_yield_from(zend_generator *this, zend_generator *from)
+void zend_generator_yield_from(zend_generator *generator, zend_generator *from)
{
- zend_generator_add_child(from, this);
+ zend_generator_add_child(from, generator);
- this->node.parent = from;
- zend_generator_get_current(this);
- --GC_REFCOUNT(from);
+ generator->node.parent = from;
+ zend_generator_get_current(generator);
+ --GC_REFCOUNT(&from->std);
}
-ZEND_API zend_generator *zend_generator_get_current(zend_generator *generator)
+ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator, zend_generator *leaf)
{
- zend_generator *leaf;
- zend_generator *root, *old_root;
-
- if (generator->node.parent == NULL) {
- /* we're not in yield from mode */
- return generator;
- }
-
- leaf = generator->node.children ? generator->node.ptr.leaf : generator;
- root = leaf->node.ptr.root;
-
- if (root->execute_data && root->node.parent == NULL) {
- /* generator still running */
- return root;
- }
+ zend_generator *old_root, *root = leaf->node.ptr.root;
/* generator at the root had stopped */
if (root != generator) {
@@ -510,7 +619,7 @@ ZEND_API zend_generator *zend_generator_get_current(zend_generator *generator)
if (EXPECTED(EG(exception) == NULL)) {
zend_op *yield_from = (zend_op *) root->execute_data->opline - 1;
- if (yield_from->opcode == ZEND_YIELD_FROM && !(yield_from->result_type & EXT_TYPE_UNUSED)) {
+ if (yield_from->opcode == ZEND_YIELD_FROM) {
if (Z_ISUNDEF(root->node.parent->retval)) {
/* Throw the exception in the context of the generator */
zend_execute_data *original_execute_data = EG(current_execute_data);
@@ -527,6 +636,8 @@ ZEND_API zend_generator *zend_generator_get_current(zend_generator *generator)
EG(current_execute_data) = original_execute_data;
} else {
+ zval_ptr_dtor(&root->value);
+ ZVAL_COPY(&root->value, &root->node.parent->value);
ZVAL_COPY(ZEND_CALL_VAR(root->execute_data, yield_from->result.var), &root->node.parent->retval);
}
}
@@ -587,7 +698,7 @@ static int zend_generator_get_next_delegated_value(zend_generator *generator) /*
if (iter->index++ > 0) {
iter->funcs->move_forward(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- goto failure;
+ goto exception;
}
}
@@ -597,7 +708,9 @@ static int zend_generator_get_next_delegated_value(zend_generator *generator) /*
}
value = iter->funcs->get_current_data(iter);
- if (UNEXPECTED(EG(exception) != NULL || !value)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ goto exception;
+ } else if (UNEXPECTED(!value)) {
goto failure;
}
@@ -609,7 +722,7 @@ static int zend_generator_get_next_delegated_value(zend_generator *generator) /*
iter->funcs->get_current_key(iter, &generator->key);
if (UNEXPECTED(EG(exception) != NULL)) {
ZVAL_UNDEF(&generator->key);
- goto failure;
+ goto exception;
}
} else {
ZVAL_LONG(&generator->key, iter->index);
@@ -617,6 +730,13 @@ static int zend_generator_get_next_delegated_value(zend_generator *generator) /*
}
return SUCCESS;
+exception: {
+ zend_execute_data *ex = EG(current_execute_data);
+ EG(current_execute_data) = generator->execute_data;
+ zend_throw_exception_internal(NULL);
+ EG(current_execute_data) = ex;
+ }
+
failure:
zval_ptr_dtor(&generator->values);
ZVAL_UNDEF(&generator->values);
@@ -629,7 +749,7 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
zend_generator *generator;
/* The generator is already closed, thus can't resume */
- if (!orig_generator->execute_data) {
+ if (UNEXPECTED(!orig_generator->execute_data)) {
return;
}
@@ -637,39 +757,32 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
try_again:
if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
- zend_throw_error(zend_ce_error, "Cannot resume an already running generator");
+ zend_throw_error(NULL, "Cannot resume an already running generator");
+ return;
+ }
+
+ if (UNEXPECTED((orig_generator->flags & ZEND_GENERATOR_DO_INIT) != 0 && !Z_ISUNDEF(generator->value))) {
+ /* We must not advance Generator if we yield from a Generator being currently run */
return;
}
- if (!Z_ISUNDEF(generator->values)) {
- if (zend_generator_get_next_delegated_value(generator) == SUCCESS) {
+ if (UNEXPECTED(!Z_ISUNDEF(generator->values))) {
+ if (EXPECTED(zend_generator_get_next_delegated_value(generator) == SUCCESS)) {
return;
}
/* If there are no more deletegated values, resume the generator
* after the "yield from" expression. */
}
- if ((orig_generator->flags & ZEND_GENERATOR_DO_INIT) && !Z_ISUNDEF(generator->value)) {
- /* We must not advance Generator if we yield from a Generator being currently run */
- return;
- }
-
/* Drop the AT_FIRST_YIELD flag */
orig_generator->flags &= ~ZEND_GENERATOR_AT_FIRST_YIELD;
{
/* Backup executor globals */
zend_execute_data *original_execute_data = EG(current_execute_data);
- zend_class_entry *original_scope = EG(scope);
- zend_vm_stack original_stack = EG(vm_stack);
- original_stack->top = EG(vm_stack_top);
/* Set executor globals */
EG(current_execute_data) = generator->execute_data;
- EG(scope) = generator->execute_data->func->common.scope;
- EG(vm_stack_top) = generator->stack->top;
- EG(vm_stack_end) = generator->stack->end;
- EG(vm_stack) = generator->stack;
/* We want the backtrace to look as if the generator function was
* called from whatever method we are current running (e.g. next()).
@@ -683,23 +796,25 @@ try_again:
orig_generator->execute_fake.prev_execute_data = original_execute_data;
}
+ if (UNEXPECTED(generator->frozen_call_stack)) {
+ /* Restore frozen call-stack */
+ zend_restore_call_stack(generator);
+ }
+
/* Resume execution */
generator->flags |= ZEND_GENERATOR_CURRENTLY_RUNNING;
zend_execute_ex(generator->execute_data);
generator->flags &= ~ZEND_GENERATOR_CURRENTLY_RUNNING;
- /* Unlink generator call_frame from the caller and backup vm_stack_top */
- if (generator->execute_data) {
- generator->stack = EG(vm_stack);
- generator->stack->top = EG(vm_stack_top);
+ generator->frozen_call_stack = NULL;
+ if (EXPECTED(generator->execute_data) &&
+ UNEXPECTED(generator->execute_data->call)) {
+ /* Frize call-stack */
+ generator->frozen_call_stack = zend_freeze_call_stack(generator->execute_data);
}
/* Restore executor globals */
EG(current_execute_data) = original_execute_data;
- EG(scope) = original_scope;
- EG(vm_stack_top) = original_stack->top;
- EG(vm_stack_end) = original_stack->end;
- EG(vm_stack) = original_stack;
/* If an exception was thrown in the generator we have to internally
* rethrow it in the parent scope.
@@ -717,7 +832,7 @@ try_again:
}
/* yield from was used, try another resume. */
- if ((generator != orig_generator && !Z_ISUNDEF(generator->retval)) || (generator->execute_data && (generator->execute_data->opline - 1)->opcode == ZEND_YIELD_FROM)) {
+ if (UNEXPECTED((generator != orig_generator && !Z_ISUNDEF(generator->retval)) || (generator->execute_data && (generator->execute_data->opline - 1)->opcode == ZEND_YIELD_FROM))) {
generator = zend_generator_get_current(orig_generator);
goto try_again;
}
@@ -725,9 +840,9 @@ try_again:
}
/* }}} */
-static void zend_generator_ensure_initialized(zend_generator *generator) /* {{{ */
+static inline void zend_generator_ensure_initialized(zend_generator *generator) /* {{{ */
{
- if (generator->execute_data && Z_TYPE(generator->value) == IS_UNDEF && generator->node.parent == NULL) {
+ if (UNEXPECTED(Z_TYPE(generator->value) == IS_UNDEF) && EXPECTED(generator->execute_data) && EXPECTED(generator->node.parent == NULL)) {
generator->flags |= ZEND_GENERATOR_DO_INIT;
zend_generator_resume(generator);
generator->flags &= ~ZEND_GENERATOR_DO_INIT;
@@ -736,7 +851,7 @@ static void zend_generator_ensure_initialized(zend_generator *generator) /* {{{
}
/* }}} */
-static void zend_generator_rewind(zend_generator *generator) /* {{{ */
+static inline void zend_generator_rewind(zend_generator *generator) /* {{{ */
{
zend_generator_ensure_initialized(generator);
@@ -778,7 +893,7 @@ ZEND_METHOD(Generator, valid)
zend_generator_get_current(generator);
- RETURN_BOOL(Z_TYPE(generator->value) != IS_UNDEF || generator->node.parent != NULL);
+ RETURN_BOOL(EXPECTED(generator->execute_data != NULL));
}
/* }}} */
@@ -797,7 +912,7 @@ ZEND_METHOD(Generator, current)
zend_generator_ensure_initialized(generator);
root = zend_generator_get_current(generator);
- if (Z_TYPE(root->value) != IS_UNDEF) {
+ if (EXPECTED(generator->execute_data != NULL && Z_TYPE(root->value) != IS_UNDEF)) {
zval *value = &root->value;
ZVAL_DEREF(value);
@@ -821,7 +936,7 @@ ZEND_METHOD(Generator, key)
zend_generator_ensure_initialized(generator);
root = zend_generator_get_current(generator);
- if (Z_TYPE(root->key) != IS_UNDEF) {
+ if (EXPECTED(generator->execute_data != NULL && Z_TYPE(root->key) != IS_UNDEF)) {
zval *key = &root->key;
ZVAL_DEREF(key);
@@ -855,30 +970,35 @@ ZEND_METHOD(Generator, send)
zval *value;
zend_generator *generator, *root;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
return;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_ZVAL(value)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
generator = (zend_generator *) Z_OBJ_P(getThis());
zend_generator_ensure_initialized(generator);
/* The generator is already closed, thus can't send anything */
- if (!generator->execute_data) {
+ if (UNEXPECTED(!generator->execute_data)) {
return;
}
root = zend_generator_get_current(generator);
/* Put sent value in the target VAR slot, if it is used */
if (root->send_target) {
- if (Z_REFCOUNTED_P(root->send_target)) Z_DELREF_P(root->send_target);
ZVAL_COPY(root->send_target, value);
}
zend_generator_resume(generator);
root = zend_generator_get_current(generator);
- if (Z_TYPE(root->value) != IS_UNDEF) {
+ if (EXPECTED(generator->execute_data)) {
zval *value = &root->value;
ZVAL_DEREF(value);
@@ -894,9 +1014,15 @@ ZEND_METHOD(Generator, throw)
zval *exception, exception_copy;
zend_generator *generator;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &exception) == FAILURE) {
return;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_ZVAL(exception)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
ZVAL_DUP(&exception_copy, exception);
@@ -912,7 +1038,7 @@ ZEND_METHOD(Generator, throw)
zend_generator_resume(generator);
root = zend_generator_get_current(generator);
- if (Z_TYPE(root->value) != IS_UNDEF) {
+ if (generator->execute_data) {
zval *value = &root->value;
ZVAL_DEREF(value);
@@ -939,7 +1065,7 @@ ZEND_METHOD(Generator, getReturn)
generator = (zend_generator *) Z_OBJ_P(getThis());
zend_generator_ensure_initialized(generator);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception))) {
return;
}
@@ -989,7 +1115,7 @@ static int zend_generator_iterator_valid(zend_object_iterator *iterator) /* {{{
zend_generator_get_current(generator);
- return Z_TYPE(generator->value) != IS_UNDEF || generator->node.parent != NULL ? SUCCESS : FAILURE;
+ return generator->execute_data ? SUCCESS : FAILURE;
}
/* }}} */
@@ -1013,7 +1139,7 @@ static void zend_generator_iterator_get_key(zend_object_iterator *iterator, zval
root = zend_generator_get_current(generator);
- if (Z_TYPE(root->key) != IS_UNDEF) {
+ if (EXPECTED(Z_TYPE(root->key) != IS_UNDEF)) {
zval *zv = &root->key;
ZVAL_DEREF(zv);
@@ -1048,7 +1174,8 @@ static zend_object_iterator_funcs zend_generator_iterator_functions = {
zend_generator_iterator_get_data,
zend_generator_iterator_get_key,
zend_generator_iterator_move_forward,
- zend_generator_iterator_rewind
+ zend_generator_iterator_rewind,
+ NULL
};
zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */
@@ -1061,7 +1188,7 @@ zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *ob
return NULL;
}
- if (by_ref && !(generator->execute_data->func->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
+ if (UNEXPECTED(by_ref) && !(generator->execute_data->func->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
zend_throw_exception(NULL, "You can only iterate a generator by-reference if it declared that it yields by-reference", 0);
return NULL;
}
@@ -1120,6 +1247,7 @@ void zend_register_generator_ce(void) /* {{{ */
memcpy(&zend_generator_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
zend_generator_handlers.free_obj = zend_generator_free_storage;
zend_generator_handlers.dtor_obj = zend_generator_dtor_storage;
+ zend_generator_handlers.get_gc = zend_generator_get_gc;
zend_generator_handlers.clone_obj = NULL;
zend_generator_handlers.get_constructor = zend_generator_get_constructor;
diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h
index ae1e312eee..6aabcc6a4d 100644
--- a/Zend/zend_generators.h
+++ b/Zend/zend_generators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -62,8 +62,8 @@ struct _zend_generator {
/* The suspended execution context. */
zend_execute_data *execute_data;
- /* The separate stack used by generator */
- zend_vm_stack stack;
+ /* Frozen call stack for "yield" used in context of other calls */
+ zend_execute_data *frozen_call_stack;
/* Current value */
zval value;
@@ -82,7 +82,7 @@ struct _zend_generator {
* by-value foreach. */
zval values;
- /* Node of waiting generators when multiple "yield *" expressions
+ /* Node of waiting generators when multiple "yield from" expressions
* are nested. */
zend_generator_node node;
@@ -91,6 +91,9 @@ struct _zend_generator {
/* ZEND_GENERATOR_* flags */
zend_uchar flags;
+
+ zval *gc_buffer;
+ uint32_t gc_buffer_size;
};
static const zend_uchar ZEND_GENERATOR_CURRENTLY_RUNNING = 0x1;
@@ -99,14 +102,34 @@ static const zend_uchar ZEND_GENERATOR_AT_FIRST_YIELD = 0x4;
static const zend_uchar ZEND_GENERATOR_DO_INIT = 0x8;
void zend_register_generator_ce(void);
-ZEND_API void zend_generator_create_zval(zend_execute_data *call, zend_op_array *op_array, zval *return_value);
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution);
ZEND_API void zend_generator_resume(zend_generator *generator);
-void zend_generator_yield_from(zend_generator *this, zend_generator *from);
-ZEND_API zend_generator *zend_generator_get_current(zend_generator *generator);
+void zend_generator_yield_from(zend_generator *generator, zend_generator *from);
ZEND_API zend_execute_data *zend_generator_check_placeholder_frame(zend_execute_data *ptr);
+ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator, zend_generator *leaf);
+static zend_always_inline zend_generator *zend_generator_get_current(zend_generator *generator)
+{
+ zend_generator *leaf;
+ zend_generator *root;
+
+ if (EXPECTED(generator->node.parent == NULL)) {
+ /* we're not in yield from mode */
+ return generator;
+ }
+
+ leaf = generator->node.children ? generator->node.ptr.leaf : generator;
+ root = leaf->node.ptr.root;
+
+ if (EXPECTED(root->execute_data && root->node.parent == NULL)) {
+ /* generator still running */
+ return root;
+ }
+
+ return zend_generator_update_current(generator, leaf);
+}
+
END_EXTERN_C()
#endif
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index 28487a2a4a..b560038b7a 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -101,6 +101,7 @@ struct _zend_compiler_globals {
zend_bool increment_lineno;
zend_string *doc_comment;
+ uint32_t extra_fn_flags;
uint32_t compiler_options; /* set of ZEND_COMPILE_* constants */
@@ -113,6 +114,8 @@ struct _zend_compiler_globals {
zend_string *empty_string;
zend_string *one_char_string[256];
+ zend_string **known_strings;
+ uint32_t known_strings_count;
HashTable interned_strings;
@@ -161,7 +164,7 @@ struct _zend_executor_globals {
zend_vm_stack vm_stack;
struct _zend_execute_data *current_execute_data;
- zend_class_entry *scope;
+ zend_class_entry *fake_scope; /* used to avoid checks accessing properties */
zend_long precision;
@@ -174,8 +177,10 @@ struct _zend_executor_globals {
/* for extended information support */
zend_bool no_extensions;
-#ifdef ZEND_WIN32
zend_bool timed_out;
+ zend_long hard_timeout;
+
+#ifdef ZEND_WIN32
OSVERSIONINFOEX windows_version_info;
#endif
diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h
index 190905fc6c..c0a9efbfbf 100644
--- a/Zend/zend_globals_macros.h
+++ b/Zend/zend_globals_macros.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -68,34 +68,6 @@ extern ZEND_API zend_ini_scanner_globals ini_scanner_globals;
END_EXTERN_C()
-/* For limited downwards source compatibility */
-#define CLS_FETCH()
-#define ELS_FETCH()
-#define ALS_FETCH()
-#define PLS_FETCH()
-#define SLS_FETCH()
-#define CLS_D
-#define ELS_D
-#define ALS_D
-#define PLS_D
-#define SLS_D
-#define CLS_DC
-#define ELS_DC
-#define ALS_DC
-#define PLS_DC
-#define SLS_DC
-#define CLS_C
-#define ELS_C
-#define ALS_C
-#define PLS_C
-#define SLS_C
-#define CLS_CC
-#define ELS_CC
-#define ALS_CC
-#define PLS_CC
-#define SLS_CC
-
-
#endif /* ZEND_GLOBALS_MACROS_H */
/*
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index eb5081d56c..95652d598d 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -30,14 +31,16 @@
# define HT_ASSERT(c)
#endif
+#define HT_POISONED_PTR ((HashTable *) (intptr_t) -1)
+
#if ZEND_DEBUG
/*
-#define HASH_MASK_CONSISTENCY 0x60
+#define HASH_MASK_CONSISTENCY 0xc0
*/
#define HT_OK 0x00
-#define HT_IS_DESTROYING 0x20
-#define HT_DESTROYED 0x40
-#define HT_CLEANING 0x60
+#define HT_IS_DESTROYING 0x40
+#define HT_DESTROYED 0x80
+#define HT_CLEANING 0xc0
static void _zend_is_inconsistent(const HashTable *ht, const char *file, int line)
{
@@ -89,7 +92,7 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin
static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht);
-static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
+static zend_always_inline uint32_t zend_hash_check_size(uint32_t nSize)
{
#if defined(ZEND_WIN32)
unsigned long index;
@@ -97,7 +100,11 @@ static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
/* Use big enough power of 2 */
/* size should be between HT_MIN_SIZE and HT_MAX_SIZE */
- nSize = (nSize <= HT_MIN_SIZE ? HT_MIN_SIZE : (nSize >= HT_MAX_SIZE ? HT_MAX_SIZE : nSize));
+ if (nSize < HT_MIN_SIZE) {
+ nSize = HT_MIN_SIZE;
+ } else if (UNEXPECTED(nSize >= HT_MAX_SIZE)) {
+ zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nSize, sizeof(Bucket), sizeof(Bucket));
+ }
#if defined(ZEND_WIN32)
if (BitScanReverse(&index, nSize - 1)) {
@@ -107,7 +114,7 @@ static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
rather than using an undefined bis scan result. */
return nSize;
}
-#elif defined(__GNUC__) || __has_builtin(__builtin_clz)
+#elif (defined(__GNUC__) || __has_builtin(__builtin_clz)) && defined(PHP_HAVE_BUILTIN_CLZ)
return 0x2 << (__builtin_clz(nSize - 1) ^ 0x1f);
#else
nSize -= 1;
@@ -120,7 +127,7 @@ static uint32_t zend_always_inline zend_hash_check_size(uint32_t nSize)
#endif
}
-static void zend_always_inline zend_hash_real_init_ex(HashTable *ht, int packed)
+static zend_always_inline void zend_hash_real_init_ex(HashTable *ht, int packed)
{
HT_ASSERT(GC_REFCOUNT(ht) == 1);
ZEND_ASSERT(!((ht)->u.flags & HASH_FLAG_INITIALIZED));
@@ -132,11 +139,24 @@ static void zend_always_inline zend_hash_real_init_ex(HashTable *ht, int packed)
(ht)->nTableMask = -(ht)->nTableSize;
HT_SET_DATA_ADDR(ht, pemalloc(HT_SIZE(ht), (ht)->u.flags & HASH_FLAG_PERSISTENT));
(ht)->u.flags |= HASH_FLAG_INITIALIZED;
- HT_HASH_RESET(ht);
+ if (EXPECTED(ht->nTableMask == (uint32_t)-8)) {
+ Bucket *arData = ht->arData;
+
+ HT_HASH_EX(arData, -8) = -1;
+ HT_HASH_EX(arData, -7) = -1;
+ HT_HASH_EX(arData, -6) = -1;
+ HT_HASH_EX(arData, -5) = -1;
+ HT_HASH_EX(arData, -4) = -1;
+ HT_HASH_EX(arData, -3) = -1;
+ HT_HASH_EX(arData, -2) = -1;
+ HT_HASH_EX(arData, -1) = -1;
+ } else {
+ HT_HASH_RESET(ht);
+ }
}
}
-static void zend_always_inline zend_hash_check_init(HashTable *ht, int packed)
+static zend_always_inline void zend_hash_check_init(HashTable *ht, int packed)
{
HT_ASSERT(GC_REFCOUNT(ht) == 1);
if (UNEXPECTED(!((ht)->u.flags & HASH_FLAG_INITIALIZED))) {
@@ -187,14 +207,15 @@ ZEND_API void ZEND_FASTCALL zend_hash_real_init(HashTable *ht, zend_bool packed)
ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash(HashTable *ht)
{
- void *old_data = HT_GET_DATA_ADDR(ht);
+ void *new_data, *old_data = HT_GET_DATA_ADDR(ht);
Bucket *old_buckets = ht->arData;
HT_ASSERT(GC_REFCOUNT(ht) == 1);
HANDLE_BLOCK_INTERRUPTIONS();
ht->u.flags &= ~HASH_FLAG_PACKED;
+ new_data = pemalloc(HT_SIZE_EX(ht->nTableSize, -ht->nTableSize), (ht)->u.flags & HASH_FLAG_PERSISTENT);
ht->nTableMask = -ht->nTableSize;
- HT_SET_DATA_ADDR(ht, pemalloc(HT_SIZE(ht), (ht)->u.flags & HASH_FLAG_PERSISTENT));
+ HT_SET_DATA_ADDR(ht, new_data);
memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed);
pefree(old_data, (ht)->u.flags & HASH_FLAG_PERSISTENT);
zend_hash_rehash(ht);
@@ -203,14 +224,15 @@ ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash(HashTable *ht)
ZEND_API void ZEND_FASTCALL zend_hash_to_packed(HashTable *ht)
{
- void *old_data = HT_GET_DATA_ADDR(ht);
+ void *new_data, *old_data = HT_GET_DATA_ADDR(ht);
Bucket *old_buckets = ht->arData;
HT_ASSERT(GC_REFCOUNT(ht) == 1);
HANDLE_BLOCK_INTERRUPTIONS();
+ new_data = pemalloc(HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK), (ht)->u.flags & HASH_FLAG_PERSISTENT);
ht->u.flags |= HASH_FLAG_PACKED | HASH_FLAG_STATIC_KEYS;
ht->nTableMask = HT_MIN_MASK;
- HT_SET_DATA_ADDR(ht, pemalloc(HT_SIZE(ht), (ht)->u.flags & HASH_FLAG_PERSISTENT));
+ HT_SET_DATA_ADDR(ht, new_data);
HT_HASH_RESET_PACKED(ht);
memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed);
pefree(old_data, (ht)->u.flags & HASH_FLAG_PERSISTENT);
@@ -246,13 +268,14 @@ ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, zend
} else {
ZEND_ASSERT(!(ht->u.flags & HASH_FLAG_PACKED));
if (nSize > ht->nTableSize) {
- void *old_data = HT_GET_DATA_ADDR(ht);
+ void *new_data, *old_data = HT_GET_DATA_ADDR(ht);
Bucket *old_buckets = ht->arData;
-
+ nSize = zend_hash_check_size(nSize);
HANDLE_BLOCK_INTERRUPTIONS();
- ht->nTableSize = zend_hash_check_size(nSize);
+ new_data = pemalloc(HT_SIZE_EX(nSize, -nSize), ht->u.flags & HASH_FLAG_PERSISTENT);
+ ht->nTableSize = nSize;
ht->nTableMask = -ht->nTableSize;
- HT_SET_DATA_ADDR(ht, pemalloc(HT_SIZE(ht), ht->u.flags & HASH_FLAG_PERSISTENT));
+ HT_SET_DATA_ADDR(ht, new_data);
memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed);
pefree(old_data, ht->u.flags & HASH_FLAG_PERSISTENT);
zend_hash_rehash(ht);
@@ -262,6 +285,40 @@ ZEND_API void ZEND_FASTCALL zend_hash_extend(HashTable *ht, uint32_t nSize, zend
}
}
+static uint32_t zend_array_recalc_elements(HashTable *ht)
+{
+ zval *val;
+ uint32_t num = ht->nNumOfElements;
+
+ ZEND_HASH_FOREACH_VAL(ht, val) {
+ if (Z_TYPE_P(val) == IS_UNDEF) continue;
+ if (Z_TYPE_P(val) == IS_INDIRECT) {
+ if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) {
+ num--;
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+ return num;
+}
+/* }}} */
+
+ZEND_API uint32_t zend_array_count(HashTable *ht)
+{
+ uint32_t num;
+ if (UNEXPECTED(ht->u.v.flags & HASH_FLAG_HAS_EMPTY_IND)) {
+ num = zend_array_recalc_elements(ht);
+ if (UNEXPECTED(ht->nNumOfElements == num)) {
+ ht->u.v.flags &= ~HASH_FLAG_HAS_EMPTY_IND;
+ }
+ } else if (UNEXPECTED(ht == &EG(symbol_table))) {
+ num = zend_array_recalc_elements(ht);
+ } else {
+ num = zend_hash_num_elements(ht);
+ }
+ return num;
+}
+/* }}} */
+
ZEND_API void ZEND_FASTCALL zend_hash_set_apply_protection(HashTable *ht, zend_bool bApplyProtection)
{
if (bApplyProtection) {
@@ -316,7 +373,8 @@ ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos(uint32_t idx, HashTab
if (iter->pos == HT_INVALID_IDX) {
return HT_INVALID_IDX;
} else if (UNEXPECTED(iter->ht != ht)) {
- if (EXPECTED(iter->ht) && EXPECTED(iter->ht->u.v.nIteratorsCount != 255)) {
+ if (EXPECTED(iter->ht) && EXPECTED(iter->ht != HT_POISONED_PTR)
+ && EXPECTED(iter->ht->u.v.nIteratorsCount != 255)) {
iter->ht->u.v.nIteratorsCount--;
}
if (EXPECTED(ht->u.v.nIteratorsCount != 255)) {
@@ -328,13 +386,38 @@ ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos(uint32_t idx, HashTab
return iter->pos;
}
+ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos_ex(uint32_t idx, zval *array)
+{
+ HashTable *ht = Z_ARRVAL_P(array);
+ HashTableIterator *iter = EG(ht_iterators) + idx;
+
+ ZEND_ASSERT(idx != (uint32_t)-1);
+ if (iter->pos == HT_INVALID_IDX) {
+ return HT_INVALID_IDX;
+ } else if (UNEXPECTED(iter->ht != ht)) {
+ if (EXPECTED(iter->ht) && EXPECTED(iter->ht != HT_POISONED_PTR)
+ && EXPECTED(iter->ht->u.v.nIteratorsCount != 255)) {
+ iter->ht->u.v.nIteratorsCount--;
+ }
+ SEPARATE_ARRAY(array);
+ ht = Z_ARRVAL_P(array);
+ if (EXPECTED(ht->u.v.nIteratorsCount != 255)) {
+ ht->u.v.nIteratorsCount++;
+ }
+ iter->ht = ht;
+ iter->pos = ht->nInternalPointer;
+ }
+ return iter->pos;
+}
+
ZEND_API void ZEND_FASTCALL zend_hash_iterator_del(uint32_t idx)
{
HashTableIterator *iter = EG(ht_iterators) + idx;
ZEND_ASSERT(idx != (uint32_t)-1);
- if (EXPECTED(iter->ht) && EXPECTED(iter->ht->u.v.nIteratorsCount != 255)) {
+ if (EXPECTED(iter->ht) && EXPECTED(iter->ht != HT_POISONED_PTR)
+ && EXPECTED(iter->ht->u.v.nIteratorsCount != 255)) {
iter->ht->u.v.nIteratorsCount--;
}
iter->ht = NULL;
@@ -351,20 +434,13 @@ static zend_never_inline void ZEND_FASTCALL _zend_hash_iterators_remove(HashTabl
{
HashTableIterator *iter = EG(ht_iterators);
HashTableIterator *end = iter + EG(ht_iterators_used);
- uint32_t idx;
while (iter != end) {
if (iter->ht == ht) {
- iter->ht = NULL;
+ iter->ht = HT_POISONED_PTR;
}
iter++;
}
-
- idx = EG(ht_iterators_used);
- while (idx > 0 && EG(ht_iterators)[idx - 1].ht == NULL) {
- idx--;
- }
- EG(ht_iterators_used) = idx;
}
static zend_always_inline void zend_hash_iterators_remove(HashTable *ht)
@@ -495,12 +571,25 @@ static zend_always_inline zval *_zend_hash_add_or_update_i(HashTable *ht, zend_s
zval *data;
if (flag & HASH_ADD) {
- return NULL;
- }
- ZEND_ASSERT(&p->val != pData);
- data = &p->val;
- if ((flag & HASH_UPDATE_INDIRECT) && Z_TYPE_P(data) == IS_INDIRECT) {
- data = Z_INDIRECT_P(data);
+ if (!(flag & HASH_UPDATE_INDIRECT)) {
+ return NULL;
+ }
+ ZEND_ASSERT(&p->val != pData);
+ data = &p->val;
+ if (Z_TYPE_P(data) == IS_INDIRECT) {
+ data = Z_INDIRECT_P(data);
+ if (Z_TYPE_P(data) != IS_UNDEF) {
+ return NULL;
+ }
+ } else {
+ return NULL;
+ }
+ } else {
+ ZEND_ASSERT(&p->val != pData);
+ data = &p->val;
+ if ((flag & HASH_UPDATE_INDIRECT) && Z_TYPE_P(data) == IS_INDIRECT) {
+ data = Z_INDIRECT_P(data);
+ }
}
HANDLE_BLOCK_INTERRUPTIONS();
if (ht->pDestructor) {
@@ -791,13 +880,15 @@ static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht)
zend_hash_rehash(ht);
HANDLE_UNBLOCK_INTERRUPTIONS();
} else if (ht->nTableSize < HT_MAX_SIZE) { /* Let's double the table size */
- void *old_data = HT_GET_DATA_ADDR(ht);
+ void *new_data, *old_data = HT_GET_DATA_ADDR(ht);
+ uint32_t nSize = ht->nTableSize + ht->nTableSize;
Bucket *old_buckets = ht->arData;
HANDLE_BLOCK_INTERRUPTIONS();
- ht->nTableSize += ht->nTableSize;
+ new_data = pemalloc(HT_SIZE_EX(nSize, -nSize), ht->u.flags & HASH_FLAG_PERSISTENT);
+ ht->nTableSize = nSize;
ht->nTableMask = -ht->nTableSize;
- HT_SET_DATA_ADDR(ht, pemalloc(HT_SIZE(ht), ht->u.flags & HASH_FLAG_PERSISTENT));
+ HT_SET_DATA_ADDR(ht, new_data);
memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed);
pefree(old_data, ht->u.flags & HASH_FLAG_PERSISTENT);
zend_hash_rehash(ht);
@@ -1026,9 +1117,14 @@ ZEND_API int ZEND_FASTCALL zend_hash_del_ind(HashTable *ht, zend_string *key)
return FAILURE;
} else {
if (ht->pDestructor) {
- ht->pDestructor(data);
+ zval tmp;
+ ZVAL_COPY_VALUE(&tmp, data);
+ ZVAL_UNDEF(data);
+ ht->pDestructor(&tmp);
+ } else {
+ ZVAL_UNDEF(data);
}
- ZVAL_UNDEF(data);
+ ht->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
}
} else {
_zend_hash_del_el_ex(ht, idx, p, prev);
@@ -1072,6 +1168,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_str_del_ind(HashTable *ht, const char *str,
ht->pDestructor(data);
}
ZVAL_UNDEF(data);
+ ht->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
}
} else {
_zend_hash_del_el_ex(ht, idx, p, prev);
@@ -1428,15 +1525,15 @@ ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_fu
int result;
IS_CONSISTENT(ht);
- HT_ASSERT(GC_REFCOUNT(ht) == 1);
HASH_PROTECT_RECURSION(ht);
- p = ht->arData;
- for (idx = 0; idx < ht->nNumUsed; idx++, p++) {
+ for (idx = 0; idx < ht->nNumUsed; idx++) {
+ p = ht->arData + idx;
if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
result = apply_func(&p->val);
if (result & ZEND_HASH_APPLY_REMOVE) {
+ HT_ASSERT(GC_REFCOUNT(ht) == 1);
_zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p);
}
if (result & ZEND_HASH_APPLY_STOP) {
@@ -1454,15 +1551,15 @@ ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_f
int result;
IS_CONSISTENT(ht);
- HT_ASSERT(GC_REFCOUNT(ht) == 1);
HASH_PROTECT_RECURSION(ht);
- p = ht->arData;
- for (idx = 0; idx < ht->nNumUsed; idx++, p++) {
+ for (idx = 0; idx < ht->nNumUsed; idx++) {
+ p = ht->arData + idx;
if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
result = apply_func(&p->val, argument);
if (result & ZEND_HASH_APPLY_REMOVE) {
+ HT_ASSERT(GC_REFCOUNT(ht) == 1);
_zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p);
}
if (result & ZEND_HASH_APPLY_STOP) {
@@ -1482,12 +1579,11 @@ ZEND_API void ZEND_FASTCALL zend_hash_apply_with_arguments(HashTable *ht, apply_
int result;
IS_CONSISTENT(ht);
- HT_ASSERT(GC_REFCOUNT(ht) == 1);
HASH_PROTECT_RECURSION(ht);
- p = ht->arData;
- for (idx = 0; idx < ht->nNumUsed; idx++, p++) {
+ for (idx = 0; idx < ht->nNumUsed; idx++) {
+ p = ht->arData + idx;
if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
va_start(args, num_args);
hash_key.h = p->h;
@@ -1496,6 +1592,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_apply_with_arguments(HashTable *ht, apply_
result = apply_func(&p->val, num_args, args, &hash_key);
if (result & ZEND_HASH_APPLY_REMOVE) {
+ HT_ASSERT(GC_REFCOUNT(ht) == 1);
_zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p);
}
if (result & ZEND_HASH_APPLY_STOP) {
@@ -1516,19 +1613,18 @@ ZEND_API void ZEND_FASTCALL zend_hash_reverse_apply(HashTable *ht, apply_func_t
int result;
IS_CONSISTENT(ht);
- HT_ASSERT(GC_REFCOUNT(ht) == 1);
HASH_PROTECT_RECURSION(ht);
idx = ht->nNumUsed;
- p = ht->arData + idx;
while (idx > 0) {
idx--;
- p--;
+ p = ht->arData + idx;
if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
result = apply_func(&p->val);
if (result & ZEND_HASH_APPLY_REMOVE) {
+ HT_ASSERT(GC_REFCOUNT(ht) == 1);
_zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p);
}
if (result & ZEND_HASH_APPLY_STOP) {
@@ -1698,7 +1794,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
target->pDestructor = source->pDestructor;
if (source->nNumUsed == 0) {
- target->u.flags = (source->u.flags & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED|HASH_FLAG_PERSISTENT)) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
+ target->u.flags = (source->u.flags & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED|HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
target->nTableMask = HT_MIN_MASK;
target->nNumUsed = 0;
target->nNumOfElements = 0;
@@ -1723,7 +1819,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
target->nInternalPointer = idx;
}
} else if (source->u.flags & HASH_FLAG_PACKED) {
- target->u.flags = (source->u.flags & ~HASH_FLAG_PERSISTENT) | HASH_FLAG_APPLY_PROTECTION;
+ target->u.flags = (source->u.flags & ~(HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION;
target->nTableMask = source->nTableMask;
target->nNumUsed = source->nNumUsed;
target->nNumOfElements = source->nNumOfElements;
@@ -1746,7 +1842,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
target->nInternalPointer = idx;
}
} else {
- target->u.flags = (source->u.flags & ~HASH_FLAG_PERSISTENT) | HASH_FLAG_APPLY_PROTECTION;
+ target->u.flags = (source->u.flags & ~(HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION;
target->nTableMask = source->nTableMask;
target->nNextFreeElement = source->nNextFreeElement;
target->nInternalPointer = HT_INVALID_IDX;
@@ -1781,24 +1877,47 @@ ZEND_API void ZEND_FASTCALL _zend_hash_merge(HashTable *target, HashTable *sourc
uint32_t idx;
Bucket *p;
zval *t;
- uint32_t mode = (overwrite?HASH_UPDATE:HASH_ADD);
IS_CONSISTENT(source);
IS_CONSISTENT(target);
HT_ASSERT(GC_REFCOUNT(target) == 1);
- for (idx = 0; idx < source->nNumUsed; idx++) {
- p = source->arData + idx;
- if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
- if (p->key) {
- t = _zend_hash_add_or_update(target, p->key, &p->val, mode ZEND_FILE_LINE_RELAY_CC);
- if (t && pCopyConstructor) {
- pCopyConstructor(t);
+ if (overwrite) {
+ for (idx = 0; idx < source->nNumUsed; idx++) {
+ p = source->arData + idx;
+ if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
+ if (UNEXPECTED(Z_TYPE(p->val) == IS_INDIRECT) &&
+ UNEXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) == IS_UNDEF)) {
+ continue;
}
- } else {
- if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h))) {
- t = zend_hash_index_update(target, p->h, &p->val);
- if (t && pCopyConstructor) {
+ if (p->key) {
+ t = _zend_hash_add_or_update_i(target, p->key, &p->val, HASH_UPDATE | HASH_UPDATE_INDIRECT ZEND_FILE_LINE_RELAY_CC);
+ if (t && pCopyConstructor) {
+ pCopyConstructor(t);
+ }
+ } else {
+ t = zend_hash_index_update(target, p->h, &p->val);
+ if (t && pCopyConstructor) {
+ pCopyConstructor(t);
+ }
+ }
+ }
+ } else {
+ for (idx = 0; idx < source->nNumUsed; idx++) {
+ p = source->arData + idx;
+ if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue;
+ if (UNEXPECTED(Z_TYPE(p->val) == IS_INDIRECT) &&
+ UNEXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) == IS_UNDEF)) {
+ continue;
+ }
+ if (p->key) {
+ t = _zend_hash_add_or_update_i(target, p->key, &p->val, HASH_ADD | HASH_UPDATE_INDIRECT ZEND_FILE_LINE_RELAY_CC);
+ if (t && pCopyConstructor) {
+ pCopyConstructor(t);
+ }
+ } else {
+ t = zend_hash_index_add(target, p->h, &p->val);
+ if (t && pCopyConstructor) {
pCopyConstructor(t);
}
}
@@ -1919,6 +2038,15 @@ ZEND_API zval* ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulon
return p ? &p->val : NULL;
}
+ZEND_API zval* ZEND_FASTCALL _zend_hash_index_find(const HashTable *ht, zend_ulong h)
+{
+ Bucket *p;
+
+ IS_CONSISTENT(ht);
+
+ p = zend_hash_index_find_bucket(ht, h);
+ return p ? &p->val : NULL;
+}
ZEND_API zend_bool ZEND_FASTCALL zend_hash_index_exists(const HashTable *ht, zend_ulong h)
{
@@ -1945,7 +2073,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, H
uint32_t idx;
IS_CONSISTENT(ht);
- HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
+ HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
for (idx = 0; idx < ht->nNumUsed; idx++) {
if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) {
@@ -1965,7 +2093,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(HashTable *ht, Has
uint32_t idx;
IS_CONSISTENT(ht);
- HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
+ HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
idx = ht->nNumUsed;
while (idx > 0) {
@@ -1984,7 +2112,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition
uint32_t idx = *pos;
IS_CONSISTENT(ht);
- HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
+ HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
if (idx != HT_INVALID_IDX) {
while (1) {
@@ -2008,7 +2136,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_move_backwards_ex(HashTable *ht, HashPositi
uint32_t idx = *pos;
IS_CONSISTENT(ht);
- HT_ASSERT(ht->nInternalPointer != &pos || GC_REFCOUNT(ht) == 1);
+ HT_ASSERT(&ht->nInternalPointer != pos || GC_REFCOUNT(ht) == 1);
if (idx != HT_INVALID_IDX) {
while (idx > 0) {
@@ -2190,12 +2318,13 @@ ZEND_API int ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort, co
}
} else {
if (renumber) {
- void *old_data = HT_GET_DATA_ADDR(ht);
+ void *new_data, *old_data = HT_GET_DATA_ADDR(ht);
Bucket *old_buckets = ht->arData;
+ new_data = pemalloc(HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK), (ht->u.flags & HASH_FLAG_PERSISTENT));
ht->u.flags |= HASH_FLAG_PACKED | HASH_FLAG_STATIC_KEYS;
ht->nTableMask = HT_MIN_MASK;
- HT_SET_DATA_ADDR(ht, pemalloc(HT_SIZE(ht), ht->u.flags & HASH_FLAG_PERSISTENT & HASH_FLAG_PERSISTENT));
+ HT_SET_DATA_ADDR(ht, new_data);
memcpy(ht->arData, old_buckets, sizeof(Bucket) * ht->nNumUsed);
pefree(old_data, ht->u.flags & HASH_FLAG_PERSISTENT & HASH_FLAG_PERSISTENT);
HT_HASH_RESET_PACKED(ht);
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index d71e76d5ce..ba4704fdd9 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -39,8 +40,9 @@
#define HASH_FLAG_PACKED (1<<2)
#define HASH_FLAG_INITIALIZED (1<<3)
#define HASH_FLAG_STATIC_KEYS (1<<4)
+#define HASH_FLAG_HAS_EMPTY_IND (1<<5)
-#define HASH_MASK_CONSISTENCY 0x60
+#define HASH_MASK_CONSISTENCY 0xc0
typedef struct _zend_hash_key {
zend_ulong h;
@@ -152,6 +154,26 @@ ZEND_API void ZEND_FASTCALL zend_hash_del_bucket(HashTable *ht, Bucket *p);
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
ZEND_API zval* ZEND_FASTCALL zend_hash_str_find(const HashTable *ht, const char *key, size_t len);
ZEND_API zval* ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
+ZEND_API zval* ZEND_FASTCALL _zend_hash_index_find(const HashTable *ht, zend_ulong h);
+
+#define ZEND_HASH_INDEX_FIND(_ht, _h, _ret, _not_found) do { \
+ if (EXPECTED((_ht)->u.flags & HASH_FLAG_PACKED)) { \
+ if (EXPECTED((_h) < (_ht)->nNumUsed)) { \
+ _ret = &_ht->arData[_h].val; \
+ if (UNEXPECTED(Z_TYPE_P(_ret) == IS_UNDEF)) { \
+ goto _not_found; \
+ } \
+ } else { \
+ goto _not_found; \
+ } \
+ } else { \
+ _ret = _zend_hash_index_find(_ht, _h); \
+ if (UNEXPECTED(_ret == NULL)) { \
+ goto _not_found; \
+ } \
+ } \
+ } while (0)
+
/* Misc */
ZEND_API zend_bool ZEND_FASTCALL zend_hash_exists(const HashTable *ht, zend_string *key);
@@ -214,6 +236,7 @@ ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, compare_func_
ZEND_API int ZEND_FASTCALL zend_hash_rehash(HashTable *ht);
+ZEND_API uint32_t zend_array_count(HashTable *ht);
ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source);
ZEND_API void ZEND_FASTCALL zend_array_destroy(HashTable *ht);
ZEND_API void ZEND_FASTCALL zend_symtable_clean(HashTable *ht);
@@ -222,6 +245,7 @@ ZEND_API int ZEND_FASTCALL _zend_handle_numeric_str_ex(const char *key, size_t l
ZEND_API uint32_t ZEND_FASTCALL zend_hash_iterator_add(HashTable *ht, HashPosition pos);
ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos(uint32_t idx, HashTable *ht);
+ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos_ex(uint32_t idx, zval *array);
ZEND_API void ZEND_FASTCALL zend_hash_iterator_del(uint32_t idx);
ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterators_lower_pos(HashTable *ht, HashPosition start);
ZEND_API void ZEND_FASTCALL _zend_hash_iterators_update(HashTable *ht, HashPosition from, HashPosition to);
@@ -244,7 +268,7 @@ END_EXTERN_C()
static zend_always_inline int _zend_handle_numeric_str(const char *key, size_t length, zend_ulong *idx)
{
- register const char *tmp = key;
+ const char *tmp = key;
if (*tmp > '9') {
return 0;
@@ -381,6 +405,18 @@ static zend_always_inline int zend_symtable_exists(HashTable *ht, zend_string *k
}
+static zend_always_inline int zend_symtable_exists_ind(HashTable *ht, zend_string *key)
+{
+ zend_ulong idx;
+
+ if (ZEND_HANDLE_NUMERIC(key, idx)) {
+ return zend_hash_index_exists(ht, idx);
+ } else {
+ return zend_hash_exists_ind(ht, key);
+ }
+}
+
+
static zend_always_inline zval *zend_symtable_str_update(HashTable *ht, const char *str, size_t len, zval *pData)
{
zend_ulong idx;
@@ -884,7 +920,7 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
__fill_ht->nNumUsed = __fill_idx; \
__fill_ht->nNumOfElements = __fill_idx; \
__fill_ht->nNextFreeElement = __fill_idx; \
- __fill_ht->nInternalPointer = 0; \
+ __fill_ht->nInternalPointer = __fill_idx ? 0 : HT_INVALID_IDX; \
} while (0)
static zend_always_inline zval *_zend_hash_append(HashTable *ht, zend_string *key, zval *zv)
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index 4f870af448..bc6456cee6 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,6 +25,7 @@
#include "zend_highlight.h"
#include "zend_ptr_stack.h"
#include "zend_globals.h"
+#include "zend_exceptions.h"
ZEND_API void zend_html_putc(char c)
{
@@ -168,6 +169,9 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
}
zend_printf("</span>\n");
zend_printf("</code>");
+
+ /* Discard parse errors thrown during tokenization */
+ zend_clear_exception();
}
ZEND_API void zend_strip(void)
@@ -224,6 +228,9 @@ ZEND_API void zend_strip(void)
prev_space = 0;
ZVAL_UNDEF(&token);
}
+
+ /* Discard parse errors thrown during tokenization */
+ zend_clear_exception();
}
/*
diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h
index ab079aac3e..63c5821c8f 100644
--- a/Zend/zend_highlight.h
+++ b/Zend/zend_highlight.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 64e7407f12..44abfb6ffb 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,9 +25,9 @@
#include "zend_smart_str.h"
#include "zend_inheritance.h"
-static void ptr_dtor(zval *zv) /* {{{ */
+static void overriden_ptr_dtor(zval *zv) /* {{{ */
{
- efree(Z_PTR_P(zv));
+ efree_size(Z_PTR_P(zv), sizeof(zend_function));
}
/* }}} */
@@ -170,7 +170,7 @@ char *zend_visibility_string(uint32_t fn_flags) /* {{{ */
static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_info *fe_arg_info, const zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */
{
if (ZEND_LOG_XOR(fe_arg_info->class_name, proto_arg_info->class_name)) {
- /* Only one has a type hint and the other one doesn't */
+ /* Only one has a type declaration and the other one doesn't */
return 0;
}
@@ -213,15 +213,11 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
}
if (strcasecmp(ZSTR_VAL(fe_class_name), ZSTR_VAL(proto_class_name)) != 0) {
- const char *colon;
-
if (fe->common.type != ZEND_USER_FUNCTION) {
zend_string_release(proto_class_name);
zend_string_release(fe_class_name);
return 0;
- } else if (strchr(ZSTR_VAL(proto_class_name), '\\') != NULL ||
- (colon = zend_memrchr(ZSTR_VAL(fe_class_name), '\\', ZSTR_LEN(fe_class_name))) == NULL ||
- strcasecmp(colon+1, ZSTR_VAL(proto_class_name)) != 0) {
+ } else {
zend_class_entry *fe_ce, *proto_ce;
fe_ce = zend_lookup_class(fe_class_name);
@@ -243,7 +239,7 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
}
if (fe_arg_info->type_hint != proto_arg_info->type_hint) {
- /* Incompatible type hint */
+ /* Incompatible type */
return 0;
}
@@ -323,6 +319,12 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
return 0;
}
+ // This introduces BC break described at https://bugs.php.net/bug.php?id=72119
+ if (proto_arg_info->type_hint && proto_arg_info->allow_null && !fe_arg_info->allow_null) {
+ /* incompatible nullability */
+ return 0;
+ }
+
/* by-ref constraints on arguments are invariant */
if (fe_arg_info->pass_by_reference != proto_arg_info->pass_by_reference) {
return 0;
@@ -340,13 +342,22 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
if (!zend_do_perform_type_hint_check(fe, fe->common.arg_info - 1, proto, proto->common.arg_info - 1)) {
return 0;
}
+
+ if (fe->common.arg_info[-1].allow_null && !proto->common.arg_info[-1].allow_null) {
+ return 0;
+ }
}
return 1;
}
/* }}} */
-static void zend_append_type_hint(smart_str *str, const zend_function *fptr, zend_arg_info *arg_info, int return_hint) /* {{{ */
+static ZEND_COLD void zend_append_type_hint(smart_str *str, const zend_function *fptr, zend_arg_info *arg_info, int return_hint) /* {{{ */
{
+
+ if (arg_info->type_hint != IS_UNDEF && arg_info->allow_null) {
+ smart_str_appendc(str, '?');
+ }
+
if (arg_info->class_name) {
const char *class_name;
size_t class_name_len;
@@ -387,7 +398,7 @@ static void zend_append_type_hint(smart_str *str, const zend_function *fptr, zen
}
/* }}} */
-static zend_string *zend_get_function_declaration(const zend_function *fptr) /* {{{ */
+static ZEND_COLD zend_string *zend_get_function_declaration(const zend_function *fptr) /* {{{ */
{
smart_str str = {0};
@@ -543,17 +554,17 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
zend_error_noreturn(E_COMPILE_ERROR, "Cannot make non abstract method %s::%s() abstract in class %s", ZEND_FN_SCOPE_NAME(parent), ZSTR_VAL(child->common.function_name), ZEND_FN_SCOPE_NAME(child));
}
+ /* Prevent derived classes from restricting access that was available in parent classes */
+ if (UNEXPECTED((child_flags & ZEND_ACC_PPP_MASK) > (parent_flags & ZEND_ACC_PPP_MASK))) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s() must be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(child), ZSTR_VAL(child->common.function_name), zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(parent), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
+ }
+
+ if (((child_flags & ZEND_ACC_PPP_MASK) < (parent_flags & ZEND_ACC_PPP_MASK))
+ && ((parent_flags & ZEND_ACC_PPP_MASK) & ZEND_ACC_PRIVATE)) {
+ child->common.fn_flags |= ZEND_ACC_CHANGED;
+ }
if (parent_flags & ZEND_ACC_CHANGED) {
child->common.fn_flags |= ZEND_ACC_CHANGED;
- } else {
- /* Prevent derived classes from restricting access that was available in parent classes
- */
- if (UNEXPECTED((child_flags & ZEND_ACC_PPP_MASK) > (parent_flags & ZEND_ACC_PPP_MASK))) {
- zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s() must be %s (as in class %s)%s", ZEND_FN_SCOPE_NAME(child), ZSTR_VAL(child->common.function_name), zend_visibility_string(parent_flags), ZEND_FN_SCOPE_NAME(parent), (parent_flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
- } else if (((child_flags & ZEND_ACC_PPP_MASK) < (parent_flags & ZEND_ACC_PPP_MASK))
- && ((parent_flags & ZEND_ACC_PPP_MASK) & ZEND_ACC_PRIVATE)) {
- child->common.fn_flags |= ZEND_ACC_CHANGED;
- }
}
if (parent_flags & ZEND_ACC_PRIVATE) {
@@ -567,17 +578,32 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
}
if (child->common.prototype && (
- child->common.prototype->common.fn_flags & (ZEND_ACC_ABSTRACT | ZEND_ACC_HAS_RETURN_TYPE)
+ child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT
)) {
- if (UNEXPECTED(!zend_do_perform_implementation_check(child, child->common.prototype))) {
- zend_string *method_prototype = zend_get_function_declaration(child->common.prototype);
- zend_string *child_prototype = zend_get_function_declaration(child);
- zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", ZSTR_VAL(child_prototype), ZSTR_VAL(method_prototype));
- }
- } else if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
+ parent = child->common.prototype;
+ }
+ if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
+ int error_level;
+ const char *error_verb;
zend_string *method_prototype = zend_get_function_declaration(parent);
zend_string *child_prototype = zend_get_function_declaration(child);
- zend_error(E_WARNING, "Declaration of %s should be compatible with %s", ZSTR_VAL(child_prototype), ZSTR_VAL(method_prototype));
+
+ if (child->common.prototype && (
+ child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT
+ )) {
+ error_level = E_COMPILE_ERROR;
+ error_verb = "must";
+ } else if ((parent->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) &&
+ (!(child->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ !zend_do_perform_type_hint_check(child, child->common.arg_info - 1, parent, parent->common.arg_info - 1) ||
+ (child->common.arg_info[-1].allow_null && !parent->common.arg_info[-1].allow_null))) {
+ error_level = E_COMPILE_ERROR;
+ error_verb = "must";
+ } else {
+ error_level = E_WARNING;
+ error_verb = "should";
+ }
+ zend_error(error_level, "Declaration of %s %s be compatible with %s", ZSTR_VAL(child_prototype), error_verb, ZSTR_VAL(method_prototype));
zend_string_free(child_prototype);
zend_string_free(method_prototype);
}
@@ -589,7 +615,20 @@ static zend_function *do_inherit_method(zend_string *key, zend_function *parent,
zval *child = zend_hash_find(&ce->function_table, key);
if (child) {
- do_inheritance_check_on_method((zend_function*)Z_PTR_P(child), parent);
+ zend_function *func = (zend_function*)Z_PTR_P(child);
+ zend_function *orig_prototype = func->common.prototype;
+
+ do_inheritance_check_on_method(func, parent);
+ if (func->common.prototype != orig_prototype &&
+ func->type == ZEND_USER_FUNCTION &&
+ func->common.scope != ce &&
+ !func->op_array.static_variables) {
+ /* Lazy duplication */
+ zend_function *new_function = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
+ memcpy(new_function, func, sizeof(zend_op_array));
+ Z_PTR_P(child) = new_function;
+ func->common.prototype = orig_prototype;
+ }
return NULL;
}
@@ -627,7 +666,8 @@ static void do_inherit_property(zend_property_info *parent_info, zend_string *ke
int parent_num = OBJ_PROP_TO_NUM(parent_info->offset);
int child_num = OBJ_PROP_TO_NUM(child_info->offset);
- zval_ptr_dtor(&(ce->default_properties_table[parent_num]));
+ /* Don't keep default properties in GC (they may be freed by opcache) */
+ zval_ptr_dtor_nogc(&(ce->default_properties_table[parent_num]));
ce->default_properties_table[parent_num] = ce->default_properties_table[child_num];
ZVAL_UNDEF(&ce->default_properties_table[child_num]);
child_info->offset = parent_info->offset;
@@ -702,21 +742,29 @@ ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_
}
/* }}} */
-static void do_inherit_class_constant(zend_string *name, zval *zv, zend_class_entry *ce, zend_class_entry *parent_ce) /* {{{ */
+static void do_inherit_class_constant(zend_string *name, zend_class_constant *parent_const, zend_class_entry *ce) /* {{{ */
{
- if (!zend_hash_exists(&ce->constants_table, name)) {
- if (!Z_ISREF_P(zv)) {
- if (parent_ce->type == ZEND_INTERNAL_CLASS) {
- ZVAL_NEW_PERSISTENT_REF(zv, zv);
- } else {
- ZVAL_NEW_REF(zv, zv);
- }
+ zend_class_constant *c = zend_hash_find_ptr(&ce->constants_table, name);
+
+ if (c != NULL) {
+ if (UNEXPECTED((Z_ACCESS_FLAGS(c->value) & ZEND_ACC_PPP_MASK) > (Z_ACCESS_FLAGS(parent_const->value) & ZEND_ACC_PPP_MASK))) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::%s must be %s (as in class %s)%s",
+ ZSTR_VAL(ce->name), ZSTR_VAL(name), zend_visibility_string(Z_ACCESS_FLAGS(parent_const->value)), ZSTR_VAL(ce->parent->name), (Z_ACCESS_FLAGS(parent_const->value) & ZEND_ACC_PUBLIC) ? "" : " or weaker");
}
- if (Z_CONSTANT_P(Z_REFVAL_P(zv))) {
+ } else if (!(Z_ACCESS_FLAGS(parent_const->value) & ZEND_ACC_PRIVATE)) {
+ if (Z_CONSTANT(parent_const->value)) {
ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
}
- Z_ADDREF_P(zv);
- _zend_hash_append(&ce->constants_table, name, zv);
+ if (ce->type & ZEND_INTERNAL_CLASS) {
+ if (Z_REFCOUNTED(parent_const->value)) {
+ Z_ADDREF(parent_const->value);
+ }
+ c = pemalloc(sizeof(zend_class_constant), 1);
+ memcpy(c, parent_const, sizeof(zend_class_constant));
+ } else {
+ c = parent_const;
+ }
+ _zend_hash_append_ptr(&ce->constants_table, name, c);
}
}
/* }}} */
@@ -726,7 +774,6 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
zend_property_info *property_info;
zend_function *func;
zend_string *key;
- zval *zv;
if (UNEXPECTED(ce->ce_flags & ZEND_ACC_INTERFACE)) {
/* Interface can only inherit other interfaces */
@@ -821,7 +868,13 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
do {
dst--;
src--;
- ZVAL_MAKE_REF(src);
+ if (parent_ce->type == ZEND_INTERNAL_CLASS) {
+ if (!Z_ISREF_P(src)) {
+ ZVAL_NEW_PERSISTENT_REF(src, src);
+ }
+ } else {
+ ZVAL_MAKE_REF(src);
+ }
ZVAL_COPY_VALUE(dst, src);
Z_ADDREF_P(dst);
if (Z_CONSTANT_P(Z_REFVAL_P(dst))) {
@@ -831,6 +884,8 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
ce->default_static_members_count += parent_ce->default_static_members_count;
if (ce->type == ZEND_USER_CLASS) {
ce->static_members_table = ce->default_static_members_table;
+ } else {
+ ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
}
}
@@ -855,12 +910,14 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
}
if (zend_hash_num_elements(&parent_ce->constants_table)) {
+ zend_class_constant *c;
+
zend_hash_extend(&ce->constants_table,
zend_hash_num_elements(&ce->constants_table) +
zend_hash_num_elements(&parent_ce->constants_table), 0);
- ZEND_HASH_FOREACH_STR_KEY_VAL(&parent_ce->constants_table, key, zv) {
- do_inherit_class_constant(key, zv, ce, parent_ce);
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&parent_ce->constants_table, key, c) {
+ do_inherit_class_constant(key, c, ce);
} ZEND_HASH_FOREACH_END();
}
@@ -890,14 +947,12 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
}
/* }}} */
-static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval *parent_constant, zend_string *name, const zend_class_entry *iface) /* {{{ */
+static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zend_class_constant *parent_constant, zend_string *name, const zend_class_entry *iface) /* {{{ */
{
- zval *old_constant;
+ zend_class_constant *old_constant;
- if ((old_constant = zend_hash_find(child_constants_table, name)) != NULL) {
- if (!Z_ISREF_P(old_constant) ||
- !Z_ISREF_P(parent_constant) ||
- Z_REFVAL_P(old_constant) != Z_REFVAL_P(parent_constant)) {
+ if ((old_constant = zend_hash_find_ptr(child_constants_table, name)) != NULL) {
+ if (old_constant->ce != parent_constant->ce) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s from interface %s", ZSTR_VAL(name), ZSTR_VAL(iface->name));
}
return 0;
@@ -906,15 +961,23 @@ static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zva
}
/* }}} */
-static void do_inherit_iface_constant(zend_string *name, zval *zv, zend_class_entry *ce, zend_class_entry *iface) /* {{{ */
+static void do_inherit_iface_constant(zend_string *name, zend_class_constant *c, zend_class_entry *ce, zend_class_entry *iface) /* {{{ */
{
- if (do_inherit_constant_check(&ce->constants_table, zv, name, iface)) {
- ZVAL_MAKE_REF(zv);
- Z_ADDREF_P(zv);
- if (Z_CONSTANT_P(Z_REFVAL_P(zv))) {
+ if (do_inherit_constant_check(&ce->constants_table, c, name, iface)) {
+ zend_class_constant *ct;
+ if (Z_CONSTANT(c->value)) {
ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
}
- zend_hash_update(&ce->constants_table, name, zv);
+ if (ce->type & ZEND_INTERNAL_CLASS) {
+ if (Z_REFCOUNTED(c->value)) {
+ Z_ADDREF(c->value);
+ }
+ ct = pemalloc(sizeof(zend_class_constant), 1);
+ memcpy(ct, c, sizeof(zend_class_constant));
+ } else {
+ ct = c;
+ }
+ zend_hash_update_ptr(&ce->constants_table, name, ct);
}
}
/* }}} */
@@ -926,7 +989,7 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
uint32_t parent_iface_num = ce->parent ? ce->parent->num_interfaces : 0;
zend_function *func;
zend_string *key;
- zval *zv;
+ zend_class_constant *c;
for (i = 0; i < ce->num_interfaces; i++) {
if (ce->interfaces[i] == NULL) {
@@ -942,8 +1005,8 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
}
if (ignore) {
/* Check for attempt to redeclare interface constants */
- ZEND_HASH_FOREACH_STR_KEY_VAL(&ce->constants_table, key, zv) {
- do_inherit_constant_check(&iface->constants_table, zv, key, iface);
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
+ do_inherit_constant_check(&iface->constants_table, c, key, iface);
} ZEND_HASH_FOREACH_END();
} else {
if (ce->num_interfaces >= current_iface_num) {
@@ -955,8 +1018,8 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
}
ce->interfaces[ce->num_interfaces++] = iface;
- ZEND_HASH_FOREACH_STR_KEY_VAL(&iface->constants_table, key, zv) {
- do_inherit_iface_constant(key, zv, ce, iface);
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&iface->constants_table, key, c) {
+ do_inherit_iface_constant(key, c, ce, iface);
} ZEND_HASH_FOREACH_END();
ZEND_HASH_FOREACH_STR_KEY_PTR(&iface->function_table, key, func) {
@@ -1016,34 +1079,34 @@ static zend_bool zend_traits_method_compatibility_check(zend_function *fn, zend_
static void zend_add_magic_methods(zend_class_entry* ce, zend_string* mname, zend_function* fe) /* {{{ */
{
- if (!strncmp(ZSTR_VAL(mname), ZEND_CLONE_FUNC_NAME, ZSTR_LEN(mname))) {
+ if (zend_string_equals_literal(mname, ZEND_CLONE_FUNC_NAME)) {
ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_CONSTRUCTOR_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_CONSTRUCTOR_FUNC_NAME)) {
if (ce->constructor && (!ce->parent || ce->constructor != ce->parent->constructor)) {
zend_error_noreturn(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ZSTR_VAL(ce->name));
}
ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_DESTRUCTOR_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_DESTRUCTOR_FUNC_NAME)) {
ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_GET_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_GET_FUNC_NAME)) {
ce->__get = fe;
ce->ce_flags |= ZEND_ACC_USE_GUARDS;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_SET_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_SET_FUNC_NAME)) {
ce->__set = fe;
ce->ce_flags |= ZEND_ACC_USE_GUARDS;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_CALL_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_CALL_FUNC_NAME)) {
ce->__call = fe;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_UNSET_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_UNSET_FUNC_NAME)) {
ce->__unset = fe;
ce->ce_flags |= ZEND_ACC_USE_GUARDS;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_ISSET_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_ISSET_FUNC_NAME)) {
ce->__isset = fe;
ce->ce_flags |= ZEND_ACC_USE_GUARDS;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_CALLSTATIC_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_CALLSTATIC_FUNC_NAME)) {
ce->__callstatic = fe;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_TOSTRING_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_TOSTRING_FUNC_NAME)) {
ce->__tostring = fe;
- } else if (!strncmp(ZSTR_VAL(mname), ZEND_DEBUGINFO_FUNC_NAME, ZSTR_LEN(mname))) {
+ } else if (zend_string_equals_literal(mname, ZEND_DEBUGINFO_FUNC_NAME)) {
ce->__debugInfo = fe;
} else if (ZSTR_LEN(ce->name) == ZSTR_LEN(mname)) {
zend_string *lowercase_name = zend_string_tolower(ce->name);
@@ -1090,7 +1153,7 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
}
} else {
ALLOC_HASHTABLE(*overriden);
- zend_hash_init_ex(*overriden, 8, NULL, ptr_dtor, 0, 0);
+ zend_hash_init_ex(*overriden, 8, NULL, overriden_ptr_dtor, 0, 0);
}
zend_hash_update_mem(*overriden, key, fn, sizeof(zend_function));
return;
@@ -1192,7 +1255,8 @@ static int zend_traits_copy_functions(zend_string *fnname, zend_function *fn, ze
if (exclude_table == NULL || zend_hash_find(exclude_table, fnname) == NULL) {
/* is not in hashtable, thus, function is not to be excluded */
- fn_copy = *fn;
+ /* And how about ZEND_OVERLOADED_FUNCTION? */
+ memcpy(&fn_copy, fn, fn->type == ZEND_USER_FUNCTION? sizeof(zend_op_array) : sizeof(zend_internal_function));
/* apply aliases which have not alias name, just setting visibility */
if (ce->trait_aliases) {
diff --git a/Zend/zend_inheritance.h b/Zend/zend_inheritance.h
index f7ad6dc060..bbe43b0ccd 100644
--- a/Zend/zend_inheritance.h
+++ b/Zend/zend_inheritance.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index d7ff106454..d4dd6fb5b8 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h
index c0044b1eda..3ffc163675 100644
--- a/Zend/zend_ini.h
+++ b/Zend/zend_ini.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y
index 71aca6d26c..1078259f22 100644
--- a/Zend/zend_ini_parser.y
+++ b/Zend/zend_ini_parser.y
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,7 +29,7 @@
#include "zend_ini_scanner.h"
#include "zend_extensions.h"
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
#include "win32/syslog.h"
#endif
@@ -102,12 +102,23 @@ static void zend_ini_init_string(zval *result)
*/
static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
{
- int op1_len = (int)Z_STRLEN_P(op1);
- int length = op1_len + (int)Z_STRLEN_P(op2);
+ int length, op1_len;
+
+ if (Z_TYPE_P(op1) != IS_STRING) {
+ zend_string *str = zval_get_string(op1);
+ /* ZEND_ASSERT(!Z_REFCOUNTED_P(op1)); */
+ ZVAL_PSTRINGL(op1, ZSTR_VAL(str), ZSTR_LEN(str));
+ zend_string_release(str);
+ }
+ op1_len = (int)Z_STRLEN_P(op1);
+
+ if (Z_TYPE_P(op2) != IS_STRING) {
+ convert_to_string(op2);
+ }
+ length = op1_len + (int)Z_STRLEN_P(op2);
ZVAL_NEW_STR(result, zend_string_extend(Z_STR_P(op1), length, 1));
- memcpy(Z_STRVAL_P(result)+op1_len, Z_STRVAL_P(op2), Z_STRLEN_P(op2));
- Z_STRVAL_P(result)[length] = 0;
+ memcpy(Z_STRVAL_P(result) + op1_len, Z_STRVAL_P(op2), Z_STRLEN_P(op2) + 1);
}
/* }}} */
@@ -121,11 +132,10 @@ static void zend_ini_get_constant(zval *result, zval *name)
if (!memchr(Z_STRVAL_P(name), ':', Z_STRLEN_P(name))
&& (c = zend_get_constant(Z_STR_P(name))) != 0) {
if (Z_TYPE_P(c) != IS_STRING) {
- ZVAL_COPY_VALUE(&tmp, c);
+ ZVAL_DUP(&tmp, c);
if (Z_OPT_CONSTANT(tmp)) {
- zval_update_constant_ex(&tmp, 1, NULL);
+ zval_update_constant_ex(&tmp, NULL);
}
- zval_opt_copy_ctor(&tmp);
convert_to_string(&tmp);
c = &tmp;
}
@@ -162,7 +172,7 @@ static void zend_ini_get_var(zval *result, zval *name)
/* {{{ ini_error()
*/
-static void ini_error(const char *msg)
+static ZEND_COLD void ini_error(const char *msg)
{
char *error_buf;
int error_buf_len;
@@ -179,7 +189,7 @@ static void ini_error(const char *msg)
}
if (CG(ini_parser_unbuffered_errors)) {
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
syslog(LOG_ALERT, "PHP: %s (%s)", error_buf, GetCommandLine());
#endif
fprintf(stderr, "PHP: %s", error_buf);
@@ -300,7 +310,11 @@ statement:
#endif
ZEND_INI_PARSER_CB(&$1, &$5, &$2, ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG);
zend_string_release(Z_STR($1));
- zend_string_release(Z_STR($2));
+ if (Z_TYPE($2) == IS_STRING) {
+ zend_string_release(Z_STR($2));
+ } else {
+ zval_dtor(&$2);
+ }
zval_ptr_dtor(&$5);
}
| TC_LABEL { ZEND_INI_PARSER_CB(&$1, NULL, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); zend_string_release(Z_STR($1)); }
diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c
index 6eb1ff716e..c0a9eefc24 100644
--- a/Zend/zend_ini_scanner.c
+++ b/Zend/zend_ini_scanner.c
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -114,7 +114,7 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
/* Eat leading whitespace */
#define EAT_LEADING_WHITESPACE() \
- while (yytext[0]) { \
+ while (yyleng) { \
if (yytext[0] == ' ' || yytext[0] == '\t') { \
SCNG(yy_text)++; \
yyleng--; \
@@ -125,7 +125,7 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
/* Eat trailing whitespace + extra char */
#define EAT_TRAILING_WHITESPACE_EX(ch) \
- while (yyleng > 0 && ( \
+ while (yyleng && ( \
(ch != 'X' && yytext[yyleng - 1] == ch) || \
yytext[yyleng - 1] == '\n' || \
yytext[yyleng - 1] == '\r' || \
@@ -257,7 +257,7 @@ void shutdown_ini_scanner(void)
/* {{{ zend_ini_scanner_get_lineno()
*/
-int zend_ini_scanner_get_lineno(void)
+ZEND_COLD int zend_ini_scanner_get_lineno(void)
{
return SCNG(lineno);
}
@@ -265,7 +265,7 @@ int zend_ini_scanner_get_lineno(void)
/* {{{ zend_ini_scanner_get_filename()
*/
-char *zend_ini_scanner_get_filename(void)
+ZEND_COLD char *zend_ini_scanner_get_filename(void)
{
return ini_filename ? ini_filename : "Unknown";
}
diff --git a/Zend/zend_ini_scanner.h b/Zend/zend_ini_scanner.h
index 661197661c..643302c6cf 100644
--- a/Zend/zend_ini_scanner.h
+++ b/Zend/zend_ini_scanner.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,8 +28,8 @@
#define ZEND_INI_SCANNER_TYPED 2 /* Typed mode. */
BEGIN_EXTERN_C()
-int zend_ini_scanner_get_lineno(void);
-char *zend_ini_scanner_get_filename(void);
+ZEND_COLD int zend_ini_scanner_get_lineno(void);
+ZEND_COLD char *zend_ini_scanner_get_filename(void);
int zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode);
int zend_ini_prepare_string_for_scanning(char *str, int scanner_mode);
int ini_lex(zval *ini_lval);
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l
index 8cc7266ebb..0aeeca9168 100644
--- a/Zend/zend_ini_scanner.l
+++ b/Zend/zend_ini_scanner.l
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -112,7 +112,7 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
/* Eat leading whitespace */
#define EAT_LEADING_WHITESPACE() \
- while (yytext[0]) { \
+ while (yyleng) { \
if (yytext[0] == ' ' || yytext[0] == '\t') { \
SCNG(yy_text)++; \
yyleng--; \
@@ -123,7 +123,7 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
/* Eat trailing whitespace + extra char */
#define EAT_TRAILING_WHITESPACE_EX(ch) \
- while (yyleng > 0 && ( \
+ while (yyleng && ( \
(ch != 'X' && yytext[yyleng - 1] == ch) || \
yytext[yyleng - 1] == '\n' || \
yytext[yyleng - 1] == '\r' || \
@@ -255,7 +255,7 @@ void shutdown_ini_scanner(void)
/* {{{ zend_ini_scanner_get_lineno()
*/
-int zend_ini_scanner_get_lineno(void)
+ZEND_COLD int zend_ini_scanner_get_lineno(void)
{
return SCNG(lineno);
}
@@ -263,7 +263,7 @@ int zend_ini_scanner_get_lineno(void)
/* {{{ zend_ini_scanner_get_filename()
*/
-char *zend_ini_scanner_get_filename(void)
+ZEND_COLD char *zend_ini_scanner_get_filename(void)
{
return ini_filename ? ini_filename : "Unknown";
}
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index d1245bb396..2dadb39b17 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -55,12 +55,10 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
fci.param_count = param_count;
fci.params = params;
fci.no_separation = 1;
- fci.symbol_table = NULL;
if (!fn_proxy && !obj_ce) {
/* no interest in caching and no information already present that is
* needed later inside zend_call_function. */
- fci.function_table = !object ? EG(function_table) : NULL;
result = zend_call_function(&fci, NULL);
zval_ptr_dtor(&fci.function_name);
} else {
@@ -262,7 +260,7 @@ static zend_object_iterator *zend_user_it_get_iterator(zend_class_entry *ce, zva
zend_user_iterator *iterator;
if (by_ref) {
- zend_throw_error(zend_ce_error, "An iterator cannot be used with foreach by reference");
+ zend_throw_error(NULL, "An iterator cannot be used with foreach by reference");
return NULL;
}
diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h
index 1f7b9b3860..9e9ffce80c 100644
--- a/Zend/zend_interfaces.h
+++ b/Zend/zend_interfaces.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_istdiostream.h b/Zend/zend_istdiostream.h
index 42facf4a7e..5435413c3a 100644
--- a/Zend/zend_istdiostream.h
+++ b/Zend/zend_istdiostream.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c
index 8914f08121..b08fc24831 100644
--- a/Zend/zend_iterators.c
+++ b/Zend/zend_iterators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -81,7 +81,7 @@ ZEND_API void zend_iterator_init(zend_object_iterator *iter)
ZEND_API void zend_iterator_dtor(zend_object_iterator *iter)
{
- if (--GC_REFCOUNT(iter) > 0) {
+ if (--GC_REFCOUNT(&iter->std) > 0) {
return;
}
@@ -90,8 +90,8 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter)
ZEND_API zend_object_iterator* zend_iterator_unwrap(zval *array_ptr)
{
- if (Z_TYPE_P(array_ptr) &&
- Z_OBJ_HT_P(array_ptr) == &iterator_object_handlers) {
+ ZEND_ASSERT(Z_TYPE_P(array_ptr) == IS_OBJECT);
+ if (Z_OBJ_HT_P(array_ptr) == &iterator_object_handlers) {
return (zend_object_iterator *)Z_OBJ_P(array_ptr);
}
return NULL;
diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h
index fd6ae2508c..0b05a17c20 100644
--- a/Zend/zend_iterators.h
+++ b/Zend/zend_iterators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 39d89775d9..44c5cfb12b 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -229,7 +229,8 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%type <ast> class_declaration_statement trait_declaration_statement
%type <ast> interface_declaration_statement interface_extends_list
%type <ast> group_use_declaration inline_use_declarations inline_use_declaration
-%type <ast> mixed_group_use_declaration use_declaration const_decl inner_statement
+%type <ast> mixed_group_use_declaration use_declaration unprefixed_use_declaration
+%type <ast> unprefixed_use_declarations const_decl inner_statement
%type <ast> expr optional_expr while_statement for_statement foreach_variable
%type <ast> foreach_statement declare_statement finally_statement unset_variable variable
%type <ast> extends_from parameter optional_type argument expr_without_variable global_var
@@ -240,21 +241,22 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%type <ast> exit_expr scalar backticks_expr lexical_var function_call member_name property_name
%type <ast> variable_class_name dereferencable_scalar constant dereferencable
%type <ast> callable_expr callable_variable static_member new_variable
-%type <ast> assignment_list_element array_pair encaps_var encaps_var_offset isset_variables
+%type <ast> encaps_var encaps_var_offset isset_variables
%type <ast> top_statement_list use_declarations const_list inner_statement_list if_stmt
%type <ast> alt_if_stmt for_exprs switch_case_list global_var_list static_var_list
-%type <ast> echo_expr_list unset_variables catch_list parameter_list class_statement_list
+%type <ast> echo_expr_list unset_variables catch_name_list catch_list parameter_list class_statement_list
%type <ast> implements_list case_list if_stmt_without_else
%type <ast> non_empty_parameter_list argument_list non_empty_argument_list property_list
%type <ast> class_const_list class_const_decl name_list trait_adaptations method_body non_empty_for_exprs
%type <ast> ctor_arguments alt_if_stmt_without_else trait_adaptation_list lexical_vars
-%type <ast> lexical_var_list encaps_list array_pair_list non_empty_array_pair_list
-%type <ast> assignment_list isset_variable type return_type
+%type <ast> lexical_var_list encaps_list
+%type <ast> array_pair non_empty_array_pair_list array_pair_list
+%type <ast> isset_variable type return_type type_expr
%type <ast> identifier
%type <num> returns_ref function is_reference is_variadic variable_modifiers
%type <num> method_modifiers non_empty_member_modifiers member_modifier
-%type <num> class_modifiers class_modifier use_type
+%type <num> class_modifiers class_modifier use_type backup_fn_flags
%type <str> backup_doc_comment
@@ -271,6 +273,7 @@ reserved_non_modifiers:
| T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
| T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT | T_BREAK
| T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS
+ | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C
;
semi_reserved:
@@ -335,13 +338,17 @@ use_type:
;
group_use_declaration:
- namespace_name T_NS_SEPARATOR '{' use_declarations '}'
- {$$ = zend_ast_create(ZEND_AST_GROUP_USE, $1, $4); }
+ namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
+ { $$ = zend_ast_create(ZEND_AST_GROUP_USE, $1, $4); }
+ | T_NS_SEPARATOR namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
+ { $$ = zend_ast_create(ZEND_AST_GROUP_USE, $2, $5); }
;
mixed_group_use_declaration:
- namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}'
- {$$ = zend_ast_create(ZEND_AST_GROUP_USE, $1, $4);}
+ namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}'
+ { $$ = zend_ast_create(ZEND_AST_GROUP_USE, $1, $4);}
+ | T_NS_SEPARATOR namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}'
+ { $$ = zend_ast_create(ZEND_AST_GROUP_USE, $2, $5); }
;
inline_use_declarations:
@@ -351,9 +358,11 @@ inline_use_declarations:
{ $$ = zend_ast_create_list(1, ZEND_AST_USE, $1); }
;
-inline_use_declaration:
- use_declaration { $$ = $1; $$->attr = T_CLASS; }
- | use_type use_declaration { $$ = $2; $$->attr = $1; }
+unprefixed_use_declarations:
+ unprefixed_use_declarations ',' unprefixed_use_declaration
+ { $$ = zend_ast_list_add($1, $3); }
+ | unprefixed_use_declaration
+ { $$ = zend_ast_create_list(1, ZEND_AST_USE, $1); }
;
use_declarations:
@@ -363,15 +372,21 @@ use_declarations:
{ $$ = zend_ast_create_list(1, ZEND_AST_USE, $1); }
;
-use_declaration:
+inline_use_declaration:
+ unprefixed_use_declaration { $$ = $1; $$->attr = T_CLASS; }
+ | use_type unprefixed_use_declaration { $$ = $2; $$->attr = $1; }
+;
+
+unprefixed_use_declaration:
namespace_name
{ $$ = zend_ast_create(ZEND_AST_USE_ELEM, $1, NULL); }
| namespace_name T_AS T_STRING
{ $$ = zend_ast_create(ZEND_AST_USE_ELEM, $1, $3); }
- | T_NS_SEPARATOR namespace_name
- { $$ = zend_ast_create(ZEND_AST_USE_ELEM, $2, NULL); }
- | T_NS_SEPARATOR namespace_name T_AS T_STRING
- { $$ = zend_ast_create(ZEND_AST_USE_ELEM, $2, $4); }
+;
+
+use_declaration:
+ unprefixed_use_declaration { $$ = $1; }
+ | T_NS_SEPARATOR unprefixed_use_declaration { $$ = $2; }
;
const_list:
@@ -440,10 +455,15 @@ statement:
catch_list:
/* empty */
{ $$ = zend_ast_create_list(0, ZEND_AST_CATCH_LIST); }
- | catch_list T_CATCH '(' name T_VARIABLE ')' '{' inner_statement_list '}'
+ | catch_list T_CATCH '(' catch_name_list T_VARIABLE ')' '{' inner_statement_list '}'
{ $$ = zend_ast_list_add($1, zend_ast_create(ZEND_AST_CATCH, $4, $5, $8)); }
;
+catch_name_list:
+ name { $$ = zend_ast_create_list(1, ZEND_AST_NAME_LIST, $1); }
+ | catch_name_list '|' name { $$ = zend_ast_list_add($1, $3); }
+;
+
finally_statement:
/* empty */ { $$ = NULL; }
| T_FINALLY '{' inner_statement_list '}' { $$ = $3; }
@@ -459,10 +479,10 @@ unset_variable:
;
function_declaration_statement:
- function returns_ref T_STRING '(' parameter_list ')' return_type
- backup_doc_comment '{' inner_statement_list '}'
- { $$ = zend_ast_create_decl(ZEND_AST_FUNC_DECL, $2, $1, $8,
- zend_ast_get_str($3), $5, NULL, $10, $7); }
+ function returns_ref T_STRING backup_doc_comment '(' parameter_list ')' return_type
+ backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
+ { $$ = zend_ast_create_decl(ZEND_AST_FUNC_DECL, $2 | $13, $1, $4,
+ zend_ast_get_str($3), $6, NULL, $11, $8); CG(extra_fn_flags) = $9; }
;
is_reference:
@@ -524,7 +544,8 @@ implements_list:
foreach_variable:
variable { $$ = $1; }
| '&' variable { $$ = zend_ast_create(ZEND_AST_REF, $2); }
- | T_LIST '(' assignment_list ')' { $$ = $3; }
+ | T_LIST '(' array_pair_list ')' { $3->attr = 1; $$ = $3; }
+ | '[' array_pair_list ']' { $$ = $2; }
;
for_statement:
@@ -623,7 +644,12 @@ parameter:
optional_type:
/* empty */ { $$ = NULL; }
- | type { $$ = $1; }
+ | type_expr { $$ = $1; }
+;
+
+type_expr:
+ type { $$ = $1; }
+ | '?' type { $$ = $2; $$->attr |= ZEND_TYPE_NULLABLE; }
;
type:
@@ -634,7 +660,7 @@ type:
return_type:
/* empty */ { $$ = NULL; }
- | ':' type { $$ = $2; }
+ | ':' type_expr { $$ = $2; }
;
argument_list:
@@ -686,15 +712,15 @@ class_statement_list:
class_statement:
variable_modifiers property_list ';'
- { $$ = zend_ast_append_doc_comment($2); $$->attr = $1; }
- | T_CONST class_const_list ';'
- { $$ = $2; RESET_DOC_COMMENT(); }
+ { $$ = $2; $$->attr = $1; }
+ | method_modifiers T_CONST class_const_list ';'
+ { $$ = $3; $$->attr = $1; }
| T_USE name_list trait_adaptations
{ $$ = zend_ast_create(ZEND_AST_USE_TRAIT, $2, $3); }
- | method_modifiers function returns_ref identifier '(' parameter_list ')'
- return_type backup_doc_comment method_body
- { $$ = zend_ast_create_decl(ZEND_AST_METHOD, $3 | $1, $2, $9,
- zend_ast_get_str($4), $6, NULL, $10, $8); }
+ | method_modifiers function returns_ref identifier backup_doc_comment '(' parameter_list ')'
+ return_type backup_fn_flags method_body backup_fn_flags
+ { $$ = zend_ast_create_decl(ZEND_AST_METHOD, $3 | $1 | $12, $2, $5,
+ zend_ast_get_str($4), $7, NULL, $11, $9); CG(extra_fn_flags) = $10; }
;
name_list:
@@ -784,9 +810,10 @@ property_list:
;
property:
- T_VARIABLE { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, NULL); }
- | T_VARIABLE '=' expr
- { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, $3); }
+ T_VARIABLE backup_doc_comment
+ { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, NULL, ($2 ? zend_ast_create_zval_from_str($2) : NULL)); }
+ | T_VARIABLE '=' expr backup_doc_comment
+ { $$ = zend_ast_create(ZEND_AST_PROP_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL)); }
;
class_const_list:
@@ -795,11 +822,11 @@ class_const_list:
;
class_const_decl:
- identifier '=' expr { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3); }
+ identifier '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL)); }
;
const_decl:
- T_STRING '=' expr { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3); }
+ T_STRING '=' expr backup_doc_comment { $$ = zend_ast_create(ZEND_AST_CONST_ELEM, $1, $3, ($4 ? zend_ast_create_zval_from_str($4) : NULL)); }
;
echo_expr_list:
@@ -838,8 +865,10 @@ new_expr:
;
expr_without_variable:
- T_LIST '(' assignment_list ')' '=' expr
- { $$ = zend_ast_create(ZEND_AST_ASSIGN, $3, $6); }
+ T_LIST '(' array_pair_list ')' '=' expr
+ { $3->attr = 1; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3, $6); }
+ | '[' array_pair_list ']' '=' expr
+ { $$ = zend_ast_create(ZEND_AST_ASSIGN, $2, $5); }
| variable '=' expr
{ $$ = zend_ast_create(ZEND_AST_ASSIGN, $1, $3); }
| variable '=' '&' variable
@@ -940,20 +969,20 @@ expr_without_variable:
| scalar { $$ = $1; }
| '`' backticks_expr '`' { $$ = zend_ast_create(ZEND_AST_SHELL_EXEC, $2); }
| T_PRINT expr { $$ = zend_ast_create(ZEND_AST_PRINT, $2); }
- | T_YIELD { $$ = zend_ast_create(ZEND_AST_YIELD, NULL, NULL); }
- | T_YIELD expr { $$ = zend_ast_create(ZEND_AST_YIELD, $2, NULL); }
- | T_YIELD expr T_DOUBLE_ARROW expr { $$ = zend_ast_create(ZEND_AST_YIELD, $4, $2); }
- | T_YIELD_FROM expr { $$ = zend_ast_create(ZEND_AST_YIELD_FROM, $2); }
- | function returns_ref '(' parameter_list ')' lexical_vars return_type
- backup_doc_comment '{' inner_statement_list '}'
- { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $2, $1, $8,
+ | T_YIELD { $$ = zend_ast_create(ZEND_AST_YIELD, NULL, NULL); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; }
+ | T_YIELD expr { $$ = zend_ast_create(ZEND_AST_YIELD, $2, NULL); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; }
+ | T_YIELD expr T_DOUBLE_ARROW expr { $$ = zend_ast_create(ZEND_AST_YIELD, $4, $2); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; }
+ | T_YIELD_FROM expr { $$ = zend_ast_create(ZEND_AST_YIELD_FROM, $2); CG(extra_fn_flags) |= ZEND_ACC_GENERATOR; }
+ | function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type
+ backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
+ { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $2 | $13, $1, $3,
zend_string_init("{closure}", sizeof("{closure}") - 1, 0),
- $4, $6, $10, $7); }
- | T_STATIC function returns_ref '(' parameter_list ')' lexical_vars
- return_type backup_doc_comment '{' inner_statement_list '}'
- { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $3 | ZEND_ACC_STATIC, $2, $9,
+ $5, $7, $11, $8); CG(extra_fn_flags) = $9; }
+ | T_STATIC function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars
+ return_type backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
+ { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $3 | $14 | ZEND_ACC_STATIC, $2, $4,
zend_string_init("{closure}", sizeof("{closure}") - 1, 0),
- $5, $7, $11, $8); }
+ $6, $8, $12, $9); CG(extra_fn_flags) = $10; }
;
function:
@@ -964,6 +993,10 @@ backup_doc_comment:
/* empty */ { $$ = CG(doc_comment); CG(doc_comment) = NULL; }
;
+backup_fn_flags:
+ /* empty */ { $$ = CG(extra_fn_flags); CG(extra_fn_flags) = 0; }
+;
+
returns_ref:
/* empty */ { $$ = 0; }
| '&' { $$ = ZEND_ACC_RETURN_REFERENCE; }
@@ -997,7 +1030,7 @@ function_call:
class_name:
T_STATIC
- { zval zv; ZVAL_STRINGL(&zv, "static", sizeof("static")-1);
+ { zval zv; ZVAL_INTERNED_STR(&zv, CG(known_strings)[ZEND_STR_STATIC]);
$$ = zend_ast_create_zval_ex(&zv, ZEND_NAME_NOT_FQ); }
| name { $$ = $1; }
;
@@ -1060,11 +1093,6 @@ constant:
{ $$ = zend_ast_create(ZEND_AST_CLASS_CONST, $1, $3); }
;
-possible_comma:
- /* empty */
- | ','
-;
-
expr:
variable { $$ = $1; }
| expr_without_variable { $$ = $1; }
@@ -1154,23 +1182,9 @@ property_name:
| simple_variable { $$ = zend_ast_create(ZEND_AST_VAR, $1); }
;
-assignment_list:
- assignment_list ',' assignment_list_element
- { $$ = zend_ast_list_add($1, $3); }
- | assignment_list_element
- { $$ = zend_ast_create_list(1, ZEND_AST_LIST, $1); }
-;
-
-assignment_list_element:
- variable { $$ = $1; }
- | T_LIST '(' assignment_list ')' { $$ = $3; }
- | /* empty */ { $$ = NULL; }
-;
-
-
array_pair_list:
/* empty */ { $$ = zend_ast_create_list(0, ZEND_AST_ARRAY); }
- | non_empty_array_pair_list possible_comma { $$ = $1; }
+ | non_empty_array_pair_list { /* allow single trailing comma */ zend_ast_list *list = zend_ast_get_list($$ = $1); if (list->child[list->children - 1] == NULL) { list->children--; } }
;
non_empty_array_pair_list:
@@ -1178,16 +1192,27 @@ non_empty_array_pair_list:
{ $$ = zend_ast_list_add($1, $3); }
| array_pair
{ $$ = zend_ast_create_list(1, ZEND_AST_ARRAY, $1); }
+ | non_empty_array_pair_list ',' /* empty, for LHS array lists */
+ { $$ = zend_ast_list_add($1, NULL); }
+ | ','
+ { $$ = zend_ast_create_list(1, ZEND_AST_ARRAY, NULL); }
+ | ',' array_pair
+ { $$ = zend_ast_create_list(2, ZEND_AST_ARRAY, NULL, $2); }
;
array_pair:
expr T_DOUBLE_ARROW expr
{ $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $3, $1); }
- | expr { $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $1, NULL); }
+ | expr
+ { $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $1, NULL); }
| expr T_DOUBLE_ARROW '&' variable
{ $$ = zend_ast_create_ex(ZEND_AST_ARRAY_ELEM, 1, $4, $1); }
| '&' variable
{ $$ = zend_ast_create_ex(ZEND_AST_ARRAY_ELEM, 1, $2, NULL); }
+ | expr T_DOUBLE_ARROW T_LIST '(' array_pair_list ')'
+ { $5->attr = 1; $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $5, $1); }
+ | T_LIST '(' array_pair_list ')'
+ { $3->attr = 1; $$ = zend_ast_create(ZEND_AST_ARRAY_ELEM, $3, NULL); }
;
encaps_list:
@@ -1263,50 +1288,66 @@ isset_variable:
would have been. */
static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
{
- if (!yyres) {
- return yystrlen(yystr);
+ /* CG(parse_error) states:
+ * 0 => yyres = NULL, yystr is the unexpected token
+ * 1 => yyres = NULL, yystr is one of the expected tokens
+ * 2 => yyres != NULL, yystr is the unexpected token
+ * 3 => yyres != NULL, yystr is one of the expected tokens
+ */
+ if (yyres && CG(parse_error) < 2) {
+ CG(parse_error) = 2;
}
- {
- if (CG(parse_error) == 0) {
- char buffer[120];
- const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL;
- unsigned int len = 0, toklen = 0, yystr_len;
- CG(parse_error) = 1;
+ if (CG(parse_error) % 2 == 0) {
+ /* The unexpected token */
+ char buffer[120];
+ const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL;
+ unsigned int len = 0, toklen = 0, yystr_len;
- if (LANG_SCNG(yy_text)[0] == 0 &&
- LANG_SCNG(yy_leng) == 1 &&
- memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
+ CG(parse_error)++;
+
+ if (LANG_SCNG(yy_text)[0] == 0 &&
+ LANG_SCNG(yy_leng) == 1 &&
+ memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
+ if (yyres) {
yystpcpy(yyres, "end of file");
- return sizeof("end of file")-1;
}
+ return sizeof("end of file")-1;
+ }
- str = LANG_SCNG(yy_text);
- end = memchr(str, '\n', LANG_SCNG(yy_leng));
- yystr_len = (unsigned int)yystrlen(yystr);
+ str = LANG_SCNG(yy_text);
+ end = memchr(str, '\n', LANG_SCNG(yy_leng));
+ yystr_len = (unsigned int)yystrlen(yystr);
- if ((tok1 = memchr(yystr, '(', yystr_len)) != NULL
- && (tok2 = zend_memrchr(yystr, ')', yystr_len)) != NULL) {
- toklen = (tok2 - tok1) + 1;
- } else {
- tok1 = tok2 = NULL;
- toklen = 0;
- }
+ if ((tok1 = memchr(yystr, '(', yystr_len)) != NULL
+ && (tok2 = zend_memrchr(yystr, ')', yystr_len)) != NULL) {
+ toklen = (tok2 - tok1) + 1;
+ } else {
+ tok1 = tok2 = NULL;
+ toklen = 0;
+ }
- if (end == NULL) {
- len = LANG_SCNG(yy_leng) > 30 ? 30 : LANG_SCNG(yy_leng);
- } else {
- len = (end - str) > 30 ? 30 : (end - str);
- }
+ if (end == NULL) {
+ len = LANG_SCNG(yy_leng) > 30 ? 30 : LANG_SCNG(yy_leng);
+ } else {
+ len = (end - str) > 30 ? 30 : (end - str);
+ }
+ if (yyres) {
if (toklen) {
snprintf(buffer, sizeof(buffer), "'%.*s' %.*s", len, str, toklen, tok1);
} else {
snprintf(buffer, sizeof(buffer), "'%.*s'", len, str);
}
yystpcpy(yyres, buffer);
- return len + (toklen ? toklen + 1 : 0) + 2;
}
+ return len + (toklen ? toklen + 1 : 0) + 2;
}
+
+ /* One of the expected tokens */
+ if (!yyres) {
+ return yystrlen(yystr) - (*yystr == '"' ? 2 : 0);
+ }
+
if (*yystr == '"') {
YYSIZE_T yyn = 0;
const char *yyp = yystr;
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 9e2250b926..939e22bc26 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -35,7 +35,7 @@
#include <errno.h>
#include "zend.h"
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
# include <Winuser.h>
#endif
#include "zend_alloc.h"
@@ -118,7 +118,7 @@ do { \
#define SET_DOUBLE_QUOTES_SCANNED_LENGTH(len) SCNG(scanned_string_len) = (len)
#define GET_DOUBLE_QUOTES_SCANNED_LENGTH() SCNG(scanned_string_len)
-#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x7F)
+#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x80)
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
@@ -180,6 +180,7 @@ void startup_scanner(void)
{
CG(parse_error) = 0;
CG(doc_comment) = NULL;
+ CG(extra_fn_flags) = 0;
zend_stack_init(&SCNG(state_stack), sizeof(int));
zend_ptr_stack_init(&SCNG(heredoc_label_stack));
}
@@ -570,6 +571,48 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle)
}
END_EXTERN_C()
+static zend_op_array *zend_compile(int type)
+{
+ zend_op_array *op_array = NULL;
+ zend_bool original_in_compilation = CG(in_compilation);
+
+ CG(in_compilation) = 1;
+ CG(ast) = NULL;
+ CG(ast_arena) = zend_arena_create(1024 * 32);
+
+ if (!zendparse()) {
+ zend_file_context original_file_context;
+ zend_oparray_context original_oparray_context;
+ zend_op_array *original_active_op_array = CG(active_op_array);
+
+ op_array = emalloc(sizeof(zend_op_array));
+ init_op_array(op_array, type, INITIAL_OP_ARRAY_SIZE);
+ CG(active_op_array) = op_array;
+
+ if (zend_ast_process) {
+ zend_ast_process(CG(ast));
+ }
+
+ zend_file_context_begin(&original_file_context);
+ zend_oparray_context_begin(&original_oparray_context);
+ zend_compile_top_stmt(CG(ast));
+ zend_emit_final_return(type == ZEND_USER_FUNCTION);
+ op_array->line_start = 1;
+ op_array->line_end = CG(zend_lineno);
+ pass_two(op_array);
+ zend_oparray_context_end(&original_oparray_context);
+ zend_file_context_end(&original_file_context);
+
+ CG(active_op_array) = original_active_op_array;
+ }
+
+ zend_ast_destroy(CG(ast));
+ zend_arena_destroy(CG(ast_arena));
+
+ CG(in_compilation) = original_in_compilation;
+
+ return op_array;
+}
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type)
{
@@ -585,41 +628,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type)
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
}
} else {
- zend_bool original_in_compilation = CG(in_compilation);
- CG(in_compilation) = 1;
-
- CG(ast) = NULL;
- CG(ast_arena) = zend_arena_create(1024 * 32);
- if (!zendparse()) {
- zval retval_zv;
- zend_file_context original_file_context;
- zend_oparray_context original_oparray_context;
- zend_op_array *original_active_op_array = CG(active_op_array);
- op_array = emalloc(sizeof(zend_op_array));
- init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
- CG(active_op_array) = op_array;
- ZVAL_LONG(&retval_zv, 1);
-
- if (zend_ast_process) {
- zend_ast_process(CG(ast));
- }
-
- zend_file_context_begin(&original_file_context);
- zend_oparray_context_begin(&original_oparray_context);
- zend_compile_top_stmt(CG(ast));
- zend_emit_final_return(&retval_zv);
- op_array->line_start = 1;
- op_array->line_end = CG(zend_lineno);
- pass_two(op_array);
- zend_oparray_context_end(&original_oparray_context);
- zend_file_context_end(&original_file_context);
-
- CG(active_op_array) = original_active_op_array;
- }
-
- zend_ast_destroy(CG(ast));
- zend_arena_destroy(CG(ast_arena));
- CG(in_compilation) = original_in_compilation;
+ op_array = zend_compile(ZEND_USER_FUNCTION);
}
zend_restore_lexical_state(&original_lex_state);
@@ -734,13 +743,11 @@ ZEND_API size_t zend_get_scanned_file_offset(void)
return offset;
}
-
zend_op_array *compile_string(zval *source_string, char *filename)
{
zend_lex_state original_lex_state;
zend_op_array *op_array = NULL;
zval tmp;
- zend_bool original_in_compilation = CG(in_compilation);
if (Z_STRLEN_P(source_string)==0) {
return NULL;
@@ -750,45 +757,15 @@ zend_op_array *compile_string(zval *source_string, char *filename)
convert_to_string(&tmp);
source_string = &tmp;
- CG(in_compilation) = 1;
zend_save_lexical_state(&original_lex_state);
if (zend_prepare_string_for_scanning(source_string, filename) == SUCCESS) {
- CG(ast) = NULL;
- CG(ast_arena) = zend_arena_create(1024 * 32);
BEGIN(ST_IN_SCRIPTING);
-
- if (!zendparse()) {
- zend_file_context original_file_context;
- zend_oparray_context original_oparray_context;
- zend_op_array *original_active_op_array = CG(active_op_array);
- op_array = emalloc(sizeof(zend_op_array));
- init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE);
- CG(active_op_array) = op_array;
-
- if (zend_ast_process) {
- zend_ast_process(CG(ast));
- }
-
- zend_file_context_begin(&original_file_context);
- zend_oparray_context_begin(&original_oparray_context);
- zend_compile_top_stmt(CG(ast));
- zend_emit_final_return(NULL);
- op_array->line_start = 1;
- op_array->line_end = CG(zend_lineno);
- pass_two(op_array);
- zend_oparray_context_end(&original_oparray_context);
- zend_file_context_end(&original_file_context);
-
- CG(active_op_array) = original_active_op_array;
- }
-
- zend_ast_destroy(CG(ast));
- zend_arena_destroy(CG(ast_arena));
+ op_array = zend_compile(ZEND_EVAL_CODE);
}
zend_restore_lexical_state(&original_lex_state);
zval_dtor(&tmp);
- CG(in_compilation) = original_in_compilation;
+
return op_array;
}
@@ -929,7 +906,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
Z_STRLEN_P(zendlval)--;
break;
case 'e':
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
*t++ = VK_ESCAPE;
#else
*t++ = '\e';
@@ -1011,8 +988,9 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
if (!valid) {
zend_throw_exception(zend_ce_parse_error,
- "Invalid UTF-8 codepoint escape sequence", E_PARSE);
+ "Invalid UTF-8 codepoint escape sequence", 0);
zval_ptr_dtor(zendlval);
+ ZVAL_UNDEF(zendlval);
return FAILURE;
}
@@ -1022,8 +1000,9 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
/* per RFC 3629, UTF-8 can only represent 21 bits */
if (codepoint > 0x10FFFF || errno) {
zend_throw_exception(zend_ce_parse_error,
- "Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE);
+ "Invalid UTF-8 codepoint escape sequence: Codepoint too large", 0);
zval_ptr_dtor(zendlval);
+ ZVAL_UNDEF(zendlval);
return FAILURE;
}
@@ -1067,6 +1046,12 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
Z_STRLEN_P(zendlval)--;
}
}
+ if (octal_buf[2] &&
+ (octal_buf[0] > '3')) {
+ /* 3 octit values must not overflow 0xFF (\377) */
+ zend_error(E_COMPILE_WARNING, "Octal escape sequence overflow \\%s is greater than \\377", octal_buf);
+ }
+
*t++ = (char) ZEND_STRTOL(octal_buf, NULL, 8);
} else {
*t++ = '\\';
@@ -1115,7 +1100,7 @@ restart:
SCNG(yy_text) = YYCURSOR;
-#line 1119 "Zend/zend_language_scanner.c"
+#line 1104 "Zend/zend_language_scanner.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -1169,7 +1154,7 @@ yyc_INITIAL:
yy3:
YYDEBUG(3, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1807 "Zend/zend_language_scanner.l"
+#line 1796 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
@@ -1214,7 +1199,7 @@ inline_char_handler:
HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN(T_INLINE_HTML);
}
-#line 1218 "Zend/zend_language_scanner.c"
+#line 1203 "Zend/zend_language_scanner.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1232,7 +1217,7 @@ yy5:
yy6:
YYDEBUG(6, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1798 "Zend/zend_language_scanner.l"
+#line 1787 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
BEGIN(ST_IN_SCRIPTING);
@@ -1241,18 +1226,18 @@ yy6:
goto inline_char_handler;
}
}
-#line 1245 "Zend/zend_language_scanner.c"
+#line 1230 "Zend/zend_language_scanner.c"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
YYDEBUG(8, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1785 "Zend/zend_language_scanner.l"
+#line 1774 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN(T_OPEN_TAG_WITH_ECHO);
}
-#line 1256 "Zend/zend_language_scanner.c"
+#line 1241 "Zend/zend_language_scanner.c"
yy9:
YYDEBUG(9, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1283,13 +1268,13 @@ yy13:
yy14:
YYDEBUG(14, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1791 "Zend/zend_language_scanner.l"
+#line 1780 "Zend/zend_language_scanner.l"
{
HANDLE_NEWLINE(yytext[yyleng-1]);
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN(T_OPEN_TAG);
}
-#line 1293 "Zend/zend_language_scanner.c"
+#line 1278 "Zend/zend_language_scanner.c"
yy15:
YYDEBUG(15, *YYCURSOR);
++YYCURSOR;
@@ -1314,7 +1299,7 @@ yyc_ST_BACKQUOTE:
0, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 128,
+ 128, 128, 128, 0, 0, 0, 0, 0,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
@@ -1353,13 +1338,13 @@ yyc_ST_BACKQUOTE:
if (yych >= 'a') goto yy26;
} else {
if (yych <= '{') goto yy29;
- if (yych >= 0x7F) goto yy26;
+ if (yych >= 0x80) goto yy26;
}
}
yy19:
YYDEBUG(19, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2221 "Zend/zend_language_scanner.l"
+#line 2206 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
@@ -1397,12 +1382,10 @@ yy19:
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext, yyleng, '`') == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext, yyleng, '`');
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
-#line 1406 "Zend/zend_language_scanner.c"
+#line 1389 "Zend/zend_language_scanner.c"
yy20:
YYDEBUG(20, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1413,12 +1396,12 @@ yy21:
++YYCURSOR;
YYDEBUG(22, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2163 "Zend/zend_language_scanner.l"
+#line 2150 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN('`');
}
-#line 1422 "Zend/zend_language_scanner.c"
+#line 1405 "Zend/zend_language_scanner.c"
yy23:
YYDEBUG(23, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1428,14 +1411,14 @@ yy24:
++YYCURSOR;
YYDEBUG(25, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2150 "Zend/zend_language_scanner.l"
+#line 2137 "Zend/zend_language_scanner.l"
{
Z_LVAL_P(zendlval) = (zend_long) '{';
yy_push_state(ST_IN_SCRIPTING);
yyless(1);
RETURN_TOKEN(T_CURLY_OPEN);
}
-#line 1439 "Zend/zend_language_scanner.c"
+#line 1422 "Zend/zend_language_scanner.c"
yy26:
YYDEBUG(26, *YYCURSOR);
yyaccept = 0;
@@ -1451,23 +1434,23 @@ yy26:
yy28:
YYDEBUG(28, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1861 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1460 "Zend/zend_language_scanner.c"
+#line 1443 "Zend/zend_language_scanner.c"
yy29:
YYDEBUG(29, *YYCURSOR);
++YYCURSOR;
YYDEBUG(30, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1593 "Zend/zend_language_scanner.l"
+#line 1579 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME);
RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
}
-#line 1471 "Zend/zend_language_scanner.c"
+#line 1454 "Zend/zend_language_scanner.c"
yy31:
YYDEBUG(31, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1481,14 +1464,14 @@ yy33:
++YYCURSOR;
YYDEBUG(34, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1854 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1492 "Zend/zend_language_scanner.c"
+#line 1475 "Zend/zend_language_scanner.c"
yy35:
YYDEBUG(35, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1499,21 +1482,21 @@ yy35:
} else {
if (yych <= '`') goto yy32;
if (yych <= 'z') goto yy36;
- if (yych <= '~') goto yy32;
+ if (yych <= 0x7F) goto yy32;
}
yy36:
YYDEBUG(36, *YYCURSOR);
++YYCURSOR;
YYDEBUG(37, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1856 "Zend/zend_language_scanner.l"
+#line 1845 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1517 "Zend/zend_language_scanner.c"
+#line 1500 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
@@ -1534,7 +1517,7 @@ yyc_ST_DOUBLE_QUOTES:
0, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 128,
+ 128, 128, 128, 0, 0, 0, 0, 0,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
@@ -1575,13 +1558,13 @@ yy40:
if (yych >= 'a') goto yy48;
} else {
if (yych <= '{') goto yy51;
- if (yych >= 0x7F) goto yy48;
+ if (yych >= 0x80) goto yy48;
}
}
yy41:
YYDEBUG(41, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2169 "Zend/zend_language_scanner.l"
+#line 2156 "Zend/zend_language_scanner.l"
{
if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) {
YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1;
@@ -1627,12 +1610,10 @@ yy41:
double_quotes_scan_done:
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext, yyleng, '"') == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext, yyleng, '"');
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
-#line 1636 "Zend/zend_language_scanner.c"
+#line 1617 "Zend/zend_language_scanner.c"
yy42:
YYDEBUG(42, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1643,12 +1624,12 @@ yy43:
++YYCURSOR;
YYDEBUG(44, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2158 "Zend/zend_language_scanner.l"
+#line 2145 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN('"');
}
-#line 1652 "Zend/zend_language_scanner.c"
+#line 1633 "Zend/zend_language_scanner.c"
yy45:
YYDEBUG(45, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1658,14 +1639,14 @@ yy46:
++YYCURSOR;
YYDEBUG(47, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2150 "Zend/zend_language_scanner.l"
+#line 2137 "Zend/zend_language_scanner.l"
{
Z_LVAL_P(zendlval) = (zend_long) '{';
yy_push_state(ST_IN_SCRIPTING);
yyless(1);
RETURN_TOKEN(T_CURLY_OPEN);
}
-#line 1669 "Zend/zend_language_scanner.c"
+#line 1650 "Zend/zend_language_scanner.c"
yy48:
YYDEBUG(48, *YYCURSOR);
yyaccept = 0;
@@ -1681,23 +1662,23 @@ yy48:
yy50:
YYDEBUG(50, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1861 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1690 "Zend/zend_language_scanner.c"
+#line 1671 "Zend/zend_language_scanner.c"
yy51:
YYDEBUG(51, *YYCURSOR);
++YYCURSOR;
YYDEBUG(52, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1593 "Zend/zend_language_scanner.l"
+#line 1579 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME);
RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
}
-#line 1701 "Zend/zend_language_scanner.c"
+#line 1682 "Zend/zend_language_scanner.c"
yy53:
YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1711,14 +1692,14 @@ yy55:
++YYCURSOR;
YYDEBUG(56, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1854 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1722 "Zend/zend_language_scanner.c"
+#line 1703 "Zend/zend_language_scanner.c"
yy57:
YYDEBUG(57, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1729,21 +1710,21 @@ yy57:
} else {
if (yych <= '`') goto yy54;
if (yych <= 'z') goto yy58;
- if (yych <= '~') goto yy54;
+ if (yych <= 0x7F) goto yy54;
}
yy58:
YYDEBUG(58, *YYCURSOR);
++YYCURSOR;
YYDEBUG(59, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1856 "Zend/zend_language_scanner.l"
+#line 1845 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1747 "Zend/zend_language_scanner.c"
+#line 1728 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_END_HEREDOC:
@@ -1754,7 +1735,7 @@ yyc_ST_END_HEREDOC:
++YYCURSOR;
YYDEBUG(63, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2136 "Zend/zend_language_scanner.l"
+#line 2123 "Zend/zend_language_scanner.l"
{
zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack));
@@ -1767,7 +1748,7 @@ yyc_ST_END_HEREDOC:
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN(T_END_HEREDOC);
}
-#line 1771 "Zend/zend_language_scanner.c"
+#line 1752 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_HEREDOC:
{
@@ -1787,7 +1768,7 @@ yyc_ST_HEREDOC:
0, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 128,
+ 128, 128, 128, 0, 0, 0, 0, 0,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
@@ -1823,13 +1804,13 @@ yy66:
if (yych >= 'a') goto yy72;
} else {
if (yych <= '{') goto yy75;
- if (yych >= 0x7F) goto yy72;
+ if (yych >= 0x80) goto yy72;
}
}
yy67:
YYDEBUG(67, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2265 "Zend/zend_language_scanner.l"
+#line 2248 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -1899,12 +1880,10 @@ yy67:
heredoc_scan_done:
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0) == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0);
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
-#line 1908 "Zend/zend_language_scanner.c"
+#line 1887 "Zend/zend_language_scanner.c"
yy68:
YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1919,14 +1898,14 @@ yy70:
++YYCURSOR;
YYDEBUG(71, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2150 "Zend/zend_language_scanner.l"
+#line 2137 "Zend/zend_language_scanner.l"
{
Z_LVAL_P(zendlval) = (zend_long) '{';
yy_push_state(ST_IN_SCRIPTING);
yyless(1);
RETURN_TOKEN(T_CURLY_OPEN);
}
-#line 1930 "Zend/zend_language_scanner.c"
+#line 1909 "Zend/zend_language_scanner.c"
yy72:
YYDEBUG(72, *YYCURSOR);
yyaccept = 0;
@@ -1942,23 +1921,23 @@ yy72:
yy74:
YYDEBUG(74, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1861 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1951 "Zend/zend_language_scanner.c"
+#line 1930 "Zend/zend_language_scanner.c"
yy75:
YYDEBUG(75, *YYCURSOR);
++YYCURSOR;
YYDEBUG(76, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1593 "Zend/zend_language_scanner.l"
+#line 1579 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME);
RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
}
-#line 1962 "Zend/zend_language_scanner.c"
+#line 1941 "Zend/zend_language_scanner.c"
yy77:
YYDEBUG(77, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1972,14 +1951,14 @@ yy79:
++YYCURSOR;
YYDEBUG(80, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 1854 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 1983 "Zend/zend_language_scanner.c"
+#line 1962 "Zend/zend_language_scanner.c"
yy81:
YYDEBUG(81, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1990,21 +1969,21 @@ yy81:
} else {
if (yych <= '`') goto yy78;
if (yych <= 'z') goto yy82;
- if (yych <= '~') goto yy78;
+ if (yych <= 0x7F) goto yy78;
}
yy82:
YYDEBUG(82, *YYCURSOR);
++YYCURSOR;
YYDEBUG(83, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1856 "Zend/zend_language_scanner.l"
+#line 1845 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 2008 "Zend/zend_language_scanner.c"
+#line 1987 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_IN_SCRIPTING:
@@ -2025,7 +2004,7 @@ yyc_ST_IN_SCRIPTING:
0, 36, 36, 36, 36, 36, 36, 4,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 0, 0, 0, 0, 4,
+ 4, 4, 4, 0, 0, 0, 0, 0,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
@@ -2076,7 +2055,8 @@ yyc_ST_IN_SCRIPTING:
case 0x1C:
case 0x1D:
case 0x1E:
- case 0x1F: goto yy147;
+ case 0x1F:
+ case 0x7F: goto yy147;
case '\t':
case '\n':
case '\r':
@@ -2187,12 +2167,12 @@ yy86:
yy87:
YYDEBUG(87, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1895 "Zend/zend_language_scanner.l"
+#line 1884 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
RETURN_TOKEN(T_STRING);
}
-#line 2196 "Zend/zend_language_scanner.c"
+#line 2176 "Zend/zend_language_scanner.c"
yy88:
YYDEBUG(88, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2424,11 +2404,11 @@ yy101:
yy102:
YYDEBUG(102, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1582 "Zend/zend_language_scanner.l"
+#line 1568 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(yytext[0]);
}
-#line 2432 "Zend/zend_language_scanner.c"
+#line 2412 "Zend/zend_language_scanner.c"
yy103:
YYDEBUG(103, *YYCURSOR);
++YYCURSOR;
@@ -2437,12 +2417,12 @@ yy103:
yy104:
YYDEBUG(104, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1297 "Zend/zend_language_scanner.l"
+#line 1283 "Zend/zend_language_scanner.l"
{
HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN(T_WHITESPACE);
}
-#line 2446 "Zend/zend_language_scanner.c"
+#line 2426 "Zend/zend_language_scanner.c"
yy105:
YYDEBUG(105, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2453,11 +2433,11 @@ yy106:
++YYCURSOR;
YYDEBUG(107, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1322 "Zend/zend_language_scanner.l"
+#line 1308 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_NS_SEPARATOR);
}
-#line 2461 "Zend/zend_language_scanner.c"
+#line 2441 "Zend/zend_language_scanner.c"
yy108:
YYDEBUG(108, *YYCURSOR);
yyaccept = 1;
@@ -2674,7 +2654,7 @@ yy129:
} else {
if (yych <= '`') goto yy102;
if (yych <= 'z') goto yy169;
- if (yych <= '~') goto yy102;
+ if (yych <= 0x7F) goto yy102;
goto yy169;
}
yy130:
@@ -2686,18 +2666,18 @@ yy131:
++YYCURSOR;
YYDEBUG(132, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1587 "Zend/zend_language_scanner.l"
+#line 1573 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING);
RETURN_TOKEN('{');
}
-#line 2695 "Zend/zend_language_scanner.c"
+#line 2675 "Zend/zend_language_scanner.c"
yy133:
YYDEBUG(133, *YYCURSOR);
++YYCURSOR;
YYDEBUG(134, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1599 "Zend/zend_language_scanner.l"
+#line 1585 "Zend/zend_language_scanner.l"
{
RESET_DOC_COMMENT();
if (!zend_stack_is_empty(&SCNG(state_stack))) {
@@ -2705,7 +2685,7 @@ yy133:
}
RETURN_TOKEN('}');
}
-#line 2709 "Zend/zend_language_scanner.c"
+#line 2689 "Zend/zend_language_scanner.c"
yy135:
YYDEBUG(135, *YYCURSOR);
yyaccept = 2;
@@ -2733,7 +2713,7 @@ yy135:
yy136:
YYDEBUG(136, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1652 "Zend/zend_language_scanner.l"
+#line 1638 "Zend/zend_language_scanner.l"
{
char *end;
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
@@ -2743,8 +2723,9 @@ yy136:
* Because the lexing itself doesn't do that for us
*/
if (end != yytext + yyleng) {
- zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", E_PARSE);
- RETURN_TOKEN(T_ERROR);
+ zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", 0);
+ ZVAL_UNDEF(zendlval);
+ RETURN_TOKEN(T_LNUMBER);
}
} else {
errno = 0;
@@ -2760,22 +2741,24 @@ yy136:
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
zend_throw_exception(zend_ce_parse_error,
- "Invalid numeric literal", E_PARSE);
- RETURN_TOKEN(T_ERROR);
+ "Invalid numeric literal", 0);
+ ZVAL_UNDEF(zendlval);
+ RETURN_TOKEN(T_DNUMBER);
}
ZEND_ASSERT(!errno);
RETURN_TOKEN(T_DNUMBER);
}
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
- zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", E_PARSE);
- RETURN_TOKEN(T_ERROR);
+ zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", 0);
+ ZVAL_UNDEF(zendlval);
+ RETURN_TOKEN(T_DNUMBER);
}
}
ZEND_ASSERT(!errno);
RETURN_TOKEN(T_LNUMBER);
}
-#line 2779 "Zend/zend_language_scanner.c"
+#line 2762 "Zend/zend_language_scanner.c"
yy137:
YYDEBUG(137, *YYCURSOR);
yyaccept = 2;
@@ -2803,7 +2786,7 @@ yy139:
yy140:
YYDEBUG(140, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1901 "Zend/zend_language_scanner.l"
+#line 1890 "Zend/zend_language_scanner.l"
{
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
@@ -2832,14 +2815,14 @@ yy140:
RETURN_TOKEN(T_COMMENT);
}
-#line 2836 "Zend/zend_language_scanner.c"
+#line 2819 "Zend/zend_language_scanner.c"
yy141:
YYDEBUG(141, *YYCURSOR);
++YYCURSOR;
yy142:
YYDEBUG(142, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1969 "Zend/zend_language_scanner.l"
+#line 1958 "Zend/zend_language_scanner.l"
{
register char *s, *t;
char *end;
@@ -2907,14 +2890,14 @@ yy142:
}
RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING);
}
-#line 2911 "Zend/zend_language_scanner.c"
+#line 2894 "Zend/zend_language_scanner.c"
yy143:
YYDEBUG(143, *YYCURSOR);
++YYCURSOR;
yy144:
YYDEBUG(144, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2038 "Zend/zend_language_scanner.l"
+#line 2027 "Zend/zend_language_scanner.l"
{
int bprefix = (yytext[0] != '"') ? 1 : 0;
@@ -2922,9 +2905,7 @@ yy144:
switch (*YYCURSOR++) {
case '"':
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"') == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"');
RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING);
case '$':
if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') {
@@ -2957,24 +2938,24 @@ yy144:
BEGIN(ST_DOUBLE_QUOTES);
RETURN_TOKEN('"');
}
-#line 2961 "Zend/zend_language_scanner.c"
+#line 2942 "Zend/zend_language_scanner.c"
yy145:
YYDEBUG(145, *YYCURSOR);
++YYCURSOR;
YYDEBUG(146, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2130 "Zend/zend_language_scanner.l"
+#line 2117 "Zend/zend_language_scanner.l"
{
BEGIN(ST_BACKQUOTE);
RETURN_TOKEN('`');
}
-#line 2972 "Zend/zend_language_scanner.c"
+#line 2953 "Zend/zend_language_scanner.c"
yy147:
YYDEBUG(147, *YYCURSOR);
++YYCURSOR;
YYDEBUG(148, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2398 "Zend/zend_language_scanner.l"
+#line 2379 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
@@ -2983,7 +2964,7 @@ yy147:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 2987 "Zend/zend_language_scanner.c"
+#line 2968 "Zend/zend_language_scanner.c"
yy149:
YYDEBUG(149, *YYCURSOR);
++YYCURSOR;
@@ -3010,7 +2991,7 @@ yy151:
yy153:
YYDEBUG(153, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1743 "Zend/zend_language_scanner.l"
+#line 1732 "Zend/zend_language_scanner.l"
{
const char *end;
@@ -3019,7 +3000,7 @@ yy153:
ZEND_ASSERT(end == yytext + yyleng);
RETURN_TOKEN(T_DNUMBER);
}
-#line 3023 "Zend/zend_language_scanner.c"
+#line 3004 "Zend/zend_language_scanner.c"
yy154:
YYDEBUG(154, *YYCURSOR);
yyaccept = 2;
@@ -3115,7 +3096,7 @@ yy163:
}
YYDEBUG(165, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1624 "Zend/zend_language_scanner.l"
+#line 1610 "Zend/zend_language_scanner.l"
{
char *bin = yytext + 2; /* Skip "0b" */
int len = yyleng - 2;
@@ -3143,7 +3124,7 @@ yy163:
RETURN_TOKEN(T_DNUMBER);
}
}
-#line 3147 "Zend/zend_language_scanner.c"
+#line 3128 "Zend/zend_language_scanner.c"
yy166:
YYDEBUG(166, *YYCURSOR);
++YYCURSOR;
@@ -3155,7 +3136,7 @@ yy166:
}
YYDEBUG(168, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1694 "Zend/zend_language_scanner.l"
+#line 1683 "Zend/zend_language_scanner.l"
{
char *hex = yytext + 2; /* Skip "0x" */
int len = yyleng - 2;
@@ -3183,7 +3164,7 @@ yy166:
RETURN_TOKEN(T_DNUMBER);
}
}
-#line 3187 "Zend/zend_language_scanner.c"
+#line 3168 "Zend/zend_language_scanner.c"
yy169:
YYDEBUG(169, *YYCURSOR);
++YYCURSOR;
@@ -3202,18 +3183,18 @@ yy169:
if (yych <= '_') goto yy169;
} else {
if (yych <= 'z') goto yy169;
- if (yych >= 0x7F) goto yy169;
+ if (yych >= 0x80) goto yy169;
}
}
yy171:
YYDEBUG(171, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1861 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 3217 "Zend/zend_language_scanner.c"
+#line 3198 "Zend/zend_language_scanner.c"
yy172:
YYDEBUG(172, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3227,11 +3208,11 @@ yy173:
}
YYDEBUG(174, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1570 "Zend/zend_language_scanner.l"
+#line 1556 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_LOGICAL_XOR);
}
-#line 3235 "Zend/zend_language_scanner.c"
+#line 3216 "Zend/zend_language_scanner.c"
yy175:
YYDEBUG(175, *YYCURSOR);
++YYCURSOR;
@@ -3240,71 +3221,71 @@ yy175:
}
YYDEBUG(176, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1562 "Zend/zend_language_scanner.l"
+#line 1548 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_LOGICAL_OR);
}
-#line 3248 "Zend/zend_language_scanner.c"
+#line 3229 "Zend/zend_language_scanner.c"
yy177:
YYDEBUG(177, *YYCURSOR);
++YYCURSOR;
YYDEBUG(178, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1550 "Zend/zend_language_scanner.l"
+#line 1536 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_XOR_EQUAL);
}
-#line 3258 "Zend/zend_language_scanner.c"
+#line 3239 "Zend/zend_language_scanner.c"
yy179:
YYDEBUG(179, *YYCURSOR);
++YYCURSOR;
YYDEBUG(180, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1554 "Zend/zend_language_scanner.l"
+#line 1540 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_BOOLEAN_OR);
}
-#line 3268 "Zend/zend_language_scanner.c"
+#line 3249 "Zend/zend_language_scanner.c"
yy181:
YYDEBUG(181, *YYCURSOR);
++YYCURSOR;
YYDEBUG(182, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1546 "Zend/zend_language_scanner.l"
+#line 1532 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_OR_EQUAL);
}
-#line 3278 "Zend/zend_language_scanner.c"
+#line 3259 "Zend/zend_language_scanner.c"
yy183:
YYDEBUG(183, *YYCURSOR);
++YYCURSOR;
YYDEBUG(184, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1558 "Zend/zend_language_scanner.l"
+#line 1544 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_BOOLEAN_AND);
}
-#line 3288 "Zend/zend_language_scanner.c"
+#line 3269 "Zend/zend_language_scanner.c"
yy185:
YYDEBUG(185, *YYCURSOR);
++YYCURSOR;
YYDEBUG(186, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1542 "Zend/zend_language_scanner.l"
+#line 1528 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_AND_EQUAL);
}
-#line 3298 "Zend/zend_language_scanner.c"
+#line 3279 "Zend/zend_language_scanner.c"
yy187:
YYDEBUG(187, *YYCURSOR);
++YYCURSOR;
YYDEBUG(188, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1530 "Zend/zend_language_scanner.l"
+#line 1516 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_MOD_EQUAL);
}
-#line 3308 "Zend/zend_language_scanner.c"
+#line 3289 "Zend/zend_language_scanner.c"
yy189:
YYDEBUG(189, *YYCURSOR);
yyaccept = 4;
@@ -3313,7 +3294,7 @@ yy189:
yy190:
YYDEBUG(190, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1930 "Zend/zend_language_scanner.l"
+#line 1919 "Zend/zend_language_scanner.l"
{
int doc_com;
@@ -3346,7 +3327,7 @@ yy190:
RETURN_TOKEN(T_COMMENT);
}
-#line 3350 "Zend/zend_language_scanner.c"
+#line 3331 "Zend/zend_language_scanner.c"
yy191:
YYDEBUG(191, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3356,11 +3337,11 @@ yy192:
++YYCURSOR;
YYDEBUG(193, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1522 "Zend/zend_language_scanner.l"
+#line 1508 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DIV_EQUAL);
}
-#line 3364 "Zend/zend_language_scanner.c"
+#line 3345 "Zend/zend_language_scanner.c"
yy194:
YYDEBUG(194, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3384,62 +3365,62 @@ yy197:
if ((yych = *YYCURSOR) == '=') goto yy201;
YYDEBUG(198, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1514 "Zend/zend_language_scanner.l"
+#line 1500 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_POW);
}
-#line 3392 "Zend/zend_language_scanner.c"
+#line 3373 "Zend/zend_language_scanner.c"
yy199:
YYDEBUG(199, *YYCURSOR);
++YYCURSOR;
YYDEBUG(200, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1510 "Zend/zend_language_scanner.l"
+#line 1496 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_MUL_EQUAL);
}
-#line 3402 "Zend/zend_language_scanner.c"
+#line 3383 "Zend/zend_language_scanner.c"
yy201:
YYDEBUG(201, *YYCURSOR);
++YYCURSOR;
YYDEBUG(202, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1518 "Zend/zend_language_scanner.l"
+#line 1504 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_POW_EQUAL);
}
-#line 3412 "Zend/zend_language_scanner.c"
+#line 3393 "Zend/zend_language_scanner.c"
yy203:
YYDEBUG(203, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy207;
YYDEBUG(204, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1578 "Zend/zend_language_scanner.l"
+#line 1564 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_SR);
}
-#line 3423 "Zend/zend_language_scanner.c"
+#line 3404 "Zend/zend_language_scanner.c"
yy205:
YYDEBUG(205, *YYCURSOR);
++YYCURSOR;
YYDEBUG(206, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1498 "Zend/zend_language_scanner.l"
+#line 1484 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IS_GREATER_OR_EQUAL);
}
-#line 3433 "Zend/zend_language_scanner.c"
+#line 3414 "Zend/zend_language_scanner.c"
yy207:
YYDEBUG(207, *YYCURSOR);
++YYCURSOR;
YYDEBUG(208, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1538 "Zend/zend_language_scanner.l"
+#line 1524 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_SR_EQUAL);
}
-#line 3443 "Zend/zend_language_scanner.c"
+#line 3424 "Zend/zend_language_scanner.c"
yy209:
YYDEBUG(209, *YYCURSOR);
yyaccept = 5;
@@ -3450,53 +3431,53 @@ yy209:
yy210:
YYDEBUG(210, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1574 "Zend/zend_language_scanner.l"
+#line 1560 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_SL);
}
-#line 3458 "Zend/zend_language_scanner.c"
+#line 3439 "Zend/zend_language_scanner.c"
yy211:
YYDEBUG(211, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '>') goto yy215;
YYDEBUG(212, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1494 "Zend/zend_language_scanner.l"
+#line 1480 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IS_SMALLER_OR_EQUAL);
}
-#line 3469 "Zend/zend_language_scanner.c"
+#line 3450 "Zend/zend_language_scanner.c"
yy213:
YYDEBUG(213, *YYCURSOR);
++YYCURSOR;
yy214:
YYDEBUG(214, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1486 "Zend/zend_language_scanner.l"
+#line 1472 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IS_NOT_EQUAL);
}
-#line 3480 "Zend/zend_language_scanner.c"
+#line 3461 "Zend/zend_language_scanner.c"
yy215:
YYDEBUG(215, *YYCURSOR);
++YYCURSOR;
YYDEBUG(216, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1490 "Zend/zend_language_scanner.l"
+#line 1476 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_SPACESHIP);
}
-#line 3490 "Zend/zend_language_scanner.c"
+#line 3471 "Zend/zend_language_scanner.c"
yy217:
YYDEBUG(217, *YYCURSOR);
++YYCURSOR;
YYDEBUG(218, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1534 "Zend/zend_language_scanner.l"
+#line 1520 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_SL_EQUAL);
}
-#line 3500 "Zend/zend_language_scanner.c"
+#line 3481 "Zend/zend_language_scanner.c"
yy219:
YYDEBUG(219, *YYCURSOR);
++YYCURSOR;
@@ -3519,7 +3500,7 @@ yy219:
if (yych != '_') goto yy157;
} else {
if (yych <= 'z') goto yy221;
- if (yych <= '~') goto yy157;
+ if (yych <= 0x7F) goto yy157;
}
}
yy221:
@@ -3546,7 +3527,7 @@ yy221:
} else {
if (yych <= '`') goto yy157;
if (yych <= 'z') goto yy221;
- if (yych <= '~') goto yy157;
+ if (yych <= 0x7F) goto yy157;
goto yy221;
}
}
@@ -3585,7 +3566,7 @@ yy226:
goto yy157;
} else {
if (yych <= 'z') goto yy225;
- if (yych <= '~') goto yy157;
+ if (yych <= 0x7F) goto yy157;
goto yy225;
}
}
@@ -3601,7 +3582,7 @@ yy228:
yy229:
YYDEBUG(229, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2082 "Zend/zend_language_scanner.l"
+#line 2069 "Zend/zend_language_scanner.l"
{
char *s;
int bprefix = (yytext[0] != '<') ? 1 : 0;
@@ -3648,7 +3629,7 @@ yy229:
RETURN_TOKEN(T_START_HEREDOC);
}
-#line 3652 "Zend/zend_language_scanner.c"
+#line 3633 "Zend/zend_language_scanner.c"
yy230:
YYDEBUG(230, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3676,7 +3657,7 @@ yy232:
goto yy157;
} else {
if (yych <= 'z') goto yy231;
- if (yych <= '~') goto yy157;
+ if (yych <= 0x7F) goto yy157;
goto yy231;
}
}
@@ -3688,31 +3669,31 @@ yy233:
++YYCURSOR;
YYDEBUG(235, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1478 "Zend/zend_language_scanner.l"
+#line 1464 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IS_NOT_IDENTICAL);
}
-#line 3696 "Zend/zend_language_scanner.c"
+#line 3677 "Zend/zend_language_scanner.c"
yy236:
YYDEBUG(236, *YYCURSOR);
++YYCURSOR;
YYDEBUG(237, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1502 "Zend/zend_language_scanner.l"
+#line 1488 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_PLUS_EQUAL);
}
-#line 3706 "Zend/zend_language_scanner.c"
+#line 3687 "Zend/zend_language_scanner.c"
yy238:
YYDEBUG(238, *YYCURSOR);
++YYCURSOR;
YYDEBUG(239, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1466 "Zend/zend_language_scanner.l"
+#line 1452 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INC);
}
-#line 3716 "Zend/zend_language_scanner.c"
+#line 3697 "Zend/zend_language_scanner.c"
yy240:
YYDEBUG(240, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3731,42 +3712,42 @@ yy242:
}
YYDEBUG(243, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1454 "Zend/zend_language_scanner.l"
+#line 1440 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_LIST);
}
-#line 3739 "Zend/zend_language_scanner.c"
+#line 3720 "Zend/zend_language_scanner.c"
yy244:
YYDEBUG(244, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy248;
YYDEBUG(245, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1482 "Zend/zend_language_scanner.l"
+#line 1468 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IS_EQUAL);
}
-#line 3750 "Zend/zend_language_scanner.c"
+#line 3731 "Zend/zend_language_scanner.c"
yy246:
YYDEBUG(246, *YYCURSOR);
++YYCURSOR;
YYDEBUG(247, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1450 "Zend/zend_language_scanner.l"
+#line 1436 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DOUBLE_ARROW);
}
-#line 3760 "Zend/zend_language_scanner.c"
+#line 3741 "Zend/zend_language_scanner.c"
yy248:
YYDEBUG(248, *YYCURSOR);
++YYCURSOR;
YYDEBUG(249, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1474 "Zend/zend_language_scanner.l"
+#line 1460 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IS_IDENTICAL);
}
-#line 3770 "Zend/zend_language_scanner.c"
+#line 3751 "Zend/zend_language_scanner.c"
yy250:
YYDEBUG(250, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3896,11 +3877,11 @@ yy266:
}
YYDEBUG(269, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1780 "Zend/zend_language_scanner.l"
+#line 1769 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_NS_C);
}
-#line 3904 "Zend/zend_language_scanner.c"
+#line 3885 "Zend/zend_language_scanner.c"
yy270:
YYDEBUG(270, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3920,11 +3901,11 @@ yy271:
}
YYDEBUG(274, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1776 "Zend/zend_language_scanner.l"
+#line 1765 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DIR);
}
-#line 3928 "Zend/zend_language_scanner.c"
+#line 3909 "Zend/zend_language_scanner.c"
yy275:
YYDEBUG(275, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3949,11 +3930,11 @@ yy277:
}
YYDEBUG(280, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1768 "Zend/zend_language_scanner.l"
+#line 1757 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_LINE);
}
-#line 3957 "Zend/zend_language_scanner.c"
+#line 3938 "Zend/zend_language_scanner.c"
yy281:
YYDEBUG(281, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3988,11 +3969,11 @@ yy285:
}
YYDEBUG(288, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1764 "Zend/zend_language_scanner.l"
+#line 1753 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_METHOD_C);
}
-#line 3996 "Zend/zend_language_scanner.c"
+#line 3977 "Zend/zend_language_scanner.c"
yy289:
YYDEBUG(289, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4043,11 +4024,11 @@ yy296:
}
YYDEBUG(299, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1760 "Zend/zend_language_scanner.l"
+#line 1749 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FUNC_C);
}
-#line 4051 "Zend/zend_language_scanner.c"
+#line 4032 "Zend/zend_language_scanner.c"
yy300:
YYDEBUG(300, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4067,11 +4048,11 @@ yy301:
}
YYDEBUG(304, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1772 "Zend/zend_language_scanner.l"
+#line 1761 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FILE);
}
-#line 4075 "Zend/zend_language_scanner.c"
+#line 4056 "Zend/zend_language_scanner.c"
yy305:
YYDEBUG(305, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4101,11 +4082,11 @@ yy308:
}
YYDEBUG(311, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1756 "Zend/zend_language_scanner.l"
+#line 1745 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_TRAIT_C);
}
-#line 4109 "Zend/zend_language_scanner.c"
+#line 4090 "Zend/zend_language_scanner.c"
yy312:
YYDEBUG(312, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4135,11 +4116,11 @@ yy315:
}
YYDEBUG(318, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1752 "Zend/zend_language_scanner.l"
+#line 1741 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CLASS_C);
}
-#line 4143 "Zend/zend_language_scanner.c"
+#line 4124 "Zend/zend_language_scanner.c"
yy319:
YYDEBUG(319, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4201,11 +4182,11 @@ yy330:
}
YYDEBUG(331, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1418 "Zend/zend_language_scanner.l"
+#line 1404 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_HALT_COMPILER);
}
-#line 4209 "Zend/zend_language_scanner.c"
+#line 4190 "Zend/zend_language_scanner.c"
yy332:
YYDEBUG(332, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4225,11 +4206,11 @@ yy334:
}
YYDEBUG(335, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1398 "Zend/zend_language_scanner.l"
+#line 1384 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_USE);
}
-#line 4233 "Zend/zend_language_scanner.c"
+#line 4214 "Zend/zend_language_scanner.c"
yy336:
YYDEBUG(336, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4248,11 +4229,11 @@ yy338:
}
YYDEBUG(339, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1446 "Zend/zend_language_scanner.l"
+#line 1432 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_UNSET);
}
-#line 4256 "Zend/zend_language_scanner.c"
+#line 4237 "Zend/zend_language_scanner.c"
yy340:
YYDEBUG(340, *YYCURSOR);
++YYCURSOR;
@@ -4424,11 +4405,11 @@ yy355:
++YYCURSOR;
YYDEBUG(357, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1346 "Zend/zend_language_scanner.l"
+#line 1332 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INT_CAST);
}
-#line 4432 "Zend/zend_language_scanner.c"
+#line 4413 "Zend/zend_language_scanner.c"
yy358:
YYDEBUG(358, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4472,11 +4453,11 @@ yy363:
++YYCURSOR;
YYDEBUG(366, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1350 "Zend/zend_language_scanner.l"
+#line 1336 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DOUBLE_CAST);
}
-#line 4480 "Zend/zend_language_scanner.c"
+#line 4461 "Zend/zend_language_scanner.c"
yy367:
YYDEBUG(367, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4546,11 +4527,11 @@ yy377:
++YYCURSOR;
YYDEBUG(380, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1354 "Zend/zend_language_scanner.l"
+#line 1340 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_STRING_CAST);
}
-#line 4554 "Zend/zend_language_scanner.c"
+#line 4535 "Zend/zend_language_scanner.c"
yy381:
YYDEBUG(381, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4583,11 +4564,11 @@ yy384:
++YYCURSOR;
YYDEBUG(387, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1358 "Zend/zend_language_scanner.l"
+#line 1344 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ARRAY_CAST);
}
-#line 4591 "Zend/zend_language_scanner.c"
+#line 4572 "Zend/zend_language_scanner.c"
yy388:
YYDEBUG(388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4625,11 +4606,11 @@ yy392:
++YYCURSOR;
YYDEBUG(395, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1362 "Zend/zend_language_scanner.l"
+#line 1348 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_OBJECT_CAST);
}
-#line 4633 "Zend/zend_language_scanner.c"
+#line 4614 "Zend/zend_language_scanner.c"
yy396:
YYDEBUG(396, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4670,11 +4651,11 @@ yy401:
++YYCURSOR;
YYDEBUG(403, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1366 "Zend/zend_language_scanner.l"
+#line 1352 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_BOOL_CAST);
}
-#line 4678 "Zend/zend_language_scanner.c"
+#line 4659 "Zend/zend_language_scanner.c"
yy404:
YYDEBUG(404, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4734,11 +4715,11 @@ yy412:
++YYCURSOR;
YYDEBUG(415, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1370 "Zend/zend_language_scanner.l"
+#line 1356 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_UNSET_CAST);
}
-#line 4742 "Zend/zend_language_scanner.c"
+#line 4723 "Zend/zend_language_scanner.c"
yy416:
YYDEBUG(416, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4752,11 +4733,11 @@ yy417:
}
YYDEBUG(418, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1342 "Zend/zend_language_scanner.l"
+#line 1328 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_VAR);
}
-#line 4760 "Zend/zend_language_scanner.c"
+#line 4741 "Zend/zend_language_scanner.c"
yy419:
YYDEBUG(419, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4776,11 +4757,11 @@ yy421:
}
YYDEBUG(422, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1334 "Zend/zend_language_scanner.l"
+#line 1320 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_NEW);
}
-#line 4784 "Zend/zend_language_scanner.c"
+#line 4765 "Zend/zend_language_scanner.c"
yy423:
YYDEBUG(423, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4819,11 +4800,11 @@ yy429:
}
YYDEBUG(430, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1394 "Zend/zend_language_scanner.l"
+#line 1380 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_NAMESPACE);
}
-#line 4827 "Zend/zend_language_scanner.c"
+#line 4808 "Zend/zend_language_scanner.c"
yy431:
YYDEBUG(431, *YYCURSOR);
++YYCURSOR;
@@ -4832,22 +4813,22 @@ yy431:
yy432:
YYDEBUG(432, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1963 "Zend/zend_language_scanner.l"
+#line 1952 "Zend/zend_language_scanner.l"
{
BEGIN(INITIAL);
RETURN_TOKEN(T_CLOSE_TAG); /* implicit ';' at php-end tag */
}
-#line 4841 "Zend/zend_language_scanner.c"
+#line 4822 "Zend/zend_language_scanner.c"
yy433:
YYDEBUG(433, *YYCURSOR);
++YYCURSOR;
YYDEBUG(434, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1330 "Zend/zend_language_scanner.l"
+#line 1316 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_COALESCE);
}
-#line 4851 "Zend/zend_language_scanner.c"
+#line 4832 "Zend/zend_language_scanner.c"
yy435:
YYDEBUG(435, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4878,11 +4859,11 @@ yy439:
++YYCURSOR;
YYDEBUG(440, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1526 "Zend/zend_language_scanner.l"
+#line 1512 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CONCAT_EQUAL);
}
-#line 4886 "Zend/zend_language_scanner.c"
+#line 4867 "Zend/zend_language_scanner.c"
yy441:
YYDEBUG(441, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4891,21 +4872,21 @@ yy441:
++YYCURSOR;
YYDEBUG(443, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1326 "Zend/zend_language_scanner.l"
+#line 1312 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ELLIPSIS);
}
-#line 4899 "Zend/zend_language_scanner.c"
+#line 4880 "Zend/zend_language_scanner.c"
yy444:
YYDEBUG(444, *YYCURSOR);
++YYCURSOR;
YYDEBUG(445, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1318 "Zend/zend_language_scanner.l"
+#line 1304 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_PAAMAYIM_NEKUDOTAYIM);
}
-#line 4909 "Zend/zend_language_scanner.c"
+#line 4890 "Zend/zend_language_scanner.c"
yy446:
YYDEBUG(446, *YYCURSOR);
++YYCURSOR;
@@ -4927,32 +4908,32 @@ yy448:
++YYCURSOR;
YYDEBUG(449, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1506 "Zend/zend_language_scanner.l"
+#line 1492 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_MINUS_EQUAL);
}
-#line 4935 "Zend/zend_language_scanner.c"
+#line 4916 "Zend/zend_language_scanner.c"
yy450:
YYDEBUG(450, *YYCURSOR);
++YYCURSOR;
YYDEBUG(451, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1470 "Zend/zend_language_scanner.l"
+#line 1456 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DEC);
}
-#line 4945 "Zend/zend_language_scanner.c"
+#line 4926 "Zend/zend_language_scanner.c"
yy452:
YYDEBUG(452, *YYCURSOR);
++YYCURSOR;
YYDEBUG(453, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1292 "Zend/zend_language_scanner.l"
+#line 1278 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_PROPERTY);
RETURN_TOKEN(T_OBJECT_OPERATOR);
}
-#line 4956 "Zend/zend_language_scanner.c"
+#line 4937 "Zend/zend_language_scanner.c"
yy454:
YYDEBUG(454, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4997,11 +4978,11 @@ yy459:
}
YYDEBUG(460, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1442 "Zend/zend_language_scanner.l"
+#line 1428 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_PUBLIC);
}
-#line 5005 "Zend/zend_language_scanner.c"
+#line 4986 "Zend/zend_language_scanner.c"
yy461:
YYDEBUG(461, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5056,11 +5037,11 @@ yy468:
}
YYDEBUG(469, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1438 "Zend/zend_language_scanner.l"
+#line 1424 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_PROTECTED);
}
-#line 5064 "Zend/zend_language_scanner.c"
+#line 5045 "Zend/zend_language_scanner.c"
yy470:
YYDEBUG(470, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5090,11 +5071,11 @@ yy474:
}
YYDEBUG(475, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1434 "Zend/zend_language_scanner.l"
+#line 1420 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_PRIVATE);
}
-#line 5098 "Zend/zend_language_scanner.c"
+#line 5079 "Zend/zend_language_scanner.c"
yy476:
YYDEBUG(476, *YYCURSOR);
++YYCURSOR;
@@ -5103,11 +5084,11 @@ yy476:
}
YYDEBUG(477, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1268 "Zend/zend_language_scanner.l"
+#line 1254 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_PRINT);
}
-#line 5111 "Zend/zend_language_scanner.c"
+#line 5092 "Zend/zend_language_scanner.c"
yy478:
YYDEBUG(478, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5132,11 +5113,11 @@ yy481:
}
YYDEBUG(482, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1260 "Zend/zend_language_scanner.l"
+#line 1246 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_GOTO);
}
-#line 5140 "Zend/zend_language_scanner.c"
+#line 5121 "Zend/zend_language_scanner.c"
yy483:
YYDEBUG(483, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5160,11 +5141,11 @@ yy486:
}
YYDEBUG(487, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1406 "Zend/zend_language_scanner.l"
+#line 1392 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_GLOBAL);
}
-#line 5168 "Zend/zend_language_scanner.c"
+#line 5149 "Zend/zend_language_scanner.c"
yy488:
YYDEBUG(488, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5201,11 +5182,11 @@ yy494:
}
YYDEBUG(495, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1252 "Zend/zend_language_scanner.l"
+#line 1238 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_BREAK);
}
-#line 5209 "Zend/zend_language_scanner.c"
+#line 5190 "Zend/zend_language_scanner.c"
yy496:
YYDEBUG(496, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5245,11 +5226,11 @@ yy502:
}
YYDEBUG(503, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1236 "Zend/zend_language_scanner.l"
+#line 1222 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_SWITCH);
}
-#line 5253 "Zend/zend_language_scanner.c"
+#line 5234 "Zend/zend_language_scanner.c"
yy504:
YYDEBUG(504, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5273,11 +5254,11 @@ yy507:
}
YYDEBUG(508, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1422 "Zend/zend_language_scanner.l"
+#line 1408 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_STATIC);
}
-#line 5281 "Zend/zend_language_scanner.c"
+#line 5262 "Zend/zend_language_scanner.c"
yy509:
YYDEBUG(509, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5304,11 +5285,11 @@ yy512:
}
YYDEBUG(513, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1232 "Zend/zend_language_scanner.l"
+#line 1218 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_AS);
}
-#line 5312 "Zend/zend_language_scanner.c"
+#line 5293 "Zend/zend_language_scanner.c"
yy514:
YYDEBUG(514, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5327,11 +5308,11 @@ yy516:
}
YYDEBUG(517, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1458 "Zend/zend_language_scanner.l"
+#line 1444 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ARRAY);
}
-#line 5335 "Zend/zend_language_scanner.c"
+#line 5316 "Zend/zend_language_scanner.c"
yy518:
YYDEBUG(518, *YYCURSOR);
++YYCURSOR;
@@ -5340,11 +5321,11 @@ yy518:
}
YYDEBUG(519, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1566 "Zend/zend_language_scanner.l"
+#line 1552 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_LOGICAL_AND);
}
-#line 5348 "Zend/zend_language_scanner.c"
+#line 5329 "Zend/zend_language_scanner.c"
yy520:
YYDEBUG(520, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5378,11 +5359,11 @@ yy525:
}
YYDEBUG(526, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1426 "Zend/zend_language_scanner.l"
+#line 1412 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ABSTRACT);
}
-#line 5386 "Zend/zend_language_scanner.c"
+#line 5367 "Zend/zend_language_scanner.c"
yy527:
YYDEBUG(527, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5406,11 +5387,11 @@ yy530:
}
YYDEBUG(531, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1192 "Zend/zend_language_scanner.l"
+#line 1178 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_WHILE);
}
-#line 5414 "Zend/zend_language_scanner.c"
+#line 5395 "Zend/zend_language_scanner.c"
yy532:
YYDEBUG(532, *YYCURSOR);
++YYCURSOR;
@@ -5419,11 +5400,11 @@ yy532:
}
YYDEBUG(533, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1176 "Zend/zend_language_scanner.l"
+#line 1162 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IF);
}
-#line 5427 "Zend/zend_language_scanner.c"
+#line 5408 "Zend/zend_language_scanner.c"
yy534:
YYDEBUG(534, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5475,11 +5456,11 @@ yy539:
}
YYDEBUG(540, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1410 "Zend/zend_language_scanner.l"
+#line 1396 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ISSET);
}
-#line 5483 "Zend/zend_language_scanner.c"
+#line 5464 "Zend/zend_language_scanner.c"
yy541:
YYDEBUG(541, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5527,17 +5508,17 @@ yy547:
if (yych <= '_') goto yy549;
} else {
if (yych <= 'z') goto yy149;
- if (yych >= 0x7F) goto yy149;
+ if (yych >= 0x80) goto yy149;
}
}
yy548:
YYDEBUG(548, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1378 "Zend/zend_language_scanner.l"
+#line 1364 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INCLUDE);
}
-#line 5541 "Zend/zend_language_scanner.c"
+#line 5522 "Zend/zend_language_scanner.c"
yy549:
YYDEBUG(549, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5566,11 +5547,11 @@ yy553:
}
YYDEBUG(554, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1382 "Zend/zend_language_scanner.l"
+#line 1368 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INCLUDE_ONCE);
}
-#line 5574 "Zend/zend_language_scanner.c"
+#line 5555 "Zend/zend_language_scanner.c"
yy555:
YYDEBUG(555, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5604,11 +5585,11 @@ yy560:
}
YYDEBUG(561, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1276 "Zend/zend_language_scanner.l"
+#line 1262 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INTERFACE);
}
-#line 5612 "Zend/zend_language_scanner.c"
+#line 5593 "Zend/zend_language_scanner.c"
yy562:
YYDEBUG(562, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5658,11 +5639,11 @@ yy568:
}
YYDEBUG(569, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1402 "Zend/zend_language_scanner.l"
+#line 1388 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INSTEADOF);
}
-#line 5666 "Zend/zend_language_scanner.c"
+#line 5647 "Zend/zend_language_scanner.c"
yy570:
YYDEBUG(570, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5691,11 +5672,11 @@ yy574:
}
YYDEBUG(575, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1228 "Zend/zend_language_scanner.l"
+#line 1214 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_INSTANCEOF);
}
-#line 5699 "Zend/zend_language_scanner.c"
+#line 5680 "Zend/zend_language_scanner.c"
yy576:
YYDEBUG(576, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5739,11 +5720,11 @@ yy583:
}
YYDEBUG(584, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1288 "Zend/zend_language_scanner.l"
+#line 1274 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_IMPLEMENTS);
}
-#line 5747 "Zend/zend_language_scanner.c"
+#line 5728 "Zend/zend_language_scanner.c"
yy585:
YYDEBUG(585, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5771,11 +5752,11 @@ yy586:
}
YYDEBUG(588, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1160 "Zend/zend_language_scanner.l"
+#line 1146 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_TRY);
}
-#line 5779 "Zend/zend_language_scanner.c"
+#line 5760 "Zend/zend_language_scanner.c"
yy589:
YYDEBUG(589, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5794,11 +5775,11 @@ yy591:
}
YYDEBUG(592, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1280 "Zend/zend_language_scanner.l"
+#line 1266 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_TRAIT);
}
-#line 5802 "Zend/zend_language_scanner.c"
+#line 5783 "Zend/zend_language_scanner.c"
yy593:
YYDEBUG(593, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5817,11 +5798,11 @@ yy595:
}
YYDEBUG(596, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1172 "Zend/zend_language_scanner.l"
+#line 1158 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_THROW);
}
-#line 5825 "Zend/zend_language_scanner.c"
+#line 5806 "Zend/zend_language_scanner.c"
yy597:
YYDEBUG(597, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5854,11 +5835,11 @@ yy600:
yy601:
YYDEBUG(601, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1156 "Zend/zend_language_scanner.l"
+#line 1142 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_YIELD);
}
-#line 5862 "Zend/zend_language_scanner.c"
+#line 5843 "Zend/zend_language_scanner.c"
yy602:
YYDEBUG(602, *YYCURSOR);
++YYCURSOR;
@@ -5900,11 +5881,12 @@ yy607:
++YYCURSOR;
YYDEBUG(608, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1152 "Zend/zend_language_scanner.l"
+#line 1137 "Zend/zend_language_scanner.l"
{
+ HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN(T_YIELD_FROM);
}
-#line 5908 "Zend/zend_language_scanner.c"
+#line 5890 "Zend/zend_language_scanner.c"
yy609:
YYDEBUG(609, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5959,17 +5941,17 @@ yy615:
if (yych <= '_') goto yy617;
} else {
if (yych <= 'z') goto yy149;
- if (yych >= 0x7F) goto yy149;
+ if (yych >= 0x80) goto yy149;
}
}
yy616:
YYDEBUG(616, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1386 "Zend/zend_language_scanner.l"
+#line 1372 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_REQUIRE);
}
-#line 5973 "Zend/zend_language_scanner.c"
+#line 5955 "Zend/zend_language_scanner.c"
yy617:
YYDEBUG(617, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5998,11 +5980,11 @@ yy621:
}
YYDEBUG(622, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1390 "Zend/zend_language_scanner.l"
+#line 1376 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_REQUIRE_ONCE);
}
-#line 6006 "Zend/zend_language_scanner.c"
+#line 5988 "Zend/zend_language_scanner.c"
yy623:
YYDEBUG(623, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6021,11 +6003,11 @@ yy625:
}
YYDEBUG(626, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1148 "Zend/zend_language_scanner.l"
+#line 1133 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_RETURN);
}
-#line 6029 "Zend/zend_language_scanner.c"
+#line 6011 "Zend/zend_language_scanner.c"
yy627:
YYDEBUG(627, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6115,11 +6097,11 @@ yy636:
}
YYDEBUG(637, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1256 "Zend/zend_language_scanner.l"
+#line 1242 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CONTINUE);
}
-#line 6123 "Zend/zend_language_scanner.c"
+#line 6105 "Zend/zend_language_scanner.c"
yy638:
YYDEBUG(638, *YYCURSOR);
++YYCURSOR;
@@ -6128,11 +6110,11 @@ yy638:
}
YYDEBUG(639, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1144 "Zend/zend_language_scanner.l"
+#line 1129 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CONST);
}
-#line 6136 "Zend/zend_language_scanner.c"
+#line 6118 "Zend/zend_language_scanner.c"
yy640:
YYDEBUG(640, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6157,11 +6139,11 @@ yy643:
}
YYDEBUG(644, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1338 "Zend/zend_language_scanner.l"
+#line 1324 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CLONE);
}
-#line 6165 "Zend/zend_language_scanner.c"
+#line 6147 "Zend/zend_language_scanner.c"
yy645:
YYDEBUG(645, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6175,11 +6157,11 @@ yy646:
}
YYDEBUG(647, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1272 "Zend/zend_language_scanner.l"
+#line 1258 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CLASS);
}
-#line 6183 "Zend/zend_language_scanner.c"
+#line 6165 "Zend/zend_language_scanner.c"
yy648:
YYDEBUG(648, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6225,11 +6207,11 @@ yy655:
}
YYDEBUG(656, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1462 "Zend/zend_language_scanner.l"
+#line 1448 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CALLABLE);
}
-#line 6233 "Zend/zend_language_scanner.c"
+#line 6215 "Zend/zend_language_scanner.c"
yy657:
YYDEBUG(657, *YYCURSOR);
++YYCURSOR;
@@ -6238,11 +6220,11 @@ yy657:
}
YYDEBUG(658, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1244 "Zend/zend_language_scanner.l"
+#line 1230 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CASE);
}
-#line 6246 "Zend/zend_language_scanner.c"
+#line 6228 "Zend/zend_language_scanner.c"
yy659:
YYDEBUG(659, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6256,11 +6238,11 @@ yy660:
}
YYDEBUG(661, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1164 "Zend/zend_language_scanner.l"
+#line 1150 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_CATCH);
}
-#line 6264 "Zend/zend_language_scanner.c"
+#line 6246 "Zend/zend_language_scanner.c"
yy662:
YYDEBUG(662, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6311,11 +6293,11 @@ yy670:
}
YYDEBUG(671, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1140 "Zend/zend_language_scanner.l"
+#line 1125 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FUNCTION);
}
-#line 6319 "Zend/zend_language_scanner.c"
+#line 6301 "Zend/zend_language_scanner.c"
yy672:
YYDEBUG(672, *YYCURSOR);
++YYCURSOR;
@@ -6333,17 +6315,17 @@ yy672:
} else {
if (yych <= 'e') goto yy674;
if (yych <= 'z') goto yy149;
- if (yych >= 0x7F) goto yy149;
+ if (yych >= 0x80) goto yy149;
}
}
yy673:
YYDEBUG(673, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1204 "Zend/zend_language_scanner.l"
+#line 1190 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FOR);
}
-#line 6347 "Zend/zend_language_scanner.c"
+#line 6329 "Zend/zend_language_scanner.c"
yy674:
YYDEBUG(674, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6367,11 +6349,11 @@ yy677:
}
YYDEBUG(678, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1212 "Zend/zend_language_scanner.l"
+#line 1198 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FOREACH);
}
-#line 6375 "Zend/zend_language_scanner.c"
+#line 6357 "Zend/zend_language_scanner.c"
yy679:
YYDEBUG(679, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6399,17 +6381,17 @@ yy681:
} else {
if (yych <= 'l') goto yy683;
if (yych <= 'z') goto yy149;
- if (yych >= 0x7F) goto yy149;
+ if (yych >= 0x80) goto yy149;
}
}
yy682:
YYDEBUG(682, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1430 "Zend/zend_language_scanner.l"
+#line 1416 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FINAL);
}
-#line 6413 "Zend/zend_language_scanner.c"
+#line 6395 "Zend/zend_language_scanner.c"
yy683:
YYDEBUG(683, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6423,11 +6405,11 @@ yy684:
}
YYDEBUG(685, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1168 "Zend/zend_language_scanner.l"
+#line 1154 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_FINALLY);
}
-#line 6431 "Zend/zend_language_scanner.c"
+#line 6413 "Zend/zend_language_scanner.c"
yy686:
YYDEBUG(686, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6458,11 +6440,11 @@ yy688:
}
YYDEBUG(689, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1200 "Zend/zend_language_scanner.l"
+#line 1186 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DO);
}
-#line 6466 "Zend/zend_language_scanner.c"
+#line 6448 "Zend/zend_language_scanner.c"
yy690:
YYDEBUG(690, *YYCURSOR);
++YYCURSOR;
@@ -6471,11 +6453,11 @@ yy690:
}
YYDEBUG(691, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1136 "Zend/zend_language_scanner.l"
+#line 1121 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_EXIT);
}
-#line 6479 "Zend/zend_language_scanner.c"
+#line 6461 "Zend/zend_language_scanner.c"
yy692:
YYDEBUG(692, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6510,11 +6492,11 @@ yy697:
}
YYDEBUG(698, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1248 "Zend/zend_language_scanner.l"
+#line 1234 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DEFAULT);
}
-#line 6518 "Zend/zend_language_scanner.c"
+#line 6500 "Zend/zend_language_scanner.c"
yy699:
YYDEBUG(699, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6538,11 +6520,11 @@ yy702:
}
YYDEBUG(703, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1220 "Zend/zend_language_scanner.l"
+#line 1206 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_DECLARE);
}
-#line 6546 "Zend/zend_language_scanner.c"
+#line 6528 "Zend/zend_language_scanner.c"
yy704:
YYDEBUG(704, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6622,11 +6604,11 @@ yy715:
}
YYDEBUG(716, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1284 "Zend/zend_language_scanner.l"
+#line 1270 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_EXTENDS);
}
-#line 6630 "Zend/zend_language_scanner.c"
+#line 6612 "Zend/zend_language_scanner.c"
yy717:
YYDEBUG(717, *YYCURSOR);
++YYCURSOR;
@@ -6635,11 +6617,11 @@ yy717:
}
YYDEBUG(718, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1132 "Zend/zend_language_scanner.l"
+#line 1117 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_EXIT);
}
-#line 6643 "Zend/zend_language_scanner.c"
+#line 6625 "Zend/zend_language_scanner.c"
yy719:
YYDEBUG(719, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6653,11 +6635,11 @@ yy720:
}
YYDEBUG(721, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1374 "Zend/zend_language_scanner.l"
+#line 1360 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_EVAL);
}
-#line 6661 "Zend/zend_language_scanner.c"
+#line 6643 "Zend/zend_language_scanner.c"
yy722:
YYDEBUG(722, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6727,11 +6709,11 @@ yy731:
}
YYDEBUG(732, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1196 "Zend/zend_language_scanner.l"
+#line 1182 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ENDWHILE);
}
-#line 6735 "Zend/zend_language_scanner.c"
+#line 6717 "Zend/zend_language_scanner.c"
yy733:
YYDEBUG(733, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6760,11 +6742,11 @@ yy737:
}
YYDEBUG(738, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1240 "Zend/zend_language_scanner.l"
+#line 1226 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ENDSWITCH);
}
-#line 6768 "Zend/zend_language_scanner.c"
+#line 6750 "Zend/zend_language_scanner.c"
yy739:
YYDEBUG(739, *YYCURSOR);
++YYCURSOR;
@@ -6773,11 +6755,11 @@ yy739:
}
YYDEBUG(740, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1184 "Zend/zend_language_scanner.l"
+#line 1170 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ENDIF);
}
-#line 6781 "Zend/zend_language_scanner.c"
+#line 6763 "Zend/zend_language_scanner.c"
yy741:
YYDEBUG(741, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6800,17 +6782,17 @@ yy742:
} else {
if (yych <= 'e') goto yy744;
if (yych <= 'z') goto yy149;
- if (yych >= 0x7F) goto yy149;
+ if (yych >= 0x80) goto yy149;
}
}
yy743:
YYDEBUG(743, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1208 "Zend/zend_language_scanner.l"
+#line 1194 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ENDFOR);
}
-#line 6814 "Zend/zend_language_scanner.c"
+#line 6796 "Zend/zend_language_scanner.c"
yy744:
YYDEBUG(744, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6834,11 +6816,11 @@ yy747:
}
YYDEBUG(748, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1216 "Zend/zend_language_scanner.l"
+#line 1202 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ENDFOREACH);
}
-#line 6842 "Zend/zend_language_scanner.c"
+#line 6824 "Zend/zend_language_scanner.c"
yy749:
YYDEBUG(749, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6872,11 +6854,11 @@ yy754:
}
YYDEBUG(755, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1224 "Zend/zend_language_scanner.l"
+#line 1210 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ENDDECLARE);
}
-#line 6880 "Zend/zend_language_scanner.c"
+#line 6862 "Zend/zend_language_scanner.c"
yy756:
YYDEBUG(756, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6895,11 +6877,11 @@ yy758:
}
YYDEBUG(759, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1414 "Zend/zend_language_scanner.l"
+#line 1400 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_EMPTY);
}
-#line 6903 "Zend/zend_language_scanner.c"
+#line 6885 "Zend/zend_language_scanner.c"
yy760:
YYDEBUG(760, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6922,17 +6904,17 @@ yy761:
} else {
if (yych <= 'i') goto yy763;
if (yych <= 'z') goto yy149;
- if (yych >= 0x7F) goto yy149;
+ if (yych >= 0x80) goto yy149;
}
}
yy762:
YYDEBUG(762, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1188 "Zend/zend_language_scanner.l"
+#line 1174 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ELSE);
}
-#line 6936 "Zend/zend_language_scanner.c"
+#line 6918 "Zend/zend_language_scanner.c"
yy763:
YYDEBUG(763, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6946,11 +6928,11 @@ yy764:
}
YYDEBUG(765, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1180 "Zend/zend_language_scanner.l"
+#line 1166 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ELSEIF);
}
-#line 6954 "Zend/zend_language_scanner.c"
+#line 6936 "Zend/zend_language_scanner.c"
yy766:
YYDEBUG(766, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6964,11 +6946,11 @@ yy767:
}
YYDEBUG(768, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1264 "Zend/zend_language_scanner.l"
+#line 1250 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_ECHO);
}
-#line 6972 "Zend/zend_language_scanner.c"
+#line 6954 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_PROPERTY:
@@ -6989,7 +6971,7 @@ yyc_ST_LOOKING_FOR_PROPERTY:
0, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 0, 0, 0, 0, 64,
+ 64, 64, 64, 0, 0, 0, 0, 0,
64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64,
@@ -7029,7 +7011,7 @@ yyc_ST_LOOKING_FOR_PROPERTY:
} else {
if (yych <= '`') goto yy777;
if (yych <= 'z') goto yy775;
- if (yych <= '~') goto yy777;
+ if (yych <= 0x7F) goto yy777;
goto yy775;
}
}
@@ -7041,12 +7023,12 @@ yy771:
yy772:
YYDEBUG(772, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1297 "Zend/zend_language_scanner.l"
+#line 1283 "Zend/zend_language_scanner.l"
{
HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN(T_WHITESPACE);
}
-#line 7050 "Zend/zend_language_scanner.c"
+#line 7032 "Zend/zend_language_scanner.c"
yy773:
YYDEBUG(773, *YYCURSOR);
++YYCURSOR;
@@ -7054,13 +7036,13 @@ yy773:
yy774:
YYDEBUG(774, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1312 "Zend/zend_language_scanner.l"
+#line 1298 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state();
goto restart;
}
-#line 7064 "Zend/zend_language_scanner.c"
+#line 7046 "Zend/zend_language_scanner.c"
yy775:
YYDEBUG(775, *YYCURSOR);
++YYCURSOR;
@@ -7069,13 +7051,13 @@ yy775:
yy776:
YYDEBUG(776, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1306 "Zend/zend_language_scanner.l"
+#line 1292 "Zend/zend_language_scanner.l"
{
yy_pop_state();
zend_copy_value(zendlval, yytext, yyleng);
RETURN_TOKEN(T_STRING);
}
-#line 7079 "Zend/zend_language_scanner.c"
+#line 7061 "Zend/zend_language_scanner.c"
yy777:
YYDEBUG(777, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7096,11 +7078,11 @@ yy780:
++YYCURSOR;
YYDEBUG(781, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1302 "Zend/zend_language_scanner.l"
+#line 1288 "Zend/zend_language_scanner.l"
{
RETURN_TOKEN(T_OBJECT_OPERATOR);
}
-#line 7104 "Zend/zend_language_scanner.c"
+#line 7086 "Zend/zend_language_scanner.c"
yy782:
YYDEBUG(782, *YYCURSOR);
++YYCURSOR;
@@ -7132,7 +7114,7 @@ yyc_ST_LOOKING_FOR_VARNAME:
0, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 0, 0, 0, 0, 128,
+ 128, 128, 128, 0, 0, 0, 0, 0,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
@@ -7160,7 +7142,7 @@ yyc_ST_LOOKING_FOR_VARNAME:
} else {
if (yych <= '`') goto yy788;
if (yych <= 'z') goto yy786;
- if (yych <= '~') goto yy788;
+ if (yych <= 0x7F) goto yy788;
}
yy786:
YYDEBUG(786, *YYCURSOR);
@@ -7179,20 +7161,21 @@ yy786:
if (yych <= '`') goto yy787;
if (yych <= 'z') goto yy790;
} else {
- if (yych != '~') goto yy790;
+ if (yych <= '}') goto yy790;
+ if (yych >= 0x80) goto yy790;
}
}
yy787:
YYDEBUG(787, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1617 "Zend/zend_language_scanner.l"
+#line 1603 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state();
yy_push_state(ST_IN_SCRIPTING);
goto restart;
}
-#line 7196 "Zend/zend_language_scanner.c"
+#line 7179 "Zend/zend_language_scanner.c"
yy788:
YYDEBUG(788, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7217,7 +7200,7 @@ yy792:
++YYCURSOR;
YYDEBUG(793, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1608 "Zend/zend_language_scanner.l"
+#line 1594 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
zend_copy_value(zendlval, yytext, yyleng);
@@ -7225,7 +7208,7 @@ yy792:
yy_push_state(ST_IN_SCRIPTING);
RETURN_TOKEN(T_STRING_VARNAME);
}
-#line 7229 "Zend/zend_language_scanner.c"
+#line 7212 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_NOWDOC:
@@ -7236,7 +7219,7 @@ yyc_ST_NOWDOC:
++YYCURSOR;
YYDEBUG(797, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2341 "Zend/zend_language_scanner.l"
+#line 2322 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -7292,7 +7275,7 @@ nowdoc_scan_done:
HANDLE_NEWLINES(yytext, yyleng - newline);
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
-#line 7296 "Zend/zend_language_scanner.c"
+#line 7279 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_VAR_OFFSET:
{
@@ -7312,7 +7295,7 @@ yyc_ST_VAR_OFFSET:
0, 80, 80, 80, 80, 80, 80, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 0, 0, 0, 0, 16,
+ 16, 16, 16, 0, 0, 0, 0, 0,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16,
@@ -7333,7 +7316,7 @@ yyc_ST_VAR_OFFSET:
YYDEBUG(798, *YYCURSOR);
YYFILL(3);
yych = *YYCURSOR;
- if (yych <= '/') {
+ if (yych <= '0') {
if (yych <= ' ') {
if (yych <= '\f') {
if (yych <= 0x08) goto yy812;
@@ -7351,34 +7334,32 @@ yyc_ST_VAR_OFFSET:
goto yy803;
} else {
if (yych == '\'') goto yy808;
- goto yy807;
+ if (yych <= '/') goto yy807;
}
}
} else {
- if (yych <= '\\') {
- if (yych <= '@') {
- if (yych <= '0') goto yy800;
+ if (yych <= ']') {
+ if (yych <= 'Z') {
if (yych <= '9') goto yy802;
- goto yy807;
+ if (yych <= '@') goto yy807;
+ goto yy810;
} else {
- if (yych <= 'Z') goto yy810;
if (yych <= '[') goto yy807;
- goto yy808;
+ if (yych <= '\\') goto yy808;
+ goto yy805;
}
} else {
- if (yych <= '_') {
- if (yych <= ']') goto yy805;
- if (yych <= '^') goto yy807;
- goto yy810;
+ if (yych <= '`') {
+ if (yych == '_') goto yy810;
+ goto yy807;
} else {
- if (yych <= '`') goto yy807;
if (yych <= 'z') goto yy810;
if (yych <= '~') goto yy807;
+ if (yych <= 0x7F) goto yy812;
goto yy810;
}
}
}
-yy800:
YYDEBUG(800, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -7399,7 +7380,7 @@ yy800:
yy801:
YYDEBUG(801, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1722 "Zend/zend_language_scanner.l"
+#line 1711 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
char *end;
@@ -7415,7 +7396,7 @@ string:
}
RETURN_TOKEN(T_NUM_STRING);
}
-#line 7419 "Zend/zend_language_scanner.c"
+#line 7400 "Zend/zend_language_scanner.c"
yy802:
YYDEBUG(802, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7430,28 +7411,28 @@ yy803:
} else {
if (yych <= '`') goto yy804;
if (yych <= 'z') goto yy816;
- if (yych >= 0x7F) goto yy816;
+ if (yych >= 0x80) goto yy816;
}
yy804:
YYDEBUG(804, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1882 "Zend/zend_language_scanner.l"
+#line 1871 "Zend/zend_language_scanner.l"
{
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
RETURN_TOKEN(yytext[0]);
}
-#line 7444 "Zend/zend_language_scanner.c"
+#line 7425 "Zend/zend_language_scanner.c"
yy805:
YYDEBUG(805, *YYCURSOR);
++YYCURSOR;
YYDEBUG(806, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1877 "Zend/zend_language_scanner.l"
+#line 1866 "Zend/zend_language_scanner.l"
{
yy_pop_state();
RETURN_TOKEN(']');
}
-#line 7455 "Zend/zend_language_scanner.c"
+#line 7436 "Zend/zend_language_scanner.c"
yy807:
YYDEBUG(807, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7461,7 +7442,7 @@ yy808:
++YYCURSOR;
YYDEBUG(809, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1887 "Zend/zend_language_scanner.l"
+#line 1876 "Zend/zend_language_scanner.l"
{
/* Invalid rule to return a more explicit parse error with proper line number */
yyless(0);
@@ -7469,7 +7450,7 @@ yy808:
ZVAL_NULL(zendlval);
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
-#line 7473 "Zend/zend_language_scanner.c"
+#line 7454 "Zend/zend_language_scanner.c"
yy810:
YYDEBUG(810, *YYCURSOR);
++YYCURSOR;
@@ -7478,18 +7459,18 @@ yy810:
yy811:
YYDEBUG(811, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1895 "Zend/zend_language_scanner.l"
+#line 1884 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
RETURN_TOKEN(T_STRING);
}
-#line 7487 "Zend/zend_language_scanner.c"
+#line 7468 "Zend/zend_language_scanner.c"
yy812:
YYDEBUG(812, *YYCURSOR);
++YYCURSOR;
YYDEBUG(813, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2398 "Zend/zend_language_scanner.l"
+#line 2379 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
@@ -7498,7 +7479,7 @@ yy812:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 7502 "Zend/zend_language_scanner.c"
+#line 7483 "Zend/zend_language_scanner.c"
yy814:
YYDEBUG(814, *YYCURSOR);
++YYCURSOR;
@@ -7528,18 +7509,18 @@ yy816:
if (yych <= '_') goto yy816;
} else {
if (yych <= 'z') goto yy816;
- if (yych >= 0x7F) goto yy816;
+ if (yych >= 0x80) goto yy816;
}
}
yy818:
YYDEBUG(818, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1872 "Zend/zend_language_scanner.l"
+#line 1861 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
RETURN_TOKEN(T_VARIABLE);
}
-#line 7543 "Zend/zend_language_scanner.c"
+#line 7524 "Zend/zend_language_scanner.c"
yy819:
YYDEBUG(819, *YYCURSOR);
++YYCURSOR;
@@ -7579,12 +7560,12 @@ yy824:
yy826:
YYDEBUG(826, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1738 "Zend/zend_language_scanner.l"
+#line 1727 "Zend/zend_language_scanner.l"
{ /* Offset must be treated as a string */
ZVAL_STRINGL(zendlval, yytext, yyleng);
RETURN_TOKEN(T_NUM_STRING);
}
-#line 7588 "Zend/zend_language_scanner.c"
+#line 7569 "Zend/zend_language_scanner.c"
yy827:
YYDEBUG(827, *YYCURSOR);
++YYCURSOR;
@@ -7607,6 +7588,6 @@ yy829:
goto yy826;
}
}
-#line 2407 "Zend/zend_language_scanner.l"
+#line 2388 "Zend/zend_language_scanner.l"
}
diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h
index 3b75ff8cc4..d76fdc2ac7 100644
--- a/Zend/zend_language_scanner.h
+++ b/Zend/zend_language_scanner.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -63,7 +63,6 @@ typedef struct _zend_heredoc_label {
} zend_heredoc_label;
BEGIN_EXTERN_C()
-int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state);
ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state);
ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename);
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 4498edae5c..122c6d4eda 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@
#include <errno.h>
#include "zend.h"
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
# include <Winuser.h>
#endif
#include "zend_alloc.h"
@@ -116,7 +116,7 @@ do { \
#define SET_DOUBLE_QUOTES_SCANNED_LENGTH(len) SCNG(scanned_string_len) = (len)
#define GET_DOUBLE_QUOTES_SCANNED_LENGTH() SCNG(scanned_string_len)
-#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x7F)
+#define IS_LABEL_START(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z') || (c) == '_' || (c) >= 0x80)
#define ZEND_IS_OCT(c) ((c)>='0' && (c)<='7')
#define ZEND_IS_HEX(c) (((c)>='0' && (c)<='9') || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F'))
@@ -178,6 +178,7 @@ void startup_scanner(void)
{
CG(parse_error) = 0;
CG(doc_comment) = NULL;
+ CG(extra_fn_flags) = 0;
zend_stack_init(&SCNG(state_stack), sizeof(int));
zend_ptr_stack_init(&SCNG(heredoc_label_stack));
}
@@ -568,6 +569,48 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle)
}
END_EXTERN_C()
+static zend_op_array *zend_compile(int type)
+{
+ zend_op_array *op_array = NULL;
+ zend_bool original_in_compilation = CG(in_compilation);
+
+ CG(in_compilation) = 1;
+ CG(ast) = NULL;
+ CG(ast_arena) = zend_arena_create(1024 * 32);
+
+ if (!zendparse()) {
+ zend_file_context original_file_context;
+ zend_oparray_context original_oparray_context;
+ zend_op_array *original_active_op_array = CG(active_op_array);
+
+ op_array = emalloc(sizeof(zend_op_array));
+ init_op_array(op_array, type, INITIAL_OP_ARRAY_SIZE);
+ CG(active_op_array) = op_array;
+
+ if (zend_ast_process) {
+ zend_ast_process(CG(ast));
+ }
+
+ zend_file_context_begin(&original_file_context);
+ zend_oparray_context_begin(&original_oparray_context);
+ zend_compile_top_stmt(CG(ast));
+ zend_emit_final_return(type == ZEND_USER_FUNCTION);
+ op_array->line_start = 1;
+ op_array->line_end = CG(zend_lineno);
+ pass_two(op_array);
+ zend_oparray_context_end(&original_oparray_context);
+ zend_file_context_end(&original_file_context);
+
+ CG(active_op_array) = original_active_op_array;
+ }
+
+ zend_ast_destroy(CG(ast));
+ zend_arena_destroy(CG(ast_arena));
+
+ CG(in_compilation) = original_in_compilation;
+
+ return op_array;
+}
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type)
{
@@ -583,41 +626,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type)
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
}
} else {
- zend_bool original_in_compilation = CG(in_compilation);
- CG(in_compilation) = 1;
-
- CG(ast) = NULL;
- CG(ast_arena) = zend_arena_create(1024 * 32);
- if (!zendparse()) {
- zval retval_zv;
- zend_file_context original_file_context;
- zend_oparray_context original_oparray_context;
- zend_op_array *original_active_op_array = CG(active_op_array);
- op_array = emalloc(sizeof(zend_op_array));
- init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
- CG(active_op_array) = op_array;
- ZVAL_LONG(&retval_zv, 1);
-
- if (zend_ast_process) {
- zend_ast_process(CG(ast));
- }
-
- zend_file_context_begin(&original_file_context);
- zend_oparray_context_begin(&original_oparray_context);
- zend_compile_top_stmt(CG(ast));
- zend_emit_final_return(&retval_zv);
- op_array->line_start = 1;
- op_array->line_end = CG(zend_lineno);
- pass_two(op_array);
- zend_oparray_context_end(&original_oparray_context);
- zend_file_context_end(&original_file_context);
-
- CG(active_op_array) = original_active_op_array;
- }
-
- zend_ast_destroy(CG(ast));
- zend_arena_destroy(CG(ast_arena));
- CG(in_compilation) = original_in_compilation;
+ op_array = zend_compile(ZEND_USER_FUNCTION);
}
zend_restore_lexical_state(&original_lex_state);
@@ -732,13 +741,11 @@ ZEND_API size_t zend_get_scanned_file_offset(void)
return offset;
}
-
zend_op_array *compile_string(zval *source_string, char *filename)
{
zend_lex_state original_lex_state;
zend_op_array *op_array = NULL;
zval tmp;
- zend_bool original_in_compilation = CG(in_compilation);
if (Z_STRLEN_P(source_string)==0) {
return NULL;
@@ -748,45 +755,15 @@ zend_op_array *compile_string(zval *source_string, char *filename)
convert_to_string(&tmp);
source_string = &tmp;
- CG(in_compilation) = 1;
zend_save_lexical_state(&original_lex_state);
if (zend_prepare_string_for_scanning(source_string, filename) == SUCCESS) {
- CG(ast) = NULL;
- CG(ast_arena) = zend_arena_create(1024 * 32);
BEGIN(ST_IN_SCRIPTING);
-
- if (!zendparse()) {
- zend_file_context original_file_context;
- zend_oparray_context original_oparray_context;
- zend_op_array *original_active_op_array = CG(active_op_array);
- op_array = emalloc(sizeof(zend_op_array));
- init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE);
- CG(active_op_array) = op_array;
-
- if (zend_ast_process) {
- zend_ast_process(CG(ast));
- }
-
- zend_file_context_begin(&original_file_context);
- zend_oparray_context_begin(&original_oparray_context);
- zend_compile_top_stmt(CG(ast));
- zend_emit_final_return(NULL);
- op_array->line_start = 1;
- op_array->line_end = CG(zend_lineno);
- pass_two(op_array);
- zend_oparray_context_end(&original_oparray_context);
- zend_file_context_end(&original_file_context);
-
- CG(active_op_array) = original_active_op_array;
- }
-
- zend_ast_destroy(CG(ast));
- zend_arena_destroy(CG(ast_arena));
+ op_array = zend_compile(ZEND_EVAL_CODE);
}
zend_restore_lexical_state(&original_lex_state);
zval_dtor(&tmp);
- CG(in_compilation) = original_in_compilation;
+
return op_array;
}
@@ -927,7 +904,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
Z_STRLEN_P(zendlval)--;
break;
case 'e':
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
*t++ = VK_ESCAPE;
#else
*t++ = '\e';
@@ -1009,8 +986,9 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
if (!valid) {
zend_throw_exception(zend_ce_parse_error,
- "Invalid UTF-8 codepoint escape sequence", E_PARSE);
+ "Invalid UTF-8 codepoint escape sequence", 0);
zval_ptr_dtor(zendlval);
+ ZVAL_UNDEF(zendlval);
return FAILURE;
}
@@ -1020,8 +998,9 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
/* per RFC 3629, UTF-8 can only represent 21 bits */
if (codepoint > 0x10FFFF || errno) {
zend_throw_exception(zend_ce_parse_error,
- "Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE);
+ "Invalid UTF-8 codepoint escape sequence: Codepoint too large", 0);
zval_ptr_dtor(zendlval);
+ ZVAL_UNDEF(zendlval);
return FAILURE;
}
@@ -1065,6 +1044,12 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot
Z_STRLEN_P(zendlval)--;
}
}
+ if (octal_buf[2] &&
+ (octal_buf[0] > '3')) {
+ /* 3 octit values must not overflow 0xFF (\377) */
+ zend_error(E_COMPILE_WARNING, "Octal escape sequence overflow \\%s is greater than \\377", octal_buf);
+ }
+
*t++ = (char) ZEND_STRTOL(octal_buf, NULL, 8);
} else {
*t++ = '\\';
@@ -1119,7 +1104,7 @@ DNUM ([0-9]*"."[0-9]+)|([0-9]+"."[0-9]*)
EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM})
HNUM "0x"[0-9a-fA-F]+
BNUM "0b"[01]+
-LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
+LABEL [a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*
WHITESPACE [ \n\r\t]+
TABS_AND_SPACES [ \t]*
TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@]
@@ -1150,6 +1135,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from" {
+ HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN(T_YIELD_FROM);
}
@@ -1658,8 +1644,9 @@ NEWLINE ("\r"|"\n"|"\r\n")
* Because the lexing itself doesn't do that for us
*/
if (end != yytext + yyleng) {
- zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", E_PARSE);
- RETURN_TOKEN(T_ERROR);
+ zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", 0);
+ ZVAL_UNDEF(zendlval);
+ RETURN_TOKEN(T_LNUMBER);
}
} else {
errno = 0;
@@ -1675,16 +1662,18 @@ NEWLINE ("\r"|"\n"|"\r\n")
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
zend_throw_exception(zend_ce_parse_error,
- "Invalid numeric literal", E_PARSE);
- RETURN_TOKEN(T_ERROR);
+ "Invalid numeric literal", 0);
+ ZVAL_UNDEF(zendlval);
+ RETURN_TOKEN(T_DNUMBER);
}
ZEND_ASSERT(!errno);
RETURN_TOKEN(T_DNUMBER);
}
/* Also not an assert for the same reason */
if (end != yytext + yyleng) {
- zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", E_PARSE);
- RETURN_TOKEN(T_ERROR);
+ zend_throw_exception(zend_ce_parse_error, "Invalid numeric literal", 0);
+ ZVAL_UNDEF(zendlval);
+ RETURN_TOKEN(T_DNUMBER);
}
}
ZEND_ASSERT(!errno);
@@ -1853,7 +1842,7 @@ inline_char_handler:
/* Make sure a label character follows "->", otherwise there is no property
* and "->" will be taken literally
*/
-<ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL}"->"[a-zA-Z_\x7f-\xff] {
+<ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL}"->"[a-zA-Z_\x80-\xff] {
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY);
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
@@ -2042,9 +2031,7 @@ inline_char_handler:
switch (*YYCURSOR++) {
case '"':
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"') == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"');
RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING);
case '$':
if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') {
@@ -2211,9 +2198,7 @@ inline_char_handler:
double_quotes_scan_done:
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext, yyleng, '"') == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext, yyleng, '"');
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
@@ -2255,9 +2240,7 @@ double_quotes_scan_done:
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext, yyleng, '`') == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext, yyleng, '`');
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
@@ -2331,9 +2314,7 @@ double_quotes_scan_done:
heredoc_scan_done:
yyleng = YYCURSOR - SCNG(yy_text);
- if (zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0) == FAILURE) {
- RETURN_TOKEN(T_ERROR);
- }
+ zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0);
RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE);
}
diff --git a/Zend/zend_list.c b/Zend/zend_list.c
index 261489b4a1..7c7533cf49 100644
--- a/Zend/zend_list.c
+++ b/Zend/zend_list.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -84,7 +84,7 @@ static void zend_resource_dtor(zend_resource *res)
ZEND_API int zend_list_close(zend_resource *res)
{
if (GC_REFCOUNT(res) <= 0) {
- return zend_list_delete(res);
+ return zend_list_free(res);
} else if (res->type >= 0) {
zend_resource_dtor(res);
}
@@ -102,12 +102,14 @@ ZEND_API zend_resource* zend_register_resource(void *rsrc_pointer, int rsrc_type
ZEND_API void *zend_fetch_resource2(zend_resource *res, const char *resource_type_name, int resource_type1, int resource_type2)
{
- if (resource_type1 == res->type) {
- return res->ptr;
- }
+ if (res) {
+ if (resource_type1 == res->type) {
+ return res->ptr;
+ }
- if (resource_type2 == res->type) {
- return res->ptr;
+ if (resource_type2 == res->type) {
+ return res->ptr;
+ }
}
if (resource_type_name) {
diff --git a/Zend/zend_list.h b/Zend/zend_list.h
index 1fce748f53..f095c30a97 100644
--- a/Zend/zend_list.h
+++ b/Zend/zend_list.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c
index 205aa3433e..8eca3b6d41 100644
--- a/Zend/zend_llist.c
+++ b/Zend/zend_llist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h
index 9d63fe7dfa..87f05ddd80 100644
--- a/Zend/zend_llist.h
+++ b/Zend/zend_llist.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_long.h b/Zend/zend_long.h
index 4c81105438..60d1c71d3c 100644
--- a/Zend/zend_long.h
+++ b/Zend/zend_long.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -61,7 +61,7 @@ typedef int32_t zend_off_t;
# define ZEND_ULONG_FMT "%" PRIu64
# define ZEND_LONG_FMT_SPEC PRId64
# define ZEND_ULONG_FMT_SPEC PRIu64
-# ifdef PHP_WIN32
+# ifdef ZEND_WIN32
# define ZEND_LTOA(i, s, len) _i64toa_s((i), (s), (len), 10)
# define ZEND_ATOL(i, s) i = _atoi64((s))
# define ZEND_STRTOL(s0, s1, base) _strtoi64((s0), (s1), (base))
@@ -89,7 +89,7 @@ typedef int32_t zend_off_t;
# define ZEND_ULONG_FMT "%" PRIu32
# define ZEND_LONG_FMT_SPEC PRId32
# define ZEND_ULONG_FMT_SPEC PRIu32
-# ifdef PHP_WIN32
+# ifdef ZEND_WIN32
# define ZEND_LTOA(i, s, len) _ltoa_s((i), (s), (len), 10)
# define ZEND_ATOL(i, s) i = atol((s))
# else
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index 13b93b13a4..b388b7cb1a 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
-#define ZEND_MODULE_API_NO 20141001
+#define ZEND_MODULE_API_NO 20160303
#ifdef ZTS
#define USING_ZTS 1
#else
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c
index d97f7be06a..5245a10517 100644
--- a/Zend/zend_multibyte.c
+++ b/Zend/zend_multibyte.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h
index d5a40f99ee..34b831ebeb 100644
--- a/Zend/zend_multibyte.h
+++ b/Zend/zend_multibyte.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h
index b12c1e23b3..dfd21f7da3 100644
--- a/Zend/zend_multiply.h
+++ b/Zend/zend_multiply.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -74,20 +74,19 @@
#elif defined(__powerpc64__) && defined(__GNUC__)
-#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
- long __tmpvar; \
- __asm__("li 14, 0\n\t" \
- "mtxer 14\n\t" \
- "mulldo. %0, %2,%3\n\t" \
- "xor %1, %1, %1\n\t" \
- "bns+ 0f\n\t" \
- "li %1, 1\n\t" \
- "0:\n" \
- : "=r"(__tmpvar),"=r"(usedval) \
- : "r"(a), "r"(b) \
- : "r14", "cc"); \
- if (usedval) (dval) = (double) (a) * (double) (b); \
- else (lval) = __tmpvar; \
+#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
+ long __low, __high; \
+ __asm__("mulld %0,%2,%3\n\t" \
+ "mulhd %1,%2,%3\n" \
+ : "=&r"(__low), "=&r"(__high) \
+ : "r"(a), "r"(b)); \
+ if ((__low >> 63) != __high) { \
+ (dval) = (double) (a) * (double) (b); \
+ (usedval) = 1; \
+ } else { \
+ (lval) = __low; \
+ (usedval) = 0; \
+ } \
} while (0)
#elif SIZEOF_ZEND_LONG == 4
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index b1a6360149..d95f5d9a33 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -82,8 +83,11 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
zobj->properties->nInternalPointer = 0;
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) {
if (/*prop_info->ce == ce &&*/
- (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
- Z_TYPE_P(OBJ_PROP(zobj, prop_info->offset)) != IS_UNDEF) {
+ (prop_info->flags & ZEND_ACC_STATIC) == 0) {
+
+ if (UNEXPECTED(Z_TYPE_P(OBJ_PROP(zobj, prop_info->offset)) == IS_UNDEF)) {
+ zobj->properties->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
+ }
_zend_hash_append_ind(zobj->properties, prop_info->name,
OBJ_PROP(zobj, prop_info->offset));
@@ -94,10 +98,13 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) {
if (prop_info->ce == ce &&
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
- (prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
- Z_TYPE_P(OBJ_PROP(zobj, prop_info->offset)) != IS_UNDEF) {
+ (prop_info->flags & ZEND_ACC_PRIVATE) != 0) {
zval zv;
+ if (UNEXPECTED(Z_TYPE_P(OBJ_PROP(zobj, prop_info->offset)) == IS_UNDEF)) {
+ zobj->properties->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
+ }
+
ZVAL_INDIRECT(&zv, OBJ_PROP(zobj, prop_info->offset));
zend_hash_add(zobj->properties, prop_info->name, &zv);
}
@@ -161,9 +168,7 @@ ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp) /* {{{ *
return zend_array_dup(Z_ARRVAL(retval));
} else if (Z_REFCOUNT(retval) <= 1) {
*is_temp = 1;
- ALLOC_HASHTABLE(ht);
- *ht = *Z_ARRVAL(retval);
- efree_size(Z_ARR(retval), sizeof(zend_array));
+ ht = Z_ARR(retval);
return ht;
} else {
*is_temp = 0;
@@ -186,6 +191,9 @@ ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp) /* {{{ *
static void zend_std_call_getter(zval *object, zval *member, zval *retval) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
+ zend_class_entry *orig_fake_scope = EG(fake_scope);
+
+ EG(fake_scope) = NULL;
/* __get handler is called with one argument:
property name
@@ -197,6 +205,8 @@ static void zend_std_call_getter(zval *object, zval *member, zval *retval) /* {{
zend_call_method_with_1_params(object, ce, &ce->__get, ZEND_GET_FUNC_NAME, retval, member);
zval_ptr_dtor(member);
+
+ EG(fake_scope) = orig_fake_scope;
}
/* }}} */
@@ -205,6 +215,9 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value) /* {{{
zval retval;
int result;
zend_class_entry *ce = Z_OBJCE_P(object);
+ zend_class_entry *orig_fake_scope = EG(fake_scope);
+
+ EG(fake_scope) = NULL;
if (Z_REFCOUNTED_P(member)) Z_ADDREF_P(member);
if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
@@ -223,8 +236,10 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value) /* {{{
if (Z_TYPE(retval) != IS_UNDEF) {
result = i_zend_is_true(&retval) ? SUCCESS : FAILURE;
zval_ptr_dtor(&retval);
+ EG(fake_scope) = orig_fake_scope;
return result;
} else {
+ EG(fake_scope) = orig_fake_scope;
return FAILURE;
}
}
@@ -233,6 +248,9 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value) /* {{{
static void zend_std_call_unsetter(zval *object, zval *member) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
+ zend_class_entry *orig_fake_scope = EG(fake_scope);
+
+ EG(fake_scope) = NULL;
/* __unset handler is called with one argument:
property name
@@ -243,12 +261,17 @@ static void zend_std_call_unsetter(zval *object, zval *member) /* {{{ */
zend_call_method_with_1_params(object, ce, &ce->__unset, ZEND_UNSET_FUNC_NAME, NULL, member);
zval_ptr_dtor(member);
+
+ EG(fake_scope) = orig_fake_scope;
}
/* }}} */
static void zend_std_call_issetter(zval *object, zval *member, zval *retval) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
+ zend_class_entry *orig_fake_scope = EG(fake_scope);
+
+ EG(fake_scope) = NULL;
/* __isset handler is called with one argument:
property name
@@ -261,19 +284,33 @@ static void zend_std_call_issetter(zval *object, zval *member, zval *retval) /*
zend_call_method_with_1_params(object, ce, &ce->__isset, ZEND_ISSET_FUNC_NAME, retval, member);
zval_ptr_dtor(member);
+
+ EG(fake_scope) = orig_fake_scope;
}
/* }}} */
static zend_always_inline int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce) /* {{{ */
{
+ zend_class_entry *scope;
+
if (property_info->flags & ZEND_ACC_PUBLIC) {
return 1;
} else if (property_info->flags & ZEND_ACC_PRIVATE) {
- return (ce == EG(scope) || property_info->ce == EG(scope));
- } else {
- ZEND_ASSERT(property_info->flags & ZEND_ACC_PROTECTED);
- return zend_check_protected(property_info->ce, EG(scope));
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+ return (ce == scope || property_info->ce == scope);
+ } else if (property_info->flags & ZEND_ACC_PROTECTED) {
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+ return zend_check_protected(property_info->ce, scope);
}
+ return 0;
}
/* }}} */
@@ -296,18 +333,15 @@ static zend_always_inline uint32_t zend_get_property_offset(zend_class_entry *ce
zval *zv;
zend_property_info *property_info = NULL;
uint32_t flags;
+ zend_class_entry *scope;
if (cache_slot && EXPECTED(ce == CACHED_PTR_EX(cache_slot))) {
return (uint32_t)(intptr_t)CACHED_PTR_EX(cache_slot + 1);
}
- if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0')) {
+ if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0' && ZSTR_LEN(member) != 0)) {
if (!silent) {
- if (ZSTR_LEN(member) == 0) {
- zend_throw_error(zend_ce_error, "Cannot access empty property");
- } else {
- zend_throw_error(zend_ce_error, "Cannot access property started with '\\0'");
- }
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
}
return ZEND_WRONG_PROPERTY_OFFSET;
}
@@ -342,10 +376,16 @@ static zend_always_inline uint32_t zend_get_property_offset(zend_class_entry *ce
}
}
- if (EG(scope) != ce
- && EG(scope)
- && is_derived_class(ce, EG(scope))
- && (zv = zend_hash_find(&EG(scope)->properties_info, member)) != NULL
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+
+ if (scope != ce
+ && scope
+ && is_derived_class(ce, scope)
+ && (zv = zend_hash_find(&scope->properties_info, member)) != NULL
&& ((zend_property_info*)Z_PTR_P(zv))->flags & ZEND_ACC_PRIVATE) {
property_info = (zend_property_info*)Z_PTR_P(zv);
if (UNEXPECTED((property_info->flags & ZEND_ACC_STATIC) != 0)) {
@@ -360,7 +400,7 @@ exit_dynamic:
} else if (UNEXPECTED(property_info == ZEND_WRONG_PROPERTY_INFO)) {
/* Information was available, but we were denied access. Error out. */
if (!silent) {
- zend_throw_error(zend_ce_error, "Cannot access %s property %s::$%s", zend_visibility_string(flags), ZSTR_VAL(ce->name), ZSTR_VAL(member));
+ zend_throw_error(NULL, "Cannot access %s property %s::$%s", zend_visibility_string(flags), ZSTR_VAL(ce->name), ZSTR_VAL(member));
}
return ZEND_WRONG_PROPERTY_OFFSET;
}
@@ -378,14 +418,11 @@ ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_s
zval *zv;
zend_property_info *property_info = NULL;
uint32_t flags;
+ zend_class_entry *scope;
- if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0')) {
+ if (UNEXPECTED(ZSTR_VAL(member)[0] == '\0' && ZSTR_LEN(member) != 0)) {
if (!silent) {
- if (ZSTR_LEN(member) == 0) {
- zend_throw_error(zend_ce_error, "Cannot access empty property");
- } else {
- zend_throw_error(zend_ce_error, "Cannot access property started with '\\0'");
- }
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
}
return ZEND_WRONG_PROPERTY_INFO;
}
@@ -419,10 +456,16 @@ ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_s
}
}
- if (EG(scope) != ce
- && EG(scope)
- && is_derived_class(ce, EG(scope))
- && (zv = zend_hash_find(&EG(scope)->properties_info, member)) != NULL
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+
+ if (scope != ce
+ && scope
+ && is_derived_class(ce, scope)
+ && (zv = zend_hash_find(&scope->properties_info, member)) != NULL
&& ((zend_property_info*)Z_PTR_P(zv))->flags & ZEND_ACC_PRIVATE) {
property_info = (zend_property_info*)Z_PTR_P(zv);
} else if (UNEXPECTED(property_info == NULL)) {
@@ -431,7 +474,7 @@ exit_dynamic:
} else if (UNEXPECTED(property_info == ZEND_WRONG_PROPERTY_INFO)) {
/* Information was available, but we were denied access. Error out. */
if (!silent) {
- zend_throw_error(zend_ce_error, "Cannot access %s property %s::$%s", zend_visibility_string(flags), ZSTR_VAL(ce->name), ZSTR_VAL(member));
+ zend_throw_error(NULL, "Cannot access %s property %s::$%s", zend_visibility_string(flags), ZSTR_VAL(ce->name), ZSTR_VAL(member));
}
return ZEND_WRONG_PROPERTY_INFO;
}
@@ -481,33 +524,60 @@ ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_inf
/* }}} */
static void zend_property_guard_dtor(zval *el) /* {{{ */ {
- efree(Z_PTR_P(el));
+ uint32_t *ptr = (uint32_t*)Z_PTR_P(el);
+ if (EXPECTED(!(((zend_uintptr_t)ptr) & 1))) {
+ efree_size(ptr, sizeof(uint32_t));
+ }
}
/* }}} */
-static zend_long *zend_get_property_guard(zend_object *zobj, zend_string *member) /* {{{ */
+ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *member) /* {{{ */
{
HashTable *guards;
- zend_long stub, *guard;
- zval tmp;
+ zval *zv;
+ uint32_t *ptr;
ZEND_ASSERT(GC_FLAGS(zobj) & IS_OBJ_USE_GUARDS);
- if (GC_FLAGS(zobj) & IS_OBJ_HAS_GUARDS) {
- guards = Z_PTR(zobj->properties_table[zobj->ce->default_properties_count]);
+ zv = zobj->properties_table + zobj->ce->default_properties_count;
+ if (EXPECTED(Z_TYPE_P(zv) == IS_STRING)) {
+ zend_string *str = Z_STR_P(zv);
+ if (EXPECTED(str == member) ||
+ /* hash values are always pred-calculated here */
+ (EXPECTED(ZSTR_H(str) == ZSTR_H(member)) &&
+ EXPECTED(ZSTR_LEN(str) == ZSTR_LEN(member)) &&
+ EXPECTED(memcmp(ZSTR_VAL(str), ZSTR_VAL(member), ZSTR_LEN(member)) == 0))) {
+ return &zv->u2.property_guard;
+ } else if (EXPECTED(zv->u2.property_guard == 0)) {
+ zend_string_release(Z_STR_P(zv));
+ ZVAL_STR_COPY(zv, member);
+ return &zv->u2.property_guard;
+ } else {
+ ALLOC_HASHTABLE(guards);
+ zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
+ /* mark pointer as "special" using low bit */
+ zend_hash_add_new_ptr(guards, member,
+ (void*)(((zend_uintptr_t)&zv->u2.property_guard) | 1));
+ zend_string_release(Z_STR_P(zv));
+ ZVAL_ARR(zv, guards);
+ }
+ } else if (EXPECTED(Z_TYPE_P(zv) == IS_ARRAY)) {
+ guards = Z_ARRVAL_P(zv);
ZEND_ASSERT(guards != NULL);
- if ((guard = (zend_long *)zend_hash_find_ptr(guards, member)) != NULL) {
- return guard;
+ zv = zend_hash_find(guards, member);
+ if (zv != NULL) {
+ return (uint32_t*)(((zend_uintptr_t)Z_PTR_P(zv)) & ~1);
}
} else {
- ALLOC_HASHTABLE(guards);
- zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
- ZVAL_PTR(&tmp, guards);
- Z_PTR(zobj->properties_table[zobj->ce->default_properties_count]) = guards;
+ ZEND_ASSERT(Z_TYPE_P(zv) == IS_UNDEF);
GC_FLAGS(zobj) |= IS_OBJ_HAS_GUARDS;
- }
-
- stub = 0;
- return (zend_long *)zend_hash_add_mem(guards, member, &stub, sizeof(zend_ulong));
+ ZVAL_STR_COPY(zv, member);
+ zv->u2.property_guard = 0;
+ return &zv->u2.property_guard;
+ }
+ /* we have to allocate uint32_t separately because ht->arData may be reallocated */
+ ptr = (uint32_t*)emalloc(sizeof(uint32_t));
+ *ptr = 0;
+ return (uint32_t*)zend_hash_add_new_ptr(guards, member, ptr);
}
/* }}} */
@@ -549,9 +619,34 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
goto exit;
}
+ /* magic isset */
+ if ((type == BP_VAR_IS) && zobj->ce->__isset) {
+ zval tmp_object, tmp_result;
+ uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
+
+ if (!((*guard) & IN_ISSET)) {
+ ZVAL_COPY(&tmp_object, object);
+ ZVAL_UNDEF(&tmp_result);
+
+ *guard |= IN_ISSET;
+ zend_std_call_issetter(&tmp_object, member, &tmp_result);
+ *guard &= ~IN_ISSET;
+
+ if (!zend_is_true(&tmp_result)) {
+ retval = &EG(uninitialized_zval);
+ zval_ptr_dtor(&tmp_object);
+ zval_ptr_dtor(&tmp_result);
+ goto exit;
+ }
+
+ zval_ptr_dtor(&tmp_object);
+ zval_ptr_dtor(&tmp_result);
+ }
+ }
+
/* magic get */
if (zobj->ce->__get) {
- zend_long *guard = zend_get_property_guard(zobj, Z_STR_P(member));
+ uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
if (!((*guard) & IN_GET)) {
zval tmp_object;
@@ -576,16 +671,10 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
zval_ptr_dtor(&tmp_object);
goto exit;
} else {
- if (Z_STRVAL_P(member)[0] == '\0') {
- if (Z_STRLEN_P(member) == 0) {
- zend_throw_error(zend_ce_error, "Cannot access empty property");
- retval = &EG(uninitialized_zval);
- goto exit;
- } else {
- zend_throw_error(zend_ce_error, "Cannot access property started with '\\0'");
- retval = &EG(uninitialized_zval);
- goto exit;
- }
+ if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
+ retval = &EG(uninitialized_zval);
+ goto exit;
}
}
}
@@ -595,11 +684,10 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_
retval = &EG(uninitialized_zval);
exit:
- if (UNEXPECTED(Z_TYPE(tmp_member) != IS_UNDEF)) {
- if (Z_REFCOUNTED_P(retval)) Z_ADDREF_P(retval);
+ if (UNEXPECTED(Z_REFCOUNTED(tmp_member))) {
zval_ptr_dtor(&tmp_member);
- if (Z_REFCOUNTED_P(retval)) Z_DELREF_P(retval);
}
+
return retval;
}
/* }}} */
@@ -647,7 +735,7 @@ found:
/* magic set */
if (zobj->ce->__set) {
- zend_long *guard = zend_get_property_guard(zobj, Z_STR_P(member));
+ uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
if (!((*guard) & IN_SET)) {
zval tmp_object;
@@ -662,14 +750,9 @@ found:
} else if (EXPECTED(property_offset != ZEND_WRONG_PROPERTY_OFFSET)) {
goto write_std_property;
} else {
- if (Z_STRVAL_P(member)[0] == '\0') {
- if (Z_STRLEN_P(member) == 0) {
- zend_throw_error(zend_ce_error, "Cannot access empty property");
- goto exit;
- } else {
- zend_throw_error(zend_ce_error, "Cannot access property started with '\\0'");
- goto exit;
- }
+ if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
+ goto exit;
}
}
} else if (EXPECTED(property_offset != ZEND_WRONG_PROPERTY_OFFSET)) {
@@ -696,7 +779,7 @@ write_std_property:
}
exit:
- if (UNEXPECTED(Z_TYPE(tmp_member) != IS_UNDEF)) {
+ if (UNEXPECTED(Z_REFCOUNTED(tmp_member))) {
zval_ptr_dtor(&tmp_member);
}
}
@@ -708,26 +791,39 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /*
zval tmp;
if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) {
- if(offset == NULL) {
+ if (offset == NULL) {
/* [] construct */
- ZVAL_UNDEF(&tmp);
+ ZVAL_NULL(&tmp);
offset = &tmp;
} else {
SEPARATE_ARG_IF_REF(offset);
}
+
+ if (type == BP_VAR_IS) {
+ zend_call_method_with_1_params(object, ce, NULL, "offsetexists", rv, offset);
+ if (UNEXPECTED(Z_ISUNDEF_P(rv))) {
+ return NULL;
+ }
+ if (!i_zend_is_true(rv)) {
+ zval_ptr_dtor(rv);
+ return &EG(uninitialized_zval);
+ }
+ zval_ptr_dtor(rv);
+ }
+
zend_call_method_with_1_params(object, ce, NULL, "offsetget", rv, offset);
zval_ptr_dtor(offset);
if (UNEXPECTED(Z_TYPE_P(rv) == IS_UNDEF)) {
if (UNEXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Undefined offset for object of type %s used as array", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Undefined offset for object of type %s used as array", ZSTR_VAL(ce->name));
}
return NULL;
}
return rv;
} else {
- zend_throw_error(zend_ce_error, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
return NULL;
}
}
@@ -748,7 +844,7 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value) /*
zend_call_method_with_2_params(object, ce, NULL, "offsetset", NULL, offset, value);
zval_ptr_dtor(offset);
} else {
- zend_throw_error(zend_ce_error, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
}
}
/* }}} */
@@ -777,7 +873,7 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /
}
zval_ptr_dtor(offset);
} else {
- zend_throw_error(zend_ce_error, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
return 0;
}
return result;
@@ -882,6 +978,9 @@ static void zend_std_unset_property(zval *object, zval *member, void **cache_slo
if (Z_TYPE_P(slot) != IS_UNDEF) {
zval_ptr_dtor(slot);
ZVAL_UNDEF(slot);
+ if (zobj->properties) {
+ zobj->properties->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
+ }
goto exit;
}
} else if (EXPECTED(zobj->properties != NULL)) {
@@ -901,7 +1000,7 @@ static void zend_std_unset_property(zval *object, zval *member, void **cache_slo
/* magic unset */
if (zobj->ce->__unset) {
- zend_long *guard = zend_get_property_guard(zobj, Z_STR_P(member));
+ uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
if (!((*guard) & IN_UNSET)) {
zval tmp_object;
@@ -912,20 +1011,15 @@ static void zend_std_unset_property(zval *object, zval *member, void **cache_slo
(*guard) &= ~IN_UNSET;
zval_ptr_dtor(&tmp_object);
} else {
- if (Z_STRVAL_P(member)[0] == '\0') {
- if (Z_STRLEN_P(member) == 0) {
- zend_throw_error(zend_ce_error, "Cannot access empty property");
- goto exit;
- } else {
- zend_throw_error(zend_ce_error, "Cannot access property started with '\\0'");
- goto exit;
- }
+ if (Z_STRVAL_P(member)[0] == '\0' && Z_STRLEN_P(member) != 0) {
+ zend_throw_error(NULL, "Cannot access property started with '\\0'");
+ goto exit;
}
}
}
exit:
- if (UNEXPECTED(Z_TYPE(tmp_member) != IS_NULL)) {
+ if (UNEXPECTED(Z_REFCOUNTED(tmp_member))) {
zval_ptr_dtor(&tmp_member);
}
}
@@ -940,7 +1034,7 @@ static void zend_std_unset_dimension(zval *object, zval *offset) /* {{{ */
zend_call_method_with_1_params(object, ce, NULL, "offsetunset", NULL, offset);
zval_ptr_dtor(offset);
} else {
- zend_throw_error(zend_ce_error, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(ce->name));
}
}
/* }}} */
@@ -952,6 +1046,7 @@ static void zend_std_unset_dimension(zval *object, zval *offset) /* {{{ */
static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, zend_string *function_name) /* {{{ */
{
zval *func;
+ zend_class_entry *scope;
if (!ce) {
return 0;
@@ -963,7 +1058,8 @@ static inline zend_function *zend_check_private_int(zend_function *fbc, zend_cla
* 2. One of our parent classes are the same as the scope, and it contains
* a private function with the same name that has the same scope.
*/
- if (fbc->common.scope == ce && EG(scope) == ce) {
+ scope = zend_get_executed_scope();
+ if (fbc->common.scope == ce && scope == ce) {
/* rule #1 checks out ok, allow the function call */
return fbc;
}
@@ -972,11 +1068,11 @@ static inline zend_function *zend_check_private_int(zend_function *fbc, zend_cla
/* Check rule #2 */
ce = ce->parent;
while (ce) {
- if (ce == EG(scope)) {
+ if (ce == scope) {
if ((func = zend_hash_find(&ce->function_table, function_name))) {
fbc = Z_FUNC_P(func);
if (fbc->common.fn_flags & ZEND_ACC_PRIVATE
- && fbc->common.scope == EG(scope)) {
+ && fbc->common.scope == scope) {
return fbc;
}
}
@@ -1025,6 +1121,7 @@ ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope)
ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_name, int is_static) /* {{{ */
{
+ size_t mname_len;
zend_op_array *func;
zend_function *fbc = is_static ? ce->__callstatic : ce->__call;
@@ -1049,14 +1146,16 @@ ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend
func->prototype = fbc;
func->scope = fbc->common.scope;
+ /* reserve space for arguments, local and temorary variables */
+ func->T = (fbc->type == ZEND_USER_FUNCTION)? MAX(fbc->op_array.last_var + fbc->op_array.T, 2) : 2;
func->filename = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.filename : ZSTR_EMPTY_ALLOC();
func->line_start = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.line_start : 0;
func->line_end = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.line_end : 0;
//??? keep compatibility for "\0" characters
//??? see: Zend/tests/bug46238.phpt
- if (UNEXPECTED(strlen(ZSTR_VAL(method_name)) != ZSTR_LEN(method_name))) {
- func->function_name = zend_string_init(ZSTR_VAL(method_name), strlen(ZSTR_VAL(method_name)), 0);
+ if (UNEXPECTED((mname_len = strlen(ZSTR_VAL(method_name))) != ZSTR_LEN(method_name))) {
+ func->function_name = zend_string_init(ZSTR_VAL(method_name), mname_len, 0);
} else {
func->function_name = zend_string_copy(method_name);
}
@@ -1077,6 +1176,7 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
zval *func;
zend_function *fbc;
zend_string *lc_method_name;
+ zend_class_entry *scope = NULL;
ALLOCA_FLAG(use_heap);
if (EXPECTED(key != NULL)) {
@@ -1115,7 +1215,8 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
if (zobj->ce->__call) {
fbc = zend_get_user_call_function(zobj->ce, method_name);
} else {
- zend_throw_error(zend_ce_error, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(method_name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = zend_get_executed_scope();
+ zend_throw_error(NULL, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(method_name), scope ? ZSTR_VAL(scope->name) : "");
fbc = NULL;
}
}
@@ -1123,26 +1224,29 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
/* Ensure that we haven't overridden a private function and end up calling
* the overriding public function...
*/
- if (EG(scope) &&
- is_derived_class(fbc->common.scope, EG(scope)) &&
- fbc->op_array.fn_flags & ZEND_ACC_CHANGED) {
- if ((func = zend_hash_find(&EG(scope)->function_table, lc_method_name)) != NULL) {
- zend_function *priv_fbc = Z_FUNC_P(func);
- if (priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
- && priv_fbc->common.scope == EG(scope)) {
- fbc = priv_fbc;
+ if (fbc->op_array.fn_flags & (ZEND_ACC_CHANGED|ZEND_ACC_PROTECTED)) {
+ scope = zend_get_executed_scope();
+ }
+ if (fbc->op_array.fn_flags & ZEND_ACC_CHANGED) {
+ if (scope && is_derived_class(fbc->common.scope, scope)) {
+ if ((func = zend_hash_find(&scope->function_table, lc_method_name)) != NULL) {
+ zend_function *priv_fbc = Z_FUNC_P(func);
+ if (priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
+ && priv_fbc->common.scope == scope) {
+ fbc = priv_fbc;
+ }
}
}
}
- if ((fbc->common.fn_flags & ZEND_ACC_PROTECTED)) {
+ if (fbc->common.fn_flags & ZEND_ACC_PROTECTED) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
* If we're not and __call() handler exists, invoke it, otherwise error out.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), EG(scope)))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) {
if (zobj->ce->__call) {
fbc = zend_get_user_call_function(zobj->ce, method_name);
} else {
- zend_throw_error(zend_ce_error, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(method_name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ zend_throw_error(NULL, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(method_name), scope ? ZSTR_VAL(scope->name) : "");
fbc = NULL;
}
}
@@ -1168,6 +1272,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_st
char *lc_class_name;
zend_string *lc_function_name;
zend_object *object;
+ zend_class_entry *scope;
if (EXPECTED(key != NULL)) {
lc_function_name = Z_STR_P(key);
@@ -1228,25 +1333,27 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_st
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- updated_fbc = zend_check_private_int(fbc, EG(scope), lc_function_name);
+ scope = zend_get_executed_scope();
+ updated_fbc = zend_check_private_int(fbc, scope, lc_function_name);
if (EXPECTED(updated_fbc != NULL)) {
fbc = updated_fbc;
} else {
if (ce->__callstatic) {
fbc = zend_get_user_callstatic_function(ce, function_name);
} else {
- zend_throw_error(zend_ce_error, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(function_name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ zend_throw_error(NULL, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(function_name), scope ? ZSTR_VAL(scope->name) : "");
fbc = NULL;
}
}
} else if ((fbc->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), EG(scope)))) {
+ scope = zend_get_executed_scope();
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), scope))) {
if (ce->__callstatic) {
fbc = zend_get_user_callstatic_function(ce, function_name);
} else {
- zend_throw_error(zend_ce_error, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(function_name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ zend_throw_error(NULL, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(function_name), scope ? ZSTR_VAL(scope->name) : "");
fbc = NULL;
}
}
@@ -1271,7 +1378,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
if (UNEXPECTED(!zend_verify_property_access(property_info, ce))) {
if (!silent) {
- zend_throw_error(zend_ce_error, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
+ zend_throw_error(NULL, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
}
return NULL;
}
@@ -1291,7 +1398,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
undeclared_property:
if (!silent) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
}
ret = NULL;
}
@@ -1300,9 +1407,9 @@ undeclared_property:
}
/* }}} */
-ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name) /* {{{ */
+ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name) /* {{{ */
{
- zend_throw_error(zend_ce_error, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
+ zend_throw_error(NULL, "Attempt to unset static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name));
return 0;
}
/* }}} */
@@ -1310,6 +1417,7 @@ ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_str
ZEND_API union _zend_function *zend_std_get_constructor(zend_object *zobj) /* {{{ */
{
zend_function *constructor = zobj->ce->constructor;
+ zend_class_entry *scope;
if (constructor) {
if (constructor->op_array.fn_flags & ZEND_ACC_PUBLIC) {
@@ -1317,12 +1425,17 @@ ZEND_API union _zend_function *zend_std_get_constructor(zend_object *zobj) /* {{
} else if (constructor->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (UNEXPECTED(constructor->common.scope != EG(scope))) {
- if (EG(scope)) {
- zend_throw_error(zend_ce_error, "Call to private %s::%s() from context '%s'", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(EG(scope)->name));
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+ if (UNEXPECTED(constructor->common.scope != scope)) {
+ if (scope) {
+ zend_throw_error(NULL, "Call to private %s::%s() from context '%s'", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name));
constructor = NULL;
} else {
- zend_throw_error(zend_ce_error, "Call to private %s::%s() from invalid context", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name));
+ zend_throw_error(NULL, "Call to private %s::%s() from invalid context", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name));
constructor = NULL;
}
}
@@ -1331,12 +1444,17 @@ ZEND_API union _zend_function *zend_std_get_constructor(zend_object *zobj) /* {{
* Constructors only have prototype if they are defined by an interface but
* it is the compilers responsibility to take care of the prototype.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), EG(scope)))) {
- if (EG(scope)) {
- zend_throw_error(zend_ce_error, "Call to protected %s::%s() from context '%s'", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(EG(scope)->name));
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), scope))) {
+ if (scope) {
+ zend_throw_error(NULL, "Call to protected %s::%s() from context '%s'", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name));
constructor = NULL;
} else {
- zend_throw_error(zend_ce_error, "Call to protected %s::%s() from invalid context", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name));
+ zend_throw_error(NULL, "Call to protected %s::%s() from invalid context", ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name));
constructor = NULL;
}
}
@@ -1462,7 +1580,7 @@ found:
result = 0;
if ((has_set_exists != 2) && zobj->ce->__isset) {
- zend_long *guard = zend_get_property_guard(zobj, Z_STR_P(member));
+ uint32_t *guard = zend_get_property_guard(zobj, Z_STR_P(member));
if (!((*guard) & IN_ISSET)) {
zval rv;
@@ -1497,7 +1615,7 @@ found:
}
exit:
- if (UNEXPECTED(Z_TYPE(tmp_member) != IS_UNDEF)) {
+ if (UNEXPECTED(Z_REFCOUNTED(tmp_member))) {
zval_ptr_dtor(&tmp_member);
}
return result;
@@ -1521,9 +1639,18 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
if (ce->__tostring &&
(zend_call_method_with_0_params(readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(exception))) {
if (UNEXPECTED(EG(exception) != NULL)) {
+ zval *msg, ex, rv;
zval_ptr_dtor(&retval);
+ ZVAL_OBJ(&ex, EG(exception));
EG(exception) = NULL;
- zend_error_noreturn(E_ERROR, "Method %s::__toString() must not throw an exception", ZSTR_VAL(ce->name));
+ msg = zend_read_property(Z_OBJCE(ex), &ex, "message", sizeof("message") - 1, 1, &rv);
+ if (UNEXPECTED(Z_TYPE_P(msg) != IS_STRING)) {
+ ZVAL_EMPTY_STRING(&rv);
+ msg = &rv;
+ }
+ zend_error_noreturn(E_ERROR,
+ "Method %s::__toString() must not throw an exception, caught %s: %s",
+ ZSTR_VAL(ce->name), ZSTR_VAL(Z_OBJCE(ex)->name), Z_STRVAL_P(msg));
return FAILURE;
}
if (EXPECTED(Z_TYPE(retval) == IS_STRING)) {
@@ -1581,7 +1708,7 @@ int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **f
ce = Z_OBJCE_P(obj);
- if ((func = zend_hash_str_find(&ce->function_table, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1)) == NULL) {
+ if ((func = zend_hash_find(&ce->function_table, CG(known_strings)[ZEND_STR_MAGIC_INVOKE])) == NULL) {
return FAILURE;
}
*fptr_ptr = Z_FUNC_P(func);
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 77ac85039f..2e397093ac 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -27,8 +27,8 @@ struct _zend_property_info;
#define ZEND_WRONG_PROPERTY_INFO \
((struct _zend_property_info*)((zend_intptr_t)-1))
-#define ZEND_DYNAMIC_PROPERTY_OFFSET (-1)
-#define ZEND_WRONG_PROPERTY_OFFSET (-2)
+#define ZEND_DYNAMIC_PROPERTY_OFFSET ((uint32_t)(-1))
+#define ZEND_WRONG_PROPERTY_OFFSET ((uint32_t)(-2))
/* The following rule applies to read_property() and read_dimension() implementations:
If you return a zval which is not otherwise referenced by the extension or the engine's
@@ -163,7 +163,7 @@ extern ZEND_API zend_object_handlers std_object_handlers;
BEGIN_EXTERN_C()
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
-ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
+ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
ZEND_API union _zend_function *zend_std_get_constructor(zend_object *object);
ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent);
ZEND_API HashTable *zend_std_get_properties(zval *object);
@@ -180,6 +180,8 @@ ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_inf
ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend_string *method_name, int is_static);
+ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *member);
+
#define zend_free_trampoline(func) do { \
if ((func) == &EG(trampoline)) { \
EG(trampoline).common.function_name = NULL; \
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 93b21e00d9..b5f19b3045 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -45,7 +46,6 @@ ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce)
}
if (UNEXPECTED(ce->ce_flags & ZEND_ACC_USE_GUARDS)) {
GC_FLAGS(object) |= IS_OBJ_USE_GUARDS;
- Z_PTR_P(p) = NULL;
ZVAL_UNDEF(p);
}
}
@@ -70,11 +70,17 @@ ZEND_API void zend_object_std_dtor(zend_object *object)
} while (p != end);
}
if (UNEXPECTED(GC_FLAGS(object) & IS_OBJ_HAS_GUARDS)) {
- HashTable *guards = Z_PTR_P(p);
+ if (EXPECTED(Z_TYPE_P(p) == IS_STRING)) {
+ zend_string_release(Z_STR_P(p));
+ } else {
+ HashTable *guards;
- ZEND_ASSERT(guards != NULL);
- zend_hash_destroy(guards);
- FREE_HASHTABLE(guards);
+ ZEND_ASSERT(Z_TYPE_P(p) == IS_ARRAY);
+ guards = Z_ARRVAL_P(p);
+ ZEND_ASSERT(guards != NULL);
+ zend_hash_destroy(guards);
+ FREE_HASHTABLE(guards);
+ }
}
}
@@ -85,44 +91,50 @@ ZEND_API void zend_objects_destroy_object(zend_object *object)
if (destructor) {
zend_object *old_exception;
zval obj;
+ zend_class_entry *orig_fake_scope = NULL;
+ EG(fake_scope) = NULL;
if (destructor->op_array.fn_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_PROTECTED)) {
if (destructor->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (object->ce != EG(scope)) {
- zend_class_entry *ce = object->ce;
+ if (EG(current_execute_data)) {
+ zend_class_entry *scope = zend_get_executed_scope();
- if (EG(current_execute_data)) {
- zend_throw_error(zend_ce_error,
+ if (object->ce != scope) {
+ zend_throw_error(NULL,
"Call to private %s::__destruct() from context '%s'",
- ZSTR_VAL(ce->name),
- EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
- } else {
- zend_error(E_WARNING,
- "Call to private %s::__destruct() from context '%s' during shutdown ignored",
- ZSTR_VAL(ce->name),
- EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ ZSTR_VAL(object->ce->name),
+ scope ? ZSTR_VAL(scope->name) : "");
+ EG(fake_scope) = orig_fake_scope;
+ return;
}
+ } else {
+ zend_error(E_WARNING,
+ "Call to private %s::__destruct() from context '' during shutdown ignored",
+ ZSTR_VAL(object->ce->name));
+ EG(fake_scope) = orig_fake_scope;
return;
}
} else {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(zend_get_function_root_class(destructor), EG(scope))) {
- zend_class_entry *ce = object->ce;
+ if (EG(current_execute_data)) {
+ zend_class_entry *scope = zend_get_executed_scope();
- if (EG(current_execute_data)) {
- zend_throw_error(zend_ce_error,
+ if (!zend_check_protected(zend_get_function_root_class(destructor), scope)) {
+ zend_throw_error(NULL,
"Call to protected %s::__destruct() from context '%s'",
- ZSTR_VAL(ce->name),
- EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
- } else {
- zend_error(E_WARNING,
- "Call to protected %s::__destruct() from context '%s' during shutdown ignored",
- ZSTR_VAL(ce->name),
- EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ ZSTR_VAL(object->ce->name),
+ scope ? ZSTR_VAL(scope->name) : "");
+ EG(fake_scope) = orig_fake_scope;
+ return;
}
+ } else {
+ zend_error(E_WARNING,
+ "Call to protected %s::__destruct() from context '' during shutdown ignored",
+ ZSTR_VAL(object->ce->name));
+ EG(fake_scope) = orig_fake_scope;
return;
}
}
@@ -153,6 +165,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object)
}
}
zval_ptr_dtor(&obj);
+ EG(fake_scope) = orig_fake_scope;
}
}
@@ -204,6 +217,9 @@ ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object *o
zend_hash_extend(new_object->properties, new_object->properties->nNumUsed + zend_hash_num_elements(old_object->properties), 0);
}
+ new_object->properties->u.v.flags |=
+ old_object->properties->u.v.flags & HASH_FLAG_HAS_EMPTY_IND;
+
ZEND_HASH_FOREACH_KEY_VAL(old_object->properties, num_key, key, prop) {
if (Z_TYPE_P(prop) == IS_INDIRECT) {
ZVAL_INDIRECT(&new_prop, new_object->properties_table + (Z_INDIRECT_P(prop) - old_object->properties_table));
@@ -223,7 +239,7 @@ ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object *o
zval new_obj;
ZVAL_OBJ(&new_obj, new_object);
- zval_copy_ctor(&new_obj);
+ Z_ADDREF(new_obj);
zend_call_method_with_0_params(&new_obj, old_object->ce, &old_object->ce->clone, ZEND_CLONE_FUNC_NAME, NULL);
zval_ptr_dtor(&new_obj);
}
diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h
index f04795c10a..d929cd4d1f 100644
--- a/Zend/zend_objects.h
+++ b/Zend/zend_objects.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c
index 810de10067..00d9425f18 100644
--- a/Zend/zend_objects_API.c
+++ b/Zend/zend_objects_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -43,12 +44,9 @@ ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects)
{
if (objects->top > 1) {
- zend_object **obj_ptr = objects->object_buckets + 1;
- zend_object **end = objects->object_buckets + objects->top;
-
- do {
- zend_object *obj = *obj_ptr;
-
+ uint32_t i;
+ for (i = 1; i < objects->top; i++) {
+ zend_object *obj = objects->object_buckets[i];
if (IS_OBJ_VALID(obj)) {
if (!(GC_FLAGS(obj) & IS_OBJ_DESTRUCTOR_CALLED)) {
GC_FLAGS(obj) |= IS_OBJ_DESTRUCTOR_CALLED;
@@ -57,8 +55,7 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects)
GC_REFCOUNT(obj)--;
}
}
- obj_ptr++;
- } while (obj_ptr != end);
+ }
}
}
diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h
index 5bc7d774bc..dbdb02f984 100644
--- a/Zend/zend_objects_API.h
+++ b/Zend/zend_objects_API.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -77,7 +77,7 @@ static zend_always_inline void zend_object_release(zend_object *obj)
if (--GC_REFCOUNT(obj) == 0) {
zend_objects_store_del(obj);
} else if (UNEXPECTED(!GC_INFO(obj))) {
- gc_possible_root(&obj->gc);
+ gc_possible_root((zend_refcounted*)obj);
}
}
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index a971a5e900..91787aaad7 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -77,9 +78,9 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz
op_array->scope = NULL;
op_array->prototype = NULL;
- op_array->brk_cont_array = NULL;
+ op_array->live_range = NULL;
op_array->try_catch_array = NULL;
- op_array->last_brk_cont = 0;
+ op_array->last_live_range = 0;
op_array->static_variables = NULL;
op_array->last_try_catch = 0;
@@ -98,7 +99,9 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz
memset(op_array->reserved, 0, ZEND_MAX_RESERVED_RESOURCES * sizeof(void*));
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_ctor_handler, op_array);
+ if (zend_extension_flags & ZEND_EXTENSIONS_HAVE_OP_ARRAY_CTOR) {
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_ctor_handler, op_array);
+ }
}
ZEND_API void destroy_zend_function(zend_function *function)
@@ -284,7 +287,19 @@ ZEND_API void destroy_zend_class(zval *zv)
zend_hash_destroy(&ce->properties_info);
zend_string_release(ce->name);
zend_hash_destroy(&ce->function_table);
- zend_hash_destroy(&ce->constants_table);
+ if (zend_hash_num_elements(&ce->constants_table)) {
+ zend_class_constant *c;
+
+ ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) {
+ if (c->ce == ce) {
+ zval_ptr_dtor(&c->value);
+ if (c->doc_comment) {
+ zend_string_release(c->doc_comment);
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+ zend_hash_destroy(&ce->constants_table);
+ }
if (ce->num_interfaces > 0 && ce->interfaces) {
efree(ce->interfaces);
}
@@ -319,7 +334,17 @@ ZEND_API void destroy_zend_class(zval *zv)
zend_hash_destroy(&ce->properties_info);
zend_string_release(ce->name);
zend_hash_destroy(&ce->function_table);
- zend_hash_destroy(&ce->constants_table);
+ if (zend_hash_num_elements(&ce->constants_table)) {
+ zend_class_constant *c;
+
+ ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) {
+ zval_internal_ptr_dtor(&c->value);
+ if (c->doc_comment && c->ce == ce) {
+ zend_string_release(c->doc_comment);
+ }
+ } ZEND_HASH_FOREACH_END();
+ zend_hash_destroy(&ce->constants_table);
+ }
if (ce->num_interfaces > 0) {
free(ce->interfaces);
}
@@ -343,16 +368,17 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
if (op_array->static_variables &&
!(GC_FLAGS(op_array->static_variables) & IS_ARRAY_IMMUTABLE)) {
- if (--GC_REFCOUNT(op_array->static_variables) == 0) {
+ if (--GC_REFCOUNT(op_array->static_variables) == 0) {
zend_array_destroy(op_array->static_variables);
}
}
if (op_array->run_time_cache && !op_array->function_name) {
efree(op_array->run_time_cache);
+ op_array->run_time_cache = NULL;
}
- if (!op_array->refcount || --(*op_array->refcount)>0) {
+ if (!op_array->refcount || --(*op_array->refcount) > 0) {
return;
}
@@ -383,19 +409,20 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
if (op_array->doc_comment) {
zend_string_release(op_array->doc_comment);
}
- if (op_array->brk_cont_array) {
- efree(op_array->brk_cont_array);
+ if (op_array->live_range) {
+ efree(op_array->live_range);
}
if (op_array->try_catch_array) {
efree(op_array->try_catch_array);
}
- if (op_array->fn_flags & ZEND_ACC_DONE_PASS_TWO) {
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_dtor_handler, op_array);
+ if (zend_extension_flags & ZEND_EXTENSIONS_HAVE_OP_ARRAY_DTOR) {
+ if (op_array->fn_flags & ZEND_ACC_DONE_PASS_TWO) {
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_dtor_handler, op_array);
+ }
}
if (op_array->arg_info) {
- int32_t num_args = op_array->num_args;
+ uint32_t num_args = op_array->num_args;
zend_arg_info *arg_info = op_array->arg_info;
- int32_t i;
if (op_array->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
arg_info--;
@@ -445,11 +472,11 @@ int get_next_op_number(zend_op_array *op_array)
return op_array->last;
}
-zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array)
+zend_brk_cont_element *get_next_brk_cont_element(void)
{
- op_array->last_brk_cont++;
- op_array->brk_cont_array = erealloc(op_array->brk_cont_array, sizeof(zend_brk_cont_element)*op_array->last_brk_cont);
- return &op_array->brk_cont_array[op_array->last_brk_cont-1];
+ CG(context).last_brk_cont++;
+ CG(context).brk_cont_array = erealloc(CG(context).brk_cont_array, sizeof(zend_brk_cont_element) * CG(context).last_brk_cont);
+ return &CG(context).brk_cont_array[CG(context).last_brk_cont-1];
}
static void zend_update_extended_info(zend_op_array *op_array)
@@ -507,172 +534,12 @@ static void zend_check_finally_breakout(zend_op_array *op_array, uint32_t op_num
}
}
-static void zend_adjust_fast_call(zend_op_array *op_array, uint32_t fast_call, uint32_t start, uint32_t end)
-{
- int i;
- uint32_t op_num = 0;
-
- for (i = 0; i < op_array->last_try_catch; i++) {
- if (op_array->try_catch_array[i].finally_op > start
- && op_array->try_catch_array[i].finally_end < end) {
- op_num = op_array->try_catch_array[i].finally_op;
- start = op_array->try_catch_array[i].finally_end;
- }
- }
-
- if (op_num) {
- /* Must be ZEND_FAST_CALL */
- ZEND_ASSERT(op_array->opcodes[op_num - 2].opcode == ZEND_FAST_CALL);
- op_array->opcodes[op_num - 2].extended_value = ZEND_FAST_CALL_FROM_FINALLY;
- op_array->opcodes[op_num - 2].op2.opline_num = fast_call;
- }
-}
-
-static void zend_resolve_fast_call(zend_op_array *op_array, uint32_t fast_call, uint32_t op_num)
-{
- int i;
- uint32_t finally_op_num = 0;
-
- for (i = 0; i < op_array->last_try_catch; i++) {
- if (op_num >= op_array->try_catch_array[i].finally_op
- && op_num < op_array->try_catch_array[i].finally_end) {
- finally_op_num = op_array->try_catch_array[i].finally_op;
- }
- }
-
- if (finally_op_num) {
- /* Must be ZEND_FAST_CALL */
- ZEND_ASSERT(op_array->opcodes[finally_op_num - 2].opcode == ZEND_FAST_CALL);
- if (op_array->opcodes[fast_call].extended_value == 0) {
- op_array->opcodes[fast_call].extended_value = ZEND_FAST_CALL_FROM_FINALLY;
- op_array->opcodes[fast_call].op2.opline_num = finally_op_num - 2;
- }
- }
-}
-
-static void zend_resolve_finally_call(zend_op_array *op_array, uint32_t op_num, uint32_t dst_num)
-{
- uint32_t start_op;
- zend_op *opline;
- uint32_t i = op_array->last_try_catch;
-
- if (dst_num != (uint32_t)-1) {
- zend_check_finally_breakout(op_array, op_num, dst_num);
- }
-
- /* the backward order is mater */
- while (i > 0) {
- i--;
- if (op_array->try_catch_array[i].finally_op &&
- op_num >= op_array->try_catch_array[i].try_op &&
- op_num < op_array->try_catch_array[i].finally_op - 1 &&
- (dst_num < op_array->try_catch_array[i].try_op ||
- dst_num > op_array->try_catch_array[i].finally_end)) {
- /* we have a jump out of try block that needs executing finally */
- uint32_t fast_call_var;
-
- /* Must be ZEND_FAST_RET */
- ZEND_ASSERT(op_array->opcodes[op_array->try_catch_array[i].finally_end].opcode == ZEND_FAST_RET);
- fast_call_var = op_array->opcodes[op_array->try_catch_array[i].finally_end].op1.var;
-
- /* generate a FAST_CALL to finally block */
- start_op = get_next_op_number(op_array);
-
- opline = get_next_op(op_array);
- opline->opcode = ZEND_FAST_CALL;
- opline->result_type = IS_TMP_VAR;
- opline->result.var = fast_call_var;
- SET_UNUSED(opline->op1);
- SET_UNUSED(opline->op2);
- zend_adjust_fast_call(op_array, start_op,
- op_array->try_catch_array[i].finally_op,
- op_array->try_catch_array[i].finally_end);
- if (op_array->try_catch_array[i].catch_op) {
- opline->extended_value = ZEND_FAST_CALL_FROM_CATCH;
- opline->op2.opline_num = op_array->try_catch_array[i].catch_op;
- opline->op1.opline_num = get_next_op_number(op_array);
- /* generate a FAST_CALL to hole CALL_FROM_FINALLY */
- opline = get_next_op(op_array);
- opline->opcode = ZEND_FAST_CALL;
- opline->result_type = IS_TMP_VAR;
- opline->result.var = fast_call_var;
- SET_UNUSED(opline->op1);
- SET_UNUSED(opline->op2);
- zend_resolve_fast_call(op_array, start_op + 1, op_array->try_catch_array[i].finally_op - 2);
- } else {
- zend_resolve_fast_call(op_array, start_op, op_array->try_catch_array[i].finally_op - 2);
- }
- opline->op1.opline_num = op_array->try_catch_array[i].finally_op;
-
- /* generate a sequence of FAST_CALL to upward finally block */
- while (i > 0) {
- i--;
- if (op_array->try_catch_array[i].finally_op &&
- op_num >= op_array->try_catch_array[i].try_op &&
- op_num < op_array->try_catch_array[i].finally_op - 1 &&
- (dst_num < op_array->try_catch_array[i].try_op ||
- dst_num > op_array->try_catch_array[i].finally_end)) {
-
- opline = get_next_op(op_array);
- opline->opcode = ZEND_FAST_CALL;
- opline->result_type = IS_TMP_VAR;
- opline->result.var = fast_call_var;
- SET_UNUSED(opline->op1);
- SET_UNUSED(opline->op2);
- opline->op1.opline_num = op_array->try_catch_array[i].finally_op;
- }
- }
-
- /* Finish the sequence with original opcode */
- opline = get_next_op(op_array);
- *opline = op_array->opcodes[op_num];
-
- /* Replace original opcode with jump to this sequence */
- opline = op_array->opcodes + op_num;
- opline->opcode = ZEND_JMP;
- SET_UNUSED(opline->op1);
- SET_UNUSED(opline->op2);
- opline->op1.opline_num = start_op;
-
- break;
- }
- }
-}
-
-static void zend_resolve_finally_ret(zend_op_array *op_array, uint32_t op_num)
-{
- int i;
- uint32_t catch_op_num = 0, finally_op_num = 0;
-
- for (i = 0; i < op_array->last_try_catch; i++) {
- if (op_array->try_catch_array[i].try_op > op_num) {
- break;
- }
- if (op_num < op_array->try_catch_array[i].finally_op) {
- finally_op_num = op_array->try_catch_array[i].finally_op;
- }
- if (op_num < op_array->try_catch_array[i].catch_op) {
- catch_op_num = op_array->try_catch_array[i].catch_op;
- }
- }
-
- if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
- /* in case of unhandled exception return to upward finally block */
- op_array->opcodes[op_num].extended_value = ZEND_FAST_RET_TO_FINALLY;
- op_array->opcodes[op_num].op2.opline_num = finally_op_num;
- } else if (catch_op_num) {
- /* in case of unhandled exception return to upward catch block */
- op_array->opcodes[op_num].extended_value = ZEND_FAST_RET_TO_CATCH;
- op_array->opcodes[op_num].op2.opline_num = catch_op_num;
- }
-}
-
static uint32_t zend_get_brk_cont_target(const zend_op_array *op_array, const zend_op *opline) {
int nest_levels = opline->op2.num;
int array_offset = opline->op1.num;
zend_brk_cont_element *jmp_to;
do {
- jmp_to = &op_array->brk_cont_array[array_offset];
+ jmp_to = &CG(context).brk_cont_array[array_offset];
if (nest_levels > 1) {
array_offset = jmp_to->parent;
}
@@ -681,47 +548,6 @@ static uint32_t zend_get_brk_cont_target(const zend_op_array *op_array, const ze
return opline->opcode == ZEND_BRK ? jmp_to->brk : jmp_to->cont;
}
-static void zend_resolve_finally_calls(zend_op_array *op_array)
-{
- uint32_t i, j;
- zend_op *opline;
-
- for (i = 0, j = op_array->last; i < j; i++) {
- opline = op_array->opcodes + i;
- switch (opline->opcode) {
- case ZEND_RETURN:
- case ZEND_RETURN_BY_REF:
- case ZEND_GENERATOR_RETURN:
- zend_resolve_finally_call(op_array, i, (uint32_t)-1);
- break;
- case ZEND_BRK:
- case ZEND_CONT:
- zend_resolve_finally_call(op_array, i, zend_get_brk_cont_target(op_array, opline));
- break;
- case ZEND_GOTO:
- if (Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) != IS_LONG) {
- uint32_t num = opline->op2.constant;
-
- ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op2);
- zend_resolve_goto_label(op_array, opline, 1);
- opline->op2.constant = num;
- }
- /* break omitted intentionally */
- case ZEND_JMP:
- zend_resolve_finally_call(op_array, i, opline->op1.opline_num);
- break;
- case ZEND_FAST_CALL:
- zend_resolve_fast_call(op_array, i, i);
- break;
- case ZEND_FAST_RET:
- zend_resolve_finally_ret(op_array, i);
- break;
- default:
- break;
- }
- }
-}
-
ZEND_API int pass_two(zend_op_array *op_array)
{
zend_op *opline, *end;
@@ -729,14 +555,13 @@ ZEND_API int pass_two(zend_op_array *op_array)
if (!ZEND_USER_CODE(op_array->type)) {
return 0;
}
- if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
- zend_resolve_finally_calls(op_array);
- }
if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) {
zend_update_extended_info(op_array);
}
if (CG(compiler_options) & ZEND_COMPILE_HANDLE_OP_ARRAY) {
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_handler, op_array);
+ if (zend_extension_flags & ZEND_EXTENSIONS_HAVE_OP_ARRAY_HANDLER) {
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_handler, op_array);
+ }
}
if (CG(context).vars_size != op_array->last_var) {
@@ -754,31 +579,19 @@ ZEND_API int pass_two(zend_op_array *op_array)
opline = op_array->opcodes;
end = opline + op_array->last;
while (opline < end) {
- if (opline->op1_type == IS_CONST) {
- ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op1);
- } else if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
- opline->op1.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->op1.var);
- }
- if (opline->op2_type == IS_CONST) {
- ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op2);
- } else if (opline->op2_type & (IS_VAR|IS_TMP_VAR)) {
- opline->op2.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->op2.var);
- }
- if (opline->result_type & (IS_VAR|IS_TMP_VAR)) {
- opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->result.var);
- }
switch (opline->opcode) {
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FAST_CALL:
+ opline->op1.opline_num = op_array->try_catch_array[opline->op1.num].finally_op;
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1);
- /* break omitted intentionally */
- case ZEND_DECLARE_INHERITED_CLASS:
- case ZEND_DECLARE_INHERITED_CLASS_DELAYED:
- opline->extended_value = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->extended_value);
break;
case ZEND_BRK:
case ZEND_CONT:
{
uint32_t jmp_target = zend_get_brk_cont_target(op_array, opline);
+
+ if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
+ zend_check_finally_breakout(op_array, opline - op_array->opcodes, jmp_target);
+ }
opline->opcode = ZEND_JMP;
opline->op1.opline_num = jmp_target;
opline->op2.num = 0;
@@ -786,13 +599,12 @@ ZEND_API int pass_two(zend_op_array *op_array)
}
break;
case ZEND_GOTO:
- if (Z_TYPE_P(RT_CONSTANT(op_array, opline->op2)) != IS_LONG) {
- zend_resolve_goto_label(op_array, opline, 1);
+ zend_resolve_goto_label(op_array, opline);
+ if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
+ zend_check_finally_breakout(op_array, opline - op_array->opcodes, opline->op1.opline_num);
}
/* break omitted intentionally */
case ZEND_JMP:
- case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1);
break;
case ZEND_JMPZNZ:
@@ -805,21 +617,31 @@ ZEND_API int pass_two(zend_op_array *op_array)
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
case ZEND_COALESCE:
- case ZEND_NEW:
case ZEND_FE_RESET_R:
case ZEND_FE_RESET_RW:
+ ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2);
+ break;
case ZEND_ASSERT_CHECK:
+ {
+ /* If result of assert is unused, result of check is unused as well */
+ zend_op *call = &op_array->opcodes[opline->op2.opline_num - 1];
+ if (call->opcode == ZEND_EXT_FCALL_END) {
+ call--;
+ }
+ if (call->result_type == IS_UNUSED) {
+ opline->result_type = IS_UNUSED;
+ }
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op2);
break;
+ }
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_CATCH:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
+ /* absolute index to relative offset */
opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);
break;
- case ZEND_VERIFY_RETURN_TYPE:
- if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
- MAKE_NOP(opline);
- }
- break;
case ZEND_RETURN:
case ZEND_RETURN_BY_REF:
if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
@@ -827,24 +649,34 @@ ZEND_API int pass_two(zend_op_array *op_array)
}
break;
}
+ if (opline->op1_type == IS_CONST) {
+ ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op1);
+ } else if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
+ opline->op1.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->op1.var);
+ }
+ if (opline->op2_type == IS_CONST) {
+ ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op2);
+ } else if (opline->op2_type & (IS_VAR|IS_TMP_VAR)) {
+ opline->op2.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->op2.var);
+ }
+ if (opline->result_type & (IS_VAR|IS_TMP_VAR)) {
+ opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + opline->result.var);
+ }
ZEND_VM_SET_OPCODE_HANDLER(opline);
opline++;
}
- op_array->fn_flags |= ZEND_ACC_DONE_PASS_TWO;
- return 0;
-}
+ if (op_array->live_range) {
+ int i;
-int pass_two_wrapper(zval *el)
-{
- return pass_two((zend_op_array *) Z_PTR_P(el));
-}
+ for (i = 0; i < op_array->last_live_range; i++) {
+ op_array->live_range[i].var =
+ (uint32_t)(zend_intptr_t)ZEND_CALL_VAR_NUM(NULL, op_array->last_var + (op_array->live_range[i].var / sizeof(zval))) |
+ (op_array->live_range[i].var & ZEND_LIVE_MASK);
+ }
+ }
-int print_class(zend_class_entry *class_entry)
-{
- printf("Class %s:\n", ZSTR_VAL(class_entry->name));
- zend_hash_apply(&class_entry->function_table, pass_two_wrapper);
- printf("End of class %s.\n\n", ZSTR_VAL(class_entry->name));
+ op_array->fn_flags |= ZEND_ACC_DONE_PASS_TWO;
return 0;
}
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 353be83afc..4159e43e53 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -135,18 +136,7 @@ ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, int str_len) /* {{{
}
/* }}} */
-static zend_always_inline void zend_unwrap_reference(zval *op) /* {{{ */
-{
- if (Z_REFCOUNT_P(op) == 1) {
- ZVAL_UNREF(op);
- } else {
- Z_DELREF_P(op);
- ZVAL_COPY(op, Z_REFVAL_P(op));
- }
-}
-/* }}} */
-
-ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */
+void ZEND_FASTCALL _convert_scalar_to_number(zval *op, zend_bool silent) /* {{{ */
{
try_again:
switch (Z_TYPE_P(op)) {
@@ -158,8 +148,11 @@ try_again:
zend_string *str;
str = Z_STR_P(op);
- if ((Z_TYPE_INFO_P(op)=is_numeric_string(ZSTR_VAL(str), ZSTR_LEN(str), &Z_LVAL_P(op), &Z_DVAL_P(op), 1)) == 0) {
+ if ((Z_TYPE_INFO_P(op)=is_numeric_string(ZSTR_VAL(str), ZSTR_LEN(str), &Z_LVAL_P(op), &Z_DVAL_P(op), silent ? 1 : -1)) == 0) {
ZVAL_LONG(op, 0);
+ if (!silent) {
+ zend_error(E_WARNING, "A non-numeric value encountered");
+ }
}
zend_string_release(str);
break;
@@ -185,18 +178,27 @@ try_again:
}
/* }}} */
+ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */
+{
+ _convert_scalar_to_number(op, 1);
+}
+/* }}} */
+
/* {{{ zendi_convert_scalar_to_number */
-#define zendi_convert_scalar_to_number(op, holder, result) \
+#define zendi_convert_scalar_to_number(op, holder, result, silent) \
if (op==result) { \
if (Z_TYPE_P(op) != IS_LONG) { \
- convert_scalar_to_number(op); \
+ _convert_scalar_to_number(op, silent); \
} \
} else { \
switch (Z_TYPE_P(op)) { \
case IS_STRING: \
{ \
- if ((Z_TYPE_INFO(holder)=is_numeric_string(Z_STRVAL_P(op), Z_STRLEN_P(op), &Z_LVAL(holder), &Z_DVAL(holder), 1)) == 0) { \
+ if ((Z_TYPE_INFO(holder)=is_numeric_string(Z_STRVAL_P(op), Z_STRLEN_P(op), &Z_LVAL(holder), &Z_DVAL(holder), silent ? 1 : -1)) == 0) { \
ZVAL_LONG(&(holder), 0); \
+ if (!silent) { \
+ zend_error(E_WARNING, "A non-numeric value encountered"); \
+ } \
} \
(op) = &(holder); \
break; \
@@ -257,7 +259,7 @@ try_again:
} \
} \
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(op, op_func); \
- op1_lval = _zval_get_long_func(op1); \
+ op1_lval = _zval_get_long_func_noisy(op1); \
} else { \
op1_lval = Z_LVAL_P(op1); \
} \
@@ -272,7 +274,7 @@ try_again:
} \
} \
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(op); \
- op2_lval = _zval_get_long_func(op2); \
+ op2_lval = _zval_get_long_func_noisy(op2); \
} else { \
op2_lval = Z_LVAL_P(op2); \
} \
@@ -312,8 +314,11 @@ try_again:
case IS_STRING:
{
zend_string *str = Z_STR_P(op);
-
- ZVAL_LONG(op, ZEND_STRTOL(ZSTR_VAL(str), NULL, base));
+ if (base == 10) {
+ ZVAL_LONG(op, zval_get_long(op));
+ } else {
+ ZVAL_LONG(op, ZEND_STRTOL(ZSTR_VAL(str), NULL, base));
+ }
zend_string_release(str);
}
break;
@@ -491,7 +496,15 @@ try_again:
ZEND_API void ZEND_FASTCALL _convert_to_cstring(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
- _convert_to_string(op ZEND_FILE_LINE_CC);
+ if (Z_TYPE_P(op) == IS_DOUBLE) {
+ zend_string *str;
+ double dval = Z_DVAL_P(op);
+
+ str = zend_strpprintf(0, "%.*H", (int) EG(precision), dval);
+ ZVAL_NEW_STR(op, str);
+ } else {
+ _convert_to_string(op ZEND_FILE_LINE_CC);
+ }
}
/* }}} */
@@ -586,24 +599,26 @@ try_again:
if (Z_OBJ_HT_P(op)->get_properties) {
HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op);
if (obj_ht) {
- zval arr;
+ zend_array *arr;
- if (!Z_OBJCE_P(op)->default_properties_count && obj_ht == Z_OBJ_P(op)->properties) {
+ if (!Z_OBJCE_P(op)->default_properties_count &&
+ obj_ht == Z_OBJ_P(op)->properties &&
+ !ZEND_HASH_GET_APPLY_COUNT(Z_OBJ_P(op)->properties)) {
/* fast copy */
if (EXPECTED(Z_OBJ_P(op)->handlers == &std_object_handlers)) {
- ZVAL_ARR(&arr, obj_ht);
+ arr = obj_ht;
if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(op)->properties) & IS_ARRAY_IMMUTABLE))) {
GC_REFCOUNT(Z_OBJ_P(op)->properties)++;
}
} else {
- ZVAL_ARR(&arr, zend_array_dup(obj_ht));
+ arr = zend_array_dup(obj_ht);
}
zval_dtor(op);
- ZVAL_COPY_VALUE(op, &arr);
+ ZVAL_ARR(op, arr);
} else {
- ZVAL_ARR(&arr, zend_array_dup(obj_ht));
+ arr = zend_array_dup(obj_ht);
zval_dtor(op);
- ZVAL_COPY_VALUE(op, &arr);
+ ZVAL_ARR(op, arr);
}
return;
}
@@ -642,10 +657,12 @@ try_again:
switch (Z_TYPE_P(op)) {
case IS_ARRAY:
{
- zval tmp;
- ZVAL_COPY_VALUE(&tmp, op);
- SEPARATE_ARRAY(&tmp);
- object_and_properties_init(op, zend_standard_class_def, Z_ARR(tmp));
+ HashTable *ht = Z_ARR_P(op);
+ if (Z_IMMUTABLE_P(op)) {
+ /* TODO: try not to duplicate immutable arrays as well ??? */
+ ht = zend_array_dup(ht);
+ }
+ object_and_properties_init(op, zend_standard_class_def, ht);
break;
}
case IS_OBJECT:
@@ -660,7 +677,7 @@ try_again:
zval tmp;
ZVAL_COPY_VALUE(&tmp, op);
object_init(op);
- zend_hash_str_add_new(Z_OBJPROP_P(op), "scalar", sizeof("scalar")-1, &tmp);
+ zend_hash_add_new(Z_OBJPROP_P(op), CG(known_strings)[ZEND_STR_SCALAR], &tmp);
break;
}
}
@@ -715,10 +732,11 @@ ZEND_API void multi_convert_to_string_ex(int argc, ...) /* {{{ */
}
/* }}} */
-ZEND_API zend_long ZEND_FASTCALL _zval_get_long_func(zval *op) /* {{{ */
+static zend_always_inline zend_long ZEND_FASTCALL _zval_get_long_func_ex(zval *op, zend_bool silent) /* {{{ */
{
try_again:
switch (Z_TYPE_P(op)) {
+ case IS_UNDEF:
case IS_NULL:
case IS_FALSE:
return 0;
@@ -731,7 +749,26 @@ try_again:
case IS_DOUBLE:
return zend_dval_to_lval(Z_DVAL_P(op));
case IS_STRING:
- return ZEND_STRTOL(Z_STRVAL_P(op), NULL, 10);
+ {
+ zend_uchar type;
+ zend_long lval;
+ double dval;
+ if (0 == (type = is_numeric_string(Z_STRVAL_P(op), Z_STRLEN_P(op), &lval, &dval, silent ? 1 : -1))) {
+ if (!silent) {
+ zend_error(E_WARNING, "A non-numeric value encountered");
+ }
+ return 0;
+ } else if (EXPECTED(type == IS_LONG)) {
+ return lval;
+ } else {
+ /* Previously we used strtol here, not is_numeric_string,
+ * and strtol gives you LONG_MAX/_MIN on overflow.
+ * We use use saturating conversion to emulate strtol()'s
+ * behaviour.
+ */
+ return zend_dval_to_lval_cap(dval);
+ }
+ }
case IS_ARRAY:
return zend_hash_num_elements(Z_ARRVAL_P(op)) ? 1 : 0;
case IS_OBJECT:
@@ -753,6 +790,18 @@ try_again:
}
/* }}} */
+ZEND_API zend_long ZEND_FASTCALL _zval_get_long_func(zval *op) /* {{{ */
+{
+ return _zval_get_long_func_ex(op, 1);
+}
+/* }}} */
+
+static zend_long ZEND_FASTCALL _zval_get_long_func_noisy(zval *op) /* {{{ */
+{
+ return _zval_get_long_func_ex(op, 0);
+}
+/* }}} */
+
ZEND_API double ZEND_FASTCALL _zval_get_double_func(zval *op) /* {{{ */
{
try_again:
@@ -858,20 +907,9 @@ ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {
while (1) {
switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) {
- case TYPE_PAIR(IS_LONG, IS_LONG): {
- zend_long lval = Z_LVAL_P(op1) + Z_LVAL_P(op2);
-
- /* check for overflow by comparing sign bits */
- if ((Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK)
- && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) {
-
- ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2));
- } else {
- ZVAL_LONG(result, lval);
- }
+ case TYPE_PAIR(IS_LONG, IS_LONG):
+ fast_long_add_function(result, op1, op2);
return SUCCESS;
- }
-
case TYPE_PAIR(IS_LONG, IS_DOUBLE):
ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2));
return SUCCESS;
@@ -903,11 +941,11 @@ ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {
} else if (!converted) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_ADD, add_function);
- zendi_convert_scalar_to_number(op1, op1_copy, result);
- zendi_convert_scalar_to_number(op2, op2_copy, result);
+ zendi_convert_scalar_to_number(op1, op1_copy, result, 0);
+ zendi_convert_scalar_to_number(op2, op2_copy, result, 0);
converted = 1;
} else {
- zend_throw_error(zend_ce_error, "Unsupported operand types");
+ zend_throw_error(NULL, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
}
@@ -922,20 +960,9 @@ ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {
while (1) {
switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) {
- case TYPE_PAIR(IS_LONG, IS_LONG): {
- zend_long lval = Z_LVAL_P(op1) - Z_LVAL_P(op2);
-
- /* check for overflow by comparing sign bits */
- if ((Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(op2) & LONG_SIGN_MASK)
- && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) {
-
- ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2));
- } else {
- ZVAL_LONG(result, lval);
- }
+ case TYPE_PAIR(IS_LONG, IS_LONG):
+ fast_long_sub_function(result, op1, op2);
return SUCCESS;
-
- }
case TYPE_PAIR(IS_LONG, IS_DOUBLE):
ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2));
return SUCCESS;
@@ -956,11 +983,11 @@ ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {
} else if (!converted) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_SUB, sub_function);
- zendi_convert_scalar_to_number(op1, op1_copy, result);
- zendi_convert_scalar_to_number(op2, op2_copy, result);
+ zendi_convert_scalar_to_number(op1, op1_copy, result, 0);
+ zendi_convert_scalar_to_number(op2, op2_copy, result, 0);
converted = 1;
} else {
- zend_throw_error(zend_ce_error, "Unsupported operand types");
+ zend_throw_error(NULL, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
}
@@ -1003,11 +1030,11 @@ ZEND_API int ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {
} else if (!converted) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_MUL, mul_function);
- zendi_convert_scalar_to_number(op1, op1_copy, result);
- zendi_convert_scalar_to_number(op2, op2_copy, result);
+ zendi_convert_scalar_to_number(op1, op1_copy, result, 0);
+ zendi_convert_scalar_to_number(op2, op2_copy, result, 0);
converted = 1;
} else {
- zend_throw_error(zend_ce_error, "Unsupported operand types");
+ zend_throw_error(NULL, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
}
@@ -1085,17 +1112,17 @@ ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {
ZVAL_LONG(result, 0);
return SUCCESS;
} else {
- zendi_convert_scalar_to_number(op1, op1_copy, result);
+ zendi_convert_scalar_to_number(op1, op1_copy, result, 0);
}
if (Z_TYPE_P(op2) == IS_ARRAY) {
ZVAL_LONG(result, 1L);
return SUCCESS;
} else {
- zendi_convert_scalar_to_number(op2, op2_copy, result);
+ zendi_convert_scalar_to_number(op2, op2_copy, result, 0);
}
converted = 1;
} else {
- zend_throw_error(zend_ce_error, "Unsupported operand types");
+ zend_throw_error(NULL, "Unsupported operand types");
return FAILURE;
}
}
@@ -1111,24 +1138,40 @@ ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {
while (1) {
switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) {
case TYPE_PAIR(IS_LONG, IS_LONG):
- /* prevent crashes (arithmetic exception) */
- if (UNEXPECTED(Z_LVAL_P(op2) == 0 || (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) || Z_LVAL_P(op1) % Z_LVAL_P(op2) != 0)) {
- ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2));
+ if (Z_LVAL_P(op2) == 0) {
+ zend_error(E_WARNING, "Division by zero");
+ ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1) / (double) Z_LVAL_P(op2)));
return SUCCESS;
- } else {
+ } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) {
+ /* Prevent overflow error/crash */
+ ZVAL_DOUBLE(result, (double) ZEND_LONG_MIN / -1);
+ return SUCCESS;
+ }
+ if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */
ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2));
+ } else {
+ ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2));
}
return SUCCESS;
case TYPE_PAIR(IS_DOUBLE, IS_LONG):
+ if (Z_LVAL_P(op2) == 0) {
+ zend_error(E_WARNING, "Division by zero");
+ }
ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2));
return SUCCESS;
case TYPE_PAIR(IS_LONG, IS_DOUBLE):
+ if (Z_DVAL_P(op2) == 0) {
+ zend_error(E_WARNING, "Division by zero");
+ }
ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2));
return SUCCESS;
case TYPE_PAIR(IS_DOUBLE, IS_DOUBLE):
+ if (Z_DVAL_P(op2) == 0) {
+ zend_error(E_WARNING, "Division by zero");
+ }
ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2));
return SUCCESS;
@@ -1140,11 +1183,11 @@ ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {
} else if (!converted) {
ZEND_TRY_BINARY_OBJECT_OPERATION(ZEND_DIV, div_function);
- zendi_convert_scalar_to_number(op1, op1_copy, result);
- zendi_convert_scalar_to_number(op2, op2_copy, result);
+ zendi_convert_scalar_to_number(op1, op1_copy, result, 0);
+ zendi_convert_scalar_to_number(op2, op2_copy, result, 0);
converted = 1;
} else {
- zend_throw_error(zend_ce_error, "Unsupported operand types");
+ zend_throw_error(NULL, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
}
@@ -1294,7 +1337,7 @@ try_again:
default:
ZEND_TRY_UNARY_OBJECT_OPERATION(ZEND_BW_NOT);
- zend_throw_error(zend_ce_error, "Unsupported operand types");
+ zend_throw_error(NULL, "Unsupported operand types");
return FAILURE;
}
}
@@ -1348,13 +1391,13 @@ ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op
if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) {
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_OR, bitwise_or_function);
- op1_lval = _zval_get_long_func(op1);
+ op1_lval = _zval_get_long_func_noisy(op1);
} else {
op1_lval = Z_LVAL_P(op1);
}
if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) {
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_OR);
- op2_lval = _zval_get_long_func(op2);
+ op2_lval = _zval_get_long_func_noisy(op2);
} else {
op2_lval = Z_LVAL_P(op2);
}
@@ -1415,13 +1458,13 @@ ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *o
if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) {
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_AND, bitwise_and_function);
- op1_lval = _zval_get_long_func(op1);
+ op1_lval = _zval_get_long_func_noisy(op1);
} else {
op1_lval = Z_LVAL_P(op1);
}
if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) {
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_AND);
- op2_lval = _zval_get_long_func(op2);
+ op2_lval = _zval_get_long_func_noisy(op2);
} else {
op2_lval = Z_LVAL_P(op2);
}
@@ -1482,13 +1525,13 @@ ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *o
if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) {
ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(ZEND_BW_XOR, bitwise_xor_function);
- op1_lval = _zval_get_long_func(op1);
+ op1_lval = _zval_get_long_func_noisy(op1);
} else {
op1_lval = Z_LVAL_P(op1);
}
if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) {
ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(ZEND_BW_XOR);
- op2_lval = _zval_get_long_func(op2);
+ op2_lval = _zval_get_long_func_noisy(op2);
} else {
op2_lval = Z_LVAL_P(op2);
}
@@ -1611,7 +1654,7 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
zend_string *result_str;
if (UNEXPECTED(op1_len > SIZE_MAX - op2_len)) {
- zend_throw_error(zend_ce_error, "String size overflow");
+ zend_throw_error(NULL, "String size overflow");
ZVAL_FALSE(result);
return FAILURE;
}
@@ -1643,92 +1686,88 @@ ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /
}
/* }}} */
-ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive) /* {{{ */
+ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive) /* {{{ */
{
zend_string *str1 = zval_get_string(op1);
zend_string *str2 = zval_get_string(op2);
+ int ret;
if (case_insensitive) {
- ZVAL_LONG(result, zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str1)));
+ ret = zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str1));
} else {
- ZVAL_LONG(result, zend_binary_strcmp(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2)));
+ ret = zend_binary_strcmp(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2));
}
zend_string_release(str1);
zend_string_release(str2);
- return SUCCESS;
+ return ret;
}
/* }}} */
-ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2) /* {{{ */
{
if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) &&
EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
if (Z_STR_P(op1) == Z_STR_P(op2)) {
- ZVAL_LONG(result, 0);
+ return 0;
} else {
- ZVAL_LONG(result, zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)));
+ return zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
}
} else {
zend_string *str1 = zval_get_string(op1);
zend_string *str2 = zval_get_string(op2);
-
- ZVAL_LONG(result, zend_binary_strcmp(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2)));
+ int ret = zend_binary_strcmp(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2));
zend_string_release(str1);
zend_string_release(str2);
+ return ret;
}
- return SUCCESS;
}
/* }}} */
-ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /* {{{ */
{
if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) &&
EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
if (Z_STR_P(op1) == Z_STR_P(op2)) {
- ZVAL_LONG(result, 0);
+ return 0;
} else {
- ZVAL_LONG(result, zend_binary_strcasecmp_l(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)));
+ return zend_binary_strcasecmp_l(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
}
} else {
zend_string *str1 = zval_get_string(op1);
zend_string *str2 = zval_get_string(op2);
-
- ZVAL_LONG(result, zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str1)));
+ int ret = zend_binary_strcasecmp_l(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str1));
zend_string_release(str1);
zend_string_release(str2);
+ return ret;
}
- return SUCCESS;
}
/* }}} */
#if HAVE_STRCOLL
-ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */
{
zend_string *str1 = zval_get_string(op1);
zend_string *str2 = zval_get_string(op2);
-
- ZVAL_LONG(result, strcoll(ZSTR_VAL(str1), ZSTR_VAL(str2)));
+ int ret = strcoll(ZSTR_VAL(str1), ZSTR_VAL(str2));
zend_string_release(str1);
zend_string_release(str2);
- return SUCCESS;
+ return ret;
}
/* }}} */
#endif
-ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */
{
double d1, d2;
d1 = zval_get_double(op1);
d2 = zval_get_double(op2);
- ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(d1 - d2));
-
- return SUCCESS;
+ return ZEND_NORMALIZE_BOOL(d1 - d2);
}
/* }}} */
@@ -1744,7 +1783,17 @@ static inline void zend_free_obj_get_result(zval *op) /* {{{ */
}
/* }}} */
-static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
+static void ZEND_FASTCALL convert_compare_result_to_long(zval *result) /* {{{ */
+{
+ if (Z_TYPE_P(result) == IS_DOUBLE) {
+ ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result)));
+ } else {
+ convert_to_long(result);
+ }
+}
+/* }}} */
+
+ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
int ret;
int converted = 0;
@@ -1801,7 +1850,7 @@ static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *
ZVAL_LONG(result, 0);
return SUCCESS;
}
- ZVAL_LONG(result, zendi_smart_strcmp(op1, op2));
+ ZVAL_LONG(result, zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)));
return SUCCESS;
case TYPE_PAIR(IS_NULL, IS_STRING):
@@ -1830,9 +1879,17 @@ static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *
}
if (Z_TYPE_P(op1) == IS_OBJECT && Z_OBJ_HANDLER_P(op1, compare)) {
- return Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2);
+ ret = Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2);
+ if (UNEXPECTED(Z_TYPE_P(result) != IS_LONG)) {
+ convert_compare_result_to_long(result);
+ }
+ return ret;
} else if (Z_TYPE_P(op2) == IS_OBJECT && Z_OBJ_HANDLER_P(op2, compare)) {
- return Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2);
+ ret = Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2);
+ if (UNEXPECTED(Z_TYPE_P(result) != IS_LONG)) {
+ convert_compare_result_to_long(result);
+ }
+ return ret;
}
if (Z_TYPE_P(op1) == IS_OBJECT && Z_TYPE_P(op2) == IS_OBJECT) {
@@ -1901,8 +1958,8 @@ static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *
ZVAL_LONG(result, zval_is_true(op1) ? 0 : -1);
return SUCCESS;
} else {
- zendi_convert_scalar_to_number(op1, op1_copy, result);
- zendi_convert_scalar_to_number(op2, op2_copy, result);
+ zendi_convert_scalar_to_number(op1, op1_copy, result, 1);
+ zendi_convert_scalar_to_number(op2, op2_copy, result, 1);
converted = 1;
}
} else if (Z_TYPE_P(op1)==IS_ARRAY) {
@@ -1926,18 +1983,6 @@ static zend_always_inline int i_compare_function(zval *result, zval *op1, zval *
}
/* }}} */
-ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
-{
- return i_compare_function(result, op1, op2);
-}
-/* }}} */
-
-ZEND_API int zval_compare_function(zval *result, zval *op1, zval *op2) /* {{{ */
-{
- return i_compare_function(result, op1, op2);
-}
-/* }}} */
-
static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */
{
zval result;
@@ -2248,7 +2293,7 @@ try_again:
zval *val;
val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv);
- Z_ADDREF_P(val);
+ Z_TRY_ADDREF_P(val);
increment_function(val);
Z_OBJ_HANDLER_P(op1, set)(op1, val);
zval_ptr_dtor(val);
@@ -2316,7 +2361,7 @@ try_again:
zval *val;
val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv);
- Z_ADDREF_P(val);
+ Z_TRY_ADDREF_P(val);
decrement_function(val);
Z_OBJ_HANDLER_P(op1, set)(op1, val);
zval_ptr_dtor(val);
@@ -2611,15 +2656,15 @@ ZEND_API int ZEND_FASTCALL zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval
}
/* }}} */
-ZEND_API zend_long ZEND_FASTCALL zendi_smart_strcmp(zval *s1, zval *s2) /* {{{ */
+ZEND_API zend_long ZEND_FASTCALL zendi_smart_strcmp(zend_string *s1, zend_string *s2) /* {{{ */
{
int ret1, ret2;
int oflow1, oflow2;
zend_long lval1 = 0, lval2 = 0;
double dval1 = 0.0, dval2 = 0.0;
- if ((ret1 = is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
- (ret2 = is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
+ if ((ret1 = is_numeric_string_ex(s1->val, s1->len, &lval1, &dval1, 0, &oflow1)) &&
+ (ret2 = is_numeric_string_ex(s2->val, s2->len, &lval2, &dval2, 0, &oflow2))) {
#if ZEND_ULONG_MAX == 0xFFFFFFFF
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
((oflow1 == 1 && dval1 > 9007199254740991. /*0x1FFFFFFFFFFFFF*/)
@@ -2656,7 +2701,7 @@ ZEND_API zend_long ZEND_FASTCALL zendi_smart_strcmp(zval *s1, zval *s2) /* {{{ *
} else {
int strcmp_ret;
string_cmp:
- strcmp_ret = zend_binary_strcmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
+ strcmp_ret = zend_binary_strcmp(s1->val, s1->len, s2->val, s2->len);
return ZEND_NORMALIZE_BOOL(strcmp_ret);
}
}
@@ -2865,6 +2910,8 @@ static zend_always_inline void zend_memnstr_ex_pre(unsigned int td[], const char
td[(unsigned char)needle[i]] = i + 1;
}
} else {
+ size_t i;
+
for (i = 0; i < needle_len; i++) {
td[(unsigned char)needle[i]] = (int)needle_len - i;
}
@@ -2872,7 +2919,7 @@ static zend_always_inline void zend_memnstr_ex_pre(unsigned int td[], const char
}
/* }}} */
-ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const char *needle, size_t needle_len, char *end) /* {{{ */
+ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end) /* {{{ */
{
unsigned int td[256];
register size_t i;
@@ -2896,6 +2943,9 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
if (i == needle_len) {
return p;
}
+ if (UNEXPECTED(p == end)) {
+ return NULL;
+ }
p += td[(unsigned char)(p[needle_len])];
}
@@ -2903,7 +2953,7 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
}
/* }}} */
-ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, char *end) /* {{{ */
+ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end) /* {{{ */
{
unsigned int td[256];
register size_t i;
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 541d6f978f..370502282d 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -89,8 +90,8 @@ ZEND_API zend_bool ZEND_FASTCALL instanceof_function(const zend_class_entry *ins
*/
ZEND_API zend_uchar ZEND_FASTCALL _is_numeric_string_ex(const char *str, size_t length, zend_long *lval, double *dval, int allow_errors, int *oflow_info);
-ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const char *needle, size_t needle_len, char *end);
-ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, char *end);
+ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end);
+ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end);
#if SIZEOF_ZEND_LONG == 4
# define ZEND_DOUBLE_FITS_LONG(d) (!((d) > ZEND_LONG_MAX || (d) < ZEND_LONG_MIN))
@@ -121,6 +122,16 @@ static zend_always_inline zend_long zend_dval_to_lval(double d)
return (zend_long)d;
}
#endif
+
+static zend_always_inline zend_long zend_dval_to_lval_cap(double d)
+{
+ if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
+ return 0;
+ } else if (!ZEND_DOUBLE_FITS_LONG(d)) {
+ return (d > 0 ? ZEND_LONG_MAX : ZEND_LONG_MIN);
+ }
+ return (zend_long)d;
+}
/* }}} */
#define ZEND_IS_DIGIT(c) ((c) >= '0' && (c) <= '9')
@@ -141,7 +152,7 @@ static zend_always_inline zend_uchar is_numeric_string(const char *str, size_t l
ZEND_API zend_uchar ZEND_FASTCALL is_numeric_str_function(const zend_string *str, zend_long *lval, double *dval);
static zend_always_inline const char *
-zend_memnstr(const char *haystack, const char *needle, size_t needle_len, char *end)
+zend_memnstr(const char *haystack, const char *needle, size_t needle_len, const char *end)
{
const char *p = haystack;
const char ne = needle[needle_len-1];
@@ -184,7 +195,7 @@ zend_memnstr(const char *haystack, const char *needle, size_t needle_len, char *
static zend_always_inline const void *zend_memrchr(const void *s, int c, size_t n)
{
- register const unsigned char *e;
+ const unsigned char *e;
if (n <= 0) {
return NULL;
}
@@ -281,60 +292,59 @@ ZEND_API int ZEND_FASTCALL zend_object_is_true(zval *op);
static zend_always_inline int i_zend_is_true(zval *op)
{
- int result;
+ int result = 0;
again:
switch (Z_TYPE_P(op)) {
- case IS_UNDEF:
- case IS_NULL:
- case IS_FALSE:
- result = 0;
- break;
case IS_TRUE:
result = 1;
break;
case IS_LONG:
- result = (Z_LVAL_P(op)?1:0);
- break;
- case IS_RESOURCE:
- result = (Z_RES_HANDLE_P(op)?1:0);
+ if (Z_LVAL_P(op)) {
+ result = 1;
+ }
break;
case IS_DOUBLE:
- result = (Z_DVAL_P(op) ? 1 : 0);
+ if (Z_DVAL_P(op)) {
+ result = 1;
+ }
break;
case IS_STRING:
- if (Z_STRLEN_P(op) == 0
- || (Z_STRLEN_P(op)==1 && Z_STRVAL_P(op)[0]=='0')) {
- result = 0;
- } else {
+ if (Z_STRLEN_P(op) > 1 || (Z_STRLEN_P(op) && Z_STRVAL_P(op)[0] != '0')) {
result = 1;
}
break;
case IS_ARRAY:
- result = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);
+ if (zend_hash_num_elements(Z_ARRVAL_P(op))) {
+ result = 1;
+ }
break;
case IS_OBJECT:
result = zend_object_is_true(op);
break;
+ case IS_RESOURCE:
+ if (EXPECTED(Z_RES_HANDLE_P(op))) {
+ result = 1;
+ }
+ break;
case IS_REFERENCE:
op = Z_REFVAL_P(op);
goto again;
break;
default:
- result = 0;
break;
}
return result;
}
ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2);
-ZEND_API int zval_compare_function(zval *result, zval *op1, zval *op2);
-ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
-ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive);
-ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
-ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2);
+
+ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2);
+ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive);
+ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2);
+ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2);
#if HAVE_STRCOLL
-ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2);
+ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2);
#endif
ZEND_API void ZEND_FASTCALL zend_str_tolower(char *str, size_t length);
@@ -354,7 +364,7 @@ ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp(const char *s1, size_t len1,
ZEND_API int ZEND_FASTCALL zend_binary_strcasecmp_l(const char *s1, size_t len1, const char *s2, size_t len2);
ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp_l(const char *s1, size_t len1, const char *s2, size_t len2, size_t length);
-ZEND_API zend_long ZEND_FASTCALL zendi_smart_strcmp(zval *s1, zval *s2);
+ZEND_API zend_long ZEND_FASTCALL zendi_smart_strcmp(zend_string *s1, zend_string *s2);
ZEND_API int ZEND_FASTCALL zend_compare_symbol_tables(HashTable *ht1, HashTable *ht2);
ZEND_API int ZEND_FASTCALL zend_compare_arrays(zval *a1, zval *a2);
ZEND_API int ZEND_FASTCALL zend_compare_objects(zval *o1, zval *o2);
@@ -446,7 +456,7 @@ static zend_always_inline void fast_long_increment_function(zval *op1)
: "r"(&op1->value),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "cc");
+ : "cc", "memory");
#elif defined(__GNUC__) && defined(__x86_64__)
__asm__(
"incq (%0)\n\t"
@@ -459,34 +469,7 @@ static zend_always_inline void fast_long_increment_function(zval *op1)
: "r"(&op1->value),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "cc");
-#elif defined(__GNUC__) && defined(__powerpc64__)
- __asm__(
- "ld 14, 0(%0)\n\t"
- "li 15, 1\n\t"
- "li 16, 0\n\t"
- "mtxer 16\n\t"
- "addo. 14, 14, 15\n\t"
- "std 14, 0(%0)\n\t"
- "bns+ 0f\n\t"
- "xor 14, 14, 14\n\t"
- "lis 15, 0x43e00000@h\n\t"
- "ori 15, 15, 0x43e00000@l\n\t"
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- "stw 14, 0(%0)\n\t"
- "stw 15, 0x4(%0)\n\t"
-#else
- "stw 14, 0x4(%0)\n\t"
- "stw 15, 0(%0)\n\t"
-#endif
- "li 14, %1\n\t"
- "stw 14, %c2(%0)\n"
- "0:"
- :
- : "r"(&op1->value),
- "n"(IS_DOUBLE),
- "n"(ZVAL_OFFSETOF_TYPE)
- : "r14", "r15", "r16", "cc");
+ : "cc", "memory");
#else
if (UNEXPECTED(Z_LVAL_P(op1) == ZEND_LONG_MAX)) {
/* switch to double */
@@ -511,7 +494,7 @@ static zend_always_inline void fast_long_decrement_function(zval *op1)
: "r"(&op1->value),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "cc");
+ : "cc", "memory");
#elif defined(__GNUC__) && defined(__x86_64__)
__asm__(
"decq (%0)\n\t"
@@ -524,34 +507,7 @@ static zend_always_inline void fast_long_decrement_function(zval *op1)
: "r"(&op1->value),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "cc");
-#elif defined(__GNUC__) && defined(__powerpc64__)
- __asm__(
- "ld 14, 0(%0)\n\t"
- "li 15, 1\n\t"
- "li 16, 0\n\t"
- "mtxer 16\n\t"
- "subo. 14, 14, 15\n\t"
- "std 14, 0(%0)\n\t"
- "bns+ 0f\n\t"
- "xor 14, 14, 14\n\t"
- "lis 15, 0xc3e00000@h\n\t"
- "ori 15, 15, 0xc3e00000@l\n\t"
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- "stw 14, 0(%0)\n\t"
- "stw 15, 0x4(%0)\n\t"
-#else
- "stw 14, 0x4(%0)\n\t"
- "stw 15, 0(%0)\n\t"
-#endif
- "li 14, %1\n\t"
- "stw 14, %c2(%0)\n"
- "0:"
- :
- : "r"(&op1->value),
- "n"(IS_DOUBLE),
- "n"(ZVAL_OFFSETOF_TYPE)
- : "r14", "r15", "r16", "cc");
+ : "cc", "memory");
#else
if (UNEXPECTED(Z_LVAL_P(op1) == ZEND_LONG_MIN)) {
/* switch to double */
@@ -564,7 +520,7 @@ static zend_always_inline void fast_long_decrement_function(zval *op1)
static zend_always_inline void fast_long_add_function(zval *result, zval *op1, zval *op2)
{
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__)
__asm__(
"movl (%1), %%eax\n\t"
"addl (%2), %%eax\n\t"
@@ -586,7 +542,7 @@ static zend_always_inline void fast_long_add_function(zval *result, zval *op1, z
"n"(IS_LONG),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "eax","cc");
+ : "eax","cc", "memory");
#elif defined(__GNUC__) && defined(__x86_64__)
__asm__(
"movq (%1), %%rax\n\t"
@@ -609,37 +565,7 @@ static zend_always_inline void fast_long_add_function(zval *result, zval *op1, z
"n"(IS_LONG),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "rax","cc");
-#elif defined(__GNUC__) && defined(__powerpc64__)
- __asm__(
- "ld 14, 0(%1)\n\t"
- "ld 15, 0(%2)\n\t"
- "li 16, 0 \n\t"
- "mtxer 16\n\t"
- "addo. 14, 14, 15\n\t"
- "bso- 0f\n\t"
- "std 14, 0(%0)\n\t"
- "li 14, %3\n\t"
- "stw 14, %c5(%0)\n\t"
- "b 1f\n"
- "0:\n\t"
- "lfd 0, 0(%1)\n\t"
- "lfd 1, 0(%2)\n\t"
- "fcfid 0, 0\n\t"
- "fcfid 1, 1\n\t"
- "fadd 0, 0, 1\n\t"
- "li 14, %4\n\t"
- "stw 14, %c5(%0)\n\t"
- "stfd 0, 0(%0)\n"
- "1:"
- :
- : "r"(&result->value),
- "r"(&op1->value),
- "r"(&op2->value),
- "n"(IS_LONG),
- "n"(IS_DOUBLE),
- "n"(ZVAL_OFFSETOF_TYPE)
- : "r14","r15","r16","fr0","fr1","cc");
+ : "rax","cc", "memory");
#else
/*
* 'result' may alias with op1 or op2, so we need to
@@ -680,7 +606,7 @@ static zend_always_inline int fast_add_function(zval *result, zval *op1, zval *o
static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, zval *op2)
{
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__)
__asm__(
"movl (%1), %%eax\n\t"
"subl (%2), %%eax\n\t"
@@ -706,7 +632,7 @@ static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, z
"n"(IS_LONG),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "eax","cc");
+ : "eax","cc", "memory");
#elif defined(__GNUC__) && defined(__x86_64__)
__asm__(
"movq (%1), %%rax\n\t"
@@ -733,37 +659,7 @@ static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, z
"n"(IS_LONG),
"n"(IS_DOUBLE),
"n"(ZVAL_OFFSETOF_TYPE)
- : "rax","cc");
-#elif defined(__GNUC__) && defined(__powerpc64__)
- __asm__(
- "ld 14, 0(%1)\n\t"
- "ld 15, 0(%2)\n\t"
- "li 16, 0\n\t"
- "mtxer 16\n\t"
- "subo. 14, 14, 15\n\t"
- "bso- 0f\n\t"
- "std 14, 0(%0)\n\t"
- "li 14, %3\n\t"
- "stw 14, %c5(%0)\n\t"
- "b 1f\n"
- "0:\n\t"
- "lfd 0, 0(%1)\n\t"
- "lfd 1, 0(%2)\n\t"
- "fcfid 0, 0\n\t"
- "fcfid 1, 1\n\t"
- "fsub 0, 0, 1\n\t"
- "li 14, %4\n\t"
- "stw 14, %c5(%0)\n\t"
- "stfd 0, 0(%0)\n"
- "1:"
- :
- : "r"(&result->value),
- "r"(&op1->value),
- "r"(&op2->value),
- "n"(IS_LONG),
- "n"(IS_DOUBLE),
- "n"(ZVAL_OFFSETOF_TYPE)
- : "r14","r15","r16","fr0","fr1","cc");
+ : "rax","cc", "memory");
#else
ZVAL_LONG(result, Z_LVAL_P(op1) - Z_LVAL_P(op2));
@@ -805,7 +701,7 @@ static zend_always_inline int fast_equal_check_function(zval *op1, zval *op2)
return memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0;
}
} else {
- return zendi_smart_strcmp(op1, op2) == 0;
+ return zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0;
}
}
}
@@ -836,7 +732,7 @@ static zend_always_inline int fast_equal_check_string(zval *op1, zval *op2)
return memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0;
}
} else {
- return zendi_smart_strcmp(op1, op2) == 0;
+ return zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0;
}
}
compare_function(&result, op1, op2);
@@ -871,7 +767,7 @@ static zend_always_inline int fast_is_not_identical_function(zval *op1, zval *op
int ret; \
zval rv; \
zval *objval = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); \
- Z_ADDREF_P(objval); \
+ Z_TRY_ADDREF_P(objval); \
ret = binary_op(objval, objval, op2); \
Z_OBJ_HANDLER_P(op1, set)(op1, objval); \
zval_ptr_dtor(objval); \
@@ -925,6 +821,18 @@ static zend_always_inline char *zend_print_long_to_buf(char *buf, zend_long num)
ZEND_API zend_string* ZEND_FASTCALL zend_long_to_str(zend_long num);
+static zend_always_inline void zend_unwrap_reference(zval *op) /* {{{ */
+{
+ if (Z_REFCOUNT_P(op) == 1) {
+ ZVAL_UNREF(op);
+ } else {
+ Z_DELREF_P(op);
+ ZVAL_COPY(op, Z_REFVAL_P(op));
+ }
+}
+/* }}} */
+
+
END_EXTERN_C()
#endif
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 214ece53e6..298dfb53fa 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -78,6 +78,8 @@
#include <intrin.h>
#endif
+#include "zend_range_check.h"
+
/* GCC x.y.z supplies __GNUC__ = x and __GNUC_MINOR__ = y */
#ifdef __GNUC__
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
@@ -93,7 +95,7 @@
# define __has_builtin(x) 0
#endif
-#if defined(ZEND_WIN32)
+#if defined(ZEND_WIN32) && !defined(__clang__)
# define ZEND_ASSUME(c) __assume(c)
#elif ((defined(__GNUC__) && ZEND_GCC_VERSION >= 4005) || __has_builtin(__builtin_unreachable)) && PHP_HAVE_BUILTIN_EXPECT
# define ZEND_ASSUME(c) do { \
@@ -117,6 +119,12 @@
# define EMPTY_SWITCH_DEFAULT_CASE() default: ZEND_ASSUME(0); break;
#endif
+#if defined(__GNUC__) && __GNUC__ >= 4
+# define ZEND_IGNORE_VALUE(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
+#else
+# define ZEND_IGNORE_VALUE(x) ((void) (x))
+#endif
+
/* all HAVE_XXX test have to be after the include of zend_config above */
#if defined(HAVE_LIBDL) && !defined(ZEND_WIN32)
@@ -169,7 +177,7 @@ char *alloca();
# endif
#endif
-#if ZEND_GCC_VERSION >= 2096
+#if ZEND_GCC_VERSION >= 2096 || __has_attribute(__malloc__)
# define ZEND_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
#else
# define ZEND_ATTRIBUTE_MALLOC
@@ -210,16 +218,20 @@ char *alloca();
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 4003
# define ZEND_ATTRIBUTE_UNUSED __attribute__((unused))
# define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__((cold, unused));
+# define ZEND_COLD __attribute__((cold))
+# define ZEND_HOT __attribute__((hot))
#else
# define ZEND_ATTRIBUTE_UNUSED
# define ZEND_ATTRIBUTE_UNUSED_LABEL
+# define ZEND_COLD
+# define ZEND_HOT
#endif
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 && defined(__i386__)
# define ZEND_FASTCALL __attribute__((fastcall))
#elif defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER == 1700
# define ZEND_FASTCALL __fastcall
-#elif defined(_MSC_VER) && _MSC_VER >= 1800
+#elif defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(__clang__)
# define ZEND_FASTCALL __vectorcall
#else
# define ZEND_FASTCALL
@@ -272,7 +284,7 @@ char *alloca();
# endif
# elif defined(_MSC_VER)
# define zend_always_inline __forceinline
-# define zend_never_inline
+# define zend_never_inline __declspec(noinline)
# else
# if __has_attribute(always_inline)
# define zend_always_inline inline __attribute__((always_inline))
diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c
index 7165fc8b7f..ea71d10d50 100644
--- a/Zend/zend_ptr_stack.c
+++ b/Zend/zend_ptr_stack.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h
index 3093901f34..b79ea344a5 100644
--- a/Zend/zend_ptr_stack.h
+++ b/Zend/zend_ptr_stack.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_range_check.h b/Zend/zend_range_check.h
new file mode 100644
index 0000000000..ce3a76b515
--- /dev/null
+++ b/Zend/zend_range_check.h
@@ -0,0 +1,75 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Anatol Belski <ab@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_RANGE_CHECK_H
+#define ZEND_RANGE_CHECK_H
+
+#include "zend_long.h"
+
+/* Flag macros for basic range recognition. Notable is that
+ always sizeof(signed) == sizeof(unsigned), so no need to
+ overcomplicate things. */
+#if SIZEOF_INT < SIZEOF_ZEND_LONG
+# define ZEND_LONG_CAN_OVFL_INT 1
+# define ZEND_LONG_CAN_OVFL_UINT 1
+#endif
+
+#if SIZEOF_INT < SIZEOF_SIZE_T
+/* size_t can always overflow signed int on the same platform.
+ Furthermore, by the current design, size_t can always
+ overflow zend_long. */
+# define ZEND_SIZE_T_CAN_OVFL_UINT 1
+#endif
+
+
+/* zend_long vs. (unsigned) int checks. */
+#ifdef ZEND_LONG_CAN_OVFL_INT
+# define ZEND_LONG_INT_OVFL(zlong) UNEXPECTED((zlong) > (zend_long)INT_MAX)
+# define ZEND_LONG_INT_UDFL(zlong) UNEXPECTED((zlong) < (zend_long)INT_MIN)
+# define ZEND_LONG_EXCEEDS_INT(zlong) UNEXPECTED(ZEND_LONG_INT_OVFL(zlong) || ZEND_LONG_INT_UDFL(zlong))
+# define ZEND_LONG_UINT_OVFL(zlong) UNEXPECTED((zlong) < 0 || (zlong) > (zend_long)UINT_MAX)
+#else
+# define ZEND_LONG_INT_OVFL(zl) (0)
+# define ZEND_LONG_INT_UDFL(zl) (0)
+# define ZEND_LONG_EXCEEDS_INT(zlong) (0)
+# define ZEND_LONG_UINT_OVFL(zl) (0)
+#endif
+
+/* size_t vs (unsigned) int checks. */
+#define ZEND_SIZE_T_INT_OVFL(size) UNEXPECTED((size) > (size_t)INT_MAX)
+#ifdef ZEND_SIZE_T_CAN_OVFL_UINT
+# define ZEND_SIZE_T_UINT_OVFL(size) UNEXPECTED((size) > (size_t)UINT_MAX)
+#else
+# define ZEND_SIZE_T_UINT_OVFL(size) (0)
+#endif
+
+/* Comparison zend_long vs size_t */
+#define ZEND_SIZE_T_GT_ZEND_LONG(size, zlong) ((zlong) < 0 || (size) > (size_t)(zlong))
+#define ZEND_SIZE_T_GTE_ZEND_LONG(size, zlong) ((zlong) < 0 || (size) >= (size_t)(zlong))
+#define ZEND_SIZE_T_LT_ZEND_LONG(size, zlong) ((zlong) >= 0 && (size) < (size_t)(zlong))
+#define ZEND_SIZE_T_LTE_ZEND_LONG(size, zlong) ((zlong) >= 0 && (size) <= (size_t)(zlong))
+
+#endif /* ZEND_RANGE_CHECK_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c
index 1280a7085f..b4f57415d5 100644
--- a/Zend/zend_signal.c
+++ b/Zend/zend_signal.c
@@ -75,6 +75,10 @@ void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context)
int errno_save = errno;
zend_signal_queue_t *queue, *qtmp;
+#ifdef ZTS
+ ZEND_TSRMLS_CACHE_UPDATE();
+#endif
+
if (EXPECTED(SIGG(active))) {
if (UNEXPECTED(SIGG(depth) == 0)) { /* try to handle signal */
if (UNEXPECTED(SIGG(blocked))) {
diff --git a/Zend/zend_signal.h b/Zend/zend_signal.h
index e70e409b4b..0c32db52a3 100644
--- a/Zend/zend_signal.h
+++ b/Zend/zend_signal.h
@@ -32,7 +32,7 @@
#endif
#ifndef ZEND_SIGNAL_QUEUE_SIZE
-#define ZEND_SIGNAL_QUEUE_SIZE 32
+#define ZEND_SIGNAL_QUEUE_SIZE 64
#endif
/* Signal structs */
diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c
index 1d90c83060..c9b97acd1d 100644
--- a/Zend/zend_smart_str.c
+++ b/Zend/zend_smart_str.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
*/
#include <zend.h>
-#include "zend_smart_str_public.h"
+#include "zend_smart_str.h"
#define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE)
@@ -59,3 +59,61 @@ ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len)
str->s = (zend_string *) realloc(str->s, _ZSTR_HEADER_SIZE + str->a + 1);
}
}
+
+/* Windows uses VK_ESCAPE instead of \e */
+#ifndef VK_ESCAPE
+#define VK_ESCAPE '\e'
+#endif
+
+static size_t zend_compute_escaped_string_len(const char *s, size_t l) {
+ size_t i, len = l;
+ for (i = 0; i < l; ++i) {
+ char c = s[i];
+ if (c == '\n' || c == '\r' || c == '\t' ||
+ c == '\f' || c == '\v' || c == '\\' || c == VK_ESCAPE) {
+ len += 1;
+ } else if (c < 32 || c > 126) {
+ len += 3;
+ }
+ }
+ return len;
+}
+
+ZEND_API void ZEND_FASTCALL smart_str_append_escaped(smart_str *str, const char *s, size_t l) {
+ char *res;
+ size_t i, len = zend_compute_escaped_string_len(s, l);
+
+ smart_str_alloc(str, len, 0);
+ res = &ZSTR_VAL(str->s)[ZSTR_LEN(str->s)];
+ ZSTR_LEN(str->s) += len;
+
+ for (i = 0; i < l; ++i) {
+ unsigned char c = s[i];
+ if (c < 32 || c == '\\' || c > 126) {
+ *res++ = '\\';
+ switch (c) {
+ case '\n': *res++ = 'n'; break;
+ case '\r': *res++ = 'r'; break;
+ case '\t': *res++ = 't'; break;
+ case '\f': *res++ = 'f'; break;
+ case '\v': *res++ = 'v'; break;
+ case '\\': *res++ = '\\'; break;
+ case VK_ESCAPE: *res++ = 'e'; break;
+ default:
+ *res++ = 'x';
+ if ((c >> 4) < 10) {
+ *res++ = (c >> 4) + '0';
+ } else {
+ *res++ = (c >> 4) + 'A' - 10;
+ }
+ if ((c & 0xf) < 10) {
+ *res++ = (c & 0xf) + '0';
+ } else {
+ *res++ = (c & 0xf) + 'A' - 10;
+ }
+ }
+ } else {
+ *res++ = c;
+ }
+ }
+}
diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h
index 39478511a8..f31d53e019 100644
--- a/Zend/zend_smart_str.h
+++ b/Zend/zend_smart_str.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -45,6 +45,7 @@ BEGIN_EXTERN_C()
ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len);
ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len);
+ZEND_API void ZEND_FASTCALL smart_str_append_escaped(smart_str *str, const char *s, size_t l);
END_EXTERN_C()
diff --git a/Zend/zend_smart_str_public.h b/Zend/zend_smart_str_public.h
index 08c2a77616..721ab8b4fe 100644
--- a/Zend/zend_smart_str_public.h
+++ b/Zend/zend_smart_str_public.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_sort.c b/Zend/zend_sort.c
index cdf19f9d24..1cf5fd492d 100644
--- a/Zend/zend_sort.c
+++ b/Zend/zend_sort.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -35,7 +35,7 @@ ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t co
register char *seg2;
register char *seg2p;
register int loop;
- uint offset;
+ size_t offset;
begin_stack[0] = (char *) base;
end_stack[0] = (char *) base + ((nmemb - 1) * siz);
diff --git a/Zend/zend_sort.h b/Zend/zend_sort.h
index f2187886e3..340b0fcf6e 100644
--- a/Zend/zend_sort.h
+++ b/Zend/zend_sort.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_sprintf.c b/Zend/zend_sprintf.c
index cb63e20975..37d876d423 100644
--- a/Zend/zend_sprintf.c
+++ b/Zend/zend_sprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -30,13 +30,14 @@
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...)
{
+ int len;
va_list args;
va_start(args, format);
- vsprintf(buffer, format, args);
+ len = vsprintf(buffer, format, args);
va_end(args);
- return strlen(buffer);
+ return len;
}
#endif
diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c
index 470e699e59..be459c18b0 100644
--- a/Zend/zend_stack.c
+++ b/Zend/zend_stack.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_stack.h b/Zend/zend_stack.h
index 44cc34265d..69cb25e6e2 100644
--- a/Zend/zend_stack.h
+++ b/Zend/zend_stack.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c
index 7796edb0d6..b3553bd3cc 100644
--- a/Zend/zend_stream.c
+++ b/Zend/zend_stream.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h
index 3dfaaf474b..37e66f8f15 100644
--- a/Zend/zend_stream.h
+++ b/Zend/zend_stream.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_string.c b/Zend/zend_string.c
index 40378a576e..4e7bcfc9fc 100644
--- a/Zend/zend_string.c
+++ b/Zend/zend_string.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,6 +42,42 @@ static void _str_dtor(zval *zv)
}
#endif
+/* Readonly, so assigned also per thread. */
+static const zend_string **known_interned_strings = NULL;
+static uint32_t known_interned_strings_count = 0;
+
+ZEND_API uint32_t zend_intern_known_strings(const char **strings, uint32_t count)
+{
+ uint32_t i, old_count = known_interned_strings_count;
+
+ known_interned_strings = perealloc(known_interned_strings, sizeof(char*) * (old_count + count), 1);
+ for (i = 0; i < count; i++) {
+#ifndef ZTS
+ zend_string *str = zend_string_init(strings[i], strlen(strings[i]), 1);
+ known_interned_strings[known_interned_strings_count + i] =
+ zend_new_interned_string_int(str);
+#else
+ known_interned_strings[known_interned_strings_count + i] =
+ zend_zts_interned_string_init(strings[i], strlen(strings[i]));
+#endif
+ }
+ known_interned_strings_count = old_count + count;
+ return old_count;
+}
+
+static const char *known_strings[] = {
+#define _ZEND_STR_DSC(id, str) str,
+ZEND_KNOWN_STRINGS(_ZEND_STR_DSC)
+#undef _ZEND_STR_DSC
+ NULL
+};
+
+void zend_known_interned_strings_init(zend_string ***strings, uint32_t *count)
+{
+ *strings = known_interned_strings;
+ *count = known_interned_strings_count;
+}
+
void zend_interned_strings_init(void)
{
#ifndef ZTS
@@ -63,6 +99,10 @@ void zend_interned_strings_init(void)
/* one char strings (the actual interned strings are going to be created by ext/opcache) */
memset(CG(one_char_string), 0, sizeof(CG(one_char_string)));
+ /* known strings */
+ zend_intern_known_strings(known_strings, (sizeof(known_strings) / sizeof(known_strings[0])) - 1);
+ zend_known_interned_strings_init(&CG(known_strings), &CG(known_strings_count));
+
zend_new_interned_string = zend_new_interned_string_int;
zend_interned_strings_snapshot = zend_interned_strings_snapshot_int;
zend_interned_strings_restore = zend_interned_strings_restore_int;
@@ -72,7 +112,18 @@ void zend_interned_strings_dtor(void)
{
#ifndef ZTS
zend_hash_destroy(&CG(interned_strings));
+#else
+ uint32_t i;
+
+ for (i = 0; i < CG(known_strings_count); i++) {
+ zend_zts_interned_string_free(&CG(known_strings)[i]);
+ }
#endif
+ free(CG(known_strings));
+ CG(known_strings) = NULL;
+ CG(known_strings_count) = 0;
+ known_interned_strings = NULL;
+ known_interned_strings_count = 0;
}
static zend_string *zend_new_interned_string_int(zend_string *str)
diff --git a/Zend/zend_string.h b/Zend/zend_string.h
index 137545624e..8a1ac6f506 100644
--- a/Zend/zend_string.h
+++ b/Zend/zend_string.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,6 +32,7 @@ ZEND_API extern void (*zend_interned_strings_restore)(void);
ZEND_API zend_ulong zend_hash_func(const char *str, size_t len);
void zend_interned_strings_init(void);
void zend_interned_strings_dtor(void);
+void zend_known_interned_strings_init(zend_string ***, uint32_t *);
END_EXTERN_C()
@@ -62,7 +63,7 @@ END_EXTERN_C()
#define _ZSTR_STRUCT_SIZE(len) (_ZSTR_HEADER_SIZE + len + 1)
#define ZSTR_ALLOCA_ALLOC(str, _len, use_heap) do { \
- (str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(_len)), (use_heap)); \
+ (str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE_EX(_ZSTR_STRUCT_SIZE(_len), 8), (use_heap)); \
GC_REFCOUNT(str) = 1; \
GC_TYPE_INFO(str) = IS_STRING; \
zend_string_forget_hash_val(str); \
@@ -323,7 +324,7 @@ static zend_always_inline zend_bool zend_string_equals(zend_string *s1, zend_str
static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size_t len)
{
- register zend_ulong hash = Z_UL(5381);
+ zend_ulong hash = Z_UL(5381);
/* variant with the hash unrolled eight times */
for (; len >= 8; len -= 8) {
@@ -358,29 +359,67 @@ EMPTY_SWITCH_DEFAULT_CASE()
#endif
}
-static zend_always_inline void zend_interned_empty_string_init(zend_string **s)
+#ifdef ZTS
+static zend_always_inline zend_string* zend_zts_interned_string_init(const char *val, size_t len)
{
zend_string *str;
- str = zend_string_alloc(sizeof("")-1, 1);
- ZSTR_VAL(str)[0] = '\000';
+ str = zend_string_init(val, len, 1);
-#ifndef ZTS
- *s = zend_new_interned_string(str);
-#else
zend_string_hash_val(str);
GC_FLAGS(str) |= IS_STR_INTERNED;
- *s = str;
-#endif
+ return str;
}
-static zend_always_inline void zend_interned_empty_string_free(zend_string **s)
+static zend_always_inline void zend_zts_interned_string_free(zend_string **s)
{
if (NULL != *s) {
free(*s);
*s = NULL;
}
}
+#endif
+
+#define ZEND_KNOWN_STRINGS(_) \
+ _(ZEND_STR_FILE, "file") \
+ _(ZEND_STR_LINE, "line") \
+ _(ZEND_STR_FUNCTION, "function") \
+ _(ZEND_STR_CLASS, "class") \
+ _(ZEND_STR_OBJECT, "object") \
+ _(ZEND_STR_TYPE, "type") \
+ _(ZEND_STR_OBJECT_OPERATOR, "->") \
+ _(ZEND_STR_PAAMAYIM_NEKUDOTAYIM, "::") \
+ _(ZEND_STR_ARGS, "args") \
+ _(ZEND_STR_UNKNOWN, "unknown") \
+ _(ZEND_STR_EVAL, "eval") \
+ _(ZEND_STR_INCLUDE, "include") \
+ _(ZEND_STR_REQUIRE, "require") \
+ _(ZEND_STR_INCLUDE_ONCE, "include_once") \
+ _(ZEND_STR_REQUIRE_ONCE, "require_once") \
+ _(ZEND_STR_SCALAR, "scalar") \
+ _(ZEND_STR_ERROR_REPORTING, "error_reporting") \
+ _(ZEND_STR_STATIC, "static") \
+ _(ZEND_STR_THIS, "this") \
+ _(ZEND_STR_VALUE, "value") \
+ _(ZEND_STR_KEY, "key") \
+ _(ZEND_STR_MAGIC_AUTOLOAD, "__autoload") \
+ _(ZEND_STR_MAGIC_INVOKE, "__invoke") \
+ _(ZEND_STR_PREVIOUS, "previous") \
+ _(ZEND_STR_CODE, "code") \
+ _(ZEND_STR_MESSAGE, "message") \
+ _(ZEND_STR_SEVERITY, "severity") \
+ _(ZEND_STR_STRING, "string") \
+ _(ZEND_STR_TRACE, "trace") \
+
+
+typedef enum _zend_known_string_id {
+#define _ZEND_STR_ID(id, str) id,
+ZEND_KNOWN_STRINGS(_ZEND_STR_ID)
+#undef _ZEND_STR_ID
+ ZEND_STR_LAST_KNOWN
+} zend_known_string_id;
+
+ZEND_API uint32_t zend_intern_known_strings(const char **strings, uint32_t count);
#endif /* ZEND_STRING_H */
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 4fa9ee311d..a524e64aa1 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -3601,7 +3601,7 @@ zend_strtod
}
#ifndef MULTIPLE_THREADS
- static char *dtoa_result;
+ ZEND_TLS char *dtoa_result;
#endif
static char *
@@ -4416,11 +4416,6 @@ ZEND_API double zend_hex_strtod(const char *str, const char **endptr)
int any = 0;
double value = 0;
- if (strlen(str) < 2) {
- *endptr = str;
- return 0.0;
- }
-
if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) {
s += 2;
}
@@ -4454,8 +4449,10 @@ ZEND_API double zend_oct_strtod(const char *str, const char **endptr)
double value = 0;
int any = 0;
- if (strlen(str) < 1) {
- *endptr = str;
+ if (str[0] == '\0') {
+ if (endptr != NULL) {
+ *endptr = str;
+ }
return 0.0;
}
@@ -4487,11 +4484,6 @@ ZEND_API double zend_bin_strtod(const char *str, const char **endptr)
double value = 0;
int any = 0;
- if (strlen(str) < 2) {
- *endptr = str;
- return 0.0;
- }
-
if ('0' == *s && ('b' == s[1] || 'B' == s[1])) {
s += 2;
}
diff --git a/Zend/zend_strtod.h b/Zend/zend_strtod.h
index 78d0501dae..26ad3b4504 100644
--- a/Zend/zend_strtod.h
+++ b/Zend/zend_strtod.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h
index 520caddd36..03bf0007cc 100644
--- a/Zend/zend_strtod_int.h
+++ b/Zend/zend_strtod_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_ts_hash.c b/Zend/zend_ts_hash.c
index be8fbd9e7b..a4d3ddac39 100644
--- a/Zend/zend_ts_hash.c
+++ b/Zend/zend_ts_hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h
index 0e947eee96..f3087fc032 100644
--- a/Zend/zend_ts_hash.h
+++ b/Zend/zend_ts_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/Zend/zend_type_info.h b/Zend/zend_type_info.h
new file mode 100644
index 0000000000..bd3c3713d9
--- /dev/null
+++ b/Zend/zend_type_info.h
@@ -0,0 +1,68 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id$ */
+
+#ifndef ZEND_TYPE_INFO_H
+#define ZEND_TYPE_INFO_H
+
+#include "zend_types.h"
+
+#define MAY_BE_UNDEF (1 << IS_UNDEF)
+#define MAY_BE_NULL (1 << IS_NULL)
+#define MAY_BE_FALSE (1 << IS_FALSE)
+#define MAY_BE_TRUE (1 << IS_TRUE)
+#define MAY_BE_LONG (1 << IS_LONG)
+#define MAY_BE_DOUBLE (1 << IS_DOUBLE)
+#define MAY_BE_STRING (1 << IS_STRING)
+#define MAY_BE_ARRAY (1 << IS_ARRAY)
+#define MAY_BE_OBJECT (1 << IS_OBJECT)
+#define MAY_BE_RESOURCE (1 << IS_RESOURCE)
+#define MAY_BE_ANY (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)
+#define MAY_BE_REF (1 << IS_REFERENCE) /* may be reference */
+
+#define MAY_BE_ARRAY_SHIFT (IS_REFERENCE)
+
+#define MAY_BE_ARRAY_OF_NULL (MAY_BE_NULL << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_FALSE (MAY_BE_FALSE << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_TRUE (MAY_BE_TRUE << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_LONG (MAY_BE_LONG << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_DOUBLE (MAY_BE_DOUBLE << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_STRING (MAY_BE_STRING << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_ARRAY (MAY_BE_ARRAY << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_OBJECT (MAY_BE_OBJECT << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_RESOURCE (MAY_BE_RESOURCE << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_ANY (MAY_BE_ANY << MAY_BE_ARRAY_SHIFT)
+#define MAY_BE_ARRAY_OF_REF (MAY_BE_REF << MAY_BE_ARRAY_SHIFT)
+
+#define MAY_BE_ARRAY_KEY_LONG (1<<21)
+#define MAY_BE_ARRAY_KEY_STRING (1<<22)
+#define MAY_BE_ARRAY_KEY_ANY (MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_KEY_STRING)
+
+#define MAY_BE_ERROR (1<<23)
+#define MAY_BE_CLASS (1<<24)
+
+#endif /* ZEND_TYPE_INFO_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index 7d7961cb10..45c2ebdf70 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,6 +15,7 @@
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
| Dmitry Stogov <dmitry@zend.com> |
+ | Xinchen Hui <xinchen.h@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -67,6 +68,14 @@ typedef enum {
typedef intptr_t zend_intptr_t;
typedef uintptr_t zend_uintptr_t;
+#ifdef ZTS
+#define ZEND_TLS static TSRM_TLS
+#define ZEND_EXT_TLS TSRM_TLS
+#else
+#define ZEND_TLS static
+#define ZEND_EXT_TLS
+#endif
+
typedef struct _zend_object_handlers zend_object_handlers;
typedef struct _zend_class_entry zend_class_entry;
typedef union _zend_function zend_function;
@@ -104,9 +113,8 @@ typedef union _zend_value {
zend_class_entry *ce;
zend_function *func;
struct {
- ZEND_ENDIAN_LOHI(
- uint32_t w1,
- uint32_t w2)
+ uint32_t w1;
+ uint32_t w2;
} ww;
} zend_value;
@@ -123,17 +131,18 @@ struct _zval_struct {
uint32_t type_info;
} u1;
union {
- uint32_t var_flags;
uint32_t next; /* hash collision chain */
uint32_t cache_slot; /* literal cache slot */
uint32_t lineno; /* line number (for ast nodes) */
uint32_t num_args; /* arguments number for EX(This) */
uint32_t fe_pos; /* foreach position */
uint32_t fe_iter_idx; /* foreach iterator index */
+ uint32_t access_flags; /* class constant access flags */
+ uint32_t property_guard; /* single property guard */
} u2;
};
-struct _zend_refcounted {
+typedef struct _zend_refcounted_h {
uint32_t refcount; /* reference counter 32-bit */
union {
struct {
@@ -144,10 +153,14 @@ struct _zend_refcounted {
} v;
uint32_t type_info;
} u;
+} zend_refcounted_h;
+
+struct _zend_refcounted {
+ zend_refcounted_h gc;
};
struct _zend_string {
- zend_refcounted gc;
+ zend_refcounted_h gc;
zend_ulong h; /* hash value */
size_t len;
char val[1];
@@ -162,7 +175,7 @@ typedef struct _Bucket {
typedef struct _zend_array HashTable;
struct _zend_array {
- zend_refcounted gc;
+ zend_refcounted_h gc;
union {
struct {
ZEND_ENDIAN_LOHI_4(
@@ -228,16 +241,18 @@ struct _zend_array {
#define HT_HASH(ht, idx) \
HT_HASH_EX((ht)->arData, idx)
-#define HT_HASH_SIZE(ht) \
- (((size_t)(uint32_t)-(int32_t)(ht)->nTableMask) * sizeof(uint32_t))
-#define HT_DATA_SIZE(ht) \
- ((size_t)(ht)->nTableSize * sizeof(Bucket))
+#define HT_HASH_SIZE(nTableMask) \
+ (((size_t)(uint32_t)-(int32_t)(nTableMask)) * sizeof(uint32_t))
+#define HT_DATA_SIZE(nTableSize) \
+ ((size_t)(nTableSize) * sizeof(Bucket))
+#define HT_SIZE_EX(nTableSize, nTableMask) \
+ (HT_DATA_SIZE((nTableSize)) + HT_HASH_SIZE((nTableMask)))
#define HT_SIZE(ht) \
- (HT_HASH_SIZE(ht) + HT_DATA_SIZE(ht))
+ HT_SIZE_EX((ht)->nTableSize, (ht)->nTableMask)
#define HT_USED_SIZE(ht) \
- (HT_HASH_SIZE(ht) + ((size_t)(ht)->nNumUsed * sizeof(Bucket)))
+ (HT_HASH_SIZE((ht)->nTableMask) + ((size_t)(ht)->nNumUsed * sizeof(Bucket)))
#define HT_HASH_RESET(ht) \
- memset(&HT_HASH(ht, (ht)->nTableMask), HT_INVALID_IDX, HT_HASH_SIZE(ht))
+ memset(&HT_HASH(ht, (ht)->nTableMask), HT_INVALID_IDX, HT_HASH_SIZE((ht)->nTableMask))
#define HT_HASH_RESET_PACKED(ht) do { \
HT_HASH(ht, -2) = HT_INVALID_IDX; \
HT_HASH(ht, -1) = HT_INVALID_IDX; \
@@ -246,10 +261,10 @@ struct _zend_array {
HT_HASH_TO_BUCKET_EX((ht)->arData, idx)
#define HT_SET_DATA_ADDR(ht, ptr) do { \
- (ht)->arData = (Bucket*)(((char*)(ptr)) + HT_HASH_SIZE(ht)); \
+ (ht)->arData = (Bucket*)(((char*)(ptr)) + HT_HASH_SIZE((ht)->nTableMask)); \
} while (0)
#define HT_GET_DATA_ADDR(ht) \
- ((char*)((ht)->arData) - HT_HASH_SIZE(ht))
+ ((char*)((ht)->arData) - HT_HASH_SIZE((ht)->nTableMask))
typedef uint32_t HashPosition;
@@ -259,7 +274,7 @@ typedef struct _HashTableIterator {
} HashTableIterator;
struct _zend_object {
- zend_refcounted gc;
+ zend_refcounted_h gc;
uint32_t handle; // TODO: may be removed ???
zend_class_entry *ce;
const zend_object_handlers *handlers;
@@ -268,19 +283,19 @@ struct _zend_object {
};
struct _zend_resource {
- zend_refcounted gc;
+ zend_refcounted_h gc;
int handle; // TODO: may be removed ???
int type;
void *ptr;
};
struct _zend_reference {
- zend_refcounted gc;
+ zend_refcounted_h gc;
zval val;
};
struct _zend_ast_ref {
- zend_refcounted gc;
+ zend_refcounted_h gc;
zend_ast *ast;
};
@@ -304,10 +319,12 @@ struct _zend_ast_ref {
/* fake types */
#define _IS_BOOL 13
#define IS_CALLABLE 14
+#define IS_VOID 18
/* internal types */
#define IS_INDIRECT 15
#define IS_PTR 17
+#define _IS_ERROR 19
static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
return pz->u1.v.type;
@@ -328,9 +345,6 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_CONST_FLAGS(zval) (zval).u1.v.const_flags
#define Z_CONST_FLAGS_P(zval_p) Z_CONST_FLAGS(*(zval_p))
-#define Z_VAR_FLAGS(zval) (zval).u2.var_flags
-#define Z_VAR_FLAGS_P(zval_p) Z_VAR_FLAGS(*(zval_p))
-
#define Z_TYPE_INFO(zval) (zval).u1.type_info
#define Z_TYPE_INFO_P(zval_p) Z_TYPE_INFO(*(zval_p))
@@ -346,6 +360,9 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_FE_ITER(zval) (zval).u2.fe_iter_idx
#define Z_FE_ITER_P(zval_p) Z_FE_ITER(*(zval_p))
+#define Z_ACCESS_FLAGS(zval) (zval).u2.access_flags
+#define Z_ACCESS_FLAGS_P(zval_p) Z_ACCESS_FLAGS(*(zval_p))
+
#define Z_COUNTED(zval) (zval).value.counted
#define Z_COUNTED_P(zval_p) Z_COUNTED(*(zval_p))
@@ -354,11 +371,11 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_TYPE_FLAGS_SHIFT 8
#define Z_CONST_FLAGS_SHIFT 16
-#define GC_REFCOUNT(p) ((zend_refcounted*)(p))->refcount
-#define GC_TYPE(p) ((zend_refcounted*)(p))->u.v.type
-#define GC_FLAGS(p) ((zend_refcounted*)(p))->u.v.flags
-#define GC_INFO(p) ((zend_refcounted*)(p))->u.v.gc_info
-#define GC_TYPE_INFO(p) ((zend_refcounted*)(p))->u.type_info
+#define GC_REFCOUNT(p) (p)->gc.refcount
+#define GC_TYPE(p) (p)->gc.u.v.type
+#define GC_FLAGS(p) (p)->gc.u.v.flags
+#define GC_INFO(p) (p)->gc.u.v.gc_info
+#define GC_TYPE_INFO(p) (p)->gc.u.type_info
#define Z_GC_TYPE(zval) GC_TYPE(Z_COUNTED(zval))
#define Z_GC_TYPE_P(zval_p) Z_GC_TYPE(*(zval_p))
@@ -378,7 +395,6 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define IS_TYPE_REFCOUNTED (1<<2)
#define IS_TYPE_COLLECTABLE (1<<3)
#define IS_TYPE_COPYABLE (1<<4)
-#define IS_TYPE_SYMBOLTABLE (1<<5)
/* extended types */
#define IS_INTERNED_STRING_EX IS_STRING
@@ -394,13 +410,13 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
/* zval.u1.v.const_flags */
#define IS_CONSTANT_UNQUALIFIED 0x010
-#define IS_LEXICAL_VAR 0x020
-#define IS_LEXICAL_REF 0x040
+#define IS_CONSTANT_VISITED_MARK 0x020
#define IS_CONSTANT_CLASS 0x080 /* __CLASS__ in trait */
#define IS_CONSTANT_IN_NAMESPACE 0x100 /* used only in opline->extended_value */
-/* zval.u2.var_flags */
-#define IS_VAR_RET_REF (1<<0) /* return by by reference */
+#define IS_CONSTANT_VISITED(p) (Z_CONST_FLAGS_P(p) & IS_CONSTANT_VISITED_MARK)
+#define MARK_CONSTANT_VISITED(p) Z_CONST_FLAGS_P(p) |= IS_CONSTANT_VISITED_MARK
+#define RESET_CONSTANT_VISITED(p) Z_CONST_FLAGS_P(p) &= ~IS_CONSTANT_VISITED_MARK
/* string flags (zval.value->gc.u.flags) */
#define IS_STR_PERSISTENT (1<<0) /* allocated using malloc */
@@ -455,9 +471,6 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_IMMUTABLE(zval) ((Z_TYPE_FLAGS(zval) & IS_TYPE_IMMUTABLE) != 0)
#define Z_IMMUTABLE_P(zval_p) Z_IMMUTABLE(*(zval_p))
-#define Z_SYMBOLTABLE(zval) ((Z_TYPE_FLAGS(zval) & IS_TYPE_SYMBOLTABLE) != 0)
-#define Z_SYMBOLTABLE_P(zval_p) Z_SYMBOLTABLE(*(zval_p))
-
/* the following Z_OPT_* macros make better code when Z_TYPE_INFO accessed before */
#define Z_OPT_TYPE(zval) (Z_TYPE_INFO(zval) & Z_TYPE_MASK)
#define Z_OPT_TYPE_P(zval_p) Z_OPT_TYPE(*(zval_p))
@@ -477,6 +490,9 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_OPT_IMMUTABLE(zval) ((Z_TYPE_INFO(zval) & (IS_TYPE_IMMUTABLE << Z_TYPE_FLAGS_SHIFT)) != 0)
#define Z_OPT_IMMUTABLE_P(zval_p) Z_OPT_IMMUTABLE(*(zval_p))
+#define Z_OPT_ISREF(zval) (Z_OPT_TYPE(zval) == IS_REFERENCE)
+#define Z_OPT_ISREF_P(zval_p) Z_OPT_ISREF(*(zval_p))
+
#define Z_ISREF(zval) (Z_TYPE(zval) == IS_REFERENCE)
#define Z_ISREF_P(zval_p) Z_ISREF(*(zval_p))
@@ -486,6 +502,9 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_ISNULL(zval) (Z_TYPE(zval) == IS_NULL)
#define Z_ISNULL_P(zval_p) Z_ISNULL(*(zval_p))
+#define Z_ISERROR(zval) (Z_TYPE(zval) == _IS_ERROR)
+#define Z_ISERROR_P(zval_p) Z_ISERROR(*(zval_p))
+
#define Z_LVAL(zval) (zval).value.lval
#define Z_LVAL_P(zval_p) Z_LVAL(*(zval_p))
@@ -765,6 +784,10 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
Z_TYPE_INFO_P(z) = IS_PTR; \
} while (0)
+#define ZVAL_ERROR(z) do { \
+ Z_TYPE_INFO_P(z) = _IS_ERROR; \
+ } while (0)
+
#define Z_REFCOUNT_P(pz) zval_refcount_p(pz)
#define Z_SET_REFCOUNT_P(pz, rc) zval_set_refcount_p(pz, rc)
#define Z_ADDREF_P(pz) zval_addref_p(pz)
@@ -791,7 +814,7 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define Z_TRY_DELREF(z) Z_TRY_DELREF_P(&(z))
static zend_always_inline uint32_t zval_refcount_p(zval* pz) {
- ZEND_ASSERT(Z_REFCOUNTED_P(pz) || Z_IMMUTABLE_P(pz) || Z_SYMBOLTABLE_P(pz));
+ ZEND_ASSERT(Z_REFCOUNTED_P(pz) || Z_IMMUTABLE_P(pz));
return GC_REFCOUNT(Z_COUNTED_P(pz));
}
@@ -871,6 +894,12 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) {
} \
} while (0)
+#define ZVAL_OPT_DEREF(z) do { \
+ if (UNEXPECTED(Z_OPT_ISREF_P(z))) { \
+ (z) = Z_REFVAL_P(z); \
+ } \
+ } while (0)
+
#define ZVAL_MAKE_REF(zv) do { \
zval *__zv = (zv); \
if (!Z_ISREF_P(__zv)) { \
@@ -899,7 +928,7 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) {
#define SEPARATE_ARRAY(zv) do { \
zval *_zv = (zv); \
zend_array *_arr = Z_ARR_P(_zv); \
- if (GC_REFCOUNT(_arr) > 1) { \
+ if (UNEXPECTED(GC_REFCOUNT(_arr) > 1)) { \
if (!Z_IMMUTABLE_P(_zv)) { \
GC_REFCOUNT(_arr)--; \
} \
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 5f04bfc372..dc75353e62 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -34,64 +35,11 @@ ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC
case IS_CONSTANT: {
zend_string *str = (zend_string*)p;
CHECK_ZVAL_STRING_REL(str);
- zend_string_release(str);
- break;
- }
- case IS_ARRAY: {
- zend_array *arr = (zend_array*)p;
- ZEND_ASSERT(GC_REFCOUNT(arr) <= 1);
- zend_array_destroy(arr);
- break;
- }
- case IS_CONSTANT_AST: {
- zend_ast_ref *ast = (zend_ast_ref*)p;
-
- zend_ast_destroy_and_free(ast->ast);
- efree_size(ast, sizeof(zend_ast_ref));
- break;
- }
- case IS_OBJECT: {
- zend_object *obj = (zend_object*)p;
-
- OBJ_RELEASE(obj);
- break;
- }
- case IS_RESOURCE: {
- zend_resource *res = (zend_resource*)p;
-
- if (--GC_REFCOUNT(res) == 0) {
- /* destroy resource */
- zend_list_free(res);
- }
- break;
- }
- case IS_REFERENCE: {
- zend_reference *ref = (zend_reference*)p;
- if (--GC_REFCOUNT(ref) == 0) {
-
- i_zval_ptr_dtor(&ref->val ZEND_FILE_LINE_RELAY_CC);
- efree_size(ref, sizeof(zend_reference));
- }
- break;
- }
- default:
- break;
- }
-}
-
-ZEND_API void ZEND_FASTCALL _zval_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC)
-{
- switch (GC_TYPE(p)) {
- case IS_STRING:
- case IS_CONSTANT: {
- zend_string *str = (zend_string*)p;
- CHECK_ZVAL_STRING_REL(str);
zend_string_free(str);
break;
}
case IS_ARRAY: {
zend_array *arr = (zend_array*)p;
-
zend_array_destroy(arr);
break;
}
@@ -224,12 +172,8 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {
- zend_ast_ref *ast = emalloc(sizeof(zend_ast_ref));
-
- GC_REFCOUNT(ast) = 1;
- GC_TYPE_INFO(ast) = IS_CONSTANT_AST;
- ast->ast = zend_ast_copy(Z_ASTVAL_P(zvalue));
- Z_AST_P(zvalue) = ast;
+ zend_ast *copy = zend_ast_copy(Z_ASTVAL_P(zvalue));
+ ZVAL_NEW_AST(zvalue, copy);
}
}
@@ -266,59 +210,6 @@ ZEND_API void _zval_internal_ptr_dtor_wrapper(zval *zval_ptr)
}
#endif
-ZEND_API int zval_copy_static_var(zval *p, int num_args, va_list args, zend_hash_key *key) /* {{{ */
-{
- zend_array *symbol_table;
- HashTable *target = va_arg(args, HashTable*);
- zend_bool is_ref;
- zval tmp;
-
- if (Z_CONST_FLAGS_P(p) & (IS_LEXICAL_VAR|IS_LEXICAL_REF)) {
- is_ref = Z_CONST_FLAGS_P(p) & IS_LEXICAL_REF;
-
- symbol_table = zend_rebuild_symbol_table();
- p = zend_hash_find(symbol_table, key->key);
- if (!p) {
- p = &tmp;
- ZVAL_NULL(&tmp);
- if (is_ref) {
- ZVAL_NEW_REF(&tmp, &tmp);
- zend_hash_add_new(symbol_table, key->key, &tmp);
- Z_ADDREF_P(p);
- } else {
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(key->key));
- }
- } else {
- if (Z_TYPE_P(p) == IS_INDIRECT) {
- p = Z_INDIRECT_P(p);
- if (Z_TYPE_P(p) == IS_UNDEF) {
- if (!is_ref) {
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(key->key));
- p = &tmp;
- ZVAL_NULL(&tmp);
- } else {
- ZVAL_NULL(p);
- }
- }
- }
- if (is_ref) {
- ZVAL_MAKE_REF(p);
- Z_ADDREF_P(p);
- } else if (Z_ISREF_P(p)) {
- ZVAL_DUP(&tmp, Z_REFVAL_P(p));
- p = &tmp;
- } else if (Z_REFCOUNTED_P(p)) {
- Z_ADDREF_P(p);
- }
- }
- } else if (Z_REFCOUNTED_P(p)) {
- Z_ADDREF_P(p);
- }
- zend_hash_add(target, key->key, p);
- return ZEND_HASH_APPLY_KEEP;
-}
-/* }}} */
-
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h
index adb226123f..0afe68760d 100644
--- a/Zend/zend_variables.h
+++ b/Zend/zend_variables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+ | Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -28,25 +29,15 @@
BEGIN_EXTERN_C()
ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC);
-ZEND_API void ZEND_FASTCALL _zval_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC);
ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
#define zval_dtor_func(zv) _zval_dtor_func(zv ZEND_FILE_LINE_CC)
-#define zval_dtor_func_for_ptr(zv) _zval_dtor_func_for_ptr(zv ZEND_FILE_LINE_CC)
#define zval_copy_ctor_func(zv) _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)
-static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
-{
- if (!Z_REFCOUNTED_P(zvalue)) {
- return;
- }
- _zval_dtor_func(Z_COUNTED_P(zvalue) ZEND_FILE_LINE_RELAY_CC);
-}
-
static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC)
{
if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) {
- _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
+ _zval_dtor_func(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
}
}
@@ -54,7 +45,7 @@ static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC)
{
if (Z_REFCOUNTED_P(zval_ptr)) {
if (!Z_DELREF_P(zval_ptr)) {
- _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
+ _zval_dtor_func(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
} else {
GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
}
@@ -105,8 +96,6 @@ static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE
}
}
-ZEND_API int zval_copy_static_var(zval *p, int num_args, va_list args, zend_hash_key *key);
-
ZEND_API size_t zend_print_variable(zval *var);
ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
@@ -117,7 +106,7 @@ ZEND_API void _zval_dtor_wrapper(zval *zvalue);
#define zval_opt_copy_ctor(zvalue) _zval_opt_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
#define zval_copy_ctor_no_imm(zvalue) _zval_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
#define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
-#define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
+#define zval_dtor(zvalue) zval_ptr_dtor_nogc(zvalue)
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
#define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC)
#define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index cc3fff4416..965a59aa75 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,7 +34,7 @@
#include "zend_virtual_cwd.h"
#include "tsrm_strtok_r.h"
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
#include <io.h>
#include "tsrm_win32.h"
# ifndef IO_REPARSE_TAG_SYMLINK
@@ -67,7 +67,7 @@
#include "TSRM.h"
/* Only need mutex for popen() in Windows and NetWare because it doesn't chdir() on UNIX */
-#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
+#if (defined(ZEND_WIN32) || defined(NETWARE)) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
@@ -79,13 +79,13 @@ virtual_cwd_globals cwd_globals;
cwd_state main_cwd_state; /* True global */
-#ifndef TSRM_WIN32
+#ifndef ZEND_WIN32
#include <unistd.h>
#else
#include <direct.h>
#endif
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
#include <tchar.h>
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
#define TOKENIZER_STRING "/\\"
@@ -143,7 +143,7 @@ static int php_check_dots(const char *element, int n)
#define CWD_STATE_FREE(s) \
efree((s)->cwd);
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
# define CWD_STATE_FREE_ERR(state) do { \
DWORD last_error = GetLastError(); \
CWD_STATE_FREE(state); \
@@ -153,7 +153,7 @@ static int php_check_dots(const char *element, int n)
# define CWD_STATE_FREE_ERR(state) CWD_STATE_FREE(state)
#endif
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
#ifdef CTL_CODE
#undef CTL_CODE
@@ -459,6 +459,9 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
}
}
#else
+#ifdef ZEND_WIN32
+ ZeroMemory(&cwd, sizeof(cwd));
+#endif
result = getcwd(cwd, sizeof(cwd));
#endif
if (!result) {
@@ -466,7 +469,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
}
main_cwd_state.cwd_length = (int)strlen(cwd);
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (main_cwd_state.cwd_length >= 2 && cwd[1] == ':') {
cwd[0] = toupper(cwd[0]);
}
@@ -479,7 +482,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
cwd_globals_ctor(&cwd_globals);
#endif
-#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
+#if (defined(ZEND_WIN32) || defined(NETWARE)) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
@@ -490,7 +493,7 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
#ifndef ZTS
cwd_globals_dtor(&cwd_globals);
#endif
-#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
+#if (defined(ZEND_WIN32) || defined(NETWARE)) && defined(ZTS)
tsrm_mutex_free(cwd_mutex);
#endif
@@ -536,7 +539,7 @@ CWD_API char *virtual_getcwd_ex(size_t *length) /* {{{ */
return retval;
}
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
/* If we have something like C: */
if (state->cwd_length == 2 && state->cwd[state->cwd_length-1] == ':') {
char *retval;
@@ -588,18 +591,19 @@ CWD_API char *virtual_getcwd(char *buf, size_t size) /* {{{ */
}
/* }}} */
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
static inline zend_ulong realpath_cache_key(const char *path, int path_len) /* {{{ */
{
register zend_ulong h;
char *bucket_key_start = tsrm_win32_get_path_sid_key(path);
char *bucket_key = (char *)bucket_key_start;
- const char *e = bucket_key + strlen(bucket_key);
+ const char *e;
if (!bucket_key) {
return 0;
}
+ e = bucket_key + strlen(bucket_key);
for (h = Z_UL(2166136261); bucket_key < e;) {
h *= Z_UL(16777619);
h ^= *bucket_key++;
@@ -622,7 +626,7 @@ static inline zend_ulong realpath_cache_key(const char *path, int path_len) /* {
return h;
}
/* }}} */
-#endif /* defined(PHP_WIN32) */
+#endif /* defined(ZEND_WIN32) */
CWD_API void realpath_cache_clean(void) /* {{{ */
{
@@ -643,11 +647,7 @@ CWD_API void realpath_cache_clean(void) /* {{{ */
CWD_API void realpath_cache_del(const char *path, int path_len) /* {{{ */
{
-#ifdef PHP_WIN32
- zend_ulong key = realpath_cache_key(path, path_len);
-#else
zend_ulong key = realpath_cache_key(path, path_len);
-#endif
zend_ulong n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
realpath_cache_bucket **bucket = &CWDG(realpath_cache)[n];
@@ -692,11 +692,7 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
return;
}
-#ifdef PHP_WIN32
- bucket->key = realpath_cache_key(path, path_len);
-#else
bucket->key = realpath_cache_key(path, path_len);
-#endif
bucket->path = (char*)bucket + sizeof(realpath_cache_bucket);
memcpy(bucket->path, path, path_len+1);
bucket->path_len = path_len;
@@ -708,7 +704,7 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
}
bucket->realpath_len = realpath_len;
bucket->is_dir = is_dir;
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
bucket->is_rvalid = 0;
bucket->is_readable = 0;
bucket->is_wvalid = 0;
@@ -725,12 +721,7 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t) /* {{{ */
{
-#ifdef PHP_WIN32
zend_ulong key = realpath_cache_key(path, path_len);
-#else
- zend_ulong key = realpath_cache_key(path, path_len);
-#endif
-
zend_ulong n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
realpath_cache_bucket **bucket = &CWDG(realpath_cache)[n];
@@ -786,7 +777,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
{
int i, j, save;
int directory = 0;
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
WIN32_FIND_DATA data;
HANDLE hFind;
ALLOCA_FLAG(use_heap_large)
@@ -881,7 +872,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
}
}
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (save && (hFind = FindFirstFile(path, &data)) == INVALID_HANDLE_VALUE) {
if (use_realpath == CWD_REALPATH) {
/* file not found */
@@ -924,6 +915,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
pbuffer = (REPARSE_DATA_BUFFER *)do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
if (pbuffer == NULL) {
+ CloseHandle(hLink);
return -1;
}
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
@@ -1146,7 +1138,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
path[j++] = DEFAULT_SLASH;
}
}
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (j < 0 || j + len - i >= MAXPATHLEN-1) {
free_alloca(tmp, use_heap);
return -1;
@@ -1196,7 +1188,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
void *tmp;
if (path_length == 0 || path_length >= MAXPATHLEN-1) {
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
_set_errno(EINVAL);
#else
errno = EINVAL;
@@ -1219,7 +1211,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
} else {
int state_cwd_length = state->cwd_length;
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (IS_SLASH(path[0])) {
if (state->cwd[1] == ':') {
/* Copy only the drive name */
@@ -1258,7 +1250,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
}
} else {
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (path_length > 2 && path[1] == ':' && !IS_SLASH(path[2])) {
resolved_path[0] = path[0];
resolved_path[1] = ':';
@@ -1270,14 +1262,14 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
memcpy(resolved_path, path, path_length + 1);
}
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (memchr(resolved_path, '*', path_length) ||
memchr(resolved_path, '?', path_length)) {
return 1;
}
#endif
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
if (IS_UNC_PATH(resolved_path, path_length)) {
/* skip UNC name */
resolved_path[0] = DEFAULT_SLASH;
@@ -1339,7 +1331,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
resolved_path[path_length] = 0;
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
verify:
#endif
if (verify_path) {
@@ -1529,7 +1521,7 @@ CWD_API int virtual_access(const char *pathname, int mode) /* {{{ */
return -1;
}
-#if defined(TSRM_WIN32)
+#if defined(ZEND_WIN32)
ret = tsrm_win32_access(new_state.cwd, mode);
#else
ret = access(new_state.cwd, mode);
@@ -1553,7 +1545,7 @@ CWD_API int virtual_utime(const char *filename, struct utimbuf *buf) /* {{{ */
return -1;
}
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
ret = win32_utime(new_state.cwd, buf);
#else
ret = utime(new_state.cwd, buf);
@@ -1576,6 +1568,20 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode) /* {{{ */
return -1;
}
+#ifdef ZEND_WIN32
+ {
+ mode_t _tmp = mode;
+
+ mode = 0;
+
+ if (_tmp & _S_IREAD) {
+ mode |= _S_IREAD;
+ }
+ if (_tmp & _S_IWRITE) {
+ mode |= _S_IWRITE;
+ }
+ }
+#endif
ret = chmod(new_state.cwd, mode);
CWD_STATE_FREE_ERR(&new_state);
@@ -1583,7 +1589,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode) /* {{{ */
}
/* }}} */
-#if !defined(TSRM_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link) /* {{{ */
{
cwd_state new_state;
@@ -1680,7 +1686,7 @@ CWD_API int virtual_rename(const char *oldname, const char *newname) /* {{{ */
/* rename on windows will fail if newname already exists.
MoveFileEx has to be used */
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
/* MoveFileEx returns 0 on failure, other way 'round for this function */
retval = (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0) ? -1 : 0;
#else
@@ -1759,7 +1765,7 @@ CWD_API int virtual_mkdir(const char *pathname, mode_t mode) /* {{{ */
return -1;
}
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
retval = mkdir(new_state.cwd);
#else
retval = mkdir(new_state.cwd, mode);
@@ -1787,7 +1793,7 @@ CWD_API int virtual_rmdir(const char *pathname) /* {{{ */
}
/* }}} */
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
DIR *opendir(const char *name);
#endif
@@ -1809,7 +1815,7 @@ CWD_API DIR *virtual_opendir(const char *pathname) /* {{{ */
}
/* }}} */
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
{
return popen_ex(command, type, CWDG(cwd).cwd, NULL);
diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h
index 019888757f..c81369b31e 100644
--- a/Zend/zend_virtual_cwd.h
+++ b/Zend/zend_virtual_cwd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,7 +42,7 @@
#define VIRTUAL_DIR
#endif
-#ifndef TSRM_WIN32
+#ifndef ZEND_WIN32
#include <unistd.h>
#else
#include <direct.h>
@@ -52,7 +52,7 @@
#include <errno.h>
#endif
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
#include "readdir.h"
#include <sys/utime.h>
/* mode_t isn't defined on Windows */
@@ -117,7 +117,7 @@ typedef unsigned short mode_t;
#define CWD_EXPORTS
#endif
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
# ifdef CWD_EXPORTS
# define CWD_API __declspec(dllexport)
# else
@@ -129,7 +129,7 @@ typedef unsigned short mode_t;
# define CWD_API
#endif
-#ifdef TSRM_WIN32
+#ifdef ZEND_WIN32
CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat);
# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0)
# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1)
@@ -172,7 +172,7 @@ CWD_API int virtual_rmdir(const char *pathname);
CWD_API DIR *virtual_opendir(const char *pathname);
CWD_API FILE *virtual_popen(const char *command, const char *type);
CWD_API int virtual_access(const char *pathname, int mode);
-#if defined(TSRM_WIN32)
+#if defined(ZEND_WIN32)
/* these are not defined in win32 headers */
#ifndef W_OK
#define W_OK 0x02
@@ -192,7 +192,7 @@ CWD_API int virtual_access(const char *pathname, int mode);
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode);
-#if !defined(TSRM_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link);
#endif
@@ -219,7 +219,7 @@ typedef struct _realpath_cache_bucket {
int path_len;
int realpath_len;
int is_dir;
-#ifdef PHP_WIN32
+#ifdef ZEND_WIN32
unsigned char is_rvalid;
unsigned char is_readable;
unsigned char is_wvalid;
@@ -280,7 +280,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#define VCWD_UTIME(path, time) virtual_utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode)
-#if !defined(TSRM_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0)
#if HAVE_LCHOWN
#define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1)
@@ -296,7 +296,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#define VCWD_CREAT(path, mode) creat(path, mode)
/* rename on windows will fail if newname already exists.
MoveFileEx has to be used */
-#if defined(TSRM_WIN32)
+#if defined(ZEND_WIN32)
# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0 ? -1 : 0)
#else
# define VCWD_RENAME(oldname, newname) rename(oldname, newname)
@@ -311,7 +311,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#define VCWD_RMDIR(pathname) rmdir(pathname)
#define VCWD_OPENDIR(pathname) opendir(pathname)
#define VCWD_POPEN(command, type) popen(command, type)
-#if defined(TSRM_WIN32)
+#if defined(ZEND_WIN32)
#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode)
#else
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
@@ -320,7 +320,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#define VCWD_REALPATH(path, real_path) tsrm_realpath(path, real_path)
#if HAVE_UTIME
-# ifdef TSRM_WIN32
+# ifdef ZEND_WIN32
# define VCWD_UTIME(path, time) win32_utime(path, time)
# else
# define VCWD_UTIME(path, time) utime(path, time)
@@ -328,7 +328,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#endif
#define VCWD_CHMOD(path, mode) chmod(path, mode)
-#if !defined(TSRM_WIN32) && !defined(NETWARE)
+#if !defined(ZEND_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#if HAVE_LCHOWN
#define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group)
diff --git a/Zend/zend_vm.h b/Zend/zend_vm.h
index 5a5c9fa96e..39cbd8ee9c 100644
--- a/Zend/zend_vm.h
+++ b/Zend/zend_vm.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,6 +25,9 @@ BEGIN_EXTERN_C()
ZEND_API void zend_vm_use_old_executor(void);
ZEND_API void zend_vm_set_opcode_handler(zend_op* opcode);
+ZEND_API void zend_vm_set_opcode_handler_ex(zend_op* opcode, uint32_t op1_info, uint32_t op2_info, uint32_t res_info);
+ZEND_API void zend_serialize_opcode_handler(zend_op *op);
+ZEND_API void zend_deserialize_opcode_handler(zend_op *op);
ZEND_API int zend_vm_call_opcode_handler(zend_execute_data *ex);
END_EXTERN_C()
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index d31bf9b88e..331ebdb85d 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -65,8 +65,7 @@ ZEND_VM_HANDLER(1, ZEND_ADD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
add_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(2, ZEND_SUB, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -109,8 +108,7 @@ ZEND_VM_HANDLER(2, ZEND_SUB, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
sub_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(3, ZEND_MUL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -156,8 +154,7 @@ ZEND_VM_HANDLER(3, ZEND_MUL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
mul_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(4, ZEND_DIV, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -172,8 +169,7 @@ ZEND_VM_HANDLER(4, ZEND_DIV, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
fast_div_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(5, ZEND_MOD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -211,8 +207,7 @@ ZEND_VM_HANDLER(5, ZEND_MOD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
mod_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(6, ZEND_SL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -227,8 +222,7 @@ ZEND_VM_HANDLER(6, ZEND_SL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
shift_left_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(7, ZEND_SR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -243,8 +237,22 @@ ZEND_VM_HANDLER(7, ZEND_SR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
shift_right_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_HANDLER(166, ZEND_POW, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+ FREE_OP1();
+ FREE_OP2();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -282,7 +290,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -304,8 +312,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
FREE_OP1();
} while (0);
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
@@ -321,12 +328,9 @@ ZEND_VM_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
result = fast_is_identical_function(op1, op2);
FREE_OP1();
FREE_OP2();
- ZEND_VM_SMART_BRANCH(result, (OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
@@ -342,12 +346,9 @@ ZEND_VM_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
result = fast_is_not_identical_function(op1, op2);
FREE_OP1();
FREE_OP2();
- ZEND_VM_SMART_BRANCH(result, (OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(17, ZEND_IS_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -388,7 +389,7 @@ ZEND_VM_HANDLER(17, ZEND_IS_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
FREE_OP1();
FREE_OP2();
@@ -415,8 +416,7 @@ ZEND_VM_HANDLER(17, ZEND_IS_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(18, ZEND_IS_NOT_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -457,7 +457,7 @@ ZEND_VM_HANDLER(18, ZEND_IS_NOT_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
FREE_OP1();
FREE_OP2();
@@ -484,8 +484,7 @@ ZEND_VM_HANDLER(18, ZEND_IS_NOT_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(19, ZEND_IS_SMALLER, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -535,8 +534,7 @@ ZEND_VM_HANDLER(19, ZEND_IS_SMALLER, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(20, ZEND_IS_SMALLER_OR_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -586,8 +584,7 @@ ZEND_VM_HANDLER(20, ZEND_IS_SMALLER_OR_EQUAL, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(170, ZEND_SPACESHIP, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -602,8 +599,7 @@ ZEND_VM_HANDLER(170, ZEND_SPACESHIP, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
compare_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(9, ZEND_BW_OR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -618,8 +614,7 @@ ZEND_VM_HANDLER(9, ZEND_BW_OR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(10, ZEND_BW_AND, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -634,8 +629,7 @@ ZEND_VM_HANDLER(10, ZEND_BW_AND, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(11, ZEND_BW_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -650,8 +644,7 @@ ZEND_VM_HANDLER(11, ZEND_BW_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(14, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -666,8 +659,7 @@ ZEND_VM_HANDLER(14, ZEND_BOOL_XOR, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(12, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY)
@@ -679,8 +671,7 @@ ZEND_VM_HANDLER(12, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY)
bitwise_not_function(EX_VAR(opline->result.var),
GET_OP1_ZVAL_PTR(BP_VAR_R));
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(13, ZEND_BOOL_NOT, CONST|TMPVAR|CV, ANY)
@@ -693,22 +684,22 @@ ZEND_VM_HANDLER(13, ZEND_BOOL_NOT, CONST|TMPVAR|CV, ANY)
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_FALSE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_TRUE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), !i_zend_is_true(val));
FREE_OP1();
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, binary_op_type binary_op)
+ZEND_VM_HELPER(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, binary_op_type binary_op)
{
USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
@@ -720,8 +711,8 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|
SAVE_OPLINE();
object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
@@ -729,15 +720,8 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -753,13 +737,18 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -770,85 +759,108 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|
FREE_OP2();
FREE_OP1_VAR_PTR();
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-ZEND_VM_HELPER_EX(zend_binary_assign_op_dim_helper, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, binary_op_type binary_op)
+ZEND_VM_HELPER(zend_binary_assign_op_dim_helper, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV, binary_op_type binary_op)
{
USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
- container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
- dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ if (OP1_TYPE != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ZEND_VM_C_LABEL(assign_dim_op_array):
+ SEPARATE_ARRAY(container);
+ZEND_VM_C_LABEL(assign_dim_op_new_array):
+ if (OP2_TYPE == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ ZEND_VM_C_GOTO(assign_dim_op_ret_null);
+ }
+ } else {
+ dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
- do {
- if (OP1_TYPE == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (OP1_TYPE != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (OP2_TYPE == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (OP1_TYPE == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ ZEND_VM_C_GOTO(assign_dim_op_ret_null);
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, OP2_TYPE);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- FREE_OP2();
- FREE_OP(free_op_data1);
- FREE_OP1_VAR_PTR();
- HANDLE_EXCEPTION();
- }
+ binary_op(var_ptr, var_ptr, value);
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ }
+ } else {
+ if (OP1_TYPE != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ ZEND_VM_C_GOTO(assign_dim_op_array);
+ }
+ } else if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+ZEND_VM_C_LABEL(assign_dim_op_convert_to_array):
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZEND_VM_C_GOTO(assign_dim_op_new_array);
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (OP1_TYPE == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (OP1_TYPE != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (OP2_TYPE == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ ZEND_VM_C_GOTO(assign_dim_op_convert_to_array);
+ } else {
+ if (UNEXPECTED(OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ZEND_VM_C_LABEL(assign_dim_op_ret_null):
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP2();
FREE_OP(free_op_data1);
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|CV, CONST|TMPVAR|CV, binary_op_type binary_op)
+ZEND_VM_HELPER(zend_binary_assign_op_helper, VAR|CV, CONST|TMPVAR|CV, binary_op_type binary_op)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -859,13 +871,7 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|CV, CONST|TMPVAR|CV, binary_
value = GET_OP2_ZVAL_PTR(BP_VAR_R);
var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -882,231 +888,250 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|CV, CONST|TMPVAR|CV, binary_
FREE_OP2();
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
+{
+#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
+ USE_OPLINE
+
+# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
+ if (EXPECTED(opline->extended_value == 0)) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, add_function);
+ }
+# endif
+ if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, add_function);
+ } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, add_function);
+ }
+#else
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, add_function);
+#endif
}
-ZEND_VM_HANDLER(23, ZEND_ASSIGN_ADD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, add_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, sub_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, add_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, sub_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, add_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, sub_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, add_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, sub_function);
#endif
}
-ZEND_VM_HANDLER(24, ZEND_ASSIGN_SUB, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, sub_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, mul_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, sub_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, mul_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, sub_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, mul_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, sub_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, mul_function);
#endif
}
-ZEND_VM_HANDLER(25, ZEND_ASSIGN_MUL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, mul_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, div_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, mul_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, div_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, mul_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, div_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, mul_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, div_function);
#endif
}
-ZEND_VM_HANDLER(26, ZEND_ASSIGN_DIV, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, div_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, mod_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, div_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, mod_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, div_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, mod_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, div_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, mod_function);
#endif
}
-ZEND_VM_HANDLER(27, ZEND_ASSIGN_MOD, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, mod_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, shift_left_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, mod_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, shift_left_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, mod_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, shift_left_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, mod_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, shift_left_function);
#endif
}
-ZEND_VM_HANDLER(28, ZEND_ASSIGN_SL, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, shift_left_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, shift_right_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, shift_left_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, shift_right_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, shift_left_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, shift_right_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, shift_left_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, shift_right_function);
#endif
}
-ZEND_VM_HANDLER(29, ZEND_ASSIGN_SR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, shift_right_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, concat_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, shift_right_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, concat_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, shift_right_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, concat_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, shift_right_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, concat_function);
#endif
}
-ZEND_VM_HANDLER(30, ZEND_ASSIGN_CONCAT, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, concat_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, bitwise_or_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, concat_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, bitwise_or_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, concat_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, bitwise_or_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, concat_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, bitwise_or_function);
#endif
}
-ZEND_VM_HANDLER(31, ZEND_ASSIGN_BW_OR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, bitwise_or_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, bitwise_and_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, bitwise_or_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, bitwise_and_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, bitwise_or_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, bitwise_and_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, bitwise_or_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, bitwise_and_function);
#endif
}
-ZEND_VM_HANDLER(32, ZEND_ASSIGN_BW_AND, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, bitwise_and_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, bitwise_xor_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, bitwise_and_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, bitwise_xor_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, bitwise_and_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, bitwise_xor_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, bitwise_and_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, bitwise_xor_function);
#endif
}
-ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, VAR|UNUSED|THIS|CV, CONST|TMPVAR|UNUSED|NEXT|CV, DIM_OBJ, SPEC(DIM_OBJ))
{
#if !defined(ZEND_VM_SPEC) || (OP2_TYPE != IS_UNUSED)
USE_OPLINE
# if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
if (EXPECTED(opline->extended_value == 0)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op, bitwise_xor_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_helper, binary_op, pow_function);
}
# endif
if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, bitwise_xor_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, pow_function);
} else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, bitwise_xor_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, pow_function);
}
#else
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_dim_helper, binary_op, bitwise_xor_function);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, pow_function);
#endif
}
-ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, int inc)
+ZEND_VM_HELPER(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, int inc)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -1117,20 +1142,14 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|C
SAVE_OPLINE();
object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
do {
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -1144,28 +1163,32 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|C
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -1174,21 +1197,20 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|C
FREE_OP2();
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(132, ZEND_PRE_INC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(132, ZEND_PRE_INC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_pre_incdec_property_helper, inc, 1);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_pre_incdec_property_helper, inc, 1);
}
-ZEND_VM_HANDLER(133, ZEND_PRE_DEC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(133, ZEND_PRE_DEC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_pre_incdec_property_helper, inc, 0);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_pre_incdec_property_helper, inc, 0);
}
-ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, int inc)
+ZEND_VM_HELPER(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, int inc)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -1199,20 +1221,14 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|
SAVE_OPLINE();
object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
do {
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -1227,22 +1243,25 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -1252,21 +1271,20 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|
FREE_OP2();
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(134, ZEND_POST_INC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(134, ZEND_POST_INC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_post_incdec_property_helper, inc, 1);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_post_incdec_property_helper, inc, 1);
}
-ZEND_VM_HANDLER(135, ZEND_POST_DEC_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(135, ZEND_POST_DEC_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_post_incdec_property_helper, inc, 0);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_post_incdec_property_helper, inc, 0);
}
-ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY)
+ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY, SPEC(RETVAL))
{
USE_OPLINE
zend_free_op free_op1;
@@ -1274,12 +1292,6 @@ ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY)
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
fast_long_increment_function(var_ptr);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
@@ -1288,7 +1300,7 @@ ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY)
ZEND_VM_NEXT_OPCODE();
}
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -1309,11 +1321,10 @@ ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY)
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY)
+ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY, SPEC(RETVAL))
{
USE_OPLINE
zend_free_op free_op1;
@@ -1321,12 +1332,6 @@ ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY)
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
fast_long_decrement_function(var_ptr);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
@@ -1335,7 +1340,7 @@ ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY)
ZEND_VM_NEXT_OPCODE();
}
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -1356,8 +1361,7 @@ ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY)
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(36, ZEND_POST_INC, VAR|CV, ANY)
@@ -1368,19 +1372,13 @@ ZEND_VM_HANDLER(36, ZEND_POST_INC, VAR|CV, ANY)
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
fast_long_increment_function(var_ptr);
ZEND_VM_NEXT_OPCODE();
}
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
ZVAL_NULL(EX_VAR(opline->result.var));
ZEND_VM_NEXT_OPCODE();
}
@@ -1396,8 +1394,7 @@ ZEND_VM_HANDLER(36, ZEND_POST_INC, VAR|CV, ANY)
increment_function(var_ptr);
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(37, ZEND_POST_DEC, VAR|CV, ANY)
@@ -1408,19 +1405,13 @@ ZEND_VM_HANDLER(37, ZEND_POST_DEC, VAR|CV, ANY)
var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
fast_long_decrement_function(var_ptr);
ZEND_VM_NEXT_OPCODE();
}
- if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
ZVAL_NULL(EX_VAR(opline->result.var));
ZEND_VM_NEXT_OPCODE();
}
@@ -1436,8 +1427,7 @@ ZEND_VM_HANDLER(37, ZEND_POST_DEC, VAR|CV, ANY)
decrement_function(var_ptr);
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(40, ZEND_ECHO, CONST|TMPVAR|CV, ANY)
@@ -1467,11 +1457,10 @@ ZEND_VM_HANDLER(40, ZEND_ECHO, CONST|TMPVAR|CV, ANY)
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR, int type)
+ZEND_VM_HELPER(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED, int type)
{
USE_OPLINE
zend_free_op free_op1;
@@ -1495,66 +1484,30 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|V
name = zval_get_string(varname);
}
- if (OP2_TYPE != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (OP2_TYPE == IS_CONST) {
- if (OP1_TYPE == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- FREE_OP1();
- HANDLE_EXCEPTION();
- }
-
- ZEND_VM_C_GOTO(fetch_var_return);
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (OP1_TYPE != IS_CONST) {
- zend_string_release(name);
- }
- FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (OP1_TYPE == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- FREE_OP1();
- HANDLE_EXCEPTION();
- }
-
- ZEND_VM_C_GOTO(fetch_var_return);
- }
- }
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
- FREE_OP1();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ retval = zend_hash_find(target_symbol_table, name);
+ if (retval == NULL) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ case BP_VAR_W:
+ retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
}
-
- FREE_OP1();
- } else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
+ /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
+ } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
+ retval = Z_INDIRECT_P(retval);
+ if (Z_TYPE_P(retval) == IS_UNDEF) {
switch (type) {
case BP_VAR_R:
case BP_VAR_UNSET:
@@ -1567,49 +1520,162 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMPVAR|CV, UNUSED|CONST|V
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
/* break missing intentionally */
case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ ZVAL_NULL(retval);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+
+ if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ FREE_OP1();
+ }
+
+ if (OP1_TYPE != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ ZEND_ASSERT(retval != NULL);
+ if (type == BP_VAR_R || type == BP_VAR_IS) {
+ if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
+ ZVAL_UNREF(retval);
+ }
+ ZVAL_COPY(EX_VAR(opline->result.var), retval);
+ } else {
+ ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
+ }
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_HANDLER(80, ZEND_FETCH_R, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
+{
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_R);
+}
+
+ZEND_VM_HANDLER(83, ZEND_FETCH_W, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
+{
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_W);
+}
+
+ZEND_VM_HANDLER(86, ZEND_FETCH_RW, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
+{
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_RW);
+}
+
+ZEND_VM_HANDLER(92, ZEND_FETCH_FUNC_ARG, CONST|TMPVAR|CV, UNUSED, VAR_FETCH|ARG_NUM)
+{
+ USE_OPLINE
+
+ if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_W);
+ } else {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_R);
+ }
+}
+
+ZEND_VM_HANDLER(95, ZEND_FETCH_UNSET, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
+{
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_UNSET);
+}
+
+ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMPVAR|CV, UNUSED, VAR_FETCH)
+{
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_var_address_helper, type, BP_VAR_IS);
+}
+
+ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR, int type)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval *retval;
+ zend_string *name;
+ zend_class_entry *ce;
+
+ SAVE_OPLINE();
+ varname = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+
+ if (OP1_TYPE == IS_CONST) {
+ name = Z_STR_P(varname);
+ } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
+ name = Z_STR_P(varname);
+ zend_string_addref(name);
+ } else {
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ name = zval_get_string(varname);
+ }
+
+ if (OP2_TYPE == IS_CONST) {
+ if (OP1_TYPE == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
+
+ ZEND_VM_C_GOTO(fetch_static_prop_return);
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (OP1_TYPE != IS_CONST) {
+ zend_string_release(name);
}
+ FREE_OP1();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
- FREE_OP1();
- HANDLE_EXCEPTION();
+ } else {
+ if (OP2_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (OP1_TYPE != IS_CONST) {
+ zend_string_release(name);
}
+ FREE_OP1();
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
- FREE_OP1();
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ if (OP1_TYPE == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
+
+ ZEND_VM_C_GOTO(fetch_static_prop_return);
}
}
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (OP1_TYPE != IS_CONST) {
+ zend_string_release(name);
+ }
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
+ if (OP1_TYPE == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
+
+ FREE_OP1();
if (OP1_TYPE != IS_CONST) {
zend_string_release(name);
}
-ZEND_VM_C_LABEL(fetch_var_return):
+ZEND_VM_C_LABEL(fetch_static_prop_return):
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -1619,62 +1685,82 @@ ZEND_VM_C_LABEL(fetch_var_return):
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(80, ZEND_FETCH_R, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(173, ZEND_FETCH_STATIC_PROP_R, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_R);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_R);
}
-ZEND_VM_HANDLER(83, ZEND_FETCH_W, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(174, ZEND_FETCH_STATIC_PROP_W, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_W);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_W);
}
-ZEND_VM_HANDLER(86, ZEND_FETCH_RW, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(175, ZEND_FETCH_STATIC_PROP_RW, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_RW);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_RW);
}
-ZEND_VM_HANDLER(92, ZEND_FETCH_FUNC_ARG, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(177, ZEND_FETCH_STATIC_PROP_FUNC_ARG, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR, NUM)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_W);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_W);
} else {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_R);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_R);
}
}
-ZEND_VM_HANDLER(95, ZEND_FETCH_UNSET, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(178, ZEND_FETCH_STATIC_PROP_UNSET, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_UNSET);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_UNSET);
}
-ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(176, ZEND_FETCH_STATIC_PROP_IS, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_IS);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_static_prop_helper, type, BP_VAR_IS);
}
ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
- container = GET_OP1_ZVAL_PTR(BP_VAR_R);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ if (OP1_TYPE != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ZEND_VM_C_LABEL(fetch_dim_r_array):
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, OP2_TYPE, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ ZEND_VM_C_GOTO(fetch_dim_r_array);
+ } else {
+ ZEND_VM_C_GOTO(fetch_dim_r_slow);
+ }
+ } else {
+ZEND_VM_C_LABEL(fetch_dim_r_slow):
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, OP2_TYPE);
+ }
FREE_OP2();
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -1683,41 +1769,31 @@ ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMPVAR|UNUSED|CV)
SAVE_OPLINE();
container = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE);
FREE_OP2();
if (OP1_TYPE == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *container;
SAVE_OPLINE();
- container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
+ container = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE);
FREE_OP2();
if (OP1_TYPE == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -1727,15 +1803,14 @@ ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
zval *container;
SAVE_OPLINE();
- container = GET_OP1_ZVAL_PTR(BP_VAR_IS);
- zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_IS);
+ zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE);
FREE_OP2();
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, NUM)
{
USE_OPLINE
zval *container;
@@ -1744,19 +1819,14 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUS
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((OP1_TYPE & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
FREE_UNFETCHED_OP2();
FREE_UNFETCHED_OP1();
HANDLE_EXCEPTION();
}
container = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE);
if (OP1_TYPE == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -1764,18 +1834,17 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUS
FREE_OP1_VAR_PTR();
} else {
if (OP2_TYPE == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
FREE_UNFETCHED_OP2();
FREE_UNFETCHED_OP1();
HANDLE_EXCEPTION();
}
- container = GET_OP1_ZVAL_PTR(BP_VAR_R);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE);
FREE_OP2();
FREE_OP1();
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMPVAR|CV)
@@ -1785,24 +1854,18 @@ ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMPVAR|CV)
zval *container;
SAVE_OPLINE();
- container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_UNSET);
+ container = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_UNSET);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE);
+ zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE);
FREE_OP2();
if (OP1_TYPE == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1;
@@ -1813,8 +1876,8 @@ ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|CV)
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
@@ -1872,11 +1935,10 @@ ZEND_VM_C_LABEL(fetch_obj_r_no_object):
FREE_OP2();
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -1887,13 +1949,8 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMPVAR|CV)
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_OP2();
HANDLE_EXCEPTION();
}
@@ -1904,11 +1961,10 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMPVAR|CV)
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -1919,13 +1975,8 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMPVAR|CV)
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_OP2();
HANDLE_EXCEPTION();
}
@@ -1935,11 +1986,10 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMPVAR|CV)
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1;
@@ -1950,8 +2000,8 @@ ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
@@ -2009,11 +2059,10 @@ ZEND_VM_C_LABEL(fetch_obj_is_no_object):
FREE_OP2();
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zval *container;
@@ -2027,36 +2076,30 @@ ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|CV, CONST|TMPV
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_OP2();
HANDLE_EXCEPTION();
}
- if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((OP1_TYPE & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
FREE_OP2();
FREE_OP1_VAR_PTR();
HANDLE_EXCEPTION();
}
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
FREE_OP2();
if (OP1_TYPE == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_FETCH_OBJ_R);
}
}
-ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -2065,112 +2108,198 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMPVAR|CV)
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, OP1_TYPE, property, OP2_TYPE, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
FREE_OP2();
if (OP1_TYPE == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(98, ZEND_FETCH_LIST, CONST|TMPVAR|CV, CONST)
+ZEND_VM_HANDLER(98, ZEND_FETCH_LIST, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
- zend_free_op free_op1;
+ zend_free_op free_op1, free_op2;
zval *container;
SAVE_OPLINE();
container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
-
-ZEND_VM_C_LABEL(try_fetch_list):
- if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
- zval *value = zend_hash_index_find(Z_ARRVAL_P(container), Z_LVAL_P(EX_CONSTANT(opline->op2)));
-
- if (UNEXPECTED(value == NULL)) {
- zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, Z_LVAL_P(EX_CONSTANT(opline->op2)));
- ZVAL_NULL(EX_VAR(opline->result.var));
- } else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
- }
- } else if (OP1_TYPE != IS_CONST &&
- UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
- EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
- zval *result = EX_VAR(opline->result.var);
- zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, EX_CONSTANT(opline->op2), BP_VAR_R, result);
-
- if (retval) {
- if (result != retval) {
- ZVAL_COPY(result, retval);
- }
- } else {
- ZVAL_NULL(result);
- }
- } else if ((OP1_TYPE & (IS_VAR|IS_CV)) && Z_TYPE_P(container) == IS_REFERENCE) {
- container = Z_REFVAL_P(container);
- ZEND_VM_C_GOTO(try_fetch_list);
- } else {
- if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(container, BP_VAR_R);
- }
- ZVAL_NULL(EX_VAR(opline->result.var));
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R));
+ FREE_OP2();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, SPEC(OP_DATA=CONST|TMP|VAR|CV))
{
USE_OPLINE
- zend_free_op free_op1, free_op2;
- zval *object;
- zval *property_name;
+ zend_free_op free_op1, free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_OP2();
- HANDLE_EXCEPTION();
+ if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ FREE_OP_DATA();
+ OBJ_RELEASE(obj);
+ ZEND_VM_C_GOTO(exit_assign_obj);
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ FREE_OP_DATA();
+ ZEND_VM_C_GOTO(exit_assign_obj);
+ }
+ } while (0);
+ }
+
+ if (OP2_TYPE == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+ZEND_VM_C_LABEL(fast_assign_obj):
+ value = zend_assign_to_variable(property, value, OP_DATA_TYPE);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ ZEND_VM_C_GOTO(exit_assign_obj);
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ ZEND_VM_C_GOTO(fast_assign_obj);
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (OP_DATA_TYPE == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (OP_DATA_TYPE != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (OP_DATA_TYPE == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (OP_DATA_TYPE == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ ZEND_VM_C_GOTO(exit_assign_obj);
+ }
+ }
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, OP1_TYPE, property_name, OP2_TYPE, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ FREE_OP_DATA();
+ ZEND_VM_C_GOTO(exit_assign_obj);
+ }
+
+ if (OP_DATA_TYPE == IS_CV || OP_DATA_TYPE == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ FREE_OP_DATA();
+ZEND_VM_C_LABEL(exit_assign_obj):
FREE_OP2();
FREE_OP1_VAR_PTR();
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, SPEC(OP_DATA=CONST|TMP|VAR|CV))
{
USE_OPLINE
zend_free_op free_op1;
zval *object_ptr;
- zend_free_op free_op2, free_op_data1;
+ zend_free_op free_op2, free_op_data;
zval *value;
zval *variable_ptr;
zval *dim;
@@ -2178,40 +2307,31 @@ ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|CV)
SAVE_OPLINE();
object_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
ZEND_VM_C_LABEL(try_assign_dim_array):
+ SEPARATE_ARRAY(object_ptr);
if (OP2_TYPE == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ ZEND_VM_C_GOTO(assign_dim_error);
}
} else {
- dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, OP2_TYPE, BP_VAR_W);
- FREE_OP2();
- }
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ if (OP2_TYPE == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
}
- } else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ ZEND_VM_C_GOTO(assign_dim_error);
}
}
+ value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
+ value = zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -2220,60 +2340,53 @@ ZEND_VM_C_LABEL(try_assign_dim_array):
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
- zend_free_op free_op2;
- zval *property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
- FREE_OP2();
- } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (OP2_TYPE == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- FREE_OP1_VAR_PTR();
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ zend_assign_to_object_dim(object_ptr, dim, value);
- dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
- FREE_OP2();
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ FREE_OP_DATA();
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (OP2_TYPE == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ FREE_UNFETCHED_OP_DATA();
+ FREE_OP1_VAR_PTR();
+ HANDLE_EXCEPTION();
} else {
- zval_ptr_dtor_nogc(object_ptr);
-ZEND_VM_C_LABEL(assign_dim_convert_to_array):
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
- ZEND_VM_C_GOTO(try_assign_dim_array);
+ dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ value = GET_OP_DATA_ZVAL_PTR_DEREF(BP_VAR_R);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ FREE_OP_DATA();
}
} else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- ZEND_VM_C_GOTO(assign_dim_clean);
- }
- ZEND_VM_C_GOTO(assign_dim_convert_to_array);
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ ZEND_VM_C_GOTO(try_assign_dim_array);
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-ZEND_VM_C_LABEL(assign_dim_clean):
+ if (OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- FREE_OP2();
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
+ZEND_VM_C_LABEL(assign_dim_error):
+ FREE_UNFETCHED_OP_DATA();
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
- FREE_OP1_VAR_PTR();
+ if (OP2_TYPE != IS_UNUSED) {
+ FREE_OP2();
+ }
+ FREE_OP1_VAR_PTR();
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-ZEND_VM_HANDLER(38, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV)
+ZEND_VM_HANDLER(38, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV, SPEC(RETVAL))
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -2284,7 +2397,7 @@ ZEND_VM_HANDLER(38, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV)
value = GET_OP2_ZVAL_PTR(BP_VAR_R);
variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
FREE_OP2();
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
@@ -2298,11 +2411,10 @@ ZEND_VM_HANDLER(38, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV)
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
+ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV, SRC)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -2311,57 +2423,50 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
SAVE_OPLINE();
value_ptr = GET_OP2_ZVAL_PTR_PTR(BP_VAR_W);
+ variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP2_TYPE == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- FREE_UNFETCHED_OP1();
+ if (OP1_TYPE == IS_VAR &&
+ UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
+ UNEXPECTED(!Z_ISREF_P(EX_VAR(opline->op1.var))) &&
+ UNEXPECTED(!Z_ISERROR_P(EX_VAR(opline->op1.var)))) {
+
+ zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
+ FREE_OP2_VAR_PTR();
HANDLE_EXCEPTION();
- }
- if (OP2_TYPE == IS_VAR &&
- (value_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
- if (!OP2_FREE) {
- PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+
+ } else if (OP2_TYPE == IS_VAR &&
+ opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ UNEXPECTED(!Z_ISREF_P(value_ptr))) {
zend_error(E_NOTICE, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
FREE_OP2_VAR_PTR();
HANDLE_EXCEPTION();
}
- ZEND_VM_DISPATCH_TO_HANDLER(ZEND_ASSIGN);
- }
- variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(variable_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- FREE_OP2_VAR_PTR();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
- UNEXPECTED(!Z_ISREF_P(variable_ptr))) {
- zend_throw_error(zend_ce_error, "Cannot assign by reference to overloaded object");
- FREE_OP2_VAR_PTR();
- FREE_OP1_VAR_PTR();
- HANDLE_EXCEPTION();
- }
- if ((OP1_TYPE == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) ||
- (OP2_TYPE == IS_VAR && UNEXPECTED(value_ptr == &EG(error_zval)))) {
- variable_ptr = &EG(uninitialized_zval);
+ value_ptr = zend_assign_to_variable(variable_ptr, value_ptr, OP2_TYPE);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value_ptr);
+ }
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+
} else {
- zend_assign_to_variable_reference(variable_ptr, value_ptr);
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
+ if ((OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) ||
+ (OP2_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr)))) {
+ variable_ptr = &EG(uninitialized_zval);
+ } else {
+ zend_assign_to_variable_reference(variable_ptr, value_ptr);
+ }
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
+ }
+
+ FREE_OP2_VAR_PTR();
}
FREE_OP1_VAR_PTR();
- FREE_OP2_VAR_PTR();
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
@@ -2369,38 +2474,67 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
zend_execute_data *old_execute_data;
uint32_t call_info = EX_CALL_INFO();
- if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_FUNCTION) {
- zend_object *object;
+ if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP|ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS|ZEND_CALL_ALLOCATED)) == 0)) {
+ i_free_compiled_variables(execute_data);
+ EG(current_execute_data) = EX(prev_execute_data);
+ if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
+ zend_object *object = Z_OBJ(execute_data->This);
+#if 0
+ if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
+#else
+ if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
+#endif
+ GC_REFCOUNT(object)--;
+ if (GC_REFCOUNT(object) == 1) {
+ zend_object_store_ctor_failed(object);
+ }
+ }
+ OBJ_RELEASE(object);
+ } else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
+ OBJ_RELEASE((zend_object*)execute_data->func->op_array.prototype);
+ }
+ EG(vm_stack_top) = (zval*)execute_data;
+ execute_data = EX(prev_execute_data);
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ const zend_op *old_opline = EX(opline);
+ zend_throw_exception_internal(NULL);
+ if (RETURN_VALUE_USED(old_opline)) {
+ zval_ptr_dtor(EX_VAR(old_opline->result.var));
+ }
+ HANDLE_EXCEPTION_LEAVE();
+ }
+
+ LOAD_NEXT_OPLINE();
+ ZEND_VM_LEAVE();
+ } else if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP)) == 0)) {
i_free_compiled_variables(execute_data);
- if (UNEXPECTED(EX(symbol_table) != NULL)) {
+
+ if (UNEXPECTED(call_info & ZEND_CALL_HAS_SYMBOL_TABLE)) {
zend_clean_and_cache_symbol_table(EX(symbol_table));
}
- zend_vm_stack_free_extra_args_ex(call_info, execute_data);
- old_execute_data = execute_data;
- execute_data = EG(current_execute_data) = EX(prev_execute_data);
- if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
- OBJ_RELEASE((zend_object*)old_execute_data->func->op_array.prototype);
- }
+ EG(current_execute_data) = EX(prev_execute_data);
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- object = Z_OBJ(old_execute_data->This);
+ zend_object *object = Z_OBJ(execute_data->This);
#if 0
if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
- if (!(EX(opline)->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#else
if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
- if (!(call_info & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#endif
- GC_REFCOUNT(object)--;
- }
+ GC_REFCOUNT(object)--;
if (GC_REFCOUNT(object) == 1) {
zend_object_store_ctor_failed(object);
}
}
OBJ_RELEASE(object);
+ } else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
+ OBJ_RELEASE((zend_object*)execute_data->func->op_array.prototype);
}
- EG(scope) = EX(func)->op_array.scope;
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
+ old_execute_data = execute_data;
+ execute_data = EX(prev_execute_data);
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -2412,10 +2546,9 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
HANDLE_EXCEPTION_LEAVE();
}
- LOAD_OPLINE();
- ZEND_VM_INC_OPCODE();
+ LOAD_NEXT_OPLINE();
ZEND_VM_LEAVE();
- } else if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_CODE) {
+ } else if (EXPECTED((call_info & ZEND_CALL_TOP) == 0)) {
zend_detach_symbol_table(execute_data);
destroy_op_array(&EX(func)->op_array);
efree_size(EX(func), sizeof(zend_op_array));
@@ -2429,27 +2562,29 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
HANDLE_EXCEPTION_LEAVE();
}
- LOAD_OPLINE();
- ZEND_VM_INC_OPCODE();
+ LOAD_NEXT_OPLINE();
ZEND_VM_LEAVE();
} else {
- if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_TOP_FUNCTION) {
+ if (EXPECTED((call_info & ZEND_CALL_CODE) == 0)) {
i_free_compiled_variables(execute_data);
- if (UNEXPECTED(EX(symbol_table) != NULL)) {
- zend_clean_and_cache_symbol_table(EX(symbol_table));
+ if (UNEXPECTED(call_info & (ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS))) {
+ if (UNEXPECTED(call_info & ZEND_CALL_HAS_SYMBOL_TABLE)) {
+ zend_clean_and_cache_symbol_table(EX(symbol_table));
+ }
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
}
- zend_vm_stack_free_extra_args_ex(call_info, execute_data);
EG(current_execute_data) = EX(prev_execute_data);
if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
}
+ ZEND_VM_RETURN();
} else /* if (call_kind == ZEND_CALL_TOP_CODE) */ {
zend_array *symbol_table = EX(symbol_table);
zend_detach_symbol_table(execute_data);
old_execute_data = EX(prev_execute_data);
while (old_execute_data) {
- if (old_execute_data->func && ZEND_USER_CODE(old_execute_data->func->op_array.type)) {
+ if (old_execute_data->func && (ZEND_CALL_INFO(old_execute_data) & ZEND_CALL_HAS_SYMBOL_TABLE)) {
if (old_execute_data->symbol_table == symbol_table) {
zend_attach_symbol_table(old_execute_data);
}
@@ -2458,13 +2593,12 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
old_execute_data = old_execute_data->prev_execute_data;
}
EG(current_execute_data) = EX(prev_execute_data);
+ ZEND_VM_RETURN();
}
-
- ZEND_VM_RETURN();
}
}
-ZEND_VM_HANDLER(42, ZEND_JMP, ANY, ANY)
+ZEND_VM_HANDLER(42, ZEND_JMP, JMP_ADDR, ANY)
{
USE_OPLINE
@@ -2472,7 +2606,7 @@ ZEND_VM_HANDLER(42, ZEND_JMP, ANY, ANY)
ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -2484,11 +2618,9 @@ ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, ANY)
ZEND_VM_SET_NEXT_OPCODE(opline + 1);
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (OP1_TYPE == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- }
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
@@ -2509,7 +2641,7 @@ ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, ANY)
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMPVAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -2521,16 +2653,12 @@ ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMPVAR|CV, ANY)
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (OP1_TYPE == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -2547,7 +2675,7 @@ ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMPVAR|CV, ANY)
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMPVAR|CV, JMP_ADDR, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -2584,7 +2712,7 @@ ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMPVAR|CV, ANY)
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMPVAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -2627,7 +2755,7 @@ ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMPVAR|CV, ANY)
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMPVAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -2642,16 +2770,12 @@ ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMPVAR|CV, ANY)
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
- if (OP1_TYPE == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -2671,17 +2795,16 @@ ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMPVAR|CV, ANY)
ZEND_VM_JMP(opline);
}
-ZEND_VM_HANDLER(70, ZEND_FREE, TMPVAR, ANY)
+ZEND_VM_HANDLER(70, ZEND_FREE, TMPVAR, LIVE_RANGE)
{
USE_OPLINE
SAVE_OPLINE();
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(127, ZEND_FE_FREE, TMPVAR, ANY)
+ZEND_VM_HANDLER(127, ZEND_FE_FREE, TMPVAR, LIVE_RANGE)
{
zval *var;
USE_OPLINE
@@ -2692,8 +2815,7 @@ ZEND_VM_HANDLER(127, ZEND_FE_FREE, TMPVAR, ANY)
zend_hash_iterator_del(Z_FE_ITER_P(var));
}
zval_ptr_dtor_nogc(var);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
@@ -2760,11 +2882,10 @@ ZEND_VM_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
} while (0);
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(54, ZEND_ROPE_INIT, UNUSED, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(54, ZEND_ROPE_INIT, UNUSED, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
@@ -2791,13 +2912,13 @@ ZEND_VM_HANDLER(54, ZEND_ROPE_INIT, UNUSED, CONST|TMPVAR|CV)
}
rope[0] = _zval_get_string_func(var);
FREE_OP2();
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(55, ZEND_ROPE_ADD, TMP, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(55, ZEND_ROPE_ADD, TMP, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
@@ -2824,13 +2945,13 @@ ZEND_VM_HANDLER(55, ZEND_ROPE_ADD, TMP, CONST|TMPVAR|CV)
}
rope[opline->extended_value] = _zval_get_string_func(var);
FREE_OP2();
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
@@ -2859,7 +2980,12 @@ ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV)
}
rope[opline->extended_value] = _zval_get_string_func(var);
FREE_OP2();
- CHECK_EXCEPTION();
+ if (UNEXPECTED(EG(exception))) {
+ for (i = 0; i <= opline->extended_value; i++) {
+ zend_string_release(rope[i]);
+ }
+ HANDLE_EXCEPTION();
+ }
}
}
for (i = 0; i <= opline->extended_value; i++) {
@@ -2878,30 +3004,27 @@ ZEND_VM_HANDLER(56, ZEND_ROPE_END, TMP, CONST|TMPVAR|CV)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMPVAR|UNUSED|CV, CLASS_FETCH)
{
USE_OPLINE
SAVE_OPLINE();
- if (EG(exception)) {
- zend_exception_save();
- }
if (OP2_TYPE == IS_UNUSED) {
Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_free_op free_op2;
zval *class_name = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
ZEND_VM_C_LABEL(try_class_name):
if (OP2_TYPE == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
- Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
- } else {
- Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
- CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
+ zend_class_entry *ce = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
+
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
+ CACHE_PTR(Z_CACHE_SLOT_P(class_name), ce);
}
+ Z_CE_P(EX_VAR(opline->result.var)) = ce;
} else if (Z_TYPE_P(class_name) == IS_OBJECT) {
Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
@@ -2912,20 +3035,19 @@ ZEND_VM_C_LABEL(try_class_name):
} else {
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Class name must be a valid object or a string");
+ zend_throw_error(NULL, "Class name must be a valid object or a string");
}
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
-ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zval *function_name;
@@ -2949,14 +3071,13 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
FREE_OP2();
FREE_UNFETCHED_OP1();
HANDLE_EXCEPTION();
@@ -2965,8 +3086,8 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
object = GET_OP1_OBJ_ZVAL_PTR_UNDEF(BP_VAR_R);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_OP2();
HANDLE_EXCEPTION();
}
@@ -2981,12 +3102,13 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
}
}
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ FREE_OP2();
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
FREE_OP2();
FREE_OP1();
HANDLE_EXCEPTION();
@@ -3002,7 +3124,7 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
FREE_OP2();
FREE_OP1();
HANDLE_EXCEPTION();
@@ -3012,7 +3134,7 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((OP2_TYPE == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
FREE_OP2();
FREE_OP1();
@@ -3024,6 +3146,9 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -3043,11 +3168,10 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR
FREE_OP2();
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, CONST|TMPVAR|UNUSED|CONSTRUCTOR|CV, NUM)
{
USE_OPLINE
zval *function_name;
@@ -3060,27 +3184,33 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
if (OP1_TYPE == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (OP1_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ FREE_UNFETCHED_OP2();
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (OP1_TYPE == IS_CONST &&
OP2_TYPE == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (OP1_TYPE != IS_CONST &&
OP2_TYPE == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -3091,15 +3221,22 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
function_name = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (OP2_TYPE != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
+ do {
+ if (OP2_TYPE & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+ FREE_OP2();
HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
- FREE_OP2();
- HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -3110,7 +3247,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
FREE_OP2();
HANDLE_EXCEPTION();
@@ -3124,33 +3261,42 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (OP2_TYPE != IS_CONST) {
FREE_OP2();
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -3163,11 +3309,15 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
}
}
- if (OP1_TYPE != IS_CONST) {
+ if (OP1_TYPE == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -3176,29 +3326,30 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST)
+ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST, NUM)
{
USE_OPLINE
zend_function *fbc;
zval *function_name, *func;
zend_execute_data *call;
- if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- function_name = (zval*)(EX_CONSTANT(opline->op2)+1);
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
+ function_name = (zval*)EX_CONSTANT(opline->op2);
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(function_name));
+ if (UNEXPECTED(fbc == NULL)) {
+ func = zend_hash_find(EG(function_table), Z_STR_P(function_name+1));
+ if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(function_name));
HANDLE_EXCEPTION();
- } else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
}
+ fbc = Z_FUNC_P(func);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
}
call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
fbc, opline->extended_value, NULL, NULL);
@@ -3208,214 +3359,50 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(128, ZEND_INIT_DYNAMIC_CALL, ANY, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(128, ZEND_INIT_DYNAMIC_CALL, ANY, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
- zend_function *fbc;
- zval *function_name, *func;
- zend_string *lcname;
zend_free_op free_op2;
- zend_class_entry *called_scope;
- zend_object *object;
+ zval *function_name;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
SAVE_OPLINE();
function_name = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
ZEND_VM_C_LABEL(try_function_name):
if (OP2_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
- const char *colon;
-
- if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
- colon > Z_STRVAL_P(function_name) &&
- *(colon-1) == ':'
- ) {
- zend_string *mname;
- size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
- size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
-
- lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
-
- object = NULL;
- called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- zend_string_release(lcname);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, mname);
- } else {
- fbc = zend_std_get_static_method(called_scope, mname, NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), ZSTR_VAL(mname));
- }
- zend_string_release(lcname);
- zend_string_release(mname);
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
- zend_string_release(lcname);
- zend_string_release(mname);
-
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
- }
- } else {
- if (Z_STRVAL_P(function_name)[0] == '\\') {
- lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
- zend_str_tolower_copy(ZSTR_VAL(lcname), Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
- } else {
- lcname = zend_string_tolower(Z_STR_P(function_name));
- }
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(function_name));
- zend_string_release(lcname);
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
- zend_string_release(lcname);
-
- fbc = Z_FUNC_P(func);
- called_scope = NULL;
- object = NULL;
- }
- FREE_OP2();
- } else if (OP2_TYPE != IS_CONST &&
- EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
- Z_OBJ_HANDLER_P(function_name, get_closure) &&
- Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
- if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
- /* Delay closure destruction until its invocation */
- ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(fbc->common.prototype)++;
- call_info |= ZEND_CALL_CLOSURE;
- }
- FREE_OP2();
- } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
- zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
- zval *obj;
- zval *method;
- obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
- method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
-
- if (!obj || !method) {
- zend_throw_error(zend_ce_error, "Array callback has to contain indices 0 and 1");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(obj);
- if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
- zend_throw_error(zend_ce_error, "First array member is not a valid class name or object");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(method);
- if (Z_TYPE_P(method) != IS_STRING) {
- zend_throw_error(zend_ce_error, "Second array member is not a valid method");
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
- if (Z_TYPE_P(obj) == IS_STRING) {
- object = NULL;
- called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
- } else {
- fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), Z_STRVAL_P(method));
- }
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
- }
- } else {
- called_scope = Z_OBJCE_P(obj);
- object = Z_OBJ_P(obj);
-
- fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(object->ce->name), Z_STRVAL_P(method));
- }
- FREE_OP2();
- HANDLE_EXCEPTION();
- }
-
- if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
- object = NULL;
- } else {
- call_info |= ZEND_CALL_RELEASE_THIS;
- GC_REFCOUNT(object)++; /* For $this pointer */
- }
- }
- FREE_OP2();
- } else if ((OP2_TYPE & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
+ call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value);
+ } else if (OP2_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) {
+ call = zend_init_dynamic_call_object(function_name, opline->extended_value);
+ } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) {
+ call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value);
+ } else if ((OP2_TYPE & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) {
function_name = Z_REFVAL_P(function_name);
ZEND_VM_C_GOTO(try_function_name);
} else {
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
- FREE_OP2();
+ zend_throw_error(NULL, "Function name must be a string");
+ call = NULL;
+ }
+
+ FREE_OP2();
+
+ if (UNEXPECTED(!call)) {
HANDLE_EXCEPTION();
}
- call = zend_vm_stack_push_call_frame(call_info,
- fbc, opline->extended_value, called_scope, object);
+
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op2;
@@ -3426,24 +3413,23 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV)
zend_class_entry *called_scope;
zend_object *object;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
+ uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
SAVE_OPLINE();
function_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
func = fcc.function_handler;
+ called_scope = fcc.called_scope;
+ object = fcc.object;
if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
/* Delay closure destruction until its invocation */
if (OP2_TYPE & (IS_VAR|IS_CV)) {
ZVAL_DEREF(function_name);
}
- ZEND_ASSERT(GC_TYPE(func->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(func->common.prototype)++;
+ ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)func->common.prototype)++;
call_info |= ZEND_CALL_CLOSURE;
- }
- called_scope = fcc.called_scope;
- object = fcc.object;
- if (object) {
+ } else if (object) {
call_info |= ZEND_CALL_RELEASE_THIS;
GC_REFCOUNT(object)++; /* For $this pointer */
}
@@ -3453,6 +3439,12 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV)
zend_error(E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ if (EXPECTED(func->type == ZEND_USER_FUNCTION) && UNEXPECTED(!func->op_array.run_time_cache)) {
+ init_func_run_time_cache(&func->op_array);
}
} else {
zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);
@@ -3468,11 +3460,10 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV)
EX(call) = call;
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
+ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST, NUM)
{
USE_OPLINE
zval *func_name;
@@ -3481,21 +3472,23 @@ ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
zend_execute_data *call;
func_name = EX_CONSTANT(opline->op2) + 1;
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL) {
- func_name++;
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
- } else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(fbc == NULL)) {
+ func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ if (func == NULL) {
+ func_name++;
+ func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ if (UNEXPECTED(func == NULL)) {
+ SAVE_OPLINE();
+ zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
}
- } else {
fbc = Z_FUNC_P(func);
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
@@ -3506,7 +3499,7 @@ ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
+ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, NUM, CONST, NUM)
{
USE_OPLINE
zend_free_op free_op2;
@@ -3515,15 +3508,19 @@ ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
zend_function *fbc;
zend_execute_data *call;
- if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
- } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(fname))) == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(fname));
- HANDLE_EXCEPTION();
- } else {
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
+ if (UNEXPECTED(fbc == NULL)) {
+ func = zend_hash_find(EG(function_table), Z_STR_P(fname));
+ if (UNEXPECTED(func == NULL)) {
+ SAVE_OPLINE();
+ zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(fname));
+ HANDLE_EXCEPTION();
+ }
fbc = Z_FUNC_P(func);
CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call = zend_vm_stack_push_call_frame_ex(
@@ -3535,12 +3532,13 @@ ZEND_VM_HANDLER(61, ZEND_INIT_FCALL, ANY, CONST)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY)
+ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY, SPEC(RETVAL))
{
USE_OPLINE
zend_execute_data *call = EX(call);
zend_function *fbc = call->func;
zval *ret;
+ zval retval;
SAVE_OPLINE();
EX(call) = call->prev_execute_data;
@@ -3548,17 +3546,17 @@ ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY)
call->prev_execute_data = execute_data;
EG(current_execute_data) = call;
- ret = EX_VAR(opline->result.var);
+ ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval;
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
fbc->internal_function.handler(call, ret);
#if ZEND_DEBUG
ZEND_ASSERT(
- !call->func ||
+ EG(exception) || !call->func ||
!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT(!Z_ISREF_P(ret));
#endif
EG(current_execute_data) = call->prev_execute_data;
@@ -3566,7 +3564,7 @@ ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY)
zend_vm_stack_free_call_frame(call);
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ zval_ptr_dtor(ret);
}
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -3577,11 +3575,11 @@ ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY)
HANDLE_EXCEPTION();
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(130, ZEND_DO_UCALL, ANY, ANY)
+ZEND_VM_HANDLER(130, ZEND_DO_UCALL, ANY, ANY, SPEC(RETVAL))
{
USE_OPLINE
zend_execute_data *call = EX(call);
@@ -3591,13 +3589,10 @@ ZEND_VM_HANDLER(130, ZEND_DO_UCALL, ANY, ANY)
SAVE_OPLINE();
EX(call) = call->prev_execute_data;
- EG(scope) = NULL;
ret = NULL;
- call->symbol_table = NULL;
if (RETURN_VALUE_USED(opline)) {
ret = EX_VAR(opline->result.var);
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
}
call->prev_execute_data = execute_data;
@@ -3606,7 +3601,7 @@ ZEND_VM_HANDLER(130, ZEND_DO_UCALL, ANY, ANY)
ZEND_VM_ENTER();
}
-ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
+ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL))
{
USE_OPLINE
zend_execute_data *call = EX(call);
@@ -3617,33 +3612,18 @@ ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
EX(call) = call->prev_execute_data;
if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
- EG(scope) = NULL;
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ret = EX_VAR(opline->result.var);
- zend_generator_create_zval(call, &fbc->op_array, ret);
- Z_VAR_FLAGS_P(ret) = 0;
- } else {
- zend_vm_stack_free_args(call);
- }
-
- zend_vm_stack_free_call_frame(call);
- } else {
- ret = NULL;
- call->symbol_table = NULL;
- if (RETURN_VALUE_USED(opline)) {
- ret = EX_VAR(opline->result.var);
- ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
- }
+ ret = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ }
- call->prev_execute_data = execute_data;
- i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
- ZEND_VM_ENTER();
- }
- EG(scope) = EX(func)->op_array.scope;
+ ZEND_VM_ENTER();
} else {
+ zval retval;
ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
@@ -3659,35 +3639,25 @@ ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
call->prev_execute_data = execute_data;
EG(current_execute_data) = call;
- if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
- uint32_t i;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- zval *p = ZEND_CALL_ARG(call, 1);
-
- for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
- p++;
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- zend_vm_stack_free_call_frame(call);
- zend_throw_exception_internal(NULL);
- HANDLE_EXCEPTION();
- }
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ zend_vm_stack_free_call_frame(call);
+ zend_throw_exception_internal(NULL);
+ HANDLE_EXCEPTION();
}
- ret = EX_VAR(opline->result.var);
+ ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval;
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
fbc->internal_function.handler(call, ret);
#if ZEND_DEBUG
- ZEND_ASSERT(
- !call->func ||
- !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ if (!EG(exception) && call->func) {
+ ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ ? Z_ISREF_P(ret) : !Z_ISREF_P(ret));
+ }
#endif
EG(current_execute_data) = call->prev_execute_data;
@@ -3695,7 +3665,7 @@ ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
zend_vm_stack_free_call_frame(call);
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ zval_ptr_dtor(ret);
}
}
@@ -3706,11 +3676,11 @@ ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
}
HANDLE_EXCEPTION();
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
+ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL))
{
USE_OPLINE
zend_execute_data *call = EX(call);
@@ -3722,7 +3692,7 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
EX(call) = call->prev_execute_data;
if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
- zend_throw_error(zend_ce_error, "Cannot call abstract method %s::%s()", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
HANDLE_EXCEPTION();
}
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
@@ -3739,74 +3709,37 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
LOAD_OPLINE();
if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
- EG(scope) = fbc->common.scope;
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ret = EX_VAR(opline->result.var);
- zend_generator_create_zval(call, &fbc->op_array, ret);
- Z_VAR_FLAGS_P(ret) = 0;
- } else {
- if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_CLOSURE)) {
- OBJ_RELEASE((zend_object*)fbc->op_array.prototype);
- }
- zend_vm_stack_free_args(call);
- }
- } else {
- ret = NULL;
- call->symbol_table = NULL;
- if (RETURN_VALUE_USED(opline)) {
- ret = EX_VAR(opline->result.var);
- ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
- }
+ ret = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ }
- call->prev_execute_data = execute_data;
- i_init_func_execute_data(call, &fbc->op_array, ret, 1);
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 1);
- if (EXPECTED(zend_execute_ex == execute_ex)) {
- ZEND_VM_ENTER();
- } else {
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
- zend_execute_ex(call);
- }
+ if (EXPECTED(zend_execute_ex == execute_ex)) {
+ ZEND_VM_ENTER();
+ } else {
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
+ zend_execute_ex(call);
}
} else if (EXPECTED(fbc->type < ZEND_USER_FUNCTION)) {
- int should_change_scope = 0;
-
- if (fbc->common.scope) {
- should_change_scope = 1;
- EG(scope) = fbc->common.scope;
- }
+ zval retval;
call->prev_execute_data = execute_data;
EG(current_execute_data) = call;
- if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
- uint32_t i;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- zval *p = ZEND_CALL_ARG(call, 1);
-
- for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- if (RETURN_VALUE_USED(opline)) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
- if (UNEXPECTED(should_change_scope)) {
- ZEND_VM_C_GOTO(fcall_end_change_scope);
- } else {
- ZEND_VM_C_GOTO(fcall_end);
- }
- }
- p++;
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
}
+ ZEND_VM_C_GOTO(fcall_end);
}
- ret = EX_VAR(opline->result.var);
+ ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval;
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
@@ -3816,87 +3749,53 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY)
}
#if ZEND_DEBUG
- ZEND_ASSERT(
- !call->func ||
- !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ if (!EG(exception) && call->func) {
+ ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ ? Z_ISREF_P(ret) : !Z_ISREF_P(ret));
+ }
#endif
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ zval_ptr_dtor(ret);
}
- if (UNEXPECTED(should_change_scope)) {
- ZEND_VM_C_GOTO(fcall_end_change_scope);
- } else {
- ZEND_VM_C_GOTO(fcall_end);
- }
} else { /* ZEND_OVERLOADED_FUNCTION */
- EG(scope) = fbc->common.scope;
-
- ZVAL_NULL(EX_VAR(opline->result.var));
+ zval retval;
- /* Not sure what should be done here if it's a static method */
- object = Z_OBJ(call->This);
- if (EXPECTED(object != NULL)) {
- call->prev_execute_data = execute_data;
- EG(current_execute_data) = call;
- object->handlers->call_method(fbc->common.function_name, object, call, EX_VAR(opline->result.var));
- EG(current_execute_data) = call->prev_execute_data;
- } else {
- zend_throw_error(zend_ce_error, "Cannot call overloaded function for non-object");
-#if 0
- //TODO: implement clean exit ???
- zend_vm_stack_free_args(call);
+ ret = RETURN_VALUE_USED(opline) ? EX_VAR(opline->result.var) : &retval;
- zend_vm_stack_free_call_frame(call);
+ call->prev_execute_data = execute_data;
- if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- zend_string_release(fbc->common.function_name);
- }
- efree(fbc);
-#endif
+ if (UNEXPECTED(!zend_do_fcall_overloaded(fbc, call, ret))) {
HANDLE_EXCEPTION();
}
- zend_vm_stack_free_args(call);
-
- if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- zend_string_release(fbc->common.function_name);
- }
- efree(fbc);
-
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
- } else {
- Z_VAR_FLAGS_P(EX_VAR(opline->result.var)) = 0;
+ zval_ptr_dtor(ret);
}
}
-ZEND_VM_C_LABEL(fcall_end_change_scope):
+ZEND_VM_C_LABEL(fcall_end):
if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
object = Z_OBJ(call->This);
#if 0
if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
- if (!(opline->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#else
if (UNEXPECTED(EG(exception) != NULL) && (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR)) {
- if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#endif
- GC_REFCOUNT(object)--;
- }
+ GC_REFCOUNT(object)--;
if (GC_REFCOUNT(object) == 1) {
zend_object_store_ctor_failed(object);
}
}
OBJ_RELEASE(object);
}
- EG(scope) = EX(func)->op_array.scope;
-ZEND_VM_C_LABEL(fcall_end):
zend_vm_stack_free_call_frame(call);
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
@@ -3906,8 +3805,8 @@ ZEND_VM_C_LABEL(fcall_end):
HANDLE_EXCEPTION();
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
ZEND_VM_HANDLER(124, ZEND_VERIFY_RETURN_TYPE, CONST|TMP|VAR|UNUSED|CV, UNUSED)
@@ -3929,7 +3828,12 @@ ZEND_VM_HANDLER(124, ZEND_VERIFY_RETURN_TYPE, CONST|TMP|VAR|UNUSED|CV, UNUSED)
if (OP1_TYPE == IS_CONST) {
ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
retval_ref = retval_ptr = EX_VAR(opline->result.var);
- } else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) {
+ } else if (OP1_TYPE == IS_VAR) {
+ if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
+ retval_ptr = Z_INDIRECT_P(retval_ptr);
+ }
+ ZVAL_DEREF(retval_ptr);
+ } else if (OP1_TYPE == IS_CV) {
ZVAL_DEREF(retval_ptr);
}
@@ -3951,65 +3855,81 @@ ZEND_VM_HANDLER(124, ZEND_VERIFY_RETURN_TYPE, CONST|TMP|VAR|UNUSED|CV, UNUSED)
zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
- FREE_OP1();
+ if (OP1_TYPE == IS_CONST) {
+ zval_ptr_dtor_nogc(retval_ptr);
+ }
}
#endif
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
{
USE_OPLINE
zval *retval_ptr;
+ zval *return_value;
zend_free_op free_op1;
retval_ptr = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ return_value = EX(return_value);
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(retval_ptr) == IS_UNDEF)) {
SAVE_OPLINE();
retval_ptr = GET_OP1_UNDEF_CV(retval_ptr, BP_VAR_R);
- if (EX(return_value)) {
- ZVAL_NULL(EX(return_value));
+ if (return_value) {
+ ZVAL_NULL(return_value);
}
- } else if (!EX(return_value)) {
- if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_TMP_VAR ) {
+ } else if (!return_value) {
+ if (OP1_TYPE & (IS_VAR|IS_TMP_VAR)) {
if (Z_REFCOUNTED_P(free_op1) && !Z_DELREF_P(free_op1)) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(free_op1));
+ zval_dtor_func(Z_COUNTED_P(free_op1));
}
}
} else {
- if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ if ((OP1_TYPE & (IS_CONST|IS_TMP_VAR))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
- zval_copy_ctor_func(EX(return_value));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(return_value))) {
+ Z_ADDREF_P(return_value);
}
}
} else if (OP1_TYPE == IS_CV) {
- ZVAL_DEREF(retval_ptr);
- ZVAL_COPY(EX(return_value), retval_ptr);
+ if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
+ if (EXPECTED(!Z_OPT_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ if (EXPECTED(!(EX_CALL_INFO() & ZEND_CALL_CODE))) {
+ ZVAL_NULL(retval_ptr);
+ } else {
+ Z_ADDREF_P(return_value);
+ }
+ } else {
+ retval_ptr = Z_REFVAL_P(retval_ptr);
+ ZVAL_COPY(return_value, retval_ptr);
+ }
+ } else {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ }
} else /* if (OP1_TYPE == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(retval_ptr))) {
zend_refcounted *ref = Z_COUNTED_P(retval_ptr);
retval_ptr = Z_REFVAL_P(retval_ptr);
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
efree_size(ref, sizeof(zend_reference));
} else if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
Z_ADDREF_P(retval_ptr);
}
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
}
}
}
ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
}
-ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY, SRC)
{
USE_OPLINE
zval *retval_ptr;
@@ -4018,21 +3938,23 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
do {
- if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR ||
+ if ((OP1_TYPE & (IS_CONST|IS_TMP_VAR)) ||
(OP1_TYPE == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
if (!EX(return_value)) {
- if (OP1_TYPE == IS_TMP_VAR) {
- FREE_OP1();
- }
+ FREE_OP1();
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (OP1_TYPE != IS_TMP_VAR) {
- zval_opt_copy_ctor_no_imm(EX(return_value));
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ break;
+ }
+
+ ZVAL_NEW_REF(EX(return_value), retval_ptr);
+ if (OP1_TYPE == IS_CONST) {
+ if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
}
}
break;
@@ -4040,20 +3962,14 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
retval_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot return string offsets by reference");
- HANDLE_EXCEPTION();
- }
-
if (OP1_TYPE == IS_VAR) {
if (retval_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
+ (opline->extended_value == ZEND_RETURNS_FUNCTION && !Z_ISREF_P(retval_ptr))) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
if (EX(return_value)) {
ZVAL_NEW_REF(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
+ } else {
+ FREE_OP1_VAR_PTR();
}
break;
}
@@ -4063,14 +3979,82 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
ZVAL_MAKE_REF(retval_ptr);
Z_ADDREF_P(retval_ptr);
ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
}
+
+ FREE_OP1_VAR_PTR();
} while (0);
- FREE_OP1_VAR_PTR();
ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
}
+ZEND_VM_HANDLER(41, ZEND_GENERATOR_CREATE, ANY, ANY)
+{
+ zval *return_value = EX(return_value);
+
+ if (EXPECTED(return_value)) {
+ USE_OPLINE
+ zend_generator *generator;
+ zend_execute_data *gen_execute_data;
+ uint32_t num_args, used_stack, call_info;
+
+ object_init_ex(return_value, zend_ce_generator);
+
+ /*
+ * Normally the execute_data is allocated on the VM stack (because it does
+ * not actually do any allocation and thus is faster). For generators
+ * though this behavior would be suboptimal, because the (rather large)
+ * structure would have to be copied back and forth every time execution is
+ * suspended or resumed. That's why for generators the execution context
+ * is allocated on heap.
+ */
+ num_args = EX_NUM_ARGS();
+ used_stack = (ZEND_CALL_FRAME_SLOT + num_args + EX(func)->op_array.last_var + EX(func)->op_array.T - MIN(EX(func)->op_array.num_args, num_args)) * sizeof(zval);
+ gen_execute_data = (zend_execute_data*)emalloc(used_stack);
+ memcpy(gen_execute_data, execute_data, used_stack);
+
+ /* Save execution context in generator object. */
+ generator = (zend_generator *) Z_OBJ_P(EX(return_value));
+ generator->execute_data = gen_execute_data;
+ generator->frozen_call_stack = NULL;
+ generator->execute_fake.opline = NULL;
+ generator->execute_fake.func = NULL;
+ generator->execute_fake.prev_execute_data = NULL;
+ ZVAL_OBJ(&generator->execute_fake.This, (zend_object *) generator);
+
+ gen_execute_data->opline = opline + 1;
+ /* EX(return_value) keeps pointer to zend_object (not a real zval) */
+ gen_execute_data->return_value = (zval*)generator;
+ call_info = Z_TYPE_INFO(EX(This));
+ if ((call_info & Z_TYPE_MASK) == IS_OBJECT
+ && !(call_info & ((ZEND_CALL_CLOSURE|ZEND_CALL_RELEASE_THIS) << ZEND_CALL_INFO_SHIFT))) {
+ ZEND_ADD_CALL_FLAG_EX(call_info, ZEND_CALL_RELEASE_THIS);
+ Z_ADDREF(gen_execute_data->This);
+ }
+ ZEND_ADD_CALL_FLAG_EX(call_info, (ZEND_CALL_TOP_FUNCTION | ZEND_CALL_ALLOCATED | ZEND_CALL_GENERATOR));
+ Z_TYPE_INFO(gen_execute_data->This) = call_info;
+ gen_execute_data->prev_execute_data = NULL;
+
+ call_info = EX_CALL_INFO();
+ EG(current_execute_data) = EX(prev_execute_data);
+ if (EXPECTED(!(call_info & (ZEND_CALL_TOP|ZEND_CALL_ALLOCATED)))) {
+ EG(vm_stack_top) = (zval*)execute_data;
+ execute_data = EX(prev_execute_data);
+ LOAD_NEXT_OPLINE();
+ ZEND_VM_LEAVE();
+ } else if (EXPECTED(!(call_info & ZEND_CALL_TOP))) {
+ zend_execute_data *old_execute_data = execute_data;
+ execute_data = EX(prev_execute_data);
+ zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
+ LOAD_NEXT_OPLINE();
+ ZEND_VM_LEAVE();
+ } else {
+ ZEND_VM_RETURN();
+ }
+ } else {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ }
+}
+
ZEND_VM_HANDLER(161, ZEND_GENERATOR_RETURN, CONST|TMP|VAR|CV, ANY)
{
USE_OPLINE
@@ -4083,11 +4067,11 @@ ZEND_VM_HANDLER(161, ZEND_GENERATOR_RETURN, CONST|TMP|VAR|CV, ANY)
retval = GET_OP1_ZVAL_PTR(BP_VAR_R);
/* Copy return value into generator->retval */
- if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
+ if ((OP1_TYPE & (IS_CONST|IS_TMP_VAR))) {
ZVAL_COPY_VALUE(&generator->retval, retval);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->retval))) {
- zval_copy_ctor_func(&generator->retval);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->retval))) {
+ Z_ADDREF(generator->retval);
}
}
} else if (OP1_TYPE == IS_CV) {
@@ -4135,11 +4119,11 @@ ZEND_VM_HANDLER(108, ZEND_THROW, CONST|TMP|VAR|CV, ANY)
}
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Can only throw objects");
+ zend_throw_error(NULL, "Can only throw objects");
FREE_OP1();
HANDLE_EXCEPTION();
}
@@ -4156,7 +4140,7 @@ ZEND_VM_HANDLER(108, ZEND_THROW, CONST|TMP|VAR|CV, ANY)
HANDLE_EXCEPTION();
}
-ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
+ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV, JMP_ADDR)
{
USE_OPLINE
zend_class_entry *ce, *catch_ce;
@@ -4166,12 +4150,11 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
/* Check whether an exception has been thrown, if not, jump over code */
zend_exception_restore();
if (EG(exception) == NULL) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(catch_ce == NULL)) {
catch_ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), catch_ce);
@@ -4190,8 +4173,8 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
}
@@ -4207,7 +4190,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
}
}
-ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP, ANY)
+ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMPVAR, NUM)
{
USE_OPLINE
zval *value, *arg;
@@ -4217,27 +4200,28 @@ ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP, ANY)
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, value);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
- zval_copy_ctor_func(arg);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
}
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(116, ZEND_SEND_VAL_EX, CONST|TMP, ANY)
+ZEND_VM_HANDLER(116, ZEND_SEND_VAL_EX, CONST|TMP, NUM, SPEC(QUICK_ARG))
{
USE_OPLINE
zval *value, *arg;
zend_free_op free_op1;
+ uint32_t arg_num = opline->op2.num;
- if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
- if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ if (EXPECTED(arg_num <= MAX_ARG_FLAG_NUM)) {
+ if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
ZEND_VM_C_GOTO(send_val_by_ref);
}
- } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
ZEND_VM_C_LABEL(send_val_by_ref):
SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot pass parameter %d by reference", opline->op2.num);
+ zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num);
FREE_UNFETCHED_OP1();
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_UNDEF(arg);
@@ -4247,14 +4231,14 @@ ZEND_VM_C_LABEL(send_val_by_ref):
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, value);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
- zval_copy_ctor_func(arg);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
}
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, ANY)
+ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, NUM)
{
USE_OPLINE
zval *varptr, *arg;
@@ -4263,13 +4247,16 @@ ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, ANY)
varptr = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (OP1_TYPE == IS_CV) {
- ZVAL_DEREF(varptr);
+ ZVAL_OPT_DEREF(varptr);
ZVAL_COPY(arg, varptr);
} else /* if (OP1_TYPE == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(varptr))) {
@@ -4290,49 +4277,66 @@ ZEND_VM_HANDLER(117, ZEND_SEND_VAR, VAR|CV, ANY)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY)
+ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR, NUM)
{
USE_OPLINE
zend_free_op free_op1;
zval *varptr, *arg;
- if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND)) {
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ varptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
+
+ if (EXPECTED(Z_ISREF_P(varptr))) {
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Only variables should be passed by reference");
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_HANDLER(50, ZEND_SEND_VAR_NO_REF_EX, VAR, NUM, SPEC(QUICK_ARG))
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varptr, *arg;
+ uint32_t arg_num = opline->op2.num;
+
+ if (EXPECTED(arg_num <= MAX_ARG_FLAG_NUM)) {
+ if (!QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_SEND_VAR);
}
- }
- varptr = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
- if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
- SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- (Z_VAR_FLAGS_P(varptr) & IS_VAR_RET_REF)) &&
- (Z_ISREF_P(varptr) || Z_TYPE_P(varptr) == IS_OBJECT)) {
+ varptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
- ZVAL_MAKE_REF(varptr);
- if (OP1_TYPE == IS_CV) {
- Z_ADDREF_P(varptr);
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ QUICK_ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) {
+ ZEND_VM_NEXT_OPCODE();
}
} else {
- if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
- !(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- SAVE_OPLINE();
- zend_error(E_NOTICE, "Only variables should be passed by reference");
- CHECK_EXCEPTION();
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ ZEND_VM_DISPATCH_TO_HANDLER(ZEND_SEND_VAR);
}
- }
- arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- ZVAL_COPY_VALUE(arg, varptr);
+ varptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
- ZEND_VM_NEXT_OPCODE();
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ }
+
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Only variables should be passed by reference");
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
+ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, NUM)
{
USE_OPLINE
zend_free_op free_op1;
@@ -4341,23 +4345,16 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
SAVE_OPLINE();
varptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(varptr == NULL)) {
- zend_throw_error(zend_ce_error, "Only variables can be passed by reference");
- HANDLE_EXCEPTION();
- }
-
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(varptr == &EG(error_zval))) {
- ZVAL_NEW_REF(arg, &EG(uninitialized_zval));
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
+ ZVAL_NEW_EMPTY_REF(arg);
+ ZVAL_NULL(Z_REFVAL_P(arg));
ZEND_VM_NEXT_OPCODE();
}
if (Z_ISREF_P(varptr)) {
Z_ADDREF_P(varptr);
ZVAL_COPY_VALUE(arg, varptr);
- } else if (OP1_TYPE == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
- ZVAL_NEW_REF(arg, varptr);
} else {
ZVAL_NEW_REF(arg, varptr);
Z_ADDREF_P(arg);
@@ -4368,17 +4365,18 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(66, ZEND_SEND_VAR_EX, VAR|CV, ANY)
+ZEND_VM_HANDLER(66, ZEND_SEND_VAR_EX, VAR|CV, NUM, SPEC(QUICK_ARG))
{
USE_OPLINE
zval *varptr, *arg;
zend_free_op free_op1;
+ uint32_t arg_num = opline->op2.num;
- if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
- if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ if (EXPECTED(arg_num <= MAX_ARG_FLAG_NUM)) {
+ if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
ZEND_VM_C_GOTO(send_var_by_ref);
}
- } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
ZEND_VM_C_LABEL(send_var_by_ref):
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_SEND_REF);
}
@@ -4386,13 +4384,16 @@ ZEND_VM_C_LABEL(send_var_by_ref):
varptr = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (OP1_TYPE == IS_CV) {
- ZVAL_DEREF(varptr);
+ ZVAL_OPT_DEREF(varptr);
ZVAL_COPY(arg, varptr);
} else /* if (OP1_TYPE == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(varptr))) {
@@ -4432,7 +4433,7 @@ ZEND_VM_C_LABEL(send_again):
zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
- if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
+ if ((OP1_TYPE & (IS_VAR|IS_CV)) && Z_REFCOUNT_P(args) > 1) {
uint32_t i;
int separate = 0;
@@ -4444,21 +4445,21 @@ ZEND_VM_C_LABEL(send_again):
}
}
if (separate) {
- zval_copy_ctor(args);
+ SEPARATE_ARRAY(args);
ht = Z_ARRVAL_P(args);
}
}
ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
if (name) {
- zend_throw_error(zend_ce_error, "Cannot unpack array with string keys");
+ zend_throw_error(NULL, "Cannot unpack array with string keys");
FREE_OP1();
HANDLE_EXCEPTION();
}
top = ZEND_CALL_ARG(EX(call), arg_num);
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
- if (!Z_IMMUTABLE_P(args)) {
+ if (Z_REFCOUNT_P(args) == 1) {
ZVAL_MAKE_REF(arg);
Z_ADDREF_P(arg);
ZVAL_REF(top, Z_REF_P(arg));
@@ -4496,35 +4497,32 @@ ZEND_VM_C_LABEL(send_again):
if (iter->funcs->rewind) {
iter->funcs->rewind(iter);
- if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_C_GOTO(unpack_iter_dtor);
- }
}
for (; iter->funcs->valid(iter) == SUCCESS; ++arg_num) {
zval *arg, *top;
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_C_GOTO(unpack_iter_dtor);
+ break;
}
arg = iter->funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_C_GOTO(unpack_iter_dtor);
+ break;
}
if (iter->funcs->get_current_key) {
zval key;
iter->funcs->get_current_key(iter, &key);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_C_GOTO(unpack_iter_dtor);
+ break;
}
if (Z_TYPE(key) == IS_STRING) {
- zend_throw_error(zend_ce_error,
+ zend_throw_error(NULL,
"Cannot unpack Traversable with string keys");
zend_string_release(Z_STR(key));
- ZEND_VM_C_GOTO(unpack_iter_dtor);
+ break;
}
zval_dtor(&key);
@@ -4552,12 +4550,8 @@ ZEND_VM_C_LABEL(send_again):
ZEND_CALL_NUM_ARGS(EX(call))++;
iter->funcs->move_forward(iter);
- if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_C_GOTO(unpack_iter_dtor);
- }
}
-ZEND_VM_C_LABEL(unpack_iter_dtor):
zend_iterator_dtor(iter);
}
} else if (EXPECTED(Z_ISREF_P(args))) {
@@ -4571,8 +4565,7 @@ ZEND_VM_C_LABEL(unpack_iter_dtor):
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY)
@@ -4580,7 +4573,6 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY)
USE_OPLINE
zend_free_op free_op1;
zval *args;
- SAVE_OPLINE();
SAVE_OPLINE();
args = GET_OP1_ZVAL_PTR(BP_VAR_R);
@@ -4596,12 +4588,12 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY)
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
} else {
uint32_t arg_num;
HashTable *ht;
@@ -4611,22 +4603,6 @@ ZEND_VM_C_LABEL(send_array):
ht = Z_ARRVAL_P(args);
zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht));
- if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
- int separate = 0;
-
- /* check if any of arguments are going to be passed by reference */
- for (arg_num = 0; arg_num < zend_hash_num_elements(ht); arg_num++) {
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + 1)) {
- separate = 1;
- break;
- }
- }
- if (separate) {
- zval_copy_ctor(args);
- ht = Z_ARRVAL_P(args);
- }
- }
-
arg_num = 1;
param = ZEND_CALL_ARG(EX(call), 1);
ZEND_HASH_FOREACH_VAL(ht, arg) {
@@ -4643,41 +4619,33 @@ ZEND_VM_C_LABEL(send_array):
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
-
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
break;
}
-
- ZVAL_NEW_REF(arg, arg);
}
- Z_ADDREF_P(arg);
- } else{
+ } else {
if (Z_ISREF_P(arg) &&
!(EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
/* don't separate references for __call */
arg = Z_REFVAL_P(arg);
}
- if (Z_OPT_REFCOUNTED_P(arg)) {
- Z_ADDREF_P(arg);
- }
}
- ZVAL_COPY_VALUE(param, arg);
+ ZVAL_COPY(param, arg);
ZEND_CALL_NUM_ARGS(EX(call))++;
arg_num++;
param++;
} ZEND_HASH_FOREACH_END();
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(120, ZEND_SEND_USER, VAR|CV, ANY)
+ZEND_VM_HANDLER(120, ZEND_SEND_USER, VAR|CV, NUM)
{
USE_OPLINE
zval *arg, *param;
@@ -4689,7 +4657,6 @@ ZEND_VM_HANDLER(120, ZEND_SEND_USER, VAR|CV, ANY)
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
if (UNEXPECTED(!Z_ISREF_P(arg))) {
-
if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given",
@@ -4701,54 +4668,45 @@ ZEND_VM_HANDLER(120, ZEND_SEND_USER, VAR|CV, ANY)
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
ZVAL_UNDEF(param);
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-
- ZVAL_NEW_REF(arg, arg);
}
- Z_ADDREF_P(arg);
} else {
if (Z_ISREF_P(arg) &&
!(EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
/* don't separate references for __call */
arg = Z_REFVAL_P(arg);
}
- if (Z_OPT_REFCOUNTED_P(arg)) {
- Z_ADDREF_P(arg);
- }
}
- ZVAL_COPY_VALUE(param, arg);
+ ZVAL_COPY(param, arg);
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(63, ZEND_RECV, ANY, ANY)
+ZEND_VM_HANDLER(63, ZEND_RECV, NUM, ANY)
{
USE_OPLINE
uint32_t arg_num = opline->op1.num;
if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num)))) {
- HANDLE_EXCEPTION();
- }
+ zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num));
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)) || EG(exception))) {
HANDLE_EXCEPTION();
}
}
@@ -4756,7 +4714,7 @@ ZEND_VM_HANDLER(63, ZEND_RECV, ANY, ANY)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
+ZEND_VM_HANDLER(64, ZEND_RECV_INIT, NUM, CONST)
{
USE_OPLINE
uint32_t arg_num;
@@ -4767,18 +4725,13 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
arg_num = opline->op1.num;
param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
if (arg_num > EX_NUM_ARGS()) {
- ZVAL_COPY_VALUE(param, EX_CONSTANT(opline->op2));
+ ZVAL_COPY(param, EX_CONSTANT(opline->op2));
if (Z_OPT_CONSTANT_P(param)) {
SAVE_OPLINE();
- if (UNEXPECTED(zval_update_constant_ex(param, 0, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(param, EX(func)->op_array.scope) != SUCCESS)) {
ZVAL_UNDEF(param);
HANDLE_EXCEPTION();
}
- } else {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE_P(param))) {
- zval_copy_ctor_func(param);
- }
}
}
@@ -4786,7 +4739,7 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
zval *default_value = EX_CONSTANT(opline->op2);
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))) || EG(exception))) {
HANDLE_EXCEPTION();
}
}
@@ -4795,7 +4748,7 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, ANY, ANY)
+ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, NUM, ANY)
{
USE_OPLINE
uint32_t arg_num = opline->op1.num;
@@ -4832,8 +4785,7 @@ ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, ANY, ANY)
array_init(params);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(52, ZEND_BOOL, CONST|TMPVAR|CV, ANY)
@@ -4846,46 +4798,21 @@ ZEND_VM_HANDLER(52, ZEND_BOOL, CONST|TMPVAR|CV, ANY)
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_TRUE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_FALSE(EX_VAR(opline->result.var));
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_FALSE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), i_zend_is_true(val));
FREE_OP1();
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(100, ZEND_GOTO, ANY, CONST)
-{
- USE_OPLINE
- zend_brk_cont_element *el;
-
- SAVE_OPLINE();
- el = zend_brk_cont(Z_LVAL_P(EX_CONSTANT(opline->op2)), opline->extended_value,
- &EX(func)->op_array, execute_data);
-
- if (el->start >= 0) {
- zend_op *brk_opline = EX(func)->op_array.opcodes + el->brk;
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
- zend_hash_iterator_del(Z_FE_ITER_P(var));
- }
- zval_ptr_dtor_nogc(var);
- }
- }
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
-}
-
ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
@@ -4924,7 +4851,7 @@ ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
FREE_OP2();
} else {
@@ -4941,6 +4868,14 @@ ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
SAVE_OPLINE();
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((OP1_TYPE & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -4949,79 +4884,87 @@ ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(68, ZEND_NEW, CONST|VAR, ANY)
+ZEND_VM_HANDLER(68, ZEND_NEW, UNUSED|CLASS_FETCH|CONST|VAR, ANY, NUM)
{
USE_OPLINE
- zval object_zval;
+ zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (OP1_TYPE == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (OP1_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
- if (UNEXPECTED(object_init_ex(&object_zval, ce) != SUCCESS)) {
+
+ result = EX_VAR(opline->result.var);
+ if (UNEXPECTED(object_init_ex(result, ce) != SUCCESS)) {
HANDLE_EXCEPTION();
}
- constructor = Z_OBJ_HT(object_zval)->get_constructor(Z_OBJ(object_zval));
+ constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), &object_zval);
- } else {
- OBJ_RELEASE(Z_OBJ(object_zval));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
+ if (EXPECTED(constructor->type == ZEND_USER_FUNCTION) && UNEXPECTED(!constructor->op_array.run_time_cache)) {
+ init_func_run_time_cache(&constructor->op_array);
+ }
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
- ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR |
- (EXPECTED(RETURN_VALUE_USED(opline)) ? 0 : ZEND_CALL_CTOR_RESULT_UNUSED),
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
- Z_OBJ(object_zval));
- call->prev_execute_data = EX(call);
- EX(call) = call;
-
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), &object_zval);
- }
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ Z_OBJ_P(result));
+ Z_ADDREF_P(result);
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|CV, ANY)
+ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|THIS|CV, ANY)
{
USE_OPLINE
zend_free_op free_op1;
zval *obj;
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
zend_function *clone;
zend_object_clone_obj_t clone_call;
SAVE_OPLINE();
obj = GET_OP1_OBJ_ZVAL_PTR_UNDEF(BP_VAR_R);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(obj) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -5036,170 +4979,182 @@ ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|CV, ANY)
}
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(obj, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "__clone method called on non-object");
+ zend_throw_error(NULL, "__clone method called on non-object");
FREE_OP1();
HANDLE_EXCEPTION();
}
} while (0);
ce = Z_OBJCE_P(obj);
- clone = ce ? ce->clone : NULL;
- clone_call = Z_OBJ_HT_P(obj)->clone_obj;
+ clone = ce->clone;
+ clone_call = Z_OBJ_HT_P(obj)->clone_obj;
if (UNEXPECTED(clone_call == NULL)) {
- if (ce) {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
- } else {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object");
- }
+ zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
FREE_OP1();
HANDLE_EXCEPTION();
}
- if (ce && clone) {
+ if (clone) {
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (UNEXPECTED(ce != EG(scope))) {
- zend_throw_error(zend_ce_error, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(ce != scope)) {
+ zend_throw_error(NULL, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
FREE_OP1();
HANDLE_EXCEPTION();
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
- zend_throw_error(zend_ce_error, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), scope))) {
+ zend_throw_error(NULL, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
FREE_OP1();
HANDLE_EXCEPTION();
}
}
}
- if (EXPECTED(EG(exception) == NULL)) {
- ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
- if (UNEXPECTED(!RETURN_VALUE_USED(opline)) || UNEXPECTED(EG(exception) != NULL)) {
- OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
- }
+ ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
}
+
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNUSED, CONST)
+ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, UNUSED, CONST, CONST_FETCH)
{
USE_OPLINE
+ zend_constant *c;
SAVE_OPLINE();
- if (OP1_TYPE == IS_UNUSED) {
- zend_constant *c;
-
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
- if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
- if (!actual) {
- ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
- } else {
- actual++;
- ZVAL_STRINGL(EX_VAR(opline->result.var),
- actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
- }
- /* non-qualified constant - allow text substitution */
- zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
- Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
+ c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
+ if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
+ char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
+ if (!actual) {
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
} else {
- zend_throw_error(zend_ce_error, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
- }
+ actual++;
+ ZVAL_STRINGL(EX_VAR(opline->result.var),
+ actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
+ }
+ /* non-qualified constant - allow text substitution */
+ zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
+ Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
+ zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
}
+ } else {
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
+ }
+
#ifdef ZTS
- if (c->flags & CONST_PERSISTENT) {
- ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
- } else {
- ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
- }
-#else
+ if (c->flags & CONST_PERSISTENT) {
+ ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
+ } else {
ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
+ }
+#else
+ ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
#endif
- } else {
- /* class constant */
- zend_class_entry *ce;
- zval *value;
- do {
- if (OP1_TYPE == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- ZVAL_DEREF(value);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CONST)
+{
+ zend_class_entry *ce, *scope;
+ zend_class_constant *c;
+ zval *value;
+ USE_OPLINE
+
+ SAVE_OPLINE();
+
+ do {
+ if (OP1_TYPE == IS_CONST) {
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
#ifdef ZTS
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
#endif
- break;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
- HANDLE_EXCEPTION();
+ break;
+ } else if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ } else {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else {
+ if (OP1_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
}
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
- if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
- ZVAL_DEREF(value);
- break;
- }
}
+ if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
+ break;
+ }
+ }
- if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
- ZVAL_DEREF(value);
- if (Z_CONSTANT_P(value)) {
- EG(scope) = ce;
- zval_update_constant_ex(value, 1, NULL);
- EG(scope) = EX(func)->op_array.scope;
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- }
- if (OP1_TYPE == IS_CONST) {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
- } else {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
+ if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ scope = EX(func)->op_array.scope;
+ if (!zend_verify_const_access(c, scope)) {
+ zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
+ value = &c->value;
+ if (Z_CONSTANT_P(value)) {
+ zval_update_constant_ex(value, ce);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
}
+ }
+ if (OP1_TYPE == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
} else {
- zend_throw_error(zend_ce_error, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
}
- } while (0);
-#ifdef ZTS
- if (ce->type == ZEND_INTERNAL_CLASS) {
- ZVAL_DUP(EX_VAR(opline->result.var), value);
} else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
}
-#else
+ } while (0);
+
+#ifdef ZTS
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ ZVAL_DUP(EX_VAR(opline->result.var), value);
+ } else {
ZVAL_COPY(EX_VAR(opline->result.var), value);
-#endif
}
+#else
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+#endif
+
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, REF)
{
USE_OPLINE
zend_free_op free_op1;
@@ -5209,11 +5164,6 @@ ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSE
if ((OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
FREE_OP1_VAR_PTR();
@@ -5222,10 +5172,8 @@ ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMPVAR|UNUSE
if (OP1_TYPE == IS_TMP_VAR) {
/* pass */
} else if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (OP1_TYPE == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -5295,11 +5243,10 @@ ZEND_VM_C_LABEL(num_index):
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|CV)
+ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSED|NEXT|CV, ARRAY_INIT|REF)
{
zval *array;
uint32_t size;
@@ -5330,7 +5277,7 @@ ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMPVAR|UNUSE
}
}
-ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY, TYPE)
{
USE_OPLINE
zend_free_op free_op1;
@@ -5378,16 +5325,13 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
if (Z_TYPE_P(expr) == opline->extended_value) {
ZVAL_COPY_VALUE(result, expr);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
- zval_copy_ctor_func(result);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (OP1_TYPE != IS_TMP_VAR) {
- if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
}
FREE_OP1_IF_VAR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (opline->extended_value == IS_ARRAY) {
@@ -5397,9 +5341,7 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -5413,11 +5355,9 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
if (Z_TYPE_P(expr) != IS_ARRAY) {
object_init(result);
if (Z_TYPE_P(expr) != IS_NULL) {
- expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
+ expr = zend_hash_add_new(Z_OBJPROP_P(result), CG(known_strings)[ZEND_STR_SCALAR], expr);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -5430,96 +5370,26 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY)
+ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY, EVAL)
{
USE_OPLINE
- zend_op_array *new_op_array=NULL;
+ zend_op_array *new_op_array;
zend_free_op free_op1;
zval *inc_filename;
- zval tmp_inc_filename;
- zend_bool failure_retval=0;
SAVE_OPLINE();
- inc_filename = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
-
- ZVAL_UNDEF(&tmp_inc_filename);
- if (Z_TYPE_P(inc_filename) != IS_STRING) {
- if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(inc_filename) == IS_UNDEF)) {
- inc_filename = GET_OP1_UNDEF_CV(inc_filename, BP_VAR_R);
- }
- ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
- inc_filename = &tmp_inc_filename;
- }
-
- if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- } else {
- switch (opline->extended_value) {
- case ZEND_INCLUDE_ONCE:
- case ZEND_REQUIRE_ONCE: {
- zend_file_handle file_handle;
- zend_string *resolved_path;
-
- resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename));
- if (resolved_path) {
- failure_retval = zend_hash_exists(&EG(included_files), resolved_path);
- } else {
- resolved_path = zend_string_copy(Z_STR_P(inc_filename));
- }
-
- if (failure_retval) {
- /* do nothing, file already included */
- } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
-
- if (!file_handle.opened_path) {
- file_handle.opened_path = zend_string_copy(resolved_path);
- }
-
- if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
- new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
- zend_destroy_file_handle(&file_handle);
- } else {
- zend_file_handle_dtor(&file_handle);
- failure_retval=1;
- }
- } else {
- if (opline->extended_value == ZEND_INCLUDE_ONCE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- }
- zend_string_release(resolved_path);
- }
- break;
- case ZEND_INCLUDE:
- case ZEND_REQUIRE:
- new_op_array = compile_filename(opline->extended_value, inc_filename);
- break;
- case ZEND_EVAL: {
- char *eval_desc = zend_make_compiled_string_description("eval()'d code");
-
- new_op_array = zend_compile_string(inc_filename, eval_desc);
- efree(eval_desc);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp_inc_filename));
- }
+ inc_filename = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ new_op_array = zend_include_or_eval(inc_filename, opline->extended_value);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
+ } else if (new_op_array == ZEND_FAKE_OP_ARRAY) {
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ }
} else if (EXPECTED(new_op_array != NULL)) {
zval *return_value = NULL;
zend_execute_data *call;
@@ -5528,19 +5398,21 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY)
return_value = EX_VAR(opline->result.var);
}
- new_op_array->scope = EG(scope);
+ new_op_array->scope = EX(func)->op_array.scope;
- call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE,
- (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)));
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
+ (zend_function*)new_op_array, 0,
+ Z_TYPE(EX(This)) != IS_OBJECT ? Z_CE(EX(This)) : NULL,
+ Z_TYPE(EX(This)) == IS_OBJECT ? Z_OBJ(EX(This)) : NULL);
- if (EX(symbol_table)) {
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
call->symbol_table = EX(symbol_table);
} else {
call->symbol_table = zend_rebuild_symbol_table();
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
@@ -5555,15 +5427,14 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY)
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
-
} else if (RETURN_VALUE_USED(opline)) {
- ZVAL_BOOL(EX_VAR(opline->result.var), failure_retval);
+ ZVAL_FALSE(EX_VAR(opline->result.var));
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH|ISSET)
{
USE_OPLINE
zval tmp, *varname;
@@ -5572,7 +5443,6 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
SAVE_OPLINE();
if (OP1_TYPE == IS_CV &&
- OP2_TYPE == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
zval *var = EX_VAR(opline->op1.var);
@@ -5581,16 +5451,21 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
if (!--GC_REFCOUNT(garbage)) {
ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
+ zval_dtor_func(garbage);
} else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
+ zval *z = var;
+ ZVAL_DEREF(z);
+ if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
+ ZVAL_UNDEF(var);
+ gc_possible_root(Z_COUNTED_P(z));
+ } else {
+ ZVAL_UNDEF(var);
+ }
}
} else {
ZVAL_UNDEF(var);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
varname = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
@@ -5604,48 +5479,75 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
varname = &tmp;
}
- if (OP2_TYPE != IS_UNUSED) {
- zend_class_entry *ce;
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
- if (OP2_TYPE == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
- FREE_OP1();
- HANDLE_EXCEPTION();
+ if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ FREE_OP1();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_HANDLER(179, ZEND_UNSET_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ zend_class_entry *ce;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+
+ varname = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+
+ ZVAL_UNDEF(&tmp);
+ if (OP1_TYPE != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (OP2_TYPE == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (OP1_TYPE != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ FREE_OP1();
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (OP2_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ FREE_OP1();
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -5655,14 +5557,9 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMPVAR|CV)
zend_string *key;
SAVE_OPLINE();
- container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_UNSET);
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
@@ -5725,27 +5622,29 @@ ZEND_VM_C_LABEL(num_index_dim):
ZEND_VM_C_GOTO(unset_dim_array);
}
}
+ if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (OP1_TYPE == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
FREE_OP2();
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -5754,13 +5653,8 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
- if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
@@ -5786,11 +5680,10 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMPVAR|CV)
FREE_OP2();
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -5809,8 +5702,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
Z_FE_POS_P(result) = 0;
FREE_OP1_IF_VAR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (OP1_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
HashPosition pos = 0;
@@ -5821,6 +5713,13 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE != IS_TMP_VAR) {
Z_ADDREF_P(array_ptr);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
pos = 0;
p = fe_ht->arData;
@@ -5843,8 +5742,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
FREE_OP1_IF_VAR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
@@ -5885,8 +5783,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -5898,7 +5795,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY)
}
}
-ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -5927,8 +5824,9 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
Z_ADDREF_P(array_ref);
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
} else {
- array_ptr = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(array_ptr, array_ref);
+ array_ref = EX_VAR(opline->result.var);
+ ZVAL_NEW_REF(array_ref, array_ptr);
+ array_ptr = Z_REFVAL_P(array_ref);
}
if (OP1_TYPE == IS_CONST) {
zval_copy_ctor_func(array_ptr);
@@ -5954,8 +5852,7 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (OP1_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) {
@@ -5969,6 +5866,13 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
array_ptr = EX_VAR(opline->result.var);
ZVAL_COPY_VALUE(array_ptr, array_ref);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
p = fe_ht->arData;
while (1) {
@@ -5990,8 +5894,7 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
FREE_OP1_VAR_PTR();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
@@ -6048,8 +5951,7 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -6065,7 +5967,7 @@ ZEND_VM_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, ANY)
}
}
-ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
+ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY, JMP_ADDR)
{
USE_OPLINE
zval *array;
@@ -6104,7 +6006,7 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
break;
}
Z_FE_POS_P(array) = pos + 1;
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (!p->key) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else {
@@ -6148,7 +6050,7 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
pos++;
p++;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (UNEXPECTED(!p->key)) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else if (ZSTR_VAL(p->key)[0]) {
@@ -6183,13 +6085,11 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (UNEXPECTED(iter->funcs->valid(iter) == FAILURE)) {
/* reached end of iteration */
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
ZEND_VM_C_GOTO(fe_fetch_r_exit);
@@ -6197,18 +6097,16 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
}
value = iter->funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (!value) {
/* failure in get_current_data */
ZEND_VM_C_GOTO(fe_fetch_r_exit);
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (iter->funcs->get_current_key) {
iter->funcs->get_current_key(iter, EX_VAR(opline->result.var));
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
} else {
@@ -6219,10 +6117,11 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH_R, VAR, ANY)
}
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
-ZEND_VM_C_LABEL(fe_fetch_r_exit):
- if (EXPECTED(!EG(exception))) {
- ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ if (UNEXPECTED(EG(exception))) {
+ HANDLE_EXCEPTION();
}
+ZEND_VM_C_LABEL(fe_fetch_r_exit):
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
ZEND_VM_CONTINUE();
}
@@ -6241,7 +6140,7 @@ ZEND_VM_C_LABEL(fe_fetch_r_exit):
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
+ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY, JMP_ADDR)
{
USE_OPLINE
zval *array;
@@ -6256,8 +6155,8 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
ZVAL_DEREF(array);
if (EXPECTED(Z_TYPE_P(array) == IS_ARRAY)) {
+ pos = zend_hash_iterator_pos_ex(Z_FE_ITER_P(EX_VAR(opline->op1.var)), array);
fe_ht = Z_ARRVAL_P(array);
- pos = zend_hash_iterator_pos(Z_FE_ITER_P(EX_VAR(opline->op1.var)), fe_ht);
p = fe_ht->arData + pos;
while (1) {
if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
@@ -6281,7 +6180,7 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
}
break;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (!p->key) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else {
@@ -6339,7 +6238,7 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
pos++;
p++;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (UNEXPECTED(!p->key)) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else if (ZSTR_VAL(p->key)[0]) {
@@ -6374,13 +6273,11 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (UNEXPECTED(iter->funcs->valid(iter) == FAILURE)) {
/* reached end of iteration */
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
ZEND_VM_C_GOTO(fe_fetch_w_exit);
@@ -6388,18 +6285,16 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
}
value = iter->funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (!value) {
/* failure in get_current_data */
ZEND_VM_C_GOTO(fe_fetch_w_exit);
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (iter->funcs->get_current_key) {
iter->funcs->get_current_key(iter, EX_VAR(opline->result.var));
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
} else {
@@ -6410,10 +6305,11 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY)
}
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
-ZEND_VM_C_LABEL(fe_fetch_w_exit):
- if (EXPECTED(!EG(exception))) {
- ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ if (UNEXPECTED(EG(exception))) {
+ HANDLE_EXCEPTION();
}
+ZEND_VM_C_LABEL(fe_fetch_w_exit):
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
ZEND_VM_CONTINUE();
}
@@ -6441,14 +6337,13 @@ ZEND_VM_C_LABEL(fe_fetch_w_exit):
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
+ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED, VAR_FETCH|ISSET)
{
USE_OPLINE
zval *value;
int result;
if (OP1_TYPE == IS_CV &&
- OP2_TYPE == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
value = EX_VAR(opline->op1.var);
if (opline->extended_value & ZEND_ISSET) {
@@ -6469,6 +6364,7 @@ ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
} else {
zend_free_op free_op1;
zval tmp, *varname;
+ HashTable *target_symbol_table;
SAVE_OPLINE();
varname = GET_OP1_ZVAL_PTR(BP_VAR_IS);
@@ -6478,61 +6374,14 @@ ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMPVAR|CV, UNUSED|CONST|VAR)
varname = &tmp;
}
- if (OP2_TYPE != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (OP2_TYPE == IS_CONST) {
- if (OP1_TYPE == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
-
- ZEND_VM_C_GOTO(is_var_return);
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (OP1_TYPE == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
-
- ZEND_VM_C_GOTO(is_var_return);
- }
- }
-
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
-
- if (OP1_TYPE == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
- }
- } else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
- }
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
FREE_OP1();
-ZEND_VM_C_LABEL(is_var_return):
if (opline->extended_value & ZEND_ISSET) {
result = value && Z_TYPE_P(value) > IS_NULL &&
(!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
@@ -6542,12 +6391,95 @@ ZEND_VM_C_LABEL(is_var_return):
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
-ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR, ISSET)
+{
+ USE_OPLINE
+ zval *value;
+ int result;
+ zend_free_op free_op1;
+ zval tmp, *varname;
+ zend_class_entry *ce;
+
+ SAVE_OPLINE();
+ varname = GET_OP1_ZVAL_PTR(BP_VAR_IS);
+ ZVAL_UNDEF(&tmp);
+ if (OP1_TYPE != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (OP2_TYPE == IS_CONST) {
+ if (OP1_TYPE == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
+
+ ZEND_VM_C_GOTO(is_static_prop_return);
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (OP2_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ if (OP1_TYPE == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
+
+ ZEND_VM_C_GOTO(is_static_prop_return);
+ }
+ }
+
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (OP1_TYPE == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ FREE_OP1();
+
+ZEND_VM_C_LABEL(is_static_prop_return):
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
+ }
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, ISSET)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -6557,10 +6489,10 @@ ZEND_VM_HANDLER(115, ZEND_ISSET_ISEMPTY_DIM_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|T
zval *offset;
SAVE_OPLINE();
- container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
+ container = GET_OP1_OBJ_ZVAL_PTR_UNDEF(BP_VAR_IS);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
@@ -6650,6 +6582,9 @@ ZEND_VM_C_LABEL(num_index_prop):
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
ZEND_VM_C_LABEL(isset_str_offset):
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -6681,11 +6616,10 @@ ZEND_VM_C_LABEL(isset_dim_obj_exit):
FREE_OP1();
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|TMPVAR|CV)
+ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, ISSET)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -6696,8 +6630,8 @@ ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|CV, CONST|
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
- if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (OP1_TYPE == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP2();
HANDLE_EXCEPTION();
}
@@ -6729,13 +6663,11 @@ ZEND_VM_C_LABEL(isset_no_object):
FREE_OP1();
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMPVAR|UNUSED|CV, ANY)
{
-#if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
USE_OPLINE
SAVE_OPLINE();
@@ -6759,7 +6691,6 @@ ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMPVAR|UNUSED|CV, ANY)
} while (0);
FREE_OP1();
}
-#endif
zend_bailout();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
@@ -6774,7 +6705,7 @@ ZEND_VM_HANDLER(57, ZEND_BEGIN_SILENCE, ANY, ANY)
do {
EG(error_reporting) = 0;
if (!EG(error_reporting_ini_entry)) {
- zend_ini_entry *p = zend_hash_str_find_ptr(EG(ini_directives), "error_reporting", sizeof("error_reporting")-1);
+ zend_ini_entry *p = zend_hash_find_ptr(EG(ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING]);
if (p) {
EG(error_reporting_ini_entry) = p;
} else {
@@ -6786,7 +6717,7 @@ ZEND_VM_HANDLER(57, ZEND_BEGIN_SILENCE, ANY, ANY)
ALLOC_HASHTABLE(EG(modified_ini_directives));
zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
}
- if (EXPECTED(zend_hash_str_add_ptr(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting")-1, EG(error_reporting_ini_entry)) != NULL)) {
+ if (EXPECTED(zend_hash_add_ptr(EG(modified_ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING], EG(error_reporting_ini_entry)) != NULL)) {
EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
EG(error_reporting_ini_entry)->modified = 1;
@@ -6807,7 +6738,7 @@ ZEND_VM_HANDLER(58, ZEND_END_SILENCE, TMP, ANY)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -6824,28 +6755,30 @@ ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, ANY)
value = Z_REFVAL_P(value);
}
if (i_zend_is_true(value)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+
+ ZVAL_COPY_VALUE(result, value);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (OP1_TYPE == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (OP1_TYPE == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(169, ZEND_COALESCE, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(169, ZEND_COALESCE, CONST|TMP|VAR|CV, JMP_ADDR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -6863,25 +6796,26 @@ ZEND_VM_HANDLER(169, ZEND_COALESCE, CONST|TMP|VAR|CV, ANY)
}
if (Z_TYPE_P(value) > IS_NULL) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+ ZVAL_COPY_VALUE(result, value);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (OP1_TYPE == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (OP1_TYPE == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(22, ZEND_QM_ASSIGN, CONST|TMP|VAR|CV, ANY)
@@ -6889,29 +6823,36 @@ ZEND_VM_HANDLER(22, ZEND_QM_ASSIGN, CONST|TMP|VAR|CV, ANY)
USE_OPLINE
zend_free_op free_op1;
zval *value;
+ zval *result = EX_VAR(opline->result.var);
value = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
SAVE_OPLINE();
- value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ ZVAL_NULL(result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- if ((OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) && Z_ISREF_P(value)) {
- ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
- if (OP1_TYPE == IS_VAR) {
+ if (OP1_TYPE == IS_CV) {
+ ZVAL_DEREF(value);
+ ZVAL_COPY(result, value);
+ } else if (OP1_TYPE == IS_VAR) {
+ if (UNEXPECTED(Z_ISREF_P(value))) {
+ ZVAL_COPY_VALUE(result, Z_REFVAL_P(value));
if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
efree_size(Z_REF_P(value), sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
+ } else {
+ ZVAL_COPY_VALUE(result, value);
}
} else {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZVAL_COPY_VALUE(result, value);
if (OP1_TYPE == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) {
+ Z_ADDREF_P(result);
}
- } else if (OP1_TYPE == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -6919,30 +6860,36 @@ ZEND_VM_HANDLER(22, ZEND_QM_ASSIGN, CONST|TMP|VAR|CV, ANY)
ZEND_VM_HANDLER(101, ZEND_EXT_STMT, ANY, ANY)
{
+ USE_OPLINE
+
if (!EG(no_extensions)) {
SAVE_OPLINE();
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(func));
- CHECK_EXCEPTION();
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, execute_data);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(102, ZEND_EXT_FCALL_BEGIN, ANY, ANY)
{
+ USE_OPLINE
+
if (!EG(no_extensions)) {
SAVE_OPLINE();
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(func));
- CHECK_EXCEPTION();
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, execute_data);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(103, ZEND_EXT_FCALL_END, ANY, ANY)
{
+ USE_OPLINE
+
if (!EG(no_extensions)) {
SAVE_OPLINE();
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(func));
- CHECK_EXCEPTION();
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, execute_data);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -6953,75 +6900,72 @@ ZEND_VM_HANDLER(139, ZEND_DECLARE_CLASS, ANY, ANY)
SAVE_OPLINE();
Z_CE_P(EX_VAR(opline->result.var)) = do_bind_class(&EX(func)->op_array, opline, EG(class_table), 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(140, ZEND_DECLARE_INHERITED_CLASS, ANY, ANY)
+ZEND_VM_HANDLER(140, ZEND_DECLARE_INHERITED_CLASS, ANY, VAR)
{
USE_OPLINE
SAVE_OPLINE();
- Z_CE_P(EX_VAR(opline->result.var)) = do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ Z_CE_P(EX_VAR(opline->result.var)) = do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->op2.var)), 0);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(145, ZEND_DECLARE_INHERITED_CLASS_DELAYED, ANY, ANY)
+ZEND_VM_HANDLER(145, ZEND_DECLARE_INHERITED_CLASS_DELAYED, ANY, VAR)
{
USE_OPLINE
zval *zce, *orig_zce;
SAVE_OPLINE();
- if ((zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)))) == NULL ||
- ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)))) != NULL &&
+ if ((zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)))) == NULL ||
+ ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)+1))) != NULL &&
Z_CE_P(zce) != Z_CE_P(orig_zce))) {
- do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0);
+ do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->op2.var)), 0);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(171, ZEND_DECLARE_ANON_CLASS, ANY, ANY)
+ZEND_VM_HANDLER(171, ZEND_DECLARE_ANON_CLASS, ANY, ANY, JMP_ADDR)
{
zend_class_entry *ce;
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)));
+ ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)));
Z_CE_P(EX_VAR(opline->result.var)) = ce;
ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))) {
zend_verify_abstract_class(ce);
}
ce->ce_flags |= ZEND_ACC_ANON_BOUND;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(172, ZEND_DECLARE_ANON_INHERITED_CLASS, ANY, ANY)
+ZEND_VM_HANDLER(172, ZEND_DECLARE_ANON_INHERITED_CLASS, ANY, VAR, JMP_ADDR)
{
zend_class_entry *ce;
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)));
+ ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)));
Z_CE_P(EX_VAR(opline->result.var)) = ce;
ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
- zend_do_inheritance(ce, Z_CE_P(EX_VAR(opline->extended_value)));
+ zend_do_inheritance(ce, Z_CE_P(EX_VAR(opline->op2.var)));
ce->ce_flags |= ZEND_ACC_ANON_BOUND;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(141, ZEND_DECLARE_FUNCTION, ANY, ANY)
@@ -7030,11 +6974,10 @@ ZEND_VM_HANDLER(141, ZEND_DECLARE_FUNCTION, ANY, ANY)
SAVE_OPLINE();
do_bind_function(&EX(func)->op_array, opline, EG(function_table), 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY)
+ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY, NUM)
{
USE_OPLINE
@@ -7043,13 +6986,13 @@ ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY)
if (zend_ticks_function) {
SAVE_OPLINE();
zend_ticks_function(opline->extended_value);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(138, ZEND_INSTANCEOF, TMPVAR|CV, CONST|VAR)
+ZEND_VM_HANDLER(138, ZEND_INSTANCEOF, TMPVAR|CV, UNUSED|CLASS_FETCH|CONST|VAR)
{
USE_OPLINE
zend_free_op free_op1;
@@ -7064,18 +7007,23 @@ ZEND_VM_C_LABEL(try_instanceof):
zend_class_entry *ce;
if (OP2_TYPE == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
if (UNEXPECTED(ce == NULL)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
+ } else if (OP2_TYPE == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op2.var));
}
@@ -7092,17 +7040,20 @@ ZEND_VM_C_LABEL(try_instanceof):
FREE_OP1();
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(104, ZEND_EXT_NOP, ANY, ANY)
{
+ USE_OPLINE
+
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(0, ZEND_NOP, ANY, ANY)
{
+ USE_OPLINE
+
ZEND_VM_NEXT_OPCODE();
}
@@ -7113,13 +7064,11 @@ ZEND_VM_HANDLER(144, ZEND_ADD_INTERFACE, ANY, CONST)
zend_class_entry *iface;
SAVE_OPLINE();
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- iface = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ iface = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(iface == NULL)) {
iface = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_INTERFACE);
if (UNEXPECTED(iface == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), iface);
}
@@ -7129,8 +7078,7 @@ ZEND_VM_HANDLER(144, ZEND_ADD_INTERFACE, ANY, CONST)
}
zend_do_implement_interface(ce, iface);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(154, ZEND_ADD_TRAIT, ANY, ANY)
@@ -7140,15 +7088,13 @@ ZEND_VM_HANDLER(154, ZEND_ADD_TRAIT, ANY, ANY)
zend_class_entry *trait;
SAVE_OPLINE();
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- trait = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ trait = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(trait == NULL)) {
trait = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)),
EX_CONSTANT(opline->op2) + 1,
ZEND_FETCH_CLASS_TRAIT);
if (UNEXPECTED(trait == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (!(trait->ce_flags & ZEND_ACC_TRAIT)) {
zend_error_noreturn(E_ERROR, "%s cannot use %s - it is not a trait", ZSTR_VAL(ce->name), ZSTR_VAL(trait->name));
@@ -7158,8 +7104,7 @@ ZEND_VM_HANDLER(154, ZEND_ADD_TRAIT, ANY, ANY)
zend_do_implement_trait(ce, trait);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(155, ZEND_BIND_TRAITS, ANY, ANY)
@@ -7169,72 +7114,103 @@ ZEND_VM_HANDLER(155, ZEND_BIND_TRAITS, ANY, ANY)
SAVE_OPLINE();
zend_do_bind_traits(ce);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
+ZEND_VM_HELPER(zend_dispatch_try_catch_finally_helper, ANY, ANY, uint32_t try_catch_offset, uint32_t op_num)
{
- uint32_t op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
- int i;
- uint32_t catch_op_num = 0, finally_op_num = 0, finally_op_end = 0;
- int in_finally = 0;
+ /* May be NULL during generator closing (only finally blocks are executed) */
+ zend_object *ex = EG(exception);
- ZEND_VM_INTERRUPT_CHECK();
- for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
- if (EX(func)->op_array.try_catch_array[i].try_op > op_num) {
- /* further blocks will not be relevant... */
- break;
- }
- in_finally = 0;
- if (op_num < EX(func)->op_array.try_catch_array[i].catch_op) {
- catch_op_num = EX(func)->op_array.try_catch_array[i].catch_op;
- }
- if (op_num < EX(func)->op_array.try_catch_array[i].finally_op) {
- finally_op_num = EX(func)->op_array.try_catch_array[i].finally_op;
- finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
- }
- if (op_num >= EX(func)->op_array.try_catch_array[i].finally_op &&
- op_num < EX(func)->op_array.try_catch_array[i].finally_end) {
- finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
- in_finally = 1;
+ /* Walk try/catch/finally structures upwards, performing the necessary actions */
+ while (try_catch_offset != (uint32_t) -1) {
+ zend_try_catch_element *try_catch =
+ &EX(func)->op_array.try_catch_array[try_catch_offset];
+
+ if (op_num < try_catch->catch_op && ex) {
+ /* Go to catch block */
+ cleanup_live_vars(execute_data, op_num, try_catch->catch_op);
+ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[try_catch->catch_op]);
+ ZEND_VM_CONTINUE();
+
+ } else if (op_num < try_catch->finally_op) {
+ /* Go to finally block */
+ zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[try_catch->finally_end].op1.var);
+ cleanup_live_vars(execute_data, op_num, try_catch->finally_op);
+ Z_OBJ_P(fast_call) = EG(exception);
+ EG(exception) = NULL;
+ fast_call->u2.lineno = (uint32_t)-1;
+ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[try_catch->finally_op]);
+ ZEND_VM_CONTINUE();
+
+ } else if (op_num < try_catch->finally_end) {
+ zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[try_catch->finally_end].op1.var);
+
+ /* cleanup incomplete RETURN statement */
+ if (fast_call->u2.lineno != (uint32_t)-1
+ && (EX(func)->op_array.opcodes[fast_call->u2.lineno].op2_type & (IS_TMP_VAR | IS_VAR))) {
+ zval *return_value = EX_VAR(EX(func)->op_array.opcodes[fast_call->u2.lineno].op2.var);
+
+ zval_ptr_dtor(return_value);
+ }
+
+ /* Chain potential exception from wrapping finally block */
+ if (Z_OBJ_P(fast_call)) {
+ if (ex) {
+ zend_exception_set_previous(ex, Z_OBJ_P(fast_call));
+ } else {
+ EG(exception) = Z_OBJ_P(fast_call);
+ }
+ ex = Z_OBJ_P(fast_call);
+ }
}
+
+ try_catch_offset--;
}
- i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
+ /* Uncaught exception */
+ cleanup_live_vars(execute_data, op_num, 0);
+ if (UNEXPECTED((EX_CALL_INFO() & ZEND_CALL_GENERATOR) != 0)) {
+ zend_generator *generator = zend_get_running_generator(execute_data);
+ zend_generator_close(generator, 1);
+ ZEND_VM_RETURN();
+ } else {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ }
+}
- if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
- zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
+ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
+{
+ uint32_t throw_op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
+ uint32_t i, current_try_catch_offset = (uint32_t) -1;
- if (in_finally && Z_OBJ_P(fast_call)) {
- zend_exception_set_previous(EG(exception), Z_OBJ_P(fast_call));
+ {
+ const zend_op *exc_opline = EG(opline_before_exception);
+ if ((exc_opline->opcode == ZEND_FREE || exc_opline->opcode == ZEND_FE_FREE)
+ && exc_opline->extended_value & ZEND_FREE_ON_RETURN) {
+ /* exceptions thrown because of loop var destruction on return/break/...
+ * are logically thrown at the end of the foreach loop, so adjust the
+ * throw_op_num.
+ */
+ throw_op_num = EX(func)->op_array.live_range[exc_opline->op2.num].end;
}
- Z_OBJ_P(fast_call) = EG(exception);
- EG(exception) = NULL;
- fast_call->u2.lineno = (uint32_t)-1;
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[finally_op_num]);
- ZEND_VM_CONTINUE();
- } else {
- if (in_finally) {
- /* we are going out of current finally scope */
- zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
+ }
- if (Z_OBJ_P(fast_call)) {
- zend_exception_set_previous(EG(exception), Z_OBJ_P(fast_call));
- Z_OBJ_P(fast_call) = NULL;
- }
+ /* Find the innermost try/catch/finally the exception was thrown in */
+ for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
+ zend_try_catch_element *try_catch = &EX(func)->op_array.try_catch_array[i];
+ if (try_catch->try_op > throw_op_num) {
+ /* further blocks will not be relevant... */
+ break;
}
- if (catch_op_num) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[catch_op_num]);
- ZEND_VM_CONTINUE();
- } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- zend_generator *generator = zend_get_running_generator(execute_data);
- zend_generator_close(generator, 1);
- ZEND_VM_RETURN();
- } else {
- ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+ if (throw_op_num < try_catch->catch_op || throw_op_num < try_catch->finally_end) {
+ current_try_catch_offset = i;
}
}
+
+ cleanup_unfinished_calls(execute_data, throw_op_num);
+
+ ZEND_VM_DISPATCH_TO_HELPER(zend_dispatch_try_catch_finally_helper, try_catch_offset, current_try_catch_offset, op_num, throw_op_num);
}
ZEND_VM_HANDLER(146, ZEND_VERIFY_ABSTRACT_CLASS, ANY, ANY)
@@ -7243,8 +7219,7 @@ ZEND_VM_HANDLER(146, ZEND_VERIFY_ABSTRACT_CLASS, ANY, ANY)
SAVE_OPLINE();
zend_verify_abstract_class(Z_CE_P(EX_VAR(opline->op1.var)));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, ANY, ANY)
@@ -7254,13 +7229,13 @@ ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, ANY, ANY)
SAVE_OPLINE();
ret = zend_user_opcode_handlers[opline->opcode](execute_data);
- LOAD_OPLINE();
+ opline = EX(opline);
switch (ret) {
case ZEND_USER_OPCODE_CONTINUE:
ZEND_VM_CONTINUE();
case ZEND_USER_OPCODE_RETURN:
- if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
+ if (UNEXPECTED((EX_CALL_INFO() & ZEND_CALL_GENERATOR) != 0)) {
zend_generator *generator = zend_get_running_generator(execute_data);
zend_generator_close(generator, 1);
ZEND_VM_RETURN();
@@ -7290,18 +7265,13 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
name = GET_OP1_ZVAL_PTR(BP_VAR_R);
val = GET_OP2_ZVAL_PTR(BP_VAR_R);
- ZVAL_COPY_VALUE(&c.value, val);
+ ZVAL_COPY(&c.value, val);
if (Z_OPT_CONSTANT(c.value)) {
- if (UNEXPECTED(zval_update_constant_ex(&c.value, 0, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(&c.value, EX(func)->op_array.scope) != SUCCESS)) {
FREE_OP1();
FREE_OP2();
HANDLE_EXCEPTION();
}
- } else {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE(c.value))) {
- zval_copy_ctor_func(&c.value);
- }
}
c.flags = CONST_CS; /* non persistent, case sensetive */
c.name = zend_string_dup(Z_STR_P(name), 0);
@@ -7312,31 +7282,37 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
FREE_OP1();
FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
{
USE_OPLINE
zval *zfunc;
+ zval *object;
+ zend_class_entry *called_scope;
SAVE_OPLINE();
zfunc = zend_hash_find(EG(function_table), Z_STR_P(EX_CONSTANT(opline->op1)));
ZEND_ASSERT(zfunc != NULL && Z_FUNC_P(zfunc)->type == ZEND_USER_FUNCTION);
- if (UNEXPECTED((Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC) ||
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ called_scope = Z_OBJCE(EX(This));
+ if (UNEXPECTED((Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC) ||
(EX(func)->common.fn_flags & ZEND_ACC_STATIC))) {
- zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
- EG(scope), EX(called_scope), NULL);
+ object = NULL;
+ } else {
+ object = &EX(This);
+ }
} else {
- zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
- EG(scope), EX(called_scope), Z_OBJ(EX(This)) ? &EX(This) : NULL);
+ called_scope = Z_CE(EX(This));
+ object = NULL;
}
+ zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
+ EX(func)->op_array.scope, called_scope, object);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED)
@@ -7345,18 +7321,16 @@ ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED)
zval *var_ptr;
var_ptr = EX_VAR(opline->op1.var);
- if (Z_TYPE_P(var_ptr) != IS_OBJECT &&
- !Z_ISREF_P(var_ptr) &&
- Z_REFCOUNTED_P(var_ptr) &&
- Z_REFCOUNT_P(var_ptr) > 1) {
-
- Z_DELREF_P(var_ptr);
- ZVAL_DUP(EX_VAR(opline->op1.var), var_ptr);
+ if (UNEXPECTED(Z_ISREF_P(var_ptr))) {
+ if (UNEXPECTED(Z_REFCOUNT_P(var_ptr) == 1)) {
+ ZVAL_UNREF(var_ptr);
+ }
}
+
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSED)
+ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSED, SRC)
{
USE_OPLINE
@@ -7364,7 +7338,7 @@ ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSE
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
FREE_UNFETCHED_OP2();
FREE_UNFETCHED_OP1();
HANDLE_EXCEPTION();
@@ -7383,33 +7357,27 @@ ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSE
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
+ if (OP1_TYPE & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = GET_OP1_ZVAL_PTR(BP_VAR_R);
ZVAL_COPY_VALUE(&generator->value, value);
- if (OP1_TYPE != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (OP1_TYPE == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- FREE_UNFETCHED_OP2();
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (OP1_TYPE == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -7424,8 +7392,8 @@ ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSE
/* Consts, temporary variables and references need copying */
if (OP1_TYPE == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (OP1_TYPE == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -7452,8 +7420,8 @@ ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSE
/* Consts, temporary variables and references need copying */
if (OP2_TYPE == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (OP2_TYPE == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -7510,6 +7478,12 @@ ZEND_VM_HANDLER(142, ZEND_YIELD_FROM, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
val = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R);
+ if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
+ zend_throw_error(NULL, "Cannot use \"yield from\" in a force-closed generator");
+ FREE_OP1();
+ HANDLE_EXCEPTION();
+ }
+
if (Z_TYPE_P(val) == IS_ARRAY) {
ZVAL_COPY_VALUE(&generator->values, val);
if (OP1_TYPE != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
@@ -7530,13 +7504,13 @@ ZEND_VM_HANDLER(142, ZEND_YIELD_FROM, CONST|TMP|VAR|CV, ANY)
if (Z_ISUNDEF(new_gen->retval)) {
if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
- zend_throw_error(zend_ce_error, "Impossible to yield from the Generator being currently run");
+ zend_throw_error(NULL, "Impossible to yield from the Generator being currently run");
HANDLE_EXCEPTION();
} else {
zend_generator_yield_from(generator, new_gen);
}
} else if (UNEXPECTED(new_gen->execute_data == NULL)) {
- zend_throw_error(zend_ce_error, "Generator passed to yield from was aborted without proper return and is unable to continue");
+ zend_throw_error(NULL, "Generator passed to yield from was aborted without proper return and is unable to continue");
HANDLE_EXCEPTION();
} else {
if (RETURN_VALUE_USED(opline)) {
@@ -7550,7 +7524,7 @@ ZEND_VM_HANDLER(142, ZEND_YIELD_FROM, CONST|TMP|VAR|CV, ANY)
if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
if (!EG(exception)) {
- zend_throw_error(zend_ce_error, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
}
HANDLE_EXCEPTION();
}
@@ -7567,7 +7541,7 @@ ZEND_VM_HANDLER(142, ZEND_YIELD_FROM, CONST|TMP|VAR|CV, ANY)
ZVAL_OBJ(&generator->values, &iter->std);
}
} else {
- zend_throw_error(zend_ce_error, "Can use \"yield from\" only with arrays and Traversables", 0);
+ zend_throw_error(NULL, "Can use \"yield from\" only with arrays and Traversables", 0);
HANDLE_EXCEPTION();
}
@@ -7577,6 +7551,9 @@ ZEND_VM_HANDLER(142, ZEND_YIELD_FROM, CONST|TMP|VAR|CV, ANY)
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ /* This generator has no send target (though the generator we delegate to might have one) */
+ generator->send_target = NULL;
+
/* We increment to the next op, so we are at the correct position when the
* generator is resumed. */
ZEND_VM_INC_OPCODE();
@@ -7592,30 +7569,31 @@ ZEND_VM_HANDLER(159, ZEND_DISCARD_EXCEPTION, ANY, ANY)
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->op1.var);
+ SAVE_OPLINE();
+
+ /* cleanup incomplete RETURN statement */
+ if (fast_call->u2.lineno != (uint32_t)-1
+ && (EX(func)->op_array.opcodes[fast_call->u2.lineno].op2_type & (IS_TMP_VAR | IS_VAR))) {
+ zval *return_value = EX_VAR(EX(func)->op_array.opcodes[fast_call->u2.lineno].op2.var);
+
+ zval_ptr_dtor(return_value);
+ }
- /* check for delayed exception */
+ /* cleanup delayed exception */
if (Z_OBJ_P(fast_call) != NULL) {
- SAVE_OPLINE();
/* discard the previously thrown exception */
OBJ_RELEASE(Z_OBJ_P(fast_call));
Z_OBJ_P(fast_call) = NULL;
}
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY)
+ZEND_VM_HANDLER(162, ZEND_FAST_CALL, JMP_ADDR, ANY)
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->result.var);
- if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) &&
- UNEXPECTED(EG(prev_exception) != NULL)) {
- /* in case of unhandled exception jump to catch block instead of finally */
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- }
- /* set no delayed exception */
Z_OBJ_P(fast_call) = NULL;
/* set return address */
fast_call->u2.lineno = opline - EX(func)->op_array.opcodes;
@@ -7623,61 +7601,25 @@ ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY)
ZEND_VM_CONTINUE();
}
-ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, ANY)
+ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, TRY_CATCH)
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->op1.var);
+ uint32_t current_try_catch_offset, current_op_num;
if (fast_call->u2.lineno != (uint32_t)-1) {
const zend_op *fast_ret = EX(func)->op_array.opcodes + fast_call->u2.lineno;
+
ZEND_VM_SET_OPCODE(fast_ret + 1);
- if (fast_ret->extended_value & ZEND_FAST_CALL_FROM_FINALLY) {
- fast_call->u2.lineno = fast_ret->op2.opline_num;
- }
ZEND_VM_CONTINUE();
- } else {
- /* special case for unhandled exceptions */
- USE_OPLINE
-
- if (opline->extended_value == ZEND_FAST_RET_TO_FINALLY) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- } else {
- EG(exception) = Z_OBJ_P(fast_call);
- Z_OBJ_P(fast_call) = NULL;
- if (opline->extended_value == ZEND_FAST_RET_TO_CATCH) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- zend_generator *generator = zend_get_running_generator(execute_data);
- zend_generator_close(generator, 1);
- ZEND_VM_RETURN();
- } else {
- ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
- }
- }
}
-}
-
-ZEND_VM_HANDLER(166, ZEND_POW, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
-{
- USE_OPLINE
- zend_free_op free_op1, free_op2;
- zval *op1, *op2;
- SAVE_OPLINE();
- op1 = GET_OP1_ZVAL_PTR(BP_VAR_R);
- op2 = GET_OP2_ZVAL_PTR(BP_VAR_R);
- pow_function(EX_VAR(opline->result.var), op1, op2);
- FREE_OP1();
- FREE_OP2();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
-
-ZEND_VM_HANDLER(167, ZEND_ASSIGN_POW, VAR|CV, CONST|TMPVAR|CV)
-{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_helper, binary_op,pow_function);
+ /* special case for unhandled exceptions */
+ EG(exception) = Z_OBJ_P(fast_call);
+ Z_OBJ_P(fast_call) = NULL;
+ current_try_catch_offset = opline->op2.num;
+ current_op_num = opline - EX(func)->op_array.opcodes;
+ ZEND_VM_DISPATCH_TO_HELPER(zend_dispatch_try_catch_finally_helper, try_catch_offset, current_try_catch_offset, op_num, current_op_num);
}
ZEND_VM_HANDLER(168, ZEND_BIND_GLOBAL, CV, CONST)
@@ -7688,6 +7630,7 @@ ZEND_VM_HANDLER(168, ZEND_BIND_GLOBAL, CV, CONST)
zval *value;
zval *variable_ptr;
uint32_t idx;
+ zend_reference *ref;
ZEND_VM_REPEATABLE_OPCODE
@@ -7730,22 +7673,27 @@ ZEND_VM_C_LABEL(check_indirect):
}
}
+ if (UNEXPECTED(!Z_ISREF_P(value))) {
+ ref = (zend_reference*)emalloc(sizeof(zend_reference));
+ GC_REFCOUNT(ref) = 2;
+ GC_TYPE_INFO(ref) = IS_REFERENCE;
+ ZVAL_COPY_VALUE(&ref->val, value);
+ Z_REF_P(value) = ref;
+ Z_TYPE_INFO_P(value) = IS_REFERENCE_EX;
+ } else {
+ ref = Z_REF_P(value);
+ GC_REFCOUNT(ref)++;
+ }
+
variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
- do {
- zend_reference *ref;
+ if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) {
+ uint32_t refcnt = Z_DELREF_P(variable_ptr);
- if (UNEXPECTED(!Z_ISREF_P(value))) {
- ZVAL_NEW_REF(value, value);
- } else if (UNEXPECTED(variable_ptr == value)) {
- break;
- }
- ref = Z_REF_P(value);
- GC_REFCOUNT(ref)++;
- if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) {
- if (!Z_DELREF_P(variable_ptr)) {
+ if (EXPECTED(variable_ptr != value)) {
+ if (refcnt == 0) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(variable_ptr));
+ zval_dtor_func(Z_COUNTED_P(variable_ptr));
if (UNEXPECTED(EG(exception))) {
ZVAL_NULL(variable_ptr);
HANDLE_EXCEPTION();
@@ -7754,8 +7702,8 @@ ZEND_VM_C_LABEL(check_indirect):
GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
}
}
- ZVAL_REF(variable_ptr, ref);
- } while (0);
+ }
+ ZVAL_REF(variable_ptr, ref);
ZEND_VM_REPEAT_OPCODE(ZEND_BIND_GLOBAL);
ZEND_VM_NEXT_OPCODE();
@@ -7801,11 +7749,10 @@ ZEND_VM_C_LABEL(try_strlen):
} while (0);
}
FREE_OP1();
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-ZEND_VM_HANDLER(123, ZEND_TYPE_CHECK, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(123, ZEND_TYPE_CHECK, CONST|TMP|VAR|CV, ANY, TYPE)
{
USE_OPLINE
zval *value;
@@ -7818,7 +7765,7 @@ ZEND_VM_HANDLER(123, ZEND_TYPE_CHECK, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE != IS_CONST && UNEXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
zend_class_entry *ce = Z_OBJCE_P(value);
- if (UNEXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
+ if (EXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
EXPECTED(memcmp(ZSTR_VAL(ce->name), "__PHP_Incomplete_Class", sizeof("__PHP_Incomplete_Class") - 1) != 0)) {
result = 1;
}
@@ -7838,8 +7785,7 @@ ZEND_VM_HANDLER(123, ZEND_TYPE_CHECK, CONST|TMP|VAR|CV, ANY)
FREE_OP1();
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_HANDLER(122, ZEND_DEFINED, CONST, ANY)
@@ -7848,11 +7794,10 @@ ZEND_VM_HANDLER(122, ZEND_DEFINED, CONST, ANY)
zend_constant *c;
int result;
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
result = 1;
} else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op1), 0)) == NULL) {
result = 0;
- ZVAL_FALSE(EX_VAR(opline->result.var));
} else {
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), c);
result = 1;
@@ -7862,15 +7807,14 @@ ZEND_VM_HANDLER(122, ZEND_DEFINED, CONST, ANY)
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(151, ZEND_ASSERT_CHECK, ANY, ANY)
+ZEND_VM_HANDLER(151, ZEND_ASSERT_CHECK, ANY, JMP_ADDR)
{
USE_OPLINE
if (EG(assertions) <= 0) {
zend_op *target = OP_JMP_ADDR(opline, opline->op2);
-
- if (RETURN_VALUE_USED(target-1)) {
- ZVAL_TRUE(EX_VAR((target-1)->result.var));
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
}
ZEND_VM_JMP(target);
} else {
@@ -7878,16 +7822,18 @@ ZEND_VM_HANDLER(151, ZEND_ASSERT_CHECK, ANY, ANY)
}
}
-ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, ANY, ANY)
+ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, ANY, ANY, CLASS_FETCH)
{
uint32_t fetch_type;
+ zend_class_entry *called_scope, *scope;
USE_OPLINE
SAVE_OPLINE();
fetch_type = opline->extended_value;
- if (UNEXPECTED(EG(scope) == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use \"%s\" when no class scope is active",
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(scope == NULL)) {
+ zend_throw_error(NULL, "Cannot use \"%s\" when no class scope is active",
fetch_type == ZEND_FETCH_CLASS_SELF ? "self" :
fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static");
HANDLE_EXCEPTION();
@@ -7895,18 +7841,23 @@ ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, ANY, ANY)
switch (fetch_type) {
case ZEND_FETCH_CLASS_SELF:
- ZVAL_STR_COPY(EX_VAR(opline->result.var), EG(scope)->name);
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), scope->name);
break;
case ZEND_FETCH_CLASS_PARENT:
- if (UNEXPECTED(EG(scope)->parent == NULL)) {
- zend_throw_error(zend_ce_error,
+ if (UNEXPECTED(scope->parent == NULL)) {
+ zend_throw_error(NULL,
"Cannot use \"parent\" when current class scope has no parent");
HANDLE_EXCEPTION();
}
- ZVAL_STR_COPY(EX_VAR(opline->result.var), EG(scope)->parent->name);
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), scope->parent->name);
break;
case ZEND_FETCH_CLASS_STATIC:
- ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(called_scope)->name);
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ called_scope = Z_OBJCE(EX(This));
+ } else {
+ called_scope = Z_CE(EX(This));
+ }
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), called_scope->name);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
@@ -7917,10 +7868,8 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
{
zend_array *args;
zend_function *fbc = EX(func);
- zend_object *object = Z_OBJ(EX(This));
zval *ret = EX(return_value);
uint32_t call_info = EX_CALL_INFO() & (ZEND_CALL_NESTED | ZEND_CALL_TOP | ZEND_CALL_RELEASE_THIS);
- zend_class_entry *scope = EX(called_scope);
uint32_t num_args = EX_NUM_ARGS();
zend_execute_data *call;
USE_OPLINE
@@ -7943,9 +7892,11 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
SAVE_OPLINE();
call = execute_data;
execute_data = EG(current_execute_data) = EX(prev_execute_data);
- zend_vm_stack_free_call_frame(call);
- call = zend_vm_stack_push_call_frame(call_info, fbc->common.prototype, 2, scope, object);
- call->prev_execute_data = execute_data;
+
+ ZEND_ASSERT(zend_vm_calc_used_stack(2, fbc->common.prototype) <= (size_t)(((char*)EG(vm_stack_end)) - (char*)call));
+
+ call->func = fbc->common.prototype;
+ ZEND_CALL_NUM_ARGS(call) = 2;
ZVAL_STR(ZEND_CALL_ARG(call, 1), fbc->common.function_name);
ZVAL_ARR(ZEND_CALL_ARG(call, 2), args);
@@ -7956,10 +7907,11 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
ZEND_ASSERT(!(fbc->common.fn_flags & ZEND_ACC_GENERATOR));
- call->symbol_table = NULL;
+ if (UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
i_init_func_execute_data(call, &fbc->op_array,
ret, (fbc->common.fn_flags & ZEND_ACC_STATIC) == 0);
-
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
@@ -7973,33 +7925,19 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
EG(current_execute_data) = call;
- if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
- uint32_t i;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- zval *p = ZEND_CALL_ARG(call, 1);
-
- EG(current_execute_data) = call;
-
- for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- zend_vm_stack_free_call_frame(call);
- if (ret) {
- ZVAL_UNDEF(ret);
- }
- ZEND_VM_C_GOTO(call_trampoline_end);
- }
- p++;
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ zend_vm_stack_free_call_frame(call);
+ if (ret) {
+ ZVAL_UNDEF(ret);
}
+ ZEND_VM_C_GOTO(call_trampoline_end);
}
if (ret == NULL) {
ZVAL_NULL(&retval);
ret = &retval;
}
- Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
@@ -8010,9 +7948,9 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
#if ZEND_DEBUG
ZEND_ASSERT(
- !call->func ||
+ EG(exception) || !call->func ||
!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ zend_verify_internal_return_type(call->func, ret));
#endif
EG(current_execute_data) = call->prev_execute_data;
@@ -8034,10 +7972,9 @@ ZEND_VM_C_LABEL(call_trampoline_end):
opline = EX(opline);
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- object = Z_OBJ(call->This);
+ zend_object *object = Z_OBJ(call->This);
OBJ_RELEASE(object);
}
- EG(scope) = EX(func)->op_array.scope;
zend_vm_stack_free_call_frame(call);
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -8052,4 +7989,538 @@ ZEND_VM_C_LABEL(call_trampoline_end):
ZEND_VM_LEAVE();
}
+ZEND_VM_HANDLER(182, ZEND_BIND_LEXICAL, TMP, CV, REF)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *closure, *var;
+ zend_string *var_name;
+
+ closure = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ if (opline->extended_value) {
+ /* By-ref binding */
+ var = GET_OP2_ZVAL_PTR(BP_VAR_W);
+ ZVAL_MAKE_REF(var);
+ Z_ADDREF_P(var);
+ } else {
+ var = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ if (UNEXPECTED(Z_ISUNDEF_P(var))) {
+ SAVE_OPLINE();
+ var = GET_OP2_UNDEF_CV(var, BP_VAR_R);
+ if (UNEXPECTED(EG(exception))) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ ZVAL_DEREF(var);
+ Z_TRY_ADDREF_P(var);
+ }
+
+ var_name = CV_DEF_OF(EX_VAR_TO_NUM(opline->op2.var));
+ zend_closure_bind_var(closure, var_name, var);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(183, ZEND_BIND_STATIC, CV, CONST, REF)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ HashTable *ht;
+ zval *varname;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
+ zval_ptr_dtor(variable_ptr);
+
+ ht = EX(func)->op_array.static_variables;
+ ZEND_ASSERT(ht != NULL);
+ if (GC_REFCOUNT(ht) > 1) {
+ if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
+ GC_REFCOUNT(ht)--;
+ }
+ EX(func)->op_array.static_variables = ht = zend_array_dup(ht);
+ }
+
+ varname = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ value = zend_hash_find(ht, Z_STR_P(varname));
+
+ if (opline->extended_value) {
+ if (Z_CONSTANT_P(value)) {
+ if (UNEXPECTED(zval_update_constant_ex(value, EX(func)->op_array.scope) != SUCCESS)) {
+ ZVAL_NULL(variable_ptr);
+ HANDLE_EXCEPTION();
+ }
+ }
+ if (UNEXPECTED(!Z_ISREF_P(value))) {
+ zend_reference *ref = (zend_reference*)emalloc(sizeof(zend_reference));
+ GC_REFCOUNT(ref) = 2;
+ GC_TYPE_INFO(ref) = IS_REFERENCE;
+ ZVAL_COPY_VALUE(&ref->val, value);
+ Z_REF_P(value) = ref;
+ Z_TYPE_INFO_P(value) = IS_REFERENCE_EX;
+ ZVAL_REF(variable_ptr, ref);
+ } else {
+ Z_ADDREF_P(value);
+ ZVAL_REF(variable_ptr, Z_REF_P(value));
+ }
+ } else {
+ ZVAL_COPY(variable_ptr, value);
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_ADD, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_ADD_LONG_NO_OVERFLOW, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) + Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_ADD, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_ADD_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ fast_long_add_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_ADD, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_ADD_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_SUB, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_SUB_LONG_NO_OVERFLOW, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) - Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_SUB, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_SUB_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ fast_long_sub_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_SUB, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_SUB_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_MUL, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_MUL_LONG_NO_OVERFLOW, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) * Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_MUL, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_MUL_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+ zend_long overflow;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
+ Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_MUL, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_MUL_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_EQUAL, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_IS_EQUAL_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_EQUAL, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_IS_EQUAL_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_NOT_EQUAL, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_IS_NOT_EQUAL_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_NOT_EQUAL, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_IS_NOT_EQUAL_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST,COMMUTATIVE))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_IS_SMALLER_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_IS_SMALLER_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER_OR_EQUAL, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_IS_SMALLER_OR_EQUAL_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_IS_SMALLER_OR_EQUAL, (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE), ZEND_IS_SMALLER_OR_EQUAL_DOUBLE, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(SMART_BRANCH,NO_CONST_CONST))
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG_NO_OVERFLOW, TMPVARCV, ANY, SPEC(RETVAL))
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ Z_LVAL_P(var_ptr)++;
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == MAY_BE_LONG), ZEND_PRE_INC_LONG, TMPVARCV, ANY, SPEC(RETVAL))
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ fast_long_increment_function(var_ptr);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_PRE_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_INC_LONG_OR_DOUBLE, TMPVARCV, ANY, SPEC(RETVAL))
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)++;
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG_NO_OVERFLOW, TMPVARCV, ANY, SPEC(RETVAL))
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ Z_LVAL_P(var_ptr)--;
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == MAY_BE_LONG), ZEND_PRE_DEC_LONG, TMPVARCV, ANY, SPEC(RETVAL))
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ fast_long_decrement_function(var_ptr);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_PRE_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_PRE_DEC_LONG_OR_DOUBLE, TMPVARCV, ANY, SPEC(RETVAL))
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)--;
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_POST_INC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG_NO_OVERFLOW, TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ Z_LVAL_P(var_ptr)++;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == MAY_BE_LONG), ZEND_POST_INC_LONG, TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ fast_long_increment_function(var_ptr);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_POST_INC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_INC_LONG_OR_DOUBLE, TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)++;
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG_NO_OVERFLOW, TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ Z_LVAL_P(var_ptr)--;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG, TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ fast_long_decrement_function(var_ptr);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE)), ZEND_POST_DEC_LONG_OR_DOUBLE, TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)--;
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_QM_ASSIGN, (op1_info == MAY_BE_DOUBLE), ZEND_QM_ASSIGN_DOUBLE, CONST|TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value;
+
+ value = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(value));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_QM_ASSIGN, (!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE)))), ZEND_QM_ASSIGN_NOREF, CONST|TMPVARCV, ANY)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value;
+
+ value = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_TYPE_SPEC_HANDLER(ZEND_FETCH_DIM_R, (!(op2_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))), ZEND_FETCH_DIM_R_INDEX, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *container, *dim, *value;
+ zend_long offset;
+
+ container = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ dim = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ZEND_VM_C_LABEL(fetch_dim_r_index_array):
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, ZEND_VM_C_LABEL(fetch_dim_r_index_undef));
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (OP1_TYPE & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ FREE_OP1();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (OP1_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ ZEND_VM_C_GOTO(fetch_dim_r_index_array);
+ } else {
+ ZEND_VM_C_GOTO(fetch_dim_r_index_slow);
+ }
+ } else {
+ZEND_VM_C_LABEL(fetch_dim_r_index_slow):
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
+ FREE_OP1();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+ZEND_VM_C_LABEL(fetch_dim_r_index_undef):
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+ FREE_OP1();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
ZEND_VM_DEFINE_OP(137, ZEND_OP_DATA);
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 1d78881232..ca5b343cf5 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -306,16 +306,31 @@ static zend_uchar zend_user_opcodes[256] = {0,
241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
};
+#define SPEC_START_MASK 0x0000ffff
+#define SPEC_RULE_OP1 0x00010000
+#define SPEC_RULE_OP2 0x00020000
+#define SPEC_RULE_OP_DATA 0x00040000
+#define SPEC_RULE_RETVAL 0x00080000
+#define SPEC_RULE_QUICK_ARG 0x00100000
+#define SPEC_RULE_SMART_BRANCH 0x00200000
+#define SPEC_RULE_DIM_OBJ 0x00400000
+
+static const uint32_t *zend_spec_handlers;
static const void **zend_opcode_handlers;
+static int zend_handlers_count;
static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op);
#ifdef ZEND_VM_FP_GLOBAL_REG
-register zend_execute_data *execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);
+#pragma GCC diagnostic ignored "-Wvolatile-register-var"
+register zend_execute_data* volatile execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);
+#pragma GCC diagnostic warning "-Wvolatile-register-var"
#endif
#ifdef ZEND_VM_IP_GLOBAL_REG
-register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);
+#pragma GCC diagnostic ignored "-Wvolatile-register-var"
+register const zend_op* volatile opline __asm__(ZEND_VM_IP_GLOBAL_REG);
+#pragma GCC diagnostic warning "-Wvolatile-register-var"
#endif
#ifdef ZEND_VM_FP_GLOBAL_REG
@@ -333,8 +348,12 @@ register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);
#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
# define ZEND_OPCODE_HANDLER_RET void
# define ZEND_VM_TAIL_CALL(call) call; return
-# define ZEND_VM_CONTINUE() return
-# define ZEND_VM_RETURN() opline = NULL; ZEND_VM_CONTINUE()
+# ifdef ZEND_VM_TAIL_CALL_DISPATCH
+# define ZEND_VM_CONTINUE() ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); return
+# else
+# define ZEND_VM_CONTINUE() return
+# endif
+# define ZEND_VM_RETURN() opline = NULL; return
#else
# define ZEND_OPCODE_HANDLER_RET int
# define ZEND_VM_TAIL_CALL(call) return call
@@ -348,27 +367,28 @@ typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_H
#undef DCL_OPLINE
#undef USE_OPLINE
#undef LOAD_OPLINE
+#undef LOAD_OPLINE_EX
#undef SAVE_OPLINE
#define DCL_OPLINE
#ifdef ZEND_VM_IP_GLOBAL_REG
# define OPLINE opline
# define USE_OPLINE
# define LOAD_OPLINE() opline = EX(opline)
+# define LOAD_NEXT_OPLINE() opline = EX(opline) + 1
# define SAVE_OPLINE() EX(opline) = opline
#else
# define OPLINE EX(opline)
# define USE_OPLINE const zend_op *opline = EX(opline);
# define LOAD_OPLINE()
+# define LOAD_NEXT_OPLINE() ZEND_VM_INC_OPCODE()
# define SAVE_OPLINE()
#endif
-#undef CHECK_EXCEPTION
#undef HANDLE_EXCEPTION
#undef HANDLE_EXCEPTION_LEAVE
-#define CHECK_EXCEPTION() LOAD_OPLINE()
#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()
#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()
#if defined(ZEND_VM_FP_GLOBAL_REG)
-# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()
+# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()
# define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()
#elif defined(ZEND_VM_IP_GLOBAL_REG)
# define ZEND_VM_ENTER() opline = EG(current_execute_data)->opline; return 1
@@ -396,10 +416,11 @@ ZEND_API void execute_ex(zend_execute_data *ex)
LOAD_OPLINE();
+ ZEND_VM_INTERRUPT_CHECK();
while (1) {
#if !defined(ZEND_VM_FP_GLOBAL_REG) || !defined(ZEND_VM_IP_GLOBAL_REG)
- int ret;
+ int ret;
#endif
#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -416,6 +437,7 @@ ZEND_API void execute_ex(zend_execute_data *ex)
#else
if (EXPECTED(ret > 0)) {
execute_data = EG(current_execute_data);
+ ZEND_VM_INTERRUPT_CHECK();
} else {
# ifdef ZEND_VM_IP_GLOBAL_REG
opline = orig_opline;
@@ -437,7 +459,7 @@ ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value)
return;
}
- execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE,
+ execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
(zend_function*)op_array, 0, zend_get_called_scope(EG(current_execute_data)), zend_get_this_object(EG(current_execute_data)));
if (EG(current_execute_data)) {
execute_data->symbol_table = zend_rebuild_symbol_table();
@@ -455,38 +477,67 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
zend_execute_data *old_execute_data;
uint32_t call_info = EX_CALL_INFO();
- if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_FUNCTION) {
- zend_object *object;
+ if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP|ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS|ZEND_CALL_ALLOCATED)) == 0)) {
+ i_free_compiled_variables(execute_data);
+ EG(current_execute_data) = EX(prev_execute_data);
+ if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
+ zend_object *object = Z_OBJ(execute_data->This);
+#if 0
+ if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
+#else
+ if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
+#endif
+ GC_REFCOUNT(object)--;
+ if (GC_REFCOUNT(object) == 1) {
+ zend_object_store_ctor_failed(object);
+ }
+ }
+ OBJ_RELEASE(object);
+ } else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
+ OBJ_RELEASE((zend_object*)execute_data->func->op_array.prototype);
+ }
+ EG(vm_stack_top) = (zval*)execute_data;
+ execute_data = EX(prev_execute_data);
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ const zend_op *old_opline = EX(opline);
+ zend_throw_exception_internal(NULL);
+ if (RETURN_VALUE_USED(old_opline)) {
+ zval_ptr_dtor(EX_VAR(old_opline->result.var));
+ }
+ HANDLE_EXCEPTION_LEAVE();
+ }
+
+ LOAD_NEXT_OPLINE();
+ ZEND_VM_LEAVE();
+ } else if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP)) == 0)) {
i_free_compiled_variables(execute_data);
- if (UNEXPECTED(EX(symbol_table) != NULL)) {
+
+ if (UNEXPECTED(call_info & ZEND_CALL_HAS_SYMBOL_TABLE)) {
zend_clean_and_cache_symbol_table(EX(symbol_table));
}
- zend_vm_stack_free_extra_args_ex(call_info, execute_data);
- old_execute_data = execute_data;
- execute_data = EG(current_execute_data) = EX(prev_execute_data);
- if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
- OBJ_RELEASE((zend_object*)old_execute_data->func->op_array.prototype);
- }
+ EG(current_execute_data) = EX(prev_execute_data);
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- object = Z_OBJ(old_execute_data->This);
+ zend_object *object = Z_OBJ(execute_data->This);
#if 0
if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
- if (!(EX(opline)->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#else
if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
- if (!(call_info & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#endif
- GC_REFCOUNT(object)--;
- }
+ GC_REFCOUNT(object)--;
if (GC_REFCOUNT(object) == 1) {
zend_object_store_ctor_failed(object);
}
}
OBJ_RELEASE(object);
+ } else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
+ OBJ_RELEASE((zend_object*)execute_data->func->op_array.prototype);
}
- EG(scope) = EX(func)->op_array.scope;
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
+ old_execute_data = execute_data;
+ execute_data = EX(prev_execute_data);
zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -498,10 +549,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
HANDLE_EXCEPTION_LEAVE();
}
- LOAD_OPLINE();
- ZEND_VM_INC_OPCODE();
+ LOAD_NEXT_OPLINE();
ZEND_VM_LEAVE();
- } else if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_CODE) {
+ } else if (EXPECTED((call_info & ZEND_CALL_TOP) == 0)) {
zend_detach_symbol_table(execute_data);
destroy_op_array(&EX(func)->op_array);
efree_size(EX(func), sizeof(zend_op_array));
@@ -515,27 +565,29 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
HANDLE_EXCEPTION_LEAVE();
}
- LOAD_OPLINE();
- ZEND_VM_INC_OPCODE();
+ LOAD_NEXT_OPLINE();
ZEND_VM_LEAVE();
} else {
- if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_TOP_FUNCTION) {
+ if (EXPECTED((call_info & ZEND_CALL_CODE) == 0)) {
i_free_compiled_variables(execute_data);
- if (UNEXPECTED(EX(symbol_table) != NULL)) {
- zend_clean_and_cache_symbol_table(EX(symbol_table));
+ if (UNEXPECTED(call_info & (ZEND_CALL_HAS_SYMBOL_TABLE|ZEND_CALL_FREE_EXTRA_ARGS))) {
+ if (UNEXPECTED(call_info & ZEND_CALL_HAS_SYMBOL_TABLE)) {
+ zend_clean_and_cache_symbol_table(EX(symbol_table));
+ }
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
}
- zend_vm_stack_free_extra_args_ex(call_info, execute_data);
EG(current_execute_data) = EX(prev_execute_data);
if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
}
+ ZEND_VM_RETURN();
} else /* if (call_kind == ZEND_CALL_TOP_CODE) */ {
zend_array *symbol_table = EX(symbol_table);
zend_detach_symbol_table(execute_data);
old_execute_data = EX(prev_execute_data);
while (old_execute_data) {
- if (old_execute_data->func && ZEND_USER_CODE(old_execute_data->func->op_array.type)) {
+ if (old_execute_data->func && (ZEND_CALL_INFO(old_execute_data) & ZEND_CALL_HAS_SYMBOL_TABLE)) {
if (old_execute_data->symbol_table == symbol_table) {
zend_attach_symbol_table(old_execute_data);
}
@@ -544,9 +596,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_
old_execute_data = old_execute_data->prev_execute_data;
}
EG(current_execute_data) = EX(prev_execute_data);
+ ZEND_VM_RETURN();
}
-
- ZEND_VM_RETURN();
}
}
@@ -558,12 +609,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_H
ZEND_VM_CONTINUE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_execute_data *call = EX(call);
zend_function *fbc = call->func;
zval *ret;
+ zval retval;
SAVE_OPLINE();
EX(call) = call->prev_execute_data;
@@ -571,40 +623,87 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_HANDLER(ZEND_OPC
call->prev_execute_data = execute_data;
EG(current_execute_data) = call;
- ret = EX_VAR(opline->result.var);
+ ret = 0 ? EX_VAR(opline->result.var) : &retval;
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
fbc->internal_function.handler(call, ret);
#if ZEND_DEBUG
ZEND_ASSERT(
- !call->func ||
+ EG(exception) || !call->func ||
!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT(!Z_ISREF_P(ret));
#endif
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
zend_vm_stack_free_call_frame(call);
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ if (!0) {
+ zval_ptr_dtor(ret);
}
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
- if (RETURN_VALUE_USED(opline)) {
+ if (0) {
zval_ptr_dtor(EX_VAR(opline->result.var));
}
HANDLE_EXCEPTION();
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+ zval retval;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
+
+ ret = 1 ? EX_VAR(opline->result.var) : &retval;
+ ZVAL_NULL(ret);
+
+ fbc->internal_function.handler(call, ret);
+
+#if ZEND_DEBUG
+ ZEND_ASSERT(
+ EG(exception) || !call->func ||
+ !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT(!Z_ISREF_P(ret));
+#endif
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+
+ if (!1) {
+ zval_ptr_dtor(ret);
+ }
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (1) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
+
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_execute_data *call = EX(call);
@@ -614,13 +713,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_HANDLER(ZEND_OPC
SAVE_OPLINE();
EX(call) = call->prev_execute_data;
- EG(scope) = NULL;
ret = NULL;
- call->symbol_table = NULL;
- if (RETURN_VALUE_USED(opline)) {
+ if (0) {
ret = EX_VAR(opline->result.var);
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
}
call->prev_execute_data = execute_data;
@@ -629,7 +725,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_HANDLER(ZEND_OPC
ZEND_VM_ENTER();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_execute_data *call = EX(call);
@@ -639,34 +735,41 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(
SAVE_OPLINE();
EX(call) = call->prev_execute_data;
- if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
- EG(scope) = NULL;
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ret = EX_VAR(opline->result.var);
- zend_generator_create_zval(call, &fbc->op_array, ret);
- Z_VAR_FLAGS_P(ret) = 0;
- } else {
- zend_vm_stack_free_args(call);
- }
+ ret = NULL;
+ if (1) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ }
- zend_vm_stack_free_call_frame(call);
- } else {
- ret = NULL;
- call->symbol_table = NULL;
- if (RETURN_VALUE_USED(opline)) {
- ret = EX_VAR(opline->result.var);
- ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
- }
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
- call->prev_execute_data = execute_data;
- i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+ ZEND_VM_ENTER();
+}
- ZEND_VM_ENTER();
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
+ ret = NULL;
+ if (0) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
}
- EG(scope) = EX(func)->op_array.scope;
+
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+
+ ZEND_VM_ENTER();
} else {
+ zval retval;
ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
@@ -682,58 +785,127 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(
call->prev_execute_data = execute_data;
EG(current_execute_data) = call;
- if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
- uint32_t i;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- zval *p = ZEND_CALL_ARG(call, 1);
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ zend_vm_stack_free_call_frame(call);
+ zend_throw_exception_internal(NULL);
+ HANDLE_EXCEPTION();
+ }
- for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
- p++;
- }
+ ret = 0 ? EX_VAR(opline->result.var) : &retval;
+ ZVAL_NULL(ret);
+
+ fbc->internal_function.handler(call, ret);
+
+#if ZEND_DEBUG
+ if (!EG(exception) && call->func) {
+ ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ ? Z_ISREF_P(ret) : !Z_ISREF_P(ret));
+ }
+#endif
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+ zend_vm_stack_free_call_frame(call);
+
+ if (!0) {
+ zval_ptr_dtor(ret);
+ }
+ }
+
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (0) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
+ ret = NULL;
+ if (1) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ }
+
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 0);
+
+ ZEND_VM_ENTER();
+ } else {
+ zval retval;
+ ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
+
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
+ zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
+ fbc->common.scope ? ZSTR_VAL(fbc->common.scope->name) : "",
+ fbc->common.scope ? "::" : "",
+ ZSTR_VAL(fbc->common.function_name));
if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- zend_vm_stack_free_call_frame(call);
- zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
}
- ret = EX_VAR(opline->result.var);
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
+
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ zend_vm_stack_free_call_frame(call);
+ zend_throw_exception_internal(NULL);
+ HANDLE_EXCEPTION();
+ }
+
+ ret = 1 ? EX_VAR(opline->result.var) : &retval;
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
fbc->internal_function.handler(call, ret);
#if ZEND_DEBUG
- ZEND_ASSERT(
- !call->func ||
- !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ if (!EG(exception) && call->func) {
+ ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ ? Z_ISREF_P(ret) : !Z_ISREF_P(ret));
+ }
#endif
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
zend_vm_stack_free_call_frame(call);
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ if (!1) {
+ zval_ptr_dtor(ret);
}
}
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
- if (RETURN_VALUE_USED(opline)) {
+ if (1) {
zval_ptr_dtor(EX_VAR(opline->result.var));
}
HANDLE_EXCEPTION();
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_execute_data *call = EX(call);
@@ -745,7 +917,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPC
EX(call) = call->prev_execute_data;
if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
- zend_throw_error(zend_ce_error, "Cannot call abstract method %s::%s()", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
HANDLE_EXCEPTION();
}
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
@@ -762,74 +934,37 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPC
LOAD_OPLINE();
if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
- EG(scope) = fbc->common.scope;
- if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ret = EX_VAR(opline->result.var);
- zend_generator_create_zval(call, &fbc->op_array, ret);
- Z_VAR_FLAGS_P(ret) = 0;
- } else {
- if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_CLOSURE)) {
- OBJ_RELEASE((zend_object*)fbc->op_array.prototype);
- }
- zend_vm_stack_free_args(call);
- }
- } else {
- ret = NULL;
- call->symbol_table = NULL;
- if (RETURN_VALUE_USED(opline)) {
- ret = EX_VAR(opline->result.var);
- ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = 0;
- }
+ ret = NULL;
+ if (0) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
+ }
- call->prev_execute_data = execute_data;
- i_init_func_execute_data(call, &fbc->op_array, ret, 1);
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 1);
- if (EXPECTED(zend_execute_ex == execute_ex)) {
- ZEND_VM_ENTER();
- } else {
- ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
- zend_execute_ex(call);
- }
+ if (EXPECTED(zend_execute_ex == execute_ex)) {
+ ZEND_VM_ENTER();
+ } else {
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
+ zend_execute_ex(call);
}
} else if (EXPECTED(fbc->type < ZEND_USER_FUNCTION)) {
- int should_change_scope = 0;
-
- if (fbc->common.scope) {
- should_change_scope = 1;
- EG(scope) = fbc->common.scope;
- }
+ zval retval;
call->prev_execute_data = execute_data;
EG(current_execute_data) = call;
- if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
- uint32_t i;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- zval *p = ZEND_CALL_ARG(call, 1);
-
- for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- if (RETURN_VALUE_USED(opline)) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
- if (UNEXPECTED(should_change_scope)) {
- goto fcall_end_change_scope;
- } else {
- goto fcall_end;
- }
- }
- p++;
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ if (0) {
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
}
+ goto fcall_end;
}
- ret = EX_VAR(opline->result.var);
+ ret = 0 ? EX_VAR(opline->result.var) : &retval;
ZVAL_NULL(ret);
- Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
@@ -839,98 +974,261 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPC
}
#if ZEND_DEBUG
- ZEND_ASSERT(
- !call->func ||
- !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ if (!EG(exception) && call->func) {
+ ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ ? Z_ISREF_P(ret) : !Z_ISREF_P(ret));
+ }
#endif
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ if (!0) {
+ zval_ptr_dtor(ret);
}
- if (UNEXPECTED(should_change_scope)) {
- goto fcall_end_change_scope;
- } else {
- goto fcall_end;
- }
} else { /* ZEND_OVERLOADED_FUNCTION */
- EG(scope) = fbc->common.scope;
+ zval retval;
- ZVAL_NULL(EX_VAR(opline->result.var));
+ ret = 0 ? EX_VAR(opline->result.var) : &retval;
+
+ call->prev_execute_data = execute_data;
- /* Not sure what should be done here if it's a static method */
+ if (UNEXPECTED(!zend_do_fcall_overloaded(fbc, call, ret))) {
+ HANDLE_EXCEPTION();
+ }
+
+ if (!0) {
+ zval_ptr_dtor(ret);
+ }
+ }
+
+fcall_end:
+ if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
object = Z_OBJ(call->This);
- if (EXPECTED(object != NULL)) {
- call->prev_execute_data = execute_data;
- EG(current_execute_data) = call;
- object->handlers->call_method(fbc->common.function_name, object, call, EX_VAR(opline->result.var));
- EG(current_execute_data) = call->prev_execute_data;
- } else {
- zend_throw_error(zend_ce_error, "Cannot call overloaded function for non-object");
#if 0
- //TODO: implement clean exit ???
- zend_vm_stack_free_args(call);
+ if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
+#else
+ if (UNEXPECTED(EG(exception) != NULL) && (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR)) {
+#endif
+ GC_REFCOUNT(object)--;
+ if (GC_REFCOUNT(object) == 1) {
+ zend_object_store_ctor_failed(object);
+ }
+ }
+ OBJ_RELEASE(object);
+ }
- zend_vm_stack_free_call_frame(call);
+ zend_vm_stack_free_call_frame(call);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zend_throw_exception_internal(NULL);
+ if (0) {
+ zval_ptr_dtor(EX_VAR(opline->result.var));
+ }
+ HANDLE_EXCEPTION();
+ }
- if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- zend_string_release(fbc->common.function_name);
- }
- efree(fbc);
-#endif
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_execute_data *call = EX(call);
+ zend_function *fbc = call->func;
+ zend_object *object;
+ zval *ret;
+
+ SAVE_OPLINE();
+ EX(call) = call->prev_execute_data;
+ if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
+ zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
HANDLE_EXCEPTION();
}
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
+ zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
+ fbc->common.scope ? ZSTR_VAL(fbc->common.scope->name) : "",
+ fbc->common.scope ? "::" : "",
+ ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ }
- zend_vm_stack_free_args(call);
+ LOAD_OPLINE();
- if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- zend_string_release(fbc->common.function_name);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
+ ret = NULL;
+ if (1) {
+ ret = EX_VAR(opline->result.var);
+ ZVAL_NULL(ret);
}
- efree(fbc);
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(EX_VAR(opline->result.var));
+ call->prev_execute_data = execute_data;
+ i_init_func_execute_data(call, &fbc->op_array, ret, 1);
+
+ if (EXPECTED(zend_execute_ex == execute_ex)) {
+ ZEND_VM_ENTER();
+ } else {
+ ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
+ zend_execute_ex(call);
+ }
+ } else if (EXPECTED(fbc->type < ZEND_USER_FUNCTION)) {
+ zval retval;
+
+ call->prev_execute_data = execute_data;
+ EG(current_execute_data) = call;
+
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ if (1) {
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
+ }
+ goto fcall_end;
+ }
+
+ ret = 1 ? EX_VAR(opline->result.var) : &retval;
+ ZVAL_NULL(ret);
+
+ if (!zend_execute_internal) {
+ /* saves one function call if zend_execute_internal is not used */
+ fbc->internal_function.handler(call, ret);
} else {
- Z_VAR_FLAGS_P(EX_VAR(opline->result.var)) = 0;
+ zend_execute_internal(call, ret);
+ }
+
+#if ZEND_DEBUG
+ if (!EG(exception) && call->func) {
+ ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
+ zend_verify_internal_return_type(call->func, ret));
+ ZEND_ASSERT((call->func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ ? Z_ISREF_P(ret) : !Z_ISREF_P(ret));
+ }
+#endif
+
+ EG(current_execute_data) = call->prev_execute_data;
+ zend_vm_stack_free_args(call);
+
+ if (!1) {
+ zval_ptr_dtor(ret);
+ }
+
+ } else { /* ZEND_OVERLOADED_FUNCTION */
+ zval retval;
+
+ ret = 1 ? EX_VAR(opline->result.var) : &retval;
+
+ call->prev_execute_data = execute_data;
+
+ if (UNEXPECTED(!zend_do_fcall_overloaded(fbc, call, ret))) {
+ HANDLE_EXCEPTION();
+ }
+
+ if (!1) {
+ zval_ptr_dtor(ret);
}
}
-fcall_end_change_scope:
+fcall_end:
if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
object = Z_OBJ(call->This);
#if 0
if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
- if (!(opline->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#else
if (UNEXPECTED(EG(exception) != NULL) && (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR)) {
- if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
#endif
- GC_REFCOUNT(object)--;
- }
+ GC_REFCOUNT(object)--;
if (GC_REFCOUNT(object) == 1) {
zend_object_store_ctor_failed(object);
}
}
OBJ_RELEASE(object);
}
- EG(scope) = EX(func)->op_array.scope;
-fcall_end:
zend_vm_stack_free_call_frame(call);
if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL);
- if (RETURN_VALUE_USED(opline)) {
+ if (1) {
zval_ptr_dtor(EX_VAR(opline->result.var));
}
HANDLE_EXCEPTION();
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_CREATE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ zval *return_value = EX(return_value);
+
+ if (EXPECTED(return_value)) {
+ USE_OPLINE
+ zend_generator *generator;
+ zend_execute_data *gen_execute_data;
+ uint32_t num_args, used_stack, call_info;
+
+ object_init_ex(return_value, zend_ce_generator);
+
+ /*
+ * Normally the execute_data is allocated on the VM stack (because it does
+ * not actually do any allocation and thus is faster). For generators
+ * though this behavior would be suboptimal, because the (rather large)
+ * structure would have to be copied back and forth every time execution is
+ * suspended or resumed. That's why for generators the execution context
+ * is allocated on heap.
+ */
+ num_args = EX_NUM_ARGS();
+ used_stack = (ZEND_CALL_FRAME_SLOT + num_args + EX(func)->op_array.last_var + EX(func)->op_array.T - MIN(EX(func)->op_array.num_args, num_args)) * sizeof(zval);
+ gen_execute_data = (zend_execute_data*)emalloc(used_stack);
+ memcpy(gen_execute_data, execute_data, used_stack);
+
+ /* Save execution context in generator object. */
+ generator = (zend_generator *) Z_OBJ_P(EX(return_value));
+ generator->execute_data = gen_execute_data;
+ generator->frozen_call_stack = NULL;
+ generator->execute_fake.opline = NULL;
+ generator->execute_fake.func = NULL;
+ generator->execute_fake.prev_execute_data = NULL;
+ ZVAL_OBJ(&generator->execute_fake.This, (zend_object *) generator);
+
+ gen_execute_data->opline = opline + 1;
+ /* EX(return_value) keeps pointer to zend_object (not a real zval) */
+ gen_execute_data->return_value = (zval*)generator;
+ call_info = Z_TYPE_INFO(EX(This));
+ if ((call_info & Z_TYPE_MASK) == IS_OBJECT
+ && !(call_info & ((ZEND_CALL_CLOSURE|ZEND_CALL_RELEASE_THIS) << ZEND_CALL_INFO_SHIFT))) {
+ ZEND_ADD_CALL_FLAG_EX(call_info, ZEND_CALL_RELEASE_THIS);
+ Z_ADDREF(gen_execute_data->This);
+ }
+ ZEND_ADD_CALL_FLAG_EX(call_info, (ZEND_CALL_TOP_FUNCTION | ZEND_CALL_ALLOCATED | ZEND_CALL_GENERATOR));
+ Z_TYPE_INFO(gen_execute_data->This) = call_info;
+ gen_execute_data->prev_execute_data = NULL;
+
+ call_info = EX_CALL_INFO();
+ EG(current_execute_data) = EX(prev_execute_data);
+ if (EXPECTED(!(call_info & (ZEND_CALL_TOP|ZEND_CALL_ALLOCATED)))) {
+ EG(vm_stack_top) = (zval*)execute_data;
+ execute_data = EX(prev_execute_data);
+ LOAD_NEXT_OPLINE();
+ ZEND_VM_LEAVE();
+ } else if (EXPECTED(!(call_info & ZEND_CALL_TOP))) {
+ zend_execute_data *old_execute_data = execute_data;
+ execute_data = EX(prev_execute_data);
+ zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
+ LOAD_NEXT_OPLINE();
+ ZEND_VM_LEAVE();
+ } else {
+ ZEND_VM_RETURN();
+ }
+ } else {
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ }
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_UNPACK_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -952,7 +1250,7 @@ send_again:
zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
- if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
+ if ((opline->op1_type & (IS_VAR|IS_CV)) && Z_REFCOUNT_P(args) > 1) {
uint32_t i;
int separate = 0;
@@ -964,21 +1262,21 @@ send_again:
}
}
if (separate) {
- zval_copy_ctor(args);
+ SEPARATE_ARRAY(args);
ht = Z_ARRVAL_P(args);
}
}
ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
if (name) {
- zend_throw_error(zend_ce_error, "Cannot unpack array with string keys");
+ zend_throw_error(NULL, "Cannot unpack array with string keys");
FREE_OP(free_op1);
HANDLE_EXCEPTION();
}
top = ZEND_CALL_ARG(EX(call), arg_num);
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
- if (!Z_IMMUTABLE_P(args)) {
+ if (Z_REFCOUNT_P(args) == 1) {
ZVAL_MAKE_REF(arg);
Z_ADDREF_P(arg);
ZVAL_REF(top, Z_REF_P(arg));
@@ -1016,35 +1314,32 @@ send_again:
if (iter->funcs->rewind) {
iter->funcs->rewind(iter);
- if (UNEXPECTED(EG(exception) != NULL)) {
- goto unpack_iter_dtor;
- }
}
for (; iter->funcs->valid(iter) == SUCCESS; ++arg_num) {
zval *arg, *top;
if (UNEXPECTED(EG(exception) != NULL)) {
- goto unpack_iter_dtor;
+ break;
}
arg = iter->funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- goto unpack_iter_dtor;
+ break;
}
if (iter->funcs->get_current_key) {
zval key;
iter->funcs->get_current_key(iter, &key);
if (UNEXPECTED(EG(exception) != NULL)) {
- goto unpack_iter_dtor;
+ break;
}
if (Z_TYPE(key) == IS_STRING) {
- zend_throw_error(zend_ce_error,
+ zend_throw_error(NULL,
"Cannot unpack Traversable with string keys");
zend_string_release(Z_STR(key));
- goto unpack_iter_dtor;
+ break;
}
zval_dtor(&key);
@@ -1072,12 +1367,8 @@ send_again:
ZEND_CALL_NUM_ARGS(EX(call))++;
iter->funcs->move_forward(iter);
- if (UNEXPECTED(EG(exception) != NULL)) {
- goto unpack_iter_dtor;
- }
}
-unpack_iter_dtor:
zend_iterator_dtor(iter);
}
} else if (EXPECTED(Z_ISREF_P(args))) {
@@ -1091,8 +1382,7 @@ unpack_iter_dtor:
}
FREE_OP(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1100,7 +1390,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O
USE_OPLINE
zend_free_op free_op1;
zval *args;
- SAVE_OPLINE();
SAVE_OPLINE();
args = get_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, BP_VAR_R);
@@ -1116,12 +1405,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
} else {
uint32_t arg_num;
HashTable *ht;
@@ -1131,22 +1420,6 @@ send_array:
ht = Z_ARRVAL_P(args);
zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht));
- if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
- int separate = 0;
-
- /* check if any of arguments are going to be passed by reference */
- for (arg_num = 0; arg_num < zend_hash_num_elements(ht); arg_num++) {
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + 1)) {
- separate = 1;
- break;
- }
- }
- if (separate) {
- zval_copy_ctor(args);
- ht = Z_ARRVAL_P(args);
- }
- }
-
arg_num = 1;
param = ZEND_CALL_ARG(EX(call), 1);
ZEND_HASH_FOREACH_VAL(ht, arg) {
@@ -1163,38 +1436,30 @@ send_array:
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
-
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
break;
}
-
- ZVAL_NEW_REF(arg, arg);
}
- Z_ADDREF_P(arg);
- } else{
+ } else {
if (Z_ISREF_P(arg) &&
!(EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
/* don't separate references for __call */
arg = Z_REFVAL_P(arg);
}
- if (Z_OPT_REFCOUNTED_P(arg)) {
- Z_ADDREF_P(arg);
- }
}
- ZVAL_COPY_VALUE(param, arg);
+ ZVAL_COPY(param, arg);
ZEND_CALL_NUM_ARGS(EX(call))++;
arg_num++;
param++;
} ZEND_HASH_FOREACH_END();
}
FREE_OP(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1204,14 +1469,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_
if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num)))) {
- HANDLE_EXCEPTION();
- }
+ zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num));
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)) || EG(exception))) {
HANDLE_EXCEPTION();
}
}
@@ -1256,8 +1520,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_VARIADIC_SPEC_HANDLER(ZEN
array_init(params);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1270,7 +1533,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEN
do {
EG(error_reporting) = 0;
if (!EG(error_reporting_ini_entry)) {
- zend_ini_entry *p = zend_hash_str_find_ptr(EG(ini_directives), "error_reporting", sizeof("error_reporting")-1);
+ zend_ini_entry *p = zend_hash_find_ptr(EG(ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING]);
if (p) {
EG(error_reporting_ini_entry) = p;
} else {
@@ -1282,7 +1545,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEN
ALLOC_HASHTABLE(EG(modified_ini_directives));
zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
}
- if (EXPECTED(zend_hash_str_add_ptr(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting")-1, EG(error_reporting_ini_entry)) != NULL)) {
+ if (EXPECTED(zend_hash_add_ptr(EG(modified_ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING], EG(error_reporting_ini_entry)) != NULL)) {
EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
EG(error_reporting_ini_entry)->modified = 1;
@@ -1295,30 +1558,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEN
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_STMT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
if (!EG(no_extensions)) {
SAVE_OPLINE();
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(func));
- CHECK_EXCEPTION();
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, execute_data);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
if (!EG(no_extensions)) {
SAVE_OPLINE();
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(func));
- CHECK_EXCEPTION();
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, execute_data);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_FCALL_END_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
if (!EG(no_extensions)) {
SAVE_OPLINE();
- zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(func));
- CHECK_EXCEPTION();
+ zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, execute_data);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -1329,33 +1598,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEN
SAVE_OPLINE();
Z_CE_P(EX_VAR(opline->result.var)) = do_bind_class(&EX(func)->op_array, opline, EG(class_table), 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
-
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
-
- SAVE_OPLINE();
- Z_CE_P(EX_VAR(opline->result.var)) = do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
-
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
- zval *zce, *orig_zce;
-
- SAVE_OPLINE();
- if ((zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)))) == NULL ||
- ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)))) != NULL &&
- Z_CE_P(zce) != Z_CE_P(orig_zce))) {
- do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1364,40 +1607,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLE
USE_OPLINE
SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)));
+ ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)));
Z_CE_P(EX_VAR(opline->result.var)) = ce;
ZEND_ASSERT(ce != NULL);
if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))) {
zend_verify_abstract_class(ce);
}
ce->ce_flags |= ZEND_ACC_ANON_BOUND;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
-
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_class_entry *ce;
- USE_OPLINE
-
- SAVE_OPLINE();
- ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)));
- Z_CE_P(EX_VAR(opline->result.var)) = ce;
- ZEND_ASSERT(ce != NULL);
-
- if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
- }
-
- zend_do_inheritance(ce, Z_CE_P(EX_VAR(opline->extended_value)));
- ce->ce_flags |= ZEND_ACC_ANON_BOUND;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1406,8 +1629,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_FUNCTION_SPEC_HANDLER(
SAVE_OPLINE();
do_bind_function(&EX(func)->op_array, opline, EG(function_table), 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1419,7 +1641,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE
if (zend_ticks_function) {
SAVE_OPLINE();
zend_ticks_function(opline->extended_value);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -1427,11 +1649,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
ZEND_VM_NEXT_OPCODE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
ZEND_VM_NEXT_OPCODE();
}
@@ -1442,15 +1668,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OP
zend_class_entry *trait;
SAVE_OPLINE();
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- trait = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ trait = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(trait == NULL)) {
trait = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)),
EX_CONSTANT(opline->op2) + 1,
ZEND_FETCH_CLASS_TRAIT);
if (UNEXPECTED(trait == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (!(trait->ce_flags & ZEND_ACC_TRAIT)) {
zend_error_noreturn(E_ERROR, "%s cannot use %s - it is not a trait", ZSTR_VAL(ce->name), ZSTR_VAL(trait->name));
@@ -1460,8 +1684,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OP
zend_do_implement_trait(ce, trait);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_TRAITS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1471,72 +1694,103 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_TRAITS_SPEC_HANDLER(ZEND_
SAVE_OPLINE();
zend_do_bind_traits(ce);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_dispatch_try_catch_finally_helper_SPEC(uint32_t try_catch_offset, uint32_t op_num ZEND_OPCODE_HANDLER_ARGS_DC)
{
- uint32_t op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
- int i;
- uint32_t catch_op_num = 0, finally_op_num = 0, finally_op_end = 0;
- int in_finally = 0;
+ /* May be NULL during generator closing (only finally blocks are executed) */
+ zend_object *ex = EG(exception);
- ZEND_VM_INTERRUPT_CHECK();
- for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
- if (EX(func)->op_array.try_catch_array[i].try_op > op_num) {
- /* further blocks will not be relevant... */
- break;
- }
- in_finally = 0;
- if (op_num < EX(func)->op_array.try_catch_array[i].catch_op) {
- catch_op_num = EX(func)->op_array.try_catch_array[i].catch_op;
- }
- if (op_num < EX(func)->op_array.try_catch_array[i].finally_op) {
- finally_op_num = EX(func)->op_array.try_catch_array[i].finally_op;
- finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
- }
- if (op_num >= EX(func)->op_array.try_catch_array[i].finally_op &&
- op_num < EX(func)->op_array.try_catch_array[i].finally_end) {
- finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
- in_finally = 1;
+ /* Walk try/catch/finally structures upwards, performing the necessary actions */
+ while (try_catch_offset != (uint32_t) -1) {
+ zend_try_catch_element *try_catch =
+ &EX(func)->op_array.try_catch_array[try_catch_offset];
+
+ if (op_num < try_catch->catch_op && ex) {
+ /* Go to catch block */
+ cleanup_live_vars(execute_data, op_num, try_catch->catch_op);
+ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[try_catch->catch_op]);
+ ZEND_VM_CONTINUE();
+
+ } else if (op_num < try_catch->finally_op) {
+ /* Go to finally block */
+ zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[try_catch->finally_end].op1.var);
+ cleanup_live_vars(execute_data, op_num, try_catch->finally_op);
+ Z_OBJ_P(fast_call) = EG(exception);
+ EG(exception) = NULL;
+ fast_call->u2.lineno = (uint32_t)-1;
+ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[try_catch->finally_op]);
+ ZEND_VM_CONTINUE();
+
+ } else if (op_num < try_catch->finally_end) {
+ zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[try_catch->finally_end].op1.var);
+
+ /* cleanup incomplete RETURN statement */
+ if (fast_call->u2.lineno != (uint32_t)-1
+ && (EX(func)->op_array.opcodes[fast_call->u2.lineno].op2_type & (IS_TMP_VAR | IS_VAR))) {
+ zval *return_value = EX_VAR(EX(func)->op_array.opcodes[fast_call->u2.lineno].op2.var);
+
+ zval_ptr_dtor(return_value);
+ }
+
+ /* Chain potential exception from wrapping finally block */
+ if (Z_OBJ_P(fast_call)) {
+ if (ex) {
+ zend_exception_set_previous(ex, Z_OBJ_P(fast_call));
+ } else {
+ EG(exception) = Z_OBJ_P(fast_call);
+ }
+ ex = Z_OBJ_P(fast_call);
+ }
}
+
+ try_catch_offset--;
}
- i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
+ /* Uncaught exception */
+ cleanup_live_vars(execute_data, op_num, 0);
+ if (UNEXPECTED((EX_CALL_INFO() & ZEND_CALL_GENERATOR) != 0)) {
+ zend_generator *generator = zend_get_running_generator(execute_data);
+ zend_generator_close(generator, 1);
+ ZEND_VM_RETURN();
+ } else {
+ ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ }
+}
- if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
- zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ uint32_t throw_op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
+ uint32_t i, current_try_catch_offset = (uint32_t) -1;
- if (in_finally && Z_OBJ_P(fast_call)) {
- zend_exception_set_previous(EG(exception), Z_OBJ_P(fast_call));
+ {
+ const zend_op *exc_opline = EG(opline_before_exception);
+ if ((exc_opline->opcode == ZEND_FREE || exc_opline->opcode == ZEND_FE_FREE)
+ && exc_opline->extended_value & ZEND_FREE_ON_RETURN) {
+ /* exceptions thrown because of loop var destruction on return/break/...
+ * are logically thrown at the end of the foreach loop, so adjust the
+ * throw_op_num.
+ */
+ throw_op_num = EX(func)->op_array.live_range[exc_opline->op2.num].end;
}
- Z_OBJ_P(fast_call) = EG(exception);
- EG(exception) = NULL;
- fast_call->u2.lineno = (uint32_t)-1;
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[finally_op_num]);
- ZEND_VM_CONTINUE();
- } else {
- if (in_finally) {
- /* we are going out of current finally scope */
- zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
+ }
- if (Z_OBJ_P(fast_call)) {
- zend_exception_set_previous(EG(exception), Z_OBJ_P(fast_call));
- Z_OBJ_P(fast_call) = NULL;
- }
+ /* Find the innermost try/catch/finally the exception was thrown in */
+ for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
+ zend_try_catch_element *try_catch = &EX(func)->op_array.try_catch_array[i];
+ if (try_catch->try_op > throw_op_num) {
+ /* further blocks will not be relevant... */
+ break;
}
- if (catch_op_num) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[catch_op_num]);
- ZEND_VM_CONTINUE();
- } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- zend_generator *generator = zend_get_running_generator(execute_data);
- zend_generator_close(generator, 1);
- ZEND_VM_RETURN();
- } else {
- ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ if (throw_op_num < try_catch->catch_op || throw_op_num < try_catch->finally_end) {
+ current_try_catch_offset = i;
}
}
+
+ cleanup_unfinished_calls(execute_data, throw_op_num);
+
+ ZEND_VM_TAIL_CALL(zend_dispatch_try_catch_finally_helper_SPEC(current_try_catch_offset, throw_op_num ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1545,8 +1799,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HAN
SAVE_OPLINE();
zend_verify_abstract_class(Z_CE_P(EX_VAR(opline->op1.var)));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1556,13 +1809,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_
SAVE_OPLINE();
ret = zend_user_opcode_handlers[opline->opcode](execute_data);
- LOAD_OPLINE();
+ opline = EX(opline);
switch (ret) {
case ZEND_USER_OPCODE_CONTINUE:
ZEND_VM_CONTINUE();
case ZEND_USER_OPCODE_RETURN:
- if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
+ if (UNEXPECTED((EX_CALL_INFO() & ZEND_CALL_GENERATOR) != 0)) {
zend_generator *generator = zend_get_running_generator(execute_data);
zend_generator_close(generator, 1);
ZEND_VM_RETURN();
@@ -1584,16 +1837,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DISCARD_EXCEPTION_SPEC_HANDLER
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->op1.var);
+ SAVE_OPLINE();
+
+ /* cleanup incomplete RETURN statement */
+ if (fast_call->u2.lineno != (uint32_t)-1
+ && (EX(func)->op_array.opcodes[fast_call->u2.lineno].op2_type & (IS_TMP_VAR | IS_VAR))) {
+ zval *return_value = EX_VAR(EX(func)->op_array.opcodes[fast_call->u2.lineno].op2.var);
+
+ zval_ptr_dtor(return_value);
+ }
- /* check for delayed exception */
+ /* cleanup delayed exception */
if (Z_OBJ_P(fast_call) != NULL) {
- SAVE_OPLINE();
/* discard the previously thrown exception */
OBJ_RELEASE(Z_OBJ_P(fast_call));
Z_OBJ_P(fast_call) = NULL;
}
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1601,13 +1862,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OP
USE_OPLINE
zval *fast_call = EX_VAR(opline->result.var);
- if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) &&
- UNEXPECTED(EG(prev_exception) != NULL)) {
- /* in case of unhandled exception jump to catch block instead of finally */
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- }
- /* set no delayed exception */
Z_OBJ_P(fast_call) = NULL;
/* set return address */
fast_call->u2.lineno = opline - EX(func)->op_array.opcodes;
@@ -1619,36 +1873,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPC
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->op1.var);
+ uint32_t current_try_catch_offset, current_op_num;
if (fast_call->u2.lineno != (uint32_t)-1) {
const zend_op *fast_ret = EX(func)->op_array.opcodes + fast_call->u2.lineno;
+
ZEND_VM_SET_OPCODE(fast_ret + 1);
- if (fast_ret->extended_value & ZEND_FAST_CALL_FROM_FINALLY) {
- fast_call->u2.lineno = fast_ret->op2.opline_num;
- }
ZEND_VM_CONTINUE();
- } else {
- /* special case for unhandled exceptions */
- USE_OPLINE
-
- if (opline->extended_value == ZEND_FAST_RET_TO_FINALLY) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- } else {
- EG(exception) = Z_OBJ_P(fast_call);
- Z_OBJ_P(fast_call) = NULL;
- if (opline->extended_value == ZEND_FAST_RET_TO_CATCH) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
- ZEND_VM_CONTINUE();
- } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
- zend_generator *generator = zend_get_running_generator(execute_data);
- zend_generator_close(generator, 1);
- ZEND_VM_RETURN();
- } else {
- ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
- }
- }
}
+
+ /* special case for unhandled exceptions */
+ EG(exception) = Z_OBJ_P(fast_call);
+ Z_OBJ_P(fast_call) = NULL;
+ current_try_catch_offset = opline->op2.num;
+ current_op_num = opline - EX(func)->op_array.opcodes;
+ ZEND_VM_TAIL_CALL(zend_dispatch_try_catch_finally_helper_SPEC(current_try_catch_offset, current_op_num ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSERT_CHECK_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -1657,9 +1896,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSERT_CHECK_SPEC_HANDLER(ZEND
if (EG(assertions) <= 0) {
zend_op *target = OP_JMP_ADDR(opline, opline->op2);
-
- if (RETURN_VALUE_USED(target-1)) {
- ZVAL_TRUE(EX_VAR((target-1)->result.var));
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
}
ZEND_VM_JMP(target);
} else {
@@ -1670,13 +1908,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSERT_CHECK_SPEC_HANDLER(ZEND
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
uint32_t fetch_type;
+ zend_class_entry *called_scope, *scope;
USE_OPLINE
SAVE_OPLINE();
fetch_type = opline->extended_value;
- if (UNEXPECTED(EG(scope) == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use \"%s\" when no class scope is active",
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(scope == NULL)) {
+ zend_throw_error(NULL, "Cannot use \"%s\" when no class scope is active",
fetch_type == ZEND_FETCH_CLASS_SELF ? "self" :
fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static");
HANDLE_EXCEPTION();
@@ -1684,18 +1924,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_HANDLER(
switch (fetch_type) {
case ZEND_FETCH_CLASS_SELF:
- ZVAL_STR_COPY(EX_VAR(opline->result.var), EG(scope)->name);
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), scope->name);
break;
case ZEND_FETCH_CLASS_PARENT:
- if (UNEXPECTED(EG(scope)->parent == NULL)) {
- zend_throw_error(zend_ce_error,
+ if (UNEXPECTED(scope->parent == NULL)) {
+ zend_throw_error(NULL,
"Cannot use \"parent\" when current class scope has no parent");
HANDLE_EXCEPTION();
}
- ZVAL_STR_COPY(EX_VAR(opline->result.var), EG(scope)->parent->name);
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), scope->parent->name);
break;
case ZEND_FETCH_CLASS_STATIC:
- ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(called_scope)->name);
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ called_scope = Z_OBJCE(EX(This));
+ } else {
+ called_scope = Z_CE(EX(This));
+ }
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), called_scope->name);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
@@ -1706,10 +1951,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
{
zend_array *args;
zend_function *fbc = EX(func);
- zend_object *object = Z_OBJ(EX(This));
zval *ret = EX(return_value);
uint32_t call_info = EX_CALL_INFO() & (ZEND_CALL_NESTED | ZEND_CALL_TOP | ZEND_CALL_RELEASE_THIS);
- zend_class_entry *scope = EX(called_scope);
uint32_t num_args = EX_NUM_ARGS();
zend_execute_data *call;
USE_OPLINE
@@ -1732,9 +1975,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
SAVE_OPLINE();
call = execute_data;
execute_data = EG(current_execute_data) = EX(prev_execute_data);
- zend_vm_stack_free_call_frame(call);
- call = zend_vm_stack_push_call_frame(call_info, fbc->common.prototype, 2, scope, object);
- call->prev_execute_data = execute_data;
+
+ ZEND_ASSERT(zend_vm_calc_used_stack(2, fbc->common.prototype) <= (size_t)(((char*)EG(vm_stack_end)) - (char*)call));
+
+ call->func = fbc->common.prototype;
+ ZEND_CALL_NUM_ARGS(call) = 2;
ZVAL_STR(ZEND_CALL_ARG(call, 1), fbc->common.function_name);
ZVAL_ARR(ZEND_CALL_ARG(call, 2), args);
@@ -1745,10 +1990,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
ZEND_ASSERT(!(fbc->common.fn_flags & ZEND_ACC_GENERATOR));
- call->symbol_table = NULL;
+ if (UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
i_init_func_execute_data(call, &fbc->op_array,
ret, (fbc->common.fn_flags & ZEND_ACC_STATIC) == 0);
-
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
@@ -1762,33 +2008,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
EG(current_execute_data) = call;
- if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
- uint32_t i;
- uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
- zval *p = ZEND_CALL_ARG(call, 1);
-
- EG(current_execute_data) = call;
-
- for (i = 0; i < num_args; ++i) {
- zend_verify_internal_arg_type(fbc, i + 1, p);
- if (UNEXPECTED(EG(exception) != NULL)) {
- EG(current_execute_data) = call->prev_execute_data;
- zend_vm_stack_free_args(call);
- zend_vm_stack_free_call_frame(call);
- if (ret) {
- ZVAL_UNDEF(ret);
- }
- goto call_trampoline_end;
- }
- p++;
+ if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
+ && UNEXPECTED(!zend_verify_internal_arg_types(fbc, call))) {
+ zend_vm_stack_free_call_frame(call);
+ if (ret) {
+ ZVAL_UNDEF(ret);
}
+ goto call_trampoline_end;
}
if (ret == NULL) {
ZVAL_NULL(&retval);
ret = &retval;
}
- Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
@@ -1799,9 +2031,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
#if ZEND_DEBUG
ZEND_ASSERT(
- !call->func ||
+ EG(exception) || !call->func ||
!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
- zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
+ zend_verify_internal_return_type(call->func, ret));
#endif
EG(current_execute_data) = call->prev_execute_data;
@@ -1823,10 +2055,9 @@ call_trampoline_end:
opline = EX(opline);
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- object = Z_OBJ(call->This);
+ zend_object *object = Z_OBJ(call->This);
OBJ_RELEASE(object);
}
- EG(scope) = EX(func)->op_array.scope;
zend_vm_stack_free_call_frame(call);
if (UNEXPECTED(EG(exception) != NULL)) {
@@ -1846,25 +2077,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER
USE_OPLINE
SAVE_OPLINE();
- if (EG(exception)) {
- zend_exception_save();
- }
if (IS_CONST == IS_UNUSED) {
Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zval *class_name = EX_CONSTANT(opline->op2);
try_class_name:
if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
- Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
- } else {
- Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
- CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
+ zend_class_entry *ce = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
+
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
+ CACHE_PTR(Z_CACHE_SLOT_P(class_name), ce);
}
+ Z_CE_P(EX_VAR(opline->result.var)) = ce;
} else if (Z_TYPE_P(class_name) == IS_OBJECT) {
Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
@@ -1875,15 +2103,14 @@ try_class_name:
} else {
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Class name must be a valid object or a string");
+ zend_throw_error(NULL, "Class name must be a valid object or a string");
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
@@ -1894,18 +2121,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_
zval *function_name, *func;
zend_execute_data *call;
- if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- function_name = (zval*)(EX_CONSTANT(opline->op2)+1);
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
+ function_name = (zval*)EX_CONSTANT(opline->op2);
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(function_name));
+ if (UNEXPECTED(fbc == NULL)) {
+ func = zend_hash_find(EG(function_table), Z_STR_P(function_name+1));
+ if (UNEXPECTED(func == NULL)) {
SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(function_name));
HANDLE_EXCEPTION();
- } else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
}
+ fbc = Z_FUNC_P(func);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
}
call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
fbc, opline->extended_value, NULL, NULL);
@@ -1918,208 +2147,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zend_function *fbc;
- zval *function_name, *func;
- zend_string *lcname;
- zend_class_entry *called_scope;
- zend_object *object;
+ zval *function_name;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
SAVE_OPLINE();
function_name = EX_CONSTANT(opline->op2);
try_function_name:
if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
- const char *colon;
-
- if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
- colon > Z_STRVAL_P(function_name) &&
- *(colon-1) == ':'
- ) {
- zend_string *mname;
- size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
- size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
-
- lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
-
- object = NULL;
- called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- zend_string_release(lcname);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, mname);
- } else {
- fbc = zend_std_get_static_method(called_scope, mname, NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), ZSTR_VAL(mname));
- }
- zend_string_release(lcname);
- zend_string_release(mname);
-
- HANDLE_EXCEPTION();
- }
-
- zend_string_release(lcname);
- zend_string_release(mname);
-
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
-
- HANDLE_EXCEPTION();
- }
- }
- } else {
- if (Z_STRVAL_P(function_name)[0] == '\\') {
- lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
- zend_str_tolower_copy(ZSTR_VAL(lcname), Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
- } else {
- lcname = zend_string_tolower(Z_STR_P(function_name));
- }
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(function_name));
- zend_string_release(lcname);
-
- HANDLE_EXCEPTION();
- }
- zend_string_release(lcname);
-
- fbc = Z_FUNC_P(func);
- called_scope = NULL;
- object = NULL;
- }
-
- } else if (IS_CONST != IS_CONST &&
- EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
- Z_OBJ_HANDLER_P(function_name, get_closure) &&
- Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
- if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
- /* Delay closure destruction until its invocation */
- ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(fbc->common.prototype)++;
- call_info |= ZEND_CALL_CLOSURE;
- }
-
- } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
- zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
- zval *obj;
- zval *method;
- obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
- method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
-
- if (!obj || !method) {
- zend_throw_error(zend_ce_error, "Array callback has to contain indices 0 and 1");
-
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(obj);
- if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
- zend_throw_error(zend_ce_error, "First array member is not a valid class name or object");
-
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(method);
- if (Z_TYPE_P(method) != IS_STRING) {
- zend_throw_error(zend_ce_error, "Second array member is not a valid method");
-
- HANDLE_EXCEPTION();
- }
-
- if (Z_TYPE_P(obj) == IS_STRING) {
- object = NULL;
- called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
- } else {
- fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), Z_STRVAL_P(method));
- }
-
- HANDLE_EXCEPTION();
- }
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
-
- HANDLE_EXCEPTION();
- }
- }
- } else {
- called_scope = Z_OBJCE_P(obj);
- object = Z_OBJ_P(obj);
-
- fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(object->ce->name), Z_STRVAL_P(method));
- }
-
- HANDLE_EXCEPTION();
- }
-
- if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
- object = NULL;
- } else {
- call_info |= ZEND_CALL_RELEASE_THIS;
- GC_REFCOUNT(object)++; /* For $this pointer */
- }
- }
-
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
+ call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value);
+ } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) {
+ call = zend_init_dynamic_call_object(function_name, opline->extended_value);
+ } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) {
+ call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value);
+ } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) {
function_name = Z_REFVAL_P(function_name);
goto try_function_name;
} else {
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ zend_throw_error(NULL, "Function name must be a string");
+ call = NULL;
+ }
+ if (UNEXPECTED(!call)) {
HANDLE_EXCEPTION();
}
- call = zend_vm_stack_push_call_frame(call_info,
- fbc, opline->extended_value, called_scope, object);
+
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2131,21 +2194,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CON
zend_execute_data *call;
func_name = EX_CONSTANT(opline->op2) + 1;
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL) {
- func_name++;
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
- } else {
- fbc = Z_FUNC_P(func);
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(fbc == NULL)) {
+ func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ if (func == NULL) {
+ func_name++;
+ func = zend_hash_find(EG(function_table), Z_STR_P(func_name));
+ if (UNEXPECTED(func == NULL)) {
+ SAVE_OPLINE();
+ zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
}
- } else {
fbc = Z_FUNC_P(func);
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
@@ -2165,15 +2230,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_SPEC_CONST_HANDLER(
zend_function *fbc;
zend_execute_data *call;
- if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
- } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(fname))) == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(fname));
- HANDLE_EXCEPTION();
- } else {
+ fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
+ if (UNEXPECTED(fbc == NULL)) {
+ func = zend_hash_find(EG(function_table), Z_STR_P(fname));
+ if (UNEXPECTED(func == NULL)) {
+ SAVE_OPLINE();
+ zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(fname));
+ HANDLE_EXCEPTION();
+ }
fbc = Z_FUNC_P(func);
CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call = zend_vm_stack_push_call_frame_ex(
@@ -2196,18 +2265,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(Z
arg_num = opline->op1.num;
param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
if (arg_num > EX_NUM_ARGS()) {
- ZVAL_COPY_VALUE(param, EX_CONSTANT(opline->op2));
+ ZVAL_COPY(param, EX_CONSTANT(opline->op2));
if (Z_OPT_CONSTANT_P(param)) {
SAVE_OPLINE();
- if (UNEXPECTED(zval_update_constant_ex(param, 0, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(param, EX(func)->op_array.scope) != SUCCESS)) {
ZVAL_UNDEF(param);
HANDLE_EXCEPTION();
}
- } else {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE_P(param))) {
- zval_copy_ctor_func(param);
- }
}
}
@@ -2215,7 +2279,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(Z
zval *default_value = EX_CONSTANT(opline->op2);
SAVE_OPLINE();
- if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))))) {
+ if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))) || EG(exception))) {
HANDLE_EXCEPTION();
}
}
@@ -2224,31 +2288,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(Z
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
- zend_brk_cont_element *el;
-
- SAVE_OPLINE();
- el = zend_brk_cont(Z_LVAL_P(EX_CONSTANT(opline->op2)), opline->extended_value,
- &EX(func)->op_array, execute_data);
-
- if (el->start >= 0) {
- zend_op *brk_opline = EX(func)->op_array.opcodes + el->brk;
-
- if (brk_opline->opcode == ZEND_FREE) {
- zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
- } else if (brk_opline->opcode == ZEND_FE_FREE) {
- zval *var = EX_VAR(brk_opline->op1.var);
- if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
- zend_hash_iterator_del(Z_FE_ITER_P(var));
- }
- zval_ptr_dtor_nogc(var);
- }
- }
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
-}
-
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -2256,13 +2295,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDL
zend_class_entry *iface;
SAVE_OPLINE();
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- iface = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ iface = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(iface == NULL)) {
iface = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_INTERFACE);
if (UNEXPECTED(iface == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), iface);
}
@@ -2272,34 +2309,73 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDL
}
zend_do_implement_interface(ce, iface);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
SAVE_OPLINE();
- if (EG(exception)) {
- zend_exception_save();
+ Z_CE_P(EX_VAR(opline->result.var)) = do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->op2.var)), 0);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *zce, *orig_zce;
+
+ SAVE_OPLINE();
+ if ((zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)))) == NULL ||
+ ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)+1))) != NULL &&
+ Z_CE_P(zce) != Z_CE_P(orig_zce))) {
+ do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->op2.var)), 0);
}
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ zend_class_entry *ce;
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)));
+ Z_CE_P(EX_VAR(opline->result.var)) = ce;
+ ZEND_ASSERT(ce != NULL);
+
+ if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
+ }
+
+ zend_do_inheritance(ce, Z_CE_P(EX_VAR(opline->op2.var)));
+ ce->ce_flags |= ZEND_ACC_ANON_BOUND;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (IS_UNUSED == IS_UNUSED) {
Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zval *class_name = NULL;
try_class_name:
if (IS_UNUSED == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
- Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
- } else {
- Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
- CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
+ zend_class_entry *ce = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
+
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
+ CACHE_PTR(Z_CACHE_SLOT_P(class_name), ce);
}
+ Z_CE_P(EX_VAR(opline->result.var)) = ce;
} else if (Z_TYPE_P(class_name) == IS_OBJECT) {
Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
@@ -2310,15 +2386,14 @@ try_class_name:
} else {
if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Class name must be a valid object or a string");
+ zend_throw_error(NULL, "Class name must be a valid object or a string");
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
@@ -2327,25 +2402,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZE
USE_OPLINE
SAVE_OPLINE();
- if (EG(exception)) {
- zend_exception_save();
- }
if (IS_CV == IS_UNUSED) {
Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zval *class_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
try_class_name:
if (IS_CV == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
- Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
- } else {
- Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
- CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
+ zend_class_entry *ce = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
+
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
+ CACHE_PTR(Z_CACHE_SLOT_P(class_name), ce);
}
+ Z_CE_P(EX_VAR(opline->result.var)) = ce;
} else if (Z_TYPE_P(class_name) == IS_OBJECT) {
Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
@@ -2356,223 +2428,56 @@ try_class_name:
} else {
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Class name must be a valid object or a string");
+ zend_throw_error(NULL, "Class name must be a valid object or a string");
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zend_function *fbc;
- zval *function_name, *func;
- zend_string *lcname;
- zend_class_entry *called_scope;
- zend_object *object;
+ zval *function_name;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
SAVE_OPLINE();
function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
try_function_name:
if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
- const char *colon;
-
- if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
- colon > Z_STRVAL_P(function_name) &&
- *(colon-1) == ':'
- ) {
- zend_string *mname;
- size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
- size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
-
- lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
-
- object = NULL;
- called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- zend_string_release(lcname);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, mname);
- } else {
- fbc = zend_std_get_static_method(called_scope, mname, NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), ZSTR_VAL(mname));
- }
- zend_string_release(lcname);
- zend_string_release(mname);
-
- HANDLE_EXCEPTION();
- }
-
- zend_string_release(lcname);
- zend_string_release(mname);
-
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
-
- HANDLE_EXCEPTION();
- }
- }
- } else {
- if (Z_STRVAL_P(function_name)[0] == '\\') {
- lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
- zend_str_tolower_copy(ZSTR_VAL(lcname), Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
- } else {
- lcname = zend_string_tolower(Z_STR_P(function_name));
- }
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(function_name));
- zend_string_release(lcname);
-
- HANDLE_EXCEPTION();
- }
- zend_string_release(lcname);
-
- fbc = Z_FUNC_P(func);
- called_scope = NULL;
- object = NULL;
- }
-
- } else if (IS_CV != IS_CONST &&
- EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
- Z_OBJ_HANDLER_P(function_name, get_closure) &&
- Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
- if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
- /* Delay closure destruction until its invocation */
- ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(fbc->common.prototype)++;
- call_info |= ZEND_CALL_CLOSURE;
- }
-
- } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
- zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
- zval *obj;
- zval *method;
- obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
- method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
-
- if (!obj || !method) {
- zend_throw_error(zend_ce_error, "Array callback has to contain indices 0 and 1");
-
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(obj);
- if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
- zend_throw_error(zend_ce_error, "First array member is not a valid class name or object");
-
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(method);
- if (Z_TYPE_P(method) != IS_STRING) {
- zend_throw_error(zend_ce_error, "Second array member is not a valid method");
-
- HANDLE_EXCEPTION();
- }
-
- if (Z_TYPE_P(obj) == IS_STRING) {
- object = NULL;
- called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
- } else {
- fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), Z_STRVAL_P(method));
- }
-
- HANDLE_EXCEPTION();
- }
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
-
- HANDLE_EXCEPTION();
- }
- }
- } else {
- called_scope = Z_OBJCE_P(obj);
- object = Z_OBJ_P(obj);
-
- fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(object->ce->name), Z_STRVAL_P(method));
- }
-
- HANDLE_EXCEPTION();
- }
-
- if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
- object = NULL;
- } else {
- call_info |= ZEND_CALL_RELEASE_THIS;
- GC_REFCOUNT(object)++; /* For $this pointer */
- }
- }
-
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
+ call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value);
+ } else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) {
+ call = zend_init_dynamic_call_object(function_name, opline->extended_value);
+ } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) {
+ call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) {
function_name = Z_REFVAL_P(function_name);
goto try_function_name;
} else {
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ zend_throw_error(NULL, "Function name must be a string");
+ call = NULL;
+ }
+ if (UNEXPECTED(!call)) {
HANDLE_EXCEPTION();
}
- call = zend_vm_stack_push_call_frame(call_info,
- fbc, opline->extended_value, called_scope, object);
+
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2580,25 +2485,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLE
USE_OPLINE
SAVE_OPLINE();
- if (EG(exception)) {
- zend_exception_save();
- }
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_free_op free_op2;
zval *class_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
try_class_name:
if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
- Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
- } else {
- Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
- CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
+ zend_class_entry *ce = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
+
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
+ CACHE_PTR(Z_CACHE_SLOT_P(class_name), ce);
}
+ Z_CE_P(EX_VAR(opline->result.var)) = ce;
} else if (Z_TYPE_P(class_name) == IS_OBJECT) {
Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
@@ -2609,224 +2511,59 @@ try_class_name:
} else {
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Class name must be a valid object or a string");
+ zend_throw_error(NULL, "Class name must be a valid object or a string");
}
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zend_function *fbc;
- zval *function_name, *func;
- zend_string *lcname;
zend_free_op free_op2;
- zend_class_entry *called_scope;
- zend_object *object;
+ zval *function_name;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
SAVE_OPLINE();
function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
try_function_name:
if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
- const char *colon;
-
- if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
- colon > Z_STRVAL_P(function_name) &&
- *(colon-1) == ':'
- ) {
- zend_string *mname;
- size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
- size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
-
- lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
-
- object = NULL;
- called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- zend_string_release(lcname);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, mname);
- } else {
- fbc = zend_std_get_static_method(called_scope, mname, NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), ZSTR_VAL(mname));
- }
- zend_string_release(lcname);
- zend_string_release(mname);
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- zend_string_release(lcname);
- zend_string_release(mname);
-
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- }
- } else {
- if (Z_STRVAL_P(function_name)[0] == '\\') {
- lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
- zend_str_tolower_copy(ZSTR_VAL(lcname), Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
- } else {
- lcname = zend_string_tolower(Z_STR_P(function_name));
- }
- if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
- zend_throw_error(zend_ce_error, "Call to undefined function %s()", Z_STRVAL_P(function_name));
- zend_string_release(lcname);
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- zend_string_release(lcname);
-
- fbc = Z_FUNC_P(func);
- called_scope = NULL;
- object = NULL;
- }
- zval_ptr_dtor_nogc(free_op2);
- } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST &&
- EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
- Z_OBJ_HANDLER_P(function_name, get_closure) &&
- Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
- if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
- /* Delay closure destruction until its invocation */
- ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(fbc->common.prototype)++;
- call_info |= ZEND_CALL_CLOSURE;
- }
- zval_ptr_dtor_nogc(free_op2);
- } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
- zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
- zval *obj;
- zval *method;
- obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
- method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
-
- if (!obj || !method) {
- zend_throw_error(zend_ce_error, "Array callback has to contain indices 0 and 1");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(obj);
- if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
- zend_throw_error(zend_ce_error, "First array member is not a valid class name or object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- ZVAL_DEREF(method);
- if (Z_TYPE_P(method) != IS_STRING) {
- zend_throw_error(zend_ce_error, "Second array member is not a valid method");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- if (Z_TYPE_P(obj) == IS_STRING) {
- object = NULL;
- called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(called_scope == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
-
- if (called_scope->get_static_method) {
- fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
- } else {
- fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
- }
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(called_scope->name), Z_STRVAL_P(method));
- }
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- zend_error(E_DEPRECATED,
- "Non-static method %s::%s() should not be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- } else {
- zend_throw_error(
- zend_ce_error,
- "Non-static method %s::%s() cannot be called statically",
- ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- }
- } else {
- called_scope = Z_OBJCE_P(obj);
- object = Z_OBJ_P(obj);
-
- fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
- if (UNEXPECTED(fbc == NULL)) {
- if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(object->ce->name), Z_STRVAL_P(method));
- }
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
- object = NULL;
- } else {
- call_info |= ZEND_CALL_RELEASE_THIS;
- GC_REFCOUNT(object)++; /* For $this pointer */
- }
- }
- zval_ptr_dtor_nogc(free_op2);
- } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
+ call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value);
+ } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) {
+ call = zend_init_dynamic_call_object(function_name, opline->extended_value);
+ } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) {
+ call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) {
function_name = Z_REFVAL_P(function_name);
goto try_function_name;
} else {
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
- zval_ptr_dtor_nogc(free_op2);
+ zend_throw_error(NULL, "Function name must be a string");
+ call = NULL;
+ }
+
+ zval_ptr_dtor_nogc(free_op2);
+
+ if (UNEXPECTED(!call)) {
HANDLE_EXCEPTION();
}
- call = zend_vm_stack_push_call_frame(call_info,
- fbc, opline->extended_value, called_scope, object);
+
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2838,8 +2575,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND
bitwise_not_function(EX_VAR(opline->result.var),
EX_CONSTANT(opline->op1));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2852,17 +2588,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZE
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_FALSE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_TRUE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), !i_zend_is_true(val));
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -2893,8 +2629,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_O
zend_string_release(str);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -2909,11 +2644,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_O
ZEND_VM_SET_NEXT_OPCODE(opline + 1);
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (IS_CONST == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- }
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
@@ -2946,16 +2679,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (IS_CONST == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -3067,16 +2796,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZE
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
- if (IS_CONST == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -3100,46 +2825,61 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND
{
USE_OPLINE
zval *retval_ptr;
+ zval *return_value;
zend_free_op free_op1;
retval_ptr = EX_CONSTANT(opline->op1);
+ return_value = EX(return_value);
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(retval_ptr) == IS_UNDEF)) {
SAVE_OPLINE();
retval_ptr = GET_OP1_UNDEF_CV(retval_ptr, BP_VAR_R);
- if (EX(return_value)) {
- ZVAL_NULL(EX(return_value));
+ if (return_value) {
+ ZVAL_NULL(return_value);
}
- } else if (!EX(return_value)) {
- if (IS_CONST == IS_VAR || IS_CONST == IS_TMP_VAR ) {
+ } else if (!return_value) {
+ if (IS_CONST & (IS_VAR|IS_TMP_VAR)) {
if (Z_REFCOUNTED_P(free_op1) && !Z_DELREF_P(free_op1)) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(free_op1));
+ zval_dtor_func(Z_COUNTED_P(free_op1));
}
}
} else {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
- zval_copy_ctor_func(EX(return_value));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(return_value))) {
+ Z_ADDREF_P(return_value);
}
}
} else if (IS_CONST == IS_CV) {
- ZVAL_DEREF(retval_ptr);
- ZVAL_COPY(EX(return_value), retval_ptr);
+ if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
+ if (EXPECTED(!Z_OPT_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ if (EXPECTED(!(EX_CALL_INFO() & ZEND_CALL_CODE))) {
+ ZVAL_NULL(retval_ptr);
+ } else {
+ Z_ADDREF_P(return_value);
+ }
+ } else {
+ retval_ptr = Z_REFVAL_P(retval_ptr);
+ ZVAL_COPY(return_value, retval_ptr);
+ }
+ } else {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ }
} else /* if (IS_CONST == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(retval_ptr))) {
zend_refcounted *ref = Z_COUNTED_P(retval_ptr);
retval_ptr = Z_REFVAL_P(retval_ptr);
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
efree_size(ref, sizeof(zend_reference));
} else if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
Z_ADDREF_P(retval_ptr);
}
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
}
}
}
@@ -3155,21 +2895,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDL
SAVE_OPLINE();
do {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR ||
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR)) ||
(IS_CONST == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
retval_ptr = EX_CONSTANT(opline->op1);
if (!EX(return_value)) {
- if (IS_CONST == IS_TMP_VAR) {
- }
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (IS_CONST != IS_TMP_VAR) {
- zval_opt_copy_ctor_no_imm(EX(return_value));
+ if (IS_CONST == IS_VAR && UNEXPECTED(Z_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ break;
+ }
+
+ ZVAL_NEW_REF(EX(return_value), retval_ptr);
+ if (IS_CONST == IS_CONST) {
+ if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
}
}
break;
@@ -3177,20 +2919,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDL
retval_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot return string offsets by reference");
- HANDLE_EXCEPTION();
- }
-
if (IS_CONST == IS_VAR) {
if (retval_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
+ (opline->extended_value == ZEND_RETURNS_FUNCTION && !Z_ISREF_P(retval_ptr))) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
if (EX(return_value)) {
ZVAL_NEW_REF(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
+ } else {
+
}
break;
}
@@ -3200,8 +2936,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDL
ZVAL_MAKE_REF(retval_ptr);
Z_ADDREF_P(retval_ptr);
ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
}
+
} while (0);
ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
@@ -3219,11 +2955,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_CONST_HA
retval = EX_CONSTANT(opline->op1);
/* Copy return value into generator->retval */
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
ZVAL_COPY_VALUE(&generator->retval, retval);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->retval))) {
- zval_copy_ctor_func(&generator->retval);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->retval))) {
+ Z_ADDREF(generator->retval);
}
}
} else if (IS_CONST == IS_CV) {
@@ -3271,11 +3007,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Can only throw objects");
+ zend_throw_error(NULL, "Can only throw objects");
HANDLE_EXCEPTION();
}
@@ -3302,8 +3038,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZE
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, value);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
- zval_copy_ctor_func(arg);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -3314,15 +3050,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER
USE_OPLINE
zval *value, *arg;
+ uint32_t arg_num = opline->op2.num;
- if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
- if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ if (EXPECTED(0)) {
+ if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
goto send_val_by_ref;
}
- } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
send_val_by_ref:
SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot pass parameter %d by reference", opline->op2.num);
+ zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num);
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_UNDEF(arg);
@@ -3332,8 +3069,39 @@ send_val_by_ref:
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, value);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
- zval_copy_ctor_func(arg);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
+ }
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_CONST_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *value, *arg;
+
+ uint32_t arg_num = opline->op2.num;
+
+ if (EXPECTED(1)) {
+ if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ goto send_val_by_ref;
+ }
+ } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+send_val_by_ref:
+ SAVE_OPLINE();
+ zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num);
+
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_UNDEF(arg);
+ HANDLE_EXCEPTION();
+ }
+ value = EX_CONSTANT(opline->op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, value);
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -3349,17 +3117,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_O
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_TRUE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_FALSE(EX_VAR(opline->result.var));
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_FALSE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), i_zend_is_true(val));
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -3367,56 +3135,65 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_O
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval object_zval;
+ zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
- if (UNEXPECTED(object_init_ex(&object_zval, ce) != SUCCESS)) {
+
+ result = EX_VAR(opline->result.var);
+ if (UNEXPECTED(object_init_ex(result, ce) != SUCCESS)) {
HANDLE_EXCEPTION();
}
- constructor = Z_OBJ_HT(object_zval)->get_constructor(Z_OBJ(object_zval));
+ constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), &object_zval);
- } else {
- OBJ_RELEASE(Z_OBJ(object_zval));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
+ if (EXPECTED(constructor->type == ZEND_USER_FUNCTION) && UNEXPECTED(!constructor->op_array.run_time_cache)) {
+ init_func_run_time_cache(&constructor->op_array);
+ }
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
- ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR |
- (EXPECTED(RETURN_VALUE_USED(opline)) ? 0 : ZEND_CALL_CTOR_RESULT_UNUSED),
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
- Z_OBJ(object_zval));
- call->prev_execute_data = EX(call);
- EX(call) = call;
-
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), &object_zval);
- }
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ Z_OBJ_P(result));
+ Z_ADDREF_P(result);
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -3424,15 +3201,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_
USE_OPLINE
zval *obj;
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
zend_function *clone;
zend_object_clone_obj_t clone_call;
SAVE_OPLINE();
obj = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(obj) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -3447,58 +3224,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(obj, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "__clone method called on non-object");
+ zend_throw_error(NULL, "__clone method called on non-object");
HANDLE_EXCEPTION();
}
} while (0);
ce = Z_OBJCE_P(obj);
- clone = ce ? ce->clone : NULL;
- clone_call = Z_OBJ_HT_P(obj)->clone_obj;
+ clone = ce->clone;
+ clone_call = Z_OBJ_HT_P(obj)->clone_obj;
if (UNEXPECTED(clone_call == NULL)) {
- if (ce) {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
- } else {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object");
- }
+ zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
- if (ce && clone) {
+ if (clone) {
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (UNEXPECTED(ce != EG(scope))) {
- zend_throw_error(zend_ce_error, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(ce != scope)) {
+ zend_throw_error(NULL, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
HANDLE_EXCEPTION();
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
- zend_throw_error(zend_ce_error, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), scope))) {
+ zend_throw_error(NULL, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
HANDLE_EXCEPTION();
}
}
}
- if (EXPECTED(EG(exception) == NULL)) {
- ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
- if (UNEXPECTED(!RETURN_VALUE_USED(opline)) || UNEXPECTED(EG(exception) != NULL)) {
- OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
- }
+ ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -3549,15 +3321,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_O
if (Z_TYPE_P(expr) == opline->extended_value) {
ZVAL_COPY_VALUE(result, expr);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
- zval_copy_ctor_func(result);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CONST != IS_TMP_VAR) {
- if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (opline->extended_value == IS_ARRAY) {
@@ -3567,9 +3336,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_O
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -3583,11 +3350,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_O
if (Z_TYPE_P(expr) != IS_ARRAY) {
object_init(result);
if (Z_TYPE_P(expr) != IS_NULL) {
- expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
+ expr = zend_hash_add_new(Z_OBJPROP_P(result), CG(known_strings)[ZEND_STR_SCALAR], expr);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -3599,96 +3364,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_O
}
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zend_op_array *new_op_array=NULL;
+ zend_op_array *new_op_array;
zval *inc_filename;
- zval tmp_inc_filename;
- zend_bool failure_retval=0;
SAVE_OPLINE();
inc_filename = EX_CONSTANT(opline->op1);
-
- ZVAL_UNDEF(&tmp_inc_filename);
- if (Z_TYPE_P(inc_filename) != IS_STRING) {
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(inc_filename) == IS_UNDEF)) {
- inc_filename = GET_OP1_UNDEF_CV(inc_filename, BP_VAR_R);
- }
- ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
- inc_filename = &tmp_inc_filename;
- }
-
- if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- } else {
- switch (opline->extended_value) {
- case ZEND_INCLUDE_ONCE:
- case ZEND_REQUIRE_ONCE: {
- zend_file_handle file_handle;
- zend_string *resolved_path;
-
- resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename));
- if (resolved_path) {
- failure_retval = zend_hash_exists(&EG(included_files), resolved_path);
- } else {
- resolved_path = zend_string_copy(Z_STR_P(inc_filename));
- }
-
- if (failure_retval) {
- /* do nothing, file already included */
- } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
-
- if (!file_handle.opened_path) {
- file_handle.opened_path = zend_string_copy(resolved_path);
- }
-
- if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
- new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
- zend_destroy_file_handle(&file_handle);
- } else {
- zend_file_handle_dtor(&file_handle);
- failure_retval=1;
- }
- } else {
- if (opline->extended_value == ZEND_INCLUDE_ONCE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- }
- zend_string_release(resolved_path);
- }
- break;
- case ZEND_INCLUDE:
- case ZEND_REQUIRE:
- new_op_array = compile_filename(opline->extended_value, inc_filename);
- break;
- case ZEND_EVAL: {
- char *eval_desc = zend_make_compiled_string_description("eval()'d code");
-
- new_op_array = zend_compile_string(inc_filename, eval_desc);
- efree(eval_desc);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp_inc_filename));
- }
+ new_op_array = zend_include_or_eval(inc_filename, opline->extended_value);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
+ } else if (new_op_array == ZEND_FAKE_OP_ARRAY) {
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ }
} else if (EXPECTED(new_op_array != NULL)) {
zval *return_value = NULL;
zend_execute_data *call;
@@ -3697,19 +3392,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HAN
return_value = EX_VAR(opline->result.var);
}
- new_op_array->scope = EG(scope);
+ new_op_array->scope = EX(func)->op_array.scope;
- call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE,
- (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)));
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
+ (zend_function*)new_op_array, 0,
+ Z_TYPE(EX(This)) != IS_OBJECT ? Z_CE(EX(This)) : NULL,
+ Z_TYPE(EX(This)) == IS_OBJECT ? Z_OBJ(EX(This)) : NULL);
- if (EX(symbol_table)) {
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
call->symbol_table = EX(symbol_table);
} else {
call->symbol_table = zend_rebuild_symbol_table();
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
@@ -3724,12 +3421,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HAN
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
-
} else if (RETURN_VALUE_USED(opline)) {
- ZVAL_BOOL(EX_VAR(opline->result.var), failure_retval);
+ ZVAL_FALSE(EX_VAR(opline->result.var));
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -3750,8 +3446,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(
}
Z_FE_POS_P(result) = 0;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
HashPosition pos = 0;
@@ -3762,6 +3457,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(
if (IS_CONST != IS_TMP_VAR) {
Z_ADDREF_P(array_ptr);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
pos = 0;
p = fe_ht->arData;
@@ -3783,8 +3485,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
@@ -3824,8 +3525,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -3866,8 +3566,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER
Z_ADDREF_P(array_ref);
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
} else {
- array_ptr = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(array_ptr, array_ref);
+ array_ref = EX_VAR(opline->result.var);
+ ZVAL_NEW_REF(array_ref, array_ptr);
+ array_ptr = Z_REFVAL_P(array_ref);
}
if (IS_CONST == IS_CONST) {
zval_copy_ctor_func(array_ptr);
@@ -3892,8 +3593,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
@@ -3907,6 +3607,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER
array_ptr = EX_VAR(opline->result.var);
ZVAL_COPY_VALUE(array_ptr, array_ref);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
p = fe_ht->arData;
while (1) {
@@ -3927,8 +3634,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
@@ -3985,8 +3691,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -4004,7 +3709,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
SAVE_OPLINE();
@@ -4028,7 +3732,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_O
} while (0);
}
-#endif
zend_bailout();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
@@ -4050,24 +3753,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEN
value = Z_REFVAL_P(value);
}
if (i_zend_is_true(value)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+
+ ZVAL_COPY_VALUE(result, value);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_CONST == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4088,24 +3793,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_CONST_HANDLER(ZE
}
if (Z_TYPE_P(value) > IS_NULL) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+ ZVAL_COPY_VALUE(result, value);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_CONST == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4113,29 +3819,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(Z
USE_OPLINE
zval *value;
+ zval *result = EX_VAR(opline->result.var);
value = EX_CONSTANT(opline->op1);
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
SAVE_OPLINE();
- value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ ZVAL_NULL(result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
- ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
- if (IS_CONST == IS_VAR) {
+ if (IS_CONST == IS_CV) {
+ ZVAL_DEREF(value);
+ ZVAL_COPY(result, value);
+ } else if (IS_CONST == IS_VAR) {
+ if (UNEXPECTED(Z_ISREF_P(value))) {
+ ZVAL_COPY_VALUE(result, Z_REFVAL_P(value));
if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
efree_size(Z_REF_P(value), sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
+ } else {
+ ZVAL_COPY_VALUE(result, value);
}
} else {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZVAL_COPY_VALUE(result, value);
if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) {
+ Z_ADDREF_P(result);
}
- } else if (IS_CONST == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -4153,6 +3866,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(
SAVE_OPLINE();
val = EX_CONSTANT(opline->op1);
+ if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
+ zend_throw_error(NULL, "Cannot use \"yield from\" in a force-closed generator");
+
+ HANDLE_EXCEPTION();
+ }
+
if (Z_TYPE_P(val) == IS_ARRAY) {
ZVAL_COPY_VALUE(&generator->values, val);
if (IS_CONST != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
@@ -4171,13 +3890,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(
if (Z_ISUNDEF(new_gen->retval)) {
if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
- zend_throw_error(zend_ce_error, "Impossible to yield from the Generator being currently run");
+ zend_throw_error(NULL, "Impossible to yield from the Generator being currently run");
HANDLE_EXCEPTION();
} else {
zend_generator_yield_from(generator, new_gen);
}
} else if (UNEXPECTED(new_gen->execute_data == NULL)) {
- zend_throw_error(zend_ce_error, "Generator passed to yield from was aborted without proper return and is unable to continue");
+ zend_throw_error(NULL, "Generator passed to yield from was aborted without proper return and is unable to continue");
HANDLE_EXCEPTION();
} else {
if (RETURN_VALUE_USED(opline)) {
@@ -4190,7 +3909,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(
if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
if (!EG(exception)) {
- zend_throw_error(zend_ce_error, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
}
HANDLE_EXCEPTION();
}
@@ -4207,7 +3926,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(
ZVAL_OBJ(&generator->values, &iter->std);
}
} else {
- zend_throw_error(zend_ce_error, "Can use \"yield from\" only with arrays and Traversables", 0);
+ zend_throw_error(NULL, "Can use \"yield from\" only with arrays and Traversables", 0);
HANDLE_EXCEPTION();
}
@@ -4217,6 +3936,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ /* This generator has no send target (though the generator we delegate to might have one) */
+ generator->send_target = NULL;
+
/* We increment to the next op, so we are at the correct position when the
* generator is resumed. */
ZEND_VM_INC_OPCODE();
@@ -4268,8 +3990,7 @@ try_strlen:
} while (0);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4285,7 +4006,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CONST_HANDLER(
if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
zend_class_entry *ce = Z_OBJCE_P(value);
- if (UNEXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
+ if (EXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
EXPECTED(memcmp(ZSTR_VAL(ce->name), "__PHP_Incomplete_Class", sizeof("__PHP_Incomplete_Class") - 1) != 0)) {
result = 1;
}
@@ -4305,8 +4026,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CONST_HANDLER(
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DEFINED_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4315,11 +4035,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DEFINED_SPEC_CONST_HANDLER(ZEN
zend_constant *c;
int result;
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
result = 1;
} else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op1), 0)) == NULL) {
result = 0;
- ZVAL_FALSE(EX_VAR(opline->result.var));
} else {
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), c);
result = 1;
@@ -4329,6 +4048,28 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DEFINED_SPEC_CONST_HANDLER(ZEN
ZEND_VM_NEXT_OPCODE();
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *value;
+
+ value = EX_CONSTANT(opline->op1);
+ ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(value));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_NOREF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *value;
+
+ value = EX_CONSTANT(opline->op1);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZEND_VM_NEXT_OPCODE();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -4369,8 +4110,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CONST_HANDLER(Z
add_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4413,8 +4153,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(Z
sub_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4460,8 +4199,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CONST_HANDLER(Z
mul_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4476,8 +4214,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(Z
fast_div_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4515,8 +4252,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(Z
mod_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4531,8 +4267,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZE
shift_left_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4547,8 +4282,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZE
shift_right_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_CONSTANT(opline->op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4586,7 +4335,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLE
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -4608,8 +4357,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLE
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4625,12 +4373,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_
result = fast_is_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4646,12 +4391,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CO
result = fast_is_not_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4692,7 +4434,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HAND
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
@@ -4719,8 +4461,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HAND
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4761,7 +4502,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
@@ -4788,8 +4529,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4839,8 +4579,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CONST_HA
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4890,8 +4629,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4906,8 +4644,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CONST_HAN
compare_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4922,8 +4659,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4938,8 +4674,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLE
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4954,8 +4689,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLE
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -4970,18 +4704,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HAND
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CONST_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zval *varname;
zval *retval;
zend_string *name;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
varname = EX_CONSTANT(opline->op1);
@@ -4998,120 +4731,73 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
+ if (IS_CONST == IS_CONST) {
+ if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (IS_CONST != IS_CONST) {
- zend_string_release(name);
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CONST == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
}
- goto fetch_var_return;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
-
- HANDLE_EXCEPTION();
- }
- if (IS_CONST == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
- }
-
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
}
+
+ HANDLE_EXCEPTION();
}
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
+ if (IS_CONST == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- HANDLE_EXCEPTION();
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ goto fetch_static_prop_return;
}
}
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CONST == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
if (IS_CONST != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
+fetch_static_prop_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -5121,59 +4807,79 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CONST, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, IS_CONST);
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5187,8 +4893,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_
zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5200,18 +4905,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -5220,7 +4920,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
} else {
if (IS_CONST == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
HANDLE_EXCEPTION();
@@ -5230,8 +4930,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5245,8 +4944,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_H
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -5303,8 +5002,7 @@ fetch_obj_r_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5318,8 +5016,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -5376,8 +5074,7 @@ fetch_obj_is_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5394,30 +5091,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
property = EX_CONSTANT(opline->op2);
container = NULL;
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -5431,41 +5122,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CONST_CONST_HA
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2));
-try_fetch_list:
- if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
- zval *value = zend_hash_index_find(Z_ARRVAL_P(container), Z_LVAL_P(EX_CONSTANT(opline->op2)));
-
- if (UNEXPECTED(value == NULL)) {
- zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, Z_LVAL_P(EX_CONSTANT(opline->op2)));
- ZVAL_NULL(EX_VAR(opline->result.var));
- } else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
- }
- } else if (IS_CONST != IS_CONST &&
- UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
- EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
- zval *result = EX_VAR(opline->result.var);
- zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, EX_CONSTANT(opline->op2), BP_VAR_R, result);
-
- if (retval) {
- if (result != retval) {
- ZVAL_COPY(result, retval);
- }
- } else {
- ZVAL_NULL(result);
- }
- } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(container) == IS_REFERENCE) {
- container = Z_REFVAL_P(container);
- goto try_fetch_list;
- } else {
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(container, BP_VAR_R);
- }
- ZVAL_NULL(EX_VAR(opline->result.var));
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5532,8 +5191,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CONST_H
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5560,14 +5218,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
HANDLE_EXCEPTION();
@@ -5576,8 +5233,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
object = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -5592,12 +5249,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
}
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
HANDLE_EXCEPTION();
@@ -5613,7 +5271,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
HANDLE_EXCEPTION();
@@ -5623,7 +5281,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
@@ -5635,6 +5293,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -5652,8 +5313,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CO
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5669,27 +5329,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_CONST == IS_CONST &&
IS_CONST == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_CONST != IS_CONST &&
IS_CONST == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -5700,15 +5366,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
function_name = EX_CONSTANT(opline->op2);
if (IS_CONST != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ do {
+ if (IS_CONST & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
- HANDLE_EXCEPTION();
+ HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -5719,7 +5392,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
HANDLE_EXCEPTION();
@@ -5733,33 +5406,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (IS_CONST != IS_CONST) {
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -5772,11 +5454,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
}
- if (IS_CONST != IS_CONST) {
+ if (IS_CONST == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -5785,8 +5471,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5800,24 +5485,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS
zend_class_entry *called_scope;
zend_object *object;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
+ uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
SAVE_OPLINE();
function_name = EX_CONSTANT(opline->op2);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
func = fcc.function_handler;
+ called_scope = fcc.called_scope;
+ object = fcc.object;
if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
/* Delay closure destruction until its invocation */
if (IS_CONST & (IS_VAR|IS_CV)) {
ZVAL_DEREF(function_name);
}
- ZEND_ASSERT(GC_TYPE(func->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(func->common.prototype)++;
+ ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)func->common.prototype)++;
call_info |= ZEND_CALL_CLOSURE;
- }
- called_scope = fcc.called_scope;
- object = fcc.object;
- if (object) {
+ } else if (object) {
call_info |= ZEND_CALL_RELEASE_THIS;
GC_REFCOUNT(object)++; /* For $this pointer */
}
@@ -5827,6 +5511,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS
zend_error(E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ if (EXPECTED(func->type == ZEND_USER_FUNCTION) && UNEXPECTED(!func->op_array.run_time_cache)) {
+ init_func_run_time_cache(&func->op_array);
}
} else {
zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);
@@ -5841,8 +5531,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -5883,7 +5572,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
} else {
@@ -5900,6 +5589,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(
SAVE_OPLINE();
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((IS_CONST & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -5908,116 +5605,87 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ zend_class_entry *ce, *scope;
+ zend_class_constant *c;
+ zval *value;
USE_OPLINE
SAVE_OPLINE();
- if (IS_CONST == IS_UNUSED) {
- zend_constant *c;
-
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
- if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
- if (!actual) {
- ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
- } else {
- actual++;
- ZVAL_STRINGL(EX_VAR(opline->result.var),
- actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
- }
- /* non-qualified constant - allow text substitution */
- zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
- Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- } else {
- zend_throw_error(zend_ce_error, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
- }
- } else {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
- }
-#ifdef ZTS
- if (c->flags & CONST_PERSISTENT) {
- ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
- } else {
- ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
- }
-#else
- ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
-#endif
- } else {
- /* class constant */
- zend_class_entry *ce;
- zval *value;
- do {
- if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- ZVAL_DEREF(value);
+ do {
+ if (IS_CONST == IS_CONST) {
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
#ifdef ZTS
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
#endif
- break;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
- HANDLE_EXCEPTION();
+ break;
+ } else if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ } else {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else {
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
}
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
- if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
- ZVAL_DEREF(value);
- break;
- }
}
+ if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
+ break;
+ }
+ }
- if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
- ZVAL_DEREF(value);
- if (Z_CONSTANT_P(value)) {
- EG(scope) = ce;
- zval_update_constant_ex(value, 1, NULL);
- EG(scope) = EX(func)->op_array.scope;
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- }
- if (IS_CONST == IS_CONST) {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
- } else {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
+ if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ scope = EX(func)->op_array.scope;
+ if (!zend_verify_const_access(c, scope)) {
+ zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
+ value = &c->value;
+ if (Z_CONSTANT_P(value)) {
+ zval_update_constant_ex(value, ce);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
}
+ }
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
} else {
- zend_throw_error(zend_ce_error, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
}
- } while (0);
-#ifdef ZTS
- if (ce->type == ZEND_INTERNAL_CLASS) {
- ZVAL_DUP(EX_VAR(opline->result.var), value);
} else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
}
-#else
+ } while (0);
+
+#ifdef ZTS
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ ZVAL_DUP(EX_VAR(opline->result.var), value);
+ } else {
ZVAL_COPY(EX_VAR(opline->result.var), value);
-#endif
}
+#else
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+#endif
+
ZEND_VM_NEXT_OPCODE();
}
@@ -6031,11 +5699,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C
if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -6044,10 +5707,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C
if (IS_CONST == IS_TMP_VAR) {
/* pass */
} else if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CONST == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -6117,8 +5778,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6152,35 +5812,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HA
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval tmp, *varname;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
- if (IS_CONST == IS_CV &&
- IS_CONST == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- zval *var = EX_VAR(opline->op1.var);
-
- if (Z_REFCOUNTED_P(var)) {
- zend_refcounted *garbage = Z_COUNTED_P(var);
-
- if (!--GC_REFCOUNT(garbage)) {
- ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
- } else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
- }
- } else {
- ZVAL_UNDEF(var);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
varname = EX_CONSTANT(opline->op1);
@@ -6193,150 +5832,125 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_CONST_HAN
varname = &tmp;
}
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
-
- HANDLE_EXCEPTION();
+ if (IS_CONST == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (IS_CONST != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value;
int result;
- if (IS_CONST == IS_CV &&
- IS_CONST == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- value = EX_VAR(opline->op1.var);
- if (opline->extended_value & ZEND_ISSET) {
- result =
- Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- SAVE_OPLINE();
- result = !i_zend_is_true(value);
- if (UNEXPECTED(EG(exception))) {
- HANDLE_EXCEPTION();
- }
- }
- ZEND_VM_SMART_BRANCH(result, 0);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
- } else {
-
- zval tmp, *varname;
-
- SAVE_OPLINE();
- varname = EX_CONSTANT(opline->op1);
- ZVAL_UNDEF(&tmp);
- if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- ZVAL_STR(&tmp, zval_get_string(varname));
- varname = &tmp;
- }
-
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ zval tmp, *varname;
+ zend_class_entry *ce;
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CONST == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+ SAVE_OPLINE();
+ varname = EX_CONSTANT(opline->op1);
+ ZVAL_UNDEF(&tmp);
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ if (IS_CONST == IS_CONST) {
+ if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto is_var_return;
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- if (IS_CONST == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if (IS_CONST == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (IS_CONST == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
}
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6351,8 +5965,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CON
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -6442,6 +6056,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -6473,8 +6090,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6488,8 +6104,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CO
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -6520,8 +6136,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6536,18 +6151,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST
name = EX_CONSTANT(opline->op1);
val = EX_CONSTANT(opline->op2);
- ZVAL_COPY_VALUE(&c.value, val);
+ ZVAL_COPY(&c.value, val);
if (Z_OPT_CONSTANT(c.value)) {
- if (UNEXPECTED(zval_update_constant_ex(&c.value, 0, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(&c.value, EX(func)->op_array.scope) != SUCCESS)) {
HANDLE_EXCEPTION();
}
- } else {
- /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
- if (UNEXPECTED(Z_OPT_COPYABLE(c.value))) {
- zval_copy_ctor_func(&c.value);
- }
}
c.flags = CONST_CS; /* non persistent, case sensetive */
c.name = zend_string_dup(Z_STR_P(name), 0);
@@ -6557,8 +6167,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6569,7 +6178,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -6588,33 +6197,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = EX_CONSTANT(opline->op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CONST != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CONST == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -6628,8 +6231,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -6656,8 +6259,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -6702,20 +6305,52 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER
ZEND_VM_RETURN();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
- SAVE_OPLINE();
- op1 = EX_CONSTANT(opline->op1);
- op2 = EX_CONSTANT(opline->op2);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ container = EX_CONSTANT(opline->op1);
+ dim = EX_CONSTANT(opline->op2);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (IS_CONST & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6731,12 +6366,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HA
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6752,12 +6384,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TM
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6768,7 +6397,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(Z
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -6787,33 +6416,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(Z
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = EX_CONSTANT(opline->op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CONST != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CONST == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -6827,8 +6450,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -6855,8 +6478,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -6914,12 +6537,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HA
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -6935,22 +6555,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VA
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CONST_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zval *varname;
zval *retval;
zend_string *name;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
varname = EX_CONSTANT(opline->op1);
@@ -6967,120 +6584,73 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
+ if (IS_VAR == IS_CONST) {
+ if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (IS_CONST != IS_CONST) {
- zend_string_release(name);
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CONST == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- HANDLE_EXCEPTION();
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
}
- goto fetch_var_return;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
-
- HANDLE_EXCEPTION();
- }
- if (IS_CONST == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
- }
-
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
}
+
+ HANDLE_EXCEPTION();
}
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
+ if (IS_CONST == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- HANDLE_EXCEPTION();
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ goto fetch_static_prop_return;
+ }
+ }
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
}
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CONST == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
}
if (IS_CONST != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
+fetch_static_prop_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -7090,75 +6660,53 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval tmp, *varname;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
- if (IS_CONST == IS_CV &&
- IS_VAR == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- zval *var = EX_VAR(opline->op1.var);
-
- if (Z_REFCOUNTED_P(var)) {
- zend_refcounted *garbage = Z_COUNTED_P(var);
-
- if (!--GC_REFCOUNT(garbage)) {
- ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
- } else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
- }
- } else {
- ZVAL_UNDEF(var);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
varname = EX_CONSTANT(opline->op1);
@@ -7171,150 +6719,125 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDL
varname = &tmp;
}
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
-
- HANDLE_EXCEPTION();
+ if (IS_VAR == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (IS_CONST != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value;
int result;
- if (IS_CONST == IS_CV &&
- IS_VAR == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- value = EX_VAR(opline->op1.var);
- if (opline->extended_value & ZEND_ISSET) {
- result =
- Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- SAVE_OPLINE();
- result = !i_zend_is_true(value);
- if (UNEXPECTED(EG(exception))) {
- HANDLE_EXCEPTION();
- }
- }
- ZEND_VM_SMART_BRANCH(result, 0);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
- } else {
-
- zval tmp, *varname;
-
- SAVE_OPLINE();
- varname = EX_CONSTANT(opline->op1);
- ZVAL_UNDEF(&tmp);
- if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- ZVAL_STR(&tmp, zval_get_string(varname));
- varname = &tmp;
- }
-
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ zval tmp, *varname;
+ zend_class_entry *ce;
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CONST == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+ SAVE_OPLINE();
+ varname = EX_CONSTANT(opline->op1);
+ ZVAL_UNDEF(&tmp);
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ if (IS_VAR == IS_CONST) {
+ if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto is_var_return;
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- if (IS_CONST == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if (IS_CONST == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (IS_CONST == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
}
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7325,7 +6848,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(Z
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -7344,33 +6867,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(Z
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = EX_CONSTANT(opline->op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CONST != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CONST == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -7384,8 +6901,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -7412,8 +6929,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -7482,65 +6999,30 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_UNUSED == IS_CONST) {
- if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
-
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (IS_CONST != IS_CONST) {
- zend_string_release(name);
- }
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CONST == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
-
- goto fetch_var_return;
- }
- }
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
-
- HANDLE_EXCEPTION();
- }
- if (IS_CONST == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ retval = zend_hash_find(target_symbol_table, name);
+ if (retval == NULL) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ case BP_VAR_W:
+ retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
}
-
- } else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
+ /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
+ } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
+ retval = Z_INDIRECT_P(retval);
+ if (Z_TYPE_P(retval) == IS_UNDEF) {
switch (type) {
case BP_VAR_R:
case BP_VAR_UNSET:
@@ -7553,49 +7035,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
/* break missing intentionally */
case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ ZVAL_NULL(retval);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
+ }
- HANDLE_EXCEPTION();
- }
- }
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
- }
}
if (IS_CONST != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -7605,8 +7059,7 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7645,6 +7098,145 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_UNUSED_HAN
ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+{
+ USE_OPLINE
+
+ zval *varname;
+ zval *retval;
+ zend_string *name;
+ zend_class_entry *ce;
+
+ SAVE_OPLINE();
+ varname = EX_CONSTANT(opline->op1);
+
+ if (IS_CONST == IS_CONST) {
+ name = Z_STR_P(varname);
+ } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
+ name = Z_STR_P(varname);
+ zend_string_addref(name);
+ } else {
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ name = zval_get_string(varname);
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
+ }
+
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ if (IS_CONST == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
+ }
+
+ goto fetch_static_prop_return;
+ }
+ }
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CONST == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
+
+ if (IS_CONST != IS_CONST) {
+ zend_string_release(name);
+ }
+
+fetch_static_prop_return:
+ ZEND_ASSERT(retval != NULL);
+ if (type == BP_VAR_R || type == BP_VAR_IS) {
+ if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
+ ZVAL_UNREF(retval);
+ }
+ ZVAL_COPY(EX_VAR(opline->result.var), retval);
+ } else {
+ ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
+ }
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else {
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -7654,18 +7246,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -7674,7 +7261,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
} else {
if (IS_UNUSED == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
HANDLE_EXCEPTION();
@@ -7684,8 +7271,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7701,27 +7287,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_CONST == IS_CONST &&
IS_UNUSED == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_CONST != IS_CONST &&
IS_UNUSED == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -7732,15 +7324,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
function_name = NULL;
if (IS_UNUSED != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ do {
+ if (IS_UNUSED & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
- HANDLE_EXCEPTION();
+ HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -7751,7 +7350,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
HANDLE_EXCEPTION();
@@ -7765,33 +7364,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (IS_UNUSED != IS_CONST) {
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -7804,11 +7412,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
}
- if (IS_CONST != IS_CONST) {
+ if (IS_CONST == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -7817,8 +7429,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7840,7 +7451,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_
if (IS_CONST == IS_CONST) {
ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
retval_ref = retval_ptr = EX_VAR(opline->result.var);
- } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ } else if (IS_CONST == IS_VAR) {
+ if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
+ retval_ptr = Z_INDIRECT_P(retval_ptr);
+ }
+ ZVAL_DEREF(retval_ptr);
+ } else if (IS_CONST == IS_CV) {
ZVAL_DEREF(retval_ptr);
}
@@ -7862,12 +7478,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_
zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
-
+ if (IS_CONST == IS_CONST) {
+ zval_ptr_dtor_nogc(retval_ptr);
+ }
}
#endif
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -7880,11 +7497,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_U
if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -7893,10 +7505,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_U
if (IS_CONST == IS_TMP_VAR) {
/* pass */
} else if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CONST == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -7966,8 +7576,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8010,7 +7619,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HA
SAVE_OPLINE();
if (IS_CONST == IS_CV &&
- IS_UNUSED == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
zval *var = EX_VAR(opline->op1.var);
@@ -8019,16 +7627,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HA
if (!--GC_REFCOUNT(garbage)) {
ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
+ zval_dtor_func(garbage);
} else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
+ zval *z = var;
+ ZVAL_DEREF(z);
+ if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
+ ZVAL_UNDEF(var);
+ gc_possible_root(Z_COUNTED_P(z));
+ } else {
+ ZVAL_UNDEF(var);
+ }
}
} else {
ZVAL_UNDEF(var);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
varname = EX_CONSTANT(opline->op1);
@@ -8042,45 +7655,72 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HA
varname = &tmp;
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
- if (IS_UNUSED == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- HANDLE_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ zend_class_entry *ce;
+
+
+ SAVE_OPLINE();
+
+ varname = EX_CONSTANT(opline->op1);
+
+ ZVAL_UNDEF(&tmp);
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (IS_CONST != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8090,7 +7730,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_U
int result;
if (IS_CONST == IS_CV &&
- IS_UNUSED == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
value = EX_VAR(opline->op1.var);
if (opline->extended_value & ZEND_ISSET) {
@@ -8111,6 +7750,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_U
} else {
zval tmp, *varname;
+ HashTable *target_symbol_table;
SAVE_OPLINE();
varname = EX_CONSTANT(opline->op1);
@@ -8120,95 +7760,137 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_U
varname = &tmp;
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
- if (IS_UNUSED == IS_CONST) {
- if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+}
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CONST == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *value;
+ int result;
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ zval tmp, *varname;
+ zend_class_entry *ce;
- goto is_var_return;
- }
+ SAVE_OPLINE();
+ varname = EX_CONSTANT(opline->op1);
+ ZVAL_UNDEF(&tmp);
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- if (IS_CONST == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if (IS_CONST == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (IS_CONST == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
}
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *zfunc;
+ zval *object;
+ zend_class_entry *called_scope;
SAVE_OPLINE();
zfunc = zend_hash_find(EG(function_table), Z_STR_P(EX_CONSTANT(opline->op1)));
ZEND_ASSERT(zfunc != NULL && Z_FUNC_P(zfunc)->type == ZEND_USER_FUNCTION);
- if (UNEXPECTED((Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC) ||
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ called_scope = Z_OBJCE(EX(This));
+ if (UNEXPECTED((Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC) ||
(EX(func)->common.fn_flags & ZEND_ACC_STATIC))) {
- zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
- EG(scope), EX(called_scope), NULL);
+ object = NULL;
+ } else {
+ object = &EX(This);
+ }
} else {
- zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
- EG(scope), EX(called_scope), Z_OBJ(EX(This)) ? &EX(This) : NULL);
+ called_scope = Z_CE(EX(This));
+ object = NULL;
}
+ zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
+ EX(func)->op_array.scope, called_scope, object);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8219,7 +7901,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -8238,33 +7920,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = EX_CONSTANT(opline->op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CONST != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CONST == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -8278,8 +7954,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -8306,8 +7982,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -8392,8 +8068,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND
add_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8436,8 +8111,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND
sub_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8483,8 +8157,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND
mul_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8499,8 +8172,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND
fast_div_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8538,8 +8210,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND
mod_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8554,8 +8225,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_
shift_left_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8570,8 +8240,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_
shift_right_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8609,7 +8293,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -8631,8 +8315,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8648,12 +8331,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HAN
result = fast_is_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8669,12 +8349,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV
result = fast_is_not_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8715,7 +8392,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
@@ -8742,8 +8419,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8784,7 +8460,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HAN
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
@@ -8811,8 +8487,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HAN
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8862,8 +8537,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CV_HANDL
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8913,8 +8587,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8929,8 +8602,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CV_HANDLE
compare_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8945,8 +8617,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZE
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8961,8 +8632,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(Z
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8977,8 +8647,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(Z
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -8993,23 +8662,43 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CONST != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CV, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, IS_CV);
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9020,11 +8709,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HAN
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9036,19 +8724,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -9056,18 +8739,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
} else {
if (IS_CV == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
HANDLE_EXCEPTION();
}
container = EX_CONSTANT(opline->op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9081,8 +8763,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HAND
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -9139,8 +8821,7 @@ fetch_obj_r_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9154,8 +8835,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HAN
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -9212,8 +8893,7 @@ fetch_obj_is_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9230,35 +8910,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = NULL;
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *container;
+
+ SAVE_OPLINE();
+ container = EX_CONSTANT(opline->op1);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var));
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -9323,8 +9010,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HAND
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9351,14 +9037,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
HANDLE_EXCEPTION();
@@ -9367,8 +9052,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
object = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -9383,12 +9068,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
}
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
HANDLE_EXCEPTION();
@@ -9404,7 +9090,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
HANDLE_EXCEPTION();
@@ -9414,7 +9100,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
@@ -9426,6 +9112,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -9443,8 +9132,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9460,27 +9148,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_CONST == IS_CONST &&
IS_CV == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_CONST != IS_CONST &&
IS_CV == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -9491,15 +9185,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
if (IS_CV != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ do {
+ if (IS_CV & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
- HANDLE_EXCEPTION();
+ HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -9510,7 +9211,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
HANDLE_EXCEPTION();
@@ -9524,33 +9225,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (IS_CV != IS_CONST) {
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -9563,11 +9273,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
}
- if (IS_CONST != IS_CONST) {
+ if (IS_CONST == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -9576,8 +9290,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9591,24 +9304,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H
zend_class_entry *called_scope;
zend_object *object;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
+ uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
SAVE_OPLINE();
function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
func = fcc.function_handler;
+ called_scope = fcc.called_scope;
+ object = fcc.object;
if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
/* Delay closure destruction until its invocation */
if (IS_CV & (IS_VAR|IS_CV)) {
ZVAL_DEREF(function_name);
}
- ZEND_ASSERT(GC_TYPE(func->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(func->common.prototype)++;
+ ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)func->common.prototype)++;
call_info |= ZEND_CALL_CLOSURE;
- }
- called_scope = fcc.called_scope;
- object = fcc.object;
- if (object) {
+ } else if (object) {
call_info |= ZEND_CALL_RELEASE_THIS;
GC_REFCOUNT(object)++; /* For $this pointer */
}
@@ -9618,6 +9330,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H
zend_error(E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ if (EXPECTED(func->type == ZEND_USER_FUNCTION) && UNEXPECTED(!func->op_array.run_time_cache)) {
+ init_func_run_time_cache(&func->op_array);
}
} else {
zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);
@@ -9632,8 +9350,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9646,12 +9363,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZE
/* Check whether an exception has been thrown, if not, jump over code */
zend_exception_restore();
if (EG(exception) == NULL) {
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(catch_ce == NULL)) {
catch_ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), catch_ce);
@@ -9670,8 +9386,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZE
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
- ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ ZEND_VM_CONTINUE();
}
}
@@ -9725,7 +9441,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEN
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
} else {
@@ -9742,6 +9458,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEN
SAVE_OPLINE();
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((IS_CONST & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -9750,8 +9474,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEN
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9764,11 +9487,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C
if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -9777,10 +9495,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C
if (IS_CONST == IS_TMP_VAR) {
/* pass */
} else if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CONST == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -9850,8 +9566,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -9897,8 +9612,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CON
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -9988,6 +9703,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -10019,8 +9737,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10034,8 +9751,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CO
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -10066,8 +9783,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10078,7 +9794,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -10097,33 +9813,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = EX_CONSTANT(opline->op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CONST != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CONST == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -10137,8 +9847,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -10165,8 +9875,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -10211,20 +9921,52 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE
ZEND_VM_RETURN();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
- SAVE_OPLINE();
- op1 = EX_CONSTANT(opline->op1);
- op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ container = EX_CONSTANT(opline->op1);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (IS_CONST & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10267,8 +10009,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER(
add_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10311,8 +10052,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_TMPVAR_HANDLER(
sub_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10358,8 +10098,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_TMPVAR_HANDLER(
mul_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10374,8 +10113,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER(
fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10413,8 +10151,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER(
mod_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10429,8 +10166,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_TMPVAR_HANDLER(Z
shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10445,8 +10181,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_TMPVAR_HANDLER(Z
shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+
+ zval_ptr_dtor_nogc(free_op2);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10484,7 +10234,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -10506,8 +10256,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10548,7 +10297,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HAN
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op2);
@@ -10575,8 +10324,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HAN
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10617,7 +10365,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
zval_ptr_dtor_nogc(free_op2);
@@ -10644,8 +10392,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10695,8 +10442,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_TMPVAR_H
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10746,8 +10492,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10762,8 +10507,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HA
compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10778,8 +10522,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLE
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10794,8 +10537,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDL
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10810,8 +10552,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDL
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10826,23 +10567,43 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HAN
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (IS_CONST != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, (IS_TMP_VAR|IS_VAR), BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, (IS_TMP_VAR|IS_VAR));
+ }
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10856,8 +10617,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_TMPVAR
zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10869,18 +10629,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -10889,7 +10644,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
} else {
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -10899,8 +10654,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_
zval_ptr_dtor_nogc(free_op2);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10914,8 +10668,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -10973,8 +10727,7 @@ fetch_obj_r_no_object:
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -10988,8 +10741,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_TMPVAR
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -11047,8 +10800,7 @@ fetch_obj_is_no_object:
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11065,35 +10817,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = NULL;
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
zval_ptr_dtor_nogc(free_op2);
if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *container;
+
+ SAVE_OPLINE();
+ container = EX_CONSTANT(opline->op1);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ zval_ptr_dtor_nogc(free_op2);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -11158,8 +10917,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11186,14 +10944,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -11202,8 +10959,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
object = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -11218,12 +10975,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
}
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor_nogc(free_op2);
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -11239,7 +10997,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -11249,7 +11007,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op2);
@@ -11261,6 +11019,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -11279,8 +11040,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_TM
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11296,27 +11056,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_CONST == IS_CONST &&
(IS_TMP_VAR|IS_VAR) == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_CONST != IS_CONST &&
(IS_TMP_VAR|IS_VAR) == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -11327,15 +11093,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
+ do {
+ if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+ zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -11346,7 +11119,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -11360,33 +11133,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
zval_ptr_dtor_nogc(free_op2);
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -11399,11 +11181,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
}
}
- if (IS_CONST != IS_CONST) {
+ if (IS_CONST == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -11412,8 +11198,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11427,24 +11212,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV
zend_class_entry *called_scope;
zend_object *object;
zend_execute_data *call;
- uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
+ uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
SAVE_OPLINE();
function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
func = fcc.function_handler;
+ called_scope = fcc.called_scope;
+ object = fcc.object;
if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
/* Delay closure destruction until its invocation */
if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) {
ZVAL_DEREF(function_name);
}
- ZEND_ASSERT(GC_TYPE(func->common.prototype) == IS_OBJECT);
- GC_REFCOUNT(func->common.prototype)++;
+ ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT);
+ GC_REFCOUNT((zend_object*)func->common.prototype)++;
call_info |= ZEND_CALL_CLOSURE;
- }
- called_scope = fcc.called_scope;
- object = fcc.object;
- if (object) {
+ } else if (object) {
call_info |= ZEND_CALL_RELEASE_THIS;
GC_REFCOUNT(object)++; /* For $this pointer */
}
@@ -11454,6 +11238,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV
zend_error(E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ if (EXPECTED(func->type == ZEND_USER_FUNCTION) && UNEXPECTED(!func->op_array.run_time_cache)) {
+ init_func_run_time_cache(&func->op_array);
}
} else {
zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);
@@ -11469,8 +11259,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV
EX(call) = call;
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11511,7 +11300,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op2);
} else {
@@ -11528,6 +11317,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER
SAVE_OPLINE();
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((IS_CONST & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -11536,8 +11333,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11550,11 +11346,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_T
if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -11563,10 +11354,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_T
if (IS_CONST == IS_TMP_VAR) {
/* pass */
} else if (IS_CONST == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CONST == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -11636,8 +11425,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11683,8 +11471,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CON
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -11774,6 +11562,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -11805,8 +11596,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -11820,8 +11610,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CO
SAVE_OPLINE();
container = EX_CONSTANT(opline->op1);
- if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -11853,23 +11643,500 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
+ container = EX_CONSTANT(opline->op1);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (IS_CONST & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
op1 = EX_CONSTANT(opline->op1);
- op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) + Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
- zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ fast_long_add_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) - Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ fast_long_sub_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) * Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+ zend_long overflow;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
+ Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_CONSTANT(opline->op1);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
ZEND_VM_NEXT_OPCODE();
}
@@ -11877,46 +12144,61 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_O
{
USE_OPLINE
zval *retval_ptr;
+ zval *return_value;
zend_free_op free_op1;
retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ return_value = EX(return_value);
if (IS_TMP_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(retval_ptr) == IS_UNDEF)) {
SAVE_OPLINE();
retval_ptr = GET_OP1_UNDEF_CV(retval_ptr, BP_VAR_R);
- if (EX(return_value)) {
- ZVAL_NULL(EX(return_value));
+ if (return_value) {
+ ZVAL_NULL(return_value);
}
- } else if (!EX(return_value)) {
- if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_TMP_VAR ) {
+ } else if (!return_value) {
+ if (IS_TMP_VAR & (IS_VAR|IS_TMP_VAR)) {
if (Z_REFCOUNTED_P(free_op1) && !Z_DELREF_P(free_op1)) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(free_op1));
+ zval_dtor_func(Z_COUNTED_P(free_op1));
}
}
} else {
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
- zval_copy_ctor_func(EX(return_value));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(return_value))) {
+ Z_ADDREF_P(return_value);
}
}
} else if (IS_TMP_VAR == IS_CV) {
- ZVAL_DEREF(retval_ptr);
- ZVAL_COPY(EX(return_value), retval_ptr);
+ if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
+ if (EXPECTED(!Z_OPT_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ if (EXPECTED(!(EX_CALL_INFO() & ZEND_CALL_CODE))) {
+ ZVAL_NULL(retval_ptr);
+ } else {
+ Z_ADDREF_P(return_value);
+ }
+ } else {
+ retval_ptr = Z_REFVAL_P(retval_ptr);
+ ZVAL_COPY(return_value, retval_ptr);
+ }
+ } else {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ }
} else /* if (IS_TMP_VAR == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(retval_ptr))) {
zend_refcounted *ref = Z_COUNTED_P(retval_ptr);
retval_ptr = Z_REFVAL_P(retval_ptr);
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
efree_size(ref, sizeof(zend_reference));
} else if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
Z_ADDREF_P(retval_ptr);
}
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
}
}
}
@@ -11932,21 +12214,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER
SAVE_OPLINE();
do {
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR ||
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR)) ||
(IS_TMP_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
if (!EX(return_value)) {
- if (IS_TMP_VAR == IS_TMP_VAR) {
- zval_ptr_dtor_nogc(free_op1);
- }
+ zval_ptr_dtor_nogc(free_op1);
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (IS_TMP_VAR != IS_TMP_VAR) {
- zval_opt_copy_ctor_no_imm(EX(return_value));
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(Z_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ break;
+ }
+
+ ZVAL_NEW_REF(EX(return_value), retval_ptr);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
}
}
break;
@@ -11954,20 +12238,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER
retval_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot return string offsets by reference");
- HANDLE_EXCEPTION();
- }
-
if (IS_TMP_VAR == IS_VAR) {
if (retval_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
+ (opline->extended_value == ZEND_RETURNS_FUNCTION && !Z_ISREF_P(retval_ptr))) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
if (EX(return_value)) {
ZVAL_NEW_REF(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
+ } else {
+
}
break;
}
@@ -11977,8 +12255,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER
ZVAL_MAKE_REF(retval_ptr);
Z_ADDREF_P(retval_ptr);
ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
}
+
} while (0);
ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
@@ -11996,11 +12274,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_TMP_HAND
retval = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
/* Copy return value into generator->retval */
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
ZVAL_COPY_VALUE(&generator->retval, retval);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->retval))) {
- zval_copy_ctor_func(&generator->retval);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->retval))) {
+ Z_ADDREF(generator->retval);
}
}
} else if (IS_TMP_VAR == IS_CV) {
@@ -12048,11 +12326,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OP
}
if (IS_TMP_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Can only throw objects");
+ zend_throw_error(NULL, "Can only throw objects");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
}
@@ -12069,37 +12347,52 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OP
HANDLE_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value, *arg;
zend_free_op free_op1;
+ uint32_t arg_num = opline->op2.num;
+ if (EXPECTED(0)) {
+ if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ goto send_val_by_ref;
+ }
+ } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+send_val_by_ref:
+ SAVE_OPLINE();
+ zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num);
+ zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_UNDEF(arg);
+ HANDLE_EXCEPTION();
+ }
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, value);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
- zval_copy_ctor_func(arg);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
}
}
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_TMP_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value, *arg;
zend_free_op free_op1;
+ uint32_t arg_num = opline->op2.num;
- if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
- if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ if (EXPECTED(1)) {
+ if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
goto send_val_by_ref;
}
- } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
send_val_by_ref:
SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot pass parameter %d by reference", opline->op2.num);
+ zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num);
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_UNDEF(arg);
@@ -12109,8 +12402,8 @@ send_val_by_ref:
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, value);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
- zval_copy_ctor_func(arg);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -12164,15 +12457,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC
if (Z_TYPE_P(expr) == opline->extended_value) {
ZVAL_COPY_VALUE(result, expr);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
- zval_copy_ctor_func(result);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_TMP_VAR != IS_TMP_VAR) {
- if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (opline->extended_value == IS_ARRAY) {
@@ -12182,9 +12472,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -12198,11 +12486,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC
if (Z_TYPE_P(expr) != IS_ARRAY) {
object_init(result);
if (Z_TYPE_P(expr) != IS_NULL) {
- expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
+ expr = zend_hash_add_new(Z_OBJPROP_P(result), CG(known_strings)[ZEND_STR_SCALAR], expr);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -12215,8 +12501,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPC
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12237,8 +12522,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE
}
Z_FE_POS_P(result) = 0;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_TMP_VAR != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
HashPosition pos = 0;
@@ -12249,6 +12533,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE
if (IS_TMP_VAR != IS_TMP_VAR) {
Z_ADDREF_P(array_ptr);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
pos = 0;
p = fe_ht->arData;
@@ -12270,8 +12561,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
@@ -12312,8 +12602,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -12354,8 +12643,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z
Z_ADDREF_P(array_ref);
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
} else {
- array_ptr = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(array_ptr, array_ref);
+ array_ref = EX_VAR(opline->result.var);
+ ZVAL_NEW_REF(array_ref, array_ptr);
+ array_ptr = Z_REFVAL_P(array_ref);
}
if (IS_TMP_VAR == IS_CONST) {
zval_copy_ctor_func(array_ptr);
@@ -12380,8 +12670,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_TMP_VAR != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
@@ -12395,6 +12684,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z
array_ptr = EX_VAR(opline->result.var);
ZVAL_COPY_VALUE(array_ptr, array_ref);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
p = fe_ht->arData;
while (1) {
@@ -12415,8 +12711,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
@@ -12473,8 +12768,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -12517,25 +12811,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_
value = Z_REFVAL_P(value);
}
if (i_zend_is_true(value)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+
+ ZVAL_COPY_VALUE(result, value);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_TMP_VAR == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12556,25 +12852,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_TMP_HANDLER(ZEND
}
if (Z_TYPE_P(value) > IS_NULL) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+ ZVAL_COPY_VALUE(result, value);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_TMP_VAR == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12582,29 +12879,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEN
USE_OPLINE
zend_free_op free_op1;
zval *value;
+ zval *result = EX_VAR(opline->result.var);
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
if (IS_TMP_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
SAVE_OPLINE();
- value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ ZVAL_NULL(result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && Z_ISREF_P(value)) {
- ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
- if (IS_TMP_VAR == IS_VAR) {
+ if (IS_TMP_VAR == IS_CV) {
+ ZVAL_DEREF(value);
+ ZVAL_COPY(result, value);
+ } else if (IS_TMP_VAR == IS_VAR) {
+ if (UNEXPECTED(Z_ISREF_P(value))) {
+ ZVAL_COPY_VALUE(result, Z_REFVAL_P(value));
if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
efree_size(Z_REF_P(value), sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
+ } else {
+ ZVAL_COPY_VALUE(result, value);
}
} else {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZVAL_COPY_VALUE(result, value);
if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) {
+ Z_ADDREF_P(result);
}
- } else if (IS_TMP_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -12622,6 +12926,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_TMP_HANDLER(ZE
SAVE_OPLINE();
val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
+ zend_throw_error(NULL, "Cannot use \"yield from\" in a force-closed generator");
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+
if (Z_TYPE_P(val) == IS_ARRAY) {
ZVAL_COPY_VALUE(&generator->values, val);
if (IS_TMP_VAR != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
@@ -12640,13 +12950,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_TMP_HANDLER(ZE
if (Z_ISUNDEF(new_gen->retval)) {
if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
- zend_throw_error(zend_ce_error, "Impossible to yield from the Generator being currently run");
+ zend_throw_error(NULL, "Impossible to yield from the Generator being currently run");
HANDLE_EXCEPTION();
} else {
zend_generator_yield_from(generator, new_gen);
}
} else if (UNEXPECTED(new_gen->execute_data == NULL)) {
- zend_throw_error(zend_ce_error, "Generator passed to yield from was aborted without proper return and is unable to continue");
+ zend_throw_error(NULL, "Generator passed to yield from was aborted without proper return and is unable to continue");
HANDLE_EXCEPTION();
} else {
if (RETURN_VALUE_USED(opline)) {
@@ -12660,7 +12970,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_TMP_HANDLER(ZE
if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
if (!EG(exception)) {
- zend_throw_error(zend_ce_error, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
}
HANDLE_EXCEPTION();
}
@@ -12677,7 +12987,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_TMP_HANDLER(ZE
ZVAL_OBJ(&generator->values, &iter->std);
}
} else {
- zend_throw_error(zend_ce_error, "Can use \"yield from\" only with arrays and Traversables", 0);
+ zend_throw_error(NULL, "Can use \"yield from\" only with arrays and Traversables", 0);
HANDLE_EXCEPTION();
}
@@ -12687,6 +12997,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_TMP_HANDLER(ZE
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ /* This generator has no send target (though the generator we delegate to might have one) */
+ generator->send_target = NULL;
+
/* We increment to the next op, so we are at the correct position when the
* generator is resumed. */
ZEND_VM_INC_OPCODE();
@@ -12711,7 +13024,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_TMP_HANDLER(ZE
if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
zend_class_entry *ce = Z_OBJCE_P(value);
- if (UNEXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
+ if (EXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
EXPECTED(memcmp(ZSTR_VAL(ce->name), "__PHP_Incomplete_Class", sizeof("__PHP_Incomplete_Class") - 1) != 0)) {
result = 1;
}
@@ -12731,8 +13044,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_TMP_HANDLER(ZE
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12748,12 +13060,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HA
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12769,12 +13078,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONS
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12786,18 +13092,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CO
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -12806,7 +13107,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CO
} else {
if (IS_CONST == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -12816,8 +13117,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CO
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12831,8 +13131,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HAN
SAVE_OPLINE();
container = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
- if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -12889,8 +13189,7 @@ fetch_obj_r_no_object:
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -12907,30 +13206,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CO
property = EX_CONSTANT(opline->op2);
container = NULL;
- if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_TMP_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -12963,7 +13256,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_ADD_SPEC_TMP_CONST_HANDLE
}
rope[opline->extended_value] = _zval_get_string_func(var);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -12998,7 +13291,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_CONST_HANDLE
}
rope[opline->extended_value] = _zval_get_string_func(var);
- CHECK_EXCEPTION();
+ if (UNEXPECTED(EG(exception))) {
+ for (i = 0; i <= opline->extended_value; i++) {
+ zend_string_release(rope[i]);
+ }
+ HANDLE_EXCEPTION();
+ }
}
}
for (i = 0; i <= opline->extended_value; i++) {
@@ -13027,11 +13325,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CON
if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -13040,10 +13333,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CON
if (IS_TMP_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_TMP_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -13113,8 +13404,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13156,7 +13446,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(Z
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -13175,33 +13465,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(Z
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ if (IS_TMP_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_TMP_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_TMP_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -13215,8 +13499,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -13243,8 +13527,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -13302,12 +13586,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HAND
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13323,12 +13604,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13339,7 +13617,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMP_HANDLER(ZEN
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -13358,33 +13636,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMP_HANDLER(ZEN
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ if (IS_TMP_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_TMP_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_TMP_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -13398,8 +13670,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMP_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -13426,8 +13698,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMP_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -13485,12 +13757,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HAND
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13506,12 +13775,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13522,7 +13788,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_VAR_HANDLER(ZEN
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -13541,33 +13807,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_VAR_HANDLER(ZEN
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ if (IS_TMP_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_TMP_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_TMP_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -13581,8 +13841,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_VAR_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -13609,8 +13869,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_VAR_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -13664,18 +13924,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UN
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -13684,7 +13939,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UN
} else {
if (IS_UNUSED == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -13694,8 +13949,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UN
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13717,7 +13971,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UN
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
retval_ref = retval_ptr = EX_VAR(opline->result.var);
- } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ } else if (IS_TMP_VAR == IS_VAR) {
+ if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
+ retval_ptr = Z_INDIRECT_P(retval_ptr);
+ }
+ ZVAL_DEREF(retval_ptr);
+ } else if (IS_TMP_VAR == IS_CV) {
ZVAL_DEREF(retval_ptr);
}
@@ -13739,12 +13998,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UN
zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor_nogc(free_op1);
+ if (IS_TMP_VAR == IS_CONST) {
+ zval_ptr_dtor_nogc(retval_ptr);
+ }
}
#endif
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13757,11 +14017,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNU
if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -13770,10 +14025,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNU
if (IS_TMP_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_TMP_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -13843,8 +14096,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -13886,7 +14138,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER(
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -13905,33 +14157,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER(
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ if (IS_TMP_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_TMP_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_TMP_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -13945,8 +14191,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -13973,8 +14219,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -14032,12 +14278,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDL
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14053,12 +14296,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_H
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14070,19 +14310,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -14090,18 +14325,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV
} else {
if (IS_CV == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14115,8 +14349,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLE
SAVE_OPLINE();
container = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
- if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -14173,8 +14407,7 @@ fetch_obj_r_no_object:
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14191,30 +14424,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CV
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = NULL;
- if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_TMP_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -14247,7 +14474,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_ADD_SPEC_TMP_CV_HANDLER(Z
}
rope[opline->extended_value] = _zval_get_string_func(var);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -14282,7 +14509,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_CV_HANDLER(Z
}
rope[opline->extended_value] = _zval_get_string_func(var);
- CHECK_EXCEPTION();
+ if (UNEXPECTED(EG(exception))) {
+ for (i = 0; i <= opline->extended_value; i++) {
+ zend_string_release(rope[i]);
+ }
+ HANDLE_EXCEPTION();
+ }
}
}
for (i = 0; i <= opline->extended_value; i++) {
@@ -14311,11 +14543,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_
if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -14324,10 +14551,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_
if (IS_TMP_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_TMP_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -14397,8 +14622,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14440,7 +14664,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -14459,33 +14683,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
+ if (IS_TMP_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_TMP_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_TMP_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -14499,8 +14717,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -14527,8 +14745,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -14573,6 +14791,37 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND
ZEND_VM_RETURN();
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_LEXICAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *closure, *var;
+ zend_string *var_name;
+
+ closure = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
+ if (opline->extended_value) {
+ /* By-ref binding */
+ var = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op2.var);
+ ZVAL_MAKE_REF(var);
+ Z_ADDREF_P(var);
+ } else {
+ var = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (UNEXPECTED(Z_ISUNDEF_P(var))) {
+ SAVE_OPLINE();
+ var = GET_OP2_UNDEF_CV(var, BP_VAR_R);
+ if (UNEXPECTED(EG(exception))) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ ZVAL_DEREF(var);
+ Z_TRY_ADDREF_P(var);
+ }
+
+ var_name = CV_DEF_OF(EX_VAR_TO_NUM(opline->op2.var));
+ zend_closure_bind_var(closure, var_name, var);
+ ZEND_VM_NEXT_OPCODE();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -14582,18 +14831,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TM
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -14602,7 +14846,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TM
} else {
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -14612,8 +14856,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TM
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14627,8 +14870,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HA
SAVE_OPLINE();
container = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1);
- if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -14686,8 +14929,7 @@ fetch_obj_r_no_object:
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14704,30 +14946,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TM
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = NULL;
- if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_TMP_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_TMP_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_TMP_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
zval_ptr_dtor_nogc(free_op2);
if (IS_TMP_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -14760,7 +14996,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_ADD_SPEC_TMP_TMPVAR_HANDL
}
rope[opline->extended_value] = _zval_get_string_func(var);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -14795,7 +15031,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDL
}
rope[opline->extended_value] = _zval_get_string_func(var);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
+ if (UNEXPECTED(EG(exception))) {
+ for (i = 0; i <= opline->extended_value; i++) {
+ zend_string_release(rope[i]);
+ }
+ HANDLE_EXCEPTION();
+ }
}
}
for (i = 0; i <= opline->extended_value; i++) {
@@ -14824,11 +15065,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP
if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -14837,10 +15073,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP
if (IS_TMP_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_TMP_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_TMP_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -14910,8 +15144,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -14945,7 +15178,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HAN
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
@@ -14953,22 +15186,56 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_HANDLER(ZEND_
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
+ var_ptr = GET_OP1_UNDEF_CV(var_ptr, BP_VAR_RW);
+ }
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
+
+ increment_function(var_ptr);
+
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *var_ptr;
+
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
fast_long_increment_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
}
ZEND_VM_NEXT_OPCODE();
}
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
ZEND_VM_NEXT_OPCODE();
@@ -14983,16 +15250,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_HANDLER(ZEND_
increment_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
@@ -15000,22 +15266,56 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
}
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
+ var_ptr = GET_OP1_UNDEF_CV(var_ptr, BP_VAR_RW);
+ }
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
+
+ decrement_function(var_ptr);
+
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ }
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *var_ptr;
+
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
fast_long_decrement_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
}
ZEND_VM_NEXT_OPCODE();
}
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
ZEND_VM_NEXT_OPCODE();
@@ -15030,13 +15330,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_
decrement_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15047,19 +15346,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_SPEC_VAR_HANDLER(ZEND
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
fast_long_increment_function(var_ptr);
ZEND_VM_NEXT_OPCODE();
}
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
ZVAL_NULL(EX_VAR(opline->result.var));
ZEND_VM_NEXT_OPCODE();
}
@@ -15074,9 +15367,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_SPEC_VAR_HANDLER(ZEND
increment_function(var_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15087,19 +15379,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_SPEC_VAR_HANDLER(ZEND
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
fast_long_decrement_function(var_ptr);
ZEND_VM_NEXT_OPCODE();
}
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
ZVAL_NULL(EX_VAR(opline->result.var));
ZEND_VM_NEXT_OPCODE();
}
@@ -15114,55 +15400,69 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_SPEC_VAR_HANDLER(ZEND
decrement_function(var_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *retval_ptr;
+ zval *return_value;
zend_free_op free_op1;
retval_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ return_value = EX(return_value);
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(retval_ptr) == IS_UNDEF)) {
SAVE_OPLINE();
retval_ptr = GET_OP1_UNDEF_CV(retval_ptr, BP_VAR_R);
- if (EX(return_value)) {
- ZVAL_NULL(EX(return_value));
+ if (return_value) {
+ ZVAL_NULL(return_value);
}
- } else if (!EX(return_value)) {
- if (IS_VAR == IS_VAR || IS_VAR == IS_TMP_VAR ) {
+ } else if (!return_value) {
+ if (IS_VAR & (IS_VAR|IS_TMP_VAR)) {
if (Z_REFCOUNTED_P(free_op1) && !Z_DELREF_P(free_op1)) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(free_op1));
+ zval_dtor_func(Z_COUNTED_P(free_op1));
}
}
} else {
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
- zval_copy_ctor_func(EX(return_value));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(return_value))) {
+ Z_ADDREF_P(return_value);
}
}
} else if (IS_VAR == IS_CV) {
- ZVAL_DEREF(retval_ptr);
- ZVAL_COPY(EX(return_value), retval_ptr);
+ if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
+ if (EXPECTED(!Z_OPT_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ if (EXPECTED(!(EX_CALL_INFO() & ZEND_CALL_CODE))) {
+ ZVAL_NULL(retval_ptr);
+ } else {
+ Z_ADDREF_P(return_value);
+ }
+ } else {
+ retval_ptr = Z_REFVAL_P(retval_ptr);
+ ZVAL_COPY(return_value, retval_ptr);
+ }
+ } else {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ }
} else /* if (IS_VAR == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(retval_ptr))) {
zend_refcounted *ref = Z_COUNTED_P(retval_ptr);
retval_ptr = Z_REFVAL_P(retval_ptr);
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
efree_size(ref, sizeof(zend_reference));
} else if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
Z_ADDREF_P(retval_ptr);
}
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
}
}
}
@@ -15178,21 +15478,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER
SAVE_OPLINE();
do {
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR ||
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR)) ||
(IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
retval_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (!EX(return_value)) {
- if (IS_VAR == IS_TMP_VAR) {
- zval_ptr_dtor_nogc(free_op1);
- }
+ zval_ptr_dtor_nogc(free_op1);
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (IS_VAR != IS_TMP_VAR) {
- zval_opt_copy_ctor_no_imm(EX(return_value));
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ break;
+ }
+
+ ZVAL_NEW_REF(EX(return_value), retval_ptr);
+ if (IS_VAR == IS_CONST) {
+ if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
}
}
break;
@@ -15200,20 +15502,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER
retval_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot return string offsets by reference");
- HANDLE_EXCEPTION();
- }
-
if (IS_VAR == IS_VAR) {
if (retval_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
+ (opline->extended_value == ZEND_RETURNS_FUNCTION && !Z_ISREF_P(retval_ptr))) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
if (EX(return_value)) {
ZVAL_NEW_REF(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
+ } else {
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
}
break;
}
@@ -15223,11 +15519,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER
ZVAL_MAKE_REF(retval_ptr);
Z_ADDREF_P(retval_ptr);
ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
}
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -15243,11 +15539,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_VAR_HAND
retval = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
/* Copy return value into generator->retval */
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
ZVAL_COPY_VALUE(&generator->retval, retval);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->retval))) {
- zval_copy_ctor_func(&generator->retval);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->retval))) {
+ Z_ADDREF(generator->retval);
}
}
} else if (IS_VAR == IS_CV) {
@@ -15295,11 +15591,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OP
}
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Can only throw objects");
+ zend_throw_error(NULL, "Can only throw objects");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
}
@@ -15325,13 +15621,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND
varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (IS_VAR == IS_CV) {
- ZVAL_DEREF(varptr);
+ ZVAL_OPT_DEREF(varptr);
ZVAL_COPY(arg, varptr);
} else /* if (IS_VAR == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(varptr))) {
@@ -15358,40 +15657,97 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDL
zend_free_op free_op1;
zval *varptr, *arg;
- if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND)) {
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
+
+ if (EXPECTED(Z_ISREF_P(varptr))) {
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Only variables should be passed by reference");
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varptr, *arg;
+ uint32_t arg_num = opline->op2.num;
+
+ if (EXPECTED(0)) {
+ if (!QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
- }
- varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
- SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- (Z_VAR_FLAGS_P(varptr) & IS_VAR_RET_REF)) &&
- (Z_ISREF_P(varptr) || Z_TYPE_P(varptr) == IS_OBJECT)) {
+ varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
- ZVAL_MAKE_REF(varptr);
- if (IS_VAR == IS_CV) {
- Z_ADDREF_P(varptr);
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ QUICK_ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) {
+ ZEND_VM_NEXT_OPCODE();
}
} else {
- if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
- !(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- SAVE_OPLINE();
- zend_error(E_NOTICE, "Only variables should be passed by reference");
- CHECK_EXCEPTION();
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ }
+
+ varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
+
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) {
+ ZEND_VM_NEXT_OPCODE();
}
}
- arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- ZVAL_COPY_VALUE(arg, varptr);
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Only variables should be passed by reference");
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
- ZEND_VM_NEXT_OPCODE();
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varptr, *arg;
+ uint32_t arg_num = opline->op2.num;
+
+ if (EXPECTED(1)) {
+ if (!QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ }
+
+ varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
+
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ QUICK_ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else {
+ if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ }
+
+ varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
+
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num))) {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ }
+
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Only variables should be passed by reference");
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15403,30 +15759,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND
SAVE_OPLINE();
varptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(varptr == NULL)) {
- zend_throw_error(zend_ce_error, "Only variables can be passed by reference");
- HANDLE_EXCEPTION();
- }
-
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- if (IS_VAR == IS_VAR && UNEXPECTED(varptr == &EG(error_zval))) {
- ZVAL_NEW_REF(arg, &EG(uninitialized_zval));
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
+ ZVAL_NEW_EMPTY_REF(arg);
+ ZVAL_NULL(Z_REFVAL_P(arg));
ZEND_VM_NEXT_OPCODE();
}
if (Z_ISREF_P(varptr)) {
Z_ADDREF_P(varptr);
ZVAL_COPY_VALUE(arg, varptr);
- } else if (IS_VAR == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
- ZVAL_NEW_REF(arg, varptr);
} else {
ZVAL_NEW_REF(arg, varptr);
Z_ADDREF_P(arg);
ZVAL_REF(varptr, Z_REF_P(arg));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
ZEND_VM_NEXT_OPCODE();
}
@@ -15435,12 +15784,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER(Z
USE_OPLINE
zval *varptr, *arg;
zend_free_op free_op1;
+ uint32_t arg_num = opline->op2.num;
- if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
- if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ if (EXPECTED(0)) {
+ if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
goto send_var_by_ref;
}
- } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
send_var_by_ref:
ZEND_VM_TAIL_CALL(ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -15448,13 +15798,65 @@ send_var_by_ref:
varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (IS_VAR == IS_CV) {
- ZVAL_DEREF(varptr);
+ ZVAL_OPT_DEREF(varptr);
+ ZVAL_COPY(arg, varptr);
+ } else /* if (IS_VAR == IS_VAR) */ {
+ if (UNEXPECTED(Z_ISREF_P(varptr))) {
+ zend_refcounted *ref = Z_COUNTED_P(varptr);
+
+ varptr = Z_REFVAL_P(varptr);
+ ZVAL_COPY_VALUE(arg, varptr);
+ if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
+ efree_size(ref, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(arg)) {
+ Z_ADDREF_P(arg);
+ }
+ } else {
+ ZVAL_COPY_VALUE(arg, varptr);
+ }
+ }
+
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_VAR_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *varptr, *arg;
+ zend_free_op free_op1;
+ uint32_t arg_num = opline->op2.num;
+
+ if (EXPECTED(1)) {
+ if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ goto send_var_by_ref;
+ }
+ } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+send_var_by_ref:
+ ZEND_VM_TAIL_CALL(ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
+ }
+
+ varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+
+ if (IS_VAR == IS_CV) {
+ ZVAL_OPT_DEREF(varptr);
ZVAL_COPY(arg, varptr);
} else /* if (IS_VAR == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(varptr))) {
@@ -15487,7 +15889,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_USER_SPEC_VAR_HANDLER(ZEN
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
if (UNEXPECTED(!Z_ISREF_P(arg))) {
-
if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given",
@@ -15499,92 +15900,93 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_USER_SPEC_VAR_HANDLER(ZEN
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
ZVAL_UNDEF(param);
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-
- ZVAL_NEW_REF(arg, arg);
}
- Z_ADDREF_P(arg);
} else {
if (Z_ISREF_P(arg) &&
!(EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
/* don't separate references for __call */
arg = Z_REFVAL_P(arg);
}
- if (Z_OPT_REFCOUNTED_P(arg)) {
- Z_ADDREF_P(arg);
- }
}
- ZVAL_COPY_VALUE(param, arg);
+ ZVAL_COPY(param, arg);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval object_zval;
+ zval *result;
zend_function *constructor;
zend_class_entry *ce;
+ zend_execute_data *call;
SAVE_OPLINE();
if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
- if (UNEXPECTED(object_init_ex(&object_zval, ce) != SUCCESS)) {
+
+ result = EX_VAR(opline->result.var);
+ if (UNEXPECTED(object_init_ex(result, ce) != SUCCESS)) {
HANDLE_EXCEPTION();
}
- constructor = Z_OBJ_HT(object_zval)->get_constructor(Z_OBJ(object_zval));
+ constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
if (constructor == NULL) {
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), &object_zval);
- } else {
- OBJ_RELEASE(Z_OBJ(object_zval));
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
- ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
} else {
+ if (EXPECTED(constructor->type == ZEND_USER_FUNCTION) && UNEXPECTED(!constructor->op_array.run_time_cache)) {
+ init_func_run_time_cache(&constructor->op_array);
+ }
/* We are not handling overloaded classes right now */
- zend_execute_data *call = zend_vm_stack_push_call_frame(
- ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR |
- (EXPECTED(RETURN_VALUE_USED(opline)) ? 0 : ZEND_CALL_CTOR_RESULT_UNUSED),
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
constructor,
opline->extended_value,
ce,
- Z_OBJ(object_zval));
- call->prev_execute_data = EX(call);
- EX(call) = call;
-
- if (EXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), &object_zval);
- }
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ Z_OBJ_P(result));
+ Z_ADDREF_P(result);
}
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15635,16 +16037,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC
if (Z_TYPE_P(expr) == opline->extended_value) {
ZVAL_COPY_VALUE(result, expr);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
- zval_copy_ctor_func(result);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_VAR != IS_TMP_VAR) {
- if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (opline->extended_value == IS_ARRAY) {
@@ -15654,9 +16053,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -15670,11 +16067,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC
if (Z_TYPE_P(expr) != IS_ARRAY) {
object_init(result);
if (Z_TYPE_P(expr) != IS_NULL) {
- expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
+ expr = zend_hash_add_new(Z_OBJPROP_P(result), CG(known_strings)[ZEND_STR_SCALAR], expr);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -15687,8 +16082,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPC
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -15710,8 +16104,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE
Z_FE_POS_P(result) = 0;
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_VAR != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
HashPosition pos = 0;
@@ -15722,6 +16115,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE
if (IS_VAR != IS_TMP_VAR) {
Z_ADDREF_P(array_ptr);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
pos = 0;
p = fe_ht->arData;
@@ -15744,8 +16144,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
@@ -15786,8 +16185,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -15828,8 +16226,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
Z_ADDREF_P(array_ref);
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
} else {
- array_ptr = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(array_ptr, array_ref);
+ array_ref = EX_VAR(opline->result.var);
+ ZVAL_NEW_REF(array_ref, array_ptr);
+ array_ptr = Z_REFVAL_P(array_ref);
}
if (IS_VAR == IS_CONST) {
zval_copy_ctor_func(array_ptr);
@@ -15840,7 +16239,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
p = fe_ht->arData;
while (1) {
if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
@@ -15854,9 +16253,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_VAR != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
@@ -15870,11 +16268,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
array_ptr = EX_VAR(opline->result.var);
ZVAL_COPY_VALUE(array_ptr, array_ref);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
p = fe_ht->arData;
while (1) {
if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
@@ -15890,9 +16295,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
@@ -15900,7 +16304,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
if (IS_VAR == IS_VAR) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
zval_ptr_dtor_nogc(free_op1);
}
@@ -15917,7 +16321,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
if (UNEXPECTED(EG(exception) != NULL)) {
OBJ_RELEASE(&iter->std);
if (IS_VAR == IS_VAR) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
zval_ptr_dtor_nogc(free_op1);
}
@@ -15930,7 +16334,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
if (UNEXPECTED(EG(exception) != NULL)) {
OBJ_RELEASE(&iter->std);
if (IS_VAR == IS_VAR) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
zval_ptr_dtor_nogc(free_op1);
}
@@ -15942,15 +16346,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
if (IS_VAR == IS_VAR) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
zval_ptr_dtor_nogc(free_op1);
}
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -15958,7 +16361,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z
ZVAL_UNDEF(EX_VAR(opline->result.var));
Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
if (IS_VAR == IS_VAR) {
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
zval_ptr_dtor_nogc(free_op1);
}
@@ -16005,7 +16408,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SPEC_VAR_HANDLER(ZE
break;
}
Z_FE_POS_P(array) = pos + 1;
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (!p->key) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else {
@@ -16049,7 +16452,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SPEC_VAR_HANDLER(ZE
pos++;
p++;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (UNEXPECTED(!p->key)) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else if (ZSTR_VAL(p->key)[0]) {
@@ -16084,13 +16487,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SPEC_VAR_HANDLER(ZE
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (UNEXPECTED(iter->funcs->valid(iter) == FAILURE)) {
/* reached end of iteration */
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
goto fe_fetch_r_exit;
@@ -16098,18 +16499,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SPEC_VAR_HANDLER(ZE
}
value = iter->funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (!value) {
/* failure in get_current_data */
goto fe_fetch_r_exit;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (iter->funcs->get_current_key) {
iter->funcs->get_current_key(iter, EX_VAR(opline->result.var));
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
} else {
@@ -16120,10 +16519,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_R_SPEC_VAR_HANDLER(ZE
}
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
-fe_fetch_r_exit:
- if (EXPECTED(!EG(exception))) {
- ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ if (UNEXPECTED(EG(exception))) {
+ HANDLE_EXCEPTION();
}
+fe_fetch_r_exit:
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
ZEND_VM_CONTINUE();
}
@@ -16157,8 +16557,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z
ZVAL_DEREF(array);
if (EXPECTED(Z_TYPE_P(array) == IS_ARRAY)) {
+ pos = zend_hash_iterator_pos_ex(Z_FE_ITER_P(EX_VAR(opline->op1.var)), array);
fe_ht = Z_ARRVAL_P(array);
- pos = zend_hash_iterator_pos(Z_FE_ITER_P(EX_VAR(opline->op1.var)), fe_ht);
p = fe_ht->arData + pos;
while (1) {
if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
@@ -16182,7 +16582,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z
}
break;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (!p->key) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else {
@@ -16240,7 +16640,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z
pos++;
p++;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (UNEXPECTED(!p->key)) {
ZVAL_LONG(EX_VAR(opline->result.var), p->h);
} else if (ZSTR_VAL(p->key)[0]) {
@@ -16275,13 +16675,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (UNEXPECTED(iter->funcs->valid(iter) == FAILURE)) {
/* reached end of iteration */
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
goto fe_fetch_w_exit;
@@ -16289,18 +16687,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z
}
value = iter->funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
if (!value) {
/* failure in get_current_data */
goto fe_fetch_w_exit;
}
- if (opline->result_type == IS_TMP_VAR) {
+ if (opline->result_type & (IS_TMP_VAR|IS_CV)) {
if (iter->funcs->get_current_key) {
iter->funcs->get_current_key(iter, EX_VAR(opline->result.var));
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor(array);
HANDLE_EXCEPTION();
}
} else {
@@ -16311,10 +16707,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z
}
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
-fe_fetch_w_exit:
- if (EXPECTED(!EG(exception))) {
- ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
+ if (UNEXPECTED(EG(exception))) {
+ HANDLE_EXCEPTION();
}
+fe_fetch_w_exit:
+ ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
ZEND_VM_CONTINUE();
}
@@ -16359,25 +16756,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SET_SPEC_VAR_HANDLER(ZEND_
value = Z_REFVAL_P(value);
}
if (i_zend_is_true(value)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+
+ ZVAL_COPY_VALUE(result, value);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_VAR == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -16398,25 +16797,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_VAR_HANDLER(ZEND
}
if (Z_TYPE_P(value) > IS_NULL) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+ ZVAL_COPY_VALUE(result, value);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_VAR == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -16424,29 +16824,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_VAR_HANDLER(ZEN
USE_OPLINE
zend_free_op free_op1;
zval *value;
+ zval *result = EX_VAR(opline->result.var);
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
SAVE_OPLINE();
- value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ ZVAL_NULL(result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && Z_ISREF_P(value)) {
- ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
- if (IS_VAR == IS_VAR) {
+ if (IS_VAR == IS_CV) {
+ ZVAL_DEREF(value);
+ ZVAL_COPY(result, value);
+ } else if (IS_VAR == IS_VAR) {
+ if (UNEXPECTED(Z_ISREF_P(value))) {
+ ZVAL_COPY_VALUE(result, Z_REFVAL_P(value));
if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
efree_size(Z_REF_P(value), sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
+ } else {
+ ZVAL_COPY_VALUE(result, value);
}
} else {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZVAL_COPY_VALUE(result, value);
if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) {
+ Z_ADDREF_P(result);
}
- } else if (IS_VAR == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -16464,6 +16871,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_VAR_HANDLER(ZE
SAVE_OPLINE();
val = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1);
+ if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
+ zend_throw_error(NULL, "Cannot use \"yield from\" in a force-closed generator");
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+
if (Z_TYPE_P(val) == IS_ARRAY) {
ZVAL_COPY_VALUE(&generator->values, val);
if (IS_VAR != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
@@ -16484,13 +16897,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_VAR_HANDLER(ZE
if (Z_ISUNDEF(new_gen->retval)) {
if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
- zend_throw_error(zend_ce_error, "Impossible to yield from the Generator being currently run");
+ zend_throw_error(NULL, "Impossible to yield from the Generator being currently run");
HANDLE_EXCEPTION();
} else {
zend_generator_yield_from(generator, new_gen);
}
} else if (UNEXPECTED(new_gen->execute_data == NULL)) {
- zend_throw_error(zend_ce_error, "Generator passed to yield from was aborted without proper return and is unable to continue");
+ zend_throw_error(NULL, "Generator passed to yield from was aborted without proper return and is unable to continue");
HANDLE_EXCEPTION();
} else {
if (RETURN_VALUE_USED(opline)) {
@@ -16504,7 +16917,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_VAR_HANDLER(ZE
if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
if (!EG(exception)) {
- zend_throw_error(zend_ce_error, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
}
HANDLE_EXCEPTION();
}
@@ -16521,7 +16934,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_VAR_HANDLER(ZE
ZVAL_OBJ(&generator->values, &iter->std);
}
} else {
- zend_throw_error(zend_ce_error, "Can use \"yield from\" only with arrays and Traversables", 0);
+ zend_throw_error(NULL, "Can use \"yield from\" only with arrays and Traversables", 0);
HANDLE_EXCEPTION();
}
@@ -16531,6 +16944,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_VAR_HANDLER(ZE
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ /* This generator has no send target (though the generator we delegate to might have one) */
+ generator->send_target = NULL;
+
/* We increment to the next op, so we are at the correct position when the
* generator is resumed. */
ZEND_VM_INC_OPCODE();
@@ -16555,7 +16971,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_VAR_HANDLER(ZE
if (IS_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
zend_class_entry *ce = Z_OBJCE_P(value);
- if (UNEXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
+ if (EXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
EXPECTED(memcmp(ZSTR_VAL(ce->name), "__PHP_Incomplete_Class", sizeof("__PHP_Incomplete_Class") - 1) != 0)) {
result = 1;
}
@@ -16575,8 +16991,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_VAR_HANDLER(ZE
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -16592,12 +17007,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HA
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -16613,12 +17025,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONS
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -16633,8 +17042,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
@@ -16642,15 +17051,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = EX_CONSTANT(opline->op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -16666,13 +17068,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -16681,83 +17088,106 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op1, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = EX_CONSTANT(opline->op2);
+ if (IS_VAR != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_CONST == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
- do {
- if (IS_VAR == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_VAR != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_CONST == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_CONST);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
+ binary_op(var_ptr, var_ptr, value);
- FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_VAR != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = EX_CONSTANT(opline->op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_VAR != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -16771,13 +17201,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_V
value = EX_CONSTANT(opline->op2);
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -16792,9 +17216,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_V
}
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -16803,13 +17226,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CONST_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16823,13 +17286,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CONST_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16843,13 +17346,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CONST_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16863,13 +17406,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CONST_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16883,13 +17466,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CONST_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16903,13 +17526,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CONST_HANDL
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16923,13 +17586,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CONST_HANDL
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16943,13 +17646,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_H
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16963,13 +17706,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_HA
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -16983,13 +17766,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_H
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -17003,13 +17826,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_H
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -17017,6 +17840,106 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_H
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -17028,20 +17951,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -17055,37 +17972,40 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17109,20 +18029,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -17137,22 +18051,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -17160,9 +18077,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17184,18 +18100,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HAN
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17207,18 +18118,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17230,27 +18136,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CO
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
if (IS_CONST == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -17260,8 +18161,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CO
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17273,19 +18173,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17299,8 +18193,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HAN
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -17357,8 +18251,7 @@ fetch_obj_r_no_object:
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17372,13 +18265,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HAN
property = EX_CONSTANT(opline->op2);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -17388,9 +18276,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HAN
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17404,13 +18291,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HA
property = EX_CONSTANT(opline->op2);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -17419,9 +18301,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HA
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17438,20 +18319,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CO
property = EX_CONSTANT(opline->op2);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
-
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
HANDLE_EXCEPTION();
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
@@ -17459,9 +18335,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CO
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -17476,67 +18351,653 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_VAR, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op_data;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_VAR, property_name, IS_CONST, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
zval *object_ptr;
- zend_free_op free_op_data1;
+
zval *value;
zval *variable_ptr;
zval *dim;
@@ -17544,40 +19005,214 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HAND
SAVE_OPLINE();
object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CONST == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CONST != IS_UNUSED) {
- HANDLE_EXCEPTION();
}
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if (IS_CONST == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
dim = EX_CONSTANT(opline->op2);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, IS_CONST, BP_VAR_W);
-
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
}
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if (IS_CONST != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CONST == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
}
}
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -17586,60 +19221,144 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zval *property_name = EX_CONSTANT(opline->op2);
+ zend_assign_to_object_dim(object_ptr, dim, value);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (IS_CONST == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CONST != IS_UNUSED) {
- dim = EX_CONSTANT(opline->op2);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CONST == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
}
- goto assign_dim_convert_to_array;
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (IS_CONST != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
@@ -17650,22 +19369,49 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER(
value = EX_CONSTANT(opline->op2);
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = EX_CONSTANT(opline->op2);
+ variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+
+ if (UNEXPECTED(1)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -17681,27 +19427,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_VAR == IS_CONST &&
IS_CONST == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_VAR != IS_CONST &&
IS_CONST == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -17712,15 +19464,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
function_name = EX_CONSTANT(opline->op2);
if (IS_CONST != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ do {
+ if (IS_CONST & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
- HANDLE_EXCEPTION();
+ HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -17731,7 +19490,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
HANDLE_EXCEPTION();
@@ -17745,33 +19504,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (IS_CONST != IS_CONST) {
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -17784,11 +19552,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
}
- if (IS_VAR != IS_CONST) {
+ if (IS_VAR == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -17797,116 +19569,87 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ zend_class_entry *ce, *scope;
+ zend_class_constant *c;
+ zval *value;
USE_OPLINE
SAVE_OPLINE();
- if (IS_VAR == IS_UNUSED) {
- zend_constant *c;
-
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
- if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
- if (!actual) {
- ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
- } else {
- actual++;
- ZVAL_STRINGL(EX_VAR(opline->result.var),
- actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
- }
- /* non-qualified constant - allow text substitution */
- zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
- Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- } else {
- zend_throw_error(zend_ce_error, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
- }
- } else {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
- }
-#ifdef ZTS
- if (c->flags & CONST_PERSISTENT) {
- ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
- } else {
- ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
- }
-#else
- ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
-#endif
- } else {
- /* class constant */
- zend_class_entry *ce;
- zval *value;
- do {
- if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- ZVAL_DEREF(value);
+ do {
+ if (IS_VAR == IS_CONST) {
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
#ifdef ZTS
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
#endif
- break;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
- HANDLE_EXCEPTION();
+ break;
+ } else if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ } else {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else {
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
}
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
- if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
- ZVAL_DEREF(value);
- break;
- }
}
+ if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
+ break;
+ }
+ }
- if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
- ZVAL_DEREF(value);
- if (Z_CONSTANT_P(value)) {
- EG(scope) = ce;
- zval_update_constant_ex(value, 1, NULL);
- EG(scope) = EX(func)->op_array.scope;
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- }
- if (IS_VAR == IS_CONST) {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
- } else {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
+ if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ scope = EX(func)->op_array.scope;
+ if (!zend_verify_const_access(c, scope)) {
+ zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
+ value = &c->value;
+ if (Z_CONSTANT_P(value)) {
+ zval_update_constant_ex(value, ce);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
}
+ }
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
} else {
- zend_throw_error(zend_ce_error, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
}
- } while (0);
-#ifdef ZTS
- if (ce->type == ZEND_INTERNAL_CLASS) {
- ZVAL_DUP(EX_VAR(opline->result.var), value);
} else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
}
-#else
+ } while (0);
+
+#ifdef ZTS
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ ZVAL_DUP(EX_VAR(opline->result.var), value);
+ } else {
ZVAL_COPY(EX_VAR(opline->result.var), value);
-#endif
}
+#else
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+#endif
+
ZEND_VM_NEXT_OPCODE();
}
@@ -17920,23 +19663,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CON
if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
expr_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -18006,8 +19742,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18052,13 +19787,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDL
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -18121,23 +19851,25 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18149,13 +19881,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDL
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -18179,9 +19906,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDL
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18192,7 +19918,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -18211,40 +19937,34 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ if (IS_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
}
ZVAL_COPY(&generator->value, value_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
}
} else {
zval *value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -18252,8 +19972,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -18280,8 +20000,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -18326,11 +20046,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CONST_HANDLER(Z
ZEND_VM_RETURN();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
-}
-
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -18344,12 +20059,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HAND
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18365,15 +20077,40 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
}
- ZEND_VM_NEXT_OPCODE();
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -18384,22 +20121,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_HANDLER(ZE
value = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
zval_ptr_dtor_nogc(free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18410,7 +20146,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMP_HANDLER(ZEN
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -18429,40 +20165,34 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMP_HANDLER(ZEN
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ if (IS_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
}
ZVAL_COPY(&generator->value, value_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
}
} else {
zval *value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -18470,8 +20200,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMP_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -18498,8 +20228,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_TMP_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -18557,12 +20287,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HAND
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18578,15 +20305,40 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
}
- ZEND_VM_NEXT_OPCODE();
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
@@ -18597,22 +20349,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZE
value = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
zval_ptr_dtor_nogc(free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18624,57 +20375,50 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE
SAVE_OPLINE();
value_ptr = _get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2);
+ variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
- HANDLE_EXCEPTION();
- }
if (IS_VAR == IS_VAR &&
- (value_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
- if (!(free_op2 != NULL)) {
- PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+ UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
+ UNEXPECTED(!Z_ISREF_P(EX_VAR(opline->op1.var))) &&
+ UNEXPECTED(!Z_ISERROR_P(EX_VAR(opline->op1.var)))) {
+
+ zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
+ if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);};
+ HANDLE_EXCEPTION();
+
+ } else if (IS_VAR == IS_VAR &&
+ opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ UNEXPECTED(!Z_ISREF_P(value_ptr))) {
zend_error(E_NOTICE, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
+ if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);};
HANDLE_EXCEPTION();
}
- ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
- }
- variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
- UNEXPECTED(!Z_ISREF_P(variable_ptr))) {
- zend_throw_error(zend_ce_error, "Cannot assign by reference to overloaded object");
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- }
- if ((IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) ||
- (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == &EG(error_zval)))) {
- variable_ptr = &EG(uninitialized_zval);
+ value_ptr = zend_assign_to_variable(variable_ptr, value_ptr, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value_ptr);
+ }
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+
} else {
- zend_assign_to_variable_reference(variable_ptr, value_ptr);
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
- }
+ if ((IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) ||
+ (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr)))) {
+ variable_ptr = &EG(uninitialized_zval);
+ } else {
+ zend_assign_to_variable_reference(variable_ptr, value_ptr);
+ }
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);};
+ }
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -18685,7 +20429,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_VAR_HANDLER(ZEN
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -18704,40 +20448,34 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_VAR_HANDLER(ZEN
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ if (IS_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
}
ZVAL_COPY(&generator->value, value_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
}
} else {
zval *value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -18745,8 +20483,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_VAR_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -18773,8 +20511,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_VAR_HANDLER(ZEN
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -18823,87 +20561,112 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SP
{
USE_OPLINE
zend_free_op free_op1, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = NULL;
+ if (IS_VAR != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_UNUSED == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = NULL;
- do {
- if (IS_VAR == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_VAR != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_UNUSED == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_UNUSED);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
+ binary_op(var_ptr, var_ptr, value);
- FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_VAR != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = NULL;
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_VAR != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -18911,19 +20674,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_UNUSED_HAN
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -18931,19 +20694,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_UNUSED_HAN
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -18951,19 +20714,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_UNUSED_HAN
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -18971,19 +20734,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_UNUSED_HAN
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -18991,19 +20754,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_UNUSED_HAN
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -19011,19 +20774,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -19031,19 +20794,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -19051,19 +20814,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -19071,19 +20834,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_UNUSED_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -19091,19 +20854,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -19111,6 +20874,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_UNUSED != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -19120,18 +20903,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19143,18 +20921,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_H
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19166,27 +20939,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UN
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
if (IS_UNUSED == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -19196,16 +20964,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UN
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
zval *object_ptr;
- zend_free_op free_op_data1;
+
zval *value;
zval *variable_ptr;
zval *dim;
@@ -19213,40 +20980,214 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HAN
SAVE_OPLINE();
object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_UNUSED == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = NULL;
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = EX_CONSTANT((opline+1)->op1);
- HANDLE_EXCEPTION();
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = NULL;
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
}
+ if (IS_UNUSED != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if (IS_UNUSED == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
dim = NULL;
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, IS_UNUSED, BP_VAR_W);
-
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
}
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = NULL;
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if (IS_UNUSED != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_UNUSED == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = NULL;
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
}
}
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -19255,57 +21196,141 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zval *property_name = NULL;
+ zend_assign_to_object_dim(object_ptr, dim, value);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (IS_UNUSED == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = NULL;
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_UNUSED != IS_UNUSED) {
- dim = NULL;
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_UNUSED == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = NULL;
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- goto assign_dim_convert_to_array;
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = NULL;
+assign_dim_error:
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (IS_UNUSED != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19321,27 +21346,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_VAR == IS_CONST &&
IS_UNUSED == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_VAR != IS_CONST &&
IS_UNUSED == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -19352,15 +21383,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
function_name = NULL;
if (IS_UNUSED != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ do {
+ if (IS_UNUSED & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
- HANDLE_EXCEPTION();
+ HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -19371,7 +21409,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
HANDLE_EXCEPTION();
@@ -19385,33 +21423,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (IS_UNUSED != IS_CONST) {
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -19424,11 +21471,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
}
- if (IS_VAR != IS_CONST) {
+ if (IS_VAR == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -19437,8 +21488,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19460,7 +21510,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UN
if (IS_VAR == IS_CONST) {
ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
retval_ref = retval_ptr = EX_VAR(opline->result.var);
- } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ } else if (IS_VAR == IS_VAR) {
+ if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
+ retval_ptr = Z_INDIRECT_P(retval_ptr);
+ }
+ ZVAL_DEREF(retval_ptr);
+ } else if (IS_VAR == IS_CV) {
ZVAL_DEREF(retval_ptr);
}
@@ -19482,12 +21537,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UN
zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
- zval_ptr_dtor_nogc(free_op1);
+ if (IS_VAR == IS_CONST) {
+ zval_ptr_dtor_nogc(retval_ptr);
+ }
}
#endif
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19500,23 +21556,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNU
if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
expr_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -19586,8 +21635,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19627,14 +21675,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDL
zval *var_ptr;
var_ptr = EX_VAR(opline->op1.var);
- if (Z_TYPE_P(var_ptr) != IS_OBJECT &&
- !Z_ISREF_P(var_ptr) &&
- Z_REFCOUNTED_P(var_ptr) &&
- Z_REFCOUNT_P(var_ptr) > 1) {
-
- Z_DELREF_P(var_ptr);
- ZVAL_DUP(EX_VAR(opline->op1.var), var_ptr);
+ if (UNEXPECTED(Z_ISREF_P(var_ptr))) {
+ if (UNEXPECTED(Z_REFCOUNT_P(var_ptr) == 1)) {
+ ZVAL_UNREF(var_ptr);
+ }
}
+
ZEND_VM_NEXT_OPCODE();
}
@@ -19646,7 +21692,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER(
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -19665,40 +21711,34 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER(
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ if (IS_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
}
ZVAL_COPY(&generator->value, value_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
}
} else {
zval *value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -19706,8 +21746,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -19734,8 +21774,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -19793,12 +21833,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CV_HANDL
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -19814,12 +21851,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_H
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op1);
- ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -19834,8 +21868,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
@@ -19843,15 +21877,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -19867,13 +21894,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -19882,83 +21914,106 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_VAR_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op1, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ if (IS_VAR != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_CV == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
- do {
- if (IS_VAR == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_VAR != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_CV == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_CV);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
+ binary_op(var_ptr, var_ptr, value);
- FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_VAR != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_VAR != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -19972,13 +22027,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_V
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -19993,9 +22042,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_V
}
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20004,13 +22052,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CV_HANDLER
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20024,13 +22112,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CV_HANDLER
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20044,13 +22172,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CV_HANDLER
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20064,13 +22232,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CV_HANDLER
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20084,13 +22292,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CV_HANDLER
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20104,13 +22352,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20124,13 +22412,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20144,13 +22472,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20164,13 +22532,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_HANDL
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20184,13 +22592,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20204,13 +22652,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -20218,6 +22706,66 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_HAND
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -20229,20 +22777,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -20256,37 +22798,40 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20310,20 +22855,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -20338,22 +22877,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -20361,9 +22903,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20385,18 +22926,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLE
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20408,18 +22944,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDL
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20431,38 +22962,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
if (IS_CV == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20474,19 +22999,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20500,8 +23019,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLE
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -20558,8 +23077,7 @@ fetch_obj_r_no_object:
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20573,13 +23091,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLE
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -20589,9 +23102,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLE
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20605,13 +23117,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDL
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -20620,9 +23127,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDL
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20639,20 +23145,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
-
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
HANDLE_EXCEPTION();
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
@@ -20660,9 +23161,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -20677,67 +23177,653 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_VAR, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op_data;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_VAR, property_name, IS_CV, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
zval *object_ptr;
- zend_free_op free_op_data1;
+
zval *value;
zval *variable_ptr;
zval *dim;
@@ -20745,40 +23831,214 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER
SAVE_OPLINE();
object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CV == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
- HANDLE_EXCEPTION();
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
}
+ if (IS_CV != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if (IS_CV == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, IS_CV, BP_VAR_W);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
- }
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if (IS_CV != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CV == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
}
}
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -20787,60 +24047,144 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zval *property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ zend_assign_to_object_dim(object_ptr, dim, value);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (IS_CV == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CV != IS_UNUSED) {
- dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CV == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
}
- goto assign_dim_convert_to_array;
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (IS_CV != IS_UNUSED) {
+
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
@@ -20851,22 +24195,49 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEN
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_CV);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+
+ if (UNEXPECTED(1)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20878,56 +24249,49 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER
SAVE_OPLINE();
value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op2.var);
+ variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_VAR &&
+ UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
+ UNEXPECTED(!Z_ISREF_P(EX_VAR(opline->op1.var))) &&
+ UNEXPECTED(!Z_ISERROR_P(EX_VAR(opline->op1.var)))) {
+
+ zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR &&
- (value_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
- if (!0) {
- PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+
+ } else if (IS_CV == IS_VAR &&
+ opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ UNEXPECTED(!Z_ISREF_P(value_ptr))) {
zend_error(E_NOTICE, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
}
- ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
- }
-
- variable_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
- UNEXPECTED(!Z_ISREF_P(variable_ptr))) {
- zend_throw_error(zend_ce_error, "Cannot assign by reference to overloaded object");
+ value_ptr = zend_assign_to_variable(variable_ptr, value_ptr, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value_ptr);
+ }
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- }
- if ((IS_VAR == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) ||
- (IS_CV == IS_VAR && UNEXPECTED(value_ptr == &EG(error_zval)))) {
- variable_ptr = &EG(uninitialized_zval);
} else {
- zend_assign_to_variable_reference(variable_ptr, value_ptr);
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
- }
+ if ((IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) ||
+ (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr)))) {
+ variable_ptr = &EG(uninitialized_zval);
+ } else {
+ zend_assign_to_variable_reference(variable_ptr, value_ptr);
+ }
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ }
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -20943,27 +24307,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_VAR == IS_CONST &&
IS_CV == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_VAR != IS_CONST &&
IS_CV == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -20974,15 +24344,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
if (IS_CV != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
+ do {
+ if (IS_CV & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
- HANDLE_EXCEPTION();
+ HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -20993,7 +24370,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
HANDLE_EXCEPTION();
@@ -21007,33 +24384,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if (IS_CV != IS_CONST) {
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -21046,11 +24432,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
}
- if (IS_VAR != IS_CONST) {
+ if (IS_VAR == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -21059,8 +24449,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -21073,23 +24462,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_
if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
expr_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -21159,8 +24541,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -21205,13 +24586,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -21274,23 +24650,25 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -21302,13 +24680,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -21332,9 +24705,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(
}
} while (0);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -21345,7 +24717,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -21364,40 +24736,34 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
+ if (IS_VAR & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_VAR != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_VAR == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
}
ZVAL_COPY(&generator->value, value_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
}
} else {
zval *value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -21405,8 +24771,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -21433,8 +24799,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -21479,11 +24845,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_VAR_CV_HANDLER(ZEND
ZEND_VM_RETURN();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
-}
-
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -21496,8 +24857,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -21505,15 +24866,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -21529,13 +24883,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -21544,84 +24903,107 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
FREE_OP(free_op_data1);
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (IS_VAR != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- do {
- if (IS_VAR == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_VAR != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, (IS_TMP_VAR|IS_VAR));
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- }
+ binary_op(var_ptr, var_ptr, value);
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ }
+ } else {
+ if (IS_VAR != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_VAR != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
zval_ptr_dtor_nogc(free_op2);
FREE_OP(free_op_data1);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -21635,13 +25017,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_V
value = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -21657,9 +25033,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_V
}
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -21668,13 +25043,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HAN
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21688,13 +25103,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_HAN
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21708,13 +25163,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_HAN
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21728,13 +25223,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_HAN
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21748,13 +25283,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_HAN
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21768,13 +25343,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21788,13 +25403,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21808,13 +25463,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21828,13 +25523,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_H
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21848,13 +25583,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21868,13 +25643,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_
USE_OPLINE
# if 0 || (IS_VAR != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -21882,6 +25657,106 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_VAR != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMPVAR(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -21893,20 +25768,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -21920,28 +25789,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -21949,9 +25822,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
} while (0);
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -21975,20 +25847,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -22003,22 +25869,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -22027,9 +25896,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
} while (0);
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22051,18 +25919,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_TMPVAR_HA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22074,18 +25937,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_TMPVAR_H
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22097,27 +25955,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TM
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -22127,8 +25980,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TM
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22140,19 +25992,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMPVA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22166,8 +26012,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HA
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -22225,8 +26071,7 @@ fetch_obj_r_no_object:
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22240,13 +26085,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HA
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -22256,9 +26096,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HA
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22272,13 +26111,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_H
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -22287,9 +26121,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_H
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22306,20 +26139,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TM
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
- zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if ((IS_VAR & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
HANDLE_EXCEPTION();
}
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
@@ -22327,9 +26155,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TM
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -22344,67 +26171,653 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVA
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_VAR, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
zval_ptr_dtor_nogc(free_op2);
if (IS_VAR == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(free_op2);
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_VAR, property_name, (IS_TMP_VAR|IS_VAR), (opline+1)->op1_type, (opline+1)->op1, execute_data, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
zval *object_ptr;
- zend_free_op free_op2, free_op_data1;
+ zend_free_op free_op2;
zval *value;
zval *variable_ptr;
zval *dim;
@@ -22412,39 +26825,213 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_HAN
SAVE_OPLINE();
object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
}
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op2, free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, (IS_TMP_VAR|IS_VAR), BP_VAR_W);
- zval_ptr_dtor_nogc(free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op2, free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
}
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
@@ -22454,57 +27041,141 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
- zend_free_op free_op2;
- zval *property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
- zval_ptr_dtor_nogc(free_op2);
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
- dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
- zval_ptr_dtor_nogc(free_op2);
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *object_ptr;
+ zend_free_op free_op2;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- goto assign_dim_convert_to_array;
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_VAR != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- zval_ptr_dtor_nogc(free_op2);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
+assign_dim_error:
+
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22520,27 +27191,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
}
if (IS_VAR == IS_CONST &&
(IS_TMP_VAR|IS_VAR) == IS_CONST &&
- CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
} else if (IS_VAR != IS_CONST &&
(IS_TMP_VAR|IS_VAR) == IS_CONST &&
(fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
@@ -22551,15 +27228,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
- GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
+ do {
+ if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+ zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Function name must be a string");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
+ } while (0);
}
}
@@ -22570,7 +27254,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -22584,33 +27268,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
}
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
zval_ptr_dtor_nogc(free_op2);
}
} else {
if (UNEXPECTED(ce->constructor == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot call constructor");
+ zend_throw_error(NULL, "Cannot call constructor");
HANDLE_EXCEPTION();
}
- if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_throw_error(zend_ce_error, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
object = NULL;
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
object = Z_OBJ(EX(This));
- }
- if (!object) {
+ ce = object->ce;
+ } else {
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* Allowed for PHP 4 compatibility. */
zend_error(
E_DEPRECATED,
"Non-static method %s::%s() should not be called statically",
ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
} else {
/* An internal function assumes $this is present and won't check that.
* So PHP would crash by allowing the call. */
@@ -22623,11 +27316,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
}
}
- if (IS_VAR != IS_CONST) {
+ if (IS_VAR == IS_UNUSED) {
/* previous opcode is ZEND_FETCH_CLASS */
- if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
- ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
- ce = EX(called_scope);
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
}
}
@@ -22636,8 +27333,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
call->prev_execute_data = EX(call);
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22650,23 +27346,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP
if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
} else {
expr_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
if (IS_VAR == IS_TMP_VAR) {
/* pass */
} else if (IS_VAR == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_VAR == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -22736,8 +27425,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22782,13 +27470,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HAND
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -22851,24 +27534,26 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_VAR == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_VAR == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22880,13 +27565,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HAND
SAVE_OPLINE();
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1);
- if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_VAR == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -22911,14 +27591,72 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HAND
} while (0);
zval_ptr_dtor_nogc(free_op2);
- if (free_op1) {zval_ptr_dtor_nogc(free_op1);};
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);};
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_VAR_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ USE_OPLINE
+ zval *result;
+ zend_function *constructor;
+ zend_class_entry *ce;
+ zend_execute_data *call;
+
+ SAVE_OPLINE();
+ if (IS_UNUSED == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op1.var));
+ }
+
+ result = EX_VAR(opline->result.var);
+ if (UNEXPECTED(object_init_ex(result, ce) != SUCCESS)) {
+ HANDLE_EXCEPTION();
+ }
+
+ constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
+ if (constructor == NULL) {
+ /* If there are no arguments, skip over the DO_FCALL opcode. We check if the next
+ * opcode is DO_FCALL in case EXT instructions are used. */
+ if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+ }
+
+ /* Perform a dummy function call */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION, (zend_function *) &zend_pass_function,
+ opline->extended_value, NULL, NULL);
+ } else {
+ if (EXPECTED(constructor->type == ZEND_USER_FUNCTION) && UNEXPECTED(!constructor->op_array.run_time_cache)) {
+ init_func_run_time_cache(&constructor->op_array);
+ }
+ /* We are not handling overloaded classes right now */
+ call = zend_vm_stack_push_call_frame(
+ ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR,
+ constructor,
+ opline->extended_value,
+ ce,
+ Z_OBJ_P(result));
+ Z_ADDREF_P(result);
+ }
+
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -22926,15 +27664,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND
USE_OPLINE
zval *obj;
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
zend_function *clone;
zend_object_clone_obj_t clone_call;
SAVE_OPLINE();
obj = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(obj) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -22949,63 +27687,57 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND
}
if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(obj, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "__clone method called on non-object");
+ zend_throw_error(NULL, "__clone method called on non-object");
HANDLE_EXCEPTION();
}
} while (0);
ce = Z_OBJCE_P(obj);
- clone = ce ? ce->clone : NULL;
- clone_call = Z_OBJ_HT_P(obj)->clone_obj;
+ clone = ce->clone;
+ clone_call = Z_OBJ_HT_P(obj)->clone_obj;
if (UNEXPECTED(clone_call == NULL)) {
- if (ce) {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
- } else {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object");
- }
+ zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
- if (ce && clone) {
+ if (clone) {
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (UNEXPECTED(ce != EG(scope))) {
- zend_throw_error(zend_ce_error, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(ce != scope)) {
+ zend_throw_error(NULL, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
HANDLE_EXCEPTION();
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
- zend_throw_error(zend_ce_error, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), scope))) {
+ zend_throw_error(NULL, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
HANDLE_EXCEPTION();
}
}
}
- if (EXPECTED(EG(exception) == NULL)) {
- ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
- if (UNEXPECTED(!RETURN_VALUE_USED(opline)) || UNEXPECTED(EG(exception) != NULL)) {
- OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
- }
+ ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
SAVE_OPLINE();
@@ -23029,7 +27761,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_
} while (0);
}
-#endif
zend_bailout();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
@@ -23046,8 +27777,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
@@ -23055,15 +27786,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = EX_CONSTANT(opline->op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -23079,13 +27803,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -23096,96 +27825,139 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- HANDLE_EXCEPTION();
- }
-
- dim = EX_CONSTANT(opline->op2);
+ if (IS_UNUSED != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_CONST == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
- do {
- if (IS_UNUSED == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_UNUSED != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_CONST == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_CONST);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_UNUSED != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = EX_CONSTANT(opline->op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_UNUSED != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23193,19 +27965,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23213,19 +27985,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23233,19 +28025,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23253,19 +28065,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23273,19 +28125,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23293,19 +28145,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_HA
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23313,19 +28185,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_HA
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23333,19 +28245,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONS
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23353,19 +28265,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23373,19 +28305,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONS
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CONST != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -23393,6 +28345,66 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONS
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -23404,20 +28416,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -23431,28 +28437,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -23460,8 +28470,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23485,20 +28494,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -23513,22 +28516,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -23537,8 +28543,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23562,8 +28567,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -23620,8 +28625,7 @@ fetch_obj_r_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23635,13 +28639,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_
property = EX_CONSTANT(opline->op2);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -23652,8 +28651,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23667,13 +28665,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST
property = EX_CONSTANT(opline->op2);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -23683,8 +28676,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23698,8 +28690,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -23756,8 +28748,7 @@ fetch_obj_is_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23774,19 +28765,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
property = EX_CONSTANT(opline->op2);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
-
+ if ((IS_UNUSED & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
HANDLE_EXCEPTION();
}
@@ -23796,8 +28782,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -23812,59 +28797,645 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CO
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_UNUSED, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
if (IS_UNUSED == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_UNUSED, property_name, IS_CONST, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_INIT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -23894,7 +29465,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_INIT_SPEC_UNUSED_CONST_HA
}
rope[0] = _zval_get_string_func(var);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -23924,14 +29495,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
HANDLE_EXCEPTION();
@@ -23940,8 +29510,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -23956,12 +29526,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
}
}
if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
HANDLE_EXCEPTION();
@@ -23977,7 +29548,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
HANDLE_EXCEPTION();
@@ -23987,7 +29558,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
@@ -23999,6 +29570,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -24016,116 +29590,289 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
+ zval *function_name;
+ zend_class_entry *ce;
+ zend_object *object;
+ zend_function *fbc;
+ zend_execute_data *call;
SAVE_OPLINE();
- if (IS_UNUSED == IS_UNUSED) {
- zend_constant *c;
-
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
- if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
- if (!actual) {
- ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
- } else {
- actual++;
- ZVAL_STRINGL(EX_VAR(opline->result.var),
- actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
- }
- /* non-qualified constant - allow text substitution */
- zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
- Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- } else {
- zend_throw_error(zend_ce_error, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+
+ if (IS_UNUSED == IS_CONST) {
+ /* no function found. try a static method in class */
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
HANDLE_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op1.var));
+ }
+
+ if (IS_UNUSED == IS_CONST &&
+ IS_CONST == IS_CONST &&
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
+ } else if (IS_UNUSED != IS_CONST &&
+ IS_CONST == IS_CONST &&
+ (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
+ /* do nothing */
+ } else if (IS_CONST != IS_UNUSED) {
+
+
+ function_name = EX_CONSTANT(opline->op2);
+ if (IS_CONST != IS_CONST) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
+ do {
+ if (IS_CONST & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+
+ HANDLE_EXCEPTION();
+ } while (0);
+ }
+ }
+
+ if (ce->get_static_method) {
+ fbc = ce->get_static_method(ce, Z_STR_P(function_name));
} else {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
+ fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
}
-#ifdef ZTS
- if (c->flags & CONST_PERSISTENT) {
- ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
+ EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
+ if (IS_UNUSED == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
+ } else {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
+ }
+ }
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ if (IS_CONST != IS_CONST) {
+
+ }
+ } else {
+ if (UNEXPECTED(ce->constructor == NULL)) {
+ zend_throw_error(NULL, "Cannot call constructor");
+ HANDLE_EXCEPTION();
+ }
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ HANDLE_EXCEPTION();
+ }
+ fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ }
+
+ object = NULL;
+ if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ object = Z_OBJ(EX(This));
+ ce = object->ce;
} else {
- ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ /* Allowed for PHP 4 compatibility. */
+ zend_error(
+ E_DEPRECATED,
+ "Non-static method %s::%s() should not be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ /* An internal function assumes $this is present and won't check that.
+ * So PHP would crash by allowing the call. */
+ zend_throw_error(
+ zend_ce_error,
+ "Non-static method %s::%s() cannot be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ HANDLE_EXCEPTION();
+ }
}
-#else
+ }
+
+ if (IS_UNUSED == IS_UNUSED) {
+ /* previous opcode is ZEND_FETCH_CLASS */
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
+ }
+ }
+
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object);
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_constant *c;
+
+ SAVE_OPLINE();
+
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
+ c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
+ if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
+ char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
+ if (!actual) {
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
+ } else {
+ actual++;
+ ZVAL_STRINGL(EX_VAR(opline->result.var),
+ actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
+ }
+ /* non-qualified constant - allow text substitution */
+ zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
+ Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
+ }
+
+#ifdef ZTS
+ if (c->flags & CONST_PERSISTENT) {
+ ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
+ } else {
ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
+ }
+#else
+ ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
#endif
- } else {
- /* class constant */
- zend_class_entry *ce;
- zval *value;
- do {
- if (IS_UNUSED == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- ZVAL_DEREF(value);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ zend_class_entry *ce, *scope;
+ zend_class_constant *c;
+ zval *value;
+ USE_OPLINE
+
+ SAVE_OPLINE();
+
+ do {
+ if (IS_UNUSED == IS_CONST) {
+ if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
#ifdef ZTS
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
#endif
- break;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
- HANDLE_EXCEPTION();
+ break;
+ } else if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ } else {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ HANDLE_EXCEPTION();
}
} else {
ce = Z_CE_P(EX_VAR(opline->op1.var));
- if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
- ZVAL_DEREF(value);
- break;
- }
}
+ if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
+ break;
+ }
+ }
- if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
- ZVAL_DEREF(value);
- if (Z_CONSTANT_P(value)) {
- EG(scope) = ce;
- zval_update_constant_ex(value, 1, NULL);
- EG(scope) = EX(func)->op_array.scope;
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- }
- if (IS_UNUSED == IS_CONST) {
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
- } else {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
+ if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ scope = EX(func)->op_array.scope;
+ if (!zend_verify_const_access(c, scope)) {
+ zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
+ }
+ value = &c->value;
+ if (Z_CONSTANT_P(value)) {
+ zval_update_constant_ex(value, ce);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
}
+ }
+ if (IS_UNUSED == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
} else {
- zend_throw_error(zend_ce_error, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- HANDLE_EXCEPTION();
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
}
- } while (0);
-#ifdef ZTS
- if (ce->type == ZEND_INTERNAL_CLASS) {
- ZVAL_DUP(EX_VAR(opline->result.var), value);
} else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
+ HANDLE_EXCEPTION();
}
-#else
+ } while (0);
+
+#ifdef ZTS
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ ZVAL_DUP(EX_VAR(opline->result.var), value);
+ } else {
ZVAL_COPY(EX_VAR(opline->result.var), value);
-#endif
}
+#else
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+#endif
+
ZEND_VM_NEXT_OPCODE();
}
@@ -24171,13 +29918,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HA
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -24240,23 +29982,25 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -24268,13 +30012,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HA
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -24299,8 +30038,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HA
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -24315,8 +30053,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNU
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -24406,6 +30144,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -24437,8 +30178,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -24452,8 +30192,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -24484,8 +30224,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -24496,7 +30235,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLE
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -24515,33 +30254,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLE
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ if (IS_UNUSED & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = NULL;
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_UNUSED != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_UNUSED == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_UNUSED == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -24555,8 +30288,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLE
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -24583,8 +30316,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CONST_HANDLE
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -24637,7 +30370,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER(
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -24656,33 +30389,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER(
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ if (IS_UNUSED & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = NULL;
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_UNUSED != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_UNUSED == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_UNUSED == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -24696,8 +30423,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -24724,8 +30451,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -24778,7 +30505,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER(
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -24797,33 +30524,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER(
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ if (IS_UNUSED & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = NULL;
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_UNUSED != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_UNUSED == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_UNUSED == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -24837,8 +30558,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -24865,8 +30586,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER(
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -24915,87 +30636,112 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SP
{
USE_OPLINE
zend_free_op free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = NULL;
+ if (IS_UNUSED != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_UNUSED == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = NULL;
- do {
- if (IS_UNUSED == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_UNUSED != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_UNUSED == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_UNUSED);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_UNUSED != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = NULL;
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_UNUSED != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25003,19 +30749,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25023,19 +30769,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25043,19 +30789,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25063,19 +30809,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25083,19 +30829,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_UNUSED_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25103,19 +30849,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_UNUSED_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25123,19 +30869,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_UNUSED_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25143,19 +30889,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_UNUS
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25163,19 +30909,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_UNUSE
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25183,19 +30929,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_UNUS
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25203,6 +30949,184 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUS
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_UNUSED != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *function_name;
+ zend_class_entry *ce;
+ zend_object *object;
+ zend_function *fbc;
+ zend_execute_data *call;
+
+ SAVE_OPLINE();
+
+ if (IS_UNUSED == IS_CONST) {
+ /* no function found. try a static method in class */
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op1.var));
+ }
+
+ if (IS_UNUSED == IS_CONST &&
+ IS_UNUSED == IS_CONST &&
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
+ } else if (IS_UNUSED != IS_CONST &&
+ IS_UNUSED == IS_CONST &&
+ (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
+ /* do nothing */
+ } else if (IS_UNUSED != IS_UNUSED) {
+
+
+ function_name = NULL;
+ if (IS_UNUSED != IS_CONST) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
+ do {
+ if (IS_UNUSED & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+
+ HANDLE_EXCEPTION();
+ } while (0);
+ }
+ }
+
+ if (ce->get_static_method) {
+ fbc = ce->get_static_method(ce, Z_STR_P(function_name));
+ } else {
+ fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
+ }
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_UNUSED == IS_CONST &&
+ EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
+ EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
+ if (IS_UNUSED == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
+ } else {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
+ }
+ }
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ if (IS_UNUSED != IS_CONST) {
+
+ }
+ } else {
+ if (UNEXPECTED(ce->constructor == NULL)) {
+ zend_throw_error(NULL, "Cannot call constructor");
+ HANDLE_EXCEPTION();
+ }
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ HANDLE_EXCEPTION();
+ }
+ fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ }
+
+ object = NULL;
+ if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ object = Z_OBJ(EX(This));
+ ce = object->ce;
+ } else {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ /* Allowed for PHP 4 compatibility. */
+ zend_error(
+ E_DEPRECATED,
+ "Non-static method %s::%s() should not be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ /* An internal function assumes $this is present and won't check that.
+ * So PHP would crash by allowing the call. */
+ zend_throw_error(
+ zend_ce_error,
+ "Non-static method %s::%s() cannot be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ HANDLE_EXCEPTION();
+ }
+ }
+ }
+
+ if (IS_UNUSED == IS_UNUSED) {
+ /* previous opcode is ZEND_FETCH_CLASS */
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
+ }
+ }
+
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object);
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -25222,7 +31146,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
retval_ref = retval_ptr = EX_VAR(opline->result.var);
- } else if (IS_UNUSED == IS_VAR || IS_UNUSED == IS_CV) {
+ } else if (IS_UNUSED == IS_VAR) {
+ if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
+ retval_ptr = Z_INDIRECT_P(retval_ptr);
+ }
+ ZVAL_DEREF(retval_ptr);
+ } else if (IS_UNUSED == IS_CV) {
ZVAL_DEREF(retval_ptr);
}
@@ -25244,12 +31173,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED
zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
-
+ if (IS_UNUSED == IS_CONST) {
+ zval_ptr_dtor_nogc(retval_ptr);
+ }
}
#endif
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -25291,7 +31221,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDL
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -25310,33 +31240,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDL
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ if (IS_UNUSED & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = NULL;
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_UNUSED != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_UNUSED == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_UNUSED == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -25350,8 +31274,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDL
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -25378,8 +31302,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDL
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -25436,8 +31360,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
@@ -25445,15 +31369,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -25469,13 +31386,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -25486,96 +31408,119 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ if (IS_UNUSED != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_CV == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
- do {
- if (IS_UNUSED == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_UNUSED != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_CV == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_CV);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
-
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_UNUSED != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_UNUSED != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25583,19 +31528,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25603,19 +31588,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25623,19 +31628,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25643,19 +31648,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25663,19 +31688,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25683,19 +31748,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_CV_HANDL
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25703,19 +31788,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_CV_HANDL
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25723,19 +31808,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25743,19 +31868,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_HA
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25763,19 +31888,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -25783,6 +31928,66 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_H
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -25794,20 +31999,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -25821,28 +32020,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -25850,8 +32053,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -25875,20 +32077,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -25903,22 +32099,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -25927,8 +32126,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -25952,8 +32150,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HAN
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26010,8 +32208,7 @@ fetch_obj_r_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26025,13 +32222,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HAN
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26042,8 +32234,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HAN
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26057,13 +32248,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HA
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26073,8 +32259,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HA
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26088,8 +32273,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HA
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26146,8 +32331,7 @@ fetch_obj_is_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26164,19 +32348,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
-
+ if ((IS_UNUSED & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
HANDLE_EXCEPTION();
}
@@ -26186,8 +32365,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -26202,59 +32380,645 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_UNUSED, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
if (IS_UNUSED == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_UNUSED, property_name, IS_CV, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_INIT_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26284,7 +33048,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_INIT_SPEC_UNUSED_CV_HANDL
}
rope[0] = _zval_get_string_func(var);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -26314,14 +33078,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
HANDLE_EXCEPTION();
@@ -26330,8 +33093,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26346,12 +33109,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
}
}
if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
HANDLE_EXCEPTION();
@@ -26367,7 +33131,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
HANDLE_EXCEPTION();
@@ -26377,7 +33141,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
@@ -26389,6 +33153,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -26406,8 +33173,165 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_C
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *function_name;
+ zend_class_entry *ce;
+ zend_object *object;
+ zend_function *fbc;
+ zend_execute_data *call;
+
+ SAVE_OPLINE();
+
+ if (IS_UNUSED == IS_CONST) {
+ /* no function found. try a static method in class */
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op1.var));
+ }
+
+ if (IS_UNUSED == IS_CONST &&
+ IS_CV == IS_CONST &&
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
+ } else if (IS_UNUSED != IS_CONST &&
+ IS_CV == IS_CONST &&
+ (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
+ /* do nothing */
+ } else if (IS_CV != IS_UNUSED) {
+
+
+ function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV != IS_CONST) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
+ do {
+ if (IS_CV & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+
+ HANDLE_EXCEPTION();
+ } while (0);
+ }
+ }
+
+ if (ce->get_static_method) {
+ fbc = ce->get_static_method(ce, Z_STR_P(function_name));
+ } else {
+ fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
+ }
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CV == IS_CONST &&
+ EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
+ EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
+ if (IS_UNUSED == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
+ } else {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
+ }
+ }
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ if (IS_CV != IS_CONST) {
+
+ }
+ } else {
+ if (UNEXPECTED(ce->constructor == NULL)) {
+ zend_throw_error(NULL, "Cannot call constructor");
+ HANDLE_EXCEPTION();
+ }
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ HANDLE_EXCEPTION();
+ }
+ fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ }
+
+ object = NULL;
+ if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ object = Z_OBJ(EX(This));
+ ce = object->ce;
+ } else {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ /* Allowed for PHP 4 compatibility. */
+ zend_error(
+ E_DEPRECATED,
+ "Non-static method %s::%s() should not be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ /* An internal function assumes $this is present and won't check that.
+ * So PHP would crash by allowing the call. */
+ zend_throw_error(
+ zend_ce_error,
+ "Non-static method %s::%s() cannot be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ HANDLE_EXCEPTION();
+ }
+ }
+ }
+
+ if (IS_UNUSED == IS_UNUSED) {
+ /* previous opcode is ZEND_FETCH_CLASS */
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
+ }
+ }
+
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object);
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26452,13 +33376,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDL
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26521,23 +33440,25 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26549,13 +33470,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDL
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26580,8 +33496,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDL
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26596,8 +33511,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNU
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26687,6 +33602,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -26718,8 +33636,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26733,8 +33650,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -26765,8 +33682,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -26777,7 +33693,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(Z
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -26796,33 +33712,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(Z
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
+ if (IS_UNUSED & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = NULL;
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_UNUSED != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_UNUSED == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = NULL;
- if (IS_UNUSED == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_UNUSED == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -26836,8 +33746,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -26864,8 +33774,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_UNUSED_CV_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -26922,8 +33832,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -26931,15 +33841,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -26955,13 +33858,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -26972,97 +33880,120 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
zval_ptr_dtor_nogc(free_op2);
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op2, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (IS_UNUSED != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- do {
- if (IS_UNUSED == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_UNUSED != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, (IS_TMP_VAR|IS_VAR));
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_UNUSED != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_UNUSED != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
zval_ptr_dtor_nogc(free_op2);
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27070,19 +34001,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27090,19 +34041,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27110,19 +34081,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27130,19 +34141,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27150,19 +34181,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27170,19 +34201,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27190,19 +34241,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27210,19 +34301,39 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPV
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27230,19 +34341,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVA
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27250,19 +34361,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPV
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_UNUSED != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -27270,6 +34421,46 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPV
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_UNUSED_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_UNUSED != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_UNUSED_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMPVAR(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -27281,20 +34472,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -27308,28 +34493,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -27338,8 +34527,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27363,20 +34551,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -27391,22 +34573,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -27416,8 +34601,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27441,8 +34625,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -27500,8 +34684,7 @@ fetch_obj_r_no_object:
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27515,13 +34698,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -27532,8 +34710,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27547,13 +34724,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVA
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -27563,8 +34735,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVA
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27578,8 +34749,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVA
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -27637,8 +34808,7 @@ fetch_obj_is_no_object:
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27655,30 +34825,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_UNUSED & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
zval_ptr_dtor_nogc(free_op2);
if (IS_UNUSED == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -27693,59 +34857,645 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TM
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_UNUSED, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
zval_ptr_dtor_nogc(free_op2);
if (IS_UNUSED == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
- if (IS_UNUSED == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(free_op2);
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_UNUSED, property_name, (IS_TMP_VAR|IS_VAR), (opline+1)->op1_type, (opline+1)->op1, execute_data, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
zval_ptr_dtor_nogc(free_op2);
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_obj_zval_ptr_unused(execute_data);
+
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_UNUSED != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_INIT_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27775,7 +35525,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ROPE_INIT_SPEC_UNUSED_TMPVAR_H
}
rope[0] = _zval_get_string_func(var);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
ZEND_VM_NEXT_OPCODE();
@@ -27805,14 +35555,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -27821,8 +35570,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
object = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -27837,12 +35586,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
}
}
if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor_nogc(free_op2);
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -27858,7 +35608,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -27868,7 +35618,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op2);
@@ -27880,6 +35630,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -27898,8 +35651,165 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_T
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *function_name;
+ zend_class_entry *ce;
+ zend_object *object;
+ zend_function *fbc;
+ zend_execute_data *call;
+
+ SAVE_OPLINE();
+
+ if (IS_UNUSED == IS_CONST) {
+ /* no function found. try a static method in class */
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
+ HANDLE_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op1.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op1.var));
+ }
+
+ if (IS_UNUSED == IS_CONST &&
+ (IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
+ /* nothing to do */
+ } else if (IS_UNUSED != IS_CONST &&
+ (IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
+ /* do nothing */
+ } else if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zend_free_op free_op2;
+
+ function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
+ do {
+ if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
+ function_name = Z_REFVAL_P(function_name);
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ break;
+ }
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ }
+ zend_throw_error(NULL, "Function name must be a string");
+ zval_ptr_dtor_nogc(free_op2);
+ HANDLE_EXCEPTION();
+ } while (0);
+ }
+ }
+
+ if (ce->get_static_method) {
+ fbc = ce->get_static_method(ce, Z_STR_P(function_name));
+ } else {
+ fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
+ }
+ if (UNEXPECTED(fbc == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
+ }
+ zval_ptr_dtor_nogc(free_op2);
+ HANDLE_EXCEPTION();
+ }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
+ EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
+ if (IS_UNUSED == IS_CONST) {
+ CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
+ } else {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
+ }
+ }
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+ } else {
+ if (UNEXPECTED(ce->constructor == NULL)) {
+ zend_throw_error(NULL, "Cannot call constructor");
+ HANDLE_EXCEPTION();
+ }
+ if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
+ zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
+ HANDLE_EXCEPTION();
+ }
+ fbc = ce->constructor;
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
+ }
+
+ object = NULL;
+ if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
+ object = Z_OBJ(EX(This));
+ ce = object->ce;
+ } else {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ /* Allowed for PHP 4 compatibility. */
+ zend_error(
+ E_DEPRECATED,
+ "Non-static method %s::%s() should not be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ /* An internal function assumes $this is present and won't check that.
+ * So PHP would crash by allowing the call. */
+ zend_throw_error(
+ zend_ce_error,
+ "Non-static method %s::%s() cannot be called statically",
+ ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
+ HANDLE_EXCEPTION();
+ }
+ }
+ }
+
+ if (IS_UNUSED == IS_UNUSED) {
+ /* previous opcode is ZEND_FETCH_CLASS */
+ if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ if (Z_TYPE(EX(This)) == IS_OBJECT) {
+ ce = Z_OBJCE(EX(This));
+ } else {
+ ce = Z_CE(EX(This));
+ }
+ }
+ }
+
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
+ fbc, opline->extended_value, ce, object);
+ call->prev_execute_data = EX(call);
+ EX(call) = call;
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -27944,13 +35854,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMPVAR_H
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -28013,24 +35918,26 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_UNUSED == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_UNUSED != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28042,13 +35949,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_H
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -28074,8 +35976,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_H
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28090,8 +35991,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNU
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -28181,6 +36082,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -28212,8 +36116,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28227,8 +36130,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN
SAVE_OPLINE();
container = _get_obj_zval_ptr_unused(execute_data);
- if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_UNUSED == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -28260,8 +36163,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28273,8 +36175,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OP
bitwise_not_function(EX_VAR(opline->result.var),
_get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28287,22 +36188,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CV_HANDLER(ZEND_
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_FALSE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_TRUE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), !i_zend_is_true(val));
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -28310,22 +36211,55 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_O
var_ptr = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
+ var_ptr = GET_OP1_UNDEF_CV(var_ptr, BP_VAR_RW);
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
+
+ increment_function(var_ptr);
+
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *var_ptr;
+
+ var_ptr = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
fast_long_increment_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
}
ZEND_VM_NEXT_OPCODE();
}
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
ZEND_VM_NEXT_OPCODE();
@@ -28340,15 +36274,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_O
increment_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -28356,22 +36289,55 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_O
var_ptr = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
}
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(var_ptr) == IS_UNDEF)) {
+ var_ptr = GET_OP1_UNDEF_CV(var_ptr, BP_VAR_RW);
+ }
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
+
+ decrement_function(var_ptr);
+
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *var_ptr;
+
+ var_ptr = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
+
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
fast_long_decrement_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
}
ZEND_VM_NEXT_OPCODE();
}
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
ZEND_VM_NEXT_OPCODE();
@@ -28386,12 +36352,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_O
decrement_function(var_ptr);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28402,19 +36367,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_
var_ptr = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
fast_long_increment_function(var_ptr);
ZEND_VM_NEXT_OPCODE();
}
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
ZVAL_NULL(EX_VAR(opline->result.var));
ZEND_VM_NEXT_OPCODE();
}
@@ -28429,8 +36388,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_
increment_function(var_ptr);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28441,19 +36399,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_
var_ptr = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- SAVE_OPLINE();
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- HANDLE_EXCEPTION();
- }
-
if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
fast_long_decrement_function(var_ptr);
ZEND_VM_NEXT_OPCODE();
}
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
ZVAL_NULL(EX_VAR(opline->result.var));
ZEND_VM_NEXT_OPCODE();
}
@@ -28468,8 +36420,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_
decrement_function(var_ptr);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28498,8 +36449,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCO
zend_string_release(str);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -28514,11 +36464,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCO
ZEND_VM_SET_NEXT_OPCODE(opline + 1);
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (IS_CV == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- }
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
@@ -28551,16 +36499,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_SPEC_CV_HANDLER(ZEND_OPC
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (IS_CV == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -28672,16 +36616,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CV_HANDLER(ZEND_
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
- if (IS_CV == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -28705,46 +36645,61 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OP
{
USE_OPLINE
zval *retval_ptr;
+ zval *return_value;
zend_free_op free_op1;
retval_ptr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ return_value = EX(return_value);
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(retval_ptr) == IS_UNDEF)) {
SAVE_OPLINE();
retval_ptr = GET_OP1_UNDEF_CV(retval_ptr, BP_VAR_R);
- if (EX(return_value)) {
- ZVAL_NULL(EX(return_value));
+ if (return_value) {
+ ZVAL_NULL(return_value);
}
- } else if (!EX(return_value)) {
- if (IS_CV == IS_VAR || IS_CV == IS_TMP_VAR ) {
+ } else if (!return_value) {
+ if (IS_CV & (IS_VAR|IS_TMP_VAR)) {
if (Z_REFCOUNTED_P(free_op1) && !Z_DELREF_P(free_op1)) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(free_op1));
+ zval_dtor_func(Z_COUNTED_P(free_op1));
}
}
} else {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
- zval_copy_ctor_func(EX(return_value));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(return_value))) {
+ Z_ADDREF_P(return_value);
}
}
} else if (IS_CV == IS_CV) {
- ZVAL_DEREF(retval_ptr);
- ZVAL_COPY(EX(return_value), retval_ptr);
+ if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
+ if (EXPECTED(!Z_OPT_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ if (EXPECTED(!(EX_CALL_INFO() & ZEND_CALL_CODE))) {
+ ZVAL_NULL(retval_ptr);
+ } else {
+ Z_ADDREF_P(return_value);
+ }
+ } else {
+ retval_ptr = Z_REFVAL_P(retval_ptr);
+ ZVAL_COPY(return_value, retval_ptr);
+ }
+ } else {
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
+ }
} else /* if (IS_CV == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(retval_ptr))) {
zend_refcounted *ref = Z_COUNTED_P(retval_ptr);
retval_ptr = Z_REFVAL_P(retval_ptr);
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
efree_size(ref, sizeof(zend_reference));
} else if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
Z_ADDREF_P(retval_ptr);
}
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ ZVAL_COPY_VALUE(return_value, retval_ptr);
}
}
}
@@ -28760,21 +36715,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(
SAVE_OPLINE();
do {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR ||
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR)) ||
(IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
retval_ptr = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
if (!EX(return_value)) {
- if (IS_CV == IS_TMP_VAR) {
- }
} else {
- ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (IS_CV != IS_TMP_VAR) {
- zval_opt_copy_ctor_no_imm(EX(return_value));
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISREF_P(retval_ptr))) {
+ ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
+ break;
+ }
+
+ ZVAL_NEW_REF(EX(return_value), retval_ptr);
+ if (IS_CV == IS_CONST) {
+ if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
}
}
break;
@@ -28782,20 +36739,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(
retval_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot return string offsets by reference");
- HANDLE_EXCEPTION();
- }
-
if (IS_CV == IS_VAR) {
if (retval_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
+ (opline->extended_value == ZEND_RETURNS_FUNCTION && !Z_ISREF_P(retval_ptr))) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
if (EX(return_value)) {
ZVAL_NEW_REF(EX(return_value), retval_ptr);
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
- if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
+ } else {
+
}
break;
}
@@ -28805,8 +36756,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(
ZVAL_MAKE_REF(retval_ptr);
Z_ADDREF_P(retval_ptr);
ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
- Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
}
+
} while (0);
ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
@@ -28824,11 +36775,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_CV_HANDL
retval = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
/* Copy return value into generator->retval */
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
ZVAL_COPY_VALUE(&generator->retval, retval);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->retval))) {
- zval_copy_ctor_func(&generator->retval);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->retval))) {
+ Z_ADDREF(generator->retval);
}
}
} else if (IS_CV == IS_CV) {
@@ -28876,11 +36827,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPC
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Can only throw objects");
+ zend_throw_error(NULL, "Can only throw objects");
HANDLE_EXCEPTION();
}
@@ -28906,13 +36857,16 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_
varptr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (IS_CV == IS_CV) {
- ZVAL_DEREF(varptr);
+ ZVAL_OPT_DEREF(varptr);
ZVAL_COPY(arg, varptr);
} else /* if (IS_CV == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(varptr))) {
@@ -28933,94 +36887,95 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *varptr, *arg;
- if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND)) {
- if (!ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- ZEND_VM_TAIL_CALL(ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
- }
- }
+ SAVE_OPLINE();
+ varptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- varptr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
- SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(varptr))) {
+ ZVAL_NEW_EMPTY_REF(arg);
+ ZVAL_NULL(Z_REFVAL_P(arg));
+ ZEND_VM_NEXT_OPCODE();
}
- if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- (Z_VAR_FLAGS_P(varptr) & IS_VAR_RET_REF)) &&
- (Z_ISREF_P(varptr) || Z_TYPE_P(varptr) == IS_OBJECT)) {
- ZVAL_MAKE_REF(varptr);
- if (IS_CV == IS_CV) {
- Z_ADDREF_P(varptr);
- }
+ if (Z_ISREF_P(varptr)) {
+ Z_ADDREF_P(varptr);
+ ZVAL_COPY_VALUE(arg, varptr);
} else {
- if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
- !(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- SAVE_OPLINE();
- zend_error(E_NOTICE, "Only variables should be passed by reference");
- CHECK_EXCEPTION();
- }
+ ZVAL_NEW_REF(arg, varptr);
+ Z_ADDREF_P(arg);
+ ZVAL_REF(varptr, Z_REF_P(arg));
}
- arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- ZVAL_COPY_VALUE(arg, varptr);
-
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
-
zval *varptr, *arg;
- SAVE_OPLINE();
- varptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
+ uint32_t arg_num = opline->op2.num;
- if (IS_CV == IS_VAR && UNEXPECTED(varptr == NULL)) {
- zend_throw_error(zend_ce_error, "Only variables can be passed by reference");
- HANDLE_EXCEPTION();
+ if (EXPECTED(0)) {
+ if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+ goto send_var_by_ref;
+ }
+ } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
+send_var_by_ref:
+ ZEND_VM_TAIL_CALL(ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
- arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- if (IS_CV == IS_VAR && UNEXPECTED(varptr == &EG(error_zval))) {
- ZVAL_NEW_REF(arg, &EG(uninitialized_zval));
- ZEND_VM_NEXT_OPCODE();
+ varptr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- if (Z_ISREF_P(varptr)) {
- Z_ADDREF_P(varptr);
- ZVAL_COPY_VALUE(arg, varptr);
- } else if (IS_CV == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT)) {
- ZVAL_NEW_REF(arg, varptr);
- } else {
- ZVAL_NEW_REF(arg, varptr);
- Z_ADDREF_P(arg);
- ZVAL_REF(varptr, Z_REF_P(arg));
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+
+ if (IS_CV == IS_CV) {
+ ZVAL_OPT_DEREF(varptr);
+ ZVAL_COPY(arg, varptr);
+ } else /* if (IS_CV == IS_VAR) */ {
+ if (UNEXPECTED(Z_ISREF_P(varptr))) {
+ zend_refcounted *ref = Z_COUNTED_P(varptr);
+
+ varptr = Z_REFVAL_P(varptr);
+ ZVAL_COPY_VALUE(arg, varptr);
+ if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
+ efree_size(ref, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(arg)) {
+ Z_ADDREF_P(arg);
+ }
+ } else {
+ ZVAL_COPY_VALUE(arg, varptr);
+ }
}
ZEND_VM_NEXT_OPCODE();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_EX_SPEC_CV_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *varptr, *arg;
+ uint32_t arg_num = opline->op2.num;
- if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
- if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ if (EXPECTED(1)) {
+ if (QUICK_ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
goto send_var_by_ref;
}
- } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
+ } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
send_var_by_ref:
ZEND_VM_TAIL_CALL(ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -29028,13 +36983,16 @@ send_var_by_ref:
varptr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(varptr) == IS_UNDEF)) {
SAVE_OPLINE();
- varptr = GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(varptr, BP_VAR_R);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_NULL(arg);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
if (IS_CV == IS_CV) {
- ZVAL_DEREF(varptr);
+ ZVAL_OPT_DEREF(varptr);
ZVAL_COPY(arg, varptr);
} else /* if (IS_CV == IS_VAR) */ {
if (UNEXPECTED(Z_ISREF_P(varptr))) {
@@ -29067,7 +37025,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_USER_SPEC_CV_HANDLER(ZEND
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
if (UNEXPECTED(!Z_ISREF_P(arg))) {
-
if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given",
@@ -29079,35 +37036,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_USER_SPEC_CV_HANDLER(ZEND
if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
}
- if (Z_OBJ(EX(call)->This)) {
+ if (Z_TYPE(EX(call)->This) == IS_OBJECT) {
OBJ_RELEASE(Z_OBJ(EX(call)->This));
}
ZVAL_UNDEF(param);
EX(call)->func = (zend_function*)&zend_pass_function;
- EX(call)->called_scope = NULL;
Z_OBJ(EX(call)->This) = NULL;
+ ZEND_SET_CALL_INFO(EX(call), 0, ZEND_CALL_INFO(EX(call)) & ~ZEND_CALL_RELEASE_THIS);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-
- ZVAL_NEW_REF(arg, arg);
}
- Z_ADDREF_P(arg);
} else {
if (Z_ISREF_P(arg) &&
!(EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
/* don't separate references for __call */
arg = Z_REFVAL_P(arg);
}
- if (Z_OPT_REFCOUNTED_P(arg)) {
- Z_ADDREF_P(arg);
- }
}
- ZVAL_COPY_VALUE(param, arg);
+ ZVAL_COPY(param, arg);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -29120,17 +37069,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_SPEC_CV_HANDLER(ZEND_OPCO
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_TRUE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_FALSE(EX_VAR(opline->result.var));
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_FALSE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), i_zend_is_true(val));
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -29140,15 +37089,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPC
USE_OPLINE
zval *obj;
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
zend_function *clone;
zend_object_clone_obj_t clone_call;
SAVE_OPLINE();
obj = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(obj) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -29163,58 +37112,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPC
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(obj, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "__clone method called on non-object");
+ zend_throw_error(NULL, "__clone method called on non-object");
HANDLE_EXCEPTION();
}
} while (0);
ce = Z_OBJCE_P(obj);
- clone = ce ? ce->clone : NULL;
- clone_call = Z_OBJ_HT_P(obj)->clone_obj;
+ clone = ce->clone;
+ clone_call = Z_OBJ_HT_P(obj)->clone_obj;
if (UNEXPECTED(clone_call == NULL)) {
- if (ce) {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
- } else {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object");
- }
+ zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
HANDLE_EXCEPTION();
}
- if (ce && clone) {
+ if (clone) {
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (UNEXPECTED(ce != EG(scope))) {
- zend_throw_error(zend_ce_error, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(ce != scope)) {
+ zend_throw_error(NULL, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
HANDLE_EXCEPTION();
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
- zend_throw_error(zend_ce_error, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), scope))) {
+ zend_throw_error(NULL, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
HANDLE_EXCEPTION();
}
}
}
- if (EXPECTED(EG(exception) == NULL)) {
- ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
- if (UNEXPECTED(!RETURN_VALUE_USED(opline)) || UNEXPECTED(EG(exception) != NULL)) {
- OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
- }
+ ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -29265,15 +37209,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO
if (Z_TYPE_P(expr) == opline->extended_value) {
ZVAL_COPY_VALUE(result, expr);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
- zval_copy_ctor_func(result);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CV != IS_TMP_VAR) {
- if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
if (opline->extended_value == IS_ARRAY) {
@@ -29283,9 +37224,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO
if (Z_TYPE_P(expr) != IS_NULL) {
expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -29299,11 +37238,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO
if (Z_TYPE_P(expr) != IS_ARRAY) {
object_init(result);
if (Z_TYPE_P(expr) != IS_NULL) {
- expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
+ expr = zend_hash_add_new(Z_OBJPROP_P(result), CG(known_strings)[ZEND_STR_SCALAR], expr);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
- zval_copy_ctor_func(expr);
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
} else {
if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
}
@@ -29315,96 +37252,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCO
}
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zend_op_array *new_op_array=NULL;
+ zend_op_array *new_op_array;
zval *inc_filename;
- zval tmp_inc_filename;
- zend_bool failure_retval=0;
SAVE_OPLINE();
- inc_filename = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
-
- ZVAL_UNDEF(&tmp_inc_filename);
- if (Z_TYPE_P(inc_filename) != IS_STRING) {
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(inc_filename) == IS_UNDEF)) {
- inc_filename = GET_OP1_UNDEF_CV(inc_filename, BP_VAR_R);
- }
- ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
- inc_filename = &tmp_inc_filename;
- }
-
- if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- } else {
- switch (opline->extended_value) {
- case ZEND_INCLUDE_ONCE:
- case ZEND_REQUIRE_ONCE: {
- zend_file_handle file_handle;
- zend_string *resolved_path;
-
- resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename));
- if (resolved_path) {
- failure_retval = zend_hash_exists(&EG(included_files), resolved_path);
- } else {
- resolved_path = zend_string_copy(Z_STR_P(inc_filename));
- }
-
- if (failure_retval) {
- /* do nothing, file already included */
- } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
-
- if (!file_handle.opened_path) {
- file_handle.opened_path = zend_string_copy(resolved_path);
- }
-
- if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
- new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
- zend_destroy_file_handle(&file_handle);
- } else {
- zend_file_handle_dtor(&file_handle);
- failure_retval=1;
- }
- } else {
- if (opline->extended_value == ZEND_INCLUDE_ONCE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- }
- zend_string_release(resolved_path);
- }
- break;
- case ZEND_INCLUDE:
- case ZEND_REQUIRE:
- new_op_array = compile_filename(opline->extended_value, inc_filename);
- break;
- case ZEND_EVAL: {
- char *eval_desc = zend_make_compiled_string_description("eval()'d code");
-
- new_op_array = zend_compile_string(inc_filename, eval_desc);
- efree(eval_desc);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp_inc_filename));
- }
+ inc_filename = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ new_op_array = zend_include_or_eval(inc_filename, opline->extended_value);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
+ } else if (new_op_array == ZEND_FAKE_OP_ARRAY) {
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ }
} else if (EXPECTED(new_op_array != NULL)) {
zval *return_value = NULL;
zend_execute_data *call;
@@ -29413,19 +37280,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLE
return_value = EX_VAR(opline->result.var);
}
- new_op_array->scope = EG(scope);
+ new_op_array->scope = EX(func)->op_array.scope;
- call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE,
- (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)));
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
+ (zend_function*)new_op_array, 0,
+ Z_TYPE(EX(This)) != IS_OBJECT ? Z_CE(EX(This)) : NULL,
+ Z_TYPE(EX(This)) == IS_OBJECT ? Z_OBJ(EX(This)) : NULL);
- if (EX(symbol_table)) {
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
call->symbol_table = EX(symbol_table);
} else {
call->symbol_table = zend_rebuild_symbol_table();
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
@@ -29440,12 +37309,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLE
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
-
} else if (RETURN_VALUE_USED(opline)) {
- ZVAL_BOOL(EX_VAR(opline->result.var), failure_retval);
+ ZVAL_FALSE(EX_VAR(opline->result.var));
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -29466,8 +37334,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN
}
Z_FE_POS_P(result) = 0;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
HashPosition pos = 0;
@@ -29478,6 +37345,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN
if (IS_CV != IS_TMP_VAR) {
Z_ADDREF_P(array_ptr);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
pos = 0;
p = fe_ht->arData;
@@ -29499,8 +37373,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
@@ -29540,8 +37413,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -29582,8 +37454,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE
Z_ADDREF_P(array_ref);
ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
} else {
- array_ptr = EX_VAR(opline->result.var);
- ZVAL_COPY_VALUE(array_ptr, array_ref);
+ array_ref = EX_VAR(opline->result.var);
+ ZVAL_NEW_REF(array_ref, array_ptr);
+ array_ptr = Z_REFVAL_P(array_ref);
}
if (IS_CV == IS_CONST) {
zval_copy_ctor_func(array_ptr);
@@ -29608,8 +37481,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
if (!Z_OBJCE_P(array_ptr)->get_iterator) {
if (IS_CV == IS_VAR || IS_CV == IS_CV) {
@@ -29623,6 +37495,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE
array_ptr = EX_VAR(opline->result.var);
ZVAL_COPY_VALUE(array_ptr, array_ref);
}
+ if (Z_OBJ_P(array_ptr)->properties
+ && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
+ }
+ Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
+ }
fe_ht = Z_OBJPROP_P(array_ptr);
p = fe_ht->arData;
while (1) {
@@ -29643,8 +37522,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE
}
Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
zend_class_entry *ce = Z_OBJCE_P(array_ptr);
zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
@@ -29701,8 +37579,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE
if (is_empty) {
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
} else {
@@ -29720,7 +37597,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_CV != IS_UNUSED)
USE_OPLINE
SAVE_OPLINE();
@@ -29744,7 +37620,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCO
} while (0);
}
-#endif
zend_bailout();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
@@ -29766,24 +37641,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SET_SPEC_CV_HANDLER(ZEND_O
value = Z_REFVAL_P(value);
}
if (i_zend_is_true(value)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+
+ ZVAL_COPY_VALUE(result, value);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_CV == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -29804,24 +37681,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_CV_HANDLER(ZEND_
}
if (Z_TYPE_P(value) > IS_NULL) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ zval *result = EX_VAR(opline->result.var);
+ ZVAL_COPY_VALUE(result, value);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
- }
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
} else if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
+ if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
} else if (IS_CV == IS_VAR && ref) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
- if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
- efree_size(ref, sizeof(zend_reference));
+ zend_reference *r = Z_REF_P(ref);
+
+ if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
+ efree_size(r, sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
}
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -29829,29 +37707,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CV_HANDLER(ZEND
USE_OPLINE
zval *value;
+ zval *result = EX_VAR(opline->result.var);
value = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
SAVE_OPLINE();
- value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
- CHECK_EXCEPTION();
+ GET_OP1_UNDEF_CV(value, BP_VAR_R);
+ ZVAL_NULL(result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- if ((IS_CV == IS_VAR || IS_CV == IS_CV) && Z_ISREF_P(value)) {
- ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
- if (IS_CV == IS_VAR) {
+ if (IS_CV == IS_CV) {
+ ZVAL_DEREF(value);
+ ZVAL_COPY(result, value);
+ } else if (IS_CV == IS_VAR) {
+ if (UNEXPECTED(Z_ISREF_P(value))) {
+ ZVAL_COPY_VALUE(result, Z_REFVAL_P(value));
if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
efree_size(Z_REF_P(value), sizeof(zend_reference));
+ } else if (Z_OPT_REFCOUNTED_P(result)) {
+ Z_ADDREF_P(result);
}
+ } else {
+ ZVAL_COPY_VALUE(result, value);
}
} else {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZVAL_COPY_VALUE(result, value);
if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- zval_copy_ctor_func(EX_VAR(opline->result.var));
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) {
+ Z_ADDREF_P(result);
}
- } else if (IS_CV == IS_CV) {
- if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
}
}
ZEND_VM_NEXT_OPCODE();
@@ -29869,6 +37754,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CV_HANDLER(ZEN
SAVE_OPLINE();
val = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var);
+ if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
+ zend_throw_error(NULL, "Cannot use \"yield from\" in a force-closed generator");
+
+ HANDLE_EXCEPTION();
+ }
+
if (Z_TYPE_P(val) == IS_ARRAY) {
ZVAL_COPY_VALUE(&generator->values, val);
if (IS_CV != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
@@ -29887,13 +37778,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CV_HANDLER(ZEN
if (Z_ISUNDEF(new_gen->retval)) {
if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
- zend_throw_error(zend_ce_error, "Impossible to yield from the Generator being currently run");
+ zend_throw_error(NULL, "Impossible to yield from the Generator being currently run");
HANDLE_EXCEPTION();
} else {
zend_generator_yield_from(generator, new_gen);
}
} else if (UNEXPECTED(new_gen->execute_data == NULL)) {
- zend_throw_error(zend_ce_error, "Generator passed to yield from was aborted without proper return and is unable to continue");
+ zend_throw_error(NULL, "Generator passed to yield from was aborted without proper return and is unable to continue");
HANDLE_EXCEPTION();
} else {
if (RETURN_VALUE_USED(opline)) {
@@ -29906,7 +37797,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CV_HANDLER(ZEN
if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
if (!EG(exception)) {
- zend_throw_error(zend_ce_error, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
+ zend_throw_error(NULL, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
}
HANDLE_EXCEPTION();
}
@@ -29923,7 +37814,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CV_HANDLER(ZEN
ZVAL_OBJ(&generator->values, &iter->std);
}
} else {
- zend_throw_error(zend_ce_error, "Can use \"yield from\" only with arrays and Traversables", 0);
+ zend_throw_error(NULL, "Can use \"yield from\" only with arrays and Traversables", 0);
HANDLE_EXCEPTION();
}
@@ -29933,6 +37824,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CV_HANDLER(ZEN
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ /* This generator has no send target (though the generator we delegate to might have one) */
+ generator->send_target = NULL;
+
/* We increment to the next op, so we are at the correct position when the
* generator is resumed. */
ZEND_VM_INC_OPCODE();
@@ -29984,8 +37878,7 @@ try_strlen:
} while (0);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30001,7 +37894,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CV_HANDLER(ZEN
if (IS_CV != IS_CONST && UNEXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
zend_class_entry *ce = Z_OBJCE_P(value);
- if (UNEXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
+ if (EXPECTED(ZSTR_LEN(ce->name) != sizeof("__PHP_Incomplete_Class") - 1) ||
EXPECTED(memcmp(ZSTR_VAL(ce->name), "__PHP_Incomplete_Class", sizeof("__PHP_Incomplete_Class") - 1) != 0)) {
result = 1;
}
@@ -30021,8 +37914,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CV_HANDLER(ZEN
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30065,8 +37957,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_CONST_HANDLER(ZEND
add_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30109,8 +38000,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CV_CONST_HANDLER(ZEND
sub_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30156,8 +38046,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CV_CONST_HANDLER(ZEND
mul_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30172,8 +38061,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_CONST_HANDLER(ZEND
fast_div_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30211,8 +38099,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND
mod_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30227,8 +38114,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_CONST_HANDLER(ZEND_
shift_left_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30243,8 +38129,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_CONST_HANDLER(ZEND_
shift_right_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30282,7 +38182,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -30304,8 +38204,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30321,12 +38220,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HAN
result = fast_is_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30342,12 +38238,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST
result = fast_is_not_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30388,7 +38281,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
@@ -30415,8 +38308,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30457,7 +38349,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HAN
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
@@ -30484,8 +38376,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HAN
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30535,8 +38426,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_CONST_HANDL
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30586,8 +38476,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CO
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30602,8 +38491,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_CONST_HANDLE
compare_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30618,8 +38506,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZE
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30634,8 +38521,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CONST_HANDLER(Z
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30650,8 +38536,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CONST_HANDLER(Z
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30666,8 +38551,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -30682,8 +38566,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
@@ -30691,15 +38575,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = EX_CONSTANT(opline->op2);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -30715,13 +38592,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -30732,81 +38614,104 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_CV_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = EX_CONSTANT(opline->op2);
+ if (IS_CV != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_CONST == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
- do {
- if (IS_CV == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_CV != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_CONST == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_CONST);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_CV != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = EX_CONSTANT(opline->op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_CV != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_CONST(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -30820,13 +38725,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_C
value = EX_CONSTANT(opline->op2);
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -30842,8 +38741,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_C
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -30852,13 +38750,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CONST_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30872,13 +38810,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CONST_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30892,13 +38870,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CONST_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30912,13 +38930,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CONST_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30932,13 +38990,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CONST_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30952,13 +39050,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CONST_HANDLE
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30972,13 +39110,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CONST_HANDLE
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -30992,13 +39170,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_HA
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -31012,13 +39230,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_HAN
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -31032,13 +39290,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_HA
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -31052,13 +39350,33 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HA
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -31066,6 +39384,86 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HA
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CONST_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CONST_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -31077,20 +39475,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -31104,28 +39496,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -31133,8 +39529,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31158,20 +39553,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -31186,22 +39575,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -31210,8 +39602,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31224,14 +39615,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_CONST_HAN
ZEND_VM_TAIL_CALL(zend_post_incdec_property_helper_SPEC_CV_CONST(0 ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CV_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zval *varname;
zval *retval;
zend_string *name;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
@@ -31248,120 +39639,73 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (IS_CV == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
+ if (IS_CONST == IS_CONST) {
+ if (IS_CV == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (IS_CV != IS_CONST) {
- zend_string_release(name);
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CV == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- HANDLE_EXCEPTION();
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
}
- goto fetch_var_return;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
- }
-
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
}
+
+ HANDLE_EXCEPTION();
}
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
+ if (IS_CV == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- HANDLE_EXCEPTION();
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ goto fetch_static_prop_return;
}
}
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CV == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
if (IS_CV != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
+fetch_static_prop_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -31371,59 +39715,79 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CV != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CONST, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, IS_CONST);
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31435,18 +39799,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_CONST_HAND
SAVE_OPLINE();
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31456,20 +39815,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HAN
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31479,12 +39833,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HAN
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31496,18 +39849,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CON
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -31516,18 +39864,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CON
} else {
if (IS_CONST == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
HANDLE_EXCEPTION();
}
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31537,21 +39884,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
-
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = _get_zval_ptr_cv_undef_BP_VAR_UNSET(execute_data, opline->op1.var);
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31565,8 +39906,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HAND
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -31623,8 +39964,7 @@ fetch_obj_r_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31638,13 +39978,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HAND
property = EX_CONSTANT(opline->op2);
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -31655,8 +39990,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HAND
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31670,13 +40004,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HAN
property = EX_CONSTANT(opline->op2);
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -31686,8 +40015,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HAN
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31701,8 +40029,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HAN
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -31759,8 +40087,7 @@ fetch_obj_is_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31777,19 +40104,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CON
property = EX_CONSTANT(opline->op2);
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
-
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
HANDLE_EXCEPTION();
}
@@ -31799,8 +40121,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CON
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -31815,27 +40136,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = EX_CONSTANT(opline->op2);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CV, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -31846,81 +40161,641 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CV_CONST_HANDL
SAVE_OPLINE();
container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2));
-try_fetch_list:
- if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
- zval *value = zend_hash_index_find(Z_ARRVAL_P(container), Z_LVAL_P(EX_CONSTANT(opline->op2)));
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
- if (UNEXPECTED(value == NULL)) {
- zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, Z_LVAL_P(EX_CONSTANT(opline->op2)));
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
} else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
}
- } else if (IS_CV != IS_CONST &&
- UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
- EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
- zval *result = EX_VAR(opline->result.var);
- zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, EX_CONSTANT(opline->op2), BP_VAR_R, result);
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
- if (retval) {
- if (result != retval) {
- ZVAL_COPY(result, retval);
+ property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
}
} else {
- ZVAL_NULL(result);
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
}
- } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_TYPE_P(container) == IS_REFERENCE) {
- container = Z_REFVAL_P(container);
- goto try_fetch_list;
- } else {
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
- ZVAL_NULL(EX_VAR(opline->result.var));
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *object;
- zval *property_name;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property_name = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
- HANDLE_EXCEPTION();
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CONST == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_CV, property_name, IS_CONST, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *object_ptr;
- zend_free_op free_op_data1;
+
zval *value;
zval *variable_ptr;
zval *dim;
@@ -31928,40 +40803,214 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDL
SAVE_OPLINE();
object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CONST == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CONST != IS_UNUSED) {
- HANDLE_EXCEPTION();
}
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if (IS_CONST == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
dim = EX_CONSTANT(opline->op2);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, IS_CONST, BP_VAR_W);
-
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
}
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if (IS_CONST != IS_UNUSED) {
+
+ }
+
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CONST == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
}
}
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -31970,60 +41019,144 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zval *property_name = EX_CONSTANT(opline->op2);
+ zend_assign_to_object_dim(object_ptr, dim, value);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (IS_CONST == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CONST != IS_UNUSED) {
- dim = EX_CONSTANT(opline->op2);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
+ }
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CONST == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ if (IS_CONST == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CONST == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = EX_CONSTANT(opline->op2);
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
}
- goto assign_dim_convert_to_array;
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = EX_CONSTANT(opline->op2);
+assign_dim_error:
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
+ if (IS_CONST != IS_UNUSED) {
+
+ }
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -32034,22 +41167,49 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(Z
value = EX_CONSTANT(opline->op2);
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = EX_CONSTANT(opline->op2);
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+
+ if (UNEXPECTED(1)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32116,8 +41276,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CONST_HAND
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32144,14 +41303,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
HANDLE_EXCEPTION();
@@ -32160,8 +41318,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
object = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -32176,12 +41334,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
}
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
HANDLE_EXCEPTION();
@@ -32197,7 +41356,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
HANDLE_EXCEPTION();
@@ -32207,7 +41366,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
@@ -32219,6 +41378,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -32236,8 +41398,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32278,7 +41439,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEN
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
} else {
@@ -32295,6 +41456,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEN
SAVE_OPLINE();
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((IS_CV & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -32303,8 +41472,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEN
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32317,11 +41485,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONS
if ((IS_CV == IS_VAR || IS_CV == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -32330,10 +41493,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONS
if (IS_CV == IS_TMP_VAR) {
/* pass */
} else if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CV == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -32403,8 +41564,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32438,35 +41598,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDL
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval tmp, *varname;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
- if (IS_CV == IS_CV &&
- IS_CONST == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- zval *var = EX_VAR(opline->op1.var);
-
- if (Z_REFCOUNTED_P(var)) {
- zend_refcounted *garbage = Z_COUNTED_P(var);
-
- if (!--GC_REFCOUNT(garbage)) {
- ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
- } else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
- }
- } else {
- ZVAL_UNDEF(var);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
@@ -32479,45 +41618,42 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_CONST_HANDLE
varname = &tmp;
}
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
-
- HANDLE_EXCEPTION();
+ if (IS_CONST == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (IS_CV != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32530,14 +41666,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLE
zend_string *key;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ container = _get_zval_ptr_cv_undef_BP_VAR_UNSET(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -32600,23 +41731,25 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32628,13 +41761,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLE
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -32659,113 +41787,90 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLE
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value;
int result;
- if (IS_CV == IS_CV &&
- IS_CONST == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- value = EX_VAR(opline->op1.var);
- if (opline->extended_value & ZEND_ISSET) {
- result =
- Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- SAVE_OPLINE();
- result = !i_zend_is_true(value);
- if (UNEXPECTED(EG(exception))) {
- HANDLE_EXCEPTION();
- }
- }
- ZEND_VM_SMART_BRANCH(result, 0);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
- } else {
-
- zval tmp, *varname;
-
- SAVE_OPLINE();
- varname = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- ZVAL_UNDEF(&tmp);
- if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- ZVAL_STR(&tmp, zval_get_string(varname));
- varname = &tmp;
- }
-
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (IS_CV == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ zval tmp, *varname;
+ zend_class_entry *ce;
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CV == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ ZVAL_UNDEF(&tmp);
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ if (IS_CONST == IS_CONST) {
+ if (IS_CV == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto is_var_return;
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- if (IS_CV == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if (IS_CV == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (IS_CV == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
}
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32778,10 +41883,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_
zval *offset;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -32871,6 +41976,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -32902,8 +42010,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32917,8 +42024,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -32949,8 +42056,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -32968,18 +42074,23 @@ try_instanceof:
zend_class_entry *ce;
if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
if (UNEXPECTED(ce == NULL)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op2.var));
}
@@ -32996,8 +42107,7 @@ try_instanceof:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33008,7 +42118,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZE
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -33027,33 +42137,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZE
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ if (IS_CV & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CV != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CV == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -33067,8 +42171,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZE
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -33095,8 +42199,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZE
/* Consts, temporary variables and references need copying */
if (IS_CONST == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CONST == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -33141,27 +42245,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CONST_HANDLER(ZE
ZEND_VM_RETURN();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- USE_OPLINE
-
- zval *op1, *op2;
-
- SAVE_OPLINE();
- op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- op2 = EX_CONSTANT(opline->op2);
- pow_function(EX_VAR(opline->result.var), op1, op2);
-
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
-
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CONST(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
-}
-
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_GLOBAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -33170,6 +42253,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_GLOBAL_SPEC_CV_CONST_HAND
zval *value;
zval *variable_ptr;
uint32_t idx;
+ zend_reference *ref;
ZEND_VM_REPEATABLE_OPCODE
@@ -33212,22 +42296,27 @@ check_indirect:
}
}
+ if (UNEXPECTED(!Z_ISREF_P(value))) {
+ ref = (zend_reference*)emalloc(sizeof(zend_reference));
+ GC_REFCOUNT(ref) = 2;
+ GC_TYPE_INFO(ref) = IS_REFERENCE;
+ ZVAL_COPY_VALUE(&ref->val, value);
+ Z_REF_P(value) = ref;
+ Z_TYPE_INFO_P(value) = IS_REFERENCE_EX;
+ } else {
+ ref = Z_REF_P(value);
+ GC_REFCOUNT(ref)++;
+ }
+
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- do {
- zend_reference *ref;
+ if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) {
+ uint32_t refcnt = Z_DELREF_P(variable_ptr);
- if (UNEXPECTED(!Z_ISREF_P(value))) {
- ZVAL_NEW_REF(value, value);
- } else if (UNEXPECTED(variable_ptr == value)) {
- break;
- }
- ref = Z_REF_P(value);
- GC_REFCOUNT(ref)++;
- if (UNEXPECTED(Z_REFCOUNTED_P(variable_ptr))) {
- if (!Z_DELREF_P(variable_ptr)) {
+ if (EXPECTED(variable_ptr != value)) {
+ if (refcnt == 0) {
SAVE_OPLINE();
- zval_dtor_func_for_ptr(Z_COUNTED_P(variable_ptr));
+ zval_dtor_func(Z_COUNTED_P(variable_ptr));
if (UNEXPECTED(EG(exception))) {
ZVAL_NULL(variable_ptr);
HANDLE_EXCEPTION();
@@ -33236,13 +42325,112 @@ check_indirect:
GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
}
}
- ZVAL_REF(variable_ptr, ref);
- } while (0);
+ }
+ ZVAL_REF(variable_ptr, ref);
ZEND_VM_REPEAT_OPCODE(ZEND_BIND_GLOBAL);
ZEND_VM_NEXT_OPCODE();
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_STATIC_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ HashTable *ht;
+ zval *varname;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+ zval_ptr_dtor(variable_ptr);
+
+ ht = EX(func)->op_array.static_variables;
+ ZEND_ASSERT(ht != NULL);
+ if (GC_REFCOUNT(ht) > 1) {
+ if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
+ GC_REFCOUNT(ht)--;
+ }
+ EX(func)->op_array.static_variables = ht = zend_array_dup(ht);
+ }
+
+ varname = EX_CONSTANT(opline->op2);
+ value = zend_hash_find(ht, Z_STR_P(varname));
+
+ if (opline->extended_value) {
+ if (Z_CONSTANT_P(value)) {
+ if (UNEXPECTED(zval_update_constant_ex(value, EX(func)->op_array.scope) != SUCCESS)) {
+ ZVAL_NULL(variable_ptr);
+ HANDLE_EXCEPTION();
+ }
+ }
+ if (UNEXPECTED(!Z_ISREF_P(value))) {
+ zend_reference *ref = (zend_reference*)emalloc(sizeof(zend_reference));
+ GC_REFCOUNT(ref) = 2;
+ GC_TYPE_INFO(ref) = IS_REFERENCE;
+ ZVAL_COPY_VALUE(&ref->val, value);
+ Z_REF_P(value) = ref;
+ Z_TYPE_INFO_P(value) = IS_REFERENCE_EX;
+ ZVAL_REF(variable_ptr, ref);
+ } else {
+ Z_ADDREF_P(value);
+ ZVAL_REF(variable_ptr, Z_REF_P(value));
+ }
+ } else {
+ ZVAL_COPY(variable_ptr, value);
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *container, *dim, *value;
+ zend_long offset;
+
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ dim = EX_CONSTANT(opline->op2);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (IS_CV & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -33256,12 +42444,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDL
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33277,15 +42462,40 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_H
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(0)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
}
- ZEND_VM_NEXT_OPCODE();
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
@@ -33296,22 +42506,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_HANDLER(ZEN
value = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
zval_ptr_dtor_nogc(free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(1)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33322,7 +42531,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMP_HANDLER(ZEND
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -33341,33 +42550,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMP_HANDLER(ZEND
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ if (IS_CV & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CV != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CV == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -33381,8 +42584,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMP_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -33409,8 +42612,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_TMP_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_TMP_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_TMP_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -33468,12 +42671,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDL
result = fast_is_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33489,22 +42689,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_H
result = fast_is_not_identical_function(op1, op2);
zval_ptr_dtor_nogc(free_op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CV_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zval *varname;
zval *retval;
zend_string *name;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
@@ -33521,120 +42718,73 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (IS_CV == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
+ if (IS_VAR == IS_CONST) {
+ if (IS_CV == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (IS_CV != IS_CONST) {
- zend_string_release(name);
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CV == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- HANDLE_EXCEPTION();
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
}
- goto fetch_var_return;
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
- }
-
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
}
+
+ HANDLE_EXCEPTION();
}
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
+ if (IS_CV == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- HANDLE_EXCEPTION();
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ goto fetch_static_prop_return;
+ }
+ }
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
}
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CV == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
}
if (IS_CV != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
+fetch_static_prop_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -33644,47 +42794,46 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
@@ -33695,22 +42844,49 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEN
value = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
zval_ptr_dtor_nogc(free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+ zval_ptr_dtor_nogc(free_op2);
+ if (UNEXPECTED(1)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33722,87 +42898,59 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER
SAVE_OPLINE();
value_ptr = _get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2);
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
+ if (IS_CV == IS_VAR &&
+ UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
+ UNEXPECTED(!Z_ISREF_P(EX_VAR(opline->op1.var))) &&
+ UNEXPECTED(!Z_ISERROR_P(EX_VAR(opline->op1.var)))) {
+ zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
+ if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);};
HANDLE_EXCEPTION();
- }
- if (IS_VAR == IS_VAR &&
- (value_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
- if (!(free_op2 != NULL)) {
- PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+
+ } else if (IS_VAR == IS_VAR &&
+ opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ UNEXPECTED(!Z_ISREF_P(value_ptr))) {
zend_error(E_NOTICE, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
+ if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);};
HANDLE_EXCEPTION();
}
- ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
- }
- variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
- UNEXPECTED(!Z_ISREF_P(variable_ptr))) {
- zend_throw_error(zend_ce_error, "Cannot assign by reference to overloaded object");
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
+ value_ptr = zend_assign_to_variable(variable_ptr, value_ptr, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value_ptr);
+ }
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
- HANDLE_EXCEPTION();
- }
- if ((IS_CV == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) ||
- (IS_VAR == IS_VAR && UNEXPECTED(value_ptr == &EG(error_zval)))) {
- variable_ptr = &EG(uninitialized_zval);
} else {
- zend_assign_to_variable_reference(variable_ptr, value_ptr);
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
- }
+ if ((IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) ||
+ (IS_VAR == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr)))) {
+ variable_ptr = &EG(uninitialized_zval);
+ } else {
+ zend_assign_to_variable_reference(variable_ptr, value_ptr);
+ }
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
+ }
- if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
+ if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);};
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval tmp, *varname;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
- if (IS_CV == IS_CV &&
- IS_VAR == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- zval *var = EX_VAR(opline->op1.var);
-
- if (Z_REFCOUNTED_P(var)) {
- zend_refcounted *garbage = Z_COUNTED_P(var);
-
- if (!--GC_REFCOUNT(garbage)) {
- ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
- } else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
- }
- } else {
- ZVAL_UNDEF(var);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
@@ -33815,150 +42963,125 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_VAR_HANDLER(
varname = &tmp;
}
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
-
- HANDLE_EXCEPTION();
+ if (IS_VAR == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (IS_CV != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value;
int result;
- if (IS_CV == IS_CV &&
- IS_VAR == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- value = EX_VAR(opline->op1.var);
- if (opline->extended_value & ZEND_ISSET) {
- result =
- Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- SAVE_OPLINE();
- result = !i_zend_is_true(value);
- if (UNEXPECTED(EG(exception))) {
- HANDLE_EXCEPTION();
- }
- }
- ZEND_VM_SMART_BRANCH(result, 0);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
- } else {
-
- zval tmp, *varname;
-
- SAVE_OPLINE();
- varname = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- ZVAL_UNDEF(&tmp);
- if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- ZVAL_STR(&tmp, zval_get_string(varname));
- varname = &tmp;
- }
-
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (IS_CV == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ zval tmp, *varname;
+ zend_class_entry *ce;
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CV == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ ZVAL_UNDEF(&tmp);
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ if (IS_VAR == IS_CONST) {
+ if (IS_CV == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto is_var_return;
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- if (IS_CV == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if (IS_CV == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (IS_CV == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
}
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -33976,18 +43099,23 @@ try_instanceof:
zend_class_entry *ce;
if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
if (UNEXPECTED(ce == NULL)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op2.var));
}
@@ -34004,8 +43132,7 @@ try_instanceof:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34016,7 +43143,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_VAR_HANDLER(ZEND
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -34035,33 +43162,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_VAR_HANDLER(ZEND
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ if (IS_CV & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CV != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CV == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -34075,8 +43196,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_VAR_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -34103,8 +43224,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_VAR_HANDLER(ZEND
/* Consts, temporary variables and references need copying */
if (IS_VAR == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_VAR == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -34153,87 +43274,112 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SP
{
USE_OPLINE
zend_free_op free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = NULL;
+ if (IS_CV != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_UNUSED == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = NULL;
- do {
- if (IS_CV == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_CV != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_UNUSED == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_UNUSED);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_CV != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = NULL;
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_CV != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34241,19 +43387,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34261,19 +43407,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34281,19 +43427,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34301,19 +43447,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34321,19 +43467,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_UNUSED_HAND
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34341,19 +43487,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_UNUSED_HANDL
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34361,19 +43507,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_UNUSED_HANDL
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34381,19 +43527,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_UNUSED_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34401,19 +43547,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_UNUSED_HA
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34421,19 +43567,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_UNUSED_H
#endif
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -34441,6 +43587,26 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_H
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_UNUSED_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_UNUSED != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_UNUSED(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -34465,65 +43631,30 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_UNUSED == IS_CONST) {
- if (IS_CV == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
-
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if (IS_CV != IS_CONST) {
- zend_string_release(name);
- }
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CV == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
-
- HANDLE_EXCEPTION();
- }
-
- goto fetch_var_return;
- }
- }
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ retval = zend_hash_find(target_symbol_table, name);
+ if (retval == NULL) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ case BP_VAR_W:
+ retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
}
-
- } else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
+ /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
+ } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
+ retval = Z_INDIRECT_P(retval);
+ if (Z_TYPE_P(retval) == IS_UNDEF) {
switch (type) {
case BP_VAR_R:
case BP_VAR_UNSET:
@@ -34536,49 +43667,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
/* break missing intentionally */
case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ ZVAL_NULL(retval);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
+ }
- HANDLE_EXCEPTION();
- }
- }
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
- }
}
if (IS_CV != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -34588,8 +43691,7 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34628,6 +43730,145 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_UNUSED_HANDLE
ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CV_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+{
+ USE_OPLINE
+
+ zval *varname;
+ zval *retval;
+ zend_string *name;
+ zend_class_entry *ce;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_CONST) {
+ name = Z_STR_P(varname);
+ } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
+ name = Z_STR_P(varname);
+ zend_string_addref(name);
+ } else {
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ name = zval_get_string(varname);
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ if (IS_CV == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
+ }
+
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ if (IS_CV == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+
+ HANDLE_EXCEPTION();
+ }
+
+ goto fetch_static_prop_return;
+ }
+ }
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
+ }
+
+ HANDLE_EXCEPTION();
+ }
+ if (IS_CV == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
+
+ if (IS_CV != IS_CONST) {
+ zend_string_release(name);
+ }
+
+fetch_static_prop_return:
+ ZEND_ASSERT(retval != NULL);
+ if (type == BP_VAR_R || type == BP_VAR_IS) {
+ if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
+ ZVAL_UNREF(retval);
+ }
+ ZVAL_COPY(EX_VAR(opline->result.var), retval);
+ } else {
+ ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
+ }
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else {
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CV_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -34637,18 +43878,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HAN
SAVE_OPLINE();
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34658,20 +43894,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HA
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34683,18 +43914,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNU
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -34703,26 +43929,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNU
} else {
if (IS_UNUSED == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
HANDLE_EXCEPTION();
}
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *object_ptr;
- zend_free_op free_op_data1;
+
zval *value;
zval *variable_ptr;
zval *dim;
@@ -34730,40 +43955,214 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HAND
SAVE_OPLINE();
object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_UNUSED == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = NULL;
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = EX_CONSTANT((opline+1)->op1);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = NULL;
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_UNUSED != IS_UNUSED) {
- HANDLE_EXCEPTION();
}
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if (IS_UNUSED == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
dim = NULL;
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, IS_UNUSED, BP_VAR_W);
-
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = NULL;
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if (IS_UNUSED != IS_UNUSED) {
+
+ }
+
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_UNUSED == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = NULL;
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
}
}
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -34772,57 +44171,141 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zval *property_name = NULL;
+ zend_assign_to_object_dim(object_ptr, dim, value);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (IS_UNUSED == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = NULL;
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_UNUSED != IS_UNUSED) {
- dim = NULL;
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
+ }
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_UNUSED == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = NULL;
+ if (IS_UNUSED == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = NULL;
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- goto assign_dim_convert_to_array;
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_UNUSED == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = NULL;
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = NULL;
+assign_dim_error:
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
+ if (IS_UNUSED != IS_UNUSED) {
+
+ }
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34844,7 +44327,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNU
if (IS_CV == IS_CONST) {
ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
retval_ref = retval_ptr = EX_VAR(opline->result.var);
- } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ } else if (IS_CV == IS_VAR) {
+ if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
+ retval_ptr = Z_INDIRECT_P(retval_ptr);
+ }
+ ZVAL_DEREF(retval_ptr);
+ } else if (IS_CV == IS_CV) {
ZVAL_DEREF(retval_ptr);
}
@@ -34866,12 +44354,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNU
zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
if (UNEXPECTED(EG(exception) != NULL)) {
-
+ if (IS_CV == IS_CONST) {
+ zval_ptr_dtor_nogc(retval_ptr);
+ }
}
#endif
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -34884,11 +44373,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUS
if ((IS_CV == IS_VAR || IS_CV == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -34897,10 +44381,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUS
if (IS_CV == IS_TMP_VAR) {
/* pass */
} else if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CV == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -34970,8 +44452,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35014,7 +44495,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDL
SAVE_OPLINE();
if (IS_CV == IS_CV &&
- IS_UNUSED == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
zval *var = EX_VAR(opline->op1.var);
@@ -35023,16 +44503,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDL
if (!--GC_REFCOUNT(garbage)) {
ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
+ zval_dtor_func(garbage);
} else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
+ zval *z = var;
+ ZVAL_DEREF(z);
+ if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
+ ZVAL_UNDEF(var);
+ gc_possible_root(Z_COUNTED_P(z));
+ } else {
+ ZVAL_UNDEF(var);
+ }
}
} else {
ZVAL_UNDEF(var);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
@@ -35046,45 +44531,72 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDL
varname = &tmp;
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
- if (IS_UNUSED == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- HANDLE_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ zend_class_entry *ce;
+
+
+ SAVE_OPLINE();
+
+ varname = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+
+ ZVAL_UNDEF(&tmp);
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if (IS_CV != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35094,7 +44606,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUS
int result;
if (IS_CV == IS_CV &&
- IS_UNUSED == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
value = EX_VAR(opline->op1.var);
if (opline->extended_value & ZEND_ISSET) {
@@ -35115,6 +44626,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUS
} else {
zval tmp, *varname;
+ HashTable *target_symbol_table;
SAVE_OPLINE();
varname = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
@@ -35124,72 +44636,158 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUS
varname = &tmp;
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
- if (IS_UNUSED == IS_CONST) {
- if (IS_CV == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+}
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if (IS_CV == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *value;
+ int result;
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ zval tmp, *varname;
+ zend_class_entry *ce;
- goto is_var_return;
- }
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ ZVAL_UNDEF(&tmp);
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ if (IS_CV == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
- if (IS_CV == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if (IS_CV == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if (IS_CV == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
}
+
+ if (IS_CV != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
+ }
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *expr;
+ zend_bool result;
+
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+
+try_instanceof:
+ if (Z_TYPE_P(expr) == IS_OBJECT) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
+ if (UNEXPECTED(ce == NULL)) {
+ ZVAL_FALSE(EX_VAR(opline->result.var));
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ result = ce && instanceof_function(Z_OBJCE_P(expr), ce);
+ } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_TYPE_P(expr) == IS_REFERENCE) {
+ expr = Z_REFVAL_P(expr);
+ goto try_instanceof;
+ } else {
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(expr) == IS_UNDEF)) {
+ GET_OP1_UNDEF_CV(expr, BP_VAR_R);
+ }
+ result = 0;
+ }
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35200,7 +44798,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(Z
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -35219,33 +44817,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(Z
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ if (IS_CV & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CV != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CV == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -35259,8 +44851,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -35287,8 +44879,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_UNUSED_HANDLER(Z
/* Consts, temporary variables and references need copying */
if (IS_UNUSED == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_UNUSED == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -35373,8 +44965,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_CV_HANDLER(ZEND_OP
add_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35417,8 +45008,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CV_CV_HANDLER(ZEND_OP
sub_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35464,8 +45054,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CV_CV_HANDLER(ZEND_OP
mul_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35480,8 +45069,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_CV_HANDLER(ZEND_OP
fast_div_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35519,8 +45107,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OP
mod_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35535,8 +45122,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_CV_HANDLER(ZEND_OPC
shift_left_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35551,8 +45137,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_CV_HANDLER(ZEND_OPC
shift_right_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35590,7 +45190,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -35612,8 +45212,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35629,12 +45228,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLE
result = fast_is_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35650,12 +45246,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HA
result = fast_is_not_identical_function(op1, op2);
- ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR));
+ ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- if ((IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35696,7 +45289,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER(ZE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
@@ -35723,8 +45316,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER(ZE
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35765,7 +45357,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
@@ -35792,8 +45384,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLE
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35843,8 +45434,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER(
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35894,8 +45484,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35910,8 +45499,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_CV_HANDLER(Z
compare_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35926,8 +45514,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CV_HANDLER(ZEND_
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35942,8 +45529,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35958,8 +45544,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CV_HANDLER(ZEND
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -35974,8 +45559,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER(ZE
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -35990,8 +45574,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
@@ -35999,15 +45583,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -36023,13 +45600,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -36040,81 +45622,104 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_CV_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
HANDLE_EXCEPTION();
}
- dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ if (IS_CV != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if (IS_CV == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
- do {
- if (IS_CV == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_CV != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if (IS_CV == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, IS_CV);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
-
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_CV != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_CV != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_CV(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -36128,13 +45733,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_C
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -36150,8 +45749,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_C
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36160,13 +45758,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36180,13 +45818,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36200,13 +45878,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36220,13 +45938,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36240,13 +45998,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CV_HANDLER(
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36260,13 +46058,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CV_HANDLER(Z
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36280,13 +46118,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CV_HANDLER(Z
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36300,13 +46178,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CV_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36320,13 +46238,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CV_HANDLE
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36340,13 +46298,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CV_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36360,13 +46358,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -36374,6 +46372,106 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDL
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CV_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CV_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -36385,20 +46483,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -36412,28 +46504,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -36441,8 +46537,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36466,20 +46561,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
-
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -36494,22 +46583,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -36518,8 +46610,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36536,15 +46627,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER
{
USE_OPLINE
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CV, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, IS_CV);
+ }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36556,18 +46668,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER
SAVE_OPLINE();
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36577,20 +46684,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLE
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36600,12 +46702,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLE
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36617,19 +46718,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
-
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
@@ -36637,18 +46733,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_
} else {
if (IS_CV == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
HANDLE_EXCEPTION();
}
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36658,21 +46753,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HAN
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
-
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = _get_zval_ptr_cv_undef_BP_VAR_UNSET(execute_data, opline->op1.var);
- HANDLE_EXCEPTION();
- }
- zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36686,8 +46775,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -36744,8 +46833,7 @@ fetch_obj_r_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36759,13 +46847,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -36776,8 +46859,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36791,13 +46873,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLE
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -36807,8 +46884,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLE
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36822,8 +46898,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLE
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -36880,8 +46956,7 @@ fetch_obj_is_no_object:
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -36898,19 +46973,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
-
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
HANDLE_EXCEPTION();
}
@@ -36920,8 +46990,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -36936,67 +47005,666 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HAN
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
-
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CV, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *object;
- zval *property_name;
+ zval *container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var));
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_CV, property_name, IS_CV, (opline+1)->op1_type, (opline+1)->op1, execute_data, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if (IS_CV == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *object_ptr;
- zend_free_op free_op_data1;
+
zval *value;
zval *variable_ptr;
zval *dim;
@@ -37004,39 +47672,213 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(
SAVE_OPLINE();
object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CV == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CV != IS_UNUSED) {
- HANDLE_EXCEPTION();
}
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if (IS_CV == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, IS_CV, BP_VAR_W);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
- }
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if (IS_CV != IS_UNUSED) {
+
+ }
+
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CV == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
}
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
@@ -37046,60 +47888,144 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zval *property_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ zend_assign_to_object_dim(object_ptr, dim, value);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if (IS_CV == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if (IS_CV != IS_UNUSED) {
- dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
+ }
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if (IS_CV == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (IS_CV == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- goto assign_dim_convert_to_array;
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if (IS_CV == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+assign_dim_error:
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
+ if (IS_CV != IS_UNUSED) {
+
+ }
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -37110,22 +48036,49 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
value = zend_assign_to_variable(variable_ptr, value, IS_CV);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ if (UNEXPECTED(0)) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *value;
+ zval *variable_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
+
+ if (UNEXPECTED(1)) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
+ }
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37137,55 +48090,48 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(
SAVE_OPLINE();
value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op2.var);
+ variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_VAR &&
+ UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
+ UNEXPECTED(!Z_ISREF_P(EX_VAR(opline->op1.var))) &&
+ UNEXPECTED(!Z_ISERROR_P(EX_VAR(opline->op1.var)))) {
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
+ zend_throw_error(NULL, "Cannot assign by reference to overloaded object");
HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR &&
- (value_ptr == &EG(uninitialized_zval) ||
- (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
- if (!0) {
- PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+
+ } else if (IS_CV == IS_VAR &&
+ opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ UNEXPECTED(!Z_ISREF_P(value_ptr))) {
zend_error(E_NOTICE, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
}
- ZEND_VM_TAIL_CALL(ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
- }
- variable_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets nor overloaded objects");
+ value_ptr = zend_assign_to_variable(variable_ptr, value_ptr, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value_ptr);
+ }
+ /* zend_assign_to_variable() always takes care of op2, never free it! */
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR &&
- UNEXPECTED(Z_TYPE_P(EX_VAR(opline->op1.var)) != IS_INDIRECT) &&
- UNEXPECTED(!Z_ISREF_P(variable_ptr))) {
- zend_throw_error(zend_ce_error, "Cannot assign by reference to overloaded object");
+ } else {
+ if ((IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(variable_ptr))) ||
+ (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(value_ptr)))) {
+ variable_ptr = &EG(uninitialized_zval);
+ } else {
+ zend_assign_to_variable_reference(variable_ptr, value_ptr);
+ }
- HANDLE_EXCEPTION();
- }
- if ((IS_CV == IS_VAR && UNEXPECTED(variable_ptr == &EG(error_zval))) ||
- (IS_CV == IS_VAR && UNEXPECTED(value_ptr == &EG(error_zval)))) {
- variable_ptr = &EG(uninitialized_zval);
- } else {
- zend_assign_to_variable_reference(variable_ptr, value_ptr);
- }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
+ }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), variable_ptr);
}
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37252,8 +48198,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37280,14 +48225,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
HANDLE_EXCEPTION();
@@ -37296,8 +48240,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
object = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -37312,12 +48256,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
}
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
HANDLE_EXCEPTION();
@@ -37333,7 +48278,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
HANDLE_EXCEPTION();
@@ -37343,7 +48288,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
@@ -37355,6 +48300,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -37372,8 +48320,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HA
EX(call) = call;
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37414,7 +48361,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_O
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
} else {
@@ -37431,6 +48378,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_O
SAVE_OPLINE();
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((IS_CV & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -37439,8 +48394,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_O
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37453,11 +48407,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_H
if ((IS_CV == IS_VAR || IS_CV == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -37466,10 +48415,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_H
if (IS_CV == IS_TMP_VAR) {
/* pass */
} else if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CV == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -37539,8 +48486,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37584,14 +48530,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(Z
zend_string *key;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ container = _get_zval_ptr_cv_undef_BP_VAR_UNSET(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -37654,23 +48595,25 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37682,13 +48625,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(Z
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
-
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -37713,8 +48651,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(Z
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37727,10 +48664,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_
zval *offset;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -37820,6 +48757,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -37851,8 +48791,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37866,8 +48805,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -37898,8 +48837,7 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -37910,7 +48848,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_
SAVE_OPLINE();
if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
- zend_throw_error(zend_ce_error, "Cannot yield from finally in a force-closed generator");
+ zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
HANDLE_EXCEPTION();
@@ -37929,33 +48867,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_
if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
/* Constants and temporary variables aren't yieldable by reference,
* but we still allow them with a notice. */
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ if (IS_CV & (IS_CONST|IS_TMP_VAR)) {
zval *value;
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
ZVAL_COPY_VALUE(&generator->value, value);
- if (IS_CV != IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
}
} else {
zval *value_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot yield string offsets by reference");
-
- HANDLE_EXCEPTION();
- }
-
/* If a function call result is yielded and the function did
* not return by reference we throw a notice. */
if (IS_CV == IS_VAR &&
(value_ptr == &EG(uninitialized_zval) ||
(opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
+ !Z_ISREF_P(value_ptr)))) {
zend_error(E_NOTICE, "Only variable references should be yielded by reference");
} else {
ZVAL_MAKE_REF(value_ptr);
@@ -37969,8 +48901,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->value, value);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
- zval_copy_ctor_func(&generator->value);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
+ Z_ADDREF(generator->value);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->value, value);
@@ -37997,8 +48929,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_
/* Consts, temporary variables and references need copying */
if (IS_CV == IS_CONST) {
ZVAL_COPY_VALUE(&generator->key, key);
- if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
- zval_copy_ctor_func(&generator->key);
+ if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
+ Z_ADDREF(generator->key);
}
} else if (IS_CV == IS_TMP_VAR) {
ZVAL_COPY_VALUE(&generator->key, key);
@@ -38043,25 +48975,52 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CV_CV_HANDLER(ZEND_
ZEND_VM_RETURN();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
- SAVE_OPLINE();
- op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (IS_CV & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_CV(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38104,8 +49063,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CV_TMPVAR_HANDLER(ZEN
add_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38148,8 +49106,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CV_TMPVAR_HANDLER(ZEN
sub_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38195,8 +49152,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CV_TMPVAR_HANDLER(ZEN
mul_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38211,8 +49167,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CV_TMPVAR_HANDLER(ZEN
fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38250,8 +49205,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_TMPVAR_HANDLER(ZEN
mod_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38266,8 +49220,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CV_TMPVAR_HANDLER(ZEND
shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38282,8 +49235,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CV_TMPVAR_HANDLER(ZEND
shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+
+ zval_ptr_dtor_nogc(free_op2);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38321,7 +49288,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER(
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -38343,8 +49310,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER(
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38385,7 +49351,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op2);
@@ -38412,8 +49378,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLE
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38454,7 +49419,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HA
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
zval_ptr_dtor_nogc(free_op2);
@@ -38481,8 +49446,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HA
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38532,8 +49496,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_TMPVAR_HAND
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38583,8 +49546,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TM
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38599,8 +49561,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDL
compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38615,8 +49576,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER(Z
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38631,8 +49591,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER(
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38647,8 +49606,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER(
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38663,8 +49621,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLE
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -38679,8 +49636,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
@@ -38688,15 +49645,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -38712,13 +49662,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
/* here we are sure we are dealing with an object */
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ } else {
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- binary_op(zptr, zptr, value);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ binary_op(zptr, zptr, value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
+ }
}
} else {
zend_assign_op_overloaded_property(object, property, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), value, binary_op, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -38729,82 +49684,105 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
zval_ptr_dtor_nogc(free_op2);
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op2, free_op_data1;
- zval *var_ptr, rv;
+ zval *var_ptr;
zval *value, *container, *dim;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (IS_CV != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+assign_dim_op_array:
+ SEPARATE_ARRAY(container);
+assign_dim_op_new_array:
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ var_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(container), &EG(uninitialized_zval));
+ if (UNEXPECTED(!var_ptr)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_op_ret_null;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- do {
- if (IS_CV == IS_UNUSED || UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
- if (IS_CV != IS_UNUSED) {
- ZVAL_DEREF(container);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ var_ptr = zend_fetch_dimension_address_inner_RW_CONST(Z_ARRVAL_P(container), dim);
+ } else {
+ var_ptr = zend_fetch_dimension_address_inner_RW(Z_ARRVAL_P(container), dim);
}
- if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
- break;
+ if (UNEXPECTED(!var_ptr)) {
+ goto assign_dim_op_ret_null;
}
+ ZVAL_DEREF(var_ptr);
+ SEPARATE_ZVAL_NOREF(var_ptr);
}
- zend_fetch_dimension_address_RW(&rv, container, dim, (IS_TMP_VAR|IS_VAR));
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- ZEND_ASSERT(Z_TYPE(rv) == IS_INDIRECT);
- var_ptr = Z_INDIRECT(rv);
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
- if (UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- FREE_OP(free_op_data1);
+ binary_op(var_ptr, var_ptr, value);
- HANDLE_EXCEPTION();
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
}
-
- if (UNEXPECTED(var_ptr == &EG(error_zval))) {
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_NULL(EX_VAR(opline->result.var));
+ } else {
+ if (IS_CV != IS_UNUSED) {
+ if (EXPECTED(Z_ISREF_P(container))) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto assign_dim_op_array;
+ }
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_RW);
+assign_dim_op_convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto assign_dim_op_new_array;
}
- } else {
- ZVAL_DEREF(var_ptr);
- SEPARATE_ZVAL_NOREF(var_ptr);
+ }
- binary_op(var_ptr, var_ptr, value);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), var_ptr);
+ if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
+ zend_binary_assign_op_obj_dim(container, dim, value, UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, binary_op);
+ } else if (IS_CV != IS_UNUSED) {
+ if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ } else {
+ zend_check_string_offset(dim, BP_VAR_RW);
+ zend_wrong_string_offset();
+ }
+ } else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
+ goto assign_dim_op_convert_to_array;
+ } else {
+ if (UNEXPECTED(IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(container)))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+assign_dim_op_ret_null:
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
}
+ value = get_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1);
}
- } while (0);
+ }
zval_ptr_dtor_nogc(free_op2);
FREE_OP(free_op_data1);
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_TMPVAR(binary_op_type binary_op ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -38818,13 +49796,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_C
value = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
var_ptr = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use assign-op operators with overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
- if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == &EG(error_zval))) {
+ if (IS_CV == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) {
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -38841,8 +49813,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_C
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -38851,13 +49822,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(add_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38871,13 +49882,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(sub_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38891,13 +49942,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mul_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38911,13 +50002,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(div_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38931,13 +50062,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_HAND
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(mod_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38951,13 +50122,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_left_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38971,13 +50182,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_HANDL
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(shift_right_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -38991,13 +50242,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_H
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(concat_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -39011,13 +50302,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_HA
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_or_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -39031,13 +50362,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_H
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_and_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -39051,13 +50422,53 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_H
USE_OPLINE
# if 0 || (IS_CV != IS_UNUSED)
- if (EXPECTED(opline->extended_value == 0)) {
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
# endif
- if (EXPECTED(opline->extended_value == ZEND_ASSIGN_DIM)) {
+ if (EXPECTED(0)) {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
- } else /* if (EXPECTED(opline->extended_value == ZEND_ASSIGN_OBJ)) */ {
+ } else /* if (EXPECTED(1)) */ {
ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(bitwise_xor_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
#else
@@ -39065,6 +50476,66 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_H
#endif
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_DIM_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(1)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(0)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_OBJ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
+ USE_OPLINE
+
+# if 0 || (IS_CV != IS_UNUSED)
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+# endif
+ if (EXPECTED(0)) {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else /* if (EXPECTED(1)) */ {
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_obj_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+#else
+ ZEND_VM_TAIL_CALL(zend_binary_assign_op_dim_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+#endif
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMPVAR(int inc ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
@@ -39076,20 +50547,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -39103,28 +50568,32 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
}
/* here we are sure we are dealing with an object */
-
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
}
} else {
- ZVAL_DEREF(zptr);
- SEPARATE_ZVAL_NOREF(zptr);
-
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ SEPARATE_ZVAL_NOREF(zptr);
+
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
- }
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), zptr);
}
} else {
zend_pre_incdec_overloaded_property(object, property, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), inc, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
@@ -39133,8 +50602,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39158,20 +50626,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
SAVE_OPLINE();
object = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot increment/decrement overloaded objects nor string offsets");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
-
do {
if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
@@ -39186,22 +50648,25 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
if (EXPECTED(Z_OBJ_HT_P(object)->get_property_ptr_ptr)
&& EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL))) != NULL)) {
-
- if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- if (inc) {
- fast_long_increment_function(zptr);
- } else {
- fast_long_decrement_function(zptr);
- }
+ if (UNEXPECTED(Z_ISERROR_P(zptr))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
} else {
- ZVAL_DEREF(zptr);
- ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
- zval_opt_copy_ctor(zptr);
- if (inc) {
- increment_function(zptr);
+ if (EXPECTED(Z_TYPE_P(zptr) == IS_LONG)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ if (inc) {
+ fast_long_increment_function(zptr);
+ } else {
+ fast_long_decrement_function(zptr);
+ }
} else {
- decrement_function(zptr);
+ ZVAL_DEREF(zptr);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), zptr);
+ zval_opt_copy_ctor(zptr);
+ if (inc) {
+ increment_function(zptr);
+ } else {
+ decrement_function(zptr);
+ }
}
}
} else {
@@ -39211,8 +50676,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39229,15 +50693,36 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_TMPVAR_HAN
{
USE_OPLINE
zend_free_op free_op2;
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (IS_CV != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, (IS_TMP_VAR|IS_VAR), BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, (IS_TMP_VAR|IS_VAR));
+ }
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39249,18 +50734,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_TMPVAR_HAN
SAVE_OPLINE();
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39270,20 +50750,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_TMPVAR_HA
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_RW(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39293,12 +50768,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_TMPVAR_HA
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39310,18 +50784,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMP
SAVE_OPLINE();
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
@@ -39330,18 +50799,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMP
} else {
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "Cannot use [] for reading");
+ zend_throw_error(NULL, "Cannot use [] for reading");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39351,21 +50819,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_TMPVAR
zval *container;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
zend_fetch_dimension_address_UNSET(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39379,8 +50841,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HAN
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -39438,8 +50900,7 @@ fetch_obj_r_no_object:
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39453,13 +50914,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HAN
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -39470,8 +50926,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HAN
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39485,13 +50940,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HA
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_zval_ptr_cv_BP_VAR_RW(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -39501,8 +50951,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HA
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39516,8 +50965,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HA
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -39575,8 +51024,7 @@ fetch_obj_is_no_object:
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39593,30 +51041,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
container = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- zend_throw_error(zend_ce_error, "Cannot use temporary expression in write context");
+ if ((IS_CV & (IS_CONST|IS_TMP_VAR))) {
+ zend_throw_error(NULL, "Cannot use temporary expression in write context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
zval_ptr_dtor_nogc(free_op2);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
}
@@ -39631,67 +51073,666 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an object");
- zval_ptr_dtor_nogc(free_op2);
- HANDLE_EXCEPTION();
- }
zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CV, property, (IS_TMP_VAR|IS_VAR), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_UNSET);
zval_ptr_dtor_nogc(free_op2);
if (IS_CV == IS_VAR && READY_TO_DESTROY(free_op1)) {
EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
- zval *object;
- zval *property_name;
+ zval *container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ zval_ptr_dtor_nogc(free_op2);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *object, *property_name, *value, tmp;
SAVE_OPLINE();
object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
- if (IS_CV == IS_VAR && UNEXPECTED(object == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- zval_ptr_dtor_nogc(free_op2);
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CONST == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CONST != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CONST == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CONST == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
- zend_assign_to_object(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object, IS_CV, property_name, (IS_TMP_VAR|IS_VAR), (opline+1)->op1_type, (opline+1)->op1, execute_data, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL));
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_TMP_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_TMP_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_TMP_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_TMP_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
zval_ptr_dtor_nogc(free_op2);
/* assign_obj has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2, free_op_data;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_VAR == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_VAR != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_VAR == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_VAR == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+ goto exit_assign_obj;
+ }
+
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ zval_ptr_dtor_nogc(free_op_data);
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval *object, *property_name, *value, tmp;
+
+ SAVE_OPLINE();
+ object = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
+ zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
+ HANDLE_EXCEPTION();
+ }
+
+ property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
+ do {
+ if (Z_ISREF_P(object)) {
+ object = Z_REFVAL_P(object);
+ if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
+ break;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE ||
+ (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
+ zend_object *obj;
+
+ zval_ptr_dtor(object);
+ object_init(object);
+ Z_ADDREF_P(object);
+ obj = Z_OBJ_P(object);
+ zend_error(E_WARNING, "Creating default object from empty value");
+ if (GC_REFCOUNT(obj) == 1) {
+ /* the enclosing container was deleted, obj is unreferenced */
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ OBJ_RELEASE(obj);
+ goto exit_assign_obj;
+ }
+ Z_DELREF_P(object);
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ }
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+ } while (0);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
+ uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
+ zend_object *zobj = Z_OBJ_P(object);
+ zval *property;
+
+ if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
+ property = OBJ_PROP(zobj, prop_offset);
+ if (Z_TYPE_P(property) != IS_UNDEF) {
+fast_assign_obj:
+ value = zend_assign_to_variable(property, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ } else {
+ if (EXPECTED(zobj->properties != NULL)) {
+ if (UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) {
+ if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(zobj->properties)--;
+ }
+ zobj->properties = zend_array_dup(zobj->properties);
+ }
+ property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
+ if (property) {
+ goto fast_assign_obj;
+ }
+ }
+
+ if (!zobj->ce->__set) {
+
+ if (EXPECTED(zobj->properties == NULL)) {
+ rebuild_object_properties(zobj);
+ }
+ if (IS_CV == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
+ }
+ } else if (IS_CV != IS_TMP_VAR) {
+ if (Z_ISREF_P(value)) {
+ if (IS_CV == IS_VAR) {
+ zend_reference *ref = Z_REF_P(value);
+ if (--GC_REFCOUNT(ref) == 0) {
+ ZVAL_COPY_VALUE(&tmp, Z_REFVAL_P(value));
+ efree_size(ref, sizeof(zend_reference));
+ value = &tmp;
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else {
+ value = Z_REFVAL_P(value);
+ if (Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ } else if (IS_CV == IS_CV && Z_REFCOUNTED_P(value)) {
+ Z_ADDREF_P(value);
+ }
+ }
+ zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ goto exit_assign_obj;
+ }
+ }
+ }
+
+ if (!Z_OBJ_HT_P(object)->write_property) {
+ zend_error(E_WARNING, "Attempt to assign property of non-object");
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+
+ goto exit_assign_obj;
+ }
+
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ ZVAL_DEREF(value);
+ }
+
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+exit_assign_obj:
+ zval_ptr_dtor_nogc(free_op2);
+
+ /* assign_obj has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *object_ptr;
- zend_free_op free_op2, free_op_data1;
+ zend_free_op free_op2;
zval *value;
zval *variable_ptr;
zval *dim;
@@ -39699,40 +51740,214 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_HAND
SAVE_OPLINE();
object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use string offset as an array");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = EX_CONSTANT((opline+1)->op1);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CONST);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = EX_CONSTANT((opline+1)->op1);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+assign_dim_error:
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
}
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op2, free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- SEPARATE_ARRAY(object_ptr);
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
if (UNEXPECTED(variable_ptr == NULL)) {
zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- variable_ptr = &EG(error_zval);
+ goto assign_dim_error;
}
} else {
dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- SEPARATE_ARRAY(object_ptr);
- variable_ptr = zend_fetch_dimension_address_inner(Z_ARRVAL_P(object_ptr), dim, (IS_TMP_VAR|IS_VAR), BP_VAR_W);
- zval_ptr_dtor_nogc(free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+ goto try_assign_dim_array;
+ }
}
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- if (UNEXPECTED(variable_ptr == &EG(error_zval))) {
- FREE_OP(free_op_data1);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
+ }
+ }
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
+
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op2, free_op_data;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
} else {
- value = zend_assign_to_variable(variable_ptr, value, (opline+1)->op1_type);
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
+ } else {
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
}
}
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
+ value = zend_assign_to_variable(variable_ptr, value, IS_VAR);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
} else {
if (EXPECTED(Z_ISREF_P(object_ptr))) {
object_ptr = Z_REFVAL_P(object_ptr);
@@ -39741,57 +51956,141 @@ try_assign_dim_array:
}
}
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
- zend_free_op free_op2;
- zval *property_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data);
- zend_assign_to_object_dim(UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL, object_ptr, property_name, (opline+1)->op1_type, (opline+1)->op1, execute_data);
- zval_ptr_dtor_nogc(free_op2);
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+
+ zval_ptr_dtor_nogc(free_op_data);
} else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
- if (EXPECTED(Z_STRLEN_P(object_ptr) != 0)) {
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
- zend_throw_error(zend_ce_error, "[] operator not supported for strings");
- FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
- HANDLE_EXCEPTION();
- } else {
- zend_long offset;
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+ zval_ptr_dtor_nogc(free_op_data);
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
+ } else {
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+assign_dim_error:
+ zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var));
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ }
+ }
+ }
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
- dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- offset = zend_fetch_string_offset(object_ptr, dim, BP_VAR_W);
- zval_ptr_dtor_nogc(free_op2);
- value = get_zval_ptr_deref((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- zend_assign_to_string_offset(object_ptr, offset, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
- FREE_OP(free_op_data1);
- }
+ /* assign_dim has two opcodes! */
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *object_ptr;
+ zend_free_op free_op2;
+ zval *value;
+ zval *variable_ptr;
+ zval *dim;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->op1.var);
+
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
+try_assign_dim_array:
+ SEPARATE_ARRAY(object_ptr);
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), &EG(uninitialized_zval));
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ goto assign_dim_error;
+ }
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ variable_ptr = zend_fetch_dimension_address_inner_W_CONST(Z_ARRVAL_P(object_ptr), dim);
} else {
- zval_ptr_dtor_nogc(object_ptr);
-assign_dim_convert_to_array:
- ZVAL_NEW_ARR(object_ptr);
- zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ variable_ptr = zend_fetch_dimension_address_inner_W(Z_ARRVAL_P(object_ptr), dim);
+ }
+ if (UNEXPECTED(variable_ptr == NULL)) {
+ goto assign_dim_error;
+ }
+ }
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ value = zend_assign_to_variable(variable_ptr, value, IS_CV);
+ if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ }
+ } else {
+ if (EXPECTED(Z_ISREF_P(object_ptr))) {
+ object_ptr = Z_REFVAL_P(object_ptr);
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
goto try_assign_dim_array;
}
- } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
- if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == &EG(error_zval))) {
- goto assign_dim_clean;
+ }
+ if (EXPECTED(Z_TYPE_P(object_ptr) == IS_OBJECT)) {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_BP_VAR_R(execute_data, (opline+1)->op1.var);
+
+ zend_assign_to_object_dim(object_ptr, dim, value);
+
+ if (UNEXPECTED(RETURN_VALUE_USED(opline)) && EXPECTED(!EG(exception))) {
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
}
- goto assign_dim_convert_to_array;
+
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
+ zend_throw_error(NULL, "[] operator not supported for strings");
+
+
+ HANDLE_EXCEPTION();
+ } else {
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ value = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, (opline+1)->op1.var);
+ zend_assign_to_string_offset(object_ptr, dim, value, (UNEXPECTED(RETURN_VALUE_USED(opline)) ? EX_VAR(opline->result.var) : NULL));
+
+ }
+ } else if (EXPECTED(Z_TYPE_P(object_ptr) <= IS_FALSE)) {
+ ZVAL_NEW_ARR(object_ptr);
+ zend_hash_init(Z_ARRVAL_P(object_ptr), 8, NULL, ZVAL_PTR_DTOR, 0);
+ goto try_assign_dim_array;
} else {
- zend_error(E_WARNING, "Cannot use a scalar value as an array");
-assign_dim_clean:
+ if (IS_CV != IS_VAR || EXPECTED(!Z_ISERROR_P(object_ptr))) {
+ zend_error(E_WARNING, "Cannot use a scalar value as an array");
+ }
dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- zval_ptr_dtor_nogc(free_op2);
- value = get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data1, BP_VAR_R);
- FREE_OP(free_op_data1);
+assign_dim_error:
+
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
}
}
+ if ((IS_TMP_VAR|IS_VAR) != IS_UNUSED) {
+ zval_ptr_dtor_nogc(free_op2);
+ }
/* assign_dim has two opcodes! */
- CHECK_EXCEPTION();
- ZEND_VM_INC_OPCODE();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_EX(1, 2);
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39858,8 +52157,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HAN
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -39886,14 +52184,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -39902,8 +52199,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
object = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -39918,12 +52215,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
}
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor_nogc(free_op2);
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -39939,7 +52237,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
@@ -39949,7 +52247,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op2);
@@ -39961,6 +52259,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -39979,8 +52280,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVA
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40021,7 +52321,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_TMPVAR_HANDLER(ZE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op2);
} else {
@@ -40038,6 +52338,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_TMPVAR_HANDLER(ZE
SAVE_OPLINE();
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if ((IS_CV & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -40046,8 +52354,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CV_TMPVAR_HANDLER(ZE
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40060,11 +52367,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPV
if ((IS_CV == IS_VAR || IS_CV == IS_CV) &&
UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
expr_ptr = _get_zval_ptr_cv_BP_VAR_W(execute_data, opline->op1.var);
- if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot create references to/from string offsets");
- zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
- HANDLE_EXCEPTION();
- }
ZVAL_MAKE_REF(expr_ptr);
Z_ADDREF_P(expr_ptr);
@@ -40073,10 +52375,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPV
if (IS_CV == IS_TMP_VAR) {
/* pass */
} else if (IS_CV == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
- ZVAL_COPY_VALUE(&new_expr, expr_ptr);
- zval_copy_ctor_func(&new_expr);
- expr_ptr = &new_expr;
+ if (Z_REFCOUNTED_P(expr_ptr)) {
+ Z_ADDREF_P(expr_ptr);
}
} else if (IS_CV == IS_CV) {
ZVAL_DEREF(expr_ptr);
@@ -40146,8 +52446,7 @@ num_index:
} else {
zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40191,14 +52490,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDL
zend_string *key;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ container = _get_zval_ptr_cv_undef_BP_VAR_UNSET(execute_data, opline->op1.var);
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -40261,24 +52555,26 @@ num_index_dim:
goto unset_dim_array;
}
}
+ if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ container = GET_OP1_UNDEF_CV(container, BP_VAR_R);
+ }
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
}
if (IS_CV == IS_UNUSED || EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
if (UNEXPECTED(Z_OBJ_HT_P(container)->unset_dimension == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot use object as array");
+ zend_throw_error(NULL, "Cannot use object as array");
} else {
Z_OBJ_HT_P(container)->unset_dimension(container, offset);
}
} else if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ zend_throw_error(NULL, "Cannot unset string offsets");
}
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40290,13 +52586,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDL
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
- zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
- HANDLE_EXCEPTION();
- }
- if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
- zend_throw_error(zend_ce_error, "Cannot unset string offsets");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -40322,8 +52613,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDL
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40336,10 +52626,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_
zval *offset;
SAVE_OPLINE();
- container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -40429,6 +52719,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -40460,8 +52753,7 @@ isset_dim_obj_exit:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40475,8 +52767,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV
SAVE_OPLINE();
container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var);
- if (IS_CV == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if (IS_CV == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -40508,29 +52800,55 @@ isset_no_object:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op2;
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
- SAVE_OPLINE();
- op1 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var);
- op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ container = _get_zval_ptr_cv_undef(execute_data, opline->op1.var);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if (IS_CV & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
- zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
-}
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- ZEND_VM_TAIL_CALL(zend_binary_assign_op_helper_SPEC_CV_TMPVAR(pow_function ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40542,8 +52860,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMPVAR_HANDLER(ZEN
bitwise_not_function(EX_VAR(opline->result.var),
_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1));
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40556,17 +52873,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER(Z
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_FALSE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_TRUE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), !i_zend_is_true(val));
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -40598,8 +52915,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ECHO_SPEC_TMPVAR_HANDLER(ZEND_
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40614,11 +52930,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_TMPVAR_HANDLER(ZEND_
ZEND_VM_SET_NEXT_OPCODE(opline + 1);
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
} else {
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
@@ -40651,16 +52965,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_SPEC_TMPVAR_HANDLER(ZEND
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -40772,16 +53082,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER(Z
ZEND_VM_CONTINUE();
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CV) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
- SAVE_OPLINE();
- GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
- }
- ZEND_VM_NEXT_OPCODE();
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ SAVE_OPLINE();
+ GET_OP1_UNDEF_CV(val, BP_VAR_R);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} else {
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
+ ZEND_VM_NEXT_OPCODE();
}
}
@@ -40807,8 +53113,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FREE_SPEC_TMPVAR_HANDLER(ZEND_
SAVE_OPLINE();
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FREE_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -40822,7 +53127,23 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FREE_SPEC_TMPVAR_HANDLER(ZE
zend_hash_iterator_del(Z_FE_ITER_P(var));
}
zval_ptr_dtor_nogc(var);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *value, *arg;
+ zend_free_op free_op1;
+
+ value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, value);
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
+ Z_ADDREF_P(arg);
+ }
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -40836,17 +53157,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_SPEC_TMPVAR_HANDLER(ZEND_
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_TRUE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
- if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
+ ZVAL_FALSE(EX_VAR(opline->result.var));
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
SAVE_OPLINE();
GET_OP1_UNDEF_CV(val, BP_VAR_R);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
- ZVAL_FALSE(EX_VAR(opline->result.var));
} else {
SAVE_OPLINE();
ZVAL_BOOL(EX_VAR(opline->result.var), i_zend_is_true(val));
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@@ -40856,15 +53177,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_TMPVAR_HANDLER(ZEND
USE_OPLINE
zend_free_op free_op1;
zval *obj;
- zend_class_entry *ce;
+ zend_class_entry *ce, *scope;
zend_function *clone;
zend_object_clone_obj_t clone_call;
SAVE_OPLINE();
obj = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(obj) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -40879,146 +53200,73 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_TMPVAR_HANDLER(ZEND
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
GET_OP1_UNDEF_CV(obj, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "__clone method called on non-object");
+ zend_throw_error(NULL, "__clone method called on non-object");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
}
} while (0);
ce = Z_OBJCE_P(obj);
- clone = ce ? ce->clone : NULL;
- clone_call = Z_OBJ_HT_P(obj)->clone_obj;
+ clone = ce->clone;
+ clone_call = Z_OBJ_HT_P(obj)->clone_obj;
if (UNEXPECTED(clone_call == NULL)) {
- if (ce) {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
- } else {
- zend_throw_error(zend_ce_error, "Trying to clone an uncloneable object");
- }
+ zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name));
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
}
- if (ce && clone) {
+ if (clone) {
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (UNEXPECTED(ce != EG(scope))) {
- zend_throw_error(zend_ce_error, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(ce != scope)) {
+ zend_throw_error(NULL, "Call to private %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
- zend_throw_error(zend_ce_error, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), EG(scope) ? ZSTR_VAL(EG(scope)->name) : "");
+ scope = EX(func)->op_array.scope;
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), scope))) {
+ zend_throw_error(NULL, "Call to protected %s::__clone() from context '%s'", ZSTR_VAL(ce->name), scope ? ZSTR_VAL(scope->name) : "");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
}
}
}
- if (EXPECTED(EG(exception) == NULL)) {
- ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
- if (UNEXPECTED(!RETURN_VALUE_USED(opline)) || UNEXPECTED(EG(exception) != NULL)) {
- OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
- }
+ ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
}
+
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
- zend_op_array *new_op_array=NULL;
+ zend_op_array *new_op_array;
zend_free_op free_op1;
zval *inc_filename;
- zval tmp_inc_filename;
- zend_bool failure_retval=0;
SAVE_OPLINE();
inc_filename = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
-
- ZVAL_UNDEF(&tmp_inc_filename);
- if (Z_TYPE_P(inc_filename) != IS_STRING) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(inc_filename) == IS_UNDEF)) {
- inc_filename = GET_OP1_UNDEF_CV(inc_filename, BP_VAR_R);
- }
- ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
- inc_filename = &tmp_inc_filename;
- }
-
- if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- } else {
- switch (opline->extended_value) {
- case ZEND_INCLUDE_ONCE:
- case ZEND_REQUIRE_ONCE: {
- zend_file_handle file_handle;
- zend_string *resolved_path;
-
- resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename));
- if (resolved_path) {
- failure_retval = zend_hash_exists(&EG(included_files), resolved_path);
- } else {
- resolved_path = zend_string_copy(Z_STR_P(inc_filename));
- }
-
- if (failure_retval) {
- /* do nothing, file already included */
- } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
-
- if (!file_handle.opened_path) {
- file_handle.opened_path = zend_string_copy(resolved_path);
- }
-
- if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
- new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
- zend_destroy_file_handle(&file_handle);
- } else {
- zend_file_handle_dtor(&file_handle);
- failure_retval=1;
- }
- } else {
- if (opline->extended_value == ZEND_INCLUDE_ONCE) {
- zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
- } else {
- zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
- }
- }
- zend_string_release(resolved_path);
- }
- break;
- case ZEND_INCLUDE:
- case ZEND_REQUIRE:
- new_op_array = compile_filename(opline->extended_value, inc_filename);
- break;
- case ZEND_EVAL: {
- char *eval_desc = zend_make_compiled_string_description("eval()'d code");
-
- new_op_array = zend_compile_string(inc_filename, eval_desc);
- efree(eval_desc);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp_inc_filename));
- }
+ new_op_array = zend_include_or_eval(inc_filename, opline->extended_value);
zval_ptr_dtor_nogc(free_op1);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
+ } else if (new_op_array == ZEND_FAKE_OP_ARRAY) {
+ if (RETURN_VALUE_USED(opline)) {
+ ZVAL_TRUE(EX_VAR(opline->result.var));
+ }
} else if (EXPECTED(new_op_array != NULL)) {
zval *return_value = NULL;
zend_execute_data *call;
@@ -41027,19 +53275,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HA
return_value = EX_VAR(opline->result.var);
}
- new_op_array->scope = EG(scope);
+ new_op_array->scope = EX(func)->op_array.scope;
- call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE,
- (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)));
+ call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
+ (zend_function*)new_op_array, 0,
+ Z_TYPE(EX(This)) != IS_OBJECT ? Z_CE(EX(This)) : NULL,
+ Z_TYPE(EX(This)) == IS_OBJECT ? Z_OBJ(EX(This)) : NULL);
- if (EX(symbol_table)) {
+ if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
call->symbol_table = EX(symbol_table);
} else {
call->symbol_table = zend_rebuild_symbol_table();
}
call->prev_execute_data = execute_data;
- i_init_code_execute_data(call, new_op_array, return_value);
+ i_init_code_execute_data(call, new_op_array, return_value);
if (EXPECTED(zend_execute_ex == execute_ex)) {
ZEND_VM_ENTER();
} else {
@@ -41054,17 +53304,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HA
zend_throw_exception_internal(NULL);
HANDLE_EXCEPTION();
}
-
} else if (RETURN_VALUE_USED(opline)) {
- ZVAL_BOOL(EX_VAR(opline->result.var), failure_retval);
+ ZVAL_FALSE(EX_VAR(opline->result.var));
}
- ZEND_VM_INTERRUPT_CHECK();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_SET_OPCODE(opline + 1);
+ ZEND_VM_CONTINUE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || ((IS_TMP_VAR|IS_VAR) != IS_UNUSED)
USE_OPLINE
SAVE_OPLINE();
@@ -41088,7 +53336,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_TMPVAR_HANDLER(ZEND_
} while (0);
zval_ptr_dtor_nogc(free_op1);
}
-#endif
zend_bailout();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
@@ -41133,8 +53380,7 @@ try_strlen:
} while (0);
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41177,8 +53423,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_TMPVAR_CONST_HANDLER(
add_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41221,8 +53466,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_TMPVAR_CONST_HANDLER(
sub_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41268,8 +53512,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_TMPVAR_CONST_HANDLER(
mul_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41284,8 +53527,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER(
fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41323,8 +53565,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER(
mod_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41339,8 +53580,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_CONST_HANDLER(Z
shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41355,8 +53595,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_CONST_HANDLER(Z
shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = EX_CONSTANT(opline->op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+ zval_ptr_dtor_nogc(free_op1);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41394,7 +53648,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -41416,8 +53670,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL
zval_ptr_dtor_nogc(free_op1);
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41458,7 +53711,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HAN
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op1);
@@ -41485,8 +53738,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HAN
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41527,7 +53779,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
zval_ptr_dtor_nogc(free_op1);
@@ -41554,8 +53806,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41605,8 +53856,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMPVAR_CONST_H
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41656,8 +53906,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVA
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41672,8 +53921,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HA
compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41688,8 +53936,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLE
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41704,8 +53951,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDL
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41720,8 +53966,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDL
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41736,18 +53981,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HAN
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op1;
zval *varname;
zval *retval;
zend_string *name;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -41764,121 +54008,75 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
+ if (IS_CONST == IS_CONST) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- zend_string_release(name);
- }
- zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
}
-
- goto fetch_var_return;
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
- }
-
- zval_ptr_dtor_nogc(free_op1);
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
}
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
- zval_ptr_dtor_nogc(free_op1);
+
+ goto fetch_static_prop_return;
}
}
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
+
+ zval_ptr_dtor_nogc(free_op1);
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
+fetch_static_prop_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -41888,59 +54086,79 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
+ dim = EX_CONSTANT(opline->op2);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CONST, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, IS_CONST);
+ }
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41954,8 +54172,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CONST
zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -41969,8 +54186,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -42027,8 +54244,7 @@ fetch_obj_is_no_object:
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42039,41 +54255,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_H
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2));
-try_fetch_list:
- if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
- zval *value = zend_hash_index_find(Z_ARRVAL_P(container), Z_LVAL_P(EX_CONSTANT(opline->op2)));
-
- if (UNEXPECTED(value == NULL)) {
- zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, Z_LVAL_P(EX_CONSTANT(opline->op2)));
- ZVAL_NULL(EX_VAR(opline->result.var));
- } else {
- ZVAL_COPY(EX_VAR(opline->result.var), value);
- }
- } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST &&
- UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
- EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
- zval *result = EX_VAR(opline->result.var);
- zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, EX_CONSTANT(opline->op2), BP_VAR_R, result);
-
- if (retval) {
- if (result != retval) {
- ZVAL_COPY(result, retval);
- }
- } else {
- ZVAL_NULL(result);
- }
- } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_TYPE_P(container) == IS_REFERENCE) {
- container = Z_REFVAL_P(container);
- goto try_fetch_list;
- } else {
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(container, BP_VAR_R);
- }
- ZVAL_NULL(EX_VAR(opline->result.var));
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42140,8 +54324,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42168,14 +54351,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -42184,8 +54366,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
object = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -42200,12 +54382,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
}
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
@@ -42221,7 +54404,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
@@ -42231,7 +54414,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op1);
@@ -42243,6 +54426,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -42261,8 +54447,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42303,7 +54488,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
} else {
@@ -42320,6 +54505,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER
SAVE_OPLINE();
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -42328,39 +54521,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval tmp, *varname;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
zend_free_op free_op1;
SAVE_OPLINE();
- if ((IS_TMP_VAR|IS_VAR) == IS_CV &&
- IS_CONST == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- zval *var = EX_VAR(opline->op1.var);
-
- if (Z_REFCOUNTED_P(var)) {
- zend_refcounted *garbage = Z_COUNTED_P(var);
-
- if (!--GC_REFCOUNT(garbage)) {
- ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
- } else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
- }
- } else {
- ZVAL_UNDEF(var);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -42373,151 +54544,126 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_CONST_HA
varname = &tmp;
}
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
+ if (IS_CONST == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value;
int result;
+ zend_free_op free_op1;
+ zval tmp, *varname;
+ zend_class_entry *ce;
- if ((IS_TMP_VAR|IS_VAR) == IS_CV &&
- IS_CONST == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- value = EX_VAR(opline->op1.var);
- if (opline->extended_value & ZEND_ISSET) {
- result =
- Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- SAVE_OPLINE();
- result = !i_zend_is_true(value);
- if (UNEXPECTED(EG(exception))) {
- HANDLE_EXCEPTION();
- }
- }
- ZEND_VM_SMART_BRANCH(result, 0);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
- } else {
- zend_free_op free_op1;
- zval tmp, *varname;
-
- SAVE_OPLINE();
- varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- ZVAL_UNDEF(&tmp);
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- ZVAL_STR(&tmp, zval_get_string(varname));
- varname = &tmp;
- }
-
- if (IS_CONST != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_CONST == IS_CONST) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
-
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ ZVAL_UNDEF(&tmp);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ if (IS_CONST == IS_CONST) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto is_var_return;
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
-
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
- zval_ptr_dtor_nogc(free_op1);
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
}
+
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
+ }
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42532,8 +54678,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMP
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -42623,6 +54769,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -42654,8 +54803,7 @@ isset_dim_obj_exit:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42669,8 +54817,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -42701,8 +54849,7 @@ isset_no_object:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -42720,18 +54867,23 @@ try_instanceof:
zend_class_entry *ce;
if (IS_CONST == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
if (UNEXPECTED(ce == NULL)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
+ } else if (IS_CONST == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op2.var));
}
@@ -42748,34 +54900,65 @@ try_instanceof:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
+
+ container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ dim = EX_CONSTANT(opline->op2);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
SAVE_OPLINE();
- op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- op2 = EX_CONSTANT(opline->op2);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
zval_ptr_dtor_nogc(free_op1);
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
{
USE_OPLINE
zend_free_op free_op1;
zval *varname;
zval *retval;
zend_string *name;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
SAVE_OPLINE();
varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -42792,121 +54975,75 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
+ if (IS_VAR == IS_CONST) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- zend_string_release(name);
- }
- zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
}
-
- goto fetch_var_return;
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
- }
-
- zval_ptr_dtor_nogc(free_op1);
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
}
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
- zval_ptr_dtor_nogc(free_op1);
+
+ goto fetch_static_prop_return;
+ }
+ }
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
}
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
+
+ zval_ptr_dtor_nogc(free_op1);
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
+fetch_static_prop_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -42916,75 +55053,53 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
} else {
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval tmp, *varname;
- HashTable *target_symbol_table;
+ zend_class_entry *ce;
zend_free_op free_op1;
SAVE_OPLINE();
- if ((IS_TMP_VAR|IS_VAR) == IS_CV &&
- IS_VAR == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- zval *var = EX_VAR(opline->op1.var);
-
- if (Z_REFCOUNTED_P(var)) {
- zend_refcounted *garbage = Z_COUNTED_P(var);
-
- if (!--GC_REFCOUNT(garbage)) {
- ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
- } else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
- }
- } else {
- ZVAL_UNDEF(var);
- }
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -42997,151 +55112,126 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_VAR_HAND
varname = &tmp;
}
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
+ if (IS_VAR == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zval *value;
int result;
+ zend_free_op free_op1;
+ zval tmp, *varname;
+ zend_class_entry *ce;
- if ((IS_TMP_VAR|IS_VAR) == IS_CV &&
- IS_VAR == IS_UNUSED &&
- (opline->extended_value & ZEND_QUICK_SET)) {
- value = EX_VAR(opline->op1.var);
- if (opline->extended_value & ZEND_ISSET) {
- result =
- Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- SAVE_OPLINE();
- result = !i_zend_is_true(value);
- if (UNEXPECTED(EG(exception))) {
- HANDLE_EXCEPTION();
- }
- }
- ZEND_VM_SMART_BRANCH(result, 0);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- ZEND_VM_SET_NEXT_OPCODE(opline + 1);
- ZEND_VM_CONTINUE();
- } else {
- zend_free_op free_op1;
- zval tmp, *varname;
-
- SAVE_OPLINE();
- varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- ZVAL_UNDEF(&tmp);
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- ZVAL_STR(&tmp, zval_get_string(varname));
- varname = &tmp;
- }
-
- if (IS_VAR != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_VAR == IS_CONST) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
-
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ ZVAL_UNDEF(&tmp);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
+ if (IS_VAR == IS_CONST) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
- goto is_var_return;
- }
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
}
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
-
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
} else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
- zval_ptr_dtor_nogc(free_op1);
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
-is_var_return:
- if (opline->extended_value & ZEND_ISSET) {
- result = value && Z_TYPE_P(value) > IS_NULL &&
- (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
- } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- result = !value || !i_zend_is_true(value);
+ goto is_static_prop_return;
}
+ }
- ZEND_VM_SMART_BRANCH(result, 1);
- ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
}
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMPVAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43159,18 +55249,23 @@ try_instanceof:
zend_class_entry *ce;
if (IS_VAR == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
if (UNEXPECTED(ce == NULL)) {
ZVAL_FALSE(EX_VAR(opline->result.var));
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
}
+ } else if (IS_VAR == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
} else {
ce = Z_CE_P(EX_VAR(opline->op2.var));
}
@@ -43187,8 +55282,7 @@ try_instanceof:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
@@ -43215,66 +55309,30 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
name = zval_get_string(varname);
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_UNUSED == IS_CONST) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
-
- goto fetch_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- zend_string_release(name);
- }
- zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
- (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- zend_throw_error(zend_ce_error, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
-
- goto fetch_var_return;
- }
- }
- retval = zend_std_get_static_property(ce, name, 0);
- if (UNEXPECTED(EG(exception))) {
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ retval = zend_hash_find(target_symbol_table, name);
+ if (retval == NULL) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
+ retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ case BP_VAR_W:
+ retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
}
-
- zval_ptr_dtor_nogc(free_op1);
- } else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- retval = zend_hash_find(target_symbol_table, name);
- if (retval == NULL) {
+ /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
+ } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
+ retval = Z_INDIRECT_P(retval);
+ if (Z_TYPE_P(retval) == IS_UNDEF) {
switch (type) {
case BP_VAR_R:
case BP_VAR_UNSET:
@@ -43287,49 +55345,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_
zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
/* break missing intentionally */
case BP_VAR_W:
- retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
+ ZVAL_NULL(retval);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
- /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
- } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
- retval = Z_INDIRECT_P(retval);
- if (Z_TYPE_P(retval) == IS_UNDEF) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
- /* break missing intentionally */
- case BP_VAR_W:
- ZVAL_NULL(retval);
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- }
- if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
- if (Z_CONSTANT_P(retval)) {
- if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
- }
- }
- } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
- zval_ptr_dtor_nogc(free_op1);
}
}
+ if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
+ zval_ptr_dtor_nogc(free_op1);
+ }
+
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
zend_string_release(name);
}
-fetch_var_return:
ZEND_ASSERT(retval != NULL);
if (type == BP_VAR_R || type == BP_VAR_IS) {
if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
@@ -43339,8 +55369,7 @@ fetch_var_return:
} else {
ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43379,6 +55408,147 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMPVAR_UNUSED_HA
ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_TMPVAR_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval *retval;
+ zend_string *name;
+ zend_class_entry *ce;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
+ name = Z_STR_P(varname);
+ } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
+ name = Z_STR_P(varname);
+ zend_string_addref(name);
+ } else {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ name = zval_get_string(varname);
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+
+ goto fetch_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+
+ goto fetch_static_prop_return;
+ }
+ }
+ retval = zend_std_get_static_property(ce, name, 0);
+ if (UNEXPECTED(EG(exception))) {
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
+ }
+
+ zval_ptr_dtor_nogc(free_op1);
+
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ zend_string_release(name);
+ }
+
+fetch_static_prop_return:
+ ZEND_ASSERT(retval != NULL);
+ if (type == BP_VAR_R || type == BP_VAR_IS) {
+ if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
+ ZVAL_UNREF(retval);
+ }
+ ZVAL_COPY(EX_VAR(opline->result.var), retval);
+ } else {
+ ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
+ }
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ } else {
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+ }
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_TMPVAR_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -43388,7 +55558,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_H
SAVE_OPLINE();
if ((IS_TMP_VAR|IS_VAR) == IS_CV &&
- IS_UNUSED == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
zval *var = EX_VAR(opline->op1.var);
@@ -43397,16 +55566,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_H
if (!--GC_REFCOUNT(garbage)) {
ZVAL_UNDEF(var);
- zval_dtor_func_for_ptr(garbage);
+ zval_dtor_func(garbage);
} else {
- GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
- ZVAL_UNDEF(var);
+ zval *z = var;
+ ZVAL_DEREF(z);
+ if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
+ ZVAL_UNDEF(var);
+ gc_possible_root(Z_COUNTED_P(z));
+ } else {
+ ZVAL_UNDEF(var);
+ }
}
} else {
ZVAL_UNDEF(var);
}
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -43420,45 +55594,72 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_H
varname = &tmp;
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
- if (IS_UNUSED == IS_CONST) {
- if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(EG(exception) != NULL)) {
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
- zend_string_release(Z_STR(tmp));
- }
- zval_ptr_dtor_nogc(free_op1);
- HANDLE_EXCEPTION();
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ zend_class_entry *ce;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+
+ varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+ ZVAL_UNDEF(&tmp);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
+ varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
+ }
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ if (EXPECTED(!EG(exception))) {
+ zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
}
- if (UNEXPECTED(ce == NULL)) {
- zend_throw_error(zend_ce_error, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
- if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
- zend_string_release(Z_STR(tmp));
- }
- HANDLE_EXCEPTION();
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
}
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
}
- zend_std_unset_static_property(ce, Z_STR_P(varname));
} else {
- target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
}
+ zend_std_unset_static_property(ce, Z_STR_P(varname));
if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43468,7 +55669,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_
int result;
if ((IS_TMP_VAR|IS_VAR) == IS_CV &&
- IS_UNUSED == IS_UNUSED &&
(opline->extended_value & ZEND_QUICK_SET)) {
value = EX_VAR(opline->op1.var);
if (opline->extended_value & ZEND_ISSET) {
@@ -43489,6 +55689,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_
} else {
zend_free_op free_op1;
zval tmp, *varname;
+ HashTable *target_symbol_table;
SAVE_OPLINE();
varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
@@ -43498,61 +55699,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_
varname = &tmp;
}
- if (IS_UNUSED != IS_UNUSED) {
- zend_class_entry *ce;
-
- if (IS_UNUSED == IS_CONST) {
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
-
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
- value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
-
- goto is_var_return;
- } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
- ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
- } else {
- ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
- if (UNEXPECTED(ce == NULL)) {
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
- }
- CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
- }
- } else {
- ce = Z_CE_P(EX_VAR(opline->op2.var));
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
- (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
-
- /* check if static properties were destoyed */
- if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
- value = NULL;
- }
-
- goto is_var_return;
- }
- }
-
- value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
-
- if ((IS_TMP_VAR|IS_VAR) == IS_CONST && value) {
- CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
- }
- } else {
- HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
- value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
- }
+ target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
+ value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
zend_string_release(Z_STR(tmp));
}
zval_ptr_dtor_nogc(free_op1);
-is_var_return:
if (opline->extended_value & ZEND_ISSET) {
result = value && Z_TYPE_P(value) > IS_NULL &&
(!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
@@ -43562,11 +55716,145 @@ is_var_return:
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
}
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *value;
+ int result;
+ zend_free_op free_op1;
+ zval tmp, *varname;
+ zend_class_entry *ce;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ ZVAL_UNDEF(&tmp);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_STR(&tmp, zval_get_string(varname));
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED == IS_CONST) {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
+ value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
+
+ goto is_static_prop_return;
+ } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else {
+ if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST &&
+ (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
+
+ /* check if static properties were destoyed */
+ if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
+ value = NULL;
+ }
+
+ goto is_static_prop_return;
+ }
+ }
+
+ value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
+
+ if ((IS_TMP_VAR|IS_VAR) == IS_CONST && value) {
+ CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
+ }
+
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
+ zend_string_release(Z_STR(tmp));
+ }
+ zval_ptr_dtor_nogc(free_op1);
+
+is_static_prop_return:
+ if (opline->extended_value & ZEND_ISSET) {
+ result = value && Z_TYPE_P(value) > IS_NULL &&
+ (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ result = !value || !i_zend_is_true(value);
+ }
+
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *expr;
+ zend_bool result;
+
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+
+try_instanceof:
+ if (Z_TYPE_P(expr) == IS_OBJECT) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
+ if (UNEXPECTED(ce == NULL)) {
+ ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
+ if (UNEXPECTED(ce == NULL)) {
+ ZVAL_FALSE(EX_VAR(opline->result.var));
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+ CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
+ }
+ } else if (IS_UNUSED == IS_UNUSED) {
+ ce = zend_fetch_class(NULL, opline->op2.num);
+ if (UNEXPECTED(ce == NULL)) {
+ ZEND_ASSERT(EG(exception));
+ zval_ptr_dtor_nogc(free_op1);
+ HANDLE_EXCEPTION();
+ }
+ } else {
+ ce = Z_CE_P(EX_VAR(opline->op2.var));
+ }
+ result = ce && instanceof_function(Z_OBJCE_P(expr), ce);
+ } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_TYPE_P(expr) == IS_REFERENCE) {
+ expr = Z_REFVAL_P(expr);
+ goto try_instanceof;
+ } else {
+ if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(expr) == IS_UNDEF)) {
+ GET_OP1_UNDEF_CV(expr, BP_VAR_R);
+ }
+ result = 0;
+ }
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_SMART_BRANCH(result, 1);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
@@ -43607,8 +55895,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_TMPVAR_CV_HANDLER(ZEN
add_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43651,8 +55938,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_TMPVAR_CV_HANDLER(ZEN
sub_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43698,8 +55984,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_TMPVAR_CV_HANDLER(ZEN
mul_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43714,8 +55999,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_CV_HANDLER(ZEN
fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43753,8 +56037,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_CV_HANDLER(ZEN
mod_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43769,8 +56052,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_CV_HANDLER(ZEND
shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43785,8 +56067,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_CV_HANDLER(ZEND
shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+ zval_ptr_dtor_nogc(free_op1);
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43824,7 +56120,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER(
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -43846,8 +56142,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER(
zval_ptr_dtor_nogc(free_op1);
} while (0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43888,7 +56183,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op1);
@@ -43915,8 +56210,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLE
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -43957,7 +56251,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HA
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
zval_ptr_dtor_nogc(free_op1);
@@ -43984,8 +56278,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HA
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44035,8 +56328,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMPVAR_CV_HAND
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44086,8 +56378,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVA
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44102,8 +56393,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDL
compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44118,8 +56408,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER(Z
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44134,8 +56423,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER(
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44150,8 +56438,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER(
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44166,23 +56453,43 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLE
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CV, BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, IS_CV);
+ }
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44193,11 +56500,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CV_HA
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
+ zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44211,8 +56517,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HA
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -44269,8 +56575,20 @@ fetch_obj_is_no_object:
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var));
+
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44337,8 +56655,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HAN
} while (0);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44365,14 +56682,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -44381,8 +56697,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
object = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -44397,12 +56713,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
}
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
@@ -44418,7 +56735,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
@@ -44428,7 +56745,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op1);
@@ -44440,6 +56757,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -44458,8 +56778,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_C
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44500,7 +56819,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CV_HANDLER(ZE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
} else {
@@ -44517,6 +56836,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CV_HANDLER(ZE
SAVE_OPLINE();
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -44525,8 +56852,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_CV_HANDLER(ZE
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44541,8 +56867,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMP
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -44632,6 +56958,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -44663,8 +56992,7 @@ isset_dim_obj_exit:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44678,8 +57006,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
HANDLE_EXCEPTION();
}
@@ -44710,24 +57038,55 @@ isset_no_object:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1;
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
+ container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
SAVE_OPLINE();
- op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
zval_ptr_dtor_nogc(free_op1);
-
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44770,8 +57129,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER
add_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44814,8 +57172,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER
sub_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44861,8 +57218,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER
mul_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44877,8 +57233,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER
fast_div_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44916,8 +57271,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER
mod_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44932,8 +57286,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER(
shift_left_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44948,8 +57301,22 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER(
shift_right_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *op1, *op2;
+
+ SAVE_OPLINE();
+ op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ pow_function(EX_VAR(opline->result.var), op1, op2);
+ zval_ptr_dtor_nogc(free_op1);
+ zval_ptr_dtor_nogc(free_op2);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -44987,7 +57354,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
- str = zend_string_realloc(op1_str, len + ZSTR_LEN(op2_str), 0);
+ str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
@@ -45009,8 +57376,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND
zval_ptr_dtor_nogc(free_op1);
} while (0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45051,7 +57417,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HA
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
@@ -45078,8 +57444,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HA
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45120,7 +57485,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVA
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) != 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
}
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
@@ -45147,8 +57512,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVA
ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45198,8 +57562,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_
ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45249,8 +57612,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVA
ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45265,8 +57627,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_H
compare_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45281,8 +57642,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDL
bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45297,8 +57657,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HAND
bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45313,8 +57672,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HAND
bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45329,23 +57687,43 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HA
boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *container;
+ zval *container, *dim, *value, *result;
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_array:
+ value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, (IS_TMP_VAR|IS_VAR), BP_VAR_R);
+ result = EX_VAR(opline->result.var);
+ ZVAL_COPY(result, value);
+ } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_array;
+ } else {
+ goto fetch_dim_r_slow;
+ }
+ } else {
+fetch_dim_r_slow:
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R_slow(result, container, dim);
+ }
+ } else {
+ result = EX_VAR(opline->result.var);
+ zend_fetch_dimension_address_read_R(result, container, dim, (IS_TMP_VAR|IS_VAR));
+ }
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45359,8 +57737,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVA
zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2), (IS_TMP_VAR|IS_VAR));
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45374,8 +57751,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVA
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -45433,8 +57810,20 @@ fetch_obj_is_no_object:
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval *container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2));
+ zval_ptr_dtor_nogc(free_op2);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45501,8 +57890,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR
} while (0);
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45529,14 +57917,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
break;
}
- }
- if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
+ } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ }
}
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
- }
- zend_throw_error(zend_ce_error, "Method name must be a string");
+ zend_throw_error(NULL, "Method name must be a string");
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
HANDLE_EXCEPTION();
@@ -45545,8 +57932,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
object = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(free_op2);
HANDLE_EXCEPTION();
}
@@ -45561,12 +57948,13 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
}
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
- GET_OP1_UNDEF_CV(object, BP_VAR_R);
- }
- if (UNEXPECTED(EG(exception) != NULL)) {
- HANDLE_EXCEPTION();
+ object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor_nogc(free_op2);
+ HANDLE_EXCEPTION();
+ }
}
- zend_throw_error(zend_ce_error, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
+ zend_throw_error(NULL, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
@@ -45582,7 +57970,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
zend_object *orig_obj = obj;
if (UNEXPECTED(obj->handlers->get_method == NULL)) {
- zend_throw_error(zend_ce_error, "Object does not support method calls");
+ zend_throw_error(NULL, "Object does not support method calls");
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
HANDLE_EXCEPTION();
@@ -45592,7 +57980,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
if (UNEXPECTED(fbc == NULL)) {
if (EXPECTED(!EG(exception))) {
- zend_throw_error(zend_ce_error, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
+ zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
}
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
@@ -45604,6 +57992,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
EXPECTED(obj == orig_obj)) {
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
}
+ if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
+ init_func_run_time_cache(&fbc->op_array);
+ }
}
call_info = ZEND_CALL_NESTED_FUNCTION;
@@ -45623,8 +58014,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_T
zval_ptr_dtor_nogc(free_op2);
zval_ptr_dtor_nogc(free_op1);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45665,7 +58055,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLE
result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
}
} else {
- result = (zendi_smart_strcmp(op1, op2) == 0);
+ result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
}
zval_ptr_dtor_nogc(free_op2);
} else {
@@ -45682,6 +58072,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLE
SAVE_OPLINE();
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
+ } else if (((IS_TMP_VAR|IS_VAR) & IS_VAR) && UNEXPECTED(Z_ISREF_P(op1))) {
+ /* Don't keep lock on reference, lock the value instead */
+ if (UNEXPECTED(Z_REFCOUNT_P(op1) == 1)) {
+ ZVAL_UNREF(op1);
+ } else {
+ Z_DELREF_P(op1);
+ ZVAL_COPY(op1, Z_REFVAL_P(op1));
+ }
}
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
@@ -45690,8 +58088,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLE
compare_function(result, op1, op2);
ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45706,8 +58103,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMP
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -45797,6 +58194,9 @@ num_index_prop:
if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
lval = Z_LVAL_P(offset);
isset_str_offset:
+ if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
+ lval += (zend_long)Z_STRLEN_P(container);
+ }
if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
if (opline->extended_value & ZEND_ISSET) {
result = 1;
@@ -45828,8 +58228,7 @@ isset_dim_obj_exit:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
@@ -45843,8 +58242,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM
SAVE_OPLINE();
container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
- zend_throw_error(zend_ce_error, "Using $this when not in object context");
+ if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
+ zend_throw_error(NULL, "Using $this when not in object context");
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
HANDLE_EXCEPTION();
}
@@ -45876,28 +58275,979 @@ isset_no_object:
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
- CHECK_EXCEPTION();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
-static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *op1, *op2;
+ zval *container, *dim, *value;
+ zend_long offset;
+ container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
+ dim = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+fetch_dim_r_index_array:
+ if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
+ offset = Z_LVAL_P(dim);
+ } else {
+ offset = zval_get_long(dim);
+ }
+ ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
+ ZVAL_COPY(EX_VAR(opline->result.var), value);
+ if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR)) {
+ SAVE_OPLINE();
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ } else {
+ ZEND_VM_NEXT_OPCODE();
+ }
+ } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
+ container = Z_REFVAL_P(container);
+ if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
+ goto fetch_dim_r_index_array;
+ } else {
+ goto fetch_dim_r_index_slow;
+ }
+ } else {
+fetch_dim_r_index_slow:
+ SAVE_OPLINE();
+ zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
+ zval_ptr_dtor_nogc(free_op1);
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+ }
+
+fetch_dim_r_index_undef:
+ ZVAL_NULL(EX_VAR(opline->result.var));
SAVE_OPLINE();
- op1 = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- op2 = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
- pow_function(EX_VAR(opline->result.var), op1, op2);
+ zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
zval_ptr_dtor_nogc(free_op1);
- zval_ptr_dtor_nogc(free_op2);
- CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ Z_LVAL_P(var_ptr)++;
+ if (UNEXPECTED(0)) {
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ Z_LVAL_P(var_ptr)++;
+ if (UNEXPECTED(1)) {
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ fast_long_increment_function(var_ptr);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ fast_long_increment_function(var_ptr);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)++;
+ }
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)++;
+ }
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ Z_LVAL_P(var_ptr)--;
+ if (UNEXPECTED(0)) {
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ Z_LVAL_P(var_ptr)--;
+ if (UNEXPECTED(1)) {
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ fast_long_decrement_function(var_ptr);
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ fast_long_decrement_function(var_ptr);
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)--;
+ }
+ if (UNEXPECTED(0)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)--;
+ }
+ if (UNEXPECTED(1)) {
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ Z_LVAL_P(var_ptr)++;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ fast_long_increment_function(var_ptr);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_increment_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)++;
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ Z_LVAL_P(var_ptr)--;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr));
+ fast_long_decrement_function(var_ptr);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr;
+
+ var_ptr = EX_VAR(opline->op1.var);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), var_ptr);
+ if (EXPECTED(Z_TYPE_P(var_ptr) == IS_LONG)) {
+ fast_long_decrement_function(var_ptr);
+ } else {
+ Z_DVAL_P(var_ptr)--;
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *value;
+
+ value = EX_VAR(opline->op1.var);
+ ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(value));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *value;
+
+ value = EX_VAR(opline->op1.var);
+ ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) - Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = EX_VAR(opline->result.var);
+ fast_long_sub_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_CONSTANT(opline->op2);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) + Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ fast_long_add_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) - Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ fast_long_sub_function(result, op1, op2);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_LONG(result, Z_LVAL_P(op1) * Z_LVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+ zend_long overflow;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
+ Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2, *result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = EX_VAR(opline->result.var);
+ ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *op1, *op2;
+ int result;
+
+ op1 = EX_VAR(opline->op1.var);
+ op2 = EX_VAR(opline->op2.var);
+ result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
+ ZEND_VM_SMART_BRANCH_JMPNZ(result, 0);
+ ZVAL_BOOL(EX_VAR(opline->result.var), result);
ZEND_VM_NEXT_OPCODE();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
@@ -45905,4358 +59255,4765 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDL
void zend_init_opcodes_handlers(void)
{
- static const void *labels[] = {
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_NOP_SPEC_HANDLER,
- ZEND_ADD_SPEC_CONST_CONST_HANDLER,
- ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_SPEC_CONST_CV_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_CV_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_SPEC_CV_CONST_HANDLER,
- ZEND_ADD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ADD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_SPEC_CV_CV_HANDLER,
- ZEND_SUB_SPEC_CONST_CONST_HANDLER,
- ZEND_SUB_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_SUB_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SUB_SPEC_CONST_CV_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_CV_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SUB_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SUB_SPEC_CV_CONST_HANDLER,
- ZEND_SUB_SPEC_CV_TMPVAR_HANDLER,
- ZEND_SUB_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SUB_SPEC_CV_CV_HANDLER,
- ZEND_MUL_SPEC_CONST_CONST_HANDLER,
- ZEND_MUL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_MUL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MUL_SPEC_CONST_CV_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MUL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MUL_SPEC_CV_CONST_HANDLER,
- ZEND_MUL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_MUL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MUL_SPEC_CV_CV_HANDLER,
- ZEND_DIV_SPEC_CONST_CONST_HANDLER,
- ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DIV_SPEC_CONST_CV_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_CV_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DIV_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DIV_SPEC_CV_CONST_HANDLER,
- ZEND_DIV_SPEC_CV_TMPVAR_HANDLER,
- ZEND_DIV_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DIV_SPEC_CV_CV_HANDLER,
- ZEND_MOD_SPEC_CONST_CONST_HANDLER,
- ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MOD_SPEC_CONST_CV_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_CV_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MOD_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MOD_SPEC_CV_CONST_HANDLER,
- ZEND_MOD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_MOD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_MOD_SPEC_CV_CV_HANDLER,
- ZEND_SL_SPEC_CONST_CONST_HANDLER,
- ZEND_SL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_SL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SL_SPEC_CONST_CV_HANDLER,
- ZEND_SL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_SL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SL_SPEC_CV_CONST_HANDLER,
- ZEND_SL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_SL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SL_SPEC_CV_CV_HANDLER,
- ZEND_SR_SPEC_CONST_CONST_HANDLER,
- ZEND_SR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_SR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SR_SPEC_CONST_CV_HANDLER,
- ZEND_SR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_SR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SR_SPEC_CV_CONST_HANDLER,
- ZEND_SR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_SR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SR_SPEC_CV_CV_HANDLER,
- ZEND_CONCAT_SPEC_CONST_CONST_HANDLER,
- ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CONCAT_SPEC_CONST_CV_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CONCAT_SPEC_CV_CONST_HANDLER,
- ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CONCAT_SPEC_CV_CV_HANDLER,
- ZEND_BW_OR_SPEC_CONST_CONST_HANDLER,
- ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_OR_SPEC_CONST_CV_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_OR_SPEC_CV_CONST_HANDLER,
- ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_OR_SPEC_CV_CV_HANDLER,
- ZEND_BW_AND_SPEC_CONST_CONST_HANDLER,
- ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_AND_SPEC_CONST_CV_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_AND_SPEC_CV_CONST_HANDLER,
- ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER,
- ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_AND_SPEC_CV_CV_HANDLER,
- ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER,
- ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_XOR_SPEC_CONST_CV_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_XOR_SPEC_CV_CONST_HANDLER,
- ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_XOR_SPEC_CV_CV_HANDLER,
- ZEND_BW_NOT_SPEC_CONST_HANDLER,
- ZEND_BW_NOT_SPEC_CONST_HANDLER,
- ZEND_BW_NOT_SPEC_CONST_HANDLER,
- ZEND_BW_NOT_SPEC_CONST_HANDLER,
- ZEND_BW_NOT_SPEC_CONST_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BW_NOT_SPEC_CV_HANDLER,
- ZEND_BW_NOT_SPEC_CV_HANDLER,
- ZEND_BW_NOT_SPEC_CV_HANDLER,
- ZEND_BW_NOT_SPEC_CV_HANDLER,
- ZEND_BW_NOT_SPEC_CV_HANDLER,
- ZEND_BOOL_NOT_SPEC_CONST_HANDLER,
- ZEND_BOOL_NOT_SPEC_CONST_HANDLER,
- ZEND_BOOL_NOT_SPEC_CONST_HANDLER,
- ZEND_BOOL_NOT_SPEC_CONST_HANDLER,
- ZEND_BOOL_NOT_SPEC_CONST_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_NOT_SPEC_CV_HANDLER,
- ZEND_BOOL_NOT_SPEC_CV_HANDLER,
- ZEND_BOOL_NOT_SPEC_CV_HANDLER,
- ZEND_BOOL_NOT_SPEC_CV_HANDLER,
- ZEND_BOOL_NOT_SPEC_CV_HANDLER,
- ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER,
- ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER,
- ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CV_CONST_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER,
- ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER,
- ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER,
- ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLER,
- ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER,
- ZEND_IS_SMALLER_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_CV_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_SPEC_CV_CONST_HANDLER,
- ZEND_IS_SMALLER_SPEC_CV_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CONST_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV_HANDLER,
- ZEND_CAST_SPEC_CONST_HANDLER,
- ZEND_CAST_SPEC_CONST_HANDLER,
- ZEND_CAST_SPEC_CONST_HANDLER,
- ZEND_CAST_SPEC_CONST_HANDLER,
- ZEND_CAST_SPEC_CONST_HANDLER,
- ZEND_CAST_SPEC_TMP_HANDLER,
- ZEND_CAST_SPEC_TMP_HANDLER,
- ZEND_CAST_SPEC_TMP_HANDLER,
- ZEND_CAST_SPEC_TMP_HANDLER,
- ZEND_CAST_SPEC_TMP_HANDLER,
- ZEND_CAST_SPEC_VAR_HANDLER,
- ZEND_CAST_SPEC_VAR_HANDLER,
- ZEND_CAST_SPEC_VAR_HANDLER,
- ZEND_CAST_SPEC_VAR_HANDLER,
- ZEND_CAST_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CAST_SPEC_CV_HANDLER,
- ZEND_CAST_SPEC_CV_HANDLER,
- ZEND_CAST_SPEC_CV_HANDLER,
- ZEND_CAST_SPEC_CV_HANDLER,
- ZEND_CAST_SPEC_CV_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CONST_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CONST_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CONST_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CONST_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CONST_HANDLER,
- ZEND_QM_ASSIGN_SPEC_TMP_HANDLER,
- ZEND_QM_ASSIGN_SPEC_TMP_HANDLER,
- ZEND_QM_ASSIGN_SPEC_TMP_HANDLER,
- ZEND_QM_ASSIGN_SPEC_TMP_HANDLER,
- ZEND_QM_ASSIGN_SPEC_TMP_HANDLER,
- ZEND_QM_ASSIGN_SPEC_VAR_HANDLER,
- ZEND_QM_ASSIGN_SPEC_VAR_HANDLER,
- ZEND_QM_ASSIGN_SPEC_VAR_HANDLER,
- ZEND_QM_ASSIGN_SPEC_VAR_HANDLER,
- ZEND_QM_ASSIGN_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CV_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CV_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CV_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CV_HANDLER,
- ZEND_QM_ASSIGN_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_ADD_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_SUB_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_MUL_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_DIV_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_MOD_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SL_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_SL_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_SL_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_SL_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_SL_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_SL_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_SL_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_SL_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SR_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_SR_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_SR_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_SR_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_SR_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_SR_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_SR_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_SR_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_CONCAT_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_OR_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_AND_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_INC_SPEC_VAR_HANDLER,
- ZEND_PRE_INC_SPEC_VAR_HANDLER,
- ZEND_PRE_INC_SPEC_VAR_HANDLER,
- ZEND_PRE_INC_SPEC_VAR_HANDLER,
- ZEND_PRE_INC_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_INC_SPEC_CV_HANDLER,
- ZEND_PRE_INC_SPEC_CV_HANDLER,
- ZEND_PRE_INC_SPEC_CV_HANDLER,
- ZEND_PRE_INC_SPEC_CV_HANDLER,
- ZEND_PRE_INC_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_DEC_SPEC_VAR_HANDLER,
- ZEND_PRE_DEC_SPEC_VAR_HANDLER,
- ZEND_PRE_DEC_SPEC_VAR_HANDLER,
- ZEND_PRE_DEC_SPEC_VAR_HANDLER,
- ZEND_PRE_DEC_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_DEC_SPEC_CV_HANDLER,
- ZEND_PRE_DEC_SPEC_CV_HANDLER,
- ZEND_PRE_DEC_SPEC_CV_HANDLER,
- ZEND_PRE_DEC_SPEC_CV_HANDLER,
- ZEND_PRE_DEC_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_INC_SPEC_VAR_HANDLER,
- ZEND_POST_INC_SPEC_VAR_HANDLER,
- ZEND_POST_INC_SPEC_VAR_HANDLER,
- ZEND_POST_INC_SPEC_VAR_HANDLER,
- ZEND_POST_INC_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_INC_SPEC_CV_HANDLER,
- ZEND_POST_INC_SPEC_CV_HANDLER,
- ZEND_POST_INC_SPEC_CV_HANDLER,
- ZEND_POST_INC_SPEC_CV_HANDLER,
- ZEND_POST_INC_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_DEC_SPEC_VAR_HANDLER,
- ZEND_POST_DEC_SPEC_VAR_HANDLER,
- ZEND_POST_DEC_SPEC_VAR_HANDLER,
- ZEND_POST_DEC_SPEC_VAR_HANDLER,
- ZEND_POST_DEC_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_DEC_SPEC_CV_HANDLER,
- ZEND_POST_DEC_SPEC_CV_HANDLER,
- ZEND_POST_DEC_SPEC_CV_HANDLER,
- ZEND_POST_DEC_SPEC_CV_HANDLER,
- ZEND_POST_DEC_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_SPEC_VAR_TMP_HANDLER,
- ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_SPEC_CV_TMP_HANDLER,
- ZEND_ASSIGN_SPEC_CV_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER,
- ZEND_ECHO_SPEC_CONST_HANDLER,
- ZEND_ECHO_SPEC_CONST_HANDLER,
- ZEND_ECHO_SPEC_CONST_HANDLER,
- ZEND_ECHO_SPEC_CONST_HANDLER,
- ZEND_ECHO_SPEC_CONST_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_ECHO_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ECHO_SPEC_CV_HANDLER,
- ZEND_ECHO_SPEC_CV_HANDLER,
- ZEND_ECHO_SPEC_CV_HANDLER,
- ZEND_ECHO_SPEC_CV_HANDLER,
- ZEND_ECHO_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMP_SPEC_HANDLER,
- ZEND_JMPZ_SPEC_CONST_HANDLER,
- ZEND_JMPZ_SPEC_CONST_HANDLER,
- ZEND_JMPZ_SPEC_CONST_HANDLER,
- ZEND_JMPZ_SPEC_CONST_HANDLER,
- ZEND_JMPZ_SPEC_CONST_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMPZ_SPEC_CV_HANDLER,
- ZEND_JMPZ_SPEC_CV_HANDLER,
- ZEND_JMPZ_SPEC_CV_HANDLER,
- ZEND_JMPZ_SPEC_CV_HANDLER,
- ZEND_JMPZ_SPEC_CV_HANDLER,
- ZEND_JMPNZ_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMPNZ_SPEC_CV_HANDLER,
- ZEND_JMPNZ_SPEC_CV_HANDLER,
- ZEND_JMPNZ_SPEC_CV_HANDLER,
- ZEND_JMPNZ_SPEC_CV_HANDLER,
- ZEND_JMPNZ_SPEC_CV_HANDLER,
- ZEND_JMPZNZ_SPEC_CONST_HANDLER,
- ZEND_JMPZNZ_SPEC_CONST_HANDLER,
- ZEND_JMPZNZ_SPEC_CONST_HANDLER,
- ZEND_JMPZNZ_SPEC_CONST_HANDLER,
- ZEND_JMPZNZ_SPEC_CONST_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMPZNZ_SPEC_CV_HANDLER,
- ZEND_JMPZNZ_SPEC_CV_HANDLER,
- ZEND_JMPZNZ_SPEC_CV_HANDLER,
- ZEND_JMPZNZ_SPEC_CV_HANDLER,
- ZEND_JMPZNZ_SPEC_CV_HANDLER,
- ZEND_JMPZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMPZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CONST_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CV_HANDLER,
- ZEND_JMPNZ_EX_SPEC_CV_HANDLER,
- ZEND_CASE_SPEC_CONST_CONST_HANDLER,
- ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CASE_SPEC_CONST_CV_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_CV_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CASE_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CASE_SPEC_CV_CONST_HANDLER,
- ZEND_CASE_SPEC_CV_TMPVAR_HANDLER,
- ZEND_CASE_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CASE_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_SPEC_CONST_HANDLER,
- ZEND_BOOL_SPEC_CONST_HANDLER,
- ZEND_BOOL_SPEC_CONST_HANDLER,
- ZEND_BOOL_SPEC_CONST_HANDLER,
- ZEND_BOOL_SPEC_CONST_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_BOOL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BOOL_SPEC_CV_HANDLER,
- ZEND_BOOL_SPEC_CV_HANDLER,
- ZEND_BOOL_SPEC_CV_HANDLER,
- ZEND_BOOL_SPEC_CV_HANDLER,
- ZEND_BOOL_SPEC_CV_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CONST_CONST_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CONST_CV_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CV_CONST_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ROPE_INIT_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ROPE_INIT_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ROPE_INIT_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ROPE_INIT_SPEC_UNUSED_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ROPE_ADD_SPEC_TMP_CONST_HANDLER,
- ZEND_ROPE_ADD_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_ROPE_ADD_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ROPE_ADD_SPEC_TMP_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ROPE_END_SPEC_TMP_CONST_HANDLER,
- ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ROPE_END_SPEC_TMP_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_BEGIN_SILENCE_SPEC_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_END_SILENCE_SPEC_TMP_HANDLER,
- ZEND_END_SILENCE_SPEC_TMP_HANDLER,
- ZEND_END_SILENCE_SPEC_TMP_HANDLER,
- ZEND_END_SILENCE_SPEC_TMP_HANDLER,
- ZEND_END_SILENCE_SPEC_TMP_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_SPEC_HANDLER,
- ZEND_INIT_FCALL_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_FCALL_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RETURN_SPEC_CONST_HANDLER,
- ZEND_RETURN_SPEC_CONST_HANDLER,
- ZEND_RETURN_SPEC_CONST_HANDLER,
- ZEND_RETURN_SPEC_CONST_HANDLER,
- ZEND_RETURN_SPEC_CONST_HANDLER,
- ZEND_RETURN_SPEC_TMP_HANDLER,
- ZEND_RETURN_SPEC_TMP_HANDLER,
- ZEND_RETURN_SPEC_TMP_HANDLER,
- ZEND_RETURN_SPEC_TMP_HANDLER,
- ZEND_RETURN_SPEC_TMP_HANDLER,
- ZEND_RETURN_SPEC_VAR_HANDLER,
- ZEND_RETURN_SPEC_VAR_HANDLER,
- ZEND_RETURN_SPEC_VAR_HANDLER,
- ZEND_RETURN_SPEC_VAR_HANDLER,
- ZEND_RETURN_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RETURN_SPEC_CV_HANDLER,
- ZEND_RETURN_SPEC_CV_HANDLER,
- ZEND_RETURN_SPEC_CV_HANDLER,
- ZEND_RETURN_SPEC_CV_HANDLER,
- ZEND_RETURN_SPEC_CV_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_SPEC_HANDLER,
- ZEND_RECV_INIT_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RECV_INIT_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RECV_INIT_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RECV_INIT_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RECV_INIT_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAL_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_SPEC_TMP_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_EX_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_REF_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_REF_SPEC_CV_HANDLER,
- ZEND_SEND_REF_SPEC_CV_HANDLER,
- ZEND_SEND_REF_SPEC_CV_HANDLER,
- ZEND_SEND_REF_SPEC_CV_HANDLER,
- ZEND_SEND_REF_SPEC_CV_HANDLER,
- ZEND_NEW_SPEC_CONST_HANDLER,
- ZEND_NEW_SPEC_CONST_HANDLER,
- ZEND_NEW_SPEC_CONST_HANDLER,
- ZEND_NEW_SPEC_CONST_HANDLER,
- ZEND_NEW_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NEW_SPEC_VAR_HANDLER,
- ZEND_NEW_SPEC_VAR_HANDLER,
- ZEND_NEW_SPEC_VAR_HANDLER,
- ZEND_NEW_SPEC_VAR_HANDLER,
- ZEND_NEW_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER,
- ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER,
- ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HANDLER,
- ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER,
- ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER,
- ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HANDLER,
- ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER,
- ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_HANDLER,
- ZEND_INIT_ARRAY_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER,
- ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER,
- ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
- ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER,
- ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER,
- ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER,
- ZEND_UNSET_DIM_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_UNSET_DIM_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER,
- ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER,
- ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDLER,
- ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER,
- ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER,
- ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_FE_RESET_R_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_R_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_R_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_R_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_R_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_R_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_R_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_R_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_R_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_R_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_R_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_R_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_R_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_R_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_R_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FE_RESET_R_SPEC_CV_HANDLER,
- ZEND_FE_RESET_R_SPEC_CV_HANDLER,
- ZEND_FE_RESET_R_SPEC_CV_HANDLER,
- ZEND_FE_RESET_R_SPEC_CV_HANDLER,
- ZEND_FE_RESET_R_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FE_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_EXIT_SPEC_CONST_HANDLER,
- ZEND_EXIT_SPEC_CONST_HANDLER,
- ZEND_EXIT_SPEC_CONST_HANDLER,
- ZEND_EXIT_SPEC_CONST_HANDLER,
- ZEND_EXIT_SPEC_CONST_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_TMPVAR_HANDLER,
- ZEND_EXIT_SPEC_UNUSED_HANDLER,
- ZEND_EXIT_SPEC_UNUSED_HANDLER,
- ZEND_EXIT_SPEC_UNUSED_HANDLER,
- ZEND_EXIT_SPEC_UNUSED_HANDLER,
- ZEND_EXIT_SPEC_UNUSED_HANDLER,
- ZEND_EXIT_SPEC_CV_HANDLER,
- ZEND_EXIT_SPEC_CV_HANDLER,
- ZEND_EXIT_SPEC_CV_HANDLER,
- ZEND_EXIT_SPEC_CV_HANDLER,
- ZEND_EXIT_SPEC_CV_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_CV_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_CV_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_CV_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER,
- ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER,
- ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CV_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CONST_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER,
- ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CONST_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CV_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_LIST_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_LIST_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_GOTO_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_GOTO_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_GOTO_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_GOTO_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_GOTO_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_STMT_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_FCALL_END_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_TICKS_SPEC_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_CATCH_SPEC_CONST_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_THROW_SPEC_CONST_HANDLER,
- ZEND_THROW_SPEC_CONST_HANDLER,
- ZEND_THROW_SPEC_CONST_HANDLER,
- ZEND_THROW_SPEC_CONST_HANDLER,
- ZEND_THROW_SPEC_CONST_HANDLER,
- ZEND_THROW_SPEC_TMP_HANDLER,
- ZEND_THROW_SPEC_TMP_HANDLER,
- ZEND_THROW_SPEC_TMP_HANDLER,
- ZEND_THROW_SPEC_TMP_HANDLER,
- ZEND_THROW_SPEC_TMP_HANDLER,
- ZEND_THROW_SPEC_VAR_HANDLER,
- ZEND_THROW_SPEC_VAR_HANDLER,
- ZEND_THROW_SPEC_VAR_HANDLER,
- ZEND_THROW_SPEC_VAR_HANDLER,
- ZEND_THROW_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_THROW_SPEC_CV_HANDLER,
- ZEND_THROW_SPEC_CV_HANDLER,
- ZEND_THROW_SPEC_CV_HANDLER,
- ZEND_THROW_SPEC_CV_HANDLER,
- ZEND_THROW_SPEC_CV_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CONST_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CV_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CONST_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CV_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CONST_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CV_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CONST_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CV_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CONST_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
- ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER,
- ZEND_FETCH_CLASS_SPEC_CV_HANDLER,
- ZEND_CLONE_SPEC_CONST_HANDLER,
- ZEND_CLONE_SPEC_CONST_HANDLER,
- ZEND_CLONE_SPEC_CONST_HANDLER,
- ZEND_CLONE_SPEC_CONST_HANDLER,
- ZEND_CLONE_SPEC_CONST_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_TMPVAR_HANDLER,
- ZEND_CLONE_SPEC_UNUSED_HANDLER,
- ZEND_CLONE_SPEC_UNUSED_HANDLER,
- ZEND_CLONE_SPEC_UNUSED_HANDLER,
- ZEND_CLONE_SPEC_UNUSED_HANDLER,
- ZEND_CLONE_SPEC_UNUSED_HANDLER,
- ZEND_CLONE_SPEC_CV_HANDLER,
- ZEND_CLONE_SPEC_CV_HANDLER,
- ZEND_CLONE_SPEC_CV_HANDLER,
- ZEND_CLONE_SPEC_CV_HANDLER,
- ZEND_CLONE_SPEC_CV_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
- ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CONST_CONST_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CONST_CV_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CV_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER,
- ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAR_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_SPEC_VAR_HANDLER,
- ZEND_SEND_VAR_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_VAR_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_SPEC_CV_HANDLER,
- ZEND_SEND_VAR_SPEC_CV_HANDLER,
- ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER,
- ZEND_INIT_USER_CALL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_INIT_USER_CALL_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_SEND_ARRAY_SPEC_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_USER_SPEC_VAR_HANDLER,
- ZEND_SEND_USER_SPEC_VAR_HANDLER,
- ZEND_SEND_USER_SPEC_VAR_HANDLER,
- ZEND_SEND_USER_SPEC_VAR_HANDLER,
- ZEND_SEND_USER_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEND_USER_SPEC_CV_HANDLER,
- ZEND_SEND_USER_SPEC_CV_HANDLER,
- ZEND_SEND_USER_SPEC_CV_HANDLER,
- ZEND_SEND_USER_SPEC_CV_HANDLER,
- ZEND_SEND_USER_SPEC_CV_HANDLER,
- ZEND_STRLEN_SPEC_CONST_HANDLER,
- ZEND_STRLEN_SPEC_CONST_HANDLER,
- ZEND_STRLEN_SPEC_CONST_HANDLER,
- ZEND_STRLEN_SPEC_CONST_HANDLER,
- ZEND_STRLEN_SPEC_CONST_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_STRLEN_SPEC_CV_HANDLER,
- ZEND_STRLEN_SPEC_CV_HANDLER,
- ZEND_STRLEN_SPEC_CV_HANDLER,
- ZEND_STRLEN_SPEC_CV_HANDLER,
- ZEND_STRLEN_SPEC_CV_HANDLER,
- ZEND_DEFINED_SPEC_CONST_HANDLER,
- ZEND_DEFINED_SPEC_CONST_HANDLER,
- ZEND_DEFINED_SPEC_CONST_HANDLER,
- ZEND_DEFINED_SPEC_CONST_HANDLER,
- ZEND_DEFINED_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CONST_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CONST_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CONST_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CONST_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CONST_HANDLER,
- ZEND_TYPE_CHECK_SPEC_TMP_HANDLER,
- ZEND_TYPE_CHECK_SPEC_TMP_HANDLER,
- ZEND_TYPE_CHECK_SPEC_TMP_HANDLER,
- ZEND_TYPE_CHECK_SPEC_TMP_HANDLER,
- ZEND_TYPE_CHECK_SPEC_TMP_HANDLER,
- ZEND_TYPE_CHECK_SPEC_VAR_HANDLER,
- ZEND_TYPE_CHECK_SPEC_VAR_HANDLER,
- ZEND_TYPE_CHECK_SPEC_VAR_HANDLER,
- ZEND_TYPE_CHECK_SPEC_VAR_HANDLER,
- ZEND_TYPE_CHECK_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CV_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CV_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CV_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CV_HANDLER,
- ZEND_TYPE_CHECK_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CONST_HANDLER,
- ZEND_FE_RESET_RW_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_RW_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_RW_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_RW_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_RW_SPEC_TMP_HANDLER,
- ZEND_FE_RESET_RW_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_RW_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_RW_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_RW_SPEC_VAR_HANDLER,
- ZEND_FE_RESET_RW_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CV_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CV_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CV_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CV_HANDLER,
- ZEND_FE_RESET_RW_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_ICALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_UCALL_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_VAR_CONST_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_VAR_CV_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_INC_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_VAR_CONST_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_VAR_CV_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_PRE_DEC_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_VAR_CONST_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_VAR_CV_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_INC_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_VAR_CONST_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_VAR_CV_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POST_DEC_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_VAR_CV_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INSTANCEOF_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INSTANCEOF_SPEC_TMPVAR_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INSTANCEOF_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_INSTANCEOF_SPEC_CV_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
- ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
- ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
- ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
- ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
- ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
- ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
- ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
- ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
- ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
- ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
- ZEND_YIELD_FROM_SPEC_VAR_HANDLER,
- ZEND_YIELD_FROM_SPEC_VAR_HANDLER,
- ZEND_YIELD_FROM_SPEC_VAR_HANDLER,
- ZEND_YIELD_FROM_SPEC_VAR_HANDLER,
- ZEND_YIELD_FROM_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_YIELD_FROM_SPEC_CV_HANDLER,
- ZEND_YIELD_FROM_SPEC_CV_HANDLER,
- ZEND_YIELD_FROM_SPEC_CV_HANDLER,
- ZEND_YIELD_FROM_SPEC_CV_HANDLER,
- ZEND_YIELD_FROM_SPEC_CV_HANDLER,
- ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER,
- ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CV_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_USER_OPCODE_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_ASSERT_CHECK_SPEC_HANDLER,
- ZEND_JMP_SET_SPEC_CONST_HANDLER,
- ZEND_JMP_SET_SPEC_CONST_HANDLER,
- ZEND_JMP_SET_SPEC_CONST_HANDLER,
- ZEND_JMP_SET_SPEC_CONST_HANDLER,
- ZEND_JMP_SET_SPEC_CONST_HANDLER,
- ZEND_JMP_SET_SPEC_TMP_HANDLER,
- ZEND_JMP_SET_SPEC_TMP_HANDLER,
- ZEND_JMP_SET_SPEC_TMP_HANDLER,
- ZEND_JMP_SET_SPEC_TMP_HANDLER,
- ZEND_JMP_SET_SPEC_TMP_HANDLER,
- ZEND_JMP_SET_SPEC_VAR_HANDLER,
- ZEND_JMP_SET_SPEC_VAR_HANDLER,
- ZEND_JMP_SET_SPEC_VAR_HANDLER,
- ZEND_JMP_SET_SPEC_VAR_HANDLER,
- ZEND_JMP_SET_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_JMP_SET_SPEC_CV_HANDLER,
- ZEND_JMP_SET_SPEC_CV_HANDLER,
- ZEND_JMP_SET_SPEC_CV_HANDLER,
- ZEND_JMP_SET_SPEC_CV_HANDLER,
- ZEND_JMP_SET_SPEC_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_ADD_TRAIT_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_BIND_TRAITS_SPEC_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
- ZEND_YIELD_SPEC_CONST_CONST_HANDLER,
- ZEND_YIELD_SPEC_CONST_TMP_HANDLER,
- ZEND_YIELD_SPEC_CONST_VAR_HANDLER,
- ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER,
- ZEND_YIELD_SPEC_CONST_CV_HANDLER,
- ZEND_YIELD_SPEC_TMP_CONST_HANDLER,
- ZEND_YIELD_SPEC_TMP_TMP_HANDLER,
- ZEND_YIELD_SPEC_TMP_VAR_HANDLER,
- ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER,
- ZEND_YIELD_SPEC_TMP_CV_HANDLER,
- ZEND_YIELD_SPEC_VAR_CONST_HANDLER,
- ZEND_YIELD_SPEC_VAR_TMP_HANDLER,
- ZEND_YIELD_SPEC_VAR_VAR_HANDLER,
- ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER,
- ZEND_YIELD_SPEC_VAR_CV_HANDLER,
- ZEND_YIELD_SPEC_UNUSED_CONST_HANDLER,
- ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER,
- ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER,
- ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDLER,
- ZEND_YIELD_SPEC_UNUSED_CV_HANDLER,
- ZEND_YIELD_SPEC_CV_CONST_HANDLER,
- ZEND_YIELD_SPEC_CV_TMP_HANDLER,
- ZEND_YIELD_SPEC_CV_VAR_HANDLER,
- ZEND_YIELD_SPEC_CV_UNUSED_HANDLER,
- ZEND_YIELD_SPEC_CV_CV_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER,
- ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_CALL_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_FAST_RET_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_RECV_VARIADIC_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_SEND_UNPACK_SPEC_HANDLER,
- ZEND_POW_SPEC_CONST_CONST_HANDLER,
- ZEND_POW_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_POW_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POW_SPEC_CONST_CV_HANDLER,
- ZEND_POW_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POW_SPEC_TMPVAR_CV_HANDLER,
- ZEND_POW_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POW_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POW_SPEC_CV_CONST_HANDLER,
- ZEND_POW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_POW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_POW_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_POW_SPEC_VAR_CONST_HANDLER,
- ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_POW_SPEC_VAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_POW_SPEC_CV_CONST_HANDLER,
- ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_ASSIGN_POW_SPEC_CV_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_BIND_GLOBAL_SPEC_CV_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_COALESCE_SPEC_CONST_HANDLER,
- ZEND_COALESCE_SPEC_CONST_HANDLER,
- ZEND_COALESCE_SPEC_CONST_HANDLER,
- ZEND_COALESCE_SPEC_CONST_HANDLER,
- ZEND_COALESCE_SPEC_CONST_HANDLER,
- ZEND_COALESCE_SPEC_TMP_HANDLER,
- ZEND_COALESCE_SPEC_TMP_HANDLER,
- ZEND_COALESCE_SPEC_TMP_HANDLER,
- ZEND_COALESCE_SPEC_TMP_HANDLER,
- ZEND_COALESCE_SPEC_TMP_HANDLER,
- ZEND_COALESCE_SPEC_VAR_HANDLER,
- ZEND_COALESCE_SPEC_VAR_HANDLER,
- ZEND_COALESCE_SPEC_VAR_HANDLER,
- ZEND_COALESCE_SPEC_VAR_HANDLER,
- ZEND_COALESCE_SPEC_VAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_COALESCE_SPEC_CV_HANDLER,
- ZEND_COALESCE_SPEC_CV_HANDLER,
- ZEND_COALESCE_SPEC_CV_HANDLER,
- ZEND_COALESCE_SPEC_CV_HANDLER,
- ZEND_COALESCE_SPEC_CV_HANDLER,
- ZEND_SPACESHIP_SPEC_CONST_CONST_HANDLER,
- ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SPACESHIP_SPEC_CONST_CV_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SPACESHIP_SPEC_CV_CONST_HANDLER,
- ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDLER,
- ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_SPACESHIP_SPEC_CV_CV_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER,
- ZEND_NULL_HANDLER
- };
- zend_opcode_handlers = labels;
+ static const void *labels[] = {
+ ZEND_NOP_SPEC_HANDLER,
+ ZEND_ADD_SPEC_CONST_CONST_HANDLER,
+ ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_SPEC_CONST_CV_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_SPEC_CV_CONST_HANDLER,
+ ZEND_ADD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ADD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_SPEC_CV_CV_HANDLER,
+ ZEND_SUB_SPEC_CONST_CONST_HANDLER,
+ ZEND_SUB_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_SUB_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_SPEC_CONST_CV_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_SPEC_CV_CONST_HANDLER,
+ ZEND_SUB_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_SUB_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_SPEC_CV_CV_HANDLER,
+ ZEND_MUL_SPEC_CONST_CONST_HANDLER,
+ ZEND_MUL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_MUL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_SPEC_CONST_CV_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_SPEC_CV_CONST_HANDLER,
+ ZEND_MUL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_MUL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_SPEC_CV_CV_HANDLER,
+ ZEND_DIV_SPEC_CONST_CONST_HANDLER,
+ ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_DIV_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DIV_SPEC_CONST_CV_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DIV_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DIV_SPEC_CV_CONST_HANDLER,
+ ZEND_DIV_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_DIV_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DIV_SPEC_CV_CV_HANDLER,
+ ZEND_MOD_SPEC_CONST_CONST_HANDLER,
+ ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MOD_SPEC_CONST_CV_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MOD_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MOD_SPEC_CV_CONST_HANDLER,
+ ZEND_MOD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_MOD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MOD_SPEC_CV_CV_HANDLER,
+ ZEND_SL_SPEC_CONST_CONST_HANDLER,
+ ZEND_SL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_SL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SL_SPEC_CONST_CV_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SL_SPEC_CV_CONST_HANDLER,
+ ZEND_SL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_SL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SL_SPEC_CV_CV_HANDLER,
+ ZEND_SR_SPEC_CONST_CONST_HANDLER,
+ ZEND_SR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_SR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SR_SPEC_CONST_CV_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SR_SPEC_CV_CONST_HANDLER,
+ ZEND_SR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_SR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SR_SPEC_CV_CV_HANDLER,
+ ZEND_CONCAT_SPEC_CONST_CONST_HANDLER,
+ ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CONCAT_SPEC_CONST_CV_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CONCAT_SPEC_CV_CONST_HANDLER,
+ ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CONCAT_SPEC_CV_CV_HANDLER,
+ ZEND_BW_OR_SPEC_CONST_CONST_HANDLER,
+ ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_BW_OR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_OR_SPEC_CONST_CV_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_OR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_OR_SPEC_CV_CONST_HANDLER,
+ ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_BW_OR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_OR_SPEC_CV_CV_HANDLER,
+ ZEND_BW_AND_SPEC_CONST_CONST_HANDLER,
+ ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_BW_AND_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_AND_SPEC_CONST_CV_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_AND_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_AND_SPEC_CV_CONST_HANDLER,
+ ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_BW_AND_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_AND_SPEC_CV_CV_HANDLER,
+ ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER,
+ ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_BW_XOR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_XOR_SPEC_CONST_CV_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_XOR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_XOR_SPEC_CV_CONST_HANDLER,
+ ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_XOR_SPEC_CV_CV_HANDLER,
+ ZEND_BW_NOT_SPEC_CONST_HANDLER,
+ ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
+ ZEND_BW_NOT_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BW_NOT_SPEC_CV_HANDLER,
+ ZEND_BOOL_NOT_SPEC_CONST_HANDLER,
+ ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
+ ZEND_BOOL_NOT_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_NOT_SPEC_CV_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_XOR_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CV_CONST_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CV_CONST_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV_HANDLER,
+ ZEND_CAST_SPEC_CONST_HANDLER,
+ ZEND_CAST_SPEC_TMP_HANDLER,
+ ZEND_CAST_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CAST_SPEC_CV_HANDLER,
+ ZEND_QM_ASSIGN_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_SPEC_TMP_HANDLER,
+ ZEND_QM_ASSIGN_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_QM_ASSIGN_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_ADD_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SUB_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_MUL_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_DIV_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_MOD_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SL_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_SR_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_CONCAT_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_OR_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_AND_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_SPEC_VAR_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_SPEC_VAR_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_SPEC_CV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_SPEC_CV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_SPEC_VAR_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_SPEC_VAR_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_SPEC_CV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_SPEC_CV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_CONST_RETVAL_USED_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_TMP_RETVAL_USED_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_VAR_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_VAR_CV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_CONST_RETVAL_USED_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_TMP_RETVAL_USED_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_CV_RETVAL_UNUSED_HANDLER,
+ ZEND_ASSIGN_SPEC_CV_CV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER,
+ ZEND_ECHO_SPEC_CONST_HANDLER,
+ ZEND_ECHO_SPEC_TMPVAR_HANDLER,
+ ZEND_ECHO_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ECHO_SPEC_CV_HANDLER,
+ ZEND_GENERATOR_CREATE_SPEC_HANDLER,
+ ZEND_JMP_SPEC_HANDLER,
+ ZEND_JMPZ_SPEC_CONST_HANDLER,
+ ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
+ ZEND_JMPZ_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_JMPZ_SPEC_CV_HANDLER,
+ ZEND_JMPNZ_SPEC_CONST_HANDLER,
+ ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
+ ZEND_JMPNZ_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_JMPNZ_SPEC_CV_HANDLER,
+ ZEND_JMPZNZ_SPEC_CONST_HANDLER,
+ ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
+ ZEND_JMPZNZ_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_JMPZNZ_SPEC_CV_HANDLER,
+ ZEND_JMPZ_EX_SPEC_CONST_HANDLER,
+ ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
+ ZEND_JMPZ_EX_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_JMPZ_EX_SPEC_CV_HANDLER,
+ ZEND_JMPNZ_EX_SPEC_CONST_HANDLER,
+ ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
+ ZEND_JMPNZ_EX_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_JMPNZ_EX_SPEC_CV_HANDLER,
+ ZEND_CASE_SPEC_CONST_CONST_HANDLER,
+ ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_CASE_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CASE_SPEC_CONST_CV_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CASE_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CASE_SPEC_CV_CONST_HANDLER,
+ ZEND_CASE_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_CASE_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CASE_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_HANDLER,
+ ZEND_SEND_VAR_NO_REF_EX_SPEC_VAR_QUICK_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_SPEC_CONST_HANDLER,
+ ZEND_BOOL_SPEC_TMPVAR_HANDLER,
+ ZEND_BOOL_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BOOL_SPEC_CV_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CONST_CONST_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CONST_CV_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CV_CONST_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FAST_CONCAT_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ROPE_INIT_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_ROPE_INIT_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_ROPE_INIT_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ROPE_INIT_SPEC_UNUSED_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ROPE_ADD_SPEC_TMP_CONST_HANDLER,
+ ZEND_ROPE_ADD_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_ROPE_ADD_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ROPE_ADD_SPEC_TMP_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ROPE_END_SPEC_TMP_CONST_HANDLER,
+ ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_ROPE_END_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ROPE_END_SPEC_TMP_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BEGIN_SILENCE_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_END_SILENCE_SPEC_TMP_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER,
+ ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER,
+ ZEND_INIT_FCALL_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_RETURN_SPEC_CONST_HANDLER,
+ ZEND_RETURN_SPEC_TMP_HANDLER,
+ ZEND_RETURN_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_RETURN_SPEC_CV_HANDLER,
+ ZEND_RECV_SPEC_HANDLER,
+ ZEND_RECV_INIT_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAL_SPEC_CONST_HANDLER,
+ ZEND_SEND_VAL_SPEC_TMPVAR_HANDLER,
+ ZEND_SEND_VAL_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAR_EX_SPEC_VAR_HANDLER,
+ ZEND_SEND_VAR_EX_SPEC_VAR_QUICK_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAR_EX_SPEC_CV_HANDLER,
+ ZEND_SEND_VAR_EX_SPEC_CV_QUICK_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_REF_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_REF_SPEC_CV_HANDLER,
+ ZEND_NEW_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NEW_SPEC_VAR_HANDLER,
+ ZEND_NEW_SPEC_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FREE_SPEC_TMPVAR_HANDLER,
+ ZEND_FREE_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER,
+ ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER,
+ ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER,
+ ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER,
+ ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
+ ZEND_INCLUDE_OR_EVAL_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER,
+ ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER,
+ ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_UNSET_DIM_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_UNSET_DIM_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER,
+ ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER,
+ ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_FE_RESET_R_SPEC_CONST_HANDLER,
+ ZEND_FE_RESET_R_SPEC_TMP_HANDLER,
+ ZEND_FE_RESET_R_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FE_RESET_R_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FE_FETCH_R_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_EXIT_SPEC_CONST_HANDLER,
+ ZEND_EXIT_SPEC_TMPVAR_HANDLER,
+ ZEND_EXIT_SPEC_TMPVAR_HANDLER,
+ ZEND_EXIT_SPEC_UNUSED_HANDLER,
+ ZEND_EXIT_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_TMP_CONST_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_TMP_CV_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CONST_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER,
+ ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CONST_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CV_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_LIST_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_LIST_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_EXT_STMT_SPEC_HANDLER,
+ ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER,
+ ZEND_EXT_FCALL_END_SPEC_HANDLER,
+ ZEND_EXT_NOP_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_CATCH_SPEC_CONST_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_THROW_SPEC_CONST_HANDLER,
+ ZEND_THROW_SPEC_TMP_HANDLER,
+ ZEND_THROW_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_THROW_SPEC_CV_HANDLER,
+ ZEND_FETCH_CLASS_SPEC_CONST_HANDLER,
+ ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
+ ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER,
+ ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER,
+ ZEND_FETCH_CLASS_SPEC_CV_HANDLER,
+ ZEND_CLONE_SPEC_CONST_HANDLER,
+ ZEND_CLONE_SPEC_TMPVAR_HANDLER,
+ ZEND_CLONE_SPEC_TMPVAR_HANDLER,
+ ZEND_CLONE_SPEC_UNUSED_HANDLER,
+ ZEND_CLONE_SPEC_CV_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CONST_CONST_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CONST_CV_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_UNUSED_HANDLER,
+ ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER,
+ ZEND_SEND_VAL_EX_SPEC_CONST_QUICK_HANDLER,
+ ZEND_SEND_VAL_EX_SPEC_TMP_HANDLER,
+ ZEND_SEND_VAL_EX_SPEC_TMP_QUICK_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAR_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_VAR_SPEC_CV_HANDLER,
+ ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER,
+ ZEND_INIT_USER_CALL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_INIT_USER_CALL_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_ARRAY_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_USER_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEND_USER_SPEC_CV_HANDLER,
+ ZEND_STRLEN_SPEC_CONST_HANDLER,
+ ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
+ ZEND_STRLEN_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_STRLEN_SPEC_CV_HANDLER,
+ ZEND_DEFINED_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_TYPE_CHECK_SPEC_CONST_HANDLER,
+ ZEND_TYPE_CHECK_SPEC_TMP_HANDLER,
+ ZEND_TYPE_CHECK_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_TYPE_CHECK_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_VERIFY_RETURN_TYPE_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_VERIFY_RETURN_TYPE_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_VERIFY_RETURN_TYPE_SPEC_UNUSED_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_VERIFY_RETURN_TYPE_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FE_RESET_RW_SPEC_CONST_HANDLER,
+ ZEND_FE_RESET_RW_SPEC_TMP_HANDLER,
+ ZEND_FE_RESET_RW_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FE_RESET_RW_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
+ ZEND_FE_FREE_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER,
+ ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
+ ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER,
+ ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER,
+ ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER,
+ ZEND_DO_UCALL_SPEC_RETVAL_UNUSED_HANDLER,
+ ZEND_DO_UCALL_SPEC_RETVAL_USED_HANDLER,
+ ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_UNUSED_HANDLER,
+ ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_VAR_CONST_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_VAR_CV_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_VAR_CONST_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_VAR_CV_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_VAR_CONST_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_VAR_CV_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_VAR_CONST_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_VAR_CV_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INSTANCEOF_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_INSTANCEOF_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INSTANCEOF_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INSTANCEOF_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_INSTANCEOF_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INSTANCEOF_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_INSTANCEOF_SPEC_CV_VAR_HANDLER,
+ ZEND_INSTANCEOF_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DECLARE_CLASS_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DECLARE_INHERITED_CLASS_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DECLARE_FUNCTION_SPEC_HANDLER,
+ ZEND_YIELD_FROM_SPEC_CONST_HANDLER,
+ ZEND_YIELD_FROM_SPEC_TMP_HANDLER,
+ ZEND_YIELD_FROM_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_YIELD_FROM_SPEC_CV_HANDLER,
+ ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_CV_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_CONST_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_TMP_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CV_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CONST_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CV_HANDLER,
+ ZEND_HANDLE_EXCEPTION_SPEC_HANDLER,
+ ZEND_USER_OPCODE_SPEC_HANDLER,
+ ZEND_ASSERT_CHECK_SPEC_HANDLER,
+ ZEND_JMP_SET_SPEC_CONST_HANDLER,
+ ZEND_JMP_SET_SPEC_TMP_HANDLER,
+ ZEND_JMP_SET_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_JMP_SET_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_CLASS_NAME_SPEC_HANDLER,
+ ZEND_CALL_TRAMPOLINE_SPEC_HANDLER,
+ ZEND_DISCARD_EXCEPTION_SPEC_HANDLER,
+ ZEND_YIELD_SPEC_CONST_CONST_HANDLER,
+ ZEND_YIELD_SPEC_CONST_TMP_HANDLER,
+ ZEND_YIELD_SPEC_CONST_VAR_HANDLER,
+ ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_CONST_CV_HANDLER,
+ ZEND_YIELD_SPEC_TMP_CONST_HANDLER,
+ ZEND_YIELD_SPEC_TMP_TMP_HANDLER,
+ ZEND_YIELD_SPEC_TMP_VAR_HANDLER,
+ ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_TMP_CV_HANDLER,
+ ZEND_YIELD_SPEC_VAR_CONST_HANDLER,
+ ZEND_YIELD_SPEC_VAR_TMP_HANDLER,
+ ZEND_YIELD_SPEC_VAR_VAR_HANDLER,
+ ZEND_YIELD_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_VAR_CV_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_TMP_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_VAR_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_UNUSED_CV_HANDLER,
+ ZEND_YIELD_SPEC_CV_CONST_HANDLER,
+ ZEND_YIELD_SPEC_CV_TMP_HANDLER,
+ ZEND_YIELD_SPEC_CV_VAR_HANDLER,
+ ZEND_YIELD_SPEC_CV_UNUSED_HANDLER,
+ ZEND_YIELD_SPEC_CV_CV_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_TMP_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_GENERATOR_RETURN_SPEC_CV_HANDLER,
+ ZEND_FAST_CALL_SPEC_HANDLER,
+ ZEND_FAST_RET_SPEC_HANDLER,
+ ZEND_RECV_VARIADIC_SPEC_HANDLER,
+ ZEND_SEND_UNPACK_SPEC_HANDLER,
+ ZEND_POW_SPEC_CONST_CONST_HANDLER,
+ ZEND_POW_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_POW_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POW_SPEC_CONST_CV_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POW_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POW_SPEC_CV_CONST_HANDLER,
+ ZEND_POW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_POW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POW_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_CONST_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_CV_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_CV_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_VAR_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_CONST_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_CV_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_UNUSED_CV_OBJ_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_CONST_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_CONST_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_CONST_OBJ_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_TMPVAR_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_UNUSED_DIM_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_CV_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_CV_DIM_HANDLER,
+ ZEND_ASSIGN_POW_SPEC_CV_CV_OBJ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BIND_GLOBAL_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_COALESCE_SPEC_CONST_HANDLER,
+ ZEND_COALESCE_SPEC_TMP_HANDLER,
+ ZEND_COALESCE_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_COALESCE_SPEC_CV_HANDLER,
+ ZEND_SPACESHIP_SPEC_CONST_CONST_HANDLER,
+ ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_SPACESHIP_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SPACESHIP_SPEC_CONST_CV_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SPACESHIP_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SPACESHIP_SPEC_CV_CONST_HANDLER,
+ ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_SPACESHIP_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SPACESHIP_SPEC_CV_CV_HANDLER,
+ ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_VAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_R_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_W_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_RW_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_IS_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_CONST_VAR_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_CV_VAR_HANDLER,
+ ZEND_UNSET_STATIC_PROP_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_TMPVAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CV_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUSED_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BIND_LEXICAL_SPEC_TMP_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_BIND_STATIC_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ_HANDLER,
+ ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_UNUSED_HANDLER,
+ ZEND_PRE_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_RETVAL_USED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
+ ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER,
+ ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_LONG_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_INC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
+ ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER,
+ ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_LONG_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_POST_DEC_LONG_OR_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV_HANDLER,
+ ZEND_QM_ASSIGN_NOREF_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV_HANDLER,
+ ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_CV_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVAR_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CV_HANDLER,
+ ZEND_NULL_HANDLER
+ };
+ static const uint32_t specs[] = {
+ 0,
+ 1 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 26 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 51 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 76 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 101 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 126 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 151 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 176 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 201 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 226 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 251 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 276 | SPEC_RULE_OP1,
+ 281 | SPEC_RULE_OP1,
+ 286 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 311 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 336 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 361 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 386 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 411 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 436 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 461 | SPEC_RULE_OP1,
+ 466 | SPEC_RULE_OP1,
+ 471 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 546 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 621 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 696 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 771 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 846 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 921 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 996 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 1071 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 1146 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 1221 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 1296 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL,
+ 1306 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL,
+ 1316 | SPEC_RULE_OP1,
+ 1321 | SPEC_RULE_OP1,
+ 1326 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_RETVAL,
+ 1376 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1401 | SPEC_RULE_OP1,
+ 1406,
+ 1407,
+ 1408 | SPEC_RULE_OP1,
+ 1413 | SPEC_RULE_OP1,
+ 1418 | SPEC_RULE_OP1,
+ 1423 | SPEC_RULE_OP1,
+ 1428 | SPEC_RULE_OP1,
+ 1433 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 4481,
+ 1458 | SPEC_RULE_OP1 | SPEC_RULE_QUICK_ARG,
+ 4481,
+ 1468 | SPEC_RULE_OP1,
+ 1473 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1498 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1523 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1548 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1573,
+ 1574 | SPEC_RULE_OP1,
+ 1579 | SPEC_RULE_OP2,
+ 1584 | SPEC_RULE_RETVAL,
+ 1586 | SPEC_RULE_OP2,
+ 1591 | SPEC_RULE_OP1,
+ 1596,
+ 1597 | SPEC_RULE_OP2,
+ 1602 | SPEC_RULE_OP1,
+ 1607 | SPEC_RULE_OP1 | SPEC_RULE_QUICK_ARG,
+ 1617 | SPEC_RULE_OP1,
+ 1622 | SPEC_RULE_OP1,
+ 1627 | SPEC_RULE_OP2,
+ 1632 | SPEC_RULE_OP1,
+ 1637 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1662 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1687 | SPEC_RULE_OP1,
+ 1692 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1717 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1742 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1767 | SPEC_RULE_OP1,
+ 1772 | SPEC_RULE_OP1,
+ 1777 | SPEC_RULE_OP1,
+ 1782 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1807 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1832 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1857 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1882 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1907 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1932 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1957 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 1982 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2007 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2032 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2057 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2082 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2107 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2132 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2157 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2182 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2207 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2232 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2257 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 4481,
+ 2282,
+ 2283,
+ 2284,
+ 2285,
+ 2286,
+ 2287 | SPEC_RULE_OP1,
+ 2292 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2317 | SPEC_RULE_OP1,
+ 2322 | SPEC_RULE_OP2,
+ 2327 | SPEC_RULE_OP1,
+ 2332 | SPEC_RULE_OP1,
+ 2337 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2362 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2387 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2412 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2437 | SPEC_RULE_OP1 | SPEC_RULE_QUICK_ARG,
+ 2447 | SPEC_RULE_OP1,
+ 2452 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2477,
+ 2478 | SPEC_RULE_OP1,
+ 2483 | SPEC_RULE_OP1,
+ 2488 | SPEC_RULE_OP1,
+ 2493 | SPEC_RULE_OP1,
+ 2498 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2523 | SPEC_RULE_OP1,
+ 2528 | SPEC_RULE_OP1,
+ 2533 | SPEC_RULE_OP1,
+ 2538 | SPEC_RULE_OP2,
+ 2543 | SPEC_RULE_RETVAL,
+ 2545 | SPEC_RULE_RETVAL,
+ 2547 | SPEC_RULE_RETVAL,
+ 2549 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2574 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2599 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2624 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2649 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_OP_DATA,
+ 2774,
+ 2775 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2800,
+ 2801 | SPEC_RULE_OP2,
+ 2806,
+ 2807 | SPEC_RULE_OP1,
+ 2812 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2837 | SPEC_RULE_OP2,
+ 2842 | SPEC_RULE_OP2,
+ 2847,
+ 2848 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_OP_DATA,
+ 2973 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 2998,
+ 2999,
+ 3000,
+ 3001 | SPEC_RULE_OP1,
+ 3006 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3031,
+ 3032,
+ 3033 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3058,
+ 3059,
+ 3060,
+ 3061 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3086 | SPEC_RULE_OP1,
+ 3091,
+ 3092,
+ 3093,
+ 3094,
+ 3095 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3120 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_DIM_OBJ,
+ 3195 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3220 | SPEC_RULE_OP1,
+ 3225 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3250,
+ 3251 | SPEC_RULE_OP2,
+ 3256 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3281 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3306 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3331 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3356 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3381 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3406 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3431 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3456 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3481 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 3506 | SPEC_RULE_OP1 | SPEC_RULE_OP2,
+ 4481
+ };
+ zend_opcode_handlers = labels;
+ zend_handlers_count = sizeof(labels) / sizeof(void*);
+ zend_spec_handlers = specs;
+}
+
+static HashTable *zend_handlers_table = NULL;
+
+static void init_opcode_serialiser(void)
+{
+ int i;
+ zval tmp;
+
+ zend_handlers_table = malloc(sizeof(HashTable));
+ zend_hash_init_ex(zend_handlers_table, zend_handlers_count, NULL, NULL, 1, 0);
+ zend_hash_real_init(zend_handlers_table, 0);
+ Z_TYPE_INFO(tmp) = IS_LONG;
+ for (i = 0; i < zend_handlers_count; i++) {
+ Z_LVAL(tmp) = i;
+ zend_hash_index_add(zend_handlers_table, (zend_long)(zend_uintptr_t)zend_opcode_handlers[i], &tmp);
+ }
}
+
+ZEND_API void zend_serialize_opcode_handler(zend_op *op)
+{
+ zval *zv;
+
+ if (!zend_handlers_table) {
+ init_opcode_serialiser();
+ }
+ zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler);
+ ZEND_ASSERT(zv != NULL);
+ op->handler = (const void *)(zend_uintptr_t)Z_LVAL_P(zv);
+}
+
+ZEND_API void zend_deserialize_opcode_handler(zend_op *op)
+{
+ op->handler = zend_opcode_handlers[(zend_uintptr_t)op->handler];
+}
+
+static const void *zend_vm_get_opcode_handler_ex(uint32_t spec, const zend_op* op)
+{
+ static const int zend_vm_decode[] = {
+ _UNUSED_CODE, /* 0 */
+ _CONST_CODE, /* 1 = IS_CONST */
+ _TMP_CODE, /* 2 = IS_TMP_VAR */
+ _UNUSED_CODE, /* 3 */
+ _VAR_CODE, /* 4 = IS_VAR */
+ _UNUSED_CODE, /* 5 */
+ _UNUSED_CODE, /* 6 */
+ _UNUSED_CODE, /* 7 */
+ _UNUSED_CODE, /* 8 = IS_UNUSED */
+ _UNUSED_CODE, /* 9 */
+ _UNUSED_CODE, /* 10 */
+ _UNUSED_CODE, /* 11 */
+ _UNUSED_CODE, /* 12 */
+ _UNUSED_CODE, /* 13 */
+ _UNUSED_CODE, /* 14 */
+ _UNUSED_CODE, /* 15 */
+ _CV_CODE /* 16 = IS_CV */
+ };
+ uint32_t offset = 0;
+ if (spec & SPEC_RULE_OP1) offset = offset * 5 + zend_vm_decode[op->op1_type];
+ if (spec & SPEC_RULE_OP2) offset = offset * 5 + zend_vm_decode[op->op2_type];
+ if (spec & SPEC_RULE_OP_DATA) offset = offset * 5 + zend_vm_decode[(op + 1)->op1_type];
+ if (spec & SPEC_RULE_RETVAL) offset = offset * 2 + (op->result_type != IS_UNUSED);
+ if (spec & SPEC_RULE_QUICK_ARG) offset = offset * 2 + (op->op2.num < MAX_ARG_FLAG_NUM);
+ if (spec & SPEC_RULE_SMART_BRANCH) {
+ offset = offset * 3;
+ if ((op+1)->opcode == ZEND_JMPZ) {
+ offset += 1;
+ } else if ((op+1)->opcode == ZEND_JMPNZ) {
+ offset += 2;
+ }
+ }
+ if (spec & SPEC_RULE_DIM_OBJ) {
+ offset = offset * 3;
+ if (op->extended_value == ZEND_ASSIGN_DIM) {
+ offset += 1;
+ } else if (op->extended_value == ZEND_ASSIGN_OBJ) {
+ offset += 2;
+ }
+ }
+ return zend_opcode_handlers[(spec & SPEC_START_MASK) + offset];
+}
+
static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op)
{
- static const int zend_vm_decode[] = {
- _UNUSED_CODE, /* 0 */
- _CONST_CODE, /* 1 = IS_CONST */
- _TMP_CODE, /* 2 = IS_TMP_VAR */
- _UNUSED_CODE, /* 3 */
- _VAR_CODE, /* 4 = IS_VAR */
- _UNUSED_CODE, /* 5 */
- _UNUSED_CODE, /* 6 */
- _UNUSED_CODE, /* 7 */
- _UNUSED_CODE, /* 8 = IS_UNUSED */
- _UNUSED_CODE, /* 9 */
- _UNUSED_CODE, /* 10 */
- _UNUSED_CODE, /* 11 */
- _UNUSED_CODE, /* 12 */
- _UNUSED_CODE, /* 13 */
- _UNUSED_CODE, /* 14 */
- _UNUSED_CODE, /* 15 */
- _CV_CODE /* 16 = IS_CV */
- };
- return zend_opcode_handlers[opcode * 25 + zend_vm_decode[op->op1_type] * 5 + zend_vm_decode[op->op2_type]];
+ return zend_vm_get_opcode_handler_ex(zend_spec_handlers[opcode], op);
}
ZEND_API void zend_vm_set_opcode_handler(zend_op* op)
@@ -50264,6 +64021,201 @@ ZEND_API void zend_vm_set_opcode_handler(zend_op* op)
op->handler = zend_vm_get_opcode_handler(zend_user_opcodes[op->opcode], op);
}
+ZEND_API void zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t op1_info, uint32_t op2_info, uint32_t res_info)
+{
+ zend_uchar opcode = zend_user_opcodes[op->opcode];
+ uint32_t spec = zend_spec_handlers[opcode];
+ switch (opcode) {
+ case ZEND_ADD:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3531 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ } else if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3556 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3581 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ }
+ break;
+ case ZEND_SUB:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3606 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ } else if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3631 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3656 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ }
+ break;
+ case ZEND_MUL:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3681 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ } else if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3706 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3731 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ }
+ break;
+ case ZEND_IS_EQUAL:
+ if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3756 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3831 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ }
+ break;
+ case ZEND_IS_NOT_EQUAL:
+ if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3906 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 3981 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ if (op->op1_type > op->op2_type) {
+ zend_swap_operands(op);
+ }
+ }
+ break;
+ case ZEND_IS_SMALLER:
+ if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 4056 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 4131 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ }
+ break;
+ case ZEND_IS_SMALLER_OR_EQUAL:
+ if ((op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 4206 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ } else if ((op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE)) {
+ if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {
+ break;
+ }
+ spec = 4281 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH;
+ }
+ break;
+ case ZEND_QM_ASSIGN:
+ if ((op1_info == MAY_BE_DOUBLE)) {
+ spec = 4446 | SPEC_RULE_OP1;
+ } else if ((!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))))) {
+ spec = 4451 | SPEC_RULE_OP1;
+ }
+ break;
+ case ZEND_PRE_INC:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG)) {
+ spec = 4356 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL;
+ } else if ((op1_info == MAY_BE_LONG)) {
+ spec = 4366 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL;
+ } else if ((op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE))) {
+ spec = 4376 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL;
+ }
+ break;
+ case ZEND_PRE_DEC:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG)) {
+ spec = 4386 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL;
+ } else if ((op1_info == MAY_BE_LONG)) {
+ spec = 4396 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL;
+ } else if ((op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE))) {
+ spec = 4406 | SPEC_RULE_OP1 | SPEC_RULE_RETVAL;
+ }
+ break;
+ case ZEND_POST_INC:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG)) {
+ spec = 4416 | SPEC_RULE_OP1;
+ } else if ((op1_info == MAY_BE_LONG)) {
+ spec = 4421 | SPEC_RULE_OP1;
+ } else if ((op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE))) {
+ spec = 4426 | SPEC_RULE_OP1;
+ }
+ break;
+ case ZEND_POST_DEC:
+ if ((res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG)) {
+ spec = 4431 | SPEC_RULE_OP1;
+ } else if ((op1_info == MAY_BE_LONG)) {
+ spec = 4436 | SPEC_RULE_OP1;
+ } else if ((op1_info == (MAY_BE_LONG|MAY_BE_DOUBLE))) {
+ spec = 4441 | SPEC_RULE_OP1;
+ }
+ break;
+ case ZEND_FETCH_DIM_R:
+ if ((!(op2_info & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)))) {
+ spec = 4456 | SPEC_RULE_OP1 | SPEC_RULE_OP2;
+ }
+ break;
+ default:
+ break;
+ }
+ op->handler = zend_vm_get_opcode_handler_ex(spec, op);
+}
+
ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)
{
int ret;
@@ -50280,11 +64232,16 @@ ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)
LOAD_OPLINE();
#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
- ret = (opline) ? 0 : -1;
+ if (EXPECTED(opline)) {
+ ret = execute_data != ex ? (int)(execute_data->prev_execute_data != ex) + 1 : 0;
+ SAVE_OPLINE();
+ } else {
+ ret = -1;
+ }
#else
ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-#endif
SAVE_OPLINE();
+#endif
#ifdef ZEND_VM_FP_GLOBAL_REG
execute_data = orig_execute_data;
#endif
diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl
index 7e223385ff..ebc6474ae5 100644
--- a/Zend/zend_vm_execute.skl
+++ b/Zend/zend_vm_execute.skl
@@ -9,9 +9,10 @@ ZEND_API void {%EXECUTOR_NAME%}_ex(zend_execute_data *ex)
{%INTERNAL_LABELS%}
LOAD_OPLINE();
+ ZEND_VM_INTERRUPT_CHECK();
while (1) {
- {%ZEND_VM_CONTINUE_LABEL%}
+ {%ZEND_VM_CONTINUE_LABEL%}
{%ZEND_VM_DISPATCH%} {
{%INTERNAL_EXECUTOR%}
}
@@ -28,7 +29,7 @@ ZEND_API void zend_{%EXECUTOR_NAME%}(zend_op_array *op_array, zval *return_value
return;
}
- execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE,
+ execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
(zend_function*)op_array, 0, zend_get_called_scope(EG(current_execute_data)), zend_get_this_object(EG(current_execute_data)));
if (EG(current_execute_data)) {
execute_data->symbol_table = zend_rebuild_symbol_table();
@@ -45,5 +46,40 @@ ZEND_API void zend_{%EXECUTOR_NAME%}(zend_op_array *op_array, zval *return_value
void {%INITIALIZER_NAME%}(void)
{
- {%EXTERNAL_LABELS%}
+ {%EXTERNAL_LABELS%}
}
+
+static HashTable *zend_handlers_table = NULL;
+
+static void init_opcode_serialiser(void)
+{
+ int i;
+ zval tmp;
+
+ zend_handlers_table = malloc(sizeof(HashTable));
+ zend_hash_init_ex(zend_handlers_table, zend_handlers_count, NULL, NULL, 1, 0);
+ zend_hash_real_init(zend_handlers_table, 0);
+ Z_TYPE_INFO(tmp) = IS_LONG;
+ for (i = 0; i < zend_handlers_count; i++) {
+ Z_LVAL(tmp) = i;
+ zend_hash_index_add(zend_handlers_table, (zend_long)(zend_uintptr_t)zend_opcode_handlers[i], &tmp);
+ }
+}
+
+ZEND_API void zend_serialize_opcode_handler(zend_op *op)
+{
+ zval *zv;
+
+ if (!zend_handlers_table) {
+ init_opcode_serialiser();
+ }
+ zv = zend_hash_index_find(zend_handlers_table, (zend_long)(zend_uintptr_t)op->handler);
+ ZEND_ASSERT(zv != NULL);
+ op->handler = (const void *)(zend_uintptr_t)Z_LVAL_P(zv);
+}
+
+ZEND_API void zend_deserialize_opcode_handler(zend_op *op)
+{
+ op->handler = zend_opcode_handlers[(zend_uintptr_t)op->handler];
+}
+
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index ff181ce1e7..e1041d24c1 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,7 @@ $header_text = <<< DATA
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -54,6 +54,82 @@ define("ZEND_VM_KIND_CALL", 1);
define("ZEND_VM_KIND_SWITCH", 2);
define("ZEND_VM_KIND_GOTO", 3);
+$vm_op_flags = array(
+ "ZEND_VM_OP_SPEC" => 1<<0,
+ "ZEND_VM_OP_CONST" => 1<<1,
+ "ZEND_VM_OP_TMPVAR" => 1<<2,
+ "ZEND_VM_OP_TMPVARCV" => 1<<3,
+ "ZEND_VM_OP_MASK" => 0xf0,
+ "ZEND_VM_OP_NUM" => 0x10,
+ "ZEND_VM_OP_JMP_ADDR" => 0x20,
+ "ZEND_VM_OP_TRY_CATCH" => 0x30,
+ "ZEND_VM_OP_LIVE_RANGE" => 0x40,
+ "ZEND_VM_OP_THIS" => 0x50,
+ "ZEND_VM_OP_NEXT" => 0x60,
+ "ZEND_VM_OP_CLASS_FETCH" => 0x70,
+ "ZEND_VM_OP_CONSTRUCTOR" => 0x80,
+
+ "ZEND_VM_EXT_VAR_FETCH" => 1<<16,
+ "ZEND_VM_EXT_ISSET" => 1<<17,
+ "ZEND_VM_EXT_ARG_NUM" => 1<<18,
+ "ZEND_VM_EXT_ARRAY_INIT" => 1<<19,
+ "ZEND_VM_EXT_REF" => 1<<20,
+ "ZEND_VM_EXT_MASK" => 0x0f000000,
+ "ZEND_VM_EXT_NUM" => 0x01000000,
+ // unused 0x2000000
+ "ZEND_VM_EXT_JMP_ADDR" => 0x03000000,
+ "ZEND_VM_EXT_DIM_OBJ" => 0x04000000,
+ "ZEND_VM_EXT_CLASS_FETCH" => 0x05000000,
+ "ZEND_VM_EXT_CONST_FETCH" => 0x06000000,
+ "ZEND_VM_EXT_TYPE" => 0x07000000,
+ "ZEND_VM_EXT_EVAL" => 0x08000000,
+ // unused 0x09000000,
+ // unused 0x0a000000,
+ "ZEND_VM_EXT_SRC" => 0x0b000000,
+ // unused 0x0c000000,
+ "ZEND_VM_NO_CONST_CONST" => 0x40000000,
+ "ZEND_VM_COMMUTATIVE" => 0x80000000,
+);
+
+foreach ($vm_op_flags as $name => $val) {
+ define($name, $val);
+}
+
+$vm_op_decode = array(
+ "ANY" => 0,
+ "CONST" => ZEND_VM_OP_SPEC | ZEND_VM_OP_CONST,
+ "TMP" => ZEND_VM_OP_SPEC,
+ "VAR" => ZEND_VM_OP_SPEC,
+ "UNUSED" => ZEND_VM_OP_SPEC,
+ "CV" => ZEND_VM_OP_SPEC,
+ "TMPVAR" => ZEND_VM_OP_SPEC | ZEND_VM_OP_TMPVAR,
+ "TMPVARCV" => ZEND_VM_OP_SPEC | ZEND_VM_OP_TMPVARCV,
+ "NUM" => ZEND_VM_OP_NUM,
+ "JMP_ADDR" => ZEND_VM_OP_JMP_ADDR,
+ "TRY_CATCH" => ZEND_VM_OP_TRY_CATCH,
+ "LIVE_RANGE" => ZEND_VM_OP_LIVE_RANGE,
+ "THIS" => ZEND_VM_OP_THIS,
+ "NEXT" => ZEND_VM_OP_NEXT,
+ "CLASS_FETCH" => ZEND_VM_OP_CLASS_FETCH,
+ "CONSTRUCTOR" => ZEND_VM_OP_CONSTRUCTOR,
+);
+
+$vm_ext_decode = array(
+ "NUM" => ZEND_VM_EXT_NUM,
+ "JMP_ADDR" => ZEND_VM_EXT_JMP_ADDR,
+ "DIM_OBJ" => ZEND_VM_EXT_DIM_OBJ,
+ "CLASS_FETCH" => ZEND_VM_EXT_CLASS_FETCH,
+ "CONST_FETCH" => ZEND_VM_EXT_CONST_FETCH,
+ "VAR_FETCH" => ZEND_VM_EXT_VAR_FETCH,
+ "ARRAY_INIT" => ZEND_VM_EXT_ARRAY_INIT,
+ "TYPE" => ZEND_VM_EXT_TYPE,
+ "EVAL" => ZEND_VM_EXT_EVAL,
+ "ISSET" => ZEND_VM_EXT_ISSET,
+ "ARG_NUM" => ZEND_VM_EXT_ARG_NUM,
+ "REF" => ZEND_VM_EXT_REF,
+ "SRC" => ZEND_VM_EXT_SRC,
+);
+
$vm_kind_name = array(
ZEND_VM_KIND_CALL => "ZEND_VM_KIND_CALL",
ZEND_VM_KIND_SWITCH => "ZEND_VM_KIND_SWITCH",
@@ -77,346 +153,447 @@ $op_types_ex = array(
"UNUSED",
"CV",
"TMPVAR",
+ "TMPVARCV",
);
$prefix = array(
- "ANY" => "",
- "TMP" => "_TMP",
- "VAR" => "_VAR",
- "CONST" => "_CONST",
- "UNUSED" => "_UNUSED",
- "CV" => "_CV",
- "TMPVAR" => "_TMPVAR",
+ "ANY" => "",
+ "TMP" => "_TMP",
+ "VAR" => "_VAR",
+ "CONST" => "_CONST",
+ "UNUSED" => "_UNUSED",
+ "CV" => "_CV",
+ "TMPVAR" => "_TMPVAR",
+ "TMPVARCV" => "_TMPVARCV",
);
$typecode = array(
- "ANY" => 0,
- "TMP" => 1,
- "VAR" => 2,
- "CONST" => 0,
- "UNUSED" => 3,
- "CV" => 4,
- "TMPVAR" => 0,
+ "ANY" => 0,
+ "TMP" => 1,
+ "VAR" => 2,
+ "CONST" => 0,
+ "UNUSED" => 3,
+ "CV" => 4,
+ "TMPVAR" => 0,
+ "TMPVARCV" => 0,
+);
+
+$commutative_order = array(
+ "ANY" => 0,
+ "TMP" => 1,
+ "VAR" => 2,
+ "CONST" => 0,
+ "UNUSED" => 0,
+ "CV" => 4,
+ "TMPVAR" => 2,
+ "TMPVARCV" => 4,
);
$op1_type = array(
- "ANY" => "opline->op1_type",
- "TMP" => "IS_TMP_VAR",
- "VAR" => "IS_VAR",
- "CONST" => "IS_CONST",
- "UNUSED" => "IS_UNUSED",
- "CV" => "IS_CV",
- "TMPVAR" => "(IS_TMP_VAR|IS_VAR)",
+ "ANY" => "opline->op1_type",
+ "TMP" => "IS_TMP_VAR",
+ "VAR" => "IS_VAR",
+ "CONST" => "IS_CONST",
+ "UNUSED" => "IS_UNUSED",
+ "CV" => "IS_CV",
+ "TMPVAR" => "(IS_TMP_VAR|IS_VAR)",
+ "TMPVARCV" => "(IS_TMP_VAR|IS_VAR|IS_CV)",
);
$op2_type = array(
- "ANY" => "opline->op2_type",
- "TMP" => "IS_TMP_VAR",
- "VAR" => "IS_VAR",
- "CONST" => "IS_CONST",
- "UNUSED" => "IS_UNUSED",
- "CV" => "IS_CV",
- "TMPVAR" => "(IS_TMP_VAR|IS_VAR)",
+ "ANY" => "opline->op2_type",
+ "TMP" => "IS_TMP_VAR",
+ "VAR" => "IS_VAR",
+ "CONST" => "IS_CONST",
+ "UNUSED" => "IS_UNUSED",
+ "CV" => "IS_CV",
+ "TMPVAR" => "(IS_TMP_VAR|IS_VAR)",
+ "TMPVARCV" => "(IS_TMP_VAR|IS_VAR|IS_CV)",
);
$op1_free = array(
- "ANY" => "(free_op1 != NULL)",
- "TMP" => "1",
- "VAR" => "(free_op1 != NULL)",
- "CONST" => "0",
- "UNUSED" => "0",
- "CV" => "0",
- "TMPVAR" => "???",
+ "ANY" => "(free_op1 != NULL)",
+ "TMP" => "1",
+ "VAR" => "(free_op1 != NULL)",
+ "CONST" => "0",
+ "UNUSED" => "0",
+ "CV" => "0",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_free = array(
- "ANY" => "(free_op2 != NULL)",
- "TMP" => "1",
- "VAR" => "(free_op2 != NULL)",
- "CONST" => "0",
- "UNUSED" => "0",
- "CV" => "0",
- "TMPVAR" => "???",
+ "ANY" => "(free_op2 != NULL)",
+ "TMP" => "1",
+ "VAR" => "(free_op2 != NULL)",
+ "CONST" => "0",
+ "UNUSED" => "0",
+ "CV" => "0",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_get_zval_ptr = array(
- "ANY" => "get_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
- "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "EX_CONSTANT(opline->op1)",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "ANY" => "get_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
+ "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "EX_CONSTANT(opline->op1)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "TMPVARCV" => "???",
);
$op2_get_zval_ptr = array(
- "ANY" => "get_zval_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
- "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "EX_CONSTANT(opline->op2)",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "ANY" => "get_zval_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
+ "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "EX_CONSTANT(opline->op2)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "TMPVARCV" => "???",
);
$op1_get_zval_ptr_ptr = array(
- "ANY" => "get_zval_ptr_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "NULL",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_zval_ptr_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "NULL",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_get_zval_ptr_ptr = array(
- "ANY" => "get_zval_ptr_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "NULL",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_zval_ptr_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "NULL",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_get_zval_ptr_deref = array(
- "ANY" => "get_zval_ptr_deref(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
- "VAR" => "_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "EX_CONSTANT(opline->op1)",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_zval_ptr_deref(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
+ "VAR" => "_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "EX_CONSTANT(opline->op1)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_get_zval_ptr_deref = array(
- "ANY" => "get_zval_ptr_deref(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
- "VAR" => "_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "EX_CONSTANT(opline->op2)",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_zval_ptr_deref(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
+ "VAR" => "_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "EX_CONSTANT(opline->op2)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_get_zval_ptr_undef = array(
- "ANY" => "get_zval_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
- "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "EX_CONSTANT(opline->op1)",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op1.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "ANY" => "get_zval_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
+ "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "EX_CONSTANT(opline->op1)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op1.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "TMPVARCV" => "EX_VAR(opline->op1.var)",
);
$op2_get_zval_ptr_undef = array(
- "ANY" => "get_zval_ptr_undef(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
- "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "EX_CONSTANT(opline->op2)",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op2.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "ANY" => "get_zval_ptr_undef(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
+ "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "EX_CONSTANT(opline->op2)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op2.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "TMPVARCV" => "EX_VAR(opline->op2.var)",
);
$op1_get_zval_ptr_ptr_undef = array(
- "ANY" => "get_zval_ptr_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "NULL",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_zval_ptr_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "NULL",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "EX_VAR(opline->op1.var)",
);
$op2_get_zval_ptr_ptr_undef = array(
- "ANY" => "get_zval_ptr_ptr_undef(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "NULL",
- "UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_zval_ptr_ptr_undef(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "NULL",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "EX_VAR(opline->op2.var)",
);
$op1_get_obj_zval_ptr = array(
- "ANY" => "get_obj_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
- "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "EX_CONSTANT(opline->op1)",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "ANY" => "get_obj_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
+ "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "EX_CONSTANT(opline->op1)",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "TMPVARCV" => "???",
);
$op2_get_obj_zval_ptr = array(
- "ANY" => "get_obj_zval_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
- "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "EX_CONSTANT(opline->op2)",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "ANY" => "get_obj_zval_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
+ "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "EX_CONSTANT(opline->op2)",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "TMPVARCV" => "???",
);
$op1_get_obj_zval_ptr_undef = array(
- "ANY" => "get_obj_zval_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
- "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "EX_CONSTANT(opline->op1)",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op1.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "ANY" => "get_obj_zval_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
+ "VAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "EX_CONSTANT(opline->op1)",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op1.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "TMPVARCV" => "EX_VAR(opline->op1.var)",
);
$op2_get_obj_zval_ptr_undef = array(
- "ANY" => "get_obj_zval_ptr_undef(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
- "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "EX_CONSTANT(opline->op2)",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op2.var)",
- "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "ANY" => "get_obj_zval_ptr_undef(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
+ "VAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "EX_CONSTANT(opline->op2)",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_undef(execute_data, opline->op2.var)",
+ "TMPVAR" => "_get_zval_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "TMPVARCV" => "EX_VAR(opline->op2.var)",
);
$op1_get_obj_zval_ptr_deref = array(
- "ANY" => "get_obj_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
- "VAR" => "_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "EX_CONSTANT(opline->op1)",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_obj_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1)",
+ "VAR" => "_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "EX_CONSTANT(opline->op1)",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_get_obj_zval_ptr_deref = array(
- "ANY" => "get_obj_zval_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
- "VAR" => "_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "EX_CONSTANT(opline->op2)",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_obj_zval_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2)",
+ "VAR" => "_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "EX_CONSTANT(opline->op2)",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_get_obj_zval_ptr_ptr = array(
- "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "NULL",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "NULL",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_get_obj_zval_ptr_ptr = array(
- "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "NULL",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "NULL",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_get_obj_zval_ptr_ptr_undef = array(
- "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
- "CONST" => "NULL",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op1.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1)",
+ "CONST" => "NULL",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "EX_VAR(opline->op1.var)",
);
$op2_get_obj_zval_ptr_ptr_undef = array(
- "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
- "TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
- "CONST" => "NULL",
- "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
- "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op2.var)",
- "TMPVAR" => "???",
+ "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "NULL",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, execute_data, &free_op2)",
+ "CONST" => "NULL",
+ "UNUSED" => "_get_obj_zval_ptr_unused(execute_data)",
+ "CV" => "_get_zval_ptr_cv_undef_\\1(execute_data, opline->op2.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "EX_VAR(opline->op2.var)",
);
$op1_free_op = array(
- "ANY" => "FREE_OP(free_op1)",
- "TMP" => "zval_ptr_dtor_nogc(free_op1)",
- "VAR" => "zval_ptr_dtor_nogc(free_op1)",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "zval_ptr_dtor_nogc(free_op1)",
+ "ANY" => "FREE_OP(free_op1)",
+ "TMP" => "zval_ptr_dtor_nogc(free_op1)",
+ "VAR" => "zval_ptr_dtor_nogc(free_op1)",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "zval_ptr_dtor_nogc(free_op1)",
+ "TMPVARCV" => "???",
);
$op2_free_op = array(
- "ANY" => "FREE_OP(free_op2)",
- "TMP" => "zval_ptr_dtor_nogc(free_op2)",
- "VAR" => "zval_ptr_dtor_nogc(free_op2)",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "zval_ptr_dtor_nogc(free_op2)",
+ "ANY" => "FREE_OP(free_op2)",
+ "TMP" => "zval_ptr_dtor_nogc(free_op2)",
+ "VAR" => "zval_ptr_dtor_nogc(free_op2)",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "zval_ptr_dtor_nogc(free_op2)",
+ "TMPVARCV" => "???",
);
$op1_free_op_if_var = array(
- "ANY" => "if (opline->op1_type == IS_VAR) {zval_ptr_dtor_nogc(free_op1);}",
- "TMP" => "",
- "VAR" => "zval_ptr_dtor_nogc(free_op1)",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "???",
+ "ANY" => "if (opline->op1_type == IS_VAR) {zval_ptr_dtor_nogc(free_op1);}",
+ "TMP" => "",
+ "VAR" => "zval_ptr_dtor_nogc(free_op1)",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_free_op_if_var = array(
- "ANY" => "if (opline->op2_type == IS_VAR) {zval_ptr_dtor_nogc(free_op2);}",
- "TMP" => "",
- "VAR" => "zval_ptr_dtor_nogc(free_op2)",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "???",
+ "ANY" => "if (opline->op2_type == IS_VAR) {zval_ptr_dtor_nogc(free_op2);}",
+ "TMP" => "",
+ "VAR" => "zval_ptr_dtor_nogc(free_op2)",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_free_op_var_ptr = array(
- "ANY" => "if (free_op1) {zval_ptr_dtor_nogc(free_op1);}",
- "TMP" => "",
- "VAR" => "if (free_op1) {zval_ptr_dtor_nogc(free_op1);}",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "???",
+ "ANY" => "if (free_op1) {zval_ptr_dtor_nogc(free_op1);}",
+ "TMP" => "",
+ "VAR" => "if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);}",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op2_free_op_var_ptr = array(
- "ANY" => "if (free_op2) {zval_ptr_dtor_nogc(free_op2);}",
- "TMP" => "",
- "VAR" => "if (free_op2) {zval_ptr_dtor_nogc(free_op2);}",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "???",
+ "ANY" => "if (free_op2) {zval_ptr_dtor_nogc(free_op2);}",
+ "TMP" => "",
+ "VAR" => "if (UNEXPECTED(free_op2)) {zval_ptr_dtor_nogc(free_op2);}",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
);
$op1_free_unfetched = array(
- "ANY" => "FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var)",
- "TMP" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))",
- "VAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))",
+ "ANY" => "FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var)",
+ "TMP" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))",
+ "VAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))",
+ "TMPVARCV" => "???",
);
$op2_free_unfetched = array(
- "ANY" => "FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var)",
- "TMP" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))",
- "VAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))",
- "CONST" => "",
- "UNUSED" => "",
- "CV" => "",
- "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))",
+ "ANY" => "FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var)",
+ "TMP" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))",
+ "VAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))",
+ "TMPVARCV" => "???",
+);
+
+$op_data_type = array(
+ "ANY" => "(opline+1)->op1_type",
+ "TMP" => "IS_TMP_VAR",
+ "VAR" => "IS_VAR",
+ "CONST" => "IS_CONST",
+ "UNUSED" => "IS_UNUSED",
+ "CV" => "IS_CV",
+ "TMPVAR" => "(IS_TMP_VAR|IS_VAR)",
+ "TMPVARCV" => "(IS_TMP_VAR|IS_VAR|IS_CV)",
+);
+
+$op_data_get_zval_ptr = array(
+ "ANY" => "get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data, \\1)",
+ "TMP" => "_get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data)",
+ "VAR" => "_get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data)",
+ "CONST" => "EX_CONSTANT((opline+1)->op1)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_\\1(execute_data, (opline+1)->op1.var)",
+ "TMPVAR" => "_get_zval_ptr_var((opline+1)->op1.var, execute_data, &free_op_data)",
+ "TMPVARCV" => "???",
+);
+
+$op_data_get_zval_ptr_deref = array(
+ "ANY" => "get_zval_ptr((opline+1)->op1_type, (opline+1)->op1, execute_data, &free_op_data, \\1)",
+ "TMP" => "_get_zval_ptr_tmp((opline+1)->op1.var, execute_data, &free_op_data)",
+ "VAR" => "_get_zval_ptr_var_deref((opline+1)->op1.var, execute_data, &free_op_data)",
+ "CONST" => "EX_CONSTANT((opline+1)->op1)",
+ "UNUSED" => "NULL",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, (opline+1)->op1.var)",
+ "TMPVAR" => "???",
+ "TMPVARCV" => "???",
+);
+
+$op_data_free_op = array(
+ "ANY" => "FREE_OP(free_op_data)",
+ "TMP" => "zval_ptr_dtor_nogc(free_op_data)",
+ "VAR" => "zval_ptr_dtor_nogc(free_op_data)",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "zval_ptr_dtor_nogc(free_op_data)",
+ "TMPVARCV" => "???",
+);
+
+$op_data_free_unfetched = array(
+ "ANY" => "FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var)",
+ "TMP" => "zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var))",
+ "VAR" => "zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var))",
+ "CONST" => "",
+ "UNUSED" => "",
+ "CV" => "",
+ "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var))",
+ "TMPVARCV" => "???",
);
$list = array(); // list of opcode handlers and helpers in original order
@@ -426,6 +603,8 @@ $params = array(); // parameters of helpers
$opnames = array(); // opcode name to code mapping
$line_no = 1;
+$used_extra_spec = array();
+
// Writes $s into resulting executor
function out($f, $s) {
global $line_no;
@@ -461,8 +640,27 @@ function helper_name($name, $spec, $op1, $op2) {
return $name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2];
}
+function opcode_name($name, $spec, $op1, $op2) {
+ global $prefix, $opnames, $opcodes;
+
+ if (isset($opnames[$name])) {
+ $opcode = $opcodes[$opnames[$name]];
+ // If we haven't helper with specified spicialized operands then
+ // using unspecialized helper
+ if (!isset($opcode["op1"][$op1]) &&
+ isset($opcode["op1"]["ANY"])) {
+ $op1 = "ANY";
+ }
+ if (!isset($opcode["op2"][$op2]) &&
+ isset($opcode["op2"]["ANY"])) {
+ $op2 = "ANY";
+ }
+ }
+ return $name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2];
+}
+
// Generates code for opcode handler or helper
-function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
+function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name, $extra_spec=null) {
global $op1_type, $op2_type, $op1_get_zval_ptr, $op2_get_zval_ptr,
$op1_get_zval_ptr_deref, $op2_get_zval_ptr_deref,
$op1_get_zval_ptr_undef, $op2_get_zval_ptr_undef,
@@ -475,7 +673,9 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
$op1_get_obj_zval_ptr_ptr_undef, $op2_get_obj_zval_ptr_ptr_undef,
$op1_free, $op2_free, $op1_free_unfetched, $op2_free_unfetched,
$op1_free_op, $op2_free_op, $op1_free_op_if_var, $op2_free_op_if_var,
- $op1_free_op_var_ptr, $op2_free_op_var_ptr, $prefix;
+ $op1_free_op_var_ptr, $op2_free_op_var_ptr, $prefix,
+ $op_data_type, $op_data_get_zval_ptr, $op_data_get_zval_ptr_deref,
+ $op_data_free_op, $op_data_free_unfetched;
// Specializing
$code = preg_replace(
@@ -521,7 +721,18 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
"/^#(\s*)if\s+1\s*\\|\\|.*[^\\\\]$/m",
"/^#(\s*)if\s+0\s*&&.*[^\\\\]$/m",
"/^#(\s*)ifdef\s+ZEND_VM_EXPORT\s*\n/m",
- "/^#(\s*)ifndef\s+ZEND_VM_EXPORT\s*\n/m"
+ "/^#(\s*)ifndef\s+ZEND_VM_EXPORT\s*\n/m",
+ "/OP_DATA_TYPE/",
+ "/GET_OP_DATA_ZVAL_PTR\(([^)]*)\)/",
+ "/GET_OP_DATA_ZVAL_PTR_DEREF\(([^)]*)\)/",
+ "/FREE_OP_DATA\(\)/",
+ "/FREE_UNFETCHED_OP_DATA\(\)/",
+ "/RETURN_VALUE_USED\(opline\)/",
+ "/arg_num <= MAX_ARG_FLAG_NUM/",
+ "/ZEND_VM_SMART_BRANCH\(\s*([^,)]*)\s*,\s*([^)]*)\s*\)/",
+ "/opline->extended_value\s*==\s*0/",
+ "/opline->extended_value\s*==\s*ZEND_ASSIGN_DIM/",
+ "/opline->extended_value\s*==\s*ZEND_ASSIGN_OBJ/",
),
array(
$op1_type[$op1],
@@ -560,12 +771,34 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
($op1!="ANY"||$op2!="ANY")?"#\\1if 0\n":"#\\1if 1\n",
($op1!="ANY"||$op2!="ANY")?"0":"1",
($op1!="ANY"||$op2!="ANY")?"1":"0",
- "\\1".(($spec && $kind != ZEND_VM_KIND_CALL)?("_SPEC".$prefix[$op1].$prefix[$op2]):""),
- "goto \\1".(($spec && $kind != ZEND_VM_KIND_CALL)?("_SPEC".$prefix[$op1].$prefix[$op2]):""),
+ "\\1".(($spec && $kind != ZEND_VM_KIND_CALL)?("_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec)):""),
+ "goto \\1".(($spec && $kind != ZEND_VM_KIND_CALL)?("_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec)):""),
"#\\1if 1",
"#\\1if 0",
$export?"#\\1if 1\n":"#\\1if 0\n",
- $export?"#\\1if 0\n":"#\\1if 1\n"
+ $export?"#\\1if 0\n":"#\\1if 1\n",
+ $op_data_type[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"],
+ $op_data_get_zval_ptr[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"],
+ $op_data_get_zval_ptr_deref[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"],
+ $op_data_free_op[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"],
+ $op_data_free_unfetched[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"],
+ isset($extra_spec['RETVAL']) ? $extra_spec['RETVAL'] : "RETURN_VALUE_USED(opline)",
+ isset($extra_spec['QUICK_ARG']) ? $extra_spec['QUICK_ARG'] : "arg_num <= MAX_ARG_FLAG_NUM",
+ isset($extra_spec['SMART_BRANCH']) ?
+ ($extra_spec['SMART_BRANCH'] == 1 ?
+ "ZEND_VM_SMART_BRANCH_JMPZ(\\1, \\2)"
+ : ($extra_spec['SMART_BRANCH'] == 2 ?
+ "ZEND_VM_SMART_BRANCH_JMPNZ(\\1, \\2)" : ""))
+ : "ZEND_VM_SMART_BRANCH(\\1, \\2)",
+ isset($extra_spec['DIM_OBJ']) ?
+ ($extra_spec['DIM_OBJ'] == 0 ? "1" : "0")
+ : "\\0",
+ isset($extra_spec['DIM_OBJ']) ?
+ ($extra_spec['DIM_OBJ'] == 1 ? "1" : "0")
+ : "\\0",
+ isset($extra_spec['DIM_OBJ']) ?
+ ($extra_spec['DIM_OBJ'] == 2 ? "1" : "0")
+ : "\\0",
),
$code);
@@ -579,17 +812,20 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
array(
"/EXECUTE_DATA/m",
"/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*[A-Za-z_]*\s*,\s*(.*)\s*\);/m",
+ "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*(,[^)]*)?\)/m",
),
function($matches) use ($spec, $prefix, $op1, $op2) {
if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
return "execute_data";
} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
- return "ZEND_VM_TAIL_CALL(" . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))";
- } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
- return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2) . "(" . $matches[2]. " ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));";
+ return "ZEND_VM_TAIL_CALL(" . opcode_name($matches[1], $spec, $op1, $op2) . "_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))";
} else {
+ // ZEND_VM_DISPATCH_TO_HELPER
+ if (isset($matches[2])) {
+ // extra args
+ $args = substr(preg_replace("/,\s*[A-Za-z_]*\s*,\s*([^,)\s]*)\s*/", ", $1", $matches[2]), 2);
+ return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2) . "(" . $args. " ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC))";
+ }
return "ZEND_VM_TAIL_CALL(" . helper_name($matches[1], $spec, $op1, $op2) . "(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU))";
}
},
@@ -600,17 +836,20 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
array(
"/EXECUTE_DATA/m",
"/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*([A-Za-z_]*)\s*,\s*(.*)\s*\);/m",
+ "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*(,[^)]*)?\)/m",
),
function($matches) use ($spec, $prefix, $op1, $op2) {
if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
return "execute_data";
} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
- return "goto " . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_LABEL";
- } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
- return $matches[2] . " = " . $matches[3] . "; goto " . helper_name($matches[1], $spec, $op1, $op2) . ";";
+ return "goto " . opcode_name($matches[1], $spec, $op1, $op2) . "_LABEL";
} else {
+ // ZEND_VM_DISPATCH_TO_HELPER
+ if (isset($matches[2])) {
+ // extra args
+ $args = preg_replace("/,\s*([A-Za-z_]*)\s*,\s*([^,)\s]*)\s*/", "$1 = $2; ", $matches[2]);
+ return $args . "goto " . helper_name($matches[1], $spec, $op1, $op2);
+ }
return "goto " . helper_name($matches[1], $spec, $op1, $op2);
}
},
@@ -621,17 +860,20 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
array(
"/EXECUTE_DATA/m",
"/ZEND_VM_DISPATCH_TO_HANDLER\(\s*([A-Z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*\)/m",
- "/ZEND_VM_DISPATCH_TO_HELPER_EX\(\s*([A-Za-z_]*)\s*,\s*([A-Za-z_]*)\s*,\s*(.*)\s*\);/m",
+ "/ZEND_VM_DISPATCH_TO_HELPER\(\s*([A-Za-z_]*)\s*(,[^)]*)?\)/m",
),
function($matches) use ($spec, $prefix, $op1, $op2) {
if (strncasecmp($matches[0], "EXECUTE_DATA", strlen("EXECUTE_DATA")) == 0) {
return "execute_data";
} else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HANDLER", strlen("ZEND_VM_DISPATCH_TO_HANDLER")) == 0) {
- return "goto " . $matches[1] . ($spec?"_SPEC":"") . $prefix[$op1] . $prefix[$op2] . "_HANDLER";
- } else if (strncasecmp($matches[0], "ZEND_VM_DISPATCH_TO_HELPER_EX", strlen("ZEND_VM_DISPATCH_TO_HELPER_EX")) == 0) {
- return $matches[2] . " = " . $matches[3] . "; goto " . helper_name($matches[1], $spec, $op1, $op2) . ";";
+ return "goto " . opcode_name($matches[1], $spec, $op1, $op2) . "_HANDLER";
} else {
+ // ZEND_VM_DISPATCH_TO_HELPER
+ if (isset($matches[2])) {
+ // extra args
+ $args = preg_replace("/,\s*([A-Za-z_]*)\s*,\s*([^,)\s]*)\s*/", "$1 = $2; ", $matches[2]);
+ return $args . "goto " . helper_name($matches[1], $spec, $op1, $op2);
+ }
return "goto " . helper_name($matches[1], $spec, $op1, $op2);
}
},
@@ -648,6 +890,7 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
}
$del_free_op1 = (strpos($code, "free_op1") === false);
$del_free_op2 = (strpos($code, "free_op2") === false);
+ $del_free_op_data = (strpos($code, "free_op_data") === false);
$n = 0;
foreach ($matches as $match) {
$dcl = $match[0];
@@ -662,6 +905,11 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
$dcl = preg_replace("/free_op2\s*;/", ";", $dcl);
$changed = 1;
}
+ if ($del_free_op_data && strpos($dcl, "free_op_data") !== false) {
+ $dcl = preg_replace("/free_op_data\s*,\s*/", "", $dcl);
+ $dcl = preg_replace("/free_op_data\s*;/", ";", $dcl);
+ $changed = 1;
+ }
if ($changed) {
$dcl = preg_replace("/,\s*;/", ";", $dcl);
$dcl = preg_replace("/zend_free_op\s*;/", "", $dcl);
@@ -681,42 +929,67 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
}
// Generates opcode handler
-function gen_handler($f, $spec, $kind, $name, $op1, $op2, $use, $code, $lineno) {
- global $definition_file, $prefix, $typecode, $opnames;
+function gen_handler($f, $spec, $kind, $name, $op1, $op2, $use, $code, $lineno, $extra_spec = null, &$switch_labels = array()) {
+ global $definition_file, $prefix, $typecode, $opnames, $commutative_order;
+
+ if ($spec &&
+ isset($extra_spec["NO_CONST_CONST"]) &&
+ $op1 == "CONST" && $op2 == "CONST") {
+ // Skip useless constant handlers
+ return;
+ }
+
+ if ($spec &&
+ isset($extra_spec["COMMUTATIVE"]) &&
+ $commutative_order[$op1] > $commutative_order[$op2]) {
+ // Skip duplicate commutative handlers
+ return;
+ }
+
+ if ($spec &&
+ isset($extra_spec["DIM_OBJ"]) &&
+ (($op2 == "UNUSED" && $extra_spec["DIM_OBJ"] != 1) ||
+ ($op1 == "UNUSED" && $extra_spec["DIM_OBJ"] == 0))) {
+ // Skip useless handlers
+ return;
+ }
if (ZEND_VM_LINES) {
out($f, "#line $lineno \"$definition_file\"\n");
}
// Generate opcode handler's entry point according to selected threading model
+ $spec_name = $name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2].($spec?extra_spec_name($extra_spec):"");
switch($kind) {
case ZEND_VM_KIND_CALL:
- out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n");
+ out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL {$spec_name}_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n");
break;
case ZEND_VM_KIND_SWITCH:
if ($spec) {
- out($f,"case ".((string)($opnames[$name]*25+($typecode[$op1=="TMPVAR"?"TMP":$op1]*5)+$typecode[$op2=="TMPVAR"?"TMP":$op2])).": /*".$name."_SPEC".$prefix[$op1].$prefix[$op2]."_HANDLER*/");
+ $cur = $switch_labels ? end($switch_labels) + 1 : 0;
+ out($f,"case $cur: /* $spec_name */");
+ $switch_labels[$spec_name] = $cur;
} else {
out($f,"case ".$name.":");
}
if ($use) {
// This handler is used by other handlers. We will add label to call it.
- out($f," ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_LABEL:\n");
+ out($f," {$spec_name}_LABEL:\n");
} else {
out($f,"\n");
}
break;
case ZEND_VM_KIND_GOTO:
- out($f,$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER: ZEND_VM_GUARD(".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2].");\n");
+ out($f,"{$spec_name}_HANDLER: ZEND_VM_GUARD($spec_name);\n");
break;
}
// Generate opcode handler's code
- gen_code($f, $spec, $kind, 0, $code, $op1, $op2, $name);
+ gen_code($f, $spec, $kind, 0, $code, $op1, $op2, $name, $extra_spec);
}
// Generates helper
-function gen_helper($f, $spec, $kind, $name, $op1, $op2, $param, $code, $lineno) {
+function gen_helper($f, $spec, $kind, $name, $op1, $op2, $param, $code, $lineno, $inline) {
global $definition_file, $prefix;
if (ZEND_VM_LINES) {
@@ -726,12 +999,19 @@ function gen_helper($f, $spec, $kind, $name, $op1, $op2, $param, $code, $lineno)
// Generate helper's entry point according to selected threading model
switch($kind) {
case ZEND_VM_KIND_CALL:
+ if ($inline) {
+ $zend_always_inline = " zend_always_inline";
+ $zend_fastcall = "";
+ } else {
+ $zend_always_inline = "";
+ $zend_fastcall = " ZEND_FASTCALL";
+ }
if ($param == null) {
// Helper without parameters
- out($f, "static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."(ZEND_OPCODE_HANDLER_ARGS)\n");
+ out($f, "static$zend_always_inline ZEND_OPCODE_HANDLER_RET$zend_fastcall ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."(ZEND_OPCODE_HANDLER_ARGS)\n");
} else {
// Helper with parameter
- out($f, "static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."(".$param." ZEND_OPCODE_HANDLER_ARGS_DC)\n");
+ out($f, "static$zend_always_inline ZEND_OPCODE_HANDLER_RET$zend_fastcall ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."(".$param." ZEND_OPCODE_HANDLER_ARGS_DC)\n");
}
break;
case ZEND_VM_KIND_SWITCH:
@@ -746,103 +1026,212 @@ function gen_helper($f, $spec, $kind, $name, $op1, $op2, $param, $code, $lineno)
gen_code($f, $spec, $kind, 0, $code, $op1, $op2, $name);
}
+
+function gen_null_label($f, $kind, $prolog) {
+ switch ($kind) {
+ case ZEND_VM_KIND_CALL:
+ out($f,$prolog."ZEND_NULL_HANDLER,\n");
+ break;
+ case ZEND_VM_KIND_SWITCH:
+ out($f,$prolog."(void*)(uintptr_t)-1,\n");
+ break;
+ case ZEND_VM_KIND_GOTO:
+ out($f,$prolog."(void*)&&ZEND_NULL_HANDLER,\n");
+ break;
+ }
+}
+
// Generates array of opcode handlers (specialized or unspecialized)
-function gen_labels($f, $spec, $kind, $prolog) {
- global $opcodes, $op_types, $prefix, $typecode;
+function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array()) {
+ global $opcodes, $op_types, $prefix;
$next = 0;
+ $label = 0;
if ($spec) {
// Emit labels for specialized executor
// For each opcode in opcode number order
foreach($opcodes as $num => $dsc) {
- while ($next != $num) {
- // If some opcode numbers are not used then fill hole with pointers
- // to handler of undefined opcode
- $op1t = $op_types;
- // For each op1.op_type except ANY
- foreach($op1t as $op1) {
- if ($op1 != "ANY") {
- $op2t = $op_types;
- // For each op2.op_type except ANY
- foreach($op2t as $op2) {
- if ($op2 != "ANY") {
- // Emit pointer to handler of undefined opcode
- switch ($kind) {
- case ZEND_VM_KIND_CALL:
- out($f,$prolog."ZEND_NULL_HANDLER,\n");
- break;
- case ZEND_VM_KIND_SWITCH:
- out($f,$prolog."(void*)(uintptr_t)-1,\n");
- break;
- case ZEND_VM_KIND_GOTO:
- out($f,$prolog."(void*)&&ZEND_NULL_HANDLER,\n");
- break;
+ $specs[$num] = "$label";
+ $spec_op1 = $spec_op2 = $spec_extra = false;
+ $next = $num + 1;
+ $diff = array_diff_key(array_flip($op_types), isset($dsc["op1"]) ? $dsc["op1"] : array());
+ if ((count($diff) == count($op_types) - 1 ? isset($diff["ANY"]) : count($diff) != count($op_types)) || isset($dsc["op1"]["TMPVAR"]) || isset($dsc["op1"]["TMPVARCV"])) {
+ $spec_op1 = true;
+ $specs[$num] .= " | SPEC_RULE_OP1";
+ }
+ $diff = array_diff_key(array_flip($op_types), isset($dsc["op2"]) ? $dsc["op2"] : array());
+ if ((count($diff) == count($op_types) - 1 ? isset($diff["ANY"]) : count($diff) != count($op_types)) || isset($dsc["op2"]["TMPVAR"]) || isset($dsc["op2"]["TMPVARCV"])) {
+ $spec_op2 = true;
+ $specs[$num] .= " | SPEC_RULE_OP2";
+ }
+ $spec_extra = call_user_func_array("array_merge", extra_spec_handler($dsc) ?: array(array()));
+ $flags = extra_spec_flags($spec_extra);
+ if ($flags) {
+ $specs[$num] .= " | ".implode("|", $flags);
+ }
+ if ($num >= 256) {
+ $opcodes[$num]['spec_code'] = $specs[$num];
+ unset($specs[$num]);
+ }
+
+ $foreach_op1 = function($do) use ($dsc, $op_types) {
+ return function() use ($do, $dsc, $op_types) {
+ // For each op1.op_type except ANY
+ foreach($op_types as $op1) {
+ if ($op1 != "ANY") {
+ if (!isset($dsc["op1"][$op1])) {
+ if ($op1 == "TMP" || $op1 == "VAR") {
+ if (isset($dsc["op1"]["TMPVAR"])) {
+ $op1 = "TMPVAR";
+ } else if (isset($dsc["op1"]["TMPVARCV"])) {
+ $op1 = "TMPVARCV";
+ } else {
+ $op1 = "ANY";
+ }
+ } else if ($op1 == "CV" && isset($dsc["op1"]["TMPVARCV"])) {
+ $op1 = "TMPVARCV";
+ } else {
+ // Try to use unspecialized handler
+ $op1 = "ANY";
}
}
+ $do($op1, "ANY");
}
}
- }
- $next++;
- }
- $next = $num + 1;
- $op1t = $op_types;
- // For each op1.op_type except ANY
- foreach($op1t as $op1) {
- if ($op1 != "ANY") {
- if (!isset($dsc["op1"][$op1])) {
- if (($op1 == "TMP" || $op1 == "VAR") && isset($dsc["op1"]["TMPVAR"])) {
- $op1 = "TMPVAR";
- } else {
- // Try to use unspecialized handler
- $op1 = "ANY";
- }
- }
- $op2t = $op_types;
+ };
+ };
+ $foreach_op2 = function($do) use ($dsc, $op_types) {
+ return function($op1) use ($do, $dsc, $op_types) {
// For each op2.op_type except ANY
- foreach($op2t as $op2) {
+ foreach($op_types as $op2) {
if ($op2 != "ANY") {
if (!isset($dsc["op2"][$op2])) {
- if (($op2 == "TMP" || $op2 == "VAR") && isset($dsc["op2"]["TMPVAR"])) {
- $op2 = "TMPVAR";
+ if ($op2 == "TMP" || $op2 == "VAR") {
+ if (isset($dsc["op2"]["TMPVAR"])) {
+ $op2 = "TMPVAR";
+ } else if (isset($dsc["op2"]["TMPVARCV"])) {
+ $op2 = "TMPVARCV";
+ } else {
+ $op2 = "ANY";
+ }
+ } else if ($op2 == "CV" && isset($dsc["op2"]["TMPVARCV"])) {
+ $op2 = "TMPVARCV";
} else {
// Try to use unspecialized handler
$op2 = "ANY";
}
}
- // Check if specialized handler is defined
- if (isset($dsc["op1"][$op1]) &&
- isset($dsc["op2"][$op2])) {
- // Emit pointer to specialized handler
- switch ($kind) {
- case ZEND_VM_KIND_CALL:
- out($f,$prolog.$dsc["op"]."_SPEC".$prefix[$op1].$prefix[$op2]."_HANDLER,\n");
- break;
- case ZEND_VM_KIND_SWITCH:
- out($f,$prolog."(void*)(uintptr_t)".((string)($num*25+$typecode[$op1=="TMPVAR"?"TMP":$op1]*5+$typecode[$op2=="TMPVAR"?"TMP":$op2])).",\n");
- break;
- case ZEND_VM_KIND_GOTO:
- out($f,$prolog."(void*)&&".$dsc["op"]."_SPEC".$prefix[$op1].$prefix[$op2]."_HANDLER,\n");
- break;
- }
- } else {
- // Emit pinter to handler of undefined opcode
- switch ($kind) {
- case ZEND_VM_KIND_CALL:
- out($f,$prolog."ZEND_NULL_HANDLER,\n");
- break;
- case ZEND_VM_KIND_SWITCH:
- out($f,$prolog."(void*)(uintptr_t)-1,\n");
- break;
- case ZEND_VM_KIND_GOTO:
- out($f,$prolog."(void*)&&ZEND_NULL_HANDLER,\n");
- break;
+ $do($op1, $op2);
+ }
+ }
+ };
+ };
+ $foreach_op_data = function($do) use ($dsc, $op_types) {
+ return function($op1, $op2, $extra_spec = array()) use ($do, $dsc, $op_types) {
+ // For each op_data.op_type except ANY
+ foreach($op_types as $op_data) {
+ if ($op_data != "ANY") {
+ if (!isset($dsc["spec"]["OP_DATA"][$op_data])) {
+ if ($op_data == "TMP" || $op_data == "VAR") {
+ if (isset($dsc["spec"]["OP_DATA"]["TMPVAR"])) {
+ $op_data = "TMPVAR";
+ } else if (isset($dsc["spec"]["OP_DATA"]["TMPVARCV"])) {
+ $op_data = "TMPVARCV";
+ } else {
+ // Try to use unspecialized handler
+ $op_data = "ANY";
+ }
+ } else if ($op_data == "CV" && isset($dsc["OP_DATA"]["TMPVARCV"])) {
+ $op_data = "TMPVARCV";
+ } else {
+ // Try to use unspecialized handler
+ $op_data = "ANY";
}
}
+ $do($op1, $op2, array("OP_DATA" => $op_data) + $extra_spec);
}
}
+ };
+ };
+ $foreach_extra_spec = function($do, $spec) use ($dsc) {
+ return function($op1, $op2, $extra_spec = array()) use ($do, $spec, $dsc) {
+ foreach ($dsc["spec"][$spec] as $val) {
+ $do($op1, $op2, array($spec => $val) + $extra_spec);
+ }
+ };
+ };
+ $generate = function ($op1, $op2, $extra_spec = array()) use ($f, $kind, $dsc, $prefix, $prolog, $num, $switch_labels, &$label) {
+ global $typecode, $commutative_order;
+
+ // Check if specialized handler is defined
+ /* TODO: figure out better way to signal "specialized and not defined" than an extra lookup */
+ if (isset($dsc["op1"][$op1]) &&
+ isset($dsc["op2"][$op2]) &&
+ (!isset($extra_spec["OP_DATA"]) || isset($dsc["spec"]["OP_DATA"][$extra_spec["OP_DATA"]]))) {
+
+ if (isset($extra_spec["NO_CONST_CONST"]) &&
+ $op1 == "CONST" && $op2 == "CONST") {
+ // Skip useless constant handlers
+ gen_null_label($f, $kind, $prolog);
+ $label++;
+ return;
+ } else if (isset($extra_spec["COMMUTATIVE"]) &&
+ $commutative_order[$op1] > $commutative_order[$op2]) {
+ // Skip duplicate commutative handlers
+ gen_null_label($f, $kind, $prolog);
+ $label++;
+ return;
+ } else if (isset($extra_spec["DIM_OBJ"]) &&
+ (($op2 == "UNUSED" && $extra_spec["DIM_OBJ"] != 1) ||
+ ($op1 == "UNUSED" && $extra_spec["DIM_OBJ"] == 0))) {
+ // Skip useless handlers
+ gen_null_label($f, $kind, $prolog);
+ $label++;
+ return;
+ }
+
+ // Emit pointer to specialized handler
+ $spec_name = $dsc["op"]."_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec);
+ switch ($kind) {
+ case ZEND_VM_KIND_CALL:
+ out($f,"$prolog{$spec_name}_HANDLER,\n");
+ $label++;
+ break;
+ case ZEND_VM_KIND_SWITCH:
+ out($f,$prolog."(void*)(uintptr_t)$switch_labels[$spec_name],\n");
+ $label++;
+ break;
+ case ZEND_VM_KIND_GOTO:
+ out($f,$prolog."(void*)&&{$spec_name}_HANDLER,\n");
+ $label++;
+ break;
+ }
+ } else {
+ // Emit pointer to handler of undefined opcode
+ gen_null_label($f, $kind, $prolog);
+ $label++;
+ }
+ };
+
+ $do = $generate;
+ if ($spec_extra) {
+ foreach ($spec_extra as $extra => $devnull) {
+ if ($extra == "OP_DATA") {
+ $do = $foreach_op_data($do);
+ } else {
+ $do = $foreach_extra_spec($do, $extra);
+ }
}
}
+ if ($spec_op2) {
+ $do = $foreach_op2($do);
+ }
+ if ($spec_op1) {
+ $do = $foreach_op1($do);
+ }
+
+ $do("ANY", "ANY");
}
} else {
// Emit labels for unspecialized executor
@@ -865,6 +1254,9 @@ function gen_labels($f, $spec, $kind, $prolog) {
}
$next++;
}
+ if ($num >= 256) {
+ continue;
+ }
$next = $num+1;
//ugly trick for ZEND_VM_DEFINE_OP
@@ -909,6 +1301,21 @@ function gen_labels($f, $spec, $kind, $prolog) {
out($f,$prolog."(void*)&&ZEND_NULL_HANDLER\n");
break;
}
+ $specs[$num + 1] = "$label";
+}
+
+// Generates specialized offsets
+function gen_specs($f, $spec, $kind, $prolog, $specs) {
+ $lastdef = array_pop($specs);
+ $last = 0;
+ foreach ($specs as $num => $def) {
+ while (++$last < $num) {
+ out($f, "$prolog$lastdef,\n");
+ }
+ $last = $num;
+ out($f, "$prolog$def,\n");
+ }
+ out($f, "$prolog$lastdef\n");
}
// Generates handler for undefined opcodes (CALL threading model)
@@ -921,14 +1328,105 @@ function gen_null_handler($f) {
$done = 1;
out($f,"static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n");
out($f,"{\n");
+ out($f,"\tUSE_OPLINE\n");
+ out($f,"\n");
out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
out($f,"\tZEND_VM_NEXT_OPCODE(); /* Never reached */\n");
out($f,"}\n\n");
}
}
+function extra_spec_name($extra_spec) {
+ global $prefix;
+
+ $s = "";
+ if (isset($extra_spec["OP_DATA"])) {
+ $s .= "_OP_DATA" . $prefix[$extra_spec["OP_DATA"]];
+ }
+ if (isset($extra_spec["RETVAL"])) {
+ $s .= "_RETVAL_".($extra_spec["RETVAL"] ? "USED" : "UNUSED");
+ }
+ if (isset($extra_spec["QUICK_ARG"])) {
+ if ($extra_spec["QUICK_ARG"]) {
+ $s .= "_QUICK";
+ }
+ }
+ if (isset($extra_spec["SMART_BRANCH"])) {
+ if ($extra_spec["SMART_BRANCH"] == 1) {
+ $s .= "_JMPZ";
+ } else if ($extra_spec["SMART_BRANCH"] == 2) {
+ $s .= "_JMPNZ";
+ }
+ }
+ if (isset($extra_spec["DIM_OBJ"])) {
+ if ($extra_spec["DIM_OBJ"] == 1) {
+ $s .= "_DIM";
+ } else if ($extra_spec["DIM_OBJ"] == 2) {
+ $s .= "_OBJ";
+ }
+ }
+ return $s;
+}
+
+function extra_spec_flags($extra_spec) {
+ $s = array();
+ if (isset($extra_spec["OP_DATA"])) {
+ $s[] = "SPEC_RULE_OP_DATA";
+ }
+ if (isset($extra_spec["RETVAL"])) {
+ $s[] = "SPEC_RULE_RETVAL";
+ }
+ if (isset($extra_spec["QUICK_ARG"])) {
+ $s[] = "SPEC_RULE_QUICK_ARG";
+ }
+ if (isset($extra_spec["SMART_BRANCH"])) {
+ $s[] = "SPEC_RULE_SMART_BRANCH";
+ }
+ if (isset($extra_spec["DIM_OBJ"])) {
+ $s[] = "SPEC_RULE_DIM_OBJ";
+ }
+ return $s;
+}
+
+function extra_spec_handler($dsc) {
+ global $op_types_ex;
+
+ if (!isset($dsc["spec"])) {
+ return array(array());
+ }
+ $specs = $dsc["spec"];
+
+ if (isset($specs["OP_DATA"])) {
+ $op_data_specs = $specs["OP_DATA"];
+ $specs["OP_DATA"] = array();
+ foreach($op_types_ex as $op_data) {
+ if (isset($dsc["spec"]["OP_DATA"][$op_data])) {
+ $specs["OP_DATA"][] = $op_data;
+ }
+ }
+ }
+
+ $f = function($specs) use (&$f) {
+ $spec = key($specs);
+ $top = array_shift($specs);
+ if ($specs) {
+ $next = $f($specs);
+ } else {
+ $next = array(array());
+ }
+ $ret = array();
+ foreach ($next as $existing) {
+ foreach ($top as $mode) {
+ $ret[] = array($spec => $mode) + $existing;
+ }
+ }
+ return $ret;
+ };
+ return $f($specs);
+}
+
// Generates all opcode handlers and helpers (specialized or unspecilaized)
-function gen_executor_code($f, $spec, $kind, $prolog) {
+function gen_executor_code($f, $spec, $kind, $prolog, &$switch_labels = array()) {
global $list, $opcodes, $helpers, $op_types_ex;
if ($spec) {
@@ -943,11 +1441,13 @@ function gen_executor_code($f, $spec, $kind, $prolog) {
foreach ($list as $lineno => $dsc) {
if (isset($dsc["handler"])) {
$num = $dsc["handler"];
- // Check if handler accepts such types of operands (op1 and op2)
- if (isset($opcodes[$num]["op1"][$op1]) &&
- isset($opcodes[$num]["op2"][$op2])) {
- // Generate handler code
- gen_handler($f, 1, $kind, $opcodes[$num]["op"], $op1, $op2, isset($opcodes[$num]["use"]), $opcodes[$num]["code"], $lineno);
+ foreach (extra_spec_handler($opcodes[$num]) as $extra_spec) {
+ // Check if handler accepts such types of operands (op1 and op2)
+ if (isset($opcodes[$num]["op1"][$op1]) &&
+ isset($opcodes[$num]["op2"][$op2])) {
+ // Generate handler code
+ gen_handler($f, 1, $kind, $opcodes[$num]["op"], $op1, $op2, isset($opcodes[$num]["use"]), $opcodes[$num]["code"], $lineno, $extra_spec, $switch_labels);
+ }
}
} else if (isset($dsc["helper"])) {
$num = $dsc["helper"];
@@ -955,7 +1455,7 @@ function gen_executor_code($f, $spec, $kind, $prolog) {
if (isset($helpers[$num]["op1"][$op1]) &&
isset($helpers[$num]["op2"][$op2])) {
// Generate helper code
- gen_helper($f, 1, $kind, $num, $op1, $op2, $helpers[$num]["param"], $helpers[$num]["code"], $lineno);
+ gen_helper($f, 1, $kind, $num, $op1, $op2, $helpers[$num]["param"], $helpers[$num]["code"], $lineno, $helpers[$num]["inline"]);
}
} else {
var_dump($dsc);
@@ -971,12 +1471,14 @@ function gen_executor_code($f, $spec, $kind, $prolog) {
foreach ($list as $lineno => $dsc) {
if (isset($dsc["handler"])) {
$num = $dsc["handler"];
- // Generate handler code
- gen_handler($f, 0, $kind, $opcodes[$num]["op"], "ANY", "ANY", isset($opcodes[$num]["use"]), $opcodes[$num]["code"], $lineno);
+ // Generate handler code
+ if ($num < 256) {
+ gen_handler($f, 0, $kind, $opcodes[$num]["op"], "ANY", "ANY", isset($opcodes[$num]["use"]), $opcodes[$num]["code"], $lineno);
+ }
} else if (isset($dsc["helper"])) {
$num = $dsc["helper"];
- // Generate helper code
- gen_helper($f, 0, $kind, $num, "ANY", "ANY", $helpers[$num]["param"], $helpers[$num]["code"], $lineno);
+ // Generate helper code
+ gen_helper($f, 0, $kind, $num, "ANY", "ANY", $helpers[$num]["param"], $helpers[$num]["code"], $lineno, $helpers[$num]["inline"]);
} else {
var_dump($dsc);
die("??? $kind:$num\n");
@@ -1017,24 +1519,40 @@ function skip_blanks($f, $prolog, $epilog) {
function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name) {
global $params, $skeleton_file, $line_no;
- $lineno = 0;
+ $switch_labels = array();
+ $lineno = 0;
foreach ($skl as $line) {
// Skeleton file contains special markers in form %NAME% those are
// substituted by custom code
if (preg_match("/(.*)[{][%]([A-Z_]*)[%][}](.*)/", $line, $m)) {
switch ($m[2]) {
case "DEFINES":
+ out($f,"#define SPEC_START_MASK 0x0000ffff\n");
+ out($f,"#define SPEC_RULE_OP1 0x00010000\n");
+ out($f,"#define SPEC_RULE_OP2 0x00020000\n");
+ out($f,"#define SPEC_RULE_OP_DATA 0x00040000\n");
+ out($f,"#define SPEC_RULE_RETVAL 0x00080000\n");
+ out($f,"#define SPEC_RULE_QUICK_ARG 0x00100000\n");
+ out($f,"#define SPEC_RULE_SMART_BRANCH 0x00200000\n");
+ out($f,"#define SPEC_RULE_DIM_OBJ 0x00400000\n");
+ out($f,"\n");
+ out($f,"static const uint32_t *zend_spec_handlers;\n");
out($f,"static const void **zend_opcode_handlers;\n");
+ out($f,"static int zend_handlers_count;\n");
out($f,"static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op);\n\n");
switch ($kind) {
case ZEND_VM_KIND_CALL:
out($f,"\n");
out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
- out($f,"register zend_execute_data *execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);\n");
+ out($f,"#pragma GCC diagnostic ignored \"-Wvolatile-register-var\"\n");
+ out($f,"register zend_execute_data* volatile execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);\n");
+ out($f,"#pragma GCC diagnostic warning \"-Wvolatile-register-var\"\n");
out($f,"#endif\n");
out($f,"\n");
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
- out($f,"register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
+ out($f,"#pragma GCC diagnostic ignored \"-Wvolatile-register-var\"\n");
+ out($f,"register const zend_op* volatile opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
+ out($f,"#pragma GCC diagnostic warning \"-Wvolatile-register-var\"\n");
out($f,"#endif\n");
out($f,"\n");
out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
@@ -1052,8 +1570,12 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
out($f,"# define ZEND_OPCODE_HANDLER_RET void\n");
out($f,"# define ZEND_VM_TAIL_CALL(call) call; return\n");
- out($f,"# define ZEND_VM_CONTINUE() return\n");
- out($f,"# define ZEND_VM_RETURN() opline = NULL; ZEND_VM_CONTINUE()\n");
+ out($f,"# ifdef ZEND_VM_TAIL_CALL_DISPATCH\n");
+ out($f,"# define ZEND_VM_CONTINUE() ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); return\n");
+ out($f,"# else\n");
+ out($f,"# define ZEND_VM_CONTINUE() return\n");
+ out($f,"# endif\n");
+ out($f,"# define ZEND_VM_RETURN() opline = NULL; return\n");
out($f,"#else\n");
out($f,"# define ZEND_OPCODE_HANDLER_RET int\n");
out($f,"# define ZEND_VM_TAIL_CALL(call) return call\n");
@@ -1067,27 +1589,28 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef LOAD_OPLINE_EX\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#define DCL_OPLINE\n");
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
out($f,"# define OPLINE opline\n");
out($f,"# define USE_OPLINE\n");
out($f,"# define LOAD_OPLINE() opline = EX(opline)\n");
+ out($f,"# define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
out($f,"# define SAVE_OPLINE() EX(opline) = opline\n");
out($f,"#else\n");
out($f,"# define OPLINE EX(opline)\n");
out($f,"# define USE_OPLINE const zend_op *opline = EX(opline);\n");
out($f,"# define LOAD_OPLINE()\n");
+ out($f,"# define LOAD_NEXT_OPLINE() ZEND_VM_INC_OPCODE()\n");
out($f,"# define SAVE_OPLINE()\n");
out($f,"#endif\n");
- out($f,"#undef CHECK_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
- out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG)\n");
- out($f,"# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
+ out($f,"# define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()\n");
out($f,"# define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
out($f,"#elif defined(ZEND_VM_IP_GLOBAL_REG)\n");
out($f,"# define ZEND_VM_ENTER() opline = EG(current_execute_data)->opline; return 1\n");
@@ -1105,21 +1628,25 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#define OPLINE opline\n");
- out($f,"#define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
+ out($f,"# define DCL_OPLINE register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
+ out($f,"#else\n");
+ out($f,"# define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#endif\n");
out($f,"#define USE_OPLINE\n");
out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
+ out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
- out($f,"#undef CHECK_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
- out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
out($f,"#define ZEND_VM_CONTINUE() goto zend_vm_continue\n");
out($f,"#define ZEND_VM_RETURN() return\n");
- out($f,"#define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
+ out($f,"#define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_DISPATCH(opcode, opline) dispatch_handler = zend_vm_get_opcode_handler(opcode, opline); goto zend_vm_dispatch;\n");
out($f,"\n");
@@ -1130,27 +1657,30 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#define OPLINE opline\n");
- out($f,"#define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
+ out($f,"# define DCL_OPLINE register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);\n");
+ out($f,"#else\n");
+ out($f,"# define DCL_OPLINE const zend_op *opline;\n");
+ out($f,"#endif\n");
out($f,"#define USE_OPLINE\n");
out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
+ out($f,"#define LOAD_NEXT_OPLINE() opline = EX(opline) + 1\n");
out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
- out($f,"#undef CHECK_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
if (ZEND_VM_SPEC) {
- out($f,"#define CHECK_EXCEPTION() if (UNEXPECTED(EG(exception) != NULL)) goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
} else {
- out($f,"#define CHECK_EXCEPTION() if (UNEXPECTED(EG(exception) != NULL)) goto ZEND_HANDLE_EXCEPTION_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_HANDLER\n");
}
out($f,"#define ZEND_VM_CONTINUE() goto *(void**)(OPLINE->handler)\n");
out($f,"#define ZEND_VM_RETURN() return\n");
- out($f,"#define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
+ out($f,"#define ZEND_VM_ENTER() execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_INTERRUPT_CHECK(); ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
out($f,"#define ZEND_VM_DISPATCH(opcode, opline) goto *(void**)(zend_vm_get_opcode_handler(opcode, opline));\n");
out($f,"\n");
@@ -1169,7 +1699,11 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
foreach ($params as $param => $x) {
out($f,$m[1].$param.";\n");
}
+ out($f,"#ifdef ZEND_VM_FP_GLOBAL_REG\n");
+ out($f,$m[1]."register zend_execute_data *execute_data __asm__(ZEND_VM_FP_GLOBAL_REG) = ex;\n");
+ out($f,"#else\n");
out($f,$m[1]."zend_execute_data *execute_data = ex;\n");
+ out($f,"#endif\n");
} else {
out($f,"#ifdef ZEND_VM_IP_GLOBAL_REG\n");
out($f,$m[1]."const zend_op *orig_opline = opline;\n");
@@ -1187,11 +1721,16 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
// Emit array of labels of opcode handlers and code for
// zend_opcode_handlers initialization
$prolog = $m[1];
- out($f,$prolog."if (execute_data == NULL) {\n");
+ out($f,$prolog."if (UNEXPECTED(execute_data == NULL)) {\n");
out($f,$prolog."\tstatic const void* labels[] = {\n");
- gen_labels($f, $spec, $kind, $prolog."\t\t");
+ gen_labels($f, $spec, $kind, $prolog."\t\t", $specs);
out($f,$prolog."\t};\n");
- out($f,$prolog."\tzend_opcode_handlers = (const void **)labels;\n");
+ out($f,$prolog."static const uint32_t specs[] = {\n");
+ gen_specs($f, $spec, $kind, $prolog."\t", $specs);
+ out($f,$prolog."};\n");
+ out($f,$prolog."\tzend_opcode_handlers = (const void **) labels;\n");
+ out($f,$prolog."\tzend_handlers_count = sizeof(labels) / sizeof(void*);\n");
+ out($f,$prolog."\tzend_spec_handlers = (const uint32_t *) specs;\n");
out($f,$prolog."\treturn;\n");
out($f,$prolog."}\n");
} else {
@@ -1243,6 +1782,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
"#else\n" .
$m[1]."if (EXPECTED(ret > 0)) {\n" .
$m[1]."\texecute_data = EG(current_execute_data);\n".
+ $m[1]."\tZEND_VM_INTERRUPT_CHECK();\n".
$m[1]."} else {\n" .
"# ifdef ZEND_VM_IP_GLOBAL_REG\n" .
$m[1]."\topline = orig_opline;\n" .
@@ -1252,7 +1792,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
"#endif\n");
} else {
// Emit executor code
- gen_executor_code($f, $spec, $kind, $m[1]);
+ gen_executor_code($f, $spec, $kind, $m[1], $switch_labels);
}
break;
case "EXTERNAL_EXECUTOR":
@@ -1273,9 +1813,14 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,$prolog.$executor_name."_ex(NULL);\n");
} else {
out($f,$prolog."static const void *labels[] = {\n");
- gen_labels($f, $spec, $kind, $prolog."\t");
+ gen_labels($f, $spec, $kind, $prolog."\t", $specs, $switch_labels);
+ out($f,$prolog."};\n");
+ out($f,$prolog."static const uint32_t specs[] = {\n");
+ gen_specs($f, $spec, $kind, $prolog."\t", $specs);
out($f,$prolog."};\n");
out($f,$prolog."zend_opcode_handlers = labels;\n");
+ out($f,$prolog."\tzend_handlers_count = sizeof(labels) / sizeof(void*);\n");
+ out($f,$prolog."zend_spec_handlers = specs;\n");
}
break;
default:
@@ -1288,9 +1833,93 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
}
}
+function parse_operand_spec($def, $lineno, $str, &$flags) {
+ global $vm_op_decode;
+
+ $flags = 0;
+ $a = explode("|",$str);
+ foreach($a as $val) {
+ if (isset($vm_op_decode[$val])) {
+ $flags |= $vm_op_decode[$val];
+ } else {
+ die("ERROR ($def:$lineno): Wrong operand type '$str'\n");
+ }
+ }
+ if (!($flags & ZEND_VM_OP_SPEC)) {
+ if (count($a) != 1) {
+ die("ERROR ($def:$lineno): Wrong operand type '$str'\n");
+ }
+ $a = array("ANY");
+ }
+ return array_flip($a);
+}
+
+function parse_ext_spec($def, $lineno, $str) {
+ global $vm_ext_decode;
+
+ $flags = 0;
+ $a = explode("|",$str);
+ foreach($a as $val) {
+ if (isset($vm_ext_decode[$val])) {
+ $flags |= $vm_ext_decode[$val];
+ } else {
+ die("ERROR ($def:$lineno): Wrong extended_value type '$str'\n");
+ }
+ }
+ return $flags;
+}
+
+function parse_spec_rules($def, $lineno, $str) {
+ global $used_extra_spec;
+
+ $ret = array();
+ $a = explode(",", $str);
+ foreach($a as $rule) {
+ $n = strpos($rule, "=");
+ if ($n !== false) {
+ $id = trim(substr($rule, 0, $n));
+ $val = trim(substr($rule, $n+1));
+ switch ($id) {
+ case "OP_DATA":
+ $ret["OP_DATA"] = parse_operand_spec($def, $lineno, $val, $devnull);
+ break;
+ default:
+ die("ERROR ($def:$lineno): Wrong specialization rules '$str'\n");
+ }
+ $used_extra_spec[$id] = 1;
+ } else {
+ switch ($rule) {
+ case "RETVAL":
+ $ret["RETVAL"] = array(0, 1);
+ break;
+ case "QUICK_ARG":
+ $ret["QUICK_ARG"] = array(0, 1);
+ break;
+ case "SMART_BRANCH":
+ $ret["SMART_BRANCH"] = array(0, 1, 2);
+ break;
+ case "DIM_OBJ":
+ $ret["DIM_OBJ"] = array(0, 1, 2);
+ break;
+ case "NO_CONST_CONST":
+ $ret["NO_CONST_CONST"] = array(1);
+ break;
+ case "COMMUTATIVE":
+ $ret["COMMUTATIVE"] = array(1);
+ break;
+ default:
+ die("ERROR ($def:$lineno): Wrong specialization rules '$str'\n");
+ }
+ $used_extra_spec[$rule] = 1;
+ }
+ }
+ return $ret;
+}
+
function gen_vm($def, $skel) {
global $definition_file, $skeleton_file, $executor_file,
- $op_types, $list, $opcodes, $helpers, $params, $opnames;
+ $op_types, $list, $opcodes, $helpers, $params, $opnames,
+ $vm_op_flags, $used_extra_spec;
// Load definition file
$in = @file($def);
@@ -1314,13 +1943,14 @@ function gen_vm($def, $skel) {
$helper = null;
$max_opcode_len = 0;
$max_opcode = 0;
+ $extra_num = 256;
$export = array();
foreach ($in as $line) {
++$lineno;
if (strpos($line,"ZEND_VM_HANDLER(") === 0) {
// Parsing opcode handler's definition
if (preg_match(
- "/^ZEND_VM_HANDLER\(\s*([0-9]+)\s*,\s*([A-Z_]+)\s*,\s*([A-Z|]+)\s*,\s*([A-Z|]+)\s*\)/",
+ "/^ZEND_VM_HANDLER\(\s*([0-9]+)\s*,\s*([A-Z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(,\s*([A-Z_|]+)\s*)?(,\s*SPEC\(([A-Z_|=,]+)\)\s*)?\)/",
$line,
$m) == 0) {
die("ERROR ($def:$lineno): Invalid ZEND_VM_HANDLER definition.\n");
@@ -1328,8 +1958,12 @@ function gen_vm($def, $skel) {
$code = (int)$m[1];
$op = $m[2];
$len = strlen($op);
- $op1 = array_flip(explode("|",$m[3]));
- $op2 = array_flip(explode("|",$m[4]));
+ $op1 = parse_operand_spec($def, $lineno, $m[3], $flags1);
+ $op2 = parse_operand_spec($def, $lineno, $m[4], $flags2);
+ $flags = $flags1 | ($flags2 << 8);
+ if (!empty($m[6])) {
+ $flags |= parse_ext_spec($def, $lineno, $m[6]);
+ }
if ($len > $max_opcode_len) {
$max_opcode_len = $len;
@@ -1343,48 +1977,88 @@ function gen_vm($def, $skel) {
if (isset($opnames[$op])) {
die("ERROR ($def:$lineno): Opcode with name '$op' is already defined.\n");
}
- $opcodes[$code] = array("op"=>$op,"op1"=>$op1,"op2"=>$op2,"code"=>"");
+ $opcodes[$code] = array("op"=>$op,"op1"=>$op1,"op2"=>$op2,"code"=>"","flags"=>$flags);
+ if (isset($m[8])) {
+ $opcodes[$code]["spec"] = parse_spec_rules($def, $lineno, $m[8]);
+ if (isset($opcodes[$code]["spec"]["NO_CONST_CONST"])) {
+ $opcodes[$code]["flags"] |= $vm_op_flags["ZEND_VM_NO_CONST_CONST"];
+ }
+ if (isset($opcodes[$code]["spec"]["COMMUTATIVE"])) {
+ $opcodes[$code]["flags"] |= $vm_op_flags["ZEND_VM_COMMUTATIVE"];
+ }
+ }
$opnames[$op] = $code;
$handler = $code;
$helper = null;
$list[$lineno] = array("handler"=>$handler);
- } else if (strpos($line,"ZEND_VM_HELPER(") === 0) {
- // Parsing helper's definition
+ } else if (strpos($line,"ZEND_VM_TYPE_SPEC_HANDLER(") === 0) {
+ // Parsing opcode handler's definition
if (preg_match(
- "/^ZEND_VM_HELPER\(\s*([A-Za-z_]+)\s*,\s*([A-Z|]+)\s*,\s*([A-Z|]+)\s*\)/",
+ "/^ZEND_VM_TYPE_SPEC_HANDLER\(\s*([A-Z_]+)\s*,\s*([^,]+),\s*([A-Za-z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(,\s*([A-Z_|]+)\s*)?(,\s*SPEC\(([A-Z_|=,]+)\)\s*)?\)/",
$line,
$m) == 0) {
- die("ERROR ($def:$lineno): Invalid ZEND_VM_HELPER definition.\n");
+ die("ERROR ($def:$lineno): Invalid ZEND_VM_TYPE_HANDLER_HANDLER definition.\n");
}
- $helper = $m[1];
- $op1 = array_flip(explode("|",$m[2]));
- $op2 = array_flip(explode("|",$m[3]));
- if (isset($helpers[$helper])) {
- die("ERROR ($def:$lineno): Helper with name '$helper' is already defined.\n");
+ $orig_op = $m[1];
+ if (!isset($opnames[$orig_op])) {
+ die("ERROR ($def:$lineno): Opcode with name '$orig_op' is not defined.\n");
}
- $helpers[$helper] = array("op1"=>$op1,"op2"=>$op2,"param"=>null,"code"=>"");
- $handler = null;
- $list[$lineno] = array("helper"=>$helper);
- } else if (strpos($line,"ZEND_VM_HELPER_EX(") === 0) {
- // Parsing helper with parameter definition
+ $orig_code = $opnames[$orig_op];
+ $condition = $m[2];
+ $code = $extra_num++;
+ $op = $m[3];
+ $op1 = parse_operand_spec($def, $lineno, $m[4], $flags1);
+ $op2 = parse_operand_spec($def, $lineno, $m[5], $flags2);
+ $flags = $flags1 | ($flags2 << 8);
+ if (!empty($m[7])) {
+ $flags |= parse_ext_spec($def, $lineno, $m[7]);
+ }
+
+ if (isset($opcodes[$code])) {
+ die("ERROR ($def:$lineno): Opcode with name '$code' is already defined.\n");
+ }
+ $opcodes[$orig_code]['type_spec'][$code] = $condition;
+ $used_extra_spec["TYPE"] = 1;
+ $opcodes[$code] = array("op"=>$op,"op1"=>$op1,"op2"=>$op2,"code"=>"","flags"=>$flags);
+ if (isset($m[9])) {
+ $opcodes[$code]["spec"] = parse_spec_rules($def, $lineno, $m[9]);
+ if (isset($opcodes[$code]["spec"]["NO_CONST_CONST"])) {
+ $opcodes[$code]["flags"] |= $vm_op_flags["ZEND_VM_NO_CONST_CONST"];
+ }
+ if (isset($opcodes[$code]["spec"]["COMMUTATIVE"])) {
+ $opcodes[$code]["flags"] |= $vm_op_flags["ZEND_VM_COMMUTATIVE"];
+ }
+ }
+ $opnames[$op] = $code;
+ $handler = $code;
+ $helper = null;
+ $list[$lineno] = array("handler"=>$handler);
+ } else if (strpos($line,"ZEND_VM_HELPER(") === 0 || strpos($line,"ZEND_VM_INLINE_HELPER(") === 0) {
+ // Parsing helper's definition
if (preg_match(
- "/^ZEND_VM_HELPER_EX\(\s*([A-Za-z_]+)\s*,\s*([A-Z|]+)\s*,\s*([A-Z|]+)\s*,\s*(.*)\s*\)/",
+ "/^ZEND_VM(_INLINE)?_HELPER\(\s*([A-Za-z_]+)\s*,\s*([A-Z_|]+)\s*,\s*([A-Z_|]+)\s*(?:,\s*([^)]*))?\s*\)/",
$line,
$m) == 0) {
die("ERROR ($def:$lineno): Invalid ZEND_VM_HELPER definition.\n");
}
- $helper = $m[1];
- $op1 = array_flip(explode("|",$m[2]));
- $op2 = array_flip(explode("|",$m[3]));
- $param = $m[4];
+ $inline = !empty($m[1]);
+ $helper = $m[2];
+ $op1 = parse_operand_spec($def, $lineno, $m[3], $flags1);
+ $op2 = parse_operand_spec($def, $lineno, $m[4], $flags2);
+ $param = isset($m[5]) ? $m[5] : null;
if (isset($helpers[$helper])) {
die("ERROR ($def:$lineno): Helper with name '$helper' is already defined.\n");
}
- // Store parameter
- $params[$param] = 1;
+ // Store parameters
+ foreach (explode(",", $param) as $p) {
+ $p = trim($p);
+ if ($p !== "") {
+ $params[$p] = 1;
+ }
+ }
- $helpers[$helper] = array("op1"=>$op1,"op2"=>$op2,"param"=>$param,"code"=>"");
+ $helpers[$helper] = array("op1"=>$op1,"op2"=>$op2,"param"=>$param,"code"=>"","inline"=>$inline);
$handler = null;
$list[$lineno] = array("helper"=>$helper);
} else if (strpos($line,"ZEND_VM_EXPORT_HANDLER(") === 0) {
@@ -1471,16 +2145,29 @@ function gen_vm($def, $skel) {
fputs($f, "#define ZEND_VM_KIND_GOTO\t" . ZEND_VM_KIND_GOTO . "\n");
fputs($f, "#define ZEND_VM_KIND\t\t" . $GLOBALS["vm_kind_name"][ZEND_VM_KIND] . "\n");
fputs($f, "\n");
+ foreach($vm_op_flags as $name => $val) {
+ fprintf($f, "#define %-24s 0x%08x\n", $name, $val);
+ }
+ fputs($f, "#define ZEND_VM_OP1_FLAGS(flags) (flags & 0xff)\n");
+ fputs($f, "#define ZEND_VM_OP2_FLAGS(flags) ((flags >> 8) & 0xff)\n");
+ fputs($f, "\n");
fputs($f, "BEGIN_EXTERN_C()\n\n");
- fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n\n");
+ fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n");
+ fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode);\n\n");
fputs($f, "END_EXTERN_C()\n\n");
foreach ($opcodes as $code => $dsc) {
$code = str_pad((string)$code,$code_len," ",STR_PAD_LEFT);
$op = str_pad($dsc["op"],$max_opcode_len);
- fputs($f,"#define $op $code\n");
+ if ($code <= $max_opcode) {
+ fputs($f,"#define $op $code\n");
+ }
}
+ $code = str_pad((string)$max_opcode,$code_len," ",STR_PAD_LEFT);
+ $op = str_pad("ZEND_VM_LAST_OPCODE",$max_opcode_len);
+ fputs($f,"\n#define $op $code\n");
+
fputs($f, "\n#endif\n");
fclose($f);
echo "zend_vm_opcodes.h generated successfully.\n";
@@ -1493,14 +2180,24 @@ function gen_vm($def, $skel) {
fputs($f,"#include <stdio.h>\n");
fputs($f,"#include <zend.h>\n\n");
- fputs($f,"const char *zend_vm_opcodes_map[".($max_opcode + 1)."] = {\n");
+ fputs($f,"static const char *zend_vm_opcodes_names[".($max_opcode + 1)."] = {\n");
for ($i = 0; $i <= $max_opcode; $i++) {
fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n");
}
fputs($f, "};\n\n");
+ fputs($f,"static uint32_t zend_vm_opcodes_flags[".($max_opcode + 1)."] = {\n");
+ for ($i = 0; $i <= $max_opcode; $i++) {
+ fprintf($f, "\t0x%08x,\n", isset($opcodes[$i]["flags"]) ? $opcodes[$i]["flags"] : 0);
+ }
+ fputs($f, "};\n\n");
+
fputs($f, "ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {\n");
- fputs($f, "\treturn zend_vm_opcodes_map[opcode];\n");
+ fputs($f, "\treturn zend_vm_opcodes_names[opcode];\n");
+ fputs($f, "}\n");
+
+ fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) {\n");
+ fputs($f, "\treturn zend_vm_opcodes_flags[opcode];\n");
fputs($f, "}\n");
fclose($f);
@@ -1552,31 +2249,71 @@ function gen_vm($def, $skel) {
gen_executor($f, $skl, ZEND_VM_SPEC, ZEND_VM_KIND, "execute", "zend_init_opcodes_handlers");
// Generate zend_vm_get_opcode_handler() function
+ out($f, "static const void *zend_vm_get_opcode_handler_ex(uint32_t spec, const zend_op* op)\n");
+ out($f, "{\n");
+ if (!ZEND_VM_SPEC) {
+ out($f, "\treturn zend_opcode_handlers[spec];\n");
+ } else {
+ out($f, "\tstatic const int zend_vm_decode[] = {\n");
+ out($f, "\t\t_UNUSED_CODE, /* 0 */\n");
+ out($f, "\t\t_CONST_CODE, /* 1 = IS_CONST */\n");
+ out($f, "\t\t_TMP_CODE, /* 2 = IS_TMP_VAR */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 3 */\n");
+ out($f, "\t\t_VAR_CODE, /* 4 = IS_VAR */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 5 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 6 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 7 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 8 = IS_UNUSED */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 9 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 10 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 11 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 12 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 13 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 14 */\n");
+ out($f, "\t\t_UNUSED_CODE, /* 15 */\n");
+ out($f, "\t\t_CV_CODE /* 16 = IS_CV */\n");
+ out($f, "\t};\n");
+ out($f, "\tuint32_t offset = 0;\n");
+ out($f, "\tif (spec & SPEC_RULE_OP1) offset = offset * 5 + zend_vm_decode[op->op1_type];\n");
+ out($f, "\tif (spec & SPEC_RULE_OP2) offset = offset * 5 + zend_vm_decode[op->op2_type];\n");
+ if (isset($used_extra_spec["OP_DATA"])) {
+ out($f, "\tif (spec & SPEC_RULE_OP_DATA) offset = offset * 5 + zend_vm_decode[(op + 1)->op1_type];\n");
+ }
+ if (isset($used_extra_spec["RETVAL"])) {
+ out($f, "\tif (spec & SPEC_RULE_RETVAL) offset = offset * 2 + (op->result_type != IS_UNUSED);\n");
+ }
+ if (isset($used_extra_spec["QUICK_ARG"])) {
+ out($f, "\tif (spec & SPEC_RULE_QUICK_ARG) offset = offset * 2 + (op->op2.num < MAX_ARG_FLAG_NUM);\n");
+ }
+ if (isset($used_extra_spec["SMART_BRANCH"])) {
+ out($f, "\tif (spec & SPEC_RULE_SMART_BRANCH) {\n");
+ out($f, "\t\toffset = offset * 3;\n");
+ out($f, "\t\tif ((op+1)->opcode == ZEND_JMPZ) {\n");
+ out($f, "\t\t\toffset += 1;\n");
+ out($f, "\t\t} else if ((op+1)->opcode == ZEND_JMPNZ) {\n");
+ out($f, "\t\t\toffset += 2;\n");
+ out($f, "\t\t}\n");
+ out($f, "\t}\n");
+ }
+ if (isset($used_extra_spec["DIM_OBJ"])) {
+ out($f, "\tif (spec & SPEC_RULE_DIM_OBJ) {\n");
+ out($f, "\t\toffset = offset * 3;\n");
+ out($f, "\t\tif (op->extended_value == ZEND_ASSIGN_DIM) {\n");
+ out($f, "\t\t\toffset += 1;\n");
+ out($f, "\t\t} else if (op->extended_value == ZEND_ASSIGN_OBJ) {\n");
+ out($f, "\t\t\toffset += 2;\n");
+ out($f, "\t\t}\n");
+ out($f, "\t}\n");
+ }
+ out($f, "\treturn zend_opcode_handlers[(spec & SPEC_START_MASK) + offset];\n");
+ }
+ out($f, "}\n\n");
out($f, "static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op)\n");
out($f, "{\n");
if (!ZEND_VM_SPEC) {
- out($f, "\treturn zend_opcode_handlers[opcode];\n");
+ out($f, "\treturn zend_vm_get_opcode_handler_ex(opcode, op);\n");
} else {
- out($f, "\t\tstatic const int zend_vm_decode[] = {\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 0 */\n");
- out($f, "\t\t\t_CONST_CODE, /* 1 = IS_CONST */\n");
- out($f, "\t\t\t_TMP_CODE, /* 2 = IS_TMP_VAR */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 3 */\n");
- out($f, "\t\t\t_VAR_CODE, /* 4 = IS_VAR */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 5 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 6 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 7 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 8 = IS_UNUSED */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 9 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 10 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 11 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 12 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 13 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 14 */\n");
- out($f, "\t\t\t_UNUSED_CODE, /* 15 */\n");
- out($f, "\t\t\t_CV_CODE /* 16 = IS_CV */\n");
- out($f, "\t\t};\n");
- out($f, "\t\treturn zend_opcode_handlers[opcode * 25 + zend_vm_decode[op->op1_type] * 5 + zend_vm_decode[op->op2_type]];\n");
+ out($f, "\treturn zend_vm_get_opcode_handler_ex(zend_spec_handlers[opcode], op);\n");
}
out($f, "}\n\n");
@@ -1586,6 +2323,55 @@ function gen_vm($def, $skel) {
out($f, "\top->handler = zend_vm_get_opcode_handler(zend_user_opcodes[op->opcode], op);\n");
out($f, "}\n\n");
+ // Generate zend_vm_set_opcode_handler_ex() function
+ out($f, "ZEND_API void zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t op1_info, uint32_t op2_info, uint32_t res_info)\n");
+ out($f, "{\n");
+ out($f, "\tzend_uchar opcode = zend_user_opcodes[op->opcode];\n");
+ if (!ZEND_VM_SPEC) {
+ out($f, "\top->handler = zend_vm_get_opcode_handler_ex(opcode, op);\n");
+ } else {
+ out($f, "\tuint32_t spec = zend_spec_handlers[opcode];\n");
+ if (isset($used_extra_spec["TYPE"])) {
+ out($f, "\tswitch (opcode) {\n");
+ foreach($opcodes as $code => $dsc) {
+ if (isset($dsc['type_spec'])) {
+ $orig_op = $dsc['op'];
+ out($f, "\t\tcase $orig_op:\n");
+ $first = true;
+ foreach($dsc['type_spec'] as $code => $condition) {
+ if ($first) {
+ out($f, "\t\t\tif ($condition) {\n");
+ $first = false;
+ } else {
+ out($f, "\t\t\t} else if ($condition) {\n");
+ }
+ $spec_dsc = $opcodes[$code];
+ if (isset($spec_dsc["spec"]["NO_CONST_CONST"])) {
+ out($f, "\t\t\t\tif (op->op1_type == IS_CONST && op->op2_type == IS_CONST) {\n");
+ out($f, "\t\t\t\t\tbreak;\n");
+ out($f, "\t\t\t\t}\n");
+ }
+ out($f, "\t\t\t\tspec = ${spec_dsc['spec_code']};\n");
+ if (isset($spec_dsc["spec"]["COMMUTATIVE"])) {
+ out($f, "\t\t\t\tif (op->op1_type > op->op2_type) {\n");
+ out($f, "\t\t\t\t\tzend_swap_operands(op);\n");
+ out($f, "\t\t\t\t}\n");
+ }
+ }
+ if (!$first) {
+ out($f, "\t\t\t}\n");
+ }
+ out($f, "\t\t\tbreak;\n");
+ }
+ }
+ out($f, "\t\tdefault:\n");
+ out($f, "\t\t\tbreak;\n");
+ out($f, "\t}\n");
+ }
+ out($f, "\top->handler = zend_vm_get_opcode_handler_ex(spec, op);\n");
+ }
+ out($f, "}\n\n");
+
// Generate zend_vm_call_opcode_handler() function
if (ZEND_VM_KIND == ZEND_VM_KIND_CALL) {
out($f, "ZEND_API int zend_vm_call_opcode_handler(zend_execute_data* ex)\n");
@@ -1604,11 +2390,16 @@ function gen_vm($def, $skel) {
out($f, "\tLOAD_OPLINE();\n");
out($f,"#if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)\n");
out($f, "\t((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
- out($f, "\tret = (opline) ? 0 : -1;\n");
+ out($f, "\tif (EXPECTED(opline)) {\n");
+ out($f, "\t\tret = execute_data != ex ? (int)(execute_data->prev_execute_data != ex) + 1 : 0;\n");
+ out($f, "\t\tSAVE_OPLINE();\n");
+ out($f, "\t} else {\n");
+ out($f, "\t\tret = -1;\n");
+ out($f, "\t}\n");
out($f, "#else\n");
out($f, "\tret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n");
- out($f, "#endif\n");
out($f, "\tSAVE_OPLINE();\n");
+ out($f, "#endif\n");
out($f, "#ifdef ZEND_VM_FP_GLOBAL_REG\n");
out($f, "\texecute_data = orig_execute_data;\n");
out($f, "#endif\n");
@@ -1632,16 +2423,16 @@ function gen_vm($def, $skel) {
out($f,"#undef DCL_OPLINE\n");
out($f,"#undef USE_OPLINE\n");
out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef LOAD_NEXT_OPLINE\n");
out($f,"#undef SAVE_OPLINE\n");
out($f,"#define OPLINE EX(opline)\n");
out($f,"#define DCL_OPLINE\n");
out($f,"#define USE_OPLINE const zend_op *opline = EX(opline);\n");
out($f,"#define LOAD_OPLINE()\n");
+ out($f,"#define LOAD_NEXT_OPLINE() ZEND_VM_INC_OPCODE()\n");
out($f,"#define SAVE_OPLINE()\n");
- out($f,"#undef CHECK_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
- out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
out($f,"#undef ZEND_VM_CONTINUE\n");
diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c
index 705ab9cd29..100106cdc5 100644
--- a/Zend/zend_vm_opcodes.c
+++ b/Zend/zend_vm_opcodes.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <zend.h>
-const char *zend_vm_opcodes_map[173] = {
+static const char *zend_vm_opcodes_names[184] = {
"ZEND_NOP",
"ZEND_ADD",
"ZEND_SUB",
@@ -63,7 +63,7 @@ const char *zend_vm_opcodes_map[173] = {
"ZEND_ASSIGN",
"ZEND_ASSIGN_REF",
"ZEND_ECHO",
- NULL,
+ "ZEND_GENERATOR_CREATE",
"ZEND_JMP",
"ZEND_JMPZ",
"ZEND_JMPNZ",
@@ -72,7 +72,7 @@ const char *zend_vm_opcodes_map[173] = {
"ZEND_JMPNZ_EX",
"ZEND_CASE",
NULL,
- NULL,
+ "ZEND_SEND_VAR_NO_REF_EX",
NULL,
"ZEND_BOOL",
"ZEND_FAST_CONCAT",
@@ -122,7 +122,7 @@ const char *zend_vm_opcodes_map[173] = {
"ZEND_FETCH_OBJ_UNSET",
"ZEND_FETCH_LIST",
"ZEND_FETCH_CONSTANT",
- "ZEND_GOTO",
+ NULL,
"ZEND_EXT_STMT",
"ZEND_EXT_FCALL_BEGIN",
"ZEND_EXT_FCALL_END",
@@ -195,8 +195,209 @@ const char *zend_vm_opcodes_map[173] = {
"ZEND_SPACESHIP",
"ZEND_DECLARE_ANON_CLASS",
"ZEND_DECLARE_ANON_INHERITED_CLASS",
+ "ZEND_FETCH_STATIC_PROP_R",
+ "ZEND_FETCH_STATIC_PROP_W",
+ "ZEND_FETCH_STATIC_PROP_RW",
+ "ZEND_FETCH_STATIC_PROP_IS",
+ "ZEND_FETCH_STATIC_PROP_FUNC_ARG",
+ "ZEND_FETCH_STATIC_PROP_UNSET",
+ "ZEND_UNSET_STATIC_PROP",
+ "ZEND_ISSET_ISEMPTY_STATIC_PROP",
+ "ZEND_FETCH_CLASS_CONSTANT",
+ "ZEND_BIND_LEXICAL",
+ "ZEND_BIND_STATIC",
+};
+
+static uint32_t zend_vm_opcodes_flags[184] = {
+ 0x00000000,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000007,
+ 0x00000007,
+ 0x00000707,
+ 0x00000303,
+ 0x00000303,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x00000707,
+ 0x07000003,
+ 0x00000003,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x04006751,
+ 0x00000001,
+ 0x00000001,
+ 0x00000001,
+ 0x00000001,
+ 0x00000301,
+ 0x0b000101,
+ 0x00000007,
+ 0x00000000,
+ 0x00000020,
+ 0x00002007,
+ 0x00002007,
+ 0x03002007,
+ 0x00002007,
+ 0x00002007,
+ 0x00000707,
+ 0x00000000,
+ 0x00001001,
+ 0x00000000,
+ 0x00000007,
+ 0x00000707,
+ 0x01000701,
+ 0x01000701,
+ 0x01000701,
+ 0x00000000,
+ 0x00000001,
+ 0x01000300,
+ 0x00000000,
+ 0x01000310,
+ 0x00000003,
+ 0x00000010,
+ 0x00000310,
+ 0x00001007,
+ 0x00001001,
+ 0x00001001,
+ 0x01000073,
+ 0x01000300,
+ 0x00004005,
+ 0x00186703,
+ 0x00106703,
+ 0x08000007,
+ 0x00030107,
+ 0x00000751,
+ 0x00000751,
+ 0x00002003,
+ 0x03000001,
+ 0x00000007,
+ 0x00010107,
+ 0x00000707,
+ 0x00000753,
+ 0x00010107,
+ 0x00006701,
+ 0x00000751,
+ 0x00010107,
+ 0x00006701,
+ 0x00000751,
+ 0x00010107,
+ 0x00000707,
+ 0x00000757,
+ 0x00050107,
+ 0x01006703,
+ 0x01000753,
+ 0x00010107,
+ 0x00000701,
+ 0x00000751,
+ 0x00000707,
+ 0x06000301,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x01000000,
+ 0x00001001,
+ 0x03000103,
+ 0x00000003,
+ 0x05000700,
+ 0x00000057,
+ 0x0b000003,
+ 0x01000757,
+ 0x01008773,
+ 0x00030107,
+ 0x00020757,
+ 0x00001003,
+ 0x00001001,
+ 0x01000703,
+ 0x00000000,
+ 0x00001001,
+ 0x00000007,
+ 0x00000003,
+ 0x07000003,
+ 0x00000103,
+ 0x00002003,
+ 0x03000001,
+ 0x00004005,
+ 0x01000700,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000751,
+ 0x00000751,
+ 0x00000751,
+ 0x00000751,
+ 0x00000751,
+ 0x00000000,
+ 0x00007305,
+ 0x00000000,
+ 0x00000100,
+ 0x00000000,
+ 0x00000003,
+ 0x00000303,
+ 0x00000300,
+ 0x00000100,
+ 0x00000000,
+ 0x00006701,
+ 0x00020757,
+ 0x00000000,
+ 0x00000000,
+ 0x00002000,
+ 0x00002003,
+ 0x00000103,
+ 0x00000000,
+ 0x00000000,
+ 0x00000101,
+ 0x05000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0b000303,
+ 0x00000003,
+ 0x00000020,
+ 0x00003000,
+ 0x00000010,
+ 0x00000000,
+ 0x00000707,
+ 0x04006751,
+ 0x00000301,
+ 0x00002003,
+ 0x00000707,
+ 0x03000000,
+ 0x03000100,
+ 0x00007307,
+ 0x00007307,
+ 0x00007307,
+ 0x00007307,
+ 0x01007307,
+ 0x00007307,
+ 0x00007307,
+ 0x00027307,
+ 0x00000373,
+ 0x00100101,
+ 0x00100301,
};
ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {
- return zend_vm_opcodes_map[opcode];
+ return zend_vm_opcodes_names[opcode];
+}
+ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) {
+ return zend_vm_opcodes_flags[opcode];
}
diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h
index f6de5b1b57..1eb54f0f00 100644
--- a/Zend/zend_vm_opcodes.h
+++ b/Zend/zend_vm_opcodes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,9 +28,42 @@
#define ZEND_VM_KIND_GOTO 3
#define ZEND_VM_KIND ZEND_VM_KIND_CALL
+#define ZEND_VM_OP_SPEC 0x00000001
+#define ZEND_VM_OP_CONST 0x00000002
+#define ZEND_VM_OP_TMPVAR 0x00000004
+#define ZEND_VM_OP_TMPVARCV 0x00000008
+#define ZEND_VM_OP_MASK 0x000000f0
+#define ZEND_VM_OP_NUM 0x00000010
+#define ZEND_VM_OP_JMP_ADDR 0x00000020
+#define ZEND_VM_OP_TRY_CATCH 0x00000030
+#define ZEND_VM_OP_LIVE_RANGE 0x00000040
+#define ZEND_VM_OP_THIS 0x00000050
+#define ZEND_VM_OP_NEXT 0x00000060
+#define ZEND_VM_OP_CLASS_FETCH 0x00000070
+#define ZEND_VM_OP_CONSTRUCTOR 0x00000080
+#define ZEND_VM_EXT_VAR_FETCH 0x00010000
+#define ZEND_VM_EXT_ISSET 0x00020000
+#define ZEND_VM_EXT_ARG_NUM 0x00040000
+#define ZEND_VM_EXT_ARRAY_INIT 0x00080000
+#define ZEND_VM_EXT_REF 0x00100000
+#define ZEND_VM_EXT_MASK 0x0f000000
+#define ZEND_VM_EXT_NUM 0x01000000
+#define ZEND_VM_EXT_JMP_ADDR 0x03000000
+#define ZEND_VM_EXT_DIM_OBJ 0x04000000
+#define ZEND_VM_EXT_CLASS_FETCH 0x05000000
+#define ZEND_VM_EXT_CONST_FETCH 0x06000000
+#define ZEND_VM_EXT_TYPE 0x07000000
+#define ZEND_VM_EXT_EVAL 0x08000000
+#define ZEND_VM_EXT_SRC 0x0b000000
+#define ZEND_VM_NO_CONST_CONST 0x40000000
+#define ZEND_VM_COMMUTATIVE 0x80000000
+#define ZEND_VM_OP1_FLAGS(flags) (flags & 0xff)
+#define ZEND_VM_OP2_FLAGS(flags) ((flags >> 8) & 0xff)
+
BEGIN_EXTERN_C()
ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);
+ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode);
END_EXTERN_C()
@@ -75,6 +108,7 @@ END_EXTERN_C()
#define ZEND_ASSIGN 38
#define ZEND_ASSIGN_REF 39
#define ZEND_ECHO 40
+#define ZEND_GENERATOR_CREATE 41
#define ZEND_JMP 42
#define ZEND_JMPZ 43
#define ZEND_JMPNZ 44
@@ -82,6 +116,7 @@ END_EXTERN_C()
#define ZEND_JMPZ_EX 46
#define ZEND_JMPNZ_EX 47
#define ZEND_CASE 48
+#define ZEND_SEND_VAR_NO_REF_EX 50
#define ZEND_BOOL 52
#define ZEND_FAST_CONCAT 53
#define ZEND_ROPE_INIT 54
@@ -130,7 +165,6 @@ END_EXTERN_C()
#define ZEND_FETCH_OBJ_UNSET 97
#define ZEND_FETCH_LIST 98
#define ZEND_FETCH_CONSTANT 99
-#define ZEND_GOTO 100
#define ZEND_EXT_STMT 101
#define ZEND_EXT_FCALL_BEGIN 102
#define ZEND_EXT_FCALL_END 103
@@ -203,5 +237,18 @@ END_EXTERN_C()
#define ZEND_SPACESHIP 170
#define ZEND_DECLARE_ANON_CLASS 171
#define ZEND_DECLARE_ANON_INHERITED_CLASS 172
+#define ZEND_FETCH_STATIC_PROP_R 173
+#define ZEND_FETCH_STATIC_PROP_W 174
+#define ZEND_FETCH_STATIC_PROP_RW 175
+#define ZEND_FETCH_STATIC_PROP_IS 176
+#define ZEND_FETCH_STATIC_PROP_FUNC_ARG 177
+#define ZEND_FETCH_STATIC_PROP_UNSET 178
+#define ZEND_UNSET_STATIC_PROP 179
+#define ZEND_ISSET_ISEMPTY_STATIC_PROP 180
+#define ZEND_FETCH_CLASS_CONSTANT 181
+#define ZEND_BIND_LEXICAL 182
+#define ZEND_BIND_STATIC 183
+
+#define ZEND_VM_LAST_OPCODE 183
#endif
diff --git a/acinclude.m4 b/acinclude.m4
index b4f82f1447..db146aaf2f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -940,7 +940,7 @@ dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [
dnl
dnl Includes an extension in the build.
dnl
-dnl "extname" is the name of the ext/ subdir where the extension resides.
+dnl "extname" is the name of the extension.
dnl "sources" is a list of files relative to the subdir which are used
dnl to build the extension.
dnl "shared" can be set to "shared" or "yes" to build the extension as
@@ -953,22 +953,23 @@ dnl "zend_ext" indicates a zend extension.
AC_DEFUN([PHP_NEW_EXTENSION],[
ext_builddir=[]PHP_EXT_BUILDDIR($1)
ext_srcdir=[]PHP_EXT_SRCDIR($1)
+ ext_dir=[]PHP_EXT_DIR($1)
ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
dnl ---------------------------------------------- Static module
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
- EXT_STATIC="$EXT_STATIC $1"
+ PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
+ EXT_STATIC="$EXT_STATIC $1;$ext_dir"
if test "$3" != "nocli"; then
- EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir"
fi
else
if test "$3" = "shared" || test "$3" = "yes"; then
dnl ---------------------------------------------- Shared module
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
- PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
+ PHP_ADD_SOURCES_X($ext_dir,$2,$ac_extra,shared_objects_$1,yes)
case $host_alias in
*netware*[)]
PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
@@ -986,14 +987,14 @@ dnl ---------------------------------------------- CLI static module
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
case "$PHP_SAPI" in
cgi|embed[)]
- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
- EXT_STATIC="$EXT_STATIC $1"
+ PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
+ EXT_STATIC="$EXT_STATIC $1;$ext_dir"
;;
*[)]
- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
+ PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,cli)
;;
esac
- EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir"
fi
PHP_ADD_BUILD_DIR($ext_builddir)
@@ -2333,13 +2334,13 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
dnl If pkg-config is found try using it
if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
- if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
+ if $PKG_CONFIG --atleast-version=0.9.8 openssl; then
found_openssl=yes
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
else
- AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
+ AC_MSG_ERROR([OpenSSL version 0.9.8 or greater required.])
fi
if test -n "$OPENSSL_LIBS"; then
@@ -2380,13 +2381,13 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER >= 0x0090600fL
+#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
yes
#endif
],[
- AC_MSG_RESULT([>= 0.9.6])
+ AC_MSG_RESULT([>= 0.9.8])
],[
- AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
+ AC_MSG_ERROR([OpenSSL version 0.9.8 or greater required.])
])
CPPFLAGS=$old_CPPFLAGS
@@ -2684,20 +2685,27 @@ EOF
else
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
fi
- for arg in $ac_configure_args; do
- if test `expr -- $arg : "'.*"` = 0; then
- if test `expr -- $arg : "-.*"` = 0 && test `expr -- $arg : ".*=.*"` = 0; then
- continue;
- fi
- echo "'[$]arg' \\" >> $1
- CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
- else
- if test `expr -- $arg : "'-.*"` = 0 && test `expr -- $arg : "'.*=.*"` = 0; then
- continue;
- fi
- echo "[$]arg \\" >> $1
- CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
- fi
+ CONFIGURE_ARGS="$ac_configure_args"
+ while test "X$CONFIGURE_ARGS" != "X";
+ do
+ if CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\('[[^']]*'\)"`
+ then
+ CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *'[[^']]*' \(.*\)"`
+ elif CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\([[^ ]]*\)"`
+ then
+ CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *[[^ ]]* \(.*\)"`
+ CURRENT_ARG="'$CURRENT_ARG'"
+ else
+ break
+ fi
+ for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
+ if test `expr "X$CURRENT_ARG" : "X.*${var}.*"` != 0;
+ then
+ continue 2
+ fi
+ done
+ $as_echo "$CURRENT_ARG \\" >>$1
+ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"
done
echo '"[$]@"' >> $1
chmod +x $1
@@ -3049,3 +3057,57 @@ AC_DEFUN([PHP_CHECK_BUILTIN_EXPECT], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_EXPECT], [$have_builtin_expect], [Whether the compiler supports __builtin_expect])
])
+
+dnl PHP_CHECK_BUILTIN_CLZ
+AC_DEFUN([PHP_CHECK_BUILTIN_CLZ], [
+ AC_MSG_CHECKING([for __builtin_clz])
+
+ AC_TRY_LINK(, [
+ return __builtin_clz(1) ? 1 : 0;
+ ], [
+ have_builtin_clz=1
+ AC_MSG_RESULT([yes])
+ ], [
+ have_builtin_clz=0
+ AC_MSG_RESULT([no])
+ ])
+
+ AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CLZ], [$have_builtin_clz], [Whether the compiler supports __builtin_clz])
+
+])
+
+dnl PHP_CHECK_BUILTIN_CTZL
+AC_DEFUN([PHP_CHECK_BUILTIN_CTZL], [
+ AC_MSG_CHECKING([for __builtin_ctzl])
+
+ AC_TRY_LINK(, [
+ return __builtin_ctzl(2L) ? 1 : 0;
+ ], [
+ have_builtin_ctzl=1
+ AC_MSG_RESULT([yes])
+ ], [
+ have_builtin_ctzl=0
+ AC_MSG_RESULT([no])
+ ])
+
+ AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZL], [$have_builtin_ctzl], [Whether the compiler supports __builtin_ctzl])
+
+])
+
+dnl PHP_CHECK_BUILTIN_CTZLL
+AC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [
+ AC_MSG_CHECKING([for __builtin_ctzll])
+
+ AC_TRY_LINK(, [
+ return __builtin_ctzll(2LL) ? 1 : 0;
+ ], [
+ have_builtin_ctzll=1
+ AC_MSG_RESULT([yes])
+ ], [
+ have_builtin_ctzll=0
+ AC_MSG_RESULT([no])
+ ])
+
+ AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZLL], [$have_builtin_ctzll], [Whether the compiler supports __builtin_ctzll])
+
+])
diff --git a/build/build.mk b/build/build.mk
index 007f081f19..94529840a8 100644
--- a/build/build.mk
+++ b/build/build.mk
@@ -1,7 +1,7 @@
# +----------------------------------------------------------------------+
# | PHP Version 7 |
# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-2014 The PHP Group |
+# | Copyright (c) 1997-2016 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.01 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
diff --git a/build/build2.mk b/build/build2.mk
index 335bec3654..af325ad4a5 100644
--- a/build/build2.mk
+++ b/build/build2.mk
@@ -1,7 +1,7 @@
# +----------------------------------------------------------------------+
# | PHP Version 7 |
# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-2007 The PHP Group |
+# | Copyright (c) 1997-2016 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.01 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
diff --git a/build/buildcheck.sh b/build/buildcheck.sh
index f8f827d671..61225117de 100755
--- a/build/buildcheck.sh
+++ b/build/buildcheck.sh
@@ -2,7 +2,7 @@
# +----------------------------------------------------------------------+
# | PHP Version 7 |
# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-2007 The PHP Group |
+# | Copyright (c) 1997-2016 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.01 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
diff --git a/build/config-stubs b/build/config-stubs
index 28208085a7..fb49bd4e8c 100755
--- a/build/config-stubs
+++ b/build/config-stubs
@@ -4,5 +4,9 @@
dir=$1; shift
for stubfile in $dir/*/config0.m4 $dir/*/config.m4 $dir/*/config9.m4; do
- echo "sinclude($stubfile)"
+ echo "dnl Define where extension directories are located in the configure context
+AC_DEFUN([PHP_EXT_BUILDDIR], [`dirname $stubfile`])
+AC_DEFUN([PHP_EXT_DIR], [`dirname $stubfile`])
+AC_DEFUN([PHP_EXT_SRCDIR], [\$abs_srcdir/`dirname $stubfile`])
+sinclude($stubfile)"
done
diff --git a/build/genif.sh b/build/genif.sh
index 14e19b7d9a..e2bc6ac89d 100644
--- a/build/genif.sh
+++ b/build/genif.sh
@@ -24,7 +24,8 @@ cd $srcdir
module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`"
for ext in ${1+"$@"} ; do
- header_list="$header_list ext/$ext/*.h*"
+ ext_dir=`echo "$ext" | cut -d ';' -f 2`
+ header_list="$header_list $ext_dir/*.h*"
done
includes=`$awk -f ./build/print_include.awk $header_list`
diff --git a/build/libtool.m4 b/build/libtool.m4
index 37dc159882..f7f5164292 100644
--- a/build/libtool.m4
+++ b/build/libtool.m4
@@ -1545,7 +1545,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[[123]]*) objformat=aout ;;
+ freebsd[[123]].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -3162,7 +3162,7 @@ case $host_os in
;;
esac
;;
- freebsd[[12]]*)
+ freebsd[[12]].*)
# C++ shared libraries reported to be fairly broken before switch to ELF
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
diff --git a/build/order_by_dep.awk b/build/order_by_dep.awk
index 0fdd960652..281898ecee 100644
--- a/build/order_by_dep.awk
+++ b/build/order_by_dep.awk
@@ -6,12 +6,12 @@ BEGIN {
SUBSEP=":";
}
-function get_deps(module_name, depline, cmd)
+function get_deps(module_name, module_dir, depline, cmd)
{
# this could probably be made *much* better
RS=orig_rs;
FS="[(,) \t]+"
- cmd = "grep PHP_ADD_EXTENSION_DEP ext/" module_name "/config*.m4"
+ cmd = "grep PHP_ADD_EXTENSION_DEP " module_dir "/config*.m4"
while (cmd | getline) {
# printf("GOT: %s,%s,%s,%s,%s\n", $1, $2, $3, $4, $5);
if (!length($5)) {
@@ -63,14 +63,16 @@ function count(arr, n, i)
return n;
}
-/^[a-zA-Z0-9_-]+/ {
+/^[a-zA-Z0-9_;-]+/ {
+ split($1, mod, ";");
+
# mini hack for pedantic awk
- gsub("[^a-zA-Z0-9_-]", "", $1)
+ gsub("[^a-zA-Z0-9_-]", "", mod[1])
# add each item to array
- mods[mod_count++] = $1
+ mods[mod_count++] = mod[1]
# see if it has any module deps
- get_deps($1);
+ get_deps(mod[1], mod[2]);
}
END {
# order it correctly
diff --git a/configure.in b/configure.in
index b70f024252..299dbb55fb 100644
--- a/configure.in
+++ b/configure.in
@@ -118,7 +118,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
])
PHP_MAJOR_VERSION=7
-PHP_MINOR_VERSION=0
+PHP_MINOR_VERSION=1
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="-dev"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
@@ -131,9 +131,9 @@ PHP_SUBST(PHP_RELEASE_VERSION)
PHP_SUBST(PHP_EXTRA_VERSION)
dnl Define where extension directories are located in the configure context
-AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl
-AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
-AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
+AC_DEFUN([PHP_EXT_BUILDDIR],[$config_m4_dir])dnl
+AC_DEFUN([PHP_EXT_DIR],[$config_m4_dir])dnl
+AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/$config_m4_dir])dnl
AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
dnl Setting up the PHP version based on the information above.
@@ -577,6 +577,12 @@ PHP_CHECK_STDINT_TYPES
dnl Check __builtin_expect
PHP_CHECK_BUILTIN_EXPECT
+dnl Check __builtin_clz
+PHP_CHECK_BUILTIN_CLZ
+dnl Check __builtin_ctzl
+PHP_CHECK_BUILTIN_CTZL
+dnl Check __builtin_ctzll
+PHP_CHECK_BUILTIN_CTZLL
dnl Check for members of the stat structure
AC_STRUCT_ST_BLKSIZE
@@ -1420,9 +1426,7 @@ AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
])
AC_PROG_LIBTOOL
-if test "$enable_debug" != "yes"; then
- PHP_SET_LIBTOOL_VARIABLE([--silent])
-fi
+PHP_SET_LIBTOOL_VARIABLE([--silent])
dnl libtool 1.4.3 needs this.
PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 5e8ec002bd..10450f1968 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -128,7 +128,7 @@ zend_module_entry bcmath_module_entry = {
#ifdef COMPILE_DL_BCMATH
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(bcmath)
#endif
@@ -207,6 +207,21 @@ static void php_str2num(bc_num *num, char *str)
}
/* }}} */
+/* {{{ split_bc_num
+ Convert to bc_num detecting scale */
+static bc_num split_bc_num(bc_num num) {
+ bc_num newnum;
+ if (num->n_refs >= 1) {
+ return num;
+ }
+ newnum = _bc_new_num_ex(0, 0, 0);
+ *newnum = *num;
+ newnum->n_refs = 1;
+ num->n_refs--;
+ return newnum;
+}
+/* }}} */
+
/* {{{ proto string bcadd(string left_operand, string right_operand [, int scale])
Returns the sum of two arbitrary precision numbers */
PHP_FUNCTION(bcadd)
@@ -233,6 +248,7 @@ PHP_FUNCTION(bcadd)
bc_add (first, second, &result, scale);
if (result->n_scale > scale) {
+ result = split_bc_num(result);
result->n_scale = scale;
}
@@ -270,6 +286,7 @@ PHP_FUNCTION(bcsub)
bc_sub (first, second, &result, scale);
if (result->n_scale > scale) {
+ result = split_bc_num(result);
result->n_scale = scale;
}
@@ -307,6 +324,7 @@ PHP_FUNCTION(bcmul)
bc_multiply (first, second, &result, scale);
if (result->n_scale > scale) {
+ result = split_bc_num(result);
result->n_scale = scale;
}
@@ -345,6 +363,7 @@ PHP_FUNCTION(bcdiv)
switch (bc_divide(first, second, &result, scale)) {
case 0: /* OK */
if (result->n_scale > scale) {
+ result = split_bc_num(result);
result->n_scale = scale;
}
RETVAL_STR(bc_num2str(result));
@@ -420,8 +439,9 @@ PHP_FUNCTION(bcpowmod)
scale_int = (int) ((int)scale < 0 ? 0 : scale);
if (bc_raisemod(first, second, mod, &result, scale_int) != -1) {
- if (result->n_scale > scale) {
- result->n_scale = (int)scale;
+ if (result->n_scale > scale_int) {
+ result = split_bc_num(result);
+ result->n_scale = scale_int;
}
RETVAL_STR(bc_num2str(result));
} else {
@@ -462,6 +482,7 @@ PHP_FUNCTION(bcpow)
bc_raise (first, second, &result, scale);
if (result->n_scale > scale) {
+ result = split_bc_num(result);
result->n_scale = scale;
}
@@ -496,6 +517,7 @@ PHP_FUNCTION(bcsqrt)
if (bc_sqrt (&result, scale) != 0) {
if (result->n_scale > scale) {
+ result = split_bc_num(result);
result->n_scale = scale;
}
RETVAL_STR(bc_num2str(result));
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index 5cb65547aa..9075d16b30 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -51,15 +51,11 @@ ZEND_BEGIN_MODULE_GLOBALS(bcmath)
zend_long bc_precision;
ZEND_END_MODULE_GLOBALS(bcmath)
-#ifdef ZTS
-# define BCG(v) ZEND_TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
-# ifdef COMPILE_DL_BCMATH
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define BCG(v) (bcmath_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_BCMATH)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
ZEND_EXTERN_MODULE_GLOBALS(bcmath)
+#define BCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(bcmath, v)
#endif /* PHP_BCMATH_H */
diff --git a/ext/bcmath/tests/bug72093-win32.phpt b/ext/bcmath/tests/bug72093-win32.phpt
new file mode 100644
index 0000000000..a9b2077823
--- /dev/null
+++ b/ext/bcmath/tests/bug72093-win32.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
+--SKIPIF--
+<?php
+if(!extension_loaded("bcmath")) print "skip";
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip valid only for windows');
+}
+?>
+--FILE--
+<?php
+var_dump(bcpowmod(1, "A", 128, -200));
+var_dump(bcpowmod(1, 1.2, 1, 1));
+?>
+--EXPECTF--
+string(1) "1"
+string(3) "0.0"
+bc math warning: non-zero scale in exponent
diff --git a/ext/bcmath/tests/bug72093.phpt b/ext/bcmath/tests/bug72093.phpt
new file mode 100644
index 0000000000..911af5698f
--- /dev/null
+++ b/ext/bcmath/tests/bug72093.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
+--SKIPIF--
+<?php
+if(!extension_loaded("bcmath")) print "skip";
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not valid for windows');
+}
+?>
+--FILE--
+<?php
+var_dump(bcpowmod(1, "A", 128, -200));
+var_dump(bcpowmod(1, 1.2, 1, 1));
+?>
+--EXPECTF--
+string(1) "1"
+bc math warning: non-zero scale in exponent
+string(3) "0.0"
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 50a4faac50..359425437d 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index c0e128a9e1..b076f9554e 100644
--- a/ext/bz2/bz2_filter.c
+++ b/ext/bz2/bz2_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/bz2/php_bz2.h b/ext/bz2/php_bz2.h
index d274cbc751..4b40256718 100644
--- a/ext/bz2/php_bz2.h
+++ b/ext/bz2/php_bz2.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c
index 63b7fb883f..8c85fac622 100644
--- a/ext/calendar/cal_unix.c
+++ b/ext/calendar/cal_unix.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c
index 73a2b3a03d..78d772adce 100644
--- a/ext/calendar/calendar.c
+++ b/ext/calendar/calendar.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c
index d1c859e2ee..cf1f376191 100644
--- a/ext/calendar/easter.c
+++ b/ext/calendar/easter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c
index 80ef70e7e0..bb87d8fb2f 100644
--- a/ext/com_dotnet/com_com.c
+++ b/ext/com_dotnet/com_com.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -76,7 +76,7 @@ PHP_FUNCTION(com_create_instance)
/* decode the data from the array */
- if (NULL != (tmp = zend_hash_str_find(HASH_OF(server_params),
+ if (NULL != (tmp = zend_hash_str_find(Z_ARRVAL_P(server_params),
"Server", sizeof("Server")-1))) {
convert_to_string_ex(tmp);
server_name = Z_STRVAL_P(tmp);
@@ -84,28 +84,28 @@ PHP_FUNCTION(com_create_instance)
ctx = CLSCTX_REMOTE_SERVER;
}
- if (NULL != (tmp = zend_hash_str_find(HASH_OF(server_params),
+ if (NULL != (tmp = zend_hash_str_find(Z_ARRVAL_P(server_params),
"Username", sizeof("Username")-1))) {
convert_to_string_ex(tmp);
user_name = Z_STRVAL_P(tmp);
user_name_len = Z_STRLEN_P(tmp);
}
- if (NULL != (tmp = zend_hash_str_find(HASH_OF(server_params),
+ if (NULL != (tmp = zend_hash_str_find(Z_ARRVAL_P(server_params),
"Password", sizeof("Password")-1))) {
convert_to_string_ex(tmp);
password = Z_STRVAL_P(tmp);
password_len = Z_STRLEN_P(tmp);
}
- if (NULL != (tmp = zend_hash_str_find(HASH_OF(server_params),
+ if (NULL != (tmp = zend_hash_str_find(Z_ARRVAL_P(server_params),
"Domain", sizeof("Domain")-1))) {
convert_to_string_ex(tmp);
domain_name = Z_STRVAL_P(tmp);
domain_name_len = Z_STRLEN_P(tmp);
}
- if (NULL != (tmp = zend_hash_str_find(HASH_OF(server_params),
+ if (NULL != (tmp = zend_hash_str_find(Z_ARRVAL_P(server_params),
"Flags", sizeof("Flags")-1))) {
convert_to_long_ex(tmp);
ctx = (CLSCTX)Z_LVAL_P(tmp);
@@ -810,7 +810,7 @@ PHP_FUNCTION(com_message_pump)
}
/* }}} */
-/* {{{ proto bool com_load_typelib(string typelib_name [, int case_insensitive])
+/* {{{ proto bool com_load_typelib(string typelib_name [, bool case_insensitive])
Loads a Typelibrary and registers its constants */
PHP_FUNCTION(com_load_typelib)
{
diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c
index 7e0124b062..c8e2bc105b 100644
--- a/ext/com_dotnet/com_dotnet.c
+++ b/ext/com_dotnet/com_dotnet.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index 1a3db308fe..c439bba515 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -255,7 +255,7 @@ zend_module_entry com_dotnet_module_entry = {
#ifdef COMPILE_DL_COM_DOTNET
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(com_dotnet)
#endif
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index ea96fe80eb..122c618426 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c
index 2c08df20e3..b36b0b3781 100644
--- a/ext/com_dotnet/com_iterator.c
+++ b/ext/com_dotnet/com_iterator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c
index 27cd491e21..c7c605d120 100644
--- a/ext/com_dotnet/com_misc.c
+++ b/ext/com_dotnet/com_misc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c
index 259d80b346..b084aeda52 100644
--- a/ext/com_dotnet/com_olechar.c
+++ b/ext/com_dotnet/com_olechar.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c
index e746814314..18f411c64d 100644
--- a/ext/com_dotnet/com_persist.c
+++ b/ext/com_dotnet/com_persist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c
index a92c047e31..17706a18cb 100644
--- a/ext/com_dotnet/com_saproxy.c
+++ b/ext/com_dotnet/com_saproxy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c
index 5993b47429..ba1d7724f8 100644
--- a/ext/com_dotnet/com_typeinfo.c
+++ b/ext/com_dotnet/com_typeinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c
index 1779bbdf5e..58ba3f154c 100644
--- a/ext/com_dotnet/com_variant.c
+++ b/ext/com_dotnet/com_variant.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -44,10 +44,10 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage)
zval *item;
/* find the largest array index, and assert that all keys are integers */
- zend_hash_internal_pointer_reset_ex(HASH_OF(z), &pos);
- for (;; zend_hash_move_forward_ex(HASH_OF(z), &pos)) {
+ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(z), &pos);
+ for (;; zend_hash_move_forward_ex(Z_ARRVAL_P(z), &pos)) {
- keytype = zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &intindex, &pos);
+ keytype = zend_hash_get_current_key_ex(Z_ARRVAL_P(z), &strindex, &intindex, &pos);
if (HASH_KEY_IS_STRING == keytype) {
goto bogus;
@@ -61,7 +61,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage)
/* allocate the structure */
bound.lLbound = 0;
- bound.cElements = zend_hash_num_elements(HASH_OF(z));
+ bound.cElements = zend_hash_num_elements(Z_ARRVAL_P(z));
sa = SafeArrayCreate(VT_VARIANT, 1, &bound);
/* get a lock on the array itself */
@@ -69,12 +69,12 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage)
va = (VARIANT*)sa->pvData;
/* now fill it in */
- zend_hash_internal_pointer_reset_ex(HASH_OF(z), &pos);
- for (;; zend_hash_move_forward_ex(HASH_OF(z), &pos)) {
- if (NULL == (item = zend_hash_get_current_data_ex(HASH_OF(z), &pos))) {
+ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(z), &pos);
+ for (;; zend_hash_move_forward_ex(Z_ARRVAL_P(z), &pos)) {
+ if (NULL == (item = zend_hash_get_current_data_ex(Z_ARRVAL_P(z), &pos))) {
break;
}
- zend_hash_get_current_key_ex(HASH_OF(z), &strindex, &intindex, &pos);
+ zend_hash_get_current_key_ex(Z_ARRVAL_P(z), &strindex, &intindex, &pos);
php_com_variant_from_zval(&va[intindex], item, codepage);
}
diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c
index 3b24267f2d..fe17148e3b 100644
--- a/ext/com_dotnet/com_wrapper.c
+++ b/ext/com_dotnet/com_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h
index 8ac6e039b6..640f5db08f 100644
--- a/ext/com_dotnet/php_com_dotnet.h
+++ b/ext/com_dotnet/php_com_dotnet.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -55,16 +55,12 @@ ZEND_BEGIN_MODULE_GLOBALS(com_dotnet)
zend_bool rshutdown_started;
ZEND_END_MODULE_GLOBALS(com_dotnet)
-#ifdef ZTS
-# define COMG(v) ZEND_TSRMG(com_dotnet_globals_id, zend_com_dotnet_globals *, v)
-# ifdef COMPILE_DL_COM_DOTNET
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define COMG(v) (com_dotnet_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_COM_DOTNET)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
extern ZEND_DECLARE_MODULE_GLOBALS(com_dotnet);
+#define COMG(v) ZEND_MODULE_GLOBALS_ACCESSOR(com_dotnet, v)
#endif /* PHP_COM_DOTNET_H */
diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h
index 1954d46e54..b8eb225d4f 100644
--- a/ext/com_dotnet/php_com_dotnet_internal.h
+++ b/ext/com_dotnet/php_com_dotnet_internal.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c
index ba555e2539..f439a59afd 100644
--- a/ext/ctype/ctype.c
+++ b/ext/ctype/ctype.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ctype/php_ctype.h b/ext/ctype/php_ctype.h
index b6c6775e87..23ef3fca07 100644
--- a/ext/ctype/php_ctype.h
+++ b/ext/ctype/php_ctype.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/curl/config.w32 b/ext/curl/config.w32
index 965721318e..8ea5f6524c 100644
--- a/ext/curl/config.w32
+++ b/ext/curl/config.w32
@@ -13,7 +13,7 @@ if (PHP_CURL != "no") {
&& (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
) {
- EXTENSION("curl", "interface.c multi.c share.c curl_file.c", true);
+ EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL');
diff --git a/ext/curl/curl_file.c b/ext/curl/curl_file.c
index 89b6cb22d2..de173a5f42 100644
--- a/ext/curl/curl_file.c
+++ b/ext/curl/curl_file.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 676c6adb81..072c23e48d 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -157,7 +157,8 @@ static void _php_curl_close(zend_resource *rsrc);
#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s) - 1, (zend_long) v);
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s) - 1, (double) v);
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s) - 1, (char *) (v ? v : ""));
-#define CAASTR(s, v) add_assoc_str_ex(return_value, s, sizeof(s) - 1, v ? v : ZSTR_EMPTY_ALLOC());
+#define CAASTR(s, v) add_assoc_str_ex(return_value, s, sizeof(s) - 1, \
+ v ? zend_string_copy(v) : ZSTR_EMPTY_ALLOC());
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s) -1 , (zval *) v);
#if defined(PHP_WIN32) || defined(__GNUC__)
@@ -567,6 +568,13 @@ PHP_MINFO_FUNCTION(curl)
#if LIBCURL_VERSION_NUM >= 0x072600 /* 7.38.0 */
{"GSSAPI", CURL_VERSION_GSSAPI},
#endif
+#if LIBCURL_VERSION_NUM >= 0x072800 /* 7.40.0 */
+ {"KERBEROS5", CURL_VERSION_KERBEROS5},
+ {"UNIX_SOCKETS", CURL_VERSION_UNIX_SOCKETS},
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072f00 /* 7.47.0 */
+ {"PSL", CURL_VERSION_PSL},
+#endif
{NULL, 0}
};
@@ -837,17 +845,15 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLM_INTERNAL_ERROR);
REGISTER_CURL_CONSTANT(CURLM_OK);
REGISTER_CURL_CONSTANT(CURLM_OUT_OF_MEMORY);
+#if LIBCURL_VERSION_NUM >= 0x072001 /* Available since 7.32.1 */
+ REGISTER_CURL_CONSTANT(CURLM_ADDED_ALREADY);
+#endif
/* Curl proxy constants */
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
-#if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */
- REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4A);
- REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5_HOSTNAME);
-#endif
-
/* Curl Share constants */
REGISTER_CURL_CONSTANT(CURLSHOPT_NONE);
REGISTER_CURL_CONSTANT(CURLSHOPT_SHARE);
@@ -856,9 +862,6 @@ PHP_MINIT_FUNCTION(curl)
/* Curl Http Version constants (CURLOPT_HTTP_VERSION) */
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_0);
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_1);
-#if LIBCURL_VERSION_NUM >= 0x072100 /* 7.33.0 */
- REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2_0);
-#endif
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_NONE);
/* Curl Lock constants */
@@ -888,9 +891,6 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURL_VERSION_KERBEROS4);
REGISTER_CURL_CONSTANT(CURL_VERSION_LIBZ);
REGISTER_CURL_CONSTANT(CURL_VERSION_SSL);
-#if LIBCURL_VERSION_NUM >= 0x072100 /* 7.33.0 */
- REGISTER_CURL_CONSTANT(CURL_VERSION_HTTP2);
-#endif
#if LIBCURL_VERSION_NUM >= 0x070a06 /* Available since 7.10.6 */
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
@@ -995,6 +995,7 @@ PHP_MINIT_FUNCTION(curl)
#endif
#if LIBCURL_VERSION_NUM >= 0x071000 /* Available since 7.16.0 */
+ REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT_BADFILE);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_SESSIONID_CACHE);
REGISTER_CURL_CONSTANT(CURLMOPT_PIPELINING);
#endif
@@ -1052,6 +1053,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLPAUSE_SEND_CONT);
REGISTER_CURL_CONSTANT(CURL_READFUNC_PAUSE);
REGISTER_CURL_CONSTANT(CURL_WRITEFUNC_PAUSE);
+
+ REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4A);
+ REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5_HOSTNAME);
#endif
#if LIBCURL_VERSION_NUM >= 0x071202 /* Available since 7.18.2 */
@@ -1084,6 +1088,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_PROXYPASSWORD);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERNAME);
REGISTER_CURL_CONSTANT(CURLOPT_USERNAME);
+ REGISTER_CURL_CONSTANT(CURL_REDIR_POST_301);
+ REGISTER_CURL_CONSTANT(CURL_REDIR_POST_302);
+ REGISTER_CURL_CONSTANT(CURL_REDIR_POST_ALL);
#endif
#if LIBCURL_VERSION_NUM >= 0x071303 /* Available since 7.19.3 */
@@ -1113,6 +1120,12 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLPROTO_SFTP);
REGISTER_CURL_CONSTANT(CURLPROTO_TELNET);
REGISTER_CURL_CONSTANT(CURLPROTO_TFTP);
+
+ REGISTER_CURL_CONSTANT(CURLPROXY_HTTP_1_0);
+
+ REGISTER_CURL_CONSTANT(CURLFTP_CREATE_DIR);
+ REGISTER_CURL_CONSTANT(CURLFTP_CREATE_DIR_NONE);
+ REGISTER_CURL_CONSTANT(CURLFTP_CREATE_DIR_RETRY);
#endif
#if LIBCURL_VERSION_NUM >= 0x071306 /* Available since 7.19.6 */
@@ -1148,8 +1161,8 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURL_RTSPREQ_PLAY);
REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECEIVE);
REGISTER_CURL_CONSTANT(CURL_RTSPREQ_RECORD);
- REGISTER_CURL_CONSTANT(CURL_RTSPREQ_SETUP);
REGISTER_CURL_CONSTANT(CURL_RTSPREQ_SET_PARAMETER);
+ REGISTER_CURL_CONSTANT(CURL_RTSPREQ_SETUP);
REGISTER_CURL_CONSTANT(CURL_RTSPREQ_TEARDOWN);
#endif
@@ -1192,6 +1205,7 @@ PHP_MINIT_FUNCTION(curl)
#endif
#if LIBCURL_VERSION_NUM >= 0x071600 /* Available since 7.22.0 */
+ REGISTER_CURL_CONSTANT(CURLAUTH_NTLM_WB);
REGISTER_CURL_CONSTANT(CURLGSSAPI_DELEGATION_FLAG);
REGISTER_CURL_CONSTANT(CURLGSSAPI_DELEGATION_POLICY_FLAG);
REGISTER_CURL_CONSTANT(CURLOPT_GSSAPI_DELEGATION);
@@ -1211,12 +1225,119 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLSSLOPT_ALLOW_BEAST);
#endif
+#if LIBCURL_VERSION_NUM >= 0x071901 /* Available since 7.25.1 */
+ REGISTER_CURL_CONSTANT(CURL_REDIR_POST_303);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071c00 /* Available since 7.28.0 */
+ REGISTER_CURL_CONSTANT(CURLSSH_AUTH_AGENT);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071e00 /* Available since 7.30.0 */
+ REGISTER_CURL_CONSTANT(CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE);
+ REGISTER_CURL_CONSTANT(CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE);
+ REGISTER_CURL_CONSTANT(CURLMOPT_MAX_HOST_CONNECTIONS);
+ REGISTER_CURL_CONSTANT(CURLMOPT_MAX_PIPELINE_LENGTH);
+ REGISTER_CURL_CONSTANT(CURLMOPT_MAX_TOTAL_CONNECTIONS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x071f00 /* Available since 7.31.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_SASL_IR);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072100 /* Available since 7.33.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_DNS_INTERFACE);
+ REGISTER_CURL_CONSTANT(CURLOPT_DNS_LOCAL_IP4);
+ REGISTER_CURL_CONSTANT(CURLOPT_DNS_LOCAL_IP6);
+ REGISTER_CURL_CONSTANT(CURLOPT_XOAUTH2_BEARER);
+
+ REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2_0);
+ REGISTER_CURL_CONSTANT(CURL_VERSION_HTTP2);
+#endif
+
#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_LOGIN_OPTIONS);
+
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_0);
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_1);
REGISTER_CURL_CONSTANT(CURL_SSLVERSION_TLSv1_2);
#endif
+#if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_EXPECT_100_TIMEOUT_MS);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_ENABLE_ALPN);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_ENABLE_NPN);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072500 /* Available since 7.37.0 */
+ REGISTER_CURL_CONSTANT(CURLHEADER_SEPARATE);
+ REGISTER_CURL_CONSTANT(CURLHEADER_UNIFIED);
+ REGISTER_CURL_CONSTANT(CURLOPT_HEADEROPT);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXYHEADER);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072600 /* Available since 7.38.0 */
+ REGISTER_CURL_CONSTANT(CURLAUTH_NEGOTIATE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072700 /* Available since 7.39.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_PINNEDPUBLICKEY);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072800 /* Available since 7.40.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_UNIX_SOCKET_PATH);
+
+ REGISTER_CURL_CONSTANT(CURLPROTO_SMB);
+ REGISTER_CURL_CONSTANT(CURLPROTO_SMBS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072900 /* Available since 7.41.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYSTATUS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072a00 /* Available since 7.42.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_PATH_AS_IS);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_FALSESTART);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072b00 /* Available since 7.43.0 */
+ REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2);
+
+ REGISTER_CURL_CONSTANT(CURLOPT_PIPEWAIT);
+ REGISTER_CURL_CONSTANT(CURLOPT_PROXY_SERVICE_NAME);
+ REGISTER_CURL_CONSTANT(CURLOPT_SERVICE_NAME);
+
+ REGISTER_CURL_CONSTANT(CURLPIPE_NOTHING);
+ REGISTER_CURL_CONSTANT(CURLPIPE_HTTP1);
+ REGISTER_CURL_CONSTANT(CURLPIPE_MULTIPLEX);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072c00 /* Available since 7.44.0 */
+ REGISTER_CURL_CONSTANT(CURLSSLOPT_NO_REVOKE);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072d00 /* Available since 7.45.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_DEFAULT_PROTOCOL);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072e00 /* Available since 7.46.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_STREAM_WEIGHT);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x072f00 /* Available since 7.47.0 */
+ REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2TLS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x073000 /* Available since 7.48.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_TFTP_NO_OPTIONS);
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x073100 /* Available since 7.49.0 */
+ REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
+ REGISTER_CURL_CONSTANT(CURLOPT_CONNECT_TO);
+ REGISTER_CURL_CONSTANT(CURLOPT_TCP_FASTOPEN);
+#endif
+
#if CURLOPT_FTPASCII != 0
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
#endif
@@ -1328,14 +1449,12 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
ZVAL_STRINGL(&argv[1], data, length);
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
fci.object = NULL;
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
fci.retval = &retval;
fci.param_count = 2;
fci.params = argv;
fci.no_separation = 0;
- fci.symbol_table = NULL;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
@@ -1379,14 +1498,12 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
ZVAL_STRING(&argv[2], string);
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
fci.object = NULL;
fci.retval = &retval;
fci.param_count = 3;
fci.params = argv;
fci.no_separation = 0;
- fci.symbol_table = NULL;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
@@ -1436,14 +1553,12 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
ZVAL_LONG(&argv[4], (zend_long)ulnow);
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
fci.object = NULL;
fci.retval = &retval;
fci.param_count = 5;
fci.params = argv;
fci.no_separation = 0;
- fci.symbol_table = NULL;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
@@ -1499,14 +1614,12 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
ZVAL_LONG(&argv[2], (int)size * nmemb);
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
fci.object = NULL;
fci.retval = &retval;
fci.param_count = 3;
fci.params = argv;
fci.no_separation = 0;
- fci.symbol_table = NULL;
ch->in_callback = 1;
error = zend_call_function(&fci, &t->fci_cache);
@@ -1567,9 +1680,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
ZVAL_STRINGL(&argv[1], data, length);
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fci.function_name, &t->func_name);
- fci.symbol_table = NULL;
fci.object = NULL;
fci.retval = &retval;
fci.param_count = 2;
@@ -1739,12 +1850,13 @@ static php_curl *alloc_curl_handle()
#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */
ch->handlers->fnmatch = NULL;
#endif
- ch->clone = 1;
+ ch->clone = emalloc(sizeof(uint32_t));
+ *ch->clone = 1;
memset(&ch->err, 0, sizeof(struct _php_curl_error));
zend_llist_init(&ch->to_free->str, sizeof(char *), (llist_dtor_func_t)curl_free_string, 0);
- zend_llist_init(&ch->to_free->post, sizeof(struct HttpPost), (llist_dtor_func_t)curl_free_post, 0);
+ zend_llist_init(&ch->to_free->post, sizeof(struct HttpPost *), (llist_dtor_func_t)curl_free_post, 0);
ch->to_free->slist = emalloc(sizeof(HashTable));
zend_hash_init(ch->to_free->slist, 4, NULL, curl_free_slist, 0);
@@ -1844,7 +1956,9 @@ static void _php_curl_set_default_options(php_curl *ch)
curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch);
curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_header);
curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch);
+#if !defined(ZTS)
curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
+#endif
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
@@ -1994,9 +2108,11 @@ PHP_FUNCTION(curl_copy_handle)
efree(dupch->to_free->slist);
efree(dupch->to_free);
dupch->to_free = ch->to_free;
+ efree(dupch->clone);
+ dupch->clone = ch->clone;
/* Keep track of cloned copies to avoid invoking curl destructors for every clone */
- ch->clone++;
+ (*ch->clone)++;
ZVAL_RES(return_value, zend_register_resource(dupch, le_curl));
dupch->res = Z_RES_P(return_value);
@@ -2008,6 +2124,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
CURLcode error = CURLE_OK;
zend_long lval;
+ ZVAL_DEREF(zvalue);
switch (option) {
/* Long options */
case CURLOPT_SSL_VERIFYHOST:
@@ -2133,7 +2250,6 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
case CURLOPT_CERTINFO:
#endif
#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
- case CURLOPT_NOPROXY:
case CURLOPT_PROTOCOLS:
case CURLOPT_REDIR_PROTOCOLS:
case CURLOPT_SOCKS5_GSSAPI_NEC:
@@ -2163,6 +2279,36 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
case CURLOPT_TCP_KEEPIDLE:
case CURLOPT_TCP_KEEPINTVL:
#endif
+#if LIBCURL_VERSION_NUM >= 0x071f00 /* Available since 7.31.0 */
+ case CURLOPT_SASL_IR:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */
+ case CURLOPT_EXPECT_100_TIMEOUT_MS:
+ case CURLOPT_SSL_ENABLE_ALPN:
+ case CURLOPT_SSL_ENABLE_NPN:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072500 /* Available since 7.37.0 */
+ case CURLOPT_HEADEROPT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072900 /* Available since 7.41.0 */
+ case CURLOPT_SSL_VERIFYSTATUS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072a00 /* Available since 7.42.0 */
+ case CURLOPT_PATH_AS_IS:
+ case CURLOPT_SSL_FALSESTART:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072b00 /* Available since 7.43.0 */
+ case CURLOPT_PIPEWAIT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072e00 /* Available since 7.46.0 */
+ case CURLOPT_STREAM_WEIGHT:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x073000 /* Available since 7.48.0 */
+ case CURLOPT_TFTP_NO_OPTIONS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x073100 /* Available since 7.49.0 */
+ case CURLOPT_TCP_FASTOPEN:
+#endif
#if CURLOPT_MUTE != 0
case CURLOPT_MUTE:
#endif
@@ -2174,6 +2320,12 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
return 1;
}
#endif
+# if defined(ZTS)
+ if (option == CURLOPT_DNS_USE_GLOBAL_CACHE) {
+ php_error_docref(NULL, E_WARNING, "CURLOPT_DNS_USE_GLOBAL_CACHE cannot be activated when thread safety is enabled");
+ return 1;
+ }
+# endif
error = curl_easy_setopt(ch->cp, option, lval);
break;
case CURLOPT_SAFE_UPLOAD:
@@ -2218,6 +2370,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
case CURLOPT_USERNAME:
#endif
#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
+ case CURLOPT_NOPROXY:
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
#endif
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
@@ -2241,6 +2394,19 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */
case CURLOPT_MAIL_AUTH:
#endif
+#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */
+ case CURLOPT_LOGIN_OPTIONS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072700 /* Available since 7.39.0 */
+ case CURLOPT_PINNEDPUBLICKEY:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072b00 /* Available since 7.43.0 */
+ case CURLOPT_PROXY_SERVICE_NAME:
+ case CURLOPT_SERVICE_NAME:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072d00 /* Available since 7.45.0 */
+ case CURLOPT_DEFAULT_PROTOCOL:
+#endif
{
zend_string *str = zval_get_string(zvalue);
int ret = php_curl_option_str(ch, option, ZSTR_VAL(str), ZSTR_LEN(str), 0);
@@ -2258,6 +2424,15 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
case CURLOPT_RTSP_SESSION_ID:
#endif
+#if LIBCURL_VERSION_NUM >= 0x072100 /* Available since 7.33.0 */
+ case CURLOPT_DNS_INTERFACE:
+ case CURLOPT_DNS_LOCAL_IP4:
+ case CURLOPT_DNS_LOCAL_IP6:
+ case CURLOPT_XOAUTH2_BEARER:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x072800 /* Available since 7.40.0 */
+ case CURLOPT_UNIX_SOCKET_PATH:
+#endif
#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */
case CURLOPT_KRBLEVEL:
#else
@@ -2403,6 +2578,12 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
#if LIBCURL_VERSION_NUM >= 0x071503 /* Available since 7.21.3 */
case CURLOPT_RESOLVE:
#endif
+#if LIBCURL_VERSION_NUM >= 0x072500 /* Available since 7.37.0 */
+ case CURLOPT_PROXYHEADER:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x073100 /* Available since 7.49.0 */
+ case CURLOPT_CONNECT_TO:
+#endif
{
zval *current;
HashTable *ph;
@@ -2441,12 +2622,23 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
name = "CURLOPT_RESOLVE";
break;
#endif
+#if LIBCURL_VERSION_NUM >= 0x072500 /* Available since 7.37.0 */
+ case CURLOPT_PROXYHEADER:
+ name = "CURLOPT_PROXYHEADER";
+ break;
+#endif
+#if LIBCURL_VERSION_NUM >= 0x073100 /* Available since 7.49.0 */
+ case CURLOPT_CONNECT_TO:
+ name = "CURLOPT_CONNECT_TO";
+ break;
+#endif
}
php_error_docref(NULL, E_WARNING, "You must pass either an object or an array with the %s argument", name);
return FAILURE;
}
ZEND_HASH_FOREACH_VAL(ph, current) {
+ ZVAL_DEREF(current);
val = zval_get_string(current);
slist = curl_slist_append(slist, ZSTR_VAL(val));
zend_string_release(val);
@@ -2456,7 +2648,11 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
}
} ZEND_HASH_FOREACH_END();
- zend_hash_index_update_ptr(ch->to_free->slist, option, slist);
+ if ((*ch->clone) == 1) {
+ zend_hash_index_update_ptr(ch->to_free->slist, option, slist);
+ } else {
+ zend_hash_next_index_insert_ptr(ch->to_free->slist, slist);
+ }
error = curl_easy_setopt(ch->cp, option, slist);
@@ -2514,6 +2710,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
zend_string_addref(string_key);
}
+ ZVAL_DEREF(current);
if (Z_TYPE_P(current) == IS_OBJECT &&
instanceof_function(Z_OBJCE_P(current), curl_CURLFile_class)) {
/* new-style file upload */
@@ -2580,7 +2777,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
return FAILURE;
}
- if (ch->clone == 0) {
+ if ((*ch->clone) == 1) {
zend_llist_clean(&ch->to_free->post);
}
zend_llist_add_element(&ch->to_free->post, &first);
@@ -2791,7 +2988,7 @@ PHP_FUNCTION(curl_setopt_array)
zend_ulong option;
zend_string *string_key;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "za", &zid, &arr) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &zid, &arr) == FAILURE) {
return;
}
@@ -2904,7 +3101,11 @@ PHP_FUNCTION(curl_getinfo)
if (ZEND_NUM_ARGS() < 2) {
char *s_code;
- zend_long l_code;
+ /* libcurl expects long datatype. So far no cases are known where
+ it would be an issue. Using zend_long would truncate a 64-bit
+ var on Win64, so the exact long datatype fits everywhere, as
+ long as there's no 32-bit int overflow. */
+ long l_code;
double d_code;
#if LIBCURL_VERSION_NUM > 0x071301
struct curl_certinfo *ci = NULL;
@@ -3008,7 +3209,7 @@ PHP_FUNCTION(curl_getinfo)
}
#endif
if (ch->header.str) {
- CAASTR("request_header", zend_string_copy(ch->header.str));
+ CAASTR("request_header", ch->header.str);
}
} else {
switch (option) {
@@ -3153,9 +3354,7 @@ PHP_FUNCTION(curl_close)
return;
}
- if (Z_REFCOUNT_P(zid) <= 2) {
- zend_list_close(Z_RES_P(zid));
- }
+ zend_list_close(Z_RES_P(zid));
}
/* }}} */
@@ -3186,12 +3385,13 @@ static void _php_curl_close_ex(php_curl *ch)
curl_easy_cleanup(ch->cp);
/* cURL destructors should be invoked only by last curl handle */
- if (--ch->clone == 0) {
+ if (--(*ch->clone) == 0) {
zend_llist_clean(&ch->to_free->str);
zend_llist_clean(&ch->to_free->post);
zend_hash_destroy(ch->to_free->slist);
efree(ch->to_free->slist);
efree(ch->to_free);
+ efree(ch->clone);
}
smart_str_free(&ch->handlers->write->buf);
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index d5916d6f58..ab6d56c438 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -116,7 +116,7 @@ void _php_curl_multi_cleanup_list(void *data) /* {{{ */
return;
}
- zend_list_close(Z_RES_P(z_ch));
+ zend_list_delete(Z_RES_P(z_ch));
}
/* }}} */
@@ -151,7 +151,7 @@ PHP_FUNCTION(curl_multi_remove_handle)
}
RETVAL_LONG((zend_long)curl_multi_remove_handle(mh->multi, ch->cp));
- zend_llist_del_element(&mh->easyh, &z_ch, (int (*)(void *, void *))curl_compare_resources);
+ zend_llist_del_element(&mh->easyh, z_ch, (int (*)(void *, void *))curl_compare_resources);
}
/* }}} */
@@ -417,6 +417,13 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
#if LIBCURL_VERSION_NUM >= 0x071003 /* 7.16.3 */
case CURLMOPT_MAXCONNECTS:
#endif
+#if LIBCURL_VERSION_NUM >= 0x071e00 /* 7.30.0 */
+ case CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE:
+ case CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE:
+ case CURLMOPT_MAX_HOST_CONNECTIONS:
+ case CURLMOPT_MAX_PIPELINE_LENGTH:
+ case CURLMOPT_MAX_TOTAL_CONNECTIONS:
+#endif
error = curl_multi_setopt(mh->multi, option, zval_get_long(zvalue));
break;
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index b3853ef6fd..d3a22c7c30 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -181,7 +181,7 @@ typedef struct {
struct _php_curl_send_headers header;
struct _php_curl_error err;
zend_bool in_callback;
- uint32_t clone;
+ uint32_t* clone;
} php_curl;
#define CURLOPT_SAFE_UPLOAD -1
diff --git a/ext/curl/share.c b/ext/curl/share.c
index 078518f8ac..3806e2778b 100644
--- a/ext/curl/share.c
+++ b/ext/curl/share.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/curl/tests/bug52202.phpt b/ext/curl/tests/bug52202.phpt
index a304d7f77a..eee386480e 100644
--- a/ext/curl/tests/bug52202.phpt
+++ b/ext/curl/tests/bug52202.phpt
@@ -9,6 +9,8 @@ if (!extension_loaded('curl')) exit("skip curl extension not loaded");
$curl = curl_init("http://www.google.com");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_PRIVATE, "123");
+curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
+curl_setopt($curl, CURLOPT_TIMEOUT, 1);
curl_exec($curl);
var_dump(curl_getinfo($curl, CURLINFO_PRIVATE));
diff --git a/ext/curl/tests/bug55767.phpt b/ext/curl/tests/bug55767.phpt
index 161ced0bf1..bbeecb6b87 100644
--- a/ext/curl/tests/bug55767.phpt
+++ b/ext/curl/tests/bug55767.phpt
@@ -2,7 +2,7 @@
Test curl_opt() function with POST params from array with a numeric key
--SKIPIF--
<?php
-include 'skipinf.inc';
+include 'skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/curl/tests/bug64267.phpt b/ext/curl/tests/bug64267.phpt
index 1b115588ff..ca1fe4b368 100644
--- a/ext/curl/tests/bug64267.phpt
+++ b/ext/curl/tests/bug64267.phpt
@@ -2,6 +2,7 @@
Bug #64267 (CURLOPT_INFILE doesn't allow reset)
--SKIPIF--
<?php
+if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
extension_loaded("curl") or die("skip need ext/curl");
?>
--FILE--
@@ -15,7 +16,9 @@ var_dump(curl_setopt_array($c, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_UPLOAD => true,
CURLOPT_INFILE => $f,
- CURLOPT_INFILESIZE => filesize(__FILE__)
+ CURLOPT_INFILESIZE => filesize(__FILE__),
+ CURLOPT_CONNECTTIMEOUT => 1,
+ CURLOPT_TIMEOUT => 1,
]));
fclose($f);
var_dump(curl_setopt_array($c, [
diff --git a/ext/curl/tests/bug68937.phpt b/ext/curl/tests/bug68937.phpt
index a661ec01ce..0f346cf3fa 100644
--- a/ext/curl/tests/bug68937.phpt
+++ b/ext/curl/tests/bug68937.phpt
@@ -8,16 +8,24 @@ include 'skipif.inc';
--FILE--
<?php
-$ch = curl_init('http://www.google.com/');
+include 'server.inc';
+$host = curl_cli_server_start();
+
+$url = "{$host}/get.php";
+
+$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_INFILESIZE => 1,
CURLOPT_HTTPHEADER => array(
+ 'Expect:',
'Content-Length: 1',
),
- CURLOPT_READFUNCTION => 'curl_read'
+ CURLOPT_READFUNCTION => 'curl_read',
+ CURLOPT_CONNECTTIMEOUT=> 1,
+ CURLOPT_TIMEOUT=>1
));
function curl_read($ch, $fp, $len) {
diff --git a/ext/curl/tests/bug68937_2.phpt b/ext/curl/tests/bug68937_2.phpt
index 418a96dc8d..c25da3fd71 100644
--- a/ext/curl/tests/bug68937_2.phpt
+++ b/ext/curl/tests/bug68937_2.phpt
@@ -7,8 +7,12 @@ include 'skipif.inc';
?>
--FILE--
<?php
+include 'server.inc';
+$host = curl_cli_server_start();
-$ch = curl_init('http://www.google.com/');
+$url = "{$host}/get.php";
+
+$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => false,
CURLOPT_RETURNTRANSFER => true,
@@ -16,9 +20,12 @@ curl_setopt_array($ch, array(
CURLOPT_INFILESIZE => filesize(__FILE__),
CURLOPT_INFILE => fopen(__FILE__, 'r'),
CURLOPT_HTTPHEADER => array(
+ 'Expect:',
'Content-Length: 1',
),
- CURLOPT_READFUNCTION => 'curl_read'
+ CURLOPT_READFUNCTION => 'curl_read',
+ CURLOPT_CONNECTTIMEOUT => 1,
+ CURLOPT_TIMEOUT => 1
));
function curl_read($ch, $fp, $len) {
diff --git a/ext/curl/tests/bug70330.phpt b/ext/curl/tests/bug70330.phpt
new file mode 100644
index 0000000000..570a451cda
--- /dev/null
+++ b/ext/curl/tests/bug70330.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70330 (Segmentation Fault with multiple "curl_copy_handle")
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+$t2 = curl_init();
+$t3 = curl_copy_handle($t2);
+$t3 = curl_copy_handle($t2);
+$t4 = curl_init();
+$t3 = curl_copy_handle($t4);
+$t5 = curl_init();
+$t6 = curl_copy_handle($t5);
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/curl/tests/bug71144.phpt b/ext/curl/tests/bug71144.phpt
new file mode 100644
index 0000000000..059cd63651
--- /dev/null
+++ b/ext/curl/tests/bug71144.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #71144 (Sementation fault when using cURL with ZTS)
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+<?php if (!PHP_ZTS) { print "skip only for zts build"; } ?>
+--FILE--
+<?php
+$ch = curl_init();
+var_dump(curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, 1));
+?>
+--EXPECTF--
+Warning: curl_setopt(): CURLOPT_DNS_USE_GLOBAL_CACHE cannot be activated when thread safety is enabled in %sbug71144.php on line %d
+bool(false)
diff --git a/ext/curl/tests/bug71523.phpt b/ext/curl/tests/bug71523.phpt
new file mode 100644
index 0000000000..24aa83c620
--- /dev/null
+++ b/ext/curl/tests/bug71523.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if (getenv("SKIP_ONLINE_TESTS")) {
+ die("skip online test");
+}
+?>
+--FILE--
+<?php
+
+$base = curl_init('http://www.google.com/');
+curl_setopt($base, CURLOPT_RETURNTRANSFER, true);
+$mh = curl_multi_init();
+
+for ($i = 0; $i < 2; ++$i) {
+ $ch = curl_copy_handle($base);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, ['Foo: Bar']);
+ curl_multi_add_handle($mh, $ch);
+}
+
+do {
+ curl_multi_exec($mh, $active);
+} while ($active);
+?>
+okey
+--EXPECTF--
+okey
diff --git a/ext/curl/tests/bug72202.phpt b/ext/curl/tests/bug72202.phpt
new file mode 100644
index 0000000000..63138d9ba6
--- /dev/null
+++ b/ext/curl/tests/bug72202.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #72202 (curl_close doesn't close cURL handle)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if (getenv("SKIP_ONLINE_TESTS")) {
+ die("skip online test");
+}
+?>
+--FILE--
+<?php
+$a = fopen(__FILE__, "r");
+$b = $a;
+var_dump($a, $b);
+fclose($a);
+var_dump($a, $b);
+unset($a, $b);
+
+$a = curl_init();
+$b = $a;
+var_dump($a, $b);
+curl_close($a);
+var_dump($a, $b);
+unset($a, $b);
+?>
+--EXPECTF--
+resource(%d) of type (stream)
+resource(%d) of type (stream)
+resource(%d) of type (Unknown)
+resource(%d) of type (Unknown)
+resource(%d) of type (curl)
+resource(%d) of type (curl)
+resource(%d) of type (Unknown)
+resource(%d) of type (Unknown)
diff --git a/ext/curl/tests/check_win_config.phpt b/ext/curl/tests/check_win_config.phpt
index 3d13638f90..fc1c66609a 100644
--- a/ext/curl/tests/check_win_config.phpt
+++ b/ext/curl/tests/check_win_config.phpt
@@ -42,6 +42,9 @@ SSPI => Yes
TLS-SRP => No
HTTP2 => No
GSSAPI => No
+KERBEROS5 => Yes
+UNIX_SOCKETS => No
+PSL => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host => %s-pc-win32
SSL Version => OpenSSL/%s
diff --git a/ext/date/config.w32 b/ext/date/config.w32
index d4dd1bd366..ff5c4fff1c 100755
--- a/ext/date/config.w32
+++ b/ext/date/config.w32
@@ -11,6 +11,12 @@ var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
tl_config.WriteLine("#include \"config.w32.h\"");
tl_config.WriteLine("#include <php_stdint.h>");
tl_config.WriteLine("#define TIMELIB_OMIT_STDINT 1");
+tl_config.WriteLine("#include \"zend.h\"");
+tl_config.WriteLine("#define timelib_malloc emalloc");
+tl_config.WriteLine("#define timelib_realloc erealloc");
+tl_config.WriteLine("#define timelib_calloc ecalloc");
+tl_config.WriteLine("#define timelib_strdup estrdup");
+tl_config.WriteLine("#define timelib_free efree");
tl_config.Close();
PHP_INSTALL_HEADERS("ext/date/", "php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h");
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
index aa28890b5b..ca895379f2 100644
--- a/ext/date/config0.m4
+++ b/ext/date/config0.m4
@@ -25,4 +25,12 @@ cat > $ext_builddir/lib/timelib_config.h <<EOF
#endif
#include <php_stdint.h>
#define TIMELIB_OMIT_STDINT 1
+
+#include "zend.h"
+
+#define timelib_malloc emalloc
+#define timelib_realloc erealloc
+#define timelib_calloc ecalloc
+#define timelib_strdup estrdup
+#define timelib_free efree
EOF
diff --git a/ext/date/lib/LICENSE.rst b/ext/date/lib/LICENSE.rst
new file mode 100644
index 0000000000..cde273c6a9
--- /dev/null
+++ b/ext/date/lib/LICENSE.rst
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Derick Rethans
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/ext/date/lib/README b/ext/date/lib/README
deleted file mode 100644
index 2b6b7f2c43..0000000000
--- a/ext/date/lib/README
+++ /dev/null
@@ -1,7 +0,0 @@
-Regenerating Parser
-===================
-
-Make sure you use re2c 0.9.10 or higher:
-
-re2c -d -b -o ext/date/lib/parse_date.c ext/date/lib/parse_date.re
-re2c -d -b -o ext/date/lib/parse_iso_intervals.c ext/date/lib/parse_iso_intervals.re
diff --git a/ext/date/lib/README.rst b/ext/date/lib/README.rst
new file mode 100644
index 0000000000..23faac381f
--- /dev/null
+++ b/ext/date/lib/README.rst
@@ -0,0 +1,8 @@
+timelib
+=======
+
+Timelib is a timezone and date/time library that can calculate local time,
+convert between timezones and parse textual descriptions of date/time
+information.
+
+It is the library supporting PHP's Date/Time extension.
diff --git a/ext/date/lib/astro.c b/ext/date/lib/astro.c
index 697f99fb15..69ff6c2056 100644
--- a/ext/date/lib/astro.c
+++ b/ext/date/lib/astro.c
@@ -1,26 +1,31 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+/*
| Algorithms are taken from a public domain source by Paul |
| Schlyter, who wrote this in December 1992 |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include <stdio.h>
#include <math.h>
#include "timelib.h"
diff --git a/ext/date/lib/astro.h b/ext/date/lib/astro.h
index 7b85c76b74..8b2b800b52 100644
--- a/ext/date/lib/astro.h
+++ b/ext/date/lib/astro.h
@@ -1,3 +1,27 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
/* This macro computes the length of the day, from sunrise to sunset. */
/* Sunrise/set is considered to occur when the Sun's upper limb is */
/* 35 arc minutes below the horizon (this accounts for the refraction */
diff --git a/ext/date/lib/dow.c b/ext/date/lib/dow.c
index 014d7af281..78aca8c702 100644
--- a/ext/date/lib/dow.c
+++ b/ext/date/lib/dow.c
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
static int m_table_common[13] = { -1, 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */
diff --git a/ext/date/lib/interval.c b/ext/date/lib/interval.c
index 67e81d59c2..9c1cc3b273 100644
--- a/ext/date/lib/interval.c
+++ b/ext/date/lib/interval.c
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include <math.h>
@@ -66,7 +70,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
rt->i += dst_m_corr;
}
- rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400));
+ rt->days = fabs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400));
timelib_do_rel_normalize(rt->invert ? one : two, rt);
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index 84414e9aef..059b04cfcd 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,21 +1,27 @@
-/* Generated by re2c 0.13.5 on Tue Mar 31 16:32:03 2015 */
+/* Generated by re2c 0.13.5 on Thu Aug 13 10:30:11 2015 */
#line 1 "ext/date/lib/parse_date.re"
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
/* $Id$ */
@@ -106,7 +112,7 @@ typedef unsigned char uchar;
#define RET(i) {s->cur = cursor; return i;}
-#define timelib_string_free free
+#define timelib_string_free timelib_free
#define TIMELIB_HAVE_TIME() { if (s->time->have_time) { add_error(s, "Double time specification"); timelib_string_free(str); return TIMELIB_ERROR; } else { s->time->have_time = 1; s->time->h = 0; s->time->i = 0; s->time->s = 0; s->time->f = 0; } }
#define TIMELIB_UNHAVE_TIME() { s->time->have_time = 0; s->time->h = 0; s->time->i = 0; s->time->s = 0; s->time->f = 0; }
@@ -318,7 +324,7 @@ uchar *fill(Scanner *s, uchar *cursor){
s->lim -= cnt;
}
if((s->top - s->lim) < BSIZE){
- uchar *buf = (uchar*) malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar));
+ uchar *buf = (uchar*) timelib_malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar));
memcpy(buf, s->tok, s->lim - s->tok);
s->tok = buf;
s->ptr = &buf[s->ptr - s->bot];
@@ -326,7 +332,7 @@ uchar *fill(Scanner *s, uchar *cursor){
s->pos = &buf[s->pos - s->bot];
s->lim = &buf[s->lim - s->bot];
s->top = &s->lim[BSIZE];
- free(s->bot);
+ timelib_free(s->bot);
s->bot = buf;
}
if((cnt = read(s->fd, (char*) s->lim, BSIZE)) != BSIZE){
@@ -341,37 +347,37 @@ uchar *fill(Scanner *s, uchar *cursor){
static void add_warning(Scanner *s, char *error)
{
s->errors->warning_count++;
- s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
+ s->errors->warning_messages = timelib_realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
s->errors->warning_messages[s->errors->warning_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->warning_messages[s->errors->warning_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
+ s->errors->warning_messages[s->errors->warning_count - 1].message = timelib_strdup(error);
}
static void add_error(Scanner *s, char *error)
{
s->errors->error_count++;
- s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
+ s->errors->error_messages = timelib_realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
s->errors->error_messages[s->errors->error_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->error_messages[s->errors->error_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
+ s->errors->error_messages[s->errors->error_count - 1].message = timelib_strdup(error);
}
static void add_pbf_warning(Scanner *s, char *error, char *sptr, char *cptr)
{
s->errors->warning_count++;
- s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
+ s->errors->warning_messages = timelib_realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
s->errors->warning_messages[s->errors->warning_count - 1].position = cptr - sptr;
s->errors->warning_messages[s->errors->warning_count - 1].character = *cptr;
- s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
+ s->errors->warning_messages[s->errors->warning_count - 1].message = timelib_strdup(error);
}
static void add_pbf_error(Scanner *s, char *error, char *sptr, char *cptr)
{
s->errors->error_count++;
- s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
+ s->errors->error_messages = timelib_realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
s->errors->error_messages[s->errors->error_count - 1].position = cptr - sptr;
s->errors->error_messages[s->errors->error_count - 1].character = *cptr;
- s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
+ s->errors->error_messages[s->errors->error_count - 1].message = timelib_strdup(error);
}
static timelib_sll timelib_meridian(char **ptr, timelib_sll h)
@@ -435,7 +441,7 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
static char *timelib_string(Scanner *s)
{
- char *tmp = calloc(1, s->cur - s->tok + 1);
+ char *tmp = timelib_calloc(1, s->cur - s->tok + 1);
memcpy(tmp, s->tok, s->cur - s->tok);
return tmp;
@@ -462,10 +468,10 @@ static timelib_sll timelib_get_nr_ex(char **ptr, int max_length, int *scanned_le
if (scanned_length) {
*scanned_length = end - begin;
}
- str = calloc(1, end - begin + 1);
+ str = timelib_calloc(1, end - begin + 1);
memcpy(str, begin, end - begin);
tmp_nr = strtoll(str, NULL, 10);
- free(str);
+ timelib_free(str);
return tmp_nr;
}
@@ -502,13 +508,13 @@ static double timelib_get_frac_nr(char **ptr, int max_length)
++len;
}
end = *ptr;
- str = calloc(1, end - begin + 1);
+ str = timelib_calloc(1, end - begin + 1);
memcpy(str, begin, end - begin);
if (str[0] == ':') {
str[0] = '.';
}
tmp_nr = strtod(str, NULL);
- free(str);
+ timelib_free(str);
return tmp_nr;
}
@@ -544,7 +550,7 @@ static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior)
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
for (tp = timelib_reltext_lookup; tp->name; tp++) {
@@ -554,7 +560,7 @@ static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior)
}
}
- free(word);
+ timelib_free(word);
return value;
}
@@ -577,7 +583,7 @@ static timelib_long timelib_lookup_month(char **ptr)
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
for (tp = timelib_month_lookup; tp->name; tp++) {
@@ -586,7 +592,7 @@ static timelib_long timelib_lookup_month(char **ptr)
}
}
- free(word);
+ timelib_free(word);
return value;
}
@@ -624,7 +630,7 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr)
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
for (tp = timelib_relunit_lookup; tp->name; tp++) {
@@ -634,7 +640,7 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr)
}
}
- free(word);
+ timelib_free(word);
return value;
}
@@ -719,7 +725,7 @@ static timelib_long timelib_lookup_abbr(char **ptr, int *dst, char **tz_abbr, in
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
if ((tp = abbr_search(word, -1, 0))) {
@@ -786,7 +792,7 @@ timelib_long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_n
found++;
}
}
- free(tz_abbr);
+ timelib_free(tz_abbr);
*tz_not_found = (found == 0);
retval = offset;
}
@@ -799,10 +805,10 @@ timelib_long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_n
#define timelib_split_free(arg) { \
int i; \
for (i = 0; i < arg.c; i++) { \
- free(arg.v[i]); \
+ timelib_free(arg.v[i]); \
} \
if (arg.v) { \
- free(arg.v); \
+ timelib_free(arg.v); \
} \
}
@@ -814,11 +820,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
-#line 940 "ext/date/lib/parse_date.re"
+#line 946 "ext/date/lib/parse_date.re"
-#line 822 "ext/date/lib/parse_date.c"
+#line 828 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -958,7 +964,7 @@ yy2:
}
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1620 "ext/date/lib/parse_date.re"
+#line 1626 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -971,7 +977,7 @@ yy3:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 975 "ext/date/lib/parse_date.c"
+#line 981 "ext/date/lib/parse_date.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1282,12 +1288,12 @@ yy11:
if (yych <= '9') goto yy1385;
yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1715 "ext/date/lib/parse_date.re"
+#line 1721 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 1291 "ext/date/lib/parse_date.c"
+#line 1297 "ext/date/lib/parse_date.c"
yy13:
YYDEBUG(13, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2344,11 +2350,11 @@ yy48:
if (yych <= '9') goto yy54;
yy49:
YYDEBUG(49, *YYCURSOR);
-#line 1704 "ext/date/lib/parse_date.re"
+#line 1710 "ext/date/lib/parse_date.re"
{
goto std;
}
-#line 2352 "ext/date/lib/parse_date.c"
+#line 2358 "ext/date/lib/parse_date.c"
yy50:
YYDEBUG(50, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2357,12 +2363,12 @@ yy51:
YYDEBUG(51, *YYCURSOR);
++YYCURSOR;
YYDEBUG(52, *YYCURSOR);
-#line 1709 "ext/date/lib/parse_date.re"
+#line 1715 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 2366 "ext/date/lib/parse_date.c"
+#line 2372 "ext/date/lib/parse_date.c"
yy53:
YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2749,7 +2755,7 @@ yy71:
if (yych == 's') goto yy73;
yy72:
YYDEBUG(72, *YYCURSOR);
-#line 1688 "ext/date/lib/parse_date.re"
+#line 1694 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2764,7 +2770,7 @@ yy72:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2768 "ext/date/lib/parse_date.c"
+#line 2774 "ext/date/lib/parse_date.c"
yy73:
YYDEBUG(73, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3526,7 +3532,7 @@ yy165:
}
yy166:
YYDEBUG(166, *YYCURSOR);
-#line 1551 "ext/date/lib/parse_date.re"
+#line 1557 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3543,7 +3549,7 @@ yy166:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
-#line 3547 "ext/date/lib/parse_date.c"
+#line 3553 "ext/date/lib/parse_date.c"
yy167:
YYDEBUG(167, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4063,7 +4069,7 @@ yy192:
}
yy193:
YYDEBUG(193, *YYCURSOR);
-#line 1610 "ext/date/lib/parse_date.re"
+#line 1616 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4072,7 +4078,7 @@ yy193:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4076 "ext/date/lib/parse_date.c"
+#line 4082 "ext/date/lib/parse_date.c"
yy194:
YYDEBUG(194, *YYCURSOR);
++YYCURSOR;
@@ -4123,7 +4129,7 @@ yy197:
}
yy198:
YYDEBUG(198, *YYCURSOR);
-#line 1356 "ext/date/lib/parse_date.re"
+#line 1362 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -4136,7 +4142,7 @@ yy198:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4140 "ext/date/lib/parse_date.c"
+#line 4146 "ext/date/lib/parse_date.c"
yy199:
YYDEBUG(199, *YYCURSOR);
yyaccept = 6;
@@ -4405,7 +4411,7 @@ yy221:
}
yy222:
YYDEBUG(222, *YYCURSOR);
-#line 1658 "ext/date/lib/parse_date.re"
+#line 1664 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4434,7 +4440,7 @@ yy222:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4438 "ext/date/lib/parse_date.c"
+#line 4444 "ext/date/lib/parse_date.c"
yy223:
YYDEBUG(223, *YYCURSOR);
yyaccept = 7;
@@ -5132,7 +5138,7 @@ yy277:
YYDEBUG(277, *YYCURSOR);
++YYCURSOR;
YYDEBUG(278, *YYCURSOR);
-#line 1634 "ext/date/lib/parse_date.re"
+#line 1640 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5155,7 +5161,7 @@ yy277:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 5159 "ext/date/lib/parse_date.c"
+#line 5165 "ext/date/lib/parse_date.c"
yy279:
YYDEBUG(279, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5333,7 +5339,7 @@ yy293:
++YYCURSOR;
yy294:
YYDEBUG(294, *YYCURSOR);
-#line 1328 "ext/date/lib/parse_date.re"
+#line 1334 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5346,7 +5352,7 @@ yy294:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 5350 "ext/date/lib/parse_date.c"
+#line 5356 "ext/date/lib/parse_date.c"
yy295:
YYDEBUG(295, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6566,7 +6572,7 @@ yy361:
if (yych <= '9') goto yy364;
yy363:
YYDEBUG(363, *YYCURSOR);
-#line 1472 "ext/date/lib/parse_date.re"
+#line 1478 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6579,7 +6585,7 @@ yy363:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 6583 "ext/date/lib/parse_date.c"
+#line 6589 "ext/date/lib/parse_date.c"
yy364:
YYDEBUG(364, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7217,7 +7223,7 @@ yy391:
}
yy392:
YYDEBUG(392, *YYCURSOR);
-#line 1530 "ext/date/lib/parse_date.re"
+#line 1536 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7237,7 +7243,7 @@ yy392:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 7241 "ext/date/lib/parse_date.c"
+#line 7247 "ext/date/lib/parse_date.c"
yy393:
YYDEBUG(393, *YYCURSOR);
yyaccept = 5;
@@ -8987,7 +8993,7 @@ yy453:
++YYCURSOR;
yy454:
YYDEBUG(454, *YYCURSOR);
-#line 1233 "ext/date/lib/parse_date.re"
+#line 1239 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -8998,7 +9004,7 @@ yy454:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 9002 "ext/date/lib/parse_date.c"
+#line 9008 "ext/date/lib/parse_date.c"
yy455:
YYDEBUG(455, *YYCURSOR);
yyaccept = 0;
@@ -9558,7 +9564,7 @@ yy474:
}
yy475:
YYDEBUG(475, *YYCURSOR);
-#line 1370 "ext/date/lib/parse_date.re"
+#line 1376 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9569,7 +9575,7 @@ yy475:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 9573 "ext/date/lib/parse_date.c"
+#line 9579 "ext/date/lib/parse_date.c"
yy476:
YYDEBUG(476, *YYCURSOR);
yyaccept = 10;
@@ -9710,7 +9716,7 @@ yy487:
YYDEBUG(487, *YYCURSOR);
++YYCURSOR;
YYDEBUG(488, *YYCURSOR);
-#line 1088 "ext/date/lib/parse_date.re"
+#line 1094 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9726,7 +9732,7 @@ yy487:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 9730 "ext/date/lib/parse_date.c"
+#line 9736 "ext/date/lib/parse_date.c"
yy489:
YYDEBUG(489, *YYCURSOR);
yyaccept = 11;
@@ -9739,7 +9745,7 @@ yy489:
}
yy490:
YYDEBUG(490, *YYCURSOR);
-#line 1125 "ext/date/lib/parse_date.re"
+#line 1131 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9764,7 +9770,7 @@ yy490:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9768 "ext/date/lib/parse_date.c"
+#line 9774 "ext/date/lib/parse_date.c"
yy491:
YYDEBUG(491, *YYCURSOR);
yyaccept = 11;
@@ -10074,7 +10080,7 @@ yy522:
YYDEBUG(522, *YYCURSOR);
++YYCURSOR;
YYDEBUG(523, *YYCURSOR);
-#line 1105 "ext/date/lib/parse_date.re"
+#line 1111 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10093,7 +10099,7 @@ yy522:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 10097 "ext/date/lib/parse_date.c"
+#line 10103 "ext/date/lib/parse_date.c"
yy524:
YYDEBUG(524, *YYCURSOR);
yyaccept = 11;
@@ -10199,7 +10205,7 @@ yy533:
if (yych <= '9') goto yy540;
yy534:
YYDEBUG(534, *YYCURSOR);
-#line 1287 "ext/date/lib/parse_date.re"
+#line 1293 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -10213,7 +10219,7 @@ yy534:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 10217 "ext/date/lib/parse_date.c"
+#line 10223 "ext/date/lib/parse_date.c"
yy535:
YYDEBUG(535, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10950,7 +10956,7 @@ yy604:
YYDEBUG(605, *YYCURSOR);
++YYCURSOR;
YYDEBUG(606, *YYCURSOR);
-#line 1302 "ext/date/lib/parse_date.re"
+#line 1308 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -10961,7 +10967,7 @@ yy604:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10965 "ext/date/lib/parse_date.c"
+#line 10971 "ext/date/lib/parse_date.c"
yy607:
YYDEBUG(607, *YYCURSOR);
yyaccept = 11;
@@ -10997,7 +11003,7 @@ yy610:
if (yych <= '9') goto yy604;
yy611:
YYDEBUG(611, *YYCURSOR);
-#line 1314 "ext/date/lib/parse_date.re"
+#line 1320 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -11010,7 +11016,7 @@ yy611:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 11014 "ext/date/lib/parse_date.c"
+#line 11020 "ext/date/lib/parse_date.c"
yy612:
YYDEBUG(612, *YYCURSOR);
yyaccept = 11;
@@ -11651,7 +11657,7 @@ yy655:
}
yy656:
YYDEBUG(656, *YYCURSOR);
-#line 1273 "ext/date/lib/parse_date.re"
+#line 1279 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11664,7 +11670,7 @@ yy656:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11668 "ext/date/lib/parse_date.c"
+#line 11674 "ext/date/lib/parse_date.c"
yy657:
YYDEBUG(657, *YYCURSOR);
yyaccept = 13;
@@ -11770,7 +11776,7 @@ yy665:
}
yy666:
YYDEBUG(666, *YYCURSOR);
-#line 1217 "ext/date/lib/parse_date.re"
+#line 1223 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11785,7 +11791,7 @@ yy666:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 11789 "ext/date/lib/parse_date.c"
+#line 11795 "ext/date/lib/parse_date.c"
yy667:
YYDEBUG(667, *YYCURSOR);
yyaccept = 14;
@@ -12018,7 +12024,7 @@ yy699:
if (yych <= ':') goto yy703;
yy700:
YYDEBUG(700, *YYCURSOR);
-#line 1500 "ext/date/lib/parse_date.re"
+#line 1506 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12038,7 +12044,7 @@ yy700:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12042 "ext/date/lib/parse_date.c"
+#line 12048 "ext/date/lib/parse_date.c"
yy701:
YYDEBUG(701, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12590,7 +12596,7 @@ yy762:
}
yy763:
YYDEBUG(763, *YYCURSOR);
-#line 1245 "ext/date/lib/parse_date.re"
+#line 1251 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -12603,7 +12609,7 @@ yy763:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 12607 "ext/date/lib/parse_date.c"
+#line 12613 "ext/date/lib/parse_date.c"
yy764:
YYDEBUG(764, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12642,7 +12648,7 @@ yy770:
YYDEBUG(770, *YYCURSOR);
++YYCURSOR;
YYDEBUG(771, *YYCURSOR);
-#line 1486 "ext/date/lib/parse_date.re"
+#line 1492 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -12655,7 +12661,7 @@ yy770:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 12659 "ext/date/lib/parse_date.c"
+#line 12665 "ext/date/lib/parse_date.c"
yy772:
YYDEBUG(772, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12793,7 +12799,7 @@ yy782:
}
yy783:
YYDEBUG(783, *YYCURSOR);
-#line 1521 "ext/date/lib/parse_date.re"
+#line 1527 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12801,7 +12807,7 @@ yy783:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12805 "ext/date/lib/parse_date.c"
+#line 12811 "ext/date/lib/parse_date.c"
yy784:
YYDEBUG(784, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12952,7 +12958,7 @@ yy792:
}
yy793:
YYDEBUG(793, *YYCURSOR);
-#line 1342 "ext/date/lib/parse_date.re"
+#line 1348 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -12965,7 +12971,7 @@ yy793:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 12969 "ext/date/lib/parse_date.c"
+#line 12975 "ext/date/lib/parse_date.c"
yy794:
YYDEBUG(794, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13180,7 +13186,7 @@ yy813:
if (yych <= '7') goto yy816;
yy814:
YYDEBUG(814, *YYCURSOR);
-#line 1453 "ext/date/lib/parse_date.re"
+#line 1459 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13198,7 +13204,7 @@ yy814:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13202 "ext/date/lib/parse_date.c"
+#line 13208 "ext/date/lib/parse_date.c"
yy815:
YYDEBUG(815, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13208,7 +13214,7 @@ yy816:
YYDEBUG(816, *YYCURSOR);
++YYCURSOR;
YYDEBUG(817, *YYCURSOR);
-#line 1434 "ext/date/lib/parse_date.re"
+#line 1440 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13226,7 +13232,7 @@ yy816:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13230 "ext/date/lib/parse_date.c"
+#line 13236 "ext/date/lib/parse_date.c"
yy818:
YYDEBUG(818, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13290,7 +13296,7 @@ yy820:
}
yy821:
YYDEBUG(821, *YYCURSOR);
-#line 1420 "ext/date/lib/parse_date.re"
+#line 1426 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -13303,7 +13309,7 @@ yy821:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 13307 "ext/date/lib/parse_date.c"
+#line 13313 "ext/date/lib/parse_date.c"
yy822:
YYDEBUG(822, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13406,7 +13412,7 @@ yy841:
++YYCURSOR;
yy842:
YYDEBUG(842, *YYCURSOR);
-#line 1394 "ext/date/lib/parse_date.re"
+#line 1400 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13431,7 +13437,7 @@ yy842:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 13435 "ext/date/lib/parse_date.c"
+#line 13441 "ext/date/lib/parse_date.c"
yy843:
YYDEBUG(843, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13693,7 +13699,7 @@ yy847:
}
yy848:
YYDEBUG(848, *YYCURSOR);
-#line 1382 "ext/date/lib/parse_date.re"
+#line 1388 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13704,7 +13710,7 @@ yy848:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 13708 "ext/date/lib/parse_date.c"
+#line 13714 "ext/date/lib/parse_date.c"
yy849:
YYDEBUG(849, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14624,7 +14630,7 @@ yy972:
if (yych <= '9') goto yy995;
yy973:
YYDEBUG(973, *YYCURSOR);
-#line 1259 "ext/date/lib/parse_date.re"
+#line 1265 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -14637,7 +14643,7 @@ yy973:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 14641 "ext/date/lib/parse_date.c"
+#line 14647 "ext/date/lib/parse_date.c"
yy974:
YYDEBUG(974, *YYCURSOR);
yyaccept = 22;
@@ -15646,7 +15652,7 @@ yy1065:
}
yy1067:
YYDEBUG(1067, *YYCURSOR);
-#line 1151 "ext/date/lib/parse_date.re"
+#line 1157 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15668,7 +15674,7 @@ yy1067:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 15672 "ext/date/lib/parse_date.c"
+#line 15678 "ext/date/lib/parse_date.c"
yy1068:
YYDEBUG(1068, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15760,7 +15766,7 @@ yy1074:
}
yy1075:
YYDEBUG(1075, *YYCURSOR);
-#line 1197 "ext/date/lib/parse_date.re"
+#line 1203 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15779,7 +15785,7 @@ yy1075:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 15783 "ext/date/lib/parse_date.c"
+#line 15789 "ext/date/lib/parse_date.c"
yy1076:
YYDEBUG(1076, *YYCURSOR);
yyaccept = 25;
@@ -16677,7 +16683,7 @@ yy1116:
}
yy1117:
YYDEBUG(1117, *YYCURSOR);
-#line 1593 "ext/date/lib/parse_date.re"
+#line 1599 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16693,7 +16699,7 @@ yy1117:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16697 "ext/date/lib/parse_date.c"
+#line 16703 "ext/date/lib/parse_date.c"
yy1118:
YYDEBUG(1118, *YYCURSOR);
++YYCURSOR;
@@ -16744,7 +16750,7 @@ yy1125:
YYDEBUG(1125, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1126, *YYCURSOR);
-#line 1066 "ext/date/lib/parse_date.re"
+#line 1072 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16765,7 +16771,7 @@ yy1125:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
-#line 16769 "ext/date/lib/parse_date.c"
+#line 16775 "ext/date/lib/parse_date.c"
yy1127:
YYDEBUG(1127, *YYCURSOR);
yyaccept = 26;
@@ -16873,7 +16879,7 @@ yy1140:
}
yy1141:
YYDEBUG(1141, *YYCURSOR);
-#line 1569 "ext/date/lib/parse_date.re"
+#line 1575 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16896,7 +16902,7 @@ yy1141:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16900 "ext/date/lib/parse_date.c"
+#line 16906 "ext/date/lib/parse_date.c"
yy1142:
YYDEBUG(1142, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19573,7 +19579,7 @@ yy1293:
goto yy1297;
yy1294:
YYDEBUG(1294, *YYCURSOR);
-#line 1043 "ext/date/lib/parse_date.re"
+#line 1049 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19595,7 +19601,7 @@ yy1294:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19599 "ext/date/lib/parse_date.c"
+#line 19605 "ext/date/lib/parse_date.c"
yy1295:
YYDEBUG(1295, *YYCURSOR);
yyaccept = 28;
@@ -19856,7 +19862,7 @@ yy1315:
YYDEBUG(1315, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1316, *YYCURSOR);
-#line 1026 "ext/date/lib/parse_date.re"
+#line 1032 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -19872,7 +19878,7 @@ yy1315:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19876 "ext/date/lib/parse_date.c"
+#line 19882 "ext/date/lib/parse_date.c"
yy1317:
YYDEBUG(1317, *YYCURSOR);
yyaccept = 0;
@@ -21303,7 +21309,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
-#line 1000 "ext/date/lib/parse_date.re"
+#line 1006 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21328,7 +21334,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21332 "ext/date/lib/parse_date.c"
+#line 21338 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21764,7 +21770,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
-#line 988 "ext/date/lib/parse_date.re"
+#line 994 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21775,7 +21781,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21779 "ext/date/lib/parse_date.c"
+#line 21785 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21810,7 +21816,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
-#line 978 "ext/date/lib/parse_date.re"
+#line 984 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21819,7 +21825,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21823 "ext/date/lib/parse_date.c"
+#line 21829 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23831,7 +23837,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
-#line 957 "ext/date/lib/parse_date.re"
+#line 963 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23839,7 +23845,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 23843 "ext/date/lib/parse_date.c"
+#line 23849 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23978,7 +23984,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
-#line 966 "ext/date/lib/parse_date.re"
+#line 972 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -23989,7 +23995,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 23993 "ext/date/lib/parse_date.c"
+#line 23999 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24522,7 +24528,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
-#line 945 "ext/date/lib/parse_date.re"
+#line 951 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24533,7 +24539,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24537 "ext/date/lib/parse_date.c"
+#line 24543 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24706,7 +24712,7 @@ yy1537:
goto yy1531;
}
}
-#line 1719 "ext/date/lib/parse_date.re"
+#line 1725 "ext/date/lib/parse_date.re"
}
@@ -24719,7 +24725,7 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
char *e = s + len - 1;
memset(&in, 0, sizeof(in));
- in.errors = malloc(sizeof(struct timelib_error_container));
+ in.errors = timelib_malloc(sizeof(struct timelib_error_container));
in.errors->warning_count = 0;
in.errors->warning_messages = NULL;
in.errors->error_count = 0;
@@ -24747,7 +24753,7 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
}
e++;
- in.str = malloc((e - s) + YYMAXFILL);
+ in.str = timelib_malloc((e - s) + YYMAXFILL);
memset(in.str, 0, (e - s) + YYMAXFILL);
memcpy(in.str, s, (e - s));
in.lim = in.str + (e - s) + YYMAXFILL;
@@ -24783,7 +24789,7 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
add_warning(&in, "The parsed date was invalid");
}
- free(in.str);
+ timelib_free(in.str);
if (errors) {
*errors = in.errors;
} else {
@@ -24834,7 +24840,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, size_t len,
int allow_extra = 0;
memset(&in, 0, sizeof(in));
- in.errors = malloc(sizeof(struct timelib_error_container));
+ in.errors = timelib_malloc(sizeof(struct timelib_error_container));
in.errors->warning_count = 0;
in.errors->warning_messages = NULL;
in.errors->error_count = 0;
@@ -25177,14 +25183,14 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
if (parsed->dst == TIMELIB_UNSET) parsed->dst = now->dst != TIMELIB_UNSET ? now->dst : 0;
if (!parsed->tz_abbr) {
- parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
+ parsed->tz_abbr = now->tz_abbr ? timelib_strdup(now->tz_abbr) : NULL;
}
if (!parsed->tz_info) {
parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL;
}
if (parsed->zone_type == 0 && now->zone_type != 0) {
parsed->zone_type = now->zone_type;
-/* parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
+/* parsed->tz_abbr = now->tz_abbr ? timelib_strdup(now->tz_abbr) : NULL;
parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL;
*/ parsed->is_localtime = 1;
}
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index 9303eae01e..3d4cf6bb61 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -1,19 +1,25 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
/* $Id$ */
@@ -104,7 +110,7 @@ typedef unsigned char uchar;
#define RET(i) {s->cur = cursor; return i;}
-#define timelib_string_free free
+#define timelib_string_free timelib_free
#define TIMELIB_HAVE_TIME() { if (s->time->have_time) { add_error(s, "Double time specification"); timelib_string_free(str); return TIMELIB_ERROR; } else { s->time->have_time = 1; s->time->h = 0; s->time->i = 0; s->time->s = 0; s->time->f = 0; } }
#define TIMELIB_UNHAVE_TIME() { s->time->have_time = 0; s->time->h = 0; s->time->i = 0; s->time->s = 0; s->time->f = 0; }
@@ -316,7 +322,7 @@ uchar *fill(Scanner *s, uchar *cursor){
s->lim -= cnt;
}
if((s->top - s->lim) < BSIZE){
- uchar *buf = (uchar*) malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar));
+ uchar *buf = (uchar*) timelib_malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar));
memcpy(buf, s->tok, s->lim - s->tok);
s->tok = buf;
s->ptr = &buf[s->ptr - s->bot];
@@ -324,7 +330,7 @@ uchar *fill(Scanner *s, uchar *cursor){
s->pos = &buf[s->pos - s->bot];
s->lim = &buf[s->lim - s->bot];
s->top = &s->lim[BSIZE];
- free(s->bot);
+ timelib_free(s->bot);
s->bot = buf;
}
if((cnt = read(s->fd, (char*) s->lim, BSIZE)) != BSIZE){
@@ -339,37 +345,37 @@ uchar *fill(Scanner *s, uchar *cursor){
static void add_warning(Scanner *s, char *error)
{
s->errors->warning_count++;
- s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
+ s->errors->warning_messages = timelib_realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
s->errors->warning_messages[s->errors->warning_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->warning_messages[s->errors->warning_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
+ s->errors->warning_messages[s->errors->warning_count - 1].message = timelib_strdup(error);
}
static void add_error(Scanner *s, char *error)
{
s->errors->error_count++;
- s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
+ s->errors->error_messages = timelib_realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
s->errors->error_messages[s->errors->error_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->error_messages[s->errors->error_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
+ s->errors->error_messages[s->errors->error_count - 1].message = timelib_strdup(error);
}
static void add_pbf_warning(Scanner *s, char *error, char *sptr, char *cptr)
{
s->errors->warning_count++;
- s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
+ s->errors->warning_messages = timelib_realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
s->errors->warning_messages[s->errors->warning_count - 1].position = cptr - sptr;
s->errors->warning_messages[s->errors->warning_count - 1].character = *cptr;
- s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
+ s->errors->warning_messages[s->errors->warning_count - 1].message = timelib_strdup(error);
}
static void add_pbf_error(Scanner *s, char *error, char *sptr, char *cptr)
{
s->errors->error_count++;
- s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
+ s->errors->error_messages = timelib_realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
s->errors->error_messages[s->errors->error_count - 1].position = cptr - sptr;
s->errors->error_messages[s->errors->error_count - 1].character = *cptr;
- s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
+ s->errors->error_messages[s->errors->error_count - 1].message = timelib_strdup(error);
}
static timelib_sll timelib_meridian(char **ptr, timelib_sll h)
@@ -433,7 +439,7 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
static char *timelib_string(Scanner *s)
{
- char *tmp = calloc(1, s->cur - s->tok + 1);
+ char *tmp = timelib_calloc(1, s->cur - s->tok + 1);
memcpy(tmp, s->tok, s->cur - s->tok);
return tmp;
@@ -460,10 +466,10 @@ static timelib_sll timelib_get_nr_ex(char **ptr, int max_length, int *scanned_le
if (scanned_length) {
*scanned_length = end - begin;
}
- str = calloc(1, end - begin + 1);
+ str = timelib_calloc(1, end - begin + 1);
memcpy(str, begin, end - begin);
tmp_nr = strtoll(str, NULL, 10);
- free(str);
+ timelib_free(str);
return tmp_nr;
}
@@ -500,13 +506,13 @@ static double timelib_get_frac_nr(char **ptr, int max_length)
++len;
}
end = *ptr;
- str = calloc(1, end - begin + 1);
+ str = timelib_calloc(1, end - begin + 1);
memcpy(str, begin, end - begin);
if (str[0] == ':') {
str[0] = '.';
}
tmp_nr = strtod(str, NULL);
- free(str);
+ timelib_free(str);
return tmp_nr;
}
@@ -542,7 +548,7 @@ static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior)
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
for (tp = timelib_reltext_lookup; tp->name; tp++) {
@@ -552,7 +558,7 @@ static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior)
}
}
- free(word);
+ timelib_free(word);
return value;
}
@@ -575,7 +581,7 @@ static timelib_long timelib_lookup_month(char **ptr)
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
for (tp = timelib_month_lookup; tp->name; tp++) {
@@ -584,7 +590,7 @@ static timelib_long timelib_lookup_month(char **ptr)
}
}
- free(word);
+ timelib_free(word);
return value;
}
@@ -622,7 +628,7 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr)
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
for (tp = timelib_relunit_lookup; tp->name; tp++) {
@@ -632,7 +638,7 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr)
}
}
- free(word);
+ timelib_free(word);
return value;
}
@@ -717,7 +723,7 @@ static timelib_long timelib_lookup_abbr(char **ptr, int *dst, char **tz_abbr, in
++*ptr;
}
end = *ptr;
- word = calloc(1, end - begin + 1);
+ word = timelib_calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
if ((tp = abbr_search(word, -1, 0))) {
@@ -784,7 +790,7 @@ timelib_long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_n
found++;
}
}
- free(tz_abbr);
+ timelib_free(tz_abbr);
*tz_not_found = (found == 0);
retval = offset;
}
@@ -797,10 +803,10 @@ timelib_long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_n
#define timelib_split_free(arg) { \
int i; \
for (i = 0; i < arg.c; i++) { \
- free(arg.v[i]); \
+ timelib_free(arg.v[i]); \
} \
if (arg.v) { \
- free(arg.v); \
+ timelib_free(arg.v); \
} \
}
@@ -1728,7 +1734,7 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
char *e = s + len - 1;
memset(&in, 0, sizeof(in));
- in.errors = malloc(sizeof(struct timelib_error_container));
+ in.errors = timelib_malloc(sizeof(struct timelib_error_container));
in.errors->warning_count = 0;
in.errors->warning_messages = NULL;
in.errors->error_count = 0;
@@ -1756,7 +1762,7 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
}
e++;
- in.str = malloc((e - s) + YYMAXFILL);
+ in.str = timelib_malloc((e - s) + YYMAXFILL);
memset(in.str, 0, (e - s) + YYMAXFILL);
memcpy(in.str, s, (e - s));
in.lim = in.str + (e - s) + YYMAXFILL;
@@ -1792,7 +1798,7 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
add_warning(&in, "The parsed date was invalid");
}
- free(in.str);
+ timelib_free(in.str);
if (errors) {
*errors = in.errors;
} else {
@@ -1806,6 +1812,11 @@ timelib_time* timelib_strtotime(char *s, size_t len, struct timelib_error_contai
{ \
add_pbf_error(s, "Unexpected data found.", string, begin); \
}
+#define TIMELIB_CHECK_SIGNED_NUMBER \
+ if (strchr("-0123456789", *ptr) == NULL) \
+ { \
+ add_pbf_error(s, "Unexpected data found.", string, begin); \
+ }
static void timelib_time_reset_fields(timelib_time *time)
{
@@ -1843,7 +1854,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, size_t len,
int allow_extra = 0;
memset(&in, 0, sizeof(in));
- in.errors = malloc(sizeof(struct timelib_error_container));
+ in.errors = timelib_malloc(sizeof(struct timelib_error_container));
in.errors->warning_count = 0;
in.errors->warning_messages = NULL;
in.errors->error_count = 0;
@@ -2010,7 +2021,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, size_t len,
timelib_eat_spaces((char **) &ptr);
break;
case 'U': /* epoch seconds */
- TIMELIB_CHECK_NUMBER;
+ TIMELIB_CHECK_SIGNED_NUMBER;
TIMELIB_HAVE_RELATIVE();
tmp = timelib_get_unsigned_nr((char **) &ptr, 24);
s->time->y = 1970;
@@ -2186,14 +2197,14 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
if (parsed->dst == TIMELIB_UNSET) parsed->dst = now->dst != TIMELIB_UNSET ? now->dst : 0;
if (!parsed->tz_abbr) {
- parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
+ parsed->tz_abbr = now->tz_abbr ? timelib_strdup(now->tz_abbr) : NULL;
}
if (!parsed->tz_info) {
parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL;
}
if (parsed->zone_type == 0 && now->zone_type != 0) {
parsed->zone_type = now->zone_type;
-/* parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
+/* parsed->tz_abbr = now->tz_abbr ? timelib_strdup(now->tz_abbr) : NULL;
parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL;
*/ parsed->is_localtime = 1;
}
diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c
index 65ffceb720..237201623b 100644
--- a/ext/date/lib/parse_iso_intervals.c
+++ b/ext/date/lib/parse_iso_intervals.c
@@ -1,21 +1,27 @@
-/* Generated by re2c 0.13.5 on Thu Oct 30 18:20:16 2014 */
+/* Generated by re2c 0.13.5 on Thu Aug 13 10:30:12 2015 */
#line 1 "ext/date/lib/parse_iso_intervals.re"
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
/* $Id$ */
@@ -71,7 +77,7 @@ typedef unsigned char uchar;
#define RET(i) {s->cur = cursor; return i;}
-#define timelib_string_free free
+#define timelib_string_free timelib_free
#define TIMELIB_INIT s->cur = cursor; str = timelib_string(s); ptr = str
#define TIMELIB_DEINIT timelib_string_free(str)
@@ -107,24 +113,24 @@ typedef struct Scanner {
static void add_warning(Scanner *s, char *error)
{
s->errors->warning_count++;
- s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
+ s->errors->warning_messages = timelib_realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
s->errors->warning_messages[s->errors->warning_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->warning_messages[s->errors->warning_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
+ s->errors->warning_messages[s->errors->warning_count - 1].message = timelib_strdup(error);
}
static void add_error(Scanner *s, char *error)
{
s->errors->error_count++;
- s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
+ s->errors->error_messages = timelib_realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
s->errors->error_messages[s->errors->error_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->error_messages[s->errors->error_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
+ s->errors->error_messages[s->errors->error_count - 1].message = timelib_strdup(error);
}
static char *timelib_string(Scanner *s)
{
- char *tmp = calloc(1, s->cur - s->tok + 1);
+ char *tmp = timelib_calloc(1, s->cur - s->tok + 1);
memcpy(tmp, s->tok, s->cur - s->tok);
return tmp;
@@ -148,10 +154,10 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length)
++len;
}
end = *ptr;
- str = calloc(1, end - begin + 1);
+ str = timelib_calloc(1, end - begin + 1);
memcpy(str, begin, end - begin);
tmp_nr = strtoll(str, NULL, 10);
- free(str);
+ timelib_free(str);
return tmp_nr;
}
@@ -228,10 +234,10 @@ static timelib_long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int
#define timelib_split_free(arg) { \
int i; \
for (i = 0; i < arg.c; i++) { \
- free(arg.v[i]); \
+ timelib_free(arg.v[i]); \
} \
if (arg.v) { \
- free(arg.v); \
+ timelib_free(arg.v); \
} \
}
@@ -248,11 +254,11 @@ static int scan(Scanner *s)
std:
s->tok = cursor;
s->len = 0;
-#line 276 "ext/date/lib/parse_iso_intervals.re"
+#line 282 "ext/date/lib/parse_iso_intervals.re"
-#line 256 "ext/date/lib/parse_iso_intervals.c"
+#line 262 "ext/date/lib/parse_iso_intervals.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -291,7 +297,6 @@ std:
0, 0, 0, 0, 0, 0, 0, 0,
};
- YYDEBUG(0, *YYCURSOR);
if ((YYLIMIT - YYCURSOR) < 20) YYFILL(20);
yych = *YYCURSOR;
if (yych <= ',') {
@@ -316,35 +321,30 @@ std:
if (yych != 'R') goto yy11;
}
}
- YYDEBUG(2, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '/') goto yy3;
if (yych <= '9') goto yy98;
yy3:
- YYDEBUG(3, *YYCURSOR);
-#line 389 "ext/date/lib/parse_iso_intervals.re"
+#line 395 "ext/date/lib/parse_iso_intervals.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 331 "ext/date/lib/parse_iso_intervals.c"
+#line 334 "ext/date/lib/parse_iso_intervals.c"
yy4:
- YYDEBUG(4, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy3;
if (yych <= '9') goto yy59;
goto yy3;
yy5:
- YYDEBUG(5, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy6;
if (yych <= '9') goto yy12;
if (yych == 'T') goto yy14;
yy6:
- YYDEBUG(6, *YYCURSOR);
-#line 316 "ext/date/lib/parse_iso_intervals.re"
+#line 322 "ext/date/lib/parse_iso_intervals.re"
{
timelib_sll nr;
int in_time = 0;
@@ -387,30 +387,24 @@ yy6:
}
#line 389 "ext/date/lib/parse_iso_intervals.c"
yy7:
- YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(8, *YYCURSOR);
-#line 378 "ext/date/lib/parse_iso_intervals.re"
+#line 384 "ext/date/lib/parse_iso_intervals.re"
{
goto std;
}
-#line 398 "ext/date/lib/parse_iso_intervals.c"
+#line 396 "ext/date/lib/parse_iso_intervals.c"
yy9:
- YYDEBUG(9, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(10, *YYCURSOR);
-#line 383 "ext/date/lib/parse_iso_intervals.re"
+#line 389 "ext/date/lib/parse_iso_intervals.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 408 "ext/date/lib/parse_iso_intervals.c"
+#line 404 "ext/date/lib/parse_iso_intervals.c"
yy11:
- YYDEBUG(11, *YYCURSOR);
yych = *++YYCURSOR;
goto yy3;
yy12:
- YYDEBUG(12, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'L') {
if (yych <= '9') {
@@ -427,7 +421,6 @@ yy12:
}
}
yy13:
- YYDEBUG(13, *YYCURSOR);
YYCURSOR = YYMARKER;
if (yyaccept <= 0) {
goto yy3;
@@ -435,7 +428,6 @@ yy13:
goto yy6;
}
yy14:
- YYDEBUG(14, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yybm[0+yych] & 128) {
@@ -443,11 +435,9 @@ yy14:
}
goto yy6;
yy15:
- YYDEBUG(15, *YYCURSOR);
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(16, *YYCURSOR);
if (yybm[0+yych] & 128) {
goto yy15;
}
@@ -459,28 +449,23 @@ yy15:
if (yych != 'S') goto yy13;
}
yy17:
- YYDEBUG(17, *YYCURSOR);
yych = *++YYCURSOR;
goto yy6;
yy18:
- YYDEBUG(18, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy6;
if (yych <= '9') goto yy22;
goto yy6;
yy19:
- YYDEBUG(19, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy6;
if (yych >= ':') goto yy6;
yy20:
- YYDEBUG(20, *YYCURSOR);
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(21, *YYCURSOR);
if (yych <= 'L') {
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy20;
@@ -491,22 +476,18 @@ yy20:
goto yy13;
}
yy22:
- YYDEBUG(22, *YYCURSOR);
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(23, *YYCURSOR);
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy22;
if (yych == 'S') goto yy17;
goto yy13;
yy24:
- YYDEBUG(24, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 'T') goto yy14;
goto yy6;
yy25:
- YYDEBUG(25, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'L') {
if (yych <= '9') {
@@ -526,7 +507,6 @@ yy25:
}
}
yy26:
- YYDEBUG(26, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy6;
@@ -534,7 +514,6 @@ yy26:
if (yych == 'T') goto yy14;
goto yy6;
yy27:
- YYDEBUG(27, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy6;
@@ -542,7 +521,6 @@ yy27:
if (yych == 'T') goto yy14;
goto yy6;
yy28:
- YYDEBUG(28, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy6;
@@ -550,11 +528,9 @@ yy28:
if (yych == 'T') goto yy14;
goto yy6;
yy29:
- YYDEBUG(29, *YYCURSOR);
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(30, *YYCURSOR);
if (yych <= 'D') {
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy29;
@@ -570,11 +546,9 @@ yy29:
}
}
yy31:
- YYDEBUG(31, *YYCURSOR);
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(32, *YYCURSOR);
if (yych <= 'C') {
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy31;
@@ -585,17 +559,14 @@ yy31:
goto yy13;
}
yy33:
- YYDEBUG(33, *YYCURSOR);
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(34, *YYCURSOR);
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy33;
if (yych == 'D') goto yy24;
goto yy13;
yy35:
- YYDEBUG(35, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'L') {
if (yych <= '9') {
@@ -614,22 +585,18 @@ yy35:
goto yy13;
}
}
- YYDEBUG(36, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '-') goto yy39;
- YYDEBUG(37, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '0') goto yy40;
if (yych <= '1') goto yy41;
goto yy13;
yy38:
- YYDEBUG(38, *YYCURSOR);
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
yy39:
- YYDEBUG(39, *YYCURSOR);
if (yych <= 'L') {
if (yych <= '9') {
if (yych <= '/') goto yy13;
@@ -649,21 +616,17 @@ yy39:
}
}
yy40:
- YYDEBUG(40, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy42;
goto yy13;
yy41:
- YYDEBUG(41, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '3') goto yy13;
yy42:
- YYDEBUG(42, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '-') goto yy13;
- YYDEBUG(43, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '0') goto yy44;
@@ -671,70 +634,55 @@ yy42:
if (yych <= '3') goto yy46;
goto yy13;
yy44:
- YYDEBUG(44, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy47;
goto yy13;
yy45:
- YYDEBUG(45, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy47;
goto yy13;
yy46:
- YYDEBUG(46, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '2') goto yy13;
yy47:
- YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != 'T') goto yy13;
- YYDEBUG(48, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '1') goto yy49;
if (yych <= '2') goto yy50;
goto yy13;
yy49:
- YYDEBUG(49, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy51;
goto yy13;
yy50:
- YYDEBUG(50, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '5') goto yy13;
yy51:
- YYDEBUG(51, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != ':') goto yy13;
- YYDEBUG(52, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '6') goto yy13;
- YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(54, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != ':') goto yy13;
- YYDEBUG(55, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '6') goto yy13;
- YYDEBUG(56, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(57, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(58, *YYCURSOR);
-#line 358 "ext/date/lib/parse_iso_intervals.re"
+#line 364 "ext/date/lib/parse_iso_intervals.re"
{
DEBUG_OUTPUT("combinedrep");
TIMELIB_INIT;
@@ -753,17 +701,14 @@ yy51:
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
}
-#line 757 "ext/date/lib/parse_iso_intervals.c"
+#line 705 "ext/date/lib/parse_iso_intervals.c"
yy59:
- YYDEBUG(59, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(60, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(61, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') {
if (yych == '-') goto yy64;
@@ -774,40 +719,33 @@ yy59:
goto yy13;
}
yy62:
- YYDEBUG(62, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '0') goto yy13;
if (yych <= '9') goto yy85;
goto yy13;
yy63:
- YYDEBUG(63, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '2') goto yy85;
goto yy13;
yy64:
- YYDEBUG(64, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '0') goto yy65;
if (yych <= '1') goto yy66;
goto yy13;
yy65:
- YYDEBUG(65, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '0') goto yy13;
if (yych <= '9') goto yy67;
goto yy13;
yy66:
- YYDEBUG(66, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '3') goto yy13;
yy67:
- YYDEBUG(67, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '-') goto yy13;
- YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '0') goto yy69;
@@ -815,74 +753,58 @@ yy67:
if (yych <= '3') goto yy71;
goto yy13;
yy69:
- YYDEBUG(69, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '0') goto yy13;
if (yych <= '9') goto yy72;
goto yy13;
yy70:
- YYDEBUG(70, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy72;
goto yy13;
yy71:
- YYDEBUG(71, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '2') goto yy13;
yy72:
- YYDEBUG(72, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != 'T') goto yy13;
- YYDEBUG(73, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '1') goto yy74;
if (yych <= '2') goto yy75;
goto yy13;
yy74:
- YYDEBUG(74, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy76;
goto yy13;
yy75:
- YYDEBUG(75, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '5') goto yy13;
yy76:
- YYDEBUG(76, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != ':') goto yy13;
- YYDEBUG(77, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '6') goto yy13;
- YYDEBUG(78, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(79, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != ':') goto yy13;
- YYDEBUG(80, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '6') goto yy13;
- YYDEBUG(81, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(82, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != 'Z') goto yy13;
yy83:
- YYDEBUG(83, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(84, *YYCURSOR);
-#line 292 "ext/date/lib/parse_iso_intervals.re"
+#line 298 "ext/date/lib/parse_iso_intervals.re"
{
timelib_time *current;
@@ -905,9 +827,8 @@ yy83:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 909 "ext/date/lib/parse_iso_intervals.c"
+#line 831 "ext/date/lib/parse_iso_intervals.c"
yy85:
- YYDEBUG(85, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '0') goto yy86;
@@ -915,75 +836,60 @@ yy85:
if (yych <= '3') goto yy88;
goto yy13;
yy86:
- YYDEBUG(86, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '0') goto yy13;
if (yych <= '9') goto yy89;
goto yy13;
yy87:
- YYDEBUG(87, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy89;
goto yy13;
yy88:
- YYDEBUG(88, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '2') goto yy13;
yy89:
- YYDEBUG(89, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != 'T') goto yy13;
- YYDEBUG(90, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '1') goto yy91;
if (yych <= '2') goto yy92;
goto yy13;
yy91:
- YYDEBUG(91, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych <= '9') goto yy93;
goto yy13;
yy92:
- YYDEBUG(92, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '5') goto yy13;
yy93:
- YYDEBUG(93, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '6') goto yy13;
- YYDEBUG(94, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(95, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= '6') goto yy13;
- YYDEBUG(96, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy13;
if (yych >= ':') goto yy13;
- YYDEBUG(97, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 'Z') goto yy83;
goto yy13;
yy98:
- YYDEBUG(98, *YYCURSOR);
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(99, *YYCURSOR);
if (yych <= '/') goto yy100;
if (yych <= '9') goto yy98;
yy100:
- YYDEBUG(100, *YYCURSOR);
-#line 281 "ext/date/lib/parse_iso_intervals.re"
+#line 287 "ext/date/lib/parse_iso_intervals.re"
{
DEBUG_OUTPUT("recurrences");
TIMELIB_INIT;
@@ -993,9 +899,9 @@ yy100:
s->have_recurrences = 1;
return TIMELIB_PERIOD;
}
-#line 997 "ext/date/lib/parse_iso_intervals.c"
+#line 903 "ext/date/lib/parse_iso_intervals.c"
}
-#line 393 "ext/date/lib/parse_iso_intervals.re"
+#line 399 "ext/date/lib/parse_iso_intervals.re"
}
#ifdef PHP_WIN32
@@ -1014,7 +920,7 @@ void timelib_strtointerval(char *s, size_t len,
char *e = s + len - 1;
memset(&in, 0, sizeof(in));
- in.errors = malloc(sizeof(struct timelib_error_container));
+ in.errors = timelib_malloc(sizeof(struct timelib_error_container));
in.errors->warning_count = 0;
in.errors->warning_messages = NULL;
in.errors->error_count = 0;
@@ -1040,7 +946,7 @@ void timelib_strtointerval(char *s, size_t len,
e++;
/* init cursor */
- in.str = malloc((e - s) + YYMAXFILL);
+ in.str = timelib_malloc((e - s) + YYMAXFILL);
memset(in.str, 0, (e - s) + YYMAXFILL);
memcpy(in.str, s, (e - s));
in.lim = in.str + (e - s) + YYMAXFILL;
@@ -1094,7 +1000,7 @@ void timelib_strtointerval(char *s, size_t len,
#endif
} while(t != EOI);
- free(in.str);
+ timelib_free(in.str);
if (errors) {
*errors = in.errors;
} else {
diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re
index 25da2d650a..6f23bb16f2 100644
--- a/ext/date/lib/parse_iso_intervals.re
+++ b/ext/date/lib/parse_iso_intervals.re
@@ -1,19 +1,25 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
/* $Id$ */
@@ -69,7 +75,7 @@ typedef unsigned char uchar;
#define RET(i) {s->cur = cursor; return i;}
-#define timelib_string_free free
+#define timelib_string_free timelib_free
#define TIMELIB_INIT s->cur = cursor; str = timelib_string(s); ptr = str
#define TIMELIB_DEINIT timelib_string_free(str)
@@ -105,24 +111,24 @@ typedef struct Scanner {
static void add_warning(Scanner *s, char *error)
{
s->errors->warning_count++;
- s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
+ s->errors->warning_messages = timelib_realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message));
s->errors->warning_messages[s->errors->warning_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->warning_messages[s->errors->warning_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
+ s->errors->warning_messages[s->errors->warning_count - 1].message = timelib_strdup(error);
}
static void add_error(Scanner *s, char *error)
{
s->errors->error_count++;
- s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
+ s->errors->error_messages = timelib_realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message));
s->errors->error_messages[s->errors->error_count - 1].position = s->tok ? s->tok - s->str : 0;
s->errors->error_messages[s->errors->error_count - 1].character = s->tok ? *s->tok : 0;
- s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
+ s->errors->error_messages[s->errors->error_count - 1].message = timelib_strdup(error);
}
static char *timelib_string(Scanner *s)
{
- char *tmp = calloc(1, s->cur - s->tok + 1);
+ char *tmp = timelib_calloc(1, s->cur - s->tok + 1);
memcpy(tmp, s->tok, s->cur - s->tok);
return tmp;
@@ -146,10 +152,10 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length)
++len;
}
end = *ptr;
- str = calloc(1, end - begin + 1);
+ str = timelib_calloc(1, end - begin + 1);
memcpy(str, begin, end - begin);
tmp_nr = strtoll(str, NULL, 10);
- free(str);
+ timelib_free(str);
return tmp_nr;
}
@@ -226,10 +232,10 @@ static timelib_long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int
#define timelib_split_free(arg) { \
int i; \
for (i = 0; i < arg.c; i++) { \
- free(arg.v[i]); \
+ timelib_free(arg.v[i]); \
} \
if (arg.v) { \
- free(arg.v); \
+ timelib_free(arg.v); \
} \
}
@@ -408,7 +414,7 @@ void timelib_strtointerval(char *s, size_t len,
char *e = s + len - 1;
memset(&in, 0, sizeof(in));
- in.errors = malloc(sizeof(struct timelib_error_container));
+ in.errors = timelib_malloc(sizeof(struct timelib_error_container));
in.errors->warning_count = 0;
in.errors->warning_messages = NULL;
in.errors->error_count = 0;
@@ -434,7 +440,7 @@ void timelib_strtointerval(char *s, size_t len,
e++;
/* init cursor */
- in.str = malloc((e - s) + YYMAXFILL);
+ in.str = timelib_malloc((e - s) + YYMAXFILL);
memset(in.str, 0, (e - s) + YYMAXFILL);
memcpy(in.str, s, (e - s));
in.lim = in.str + (e - s) + YYMAXFILL;
@@ -488,7 +494,7 @@ void timelib_strtointerval(char *s, size_t len,
#endif
} while(t != EOI);
- free(in.str);
+ timelib_free(in.str);
if (errors) {
*errors = in.errors;
} else {
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
index 5bfa176b6f..20d7eeac19 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include <stdio.h>
@@ -31,6 +35,8 @@
#else
#include <strings.h>
#endif
+
+#define TIMELIB_SUPPORTS_V2DATA
#include "timezonedb.h"
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
@@ -101,7 +107,7 @@ static void read_transistions(const unsigned char **tzf, timelib_tzinfo *tz)
unsigned char *cbuffer = NULL;
if (tz->bit32.timecnt) {
- buffer = (int32_t*) malloc(tz->bit32.timecnt * sizeof(int32_t));
+ buffer = (int32_t*) timelib_malloc(tz->bit32.timecnt * sizeof(int32_t));
if (!buffer) {
return;
}
@@ -111,9 +117,9 @@ static void read_transistions(const unsigned char **tzf, timelib_tzinfo *tz)
buffer[i] = timelib_conv_int(buffer[i]);
}
- cbuffer = (unsigned char*) malloc(tz->bit32.timecnt * sizeof(unsigned char));
+ cbuffer = (unsigned char*) timelib_malloc(tz->bit32.timecnt * sizeof(unsigned char));
if (!cbuffer) {
- free(buffer);
+ timelib_free(buffer);
return;
}
memcpy(cbuffer, *tzf, sizeof(unsigned char) * tz->bit32.timecnt);
@@ -145,16 +151,16 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
int32_t *leap_buffer;
unsigned int i, j;
- buffer = (unsigned char*) malloc(tz->bit32.typecnt * sizeof(unsigned char) * 6);
+ buffer = (unsigned char*) timelib_malloc(tz->bit32.typecnt * sizeof(unsigned char) * 6);
if (!buffer) {
return;
}
memcpy(buffer, *tzf, sizeof(unsigned char) * 6 * tz->bit32.typecnt);
*tzf += sizeof(unsigned char) * 6 * tz->bit32.typecnt;
- tz->type = (ttinfo*) malloc(tz->bit32.typecnt * sizeof(struct ttinfo));
+ tz->type = (ttinfo*) timelib_malloc(tz->bit32.typecnt * sizeof(struct ttinfo));
if (!tz->type) {
- free(buffer);
+ timelib_free(buffer);
return;
}
@@ -164,9 +170,9 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
tz->type[i].isdst = buffer[j + 4];
tz->type[i].abbr_idx = buffer[j + 5];
}
- free(buffer);
+ timelib_free(buffer);
- tz->timezone_abbr = (char*) malloc(tz->bit32.charcnt);
+ tz->timezone_abbr = (char*) timelib_malloc(tz->bit32.charcnt);
if (!tz->timezone_abbr) {
return;
}
@@ -174,27 +180,27 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
*tzf += sizeof(char) * tz->bit32.charcnt;
if (tz->bit32.leapcnt) {
- leap_buffer = (int32_t *) malloc(tz->bit32.leapcnt * 2 * sizeof(int32_t));
+ leap_buffer = (int32_t *) timelib_malloc(tz->bit32.leapcnt * 2 * sizeof(int32_t));
if (!leap_buffer) {
return;
}
memcpy(leap_buffer, *tzf, sizeof(int32_t) * tz->bit32.leapcnt * 2);
*tzf += sizeof(int32_t) * tz->bit32.leapcnt * 2;
- tz->leap_times = (tlinfo*) malloc(tz->bit32.leapcnt * sizeof(tlinfo));
+ tz->leap_times = (tlinfo*) timelib_malloc(tz->bit32.leapcnt * sizeof(tlinfo));
if (!tz->leap_times) {
- free(leap_buffer);
+ timelib_free(leap_buffer);
return;
}
for (i = 0; i < tz->bit32.leapcnt; i++) {
tz->leap_times[i].trans = timelib_conv_int(leap_buffer[i * 2]);
tz->leap_times[i].offset = timelib_conv_int(leap_buffer[i * 2 + 1]);
}
- free(leap_buffer);
+ timelib_free(leap_buffer);
}
if (tz->bit32.ttisstdcnt) {
- buffer = (unsigned char*) malloc(tz->bit32.ttisstdcnt * sizeof(unsigned char));
+ buffer = (unsigned char*) timelib_malloc(tz->bit32.ttisstdcnt * sizeof(unsigned char));
if (!buffer) {
return;
}
@@ -204,11 +210,11 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
for (i = 0; i < tz->bit32.ttisstdcnt; i++) {
tz->type[i].isstdcnt = buffer[i];
}
- free(buffer);
+ timelib_free(buffer);
}
if (tz->bit32.ttisgmtcnt) {
- buffer = (unsigned char*) malloc(tz->bit32.ttisgmtcnt * sizeof(unsigned char));
+ buffer = (unsigned char*) timelib_malloc(tz->bit32.ttisgmtcnt * sizeof(unsigned char));
if (!buffer) {
return;
}
@@ -218,7 +224,7 @@ static void read_types(const unsigned char **tzf, timelib_tzinfo *tz)
for (i = 0; i < tz->bit32.ttisgmtcnt; i++) {
tz->type[i].isgmtcnt = buffer[i];
}
- free(buffer);
+ timelib_free(buffer);
}
}
@@ -247,7 +253,7 @@ static void read_location(const unsigned char **tzf, timelib_tzinfo *tz)
comments_len = timelib_conv_int(buffer[2]);
*tzf += sizeof(buffer);
- tz->location.comments = malloc(comments_len + 1);
+ tz->location.comments = timelib_malloc(comments_len + 1);
memcpy(tz->location.comments, *tzf, comments_len);
tz->location.comments[comments_len] = '\0';
*tzf += comments_len;
@@ -261,12 +267,12 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
printf("Geo Location: %f,%f\n", tz->location.latitude, tz->location.longitude);
printf("Comments:\n%s\n", tz->location.comments);
printf("BC: %s\n", tz->bc ? "" : "yes");
- printf("UTC/Local count: %lu\n", (unsigned long) tz->bit32.ttisgmtcnt);
- printf("Std/Wall count: %lu\n", (unsigned long) tz->bit32.ttisstdcnt);
- printf("Leap.sec. count: %lu\n", (unsigned long) tz->bit32.leapcnt);
- printf("Trans. count: %lu\n", (unsigned long) tz->bit32.timecnt);
- printf("Local types count: %lu\n", (unsigned long) tz->bit32.typecnt);
- printf("Zone Abbr. count: %lu\n", (unsigned long) tz->bit32.charcnt);
+ printf("UTC/Local count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.ttisgmtcnt);
+ printf("Std/Wall count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.ttisstdcnt);
+ printf("Leap.sec. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.leapcnt);
+ printf("Trans. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.timecnt);
+ printf("Local types count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.typecnt);
+ printf("Zone Abbr. count: " TIMELIB_ULONG_FMT "\n", (timelib_ulong) tz->bit32.charcnt);
printf ("%8s (%12s) = %3d [%5ld %1d %3d '%s' (%d,%d)]\n",
"", "", 0,
@@ -304,7 +310,7 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
tmp = setlocale(LC_CTYPE, NULL);
if (tmp) {
- cur_locale = strdup(tmp);
+ cur_locale = timelib_strdup(tmp);
}
setlocale(LC_CTYPE, "C");
#endif
@@ -321,7 +327,7 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
(*tzf) = &(tzdb->data[tzdb->index[mid].pos]);
#ifdef HAVE_SETLOCALE
setlocale(LC_CTYPE, cur_locale);
- if (cur_locale) free(cur_locale);
+ if (cur_locale) timelib_free(cur_locale);
#endif
return 1;
}
@@ -330,7 +336,7 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
#ifdef HAVE_SETLOCALE
setlocale(LC_CTYPE, cur_locale);
- if (cur_locale) free(cur_locale);
+ if (cur_locale) timelib_free(cur_locale);
#endif
return 0;
}
@@ -422,13 +428,13 @@ static ttinfo* fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts, timelib
*transition_time = 0;
j = 0;
- while (j < tz->bit32.timecnt && tz->type[j].isdst) {
+ while (j < tz->bit32.timecnt && tz->type[tz->trans_idx[j]].isdst) {
++j;
}
if (j == tz->bit32.timecnt) {
j = 0;
}
- return &(tz->type[j]);
+ return &(tz->type[tz->trans_idx[j]]);
}
/* In all other cases we loop through the available transtion times to find
@@ -497,7 +503,7 @@ timelib_time_offset *timelib_get_time_zone_info(timelib_sll ts, timelib_tzinfo *
tmp->offset = offset;
tmp->leap_secs = leap_secs;
- tmp->abbr = abbr ? strdup(abbr) : strdup("GMT");
+ tmp->abbr = abbr ? timelib_strdup(abbr) : timelib_strdup("GMT");
return tmp;
}
diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c
index 33400a24e5..b9fb66f00f 100644
--- a/ext/date/lib/timelib.c
+++ b/ext/date/lib/timelib.c
@@ -1,30 +1,34 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include <ctype.h>
#include <math.h>
#define TIMELIB_TIME_FREE(m) \
if (m) { \
- free(m); \
+ timelib_free(m); \
m = NULL; \
} \
@@ -35,7 +39,7 @@
timelib_time* timelib_time_ctor(void)
{
timelib_time *t;
- t = calloc(1, sizeof(timelib_time));
+ t = timelib_calloc(1, sizeof(timelib_time));
return t;
}
@@ -43,7 +47,7 @@ timelib_time* timelib_time_ctor(void)
timelib_rel_time* timelib_rel_time_ctor(void)
{
timelib_rel_time *t;
- t = calloc(1, sizeof(timelib_rel_time));
+ t = timelib_calloc(1, sizeof(timelib_rel_time));
return t;
}
@@ -53,7 +57,7 @@ timelib_time* timelib_time_clone(timelib_time *orig)
timelib_time *tmp = timelib_time_ctor();
memcpy(tmp, orig, sizeof(timelib_time));
if (orig->tz_abbr) {
- tmp->tz_abbr = strdup(orig->tz_abbr);
+ tmp->tz_abbr = timelib_strdup(orig->tz_abbr);
}
if (orig->tz_info) {
tmp->tz_info = orig->tz_info;
@@ -61,6 +65,23 @@ timelib_time* timelib_time_clone(timelib_time *orig)
return tmp;
}
+int timelib_time_compare(timelib_time *t1, timelib_time *t2)
+{
+ if (t1->sse == t2->sse) {
+ if (t1->f == t2->f) {
+ return 0;
+ }
+
+ if (t1->sse < 0) {
+ return (t1->f < t2->f) ? 1 : -1;
+ } else {
+ return (t1->f < t2->f) ? -1 : 1;
+ }
+ }
+
+ return (t1->sse < t2->sse) ? -1 : 1;
+}
+
timelib_rel_time* timelib_rel_time_clone(timelib_rel_time *rel)
{
timelib_rel_time *tmp = timelib_rel_time_ctor();
@@ -74,7 +95,7 @@ void timelib_time_tz_abbr_update(timelib_time* tm, char* tz_abbr)
size_t tz_abbr_len = strlen(tz_abbr);
TIMELIB_TIME_FREE(tm->tz_abbr);
- tm->tz_abbr = strdup(tz_abbr);
+ tm->tz_abbr = timelib_strdup(tz_abbr);
for (i = 0; i < tz_abbr_len; i++) {
tm->tz_abbr[i] = toupper(tz_abbr[i]);
}
@@ -94,7 +115,7 @@ void timelib_rel_time_dtor(timelib_rel_time* t)
timelib_time_offset* timelib_time_offset_ctor(void)
{
timelib_time_offset *t;
- t = calloc(1, sizeof(timelib_time_offset));
+ t = timelib_calloc(1, sizeof(timelib_time_offset));
return t;
}
@@ -108,8 +129,8 @@ void timelib_time_offset_dtor(timelib_time_offset* t)
timelib_tzinfo* timelib_tzinfo_ctor(char *name)
{
timelib_tzinfo *t;
- t = calloc(1, sizeof(timelib_tzinfo));
- t->name = strdup(name);
+ t = timelib_calloc(1, sizeof(timelib_tzinfo));
+ t->name = timelib_strdup(name);
return t;
}
@@ -124,18 +145,18 @@ timelib_tzinfo *timelib_tzinfo_clone(timelib_tzinfo *tz)
tmp->bit32.typecnt = tz->bit32.typecnt;
tmp->bit32.charcnt = tz->bit32.charcnt;
- tmp->trans = (int32_t *) malloc(tz->bit32.timecnt * sizeof(int32_t));
- tmp->trans_idx = (unsigned char*) malloc(tz->bit32.timecnt * sizeof(unsigned char));
+ tmp->trans = (int32_t *) timelib_malloc(tz->bit32.timecnt * sizeof(int32_t));
+ tmp->trans_idx = (unsigned char*) timelib_malloc(tz->bit32.timecnt * sizeof(unsigned char));
memcpy(tmp->trans, tz->trans, tz->bit32.timecnt * sizeof(int32_t));
memcpy(tmp->trans_idx, tz->trans_idx, tz->bit32.timecnt * sizeof(unsigned char));
- tmp->type = (ttinfo*) malloc(tz->bit32.typecnt * sizeof(struct ttinfo));
+ tmp->type = (ttinfo*) timelib_malloc(tz->bit32.typecnt * sizeof(struct ttinfo));
memcpy(tmp->type, tz->type, tz->bit32.typecnt * sizeof(struct ttinfo));
- tmp->timezone_abbr = (char*) malloc(tz->bit32.charcnt);
+ tmp->timezone_abbr = (char*) timelib_malloc(tz->bit32.charcnt);
memcpy(tmp->timezone_abbr, tz->timezone_abbr, tz->bit32.charcnt);
- tmp->leap_times = (tlinfo*) malloc(tz->bit32.leapcnt * sizeof(tlinfo));
+ tmp->leap_times = (tlinfo*) timelib_malloc(tz->bit32.leapcnt * sizeof(tlinfo));
memcpy(tmp->leap_times, tz->leap_times, tz->bit32.leapcnt * sizeof(tlinfo));
return tmp;
@@ -167,14 +188,14 @@ void timelib_error_container_dtor(timelib_error_container *errors)
int i;
for (i = 0; i < errors->warning_count; i++) {
- free(errors->warning_messages[i].message);
+ timelib_free(errors->warning_messages[i].message);
}
- free(errors->warning_messages);
+ timelib_free(errors->warning_messages);
for (i = 0; i < errors->error_count; i++) {
- free(errors->error_messages[i].message);
+ timelib_free(errors->error_messages[i].message);
}
- free(errors->error_messages);
- free(errors);
+ timelib_free(errors->error_messages);
+ timelib_free(errors);
}
timelib_long timelib_date_to_int(timelib_time *d, int *error)
@@ -289,33 +310,33 @@ void timelib_dump_rel_time(timelib_rel_time *d)
timelib_long timelib_parse_tz_cor(char **ptr)
{
- char *begin = *ptr, *end;
- timelib_long tmp;
-
- while (isdigit(**ptr) || **ptr == ':') {
- ++*ptr;
- }
- end = *ptr;
- switch (end - begin) {
- case 1:
- case 2:
- return HOUR(strtol(begin, NULL, 10));
- break;
- case 3:
- case 4:
- if (begin[1] == ':') {
- tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10);
- return tmp;
- } else if (begin[2] == ':') {
- tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10);
- return tmp;
- } else {
- tmp = strtol(begin, NULL, 10);
- return HOUR(tmp / 100) + tmp % 100;
- }
- case 5:
- tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10);
- return tmp;
- }
- return 0;
+ char *begin = *ptr, *end;
+ timelib_long tmp;
+
+ while (isdigit(**ptr) || **ptr == ':') {
+ ++*ptr;
+ }
+ end = *ptr;
+ switch (end - begin) {
+ case 1: /* H */
+ case 2: /* HH */
+ return HOUR(strtol(begin, NULL, 10));
+ break;
+ case 3: /* H:M */
+ case 4: /* H:MM, HH:M, HHMM */
+ if (begin[1] == ':') {
+ tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10);
+ return tmp;
+ } else if (begin[2] == ':') {
+ tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10);
+ return tmp;
+ } else {
+ tmp = strtol(begin, NULL, 10);
+ return HOUR(tmp / 100) + tmp % 100;
+ }
+ case 5: /* HH:MM */
+ tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10);
+ return tmp;
+ }
+ return 0;
}
diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h
index a367ef36da..9a59d89770 100644
--- a/ext/date/lib/timelib.h
+++ b/ext/date/lib/timelib.h
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#ifndef __TIMELIB_H__
#define __TIMELIB_H__
@@ -26,7 +30,16 @@
#include <limits.h>
#endif
-#define TIMELIB_VERSION 201102
+#ifndef timelib_malloc
+# define timelib_malloc malloc
+# define timelib_realloc realloc
+# define timelib_calloc calloc
+# define timelib_strdup strdup
+# define timelib_free free
+#endif
+
+#define TIMELIB_VERSION 201602
+#define TIMELIB_ASCII_VERSION "2016.02"
#define TIMELIB_NONE 0x00
#define TIMELIB_OVERRIDE_TIME 0x01
@@ -125,6 +138,7 @@ timelib_time* timelib_time_ctor(void);
void timelib_time_set_option(timelib_time* tm, int option, void* option_value);
void timelib_time_dtor(timelib_time* t);
timelib_time* timelib_time_clone(timelib_time* orig);
+int timelib_time_compare(timelib_time *t1, timelib_time *t2);
timelib_time_offset* timelib_time_offset_ctor(void);
void timelib_time_offset_dtor(timelib_time_offset* t);
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index 33e9fce88c..d38175753a 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#ifndef __TIMELIB_STRUCTS_H__
#define __TIMELIB_STRUCTS_H__
diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h
index b8d61e052b..232053c4e7 100644
--- a/ext/date/lib/timezonedb.h
+++ b/ext/date/lib/timezonedb.h
@@ -1,590 +1,603 @@
-const timelib_tzdb_index_entry timezonedb_idx_builtin[583] = {
- { "Africa/Abidjan" , 0x000000 },
- { "Africa/Accra" , 0x0000B6 },
- { "Africa/Addis_Ababa" , 0x00040A },
- { "Africa/Algiers" , 0x000531 },
- { "Africa/Asmara" , 0x000835 },
- { "Africa/Asmera" , 0x00095C },
- { "Africa/Bamako" , 0x000A83 },
- { "Africa/Bangui" , 0x000B39 },
- { "Africa/Banjul" , 0x000BF0 },
- { "Africa/Bissau" , 0x000CA6 },
- { "Africa/Blantyre" , 0x000D82 },
- { "Africa/Brazzaville" , 0x000E39 },
- { "Africa/Bujumbura" , 0x000EF0 },
- { "Africa/Cairo" , 0x000FA7 },
- { "Africa/Casablanca" , 0x001767 },
- { "Africa/Ceuta" , 0x001DD0 },
- { "Africa/Conakry" , 0x002606 },
- { "Africa/Dakar" , 0x0026BC },
- { "Africa/Dar_es_Salaam" , 0x002772 },
- { "Africa/Djibouti" , 0x002899 },
- { "Africa/Douala" , 0x0029C0 },
- { "Africa/El_Aaiun" , 0x002A77 },
- { "Africa/Freetown" , 0x003036 },
- { "Africa/Gaborone" , 0x0030EC },
- { "Africa/Harare" , 0x0031A3 },
- { "Africa/Johannesburg" , 0x00325A },
- { "Africa/Juba" , 0x003375 },
- { "Africa/Kampala" , 0x00362C },
- { "Africa/Khartoum" , 0x003753 },
- { "Africa/Kigali" , 0x003A0A },
- { "Africa/Kinshasa" , 0x003AC1 },
- { "Africa/Lagos" , 0x003B8F },
- { "Africa/Libreville" , 0x003C46 },
- { "Africa/Lome" , 0x003CFD },
- { "Africa/Luanda" , 0x003DB3 },
- { "Africa/Lubumbashi" , 0x003E6A },
- { "Africa/Lusaka" , 0x003F38 },
- { "Africa/Malabo" , 0x003FEF },
- { "Africa/Maputo" , 0x0040A6 },
- { "Africa/Maseru" , 0x00415D },
- { "Africa/Mbabane" , 0x004278 },
- { "Africa/Mogadishu" , 0x004393 },
- { "Africa/Monrovia" , 0x0044BA },
- { "Africa/Nairobi" , 0x0045B7 },
- { "Africa/Ndjamena" , 0x0046DE },
- { "Africa/Niamey" , 0x0047CB },
- { "Africa/Nouakchott" , 0x004882 },
- { "Africa/Ouagadougou" , 0x004938 },
- { "Africa/Porto-Novo" , 0x0049EE },
- { "Africa/Sao_Tome" , 0x004AA5 },
- { "Africa/Timbuktu" , 0x004B5B },
- { "Africa/Tripoli" , 0x004C11 },
- { "Africa/Tunis" , 0x004EAC },
- { "Africa/Windhoek" , 0x00517E },
- { "America/Adak" , 0x0057B8 },
- { "America/Anchorage" , 0x006111 },
- { "America/Anguilla" , 0x006A78 },
- { "America/Antigua" , 0x006B2E },
- { "America/Araguaina" , 0x006BE4 },
- { "America/Argentina/Buenos_Aires" , 0x006F79 },
- { "America/Argentina/Catamarca" , 0x0073D9 },
- { "America/Argentina/ComodRivadavia" , 0x007869 },
- { "America/Argentina/Cordoba" , 0x007CDE },
- { "America/Argentina/Jujuy" , 0x008182 },
- { "America/Argentina/La_Rioja" , 0x008611 },
- { "America/Argentina/Mendoza" , 0x008AA1 },
- { "America/Argentina/Rio_Gallegos" , 0x008F4E },
- { "America/Argentina/Salta" , 0x0093D2 },
- { "America/Argentina/San_Juan" , 0x00983B },
- { "America/Argentina/San_Luis" , 0x009CCB },
- { "America/Argentina/Tucuman" , 0x00A177 },
- { "America/Argentina/Ushuaia" , 0x00A614 },
- { "America/Aruba" , 0x00AA9E },
- { "America/Asuncion" , 0x00AB7A },
- { "America/Atikokan" , 0x00B394 },
- { "America/Atka" , 0x00B53D },
- { "America/Bahia" , 0x00BE86 },
- { "America/Bahia_Banderas" , 0x00C2A3 },
- { "America/Barbados" , 0x00C90B },
- { "America/Belem" , 0x00CA6F },
- { "America/Belize" , 0x00CCD4 },
- { "America/Blanc-Sablon" , 0x00D0B0 },
- { "America/Boa_Vista" , 0x00D222 },
- { "America/Bogota" , 0x00D4B9 },
- { "America/Boise" , 0x00D5C6 },
- { "America/Buenos_Aires" , 0x00DF5E },
- { "America/Cambridge_Bay" , 0x00E3A9 },
- { "America/Campo_Grande" , 0x00EC03 },
- { "America/Cancun" , 0x00F400 },
- { "America/Caracas" , 0x00F760 },
- { "America/Catamarca" , 0x00F876 },
- { "America/Cayenne" , 0x00FCEB },
- { "America/Cayman" , 0x00FDBF },
- { "America/Chicago" , 0x010128 },
- { "America/Chihuahua" , 0x010F41 },
- { "America/Coral_Harbour" , 0x011574 },
- { "America/Cordoba" , 0x0116D9 },
- { "America/Costa_Rica" , 0x011B4E },
- { "America/Creston" , 0x011CAF },
- { "America/Cuiaba" , 0x011DD6 },
- { "America/Curacao" , 0x0125B0 },
- { "America/Danmarkshavn" , 0x01268C },
- { "America/Dawson" , 0x012983 },
- { "America/Dawson_Creek" , 0x0131D6 },
- { "America/Denver" , 0x01364E },
- { "America/Detroit" , 0x013FFC },
- { "America/Dominica" , 0x0148D8 },
- { "America/Edmonton" , 0x01498E },
- { "America/Eirunepe" , 0x01533E },
- { "America/El_Salvador" , 0x015600 },
- { "America/Ensenada" , 0x015706 },
- { "America/Fort_Wayne" , 0x016348 },
- { "America/Fortaleza" , 0x016046 },
- { "America/Glace_Bay" , 0x0169DF },
- { "America/Godthab" , 0x0172D0 },
- { "America/Goose_Bay" , 0x017A3F },
- { "America/Grand_Turk" , 0x018707 },
- { "America/Grenada" , 0x018C1A },
- { "America/Guadeloupe" , 0x018CD0 },
- { "America/Guatemala" , 0x018D86 },
- { "America/Guayaquil" , 0x018EC4 },
- { "America/Guyana" , 0x018FA3 },
- { "America/Halifax" , 0x0190BD },
- { "America/Havana" , 0x019E65 },
- { "America/Hermosillo" , 0x01A7F6 },
- { "America/Indiana/Indianapolis" , 0x01A9E7 },
- { "America/Indiana/Knox" , 0x01B0A5 },
- { "America/Indiana/Marengo" , 0x01BA5C },
- { "America/Indiana/Petersburg" , 0x01C153 },
- { "America/Indiana/Tell_City" , 0x01CF93 },
- { "America/Indiana/Vevay" , 0x01D68B },
- { "America/Indiana/Vincennes" , 0x01DC51 },
- { "America/Indiana/Winamac" , 0x01E344 },
- { "America/Indianapolis" , 0x01C8FC },
- { "America/Inuvik" , 0x01EA72 },
- { "America/Iqaluit" , 0x01F230 },
- { "America/Jamaica" , 0x01FA66 },
- { "America/Jujuy" , 0x01FC6D },
- { "America/Juneau" , 0x0200F2 },
- { "America/Kentucky/Louisville" , 0x020A56 },
- { "America/Kentucky/Monticello" , 0x021568 },
- { "America/Knox_IN" , 0x021ED3 },
- { "America/Kralendijk" , 0x022864 },
- { "America/La_Paz" , 0x022940 },
- { "America/Lima" , 0x022A3F },
- { "America/Los_Angeles" , 0x022BEC },
- { "America/Louisville" , 0x023721 },
- { "America/Lower_Princes" , 0x02420A },
- { "America/Maceio" , 0x0242E6 },
- { "America/Managua" , 0x0245F6 },
- { "America/Manaus" , 0x0247D1 },
- { "America/Marigot" , 0x024A4F },
- { "America/Martinique" , 0x024B05 },
- { "America/Matamoros" , 0x024C12 },
- { "America/Mazatlan" , 0x0251F0 },
- { "America/Mendoza" , 0x025840 },
- { "America/Menominee" , 0x025CE1 },
- { "America/Merida" , 0x02661F },
- { "America/Metlakatla" , 0x026BFB },
- { "America/Mexico_City" , 0x026F01 },
- { "America/Miquelon" , 0x02757C },
- { "America/Moncton" , 0x027C1C },
- { "America/Monterrey" , 0x0288A0 },
- { "America/Montevideo" , 0x028E88 },
- { "America/Montreal" , 0x029704 },
- { "America/Montserrat" , 0x02A4BF },
- { "America/Nassau" , 0x02A575 },
- { "America/New_York" , 0x02AE6D },
- { "America/Nipigon" , 0x02BC5E },
- { "America/Nome" , 0x02C508 },
- { "America/Noronha" , 0x02CE75 },
- { "America/North_Dakota/Beulah" , 0x02D169 },
- { "America/North_Dakota/Center" , 0x02DAF5 },
- { "America/North_Dakota/New_Salem" , 0x02E481 },
- { "America/Ojinaga" , 0x02EE22 },
- { "America/Panama" , 0x02F44B },
- { "America/Pangnirtung" , 0x02F522 },
- { "America/Paramaribo" , 0x02FD8D },
- { "America/Phoenix" , 0x02FECD },
- { "America/Port-au-Prince" , 0x03006A },
- { "America/Port_of_Spain" , 0x0308DD },
- { "America/Porto_Acre" , 0x030641 },
- { "America/Porto_Velho" , 0x030993 },
- { "America/Puerto_Rico" , 0x030BF3 },
- { "America/Rainy_River" , 0x030CFE },
- { "America/Rankin_Inlet" , 0x03158F },
- { "America/Recife" , 0x031D43 },
- { "America/Regina" , 0x032031 },
- { "America/Resolute" , 0x032454 },
- { "America/Rio_Branco" , 0x032C0A },
- { "America/Rosario" , 0x032EAA },
- { "America/Santa_Isabel" , 0x03331F },
- { "America/Santarem" , 0x033C99 },
- { "America/Santiago" , 0x033F1D },
- { "America/Santo_Domingo" , 0x0346A8 },
- { "America/Sao_Paulo" , 0x03489D },
- { "America/Scoresbysund" , 0x0350BA },
- { "America/Shiprock" , 0x03586A },
- { "America/Sitka" , 0x03620B },
- { "America/St_Barthelemy" , 0x036B6D },
- { "America/St_Johns" , 0x036C23 },
- { "America/St_Kitts" , 0x037AA7 },
- { "America/St_Lucia" , 0x037B5D },
- { "America/St_Thomas" , 0x037C13 },
- { "America/St_Vincent" , 0x037CC9 },
- { "America/Swift_Current" , 0x037D7F },
- { "America/Tegucigalpa" , 0x037FF7 },
- { "America/Thule" , 0x038119 },
- { "America/Thunder_Bay" , 0x03872D },
- { "America/Tijuana" , 0x038FFF },
- { "America/Toronto" , 0x03996F },
- { "America/Tortola" , 0x03A75A },
- { "America/Vancouver" , 0x03A810 },
- { "America/Virgin" , 0x03B395 },
- { "America/Whitehorse" , 0x03B44B },
- { "America/Winnipeg" , 0x03BC9E },
- { "America/Yakutat" , 0x03C81B },
- { "America/Yellowknife" , 0x03D154 },
- { "Antarctica/Casey" , 0x03D949 },
- { "Antarctica/Davis" , 0x03DA84 },
- { "Antarctica/DumontDUrville" , 0x03DBCF },
- { "Antarctica/Macquarie" , 0x03DCE3 },
- { "Antarctica/Mawson" , 0x03E2F9 },
- { "Antarctica/McMurdo" , 0x03E3EA },
- { "Antarctica/Palmer" , 0x03EDBF },
- { "Antarctica/Rothera" , 0x03F370 },
- { "Antarctica/South_Pole" , 0x03F449 },
- { "Antarctica/Syowa" , 0x03FDF1 },
- { "Antarctica/Troll" , 0x03FEC3 },
- { "Antarctica/Vostok" , 0x040376 },
- { "Arctic/Longyearbyen" , 0x04044B },
- { "Asia/Aden" , 0x040D22 },
- { "Asia/Almaty" , 0x040DD9 },
- { "Asia/Amman" , 0x04119B },
- { "Asia/Anadyr" , 0x0418FC },
- { "Asia/Aqtau" , 0x041DE8 },
- { "Asia/Aqtobe" , 0x04229B },
- { "Asia/Ashgabat" , 0x0426D2 },
- { "Asia/Ashkhabad" , 0x04297D },
- { "Asia/Baghdad" , 0x042C28 },
- { "Asia/Bahrain" , 0x043010 },
- { "Asia/Baku" , 0x0430ED },
- { "Asia/Bangkok" , 0x04389D },
- { "Asia/Beirut" , 0x043975 },
- { "Asia/Bishkek" , 0x044200 },
- { "Asia/Brunei" , 0x044631 },
- { "Asia/Calcutta" , 0x044706 },
- { "Asia/Chita" , 0x044835 },
- { "Asia/Choibalsan" , 0x044D49 },
- { "Asia/Chongqing" , 0x045398 },
- { "Asia/Chungking" , 0x045542 },
- { "Asia/Colombo" , 0x0456EC },
- { "Asia/Dacca" , 0x04587D },
- { "Asia/Damascus" , 0x045A0F },
- { "Asia/Dhaka" , 0x04632B },
- { "Asia/Dili" , 0x0464BD },
- { "Asia/Dubai" , 0x0465FE },
- { "Asia/Dushanbe" , 0x0466B5 },
- { "Asia/Gaza" , 0x046924 },
- { "Asia/Harbin" , 0x047244 },
- { "Asia/Hebron" , 0x0473EE },
- { "Asia/Ho_Chi_Minh" , 0x047D29 },
- { "Asia/Hong_Kong" , 0x047EAA },
- { "Asia/Hovd" , 0x04835B },
- { "Asia/Irkutsk" , 0x04897B },
- { "Asia/Istanbul" , 0x048E89 },
- { "Asia/Jakarta" , 0x049950 },
- { "Asia/Jayapura" , 0x049ADC },
- { "Asia/Jerusalem" , 0x049C0A },
- { "Asia/Kabul" , 0x04A4EF },
- { "Asia/Kamchatka" , 0x04A5C2 },
- { "Asia/Karachi" , 0x04AA9D },
- { "Asia/Kashgar" , 0x04AC3C },
- { "Asia/Kathmandu" , 0x04ACF3 },
- { "Asia/Katmandu" , 0x04ADD3 },
- { "Asia/Khandyga" , 0x04AEB3 },
- { "Asia/Kolkata" , 0x04B40C },
- { "Asia/Krasnoyarsk" , 0x04B53B },
- { "Asia/Kuala_Lumpur" , 0x04BA2A },
- { "Asia/Kuching" , 0x04BBD7 },
- { "Asia/Kuwait" , 0x04BDF9 },
- { "Asia/Macao" , 0x04BEB0 },
- { "Asia/Macau" , 0x04C1D7 },
- { "Asia/Magadan" , 0x04C4FE },
- { "Asia/Makassar" , 0x04CA05 },
- { "Asia/Manila" , 0x04CB71 },
- { "Asia/Muscat" , 0x04CCE6 },
- { "Asia/Nicosia" , 0x04CD9D },
- { "Asia/Novokuznetsk" , 0x04D589 },
- { "Asia/Novosibirsk" , 0x04DAA6 },
- { "Asia/Omsk" , 0x04DF81 },
- { "Asia/Oral" , 0x04E46F },
- { "Asia/Phnom_Penh" , 0x04E8D6 },
- { "Asia/Pontianak" , 0x04E9AE },
- { "Asia/Pyongyang" , 0x04EB46 },
- { "Asia/Qatar" , 0x04EC69 },
- { "Asia/Qyzylorda" , 0x04ED46 },
- { "Asia/Rangoon" , 0x04F1AC },
- { "Asia/Riyadh" , 0x04F2D5 },
- { "Asia/Saigon" , 0x04F38C },
- { "Asia/Sakhalin" , 0x04F50D },
- { "Asia/Samarkand" , 0x04F9FF },
- { "Asia/Seoul" , 0x04FCCD },
- { "Asia/Shanghai" , 0x04FF14 },
- { "Asia/Singapore" , 0x0500CA },
- { "Asia/Srednekolymsk" , 0x050282 },
- { "Asia/Taipei" , 0x050782 },
- { "Asia/Tashkent" , 0x050AAE },
- { "Asia/Tbilisi" , 0x050D72 },
- { "Asia/Tehran" , 0x0511F4 },
- { "Asia/Tel_Aviv" , 0x05187D },
- { "Asia/Thimbu" , 0x052162 },
- { "Asia/Thimphu" , 0x05223F },
- { "Asia/Tokyo" , 0x05231C },
- { "Asia/Ujung_Pandang" , 0x05248B },
- { "Asia/Ulaanbaatar" , 0x0525AF },
- { "Asia/Ulan_Bator" , 0x052BB2 },
- { "Asia/Urumqi" , 0x0531A7 },
- { "Asia/Ust-Nera" , 0x05326B },
- { "Asia/Vientiane" , 0x05379B },
- { "Asia/Vladivostok" , 0x053873 },
- { "Asia/Yakutsk" , 0x053D60 },
- { "Asia/Yekaterinburg" , 0x05424C },
- { "Asia/Yerevan" , 0x05479F },
- { "Atlantic/Azores" , 0x054CA8 },
- { "Atlantic/Bermuda" , 0x055A5A },
- { "Atlantic/Canary" , 0x05623A },
- { "Atlantic/Cape_Verde" , 0x0569CD },
- { "Atlantic/Faeroe" , 0x056AD7 },
- { "Atlantic/Faroe" , 0x057208 },
- { "Atlantic/Jan_Mayen" , 0x057939 },
- { "Atlantic/Madeira" , 0x058210 },
- { "Atlantic/Reykjavik" , 0x058FC1 },
- { "Atlantic/South_Georgia" , 0x059473 },
- { "Atlantic/St_Helena" , 0x0599FD },
- { "Atlantic/Stanley" , 0x059513 },
- { "Australia/ACT" , 0x059AB3 },
- { "Australia/Adelaide" , 0x05A36E },
- { "Australia/Brisbane" , 0x05AC47 },
- { "Australia/Broken_Hill" , 0x05AE32 },
- { "Australia/Canberra" , 0x05B73C },
- { "Australia/Currie" , 0x05BFF7 },
- { "Australia/Darwin" , 0x05C8C8 },
- { "Australia/Eucla" , 0x05CA29 },
- { "Australia/Hobart" , 0x05CC3A },
- { "Australia/LHI" , 0x05D57E },
- { "Australia/Lindeman" , 0x05DCCD },
- { "Australia/Lord_Howe" , 0x05DEFF },
- { "Australia/Melbourne" , 0x05E65E },
- { "Australia/North" , 0x05EF21 },
- { "Australia/NSW" , 0x05F070 },
- { "Australia/Perth" , 0x05F92B },
- { "Australia/Queensland" , 0x05FB38 },
- { "Australia/South" , 0x05FD08 },
- { "Australia/Sydney" , 0x0605D2 },
- { "Australia/Tasmania" , 0x060EAD },
- { "Australia/Victoria" , 0x0617D8 },
- { "Australia/West" , 0x062093 },
- { "Australia/Yancowinna" , 0x06227E },
- { "Brazil/Acre" , 0x062B6C },
- { "Brazil/DeNoronha" , 0x062E08 },
- { "Brazil/East" , 0x0630EC },
- { "Brazil/West" , 0x0638D7 },
- { "Canada/Atlantic" , 0x063B4B },
- { "Canada/Central" , 0x0648C5 },
- { "Canada/East-Saskatchewan" , 0x0661D7 },
- { "Canada/Eastern" , 0x06541C },
- { "Canada/Mountain" , 0x0665C5 },
- { "Canada/Newfoundland" , 0x066F33 },
- { "Canada/Pacific" , 0x067D8F },
- { "Canada/Saskatchewan" , 0x0688F0 },
- { "Canada/Yukon" , 0x068CDE },
- { "CET" , 0x069517 },
- { "Chile/Continental" , 0x069D59 },
- { "Chile/EasterIsland" , 0x06A4D6 },
- { "CST6CDT" , 0x06AB30 },
- { "Cuba" , 0x06B432 },
- { "EET" , 0x06BDC3 },
- { "Egypt" , 0x06C523 },
- { "Eire" , 0x06CCE3 },
- { "EST" , 0x06DAD6 },
- { "EST5EDT" , 0x06DB61 },
- { "Etc/GMT" , 0x06E463 },
- { "Etc/GMT+0" , 0x06E604 },
- { "Etc/GMT+1" , 0x06E723 },
- { "Etc/GMT+10" , 0x06E84E },
- { "Etc/GMT+11" , 0x06E97D },
- { "Etc/GMT+12" , 0x06EAAC },
- { "Etc/GMT+2" , 0x06ED07 },
- { "Etc/GMT+3" , 0x06EE2E },
- { "Etc/GMT+4" , 0x06EF55 },
- { "Etc/GMT+5" , 0x06F07C },
- { "Etc/GMT+6" , 0x06F1A3 },
- { "Etc/GMT+7" , 0x06F2CA },
- { "Etc/GMT+8" , 0x06F3F1 },
- { "Etc/GMT+9" , 0x06F518 },
- { "Etc/GMT-0" , 0x06E579 },
- { "Etc/GMT-1" , 0x06E68F },
- { "Etc/GMT-10" , 0x06E7B6 },
- { "Etc/GMT-11" , 0x06E8E5 },
- { "Etc/GMT-12" , 0x06EA14 },
- { "Etc/GMT-13" , 0x06EB43 },
- { "Etc/GMT-14" , 0x06EBDB },
- { "Etc/GMT-2" , 0x06EC73 },
- { "Etc/GMT-3" , 0x06ED9A },
- { "Etc/GMT-4" , 0x06EEC1 },
- { "Etc/GMT-5" , 0x06EFE8 },
- { "Etc/GMT-6" , 0x06F10F },
- { "Etc/GMT-7" , 0x06F236 },
- { "Etc/GMT-8" , 0x06F35D },
- { "Etc/GMT-9" , 0x06F484 },
- { "Etc/GMT0" , 0x06E4EE },
- { "Etc/Greenwich" , 0x06F5AB },
- { "Etc/UCT" , 0x06F636 },
- { "Etc/Universal" , 0x06F6C1 },
- { "Etc/UTC" , 0x06F74C },
- { "Etc/Zulu" , 0x06F7D7 },
- { "Europe/Amsterdam" , 0x06F862 },
- { "Europe/Andorra" , 0x0703ED },
- { "Europe/Athens" , 0x070AD0 },
- { "Europe/Belfast" , 0x0713BB },
- { "Europe/Belgrade" , 0x07222E },
- { "Europe/Berlin" , 0x0729DF },
- { "Europe/Bratislava" , 0x073318 },
- { "Europe/Brussels" , 0x073C04 },
- { "Europe/Bucharest" , 0x0747AA },
- { "Europe/Budapest" , 0x075063 },
- { "Europe/Busingen" , 0x0759D4 },
- { "Europe/Chisinau" , 0x076166 },
- { "Europe/Copenhagen" , 0x076AF3 },
- { "Europe/Dublin" , 0x07736F },
- { "Europe/Gibraltar" , 0x078162 },
- { "Europe/Guernsey" , 0x078D63 },
- { "Europe/Helsinki" , 0x079BD6 },
- { "Europe/Isle_of_Man" , 0x07A357 },
- { "Europe/Istanbul" , 0x07B1CA },
- { "Europe/Jersey" , 0x07BC91 },
- { "Europe/Kaliningrad" , 0x07CB04 },
- { "Europe/Kiev" , 0x07D135 },
- { "Europe/Lisbon" , 0x07D980 },
- { "Europe/Ljubljana" , 0x07E711 },
- { "Europe/London" , 0x07EEC2 },
- { "Europe/Luxembourg" , 0x07FD35 },
- { "Europe/Madrid" , 0x0808DF },
- { "Europe/Malta" , 0x08132E },
- { "Europe/Mariehamn" , 0x081D7F },
- { "Europe/Minsk" , 0x082500 },
- { "Europe/Monaco" , 0x082A64 },
- { "Europe/Moscow" , 0x0835F9 },
- { "Europe/Nicosia" , 0x083C14 },
- { "Europe/Oslo" , 0x084400 },
- { "Europe/Paris" , 0x084CD7 },
- { "Europe/Podgorica" , 0x08587E },
- { "Europe/Prague" , 0x08602F },
- { "Europe/Riga" , 0x08691B },
- { "Europe/Rome" , 0x0871E2 },
- { "Europe/Samara" , 0x087C64 },
- { "Europe/San_Marino" , 0x08821B },
- { "Europe/Sarajevo" , 0x088C9D },
- { "Europe/Simferopol" , 0x08944E },
- { "Europe/Skopje" , 0x089A4C },
- { "Europe/Sofia" , 0x08A1FD },
- { "Europe/Stockholm" , 0x08AA5B },
- { "Europe/Tallinn" , 0x08B1E5 },
- { "Europe/Tirane" , 0x08BA8A },
- { "Europe/Tiraspol" , 0x08C2C8 },
- { "Europe/Uzhgorod" , 0x08CC55 },
- { "Europe/Vaduz" , 0x08D4A0 },
- { "Europe/Vatican" , 0x08DC2A },
- { "Europe/Vienna" , 0x08E6AC },
- { "Europe/Vilnius" , 0x08EF75 },
- { "Europe/Volgograd" , 0x08F818 },
- { "Europe/Warsaw" , 0x08FD68 },
- { "Europe/Zagreb" , 0x090805 },
- { "Europe/Zaporozhye" , 0x090FB6 },
- { "Europe/Zurich" , 0x09182F },
- { "Factory" , 0x091FB9 },
- { "GB" , 0x0920CD },
- { "GB-Eire" , 0x092F40 },
- { "GMT" , 0x093DB3 },
- { "GMT+0" , 0x093F54 },
- { "GMT-0" , 0x093EC9 },
- { "GMT0" , 0x093E3E },
- { "Greenwich" , 0x093FDF },
- { "Hongkong" , 0x09406A },
- { "HST" , 0x09451B },
- { "Iceland" , 0x0945A7 },
- { "Indian/Antananarivo" , 0x094A59 },
- { "Indian/Chagos" , 0x094B80 },
- { "Indian/Christmas" , 0x094C55 },
- { "Indian/Cocos" , 0x094CF6 },
- { "Indian/Comoro" , 0x094D9A },
- { "Indian/Kerguelen" , 0x094EC1 },
- { "Indian/Mahe" , 0x094F78 },
- { "Indian/Maldives" , 0x09502F },
- { "Indian/Mauritius" , 0x095107 },
- { "Indian/Mayotte" , 0x095210 },
- { "Indian/Reunion" , 0x095337 },
- { "Iran" , 0x0953EE },
- { "Israel" , 0x095A77 },
- { "Jamaica" , 0x09635C },
- { "Japan" , 0x096563 },
- { "Kwajalein" , 0x0966D2 },
- { "Libya" , 0x0967CB },
- { "MET" , 0x096A66 },
- { "Mexico/BajaNorte" , 0x0972A8 },
- { "Mexico/BajaSur" , 0x097BE8 },
- { "Mexico/General" , 0x098210 },
- { "MST" , 0x09886E },
- { "MST7MDT" , 0x0988F9 },
- { "Navajo" , 0x0991FB },
- { "NZ" , 0x099B9C },
- { "NZ-CHAT" , 0x09A544 },
- { "Pacific/Apia" , 0x09AD59 },
- { "Pacific/Auckland" , 0x09B1B3 },
- { "Pacific/Bougainville" , 0x09BB69 },
- { "Pacific/Chatham" , 0x09BC99 },
- { "Pacific/Chuuk" , 0x09C4BD },
- { "Pacific/Easter" , 0x09C576 },
- { "Pacific/Efate" , 0x09CBDD },
- { "Pacific/Enderbury" , 0x09CDC7 },
- { "Pacific/Fakaofo" , 0x09CEC8 },
- { "Pacific/Fiji" , 0x09CF99 },
- { "Pacific/Funafuti" , 0x09D3D7 },
- { "Pacific/Galapagos" , 0x09D479 },
- { "Pacific/Gambier" , 0x09D569 },
- { "Pacific/Guadalcanal" , 0x09D631 },
- { "Pacific/Guam" , 0x09D6E9 },
- { "Pacific/Honolulu" , 0x09D7D6 },
- { "Pacific/Johnston" , 0x09D8FC },
- { "Pacific/Kiritimati" , 0x09DA2A },
- { "Pacific/Kosrae" , 0x09DB28 },
- { "Pacific/Kwajalein" , 0x09DC20 },
- { "Pacific/Majuro" , 0x09DD22 },
- { "Pacific/Marquesas" , 0x09DE01 },
- { "Pacific/Midway" , 0x09DECE },
- { "Pacific/Nauru" , 0x09DFF8 },
- { "Pacific/Niue" , 0x09E102 },
- { "Pacific/Norfolk" , 0x09E1F0 },
- { "Pacific/Noumea" , 0x09E2CC },
- { "Pacific/Pago_Pago" , 0x09E412 },
- { "Pacific/Palau" , 0x09E52E },
- { "Pacific/Pitcairn" , 0x09E5CF },
- { "Pacific/Pohnpei" , 0x09E6A6 },
- { "Pacific/Ponape" , 0x09E75B },
- { "Pacific/Port_Moresby" , 0x09E800 },
- { "Pacific/Rarotonga" , 0x09E8C6 },
- { "Pacific/Saipan" , 0x09EB10 },
- { "Pacific/Samoa" , 0x09EBFD },
- { "Pacific/Tahiti" , 0x09ED19 },
- { "Pacific/Tarawa" , 0x09EDE2 },
- { "Pacific/Tongatapu" , 0x09EE96 },
- { "Pacific/Truk" , 0x09EFF5 },
- { "Pacific/Wake" , 0x09F09A },
- { "Pacific/Wallis" , 0x09F14A },
- { "Pacific/Yap" , 0x09F1EC },
- { "Poland" , 0x09F291 },
- { "Portugal" , 0x09FD2E },
- { "PRC" , 0x0A0AB7 },
- { "PST8PDT" , 0x0A0C61 },
- { "ROC" , 0x0A1563 },
- { "ROK" , 0x0A188F },
- { "Singapore" , 0x0A1AD6 },
- { "Turkey" , 0x0A1C8E },
- { "UCT" , 0x0A2755 },
- { "Universal" , 0x0A27E0 },
- { "US/Alaska" , 0x0A286B },
- { "US/Aleutian" , 0x0A31C7 },
- { "US/Arizona" , 0x0A3B10 },
- { "US/Central" , 0x0A3C7D },
- { "US/East-Indiana" , 0x0A586F },
- { "US/Eastern" , 0x0A4A8A },
- { "US/Hawaii" , 0x0A5F06 },
- { "US/Indiana-Starke" , 0x0A6026 },
- { "US/Michigan" , 0x0A69B7 },
- { "US/Mountain" , 0x0A726B },
- { "US/Pacific" , 0x0A7C0C },
- { "US/Pacific-New" , 0x0A8735 },
- { "US/Samoa" , 0x0A925E },
- { "UTC" , 0x0A937A },
- { "W-SU" , 0x0A9B62 },
- { "WET" , 0x0A9405 },
- { "Zulu" , 0x0AA166 },
-};
/* This is a generated file, do not modify */
-const unsigned char timelib_timezone_db_data_builtin[696817] = {
+const timelib_tzdb_index_entry timezonedb_idx_builtin[587] = {
+#ifdef TIMELIB_SUPPORTS_V2DATA
+# define FOR_V2(v2,v1) v2
+#else
+# define FOR_V2(v2,v1) v1
+#endif
+ { "Africa/Abidjan" , FOR_V2(0x000000, 0x000000) },
+ { "Africa/Accra" , FOR_V2(0x0000B6, 0x00005A) },
+ { "Africa/Addis_Ababa" , FOR_V2(0x00040A, 0x0001A7) },
+ { "Africa/Algiers" , FOR_V2(0x000531, 0x000233) },
+ { "Africa/Asmara" , FOR_V2(0x000835, 0x00036F) },
+ { "Africa/Asmera" , FOR_V2(0x00095C, 0x0003FB) },
+ { "Africa/Bamako" , FOR_V2(0x000A83, 0x000487) },
+ { "Africa/Bangui" , FOR_V2(0x000B39, 0x0004E1) },
+ { "Africa/Banjul" , FOR_V2(0x000BF0, 0x00053B) },
+ { "Africa/Bissau" , FOR_V2(0x000CA6, 0x000595) },
+ { "Africa/Blantyre" , FOR_V2(0x000D82, 0x000600) },
+ { "Africa/Brazzaville" , FOR_V2(0x000E39, 0x00065A) },
+ { "Africa/Bujumbura" , FOR_V2(0x000EF0, 0x0006B4) },
+ { "Africa/Cairo" , FOR_V2(0x000FA7, 0x00070E) },
+ { "Africa/Casablanca" , FOR_V2(0x001767, 0x0009EE) },
+ { "Africa/Ceuta" , FOR_V2(0x001DD0, 0x000C53) },
+ { "Africa/Conakry" , FOR_V2(0x002605, 0x000F6A) },
+ { "Africa/Dakar" , FOR_V2(0x0026BB, 0x000FC4) },
+ { "Africa/Dar_es_Salaam" , FOR_V2(0x002771, 0x00101E) },
+ { "Africa/Djibouti" , FOR_V2(0x002898, 0x0010AA) },
+ { "Africa/Douala" , FOR_V2(0x0029BF, 0x001136) },
+ { "Africa/El_Aaiun" , FOR_V2(0x002A76, 0x001190) },
+ { "Africa/Freetown" , FOR_V2(0x003035, 0x0013B6) },
+ { "Africa/Gaborone" , FOR_V2(0x0030EB, 0x001410) },
+ { "Africa/Harare" , FOR_V2(0x0031A2, 0x00146A) },
+ { "Africa/Johannesburg" , FOR_V2(0x003259, 0x0014C4) },
+ { "Africa/Juba" , FOR_V2(0x003374, 0x001543) },
+ { "Africa/Kampala" , FOR_V2(0x00362B, 0x00165B) },
+ { "Africa/Khartoum" , FOR_V2(0x003752, 0x0016E7) },
+ { "Africa/Kigali" , FOR_V2(0x003A09, 0x0017FF) },
+ { "Africa/Kinshasa" , FOR_V2(0x003AC0, 0x001859) },
+ { "Africa/Lagos" , FOR_V2(0x003B90, 0x0018CC) },
+ { "Africa/Libreville" , FOR_V2(0x003C47, 0x001926) },
+ { "Africa/Lome" , FOR_V2(0x003CFE, 0x001980) },
+ { "Africa/Luanda" , FOR_V2(0x003DB4, 0x0019DA) },
+ { "Africa/Lubumbashi" , FOR_V2(0x003E6B, 0x001A34) },
+ { "Africa/Lusaka" , FOR_V2(0x003F3B, 0x001AA7) },
+ { "Africa/Malabo" , FOR_V2(0x003FF2, 0x001B01) },
+ { "Africa/Maputo" , FOR_V2(0x0040A9, 0x001B5B) },
+ { "Africa/Maseru" , FOR_V2(0x004160, 0x001BB5) },
+ { "Africa/Mbabane" , FOR_V2(0x00427B, 0x001C34) },
+ { "Africa/Mogadishu" , FOR_V2(0x004396, 0x001CB3) },
+ { "Africa/Monrovia" , FOR_V2(0x0044BD, 0x001D3F) },
+ { "Africa/Nairobi" , FOR_V2(0x0045BA, 0x001DB6) },
+ { "Africa/Ndjamena" , FOR_V2(0x0046E1, 0x001E42) },
+ { "Africa/Niamey" , FOR_V2(0x0047CE, 0x001EB3) },
+ { "Africa/Nouakchott" , FOR_V2(0x004885, 0x001F0D) },
+ { "Africa/Ouagadougou" , FOR_V2(0x00493B, 0x001F67) },
+ { "Africa/Porto-Novo" , FOR_V2(0x0049F1, 0x001FC1) },
+ { "Africa/Sao_Tome" , FOR_V2(0x004AA8, 0x00201B) },
+ { "Africa/Timbuktu" , FOR_V2(0x004B5E, 0x002075) },
+ { "Africa/Tripoli" , FOR_V2(0x004C14, 0x0020CF) },
+ { "Africa/Tunis" , FOR_V2(0x004EAF, 0x0021DD) },
+ { "Africa/Windhoek" , FOR_V2(0x005181, 0x002300) },
+ { "America/Adak" , FOR_V2(0x0057BB, 0x002558) },
+ { "America/Anchorage" , FOR_V2(0x006114, 0x0028D9) },
+ { "America/Anguilla" , FOR_V2(0x006A83, 0x002C66) },
+ { "America/Antigua" , FOR_V2(0x006B39, 0x002CC0) },
+ { "America/Araguaina" , FOR_V2(0x006BEF, 0x002D1A) },
+ { "America/Argentina/Buenos_Aires" , FOR_V2(0x006F84, 0x002E84) },
+ { "America/Argentina/Catamarca" , FOR_V2(0x0073E4, 0x003043) },
+ { "America/Argentina/ComodRivadavia" , FOR_V2(0x007874, 0x00321D) },
+ { "America/Argentina/Cordoba" , FOR_V2(0x007CE9, 0x0033DC) },
+ { "America/Argentina/Jujuy" , FOR_V2(0x008194, 0x0035D1) },
+ { "America/Argentina/La_Rioja" , FOR_V2(0x008623, 0x0037A6) },
+ { "America/Argentina/Mendoza" , FOR_V2(0x008AB3, 0x003977) },
+ { "America/Argentina/Rio_Gallegos" , FOR_V2(0x008F60, 0x003B58) },
+ { "America/Argentina/Salta" , FOR_V2(0x0093E4, 0x003D26) },
+ { "America/Argentina/San_Juan" , FOR_V2(0x009853, 0x003EF1) },
+ { "America/Argentina/San_Luis" , FOR_V2(0x009CE3, 0x0040C2) },
+ { "America/Argentina/Tucuman" , FOR_V2(0x00A18F, 0x0042A1) },
+ { "America/Argentina/Ushuaia" , FOR_V2(0x00A62C, 0x004476) },
+ { "America/Aruba" , FOR_V2(0x00AAB6, 0x00464A) },
+ { "America/Asuncion" , FOR_V2(0x00AB92, 0x0046B5) },
+ { "America/Atikokan" , FOR_V2(0x00B3AC, 0x0049B3) },
+ { "America/Atka" , FOR_V2(0x00B532, 0x004A77) },
+ { "America/Bahia" , FOR_V2(0x00BE7B, 0x004DE8) },
+ { "America/Bahia_Banderas" , FOR_V2(0x00C298, 0x004F80) },
+ { "America/Barbados" , FOR_V2(0x00C8F8, 0x0051FE) },
+ { "America/Belem" , FOR_V2(0x00CA5C, 0x00529D) },
+ { "America/Belize" , FOR_V2(0x00CCC6, 0x0053A2) },
+ { "America/Blanc-Sablon" , FOR_V2(0x00D0A2, 0x005523) },
+ { "America/Boa_Vista" , FOR_V2(0x00D1FD, 0x0055D1) },
+ { "America/Bogota" , FOR_V2(0x00D494, 0x0056DF) },
+ { "America/Boise" , FOR_V2(0x00D5A1, 0x00575C) },
+ { "America/Buenos_Aires" , FOR_V2(0x00DF30, 0x005AFB) },
+ { "America/Cambridge_Bay" , FOR_V2(0x00E37B, 0x005CA5) },
+ { "America/Campo_Grande" , FOR_V2(0x00EBCD, 0x005FDA) },
+ { "America/Cancun" , FOR_V2(0x00F3CA, 0x0062CE) },
+ { "America/Caracas" , FOR_V2(0x00F72A, 0x00643D) },
+ { "America/Catamarca" , FOR_V2(0x00F840, 0x0064BD) },
+ { "America/Cayenne" , FOR_V2(0x00FCB5, 0x00667C) },
+ { "America/Cayman" , FOR_V2(0x00FD89, 0x0066E3) },
+ { "America/Chicago" , FOR_V2(0x00FE60, 0x006749) },
+ { "America/Chihuahua" , FOR_V2(0x010C81, 0x006C81) },
+ { "America/Coral_Harbour" , FOR_V2(0x0112A5, 0x006EEA) },
+ { "America/Cordoba" , FOR_V2(0x01140A, 0x006F8D) },
+ { "America/Costa_Rica" , FOR_V2(0x01187F, 0x00714C) },
+ { "America/Creston" , FOR_V2(0x0119E0, 0x0071E7) },
+ { "America/Cuiaba" , FOR_V2(0x011AE7, 0x00726C) },
+ { "America/Curacao" , FOR_V2(0x0122C1, 0x00754F) },
+ { "America/Danmarkshavn" , FOR_V2(0x01239D, 0x0075BA) },
+ { "America/Dawson" , FOR_V2(0x01268D, 0x0076FC) },
+ { "America/Dawson_Creek" , FOR_V2(0x012EDD, 0x007A27) },
+ { "America/Denver" , FOR_V2(0x01332C, 0x007BE9) },
+ { "America/Detroit" , FOR_V2(0x013CE2, 0x007F88) },
+ { "America/Dominica" , FOR_V2(0x0145AF, 0x0082DD) },
+ { "America/Edmonton" , FOR_V2(0x014665, 0x008337) },
+ { "America/Eirunepe" , FOR_V2(0x014FF0, 0x0086CF) },
+ { "America/El_Salvador" , FOR_V2(0x0152B7, 0x0087F9) },
+ { "America/Ensenada" , FOR_V2(0x0153BD, 0x008873) },
+ { "America/Fort_Nelson" , FOR_V2(0x015CFD, 0x008BE1) },
+ { "America/Fort_Wayne" , FOR_V2(0x0165E6, 0x008F40) },
+ { "America/Fortaleza" , FOR_V2(0x016C7D, 0x0091BB) },
+ { "America/Glace_Bay" , FOR_V2(0x016F87, 0x009306) },
+ { "America/Godthab" , FOR_V2(0x01784C, 0x009656) },
+ { "America/Goose_Bay" , FOR_V2(0x017FC3, 0x009927) },
+ { "America/Grand_Turk" , FOR_V2(0x018C82, 0x009DF4) },
+ { "America/Grenada" , FOR_V2(0x019195, 0x009FE4) },
+ { "America/Guadeloupe" , FOR_V2(0x01924B, 0x00A03E) },
+ { "America/Guatemala" , FOR_V2(0x019301, 0x00A098) },
+ { "America/Guayaquil" , FOR_V2(0x01943F, 0x00A126) },
+ { "America/Guyana" , FOR_V2(0x019528, 0x00A19E) },
+ { "America/Halifax" , FOR_V2(0x019642, 0x00A224) },
+ { "America/Havana" , FOR_V2(0x01A3DA, 0x00A72F) },
+ { "America/Hermosillo" , FOR_V2(0x01AD6B, 0x00AAB3) },
+ { "America/Indiana/Indianapolis" , FOR_V2(0x01AF5C, 0x00AB9E) },
+ { "America/Indiana/Knox" , FOR_V2(0x01B60C, 0x00AE32) },
+ { "America/Indiana/Marengo" , FOR_V2(0x01BFB2, 0x00B1D1) },
+ { "America/Indiana/Petersburg" , FOR_V2(0x01C698, 0x00B477) },
+ { "America/Indiana/Tell_City" , FOR_V2(0x01CE30, 0x00B75A) },
+ { "America/Indiana/Vevay" , FOR_V2(0x01D517, 0x00BA03) },
+ { "America/Indiana/Vincennes" , FOR_V2(0x01DACC, 0x00BC3E) },
+ { "America/Indiana/Winamac" , FOR_V2(0x01E19B, 0x00BEDF) },
+ { "America/Indianapolis" , FOR_V2(0x01E8B8, 0x00C198) },
+ { "America/Inuvik" , FOR_V2(0x01EF4F, 0x00C413) },
+ { "America/Iqaluit" , FOR_V2(0x01F6F7, 0x00C6F9) },
+ { "America/Jamaica" , FOR_V2(0x01FF1F, 0x00CA22) },
+ { "America/Jujuy" , FOR_V2(0x020126, 0x00CAF8) },
+ { "America/Juneau" , FOR_V2(0x0205AB, 0x00CCC3) },
+ { "America/Kentucky/Louisville" , FOR_V2(0x020F05, 0x00D048) },
+ { "America/Kentucky/Monticello" , FOR_V2(0x021A0C, 0x00D46C) },
+ { "America/Knox_IN" , FOR_V2(0x022365, 0x00D7F0) },
+ { "America/Kralendijk" , FOR_V2(0x022CF6, 0x00DB7A) },
+ { "America/La_Paz" , FOR_V2(0x022DD2, 0x00DBE5) },
+ { "America/Lima" , FOR_V2(0x022ED1, 0x00DC5D) },
+ { "America/Los_Angeles" , FOR_V2(0x02307E, 0x00DD12) },
+ { "America/Louisville" , FOR_V2(0x023BAE, 0x00E12F) },
+ { "America/Lower_Princes" , FOR_V2(0x024697, 0x00E535) },
+ { "America/Maceio" , FOR_V2(0x024773, 0x00E5A0) },
+ { "America/Managua" , FOR_V2(0x024A83, 0x00E6DF) },
+ { "America/Manaus" , FOR_V2(0x024C5E, 0x00E7AB) },
+ { "America/Marigot" , FOR_V2(0x024EE1, 0x00E8B7) },
+ { "America/Martinique" , FOR_V2(0x024F97, 0x00E911) },
+ { "America/Matamoros" , FOR_V2(0x0250A4, 0x00E98E) },
+ { "America/Mazatlan" , FOR_V2(0x025676, 0x00EBE0) },
+ { "America/Mendoza" , FOR_V2(0x025CD3, 0x00EE67) },
+ { "America/Menominee" , FOR_V2(0x026174, 0x00F03C) },
+ { "America/Merida" , FOR_V2(0x026A8A, 0x00F3AE) },
+ { "America/Metlakatla" , FOR_V2(0x027066, 0x00F5F6) },
+ { "America/Mexico_City" , FOR_V2(0x027613, 0x00F826) },
+ { "America/Miquelon" , FOR_V2(0x027C7D, 0x00FA95) },
+ { "America/Moncton" , FOR_V2(0x02831D, 0x00FD0C) },
+ { "America/Monterrey" , FOR_V2(0x028F9C, 0x0101AF) },
+ { "America/Montevideo" , FOR_V2(0x029575, 0x010408) },
+ { "America/Montreal" , FOR_V2(0x029B68, 0x010652) },
+ { "America/Montserrat" , FOR_V2(0x02A923, 0x010B53) },
+ { "America/Nassau" , FOR_V2(0x02A9D9, 0x010BAD) },
+ { "America/New_York" , FOR_V2(0x02B2D1, 0x010EF7) },
+ { "America/Nipigon" , FOR_V2(0x02C0CA, 0x01141B) },
+ { "America/Nome" , FOR_V2(0x02C94A, 0x011753) },
+ { "America/Noronha" , FOR_V2(0x02D2AB, 0x011AD6) },
+ { "America/North_Dakota/Beulah" , FOR_V2(0x02D59F, 0x011C0B) },
+ { "America/North_Dakota/Center" , FOR_V2(0x02DF15, 0x011F9A) },
+ { "America/North_Dakota/New_Salem" , FOR_V2(0x02E88B, 0x012329) },
+ { "America/Ojinaga" , FOR_V2(0x02F207, 0x0126BE) },
+ { "America/Panama" , FOR_V2(0x02F82D, 0x012929) },
+ { "America/Pangnirtung" , FOR_V2(0x02F904, 0x01298F) },
+ { "America/Paramaribo" , FOR_V2(0x030166, 0x012CD1) },
+ { "America/Phoenix" , FOR_V2(0x0302A6, 0x012D68) },
+ { "America/Port-au-Prince" , FOR_V2(0x030430, 0x012E24) },
+ { "America/Port_of_Spain" , FOR_V2(0x03078D, 0x012F79) },
+ { "America/Porto_Acre" , FOR_V2(0x030843, 0x012FD3) },
+ { "America/Porto_Velho" , FOR_V2(0x030ADF, 0x0130E4) },
+ { "America/Puerto_Rico" , FOR_V2(0x030D3F, 0x0131DF) },
+ { "America/Rainy_River" , FOR_V2(0x030E4A, 0x01325B) },
+ { "America/Rankin_Inlet" , FOR_V2(0x0316CB, 0x013594) },
+ { "America/Recife" , FOR_V2(0x031E77, 0x01387F) },
+ { "America/Regina" , FOR_V2(0x032165, 0x0139AE) },
+ { "America/Resolute" , FOR_V2(0x032568, 0x013B51) },
+ { "America/Rio_Branco" , FOR_V2(0x032D15, 0x013E3D) },
+ { "America/Rosario" , FOR_V2(0x032FB5, 0x013F52) },
+ { "America/Santa_Isabel" , FOR_V2(0x03342A, 0x014111) },
+ { "America/Santarem" , FOR_V2(0x033D6A, 0x01447F) },
+ { "America/Santiago" , FOR_V2(0x033FF3, 0x01458E) },
+ { "America/Santo_Domingo" , FOR_V2(0x0349E4, 0x014944) },
+ { "America/Sao_Paulo" , FOR_V2(0x034BD9, 0x014A1B) },
+ { "America/Scoresbysund" , FOR_V2(0x0353FA, 0x014D33) },
+ { "America/Shiprock" , FOR_V2(0x035BA8, 0x015024) },
+ { "America/Sitka" , FOR_V2(0x036549, 0x0153AE) },
+ { "America/St_Barthelemy" , FOR_V2(0x036E96, 0x015726) },
+ { "America/St_Johns" , FOR_V2(0x036F4C, 0x015780) },
+ { "America/St_Kitts" , FOR_V2(0x037DCA, 0x015CE6) },
+ { "America/St_Lucia" , FOR_V2(0x037E80, 0x015D40) },
+ { "America/St_Thomas" , FOR_V2(0x037F36, 0x015D9A) },
+ { "America/St_Vincent" , FOR_V2(0x037FEC, 0x015DF4) },
+ { "America/Swift_Current" , FOR_V2(0x0380A2, 0x015E4E) },
+ { "America/Tegucigalpa" , FOR_V2(0x0382FE, 0x015F58) },
+ { "America/Thule" , FOR_V2(0x038420, 0x015FDC) },
+ { "America/Thunder_Bay" , FOR_V2(0x038A32, 0x016226) },
+ { "America/Tijuana" , FOR_V2(0x0392FB, 0x016577) },
+ { "America/Toronto" , FOR_V2(0x039C5C, 0x016906) },
+ { "America/Tortola" , FOR_V2(0x03AA34, 0x016E24) },
+ { "America/Vancouver" , FOR_V2(0x03AAEA, 0x016E7E) },
+ { "America/Virgin" , FOR_V2(0x03B664, 0x0172C1) },
+ { "America/Whitehorse" , FOR_V2(0x03B71A, 0x01731B) },
+ { "America/Winnipeg" , FOR_V2(0x03BF6A, 0x017646) },
+ { "America/Yakutat" , FOR_V2(0x03CADE, 0x017A8E) },
+ { "America/Yellowknife" , FOR_V2(0x03D404, 0x017DF7) },
+ { "Antarctica/Casey" , FOR_V2(0x03DBE3, 0x0180F6) },
+ { "Antarctica/Davis" , FOR_V2(0x03DD04, 0x01817F) },
+ { "Antarctica/DumontDUrville" , FOR_V2(0x03DE37, 0x01820D) },
+ { "Antarctica/Macquarie" , FOR_V2(0x03DF36, 0x01828E) },
+ { "Antarctica/Mawson" , FOR_V2(0x03E54C, 0x0184E8) },
+ { "Antarctica/McMurdo" , FOR_V2(0x03E62A, 0x018556) },
+ { "Antarctica/Palmer" , FOR_V2(0x03EFF8, 0x01890B) },
+ { "Antarctica/Rothera" , FOR_V2(0x03F7F4, 0x018C0B) },
+ { "Antarctica/South_Pole" , FOR_V2(0x03F8B4, 0x018C6D) },
+ { "Antarctica/Syowa" , FOR_V2(0x04025C, 0x018FFC) },
+ { "Antarctica/Troll" , FOR_V2(0x04031B, 0x01905C) },
+ { "Antarctica/Vostok" , FOR_V2(0x0407B5, 0x01921A) },
+ { "Arctic/Longyearbyen" , FOR_V2(0x040875, 0x01927B) },
+ { "Asia/Aden" , FOR_V2(0x04114C, 0x0195BE) },
+ { "Asia/Almaty" , FOR_V2(0x041203, 0x019618) },
+ { "Asia/Amman" , FOR_V2(0x0415CE, 0x0197A5) },
+ { "Asia/Anadyr" , FOR_V2(0x041D2F, 0x019A60) },
+ { "Asia/Aqtau" , FOR_V2(0x0421FB, 0x019C4F) },
+ { "Asia/Aqtobe" , FOR_V2(0x0426A9, 0x019E56) },
+ { "Asia/Ashgabat" , FOR_V2(0x042ADE, 0x01A011) },
+ { "Asia/Ashkhabad" , FOR_V2(0x042D89, 0x01A133) },
+ { "Asia/Baghdad" , FOR_V2(0x043034, 0x01A255) },
+ { "Asia/Bahrain" , FOR_V2(0x04341C, 0x01A3DB) },
+ { "Asia/Baku" , FOR_V2(0x0434F9, 0x01A446) },
+ { "Asia/Bangkok" , FOR_V2(0x043A2A, 0x01A657) },
+ { "Asia/Barnaul" , FOR_V2(0x043B02, 0x01A6BD) },
+ { "Asia/Beirut" , FOR_V2(0x043FF5, 0x01A8B7) },
+ { "Asia/Bishkek" , FOR_V2(0x044880, 0x01ABD5) },
+ { "Asia/Brunei" , FOR_V2(0x044CB1, 0x01AD86) },
+ { "Asia/Calcutta" , FOR_V2(0x044D86, 0x01ADED) },
+ { "Asia/Chita" , FOR_V2(0x044EB5, 0x01AE77) },
+ { "Asia/Choibalsan" , FOR_V2(0x0453C7, 0x01B086) },
+ { "Asia/Chongqing" , FOR_V2(0x045A16, 0x01B2F2) },
+ { "Asia/Chungking" , FOR_V2(0x045BC0, 0x01B3A3) },
+ { "Asia/Colombo" , FOR_V2(0x045D6A, 0x01B454) },
+ { "Asia/Dacca" , FOR_V2(0x045EFB, 0x01B509) },
+ { "Asia/Damascus" , FOR_V2(0x04608D, 0x01B5C0) },
+ { "Asia/Dhaka" , FOR_V2(0x0469A9, 0x01B915) },
+ { "Asia/Dili" , FOR_V2(0x046B3B, 0x01B9CC) },
+ { "Asia/Dubai" , FOR_V2(0x046C7C, 0x01BA63) },
+ { "Asia/Dushanbe" , FOR_V2(0x046D33, 0x01BABD) },
+ { "Asia/Gaza" , FOR_V2(0x046FA2, 0x01BBC5) },
+ { "Asia/Harbin" , FOR_V2(0x0478C1, 0x01BF29) },
+ { "Asia/Hebron" , FOR_V2(0x047A6B, 0x01BFDA) },
+ { "Asia/Ho_Chi_Minh" , FOR_V2(0x0483A5, 0x01C347) },
+ { "Asia/Hong_Kong" , FOR_V2(0x048526, 0x01C3F6) },
+ { "Asia/Hovd" , FOR_V2(0x0489D7, 0x01C5C5) },
+ { "Asia/Irkutsk" , FOR_V2(0x048FF7, 0x01C828) },
+ { "Asia/Istanbul" , FOR_V2(0x049508, 0x01CA37) },
+ { "Asia/Jakarta" , FOR_V2(0x049FCF, 0x01CE35) },
+ { "Asia/Jayapura" , FOR_V2(0x04A15A, 0x01CEEF) },
+ { "Asia/Jerusalem" , FOR_V2(0x04A28D, 0x01CF9E) },
+ { "Asia/Kabul" , FOR_V2(0x04AB72, 0x01D2E6) },
+ { "Asia/Kamchatka" , FOR_V2(0x04AC45, 0x01D348) },
+ { "Asia/Karachi" , FOR_V2(0x04B100, 0x01D52E) },
+ { "Asia/Kashgar" , FOR_V2(0x04B29F, 0x01D5E8) },
+ { "Asia/Kathmandu" , FOR_V2(0x04B356, 0x01D642) },
+ { "Asia/Katmandu" , FOR_V2(0x04B436, 0x01D6AD) },
+ { "Asia/Khandyga" , FOR_V2(0x04B516, 0x01D718) },
+ { "Asia/Kolkata" , FOR_V2(0x04BA6C, 0x01D94C) },
+ { "Asia/Krasnoyarsk" , FOR_V2(0x04BB9B, 0x01D9D6) },
+ { "Asia/Kuala_Lumpur" , FOR_V2(0x04C08A, 0x01DBD8) },
+ { "Asia/Kuching" , FOR_V2(0x04C238, 0x01DCA7) },
+ { "Asia/Kuwait" , FOR_V2(0x04C459, 0x01DD99) },
+ { "Asia/Macao" , FOR_V2(0x04C510, 0x01DDF3) },
+ { "Asia/Macau" , FOR_V2(0x04C837, 0x01DF33) },
+ { "Asia/Magadan" , FOR_V2(0x04CB5E, 0x01E073) },
+ { "Asia/Makassar" , FOR_V2(0x04D045, 0x01E26C) },
+ { "Asia/Manila" , FOR_V2(0x04D1B2, 0x01E33F) },
+ { "Asia/Muscat" , FOR_V2(0x04D327, 0x01E3DD) },
+ { "Asia/Nicosia" , FOR_V2(0x04D3DE, 0x01E437) },
+ { "Asia/Novokuznetsk" , FOR_V2(0x04DBCA, 0x01E724) },
+ { "Asia/Novosibirsk" , FOR_V2(0x04E0C7, 0x01E929) },
+ { "Asia/Omsk" , FOR_V2(0x04E5A6, 0x01EB22) },
+ { "Asia/Oral" , FOR_V2(0x04EA89, 0x01ED18) },
+ { "Asia/Phnom_Penh" , FOR_V2(0x04EEF0, 0x01EEED) },
+ { "Asia/Pontianak" , FOR_V2(0x04EFC8, 0x01EF53) },
+ { "Asia/Pyongyang" , FOR_V2(0x04F161, 0x01F01B) },
+ { "Asia/Qatar" , FOR_V2(0x04F2A5, 0x01F0B2) },
+ { "Asia/Qyzylorda" , FOR_V2(0x04F382, 0x01F11D) },
+ { "Asia/Rangoon" , FOR_V2(0x04F7E5, 0x01F2F5) },
+ { "Asia/Riyadh" , FOR_V2(0x04F90E, 0x01F37E) },
+ { "Asia/Saigon" , FOR_V2(0x04F9C5, 0x01F3D8) },
+ { "Asia/Sakhalin" , FOR_V2(0x04FB46, 0x01F487) },
+ { "Asia/Samarkand" , FOR_V2(0x050053, 0x01F693) },
+ { "Asia/Seoul" , FOR_V2(0x050323, 0x01F7D0) },
+ { "Asia/Shanghai" , FOR_V2(0x05056A, 0x01F8C8) },
+ { "Asia/Singapore" , FOR_V2(0x050720, 0x01F985) },
+ { "Asia/Srednekolymsk" , FOR_V2(0x0508D8, 0x01FA4D) },
+ { "Asia/Taipei" , FOR_V2(0x050DDB, 0x01FC5D) },
+ { "Asia/Tashkent" , FOR_V2(0x051107, 0x01FD9F) },
+ { "Asia/Tbilisi" , FOR_V2(0x0513CD, 0x01FED7) },
+ { "Asia/Tehran" , FOR_V2(0x05184F, 0x0200AA) },
+ { "Asia/Tel_Aviv" , FOR_V2(0x051EE9, 0x020325) },
+ { "Asia/Thimbu" , FOR_V2(0x0527CE, 0x02066D) },
+ { "Asia/Thimphu" , FOR_V2(0x0528AB, 0x0206D8) },
+ { "Asia/Tokyo" , FOR_V2(0x052988, 0x020743) },
+ { "Asia/Ujung_Pandang" , FOR_V2(0x052AF7, 0x0207DA) },
+ { "Asia/Ulaanbaatar" , FOR_V2(0x052C1B, 0x020864) },
+ { "Asia/Ulan_Bator" , FOR_V2(0x053225, 0x020AB1) },
+ { "Asia/Urumqi" , FOR_V2(0x05381A, 0x020CE9) },
+ { "Asia/Ust-Nera" , FOR_V2(0x0538DE, 0x020D50) },
+ { "Asia/Vientiane" , FOR_V2(0x053E0B, 0x020F6C) },
+ { "Asia/Vladivostok" , FOR_V2(0x053EE3, 0x020FD2) },
+ { "Asia/Yakutsk" , FOR_V2(0x0543CD, 0x0211CE) },
+ { "Asia/Yekaterinburg" , FOR_V2(0x0548B6, 0x0213CA) },
+ { "Asia/Yerevan" , FOR_V2(0x054E06, 0x0215F5) },
+ { "Atlantic/Azores" , FOR_V2(0x05530F, 0x0217FA) },
+ { "Atlantic/Bermuda" , FOR_V2(0x0560C1, 0x021D0E) },
+ { "Atlantic/Canary" , FOR_V2(0x0568A1, 0x021FF4) },
+ { "Atlantic/Cape_Verde" , FOR_V2(0x057034, 0x0222CF) },
+ { "Atlantic/Faeroe" , FOR_V2(0x05713E, 0x02234D) },
+ { "Atlantic/Faroe" , FOR_V2(0x05786F, 0x0225F6) },
+ { "Atlantic/Jan_Mayen" , FOR_V2(0x057FA0, 0x02289F) },
+ { "Atlantic/Madeira" , FOR_V2(0x058877, 0x022BE2) },
+ { "Atlantic/Reykjavik" , FOR_V2(0x059628, 0x0230FC) },
+ { "Atlantic/South_Georgia" , FOR_V2(0x059ADA, 0x0232CE) },
+ { "Atlantic/St_Helena" , FOR_V2(0x059B7A, 0x023312) },
+ { "Atlantic/Stanley" , FOR_V2(0x059C30, 0x02336C) },
+ { "Australia/ACT" , FOR_V2(0x05A11A, 0x023553) },
+ { "Australia/Adelaide" , FOR_V2(0x05A9D5, 0x023887) },
+ { "Australia/Brisbane" , FOR_V2(0x05B2AE, 0x023BC6) },
+ { "Australia/Broken_Hill" , FOR_V2(0x05B495, 0x023CA0) },
+ { "Australia/Canberra" , FOR_V2(0x05BD9F, 0x023FF1) },
+ { "Australia/Currie" , FOR_V2(0x05C65A, 0x024325) },
+ { "Australia/Darwin" , FOR_V2(0x05CF2B, 0x02466F) },
+ { "Australia/Eucla" , FOR_V2(0x05D08C, 0x024708) },
+ { "Australia/Hobart" , FOR_V2(0x05D298, 0x0247F0) },
+ { "Australia/LHI" , FOR_V2(0x05DBD8, 0x024B61) },
+ { "Australia/Lindeman" , FOR_V2(0x05E327, 0x024E13) },
+ { "Australia/Lord_Howe" , FOR_V2(0x05E55C, 0x024F0E) },
+ { "Australia/Melbourne" , FOR_V2(0x05ECBB, 0x0251D0) },
+ { "Australia/North" , FOR_V2(0x05F57E, 0x02550C) },
+ { "Australia/NSW" , FOR_V2(0x05F6CD, 0x025593) },
+ { "Australia/Perth" , FOR_V2(0x05FF88, 0x0258C7) },
+ { "Australia/Queensland" , FOR_V2(0x060191, 0x0259B2) },
+ { "Australia/South" , FOR_V2(0x060361, 0x025A75) },
+ { "Australia/Sydney" , FOR_V2(0x060C2B, 0x025DA5) },
+ { "Australia/Tasmania" , FOR_V2(0x061502, 0x0260F5) },
+ { "Australia/Victoria" , FOR_V2(0x061E2D, 0x026451) },
+ { "Australia/West" , FOR_V2(0x0626E8, 0x026785) },
+ { "Australia/Yancowinna" , FOR_V2(0x0628D3, 0x026852) },
+ { "Brazil/Acre" , FOR_V2(0x0631C1, 0x026B87) },
+ { "Brazil/DeNoronha" , FOR_V2(0x06345D, 0x026C98) },
+ { "Brazil/East" , FOR_V2(0x063741, 0x026DBD) },
+ { "Brazil/West" , FOR_V2(0x063F2C, 0x02709F) },
+ { "Canada/Atlantic" , FOR_V2(0x0641A0, 0x02719C) },
+ { "Canada/Central" , FOR_V2(0x064F1A, 0x027689) },
+ { "Canada/East-Saskatchewan" , FOR_V2(0x065A71, 0x027AB4) },
+ { "Canada/Eastern" , FOR_V2(0x065E5F, 0x027C42) },
+ { "Canada/Mountain" , FOR_V2(0x066C1A, 0x028143) },
+ { "Canada/Newfoundland" , FOR_V2(0x067588, 0x0284BE) },
+ { "Canada/Pacific" , FOR_V2(0x0683E4, 0x028A02) },
+ { "Canada/Saskatchewan" , FOR_V2(0x068F45, 0x028E2C) },
+ { "Canada/Yukon" , FOR_V2(0x069333, 0x028FBA) },
+ { "CET" , FOR_V2(0x069B6C, 0x0292CE) },
+ { "Chile/Continental" , FOR_V2(0x06A3AE, 0x0295D7) },
+ { "Chile/EasterIsland" , FOR_V2(0x06AD8D, 0x02997B) },
+ { "CST6CDT" , FOR_V2(0x06B64A, 0x029CB5) },
+ { "Cuba" , FOR_V2(0x06BF4C, 0x02A006) },
+ { "EET" , FOR_V2(0x06C8DD, 0x02A38A) },
+ { "Egypt" , FOR_V2(0x06D03D, 0x02A63D) },
+ { "Eire" , FOR_V2(0x06D7FD, 0x02A91D) },
+ { "EST" , FOR_V2(0x06E5F0, 0x02AE3F) },
+ { "EST5EDT" , FOR_V2(0x06E67B, 0x02AE83) },
+ { "Etc/GMT" , FOR_V2(0x06EF7D, 0x02B1D4) },
+ { "Etc/GMT+0" , FOR_V2(0x06F008, 0x02B218) },
+ { "Etc/GMT+1" , FOR_V2(0x06F093, 0x02B25C) },
+ { "Etc/GMT+10" , FOR_V2(0x06F126, 0x02B2A2) },
+ { "Etc/GMT+11" , FOR_V2(0x06F1BD, 0x02B2E9) },
+ { "Etc/GMT+12" , FOR_V2(0x06F254, 0x02B330) },
+ { "Etc/GMT+2" , FOR_V2(0x06F2EB, 0x02B377) },
+ { "Etc/GMT+3" , FOR_V2(0x06F37E, 0x02B3BD) },
+ { "Etc/GMT+4" , FOR_V2(0x06F411, 0x02B403) },
+ { "Etc/GMT+5" , FOR_V2(0x06F4A4, 0x02B449) },
+ { "Etc/GMT+6" , FOR_V2(0x06F537, 0x02B48F) },
+ { "Etc/GMT+7" , FOR_V2(0x06F5CA, 0x02B4D5) },
+ { "Etc/GMT+8" , FOR_V2(0x06F65D, 0x02B51B) },
+ { "Etc/GMT+9" , FOR_V2(0x06F6F0, 0x02B561) },
+ { "Etc/GMT-0" , FOR_V2(0x06F783, 0x02B5A7) },
+ { "Etc/GMT-1" , FOR_V2(0x06F80E, 0x02B5EB) },
+ { "Etc/GMT-10" , FOR_V2(0x06F8A2, 0x02B631) },
+ { "Etc/GMT-11" , FOR_V2(0x06F93A, 0x02B678) },
+ { "Etc/GMT-12" , FOR_V2(0x06F9D2, 0x02B6BF) },
+ { "Etc/GMT-13" , FOR_V2(0x06FA6A, 0x02B706) },
+ { "Etc/GMT-14" , FOR_V2(0x06FB02, 0x02B74D) },
+ { "Etc/GMT-2" , FOR_V2(0x06FB9A, 0x02B794) },
+ { "Etc/GMT-3" , FOR_V2(0x06FC2E, 0x02B7DA) },
+ { "Etc/GMT-4" , FOR_V2(0x06FCC2, 0x02B820) },
+ { "Etc/GMT-5" , FOR_V2(0x06FD56, 0x02B866) },
+ { "Etc/GMT-6" , FOR_V2(0x06FDEA, 0x02B8AC) },
+ { "Etc/GMT-7" , FOR_V2(0x06FE7E, 0x02B8F2) },
+ { "Etc/GMT-8" , FOR_V2(0x06FF12, 0x02B938) },
+ { "Etc/GMT-9" , FOR_V2(0x06FFA6, 0x02B97E) },
+ { "Etc/GMT0" , FOR_V2(0x07003A, 0x02B9C4) },
+ { "Etc/Greenwich" , FOR_V2(0x0700C5, 0x02BA08) },
+ { "Etc/UCT" , FOR_V2(0x070150, 0x02BA4C) },
+ { "Etc/Universal" , FOR_V2(0x0701DB, 0x02BA90) },
+ { "Etc/UTC" , FOR_V2(0x070266, 0x02BAD4) },
+ { "Etc/Zulu" , FOR_V2(0x0702F1, 0x02BB18) },
+ { "Europe/Amsterdam" , FOR_V2(0x07037C, 0x02BB5C) },
+ { "Europe/Andorra" , FOR_V2(0x070F07, 0x02BFAB) },
+ { "Europe/Astrakhan" , FOR_V2(0x0715EA, 0x02C238) },
+ { "Europe/Athens" , FOR_V2(0x071AA7, 0x02C41F) },
+ { "Europe/Belfast" , FOR_V2(0x072392, 0x02C773) },
+ { "Europe/Belgrade" , FOR_V2(0x073205, 0x02CCBB) },
+ { "Europe/Berlin" , FOR_V2(0x0739B6, 0x02CF95) },
+ { "Europe/Bratislava" , FOR_V2(0x0742F5, 0x02D310) },
+ { "Europe/Brussels" , FOR_V2(0x074BE1, 0x02D653) },
+ { "Europe/Bucharest" , FOR_V2(0x075787, 0x02DA9B) },
+ { "Europe/Budapest" , FOR_V2(0x076040, 0x02DDD6) },
+ { "Europe/Busingen" , FOR_V2(0x0769B1, 0x02E150) },
+ { "Europe/Chisinau" , FOR_V2(0x077143, 0x02E418) },
+ { "Europe/Copenhagen" , FOR_V2(0x077ADC, 0x02E7BC) },
+ { "Europe/Dublin" , FOR_V2(0x078358, 0x02EAD7) },
+ { "Europe/Gibraltar" , FOR_V2(0x07914B, 0x02EFF9) },
+ { "Europe/Guernsey" , FOR_V2(0x079D4C, 0x02F461) },
+ { "Europe/Helsinki" , FOR_V2(0x07ABBF, 0x02F9A9) },
+ { "Europe/Isle_of_Man" , FOR_V2(0x07B340, 0x02FC70) },
+ { "Europe/Istanbul" , FOR_V2(0x07C1B3, 0x0301B8) },
+ { "Europe/Jersey" , FOR_V2(0x07CC7A, 0x0305B6) },
+ { "Europe/Kaliningrad" , FOR_V2(0x07DAED, 0x030AFE) },
+ { "Europe/Kiev" , FOR_V2(0x07E11B, 0x030D7F) },
+ { "Europe/Lisbon" , FOR_V2(0x07E96C, 0x0310B2) },
+ { "Europe/Ljubljana" , FOR_V2(0x07F708, 0x0315C6) },
+ { "Europe/London" , FOR_V2(0x07FEB9, 0x0318A0) },
+ { "Europe/Luxembourg" , FOR_V2(0x080D2C, 0x031DE8) },
+ { "Europe/Madrid" , FOR_V2(0x0818D6, 0x032243) },
+ { "Europe/Malta" , FOR_V2(0x08232D, 0x032622) },
+ { "Europe/Mariehamn" , FOR_V2(0x082D7E, 0x0329EC) },
+ { "Europe/Minsk" , FOR_V2(0x0834FF, 0x032CB3) },
+ { "Europe/Monaco" , FOR_V2(0x083A63, 0x032ED7) },
+ { "Europe/Moscow" , FOR_V2(0x0845F8, 0x033323) },
+ { "Europe/Nicosia" , FOR_V2(0x084C10, 0x03359B) },
+ { "Europe/Oslo" , FOR_V2(0x0853FC, 0x033888) },
+ { "Europe/Paris" , FOR_V2(0x085CD3, 0x033BCB) },
+ { "Europe/Podgorica" , FOR_V2(0x08687A, 0x034022) },
+ { "Europe/Prague" , FOR_V2(0x08702B, 0x0342FC) },
+ { "Europe/Riga" , FOR_V2(0x087917, 0x03463F) },
+ { "Europe/Rome" , FOR_V2(0x0881DE, 0x034995) },
+ { "Europe/Samara" , FOR_V2(0x088C60, 0x034D69) },
+ { "Europe/San_Marino" , FOR_V2(0x0891D7, 0x034FAF) },
+ { "Europe/Sarajevo" , FOR_V2(0x089C59, 0x035383) },
+ { "Europe/Simferopol" , FOR_V2(0x08A40A, 0x03565D) },
+ { "Europe/Skopje" , FOR_V2(0x08A9F7, 0x0358BF) },
+ { "Europe/Sofia" , FOR_V2(0x08B1A8, 0x035B99) },
+ { "Europe/Stockholm" , FOR_V2(0x08BA06, 0x035EB2) },
+ { "Europe/Tallinn" , FOR_V2(0x08C190, 0x036172) },
+ { "Europe/Tirane" , FOR_V2(0x08CA27, 0x0364B8) },
+ { "Europe/Tiraspol" , FOR_V2(0x08D265, 0x0367C3) },
+ { "Europe/Ulyanovsk" , FOR_V2(0x08DBFE, 0x036B67) },
+ { "Europe/Uzhgorod" , FOR_V2(0x08E10F, 0x036D74) },
+ { "Europe/Vaduz" , FOR_V2(0x08E95A, 0x03709C) },
+ { "Europe/Vatican" , FOR_V2(0x08F0E4, 0x03735C) },
+ { "Europe/Vienna" , FOR_V2(0x08FB66, 0x037730) },
+ { "Europe/Vilnius" , FOR_V2(0x09042F, 0x037A6E) },
+ { "Europe/Volgograd" , FOR_V2(0x090CD2, 0x037DBE) },
+ { "Europe/Warsaw" , FOR_V2(0x09122D, 0x037FFB) },
+ { "Europe/Zagreb" , FOR_V2(0x091CCA, 0x0383ED) },
+ { "Europe/Zaporozhye" , FOR_V2(0x09247B, 0x0386C7) },
+ { "Europe/Zurich" , FOR_V2(0x092CF4, 0x038A19) },
+ { "Factory" , FOR_V2(0x09347E, 0x038CD9) },
+ { "GB" , FOR_V2(0x093592, 0x038D4A) },
+ { "GB-Eire" , FOR_V2(0x094405, 0x039292) },
+ { "GMT" , FOR_V2(0x095278, 0x0397DA) },
+ { "GMT+0" , FOR_V2(0x095303, 0x03981E) },
+ { "GMT-0" , FOR_V2(0x09538E, 0x039862) },
+ { "GMT0" , FOR_V2(0x095419, 0x0398A6) },
+ { "Greenwich" , FOR_V2(0x0954A4, 0x0398EA) },
+ { "Hongkong" , FOR_V2(0x09552F, 0x03992E) },
+ { "HST" , FOR_V2(0x0959E0, 0x039AFD) },
+ { "Iceland" , FOR_V2(0x095A6C, 0x039B41) },
+ { "Indian/Antananarivo" , FOR_V2(0x095F1E, 0x039D13) },
+ { "Indian/Chagos" , FOR_V2(0x096045, 0x039D9F) },
+ { "Indian/Christmas" , FOR_V2(0x09611A, 0x039E06) },
+ { "Indian/Cocos" , FOR_V2(0x0961BB, 0x039E4A) },
+ { "Indian/Comoro" , FOR_V2(0x09625F, 0x039E8E) },
+ { "Indian/Kerguelen" , FOR_V2(0x096386, 0x039F1A) },
+ { "Indian/Mahe" , FOR_V2(0x09643D, 0x039F74) },
+ { "Indian/Maldives" , FOR_V2(0x0964F4, 0x039FCE) },
+ { "Indian/Mauritius" , FOR_V2(0x0965CC, 0x03A034) },
+ { "Indian/Mayotte" , FOR_V2(0x0966D5, 0x03A0AF) },
+ { "Indian/Reunion" , FOR_V2(0x0967FC, 0x03A13B) },
+ { "Iran" , FOR_V2(0x0968B3, 0x03A195) },
+ { "Israel" , FOR_V2(0x096F4D, 0x03A410) },
+ { "Jamaica" , FOR_V2(0x097832, 0x03A758) },
+ { "Japan" , FOR_V2(0x097A39, 0x03A82E) },
+ { "Kwajalein" , FOR_V2(0x097BA8, 0x03A8C5) },
+ { "Libya" , FOR_V2(0x097CA1, 0x03A939) },
+ { "MET" , FOR_V2(0x097F3C, 0x03AA47) },
+ { "Mexico/BajaNorte" , FOR_V2(0x09877E, 0x03AD50) },
+ { "Mexico/BajaSur" , FOR_V2(0x0990BE, 0x03B0BE) },
+ { "Mexico/General" , FOR_V2(0x0996E6, 0x03B310) },
+ { "MST" , FOR_V2(0x099D44, 0x03B573) },
+ { "MST7MDT" , FOR_V2(0x099DCF, 0x03B5B7) },
+ { "Navajo" , FOR_V2(0x09A6D1, 0x03B908) },
+ { "NZ" , FOR_V2(0x09B072, 0x03BC92) },
+ { "NZ-CHAT" , FOR_V2(0x09BA1A, 0x03C021) },
+ { "Pacific/Apia" , FOR_V2(0x09C22F, 0x03C316) },
+ { "Pacific/Auckland" , FOR_V2(0x09C689, 0x03C4BF) },
+ { "Pacific/Bougainville" , FOR_V2(0x09D049, 0x03C866) },
+ { "Pacific/Chatham" , FOR_V2(0x09D179, 0x03C8EF) },
+ { "Pacific/Chuuk" , FOR_V2(0x09D99D, 0x03CBF3) },
+ { "Pacific/Easter" , FOR_V2(0x09DA51, 0x03CC47) },
+ { "Pacific/Efate" , FOR_V2(0x09E31B, 0x03CF8E) },
+ { "Pacific/Enderbury" , FOR_V2(0x09E505, 0x03D059) },
+ { "Pacific/Fakaofo" , FOR_V2(0x09E606, 0x03D0D8) },
+ { "Pacific/Fiji" , FOR_V2(0x09E6D7, 0x03D13A) },
+ { "Pacific/Funafuti" , FOR_V2(0x09EB14, 0x03D2D2) },
+ { "Pacific/Galapagos" , FOR_V2(0x09EBB6, 0x03D316) },
+ { "Pacific/Gambier" , FOR_V2(0x09ECA6, 0x03D393) },
+ { "Pacific/Guadalcanal" , FOR_V2(0x09ED6E, 0x03D3FD) },
+ { "Pacific/Guam" , FOR_V2(0x09EE26, 0x03D457) },
+ { "Pacific/Honolulu" , FOR_V2(0x09EF13, 0x03D4BE) },
+ { "Pacific/Johnston" , FOR_V2(0x09F039, 0x03D546) },
+ { "Pacific/Kiritimati" , FOR_V2(0x09F167, 0x03D5D6) },
+ { "Pacific/Kosrae" , FOR_V2(0x09F265, 0x03D652) },
+ { "Pacific/Kwajalein" , FOR_V2(0x09F35D, 0x03D6C8) },
+ { "Pacific/Majuro" , FOR_V2(0x09F45F, 0x03D745) },
+ { "Pacific/Marquesas" , FOR_V2(0x09F54D, 0x03D7C4) },
+ { "Pacific/Midway" , FOR_V2(0x09F61A, 0x03D830) },
+ { "Pacific/Nauru" , FOR_V2(0x09F744, 0x03D8C2) },
+ { "Pacific/Niue" , FOR_V2(0x09F84E, 0x03D93F) },
+ { "Pacific/Norfolk" , FOR_V2(0x09F93C, 0x03D9AE) },
+ { "Pacific/Noumea" , FOR_V2(0x09FA69, 0x03DA38) },
+ { "Pacific/Pago_Pago" , FOR_V2(0x09FBAF, 0x03DACD) },
+ { "Pacific/Palau" , FOR_V2(0x09FCCB, 0x03DB51) },
+ { "Pacific/Pitcairn" , FOR_V2(0x09FD6C, 0x03DB95) },
+ { "Pacific/Pohnpei" , FOR_V2(0x09FE43, 0x03DBFB) },
+ { "Pacific/Ponape" , FOR_V2(0x09FEF6, 0x03DC4E) },
+ { "Pacific/Port_Moresby" , FOR_V2(0x09FF9B, 0x03DC93) },
+ { "Pacific/Rarotonga" , FOR_V2(0x0A0070, 0x03DCF4) },
+ { "Pacific/Saipan" , FOR_V2(0x0A02BA, 0x03DDE1) },
+ { "Pacific/Samoa" , FOR_V2(0x0A03A7, 0x03DE48) },
+ { "Pacific/Tahiti" , FOR_V2(0x0A04C3, 0x03DECC) },
+ { "Pacific/Tarawa" , FOR_V2(0x0A058C, 0x03DF36) },
+ { "Pacific/Tongatapu" , FOR_V2(0x0A0640, 0x03DF8A) },
+ { "Pacific/Truk" , FOR_V2(0x0A079F, 0x03E027) },
+ { "Pacific/Wake" , FOR_V2(0x0A0844, 0x03E06C) },
+ { "Pacific/Wallis" , FOR_V2(0x0A08F4, 0x03E0BC) },
+ { "Pacific/Yap" , FOR_V2(0x0A0996, 0x03E100) },
+ { "Poland" , FOR_V2(0x0A0A3B, 0x03E145) },
+ { "Portugal" , FOR_V2(0x0A14D8, 0x03E537) },
+ { "PRC" , FOR_V2(0x0A2261, 0x03EA38) },
+ { "PST8PDT" , FOR_V2(0x0A240B, 0x03EAE9) },
+ { "ROC" , FOR_V2(0x0A2D0D, 0x03EE3A) },
+ { "ROK" , FOR_V2(0x0A3039, 0x03EF7C) },
+ { "Singapore" , FOR_V2(0x0A3280, 0x03F074) },
+ { "Turkey" , FOR_V2(0x0A3438, 0x03F13C) },
+ { "UCT" , FOR_V2(0x0A3EFF, 0x03F53A) },
+ { "Universal" , FOR_V2(0x0A3F8A, 0x03F57E) },
+ { "US/Alaska" , FOR_V2(0x0A4015, 0x03F5C2) },
+ { "US/Aleutian" , FOR_V2(0x0A4971, 0x03F93C) },
+ { "US/Arizona" , FOR_V2(0x0A52BA, 0x03FCAD) },
+ { "US/Central" , FOR_V2(0x0A5427, 0x03FD4C) },
+ { "US/East-Indiana" , FOR_V2(0x0A6234, 0x040270) },
+ { "US/Eastern" , FOR_V2(0x0A68CB, 0x0404EB) },
+ { "US/Hawaii" , FOR_V2(0x0A76B0, 0x0409FB) },
+ { "US/Indiana-Starke" , FOR_V2(0x0A77D0, 0x040A7D) },
+ { "US/Michigan" , FOR_V2(0x0A8161, 0x040E07) },
+ { "US/Mountain" , FOR_V2(0x0A8A15, 0x041143) },
+ { "US/Pacific" , FOR_V2(0x0A93B6, 0x0414CD) },
+ { "US/Pacific-New" , FOR_V2(0x0A9EDF, 0x0418E3) },
+ { "US/Samoa" , FOR_V2(0x0AAA08, 0x041CF9) },
+ { "UTC" , FOR_V2(0x0AAB24, 0x041D7D) },
+ { "W-SU" , FOR_V2(0x0AABAF, 0x041DC1) },
+ { "WET" , FOR_V2(0x0AB1B3, 0x042025) },
+ { "Zulu" , FOR_V2(0x0AB910, 0x0422D8) },
+};
+#ifdef TIMELIB_SUPPORTS_V2DATA
+const unsigned char timelib_timezone_db_data_builtin[702875] = {
+#else
+const unsigned char timelib_timezone_db_data_builtin[271132] = {
+#endif
/* Africa/Abidjan */
@@ -592,14 +605,16 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x91, 0x71, 0x12, 0x01, 0x0C,
-0x80, 0xFA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x91, 0x71, 0x12, 0x01, 0x0C, 0x80, 0xFA, 0x00, 0x00, 0x00, 0x00,
/* Africa/Accra */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -622,40 +637,43 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xFF, 0xCC,
0x00, 0x00, 0x00, 0x00, 0x04, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D,
0x54, 0x00, 0x47, 0x48, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30, 0x66, 0xB4, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA3, 0x34, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xD3, 0xFC, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA5, 0x15, 0xAF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB5, 0x2F, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA6, 0xF6, 0xE2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x96, 0x63, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA8, 0xD8, 0x16, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x77, 0x96, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAA, 0xBA, 0x9B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0x5A, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAC, 0x9B, 0xCE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0x3B, 0x4F, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAE, 0x7D, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x1C, 0x82, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB0, 0x5E, 0x35, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xFD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB2, 0x40, 0xBA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0xE0, 0x3B, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB4, 0x21, 0xEE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0xC1, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB6, 0x03, 0x21, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA2, 0xA2, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB7, 0xE4, 0x55, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x83, 0xD5, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB9, 0xC6, 0xDA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x66, 0x5A, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBB, 0xA8, 0x0D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x47, 0x8E, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBD, 0x89, 0x41, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x28, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBF, 0x6A, 0x74, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x09, 0xF5, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC1, 0x4C, 0xF9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0xEC, 0x7A, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC3, 0x2E, 0x2D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xCD, 0xAD, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC5, 0x0F, 0x60, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xAE, 0xE1, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC6, 0xF0, 0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x90, 0x14, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0xD3, 0x19, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x72, 0x99, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0xB4, 0x4C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x53, 0xCD, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCC, 0x95, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x35, 0x00, 0xD0, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xFF,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x04, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x47, 0x48, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x91, 0xCC, 0x38, 0x01, 0x12, 0x53, 0xDD,
-0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30, 0x66, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x34, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xD3, 0xFC, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x15, 0xAF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB5, 0x2F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0xF6, 0xE2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x96, 0x63, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0xD8, 0x16, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x77, 0x96, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xBA, 0x9B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0x5A, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0x9B, 0xCE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0x3B, 0x4F, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0x7D, 0x02, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x1C, 0x82, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x5E, 0x35, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xFD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x40, 0xBA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0xE0, 0x3B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x21, 0xEE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0xC1, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x03, 0x21, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA2, 0xA2, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0xE4, 0x55, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x83, 0xD5, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xC6, 0xDA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x66, 0x5A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xA8, 0x0D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x47, 0x8E, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0x89, 0x41, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x28, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x6A, 0x74, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x09, 0xF5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x4C, 0xF9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0xEC, 0x7A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x2E, 0x2D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xCD, 0xAD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x0F, 0x60, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xAE, 0xE1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0xF0, 0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x90, 0x14, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xD3, 0x19, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x72, 0x99, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xB4, 0x4C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x53, 0xCD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x35, 0x00, 0xD0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xFF, 0xCC,
+0x00, 0x00, 0x00, 0x00, 0x04, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x47, 0x48, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x91, 0xCC, 0x38, 0x01, 0x12, 0x53, 0xDD, 0x00, 0x00, 0x00, 0x00,
/* Africa/Addis_Ababa */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -666,6 +684,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -675,8 +694,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x97, 0x1C, 0xE5, 0x01,
-0x4D, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x97, 0x1C, 0xE5, 0x01, 0x4D, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
/* Africa/Algiers */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -698,6 +718,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x45,
0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
@@ -726,8 +747,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x16, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57,
0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0xC1, 0x74, 0xBD, 0x01, 0x17, 0x4F, 0xE8,
-0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0xC1, 0x74, 0xBD, 0x01, 0x17, 0x4F, 0xE8, 0x00, 0x00, 0x00, 0x00,
/* Africa/Asmara */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -738,6 +760,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -747,8 +770,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0xA0, 0xB9, 0xD5, 0x01,
-0x4D, 0xFD, 0x4D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xA0, 0xB9, 0xD5, 0x01, 0x4D, 0xFD, 0x4D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Asmera */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -759,6 +783,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -768,50 +793,57 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Africa/Bamako */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x9C, 0xA1, 0xA8, 0x01, 0x06,
-0x73, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x9C, 0xA1, 0xA8, 0x01, 0x06, 0x73, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Africa/Bangui */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x8F, 0xFD, 0xFA, 0x01,
-0x2F, 0x03, 0x9D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x8F, 0xFD, 0xFA, 0x01, 0x2F, 0x03, 0x9D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Banjul */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x9D, 0xE0, 0xAA, 0x00, 0xF9,
-0x40, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x9D, 0xE0, 0xAA, 0x00, 0xF9, 0x40, 0x98, 0x00, 0x00, 0x00, 0x00,
/* Africa/Bissau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -819,14 +851,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x9D, 0x1C, 0x09, 0x67, 0x61, 0x10, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xF1, 0x64, 0x00,
0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x57, 0x41, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x9D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x67, 0x61, 0x10, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xF1, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+0x00, 0x57, 0x41, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x9D, 0x1C, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x67, 0x61, 0x10, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xF1, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0xF1,
+0xF0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54,
+0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30,
+0x0A,
+#endif
0x00, 0x9B, 0x69, 0x28, 0x00, 0xFA, 0xE1, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Africa/Blantyre */
@@ -834,42 +869,48 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x71, 0x3E, 0xE2, 0x01,
-0x48, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x71, 0x3E, 0xE2, 0x01, 0x48, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
/* Africa/Brazzaville */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x82, 0xD1, 0x95, 0x01,
-0x29, 0xFA, 0x8D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x82, 0xD1, 0x95, 0x01, 0x29, 0xFA, 0x8D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Bujumbura */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x84, 0x2A, 0xA2, 0x01,
-0x3F, 0x77, 0xDA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x84, 0x2A, 0xA2, 0x01, 0x3F, 0x77, 0xDA, 0x00, 0x00, 0x00, 0x00,
/* Africa/Cairo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -917,86 +958,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A,
0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C,
0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45,
-0x54, 0x2D, 0x32, 0x0A, 0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00,
-
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55,
+0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00,
+0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0xB7, 0x2E, 0x88, 0x01, 0x42, 0x57, 0x88, 0x00, 0x00, 0x00, 0x00,
/* Africa/Casablanca */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1036,72 +1079,75 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D,
0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x96, 0x51, 0xF9, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0xFF, 0x14, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xED, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0xA1, 0x32, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x35, 0xA4, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDB, 0xEE, 0x27, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x25, 0x72, 0x40, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xC2, 0xEF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0x6B, 0x84, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x08, 0xC6, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x27, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB7, 0xA6, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xBB, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x55, 0x7C, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAB, 0x04, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x57, 0x53, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x81, 0xAC, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x15, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0x20, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x58, 0x53, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xF5, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x5A, 0xF7, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x25, 0xC0, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5C, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x86, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x66, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x46, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00,
-0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xBC, 0xAC,
-0xC8, 0x01, 0x07, 0x16, 0x42, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0x51, 0xF9, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0xFF, 0x14, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xD9, 0xED, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xA1, 0x32, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x35, 0xA4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xEE, 0x27, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0x25, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xEF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x6B, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0xC6, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xB7, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x48, 0xBB, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x7C, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x55, 0xAB, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x53, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x81, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x58, 0x53, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xF7, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0x25, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45,
+0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Africa/Ceuta */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1151,119 +1197,125 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x11, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57,
0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0xB9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xD6, 0x75,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xA1, 0x6E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x05, 0xEF,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0xE1, 0x91,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x25, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xEF,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0x6B, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0xC6, 0x6D,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x61, 0x47,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8E, 0xF2,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0xA3,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB7, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0xFF, 0xFF, 0xFB, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x01,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x11, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54,
-0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC0, 0x15, 0x2D, 0x01,
-0x0A, 0x8B, 0xAD, 0x00, 0x00, 0x00, 0x0F, 0x43, 0x65, 0x75, 0x74, 0x61, 0x20, 0x26, 0x20, 0x4D,
-0x65, 0x6C, 0x69, 0x6C, 0x6C, 0x61,
+0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0xB9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xD6, 0x75, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xA1, 0x6E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0xE1, 0x91, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x25, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xC2, 0xEF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0x6B, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x08, 0xC6, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x27, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB7, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0xFF, 0xFF, 0xFB, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x11, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00,
+0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC0, 0x15, 0x2D, 0x01, 0x0A, 0x8B, 0xAD, 0x00, 0x00, 0x00, 0x0E, 0x43, 0x65, 0x75, 0x74,
+0x61, 0x2C, 0x20, 0x4D, 0x65, 0x6C, 0x69, 0x6C, 0x6C, 0x61,
/* Africa/Conakry */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x97, 0xD9, 0xB2, 0x00, 0xFD,
-0xBA, 0x6D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x97, 0xD9, 0xB2, 0x00, 0xFD, 0xBA, 0x6D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Dakar */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x9F, 0xB5, 0x6A, 0x00, 0xF8,
-0x0E, 0x9A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x9F, 0xB5, 0x6A, 0x00, 0xF8, 0x0E, 0x9A, 0x00, 0x00, 0x00, 0x00,
/* Africa/Dar_es_Salaam */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1274,6 +1326,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -1283,8 +1336,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x7E, 0xF4, 0x00, 0x01,
-0x4E, 0x99, 0x8D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x7E, 0xF4, 0x00, 0x01, 0x4E, 0x99, 0x8D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Djibouti */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1295,6 +1349,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -1304,22 +1359,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x9B, 0x07, 0x80, 0x01,
-0x54, 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x9B, 0x07, 0x80, 0x01, 0x54, 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00,
/* Africa/Douala */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x8F, 0x82, 0x48, 0x01,
-0x21, 0x75, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x8F, 0x82, 0x48, 0x01, 0x21, 0x75, 0x90, 0x00, 0x00, 0x00, 0x00,
/* Africa/El_Aaiun */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1355,107 +1413,116 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3, 0xA0, 0x00, 0x00, 0xFF,
0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBC, 0x48, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xD1, 0xB0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27, 0xA3, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x48, 0xBB, 0x22, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x7C, 0xE0, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x55, 0xAB, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x53, 0x87, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x57, 0x81, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x54, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x20, 0xF4, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x59, 0x58, 0x53, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x36, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xF7, 0x9C, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0x25, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xCE, 0x43, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x72, 0x58, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x43, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x25, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x07, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xDE, 0x20, 0x00, 0x01,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xF1,
-0xF0, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
-0x2F, 0x33, 0x0A, 0x00, 0xB2, 0xC1, 0xB8, 0x00, 0xFE, 0x84, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x48, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xD1, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0x61, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x8E, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD3, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x27, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xBB, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x23, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0x8D, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xDC, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x5D, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x34, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x08, 0xBB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x31, 0x9A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x67, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0xD8, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x7A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0xAE, 0x21, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xDC, 0x46, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x55, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x7C, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAB, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x37, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x53, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x81, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x20, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x20, 0xF4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0x58, 0x53, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB7, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xF7, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x25, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xCE, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xFC, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xFA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x80, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x9B, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xC9, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xDC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xE3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x72, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0xA0, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x77, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xDA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x44, 0x91, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xBC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x1B, 0x38, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x9E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x80, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x87, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x4B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x61, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x2D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x2C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x46, 0x07, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x23, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0F, 0x05, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xD2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xE7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xC9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xD0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xA5, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xB2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0xDE, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF3,
+0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x45, 0x53,
+0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57,
+0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xB2, 0xC1, 0xB8, 0x00, 0xFE, 0x84, 0x40, 0x00, 0x00, 0x00, 0x00,
/* Africa/Freetown */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x96, 0x4C, 0x90, 0x00, 0xFE,
-0x70, 0xB8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x96, 0x4C, 0x90, 0x00, 0xFE, 0x70, 0xB8, 0x00, 0x00, 0x00, 0x00,
/* Africa/Gaborone */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x63, 0xB7, 0x57, 0x01,
-0x3A, 0x34, 0x32, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x63, 0xB7, 0x57, 0x01, 0x3A, 0x34, 0x32, 0x00, 0x00, 0x00, 0x00,
/* Africa/Harare */
0x50, 0x48, 0x50, 0x32, 0x01, 0x5A, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x6E, 0x1E, 0x1A, 0x01,
-0x42, 0x09, 0x68, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x6E, 0x1E, 0x1A, 0x01, 0x42, 0x09, 0x68, 0x00, 0x00, 0x00, 0x00,
/* Africa/Johannesburg */
0x50, 0x48, 0x50, 0x32, 0x01, 0x5A, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1465,17 +1532,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xCF, 0x7E, 0x51, 0x70, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1A, 0x40, 0x00, 0x00,
0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x41, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCD, 0x9E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x8E, 0x6E, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCF, 0x7E, 0x51, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00,
-0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x53, 0x54, 0x2D, 0x32, 0x0A, 0x00,
-0x61, 0x46, 0x58, 0x01, 0x3D, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x41, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x9E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x8E, 0x6E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x7E, 0x51, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1A, 0x40, 0x00,
+0x00, 0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x53, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x61, 0x46, 0x58, 0x01, 0x3D, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
/* Africa/Juba */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1494,34 +1564,36 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00,
0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA3, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x17, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x7A, 0x34, 0x50, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0xF9, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x03, 0x5B, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0x7E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0xEC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0x60, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x1F, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x42, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x53, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x24, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xE1, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x06, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0xC4, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xBF, 0xE8, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0xA5, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x05, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x11, 0x88, 0xE7, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x68, 0xC9, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x4A, 0x2B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x48, 0xAB, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x2B, 0x5F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0x8D, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0x6F, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xED, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0x8B, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xD0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0x6D, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0xB1, 0x7E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x80, 0x45, 0x20,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x90, 0xBA, 0xC8, 0x01,
-0x42, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA3, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x9E, 0x17, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7A, 0x34, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x7D, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5B, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0xEC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0x60, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1F, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x53, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE1, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC4, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xBF, 0xE8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xA5, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x88, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x68, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x14, 0x4A, 0x2B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x48, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x2B, 0x5F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x28, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0x6F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xED, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF1, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xD0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xB1, 0x7E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x80, 0x45, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A,
+0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x90, 0xBA, 0xC8, 0x01, 0x42, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00,
/* Africa/Kampala */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1532,6 +1604,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -1541,8 +1614,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x89, 0xCF, 0xF2, 0x01,
-0x44, 0x1F, 0x42, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0xCF, 0xF2, 0x01, 0x44, 0x1F, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Africa/Khartoum */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1561,176 +1635,200 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00,
0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA3, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x17, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x7A, 0x34, 0x50, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7D, 0xF9, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x03, 0x5B, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0x7E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0xEC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0x60, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x1F, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x42, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x53, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x24, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xE1, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x06, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0xC4, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xBF, 0xE8, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0xA5, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x05, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x11, 0x88, 0xE7, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x68, 0xC9, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x4A, 0x2B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x48, 0xAB, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x2B, 0x5F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0x8D, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0x6F, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xED, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0x8B, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xD0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0x6D, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0xB1, 0x7E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x80, 0x45, 0x20,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0xA1, 0x22, 0x00, 0x01,
-0x44, 0x4C, 0xD5, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA3, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x9E, 0x17, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7A, 0x34, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x7D, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5B, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0xEC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0x60, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1F, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x53, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE1, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC4, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xBF, 0xE8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xA5, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x88, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x68, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x14, 0x4A, 0x2B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x48, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x2B, 0x5F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x28, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0x6F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xED, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF1, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xD0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xB1, 0x7E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x80, 0x45, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A,
+0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xA1, 0x22, 0x00, 0x01, 0x44, 0x4C, 0xD5, 0x00, 0x00, 0x00, 0x00,
/* Africa/Kigali */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x86, 0x5A, 0x88, 0x01,
-0x40, 0x89, 0x4A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x86, 0x5A, 0x88, 0x01, 0x40, 0x89, 0x4A, 0x00, 0x00, 0x00, 0x00,
/* Africa/Kinshasa */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x82, 0xC4, 0x90, 0x01,
-0x2A, 0x01, 0x10, 0x00, 0x00, 0x00, 0x17, 0x77, 0x65, 0x73, 0x74, 0x20, 0x44, 0x65, 0x6D, 0x2E,
-0x20, 0x52, 0x65, 0x70, 0x2E, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x6F, 0x6E, 0x67, 0x6F,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x82, 0xC4, 0x90, 0x01, 0x2A, 0x01, 0x10, 0x00, 0x00, 0x00, 0x19, 0x44, 0x65, 0x6D, 0x2E,
+0x20, 0x52, 0x65, 0x70, 0x2E, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x6F, 0x6E, 0x67, 0x6F, 0x20, 0x28,
+0x77, 0x65, 0x73, 0x74, 0x29,
/* Africa/Lagos */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x93, 0x2B, 0xC8, 0x01,
-0x17, 0xD8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x93, 0x2B, 0xC8, 0x01, 0x17, 0xD8, 0xA0, 0x00, 0x00, 0x00, 0x00,
/* Africa/Libreville */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x89, 0xE9, 0xFD, 0x01,
-0x21, 0x13, 0xE8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x89, 0xE9, 0xFD, 0x01, 0x21, 0x13, 0xE8, 0x00, 0x00, 0x00, 0x00,
/* Africa/Lome */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x92, 0xB0, 0x15, 0x01, 0x14,
-0x83, 0xC2, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x92, 0xB0, 0x15, 0x01, 0x14, 0x83, 0xC2, 0x00, 0x00, 0x00, 0x00,
/* Africa/Luanda */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x7B, 0xE6, 0xC0, 0x01,
-0x26, 0xD9, 0xC5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x7B, 0xE6, 0xC0, 0x01, 0x26, 0xD9, 0xC5, 0x00, 0x00, 0x00, 0x00,
/* Africa/Lubumbashi */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x77, 0x86, 0xF5, 0x01,
-0x3C, 0x91, 0xAA, 0x00, 0x00, 0x00, 0x17, 0x65, 0x61, 0x73, 0x74, 0x20, 0x44, 0x65, 0x6D, 0x2E,
-0x20, 0x52, 0x65, 0x70, 0x2E, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x6F, 0x6E, 0x67, 0x6F,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x77, 0x86, 0xF5, 0x01, 0x3C, 0x91, 0xAA, 0x00, 0x00, 0x00, 0x19, 0x44, 0x65, 0x6D, 0x2E,
+0x20, 0x52, 0x65, 0x70, 0x2E, 0x20, 0x6F, 0x66, 0x20, 0x43, 0x6F, 0x6E, 0x67, 0x6F, 0x20, 0x28,
+0x65, 0x61, 0x73, 0x74, 0x29,
/* Africa/Lusaka */
0x50, 0x48, 0x50, 0x32, 0x01, 0x5A, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x71, 0xCE, 0x1D, 0x01,
-0x3D, 0xD0, 0xAD, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x71, 0xCE, 0x1D, 0x01, 0x3D, 0xD0, 0xAD, 0x00, 0x00, 0x00, 0x00,
/* Africa/Malabo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x8F, 0x0D, 0x18, 0x01,
-0x20, 0x0F, 0x7D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x8F, 0x0D, 0x18, 0x01, 0x20, 0x0F, 0x7D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Maputo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00, 0x1E, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0x61, 0xB5, 0x05, 0x01,
-0x44, 0x60, 0x5D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xC5, 0xF4, 0x00, 0x01, 0x00, 0x00,
+0x1E, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x41, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x61, 0xB5, 0x05, 0x01, 0x44, 0x60, 0x5D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Maseru */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1740,17 +1838,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xCF, 0x7E, 0x51, 0x70, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1A, 0x40, 0x00, 0x00,
0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x41, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCD, 0x9E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x8E, 0x6E, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCF, 0x7E, 0x51, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00,
-0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x53, 0x54, 0x2D, 0x32, 0x0A, 0x00,
-0x5C, 0x5D, 0xD5, 0x01, 0x3C, 0x9E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x41, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x9E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x8E, 0x6E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x7E, 0x51, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1A, 0x40, 0x00,
+0x00, 0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x53, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x5C, 0x5D, 0xD5, 0x01, 0x3C, 0x9E, 0xB0, 0x00, 0x00, 0x00, 0x00,
/* Africa/Mbabane */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1760,17 +1861,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xCF, 0x7E, 0x51, 0x70, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1A, 0x40, 0x00, 0x00,
0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x41, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCD, 0x9E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x8E, 0x6E, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCF, 0x7E, 0x51, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00,
-0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x53, 0x54, 0x2D, 0x32, 0x0A, 0x00,
-0x61, 0x32, 0xD0, 0x01, 0x42, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x41, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x9E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x8E, 0x6E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x7E, 0x51, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1A, 0x40, 0x00,
+0x00, 0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x53, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x61, 0x32, 0xD0, 0x01, 0x42, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
/* Africa/Mogadishu */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1781,6 +1885,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -1790,8 +1895,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x8C, 0x7B, 0x8A, 0x01,
-0x57, 0xE1, 0xDA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x8C, 0x7B, 0x8A, 0x01, 0x57, 0xE1, 0xDA, 0x00, 0x00, 0x00, 0x00,
/* Africa/Monrovia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1800,16 +1906,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xA0, 0x5F, 0x6C, 0x9C, 0x04, 0x61, 0xF6, 0xEE, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xF5, 0xE4, 0x00,
0x00, 0xFF, 0xFF, 0xF5, 0xE4, 0x00, 0x04, 0xFF, 0xFF, 0xF5, 0x92, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4C, 0x52, 0x54, 0x00, 0x47,
-0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x5A, 0x7A, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x6C, 0x9C, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x61, 0xF6, 0xEE, 0x00, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xF5, 0xE4, 0x00,
-0x00, 0xFF, 0xFF, 0xF5, 0xE4, 0x00, 0x04, 0xFF, 0xFF, 0xF5, 0x92, 0x00, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4C, 0x52, 0x54, 0x00, 0x47,
-0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30,
-0x0A, 0x00, 0x92, 0xF1, 0x30, 0x01, 0x02, 0x34, 0x42, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5A, 0x7A, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x5F, 0x6C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xF6, 0xEE, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0xF5, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xF5, 0xE4, 0x00, 0x04, 0xFF, 0xFF, 0xF5, 0x92,
+0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00,
+0x4C, 0x52, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x92, 0xF1, 0x30, 0x01, 0x02, 0x34, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Africa/Nairobi */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1820,6 +1929,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -1829,8 +1939,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x87, 0x5E, 0xF2, 0x01,
-0x4A, 0xD6, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x87, 0x5E, 0xF2, 0x01, 0x4A, 0xD6, 0x02, 0x00, 0x00, 0x00, 0x00,
/* Africa/Ndjamena */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1839,99 +1950,114 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x92, 0xE6, 0x80, 0x64, 0x12, 0x66, 0x71, 0x70, 0x13, 0x26, 0xDE, 0x60, 0x00, 0x01, 0x02, 0x01,
0x00, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20,
0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x80,
-0x64, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x13, 0x26, 0xDE,
-0x60, 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31,
-0x0A, 0x00, 0x9B, 0xD1, 0x52, 0x01, 0x29, 0x9F, 0x68, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x80, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x66, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x13, 0x26, 0xDE, 0x60, 0x00, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20,
+0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x57, 0x41, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x9B, 0xD1, 0x52, 0x01, 0x29, 0x9F, 0x68, 0x00, 0x00, 0x00, 0x00,
/* Africa/Niamey */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x9D, 0xF4, 0x32, 0x01,
-0x15, 0xE3, 0x52, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x9D, 0xF4, 0x32, 0x01, 0x15, 0xE3, 0x52, 0x00, 0x00, 0x00, 0x00,
/* Africa/Nouakchott */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0xA4, 0xF2, 0x90, 0x00, 0xFA,
-0x52, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0xA4, 0xF2, 0x90, 0x00, 0xFA, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00,
/* Africa/Ouagadougou */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x9C, 0x32, 0xFA, 0x01, 0x10,
-0x58, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x9C, 0x32, 0xFA, 0x01, 0x10, 0x58, 0x0D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Porto-Novo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00, 0x03, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0x93, 0x38, 0xCD, 0x01,
-0x16, 0xA6, 0xA2, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x51, 0xF3, 0x50, 0x00, 0x01, 0x00, 0x00,
+0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x93, 0x38, 0xCD, 0x01, 0x16, 0xA6, 0xA2, 0x00, 0x00, 0x00, 0x00,
/* Africa/Sao_Tome */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x89, 0xD6, 0x75, 0x01, 0x1C,
-0xEE, 0xB5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0xD6, 0x75, 0x01, 0x1C, 0xEE, 0xB5, 0x00, 0x00, 0x00, 0x00,
/* Africa/Timbuktu */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12,
-0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Africa/Tripoli */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1950,32 +2076,35 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x00, 0x00, 0x0C, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xC1, 0x24, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xBB, 0xB1, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x23, 0xAD, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE1, 0x78, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0xE7, 0x65, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE5, 0x2F, 0x3F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xA9, 0xCC, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0x4E, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x92, 0x42, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x08, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x2B, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xEA, 0x2A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x5F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBD, 0xE4, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xB4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x17, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x93, 0x0B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x82, 0xEE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x70, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x7E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x52, 0xCF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x03, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x34, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x37, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x40, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4E, 0xF1, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x44, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x35, 0x6A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x9D, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x69, 0xB4, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x0C, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00,
-0xBB, 0x87, 0xD0, 0x01, 0x26, 0xC6, 0x3D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xC1, 0x24, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xBB, 0xB1, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x23, 0xAD, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x78, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0xE7, 0x65, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x2F, 0x3F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xA9, 0xCC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0x4E, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x92, 0x42, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x2A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBD, 0xE4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xB4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x17, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x93, 0x0B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x82, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x70, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x52, 0xCF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x34, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x40, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4E, 0xF1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x44, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x35, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x9D, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x69, 0xB4, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
+0x01, 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x0C, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0xBB, 0x87, 0xD0, 0x01, 0x26, 0xC6, 0x3D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Tunis */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1995,35 +2124,37 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00,
0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D,
0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x59,
-0x46, 0x13, 0xF4, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x60, 0x50, 0x4F, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6,
-0x3A, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0x9E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0xDB, 0x22, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x54, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0xAD, 0x69, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC2, 0x16, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xCC, 0xB0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x35, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x89, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1,
-0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x16, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0xC7, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x89, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22,
-0xA3, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x74, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x01, 0x04, 0x02, 0x03,
-0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00,
-0x09, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x02, 0x31, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43,
-0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x0A, 0x00, 0xC1, 0x7B, 0x40, 0x01, 0x22, 0x32, 0x5D, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x59, 0x46, 0x13, 0xF4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x60, 0x50, 0x4F, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0x9E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDB, 0x22, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x54, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xAD, 0x69, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xC2, 0x16, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xCC, 0xB0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x35, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x89, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x16, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC7, 0xDF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x89, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0xA3, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x74, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x09, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x02,
+0x31, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50,
+0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0xC1, 0x7B, 0x40, 0x01, 0x22, 0x32, 0x5D, 0x00, 0x00, 0x00, 0x00,
/* Africa/Windhoek */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2062,70 +2193,73 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0E, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x57, 0x41, 0x54, 0x00,
0x53, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x57, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x17, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x4B, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x46, 0xCF, 0x68,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x9E, 0x6F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x06, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9D, 0xEA, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x69, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7D, 0xE9, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x05, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x28, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x46, 0xE7, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x11, 0xFC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x26, 0xC9, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xDE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xAB, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x37, 0xD1, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0x8D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xB1, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0x6F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0x91, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0x8C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x6E, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0x83, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x3A, 0x65, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x1A, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x14, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x44, 0xFA, 0x29, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0E, 0xF6, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x46, 0xDA, 0x0B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x12, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x48, 0xC3, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0xF4, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xA3, 0x09, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0xD6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x82, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0xB8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0x62, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x9A, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0xB7, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x22, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x99, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x7B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x55, 0xEB, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0x5D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x57, 0xCB, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0x3F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xAB, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x21, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0x8B, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0x3D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0x6B, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x1F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x54, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x01, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x34, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0xE3, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x13, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0xC5, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x64, 0xF3, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0xE2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x66, 0xD3, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0xC4, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xBC, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0xA6, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0x9C, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x88, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0x7C, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0x6A, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0x5C, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0x4C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x3C, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0x68, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x1C, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0x4A, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x05, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0x2C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x75, 0xE5, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x0E, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x77, 0xC5, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0xF0, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xA5, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0xD2, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0x84, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0xEF, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0x6E, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0xD1, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x4D, 0xE6, 0x10, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x15, 0x18,
-0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00,
-0x1C, 0x20, 0x00, 0x0E, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05,
-0x4C, 0x4D, 0x54, 0x00, 0x53, 0x57, 0x41, 0x54, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41,
-0x54, 0x00, 0x57, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x57, 0x41, 0x53, 0x54, 0x2C,
-0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x66,
-0xE5, 0x25, 0x01, 0x2C, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x17, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0x7B, 0x4B, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0x82, 0x46, 0xCF, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xAE, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x9E, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x06, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9D, 0xEA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x69, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7D, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x28, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x46, 0xE7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x11, 0xFC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x26, 0xC9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xDE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xAB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0xD1, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xB1, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x91, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0x83, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3A, 0x65, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1A, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xFA, 0x29, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0E, 0xF6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xDA, 0x0B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x12, 0x80, 0x00, 0x00, 0x00, 0x00, 0x48, 0xC3, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0xF4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xA3, 0x09, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0xD6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x82, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x62, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x9A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x22, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xEB, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xCB, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xAB, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xC0, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x8B, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA9, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x6B, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x89, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x54, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x69, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x34, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0xE3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x13, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0xC5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0xF3, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0xD3, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0xBC, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x9C, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x7C, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x5C, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x71, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x3C, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x5A, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x72, 0x1C, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x3A, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x74, 0x05, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x1A, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x75, 0xE5, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xFA, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x77, 0xC5, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xA5, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0xD2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x84, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x6E, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x4D, 0xE6, 0x10, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00,
+0x00, 0x00, 0x15, 0x18, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30,
+0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0E, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x12, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x05, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x57, 0x41, 0x54, 0x00, 0x53, 0x41, 0x53,
+0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x57, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x54, 0x2D, 0x31, 0x57,
+0x41, 0x53, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0x66, 0xE5, 0x25, 0x01, 0x2C, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00,
/* America/Adak */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2182,102 +2316,105 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50,
0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48,
0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x21, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xF9,
-0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x5A, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44,
-0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x22,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x33,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x15,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xF7,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x47, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xD9,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xF6,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x24, 0x36, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xD8,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xBA,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFF, 0x09, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x9C,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x7E,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x9A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x7C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x5E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xAE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x40,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x22,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x72, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0x33, 0x04,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x21,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFC, 0x03,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xE5,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xC7,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0xA9,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xC5,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0xA7,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x89,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0xA6,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x88,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x6A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x86,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x68,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x4A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x2C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x0E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xF0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x56, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1F, 0x0D,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xEF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xD1,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xB3,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x95,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xFA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xB1,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xDC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x93,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x75,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x57,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x39,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x1B,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x38,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x1A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xFC,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xDE,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0x16, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xC0,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xDC,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDF, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xBE,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xE9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0xA0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x82,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x64,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x8F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x46,
-0xB0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x00, 0x00, 0xAB, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0x5A, 0x62, 0x00, 0x00, 0xFF,
-0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01,
-0x0C, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x73,
-0x60, 0x00, 0x18, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x1D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x19, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42,
-0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD8, 0x7D,
-0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x65, 0x75, 0x74, 0x69, 0x61,
-0x6E, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xF9, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x5A, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x33, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x15, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB2, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xF7, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x47, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x36, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xD8, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xBA, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFF, 0x09, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x9C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x9A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x7C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x5E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0xAE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x40, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x22, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x72, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0x33, 0x04, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x21, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFC, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC7, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xE5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xC7, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x90, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0xA9, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xC5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0xA7, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x89, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x88, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x6A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x86, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x56, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1F, 0x0D, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA5, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xD1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xFA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xB1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xDC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x93, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x75, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x57, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x39, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x1B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xFC, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xDE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x16, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDF, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xBE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xE9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0xA0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x82, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x64, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x8F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x46, 0xB0, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
+0xAB, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0x5A, 0x62, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04,
+0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0C, 0xFF, 0xFF, 0x65, 0x50,
+0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x18, 0xFF, 0xFF,
+0x81, 0x70, 0x01, 0x1D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53,
+0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44,
+0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD8, 0x7D, 0xE0, 0x00, 0x05, 0x19, 0x72, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x65, 0x75,
+0x74, 0x69, 0x61, 0x6E, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* America/Anchorage */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2334,131 +2471,138 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x43, 0x41, 0x57, 0x54, 0x00, 0x43,
0x41, 0x50, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x41, 0x48, 0x44, 0x54, 0x00, 0x59, 0x53,
0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x2A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xE0, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87,
-0x41, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x36, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23,
-0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x42, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2,
-0x47, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x63, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88,
-0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x44, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51,
-0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x31,
-0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xDB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xE9, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xCB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xCA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0xAD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x8F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x8E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x53, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x52, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x6F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x51, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2,
-0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2,
-0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2,
-0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76,
-0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56,
-0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35,
-0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15,
-0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE,
-0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE,
-0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE,
-0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E,
-0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E,
-0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67,
-0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47,
-0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27,
-0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07,
-0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7,
-0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7,
-0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0,
-0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90,
-0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F,
-0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F,
-0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F,
-0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3,
-0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3,
-0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3,
-0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C,
-0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C,
-0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C,
-0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C,
-0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C,
-0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC,
-0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5,
-0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5,
-0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5,
-0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84,
-0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64,
-0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D,
-0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D,
-0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D,
-0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED,
-0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD,
-0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD,
-0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96,
-0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76,
-0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56,
-0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36,
-0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15,
-0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF,
-0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE,
-0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE,
-0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E,
-0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E,
-0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E,
-0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x2A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xE0, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x41, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x36, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x42, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD2, 0x47, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x63, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x44, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x31, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xDB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xE9, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xCB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xCA, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0xAD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x8F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x8E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x53, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x52, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x6F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x51, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0xC4, 0xF8,
-0x00, 0x00, 0xFF, 0xFF, 0x73, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0xFF, 0xFF,
-0x81, 0x70, 0x01, 0x08, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x0D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x12,
-0xFF, 0xFF, 0x81, 0x70, 0x01, 0x17, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x1C, 0xFF, 0xFF, 0x8F, 0x80,
-0x01, 0x20, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x43, 0x41, 0x57, 0x54, 0x00, 0x43, 0x41, 0x50, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x41,
-0x48, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
-0x00, 0xE6, 0xBD, 0x8D, 0x00, 0x2D, 0xED, 0xB4, 0x00, 0x00, 0x00, 0x0B, 0x41, 0x6C, 0x61, 0x73,
-0x6B, 0x61, 0x20, 0x54, 0x69, 0x6D, 0x65,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
+0xC4, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04,
+0xFF, 0xFF, 0x81, 0x70, 0x01, 0x08, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x0D, 0xFF, 0xFF, 0x73, 0x60,
+0x00, 0x12, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x17, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x1C, 0xFF, 0xFF,
+0x8F, 0x80, 0x01, 0x20, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x43, 0x41, 0x57, 0x54, 0x00, 0x43, 0x41, 0x50, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54,
+0x00, 0x41, 0x48, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41,
+0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0xE6, 0xBD, 0x8D, 0x00, 0x2D, 0xED, 0xB4, 0x00, 0x00, 0x00, 0x13, 0x41, 0x6C, 0x61, 0x73,
+0x6B, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Anguilla */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA5, 0x19, 0xA0, 0x00, 0xB2,
-0x6D, 0x15, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA5, 0x19, 0xA0, 0x00, 0xB2, 0x6D, 0x15, 0x00, 0x00, 0x00, 0x00,
/* America/Antigua */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA3, 0x58, 0x68, 0x00, 0xB4,
-0x5B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA3, 0x58, 0x68, 0x00, 0xB4, 0x5B, 0xE0, 0x00, 0x00, 0x00, 0x00,
/* America/Araguaina */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2482,41 +2626,44 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0xFF, 0xFF, 0xD2, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0,
0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x74,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x6A,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xC1,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x68,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x2C,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xF0,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x83, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x39,
-0xA0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xD2, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
-0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00,
-0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x74, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x83, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x39, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0xFF, 0xFF, 0xD2, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0,
+0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A,
+#endif
0x00, 0x7E, 0x57, 0xC0, 0x00, 0xC9, 0x1C, 0x60, 0x00, 0x00, 0x00, 0x09, 0x54, 0x6F, 0x63, 0x61,
0x6E, 0x74, 0x69, 0x6E, 0x73,
@@ -2546,52 +2693,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x34, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xA8, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92,
-0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A,
-0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4,
-0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5,
-0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96,
-0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78,
-0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A,
-0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B,
-0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C,
-0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE,
-0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0,
-0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D,
-0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D,
-0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29,
-0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D,
-0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05,
-0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6,
-0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7,
-0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3,
-0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC,
-0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C,
-0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3,
-0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94,
-0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37,
-0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21,
-0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00,
-0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0,
-0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6,
-0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77,
-0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA,
-0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xA8, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC9, 0x34, 0x00, 0x00, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00,
-0x54, 0x88, 0xA0, 0x00, 0xB9, 0x78, 0x78, 0x00, 0x00, 0x00, 0x15, 0x42, 0x75, 0x65, 0x6E, 0x6F,
-0x73, 0x20, 0x41, 0x69, 0x72, 0x65, 0x73, 0x20, 0x28, 0x42, 0x41, 0x2C, 0x20, 0x43, 0x46, 0x29,
-
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC9, 0x34, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D,
+0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33,
+0x0A,
+#endif
+0x00, 0x54, 0x88, 0xA0, 0x00, 0xB9, 0x78, 0x78, 0x00, 0x00, 0x00, 0x15, 0x42, 0x75, 0x65, 0x6E,
+0x6F, 0x73, 0x20, 0x41, 0x69, 0x72, 0x65, 0x73, 0x20, 0x28, 0x42, 0x41, 0x2C, 0x20, 0x43, 0x46,
+0x29,
/* America/Argentina/Catamarca */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2621,53 +2771,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0x2C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2,
-0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x5D, 0xE4, 0x75, 0x00, 0xAE, 0x47,
-0xE2, 0x00, 0x00, 0x00, 0x1B, 0x43, 0x61, 0x74, 0x61, 0x6D, 0x61, 0x72, 0x63, 0x61, 0x20, 0x28,
-0x43, 0x54, 0x29, 0x2C, 0x20, 0x43, 0x68, 0x75, 0x62, 0x75, 0x74, 0x20, 0x28, 0x43, 0x48, 0x29,
-
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0x54, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x5D, 0xE4, 0x75, 0x00, 0xAE, 0x47, 0xE2, 0x00, 0x00, 0x00, 0x1B, 0x43, 0x61, 0x74, 0x61,
+0x6D, 0x61, 0x72, 0x63, 0x61, 0x20, 0x28, 0x43, 0x54, 0x29, 0x3B, 0x20, 0x43, 0x68, 0x75, 0x62,
+0x75, 0x74, 0x20, 0x28, 0x43, 0x48, 0x29,
/* America/Argentina/ComodRivadavia */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2697,51 +2850,54 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0x2C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2,
-0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0x54, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Argentina/Cordoba */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2771,54 +2927,58 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAD, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC3,
-0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x59, 0x6A, 0xA0, 0x00, 0xB0, 0xB8,
-0xE2, 0x00, 0x00, 0x00, 0x2F, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69,
-0x6F, 0x6E, 0x73, 0x20, 0x28, 0x43, 0x42, 0x2C, 0x20, 0x43, 0x43, 0x2C, 0x20, 0x43, 0x4E, 0x2C,
-0x20, 0x45, 0x52, 0x2C, 0x20, 0x46, 0x4D, 0x2C, 0x20, 0x4D, 0x4E, 0x2C, 0x20, 0x53, 0x45, 0x2C,
-0x20, 0x53, 0x46, 0x29,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAD, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x59, 0x6A, 0xA0, 0x00, 0xB0, 0xB8, 0xE2, 0x00, 0x00, 0x00, 0x36, 0x41, 0x72, 0x67, 0x65,
+0x6E, 0x74, 0x69, 0x6E, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61,
+0x73, 0x3A, 0x20, 0x43, 0x42, 0x2C, 0x20, 0x43, 0x43, 0x2C, 0x20, 0x43, 0x4E, 0x2C, 0x20, 0x45,
+0x52, 0x2C, 0x20, 0x46, 0x4D, 0x2C, 0x20, 0x4D, 0x4E, 0x2C, 0x20, 0x53, 0x45, 0x2C, 0x20, 0x53,
+0x46, 0x29,
/* America/Argentina/Jujuy */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2848,52 +3008,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C,
0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2,
-0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7,
-0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA,
-0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC,
-0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE,
-0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
-0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2,
-0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4,
-0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5,
-0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07,
-0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37,
-0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x04,
-0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xC8, 0x00, 0x00, 0xFF, 0xFF, 0xC3,
-0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF,
-0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
-0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
-0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xC8, 0x00, 0x00, 0xFF, 0xFF,
+0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
+0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF,
+0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x64, 0x6D, 0xA2, 0x00, 0xAF, 0x04,
-0xB0, 0x00, 0x00, 0x00, 0x0A, 0x4A, 0x75, 0x6A, 0x75, 0x79, 0x20, 0x28, 0x4A, 0x59, 0x29,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x64, 0x6D, 0xA2, 0x00, 0xAF, 0x04, 0xB0, 0x00, 0x00, 0x00, 0x0A, 0x4A, 0x75, 0x6A, 0x75,
+0x79, 0x20, 0x28, 0x4A, 0x59, 0x29,
/* America/Argentina/La_Rioja */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2923,53 +3086,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0,
0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52,
0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x72, 0x9C, 0xB0, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCD, 0xB5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x26, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB0, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCD, 0xB5, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x26, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC1, 0x54, 0x00,
-0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5,
-0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x5C, 0x6A, 0xDA, 0x00, 0xAC, 0xA7, 0x38, 0x00,
-0x00, 0x00, 0x0D, 0x4C, 0x61, 0x20, 0x52, 0x69, 0x6F, 0x6A, 0x61, 0x20, 0x28, 0x4C, 0x52, 0x29,
-
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06,
+0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC1, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF,
+0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
+0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
+0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x5C, 0x6A, 0xDA, 0x00, 0xAC, 0xA7, 0x38, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x61, 0x20, 0x52,
+0x69, 0x6F, 0x6A, 0x61, 0x20, 0x28, 0x4C, 0x52, 0x29,
/* America/Argentina/Mendoza */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3000,53 +3165,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54,
0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57,
0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x72, 0x9C, 0xB2, 0x04, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x19, 0x34, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xCD, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xFA, 0x67, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0, 0xE1, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xB0, 0x13, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x56, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x04, 0x05, 0x03, 0x05, 0x06,
-0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0x7C, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
-0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5,
-0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
-0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x57, 0x27, 0x32, 0x00, 0xA9, 0xA6, 0xFD, 0x00, 0x00, 0x00,
-0x0C, 0x4D, 0x65, 0x6E, 0x64, 0x6F, 0x7A, 0x61, 0x20, 0x28, 0x4D, 0x5A, 0x29,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB2, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x19, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCD, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xFA, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xE1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xB0, 0x13, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x56, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0x7C, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52,
+0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x57, 0x27, 0x32, 0x00, 0xA9, 0xA6, 0xFD, 0x00, 0x00, 0x00, 0x0C, 0x4D, 0x65, 0x6E, 0x64,
+0x6F, 0x7A, 0x61, 0x20, 0x28, 0x4D, 0x5A, 0x29,
/* America/Argentina/Rio_Gallegos */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3076,52 +3244,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB2, 0x64, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF,
-0x1C, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x3A, 0x8A, 0xFA, 0x00, 0xA9, 0x0A,
-0xBD, 0x00, 0x00, 0x00, 0x0F, 0x53, 0x61, 0x6E, 0x74, 0x61, 0x20, 0x43, 0x72, 0x75, 0x7A, 0x20,
-0x28, 0x53, 0x43, 0x29,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB2, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0x1C, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x3A, 0x8A, 0xFA, 0x00, 0xA9, 0x0A, 0xBD, 0x00, 0x00, 0x00, 0x0F, 0x53, 0x61, 0x6E, 0x74,
+0x61, 0x20, 0x43, 0x72, 0x75, 0x7A, 0x20, 0x28, 0x53, 0x43, 0x29,
/* America/Argentina/Salta */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3150,51 +3321,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5,
0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00,
-0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x72, 0x9C, 0xAE, 0xD4, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04,
-0x05, 0xFF, 0xFF, 0xC2, 0xAC, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF,
-0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53,
-0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x63, 0x83,
-0x42, 0x00, 0xAE, 0xD7, 0x1D, 0x00, 0x00, 0x00, 0x10, 0x28, 0x53, 0x41, 0x2C, 0x20, 0x4C, 0x50,
-0x2C, 0x20, 0x4E, 0x51, 0x2C, 0x20, 0x52, 0x4E, 0x29,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xD4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xAC, 0x00, 0x00, 0xFF, 0xFF,
+0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
+0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00,
+0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41,
+0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x63, 0x83, 0x42, 0x00, 0xAE, 0xD7, 0x1D, 0x00, 0x00, 0x00, 0x16, 0x53, 0x61, 0x6C, 0x74,
+0x61, 0x20, 0x28, 0x53, 0x41, 0x2C, 0x20, 0x4C, 0x50, 0x2C, 0x20, 0x4E, 0x51, 0x2C, 0x20, 0x52,
+0x4E, 0x29,
/* America/Argentina/San_Juan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3224,53 +3399,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0,
0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52,
0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x72, 0x9C, 0xB1, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCD, 0xB5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x26, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x40, 0xBA, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB1, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCD, 0xB5, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x26, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xBA, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0xC4, 0x00,
-0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5,
-0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x59, 0x36, 0x8A, 0x00, 0xAA, 0x1C, 0x2D, 0x00,
-0x00, 0x00, 0x0D, 0x53, 0x61, 0x6E, 0x20, 0x4A, 0x75, 0x61, 0x6E, 0x20, 0x28, 0x53, 0x4A, 0x29,
-
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06,
+0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0xC4, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF,
+0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
+0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
+0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x59, 0x36, 0x8A, 0x00, 0xAA, 0x1C, 0x2D, 0x00, 0x00, 0x00, 0x0D, 0x53, 0x61, 0x6E, 0x20,
+0x4A, 0x75, 0x61, 0x6E, 0x20, 0x28, 0x53, 0x4A, 0x29,
/* America/Argentina/San_Luis */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3301,53 +3478,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x16, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00,
0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41,
0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
-0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
-0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C,
-0xAF, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B,
-0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E,
-0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17,
-0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8,
-0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9,
-0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB,
-0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D,
-0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E,
-0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60,
-0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41,
-0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81,
-0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE,
-0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0,
-0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43,
-0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F,
-0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32,
-0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13,
-0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4,
-0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3,
-0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC,
-0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C,
-0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24,
-0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10,
-0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xFD,
-0xA5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x19, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCD,
-0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x47, 0x1B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6,
-0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xBA,
-0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77,
-0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x93, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3,
-0x52, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3,
-0x34, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xFD, 0xA5, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x19, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCD, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x47, 0x1B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xBA, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x03, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x93, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x52, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x34, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xD1, 0x58, 0x40, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x05, 0x07,
-0x05, 0x06, 0x05, 0x04, 0x07, 0x06, 0x07, 0x06, 0x05, 0xFF, 0xFF, 0xC1, 0xCC, 0x00, 0x00, 0xFF,
-0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
-0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
-0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52,
-0x54, 0x33, 0x0A, 0x00, 0x56, 0x7D, 0xED, 0x00, 0xAD, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x0D, 0x53,
-0x61, 0x6E, 0x20, 0x4C, 0x75, 0x69, 0x73, 0x20, 0x28, 0x53, 0x4C, 0x29,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x05, 0x07, 0x05, 0x06, 0x05, 0x04, 0x07, 0x06,
+0x07, 0x06, 0x05, 0xFF, 0xFF, 0xC1, 0xCC, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF,
+0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
+0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5,
+0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54,
+0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x56, 0x7D, 0xED, 0x00, 0xAD, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x0D, 0x53, 0x61, 0x6E, 0x20,
+0x4C, 0x75, 0x69, 0x73, 0x20, 0x28, 0x53, 0x4C, 0x29,
/* America/Argentina/Tucuman */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3377,53 +3557,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41,
0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xFF,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xBB, 0xF1,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xCB, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xA2,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04,
-0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xDC, 0x00, 0x00, 0xFF,
-0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
-0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54,
-0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x60, 0x68, 0xFD, 0x00, 0xAF, 0x25, 0x3D, 0x00, 0x00, 0x00,
-0x0C, 0x54, 0x75, 0x63, 0x75, 0x6D, 0x61, 0x6E, 0x20, 0x28, 0x54, 0x4D, 0x29,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xCB, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xDC,
+0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF,
+0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08,
+0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x60, 0x68, 0xFD, 0x00, 0xAF, 0x25, 0x3D, 0x00, 0x00, 0x00, 0x0C, 0x54, 0x75, 0x63, 0x75,
+0x6D, 0x61, 0x6E, 0x20, 0x28, 0x54, 0x4D, 0x29,
/* America/Argentina/Ushuaia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3453,52 +3636,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB1, 0x88, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x40, 0xB9, 0x4E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF,
-0xF8, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x35, 0xB6, 0x00, 0x00, 0xAA, 0x70,
-0xD0, 0x00, 0x00, 0x00, 0x15, 0x54, 0x69, 0x65, 0x72, 0x72, 0x61, 0x20, 0x64, 0x65, 0x6C, 0x20,
-0x46, 0x75, 0x65, 0x67, 0x6F, 0x20, 0x28, 0x54, 0x46, 0x29,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB1, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xB9, 0x4E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0xF8, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x35, 0xB6, 0x00, 0x00, 0xAA, 0x70, 0xD0, 0x00, 0x00, 0x00, 0x15, 0x54, 0x69, 0x65, 0x72,
+0x72, 0x61, 0x20, 0x64, 0x65, 0x6C, 0x20, 0x46, 0x75, 0x65, 0x67, 0x6F, 0x20, 0x28, 0x54, 0x46,
+0x29,
/* America/Aruba */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3506,14 +3693,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x93, 0x1E, 0x2E, 0x23, 0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00,
0x00, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xB8,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0,
+0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34,
+0x0A,
+#endif
0x00, 0x9C, 0x67, 0x10, 0x00, 0xA7, 0xE5, 0xC5, 0x00, 0x00, 0x00, 0x00,
/* America/Asuncion */
@@ -3564,75 +3754,76 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF,
0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x50, 0x59, 0x54,
0x00, 0x50, 0x59, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0x17, 0xF5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x07, 0xFC, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0x97, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xF9, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0x78, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x93, 0x2D, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0x5A, 0x31, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x60, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x64, 0x43, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x94, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x46, 0xC8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x38, 0x19, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x27, 0xFC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x4C, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x09, 0x2F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x80, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xEA, 0x63, 0x30, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0xB3, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0xE8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x38, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAE, 0x1B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x6C, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8F, 0x4F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x9F, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x70, 0x82, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0xD3, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x53, 0x07, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x58, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x34, 0x3B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x41, 0x3B, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0x6E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0xBF, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF6, 0xA2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCF, 0xBD, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB9, 0x09, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0xAB, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x70, 0x0C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xDE, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x4F, 0xEE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6E, 0x12, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x36, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x0F, 0xB2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x37, 0x10, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0xF2, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xE1, 0xEB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xC1, 0xCD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD6, 0xB6, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xA1, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0xD3, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xAF, 0xB6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0x90, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0x98, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0xAD, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0x7A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x71, 0xEE, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x1A, 0xCE, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xD3, 0x52, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xB3, 0x34, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xC1, 0x3B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0xA1, 0x1D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x80, 0xFF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x4E, 0x6C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x2E, 0x4E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x0E, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xF7, 0x4C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xD7, 0x2E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xB7, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x96, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x76, 0xD4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x5F, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x3F, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x1F, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xFF, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xDF, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0xED, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xBF, 0x5B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0xCF, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xA8, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0xB1, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x88, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x81, 0x93, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x68, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0xAF, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x48, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x4A, 0x91, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x27, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x2A, 0x73, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x11, 0x1C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x76, 0x0A, 0x55, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xF0, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x77, 0xEA, 0x37, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xD0, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xCA, 0x19, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xB0, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB3, 0x36, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x90, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x93, 0x18, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x70, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xFA, 0x40, 0x00, 0x01,
-0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x17, 0xF5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xDA, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xFC, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x97, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x78, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x93, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x5A, 0x31, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x43, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x46, 0xC8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x38, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xFC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x4C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x09, 0x2F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x63, 0x30, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0xE8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAE, 0x1B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x6C, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8F, 0x4F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x70, 0x82, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x53, 0x07, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x34, 0x3B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x41, 0x3B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x6E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF6, 0xA2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCF, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB9, 0x09, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x70, 0x0C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xDE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x4F, 0xEE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6E, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x36, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x0F, 0xB2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x37, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xE1, 0xEB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xC1, 0xCD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD6, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xA1, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0xD3, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xB6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0x90, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0x98, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0xAD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0x7A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x71, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x1A, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x52, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x34, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xC1, 0x3B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0xA1, 0x1D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0xE1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x80, 0xFF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x4E, 0x6C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x2E, 0x4E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0xC2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x0E, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0xA4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x4C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xF0, 0x86, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x2E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xD0, 0x68, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB7, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB9, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x96, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x99, 0x66, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x76, 0xD4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x79, 0x48, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x59, 0x2A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x63, 0x39, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0xEE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xFF, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0x02, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xDF, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xBF, 0x5B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0xCF, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0xB1, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x81, 0x93, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x48, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x4A, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x27, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x2A, 0x73, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x1C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x76, 0x0A, 0x55, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x77, 0xEA, 0x37, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xCA, 0x19, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB3, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x90, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x93, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x70, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0xFA, 0x40, 0x00, 0x01, 0x02, 0x03,
0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
@@ -3640,13 +3831,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF,
-0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x50, 0x59, 0x54, 0x00,
-0x50, 0x59, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x50, 0x59, 0x54, 0x34, 0x50, 0x59, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31,
-0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00, 0x62,
-0xC6, 0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0xFF, 0xFF,
+0xC9, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xF0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x50, 0x59, 0x54, 0x00, 0x50, 0x59,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x50, 0x59, 0x54, 0x34, 0x50, 0x59, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30,
+0x2F, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x30, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x62, 0xC6, 0x75, 0x00, 0xBA, 0xAA, 0x75, 0x00, 0x00, 0x00, 0x00,
/* America/Atikokan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3658,24 +3851,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
0xB0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xEE, 0x84, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x05, 0xFF, 0xFF, 0xAA, 0x1C, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43,
-0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00, 0xD3, 0xBA, 0x95, 0x00, 0x86, 0xDA,
-0xC9, 0x00, 0x00, 0x00, 0x44, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x53, 0x74, 0x61,
-0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x41, 0x74, 0x69,
-0x6B, 0x6F, 0x6B, 0x61, 0x6E, 0x2C, 0x20, 0x4F, 0x6E, 0x74, 0x61, 0x72, 0x69, 0x6F, 0x20, 0x61,
-0x6E, 0x64, 0x20, 0x53, 0x6F, 0x75, 0x74, 0x68, 0x61, 0x6D, 0x70, 0x74, 0x6F, 0x6E, 0x20, 0x49,
-0x2C, 0x20, 0x4E, 0x75, 0x6E, 0x61, 0x76, 0x75, 0x74,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x84, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x03, 0x04, 0x05, 0xFF, 0xFF, 0xAA, 0x1C, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
+0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x45, 0x53, 0x54,
+0x35, 0x0A,
+#endif
+0x00, 0xD3, 0xBA, 0x95, 0x00, 0x86, 0xDA, 0xC9, 0x00, 0x00, 0x00, 0x21, 0x45, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x4F, 0x4E, 0x20, 0x28, 0x41, 0x74, 0x69, 0x6B, 0x6F, 0x6B, 0x61, 0x6E, 0x29, 0x3B,
+0x20, 0x4E, 0x55, 0x20, 0x28, 0x43, 0x6F, 0x72, 0x61, 0x6C, 0x20, 0x48, 0x29,
/* America/Atka */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3732,101 +3926,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50,
0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48,
0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x21, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xF9,
-0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x5A, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44,
-0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x22,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x33,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x15,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xF7,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x47, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xD9,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xF6,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x24, 0x36, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xD8,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xBA,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFF, 0x09, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x9C,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x7E,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x9A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x7C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x5E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xAE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x40,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x22,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x72, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0x33, 0x04,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x21,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFC, 0x03,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xE5,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xC7,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0xA9,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xC5,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0xA7,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x89,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0xA6,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x88,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x6A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x86,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x68,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x4A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x2C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x0E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xF0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x56, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1F, 0x0D,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xEF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xD1,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xB3,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x95,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xFA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xB1,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xDC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x93,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x75,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x57,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x39,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x1B,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x38,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x1A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xFC,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xDE,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0x16, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xC0,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xDC,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDF, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xBE,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xE9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0xA0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x82,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x64,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x8F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x46,
-0xB0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x00, 0x00, 0xAB, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0x5A, 0x62, 0x00, 0x00, 0xFF,
-0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01,
-0x0C, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x73,
-0x60, 0x00, 0x18, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x1D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x19, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42,
-0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xF9, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x5A, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x33, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x15, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB2, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xF7, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x47, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x36, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xD8, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xBA, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFF, 0x09, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x9C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x9A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x7C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x5E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0xAE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x40, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x22, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x72, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0x33, 0x04, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x21, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFC, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC7, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xE5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xC7, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x90, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0xA9, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xC5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0xA7, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x89, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x88, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x6A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x86, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x56, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1F, 0x0D, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA5, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xD1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xFA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xB1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xDC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x93, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x75, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x57, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x39, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x1B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xFC, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xDE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x16, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDF, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xBE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xE9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0xA0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x82, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x64, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x8F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x46, 0xB0, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
+0xAB, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0x5A, 0x62, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04,
+0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0C, 0xFF, 0xFF, 0x65, 0x50,
+0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x18, 0xFF, 0xFF,
+0x81, 0x70, 0x01, 0x1D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53,
+0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44,
+0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Bahia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3853,48 +4050,52 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0xFF, 0xFF, 0xDB, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF,
0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96,
-0xAA, 0x6B, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA,
-0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC,
-0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE,
-0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
-0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5,
-0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xBD, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x94, 0x8B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0x6B, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC0, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x66, 0xC4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA0, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x46, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x1D, 0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x06, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34,
-0xF8, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xCF, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0x8F, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0x6F, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x4E, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x9A, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x49, 0x92, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0xDB, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x75, 0x84, 0xA2,
-0x00, 0xD7, 0xE2, 0xED, 0x00, 0x00, 0x00, 0x05, 0x42, 0x61, 0x68, 0x69, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x6B, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94, 0x8B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xC4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA0, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x9A, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49, 0x92, 0x20, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB, 0xE4, 0x00, 0x00,
+0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x42, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x75, 0x84, 0xA2, 0x00, 0xD7, 0xE2, 0xED, 0x00, 0x00, 0x00, 0x05, 0x42, 0x61, 0x68, 0x69,
+0x61,
/* America/Bahia_Banderas */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3934,72 +4135,75 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x71, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x41, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x23, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x71, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x91, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x04, 0x01, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0xFF, 0xFF, 0x9D, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF,
-0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14,
-0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53,
-0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54,
-0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x0A, 0x00, 0xA9, 0x11, 0x40, 0x00, 0x72, 0x0F, 0x38, 0x00, 0x00, 0x00, 0x28,
-0x4D, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6E, 0x20, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20,
-0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x42, 0x61, 0x68, 0x69, 0x61, 0x20, 0x64, 0x65, 0x20,
-0x42, 0x61, 0x6E, 0x64, 0x65, 0x72, 0x61, 0x73,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0xFF, 0xFF, 0x9D, 0x54, 0x00, 0x00,
+0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80,
+0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF,
+0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
+0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43,
+0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0xA9, 0x11, 0x40, 0x00, 0x72, 0x0F, 0x38, 0x00, 0x00, 0x00, 0x20, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x42, 0x61, 0x68, 0x69, 0x61,
+0x20, 0x64, 0x65, 0x20, 0x42, 0x61, 0x6E, 0x64, 0x65, 0x72, 0x61, 0x73,
/* America/Barbados */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4011,20 +4215,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0xFF, 0xFF, 0xC8, 0x1B, 0x00, 0x00, 0xFF, 0xFF, 0xC8, 0x1B, 0x00, 0x04, 0xFF,
0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x79, 0x24, 0xE5, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0x85, 0x63, 0xE5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xF2, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0x94, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x97, 0x00, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x74, 0x6E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x76, 0xE2, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x54, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x5F, 0xFF, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x30, 0x3E, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0xFF, 0xFF, 0xC8, 0x1B, 0x00, 0x00, 0xFF, 0xFF, 0xC8, 0x1B, 0x00, 0x04, 0xFF, 0xFF,
-0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D,
-0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0x9D, 0x51, 0x70, 0x00, 0xB7, 0xB0, 0xBD,
-0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x79, 0x24, 0xE5, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x85, 0x63, 0xE5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x94, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x97, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x74, 0x6E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x76, 0xE2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x54, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x5F, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x30, 0x3E, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF,
+0xFF, 0xC8, 0x1B, 0x00, 0x00, 0xFF, 0xFF, 0xC8, 0x1B, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x41,
+0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x9D, 0x51, 0x70, 0x00, 0xB7, 0xB0, 0xBD, 0x00, 0x00, 0x00, 0x00,
/* America/Belem */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4041,31 +4248,34 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0xFF, 0xFF, 0xD2, 0x8C, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF,
0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96,
-0xAA, 0x74, 0x74, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA,
-0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC,
-0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE,
-0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
-0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5,
-0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x0B, 0xC8, 0xA0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0xD2, 0x8C, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x87, 0x1D, 0xD8,
-0x00, 0xC8, 0xAD, 0xB2, 0x00, 0x00, 0x00, 0x0D, 0x41, 0x6D, 0x61, 0x70, 0x61, 0x2C, 0x20, 0x45,
-0x20, 0x50, 0x61, 0x72, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x74, 0x74, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xD2, 0x8C, 0x00, 0x00,
+0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x42, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x87, 0x1D, 0xD8, 0x00, 0xC8, 0xAD, 0xB2, 0x00, 0x00, 0x00, 0x12, 0x50, 0x61, 0x72, 0x61,
+0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29, 0x3B, 0x20, 0x41, 0x6D, 0x61, 0x70, 0x61,
/* America/Belize */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4091,44 +4301,47 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xAD, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xB2, 0xA8, 0x01, 0x04,
0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00,
0x43, 0x48, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x5E, 0xD9,
-0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9F, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x45, 0x51,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7F, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x6E,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x5E, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x0E, 0x50,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3E, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xEE, 0x32,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xFE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xCE, 0x14,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x07, 0xE0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xAD, 0xF6,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0xC2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0x97, 0x12,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0xA4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0x76, 0xF4,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x86, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x56, 0xD6,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x68, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x36, 0xB8,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x84, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x16, 0x9A,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0xF6, 0x7C,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xDF, 0x99,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xBF, 0x7B,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x9F, 0x5D,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD9, 0x29, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x7F, 0x3F,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x5F, 0x21,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xED, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x3F, 0x03,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0xCF, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x28, 0x1F,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0xB1, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x08, 0x01,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xE7, 0xE3,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xC7, 0xC5,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x01, 0x91, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xA7, 0xA7,
-0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE1, 0x73, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x90, 0xC4,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xC1, 0x55, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x70, 0xA6,
-0x58, 0x00, 0x00, 0x00, 0x00, 0x07, 0x62, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0xB9, 0xD0,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0x61, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xAB, 0x37,
-0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xAD, 0x50, 0x00, 0x00, 0xFF,
-0xFF, 0xB2, 0xA8, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
-0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x5E, 0xD9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x9F, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x45, 0x51, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x7F, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x6E, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x5E, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x0E, 0x50, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x3E, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xEE, 0x32, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0xFE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xCE, 0x14, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x07, 0xE0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xAD, 0xF6, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE7, 0xC2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0x97, 0x12, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC7, 0xA4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0x76, 0xF4, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x86, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x56, 0xD6, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x68, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x36, 0xB8, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x84, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x16, 0x9A, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0xF6, 0x7C, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xDF, 0x99, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xBF, 0x7B, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x9F, 0x5D, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD9, 0x29, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x7F, 0x3F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x5F, 0x21, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0xED, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x3F, 0x03, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0xCF, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x28, 0x1F, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0xB1, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x08, 0x01, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xE7, 0xE3, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xC7, 0xC5, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x01, 0x91, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xA7, 0xA7, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE1, 0x73, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x90, 0xC4, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xC1, 0x55, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x70, 0xA6, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x62, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0xB9, 0xD0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x61, 0x71, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xAB, 0x37, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xAD, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xB2, 0xA8, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x48, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
0x00, 0xA4, 0x08, 0x30, 0x00, 0x8C, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00,
/* America/Blanc-Sablon */
@@ -4140,22 +4353,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00,
0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D,
-0x39, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA,
-0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23,
-0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xED, 0xD0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x02, 0xFF, 0xFF, 0xCA, 0x74, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53,
-0x54, 0x34, 0x0A, 0x00, 0xD7, 0xC8, 0xE2, 0x00, 0xBB, 0x81, 0x4D, 0x00, 0x00, 0x00, 0x33, 0x41,
-0x74, 0x6C, 0x61, 0x6E, 0x74, 0x69, 0x63, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x51, 0x75, 0x65, 0x62, 0x65, 0x63, 0x20, 0x2D,
-0x20, 0x4C, 0x6F, 0x77, 0x65, 0x72, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x53, 0x68, 0x6F,
-0x72, 0x65,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x39, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xED, 0xD0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0xFF, 0xFF, 0xCA, 0x74, 0x00,
+0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5,
+0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xD7, 0xC8, 0xE2, 0x00, 0xBB, 0x81, 0x4D, 0x00, 0x00, 0x00, 0x1C, 0x41, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x51, 0x43, 0x20, 0x28, 0x4C, 0x6F, 0x77, 0x65, 0x72, 0x20, 0x4E, 0x6F, 0x72, 0x74,
+0x68, 0x20, 0x53, 0x68, 0x6F, 0x72, 0x65, 0x29,
/* America/Boa_Vista */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4173,33 +4387,36 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0x20, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0,
0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54,
-0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x57, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x42, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xBC, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xEF, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x23, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xA8, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x0D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x72, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x3A, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xE0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x14, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x9C, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x43, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xB8, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xF1, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xE9, 0x1D, 0xB0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0x20, 0x00, 0x00, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41,
-0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41,
-0x4D, 0x54, 0x34, 0x0A, 0x00, 0x8D, 0xA0, 0x82, 0x00, 0xB6, 0x16, 0x95, 0x00, 0x00, 0x00, 0x07,
-0x52, 0x6F, 0x72, 0x61, 0x69, 0x6D, 0x61,
+0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xF1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x1D, 0xB0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF,
+0xC7, 0x20, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09,
+0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x8D, 0xA0, 0x82, 0x00, 0xB6, 0x16, 0x95, 0x00, 0x00, 0x00, 0x07, 0x52, 0x6F, 0x72, 0x61,
+0x69, 0x6D, 0x61,
/* America/Bogota */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4209,16 +4426,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xBA, 0x90, 0x00, 0x00, 0xFF, 0xFF, 0xBA, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00,
0x43, 0x4F, 0x53, 0x54, 0x00, 0x43, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x9C, 0x34, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0x98, 0x58, 0x55, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x03, 0x73, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xBE, 0x5D, 0x40, 0x00, 0x01, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xBA, 0x90, 0x00, 0x00,
-0xFF, 0xFF, 0xBA, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x4F, 0x53, 0x54, 0x00, 0x43,
-0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x4F, 0x54, 0x35,
-0x0A, 0x00, 0x90, 0x59, 0x20, 0x00, 0xA1, 0x9D, 0xB2, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x9C, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x98, 0x58, 0x55, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x03, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x5D, 0x40, 0x00, 0x01, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xBA, 0x90, 0x00, 0x00, 0xFF,
+0xFF, 0xBA, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x4F, 0x53, 0x54, 0x00, 0x43, 0x4F,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x4F, 0x54, 0x35, 0x0A,
+#endif
+0x00, 0x90, 0x59, 0x20, 0x00, 0xA1, 0x9D, 0xB2, 0x00, 0x00, 0x00, 0x00,
/* America/Boise */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4276,105 +4496,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x90, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54,
0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54,
0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA8, 0x46, 0x4C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x3A, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x1C, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xFE, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x1A, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xB2, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xA2, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xBF, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xA1, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x83, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x65, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0x93, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
-0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF,
-0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
-0x18, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
-0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37,
-0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0xCB, 0xE0, 0xD1, 0x00, 0x61, 0x58, 0xE6, 0x00, 0x00, 0x00, 0x29, 0x4D,
-0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x73,
-0x6F, 0x75, 0x74, 0x68, 0x20, 0x49, 0x64, 0x61, 0x68, 0x6F, 0x20, 0x26, 0x20, 0x65, 0x61, 0x73,
-0x74, 0x20, 0x4F, 0x72, 0x65, 0x67, 0x6F, 0x6E,
+0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x46, 0x4C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xB2, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x05, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0x93, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04,
+0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
+0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x18, 0x4C, 0x4D,
+0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50,
+0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54,
+0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xCB, 0xE0, 0xD1, 0x00, 0x61, 0x58, 0xE6, 0x00, 0x00, 0x00, 0x20, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x44, 0x20, 0x28, 0x73, 0x6F, 0x75, 0x74, 0x68,
+0x29, 0x3B, 0x20, 0x4F, 0x52, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29,
/* America/Buenos_Aires */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4402,50 +4624,53 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x34, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xA8, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92,
-0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A,
-0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4,
-0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5,
-0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96,
-0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78,
-0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A,
-0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B,
-0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C,
-0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE,
-0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0,
-0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D,
-0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D,
-0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29,
-0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D,
-0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05,
-0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6,
-0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7,
-0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3,
-0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC,
-0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C,
-0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3,
-0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94,
-0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37,
-0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21,
-0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00,
-0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0,
-0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6,
-0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77,
-0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA,
-0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xA8, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC9, 0x34, 0x00, 0x00, 0xFF, 0xFF,
-0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC9, 0x34, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D,
+0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Cambridge_Bay */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4497,91 +4722,94 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x44, 0x54, 0x00, 0x4D,
0x44, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x25, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xCD,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x04, 0xE9,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C,
-0x80, 0x00, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03,
-0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03,
-0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x07,
-0x06, 0x08, 0x07, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
-0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
-0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x25, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xCD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x04, 0xE9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x03, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
-0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF,
-0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
-0x15, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x19, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x1D, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x21, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x15, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0x7A,
-0x7A, 0x7A, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x44, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D,
-0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
-0x30, 0x0A, 0x00, 0xF2, 0xC9, 0xDC, 0x00, 0x72, 0x5C, 0x42, 0x00, 0x00, 0x00, 0x1C, 0x4D, 0x6F,
-0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x77, 0x65,
-0x73, 0x74, 0x20, 0x4E, 0x75, 0x6E, 0x61, 0x76, 0x75, 0x74,
+0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x07, 0x06, 0x08, 0x07, 0x05, 0x03,
+0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03,
+0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03,
+0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03,
+0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03,
+0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x15, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x19, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x1D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x21, 0xFF, 0xFF,
+0xAB, 0xA0, 0x01, 0x15, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0x7A, 0x7A, 0x7A, 0x00, 0x4D, 0x57,
+0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x44, 0x54, 0x00, 0x4D,
+0x44, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xF2, 0xC9, 0xDC, 0x00, 0x72, 0x5C, 0x42, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x4E, 0x55, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29,
+
/* America/Campo_Grande */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4629,89 +4857,92 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0xFF, 0xFF, 0xCC, 0xCC, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7,
0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA,
-0x7A, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD,
-0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE,
-0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC,
-0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9,
-0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B,
-0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54,
-0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05,
-0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E,
-0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7,
-0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9,
-0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B,
-0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78,
-0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33,
-0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B,
-0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x1E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2,
-0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4,
-0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x1D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD,
-0xF1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94,
-0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x1B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B,
-0x40, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66,
-0xD2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA0, 0xA5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46,
-0xB4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D,
-0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06,
-0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x38, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8,
-0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x20, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF,
-0x76, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8,
-0x93, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xF1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F,
-0x3A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F,
-0x1C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xC4, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E,
-0xFE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x92, 0x0C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2E,
-0xE0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x87, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17,
-0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7,
-0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x45, 0x4D, 0x61, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0,
-0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7,
-0xA3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97,
-0x85, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80,
-0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xBA, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60,
-0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x9A, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49,
-0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x83, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20,
-0x47, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x63, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00,
-0x29, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x43, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9,
-0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0x23, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9,
-0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x02, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA9,
-0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xE2, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88,
-0xEC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xCB, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68,
-0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xAB, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48,
-0xB0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x8B, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31,
-0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x6B, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11,
-0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x4B, 0x81, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA,
-0xCB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x2B, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1,
-0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x14, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1,
-0x54, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xF4, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A,
-0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xD4, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A,
-0x53, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xB4, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A,
-0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x94, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A,
-0x17, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7D, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19,
-0xF9, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x5D, 0x06, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9,
-0xDB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x3C, 0xE8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9,
-0xBD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x76, 0x1C, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2,
-0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xFC, 0xAC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB,
-0xF6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xDC, 0x8E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82,
-0x9D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xC5, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62,
-0x7F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x8D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B,
-0x9C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x85, 0x6F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B,
-0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, 0x65, 0x51, 0x40, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xCC,
-0xCC, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x41, 0x4D, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00,
-0x6A, 0x1F, 0xF8, 0x00, 0xBF, 0x51, 0xDD, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x61, 0x74, 0x6F, 0x20,
-0x47, 0x72, 0x6F, 0x73, 0x73, 0x6F, 0x20, 0x64, 0x6F, 0x20, 0x53, 0x75, 0x6C,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7A, 0x34, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x1E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x1D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD, 0xF1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x1B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B, 0x40, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA0, 0xA5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46, 0xB4, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x38, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x20, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x76, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xF1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x3A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x1C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xC4, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xFE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x92, 0x0C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2E, 0xE0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x87, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x51, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x4D, 0x61, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7, 0xA3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97, 0x85, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xBA, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x9A, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x83, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x47, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x63, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x29, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x43, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x23, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x02, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA9, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xE2, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88, 0xEC, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xCB, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xAB, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48, 0xB0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x8B, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x6B, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x4B, 0x81, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA, 0xCB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x2B, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x14, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1, 0x54, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xF4, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xD4, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A, 0x53, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xB4, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x94, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x17, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x7D, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19, 0xF9, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x5D, 0x06, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9, 0xDB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x3C, 0xE8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9, 0xBD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x1C, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2, 0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xFC, 0xAC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xDC, 0x8E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82, 0x9D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xC5, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62, 0x7F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xA5, 0x8D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B, 0x9C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x85, 0x6F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x81, 0x65, 0x51, 0x40, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xCC, 0xCC, 0x00, 0x00, 0xFF, 0xFF, 0xD5,
+0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53,
+0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54,
+0x34, 0x41, 0x4D, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C,
+0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x6A, 0x1F, 0xF8, 0x00, 0xBF, 0x51, 0xDD, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x61, 0x74, 0x6F,
+0x20, 0x47, 0x72, 0x6F, 0x73, 0x73, 0x6F, 0x20, 0x64, 0x6F, 0x20, 0x53, 0x75, 0x6C,
/* America/Cancun */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4733,38 +4964,41 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x01, 0x03, 0xFF, 0xFF, 0xAE, 0xA8, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF,
0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
0x10, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54,
-0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x86, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35,
-0xC4, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xCD, 0xDD, 0x00, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01, 0x04,
-0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
-0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x03, 0xFF, 0xFF,
-0xAE, 0xA8, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08,
-0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
-0x43, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A,
+0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x86, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0xC4, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xCD, 0xDD, 0x00, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01,
+0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
+0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x03, 0xFF,
+0xFF, 0xAE, 0xA8, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
+0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x0A,
+#endif
0x00, 0xA9, 0x7F, 0xED, 0x00, 0x8E, 0x43, 0x45, 0x00, 0x00, 0x00, 0x24, 0x45, 0x61, 0x73, 0x74,
0x65, 0x72, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D,
0x65, 0x20, 0x2D, 0x20, 0x51, 0x75, 0x69, 0x6E, 0x74, 0x61, 0x6E, 0x61, 0x20, 0x52, 0x6F, 0x6F,
@@ -4778,17 +5012,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xC1, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xC1, 0x44, 0x00, 0x04, 0xFF, 0xFF, 0xC0, 0xB8,
0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x08, 0x4C, 0x4D,
0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x56, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1A, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x98, 0xEC, 0x48,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x5B, 0x92, 0x70, 0x00, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC1,
-0x40, 0x00, 0x00, 0xFF, 0xFF, 0xC1, 0x44, 0x00, 0x04, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x08, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x4D, 0x54, 0x00, 0x56, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x56, 0x45, 0x54, 0x34, 0x3A, 0x33, 0x30, 0x0A, 0x00, 0x99, 0x59, 0xD0, 0x00, 0xAC,
-0x86, 0xAA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0x93, 0x1E, 0x2C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x98, 0xEC, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x5B, 0x92, 0x70, 0x00, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC1, 0x40, 0x00, 0x00, 0xFF,
+0xFF, 0xC1, 0x44, 0x00, 0x04, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
+0x08, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x56,
+0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x45,
+0x54, 0x34, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0x99, 0x59, 0xD0, 0x00, 0xAC, 0x86, 0xAA, 0x00, 0x00, 0x00, 0x00,
/* America/Catamarca */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4818,51 +5055,54 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0x2C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2,
-0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAF, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xBB, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD5, 0x0B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0x54, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Cayenne */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -4870,72 +5110,36 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x91, 0xF4, 0x2B, 0x90, 0xFB, 0xC3, 0x35, 0xC0, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xCE, 0xF0, 0x00,
0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x47, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x91, 0xF4, 0x2B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0x00,
-0x01, 0x02, 0xFF, 0xFF, 0xCE, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF,
-0xD5, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x47, 0x46, 0x54, 0x33, 0x0A, 0x00, 0x90, 0xDB, 0x55, 0x00, 0xC2, 0xCD, 0xCA,
-0x00, 0x00, 0x00, 0x00,
+0x00, 0x47, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0xF4, 0x2B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xC3, 0x35, 0xC0, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xCE, 0xF0, 0x00, 0x00, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x46, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x46, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x90, 0xDB, 0x55, 0x00, 0xC2, 0xCD, 0xCA, 0x00, 0x00, 0x00, 0x00,
/* America/Cayman */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00,
-0x93, 0x0F, 0xB4, 0xFF, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0,
-0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0,
-0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70,
-0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70,
-0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70,
-0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0,
-0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0,
-0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0,
-0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70,
-0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70,
-0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70,
-0x7F, 0x98, 0x00, 0x60, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0xFF, 0xFF, 0xB3, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF,
-0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D,
-0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x27, 0xCC, 0xFF, 0xFF,
-0xFF, 0xFF, 0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB3, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54,
-0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xA6, 0xC7,
-0x50, 0x00, 0x96, 0x7A, 0x22, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
+0x8B, 0xF4, 0x61, 0xE8, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5, 0x18,
+0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00,
+0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x8B, 0xF4, 0x61, 0xE8, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5,
+0x18, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54,
+0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x0A,
+#endif
+0x00, 0xA6, 0xC7, 0x50, 0x00, 0x96, 0x7A, 0x22, 0x00, 0x00, 0x00, 0x00,
/* America/Chicago */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5019,131 +5223,133 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB, 0xA0,
0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53,
0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0xCB, 0x74, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA3, 0x83, 0xF7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x45, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0x63, 0xD9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xD9, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA7, 0x15, 0x97, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xBB, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA8, 0xFE, 0xB3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x13, 0x9D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAA, 0xDE, 0x95, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF3, 0x7F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAC, 0xBE, 0x77, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xD3, 0x61, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAE, 0x9E, 0x59, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xB3, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB0, 0x7E, 0x3B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x5F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB2, 0x67, 0x58, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x41, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB4, 0x47, 0x3A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x23, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB6, 0x27, 0x1C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3C, 0x05, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0x06, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x1B, 0xE7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB9, 0xE6, 0xE0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x05, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBB, 0xC6, 0xC2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xE6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBD, 0xAF, 0xDE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xC8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBF, 0x8F, 0xC0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0xD6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC1, 0xB0, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x8C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC5, 0x2F, 0x66, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x8A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC7, 0x0F, 0x48, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x6C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0xF8, 0x65, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x85, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0xCB, 0x74, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x83, 0xF7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x45, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x63, 0xD9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xD9, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0x97, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x33, 0xBB, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xB3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x13, 0x9D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xDE, 0x95, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xF3, 0x7F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBE, 0x77, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xD3, 0x61, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x9E, 0x59, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xB3, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x3B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x5F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x58, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x41, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x3A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x23, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x1C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3C, 0x05, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x1B, 0xE7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xE0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x05, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xC6, 0xC2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xE6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xDE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xC8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xC0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0xD6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0xB0, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x8C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x66, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x8A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x48, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x6C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x65, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x85, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x05,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -5155,15 +5361,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAD, 0xD4, 0x00, 0x00, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
-0x0A, 0x00, 0xC9, 0x2F, 0xE8, 0x00, 0x8C, 0xEA, 0x38, 0x00, 0x00, 0x00, 0x0C, 0x43, 0x65, 0x6E,
-0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65,
+0x02, 0xFF, 0xFF, 0xAD, 0xD4, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB,
+0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
+0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43,
+0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
+0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC9, 0x2F, 0xE8, 0x00, 0x8C, 0xEA, 0x38, 0x00, 0x00, 0x00, 0x14, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
+
/* America/Chihuahua */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5201,71 +5409,73 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43,
0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5,
-0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6,
-0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x98, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAD, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x78, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x61, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x41, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x20, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57,
-0x00, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xE0, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x8A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xC0, 0x9F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x6C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA9, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x4E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x89, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x69, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x49, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x29, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x12, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xF2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xD2, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xB2, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xD3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x91, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x71, 0xCA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x5A, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x3A, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x1A, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xFA, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xDA, 0x6F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xBA, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0xA3, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x83, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xE2, 0x00, 0x00, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF, 0xFF, 0x9C, 0x8C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF,
-0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D,
-0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
-0x30, 0x0A, 0x00, 0xB5, 0x05, 0x25, 0x00, 0x70, 0xC9, 0xB2, 0x00, 0x00, 0x00, 0x35, 0x4D, 0x65,
-0x78, 0x69, 0x63, 0x61, 0x6E, 0x20, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x43, 0x68, 0x69, 0x68, 0x75, 0x61, 0x68, 0x75, 0x61, 0x20,
-0x61, 0x77, 0x61, 0x79, 0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x55, 0x53, 0x20, 0x62, 0x6F, 0x72,
-0x64, 0x65, 0x72,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCD, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAD, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x8A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x9F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x6C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB5, 0x4E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x95, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7E, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5E, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3E, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB2, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0xD3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xCA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x46, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0F, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x6F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEF, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCF, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0xE2, 0x00, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF,
+0xFF, 0x9C, 0x8C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
+0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D,
+0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
+0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31,
+0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xB5, 0x05, 0x25, 0x00, 0x70, 0xC9, 0xB2, 0x00, 0x00, 0x00, 0x26, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x43, 0x68, 0x69, 0x68,
+0x75, 0x61, 0x68, 0x75, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61,
+0x73, 0x29,
/* America/Coral_Harbour */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5277,20 +5487,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
0xB0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xEE, 0x84, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x05, 0xFF, 0xFF, 0xAA, 0x1C, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43,
-0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x84, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x03, 0x04, 0x05, 0xFF, 0xFF, 0xAA, 0x1C, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
+0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x45, 0x53, 0x54,
+0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Cordoba */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5320,51 +5533,54 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAD, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC3,
-0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAD, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Costa_Rica */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5375,21 +5591,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x29, 0xC2, 0xD9, 0xD0, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF,
0xB1, 0x33, 0x00, 0x00, 0xFF, 0xFF, 0xB1, 0x33, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x09,
0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4A, 0x4D, 0x54, 0x00, 0x43,
-0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x2A, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3,
-0xE8, 0x16, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x11, 0x36, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x11,
-0xB7, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x13, 0x16, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x97, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x97, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28,
-0x6E, 0xB6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x77, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xC2, 0xD9, 0xD0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF,
-0xB1, 0x33, 0x00, 0x00, 0xFF, 0xFF, 0xB1, 0x33, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x09,
-0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4A, 0x4D, 0x54, 0x00, 0x43,
-0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x43, 0x53, 0x54, 0x36, 0x0A, 0x00, 0x98, 0x7C, 0x75, 0x00, 0x92, 0x5B, 0x72, 0x00, 0x00, 0x00,
-0x00,
+0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x2A, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0xE8, 0x16, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x11, 0x36, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x11, 0xB7, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x13, 0x16, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x97, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x97, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x6E, 0xB6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x77, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0xD9, 0xD0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF,
+0xFF, 0xB1, 0x33, 0x00, 0x00, 0xFF, 0xFF, 0xB1, 0x33, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
+0x09, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4A, 0x4D, 0x54, 0x00,
+0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x98, 0x7C, 0x75, 0x00, 0x92, 0x5B, 0x72, 0x00, 0x00, 0x00, 0x00,
/* America/Creston */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5398,19 +5616,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x9B, 0xD6, 0x4B, 0x70, 0x9E, 0xF9, 0x3B, 0x00, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0x92, 0xC4, 0x00,
0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D,
0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E,
-0x3D, 0x70, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x4B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xF9, 0x3B, 0x00, 0x00, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0x92, 0xC4, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C,
-0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, 0x00, 0xD4, 0x3F, 0xF0, 0x00, 0x60, 0xDE,
-0x2D, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74,
-0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x43, 0x72,
-0x65, 0x73, 0x74, 0x6F, 0x6E, 0x2C, 0x20, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x43,
-0x6F, 0x6C, 0x75, 0x6D, 0x62, 0x69, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x70, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD6, 0x4B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xF9, 0x3B, 0x00, 0x00, 0x01, 0x02, 0x01,
+0xFF, 0xFF, 0x92, 0xC4, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80,
+0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
+0x50, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54,
+0x37, 0x0A,
+#endif
+0x00, 0xD4, 0x3F, 0xF0, 0x00, 0x60, 0xDE, 0x2D, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x42, 0x43, 0x20, 0x28, 0x43, 0x72, 0x65, 0x73, 0x74, 0x6F, 0x6E, 0x29,
/* America/Cuiaba */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5457,88 +5676,91 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xCB, 0x6C, 0x00, 0x00, 0xFF, 0xFF, 0xD5,
0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53,
-0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7B, 0x94, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x57, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x42, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xBC, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xEF, 0xC0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x23, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xA8, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x0D, 0xC0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x72, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x3A, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xE0, 0xC0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x14, 0x40,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x9C, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x43, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x1E, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x1D, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xBD, 0xF1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x29, 0x94, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x1B, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B, 0x40, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC0, 0xC3, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA0, 0xA5, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x46, 0xB4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x2E, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x38, 0x62, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x20, 0x2D, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x76, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xD4, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xF1, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x3A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x1C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xC4, 0x9F, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xFE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x87, 0x06, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x17, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xD0, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x43, 0xF7, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x45, 0x4D, 0x61, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x45, 0xE0, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xB7, 0xA3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xB0, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x97, 0x85, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x92, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0x80, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xBA, 0x74, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x60, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x9A, 0x56, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x49, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x83, 0x73, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x47, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x63, 0x55, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x29, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x43, 0x37, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x54, 0xE9, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0x23, 0x19, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xC9, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x02, 0xFB, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xA9, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xE2, 0xDD, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0x88, 0xEC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xCB, 0xF9, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x68, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xAB, 0xDB, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x48, 0xB0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x8B, 0xBD, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x31, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x6B, 0x9F, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x11, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x4B, 0x81, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x63, 0xFA, 0xCB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x2B, 0x63, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x65, 0xD1, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x14, 0x80, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xB1, 0x54, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xF4, 0x62, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x69, 0x9A, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xD4, 0x44, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A, 0x53, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xB4, 0x26, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x94, 0x08, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x17, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7D, 0x24, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x19, 0xF9, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x5D, 0x06, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x72, 0xF9, 0xDB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x3C, 0xE8, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0xD9, 0xBD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x76, 0x1C, 0xCA, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xC2, 0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xFC, 0xAC, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xAB, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xDC, 0x8E, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0x82, 0x9D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xC5, 0xAB, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x62, 0x7F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x8D, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B, 0x9C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x85, 0x6F, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x80, 0x2B, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, 0x65, 0x51, 0x40,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0xFF, 0xFF, 0xCB, 0x6C, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x41, 0x4D, 0x53, 0x54, 0x2C,
-0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30,
-0x2F, 0x30, 0x0A, 0x00, 0x71, 0x8D, 0x02, 0x00, 0xBD, 0x14, 0xF2, 0x00, 0x00, 0x00, 0x0B, 0x4D,
-0x61, 0x74, 0x6F, 0x20, 0x47, 0x72, 0x6F, 0x73, 0x73, 0x6F,
+0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7B, 0x94, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x1E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x1D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD, 0xF1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x1B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B, 0x40, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA0, 0xA5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46, 0xB4, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x2E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x38, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x20, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x76, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xF1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x3A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x1C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xC4, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xFE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x87, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x51, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x4D, 0x61, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7, 0xA3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97, 0x85, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xBA, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x9A, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x83, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x47, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x63, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x29, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x43, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x23, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x02, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA9, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xE2, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88, 0xEC, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xCB, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xAB, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48, 0xB0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x8B, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x6B, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x4B, 0x81, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA, 0xCB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x2B, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x14, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1, 0x54, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xF4, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xD4, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A, 0x53, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xB4, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x94, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x17, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x7D, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19, 0xF9, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x5D, 0x06, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9, 0xDB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x3C, 0xE8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9, 0xBD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x1C, 0xCA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2, 0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xFC, 0xAC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xDC, 0x8E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82, 0x9D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xC5, 0xAB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62, 0x7F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xA5, 0x8D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B, 0x9C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x85, 0x6F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x81, 0x65, 0x51, 0x40, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xCB, 0x6C, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00,
+0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x41,
+0x4D, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x32,
+0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x71, 0x8D, 0x02, 0x00, 0xBD, 0x14, 0xF2, 0x00, 0x00, 0x00, 0x0B, 0x4D, 0x61, 0x74, 0x6F,
+0x20, 0x47, 0x72, 0x6F, 0x73, 0x73, 0x6F,
/* America/Curacao */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5546,14 +5768,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x93, 0x1E, 0x2E, 0x23, 0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00,
0x00, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xB8,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0,
+0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34,
+0x0A,
+#endif
0x00, 0x9B, 0xEB, 0x5D, 0x00, 0xA9, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00,
/* America/Danmarkshavn */
@@ -5574,37 +5799,39 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3,
0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C,
0x4D, 0x54, 0x00, 0x57, 0x47, 0x54, 0x00, 0x57, 0x47, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x7C, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x4E, 0x30,
-0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x05, 0xFF, 0xFF, 0xEE, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF,
-0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x47, 0x54, 0x00, 0x57,
-0x47, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0xFE, 0x77, 0x3A, 0x00, 0xF6,
-0x2C, 0xD5, 0x00, 0x00, 0x00, 0x21, 0x65, 0x61, 0x73, 0x74, 0x20, 0x63, 0x6F, 0x61, 0x73, 0x74,
-0x2C, 0x20, 0x6E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x6F, 0x66, 0x20, 0x53, 0x63, 0x6F, 0x72, 0x65,
-0x73, 0x62, 0x79, 0x73, 0x75, 0x6E, 0x64,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0xE7, 0x4E, 0x30, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0xFF, 0xFF, 0xEE, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF,
+0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57,
+0x47, 0x54, 0x00, 0x57, 0x47, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0xFE, 0x77, 0x3A, 0x00, 0xF6, 0x2C, 0xD5, 0x00, 0x00, 0x00, 0x1A, 0x4E, 0x61, 0x74, 0x69,
+0x6F, 0x6E, 0x61, 0x6C, 0x20, 0x50, 0x61, 0x72, 0x6B, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x20,
+0x63, 0x6F, 0x61, 0x73, 0x74, 0x29,
/* America/Dawson */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5655,92 +5882,95 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59,
0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00,
0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7D, 0x86, 0x8E, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8E, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04,
-0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF,
-0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00,
-0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54,
-0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xEB, 0x16,
-0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x1A, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x6E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x59, 0x75,
-0x6B, 0x6F, 0x6E,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x7D, 0x4C,
+0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF,
+0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14,
+0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00,
+0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00,
+0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53,
+0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xEB, 0x16, 0x4A, 0x00, 0x3D, 0xEC, 0xDD, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69,
+0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x6E, 0x6F, 0x72,
+0x74, 0x68, 0x29,
/* America/Dawson_Creek */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5768,53 +5998,53 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90,
0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57,
0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D,
-0x74, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB,
-0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23,
-0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55,
-0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35,
-0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15,
-0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE,
-0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE,
-0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE,
-0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E,
-0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E,
-0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E,
-0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47,
-0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27,
-0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07,
-0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6,
-0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6,
-0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF,
-0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F,
-0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F,
-0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F,
-0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F,
-0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F,
-0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8,
-0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8,
-0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8,
-0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98,
-0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78,
-0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61,
-0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0xF0, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x05, 0xFF, 0xFF, 0x8F, 0x48, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
-0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D,
-0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54,
-0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x4D, 0x53,
-0x54, 0x37, 0x0A, 0x00, 0xE4, 0x86, 0x9A, 0x00, 0x5B, 0x32, 0x5A, 0x00, 0x00, 0x00, 0x49, 0x4D,
-0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x44, 0x61, 0x77, 0x73, 0x6F, 0x6E, 0x20, 0x43,
-0x72, 0x65, 0x65, 0x6B, 0x20, 0x26, 0x20, 0x46, 0x6F, 0x72, 0x74, 0x20, 0x53, 0x61, 0x69, 0x6E,
-0x74, 0x20, 0x4A, 0x6F, 0x68, 0x6E, 0x2C, 0x20, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20,
-0x43, 0x6F, 0x6C, 0x75, 0x6D, 0x62, 0x69, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x74, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x01, 0xF0, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0xFF,
+0xFF, 0x8F, 0x48, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
+0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D,
+0x90, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50,
+0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0xE4, 0x86, 0x9A, 0x00, 0x5B, 0x32, 0x5A, 0x00, 0x00, 0x00, 0x20, 0x4D, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x42, 0x43, 0x20, 0x28, 0x44, 0x61, 0x77, 0x73, 0x6F, 0x6E, 0x20, 0x43, 0x72, 0x2C,
+0x20, 0x46, 0x74, 0x20, 0x53, 0x74, 0x20, 0x4A, 0x6F, 0x68, 0x6E, 0x29,
/* America/Denver */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -5872,106 +6102,110 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00,
-0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65,
-0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x45,
-0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08,
-0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76,
-0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0,
-0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53,
-0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC5, 0xF7, 0x5C, 0x00, 0x72, 0x77, 0x0F, 0x00, 0x00, 0x00,
-0x0D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65,
+0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x45, 0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
+0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
+0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
+0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A,
+0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC5, 0xF7, 0x5C, 0x00, 0x72, 0x77, 0x0F, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73,
+0x29,
/* America/Detroit */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6025,6 +6259,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00,
0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00,
0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
@@ -6112,24 +6347,27 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00,
0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC9, 0xEB, 0xF2, 0x00, 0x93, 0xF0, 0xB8,
-0x00, 0x00, 0x00, 0x28, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65,
-0x20, 0x2D, 0x20, 0x4D, 0x69, 0x63, 0x68, 0x69, 0x67, 0x61, 0x6E, 0x20, 0x2D, 0x20, 0x6D, 0x6F,
-0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC9, 0xEB, 0xF2, 0x00, 0x93, 0xF0, 0xB8, 0x00, 0x00, 0x00, 0x19, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4D, 0x49, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61,
+0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Dominica */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA0, 0xAC, 0xD0, 0x00, 0xB4,
-0xF8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA0, 0xAC, 0xD0, 0x00, 0xB4, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00,
/* America/Edmonton */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6186,108 +6424,108 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
-0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0,
-0x98, 0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2,
-0x8A, 0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4,
-0x6A, 0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6,
-0x53, 0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x33, 0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
-0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C,
-0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF,
-0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08,
-0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
-0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D,
-0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
-0x30, 0x0A, 0x00, 0xDB, 0x0A, 0x38, 0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x42, 0x4D, 0x6F,
-0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x41, 0x6C,
-0x62, 0x65, 0x72, 0x74, 0x61, 0x2C, 0x20, 0x65, 0x61, 0x73, 0x74, 0x20, 0x42, 0x72, 0x69, 0x74,
-0x69, 0x73, 0x68, 0x20, 0x43, 0x6F, 0x6C, 0x75, 0x6D, 0x62, 0x69, 0x61, 0x20, 0x26, 0x20, 0x77,
-0x65, 0x73, 0x74, 0x20, 0x53, 0x61, 0x73, 0x6B, 0x61, 0x74, 0x63, 0x68, 0x65, 0x77, 0x61, 0x6E,
-
+0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x98, 0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x8A, 0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x6A, 0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x33, 0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00,
+0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37,
+0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xDB, 0x0A, 0x38, 0x00, 0x65, 0x85, 0x95, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x41, 0x42, 0x3B, 0x20, 0x42, 0x43, 0x20, 0x28, 0x45,
+0x29, 0x3B, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x57, 0x29,
/* America/Eirunepe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6306,35 +6544,37 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xBE, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF,
0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x54,
-0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x88, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9,
-0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC,
-0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
-0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xC0, 0xD1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x48,
-0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04, 0xC0, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xBE,
-0x80, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41,
-0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A, 0x00, 0x7F, 0x28, 0x15,
-0x00, 0xA8, 0x0C, 0xD5, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x20, 0x41, 0x6D, 0x61, 0x7A, 0x6F, 0x6E,
-0x61, 0x73,
+0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x88, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xD1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04, 0xC0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF,
+0xBE, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09,
+0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+#endif
+0x00, 0x7F, 0x28, 0x15, 0x00, 0xA8, 0x0C, 0xD5, 0x00, 0x00, 0x00, 0x0F, 0x41, 0x6D, 0x61, 0x7A,
+0x6F, 0x6E, 0x61, 0x73, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29,
/* America/El_Salvador */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6343,17 +6583,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xA3, 0xD5, 0xA6, 0x20, 0x20, 0x9A, 0xDC, 0xE0, 0x21, 0x5C, 0x9B, 0x50, 0x22, 0x7A, 0xBE, 0xE0,
0x23, 0x3C, 0x7D, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAC, 0x60, 0x00, 0x00,
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xD5, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x9A,
-0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x9B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A,
-0xBE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x7D, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0xFF, 0xFF, 0xAC, 0x60, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
-0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A, 0x00, 0x9E, 0x3B, 0xD0, 0x00, 0x8A,
-0x8C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xD5, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x9A, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x9B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x7A, 0xBE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x7D, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0xFF, 0xFF, 0xAC, 0x60, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF,
+0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x9E, 0x3B, 0xD0, 0x00, 0x8A, 0x8C, 0xC0, 0x00, 0x00, 0x00, 0x00,
/* America/Ensenada */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6410,152 +6652,252 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D,
0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57,
0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04,
-0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54,
-0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
-0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF,
+0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10,
+0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53,
+0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+/* America/Fort_Nelson */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
+0x9E, 0xB8, 0xBD, 0xA0, 0x9F, 0xBB, 0x15, 0x90, 0xCB, 0x89, 0x1A, 0xA0, 0xD2, 0x23, 0xF4, 0x70,
+0xD2, 0x61, 0x26, 0x10, 0xD5, 0x55, 0xF1, 0x20, 0xD6, 0x20, 0xEA, 0x10, 0xD7, 0x35, 0xD3, 0x20,
+0xD8, 0x00, 0xCC, 0x10, 0xD9, 0x15, 0xB5, 0x20, 0xD9, 0xE0, 0xAE, 0x10, 0xDA, 0xFE, 0xD1, 0xA0,
+0xDB, 0xC0, 0x90, 0x10, 0xDC, 0xDE, 0xB3, 0xA0, 0xDD, 0xA9, 0xAC, 0x90, 0xDE, 0xBE, 0x95, 0xA0,
+0xDF, 0x89, 0x8E, 0x90, 0xE0, 0x9E, 0x77, 0xA0, 0xE1, 0x69, 0x70, 0x90, 0xE2, 0x7E, 0x59, 0xA0,
+0xE3, 0x49, 0x52, 0x90, 0xE4, 0x5E, 0x3B, 0xA0, 0xE5, 0x29, 0x34, 0x90, 0xE6, 0x47, 0x58, 0x20,
+0xE7, 0x12, 0x51, 0x10, 0xE8, 0x27, 0x3A, 0x20, 0xE8, 0xF2, 0x33, 0x10, 0xEA, 0x07, 0x1C, 0x20,
+0xEA, 0xD2, 0x15, 0x10, 0xEB, 0xE6, 0xFE, 0x20, 0xEC, 0xB1, 0xF7, 0x10, 0xED, 0xC6, 0xE0, 0x20,
+0xEE, 0x91, 0xD9, 0x10, 0xEF, 0xAF, 0xFC, 0xA0, 0xF0, 0x71, 0xBB, 0x10, 0xF1, 0x8F, 0xDE, 0xA0,
+0xF2, 0x7F, 0xC1, 0x90, 0xF3, 0x6F, 0xC0, 0xA0, 0xF4, 0x5F, 0xA3, 0x90, 0xF5, 0x4F, 0xA2, 0xA0,
+0xF6, 0x3F, 0x85, 0x90, 0xF7, 0x2F, 0x84, 0xA0, 0xF8, 0x28, 0xA2, 0x10, 0xF9, 0x0F, 0x66, 0xA0,
+0xFA, 0x08, 0x84, 0x10, 0xFA, 0xF8, 0x83, 0x20, 0xFB, 0xE8, 0x66, 0x10, 0xFC, 0xD8, 0x65, 0x20,
+0xFD, 0xC8, 0x48, 0x10, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x98, 0x29, 0x20,
+0x01, 0x88, 0x0C, 0x10, 0x02, 0x78, 0x0B, 0x20, 0x03, 0x71, 0x28, 0x90, 0x04, 0x61, 0x27, 0xA0,
+0x05, 0x51, 0x0A, 0x90, 0x06, 0x41, 0x09, 0xA0, 0x07, 0x30, 0xEC, 0x90, 0x08, 0x20, 0xEB, 0xA0,
+0x09, 0x10, 0xCE, 0x90, 0x0A, 0x00, 0xCD, 0xA0, 0x0A, 0xF0, 0xB0, 0x90, 0x0B, 0xE0, 0xAF, 0xA0,
+0x0C, 0xD9, 0xCD, 0x10, 0x0D, 0xC0, 0x91, 0xA0, 0x0E, 0xB9, 0xAF, 0x10, 0x0F, 0xA9, 0xAE, 0x20,
+0x10, 0x99, 0x91, 0x10, 0x11, 0x89, 0x90, 0x20, 0x12, 0x79, 0x73, 0x10, 0x13, 0x69, 0x72, 0x20,
+0x14, 0x59, 0x55, 0x10, 0x15, 0x49, 0x54, 0x20, 0x16, 0x39, 0x37, 0x10, 0x17, 0x29, 0x36, 0x20,
+0x18, 0x22, 0x53, 0x90, 0x19, 0x09, 0x18, 0x20, 0x1A, 0x02, 0x35, 0x90, 0x1A, 0xF2, 0x34, 0xA0,
+0x1B, 0xE2, 0x17, 0x90, 0x1C, 0xD2, 0x16, 0xA0, 0x1D, 0xC1, 0xF9, 0x90, 0x1E, 0xB1, 0xF8, 0xA0,
+0x1F, 0xA1, 0xDB, 0x90, 0x20, 0x76, 0x2B, 0x20, 0x21, 0x81, 0xBD, 0x90, 0x22, 0x56, 0x0D, 0x20,
+0x23, 0x6A, 0xDA, 0x10, 0x24, 0x35, 0xEF, 0x20, 0x25, 0x4A, 0xBC, 0x10, 0x26, 0x15, 0xD1, 0x20,
+0x27, 0x2A, 0x9E, 0x10, 0x27, 0xFE, 0xED, 0xA0, 0x29, 0x0A, 0x80, 0x10, 0x29, 0xDE, 0xCF, 0xA0,
+0x2A, 0xEA, 0x62, 0x10, 0x2B, 0xBE, 0xB1, 0xA0, 0x2C, 0xD3, 0x7E, 0x90, 0x2D, 0x9E, 0x93, 0xA0,
+0x2E, 0xB3, 0x60, 0x90, 0x2F, 0x7E, 0x75, 0xA0, 0x30, 0x93, 0x42, 0x90, 0x31, 0x67, 0x92, 0x20,
+0x32, 0x73, 0x24, 0x90, 0x33, 0x47, 0x74, 0x20, 0x34, 0x53, 0x06, 0x90, 0x35, 0x27, 0x56, 0x20,
+0x36, 0x32, 0xE8, 0x90, 0x37, 0x07, 0x38, 0x20, 0x38, 0x1C, 0x05, 0x10, 0x38, 0xE7, 0x1A, 0x20,
+0x39, 0xFB, 0xE7, 0x10, 0x3A, 0xC6, 0xFC, 0x20, 0x3B, 0xDB, 0xC9, 0x10, 0x3C, 0xB0, 0x18, 0xA0,
+0x3D, 0xBB, 0xAB, 0x10, 0x3E, 0x8F, 0xFA, 0xA0, 0x3F, 0x9B, 0x8D, 0x10, 0x40, 0x6F, 0xDC, 0xA0,
+0x41, 0x84, 0xA9, 0x90, 0x42, 0x4F, 0xBE, 0xA0, 0x43, 0x64, 0x8B, 0x90, 0x44, 0x2F, 0xA0, 0xA0,
+0x45, 0x44, 0x6D, 0x90, 0x45, 0xF3, 0xD3, 0x20, 0x47, 0x2D, 0x8A, 0x10, 0x47, 0xD3, 0xB5, 0x20,
+0x49, 0x0D, 0x6C, 0x10, 0x49, 0xB3, 0x97, 0x20, 0x4A, 0xED, 0x4E, 0x10, 0x4B, 0x9C, 0xB3, 0xA0,
+0x4C, 0xD6, 0x6A, 0x90, 0x4D, 0x7C, 0x95, 0xA0, 0x4E, 0xB6, 0x4C, 0x90, 0x4F, 0x5C, 0x77, 0xA0,
+0x50, 0x96, 0x2E, 0x90, 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0,
+0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x8C, 0xF9, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
+0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF,
+0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x50,
+0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x4D,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x76, 0x87, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x8C, 0xF9,
+0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF,
+0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x14,
+0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00,
+0x50, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0xE3, 0x0D, 0x00, 0x00, 0x57, 0x6E, 0xD0, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x42, 0x43, 0x20, 0x28, 0x46, 0x74, 0x20, 0x4E, 0x65, 0x6C, 0x73, 0x6F, 0x6E, 0x29,
-/* America/Fortaleza */
-0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00,
-0x96, 0xAA, 0x6B, 0x18, 0xB8, 0x0F, 0x49, 0xE0, 0xB8, 0xFD, 0x40, 0xA0, 0xB9, 0xF1, 0x34, 0x30,
-0xBA, 0xDE, 0x74, 0x20, 0xDA, 0x38, 0xAE, 0x30, 0xDA, 0xEB, 0xFA, 0x30, 0xDC, 0x19, 0xE1, 0xB0,
-0xDC, 0xB9, 0x59, 0x20, 0xDD, 0xFB, 0x15, 0x30, 0xDE, 0x9B, 0xDE, 0x20, 0xDF, 0xDD, 0x9A, 0x30,
-0xE0, 0x54, 0x33, 0x20, 0xF4, 0x97, 0xFF, 0xB0, 0xF5, 0x05, 0x5E, 0x20, 0xF6, 0xC0, 0x64, 0x30,
-0xF7, 0x0E, 0x1E, 0xA0, 0xF8, 0x51, 0x2C, 0x30, 0xF8, 0xC7, 0xC5, 0x20, 0xFA, 0x0A, 0xD2, 0xB0,
-0xFA, 0xA8, 0xF8, 0xA0, 0xFB, 0xEC, 0x06, 0x30, 0xFC, 0x8B, 0x7D, 0xA0, 0x1D, 0xC9, 0x8E, 0x30,
-0x1E, 0x78, 0xD7, 0xA0, 0x1F, 0xA0, 0x35, 0xB0, 0x20, 0x33, 0xCF, 0xA0, 0x21, 0x81, 0x69, 0x30,
-0x22, 0x0B, 0xC8, 0xA0, 0x23, 0x58, 0x10, 0xB0, 0x23, 0xE2, 0x70, 0x20, 0x25, 0x37, 0xF2, 0xB0,
-0x25, 0xD4, 0xC7, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xB8, 0x85, 0x20, 0x39, 0xDF, 0xE3, 0x30,
-0x39, 0xF2, 0x4A, 0x20, 0x3B, 0xC8, 0xFF, 0xB0, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB, 0xE8, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x96, 0xAA, 0x6B, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xF2, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB,
-0xE8, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x83, 0xA8, 0x6D, 0x00, 0xD7, 0xE9, 0x70,
-0x00, 0x00, 0x00, 0x1E, 0x4E, 0x45, 0x20, 0x42, 0x72, 0x61, 0x7A, 0x69, 0x6C, 0x20, 0x28, 0x4D,
-0x41, 0x2C, 0x20, 0x50, 0x49, 0x2C, 0x20, 0x43, 0x45, 0x2C, 0x20, 0x52, 0x4E, 0x2C, 0x20, 0x50,
-0x42, 0x29,
/* America/Fort_Wayne */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6596,74 +6938,130 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0,
-0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB,
-0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF,
-0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
-0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0xFF, 0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF,
+0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53,
+0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* America/Fortaleza */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00,
+0x96, 0xAA, 0x6B, 0x18, 0xB8, 0x0F, 0x49, 0xE0, 0xB8, 0xFD, 0x40, 0xA0, 0xB9, 0xF1, 0x34, 0x30,
+0xBA, 0xDE, 0x74, 0x20, 0xDA, 0x38, 0xAE, 0x30, 0xDA, 0xEB, 0xFA, 0x30, 0xDC, 0x19, 0xE1, 0xB0,
+0xDC, 0xB9, 0x59, 0x20, 0xDD, 0xFB, 0x15, 0x30, 0xDE, 0x9B, 0xDE, 0x20, 0xDF, 0xDD, 0x9A, 0x30,
+0xE0, 0x54, 0x33, 0x20, 0xF4, 0x97, 0xFF, 0xB0, 0xF5, 0x05, 0x5E, 0x20, 0xF6, 0xC0, 0x64, 0x30,
+0xF7, 0x0E, 0x1E, 0xA0, 0xF8, 0x51, 0x2C, 0x30, 0xF8, 0xC7, 0xC5, 0x20, 0xFA, 0x0A, 0xD2, 0xB0,
+0xFA, 0xA8, 0xF8, 0xA0, 0xFB, 0xEC, 0x06, 0x30, 0xFC, 0x8B, 0x7D, 0xA0, 0x1D, 0xC9, 0x8E, 0x30,
+0x1E, 0x78, 0xD7, 0xA0, 0x1F, 0xA0, 0x35, 0xB0, 0x20, 0x33, 0xCF, 0xA0, 0x21, 0x81, 0x69, 0x30,
+0x22, 0x0B, 0xC8, 0xA0, 0x23, 0x58, 0x10, 0xB0, 0x23, 0xE2, 0x70, 0x20, 0x25, 0x37, 0xF2, 0xB0,
+0x25, 0xD4, 0xC7, 0x20, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xB8, 0x85, 0x20, 0x39, 0xDF, 0xE3, 0x30,
+0x39, 0xF2, 0x4A, 0x20, 0x3B, 0xC8, 0xFF, 0xB0, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB, 0xE8, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42,
+0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x6B, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xF2, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB, 0xE8, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42,
+0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x83, 0xA8, 0x6D, 0x00, 0xD7, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x26, 0x42, 0x72, 0x61, 0x7A,
+0x69, 0x6C, 0x20, 0x28, 0x6E, 0x6F, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x3A, 0x20, 0x4D,
+0x41, 0x2C, 0x20, 0x50, 0x49, 0x2C, 0x20, 0x43, 0x45, 0x2C, 0x20, 0x52, 0x4E, 0x2C, 0x20, 0x50,
+0x42, 0x29,
/* America/Glace_Bay */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6716,100 +7114,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xCC, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41,
0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x80, 0xF1, 0xA8, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x38, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x02, 0x01,
-0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0xCC, 0x00, 0x00,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xCF,
-0xD3, 0x1F, 0x00, 0xB7, 0x2E, 0x88, 0x00, 0x00, 0x00, 0x47, 0x41, 0x74, 0x6C, 0x61, 0x6E, 0x74,
-0x69, 0x63, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4E, 0x6F, 0x76, 0x61, 0x20, 0x53,
-0x63, 0x6F, 0x74, 0x69, 0x61, 0x20, 0x2D, 0x20, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x73, 0x20, 0x74,
-0x68, 0x61, 0x74, 0x20, 0x64, 0x69, 0x64, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x6F, 0x62, 0x73, 0x65,
-0x72, 0x76, 0x65, 0x20, 0x44, 0x53, 0x54, 0x20, 0x31, 0x39, 0x36, 0x36, 0x2D, 0x31, 0x39, 0x37,
-0x31,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xF1, 0xA8, 0x34, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x38, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xF2, 0x50, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0xFF, 0xFF, 0xC7, 0xCC, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C,
+0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41,
+0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53,
+0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xCF, 0xD3, 0x1F, 0x00, 0xB7, 0x2E, 0x88, 0x00, 0x00, 0x00, 0x1B, 0x41, 0x74, 0x6C, 0x61,
+0x6E, 0x74, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x4E, 0x53, 0x20, 0x28, 0x43, 0x61, 0x70, 0x65, 0x20,
+0x42, 0x72, 0x65, 0x74, 0x6F, 0x6E, 0x29,
/* America/Godthab */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -6854,83 +7252,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00,
0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0,
0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x47, 0x54, 0x00,
-0x57, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0x4C,
-0x4D, 0x54, 0x00, 0x57, 0x47, 0x54, 0x00, 0x57, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x57, 0x47, 0x54, 0x33, 0x57, 0x47, 0x53, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
-0x30, 0x2F, 0x2D, 0x31, 0x0A, 0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00,
-0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x57, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0xFF, 0xFF, 0xCF, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF,
+0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x57, 0x47, 0x54, 0x00, 0x57, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x57, 0x47, 0x54, 0x33, 0x57, 0x47, 0x53, 0x54,
+0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x2D, 0x32, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
+0x2E, 0x30, 0x2F, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0xEB, 0x43, 0xDD, 0x00, 0xC3, 0xB8, 0x2A, 0x00, 0x00, 0x00, 0x16, 0x47, 0x72, 0x65, 0x65,
+0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61,
+0x73, 0x29,
/* America/Goose_Bay */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7007,137 +7409,140 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x54, 0x00, 0x4E, 0x44, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x41, 0x44,
0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0xCD, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x3C, 0x24, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9E, 0xB8, 0x7E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xD6, 0x7C, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBE, 0x9E, 0x4D, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xB8, 0x31, 0x38, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC1, 0x79, 0xEF, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x98, 0x13, 0x38, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC3, 0x59, 0xD1, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x77, 0xF5, 0x38, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC5, 0x39, 0xB3, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x61, 0x11, 0xB8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC7, 0x19, 0x95, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x40, 0xF3, 0xB8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC9, 0x02, 0xB2, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x20, 0xD5, 0xB8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0xE2, 0x94, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x00, 0xB7, 0xB8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xE6, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD3, 0x88, 0x44, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4A, 0x03, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD5, 0x68, 0x26, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xE5, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD7, 0x48, 0x08, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xC7, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD9, 0x27, 0xEA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0xA9, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDB, 0x11, 0x07, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xD2, 0xC5, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0xDE, 0x74, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x6D, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDE, 0xBE, 0x56, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x4F, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x9E, 0x38, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x31, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE2, 0x7E, 0x1A, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x13, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE4, 0x5D, 0xFC, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x28, 0xF5, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE6, 0x47, 0x18, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x11, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE8, 0x26, 0xFA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xF3, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEA, 0x06, 0xDC, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xD5, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEB, 0xE6, 0xBE, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xB7, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xED, 0xC6, 0xA0, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xBE, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEF, 0xAF, 0xBD, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xA0, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF1, 0x8F, 0x9F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x82, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF3, 0x6F, 0x81, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x64, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x4F, 0x63, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x46, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF7, 0x2F, 0x45, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x62, 0xC8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0xDA, 0x6B, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xD6, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0x69, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xB8, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6A, 0x77, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0x9A, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x4A, 0x67, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x7C, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x2A, 0x49, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0x99, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x0A, 0x2B, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x7B, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xEA, 0x0D, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x5D, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xD3, 0x2A, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x3F, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0xB3, 0x0C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x21, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x92, 0xEE, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x3D, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0xD0, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x1F, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0xB2, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x01, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0x94, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xE3, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0xB0, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xC5, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0x92, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xA7, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x74, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xC4, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x56, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xA6, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x38, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x88, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x55, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x6A, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x37, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x4C, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x19, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x7E, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x35, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x60, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x17, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x42, 0xFC, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xEC, 0xF9, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x5F, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x16, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x41, 0x7C, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x06, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x09, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0xFF, 0xFF, 0xC7, 0x5C, 0x00, 0x00, 0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x04, 0xFF, 0xFF,
-0xDC, 0xA4, 0x01, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x04, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x08,
-0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x0C, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0,
-0x01, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x18, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x1C, 0xFF, 0xFF,
-0xD5, 0xD0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x44, 0x54, 0x00,
-0x4E, 0x50, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x41, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34,
-0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0xDA, 0xB5, 0x95, 0x00, 0xB6, 0x78, 0x3D, 0x00, 0x00, 0x00, 0x29, 0x41,
-0x74, 0x6C, 0x61, 0x6E, 0x74, 0x69, 0x63, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4C,
-0x61, 0x62, 0x72, 0x61, 0x64, 0x6F, 0x72, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C,
-0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xCD, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x3C, 0x24, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x7E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xD6, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x9E, 0x4D, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xB8, 0x31, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x79, 0xEF, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x98, 0x13, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x59, 0xD1, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x77, 0xF5, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x39, 0xB3, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x61, 0x11, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x19, 0x95, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x40, 0xF3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x02, 0xB2, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x20, 0xD5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x94, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x00, 0xB7, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xE6, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x88, 0x44, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4A, 0x03, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x68, 0x26, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xE5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x48, 0x08, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xC7, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x27, 0xEA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0xA9, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x11, 0x07, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xD2, 0xC5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x74, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x6D, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x56, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x4F, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x38, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x31, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x1A, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x13, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5D, 0xFC, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x28, 0xF5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x18, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x11, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x26, 0xFA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xF3, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xDC, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xD5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xBE, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xB7, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xA0, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xBE, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xBD, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xA0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0x9F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x82, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x81, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x64, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x63, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x46, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x45, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x62, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xDA, 0x6B, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xD6, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xB8, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0x77, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0x9A, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x67, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x7C, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x49, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0x99, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x2B, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x7B, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x0D, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x5D, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x2A, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x3F, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x0C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x21, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0xEE, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x3D, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xD0, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xB2, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x94, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xE3, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xB0, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xC5, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x92, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xA7, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x74, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xC4, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x56, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xA6, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x38, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x88, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x55, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x37, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x4C, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x19, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x7E, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x35, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x60, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x17, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x42, 0xFC, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xEC, 0xF9, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x5F, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x16, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x41, 0x7C, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x06, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x09, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0xFF, 0xFF, 0xC7, 0x5C, 0x00, 0x00, 0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x04, 0xFF, 0xFF, 0xDC,
+0xA4, 0x01, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x04, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x08, 0xFF,
+0xFF, 0xDC, 0xD8, 0x01, 0x0C, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x18, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x1C, 0xFF, 0xFF, 0xD5,
+0xD0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x44, 0x54, 0x00, 0x4E,
+0x50, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41,
+0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0xDA, 0xB5, 0x95, 0x00, 0xB6, 0x78, 0x3D, 0x00, 0x00, 0x00, 0x20, 0x41, 0x74, 0x6C, 0x61,
+0x6E, 0x74, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x4C, 0x61, 0x62, 0x72, 0x61, 0x64, 0x6F, 0x72, 0x20,
+0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Grand_Turk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7170,86 +7575,93 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C,
0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53,
0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1E, 0x30,
-0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x04, 0xFF, 0xFF, 0xBD, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45,
-0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xAA, 0x15, 0xAA, 0x00, 0xA6, 0x1E, 0x0A, 0x00,
-0x00, 0x00, 0x00,
+0x04, 0xFF, 0xFF, 0xBD, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x10, 0x4C,
+0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x41,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53,
+0x54, 0x34, 0x0A,
+#endif
+0x00, 0xAA, 0x15, 0xAA, 0x00, 0xA6, 0x1E, 0x0A, 0x00, 0x00, 0x00, 0x00,
/* America/Grenada */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0x9B, 0xB7, 0x48, 0x00, 0xB4,
-0x6F, 0x68, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x9B, 0xB7, 0x48, 0x00, 0xB4, 0x6F, 0x68, 0x00, 0x00, 0x00, 0x00,
/* America/Guadeloupe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA2, 0x19, 0x65, 0x00, 0xB4,
-0xC4, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA2, 0x19, 0x65, 0x00, 0xB4, 0xC4, 0x0A, 0x00, 0x00, 0x00, 0x00,
/* America/Guatemala */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7260,18 +7672,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x45, 0x1F, 0x4B, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF,
0xAB, 0x24, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08,
0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9D, 0xEA, 0xDC, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x55, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0xCD, 0x96, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x2C, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xCF, 0xE4, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xEA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC8, 0x5C, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x54, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1F, 0x4B, 0x50, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAB, 0x24, 0x00, 0x00, 0xFF, 0xFF,
-0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54,
-0x36, 0x0A, 0x00, 0x9F, 0xA8, 0x65, 0x00, 0x88, 0x8A, 0x6D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9D, 0xEA, 0xDC, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x55, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0xCD, 0x96, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x2C, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xCF, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xEA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC8, 0x5C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x54, 0x52, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1F, 0x4B, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAB, 0x24, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
+0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x9F, 0xA8, 0x65, 0x00, 0x88, 0x8A, 0x6D, 0x00, 0x00, 0x00, 0x00,
/* America/Guayaquil */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7279,15 +7694,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xB6, 0xA4, 0x42, 0x18, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x28, 0x00, 0x00, 0xFF, 0xFF, 0xB6, 0x68,
0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x51, 0x4D, 0x54, 0x00,
-0x45, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x69, 0x87, 0x26, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA4, 0x42, 0x18, 0x00, 0x01,
-0x02, 0xFF, 0xFF, 0xB5, 0x28, 0x00, 0x00, 0xFF, 0xFF, 0xB6, 0x68, 0x00, 0x04, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x51, 0x4D, 0x54, 0x00, 0x45, 0x43, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x43, 0x54, 0x35, 0x0A, 0x00, 0x86, 0x05, 0xE5, 0x00,
-0x98, 0xD7, 0x9A, 0x00, 0x00, 0x00, 0x08, 0x6D, 0x61, 0x69, 0x6E, 0x6C, 0x61, 0x6E, 0x64,
+0x45, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x26, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0xA4, 0x42, 0x18, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x28, 0x00, 0x00, 0xFF, 0xFF, 0xB6,
+0x68, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x51, 0x4D, 0x54,
+0x00, 0x45, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x43, 0x54, 0x35,
+0x0A,
+#endif
+0x00, 0x86, 0x05, 0xE5, 0x00, 0x98, 0xD7, 0x9A, 0x00, 0x00, 0x00, 0x12, 0x45, 0x63, 0x75, 0x61,
+0x64, 0x6F, 0x72, 0x20, 0x28, 0x6D, 0x61, 0x69, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x29,
/* America/Guyana */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7297,17 +7716,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0xFF, 0xFF, 0xC9, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0xCB, 0x44, 0x00,
0x04, 0xFF, 0xFF, 0xCB, 0x44, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0xFF, 0xFF, 0xC7,
0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x42, 0x47, 0x54, 0x00, 0x47, 0x59, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x98, 0xD9, 0x79, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x39, 0x3E, 0xBC, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x7D, 0xB4, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0xFB, 0x30, 0x00, 0x01,
-0x02, 0x03, 0x04, 0xFF, 0xFF, 0xC9, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0xCB, 0x44, 0x00, 0x04, 0xFF,
-0xFF, 0xCB, 0x44, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x42, 0x47, 0x54, 0x00, 0x47, 0x59, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x59, 0x54, 0x34, 0x0A, 0x00, 0x93,
-0xB4, 0x80, 0x00, 0xB9, 0xE7, 0x25, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0xD9, 0x79, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x39, 0x3E, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x7D, 0xB4, 0x3C, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x7F, 0xFB, 0x30, 0x00, 0x01, 0x02, 0x03, 0x04, 0xFF, 0xFF, 0xC9, 0x78, 0x00, 0x00, 0xFF,
+0xFF, 0xCB, 0x44, 0x00, 0x04, 0xFF, 0xFF, 0xCB, 0x44, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
+0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x42, 0x47, 0x54, 0x00,
+0x47, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47,
+0x59, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x93, 0xB4, 0x80, 0x00, 0xB9, 0xE7, 0x25, 0x00, 0x00, 0x00, 0x00,
/* America/Halifax */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7388,147 +7810,149 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5,
0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41,
0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0xE5, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xF1, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9A, 0xE4, 0xDE, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x13, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA2, 0x9D, 0x17, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x30, 0xB1, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA4, 0x7A, 0x56, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x1B, 0x1F, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA6, 0x53, 0xA0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0xFC, 0x52, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA8, 0x3C, 0xBD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xDC, 0x34, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAA, 0x1C, 0x9F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xCD, 0x3A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAB, 0xFC, 0x81, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBF, 0x91, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAD, 0xEE, 0xD8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x8C, 0xFE, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAF, 0xBC, 0x45, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7F, 0x55, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB1, 0xAE, 0x9C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x4B, 0x70, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB3, 0x8E, 0x7E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x24, 0xBB, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB5, 0x6E, 0x60, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x15, 0xC0, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB7, 0x4E, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x08, 0x17, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB9, 0x24, 0xE9, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE7, 0xF9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBB, 0x04, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD1, 0x16, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBD, 0x00, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0x9D, 0x31, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBE, 0xF2, 0xB4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x90, 0xDA, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC0, 0xD3, 0xE7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x5E, 0x47, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC2, 0x8D, 0x8E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x50, 0x9E, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC4, 0x6D, 0x70, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x30, 0x80, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC6, 0x72, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x10, 0x62, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0x36, 0x6E, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF9, 0x7E, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0x16, 0x50, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD9, 0x60, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xD6, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x40, 0xCF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xB8, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD6, 0x20, 0xB1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD8, 0x00, 0x93, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD9, 0xE0, 0x75, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x7B, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDD, 0xA9, 0x74, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x5D, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDF, 0x89, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE1, 0x69, 0x38, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x21, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE3, 0x49, 0x1A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE7, 0x12, 0x18, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x01, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE8, 0xF1, 0xFA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEA, 0xD1, 0xDC, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEC, 0xB1, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xA6, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF2, 0x7F, 0x89, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x88, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x5F, 0x6B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x6A, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0x3F, 0x4D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x28, 0x69, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC4, 0x60, 0x00, 0x00,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xCD,
-0x75, 0xA8, 0x00, 0xB1, 0x9C, 0xC0, 0x00, 0x00, 0x00, 0x2E, 0x41, 0x74, 0x6C, 0x61, 0x6E, 0x74,
-0x69, 0x63, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4E, 0x6F, 0x76, 0x61, 0x20, 0x53,
-0x63, 0x6F, 0x74, 0x69, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x70, 0x6C, 0x61, 0x63,
-0x65, 0x73, 0x29, 0x2C, 0x20, 0x50, 0x45, 0x49,
+0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xE5, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xF1, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9A, 0xE4, 0xDE, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x13, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x9D, 0x17, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x30, 0xB1, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x7A, 0x56, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x1B, 0x1F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xA0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0xFC, 0x52, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x3C, 0xBD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xDC, 0x34, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1C, 0x9F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xCD, 0x3A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFC, 0x81, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBF, 0x91, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xEE, 0xD8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x8C, 0xFE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBC, 0x45, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7F, 0x55, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0xAE, 0x9C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x4B, 0x70, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x8E, 0x7E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x24, 0xBB, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x6E, 0x60, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x15, 0xC0, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x4E, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x08, 0x17, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x24, 0xE9, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE7, 0xF9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD1, 0x16, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0x00, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0x9D, 0x31, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xF2, 0xB4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x90, 0xDA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xD3, 0xE7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x5E, 0x47, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x8D, 0x8E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x50, 0x9E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x6D, 0x70, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x30, 0x80, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x72, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x10, 0x62, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x36, 0x6E, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF9, 0x7E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x16, 0x50, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD9, 0x60, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xD6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xCF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xB8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xB1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0x93, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x75, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x74, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x5D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x38, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x21, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x1A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x18, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x01, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF1, 0xFA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xDC, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xA6, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0x89, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x88, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x6B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x6A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x4D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x69, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xF2, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC4, 0x60, 0x00, 0x00, 0xFF,
+0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41,
+0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xCD, 0x75, 0xA8, 0x00, 0xB1, 0x9C, 0xC0, 0x00, 0x00, 0x00, 0x1E, 0x41, 0x74, 0x6C, 0x61,
+0x6E, 0x74, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x4E, 0x53, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20,
+0x61, 0x72, 0x65, 0x61, 0x73, 0x29, 0x3B, 0x20, 0x50, 0x45,
/* America/Havana */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7586,105 +8010,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB2, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C,
0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00,
0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x69, 0x87, 0x28, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0x62, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB1, 0xD3, 0x94, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x74, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x5B, 0x66, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xD3, 0x51, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0x3B, 0x48, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xBC, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0x24, 0x65, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x9C, 0x4F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD1, 0xC4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0xF5, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD3, 0xA3, 0xED, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x1B, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x60, 0x05, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x7D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0x3D, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE3, 0x53, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xDB, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xA7, 0x86, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFC, 0xC5, 0xA9, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x87, 0x68, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFE, 0xB8, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xE3, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x97, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xC5, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x77, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xE2, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x60, 0xE1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x05, 0x35, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x06, 0x40, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x07, 0x16, 0x48, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x20, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0xF7, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x6A, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0xE0, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x86, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0xC0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x68, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0xB2, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7D, 0x9B, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x51, 0xEA, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x31, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x5B, 0x82, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x3B, 0x64, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x19, 0x1B, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xFB, 0x28, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xDB, 0x0A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x7A, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x5A, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x43, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x23, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x2E, 0xC6, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x15, 0x8A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x17, 0xE2, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xFE, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xD2, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xDE, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xB4, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xBE, 0x6B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x96, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x9E, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x78, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x7E, 0x2F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x30, 0x77, 0x5A, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x67, 0x4B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x3C, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x47, 0x2D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x59, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0xD5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0xB7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xE6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xC6, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xAF, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x8F, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x5B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x45, 0xF3, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x17, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xDC, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xF9, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xB3, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0x9C, 0x6D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x85, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xBF, 0x4E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0xE0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x3C, 0x13, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x1B, 0xF5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x54, 0xFB, 0xD7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xE4, 0xF3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xC4, 0xD5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xA4, 0xB7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0x84, 0x99, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x64, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x4D, 0x98, 0x50, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x2D, 0x7A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x0D, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x65, 0xED, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xCD, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xAD, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0x96, 0x1E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x76, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x55, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x35, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x15, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x74, 0xFE, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xDE, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xBE, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0x9E, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x7E, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x5E, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x05, 0x04, 0x05,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x28, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0x62, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0xD3, 0x94, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x74, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5B, 0x66, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xD3, 0x51, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x3B, 0x48, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xBC, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x24, 0x65, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x9C, 0x4F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xC4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x3B, 0xF5, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA3, 0xED, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x1B, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x60, 0x05, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0xFF, 0x7D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x3D, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0xE3, 0x53, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xDB, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xA7, 0x86, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xC5, 0xA9, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0x87, 0x68, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xE3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xC5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xE2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xE1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x35, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x16, 0x48, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0xF7, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x6A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x86, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x68, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xB2, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x7D, 0x9B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xEA, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x5B, 0x82, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x3B, 0x64, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x1B, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xFB, 0x28, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xDB, 0x0A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x7A, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x5A, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x43, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x23, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x2E, 0xC6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x8A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x17, 0xE2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xF7, 0xD2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xD7, 0xB4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x6B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xB7, 0x96, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x97, 0x78, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x2F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x77, 0x5A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x4B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x3C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x2D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x40, 0x59, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0xD5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0xB7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x5B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x24, 0x17, 0x50, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xF9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x6D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x85, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xBF, 0x4E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0xE0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x13, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xF5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xD7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE4, 0xF3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xD5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xB7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0x99, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0x98, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x7A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x1E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF, 0xB2, 0xC8, 0x00, 0x00, 0xFF,
-0xFF, 0xB2, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x35, 0x43, 0x44,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x2F, 0x31, 0x0A, 0x00, 0xAC, 0xA0, 0xB5, 0x00, 0x94, 0xFA, 0x05, 0x00, 0x00, 0x00,
-0x00,
+0x04, 0xFF, 0xFF, 0xB2, 0xC8, 0x00, 0x00, 0xFF, 0xFF, 0xB2, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x43, 0x53, 0x54, 0x35, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
+0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x31, 0x0A,
+#endif
+0x00, 0xAC, 0xA0, 0xB5, 0x00, 0x94, 0xFA, 0x05, 0x00, 0x00, 0x00, 0x00,
/* America/Hermosillo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7699,6 +8125,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00,
0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
@@ -7715,10 +8142,11 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00,
0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, 0x00, 0xB5, 0xAE, 0x6A, 0x00, 0x69, 0x56, 0x25, 0x00, 0x00,
-0x00, 0x1F, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64,
-0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x53, 0x6F, 0x6E, 0x6F, 0x72,
-0x61,
+0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0xB5, 0xAE, 0x6A, 0x00, 0x69, 0x56, 0x25, 0x00, 0x00, 0x00, 0x1F, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69,
+0x6D, 0x65, 0x20, 0x2D, 0x20, 0x53, 0x6F, 0x6E, 0x6F, 0x72, 0x61,
/* America/Indiana/Indianapolis */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7759,76 +8187,78 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0,
-0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB,
-0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF,
-0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
-0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC6, 0x02, 0xC1, 0x00,
-0x8F, 0x31, 0x02, 0x00, 0x00, 0x00, 0x27, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20,
-0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0xFF, 0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF,
+0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53,
+0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC6, 0x02, 0xC1, 0x00, 0x8F, 0x31, 0x02, 0x00, 0x00, 0x00, 0x19, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61,
+0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Indiana/Knox */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -7886,107 +8316,109 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0,
0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88,
-0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20,
-0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00,
-0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0,
-0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0,
-0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9,
-0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89,
-0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69,
-0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49,
-0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57,
-0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37,
-0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2,
-0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1,
-0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6,
-0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF,
-0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F,
-0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75,
-0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF,
-0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE,
-0xCA, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53,
-0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC8, 0x57, 0x6F, 0x00, 0x8E, 0x7A, 0x9C, 0x00, 0x00, 0x00,
-0x26, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20,
-0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20, 0x53, 0x74, 0x61, 0x72, 0x6B, 0x65,
-0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0xAE, 0xCA, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
+0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
+0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC8, 0x57, 0x6F, 0x00, 0x8E, 0x7A, 0x9C, 0x00, 0x00, 0x00, 0x15, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x53, 0x74, 0x61, 0x72, 0x6B, 0x65,
+0x29,
/* America/Indiana/Marengo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8029,78 +8461,80 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x0D, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
-0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
-0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
-0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0xC3, 0xE2, 0xB3, 0x00, 0x8E, 0xE8, 0x17, 0x00, 0x00, 0x00, 0x28, 0x45,
-0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x49, 0x6E,
-0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x61, 0x77, 0x66, 0x6F, 0x72, 0x64,
-0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x0D, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D,
+0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50,
+0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54,
+0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC3, 0xE2, 0xB3, 0x00, 0x8E, 0xE8, 0x17, 0x00, 0x00, 0x00, 0x17, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x43, 0x72, 0x61, 0x77, 0x66, 0x6F,
+0x72, 0x64, 0x29,
/* America/Indiana/Petersburg */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8147,193 +8581,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53,
0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x67, 0x3D, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x86, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x68, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01, 0x02, 0x01,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAE,
-0x2D, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45,
-0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC4, 0x10, 0x2A, 0x00, 0x8D, 0x7B,
-0x4A, 0x00, 0x00, 0x00, 0x24, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D,
-0x65, 0x20, 0x2D, 0x20, 0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20, 0x50, 0x69,
-0x6B, 0x65, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
-
-/* America/Indianapolis */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0x80, 0x00, 0x00, 0x00,
-0x9E, 0xA6, 0x2C, 0x80, 0x9F, 0xBA, 0xF9, 0x70, 0xA0, 0x86, 0x0E, 0x80, 0xA1, 0x9A, 0xDB, 0x70,
-0xCA, 0x57, 0x22, 0x80, 0xCA, 0xD8, 0x47, 0x70, 0xCB, 0x88, 0xFE, 0x80, 0xD2, 0x23, 0xF4, 0x70,
-0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x75, 0xF3, 0x00, 0xD4, 0x40, 0xEB, 0xF0, 0xD5, 0x55, 0xD5, 0x00,
-0xD6, 0x20, 0xCD, 0xF0, 0xD7, 0x35, 0xB7, 0x00, 0xD8, 0x00, 0xAF, 0xF0, 0xD9, 0x15, 0x99, 0x00,
-0xD9, 0xE0, 0x91, 0xF0, 0xDA, 0xFE, 0xB5, 0x80, 0xDB, 0xC0, 0x73, 0xF0, 0xDC, 0xDE, 0x97, 0x80,
-0xDD, 0xA9, 0x90, 0x70, 0xDE, 0xBE, 0x79, 0x80, 0xDF, 0x89, 0x72, 0x70, 0xE0, 0x9E, 0x5B, 0x80,
-0xE1, 0x69, 0x54, 0x70, 0xE2, 0x7E, 0x3D, 0x80, 0xE3, 0x49, 0x36, 0x70, 0xE4, 0x5E, 0x1F, 0x80,
-0xE8, 0xF2, 0x16, 0xF0, 0xEA, 0x07, 0x00, 0x00, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xA7, 0xFF, 0xE0,
-0x00, 0x97, 0xFE, 0xF0, 0x01, 0x87, 0xE1, 0xE0, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60,
-0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0,
-0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60,
-0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60,
-0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60,
-0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0,
-0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0,
-0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0,
-0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60,
-0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60,
-0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60,
-0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0,
-0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0,
-0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60,
-0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60,
-0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60,
-0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
-0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x3A, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
-0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0,
-0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB,
-0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF,
-0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
-0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x67, 0x3D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAE, 0x2D, 0x00, 0x00, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
+0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7,
+0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
+0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53,
+0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC4, 0x10, 0x2A, 0x00, 0x8D, 0x7B, 0x4A, 0x00, 0x00, 0x00, 0x13, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x50, 0x69, 0x6B, 0x65, 0x29,
/* America/Indiana/Tell_City */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8376,78 +8704,80 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE4, 0x67, 0x3D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0x9E, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE, 0xA9, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
-0xFF, 0xC7, 0xC0, 0x01, 0x18, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
-0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
-0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC3, 0x3D, 0xA9, 0x00, 0x8E, 0x45, 0x55, 0x00,
-0x00, 0x00, 0x25, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20,
-0x2D, 0x20, 0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20, 0x50, 0x65, 0x72, 0x72,
-0x79, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x67, 0x3D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0x9E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0xFF, 0xFF, 0xAE, 0xA9, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF,
+0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10,
+0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
+0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D,
+0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC3, 0x3D, 0xA9, 0x00, 0x8E, 0x45, 0x55, 0x00, 0x00, 0x00, 0x14, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x50, 0x65, 0x72, 0x72, 0x79, 0x29,
+
/* America/Indiana/Vevay */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8483,66 +8813,68 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43,
0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
-0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00,
-0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0xFF, 0xFF, 0xB0, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF,
-0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
-0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
-0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00,
-0xC4, 0x74, 0x19, 0x00, 0x90, 0xDB, 0x1D, 0x00, 0x00, 0x00, 0x2B, 0x45, 0x61, 0x73, 0x74, 0x65,
-0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E,
-0x61, 0x20, 0x2D, 0x20, 0x53, 0x77, 0x69, 0x74, 0x7A, 0x65, 0x72, 0x6C, 0x61, 0x6E, 0x64, 0x20,
-0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF,
+0xB0, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0,
+0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
+0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
+0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC4, 0x74, 0x19, 0x00, 0x90, 0xDB, 0x1D, 0x00, 0x00, 0x00, 0x1A, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x53, 0x77, 0x69, 0x74, 0x7A, 0x65,
+0x72, 0x6C, 0x61, 0x6E, 0x64, 0x29,
/* America/Indiana/Vincennes */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8584,79 +8916,79 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C,
0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43,
0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE4, 0x67, 0x3D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0x9E, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x01, 0x02, 0x01, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAD, 0xF1, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
-0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
-0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
-0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC4, 0x58, 0x8A, 0x00, 0x8D, 0x19, 0xA2, 0x00,
-0x00, 0x00, 0x40, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20,
-0x2D, 0x20, 0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20, 0x44, 0x61, 0x76, 0x69,
-0x65, 0x73, 0x73, 0x2C, 0x20, 0x44, 0x75, 0x62, 0x6F, 0x69, 0x73, 0x2C, 0x20, 0x4B, 0x6E, 0x6F,
-0x78, 0x20, 0x26, 0x20, 0x4D, 0x61, 0x72, 0x74, 0x69, 0x6E, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74,
-0x69, 0x65, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x67, 0x3D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0x9E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0xFF, 0xFF, 0xAD, 0xF1, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF,
+0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10,
+0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00,
+0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D,
+0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC4, 0x58, 0x8A, 0x00, 0x8D, 0x19, 0xA2, 0x00, 0x00, 0x00, 0x1C, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x44, 0x61, 0x2C, 0x20, 0x44, 0x75,
+0x2C, 0x20, 0x4B, 0x2C, 0x20, 0x4D, 0x6E, 0x29,
/* America/Indiana/Winamac */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8700,80 +9032,193 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E,
-0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1,
-0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5,
-0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7,
-0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC,
-0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE,
-0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
-0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2,
-0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4,
-0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6,
-0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA,
-0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB,
-0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED,
-0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF,
-0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69,
-0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x01,
-0x02, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x01, 0x02, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAE, 0xCF, 0x00, 0x00, 0xFF, 0xFF,
+0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0,
+0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57,
+0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54,
+0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
+0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC7, 0xF7, 0xF2, 0x00, 0x8E, 0x83, 0x2E, 0x00, 0x00, 0x00, 0x16, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x49, 0x4E, 0x20, 0x28, 0x50, 0x75, 0x6C, 0x61, 0x73, 0x6B,
+0x69, 0x29,
+
+/* America/Indianapolis */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0x80, 0x00, 0x00, 0x00,
+0x9E, 0xA6, 0x2C, 0x80, 0x9F, 0xBA, 0xF9, 0x70, 0xA0, 0x86, 0x0E, 0x80, 0xA1, 0x9A, 0xDB, 0x70,
+0xCA, 0x57, 0x22, 0x80, 0xCA, 0xD8, 0x47, 0x70, 0xCB, 0x88, 0xFE, 0x80, 0xD2, 0x23, 0xF4, 0x70,
+0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x75, 0xF3, 0x00, 0xD4, 0x40, 0xEB, 0xF0, 0xD5, 0x55, 0xD5, 0x00,
+0xD6, 0x20, 0xCD, 0xF0, 0xD7, 0x35, 0xB7, 0x00, 0xD8, 0x00, 0xAF, 0xF0, 0xD9, 0x15, 0x99, 0x00,
+0xD9, 0xE0, 0x91, 0xF0, 0xDA, 0xFE, 0xB5, 0x80, 0xDB, 0xC0, 0x73, 0xF0, 0xDC, 0xDE, 0x97, 0x80,
+0xDD, 0xA9, 0x90, 0x70, 0xDE, 0xBE, 0x79, 0x80, 0xDF, 0x89, 0x72, 0x70, 0xE0, 0x9E, 0x5B, 0x80,
+0xE1, 0x69, 0x54, 0x70, 0xE2, 0x7E, 0x3D, 0x80, 0xE3, 0x49, 0x36, 0x70, 0xE4, 0x5E, 0x1F, 0x80,
+0xE8, 0xF2, 0x16, 0xF0, 0xEA, 0x07, 0x00, 0x00, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xA7, 0xFF, 0xE0,
+0x00, 0x97, 0xFE, 0xF0, 0x01, 0x87, 0xE1, 0xE0, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60,
+0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0,
+0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60,
+0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60,
+0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60,
+0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0,
+0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0,
+0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0,
+0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60,
+0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60,
+0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60,
+0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0,
+0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0,
+0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60,
+0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60,
+0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60,
+0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF,
-0xFF, 0xAE, 0xCF, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
-0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC7, 0xF7, 0xF2, 0x00,
-0x8E, 0x83, 0x2E, 0x00, 0x00, 0x00, 0x27, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x49, 0x6E, 0x64, 0x69, 0x61, 0x6E, 0x61, 0x20, 0x2D, 0x20,
-0x50, 0x75, 0x6C, 0x61, 0x73, 0x6B, 0x69, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x3A, 0x00,
+0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
+0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0xFF, 0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF,
+0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53,
+0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Inuvik */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8820,86 +9265,89 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x09, 0xFF, 0xFF, 0x9D, 0x90, 0x00,
0x0D, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x11, 0x7A, 0x7A, 0x7A, 0x00, 0x50, 0x44, 0x44, 0x54, 0x00,
0x50, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x06,
-0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69,
-0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49,
-0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29,
-0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09,
-0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2,
-0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2,
-0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1,
-0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76,
-0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55,
-0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35,
-0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15,
-0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE,
-0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE,
-0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE,
-0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E,
-0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E,
-0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67,
-0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47,
-0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27,
-0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07,
-0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7,
-0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6,
-0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0,
-0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F,
-0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F,
-0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F,
-0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F,
-0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3,
-0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3,
-0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3,
-0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C,
-0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C,
-0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C,
-0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C,
-0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C,
-0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC,
-0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5,
-0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5,
-0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4,
-0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84,
-0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64,
-0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D,
-0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D,
-0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D,
-0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED,
-0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD,
-0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD,
-0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96,
-0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76,
-0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56,
-0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35,
-0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15,
-0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE,
-0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE,
-0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE,
-0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E,
-0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E,
-0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E,
-0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x06, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
-0xFF, 0x8F, 0x80, 0x00, 0x09, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0D, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
-0x11, 0x7A, 0x7A, 0x7A, 0x00, 0x50, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x53,
-0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xF1, 0x9F, 0x5C, 0x00, 0x46, 0x9F, 0x6D,
-0x00, 0x00, 0x00, 0x2A, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D,
-0x65, 0x20, 0x2D, 0x20, 0x77, 0x65, 0x73, 0x74, 0x20, 0x4E, 0x6F, 0x72, 0x74, 0x68, 0x77, 0x65,
-0x73, 0x74, 0x20, 0x54, 0x65, 0x72, 0x72, 0x69, 0x74, 0x6F, 0x72, 0x69, 0x65, 0x73,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x09, 0xFF,
+0xFF, 0x9D, 0x90, 0x00, 0x0D, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x11, 0x7A, 0x7A, 0x7A, 0x00, 0x50,
+0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0xF1, 0x9F, 0x5C, 0x00, 0x46, 0x9F, 0x6D, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x4E, 0x54, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29,
+
/* America/Iqaluit */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -8949,91 +9397,92 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xC7, 0xC0, 0x01, 0x11, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x45, 0x50,
0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x44, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45,
0x57, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x6C, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0x2F, 0x3E, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x69, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19,
-0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x05, 0x01, 0x02, 0x03,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x06, 0x07, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x11, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x15, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x19, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x1D, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x11, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x45, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x44,
-0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xEA,
-0x94, 0x15, 0x00, 0xAA, 0x2F, 0xB5, 0x00, 0x00, 0x00, 0x2C, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72,
-0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x65, 0x61, 0x73, 0x74, 0x20, 0x4E, 0x75,
-0x6E, 0x61, 0x76, 0x75, 0x74, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63,
-0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x6C, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x3E, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x69, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x05, 0x01, 0x02,
+0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x06, 0x07, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
+0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF,
+0xC7, 0xC0, 0x01, 0x11, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x15, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x19,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x1D, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x11, 0xFF, 0xFF, 0xB9, 0xB0,
+0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x45, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44,
+0x44, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
+0x44, 0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C,
+0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xEA, 0x94, 0x15, 0x00, 0xAA, 0x2F, 0xB5, 0x00, 0x00, 0x00, 0x1E, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4E, 0x55, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x65,
+0x61, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Jamaica */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9048,27 +9497,30 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00,
0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0,
0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x69, 0x87, 0x23, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x01,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54,
-0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00, 0xA4, 0xBF, 0x05, 0x00,
-0x9D, 0x7B, 0x1A, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x23, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
+0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
+0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45,
+0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x0A,
+#endif
+0x00, 0xA4, 0xBF, 0x05, 0x00, 0x9D, 0x7B, 0x1A, 0x00, 0x00, 0x00, 0x00,
/* America/Jujuy */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9098,52 +9550,54 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C,
0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2,
-0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7,
-0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA,
-0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC,
-0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE,
-0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
-0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2,
-0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4,
-0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5,
-0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07,
-0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37,
-0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x04,
-0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xC8, 0x00, 0x00, 0xFF, 0xFF, 0xC3,
-0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF,
-0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
-0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
-0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAE, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xEE, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC2, 0xC8, 0x00, 0x00, 0xFF, 0xFF,
+0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
+0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF,
+0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Juneau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9200,103 +9654,106 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54,
0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B,
0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xD1,
-0x85, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x32, 0xC5, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x63,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x42,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x24,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x06,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x39,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x1B,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xFD,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xDF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xFB,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xDD,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xBF,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xA1,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x83,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xA0,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x82,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x64,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x46,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x28,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x0A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x26,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x08,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xEA,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xCC,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xAE,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xE1,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xC3,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xA5,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xC1,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xA3,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x85,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x67,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x49,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x2B,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x06, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x07, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0xD3, 0x7B, 0x00, 0x00,
-0xFF, 0xFF, 0x81, 0xFB, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90,
-0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF,
-0x8F, 0x80, 0x01, 0x14, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x18, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x1C,
-0xFF, 0xFF, 0x81, 0x70, 0x00, 0x21, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57,
-0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53,
-0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
-0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE2, 0x4A, 0x72, 0x00, 0x45,
-0x8C, 0xCB, 0x00, 0x00, 0x00, 0x1E, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x54, 0x69, 0x6D,
-0x65, 0x20, 0x2D, 0x20, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x70, 0x61, 0x6E, 0x68, 0x61,
-0x6E, 0x64, 0x6C, 0x65,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xD1, 0x85, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x32, 0xC5, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x06, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0xD3, 0x7B, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0xFB, 0x00,
+0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D,
+0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x14, 0xFF,
+0xFF, 0x81, 0x70, 0x00, 0x18, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x1C, 0xFF, 0xFF, 0x81, 0x70, 0x00,
+0x21, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x50, 0x44, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44,
+0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54,
+0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xE2, 0x4A, 0x72, 0x00, 0x45, 0x8C, 0xCB, 0x00, 0x00, 0x00, 0x14, 0x41, 0x6C, 0x61, 0x73,
+0x6B, 0x61, 0x20, 0x2D, 0x20, 0x4A, 0x75, 0x6E, 0x65, 0x61, 0x75, 0x20, 0x61, 0x72, 0x65, 0x61,
+
/* America/Kentucky/Louisville */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9362,121 +9819,123 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18,
0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00,
0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x00, 0x00,
-0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x73, 0xF7, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA5, 0x16, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0xDB, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA4, 0x09, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x1E, 0x90, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0xFF, 0xFF, 0xAF, 0x9A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF,
-0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45,
-0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC3, 0xB3,
-0x48, 0x00, 0x8F, 0xCC, 0xB7, 0x00, 0x00, 0x00, 0x29, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4B, 0x65, 0x6E, 0x74, 0x75, 0x63, 0x6B, 0x79,
-0x20, 0x2D, 0x20, 0x4C, 0x6F, 0x75, 0x69, 0x73, 0x76, 0x69, 0x6C, 0x6C, 0x65, 0x20, 0x61, 0x72,
-0x65, 0x61,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xB3, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x73, 0xF7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x16, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0xA4, 0x09, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x1E, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x9A, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
+0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
+0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
+0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC3, 0xB3, 0x48, 0x00, 0x8F, 0xCC, 0xB7, 0x00, 0x00, 0x00, 0x1E, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4B, 0x59, 0x20, 0x28, 0x4C, 0x6F, 0x75, 0x69, 0x73, 0x76,
+0x69, 0x6C, 0x6C, 0x65, 0x20, 0x61, 0x72, 0x65, 0x61, 0x29,
/* America/Kentucky/Monticello */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9533,103 +9992,106 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xC7, 0xC0, 0x01, 0x14, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x44,
0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xB0,
-0x74, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
-0x14, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45,
-0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC1, 0x86, 0xDC, 0x00, 0x91, 0x30,
-0x4B, 0x00, 0x00, 0x00, 0x26, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D,
-0x65, 0x20, 0x2D, 0x20, 0x4B, 0x65, 0x6E, 0x74, 0x75, 0x63, 0x6B, 0x79, 0x20, 0x2D, 0x20, 0x57,
-0x61, 0x79, 0x6E, 0x65, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xB0, 0x74, 0x00, 0x00, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
+0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x14, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
+0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53,
+0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC1, 0x86, 0xDC, 0x00, 0x91, 0x30, 0x4B, 0x00, 0x00, 0x00, 0x14, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4B, 0x59, 0x20, 0x28, 0x57, 0x61, 0x79, 0x6E, 0x65, 0x29,
+
/* America/Knox_IN */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9687,105 +10149,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0,
0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88,
-0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20,
-0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00,
-0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0,
-0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0,
-0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9,
-0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89,
-0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69,
-0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49,
-0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57,
-0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37,
-0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2,
-0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1,
-0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6,
-0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF,
-0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F,
-0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75,
-0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF,
-0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE,
-0xCA, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53,
-0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0xAE, 0xCA, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
+0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
+0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Kralendijk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9793,14 +10257,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x93, 0x1E, 0x2E, 0x23, 0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00,
0x00, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xB8,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0,
+0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34,
+0x0A,
+#endif
0x00, 0x9B, 0xDE, 0xAB, 0x00, 0xAA, 0x79, 0xED, 0x00, 0x00, 0x00, 0x00,
/* America/La_Paz */
@@ -9810,16 +10277,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB8, 0x1E, 0x96, 0xE4, 0xB8, 0xEE, 0xD5, 0xD4, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xC0, 0x1C, 0x00,
0x00, 0xFF, 0xFF, 0xC0, 0x1C, 0x00, 0x04, 0xFF, 0xFF, 0xCE, 0x2C, 0x01, 0x08, 0xFF, 0xFF, 0xC7,
0xC0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4F, 0x53, 0x54, 0x00,
-0x42, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1B, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x96, 0xE4,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEE, 0xD5, 0xD4, 0x00, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xC0, 0x1C,
-0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x1C, 0x00, 0x04, 0xFF, 0xFF, 0xCE, 0x2C, 0x01, 0x08, 0xFF, 0xFF,
-0xC7, 0xC0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4F, 0x53, 0x54,
-0x00, 0x42, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x4F,
-0x54, 0x34, 0x0A, 0x00, 0x70, 0x26, 0xF0, 0x00, 0xAA, 0xAB, 0x68, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1B, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x1E, 0x96, 0xE4, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEE, 0xD5, 0xD4, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0xC0, 0x1C, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x1C, 0x00, 0x04, 0xFF, 0xFF, 0xCE, 0x2C,
+0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00,
+0x42, 0x4F, 0x53, 0x54, 0x00, 0x42, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x42, 0x4F, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x70, 0x26, 0xF0, 0x00, 0xAA, 0xAB, 0x68, 0x00, 0x00, 0x00, 0x00,
/* America/Lima */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9832,23 +10302,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xB7, 0xC4,
0x00, 0x00, 0xFF, 0xFF, 0xB7, 0xAC, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF,
0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x45, 0x53, 0x54, 0x00, 0x50, 0x45, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x69, 0x87, 0x23, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x74, 0x40, 0xD4, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC3, 0xCF, 0x4A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x45, 0xE3, 0x40, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC5, 0x2F, 0x4A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x1F, 0x2D, 0xC0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC7, 0x0F, 0x2C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xFF, 0x0F, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x18, 0xC4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8F, 0x5D, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xF9, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x90, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x9E, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x7C, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x25, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x9C, 0x40, 0x00, 0x01, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF,
-0xB7, 0xC4, 0x00, 0x00, 0xFF, 0xFF, 0xB7, 0xAC, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04,
-0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x45, 0x53, 0x54, 0x00, 0x50,
-0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x45, 0x54, 0x35,
-0x0A, 0x00, 0x76, 0xF1, 0x38, 0x00, 0x9D, 0x16, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x23, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x8C, 0x74, 0x40, 0xD4, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xCF, 0x4A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x45, 0xE3, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x4A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x1F, 0x2D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x2C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xFF, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x18, 0xC4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8F, 0x5D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF9, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x70, 0x90, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x9E, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x7C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x25, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x9C, 0x40, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xB7, 0xC4, 0x00, 0x00, 0xFF, 0xFF, 0xB7, 0xAC, 0x00,
+0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54,
+0x00, 0x50, 0x45, 0x53, 0x54, 0x00, 0x50, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x50, 0x45, 0x54, 0x35, 0x0A,
+#endif
+0x00, 0x76, 0xF1, 0x38, 0x00, 0x9D, 0x16, 0xD8, 0x00, 0x00, 0x00, 0x00,
/* America/Los_Angeles */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -9915,104 +10388,105 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x91, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08,
0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0xFE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x80, 0xAD, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBB, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x80, 0xAD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -10023,14 +10497,16 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x91, 0x26, 0x00, 0x00, 0xFF,
-0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
-0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50,
-0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xBD, 0x49,
-0xE6, 0x00, 0x5E, 0x3B, 0xEA, 0x00, 0x00, 0x00, 0x0C, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63,
-0x20, 0x54, 0x69, 0x6D, 0x65,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0x91, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
+0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38,
+0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xBD, 0x49, 0xE6, 0x00, 0x5E, 0x3B, 0xEA, 0x00, 0x00, 0x00, 0x07, 0x50, 0x61, 0x63, 0x69,
+0x66, 0x69, 0x63,
/* America/Louisville */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10096,118 +10572,121 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18,
0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00,
0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x00, 0x00,
-0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x73, 0xF7, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA5, 0x16, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0xDB, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA4, 0x09, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x1E, 0x90, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0xFF, 0xFF, 0xAF, 0x9A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF,
-0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43,
-0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45,
-0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xB3, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x73, 0xF7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x16, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0xA4, 0x09, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x1E, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x9A, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
+0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
+0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
+0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Lower_Princes */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10215,14 +10694,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x93, 0x1E, 0x2E, 0x23, 0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00,
0x00, 0xFF, 0xFF, 0xC0, 0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xB8,
-0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+0x00, 0x41, 0x4E, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x1E, 0x2E, 0x23, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x98, 0xEC, 0x48, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x5D, 0x00, 0x00, 0xFF, 0xFF, 0xC0,
+0xB8, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34,
+0x0A,
+#endif
0x00, 0xA4, 0xDF, 0x92, 0x00, 0xB2, 0x74, 0xAD, 0x00, 0x00, 0x00, 0x00,
/* America/Maceio */
@@ -10244,38 +10726,41 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF,
0xDE, 0x84, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x68, 0x7C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xF2, 0x4A, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDE, 0x84, 0x00, 0x00, 0xFF,
-0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42,
-0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42,
-0x52, 0x54, 0x33, 0x0A, 0x00, 0x7A, 0x94, 0x35, 0x00, 0xDC, 0x28, 0xAD, 0x00, 0x00, 0x00, 0x10,
-0x41, 0x6C, 0x61, 0x67, 0x6F, 0x61, 0x73, 0x2C, 0x20, 0x53, 0x65, 0x72, 0x67, 0x69, 0x70, 0x65,
-
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x68, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xF2, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDE, 0x84, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0,
+0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54,
+0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33,
+0x0A,
+#endif
+0x00, 0x7A, 0x94, 0x35, 0x00, 0xDC, 0x28, 0xAD, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x61, 0x67,
+0x6F, 0x61, 0x73, 0x2C, 0x20, 0x53, 0x65, 0x72, 0x67, 0x69, 0x70, 0x65,
/* America/Managua */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10290,6 +10775,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
@@ -10306,8 +10792,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9,
0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A, 0x00,
-0x9B, 0xDE, 0x58, 0x00, 0x8F, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x9B, 0xDE, 0x58, 0x00, 0x8F, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
/* America/Manaus */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10325,45 +10812,51 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0xBC,
0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D,
0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7F, 0x44, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7,
-0xBC, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x0A, 0x00, 0x84, 0x8C, 0x4A, 0x00, 0xB7, 0x14, 0x7D,
-0x00, 0x00, 0x00, 0x0A, 0x45, 0x20, 0x41, 0x6D, 0x61, 0x7A, 0x6F, 0x6E, 0x61, 0x73,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7F, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0xBC,
+0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x84, 0x8C, 0x4A, 0x00, 0xB7, 0x14, 0x7D, 0x00, 0x00, 0x00, 0x0F, 0x41, 0x6D, 0x61, 0x7A,
+0x6F, 0x6E, 0x61, 0x73, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29,
/* America/Marigot */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA4, 0xE5, 0x8A, 0x00, 0xB2,
-0x66, 0x92, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA4, 0xE5, 0x8A, 0x00, 0xB2, 0x66, 0x92, 0x00, 0x00, 0x00, 0x00,
/* America/Martinique */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10373,16 +10866,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xC6, 0xBC, 0x00, 0x00, 0xFF, 0xFF, 0xC6, 0xBC, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0,
0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x46, 0x4D, 0x54,
0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x14, 0xC4, 0xFF, 0xFF, 0xFF,
-0xFF, 0x91, 0xA3, 0xC8, 0x44, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x6E, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x34, 0x16, 0xB0, 0x00, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC6, 0xBC, 0x00, 0x00,
-0xFF, 0xFF, 0xC6, 0xBC, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0,
-0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x46, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41,
-0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34,
-0x0A, 0x00, 0x9F, 0x9B, 0x60, 0x00, 0xB5, 0x73, 0xD2, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x14, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0xA3, 0xC8, 0x44, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x6E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x34, 0x16, 0xB0, 0x00, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC6, 0xBC, 0x00, 0x00, 0xFF,
+0xFF, 0xC6, 0xBC, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x46, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x9F, 0x9B, 0x60, 0x00, 0xB5, 0x73, 0xD2, 0x00, 0x00, 0x00, 0x00,
/* America/Matamoros */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10417,68 +10913,70 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xA2, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04,
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x98, 0x0E, 0x70, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xA2, 0x40,
-0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xB0, 0xBF, 0x65, 0x00, 0x7D, 0xE2, 0x90,
-0x00, 0x00, 0x00, 0x4A, 0x55, 0x53, 0x20, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x43, 0x6F, 0x61, 0x68, 0x75, 0x69, 0x6C, 0x61, 0x2C, 0x20,
-0x44, 0x75, 0x72, 0x61, 0x6E, 0x67, 0x6F, 0x2C, 0x20, 0x4E, 0x75, 0x65, 0x76, 0x6F, 0x20, 0x4C,
-0x65, 0x6F, 0x6E, 0x2C, 0x20, 0x54, 0x61, 0x6D, 0x61, 0x75, 0x6C, 0x69, 0x70, 0x61, 0x73, 0x20,
-0x6E, 0x65, 0x61, 0x72, 0x20, 0x55, 0x53, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xA2, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54,
+0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xB0, 0xBF, 0x65, 0x00, 0x7D, 0xE2, 0x90, 0x00, 0x00, 0x00, 0x3E, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x55, 0x53, 0x20, 0x2D, 0x20, 0x43, 0x6F,
+0x61, 0x68, 0x75, 0x69, 0x6C, 0x61, 0x2C, 0x20, 0x4E, 0x75, 0x65, 0x76, 0x6F, 0x20, 0x4C, 0x65,
+0x6F, 0x6E, 0x2C, 0x20, 0x54, 0x61, 0x6D, 0x61, 0x75, 0x6C, 0x69, 0x70, 0x61, 0x73, 0x20, 0x28,
+0x55, 0x53, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72, 0x29,
/* America/Mazatlan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10517,72 +11015,76 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53,
0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6,
-0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66,
-0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C,
-0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA,
-0x71, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6,
-0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24,
-0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04,
-0x23, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4,
-0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD,
-0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAD,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C,
-0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C,
-0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C,
-0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C,
-0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15,
-0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5,
-0x8A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x9F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5,
-0x6C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5,
-0x4E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95,
-0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E,
-0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E,
-0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E,
-0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D,
-0xF3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD,
-0xD5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD,
-0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB2, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6,
-0xD3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6,
-0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xCA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86,
-0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66,
-0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46,
-0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F,
-0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F,
-0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x6F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF,
-0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF,
-0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAF,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E,
-0xE2, 0x00, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x71, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x91, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x98, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAD, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x78, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x61, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x41, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x00, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xE0, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x8A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xC0, 0x9F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x6C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA9, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x4E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x89, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x69, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x49, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x29, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x12, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD2, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB2, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xD3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x71, 0xCA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x5A, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x3A, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x1A, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xFA, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xDA, 0x6F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xBA, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA3, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x83, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xE2, 0x00, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0xFF, 0xFF, 0x9C, 0x3C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
-0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF,
-0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E,
-0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xAC, 0xC1, 0x42,
-0x00, 0x70, 0x47, 0x7D, 0x00, 0x00, 0x00, 0x28, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x53, 0x20, 0x42, 0x61, 0x6A, 0x61, 0x2C, 0x20,
-0x4E, 0x61, 0x79, 0x61, 0x72, 0x69, 0x74, 0x2C, 0x20, 0x53, 0x69, 0x6E, 0x61, 0x6C, 0x6F, 0x61,
-
+0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF, 0xFF, 0x9C, 0x3C, 0x00, 0x00,
+0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80,
+0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D,
+0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x44,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D,
+0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
+0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xAC, 0xC1, 0x42, 0x00, 0x70, 0x47, 0x7D, 0x00, 0x00, 0x00, 0x35, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x42, 0x61, 0x6A, 0x61,
+0x20, 0x43, 0x61, 0x6C, 0x69, 0x66, 0x6F, 0x72, 0x6E, 0x69, 0x61, 0x20, 0x53, 0x75, 0x72, 0x2C,
+0x20, 0x4E, 0x61, 0x79, 0x61, 0x72, 0x69, 0x74, 0x2C, 0x20, 0x53, 0x69, 0x6E, 0x61, 0x6C, 0x6F,
+0x61,
/* America/Mendoza */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10613,53 +11115,55 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54,
0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57,
0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x72, 0x9C, 0xB2, 0x04, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x19, 0x34, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xCD, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xFA, 0x67, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE0, 0xE1, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xB0, 0x13, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x56, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x04, 0x05, 0x03, 0x05, 0x06,
-0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0x7C, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
-0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5,
-0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00,
-0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xB2, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x19, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCD, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xFA, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xE1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xB0, 0x13, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x56, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x04, 0x05, 0x03, 0x05, 0x06, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xBF, 0x7C, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x16, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52,
+0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Menominee */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10714,102 +11218,103 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x61,
-0x77, 0x49, 0x63, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1,
-0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9,
-0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0xB8, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C,
-0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69,
-0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x05, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAD, 0xDD, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF,
-0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
-0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
-0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xCE, 0x28, 0x79, 0x00,
-0x8C, 0xF8, 0x37, 0x00, 0x00, 0x00, 0x47, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4D, 0x69, 0x63, 0x68, 0x69, 0x67, 0x61, 0x6E, 0x20, 0x2D,
-0x20, 0x44, 0x69, 0x63, 0x6B, 0x69, 0x6E, 0x73, 0x6F, 0x6E, 0x2C, 0x20, 0x47, 0x6F, 0x67, 0x65,
-0x62, 0x69, 0x63, 0x2C, 0x20, 0x49, 0x72, 0x6F, 0x6E, 0x20, 0x26, 0x20, 0x4D, 0x65, 0x6E, 0x6F,
-0x6D, 0x69, 0x6E, 0x65, 0x65, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x69, 0x65, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x61, 0x77, 0x49, 0x63, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAD, 0xDD,
+0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF,
+0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53,
+0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54,
+0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
+0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xCE, 0x28, 0x79, 0x00, 0x8C, 0xF8, 0x37, 0x00, 0x00, 0x00, 0x1F, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4D, 0x49, 0x20, 0x28, 0x57, 0x69, 0x73, 0x63, 0x6F, 0x6E,
+0x73, 0x69, 0x6E, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72, 0x29,
/* America/Merida */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10845,72 +11350,75 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x01, 0x03, 0x01, 0xFF, 0xFF, 0xAB, 0xFC, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04,
0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x86, 0xD5, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x4C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x04, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x66, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x83, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x65, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x47, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x29, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x0B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x27, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x09, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xEB, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xCD, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xAF, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x91, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xAE, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x72, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x36, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x52, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x34, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x16, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0xF8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xDA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xBC, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xD9, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xBB, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0x9D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x7F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x61, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x43, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x5F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x41, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x86, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x4C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0xFF, 0xFF, 0xAB, 0xFC, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54,
-0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+0x03, 0x01, 0x03, 0x01, 0xFF, 0xFF, 0xAB, 0xFC, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04,
+0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54,
+0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
+0x35, 0x2E, 0x30, 0x0A,
+#endif
0x00, 0xA9, 0x52, 0x5A, 0x00, 0x89, 0xE9, 0xFD, 0x00, 0x00, 0x00, 0x20, 0x43, 0x65, 0x6E, 0x74,
0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x43, 0x61, 0x6D, 0x70, 0x65,
0x63, 0x68, 0x65, 0x2C, 0x20, 0x59, 0x75, 0x63, 0x61, 0x74, 0x61, 0x6E,
/* America/Metlakatla */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1E, 0x80, 0x00, 0x00, 0x00,
0xCB, 0x89, 0x1A, 0xA0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x26, 0x10, 0xFE, 0xB8, 0x47, 0x20,
0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x98, 0x29, 0x20, 0x01, 0x88, 0x0C, 0x10, 0x02, 0x78, 0x0B, 0x20,
0x03, 0x71, 0x28, 0x90, 0x04, 0x61, 0x27, 0xA0, 0x05, 0x51, 0x0A, 0x90, 0x06, 0x41, 0x09, 0xA0,
@@ -10919,44 +11427,89 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0E, 0xB9, 0xAF, 0x10, 0x0F, 0xA9, 0xAE, 0x20, 0x10, 0x99, 0x91, 0x10, 0x11, 0x89, 0x90, 0x20,
0x12, 0x79, 0x73, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, 0x15, 0x49, 0x54, 0x20,
0x16, 0x39, 0x37, 0x10, 0x17, 0x29, 0x36, 0x20, 0x18, 0x22, 0x53, 0x90, 0x19, 0x09, 0x18, 0x20,
-0x1A, 0x02, 0x35, 0x90, 0x01, 0x02, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
+0x1A, 0x02, 0x35, 0x90, 0x56, 0x35, 0xE2, 0xA0, 0x56, 0xE5, 0x48, 0x30, 0x58, 0x1E, 0xFF, 0x20,
+0x58, 0xC5, 0x2A, 0x30, 0x59, 0xFE, 0xE1, 0x20, 0x5A, 0xA5, 0x0C, 0x30, 0x5B, 0xDE, 0xC3, 0x20,
+0x5C, 0x84, 0xEE, 0x30, 0x5D, 0xBE, 0xA5, 0x20, 0x5E, 0x64, 0xD0, 0x30, 0x5F, 0x9E, 0x87, 0x20,
+0x60, 0x4D, 0xEC, 0xB0, 0x61, 0x87, 0xA3, 0xA0, 0x62, 0x2D, 0xCE, 0xB0, 0x63, 0x67, 0x85, 0xA0,
+0x64, 0x0D, 0xB0, 0xB0, 0x65, 0x47, 0x67, 0xA0, 0x65, 0xED, 0x92, 0xB0, 0x67, 0x27, 0x49, 0xA0,
+0x67, 0xCD, 0x74, 0xB0, 0x69, 0x07, 0x2B, 0xA0, 0x69, 0xAD, 0x56, 0xB0, 0x6A, 0xE7, 0x0D, 0xA0,
+0x6B, 0x96, 0x73, 0x30, 0x6C, 0xD0, 0x2A, 0x20, 0x6D, 0x76, 0x55, 0x30, 0x6E, 0xB0, 0x0C, 0x20,
+0x6F, 0x56, 0x37, 0x30, 0x70, 0x8F, 0xEE, 0x20, 0x71, 0x36, 0x19, 0x30, 0x72, 0x6F, 0xD0, 0x20,
+0x73, 0x15, 0xFB, 0x30, 0x74, 0x4F, 0xB2, 0x20, 0x74, 0xFF, 0x17, 0xB0, 0x76, 0x38, 0xCE, 0xA0,
+0x76, 0xDE, 0xF9, 0xB0, 0x78, 0x18, 0xB0, 0xA0, 0x78, 0xBE, 0xDB, 0xB0, 0x79, 0xF8, 0x92, 0xA0,
+0x7A, 0x9E, 0xBD, 0xB0, 0x7B, 0xD8, 0x74, 0xA0, 0x7C, 0x7E, 0x9F, 0xB0, 0x7D, 0xB8, 0x56, 0xA0,
+0x7E, 0x5E, 0x81, 0xB0, 0x7F, 0x98, 0x38, 0xA0, 0x01, 0x02, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF, 0xFF, 0x84, 0xA6, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80,
-0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF,
-0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00,
-0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xCE, 0xDA, 0xFF, 0xFF,
-0xFF, 0xFF, 0x7D, 0x87, 0x30, 0x1A, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x01,
-0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0x84, 0xA6, 0x00, 0x00, 0xFF, 0xFF, 0x8F,
+0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF,
+0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x01,
+0x19, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x50, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xCE, 0xDA, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x30, 0x1A, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x00, 0x00, 0xD6, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x84, 0xA6, 0x00, 0x00, 0xFF, 0xFF,
-0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C,
-0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57,
-0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x0A, 0x00, 0xDD, 0x72, 0x36,
-0x00, 0x49, 0xE3, 0x79, 0x00, 0x00, 0x00, 0x2E, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20,
-0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20,
-0x41, 0x6E, 0x6E, 0x65, 0x74, 0x74, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x2C, 0x20,
-0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x00, 0x00, 0xD6, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x84, 0xA6, 0x00,
+0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D,
+0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x14, 0xFF,
+0xFF, 0x8F, 0x80, 0x01, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54,
+0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x41, 0x4B,
+0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xDD, 0x72, 0x36, 0x00, 0x49, 0xE3, 0x79, 0x00, 0x00, 0x00, 0x17, 0x41, 0x6C, 0x61, 0x73,
+0x6B, 0x61, 0x20, 0x2D, 0x20, 0x41, 0x6E, 0x6E, 0x65, 0x74, 0x74, 0x65, 0x20, 0x49, 0x73, 0x6C,
+0x61, 0x6E, 0x64,
/* America/Mexico_City */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -10996,73 +11549,75 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5,
-0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6,
-0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0xDE, 0xB0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x97, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9,
-0x55, 0xF1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xEA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x02, 0xC6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xB7, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0x99, 0x15, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x76, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x57,
-0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF,
-0xA3, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08,
-0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
-0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43,
-0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
-0x30, 0x0A, 0x00, 0xA6, 0xEE, 0x60, 0x00, 0x7B, 0x5E, 0x07, 0x00, 0x00, 0x00, 0x1D, 0x43, 0x65,
-0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73,
-0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xDE, 0xB0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x97, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x55, 0xF1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xEA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x02, 0xC6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0xB7, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x99, 0x15, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x76, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xA3, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
+0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31,
+0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xA6, 0xEE, 0x60, 0x00, 0x7B, 0x5E, 0x07, 0x00, 0x00, 0x00, 0x0C, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65,
/* America/Miquelon */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -11103,75 +11658,77 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xCB, 0x58, 0x00, 0x00, 0xFF,
0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01,
0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x50, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x4D,
-0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x91, 0xB6, 0x38, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x63, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x75, 0xE4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x55, 0xC6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0x93, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x35, 0xA8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x75, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x15, 0x8A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x57, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xFE, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x39, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xDE, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x1B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xBE, 0x6B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x38, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x9E, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x1A, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x7E, 0x2F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0xFC, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x67, 0x4B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xDE, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x47, 0x2D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xC0, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x27, 0x0F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xA2, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x37, 0x06, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xBE, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xE6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xA0, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xC6, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x82, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xAF, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x64, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x8F, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x46, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x6F, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x63, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x4F, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x45, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x2F, 0x5A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x27, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x45, 0xF3, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x43, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xD3, 0x6E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x25, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xB3, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x07, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0x9C, 0x6D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x24, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x7C, 0x4F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x06, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x5C, 0x31, 0x50, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xE8, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x3C, 0x13, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xCA, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x1B, 0xF5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xAC, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x54, 0xFB, 0xD7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x8E, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xE4, 0xF3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xAA, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xC4, 0xD5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x8C, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xA4, 0xB7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x6E, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0x84, 0x99, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x50, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x64, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x32, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x4D, 0x98, 0x50, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x4F, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x2D, 0x7A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x31, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x0D, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x13, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x65, 0xED, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0x26, 0xF5, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xCD, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xD7, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xAD, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xB9, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0x96, 0x1E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xD5, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x76, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xB7, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x55, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0x99, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x35, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x7B, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x15, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x5D, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0xFE, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x7A, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xDE, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x5C, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xBE, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x3E, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0x9E, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x20, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x7E, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x02, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x5E, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xE4, 0x40, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xCB, 0x58, 0x00, 0x00, 0xFF, 0xFF,
-0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0D,
-0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x50, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x4D, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x4D, 0x53, 0x54, 0x33,
-0x50, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
-0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD1, 0x1F, 0x28, 0x00, 0xBC, 0xB3, 0x4A, 0x00, 0x00, 0x00, 0x00,
-
+0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0xB6, 0x38, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x6E, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xE4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xC6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xA8, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x8A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x1B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x6B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x2F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x4B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x2D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xC0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x0F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xA2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x46, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x5A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x6E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x6D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x24, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x4F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x31, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xE8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x13, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xCA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xF5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xD7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x8E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE4, 0xF3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xAA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xD5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x8C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xB7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x6E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0x99, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0x98, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x7A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x31, 0x40, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x26, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x1E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x7A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xE4, 0x40, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xCB,
+0x58, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF,
+0xFF, 0xE3, 0xE0, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x50, 0x4D, 0x53,
+0x54, 0x00, 0x50, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x50, 0x4D, 0x53, 0x54, 0x33, 0x50, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
+0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD1, 0x1F, 0x28, 0x00, 0xBC, 0xB3, 0x4A, 0x00, 0x00, 0x00, 0x00,
/* America/Moncton */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -11245,135 +11802,137 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0xFF,
0xFF, 0xD5, 0xD0, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x1E, 0xED, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x80,
-0xF1, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x3C, 0x38, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB,
-0xB4, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0x1C, 0x1A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD,
-0x94, 0x05, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFB, 0xFC, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF,
-0x73, 0xE7, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xDB, 0xDE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1,
-0x53, 0xC9, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0xBB, 0xC0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3,
-0x33, 0xAB, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x9B, 0xA2, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0x13, 0x8D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x70, 0xF8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0x0D, 0xCD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x48, 0xF1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8,
-0xED, 0xAF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x5E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0xD6, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x75, 0xD6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xCF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5,
-0x55, 0xB8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xB1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7,
-0x35, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x93, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0x15, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x75, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0xFE, 0x99, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x57, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC,
-0xDE, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x74, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE,
-0xBE, 0x5D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
-0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x38, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2,
-0x7E, 0x21, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x1A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4,
-0x5E, 0x03, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x28, 0xFC, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6,
-0x47, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x18, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0x27, 0x01, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xE4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA,
-0x06, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xC6, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB,
-0xE6, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xA8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED,
-0xC6, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xC5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF,
-0xAF, 0xC4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xA7, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1,
-0x8F, 0xA6, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x89, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3,
-0x6F, 0x88, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x6B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5,
-0x4F, 0x6A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x4D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x69, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9,
-0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B,
-0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11,
-0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19,
-0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xBE, 0x5D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x2A, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x9E, 0x3F, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x0C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x7E, 0x21, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0xEE, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x67, 0x3D, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xD0, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x47, 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xB2, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x27, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x94, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x06, 0xE3, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xB0, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE6, 0xC5, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x92, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xC6, 0xA7, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x74, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xAF, 0xC4, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x56, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xA6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x38, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0x88, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x55, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x37, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x4C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x19, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x04, 0x05, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x1E, 0xED, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x80, 0xF1, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x3C, 0x38, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xB4, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0x1C, 0x1A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0x94, 0x05, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFB, 0xFC, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x73, 0xE7, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xDB, 0xDE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x53, 0xC9, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0xBB, 0xC0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x33, 0xAB, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x9B, 0xA2, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x13, 0x8D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x70, 0xF8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x0D, 0xCD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x48, 0xF1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xED, 0xAF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x5E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xD6, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x75, 0xD6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xCF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x55, 0xB8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xB1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x35, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x93, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x15, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x75, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFE, 0x99, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x57, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x74, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x5D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x38, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x21, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x1A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x03, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x28, 0xFC, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x18, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x01, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xE4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xC6, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xA8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xC5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xC4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xA7, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0xA6, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x89, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x88, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x6B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x6A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x4D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x69, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x5D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x2A, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x3F, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x0C, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x21, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0xEE, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x3D, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xD0, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x1F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xB2, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x94, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xE3, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xB0, 0xEC, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xC5, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x92, 0xEC, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xA7, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x74, 0xEC, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xC4, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x56, 0xEC, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xA6, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x38, 0xEC, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0x88, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x55, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x37, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x4C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x19, 0x6C, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xC3, 0x44, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x14, 0x4C,
-0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41,
-0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xCF, 0xAC, 0x10, 0x00,
-0xAF, 0xCE, 0x82, 0x00, 0x00, 0x00, 0x1D, 0x41, 0x74, 0x6C, 0x61, 0x6E, 0x74, 0x69, 0x63, 0x20,
-0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x42, 0x72, 0x75, 0x6E, 0x73,
+0x03, 0x02, 0x03, 0x04, 0x05, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xC3, 0x44,
+0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x14,
+0x4C, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
+0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xCF, 0xAC, 0x10, 0x00, 0xAF, 0xCE, 0x82, 0x00, 0x00, 0x00, 0x18, 0x41, 0x74, 0x6C, 0x61,
+0x6E, 0x74, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x42, 0x72, 0x75, 0x6E, 0x73,
0x77, 0x69, 0x63, 0x6B,
/* America/Monterrey */
@@ -11409,74 +11968,76 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xA1, 0xF4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04,
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xDA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xA1, 0xF4,
-0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xB0, 0x7E, 0x4A, 0x00, 0x79, 0x96, 0x4D,
-0x00, 0x00, 0x00, 0x54, 0x4D, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6E, 0x20, 0x43, 0x65, 0x6E, 0x74,
-0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x43, 0x6F, 0x61, 0x68, 0x75,
-0x69, 0x6C, 0x61, 0x2C, 0x20, 0x44, 0x75, 0x72, 0x61, 0x6E, 0x67, 0x6F, 0x2C, 0x20, 0x4E, 0x75,
+0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xA1, 0xF4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54,
+0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xB0, 0x7E, 0x4A, 0x00, 0x79, 0x96, 0x4D, 0x00, 0x00, 0x00, 0x45, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x44, 0x75, 0x72, 0x61, 0x6E,
+0x67, 0x6F, 0x3B, 0x20, 0x43, 0x6F, 0x61, 0x68, 0x75, 0x69, 0x6C, 0x61, 0x2C, 0x20, 0x4E, 0x75,
0x65, 0x76, 0x6F, 0x20, 0x4C, 0x65, 0x6F, 0x6E, 0x2C, 0x20, 0x54, 0x61, 0x6D, 0x61, 0x75, 0x6C,
-0x69, 0x70, 0x61, 0x73, 0x20, 0x61, 0x77, 0x61, 0x79, 0x20, 0x66, 0x72, 0x6F, 0x6D, 0x20, 0x55,
-0x53, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72,
+0x69, 0x70, 0x61, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73,
+0x29,
/* America/Montevideo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00,
0xA2, 0x92, 0x87, 0xAC, 0xA9, 0x01, 0x25, 0xB8, 0xA9, 0xF1, 0x0F, 0xB0, 0xAA, 0xE2, 0x59, 0x38,
0xAB, 0xD2, 0x43, 0x30, 0xAC, 0xC3, 0x8C, 0xB8, 0xAD, 0xB3, 0x76, 0xB0, 0xBB, 0xF4, 0xB5, 0xB8,
0xBC, 0xBF, 0xB5, 0xB0, 0xBD, 0xD4, 0x97, 0xB8, 0xBE, 0x9F, 0x97, 0xB0, 0xBF, 0xB4, 0x79, 0xB8,
@@ -11498,117 +12059,79 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x48, 0xE8, 0x49, 0xD0, 0x49, 0xB3, 0x42, 0xC0, 0x4A, 0xC8, 0x2B, 0xD0, 0x4B, 0x9C, 0x5F, 0x40,
0x4C, 0xA8, 0x0D, 0xD0, 0x4D, 0x7C, 0x41, 0x40, 0x4E, 0x87, 0xEF, 0xD0, 0x4F, 0x5C, 0x23, 0x40,
0x50, 0x71, 0x0C, 0x50, 0x51, 0x3C, 0x05, 0x40, 0x52, 0x50, 0xEE, 0x50, 0x53, 0x1B, 0xE7, 0x40,
-0x54, 0x30, 0xD0, 0x50, 0x54, 0xFB, 0xC9, 0x40, 0x56, 0x10, 0xB2, 0x50, 0x56, 0xE4, 0xE5, 0xC0,
-0x57, 0xF0, 0x94, 0x50, 0x58, 0xC4, 0xC7, 0xC0, 0x59, 0xD0, 0x76, 0x50, 0x5A, 0xA4, 0xA9, 0xC0,
-0x5B, 0xB9, 0x92, 0xD0, 0x5C, 0x84, 0x8B, 0xC0, 0x5D, 0x99, 0x74, 0xD0, 0x5E, 0x64, 0x6D, 0xC0,
-0x5F, 0x79, 0x56, 0xD0, 0x60, 0x4D, 0x8A, 0x40, 0x61, 0x59, 0x38, 0xD0, 0x62, 0x2D, 0x6C, 0x40,
-0x63, 0x39, 0x1A, 0xD0, 0x64, 0x0D, 0x4E, 0x40, 0x65, 0x18, 0xFC, 0xD0, 0x65, 0xED, 0x30, 0x40,
-0x67, 0x02, 0x19, 0x50, 0x67, 0xCD, 0x12, 0x40, 0x68, 0xE1, 0xFB, 0x50, 0x69, 0xAC, 0xF4, 0x40,
-0x6A, 0xC1, 0xDD, 0x50, 0x6B, 0x96, 0x10, 0xC0, 0x6C, 0xA1, 0xBF, 0x50, 0x6D, 0x75, 0xF2, 0xC0,
-0x6E, 0x81, 0xA1, 0x50, 0x6F, 0x55, 0xD4, 0xC0, 0x70, 0x6A, 0xBD, 0xD0, 0x71, 0x35, 0xB6, 0xC0,
-0x72, 0x4A, 0x9F, 0xD0, 0x73, 0x15, 0x98, 0xC0, 0x74, 0x2A, 0x81, 0xD0, 0x74, 0xFE, 0xB5, 0x40,
-0x76, 0x0A, 0x63, 0xD0, 0x76, 0xDE, 0x97, 0x40, 0x77, 0xEA, 0x45, 0xD0, 0x78, 0xBE, 0x79, 0x40,
-0x79, 0xCA, 0x27, 0xD0, 0x7A, 0x9E, 0x5B, 0x40, 0x7B, 0xB3, 0x44, 0x50, 0x7C, 0x7E, 0x3D, 0x40,
-0x7D, 0x93, 0x26, 0x50, 0x7E, 0x5E, 0x1F, 0x40, 0x7F, 0x73, 0x08, 0x50, 0x01, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0x05, 0x06, 0x05, 0x07, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0xFF, 0xFF, 0xCB, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xCB, 0x54, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0,
-0x01, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E, 0xFF, 0xFF,
-0xD5, 0xD0, 0x00, 0x0E, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x12, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x08,
-0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x12, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x55, 0x59,
-0x48, 0x53, 0x54, 0x00, 0x55, 0x59, 0x54, 0x00, 0x55, 0x59, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x17, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x79, 0x7D, 0xFA, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2,
-0x92, 0x87, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x01, 0x25, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9,
-0xF1, 0x0F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE2, 0x59, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB,
-0xD2, 0x43, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC3, 0x8C, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD,
-0xB3, 0x76, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF4, 0xB5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC,
-0xBF, 0xB5, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD4, 0x97, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE,
-0x9F, 0x97, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xB4, 0x79, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
-0x7F, 0x79, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x96, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2,
-0x5F, 0x5B, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7D, 0x78, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4,
-0x3F, 0x3D, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x5D, 0x5A, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6,
-0x1F, 0x1F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x3D, 0x3C, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8,
-0x08, 0x3C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x1D, 0x1E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9,
-0xE8, 0x1E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x8B, 0x9F, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x55, 0x4D, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x1E, 0xCD, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0x95, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0x0B, 0x85, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xF2, 0x2E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x45, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED,
-0x85, 0xD6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x72, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0xFA, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x54, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0x09, 0x73, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
-0xEA, 0xA6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFE, 0x3E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD,
-0xF7, 0x62, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDF, 0x71, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD8, 0x96, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01,
-0xB9, 0xC9, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x58, 0xDC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04,
-0xED, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x5A, 0x47, 0x28, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xDD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0xE7, 0x7F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x83, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x55, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x47, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21,
-0xC3, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x3B, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0xA1, 0xE4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x19, 0xCF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x4A, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x0A, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x90, 0x1C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x4C, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x2F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x48, 0xA3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x9C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x1F, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x7E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x08, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x48,
-0xE8, 0x49, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x42, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xC8, 0x2B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x5F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xA8, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0x87, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x23, 0x40, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x71, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x50, 0xEE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xE7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x30, 0xD0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xC9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x10, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE4, 0xE5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x57,
-0xF0, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xC7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xD0, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xA9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xB9, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0x8B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0x99, 0x74, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x79, 0x56, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0x8A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x59, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x6C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x39, 0x1A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x18, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x02, 0x19, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xE1, 0xFB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAC, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xC1, 0xDD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xA1, 0xBF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x75, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0x81, 0xA1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x6A, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x4A, 0x9F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x2A, 0x81, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xB5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x0A, 0x63, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0x97, 0x40, 0x00, 0x00, 0x00, 0x00, 0x77,
-0xEA, 0x45, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xCA, 0x27, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x5B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xB3, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x3D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0x93, 0x26, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x1F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x73, 0x08, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04,
-0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0x05,
-0x06, 0x05, 0x07, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xCB, 0x54, 0x00, 0x00, 0xFF, 0xFF,
-0xCB, 0x54, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E,
-0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0E, 0xFF, 0xFF, 0xE3, 0xE0,
-0x01, 0x12, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x12, 0x4C, 0x4D,
-0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x55, 0x59, 0x48, 0x53, 0x54, 0x00, 0x55, 0x59, 0x54, 0x00,
-0x55, 0x59, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x59, 0x54, 0x33, 0x55, 0x59, 0x53, 0x54,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x0A,
+0x54, 0x30, 0xD0, 0x50, 0x54, 0xFB, 0xC9, 0x40, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x05,
+0x07, 0x05, 0x07, 0x05, 0x06, 0x05, 0x07, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF,
+0xFF, 0xCB, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xCB, 0x54, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E, 0xFF, 0xFF, 0xD5,
+0xD0, 0x00, 0x0E, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x12, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x08, 0xFF,
+0xFF, 0xE3, 0xE0, 0x01, 0x12, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x55, 0x59, 0x48,
+0x53, 0x54, 0x00, 0x55, 0x59, 0x54, 0x00, 0x55, 0x59, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x17, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x79, 0x7D, 0xFA, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x87, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x01, 0x25, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0xF1, 0x0F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE2, 0x59, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xD2, 0x43, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC3, 0x8C, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xB3, 0x76, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF4, 0xB5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xBF, 0xB5, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD4, 0x97, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x9F, 0x97, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xB4, 0x79, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x7F, 0x79, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x96, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x5F, 0x5B, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7D, 0x78, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x3F, 0x3D, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x5D, 0x5A, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x1F, 0x1F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x3D, 0x3C, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x08, 0x3C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x1D, 0x1E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xE8, 0x1E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x8B, 0x9F, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x55, 0x4D, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x1E, 0xCD, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x95, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0x0B, 0x85, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xF2, 0x2E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x45, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x85, 0xD6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x72, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0xFA, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x54, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x09, 0x73, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEA, 0xA6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFE, 0x3E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xF7, 0x62, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDF, 0x71, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xD8, 0x96, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x01, 0xB9, 0xC9, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x58, 0xDC, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x04, 0xED, 0xC7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x5A, 0x47, 0x28, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xDD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xE7, 0x7F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x83, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x55, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x47, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0xC3, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x3B, 0x3E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0xA1, 0xE4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x19, 0xCF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x90, 0x1C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x4C, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x2F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x48, 0xA3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x9C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1F, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x7E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x08, 0x67, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE8, 0x49, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x42, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC8, 0x2B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x5F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA8, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x23, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x71, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0xEE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xE7, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0xD0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xC9, 0x40, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, 0x05, 0x06, 0x05, 0x07, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xCB, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xCB, 0x54, 0x00, 0x04,
+0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0E, 0xFF, 0xFF, 0xCE, 0xC8,
+0x00, 0x0E, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0E, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x12, 0xFF, 0xFF,
+0xDC, 0xD8, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x12, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D,
+0x54, 0x00, 0x55, 0x59, 0x48, 0x53, 0x54, 0x00, 0x55, 0x59, 0x54, 0x00, 0x55, 0x59, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x55, 0x59, 0x54, 0x33, 0x0A,
+#endif
0x00, 0x54, 0x19, 0xF2, 0x00, 0xBC, 0xED, 0xE2, 0x00, 0x00, 0x00, 0x00,
/* America/Montreal */
@@ -11691,161 +12214,166 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x78,
-0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x87, 0x2E, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xB1,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x94, 0x06, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x55, 0xA9,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x86, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x28, 0x78,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x66, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x0C, 0x4E,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x46, 0x21, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEC, 0x30,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x1C, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x4D,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xFC, 0xAB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xB5, 0x2F,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xDC, 0x8D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x95, 0x11,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBC, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xAA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xA3,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x8C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x85,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x33, 0x76,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x13, 0x74,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x0A,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x26,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00,
-0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x94, 0x00,
-0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x78, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x87, 0x2E, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x94, 0x06, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x55, 0xA9, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x86, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x28, 0x78, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x66, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x0C, 0x4E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x46, 0x21, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEC, 0x30, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1C, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFC, 0xAB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xB5, 0x2F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xDC, 0x8D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x95, 0x11, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBC, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x55, 0xAA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xA3, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x35, 0x8C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x85, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x15, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x33, 0x76, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x13, 0x74, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x0A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x26, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
+0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF,
+0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
+0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Montserrat */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA2, 0xD6, 0x32, 0x00, 0xB3,
-0xB9, 0x1D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA2, 0xD6, 0x32, 0x00, 0xB3, 0xB9, 0x1D, 0x00, 0x00, 0x00, 0x00,
/* America/Nassau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -11899,99 +12427,101 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB7, 0x76, 0x00, 0x00,
0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x96, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x42, 0x8A, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F,
-0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F,
-0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F,
-0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8,
-0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8,
-0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8,
-0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97,
-0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77,
-0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60,
-0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40,
-0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20,
-0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00,
-0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0,
-0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0,
-0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9,
-0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89,
-0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69,
-0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49,
-0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29,
-0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08,
-0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2,
-0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1,
-0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1,
-0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76,
-0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55,
-0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35,
-0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15,
-0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE,
-0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE,
-0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE,
-0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E,
-0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E,
-0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67,
-0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47,
-0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27,
-0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07,
-0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6,
-0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6,
-0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF,
-0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F,
-0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F,
-0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F,
-0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F,
-0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3,
-0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3,
-0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3,
-0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C,
-0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C,
-0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C,
-0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C,
-0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C,
-0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB,
-0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5,
-0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4,
-0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4,
-0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84,
-0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64,
-0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D,
-0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D,
-0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D,
-0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED,
-0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD,
-0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD,
-0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96,
-0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76,
-0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55,
-0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35,
-0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15,
-0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE,
-0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE,
-0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE,
-0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E,
-0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E,
-0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E,
-0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0xFF, 0xFF, 0xB7, 0x76, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xAF, 0x9A, 0x6D,
-0x00, 0x9C, 0xA1, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x42, 0x8A, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0xFF, 0xFF, 0xB7, 0x76, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF,
+0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D,
+0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xAF, 0x9A, 0x6D, 0x00, 0x9C, 0xA1, 0xA8, 0x00, 0x00, 0x00, 0x00,
/* America/New_York */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12074,150 +12604,154 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C,
0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53,
0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xF0, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x1E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x00, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xCD, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0xE2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x83, 0xE9, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, 0xAE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xA7, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xCA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0x89, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xAC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xA5, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x13, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xDE, 0x87, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF3, 0x70, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBE, 0x69, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xD3, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x9E, 0x4B, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xB3, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x1B, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xC6, 0xB4, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x0D, 0x40, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x39, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xC6, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xBF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xA8, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xA1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x8A, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x83, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x65, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57, 0x2E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x10, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xBA, 0x9E, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45,
-0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xC7, 0x74, 0x38, 0x00, 0xA1, 0xBB,
-0xC1, 0x00, 0x00, 0x00, 0x0C, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D,
-0x65,
+0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x1E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x00, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xCD, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0xE2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x83, 0xE9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x6A, 0xAE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xA7, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xCA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0x89, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x33, 0xAC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xA5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x13, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xDE, 0x87, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xF3, 0x70, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBE, 0x69, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xD3, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x9E, 0x4B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xB3, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x1B, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xC6, 0xB4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x0D, 0x40, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x39, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xC6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xBF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xA1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x83, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x65, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x2E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x10, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0xFF, 0xFF, 0xBA, 0x9E, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C,
+0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45,
+0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53,
+0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC7, 0x74, 0x38, 0x00, 0xA1, 0xBB, 0xC1, 0x00, 0x00, 0x00, 0x14, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
+
/* America/Nipigon */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12268,97 +12802,97 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAD, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x81, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x93, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x49, 0x50, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xC1, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xA3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
-0xFF, 0xAD, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35,
-0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0xD4, 0x1F, 0x62, 0x00, 0x8B, 0xF9, 0x55, 0x00, 0x00, 0x00, 0x4B, 0x45,
-0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4F, 0x6E,
-0x74, 0x61, 0x72, 0x69, 0x6F, 0x20, 0x26, 0x20, 0x51, 0x75, 0x65, 0x62, 0x65, 0x63, 0x20, 0x2D,
-0x20, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x64, 0x69, 0x64,
-0x20, 0x6E, 0x6F, 0x74, 0x20, 0x6F, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x20, 0x44, 0x53, 0x54,
-0x20, 0x31, 0x39, 0x36, 0x37, 0x2D, 0x31, 0x39, 0x37, 0x33,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x81, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF8, 0x49, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAD, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04,
+0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0,
+0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57,
+0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD4, 0x1F, 0x62, 0x00, 0x8B, 0xF9, 0x55, 0x00, 0x00, 0x00, 0x21, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4F, 0x4E, 0x2C, 0x20, 0x51, 0x43, 0x20, 0x28, 0x6E, 0x6F,
+0x20, 0x44, 0x53, 0x54, 0x20, 0x31, 0x39, 0x36, 0x37, 0x2D, 0x37, 0x33, 0x29,
/* America/Nome */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12415,103 +12949,105 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x21, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50,
0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B,
0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00,
-0x00, 0x0A, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x3F, 0xC0, 0xEE, 0x93, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x4F, 0xD2, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCB, 0x89, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x61, 0x50, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x71, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x98, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x36, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x78, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x52, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x61, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x34, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x41, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x31, 0x16, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x6D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0xE9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xD9, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0xBB, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0xBB, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x9D, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x7F, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x61, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x39, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x1B, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xFD, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xDF, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xA0, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x82, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x64, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x46, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x28, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xEE, 0x93, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x4F, 0xD2, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0xB6, 0x6D, 0x00, 0x00, 0xFF, 0xFF,
-0x64, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08,
-0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0C, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60,
-0x01, 0x14, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x18, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x1C, 0xFF, 0xFF,
-0x81, 0x70, 0x00, 0x21, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00,
-0x4E, 0x50, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00,
-0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41,
-0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xEB, 0xBF, 0xFF, 0x00, 0x16, 0x44, 0xA1,
-0x00, 0x00, 0x00, 0x19, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20,
-0x2D, 0x20, 0x77, 0x65, 0x73, 0x74, 0x20, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
+0xB6, 0x6D, 0x00, 0x00, 0xFF, 0xFF, 0x64, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04,
+0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0C, 0xFF, 0xFF, 0x65, 0x50,
+0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x18, 0xFF, 0xFF,
+0x8F, 0x80, 0x01, 0x1C, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x21, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53,
+0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44,
+0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D,
+0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xEB, 0xBF, 0xFF, 0x00, 0x16, 0x44, 0xA1, 0x00, 0x00, 0x00, 0x0D, 0x41, 0x6C, 0x61, 0x73,
+0x6B, 0x61, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29,
/* America/Noronha */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12531,37 +13067,39 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xE1, 0x9C, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x04,
0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4E, 0x53, 0x54, 0x00, 0x46,
-0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x96, 0xAA, 0x65, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0xFD, 0x32, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x26, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0xDE, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xA0, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0xB9, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x07, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDE, 0x9B, 0xD0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x8C, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x54, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xF1, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x05, 0x50, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x56, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF7, 0x0E, 0x10, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x1E, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0xC7, 0xB7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xC4, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0xA8, 0xEA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEB, 0xF8, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFC, 0x8B, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x80, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x78, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x27, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x33, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x5B, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x0B, 0xBA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x02, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0xE2, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xE4, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xD4, 0xB9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xB8, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xB8, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xD5, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xE9, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xF1, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0x6F, 0x00, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xE1,
-0x9C, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x46, 0x4E, 0x53, 0x54, 0x00, 0x46, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x46, 0x4E, 0x54, 0x32, 0x0A, 0x00, 0x83, 0x74, 0x58, 0x00, 0xE1, 0x31, 0xBD,
-0x00, 0x00, 0x00, 0x10, 0x41, 0x74, 0x6C, 0x61, 0x6E, 0x74, 0x69, 0x63, 0x20, 0x69, 0x73, 0x6C,
-0x61, 0x6E, 0x64, 0x73,
+0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x65, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x32, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x26, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xA0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x07, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xD0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x8C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xF1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x50, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x56, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x10, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x1E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xB7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xC4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xEA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEB, 0xF8, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x5B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xBA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xB9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xB8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xF1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x00, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xE1, 0x9C, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x04,
+0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4E, 0x53, 0x54, 0x00, 0x46,
+0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4E, 0x54, 0x32, 0x0A,
+#endif
+0x00, 0x83, 0x74, 0x58, 0x00, 0xE1, 0x31, 0xBD, 0x00, 0x00, 0x00, 0x10, 0x41, 0x74, 0x6C, 0x61,
+0x6E, 0x74, 0x69, 0x63, 0x20, 0x69, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* America/North_Dakota/Beulah */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12618,105 +13156,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF,
0xAB, 0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x97, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75,
-0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF,
-0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xA0, 0x95, 0x00, 0x00, 0xFF,
-0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
-0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53,
-0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD1, 0x72, 0xD0, 0x00, 0x77, 0x5B, 0x8E, 0x00, 0x00, 0x00,
-0x2B, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20,
-0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x44, 0x61, 0x6B, 0x6F, 0x74, 0x61, 0x20, 0x2D, 0x20, 0x4D,
-0x65, 0x72, 0x63, 0x65, 0x72, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xA0, 0x95, 0x00,
+0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB,
+0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF,
+0xFF, 0xAB, 0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54,
+0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
+0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD1, 0x72, 0xD0, 0x00, 0x77, 0x5B, 0x8E, 0x00, 0x00, 0x00, 0x15, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x44, 0x20, 0x28, 0x4D, 0x65, 0x72, 0x63, 0x65, 0x72,
+0x29,
/* America/North_Dakota/Center */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12773,105 +13313,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF,
0xAB, 0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x97, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75,
-0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF,
-0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xA1, 0x08, 0x00, 0x00, 0xFF,
-0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
-0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53,
-0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD1, 0x39, 0x16, 0x00, 0x78, 0x16, 0x83, 0x00, 0x00, 0x00,
-0x2B, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20,
-0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x44, 0x61, 0x6B, 0x6F, 0x74, 0x61, 0x20, 0x2D, 0x20, 0x4F,
-0x6C, 0x69, 0x76, 0x65, 0x72, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xA1, 0x08, 0x00,
+0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB,
+0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF,
+0xFF, 0xAB, 0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54,
+0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
+0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD1, 0x39, 0x16, 0x00, 0x78, 0x16, 0x83, 0x00, 0x00, 0x00, 0x15, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x44, 0x20, 0x28, 0x4F, 0x6C, 0x69, 0x76, 0x65, 0x72,
+0x29,
/* America/North_Dakota/New_Salem */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -12928,107 +13470,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF,
0xAB, 0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x97, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75,
-0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF,
-0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xA0, 0xED, 0x00, 0x00, 0xFF,
-0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
-0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53,
-0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD0, 0xCF, 0x14, 0x00, 0x77, 0xEA, 0xE4, 0x00, 0x00, 0x00,
-0x40, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20,
-0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x44, 0x61, 0x6B, 0x6F, 0x74, 0x61, 0x20, 0x2D, 0x20, 0x4D,
-0x6F, 0x72, 0x74, 0x6F, 0x6E, 0x20, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x79, 0x20, 0x28, 0x65, 0x78,
-0x63, 0x65, 0x70, 0x74, 0x20, 0x4D, 0x61, 0x6E, 0x64, 0x61, 0x6E, 0x20, 0x61, 0x72, 0x65, 0x61,
-0x29,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xA0, 0xED, 0x00,
+0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB,
+0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF,
+0xFF, 0xAB, 0xA0, 0x00, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54,
+0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
+0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD0, 0xCF, 0x14, 0x00, 0x77, 0xEA, 0xE4, 0x00, 0x00, 0x00, 0x1B, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x44, 0x20, 0x28, 0x4D, 0x6F, 0x72, 0x74, 0x6F, 0x6E,
+0x20, 0x72, 0x75, 0x72, 0x61, 0x6C, 0x29,
/* America/Ojinaga */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13066,70 +13608,73 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43,
0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5,
-0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6,
-0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF, 0xFF, 0x9E, 0x1C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF,
-0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D,
-0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
-0x30, 0x0A, 0x00, 0xB6, 0x71, 0xBA, 0x00, 0x73, 0x54, 0xBD, 0x00, 0x00, 0x00, 0x2B, 0x55, 0x53,
-0x20, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D,
-0x20, 0x43, 0x68, 0x69, 0x68, 0x75, 0x61, 0x68, 0x75, 0x61, 0x20, 0x6E, 0x65, 0x61, 0x72, 0x20,
-0x55, 0x53, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
+0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF,
+0xFF, 0x9E, 0x1C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
+0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D,
+0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43,
+0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
+0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xB6, 0x71, 0xBA, 0x00, 0x73, 0x54, 0xBD, 0x00, 0x00, 0x00, 0x28, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x55, 0x53, 0x20, 0x2D, 0x20, 0x43,
+0x68, 0x69, 0x68, 0x75, 0x61, 0x68, 0x75, 0x61, 0x20, 0x28, 0x55, 0x53, 0x20, 0x62, 0x6F, 0x72,
+0x64, 0x65, 0x72, 0x29,
/* America/Panama */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13137,15 +13682,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x8B, 0xF4, 0x61, 0xE8, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5, 0x18,
0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00,
-0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x69, 0x87, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xF4, 0x61, 0xE8, 0x00, 0x01,
-0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5, 0x18, 0x00, 0x04, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00, 0x97, 0x02, 0xDA, 0x00,
-0x99, 0x4C, 0xCA, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x8B, 0xF4, 0x61, 0xE8, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xB5,
+0x18, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54,
+0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x0A,
+#endif
+0x00, 0x97, 0x02, 0xDA, 0x00, 0x99, 0x4C, 0xCA, 0x00, 0x00, 0x00, 0x00,
/* America/Pangnirtung */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13197,92 +13745,94 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x44, 0x54, 0x00,
0x41, 0x44, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x29, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xD5, 0x52, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xE2, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xED, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x30, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x5B, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x1C, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xFE, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x1B, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xFD, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xDF, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xC1, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xA3, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xA1, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x83, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x65, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x47, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x29, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x46, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x28, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60,
-0x00, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x29, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xD5, 0x52, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x30, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x5B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
-0x03, 0x05, 0x03, 0x05, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0x09,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x08, 0x09, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x10, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x15, 0xFF,
-0xFF, 0xC7, 0xC0, 0x01, 0x19, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x1D, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x21, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x25, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x19, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x1D, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x41,
-0x53, 0x54, 0x00, 0x41, 0x44, 0x44, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00,
-0x45, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xEE, 0x3D, 0x95,
-0x00, 0xAE, 0x5B, 0x6A, 0x00, 0x00, 0x00, 0x23, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20,
-0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x50, 0x61, 0x6E, 0x67, 0x6E, 0x69, 0x72, 0x74, 0x75,
-0x6E, 0x67, 0x2C, 0x20, 0x4E, 0x75, 0x6E, 0x61, 0x76, 0x75, 0x74,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x10, 0xFF, 0xFF, 0xD5,
+0xD0, 0x01, 0x15, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x19, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x1D, 0xFF,
+0xFF, 0xAB, 0xA0, 0x00, 0x21, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x25, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
+0x19, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x1D, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41,
+0x50, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x44, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00,
+0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54,
+0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xEE, 0x3D, 0x95, 0x00, 0xAE, 0x5B, 0x6A, 0x00, 0x00, 0x00, 0x1A, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4E, 0x55, 0x20, 0x28, 0x50, 0x61, 0x6E, 0x67, 0x6E, 0x69,
+0x72, 0x74, 0x75, 0x6E, 0x67, 0x29,
/* America/Paramaribo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13293,19 +13843,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xCC, 0x3C, 0x00, 0x04, 0xFF, 0xFF, 0xCC, 0x4C, 0x00, 0x04, 0xFF, 0xFF, 0xCE, 0xC8,
0x00, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0x4C, 0x4D,
0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x4E, 0x45, 0x47, 0x54, 0x00, 0x53, 0x52, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x91, 0x05, 0x8E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x2A, 0x4B, 0xC4, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x62, 0x2C, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x11, 0x58, 0xB8, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBE, 0x31, 0xB8, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0xFF, 0xFF, 0xCC,
-0x48, 0x00, 0x00, 0xFF, 0xFF, 0xCC, 0x3C, 0x00, 0x04, 0xFF, 0xFF, 0xCC, 0x4C, 0x00, 0x04, 0xFF,
-0xFF, 0xCE, 0xC8, 0x00, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x4E, 0x45, 0x47, 0x54, 0x00, 0x53, 0x52,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53,
-0x52, 0x54, 0x33, 0x0A, 0x00, 0x92, 0x3A, 0xE5, 0x00, 0xBE, 0x7B, 0x05, 0x00, 0x00, 0x00, 0x00,
-
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x05, 0x8E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x2A, 0x4B, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x62, 0x2C, 0xB4, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x11, 0x58, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x31, 0xB8, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x05, 0xFF, 0xFF, 0xCC, 0x48, 0x00, 0x00, 0xFF, 0xFF, 0xCC, 0x3C, 0x00, 0x04, 0xFF, 0xFF,
+0xCC, 0x4C, 0x00, 0x04, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x08, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x0D,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x4E, 0x45,
+0x47, 0x54, 0x00, 0x53, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x53, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x92, 0x3A, 0xE5, 0x00, 0xBE, 0x7B, 0x05, 0x00, 0x00, 0x00, 0x00,
/* America/Phoenix */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13317,28 +13869,30 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x17, 0xDF, 0x1C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0xE5, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x81, 0x1A, 0x1C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00,
-0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB,
-0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37,
-0x0A, 0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x30, 0x4D, 0x6F, 0x75,
-0x6E, 0x74, 0x61, 0x69, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, 0x20, 0x28, 0x65,
-0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x17, 0xDF, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x8F, 0xE5, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x81, 0x1A, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF,
+0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C,
+0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0xBC, 0x5E, 0x01, 0x00, 0x67, 0xA5, 0xDA, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x41, 0x72, 0x69, 0x7A, 0x6F, 0x6E, 0x61, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70,
+0x74, 0x20, 0x4E, 0x61, 0x76, 0x61, 0x6A, 0x6F, 0x29,
/* America/Port-au-Prince */
0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
0x9C, 0x6E, 0x71, 0xFC, 0x19, 0x1B, 0x46, 0xD0, 0x1A, 0x01, 0xEF, 0x40, 0x1A, 0xF1, 0xEE, 0x50,
0x1B, 0xE1, 0xD1, 0x40, 0x1C, 0xD1, 0xD0, 0x50, 0x1D, 0xC1, 0xB3, 0x40, 0x1E, 0xB1, 0xB2, 0x50,
0x1F, 0xA1, 0x95, 0x40, 0x20, 0x91, 0x94, 0x50, 0x21, 0x81, 0x77, 0x40, 0x22, 0x55, 0xD4, 0xE0,
@@ -13349,87 +13903,66 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x32, 0x72, 0xFA, 0x60, 0x33, 0x47, 0x3B, 0xE0, 0x34, 0x52, 0xDC, 0x60, 0x42, 0x4F, 0x78, 0x50,
0x43, 0x64, 0x45, 0x40, 0x44, 0x2F, 0x5A, 0x50, 0x45, 0x44, 0x27, 0x40, 0x4F, 0x5C, 0x4D, 0x70,
0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70,
-0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0,
-0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0,
-0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0,
-0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70,
-0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70,
-0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70,
-0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0,
-0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0,
-0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70,
-0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70,
-0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70,
-0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x01, 0x03, 0x02, 0x03,
+0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x01, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xBC, 0x30, 0x00, 0x00, 0xFF, 0xFF, 0xBC, 0x44, 0x00, 0x04,
-0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0,
-0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x50, 0x4D, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1F,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x6E, 0x71, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x19, 0x1B, 0x46,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xEE,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xD0,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xB2,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x95, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x91, 0x94,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x78,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x5A,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0xFF, 0xFF, 0xBC, 0x30, 0x00, 0x00, 0xFF, 0xFF, 0xBC, 0x44, 0x00, 0x04, 0xFF, 0xFF,
-0xC7, 0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09,
-0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x50, 0x4D, 0x54, 0x00, 0x45,
-0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xA5, 0x9B, 0xD5, 0x00,
-0xA4, 0x49, 0x4A, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xBC, 0x30, 0x00, 0x00, 0xFF, 0xFF,
+0xBC, 0x44, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D,
+0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00,
+0x50, 0x50, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1F, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x6E, 0x71, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x19, 0x1B, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xEE, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xD0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x95, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x91, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x5A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0xFF, 0xFF, 0xBC, 0x30, 0x00, 0x00, 0xFF, 0xFF, 0xBC, 0x44, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09, 0xFF,
+0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x50, 0x4D, 0x54, 0x00, 0x45, 0x44,
+0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A,
+#endif
+0x00, 0xA5, 0x9B, 0xD5, 0x00, 0xA4, 0x49, 0x4A, 0x00, 0x00, 0x00, 0x00,
+
+/* America/Port_of_Spain */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
+0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x99, 0x94, 0x68, 0x00, 0xB4, 0xCA, 0x8D, 0x00, 0x00, 0x00, 0x00,
/* America/Porto_Acre */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13448,47 +13981,36 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF,
0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43,
0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x86,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04,
-0xC0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
-0x02, 0xFF, 0xFF, 0xC0, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x86, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04, 0xC0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC0, 0x70,
+0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43,
+0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* America/Port_of_Spain */
-0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
-0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0x99, 0x94, 0x68, 0x00, 0xB4,
-0xCA, 0x8D, 0x00, 0x00, 0x00, 0x00,
-
/* America/Porto_Velho */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
@@ -13504,31 +14026,34 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0xFF, 0xFF, 0xC4, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF,
0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96,
-0xAA, 0x82, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA,
-0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC,
-0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE,
-0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
-0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5,
-0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x0B, 0xD6, 0xB0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0xC4, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7,
-0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x0A, 0x00, 0x7B, 0xF3, 0xC5,
-0x00, 0xB1, 0x27, 0x90, 0x00, 0x00, 0x00, 0x08, 0x52, 0x6F, 0x6E, 0x64, 0x6F, 0x6E, 0x69, 0x61,
-
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x82, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC4, 0x18, 0x00, 0x00,
+0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x41, 0x4D, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x7B, 0xF3, 0xC5, 0x00, 0xB1, 0x27, 0x90, 0x00, 0x00, 0x00, 0x08, 0x52, 0x6F, 0x6E, 0x64,
+0x6F, 0x6E, 0x69, 0x61,
/* America/Puerto_Rico */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13538,6 +14063,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xC2, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0,
0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
0x41, 0x50, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
@@ -13546,8 +14072,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD2, 0x60, 0xED, 0xD0, 0x00, 0x01, 0x03, 0x02, 0x01, 0xFF, 0xFF, 0xC2, 0x07, 0x00, 0x00, 0xFF,
0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x41, 0x57, 0x54,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00,
-0xA5, 0x82, 0x71, 0x00, 0xAD, 0xC9, 0xCC, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA5, 0x82, 0x71, 0x00, 0xAD, 0xC9, 0xCC, 0x00, 0x00, 0x00, 0x00,
/* America/Rainy_River */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13598,96 +14125,97 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xA7, 0x58, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x87, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xA1, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xCF, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xB1, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
-0xFF, 0xA7, 0x58, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x43, 0x53, 0x54, 0x36,
-0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0xD3, 0xAA, 0x32, 0x00, 0x82, 0x5C, 0x65, 0x00, 0x00, 0x00, 0x32, 0x43,
-0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x52, 0x61,
-0x69, 0x6E, 0x79, 0x20, 0x52, 0x69, 0x76, 0x65, 0x72, 0x20, 0x26, 0x20, 0x46, 0x6F, 0x72, 0x74,
-0x20, 0x46, 0x72, 0x61, 0x6E, 0x63, 0x65, 0x73, 0x2C, 0x20, 0x4F, 0x6E, 0x74, 0x61, 0x72, 0x69,
-0x6F,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x87, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xA7, 0x58, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57,
+0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD3, 0xAA, 0x32, 0x00, 0x82, 0x5C, 0x65, 0x00, 0x00, 0x00, 0x22, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4F, 0x4E, 0x20, 0x28, 0x52, 0x61, 0x69, 0x6E, 0x79, 0x20,
+0x52, 0x2C, 0x20, 0x46, 0x74, 0x20, 0x46, 0x72, 0x61, 0x6E, 0x63, 0x65, 0x73, 0x29,
/* America/Rankin_Inlet */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13734,86 +14262,89 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0,
0x00, 0x11, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
-0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE7, 0x8C, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x28, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x11, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
-0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE9, 0x2E, 0x02, 0x00, 0x86,
-0x26, 0x8E, 0x00, 0x00, 0x00, 0x1E, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69,
-0x6D, 0x65, 0x20, 0x2D, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x4E, 0x75, 0x6E,
-0x61, 0x76, 0x75, 0x74,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x8C, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0,
+0x00, 0x11, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0xE9, 0x2E, 0x02, 0x00, 0x86, 0x26, 0x8E, 0x00, 0x00, 0x00, 0x16, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x55, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61,
+0x6C, 0x29,
/* America/Recife */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13833,36 +14364,39 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDF, 0x48, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04,
0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x96, 0xAA, 0x67, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xE9, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDF,
-0x48, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x7D, 0x0B, 0xB8, 0x00, 0xDD, 0x67, 0xB0,
-0x00, 0x00, 0x00, 0x0A, 0x50, 0x65, 0x72, 0x6E, 0x61, 0x6D, 0x62, 0x75, 0x63, 0x6F,
+0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x67, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xFF, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDF, 0x48, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42,
+0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x7D, 0x0B, 0xB8, 0x00, 0xDD, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x65, 0x72, 0x6E,
+0x61, 0x6D, 0x62, 0x75, 0x63, 0x6F,
/* America/Regina */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13889,49 +14423,50 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D,
0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50,
0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x93, 0x1C, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0x65, 0x4F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB7, 0x45, 0x31, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBB, 0x0E, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBC, 0xEE, 0x12, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC2, 0x72, 0x08, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x61, 0xEB, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC4, 0x51, 0xEA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC6, 0x31, 0xCC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0x1A, 0xE9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0A, 0xCC, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC9, 0xFA, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEA, 0xAE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x8C, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xC3, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDB, 0xC0, 0x82, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xA5, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xA9, 0x9E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x87, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDF, 0x89, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x69, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE1, 0x69, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x4B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE3, 0x49, 0x44, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x2D, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE5, 0x29, 0x26, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x4A, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE7, 0x12, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0xF2, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02,
+0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x93, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x65, 0x4F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x45, 0x31, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x0E, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xEE, 0x12, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x72, 0x08, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x61, 0xEB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xEA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x31, 0xCC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x1A, 0xE9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0A, 0xCC, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xFA, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEA, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xC3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x82, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xA5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x9E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x87, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x69, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x4B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x44, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x2D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x26, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x4A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04,
-0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
-0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
-0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54,
-0x36, 0x0A, 0x00, 0xD6, 0x3B, 0xC0, 0x00, 0x72, 0xF9, 0x97, 0x00, 0x00, 0x00, 0x35, 0x43, 0x65,
-0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x73, 0x6B, 0x61, 0x74, 0x63, 0x68, 0x65, 0x77,
-0x61, 0x6E, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69,
-0x6F, 0x6E, 0x73,
+0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
+0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53,
+0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0xD6, 0x3B, 0xC0, 0x00, 0x72, 0xF9, 0x97, 0x00, 0x00, 0x00, 0x15, 0x43, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73,
+0x29,
/* America/Resolute */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -13978,86 +14513,89 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0,
0x00, 0x11, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
-0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD5, 0xFB, 0x81, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x28, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x11, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44,
-0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
-0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xFB, 0x4E, 0x33, 0x00, 0x81,
-0xF5, 0xDB, 0x00, 0x00, 0x00, 0x20, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54, 0x69,
-0x6D, 0x65, 0x20, 0x2D, 0x20, 0x52, 0x65, 0x73, 0x6F, 0x6C, 0x75, 0x74, 0x65, 0x2C, 0x20, 0x4E,
-0x75, 0x6E, 0x61, 0x76, 0x75, 0x74,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xFB, 0x81, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0,
+0x00, 0x11, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0xFB, 0x4E, 0x33, 0x00, 0x81, 0xF5, 0xDB, 0x00, 0x00, 0x00, 0x17, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4E, 0x55, 0x20, 0x28, 0x52, 0x65, 0x73, 0x6F, 0x6C, 0x75,
+0x74, 0x65, 0x29,
/* America/Rio_Branco */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -14076,31 +14614,34 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF,
0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43,
0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x86,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04,
-0xC0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
-0x02, 0xFF, 0xFF, 0xC0, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x86, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04, 0xC0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC0, 0x70,
+0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43,
+0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+#endif
0x00, 0x7A, 0x1F, 0x05, 0x00, 0xAB, 0x34, 0x20, 0x00, 0x00, 0x00, 0x04, 0x41, 0x63, 0x72, 0x65,
@@ -14132,54 +14673,57 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAD, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC3,
-0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00,
-0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41,
-0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0x9C, 0xAD, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x92, 0x8F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x7B, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x1A, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x1E, 0x8F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xD4, 0x70, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x17, 0x7D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xB5, 0xA3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF8, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0x96, 0xD7, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD9, 0xE4, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x78, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0x8F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9D, 0x9D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x3B, 0xC3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x7E, 0xD0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x1C, 0xF6, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x60, 0x04, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0xFE, 0x2A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x41, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xE0, 0xAF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x81, 0x94, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x4D, 0xA1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEE, 0x86, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x4D, 0xFF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xB0, 0xED, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x29, 0x35, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x43, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3D, 0x08, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x9F, 0xF6, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x32, 0x10, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x94, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0x94, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xB0, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE0, 0xD3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x99, 0x57, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBF, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x77, 0x09, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0x7F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x61, 0x20, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x04, 0x05, 0x04, 0x05, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00,
+0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
+0x01, 0x0C, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x11, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D,
+0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x41, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Santa_Isabel */
-0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
0xA5, 0xB6, 0xF6, 0x80, 0xA9, 0x79, 0x4F, 0x70, 0xAF, 0xF2, 0x7C, 0xF0, 0xB6, 0x66, 0x64, 0x70,
@@ -14205,21 +14749,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x3F, 0x9B, 0x8D, 0x10, 0x40, 0x6F, 0xDC, 0xA0, 0x41, 0x84, 0xA9, 0x90, 0x42, 0x4F, 0xBE, 0xA0,
0x43, 0x64, 0x8B, 0x90, 0x44, 0x2F, 0xA0, 0xA0, 0x45, 0x44, 0x6D, 0x90, 0x46, 0x0F, 0x82, 0xA0,
0x47, 0x24, 0x4F, 0x90, 0x47, 0xF8, 0x9F, 0x20, 0x49, 0x04, 0x31, 0x90, 0x49, 0xD8, 0x81, 0x20,
-0x4A, 0xE4, 0x13, 0x90, 0x4B, 0xB8, 0x63, 0x20, 0x4C, 0xCD, 0x30, 0x10, 0x4D, 0x98, 0x45, 0x20,
-0x4E, 0xAD, 0x12, 0x10, 0x4F, 0x78, 0x27, 0x20, 0x50, 0x8C, 0xF4, 0x10, 0x51, 0x61, 0x43, 0xA0,
-0x52, 0x6C, 0xD6, 0x10, 0x53, 0x41, 0x25, 0xA0, 0x54, 0x4C, 0xB8, 0x10, 0x55, 0x21, 0x07, 0xA0,
-0x56, 0x2C, 0x9A, 0x10, 0x57, 0x00, 0xE9, 0xA0, 0x58, 0x15, 0xB6, 0x90, 0x58, 0xE0, 0xCB, 0xA0,
-0x59, 0xF5, 0x98, 0x90, 0x5A, 0xC0, 0xAD, 0xA0, 0x5B, 0xD5, 0x7A, 0x90, 0x5C, 0xA9, 0xCA, 0x20,
-0x5D, 0xB5, 0x5C, 0x90, 0x5E, 0x89, 0xAC, 0x20, 0x5F, 0x95, 0x3E, 0x90, 0x60, 0x69, 0x8E, 0x20,
-0x61, 0x7E, 0x5B, 0x10, 0x62, 0x49, 0x70, 0x20, 0x63, 0x5E, 0x3D, 0x10, 0x64, 0x29, 0x52, 0x20,
-0x65, 0x3E, 0x1F, 0x10, 0x66, 0x12, 0x6E, 0xA0, 0x67, 0x1E, 0x01, 0x10, 0x67, 0xF2, 0x50, 0xA0,
-0x68, 0xFD, 0xE3, 0x10, 0x69, 0xD2, 0x32, 0xA0, 0x6A, 0xDD, 0xC5, 0x10, 0x6B, 0xB2, 0x14, 0xA0,
-0x6C, 0xC6, 0xE1, 0x90, 0x6D, 0x91, 0xF6, 0xA0, 0x6E, 0xA6, 0xC3, 0x90, 0x6F, 0x71, 0xD8, 0xA0,
-0x70, 0x86, 0xA5, 0x90, 0x71, 0x5A, 0xF5, 0x20, 0x72, 0x66, 0x87, 0x90, 0x73, 0x3A, 0xD7, 0x20,
-0x74, 0x46, 0x69, 0x90, 0x75, 0x1A, 0xB9, 0x20, 0x76, 0x2F, 0x86, 0x10, 0x76, 0xFA, 0x9B, 0x20,
-0x78, 0x0F, 0x68, 0x10, 0x78, 0xDA, 0x7D, 0x20, 0x79, 0xEF, 0x4A, 0x10, 0x7A, 0xBA, 0x5F, 0x20,
-0x7B, 0xCF, 0x2C, 0x10, 0x7C, 0xA3, 0x7B, 0xA0, 0x7D, 0xAF, 0x0E, 0x10, 0x7E, 0x83, 0x5D, 0xA0,
-0x7F, 0x8E, 0xF0, 0x10, 0x00, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02,
+0x4A, 0xE4, 0x13, 0x90, 0x4B, 0x9C, 0xB3, 0xA0, 0x4C, 0xD6, 0x6A, 0x90, 0x4D, 0x7C, 0x95, 0xA0,
+0x4E, 0xB6, 0x4C, 0x90, 0x4F, 0x5C, 0x77, 0xA0, 0x50, 0x96, 0x2E, 0x90, 0x51, 0x3C, 0x59, 0xA0,
+0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0,
+0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20,
+0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, 0x5C, 0x84, 0xE0, 0x20,
+0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, 0x60, 0x4D, 0xDE, 0xA0,
+0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, 0x64, 0x0D, 0xA2, 0xA0,
+0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, 0x67, 0xCD, 0x66, 0xA0,
+0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, 0x6B, 0x96, 0x65, 0x20,
+0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, 0x6F, 0x56, 0x29, 0x20,
+0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, 0x73, 0x15, 0xED, 0x20,
+0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, 0x76, 0xDE, 0xEB, 0xA0,
+0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, 0x7A, 0x9E, 0xAF, 0xA0,
+0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, 0x7E, 0x5E, 0x73, 0xA0,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
@@ -14228,109 +14772,109 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x94, 0x50, 0x00, 0x00,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00,
0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90,
0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D,
0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57,
0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xB8, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x30, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x98, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAD, 0x12, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x78, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xF4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x61, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xD6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x41, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0xB8, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x21, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x9A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x57, 0x00, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0xB6, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xE0, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x98, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xC0, 0xAD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x7A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xA9, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x5C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x89, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x3E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x69, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x5B, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x49, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x3D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x29, 0x52, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x1F, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x12, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1E, 0x01, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xF2, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xE3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xD2, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xC5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xB2, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xE1, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x91, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xC3, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x71, 0xD8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0xA5, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x5A, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x87, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x3A, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x69, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x1A, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x86, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xFA, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x68, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xDA, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x4A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xBA, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x2C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0xA3, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAF, 0x0E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x83, 0x5D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xF0, 0x10, 0x00, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x94, 0x50, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04,
-0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54,
-0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x0A, 0x00, 0xB7, 0x90, 0x30, 0x00, 0x63, 0x62, 0xB5, 0x00, 0x00, 0x00, 0x3A,
-0x4D, 0x65, 0x78, 0x69, 0x63, 0x61, 0x6E, 0x20, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20,
-0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x42, 0x61, 0x6A, 0x61, 0x20, 0x43, 0x61, 0x6C, 0x69,
-0x66, 0x6F, 0x72, 0x6E, 0x69, 0x61, 0x20, 0x61, 0x77, 0x61, 0x79, 0x20, 0x66, 0x72, 0x6F, 0x6D,
-0x20, 0x55, 0x53, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72,
+0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF,
+0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10,
+0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53,
+0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Santarem */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -14348,37 +14892,40 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xCC, 0xB8, 0x00, 0x00, 0xFF, 0xFF, 0xD5,
0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0x4C,
0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x96, 0xAA, 0x7A, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x48, 0x60, 0x71, 0x40, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0xCC, 0xB8, 0x00,
-0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0xFF, 0xFF, 0xD5,
-0xD0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54,
-0x33, 0x0A, 0x00, 0x85, 0x9D, 0xBA, 0x00, 0xBE, 0xF0, 0x35, 0x00, 0x00, 0x00, 0x06, 0x57, 0x20,
-0x50, 0x61, 0x72, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7A, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x60, 0x71, 0x40, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0xFF, 0xFF, 0xCC, 0xB8, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF,
+0xFF, 0xC7, 0xC0, 0x00, 0x09, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41,
+0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x85, 0x9D, 0xBA, 0x00, 0xBE, 0xF0, 0x35, 0x00, 0x00, 0x00, 0x0B, 0x50, 0x61, 0x72, 0x61,
+0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29,
/* America/Santiago */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
0x8F, 0x30, 0x47, 0x46, 0x9B, 0x5C, 0xE5, 0x50, 0x9F, 0x7C, 0xE2, 0xC6, 0xA1, 0x00, 0x71, 0xC0,
0xB0, 0x5E, 0x77, 0xC6, 0xB1, 0x77, 0x3D, 0x40, 0xB2, 0x41, 0x00, 0xD0, 0xB3, 0x58, 0x70, 0xC0,
0xB4, 0x22, 0x34, 0x50, 0xB5, 0x39, 0xA4, 0x40, 0xB6, 0x03, 0x67, 0xD0, 0xB7, 0x1A, 0xD7, 0xC0,
@@ -14407,96 +14954,137 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40,
0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0xC6, 0x07, 0x30, 0x4E, 0x50, 0x82, 0xC0,
0x4F, 0x9C, 0xAE, 0xB0, 0x50, 0x42, 0xD9, 0xC0, 0x51, 0x7C, 0x90, 0xB0, 0x52, 0x2B, 0xF6, 0x40,
-0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x55, 0x3C, 0x54, 0xB0, 0x01, 0x02, 0x01, 0x03,
-0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x05, 0x03,
-0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x57, 0x37, 0xE6, 0x30, 0x57, 0xAF, 0xEC, 0xC0,
+0x59, 0x17, 0xC8, 0x30, 0x59, 0x8F, 0xCE, 0xC0, 0x5A, 0xF7, 0xAA, 0x30, 0x5B, 0x6F, 0xB0, 0xC0,
+0x5C, 0xD7, 0x8C, 0x30, 0x5D, 0x4F, 0x92, 0xC0, 0x5E, 0xB7, 0x6E, 0x30, 0x5F, 0x2F, 0x74, 0xC0,
+0x60, 0x97, 0x50, 0x30, 0x61, 0x18, 0x91, 0x40, 0x62, 0x80, 0x6C, 0xB0, 0x62, 0xF8, 0x73, 0x40,
+0x64, 0x60, 0x4E, 0xB0, 0x64, 0xD8, 0x55, 0x40, 0x66, 0x40, 0x30, 0xB0, 0x66, 0xB8, 0x37, 0x40,
+0x68, 0x20, 0x12, 0xB0, 0x68, 0x98, 0x19, 0x40, 0x69, 0xFF, 0xF4, 0xB0, 0x6A, 0x77, 0xFB, 0x40,
+0x6B, 0xDF, 0xD6, 0xB0, 0x6C, 0x61, 0x17, 0xC0, 0x6D, 0xC8, 0xF3, 0x30, 0x6E, 0x40, 0xF9, 0xC0,
+0x6F, 0xA8, 0xD5, 0x30, 0x70, 0x20, 0xDB, 0xC0, 0x71, 0x88, 0xB7, 0x30, 0x72, 0x00, 0xBD, 0xC0,
+0x73, 0x68, 0x99, 0x30, 0x73, 0xE0, 0x9F, 0xC0, 0x75, 0x48, 0x7B, 0x30, 0x75, 0xC9, 0xBC, 0x40,
+0x77, 0x31, 0x97, 0xB0, 0x77, 0xA9, 0x9E, 0x40, 0x79, 0x11, 0x79, 0xB0, 0x79, 0x89, 0x80, 0x40,
+0x7A, 0xF1, 0x5B, 0xB0, 0x7B, 0x69, 0x62, 0x40, 0x7C, 0xD1, 0x3D, 0xB0, 0x7D, 0x49, 0x44, 0x40,
+0x7E, 0xB1, 0x1F, 0xB0, 0x7F, 0x29, 0x26, 0x40, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x02, 0x04,
+0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x05, 0x03, 0x02, 0x03, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08,
-0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF,
-0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08,
-0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x43, 0x4C,
-0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x69, 0x87, 0x1D, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0x30, 0x47, 0x46, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9B, 0x5C, 0xE5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x7C, 0xE2, 0xC6, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA1, 0x00, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x5E, 0x77, 0xC6, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB1, 0x77, 0x3D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x41, 0x00, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB3, 0x58, 0x70, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x22, 0x34, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB5, 0x39, 0xA4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x03, 0x67, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB7, 0x1A, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xE4, 0x9B, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xC7, 0x20, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCC, 0x1C, 0x6E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x6C, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD3, 0xDC, 0x8F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x1B, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD5, 0x33, 0x55, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x76, 0x92, 0x40, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00, 0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x3C, 0x54, 0xB0, 0x00, 0x01, 0x02,
-0x01, 0x03, 0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03,
-0x05, 0x03, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x08, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x04, 0xFF, 0xFF,
-0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00,
-0x43, 0x4C, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x0A, 0x43, 0x4C, 0x54, 0x33,
-0x0A, 0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73,
-0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x00, 0xFF, 0xFF, 0xBD,
+0xBA, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x43,
+0x4C, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1D, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF,
+0x8F, 0x30, 0x47, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5C, 0xE5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x7C, 0xE2, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x5E, 0x77, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x77, 0x3D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x41, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x58, 0x70, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x22, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x39, 0xA4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x03, 0x67, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0xE4, 0x9B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xC7, 0x20, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x1C, 0x6E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x6C, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xDC, 0x8F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x1B, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x33, 0x55, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x76, 0x92, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xD7, 0x8C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x4F, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0xB7, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x2F, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x97, 0x50, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x18, 0x91, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x80, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0xF8, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x60, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0xD8, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x40, 0x30, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xB8, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x68, 0x20, 0x12, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x98, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xFF, 0xF4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x77, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xDF, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x61, 0x17, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0xC8, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x40, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0xA8, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x88, 0xB7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x68, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0xE0, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x48, 0x7B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x75, 0xC9, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x77, 0x31, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xA9, 0x9E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x79, 0x11, 0x79, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0x89, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xF1, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x69, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xD1, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x49, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0xB1, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x29, 0x26, 0x40, 0x00, 0x01, 0x02, 0x01,
+0x03, 0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x05,
+0x03, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0xBD, 0xBA,
+0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
+0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
+0x53, 0x4D, 0x54, 0x00, 0x43, 0x4C, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x4C,
+0x54, 0x34, 0x43, 0x4C, 0x53, 0x54, 0x2C, 0x4D, 0x38, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x34,
+0x2C, 0x4D, 0x35, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x0A,
+#endif
+0x00, 0x56, 0x49, 0xD8, 0x00, 0xA6, 0xD4, 0x55, 0x00, 0x00, 0x00, 0x12, 0x43, 0x68, 0x69, 0x6C,
+0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Santo_Domingo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -14511,26 +15099,28 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0xFF, 0xFF, 0xC0, 0xB8, 0x01, 0x11, 0xFF,
0xFF, 0xC7, 0xC0, 0x00, 0x16, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x44, 0x4D, 0x54, 0x00, 0x45, 0x44,
0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x48, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1D, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDF, 0x42, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA7, 0xC3, 0x40, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x7B, 0xC8, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFA, 0x7F, 0x48, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x03, 0xDD, 0x04, 0x48, 0x00,
-0x00, 0x00, 0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x05, 0xBF, 0x89, 0x48, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x07, 0xA0, 0xBC, 0xC8, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x29, 0xE1, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0xFF, 0xFF, 0xBE, 0x78, 0x00, 0x00, 0xFF,
-0xFF, 0xBE, 0x60, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x0D, 0xFF, 0xFF, 0xC0, 0xB8, 0x01, 0x11, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x16, 0x4C, 0x4D, 0x54,
-0x00, 0x53, 0x44, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x48,
-0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA5, 0x81, 0xCA, 0x00, 0xA7, 0xFF,
-0xD0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1D, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xDF, 0x42, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xA7, 0xC3, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x43, 0x7B, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0xFA, 0x7F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x03, 0xDD, 0x04, 0x48, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x05, 0xBF, 0x89, 0x48, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA0, 0xBC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x29, 0xE1, 0x60, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0xFF, 0xFF,
+0xBE, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0xBE, 0x60, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x09,
+0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0D, 0xFF, 0xFF, 0xC0, 0xB8, 0x01, 0x11, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x16, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x44, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45,
+0x53, 0x54, 0x00, 0x45, 0x48, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA5, 0x81, 0xCA, 0x00, 0xA7, 0xFF, 0xD0, 0x00, 0x00, 0x00, 0x00,
/* America/Sao_Paulo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -14578,91 +15168,95 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0xFF, 0xFF, 0xD4, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5,
0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA,
-0x72, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD,
-0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE,
-0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB,
-0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9,
-0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B,
-0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54,
-0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5A, 0x09, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05,
-0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E,
-0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7,
-0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8,
-0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B,
-0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78,
-0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33,
-0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B,
-0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2,
-0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4,
-0xC7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD,
-0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94,
-0x8B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B,
-0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC0, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66,
-0xC4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA0, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46,
-0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D,
-0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06,
-0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8,
-0xC1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF,
-0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8,
-0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F,
-0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F,
-0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E,
-0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x91, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2E,
-0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x86, 0xF8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17,
-0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7,
-0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x45, 0x4D, 0x53, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0,
-0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7,
-0x95, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97,
-0x77, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80,
-0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xBA, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60,
-0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x9A, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49,
-0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x83, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20,
-0x39, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x63, 0x47, 0x30, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00,
-0x1B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x43, 0x29, 0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9,
-0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x56, 0x23, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9,
-0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x02, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA8,
-0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xE2, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88,
-0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xCB, 0xEB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68,
-0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xAB, 0xCD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48,
-0xA2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x8B, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31,
-0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x6B, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11,
-0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x4B, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA,
-0xBD, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x2B, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1,
-0x64, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x14, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1,
-0x46, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xF4, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A,
-0x63, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xD4, 0x36, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A,
-0x45, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xB4, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A,
-0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x93, 0xFA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A,
-0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7D, 0x16, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19,
-0xEB, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x5C, 0xF8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9,
-0xCD, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x3C, 0xDA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9,
-0xAF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x1C, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2,
-0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xFC, 0x9E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB,
-0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xDC, 0x80, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82,
-0x8F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xC5, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62,
-0x71, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x7F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B,
-0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x85, 0x61, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B,
-0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x65, 0x43, 0x30, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xD4,
-0x4C, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x42, 0x52, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00,
-0x65, 0x6B, 0x8A, 0x00, 0xCB, 0x86, 0xDD, 0x00, 0x00, 0x00, 0x32, 0x53, 0x20, 0x26, 0x20, 0x53,
-0x45, 0x20, 0x42, 0x72, 0x61, 0x7A, 0x69, 0x6C, 0x20, 0x28, 0x47, 0x4F, 0x2C, 0x20, 0x44, 0x46,
-0x2C, 0x20, 0x4D, 0x47, 0x2C, 0x20, 0x45, 0x53, 0x2C, 0x20, 0x52, 0x4A, 0x2C, 0x20, 0x53, 0x50,
-0x2C, 0x20, 0x50, 0x52, 0x2C, 0x20, 0x53, 0x43, 0x2C, 0x20, 0x52, 0x53, 0x29,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x72, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5A, 0x09, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94, 0x8B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xC4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA0, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x91, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2E, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x86, 0xF8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x51, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x4D, 0x53, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x11, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7, 0x95, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97, 0x77, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xBA, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x9A, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x83, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x39, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x63, 0x47, 0x30, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x1B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x43, 0x29, 0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x23, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x02, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA8, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xE2, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xCB, 0xEB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xAB, 0xCD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48, 0xA2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x8B, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x6B, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x4B, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA, 0xBD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x2B, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1, 0x64, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x14, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1, 0x46, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xF4, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xD4, 0x36, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xB4, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x93, 0xFA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x7D, 0x16, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19, 0xEB, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x5C, 0xF8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9, 0xCD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x3C, 0xDA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9, 0xAF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x1C, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xFC, 0x9E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xDC, 0x80, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82, 0x8F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xC5, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62, 0x71, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xA5, 0x7F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x85, 0x61, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x81, 0x65, 0x43, 0x30, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xD4, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0xE3,
+0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53,
+0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54,
+0x33, 0x42, 0x52, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C,
+0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x65, 0x6B, 0x8A, 0x00, 0xCB, 0x86, 0xDD, 0x00, 0x00, 0x00, 0x36, 0x42, 0x72, 0x61, 0x7A,
+0x69, 0x6C, 0x20, 0x28, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x3A, 0x20, 0x47,
+0x4F, 0x2C, 0x20, 0x44, 0x46, 0x2C, 0x20, 0x4D, 0x47, 0x2C, 0x20, 0x45, 0x53, 0x2C, 0x20, 0x52,
+0x4A, 0x2C, 0x20, 0x53, 0x50, 0x2C, 0x20, 0x50, 0x52, 0x2C, 0x20, 0x53, 0x43, 0x2C, 0x20, 0x52,
+0x53, 0x29,
/* America/Scoresbysund */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -14709,86 +15303,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00,
0x00, 0x00, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x47, 0x54, 0x00, 0x43, 0x47, 0x53, 0x54,
0x00, 0x45, 0x47, 0x54, 0x00, 0x45, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9B, 0x80, 0x4C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x6E, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x14, 0x34, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xF9, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x4C, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x6E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x14, 0x34, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xF9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF, 0xEB, 0x68, 0x00, 0x00,
-0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0,
-0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x47, 0x54, 0x00, 0x43, 0x47, 0x53, 0x54,
-0x00, 0x45, 0x47, 0x54, 0x00, 0x45, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x45, 0x47, 0x54, 0x31, 0x45, 0x47, 0x53,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x31, 0x0A, 0x00, 0xF4, 0xE0, 0xCD, 0x00, 0xF1, 0x23, 0xC5, 0x00, 0x00, 0x00,
-0x1F, 0x53, 0x63, 0x6F, 0x72, 0x65, 0x73, 0x62, 0x79, 0x73, 0x75, 0x6E, 0x64, 0x20, 0x2F, 0x20,
-0x49, 0x74, 0x74, 0x6F, 0x71, 0x71, 0x6F, 0x72, 0x74, 0x6F, 0x6F, 0x72, 0x6D, 0x69, 0x69, 0x74,
-
+0x05, 0x04, 0xFF, 0xFF, 0xEB, 0x68, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x04, 0xFF, 0xFF,
+0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0D,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x47, 0x54, 0x00, 0x43, 0x47, 0x53, 0x54, 0x00, 0x45, 0x47, 0x54, 0x00, 0x45, 0x47, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x0A, 0x45, 0x47, 0x54, 0x31, 0x45, 0x47, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x0A,
+#endif
+0x00, 0xF4, 0xE0, 0xCD, 0x00, 0xF1, 0x23, 0xC5, 0x00, 0x00, 0x00, 0x1D, 0x53, 0x63, 0x6F, 0x72,
+0x65, 0x73, 0x62, 0x79, 0x73, 0x75, 0x6E, 0x64, 0x2F, 0x49, 0x74, 0x74, 0x6F, 0x71, 0x71, 0x6F,
+0x72, 0x74, 0x6F, 0x6F, 0x72, 0x6D, 0x69, 0x69, 0x74,
/* America/Shiprock */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -14846,106 +15442,108 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00,
-0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65,
-0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x45,
-0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08,
-0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76,
-0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0,
-0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53,
-0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x45, 0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
+0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
+0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
+0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A,
+0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* America/Sitka */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15001,118 +15599,121 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x18, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50,
0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41,
0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x3F, 0xC0, 0xD2, 0x59, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x33, 0x99, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02,
-0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x06, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
-0xD2, 0xA7, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x27, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x04,
-0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90,
-0x01, 0x10, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x18, 0xFF, 0xFF,
-0x8F, 0x80, 0x01, 0x1C, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x21, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53,
-0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x59, 0x53,
-0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE0,
-0x92, 0xC6, 0x00, 0x44, 0x34, 0x2D, 0x00, 0x00, 0x00, 0x28, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73,
-0x74, 0x20, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x70, 0x61, 0x6E, 0x68, 0x61, 0x6E, 0x64,
-0x6C, 0x65,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xD2, 0x59, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x33, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x06, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0xD2, 0xA7, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x27, 0x00,
+0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D,
+0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x14, 0xFF,
+0xFF, 0x8F, 0x80, 0x01, 0x18, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x1C, 0xFF, 0xFF, 0x81, 0x70, 0x00,
+0x21, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x50, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x44,
+0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54,
+0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xE0, 0x92, 0xC6, 0x00, 0x44, 0x34, 0x2D, 0x00, 0x00, 0x00, 0x13, 0x41, 0x6C, 0x61, 0x73,
+0x6B, 0x61, 0x20, 0x2D, 0x20, 0x53, 0x69, 0x74, 0x6B, 0x61, 0x20, 0x61, 0x72, 0x65, 0x61,
/* America/St_Barthelemy */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA4, 0x9D, 0xED, 0x00, 0xB2,
-0xC1, 0xB8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA4, 0x9D, 0xED, 0x00, 0xB2, 0xC1, 0xB8, 0x00, 0x00, 0x00, 0x00,
/* America/St_Johns */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15198,212 +15799,222 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x10, 0xFF, 0xFF, 0xEA, 0xE8, 0x01, 0x14, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x04, 0x4C, 0x4D, 0x54,
0x00, 0x4E, 0x44, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x4E, 0x57, 0x54,
0x00, 0x4E, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x09,
-0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x5E, 0x3D, 0x34, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x62, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9D, 0xA4, 0xE6, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x7E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBA, 0xD6, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xB6, 0x88, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0x38, 0xFF, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x95, 0x19, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA3, 0x84, 0xFC, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x74, 0xFB, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0x64, 0xDE, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x5E, 0x17, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA7, 0x44, 0xC0, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x3D, 0xF9, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA9, 0x24, 0xA2, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x1D, 0xDB, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAB, 0x04, 0x84, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xFD, 0xBD, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAC, 0xE4, 0x66, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xDD, 0x9F, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAE, 0xCD, 0x82, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBD, 0x81, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB0, 0xAD, 0x64, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0xA6, 0x9E, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB2, 0x8D, 0x46, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x86, 0x80, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB4, 0x6D, 0x28, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x66, 0x62, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB6, 0x4D, 0x0A, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x46, 0x44, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0x2C, 0xEC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x26, 0x26, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBA, 0x16, 0x09, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x0F, 0x42, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBB, 0xF5, 0xEB, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xEF, 0x24, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBD, 0xD5, 0xCD, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9E, 0x4D, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBE, 0xCF, 0x06, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xB5, 0xAF, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC0, 0xB8, 0x31, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x79, 0xEF, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC2, 0x98, 0x13, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x59, 0xD1, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC4, 0x77, 0xF5, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x39, 0xB3, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC6, 0x61, 0x11, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x19, 0x95, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x40, 0xF3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x02, 0xB2, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0x20, 0xD5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x94, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0x00, 0xB7, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x60, 0xE6, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x88, 0x44, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x4A, 0x03, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x68, 0x26, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD6, 0x29, 0xE5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x48, 0x08, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD8, 0x09, 0xC7, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x27, 0xEA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD9, 0xE9, 0xA9, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x11, 0x07, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDB, 0xD2, 0xC5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x74, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDD, 0xA9, 0x6D, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x56, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDF, 0x89, 0x4F, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x38, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE1, 0x69, 0x31, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x1A, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE3, 0x49, 0x13, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5D, 0xFC, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE5, 0x28, 0xF5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x18, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE7, 0x12, 0x11, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x26, 0xFA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE8, 0xF1, 0xF3, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xDC, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEA, 0xD1, 0xD5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xBE, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEC, 0xB1, 0xB7, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xA0, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEE, 0xBF, 0xBE, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xBD, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF0, 0x9F, 0xA0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0x9F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF2, 0x7F, 0x82, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x81, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF4, 0x5F, 0x64, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x63, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF6, 0x3F, 0x46, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x45, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF8, 0x28, 0x62, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x27, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0x08, 0x44, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x43, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xE8, 0x26, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x25, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0xC8, 0x08, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x07, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA7, 0xEA, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x87, 0xCC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x70, 0xE9, 0x48, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xE8, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x50, 0xCB, 0x48, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x30, 0xAD, 0x48, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x10, 0x8F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0xF0, 0x71, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x0C, 0xD9, 0x8D, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x0E, 0xB9, 0x6F, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x6E, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x10, 0x99, 0x51, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x50, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x12, 0x79, 0x33, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x32, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x14, 0x59, 0x15, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x14, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x38, 0xF7, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xF6, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x18, 0x22, 0x14, 0x48, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0x01, 0xF6, 0x48, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xF5, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xE1, 0xD8, 0x48, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xD7, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0xC1, 0xBA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xB9, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0xA1, 0x9C, 0x48, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xCF, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x81, 0x62, 0x64, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xB1, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x6A, 0x70, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0x93, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x4A, 0x60, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x75, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x2A, 0x42, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0x92, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x0A, 0x24, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x74, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xEA, 0x06, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x56, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xD3, 0x23, 0x64, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x38, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0xB3, 0x05, 0x64, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x1A, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x92, 0xE7, 0x64, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x36, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x72, 0xC9, 0x64, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x18, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x52, 0xAB, 0x64, 0x00, 0x00, 0x00, 0x00, 0x35, 0x26, 0xFA, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0x8D, 0x64, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xDC, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1B, 0xA9, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xBE, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0x8B, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xA0, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDB, 0x6D, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xBD, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0x4F, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x9F, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x31, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x81, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0x4E, 0x64, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x30, 0x64, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x45, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x44, 0x12, 0x64, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x77, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x2D, 0x2E, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x59, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x0D, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x3B, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xEC, 0xF2, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x58, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xD6, 0x0F, 0x64, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x3A, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xB6, 0x0D, 0x48, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x38, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x95, 0xEF, 0x48, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x1A, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x75, 0xD1, 0x48, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xFC, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x55, 0xB3, 0x48, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xDE, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x35, 0x95, 0x48, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE4, 0xFA, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x1E, 0xB1, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xDC, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xFE, 0x93, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xBE, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xDE, 0x75, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA0, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xBE, 0x57, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x82, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x9E, 0x39, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0x9F, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x87, 0x56, 0x48, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x81, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x67, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x63, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x47, 0x1A, 0x48, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x45, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x26, 0xFC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x27, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x69, 0x06, 0xDE, 0x48, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x09, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xE6, 0xC0, 0x48, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x25, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xCF, 0xDC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x07, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xAF, 0xBE, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x8F, 0xA0, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x6F, 0x82, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xAD, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x4F, 0x64, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x38, 0x81, 0x48, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x18, 0x63, 0x48, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xF8, 0x45, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xD8, 0x27, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xB8, 0x09, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x34, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x97, 0xEB, 0x48, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x34, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x62, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xE6, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x7E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xD6, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0xB6, 0x88, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x38, 0xFF, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x95, 0x19, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0xFC, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x74, 0xFB, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x64, 0xDE, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x5E, 0x17, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x44, 0xC0, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x3D, 0xF9, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x24, 0xA2, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1D, 0xDB, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0x04, 0x84, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFD, 0xBD, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xE4, 0x66, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xDD, 0x9F, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xCD, 0x82, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBD, 0x81, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xAD, 0x64, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0xA6, 0x9E, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x8D, 0x46, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x86, 0x80, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x6D, 0x28, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x66, 0x62, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x4D, 0x0A, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x46, 0x44, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x2C, 0xEC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x26, 0x26, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0x09, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x0F, 0x42, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF5, 0xEB, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xEF, 0x24, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD5, 0xCD, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x9E, 0x4D, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xCF, 0x06, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0xB5, 0xAF, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xB8, 0x31, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x79, 0xEF, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x98, 0x13, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x59, 0xD1, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x77, 0xF5, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x39, 0xB3, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x61, 0x11, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x19, 0x95, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x40, 0xF3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x02, 0xB2, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x20, 0xD5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x94, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x00, 0xB7, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xE6, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x88, 0x44, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4A, 0x03, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x68, 0x26, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xE5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x48, 0x08, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xC7, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x27, 0xEA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0xA9, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x11, 0x07, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xD2, 0xC5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x74, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x6D, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x56, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x4F, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x38, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x31, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x1A, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x13, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5D, 0xFC, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x28, 0xF5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x18, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x11, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x26, 0xFA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xF3, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xDC, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xD5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xBE, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xB7, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xA0, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xBE, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xBD, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xA0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0x9F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x82, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x81, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x64, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x63, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x46, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x45, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x62, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x27, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x44, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x43, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x26, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x25, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x08, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x07, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xEA, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xCC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xE9, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xE8, 0x58, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xCB, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xAD, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x8F, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x71, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x8D, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x6F, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x6E, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x51, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x50, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x33, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x32, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x15, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x14, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xF7, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x28, 0xF6, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x14, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xF6, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF1, 0xF5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xD8, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xD7, 0x58, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xBA, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xB9, 0x58, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x9C, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x75, 0xCF, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x62, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xB1, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0x70, 0xD4, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0x93, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x60, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x75, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x42, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0x92, 0x74, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x24, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0x74, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x06, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x56, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x23, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x38, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x05, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x1A, 0x74, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0xE7, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x36, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xC9, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x18, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xAB, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x26, 0xFA, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x8D, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xDC, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xA9, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xBE, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x8B, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xA0, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x6D, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xBD, 0x74, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x4F, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0x9F, 0x74, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x31, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0x81, 0x74, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x4E, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x30, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x45, 0x74, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x12, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x77, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x2E, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x59, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x3B, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEC, 0xF2, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x58, 0x74, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x0F, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x3A, 0x74, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x0D, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x38, 0x58, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xEF, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x1A, 0x58, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD1, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1B, 0xFC, 0x58, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xB3, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xDE, 0x58, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x95, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE4, 0xFA, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB1, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xDC, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x93, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xBE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x75, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xA0, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x57, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x82, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x39, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0x9F, 0x58, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x56, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x81, 0x58, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x63, 0x58, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x1A, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x45, 0x58, 0x00, 0x00, 0x00, 0x00, 0x67, 0x26, 0xFC, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x27, 0x58, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xDE, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x09, 0x58, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC0, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x25, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xDC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x07, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xBE, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA0, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x82, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xAD, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x64, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x81, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x63, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x45, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x27, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x09, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x34, 0x58, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xEB, 0x48, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x06, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x07, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x07, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xDC, 0xA4, 0x01, 0x04,
-0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x08, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x04, 0xFF, 0xFF, 0xCE, 0xC8,
-0x00, 0x08, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x0C, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x10, 0xFF, 0xFF,
-0xEA, 0xE8, 0x01, 0x14, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x44,
-0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x44,
-0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x53, 0x54, 0x33, 0x3A, 0x33, 0x30, 0x4E, 0x44, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
-0x00, 0xD1, 0xE8, 0xFA, 0x00, 0xC2, 0x38, 0x0D, 0x00, 0x00, 0x00, 0x28, 0x4E, 0x65, 0x77, 0x66,
-0x6F, 0x75, 0x6E, 0x64, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x2C, 0x20, 0x69,
-0x6E, 0x63, 0x6C, 0x75, 0x64, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x45, 0x20, 0x4C, 0x61, 0x62, 0x72,
-0x61, 0x64, 0x6F, 0x72,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0xFF, 0xFF, 0xCE, 0x94,
+0x00, 0x00, 0xFF, 0xFF, 0xDC, 0xA4, 0x01, 0x04, 0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x08, 0xFF, 0xFF,
+0xDC, 0xD8, 0x01, 0x04, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x08, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x0C,
+0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x10, 0xFF, 0xFF, 0xEA, 0xE8, 0x01, 0x14, 0xFF, 0xFF, 0xDC, 0xD8,
+0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x44, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x50,
+0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x53,
+0x54, 0x33, 0x3A, 0x33, 0x30, 0x4E, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD1, 0xE8, 0xFA, 0x00, 0xC2, 0x38, 0x0D, 0x00, 0x00, 0x00, 0x22, 0x4E, 0x65, 0x77, 0x66,
+0x6F, 0x75, 0x6E, 0x64, 0x6C, 0x61, 0x6E, 0x64, 0x3B, 0x20, 0x4C, 0x61, 0x62, 0x72, 0x61, 0x64,
+0x6F, 0x72, 0x20, 0x28, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x29,
/* America/St_Kitts */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA3, 0xBA, 0x10, 0x00, 0xB2,
-0xF5, 0xCD, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA3, 0xBA, 0x10, 0x00, 0xB2, 0xF5, 0xCD, 0x00, 0x00, 0x00, 0x00,
/* America/St_Lucia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0x9E, 0xB7, 0x82, 0x00, 0xB5,
-0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x9E, 0xB7, 0x82, 0x00, 0xB5, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
/* America/St_Thomas */
0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA5, 0x54, 0x38, 0x00, 0xAF,
-0x93, 0xEA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA5, 0x54, 0x38, 0x00, 0xAF, 0x93, 0xEA, 0x00, 0x00, 0x00, 0x00,
/* America/St_Vincent */
0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0x9D, 0x64, 0xF8, 0x00, 0xB5,
-0x39, 0x3A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x9D, 0x64, 0xF8, 0x00, 0xB5, 0x39, 0x3A, 0x00, 0x00, 0x00, 0x00,
/* America/Swift_Current */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15420,32 +16031,33 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x96, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x76, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x53, 0x6F, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xBE, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0xA0, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x17, 0x0F, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xD3, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xCB, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xEE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0xAD, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05,
-0xFF, 0xFF, 0x9A, 0xE8, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF,
-0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
-0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A, 0x00, 0xD6,
-0x0E, 0x2D, 0x00, 0x6E, 0x1E, 0x1A, 0x00, 0x00, 0x00, 0x2E, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61,
-0x6C, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20,
-0x2D, 0x20, 0x53, 0x61, 0x73, 0x6B, 0x61, 0x74, 0x63, 0x68, 0x65, 0x77, 0x61, 0x6E, 0x20, 0x2D,
-0x20, 0x6D, 0x69, 0x64, 0x77, 0x65, 0x73, 0x74,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x96, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x76, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x17, 0x0F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xCB, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xEE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x9A, 0xE8, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04,
+0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
+0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
+0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54,
+0x36, 0x0A,
+#endif
+0x00, 0xD6, 0x0E, 0x2D, 0x00, 0x6E, 0x1E, 0x1A, 0x00, 0x00, 0x00, 0x12, 0x43, 0x53, 0x54, 0x20,
+0x2D, 0x20, 0x53, 0x4B, 0x20, 0x28, 0x6D, 0x69, 0x64, 0x77, 0x65, 0x73, 0x74, 0x29,
/* America/Tegucigalpa */
0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15455,18 +16067,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x23, 0x3C, 0x7D, 0x50, 0x44, 0x5D, 0x8C, 0xE0, 0x44, 0xD6, 0xC8, 0xD0, 0x00, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE, 0x3C, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04,
0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA4, 0x4C, 0x4B, 0x44, 0x00, 0x00, 0x00, 0x00, 0x20, 0x9A, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x5C, 0x9B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0xBE, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x3C, 0x7D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x5D, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x44, 0xD6, 0xC8, 0xD0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE, 0x3C,
-0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A, 0x00, 0x9E, 0xD8, 0x10, 0x00, 0x8D, 0x93, 0x7D, 0x00, 0x00,
-0x00, 0x00,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4C, 0x4B, 0x44, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x9A, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x9B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x7A, 0xBE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x7D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x5D, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0xD6, 0xC8, 0xD0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE, 0x3C, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x9E, 0xD8, 0x10, 0x00, 0x8D, 0x93, 0x7D, 0x00, 0x00, 0x00, 0x00,
/* America/Thule */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15504,6 +16118,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xBF, 0x84,
0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D,
0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
@@ -15564,9 +16179,10 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D,
0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xFE, 0x29, 0x1A, 0x00, 0xA9, 0xB4, 0x02,
-0x00, 0x00, 0x00, 0x10, 0x54, 0x68, 0x75, 0x6C, 0x65, 0x20, 0x2F, 0x20, 0x50, 0x69, 0x74, 0x75,
-0x66, 0x66, 0x69, 0x6B,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xFE, 0x29, 0x1A, 0x00, 0xA9, 0xB4, 0x02, 0x00, 0x00, 0x00, 0x0E, 0x54, 0x68, 0x75, 0x6C,
+0x65, 0x2F, 0x50, 0x69, 0x74, 0x75, 0x66, 0x66, 0x69, 0x6B,
/* America/Thunder_Bay */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15619,98 +16235,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x82, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0x24, 0x7B, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xC1, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xA3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0xFF, 0xFF, 0xAC, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF,
-0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
-0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45,
-0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
-0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0xD3, 0x27, 0xFD, 0x00, 0x8A, 0x79, 0x38, 0x00, 0x00, 0x00, 0x23, 0x45,
-0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x54, 0x68,
-0x75, 0x6E, 0x64, 0x65, 0x72, 0x20, 0x42, 0x61, 0x79, 0x2C, 0x20, 0x4F, 0x6E, 0x74, 0x61, 0x72,
-0x69, 0x6F,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x82, 0x2C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x8F, 0x24, 0x7B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0xFF, 0xFF, 0xAC, 0x54, 0x00, 0x00, 0xFF, 0xFF,
+0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C,
+0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00,
+0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD3, 0x27, 0xFD, 0x00, 0x8A, 0x79, 0x38, 0x00, 0x00, 0x00, 0x1A, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4F, 0x4E, 0x20, 0x28, 0x54, 0x68, 0x75, 0x6E, 0x64, 0x65,
+0x72, 0x20, 0x42, 0x61, 0x79, 0x29,
/* America/Tijuana */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15767,104 +16385,106 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D,
0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57,
0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04,
-0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54,
-0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
-0x31, 0x2E, 0x30, 0x0A, 0x00, 0xBA, 0xF8, 0x95, 0x00, 0x60, 0x1A, 0xDD, 0x00, 0x00, 0x00, 0x30,
-0x55, 0x53, 0x20, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20,
-0x2D, 0x20, 0x42, 0x61, 0x6A, 0x61, 0x20, 0x43, 0x61, 0x6C, 0x69, 0x66, 0x6F, 0x72, 0x6E, 0x69,
-0x61, 0x20, 0x6E, 0x65, 0x61, 0x72, 0x20, 0x55, 0x53, 0x20, 0x62, 0x6F, 0x72, 0x64, 0x65, 0x72,
-
+0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF,
+0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10,
+0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53,
+0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0xBA, 0xF8, 0x95, 0x00, 0x60, 0x1A, 0xDD, 0x00, 0x00, 0x00, 0x21, 0x50, 0x61, 0x63, 0x69,
+0x66, 0x69, 0x63, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x55, 0x53, 0x20, 0x2D, 0x20, 0x42, 0x61,
+0x6A, 0x61, 0x20, 0x43, 0x61, 0x6C, 0x69, 0x66, 0x6F, 0x72, 0x6E, 0x69, 0x61,
/* America/Toronto */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -15946,164 +16566,168 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x78,
-0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x87, 0x2E, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xB1,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x94, 0x06, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x55, 0xA9,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x86, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x28, 0x78,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x66, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x0C, 0x4E,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x46, 0x21, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEC, 0x30,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x1C, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x4D,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xFC, 0xAB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xB5, 0x2F,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xDC, 0x8D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x95, 0x11,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBC, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xAA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xA3,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x8C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x85,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x33, 0x76,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x13, 0x74,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x0A,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x26,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00,
-0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x94, 0x00,
-0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00,
-0xCB, 0xEF, 0x08, 0x00, 0x99, 0x87, 0x62, 0x00, 0x00, 0x00, 0x30, 0x45, 0x61, 0x73, 0x74, 0x65,
-0x72, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4F, 0x6E, 0x74, 0x61, 0x72, 0x69,
-0x6F, 0x20, 0x26, 0x20, 0x51, 0x75, 0x65, 0x62, 0x65, 0x63, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73,
-0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x78, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x87, 0x2E, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x94, 0x06, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x55, 0xA9, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x86, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x28, 0x78, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x66, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x0C, 0x4E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x46, 0x21, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEC, 0x30, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1C, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFC, 0xAB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xB5, 0x2F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xDC, 0x8D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x95, 0x11, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBC, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x55, 0xAA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xA3, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x35, 0x8C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x85, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x15, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x33, 0x76, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x13, 0x74, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x0A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x26, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
+0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF,
+0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
+0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xCB, 0xEF, 0x08, 0x00, 0x99, 0x87, 0x62, 0x00, 0x00, 0x00, 0x1D, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x2D, 0x20, 0x4F, 0x4E, 0x2C, 0x20, 0x51, 0x43, 0x20, 0x28, 0x6D, 0x6F,
+0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* America/Tortola */
0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0xA5, 0x7B, 0x48, 0x00, 0xB0,
-0x0F, 0x9D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0xA5, 0x7B, 0x48, 0x00, 0xB0, 0x0F, 0x9D, 0x00, 0x00, 0x00, 0x00,
/* America/Vancouver */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16171,200 +16795,49 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0xFF, 0xFF, 0x8C, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF,
0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10,
0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00,
-0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xBF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x76, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8,
-0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x76, 0x0F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x53,
-0x7D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20,
-0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00,
-0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0,
-0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0,
-0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9,
-0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89,
-0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69,
-0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49,
-0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29,
-0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12,
-0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2,
-0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2,
-0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1,
-0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91,
-0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71,
-0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F,
-0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F,
-0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08,
-0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88,
-0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51,
-0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53,
-0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C,
-0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76,
-0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0,
-0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0x8C, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F,
-0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53,
-0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD4, 0x81, 0x0A, 0x00, 0x56, 0xCC, 0x0D, 0x00, 0x00, 0x00,
-0x24, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20,
-0x77, 0x65, 0x73, 0x74, 0x20, 0x42, 0x72, 0x69, 0x74, 0x69, 0x73, 0x68, 0x20, 0x43, 0x6F, 0x6C,
-0x75, 0x6D, 0x62, 0x69, 0x61,
-
-/* America/Virgin */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
-0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54,
-0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12,
-0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* America/Whitehorse */
-0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00,
-0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80,
-0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90,
-0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10,
-0x15, 0x49, 0x54, 0x20, 0x16, 0x39, 0x37, 0x10, 0x17, 0x29, 0x36, 0x20, 0x18, 0x22, 0x53, 0x90,
-0x19, 0x09, 0x18, 0x20, 0x1A, 0x02, 0x35, 0x90, 0x1A, 0xF2, 0x34, 0xA0, 0x1B, 0xE2, 0x17, 0x90,
-0x1C, 0xD2, 0x16, 0xA0, 0x1D, 0xC1, 0xF9, 0x90, 0x1E, 0xB1, 0xF8, 0xA0, 0x1F, 0xA1, 0xDB, 0x90,
-0x20, 0x76, 0x2B, 0x20, 0x21, 0x81, 0xBD, 0x90, 0x22, 0x56, 0x0D, 0x20, 0x23, 0x6A, 0xDA, 0x10,
-0x24, 0x35, 0xEF, 0x20, 0x25, 0x4A, 0xBC, 0x10, 0x26, 0x15, 0xD1, 0x20, 0x27, 0x2A, 0x9E, 0x10,
-0x27, 0xFE, 0xED, 0xA0, 0x29, 0x0A, 0x80, 0x10, 0x29, 0xDE, 0xCF, 0xA0, 0x2A, 0xEA, 0x62, 0x10,
-0x2B, 0xBE, 0xB1, 0xA0, 0x2C, 0xD3, 0x7E, 0x90, 0x2D, 0x9E, 0x93, 0xA0, 0x2E, 0xB3, 0x60, 0x90,
-0x2F, 0x7E, 0x75, 0xA0, 0x30, 0x93, 0x42, 0x90, 0x31, 0x67, 0x92, 0x20, 0x32, 0x73, 0x24, 0x90,
-0x33, 0x47, 0x74, 0x20, 0x34, 0x53, 0x06, 0x90, 0x35, 0x27, 0x56, 0x20, 0x36, 0x32, 0xE8, 0x90,
-0x37, 0x07, 0x38, 0x20, 0x38, 0x1C, 0x05, 0x10, 0x38, 0xE7, 0x1A, 0x20, 0x39, 0xFB, 0xE7, 0x10,
-0x3A, 0xC6, 0xFC, 0x20, 0x3B, 0xDB, 0xC9, 0x10, 0x3C, 0xB0, 0x18, 0xA0, 0x3D, 0xBB, 0xAB, 0x10,
-0x3E, 0x8F, 0xFA, 0xA0, 0x3F, 0x9B, 0x8D, 0x10, 0x40, 0x6F, 0xDC, 0xA0, 0x41, 0x84, 0xA9, 0x90,
-0x42, 0x4F, 0xBE, 0xA0, 0x43, 0x64, 0x8B, 0x90, 0x44, 0x2F, 0xA0, 0xA0, 0x45, 0x44, 0x6D, 0x90,
-0x45, 0xF3, 0xD3, 0x20, 0x47, 0x2D, 0x8A, 0x10, 0x47, 0xD3, 0xB5, 0x20, 0x49, 0x0D, 0x6C, 0x10,
-0x49, 0xB3, 0x97, 0x20, 0x4A, 0xED, 0x4E, 0x10, 0x4B, 0x9C, 0xB3, 0xA0, 0x4C, 0xD6, 0x6A, 0x90,
-0x4D, 0x7C, 0x95, 0xA0, 0x4E, 0xB6, 0x4C, 0x90, 0x4F, 0x5C, 0x77, 0xA0, 0x50, 0x96, 0x2E, 0x90,
-0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90,
-0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10,
-0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10,
-0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10,
-0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90,
-0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90,
-0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90,
-0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10,
-0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10,
-0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90,
-0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90,
-0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90,
-0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02,
-0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F,
-0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF,
-0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
-0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59,
-0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0x1D, 0x5F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x76, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x76, 0x0F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x7D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
@@ -16422,25 +16895,183 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0xFF, 0xFF, 0x8C, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF,
+0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
+0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54,
+0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A,
+0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD4, 0x81, 0x0A, 0x00, 0x56, 0xCC, 0x0D, 0x00, 0x00, 0x00, 0x19, 0x50, 0x61, 0x63, 0x69,
+0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x42, 0x43, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61,
+0x72, 0x65, 0x61, 0x73, 0x29,
+
+/* America/Virgin */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
+0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF, 0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x37, 0x33, 0xAC, 0x00, 0x01, 0xFF, 0xFF,
+0xC6, 0x54, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* America/Whitehorse */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00, 0x00,
+0x9E, 0xB8, 0xCB, 0xB0, 0x9F, 0xBB, 0x23, 0xA0, 0xA0, 0xD0, 0x0C, 0xB0, 0xA1, 0xA2, 0xD2, 0x80,
+0xCB, 0x89, 0x28, 0xB0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x34, 0x20, 0xF7, 0x2F, 0x76, 0x90,
+0xF8, 0x28, 0xA2, 0x10, 0xFB, 0x1D, 0x5F, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10,
+0x15, 0x49, 0x54, 0x20, 0x16, 0x39, 0x37, 0x10, 0x17, 0x29, 0x36, 0x20, 0x18, 0x22, 0x53, 0x90,
+0x19, 0x09, 0x18, 0x20, 0x1A, 0x02, 0x35, 0x90, 0x1A, 0xF2, 0x34, 0xA0, 0x1B, 0xE2, 0x17, 0x90,
+0x1C, 0xD2, 0x16, 0xA0, 0x1D, 0xC1, 0xF9, 0x90, 0x1E, 0xB1, 0xF8, 0xA0, 0x1F, 0xA1, 0xDB, 0x90,
+0x20, 0x76, 0x2B, 0x20, 0x21, 0x81, 0xBD, 0x90, 0x22, 0x56, 0x0D, 0x20, 0x23, 0x6A, 0xDA, 0x10,
+0x24, 0x35, 0xEF, 0x20, 0x25, 0x4A, 0xBC, 0x10, 0x26, 0x15, 0xD1, 0x20, 0x27, 0x2A, 0x9E, 0x10,
+0x27, 0xFE, 0xED, 0xA0, 0x29, 0x0A, 0x80, 0x10, 0x29, 0xDE, 0xCF, 0xA0, 0x2A, 0xEA, 0x62, 0x10,
+0x2B, 0xBE, 0xB1, 0xA0, 0x2C, 0xD3, 0x7E, 0x90, 0x2D, 0x9E, 0x93, 0xA0, 0x2E, 0xB3, 0x60, 0x90,
+0x2F, 0x7E, 0x75, 0xA0, 0x30, 0x93, 0x42, 0x90, 0x31, 0x67, 0x92, 0x20, 0x32, 0x73, 0x24, 0x90,
+0x33, 0x47, 0x74, 0x20, 0x34, 0x53, 0x06, 0x90, 0x35, 0x27, 0x56, 0x20, 0x36, 0x32, 0xE8, 0x90,
+0x37, 0x07, 0x38, 0x20, 0x38, 0x1C, 0x05, 0x10, 0x38, 0xE7, 0x1A, 0x20, 0x39, 0xFB, 0xE7, 0x10,
+0x3A, 0xC6, 0xFC, 0x20, 0x3B, 0xDB, 0xC9, 0x10, 0x3C, 0xB0, 0x18, 0xA0, 0x3D, 0xBB, 0xAB, 0x10,
+0x3E, 0x8F, 0xFA, 0xA0, 0x3F, 0x9B, 0x8D, 0x10, 0x40, 0x6F, 0xDC, 0xA0, 0x41, 0x84, 0xA9, 0x90,
+0x42, 0x4F, 0xBE, 0xA0, 0x43, 0x64, 0x8B, 0x90, 0x44, 0x2F, 0xA0, 0xA0, 0x45, 0x44, 0x6D, 0x90,
+0x45, 0xF3, 0xD3, 0x20, 0x47, 0x2D, 0x8A, 0x10, 0x47, 0xD3, 0xB5, 0x20, 0x49, 0x0D, 0x6C, 0x10,
+0x49, 0xB3, 0x97, 0x20, 0x4A, 0xED, 0x4E, 0x10, 0x4B, 0x9C, 0xB3, 0xA0, 0x4C, 0xD6, 0x6A, 0x90,
+0x4D, 0x7C, 0x95, 0xA0, 0x4E, 0xB6, 0x4C, 0x90, 0x4F, 0x5C, 0x77, 0xA0, 0x50, 0x96, 0x2E, 0x90,
+0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, 0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90,
+0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, 0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10,
+0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, 0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10,
+0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, 0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10,
+0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, 0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90,
+0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, 0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90,
+0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, 0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90,
+0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, 0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10,
+0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, 0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10,
+0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, 0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90,
+0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, 0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90,
+0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, 0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90,
+0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02,
+0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F,
+0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF,
+0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
+0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59,
+0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00,
+0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x1D, 0x5F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04,
-0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF,
-0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00,
-0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54,
-0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE5, 0xF9,
-0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x1A, 0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x59, 0x75,
-0x6B, 0x6F, 0x6E,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64,
+0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF,
+0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14,
+0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00,
+0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00,
+0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53,
+0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xE5, 0xF9, 0xB2, 0x00, 0x44, 0x96, 0x97, 0x00, 0x00, 0x00, 0x17, 0x50, 0x61, 0x63, 0x69,
+0x66, 0x69, 0x63, 0x20, 0x2D, 0x20, 0x59, 0x75, 0x6B, 0x6F, 0x6E, 0x20, 0x28, 0x73, 0x6F, 0x75,
+0x74, 0x68, 0x29,
/* America/Winnipeg */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16508,125 +17139,127 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xBC, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x64, 0xE4, 0xB0, 0x94, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0x01, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xC3, 0xBA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2,
-0xA0, 0x3B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x88, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x53, 0x60, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x00, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB,
-0xC8, 0x5C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5,
-0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7,
-0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA,
-0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE,
-0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x31, 0x62, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
-0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD,
-0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C,
-0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0xB7, 0x6F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xA4, 0xEC, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
-0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xD5, 0x71, 0xED, 0x00,
-0x7E, 0x6B, 0x47, 0x00, 0x00, 0x00, 0x26, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, 0x54,
-0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4D, 0x61, 0x6E, 0x69, 0x74, 0x6F, 0x62, 0x61, 0x20, 0x26,
-0x20, 0x77, 0x65, 0x73, 0x74, 0x20, 0x4F, 0x6E, 0x74, 0x61, 0x72, 0x69, 0x6F,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBC, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x64, 0xE4, 0xB0, 0x94, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x01, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xC3, 0xBA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0xA0, 0x3B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x88, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x60, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x00, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC8, 0x5C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x31, 0x62, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0xB7, 0x6F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xA4, 0xEC, 0x00, 0x00, 0xFF, 0xFF,
+0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57,
+0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD5, 0x71, 0xED, 0x00, 0x7E, 0x6B, 0x47, 0x00, 0x00, 0x00, 0x1D, 0x43, 0x65, 0x6E, 0x74,
+0x72, 0x61, 0x6C, 0x20, 0x2D, 0x20, 0x4F, 0x4E, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29, 0x3B,
+0x20, 0x4D, 0x61, 0x6E, 0x69, 0x74, 0x6F, 0x62, 0x61,
/* America/Yakutat */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16681,102 +17314,103 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x14, 0xFF, 0xFF, 0x81, 0x70, 0x00,
0x19, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54,
0x00, 0x59, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xD6, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x37,
-0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x55,
-0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x37,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x19,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x35,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x17,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x51,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xCD,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xBD,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xDB, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x9F,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xBD, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xBC,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x9E,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x80,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x62,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x44,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x26,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38,
-0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
-0x02, 0x05, 0x02, 0x05, 0x02, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x00, 0x00, 0xCE, 0x81, 0x00, 0x00, 0xFF, 0xFF, 0x7D, 0x01, 0x00, 0x00, 0xFF, 0xFF,
-0x81, 0x70, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C,
-0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x14, 0xFF, 0xFF, 0x81, 0x70,
-0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50,
-0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
-0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE4, 0x30, 0xC6, 0x00, 0x3D,
-0x73, 0x8D, 0x00, 0x00, 0x00, 0x23, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x54, 0x69, 0x6D,
-0x65, 0x20, 0x2D, 0x20, 0x41, 0x6C, 0x61, 0x73, 0x6B, 0x61, 0x20, 0x70, 0x61, 0x6E, 0x68, 0x61,
-0x6E, 0x64, 0x6C, 0x65, 0x20, 0x6E, 0x65, 0x63, 0x6B,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xD6, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x37, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x55, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x98, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x78, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x41, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x8D, 0x51, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAD, 0xCD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xDB, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xBD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xBC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x9E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x80, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x62, 0x30, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x26, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
+0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0xCE, 0x81, 0x00, 0x00, 0xFF, 0xFF, 0x7D, 0x01, 0x00,
+0x00, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x08, 0xFF, 0xFF, 0x8F,
+0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x14, 0xFF,
+0xFF, 0x81, 0x70, 0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54,
+0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xE4, 0x30, 0xC6, 0x00, 0x3D, 0x73, 0x8D, 0x00, 0x00, 0x00, 0x10, 0x41, 0x6C, 0x61, 0x73,
+0x6B, 0x61, 0x20, 0x2D, 0x20, 0x59, 0x61, 0x6B, 0x75, 0x74, 0x61, 0x74,
/* America/Yellowknife */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16824,89 +17458,90 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x15, 0x7A, 0x7A, 0x7A, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D,
0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x85, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80,
-0x00, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x2A, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x85, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05,
-0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x15, 0x7A,
-0x7A, 0x7A, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x44, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0xE8, 0x9E, 0xC7,
-0x00, 0x64, 0x2C, 0x88, 0x00, 0x00, 0x00, 0x2D, 0x4D, 0x6F, 0x75, 0x6E, 0x74, 0x61, 0x69, 0x6E,
-0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20,
-0x4E, 0x6F, 0x72, 0x74, 0x68, 0x77, 0x65, 0x73, 0x74, 0x20, 0x54, 0x65, 0x72, 0x72, 0x69, 0x74,
-0x6F, 0x72, 0x69, 0x65, 0x73,
+0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x05, 0x03, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
+0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xAB,
+0xA0, 0x01, 0x15, 0x7A, 0x7A, 0x7A, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x4D,
+0x53, 0x54, 0x00, 0x4D, 0x44, 0x44, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54,
+0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xE8, 0x9E, 0xC7, 0x00, 0x64, 0x2C, 0x88, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x75, 0x6E,
+0x74, 0x61, 0x69, 0x6E, 0x20, 0x2D, 0x20, 0x4E, 0x54, 0x20, 0x28, 0x63, 0x65, 0x6E, 0x74, 0x72,
+0x61, 0x6C, 0x29,
/* Antarctica/Casey */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16916,19 +17551,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4F, 0x43, 0xCD, 0x90, 0x00, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80,
0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFE, 0x1E, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x06, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0x8F, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xA9, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x43, 0xCD, 0x90, 0x00, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80,
-0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x57, 0x53, 0x54, 0x2D, 0x38, 0x0A,
-0x00, 0x24, 0x30, 0x52, 0x01, 0xBB, 0x4B, 0x12, 0x00, 0x00, 0x00, 0x1F, 0x43, 0x61, 0x73, 0x65,
-0x79, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x42, 0x61, 0x69, 0x6C, 0x65,
-0x79, 0x20, 0x50, 0x65, 0x6E, 0x69, 0x6E, 0x73, 0x75, 0x6C, 0x61,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x1E, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x8F, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xA9, 0x9C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x43, 0xCD, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00,
+0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x57,
+0x53, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+0x0A, 0x41, 0x57, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x24, 0x30, 0x52, 0x01, 0xBB, 0x4B, 0x12, 0x00, 0x00, 0x00, 0x05, 0x43, 0x61, 0x73, 0x65,
+0x79,
/* Antarctica/Davis */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16938,20 +17575,22 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4B, 0x97, 0xFA, 0x40, 0x4E, 0xA9, 0xAA, 0x30, 0x4F, 0x43, 0xF7, 0xC0, 0x00, 0x01, 0x00, 0x01,
0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04,
0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00,
-0x44, 0x41, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x9C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xDF,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x47, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x14,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x97, 0xFA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xA9, 0xAA,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x43, 0xF7, 0xC0, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x02,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x46,
-0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x44, 0x41, 0x56,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x44, 0x41, 0x56, 0x54, 0x2D,
-0x37, 0x0A, 0x00, 0x20, 0xAD, 0xE2, 0x01, 0x89, 0xA0, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x44, 0x61,
-0x76, 0x69, 0x73, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x56, 0x65, 0x73,
-0x74, 0x66, 0x6F, 0x6C, 0x64, 0x20, 0x48, 0x69, 0x6C, 0x6C, 0x73,
+0x44, 0x41, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x9C, 0x40, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x47, 0xDF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x47, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x14, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x97, 0xFA, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xA9, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x43, 0xF7, 0xC0, 0x00, 0x01, 0x00, 0x01,
+0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04,
+0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00,
+0x44, 0x41, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x44, 0x41,
+0x56, 0x54, 0x2D, 0x37, 0x0A,
+#endif
+0x00, 0x20, 0xAD, 0xE2, 0x01, 0x89, 0xA0, 0x3A, 0x00, 0x00, 0x00, 0x05, 0x44, 0x61, 0x76, 0x69,
+0x73,
/* Antarctica/DumontDUrville */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -16960,18 +17599,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD4, 0xBC, 0x76, 0x80, 0xDE, 0x34, 0x60, 0x60, 0xE7, 0x3C, 0x02, 0x80, 0x00, 0x01, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x44, 0x44, 0x55, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0xBC, 0x76,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x34, 0x60, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x3C, 0x02,
-0x80, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00,
-0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x44,
-0x44, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x44, 0x44, 0x55, 0x54, 0x2D,
-0x31, 0x30, 0x0A, 0x00, 0x23, 0x9A, 0x95, 0x01, 0xE8, 0x4E, 0x82, 0x00, 0x00, 0x00, 0x25, 0x44,
-0x75, 0x6D, 0x6F, 0x6E, 0x74, 0x2D, 0x64, 0x27, 0x55, 0x72, 0x76, 0x69, 0x6C, 0x6C, 0x65, 0x20,
-0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x41, 0x64, 0x65, 0x6C, 0x69, 0x65, 0x20,
-0x4C, 0x61, 0x6E, 0x64,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0xBC, 0x76, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0x34, 0x60, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x3C, 0x02, 0x80, 0x00, 0x01, 0x00, 0x02,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
+0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x44, 0x44, 0x55, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x44, 0x44, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x23, 0x9A, 0x95, 0x01, 0xE8, 0x4E, 0x82, 0x00, 0x00, 0x00, 0x10, 0x44, 0x75, 0x6D, 0x6F,
+0x6E, 0x74, 0x2D, 0x64, 0x27, 0x55, 0x72, 0x76, 0x69, 0x6C, 0x6C, 0x65,
/* Antarctica/Macquarie */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17009,69 +17649,71 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01,
0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x0E, 0x7A, 0x7A, 0x7A,
0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x4D, 0x49, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x05, 0x16, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5,
-0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x87,
-0xB4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x0C, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2,
-0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xB2, 0x7E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7,
-0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x76, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7,
-0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3F, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70,
-0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F,
-0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F,
-0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF,
-0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8,
-0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98,
-0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78,
-0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58,
-0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38,
-0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21,
-0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01,
-0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97,
-0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80,
-0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69,
-0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49,
-0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29,
-0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xED,
-0xE1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCD,
-0xC3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAD,
-0xA5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8D,
-0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6D,
-0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x56,
-0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x36,
-0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16,
-0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6,
-0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7,
-0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF,
-0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x9F,
-0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E,
-0xEE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5E,
-0xD0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3E,
-0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E,
-0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x07,
-0xB1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7,
-0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7,
-0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x01, 0x02, 0x01, 0x03, 0x01,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x05, 0x16, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x87, 0xB4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x0C, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xC2, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xB2, 0x7E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC7, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x76, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3F, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xED, 0xE1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCD, 0xC3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAD, 0xA5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8D, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x56, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x36, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x16, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xBF, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x9F, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7E, 0xEE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5E, 0xD0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3E, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1E, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x07, 0xB1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x01, 0x02, 0x01,
+0x03, 0x01, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x0E,
-0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x4D, 0x49,
-0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x4D, 0x49, 0x53, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x36, 0x2B, 0x30, 0x02, 0x05,
-0x32, 0x58, 0x00, 0x00, 0x00, 0x10, 0x4D, 0x61, 0x63, 0x71, 0x75, 0x61, 0x72, 0x69, 0x65, 0x20,
-0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0,
+0x00, 0x0E, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00,
+0x4D, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x4D, 0x49, 0x53, 0x54, 0x2D, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x36, 0x2B, 0x30, 0x02, 0x05, 0x32, 0x58, 0x00, 0x00, 0x00, 0x10, 0x4D, 0x61, 0x63, 0x71,
+0x75, 0x61, 0x72, 0x69, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
/* Antarctica/Mawson */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17079,17 +17721,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0xE2, 0x20, 0x32, 0x80, 0x4A, 0xDA, 0x22, 0x40, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x7A, 0x7A, 0x7A,
-0x00, 0x4D, 0x41, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x20, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x22, 0x40,
-0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00,
-0x00, 0x46, 0x50, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x4D, 0x41, 0x57, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x41, 0x57, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0x22, 0x2E, 0x00,
-0x01, 0x72, 0x9C, 0x4D, 0x00, 0x00, 0x00, 0x19, 0x4D, 0x61, 0x77, 0x73, 0x6F, 0x6E, 0x20, 0x53,
-0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x48, 0x6F, 0x6C, 0x6D, 0x65, 0x20, 0x42, 0x61,
-0x79,
+0x00, 0x4D, 0x41, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x20, 0x32, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x22, 0x40, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
+0x60, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x4D, 0x41, 0x57,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x41, 0x57, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0x22, 0x2E, 0x00, 0x01, 0x72, 0x9C, 0x4D, 0x00, 0x00, 0x00, 0x06, 0x4D, 0x61, 0x77, 0x73,
+0x6F, 0x6E,
/* Antarctica/McMurdo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17148,113 +17791,116 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00,
0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04,
-0x00, 0x00, 0xA1, 0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0,
-0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35,
-0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x12, 0x90, 0x9A,
-0x02, 0x10, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x2D, 0x4D, 0x63, 0x4D, 0x75, 0x72, 0x64, 0x6F, 0x2C,
-0x20, 0x53, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x50, 0x6F, 0x6C, 0x65, 0x2C, 0x20, 0x53, 0x63, 0x6F,
-0x74, 0x74, 0x20, 0x28, 0x4E, 0x65, 0x77, 0x20, 0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20,
-0x74, 0x69, 0x6D, 0x65, 0x29,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04, 0x00, 0x00, 0xA1,
+0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00,
+0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E,
+0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x5A, 0x53,
+0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x12, 0x90, 0x9A, 0x02, 0x10, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x26, 0x4E, 0x65, 0x77, 0x20,
+0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x4D,
+0x63, 0x4D, 0x75, 0x72, 0x64, 0x6F, 0x2C, 0x20, 0x53, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x50, 0x6F,
+0x6C, 0x65,
/* Antarctica/Palmer */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x16, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x80, 0x00, 0x00, 0x00,
0xF6, 0x98, 0xAD, 0x00, 0xF6, 0xE6, 0x9F, 0xB0, 0xF8, 0x13, 0x43, 0xC0, 0xF8, 0xC7, 0xD3, 0x30,
0xF9, 0xF4, 0x77, 0x40, 0xFA, 0xD3, 0x36, 0xB0, 0xFB, 0xC3, 0x35, 0xC0, 0xFC, 0xBC, 0x53, 0x30,
0xFD, 0xAC, 0x52, 0x40, 0xFE, 0x9C, 0x35, 0x30, 0xFF, 0x8C, 0x34, 0x40, 0x07, 0xA3, 0x4A, 0xB0,
@@ -17274,92 +17920,132 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30,
0x4A, 0xD1, 0x58, 0x40, 0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0xC6, 0x07, 0x30,
0x4E, 0x50, 0x82, 0xC0, 0x4F, 0x9C, 0xAE, 0xB0, 0x50, 0x42, 0xD9, 0xC0, 0x51, 0x7C, 0x90, 0xB0,
-0x52, 0x2B, 0xF6, 0x40, 0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x55, 0x3C, 0x54, 0xB0,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x07, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5,
-0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF,
-0xFF, 0xD5, 0xD0, 0x01, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x12, 0xFF, 0xFF, 0xC7, 0xC0, 0x00,
-0x12, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x12, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41,
-0x52, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x98, 0xAD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
-0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07,
-0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x30, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x3C, 0x54, 0xB0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03,
-0x04, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x12, 0xFF, 0xFF,
-0xC7, 0xC0, 0x00, 0x12, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x12, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x52,
-0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x00, 0x01, 0x0A, 0x43, 0x4C, 0x54, 0x33, 0x0A, 0x00, 0x26, 0x73, 0xC0, 0x00, 0xB0, 0xD9, 0x70,
-0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x6C, 0x6D, 0x65, 0x72, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69,
-0x6F, 0x6E, 0x2C, 0x20, 0x41, 0x6E, 0x76, 0x65, 0x72, 0x73, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E,
-0x64,
+0x52, 0x2B, 0xF6, 0x40, 0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x57, 0x37, 0xE6, 0x30,
+0x57, 0xAF, 0xEC, 0xC0, 0x59, 0x17, 0xC8, 0x30, 0x59, 0x8F, 0xCE, 0xC0, 0x5A, 0xF7, 0xAA, 0x30,
+0x5B, 0x6F, 0xB0, 0xC0, 0x5C, 0xD7, 0x8C, 0x30, 0x5D, 0x4F, 0x92, 0xC0, 0x5E, 0xB7, 0x6E, 0x30,
+0x5F, 0x2F, 0x74, 0xC0, 0x60, 0x97, 0x50, 0x30, 0x61, 0x18, 0x91, 0x40, 0x62, 0x80, 0x6C, 0xB0,
+0x62, 0xF8, 0x73, 0x40, 0x64, 0x60, 0x4E, 0xB0, 0x64, 0xD8, 0x55, 0x40, 0x66, 0x40, 0x30, 0xB0,
+0x66, 0xB8, 0x37, 0x40, 0x68, 0x20, 0x12, 0xB0, 0x68, 0x98, 0x19, 0x40, 0x69, 0xFF, 0xF4, 0xB0,
+0x6A, 0x77, 0xFB, 0x40, 0x6B, 0xDF, 0xD6, 0xB0, 0x6C, 0x61, 0x17, 0xC0, 0x6D, 0xC8, 0xF3, 0x30,
+0x6E, 0x40, 0xF9, 0xC0, 0x6F, 0xA8, 0xD5, 0x30, 0x70, 0x20, 0xDB, 0xC0, 0x71, 0x88, 0xB7, 0x30,
+0x72, 0x00, 0xBD, 0xC0, 0x73, 0x68, 0x99, 0x30, 0x73, 0xE0, 0x9F, 0xC0, 0x75, 0x48, 0x7B, 0x30,
+0x75, 0xC9, 0xBC, 0x40, 0x77, 0x31, 0x97, 0xB0, 0x77, 0xA9, 0x9E, 0x40, 0x79, 0x11, 0x79, 0xB0,
+0x79, 0x89, 0x80, 0x40, 0x7A, 0xF1, 0x5B, 0xB0, 0x7B, 0x69, 0x62, 0x40, 0x7C, 0xD1, 0x3D, 0xB0,
+0x7D, 0x49, 0x44, 0x40, 0x7E, 0xB1, 0x1F, 0xB0, 0x7F, 0x29, 0x26, 0x40, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x12, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x12, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x52, 0x54, 0x00,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x98, 0xAD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xE6, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x13, 0x43, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF4, 0x77, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x36, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC3, 0x35, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x53, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAC, 0x52, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x9C, 0x35, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xA3, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x30, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xD7, 0x8C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x4F, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0xB7, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x2F, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x97, 0x50, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x18, 0x91, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x80, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0xF8, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x60, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0xD8, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x40, 0x30, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xB8, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x68, 0x20, 0x12, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x98, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xFF, 0xF4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x77, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xDF, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x61, 0x17, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0xC8, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x40, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0xA8, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x88, 0xB7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x68, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0xE0, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x48, 0x7B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x75, 0xC9, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x77, 0x31, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xA9, 0x9E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x79, 0x11, 0x79, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0x89, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xF1, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x69, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xD1, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x49, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0xB1, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x29, 0x26, 0x40, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08,
+0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0D, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x12, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x12, 0x7A, 0x7A, 0x7A, 0x00, 0x41, 0x52, 0x54, 0x00,
+0x41, 0x52, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x43, 0x4C, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x43,
+0x4C, 0x54, 0x34, 0x43, 0x4C, 0x53, 0x54, 0x2C, 0x4D, 0x38, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32,
+0x34, 0x2C, 0x4D, 0x35, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x0A,
+#endif
+0x00, 0x26, 0x73, 0xC0, 0x00, 0xB0, 0xD9, 0x70, 0x00, 0x00, 0x00, 0x06, 0x50, 0x61, 0x6C, 0x6D,
+0x65, 0x72,
/* Antarctica/Rothera */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0x0D, 0x02, 0x2D, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x52, 0x4F, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x02, 0x2D, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x52, 0x4F, 0x54,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x52, 0x4F, 0x54, 0x54, 0x33, 0x0A, 0x00, 0x22, 0x3B,
-0x05, 0x00, 0xAA, 0xB1, 0xEA, 0x00, 0x00, 0x00, 0x20, 0x52, 0x6F, 0x74, 0x68, 0x65, 0x72, 0x61,
-0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x41, 0x64, 0x65, 0x6C, 0x61, 0x69,
-0x64, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
+0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x52, 0x4F, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x02, 0x2D, 0x00, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x52, 0x4F,
+0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x52, 0x4F, 0x54, 0x54, 0x33, 0x0A,
+#endif
+0x00, 0x22, 0x3B, 0x05, 0x00, 0xAA, 0xB1, 0xEA, 0x00, 0x00, 0x00, 0x07, 0x52, 0x6F, 0x74, 0x68,
+0x65, 0x72, 0x61,
/* Antarctica/South_Pole */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17418,121 +18104,125 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00,
0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04,
-0x00, 0x00, 0xA1, 0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0,
-0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35,
-0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04, 0x00, 0x00, 0xA1,
+0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00,
+0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E,
+0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x5A, 0x53,
+0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Antarctica/Syowa */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0xE7, 0xB1, 0x58, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x53, 0x59, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xB1, 0x58, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x53, 0x59, 0x4F,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x59, 0x4F, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x20,
-0x08, 0xBC, 0x01, 0x4F, 0x11, 0x58, 0x00, 0x00, 0x00, 0x18, 0x53, 0x79, 0x6F, 0x77, 0x61, 0x20,
-0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x45, 0x20, 0x4F, 0x6E, 0x67, 0x75, 0x6C,
-0x20, 0x49,
+0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x53, 0x59, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xB1, 0x58, 0x00, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x53, 0x59,
+0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x59, 0x4F, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x20, 0x08, 0xBC, 0x01, 0x4F, 0x11, 0x58, 0x00, 0x00, 0x00, 0x05, 0x53, 0x79, 0x6F, 0x77,
+0x61,
/* Antarctica/Troll */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17561,72 +18251,74 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x45, 0x53, 0x54,
-0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x0D, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x55, 0x54,
-0x43, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x43,
-0x45, 0x53, 0x54, 0x2D, 0x32, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x1B, 0x72, 0xCD, 0x01, 0x16, 0x86,
-0xBC, 0x00, 0x00, 0x00, 0x1E, 0x54, 0x72, 0x6F, 0x6C, 0x6C, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69,
-0x6F, 0x6E, 0x2C, 0x20, 0x51, 0x75, 0x65, 0x65, 0x6E, 0x20, 0x4D, 0x61, 0x75, 0x64, 0x20, 0x4C,
-0x61, 0x6E, 0x64,
+0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x0D, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x45, 0x53, 0x54,
+0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x55, 0x54,
+0x43, 0x30, 0x43, 0x45, 0x53, 0x54, 0x2D, 0x32, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F,
+0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x1B, 0x72, 0xCD, 0x01, 0x16, 0x86, 0xBC, 0x00, 0x00, 0x00, 0x05, 0x54, 0x72, 0x6F, 0x6C,
+0x6C,
/* Antarctica/Vostok */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0xE9, 0x58, 0x89, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x56, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x58, 0x89, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x56, 0x4F, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x4F, 0x53, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0x11,
-0xB3, 0x3F, 0x01, 0xB5, 0xC6, 0x4F, 0x00, 0x00, 0x00, 0x1B, 0x56, 0x6F, 0x73, 0x74, 0x6F, 0x6B,
-0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x4C, 0x61, 0x6B, 0x65, 0x20, 0x56,
-0x6F, 0x73, 0x74, 0x6F, 0x6B,
+0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x56, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x58, 0x89, 0x80, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x56, 0x4F,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x4F, 0x53, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0x11, 0xB3, 0x3F, 0x01, 0xB5, 0xC6, 0x4F, 0x00, 0x00, 0x00, 0x06, 0x56, 0x6F, 0x73, 0x74,
+0x6F, 0x6B,
/* Arctic/Longyearbyen */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17680,111 +18372,116 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xEE, 0x24, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x27, 0xE3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0xD4, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xB7, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC,
-0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0,
-0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x62, 0x07, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xAF, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xA8, 0x4C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x98, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE,
-0x88, 0x2E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x78, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
-0x68, 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x58, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2,
-0x47, 0xF2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x37, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x27, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x17, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x10, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x06, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0xF0, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0A, 0x14, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
-0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x01, 0x00, 0x59, 0x00, 0x01,
-0x2B, 0x12, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x24, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x27, 0xE3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD4, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xB7, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x62, 0x07, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xAF, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA8, 0x4C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x98, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x88, 0x2E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x78, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x68, 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x58, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x47, 0xF2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x37, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x27, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x17, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x10, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x06, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF0, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x02, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x00, 0x00, 0x0A, 0x14, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45,
+0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x01, 0x00, 0x59, 0x00, 0x01, 0x2B, 0x12, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Aden */
0x50, 0x48, 0x50, 0x32, 0x01, 0x59, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x2B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x2B, 0xCC,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x9C, 0xC8, 0xB8, 0x01,
-0x57, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00,
+0x2B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x9C, 0xC8, 0xB8, 0x01, 0x57, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00,
/* Asia/Almaty */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17809,45 +18506,48 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54,
0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x4C,
0x4D, 0x54, 0x00, 0x41, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4C, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAA, 0x19, 0x7B, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xB2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x19, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xFD, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x7F, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xA6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xB2, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x94, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x76, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xDD, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x35, 0xD1, 0x20, 0x00, 0x01,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x7B, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xB2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x35, 0xD1, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02, 0x03, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x03, 0x00, 0x00, 0x48, 0x24, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62,
-0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00,
-0x00, 0x62, 0x70, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4C,
-0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x41, 0x4C, 0x4D, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18,
-0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F,
-0x6E, 0x73,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x03, 0x00, 0x00, 0x48, 0x24, 0x00, 0x00, 0x00, 0x00, 0x46,
+0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00,
+0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41,
+0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4C, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4C, 0x4D, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xCB, 0x52, 0xC8, 0x01, 0x88, 0x13, 0x18, 0x00, 0x00, 0x00, 0x17, 0x4B, 0x61, 0x7A, 0x61,
+0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65,
+0x61, 0x73, 0x29,
/* Asia/Amman */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17892,83 +18592,85 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x00, 0x00, 0x21, 0xB0, 0x00, 0x00,
0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA3, 0xD6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x06,
-0x72, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xAB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x24, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0xDE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x05, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x12, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B,
-0xE7, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xDA, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0xC9, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xCA, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0xA9, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x72, 0xAC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAD, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x09, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x92, 0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x82, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x72, 0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x62, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x52, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4B, 0xDE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x64, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x2B, 0xC0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x37, 0x6F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0x0B, 0xA2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x28,
-0x0B, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE2, 0x4A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xE4, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCB, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x78, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x84, 0x64, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x58, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x64, 0x46, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x41, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x44, 0x28, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x21, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x24, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x01, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x7A, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xEA, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE2, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xC2, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0xA1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA3, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x83, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x98, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x63, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x6E, 0xF6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4C, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2C, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x41, 0x2F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x0C, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x21, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEC, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0A, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEA, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAB, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xC9, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x94, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xA9, 0xD4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x74, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0xB3, 0x5E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x34, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x52, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x14, 0x81, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x32, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xFD, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x12, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xDD, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF2, 0x5A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xBD, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD2, 0x3C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB2, 0x1E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7D, 0x25, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9B, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5D, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x46, 0x24, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5A, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x26, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xE1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x05, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1A, 0xC3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE5, 0xCA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC5, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA5, 0x8E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x8E, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x6E, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x4E, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x63, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x2E, 0x50, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x66, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x0E, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF7, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD7, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEC, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB7, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x96, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB5, 0x0A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x76, 0xD7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xEC, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01,
-0x03, 0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01,
-0x03, 0x00, 0x00, 0x21, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C,
-0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x35, 0x2F, 0x31, 0x0A, 0x00, 0xBA, 0x14, 0xB8, 0x01, 0x49, 0x7C, 0xF5, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0xA3, 0xD6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x72, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xAB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x24, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0xDE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x05, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x12, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE7, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xDA, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC9, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xCA, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x72, 0xAC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAD, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x09, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x92, 0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x82, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x72, 0xDF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x62, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x52, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4B, 0xDE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x64, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x2B, 0xC0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x37, 0x6F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0x0B, 0xA2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x0B, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE2, 0x4A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xE4, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCB, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x78, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x84, 0x64, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x58, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x64, 0x46, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x41, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x44, 0x28, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x21, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x24, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x01, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x7A, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xEA, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE2, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC2, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0xA1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA3, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x83, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x98, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x63, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x6E, 0xF6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4C, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2C, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x41, 0x2F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0C, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x21, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEC, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0A, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEA, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAB, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xC9, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x94, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xA9, 0xD4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0xB3, 0x5E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x52, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x14, 0x81, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x32, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFD, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x12, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDD, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF2, 0x5A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBD, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD2, 0x3C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB2, 0x1E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7D, 0x25, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9B, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5D, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x46, 0x24, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5A, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x26, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xE1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x05, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1A, 0xC3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE5, 0xCA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC5, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA5, 0x8E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x8E, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x6E, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4E, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x63, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2E, 0x50, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x66, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0E, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF7, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD7, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEC, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB7, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x96, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB5, 0x0A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x76, 0xD7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xEC, 0xE0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x03, 0x00, 0x00, 0x21, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x34, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
+0x35, 0x2E, 0x35, 0x2F, 0x31, 0x0A,
+#endif
+0x00, 0xBA, 0x14, 0xB8, 0x01, 0x49, 0x7C, 0xF5, 0x00, 0x00, 0x00, 0x00,
/* Asia/Anadyr */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18000,6 +18702,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
0x00, 0x41, 0x4E, 0x41, 0x54, 0x00, 0x41, 0x4E, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
@@ -18045,11 +18748,10 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00,
0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x41, 0x54, 0x00, 0x41, 0x4E, 0x41, 0x53, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4E, 0x41, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0xEC, 0x21,
-0x38, 0x02, 0x21, 0x79, 0xED, 0x00, 0x00, 0x00, 0x33, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B,
-0x30, 0x38, 0x20, 0x28, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x39, 0x20, 0x61, 0x66,
-0x74, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2D, 0x31, 0x30, 0x2D, 0x32, 0x36, 0x29, 0x20,
-0x2D, 0x20, 0x42, 0x65, 0x72, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4E, 0x41, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0xEC, 0x21, 0x38, 0x02, 0x21, 0x79, 0xED, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x39, 0x20, 0x2D, 0x20, 0x42, 0x65, 0x72, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x61,
/* Asia/Aqtau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18080,54 +18782,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4F, 0x52, 0x54, 0x00, 0x53, 0x48, 0x45, 0x54, 0x00, 0x53, 0x48,
0x45, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x54, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5,
-0xA3, 0xFD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0xD4, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x4B, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC4, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x35, 0xED, 0x40, 0x00, 0x01, 0x02, 0x03, 0x04,
-0x05, 0x03, 0x05, 0x03, 0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x03, 0x09, 0x08, 0x09, 0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x09, 0x00,
-0x00, 0x2F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00,
-0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x09, 0x00, 0x00, 0x54,
-0x60, 0x01, 0x0E, 0x00, 0x00, 0x46, 0x50, 0x00, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0E, 0x00,
-0x00, 0x54, 0x60, 0x01, 0x14, 0x00, 0x00, 0x46, 0x50, 0x00, 0x1A, 0x00, 0x00, 0x54, 0x60, 0x01,
-0x14, 0x00, 0x00, 0x46, 0x50, 0x00, 0x1A, 0x00, 0x00, 0x46, 0x50, 0x01, 0x14, 0x00, 0x00, 0x38,
-0x40, 0x00, 0x1A, 0x00, 0x00, 0x38, 0x40, 0x00, 0x1A, 0x00, 0x00, 0x46, 0x50, 0x00, 0x1A, 0x4C,
-0x4D, 0x54, 0x00, 0x46, 0x4F, 0x52, 0x54, 0x00, 0x53, 0x48, 0x45, 0x54, 0x00, 0x53, 0x48, 0x45,
-0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41,
-0x51, 0x54, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0xCD, 0x41, 0x92, 0x01, 0x5F, 0x5B, 0xEA, 0x00, 0x00,
-0x00, 0x31, 0x41, 0x74, 0x79, 0x72, 0x61, 0x75, 0x20, 0x28, 0x41, 0x74, 0x69, 0x72, 0x61, 0x75,
-0x2C, 0x20, 0x47, 0x75, 0x72, 0x27, 0x79, 0x65, 0x76, 0x29, 0x2C, 0x20, 0x4D, 0x61, 0x6E, 0x67,
-0x67, 0x68, 0x79, 0x73, 0x74, 0x61, 0x75, 0x20, 0x28, 0x4D, 0x61, 0x6E, 0x6B, 0x69, 0x73, 0x74,
-0x61, 0x75, 0x29,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xFD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0xD4, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x4B, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x35, 0xED, 0x40, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x05, 0x03, 0x05, 0x03, 0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x03, 0x09, 0x08, 0x09, 0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x09,
+0x00, 0x00, 0x2F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50,
+0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x09, 0x00, 0x00,
+0x54, 0x60, 0x01, 0x0E, 0x00, 0x00, 0x46, 0x50, 0x00, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0E,
+0x00, 0x00, 0x54, 0x60, 0x01, 0x14, 0x00, 0x00, 0x46, 0x50, 0x00, 0x1A, 0x00, 0x00, 0x54, 0x60,
+0x01, 0x14, 0x00, 0x00, 0x46, 0x50, 0x00, 0x1A, 0x00, 0x00, 0x46, 0x50, 0x01, 0x14, 0x00, 0x00,
+0x38, 0x40, 0x00, 0x1A, 0x00, 0x00, 0x38, 0x40, 0x00, 0x1A, 0x00, 0x00, 0x46, 0x50, 0x00, 0x1A,
+0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4F, 0x52, 0x54, 0x00, 0x53, 0x48, 0x45, 0x54, 0x00, 0x53, 0x48,
+0x45, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x41, 0x51, 0x54, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xCD, 0x41, 0x92, 0x01, 0x5F, 0x5B, 0xEA, 0x00, 0x00, 0x00, 0x2C, 0x41, 0x74, 0x79, 0x72,
+0x61, 0x75, 0x2F, 0x41, 0x74, 0x69, 0x72, 0x61, 0x75, 0x2F, 0x47, 0x75, 0x72, 0x27, 0x79, 0x65,
+0x76, 0x2C, 0x20, 0x4D, 0x61, 0x6E, 0x67, 0x67, 0x68, 0x79, 0x73, 0x74, 0x61, 0x75, 0x2F, 0x4D,
+0x61, 0x6E, 0x6B, 0x69, 0x73, 0x74, 0x61, 0x75,
/* Asia/Aqtobe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18156,48 +18860,51 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4B, 0x54, 0x54, 0x00, 0x41, 0x4B, 0x54, 0x53, 0x54,
0x00, 0x41, 0x51, 0x54, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x8E, 0x68, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x8A, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x29, 0x4B, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xB4, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x2A, 0xC4, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xA0, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x82, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x52, 0x5D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x64, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x46, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x28, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x0A, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x27, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x09, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xEB, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x35, 0xDF, 0x30, 0x00, 0x01,
-0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x02, 0x08, 0x07, 0x08, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x08, 0x00, 0x00, 0x35, 0x98, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00,
-0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04,
-0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60,
-0x01, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00, 0x15, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0F, 0x00, 0x00,
-0x46, 0x50, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4B, 0x54, 0x54, 0x00, 0x41, 0x4B, 0x54,
-0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x51, 0x54, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0xD6, 0x0E, 0x2D,
-0x01, 0x69, 0xE3, 0x3A, 0x00, 0x00, 0x00, 0x0F, 0x41, 0x71, 0x74, 0x6F, 0x62, 0x65, 0x20, 0x28,
-0x41, 0x6B, 0x74, 0x6F, 0x62, 0x65, 0x29,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x8E, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x4B, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xA0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x82, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x5D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x64, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x28, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x0A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x27, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x09, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xEB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x35, 0xDF, 0x30, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x02, 0x08, 0x07, 0x08, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x08,
+0x00, 0x00, 0x35, 0x98, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50,
+0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00,
+0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0F,
+0x00, 0x00, 0x46, 0x50, 0x00, 0x15, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0F, 0x00, 0x00, 0x46, 0x50,
+0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4B, 0x54, 0x54, 0x00, 0x41, 0x4B, 0x54, 0x53, 0x54,
+0x00, 0x41, 0x51, 0x54, 0x53, 0x54, 0x00, 0x41, 0x51, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x41, 0x51, 0x54, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xD6, 0x0E, 0x2D, 0x01, 0x69, 0xE3, 0x3A, 0x00, 0x00, 0x00, 0x0D, 0x41, 0x71, 0x74, 0x6F,
+0x62, 0x65, 0x2F, 0x41, 0x6B, 0x74, 0x6F, 0x62, 0x65,
/* Asia/Ashgabat */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18217,32 +18924,35 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C,
0x4D, 0x54, 0x00, 0x41, 0x53, 0x48, 0x54, 0x00, 0x41, 0x53, 0x48, 0x53, 0x54, 0x00, 0x54, 0x4D,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19,
-0x8D, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27,
-0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08,
-0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9,
-0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC,
-0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B,
-0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B,
-0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4,
-0xFC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09,
-0xC9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0xA3, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, 0x36, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00,
-0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x46,
-0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00,
-0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00,
-0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x48, 0x54, 0x00, 0x41, 0x53, 0x48, 0x53, 0x54, 0x00,
-0x54, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4D, 0x54, 0x2D, 0x35, 0x0A, 0x00,
-0xC3, 0x3C, 0x78, 0x01, 0x6B, 0xBE, 0x7D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x8D, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xFC, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0xC9, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0xA3, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x08, 0x09, 0x00,
+0x00, 0x36, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01,
+0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54,
+0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00,
+0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x41,
+0x53, 0x48, 0x54, 0x00, 0x41, 0x53, 0x48, 0x53, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x54, 0x4D, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xC3, 0x3C, 0x78, 0x01, 0x6B, 0xBE, 0x7D, 0x00, 0x00, 0x00, 0x00,
/* Asia/Ashkhabad */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18262,32 +18972,35 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C,
0x4D, 0x54, 0x00, 0x41, 0x53, 0x48, 0x54, 0x00, 0x41, 0x53, 0x48, 0x53, 0x54, 0x00, 0x54, 0x4D,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19,
-0x8D, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27,
-0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08,
-0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9,
-0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC,
-0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B,
-0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B,
-0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4,
-0xFC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09,
-0xC9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0xA3, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, 0x36, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00,
-0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x46,
-0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00,
-0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00,
-0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x48, 0x54, 0x00, 0x41, 0x53, 0x48, 0x53, 0x54, 0x00,
-0x54, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4D, 0x54, 0x2D, 0x35, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x8D, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xFC, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0xC9, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0xA3, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x08, 0x09, 0x00,
+0x00, 0x36, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01,
+0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54,
+0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00,
+0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x41,
+0x53, 0x48, 0x54, 0x00, 0x41, 0x53, 0x48, 0x53, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x54, 0x4D, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Baghdad */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18313,46 +19026,49 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x29, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40,
0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x4C, 0x4D,
0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x69, 0x86, 0xB1, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30, 0x3C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x30, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xE8, 0xBD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBD, 0xC8, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAD, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x19, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF6, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD8, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBA, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9B, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6D, 0xDA, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5F, 0x1C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x50, 0x5F, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x31, 0x92, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x21, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x12, 0xC6, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x02, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xF9, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE5, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD6, 0x7E, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB7, 0xB2, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA7, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x98, 0xE5, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x88, 0xD6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7A, 0x19, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6B, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x9E, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4C, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3D, 0xD1, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1F, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x0E, 0xF6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x38, 0x80, 0x00, 0x01,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0xB1, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x30, 0x3C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x30, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE8, 0xBD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBD, 0xC8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAD, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF6, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD8, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBA, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5F, 0x1C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x50, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x31, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x21, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x12, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x02, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF3, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE5, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xD6, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB7, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA7, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x98, 0xE5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x88, 0xD6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7A, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6B, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5C, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4C, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3D, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0E, 0xF6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x00, 0x38, 0x80, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x29, 0xA0, 0x00,
-0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A,
-0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54,
-0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0xBC, 0x37, 0x98,
-0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0x29, 0xA4, 0x00,
+0x00, 0x00, 0x00, 0x29, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38,
+0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x4C,
+0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D,
+0x33, 0x0A,
+#endif
+0x00, 0xBC, 0x37, 0x98, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x00,
/* Asia/Bahrain */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18360,20 +19076,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xF2, 0x9D, 0x30, 0x04, 0x8A, 0x92, 0xC0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x30, 0x50, 0x00,
0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x47, 0x53, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x8A, 0x92, 0xC0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33,
-0x0A, 0x00, 0xB1, 0x96, 0x3D, 0x01, 0x5F, 0xD7, 0x9D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x47, 0x53, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x8A, 0x92, 0xC0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D,
+0x33, 0x0A,
+#endif
+0x00, 0xB1, 0x96, 0x3D, 0x01, 0x5F, 0xD7, 0x9D, 0x00, 0x00, 0x00, 0x00,
/* Asia/Baku */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
0xAA, 0x19, 0x95, 0x44, 0xE7, 0xDA, 0x0C, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30,
0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30,
0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0,
@@ -18391,110 +19110,72 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x4D, 0x8E, 0x7E, 0x00, 0x4E, 0xAC, 0x93, 0x80,
0x4F, 0x6E, 0x60, 0x00, 0x50, 0x8C, 0x75, 0x80, 0x51, 0x57, 0x7C, 0x80, 0x52, 0x6C, 0x57, 0x80,
0x53, 0x37, 0x5E, 0x80, 0x54, 0x4C, 0x39, 0x80, 0x55, 0x17, 0x40, 0x80, 0x56, 0x2C, 0x1B, 0x80,
-0x56, 0xF7, 0x22, 0x80, 0x58, 0x15, 0x38, 0x00, 0x58, 0xD7, 0x04, 0x80, 0x59, 0xF5, 0x1A, 0x00,
-0x5A, 0xB6, 0xE6, 0x80, 0x5B, 0xD4, 0xFC, 0x00, 0x5C, 0xA0, 0x03, 0x00, 0x5D, 0xB4, 0xDE, 0x00,
-0x5E, 0x7F, 0xE5, 0x00, 0x5F, 0x94, 0xC0, 0x00, 0x60, 0x5F, 0xC7, 0x00, 0x61, 0x7D, 0xDC, 0x80,
-0x62, 0x3F, 0xA9, 0x00, 0x63, 0x5D, 0xBE, 0x80, 0x64, 0x1F, 0x8B, 0x00, 0x65, 0x3D, 0xA0, 0x80,
-0x66, 0x08, 0xA7, 0x80, 0x67, 0x1D, 0x82, 0x80, 0x67, 0xE8, 0x89, 0x80, 0x68, 0xFD, 0x64, 0x80,
-0x69, 0xC8, 0x6B, 0x80, 0x6A, 0xDD, 0x46, 0x80, 0x6B, 0xA8, 0x4D, 0x80, 0x6C, 0xC6, 0x63, 0x00,
-0x6D, 0x88, 0x2F, 0x80, 0x6E, 0xA6, 0x45, 0x00, 0x6F, 0x68, 0x11, 0x80, 0x70, 0x86, 0x27, 0x00,
-0x71, 0x51, 0x2E, 0x00, 0x72, 0x66, 0x09, 0x00, 0x73, 0x31, 0x10, 0x00, 0x74, 0x45, 0xEB, 0x00,
-0x75, 0x10, 0xF2, 0x00, 0x76, 0x2F, 0x07, 0x80, 0x76, 0xF0, 0xD4, 0x00, 0x78, 0x0E, 0xE9, 0x80,
-0x78, 0xD0, 0xB6, 0x00, 0x79, 0xEE, 0xCB, 0x80, 0x7A, 0xB0, 0x98, 0x00, 0x7B, 0xCE, 0xAD, 0x80,
-0x7C, 0x99, 0xB4, 0x80, 0x7D, 0xAE, 0x8F, 0x80, 0x7E, 0x79, 0x96, 0x80, 0x7F, 0x8E, 0x71, 0x80,
0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x09, 0x0C,
0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C,
0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C,
+0x09, 0x0C, 0x09, 0x0C, 0x09, 0x00, 0x00, 0x2E, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00,
+0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x13, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x41, 0x4B, 0x54, 0x00, 0x42, 0x41, 0x4B, 0x53,
+0x54, 0x00, 0x41, 0x5A, 0x54, 0x00, 0x41, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x95, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0xDA, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xBD, 0x52, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0xC9, 0x70, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x1B, 0x80, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08, 0x09,
+0x0A, 0x0B, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C,
0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C,
-0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C,
-0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C,
-0x09, 0x00, 0x00, 0x2E, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46,
-0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00,
-0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00,
-0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46,
-0x50, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x13, 0x4C,
-0x4D, 0x54, 0x00, 0x42, 0x41, 0x4B, 0x54, 0x00, 0x42, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x41, 0x5A,
-0x54, 0x00, 0x41, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x95, 0x44, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE7, 0xDA, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xBD, 0x52, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x32, 0xC9, 0x70, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xAC, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x8C, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x7C, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x6C, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x5E, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x4C, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x40, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x2C, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x22, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x15, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x04, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xF5, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xE6, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xD4, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xB4, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xE5, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x94, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xC7, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x7D, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xA9, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x5D, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x8B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x3D, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xA7, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x1D, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x89, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xFD, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x6B, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xDD, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x4D, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xC6, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x2F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xA6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x11, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x86, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x2E, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x66, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x45, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x2F, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xD4, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x0E, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xB6, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xEE, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0x98, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xCE, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xB4, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xAE, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0x96, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x8E, 0x71, 0x80, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08,
-0x09, 0x0A, 0x0B, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09,
-0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09,
-0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09,
-0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09,
-0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09,
-0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x00, 0x00, 0x2E, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00,
-0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09,
-0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00,
-0x46, 0x50, 0x01, 0x13, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x41, 0x4B, 0x54, 0x00, 0x42, 0x41, 0x4B,
-0x53, 0x54, 0x00, 0x41, 0x5A, 0x54, 0x00, 0x41, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x41, 0x5A, 0x54, 0x2D, 0x34, 0x41, 0x5A, 0x53, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
-0x30, 0x2F, 0x35, 0x0A, 0x00, 0xC6, 0xF2, 0xFD, 0x01, 0x5E, 0xB9, 0x28, 0x00, 0x00, 0x00, 0x00,
-
+0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x00, 0x00, 0x2E, 0xBC, 0x00, 0x00, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00,
+0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38,
+0x40, 0x01, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13, 0x00,
+0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00,
+0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x13, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x41, 0x4B, 0x54, 0x00,
+0x42, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x41, 0x5A, 0x54, 0x00, 0x41, 0x5A, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x41, 0x5A, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xC6, 0xF2, 0xFD, 0x01, 0x5E, 0xB9, 0x28, 0x00, 0x00, 0x00, 0x00,
/* Asia/Bangkok */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18502,15 +19183,102 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA2, 0x6A, 0x67, 0xC4, 0x01, 0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x3C,
0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00,
-0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x56, 0xB6, 0x85, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x6A, 0x67, 0xC4, 0x00, 0x01,
-0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x04, 0x00, 0x00, 0x62,
-0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0x9E, 0x4F, 0x58,
-0x01, 0xAC, 0x08, 0xD2, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x85, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x6A, 0x67, 0xC4, 0x00, 0x01, 0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E,
+0x3C, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54,
+0x00, 0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D,
+0x37, 0x0A,
+#endif
+0x00, 0x9E, 0x4F, 0x58, 0x01, 0xAC, 0x08, 0xD2, 0x00, 0x00, 0x00, 0x00,
+
+/* Asia/Barnaul */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00,
+0xA1, 0xD5, 0x7D, 0xFC, 0xB5, 0xA3, 0xE1, 0x20, 0x15, 0x27, 0x6F, 0x90, 0x16, 0x18, 0xA4, 0x00,
+0x17, 0x08, 0xA3, 0x10, 0x17, 0xF9, 0xD7, 0x80, 0x18, 0xE9, 0xD6, 0x90, 0x19, 0xDB, 0x0B, 0x00,
+0x1A, 0xCC, 0x5B, 0x90, 0x1B, 0xBC, 0x68, 0xB0, 0x1C, 0xAC, 0x59, 0xB0, 0x1D, 0x9C, 0x4A, 0xB0,
+0x1E, 0x8C, 0x3B, 0xB0, 0x1F, 0x7C, 0x2C, 0xB0, 0x20, 0x6C, 0x1D, 0xB0, 0x21, 0x5C, 0x0E, 0xB0,
+0x22, 0x4B, 0xFF, 0xB0, 0x23, 0x3B, 0xF0, 0xB0, 0x24, 0x2B, 0xE1, 0xB0, 0x25, 0x1B, 0xD2, 0xB0,
+0x26, 0x0B, 0xC3, 0xB0, 0x27, 0x04, 0xEF, 0x30, 0x27, 0xF4, 0xE0, 0x30, 0x28, 0xE4, 0xDF, 0x40,
+0x29, 0x78, 0x87, 0x40, 0x29, 0xD4, 0x98, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x2B, 0xB4, 0xA4, 0x30,
+0x2C, 0xA4, 0x95, 0x30, 0x2D, 0x94, 0x86, 0x30, 0x2E, 0x84, 0x77, 0x30, 0x2F, 0x74, 0x68, 0x30,
+0x2F, 0xC7, 0x4C, 0x80, 0x30, 0x64, 0x67, 0x40, 0x31, 0x5D, 0x92, 0xC0, 0x32, 0x72, 0x6D, 0xC0,
+0x33, 0x3D, 0x74, 0xC0, 0x34, 0x52, 0x4F, 0xC0, 0x35, 0x1D, 0x56, 0xC0, 0x36, 0x32, 0x31, 0xC0,
+0x36, 0xFD, 0x38, 0xC0, 0x38, 0x1B, 0x4E, 0x40, 0x38, 0xDD, 0x1A, 0xC0, 0x39, 0xFB, 0x30, 0x40,
+0x3A, 0xBC, 0xFC, 0xC0, 0x3B, 0xDB, 0x12, 0x40, 0x3C, 0xA6, 0x19, 0x40, 0x3D, 0xBA, 0xF4, 0x40,
+0x3E, 0x85, 0xFB, 0x40, 0x3F, 0x9A, 0xD6, 0x40, 0x40, 0x65, 0xDD, 0x40, 0x41, 0x83, 0xF2, 0xC0,
+0x42, 0x45, 0xBF, 0x40, 0x43, 0x63, 0xD4, 0xC0, 0x44, 0x25, 0xA1, 0x40, 0x45, 0x43, 0xB6, 0xC0,
+0x46, 0x05, 0x83, 0x40, 0x47, 0x23, 0x98, 0xC0, 0x47, 0xEE, 0x9F, 0xC0, 0x49, 0x03, 0x7A, 0xC0,
+0x49, 0xCE, 0x81, 0xC0, 0x4A, 0xE3, 0x5C, 0xC0, 0x4B, 0xAE, 0x63, 0xC0, 0x4C, 0xCC, 0x79, 0x40,
+0x4D, 0x8E, 0x45, 0xC0, 0x54, 0x4B, 0xF3, 0x30, 0x56, 0xF6, 0xEA, 0x40, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x08, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04,
+0x00, 0x00, 0x4E, 0x84, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80,
+0x01, 0x08, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0C, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0C, 0x00, 0x00,
+0x70, 0x80, 0x01, 0x08, 0x00, 0x00, 0x62, 0x70, 0x01, 0x0C, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04,
+0x00, 0x00, 0x62, 0x70, 0x01, 0x0C, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00,
+0x2B, 0x30, 0x36, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xD5, 0x7D, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xD7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xD2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xDF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x77, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xC7, 0x4C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xA1, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x83, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x81, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x45, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4B, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF6, 0xEA, 0x40, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x08, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04,
+0x00, 0x00, 0x4E, 0x84, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80,
+0x01, 0x08, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0C, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0C, 0x00, 0x00,
+0x70, 0x80, 0x01, 0x08, 0x00, 0x00, 0x62, 0x70, 0x01, 0x0C, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04,
+0x00, 0x00, 0x62, 0x70, 0x01, 0x0C, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00,
+0x2B, 0x30, 0x36, 0x00, 0x2B, 0x30, 0x38, 0x00, 0x2B, 0x30, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x3C, 0x2B, 0x30, 0x37, 0x3E, 0x2D, 0x37, 0x0A,
+#endif
+0x00, 0xDA, 0xC2, 0x9A, 0x01, 0x92, 0x73, 0x58, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x34, 0x20, 0x2D, 0x20, 0x41, 0x6C, 0x74, 0x61, 0x69,
/* Asia/Beirut */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18562,94 +19330,97 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21,
0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C,
0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA8, 0x29, 0xF3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xB2, 0x50, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x2A, 0x85, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xEC, 0xEC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB6, 0x94, 0x50, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xCF, 0x71, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x99, 0x19, 0x50, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEF, 0xB0, 0xA5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x4C, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x04, 0xA6, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x77, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x43, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xAB, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x08, 0x24, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0xDE, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x05, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x12, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE7, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0x97, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC9, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xCA, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x72, 0xAC, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF4, 0x2E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xD1, 0x9C, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD5, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xB2, 0xD0, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB6, 0x95, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x94, 0x03, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x97, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x75, 0x37, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x22, 0xA3, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x57, 0xBC, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x67, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0xEF, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x3C, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0x1A, 0x23, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x28, 0x1D, 0xE8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xFB, 0x56, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x2A, 0x00, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCE, 0x09, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x6E, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x57, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x37, 0x42, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x17, 0x24, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xF7, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xD6, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xB6, 0xCA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x9F, 0xE6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xA8, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x38, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x88, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x1A, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x67, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x85, 0xFC, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x51, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xDE, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x30, 0xF3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xC0, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x10, 0xD5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xDD, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xF0, 0xB7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xBF, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xD0, 0x99, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xA1, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xB0, 0x7B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x83, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x99, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x65, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x79, 0x7A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x47, 0x50, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D,
-0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00,
-0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x29, 0xF3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xB2, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x2A, 0x85, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEC, 0xEC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB6, 0x94, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x71, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x99, 0x19, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xB0, 0xA5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0xA6, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x43, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xAB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x24, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0xDE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x05, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x12, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE7, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0x97, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC9, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xCA, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x72, 0xAC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF4, 0x2E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xD1, 0x9C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD5, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xB2, 0xD0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB6, 0x95, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x94, 0x03, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x97, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x75, 0x37, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x22, 0xA3, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x57, 0xBC, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x67, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x3C, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0x1A, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x1D, 0xE8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xFB, 0x56, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0x00, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCE, 0x09, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xBB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x42, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x24, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2B, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x0D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD6, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF4, 0xEF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xCA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9F, 0xE6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xC8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x76, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0x8B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x6D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x4F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x1A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x67, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x85, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x11, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xDE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x30, 0xF3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xC0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x10, 0xD5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xDD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xB7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xBF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0x99, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xA1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0x7B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x83, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x65, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0x7A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x47, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x21, 0x48, 0x00, 0x00,
+0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0xBD, 0x07, 0xED, 0x01, 0x48, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00,
/* Asia/Bishkek */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18678,48 +19449,50 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0F, 0x00, 0x00, 0x54, 0x60, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x52, 0x55, 0x54, 0x00,
0x46, 0x52, 0x55, 0x53, 0x54, 0x00, 0x4B, 0x47, 0x53, 0x54, 0x00, 0x4B, 0x47, 0x54, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x7E,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xB2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xBE, 0xA3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xE7, 0x37,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xC7, 0x19,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xA6, 0xFB,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x69, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x86, 0xDD,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x4B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x31, 0x66, 0xBF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x89,
-0xD8, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x56, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x6B,
-0xD8, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x38, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x4D,
-0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x55, 0x48, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x2F,
-0xD8, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x37, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x11,
-0xD8, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x19, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x2E,
-0x58, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xFB, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x10,
-0x58, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xDD, 0x48, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF2,
-0x58, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xF9, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xD4,
-0x58, 0x00, 0x00, 0x00, 0x00, 0x42, 0xFB, 0x92, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x0A, 0x00, 0x00,
-0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09,
-0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70,
-0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0F, 0x00, 0x00,
-0x46, 0x50, 0x00, 0x14, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0F, 0x00, 0x00, 0x54, 0x60, 0x00, 0x14,
-0x4C, 0x4D, 0x54, 0x00, 0x46, 0x52, 0x55, 0x54, 0x00, 0x46, 0x52, 0x55, 0x53, 0x54, 0x00, 0x4B,
-0x47, 0x53, 0x54, 0x00, 0x4B, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B,
-0x47, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xCA, 0xCA, 0x10, 0x01, 0x84, 0x7D, 0x20, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x7E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xB2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xBE, 0xA3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xE7, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xC7, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xA6, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x69, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x86, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x4B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x31, 0x66, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x4D, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x89, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x56, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x6B, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x38, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x4D, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x55, 0x48, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x2F, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x37, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x11, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x19, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x2E, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xFB, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x10, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xDD, 0x48, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF2, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xF9, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xD4, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x42, 0xFB, 0x92, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x0A, 0x00, 0x00, 0x45, 0xF0, 0x00, 0x00, 0x00,
+0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00,
+0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54,
+0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x00, 0x14, 0x00,
+0x00, 0x54, 0x60, 0x01, 0x0F, 0x00, 0x00, 0x54, 0x60, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x46,
+0x52, 0x55, 0x54, 0x00, 0x46, 0x52, 0x55, 0x53, 0x54, 0x00, 0x4B, 0x47, 0x53, 0x54, 0x00, 0x4B,
+0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x47, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xCA, 0xCA, 0x10, 0x01, 0x84, 0x7D, 0x20, 0x00, 0x00, 0x00, 0x00,
/* Asia/Brunei */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18727,15 +19500,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xAD, 0x8A, 0x02, 0x44, 0xBA, 0x67, 0x47, 0x88, 0x00, 0x01, 0x02, 0x00, 0x00, 0x6B, 0xBC, 0x00,
0x00, 0x00, 0x00, 0x69, 0x78, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x42, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAD, 0x8A, 0x02, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x47, 0x88, 0x00,
-0x01, 0x02, 0x00, 0x00, 0x6B, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x69, 0x78, 0x00, 0x04, 0x00, 0x00,
-0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x42, 0x4E, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x90, 0xDB, 0x55, 0x01, 0xC2, 0x01,
-0xD2, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x42, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0x8A, 0x02, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0x67, 0x47, 0x88, 0x00, 0x01, 0x02, 0x00, 0x00, 0x6B, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x69,
+0x78, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4E, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x4E, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x90, 0xDB, 0x55, 0x01, 0xC2, 0x01, 0xD2, 0x00, 0x00, 0x00, 0x00,
/* Asia/Calcutta */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18745,23 +19520,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x52, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00,
0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x5B,
0x68, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00,
-0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x91, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB,
-0x86, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x95,
-0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x12, 0x98, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03,
-0x00, 0x00, 0x52, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68,
-0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x0D, 0x4C, 0x4D,
-0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D, 0x35, 0x3A,
-0x33, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x91, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xDB, 0x86, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x12, 0x98, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x03, 0x00, 0x00, 0x52, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x04, 0x00, 0x00,
+0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x0D,
+0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D,
+0x35, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Chita */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xDB, 0xF9, 0xA0, 0xB5, 0xA3, 0xC5, 0x00, 0x15, 0x27, 0x53, 0x70, 0x16, 0x18, 0x87, 0xE0,
0x17, 0x08, 0x86, 0xF0, 0x17, 0xF9, 0xBB, 0x60, 0x18, 0xE9, 0xBA, 0x70, 0x19, 0xDA, 0xEE, 0xE0,
0x1A, 0xCC, 0x3F, 0x70, 0x1B, 0xBC, 0x4C, 0x90, 0x1C, 0xAC, 0x3D, 0x90, 0x1D, 0x9C, 0x2E, 0x90,
@@ -18778,69 +19556,72 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x43, 0x63, 0xAA, 0x90, 0x44, 0x25, 0x77, 0x10, 0x45, 0x43, 0x8C, 0x90, 0x46, 0x05, 0x59, 0x10,
0x47, 0x23, 0x6E, 0x90, 0x47, 0xEE, 0x75, 0x90, 0x49, 0x03, 0x50, 0x90, 0x49, 0xCE, 0x57, 0x90,
0x4A, 0xE3, 0x32, 0x90, 0x4B, 0xAE, 0x39, 0x90, 0x4C, 0xCC, 0x4F, 0x10, 0x4D, 0x8E, 0x1B, 0x90,
-0x54, 0x4B, 0xC9, 0x00, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03,
+0x54, 0x4B, 0xC9, 0x00, 0x56, 0xF6, 0xCE, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06,
+0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x09, 0x03, 0x00, 0x00, 0x6A, 0x60, 0x00,
+0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E,
+0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00,
+0x00, 0x7E, 0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0F, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E,
+0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x53,
+0x54, 0x00, 0x49, 0x52, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xBB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xBA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xB6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x6B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x7B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x5B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x3D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x68, 0x90, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x0E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xF0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xEF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xCA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xD1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xAC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xB3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x95, 0x10, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xAA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x8C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x59, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x6E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x75, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x50, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x57, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x32, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x39, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x4F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x1B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF6, 0xCE, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x08, 0x09, 0x00, 0x00, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80,
-0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
-0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09,
-0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80,
-0x00, 0x0F, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54,
-0x00, 0x59, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x49, 0x52, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xF9, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0xA3, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x16, 0x18, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x86, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0xF9, 0xBB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xBA, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x19, 0xDA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x1B, 0xBC, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1D, 0x9C, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1F, 0x7C, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x21, 0x5B, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x23, 0x3B, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x25, 0x1B, 0xB6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x04, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x28, 0xE4, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x6B, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0x7B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x5E, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x5B, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x3D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0x68, 0x90, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x43, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x25, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x07, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x0E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x24, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDC, 0xF0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x06, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBC, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE8, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA5, 0xEF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xCA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x85, 0xD1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xAC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x65, 0xB3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0x95, 0x10, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xAA, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x8C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0x59, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x6E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0x75, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x50, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0x57, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x32, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0x39, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x4F, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8E, 0x1B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xC9, 0x00, 0x00, 0x01,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x09,
-0x00, 0x00, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
-0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
-0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04,
-0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0F, 0x00, 0x00, 0x8C, 0xA0,
-0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x53, 0x54,
-0x00, 0x49, 0x52, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x52, 0x4B,
-0x54, 0x2D, 0x38, 0x0A, 0x00, 0xD8, 0xC0, 0x48, 0x01, 0xBF, 0xCB, 0x6A, 0x00, 0x00, 0x00, 0x34,
-0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x36, 0x20, 0x28, 0x4D, 0x6F, 0x73, 0x63, 0x6F,
-0x77, 0x2B, 0x30, 0x35, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2D,
-0x31, 0x30, 0x2D, 0x32, 0x36, 0x29, 0x20, 0x2D, 0x20, 0x5A, 0x61, 0x62, 0x61, 0x79, 0x6B, 0x61,
-0x6C, 0x73, 0x6B, 0x79,
+0x05, 0x04, 0x05, 0x04, 0x08, 0x09, 0x03, 0x00, 0x00, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70,
+0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00,
+0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01,
+0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x70,
+0x80, 0x00, 0x0F, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C,
+0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x49, 0x52,
+0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x59, 0x41, 0x4B, 0x54,
+0x2D, 0x39, 0x0A,
+#endif
+0x00, 0xD8, 0xC0, 0x48, 0x01, 0xBF, 0xCB, 0x6A, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x36, 0x20, 0x2D, 0x20, 0x5A, 0x61, 0x62, 0x61, 0x79, 0x6B, 0x61, 0x6C, 0x73, 0x6B, 0x79,
+
/* Asia/Choibalsan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18879,71 +19660,74 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0E,
0x00, 0x00, 0x7E, 0x90, 0x01, 0x0E, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
0x55, 0x4C, 0x41, 0x54, 0x00, 0x43, 0x48, 0x4F, 0x54, 0x00, 0x43, 0x48, 0x4F, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x5E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xE7, 0x28, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0B,
-0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA,
-0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC,
-0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C,
-0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B,
-0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B,
-0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B,
-0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B,
-0x8C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04,
-0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4,
-0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4,
-0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4,
-0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84,
-0x30, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64,
-0x12, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D,
-0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D,
-0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0C,
-0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB4,
-0x9E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x94,
-0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x7F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x74,
-0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x61, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x54,
-0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x34,
-0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1D,
-0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEF, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15,
-0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF5,
-0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE5, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD5,
-0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCE, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE,
-0x7B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAE, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E,
-0x5D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8E, 0x23, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E,
-0x3F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6E, 0x05, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E,
-0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4D, 0xE7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3E,
-0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2D, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1D,
-0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x16, 0xE6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07,
-0x01, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF6, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE6,
-0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD6, 0xAA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC6,
-0xC5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB6, 0x8C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6,
-0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x96, 0x6E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86,
-0x89, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x7F, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F,
-0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x5F, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4F,
-0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x3F, 0x4E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2F,
-0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1F, 0x30, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0F,
-0x4C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0xFF, 0x12, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEF,
-0x2E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x77, 0xDE, 0xF4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF,
-0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC8, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8,
-0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA7, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98,
-0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x87, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x77,
-0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x67, 0xB7, 0x70, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xE7, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x0B, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x8C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x30, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x12, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x4D, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x2D, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x0C, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB4, 0x9E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x94, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x7F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x74, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x61, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x54, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x34, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1D, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEF, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x15, 0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF5, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE5, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD5, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCE, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBE, 0x7B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAE, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9E, 0x5D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8E, 0x23, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7E, 0x3F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6E, 0x05, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5E, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4D, 0xE7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3E, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2D, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1D, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x16, 0xE6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x07, 0x01, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF6, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE6, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD6, 0xAA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC6, 0xC5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB6, 0x8C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA6, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x96, 0x6E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x86, 0x89, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x7F, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x6F, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x5F, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4F, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x3F, 0x4E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2F, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1F, 0x30, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0F, 0x4C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0xFF, 0x12, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEF, 0x2E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x77, 0xDE, 0xF4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xCF, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC8, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB8, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA7, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x98, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x87, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x77, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x67, 0xB7, 0x70, 0x00, 0x01, 0x02, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x6B, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09,
-0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0E, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0E, 0x00, 0x00, 0x70, 0x80,
-0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41, 0x54, 0x00, 0x43, 0x48, 0x4F, 0x54, 0x00,
-0x43, 0x48, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x4F, 0x54, 0x2D, 0x38, 0x43, 0x48, 0x4F, 0x53, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30,
-0x0A, 0x00, 0xD2, 0xAC, 0x4A, 0x01, 0xC1, 0x5F, 0x10, 0x00, 0x00, 0x00, 0x12, 0x44, 0x6F, 0x72,
-0x6E, 0x6F, 0x64, 0x2C, 0x20, 0x53, 0x75, 0x6B, 0x68, 0x62, 0x61, 0x61, 0x74, 0x61, 0x72,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x6B, 0x58, 0x00, 0x00,
+0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0E, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0E, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41, 0x54, 0x00, 0x43, 0x48, 0x4F,
+0x54, 0x00, 0x43, 0x48, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x4F, 0x54, 0x2D, 0x38, 0x43, 0x48, 0x4F,
+0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36,
+0x2F, 0x30, 0x0A,
+#endif
+0x00, 0xD2, 0xAC, 0x4A, 0x01, 0xC1, 0x5F, 0x10, 0x00, 0x00, 0x00, 0x12, 0x44, 0x6F, 0x72, 0x6E,
+0x6F, 0x64, 0x2C, 0x20, 0x53, 0x75, 0x6B, 0x68, 0x62, 0x61, 0x61, 0x74, 0x61, 0x72,
/* Asia/Chongqing */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18956,23 +19740,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43,
-0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23,
-0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00,
+0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Chungking */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -18985,23 +19772,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43,
-0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23,
-0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00,
+0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Colombo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19014,22 +19804,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x08, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x11, 0x00, 0x00,
0x4D, 0x58, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
0x49, 0x48, 0x53, 0x54, 0x00, 0x4C, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
-0x08, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x56, 0xB6, 0x99, 0x24, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x9D, 0xBD, 0x1C, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0x5A, 0x1C, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x95, 0x2B, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x75, 0x80, 0x38, 0x00, 0x00, 0x00, 0x00, 0x31, 0xA6, 0x00, 0x28, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x71, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x44, 0x3F, 0xEA, 0x28, 0x00, 0x01, 0x02,
-0x03, 0x04, 0x02, 0x05, 0x06, 0x02, 0x00, 0x00, 0x4A, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4,
-0x00, 0x04, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0C, 0x00, 0x00,
-0x5B, 0x68, 0x01, 0x08, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x11,
-0x00, 0x00, 0x4D, 0x58, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x49, 0x53,
-0x54, 0x00, 0x49, 0x48, 0x53, 0x54, 0x00, 0x4C, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D,
-0x35, 0x3A, 0x33, 0x30, 0x0A, 0x00, 0x93, 0xE8, 0x95, 0x01, 0x8C, 0x7F, 0xE8, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x99, 0x24, 0xFF, 0xFF, 0xFF, 0xFF,
+0x87, 0x9D, 0xBD, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x5A, 0x1C, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x2B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x75, 0x80, 0x38, 0x00, 0x00, 0x00, 0x00,
+0x31, 0xA6, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x32, 0x71, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x3F, 0xEA, 0x28, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x02, 0x00, 0x00, 0x4A,
+0xDC, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x00, 0x04, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x08, 0x00,
+0x00, 0x54, 0x60, 0x01, 0x0C, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x08, 0x00, 0x00, 0x5B, 0x68, 0x00,
+0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x11, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x08, 0x4C, 0x4D, 0x54,
+0x00, 0x4D, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x48, 0x53, 0x54, 0x00, 0x4C, 0x4B,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D, 0x35, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0x93, 0xE8, 0x95, 0x01, 0x8C, 0x7F, 0xE8, 0x00, 0x00, 0x00, 0x00,
/* Asia/Dacca */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19042,22 +19834,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x16, 0x00, 0x00, 0x62, 0x70, 0x01, 0x1A, 0x4C, 0x4D,
0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x44,
0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x69, 0x86, 0x86, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x86, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x95, 0x32, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDD, 0xA8, 0xD2, 0x98, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0x9D, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0x3B, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x3C, 0xD8, 0x90, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x54, 0xC4, 0x00, 0x00, 0x00, 0x00,
-0x52, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D,
-0x00, 0x00, 0x54, 0x60, 0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x16, 0x00, 0x00, 0x62, 0x70,
-0x01, 0x1A, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49,
-0x53, 0x54, 0x00, 0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x42, 0x44, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0x86, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xDB, 0x86, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA8, 0xD2, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x4F, 0x9D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x3B, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x3C, 0xD8, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x54,
+0xC4, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00,
+0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x54, 0x60, 0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00,
+0x16, 0x00, 0x00, 0x62, 0x70, 0x01, 0x1A, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42,
+0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54,
+0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x44, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Damascus */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19112,99 +19906,102 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45,
-0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA1, 0xF2, 0xAB, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x81, 0x2F, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA3, 0x5E, 0x9D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x61, 0x11, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA5, 0x3E, 0x7F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x40, 0xF3, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA7, 0x1E, 0x61, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x20, 0xD5, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA9, 0x07, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0x52, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF2, 0x5B, 0x9C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x28, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x3B, 0x7E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0xAD, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0x1F, 0x54, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xE1, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF7, 0xFF, 0x36, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0E, 0xDA, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF9, 0xE1, 0xBB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x48, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xC2, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xCD, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xA5, 0x74, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBD, 0x00, 0x80, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0x86, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x34, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x67, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x67, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x49, 0x0E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xEC, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x2B, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x0C, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x53, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x08, 0xED, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x87, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xCF, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xB1, 0xB3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x6B, 0x59, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x73, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x4C, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xF4, 0xC5, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x19, 0xDB, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xD7, 0x4A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xBD, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x55, 0x23, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x8A, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x47, 0x7A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x89, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x3C, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6B, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x32, 0xBF, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x25, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x44, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF6, 0x5B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xE7, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xE2, 0x1B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xCA, 0x15, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB2, 0x2B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xA3, 0x5F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x8C, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7C, 0x7B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x6D, 0xAF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5F, 0x00, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x50, 0x34, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3E, 0xE2, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x31, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1E, 0xC4, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x12, 0x9B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x02, 0x9A, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE5, 0x1F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xD6, 0x54, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0x53, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xB7, 0x87, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA7, 0x86, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0x98, 0xBB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x88, 0xBA, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x79, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6B, 0x3F, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4C, 0x72, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x3D, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2D, 0xA6, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0C, 0x36, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2A, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF5, 0x53, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0B, 0x71, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xEA, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB5, 0x17, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xC9, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x94, 0xF9, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xA9, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x74, 0xDB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x89, 0xA8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xBD, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x69, 0x8A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x34, 0x9F, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x52, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x14, 0x81, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x32, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF4, 0x63, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x12, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDD, 0x7F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xF2, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBD, 0x61, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xD2, 0x2E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xB2, 0x10, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7D, 0x25, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9B, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5D, 0x07, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x7B, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3C, 0xE9, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x5A, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x26, 0x06, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x05, 0xE8, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x1A, 0xB5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE5, 0xCA, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC5, 0xAC, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA5, 0x8E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x8E, 0xAA, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6E, 0x8C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4E, 0x6E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x63, 0x3B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2E, 0x50, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0E, 0x32, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEE, 0x14, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD7, 0x31, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB7, 0x13, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x96, 0xF5, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x76, 0xD7, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x22,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x35, 0x2F, 0x30, 0x0A,
+0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xAB, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x81, 0x2F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x5E, 0x9D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x61, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3E, 0x7F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x40, 0xF3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x1E, 0x61, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x20, 0xD5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x07, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0x52, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5B, 0x9C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x73, 0x28, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x7E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x55, 0xAD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1F, 0x54, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x36, 0xE1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x36, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0E, 0xDA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xBB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF9, 0x48, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xDB, 0xCD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x74, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xBD, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x9E, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x7F, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x0E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x43, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x24, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x05, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xB3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC9, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x6B, 0x59, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xAA, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4C, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xF4, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x6D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xD7, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBD, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x55, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8A, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x47, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x89, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x3C, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6B, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x32, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF6, 0x5B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xE2, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x15, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB2, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA3, 0x5F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0x7C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6D, 0xAF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x50, 0x34, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3E, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x31, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1E, 0xC4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x12, 0x9B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x02, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE5, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD6, 0x54, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0x53, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB7, 0x87, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA7, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x98, 0xBB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x88, 0xBA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x79, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6B, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4C, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3D, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0C, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2A, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF5, 0x53, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0B, 0x71, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEA, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB5, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xC9, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x94, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xA9, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x89, 0xA8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x54, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x69, 0x8A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x52, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x14, 0x81, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x32, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF4, 0x63, 0x60, 0x00, 0x00, 0x00, 0x00, 0x58, 0x12, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDD, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF2, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBD, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD2, 0x2E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9D, 0x43, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB2, 0x10, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7D, 0x25, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9B, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5D, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7B, 0x0F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3C, 0xE9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5A, 0xF1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x26, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x05, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1A, 0xB5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE5, 0xCA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x03, 0xD1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC5, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE3, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA5, 0x8E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC3, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x8E, 0xAA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x6E, 0x8C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4E, 0x6E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x63, 0x3B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2E, 0x50, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4C, 0x58, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0E, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2C, 0x3A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEE, 0x14, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0C, 0x1C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD7, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB7, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x96, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB4, 0xFC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x76, 0xD7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x94, 0xDE, 0xD0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45,
+0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
+0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x35, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x35, 0x2F, 0x30, 0x0A,
+#endif
0x00, 0xBC, 0x72, 0x30, 0x01, 0x4A, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00,
/* Asia/Dhaka */
@@ -19218,22 +20015,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x16, 0x00, 0x00, 0x62, 0x70, 0x01, 0x1A, 0x4C, 0x4D,
0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x44,
0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x69, 0x86, 0x86, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x86, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x95, 0x32, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDD, 0xA8, 0xD2, 0x98, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0x9D, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0x3B, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x3C, 0xD8, 0x90, 0x00,
-0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x54, 0xC4, 0x00, 0x00, 0x00, 0x00,
-0x52, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D,
-0x00, 0x00, 0x54, 0x60, 0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00, 0x16, 0x00, 0x00, 0x62, 0x70,
-0x01, 0x1A, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49,
-0x53, 0x54, 0x00, 0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x42, 0x44, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xAD, 0x84, 0x92, 0x01, 0x9C, 0x9F, 0x82, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0x86, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xDB, 0x86, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA8, 0xD2, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x4F, 0x9D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x3B, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x3C, 0xD8, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x06, 0x05, 0x00, 0x00, 0x54,
+0xC4, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00,
+0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x54, 0x60, 0x00, 0x11, 0x00, 0x00, 0x54, 0x60, 0x00,
+0x16, 0x00, 0x00, 0x62, 0x70, 0x01, 0x1A, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42,
+0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54,
+0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x44, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xAD, 0x84, 0x92, 0x01, 0x9C, 0x9F, 0x82, 0x00, 0x00, 0x00, 0x00,
/* Asia/Dili */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19244,33 +20043,37 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90,
0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D,
0x54, 0x00, 0x54, 0x4C, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x57, 0x49, 0x54, 0x41, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x18, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x99, 0x32, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x56, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xEA, 0x30, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xC3, 0x99, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x75,
-0xBC, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C, 0x00, 0x00, 0x7E, 0x90, 0x00,
-0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4C, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x57, 0x49, 0x54,
-0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54,
-0x4C, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0x7C, 0x48, 0x68, 0x01, 0xD2, 0x48, 0x7D, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x18, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x99, 0x32, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x56, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xEA, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xC3, 0x99, 0x00, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x03, 0x00, 0x00, 0x75, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0C,
+0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4C, 0x54, 0x00, 0x4A, 0x53,
+0x54, 0x00, 0x57, 0x49, 0x54, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x54, 0x4C, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0x7C, 0x48, 0x68, 0x01, 0xD2, 0x48, 0x7D, 0x00, 0x00, 0x00, 0x00,
/* Asia/Dubai */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xF2, 0x99, 0xA8, 0x00, 0x01, 0x00, 0x00, 0x33, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x99, 0xA8, 0x00, 0x01, 0x00, 0x00, 0x33, 0xD8,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x53, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0xAF, 0xEF, 0x10, 0x01,
-0x67, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x99, 0xA8, 0x00, 0x01, 0x00, 0x00,
+0x33, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x53, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xAF, 0xEF, 0x10, 0x01, 0x67, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
/* Asia/Dushanbe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19288,30 +20091,33 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54,
0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x44, 0x55, 0x53,
0x54, 0x00, 0x44, 0x55, 0x53, 0x53, 0x54, 0x00, 0x54, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x83, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xEF, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xB2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xE5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x19, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x76, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x58, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x3A, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x1C, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xFE, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xE0, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xFD, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xCA, 0x8F, 0x50,
-0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00,
-0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54,
-0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x44, 0x55, 0x53,
-0x54, 0x00, 0x44, 0x55, 0x53, 0x53, 0x54, 0x00, 0x54, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4A, 0x54,
-0x2D, 0x35, 0x0A, 0x00, 0xC4, 0x33, 0xDD, 0x01, 0x7B, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x83, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xB2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xCA, 0x8F, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x00, 0x00, 0x40,
+0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00,
+0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01,
+0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54,
+0x00, 0x44, 0x55, 0x53, 0x54, 0x00, 0x44, 0x55, 0x53, 0x53, 0x54, 0x00, 0x54, 0x4A, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x54, 0x4A, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xC4, 0x33, 0xDD, 0x01, 0x7B, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Gaza */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19342,17 +20148,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4B, 0xAD, 0x2E, 0x9C, 0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x94, 0xF9, 0x9C, 0x4E, 0x35, 0xC2, 0x50,
0x4F, 0x74, 0xDB, 0x60, 0x50, 0x5B, 0x91, 0xE0, 0x51, 0x54, 0xBD, 0x60, 0x52, 0x44, 0xA0, 0x50,
0x53, 0x34, 0x9F, 0x60, 0x54, 0x49, 0x6C, 0x50, 0x55, 0x15, 0xD2, 0xE0, 0x56, 0x29, 0x4E, 0x50,
-0x56, 0xF5, 0xB4, 0xE0, 0x58, 0x09, 0x30, 0x50, 0x58, 0xDE, 0xD1, 0x60, 0x59, 0xF2, 0x4C, 0xD0,
-0x5A, 0xBE, 0xB3, 0x60, 0x5B, 0xD2, 0x2E, 0xD0, 0x5C, 0x9E, 0x95, 0x60, 0x5D, 0xB2, 0x10, 0xD0,
-0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x91, 0xF2, 0xD0, 0x60, 0x5E, 0x59, 0x60, 0x61, 0x71, 0xD4, 0xD0,
-0x62, 0x3E, 0x3B, 0x60, 0x63, 0x51, 0xB6, 0xD0, 0x64, 0x27, 0x57, 0xE0, 0x65, 0x3A, 0xD3, 0x50,
-0x66, 0x07, 0x39, 0xE0, 0x67, 0x1A, 0xB5, 0x50, 0x67, 0xE7, 0x1B, 0xE0, 0x68, 0xFA, 0x97, 0x50,
-0x69, 0xC6, 0xFD, 0xE0, 0x6A, 0xDA, 0x79, 0x50, 0x6B, 0xA6, 0xDF, 0xE0, 0x6C, 0xBA, 0x5B, 0x50,
-0x6D, 0x8F, 0xFC, 0x60, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x6F, 0xDE, 0x60, 0x70, 0x83, 0x59, 0xD0,
-0x71, 0x4F, 0xC0, 0x60, 0x72, 0x63, 0x3B, 0xD0, 0x73, 0x2F, 0xA2, 0x60, 0x74, 0x43, 0x1D, 0xD0,
-0x75, 0x0F, 0x84, 0x60, 0x76, 0x22, 0xFF, 0xD0, 0x76, 0xEF, 0x66, 0x60, 0x78, 0x02, 0xE1, 0xD0,
-0x78, 0xD8, 0x82, 0xE0, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xB8, 0x64, 0xE0, 0x7B, 0xCB, 0xE0, 0x50,
-0x7C, 0x98, 0x46, 0xE0, 0x7D, 0xAB, 0xC2, 0x50, 0x7E, 0x78, 0x28, 0xE0, 0x7F, 0x8B, 0xA4, 0x50,
+0x56, 0xF5, 0xC2, 0xF0, 0x58, 0x09, 0x30, 0x50, 0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF2, 0x4C, 0xD0,
+0x5A, 0xBE, 0xC1, 0x70, 0x5B, 0xD2, 0x2E, 0xD0, 0x5C, 0x9E, 0xA3, 0x70, 0x5D, 0xB2, 0x10, 0xD0,
+0x5E, 0x7E, 0x85, 0x70, 0x5F, 0x91, 0xF2, 0xD0, 0x60, 0x5E, 0x67, 0x70, 0x61, 0x71, 0xD4, 0xD0,
+0x62, 0x3E, 0x49, 0x70, 0x63, 0x51, 0xB6, 0xD0, 0x64, 0x1E, 0x2B, 0x70, 0x65, 0x3A, 0xD3, 0x50,
+0x66, 0x07, 0x47, 0xF0, 0x67, 0x1A, 0xB5, 0x50, 0x67, 0xE7, 0x29, 0xF0, 0x68, 0xFA, 0x97, 0x50,
+0x69, 0xC7, 0x0B, 0xF0, 0x6A, 0xDA, 0x79, 0x50, 0x6B, 0xA6, 0xED, 0xF0, 0x6C, 0xBA, 0x5B, 0x50,
+0x6D, 0x86, 0xCF, 0xF0, 0x6E, 0xA3, 0x77, 0xD0, 0x6F, 0x6F, 0xEC, 0x70, 0x70, 0x83, 0x59, 0xD0,
+0x71, 0x4F, 0xCE, 0x70, 0x72, 0x63, 0x3B, 0xD0, 0x73, 0x2F, 0xB0, 0x70, 0x74, 0x43, 0x1D, 0xD0,
+0x75, 0x0F, 0x92, 0x70, 0x76, 0x22, 0xFF, 0xD0, 0x76, 0xEF, 0x74, 0x70, 0x78, 0x02, 0xE1, 0xD0,
+0x78, 0xCF, 0x56, 0x70, 0x79, 0xEB, 0xFE, 0x50, 0x7A, 0xB8, 0x72, 0xF0, 0x7B, 0xCB, 0xE0, 0x50,
+0x7C, 0x98, 0x54, 0xF0, 0x7D, 0xAB, 0xC2, 0x50, 0x7E, 0x78, 0x36, 0xF0, 0x7F, 0x8B, 0xA4, 0x50,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
@@ -19366,101 +20172,103 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00,
0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45,
0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x92, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59,
-0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC,
-0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F,
-0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84,
-0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65,
-0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36,
-0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B,
-0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC,
-0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF,
-0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0,
-0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91,
-0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73,
-0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55,
-0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36,
-0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18,
-0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9,
-0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x27, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7C,
-0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6,
-0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xBE,
-0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xCC,
-0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82,
-0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E,
-0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5A,
-0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B,
-0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB,
-0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4,
-0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBB,
-0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B,
-0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7B,
-0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7,
-0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x64, 0x46, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x41,
-0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x44, 0x28, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x21,
-0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x24, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x01,
-0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x8B, 0xF3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x16,
-0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0x06, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xFF,
-0x7D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xEF, 0x60, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xDF,
-0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xCF, 0x42, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xBF,
-0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xAF, 0x24, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x9F,
-0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x8F, 0x06, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7F,
-0x05, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x5E,
-0xE7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2D,
-0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0E,
-0xD9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE8, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEC,
-0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCB,
-0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xA0, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAD,
-0x2E, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x94,
-0xF9, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x35, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x74,
-0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x5B, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54,
-0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x44, 0xA0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x34,
-0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x49, 0x6C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15,
-0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x29, 0x4E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF5,
-0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x09, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDE,
-0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF2, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE,
-0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD2, 0x2E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E,
-0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB2, 0x10, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E,
-0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x91, 0xF2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E,
-0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x71, 0xD4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3E,
-0x3B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x51, 0xB6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x27,
-0x57, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07,
-0x39, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1A, 0xB5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE7,
-0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFA, 0x97, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC6,
-0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDA, 0x79, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6,
-0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xBA, 0x5B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x8F,
-0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F,
-0xDE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4F,
-0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x72, 0x63, 0x3B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2F,
-0xA2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x74, 0x43, 0x1D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0F,
-0x84, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x22, 0xFF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEF,
-0x66, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x02, 0xE1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD8,
-0x82, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8,
-0x64, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98,
-0x46, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAB, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78,
-0x28, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8B, 0xA4, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x27, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x7C, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xBE, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xCC, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x82, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x5A, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xEB, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7B, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0xE7, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x64, 0x46, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x41, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x44, 0x28, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x21, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x24, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x01, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x8B, 0xF3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x16, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0x06, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xFF, 0x7D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xEF, 0x60, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xDF, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xCF, 0x42, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xBF, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xAF, 0x24, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x9F, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x8F, 0x06, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x7F, 0x05, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x5E, 0xE7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0E, 0xD9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE8, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEC, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xA0, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAD, 0x2E, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x94, 0xF9, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x35, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x5B, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x54, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x44, 0xA0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x49, 0x6C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x15, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x29, 0x4E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF5, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x09, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD5, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF2, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD2, 0x2E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9E, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB2, 0x10, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x91, 0xF2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x71, 0xD4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x51, 0xB6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1E, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x07, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1A, 0xB5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE7, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFA, 0x97, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC7, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDA, 0x79, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA6, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xBA, 0x5B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x86, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x6F, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4F, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x72, 0x63, 0x3B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2F, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x74, 0x43, 0x1D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0F, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x22, 0xFF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEF, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x02, 0xE1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xCF, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB8, 0x72, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x98, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAB, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x78, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8B, 0xA4, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x02, 0x03, 0x02,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x20, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45,
-0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x35, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x33, 0x2E, 0x36, 0x2F, 0x31, 0x34, 0x34, 0x0A, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47,
-0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70,
-
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00,
+0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04,
+0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D,
+0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x31, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x33, 0x2E, 0x36, 0x2F, 0x31, 0x34, 0x34, 0x0A,
+#endif
+0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61,
+0x20, 0x53, 0x74, 0x72, 0x69, 0x70,
/* Asia/Harbin */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19473,23 +20281,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43,
-0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23,
-0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00,
+0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Hebron */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19520,18 +20331,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4B, 0xAB, 0xDC, 0xE0, 0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x94, 0xF9, 0x9C, 0x4E, 0x35, 0xC2, 0x50,
0x4E, 0x5C, 0x0B, 0xE0, 0x4E, 0x84, 0xDC, 0x50, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x5B, 0x91, 0xE0,
0x51, 0x54, 0xBD, 0x60, 0x52, 0x44, 0xA0, 0x50, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x49, 0x6C, 0x50,
-0x55, 0x15, 0xD2, 0xE0, 0x56, 0x29, 0x4E, 0x50, 0x56, 0xF5, 0xB4, 0xE0, 0x58, 0x09, 0x30, 0x50,
-0x58, 0xDE, 0xD1, 0x60, 0x59, 0xF2, 0x4C, 0xD0, 0x5A, 0xBE, 0xB3, 0x60, 0x5B, 0xD2, 0x2E, 0xD0,
-0x5C, 0x9E, 0x95, 0x60, 0x5D, 0xB2, 0x10, 0xD0, 0x5E, 0x7E, 0x77, 0x60, 0x5F, 0x91, 0xF2, 0xD0,
-0x60, 0x5E, 0x59, 0x60, 0x61, 0x71, 0xD4, 0xD0, 0x62, 0x3E, 0x3B, 0x60, 0x63, 0x51, 0xB6, 0xD0,
-0x64, 0x27, 0x57, 0xE0, 0x65, 0x3A, 0xD3, 0x50, 0x66, 0x07, 0x39, 0xE0, 0x67, 0x1A, 0xB5, 0x50,
-0x67, 0xE7, 0x1B, 0xE0, 0x68, 0xFA, 0x97, 0x50, 0x69, 0xC6, 0xFD, 0xE0, 0x6A, 0xDA, 0x79, 0x50,
-0x6B, 0xA6, 0xDF, 0xE0, 0x6C, 0xBA, 0x5B, 0x50, 0x6D, 0x8F, 0xFC, 0x60, 0x6E, 0xA3, 0x77, 0xD0,
-0x6F, 0x6F, 0xDE, 0x60, 0x70, 0x83, 0x59, 0xD0, 0x71, 0x4F, 0xC0, 0x60, 0x72, 0x63, 0x3B, 0xD0,
-0x73, 0x2F, 0xA2, 0x60, 0x74, 0x43, 0x1D, 0xD0, 0x75, 0x0F, 0x84, 0x60, 0x76, 0x22, 0xFF, 0xD0,
-0x76, 0xEF, 0x66, 0x60, 0x78, 0x02, 0xE1, 0xD0, 0x78, 0xD8, 0x82, 0xE0, 0x79, 0xEB, 0xFE, 0x50,
-0x7A, 0xB8, 0x64, 0xE0, 0x7B, 0xCB, 0xE0, 0x50, 0x7C, 0x98, 0x46, 0xE0, 0x7D, 0xAB, 0xC2, 0x50,
-0x7E, 0x78, 0x28, 0xE0, 0x7F, 0x8B, 0xA4, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x55, 0x15, 0xD2, 0xE0, 0x56, 0x29, 0x4E, 0x50, 0x56, 0xF5, 0xC2, 0xF0, 0x58, 0x09, 0x30, 0x50,
+0x58, 0xD5, 0xA4, 0xF0, 0x59, 0xF2, 0x4C, 0xD0, 0x5A, 0xBE, 0xC1, 0x70, 0x5B, 0xD2, 0x2E, 0xD0,
+0x5C, 0x9E, 0xA3, 0x70, 0x5D, 0xB2, 0x10, 0xD0, 0x5E, 0x7E, 0x85, 0x70, 0x5F, 0x91, 0xF2, 0xD0,
+0x60, 0x5E, 0x67, 0x70, 0x61, 0x71, 0xD4, 0xD0, 0x62, 0x3E, 0x49, 0x70, 0x63, 0x51, 0xB6, 0xD0,
+0x64, 0x1E, 0x2B, 0x70, 0x65, 0x3A, 0xD3, 0x50, 0x66, 0x07, 0x47, 0xF0, 0x67, 0x1A, 0xB5, 0x50,
+0x67, 0xE7, 0x29, 0xF0, 0x68, 0xFA, 0x97, 0x50, 0x69, 0xC7, 0x0B, 0xF0, 0x6A, 0xDA, 0x79, 0x50,
+0x6B, 0xA6, 0xED, 0xF0, 0x6C, 0xBA, 0x5B, 0x50, 0x6D, 0x86, 0xCF, 0xF0, 0x6E, 0xA3, 0x77, 0xD0,
+0x6F, 0x6F, 0xEC, 0x70, 0x70, 0x83, 0x59, 0xD0, 0x71, 0x4F, 0xCE, 0x70, 0x72, 0x63, 0x3B, 0xD0,
+0x73, 0x2F, 0xB0, 0x70, 0x74, 0x43, 0x1D, 0xD0, 0x75, 0x0F, 0x92, 0x70, 0x76, 0x22, 0xFF, 0xD0,
+0x76, 0xEF, 0x74, 0x70, 0x78, 0x02, 0xE1, 0xD0, 0x78, 0xCF, 0x56, 0x70, 0x79, 0xEB, 0xFE, 0x50,
+0x7A, 0xB8, 0x72, 0xF0, 0x7B, 0xCB, 0xE0, 0x50, 0x7C, 0x98, 0x54, 0xF0, 0x7D, 0xAB, 0xC2, 0x50,
+0x7E, 0x78, 0x36, 0xF0, 0x7F, 0x8B, 0xA4, 0x50, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
@@ -19545,101 +20356,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x30, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00,
0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53,
0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0x27, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7C, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xBE, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xCC, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5A, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7B, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x64, 0x46, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x41, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x44, 0x28, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x21, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x24, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x01, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x8B, 0xF3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x16, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x06, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xFF, 0x7D, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xEF, 0x60, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xDF, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xCF, 0x42, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xBF, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xAF, 0x24, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x9F, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x8F, 0x06, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7F, 0x05, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x5C, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x5E, 0xE7, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x41, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0E, 0xD9, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x46, 0xE8, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEC, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x48, 0xBB, 0x06, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xA0, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAB, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x94, 0xF9, 0x9C, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0x35, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x5C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0x84, 0xDC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x74, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x5B, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x44, 0xA0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x34, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x49, 0x6C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x29, 0x4E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x09, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xF2, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xD2, 0x2E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xB2, 0x10, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x91, 0xF2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x71, 0xD4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x51, 0xB6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x27, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x1A, 0xB5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE7, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x68, 0xFA, 0x97, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xDA, 0x79, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xBA, 0x5B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x8F, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x63, 0x3B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0xA2, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x43, 0x1D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x84, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x22, 0xFF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x66, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x02, 0xE1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD8, 0x82, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x64, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x46, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xAB, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x78, 0x28, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x8B, 0xA4, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4A, 0x19, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x27, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x7C, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xBE, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xCC, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x82, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x5A, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xEB, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7B, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0xE7, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x64, 0x46, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x41, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x44, 0x28, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x21, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x24, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x01, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x8B, 0xF3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x16, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0x06, 0x44, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xFF, 0x7D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xEF, 0x60, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xDF, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xCF, 0x42, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xBF, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xAF, 0x24, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x9F, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x8F, 0x06, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x7F, 0x05, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x5E, 0xE7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x41, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0E, 0xD9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE8, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEC, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xBB, 0x06, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCB, 0xFA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xA0, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAB, 0xDC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x94, 0xF9, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x35, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x5C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x84, 0xDC, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x5B, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x54, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x44, 0xA0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x49, 0x6C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x15, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x29, 0x4E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF5, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x09, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD5, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF2, 0x4C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD2, 0x2E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9E, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB2, 0x10, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x91, 0xF2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x71, 0xD4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x51, 0xB6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1E, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3A, 0xD3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x07, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1A, 0xB5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE7, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFA, 0x97, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC7, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDA, 0x79, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA6, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xBA, 0x5B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x86, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA3, 0x77, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x6F, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x83, 0x59, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4F, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x72, 0x63, 0x3B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2F, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x74, 0x43, 0x1D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0F, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x22, 0xFF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEF, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x02, 0xE1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xCF, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEB, 0xFE, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB8, 0x72, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCB, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x98, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAB, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x78, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8B, 0xA4, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x02, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08,
-0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49,
-0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x35, 0x2F, 0x32, 0x34, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E,
-0x36, 0x2F, 0x31, 0x34, 0x34, 0x0A, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00,
-0x00, 0x09, 0x57, 0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B,
+0x00, 0x00, 0x20, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45,
+0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45,
+0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x31,
+0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E, 0x36, 0x2F, 0x31, 0x34, 0x34, 0x0A,
+#endif
+0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, 0x65, 0x73, 0x74,
+0x20, 0x42, 0x61, 0x6E, 0x6B,
/* Asia/Ho_Chi_Minh */
0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19652,21 +20466,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x62, 0x70,
0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x49,
0x44, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x8C, 0x43, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0x91, 0xA3, 0x2B, 0x0A, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x35, 0xE6, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD1, 0x59, 0xCE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD5, 0x32, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0xB6, 0xE4, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xED, 0x2F, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3D, 0xC7, 0x00, 0x00,
-0x01, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x63, 0xF6, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00,
-0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x4C, 0x4D, 0x54,
-0x00, 0x50, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x4A, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49,
-0x43, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0x99, 0xBB, 0x78, 0x01, 0xB5, 0x6B, 0x2A, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x8C, 0x43, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0xA3, 0x2B, 0x0A, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x35, 0xE6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x59, 0xCE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x32, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0xB6, 0xE4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x2F, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3D, 0xC7, 0x00, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xF6,
+0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4C,
+0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D,
+0x37, 0x0A,
+#endif
+0x00, 0x99, 0xBB, 0x78, 0x01, 0xB5, 0x6B, 0x2A, 0x00, 0x00, 0x00, 0x00,
/* Asia/Hong_Kong */
0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19697,54 +20514,57 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90,
0x00, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4B, 0x53, 0x54,
0x00, 0x48, 0x4B, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x69, 0x5A, 0xF6, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC9, 0xEA, 0x57, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDA, 0x3A, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x4B, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0x62, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x6A, 0xB7, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x93, 0x4A, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xB0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x9A, 0xB9, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD7, 0x3E, 0x41, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x24, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x39, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x06, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDA, 0xD9, 0x1B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xED, 0xE8, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDC, 0xB8, 0xFD, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCD, 0xCA, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x1A, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAC, 0x5B, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE0, 0x81, 0xFC, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96, 0xC9, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE2, 0x4F, 0x69, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x76, 0xAB, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE4, 0x2F, 0x4B, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x5F, 0xC7, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE6, 0x0F, 0x2D, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x3F, 0xA9, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE7, 0xF8, 0x49, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x1F, 0x8B, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE9, 0xD8, 0x2B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xFF, 0x6D, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEB, 0xB8, 0x0D, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xDF, 0x4F, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xED, 0x97, 0xEF, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xC8, 0x6C, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF3, 0x40, 0xD0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF7, 0x25, 0x7E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x15, 0x61, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x4D, 0xE6, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x05, 0x47, 0x04, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x37, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xE6, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x83, 0x3D, 0x38, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x11, 0x9B, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x6C, 0xA8, 0x00,
-0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x6B, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01,
-0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70,
-0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4B, 0x53, 0x54, 0x00, 0x48, 0x4B, 0x54, 0x00,
-0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48,
-0x4B, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0xAB, 0x54, 0xAD, 0x01, 0xC0, 0xD6, 0x57, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x69, 0x5A, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xEA, 0x57, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDA, 0x3A, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x4B, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0x62, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x6A, 0xB7, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x93, 0x4A, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x42, 0xB0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x9A, 0xB9, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3E, 0x41, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x24, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x39, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x06, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xD9, 0x1B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xED, 0xE8, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB8, 0xFD, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCD, 0xCA, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xA2, 0x1A, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAC, 0x5B, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x81, 0xFC, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96, 0xC9, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x4F, 0x69, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x76, 0xAB, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x2F, 0x4B, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x5F, 0xC7, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x0F, 0x2D, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x3F, 0xA9, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0xF8, 0x49, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x1F, 0x8B, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xD8, 0x2B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xFF, 0x6D, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xB8, 0x0D, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xDF, 0x4F, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x97, 0xEF, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xC8, 0x6C, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x40, 0xD0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x25, 0x7E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x15, 0x61, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x4D, 0xE6, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x05, 0x47, 0x04, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x37, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xE6, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x83, 0x3D, 0x38, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x9B, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x6C, 0xA8, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x00, 0x00, 0x6B, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09,
+0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4B, 0x53, 0x54, 0x00, 0x48, 0x4B, 0x54, 0x00, 0x4A, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x4B, 0x54, 0x2D,
+0x38, 0x0A,
+#endif
+0x00, 0xAB, 0x54, 0xAD, 0x01, 0xC0, 0xD6, 0x57, 0x00, 0x00, 0x00, 0x00,
/* Asia/Hovd */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19781,71 +20601,73 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x55,
0xEC, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00,
0x00, 0x62, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4F, 0x56, 0x54, 0x00, 0x48, 0x4F,
-0x56, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xFC, 0x94, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0B, 0xEA, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x0B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x3E, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x20, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x02, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xE4, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xC6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xC5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xA7, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x6B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x4D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x2F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x68, 0x90, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x4B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x2D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0x0F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB4, 0xBA, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0xB9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x94, 0x9C, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x9B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x74, 0x7E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x7D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x54, 0x60, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x5F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x34, 0x42, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1D, 0x5F, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0xA8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x6F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE5, 0x51, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xD5, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCE, 0x6E, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0x89, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAE, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x6B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8E, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x4D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6E, 0x14, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x2F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4D, 0xF6, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x11, 0x30, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2D, 0xD8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x1D, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x65, 0x16, 0xF4, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x0F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF6, 0xD6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0xF1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD6, 0xB8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB6, 0x9A, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x96, 0x7C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x7F, 0x99, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xB4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x5F, 0x7B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0x96, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x3F, 0x5D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1F, 0x3F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x5A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x75, 0xFF, 0x21, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x3C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x77, 0xDF, 0x03, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x1E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC8, 0x1F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x3A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA8, 0x01, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x1C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x87, 0xE3, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x77, 0xFE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x67, 0xC5, 0x80,
-0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x55,
-0xEC, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00,
-0x00, 0x62, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4F, 0x56, 0x54, 0x00, 0x48, 0x4F,
-0x56, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x4F, 0x56,
-0x54, 0x2D, 0x37, 0x48, 0x4F, 0x56, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2C,
-0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30, 0x0A, 0x00, 0xD2, 0x98, 0xC2, 0x01, 0x9E, 0x81,
-0x47, 0x00, 0x00, 0x00, 0x2B, 0x42, 0x61, 0x79, 0x61, 0x6E, 0x2D, 0x4F, 0x6C, 0x67, 0x69, 0x79,
-0x2C, 0x20, 0x47, 0x6F, 0x76, 0x69, 0x2D, 0x41, 0x6C, 0x74, 0x61, 0x69, 0x2C, 0x20, 0x48, 0x6F,
-0x76, 0x64, 0x2C, 0x20, 0x55, 0x76, 0x73, 0x2C, 0x20, 0x5A, 0x61, 0x76, 0x6B, 0x68, 0x61, 0x6E,
-
+0x56, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xFC, 0x94, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x0B, 0xEA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x68, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x4D, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x2D, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x0D, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB4, 0xBA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0xB9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x94, 0x9C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x9B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x74, 0x7E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x7D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x54, 0x60, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x5F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x34, 0x42, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1D, 0x5F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0xA8, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x05, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE5, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD5, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCE, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0x89, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x6B, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8E, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x4D, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6E, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x2F, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4D, 0xF6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x11, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2D, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1D, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x16, 0xF4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x0F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF6, 0xD6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0xF1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD6, 0xB8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xD3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB6, 0x9A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xB5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x96, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x7F, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xB4, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x5F, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0x96, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x3F, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x1F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x5A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x75, 0xFF, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x3C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xDF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x1E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC8, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x3A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA8, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x1C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x87, 0xE3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x77, 0xFE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x67, 0xC5, 0x80, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x00, 0x00, 0x55, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70,
+0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4F, 0x56,
+0x54, 0x00, 0x48, 0x4F, 0x56, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x48, 0x4F, 0x56, 0x54, 0x2D, 0x37, 0x48, 0x4F, 0x56, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x36, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0xD2, 0x98, 0xC2, 0x01, 0x9E, 0x81, 0x47, 0x00, 0x00, 0x00, 0x2B, 0x42, 0x61, 0x79, 0x61,
+0x6E, 0x2D, 0x4F, 0x6C, 0x67, 0x69, 0x79, 0x2C, 0x20, 0x47, 0x6F, 0x76, 0x69, 0x2D, 0x41, 0x6C,
+0x74, 0x61, 0x69, 0x2C, 0x20, 0x48, 0x6F, 0x76, 0x64, 0x2C, 0x20, 0x55, 0x76, 0x73, 0x2C, 0x20,
+0x5A, 0x61, 0x76, 0x6B, 0x68, 0x61, 0x6E,
/* Asia/Irkutsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19878,57 +20700,61 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D,
0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x49, 0x52, 0x4B, 0x54, 0x00, 0x49, 0x52, 0x4B, 0x53, 0x54,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
-0x0C, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x56, 0xB6, 0x82, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x12, 0x0F, 0xBF, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB5, 0xA3, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x61, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x18, 0x95, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x95, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x17, 0xF9, 0xC9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x19, 0xDA, 0xFC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x4D, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xBC, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x4B, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0x9C, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x2D, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x7C, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x0F, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x5C, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xF1, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x3B, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xD3, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x1B, 0xC4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xB5, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x04, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xD2, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xE4, 0xD1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x79, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xD4, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x6C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xB4, 0x96, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x87, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x94, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x69, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x74, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x4B, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x51, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x33, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x15, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x1C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x32, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xDC, 0xFE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x14, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xBC, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xF6, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xA5, 0xFD, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xD8, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x85, 0xDF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xBA, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x65, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xD6, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x45, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xB8, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x25, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x9A, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x05, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x7C, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xEE, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x5E, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xCE, 0x65, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x40, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0xAE, 0x47, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x5D, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x8E, 0x29, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xD7, 0x10, 0x00, 0x01, 0x02,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x09, 0x05,
-0x00, 0x00, 0x61, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x61, 0xC1, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70,
-0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00,
-0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x01, 0x0D,
-0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90,
-0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00,
-0x49, 0x52, 0x4B, 0x54, 0x00, 0x49, 0x52, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x49, 0x52, 0x4B, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0xD9, 0x14, 0xEA, 0x01,
-0xB1, 0xDB, 0xB5, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x35,
-0x20, 0x2D, 0x20, 0x4C, 0x61, 0x6B, 0x65, 0x20, 0x42, 0x61, 0x69, 0x6B, 0x61, 0x6C,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x82, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x12, 0x0F, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x95, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xC9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xFC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x4B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x2D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4B, 0xF1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2B, 0xD3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xC4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xB5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF4, 0xD2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xD1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x96, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x69, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x5A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x4B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x76, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x58, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x33, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x3A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x15, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x1C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x32, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xFE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xE0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xF6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xFD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xD8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xDF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xBA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xD6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xA3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xB8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x65, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x40, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x47, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x5D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x29, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4B, 0xD7, 0x10, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x03,
+0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x09, 0x05, 0x00, 0x00, 0x61, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x61,
+0xC1, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00,
+0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x01,
+0x0D, 0x00, 0x00, 0x70, 0x80, 0x01, 0x0D, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x7E,
+0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C,
+0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x49, 0x52, 0x4B, 0x54, 0x00, 0x49, 0x52, 0x4B, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x52, 0x4B, 0x54, 0x2D,
+0x38, 0x0A,
+#endif
+0x00, 0xD9, 0x14, 0xEA, 0x01, 0xB1, 0xDB, 0xB5, 0x00, 0x00, 0x00, 0x1A, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x35, 0x20, 0x2D, 0x20, 0x49, 0x72, 0x6B, 0x75, 0x74, 0x73, 0x6B, 0x2C, 0x20, 0x42, 0x75,
+0x72, 0x79, 0x61, 0x74, 0x69, 0x61,
/* Asia/Istanbul */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -19965,7 +20791,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10,
-0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x3E, 0x9E, 0x90, 0x56, 0xF7, 0x30, 0x90,
0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90,
0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10,
0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10,
@@ -19994,116 +20820,119 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
0x00, 0x45, 0x45, 0x54, 0x00, 0x54, 0x52, 0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xD8, 0xFF, 0xFF,
-0xFF, 0xFF, 0x90, 0x8B, 0xF5, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x28, 0x28, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAA, 0xE1, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF9, 0x89, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAC, 0xC3, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x7F, 0xEE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0xFF, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x4A, 0xF5, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCA, 0xCE, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x71, 0xEB, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x6B, 0x09, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA2, 0x39, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x43, 0x02, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x0D, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x29, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2B, 0xEF, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x09, 0x5D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0x97, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE9, 0x3F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEF, 0xA8, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDB, 0xD2, 0x5C, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xD4, 0xD0, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xB3, 0x8F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xF4, 0xB9, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF2, 0x64, 0xBA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x68, 0x06, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF6, 0x1F, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xBA, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x6B, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x9C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x4B, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x69, 0xB9, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x34, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x39, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFB, 0x75, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x19, 0xA6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDB, 0x3A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0xF0, 0x07, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x10, 0xCE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0C, 0xD9, 0x24, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0E, 0xA6, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0x98, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x47, 0x7A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x27, 0x5C, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07, 0x3E, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x89, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDC, 0x94, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xC6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9B, 0x15, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0xFA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x45, 0x98, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8F, 0xDD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x38, 0xBE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x90, 0x8B, 0xF5, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x28, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE1, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF9, 0x89, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC3, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x7F, 0xEE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xFF, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x4A, 0xF5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xCE, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x71, 0xEB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x6B, 0x09, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA2, 0x39, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x43, 0x02, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x0D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2B, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x5D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x3F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEF, 0xA8, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xD2, 0x5C, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xD4, 0xD0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xB3, 0x8F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xF4, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x64, 0xBA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x68, 0x06, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x1F, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xBA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x6B, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x4B, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x69, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x34, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x39, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFB, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x19, 0xA6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDB, 0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x07, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x10, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x24, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xA6, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x47, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x27, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x89, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDC, 0x94, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xC6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9B, 0x15, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xFA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x98, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8F, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x38, 0xBE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x3E, 0x9E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x06, 0x07, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x00, 0x00, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x54, 0x52, 0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45,
-0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x00, 0x00, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00, 0x00, 0x2A,
+0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01, 0x11, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x54, 0x52,
+0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D,
+0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Jakarta */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20116,21 +20945,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x11, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0D, 0x4C, 0x4D,
0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x4A, 0x41, 0x56, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A,
0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x66, 0x49, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA9, 0x78, 0x85, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0xDE, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0xBF, 0x83, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x56, 0xEE, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD7, 0x3C, 0xC6, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0xB5, 0xBE, 0x88, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x06, 0x00, 0x00,
-0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x20, 0x00, 0x04, 0x00, 0x00, 0x67, 0x20, 0x00, 0x08,
-0x00, 0x00, 0x69, 0x78, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x70, 0x80,
-0x00, 0x0D, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00,
-0x4A, 0x41, 0x56, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x49, 0x42, 0x2D,
-0x37, 0x0A, 0x00, 0x7F, 0xEB, 0x65, 0x01, 0xB5, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x0E, 0x4A, 0x61,
-0x76, 0x61, 0x20, 0x26, 0x20, 0x53, 0x75, 0x6D, 0x61, 0x74, 0x72, 0x61,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x66, 0x49, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x78, 0x85, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0xDE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xBF, 0x83, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x56, 0xEE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3C, 0xC6, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0xB5, 0xBE, 0x88, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x03, 0x06, 0x00, 0x00, 0x64,
+0x20, 0x00, 0x00, 0x00, 0x00, 0x64, 0x20, 0x00, 0x04, 0x00, 0x00, 0x67, 0x20, 0x00, 0x08, 0x00,
+0x00, 0x69, 0x78, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x70, 0x80, 0x00,
+0x0D, 0x00, 0x00, 0x62, 0x70, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x4A,
+0x41, 0x56, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x49, 0x42, 0x2D, 0x37,
+0x0A,
+#endif
+0x00, 0x7F, 0xEB, 0x65, 0x01, 0xB5, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x0D, 0x4A, 0x61, 0x76, 0x61,
+0x2C, 0x20, 0x53, 0x75, 0x6D, 0x61, 0x74, 0x72, 0x61,
/* Asia/Jayapura */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20139,19 +20972,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xBA, 0x16, 0xC1, 0x98, 0xD0, 0x58, 0xB9, 0xF0, 0xF4, 0xB5, 0xA2, 0x68, 0x00, 0x01, 0x02, 0x01,
0x00, 0x00, 0x83, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98,
0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54, 0x00,
-0x41, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0xC1, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x58, 0xB9,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0xB5, 0xA2, 0x68, 0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x83,
-0xE8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x00, 0x08, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54, 0x00, 0x41, 0x43, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x49, 0x54, 0x2D, 0x39,
-0x0A, 0x00, 0x85, 0x76, 0xAA, 0x01, 0xE9, 0x59, 0x70, 0x00, 0x00, 0x00, 0x31, 0x77, 0x65, 0x73,
-0x74, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x49, 0x72,
-0x69, 0x61, 0x6E, 0x20, 0x4A, 0x61, 0x79, 0x61, 0x29, 0x20, 0x26, 0x20, 0x4D, 0x61, 0x6C, 0x75,
-0x6B, 0x75, 0x73, 0x20, 0x28, 0x4D, 0x6F, 0x6C, 0x75, 0x63, 0x63, 0x61, 0x73, 0x29,
+0x41, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0xC1, 0x98, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x58, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0xB5, 0xA2, 0x68, 0x00, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x83, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98,
+0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54, 0x00,
+0x41, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x49,
+0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0x85, 0x76, 0xAA, 0x01, 0xE9, 0x59, 0x70, 0x00, 0x00, 0x00, 0x36, 0x4E, 0x65, 0x77, 0x20,
+0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x57, 0x65, 0x73, 0x74, 0x20, 0x50, 0x61, 0x70,
+0x75, 0x61, 0x20, 0x2F, 0x20, 0x49, 0x72, 0x69, 0x61, 0x6E, 0x20, 0x4A, 0x61, 0x79, 0x61, 0x29,
+0x3B, 0x20, 0x4D, 0x61, 0x6C, 0x75, 0x6B, 0x75, 0x73, 0x2F, 0x4D, 0x6F, 0x6C, 0x75, 0x63, 0x63,
+0x61, 0x73,
/* Asia/Jerusalem */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20205,83 +21042,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x00,
0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4A,
0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x44, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30, 0x45, 0x88,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xC9, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x6B, 0xE0, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x5A, 0x14, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0xDF, 0x1F, 0xC0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2F, 0xB5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1E, 0x46, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x10, 0xE8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xB3, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xB4, 0x34, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x20, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xE0, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xCE, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xA4, 0xBF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x8B, 0x76, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x56, 0x7D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xBE, 0x4A, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x36, 0x34, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x9C, 0xF7, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x16, 0x16, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x74, 0xD3, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0xFF, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE8, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7C, 0x8B, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xEA, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xBE, 0xF8, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xCC, 0xFF, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0xB1, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x9E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5A, 0x30, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB, 0xCF, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBB, 0x65, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x47, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7B, 0x29, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x48, 0x96, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x3C, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x31, 0xB3, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x1A, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x11, 0x95, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xA6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x04, 0x08, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x37, 0xCF, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xF6, 0x5F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xDC, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xD0, 0xED, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xAE, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA3, 0xA0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xA0, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x83, 0x82, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x7C, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x73, 0x36, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x50, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4C, 0x8F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2C, 0x71, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0C, 0x53, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x46, 0xEC, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEC, 0x35, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCC, 0x17, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAB, 0xF9, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x95, 0x15, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x9B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x74, 0xF7, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x5E, 0x42, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x34, 0xBB, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x55, 0x14, 0x9D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF4, 0x7F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD4, 0x61, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB4, 0x43, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7D, 0x42, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xB1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5D, 0x24, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3D, 0x06, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1C, 0xE8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x66, 0x06, 0x04, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE5, 0xE6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC5, 0xC8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA5, 0xAA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x85, 0x8C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x65, 0x6E, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x18, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4E, 0x8B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2E, 0x6D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0E, 0x4F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xF9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEE, 0x31, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCE, 0x13, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xBD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAD, 0xF5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x97, 0x11, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x81, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x76, 0xF3, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x63, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x30, 0x45, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x5A, 0x14, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0xDF, 0x1F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2F, 0xB5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x1E, 0x46, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x10, 0xE8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xB3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xB4, 0x34, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x20, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xE0, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xCE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xA4, 0xBF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x8B, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x56, 0x7D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0xBE, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x36, 0x34, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x9C, 0xF7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x16, 0x16, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x74, 0xD3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE8, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x7C, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xBE, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xCC, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x82, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x5A, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xEB, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7B, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x48, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x3C, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x31, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x1A, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x11, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xA6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x04, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0xCF, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xF6, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDC, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xD0, 0xED, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xAE, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA3, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA0, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x83, 0x82, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7C, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x73, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x50, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4C, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2C, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0C, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xEC, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEC, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCC, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAB, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x95, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x9B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x5E, 0x42, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x54, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x14, 0x9D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF4, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD4, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB4, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7D, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xB1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5D, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3D, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1C, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x06, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE5, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC5, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA5, 0xAA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x85, 0x8C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x65, 0x6E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x18, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4E, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2E, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0E, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xF9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEE, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xCE, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xBD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xAD, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x97, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x81, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x76, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x63, 0x70, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
@@ -20289,14 +21127,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x21, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x20, 0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C,
-0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x4A, 0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x44, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53,
-0x54, 0x2D, 0x32, 0x49, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x32, 0x36,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xB9, 0xD2, 0x87, 0x01, 0x48, 0x67,
-0xD4, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x21, 0x06,
+0x00, 0x00, 0x00, 0x00, 0x20, 0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
+0x49, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D, 0x32, 0x49, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E,
+0x34, 0x2F, 0x32, 0x36, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xB9, 0xD2, 0x87, 0x01, 0x48, 0x67, 0xD4, 0x00, 0x00, 0x00, 0x00,
/* Asia/Kabul */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20304,15 +21143,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xD0, 0xF9, 0xD7, 0x40, 0x01, 0x02, 0x00, 0x00, 0x40, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
0x00, 0x04, 0x00, 0x00, 0x3F, 0x48, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x46, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86,
-0x9A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xF9, 0xD7, 0x40, 0x00, 0x01, 0x02, 0x00, 0x00, 0x40,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x48, 0x00, 0x04, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x46,
-0x54, 0x2D, 0x34, 0x3A, 0x33, 0x30, 0x0A, 0x00, 0xBD, 0xFF, 0x52, 0x01, 0x7C, 0x3F, 0xC0, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0x9A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xF9, 0xD7, 0x40, 0x00, 0x01, 0x02, 0x00, 0x00, 0x40, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x48, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x46, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x46, 0x54, 0x2D, 0x34, 0x3A, 0x33, 0x30,
+0x0A,
+#endif
+0x00, 0xBD, 0xFF, 0x52, 0x01, 0x7C, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
/* Asia/Kamchatka */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20343,98 +21185,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00,
0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x45, 0x54, 0x54, 0x00,
0x50, 0x45, 0x54, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x09,
-0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA7, 0x52, 0x96, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x27, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x5D, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x08, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xE9, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xC4, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xCC, 0x15, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xAC, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x8B, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x6B, 0xD7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x4B, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x2B, 0x9B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0x8C, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x0B, 0x7D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF4, 0x99, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x78, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x51, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xC4, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x5D, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xA4, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0x84, 0x30, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x21, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x64, 0x12, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x3E, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x72, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x51, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x31, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFC, 0xE4, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1A, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xC6, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFA, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xA8, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDA, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xC4, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBA, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xA6, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9A, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0x88, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x83, 0x9E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x63, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x4C, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x43, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x2E, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x23, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x4B, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x03, 0x26, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x2D, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xE3, 0x08, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8D, 0xFF, 0x70, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x52, 0x96, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x5D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xC4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x15, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8B, 0xF5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xD7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0x9B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x8C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x7D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0x99, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x40, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x51, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x5D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x30, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x21, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x12, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x3E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x51, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFC, 0xE4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1A, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xC6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xA8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xC4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xA6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0x88, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0x9E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x4C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x2E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x4B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x26, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x2D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x08, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8D, 0xFF, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x00, 0x00, 0x94,
-0xBC, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00,
-0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01,
-0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8,
-0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x45, 0x54, 0x54, 0x00, 0x50, 0x45, 0x54, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x45, 0x54, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0xDA, 0x39,
-0xE2, 0x02, 0x04, 0xBD, 0x28, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B,
-0x30, 0x38, 0x20, 0x28, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x39, 0x20, 0x61, 0x66,
-0x74, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2D, 0x31, 0x30, 0x2D, 0x32, 0x36, 0x29, 0x20,
-0x2D, 0x20, 0x4B, 0x61, 0x6D, 0x63, 0x68, 0x61, 0x74, 0x6B, 0x61,
+0x05, 0x04, 0x06, 0x07, 0x04, 0x00, 0x00, 0x94, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00,
+0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8,
+0xC0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00,
+0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50,
+0x45, 0x54, 0x54, 0x00, 0x50, 0x45, 0x54, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x45, 0x54,
+0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0xDA, 0x39, 0xE2, 0x02, 0x04, 0xBD, 0x28, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x39, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6D, 0x63, 0x68, 0x61, 0x74, 0x6B, 0x61,
/* Asia/Karachi */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x80, 0x00, 0x00, 0x00,
0x89, 0x7E, 0xFC, 0xA4, 0xCC, 0x95, 0x32, 0xA8, 0xD2, 0x74, 0x12, 0x98, 0xDD, 0xA8, 0xE0, 0xA8,
-0x02, 0x4F, 0xAB, 0x30, 0x3C, 0xAF, 0x45, 0xEC, 0x3D, 0x9F, 0x28, 0xDC, 0x48, 0x41, 0xA0, 0x30,
+0x02, 0x4F, 0xAB, 0x30, 0x3C, 0xAF, 0x45, 0xB0, 0x3D, 0x9F, 0x28, 0xA0, 0x48, 0x41, 0xA0, 0x30,
0x49, 0x0B, 0x47, 0xA0, 0x49, 0xE4, 0xDD, 0x30, 0x4A, 0xEC, 0x7B, 0x20, 0x00, 0x01, 0x02, 0x01,
0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x3E, 0xDC, 0x00, 0x00, 0x00, 0x00,
0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08,
0x00, 0x00, 0x54, 0x60, 0x01, 0x0D, 0x00, 0x00, 0x46, 0x50, 0x00, 0x12, 0x4C, 0x4D, 0x54, 0x00,
0x49, 0x53, 0x54, 0x00, 0x4B, 0x41, 0x52, 0x54, 0x00, 0x50, 0x4B, 0x53, 0x54, 0x00, 0x50, 0x4B,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7E, 0xFC, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x95,
-0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x12, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA8,
-0xE0, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0xAB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF,
-0x45, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x9F, 0x28, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41,
-0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0B, 0x47, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xE4,
-0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEC, 0x7B, 0x20, 0x00, 0x01, 0x02, 0x01, 0x03, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x3E, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x58,
-0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x00, 0x00,
-0x54, 0x60, 0x01, 0x0D, 0x00, 0x00, 0x46, 0x50, 0x00, 0x12, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53,
-0x54, 0x00, 0x4B, 0x41, 0x52, 0x54, 0x00, 0x50, 0x4B, 0x53, 0x54, 0x00, 0x50, 0x4B, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x4B, 0x54,
-0x2D, 0x35, 0x0A, 0x00, 0xAF, 0x45, 0xCA, 0x01, 0x78, 0xF7, 0xE8, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7E, 0xFC, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x12, 0x98, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA8, 0xE0, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0xAB, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x9F, 0x28, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x41, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0B, 0x47, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xE4, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEC, 0x7B, 0x20, 0x00, 0x01, 0x02, 0x01,
+0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x3E, 0xDC, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08,
+0x00, 0x00, 0x54, 0x60, 0x01, 0x0D, 0x00, 0x00, 0x46, 0x50, 0x00, 0x12, 0x4C, 0x4D, 0x54, 0x00,
+0x49, 0x53, 0x54, 0x00, 0x4B, 0x41, 0x52, 0x54, 0x00, 0x50, 0x4B, 0x53, 0x54, 0x00, 0x50, 0x4B,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50,
+0x4B, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xAF, 0x45, 0xCA, 0x01, 0x78, 0xF7, 0xE8, 0x00, 0x00, 0x00, 0x00,
/* Asia/Kashgar */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xB0, 0xFE, 0xBA, 0x64, 0x00, 0x01, 0x00, 0x00, 0x52, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xFE, 0xBA, 0x64, 0x00, 0x01, 0x00, 0x00, 0x52, 0x1C,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x58, 0x4A, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xFE, 0xBA, 0x64, 0x00, 0x01, 0x00, 0x00,
+0x52, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x58, 0x4A, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Kathmandu */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20442,16 +21290,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xF2, 0x7D, 0x84, 0x1E, 0x18, 0x30, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x4F, 0xFC, 0x00,
0x00, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x49, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x7D, 0x84, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x18, 0x30, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x4F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x58,
-0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x50, 0x54, 0x2D, 0x35,
-0x3A, 0x34, 0x35, 0x0A, 0x00, 0xB3, 0x9F, 0x12, 0x01, 0x94, 0xD7, 0x52, 0x00, 0x00, 0x00, 0x00,
-
+0x00, 0x49, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x7D, 0x84, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x18, 0x30, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x4F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x4D,
+0x58, 0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x50, 0x54, 0x2D,
+0x35, 0x3A, 0x34, 0x35, 0x0A,
+#endif
+0x00, 0xB3, 0x9F, 0x12, 0x01, 0x94, 0xD7, 0x52, 0x00, 0x00, 0x00, 0x00,
/* Asia/Katmandu */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20459,16 +21309,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xF2, 0x7D, 0x84, 0x1E, 0x18, 0x30, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x4F, 0xFC, 0x00,
0x00, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x49, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x7D, 0x84, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x18, 0x30, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x4F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x58,
-0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x50, 0x54, 0x2D, 0x35,
-0x3A, 0x34, 0x35, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
+0x00, 0x49, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x7D, 0x84, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x18, 0x30, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x4F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x4D,
+0x58, 0x00, 0x04, 0x00, 0x00, 0x50, 0xDC, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x4E, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x50, 0x54, 0x2D,
+0x35, 0x3A, 0x34, 0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Khandyga */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20503,60 +21355,63 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B,
0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00,
-0x00, 0x0E, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0xDB, 0xE4, 0xEB, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xC5, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x87, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x08, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xBB, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xE9, 0xBA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xEE, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xB6, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xC3, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x29, 0x78, 0x6B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x7B, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x2A, 0xC4, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2C, 0xA4, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2E, 0x84, 0x5B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x30, 0x64, 0x3D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x68, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x32, 0x72, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x52, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x0E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1B, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xF0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x39, 0xFB, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xD2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3B, 0xDA, 0xE8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xEF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3D, 0xBA, 0xCA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xD1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3F, 0x9A, 0xAC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF2, 0xE4, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x42, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0x49, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x24, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0x2B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x41, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8E, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x6E, 0x02, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x4B, 0xC9, 0x00, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04,
-0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x0A, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x0B, 0x0C, 0x04, 0x00, 0x00, 0x7F, 0x15, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90,
-0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00,
-0x7E, 0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0F,
-0x00, 0x00, 0x8C, 0xA0, 0x00, 0x15, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x15, 0x00, 0x00, 0x9A, 0xB0,
-0x00, 0x15, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x56, 0x4C, 0x41,
-0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x59, 0x41, 0x4B, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0xE8, 0xEF, 0x66,
-0x01, 0xE1, 0x7F, 0x3C, 0x00, 0x00, 0x00, 0x21, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30,
-0x36, 0x20, 0x2D, 0x20, 0x54, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x73, 0x6B, 0x79, 0x2C, 0x20, 0x55,
-0x73, 0x74, 0x2D, 0x4D, 0x61, 0x79, 0x73, 0x6B, 0x79,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xE4, 0xEB, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xBB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xBA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xB6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x6B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x7B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x5B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x3D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x68, 0x90, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x0E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xF0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xEF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xCA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xD1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xAC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0xF2, 0xE4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x49, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x24, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x2B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x6E, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xC9, 0x00, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x0A, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x0B, 0x0C, 0x04,
+0x00, 0x00, 0x7F, 0x15, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
+0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
+0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04,
+0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0F, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x15, 0x00, 0x00, 0x8C, 0xA0,
+0x00, 0x15, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x15, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B,
+0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x59, 0x41, 0x4B, 0x54, 0x2D,
+0x39, 0x0A,
+#endif
+0x00, 0xE8, 0xEF, 0x66, 0x01, 0xE1, 0x7F, 0x3C, 0x00, 0x00, 0x00, 0x1E, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x36, 0x20, 0x2D, 0x20, 0x54, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x73, 0x6B, 0x79, 0x2C, 0x20,
+0x55, 0x73, 0x74, 0x2D, 0x4D, 0x61, 0x79, 0x73, 0x6B, 0x79,
/* Asia/Kolkata */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20566,18 +21421,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x03, 0x04, 0x03, 0x00, 0x00, 0x52, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00,
0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x5B,
0x68, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00,
-0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x91, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB,
-0x86, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x95,
-0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x12, 0x98, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03,
-0x00, 0x00, 0x52, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68,
-0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x0D, 0x4C, 0x4D,
-0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D, 0x35, 0x3A,
-0x33, 0x30, 0x0A, 0x00, 0xAB, 0xB6, 0x55, 0x01, 0x99, 0x7E, 0xBA, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x91, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xDB, 0x86, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x05, 0x71, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x32, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x12, 0x98, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x03, 0x00, 0x00, 0x52, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x04, 0x00, 0x00,
+0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x0D, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x0D,
+0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D,
+0x35, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0xAB, 0xB6, 0x55, 0x01, 0x99, 0x7E, 0xBA, 0x00, 0x00, 0x00, 0x00,
/* Asia/Krasnoyarsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20609,56 +21467,59 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80,
0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x54,
0x00, 0x4B, 0x52, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF9, 0x0D, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xE1,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xA4,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xD7,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x0B,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x68,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x4A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x2C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x0E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xF0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xD2,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xEF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xDF,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xA4,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x86,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x77, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x68,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x59, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x84,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x5F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x66,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x48,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x23, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x2A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x0C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x22, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xEE,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x0B,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xED,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xCF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xE4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xB1,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x93,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xA8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x75,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x91,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x73,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x55,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x6B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x37,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xE5, 0x20, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00, 0x57, 0x0E, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62,
-0x70, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00,
-0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00,
-0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x4B, 0x52, 0x41, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x4B, 0x52, 0x41, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0xDE, 0xCD, 0xC2, 0x01, 0xA0,
-0x4F, 0x85, 0x00, 0x00, 0x00, 0x19, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x34, 0x20,
-0x2D, 0x20, 0x59, 0x65, 0x6E, 0x69, 0x73, 0x65, 0x69, 0x20, 0x52, 0x69, 0x76, 0x65, 0x72,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF9, 0x0D, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xD7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xD2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xDF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x77, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x59, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x5F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x23, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x0C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x22, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xEE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xE4, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xB1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xA8, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x75, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x6B, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x37, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xE5, 0x20, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00,
+0x57, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09,
+0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80,
+0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x52, 0x41, 0x54, 0x2D, 0x37, 0x0A,
+#endif
+0x00, 0xDE, 0xCD, 0xC2, 0x01, 0xA0, 0x4F, 0x85, 0x00, 0x00, 0x00, 0x19, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x34, 0x20, 0x2D, 0x20, 0x4B, 0x72, 0x61, 0x73, 0x6E, 0x6F, 0x79, 0x61, 0x72, 0x73, 0x6B,
+0x20, 0x61, 0x72, 0x65, 0x61,
/* Asia/Kuala_Lumpur */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20671,23 +21532,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x08, 0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x13, 0x00, 0x00,
0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54,
0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4D, 0x59, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x55, 0xAA, 0xFF, 0xFF, 0xFF, 0xFF, 0x86,
-0x83, 0x85, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x4E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
-0x0A, 0xE4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xB3, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x91, 0x5F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x91, 0xF5, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x07, 0x00, 0x00, 0x5F, 0x56,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00, 0x00,
-0x67, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x67, 0x20, 0x00, 0x08, 0x00, 0x00, 0x69, 0x78, 0x00, 0x08,
-0x00, 0x00, 0x7E, 0x90, 0x00, 0x13, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00,
-0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00, 0x4A,
-0x53, 0x54, 0x00, 0x4D, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x59, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x8E,
-0x29, 0x3A, 0x01, 0xAD, 0xD7, 0x10, 0x00, 0x00, 0x00, 0x13, 0x70, 0x65, 0x6E, 0x69, 0x6E, 0x73,
-0x75, 0x6C, 0x61, 0x72, 0x20, 0x4D, 0x61, 0x6C, 0x61, 0x79, 0x73, 0x69, 0x61,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x55, 0xAA, 0xFF, 0xFF, 0xFF, 0xFF,
+0x86, 0x83, 0x85, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x4E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x0A, 0xE4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xB3, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x91, 0x5F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x91, 0xF5, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05, 0x07, 0x00, 0x00, 0x5F,
+0x56, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00,
+0x00, 0x67, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x67, 0x20, 0x00, 0x08, 0x00, 0x00, 0x69, 0x78, 0x00,
+0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x13, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54,
+0x00, 0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00,
+0x4A, 0x53, 0x54, 0x00, 0x4D, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x59, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x8E, 0x29, 0x3A, 0x01, 0xAD, 0xD7, 0x10, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x61, 0x6C, 0x61,
+0x79, 0x73, 0x69, 0x61, 0x20, 0x28, 0x70, 0x65, 0x6E, 0x69, 0x6E, 0x73, 0x75, 0x6C, 0x61, 0x29,
+
/* Asia/Kuching */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20703,42 +21567,46 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x10, 0x00, 0x00,
0x70, 0x80, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4F, 0x52, 0x54, 0x00, 0x42, 0x4F, 0x52,
0x54, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4D, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAD, 0x8A, 0x06, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x47, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBF, 0x7B, 0x27, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xF3, 0x1B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC1, 0x5D, 0xAC, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0xD5, 0xA0, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC3, 0x3E, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xB6, 0xD3, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC5, 0x20, 0x13, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x98, 0x07, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC7, 0x01, 0x47, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x79, 0x3A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0xE3, 0xCC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x5B, 0xBF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0xC4, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x3C, 0xF3, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0x91, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x91, 0xEE, 0x00, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x05, 0x00, 0x00, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x69, 0x78, 0x00, 0x04, 0x00, 0x00, 0x75, 0x30, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04,
-0x00, 0x00, 0x7E, 0x90, 0x00, 0x10, 0x00, 0x00, 0x70, 0x80, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x4F, 0x52, 0x54, 0x00, 0x42, 0x4F, 0x52, 0x54, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00,
-0x4D, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x4D, 0x59, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x8B, 0xB1, 0xB8, 0x01, 0xBB, 0x03, 0x75, 0x00,
-0x00, 0x00, 0x0F, 0x53, 0x61, 0x62, 0x61, 0x68, 0x20, 0x26, 0x20, 0x53, 0x61, 0x72, 0x61, 0x77,
-0x61, 0x6B,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0x8A, 0x06, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0x67, 0x47, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x7B, 0x27, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0xF3, 0x1B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x5D, 0xAC, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0xD5, 0xA0, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x3E, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0xB6, 0xD3, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x20, 0x13, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x98, 0x07, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x01, 0x47, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x79, 0x3A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xE3, 0xCC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x5B, 0xBF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC4, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x3C, 0xF3, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x91, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x48, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x91, 0xEE, 0x00, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x05,
+0x00, 0x00, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x78, 0x00, 0x04, 0x00, 0x00, 0x75, 0x30,
+0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x10, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4F, 0x52, 0x54, 0x00, 0x42, 0x4F, 0x52,
+0x54, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4D, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x59, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x8B, 0xB1, 0xB8, 0x01, 0xBB, 0x03, 0x75, 0x00, 0x00, 0x00, 0x0E, 0x53, 0x61, 0x62, 0x61,
+0x68, 0x2C, 0x20, 0x53, 0x61, 0x72, 0x61, 0x77, 0x61, 0x6B,
/* Asia/Kuwait */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x2B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x2B, 0xCC,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0xB6, 0x16, 0x95, 0x01,
-0x5B, 0xDF, 0xFD, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00,
+0x2B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xB6, 0x16, 0x95, 0x01, 0x5B, 0xDF, 0xFD, 0x00, 0x00, 0x00, 0x00,
/* Asia/Macao */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20760,38 +21628,41 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x03, 0x00, 0x00, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
0x4F, 0x53, 0x54, 0x00, 0x4D, 0x4F, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x24, 0x04,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x37, 0x64, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0x63, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x27, 0xA4, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8,
-0x00, 0x00, 0x00, 0x00, 0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x4D, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0x98, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x2D, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xB4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x16, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0xB6, 0x8B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xA6, 0x6E, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x96, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x1E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x76, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x3B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x5F, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x4F, 0x1D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x5D, 0x01, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x00, 0x00, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
-0x4F, 0x53, 0x54, 0x00, 0x4D, 0x4F, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x24, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x37, 0x64, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0x63, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x27, 0xA4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x4D, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x2D, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x16, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xB6, 0x8B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xA6, 0x6E, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x96, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x1E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x76, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x5F, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x4F, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x5D, 0x01, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00,
+0x00, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00,
+0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4F, 0x53, 0x54, 0x00,
+0x4D, 0x4F, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Macau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20813,38 +21684,41 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x03, 0x00, 0x00, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
0x4F, 0x53, 0x54, 0x00, 0x4D, 0x4F, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x24, 0x04,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x37, 0x64, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0x63, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x27, 0xA4, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8,
-0x00, 0x00, 0x00, 0x00, 0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x4D, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0x98, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x2D, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xB4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x16, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0xB6, 0x8B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xA6, 0x6E, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x96, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x1E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x76, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x3B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x5F, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x4F, 0x1D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x5D, 0x01, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x00, 0x00, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
-0x4F, 0x53, 0x54, 0x00, 0x4D, 0x4F, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0xAB, 0x41, 0x25, 0x01,
-0xBF, 0xF8, 0xFD, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x24, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x37, 0x64, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0x63, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x27, 0xA4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x4D, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3D, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x2D, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x16, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xB6, 0x8B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xA6, 0x6E, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x96, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0x1E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x76, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x5F, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x4F, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x5D, 0x01, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00,
+0x00, 0x6A, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00,
+0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4F, 0x53, 0x54, 0x00,
+0x4D, 0x4F, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0xAB, 0x41, 0x25, 0x01, 0xBF, 0xF8, 0xFD, 0x00, 0x00, 0x00, 0x00,
/* Asia/Magadan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20876,58 +21750,58 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x54,
0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x36, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xA8,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x37, 0x50, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x6B,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0x9F,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xD2,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x30,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x12,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B, 0xF4,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xD6,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xB8,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0x9A,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xB6,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xA7,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x5F,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x6B,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x4D,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x2F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x10,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFC, 0xF2,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xD4,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xB6,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xD2,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xB4,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0x96,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x78,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x5A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x3C,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x59,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x3B,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x16, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x1D,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8D, 0xFF,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xAC, 0xE0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x07, 0x00, 0x00, 0x8D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00,
-0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00,
-0x04, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x4D, 0x41, 0x47, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x4D, 0x41, 0x47, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0xE4, 0x38, 0x7A, 0x01,
-0xF8, 0xC2, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x38,
-0x20, 0x28, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x37, 0x20, 0x61, 0x66, 0x74, 0x65,
-0x72, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2D, 0x31, 0x30, 0x2D, 0x32, 0x36, 0x29, 0x20, 0x2D, 0x20,
-0x4D, 0x61, 0x67, 0x61, 0x64, 0x61, 0x6E,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x36, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x37, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x6B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xD2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x16, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8D, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xAC, 0xE0, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x07, 0x00, 0x00,
+0x8D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09,
+0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
+0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00,
+0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x41, 0x47, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0xE4, 0x38, 0x7A, 0x01, 0xF8, 0xC2, 0xC0, 0x00, 0x00, 0x00, 0x10, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x37, 0x20, 0x2D, 0x20, 0x4D, 0x61, 0x67, 0x61, 0x64, 0x61, 0x6E,
/* Asia/Makassar */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20937,22 +21811,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0xF0, 0x00,
0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54, 0x41, 0x00,
-0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x5D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16,
-0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0x1D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x56,
-0xEE, 0x70, 0x00, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0xF0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54,
-0x41, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x57, 0x49, 0x54, 0x41, 0x2D, 0x38, 0x0A, 0x00, 0x81, 0x85, 0x8D, 0x01, 0xC8, 0xD9, 0x1F,
-0x00, 0x00, 0x00, 0x48, 0x65, 0x61, 0x73, 0x74, 0x20, 0x26, 0x20, 0x73, 0x6F, 0x75, 0x74, 0x68,
-0x20, 0x42, 0x6F, 0x72, 0x6E, 0x65, 0x6F, 0x2C, 0x20, 0x53, 0x75, 0x6C, 0x61, 0x77, 0x65, 0x73,
-0x69, 0x20, 0x28, 0x43, 0x65, 0x6C, 0x65, 0x62, 0x65, 0x73, 0x29, 0x2C, 0x20, 0x42, 0x61, 0x6C,
-0x69, 0x2C, 0x20, 0x4E, 0x75, 0x73, 0x61, 0x20, 0x54, 0x65, 0x6E, 0x67, 0x61, 0x72, 0x72, 0x61,
-0x2C, 0x20, 0x77, 0x65, 0x73, 0x74, 0x20, 0x54, 0x69, 0x6D, 0x6F, 0x72,
+0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x5D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0x16, 0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0x1D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x56, 0xEE, 0x70, 0x00, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00,
+0x00, 0x6F, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00,
+0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x57,
+0x49, 0x54, 0x41, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x57, 0x49, 0x54, 0x41, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x81, 0x85, 0x8D, 0x01, 0xC8, 0xD9, 0x1F, 0x00, 0x00, 0x00, 0x49, 0x42, 0x6F, 0x72, 0x6E,
+0x65, 0x6F, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x2C, 0x20, 0x73, 0x6F, 0x75, 0x74, 0x68, 0x29,
+0x3B, 0x20, 0x53, 0x75, 0x6C, 0x61, 0x77, 0x65, 0x73, 0x69, 0x2F, 0x43, 0x65, 0x6C, 0x65, 0x62,
+0x65, 0x73, 0x2C, 0x20, 0x42, 0x61, 0x6C, 0x69, 0x2C, 0x20, 0x4E, 0x75, 0x73, 0x61, 0x20, 0x54,
+0x65, 0x6E, 0x67, 0x61, 0x72, 0x72, 0x61, 0x3B, 0x20, 0x54, 0x69, 0x6D, 0x6F, 0x72, 0x20, 0x28,
+0x77, 0x65, 0x73, 0x74, 0x29,
/* Asia/Manila */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -20964,35 +21841,40 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00,
0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x48, 0x53, 0x54, 0x00,
0x50, 0x48, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0x7B, 0x1F, 0x3F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC2, 0x16, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xE7, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD0, 0xA9, 0x25, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0xD5, 0xA2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x75, 0x46, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x66, 0x7A, 0xF0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02,
-0x03, 0xFF, 0xFF, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x48, 0x53, 0x54, 0x00, 0x50, 0x48,
-0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x50, 0x48, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x9F, 0x94, 0xDD, 0x01, 0xCB, 0x4A,
-0x20, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xDC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7B, 0x1F, 0x3F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x9C, 0xF4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x16, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xE7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA9, 0x25, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6C, 0x39, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0xD5, 0xA2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x75, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x66, 0x7A, 0xF0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF,
+0xFF, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01,
+0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70,
+0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x48, 0x53, 0x54, 0x00, 0x50, 0x48, 0x54, 0x00,
+0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x50, 0x48, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x9F, 0x94, 0xDD, 0x01, 0xCB, 0x4A, 0x20, 0x00, 0x00, 0x00, 0x00,
/* Asia/Muscat */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4F, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xF2, 0x99, 0xA8, 0x00, 0x01, 0x00, 0x00, 0x33, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x99, 0xA8, 0x00, 0x01, 0x00, 0x00, 0x33, 0xD8,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x53, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0xAD, 0x57, 0x00, 0x01,
-0x6C, 0x0C, 0x9D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x99, 0xA8, 0x00, 0x01, 0x00, 0x00,
+0x33, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x53, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xAD, 0x57, 0x00, 0x01, 0x6C, 0x0C, 0x9D, 0x00, 0x00, 0x00, 0x00,
/* Asia/Nicosia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21041,86 +21923,89 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00,
0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45,
0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x77, 0x1E, 0xB8, 0x00, 0x00, 0x00,
-0x00, 0x09, 0xED, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0x92, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0xFA, 0x64, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBE, 0xC6, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xE1, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x75, 0x4F, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x63, 0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xE0, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x13, 0x4D, 0x19, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xC2, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x23, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xA4, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x03, 0xA3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0x86, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xE3, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x68, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xC3, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x1F,
-0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45,
-0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x77, 0x1E, 0xB8, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xED, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xFA, 0x64, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBE, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xE1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x75, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x63, 0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x19, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xA4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xA3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0x86, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x1F, 0x48,
+0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45,
+0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
+0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
0x00, 0xBE, 0xFD, 0x3A, 0x01, 0x45, 0x92, 0x5A, 0x00, 0x00, 0x00, 0x00,
/* Asia/Novokuznetsk */
@@ -21154,58 +22039,59 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x15, 0x00, 0x00, 0x62, 0x70, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x54,
0x00, 0x4B, 0x52, 0x41, 0x53, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x53, 0x54, 0x00, 0x4E, 0x4F, 0x56,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B,
-0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B,
-0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAA, 0x18, 0x20, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x27, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x08, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xD7, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xD2, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xDF, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x78, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xA4, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0x84, 0x77, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x64, 0x59, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x72, 0x5F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x52, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0x23, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1B, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x0C, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0x22, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xEE, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDB, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBA, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9A, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x83, 0xE4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xB1, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x63, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x43, 0xA8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x75, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x23, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x03, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xE3, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x45, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x4B, 0xF3, 0x30, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x18, 0x20, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xD7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xD2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xDF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x77, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x59, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x5F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x23, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x2A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x0C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x22, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xEE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xE4, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xB1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x93, 0x30, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xA8, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x75, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x45, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xF3, 0x30, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x08, 0x09, 0x0A, 0x04, 0x00, 0x00, 0x51, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00,
-0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09,
-0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x0F, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x15, 0x00, 0x00, 0x62, 0x70, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x54,
-0x00, 0x4B, 0x52, 0x41, 0x53, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x53, 0x54, 0x00, 0x4E, 0x4F, 0x56,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x52, 0x41, 0x54, 0x2D, 0x37, 0x0A,
-0x00, 0xDB, 0x58, 0x58, 0x01, 0x97, 0x96, 0x72, 0x00, 0x00, 0x00, 0x31, 0x4D, 0x6F, 0x73, 0x63,
-0x6F, 0x77, 0x2B, 0x30, 0x33, 0x20, 0x28, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x34,
-0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2D, 0x31, 0x30, 0x2D, 0x32,
-0x36, 0x29, 0x20, 0x2D, 0x20, 0x4B, 0x65, 0x6D, 0x65, 0x72, 0x6F, 0x76, 0x6F,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x09, 0x0A, 0x04, 0x00, 0x00,
+0x51, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09,
+0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80,
+0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00,
+0x62, 0x70, 0x01, 0x0F, 0x00, 0x00, 0x54, 0x60, 0x00, 0x15, 0x00, 0x00, 0x62, 0x70, 0x00, 0x15,
+0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x54, 0x00, 0x4B, 0x52, 0x41, 0x53, 0x54, 0x00, 0x4E,
+0x4F, 0x56, 0x53, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x4B, 0x52, 0x41, 0x54, 0x2D, 0x37, 0x0A,
+#endif
+0x00, 0xDB, 0x58, 0x58, 0x01, 0x97, 0x96, 0x72, 0x00, 0x00, 0x00, 0x11, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x34, 0x20, 0x2D, 0x20, 0x4B, 0x65, 0x6D, 0x65, 0x72, 0x6F, 0x76, 0x6F,
/* Asia/Novosibirsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21237,55 +22123,59 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01,
0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x53, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0x19, 0x24, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0xA3, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x6F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x16, 0x18, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xA3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0xF9, 0xD7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1B, 0xBC, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x1D, 0x9C, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x1F, 0x7C, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x21, 0x5C, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x23, 0x3B, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x25, 0x1B, 0xD2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x04, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00,
-0x00, 0x00, 0x28, 0xE4, 0xDF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x87, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xFE, 0x4E, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x94, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x76, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xDD, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xBF, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x43, 0x63, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xA1, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x45, 0x43, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x83, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x23, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x9F, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x49, 0x03, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x81, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0xE3, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x63, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x45, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x4B, 0xF3, 0x30, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04,
-0x02, 0x03, 0x05, 0x08, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0x19, 0x24, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xD7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xD6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x59, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x3B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x1D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xE1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xD2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xC3, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xE0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xDF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xA4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xFE, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xA1, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x83, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x81, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x45, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4B, 0xF3, 0x30, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03,
+0x05, 0x08, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x4D, 0xBC, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00,
-0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62,
-0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x4E, 0x4F, 0x56, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xDD, 0x4D, 0xA5, 0x01, 0x91, 0x2D, 0xD2,
-0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x33, 0x20, 0x2D, 0x20,
-0x4E, 0x6F, 0x76, 0x6F, 0x73, 0x69, 0x62, 0x69, 0x72, 0x73, 0x6B,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x00, 0x00, 0x4D, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x54,
+0x60, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00,
+0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x01, 0x09, 0x00, 0x00, 0x62, 0x70, 0x01,
+0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x4C, 0x4D, 0x54,
+0x00, 0x4E, 0x4F, 0x56, 0x54, 0x00, 0x4E, 0x4F, 0x56, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E,
+0x4F, 0x56, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xDD, 0x4D, 0xA5, 0x01, 0x91, 0x2D, 0xD2, 0x00, 0x00, 0x00, 0x1B, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x33, 0x20, 0x2D, 0x20, 0x4E, 0x6F, 0x76, 0x6F, 0x73, 0x69, 0x62, 0x69, 0x72, 0x73, 0x6B,
+0x2C, 0x20, 0x54, 0x6F, 0x6D, 0x73, 0x6B,
/* Asia/Omsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21317,56 +22207,58 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70,
0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4F, 0x4D, 0x53, 0x54,
0x00, 0x4F, 0x4D, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xB3, 0x40, 0xB6, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xEF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xB2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xE5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x19,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x76,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x58,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x3A,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x1C,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xFE,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xE0,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xFD,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x95, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xB2,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x94,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x76,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x92,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x74,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x56,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x38,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x1A,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xFC,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x19,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xFB,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xDD,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xBF,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xA1,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x83,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x9F,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x81,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x63,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x45,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xF3, 0x30, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00, 0x44, 0xCA, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54,
-0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00,
-0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00,
-0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x4F, 0x4D, 0x53, 0x54, 0x00, 0x4F, 0x4D, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x4F, 0x4D, 0x53, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xDD, 0x40, 0xA0, 0x01, 0x82,
-0xA8, 0x60, 0x00, 0x00, 0x00, 0x18, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x33, 0x20,
-0x2D, 0x20, 0x77, 0x65, 0x73, 0x74, 0x20, 0x53, 0x69, 0x62, 0x65, 0x72, 0x69, 0x61,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xB3, 0x40, 0xB6, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xB2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x95, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xBF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xD4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xA1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xB6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x83, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x81, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x63, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x79, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x45, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xF3, 0x30, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00,
+0x44, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09,
+0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70,
+0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00,
+0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x4F, 0x4D, 0x53, 0x54, 0x00, 0x4F, 0x4D, 0x53, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4F, 0x4D, 0x53, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xDD, 0x40, 0xA0, 0x01, 0x82, 0xA8, 0x60, 0x00, 0x00, 0x00, 0x0D, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x33, 0x20, 0x2D, 0x20, 0x4F, 0x6D, 0x73, 0x6B,
/* Asia/Oral */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21396,50 +22288,53 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x46, 0x50, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x52, 0x41, 0x54, 0x00, 0x55, 0x52, 0x41,
0x53, 0x54, 0x00, 0x4F, 0x52, 0x41, 0x53, 0x54, 0x00, 0x4F, 0x52, 0x41, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00,
-0x00, 0x0E, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAA, 0x19, 0x93, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xC0, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x27, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x19, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x7F, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x4B, 0xB4, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xA5, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xBF, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xA1, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x83, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x89, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x35, 0xED, 0x40, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x01, 0x0A, 0x09,
-0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x00, 0x00, 0x30, 0x24, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60,
-0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00,
-0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04,
-0x00, 0x00, 0x46, 0x50, 0x01, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x00, 0x15, 0x00, 0x00, 0x46, 0x50,
-0x01, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x00, 0x15, 0x00, 0x00, 0x46, 0x50, 0x00, 0x15, 0x4C, 0x4D,
-0x54, 0x00, 0x55, 0x52, 0x41, 0x54, 0x00, 0x55, 0x52, 0x41, 0x53, 0x54, 0x00, 0x4F, 0x52, 0x41,
-0x53, 0x54, 0x00, 0x4F, 0x52, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x4F, 0x52, 0x41, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0xD7, 0x7A, 0xC2,
-0x01, 0x61, 0x03, 0x18, 0x00, 0x00, 0x00, 0x0F, 0x57, 0x65, 0x73, 0x74, 0x20, 0x4B, 0x61, 0x7A,
-0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x93, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x4B, 0xB4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xA1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x35, 0xED, 0x40, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07,
+0x08, 0x07, 0x08, 0x01, 0x0A, 0x09, 0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D,
+0x00, 0x00, 0x30, 0x24, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50,
+0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00,
+0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09,
+0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0F, 0x00, 0x00, 0x38, 0x40,
+0x00, 0x15, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x00, 0x15, 0x00, 0x00,
+0x46, 0x50, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x52, 0x41, 0x54, 0x00, 0x55, 0x52, 0x41,
+0x53, 0x54, 0x00, 0x4F, 0x52, 0x41, 0x53, 0x54, 0x00, 0x4F, 0x52, 0x41, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4F, 0x52, 0x41, 0x54, 0x2D,
+0x35, 0x0A,
+#endif
+0x00, 0xD7, 0x7A, 0xC2, 0x01, 0x61, 0x03, 0x18, 0x00, 0x00, 0x00, 0x0F, 0x57, 0x65, 0x73, 0x74,
+0x20, 0x4B, 0x61, 0x7A, 0x61, 0x6B, 0x68, 0x73, 0x74, 0x61, 0x6E,
/* Asia/Phnom_Penh */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21447,15 +22342,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA2, 0x6A, 0x67, 0xC4, 0x01, 0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x3C,
0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00,
-0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x56, 0xB6, 0x85, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x6A, 0x67, 0xC4, 0x00, 0x01,
-0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x04, 0x00, 0x00, 0x62,
-0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0x9A, 0xF3, 0xF8,
-0x01, 0xB2, 0xBF, 0x92, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x85, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x6A, 0x67, 0xC4, 0x00, 0x01, 0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E,
+0x3C, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54,
+0x00, 0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D,
+0x37, 0x0A,
+#endif
+0x00, 0x9A, 0xF3, 0xF8, 0x01, 0xB2, 0xBF, 0x92, 0x00, 0x00, 0x00, 0x00,
/* Asia/Pontianak */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21468,43 +22366,51 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x10, 0x00, 0x00, 0x62,
0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A,
0x53, 0x54, 0x00, 0x57, 0x49, 0x54, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
-0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
-0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xFF,
-0x8E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0xDF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x79,
-0xA4, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x56, 0xEE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x3C,
-0xC6, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0xB5,
-0xBE, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0xDA, 0x74, 0x80, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04,
-0x02, 0x05, 0x06, 0x00, 0x00, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x80, 0x00, 0x04, 0x00,
-0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00,
-0x08, 0x00, 0x00, 0x70, 0x80, 0x00, 0x10, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x42, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x57, 0x49, 0x54,
-0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x57, 0x49, 0x42, 0x2D, 0x37, 0x0A, 0x00, 0x89, 0x47, 0x3A, 0x01, 0xB9, 0x7C, 0xD5, 0x00,
-0x00, 0x00, 0x15, 0x77, 0x65, 0x73, 0x74, 0x20, 0x26, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61,
-0x6C, 0x20, 0x42, 0x6F, 0x72, 0x6E, 0x65, 0x6F,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xFF, 0x8E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0x16, 0xDF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x79, 0xA4, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x56, 0xEE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x3C, 0xC6, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0xB5, 0xBE, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x21, 0xDA, 0x74, 0x80, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05, 0x06, 0x00, 0x00, 0x66,
+0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x80, 0x00, 0x04, 0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00,
+0x00, 0x7E, 0x90, 0x00, 0x0C, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x70, 0x80, 0x00,
+0x10, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57,
+0x49, 0x42, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x57, 0x49, 0x54, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x49, 0x42, 0x2D, 0x37,
+0x0A,
+#endif
+0x00, 0x89, 0x47, 0x3A, 0x01, 0xB9, 0x7C, 0xD5, 0x00, 0x00, 0x00, 0x16, 0x42, 0x6F, 0x72, 0x6E,
+0x65, 0x6F, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x2C, 0x20, 0x63, 0x65, 0x6E, 0x74, 0x72, 0x61,
+0x6C, 0x29,
/* Asia/Pyongyang */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
0x8B, 0xD7, 0xF1, 0x9C, 0x92, 0xE6, 0x16, 0xF8, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x2F, 0x61, 0x70,
-0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x75, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x77, 0x88, 0x00,
-0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E,
-0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00,
-0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xD7, 0xF1, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6,
-0x16, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x2F,
-0x61, 0x70, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x75, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x77,
-0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53,
-0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x4B, 0x53, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0xC4, 0xDD, 0x22, 0x01, 0xD2, 0x89, 0x98, 0x00,
-0x00, 0x00, 0x00,
+0x55, 0xCE, 0x02, 0x70, 0x00, 0x01, 0x02, 0x03, 0x04, 0x01, 0x00, 0x00, 0x75, 0xE4, 0x00, 0x00,
+0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x4C, 0x4D,
+0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xD7, 0xF1, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x92, 0xE6, 0x16, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x2F, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, 0x55, 0xCE, 0x02, 0x70, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x01, 0x00, 0x00, 0x75, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04,
+0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43,
+0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x4B, 0x53, 0x54, 0x2D, 0x38, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0xC4, 0xDD, 0x22, 0x01, 0xD2, 0x89, 0x98, 0x00, 0x00, 0x00, 0x00,
/* Asia/Qatar */
0x50, 0x48, 0x50, 0x32, 0x01, 0x51, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21512,15 +22418,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA1, 0xF2, 0x9D, 0x30, 0x04, 0x8A, 0x92, 0xC0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x30, 0x50, 0x00,
0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x47, 0x53, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x8A, 0x92, 0xC0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33,
-0x0A, 0x00, 0xAF, 0xE8, 0x8D, 0x01, 0x61, 0x4A, 0xB5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x47, 0x53, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x8A, 0x92, 0xC0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x30, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54,
+0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D,
+0x33, 0x0A,
+#endif
+0x00, 0xAF, 0xE8, 0x8D, 0x01, 0x61, 0x4A, 0xB5, 0x00, 0x00, 0x00, 0x00,
/* Asia/Qyzylorda */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21549,51 +22458,53 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0F, 0x00, 0x00, 0x62, 0x70, 0x01, 0x14, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0F, 0x4C, 0x4D, 0x54,
0x00, 0x4B, 0x49, 0x5A, 0x54, 0x00, 0x4B, 0x49, 0x5A, 0x53, 0x54, 0x00, 0x51, 0x59, 0x5A, 0x54,
0x00, 0x51, 0x59, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x86, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5,
-0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x4B, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x95, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD4, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x35, 0xD1, 0x20, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x02, 0x07, 0x09, 0x08, 0x09, 0x0A,
-0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
-0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x09, 0x00, 0x00, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09,
-0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60,
-0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x00, 0x00, 0x62, 0x70, 0x01, 0x14, 0x00, 0x00,
-0x54, 0x60, 0x00, 0x0F, 0x00, 0x00, 0x62, 0x70, 0x01, 0x14, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0F,
-0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x49, 0x5A, 0x54, 0x00, 0x4B, 0x49, 0x5A, 0x53, 0x54, 0x00, 0x51,
-0x59, 0x5A, 0x54, 0x00, 0x51, 0x59, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x51, 0x59, 0x5A, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xCD, 0xB0, 0x40, 0x01, 0x76,
-0x8D, 0x6A, 0x00, 0x00, 0x00, 0x20, 0x51, 0x79, 0x7A, 0x79, 0x6C, 0x6F, 0x72, 0x64, 0x61, 0x20,
-0x28, 0x4B, 0x79, 0x7A, 0x79, 0x6C, 0x6F, 0x72, 0x64, 0x61, 0x2C, 0x20, 0x4B, 0x7A, 0x79, 0x6C,
-0x2D, 0x4F, 0x72, 0x64, 0x61, 0x29,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x86, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0x8A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x4B, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x95, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x6D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x4F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x31, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x4E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x12, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xD6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xF2, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x35, 0xD1, 0x20, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x02, 0x07, 0x09, 0x08, 0x09,
+0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
+0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x09, 0x00, 0x00, 0x3D, 0x60, 0x00, 0x00, 0x00,
+0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x01,
+0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54,
+0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x00, 0x00, 0x62, 0x70, 0x01, 0x14, 0x00,
+0x00, 0x54, 0x60, 0x00, 0x0F, 0x00, 0x00, 0x62, 0x70, 0x01, 0x14, 0x00, 0x00, 0x54, 0x60, 0x00,
+0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x49, 0x5A, 0x54, 0x00, 0x4B, 0x49, 0x5A, 0x53, 0x54, 0x00,
+0x51, 0x59, 0x5A, 0x54, 0x00, 0x51, 0x59, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x51, 0x59, 0x5A, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xCD, 0xB0, 0x40, 0x01, 0x76, 0x8D, 0x6A, 0x00, 0x00, 0x00, 0x1D, 0x51, 0x79, 0x7A, 0x79,
+0x6C, 0x6F, 0x72, 0x64, 0x61, 0x2F, 0x4B, 0x79, 0x7A, 0x79, 0x6C, 0x6F, 0x72, 0x64, 0x61, 0x2F,
+0x4B, 0x7A, 0x79, 0x6C, 0x2D, 0x4F, 0x72, 0x64, 0x61,
/* Asia/Rangoon */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21603,32 +22514,36 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x5A, 0x28, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x28, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68,
0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x11, 0x4C, 0x4D,
0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4D,
-0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x89, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x73,
-0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xFC, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x9A, 0x67,
-0xF0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x5A, 0x28, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x28,
-0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00,
-0x5B, 0x68, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54,
-0x00, 0x4A, 0x53, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0x4D, 0x4D, 0x54, 0x2D, 0x36, 0x3A, 0x33, 0x30, 0x0A, 0x00, 0xA2, 0xF0,
-0x3D, 0x01, 0xA5, 0x65, 0x9A, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x89, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0xF2, 0x73, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF2, 0xFC, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x9A, 0x67, 0xF0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x5A, 0x28, 0x00, 0x00, 0x00,
+0x00, 0x5A, 0x28, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00,
+0x0D, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x42,
+0x55, 0x52, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x4D, 0x54, 0x2D, 0x36, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0xA2, 0xF0, 0x3D, 0x01, 0xA5, 0x65, 0x9A, 0x00, 0x00, 0x00, 0x00,
/* Asia/Riyadh */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x2B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x2B, 0xCC,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0xAE, 0xEA, 0xA5, 0x01,
-0x59, 0xF1, 0x32, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1B, 0x36, 0xB4, 0x00, 0x01, 0x00, 0x00,
+0x2B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xAE, 0xEA, 0xA5, 0x01, 0x59, 0xF1, 0x32, 0x00, 0x00, 0x00, 0x00,
/* Asia/Saigon */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21641,26 +22556,29 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x62, 0x70,
0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x49,
0x44, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x8C, 0x43, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0x91, 0xA3, 0x2B, 0x0A, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x35, 0xE6, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD1, 0x59, 0xCE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD5, 0x32, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0xB6, 0xE4, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xED, 0x2F, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3D, 0xC7, 0x00, 0x00,
-0x01, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x63, 0xF6, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00,
-0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x4C, 0x4D, 0x54,
-0x00, 0x50, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x4A, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49,
-0x43, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x8C, 0x43, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0xA3, 0x2B, 0x0A, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x35, 0xE6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x59, 0xCE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0x3E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x32, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0xB6, 0xE4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x2F, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3D, 0xC7, 0x00, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xF6,
+0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x0D, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x11, 0x00, 0x00, 0x62, 0x70, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4C,
+0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D,
+0x37, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Sakhalin */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
0x86, 0xF0, 0xCD, 0xB8, 0xC3, 0x55, 0x3B, 0x70, 0xD2, 0x30, 0xB2, 0xF0, 0x15, 0x27, 0x37, 0x50,
0x16, 0x18, 0x6B, 0xC0, 0x17, 0x08, 0x6A, 0xD0, 0x17, 0xF9, 0x9F, 0x40, 0x18, 0xE9, 0x9E, 0x50,
0x19, 0xDA, 0xD2, 0xC0, 0x1A, 0xCC, 0x23, 0x50, 0x1B, 0xBC, 0x30, 0x70, 0x1C, 0xAC, 0x21, 0x70,
@@ -21677,67 +22595,72 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x42, 0x45, 0x87, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x44, 0x25, 0x69, 0x00, 0x45, 0x43, 0x7E, 0x80,
0x46, 0x05, 0x4B, 0x00, 0x47, 0x23, 0x60, 0x80, 0x47, 0xEE, 0x67, 0x80, 0x49, 0x03, 0x42, 0x80,
0x49, 0xCE, 0x49, 0x80, 0x4A, 0xE3, 0x24, 0x80, 0x4B, 0xAE, 0x2B, 0x80, 0x4C, 0xCC, 0x41, 0x00,
-0x4D, 0x8E, 0x0D, 0x80, 0x54, 0x4B, 0xBA, 0xF0, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x07, 0x08, 0x05, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x05, 0x08, 0x00, 0x00, 0x85, 0xC8, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0xA8,
-0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x00,
-0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0D, 0x00, 0x00, 0x8C, 0xA0, 0x00,
-0x13, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53, 0x41,
-0x4B, 0x53, 0x54, 0x00, 0x53, 0x41, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x86, 0xF0, 0xCD, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x30, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x37, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x18, 0x6B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x17, 0xF9, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x19, 0xDA, 0xD2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD4, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x42, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0x49, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x24, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0x2B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x41, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xBA, 0xF0, 0x00,
-0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x05, 0x08, 0x00, 0x00, 0x85, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
-0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13,
-0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0,
-0x01, 0x0D, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x13, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54,
-0x00, 0x4A, 0x53, 0x54, 0x00, 0x53, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x53, 0x41, 0x4B, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x53, 0x41, 0x4B, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0xD0, 0xFE, 0x9A, 0x01,
-0xEC, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x1B, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x37,
-0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, 0x6C, 0x69, 0x6E, 0x20, 0x49, 0x73, 0x6C, 0x61,
-0x6E, 0x64,
+0x4D, 0x8E, 0x0D, 0x80, 0x54, 0x4B, 0xBA, 0xF0, 0x56, 0xF6, 0xB2, 0x00, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x05, 0x08, 0x05,
+0x00, 0x00, 0x85, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x00, 0x00,
+0x9A, 0xB0, 0x00, 0x13, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0D,
+0x00, 0x00, 0x8C, 0xA0, 0x00, 0x13, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x4C, 0x4D, 0x54, 0x00,
+0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x53,
+0x41, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xF0, 0xCD, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x30, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0x37, 0x50, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x6B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xD2, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFA, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x49, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x24, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x2B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4B, 0xBA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF6, 0xB2, 0x00, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x05, 0x08, 0x05,
+0x00, 0x00, 0x85, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90,
+0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x00, 0x00,
+0x9A, 0xB0, 0x00, 0x13, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0D,
+0x00, 0x00, 0x8C, 0xA0, 0x00, 0x13, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x13, 0x4C, 0x4D, 0x54, 0x00,
+0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x53,
+0x41, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x4B, 0x54, 0x2D, 0x31, 0x31,
+0x0A,
+#endif
+0x00, 0xD0, 0xFE, 0x9A, 0x01, 0xEC, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x18, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, 0x6C, 0x69, 0x6E, 0x20, 0x49, 0x73,
+0x6C, 0x61, 0x6E, 0x64,
/* Asia/Samarkand */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21758,6 +22681,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x54, 0x41,
0x53, 0x54, 0x00, 0x55, 0x5A, 0x54, 0x00, 0x55, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1D, 0xF8, 0x00, 0x00, 0x00,
@@ -21783,8 +22707,10 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x41, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x54, 0x41, 0x53, 0x54, 0x00, 0x55,
0x5A, 0x54, 0x00, 0x55, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x5A, 0x54,
-0x2D, 0x35, 0x0A, 0x00, 0xC5, 0xDB, 0x0A, 0x01, 0x78, 0x96, 0x40, 0x00, 0x00, 0x00, 0x0F, 0x77,
-0x65, 0x73, 0x74, 0x20, 0x55, 0x7A, 0x62, 0x65, 0x6B, 0x69, 0x73, 0x74, 0x61, 0x6E,
+0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xC5, 0xDB, 0x0A, 0x01, 0x78, 0x96, 0x40, 0x00, 0x00, 0x00, 0x11, 0x55, 0x7A, 0x62, 0x65,
+0x6B, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x77, 0x65, 0x73, 0x74, 0x29,
/* Asia/Seoul */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21801,29 +22727,31 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85,
0x98, 0x01, 0x11, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54,
0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xD7, 0xF0, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x16, 0xF8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x43, 0x27, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x4F, 0x29, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x6B, 0xB7, 0xF8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x13, 0x18, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x62, 0x03, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0x4C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x2F, 0x70, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE7, 0xF4, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0F, 0x52, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xC7, 0xD6, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEF, 0x34, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA7, 0xB8, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x16, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x87, 0x9A, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x35, 0x71, 0x78,
-0x00, 0x00, 0x00, 0x00, 0x20, 0xA3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6E, 0x67, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x83, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0x49, 0x90,
-0x00, 0x01, 0x02, 0x03, 0x04, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01,
-0x05, 0x01, 0x04, 0x06, 0x04, 0x06, 0x04, 0x00, 0x00, 0x77, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77,
-0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x01, 0x11, 0x00, 0x00, 0x8C, 0xA0, 0x01,
-0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53,
-0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x53, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0xC2, 0xA0, 0x38, 0x01,
-0xD4, 0x64, 0xDA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xD7, 0xF0, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0x92, 0xE6, 0x16, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x43, 0x27, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x4F, 0x29, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x6B, 0xB7, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x13, 0x18, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x62, 0x03, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0x4C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x2F, 0x70, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE7, 0xF4, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0F, 0x52, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xC7, 0xD6, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEF, 0x34, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA7, 0xB8, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x16, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x87, 0x9A, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x35, 0x71, 0x78, 0x00, 0x00, 0x00, 0x00, 0x20, 0xA3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x6E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x83, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x4E, 0x49, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01,
+0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x04, 0x06, 0x04, 0x06, 0x04, 0x00, 0x00, 0x77, 0x08, 0x00,
+0x00, 0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E,
+0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x01, 0x11, 0x00,
+0x00, 0x8C, 0xA0, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53,
+0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x53, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0xC2, 0xA0, 0x38, 0x01, 0xD4, 0x64, 0xDA, 0x00, 0x00, 0x00, 0x00,
/* Asia/Shanghai */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21836,24 +22764,27 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43,
-0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23,
-0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0xB8,
-0xFC, 0xC5, 0x01, 0xCC, 0x00, 0x6A, 0x00, 0x00, 0x00, 0x0C, 0x42, 0x65, 0x69, 0x6A, 0x69, 0x6E,
-0x67, 0x20, 0x54, 0x69, 0x6D, 0x65,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00,
+0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0xB8, 0xFC, 0xC5, 0x01, 0xCC, 0x00, 0x6A, 0x00, 0x00, 0x00, 0x0C, 0x42, 0x65, 0x69, 0x6A,
+0x69, 0x6E, 0x67, 0x20, 0x54, 0x69, 0x6D, 0x65,
/* Asia/Singapore */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21867,23 +22798,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x90, 0x00, 0x13, 0x00, 0x00, 0x69, 0x78, 0x00, 0x17, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C,
0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53,
0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x53, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0x83, 0x85, 0xA3,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x4E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x0A, 0xE4, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xB3, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x91, 0x5F, 0x08,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xBA, 0x4D, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x91, 0xF5, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05,
-0x07, 0x08, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x04, 0x00, 0x00,
-0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x67, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x67, 0x20, 0x00, 0x08,
-0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x13, 0x00, 0x00, 0x69, 0x78,
-0x00, 0x17, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00,
-0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53,
-0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x47, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x8B, 0x49, 0x8D,
-0x01, 0xB1, 0x1E, 0xE8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x53, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF,
+0x86, 0x83, 0x85, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x4E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x0A, 0xE4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xB3, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x91, 0x5F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0xBA, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x16, 0x91, 0xF5, 0x08, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x05, 0x06, 0x05, 0x07, 0x08, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5D,
+0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x67, 0x20, 0x01, 0x0D, 0x00, 0x00,
+0x67, 0x20, 0x00, 0x08, 0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x13,
+0x00, 0x00, 0x69, 0x78, 0x00, 0x17, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00,
+0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00, 0x4A,
+0x53, 0x54, 0x00, 0x53, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x47, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x8B, 0x49, 0x8D, 0x01, 0xB1, 0x1E, 0xE8, 0x00, 0x00, 0x00, 0x00,
/* Asia/Srednekolymsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21916,57 +22849,60 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0F, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x54,
0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x53, 0x52, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x33, 0xE4, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0xA3, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x37, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x16, 0x18, 0x6B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0xF9, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x19, 0xDA, 0xD2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x09, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xEB, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x07, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xE9, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xCB, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xAD, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x8F, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xAC, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x8E, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x70, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x52, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x34, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x16, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8D, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xAC, 0xE0, 0x00, 0x01,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x33, 0xE4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x37, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x6B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xD2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x16, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8D, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xAC, 0xE0, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x09,
-0x00, 0x00, 0x90, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
-0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00,
-0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04,
-0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x0F, 0x00, 0x00, 0xA8, 0xC0,
-0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x53, 0x54,
-0x00, 0x53, 0x52, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x52, 0x45,
-0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, 0x36, 0x12, 0x00, 0x00, 0x00,
-0x1F, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x45, 0x20, 0x53,
-0x61, 0x6B, 0x68, 0x61, 0x2C, 0x20, 0x4E, 0x20, 0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73,
-
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x09, 0x00, 0x00,
+0x90, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09,
+0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
+0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00,
+0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x0F, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09,
+0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x53,
+0x52, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x52, 0x45, 0x54, 0x2D,
+0x31, 0x31, 0x0A,
+#endif
+0x00, 0xF0, 0x46, 0x6A, 0x01, 0xFD, 0x36, 0x12, 0x00, 0x00, 0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x38, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6B, 0x68, 0x61, 0x20, 0x28, 0x45, 0x29, 0x3B, 0x20,
+0x4E, 0x6F, 0x72, 0x74, 0x68, 0x20, 0x4B, 0x75, 0x72, 0x69, 0x6C, 0x20, 0x49, 0x73,
/* Asia/Taipei */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -21988,37 +22924,40 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01,
0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x57, 0x53, 0x54, 0x00,
0x4A, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xCE,
-0xF0, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x49, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x54,
-0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x42,
-0xAD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x45, 0x22, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4C,
-0xBF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x3C, 0xBF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x06,
-0x66, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1D, 0xF2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE7,
-0x99, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC8,
-0xCD, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xE0, 0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xAA,
-0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x72, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xB5,
-0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x7C, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96,
-0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x5D, 0xB8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x77,
-0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x3E, 0xEC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x30,
-0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x21, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12,
-0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x02, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF3,
-0xD8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xE3, 0xD8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5,
-0x0C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xC5, 0x0B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB6,
-0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xF7, 0xFC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x98,
-0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xD9, 0x2F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79,
-0xF8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED,
-0x8A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDD, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCE,
-0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xDB, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54,
-0xDD, 0x70, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xCE, 0xF0, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x55, 0x49, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x54, 0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x42, 0xAD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x45, 0x22, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4C, 0xBF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3C, 0xBF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x06, 0x66, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x1D, 0xF2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE7, 0x99, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC8, 0xCD, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xE0, 0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xAA, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0x72, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xB5, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x7C, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x5D, 0xB8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x77, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x3E, 0xEC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x30, 0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x21, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x02, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF3, 0xD8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xE3, 0xD8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x0C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xC5, 0x0B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB6, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xF7, 0xFC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x98, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xD9, 0x2F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0xF8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xFC, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0x8A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xDD, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCE, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0xDB, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0xDD, 0x70, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x71, 0xE8,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00,
-0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x57,
-0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x71, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80,
+0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x57, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54,
+0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
0x00, 0xAF, 0x8D, 0x68, 0x01, 0xCC, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00,
/* Asia/Tashkent */
@@ -22039,34 +22978,36 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x50, 0x00, 0x0F, 0x00, 0x00, 0x54, 0x60, 0x01, 0x13, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C,
0x4D, 0x54, 0x00, 0x54, 0x41, 0x53, 0x54, 0x00, 0x54, 0x41, 0x53, 0x53, 0x54, 0x00, 0x55, 0x5A,
0x54, 0x00, 0x55, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00,
-0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x83, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xEF, 0x30, 0x00,
-0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xB2, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xE5, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x19, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x76, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x58, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x3A, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x1C, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xFE, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xE0, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xFD, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xBF, 0xD9, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0x60, 0xBE, 0x30, 0x00,
-0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x09, 0x00, 0x00, 0x40, 0xF7, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01, 0x09, 0x00, 0x00,
-0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x00, 0x00, 0x54, 0x60, 0x01, 0x13,
-0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x41, 0x53, 0x54, 0x00, 0x54,
-0x41, 0x53, 0x53, 0x54, 0x00, 0x55, 0x5A, 0x54, 0x00, 0x55, 0x5A, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x55, 0x5A, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0xC8, 0x66, 0x15, 0x01, 0x7C, 0x66,
-0xD0, 0x00, 0x00, 0x00, 0x0F, 0x65, 0x61, 0x73, 0x74, 0x20, 0x55, 0x7A, 0x62, 0x65, 0x6B, 0x69,
-0x73, 0x74, 0x61, 0x6E,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x83, 0x09, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xB2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xB1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xE5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x69, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x76, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x67, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x58, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x49, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x3A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xFE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xEE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xBF, 0xD9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x60, 0xBE, 0x30, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x09, 0x00,
+0x00, 0x40, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x01,
+0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x00, 0x00, 0x62,
+0x70, 0x01, 0x09, 0x00, 0x00, 0x54, 0x60, 0x01, 0x09, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x00,
+0x00, 0x54, 0x60, 0x01, 0x13, 0x00, 0x00, 0x46, 0x50, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x54,
+0x41, 0x53, 0x54, 0x00, 0x54, 0x41, 0x53, 0x53, 0x54, 0x00, 0x55, 0x5A, 0x54, 0x00, 0x55, 0x5A,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x5A, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xC8, 0x66, 0x15, 0x01, 0x7C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x11, 0x55, 0x7A, 0x62, 0x65,
+0x6B, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29,
/* Asia/Tbilisi */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22097,51 +23038,53 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x54, 0x00, 0x54, 0x42, 0x4D, 0x54, 0x00, 0x54, 0x42, 0x49, 0x54, 0x00, 0x54, 0x42, 0x49, 0x53,
0x54, 0x00, 0x47, 0x45, 0x54, 0x00, 0x47, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00,
-0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0E, 0x00,
-0x00, 0x00, 0x1D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56,
-0xB6, 0xBA, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x9A, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7,
-0xDA, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28,
-0x00, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x60, 0xDA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xDE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC4, 0xC1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0x59, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x23, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x22, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0xDD, 0xC7, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x01, 0x02, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x07, 0x09, 0x08, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x09,
-0x08, 0x0C, 0x00, 0x00, 0x29, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x29, 0xFF, 0x00, 0x04, 0x00, 0x00,
-0x2A, 0x30, 0x00, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00, 0x38, 0x40, 0x00, 0x09,
-0x00, 0x00, 0x38, 0x40, 0x00, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00, 0x38, 0x40,
-0x01, 0x0E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x18, 0x00, 0x00,
-0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x46, 0x50, 0x01, 0x18, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14,
-0x00, 0x00, 0x38, 0x40, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x42, 0x4D, 0x54, 0x00, 0x54,
-0x42, 0x49, 0x54, 0x00, 0x54, 0x42, 0x49, 0x53, 0x54, 0x00, 0x47, 0x45, 0x54, 0x00, 0x47, 0x45,
-0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x47, 0x45, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0xC8, 0xFB, 0xD2, 0x01, 0x57, 0x0B, 0x02, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xBA, 0x01, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x19, 0x9A, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xDA, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x60, 0xDA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xDE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xC1, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xA3, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x59, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x41, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x23, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x1A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x22, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xDD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x40, 0xDD, 0xC7, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x09, 0x08, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0C, 0x0B, 0x0C, 0x0B, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x09, 0x08, 0x0C, 0x00, 0x00, 0x29, 0xFF, 0x00,
+0x00, 0x00, 0x00, 0x29, 0xFF, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x09, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x0E, 0x00, 0x00, 0x38, 0x40, 0x00, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x09, 0x00,
+0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0E, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x18, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x18, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x18, 0x4C,
+0x4D, 0x54, 0x00, 0x54, 0x42, 0x4D, 0x54, 0x00, 0x54, 0x42, 0x49, 0x54, 0x00, 0x54, 0x42, 0x49,
+0x53, 0x54, 0x00, 0x47, 0x45, 0x54, 0x00, 0x47, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x45, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xC8, 0xFB, 0xD2, 0x01, 0x57, 0x0B, 0x02, 0x00, 0x00, 0x00, 0x00,
/* Asia/Tehran */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22182,73 +23125,76 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0D, 0x00, 0x00, 0x38,
0x40, 0x00, 0x08, 0x00, 0x00, 0x3F, 0x48, 0x01, 0x0D, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x4C,
0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x49, 0x52, 0x53, 0x54, 0x00, 0x49, 0x52, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0xDB, 0x12, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xBB, 0xA2, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0x74, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8E, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10,
-0xED, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x55, 0x67, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xDB, 0x9D, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x9C, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xBE, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAC, 0xD0, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0x9F, 0x56, 0x38, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8E, 0x03, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x80, 0x89, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6F, 0x37, 0x48, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x61, 0xBD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x31, 0x50, 0x6A, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x42, 0xF0, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x33, 0x32, 0xEF, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x25, 0x75, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x35, 0x14, 0x23, 0x48, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x06, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF5, 0x56, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x37,
-0xE7, 0xDC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD6, 0x8A, 0x48, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xC9, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB9, 0x0F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xAB, 0x95, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x9A, 0x42, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0x8C, 0xC8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x7B, 0x76, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x6D, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0xA9, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x4F, 0x2F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3F, 0x2E, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x31, 0xB4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x47, 0xE2, 0xC9, 0x48, 0x00, 0x00, 0x00, 0x00, 0x48,
-0xD5, 0x4F, 0x38, 0x00, 0x00, 0x00, 0x00, 0x49, 0xC5, 0x4E, 0x48, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xB7, 0xD4, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xA6, 0x81, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0x99, 0x07, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x87, 0xB5, 0x48, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0x7A, 0x3B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x68, 0xE8, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x5B, 0x6E, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4B, 0x6D, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x3D, 0xF3, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2C, 0xA1, 0x48, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x1F, 0x27, 0x38, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0D, 0xD4, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x00, 0x5A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x56, 0xEF, 0x08, 0x48, 0x00, 0x00, 0x00, 0x00, 0x57,
-0xE1, 0x8E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD1, 0x8D, 0x48, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xC4, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB2, 0xC0, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xA5, 0x46, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x93, 0xF4, 0x48, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0x86, 0x7A, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x75, 0x27, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x67, 0xAD, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x57, 0xAC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x4A, 0x32, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x62, 0x38, 0xE0, 0x48, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x2B, 0x66, 0x38, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1A, 0x13, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x0C, 0x99, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFB, 0x47, 0x48, 0x00, 0x00, 0x00, 0x00, 0x66,
-0xED, 0xCD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDD, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xD0, 0x52, 0x38, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBE, 0xFF, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xB1, 0x85, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA0, 0x33, 0x48, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0x92, 0xB9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x81, 0x66, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0x73, 0xEC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x62, 0x9A, 0x48, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x55, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x71, 0x45, 0x1F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x37, 0xA5, 0x38, 0x00, 0x00, 0x00, 0x00, 0x73, 0x26, 0x52, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x18, 0xD8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x75, 0x07, 0x86, 0x48, 0x00, 0x00, 0x00, 0x00, 0x75,
-0xFA, 0x0C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x76, 0xE8, 0xB9, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x77,
-0xDB, 0x3F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCB, 0x3E, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xBD, 0xC4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAC, 0x72, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0x9E, 0xF8, 0x38, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x8D, 0xA5, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0x80, 0x2B, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x6E, 0xD9, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x61, 0x5F, 0x38, 0x00, 0x00, 0x00, 0x03, 0x74, 0x0A, 0xD8, 0x00, 0x00, 0x01, 0x02, 0x04, 0x03,
-0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x06, 0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x00, 0x04, 0x00, 0x00, 0x31,
-0x38, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00,
-0x00, 0x3F, 0x48, 0x01, 0x0D, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54,
-0x4D, 0x54, 0x00, 0x49, 0x52, 0x53, 0x54, 0x00, 0x49, 0x52, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x00, 0xBF, 0xC0,
-0x8A, 0x01, 0x61, 0x23, 0xA5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xDB, 0x12, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xBB, 0xA2, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x74, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8E, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x10, 0xED, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x55, 0x67, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xDB, 0x9D, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x9C, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xBE, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAC, 0xD0, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0x9F, 0x56, 0x38, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8E, 0x03, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x80, 0x89, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6F, 0x37, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x61, 0xBD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x31, 0x50, 0x6A, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x42, 0xF0, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x33, 0x32, 0xEF, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x25, 0x75, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x35, 0x14, 0x23, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x06, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF5, 0x56, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xE7, 0xDC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD6, 0x8A, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xC9, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB9, 0x0F, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xAB, 0x95, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x9A, 0x42, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x8C, 0xC8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x7B, 0x76, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x6D, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0xA9, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x4F, 0x2F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3F, 0x2E, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x31, 0xB4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x47, 0xE2, 0xC9, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xD5, 0x4F, 0x38, 0x00, 0x00, 0x00, 0x00, 0x49, 0xC5, 0x4E, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xB7, 0xD4, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xA6, 0x81, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x99, 0x07, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x87, 0xB5, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7A, 0x3B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x68, 0xE8, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x5B, 0x6E, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4B, 0x6D, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x3D, 0xF3, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2C, 0xA1, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x1F, 0x27, 0x38, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0D, 0xD4, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x00, 0x5A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x56, 0xEF, 0x08, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE1, 0x8E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD1, 0x8D, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xC4, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB2, 0xC0, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xA5, 0x46, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x93, 0xF4, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x86, 0x7A, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x75, 0x27, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x67, 0xAD, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x57, 0xAC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4A, 0x32, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x62, 0x38, 0xE0, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2B, 0x66, 0x38, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1A, 0x13, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x0C, 0x99, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFB, 0x47, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xED, 0xCD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDD, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD0, 0x52, 0x38, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBE, 0xFF, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB1, 0x85, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA0, 0x33, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x92, 0xB9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x81, 0x66, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x73, 0xEC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x62, 0x9A, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x55, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x71, 0x45, 0x1F, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x37, 0xA5, 0x38, 0x00, 0x00, 0x00, 0x00, 0x73, 0x26, 0x52, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x18, 0xD8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x75, 0x07, 0x86, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x75, 0xFA, 0x0C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x76, 0xE8, 0xB9, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xDB, 0x3F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCB, 0x3E, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xBD, 0xC4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAC, 0x72, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0x9E, 0xF8, 0x38, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x8D, 0xA5, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x80, 0x2B, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x6E, 0xD9, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x61, 0x5F, 0x38, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 0x00,
+0x00, 0x30, 0x38, 0x00, 0x04, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01,
+0x0D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x3F, 0x48, 0x01, 0x0D, 0x00, 0x00, 0x31,
+0x38, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x49, 0x52, 0x53, 0x54, 0x00,
+0x49, 0x52, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x49, 0x52, 0x53, 0x54, 0x2D, 0x33, 0x3A, 0x33, 0x30, 0x49, 0x52, 0x44,
+0x54, 0x2C, 0x4A, 0x38, 0x30, 0x2F, 0x30, 0x2C, 0x4A, 0x32, 0x36, 0x34, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0xBF, 0xC0, 0x8A, 0x01, 0x61, 0x23, 0xA5, 0x00, 0x00, 0x00, 0x00,
/* Asia/Tel_Aviv */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22302,83 +23248,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x00,
0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4A,
0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x44, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30, 0x45, 0x88,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xC9, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x6B, 0xE0, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x5A, 0x14, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0xDF, 0x1F, 0xC0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2F, 0xB5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1E, 0x46, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x10, 0xE8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xB3, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xB4, 0x34, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x20, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xE0, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xCE, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xA4, 0xBF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x8B, 0x76, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x56, 0x7D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xBE, 0x4A, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x36, 0x34, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x9C, 0xF7, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x16, 0x16, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x74, 0xD3, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0xFF, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE8, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7C, 0x8B, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xEA, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xBE, 0xF8, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xCC, 0xFF, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0xB1, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x9E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5A, 0x30, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB, 0xCF, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBB, 0x65, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x47, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7B, 0x29, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x48, 0x96, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x3C, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x31, 0xB3, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x1A, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x11, 0x95, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xA6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x04, 0x08, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x37, 0xCF, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xF6, 0x5F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xDC, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xD0, 0xED, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xAE, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA3, 0xA0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xA0, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x83, 0x82, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x7C, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x73, 0x36, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x50, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4C, 0x8F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2C, 0x71, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0C, 0x53, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x46, 0xEC, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEC, 0x35, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCC, 0x17, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAB, 0xF9, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x95, 0x15, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x9B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x74, 0xF7, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x5E, 0x42, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x34, 0xBB, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x55, 0x14, 0x9D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF4, 0x7F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD4, 0x61, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB4, 0x43, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7D, 0x42, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xB1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5D, 0x24, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3D, 0x06, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1C, 0xE8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x66, 0x06, 0x04, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE5, 0xE6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC5, 0xC8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA5, 0xAA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x85, 0x8C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x65, 0x6E, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x18, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4E, 0x8B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2E, 0x6D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0E, 0x4F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xF9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEE, 0x31, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCE, 0x13, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xBD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAD, 0xF5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x97, 0x11, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x81, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x76, 0xF3, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x63, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x30, 0x45, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x5A, 0x14, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0xDF, 0x1F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2F, 0xB5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x1E, 0x46, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x10, 0xE8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xB3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xB4, 0x34, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x20, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xE0, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xCE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xA4, 0xBF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x8B, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x56, 0x7D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0xBE, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x36, 0x34, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x9C, 0xF7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x16, 0x16, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x74, 0xD3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE8, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x7C, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xBE, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xCC, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x82, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x5A, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xEB, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7B, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x48, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x3C, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x31, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x1A, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x11, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xA6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x04, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0xCF, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xF6, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDC, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xD0, 0xED, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xAE, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA3, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA0, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x83, 0x82, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7C, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x73, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x50, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4C, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2C, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0C, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xEC, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEC, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCC, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAB, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x95, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x9B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x5E, 0x42, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x54, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x14, 0x9D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF4, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD4, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB4, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7D, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xB1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5D, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3D, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1C, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x06, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE5, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC5, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA5, 0xAA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x85, 0x8C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x65, 0x6E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x18, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4E, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2E, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0E, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xF9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEE, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xCE, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xBD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xAD, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x97, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x81, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x76, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x63, 0x70, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
@@ -22386,14 +23333,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x21, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x20, 0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C,
-0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x4A, 0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x44, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53,
-0x54, 0x2D, 0x32, 0x49, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x32, 0x36,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x21, 0x06,
+0x00, 0x00, 0x00, 0x00, 0x20, 0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
+0x49, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D, 0x32, 0x49, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E,
+0x34, 0x2F, 0x32, 0x36, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Thimbu */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22401,15 +23349,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xD5, 0xE6, 0x15, 0x74, 0x21, 0x61, 0x4D, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x54, 0x0C, 0x00,
0x00, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xE6, 0x15, 0x74, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x61, 0x4D, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x54, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x58,
-0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x54, 0x54, 0x2D, 0x36,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xE6, 0x15, 0x74, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x61, 0x4D, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x54, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x4D,
+0x58, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x54, 0x54, 0x2D,
+0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Thimphu */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22417,15 +23368,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xD5, 0xE6, 0x15, 0x74, 0x21, 0x61, 0x4D, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x54, 0x0C, 0x00,
0x00, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xE6, 0x15, 0x74, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x61, 0x4D, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x54, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x58,
-0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x54, 0x54, 0x2D, 0x36,
-0x0A, 0x00, 0xB3, 0x3D, 0x6A, 0x01, 0x9B, 0x74, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xE6, 0x15, 0x74, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x61, 0x4D, 0xA8, 0x00, 0x01, 0x02, 0x00, 0x00, 0x54, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x4D,
+0x58, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54,
+0x00, 0x42, 0x54, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x54, 0x54, 0x2D,
+0x36, 0x0A,
+#endif
+0x00, 0xB3, 0x3D, 0x6A, 0x01, 0x9B, 0x74, 0x07, 0x00, 0x00, 0x00, 0x00,
/* Asia/Tokyo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22436,21 +23390,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xDD, 0x8B, 0xBC, 0x80, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00,
0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09,
0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A,
-0x44, 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x65, 0xC2, 0xA4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xCE, 0xE3, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x3E, 0x1E, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD7, 0xEC, 0x16, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x16, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD9, 0xCB, 0xF8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x07, 0x1D, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDB, 0xAB, 0xDA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xE6, 0xFF, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDD, 0x8B, 0xBC, 0x80, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x00, 0x00, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00,
-0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x44,
-0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4A, 0x53, 0x54,
-0x2D, 0x39, 0x0A, 0x00, 0xBF, 0xBB, 0xC4, 0x01, 0xE7, 0xE4, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x65, 0xC2, 0xA4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x74, 0xCE, 0xE3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3E, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0xEC, 0x16, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x16, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xCB, 0xF8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x07, 0x1D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xAB, 0xDA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xE6, 0xFF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x8B, 0xBC, 0x80, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0D,
+0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4A, 0x43,
+0x53, 0x54, 0x00, 0x4A, 0x44, 0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x0A, 0x4A, 0x53, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0xBF, 0xBB, 0xC4, 0x01, 0xE7, 0xE4, 0x48, 0x00, 0x00, 0x00, 0x00,
/* Asia/Ujung_Pandang */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22460,18 +23417,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0xF0, 0x00,
0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54, 0x41, 0x00,
-0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x5D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16,
-0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0x1D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x56,
-0xEE, 0x70, 0x00, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0xF0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x57, 0x49, 0x54,
-0x41, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x57, 0x49, 0x54, 0x41, 0x2D, 0x38, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0x5D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0x16, 0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0x1D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x56, 0xEE, 0x70, 0x00, 0x01, 0x02, 0x03, 0x02, 0x00, 0x00, 0x6F, 0xF0, 0x00, 0x00, 0x00,
+0x00, 0x6F, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00,
+0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x57,
+0x49, 0x54, 0x41, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x57, 0x49, 0x54, 0x41, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Ulaanbaatar */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22508,69 +23467,72 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x64,
0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00,
0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41, 0x54, 0x00, 0x55, 0x4C,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xEE, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0B, 0xDC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xFC, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x30, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x12, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B, 0xF4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xD6, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xB8, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xB7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0x9A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x99, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xB6, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0x98, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x3D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x1F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0x01, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB4, 0xAC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0xAB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x94, 0x8E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x8D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x74, 0x70, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x54, 0x52, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x34, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x33, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1D, 0x51, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x61, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE5, 0x43, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xD5, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCE, 0x5F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0x7B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAE, 0x41, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x5D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8E, 0x23, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x3F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6E, 0x05, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4D, 0xE7, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2D, 0xC9, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x1D, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x16, 0xE6, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x01, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF6, 0xC8, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD6, 0xAA, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xC5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB6, 0x8C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x96, 0x6E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0x89, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x7F, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x5F, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x3F, 0x4E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1F, 0x30, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x4C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0xFF, 0x12, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x2E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x77, 0xDE, 0xF4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC8, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA7, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x87, 0xD5, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x77, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x67, 0xB7, 0x70,
-0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x64,
-0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41, 0x54, 0x00, 0x55, 0x4C,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x4C, 0x41,
-0x54, 0x2D, 0x38, 0x55, 0x4C, 0x41, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2C,
-0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30, 0x0A, 0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF,
-0xCD, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69,
-0x6F, 0x6E, 0x73,
+0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xEE, 0x4C, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x0B, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xFC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xB7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x99, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x4D, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x2D, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x0D, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB4, 0xAC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0xAB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x94, 0x8E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x8D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x74, 0x70, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x54, 0x52, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x34, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x33, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1D, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x05, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE5, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD5, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCE, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0x7B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAE, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x5D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8E, 0x23, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x3F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6E, 0x05, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4D, 0xE7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2D, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1D, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x16, 0xE6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x01, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF6, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD6, 0xAA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xC5, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB6, 0x8C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x96, 0x6E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0x89, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x7F, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x5F, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x3F, 0x4E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x1F, 0x30, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x4C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x75, 0xFF, 0x12, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x2E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xDE, 0xF4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC8, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA7, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x87, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x77, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x67, 0xB7, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x00, 0x00, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E,
+0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41,
+0x54, 0x00, 0x55, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x55, 0x4C, 0x41, 0x54, 0x2D, 0x38, 0x55, 0x4C, 0x41, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x36, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0xD2, 0x71, 0xB2, 0x01, 0xB5, 0xBF, 0xCD, 0x00, 0x00, 0x00, 0x15, 0x4D, 0x6F, 0x6E, 0x67,
+0x6F, 0x6C, 0x69, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73,
+0x29,
/* Asia/Ulan_Bator */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22607,83 +23569,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x64,
0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00,
0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41, 0x54, 0x00, 0x55, 0x4C,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xEE, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0B, 0xDC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xFC, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x30, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x12, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B, 0xF4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xD6, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xB8, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xB7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0x9A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x99, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xB6, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0x98, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x7A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x3D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x1F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0x01, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB4, 0xAC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0xAB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x94, 0x8E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x8D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x74, 0x70, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x54, 0x52, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x34, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x33, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1D, 0x51, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x61, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE5, 0x43, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xD5, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCE, 0x5F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0x7B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAE, 0x41, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x5D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8E, 0x23, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x3F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6E, 0x05, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4D, 0xE7, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2D, 0xC9, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x1D, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x16, 0xE6, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x01, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF6, 0xC8, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD6, 0xAA, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xC5, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB6, 0x8C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x96, 0x6E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0x89, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x7F, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x5F, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x3F, 0x4E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1F, 0x30, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x4C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x75, 0xFF, 0x12, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x2E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x77, 0xDE, 0xF4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC8, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA7, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x87, 0xD5, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x77, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x67, 0xB7, 0x70,
-0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x64,
-0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41, 0x54, 0x00, 0x55, 0x4C,
-0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x4C, 0x41,
-0x54, 0x2D, 0x38, 0x55, 0x4C, 0x41, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x36, 0x2C,
-0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xD3, 0xEE, 0x4C, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x0B, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xFC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xB7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x99, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x4D, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x2D, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x0D, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xE9, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB4, 0xAC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA4, 0xAB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x94, 0x8E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x84, 0x8D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x74, 0x70, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x64, 0x6F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x54, 0x52, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x34, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x24, 0x33, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1D, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0x9A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x05, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF5, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE5, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD5, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCE, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBE, 0x7B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAE, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9E, 0x5D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8E, 0x23, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7E, 0x3F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6E, 0x05, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5E, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4D, 0xE7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3E, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2D, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1D, 0xE5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x16, 0xE6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x66, 0x07, 0x01, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF6, 0xC8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD6, 0xAA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC6, 0xC5, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB6, 0x8C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA6, 0xA7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x96, 0x6E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x86, 0x89, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x7F, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x6F, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x5F, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4F, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x3F, 0x4E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2F, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x1F, 0x30, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0F, 0x4C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x75, 0xFF, 0x12, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEF, 0x2E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xDE, 0xF4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCF, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC8, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB8, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA7, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x98, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x87, 0xD5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x77, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x67, 0xB7, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x00, 0x00, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x7E,
+0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x55, 0x4C, 0x41,
+0x54, 0x00, 0x55, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x55, 0x4C, 0x41, 0x54, 0x2D, 0x38, 0x55, 0x4C, 0x41, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x36, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x36, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Asia/Urumqi */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xB0, 0xFE, 0xBA, 0x64, 0x00, 0x01, 0x00, 0x00, 0x52, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xFE, 0xBA, 0x64, 0x00, 0x01, 0x00, 0x00, 0x52, 0x1C,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x58, 0x4A, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0xCC, 0x29, 0xA0, 0x01,
-0x98, 0x4C, 0xBD, 0x00, 0x00, 0x00, 0x0D, 0x58, 0x69, 0x6E, 0x6A, 0x69, 0x61, 0x6E, 0x67, 0x20,
-0x54, 0x69, 0x6D, 0x65,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xFE, 0xBA, 0x64, 0x00, 0x01, 0x00, 0x00,
+0x52, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x58, 0x4A,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x58, 0x4A, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0xCC, 0x29, 0xA0, 0x01, 0x98, 0x4C, 0xBD, 0x00, 0x00, 0x00, 0x0D, 0x58, 0x69, 0x6E, 0x6A,
+0x69, 0x61, 0x6E, 0x67, 0x20, 0x54, 0x69, 0x6D, 0x65,
/* Asia/Ust-Nera */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22717,57 +23683,60 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xA0, 0x00, 0x14, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B,
0x54, 0x00, 0x4D, 0x41, 0x47, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x56, 0x4C, 0x41,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xDD, 0xBA, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xC5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x6B, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0x9F, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xD2, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x30, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x12, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7B, 0xF4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xD6, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xB8, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0x9A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xB6, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xA7, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x5F, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x6B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x4D, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x2F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x10, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFC, 0xF2, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xD4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xB6, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xD2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xB4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0x96, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x78, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x5A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x3C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x59, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x3B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x16, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x1D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8D, 0xFF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0x6D, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xBA, 0xF0,
-0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x09, 0x0A, 0x0B, 0x00, 0x00, 0x86, 0x46, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01,
-0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x0E, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x0E, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x09, 0x00,
-0x00, 0x9A, 0xB0, 0x00, 0x14, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x14, 0x00, 0x00, 0xA8, 0xC0, 0x01,
-0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x54, 0x00, 0x4D,
-0x41, 0x47, 0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x4C, 0x41, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0xEB, 0xD7,
-0x1B, 0x01, 0xED, 0x34, 0x6A, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xDD, 0xBA, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x6B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0x9F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0x9E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xD2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x21, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xE5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xC7, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xA9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x8B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xA7, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x4D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x2F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xAC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x3B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x16, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x32, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8D, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x6D, 0xF4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4B, 0xBA, 0xF0, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x04, 0x03,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x09, 0x0A, 0x0B, 0x00, 0x00, 0x86, 0x46, 0x00, 0x00, 0x00, 0x00, 0x70,
+0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00,
+0x00, 0xA8, 0xC0, 0x01, 0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01,
+0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x0E, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0xA8,
+0xC0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x14, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x14, 0x00,
+0x00, 0xA8, 0xC0, 0x01, 0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x4D, 0x41,
+0x47, 0x54, 0x00, 0x4D, 0x41, 0x47, 0x53, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x4C, 0x41, 0x54, 0x2D, 0x31, 0x30,
+0x0A,
+#endif
+0x00, 0xEB, 0xD7, 0x1B, 0x01, 0xED, 0x34, 0x6A, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x53, 0x4B, 0x2B,
0x30, 0x37, 0x20, 0x2D, 0x20, 0x4F, 0x79, 0x6D, 0x79, 0x61, 0x6B, 0x6F, 0x6E, 0x73, 0x6B, 0x79,
@@ -22777,15 +23746,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xA2, 0x6A, 0x67, 0xC4, 0x01, 0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x3C,
0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00,
-0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x56, 0xB6, 0x85, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x6A, 0x67, 0xC4, 0x00, 0x01,
-0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x04, 0x00, 0x00, 0x62,
-0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x49, 0x43, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0xA4, 0xBE, 0x7A,
-0x01, 0xAF, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x85, 0xC4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x6A, 0x67, 0xC4, 0x00, 0x01, 0x02, 0x00, 0x00, 0x5E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x5E,
+0x3C, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54,
+0x00, 0x49, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x43, 0x54, 0x2D,
+0x37, 0x0A,
+#endif
+0x00, 0xA4, 0xBE, 0x7A, 0x01, 0xAF, 0x36, 0xA0, 0x00, 0x00, 0x00, 0x00,
/* Asia/Vladivostok */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22817,56 +23789,58 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0,
0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54,
0x00, 0x56, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x59, 0x47, 0x5D, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xB6,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x45, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x79,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xAD,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xE0,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x3E,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x20,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x02,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xE4,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xC6,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xB7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x99, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xC5,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xB5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x5D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x6D,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x69,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x67,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x49,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x24, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x2B,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x0D,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xBA, 0xF0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00, 0x7B, 0xA3, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00,
-0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00,
-0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x56, 0x4C, 0x41, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0xCB, 0x32, 0x3A, 0x01,
-0xDB, 0xF8, 0xF5, 0x00, 0x00, 0x00, 0x16, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x37,
-0x20, 0x2D, 0x20, 0x41, 0x6D, 0x75, 0x72, 0x20, 0x52, 0x69, 0x76, 0x65, 0x72,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x59, 0x47, 0x5D, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x45, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x79, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xAD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xAC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xE0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x31, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xB7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x99, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x5D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x6D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x49, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x24, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x2B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xBA, 0xF0, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00,
+0x7B, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09,
+0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0,
+0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00,
+0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x54, 0x00, 0x56, 0x4C, 0x41, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x4C, 0x41, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0xCB, 0x32, 0x3A, 0x01, 0xDB, 0xF8, 0xF5, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x37, 0x20, 0x2D, 0x20, 0x41, 0x6D, 0x75, 0x72, 0x20, 0x52, 0x69, 0x76, 0x65, 0x72,
/* Asia/Yakutsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22898,56 +23872,58 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54,
0x00, 0x59, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xEA, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xC5,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0x87,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xBB,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xBA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDA, 0xEE,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x4C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x2E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x10,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5B, 0xF2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3B, 0xD4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xB6,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0x04, 0xD3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xC3,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x6B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x7B,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x88,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x6A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x5B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x4C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x3D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x68,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x4A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x2C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x0E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xF0,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xD2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xEF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xCA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xD1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xAC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xB3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x95,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xAA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0x77,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x8C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x59,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x6E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x75,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x50, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x57,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x32, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x39,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x4F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x1B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xC9, 0x00, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00, 0x79, 0xA2, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E,
-0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00,
-0x00, 0x7E, 0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
-0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x59, 0x41, 0x4B, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0xE7, 0xEF, 0x00, 0x01, 0xD8,
-0x83, 0x8A, 0x00, 0x00, 0x00, 0x16, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x36, 0x20,
-0x2D, 0x20, 0x4C, 0x65, 0x6E, 0x61, 0x20, 0x52, 0x69, 0x76, 0x65, 0x72,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xDB, 0xEA, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA3, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x53, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF9, 0xBB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE9, 0xBA, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDA, 0xEE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0xE3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0xC5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xB6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xA7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x04, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0x6B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0x7B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0x88, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0x6A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x5B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x3D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x68, 0x90, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x4A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x2C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x0E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xF0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xEF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xCA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xD1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xAC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xB3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x95, 0x10, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xAA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x8C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x59, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x6E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0x75, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x50, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0x57, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x32, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x39, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x4F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x1B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4B, 0xC9, 0x00, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x08, 0x04, 0x00, 0x00,
+0x79, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09,
+0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
+0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x09, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00,
+0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x54, 0x00, 0x59, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x59, 0x41, 0x4B, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0xE7, 0xEF, 0x00, 0x01, 0xD8, 0x83, 0x8A, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x36, 0x20, 0x2D, 0x20, 0x4C, 0x65, 0x6E, 0x61, 0x20, 0x52, 0x69, 0x76, 0x65, 0x72,
/* Asia/Yekaterinburg */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -22983,59 +23959,62 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x54, 0x00, 0x53, 0x56, 0x45, 0x53, 0x54, 0x00, 0x59, 0x45, 0x4B, 0x53, 0x54, 0x00, 0x59, 0x45,
0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5F, 0x09, 0x27, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA1, 0x12, 0xB1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x08, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xF4, 0xFC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x78, 0xA3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xB4, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xC4, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xA0, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x82, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0x5D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x64, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x46, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x28, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x0A, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x27, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x09, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xEB, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xCD, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xAF, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x91, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xAD, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x8F, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x71, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x53, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x4C, 0x01, 0x40, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x0C,
-0x09, 0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x0C, 0x00, 0x00, 0x38, 0xD9, 0x00, 0x00, 0x00, 0x00,
-0x34, 0xC1, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0D,
-0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60,
-0x01, 0x0D, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00,
-0x54, 0x60, 0x01, 0x13, 0x00, 0x00, 0x46, 0x50, 0x00, 0x19, 0x00, 0x00, 0x54, 0x60, 0x01, 0x13,
-0x00, 0x00, 0x46, 0x50, 0x00, 0x19, 0x00, 0x00, 0x54, 0x60, 0x00, 0x19, 0x00, 0x00, 0x46, 0x50,
-0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x53, 0x56, 0x45, 0x54, 0x00, 0x53,
-0x56, 0x45, 0x53, 0x54, 0x00, 0x59, 0x45, 0x4B, 0x53, 0x54, 0x00, 0x59, 0x45, 0x4B, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x59,
-0x45, 0x4B, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0xE0, 0x13, 0x48, 0x01, 0x6F, 0x20, 0x60, 0x00, 0x00,
-0x00, 0x11, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x32, 0x20, 0x2D, 0x20, 0x55, 0x72,
-0x61, 0x6C, 0x73,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5F, 0x09, 0x27, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x12, 0xB1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA3, 0xFD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF9, 0xF3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE9, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x77, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x75, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x57, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x39, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x1B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2B, 0xFD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xDF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF4, 0xFC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0xA3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xB4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xC0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xA0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x82, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x5D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x64, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x3F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x28, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x0A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x27, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x09, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xE4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xEB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xCD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xAF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xAD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x88, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x8F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x6A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x71, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x53, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x01, 0x40, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x0C, 0x09,
+0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x0C, 0x00, 0x00, 0x38, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x34,
+0xC1, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0D, 0x00,
+0x00, 0x46, 0x50, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60, 0x01,
+0x0D, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x54,
+0x60, 0x01, 0x13, 0x00, 0x00, 0x46, 0x50, 0x00, 0x19, 0x00, 0x00, 0x54, 0x60, 0x01, 0x13, 0x00,
+0x00, 0x46, 0x50, 0x00, 0x19, 0x00, 0x00, 0x54, 0x60, 0x00, 0x19, 0x00, 0x00, 0x46, 0x50, 0x00,
+0x19, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x53, 0x56, 0x45, 0x54, 0x00, 0x53, 0x56,
+0x45, 0x53, 0x54, 0x00, 0x59, 0x45, 0x4B, 0x53, 0x54, 0x00, 0x59, 0x45, 0x4B, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x59, 0x45,
+0x4B, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0xE0, 0x13, 0x48, 0x01, 0x6F, 0x20, 0x60, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x32, 0x20, 0x2D, 0x20, 0x55, 0x72, 0x61, 0x6C, 0x73,
/* Asia/Yerevan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23069,56 +24048,59 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x38, 0x40, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x45, 0x52, 0x54, 0x00, 0x59, 0x45,
0x52, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
-0x0E, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAA, 0x19, 0x9A, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xDA, 0x0C, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xDC, 0xF6, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0xC9, 0x70, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xB4, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0x96, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x78, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0x77, 0x60, 0x00, 0x01, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08, 0x09, 0x0A, 0x07, 0x0A, 0x07, 0x0A, 0x0B, 0x0D,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x00, 0x00,
-0x29, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09,
-0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50,
-0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00,
-0x38, 0x40, 0x01, 0x13, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13,
-0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x45, 0x52, 0x54, 0x00, 0x59, 0x45, 0x52, 0x53, 0x54,
-0x00, 0x41, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0xC6, 0xA4,
-0xDD, 0x01, 0x56, 0x8F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0x9A, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0xDA, 0x0C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xDC, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x32, 0xC9, 0x70, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x61, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0x77, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08, 0x09,
+0x0A, 0x07, 0x0A, 0x07, 0x0A, 0x0B, 0x0D, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x00, 0x00, 0x29, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x0F, 0x00, 0x00, 0x38, 0x40, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x13, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x45, 0x52,
+0x54, 0x00, 0x59, 0x45, 0x52, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4D,
+0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xC6, 0xA4, 0xDD, 0x01, 0x56, 0x8F, 0x50, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Azores */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23201,144 +24183,147 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4D, 0x54, 0x00, 0x41, 0x5A, 0x4F, 0x53, 0x54, 0x00, 0x41, 0x5A, 0x4F, 0x54, 0x00, 0x41, 0x5A,
0x4F, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1D, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x1B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0x92, 0xE6, 0xA9, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x4B, 0x89, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9B, 0xFE, 0xE3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x9D, 0x09, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9D, 0xC9, 0x9F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x7F, 0x8E, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0xAA, 0xD3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x70, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0x8C, 0x06, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x41, 0xF5, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA3, 0x6E, 0x8B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x23, 0x29, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA5, 0x4F, 0xBF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x06, 0x0B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAA, 0xF4, 0xAB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xC4, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAE, 0xA7, 0x40, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x6B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB0, 0x87, 0x22, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x88, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB2, 0x70, 0x3E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xA4, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB4, 0x50, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x68, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0x0F, 0xE4, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xD5, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB9, 0xEF, 0xC6, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xD4, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBD, 0xB8, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x7B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBF, 0x98, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x0D, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC1, 0x78, 0x89, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x7A, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC3, 0x58, 0x6B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x21, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC5, 0x38, 0x4D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xB3, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC7, 0x58, 0xC8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xFB, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC9, 0x01, 0x4B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF1, 0x3C, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCA, 0xE2, 0x7F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xB5, 0x6F, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCB, 0xEC, 0xC0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x80, 0x68, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xDC, 0xBF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x95, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCD, 0xC3, 0x67, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x72, 0xBF, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCE, 0xC5, 0xDB, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x75, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCF, 0xAC, 0x84, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x52, 0xA1, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD0, 0xA5, 0xBD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x55, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD1, 0x8C, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x32, 0x83, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x85, 0x9F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x59, 0xE1, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xED, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x29, 0xDE, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xCF, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x09, 0xC0, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0xB1, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE9, 0xA2, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xB2, 0xA0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x91, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDF, 0x92, 0x82, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x73, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE1, 0x72, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x55, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE3, 0x52, 0x46, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x37, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE5, 0x32, 0x28, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x22, 0x19, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE7, 0x1B, 0x45, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x36, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0xFB, 0x27, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEB, 0x18, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0xDB, 0x09, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xFA, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEC, 0xBA, 0xEB, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xDC, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEE, 0x9A, 0xCD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xBE, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF0, 0x7A, 0xAF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0xA0, 0x40, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF2, 0x63, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xBC, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF4, 0x43, 0xAD, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x9E, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF6, 0x23, 0x8F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x80, 0xC0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF8, 0x03, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x62, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0x9B, 0x29, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x26, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x44, 0x09, 0x90, 0x00, 0x00, 0x00, 0x00, 0x14, 0x34, 0x08, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x23, 0xF9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xEA, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x03, 0xDB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xCC, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xE3, 0xCB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xAE, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xC3, 0x9F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xCB, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAC, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0xAD, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x9E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x8F, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x71, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x62, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x53, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x35, 0x20, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0C, 0x26, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x51, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF5, 0x42, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x33, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD5, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x15, 0xA0, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01,
-0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04,
-0x06, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x1B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x92, 0xE6, 0xA9, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x4B, 0x89, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xFE, 0xE3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x9D, 0x09, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xC9, 0x9F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x7F, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0xAA, 0xD3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x8C, 0x06, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x41, 0xF5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x6E, 0x8B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x23, 0x29, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x4F, 0xBF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x06, 0x0B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xF4, 0xAB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xC4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x40, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x6B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x22, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x88, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x3E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xA4, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x68, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xE4, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xC6, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x7B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x0D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x89, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x7A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x6B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x21, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x4D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xB3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xC8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xFB, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x01, 0x4B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF1, 0x3C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x7F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xB5, 0x6F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xEC, 0xC0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x80, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xDC, 0xBF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x95, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xC3, 0x67, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x72, 0xBF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xC5, 0xDB, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x75, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0xAC, 0x84, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x52, 0xA1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA5, 0xBD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x55, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x8C, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x32, 0x83, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x85, 0x9F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x59, 0xE1, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xED, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xDE, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xCF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0xC0, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0xA2, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xB2, 0xA0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x91, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x92, 0x82, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x73, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x72, 0x64, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x55, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x52, 0x46, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x37, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x32, 0x28, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x22, 0x19, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x1B, 0x45, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x36, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xFB, 0x27, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEB, 0x18, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xDB, 0x09, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xFA, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xBA, 0xEB, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xDC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x9A, 0xCD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xBE, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x7A, 0xAF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0xA0, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x63, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xBC, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x43, 0xAD, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x9E, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x23, 0x8F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x80, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x03, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x62, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x9B, 0x29, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x44, 0x09, 0x90, 0x00, 0x00, 0x00, 0x00, 0x14, 0x34, 0x08, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xF9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xEA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xDB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xCC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xCB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xAE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x9F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xCB, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xBC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0xAD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x9E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x8F, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x71, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x62, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x53, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x35, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x26, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x51, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x42, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x33, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x24, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x15, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04,
+0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x09, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x09,
0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x0A,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0xFF, 0xFF, 0xE7, 0xF0,
-0x00, 0x00, 0xFF, 0xFF, 0xE5, 0x28, 0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF,
-0xE3, 0xE0, 0x00, 0x0E, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x0E,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x13, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0,
-0x00, 0x0E, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D,
-0x54, 0x00, 0x41, 0x5A, 0x4F, 0x53, 0x54, 0x00, 0x41, 0x5A, 0x4F, 0x54, 0x00, 0x41, 0x5A, 0x4F,
-0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x0A, 0x41, 0x5A, 0x4F, 0x54, 0x31, 0x41, 0x5A, 0x4F, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x0A,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0xFF, 0xFF, 0xE7, 0xF0, 0x00, 0x00,
+0xFF, 0xFF, 0xE5, 0x28, 0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0,
+0x00, 0x0E, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x0E, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x13, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E,
+0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00,
+0x41, 0x5A, 0x4F, 0x53, 0x54, 0x00, 0x41, 0x5A, 0x4F, 0x54, 0x00, 0x41, 0x5A, 0x4F, 0x4D, 0x54,
+0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
+0x41, 0x5A, 0x4F, 0x54, 0x31, 0x41, 0x5A, 0x4F, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x0A,
+#endif
0x00, 0xC2, 0xE7, 0xD5, 0x00, 0xEB, 0x7E, 0x75, 0x00, 0x00, 0x00, 0x06, 0x41, 0x7A, 0x6F, 0x72,
0x65, 0x73,
@@ -23388,88 +24373,90 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xC3, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00,
-0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB4, 0xC3, 0x1D, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xC3, 0x3A, 0x00, 0x00, 0xFF, 0xFF,
-0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53,
-0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x53, 0x54,
-0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
-0x31, 0x2E, 0x30, 0x0A, 0x00, 0xBA, 0x96, 0xED, 0x00, 0xAF, 0xD5, 0x05, 0x00, 0x00, 0x00, 0x00,
-
+0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0xC3, 0x1D, 0xE6, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF,
+0xC3, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
+0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xBA, 0x96, 0xED, 0x00, 0xAF, 0xD5, 0x05, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Canary */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23516,84 +24503,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x09, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E,
0x10, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x4E, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x04, 0x5C, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x41, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF, 0xF1, 0x90,
-0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
-0x0E, 0x10, 0x01, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x0D,
-0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x4E, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57,
-0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xB4, 0x34, 0xD0, 0x00, 0xFB, 0x28,
-0xE0, 0x00, 0x00, 0x00, 0x0E, 0x43, 0x61, 0x6E, 0x61, 0x72, 0x79, 0x20, 0x49, 0x73, 0x6C, 0x61,
-0x6E, 0x64, 0x73,
+0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x04, 0x5C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x41, 0xF7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF, 0xF1, 0x90, 0x00,
+0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E,
+0x10, 0x01, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x43, 0x41, 0x4E, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45,
+0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xB4, 0x34, 0xD0, 0x00, 0xFB, 0x28, 0xE0, 0x00, 0x00, 0x00, 0x0E, 0x43, 0x61, 0x6E, 0x61,
+0x72, 0x79, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Atlantic/Cape_Verde */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23603,16 +24593,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xE9, 0xF4, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x00,
0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x56, 0x54, 0x00, 0x43, 0x56, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7F, 0x51, 0x8C, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0x95, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x7C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0x17, 0xF7, 0x40, 0x00, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xE9, 0xF4, 0x00,
-0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xF1,
-0xF0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x56, 0x54, 0x00, 0x43, 0x56, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x56, 0x54, 0x31, 0x0A, 0x00, 0xA0,
-0x17, 0x12, 0x00, 0xEE, 0xC6, 0x4D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7F, 0x51, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x95, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x74, 0x7C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x17, 0xF7, 0x40, 0x00, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0xE9, 0xF4, 0x00, 0x00, 0xFF,
+0xFF, 0xE3, 0xE0, 0x00, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00,
+0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x56, 0x54, 0x00, 0x43, 0x56, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x56, 0x54, 0x31, 0x0A,
+#endif
+0x00, 0xA0, 0x17, 0x12, 0x00, 0xEE, 0xC6, 0x4D, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Faeroe */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23656,81 +24649,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0xFF, 0xFF, 0xF9, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10,
0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
-0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x6D, 0xA4, 0x58, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF9,
-0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x6D, 0xA4, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0xFF, 0xFF, 0xF9, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10,
+0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
+0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45,
+0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Faroe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23774,81 +24769,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0xFF, 0xFF, 0xF9, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10,
0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
-0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x6D, 0xA4, 0x58, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0xFF, 0xFF, 0xF9,
-0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xE7, 0xF5, 0x82, 0x01, 0x08, 0x55, 0x45, 0x00, 0x00, 0x00,
-0x00,
+0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x6D, 0xA4, 0x58, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0xFF, 0xFF, 0xF9, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10,
+0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00,
+0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45,
+0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xE7, 0xF5, 0x82, 0x01, 0x08, 0x55, 0x45, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Jan_Mayen */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -23902,97 +24899,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xEE, 0x24, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x27, 0xE3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0xD4, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xB7, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC,
-0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0,
-0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x62, 0x07, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xAF, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xA8, 0x4C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x98, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE,
-0x88, 0x2E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x78, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
-0x68, 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x58, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2,
-0x47, 0xF2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x37, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x27, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x17, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x10, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x06, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0xF0, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0A, 0x14, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
-0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x24, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x27, 0xE3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD4, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xB7, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x62, 0x07, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xAF, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA8, 0x4C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x98, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x88, 0x2E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x78, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x68, 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x58, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x47, 0xF2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x37, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x27, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x17, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x10, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x06, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF0, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x02, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x00, 0x00, 0x0A, 0x14, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45,
+0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Madeira */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24074,147 +25074,149 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x01, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x44,
0x53, 0x54, 0x00, 0x4D, 0x41, 0x44, 0x54, 0x00, 0x4D, 0x41, 0x44, 0x4D, 0x54, 0x00, 0x57, 0x45,
0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x13, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x92,
-0xE6, 0x9E, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x4B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0xFE, 0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0xFB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D,
-0xC9, 0x91, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x7F, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xAA, 0xC5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1,
-0x8B, 0xF8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x41, 0xE7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3,
-0x6E, 0x7D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x23, 0x1B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5,
-0x4F, 0xB1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x05, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA,
-0xF4, 0x9D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE,
-0xA7, 0x32, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x5D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0,
-0x87, 0x14, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x7A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2,
-0x70, 0x30, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x96, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4,
-0x50, 0x12, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x5A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0F, 0xD6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xC7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9,
-0xEF, 0xB8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xC6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD,
-0xB8, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x6D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF,
-0x98, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9A, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1,
-0x78, 0x7B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x6C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3,
-0x58, 0x5D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x13, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0x38, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xA5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0x58, 0xBA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xED, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9,
-0x01, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF1, 0x2E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xB5, 0x61, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0xEC, 0xB1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x80, 0x59, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC,
-0xDC, 0xB1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x95, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xC3, 0x59, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x72, 0xB0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0xC5, 0xCD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x75, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0xAC, 0x75, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x52, 0x92, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0,
-0xA5, 0xAF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x55, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1,
-0x8C, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x32, 0x74, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x85, 0x91, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x59, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x49, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xDF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x29, 0xD0, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xC1, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x09, 0xB2, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0xA3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE9, 0x94, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xB2, 0x92, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x83, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x92, 0x74, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x65, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x72, 0x56, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x47, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x52, 0x38, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x29, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5,
-0x32, 0x1A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x22, 0x0B, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7,
-0x1B, 0x37, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x28, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xFB, 0x19, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEB, 0x0A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA,
-0xDA, 0xFB, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xBA, 0xDD, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xCE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE,
-0x9A, 0xBF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xB0, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
-0x7A, 0xA1, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0x92, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2,
-0x63, 0xBD, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xAE, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x43, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x90, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x23, 0x81, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x72, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8,
-0x03, 0x63, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x54, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x9B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11,
-0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x43, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xE3, 0xBD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05,
-0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x09, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0xFF, 0xFF, 0xF0, 0x28, 0x00, 0x00, 0xFF,
-0xFF, 0xF0, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00,
-0x0E, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E, 0x00, 0x00, 0x0E,
-0x10, 0x01, 0x13, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x0E, 0x10, 0x01,
-0x19, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x44, 0x53, 0x54, 0x00, 0x4D,
-0x41, 0x44, 0x54, 0x00, 0x4D, 0x41, 0x44, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57,
-0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45, 0x54, 0x30,
-0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xBB, 0x1F, 0xA5, 0x00, 0xF8, 0xDE, 0xF0, 0x00, 0x00,
-0x00, 0x0F, 0x4D, 0x61, 0x64, 0x65, 0x69, 0x72, 0x61, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
-0x73,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x13, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0x92, 0xE6, 0x9E, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x4B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xFE, 0xD5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0xFB, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xC9, 0x91, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x7F, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0xAA, 0xC5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x8B, 0xF8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x41, 0xE7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x6E, 0x7D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x23, 0x1B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x4F, 0xB1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x05, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xF4, 0x9D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x32, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x5D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x14, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x7A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x30, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x96, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x12, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x5A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xD6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xC7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xB8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xC6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x6D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9A, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x7B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x6C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x5D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x13, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xA5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xBA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xED, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x01, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF1, 0x2E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xB5, 0x61, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xEC, 0xB1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x80, 0x59, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xDC, 0xB1, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x95, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xC3, 0x59, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x72, 0xB0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xC5, 0xCD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x75, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0xAC, 0x75, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x52, 0x92, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA5, 0xAF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x55, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x8C, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x32, 0x74, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x85, 0x91, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x59, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x49, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xDF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xD0, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xC1, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0xB2, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0xA3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x94, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xB2, 0x92, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x83, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x92, 0x74, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x65, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x72, 0x56, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x47, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x52, 0x38, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x29, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x32, 0x1A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x22, 0x0B, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x1B, 0x37, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x28, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xFB, 0x19, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEB, 0x0A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xDA, 0xFB, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xBA, 0xDD, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xCE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x9A, 0xBF, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xB0, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x7A, 0xA1, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0x92, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x63, 0xBD, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xAE, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x43, 0x9F, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x90, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x23, 0x81, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x72, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x03, 0x63, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x54, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x9B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x43, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xBD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04,
+0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x09,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0xFF, 0xFF, 0xF0, 0x28, 0x00, 0x00,
+0xFF, 0xFF, 0xF0, 0x28, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0,
+0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x0E, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x13, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x0E, 0x10,
+0x01, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x44, 0x53, 0x54, 0x00,
+0x4D, 0x41, 0x44, 0x54, 0x00, 0x4D, 0x41, 0x44, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00,
+0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x57, 0x45, 0x54,
+0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xBB, 0x1F, 0xA5, 0x00, 0xF8, 0xDE, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0x4D, 0x61, 0x64, 0x65,
+0x69, 0x72, 0x61, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Atlantic/Reykjavik */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24245,67 +25247,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x53,
0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x60,
-0x83, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x91, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xD1,
-0x88, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x72, 0x51, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xD5,
-0x03, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x53, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xB6,
-0x36, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x3C, 0x27, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0xB9,
-0x74, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x1A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x3D,
-0x27, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x17, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x26,
-0x43, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xC3, 0x26, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x06,
-0x25, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xAC, 0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC,
-0xCD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x8C, 0x24, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xBC,
-0xAF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x6C, 0x06, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x9C,
-0x91, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x4B, 0xE8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85,
-0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x2B, 0xCA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x65,
-0x8F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x45,
-0x71, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x25,
-0x53, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E,
-0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xD9, 0x77, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5,
-0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCE,
-0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE,
-0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x8D,
-0xF8, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x6D,
-0xDA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x4D,
-0xBC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x36,
-0xD8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16,
-0xBA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6,
-0x9C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6,
-0x7E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xB6,
-0x60, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x96,
-0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F,
-0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F,
-0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F,
-0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x46, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE,
-0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x28, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x45, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x60, 0x83, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x91, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xD1, 0x88, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x72, 0x51, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xD5, 0x03, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x53, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xB6, 0x36, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x3C, 0x27, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0xB9, 0x74, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x1A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x3D, 0x27, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x17, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x26, 0x43, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xC3, 0x26, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x06, 0x25, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xAC, 0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC, 0xCD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x8C, 0x24, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xBC, 0xAF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x6C, 0x06, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x9C, 0x91, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x4B, 0xE8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x2B, 0xCA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x65, 0x8F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x45, 0x71, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x25, 0x53, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xD9, 0x77, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCE, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x8D, 0xF8, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x6D, 0xDA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x4D, 0xBC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x36, 0xD8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xBA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0x9C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0x7E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xB6, 0x60, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x96, 0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xF3, 0x46, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x28, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x45, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0xFF,
-0xFF, 0xEB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00,
-0x09, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x53, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0xEB, 0x36, 0xD8, 0x00, 0xF1, 0x51, 0x58, 0x00, 0x00,
-0x00, 0x00,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0xFF, 0xFF, 0xEB, 0x60, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0xFF, 0xFF, 0xF1, 0xF0, 0x00,
+0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x49, 0x53, 0x53, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0xEB, 0x36, 0xD8, 0x00, 0xF1, 0x51, 0x58, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/South_Georgia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0xE3, 0xE0,
-0x00, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x69, 0x86, 0xFD, 0xC0, 0x00, 0x01, 0xFF, 0xFF, 0xDD, 0xC0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47,
-0x53, 0x54, 0x32, 0x0A, 0x00, 0x36, 0x86, 0x55, 0x00, 0xDA, 0xE9, 0xAA, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x53, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0xFD, 0xC0, 0x00, 0x01, 0xFF, 0xFF,
+0xDD, 0xC0, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x53, 0x54, 0x32, 0x0A,
+#endif
+0x00, 0x36, 0x86, 0x55, 0x00, 0xDA, 0xE9, 0xAA, 0x00, 0x00, 0x00, 0x00,
+/* Atlantic/St_Helena */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
+0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x71, 0x0A, 0xCD, 0x01, 0x09, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00,
/* Atlantic/Stanley */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24337,70 +25359,59 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0D, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0xFF, 0xFF,
0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D,
0x54, 0x00, 0x46, 0x4B, 0x53, 0x54, 0x00, 0x46, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00,
-0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x44, 0x5F, 0x3C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x5A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x36, 0x03, 0x30, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x3C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x15, 0xE5, 0x30, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0x18, 0x59, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xFF, 0x01, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x3B, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xDE, 0xE3, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x1D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xBE, 0xC5, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0xFF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x36, 0x81, 0x30, 0x00,
-0x00, 0x00, 0x00, 0x19, 0x11, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xBC, 0xB0, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xF1, 0xC4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xAA, 0x64, 0x30, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xD1, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x8A, 0x46, 0x30, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0xA8, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x6A, 0x36, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x88, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x4A, 0x18, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x68, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0xFA, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x48, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x09, 0xDC, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x31, 0x1E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xE9, 0xBE, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x28, 0x11, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0xDA, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xF0, 0xE2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xB2, 0xBC, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xD0, 0xC4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x92, 0x9E, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0xB0, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x72, 0x80, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x90, 0x88, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x52, 0x62, 0xC0, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x79, 0xA4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x3B, 0x7F, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x59, 0x86, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x1B, 0x61, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x39, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0xFB, 0x43, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x37, 0x19, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xDB, 0x25, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xF9, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xBB, 0x07, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xD9, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x91, 0xCA, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xC2, 0x47, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x71, 0xAC, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0xA2, 0x29, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x5A, 0xC9, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x82, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3A, 0xAB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x61, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1A, 0x8D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x41, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0xFA, 0x6F, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x21, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x46, 0xDA, 0x51, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x48, 0x0A, 0xCD, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xC3, 0x6D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xEA, 0xAF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xA3, 0x4F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xCA, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x83, 0x31, 0xE0, 0x00,
-0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x06, 0xFF, 0xFF, 0xC9, 0xC4, 0x00, 0x00, 0xFF, 0xFF, 0xC9, 0xC4,
-0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF,
-0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x46, 0x4B,
-0x53, 0x54, 0x00, 0x46, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4B, 0x53, 0x54, 0x33, 0x0A, 0x00, 0x3A,
-0x70, 0xEF, 0x00, 0xBA, 0x62, 0xD8, 0x00, 0x00, 0x00, 0x00,
-
-/* Atlantic/St_Helena */
-0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
-0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x92, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0xFC, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x71, 0x0A, 0xCD, 0x01, 0x09,
-0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x11, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x93, 0x44, 0x5F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x5A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x36, 0x03, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x3C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x15, 0xE5, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x18, 0x59, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xFF, 0x01, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x3B, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xDE, 0xE3, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x1D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xBE, 0xC5, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0xFF, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x36, 0x81, 0x30, 0x00, 0x00, 0x00, 0x00, 0x19, 0x11, 0xFE, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xC4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xAA, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x8A, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xA8, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x6A, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x88, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x4A, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x68, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x29, 0xFA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x48, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x09, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x31, 0x1E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x26, 0xE9, 0xBE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0x11, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xD2, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xF0, 0xE2, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xB2, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xD0, 0xC4, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0x92, 0x9E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xB0, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x72, 0x80, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x90, 0x88, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x52, 0x62, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x79, 0xA4, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x3B, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33, 0x59, 0x86, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x1B, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35, 0x39, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0xFB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37, 0x19, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xDB, 0x25, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xF9, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xBB, 0x07, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xD9, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0x91, 0xCA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC2, 0x47, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x71, 0xAC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xA2, 0x29, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x5A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x82, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x3A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x61, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x1A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x41, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x44, 0xFA, 0x6F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x46, 0x21, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x46, 0xDA, 0x51, 0x60, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0A, 0xCD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xC3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xEA, 0xAF, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xA3, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xCA, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x83, 0x31, 0xE0, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x06, 0xFF, 0xFF, 0xC9, 0xC4, 0x00,
+0x00, 0xFF, 0xFF, 0xC9, 0xC4, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xC7,
+0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x0D, 0xFF,
+0xFF, 0xD5, 0xD0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53,
+0x4D, 0x54, 0x00, 0x46, 0x4B, 0x53, 0x54, 0x00, 0x46, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4B, 0x53,
+0x54, 0x33, 0x0A,
+#endif
+0x00, 0x3A, 0x70, 0xEF, 0x00, 0xBA, 0x62, 0xD8, 0x00, 0x00, 0x00, 0x00,
/* Australia/ACT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24453,82 +25464,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -24536,13 +25548,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00,
-0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
-0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
+0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Adelaide */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24595,83 +25609,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x05, 0x00, 0x00,
0x85, 0x98, 0x00, 0x00, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x05, 0x00, 0x00, 0x85, 0x98, 0x00, 0x00,
0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x8B, 0x14,
-0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x40, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x22, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x04, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xE6, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC8, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xE5, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC7, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA9, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x8B, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x6D, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x4F, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0xA6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x6B, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x4D, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x2F, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x11, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB9, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xD5, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xF2, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xD4, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x66, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xB6, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x98, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x64, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x7A, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x96, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x28, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x78, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x45, 0x08, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x5A, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x3C, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x1E, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x00, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x1D, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xFF, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE1, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xC3, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xA5, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC1, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xA3, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x85, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x67, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x9A, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x7C, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x5E, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x40, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x5C, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x3E, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x20, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0x02, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xE4, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xC6, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xE3, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xC5, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA7, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x89, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x6B, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x4D, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x69, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x4B, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x2D, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x0F, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xF1, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x0E, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xF0, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xD2, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xB4, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x96, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x78, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x94, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x76, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x58, 0x88,
-0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x8B, 0x14, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x22, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x04, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xE6, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC8, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xE5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC7, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xE7, 0xA6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x6B, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB9, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xF2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x02, 0x66, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xCB, 0x64, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x96, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x8B, 0x28, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x45, 0x08, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x1D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x9A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x7C, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x5E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x5C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x3E, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xE4, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xC6, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xE3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xC5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA7, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x89, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x4D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x69, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x4B, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x2D, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x0F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xF1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xD2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xB4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x96, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x94, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x76, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x58, 0x88, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
@@ -24679,14 +25694,16 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x00, 0x00, 0x81, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8,
-0x01, 0x09, 0x00, 0x00, 0x85, 0x98, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00,
-0x85, 0x98, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41,
-0x43, 0x53, 0x54, 0x2D, 0x39, 0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x54,
-0x0C, 0xED, 0x01, 0xE6, 0x1E, 0x9D, 0x00, 0x00, 0x00, 0x0F, 0x53, 0x6F, 0x75, 0x74, 0x68, 0x20,
-0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6C, 0x69, 0x61,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0x81, 0xEC,
+0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00,
+0x85, 0x98, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00, 0x85, 0x98, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D,
+0x39, 0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30,
+0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x54, 0x0C, 0xED, 0x01, 0xE6, 0x1E, 0x9D, 0x00, 0x00, 0x00, 0x0F, 0x53, 0x6F, 0x75, 0x74,
+0x68, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6C, 0x69, 0x61,
/* Australia/Brisbane */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24700,26 +25717,29 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x8F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C,
0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C,
0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xED, 0x9F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C,
-0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
-0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xAF, 0xAE, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x8F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01,
-0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54,
-0x2D, 0x31, 0x30, 0x0A, 0x00, 0x5F, 0x6B, 0x15, 0x01, 0xFC, 0x2B, 0x25, 0x00, 0x00, 0x00, 0x1B,
-0x51, 0x75, 0x65, 0x65, 0x6E, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73,
-0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xED, 0x9F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00,
+0x8F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
+0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x5F, 0x6B, 0x15, 0x01, 0xFC, 0x2B, 0x25, 0x00, 0x00, 0x00, 0x17, 0x51, 0x75, 0x65, 0x65,
+0x6E, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65,
+0x61, 0x73, 0x29,
/* Australia/Broken_Hill */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24772,101 +25792,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x93,
0xA8, 0x01, 0x05, 0x00, 0x00, 0x85, 0x98, 0x00, 0x00, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x05, 0x00,
0x00, 0x85, 0x98, 0x00, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x73, 0x16, 0x88, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0x76, 0x04, 0xA5, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x40, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x22, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x04, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xE6, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC8, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xE5, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC7, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA9, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x8B, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x6D, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x4F, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x0C, 0x90, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x6B, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x4D, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x2F, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x11, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB9, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xD5, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xF2, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xD4, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xEF, 0xF1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xB6, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x98, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xAF, 0xB5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x7A, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x96, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x78, 0xB3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x78, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x58, 0x95, 0x88, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x5A, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x3C, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x1E, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x00, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x1D, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x6C, 0xAF, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFA, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDA, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBA, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9A, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x83, 0xC1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x63, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xE7, 0x9A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xC7, 0x7C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xA7, 0x5E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x87, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x70, 0x5C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x50, 0x3E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x30, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x10, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x57, 0xEF, 0xE4, 0x88, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xCF, 0xC6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xB8, 0xE3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0x98, 0xC5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x78, 0xA7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x58, 0x89, 0x08, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x38, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x18, 0x4D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x01, 0x69, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xE1, 0x4B, 0x88, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xC1, 0x2D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xA1, 0x0F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0x80, 0xF1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x6A, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x49, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x29, 0xD2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x09, 0xB4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x77, 0xE9, 0x96, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xC9, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xB2, 0x94, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0x92, 0x76, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x72, 0x58, 0x88, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x84, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x0E, 0x00,
-0x00, 0x85, 0x98, 0x00, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x0E, 0x00, 0x00, 0x85, 0x98, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41,
-0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D, 0x39, 0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F,
-0x33, 0x0A, 0x00, 0x58, 0x93, 0xC8, 0x01, 0xEA, 0x7E, 0x68, 0x00, 0x00, 0x00, 0x1C, 0x4E, 0x65,
-0x77, 0x20, 0x53, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x57, 0x61, 0x6C, 0x65, 0x73, 0x20, 0x2D, 0x20,
-0x59, 0x61, 0x6E, 0x63, 0x6F, 0x77, 0x69, 0x6E, 0x6E, 0x61,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x88, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0x76, 0x04, 0xA5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x22, 0x88, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x04, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xE6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC8, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xE5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0x90, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x6B, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xF2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xF1, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xB5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x96, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xB3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x95, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x1D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0xAF, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x9A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x7C, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x5E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x5C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x3E, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xE4, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xC6, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xE3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xC5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA7, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x89, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x4D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x69, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x4B, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x2D, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x0F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xF1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xD2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xB4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x96, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x94, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x76, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x58, 0x88, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00,
+0x84, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09,
+0x00, 0x00, 0x93, 0xA8, 0x01, 0x0E, 0x00, 0x00, 0x85, 0x98, 0x00, 0x09, 0x00, 0x00, 0x93, 0xA8,
+0x01, 0x0E, 0x00, 0x00, 0x85, 0x98, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54,
+0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D, 0x39,
+0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C,
+0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x58, 0x93, 0xC8, 0x01, 0xEA, 0x7E, 0x68, 0x00, 0x00, 0x00, 0x1C, 0x4E, 0x65, 0x77, 0x20,
+0x53, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x57, 0x61, 0x6C, 0x65, 0x73, 0x20, 0x28, 0x59, 0x61, 0x6E,
+0x63, 0x6F, 0x77, 0x69, 0x6E, 0x6E, 0x61, 0x29,
/* Australia/Canberra */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -24919,82 +25942,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -25002,13 +26026,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00,
-0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
-0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
+0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Currie */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25061,82 +26087,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00,
0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x74, 0x2E, 0x04, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x03, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xE3, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x67, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xED, 0xE1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCD, 0xC3, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAD, 0xA5, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8D, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6D, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x56, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x36, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x9F, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0xEE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5E, 0xD0, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3E, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x07, 0xB1, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0x2E, 0x04, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF4, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xED, 0xE1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCD, 0xC3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAD, 0xA5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8D, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x56, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x36, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x16, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xBF, 0x2A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x9F, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7E, 0xEE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5E, 0xD0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3E, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1E, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x07, 0xB1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -25144,15 +26171,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x86, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53,
-0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x4C, 0x65, 0x4A, 0x01, 0xEE, 0x2E, 0x6A, 0x00, 0x00, 0x00, 0x16, 0x54, 0x61, 0x73, 0x6D, 0x61,
-0x6E, 0x69, 0x61, 0x20, 0x2D, 0x20, 0x4B, 0x69, 0x6E, 0x67, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E,
-0x64,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00,
+0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x4C, 0x65, 0x4A, 0x01, 0xEE, 0x2E, 0x6A, 0x00, 0x00, 0x00, 0x16, 0x54, 0x61, 0x73, 0x6D,
+0x61, 0x6E, 0x69, 0x61, 0x20, 0x28, 0x4B, 0x69, 0x6E, 0x67, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E,
+0x64, 0x29,
/* Australia/Darwin */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25162,22 +26191,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xCC, 0xB7, 0x5D, 0x88, 0xCD, 0xA7, 0x40, 0x78, 0xCE, 0xA0, 0x7A, 0x08, 0xCF, 0x87, 0x22, 0x78,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00,
0x00, 0x93, 0xA8, 0x01, 0x05, 0x00, 0x00, 0x85, 0x98, 0x00, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00,
-0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x92, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00,
-0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x7A, 0xA8, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00, 0x85, 0x98,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D, 0x39, 0x3A,
-0x33, 0x30, 0x0A, 0x00, 0x76, 0x4E, 0x75, 0x01, 0xDA, 0x4B, 0x45, 0x00, 0x00, 0x00, 0x12, 0x4E,
-0x6F, 0x72, 0x74, 0x68, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x65, 0x72, 0x72, 0x69, 0x74, 0x6F, 0x72,
-0x79,
+0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x92, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x87, 0x22, 0x78, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00,
+0x00, 0x7A, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01,
+0x09, 0x00, 0x00, 0x85, 0x98, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00,
+0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43,
+0x53, 0x54, 0x2D, 0x39, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0x76, 0x4E, 0x75, 0x01, 0xDA, 0x4B, 0x45, 0x00, 0x00, 0x00, 0x12, 0x4E, 0x6F, 0x72, 0x74,
+0x68, 0x65, 0x72, 0x6E, 0x20, 0x54, 0x65, 0x72, 0x72, 0x69, 0x74, 0x6F, 0x72, 0x79,
/* Australia/Eucla */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25192,28 +26223,31 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x89, 0x1C, 0x01, 0x04, 0x00, 0x00, 0x7B, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x89,
0x1C, 0x01, 0x04, 0x00, 0x00, 0x7B, 0x0C, 0x00, 0x0A, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x57,
0x44, 0x54, 0x00, 0x41, 0x43, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xA6, 0x0A, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xB8, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x32, 0x84, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xC4, 0x94, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x69, 0x04, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x68, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x4B, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x0F, 0xF1, 0x14, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x0E, 0x14, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x01, 0x58, 0x14, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x75, 0x14, 0x00,
-0x00, 0x00, 0x00, 0x29, 0x25, 0x52, 0x14, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xBF, 0x94, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x71, 0xB4, 0x94, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x5C, 0x94, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x23, 0x72, 0x14, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x79, 0x14, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x03, 0x54, 0x14, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x5B, 0x14, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x00, 0x00, 0x78, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x89, 0x1C, 0x01, 0x04, 0x00,
-0x00, 0x7B, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x89, 0x1C, 0x01, 0x04, 0x00, 0x00, 0x7B, 0x0C, 0x00,
-0x0A, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x57, 0x44, 0x54, 0x00, 0x41, 0x43, 0x57, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x57, 0x53,
-0x54, 0x2D, 0x38, 0x3A, 0x34, 0x35, 0x0A, 0x00, 0x58, 0xEE, 0xED, 0x01, 0xD7, 0x4B, 0x0A, 0x00,
-0x00, 0x00, 0x1E, 0x57, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72,
-0x61, 0x6C, 0x69, 0x61, 0x20, 0x2D, 0x20, 0x45, 0x75, 0x63, 0x6C, 0x61, 0x20, 0x61, 0x72, 0x65,
-0x61,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xA6, 0x0A, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xB8, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x32, 0x84, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xC4, 0x94, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x69, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x68, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x4B, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xF1, 0x14, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x0E, 0x14, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x58, 0x14, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x75, 0x14, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x25, 0x52, 0x14, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xBF, 0x94, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x71, 0xB4, 0x94, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x5C, 0x94, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x72, 0x14, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x79, 0x14, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x54, 0x14, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x5B, 0x14, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x78, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x89, 0x1C, 0x01, 0x04, 0x00, 0x00, 0x7B, 0x0C,
+0x00, 0x0A, 0x00, 0x00, 0x89, 0x1C, 0x01, 0x04, 0x00, 0x00, 0x7B, 0x0C, 0x00, 0x0A, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x43, 0x57, 0x44, 0x54, 0x00, 0x41, 0x43, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x57, 0x53, 0x54, 0x2D, 0x38,
+0x3A, 0x34, 0x35, 0x0A,
+#endif
+0x00, 0x58, 0xEE, 0xED, 0x01, 0xD7, 0x4B, 0x0A, 0x00, 0x00, 0x00, 0x19, 0x57, 0x65, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6C, 0x69, 0x61, 0x20, 0x28, 0x45,
+0x75, 0x63, 0x6C, 0x61, 0x29,
/* Australia/Hobart */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25269,6 +26303,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0,
0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54,
0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
@@ -25361,10 +26396,11 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53,
0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x47, 0xE4, 0xF2, 0x01, 0xF3, 0x72, 0x12, 0x00, 0x00, 0x00, 0x19, 0x54, 0x61, 0x73, 0x6D, 0x61,
-0x6E, 0x69, 0x61, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74,
-0x69, 0x6F, 0x6E, 0x73,
+0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x47, 0xE4, 0xF2, 0x01, 0xF3, 0x72, 0x12, 0x00, 0x00, 0x00, 0x15, 0x54, 0x61, 0x73, 0x6D,
+0x61, 0x6E, 0x69, 0x61, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73,
+0x29,
/* Australia/LHI */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25409,81 +26445,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x01, 0x09, 0x00, 0x00, 0x93,
0xA8, 0x00, 0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53,
0x54, 0x00, 0x4C, 0x48, 0x44, 0x54, 0x00, 0x4C, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16,
-0x77, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38,
-0x40, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x8A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21,
-0x5D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x6C, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01,
-0x3F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x4E, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0x21, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0x03, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97,
-0xAA, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80,
-0xC7, 0x78, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69,
-0xE3, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x6E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49,
-0xC5, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29,
-0xA7, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09,
-0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9,
-0x6B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2,
-0x88, 0x78, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2,
-0x6A, 0x78, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92,
-0x4C, 0x78, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72,
-0x2E, 0x78, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0x10, 0x78, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31,
-0xF2, 0x78, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7,
-0xE2, 0x78, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA,
-0xD2, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA,
-0xB4, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A,
-0x96, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83,
-0xB3, 0x78, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63,
-0x95, 0x78, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0x95, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43,
-0x77, 0x78, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23,
-0x59, 0x78, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7,
-0x8B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x75, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7,
-0x6D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x57, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7,
-0x4F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87,
-0x31, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70,
-0x4E, 0x78, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50,
-0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30,
-0x12, 0x78, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F,
-0xF4, 0x78, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF,
-0xD6, 0x78, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF,
-0xB8, 0x78, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xA2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8,
-0xD4, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xBE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98,
-0xB6, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78,
-0x98, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58,
-0x7A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38,
-0x5C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18,
-0x3E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x63, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01,
-0x5B, 0x78, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1,
-0x3D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1,
-0x1F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1,
-0x01, 0x78, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80,
-0xE3, 0x78, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x69,
-0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49,
-0xE1, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29,
-0xC3, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09,
-0xA5, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9,
-0x87, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x71, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9,
-0x69, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x53, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2,
-0x86, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92,
-0x68, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72,
-0x4A, 0x78, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x77, 0xDC, 0x00, 0x00, 0x00, 0x00,
+0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x40, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xE7, 0x8A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x5D, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xC7, 0x6C, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x3F, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xA7, 0x4E, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x21, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x87, 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x03, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x79, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xAA, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x59, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xC7, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x42, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xE3, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x22, 0x6E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xC5, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xEF, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xA7, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xCF, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xAF, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x6B, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0x98, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x88, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x78, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x6A, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x58, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x4C, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x2E, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x10, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF2, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE2, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xD2, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xB4, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x96, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xB3, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x95, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2E, 0x95, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x77, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x59, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x8B, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x75, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x6D, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x57, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x4F, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x31, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x4E, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x12, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x1F, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xF4, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xD6, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xB8, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0xA2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xD4, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xBE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xB6, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0x98, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x7A, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x5C, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x3E, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x63, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x5B, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x3D, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x1F, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x01, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x90, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xE3, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x69, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE1, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xC3, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xA5, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x87, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x71, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x69, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x53, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x86, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x68, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x4A, 0x78, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x95, 0x24, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x01, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x00, 0x0E, 0x00, 0x00,
-0x9A, 0xB0, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x4C, 0x48, 0x44,
-0x54, 0x00, 0x4C, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x4C, 0x48, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x3A, 0x33, 0x30, 0x4C, 0x48, 0x44, 0x54,
-0x2D, 0x31, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x95, 0x24, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8,
+0x01, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x00, 0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x4C, 0x48, 0x44, 0x54, 0x00, 0x4C, 0x48, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4C, 0x48, 0x53, 0x54,
+0x2D, 0x31, 0x30, 0x3A, 0x33, 0x30, 0x4C, 0x48, 0x44, 0x54, 0x2D, 0x31, 0x31, 0x2C, 0x4D, 0x31,
+0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Lindeman */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25499,6 +26538,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0,
0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54,
0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
@@ -25518,10 +26558,11 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x6A, 0x67, 0x95, 0x01, 0xF6,
-0x03, 0xA0, 0x00, 0x00, 0x00, 0x1C, 0x51, 0x75, 0x65, 0x65, 0x6E, 0x73, 0x6C, 0x61, 0x6E, 0x64,
-0x20, 0x2D, 0x20, 0x48, 0x6F, 0x6C, 0x69, 0x64, 0x61, 0x79, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E,
-0x64, 0x73,
+0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x6A, 0x67, 0x95, 0x01, 0xF6, 0x03, 0xA0, 0x00, 0x00, 0x00, 0x1F, 0x51, 0x75, 0x65, 0x65,
+0x6E, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x57, 0x68, 0x69, 0x74, 0x73, 0x75, 0x6E, 0x64,
+0x61, 0x79, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, 0x29,
/* Australia/Lord_Howe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25566,82 +26607,85 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x01, 0x09, 0x00, 0x00, 0x93,
0xA8, 0x00, 0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53,
0x54, 0x00, 0x4C, 0x48, 0x44, 0x54, 0x00, 0x4C, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16,
-0x77, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38,
-0x40, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x8A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21,
-0x5D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x6C, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01,
-0x3F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x4E, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0x21, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0x03, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97,
-0xAA, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80,
-0xC7, 0x78, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69,
-0xE3, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x6E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49,
-0xC5, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29,
-0xA7, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09,
-0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9,
-0x6B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2,
-0x88, 0x78, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2,
-0x6A, 0x78, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92,
-0x4C, 0x78, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72,
-0x2E, 0x78, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0x10, 0x78, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31,
-0xF2, 0x78, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7,
-0xE2, 0x78, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA,
-0xD2, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA,
-0xB4, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A,
-0x96, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83,
-0xB3, 0x78, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63,
-0x95, 0x78, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0x95, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43,
-0x77, 0x78, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23,
-0x59, 0x78, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7,
-0x8B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x75, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7,
-0x6D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x57, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7,
-0x4F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87,
-0x31, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70,
-0x4E, 0x78, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50,
-0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30,
-0x12, 0x78, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F,
-0xF4, 0x78, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF,
-0xD6, 0x78, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF,
-0xB8, 0x78, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xA2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8,
-0xD4, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xBE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98,
-0xB6, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78,
-0x98, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58,
-0x7A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38,
-0x5C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18,
-0x3E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x63, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01,
-0x5B, 0x78, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1,
-0x3D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1,
-0x1F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1,
-0x01, 0x78, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80,
-0xE3, 0x78, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x69,
-0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49,
-0xE1, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29,
-0xC3, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09,
-0xA5, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9,
-0x87, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x71, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9,
-0x69, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x53, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2,
-0x86, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92,
-0x68, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72,
-0x4A, 0x78, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x77, 0xDC, 0x00, 0x00, 0x00, 0x00,
+0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x40, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xE7, 0x8A, 0x68, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x5D, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xC7, 0x6C, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x3F, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xA7, 0x4E, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x21, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x87, 0x30, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x03, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x79, 0x8E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xAA, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x59, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xC7, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x42, 0x8C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xE3, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x22, 0x6E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xC5, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xEF, 0xDB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xA7, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xCF, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xAF, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x6B, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0x98, 0xBC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x88, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x78, 0x9E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x6A, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x58, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x4C, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x4C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x2E, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x2E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x10, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF2, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFC, 0xF2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xD4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE2, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xB6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xD2, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xD2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xB4, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x96, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0x96, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xB3, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x95, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2E, 0x95, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x77, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x59, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x8B, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x75, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x6D, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x57, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x4F, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x31, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x4E, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x12, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x1F, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xF4, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xD6, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xB8, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0xA2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xD4, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xBE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xB6, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0x98, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x7A, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x5C, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x3E, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x63, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x5B, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x3D, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x1F, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x01, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x90, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xE3, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x69, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE1, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xCB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xC3, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0xAD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xA5, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0x8F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x87, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x71, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x69, 0xF8, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x53, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x86, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x68, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x52, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x4A, 0x78, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x95, 0x24, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x01, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x00, 0x0E, 0x00, 0x00,
-0x9A, 0xB0, 0x01, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x4C, 0x48, 0x44,
-0x54, 0x00, 0x4C, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x4C, 0x48, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x3A, 0x33, 0x30, 0x4C, 0x48, 0x44, 0x54,
-0x2D, 0x31, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31,
-0x2E, 0x30, 0x0A, 0x00, 0x59, 0x30, 0x08, 0x02, 0x05, 0x66, 0x6D, 0x00, 0x00, 0x00, 0x10, 0x4C,
-0x6F, 0x72, 0x64, 0x20, 0x48, 0x6F, 0x77, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
+0x00, 0x00, 0x95, 0x24, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8,
+0x01, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x00, 0x0E, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x4C, 0x48, 0x44, 0x54, 0x00, 0x4C, 0x48, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4C, 0x48, 0x53, 0x54,
+0x2D, 0x31, 0x30, 0x3A, 0x33, 0x30, 0x4C, 0x48, 0x44, 0x54, 0x2D, 0x31, 0x31, 0x2C, 0x4D, 0x31,
+0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x59, 0x30, 0x08, 0x02, 0x05, 0x66, 0x6D, 0x00, 0x00, 0x00, 0x10, 0x4C, 0x6F, 0x72, 0x64,
+0x20, 0x48, 0x6F, 0x77, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
/* Australia/Melbourne */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25694,82 +26738,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x87, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0x85, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x16, 0xE7, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x77, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x85, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x77, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -25777,14 +26822,16 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x87, 0xE8, 0x00,
-0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
-0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x4F, 0xA0, 0x1D, 0x01, 0xEF, 0xDC, 0x1A, 0x00, 0x00, 0x00, 0x08, 0x56, 0x69, 0x63, 0x74, 0x6F,
-0x72, 0x69, 0x61,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x87, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
+0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x4F, 0xA0, 0x1D, 0x01, 0xEF, 0xDC, 0x1A, 0x00, 0x00, 0x00, 0x08, 0x56, 0x69, 0x63, 0x74,
+0x6F, 0x72, 0x69, 0x61,
/* Australia/North */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25794,20 +26841,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xCC, 0xB7, 0x5D, 0x88, 0xCD, 0xA7, 0x40, 0x78, 0xCE, 0xA0, 0x7A, 0x08, 0xCF, 0x87, 0x22, 0x78,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00,
0x00, 0x93, 0xA8, 0x01, 0x05, 0x00, 0x00, 0x85, 0x98, 0x00, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00,
-0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x92, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00,
-0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x7A, 0xA8, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00, 0x85, 0x98,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D, 0x39, 0x3A,
-0x33, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x92, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x87, 0x22, 0x78, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00,
+0x00, 0x7A, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01,
+0x09, 0x00, 0x00, 0x85, 0x98, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00,
+0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43,
+0x53, 0x54, 0x2D, 0x39, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/NSW */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25860,82 +26910,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -25943,13 +26994,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00,
-0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
-0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
+0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Perth */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25964,27 +27017,30 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E,
0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x57, 0x44,
0x54, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xA6, 0x16, 0xE4, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9C, 0x4E, 0xC2, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x3D, 0x10, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0x54, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x73, 0x90, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCC, 0xB7, 0x72, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x55, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x0F, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x18, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x7F, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x25, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xCA, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x71, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x67, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x83, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x65, 0xA0, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x00, 0x00, 0x6C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
-0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x57, 0x44, 0x54, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x57, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00,
-0x58, 0x93, 0xC8, 0x01, 0xC3, 0x6E, 0x68, 0x00, 0x00, 0x00, 0x22, 0x57, 0x65, 0x73, 0x74, 0x65,
-0x72, 0x6E, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6C, 0x69, 0x61, 0x20, 0x2D, 0x20, 0x6D,
-0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xA6, 0x16, 0xE4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xC2, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x73, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x72, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x55, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x7F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x25, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x71, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x65, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x6C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80,
+0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x57, 0x44, 0x54, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x57, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x58, 0x93, 0xC8, 0x01, 0xC3, 0x6E, 0x68, 0x00, 0x00, 0x00, 0x1E, 0x57, 0x65, 0x73, 0x74,
+0x65, 0x72, 0x6E, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6C, 0x69, 0x61, 0x20, 0x28, 0x6D,
+0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* Australia/Queensland */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -25998,25 +27054,27 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x8F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C,
0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C,
0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xED, 0x9F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C,
-0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
-0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xAF, 0xAE, 0x00, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x8F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01,
-0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54,
-0x2D, 0x31, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xED, 0x9F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00,
+0x8F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
+0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/South */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26069,83 +27127,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x05, 0x00, 0x00,
0x85, 0x98, 0x00, 0x00, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x05, 0x00, 0x00, 0x85, 0x98, 0x00, 0x00,
0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x8B, 0x14,
-0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x40, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x22, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x04, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xE6, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC8, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xE5, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC7, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA9, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x8B, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x6D, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x4F, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0xA6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x6B, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x4D, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x2F, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x11, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB9, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xD5, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xF2, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xD4, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x66, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xB6, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x98, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x64, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x7A, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x96, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x28, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x78, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x45, 0x08, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x5A, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x3C, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x1E, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x00, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x1D, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xFF, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE1, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xC3, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xA5, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC1, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xA3, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x85, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x67, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x9A, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x7C, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x5E, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x40, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x5C, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x3E, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x20, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0x02, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xE4, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xC6, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xE3, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xC5, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA7, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x89, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x6B, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x4D, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x69, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x4B, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x2D, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x0F, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xF1, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x0E, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xF0, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xD2, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xB4, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x96, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x78, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x94, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x76, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x58, 0x88,
-0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x8B, 0x14, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x22, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x04, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xE6, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC8, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xE5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC7, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xE7, 0xA6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x6B, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB9, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xF2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x02, 0x66, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xCB, 0x64, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x96, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x8B, 0x28, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x45, 0x08, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x1D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x9A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x7C, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x5E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x5C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x3E, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xE4, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xC6, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xE3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xC5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA7, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x89, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x4D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x69, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x4B, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x2D, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x0F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xF1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xD2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xB4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x96, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x94, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x76, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x58, 0x88, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
@@ -26153,13 +27212,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x00, 0x00, 0x81, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8,
-0x01, 0x09, 0x00, 0x00, 0x85, 0x98, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00,
-0x85, 0x98, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41,
-0x43, 0x53, 0x54, 0x2D, 0x39, 0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0x81, 0xEC,
+0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00,
+0x85, 0x98, 0x00, 0x04, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x09, 0x00, 0x00, 0x85, 0x98, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D,
+0x39, 0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30,
+0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Sydney */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26212,82 +27273,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x7F, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xEA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x8E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -26295,15 +27357,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00,
-0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
-0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x55, 0xA7, 0x15, 0x01, 0xF9, 0x65, 0x82, 0x00, 0x00, 0x00, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x53,
-0x6F, 0x75, 0x74, 0x68, 0x20, 0x57, 0x61, 0x6C, 0x65, 0x73, 0x20, 0x2D, 0x20, 0x6D, 0x6F, 0x73,
-0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x8D, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
+0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x55, 0xA7, 0x15, 0x01, 0xF9, 0x65, 0x82, 0x00, 0x00, 0x00, 0x1C, 0x4E, 0x65, 0x77, 0x20,
+0x53, 0x6F, 0x75, 0x74, 0x68, 0x20, 0x57, 0x61, 0x6C, 0x65, 0x73, 0x20, 0x28, 0x6D, 0x6F, 0x73,
+0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* Australia/Tasmania */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26359,6 +27423,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0,
0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54,
0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
@@ -26451,8 +27516,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB0, 0x01, 0x09, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53,
0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Victoria */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26505,82 +27571,83 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x00, 0x00, 0x87, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00,
0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09,
0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0x85, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x16, 0xE7, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x77, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x85, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xA6, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x20, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x56, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x39, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x1B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x2F, 0xFD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xDF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB5, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x77, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xCA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xAC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x5A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x31, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xA7, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xC4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDA, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBA, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xA5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x83, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0x9C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xA3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xE7, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xC7, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xA7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x87, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x70, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x50, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x30, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x0F, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xEF, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xCF, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xB8, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x98, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x58, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x38, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x18, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x71, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x01, 0x62, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xE1, 0x44, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xC1, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xA1, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x80, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x6A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x49, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x29, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x09, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x9E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE9, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC9, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xB2, 0x8D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x7E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x92, 0x6F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x72, 0x51, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
@@ -26588,13 +27655,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x87, 0xE8, 0x00,
-0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A,
-0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44,
-0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31, 0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31,
-0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x00, 0x00, 0x87, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00,
+0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x44, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x45, 0x53, 0x54, 0x2D, 0x31,
+0x30, 0x41, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34,
+0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/West */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26609,25 +27678,28 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E,
0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x57, 0x44,
0x54, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xA6, 0x16, 0xE4, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9C, 0x4E, 0xC2, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x3D, 0x10, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0x54, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x73, 0x90, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCC, 0xB7, 0x72, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x55, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x0F, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x18, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x7F, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x25, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xCA, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x71, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x67, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x83, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x65, 0xA0, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x00, 0x00, 0x6C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
-0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x57, 0x44, 0x54, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x57, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xA6, 0x16, 0xE4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xC2, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x73, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x72, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x55, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xFB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x62, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x7F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x25, 0x5C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x71, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0x7C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0x83, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x5E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x65, 0xA0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x6C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80,
+0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x57, 0x44, 0x54, 0x00, 0x41, 0x57, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x57, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Australia/Yancowinna */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26680,99 +27752,102 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x93,
0xA8, 0x01, 0x05, 0x00, 0x00, 0x85, 0x98, 0x00, 0x00, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x05, 0x00,
0x00, 0x85, 0x98, 0x00, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00,
-0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x73, 0x16, 0x88, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0x76, 0x04, 0xA5, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0x40, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0x22, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x04, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xE6, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xC8, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xE5, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xC7, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xA9, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x8B, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x6D, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x4F, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x0C, 0x90, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x6B, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x4D, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x2F, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x11, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x97, 0xB9, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xD5, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xF2, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0x49, 0xD4, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xEF, 0xF1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0x29, 0xB6, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0x09, 0x98, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xAF, 0xB5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0x7A, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD2, 0x96, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x78, 0xB3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB2, 0x78, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x58, 0x95, 0x88, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0x5A, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x3C, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x1E, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x00, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x1D, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x6C, 0xAF, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFA, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDA, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBA, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9A, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x83, 0xC1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x63, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xE7, 0x9A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xC7, 0x7C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xA7, 0x5E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x87, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x70, 0x5C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x50, 0x3E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x30, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x10, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x57, 0xEF, 0xE4, 0x88, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xCF, 0xC6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xB8, 0xE3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0x98, 0xC5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x78, 0xA7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x58, 0x89, 0x08, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x38, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x18, 0x4D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x01, 0x69, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xE1, 0x4B, 0x88, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xC1, 0x2D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xA1, 0x0F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0x80, 0xF1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x6A, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x49, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x29, 0xD2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x09, 0xB4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x77, 0xE9, 0x96, 0x08, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xC9, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xB2, 0x94, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0x92, 0x76, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x72, 0x58, 0x88, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x84, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x0E, 0x00,
-0x00, 0x85, 0x98, 0x00, 0x09, 0x00, 0x00, 0x93, 0xA8, 0x01, 0x0E, 0x00, 0x00, 0x85, 0x98, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41,
-0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D, 0x39, 0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F,
-0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0x88, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0x76, 0x04, 0xA5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0x12, 0x03, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4E, 0xAD, 0xA4, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x27, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x54, 0xBA, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xC7, 0x5E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xB7, 0x5D, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA7, 0x40, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA0, 0x7A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x87, 0x22, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0D, 0x23, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0x22, 0x88, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF6, 0x3F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x04, 0x88, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD6, 0x21, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x0F, 0xE6, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0xB6, 0x03, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xC8, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9F, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xE5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7F, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xC7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xE4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xC6, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0xA8, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x8A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0x90, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x6B, 0x88, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x4C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x79, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x97, 0xB9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x22, 0x42, 0xA2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xF2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x24, 0x22, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x49, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x25, 0xEF, 0xF1, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x29, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x27, 0xCF, 0xD3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x09, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x29, 0xAF, 0xB5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x98, 0xD1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD2, 0x96, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x78, 0xB3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB2, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x58, 0x95, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x92, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0x61, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x43, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x25, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x1D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6C, 0xAF, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDC, 0xE9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFA, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBC, 0xCB, 0x88, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDA, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA5, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBA, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x85, 0xCA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9A, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x65, 0xAC, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x83, 0xC1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xA3, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2E, 0xAA, 0x88, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0x52, 0x08, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0xA9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0x9A, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xC7, 0x7C, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x6D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA7, 0x5E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x31, 0x08, 0x00, 0x00, 0x00, 0x00, 0x50, 0x70, 0x5C, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0x3E, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x2F, 0x88, 0x00, 0x00, 0x00, 0x00, 0x54, 0x30, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0x11, 0x88, 0x00, 0x00, 0x00, 0x00, 0x56, 0x10, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xF3, 0x88, 0x00, 0x00, 0x00, 0x00, 0x57, 0xEF, 0xE4, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xD5, 0x88, 0x00, 0x00, 0x00, 0x00, 0x59, 0xCF, 0xC6, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0xB7, 0x88, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xB8, 0xE3, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xD4, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x98, 0xC5, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0xB6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x78, 0xA7, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x61, 0x58, 0x89, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x7A, 0x08, 0x00, 0x00, 0x00, 0x00, 0x63, 0x38, 0x6B, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x5C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x65, 0x18, 0x4D, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x78, 0x88, 0x00, 0x00, 0x00, 0x00, 0x67, 0x01, 0x69, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x5A, 0x88, 0x00, 0x00, 0x00, 0x00, 0x68, 0xE1, 0x4B, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x3C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xC1, 0x2D, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB1, 0x1E, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xA1, 0x0F, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x80, 0xF1, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xE2, 0x88, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6A, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x00, 0x72, 0x49, 0xF0, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xE1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x74, 0x29, 0xD2, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0xC3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x76, 0x09, 0xB4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0xA5, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE9, 0x96, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x87, 0x08, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC9, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x69, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xB2, 0x94, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x85, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x92, 0x76, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x67, 0x88, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x72, 0x58, 0x88, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00,
+0x84, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09,
+0x00, 0x00, 0x93, 0xA8, 0x01, 0x0E, 0x00, 0x00, 0x85, 0x98, 0x00, 0x09, 0x00, 0x00, 0x93, 0xA8,
+0x01, 0x0E, 0x00, 0x00, 0x85, 0x98, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x45, 0x53, 0x54,
+0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x53, 0x54, 0x2D, 0x39,
+0x3A, 0x33, 0x30, 0x41, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x31, 0x2E, 0x30, 0x2C,
+0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Brazil/Acre */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26791,31 +27866,34 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF,
0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43,
0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x86,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4,
-0xC0, 0x00, 0x00, 0x00, 0x00, 0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04,
-0xC0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
-0x02, 0xFF, 0xFF, 0xC0, 0x70, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x09, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x43, 0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x86, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x66, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x50, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x90, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xCA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x16, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xFA, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xB6, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x4F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x1B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x7A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x3A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x48, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xE1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xEE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x14, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x22, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0xAA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xF3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xE4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x60, 0x7F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x7F, 0x04, 0xC0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xC0, 0x70,
+0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x43,
+0x53, 0x54, 0x00, 0x41, 0x43, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x43, 0x54, 0x35, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Brazil/DeNoronha */
@@ -26836,36 +27914,38 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xE1, 0x9C, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x04,
0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4E, 0x53, 0x54, 0x00, 0x46,
-0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x96, 0xAA, 0x65, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0xFD, 0x32, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x26, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBA, 0xDE, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xA0, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0xB9, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x07, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDE, 0x9B, 0xD0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x8C, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE0, 0x54, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x97, 0xF1, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF5, 0x05, 0x50, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x56, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF7, 0x0E, 0x10, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x1E, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0xC7, 0xB7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xC4, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0xA8, 0xEA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEB, 0xF8, 0x20, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFC, 0x8B, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x80, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x78, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x27, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x33, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x5B, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x0B, 0xBA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x02, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0xE2, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xE4, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0xD4, 0xB9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xB8, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xB8, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xD5, 0x20, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xE9, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xF1, 0xA0, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0x6F, 0x00, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xE1,
-0x9C, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x04, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x46, 0x4E, 0x53, 0x54, 0x00, 0x46, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x46, 0x4E, 0x54, 0x32, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x65, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x32, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x26, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xA0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x07, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xD0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x8C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x97, 0xF1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x50, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x56, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x10, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x1E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xB7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xC4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xEA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEB, 0xF8, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x6F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x5B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xBA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x02, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xE4, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xB9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xB8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x77, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xD5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xF1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x00, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xE1, 0x9C, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x01, 0x04,
+0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4E, 0x53, 0x54, 0x00, 0x46,
+0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4E, 0x54, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Brazil/East */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26913,88 +27993,91 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0xFF, 0xFF, 0xD4, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5,
0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA,
-0x72, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD,
-0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE,
-0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB,
-0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9,
-0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B,
-0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54,
-0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5A, 0x09, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05,
-0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E,
-0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7,
-0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8,
-0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B,
-0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78,
-0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33,
-0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B,
-0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2,
-0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4,
-0xC7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD,
-0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94,
-0x8B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B,
-0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC0, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66,
-0xC4, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA0, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46,
-0xA6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D,
-0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06,
-0x6A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8,
-0xC1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF,
-0x68, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8,
-0x85, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F,
-0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F,
-0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E,
-0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x91, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2E,
-0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x86, 0xF8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17,
-0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x43, 0x51, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7,
-0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x45, 0x4D, 0x53, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0,
-0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7,
-0x95, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97,
-0x77, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xDA, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80,
-0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xBA, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60,
-0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x9A, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49,
-0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x83, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20,
-0x39, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x63, 0x47, 0x30, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00,
-0x1B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x43, 0x29, 0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9,
-0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x56, 0x23, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9,
-0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x02, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA8,
-0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xE2, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88,
-0xDE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xCB, 0xEB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68,
-0xC0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xAB, 0xCD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48,
-0xA2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x8B, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31,
-0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x6B, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11,
-0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x4B, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA,
-0xBD, 0x20, 0x00, 0x00, 0x00, 0x00, 0x65, 0x2B, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1,
-0x64, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x14, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1,
-0x46, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x68, 0xF4, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A,
-0x63, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xD4, 0x36, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A,
-0x45, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xB4, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A,
-0x27, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x93, 0xFA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A,
-0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7D, 0x16, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19,
-0xEB, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x5C, 0xF8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9,
-0xCD, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x3C, 0xDA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9,
-0xAF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x76, 0x1C, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2,
-0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xFC, 0x9E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB,
-0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0xDC, 0x80, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82,
-0x8F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xC5, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62,
-0x71, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xA5, 0x7F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B,
-0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x85, 0x61, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B,
-0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x65, 0x43, 0x30, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xD4,
-0x4C, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x42, 0x52, 0x54, 0x33, 0x42, 0x52, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x72, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x40, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x34, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xAE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xFA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xE1, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x15, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0x9A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x33, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5A, 0x09, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x5E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x64, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x1E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x2C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xC5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xD2, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x06, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x7D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x8E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xD7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x35, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xC8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x58, 0x10, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x23, 0xE2, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x37, 0xF2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xD4, 0xC7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x21, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xBD, 0xE3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xF1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0x94, 0x8B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x6B, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xB5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xC4, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA0, 0x97, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x46, 0xA6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x80, 0x79, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31, 0x1D, 0x4D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x20, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x06, 0x6A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x38, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0xF8, 0xC1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x20, 0x1F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0xCF, 0x68, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0xC6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB8, 0x85, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xDF, 0xE3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x8F, 0x2C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xC8, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x6F, 0x0E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xC4, 0x91, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4E, 0xF0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x91, 0xFE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2E, 0xD2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x86, 0xF8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x42, 0x17, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x51, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x43, 0xF7, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x4D, 0x53, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE0, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x11, 0x86, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xB7, 0x95, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xFA, 0xA2, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x97, 0x77, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xDA, 0x84, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x80, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xBA, 0x66, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x60, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x9A, 0x48, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x49, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x83, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x51, 0x20, 0x39, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x63, 0x47, 0x30, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x1B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x43, 0x29, 0x30, 0x00, 0x00, 0x00, 0x00, 0x54, 0xE9, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x23, 0x0B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x56, 0xC9, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x02, 0xED, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xA8, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xE2, 0xCF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x88, 0xDE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xCB, 0xEB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x68, 0xC0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xAB, 0xCD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x48, 0xA2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x8B, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x31, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x6B, 0x91, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x11, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x4B, 0x73, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0xFA, 0xBD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x2B, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xD1, 0x64, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x14, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x67, 0xB1, 0x46, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xF4, 0x54, 0x30, 0x00, 0x00, 0x00, 0x00, 0x69, 0x9A, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xD4, 0x36, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x7A, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xB4, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x5A, 0x27, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x93, 0xFA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x3A, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x7D, 0x16, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x19, 0xEB, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x5C, 0xF8, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xF9, 0xCD, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x3C, 0xDA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xD9, 0xAF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x1C, 0xBC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xC2, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xFC, 0x9E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xAB, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xDC, 0x80, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x82, 0x8F, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xC5, 0x9D, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x62, 0x71, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xA5, 0x7F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x4B, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x85, 0x61, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2B, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x81, 0x65, 0x43, 0x30, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xD4, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0xE3,
+0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53,
+0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x42, 0x52, 0x54,
+0x33, 0x42, 0x52, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x2C,
+0x4D, 0x32, 0x2E, 0x33, 0x2E, 0x30, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Brazil/West */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -27012,31 +28095,34 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0xBC,
0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D,
0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7F, 0x44, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7,
-0xBC, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x7F, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0x57, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x4E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF1, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDE, 0x82, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x38, 0xBC, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEC, 0x08, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x19, 0xEF, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x67, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xFB, 0x23, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x9B, 0xEC, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xDD, 0xA8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x54, 0x41, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x98, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x05, 0x6C, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0xC0, 0x72, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x0E, 0x2C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x51, 0x3A, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xC7, 0xD3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x0A, 0xE0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x06, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xEC, 0x14, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x8B, 0x8B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC9, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x78, 0xE5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x33, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x77, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0B, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC0, 0xC3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x66, 0xD2, 0x30, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC7, 0xBC,
+0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x09, 0x4C, 0x4D,
+0x54, 0x00, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x41, 0x4D, 0x54, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Atlantic */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -27117,144 +28203,147 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5,
0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41, 0x53, 0x54, 0x00, 0x41,
0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0xE5, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xF1, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9A, 0xE4, 0xDE, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x13, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA2, 0x9D, 0x17, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x30, 0xB1, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA4, 0x7A, 0x56, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x1B, 0x1F, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA6, 0x53, 0xA0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0xFC, 0x52, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA8, 0x3C, 0xBD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xDC, 0x34, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAA, 0x1C, 0x9F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xCD, 0x3A, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAB, 0xFC, 0x81, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBF, 0x91, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAD, 0xEE, 0xD8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x8C, 0xFE, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xAF, 0xBC, 0x45, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7F, 0x55, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB1, 0xAE, 0x9C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x4B, 0x70, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB3, 0x8E, 0x7E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x24, 0xBB, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB5, 0x6E, 0x60, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x15, 0xC0, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB7, 0x4E, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x08, 0x17, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB9, 0x24, 0xE9, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE7, 0xF9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBB, 0x04, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD1, 0x16, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBD, 0x00, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0x9D, 0x31, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xBE, 0xF2, 0xB4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x90, 0xDA, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC0, 0xD3, 0xE7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x5E, 0x47, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC2, 0x8D, 0x8E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x50, 0x9E, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC4, 0x6D, 0x70, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x30, 0x80, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC6, 0x72, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x10, 0x62, 0x30, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0x36, 0x6E, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF9, 0x7E, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCA, 0x16, 0x50, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD9, 0x60, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xD6, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x40, 0xCF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xB8, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD6, 0x20, 0xB1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD8, 0x00, 0x93, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD9, 0xE0, 0x75, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x7B, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDD, 0xA9, 0x74, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x5D, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xDF, 0x89, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE1, 0x69, 0x38, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x21, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE3, 0x49, 0x1A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE7, 0x12, 0x18, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x01, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xE8, 0xF1, 0xFA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEA, 0xD1, 0xDC, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xEC, 0xB1, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xA6, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF2, 0x7F, 0x89, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x88, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF4, 0x5F, 0x6B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x6A, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF6, 0x3F, 0x4D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xF8, 0x28, 0x69, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC4, 0x60, 0x00, 0x00,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0,
-0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00,
-0x41, 0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xE5, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xF1, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9A, 0xE4, 0xDE, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x13, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x85, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x9D, 0x17, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x30, 0xB1, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x7A, 0x56, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x1B, 0x1F, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xA0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0xFC, 0x52, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x3C, 0xBD, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xDC, 0x34, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1C, 0x9F, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xCD, 0x3A, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFC, 0x81, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBF, 0x91, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xEE, 0xD8, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x8C, 0xFE, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBC, 0x45, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7F, 0x55, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0xAE, 0x9C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x4B, 0x70, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x8E, 0x7E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x24, 0xBB, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x6E, 0x60, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x15, 0xC0, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x4E, 0x42, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x08, 0x17, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x24, 0xE9, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE7, 0xF9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xCB, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD1, 0x16, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0x00, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0x9D, 0x31, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xF2, 0xB4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x90, 0xDA, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xD3, 0xE7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x5E, 0x47, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x8D, 0x8E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x50, 0x9E, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x6D, 0x70, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x30, 0x80, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x72, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x10, 0x62, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x36, 0x6E, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF9, 0x7E, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x16, 0x50, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD9, 0x60, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xE2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xED, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xD6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xCF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xB8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xB1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0x93, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x75, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x74, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x5D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x3F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x38, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x21, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x1A, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x18, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x01, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF1, 0xFA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xE3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xDC, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xA6, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0x89, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x88, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x6B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x6A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x4D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x4C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x69, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x2E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x4B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x4A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x2D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x2C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x0F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x0E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x96, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x94, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x76, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x75, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x58, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x57, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x3A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x39, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x1C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x1B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xDF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xFC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xDF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xDE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xC1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xA3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x85, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xA1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x65, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x29, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xEC, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x3B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xCE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x1D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xC3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x71, 0x50, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x68, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x9A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x7C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x5E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x15, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x7B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x32, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x5D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x3F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x21, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xE3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xC5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA7, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xA6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x88, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x77, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x59, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x3B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xF2, 0x50, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xC4, 0x60, 0x00, 0x00, 0xFF,
+0xFF, 0xD5, 0xD0, 0x01, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x44, 0x54, 0x00, 0x41,
+0x53, 0x54, 0x00, 0x41, 0x57, 0x54, 0x00, 0x41, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x41, 0x53, 0x54, 0x34, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Central */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -27322,123 +28411,193 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xBC, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x64, 0xE4, 0xB0, 0x94, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0x01, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xC3, 0xBA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2,
-0xA0, 0x3B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x88, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x53, 0x60, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x00, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB,
-0xC8, 0x5C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5,
-0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7,
-0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA,
-0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE,
-0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x31, 0x62, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA,
-0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
-0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD,
-0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C,
-0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0xB7, 0x6F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xA4, 0xEC, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54,
-0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBC, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x64, 0xE4, 0xB0, 0x94, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x01, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xC3, 0xBA, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xA1, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0xA0, 0x3B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x88, 0x68, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x60, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x00, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC8, 0x5C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x18, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x31, 0x62, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0xB7, 0x6F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xA4, 0xEC, 0x00, 0x00, 0xFF, 0xFF,
+0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C,
+0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57,
+0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Canada/East-Saskatchewan */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
+0x86, 0xFD, 0x93, 0x1C, 0x9E, 0xB8, 0xAF, 0x90, 0x9F, 0xBB, 0x07, 0x80, 0xB5, 0x65, 0x4F, 0xF0,
+0xB6, 0x30, 0x48, 0xE0, 0xB7, 0x45, 0x31, 0xF0, 0xB8, 0x10, 0x2A, 0xE0, 0xB9, 0x25, 0x13, 0xF0,
+0xB9, 0xF0, 0x0C, 0xE0, 0xBB, 0x0E, 0x30, 0x70, 0xBB, 0xCF, 0xEE, 0xE0, 0xBC, 0xEE, 0x12, 0x70,
+0xBD, 0xB9, 0x0B, 0x60, 0xC2, 0x72, 0x08, 0xF0, 0xC3, 0x61, 0xEB, 0xE0, 0xC4, 0x51, 0xEA, 0xF0,
+0xC5, 0x38, 0x93, 0x60, 0xC6, 0x31, 0xCC, 0xF0, 0xC7, 0x21, 0xAF, 0xE0, 0xC8, 0x1A, 0xE9, 0x70,
+0xC9, 0x0A, 0xCC, 0x60, 0xC9, 0xFA, 0xCB, 0x70, 0xCA, 0xEA, 0xAE, 0x60, 0xCB, 0x89, 0x0C, 0x90,
+0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xD3, 0x63, 0x8C, 0x10, 0xD4, 0x53, 0x6F, 0x00,
+0xD5, 0x55, 0xE3, 0x10, 0xD6, 0x20, 0xDC, 0x00, 0xD7, 0x35, 0xC5, 0x10, 0xD8, 0x00, 0xBE, 0x00,
+0xD9, 0x15, 0xA7, 0x10, 0xD9, 0xE0, 0xA0, 0x00, 0xDA, 0xFE, 0xC3, 0x90, 0xDB, 0xC0, 0x82, 0x00,
+0xDC, 0xDE, 0xA5, 0x90, 0xDD, 0xA9, 0x9E, 0x80, 0xDE, 0xBE, 0x87, 0x90, 0xDF, 0x89, 0x80, 0x80,
+0xE0, 0x9E, 0x69, 0x90, 0xE1, 0x69, 0x62, 0x80, 0xE2, 0x7E, 0x4B, 0x90, 0xE3, 0x49, 0x44, 0x80,
+0xE4, 0x5E, 0x2D, 0x90, 0xE5, 0x29, 0x26, 0x80, 0xE6, 0x47, 0x4A, 0x10, 0xE7, 0x12, 0x43, 0x00,
+0xE8, 0x27, 0x2C, 0x10, 0xE8, 0xF2, 0x25, 0x00, 0xEB, 0xE6, 0xF0, 0x10, 0xEC, 0xD6, 0xD3, 0x00,
+0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00,
+0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0,
+0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D,
+0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50,
+0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x93, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x65, 0x4F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x45, 0x31, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x0E, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xEE, 0x12, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x72, 0x08, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x61, 0xEB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xEA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x31, 0xCC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x1A, 0xE9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0A, 0xCC, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xFA, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEA, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xC3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x82, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xA5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x9E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x87, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x69, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x4B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x44, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x2D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x26, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x4A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
+0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53,
+0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Eastern */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -27520,212 +28679,150 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45,
0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x78,
-0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x87, 0x2E, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xB1,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x94, 0x06, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x55, 0xA9,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x86, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x28, 0x78,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x66, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x0C, 0x4E,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x46, 0x21, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEC, 0x30,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x1C, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x4D,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xFC, 0xAB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xB5, 0x2F,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xDC, 0x8D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x95, 0x11,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBC, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xAA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xA3,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0x8C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x85,
-0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x33, 0x76,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x13, 0x74,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x0A,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x26,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00,
-0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x94, 0x00,
-0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* Canada/East-Saskatchewan */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00,
-0x86, 0xFD, 0x93, 0x1C, 0x9E, 0xB8, 0xAF, 0x90, 0x9F, 0xBB, 0x07, 0x80, 0xB5, 0x65, 0x4F, 0xF0,
-0xB6, 0x30, 0x48, 0xE0, 0xB7, 0x45, 0x31, 0xF0, 0xB8, 0x10, 0x2A, 0xE0, 0xB9, 0x25, 0x13, 0xF0,
-0xB9, 0xF0, 0x0C, 0xE0, 0xBB, 0x0E, 0x30, 0x70, 0xBB, 0xCF, 0xEE, 0xE0, 0xBC, 0xEE, 0x12, 0x70,
-0xBD, 0xB9, 0x0B, 0x60, 0xC2, 0x72, 0x08, 0xF0, 0xC3, 0x61, 0xEB, 0xE0, 0xC4, 0x51, 0xEA, 0xF0,
-0xC5, 0x38, 0x93, 0x60, 0xC6, 0x31, 0xCC, 0xF0, 0xC7, 0x21, 0xAF, 0xE0, 0xC8, 0x1A, 0xE9, 0x70,
-0xC9, 0x0A, 0xCC, 0x60, 0xC9, 0xFA, 0xCB, 0x70, 0xCA, 0xEA, 0xAE, 0x60, 0xCB, 0x89, 0x0C, 0x90,
-0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xD3, 0x63, 0x8C, 0x10, 0xD4, 0x53, 0x6F, 0x00,
-0xD5, 0x55, 0xE3, 0x10, 0xD6, 0x20, 0xDC, 0x00, 0xD7, 0x35, 0xC5, 0x10, 0xD8, 0x00, 0xBE, 0x00,
-0xD9, 0x15, 0xA7, 0x10, 0xD9, 0xE0, 0xA0, 0x00, 0xDA, 0xFE, 0xC3, 0x90, 0xDB, 0xC0, 0x82, 0x00,
-0xDC, 0xDE, 0xA5, 0x90, 0xDD, 0xA9, 0x9E, 0x80, 0xDE, 0xBE, 0x87, 0x90, 0xDF, 0x89, 0x80, 0x80,
-0xE0, 0x9E, 0x69, 0x90, 0xE1, 0x69, 0x62, 0x80, 0xE2, 0x7E, 0x4B, 0x90, 0xE3, 0x49, 0x44, 0x80,
-0xE4, 0x5E, 0x2D, 0x90, 0xE5, 0x29, 0x26, 0x80, 0xE6, 0x47, 0x4A, 0x10, 0xE7, 0x12, 0x43, 0x00,
-0xE8, 0x27, 0x2C, 0x10, 0xE8, 0xF2, 0x25, 0x00, 0xEB, 0xE6, 0xF0, 0x10, 0xEC, 0xD6, 0xD3, 0x00,
-0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00,
-0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0,
-0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D,
-0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50,
-0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x93, 0x1C, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0x65, 0x4F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB7, 0x45, 0x31, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBB, 0x0E, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBC, 0xEE, 0x12, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC2, 0x72, 0x08, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x61, 0xEB, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC4, 0x51, 0xEA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC6, 0x31, 0xCC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0x1A, 0xE9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0A, 0xCC, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC9, 0xFA, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEA, 0xAE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x8C, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xC3, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDB, 0xC0, 0x82, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xA5, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xA9, 0x9E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x87, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDF, 0x89, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x69, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE1, 0x69, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x4B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE3, 0x49, 0x44, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x2D, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE5, 0x29, 0x26, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x4A, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE7, 0x12, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0xF2, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02,
+0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x78, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x93, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x87, 0x2E, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xB1, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x94, 0x06, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x55, 0xA9, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x86, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x28, 0x78, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x66, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x0C, 0x4E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x46, 0x21, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEC, 0x30, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1C, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFC, 0xAB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xB5, 0x2F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xDC, 0x8D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x95, 0x11, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBC, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x55, 0xAA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xA3, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x35, 0x8C, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x85, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x15, 0x6E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x33, 0x76, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x13, 0x74, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x0A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x26, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04,
-0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
-0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
-0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54,
-0x36, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xB5, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0,
+0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF,
+0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
+0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E,
+0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Mountain */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -27782,103 +28879,106 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0xFF, 0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
-0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0,
-0x98, 0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2,
-0x8A, 0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4,
-0x6A, 0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6,
-0x53, 0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x33, 0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
-0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C,
-0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF,
-0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08,
-0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
-0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D,
-0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
-0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xDE, 0xCE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x98, 0x91, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD2, 0x85, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x8A, 0xE8, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x6A, 0xCA, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xC3, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xE7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x33, 0xC9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xC2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0x95, 0xA0, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00,
+0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37,
+0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Newfoundland */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -27964,152 +29064,155 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x10, 0xFF, 0xFF, 0xEA, 0xE8, 0x01, 0x14, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x04, 0x4C, 0x4D, 0x54,
0x00, 0x4E, 0x44, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x4E, 0x57, 0x54,
0x00, 0x4E, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x09,
-0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x5E, 0x3D, 0x34, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x62, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9D, 0xA4, 0xE6, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0x7E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBA, 0xD6, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xB6, 0x88, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0x38, 0xFF, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x95, 0x19, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA3, 0x84, 0xFC, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x74, 0xFB, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0x64, 0xDE, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x5E, 0x17, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA7, 0x44, 0xC0, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x3D, 0xF9, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA9, 0x24, 0xA2, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x1D, 0xDB, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAB, 0x04, 0x84, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xFD, 0xBD, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAC, 0xE4, 0x66, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xDD, 0x9F, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAE, 0xCD, 0x82, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBD, 0x81, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB0, 0xAD, 0x64, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0xA6, 0x9E, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB2, 0x8D, 0x46, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x86, 0x80, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB4, 0x6D, 0x28, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x66, 0x62, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB6, 0x4D, 0x0A, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x46, 0x44, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0x2C, 0xEC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x26, 0x26, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBA, 0x16, 0x09, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x0F, 0x42, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBB, 0xF5, 0xEB, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xEF, 0x24, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBD, 0xD5, 0xCD, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9E, 0x4D, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBE, 0xCF, 0x06, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xB5, 0xAF, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC0, 0xB8, 0x31, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x79, 0xEF, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC2, 0x98, 0x13, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x59, 0xD1, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC4, 0x77, 0xF5, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x39, 0xB3, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC6, 0x61, 0x11, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x19, 0x95, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x40, 0xF3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x02, 0xB2, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0x20, 0xD5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x94, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0x00, 0xB7, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x60, 0xE6, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x88, 0x44, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x4A, 0x03, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x68, 0x26, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD6, 0x29, 0xE5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x48, 0x08, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD8, 0x09, 0xC7, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x27, 0xEA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD9, 0xE9, 0xA9, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x11, 0x07, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDB, 0xD2, 0xC5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x74, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDD, 0xA9, 0x6D, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x56, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDF, 0x89, 0x4F, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x38, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE1, 0x69, 0x31, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x1A, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE3, 0x49, 0x13, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5D, 0xFC, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE5, 0x28, 0xF5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x18, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE7, 0x12, 0x11, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x26, 0xFA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE8, 0xF1, 0xF3, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xDC, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEA, 0xD1, 0xD5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xBE, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEC, 0xB1, 0xB7, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xA0, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEE, 0xBF, 0xBE, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xBD, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF0, 0x9F, 0xA0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0x9F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF2, 0x7F, 0x82, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x81, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF4, 0x5F, 0x64, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x63, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF6, 0x3F, 0x46, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x45, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF8, 0x28, 0x62, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x27, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0x08, 0x44, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x43, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xE8, 0x26, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x25, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0xC8, 0x08, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x07, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA7, 0xEA, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x87, 0xCC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x70, 0xE9, 0x48, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xE8, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x50, 0xCB, 0x48, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x30, 0xAD, 0x48, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x10, 0x8F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0xF0, 0x71, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x0C, 0xD9, 0x8D, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x0E, 0xB9, 0x6F, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x6E, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x10, 0x99, 0x51, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x50, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x12, 0x79, 0x33, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x32, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x14, 0x59, 0x15, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x14, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x38, 0xF7, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x17, 0x28, 0xF6, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x18, 0x22, 0x14, 0x48, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0x01, 0xF6, 0x48, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF1, 0xF5, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xE1, 0xD8, 0x48, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xD7, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0xC1, 0xBA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xB9, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0xA1, 0x9C, 0x48, 0x00, 0x00, 0x00, 0x00, 0x20, 0x75, 0xCF, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x81, 0x62, 0x64, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xB1, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x6A, 0x70, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0x93, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x4A, 0x60, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x75, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x2A, 0x42, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0x92, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x0A, 0x24, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x74, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xEA, 0x06, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x56, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xD3, 0x23, 0x64, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x38, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0xB3, 0x05, 0x64, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x1A, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x92, 0xE7, 0x64, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x36, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x72, 0xC9, 0x64, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x18, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x52, 0xAB, 0x64, 0x00, 0x00, 0x00, 0x00, 0x35, 0x26, 0xFA, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0x8D, 0x64, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xDC, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1B, 0xA9, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xBE, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0x8B, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xA0, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDB, 0x6D, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xBD, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0x4F, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0x9F, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x31, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0x81, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0x4E, 0x64, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x30, 0x64, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x45, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x44, 0x12, 0x64, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x77, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x2D, 0x2E, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x59, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x0D, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x3B, 0xF4, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xEC, 0xF2, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x58, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xD6, 0x0F, 0x64, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x3A, 0x74, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xB6, 0x0D, 0x48, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x38, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x95, 0xEF, 0x48, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x1A, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x75, 0xD1, 0x48, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xFC, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x55, 0xB3, 0x48, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xDE, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x35, 0x95, 0x48, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE4, 0xFA, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x1E, 0xB1, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xDC, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xFE, 0x93, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xBE, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xDE, 0x75, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xA0, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xBE, 0x57, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x82, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x9E, 0x39, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0x9F, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x87, 0x56, 0x48, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x81, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x67, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x63, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x47, 0x1A, 0x48, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x45, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x26, 0xFC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x27, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x69, 0x06, 0xDE, 0x48, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x09, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xE6, 0xC0, 0x48, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x25, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xCF, 0xDC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x07, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xAF, 0xBE, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x8F, 0xA0, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x6F, 0x82, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xAD, 0xD8, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x4F, 0x64, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x38, 0x81, 0x48, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x18, 0x63, 0x48, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xF8, 0x45, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xD8, 0x27, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xB8, 0x09, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x34, 0x58, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x97, 0xEB, 0x48, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x34, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x62, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xE6, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0x7E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xD6, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0xB6, 0x88, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x38, 0xFF, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x95, 0x19, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0xFC, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x74, 0xFB, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x64, 0xDE, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x5E, 0x17, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x44, 0xC0, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x3D, 0xF9, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x24, 0xA2, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x1D, 0xDB, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0x04, 0x84, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xFD, 0xBD, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xE4, 0x66, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xDD, 0x9F, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xCD, 0x82, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xBD, 0x81, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0xAD, 0x64, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0xA6, 0x9E, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x8D, 0x46, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x86, 0x80, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x6D, 0x28, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x66, 0x62, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x4D, 0x0A, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x46, 0x44, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x2C, 0xEC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x26, 0x26, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x16, 0x09, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x0F, 0x42, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xF5, 0xEB, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xEF, 0x24, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xD5, 0xCD, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x9E, 0x4D, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xCF, 0x06, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0xB5, 0xAF, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xB8, 0x31, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x79, 0xEF, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x98, 0x13, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x59, 0xD1, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x77, 0xF5, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x39, 0xB3, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x61, 0x11, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x19, 0x95, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x40, 0xF3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x02, 0xB2, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x20, 0xD5, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x94, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x00, 0xB7, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xE6, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x88, 0x44, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4A, 0x03, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x68, 0x26, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xE5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x48, 0x08, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xC7, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x27, 0xEA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0xA9, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x11, 0x07, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xD2, 0xC5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xDE, 0x74, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x6D, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xBE, 0x56, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x4F, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x9E, 0x38, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x31, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x1A, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x13, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5D, 0xFC, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x28, 0xF5, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x18, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x11, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x26, 0xFA, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xF3, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x06, 0xDC, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0xD5, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xBE, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xB7, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xA0, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xBE, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xAF, 0xBD, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xA0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x8F, 0x9F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x82, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x6F, 0x81, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x64, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x4F, 0x63, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x46, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x45, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x62, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x0F, 0x27, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x44, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x43, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x26, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xD8, 0x25, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x08, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x07, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xEA, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xCC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x77, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xE9, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x60, 0xE8, 0x58, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xCB, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x40, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xAD, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x20, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x8F, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x00, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x71, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x8D, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x6F, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0x6E, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x51, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x50, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x33, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x32, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x15, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x14, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xF7, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x28, 0xF6, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x14, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x08, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0xF6, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF1, 0xF5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xD8, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD1, 0xD7, 0x58, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xBA, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xB9, 0x58, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x9C, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x75, 0xCF, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x62, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x55, 0xB1, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0x70, 0xD4, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0x93, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x60, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0x75, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x42, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0x92, 0x74, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x24, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0x74, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x06, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0x56, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x23, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x38, 0x74, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x05, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x1A, 0x74, 0x00, 0x00, 0x00, 0x00, 0x30, 0x92, 0xE7, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x36, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xC9, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x18, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xAB, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x26, 0xFA, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x8D, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xDC, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xA9, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE6, 0xBE, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x8B, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xA0, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x6D, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xAF, 0xBD, 0x74, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x4F, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0x9F, 0x74, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x31, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0x81, 0x74, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x4E, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x30, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x45, 0x74, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x12, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x77, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x2E, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x59, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x3B, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xEC, 0xF2, 0xE4, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x58, 0x74, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x0F, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x3A, 0x74, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x0D, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x38, 0x58, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xEF, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x1A, 0x58, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD1, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1B, 0xFC, 0x58, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xB3, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xDE, 0x58, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x95, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE4, 0xFA, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB1, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xDC, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x93, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xBE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x75, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xA0, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x57, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x82, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x39, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0x9F, 0x58, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x56, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x81, 0x58, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x38, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x63, 0x58, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x1A, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x45, 0x58, 0x00, 0x00, 0x00, 0x00, 0x67, 0x26, 0xFC, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x27, 0x58, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xDE, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x09, 0x58, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC0, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x25, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xDC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x07, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xBE, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xE9, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA0, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xCB, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x82, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xAD, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x64, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xCA, 0x58, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x81, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x63, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0x8E, 0x58, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x45, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x70, 0x58, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x27, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x52, 0x58, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x09, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x34, 0x58, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xEB, 0x48, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x06, 0x05, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x07, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x07, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xDC, 0xA4, 0x01, 0x04,
-0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x08, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x04, 0xFF, 0xFF, 0xCE, 0xC8,
-0x00, 0x08, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x0C, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x10, 0xFF, 0xFF,
-0xEA, 0xE8, 0x01, 0x14, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x44,
-0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x44,
-0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x53, 0x54, 0x33, 0x3A, 0x33, 0x30, 0x4E, 0x44, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0xFF, 0xFF, 0xCE, 0x94,
+0x00, 0x00, 0xFF, 0xFF, 0xDC, 0xA4, 0x01, 0x04, 0xFF, 0xFF, 0xCE, 0x94, 0x00, 0x08, 0xFF, 0xFF,
+0xDC, 0xD8, 0x01, 0x04, 0xFF, 0xFF, 0xCE, 0xC8, 0x00, 0x08, 0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x0C,
+0xFF, 0xFF, 0xDC, 0xD8, 0x01, 0x10, 0xFF, 0xFF, 0xEA, 0xE8, 0x01, 0x14, 0xFF, 0xFF, 0xDC, 0xD8,
+0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x44, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x50,
+0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x53,
+0x54, 0x33, 0x3A, 0x33, 0x30, 0x4E, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Pacific */
@@ -28178,124 +29281,126 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0xFF, 0xFF, 0x8C, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF,
0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10,
0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00,
-0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xBF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x76, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8,
-0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x76, 0x0F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x53,
-0x7D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20,
-0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00,
-0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0,
-0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0,
-0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9,
-0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89,
-0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69,
-0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49,
-0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29,
-0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12,
-0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2,
-0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2,
-0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1,
-0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91,
-0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71,
-0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F,
-0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F,
-0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08,
-0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88,
-0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51,
-0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53,
-0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C,
-0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76,
-0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0,
-0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0x8C, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F,
-0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53,
-0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3D, 0x76, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xBD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x76, 0x0F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x7D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xEA, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xCC, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xAE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0xFF, 0xFF, 0x8C, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF,
+0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
+0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54,
+0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A,
+0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Saskatchewan */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -28322,45 +29427,48 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D,
0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50,
0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x93, 0x1C, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB5, 0x65, 0x4F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB7, 0x45, 0x31, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBB, 0x0E, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xBC, 0xEE, 0x12, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC2, 0x72, 0x08, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x61, 0xEB, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC4, 0x51, 0xEA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC6, 0x31, 0xCC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0x1A, 0xE9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0A, 0xCC, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC9, 0xFA, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEA, 0xAE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x8C, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xC3, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDB, 0xC0, 0x82, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xA5, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xA9, 0x9E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x87, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDF, 0x89, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x69, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE1, 0x69, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x4B, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE3, 0x49, 0x44, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x2D, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE5, 0x29, 0x26, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x4A, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE7, 0x12, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0xF2, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02,
+0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xFD, 0x93, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xAF, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x65, 0x4F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x48, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x45, 0x31, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x10, 0x2A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x25, 0x13, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xF0, 0x0C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x0E, 0x30, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xEE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xEE, 0x12, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB9, 0x0B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x72, 0x08, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x61, 0xEB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xEA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x31, 0xCC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0xAF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x1A, 0xE9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x0A, 0xCC, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xFA, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xEA, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x53, 0x6F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xDC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xBE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0xA7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0xA0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xC3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x82, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xA5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x9E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x87, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x69, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x62, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x4B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x44, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x2D, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x26, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x4A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x2C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x25, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xD3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xD2, 0x10, 0x00, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04,
-0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0,
-0x01, 0x10, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00,
-0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54,
-0x36, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x05, 0xFF, 0xFF, 0x9D, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
+0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
+0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53,
+0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Canada/Yukon */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -28411,90 +29519,93 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59,
0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00,
0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0x1D, 0x5F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
-0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
-0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x86, 0x8A, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB8, 0xCB, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x23, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0xD0, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xA2, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x28, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x1D, 0x5F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x02, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04,
-0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF,
-0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00,
-0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00, 0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54,
-0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0x81, 0x64,
+0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x04, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x08, 0xFF, 0xFF,
+0x8F, 0x80, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14,
+0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x19, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00,
+0x59, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x59, 0x57, 0x54, 0x00, 0x59, 0x50, 0x54, 0x00,
+0x59, 0x44, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53,
+0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* CET */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -28544,97 +29655,99 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x43, 0x45, 0x53, 0x54,
-0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
-0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31,
-0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x43, 0x45, 0x53, 0x54,
+0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x45,
+0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Chile/Continental */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
0x8F, 0x30, 0x47, 0x46, 0x9B, 0x5C, 0xE5, 0x50, 0x9F, 0x7C, 0xE2, 0xC6, 0xA1, 0x00, 0x71, 0xC0,
0xB0, 0x5E, 0x77, 0xC6, 0xB1, 0x77, 0x3D, 0x40, 0xB2, 0x41, 0x00, 0xD0, 0xB3, 0x58, 0x70, 0xC0,
0xB4, 0x22, 0x34, 0x50, 0xB5, 0x39, 0xA4, 0x40, 0xB6, 0x03, 0x67, 0xD0, 0xB7, 0x1A, 0xD7, 0xC0,
@@ -28663,100 +29776,141 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40,
0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0xC6, 0x07, 0x30, 0x4E, 0x50, 0x82, 0xC0,
0x4F, 0x9C, 0xAE, 0xB0, 0x50, 0x42, 0xD9, 0xC0, 0x51, 0x7C, 0x90, 0xB0, 0x52, 0x2B, 0xF6, 0x40,
-0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x55, 0x3C, 0x54, 0xB0, 0x01, 0x02, 0x01, 0x03,
-0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x05, 0x03,
-0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x57, 0x37, 0xE6, 0x30, 0x57, 0xAF, 0xEC, 0xC0,
+0x59, 0x17, 0xC8, 0x30, 0x59, 0x8F, 0xCE, 0xC0, 0x5A, 0xF7, 0xAA, 0x30, 0x5B, 0x6F, 0xB0, 0xC0,
+0x5C, 0xD7, 0x8C, 0x30, 0x5D, 0x4F, 0x92, 0xC0, 0x5E, 0xB7, 0x6E, 0x30, 0x5F, 0x2F, 0x74, 0xC0,
+0x60, 0x97, 0x50, 0x30, 0x61, 0x18, 0x91, 0x40, 0x62, 0x80, 0x6C, 0xB0, 0x62, 0xF8, 0x73, 0x40,
+0x64, 0x60, 0x4E, 0xB0, 0x64, 0xD8, 0x55, 0x40, 0x66, 0x40, 0x30, 0xB0, 0x66, 0xB8, 0x37, 0x40,
+0x68, 0x20, 0x12, 0xB0, 0x68, 0x98, 0x19, 0x40, 0x69, 0xFF, 0xF4, 0xB0, 0x6A, 0x77, 0xFB, 0x40,
+0x6B, 0xDF, 0xD6, 0xB0, 0x6C, 0x61, 0x17, 0xC0, 0x6D, 0xC8, 0xF3, 0x30, 0x6E, 0x40, 0xF9, 0xC0,
+0x6F, 0xA8, 0xD5, 0x30, 0x70, 0x20, 0xDB, 0xC0, 0x71, 0x88, 0xB7, 0x30, 0x72, 0x00, 0xBD, 0xC0,
+0x73, 0x68, 0x99, 0x30, 0x73, 0xE0, 0x9F, 0xC0, 0x75, 0x48, 0x7B, 0x30, 0x75, 0xC9, 0xBC, 0x40,
+0x77, 0x31, 0x97, 0xB0, 0x77, 0xA9, 0x9E, 0x40, 0x79, 0x11, 0x79, 0xB0, 0x79, 0x89, 0x80, 0x40,
+0x7A, 0xF1, 0x5B, 0xB0, 0x7B, 0x69, 0x62, 0x40, 0x7C, 0xD1, 0x3D, 0xB0, 0x7D, 0x49, 0x44, 0x40,
+0x7E, 0xB1, 0x1F, 0xB0, 0x7F, 0x29, 0x26, 0x40, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x02, 0x04,
+0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x05, 0x03, 0x02, 0x03, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08,
-0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF,
-0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08,
-0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x43, 0x4C,
-0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x69, 0x87, 0x1D, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0x30, 0x47, 0x46, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9B, 0x5C, 0xE5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x7C, 0xE2, 0xC6, 0xFF, 0xFF, 0xFF,
-0xFF, 0xA1, 0x00, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x5E, 0x77, 0xC6, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB1, 0x77, 0x3D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x41, 0x00, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB3, 0x58, 0x70, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x22, 0x34, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB5, 0x39, 0xA4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x03, 0x67, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB7, 0x1A, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xE4, 0x9B, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xC7, 0x20, 0x50, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCC, 0x1C, 0x6E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x6C, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD3, 0xDC, 0x8F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x1B, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD5, 0x33, 0x55, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x76, 0x92, 0x40, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00, 0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55, 0x3C, 0x54, 0xB0, 0x00, 0x01, 0x02,
-0x01, 0x03, 0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03,
-0x05, 0x03, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x08, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x04, 0xFF, 0xFF,
-0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C,
-0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00,
-0x43, 0x4C, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x0A, 0x43, 0x4C, 0x54, 0x33,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x00, 0xFF, 0xFF, 0xBD,
+0xBA, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01,
+0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x43,
+0x4C, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x1D, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF,
+0x8F, 0x30, 0x47, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5C, 0xE5, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x7C, 0xE2, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x71, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x5E, 0x77, 0xC6, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x77, 0x3D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x41, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x58, 0x70, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x22, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x39, 0xA4, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x03, 0x67, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1A, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0xE4, 0x9B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x5C, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xC7, 0x20, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x1C, 0x6E, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x6C, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xDC, 0x8F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x1B, 0xC9, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x33, 0x55, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x76, 0x92, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xD7, 0x8C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x4F, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0xB7, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x2F, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x97, 0x50, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x18, 0x91, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x80, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0xF8, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x60, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0xD8, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x40, 0x30, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xB8, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x68, 0x20, 0x12, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x98, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xFF, 0xF4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x77, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xDF, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x61, 0x17, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0xC8, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x40, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0xA8, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x88, 0xB7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x68, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0xE0, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x48, 0x7B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x75, 0xC9, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x77, 0x31, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xA9, 0x9E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x79, 0x11, 0x79, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0x89, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xF1, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x69, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xD1, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x49, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0xB1, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x29, 0x26, 0x40, 0x00, 0x01, 0x02, 0x01,
+0x03, 0x01, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x05,
+0x03, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0xFF, 0xFF, 0xBD, 0xBA,
+0x00, 0x00, 0xFF, 0xFF, 0xBD, 0xBA, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF,
+0xC7, 0xC0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C,
+0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
+0x53, 0x4D, 0x54, 0x00, 0x43, 0x4C, 0x54, 0x00, 0x43, 0x4C, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x4C,
+0x54, 0x34, 0x43, 0x4C, 0x53, 0x54, 0x2C, 0x4D, 0x38, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x34,
+0x2C, 0x4D, 0x35, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Chile/EasterIsland */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x13, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x80, 0x00, 0x00, 0x00,
0xB9, 0xC7, 0x40, 0x88, 0xFD, 0xD1, 0x3C, 0x40, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xCC, 0xCD, 0xC0,
0x00, 0x72, 0xDC, 0xB0, 0x01, 0x75, 0x50, 0xC0, 0x02, 0x40, 0x49, 0xB0, 0x03, 0x55, 0x32, 0xC0,
0x04, 0x20, 0x2B, 0xB0, 0x05, 0x3E, 0x4F, 0x40, 0x06, 0x00, 0x0D, 0xB0, 0x07, 0x0B, 0xBC, 0x40,
@@ -28780,82 +29934,123 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40,
0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0xC6, 0x07, 0x30, 0x4E, 0x50, 0x82, 0xC0,
0x4F, 0x9C, 0xAE, 0xB0, 0x50, 0x42, 0xD9, 0xC0, 0x51, 0x7C, 0x90, 0xB0, 0x52, 0x2B, 0xF6, 0x40,
-0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x55, 0x3C, 0x54, 0xB0, 0x01, 0x04, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0xFF, 0xFF, 0x99, 0x78,
-0x00, 0x00, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF,
-0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E,
-0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0E, 0x4C, 0x4D, 0x54, 0x00,
-0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53, 0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x42, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9,
-0xC7, 0x40, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07,
-0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00, 0x09,
-0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B,
-0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11,
-0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16,
-0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x3C, 0x54, 0xB0, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x57, 0x37, 0xE6, 0x30, 0x57, 0xAF, 0xEC, 0xC0,
+0x59, 0x17, 0xC8, 0x30, 0x59, 0x8F, 0xCE, 0xC0, 0x5A, 0xF7, 0xAA, 0x30, 0x5B, 0x6F, 0xB0, 0xC0,
+0x5C, 0xD7, 0x8C, 0x30, 0x5D, 0x4F, 0x92, 0xC0, 0x5E, 0xB7, 0x6E, 0x30, 0x5F, 0x2F, 0x74, 0xC0,
+0x60, 0x97, 0x50, 0x30, 0x61, 0x18, 0x91, 0x40, 0x62, 0x80, 0x6C, 0xB0, 0x62, 0xF8, 0x73, 0x40,
+0x64, 0x60, 0x4E, 0xB0, 0x64, 0xD8, 0x55, 0x40, 0x66, 0x40, 0x30, 0xB0, 0x66, 0xB8, 0x37, 0x40,
+0x68, 0x20, 0x12, 0xB0, 0x68, 0x98, 0x19, 0x40, 0x69, 0xFF, 0xF4, 0xB0, 0x6A, 0x77, 0xFB, 0x40,
+0x6B, 0xDF, 0xD6, 0xB0, 0x6C, 0x61, 0x17, 0xC0, 0x6D, 0xC8, 0xF3, 0x30, 0x6E, 0x40, 0xF9, 0xC0,
+0x6F, 0xA8, 0xD5, 0x30, 0x70, 0x20, 0xDB, 0xC0, 0x71, 0x88, 0xB7, 0x30, 0x72, 0x00, 0xBD, 0xC0,
+0x73, 0x68, 0x99, 0x30, 0x73, 0xE0, 0x9F, 0xC0, 0x75, 0x48, 0x7B, 0x30, 0x75, 0xC9, 0xBC, 0x40,
+0x77, 0x31, 0x97, 0xB0, 0x77, 0xA9, 0x9E, 0x40, 0x79, 0x11, 0x79, 0xB0, 0x79, 0x89, 0x80, 0x40,
+0x7A, 0xF1, 0x5B, 0xB0, 0x7B, 0x69, 0x62, 0x40, 0x7C, 0xD1, 0x3D, 0xB0, 0x7D, 0x49, 0x44, 0x40,
+0x7E, 0xB1, 0x1F, 0xB0, 0x7F, 0x29, 0x26, 0x40, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x07, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x04,
-0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF,
-0xB9, 0xB0, 0x00, 0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53,
-0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x0A, 0x45, 0x41, 0x53, 0x54, 0x35, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x04, 0xFF,
+0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0x9D, 0x90, 0x00,
+0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D, 0x54,
+0x00, 0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53, 0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x42, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xC7, 0x40, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xD7, 0x8C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x4F, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0xB7, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x2F, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x97, 0x50, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x18, 0x91, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x80, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0xF8, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x60, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0xD8, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x40, 0x30, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xB8, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x68, 0x20, 0x12, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x98, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xFF, 0xF4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x77, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xDF, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x61, 0x17, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0xC8, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x40, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0xA8, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x88, 0xB7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x68, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0xE0, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x48, 0x7B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x75, 0xC9, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x77, 0x31, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xA9, 0x9E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x79, 0x11, 0x79, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0x89, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xF1, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x69, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xD1, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x49, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0xB1, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x29, 0x26, 0x40, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x00, 0xFF, 0xFF,
+0x99, 0x78, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E,
+0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53, 0x54, 0x00,
+0x45, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x01, 0x01, 0x0A, 0x45, 0x41, 0x53, 0x54, 0x36, 0x45, 0x41, 0x53, 0x53, 0x54, 0x2C, 0x4D,
+0x38, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x32, 0x2C, 0x4D, 0x35, 0x2E, 0x32, 0x2E, 0x36, 0x2F,
+0x32, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* CST6CDT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -28910,99 +30105,102 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0x43, 0x44, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF,
-0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08,
-0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57,
-0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x43,
-0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
-0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF,
+0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01,
+0x0C, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Cuba */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -29060,105 +30258,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB2, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C,
0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00,
0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x69, 0x87, 0x28, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0x62, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB1, 0xD3, 0x94, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x74, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x5B, 0x66, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xD3, 0x51, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0x3B, 0x48, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xBC, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0x24, 0x65, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x9C, 0x4F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD1, 0xC4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x3B, 0xF5, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD3, 0xA3, 0xED, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x1B, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x60, 0x05, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x7D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0x3D, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE3, 0x53, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xDB, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xA7, 0x86, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFC, 0xC5, 0xA9, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x87, 0x68, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFE, 0xB8, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xE3, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x97, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xC5, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x77, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xE2, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x60, 0xE1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x05, 0x35, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x06, 0x40, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x07, 0x16, 0x48, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x20, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0xF7, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x6A, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0xE0, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0x86, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0xC0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x68, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0xB2, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7D, 0x9B, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x51, 0xEA, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x31, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x5B, 0x82, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x3B, 0x64, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x19, 0x1B, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xFB, 0x28, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xDB, 0x0A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x7A, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x5A, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x43, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x23, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x2E, 0xC6, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x15, 0x8A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x17, 0xE2, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xFE, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xD2, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xDE, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xB4, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xBE, 0x6B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x96, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x9E, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x78, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x7E, 0x2F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x30, 0x77, 0x5A, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x67, 0x4B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x57, 0x3C, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x47, 0x2D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x59, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0xD5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0xB7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xE6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xC6, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xAF, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x8F, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x5B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x45, 0xF3, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x17, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xDC, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xF9, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xB3, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0x9C, 0x6D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x85, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xBF, 0x4E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x77, 0xE0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x3C, 0x13, 0x50, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x1B, 0xF5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x54, 0xFB, 0xD7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xE4, 0xF3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xC4, 0xD5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xA4, 0xB7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0x84, 0x99, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x64, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x4D, 0x98, 0x50, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x2D, 0x7A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x0D, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x65, 0xED, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xCD, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xAD, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0x96, 0x1E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x76, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x55, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x35, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x15, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x74, 0xFE, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xDE, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xBE, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0x9E, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x7E, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x5E, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x05, 0x04, 0x05,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x28, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0x62, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0xD3, 0x94, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x74, 0x5D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5B, 0x66, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xD3, 0x51, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x3B, 0x48, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xBC, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x24, 0x65, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x9C, 0x4F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xC4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x3B, 0xF5, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA3, 0xED, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x1B, 0xD7, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x60, 0x05, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0xFF, 0x7D, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x3D, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0xE3, 0x53, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xDB, 0x3B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xA7, 0x86, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xC5, 0xA9, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0x87, 0x68, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x00, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xE3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xC5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xE2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xE1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x35, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x16, 0x48, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x08, 0xF7, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x6A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x86, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x68, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xB2, 0xA2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x7D, 0x9B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xEA, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x5B, 0x82, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x3B, 0x64, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x1B, 0x46, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xFB, 0x28, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xDB, 0x0A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x7A, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x5A, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x43, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x23, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x2E, 0xC6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0x8A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x17, 0xE2, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xA7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xF7, 0xD2, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0x89, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xD7, 0xB4, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x6B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xB7, 0x96, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x97, 0x78, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x2F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x77, 0x5A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x4B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x57, 0x3C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x2D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x40, 0x59, 0x50, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0xD5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xB0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0xB7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xCC, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xAE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x90, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xD2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x72, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xB4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x54, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x5B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0x8C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x24, 0x17, 0x50, 0x00, 0x00, 0x00, 0x00, 0x47, 0xDC, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xF9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x50, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x6D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x85, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xBF, 0x4E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0xE0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x95, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x13, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1B, 0xF5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xD7, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE4, 0xF3, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xB8, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xD5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0x9A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xB7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0x99, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x5E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x40, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0x98, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x7A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x5C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x21, 0x50, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x3E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xE5, 0x50, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xC7, 0x50, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x1E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xE3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xE2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xC4, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xA6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x6B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xC3, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x88, 0x50, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xA5, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0x87, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x4C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x69, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x2E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x4B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x10, 0x50, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x2D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0xF2, 0x50, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+0x04, 0x02, 0x04, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF, 0xB2, 0xC8, 0x00, 0x00, 0xFF,
-0xFF, 0xB2, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4C, 0x4D, 0x54,
-0x00, 0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x35, 0x43, 0x44,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
-0x2E, 0x30, 0x2F, 0x31, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x04, 0xFF, 0xFF, 0xB2, 0xC8, 0x00, 0x00, 0xFF, 0xFF, 0xB2, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xC7,
+0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x43, 0x53, 0x54, 0x35, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
+0x2F, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x31, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* EET */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -29203,83 +30403,85 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45,
-0x45, 0x54, 0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x02, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x8E, 0x7F, 0x90, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x2A,
-0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45,
-0x54, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
-0x30, 0x2F, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
+0x45, 0x54, 0x00, 0x01, 0x01, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x05, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A,
+0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Egypt */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -29327,86 +30529,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A,
0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C,
0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xBD, 0x4D, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x93, 0xB4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xFC, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xC7, 0xE8, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDF, 0x29, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xAC, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x36, 0x63, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF4, 0x2D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0B, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x60, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEC, 0xFA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB5, 0x6D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x97, 0xF2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xB0, 0xB3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0x25, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x91, 0xE6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x73, 0x1A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3B, 0x8C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x55, 0x9F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1E, 0x11, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x36, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x45, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x18, 0x06, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xE1, 0xCA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF9, 0x39, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xC2, 0xFD, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xDB, 0xBE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA5, 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xBC, 0xF2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x9E, 0x25, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x67, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x7F, 0x59, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x49, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x61, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x43, 0x11, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0C, 0xD5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x24, 0x45, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEE, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCF, 0x3C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE7, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB1, 0xC1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC9, 0x31, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x92, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xAA, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x8B, 0x98, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x6E, 0x1D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x37, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x4F, 0x50, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x19, 0x14, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xA0, 0x93, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x70, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x7B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF4, 0x3C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBE, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD5, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB6, 0xA3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x97, 0xD7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x7A, 0x5C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x62, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x53, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x3C, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0x06, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x1D, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE7, 0xBA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0x00, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCA, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xE1, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAB, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0xC2, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8C, 0xA6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0xA0, 0x13, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6B, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x7F, 0xF5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4A, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x5F, 0xD7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2A, 0xD0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x3F, 0xB9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0A, 0xB2, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x28, 0xD6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF3, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x39, 0x08, 0xB8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD3, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xE8, 0x9A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB3, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xC8, 0x7C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x93, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0xA8, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x73, 0x57, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x91, 0x7A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5C, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x71, 0x5C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x55, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x51, 0x3E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x12, 0xFD, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x31, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0xE0, 0x6A, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x48, 0x11, 0x02, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xB7, 0x11, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xF0, 0xE4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x8D, 0xB9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xDA, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0xBD, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x89, 0x58, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xA4, 0xFA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x75, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0xAC, 0x89, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0xDA, 0xBC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x24, 0x82, 0x50, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x00, 0x00, 0x1D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45,
-0x54, 0x2D, 0x32, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x1D, 0x55,
+0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00,
+0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Eire */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -29490,160 +30694,166 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00,
0x44, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0xD1,
-0x0A, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xB3, 0x91, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6,
-0x0B, 0x11, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4,
-0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97,
-0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76,
-0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B,
-0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F,
-0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x94, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25,
-0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A,
-0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00,
-0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9,
-0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9,
-0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0,
-0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92,
-0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72,
-0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49,
-0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32,
-0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12,
-0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9,
-0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB,
-0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1,
-0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B,
-0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A,
-0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51,
-0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A,
-0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA,
-0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E,
-0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0x9E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C,
-0x28, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9,
-0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB,
-0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB,
-0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4,
-0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94,
-0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B,
-0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54,
-0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D,
-0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14,
-0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD,
-0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD,
-0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3,
-0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81,
-0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61,
-0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A,
-0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21,
-0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00,
-0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0,
-0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0,
-0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B,
-0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70,
-0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0,
-0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0,
-0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58,
-0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38,
-0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
-0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61,
-0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9,
-0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9,
-0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0xD1, 0x0A, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xB3, 0x91, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x0B, 0x11, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x94, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x4E, 0x9E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x28, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x08, 0x0A, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x09, 0x0A,
+0x04, 0x05, 0x04, 0x05, 0x08, 0x0A, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x06, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0xFF, 0xFF, 0xFA, 0x24, 0x00, 0x00, 0xFF, 0xFF, 0xFA, 0x0F, 0x00, 0x04, 0x00, 0x00, 0x08,
-0x1F, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
-0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01,
-0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x44, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x42,
-0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x49, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0xFF, 0xFF, 0xFA, 0x24, 0x00,
+0x00, 0xFF, 0xFF, 0xFA, 0x0F, 0x00, 0x04, 0x00, 0x00, 0x08, 0x1F, 0x01, 0x08, 0x00, 0x00, 0x0E,
+0x10, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x08, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x44, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x49, 0x53, 0x54, 0x2C,
+0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* EST */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* EST5EDT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -29698,510 +30908,597 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x45, 0x44, 0x54,
0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x1E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x00, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xCD,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF,
-0xC7, 0xC0, 0x01, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08,
-0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57,
-0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45,
-0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
-0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x1E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x00, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xCD, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x00, 0xFF,
+0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
+0x0C, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* Etc/GMT0 */
+/* Etc/GMT+0 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* Etc/GMT-0 */
+/* Etc/GMT+1 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xF1, 0xF0,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x3E, 0x31, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* Etc/GMT+0 */
+/* Etc/GMT+10 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x73, 0x60,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x30, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31,
+0x30, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x30, 0x3E, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+11 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x65, 0x50,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x31, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31,
+0x31, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x31, 0x3E, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+12 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x57, 0x40,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x32, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31,
+0x32, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x32, 0x3E, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+2 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xE3, 0xE0,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x32, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x32,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x32, 0x3E, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+3 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xD5, 0xD0,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x33, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x33,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x33, 0x3E, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+4 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xC7, 0xC0,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x34, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x34,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x34, 0x3E, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+5 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xB9, 0xB0,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x35, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x35,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x35, 0x3E, 0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+6 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x36, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x36,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x36, 0x3E, 0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+7 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x9D, 0x90,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x37, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x37,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x37, 0x3E, 0x37, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+8 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x8F, 0x80,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x38, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x38,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x38, 0x3E, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT+9 */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x81, 0x70,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x39, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x39,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x39, 0x3E, 0x39, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Etc/GMT-0 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-1 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x31, 0x3E, 0x2D, 0x31, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+1 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xF1, 0xF0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xF1, 0xF0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x31, 0x3E, 0x31, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x3E, 0x2D, 0x31, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-10 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x30, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x8C, 0xA0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x30, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+10 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x30, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x73, 0x60,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x30, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0x73, 0x60, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x30, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x30, 0x3E, 0x31, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31,
+0x30, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x30, 0x3E, 0x2D, 0x31, 0x30,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-11 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x9A, 0xB0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x31, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x9A, 0xB0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x31, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+11 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x31, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x65, 0x50,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x31, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0x65, 0x50, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x31, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x31, 0x3E, 0x31, 0x31, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31,
+0x31, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x31, 0x3E, 0x2D, 0x31, 0x31,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-12 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x32, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xA8, 0xC0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x32, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+12 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x32, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x57, 0x40,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x32, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0x57, 0x40, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x32, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2B, 0x31, 0x32, 0x3E, 0x31, 0x32, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31,
+0x32, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x32, 0x3E, 0x2D, 0x31, 0x32,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-13 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xB6, 0xD0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x33, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xB6, 0xD0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x33, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x33, 0x3E, 0x2D, 0x31, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x33, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31,
+0x33, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x33, 0x3E, 0x2D, 0x31, 0x33,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-14 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC4, 0xE0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x34, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xC4, 0xE0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x34, 0x00, 0x00, 0x00, 0x0A,
-0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x34, 0x3E, 0x2D, 0x31, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x34, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xE0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x31,
+0x34, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x31, 0x34, 0x3E, 0x2D, 0x31, 0x34,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-2 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x32, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x32, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x32, 0x3E, 0x2D, 0x32, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+2 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x32, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xE3, 0xE0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x32, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xE3, 0xE0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x32, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x32, 0x3E, 0x32, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x32,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x32, 0x3E, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-3 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x33, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x33, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x33, 0x3E, 0x2D, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+3 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x33, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xD5, 0xD0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x33, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xD5, 0xD0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x33, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x33, 0x3E, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x33,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x33, 0x3E, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-4 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x34, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x40, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x34, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x34, 0x3E, 0x2D, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+4 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x34, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xC7, 0xC0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x34, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xC7, 0xC0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x34, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x34, 0x3E, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x34,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x34, 0x3E, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-5 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x46, 0x50,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x35, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x50, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x35, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x35, 0x3E, 0x2D, 0x35, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+5 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x35, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xB9, 0xB0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x35, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xB9, 0xB0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x35, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x35, 0x3E, 0x35, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x35,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x35, 0x3E, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-6 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x54, 0x60,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x36, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x60, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x36, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x36, 0x3E, 0x2D, 0x36, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+6 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x36, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0xAB, 0xA0,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x36, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xAB, 0xA0, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x36, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x36, 0x3E, 0x36, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x60, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x36,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x36, 0x3E, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-7 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x62, 0x70,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x37, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x62, 0x70, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x37, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x37, 0x3E, 0x2D, 0x37, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+7 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x37, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x37, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0x9D, 0x90, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x37, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x37, 0x3E, 0x37, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x37,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x37, 0x3E, 0x2D, 0x37, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-8 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x70, 0x80,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x38, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x38, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x38, 0x3E, 0x2D, 0x38, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
-
-/* Etc/GMT+8 */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x38, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x8F, 0x80,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x38, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0x8F, 0x80, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x38, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x38, 0x3E, 0x38, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x38,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x38, 0x3E, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/GMT-9 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x7E, 0x90,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x39, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x39, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2D, 0x39, 0x3E, 0x2D, 0x39, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x39, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2D, 0x39,
+0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47, 0x4D, 0x54, 0x2D, 0x39, 0x3E, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* Etc/GMT+9 */
+/* Etc/GMT0 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0xFF, 0x81, 0x70,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x39, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0x81, 0x70, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x2B, 0x39, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x47,
-0x4D, 0x54, 0x2B, 0x39, 0x3E, 0x39, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/Greenwich */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/UCT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x43, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x43, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/Universal */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/UTC */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Etc/Zulu */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Europe/Amsterdam */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -30272,123 +31569,126 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x41, 0x4D, 0x54, 0x00, 0x4E, 0x45, 0x54, 0x00, 0x4E, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB6, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1E, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x02, 0x12, 0x51, 0x6C, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x2E, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xD6, 0x5C, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xB8, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xBF, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0xA7, 0x25, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x16, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x90, 0x41, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xF8, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x70, 0x23, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x56, 0xDA, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA4, 0x50, 0x05, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x36, 0xBC, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x5B, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC1, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA8, 0x5E, 0xE3, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x07, 0xA3, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x5A, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x85, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAC, 0x27, 0xE2, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x67, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAD, 0xED, 0x66, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x49, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAF, 0xCE, 0x99, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x2B, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB1, 0xB1, 0x1E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x48, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB3, 0x92, 0x52, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2A, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB5, 0x73, 0x85, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x0C, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x54, 0xB9, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xEE, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0x40, 0x78, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD0, 0x0C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBB, 0x18, 0x71, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xEC, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0xF9, 0xA5, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xCE, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0xDA, 0xD8, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB0, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0xBD, 0x5D, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x92, 0x8C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0xA7, 0xCB, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0xDC, 0x5D, 0x5C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x74, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x7F, 0xC4, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x56, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x60, 0xF7, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0x72, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x44, 0xB2, 0x50, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A, 0xFD, 0x70, 0x00,
-0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x07, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x0A, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x0D, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x04, 0x94, 0x00, 0x00, 0x00, 0x00, 0x12, 0xA4, 0x01,
-0x04, 0x00, 0x00, 0x04, 0x94, 0x00, 0x08, 0x00, 0x00, 0x12, 0xA4, 0x01, 0x04, 0x00, 0x00, 0x04,
-0x94, 0x00, 0x08, 0x00, 0x00, 0x04, 0xB0, 0x00, 0x0C, 0x00, 0x00, 0x12, 0xC0, 0x01, 0x10, 0x00,
-0x00, 0x12, 0xC0, 0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x15, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54,
-0x00, 0x41, 0x4D, 0x54, 0x00, 0x4E, 0x45, 0x54, 0x00, 0x4E, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
-0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0xD9, 0x3B, 0xFA, 0x01, 0x1A, 0x22, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xB6, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x02, 0x12, 0x51, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x2E, 0xEC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xD6, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xB8, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xBF, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA7, 0x25, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x16, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x90, 0x41, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xF8, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x70, 0x23, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x56, 0xDA, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x50, 0x05, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x36, 0xBC, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x5B, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC1, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x5E, 0xE3, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x07, 0xA3, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0xEE, 0x5A, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x85, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0x27, 0xE2, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x67, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xED, 0x66, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x49, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xCE, 0x99, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x2B, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0xB1, 0x1E, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x48, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x92, 0x52, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2A, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x73, 0x85, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x0C, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x54, 0xB9, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xEE, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x40, 0x78, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD0, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x18, 0x71, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xEC, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xF9, 0xA5, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xCE, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xDA, 0xD8, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB0, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xBD, 0x5D, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x92, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0xA7, 0xCB, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0xDC, 0x5D, 0x5C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x74, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x7F, 0xC4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x56, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x60, 0xF7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x21, 0x72, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x44, 0xB2, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x0A,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x0D, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x00, 0x00, 0x04, 0x94, 0x00, 0x00, 0x00, 0x00, 0x12, 0xA4, 0x01, 0x04, 0x00, 0x00,
+0x04, 0x94, 0x00, 0x08, 0x00, 0x00, 0x12, 0xA4, 0x01, 0x04, 0x00, 0x00, 0x04, 0x94, 0x00, 0x08,
+0x00, 0x00, 0x04, 0xB0, 0x00, 0x0C, 0x00, 0x00, 0x12, 0xC0, 0x01, 0x10, 0x00, 0x00, 0x12, 0xC0,
+0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15,
+0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x41, 0x4D,
+0x54, 0x00, 0x4E, 0x45, 0x54, 0x00, 0x4E, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43,
+0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E,
+0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD9, 0x3B, 0xFA, 0x01, 0x1A, 0x22, 0x90, 0x00, 0x00, 0x00, 0x00,
/* Europe/Andorra */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -30431,77 +31731,161 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C,
0x00, 0x00, 0x0E, 0x10, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45,
0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0xB3, 0x94, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD4, 0x41, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x00, 0x00, 0x01, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x0E, 0x10, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08,
-0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
-0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCA, 0x2D, 0xD0, 0x01, 0x14, 0xF8, 0xF2, 0x00,
-0x00, 0x00, 0x00,
+0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0xB3, 0x94, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x41, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x00, 0x00, 0x01, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0E,
+0x10, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08, 0x4C,
+0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31,
+0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
+0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCA, 0x2D, 0xD0, 0x01, 0x14, 0xF8, 0xF2, 0x00, 0x00, 0x00, 0x00,
+
+/* Europe/Astrakhan */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00,
+0xAA, 0x18, 0x45, 0x74, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30,
+0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30,
+0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0,
+0x1E, 0x8C, 0x65, 0xE0, 0x1F, 0x7C, 0x56, 0xE0, 0x20, 0x6C, 0x47, 0xE0, 0x21, 0x5C, 0x38, 0xE0,
+0x22, 0x4C, 0x29, 0xE0, 0x23, 0x3C, 0x1A, 0xE0, 0x24, 0x2C, 0x0B, 0xE0, 0x25, 0x1C, 0x0A, 0xF0,
+0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70, 0x27, 0xF5, 0x18, 0x70, 0x29, 0xD4, 0xEC, 0x60,
+0x2A, 0xC4, 0xB3, 0x30, 0x2B, 0xB4, 0xDC, 0x70, 0x2C, 0xA4, 0xCD, 0x70, 0x2D, 0x94, 0xBE, 0x70,
+0x2E, 0x84, 0xAF, 0x70, 0x2F, 0x74, 0xA0, 0x70, 0x30, 0x64, 0x91, 0x70, 0x31, 0x5D, 0xBC, 0xF0,
+0x32, 0x72, 0x97, 0xF0, 0x33, 0x3D, 0x9E, 0xF0, 0x34, 0x52, 0x79, 0xF0, 0x35, 0x1D, 0x80, 0xF0,
+0x36, 0x32, 0x5B, 0xF0, 0x36, 0xFD, 0x62, 0xF0, 0x38, 0x1B, 0x78, 0x70, 0x38, 0xDD, 0x44, 0xF0,
+0x39, 0xFB, 0x5A, 0x70, 0x3A, 0xBD, 0x26, 0xF0, 0x3B, 0xDB, 0x3C, 0x70, 0x3C, 0xA6, 0x43, 0x70,
+0x3D, 0xBB, 0x1E, 0x70, 0x3E, 0x86, 0x25, 0x70, 0x3F, 0x9B, 0x00, 0x70, 0x40, 0x66, 0x07, 0x70,
+0x41, 0x84, 0x1C, 0xF0, 0x42, 0x45, 0xE9, 0x70, 0x43, 0x63, 0xFE, 0xF0, 0x44, 0x25, 0xCB, 0x70,
+0x45, 0x43, 0xE0, 0xF0, 0x46, 0x05, 0xAD, 0x70, 0x47, 0x23, 0xC2, 0xF0, 0x47, 0xEE, 0xC9, 0xF0,
+0x49, 0x03, 0xA4, 0xF0, 0x49, 0xCE, 0xAB, 0xF0, 0x4A, 0xE3, 0x86, 0xF0, 0x4B, 0xAE, 0x8D, 0xF0,
+0x4C, 0xCC, 0xA3, 0x70, 0x4D, 0x8E, 0x6F, 0xF0, 0x54, 0x4C, 0x1D, 0x60, 0x56, 0xF7, 0x14, 0x70,
+0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x01, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07,
+0x04, 0x00, 0x00, 0x2D, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00,
+0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B,
+0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x18, 0x45, 0x74, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x14, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x04, 0x06, 0x01, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x04, 0x07, 0x04, 0x00, 0x00, 0x2D, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B,
+0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x2B,
+0x30, 0x34, 0x3E, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xD0, 0x0D, 0xB8, 0x01, 0x5B, 0xFA, 0x08, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x31, 0x20, 0x2D, 0x20, 0x41, 0x73, 0x74, 0x72, 0x61, 0x6B, 0x68, 0x61, 0x6E,
/* Europe/Athens */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -30556,97 +31940,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D,
0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43,
0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x0A,
-0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x74, 0x3F, 0x98, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x80, 0x21, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB9, 0x7C, 0xE9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xC6, 0xAF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC9, 0xF2, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x10, 0xA8, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAA, 0x4C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCE, 0xA2, 0x18, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x93, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDF, 0x13, 0x9E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xB7, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xEC, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x18, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0xCD, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0x9F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0xA4, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8C, 0x5D, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x6A, 0xFC, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x64, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x52, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x46, 0x82, 0x60, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0x3F, 0x98, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x80, 0x21, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x7C, 0xE9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xC6, 0xAF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF2, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x10, 0xA8, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xAA, 0x4C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x18, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x93, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x13, 0x9E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xB7, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x00, 0x09, 0xEC, 0x5E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x18, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xCD, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xBD, 0x9F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x8C, 0x5D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x6A, 0xFC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x7B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x52, 0xAA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x46, 0x82, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02,
+0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x03, 0x02, 0x03, 0x02, 0x03, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0x16, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x3C, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00,
-0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00,
-0xC3, 0x42, 0xFA, 0x01, 0x36, 0xD8, 0xD2, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00,
+0x00, 0x16, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x16, 0x3C, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00,
+0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x41,
+0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
+0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
+0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xC3, 0x42, 0xFA, 0x01, 0x36, 0xD8, 0xD2, 0x00, 0x00, 0x00, 0x00,
/* Europe/Belfast */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -30732,155 +32119,157 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Europe/Belgrade */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -30927,86 +32316,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x02,
-0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA,
-0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E,
-0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCD, 0xBD, 0x45, 0x01, 0x31, 0xF0, 0x50, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x02, 0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCD, 0xBD, 0x45, 0x01, 0x31, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x00,
/* Europe/Berlin */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -31062,101 +32453,105 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x6F, 0xA2, 0x61, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD1, 0xB6, 0x96, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x58, 0xBE, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0xA1, 0x4F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x34, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x1B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4B, 0x23, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x67, 0xE7, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD5, 0xA8, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x01, 0x04, 0x02, 0x03, 0x04, 0x03, 0x06, 0x01, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x02, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x00, 0x00, 0x0C, 0x88, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x2A,
-0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x4D, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00,
-0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20,
-0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xA2, 0x61, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xB6, 0x96, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x58, 0xBE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xA1, 0x4F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xDB, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x1B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x4B, 0x23, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x67, 0xE7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xA8, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x01, 0x04, 0x02, 0x03,
+0x04, 0x03, 0x06, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x00, 0x00,
+0x0C, 0x88, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30,
+0x01, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
+0x00, 0x43, 0x45, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45,
+0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD9, 0x70, 0x10, 0x01, 0x27, 0x0D, 0xDA, 0x00, 0x00, 0x00, 0x14, 0x47, 0x65, 0x72, 0x6D,
+0x61, 0x6E, 0x79, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
+
/* Europe/Bratislava */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -31210,97 +32605,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x50, 0x4D, 0x54, 0x00,
0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E,
-0x49, 0x92, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xCF, 0xEA, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C,
-0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8,
-0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1,
-0x79, 0xFF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xA1, 0x4F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x80, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5,
-0x4C, 0x38, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7,
-0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0x01, 0x70, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10,
-0xED, 0x64, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x00, 0x00, 0x0D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x49, 0x92, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x6C, 0xCF, 0xEA, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x79, 0xFF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xA1, 0x4F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x80, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x38, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x01, 0x70, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0xED, 0x64, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x0D, 0x88,
+0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00,
+0x50, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45,
+0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
0x00, 0xD2, 0xCC, 0xD8, 0x01, 0x2C, 0xC6, 0xB2, 0x00, 0x00, 0x00, 0x00,
/* Europe/Brussels */
@@ -31371,108 +32769,109 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08,
0x42, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC,
-0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xDF, 0xE6, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0xE9, 0x6C, 0xA6,
-0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0x44, 0x49, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x25, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xCE, 0xF8, 0x30,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7E, 0xBB, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x12, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7A, 0x4C, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x35, 0x81, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x5E, 0x23, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0x9B, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x01, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x07, 0x7D, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x34, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x5F, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xD7, 0x50, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x41, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xE3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xD6, 0x8B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xE2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x89, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x88, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x2F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x4A, 0x19, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x5B, 0xBF, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x91, 0x40, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4B, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x06, 0x03, 0x04, 0x05,
-0x04, 0x05, 0x09, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBC, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xDF, 0xE6, 0xFF, 0xFF, 0xFF, 0xFF,
+0x6D, 0xE9, 0x6C, 0xA6, 0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0x44, 0x49, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x25, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0xCE, 0xF8, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x12, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x7A, 0x4C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x35, 0x81, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x5E, 0x23, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x01, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x07, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x34, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE7, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xD7, 0x50, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC7, 0x41, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xE3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xD6, 0x8B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xE2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x89, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x88, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x2F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x4A, 0x19, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x5B, 0xBF, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x91, 0x40, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x4B, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x06, 0x03, 0x04, 0x05, 0x04, 0x05, 0x09, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
+0x08, 0x07, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
@@ -31480,17 +32879,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x00, 0x00, 0x04, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x04, 0x1A, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00,
-0x0E, 0x10, 0x01, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
-0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x0A, 0x43,
-0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD6, 0xE5, 0x05, 0x01, 0x19,
-0x45, 0x35, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x00, 0x00, 0x04, 0x1A, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x1A, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20,
+0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
+0x43, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD6, 0xE5, 0x05, 0x01, 0x19, 0x45, 0x35, 0x00, 0x00, 0x00, 0x00,
/* Europe/Bucharest */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -31543,96 +32943,98 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D,
0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xCF, 0xE0, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7,
-0xB0, 0xD2, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x3E, 0xF3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9,
-0xEF, 0x9C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDF, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB,
-0xCF, 0x7E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xA9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD,
-0xB8, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xA8, 0x8B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF,
-0x98, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x88, 0x6D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1,
-0x78, 0x5E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x4F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3,
-0x58, 0x40, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x48, 0x31, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0x38, 0x22, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x28, 0x13, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0x18, 0x04, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x53, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x0B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x33, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x13, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD3, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x24, 0xA0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x8E, 0x7F, 0x90, 0x00, 0x01, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00,
-0x18, 0x78, 0x00, 0x00, 0x00, 0x00, 0x18, 0x78, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08,
-0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D,
-0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xCD, 0x21,
-0x05, 0x01, 0x3A, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xCF, 0xE0, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0xB0, 0xD2, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x3E, 0xF3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0x9C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xDF, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xCF, 0x7E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xA9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xA8, 0x8B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x88, 0x6D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x5E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x4F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x40, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x48, 0x31, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x22, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x28, 0x13, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x18, 0x04, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xD1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x53, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x0B, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x24, 0xA0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00,
+0x00, 0x18, 0x78, 0x00, 0x00, 0x00, 0x00, 0x18, 0x78, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xCD, 0x21, 0x05, 0x01, 0x3A, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00,
/* Europe/Budapest */
0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -31689,104 +33091,106 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C,
0x20, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0xEE, 0xB3, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C,
-0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9,
-0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30,
-0x58, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA7, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84,
-0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x9A, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xC0,
-0xC2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF3, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7,
-0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2,
-0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82,
-0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x99,
-0x78, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xBB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x50,
-0xA6, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39,
-0xC3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19,
-0xA5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02,
-0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xED,
-0x2F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE6, 0x5B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xA2,
-0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x51, 0xF2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x83,
-0xDC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x33, 0x25, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x74,
-0xE1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xB6, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x54,
-0xD2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D,
-0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23,
-0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03,
-0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x01, 0x02, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0xEE, 0xB3, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x30, 0x58, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA7, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x9A, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0xC0, 0xC2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF3, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x99, 0x78, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xBB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x50, 0xA6, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x39, 0xC3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x19, 0xA5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x02, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xED, 0x2F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE6, 0x5B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0xA2, 0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x51, 0xF2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x83, 0xDC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x33, 0x25, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x74, 0xE1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xB6, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x54, 0xD2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x11, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD1, 0xCE, 0xF0, 0x01, 0x2F, 0xC6, 0xED, 0x00, 0x00, 0x00,
-0x00,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0x11, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
+0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD1, 0xCE, 0xF0, 0x01, 0x2F, 0xC6, 0xED, 0x00, 0x00, 0x00, 0x00,
/* Europe/Busingen */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -31832,90 +33236,93 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x06, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x42, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0xF0, 0xEA, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0x71, 0xD4, 0x06, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x17, 0x6A, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF7, 0x4C, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xC2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0xF0, 0xEA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x71, 0xD4, 0x06, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x17, 0x6A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF7, 0x4C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xC2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xFA, 0x00, 0x04, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD2,
-0x1D, 0x0F, 0x01, 0x1F, 0xE8, 0x6D, 0x00, 0x00, 0x00, 0x08, 0x42, 0x75, 0x73, 0x69, 0x6E, 0x67,
-0x65, 0x6E,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x08,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xFA, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43,
+0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD2, 0x1D, 0x0F, 0x01, 0x1F, 0xE8, 0x6D, 0x00, 0x00, 0x00, 0x08, 0x42, 0x75, 0x73, 0x69,
+0x6E, 0x67, 0x65, 0x6E,
/* Europe/Chisinau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x8D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0x80, 0x00, 0x00, 0x00,
0x9E, 0x6B, 0x9F, 0x0C, 0xB7, 0xB0, 0xD2, 0x08, 0xB9, 0x3E, 0xF3, 0x60, 0xB9, 0xEF, 0x9C, 0x60,
0xBA, 0xDF, 0x8D, 0x60, 0xBB, 0xCF, 0x7E, 0x60, 0xBC, 0xC8, 0xA9, 0xE0, 0xBD, 0xB8, 0x9A, 0xE0,
0xBE, 0xA8, 0x8B, 0xE0, 0xBF, 0x98, 0x7C, 0xE0, 0xC0, 0x88, 0x6D, 0xE0, 0xC1, 0x78, 0x5E, 0xE0,
@@ -31926,146 +33333,150 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0, 0x19, 0xDB, 0x43, 0x40, 0x1A, 0xCC, 0x93, 0xD0,
0x1B, 0xBC, 0xA0, 0xF0, 0x1C, 0xAC, 0x91, 0xF0, 0x1D, 0x9C, 0x82, 0xF0, 0x1E, 0x8C, 0x73, 0xF0,
0x1F, 0x7C, 0x64, 0xF0, 0x20, 0x6C, 0x55, 0xF0, 0x21, 0x5C, 0x46, 0xF0, 0x22, 0x4C, 0x37, 0xF0,
-0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x25, 0x9E, 0x73, 0x50,
-0x26, 0x43, 0x3E, 0xD0, 0x27, 0xF5, 0x26, 0x80, 0x28, 0xE5, 0x17, 0x80, 0x29, 0x60, 0xE8, 0x60,
-0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xCF, 0x50, 0x2B, 0xB4, 0xCE, 0x60, 0x2C, 0xA4, 0xB1, 0x50,
-0x2D, 0x94, 0xB0, 0x60, 0x2E, 0x84, 0x93, 0x50, 0x2F, 0x74, 0x92, 0x60, 0x30, 0x64, 0x75, 0x50,
-0x31, 0x5D, 0xAE, 0xE0, 0x32, 0x72, 0x7B, 0xD0, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10,
-0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90,
-0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90,
-0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90,
-0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10,
-0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10,
-0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10,
-0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90,
-0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90,
-0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90,
-0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10,
-0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10,
-0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90,
-0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90,
-0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90,
-0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10,
-0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10,
-0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10,
-0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90,
-0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90,
-0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90,
-0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0B, 0x05, 0x03, 0x04,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x00, 0x00, 0x1B,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00, 0x00, 0x18, 0x78, 0x00, 0x08, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D,
-0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xF8, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0x6B, 0x9F, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB0, 0xD2, 0x08, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0x3E, 0xF3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0x9C, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xDF, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0x7E, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xA9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0x9A, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0xA8, 0x8B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x7C, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x88, 0x6D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x5E, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x4F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x40, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x48, 0x31, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x22, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC6, 0x28, 0x13, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x18, 0x04, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xBC, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x77, 0x7D, 0x50, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD0, 0x4E, 0x90, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x9E, 0x73, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x43, 0x3E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x26, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x60, 0xE8, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x7B, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0B, 0x05, 0x03, 0x04,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x00, 0x00, 0x1B,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00, 0x00, 0x18, 0x78, 0x00, 0x08, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D,
-0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34,
-0x0A, 0x00, 0xD1, 0x0B, 0xA0, 0x01, 0x3E, 0xA7, 0x85, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x0B, 0xFB, 0xF0,
+0x26, 0x43, 0x4C, 0xE0, 0x27, 0x05, 0x35, 0x80, 0x27, 0xF5, 0x26, 0x80, 0x28, 0xE5, 0x17, 0x80,
+0x29, 0x60, 0xE8, 0x60, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xCF, 0x50, 0x2B, 0xB4, 0xCE, 0x60,
+0x2C, 0xA4, 0xB1, 0x50, 0x2D, 0x94, 0xB0, 0x60, 0x2E, 0x84, 0x93, 0x50, 0x2F, 0x74, 0x92, 0x60,
+0x30, 0x64, 0x75, 0x50, 0x31, 0x5D, 0xAE, 0xE0, 0x32, 0x72, 0x7B, 0xD0, 0x33, 0x3D, 0xAD, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x36, 0x32, 0x6A, 0x00, 0x36, 0xFD, 0x71, 0x00,
+0x38, 0x1B, 0x86, 0x80, 0x38, 0xDD, 0x53, 0x00, 0x39, 0xFB, 0x68, 0x80, 0x3A, 0xBD, 0x35, 0x00,
+0x3B, 0xDB, 0x4A, 0x80, 0x3C, 0xA6, 0x51, 0x80, 0x3D, 0xBB, 0x2C, 0x80, 0x3E, 0x86, 0x33, 0x80,
+0x3F, 0x9B, 0x0E, 0x80, 0x40, 0x66, 0x15, 0x80, 0x41, 0x84, 0x2B, 0x00, 0x42, 0x45, 0xF7, 0x80,
+0x43, 0x64, 0x0D, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x45, 0x43, 0xEF, 0x00, 0x46, 0x05, 0xBB, 0x80,
+0x47, 0x23, 0xD1, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x49, 0xCE, 0xBA, 0x00,
+0x4A, 0xE3, 0x95, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x4D, 0x8E, 0x7E, 0x00,
+0x4E, 0xAC, 0x93, 0x80, 0x4F, 0x6E, 0x60, 0x00, 0x50, 0x8C, 0x75, 0x80, 0x51, 0x57, 0x7C, 0x80,
+0x52, 0x6C, 0x57, 0x80, 0x53, 0x37, 0x5E, 0x80, 0x54, 0x4C, 0x39, 0x80, 0x55, 0x17, 0x40, 0x80,
+0x56, 0x2C, 0x1B, 0x80, 0x56, 0xF7, 0x22, 0x80, 0x58, 0x15, 0x38, 0x00, 0x58, 0xD7, 0x04, 0x80,
+0x59, 0xF5, 0x1A, 0x00, 0x5A, 0xB6, 0xE6, 0x80, 0x5B, 0xD4, 0xFC, 0x00, 0x5C, 0xA0, 0x03, 0x00,
+0x5D, 0xB4, 0xDE, 0x00, 0x5E, 0x7F, 0xE5, 0x00, 0x5F, 0x94, 0xC0, 0x00, 0x60, 0x5F, 0xC7, 0x00,
+0x61, 0x7D, 0xDC, 0x80, 0x62, 0x3F, 0xA9, 0x00, 0x63, 0x5D, 0xBE, 0x80, 0x64, 0x1F, 0x8B, 0x00,
+0x65, 0x3D, 0xA0, 0x80, 0x66, 0x08, 0xA7, 0x80, 0x67, 0x1D, 0x82, 0x80, 0x67, 0xE8, 0x89, 0x80,
+0x68, 0xFD, 0x64, 0x80, 0x69, 0xC8, 0x6B, 0x80, 0x6A, 0xDD, 0x46, 0x80, 0x6B, 0xA8, 0x4D, 0x80,
+0x6C, 0xC6, 0x63, 0x00, 0x6D, 0x88, 0x2F, 0x80, 0x6E, 0xA6, 0x45, 0x00, 0x6F, 0x68, 0x11, 0x80,
+0x70, 0x86, 0x27, 0x00, 0x71, 0x51, 0x2E, 0x00, 0x72, 0x66, 0x09, 0x00, 0x73, 0x31, 0x10, 0x00,
+0x74, 0x45, 0xEB, 0x00, 0x75, 0x10, 0xF2, 0x00, 0x76, 0x2F, 0x07, 0x80, 0x76, 0xF0, 0xD4, 0x00,
+0x78, 0x0E, 0xE9, 0x80, 0x78, 0xD0, 0xB6, 0x00, 0x79, 0xEE, 0xCB, 0x80, 0x7A, 0xB0, 0x98, 0x00,
+0x7B, 0xCE, 0xAD, 0x80, 0x7C, 0x99, 0xB4, 0x80, 0x7D, 0xAE, 0x8F, 0x80, 0x7E, 0x79, 0x96, 0x80,
+0x7F, 0x8E, 0x71, 0x80, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A, 0x0B,
+0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x06, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x00, 0x00, 0x1B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00, 0x00,
+0x18, 0x78, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00,
+0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22,
+0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45,
+0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
+0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x6B, 0x9F, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB0, 0xD2, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x3E, 0xF3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0x9C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xDF, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0x7E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xC8, 0xA9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xA8, 0x8B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x88, 0x6D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x5E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x68, 0x4F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x40, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x48, 0x31, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x22, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x28, 0x13, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x18, 0x04, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xBC, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x77, 0x7D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x4E, 0x90, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x43, 0x4C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x60, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x22, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD4, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xE5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xA9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xA7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x6B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0x96, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x71, 0x80, 0x00, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
+0x0C, 0x0D, 0x06, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x00, 0x00, 0x1B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00,
+0x00, 0x18, 0x78, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E,
+0x10, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00,
+0x00, 0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x22, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45,
+0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
+0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
+0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
+0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD1, 0x0B, 0xA0, 0x01, 0x3E, 0xA7, 0x85, 0x00, 0x00, 0x00, 0x00,
/* Europe/Copenhagen */
0x50, 0x48, 0x50, 0x32, 0x01, 0x44, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -32116,93 +33527,96 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
0x0E, 0x10, 0x00, 0x09, 0x43, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0xCF, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF, 0x71,
-0x0C, 0xEF, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x1E, 0x8C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x43, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC,
-0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0,
-0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x24, 0x10, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x79, 0x85, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x1B, 0xAD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x5E, 0xAD, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5,
-0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x47, 0xC9, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7,
-0xBF, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03,
-0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x03, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x00, 0x00, 0x0B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xCC, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x86, 0xCF, 0xB4, 0xFF, 0xFF, 0xFF, 0xFF,
+0x71, 0x0C, 0xEF, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x1E, 0x8C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x43, 0x57, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x24, 0x10, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x79, 0x85, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x1B, 0xAD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x5E, 0xAD, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x47, 0xC9, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0xBF, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x03,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x0B, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xCC, 0x00, 0x04,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
+0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C,
+0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
+0x0A,
+#endif
0x00, 0xDE, 0x45, 0x0A, 0x01, 0x25, 0xDB, 0xDD, 0x00, 0x00, 0x00, 0x00,
/* Europe/Dublin */
@@ -32287,149 +33701,152 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00,
0x44, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0xD1,
-0x0A, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xB3, 0x91, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6,
-0x0B, 0x11, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4,
-0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97,
-0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76,
-0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B,
-0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F,
-0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x94, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25,
-0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A,
-0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00,
-0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9,
-0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9,
-0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0,
-0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92,
-0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72,
-0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49,
-0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32,
-0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12,
-0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9,
-0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB,
-0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1,
-0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B,
-0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A,
-0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51,
-0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A,
-0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA,
-0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E,
-0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0x9E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C,
-0x28, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9,
-0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB,
-0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB,
-0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4,
-0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94,
-0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B,
-0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54,
-0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D,
-0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14,
-0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD,
-0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD,
-0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3,
-0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81,
-0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61,
-0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A,
-0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21,
-0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00,
-0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0,
-0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0,
-0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B,
-0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70,
-0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0,
-0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0,
-0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58,
-0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38,
-0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
-0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61,
-0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9,
-0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9,
-0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0xD1, 0x0A, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xB3, 0x91, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x0B, 0x11, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x94, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x4E, 0x9E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x28, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x06, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x08, 0x0A, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x09, 0x0A,
+0x04, 0x05, 0x04, 0x05, 0x08, 0x0A, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x06, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0xFF, 0xFF, 0xFA, 0x24, 0x00, 0x00, 0xFF, 0xFF, 0xFA, 0x0F, 0x00, 0x04, 0x00, 0x00, 0x08,
-0x1F, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
-0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01,
-0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x44, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x42,
-0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x49, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xDA, 0xB5, 0x95, 0x01, 0x09, 0x1F, 0x18, 0x00,
-0x00, 0x00, 0x00,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0xFF, 0xFF, 0xFA, 0x24, 0x00,
+0x00, 0xFF, 0xFF, 0xFA, 0x0F, 0x00, 0x04, 0x00, 0x00, 0x08, 0x1F, 0x01, 0x08, 0x00, 0x00, 0x0E,
+0x10, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x08, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x44, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x49, 0x53, 0x54, 0x2C,
+0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0xDA, 0xB5, 0x95, 0x01, 0x09, 0x1F, 0x18, 0x00, 0x00, 0x00, 0x00,
/* Europe/Gibraltar */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -32501,130 +33918,132 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00,
0x0E, 0x10, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00,
0x42, 0x44, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC7,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0xD1, 0x0A, 0x04, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xC7, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0xD1, 0x0A, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFA, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x11, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC0, 0x76, 0xD5, 0x01, 0x0A, 0x7E, 0xA8, 0x00, 0x00, 0x00,
-0x00,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFA, 0xFC, 0x00,
+0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54,
+0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45,
+0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC0, 0x76, 0xD5, 0x01, 0x0A, 0x7E, 0xA8, 0x00, 0x00, 0x00, 0x00,
/* Europe/Guernsey */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -32710,155 +34129,157 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xD4, 0xC8, 0xA7, 0x01, 0x0E, 0xCA, 0xEA, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD4, 0xC8, 0xA7, 0x01, 0x0E, 0xCA, 0xEA, 0x00, 0x00, 0x00, 0x00,
/* Europe/Helsinki */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -32904,84 +34325,86 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x17, 0x65, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D,
0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x53, 0xBA, 0x26, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x73, 0x6F, 0x1B, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0xCE, 0x51, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xC0, 0xE5, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xCE, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xB0, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x17, 0x65, 0x00, 0x00, 0x00, 0x00, 0x17, 0x65,
-0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D,
-0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xE5, 0x22, 0xDA, 0x01, 0x38, 0xC1, 0x1A, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x53, 0xBA, 0x26, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x73, 0x6F, 0x1B, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCE, 0x51, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xC0, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x17, 0x65, 0x00,
+0x00, 0x00, 0x00, 0x17, 0x65, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54,
+0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xE5, 0x22, 0xDA, 0x01, 0x38, 0xC1, 0x1A, 0x00, 0x00, 0x00, 0x00,
/* Europe/Isle_of_Man */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -33067,155 +34490,157 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xDB, 0xF4, 0x98, 0x01, 0x0B, 0xD7, 0xB5, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xDB, 0xF4, 0x98, 0x01, 0x0B, 0xD7, 0xB5, 0x00, 0x00, 0x00, 0x00,
/* Europe/Istanbul */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -33252,7 +34677,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10,
-0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x3E, 0x9E, 0x90, 0x56, 0xF7, 0x30, 0x90,
0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90,
0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10,
0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10,
@@ -33281,116 +34706,119 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
0x00, 0x45, 0x45, 0x54, 0x00, 0x54, 0x52, 0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xD8, 0xFF, 0xFF,
-0xFF, 0xFF, 0x90, 0x8B, 0xF5, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x28, 0x28, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAA, 0xE1, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF9, 0x89, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAC, 0xC3, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x7F, 0xEE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0xFF, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x4A, 0xF5, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCA, 0xCE, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x71, 0xEB, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x6B, 0x09, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA2, 0x39, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x43, 0x02, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x0D, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x29, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2B, 0xEF, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x09, 0x5D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0x97, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE9, 0x3F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEF, 0xA8, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDB, 0xD2, 0x5C, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xD4, 0xD0, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xB3, 0x8F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xF4, 0xB9, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF2, 0x64, 0xBA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x68, 0x06, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF6, 0x1F, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xBA, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x6B, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x9C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x4B, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x69, 0xB9, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x34, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x39, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFB, 0x75, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x19, 0xA6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDB, 0x3A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0xF0, 0x07, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x10, 0xCE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0C, 0xD9, 0x24, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0E, 0xA6, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0x98, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x47, 0x7A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x27, 0x5C, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07, 0x3E, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x89, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDC, 0x94, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xC6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9B, 0x15, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0xFA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x45, 0x98, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8F, 0xDD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x38, 0xBE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x90, 0x8B, 0xF5, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x28, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE1, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF9, 0x89, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC3, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x7F, 0xEE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xFF, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x4A, 0xF5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xCE, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x71, 0xEB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x6B, 0x09, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA2, 0x39, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x43, 0x02, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x0D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2B, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x5D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x3F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEF, 0xA8, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xD2, 0x5C, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xD4, 0xD0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xB3, 0x8F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xF4, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x64, 0xBA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x68, 0x06, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x1F, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xBA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x6B, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x4B, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x69, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x34, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x39, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFB, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x19, 0xA6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDB, 0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x07, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x10, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x24, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xA6, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x47, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x27, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x89, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDC, 0x94, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xC6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9B, 0x15, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xFA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x98, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8F, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x38, 0xBE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x3E, 0x9E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x06, 0x07, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x00, 0x00, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x54, 0x52, 0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45,
-0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xC7, 0xEA, 0x62, 0x01,
-0x3E, 0xDB, 0x9A, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x00, 0x00, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00, 0x00, 0x2A,
+0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01, 0x11, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x54, 0x52,
+0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D,
+0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xC7, 0xEA, 0x62, 0x01, 0x3E, 0xDB, 0x9A, 0x00, 0x00, 0x00, 0x00,
/* Europe/Jersey */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4A, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -33476,155 +34904,157 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xD4, 0x66, 0xFF, 0x01, 0x0F, 0x6D, 0xAD, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD4, 0x66, 0xFF, 0x01, 0x0F, 0x6D, 0xAD, 0x00, 0x00, 0x00, 0x00,
/* Europe/Kaliningrad */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -33638,8 +35068,8 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x18, 0xEA, 0x0E, 0xD0, 0x19, 0xDB, 0x43, 0x40, 0x1A, 0xCC, 0x93, 0xD0, 0x1B, 0xBC, 0xA0, 0xF0,
0x1C, 0xAC, 0x91, 0xF0, 0x1D, 0x9C, 0x82, 0xF0, 0x1E, 0x8C, 0x73, 0xF0, 0x1F, 0x7C, 0x64, 0xF0,
0x20, 0x6C, 0x55, 0xF0, 0x21, 0x5C, 0x46, 0xF0, 0x22, 0x4C, 0x37, 0xF0, 0x23, 0x3C, 0x28, 0xF0,
-0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70,
-0x27, 0xF5, 0x18, 0x70, 0x28, 0xE5, 0x17, 0x80, 0x29, 0xD4, 0xDE, 0x50, 0x2A, 0xC4, 0xC1, 0x40,
+0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x19, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x27, 0x05, 0x35, 0x80,
+0x27, 0xF5, 0x26, 0x80, 0x28, 0xE5, 0x17, 0x80, 0x29, 0xD4, 0xDE, 0x50, 0x2A, 0xC4, 0xC1, 0x40,
0x2B, 0xB4, 0xEA, 0x80, 0x2C, 0xA4, 0xDB, 0x80, 0x2D, 0x94, 0xCC, 0x80, 0x2E, 0x84, 0xBD, 0x80,
0x2F, 0x74, 0xAE, 0x80, 0x30, 0x64, 0x9F, 0x80, 0x31, 0x5D, 0xCB, 0x00, 0x32, 0x72, 0xA6, 0x00,
0x33, 0x3D, 0xAD, 0x00, 0x34, 0x52, 0x88, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x36, 0x32, 0x6A, 0x00,
@@ -33651,7 +35081,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x49, 0xCE, 0xBA, 0x00, 0x4A, 0xE3, 0x95, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80,
0x4D, 0x8E, 0x7E, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03,
0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0D,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D,
0x0E, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0F, 0x0C, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C,
@@ -33665,68 +35095,71 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x46, 0x45, 0x54, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xA2, 0x5B, 0x48, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF,
-0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x95, 0x84, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x26, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xD4, 0xDE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xC1, 0x40, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x02, 0x01,
-0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0D, 0x0E, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0F, 0x0C, 0x00, 0x00, 0x13,
-0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0D, 0x00, 0x00, 0x2A,
-0x30, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0D, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1A, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x15, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1A, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x1E, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x1A, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
-0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54,
-0x00, 0x46, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00, 0xDC,
-0xD1, 0xF2, 0x01, 0x31, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77,
-0x2D, 0x30, 0x31, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6C, 0x69, 0x6E, 0x69, 0x6E, 0x67, 0x72, 0x61,
-0x64,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xA2, 0x5B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x95, 0x84, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x8A, 0xAD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x26, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xDE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xC1, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x05, 0x06, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x0E, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0F, 0x0C, 0x00, 0x00, 0x13, 0x38,
+0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0D, 0x00, 0x00, 0x2A, 0x30,
+0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0D, 0x00, 0x00,
+0x2A, 0x30, 0x01, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1A, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x15,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x1A, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x1E, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x1A, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x4D,
+0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x46, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0xDC, 0xD1, 0xF2, 0x01, 0x31, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x53, 0x4B, 0x2D,
+0x30, 0x31, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6C, 0x69, 0x6E, 0x69, 0x6E, 0x67, 0x72, 0x61, 0x64,
+
/* Europe/Kiev */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -33778,90 +35211,94 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x22, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC7, 0x64, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0xA7, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCA, 0xCD, 0x2E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xCD, 0xA8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x8D, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x0A, 0x02, 0x0A, 0x02, 0x0A,
-0x02, 0x0A, 0x02, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x1C, 0x9C, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0x9C, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00,
-0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45,
-0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34,
-0x0A, 0x00, 0xD6, 0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73,
-0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC7, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x19, 0xA7, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xCD, 0x2E, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xCD, 0xA8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x8D, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x06, 0x04, 0x05, 0x04, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x02,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x1C, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x9C,
+0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14,
+0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40,
+0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44,
+0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xD6, 0x48, 0xC5, 0x01, 0x41, 0x39, 0x12, 0x00, 0x00, 0x00, 0x14, 0x55, 0x6B, 0x72, 0x61,
+0x69, 0x6E, 0x65, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
+
/* Europe/Lisbon */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -33943,145 +35380,148 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54,
0x00, 0x57, 0x45, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x1B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x97,
-0x1D, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x4B, 0x6D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xFE, 0xC7,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0xED, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xC9, 0x83,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x7F, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xAA, 0xB6,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x8B, 0xEA,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x41, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x6E, 0x6F,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x23, 0x0C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x4F, 0xA2,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xF4, 0x8E,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x4C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xC8,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xB9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xAA,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xB7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xA8,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x5F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x8A,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9A, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x6C,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x05, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xDF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x01, 0x2F,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF1, 0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x62,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xB5, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEC, 0xA3,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x80, 0x4B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC, 0xA2,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x95, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC3, 0x4B,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x72, 0xA2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC5, 0xBF,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x75, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xAC, 0x67,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x52, 0x84, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA5, 0xA1,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x54, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x8C, 0x49,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x32, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85, 0x83,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x59, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xB5,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xC2,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xA4,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x86,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xB2, 0x84,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x92, 0x66,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x93,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x63, 0xAF,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x43, 0x91,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x23, 0x73,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x03, 0x55,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x46, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x2A,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x9B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x43, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xBD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F,
-0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03,
-0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x06, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0xFF,
-0xFF, 0xF7, 0x63, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x16, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45,
-0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xC4, 0x67,
-0xF2, 0x01, 0x04, 0xB8, 0xCA, 0x00, 0x00, 0x00, 0x08, 0x6D, 0x61, 0x69, 0x6E, 0x6C, 0x61, 0x6E,
-0x64,
+0x00, 0x01, 0x01, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x97, 0x1D, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x4B, 0x6D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xFE, 0xC7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x9C, 0xED, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xC9, 0x83, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x7F, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xAA, 0xB6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x5F, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x8B, 0xEA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x41, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x6E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x23, 0x0C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x4F, 0xA2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xF4, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x4C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xC8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFF, 0xB9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xAA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xC8, 0xB7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x9F, 0x5F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9A, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x6C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x68, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x3F, 0x05, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xD9, 0xDF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x01, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xF1, 0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x62, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xB5, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEC, 0xA3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x80, 0x4B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC, 0xA2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x95, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC3, 0x4B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x72, 0xA2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC5, 0xBF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x75, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xAC, 0x67, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x52, 0x84, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA5, 0xA1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x54, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x8C, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x32, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85, 0x83, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x59, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xC2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xA4, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x86, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xB2, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x92, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x93, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x63, 0xAF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x43, 0x91, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x23, 0x73, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x03, 0x55, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xF3, 0x46, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x9B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x43, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xBD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04,
+0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0xFF, 0xFF, 0xF7, 0x63, 0x00, 0x00,
+0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
+0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0D, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x16,
+0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x57, 0x45,
+0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xC4, 0x67, 0xF2, 0x01, 0x04, 0xB8, 0xCA, 0x00, 0x00, 0x00, 0x13, 0x50, 0x6F, 0x72, 0x74,
+0x75, 0x67, 0x61, 0x6C, 0x20, 0x28, 0x6D, 0x61, 0x69, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x29,
/* Europe/Ljubljana */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -34128,86 +35568,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x02,
-0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA,
-0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E,
-0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCF, 0x98, 0x88, 0x01, 0x28, 0xCF, 0x12, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x02, 0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCF, 0x98, 0x88, 0x01, 0x28, 0xCF, 0x12, 0x00, 0x00, 0x00, 0x00,
/* Europe/London */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -34293,155 +35735,157 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0xD7, 0xEC, 0xB1, 0x01, 0x12, 0x77, 0x90, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0xD7, 0xEC, 0xB1, 0x01, 0x12, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
/* Europe/Luxembourg */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -34512,125 +35956,127 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57,
0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x84, 0xA2, 0xAD, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0x1E, 0x8C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C,
-0xEA, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0x99, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0xE0, 0xC4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1,
-0x7E, 0xE5, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x12, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3,
-0x7A, 0x69, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x35, 0x81, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5,
-0x5E, 0x3F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7,
-0x27, 0xAA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x01, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9,
-0x07, 0x9A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x34, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA,
-0xE7, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xD8, 0xA2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC,
-0xC7, 0x50, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE,
-0xA7, 0x32, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0,
-0x87, 0x14, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2,
-0x70, 0x30, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4,
-0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6,
-0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xE3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9,
-0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xD6, 0x8B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB,
-0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xE2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD,
-0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x89, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF,
-0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1,
-0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x88, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3,
-0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x2F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7,
-0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8,
-0x42, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6F, 0xB0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1,
-0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x91, 0x40, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4B, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x09, 0x0A, 0x09, 0x0A, 0x02, 0x03, 0x04, 0x03,
-0x04, 0x02, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
-0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x00, 0x00, 0x05, 0xC4,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x0D,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x0E, 0x10,
-0x01, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0D, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09,
-0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x57, 0x45, 0x53,
-0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD5,
-0x03, 0x40, 0x01, 0x1C, 0x0A, 0xD8, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x16, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x84, 0xA2, 0xAD, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x1E, 0x8C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xEA, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0x99, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0xE0, 0xC4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x7E, 0xE5, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x12, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x7A, 0x69, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x35, 0x81, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x5E, 0x3F, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0xAA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x01, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x07, 0x9A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x34, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE7, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xD8, 0xA2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC7, 0x50, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x32, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x14, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x30, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xE3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xD6, 0x8B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xE2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x89, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x88, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x2F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x42, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6F, 0xB0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x91, 0x40, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4B, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
+0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x09, 0x0A, 0x09, 0x0A, 0x02, 0x03, 0x04,
+0x03, 0x04, 0x02, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x00, 0x00, 0x05,
+0xC4, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x01,
+0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x0E,
+0x10, 0x01, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0D, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x57, 0x45,
+0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD5, 0x03, 0x40, 0x01, 0x1C, 0x0A, 0xD8, 0x00, 0x00, 0x00, 0x00,
/* Europe/Madrid */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -34693,111 +36139,115 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x0E, 0x10, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57,
0x45, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1B, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0xB8, 0x74, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9C, 0xF3, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xBE, 0xF7, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0xBA, 0xC5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xA0, 0x2A, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x8E, 0xCA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x81, 0x5E, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x5F, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0xA8, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x39, 0xBF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0x4D, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xF5, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF5, 0xDE, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0x96, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC3, 0x4B, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x18, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xA3, 0x2D, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD0, 0x8D, 0xD8, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x83, 0x0F, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0x99, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x62, 0xF1, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD4, 0x41, 0xBE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1E, 0x46, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD9, 0xE6, 0xB8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0D, 0xCD, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x08, 0xF4, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xEA, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xD4, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xBB, 0x1C, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x85, 0x6C, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0xFF, 0xFF, 0xFC, 0x8C,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x12,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x17, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x12, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57,
-0x45, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC6, 0xF9, 0x80, 0x01,
-0x0D, 0x09, 0xB2, 0x00, 0x00, 0x00, 0x08, 0x6D, 0x61, 0x69, 0x6E, 0x6C, 0x61, 0x6E, 0x64,
+0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xA5, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0xB8, 0x74, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xF3, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xBE, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xBA, 0xC5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xA0, 0x2A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x8E, 0xCA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x81, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0xA8, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x39, 0xBF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x21, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xF5, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF5, 0xDE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x96, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC3, 0x4B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x18, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xA3, 0x2D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x8D, 0xD8, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x83, 0x0F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0x99, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x62, 0xF1, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x41, 0xBE, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1E, 0x46, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE6, 0xB8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0D, 0xCD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0xF4, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xD4, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xBB, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x85, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0xFF, 0xFF, 0xFC, 0x8C, 0x00, 0x00, 0x00,
+0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x0D, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x12, 0x00, 0x00, 0x0E,
+0x10, 0x00, 0x17, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x17, 0x4C,
+0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54,
+0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
+0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC6, 0xF9, 0x80, 0x01, 0x0D, 0x09, 0xB2, 0x00, 0x00, 0x00, 0x10, 0x53, 0x70, 0x61, 0x69,
+0x6E, 0x20, 0x28, 0x6D, 0x61, 0x69, 0x6E, 0x6C, 0x61, 0x6E, 0x64, 0x29,
/* Europe/Malta */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -34859,113 +36309,115 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xAA, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x70, 0xBD, 0xD3, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x37,
-0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xC5,
-0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x89,
-0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60,
-0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x5C,
-0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x6C,
-0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72,
-0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x3E,
-0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1D,
-0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xEB,
-0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x33,
-0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x1C,
-0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC,
-0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xE5,
-0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC5,
-0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C,
-0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x85,
-0x76, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1A,
-0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0A, 0x24, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0x17,
-0x16, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xDA, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF7,
-0x14, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xC2, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xD6,
-0xF6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xA1, 0xEF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xB6,
-0xD8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x81, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x96,
-0xBA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x61, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x76,
-0x9C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x41, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x13, 0x45,
-0x5B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x2A, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23,
-0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03,
-0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAA, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x70, 0xBD, 0xD3, 0x64, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x1A, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0A, 0x24, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x17, 0x16, 0x70, 0x00, 0x00, 0x00, 0x00, 0x08, 0xDA, 0x34, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF7, 0x14, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xC2, 0x0D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xD6, 0xF6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xA1, 0xEF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xB6, 0xD8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x81, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x96, 0xBA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x61, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x76, 0x9C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x41, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x45, 0x5B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x2A, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0D, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC0, 0x1B, 0xB0, 0x01, 0x28, 0xCF, 0x12, 0x00, 0x00, 0x00,
-0x00,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0D, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20,
+0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC0, 0x1B, 0xB0, 0x01, 0x28, 0xCF, 0x12, 0x00, 0x00, 0x00, 0x00,
/* Europe/Mariehamn */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35011,84 +36463,86 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x17, 0x65, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D,
0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x53, 0xBA, 0x26, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x73, 0x6F, 0x1B, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0xCE, 0x51, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xC0, 0xE5, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xCE, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xB0, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x17, 0x65, 0x00, 0x00, 0x00, 0x00, 0x17, 0x65,
-0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4D,
-0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xE5, 0x08, 0xD0, 0x01, 0x31, 0x19, 0x78, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x53, 0xBA, 0x26, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x73, 0x6F, 0x1B, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCE, 0x51, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xC0, 0xE5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x17, 0x65, 0x00,
+0x00, 0x00, 0x00, 0x17, 0x65, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x48, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54,
+0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xE5, 0x08, 0xD0, 0x01, 0x31, 0x19, 0x78, 0x00, 0x00, 0x00, 0x00,
/* Europe/Minsk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35124,60 +36578,62 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x46, 0x45, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x0D,
-0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x56, 0xB6, 0xCA, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0xAA, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x5E, 0x70, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD0, 0x0A, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x9E, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x02, 0x03,
-0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x03, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
-0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCA, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x19, 0xAA, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x5E, 0x70, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x0A, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x9E, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x07, 0x03,
+0x07, 0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x03, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
-0x0B, 0x0C, 0x08, 0x00, 0x00, 0x19, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x19, 0xC8, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38,
-0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00,
-0x22, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B,
-0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45,
-0x53, 0x54, 0x00, 0x46, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0xDB, 0x92, 0xF0, 0x01, 0x3C, 0xB8, 0xBA,
-0x00, 0x00, 0x00, 0x00,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x08, 0x00, 0x00, 0x19, 0xD8, 0x00,
+0x00, 0x00, 0x00, 0x19, 0xC8, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54,
+0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53,
+0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x46, 0x45, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xDB, 0x92, 0xF0, 0x01, 0x3C, 0xB8, 0xBA, 0x00, 0x00, 0x00, 0x00,
/* Europe/Monaco */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35248,6 +36704,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xBA, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
@@ -35364,8 +36821,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45,
0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCC, 0x02, 0x8F, 0x01, 0x1D, 0xEC,
-0x9D, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCC, 0x02, 0x8F, 0x01, 0x1D, 0xEC, 0x9D, 0x00, 0x00, 0x00, 0x00,
/* Europe/Moscow */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35405,67 +36863,70 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00, 0x45,
0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x56, 0xB6, 0xC0, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5F, 0x1E, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9D, 0x3E, 0xF2, 0x79, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x2A, 0xEE, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9E, 0xF7, 0x39, 0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x57, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA0, 0xD8, 0x6C, 0xE9, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x16, 0x09, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0x3C, 0xA6, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x10, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA4, 0x3D, 0x32, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x15, 0x68, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0x3D, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x1E, 0x45, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB5, 0xA4, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x04, 0x02, 0x04, 0x06, 0x05, 0x06, 0x07, 0x06, 0x05, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0B, 0x0C, 0x09, 0x06, 0x05, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC0, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x5F, 0x1E, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0x3E, 0xF2, 0x79, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x2A, 0xEE, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xF7, 0x39, 0x69, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x57, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD8, 0x6C, 0xE9, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x00, 0x16, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x3C, 0xA6, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x10, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x3D, 0x32, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x15, 0x68, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3D, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x1E, 0x45, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x02, 0x04, 0x06, 0x05, 0x06, 0x07,
+0x06, 0x05, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x09, 0x06, 0x05, 0x0A, 0x09, 0x0A,
0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0D, 0x09, 0x00, 0x00, 0x23, 0x39, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x39, 0x00, 0x04, 0x00, 0x00, 0x31, 0x87, 0x01, 0x08, 0x00, 0x00, 0x23,
-0x77, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x97, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x46, 0x50, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A,
-0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x11, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
-0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00,
-0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0xDE, 0x67, 0xDF, 0x01, 0x4C, 0x0E, 0xF1,
-0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20,
-0x77, 0x65, 0x73, 0x74, 0x20, 0x52, 0x75, 0x73, 0x73, 0x69, 0x61,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0D, 0x09, 0x00, 0x00, 0x23, 0x39, 0x00, 0x00, 0x00, 0x00, 0x23, 0x39, 0x00, 0x04, 0x00,
+0x00, 0x31, 0x87, 0x01, 0x08, 0x00, 0x00, 0x23, 0x77, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x97, 0x01,
+0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00,
+0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x1D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
+0x44, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00,
+0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xDE, 0x67, 0xDF, 0x01, 0x4C, 0x0E, 0xF1, 0x00, 0x00, 0x00, 0x14, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x30, 0x20, 0x2D, 0x20, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x20, 0x61, 0x72, 0x65, 0x61,
+
/* Europe/Nicosia */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35514,86 +36975,89 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00,
0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45,
0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x77, 0x1E, 0xB8, 0x00, 0x00, 0x00,
-0x00, 0x09, 0xED, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0x92, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0xFA, 0x64, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBE, 0xC6, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xE1, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x75, 0x4F, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x63, 0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xE0, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x13, 0x4D, 0x19, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xC2, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x23, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xA4, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x03, 0xA3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0x86, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xE3, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x68, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xC3, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00,
-0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x1F,
-0x48, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45,
-0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x77, 0x1E, 0xB8, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xED, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0x92, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xFA, 0x64, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBE, 0xC6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xE1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x75, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x63, 0xFD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xE0, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x19, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xC2, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xA4, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xA3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0x86, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x68, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x84, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x2A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x0C, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1B, 0xEE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0x91, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x2D, 0x73, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x1F, 0x48,
+0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x45,
+0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
+0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Europe/Oslo */
@@ -35648,97 +37112,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72,
-0xEE, 0x24, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x27, 0xE3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0xD4, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xB7, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC,
-0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE,
-0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0,
-0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x62, 0x07, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xAF, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC,
-0xA8, 0x4C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x98, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE,
-0x88, 0x2E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x78, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
-0x68, 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x58, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2,
-0x47, 0xF2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x37, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4,
-0x27, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x17, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6,
-0x10, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x06, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
-0xF0, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0A, 0x14, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
-0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xE4, 0xC1, 0x32, 0x01,
-0x23, 0x0F, 0xB8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xEE, 0x24, 0x6C, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x27, 0xE3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD4, 0x7B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xB7, 0x4D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x62, 0x07, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xAF, 0x20, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA8, 0x4C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x98, 0x3D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x88, 0x2E, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x78, 0x1F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x68, 0x10, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x58, 0x01, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x47, 0xF2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x37, 0xE3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x27, 0xD4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x17, 0xC5, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x10, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x2F, 0x06, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF0, 0xD2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x02, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x00, 0x00, 0x0A, 0x14, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45,
+0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
+0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xE4, 0xC1, 0x32, 0x01, 0x23, 0x0F, 0xB8, 0x00, 0x00, 0x00, 0x00,
/* Europe/Paris */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35809,125 +37276,127 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57,
0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54,
0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x00,
-0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x6B, 0xC8, 0x4A, 0x8B, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x60, 0x50, 0x8B, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9B, 0x47, 0x78, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD7, 0x2C, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x91, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xC0, 0x48, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xA0, 0x2A, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x80, 0x0C, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x12, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7A, 0x4C, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA4, 0x35, 0x81, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x5E, 0x23, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0x9B, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA8, 0x58, 0x26, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x07, 0x7D, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x34, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xE7, 0x5F, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAB, 0xD7, 0x50, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x41, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x2F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x2F, 0xE6, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x4C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xC8, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xB9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xAA, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xD6, 0x60, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xC6, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xB7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xA8, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x5F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x8A, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x9A, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x6C, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x05, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x6C, 0x27, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD0, 0x4F, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x89, 0xF1, 0xF0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x0B, 0xBB, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x1B, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x01, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x04, 0x08, 0x06, 0x07, 0x06, 0x07, 0x09, 0x04, 0x09, 0x0A, 0x08, 0x0A, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x02, 0x31, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x31, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10,
-0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x1A, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x57, 0x45,
-0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x57, 0x45, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
-0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD3, 0xE4, 0xCA, 0x01,
-0x16, 0x37, 0xF5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6B, 0xC8, 0x4A, 0x8B, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x60, 0x50, 0x8B, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x47, 0x78, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD7, 0x2C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xBC, 0x91, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xC0, 0x48, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0xA0, 0x2A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x80, 0x0C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x2E, 0x12, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x7A, 0x4C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x35, 0x81, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x5E, 0x23, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x58, 0x26, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x07, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xEE, 0x34, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE7, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xD7, 0x50, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC7, 0x41, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x70, 0x22, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x50, 0x04, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x2F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x2F, 0xE6, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x4C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0F, 0xC8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xB9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xEF, 0xAA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xD6, 0x60, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0xC6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xB7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xB8, 0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x5F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x98, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9A, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x78, 0x6C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x58, 0x4E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x05, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x38, 0x30, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x58, 0xAC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x6C, 0x27, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x4F, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x89, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xBB, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x08, 0x06, 0x07, 0x06, 0x07, 0x09, 0x04, 0x09,
+0x0A, 0x08, 0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x02,
+0x31, 0x00, 0x00, 0x00, 0x00, 0x02, 0x31, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x1A, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x15, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x50,
+0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
+0x43, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D,
+0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD3, 0xE4, 0xCA, 0x01, 0x16, 0x37, 0xF5, 0x00, 0x00, 0x00, 0x00,
/* Europe/Podgorica */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -35974,86 +37443,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x02,
-0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA,
-0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E,
-0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCA, 0x13, 0xC5, 0x01, 0x30, 0x0E, 0x8A, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x02, 0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCA, 0x13, 0xC5, 0x01, 0x30, 0x0E, 0x8A, 0x00, 0x00, 0x00, 0x00,
/* Europe/Prague */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -36107,97 +37578,100 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x50, 0x4D, 0x54, 0x00,
0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x08, 0x00,
-0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E,
-0x49, 0x92, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xCF, 0xEA, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B,
-0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C,
-0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8,
-0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1,
-0x79, 0xFF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xA1, 0x4F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3,
-0x80, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5,
-0x4C, 0x38, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7,
-0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0x01, 0x70, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10,
-0xED, 0x64, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x00, 0x00, 0x0D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x49, 0x92, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x6C, 0xCF, 0xEA, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x79, 0xFF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xA1, 0x4F, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x80, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x38, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x01, 0x70, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0xED, 0x64, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x0D, 0x88,
+0x00, 0x00, 0x00, 0x00, 0x0D, 0x88, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00,
+0x50, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45,
+0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
0x00, 0xD5, 0xC0, 0x0D, 0x01, 0x28, 0xAE, 0x85, 0x00, 0x00, 0x00, 0x00,
/* Europe/Riga */
@@ -36253,95 +37727,98 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45,
0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
-0x00, 0x0F, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x56, 0xB6, 0xCD, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x87, 0xFE, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0x84, 0x8E, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x88, 0x46, 0x7E, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA0, 0xCB, 0x82, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xE7, 0xF1, 0xDE, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0xAF, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x62, 0x65, 0x50, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x90, 0x89, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD5, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xF9, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4D, 0xBC, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x32, 0xE3, 0xEA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xBA, 0xEF, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x04, 0x08, 0x04, 0x08,
-0x04, 0x08, 0x04, 0x08, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x03, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x03, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCD, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x87, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x8E, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x88, 0x46, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xCB, 0x82, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xE7, 0xF1, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xAF, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x62, 0x65, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x90, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x4D, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0xE3, 0xEA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xBA, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x07, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x0C, 0x0B, 0x0C, 0x03, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x03, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
-0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x00,
-0x00, 0x16, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x16, 0xA2, 0x00, 0x04, 0x00, 0x00, 0x24, 0xB2, 0x01,
-0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x10, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x00, 0x00, 0x2A,
-0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54,
-0x00, 0x4C, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54,
-0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45,
-0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xE0, 0x3A, 0x57, 0x01,
-0x37, 0x6E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x00, 0x00, 0x16, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x16, 0xA2, 0x00,
+0x04, 0x00, 0x00, 0x24, 0xB2, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x18, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x4C,
+0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x4C, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D,
+0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00,
+0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34,
+0x0A,
+#endif
+0x00, 0xE0, 0x3A, 0x57, 0x01, 0x37, 0x6E, 0x90, 0x00, 0x00, 0x00, 0x00,
/* Europe/Rome */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -36404,120 +37881,122 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x52, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x3D, 0xBE, 0x1E, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x70, 0xBC, 0x83, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x07, 0x5F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD0, 0x6E, 0x42, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x0B, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x45, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x08, 0xEB, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x2E, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0xCB, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0E, 0x39, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xE4, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xCD, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x12, 0x53, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x03,
-0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0xBE, 0x1E, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x70, 0xBC, 0x83, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x07, 0x5F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x42, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x45, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEB, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x2E, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCB, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0x0E, 0x39, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xE4, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xCD, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x11, 0xAD, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0xB4, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54,
-0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31,
-0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC9, 0x43, 0x70, 0x01, 0x25, 0xB4, 0xCD, 0x00, 0x00,
-0x00, 0x00,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC9, 0x43, 0x70, 0x01, 0x25, 0xB4, 0xCD, 0x00, 0x00, 0x00, 0x00,
/* Europe/Samara */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x2B, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2B, 0x80, 0x00, 0x00, 0x00,
0xA1, 0x00, 0x26, 0xAC, 0xB5, 0xA4, 0x0B, 0x50, 0xBE, 0x4C, 0x26, 0xC0, 0x15, 0x27, 0x99, 0xC0,
0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0,
0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0,
@@ -36538,75 +38017,75 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x09, 0x0B, 0x02, 0x0C,
0x02, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
-0x0E, 0x0D, 0x0E, 0x0F, 0x10, 0x0E, 0x00, 0x00, 0x2E, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
+0x0E, 0x0D, 0x0E, 0x0F, 0x0B, 0x0E, 0x00, 0x00, 0x2E, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00,
0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09,
0x00, 0x00, 0x38, 0x40, 0x01, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x18, 0x00, 0x00, 0x2A, 0x30,
-0x01, 0x1C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x21, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00,
+0x01, 0x1C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x21, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00,
0x46, 0x50, 0x01, 0x25, 0x00, 0x00, 0x46, 0x50, 0x01, 0x25, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04,
-0x00, 0x00, 0x38, 0x40, 0x01, 0x25, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x53, 0x54,
-0x00, 0x4B, 0x55, 0x59, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45,
-0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x2B, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x26, 0xAC, 0xFF, 0xFF, 0xFF,
-0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x4C, 0x26, 0xC0, 0x00, 0x00, 0x00,
-0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00,
-0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x29, 0x00, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xC2, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xC4, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xA4, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x84, 0xA1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x64, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x72, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x63, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x43, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x47, 0x23, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x49, 0x03, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xE3, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x01, 0x02,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x07, 0x08, 0x07, 0x08, 0x09, 0x0B, 0x02, 0x0C, 0x02, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0F, 0x10, 0x0E, 0x00,
-0x00, 0x2E, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00,
-0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x38,
-0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x14, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x18, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1C, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x21, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x25, 0x00, 0x00, 0x46,
-0x50, 0x01, 0x25, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x01, 0x25, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53,
-0x41, 0x4D, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x53, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x54, 0x00, 0x4D,
-0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x53, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x4D, 0x54, 0x2D,
-0x34, 0x0A, 0x00, 0xDA, 0x81, 0x7F, 0x01, 0x5F, 0x2E, 0x58, 0x00, 0x00, 0x00, 0x39, 0x4D, 0x6F,
-0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x30, 0x20, 0x28, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B,
-0x30, 0x31, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2D, 0x31, 0x30,
-0x2D, 0x32, 0x36, 0x29, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6D, 0x61, 0x72, 0x61, 0x2C, 0x20, 0x55,
-0x64, 0x6D, 0x75, 0x72, 0x74, 0x69, 0x61,
+0x00, 0x00, 0x38, 0x40, 0x01, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x4B,
+0x55, 0x59, 0x53, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53,
+0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x26, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x4C, 0x26, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x00, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xC2, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xA1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x89, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x6B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x72, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x4D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x54, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x6A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x4C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x2E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x10, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x17, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9A, 0xF2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xF9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x0E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xDB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xBD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xD2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x9F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xBB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x9D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x07, 0x08, 0x07, 0x08, 0x09, 0x0B, 0x02, 0x0C, 0x02, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0F, 0x0B, 0x0E, 0x00, 0x00,
+0x2E, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04,
+0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40,
+0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x14, 0x00, 0x00,
+0x2A, 0x30, 0x00, 0x18, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x21,
+0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x25, 0x00, 0x00, 0x46, 0x50,
+0x01, 0x25, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x01, 0x25, 0x4C, 0x4D,
+0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x53, 0x54, 0x00, 0x4B, 0x55, 0x59,
+0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45,
+0x45, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x41, 0x4D, 0x54, 0x2D, 0x34,
+0x0A,
+#endif
+0x00, 0xDA, 0x81, 0x7F, 0x01, 0x5F, 0x2E, 0x58, 0x00, 0x00, 0x00, 0x19, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x31, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6D, 0x61, 0x72, 0x61, 0x2C, 0x20, 0x55, 0x64, 0x6D,
+0x75, 0x72, 0x74, 0x69, 0x61,
/* Europe/San_Marino */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -36669,41 +38148,174 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x52, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x3D, 0xBE, 0x1E, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x70, 0xBC, 0x83, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0xBE, 0x1E, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x70, 0xBC, 0x83, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x07, 0x5F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x42, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x45, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEB, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x2E, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCB, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0x0E, 0x39, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xE4, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xCD, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x11, 0xAD, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCC, 0x57, 0x32, 0x01, 0x25, 0xAE, 0x4A, 0x00, 0x00, 0x00, 0x00,
+
+/* Europe/Sarajevo */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00,
+0xCA, 0x02, 0x35, 0xE0, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90, 0xCE, 0xA2, 0x43, 0x10,
+0xCF, 0x92, 0x34, 0x10, 0xD0, 0x82, 0x25, 0x10, 0xD0, 0xFA, 0x01, 0x70, 0xD1, 0xA1, 0x8C, 0x10,
+0xD2, 0x4E, 0x40, 0x90, 0x18, 0x45, 0x5F, 0x70, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90,
+0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10,
+0x1E, 0x8C, 0x90, 0x10, 0x1F, 0x7C, 0x81, 0x10, 0x20, 0x6C, 0x72, 0x10, 0x21, 0x5C, 0x63, 0x10,
+0x22, 0x4C, 0x54, 0x10, 0x23, 0x3C, 0x45, 0x10, 0x24, 0x2C, 0x36, 0x10, 0x25, 0x1C, 0x27, 0x10,
+0x26, 0x0C, 0x18, 0x10, 0x27, 0x05, 0x43, 0x90, 0x27, 0xF5, 0x34, 0x90, 0x28, 0xE5, 0x25, 0x90,
+0x29, 0xD5, 0x16, 0x90, 0x2A, 0xC5, 0x07, 0x90, 0x2B, 0xB4, 0xF8, 0x90, 0x2C, 0xA4, 0xE9, 0x90,
+0x2D, 0x94, 0xDA, 0x90, 0x2E, 0x84, 0xCB, 0x90, 0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90,
+0x31, 0x5D, 0xD9, 0x10, 0x32, 0x72, 0xB4, 0x10, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10,
+0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90,
+0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90,
+0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90,
+0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10,
+0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10,
+0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10,
+0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90,
+0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90,
+0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90,
+0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10,
+0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10,
+0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90,
+0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90,
+0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90,
+0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10,
+0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10,
+0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10,
+0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90,
+0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90,
+0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90,
+0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
+0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x02, 0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x07, 0x5F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD0, 0x6E, 0x42, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x0B, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x45, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x08, 0xEB, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x2E, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0xCB, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0E, 0x39, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xE4, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xCD, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x12, 0x53, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00,
0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
@@ -36758,157 +38370,28 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x03,
-0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0xB4, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54,
-0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31,
-0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCC, 0x57, 0x32, 0x01, 0x25, 0xAE, 0x4A, 0x00, 0x00,
-0x00, 0x00,
-
-/* Europe/Sarajevo */
-0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00,
-0xCA, 0x02, 0x35, 0xE0, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90, 0xCE, 0xA2, 0x43, 0x10,
-0xCF, 0x92, 0x34, 0x10, 0xD0, 0x82, 0x25, 0x10, 0xD0, 0xFA, 0x01, 0x70, 0xD1, 0xA1, 0x8C, 0x10,
-0xD2, 0x4E, 0x40, 0x90, 0x18, 0x45, 0x5F, 0x70, 0x18, 0xE3, 0xAF, 0x90, 0x19, 0xD3, 0xA0, 0x90,
-0x1A, 0xC3, 0x91, 0x90, 0x1B, 0xBC, 0xBD, 0x10, 0x1C, 0xAC, 0xAE, 0x10, 0x1D, 0x9C, 0x9F, 0x10,
-0x1E, 0x8C, 0x90, 0x10, 0x1F, 0x7C, 0x81, 0x10, 0x20, 0x6C, 0x72, 0x10, 0x21, 0x5C, 0x63, 0x10,
-0x22, 0x4C, 0x54, 0x10, 0x23, 0x3C, 0x45, 0x10, 0x24, 0x2C, 0x36, 0x10, 0x25, 0x1C, 0x27, 0x10,
-0x26, 0x0C, 0x18, 0x10, 0x27, 0x05, 0x43, 0x90, 0x27, 0xF5, 0x34, 0x90, 0x28, 0xE5, 0x25, 0x90,
-0x29, 0xD5, 0x16, 0x90, 0x2A, 0xC5, 0x07, 0x90, 0x2B, 0xB4, 0xF8, 0x90, 0x2C, 0xA4, 0xE9, 0x90,
-0x2D, 0x94, 0xDA, 0x90, 0x2E, 0x84, 0xCB, 0x90, 0x2F, 0x74, 0xBC, 0x90, 0x30, 0x64, 0xAD, 0x90,
-0x31, 0x5D, 0xD9, 0x10, 0x32, 0x72, 0xB4, 0x10, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10,
-0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90,
-0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90,
-0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90,
-0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10,
-0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10,
-0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10,
-0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90,
-0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90,
-0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90,
-0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10,
-0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10,
-0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90,
-0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90,
-0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90,
-0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10,
-0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10,
-0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10,
-0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90,
-0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90,
-0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90,
-0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x02,
-0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA,
-0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E,
-0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCC, 0x43, 0xAA, 0x01, 0x2E, 0xC2, 0x82, 0x00, 0x00, 0x00,
-0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCC, 0x43, 0xAA, 0x01, 0x2E, 0xC2, 0x82, 0x00, 0x00, 0x00, 0x00,
/* Europe/Simferopol */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x22, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x22, 0x80, 0x00, 0x00, 0x00,
0xAA, 0x19, 0xA4, 0x20, 0xB5, 0xA4, 0x19, 0x60, 0xCB, 0x04, 0x8D, 0xD0, 0xCC, 0xE7, 0x4B, 0x10,
0xCD, 0xA9, 0x17, 0x90, 0xCE, 0xA2, 0x43, 0x10, 0xCF, 0x92, 0x34, 0x10, 0xCF, 0x9F, 0x38, 0xE0,
0x15, 0x27, 0xA7, 0xD0, 0x16, 0x18, 0xDC, 0x40, 0x17, 0x08, 0xDB, 0x50, 0x17, 0xFA, 0x0F, 0xC0,
@@ -36918,90 +38401,92 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x25, 0x9E, 0x73, 0x50, 0x26, 0x8D, 0x2E, 0xF0,
0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xCF, 0x50, 0x2B, 0xB4, 0xCE, 0x60, 0x2C, 0xA4, 0xB1, 0x50,
0x2D, 0x94, 0xB0, 0x60, 0x2D, 0xC2, 0xC6, 0xD0, 0x2E, 0x84, 0x85, 0x40, 0x2F, 0x74, 0x84, 0x50,
-0x30, 0x64, 0x67, 0x40, 0x31, 0x5D, 0xA0, 0xD0, 0x31, 0x5D, 0xCB, 0x00, 0x32, 0x72, 0xA6, 0x00,
-0x32, 0xC9, 0x7E, 0xD0, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, 0x35, 0x1D, 0x9D, 0x10,
-0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, 0x38, 0xDD, 0x61, 0x10,
-0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, 0x3C, 0xA6, 0x5F, 0x90,
-0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, 0x40, 0x66, 0x23, 0x90,
-0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, 0x44, 0x25, 0xE7, 0x90,
-0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10,
-0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
-0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
-0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x5E, 0x80,
-0x54, 0x4C, 0x1D, 0x60, 0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x07, 0x03, 0x07,
-0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x03,
-0x02, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x07, 0x03, 0x07, 0x03, 0x07, 0x09, 0x08, 0x03, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
-0x0D, 0x08, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x04, 0x00, 0x00,
-0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10,
-0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40,
-0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00,
-0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08,
-0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00,
-0x53, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00,
-0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC4, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0xA4, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x04, 0x8D, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x9F, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x9E, 0x73, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x8D, 0x2E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xC6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x85, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x67, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xA0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xCB, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0xC9, 0x7E, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60,
-0x00, 0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03,
-0x07, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x03, 0x02, 0x0A, 0x02,
-0x0A, 0x02, 0x0A, 0x07, 0x03, 0x07, 0x03, 0x07, 0x09, 0x08, 0x03, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x30, 0x64, 0x67, 0x40, 0x31, 0x5D, 0xA0, 0xD0, 0x32, 0x72, 0xA6, 0x00, 0x32, 0xC9, 0x7E, 0xD0,
+0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10, 0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10,
+0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, 0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90,
+0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90, 0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90,
+0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, 0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10,
+0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, 0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10,
+0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10,
+0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90,
+0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90,
+0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x5E, 0x80, 0x54, 0x4C, 0x1D, 0x60,
+0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x03, 0x02, 0x0A, 0x02, 0x0A,
+0x02, 0x0A, 0x07, 0x03, 0x07, 0x03, 0x09, 0x08, 0x03, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x08, 0x00,
-0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x38,
-0x40, 0x00, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54,
-0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53,
-0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A,
-0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x6F, 0x73, 0x63,
-0x6F, 0x77, 0x2B, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x08, 0x00, 0x00, 0x1F,
+0xF8, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00,
+0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00,
+0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x45,
+0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
+0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC4, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x19, 0xA4, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x04, 0x8D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x9F, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x9E, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x8D, 0x2E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0xC2, 0xC6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x85, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x84, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x67, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xA0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0xC9, 0x7E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x02, 0x03,
+0x06, 0x04, 0x05, 0x04, 0x05, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x03, 0x02, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x07,
+0x03, 0x07, 0x03, 0x09, 0x08, 0x03, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x08, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00,
+0x00, 0x00, 0x1F, 0xE0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30,
+0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C,
+0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30,
+0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00,
+0x2A, 0x30, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
+0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44,
+0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xCD, 0xEA, 0xD7, 0x01, 0x46, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x0F, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x72, 0x69, 0x6D, 0x65, 0x61,
/* Europe/Skopje */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -37048,86 +38533,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x02,
-0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA,
-0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E,
-0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC9, 0x63, 0xFD, 0x01, 0x33, 0x5C, 0xE5, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x02, 0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC9, 0x63, 0xFD, 0x01, 0x33, 0x5C, 0xE5, 0x00, 0x00, 0x00, 0x00,
/* Europe/Sofia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x42, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -37178,92 +38665,95 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C,
0x20, 0x00, 0x04, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43,
0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x81, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCE, 0x24, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xC3, 0xE3,
-0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA, 0x01,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00, 0x11, 0x63, 0xEF,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x0B,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x35, 0x21, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x2C, 0xED,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, 0x0C, 0xCF,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xA1,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x83,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x82,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x64,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x46,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x28,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x0A,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0x7F, 0xB4,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x7B,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F,
-0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06,
-0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08,
-0x07, 0x08, 0x07, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x00, 0x00, 0x15, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00, 0x00,
-0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x15, 0x00, 0x00, 0x1C, 0x20,
-0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x15, 0x00, 0x00,
-0x1C, 0x20, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D,
-0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F,
-0x34, 0x0A, 0x00, 0xCA, 0x75, 0x6D, 0x01, 0x36, 0x3C, 0x92, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCE, 0x24, 0xFF, 0xFF, 0xFF, 0xFF,
+0x72, 0xC3, 0xE3, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x24, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x63, 0xEF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x0B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x35, 0x21, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x2C, 0xED, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x0C, 0xCF, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x7F, 0xB4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x0A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x02, 0x06, 0x02,
+0x06, 0x02, 0x06, 0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06,
+0x02, 0x06, 0x02, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x00, 0x00, 0x15, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00,
+0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x10, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x15, 0x00,
+0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x15, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45,
+0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
+0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xCA, 0x75, 0x6D, 0x01, 0x36, 0x3C, 0x92, 0x00, 0x00, 0x00, 0x00,
/* Europe/Stockholm */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -37309,89 +38799,92 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x53, 0x45, 0x54,
0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x54, 0xD5, 0x9F, 0x94,
-0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x55, 0x73, 0x62, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x1E, 0x8C, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x54, 0xD5, 0x9F, 0x94, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7C, 0x55, 0x73, 0x62, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x1E, 0x8C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x00, 0x00, 0x10, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1E, 0x00, 0x04, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54,
-0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xE3,
-0xDD, 0x55, 0x01, 0x2E, 0x33, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x10,
+0xEC, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1E, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x08, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x08, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43,
+0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xE3, 0xDD, 0x55, 0x01, 0x2E, 0x33, 0x48, 0x00, 0x00, 0x00, 0x00,
/* Europe/Tallinn */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22, 0x80, 0x00, 0x00, 0x00,
0x9E, 0x59, 0x2D, 0xCC, 0x9E, 0xB9, 0x90, 0x90, 0x9F, 0x84, 0x97, 0x90, 0xA1, 0x00, 0x2B, 0x70,
0xA4, 0x73, 0x6F, 0x4C, 0xC8, 0xB0, 0xB5, 0xE0, 0xCA, 0xC6, 0x97, 0x50, 0xCC, 0xE7, 0x4B, 0x10,
0xCD, 0xA9, 0x17, 0x90, 0xCE, 0xA2, 0x43, 0x10, 0xCF, 0x92, 0x34, 0x10, 0xD0, 0x74, 0xCB, 0xE0,
@@ -37404,130 +38897,132 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x2B, 0xB4, 0xEA, 0x80, 0x2C, 0xA4, 0xDB, 0x80, 0x2D, 0x94, 0xCC, 0x80, 0x2E, 0x84, 0xBD, 0x80,
0x2F, 0x74, 0xAE, 0x80, 0x30, 0x64, 0x9F, 0x80, 0x31, 0x5D, 0xCB, 0x00, 0x32, 0x72, 0xA6, 0x00,
0x33, 0x3D, 0xAD, 0x00, 0x34, 0x52, 0x88, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x36, 0x06, 0xBE, 0x50,
-0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, 0x38, 0x1C, 0xBB, 0xE0,
-0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90,
-0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10,
-0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10,
-0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10,
-0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90,
-0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90,
-0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90,
-0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10,
-0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10,
-0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90,
-0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90,
-0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90,
-0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10,
-0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10,
-0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10,
-0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90,
-0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90,
-0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90,
-0x01, 0x04, 0x02, 0x03, 0x01, 0x05, 0x06, 0x07, 0x03, 0x02, 0x03, 0x02, 0x06, 0x08, 0x06, 0x08,
-0x06, 0x08, 0x06, 0x08, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0F, 0x0D, 0x0E, 0x0D, 0x05, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x00, 0x00, 0x17,
-0x34, 0x00, 0x00, 0x00, 0x00, 0x17, 0x34, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x38,
-0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x15, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x4C, 0x4D, 0x54,
-0x00, 0x54, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45,
-0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0x59, 0x2D, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
-0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x2B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4,
-0x73, 0x6F, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xB0, 0xB5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0xC6, 0x97, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x74, 0xCB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x06, 0xBE, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0xBB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03,
+0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90, 0x3C, 0xA6, 0x5F, 0x90,
+0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90, 0x40, 0x66, 0x23, 0x90,
+0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10, 0x44, 0x25, 0xE7, 0x90,
+0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10,
+0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
+0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
+0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x37, 0x6C, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90,
+0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10,
+0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10,
+0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, 0x66, 0x08, 0xB5, 0x90,
+0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, 0x69, 0xC8, 0x79, 0x90,
+0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, 0x6D, 0x88, 0x3D, 0x90,
+0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, 0x71, 0x51, 0x3C, 0x10,
+0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, 0x75, 0x11, 0x00, 0x10,
+0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, 0x78, 0xD0, 0xC4, 0x10,
+0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90,
+0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, 0x01, 0x04, 0x02, 0x03,
0x01, 0x05, 0x06, 0x07, 0x03, 0x02, 0x03, 0x02, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08,
0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0F, 0x0D, 0x0E, 0x0D,
-0x05, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0F, 0x0D, 0x0E, 0x05,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D,
+0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x00, 0x00, 0x17, 0x34, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x34, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D,
+0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30,
+0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00,
+0x2A, 0x30, 0x00, 0x15, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30,
+0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00,
+0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B,
+0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x59, 0x2D, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x2B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x73, 0x6F, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xB0, 0xB5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xC6, 0x97, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x74, 0xCB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x06, 0xBE, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x01, 0x05, 0x06, 0x07, 0x03, 0x02, 0x03,
+0x02, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x06, 0x08, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0F, 0x0D, 0x0E, 0x05, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
-0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x00, 0x00, 0x17, 0x34, 0x00, 0x00, 0x00,
-0x00, 0x17, 0x34, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A,
-0x30, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x15, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A,
-0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54,
-0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53,
-0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D,
-0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xE3, 0xFD, 0xE2, 0x01, 0x38, 0x6C,
-0x78, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E, 0x0D, 0x0E,
+0x0D, 0x00, 0x00, 0x17, 0x34, 0x00, 0x00, 0x00, 0x00, 0x17, 0x34, 0x00, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00,
+0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x15, 0x00, 0x00, 0x38,
+0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00,
+0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x1D, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45,
+0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34,
+0x0A,
+#endif
+0x00, 0xE3, 0xFD, 0xE2, 0x01, 0x38, 0x6C, 0x78, 0x00, 0x00, 0x00, 0x00,
/* Europe/Tirane */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -37577,96 +39072,99 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x00, 0x00, 0x12, 0x98, 0x00, 0x00,
0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10,
0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
-0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x34, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8,
-0x6D, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD,
-0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB8, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x28, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEF, 0x3E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xD0, 0x71, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0B,
-0xE9, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB4, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0xD2, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x94, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0xB0, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x11,
-0x90, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x70, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x3B, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x48, 0xB9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x31, 0xD5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFC, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x19,
-0x00, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xCC, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26,
-0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x00, 0x00, 0x12, 0x98, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F,
-0x33, 0x0A, 0x00, 0xC8, 0x66, 0x15, 0x01, 0x30, 0xEB, 0xE5, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0xAA, 0x34, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x6D, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB8, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x28, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEF, 0x3E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x05, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xD0, 0x71, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE9, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xB4, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xD2, 0x6B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x94, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xB0, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x90, 0xDE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x70, 0xC0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x3B, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x48, 0xB9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x31, 0xD5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFC, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x00, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x00, 0x00, 0x12, 0x98, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC8, 0x66, 0x15, 0x01, 0x30, 0xEB, 0xE5, 0x00, 0x00, 0x00, 0x00,
/* Europe/Tiraspol */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x8D, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0x80, 0x00, 0x00, 0x00,
0x9E, 0x6B, 0x9F, 0x0C, 0xB7, 0xB0, 0xD2, 0x08, 0xB9, 0x3E, 0xF3, 0x60, 0xB9, 0xEF, 0x9C, 0x60,
0xBA, 0xDF, 0x8D, 0x60, 0xBB, 0xCF, 0x7E, 0x60, 0xBC, 0xC8, 0xA9, 0xE0, 0xBD, 0xB8, 0x9A, 0xE0,
0xBE, 0xA8, 0x8B, 0xE0, 0xBF, 0x98, 0x7C, 0xE0, 0xC0, 0x88, 0x6D, 0xE0, 0xC1, 0x78, 0x5E, 0xE0,
@@ -37677,146 +39175,236 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0, 0x19, 0xDB, 0x43, 0x40, 0x1A, 0xCC, 0x93, 0xD0,
0x1B, 0xBC, 0xA0, 0xF0, 0x1C, 0xAC, 0x91, 0xF0, 0x1D, 0x9C, 0x82, 0xF0, 0x1E, 0x8C, 0x73, 0xF0,
0x1F, 0x7C, 0x64, 0xF0, 0x20, 0x6C, 0x55, 0xF0, 0x21, 0x5C, 0x46, 0xF0, 0x22, 0x4C, 0x37, 0xF0,
-0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x25, 0x9E, 0x73, 0x50,
-0x26, 0x43, 0x3E, 0xD0, 0x27, 0xF5, 0x26, 0x80, 0x28, 0xE5, 0x17, 0x80, 0x29, 0x60, 0xE8, 0x60,
-0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xCF, 0x50, 0x2B, 0xB4, 0xCE, 0x60, 0x2C, 0xA4, 0xB1, 0x50,
-0x2D, 0x94, 0xB0, 0x60, 0x2E, 0x84, 0x93, 0x50, 0x2F, 0x74, 0x92, 0x60, 0x30, 0x64, 0x75, 0x50,
-0x31, 0x5D, 0xAE, 0xE0, 0x32, 0x72, 0x7B, 0xD0, 0x33, 0x3D, 0xBB, 0x10, 0x34, 0x52, 0x96, 0x10,
-0x35, 0x1D, 0x9D, 0x10, 0x36, 0x32, 0x78, 0x10, 0x36, 0xFD, 0x7F, 0x10, 0x38, 0x1B, 0x94, 0x90,
-0x38, 0xDD, 0x61, 0x10, 0x39, 0xFB, 0x76, 0x90, 0x3A, 0xBD, 0x43, 0x10, 0x3B, 0xDB, 0x58, 0x90,
-0x3C, 0xA6, 0x5F, 0x90, 0x3D, 0xBB, 0x3A, 0x90, 0x3E, 0x86, 0x41, 0x90, 0x3F, 0x9B, 0x1C, 0x90,
-0x40, 0x66, 0x23, 0x90, 0x41, 0x84, 0x39, 0x10, 0x42, 0x46, 0x05, 0x90, 0x43, 0x64, 0x1B, 0x10,
-0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10,
-0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10,
-0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90,
-0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90,
-0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90,
-0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10,
-0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10,
-0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90,
-0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90,
-0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90,
-0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10,
-0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10,
-0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10,
-0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90,
-0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90,
-0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90,
-0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0B, 0x05, 0x03, 0x04,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x00, 0x00, 0x1B,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00, 0x00, 0x18, 0x78, 0x00, 0x08, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D,
-0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xF8, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0x6B, 0x9F, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB0, 0xD2, 0x08, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0x3E, 0xF3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0x9C, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBA, 0xDF, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0x7E, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xA9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0x9A, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBE, 0xA8, 0x8B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x7C, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC0, 0x88, 0x6D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x5E, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x4F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x40, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC4, 0x48, 0x31, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x22, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC6, 0x28, 0x13, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x18, 0x04, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xBC, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x77, 0x7D, 0x50, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD0, 0x4E, 0x90, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x9E, 0x73, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x26, 0x43, 0x3E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x26, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x60, 0xE8, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x75, 0x50, 0x00,
-0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x7B, 0xD0, 0x00,
-0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00,
-0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00,
-0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0B, 0x05, 0x03, 0x04,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E,
-0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x00, 0x00, 0x1B,
-0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00, 0x00, 0x18, 0x78, 0x00, 0x08, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x15, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54,
-0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D,
-0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x0B, 0xFB, 0xF0,
+0x26, 0x43, 0x4C, 0xE0, 0x27, 0x05, 0x35, 0x80, 0x27, 0xF5, 0x26, 0x80, 0x28, 0xE5, 0x17, 0x80,
+0x29, 0x60, 0xE8, 0x60, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xCF, 0x50, 0x2B, 0xB4, 0xCE, 0x60,
+0x2C, 0xA4, 0xB1, 0x50, 0x2D, 0x94, 0xB0, 0x60, 0x2E, 0x84, 0x93, 0x50, 0x2F, 0x74, 0x92, 0x60,
+0x30, 0x64, 0x75, 0x50, 0x31, 0x5D, 0xAE, 0xE0, 0x32, 0x72, 0x7B, 0xD0, 0x33, 0x3D, 0xAD, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x36, 0x32, 0x6A, 0x00, 0x36, 0xFD, 0x71, 0x00,
+0x38, 0x1B, 0x86, 0x80, 0x38, 0xDD, 0x53, 0x00, 0x39, 0xFB, 0x68, 0x80, 0x3A, 0xBD, 0x35, 0x00,
+0x3B, 0xDB, 0x4A, 0x80, 0x3C, 0xA6, 0x51, 0x80, 0x3D, 0xBB, 0x2C, 0x80, 0x3E, 0x86, 0x33, 0x80,
+0x3F, 0x9B, 0x0E, 0x80, 0x40, 0x66, 0x15, 0x80, 0x41, 0x84, 0x2B, 0x00, 0x42, 0x45, 0xF7, 0x80,
+0x43, 0x64, 0x0D, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x45, 0x43, 0xEF, 0x00, 0x46, 0x05, 0xBB, 0x80,
+0x47, 0x23, 0xD1, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x49, 0xCE, 0xBA, 0x00,
+0x4A, 0xE3, 0x95, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x4D, 0x8E, 0x7E, 0x00,
+0x4E, 0xAC, 0x93, 0x80, 0x4F, 0x6E, 0x60, 0x00, 0x50, 0x8C, 0x75, 0x80, 0x51, 0x57, 0x7C, 0x80,
+0x52, 0x6C, 0x57, 0x80, 0x53, 0x37, 0x5E, 0x80, 0x54, 0x4C, 0x39, 0x80, 0x55, 0x17, 0x40, 0x80,
+0x56, 0x2C, 0x1B, 0x80, 0x56, 0xF7, 0x22, 0x80, 0x58, 0x15, 0x38, 0x00, 0x58, 0xD7, 0x04, 0x80,
+0x59, 0xF5, 0x1A, 0x00, 0x5A, 0xB6, 0xE6, 0x80, 0x5B, 0xD4, 0xFC, 0x00, 0x5C, 0xA0, 0x03, 0x00,
+0x5D, 0xB4, 0xDE, 0x00, 0x5E, 0x7F, 0xE5, 0x00, 0x5F, 0x94, 0xC0, 0x00, 0x60, 0x5F, 0xC7, 0x00,
+0x61, 0x7D, 0xDC, 0x80, 0x62, 0x3F, 0xA9, 0x00, 0x63, 0x5D, 0xBE, 0x80, 0x64, 0x1F, 0x8B, 0x00,
+0x65, 0x3D, 0xA0, 0x80, 0x66, 0x08, 0xA7, 0x80, 0x67, 0x1D, 0x82, 0x80, 0x67, 0xE8, 0x89, 0x80,
+0x68, 0xFD, 0x64, 0x80, 0x69, 0xC8, 0x6B, 0x80, 0x6A, 0xDD, 0x46, 0x80, 0x6B, 0xA8, 0x4D, 0x80,
+0x6C, 0xC6, 0x63, 0x00, 0x6D, 0x88, 0x2F, 0x80, 0x6E, 0xA6, 0x45, 0x00, 0x6F, 0x68, 0x11, 0x80,
+0x70, 0x86, 0x27, 0x00, 0x71, 0x51, 0x2E, 0x00, 0x72, 0x66, 0x09, 0x00, 0x73, 0x31, 0x10, 0x00,
+0x74, 0x45, 0xEB, 0x00, 0x75, 0x10, 0xF2, 0x00, 0x76, 0x2F, 0x07, 0x80, 0x76, 0xF0, 0xD4, 0x00,
+0x78, 0x0E, 0xE9, 0x80, 0x78, 0xD0, 0xB6, 0x00, 0x79, 0xEE, 0xCB, 0x80, 0x7A, 0xB0, 0x98, 0x00,
+0x7B, 0xCE, 0xAD, 0x80, 0x7C, 0x99, 0xB4, 0x80, 0x7D, 0xAE, 0x8F, 0x80, 0x7E, 0x79, 0x96, 0x80,
+0x7F, 0x8E, 0x71, 0x80, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A, 0x0B,
+0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x06, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x00, 0x00, 0x1B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00, 0x00,
+0x18, 0x78, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11,
+0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00,
+0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22,
+0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20,
+0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45, 0x45,
+0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
+0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x6B, 0x9F, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB0, 0xD2, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x3E, 0xF3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0x9C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xDF, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0x7E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xC8, 0xA9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0x9A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xA8, 0x8B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x7C, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x88, 0x6D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x5E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x68, 0x4F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x40, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x48, 0x31, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x22, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x28, 0x13, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x18, 0x04, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xBC, 0x93, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x77, 0x7D, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x4E, 0x90, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x43, 0x4C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x60, 0xE8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x75, 0x50, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xAE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x7B, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x51, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x33, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x0E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x5E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x39, 0x80, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x1B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x22, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD4, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xE5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xA9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xBE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xA7, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x64, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x6B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x46, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x4D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x2F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xEB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xE9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xB6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xCB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xAD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xB4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x8F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0x96, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x71, 0x80, 0x00, 0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x09, 0x07, 0x08, 0x07, 0x08, 0x0B, 0x0A,
+0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
+0x0C, 0x0D, 0x06, 0x04, 0x03, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x00, 0x00, 0x1B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF4, 0x00, 0x04, 0x00,
+0x00, 0x18, 0x78, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x0E,
+0x10, 0x00, 0x15, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x19, 0x00,
+0x00, 0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x22, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x22, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1E, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x0C, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x45,
+0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54,
+0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
+0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
+0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* Europe/Ulyanovsk */
+0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00,
+0xA1, 0x00, 0x28, 0x40, 0xB5, 0xA4, 0x0B, 0x50, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30,
+0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30,
+0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0,
+0x1E, 0x8C, 0x65, 0xE0, 0x1F, 0x7C, 0x56, 0xE0, 0x20, 0x6C, 0x47, 0xE0, 0x21, 0x5C, 0x38, 0xE0,
+0x22, 0x4C, 0x29, 0xE0, 0x23, 0x3C, 0x1A, 0xE0, 0x24, 0x2C, 0x0B, 0xE0, 0x25, 0x1C, 0x0A, 0xF0,
+0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70, 0x27, 0xF5, 0x18, 0x70, 0x28, 0xE5, 0x17, 0x80,
+0x29, 0x78, 0xBF, 0x80, 0x29, 0xD4, 0xD0, 0x40, 0x2A, 0xC4, 0xB3, 0x30, 0x2B, 0xB4, 0xDC, 0x70,
+0x2C, 0xA4, 0xCD, 0x70, 0x2D, 0x94, 0xBE, 0x70, 0x2E, 0x84, 0xAF, 0x70, 0x2F, 0x74, 0xA0, 0x70,
+0x30, 0x64, 0x91, 0x70, 0x31, 0x5D, 0xBC, 0xF0, 0x32, 0x72, 0x97, 0xF0, 0x33, 0x3D, 0x9E, 0xF0,
+0x34, 0x52, 0x79, 0xF0, 0x35, 0x1D, 0x80, 0xF0, 0x36, 0x32, 0x5B, 0xF0, 0x36, 0xFD, 0x62, 0xF0,
+0x38, 0x1B, 0x78, 0x70, 0x38, 0xDD, 0x44, 0xF0, 0x39, 0xFB, 0x5A, 0x70, 0x3A, 0xBD, 0x26, 0xF0,
+0x3B, 0xDB, 0x3C, 0x70, 0x3C, 0xA6, 0x43, 0x70, 0x3D, 0xBB, 0x1E, 0x70, 0x3E, 0x86, 0x25, 0x70,
+0x3F, 0x9B, 0x00, 0x70, 0x40, 0x66, 0x07, 0x70, 0x41, 0x84, 0x1C, 0xF0, 0x42, 0x45, 0xE9, 0x70,
+0x43, 0x63, 0xFE, 0xF0, 0x44, 0x25, 0xCB, 0x70, 0x45, 0x43, 0xE0, 0xF0, 0x46, 0x05, 0xAD, 0x70,
+0x47, 0x23, 0xC2, 0xF0, 0x47, 0xEE, 0xC9, 0xF0, 0x49, 0x03, 0xA4, 0xF0, 0x49, 0xCE, 0xAB, 0xF0,
+0x4A, 0xE3, 0x86, 0xF0, 0x4B, 0xAE, 0x8D, 0xF0, 0x4C, 0xCC, 0xA3, 0x70, 0x4D, 0x8E, 0x6F, 0xF0,
+0x54, 0x4C, 0x1D, 0x60, 0x56, 0xF7, 0x14, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x08,
+0x09, 0x07, 0x0A, 0x01, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, 0x00, 0x00, 0x2D, 0x60, 0x00,
+0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00,
+0x00, 0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x38,
+0x40, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B,
+0x30, 0x34, 0x00, 0x2B, 0x30, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x28, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0xA4, 0x0B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x14, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x08, 0x09, 0x07, 0x0A, 0x01,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x06, 0x07, 0x06, 0x07, 0x04, 0x07, 0x04, 0x00, 0x00, 0x2D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x00,
+0x00, 0x38, 0x40, 0x00, 0x0C, 0x00, 0x00, 0x46, 0x50, 0x01, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01,
+0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0C, 0x4C,
+0x4D, 0x54, 0x00, 0x2B, 0x30, 0x33, 0x00, 0x2B, 0x30, 0x35, 0x00, 0x2B, 0x30, 0x34, 0x00, 0x2B,
+0x30, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x3C, 0x2B, 0x30, 0x34,
+0x3E, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0xDC, 0x3C, 0x35, 0x01, 0x5C, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x12, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x31, 0x20, 0x2D, 0x20, 0x55, 0x6C, 0x79, 0x61, 0x6E, 0x6F, 0x76, 0x73, 0x6B,
/* Europe/Uzhgorod */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -37868,90 +39456,94 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B,
0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1E,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0xEE, 0xB0, 0x18,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x80, 0xA9, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA1, 0x9E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xE5, 0xFD, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x9E, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x8D, 0x2E, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x42, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04,
-0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
-0x08, 0x07, 0x08, 0x07, 0x06, 0x01, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x1E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0xEE, 0xB0, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x80, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA1, 0x9E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xE5, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x9E, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x8D, 0x2E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x42, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x01, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07,
+0x06, 0x01, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x14, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x2A,
-0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x15, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x15, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53,
-0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00,
-0x00, 0x00, 0x08, 0x52, 0x75, 0x74, 0x68, 0x65, 0x6E, 0x69, 0x61,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00,
+0x00, 0x14, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x38,
+0x40, 0x01, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00,
+0x00, 0x38, 0x40, 0x01, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x15, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53,
+0x4B, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C,
+0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xD3, 0x83, 0x22, 0x01, 0x34, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x08, 0x52, 0x75, 0x74, 0x68,
+0x65, 0x6E, 0x69, 0x61,
/* Europe/Vaduz */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -37997,84 +39589,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x06, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x42, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0xF0, 0xEA, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0x71, 0xD4, 0x06, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x17, 0x6A, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF7, 0x4C, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xC2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0xF0, 0xEA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x71, 0xD4, 0x06, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x17, 0x6A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF7, 0x4C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xC2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xFA, 0x00, 0x04, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD1,
-0x46, 0x38, 0x01, 0x21, 0x2D, 0xF2, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x08,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xFA, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43,
+0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD1, 0x46, 0x38, 0x01, 0x21, 0x2D, 0xF2, 0x00, 0x00, 0x00, 0x00,
/* Europe/Vatican */
0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38137,115 +39732,117 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x52, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08,
-0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x3D, 0xBE, 0x1E, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x70, 0xBC, 0x83, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x07, 0x5F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD0, 0x6E, 0x42, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x0B, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x45, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x08, 0xEB, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x2E, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0xCB, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0E, 0x39, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xE4, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xCD, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x11, 0xAD, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x12, 0x53, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x03,
-0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0xBE, 0x1E, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x70, 0xBC, 0x83, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x37, 0xA6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xC5, 0xCB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xB5, 0xBC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x89, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x9E, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x60, 0xA5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x7E, 0xBB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x5C, 0x37, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x4C, 0x28, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x6C, 0x35, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x07, 0x5F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x42, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0xD2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x3E, 0x31, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1D, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xEB, 0x80, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x33, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xD9, 0xC4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0x1C, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0xA6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xFC, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x99, 0x88, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xE5, 0xD0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x00, 0xC5, 0xB2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x9C, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x77, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x85, 0x76, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x2B, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x45, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xEB, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x2E, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCB, 0x39, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0x0E, 0x39, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xE4, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8A, 0xFD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xCD, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x1A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x11, 0xAD, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x12, 0x53, 0xFC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x12, 0xCE, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x00, 0x00,
-0x00, 0x0B, 0xB4, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
-0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54,
-0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31,
-0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xC9, 0x44, 0x4E, 0x01, 0x25, 0xA8, 0xF9, 0x00, 0x00,
-0x00, 0x00,
+0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
+0x07, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB4, 0x00, 0x04, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xC9, 0x44, 0x4E, 0x01, 0x25, 0xA8, 0xF9, 0x00, 0x00, 0x00, 0x00,
/* Europe/Vienna */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38299,96 +39896,99 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xA2, 0x5F, 0x2F, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0xF2, 0xBF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x70, 0x1A, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA3, 0x44, 0x5B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD1, 0x7F, 0x45, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x34, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD3, 0x63, 0x1B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD5, 0x39, 0xC3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x4D, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xD0, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02,
-0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0F, 0x51,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43,
-0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD2, 0xE6,
-0xE2, 0x01, 0x2B, 0x94, 0xB5, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xA2, 0x5F, 0x2F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0xF2, 0xBF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x70, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x44, 0x5B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x7F, 0x45, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDB, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x1B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x39, 0xC3, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x0F, 0x51, 0x00, 0x00,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20,
+0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
+0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD2, 0xE6, 0xE2, 0x01, 0x2B, 0x94, 0xB5, 0x00, 0x00, 0x00, 0x00,
/* Europe/Vilnius */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4C, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38401,7 +40001,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x19, 0xDB, 0x43, 0x40, 0x1A, 0xCC, 0x93, 0xD0, 0x1B, 0xBC, 0xA0, 0xF0, 0x1C, 0xAC, 0x91, 0xF0,
0x1D, 0x9C, 0x82, 0xF0, 0x1E, 0x8C, 0x73, 0xF0, 0x1F, 0x7C, 0x64, 0xF0, 0x20, 0x6C, 0x55, 0xF0,
0x21, 0x5C, 0x46, 0xF0, 0x22, 0x4C, 0x37, 0xF0, 0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0,
-0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70, 0x27, 0xF5, 0x18, 0x70,
+0x25, 0x1C, 0x19, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x27, 0x05, 0x35, 0x80, 0x27, 0xF5, 0x26, 0x80,
0x28, 0xE5, 0x17, 0x80, 0x29, 0xD5, 0x08, 0x80, 0x2A, 0xC4, 0xF9, 0x80, 0x2B, 0xB4, 0xEA, 0x80,
0x2C, 0xA4, 0xDB, 0x80, 0x2D, 0x94, 0xCC, 0x80, 0x2E, 0x84, 0xBD, 0x80, 0x2F, 0x74, 0xAE, 0x80,
0x30, 0x64, 0x9F, 0x80, 0x31, 0x5D, 0xCB, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x33, 0x3D, 0xAD, 0x00,
@@ -38426,7 +40026,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x7B, 0xCE, 0xBB, 0x90, 0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90,
0x7F, 0x8E, 0x7F, 0x90, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x08, 0x06, 0x07, 0x06, 0x07, 0x05,
0x09, 0x05, 0x09, 0x05, 0x09, 0x05, 0x09, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A,
-0x0B, 0x0A, 0x0B, 0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
+0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D,
0x0C, 0x0D, 0x04, 0x0E, 0x0F, 0x0E, 0x10, 0x04, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10,
0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10,
0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10,
@@ -38443,93 +40043,96 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4B, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x12,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x26,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCC, 0x44,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x4F, 0x1F, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x85, 0x4A, 0x98,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0xF1, 0x30, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x66, 0x78, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xAC, 0xCF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x59, 0x2A, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x30, 0x3D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x08, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xEA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xCC, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xAE, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xCB, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0xAA, 0xC0, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3E, 0x12, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x08,
-0x06, 0x07, 0x06, 0x07, 0x05, 0x09, 0x05, 0x09, 0x05, 0x09, 0x05, 0x09, 0x0A, 0x0B, 0x0A, 0x0B,
-0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
-0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x04, 0x0E, 0x0F, 0x0E, 0x10, 0x04, 0x11, 0x10, 0x11,
-0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11,
+0x01, 0x01, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xCC, 0x44, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x4F, 0x1F, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x85, 0x4A, 0x98, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0xF1, 0x30, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x66, 0x78, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xAC, 0xCF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x59, 0x2A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x30, 0x3D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x26, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xF9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xEA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xDB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xCC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xBD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xAE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x9F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xCB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xAD, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0xAA, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x12, 0x13, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x03, 0x05, 0x08, 0x06, 0x07, 0x06, 0x07,
+0x05, 0x09, 0x05, 0x09, 0x05, 0x09, 0x05, 0x09, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B,
+0x0A, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C,
+0x0D, 0x0C, 0x0D, 0x04, 0x0E, 0x0F, 0x0E, 0x10, 0x04, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11,
0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11,
0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11,
0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11,
-0x10, 0x11, 0x10, 0x00, 0x00, 0x17, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x04, 0x00,
-0x00, 0x16, 0x68, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x10, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x18, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00,
-0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01,
-0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00, 0x00, 0x0E,
-0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x4C,
-0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45,
-0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00,
-0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30,
-0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0xDC, 0xC4, 0xED, 0x01, 0x39, 0x49, 0xD2, 0x00,
-0x00, 0x00, 0x00,
+0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x00,
+0x00, 0x17, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x16, 0x68, 0x00,
+0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x10, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x14, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00,
+0x00, 0x1C, 0x20, 0x01, 0x18, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00,
+0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x18, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00,
+0x00, 0x1C, 0x20, 0x00, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x4C, 0x4D, 0x54, 0x00, 0x57,
+0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D,
+0x53, 0x4B, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
+0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C,
+0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xDC, 0xC4, 0xED, 0x01, 0x39, 0x49, 0xD2, 0x00, 0x00, 0x00, 0x00,
/* Europe/Volgograd */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38539,8 +40142,8 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0,
0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0,
0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, 0x1E, 0x8C, 0x65, 0xE0, 0x1F, 0x7C, 0x56, 0xE0,
-0x20, 0x6C, 0x47, 0xE0, 0x21, 0x5C, 0x38, 0xE0, 0x22, 0x4C, 0x29, 0xE0, 0x23, 0x3C, 0x1A, 0xE0,
-0x24, 0x2C, 0x0B, 0xE0, 0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70,
+0x20, 0x6C, 0x47, 0xE0, 0x21, 0x5C, 0x38, 0xE0, 0x22, 0x4C, 0x29, 0xE0, 0x23, 0x3C, 0x28, 0xF0,
+0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70,
0x27, 0xF5, 0x18, 0x70, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xC4, 0xB3, 0x30, 0x2B, 0xB4, 0xDC, 0x70,
0x2C, 0xA4, 0xCD, 0x70, 0x2D, 0x94, 0xBE, 0x70, 0x2E, 0x84, 0xAF, 0x70, 0x2F, 0x74, 0xA0, 0x70,
0x30, 0x64, 0x91, 0x70, 0x31, 0x5D, 0xBC, 0xF0, 0x32, 0x72, 0x97, 0xF0, 0x33, 0x3D, 0x9E, 0xF0,
@@ -38552,7 +40155,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x47, 0x23, 0xC2, 0xF0, 0x47, 0xEE, 0xC9, 0xF0, 0x49, 0x03, 0xA4, 0xF0, 0x49, 0xCE, 0xAB, 0xF0,
0x4A, 0xE3, 0x86, 0xF0, 0x4B, 0xAE, 0x8D, 0xF0, 0x4C, 0xCC, 0xA3, 0x70, 0x4D, 0x8E, 0x6F, 0xF0,
0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x02, 0x03, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0x09, 0x08, 0x09, 0x06, 0x0B, 0x0A,
+0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x06, 0x0B, 0x0A,
0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x0C, 0x00, 0x00, 0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30,
@@ -38564,60 +40167,62 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x4C, 0x4D, 0x54, 0x00, 0x54, 0x53, 0x41, 0x54, 0x00, 0x53, 0x54, 0x41, 0x54, 0x00, 0x56, 0x4F,
0x4C, 0x53, 0x54, 0x00, 0x56, 0x4F, 0x4C, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB,
-0xD8, 0x86, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
-0xB0, 0x4C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36,
-0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x02, 0x03, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06,
-0x08, 0x09, 0x08, 0x09, 0x06, 0x0B, 0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x0C, 0x00, 0x00, 0x29,
-0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x09, 0x00,
-0x00, 0x38, 0x40, 0x00, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00, 0x38, 0x40, 0x00,
-0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00, 0x38,
-0x40, 0x01, 0x0E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x19, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x19, 0x00, 0x00, 0x38, 0x40, 0x00,
-0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x53, 0x41, 0x54, 0x00,
-0x53, 0x54, 0x41, 0x54, 0x00, 0x56, 0x4F, 0x4C, 0x53, 0x54, 0x00, 0x56, 0x4F, 0x4C, 0x54, 0x00,
-0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0xD3, 0xB0,
-0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B,
-0x30, 0x30, 0x20, 0x2D, 0x20, 0x43, 0x61, 0x73, 0x70, 0x69, 0x61, 0x6E, 0x20, 0x53, 0x65, 0x61,
-
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF5, 0x46, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xD8, 0x86, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x0B, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0xB0, 0x4C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xCE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xCD, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x01, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x85, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x83, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x02, 0x03,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x08,
+0x09, 0x08, 0x09, 0x08, 0x09, 0x06, 0x0B, 0x0A, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C,
+0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0D, 0x0C, 0x00, 0x00,
+0x29, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x09,
+0x00, 0x00, 0x38, 0x40, 0x00, 0x09, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00, 0x38, 0x40,
+0x00, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x14, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0E, 0x00, 0x00,
+0x38, 0x40, 0x01, 0x0E, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x19,
+0x00, 0x00, 0x38, 0x40, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x19, 0x00, 0x00, 0x38, 0x40,
+0x00, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x53, 0x41, 0x54,
+0x00, 0x53, 0x54, 0x41, 0x54, 0x00, 0x56, 0x4F, 0x4C, 0x53, 0x54, 0x00, 0x56, 0x4F, 0x4C, 0x54,
+0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0xD3, 0xB0, 0xB5, 0x01, 0x56, 0x6E, 0xC2, 0x00, 0x00, 0x00, 0x22, 0x4D, 0x53, 0x4B, 0x2B,
+0x30, 0x30, 0x20, 0x2D, 0x20, 0x56, 0x6F, 0x6C, 0x67, 0x6F, 0x67, 0x72, 0x61, 0x64, 0x2C, 0x20,
+0x4B, 0x69, 0x72, 0x6F, 0x76, 0x2C, 0x20, 0x53, 0x61, 0x72, 0x61, 0x74, 0x6F, 0x76,
/* Europe/Warsaw */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38682,114 +40287,117 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x43, 0x45,
0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6,
-0xD0, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0xA8, 0x2A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C,
-0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9,
-0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9,
-0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x9A,
-0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x65, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x7D,
-0x7C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x76, 0xDE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7,
-0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2,
-0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x80,
-0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x84, 0xBA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x95,
-0x92, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xBB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x62,
-0xFF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4B, 0x23, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x5E,
-0xAD, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C,
-0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02,
-0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x54,
-0xD2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xB4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xE1,
-0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0x96, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0x14,
-0x96, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA,
-0xA4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0x95, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xD4,
-0x5A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x77, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xB4,
-0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x94,
-0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3A, 0x3B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x7D,
-0x3A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1A, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A,
-0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B,
-0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74,
-0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54,
-0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33,
-0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13,
-0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3,
-0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3,
-0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC,
-0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C,
-0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C,
-0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C,
-0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xDA, 0xD6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04,
-0x05, 0x04, 0x08, 0x06, 0x07, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xD0, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x99, 0xA8, 0x2A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x9A, 0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x65, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x7D, 0x7C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x76, 0xDE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x80, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x84, 0xBA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x95, 0x92, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x8A, 0xBB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x62, 0xFF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x4B, 0x23, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x5E, 0xAD, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x78, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x54, 0xD2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF1, 0xB4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xE1, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0x96, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0x14, 0x96, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xBA, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xA4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x9A, 0x95, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xD4, 0x5A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x7A, 0x77, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xB4, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x94, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3A, 0x3B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x7D, 0x3A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x1A, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0xDA, 0xD6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x08, 0x06, 0x07, 0x03,
+0x02, 0x05, 0x04, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x05, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x16, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x16, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
-0x0A, 0x00, 0xD9, 0x0E, 0x68, 0x01, 0x32, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x00, 0x00, 0x13,
+0xB0, 0x00, 0x00, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x16, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x16, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
+0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
+0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD9, 0x0E, 0x68, 0x01, 0x32, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
/* Europe/Zagreb */
0x50, 0x48, 0x50, 0x32, 0x01, 0x48, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38836,86 +40444,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01,
0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x02,
-0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9,
-0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92,
-0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xFA,
-0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E,
-0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3,
-0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3,
-0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC,
-0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C,
-0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C,
-0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
-0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20,
-0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43,
-0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xCF, 0x36, 0xE0, 0x01, 0x2B, 0x05, 0x7A, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x3C, 0xF0, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x02, 0x35, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xFA, 0x01, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xA1, 0x8C, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x45, 0x5F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10,
+0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D,
+0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xCF, 0x36, 0xE0, 0x01, 0x2B, 0x05, 0x7A, 0x00, 0x00, 0x00, 0x00,
/* Europe/Zaporozhye */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -38967,93 +40577,96 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x43, 0x55, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00,
0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0D,
-0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x56, 0xB6, 0xC3, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x19, 0xA3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xAA, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xBD, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
-0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
-0x06, 0x04, 0x05, 0x04, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x02, 0x0A,
-0x02, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x22, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC3, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x19, 0xA3, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xAA, 0xE7, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xBD, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0xED, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xCF, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xB1, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0x93, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x03, 0x07, 0x03, 0x07,
+0x03, 0x07, 0x03, 0x07, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x02, 0x0A, 0x02, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B,
-0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00, 0x00, 0x20, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x20,
-0xD0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x38,
-0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00,
-0x00, 0x1C, 0x20, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x55, 0x54, 0x00, 0x45, 0x45, 0x54,
-0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53,
-0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00,
-0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x2E, 0x5A, 0x61, 0x70, 0x6F, 0x72,
-0x6F, 0x7A, 0x68, 0x27, 0x79, 0x65, 0x2C, 0x20, 0x45, 0x20, 0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73,
-0x6B, 0x20, 0x2F, 0x20, 0x5A, 0x61, 0x70, 0x6F, 0x72, 0x69, 0x7A, 0x68, 0x69, 0x61, 0x2C, 0x20,
-0x45, 0x20, 0x4C, 0x75, 0x68, 0x61, 0x6E, 0x73, 0x6B,
+0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x0B, 0x0C, 0x00,
+0x00, 0x20, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x20, 0xD0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x08, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x10, 0x00, 0x00, 0x1C,
+0x20, 0x01, 0x14, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x19, 0x00, 0x00, 0x2A, 0x30, 0x01,
+0x1D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x1D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x08, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x55, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x45,
+0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x31, 0x30,
+0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0xD2, 0x51, 0x25, 0x01, 0x48, 0x51, 0x7A, 0x00, 0x00, 0x00, 0x2E, 0x5A, 0x61, 0x70, 0x6F,
+0x72, 0x6F, 0x7A, 0x68, 0x27, 0x79, 0x65, 0x2F, 0x5A, 0x61, 0x70, 0x6F, 0x72, 0x69, 0x7A, 0x68,
+0x69, 0x61, 0x3B, 0x20, 0x4C, 0x75, 0x67, 0x61, 0x6E, 0x73, 0x6B, 0x2F, 0x4C, 0x75, 0x68, 0x61,
+0x6E, 0x73, 0x6B, 0x20, 0x28, 0x65, 0x61, 0x73, 0x74, 0x29,
/* Europe/Zurich */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39099,84 +40712,87 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x06, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00,
0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x42, 0x4D, 0x54,
0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0xF0, 0xEA, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0x71, 0xD4, 0x06, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x17, 0x6A, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF7, 0x4C, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xC2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
+0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0xF0, 0xEA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x71, 0xD4, 0x06, 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x17, 0x6A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xE2, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF7, 0x4C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xC2, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xFA, 0x00, 0x04, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
-0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0xD1,
-0xA1, 0x5D, 0x01, 0x1F, 0xAD, 0xD5, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x00, 0x00, 0x08,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xFA, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43,
+0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0xD1, 0xA1, 0x5D, 0x01, 0x1F, 0xAD, 0xD5, 0x00, 0x00, 0x00, 0x00,
/* Factory */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39185,18 +40801,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x4C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 0x7A, 0x6F, 0x6E,
0x65, 0x20, 0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2D, 0x2D, 0x73,
0x65, 0x65, 0x20, 0x7A, 0x69, 0x63, 0x20, 0x6D, 0x61, 0x6E, 0x75, 0x61, 0x6C, 0x20, 0x70, 0x61,
-0x67, 0x65, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-0x31, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x65, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x31, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x6F, 0x63, 0x61, 0x6C,
+0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 0x7A, 0x6F, 0x6E, 0x65, 0x20, 0x6D, 0x75, 0x73, 0x74, 0x20,
+0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2D, 0x2D, 0x73, 0x65, 0x65, 0x20, 0x7A, 0x69, 0x63, 0x20,
+0x6D, 0x61, 0x6E, 0x75, 0x61, 0x6C, 0x20, 0x70, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x0A, 0x3C,
0x4C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 0x7A, 0x6F, 0x6E, 0x65, 0x20,
0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2D, 0x2D, 0x73, 0x65, 0x65,
0x20, 0x7A, 0x69, 0x63, 0x20, 0x6D, 0x61, 0x6E, 0x75, 0x61, 0x6C, 0x20, 0x70, 0x61, 0x67, 0x65,
-0x00, 0x00, 0x00, 0x0A, 0x3C, 0x4C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20,
-0x7A, 0x6F, 0x6E, 0x65, 0x20, 0x6D, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74,
-0x2D, 0x2D, 0x73, 0x65, 0x65, 0x20, 0x7A, 0x69, 0x63, 0x20, 0x6D, 0x61, 0x6E, 0x75, 0x61, 0x6C,
-0x20, 0x70, 0x61, 0x67, 0x65, 0x3E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x3E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* GB */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39282,155 +40901,157 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* GB-Eire */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39516,210 +41137,227 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x42,
0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4,
-0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x26, 0xAD, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCF, 0x30, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x9C, 0x9D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x85, 0xBA, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x9C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0xB8, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x60, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x2C, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0xD3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xE9, 0xF0, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xD2, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x79, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x92, 0xD0, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0xB2, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x49, 0x5A, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x76, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x12, 0x58, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xE9, 0x00, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xDB, 0x57, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xB1, 0xFE, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9B, 0x1B, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x7A, 0xFD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x51, 0xA4, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0xC1, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x09, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x59, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x77, 0x3B, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x60, 0x58, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x6E, 0x5E, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0xFB, 0x32, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x63, 0x29, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x1E, 0x21, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0xDF, 0xE0, 0x10,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x03, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xEC, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xCE, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xEA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x94, 0xCC, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x6B, 0x74, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x54, 0x90, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x3D, 0xAD, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x14, 0x54, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xFD, 0x71, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xDD, 0x53, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xB3, 0xFA, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x81, 0x67, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x61, 0x49, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x4A, 0x66, 0x20,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x21, 0x0D, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x00, 0xEF, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xE0, 0xD1, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xC0, 0xB3, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x7B, 0xAB, 0xA0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xC6, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xA8, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x8A, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0x6C, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x4E, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD0, 0x30, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB0, 0x12, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x2E, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x10, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0xF2, 0xA0,
-0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0xC6, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xA8, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xF8, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xA7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0x89, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0x6B, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x4D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x61, 0x2F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x4B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x2D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x0F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xE9, 0xF1, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xC9, 0xD3, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xA9, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x89, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03,
-0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xFF, 0xB5,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
-0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0A, 0x47, 0x4D,
-0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D,
-0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00,
-0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1A, 0x5D, 0x09, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x26, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD6, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xCF, 0x30, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xC3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x9C, 0x9D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x97, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x85, 0xBA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x76, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0x9C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x7B, 0xC8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x4E, 0xB8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3F, 0xFB, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x25, 0x60, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x27, 0xC6, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x2A, 0x2C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xEB, 0xF8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x00, 0xD3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xD5, 0x15, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xE9, 0xF0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xC7, 0x6C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xD2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x4E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x79, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x30, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x92, 0xD0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x4C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0xB2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x2E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x49, 0x5A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x30, 0x10, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x76, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xF2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x12, 0x58, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xD4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBA, 0xE9, 0x00, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0xF1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xDB, 0x57, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xD3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xB1, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0xB5, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9B, 0x1B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x97, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x7A, 0xFD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x79, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x51, 0xA4, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x5B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0xC1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xD6, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x09, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x16, 0x26, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x97, 0x59, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xD1, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x77, 0x3B, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xB1, 0x00, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x60, 0x58, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x90, 0xE2, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x6E, 0x5E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0xFB, 0x32, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x69, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x63, 0x29, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x1E, 0x21, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xFD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0xDF, 0xE0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4E, 0xAC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0xFE, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x8E, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xEC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xCB, 0xCE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xC4, 0xF9, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xEA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x94, 0xCC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x6B, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x54, 0x90, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x3D, 0xAD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x14, 0x54, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xFD, 0x71, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xDD, 0x53, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xB3, 0xFA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x81, 0x67, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0x7D, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x61, 0x49, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x4A, 0x66, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x21, 0x0D, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x00, 0xEF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xE0, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xC0, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0x7B, 0xAB, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC7, 0xBB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xC6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x29, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xA8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0x8A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE9, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0x6C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x09, 0xC8, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x4E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xB2, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x91, 0xFC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB0, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x71, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x2E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x10, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x31, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0xF2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0xC6, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x18, 0xA8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xF8, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0x6B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x4D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x61, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0xF1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xC9, 0xD3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xA9, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x89, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE7, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03,
+0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x06, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0xFF, 0xFF, 0xFF, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0C, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x04, 0x00, 0x00,
+0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x42, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* GMT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* GMT0 */
+/* GMT+0 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* GMT-0 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-/* GMT+0 */
+/* GMT0 */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Greenwich */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Hongkong */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39750,64 +41388,70 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90,
0x00, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4B, 0x53, 0x54,
0x00, 0x48, 0x4B, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x69, 0x5A, 0xF6, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC9, 0xEA, 0x57, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDA, 0x3A, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x4B, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0x62, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD3, 0x6A, 0xB7, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x93, 0x4A, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD5, 0x42, 0xB0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x9A, 0xB9, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD7, 0x3E, 0x41, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x24, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x39, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x06, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDA, 0xD9, 0x1B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xED, 0xE8, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDC, 0xB8, 0xFD, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCD, 0xCA, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x1A, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAC, 0x5B, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE0, 0x81, 0xFC, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96, 0xC9, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE2, 0x4F, 0x69, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x76, 0xAB, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE4, 0x2F, 0x4B, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x5F, 0xC7, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE6, 0x0F, 0x2D, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x3F, 0xA9, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE7, 0xF8, 0x49, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x1F, 0x8B, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xE9, 0xD8, 0x2B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xFF, 0x6D, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEB, 0xB8, 0x0D, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xDF, 0x4F, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xED, 0x97, 0xEF, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xC8, 0x6C, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF3, 0x40, 0xD0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF7, 0x25, 0x7E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x15, 0x61, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8, 0x00,
-0x00, 0x00, 0x00, 0x04, 0x4D, 0xE6, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x05, 0x47, 0x04, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x37, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xE6, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x83, 0x3D, 0x38, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28, 0x00,
-0x00, 0x00, 0x00, 0x11, 0x9B, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x6C, 0xA8, 0x00,
-0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x6B, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01,
-0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70,
-0x80, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4B, 0x53, 0x54, 0x00, 0x48, 0x4B, 0x54, 0x00,
-0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48,
-0x4B, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x69, 0x5A, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xEA, 0x57, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDA, 0x3A, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x4B, 0x78, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4C, 0x62, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x6A, 0xB7, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x93, 0x4A, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x42, 0xB0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x9A, 0xB9, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3E, 0x41, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2E, 0x24, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x39, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x06, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xD9, 0x1B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xED, 0xE8, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB8, 0xFD, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCD, 0xCA, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xA2, 0x1A, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAC, 0x5B, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x81, 0xFC, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96, 0xC9, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x4F, 0x69, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x76, 0xAB, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x2F, 0x4B, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x5F, 0xC7, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x0F, 0x2D, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x3F, 0xA9, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0xF8, 0x49, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x1F, 0x8B, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xD8, 0x2B, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xFF, 0x6D, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xB8, 0x0D, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xDF, 0x4F, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x97, 0xEF, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xC8, 0x6C, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x77, 0xD1, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xA8, 0x4E, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x57, 0xB3, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x88, 0x30, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x40, 0xD0, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x68, 0x12, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x20, 0xB2, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x47, 0xF4, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x25, 0x7E, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x15, 0x61, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF9, 0x05, 0x60, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF5, 0x43, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xE5, 0x42, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xDE, 0x5F, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xCE, 0x5E, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBE, 0x41, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xAE, 0x40, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x23, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x8E, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7E, 0x05, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x6E, 0x04, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5D, 0xE7, 0xA8, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x4D, 0xE6, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x05, 0x47, 0x04, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x37, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x26, 0xE6, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x83, 0x3D, 0x38, 0x00, 0x00, 0x00, 0x00, 0x09, 0x06, 0xC8, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xC7, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xE6, 0xAA, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xD6, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x8C, 0x28, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x9B, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x12, 0x6F, 0x6C, 0xA8, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x00, 0x00, 0x6B, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x09,
+0x4C, 0x4D, 0x54, 0x00, 0x48, 0x4B, 0x53, 0x54, 0x00, 0x48, 0x4B, 0x54, 0x00, 0x4A, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x4B, 0x54, 0x2D,
+0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* HST */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60,
-0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x73,
-0x60, 0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x0A,
+0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Iceland */
@@ -39839,54 +41483,56 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x53,
0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x60,
-0x83, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x91, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xD1,
-0x88, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x72, 0x51, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xD5,
-0x03, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x53, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xB6,
-0x36, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x3C, 0x27, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0xB9,
-0x74, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x1A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x3D,
-0x27, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xDA, 0x17, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x26,
-0x43, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xC3, 0x26, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x06,
-0x25, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xAC, 0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC,
-0xCD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x8C, 0x24, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xBC,
-0xAF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x6C, 0x06, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x9C,
-0x91, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x4B, 0xE8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85,
-0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x2B, 0xCA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x65,
-0x8F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x45,
-0x71, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x25,
-0x53, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E,
-0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xD9, 0x77, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5,
-0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCE,
-0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE,
-0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x8D,
-0xF8, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x6D,
-0xDA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x4D,
-0xBC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x36,
-0xD8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16,
-0xBA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6,
-0x9C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6,
-0x7E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xB6,
-0x60, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x96,
-0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F,
-0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F,
-0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F,
-0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x46, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE,
-0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD3, 0x28, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBC, 0x45, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0x60, 0x83, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x91, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xD1, 0x88, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x72, 0x51, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xD5, 0x03, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x53, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xB6, 0x36, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x3C, 0x27, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0xB9, 0x74, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x1A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x3D, 0x27, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xDA, 0x17, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x26, 0x43, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xC3, 0x26, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x06, 0x25, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xAC, 0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC, 0xCD, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x8C, 0x24, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xBC, 0xAF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x6C, 0x06, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x9C, 0x91, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x4B, 0xE8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85, 0xAD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x2B, 0xCA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x65, 0x8F, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x45, 0x71, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x25, 0x53, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x0E, 0x70, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xD9, 0x77, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xE5, 0x17, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCE, 0x34, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xAE, 0x16, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x8D, 0xF8, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x6D, 0xDA, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x4D, 0xBC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x36, 0xD8, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xBA, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0x9C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0x7E, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xB6, 0x60, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x96, 0x42, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x5F, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x41, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x23, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0x05, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xF3, 0x46, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xE7, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD3, 0x28, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x03, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFC, 0xBC, 0x45, 0x20, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0xFF,
-0xFF, 0xEB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00,
-0x09, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x53, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
-0x47, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0xFF, 0xFF, 0xEB, 0x60, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x04, 0xFF, 0xFF, 0xF1, 0xF0, 0x00, 0x09, 0xFF, 0xFF, 0xF1, 0xF0, 0x00,
+0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x49, 0x53, 0x53, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x47, 0x4D, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x4D, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Indian/Antananarivo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39897,6 +41543,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -39906,8 +41553,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x6C, 0x76, 0xED, 0x01,
-0x5B, 0x29, 0xB2, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x6C, 0x76, 0xED, 0x01, 0x5B, 0x29, 0xB2, 0x00, 0x00, 0x00, 0x00,
/* Indian/Chagos */
0x50, 0x48, 0x50, 0x32, 0x01, 0x49, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39915,41 +41563,47 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x89, 0x7E, 0xF7, 0x9C, 0x30, 0xE6, 0xDD, 0xB0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x43, 0xE4, 0x00,
0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54,
-0x00, 0x49, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x89, 0x7E, 0xF7, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x30, 0xE6, 0xDD, 0xB0, 0x00,
-0x01, 0x02, 0x00, 0x00, 0x43, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00,
-0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x49, 0x4F, 0x54, 0x2D, 0x36, 0x0A, 0x00, 0x7E, 0x23, 0xAA, 0x01, 0x81, 0x28,
-0x42, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x49, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7E, 0xF7, 0x9C, 0x00, 0x00, 0x00, 0x00,
+0x30, 0xE6, 0xDD, 0xB0, 0x00, 0x01, 0x02, 0x00, 0x00, 0x43, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x46,
+0x50, 0x00, 0x04, 0x00, 0x00, 0x54, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4F, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x4F, 0x54, 0x2D, 0x36, 0x0A,
+#endif
+0x00, 0x7E, 0x23, 0xAA, 0x01, 0x81, 0x28, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Indian/Christmas */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70,
-0x00, 0x00, 0x43, 0x58, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x73, 0x16, 0xA9, 0xE4, 0x00, 0x01, 0x00, 0x00, 0x63, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x58, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43,
-0x58, 0x54, 0x2D, 0x37, 0x0A, 0x00, 0x79, 0x6F, 0x3D, 0x01, 0xB3, 0xF8, 0x12, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x43, 0x58, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x73, 0x16, 0xA9, 0xE4, 0x00, 0x01, 0x00, 0x00,
+0x63, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x58,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x58, 0x54, 0x2D, 0x37, 0x0A,
+#endif
+0x00, 0x79, 0x6F, 0x3D, 0x01, 0xB3, 0xF8, 0x12, 0x00, 0x00, 0x00, 0x00,
/* Indian/Cocos */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68,
-0x00, 0x00, 0x43, 0x43, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7C, 0x55, 0x26, 0xA4, 0x00, 0x01, 0x00, 0x00, 0x5A, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x68,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43,
-0x43, 0x54, 0x2D, 0x36, 0x3A, 0x33, 0x30, 0x0A, 0x00, 0x76, 0xC3, 0xA5, 0x01, 0xA6, 0x8A, 0x92,
-0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x43, 0x43, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x55, 0x26, 0xA4, 0x00, 0x01, 0x00, 0x00,
+0x5A, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x43,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x43, 0x54, 0x2D, 0x36, 0x3A, 0x33, 0x30, 0x0A,
+#endif
+0x00, 0x76, 0xC3, 0xA5, 0x01, 0xA6, 0x8A, 0x92, 0x00, 0x00, 0x00, 0x00,
/* Indian/Comoro */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -39960,6 +41614,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -39969,36 +41624,41 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x77, 0x80, 0x72, 0x01,
-0x54, 0xAD, 0x8A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x77, 0x80, 0x72, 0x01, 0x54, 0xAD, 0x8A, 0x00, 0x00, 0x00, 0x00,
/* Indian/Kerguelen */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xDA, 0x61, 0x62, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50,
-0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x54, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x61, 0x62, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x54, 0x46, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x46, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0x3E, 0x05, 0xD2, 0x01,
-0x7D, 0xCD, 0x36, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x54, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x61, 0x62, 0x80, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x54, 0x46,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x46, 0x54, 0x2D, 0x35, 0x0A,
+#endif
+0x00, 0x3E, 0x05, 0xD2, 0x01, 0x7D, 0xCD, 0x36, 0x00, 0x00, 0x00, 0x00,
/* Indian/Mahe */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x88, 0x64, 0xE6, 0x84, 0x00, 0x01, 0x00, 0x00, 0x33, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x64, 0xE6, 0x84, 0x00, 0x01, 0x00, 0x00, 0x33, 0xFC,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x43, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x43, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0x82, 0x35, 0x55, 0x01,
-0x67, 0x4B, 0x2A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x64, 0xE6, 0x84, 0x00, 0x01, 0x00, 0x00,
+0x33, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x43,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x43, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0x82, 0x35, 0x55, 0x01, 0x67, 0x4B, 0x2A, 0x00, 0x00, 0x00, 0x00,
/* Indian/Maldives */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40006,15 +41666,18 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0xED, 0x2F, 0xC3, 0x98, 0x01, 0x02, 0x00, 0x00, 0x44, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x44, 0xE8,
0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00,
-0x4D, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x56, 0xB6, 0x9F, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x2F, 0xC3, 0x98, 0x00, 0x01,
-0x02, 0x00, 0x00, 0x44, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x44, 0xE8, 0x00, 0x04, 0x00, 0x00, 0x46,
-0x50, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4D, 0x56, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x56, 0x54, 0x2D, 0x35, 0x0A, 0x00, 0x8F, 0xAF, 0xDA,
-0x01, 0x82, 0xCF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x9F, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0x2F, 0xC3, 0x98, 0x00, 0x01, 0x02, 0x00, 0x00, 0x44, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x44,
+0xE8, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54,
+0x00, 0x4D, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x56, 0x54, 0x2D,
+0x35, 0x0A,
+#endif
+0x00, 0x8F, 0xAF, 0xDA, 0x01, 0x82, 0xCF, 0x70, 0x00, 0x00, 0x00, 0x00,
/* Indian/Mauritius */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40023,17 +41686,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x89, 0x7F, 0x05, 0x98, 0x18, 0x05, 0xED, 0x40, 0x18, 0xDB, 0x72, 0x30, 0x49, 0x03, 0x96, 0xE0,
0x49, 0xCE, 0x8F, 0xD0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x35, 0xE8, 0x00, 0x00,
0x00, 0x00, 0x46, 0x50, 0x01, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
-0x4D, 0x55, 0x53, 0x54, 0x00, 0x4D, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7F, 0x05, 0x98, 0x00, 0x00, 0x00, 0x00, 0x18,
-0x05, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xDB, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x8F, 0xD0, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x00, 0x00, 0x35, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x01, 0x04, 0x00, 0x00, 0x38,
-0x40, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x55, 0x53, 0x54, 0x00, 0x4D, 0x55, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x55, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0x6A, 0x8E,
-0xA5, 0x01, 0x6A, 0x65, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x55, 0x53, 0x54, 0x00, 0x4D, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x89, 0x7F, 0x05, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x05, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0xDB, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0x8F, 0xD0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x00, 0x00, 0x35, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x01, 0x04, 0x00, 0x00,
+0x38, 0x40, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x55, 0x53, 0x54, 0x00, 0x4D, 0x55, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x55, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0x6A, 0x8E, 0xA5, 0x01, 0x6A, 0x65, 0x70, 0x00, 0x00, 0x00, 0x00,
/* Indian/Mayotte */
0x50, 0x48, 0x50, 0x32, 0x01, 0x59, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40044,6 +41709,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x00, 0x00, 0x2A,
0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00,
0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
@@ -40053,22 +41719,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, 0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00,
0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42,
0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A, 0x00, 0x75, 0xD2, 0xC2, 0x01,
-0x57, 0xAD, 0xC5, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x41, 0x54, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x75, 0xD2, 0xC2, 0x01, 0x57, 0xAD, 0xC5, 0x00, 0x00, 0x00, 0x00,
/* Indian/Reunion */
0x50, 0x48, 0x50, 0x32, 0x01, 0x52, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x91, 0xCC, 0x39, 0x80, 0x00, 0x01, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0xCC, 0x39, 0x80, 0x00, 0x01, 0x00, 0x00, 0x34, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x45, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x52, 0x45, 0x54, 0x2D, 0x34, 0x0A, 0x00, 0x69, 0x7D, 0x35, 0x01,
-0x67, 0x4B, 0x2A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0xCC, 0x39, 0x80, 0x00, 0x01, 0x00, 0x00,
+0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x52, 0x45,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x52, 0x45, 0x54, 0x2D, 0x34, 0x0A,
+#endif
+0x00, 0x69, 0x7D, 0x35, 0x01, 0x67, 0x4B, 0x2A, 0x00, 0x00, 0x00, 0x00,
/* Iran */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40109,73 +41778,76 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x04, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0D, 0x00, 0x00, 0x38,
0x40, 0x00, 0x08, 0x00, 0x00, 0x3F, 0x48, 0x01, 0x0D, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x4C,
0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x49, 0x52, 0x53, 0x54, 0x00, 0x49, 0x52, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0xDB, 0x12, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xBB, 0xA2, 0x48, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0x74, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8E, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10,
-0xED, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x55, 0x67, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xDB, 0x9D, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x9C, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xBE, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAC, 0xD0, 0x48, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0x9F, 0x56, 0x38, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8E, 0x03, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x80, 0x89, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6F, 0x37, 0x48, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x61, 0xBD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x31, 0x50, 0x6A, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x42, 0xF0, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x33, 0x32, 0xEF, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x25, 0x75, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x35, 0x14, 0x23, 0x48, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x06, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF5, 0x56, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x37,
-0xE7, 0xDC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD6, 0x8A, 0x48, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xC9, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB9, 0x0F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xAB, 0x95, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x9A, 0x42, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0x8C, 0xC8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x7B, 0x76, 0x48, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x6D, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0xA9, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x4F, 0x2F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3F, 0x2E, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x31, 0xB4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x47, 0xE2, 0xC9, 0x48, 0x00, 0x00, 0x00, 0x00, 0x48,
-0xD5, 0x4F, 0x38, 0x00, 0x00, 0x00, 0x00, 0x49, 0xC5, 0x4E, 0x48, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xB7, 0xD4, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xA6, 0x81, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0x99, 0x07, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x87, 0xB5, 0x48, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0x7A, 0x3B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x68, 0xE8, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x5B, 0x6E, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4B, 0x6D, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x3D, 0xF3, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2C, 0xA1, 0x48, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x1F, 0x27, 0x38, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0D, 0xD4, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x00, 0x5A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x56, 0xEF, 0x08, 0x48, 0x00, 0x00, 0x00, 0x00, 0x57,
-0xE1, 0x8E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD1, 0x8D, 0x48, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xC4, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB2, 0xC0, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xA5, 0x46, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x93, 0xF4, 0x48, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0x86, 0x7A, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x75, 0x27, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x67, 0xAD, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x57, 0xAC, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x4A, 0x32, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x62, 0x38, 0xE0, 0x48, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x2B, 0x66, 0x38, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1A, 0x13, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x0C, 0x99, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFB, 0x47, 0x48, 0x00, 0x00, 0x00, 0x00, 0x66,
-0xED, 0xCD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDD, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xD0, 0x52, 0x38, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBE, 0xFF, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xB1, 0x85, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA0, 0x33, 0x48, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0x92, 0xB9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x81, 0x66, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0x73, 0xEC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x62, 0x9A, 0x48, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x55, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x71, 0x45, 0x1F, 0x48, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x37, 0xA5, 0x38, 0x00, 0x00, 0x00, 0x00, 0x73, 0x26, 0x52, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x18, 0xD8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x75, 0x07, 0x86, 0x48, 0x00, 0x00, 0x00, 0x00, 0x75,
-0xFA, 0x0C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x76, 0xE8, 0xB9, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x77,
-0xDB, 0x3F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCB, 0x3E, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xBD, 0xC4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAC, 0x72, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0x9E, 0xF8, 0x38, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x8D, 0xA5, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0x80, 0x2B, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x6E, 0xD9, 0x48, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x61, 0x5F, 0x38, 0x00, 0x00, 0x00, 0x03, 0x74, 0x0A, 0xD8, 0x00, 0x00, 0x01, 0x02, 0x04, 0x03,
-0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02,
-0x06, 0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x00, 0x04, 0x00, 0x00, 0x31,
-0x38, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00,
-0x00, 0x3F, 0x48, 0x01, 0x0D, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54,
-0x4D, 0x54, 0x00, 0x49, 0x52, 0x53, 0x54, 0x00, 0x49, 0x52, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x6C, 0x7D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xDB, 0x12, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xBB, 0xA2, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x74, 0x2D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8E, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x10, 0xED, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x55, 0x67, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x45, 0x4A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x13, 0x37, 0xEC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x2D, 0x15, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x28, 0x20, 0x76, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xDB, 0x9D, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x29, 0xCB, 0x9C, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xBE, 0x22, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAC, 0xD0, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0x9F, 0x56, 0x38, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8E, 0x03, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x80, 0x89, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6F, 0x37, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x61, 0xBD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x31, 0x50, 0x6A, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x42, 0xF0, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x33, 0x32, 0xEF, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x25, 0x75, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x35, 0x14, 0x23, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x06, 0xA9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF5, 0x56, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xE7, 0xDC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD6, 0x8A, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xC9, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB9, 0x0F, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xAB, 0x95, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x9A, 0x42, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x8C, 0xC8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x7B, 0x76, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x6D, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0xA9, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x4F, 0x2F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3F, 0x2E, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x31, 0xB4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x47, 0xE2, 0xC9, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xD5, 0x4F, 0x38, 0x00, 0x00, 0x00, 0x00, 0x49, 0xC5, 0x4E, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xB7, 0xD4, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xA6, 0x81, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x99, 0x07, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x87, 0xB5, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7A, 0x3B, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x68, 0xE8, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x5B, 0x6E, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4B, 0x6D, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x3D, 0xF3, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x53, 0x2C, 0xA1, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x1F, 0x27, 0x38, 0x00, 0x00, 0x00, 0x00, 0x55, 0x0D, 0xD4, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x00, 0x5A, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x56, 0xEF, 0x08, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE1, 0x8E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD1, 0x8D, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xC4, 0x13, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB2, 0xC0, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xA5, 0x46, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x93, 0xF4, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x86, 0x7A, 0x38, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x75, 0x27, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x67, 0xAD, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x60, 0x57, 0xAC, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4A, 0x32, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x62, 0x38, 0xE0, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2B, 0x66, 0x38, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1A, 0x13, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x0C, 0x99, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x65, 0xFB, 0x47, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xED, 0xCD, 0x38, 0x00, 0x00, 0x00, 0x00, 0x67, 0xDD, 0xCC, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD0, 0x52, 0x38, 0x00, 0x00, 0x00, 0x00, 0x69, 0xBE, 0xFF, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB1, 0x85, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA0, 0x33, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x92, 0xB9, 0x38, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x81, 0x66, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x73, 0xEC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x62, 0x9A, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x55, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x71, 0x45, 0x1F, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x37, 0xA5, 0x38, 0x00, 0x00, 0x00, 0x00, 0x73, 0x26, 0x52, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x18, 0xD8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x75, 0x07, 0x86, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x75, 0xFA, 0x0C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x76, 0xE8, 0xB9, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xDB, 0x3F, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCB, 0x3E, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xBD, 0xC4, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAC, 0x72, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0x9E, 0xF8, 0x38, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x8D, 0xA5, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x80, 0x2B, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x6E, 0xD9, 0x48, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x61, 0x5F, 0x38, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05,
+0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x02, 0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 0x00,
+0x00, 0x30, 0x38, 0x00, 0x04, 0x00, 0x00, 0x31, 0x38, 0x00, 0x08, 0x00, 0x00, 0x46, 0x50, 0x01,
+0x0D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x08, 0x00, 0x00, 0x3F, 0x48, 0x01, 0x0D, 0x00, 0x00, 0x31,
+0x38, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4D, 0x54, 0x00, 0x49, 0x52, 0x53, 0x54, 0x00,
+0x49, 0x52, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x49, 0x52, 0x53, 0x54, 0x2D, 0x33, 0x3A, 0x33, 0x30, 0x49, 0x52, 0x44,
+0x54, 0x2C, 0x4A, 0x38, 0x30, 0x2F, 0x30, 0x2C, 0x4A, 0x32, 0x36, 0x34, 0x2F, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Israel */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40229,83 +41901,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C, 0x00,
0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4A,
0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x44, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90,
-0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x30, 0x45, 0x88,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC6, 0xF4, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA9, 0x79, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xC9, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x6B, 0xE0, 0xD0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x5A, 0x14, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0xDF, 0x1F, 0xC0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2F, 0xB5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1E, 0x46, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x10, 0xE8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEB, 0xB3, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xB4, 0x34, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x20, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xE0, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xB4, 0xCE, 0x80,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xA4, 0xBF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x8B, 0x76, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x56, 0x7D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0xBE, 0x4A, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x36, 0x34, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x9C, 0xF7, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x16, 0x16, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x74, 0xD3, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0xFF, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE8, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7C, 0x8B, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xF6, 0xEA, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xBE, 0xF8, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xCC, 0xFF, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0xB1, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x9E, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5A, 0x30, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xED, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB, 0xCF, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xEC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBB, 0x65, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9B, 0x47, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7B, 0x29, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x48, 0x96, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x3C, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x33, 0x31, 0xB3, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x1A, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x11, 0x95, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xA6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x37, 0x04, 0x08, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x37, 0xCF, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xF6, 0x5F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xDC, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xD0, 0xED, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xAE, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA3, 0xA0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xA0, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x83, 0x82, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x7C, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x73, 0x36, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x50, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4C, 0x8F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2C, 0x71, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0C, 0x53, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x46, 0xEC, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEC, 0x35, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCC, 0x17, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAB, 0xF9, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x95, 0x15, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x9B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x74, 0xF7, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x5E, 0x42, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x34, 0xBB, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x55, 0x14, 0x9D, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF4, 0x7F, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD4, 0x61, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB4, 0x43, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x9D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7D, 0x42, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xB1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5D, 0x24, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3D, 0x06, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1C, 0xE8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00, 0x66, 0x06, 0x04, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE5, 0xE6, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC5, 0xC8, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA5, 0xAA, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x85, 0x8C, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x65, 0x6E, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x18, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x4E, 0x8B, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x2E, 0x6D, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0E, 0x4F, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xF9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xEE, 0x31, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCE, 0x13, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xBD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xAD, 0xF5, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x97, 0x11, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x81, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x76, 0xF3, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x63, 0x70, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC2, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x30, 0x45, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x59, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xAC, 0xFE, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0xC6, 0xF4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0xA9, 0x79, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x84, 0x60, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x8A, 0xC9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x65, 0xB0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x6B, 0xE0, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x5A, 0x14, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0xDF, 0x1F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x2F, 0xB5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x1E, 0x46, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x10, 0xE8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xEB, 0xB3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xB4, 0x34, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x20, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xE0, 0x8D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xB4, 0xCE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xA4, 0xBF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x8B, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x56, 0x7D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0xBE, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x36, 0x34, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x9C, 0xF7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x16, 0x16, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x74, 0xD3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE8, 0x4F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x7C, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0xB0, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xF6, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xA6, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xBE, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x89, 0xF1, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xCC, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x60, 0x99, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x82, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0xB5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x5D, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x5A, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x3F, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0xD6, 0xE6, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xEB, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xC0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xEC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xA9, 0x1F, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBB, 0x65, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x89, 0x01, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9B, 0x47, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x5F, 0xA9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7B, 0x29, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0xC5, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x48, 0x96, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x3C, 0x6E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x31, 0xB3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x1A, 0xFE, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x11, 0x95, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0xF1, 0xA6, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x04, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0xCF, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xF6, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x39, 0xDC, 0xF9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xD0, 0xED, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xAE, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA3, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA0, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x83, 0x82, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7C, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x73, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x50, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4C, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x4F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2C, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0xF6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0C, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xEC, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEC, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xE7, 0xF5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCC, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x9C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAB, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x8C, 0x09, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x95, 0x15, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x87, 0x9B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x74, 0xF7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x5E, 0x42, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x54, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x34, 0xBB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x2B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x14, 0x9D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x0D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF4, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD4, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB4, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD4, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x9D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xCF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7D, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xB1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5D, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3D, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1C, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0x92, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x06, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x74, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE5, 0xE6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x56, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC5, 0xC8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA5, 0xAA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x54, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x85, 0x8C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x36, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x65, 0x6E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x18, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x4E, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x65, 0xFA, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x2E, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xDC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x0E, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2E, 0xF9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xEE, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xDB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xCE, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xBD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xAD, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0x9F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x97, 0x11, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x81, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x76, 0xF3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x63, 0x70, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
@@ -40313,14 +41986,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x21, 0x06, 0x00, 0x00, 0x00, 0x00,
-0x20, 0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0C,
-0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00,
-0x4A, 0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x49, 0x44, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x53,
-0x54, 0x2D, 0x32, 0x49, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E, 0x34, 0x2F, 0x32, 0x36,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x21, 0x06,
+0x00, 0x00, 0x00, 0x00, 0x20, 0xF8, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00,
+0x1C, 0x20, 0x00, 0x0C, 0x00, 0x00, 0x38, 0x40, 0x01, 0x10, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x4D, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00,
+0x49, 0x44, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x49, 0x53, 0x54, 0x2D, 0x32, 0x49, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x34, 0x2E,
+0x34, 0x2F, 0x32, 0x36, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Jamaica */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40335,27 +42009,30 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00,
0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0,
0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x69, 0x87, 0x23, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x01,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54,
-0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x23, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x93, 0x0F, 0xB4, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xB8, 0x01, 0x00,
+0x00, 0xFF, 0xFF, 0xB8, 0x01, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7,
+0xC0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4D, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45,
+0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Japan */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40366,21 +42043,24 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xDD, 0x8B, 0xBC, 0x80, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00,
0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x09,
0x00, 0x00, 0x7E, 0x90, 0x00, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A,
-0x44, 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x65, 0xC2, 0xA4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xCE, 0xE3, 0x70, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x3E, 0x1E, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD7, 0xEC, 0x16, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x16, 0x90, 0xFF,
-0xFF, 0xFF, 0xFF, 0xD9, 0xCB, 0xF8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x07, 0x1D, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDB, 0xAB, 0xDA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xE6, 0xFF, 0x10, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDD, 0x8B, 0xBC, 0x80, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x00, 0x00, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00,
-0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x44,
-0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x4A, 0x53, 0x54,
-0x2D, 0x39, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x65, 0xC2, 0xA4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x74, 0xCE, 0xE3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3E, 0x1E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0xEC, 0x16, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x16, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xCB, 0xF8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x07, 0x1D, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xAB, 0xDA, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xE6, 0xFF, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x8B, 0xBC, 0x80, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x0D,
+0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4A, 0x43,
+0x53, 0x54, 0x00, 0x4A, 0x44, 0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+0x00, 0x0A, 0x4A, 0x53, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Kwajalein */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40389,16 +42069,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0x86, 0x1B, 0x50, 0x2C, 0x74, 0xBC, 0xC0, 0x01, 0x02, 0x03, 0x00, 0x00, 0x9C, 0xE0, 0x00,
0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x08, 0x00, 0x00, 0xA8,
0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00, 0x4B, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7E, 0x36, 0x18, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0x74, 0xBC, 0xC0, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x9A, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04,
-0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00, 0x4B, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x48, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x18, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0x86, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x74, 0xBC, 0xC0, 0x00, 0x01, 0x02, 0x03,
+0x00, 0x00, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0x57, 0x40,
+0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00,
+0x4B, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x48,
+0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Libya */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40417,32 +42100,35 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x03, 0x00, 0x00, 0x0C, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E,
0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xC1, 0x24, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xBB, 0xB1, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x23, 0xAD, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE1, 0x78, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0xE7, 0x65, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE5, 0x2F, 0x3F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xA9, 0xCC, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0x4E, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x92, 0x42, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x08, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x2B, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x18, 0xEA, 0x2A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x5F, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xCC, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBD, 0xE4, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xB4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x17, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x93, 0x0B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x82, 0xEE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x70, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x7E, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x52, 0xCF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x03, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x34, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x37, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x40, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4E, 0xF1, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x44, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x35, 0x6A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x9D, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x69, 0xB4, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x03, 0x02, 0x01, 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x0C, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xF2, 0xC1, 0x24, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xBB, 0xB1, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x23, 0xAD, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x78, 0xD2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0xE7, 0x65, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x2F, 0x3F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0xA9, 0xCC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0x4E, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x92, 0x42, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x2A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x5F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBD, 0xE4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xB4, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9F, 0x17, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x93, 0x0B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x82, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x70, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x21, 0x61, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x52, 0xCF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, 0x44, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x34, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x40, 0xB7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x4E, 0xF1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x44, 0x36, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, 0x35, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x9D, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x54, 0xD9, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x69, 0xB4, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02,
+0x01, 0x03, 0x02, 0x01, 0x03, 0x00, 0x00, 0x0C, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01,
+0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x45, 0x45, 0x54, 0x2D, 0x32, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* MET */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40492,92 +42178,94 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05,
0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x4D, 0x45, 0x53, 0x54,
-0x00, 0x4D, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x09, 0x71,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x72, 0x16,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x4D, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x45,
-0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x45, 0x54, 0x2D, 0x31,
-0x4D, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E,
-0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x4D, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x09, 0x71, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x82, 0x25, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x72, 0x16, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x4E, 0x40, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05,
+0x00, 0x00, 0x1C, 0x20, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x05, 0x4D, 0x45, 0x53, 0x54,
+0x00, 0x4D, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x45,
+0x54, 0x2D, 0x31, 0x4D, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Mexico/BajaNorte */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40634,101 +42322,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D,
0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57,
0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04,
-0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90,
-0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54,
-0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E,
-0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
+0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xF6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA9, 0x79, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x7C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x66, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x1B, 0x10, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x0A, 0xF2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x8D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x99, 0xBA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x1B, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x82, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x9F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x31, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x13, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x03, 0x02, 0x04, 0x05, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0xFF, 0xFF, 0x92, 0x4C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF,
+0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10,
+0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x50, 0x53,
+0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Mexico/BajaSur */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40767,69 +42458,72 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53,
0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6,
-0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66,
-0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C,
-0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA,
-0x71, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x91, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6,
-0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24,
-0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04,
-0x23, 0x80, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4,
-0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD,
-0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAD,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C,
-0xE6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C,
-0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C,
-0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C,
-0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15,
-0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5,
-0x8A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x9F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5,
-0x6C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5,
-0x4E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95,
-0x30, 0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E,
-0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E,
-0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E,
-0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D,
-0xF3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD,
-0xD5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD,
-0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB2, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6,
-0xD3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6,
-0xB5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xCA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86,
-0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66,
-0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46,
-0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F,
-0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F,
-0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x6F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF,
-0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF,
-0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAF,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E,
-0xE2, 0x00, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01,
-0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEA, 0x71, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x91, 0xB4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xF5, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x0F, 0x74, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF8, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x23, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD8, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE4, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x98, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAD, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x78, 0x19, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xE6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x61, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x41, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x20, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x00, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xE0, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x8A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xC0, 0x9F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x6C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA9, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x4E, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x89, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x30, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x69, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x49, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x29, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x12, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD2, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB2, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xD3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x91, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xB5, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x71, 0xCA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x5A, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x3A, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x1A, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xFA, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xDA, 0x6F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xBA, 0x51, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA3, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x83, 0x4F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xE2, 0x00, 0x00, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01,
-0xFF, 0xFF, 0x9C, 0x3C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
-0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF,
-0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E,
-0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0xFF, 0xFF, 0x9C, 0x3C, 0x00, 0x00,
+0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0x8F, 0x80,
+0x00, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0x4C, 0x4D,
+0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x4D, 0x44,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D,
+0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
+0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Mexico/General */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40869,82 +42563,88 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54,
0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x05, 0x00,
-0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5,
-0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6,
-0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8,
-0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5,
-0xDE, 0xB0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x97, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9,
-0x55, 0xF1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xEA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF,
-0x02, 0xC6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xB7, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA,
-0x99, 0x15, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x76, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46,
-0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x57,
-0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66,
-0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x75,
-0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF,
-0xA3, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08,
-0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
-0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43,
-0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E,
-0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0xB6, 0xE8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xF2, 0x6E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x66, 0x56, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x43, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0C, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFD, 0x86, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0xDE, 0xB0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x97, 0x34, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x55, 0xF1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xEA, 0xDD, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x02, 0xC6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0xB7, 0x56, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x99, 0x15, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0x76, 0x83, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xF5, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xB6, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x24, 0x33, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF8, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x04, 0x15, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD8, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xF7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB8, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCD, 0x13, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x98, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xF5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x78, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0xD7, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x61, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0xB9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x9B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x20, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x7D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x9A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x58, 0xE0, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x7C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xC0, 0x91, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x5E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA9, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB5, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x89, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x95, 0x22, 0x70, 0x00, 0x00, 0x00, 0x00, 0x60, 0x69, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7E, 0x3E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5E, 0x20, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x29, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3E, 0x02, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x66, 0x12, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0xE4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF2, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0xC6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD2, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB1, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0xC5, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x91, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0xA7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x71, 0xBC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x71, 0x5A, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x73, 0x3A, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x46, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x75, 0x1A, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x69, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xFA, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0F, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xDA, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEF, 0x2D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xBA, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCF, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA3, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x83, 0x41, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0xA3, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
+0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x34, 0x2E, 0x31,
+0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* MST */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* MST7MDT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -40999,99 +42699,102 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00,
0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4D, 0x44, 0x54,
0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF,
-0xAB, 0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08,
-0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57,
-0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D,
-0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
-0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x00, 0xFF,
+0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
+0x0C, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Navajo */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41149,106 +42852,108 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00,
-0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65,
-0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x45,
-0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08,
-0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76,
-0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0,
-0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53,
-0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x45, 0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
+0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
+0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
+0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A,
+0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* NZ */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41307,105 +43012,108 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00,
0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04,
-0x00, 0x00, 0xA1, 0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0,
-0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35,
-0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04, 0x00, 0x00, 0xA1,
+0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00,
+0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E,
+0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x5A, 0x53,
+0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* NZ-CHAT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41454,90 +43162,92 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x00, 0x00, 0xAB, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x44, 0x00, 0x04, 0x00, 0x00, 0xC1,
0x5C, 0x01, 0x0A, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x4C,
0x4D, 0x54, 0x00, 0x43, 0x48, 0x41, 0x53, 0x54, 0x00, 0x43, 0x48, 0x41, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x41, 0xB7, 0x44, 0x84, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x96, 0xBC, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0xAB, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xAC,
-0x44, 0x00, 0x04, 0x00, 0x00, 0xC1, 0x5C, 0x01, 0x0A, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x00,
-0x00, 0xB3, 0x4C, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48, 0x41, 0x53, 0x54, 0x00, 0x43,
-0x48, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x43, 0x48, 0x41, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x3A, 0x34, 0x35, 0x43, 0x48, 0x41, 0x44, 0x54,
-0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x32, 0x3A, 0x34, 0x35, 0x2C, 0x4D, 0x34, 0x2E,
-0x31, 0x2E, 0x30, 0x2F, 0x33, 0x3A, 0x34, 0x35, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x44, 0x84, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xDA, 0x96, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00,
+0xAB, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x44, 0x00, 0x04, 0x00, 0x00, 0xC1, 0x5C, 0x01, 0x0A,
+0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x48, 0x41, 0x53, 0x54, 0x00, 0x43, 0x48, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x41, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x3A,
+0x34, 0x35, 0x43, 0x48, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x32,
+0x3A, 0x34, 0x35, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x3A, 0x34, 0x35, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Apia */
0x50, 0x48, 0x50, 0x32, 0x01, 0x57, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41565,51 +43275,54 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x09, 0xFF, 0xFF, 0x65, 0x50, 0x00,
0x05, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x0D, 0x4C, 0x4D, 0x54,
0x00, 0x57, 0x53, 0x53, 0x54, 0x00, 0x53, 0x44, 0x54, 0x00, 0x57, 0x53, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69,
-0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xC8, 0xE5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x05, 0xFC,
-0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x62, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x9F, 0x27,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xFD, 0x8B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45,
-0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44,
-0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0xB0, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0x00, 0x00,
-0x00, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x09, 0xFF, 0xFF, 0x65,
-0x50, 0x00, 0x05, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x57, 0x53, 0x53, 0x54, 0x00, 0x53, 0x44, 0x54, 0x00, 0x57, 0x53, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x57, 0x53, 0x53, 0x54, 0x2D, 0x31, 0x33, 0x57, 0x53, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0x74,
-0x38, 0x9A, 0x00, 0x0C, 0x9D, 0x2A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x12, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xC8, 0xE5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x05, 0xFC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x62, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x9F, 0x27, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xFD, 0x8B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x00, 0x00, 0xB0, 0x80, 0x00, 0x00, 0xFF, 0xFF,
+0x5F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x09,
+0xFF, 0xFF, 0x65, 0x50, 0x00, 0x05, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0,
+0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x53, 0x53, 0x54, 0x00, 0x53, 0x44, 0x54, 0x00, 0x57,
+0x53, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x57, 0x53, 0x53, 0x54, 0x2D, 0x31, 0x33, 0x57, 0x53, 0x44, 0x54, 0x2C, 0x4D,
+0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x34,
+0x0A,
+#endif
+0x00, 0x74, 0x38, 0x9A, 0x00, 0x0C, 0x9D, 0x2A, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Auckland */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41668,106 +43381,110 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00,
0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF,
-0xFF, 0xFF, 0xFF, 0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00,
-0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00,
-0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04,
-0x00, 0x00, 0xA1, 0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0,
-0x01, 0x0E, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D,
-0x54, 0x00, 0x4E, 0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x4E, 0x5A, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35,
-0x2E, 0x30, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A, 0x00, 0x51, 0x13, 0x35,
-0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63,
-0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x4C, 0xA8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB0, 0xB4, 0xB2, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x51, 0x87, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB2, 0x78, 0xE5, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x43, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB4, 0x58, 0xC7, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x23, 0xC7, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB6, 0x38, 0xA9, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x03, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0x18, 0x8B, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xEC, 0xC5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xF8, 0x6D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xCC, 0xA7, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0xD8, 0x4F, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE3, 0xE8, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBD, 0xAE, 0xF6, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC3, 0xCA, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBF, 0x8E, 0xD8, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA3, 0xAC, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC1, 0x6E, 0xBA, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x83, 0x8E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x4E, 0x9C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x63, 0x70, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC5, 0x2E, 0x7E, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4C, 0x8D, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0x0E, 0x60, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2C, 0x6F, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xF7, 0x7D, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x9A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x06, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x00, 0x00, 0xA3, 0xD8, 0x00, 0x00, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x04, 0x00, 0x00, 0xA1,
+0xB8, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x0E, 0x00,
+0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E,
+0x5A, 0x53, 0x54, 0x00, 0x4E, 0x5A, 0x4D, 0x54, 0x00, 0x4E, 0x5A, 0x44, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x5A, 0x53,
+0x54, 0x2D, 0x31, 0x32, 0x4E, 0x5A, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2C,
+0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x51, 0x13, 0x35, 0x02, 0x1D, 0x54, 0xBA, 0x00, 0x00, 0x00, 0x18, 0x4E, 0x65, 0x77, 0x20,
+0x5A, 0x65, 0x61, 0x6C, 0x61, 0x6E, 0x64, 0x20, 0x28, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x61, 0x72,
+0x65, 0x61, 0x73, 0x29,
/* Pacific/Bougainville */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41777,19 +43494,22 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x89, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x05, 0x00, 0x00, 0x7E, 0x90,
0x00, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x0D, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x50, 0x47, 0x54,
0x00, 0x4A, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x52, 0x28, 0xFF, 0xFF, 0xFF,
-0xFF, 0x72, 0xED, 0xA4, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x43, 0x36, 0x60, 0xFF, 0xFF, 0xFF,
-0xFF, 0xD2, 0x2B, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x9E, 0xD7, 0x80, 0x00, 0x01, 0x02,
-0x03, 0x02, 0x04, 0x00, 0x00, 0x91, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00,
-0x00, 0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x00,
-0x11, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x50, 0x47, 0x54, 0x00, 0x4A, 0x53,
-0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x42, 0x53, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x7F, 0xD7, 0xDD, 0x02, 0x00, 0x08, 0xBA,
-0x00, 0x00, 0x00, 0x0C, 0x42, 0x6F, 0x75, 0x67, 0x61, 0x69, 0x6E, 0x76, 0x69, 0x6C, 0x6C, 0x65,
-
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x52, 0x28, 0xFF, 0xFF, 0xFF, 0xFF,
+0x72, 0xED, 0xA4, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x43, 0x36, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x2B, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x9E, 0xD7, 0x80, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x04, 0x00, 0x00, 0x91, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00,
+0x8C, 0xA0, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x11,
+0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x50, 0x47, 0x54, 0x00, 0x4A, 0x53, 0x54,
+0x00, 0x42, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x42, 0x53, 0x54, 0x2D, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x7F, 0xD7, 0xDD, 0x02, 0x00, 0x08, 0xBA, 0x00, 0x00, 0x00, 0x0C, 0x42, 0x6F, 0x75, 0x67,
+0x61, 0x69, 0x6E, 0x76, 0x69, 0x6C, 0x6C, 0x65,
/* Pacific/Chatham */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -41838,110 +43558,114 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x00, 0x00, 0xAB, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x44, 0x00, 0x04, 0x00, 0x00, 0xC1,
0x5C, 0x01, 0x0A, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x4C,
0x4D, 0x54, 0x00, 0x43, 0x48, 0x41, 0x53, 0x54, 0x00, 0x43, 0x48, 0x41, 0x44, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x41, 0xB7, 0x44, 0x84, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0xDA, 0x96, 0xBC, 0x00, 0x00, 0x00,
-0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00, 0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00, 0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00,
-0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0xAB, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xAC,
-0x44, 0x00, 0x04, 0x00, 0x00, 0xC1, 0x5C, 0x01, 0x0A, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x00,
-0x00, 0xB3, 0x4C, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48, 0x41, 0x53, 0x54, 0x00, 0x43,
-0x48, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x43, 0x48, 0x41, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x3A, 0x34, 0x35, 0x43, 0x48, 0x41, 0x44, 0x54,
-0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x32, 0x3A, 0x34, 0x35, 0x2C, 0x4D, 0x34, 0x2E,
-0x31, 0x2E, 0x30, 0x2F, 0x33, 0x3A, 0x34, 0x35, 0x0A, 0x00, 0x46, 0x44, 0x48, 0x00, 0x05, 0x43,
-0xA7, 0x00, 0x00, 0x00, 0x0F, 0x43, 0x68, 0x61, 0x74, 0x68, 0x61, 0x6D, 0x20, 0x49, 0x73, 0x6C,
-0x61, 0x6E, 0x64, 0x73,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x41, 0xB7, 0x44, 0x84, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0xDA, 0x96, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x09, 0x18, 0xFD, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xAC, 0xA5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xEF, 0xA5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0x9E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD8, 0xC1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x7E, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB8, 0xA3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x5E, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x3E, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x12, 0x78, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x1E, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x58, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0xFE, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x38, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xE7, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x21, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xC7, 0x65, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x01, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xA7, 0x47, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x87, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC0, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x67, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA0, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x46, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x21, 0x80, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x30, 0x09, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x69, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x0F, 0xEB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x2E, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x02, 0x42, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x0D, 0xE3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xE2, 0x24, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x28, 0xED, 0xC5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0x06, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xCD, 0xA7, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xAB, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xAD, 0x89, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x8B, 0x05, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x8D, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x6A, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6D, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x4A, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x32, 0x56, 0x69, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x2A, 0xAB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x34, 0x36, 0x4B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0A, 0x8D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x36, 0x16, 0x2D, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xF3, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x37, 0xF6, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xD3, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xD5, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xB3, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xBF, 0x0E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x93, 0x4F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x9E, 0xF0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x73, 0x31, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0xD2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x5C, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x41, 0x5E, 0xB4, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x3C, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3E, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x1C, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0x1E, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xFB, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x46, 0xFE, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xF7, 0x85, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xDE, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xD7, 0x67, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xBE, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB7, 0x49, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x9E, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x97, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x7D, 0xE2, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x77, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x66, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x60, 0x2A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x52, 0x46, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x40, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0x26, 0xC2, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x1F, 0xEE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0xA4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xFF, 0xD0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x57, 0xE6, 0x86, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xDF, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xC6, 0x68, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xBF, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xAF, 0x85, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA8, 0xB0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x8F, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x88, 0x92, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x6F, 0x49, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x68, 0x74, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x4F, 0x2B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x48, 0x56, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x2F, 0x0D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x28, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0E, 0xEF, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x11, 0x55, 0x60, 0x00, 0x00, 0x00, 0x00, 0x66, 0xF8, 0x0B, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xF1, 0x37, 0x60, 0x00, 0x00, 0x00, 0x00, 0x68, 0xD7, 0xED, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xD1, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xB7, 0xCF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xB0, 0xFB, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x97, 0xB1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x90, 0xDD, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x77, 0x93, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x70, 0xBF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x60, 0xB0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x59, 0xDB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x40, 0x92, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x39, 0xBD, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x20, 0x74, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x19, 0x9F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x56, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF9, 0x81, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xE0, 0x38, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD9, 0x63, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xC0, 0x1A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB9, 0x45, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xA9, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xA2, 0x62, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x89, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x82, 0x44, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x68, 0xFA, 0xE0, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00,
+0xAB, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x44, 0x00, 0x04, 0x00, 0x00, 0xC1, 0x5C, 0x01, 0x0A,
+0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x00, 0x00, 0xB3, 0x4C, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00,
+0x43, 0x48, 0x41, 0x53, 0x54, 0x00, 0x43, 0x48, 0x41, 0x44, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x41, 0x53, 0x54, 0x2D, 0x31, 0x32, 0x3A,
+0x34, 0x35, 0x43, 0x48, 0x41, 0x44, 0x54, 0x2C, 0x4D, 0x39, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x32,
+0x3A, 0x34, 0x35, 0x2C, 0x4D, 0x34, 0x2E, 0x31, 0x2E, 0x30, 0x2F, 0x33, 0x3A, 0x34, 0x35, 0x0A,
+#endif
+0x00, 0x46, 0x44, 0x48, 0x00, 0x05, 0x43, 0xA7, 0x00, 0x00, 0x00, 0x0F, 0x43, 0x68, 0x61, 0x74,
+0x68, 0x61, 0x6D, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Chuuk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x26, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x8E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x43, 0x48, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x94, 0xA5, 0x62, 0x01, 0xFA, 0x42,
-0xDD, 0x00, 0x00, 0x00, 0x14, 0x43, 0x68, 0x75, 0x75, 0x6B, 0x20, 0x28, 0x54, 0x72, 0x75, 0x6B,
-0x29, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x59, 0x61, 0x70,
+0x00, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x26, 0xB4, 0x00, 0x01, 0x00, 0x00,
+0x8E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48,
+0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x94, 0xA5, 0x62, 0x01, 0xFA, 0x42, 0xDD, 0x00, 0x00, 0x00, 0x0F, 0x43, 0x68, 0x75, 0x75,
+0x6B, 0x2F, 0x54, 0x72, 0x75, 0x6B, 0x2C, 0x20, 0x59, 0x61, 0x70,
/* Pacific/Easter */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x13, 0x80, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x80, 0x00, 0x00, 0x00,
0xB9, 0xC7, 0x40, 0x88, 0xFD, 0xD1, 0x3C, 0x40, 0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xCC, 0xCD, 0xC0,
0x00, 0x72, 0xDC, 0xB0, 0x01, 0x75, 0x50, 0xC0, 0x02, 0x40, 0x49, 0xB0, 0x03, 0x55, 0x32, 0xC0,
0x04, 0x20, 0x2B, 0xB0, 0x05, 0x3E, 0x4F, 0x40, 0x06, 0x00, 0x0D, 0xB0, 0x07, 0x0B, 0xBC, 0x40,
@@ -41965,83 +43689,124 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40,
0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0xC6, 0x07, 0x30, 0x4E, 0x50, 0x82, 0xC0,
0x4F, 0x9C, 0xAE, 0xB0, 0x50, 0x42, 0xD9, 0xC0, 0x51, 0x7C, 0x90, 0xB0, 0x52, 0x2B, 0xF6, 0x40,
-0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x55, 0x3C, 0x54, 0xB0, 0x01, 0x04, 0x02, 0x03,
+0x53, 0x5C, 0x72, 0xB0, 0x54, 0x0B, 0xD8, 0x40, 0x57, 0x37, 0xE6, 0x30, 0x57, 0xAF, 0xEC, 0xC0,
+0x59, 0x17, 0xC8, 0x30, 0x59, 0x8F, 0xCE, 0xC0, 0x5A, 0xF7, 0xAA, 0x30, 0x5B, 0x6F, 0xB0, 0xC0,
+0x5C, 0xD7, 0x8C, 0x30, 0x5D, 0x4F, 0x92, 0xC0, 0x5E, 0xB7, 0x6E, 0x30, 0x5F, 0x2F, 0x74, 0xC0,
+0x60, 0x97, 0x50, 0x30, 0x61, 0x18, 0x91, 0x40, 0x62, 0x80, 0x6C, 0xB0, 0x62, 0xF8, 0x73, 0x40,
+0x64, 0x60, 0x4E, 0xB0, 0x64, 0xD8, 0x55, 0x40, 0x66, 0x40, 0x30, 0xB0, 0x66, 0xB8, 0x37, 0x40,
+0x68, 0x20, 0x12, 0xB0, 0x68, 0x98, 0x19, 0x40, 0x69, 0xFF, 0xF4, 0xB0, 0x6A, 0x77, 0xFB, 0x40,
+0x6B, 0xDF, 0xD6, 0xB0, 0x6C, 0x61, 0x17, 0xC0, 0x6D, 0xC8, 0xF3, 0x30, 0x6E, 0x40, 0xF9, 0xC0,
+0x6F, 0xA8, 0xD5, 0x30, 0x70, 0x20, 0xDB, 0xC0, 0x71, 0x88, 0xB7, 0x30, 0x72, 0x00, 0xBD, 0xC0,
+0x73, 0x68, 0x99, 0x30, 0x73, 0xE0, 0x9F, 0xC0, 0x75, 0x48, 0x7B, 0x30, 0x75, 0xC9, 0xBC, 0x40,
+0x77, 0x31, 0x97, 0xB0, 0x77, 0xA9, 0x9E, 0x40, 0x79, 0x11, 0x79, 0xB0, 0x79, 0x89, 0x80, 0x40,
+0x7A, 0xF1, 0x5B, 0xB0, 0x7B, 0x69, 0x62, 0x40, 0x7C, 0xD1, 0x3D, 0xB0, 0x7D, 0x49, 0x44, 0x40,
+0x7E, 0xB1, 0x1F, 0xB0, 0x7F, 0x29, 0x26, 0x40, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0xFF, 0xFF, 0x99, 0x78,
-0x00, 0x00, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF,
-0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E,
-0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0E, 0x4C, 0x4D, 0x54, 0x00,
-0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53, 0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x42, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9,
-0xC7, 0x40, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x06,
-0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x07,
-0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00, 0x09,
-0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0B,
-0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D,
-0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F,
-0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x11,
-0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x13,
-0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x15,
-0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x16,
-0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18,
-0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A,
-0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1C,
-0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1E,
-0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20,
-0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22,
-0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24,
-0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x25,
-0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x27,
-0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29,
-0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2B,
-0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2D,
-0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F,
-0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31,
-0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00, 0x33,
-0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x35,
-0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x37,
-0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38,
-0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3A,
-0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3C,
-0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3E,
-0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40,
-0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x42,
-0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x55,
-0x3C, 0x54, 0xB0, 0x00, 0x01, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x07, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x04,
-0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0x9D, 0x90,
-0x00, 0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF,
-0xB9, 0xB0, 0x00, 0x0E, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53,
-0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00,
-0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x0A, 0x45, 0x41, 0x53, 0x54, 0x35, 0x0A, 0x00, 0x5F,
-0xE6, 0xC8, 0x00, 0x6B, 0xAD, 0x1A, 0x00, 0x00, 0x00, 0x0D, 0x45, 0x61, 0x73, 0x74, 0x65, 0x72,
-0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x04, 0xFF,
+0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0x9D, 0x90, 0x00,
+0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0x4C, 0x4D, 0x54,
+0x00, 0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53, 0x54, 0x00, 0x45, 0x41, 0x53, 0x54, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x69, 0x87, 0x42, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0xC7, 0x40, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xD1, 0x3C, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0x92, 0xFA, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x72, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x75, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x40, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x55, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x04, 0x20, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3E, 0x4F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x06, 0x00, 0x0D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xDF, 0xEF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFE, 0x13, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xBF, 0xD1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xDD, 0xF5, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0B, 0xA8, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xBD, 0xD7, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x88, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x9D, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x68, 0xB2, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x86, 0xD5, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x48, 0x94, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, 0x66, 0xB7, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x28, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x46, 0x99, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x11, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x26, 0x7B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0xF1, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x5D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xD1, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xE6, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xB1, 0x38, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xCF, 0x5C, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0x91, 0x1A, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xAF, 0x3E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x70, 0xFC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8F, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7F, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x39, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0xE4, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x19, 0xDD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0xF9, 0xBF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xD9, 0xA1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x28, 0xF7, 0xC4, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xC2, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0xA6, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xA2, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xB7, 0x88, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x82, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x97, 0x6A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x62, 0x63, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x87, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x42, 0x45, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x60, 0x69, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xD7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x4B, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x0B, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x0D, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x06, 0xD5, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xCB, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xE9, 0x2B, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xAA, 0xEA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xC9, 0x0D, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x8A, 0xCC, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xA8, 0xEF, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x6A, 0xAE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x88, 0xD1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x53, 0xCA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x68, 0xB3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x33, 0xAC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x48, 0x95, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x13, 0x8E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xB2, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0x70, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x11, 0x94, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEF, 0x02, 0x30, 0x00, 0x00, 0x00, 0x00, 0x48, 0xF1, 0x76, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xBC, 0x6F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xD1, 0x58, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xB8, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xB1, 0x3A, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0xC6, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x50, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x9C, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x42, 0xD9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x7C, 0x90, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x2B, 0xF6, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x5C, 0x72, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x0B, 0xD8, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x57, 0x37, 0xE6, 0x30, 0x00, 0x00, 0x00, 0x00, 0x57, 0xAF, 0xEC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0x17, 0xC8, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0x8F, 0xCE, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xF7, 0xAA, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x6F, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xD7, 0x8C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x4F, 0x92, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0xB7, 0x6E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x2F, 0x74, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x97, 0x50, 0x30, 0x00, 0x00, 0x00, 0x00, 0x61, 0x18, 0x91, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x80, 0x6C, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0xF8, 0x73, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x60, 0x4E, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0xD8, 0x55, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x40, 0x30, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x66, 0xB8, 0x37, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x68, 0x20, 0x12, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x68, 0x98, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xFF, 0xF4, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0x77, 0xFB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xDF, 0xD6, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0x61, 0x17, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0xC8, 0xF3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x40, 0xF9, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0xA8, 0xD5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0xDB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x88, 0xB7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0xBD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x68, 0x99, 0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0xE0, 0x9F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x48, 0x7B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x75, 0xC9, 0xBC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x77, 0x31, 0x97, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x77, 0xA9, 0x9E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x79, 0x11, 0x79, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0x89, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xF1, 0x5B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x69, 0x62, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0xD1, 0x3D, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x49, 0x44, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0xB1, 0x1F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x29, 0x26, 0x40, 0x00, 0x01, 0x04, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0x99, 0x78, 0x00, 0x00, 0xFF, 0xFF,
+0x99, 0x78, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E,
+0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x0E, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x0E, 0xFF, 0xFF, 0xB9, 0xB0,
+0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x53, 0x53, 0x54, 0x00,
+0x45, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
+0x00, 0x01, 0x01, 0x0A, 0x45, 0x41, 0x53, 0x54, 0x36, 0x45, 0x41, 0x53, 0x53, 0x54, 0x2C, 0x4D,
+0x38, 0x2E, 0x32, 0x2E, 0x36, 0x2F, 0x32, 0x32, 0x2C, 0x4D, 0x35, 0x2E, 0x32, 0x2E, 0x36, 0x2F,
+0x32, 0x32, 0x0A,
+#endif
+0x00, 0x5F, 0xE6, 0xC8, 0x00, 0x6B, 0xAD, 0x1A, 0x00, 0x00, 0x00, 0x0D, 0x45, 0x61, 0x73, 0x74,
+0x65, 0x72, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
/* Pacific/Efate */
0x50, 0x48, 0x50, 0x32, 0x01, 0x56, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42055,26 +43820,28 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x2B, 0x61, 0x33, 0x40, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x9D, 0xCC, 0x00, 0x00,
0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
-0x56, 0x55, 0x53, 0x54, 0x00, 0x56, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xF5, 0xC2, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD2, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC2, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xDA, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xA2, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9B, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x82, 0x9E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7B, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5B, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3B, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1B, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x26,
-0xFB, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xE4, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x81, 0x51, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xE9, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x61, 0x33, 0x40, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x00, 0x00, 0x9D, 0xCC, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0x9A,
-0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x56, 0x55, 0x53, 0x54, 0x00, 0x56, 0x55, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x55, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x6E,
-0x5F, 0x35, 0x02, 0x13, 0xA4, 0x42, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x55, 0x53, 0x54, 0x00, 0x56, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xF5, 0xC2, 0xB4, 0x00, 0x00, 0x00, 0x00,
+0x19, 0xD2, 0xF7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC2, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xDA, 0x66, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xA2, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0x9B, 0xF6, 0x50, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x82, 0x9E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0x7B, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6B, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x5B, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4B, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3B, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2B, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1B, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x26, 0xFB, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00, 0x27, 0xEB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE4, 0x7C, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x81, 0x51, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xE9, 0x48, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x61, 0x33, 0x40, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x00, 0x00, 0x9D, 0xCC, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00,
+0x9A, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x56, 0x55, 0x53, 0x54, 0x00, 0x56, 0x55, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x56, 0x55, 0x54, 0x2D, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x6E, 0x5F, 0x35, 0x02, 0x13, 0xA4, 0x42, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Enderbury */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42083,17 +43850,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x12, 0x56, 0x04, 0xC0, 0x2F, 0x06, 0x8B, 0x30, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x5F, 0x9C, 0x00,
0x00, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0x00, 0x00, 0xB6,
0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x48, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x55, 0x64,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x56, 0x04, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x06, 0x8B, 0x30,
-0x00, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x5F, 0x9C, 0x00, 0x00, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x04,
-0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00,
-0x50, 0x48, 0x4F, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x48,
-0x4F, 0x54, 0x2D, 0x31, 0x33, 0x0A, 0x00, 0x84, 0x8C, 0x4A, 0x00, 0x0D, 0x9B, 0x12, 0x00, 0x00,
-0x00, 0x0F, 0x50, 0x68, 0x6F, 0x65, 0x6E, 0x69, 0x78, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
-0x73,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x55, 0x64, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x56, 0x04, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x06, 0x8B, 0x30, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0x5F, 0x9C, 0x00, 0x00, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50,
+0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x48, 0x4F, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x48, 0x4F, 0x54, 0x2D, 0x31,
+0x33, 0x0A,
+#endif
+0x00, 0x84, 0x8C, 0x4A, 0x00, 0x0D, 0x9B, 0x12, 0x00, 0x00, 0x00, 0x0F, 0x50, 0x68, 0x6F, 0x65,
+0x6E, 0x69, 0x78, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Fakaofo */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42101,15 +43871,17 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x4E, 0xFD, 0x99, 0xB0, 0x01, 0x02, 0xFF, 0xFF, 0x5F, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50,
0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4B, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37,
-0x55, 0x88, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xFD, 0x99, 0xB0, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0x5F,
-0x78, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x4C,
-0x4D, 0x54, 0x00, 0x54, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4B,
-0x54, 0x2D, 0x31, 0x33, 0x0A, 0x00, 0x7B, 0x09, 0x65, 0x00, 0x0D, 0x60, 0x7A, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x55, 0x88, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xFD, 0x99, 0xB0, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0x5F, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x65,
+0x50, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4B, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4B, 0x54, 0x2D, 0x31, 0x33, 0x0A,
+#endif
+0x00, 0x7B, 0x09, 0x65, 0x00, 0x0D, 0x60, 0x7A, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Fiji */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42119,16 +43891,16 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x38, 0xB7, 0xDC, 0x60, 0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60,
0x4D, 0x72, 0x41, 0xE0, 0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x50, 0x82, 0xAE, 0x60,
0x50, 0xFA, 0xA6, 0xE0, 0x52, 0x6B, 0xCA, 0xE0, 0x52, 0xDA, 0x7A, 0xD0, 0x54, 0x54, 0xE7, 0x60,
-0x54, 0xBA, 0x6A, 0xE0, 0x56, 0x34, 0xC9, 0x60, 0x56, 0xA3, 0x87, 0x60, 0x58, 0x1D, 0xE5, 0xE0,
-0x58, 0x83, 0x69, 0x60, 0x59, 0xFD, 0xC7, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xDD, 0xA9, 0xE0,
+0x54, 0xBA, 0x6A, 0xE0, 0x56, 0x34, 0xC9, 0x60, 0x56, 0x9A, 0x4C, 0xE0, 0x58, 0x1D, 0xE5, 0xE0,
+0x58, 0x7A, 0x2E, 0xE0, 0x59, 0xFD, 0xC7, 0xE0, 0x5A, 0x63, 0x4B, 0x60, 0x5B, 0xDD, 0xA9, 0xE0,
0x5C, 0x43, 0x2D, 0x60, 0x5D, 0xBD, 0x8B, 0xE0, 0x5E, 0x23, 0x0F, 0x60, 0x5F, 0x9D, 0x6D, 0xE0,
-0x60, 0x0C, 0x2B, 0xE0, 0x61, 0x86, 0x8A, 0x60, 0x61, 0xEC, 0x0D, 0xE0, 0x63, 0x66, 0x6C, 0x60,
-0x63, 0xCB, 0xEF, 0xE0, 0x65, 0x46, 0x4E, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x26, 0x30, 0x60,
+0x60, 0x02, 0xF1, 0x60, 0x61, 0x86, 0x8A, 0x60, 0x61, 0xE2, 0xD3, 0x60, 0x63, 0x66, 0x6C, 0x60,
+0x63, 0xC2, 0xB5, 0x60, 0x65, 0x46, 0x4E, 0x60, 0x65, 0xAB, 0xD1, 0xE0, 0x67, 0x26, 0x30, 0x60,
0x67, 0x8B, 0xB3, 0xE0, 0x69, 0x06, 0x12, 0x60, 0x69, 0x6B, 0x95, 0xE0, 0x6A, 0xE5, 0xF4, 0x60,
-0x6B, 0x54, 0xB2, 0x60, 0x6C, 0xCF, 0x10, 0xE0, 0x6D, 0x34, 0x94, 0x60, 0x6E, 0xAE, 0xF2, 0xE0,
+0x6B, 0x4B, 0x77, 0xE0, 0x6C, 0xCF, 0x10, 0xE0, 0x6D, 0x2B, 0x59, 0xE0, 0x6E, 0xAE, 0xF2, 0xE0,
0x6F, 0x14, 0x76, 0x60, 0x70, 0x8E, 0xD4, 0xE0, 0x70, 0xF4, 0x58, 0x60, 0x72, 0x6E, 0xB6, 0xE0,
0x72, 0xD4, 0x3A, 0x60, 0x74, 0x4E, 0x98, 0xE0, 0x74, 0xB4, 0x1C, 0x60, 0x76, 0x37, 0xB5, 0x60,
-0x76, 0x9D, 0x38, 0xE0, 0x78, 0x17, 0x97, 0x60, 0x78, 0x7D, 0x1A, 0xE0, 0x79, 0xF7, 0x79, 0x60,
+0x76, 0x93, 0xFE, 0x60, 0x78, 0x17, 0x97, 0x60, 0x78, 0x73, 0xE0, 0x60, 0x79, 0xF7, 0x79, 0x60,
0x7A, 0x5C, 0xFC, 0xE0, 0x7B, 0xD7, 0x5B, 0x60, 0x7C, 0x3C, 0xDE, 0xE0, 0x7D, 0xB7, 0x3D, 0x60,
0x7E, 0x1C, 0xC0, 0xE0, 0x7F, 0x97, 0x1F, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
@@ -42136,63 +43908,68 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0xA7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xB6,
0xD0, 0x01, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53,
-0x54, 0x00, 0x46, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x13, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x3B, 0x17, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x36, 0xD7, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0x24, 0x34, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x38, 0xB7, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x11, 0x2C, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xC2, 0xEA, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x4D, 0x72, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xA2, 0xCC, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x4F, 0x1A, 0xC4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x82, 0xAE, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x50, 0xFA, 0xA6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6B, 0xCA, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x52, 0xDA, 0x7A, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0xE7, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x54, 0xBA, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x34, 0xC9, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x56, 0xA3, 0x87, 0x60, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1D, 0xE5, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x83, 0x69, 0x60, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFD, 0xC7, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x5A, 0x63, 0x4B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDD, 0xA9, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x5C, 0x43, 0x2D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBD, 0x8B, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x5E, 0x23, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9D, 0x6D, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x60, 0x0C, 0x2B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x86, 0x8A, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x61, 0xEC, 0x0D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x66, 0x6C, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x63, 0xCB, 0xEF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x46, 0x4E, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x65, 0xAB, 0xD1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x26, 0x30, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x8B, 0xB3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0x12, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x69, 0x6B, 0x95, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE5, 0xF4, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x6B, 0x54, 0xB2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0x10, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x6D, 0x34, 0x94, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAE, 0xF2, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x6F, 0x14, 0x76, 0x60, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8E, 0xD4, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x70, 0xF4, 0x58, 0x60, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6E, 0xB6, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x72, 0xD4, 0x3A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4E, 0x98, 0xE0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0x1C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x37, 0xB5, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x9D, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x17, 0x97, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x7D, 0x1A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF7, 0x79, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x7A, 0x5C, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD7, 0x5B, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x7C, 0x3C, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB7, 0x3D, 0x60,
-0x00, 0x00, 0x00, 0x00, 0x7E, 0x1C, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x97, 0x1F, 0x60,
-0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00,
-0x00, 0xA7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4A, 0x54, 0x2D, 0x31, 0x32, 0x46, 0x4A, 0x53, 0x54, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x2E, 0x33, 0x2E, 0x34, 0x2F, 0x37,
-0x35, 0x0A, 0x00, 0x6D, 0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x00, 0x46, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x9A, 0x13, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x3B, 0x17, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xD7, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x24, 0x34, 0x60, 0x00, 0x00, 0x00, 0x00, 0x38, 0xB7, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x11, 0x2C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xC2, 0xEA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x72, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xA2, 0xCC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x1A, 0xC4, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x82, 0xAE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x50, 0xFA, 0xA6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6B, 0xCA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x52, 0xDA, 0x7A, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x54, 0xE7, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xBA, 0x6A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x34, 0xC9, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0x9A, 0x4C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1D, 0xE5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x7A, 0x2E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFD, 0xC7, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x63, 0x4B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDD, 0xA9, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x43, 0x2D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBD, 0x8B, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x23, 0x0F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9D, 0x6D, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0xF1, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x86, 0x8A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x61, 0xE2, 0xD3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x66, 0x6C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x63, 0xC2, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x46, 0x4E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xAB, 0xD1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x26, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0x8B, 0xB3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0x12, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0x6B, 0x95, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE5, 0xF4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x4B, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0x10, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x2B, 0x59, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAE, 0xF2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x14, 0x76, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8E, 0xD4, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0xF4, 0x58, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6E, 0xB6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x72, 0xD4, 0x3A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4E, 0x98, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xB4, 0x1C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x37, 0xB5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0x93, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x17, 0x97, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0x73, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF7, 0x79, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x5C, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD7, 0x5B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x3C, 0xDE, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB7, 0x3D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x1C, 0xC0, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x97, 0x1F, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x00, 0x00, 0xA7, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00,
+0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x46, 0x4A, 0x54, 0x2D, 0x31, 0x32, 0x46,
+0x4A, 0x53, 0x54, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x2E, 0x33,
+0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x6D, 0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Funafuti */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x00, 0x54, 0x56, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7E, 0x36, 0x0C, 0xFC, 0x00, 0x01, 0x00, 0x00, 0xA8, 0x04, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54,
-0x56, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x7C, 0x55, 0x6D, 0x02, 0x24, 0x1F, 0x02, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x00, 0x54, 0x56, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x0C, 0xFC, 0x00, 0x01, 0x00, 0x00,
+0xA8, 0x04, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x56,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x56, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x7C, 0x55, 0x6D, 0x02, 0x24, 0x1F, 0x02, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Galapagos */
0x50, 0x48, 0x50, 0x32, 0x01, 0x45, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42201,6 +43978,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xB6, 0xA4, 0x4C, 0x80, 0x1E, 0x18, 0xC4, 0x50, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xAC, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54,
0x00, 0x45, 0x43, 0x54, 0x00, 0x47, 0x41, 0x4C, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
@@ -42208,38 +43986,43 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x1E, 0x18, 0xC4, 0x50, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0xAC, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xB9,
0xB0, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x43, 0x54,
0x00, 0x47, 0x41, 0x4C, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x41, 0x4C,
-0x54, 0x36, 0x0A, 0x00, 0x87, 0xF4, 0xB0, 0x00, 0x89, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x11, 0x47,
-0x61, 0x6C, 0x61, 0x70, 0x61, 0x67, 0x6F, 0x73, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
-
+0x54, 0x36, 0x0A,
+#endif
+0x00, 0x87, 0xF4, 0xB0, 0x00, 0x89, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x11, 0x47, 0x61, 0x6C, 0x61,
+0x70, 0x61, 0x67, 0x6F, 0x73, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Gambier */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0x94, 0x50, 0x48, 0x04, 0x00, 0x01, 0xFF, 0xFF, 0x81, 0x7C, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x70,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x50, 0x48, 0x04, 0x00, 0x01, 0xFF, 0xFF, 0x81,
-0x7C, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x41, 0x4D,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x41, 0x4D, 0x54, 0x39, 0x0A, 0x00, 0x66, 0x07,
-0xCA, 0x00, 0x44, 0xBD, 0xA8, 0x00, 0x00, 0x00, 0x0F, 0x47, 0x61, 0x6D, 0x62, 0x69, 0x65, 0x72,
-0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x41, 0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x50, 0x48, 0x04, 0x00, 0x01, 0xFF, 0xFF,
+0x81, 0x7C, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x41,
+0x4D, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x41, 0x4D, 0x54, 0x39, 0x0A,
+#endif
+0x00, 0x66, 0x07, 0xCA, 0x00, 0x44, 0xBD, 0xA8, 0x00, 0x00, 0x00, 0x0F, 0x47, 0x61, 0x6D, 0x62,
+0x69, 0x65, 0x72, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Guadalcanal */
0x50, 0x48, 0x50, 0x32, 0x01, 0x53, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0x94, 0x4F, 0x33, 0x8C, 0x00, 0x01, 0x00, 0x00, 0x95, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x4F, 0x33, 0x8C, 0x00, 0x01, 0x00, 0x00, 0x95, 0xF4,
-0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x42, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x42, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x7A, 0xC8, 0x4A,
-0x02, 0x07, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x4F, 0x33, 0x8C, 0x00, 0x01, 0x00, 0x00,
+0x95, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x42,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x42, 0x54, 0x2D, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x7A, 0xC8, 0x4A, 0x02, 0x07, 0x1A, 0xA0, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Guam */
0x50, 0x48, 0x50, 0x32, 0x01, 0x47, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42247,16 +44030,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00,
0x3A, 0x43, 0x5E, 0x60, 0x01, 0x02, 0x00, 0x00, 0x87, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
-0x43, 0x68, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xC5, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x2D, 0x4C, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x43, 0x5E, 0x60, 0x00, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x36, 0x34, 0x00,
-0x00, 0x00, 0x00, 0x87, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x43, 0x68, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x68, 0x53, 0x54, 0x2D, 0x31, 0x30,
-0x0A, 0x00, 0x9D, 0xE0, 0xAA, 0x01, 0xEF, 0x87, 0x78, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x68, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xC5, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7E, 0x36, 0x2D, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x43, 0x5E, 0x60, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0x36, 0x34, 0x00, 0x00, 0x00, 0x00, 0x87, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
+0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
+0x43, 0x68, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x68,
+0x53, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x9D, 0xE0, 0xAA, 0x01, 0xEF, 0x87, 0x78, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Honolulu */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42266,18 +44052,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD5, 0x8D, 0x73, 0x48, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00, 0x00,
0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xE0,
-0x70, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x05, 0x43, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x21,
-0x71, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x3D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x49, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x8D, 0x73, 0x48, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00, 0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A,
-0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54,
-0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53,
-0x54, 0x31, 0x30, 0x0A, 0x00, 0xA9, 0xD7, 0x46, 0x00, 0x21, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x06,
-0x48, 0x61, 0x77, 0x61, 0x69, 0x69,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xE0, 0x70, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x05, 0x43, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x21, 0x71, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x3D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x49, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x8D, 0x73, 0x48, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00,
+0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73,
+0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0xA9, 0xD7, 0x46, 0x00, 0x21, 0xC9, 0x16, 0x00, 0x00, 0x00, 0x06, 0x48, 0x61, 0x77, 0x61,
+0x69, 0x69,
/* Pacific/Johnston */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42287,18 +44076,21 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD5, 0x8D, 0x73, 0x48, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00, 0x00,
0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xE0,
-0x70, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x05, 0x43, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x21,
-0x71, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x3D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x49, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x8D, 0x73, 0x48, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00, 0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A,
-0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54,
-0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53,
-0x54, 0x31, 0x30, 0x0A, 0x00, 0xA2, 0xE3, 0x38, 0x00, 0x0F, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x0E,
-0x4A, 0x6F, 0x68, 0x6E, 0x73, 0x74, 0x6F, 0x6E, 0x20, 0x41, 0x74, 0x6F, 0x6C, 0x6C,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xE0, 0x70, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x05, 0x43, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x21, 0x71, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x3D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x49, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x8D, 0x73, 0x48, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00,
+0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73,
+0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0xA2, 0xE3, 0x38, 0x00, 0x0F, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x0E, 0x4A, 0x6F, 0x68, 0x6E,
+0x73, 0x74, 0x6F, 0x6E, 0x20, 0x41, 0x74, 0x6F, 0x6C, 0x6C,
/* Pacific/Kiritimati */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42307,16 +44099,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x12, 0x55, 0xF2, 0x00, 0x2F, 0x06, 0x7D, 0x20, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x6C, 0x80, 0x00,
0x00, 0xFF, 0xFF, 0x6A, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x00, 0x00, 0xC4,
0xE0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4C, 0x49, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x48, 0x80,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x55, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x06, 0x7D, 0x20,
-0x00, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x6C, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0x6A, 0x00, 0x00, 0x04,
-0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00,
-0x4C, 0x49, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4C, 0x49,
-0x4E, 0x54, 0x2D, 0x31, 0x34, 0x0A, 0x00, 0x8C, 0x2D, 0x6A, 0x00, 0x22, 0x96, 0x2A, 0x00, 0x00,
-0x00, 0x0C, 0x4C, 0x69, 0x6E, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x48, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x55, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x06, 0x7D, 0x20, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0x6C, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0x6A, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60,
+0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4C, 0x49, 0x4E, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4C, 0x49, 0x4E, 0x54, 0x2D, 0x31,
+0x34, 0x0A,
+#endif
+0x00, 0x8C, 0x2D, 0x6A, 0x00, 0x22, 0x96, 0x2A, 0x00, 0x00, 0x00, 0x0C, 0x4C, 0x69, 0x6E, 0x65,
+0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Kosrae */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42325,16 +44121,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0x86, 0x1B, 0x50, 0x36, 0x8B, 0x67, 0x40, 0x01, 0x02, 0x01, 0x00, 0x00, 0x98, 0xCC, 0x00,
0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0x9A,
0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x1C, 0x34,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36, 0x8B, 0x67, 0x40,
-0x00, 0x01, 0x02, 0x01, 0x00, 0x00, 0x98, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04,
-0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00,
-0x4B, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x4F,
-0x53, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x91, 0x71, 0x12, 0x02, 0x0B, 0x59, 0xDD, 0x00, 0x00,
-0x00, 0x06, 0x4B, 0x6F, 0x73, 0x72, 0x61, 0x65,
+0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x1C, 0x34, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0x86, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x36, 0x8B, 0x67, 0x40, 0x00, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x98, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
+0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x4F, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x4F, 0x53, 0x54, 0x2D, 0x31,
+0x31, 0x0A,
+#endif
+0x00, 0x91, 0x71, 0x12, 0x02, 0x0B, 0x59, 0xDD, 0x00, 0x00, 0x00, 0x06, 0x4B, 0x6F, 0x73, 0x72,
+0x61, 0x65,
/* Pacific/Kwajalein */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42343,17 +44143,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0x86, 0x1B, 0x50, 0x2C, 0x74, 0xBC, 0xC0, 0x01, 0x02, 0x03, 0x00, 0x00, 0x9C, 0xE0, 0x00,
0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x08, 0x00, 0x00, 0xA8,
0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00, 0x4B, 0x57, 0x41, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
-0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7E, 0x36, 0x18, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x2C, 0x74, 0xBC, 0xC0, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00,
-0x9A, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0x57, 0x40, 0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04,
-0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00, 0x4B, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x48, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x97, 0x30,
-0x6D, 0x02, 0x11, 0xFD, 0x15, 0x00, 0x00, 0x00, 0x09, 0x4B, 0x77, 0x61, 0x6A, 0x61, 0x6C, 0x65,
-0x69, 0x6E,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x18, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0x86, 0x1B, 0x50, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x74, 0xBC, 0xC0, 0x00, 0x01, 0x02, 0x03,
+0x00, 0x00, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0xFF, 0xFF, 0x57, 0x40,
+0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00,
+0x4B, 0x57, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x48,
+0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x97, 0x30, 0x6D, 0x02, 0x11, 0xFD, 0x15, 0x00, 0x00, 0x00, 0x09, 0x4B, 0x77, 0x61, 0x6A,
+0x61, 0x6C, 0x65, 0x69, 0x6E,
/* Pacific/Majuro */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42361,28 +44164,35 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00,
0xFF, 0x86, 0x1B, 0x50, 0x01, 0x02, 0x00, 0x00, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0,
0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36,
-0x14, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0x1B, 0x50, 0x00, 0x01, 0x02, 0x00, 0x00, 0xA0,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C,
-0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x48,
-0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, 0xE3, 0x80, 0x00, 0x00, 0x00,
-0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x14, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0x86, 0x1B, 0x50, 0x00, 0x01, 0x02, 0x00, 0x00, 0xA0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9A,
+0xB0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x48, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x48, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x94, 0x3D, 0x38, 0x02, 0x17, 0xE3, 0x80, 0x00, 0x00, 0x00, 0x1D, 0x4D, 0x61, 0x72, 0x73,
+0x68, 0x61, 0x6C, 0x6C, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73, 0x20, 0x28, 0x6D, 0x6F,
+0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* Pacific/Marquesas */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0x94, 0x50, 0x4C, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0x7D, 0x38, 0x00, 0x00, 0xFF, 0xFF, 0x7A, 0x68,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x50, 0x4C, 0x48, 0x00, 0x01, 0xFF, 0xFF, 0x7D,
-0x38, 0x00, 0x00, 0xFF, 0xFF, 0x7A, 0x68, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x52,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x41, 0x52, 0x54, 0x39, 0x3A, 0x33, 0x30, 0x0A,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x50, 0x4C, 0x48, 0x00, 0x01, 0xFF, 0xFF,
+0x7D, 0x38, 0x00, 0x00, 0xFF, 0xFF, 0x7A, 0x68, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x41,
+0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x41, 0x52, 0x54, 0x39, 0x3A, 0x33, 0x30,
+0x0A,
+#endif
0x00, 0x7B, 0x98, 0xA0, 0x00, 0x3D, 0xCC, 0x50, 0x00, 0x00, 0x00, 0x11, 0x4D, 0x61, 0x72, 0x71,
0x75, 0x65, 0x73, 0x61, 0x73, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
@@ -42394,16 +44204,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50,
0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D,
0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03,
-0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65,
-0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF,
+0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00,
+0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42,
+0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+#endif
0x00, 0xB4, 0x62, 0x62, 0x00, 0x04, 0x04, 0xA5, 0x00, 0x00, 0x00, 0x0E, 0x4D, 0x69, 0x64, 0x77,
0x61, 0x79, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
@@ -42415,16 +44228,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x02, 0x01, 0x03, 0x00, 0x00, 0x9C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0xA1, 0xB8, 0x00,
0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54,
0x00, 0x4E, 0x52, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xE7, 0x2B, 0x04, 0xFF, 0xFF, 0xFF,
-0xFF, 0xCB, 0xB4, 0xBF, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x42, 0x50, 0x70, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x8B, 0x04, 0xC8, 0x00, 0x01, 0x02, 0x01, 0x03, 0x00, 0x00, 0x9C, 0x7C, 0x00, 0x00,
-0x00, 0x00, 0xA1, 0xB8, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x52, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x52, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x88,
-0x8A, 0x6D, 0x02, 0x11, 0x5A, 0x52, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0xE7, 0x2B, 0x04, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xB4, 0xBF, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x42, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x8B, 0x04, 0xC8, 0x00, 0x01, 0x02, 0x01, 0x03, 0x00, 0x00, 0x9C, 0x7C, 0x00, 0x00, 0x00,
+0x00, 0xA1, 0xB8, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0xA8, 0xC0, 0x00,
+0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x52, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x52, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x88, 0x8A, 0x6D, 0x02, 0x11, 0x5A, 0x52, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Niue */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42433,30 +44249,41 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xDC, 0x43, 0x35, 0x60, 0x10, 0x74, 0xCA, 0x38, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x60, 0xB4, 0x00,
0x00, 0xFF, 0xFF, 0x60, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x65,
0x50, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x54, 0x4C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xDC, 0x43, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0xCA, 0x38, 0x00,
-0x01, 0x02, 0x03, 0xFF, 0xFF, 0x60, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0x60, 0xA0, 0x00, 0x04, 0xFF,
-0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E,
-0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x55, 0x54, 0x31,
-0x31, 0x0A, 0x00, 0x6C, 0x4F, 0xDD, 0x00, 0x0F, 0x62, 0xCD, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x54, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x43, 0x35, 0x60, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0xCA, 0x38, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0x60, 0xB4, 0x00, 0x00, 0xFF, 0xFF, 0x60, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0x5E, 0x48,
+0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x55, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x55, 0x54, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x6C, 0x4F, 0xDD, 0x00, 0x0F, 0x62, 0xCD, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Norfolk */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4E, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
-0xDC, 0x41, 0xF8, 0x80, 0x01, 0x02, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80,
-0x00, 0x04, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00,
-0x4E, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x7E, 0x36, 0x17, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0x41, 0xF8, 0x80, 0x00, 0x01,
-0x02, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80, 0x00, 0x04, 0x00, 0x00, 0xA1,
-0xB8, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00, 0x4E, 0x46, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x46, 0x54, 0x2D, 0x31, 0x31, 0x3A, 0x33, 0x30, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x00,
+0xDC, 0x41, 0xF8, 0x80, 0x09, 0x0F, 0xCA, 0x68, 0x09, 0xB5, 0xD9, 0x58, 0x56, 0x0F, 0xE6, 0x68,
+0x01, 0x02, 0x03, 0x02, 0x04, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80, 0x00,
+0x04, 0x00, 0x00, 0xA1, 0xB8, 0x00, 0x08, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x0C, 0x00, 0x00, 0x9A,
+0xB0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00, 0x4E, 0x46, 0x54, 0x00, 0x4E,
+0x46, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x17, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0x41, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, 0xCA, 0x68, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xB5, 0xD9, 0x58, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0F, 0xE6, 0x68, 0x00, 0x01, 0x02, 0x03,
+0x02, 0x04, 0x00, 0x00, 0x9D, 0x78, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x80, 0x00, 0x04, 0x00, 0x00,
+0xA1, 0xB8, 0x00, 0x08, 0x00, 0x00, 0xAF, 0xC8, 0x01, 0x0C, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x4D, 0x54, 0x00, 0x4E, 0x46, 0x54, 0x00, 0x4E, 0x46, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x46, 0x54, 0x2D,
+0x31, 0x31, 0x0A,
+#endif
0x00, 0x5D, 0x00, 0x98, 0x02, 0x12, 0xF4, 0x7A, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Noumea */
@@ -42468,19 +44295,22 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x9C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04,
0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0,
0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x43, 0x53, 0x54, 0x00, 0x4E, 0x43, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
-0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x92, 0xF5, 0xC4, 0x74, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xE6, 0xBA, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x0F, 0x56, 0xBB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x10, 0xC6, 0x9C, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x11, 0x37, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0xA0, 0x4B, 0xF0, 0x00, 0x00, 0x00,
-0x00, 0x33, 0x18, 0x44, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x9C,
-0x0C, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00,
-0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4E,
-0x43, 0x53, 0x54, 0x00, 0x4E, 0x43, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0x4E, 0x43, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x67, 0x5A, 0x55, 0x02, 0x10,
-0xA4, 0x08, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xF5, 0xC4, 0x74, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xE6, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x56, 0xBB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0xC6, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00, 0x11, 0x37, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x32, 0xA0, 0x4B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x18, 0x44, 0x70, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0x9C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04,
+0x00, 0x00, 0x9A, 0xB0, 0x00, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0,
+0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x43, 0x53, 0x54, 0x00, 0x4E, 0x43, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4E, 0x43, 0x54, 0x2D, 0x31, 0x31,
+0x0A,
+#endif
+0x00, 0x67, 0x5A, 0x55, 0x02, 0x10, 0xA4, 0x08, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Pago_Pago */
0x50, 0x48, 0x50, 0x32, 0x01, 0x41, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42490,30 +44320,35 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50,
0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D,
0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03,
-0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65,
-0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF,
+0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00,
+0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42,
+0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+#endif
0x00, 0x73, 0x8F, 0x55, 0x00, 0x0E, 0x30, 0xD0, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Palau */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90,
-0x00, 0x00, 0x50, 0x57, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7E, 0x36, 0x36, 0xEC, 0x00, 0x01, 0x00, 0x00, 0x7E, 0x14, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50,
-0x57, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0x94, 0x84, 0xD5, 0x01, 0xDF, 0xDD, 0x0D, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x50, 0x57, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x36, 0xEC, 0x00, 0x01, 0x00, 0x00,
+0x7E, 0x14, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x57,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x57, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0x94, 0x84, 0xD5, 0x01, 0xDF, 0xDD, 0x0D, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Pitcairn */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42521,57 +44356,68 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x80, 0x00, 0x00, 0x00,
0x35, 0x44, 0x42, 0x08, 0x01, 0x02, 0xFF, 0xFF, 0x86, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x88, 0x78,
0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4E, 0x54, 0x00,
-0x50, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
-0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x7E, 0x37, 0x2E, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x35, 0x44, 0x42, 0x08, 0x00, 0x01,
-0x02, 0xFF, 0xFF, 0x86, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x88, 0x78, 0x00, 0x04, 0xFF, 0xFF, 0x8F,
-0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4E, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x0A, 0x00, 0x63, 0x14, 0x95, 0x00,
-0x4C, 0x2A, 0xB2, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x2E, 0xF4, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x44, 0x42, 0x08, 0x00, 0x01, 0x02, 0xFF, 0xFF, 0x86, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x88,
+0x78, 0x00, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4E, 0x54,
+0x00, 0x50, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x53, 0x54, 0x38,
+0x0A,
+#endif
+0x00, 0x63, 0x14, 0x95, 0x00, 0x4C, 0x2A, 0xB2, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Pohnpei */
0x50, 0x48, 0x50, 0x32, 0x01, 0x46, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x9A, 0xB0,
-0x00, 0x00, 0x50, 0x4F, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x20, 0xAC, 0x00, 0x01, 0x00, 0x00, 0x94, 0x54, 0x00, 0x00, 0x00, 0x00, 0x9A,
-0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4F, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x50, 0x4F, 0x4E, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x93, 0xF5, 0x9A, 0x02, 0x04, 0x13,
-0xE2, 0x00, 0x00, 0x00, 0x10, 0x50, 0x6F, 0x68, 0x6E, 0x70, 0x65, 0x69, 0x20, 0x28, 0x50, 0x6F,
-0x6E, 0x61, 0x70, 0x65, 0x29,
+0x00, 0x00, 0x50, 0x4F, 0x4E, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x20, 0xAC, 0x00, 0x01, 0x00, 0x00,
+0x94, 0x54, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4F,
+0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x4F, 0x4E, 0x54, 0x2D, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x93, 0xF5, 0x9A, 0x02, 0x04, 0x13, 0xE2, 0x00, 0x00, 0x00, 0x0E, 0x50, 0x6F, 0x68, 0x6E,
+0x70, 0x65, 0x69, 0x2F, 0x50, 0x6F, 0x6E, 0x61, 0x70, 0x65,
/* Pacific/Ponape */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x9A, 0xB0,
-0x00, 0x00, 0x50, 0x4F, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x20, 0xAC, 0x00, 0x01, 0x00, 0x00, 0x94, 0x54, 0x00, 0x00, 0x00, 0x00, 0x9A,
-0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4F, 0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x50, 0x4F, 0x4E, 0x54, 0x2D, 0x31, 0x31, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x50, 0x4F, 0x4E, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x20, 0xAC, 0x00, 0x01, 0x00, 0x00,
+0x94, 0x54, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4F,
+0x4E, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x4F, 0x4E, 0x54, 0x2D, 0x31, 0x31, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Port_Moresby */
0x50, 0x48, 0x50, 0x32, 0x01, 0x50, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x00, 0x50, 0x47, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03,
-0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x56, 0xB6, 0x5A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0x72, 0xED, 0xA4, 0x90, 0x00, 0x01, 0x02, 0x00,
-0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D, 0x54, 0x00, 0x50, 0x47, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x47, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x7A, 0xD5, 0x50,
-0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x0E, 0x6D, 0x6F, 0x73, 0x74, 0x20, 0x6C, 0x6F, 0x63,
-0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73,
+0x00, 0x00, 0x50, 0x47, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0x5A, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0x72, 0xED, 0xA4, 0x90, 0x00, 0x01, 0x02, 0x00, 0x00, 0x89, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x89,
+0xF0, 0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x4D, 0x4D,
+0x54, 0x00, 0x50, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x50, 0x47, 0x54,
+0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x7A, 0xD5, 0x50, 0x01, 0xF3, 0x37, 0x7A, 0x00, 0x00, 0x00, 0x1D, 0x50, 0x61, 0x70, 0x75,
+0x61, 0x20, 0x4E, 0x65, 0x77, 0x20, 0x47, 0x75, 0x69, 0x6E, 0x65, 0x61, 0x20, 0x28, 0x6D, 0x6F,
+0x73, 0x74, 0x20, 0x61, 0x72, 0x65, 0x61, 0x73, 0x29,
/* Pacific/Rarotonga */
0x50, 0x48, 0x50, 0x32, 0x01, 0x43, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42588,29 +44434,32 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x03, 0x02, 0xFF, 0xFF, 0x6A, 0x38, 0x00, 0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF,
0xFF, 0x73, 0x60, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
0x4B, 0x54, 0x00, 0x43, 0x4B, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x4A, 0xC8, 0x00, 0x00, 0x00,
-0x00, 0x10, 0xAC, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3F, 0xB5, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x12, 0x79, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1F, 0x97, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x14, 0x59, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFF, 0x79, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x16, 0x39, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE8, 0x95, 0x98, 0x00, 0x00, 0x00,
-0x00, 0x18, 0x22, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC8, 0x77, 0x98, 0x00, 0x00, 0x00,
-0x00, 0x1A, 0x02, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA8, 0x59, 0x98, 0x00, 0x00, 0x00,
-0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x88, 0x3B, 0x98, 0x00, 0x00, 0x00,
-0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x68, 0x1D, 0x98, 0x00, 0x00, 0x00,
-0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x47, 0xFF, 0x98, 0x00, 0x00, 0x00,
-0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x31, 0x1C, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0xFE, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0xE0, 0x18, 0x00, 0x00, 0x00,
-0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0xC2, 0x18, 0x00, 0x01, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
-0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x6A, 0x38, 0x00, 0x00, 0xFF,
-0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01,
-0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4B, 0x54, 0x00, 0x43, 0x4B, 0x48, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x4B, 0x54, 0x31, 0x30, 0x0A, 0x00, 0x68,
-0xED, 0xFA, 0x00, 0x1E, 0xDF, 0xA5, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x37, 0x4A, 0xC8, 0x00, 0x00, 0x00, 0x00,
+0x10, 0xAC, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3F, 0xB5, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x81, 0x20, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1F, 0x97, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x63, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0xFF, 0x79, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x45, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0xE8, 0x95, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x61, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC8, 0x77, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xA8, 0x59, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x88, 0x3B, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x68, 0x1D, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x47, 0xFF, 0x98, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x31, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x10, 0xFE, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0xF0, 0xE0, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xD0, 0xC2, 0x18, 0x00, 0x01, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0xFF, 0xFF, 0x6A, 0x38, 0x00, 0x00, 0xFF, 0xFF,
+0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x4B, 0x54, 0x00, 0x43, 0x4B, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x4B, 0x54, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x68, 0xED, 0xFA, 0x00, 0x1E, 0xDF, 0xA5, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Saipan */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4D, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42618,16 +44467,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x80, 0x00, 0x00, 0x00,
0x3A, 0x43, 0x5E, 0x60, 0x01, 0x02, 0x00, 0x00, 0x87, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
-0x43, 0x68, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
-0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xC5, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x2D, 0x4C, 0x00,
-0x00, 0x00, 0x00, 0x3A, 0x43, 0x5E, 0x60, 0x00, 0x01, 0x02, 0x03, 0xFF, 0xFF, 0x36, 0x34, 0x00,
-0x00, 0x00, 0x00, 0x87, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00, 0x43, 0x68, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x68, 0x53, 0x54, 0x2D, 0x31, 0x30,
-0x0A, 0x00, 0xA0, 0x85, 0xC0, 0x01, 0xF1, 0x0E, 0x18, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x68, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x14, 0xE1, 0xC5, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7E, 0x36, 0x2D, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x43, 0x5E, 0x60, 0x00, 0x01, 0x02, 0x03,
+0xFF, 0xFF, 0x36, 0x34, 0x00, 0x00, 0x00, 0x00, 0x87, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0,
+0x00, 0x04, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x53, 0x54, 0x00,
+0x43, 0x68, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x68,
+0x53, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0xA0, 0x85, 0xC0, 0x01, 0xF1, 0x0E, 0x18, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Samoa */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42637,16 +44489,19 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50,
0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D,
0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03,
-0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65,
-0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF,
+0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00,
+0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42,
+0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Tahiti */
@@ -42654,29 +44509,33 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x00,
0x94, 0x50, 0x55, 0xB8, 0x00, 0x01, 0xFF, 0xFF, 0x73, 0xC8, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x41, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x50, 0x55, 0xB8, 0x00, 0x01, 0xFF, 0xFF, 0x73,
-0xC8, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x41, 0x48,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x41, 0x48, 0x54, 0x31, 0x30, 0x0A, 0x00, 0x6E,
-0x93, 0x4A, 0x00, 0x2E, 0x70, 0x05, 0x00, 0x00, 0x00, 0x0F, 0x53, 0x6F, 0x63, 0x69, 0x65, 0x74,
-0x79, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
+0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x41, 0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0x50, 0x55, 0xB8, 0x00, 0x01, 0xFF, 0xFF,
+0x73, 0xC8, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x41,
+0x48, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x41, 0x48, 0x54, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x6E, 0x93, 0x4A, 0x00, 0x2E, 0x70, 0x05, 0x00, 0x00, 0x00, 0x0F, 0x53, 0x6F, 0x63, 0x69,
+0x65, 0x74, 0x79, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Tarawa */
0x50, 0x48, 0x50, 0x32, 0x01, 0x4B, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x00, 0x47, 0x49, 0x4C, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x12, 0xCC, 0x00, 0x01, 0x00, 0x00, 0xA2, 0x34, 0x00, 0x00, 0x00, 0x00, 0xA8,
-0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x49, 0x4C, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x47, 0x49, 0x4C, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x8B, 0x7D, 0xA2, 0x02, 0x1A, 0xA2,
-0xA0, 0x00, 0x00, 0x00, 0x0F, 0x47, 0x69, 0x6C, 0x62, 0x65, 0x72, 0x74, 0x20, 0x49, 0x73, 0x6C,
-0x61, 0x6E, 0x64, 0x73,
+0x00, 0x00, 0x47, 0x49, 0x4C, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x12, 0xCC, 0x00, 0x01, 0x00, 0x00,
+0xA2, 0x34, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x47, 0x49,
+0x4C, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x49, 0x4C, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x8B, 0x7D, 0xA2, 0x02, 0x1A, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x0F, 0x47, 0x69, 0x6C, 0x62,
+0x65, 0x72, 0x74, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, 0x73,
/* Pacific/Tongatapu */
0x50, 0x48, 0x50, 0x32, 0x01, 0x54, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42688,72 +44547,84 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x08, 0x00, 0x00, 0xB6, 0xD0,
0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4F, 0x54, 0x00,
0x54, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x07, 0xB8, 0xFF, 0xFF, 0xFF,
-0xFF, 0xC9, 0x73, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0xFB, 0x47, 0xD0, 0x00, 0x00, 0x00,
-0x00, 0x38, 0xD3, 0x7D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x04, 0x08, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x3A, 0x72, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xE3, 0xEA, 0x50, 0x00, 0x00, 0x00,
-0x00, 0x3C, 0x52, 0x9A, 0x40, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x02, 0x05, 0x02, 0x00, 0x00,
-0xAD, 0x48, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x70, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04,
-0x00, 0x00, 0xC4, 0xE0, 0x01, 0x08, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0,
-0x01, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4F, 0x54, 0x00, 0x54, 0x4F, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4F, 0x54, 0x2D,
-0x31, 0x33, 0x0A, 0x00, 0x69, 0x08, 0x05, 0x00, 0x07, 0x60, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x07, 0xB8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0x73, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0xFB, 0x47, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xD3, 0x7D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x04, 0x08, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0x72, 0xB8, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xE3, 0xEA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0x52, 0x9A, 0x40, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x02, 0x05, 0x02, 0x00, 0x00, 0xAD,
+0x48, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x70, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00,
+0x00, 0xC4, 0xE0, 0x01, 0x08, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x01,
+0x08, 0x4C, 0x4D, 0x54, 0x00, 0x54, 0x4F, 0x54, 0x00, 0x54, 0x4F, 0x53, 0x54, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x54, 0x4F, 0x54, 0x2D, 0x31,
+0x33, 0x0A,
+#endif
+0x00, 0x69, 0x08, 0x05, 0x00, 0x07, 0x60, 0x05, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Truk */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x26, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x8E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x43, 0x48, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x26, 0xB4, 0x00, 0x01, 0x00, 0x00,
+0x8E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48,
+0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Wake */
0x50, 0x48, 0x50, 0x32, 0x01, 0x55, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x00, 0x57, 0x41, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x18, 0xCC, 0x00, 0x01, 0x00, 0x00, 0x9C, 0x34, 0x00, 0x00, 0x00, 0x00, 0xA8,
-0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x57, 0x41, 0x4B, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0xA6, 0xC0, 0xCD, 0x02, 0x10, 0xE5,
-0x22, 0x00, 0x00, 0x00, 0x0B, 0x57, 0x61, 0x6B, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
-
+0x00, 0x00, 0x57, 0x41, 0x4B, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x18, 0xCC, 0x00, 0x01, 0x00, 0x00,
+0x9C, 0x34, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x41,
+0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x41, 0x4B, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0xA6, 0xC0, 0xCD, 0x02, 0x10, 0xE5, 0x22, 0x00, 0x00, 0x00, 0x0B, 0x57, 0x61, 0x6B, 0x65,
+0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64,
/* Pacific/Wallis */
0x50, 0x48, 0x50, 0x32, 0x01, 0x57, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x00, 0x57, 0x46, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02,
-0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x7E, 0x36, 0x08, 0xA8, 0x00, 0x01, 0x00, 0x00, 0xAC, 0x58, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0,
-0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57,
-0x46, 0x54, 0x2D, 0x31, 0x32, 0x0A, 0x00, 0x75, 0x08, 0xF0, 0x00, 0x05, 0xD9, 0x65, 0x00, 0x00,
-0x00, 0x00,
+0x00, 0x00, 0x57, 0x46, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x08, 0xA8, 0x00, 0x01, 0x00, 0x00,
+0xAC, 0x58, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x46,
+0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x57, 0x46, 0x54, 0x2D, 0x31, 0x32, 0x0A,
+#endif
+0x00, 0x75, 0x08, 0xF0, 0x00, 0x05, 0xD9, 0x65, 0x00, 0x00, 0x00, 0x00,
/* Pacific/Yap */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x8C, 0xA0,
-0x00, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
-0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
-0xFF, 0x7E, 0x36, 0x26, 0xB4, 0x00, 0x01, 0x00, 0x00, 0x8E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x8C,
-0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x0A, 0x43, 0x48, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x43, 0x48, 0x55, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x26, 0xB4, 0x00, 0x01, 0x00, 0x00,
+0x8E, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x8C, 0xA0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x48,
+0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x48, 0x55, 0x54, 0x2D, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Poland */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -42818,114 +44689,117 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x43, 0x45,
0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00,
-0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6,
-0xD0, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0xA8, 0x2A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C,
-0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9,
-0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9,
-0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x9A,
-0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x65, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x7D,
-0x7C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x76, 0xDE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7,
-0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2,
-0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x80,
-0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x84, 0xBA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x95,
-0x92, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x8A, 0xBB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x62,
-0xFF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x4B, 0x23, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x5E,
-0xAD, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C,
-0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02,
-0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x78, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x54,
-0xD2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF1, 0xB4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xE1,
-0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1, 0x96, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0x14,
-0x96, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA,
-0xA4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0x95, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xD4,
-0x5A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x77, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xB4,
-0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x94,
-0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x3A, 0x3B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x7D,
-0x3A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x1A, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A,
-0xFD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B,
-0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74,
-0x28, 0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54,
-0x0A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33,
-0xEC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13,
-0xCE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3,
-0xB0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3,
-0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC,
-0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C,
-0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C,
-0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C,
-0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xDA, 0xD6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C,
-0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C,
-0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C,
-0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5,
-0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5,
-0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4,
-0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94,
-0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74,
-0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D,
-0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D,
-0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D,
-0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD,
-0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD,
-0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD,
-0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6,
-0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86,
-0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66,
-0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46,
-0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
-0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05,
-0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE,
-0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE,
-0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE,
-0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E,
-0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E,
-0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57,
-0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37,
-0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17,
-0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7,
-0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7,
-0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6,
-0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0,
-0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F,
-0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F,
-0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F,
-0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F,
-0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08,
-0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8,
-0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8,
-0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8,
-0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88,
-0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68,
-0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51,
-0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31,
-0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11,
-0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0,
-0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0,
-0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0,
-0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99,
-0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79,
-0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04,
-0x05, 0x04, 0x08, 0x06, 0x07, 0x03, 0x02, 0x05, 0x04, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xD0, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0x99, 0xA8, 0x2A, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xDA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xD9, 0xAE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9D, 0xA4, 0xB5, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xB9, 0x90, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x97, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x9A, 0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x65, 0xBD, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x7D, 0x7C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x76, 0xDE, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xE7, 0x4B, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0xA9, 0x17, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xA2, 0x43, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x92, 0x34, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x80, 0xA9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x84, 0xBA, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x95, 0x92, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x8A, 0xBB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x62, 0xFF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x4B, 0x23, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x5E, 0xAD, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0xB4, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2C, 0x1A, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x96, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x78, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x54, 0xD2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF1, 0xB4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xE1, 0xA5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0x96, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0x14, 0x96, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xBA, 0xB3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xA4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x9A, 0x95, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xD4, 0x5A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x7A, 0x77, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xB4, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x5A, 0x59, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x94, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x3A, 0x3B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x7D, 0x3A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x1A, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x2A, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x55, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x0A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xCE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xB0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0xDA, 0xD6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x08, 0x06, 0x07, 0x03,
+0x02, 0x05, 0x04, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04,
-0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x09,
+0x05, 0x03, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x03, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x04, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01,
-0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x16, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x16, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
-0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53,
-0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x00, 0x00, 0x13,
+0xB0, 0x00, 0x00, 0x00, 0x00, 0x13, 0xB0, 0x00, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00,
+0x00, 0x0E, 0x10, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00,
+0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x16, 0x00, 0x00, 0x1C,
+0x20, 0x00, 0x16, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C,
+0x4D, 0x54, 0x00, 0x57, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00,
+0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
+0x43, 0x45, 0x54, 0x2D, 0x31, 0x43, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30,
+0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Portugal */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43007,144 +44881,147 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54,
0x00, 0x57, 0x45, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
-0x1B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x97,
-0x1D, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x4B, 0x6D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xFE, 0xC7,
-0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0xED, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xC9, 0x83,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x7F, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xAA, 0xB6,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x5F, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x8B, 0xEA,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x41, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x6E, 0x6F,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x23, 0x0C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x4F, 0xA2,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xF4, 0x8E,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x32, 0x4C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xC8,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0xFF, 0xB9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xAA,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xC8, 0xB7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xA8,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0x9F, 0x5F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x8A,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x9A, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x6C,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x68, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x3F, 0x05, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xD9, 0xDF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x01, 0x2F,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xF1, 0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x62,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xB5, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEC, 0xA3,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0x80, 0x4B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC, 0xA2,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0x95, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC3, 0x4B,
-0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0x72, 0xA2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC5, 0xBF,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x75, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xAC, 0x67,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x52, 0x84, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA5, 0xA1,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x54, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x8C, 0x49,
-0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x32, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85, 0x83,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x59, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xB5,
-0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xC2,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xA4,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x86,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xB2, 0x84,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x92, 0x66,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x93,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x63, 0xAF,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x43, 0x91,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x23, 0x73,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x03, 0x55,
-0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF3, 0x46, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x2A,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x9B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x43, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xBD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F,
-0x90, 0x00, 0x02, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03,
-0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x06, 0x02, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03,
-0x04, 0x03, 0x04, 0x03, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0xFF,
-0xFF, 0xF7, 0x63, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x1C,
-0x20, 0x01, 0x0D, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00,
-0x00, 0x1C, 0x20, 0x01, 0x16, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x09, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45,
-0x4D, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-0x01, 0x01, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35,
-0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x97, 0x1D, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x4B, 0x6D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0xFE, 0xC7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9C, 0x9C, 0xED, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xC9, 0x83, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x7F, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xAA, 0xB6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x5F, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x8B, 0xEA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x41, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x6E, 0x6F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x23, 0x0C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x4F, 0xA2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x05, 0xEF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xF4, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xC9, 0xA7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xA7, 0x23, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xA0, 0x4F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x87, 0x05, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x89, 0x6B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x70, 0x22, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x72, 0x88, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x50, 0x04, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x32, 0x4C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x0F, 0xC8, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB8, 0xFF, 0xB9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xEF, 0xAA, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xC8, 0xB7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xB8, 0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0x9F, 0x5F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x98, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x9A, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x78, 0x6C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x68, 0x5D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x58, 0x4E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x3F, 0x05, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x38, 0x30, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x3A, 0x96, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x58, 0xAC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC7, 0xD9, 0xDF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x01, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xF1, 0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE2, 0x62, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0xB5, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xEC, 0xA3, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0x80, 0x4B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xDC, 0xA2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCD, 0x95, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xC3, 0x4B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCE, 0x72, 0xA2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCE, 0xC5, 0xBF, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x75, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xAC, 0x67, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD0, 0x52, 0x84, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0xA5, 0xA1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD1, 0x54, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x8C, 0x49, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x32, 0x66, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x85, 0x83, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x59, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x49, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x39, 0xD1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x29, 0xC2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x19, 0xB3, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x09, 0xA4, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0xF9, 0x95, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE9, 0x86, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xB9, 0x59, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xB2, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0xA2, 0x75, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x92, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x82, 0x57, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x72, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x62, 0x39, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x52, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x42, 0x1B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x32, 0x0C, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x21, 0xFD, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x1B, 0x29, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x0B, 0x1A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xFB, 0x0B, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xEA, 0xFC, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xDA, 0xED, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xCA, 0xDE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0xCF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xAA, 0xC0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x9A, 0xB1, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0x8A, 0xA2, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x7A, 0x93, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF1, 0x6A, 0x84, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x63, 0xAF, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF3, 0x53, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x43, 0x91, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF5, 0x33, 0x82, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x23, 0x73, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0x13, 0x64, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x03, 0x55, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0xF3, 0x46, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xAB, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0x9B, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x37, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x28, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x43, 0xFB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xBD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x02, 0x01, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04,
+0x03, 0x05, 0x03, 0x04, 0x03, 0x05, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x06, 0x02,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x07,
+0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0xFF, 0xFF, 0xF7, 0x63, 0x00, 0x00,
+0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10,
+0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x0D, 0x00, 0x00,
+0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x12, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x16,
+0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00,
+0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x57, 0x45, 0x4D, 0x54, 0x00, 0x43, 0x45,
+0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01,
+0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x57, 0x45,
+0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C,
+0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* PRC */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43157,23 +45034,26 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70,
0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43,
-0x29, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43,
-0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23,
-0xF0, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x00, 0x00, 0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00,
-0x00, 0x70, 0x80, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89,
-0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x43, 0x29, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x5C, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xFA, 0x27, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC9, 0xD5, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xDB, 0x5A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xBA, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x69, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x7E, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x49, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x5E, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x23, 0x29, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x47, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x12, 0x5F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x27, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0xF2, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x28, 0x07, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xD2, 0x23, 0xF0, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00,
+0x71, 0xD7, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x04, 0x00, 0x00, 0x70, 0x80, 0x00, 0x08,
+0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* PST8PDT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43228,99 +45108,102 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0x50, 0x44, 0x54,
0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7,
-0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4,
-0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47,
-0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73,
-0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF,
-0x9D, 0x90, 0x01, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08,
-0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57,
-0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50,
-0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31,
-0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00,
-0x00, 0x00,
+0x01, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x00, 0xFF,
+0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
+0x0C, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44,
+0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
+0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* ROC */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43342,37 +45225,40 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01,
0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x57, 0x53, 0x54, 0x00,
0x4A, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
-0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xCE,
-0xF0, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x49, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x54,
-0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x42,
-0xAD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x45, 0x22, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4C,
-0xBF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x3C, 0xBF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x06,
-0x66, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x1D, 0xF2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE7,
-0x99, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC8,
-0xCD, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xE0, 0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xAA,
-0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x72, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xB5,
-0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x7C, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96,
-0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x5D, 0xB8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x77,
-0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x3E, 0xEC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x30,
-0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x21, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12,
-0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x02, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF3,
-0xD8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0xE3, 0xD8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5,
-0x0C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xC5, 0x0B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB6,
-0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xF7, 0xFC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x98,
-0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xD9, 0x2F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79,
-0xF8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED,
-0x8A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDD, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCE,
-0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0xDB, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54,
-0xDD, 0x70, 0x00, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xCE, 0xF0, 0x18, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC3, 0x55, 0x49, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x54, 0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD3, 0x8B, 0x7B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x42, 0xAD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x45, 0x22, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x4C, 0xBF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD7, 0x3C, 0xBF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x06, 0x66, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0x1D, 0xF2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE7, 0x99, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDA, 0xFF, 0x26, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC8, 0xCD, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDC, 0xE0, 0x59, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xAA, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDE, 0x72, 0x73, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xB5, 0x64, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE0, 0x7C, 0x85, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x96, 0x97, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE2, 0x5D, 0xB8, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x77, 0xCB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x3E, 0xEC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x30, 0x20, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x21, 0x71, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x02, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF3, 0xD8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0xE3, 0xD8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD5, 0x0C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xC5, 0x0B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB6, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xF7, 0xFC, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x98, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEF, 0xD9, 0x2F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x79, 0xF8, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0xFC, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xED, 0x8A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0xDD, 0x89, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xCE, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x11, 0xDB, 0xA1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0xDD, 0x70, 0x00, 0x01, 0x02, 0x04,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04,
-0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x71, 0xE8,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00,
-0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00, 0x70, 0x80, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x57,
-0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x71, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80,
+0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x09, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x0D, 0x00, 0x00,
+0x70, 0x80, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4A, 0x57, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54,
+0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x2D, 0x38, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* ROK */
@@ -43390,29 +45276,31 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85,
0x98, 0x01, 0x11, 0x00, 0x00, 0x8C, 0xA0, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54,
0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xD7, 0xF0, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0x92, 0xE6, 0x16, 0xF8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x43, 0x27, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x4F, 0x29, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x6B, 0xB7, 0xF8,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x13, 0x18, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x62, 0x03, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0x4C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x2F, 0x70, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE7, 0xF4, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x0F, 0x52, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xC7, 0xD6, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xEF, 0x34, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA7, 0xB8, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCF, 0x16, 0x78,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x87, 0x9A, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x35, 0x71, 0x78,
-0x00, 0x00, 0x00, 0x00, 0x20, 0xA3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6E, 0x67, 0x90,
-0x00, 0x00, 0x00, 0x00, 0x22, 0x83, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x23, 0x4E, 0x49, 0x90,
-0x00, 0x01, 0x02, 0x03, 0x04, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01,
-0x05, 0x01, 0x04, 0x06, 0x04, 0x06, 0x04, 0x00, 0x00, 0x77, 0x08, 0x00, 0x00, 0x00, 0x00, 0x77,
-0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x0D, 0x00,
-0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x01, 0x11, 0x00, 0x00, 0x8C, 0xA0, 0x01,
-0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53, 0x54, 0x00, 0x4A, 0x53,
-0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x53, 0x54, 0x2D, 0x39, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x8B, 0xD7, 0xF0, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
+0x92, 0xE6, 0x16, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x55, 0x3B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x43, 0x27, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x4F, 0x29, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE4, 0x6B, 0xB7, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x13, 0x18, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE6, 0x62, 0x03, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x11, 0x4C, 0xE8, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0x2F, 0x70, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xE7, 0xF4, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0x0F, 0x52, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xC7, 0xD6, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEB, 0xEF, 0x34, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xA7, 0xB8, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xED, 0xCF, 0x16, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x87, 0x9A, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x35, 0x71, 0x78, 0x00, 0x00, 0x00, 0x00, 0x20, 0xA3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x6E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x83, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x4E, 0x49, 0x90, 0x00, 0x01, 0x02, 0x03, 0x04, 0x01, 0x05, 0x01, 0x05, 0x01, 0x05, 0x01,
+0x05, 0x01, 0x05, 0x01, 0x05, 0x01, 0x04, 0x06, 0x04, 0x06, 0x04, 0x00, 0x00, 0x77, 0x08, 0x00,
+0x00, 0x00, 0x00, 0x77, 0x88, 0x00, 0x04, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x08, 0x00, 0x00, 0x7E,
+0x90, 0x00, 0x0D, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x04, 0x00, 0x00, 0x85, 0x98, 0x01, 0x11, 0x00,
+0x00, 0x8C, 0xA0, 0x01, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4B, 0x53, 0x54, 0x00, 0x4A, 0x43, 0x53,
+0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x4B, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4B, 0x53, 0x54, 0x2D, 0x39, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Singapore */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43426,23 +45314,25 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x90, 0x00, 0x13, 0x00, 0x00, 0x69, 0x78, 0x00, 0x17, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C,
0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53,
0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66,
-0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
-0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x53, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, 0x83, 0x85, 0xA3,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x4E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x0A, 0xE4, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xB3, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x91, 0x5F, 0x08,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xBA, 0x4D, 0x88,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x91, 0xF5, 0x08, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x05,
-0x07, 0x08, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x04, 0x00, 0x00,
-0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x67, 0x20, 0x01, 0x0D, 0x00, 0x00, 0x67, 0x20, 0x00, 0x08,
-0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x13, 0x00, 0x00, 0x69, 0x78,
-0x00, 0x17, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x4D, 0x54, 0x00,
-0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00, 0x4A, 0x53, 0x54, 0x00, 0x53,
-0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x47, 0x54, 0x2D, 0x38, 0x0A, 0x00, 0x89, 0x54, 0x40,
-0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1B, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x36, 0x53, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF,
+0x86, 0x83, 0x85, 0xA3, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x67, 0x4E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x0A, 0xE4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xB3, 0xE5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x91, 0x5F, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x48, 0x6D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF7, 0xBA, 0x4D, 0x88, 0x00, 0x00, 0x00, 0x00, 0x16, 0x91, 0xF5, 0x08, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x05, 0x06, 0x05, 0x07, 0x08, 0x00, 0x00, 0x61, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5D,
+0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x08, 0x00, 0x00, 0x67, 0x20, 0x01, 0x0D, 0x00, 0x00,
+0x67, 0x20, 0x00, 0x08, 0x00, 0x00, 0x69, 0x78, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x90, 0x00, 0x13,
+0x00, 0x00, 0x69, 0x78, 0x00, 0x17, 0x00, 0x00, 0x70, 0x80, 0x00, 0x17, 0x4C, 0x4D, 0x54, 0x00,
+0x53, 0x4D, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x54, 0x00, 0x4D, 0x41, 0x4C, 0x53, 0x54, 0x00, 0x4A,
+0x53, 0x54, 0x00, 0x53, 0x47, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x47, 0x54, 0x2D, 0x38, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Turkey */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43479,7 +45369,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x49, 0x03, 0xC1, 0x10, 0x49, 0xCE, 0xC8, 0x10, 0x4A, 0xE3, 0xA3, 0x10, 0x4B, 0xAE, 0xAA, 0x10,
0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8F, 0xDD, 0x90, 0x4E, 0xAC, 0xA1, 0x90, 0x4F, 0x6E, 0x6E, 0x10,
0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, 0x53, 0x38, 0xBE, 0x10,
-0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, 0x56, 0xF7, 0x30, 0x90,
+0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x3E, 0x9E, 0x90, 0x56, 0xF7, 0x30, 0x90,
0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, 0x5A, 0xB6, 0xF4, 0x90,
0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, 0x5E, 0x7F, 0xF3, 0x10,
0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, 0x62, 0x3F, 0xB7, 0x10,
@@ -43508,138 +45398,147 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
0x00, 0x45, 0x45, 0x54, 0x00, 0x54, 0x52, 0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xD8, 0xFF, 0xFF,
-0xFF, 0xFF, 0x90, 0x8B, 0xF5, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x28, 0x28, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAA, 0xE1, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF9, 0x89, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xAC, 0xC3, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x7F, 0xEE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xC8, 0xFF, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x4A, 0xF5, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCA, 0xCE, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x71, 0xEB, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x6B, 0x09, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA2, 0x39, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD4, 0x43, 0x02, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x0D, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0x29, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2B, 0xEF, 0xE0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD8, 0x09, 0x5D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0x97, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD9, 0xE9, 0x3F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEF, 0xA8, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDB, 0xD2, 0x5C, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xD4, 0xD0, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDD, 0xB3, 0x8F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xF4, 0xB9, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF2, 0x64, 0xBA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x68, 0x06, 0x60, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF6, 0x1F, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xBA, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x6B, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x9C, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x03, 0x4B, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x69, 0xB9, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x05, 0x34, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x39, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFB, 0x75, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x09, 0x19, 0xA6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDB, 0x3A, 0xE0, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0xF0, 0x07, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x10, 0xCE, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0C, 0xD9, 0x24, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x0E, 0xA6, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00,
-0x00, 0x00, 0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0x98, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x47, 0x7A, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x27, 0x5C, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07, 0x3E, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x89, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDC, 0x94, 0xC0, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xC6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9B, 0x15, 0x50, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xD4, 0xFA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00,
-0x00, 0x00, 0x45, 0x98, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8F, 0xDD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x38, 0xBE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
+0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x1A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC8, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
+0x90, 0x8B, 0xF5, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x0C, 0x17, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0xD5, 0xBE, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0x63, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA3, 0x7B, 0x82, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x4E, 0x80, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x3F, 0xB4, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x25, 0x27, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x27, 0x7F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x28, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0xE1, 0xFD, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF9, 0x89, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAC, 0xC3, 0x31, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x7F, 0xEE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0xFF, 0xC1, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x4A, 0xF5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0xCE, 0x80, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xCB, 0xAE, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCC, 0xE5, 0xC1, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD1, 0x71, 0xEB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x6B, 0x09, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xA2, 0x39, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x43, 0x02, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x4C, 0x0D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x29, 0x7B, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x2B, 0xEF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x09, 0x5D, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x02, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE9, 0x3F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xEF, 0xA8, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xD2, 0x5C, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xD4, 0xD0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xB3, 0x8F, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xF4, 0xB9, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x64, 0xBA, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x68, 0x06, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x1F, 0x38, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xBA, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x6B, 0xB3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x9C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x4B, 0x95, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x69, 0xB9, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x34, 0xB2, 0x50, 0x00, 0x00, 0x00, 0x00, 0x06, 0x6E, 0x93, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x39, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFB, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x19, 0xA6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xDB, 0x3A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x07, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x10, 0xCE, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0x24, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x39, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xA6, 0x91, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x1B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x86, 0x73, 0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x67, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x47, 0x7A, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xDD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x16, 0x27, 0x5C, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x19, 0x89, 0x94, 0x50, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDC, 0x94, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xC6, 0xD3, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9B, 0x15, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x35, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x09, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD4, 0xFA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xEB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x98, 0x32, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8F, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x38, 0xBE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x3E, 0x9E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02,
-0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05,
-0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
+0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05,
+0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x02, 0x03, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07,
-0x06, 0x07, 0x06, 0x07, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
+0x06, 0x07, 0x03, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x00, 0x00, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00,
-0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01,
-0x11, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C,
-0x20, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C,
-0x4D, 0x54, 0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00,
-0x54, 0x52, 0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45,
-0x54, 0x2D, 0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33,
-0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x00, 0x00, 0x1B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x68, 0x00, 0x04, 0x00, 0x00, 0x2A,
+0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01, 0x11, 0x00,
+0x00, 0x2A, 0x30, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x0D, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x08, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x4C, 0x4D, 0x54,
+0x00, 0x49, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, 0x54, 0x52,
+0x53, 0x54, 0x00, 0x54, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A, 0x45, 0x45, 0x54, 0x2D,
+0x32, 0x45, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x33, 0x2C, 0x4D,
+0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x34, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* UCT */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x43, 0x54, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x43, 0x54, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x43, 0x54, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Universal */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Alaska */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43696,101 +45595,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x43, 0x41, 0x57, 0x54, 0x00, 0x43,
0x41, 0x50, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x41, 0x48, 0x44, 0x54, 0x00, 0x59, 0x53,
0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x2A, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xE0, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87,
-0x41, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x36, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23,
-0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x42, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2,
-0x47, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x63, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88,
-0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x44, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51,
-0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x31,
-0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xDB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xE9, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xCB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xCA, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0xAD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x8F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x8E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x53, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x52, 0x40, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x6F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x51, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2,
-0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2,
-0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2,
-0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76,
-0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56,
-0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35,
-0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15,
-0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE,
-0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE,
-0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE,
-0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E,
-0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E,
-0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67,
-0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47,
-0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27,
-0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07,
-0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7,
-0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7,
-0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0,
-0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90,
-0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F,
-0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F,
-0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F,
-0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3,
-0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3,
-0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3,
-0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C,
-0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C,
-0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C,
-0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C,
-0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C,
-0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC,
-0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5,
-0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5,
-0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5,
-0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84,
-0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64,
-0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D,
-0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D,
-0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D,
-0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED,
-0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD,
-0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD,
-0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96,
-0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76,
-0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56,
-0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36,
-0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15,
-0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF,
-0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE,
-0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE,
-0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E,
-0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E,
-0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E,
-0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x2A, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xE0, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x41, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x36, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x42, 0x30, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD2, 0x47, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x63, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x44, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x43, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x31, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xDB, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xE9, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xCB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xCA, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0xAD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x8F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x8E, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x53, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x52, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x6F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x34, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x51, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x42, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x25, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x24, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB2, 0x06, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xE9, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x39, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xCB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x1B, 0x30, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xE8, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x35, 0xFD, 0x30, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xCA, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xDF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xAC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFE, 0xFB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x8E, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xDD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x70, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xBF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x8C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0xA1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x6E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x83, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0xA0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x32, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x82, 0x30, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x14, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x64, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xF6, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x46, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x13, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x28, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xF5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC7, 0x0A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xD7, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x26, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xB9, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x90, 0x08, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x9B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xEA, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xB7, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xCC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x99, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xAE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x7B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xE1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x98, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x7A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0xA5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x5C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xC1, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x78, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0xA3, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x5A, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x3C, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x67, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x1E, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x49, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x2B, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xE2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x2A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xE1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA5, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xC3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xEE, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xA5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xD0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x87, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xEC, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xA3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xCE, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x85, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xB0, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x67, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x92, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x49, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x74, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x2B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x56, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x0D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x73, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x2A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x55, 0x30, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xEE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xD0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xFB, 0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xB2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x17, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xCE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xF9, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xB0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xDB, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x92, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xBD, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x74, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x9F, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x56, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x81, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x38, 0xA0, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
-0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00, 0xC4, 0xF8,
-0x00, 0x00, 0xFF, 0xFF, 0x73, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0xFF, 0xFF,
-0x81, 0x70, 0x01, 0x08, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x0D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x12,
-0xFF, 0xFF, 0x81, 0x70, 0x01, 0x17, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x1C, 0xFF, 0xFF, 0x8F, 0x80,
-0x01, 0x20, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00,
-0x43, 0x41, 0x57, 0x54, 0x00, 0x43, 0x41, 0x50, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x41,
-0x48, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41, 0x4B, 0x53,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B, 0x44, 0x54,
-0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
+0xC4, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04,
+0xFF, 0xFF, 0x81, 0x70, 0x01, 0x08, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x0D, 0xFF, 0xFF, 0x73, 0x60,
+0x00, 0x12, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x17, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x1C, 0xFF, 0xFF,
+0x8F, 0x80, 0x01, 0x20, 0xFF, 0xFF, 0x81, 0x70, 0x00, 0x25, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x41,
+0x54, 0x00, 0x43, 0x41, 0x57, 0x54, 0x00, 0x43, 0x41, 0x50, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54,
+0x00, 0x41, 0x48, 0x44, 0x54, 0x00, 0x59, 0x53, 0x54, 0x00, 0x41, 0x4B, 0x44, 0x54, 0x00, 0x41,
+0x4B, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x41, 0x4B, 0x53, 0x54, 0x39, 0x41, 0x4B,
+0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E,
+0x30, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Aleutian */
@@ -43848,101 +45750,104 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50,
0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48,
0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-0x21, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xF9,
-0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0x87, 0x5A, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44,
-0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50,
-0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71,
-0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB,
-0xD0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42,
-0x50, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x22,
-0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x33,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x15,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB2, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xF7,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x47, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xD9,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xF6,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x24, 0x36, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xD8,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xBA,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFF, 0x09, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x9C,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x7E,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x9A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x7C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x5E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0xAE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x40,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x22,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x72, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0x33, 0x04,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x21,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFC, 0x03,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC7, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xE5,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xC7,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x90, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0xA9,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xC5,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0xA7,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x89,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0xA6,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x88,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x6A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x86,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x68,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x4A,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x2C,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x0E,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xF0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x56, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1F, 0x0D,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xEF,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xD1,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xB3,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x95,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xFA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xB1,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xDC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x93,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x75,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x57,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x39,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x1B,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x38,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x1A,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xFC,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xDE,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x73, 0x16, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xC0,
-0x30, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xDC,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDF, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xBE,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xE9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0xA0,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x82,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x64,
-0xB0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x8F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x46,
-0xB0, 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x05, 0x06, 0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08,
-0x09, 0x08, 0x09, 0x00, 0x00, 0xAB, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0x5A, 0x62, 0x00, 0x00, 0xFF,
-0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01,
-0x0C, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x73,
-0x60, 0x00, 0x18, 0xFF, 0xFF, 0x81, 0x70, 0x01, 0x1D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x19, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42,
-0x53, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x21, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xF9, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF,
+0x7D, 0x87, 0x5A, 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x44, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x50, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xD2, 0x55, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x71, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x53, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x35, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x52, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x51, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x33, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x31, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x6D, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xE9, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xD9, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xF7, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0xBB, 0xD0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xD9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xD8, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0xBB, 0x40, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0xBA, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x9D, 0x40, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x9C, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x7F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x7E, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x61, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x60, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x7D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x42, 0x50, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x5F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xF2, 0x50, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x33, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xD2, 0x32, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC2, 0x15, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0xB2, 0x14, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xF7, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x76, 0x47, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xD9, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x56, 0x29, 0x40, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xF6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x36, 0x0B, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xD8, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x15, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0xBA, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xFF, 0x09, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x9C, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xDE, 0xEB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xBE, 0xCD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x9A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x9E, 0xAF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x7C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x7E, 0x91, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x5E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x67, 0xAE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x40, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x47, 0x90, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x22, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x27, 0x72, 0x40, 0x00, 0x00, 0x00, 0x00, 0x36, 0x33, 0x04, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x37, 0x07, 0x54, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x21, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xE7, 0x36, 0x40, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFC, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xC7, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xE5, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xB0, 0x34, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xC7, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x90, 0x16, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0xA9, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x6F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xC5, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x4F, 0xDA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0xA7, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0xBC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x89, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xEF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0xA6, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0xD1, 0x40, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x88, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0xB3, 0x40, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x6A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x86, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0xB1, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x68, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x93, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x4A, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x75, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x2C, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x57, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x56, 0x0E, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFC, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xF0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x56, 0x40, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1F, 0x0D, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC5, 0x38, 0x40, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xEF, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA5, 0x1A, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xD1, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xFC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0xDE, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x95, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xFA, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0xB1, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0xDC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x93, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0xBE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x75, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0xA0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x57, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x39, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x64, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE7, 0x1B, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x63, 0x40, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xB0, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x56, 0x45, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xFC, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x36, 0x27, 0x40, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xDE, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x16, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFF, 0x25, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xDC, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDF, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xBE, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xE9, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0xA0, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0xCB, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x82, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0xAD, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x64, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x8F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x46, 0xB0, 0x00, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09,
+0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x09, 0x00, 0x00,
+0xAB, 0xE1, 0x00, 0x00, 0xFF, 0xFF, 0x5A, 0x62, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04,
+0xFF, 0xFF, 0x73, 0x60, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0C, 0xFF, 0xFF, 0x65, 0x50,
+0x00, 0x10, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x14, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x18, 0xFF, 0xFF,
+0x81, 0x70, 0x01, 0x1D, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x19, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53,
+0x54, 0x00, 0x4E, 0x57, 0x54, 0x00, 0x4E, 0x50, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x42, 0x44,
+0x54, 0x00, 0x41, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
+0x48, 0x53, 0x54, 0x31, 0x30, 0x48, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Arizona */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -43954,20 +45859,23 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF,
-0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x17, 0xDF, 0x1C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xCF, 0x8F, 0xE5, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x81, 0x1A, 0x1C, 0xFF,
-0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0x00,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00,
-0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB,
-0xA0, 0x01, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
-0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x17, 0xDF, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCF, 0x8F, 0xE5, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x81, 0x1A, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x58, 0x00, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x96, 0xEE, 0x00, 0x00, 0xFF, 0xFF,
+0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C,
+0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x54, 0x37, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Central */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -44051,131 +45959,133 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB, 0xA0,
0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53,
0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x07,
-0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0xCB, 0x74, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA3, 0x83, 0xF7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x45, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0x63, 0xD9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xD9, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA7, 0x15, 0x97, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xBB, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA8, 0xFE, 0xB3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x13, 0x9D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAA, 0xDE, 0x95, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF3, 0x7F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAC, 0xBE, 0x77, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xD3, 0x61, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xAE, 0x9E, 0x59, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xB3, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB0, 0x7E, 0x3B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x5F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB2, 0x67, 0x58, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x41, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB4, 0x47, 0x3A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x23, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB6, 0x27, 0x1C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3C, 0x05, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB8, 0x06, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x1B, 0xE7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB9, 0xE6, 0xE0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x05, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBB, 0xC6, 0xC2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xE6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBD, 0xAF, 0xDE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xC8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xBF, 0x8F, 0xC0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x5A, 0xD6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC1, 0xB0, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x8C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC5, 0x2F, 0x66, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x8A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC7, 0x0F, 0x48, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x6C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xC8, 0xF8, 0x65, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x85, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0xCB, 0x74, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x83, 0xF7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x45, 0xD2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x63, 0xD9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xD9, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0x97, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x33, 0xBB, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xB3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x13, 0x9D, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xDE, 0x95, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xF3, 0x7F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBE, 0x77, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xD3, 0x61, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x9E, 0x59, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xB3, 0x43, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x3B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x5F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x58, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x41, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x3A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x23, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x1C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3C, 0x05, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xFE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x1B, 0xE7, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xE0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x05, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xC6, 0xC2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xE6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xDE, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xC8, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xC0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0x5A, 0xD6, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0xB0, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x8C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x84, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x6E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x66, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x8A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x48, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x6C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x65, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x0D, 0x4E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x17, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xF6, 0xE2, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xA5, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xA4, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x86, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x69, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x68, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x85, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x4A, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x67, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xB3, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x45, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x95, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x62, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x77, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x59, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x26, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xEA, 0x70, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xCC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xE8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xCA, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xAC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x8E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x70, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x8D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x6F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x84, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x05,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -44187,14 +46097,125 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAD, 0xD4, 0x00, 0x00, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB,
-0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44,
-0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0xFF, 0xFF, 0xAD, 0xD4, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB,
+0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF,
+0xFF, 0xB9, 0xB0, 0x01, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43,
+0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43,
+0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x00, 0x0A, 0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
+0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* US/East-Indiana */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0x80, 0x00, 0x00, 0x00,
+0x9E, 0xA6, 0x2C, 0x80, 0x9F, 0xBA, 0xF9, 0x70, 0xA0, 0x86, 0x0E, 0x80, 0xA1, 0x9A, 0xDB, 0x70,
+0xCA, 0x57, 0x22, 0x80, 0xCA, 0xD8, 0x47, 0x70, 0xCB, 0x88, 0xFE, 0x80, 0xD2, 0x23, 0xF4, 0x70,
+0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x75, 0xF3, 0x00, 0xD4, 0x40, 0xEB, 0xF0, 0xD5, 0x55, 0xD5, 0x00,
+0xD6, 0x20, 0xCD, 0xF0, 0xD7, 0x35, 0xB7, 0x00, 0xD8, 0x00, 0xAF, 0xF0, 0xD9, 0x15, 0x99, 0x00,
+0xD9, 0xE0, 0x91, 0xF0, 0xDA, 0xFE, 0xB5, 0x80, 0xDB, 0xC0, 0x73, 0xF0, 0xDC, 0xDE, 0x97, 0x80,
+0xDD, 0xA9, 0x90, 0x70, 0xDE, 0xBE, 0x79, 0x80, 0xDF, 0x89, 0x72, 0x70, 0xE0, 0x9E, 0x5B, 0x80,
+0xE1, 0x69, 0x54, 0x70, 0xE2, 0x7E, 0x3D, 0x80, 0xE3, 0x49, 0x36, 0x70, 0xE4, 0x5E, 0x1F, 0x80,
+0xE8, 0xF2, 0x16, 0xF0, 0xEA, 0x07, 0x00, 0x00, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xA7, 0xFF, 0xE0,
+0x00, 0x97, 0xFE, 0xF0, 0x01, 0x87, 0xE1, 0xE0, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60,
+0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0,
+0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60,
+0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60,
+0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60,
+0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0,
+0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0,
+0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0,
+0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60,
+0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60,
+0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60,
+0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0,
+0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0,
+0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60,
+0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60,
+0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60,
+0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
+0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
+0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x3A, 0x00,
+0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
+0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
+0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
+0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05,
+0xFF, 0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0,
+0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF,
+0xB9, 0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44,
+0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53,
+0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E,
+0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Eastern */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -44277,257 +46298,152 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C,
0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53,
0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14,
-0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xF0, 0x90,
-0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x1E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x00, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xCD, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65, 0xE2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x83, 0xE9, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x6A, 0xAE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xA7, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x53, 0xCA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0x89, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x33, 0xAC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xA5, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x13, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xDE, 0x87, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xF3, 0x70, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBE, 0x69, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xD3, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x9E, 0x4B, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xB3, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x1B, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xC6, 0xB4, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x0D, 0x40, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x39, 0x60,
-0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xC6, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20, 0xBF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xA8, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0xA1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x8A, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0, 0x83, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x65, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57, 0x2E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37, 0x10, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0,
-0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0,
-0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70,
-0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xBA, 0x9E, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01,
-0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7,
-0xC0, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45,
-0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30,
-0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8,
-0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* US/East-Indiana */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0x80, 0x00, 0x00, 0x00,
-0x9E, 0xA6, 0x2C, 0x80, 0x9F, 0xBA, 0xF9, 0x70, 0xA0, 0x86, 0x0E, 0x80, 0xA1, 0x9A, 0xDB, 0x70,
-0xCA, 0x57, 0x22, 0x80, 0xCA, 0xD8, 0x47, 0x70, 0xCB, 0x88, 0xFE, 0x80, 0xD2, 0x23, 0xF4, 0x70,
-0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x75, 0xF3, 0x00, 0xD4, 0x40, 0xEB, 0xF0, 0xD5, 0x55, 0xD5, 0x00,
-0xD6, 0x20, 0xCD, 0xF0, 0xD7, 0x35, 0xB7, 0x00, 0xD8, 0x00, 0xAF, 0xF0, 0xD9, 0x15, 0x99, 0x00,
-0xD9, 0xE0, 0x91, 0xF0, 0xDA, 0xFE, 0xB5, 0x80, 0xDB, 0xC0, 0x73, 0xF0, 0xDC, 0xDE, 0x97, 0x80,
-0xDD, 0xA9, 0x90, 0x70, 0xDE, 0xBE, 0x79, 0x80, 0xDF, 0x89, 0x72, 0x70, 0xE0, 0x9E, 0x5B, 0x80,
-0xE1, 0x69, 0x54, 0x70, 0xE2, 0x7E, 0x3D, 0x80, 0xE3, 0x49, 0x36, 0x70, 0xE4, 0x5E, 0x1F, 0x80,
-0xE8, 0xF2, 0x16, 0xF0, 0xEA, 0x07, 0x00, 0x00, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xA7, 0xFF, 0xE0,
-0x00, 0x97, 0xFE, 0xF0, 0x01, 0x87, 0xE1, 0xE0, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60,
-0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0,
-0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60,
-0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60,
-0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60,
-0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0,
-0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0,
-0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0,
-0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60,
-0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60,
-0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60,
-0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0,
-0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0,
-0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60,
-0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60,
-0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60,
-0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03,
-0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF, 0xFF, 0xAF, 0x3A, 0x00,
-0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF, 0xFF, 0xB9,
-0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x14, 0xFF,
-0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54,
-0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x44, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54,
-0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E,
-0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0,
-0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA,
-0x57, 0x22, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x47, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB,
-0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2,
-0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xF3, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD4,
-0x40, 0xEB, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6,
-0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8,
-0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9,
-0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB,
-0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD,
-0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF,
-0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1,
-0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3,
-0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8,
-0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
-0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x44,
-0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45,
-0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47,
-0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49,
-0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B,
-0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D,
-0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F,
-0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51,
-0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53,
-0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54,
-0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56,
-0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58,
-0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A,
-0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C,
-0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E,
-0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,
-0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62,
-0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64,
-0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65,
-0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67,
-0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69,
-0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B,
-0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D,
-0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F,
-0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71,
-0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73,
-0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74,
-0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76,
-0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78,
-0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A,
-0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C,
-0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E,
-0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06,
-0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0xFF,
-0xFF, 0xAF, 0x3A, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
-0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
-0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x18, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
-0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
-0x00, 0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x00, 0x00, 0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32,
-0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01,
-0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xED, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xF0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x1E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xEB, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x00, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xCD, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0xE2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x83, 0xE9, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x6A, 0xAE, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x35, 0xA7, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA6, 0x53, 0xCA, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x15, 0x89, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA8, 0x33, 0xAC, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xFE, 0xA5, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAA, 0x13, 0x8E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xDE, 0x87, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAB, 0xF3, 0x70, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAC, 0xBE, 0x69, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAD, 0xD3, 0x52, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0x9E, 0x4B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xAF, 0xB3, 0x34, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x7E, 0x2D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB1, 0x9C, 0x51, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0x67, 0x4A, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB3, 0x7C, 0x33, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x47, 0x2C, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB5, 0x5C, 0x15, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB6, 0x27, 0x0E, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB7, 0x3B, 0xF7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x06, 0xF0, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xB9, 0x1B, 0xD9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xE6, 0xD2, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x04, 0xF5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xC6, 0xB4, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBC, 0xE4, 0xD7, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xAF, 0xD0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBE, 0xC4, 0xB9, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x8F, 0xB2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC0, 0xA4, 0x9B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x6F, 0x94, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC2, 0x84, 0x7D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x4F, 0x76, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC4, 0x64, 0x5F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC5, 0x2F, 0x58, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC6, 0x4D, 0x7C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x0F, 0x3A, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xC8, 0x2D, 0x5E, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xC8, 0xF8, 0x57, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCA, 0x0D, 0x40, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xD8, 0x39, 0x60, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xF0, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x60, 0xFB, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0x75, 0xE4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD4, 0x40, 0xDD, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xC6, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xBF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xA8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xA1, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x8A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x83, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xA7, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x65, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x89, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x82, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x6B, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x64, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x4D, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x46, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x2F, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x28, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x11, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x2E, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x2D, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x10, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE9, 0x16, 0xF2, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x06, 0xF1, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xF6, 0xD4, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xD3, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xB6, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xB5, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xD3, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xD2, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xB5, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xB4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0x97, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0x96, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x79, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0x78, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x5B, 0x60, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x5A, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x77, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x3C, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x59, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x58, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x3B, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x3A, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x1D, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xE1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x70, 0xFE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0xFD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xC2, 0x60, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xA4, 0x60, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0x94, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x86, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xA2, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x84, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x83, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x66, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x65, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x48, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x47, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x2A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x29, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x0C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x0B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x29, 0x60, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xED, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x0B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x0A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xED, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xEC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xCF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xCE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xB1, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0x93, 0x60, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xE2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xAF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xC4, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x91, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xA6, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x73, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xC3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x55, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xA5, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x37, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0x87, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x54, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x69, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x36, 0x60, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x4B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x67, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0xFA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x49, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xDC, 0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x2B, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xBE, 0x60, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xDA, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE6, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xD1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x9E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xAF, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x80, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x62, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x7F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x43, 0x60, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xA8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x5F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x8A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x41, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x6C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x23, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x89, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x40, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x6B, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x22, 0x60, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x4D, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x2F, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xE6, 0x60, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xC8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFB, 0xF3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xAA, 0x60, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xC6, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC4, 0xF1, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xA8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xD3, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x8A, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xB5, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x6C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x4E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xB4, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x6B, 0x60, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x4D, 0x60, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x2F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x11, 0x60, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x06, 0xF3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xD5, 0x60, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x3A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xD3, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x55, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xB5, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0x97, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xDF, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0x96, 0x60, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xC1, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x5A, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x85, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x3C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x67, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x49, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x00, 0x60, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02,
+0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0xFF, 0xFF, 0xBA, 0x9E, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0x4C,
+0x4D, 0x54, 0x00, 0x45, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45,
+0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x45, 0x53,
+0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
+0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Hawaii */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -44537,18 +46453,20 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xD5, 0x8D, 0x73, 0x48, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00, 0x00,
0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60,
0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xE0,
-0x70, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x05, 0x43, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x21,
-0x71, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x3D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x49, 0x38, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x8D, 0x73, 0x48, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00, 0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A,
-0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54,
-0x00, 0x48, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53,
-0x54, 0x31, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x74, 0xE0, 0x70, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF,
+0xBB, 0x05, 0x43, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x21, 0x71, 0x58, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x3D, 0xC8, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x49, 0x38, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD5, 0x8D, 0x73, 0x48, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0xFF, 0xFF, 0x6C, 0x02, 0x00,
+0x00, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x73,
+0x60, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x48, 0x53, 0x54, 0x31, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Indiana-Starke */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -44606,105 +46524,107 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0,
0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00,
0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x88,
-0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0x20,
-0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00,
-0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0xE0,
-0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0,
-0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9,
-0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89,
-0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69,
-0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49,
-0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x57,
-0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x37,
-0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2,
-0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD1,
-0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xD6,
-0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xBF,
-0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x9F,
-0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F,
-0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE1,
-0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x52, 0x75,
-0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xCF,
-0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xAE,
-0xCA, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0xFF,
-0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9, 0xB0, 0x00,
-0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43,
-0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A, 0x43, 0x53,
-0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x03, 0xFE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x2C, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBA, 0xF9, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x0E, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xDB, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x88, 0xFE, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x09, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD5, 0x55, 0xD5, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD6, 0x20, 0xCD, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x35, 0xB7, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x00, 0xAF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x15, 0x99, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD9, 0xE0, 0x91, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xB5, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x73, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0x97, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0x90, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x79, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x72, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x5B, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x54, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x3D, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x36, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x1F, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x57, 0x3C, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x3C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x37, 0x1E, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x1E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x16, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD1, 0xF8, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xE2, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xD6, 0xC4, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xC4, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0xBF, 0xE1, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x9F, 0xC3, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xC2, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0x87, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x67, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x49, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x49, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x2B, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xEF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x0C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x0B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xEE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xD0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xB2, 0x70, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0x94, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xB0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0x92, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x74, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x56, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x38, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x1A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x37, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, 0x08, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x19, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE1, 0xFB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD1, 0xFA, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xDD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xDC, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xBF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xA1, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xBD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xD3, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0x9F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xB5, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x81, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xD1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x63, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x76, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x51, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xB7, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x6D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x4F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x31, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0x97, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x4E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x79, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x5B, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x3D, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x75, 0xF4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xD6, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xB8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xD4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xB6, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0x98, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x7A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x5C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x79, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xA4, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x5B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x86, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x3D, 0x70, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x1F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x4A, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x2C, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xE3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xCF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xE1, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xC3, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xA5, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x87, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xED, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xA4, 0x70, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xCF, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x86, 0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xB1, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x68, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0x93, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x4A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x75, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x2C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x57, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x0E, 0x70, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x05, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x05, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0xAE, 0xCA, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00,
+0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x10, 0xFF, 0xFF, 0xB9,
+0xB0, 0x00, 0x14, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54,
+0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x45, 0x53, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0A,
+0x43, 0x53, 0x54, 0x36, 0x43, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Michigan */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -44758,6 +46678,7 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x10, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x14, 0x4C, 0x4D, 0x54, 0x00,
0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00,
0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x00,
@@ -44845,8 +46766,9 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00,
0x45, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x0A, 0x45, 0x53, 0x54, 0x35, 0x45, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C,
-0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Mountain */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -44904,106 +46826,108 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF,
0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10,
0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00,
-0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A,
-0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6,
-0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86,
-0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2, 0x65,
-0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x45,
-0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89,
-0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61,
-0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28,
-0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08,
-0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8,
-0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8,
-0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8,
-0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87,
-0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71,
-0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00, 0x05, 0x50,
-0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30,
-0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10,
-0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0,
-0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9,
-0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9,
-0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99,
-0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79,
-0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59,
-0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39,
-0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22,
-0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02,
-0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2,
-0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1,
-0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1,
-0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81,
-0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A,
-0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A,
-0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A,
-0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A,
-0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA,
-0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3,
-0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3,
-0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93,
-0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73,
-0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52,
-0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32,
-0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B,
-0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB,
-0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB,
-0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB,
-0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B,
-0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84,
-0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64,
-0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44,
-0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D,
-0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D,
-0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED,
-0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6,
-0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6,
-0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96,
-0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76,
-0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55,
-0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35,
-0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E,
-0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE,
-0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE,
-0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE,
-0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E,
-0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87,
-0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67,
-0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47,
-0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27,
-0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07,
-0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6,
-0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0,
-0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF,
-0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F,
-0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F,
-0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F,
-0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38,
-0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18,
-0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8,
-0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8,
-0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8,
-0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98,
-0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF, 0xFF, 0x9D,
-0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x10, 0x4C,
-0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D,
-0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x4D, 0x53,
-0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31,
-0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00,
-0x00,
+0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x0C, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x3A, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x1C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xE9, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA2, 0x65, 0xFE, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x84, 0x06, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x45, 0xE0, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x8F, 0xA6, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x0C, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x76, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0x94, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x58, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x76, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x75, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x58, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x57, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x3A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x87, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x1A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x19, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x50, 0xFC, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xDE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xB1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xA2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x82, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x45, 0x80, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x26, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x09, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x08, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xEB, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xCD, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x1D, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xAF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x22, 0x55, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xE1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xC3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xDF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xC1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xA3, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x85, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x52, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x67, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x34, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x84, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x16, 0x80, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x66, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x48, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xDA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xEE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x9B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x7D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0x92, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x5F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xC5, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x89, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x5C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x87, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x3E, 0x80, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x69, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x4B, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x2D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xE4, 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x0F, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x2C, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xE3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x0E, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xC5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xA7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xD2, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xD0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xB2, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x4B, 0x80, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x2D, 0x80, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x57, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xB2, 0x80, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xDD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0x94, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x3A, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x1C, 0x80, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x02, 0x01, 0x02, 0xFF, 0xFF, 0x9D, 0x94, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x04, 0xFF,
+0xFF, 0x9D, 0x90, 0x00, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x01,
+0x10, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54,
+0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A,
+0x4D, 0x53, 0x54, 0x37, 0x4D, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D,
+0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Pacific */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -45070,104 +46994,105 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x91, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08,
0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0xFE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x80, 0xAD, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBB, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x80, 0xAD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -45178,13 +47103,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x91, 0x26, 0x00, 0x00, 0xFF,
-0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
-0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50,
-0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0x91, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
+0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38,
+0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Pacific-New */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -45251,104 +47178,105 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x91, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08,
0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00,
0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0x00, 0x00,
-0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
-0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xD6, 0xFE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x80, 0xAD, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF,
-0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x0C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x71, 0x28, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x51, 0x0A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0xEC, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x09, 0x10, 0xCE, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x99, 0x91, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12, 0x79, 0x73, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x59, 0x55, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00, 0x16, 0x39, 0x37, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x22, 0x53, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x02, 0x35, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21, 0x81, 0xBD, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00, 0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00, 0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x29, 0x0A, 0x80, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x93, 0x42, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00, 0x32, 0x73, 0x24, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00, 0x34, 0x53, 0x06, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0xE8, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1C, 0x05, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0xA9, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x8B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0x6D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00, 0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x50, 0x96, 0x2E, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x52, 0x76, 0x10, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0xF2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x56, 0x35, 0xD4, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00, 0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x61, 0x87, 0x95, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x67, 0x77, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x65, 0x47, 0x59, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x67, 0x27, 0x3B, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x69, 0x07, 0x1D, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00, 0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00,
-0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x76, 0x38, 0xC0, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0xA2, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x79, 0xF8, 0x84, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00,
-0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02,
-0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xBB, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, 0x04, 0x1A, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0xA6, 0x48, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xBB, 0x15, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA0, 0x86, 0x2A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x9A, 0xF7, 0x90, 0xFF, 0xFF, 0xFF, 0xFF,
+0xCB, 0x89, 0x1A, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xD2, 0x23, 0xF4, 0x70, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD2, 0x61, 0x26, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xD6, 0xFE, 0x74, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xD8, 0x80, 0xAD, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFE, 0xD1, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDB, 0xC0, 0x90, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xDE, 0xB3, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDD, 0xA9, 0xAC, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xBE, 0x95, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xDF, 0x89, 0x8E, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x9E, 0x77, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE1, 0x69, 0x70, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE2, 0x7E, 0x59, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE3, 0x49, 0x52, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x5E, 0x3B, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE5, 0x29, 0x34, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xE6, 0x47, 0x58, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE7, 0x12, 0x51, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xE8, 0x27, 0x3A, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xE8, 0xF2, 0x33, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x07, 0x1C, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEA, 0xD2, 0x15, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xE6, 0xFE, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEC, 0xB1, 0xF7, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xC6, 0xE0, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xEE, 0x91, 0xD9, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xAF, 0xFC, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF0, 0x71, 0xBB, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8F, 0xDE, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF2, 0x7F, 0xC1, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF3, 0x6F, 0xC0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF4, 0x5F, 0xA3, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0x4F, 0xA2, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF6, 0x3F, 0x85, 0x90, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x2F, 0x84, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xF8, 0x28, 0xA2, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x0F, 0x66, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFA, 0x08, 0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF8, 0x83, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFB, 0xE8, 0x66, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xD8, 0x65, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFD, 0xC8, 0x48, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x88, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x03, 0x71, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x04, 0x61, 0x27, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x05, 0x51, 0x0A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x06, 0x41, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x07, 0x30, 0xEC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x07, 0x8D, 0x43, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x09, 0x10, 0xCE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x09, 0xAD, 0xBF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x0A, 0xF0, 0xB0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0B, 0xE0, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0C, 0xD9, 0xCD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xC0, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x0E, 0xB9, 0xAF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xA9, 0xAE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x10, 0x99, 0x91, 0x10, 0x00, 0x00, 0x00, 0x00, 0x11, 0x89, 0x90, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x12, 0x79, 0x73, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x14, 0x59, 0x55, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15, 0x49, 0x54, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x16, 0x39, 0x37, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, 0x29, 0x36, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x18, 0x22, 0x53, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0x09, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x02, 0x35, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xF2, 0x34, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1B, 0xE2, 0x17, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xD2, 0x16, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1D, 0xC1, 0xF9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xB1, 0xF8, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x1F, 0xA1, 0xDB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x20, 0x76, 0x2B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x21, 0x81, 0xBD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x22, 0x56, 0x0D, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x23, 0x6A, 0xDA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x35, 0xEF, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x25, 0x4A, 0xBC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x15, 0xD1, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x27, 0x2A, 0x9E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0xFE, 0xED, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x0A, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x29, 0xDE, 0xCF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xEA, 0x62, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xBE, 0xB1, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xD3, 0x7E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x9E, 0x93, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0xB3, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x7E, 0x75, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x93, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x67, 0x92, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x73, 0x24, 0x90, 0x00, 0x00, 0x00, 0x00, 0x33, 0x47, 0x74, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x53, 0x06, 0x90, 0x00, 0x00, 0x00, 0x00, 0x35, 0x27, 0x56, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0xE8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x37, 0x07, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1C, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0xE7, 0x1A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0xE7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xC6, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0xC9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xB0, 0x18, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0xAB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x8F, 0xFA, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x8D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x6F, 0xDC, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0xA9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0xBE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x64, 0x8B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x2F, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x44, 0x6D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0xF3, 0xD3, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x2D, 0x8A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xD3, 0xB5, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x0D, 0x6C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xB3, 0x97, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xED, 0x4E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x9C, 0xB3, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xD6, 0x6A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x7C, 0x95, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x4E, 0xB6, 0x4C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x5C, 0x77, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x50, 0x96, 0x2E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x3C, 0x59, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x76, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x1C, 0x3B, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x55, 0xF2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0xFC, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x56, 0x35, 0xD4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xE5, 0x3A, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x58, 0x1E, 0xF1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC5, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x59, 0xFE, 0xD3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA4, 0xFE, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5B, 0xDE, 0xB5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5D, 0xBE, 0x97, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x64, 0xC2, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x5F, 0x9E, 0x79, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x4D, 0xDE, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x61, 0x87, 0x95, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x2D, 0xC0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x63, 0x67, 0x77, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0D, 0xA2, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x65, 0x47, 0x59, 0x90, 0x00, 0x00, 0x00, 0x00, 0x65, 0xED, 0x84, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x67, 0x27, 0x3B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xCD, 0x66, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x69, 0x07, 0x1D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xAD, 0x48, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x6A, 0xE6, 0xFF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x96, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6C, 0xD0, 0x1C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x76, 0x47, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x6E, 0xAF, 0xFE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x56, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x70, 0x8F, 0xE0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x36, 0x0B, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x72, 0x6F, 0xC2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x15, 0xED, 0x20, 0x00, 0x00, 0x00, 0x00,
+0x74, 0x4F, 0xA4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0xFF, 0x09, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x76, 0x38, 0xC0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xDE, 0xEB, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x78, 0x18, 0xA2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xBE, 0xCD, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x79, 0xF8, 0x84, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x9E, 0xAF, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7B, 0xD8, 0x66, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7E, 0x91, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7D, 0xB8, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x5E, 0x73, 0xA0, 0x00, 0x00, 0x00, 0x00,
+0x7F, 0x98, 0x2A, 0x90, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
@@ -45359,13 +47287,15 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01,
-0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x91, 0x26, 0x00, 0x00, 0xFF,
-0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01,
-0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x50,
-0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38, 0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33,
-0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31, 0x2E, 0x30, 0x0A, 0x00, 0x89, 0x54,
-0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF,
+0xFF, 0x91, 0x26, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
+0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x10, 0x4C, 0x4D, 0x54,
+0x00, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x50, 0x53, 0x54, 0x38,
+0x50, 0x44, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x32, 0x2E, 0x30, 0x2C, 0x4D, 0x31, 0x31, 0x2E, 0x31,
+0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* US/Samoa */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -45375,28 +47305,135 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50,
0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D,
0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05,
-0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF,
-0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03,
-0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF, 0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65,
-0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C,
-0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42, 0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xC8, 0xE4, 0x88, 0xFF, 0xFF, 0xFF, 0xFF,
+0x91, 0x05, 0xFB, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xD2, 0x55, 0xB0, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0x2B, 0x30, 0x30, 0x00, 0x01, 0x02, 0x03, 0x04, 0x00, 0x00, 0xB1, 0x78, 0x00, 0x00, 0xFF,
+0xFF, 0x5F, 0xF8, 0x00, 0x00, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00,
+0x08, 0xFF, 0xFF, 0x65, 0x50, 0x00, 0x0C, 0x4C, 0x4D, 0x54, 0x00, 0x4E, 0x53, 0x54, 0x00, 0x42,
+0x53, 0x54, 0x00, 0x53, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x0A, 0x53, 0x53, 0x54, 0x31, 0x31, 0x0A,
+#endif
0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* UTC */
0x50, 0x48, 0x50, 0x32, 0x01, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
+
+/* W-SU */
+0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0x80, 0x00, 0x00, 0x00,
+0x9B, 0x5F, 0x1E, 0xC7, 0x9D, 0x3E, 0xF2, 0x79, 0x9E, 0x2A, 0xEE, 0xF9, 0x9E, 0xF7, 0x39, 0x69,
+0x9F, 0x84, 0x57, 0xF9, 0xA0, 0xD8, 0x6C, 0xE9, 0xA1, 0x00, 0x16, 0x09, 0xA1, 0x3C, 0xA6, 0x40,
+0xA4, 0x10, 0x6D, 0xC0, 0xA4, 0x3D, 0x32, 0xB0, 0xA5, 0x15, 0x68, 0xB0, 0xA5, 0x3D, 0x03, 0xC0,
+0xA7, 0x1E, 0x45, 0x50, 0xB5, 0xA4, 0x19, 0x60, 0x15, 0x27, 0xA7, 0xD0, 0x16, 0x18, 0xDC, 0x40,
+0x17, 0x08, 0xDB, 0x50, 0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0, 0x19, 0xDB, 0x43, 0x40,
+0x1A, 0xCC, 0x93, 0xD0, 0x1B, 0xBC, 0xA0, 0xF0, 0x1C, 0xAC, 0x91, 0xF0, 0x1D, 0x9C, 0x82, 0xF0,
+0x1E, 0x8C, 0x73, 0xF0, 0x1F, 0x7C, 0x64, 0xF0, 0x20, 0x6C, 0x55, 0xF0, 0x21, 0x5C, 0x46, 0xF0,
+0x22, 0x4C, 0x37, 0xF0, 0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0,
+0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70, 0x27, 0xF5, 0x18, 0x70, 0x28, 0xE5, 0x17, 0x80,
+0x29, 0x78, 0xBF, 0x80, 0x29, 0xD4, 0xD0, 0x40, 0x2A, 0xC4, 0xB3, 0x30, 0x2B, 0xB4, 0xDC, 0x70,
+0x2C, 0xA4, 0xCD, 0x70, 0x2D, 0x94, 0xBE, 0x70, 0x2E, 0x84, 0xAF, 0x70, 0x2F, 0x74, 0xA0, 0x70,
+0x30, 0x64, 0x91, 0x70, 0x31, 0x5D, 0xBC, 0xF0, 0x32, 0x72, 0x97, 0xF0, 0x33, 0x3D, 0x9E, 0xF0,
+0x34, 0x52, 0x79, 0xF0, 0x35, 0x1D, 0x80, 0xF0, 0x36, 0x32, 0x5B, 0xF0, 0x36, 0xFD, 0x62, 0xF0,
+0x38, 0x1B, 0x78, 0x70, 0x38, 0xDD, 0x44, 0xF0, 0x39, 0xFB, 0x5A, 0x70, 0x3A, 0xBD, 0x26, 0xF0,
+0x3B, 0xDB, 0x3C, 0x70, 0x3C, 0xA6, 0x43, 0x70, 0x3D, 0xBB, 0x1E, 0x70, 0x3E, 0x86, 0x25, 0x70,
+0x3F, 0x9B, 0x00, 0x70, 0x40, 0x66, 0x07, 0x70, 0x41, 0x84, 0x1C, 0xF0, 0x42, 0x45, 0xE9, 0x70,
+0x43, 0x63, 0xFE, 0xF0, 0x44, 0x25, 0xCB, 0x70, 0x45, 0x43, 0xE0, 0xF0, 0x46, 0x05, 0xAD, 0x70,
+0x47, 0x23, 0xC2, 0xF0, 0x47, 0xEE, 0xC9, 0xF0, 0x49, 0x03, 0xA4, 0xF0, 0x49, 0xCE, 0xAB, 0xF0,
+0x4A, 0xE3, 0x86, 0xF0, 0x4B, 0xAE, 0x8D, 0xF0, 0x4C, 0xCC, 0xA3, 0x70, 0x4D, 0x8E, 0x6F, 0xF0,
+0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x04, 0x02, 0x04, 0x06, 0x05, 0x06, 0x07, 0x06,
+0x05, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x09, 0x06, 0x05, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0D, 0x09, 0x00, 0x00, 0x23, 0x39, 0x00, 0x00, 0x00, 0x00, 0x23, 0x39, 0x00, 0x04, 0x00, 0x00,
+0x31, 0x87, 0x01, 0x08, 0x00, 0x00, 0x23, 0x77, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x97, 0x01, 0x0C,
+0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x46, 0x50,
+0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00,
+0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D,
+0x00, 0x00, 0x38, 0x40, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30,
+0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44,
+0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00, 0x45,
+0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0xB6, 0xC0, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9B, 0x5F, 0x1E, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0x3E, 0xF2, 0x79, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9E, 0x2A, 0xEE, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xF7, 0x39, 0x69, 0xFF, 0xFF, 0xFF, 0xFF,
+0x9F, 0x84, 0x57, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xA0, 0xD8, 0x6C, 0xE9, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA1, 0x00, 0x16, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x3C, 0xA6, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA4, 0x10, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x3D, 0x32, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA5, 0x15, 0x68, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x3D, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
+0xA7, 0x1E, 0x45, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0xA4, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00, 0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x29, 0x78, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00,
+0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00,
+0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00,
+0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x03, 0x02, 0x03, 0x04, 0x02, 0x04, 0x06, 0x05, 0x06, 0x07,
+0x06, 0x05, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09,
+0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x09, 0x06, 0x05, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
+0x09, 0x0D, 0x09, 0x00, 0x00, 0x23, 0x39, 0x00, 0x00, 0x00, 0x00, 0x23, 0x39, 0x00, 0x04, 0x00,
+0x00, 0x31, 0x87, 0x01, 0x08, 0x00, 0x00, 0x23, 0x77, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x97, 0x01,
+0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x46,
+0x50, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00,
+0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00,
+0x1D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A,
+0x30, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D,
+0x44, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00,
+0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* WET */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -45441,191 +47478,98 @@ const unsigned char timelib_timezone_db_data_builtin[696817] = {
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
0x0E, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57,
-0x45, 0x54, 0x00, 0x01, 0x01, 0x01, 0x01, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x02, 0x00,
-0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E,
-0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00, 0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12,
-0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00, 0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14,
-0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16,
-0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17,
-0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19,
-0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B,
-0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D,
-0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F,
-0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21,
-0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23,
-0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25,
-0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27,
-0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28,
-0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00, 0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A,
-0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C,
-0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E,
-0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30,
-0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32,
-0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34,
-0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00, 0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36,
-0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38,
-0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00, 0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39,
-0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B,
-0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D,
-0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F,
-0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41,
-0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43,
-0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45,
-0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47,
-0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00, 0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49,
-0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A,
-0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C,
-0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E,
-0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50,
-0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00, 0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52,
-0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00, 0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54,
-0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00, 0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56,
-0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58,
-0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59,
-0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B,
-0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D,
-0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F,
-0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61,
-0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63,
-0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65,
-0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00, 0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67,
-0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68,
-0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00, 0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A,
-0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C,
-0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E,
-0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70,
-0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00, 0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72,
-0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00, 0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74,
-0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76,
-0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00, 0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78,
-0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79,
-0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B,
-0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D,
-0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F,
-0x8E, 0x7F, 0x90, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x0E,
-0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45,
-0x54, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A, 0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C,
-0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F, 0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30,
-0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
-
-/* W-SU */
-0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x26, 0x80, 0x00, 0x00, 0x00,
-0x9B, 0x5F, 0x1E, 0xC7, 0x9D, 0x3E, 0xF2, 0x79, 0x9E, 0x2A, 0xEE, 0xF9, 0x9E, 0xF7, 0x39, 0x69,
-0x9F, 0x84, 0x57, 0xF9, 0xA0, 0xD8, 0x6C, 0xE9, 0xA1, 0x00, 0x16, 0x09, 0xA1, 0x3C, 0xA6, 0x40,
-0xA4, 0x10, 0x6D, 0xC0, 0xA4, 0x3D, 0x32, 0xB0, 0xA5, 0x15, 0x68, 0xB0, 0xA5, 0x3D, 0x03, 0xC0,
-0xA7, 0x1E, 0x45, 0x50, 0xB5, 0xA4, 0x19, 0x60, 0x15, 0x27, 0xA7, 0xD0, 0x16, 0x18, 0xDC, 0x40,
-0x17, 0x08, 0xDB, 0x50, 0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0, 0x19, 0xDB, 0x43, 0x40,
-0x1A, 0xCC, 0x93, 0xD0, 0x1B, 0xBC, 0xA0, 0xF0, 0x1C, 0xAC, 0x91, 0xF0, 0x1D, 0x9C, 0x82, 0xF0,
-0x1E, 0x8C, 0x73, 0xF0, 0x1F, 0x7C, 0x64, 0xF0, 0x20, 0x6C, 0x55, 0xF0, 0x21, 0x5C, 0x46, 0xF0,
-0x22, 0x4C, 0x37, 0xF0, 0x23, 0x3C, 0x28, 0xF0, 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0,
-0x26, 0x0B, 0xFB, 0xF0, 0x27, 0x05, 0x27, 0x70, 0x27, 0xF5, 0x18, 0x70, 0x28, 0xE5, 0x17, 0x80,
-0x29, 0x78, 0xBF, 0x80, 0x29, 0xD4, 0xD0, 0x40, 0x2A, 0xC4, 0xB3, 0x30, 0x2B, 0xB4, 0xDC, 0x70,
-0x2C, 0xA4, 0xCD, 0x70, 0x2D, 0x94, 0xBE, 0x70, 0x2E, 0x84, 0xAF, 0x70, 0x2F, 0x74, 0xA0, 0x70,
-0x30, 0x64, 0x91, 0x70, 0x31, 0x5D, 0xBC, 0xF0, 0x32, 0x72, 0x97, 0xF0, 0x33, 0x3D, 0x9E, 0xF0,
-0x34, 0x52, 0x79, 0xF0, 0x35, 0x1D, 0x80, 0xF0, 0x36, 0x32, 0x5B, 0xF0, 0x36, 0xFD, 0x62, 0xF0,
-0x38, 0x1B, 0x78, 0x70, 0x38, 0xDD, 0x44, 0xF0, 0x39, 0xFB, 0x5A, 0x70, 0x3A, 0xBD, 0x26, 0xF0,
-0x3B, 0xDB, 0x3C, 0x70, 0x3C, 0xA6, 0x43, 0x70, 0x3D, 0xBB, 0x1E, 0x70, 0x3E, 0x86, 0x25, 0x70,
-0x3F, 0x9B, 0x00, 0x70, 0x40, 0x66, 0x07, 0x70, 0x41, 0x84, 0x1C, 0xF0, 0x42, 0x45, 0xE9, 0x70,
-0x43, 0x63, 0xFE, 0xF0, 0x44, 0x25, 0xCB, 0x70, 0x45, 0x43, 0xE0, 0xF0, 0x46, 0x05, 0xAD, 0x70,
-0x47, 0x23, 0xC2, 0xF0, 0x47, 0xEE, 0xC9, 0xF0, 0x49, 0x03, 0xA4, 0xF0, 0x49, 0xCE, 0xAB, 0xF0,
-0x4A, 0xE3, 0x86, 0xF0, 0x4B, 0xAE, 0x8D, 0xF0, 0x4C, 0xCC, 0xA3, 0x70, 0x4D, 0x8E, 0x6F, 0xF0,
-0x54, 0x4C, 0x1D, 0x60, 0x01, 0x03, 0x02, 0x03, 0x04, 0x02, 0x04, 0x06, 0x05, 0x06, 0x07, 0x06,
-0x05, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0B, 0x0C, 0x09, 0x06, 0x05, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0D, 0x09, 0x00, 0x00, 0x23, 0x39, 0x00, 0x00, 0x00, 0x00, 0x23, 0x39, 0x00, 0x04, 0x00, 0x00,
-0x31, 0x87, 0x01, 0x08, 0x00, 0x00, 0x23, 0x77, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x97, 0x01, 0x0C,
-0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x46, 0x50,
-0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00,
-0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D,
-0x00, 0x00, 0x38, 0x40, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30,
-0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4D, 0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44,
-0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00, 0x45,
-0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x10,
-0x00, 0x00, 0x00, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
-0x56, 0xB6, 0xC0, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, 0x9B, 0x5F, 0x1E, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9D, 0x3E, 0xF2, 0x79, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0x2A, 0xEE, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF,
-0x9E, 0xF7, 0x39, 0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x84, 0x57, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA0, 0xD8, 0x6C, 0xE9, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0x00, 0x16, 0x09, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA1, 0x3C, 0xA6, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xA4, 0x10, 0x6D, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA4, 0x3D, 0x32, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA5, 0x15, 0x68, 0xB0, 0xFF, 0xFF, 0xFF, 0xFF,
-0xA5, 0x3D, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x1E, 0x45, 0x50, 0xFF, 0xFF, 0xFF, 0xFF,
-0xB5, 0xA4, 0x19, 0x60, 0x00, 0x00, 0x00, 0x00, 0x15, 0x27, 0xA7, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x16, 0x18, 0xDC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x17, 0x08, 0xDB, 0x50, 0x00, 0x00, 0x00, 0x00,
-0x17, 0xFA, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x18, 0xEA, 0x0E, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x19, 0xDB, 0x43, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1A, 0xCC, 0x93, 0xD0, 0x00, 0x00, 0x00, 0x00,
-0x1B, 0xBC, 0xA0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xAC, 0x91, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1D, 0x9C, 0x82, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x8C, 0x73, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x1F, 0x7C, 0x64, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x6C, 0x55, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x21, 0x5C, 0x46, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x22, 0x4C, 0x37, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x23, 0x3C, 0x28, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2C, 0x19, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x25, 0x1C, 0x0A, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0B, 0xFB, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x27, 0x05, 0x27, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, 0xF5, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x28, 0xE5, 0x17, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x78, 0xBF, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x29, 0xD4, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC4, 0xB3, 0x30, 0x00, 0x00, 0x00, 0x00,
-0x2B, 0xB4, 0xDC, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xCD, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2D, 0x94, 0xBE, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xAF, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x2F, 0x74, 0xA0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0x91, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x31, 0x5D, 0xBC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0x97, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x33, 0x3D, 0x9E, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x79, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x35, 0x1D, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x5B, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x36, 0xFD, 0x62, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x38, 0xDD, 0x44, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x5A, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x3A, 0xBD, 0x26, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x3C, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x3C, 0xA6, 0x43, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x1E, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x3E, 0x86, 0x25, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x40, 0x66, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x1C, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x42, 0x45, 0xE9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x63, 0xFE, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x44, 0x25, 0xCB, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xE0, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x46, 0x05, 0xAD, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xC2, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x47, 0xEE, 0xC9, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xA4, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x49, 0xCE, 0xAB, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x00,
-0x4B, 0xAE, 0x8D, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xA3, 0x70, 0x00, 0x00, 0x00, 0x00,
-0x4D, 0x8E, 0x6F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x1D, 0x60, 0x00, 0x01, 0x03, 0x02,
-0x03, 0x04, 0x02, 0x04, 0x06, 0x05, 0x06, 0x07, 0x06, 0x05, 0x08, 0x05, 0x06, 0x05, 0x06, 0x05,
-0x06, 0x05, 0x06, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09,
-0x0B, 0x0C, 0x09, 0x06, 0x05, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A,
-0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0D, 0x09, 0x00, 0x00, 0x23, 0x39, 0x00,
-0x00, 0x00, 0x00, 0x23, 0x39, 0x00, 0x04, 0x00, 0x00, 0x31, 0x87, 0x01, 0x08, 0x00, 0x00, 0x23,
-0x77, 0x00, 0x04, 0x00, 0x00, 0x3F, 0x97, 0x01, 0x0C, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x46, 0x50, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00,
-0x1D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A,
-0x30, 0x01, 0x21, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x1D, 0x00, 0x00, 0x38, 0x40, 0x00, 0x11, 0x00,
-0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x11, 0x4C, 0x4D, 0x54, 0x00, 0x4D,
-0x4D, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x44, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00,
-0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4D, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x0A, 0x4D, 0x53, 0x4B, 0x2D, 0x33, 0x0A, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80,
-0x00, 0x00, 0x00, 0x00,
+0x45, 0x54, 0x00, 0x01, 0x01, 0x01, 0x01,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
+0x0D, 0xA4, 0x63, 0x90, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x8B, 0x1A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x84, 0x45, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x36, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x11, 0x64, 0x27, 0x90, 0x00, 0x00, 0x00, 0x00, 0x12, 0x54, 0x18, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x13, 0x4D, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x33, 0xFA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x15, 0x23, 0xEB, 0x90, 0x00, 0x00, 0x00, 0x00, 0x16, 0x13, 0xDC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x17, 0x03, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x17, 0xF3, 0xBE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x18, 0xE3, 0xAF, 0x90, 0x00, 0x00, 0x00, 0x00, 0x19, 0xD3, 0xA0, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x1A, 0xC3, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xBC, 0xBD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1C, 0xAC, 0xAE, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x9C, 0x9F, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x1E, 0x8C, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7C, 0x81, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x20, 0x6C, 0x72, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x5C, 0x63, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x22, 0x4C, 0x54, 0x10, 0x00, 0x00, 0x00, 0x00, 0x23, 0x3C, 0x45, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x24, 0x2C, 0x36, 0x10, 0x00, 0x00, 0x00, 0x00, 0x25, 0x1C, 0x27, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x26, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x27, 0x05, 0x43, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x27, 0xF5, 0x34, 0x90, 0x00, 0x00, 0x00, 0x00, 0x28, 0xE5, 0x25, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x29, 0xD5, 0x16, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xC5, 0x07, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2B, 0xB4, 0xF8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xA4, 0xE9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2D, 0x94, 0xDA, 0x90, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x84, 0xCB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x2F, 0x74, 0xBC, 0x90, 0x00, 0x00, 0x00, 0x00, 0x30, 0x64, 0xAD, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x31, 0x5D, 0xD9, 0x10, 0x00, 0x00, 0x00, 0x00, 0x32, 0x72, 0xB4, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x33, 0x3D, 0xBB, 0x10, 0x00, 0x00, 0x00, 0x00, 0x34, 0x52, 0x96, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x35, 0x1D, 0x9D, 0x10, 0x00, 0x00, 0x00, 0x00, 0x36, 0x32, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x36, 0xFD, 0x7F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1B, 0x94, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x38, 0xDD, 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x39, 0xFB, 0x76, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3A, 0xBD, 0x43, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3B, 0xDB, 0x58, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3C, 0xA6, 0x5F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3D, 0xBB, 0x3A, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x86, 0x41, 0x90, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x9B, 0x1C, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x40, 0x66, 0x23, 0x90, 0x00, 0x00, 0x00, 0x00, 0x41, 0x84, 0x39, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x42, 0x46, 0x05, 0x90, 0x00, 0x00, 0x00, 0x00, 0x43, 0x64, 0x1B, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x44, 0x25, 0xE7, 0x90, 0x00, 0x00, 0x00, 0x00, 0x45, 0x43, 0xFD, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x46, 0x05, 0xC9, 0x90, 0x00, 0x00, 0x00, 0x00, 0x47, 0x23, 0xDF, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x47, 0xEE, 0xE6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x49, 0x03, 0xC1, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x49, 0xCE, 0xC8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4A, 0xE3, 0xA3, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x4B, 0xAE, 0xAA, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4C, 0xCC, 0xBF, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4D, 0x8E, 0x8C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x4E, 0xAC, 0xA1, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x4F, 0x6E, 0x6E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x50, 0x8C, 0x83, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x51, 0x57, 0x8A, 0x90, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6C, 0x65, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x53, 0x37, 0x6C, 0x90, 0x00, 0x00, 0x00, 0x00, 0x54, 0x4C, 0x47, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x55, 0x17, 0x4E, 0x90, 0x00, 0x00, 0x00, 0x00, 0x56, 0x2C, 0x29, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x56, 0xF7, 0x30, 0x90, 0x00, 0x00, 0x00, 0x00, 0x58, 0x15, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x58, 0xD7, 0x12, 0x90, 0x00, 0x00, 0x00, 0x00, 0x59, 0xF5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5A, 0xB6, 0xF4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x5B, 0xD5, 0x0A, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5C, 0xA0, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xB4, 0xEC, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x5E, 0x7F, 0xF3, 0x10, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x94, 0xCE, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x60, 0x5F, 0xD5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x61, 0x7D, 0xEA, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x62, 0x3F, 0xB7, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5D, 0xCC, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x64, 0x1F, 0x99, 0x10, 0x00, 0x00, 0x00, 0x00, 0x65, 0x3D, 0xAE, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x66, 0x08, 0xB5, 0x90, 0x00, 0x00, 0x00, 0x00, 0x67, 0x1D, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x67, 0xE8, 0x97, 0x90, 0x00, 0x00, 0x00, 0x00, 0x68, 0xFD, 0x72, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x69, 0xC8, 0x79, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xDD, 0x54, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x6B, 0xA8, 0x5B, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6C, 0xC6, 0x71, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6D, 0x88, 0x3D, 0x90, 0x00, 0x00, 0x00, 0x00, 0x6E, 0xA6, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x6F, 0x68, 0x1F, 0x90, 0x00, 0x00, 0x00, 0x00, 0x70, 0x86, 0x35, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x71, 0x51, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x72, 0x66, 0x17, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x73, 0x31, 0x1E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x74, 0x45, 0xF9, 0x10, 0x00, 0x00, 0x00, 0x00,
+0x75, 0x11, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x76, 0x2F, 0x15, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x76, 0xF0, 0xE2, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0E, 0xF7, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x78, 0xD0, 0xC4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x79, 0xEE, 0xD9, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7A, 0xB0, 0xA6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCE, 0xBB, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7C, 0x99, 0xC2, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7D, 0xAE, 0x9D, 0x90, 0x00, 0x00, 0x00, 0x00,
+0x7E, 0x79, 0xA4, 0x90, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x8E, 0x7F, 0x90, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x05, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0A,
+0x57, 0x45, 0x54, 0x30, 0x57, 0x45, 0x53, 0x54, 0x2C, 0x4D, 0x33, 0x2E, 0x35, 0x2E, 0x30, 0x2F,
+0x31, 0x2C, 0x4D, 0x31, 0x30, 0x2E, 0x35, 0x2E, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,
/* Zulu */
0x50, 0x48, 0x50, 0x32, 0x00, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A, 0x00,
-0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,};
-
-const timelib_tzdb timezonedb_builtin = { "2015.5", 583, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00,
+#ifdef TIMELIB_SUPPORTS_V2DATA
+0x54, 0x5A, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xF8, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00,
+0x00, 0x0A, 0x55, 0x54, 0x43, 0x30, 0x0A,
+#endif
+0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00,};
+
+const timelib_tzdb timezonedb_builtin = { "2016.3", 587, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
diff --git a/ext/date/lib/timezonemap.h b/ext/date/lib/timezonemap.h
index 9acb165d31..41471909ac 100644
--- a/ext/date/lib/timezonemap.h
+++ b/ext/date/lib/timezonemap.h
@@ -23,9 +23,6 @@
{ "acwst", 0, 31500, "Australia/Eucla" },
{ "addt", 1, -7200, "America/Goose_Bay" },
{ "addt", 1, -7200, "America/Pangnirtung" },
- { "admt", 0, 9320, "Africa/Addis_Ababa" },
- { "admt", 0, 9320, "Africa/Asmara" },
- { "admt", 0, 9320, "Africa/Asmera" },
{ "adt", 1, -10800, "America/Halifax" },
{ "adt", 1, -10800, "America/Barbados" },
{ "adt", 1, -10800, "America/Blanc-Sablon" },
@@ -124,7 +121,6 @@
{ "ant", 0, -16200, "America/Aruba" },
{ "ant", 0, -16200, "America/Kralendijk" },
{ "ant", 0, -16200, "America/Lower_Princes" },
- { "aot", 0, 3124, "Africa/Luanda" },
{ "apt", 1, -10800, "America/Halifax" },
{ "apt", 1, -10800, "America/Blanc-Sablon" },
{ "apt", 1, -10800, "America/Glace_Bay" },
@@ -236,6 +232,7 @@
{ "ast", 0, -14400, "America/Dominica" },
{ "ast", 0, -14400, "America/Glace_Bay" },
{ "ast", 0, -14400, "America/Goose_Bay" },
+ { "ast", 0, -14400, "America/Grand_Turk" },
{ "ast", 0, -14400, "America/Grenada" },
{ "ast", 0, -14400, "America/Guadeloupe" },
{ "ast", 0, -14400, "America/Halifax" },
@@ -305,16 +302,34 @@
{ "bdt", 1, -36000, "America/Nome" },
{ "bdt", 0, 21600, "Asia/Dhaka" },
{ "beat", 0, 9000, "Africa/Mogadishu" },
+ { "beat", 0, 9000, "Africa/Addis_Ababa" },
+ { "beat", 0, 9000, "Africa/Asmara" },
+ { "beat", 0, 9000, "Africa/Asmera" },
+ { "beat", 0, 9000, "Africa/Dar_es_Salaam" },
+ { "beat", 0, 9000, "Africa/Djibouti" },
{ "beat", 0, 9000, "Africa/Kampala" },
{ "beat", 0, 9000, "Africa/Nairobi" },
+ { "beat", 0, 9000, "Indian/Antananarivo" },
+ { "beat", 0, 9000, "Indian/Comoro" },
+ { "beat", 0, 9000, "Indian/Mayotte" },
{ "beaut", 0, 9900, "Africa/Nairobi" },
+ { "beaut", 0, 9900, "Africa/Addis_Ababa" },
+ { "beaut", 0, 9900, "Africa/Asmara" },
+ { "beaut", 0, 9900, "Africa/Asmera" },
{ "beaut", 0, 9900, "Africa/Dar_es_Salaam" },
+ { "beaut", 0, 9900, "Africa/Djibouti" },
{ "beaut", 0, 9900, "Africa/Kampala" },
+ { "beaut", 0, 9900, "Africa/Mogadishu" },
+ { "beaut", 0, 9900, "Indian/Antananarivo" },
+ { "beaut", 0, 9900, "Indian/Comoro" },
+ { "beaut", 0, 9900, "Indian/Mayotte" },
{ "bmt", 0, -14309, "America/Barbados" },
{ "bmt", 0, 6264, "Europe/Tiraspol" },
{ "bmt", 0, -17776, "America/Bogota" },
{ "bmt", 0, 10656, "Asia/Baghdad" },
{ "bmt", 0, 24124, "Asia/Bangkok" },
+ { "bmt", 0, 24124, "Asia/Phnom_Penh" },
+ { "bmt", 0, 24124, "Asia/Vientiane" },
{ "bmt", 0, 25632, "Asia/Jakarta" },
{ "bmt", 0, 6264, "Europe/Bucharest" },
{ "bmt", 0, 6264, "Europe/Chisinau" },
@@ -362,6 +377,7 @@
{ "bst", 1, 3600, "Europe/Isle_of_Man" },
{ "bst", 1, 3600, "Europe/Jersey" },
{ "bst", 1, 3600, "GB" },
+ { "bst", 0, 39600, "Pacific/Bougainville" },
{ "btt", 0, 21600, "Asia/Thimbu" },
{ "btt", 0, 21600, "Asia/Thimphu" },
{ "burt", 0, 23400, "Asia/Kolkata" },
@@ -372,7 +388,6 @@
{ "cant", 0, -3600, "Atlantic/Canary" },
{ "capt", 1, -32400, "America/Anchorage" },
{ "cast", 0, 34200, "Australia/Adelaide" },
- { "cast", 1, 10800, "Africa/Gaborone" },
{ "cast", 1, 10800, "Africa/Juba" },
{ "cast", 1, 10800, "Africa/Khartoum" },
{ "cast", 0, 39600, "Antarctica/Casey" },
@@ -445,7 +460,6 @@
{ "cdt", 1, 32400, "PRC" },
{ "cdt", 1, 32400, "ROC" },
{ "cemt", 1, 10800, "Europe/Berlin" },
- { "cemt", 1, 10800, "CET" },
{ "cest", 1, 7200, "Europe/Berlin" },
{ "cest", 1, 10800, "Europe/Kaliningrad" },
{ "cest", 1, 7200, "Africa/Algiers" },
@@ -455,7 +469,6 @@
{ "cest", 1, 7200, "Antarctica/Troll" },
{ "cest", 1, 7200, "Arctic/Longyearbyen" },
{ "cest", 1, 7200, "Atlantic/Jan_Mayen" },
- { "cest", 1, 7200, "CET" },
{ "cest", 1, 7200, "Europe/Amsterdam" },
{ "cest", 1, 7200, "Europe/Andorra" },
{ "cest", 1, 7200, "Europe/Athens" },
@@ -500,7 +513,6 @@
{ "cest", 1, 7200, "Europe/Zagreb" },
{ "cest", 1, 7200, "Europe/Zaporozhye" },
{ "cest", 1, 7200, "Europe/Zurich" },
- { "cest", 1, 7200, "WET" },
{ "cet", 0, 3600, "Europe/Berlin" },
{ "cet", 0, 7200, "Europe/Kaliningrad" },
{ "cet", 0, 3600, "Africa/Algiers" },
@@ -510,7 +522,6 @@
{ "cet", 0, 3600, "Africa/Tunis" },
{ "cet", 0, 3600, "Arctic/Longyearbyen" },
{ "cet", 0, 3600, "Atlantic/Jan_Mayen" },
- { "cet", 0, 3600, "CET" },
{ "cet", 0, 3600, "Europe/Amsterdam" },
{ "cet", 0, 3600, "Europe/Andorra" },
{ "cet", 0, 3600, "Europe/Athens" },
@@ -555,7 +566,6 @@
{ "cet", 0, 3600, "Europe/Zagreb" },
{ "cet", 0, 3600, "Europe/Zaporozhye" },
{ "cet", 0, 3600, "Europe/Zurich" },
- { "cet", 0, 3600, "WET" },
{ "cgst", 1, -3600, "America/Scoresbysund" },
{ "cgt", 0, -7200, "America/Scoresbysund" },
{ "chadt", 1, 49500, "Pacific/Chatham" },
@@ -563,6 +573,7 @@
{ "chast", 0, 44100, "Pacific/Chatham" },
{ "chdt", 1, -19800, "America/Belize" },
{ "chost", 1, 36000, "Asia/Choibalsan" },
+ { "chost", 1, 32400, "Asia/Choibalsan" },
{ "chot", 0, 32400, "Asia/Choibalsan" },
{ "chot", 0, 28800, "Asia/Choibalsan" },
{ "chut", 0, 36000, "Pacific/Chuuk" },
@@ -577,7 +588,10 @@
{ "clst", 1, -10800, "Chile/Continental" },
{ "clst", 1, -14400, "Chile/Continental" },
{ "clt", 0, -14400, "America/Santiago" },
+ { "clt", 0, -10800, "America/Santiago" },
{ "clt", 0, -18000, "America/Santiago" },
+ { "clt", 0, -10800, "Antarctica/Palmer" },
+ { "clt", 0, -10800, "Chile/Continental" },
{ "clt", 0, -14400, "Antarctica/Palmer" },
{ "clt", 0, -14400, "Chile/Continental" },
{ "clt", 0, -18000, "Chile/Continental" },
@@ -602,6 +616,7 @@
{ "cmt", 0, -15408, "America/Rosario" },
{ "cmt", 0, -16060, "America/Caracas" },
{ "cmt", 0, -16356, "America/La_Paz" },
+ { "cmt", 0, -19176, "America/Cayman" },
{ "cmt", 0, -19176, "America/Panama" },
{ "cmt", 0, 6900, "Europe/Chisinau" },
{ "cmt", 0, 6900, "Europe/Tiraspol" },
@@ -735,9 +750,10 @@
{ "easst", 1, -18000, "Chile/EasterIsland" },
{ "easst", 1, -18000, "Pacific/Easter" },
{ "easst", 1, -21600, "Pacific/Easter" },
+ { "east", 0, -18000, "Chile/EasterIsland" },
{ "east", 0, -21600, "Chile/EasterIsland" },
{ "east", 0, -25200, "Chile/EasterIsland" },
- { "east", 1, 14400, "Indian/Antananarivo" },
+ { "east", 0, -18000, "Pacific/Easter" },
{ "east", 0, -21600, "Pacific/Easter" },
{ "east", 0, -25200, "Pacific/Easter" },
{ "eat", 0, 10800, "Africa/Khartoum" },
@@ -783,7 +799,6 @@
{ "edt", 1, -14400, "America/Thunder_Bay" },
{ "edt", 1, -14400, "America/Toronto" },
{ "edt", 1, -14400, "Canada/Eastern" },
- { "edt", 1, -14400, "EST" },
{ "eest", 1, 10800, "Europe/Helsinki" },
{ "eest", 1, 10800, "Africa/Cairo" },
{ "eest", 1, 10800, "Asia/Amman" },
@@ -793,7 +808,6 @@
{ "eest", 1, 10800, "Asia/Hebron" },
{ "eest", 1, 10800, "Asia/Istanbul" },
{ "eest", 1, 10800, "Asia/Nicosia" },
- { "eest", 1, 10800, "EET" },
{ "eest", 1, 10800, "Europe/Athens" },
{ "eest", 1, 10800, "Europe/Bucharest" },
{ "eest", 1, 10800, "Europe/Chisinau" },
@@ -826,7 +840,6 @@
{ "eet", 0, 7200, "Asia/Hebron" },
{ "eet", 0, 7200, "Asia/Istanbul" },
{ "eet", 0, 7200, "Asia/Nicosia" },
- { "eet", 0, 7200, "EET" },
{ "eet", 0, 7200, "Europe/Athens" },
{ "eet", 0, 7200, "Europe/Bucharest" },
{ "eet", 0, 7200, "Europe/Chisinau" },
@@ -859,9 +872,7 @@
{ "ept", 1, -14400, "America/Thunder_Bay" },
{ "ept", 1, -14400, "America/Toronto" },
{ "ept", 1, -14400, "Canada/Eastern" },
- { "ept", 1, -14400, "EST" },
{ "est", 0, -18000, "America/New_York" },
- { "est", 0, -18000, "America/Antigua" },
{ "est", 0, -18000, "America/Atikokan" },
{ "est", 0, -18000, "America/Cambridge_Bay" },
{ "est", 0, -18000, "America/Cancun" },
@@ -902,7 +913,6 @@
{ "est", 0, -18000, "America/Thunder_Bay" },
{ "est", 0, -18000, "America/Toronto" },
{ "est", 0, -18000, "Canada/Eastern" },
- { "est", 0, -18000, "EST" },
{ "ewt", 1, -14400, "America/New_York" },
{ "ewt", 1, -14400, "America/Detroit" },
{ "ewt", 1, -14400, "America/Iqaluit" },
@@ -911,7 +921,6 @@
{ "ewt", 1, -14400, "America/Thunder_Bay" },
{ "ewt", 1, -14400, "America/Toronto" },
{ "ewt", 1, -14400, "Canada/Eastern" },
- { "ewt", 1, -14400, "EST" },
{ "fet", 0, 10800, "Europe/Kaliningrad" },
{ "fet", 0, 10800, "Europe/Minsk" },
{ "ffmt", 0, -14660, "America/Martinique" },
@@ -953,12 +962,9 @@
{ "gmt", 0, 0, "Africa/Dakar" },
{ "gmt", 0, 0, "Africa/Freetown" },
{ "gmt", 0, 0, "Africa/Lome" },
- { "gmt", 0, 0, "Africa/Malabo" },
{ "gmt", 0, 0, "Africa/Monrovia" },
- { "gmt", 0, 0, "Africa/Niamey" },
{ "gmt", 0, 0, "Africa/Nouakchott" },
{ "gmt", 0, 0, "Africa/Ouagadougou" },
- { "gmt", 0, 0, "Africa/Porto-Novo" },
{ "gmt", 0, 0, "Africa/Sao_Tome" },
{ "gmt", 0, 0, "Africa/Timbuktu" },
{ "gmt", 0, 0, "America/Danmarkshavn" },
@@ -980,6 +986,7 @@
{ "gst", 0, 14400, "Asia/Muscat" },
{ "gst", 0, 14400, "Asia/Qatar" },
{ "gst", 0, 36000, "Pacific/Guam" },
+ { "gst", 0, 36000, "Pacific/Saipan" },
{ "gyt", 0, -14400, "America/Guyana" },
{ "gyt", 0, -10800, "America/Guyana" },
{ "gyt", 0, -13500, "America/Guyana" },
@@ -988,7 +995,6 @@
{ "hast", 0, -36000, "America/Adak" },
{ "hast", 0, -36000, "America/Atka" },
{ "hdt", 1, -34200, "Pacific/Honolulu" },
- { "hdt", 1, -34200, "HST" },
{ "hdt", 1, -34200, "Pacific/Johnston" },
{ "hkst", 1, 32400, "Asia/Hong_Kong" },
{ "hkt", 0, 28800, "Asia/Hong_Kong" },
@@ -998,7 +1004,6 @@
{ "hmt", 0, 21200, "Asia/Dacca" },
{ "hmt", 0, 21200, "Asia/Dhaka" },
{ "hmt", 0, 21200, "Asia/Kolkata" },
- { "hmt", 0, 5989, "EET" },
{ "hmt", 0, 5989, "Europe/Helsinki" },
{ "hmt", 0, 5989, "Europe/Mariehamn" },
{ "hovst", 1, 28800, "Asia/Hovd" },
@@ -1006,27 +1011,23 @@
{ "hovt", 0, 21600, "Asia/Hovd" },
{ "hst", 0, -36000, "Pacific/Honolulu" },
{ "hst", 0, -37800, "Pacific/Honolulu" },
- { "hst", 0, -36000, "HST" },
{ "hst", 0, -36000, "Pacific/Johnston" },
- { "hst", 0, -37800, "HST" },
{ "hst", 0, -37800, "Pacific/Johnston" },
{ "ict", 0, 25200, "Asia/Bangkok" },
{ "ict", 0, 25200, "Asia/Ho_Chi_Minh" },
{ "ict", 0, 25200, "Asia/Phnom_Penh" },
{ "ict", 0, 25200, "Asia/Saigon" },
{ "ict", 0, 25200, "Asia/Vientiane" },
- { "ict", 0, 28800, "Asia/Ho_Chi_Minh" },
- { "ict", 0, 28800, "Asia/Phnom_Penh" },
- { "ict", 0, 28800, "Asia/Saigon" },
- { "ict", 0, 28800, "Asia/Vientiane" },
{ "iddt", 1, 14400, "Asia/Jerusalem" },
{ "iddt", 1, 14400, "Asia/Tel_Aviv" },
{ "idt", 1, 10800, "Asia/Jerusalem" },
{ "idt", 1, 10800, "Asia/Gaza" },
{ "idt", 1, 10800, "Asia/Hebron" },
{ "idt", 1, 10800, "Asia/Tel_Aviv" },
+ { "idt", 0, 28800, "Asia/Ho_Chi_Minh" },
+ { "idt", 0, 28800, "Asia/Saigon" },
{ "ihst", 1, 21600, "Asia/Colombo" },
- { "imt", 0, 25035, "Asia/Irkutsk" },
+ { "imt", 0, 25025, "Asia/Irkutsk" },
{ "imt", 0, 7016, "Asia/Istanbul" },
{ "imt", 0, 7016, "Europe/Istanbul" },
{ "iot", 0, 21600, "Indian/Chagos" },
@@ -1075,6 +1076,7 @@
{ "jmt", 0, 8440, "Asia/Tel_Aviv" },
{ "jst", 0, 32400, "Asia/Tokyo" },
{ "jst", 0, 32400, "Asia/Dili" },
+ { "jst", 0, 32400, "Asia/Ho_Chi_Minh" },
{ "jst", 0, 32400, "Asia/Hong_Kong" },
{ "jst", 0, 32400, "Asia/Jakarta" },
{ "jst", 0, 32400, "Asia/Kuala_Lumpur" },
@@ -1084,11 +1086,13 @@
{ "jst", 0, 32400, "Asia/Pontianak" },
{ "jst", 0, 32400, "Asia/Pyongyang" },
{ "jst", 0, 32400, "Asia/Rangoon" },
+ { "jst", 0, 32400, "Asia/Saigon" },
{ "jst", 0, 32400, "Asia/Sakhalin" },
{ "jst", 0, 32400, "Asia/Seoul" },
{ "jst", 0, 32400, "Asia/Singapore" },
{ "jst", 0, 32400, "Asia/Taipei" },
{ "jst", 0, 32400, "Asia/Ujung_Pandang" },
+ { "jst", 0, 32400, "Pacific/Bougainville" },
{ "jst", 0, 32400, "Pacific/Nauru" },
{ "jst", 0, 32400, "ROC" },
{ "jst", 0, 32400, "ROK" },
@@ -1096,8 +1100,8 @@
{ "jwst", 0, 28800, "ROC" },
{ "kart", 0, 18000, "Asia/Karachi" },
{ "kdt", 1, 36000, "Asia/Seoul" },
- { "kdt", 1, 32400, "Asia/Seoul" },
- { "kdt", 1, 32400, "ROK" },
+ { "kdt", 1, 34200, "Asia/Seoul" },
+ { "kdt", 1, 34200, "ROK" },
{ "kdt", 1, 36000, "ROK" },
{ "kgst", 1, 21600, "Asia/Bishkek" },
{ "kgt", 0, 18000, "Asia/Bishkek" },
@@ -1107,7 +1111,6 @@
{ "kizt", 0, 14400, "Asia/Qyzylorda" },
{ "kizt", 0, 18000, "Asia/Qyzylorda" },
{ "kmt", 0, 5736, "Europe/Vilnius" },
- { "kmt", 0, -18431, "America/Cayman" },
{ "kmt", 0, -18431, "America/Grand_Turk" },
{ "kmt", 0, -18431, "America/Jamaica" },
{ "kmt", 0, 7324, "Europe/Kiev" },
@@ -1122,12 +1125,9 @@
{ "krat", 0, 28800, "Asia/Krasnoyarsk" },
{ "krat", 0, 21600, "Asia/Novokuznetsk" },
{ "krat", 0, 25200, "Asia/Novokuznetsk" },
- { "kst", 0, 28800, "Asia/Seoul" },
{ "kst", 0, 30600, "Asia/Seoul" },
{ "kst", 0, 32400, "Asia/Pyongyang" },
{ "kst", 0, 32400, "Asia/Seoul" },
- { "kst", 0, 28800, "Asia/Pyongyang" },
- { "kst", 0, 28800, "ROK" },
{ "kst", 0, 30600, "Asia/Pyongyang" },
{ "kst", 0, 30600, "ROK" },
{ "kst", 0, 32400, "ROK" },
@@ -1147,7 +1147,7 @@
{ "lkt", 0, 23400, "Asia/Colombo" },
{ "lkt", 0, 21600, "Asia/Colombo" },
{ "lrt", 0, -2670, "Africa/Monrovia" },
- { "lst", 1, 9388, "Europe/Riga" },
+ { "lst", 1, 9394, "Europe/Riga" },
{ "madmt", 1, 3600, "Atlantic/Madeira" },
{ "madst", 1, 0, "Atlantic/Madeira" },
{ "madt", 0, -3600, "Atlantic/Madeira" },
@@ -1202,9 +1202,6 @@
{ "mdt", 1, -21600, "Canada/Mountain" },
{ "mdt", 1, -21600, "Canada/Saskatchewan" },
{ "mdt", 1, -21600, "Mexico/BajaSur" },
- { "mdt", 1, -21600, "MST" },
- { "mest", 1, 7200, "MET" },
- { "met", 0, 3600, "MET" },
{ "mht", 0, 43200, "Pacific/Kwajalein" },
{ "mht", 0, 39600, "Pacific/Kwajalein" },
{ "mht", 0, 39600, "Pacific/Majuro" },
@@ -1226,7 +1223,6 @@
{ "mot", 0, 28800, "Asia/Macao" },
{ "mot", 0, 28800, "Asia/Macau" },
{ "mpt", 1, -21600, "America/Denver" },
- { "mpt", 0, 36000, "Pacific/Saipan" },
{ "mpt", 1, -21600, "America/Boise" },
{ "mpt", 1, -21600, "America/Cambridge_Bay" },
{ "mpt", 1, -21600, "America/Edmonton" },
@@ -1240,8 +1236,6 @@
{ "mpt", 1, -21600, "Canada/East-Saskatchewan" },
{ "mpt", 1, -21600, "Canada/Mountain" },
{ "mpt", 1, -21600, "Canada/Saskatchewan" },
- { "mpt", 1, -21600, "MST" },
- { "mpt", 0, 32400, "Pacific/Saipan" },
{ "msd", 1, 14400, "Europe/Moscow" },
{ "msd", 1, 14400, "Europe/Chisinau" },
{ "msd", 1, 14400, "Europe/Kaliningrad" },
@@ -1254,6 +1248,7 @@
{ "msd", 1, 14400, "Europe/Tiraspol" },
{ "msd", 1, 14400, "Europe/Uzhgorod" },
{ "msd", 1, 14400, "Europe/Vilnius" },
+ { "msd", 1, 14400, "Europe/Volgograd" },
{ "msd", 1, 14400, "Europe/Zaporozhye" },
{ "msk", 0, 10800, "Europe/Moscow" },
{ "msk", 0, 14400, "Europe/Moscow" },
@@ -1272,7 +1267,6 @@
{ "msk", 0, 10800, "Europe/Zaporozhye" },
{ "msk", 0, 14400, "Europe/Simferopol" },
{ "msk", 0, 14400, "Europe/Volgograd" },
- { "msk", 1, 14400, "Europe/Volgograd" },
{ "msm", 1, 18000, "Europe/Moscow" },
{ "mst", 0, -25200, "America/Denver" },
{ "mst", 0, -25200, "America/Bahia_Banderas" },
@@ -1304,7 +1298,6 @@
{ "mst", 0, -25200, "Mexico/BajaNorte" },
{ "mst", 0, -25200, "Mexico/BajaSur" },
{ "mst", 0, -25200, "Mexico/General" },
- { "mst", 0, -25200, "MST" },
{ "mst", 1, 12679, "Europe/Moscow" },
{ "must", 1, 18000, "Indian/Mauritius" },
{ "mut", 0, 14400, "Indian/Mauritius" },
@@ -1324,7 +1317,6 @@
{ "mwt", 1, -21600, "Canada/East-Saskatchewan" },
{ "mwt", 1, -21600, "Canada/Mountain" },
{ "mwt", 1, -21600, "Canada/Saskatchewan" },
- { "mwt", 1, -21600, "MST" },
{ "myt", 0, 28800, "Asia/Kuala_Lumpur" },
{ "myt", 0, 28800, "Asia/Kuching" },
{ "ncst", 1, 43200, "Pacific/Noumea" },
@@ -1333,7 +1325,6 @@
{ "nddt", 1, -5400, "Canada/Newfoundland" },
{ "ndt", 1, -9052, "America/St_Johns" },
{ "ndt", 1, -9000, "America/St_Johns" },
- { "ndt", 1, -36000, "Pacific/Midway" },
{ "ndt", 1, -9000, "America/Goose_Bay" },
{ "ndt", 1, -9000, "Canada/Newfoundland" },
{ "ndt", 1, -9052, "America/Goose_Bay" },
@@ -1342,7 +1333,6 @@
{ "nest", 1, 4800, "Europe/Amsterdam" },
{ "net", 0, 1200, "Europe/Amsterdam" },
{ "nft", 0, 41400, "Pacific/Norfolk" },
- { "nmt", 0, 20928, "Asia/Novokuznetsk" },
{ "nmt", 0, 40320, "Pacific/Norfolk" },
{ "novst", 1, 25200, "Asia/Novosibirsk" },
{ "novst", 1, 28800, "Asia/Novosibirsk" },
@@ -1433,6 +1423,7 @@
{ "pett", 0, 43200, "Asia/Kamchatka" },
{ "pett", 0, 39600, "Asia/Kamchatka" },
{ "pet", 0, -18000, "America/Lima" },
+ { "pgt", 0, 36000, "Pacific/Bougainville" },
{ "pgt", 0, 36000, "Pacific/Port_Moresby" },
{ "phot", 0, 46800, "Pacific/Enderbury" },
{ "phot", 0, -39600, "Pacific/Enderbury" },
@@ -1441,17 +1432,19 @@
{ "pht", 0, 28800, "Asia/Manila" },
{ "pkst", 1, 21600, "Asia/Karachi" },
{ "pkt", 0, 18000, "Asia/Karachi" },
+ { "plmt", 0, 25590, "Asia/Ho_Chi_Minh" },
+ { "plmt", 0, 25590, "Asia/Saigon" },
{ "pmdt", 1, -7200, "America/Miquelon" },
{ "pmst", 0, -10800, "America/Miquelon" },
{ "pmt", 0, -13236, "America/Paramaribo" },
{ "pmt", 0, -13252, "America/Paramaribo" },
{ "pmt", 0, 36000, "Antarctica/DumontDUrville" },
+ { "pmt", 0, 13505, "Asia/Yekaterinburg" },
{ "pmt", 0, 26240, "Asia/Pontianak" },
{ "pmt", 0, 561, "Africa/Algiers" },
{ "pmt", 0, 561, "Africa/Tunis" },
{ "pmt", 0, 561, "Europe/Monaco" },
{ "pmt", 0, 561, "Europe/Paris" },
- { "pmt", 0, 561, "WET" },
{ "pnt", 0, -30600, "Pacific/Pitcairn" },
{ "pont", 0, 39600, "Pacific/Pohnpei" },
{ "pont", 0, 39600, "Pacific/Ponape" },
@@ -1509,8 +1502,7 @@
{ "qyzt", 0, 21600, "Asia/Qyzylorda" },
{ "qyzt", 0, 18000, "Asia/Qyzylorda" },
{ "ret", 0, 14400, "Indian/Reunion" },
- { "rmt", 0, 5788, "Europe/Riga" },
- { "rmt", 0, -5268, "Atlantic/Reykjavik" },
+ { "rmt", 0, 5794, "Europe/Riga" },
{ "rmt", 0, 23080, "Asia/Rangoon" },
{ "rott", 0, -10800, "Antarctica/Rothera" },
{ "sakst", 1, 39600, "Asia/Sakhalin" },
@@ -1528,8 +1520,10 @@
{ "sast", 1, 10800, "Africa/Johannesburg" },
{ "sast", 0, 5400, "Africa/Johannesburg" },
{ "sast", 1, 10800, "Africa/Maseru" },
+ { "sast", 1, 10800, "Africa/Mbabane" },
{ "sast", 1, 10800, "Africa/Windhoek" },
- { "sast", 0, 5400, "Africa/Gaborone" },
+ { "sast", 0, 5400, "Africa/Maseru" },
+ { "sast", 0, 5400, "Africa/Mbabane" },
{ "sast", 0, 7200, "Africa/Maseru" },
{ "sast", 0, 7200, "Africa/Mbabane" },
{ "sast", 0, 7200, "Africa/Windhoek" },
@@ -1543,15 +1537,11 @@
{ "shet", 0, 21600, "Asia/Aqtau" },
{ "shet", 0, 18000, "Asia/Aqtau" },
{ "sjmt", 0, -20173, "America/Costa_Rica" },
- { "smt", 0, 25580, "Asia/Saigon" },
{ "smt", 0, -13884, "Atlantic/Stanley" },
{ "smt", 0, -16966, "America/Santiago" },
{ "smt", 0, -16966, "Chile/Continental" },
{ "smt", 0, 24925, "Asia/Kuala_Lumpur" },
{ "smt", 0, 24925, "Asia/Singapore" },
- { "smt", 0, 25580, "Asia/Ho_Chi_Minh" },
- { "smt", 0, 25580, "Asia/Phnom_Penh" },
- { "smt", 0, 25580, "Asia/Vientiane" },
{ "smt", 0, 8160, "Europe/Simferopol" },
{ "sret", 0, 39600, "Asia/Srednekolymsk" },
{ "srt", 0, -10800, "America/Paramaribo" },
@@ -1579,7 +1569,7 @@
{ "tbist", 1, 14400, "Asia/Tbilisi" },
{ "tbit", 0, 14400, "Asia/Tbilisi" },
{ "tbit", 0, 10800, "Asia/Tbilisi" },
- { "tbmt", 0, 10746, "Asia/Tbilisi" },
+ { "tbmt", 0, 10751, "Asia/Tbilisi" },
{ "tft", 0, 18000, "Indian/Kerguelen" },
{ "tjt", 0, 18000, "Asia/Dushanbe" },
{ "tkt", 0, -39600, "Pacific/Fakaofo" },
@@ -1602,7 +1592,6 @@
{ "tsat", 0, 10800, "Europe/Volgograd" },
{ "tvt", 0, 43200, "Pacific/Funafuti" },
{ "uct", 0, 0, "Etc/UCT" },
- { "uct", 0, 0, "UCT" },
{ "ulast", 1, 32400, "Asia/Ulaanbaatar" },
{ "ulast", 1, 32400, "Asia/Ulan_Bator" },
{ "ulat", 0, 28800, "Asia/Ulaanbaatar" },
@@ -1620,7 +1609,6 @@
{ "utc", 0, 0, "Etc/Universal" },
{ "utc", 0, 0, "Etc/UTC" },
{ "utc", 0, 0, "Etc/Zulu" },
- { "utc", 0, 0, "GMT" },
{ "utc", 0, 0, "UTC" },
{ "utc", 0, 0, "UTC" },
{ "uyhst", 1, -9000, "America/Montevideo" },
@@ -1679,7 +1667,6 @@
{ "wat", 0, 3600, "Africa/Brazzaville" },
{ "wat", 0, -3600, "Africa/Bissau" },
{ "wat", 0, -3600, "Africa/El_Aaiun" },
- { "wat", 0, -3600, "Africa/Niamey" },
{ "wat", 0, 3600, "Africa/Bangui" },
{ "wat", 0, 3600, "Africa/Douala" },
{ "wat", 0, 3600, "Africa/Kinshasa" },
@@ -1695,7 +1682,6 @@
{ "wemt", 1, 7200, "Europe/Madrid" },
{ "wemt", 1, 7200, "Europe/Monaco" },
{ "wemt", 1, 7200, "Europe/Paris" },
- { "wemt", 1, 7200, "WET" },
{ "west", 1, 3600, "Europe/Paris" },
{ "west", 1, 7200, "Europe/Luxembourg" },
{ "west", 1, 3600, "Africa/Algiers" },
@@ -1711,7 +1697,6 @@
{ "west", 1, 3600, "Europe/Luxembourg" },
{ "west", 1, 3600, "Europe/Madrid" },
{ "west", 1, 3600, "Europe/Monaco" },
- { "west", 1, 3600, "WET" },
{ "wet", 0, 0, "Europe/Paris" },
{ "wet", 0, 3600, "Europe/Luxembourg" },
{ "wet", 0, 0, "Africa/Algiers" },
@@ -1729,7 +1714,6 @@
{ "wet", 0, 0, "Europe/Luxembourg" },
{ "wet", 0, 0, "Europe/Madrid" },
{ "wet", 0, 0, "Europe/Monaco" },
- { "wet", 0, 0, "WET" },
{ "wft", 0, 43200, "Pacific/Wallis" },
{ "wgst", 1, -7200, "America/Godthab" },
{ "wgst", 1, -7200, "America/Danmarkshavn" },
diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c
index 2714c9a4da..57e0cef1be 100644
--- a/ext/date/lib/tm2unixtime.c
+++ b/ext/date/lib/tm2unixtime.c
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
/* jan feb mrt apr may jun jul aug sep oct nov dec */
@@ -148,9 +152,17 @@ static void do_adjust_for_weekday(timelib_time* time)
current_dow = timelib_day_of_week(time->y, time->m, time->d);
if (time->relative.weekday_behavior == 2)
{
- if (time->relative.weekday == 0) {
+ /* To make "this week" work, where the current DOW is a "sunday" */
+ if (current_dow == 0 && time->relative.weekday != 0) {
+ time->relative.weekday = -6;
+ }
+
+ /* To make "sunday this week" work, where the current DOW is not a
+ * "sunday" */
+ if (time->relative.weekday == 0 && current_dow != 0) {
time->relative.weekday = 7;
}
+
time->d -= current_dow;
time->d += time->relative.weekday;
return;
@@ -423,9 +435,9 @@ static timelib_sll do_adjust_timezone(timelib_time *tz, timelib_tzinfo *tzi)
tz->dst = gmt_offset->is_dst;
if (tz->tz_abbr) {
- free(tz->tz_abbr);
+ timelib_free(tz->tz_abbr);
}
- tz->tz_abbr = strdup(gmt_offset->abbr);
+ tz->tz_abbr = timelib_strdup(gmt_offset->abbr);
timelib_time_offset_dtor(gmt_offset);
}
return tmp;
diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c
index 4a2e5d8382..a9b71662ea 100644
--- a/ext/date/lib/unixtime2tm.c
+++ b/ext/date/lib/unixtime2tm.c
@@ -1,23 +1,27 @@
/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Derick Rethans <derick@derickrethans.nl> |
- +----------------------------------------------------------------------+
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015 Derick Rethans
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include <stdio.h>
@@ -217,7 +221,7 @@ void timelib_unixtime2local(timelib_time *tm, timelib_sll ts)
void timelib_set_timezone_from_offset(timelib_time *t, timelib_sll utc_offset)
{
if (t->tz_abbr) {
- free(t->tz_abbr);
+ timelib_free(t->tz_abbr);
}
t->tz_abbr = NULL;
@@ -231,9 +235,9 @@ void timelib_set_timezone_from_offset(timelib_time *t, timelib_sll utc_offset)
void timelib_set_timezone_from_abbr(timelib_time *t, timelib_abbr_info abbr_info)
{
if (t->tz_abbr) {
- free(t->tz_abbr);
+ timelib_free(t->tz_abbr);
}
- t->tz_abbr = strdup(abbr_info.abbr);
+ t->tz_abbr = timelib_strdup(abbr_info.abbr);
t->z = abbr_info.utc_offset;
t->have_zone = 1;
@@ -257,9 +261,9 @@ void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz)
t->dst = gmt_offset->is_dst;
t->tz_info = tz;
if (t->tz_abbr) {
- free(t->tz_abbr);
+ timelib_free(t->tz_abbr);
}
- t->tz_abbr = strdup(gmt_offset->abbr);
+ t->tz_abbr = timelib_strdup(gmt_offset->abbr);
timelib_time_offset_dtor(gmt_offset);
t->have_zone = 1;
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 36c965b79d..d8e6ba6419 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -382,7 +382,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_date_period_construct, 0, 0, 3)
ZEND_ARG_INFO(0, end)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_date_interval_construct, 0, 0, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_date_interval_construct, 0, 0, 1)
ZEND_ARG_INFO(0, interval_spec)
ZEND_END_ARG_INFO()
/* }}} */
@@ -1089,13 +1089,13 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
offset->offset = (t->z - (t->dst * 60)) * -60;
offset->leap_secs = 0;
offset->is_dst = t->dst;
- offset->abbr = strdup(t->tz_abbr);
+ offset->abbr = timelib_strdup(t->tz_abbr);
} else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) {
offset = timelib_time_offset_ctor();
offset->offset = (t->z) * -60;
offset->leap_secs = 0;
offset->is_dst = 0;
- offset->abbr = malloc(9); /* GMT�xxxx\0 */
+ offset->abbr = timelib_malloc(9); /* GMT±xxxx\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
localtime ? abs(offset->offset / 3600) : 0,
@@ -1298,13 +1298,13 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
offset->offset = (t->z - (t->dst * 60)) * -60;
offset->leap_secs = 0;
offset->is_dst = t->dst;
- offset->abbr = strdup(t->tz_abbr);
+ offset->abbr = timelib_strdup(t->tz_abbr);
} else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) {
offset = timelib_time_offset_ctor();
offset->offset = (t->z - (t->dst * 60)) * -60;
offset->leap_secs = 0;
offset->is_dst = t->dst;
- offset->abbr = malloc(9); /* GMT�xxxx\0 */
+ offset->abbr = timelib_malloc(9); /* GMT±xxxx\0 */
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
!localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
!localtime ? abs(offset->offset / 3600) : 0,
@@ -1462,7 +1462,7 @@ PHP_FUNCTION(strtotime)
timelib_time *t, *now;
timelib_tzinfo *tzi;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "s|l", &times, &time_len, &preset_ts) == FAILURE || !time_len) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &times, &time_len, &preset_ts) == FAILURE || !time_len) {
RETURN_FALSE;
}
@@ -1542,7 +1542,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
now->h = hou;
break;
default:
- php_error_docref(NULL, E_STRICT, "You should be using the time() function instead");
+ php_error_docref(NULL, E_DEPRECATED, "You should be using the time() function instead");
}
/* Update the timestamp */
if (gmt) {
@@ -1888,7 +1888,7 @@ static zval *date_period_it_current_data(zend_object_iterator *iter)
newdateobj->time = timelib_time_ctor();
*newdateobj->time = *it_time;
if (it_time->tz_abbr) {
- newdateobj->time->tz_abbr = strdup(it_time->tz_abbr);
+ newdateobj->time->tz_abbr = timelib_strdup(it_time->tz_abbr);
}
if (it_time->tz_info) {
newdateobj->time->tz_info = it_time->tz_info;
@@ -2113,7 +2113,7 @@ static zend_object *date_object_clone_date(zval *this_ptr) /* {{{ */
new_obj->time = timelib_time_ctor();
*new_obj->time = *old_obj->time;
if (old_obj->time->tz_abbr) {
- new_obj->time->tz_abbr = strdup(old_obj->time->tz_abbr);
+ new_obj->time->tz_abbr = timelib_strdup(old_obj->time->tz_abbr);
}
if (old_obj->time->tz_info) {
new_obj->time->tz_info = old_obj->time->tz_info;
@@ -2143,7 +2143,7 @@ static int date_object_compare_date(zval *d1, zval *d2) /* {{{ */
timelib_update_ts(o2->time, o2->time->tz_info);
}
- return (o1->time->sse == o2->time->sse) ? 0 : ((o1->time->sse < o2->time->sse) ? -1 : 1);
+ return timelib_time_compare(o1->time, o2->time);
} /* }}} */
static HashTable *date_object_get_gc(zval *object, zval **table, int *n) /* {{{ */
@@ -2252,7 +2252,7 @@ static zend_object *date_object_clone_timezone(zval *this_ptr) /* {{{ */
case TIMELIB_ZONETYPE_ABBR:
new_obj->tzi.z.utc_offset = old_obj->tzi.z.utc_offset;
new_obj->tzi.z.dst = old_obj->tzi.z.dst;
- new_obj->tzi.z.abbr = strdup(old_obj->tzi.z.abbr);
+ new_obj->tzi.z.abbr = timelib_strdup(old_obj->tzi.z.abbr);
break;
}
@@ -2430,7 +2430,7 @@ static void date_object_free_storage_timezone(zend_object *object) /* {{{ */
php_timezone_obj *intern = php_timezone_obj_from_obj(object);
if (intern->type == TIMELIB_ZONETYPE_ABBR) {
- free(intern->tzi.z.abbr);
+ timelib_free(intern->tzi.z.abbr);
}
zend_object_std_dtor(&intern->std);
} /* }}} */
@@ -2528,7 +2528,7 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
case TIMELIB_ZONETYPE_ABBR:
new_offset = tzobj->tzi.z.utc_offset;
new_dst = tzobj->tzi.z.dst;
- new_abbr = strdup(tzobj->tzi.z.abbr);
+ new_abbr = timelib_strdup(tzobj->tzi.z.abbr);
break;
}
type = tzobj->type;
@@ -2710,7 +2710,7 @@ PHP_METHOD(DateTimeImmutable, createFromMutable)
new_obj->time = timelib_time_ctor();
*new_obj->time = *old_obj->time;
if (old_obj->time->tz_abbr) {
- new_obj->time->tz_abbr = strdup(old_obj->time->tz_abbr);
+ new_obj->time->tz_abbr = timelib_strdup(old_obj->time->tz_abbr);
}
if (old_obj->time->tz_info) {
new_obj->time->tz_info = old_obj->time->tz_info;
@@ -2781,7 +2781,7 @@ PHP_METHOD(DateTime, __set_state)
RETURN_FALSE;
}
- myht = HASH_OF(array);
+ myht = Z_ARRVAL_P(array);
php_date_instantiate(date_ce_date, return_value);
dateobj = Z_PHPDATE_P(return_value);
@@ -2803,7 +2803,7 @@ PHP_METHOD(DateTimeImmutable, __set_state)
RETURN_FALSE;
}
- myht = HASH_OF(array);
+ myht = Z_ARRVAL_P(array);
php_date_instantiate(date_ce_immutable, return_value);
dateobj = Z_PHPDATE_P(return_value);
@@ -3055,6 +3055,7 @@ static int php_date_modify(zval *object, char *modify, size_t modify_len) /* {{{
timelib_update_ts(dateobj->time, NULL);
timelib_update_from_sse(dateobj->time);
dateobj->time->have_relative = 0;
+ memset(&dateobj->time->relative, 0, sizeof(dateobj->time->relative));
return 1;
} /* }}} */
@@ -3223,7 +3224,7 @@ static void set_timezone_from_timelib_time(php_timezone_obj *tzobj, timelib_time
case TIMELIB_ZONETYPE_ABBR:
tzobj->tzi.z.utc_offset = t->z;
tzobj->tzi.z.dst = t->dst;
- tzobj->tzi.z.abbr = strdup(t->tz_abbr);
+ tzobj->tzi.z.abbr = timelib_strdup(t->tz_abbr);
break;
}
}
@@ -3580,9 +3581,9 @@ PHP_FUNCTION(date_diff)
zval *object1, *object2;
php_date_obj *dateobj1, *dateobj2;
php_interval_obj *interval;
- zend_long absolute = 0;
+ zend_bool absolute = 0;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|l", &object1, date_ce_interface, &object2, date_ce_interface, &absolute) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|b", &object1, date_ce_interface, &object2, date_ce_interface, &absolute) == FAILURE) {
RETURN_FALSE;
}
dateobj1 = Z_PHPDATE_P(object1);
@@ -3602,12 +3603,17 @@ PHP_FUNCTION(date_diff)
}
/* }}} */
-static int timezone_initialize(php_timezone_obj *tzobj, /*const*/ char *tz) /* {{{ */
+static int timezone_initialize(php_timezone_obj *tzobj, /*const*/ char *tz, size_t tz_len) /* {{{ */
{
timelib_time *dummy_t = ecalloc(1, sizeof(timelib_time));
int dst, not_found;
char *orig_tz = tz;
+ if (strlen(tz) != tz_len) {
+ php_error_docref(NULL, E_WARNING, "Timezone must not contain null bytes");
+ return FAILURE;
+ }
+
dummy_t->z = timelib_parse_zone(&tz, &dst, dummy_t, &not_found, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
if (not_found) {
php_error_docref(NULL, E_WARNING, "Unknown or bad timezone (%s)", orig_tz);
@@ -3615,7 +3621,7 @@ static int timezone_initialize(php_timezone_obj *tzobj, /*const*/ char *tz) /* {
return FAILURE;
} else {
set_timezone_from_timelib_time(tzobj, dummy_t);
- free(dummy_t->tz_abbr);
+ timelib_free(dummy_t->tz_abbr);
efree(dummy_t);
return SUCCESS;
}
@@ -3634,7 +3640,7 @@ PHP_FUNCTION(timezone_open)
RETURN_FALSE;
}
tzobj = Z_PHPTIMEZONE_P(php_date_instantiate(date_ce_timezone, return_value));
- if (SUCCESS != timezone_initialize(tzobj, tz)) {
+ if (SUCCESS != timezone_initialize(tzobj, tz, tz_len)) {
zval_ptr_dtor(return_value);
RETURN_FALSE;
}
@@ -3657,7 +3663,7 @@ PHP_METHOD(DateTimeZone, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling);
tzobj = Z_PHPTIMEZONE_P(getThis());
- timezone_initialize(tzobj, tz);
+ timezone_initialize(tzobj, tz, tz_len);
zend_restore_error_handling(&error_handling);
}
/* }}} */
@@ -3675,7 +3681,7 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez
if (Z_TYPE_P(z_timezone) != IS_STRING) {
return FAILURE;
}
- if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_P(z_timezone))) {
+ if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_P(z_timezone), Z_STRLEN_P(z_timezone))) {
return SUCCESS;
}
}
@@ -3695,7 +3701,7 @@ PHP_METHOD(DateTimeZone, __set_state)
RETURN_FALSE;
}
- myht = HASH_OF(array);
+ myht = Z_ARRVAL_P(array);
php_date_instantiate(date_ce_timezone, return_value);
tzobj = Z_PHPTIMEZONE_P(return_value);
@@ -3956,6 +3962,8 @@ static int date_interval_initialize(timelib_rel_time **rt, /*const*/ char *forma
}
}
timelib_error_container_dtor(errors);
+ timelib_free(b);
+ timelib_free(e);
return retval;
} /* }}} */
@@ -4158,7 +4166,7 @@ PHP_METHOD(DateInterval, __set_state)
RETURN_FALSE;
}
- myht = HASH_OF(array);
+ myht = Z_ARRVAL_P(array);
php_date_instantiate(date_ce_interval, return_value);
intobj = Z_PHPINTERVAL_P(return_value);
@@ -4266,6 +4274,10 @@ static zend_string *date_interval_format(char *format, size_t format_len, timeli
smart_str_0(&string);
+ if (string.s == NULL) {
+ return ZSTR_EMPTY_ALLOC();
+ }
+
return string.s;
}
/* }}} */
@@ -4371,7 +4383,7 @@ PHP_METHOD(DatePeriod, __construct)
clone = timelib_time_ctor();
memcpy(clone, dateobj->time, sizeof(timelib_time));
if (dateobj->time->tz_abbr) {
- clone->tz_abbr = strdup(dateobj->time->tz_abbr);
+ clone->tz_abbr = timelib_strdup(dateobj->time->tz_abbr);
}
if (dateobj->time->tz_info) {
clone->tz_info = dateobj->time->tz_info;
@@ -4421,7 +4433,7 @@ PHP_METHOD(DatePeriod, getStartDate)
dateobj->time = timelib_time_ctor();
*dateobj->time = *dpobj->start;
if (dpobj->start->tz_abbr) {
- dateobj->time->tz_abbr = strdup(dpobj->start->tz_abbr);
+ dateobj->time->tz_abbr = timelib_strdup(dpobj->start->tz_abbr);
}
if (dpobj->start->tz_info) {
dateobj->time->tz_info = dpobj->start->tz_info;
@@ -4443,12 +4455,16 @@ PHP_METHOD(DatePeriod, getEndDate)
dpobj = Z_PHPPERIOD_P(getThis());
+ if (!dpobj->end) {
+ return;
+ }
+
php_date_instantiate(dpobj->start_ce, return_value);
dateobj = Z_PHPDATE_P(return_value);
dateobj->time = timelib_time_ctor();
*dateobj->time = *dpobj->end;
if (dpobj->end->tz_abbr) {
- dateobj->time->tz_abbr = strdup(dpobj->end->tz_abbr);
+ dateobj->time->tz_abbr = timelib_strdup(dpobj->end->tz_abbr);
}
if (dpobj->end->tz_info) {
dateobj->time->tz_info = dpobj->end->tz_info;
@@ -4567,7 +4583,7 @@ PHP_FUNCTION(timezone_abbreviations_list)
add_assoc_null_ex(&element, "timezone_id", sizeof("timezone_id") - 1);
}
- abbr_array_p = zend_hash_str_find(HASH_OF(return_value), entry->name, strlen(entry->name));
+ abbr_array_p = zend_hash_str_find(Z_ARRVAL_P(return_value), entry->name, strlen(entry->name));
if (!abbr_array_p) {
array_init(&abbr_array);
add_assoc_zval(return_value, entry->name, &abbr_array);
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index a2f5261ee6..c336268a95 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -202,11 +202,7 @@ ZEND_BEGIN_MODULE_GLOBALS(date)
int timezone_valid;
ZEND_END_MODULE_GLOBALS(date)
-#ifdef ZTS
-#define DATEG(v) ZEND_TSRMG(date_globals_id, zend_date_globals *, v)
-#else
-#define DATEG(v) (date_globals.v)
-#endif
+#define DATEG(v) ZEND_MODULE_GLOBALS_ACCESSOR(date, v)
/* Backwards compatibility wrapper */
PHPAPI zend_long php_parse_date(char *string, zend_long *now);
diff --git a/ext/date/tests/010.phpt b/ext/date/tests/010.phpt
index 9f8c30a2e9..8b39229703 100644
--- a/ext/date/tests/010.phpt
+++ b/ext/date/tests/010.phpt
@@ -8,7 +8,7 @@ date_default_timezone_set('UTC');
echo "Done\n";
?>
--EXPECTF--
-array(7) {
+array(6) {
[0]=>
array(3) {
["dst"]=>
@@ -52,18 +52,9 @@ array(7) {
["offset"]=>
int(0)
["timezone_id"]=>
- string(3) "GMT"
- }
- [5]=>
- array(3) {
- ["dst"]=>
- bool(false)
- ["offset"]=>
- int(0)
- ["timezone_id"]=>
string(3) "UTC"
}
- [6]=>
+ [5]=>
array(3) {
["dst"]=>
bool(false)
diff --git a/ext/date/tests/DateTimeZone_getLocation.phpt b/ext/date/tests/DateTimeZone_getLocation.phpt
new file mode 100644
index 0000000000..8e6e33bd17
--- /dev/null
+++ b/ext/date/tests/DateTimeZone_getLocation.phpt
@@ -0,0 +1,82 @@
+--TEST--
+DateTimeZone::getLocation -- timezone_location_get — Returns location information for a timezone
+public array DateTimeZone::getLocation ( void ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+$arrayDate = DateTimeZone::listAbbreviations();
+$countryCode = array("??");
+$countryCodeTest = array("AU", "CA", "ET", "AF", "US", "KZ", "AM");
+
+foreach($arrayDate as $value){
+
+ if(NULL != $value[0]['timezone_id']){
+ $timeZone = new DateTimeZone($value[0]['timezone_id']);
+ $timeZoneArray = $timeZone->getLocation();
+
+ if((!in_array($timeZoneArray['country_code'], $countryCode)) && (NULL != $timeZoneArray['country_code']) && ("" != $timeZoneArray['country_code'])) {
+ array_push($countryCode, $timeZoneArray['country_code']);
+
+ if(in_array($timeZoneArray['country_code'], $countryCodeTest)){
+ print_r($timeZoneArray);
+ }
+ }
+ }
+}
+?>
+--CLEAN--
+<?php
+unset($arrayDate);
+unset($countryCode);
+unset($countryCodeTest);
+?>
+--EXPECTF--
+Array
+(
+ [country_code] => %s
+ [latitude] => %f
+ [longitude] => %f
+ [comments] => %s
+)
+Array
+(
+ [country_code] => %s
+ [latitude] => %f
+ [longitude] => %f
+ [comments] => %s
+)
+Array
+(
+ [country_code] => %s
+ [latitude] => %f
+ [longitude] => %f
+ [comments] =>
+)
+Array
+(
+ [country_code] => %s
+ [latitude] => %f
+ [longitude] => %f
+ [comments] => %s
+)
+Array
+(
+ [country_code] => %s
+ [latitude] => %f
+ [longitude] => %f
+ [comments] => %s
+)
+Array
+(
+ [country_code] => %s
+ [latitude] => %f
+ [longitude] => %f
+ [comments] =>
+)
diff --git a/ext/date/tests/bug17988.phpt b/ext/date/tests/bug17988.phpt
index e758b16aed..01637d69c9 100644
--- a/ext/date/tests/bug17988.phpt
+++ b/ext/date/tests/bug17988.phpt
@@ -6,8 +6,6 @@ date.timezone=GMT
<?php
echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728"))."\n";
echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 GMT"))."\n";
-echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 MET"))."\n";
-echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 MEST"))."\n";
echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 EDT"))."\n";
echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-00"))."\n";
echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+00"))."\n";
@@ -21,8 +19,6 @@ echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0330"))."\n";
--EXPECT--
2002-06-25 14:18:48
2002-06-25 14:18:48
-2002-06-25 13:18:48
-2002-06-25 12:18:48
2002-06-25 18:18:48
2002-06-25 14:18:48
2002-06-25 14:18:48
diff --git a/ext/date/tests/bug63740.phpt b/ext/date/tests/bug63740.phpt
new file mode 100644
index 0000000000..18c5a57d77
--- /dev/null
+++ b/ext/date/tests/bug63740.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #63740 (strtotime seems to use both sunday and monday as start of week)
+--FILE--
+<?php
+$dates = [
+ '2015-07-04',
+ '2015-07-05',
+ '2015-07-06',
+ '2015-07-07',
+ '2015-07-08',
+ '2015-07-09',
+ '2015-07-10',
+ '2015-07-11',
+ '2015-07-12',
+ '2015-07-13',
+ '2015-07-14',
+];
+
+foreach ( $dates as $date )
+{
+ $dt = new DateTimeImmutable( "$date 00:00 UTC" );
+
+ echo $dt->format( "D Y-m-d H:i" ), " → ";
+
+ $dtn = $dt->modify( "this week" );
+
+ echo $dtn->format( "D Y-m-d H:i" ), "\n";
+}
+?>
+--EXPECT--
+Sat 2015-07-04 00:00 → Mon 2015-06-29 00:00
+Sun 2015-07-05 00:00 → Mon 2015-06-29 00:00
+Mon 2015-07-06 00:00 → Mon 2015-07-06 00:00
+Tue 2015-07-07 00:00 → Mon 2015-07-06 00:00
+Wed 2015-07-08 00:00 → Mon 2015-07-06 00:00
+Thu 2015-07-09 00:00 → Mon 2015-07-06 00:00
+Fri 2015-07-10 00:00 → Mon 2015-07-06 00:00
+Sat 2015-07-11 00:00 → Mon 2015-07-06 00:00
+Sun 2015-07-12 00:00 → Mon 2015-07-06 00:00
+Mon 2015-07-13 00:00 → Mon 2015-07-13 00:00
+Tue 2015-07-14 00:00 → Mon 2015-07-13 00:00
diff --git a/ext/date/tests/bug66985.phpt b/ext/date/tests/bug66985.phpt
index 0045ca29d6..37dcd3e80d 100644
--- a/ext/date/tests/bug66985.phpt
+++ b/ext/date/tests/bug66985.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #66986 (Some timezones are no longer valid in PHP 5.5.10)
+Bug #66985 (Some timezones are no longer valid in PHP 5.5.10)
--FILE--
<?php
$zones = array(
diff --git a/ext/date/tests/bug68078.phpt b/ext/date/tests/bug68078.phpt
new file mode 100644
index 0000000000..20be0a49c8
--- /dev/null
+++ b/ext/date/tests/bug68078.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Comparing datetime objects should account for microseconds
+--FILE--
+<?php
+
+date_default_timezone_set('UTC');
+$date1 = DateTime::createFromFormat('U.u', '1448889063.3531');
+$date2 = DateTime::createFromFormat('U.u', '1448889063.5216');
+$date3 = DateTime::createFromFormat('U.u', '1448889063.5216');
+
+var_dump($date1 == $date2);
+var_dump($date1 < $date2);
+var_dump($date2 > $date1);
+var_dump($date2 == $date3);
+--EXPECT--
+bool(false)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/date/tests/bug68078_negative.phpt b/ext/date/tests/bug68078_negative.phpt
new file mode 100644
index 0000000000..93b7715fe5
--- /dev/null
+++ b/ext/date/tests/bug68078_negative.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Comparing datetime objects with negative timestamps should account for microseconds
+--FILE--
+<?php
+
+date_default_timezone_set('UTC');
+$earlyDate1 = DateTime::createFromFormat('U.u', '1.8642')->modify('-5 seconds');
+$earlyDate2 = DateTime::createFromFormat('U.u', '1.2768')->modify('-5 seconds');
+$earlyDate3 = DateTime::createFromFormat('U.u', '1.2768')->modify('-5 seconds');
+
+var_dump($earlyDate1 == $earlyDate2);
+var_dump($earlyDate1 < $earlyDate2);
+var_dump($earlyDate2 > $earlyDate1);
+var_dump($earlyDate2 == $earlyDate3);
+--EXPECT--
+bool(false)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/date/tests/bug70245.phpt b/ext/date/tests/bug70245.phpt
new file mode 100644
index 0000000000..4bf6256600
--- /dev/null
+++ b/ext/date/tests/bug70245.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70245 (strtotime does not emit warning when 2nd parameter is object or string)
+--FILE--
+<?php
+$d = new DateTime('2011-01-15 00:00:00');
+var_dump(strtotime('-1 month', $d));
+?>
+--EXPECTF--
+Warning: strtotime() expects parameter 2 to be integer, object given in %sbug70245.php on line %d
+bool(false)
diff --git a/ext/date/tests/bug70266.phpt b/ext/date/tests/bug70266.phpt
new file mode 100644
index 0000000000..5eeebabab8
--- /dev/null
+++ b/ext/date/tests/bug70266.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #70266 (DateInterval::__construct.interval_spec is not supposed to be optional)
+--FILE--
+<?php
+var_dump((new ReflectionParameter(['DateInterval', '__construct'], 0))->isOptional());
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/date/tests/bug70277.phpt b/ext/date/tests/bug70277.phpt
new file mode 100644
index 0000000000..648bd19c77
--- /dev/null
+++ b/ext/date/tests/bug70277.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70277 (new DateTimeZone($foo) is ignoring text after null byte)
+--FILE--
+<?php
+$timezone = "Europe/Zurich\0Foo";
+var_dump(timezone_open($timezone));
+var_dump(new DateTimeZone($timezone));
+?>
+--EXPECTF--
+Warning: timezone_open(): Timezone must not contain null bytes in %sbug70277.php on line %d
+bool(false)
+
+Fatal error: Uncaught Exception: DateTimeZone::__construct(): Timezone must not contain null bytes in %sbug70277.php:%d
+Stack trace:
+#0 %sbug70277.php(%d): DateTimeZone->__construct('Europe/Zurich\x00F...')
+#1 {main}
+ thrown in %sbug70277.php on line %d
diff --git a/ext/date/tests/bug71525.phpt b/ext/date/tests/bug71525.phpt
new file mode 100644
index 0000000000..d0c99e4f84
--- /dev/null
+++ b/ext/date/tests/bug71525.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #71525 (Calls to date_modify will mutate timelib_rel_time, causing date_date_set issues)
+--INI--
+date.timezone=UTC
+--FILE--
+<?php
+$date = new DateTime('2011-12-25 00:00:00');
+$date->modify('first day of next month');
+$date->setDate('2012', '1', '29');
+var_dump($date);
+
+--EXPECTF--
+object(DateTime)#%d (3) {
+ ["date"]=>
+ string(26) "2012-01-29 00:00:00.000000"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(3) "UTC"
+}
diff --git a/ext/date/tests/bug71635.phpt b/ext/date/tests/bug71635.phpt
new file mode 100644
index 0000000000..8c5ae25db3
--- /dev/null
+++ b/ext/date/tests/bug71635.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #71635 (segfault in DatePeriod::getEndDate() when no end date has been set)
+--FILE--
+<?php
+date_default_timezone_set('UTC');
+$period = new DatePeriod(new DateTimeImmutable("now"), new DateInterval("P2Y4DT6H8M"), 2);
+
+var_dump($period->getEndDate());
+?>
+--EXPECT--
+NULL \ No newline at end of file
diff --git a/ext/date/tests/bug71889.phpt b/ext/date/tests/bug71889.phpt
new file mode 100644
index 0000000000..129930a1fc
--- /dev/null
+++ b/ext/date/tests/bug71889.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #71889 (DateInterval::format segfault on '%' input)
+--INI--
+date.timezone=US/Eastern
+--FILE--
+<?php
+$di = new DateInterval('P1D');
+var_dump($di->format("%"));
+?>
+--EXPECT--
+string(0) ""
diff --git a/ext/date/tests/date_sun_info_003.phpt b/ext/date/tests/date_sun_info_003.phpt
new file mode 100644
index 0000000000..3ff7a06df1
--- /dev/null
+++ b/ext/date/tests/date_sun_info_003.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Test basic date_sun_info()
+--CREDITS--
+edgarsandi - <edgar.r.sandi@gmail.com>
+--FILE--
+<?php
+date_default_timezone_set('America/Sao_Paulo');
+$sun_info = date_sun_info(strtotime("2015-01-12 00:00:00 UTC"), 89.00, 1.00);
+foreach ($sun_info as $key => $elem ) {
+ echo "$key: " . date("H:i:s", $elem) . "\n";
+}
+
+echo "\n";
+
+$sun_info = date_sun_info(strtotime("2015-09-12 00:00:00 UTC"), 89.00, 1.00);
+foreach ($sun_info as $key => $elem ) {
+ echo "$key: " . date("H:i:s", $elem) . "\n";
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+sunrise: 21:00:00
+sunset: 21:00:00
+transit: 10:04:02
+civil_twilight_begin: 21:00:00
+civil_twilight_end: 21:00:00
+nautical_twilight_begin: 21:00:00
+nautical_twilight_end: 21:00:00
+astronomical_twilight_begin: 21:00:00
+astronomical_twilight_end: 21:00:00
+
+sunrise: 21:00:01
+sunset: 21:00:01
+transit: 08:52:30
+civil_twilight_begin: 21:00:01
+civil_twilight_end: 21:00:01
+nautical_twilight_begin: 21:00:01
+nautical_twilight_end: 21:00:01
+astronomical_twilight_begin: 21:00:01
+astronomical_twilight_end: 21:00:01
+Done \ No newline at end of file
diff --git a/ext/date/tests/gmmktime_basic.phpt b/ext/date/tests/gmmktime_basic.phpt
index 81abb5f2b2..58777ef771 100644
--- a/ext/date/tests/gmmktime_basic.phpt
+++ b/ext/date/tests/gmmktime_basic.phpt
@@ -30,6 +30,6 @@ var_dump( gmmktime() );
*** Testing gmmktime() : basic functionality ***
int(1218182888)
-Strict Standards: gmmktime(): You should be using the time() function instead in %s on line %d
+Deprecated: gmmktime(): You should be using the time() function instead in %s on line %d
int(%d)
===DONE===
diff --git a/ext/date/tests/mktime_error.phpt b/ext/date/tests/mktime_error.phpt
index eb1cc6e19a..9e3e872cb5 100644
--- a/ext/date/tests/mktime_error.phpt
+++ b/ext/date/tests/mktime_error.phpt
@@ -34,7 +34,7 @@ var_dump( mktime($hour, $minute, $sec, $month, $day, $year, $extra_arg) );
-- Testing mktime() function with Zero arguments --
-Strict Standards: mktime(): You should be using the time() function instead in %s on line %d
+Deprecated: mktime(): You should be using the time() function instead in %s on line %d
int(%d)
-- Testing mktime() function with more than expected no. of arguments --
diff --git a/ext/dba/config.m4 b/ext/dba/config.m4
index 5442bb1415..740cf14e39 100644
--- a/ext/dba/config.m4
+++ b/ext/dba/config.m4
@@ -320,6 +320,10 @@ if test "$PHP_DB4" != "no"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/db4/db.h
break
+ elif test -f "$i/include/db5.3/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db5.3/db.h
+ break
elif test -f "$i/include/db5.1/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db5.1/db.h
@@ -362,7 +366,7 @@ if test "$PHP_DB4" != "no"; then
break
fi
done
- PHP_DBA_DB_CHECK(4, db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
+ PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
PHP_DBA_STD_RESULT(db4,Berkeley DB4)
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 5b73c7d3fb..fd4522b9d6 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -209,7 +209,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
if (zend_hash_num_elements(Z_ARRVAL_P(key)) != 2) {
php_error_docref(NULL, E_RECOVERABLE_ERROR, "Key does not have exactly two elements: (key, name)");
- return -1;
+ return 0;
}
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(key), &pos);
group = zend_hash_get_current_data_ex(Z_ARRVAL_P(key), &pos);
@@ -232,9 +232,10 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
ZVAL_COPY(&tmp, key);
convert_to_string(&tmp);
- *key_free = *key_str = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
len = Z_STRLEN(tmp);
-
+ if (len) {
+ *key_free = *key_str = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
+ }
zval_ptr_dtor(&tmp);
return len;
}
@@ -281,8 +282,14 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
RETURN_FALSE; \
}
-#define DBA_ID_GET2 DBA_ID_PARS; DBA_GET2; DBA_FETCH_RESOURCE(info, id)
-#define DBA_ID_GET2_3 DBA_ID_PARS; DBA_GET2_3; DBA_FETCH_RESOURCE(info, id)
+#define DBA_FETCH_RESOURCE_WITH_ID(info, id) \
+ if ((info = (dba_info *)zend_fetch_resource2(Z_RES_P(id), "DBA identifier", le_db, le_pdb)) == NULL) { \
+ DBA_ID_DONE; \
+ RETURN_FALSE; \
+ }
+
+#define DBA_ID_GET2 DBA_ID_PARS; DBA_GET2; DBA_FETCH_RESOURCE_WITH_ID(info, id)
+#define DBA_ID_GET2_3 DBA_ID_PARS; DBA_GET2_3; DBA_FETCH_RESOURCE_WITH_ID(info, id)
#define DBA_ID_DONE \
if (key_free) efree(key_free)
@@ -578,7 +585,7 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
RETURN_FALSE;
}
- DBA_FETCH_RESOURCE(info, id);
+ DBA_FETCH_RESOURCE_WITH_ID(info, id);
DBA_WRITE_CHECK_WITH_ID;
@@ -651,11 +658,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
/* we only take string arguments */
for (i = 0; i < ac; i++) {
- if (Z_TYPE(args[i]) != IS_STRING) {
- convert_to_string_ex(&args[i]);
- } else if (Z_REFCOUNTED(args[i])) {
- Z_ADDREF(args[i]);
- }
+ ZVAL_STR(&args[i], zval_get_string(&args[i]));
keylen += Z_STRLEN(args[i]);
}
diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c
index edc1c29bbb..7e2c51ddc0 100644
--- a/ext/dba/dba_cdb.c
+++ b/ext/dba/dba_cdb.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c
index dfd6c5e025..4e3691f9cb 100644
--- a/ext/dba/dba_db1.c
+++ b/ext/dba/dba_db1.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c
index d12f805bf9..71c323d6e8 100644
--- a/ext/dba/dba_db2.c
+++ b/ext/dba/dba_db2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c
index a582ad5821..0bf055597a 100644
--- a/ext/dba/dba_db3.c
+++ b/ext/dba/dba_db3.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c
index 83fd26af6e..f48bd1b68d 100644
--- a/ext/dba/dba_db4.c
+++ b/ext/dba/dba_db4.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index 69f8b5937a..c7fc04e56f 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c
index 0ec98057da..6cab2aebaf 100644
--- a/ext/dba/dba_flatfile.c
+++ b/ext/dba/dba_flatfile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 35dea95a5b..3e8e09b55f 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c
index fb10e02596..afd1b2b6f6 100644
--- a/ext/dba/dba_inifile.c
+++ b/ext/dba/dba_inifile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c
index 68d8e7546c..d0ad35b8c4 100644
--- a/ext/dba/dba_ndbm.c
+++ b/ext/dba/dba_ndbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c
index 04d1dde823..472e4abb15 100644
--- a/ext/dba/dba_qdbm.c
+++ b/ext/dba/dba_qdbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_tcadb.c b/ext/dba/dba_tcadb.c
index f636305e70..99bf39da85 100644
--- a/ext/dba/dba_tcadb.c
+++ b/ext/dba/dba_tcadb.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c
index 43ffee2a39..72ecea30ff 100644
--- a/ext/dba/libcdb/cdb.c
+++ b/ext/dba/libcdb/cdb.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libcdb/cdb.h b/ext/dba/libcdb/cdb.h
index f7cb347df9..18f55d5a6a 100644
--- a/ext/dba/libcdb/cdb.h
+++ b/ext/dba/libcdb/cdb.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libcdb/cdb_make.c b/ext/dba/libcdb/cdb_make.c
index 60ac8fc552..b1e33abb9b 100644
--- a/ext/dba/libcdb/cdb_make.c
+++ b/ext/dba/libcdb/cdb_make.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libcdb/cdb_make.h b/ext/dba/libcdb/cdb_make.h
index ad70907160..cc043d961b 100644
--- a/ext/dba/libcdb/cdb_make.h
+++ b/ext/dba/libcdb/cdb_make.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libcdb/uint32.c b/ext/dba/libcdb/uint32.c
index a064280dad..4ce38876c3 100644
--- a/ext/dba/libcdb/uint32.c
+++ b/ext/dba/libcdb/uint32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libcdb/uint32.h b/ext/dba/libcdb/uint32.h
index bd95b54f3f..450938efdf 100644
--- a/ext/dba/libcdb/uint32.h
+++ b/ext/dba/libcdb/uint32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libflatfile/flatfile.c b/ext/dba/libflatfile/flatfile.c
index f640e19334..9d4be74593 100644
--- a/ext/dba/libflatfile/flatfile.c
+++ b/ext/dba/libflatfile/flatfile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libflatfile/flatfile.h b/ext/dba/libflatfile/flatfile.h
index 38b3e14709..803dec1505 100644
--- a/ext/dba/libflatfile/flatfile.h
+++ b/ext/dba/libflatfile/flatfile.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c
index ced249e889..f5b5ea2aa8 100644
--- a/ext/dba/libinifile/inifile.c
+++ b/ext/dba/libinifile/inifile.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h
index 841b88c89f..d24ab734a5 100644
--- a/ext/dba/libinifile/inifile.h
+++ b/ext/dba/libinifile/inifile.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h
index aef4ceae7d..a0d291a66d 100644
--- a/ext/dba/php_dba.h
+++ b/ext/dba/php_dba.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -129,8 +129,6 @@ typedef struct dba_handler {
DBA_SYNC_FUNC(x); \
DBA_INFO_FUNC(x)
-#define VALLEN(p) Z_STRVAL_PP(p), Z_STRLEN_PP(p)
-
PHP_FUNCTION(dba_open);
PHP_FUNCTION(dba_popen);
PHP_FUNCTION(dba_close);
diff --git a/ext/dba/php_tcadb.h b/ext/dba/php_tcadb.h
index 6208723612..200bfeb1fd 100644
--- a/ext/dba/php_tcadb.h
+++ b/ext/dba/php_tcadb.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/tests/bug72157.phpt b/ext/dba/tests/bug72157.phpt
new file mode 100644
index 0000000000..7b3217012a
--- /dev/null
+++ b/ext/dba/tests/bug72157.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #72157 (use-after-free caused by dba_open)
+--SKIPIF--
+<?php
+ require_once(dirname(__FILE__) .'/skipif.inc');
+?>
+--FILE--
+<?php
+$var0 = fopen(__FILE__,"r");
+$var5 = dba_open(null,$var0);
+$var5 = dba_open(null,$var0);
+$var5 = dba_open(null,$var0);
+$var5 = dba_open($var0,$var0);
+?>
+--EXPECTF--
+Warning: dba_open(,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d
+
+Warning: dba_open(,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d
+
+Warning: dba_open(,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d
+
+Warning: dba_open(Resource id #5,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d
diff --git a/ext/dom/attr.c b/ext/dom/attr.c
index e1896ce56d..111ab8daba 100644
--- a/ext/dom/attr.c
+++ b/ext/dom/attr.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c
index e6b7e33bce..ade539d479 100644
--- a/ext/dom/cdatasection.c
+++ b/ext/dom/cdatasection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c
index 9daa24dbe6..d0032b284d 100644
--- a/ext/dom/characterdata.c
+++ b/ext/dom/characterdata.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -173,7 +173,7 @@ PHP_FUNCTION(dom_characterdata_substring_data)
length = xmlUTF8Strlen(cur);
- if (offset < 0 || count < 0 || offset > length) {
+ if (offset < 0 || count < 0 || ZEND_LONG_INT_OVFL(offset) || ZEND_LONG_INT_OVFL(count) || offset > length) {
xmlFree(cur);
php_dom_throw_error(INDEX_SIZE_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
@@ -183,7 +183,7 @@ PHP_FUNCTION(dom_characterdata_substring_data)
count = length - offset;
}
- substring = xmlUTF8Strsub(cur, offset, count);
+ substring = xmlUTF8Strsub(cur, (int)offset, (int)count);
xmlFree(cur);
if (substring) {
@@ -257,14 +257,14 @@ PHP_FUNCTION(dom_characterdata_insert_data)
length = xmlUTF8Strlen(cur);
- if (offset < 0 || offset > length) {
+ if (offset < 0 || ZEND_LONG_INT_OVFL(offset) || offset > length) {
xmlFree(cur);
php_dom_throw_error(INDEX_SIZE_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
- first = xmlUTF8Strndup(cur, offset);
- second = xmlUTF8Strsub(cur, offset, length - offset);
+ first = xmlUTF8Strndup(cur, (int)offset);
+ second = xmlUTF8Strsub(cur, (int)offset, length - (int)offset);
xmlFree(cur);
xmlNodeSetContent(node, first);
@@ -304,14 +304,14 @@ PHP_FUNCTION(dom_characterdata_delete_data)
length = xmlUTF8Strlen(cur);
- if (offset < 0 || count < 0 || offset > length) {
+ if (offset < 0 || count < 0 || ZEND_LONG_INT_OVFL(offset) || ZEND_LONG_INT_OVFL(count) || offset > length) {
xmlFree(cur);
php_dom_throw_error(INDEX_SIZE_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
if (offset > 0) {
- substring = xmlUTF8Strsub(cur, 0, offset);
+ substring = xmlUTF8Strsub(cur, 0, (int)offset);
} else {
substring = NULL;
}
@@ -320,7 +320,7 @@ PHP_FUNCTION(dom_characterdata_delete_data)
count = length - offset;
}
- second = xmlUTF8Strsub(cur, offset + count, length - offset);
+ second = xmlUTF8Strsub(cur, (int)offset + (int)count, length - (int)offset);
substring = xmlStrcat(substring, second);
xmlNodeSetContent(node, substring);
@@ -361,14 +361,14 @@ PHP_FUNCTION(dom_characterdata_replace_data)
length = xmlUTF8Strlen(cur);
- if (offset < 0 || count < 0 || offset > length) {
+ if (offset < 0 || count < 0 || ZEND_LONG_INT_OVFL(offset) || ZEND_LONG_INT_OVFL(count) || offset > length) {
xmlFree(cur);
php_dom_throw_error(INDEX_SIZE_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
if (offset > 0) {
- substring = xmlUTF8Strsub(cur, 0, offset);
+ substring = xmlUTF8Strsub(cur, 0, (int)offset);
} else {
substring = NULL;
}
@@ -378,7 +378,7 @@ PHP_FUNCTION(dom_characterdata_replace_data)
}
if (offset < length) {
- second = xmlUTF8Strsub(cur, offset + count, length - offset);
+ second = xmlUTF8Strsub(cur, (int)offset + count, length - (int)offset);
}
substring = xmlStrcat(substring, (xmlChar *) arg);
diff --git a/ext/dom/comment.c b/ext/dom/comment.c
index 4dc016ae3b..983aa30cd0 100644
--- a/ext/dom/comment.c
+++ b/ext/dom/comment.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 288075c079..eabc032a1b 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -133,6 +133,7 @@ ZEND_END_ARG_INFO();
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savexml, 0, 0, 0)
ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
+ ZEND_ARG_INFO(0, options)
ZEND_END_ARG_INFO();
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_construct, 0, 0, 0)
@@ -381,7 +382,7 @@ int dom_document_standalone_read(dom_object *obj, zval *retval)
int dom_document_standalone_write(dom_object *obj, zval *newval)
{
xmlDoc *docp = (xmlDocPtr) dom_object_get_node(obj);
- int standalone;
+ zend_long standalone;
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0);
@@ -977,9 +978,9 @@ PHP_FUNCTION(dom_document_import_node)
xmlNodePtr nodep, retnodep;
dom_object *intern, *nodeobj;
int ret;
- zend_long recursive = 0;
+ zend_bool recursive = 0;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|b", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
return;
}
@@ -1492,6 +1493,14 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) {
php_error_docref(NULL, E_WARNING, "Empty string supplied as input");
RETURN_FALSE;
}
+ if (ZEND_SIZE_T_INT_OVFL(source_len)) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+ if (ZEND_LONG_EXCEEDS_INT(options)) {
+ php_error_docref(NULL, E_WARNING, "Invalid options");
+ RETURN_FALSE;
+ }
newdoc = dom_document_parser(id, mode, source, source_len, options);
@@ -1719,9 +1728,14 @@ PHP_FUNCTION(dom_document_xinclude)
return;
}
+ if (ZEND_LONG_EXCEEDS_INT(flags)) {
+ php_error_docref(NULL, E_WARNING, "Invalid flags");
+ RETURN_FALSE;
+ }
+
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
- err = xmlXIncludeProcessFlags(docp, flags);
+ err = xmlXIncludeProcessFlags(docp, (int)flags);
/* XML_XINCLUDE_START and XML_XINCLUDE_END nodes need to be removed as these
are added via xmlXIncludeProcess to mark beginning and ending of xincluded document
@@ -1810,7 +1824,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
php_error_docref(NULL, E_WARNING, "Invalid Schema file source");
RETURN_FALSE;
}
- valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
+ valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
if (!valid_file) {
php_error_docref(NULL, E_WARNING, "Invalid Schema file source");
RETURN_FALSE;
@@ -1910,7 +1924,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
php_error_docref(NULL, E_WARNING, "Invalid RelaxNG file source");
RETURN_FALSE;
}
- valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
+ valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN);
if (!valid_file) {
php_error_docref(NULL, E_WARNING, "Invalid RelaxNG file source");
RETURN_FALSE;
@@ -2000,6 +2014,11 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
RETURN_FALSE;
}
+ if (ZEND_LONG_EXCEEDS_INT(options)) {
+ php_error_docref(NULL, E_WARNING, "Invalid options");
+ RETURN_FALSE;
+ }
+
if (mode == DOM_LOAD_FILE) {
if (CHECK_NULL_PATH(source, source_len)) {
php_error_docref(NULL, E_WARNING, "Invalid file source");
@@ -2008,7 +2027,11 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
ctxt = htmlCreateFileParserCtxt(source, NULL);
} else {
source_len = xmlStrlen((xmlChar *) source);
- ctxt = htmlCreateMemoryParserCtxt(source, source_len);
+ if (ZEND_SIZE_T_INT_OVFL(source_len)) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+ ctxt = htmlCreateMemoryParserCtxt(source, (int)source_len);
}
if (!ctxt) {
@@ -2016,7 +2039,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
}
if (options) {
- htmlCtxtUseOptions(ctxt, options);
+ htmlCtxtUseOptions(ctxt, (int)options);
}
ctxt->vctxt.error = php_libxml_ctx_error;
diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c
index 05494ea8c3..05012df6c8 100644
--- a/ext/dom/documentfragment.c
+++ b/ext/dom/documentfragment.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c
index c65902e759..9a10d63508 100644
--- a/ext/dom/documenttype.c
+++ b/ext/dom/documenttype.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -193,7 +193,7 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval *retval)
#ifdef LIBXML2_NEW_BUFFER
smart_str_appendl(&ret_buf, (const char *) xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff));
#else
- smart_str_appendl(&ret_buf, buff->buffer->content, buff->buffer->use);
+ smart_str_appendl(&ret_buf, (char *) buff->buffer->content, buff->buffer->use);
#endif
(void)xmlOutputBufferClose(buff);
diff --git a/ext/dom/dom_ce.h b/ext/dom/dom_ce.h
index b77ce0a31f..cfd48d283a 100644
--- a/ext/dom/dom_ce.h
+++ b/ext/dom/dom_ce.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h
index cc1e7d9ddb..16b6b57df6 100644
--- a/ext/dom/dom_fe.h
+++ b/ext/dom/dom_fe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c
index a96b6bfe9a..f070211852 100644
--- a/ext/dom/dom_iterators.c
+++ b/ext/dom/dom_iterators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/dom_properties.h b/ext/dom/dom_properties.h
index 10d0b0cb4a..ed5e4c3c1c 100644
--- a/ext/dom/dom_properties.h
+++ b/ext/dom/dom_properties.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domconfiguration.c b/ext/dom/domconfiguration.c
index 71c955a2fa..71f94b33a6 100644
--- a/ext/dom/domconfiguration.c
+++ b/ext/dom/domconfiguration.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domerror.c b/ext/dom/domerror.c
index c1a947bd81..6f1caaba69 100644
--- a/ext/dom/domerror.c
+++ b/ext/dom/domerror.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c
index 411ebfa8eb..f406464cce 100644
--- a/ext/dom/domerrorhandler.c
+++ b/ext/dom/domerrorhandler.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c
index c9a33b294e..13cdca4994 100644
--- a/ext/dom/domexception.c
+++ b/ext/dom/domexception.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index df24bddcb7..63069b3061 100644
--- a/ext/dom/domimplementation.c
+++ b/ext/dom/domimplementation.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domimplementationlist.c b/ext/dom/domimplementationlist.c
index b8d89f63e8..e43f7d14fa 100644
--- a/ext/dom/domimplementationlist.c
+++ b/ext/dom/domimplementationlist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domimplementationsource.c b/ext/dom/domimplementationsource.c
index 909faa4136..15d277a140 100644
--- a/ext/dom/domimplementationsource.c
+++ b/ext/dom/domimplementationsource.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domlocator.c b/ext/dom/domlocator.c
index 0b47da759e..952e53fd2d 100644
--- a/ext/dom/domlocator.c
+++ b/ext/dom/domlocator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/domstringlist.c b/ext/dom/domstringlist.c
index 0cc2d814f6..8ff054b0a7 100644
--- a/ext/dom/domstringlist.c
+++ b/ext/dom/domstringlist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/element.c b/ext/dom/element.c
index faeff9e389..4f4f0143ca 100644
--- a/ext/dom/element.c
+++ b/ext/dom/element.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/entity.c b/ext/dom/entity.c
index 12541ccee1..4cb6ed0463 100644
--- a/ext/dom/entity.c
+++ b/ext/dom/entity.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c
index ba609fd0f3..836f861553 100644
--- a/ext/dom/entityreference.c
+++ b/ext/dom/entityreference.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c
index eb2fe25f01..ebce17f76c 100644
--- a/ext/dom/namednodemap.c
+++ b/ext/dom/namednodemap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -214,6 +214,11 @@ PHP_FUNCTION(dom_namednodemap_item)
return;
}
if (index >= 0) {
+ if (ZEND_LONG_INT_OVFL(index)) {
+ php_error_docref(NULL, E_WARNING, "Invalid index");
+ RETURN_NULL();
+ }
+
intern = Z_DOMOBJ_P(id);
objmap = (dom_nnodemap_object *)intern->ptr;
diff --git a/ext/dom/namelist.c b/ext/dom/namelist.c
index 463b896f96..40afaa594d 100644
--- a/ext/dom/namelist.c
+++ b/ext/dom/namelist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 2023073705..4579b547d5 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -847,7 +847,6 @@ int dom_node_text_content_write(dom_object *obj, zval *newval)
{
xmlNode *nodep = dom_object_get_node(obj);
zend_string *str;
- xmlChar *enc_str;
if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0);
@@ -855,9 +854,9 @@ int dom_node_text_content_write(dom_object *obj, zval *newval)
}
str = zval_get_string(newval);
- enc_str = xmlEncodeEntitiesReentrant(nodep->doc, (xmlChar *) ZSTR_VAL(str));
- xmlNodeSetContent(nodep, enc_str);
- xmlFree(enc_str);
+ /* we have to use xmlNodeAddContent() to get the same behavior as with xmlNewText() */
+ xmlNodeSetContent(nodep, (xmlChar *) "");
+ xmlNodeAddContent(nodep, ZSTR_VAL(str));
zend_string_release(str);
return SUCCESS;
@@ -1349,9 +1348,9 @@ PHP_FUNCTION(dom_node_clone_node)
xmlNode *n, *node;
int ret;
dom_object *intern;
- zend_long recursive = 0;
+ zend_bool recursive = 0;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|l", &id, dom_node_class_entry, &recursive) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|b", &id, dom_node_class_entry, &recursive) == FAILURE) {
return;
}
diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c
index a5f6c63f7d..c70ab12657 100644
--- a/ext/dom/nodelist.c
+++ b/ext/dom/nodelist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/notation.c b/ext/dom/notation.c
index 109eeca9cf..991ceb00f9 100644
--- a/ext/dom/notation.c
+++ b/ext/dom/notation.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 6cb198db57..c079ba5753 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -506,7 +506,6 @@ static zend_object *dom_objects_store_clone_obj(zval *zobject) /* {{{ */
dom_object *clone = dom_objects_set_class(intern->std.ce, 0);
clone->std.handlers = dom_get_obj_handlers();
- zend_objects_clone_members(&clone->std, &intern->std);
if (instanceof_function(intern->std.ce, dom_node_class_entry)) {
xmlNodePtr node = (xmlNodePtr)dom_object_get_node(intern);
@@ -527,6 +526,8 @@ static zend_object *dom_objects_store_clone_obj(zval *zobject) /* {{{ */
}
}
+ zend_objects_clone_members(&clone->std, &intern->std);
+
return &clone->std;
}
/* }}} */
@@ -1055,7 +1056,8 @@ void dom_namednode_iter(dom_object *basenode, int ntype, dom_object *intern, xml
{
dom_nnodemap_object *mapptr = (dom_nnodemap_object *) intern->ptr;
- //??? if (basenode)
+ ZEND_ASSERT(basenode != NULL);
+
ZVAL_OBJ(&mapptr->baseobj_zv, &basenode->std);
Z_ADDREF(mapptr->baseobj_zv);
@@ -1097,7 +1099,7 @@ zend_object *dom_objects_new(zend_class_entry *class_type)
/* }}} */
#if defined(LIBXML_XPATH_ENABLED)
-/* {{{ zend_object_value dom_xpath_objects_new(zend_class_entry *class_type) */
+/* {{{ zend_object dom_xpath_objects_new(zend_class_entry *class_type) */
zend_object *dom_xpath_objects_new(zend_class_entry *class_type)
{
dom_xpath_object *intern = ecalloc(1, sizeof(dom_xpath_object) + zend_object_properties_size(class_type));
diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h
index 5e069529ba..d0329ac2ed 100644
--- a/ext/dom/php_dom.h
+++ b/ext/dom/php_dom.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c
index 7a0285f313..c8804acce8 100644
--- a/ext/dom/processinginstruction.c
+++ b/ext/dom/processinginstruction.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/string_extend.c b/ext/dom/string_extend.c
index 20c1fe55b5..02ae50efe1 100644
--- a/ext/dom/string_extend.c
+++ b/ext/dom/string_extend.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/tests/bug70001.phpt b/ext/dom/tests/bug70001.phpt
new file mode 100644
index 0000000000..7a8c291d4b
--- /dev/null
+++ b/ext/dom/tests/bug70001.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70001 (Assigning to DOMNode::textContent does additional entity encoding)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$element = new DOMText('<p>foo & bar</p>');
+var_dump($element->textContent);
+$element = (new DOMDocument())->createTextNode('<p>foo & bar</p>');
+var_dump($element->textContent);
+$element->textContent = ('<p>foo & bar</p>');
+var_dump($element->textContent);
+?>
+--EXPECT--
+string(16) "<p>foo & bar</p>"
+string(16) "<p>foo & bar</p>"
+string(16) "<p>foo & bar</p>"
diff --git a/ext/dom/tests/bug70558.phpt b/ext/dom/tests/bug70558.phpt
new file mode 100644
index 0000000000..c2d53d893d
--- /dev/null
+++ b/ext/dom/tests/bug70558.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70558 ("Couldn't fetch" error in DOMDocument::registerNodeClass())
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+class X extends \DOMDocument {
+
+ public function __clone() {
+ var_dump($this->registerNodeClass('DOMDocument', 'X'));
+ }
+}
+
+$dom = clone (new X());
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/dom/tests/node_textcontent.phpt b/ext/dom/tests/node_textcontent.phpt
index f7312885ba..288278412f 100644
--- a/ext/dom/tests/node_textcontent.phpt
+++ b/ext/dom/tests/node_textcontent.phpt
@@ -1,7 +1,10 @@
--TEST--
Testing reading and writing to DOMNode::textContent
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+if (LIBXML_VERSION < 20707) die ('skip requires libxml2-2.7.7 or higher');
+?>
--FILE--
<?php
/*
diff --git a/ext/dom/text.c b/ext/dom/text.c
index bdd6e38f40..2095543400 100644
--- a/ext/dom/text.c
+++ b/ext/dom/text.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -164,13 +164,13 @@ PHP_FUNCTION(dom_text_split_text)
}
length = xmlUTF8Strlen(cur);
- if (offset > length || offset < 0) {
+ if (ZEND_LONG_INT_OVFL(offset) || (int)offset > length || offset < 0) {
xmlFree(cur);
RETURN_FALSE;
}
- first = xmlUTF8Strndup(cur, offset);
- second = xmlUTF8Strsub(cur, offset, length - offset);
+ first = xmlUTF8Strndup(cur, (int)offset);
+ second = xmlUTF8Strsub(cur, (int)offset, (int)(length - offset));
xmlFree(cur);
diff --git a/ext/dom/typeinfo.c b/ext/dom/typeinfo.c
index c8c10dd6ff..8c7edcd292 100644
--- a/ext/dom/typeinfo.c
+++ b/ext/dom/typeinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/userdatahandler.c b/ext/dom/userdatahandler.c
index 3a104812a4..c492f19939 100644
--- a/ext/dom/userdatahandler.c
+++ b/ext/dom/userdatahandler.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h
index 325a5d9ef2..de5f99412b 100644
--- a/ext/dom/xml_common.h
+++ b/ext/dom/xml_common.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index 6e7d7519c7..e31dcefb78 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -171,7 +171,6 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
}
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
obj = valuePop(ctxt);
if (obj->stringval == NULL) {
@@ -188,7 +187,6 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
ZVAL_STRING(&fci.function_name, (char *) obj->stringval);
xmlXPathFreeObject(obj);
- fci.symbol_table = NULL;
fci.object = NULL;
fci.retval = &retval;
fci.no_separation = 0;
@@ -209,7 +207,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
ALLOC_HASHTABLE(intern->node_list);
zend_hash_init(intern->node_list, 0, NULL, ZVAL_PTR_DTOR, 0);
}
- GC_REFCOUNT(&retval)++;
+ Z_ADDREF(retval);
zend_hash_next_index_insert(intern->node_list, &retval);
obj = Z_DOMOBJ_P(&retval);
nodep = dom_object_get_node(obj);
@@ -474,7 +472,7 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
break;
case XPATH_NUMBER:
- RETVAL_DOUBLE(xpathobjp->floatval)
+ RETVAL_DOUBLE(xpathobjp->floatval);
break;
case XPATH_STRING:
diff --git a/ext/enchant/config.m4 b/ext/enchant/config.m4
index db8a69c5d1..d870cac667 100755
--- a/ext/enchant/config.m4
+++ b/ext/enchant/config.m4
@@ -37,6 +37,6 @@ if test "$PHP_ENCHANT" != "no"; then
[
AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ])
AC_DEFINE(ENCHANT_VERSION_STRING, "1.5.x", [ ])
- ], [], [ -L$ENCHANT_LIB $ENCHANT_SHARED_LIBADD])
+ ], [], [ -L$ENCHANT_LIBDIR $ENCHANT_SHARED_LIBADD])
fi
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 15ec453a59..ef2634918f 100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -587,11 +587,7 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
RETURN_FALSE;
}
-#if PHP_API_VERSION < 20100412
- if ((PG(safe_mode) && (!php_checkuid(pwl, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(pwl)) {
-#else
if (php_check_open_basedir(pwl)) {
-#endif
RETURN_FALSE;
}
diff --git a/ext/enchant/php_enchant.h b/ext/enchant/php_enchant.h
index 55d460e1f6..1760b90184 100644
--- a/ext/enchant/php_enchant.h
+++ b/ext/enchant/php_enchant.h
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 4 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/enchant/tests/broker_describe.phpt b/ext/enchant/tests/broker_describe.phpt
index 4c03f6f4dd..224902f579 100644
--- a/ext/enchant/tests/broker_describe.phpt
+++ b/ext/enchant/tests/broker_describe.phpt
@@ -1,28 +1,40 @@
--TEST--
enchant_broker_describe() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
-<?php
+<?php
if(!extension_loaded('enchant')) die('skip, enchant not loader');
-
- ?>
+if(!enchant_broker_init()) die("failed, broker_init failure\n");
+?>
--FILE--
<?php
$broker = enchant_broker_init();
+$counter = 0;
-if(!$broker) exit("failed, broker_init failure\n");
-
-$provides = enchant_broker_describe($broker);
-
-if (is_array($provides)) {
- foreach ($provides as $backend) {
- if (!(isset($backend['name']) && isset($backend['desc']) && isset($backend['file']))) {
- exit("failed\n");
- }
+if($broker) {
+ echo("OK\n");
+ $provider = enchant_broker_describe($broker);
+
+ if (is_array($provider)) {
+ echo("OK\n");
+
+ if ((isset($provider[$counter]['name']) && isset($provider[$counter]['desc']) && isset($provider[$counter]['file']))) {
+ echo("OK\n");
+
+ } else {
+ echo("failed, broker describe\n");
+
}
- exit("OK\n");
+ } else {
+ echo "failed, brocker describe array \n";
+ }
+
} else {
- echo "failed";
+ echo("failed, broker_init failure\n");
}
?>
---EXPECTF--
+--EXPECT--
+OK
+OK
OK
diff --git a/ext/enchant/tests/broker_dict_exists.phpt b/ext/enchant/tests/broker_dict_exists.phpt
new file mode 100644
index 0000000000..4ea4fd610e
--- /dev/null
+++ b/ext/enchant/tests/broker_dict_exists.phpt
@@ -0,0 +1,23 @@
+--TEST--
+enchant_broker_dict_exists() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+
+if (enchant_broker_dict_exists($broker, $dicts[0]['lang_tag'])) {
+ echo("OK\n");
+} else {
+ echo("dicts dont exist failed\n");
+}
+?>
+--EXPECT--
+OK
diff --git a/ext/enchant/tests/broker_free.phpt b/ext/enchant/tests/broker_free.phpt
index d00c22a974..dd9149468d 100644
--- a/ext/enchant/tests/broker_free.phpt
+++ b/ext/enchant/tests/broker_free.phpt
@@ -1,18 +1,21 @@
--TEST--
enchant_broker_free() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
-<?php
+<?php
if(!extension_loaded('enchant')) die('skip, enchant not loader');
-
- ?>
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+?>
--FILE--
<?php
$broker = enchant_broker_init();
if (is_resource($broker)) {
- echo "OK\n";
- enchant_broker_free($broker);
-} else {
- exit("init failed\n");
+ echo "OK\n";
+ enchant_broker_free($broker);
+
+} else {
+ exit("init failed\n");
}
echo "OK\n";
?>
diff --git a/ext/enchant/tests/broker_free_01.phpt b/ext/enchant/tests/broker_free_01.phpt
new file mode 100644
index 0000000000..3de4c4b7e3
--- /dev/null
+++ b/ext/enchant/tests/broker_free_01.phpt
@@ -0,0 +1,29 @@
+--TEST--
+enchant_broker_free() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+if (is_resource($broker)) {
+ echo("OK\n");
+
+ if (enchant_broker_free($broker)) {
+ echo("OK\n");
+ } else {
+ echo("broker free failed\n");
+ }
+} else {
+ echo("init failed\n");
+}
+echo("OK\n");
+?>
+--EXPECT--
+OK
+OK
+OK
diff --git a/ext/enchant/tests/broker_free_02.phpt b/ext/enchant/tests/broker_free_02.phpt
new file mode 100644
index 0000000000..a777d889ae
--- /dev/null
+++ b/ext/enchant/tests/broker_free_02.phpt
@@ -0,0 +1,59 @@
+--TEST--
+enchant_broker_free() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if(!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if(!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$newWord = array("iLoveJava","iLoveJavascript","iLoveRuby","iLovePerl","iLoveAwk","iLoveC");
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ for($x=0;$x<count($newWord);$x++) {
+ $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord[$x]);
+ }
+
+ if (NULL === $AddtoPersonalDict) {
+ var_dump($AddtoPersonalDict);
+
+ if (enchant_broker_free_dict($requestDict)) {
+ echo("OK\n");
+
+ if (enchant_broker_free($broker)) {
+ echo("OK\n");
+
+ } else {
+ echo("broker free failed\n");
+ }
+ } else {
+ echo("broker dict free failed\n");
+ }
+ } else {
+ echo("dict add to personal failed\n");
+ }
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("init failed\n");
+}
+echo("OK\n");
+?>
+--EXPECT--
+OK
+OK
+NULL
+OK
+OK
+OK
diff --git a/ext/enchant/tests/broker_free_dict.phpt b/ext/enchant/tests/broker_free_dict.phpt
new file mode 100644
index 0000000000..f0b6bb6dc3
--- /dev/null
+++ b/ext/enchant/tests/broker_free_dict.phpt
@@ -0,0 +1,52 @@
+--TEST--
+enchant_broker_free_dict(resource $dict); function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if(!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if(!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$newWord = "iLoveJava";
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict, $newWord);
+
+ if (NULL === $AddtoPersonalDict) {
+ var_dump($AddtoPersonalDict);
+
+ if (enchant_broker_free_dict($requestDict)) {
+ echo("OK\n");
+
+ } else {
+ echo("dict broker free has failed\n");
+ }
+
+ } else {
+ echo("dict add to personal failed\n");
+ }
+
+ } else {
+ echo("broker request dict failed\n");
+ }
+
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+NULL
+OK
+OK
diff --git a/ext/enchant/tests/broker_get_error.phpt b/ext/enchant/tests/broker_get_error.phpt
new file mode 100644
index 0000000000..e8d248eca6
--- /dev/null
+++ b/ext/enchant/tests/broker_get_error.phpt
@@ -0,0 +1,30 @@
+--TEST--
+enchant_broker_get_error() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+if (is_resource($broker)) {
+ echo("OK\n");
+ $enchantErr = enchant_broker_get_error($broker);
+
+ if ("" == $enchantErr) {
+ echo("OK\n");
+ } else {
+ echo("enchant failed ==>" . $enchantErr);
+ }
+} else {
+ echo("init failed\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+OK
diff --git a/ext/enchant/tests/broker_init.phpt b/ext/enchant/tests/broker_init.phpt
index 359a653359..12c25e3ddc 100644
--- a/ext/enchant/tests/broker_init.phpt
+++ b/ext/enchant/tests/broker_init.phpt
@@ -1,15 +1,20 @@
--TEST--
enchant_broker_init() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
<?php
if(!extension_loaded('enchant')) die('skip, enchant not loader');
-
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
?>
--FILE--
<?php
$broker = enchant_broker_init();
-echo is_resource($broker) ? "OK" : "Failure";
-echo "\n";
+if (is_resource($broker)) {
+ echo("OK\n");
+} else {
+ echo("failure, its not a resource\n");
+}
?>
--EXPECT--
OK
diff --git a/ext/enchant/tests/broker_list_dicts.phpt b/ext/enchant/tests/broker_list_dicts.phpt
new file mode 100644
index 0000000000..a634734a58
--- /dev/null
+++ b/ext/enchant/tests/broker_list_dicts.phpt
@@ -0,0 +1,28 @@
+--TEST--
+enchant_broker_list_dicts() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+if (is_resource($broker)) {
+ echo("OK\n");
+ $brokerListDicts = enchant_broker_list_dicts($broker);
+
+ if (is_array($brokerListDicts)) {
+ echo("OK\n");
+ } else {
+ echo("broker list dicts failed\n");
+ }
+} else {
+ echo("init failed\n");
+}
+?>
+--EXPECT--
+OK
+OK
diff --git a/ext/enchant/tests/broker_request_dict.phpt b/ext/enchant/tests/broker_request_dict.phpt
index 5744da6747..5b7abe76bf 100644
--- a/ext/enchant/tests/broker_request_dict.phpt
+++ b/ext/enchant/tests/broker_request_dict.phpt
@@ -1,30 +1,32 @@
--TEST--
enchant_broker_request_dict() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
-<?php
+<?php
if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
?>
--FILE--
<?php
$broker = enchant_broker_init();
-if (!is_resource($broker)) {
- exit("init failed\n");
-}
-
$dicts = enchant_broker_list_dicts($broker);
+
if (is_array($dicts)) {
- if (count($dicts)) {
- $dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
- if (is_resource($dict)) {
- echo "OK\n";
- } else {
- echo "fail to request " . $dicts[0]['lang_tag'];
- }
- }
+ if (count($dicts)) {
+ $dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if (is_resource($dict)) {
+ echo "OK\n";
+ } else {
+ echo "fail to request " . $dicts[0]['lang_tag'];
+ }
+ }
} else {
- exit("list dicts failed\n");
+ echo("list dicts failed\n");
}
-echo "OK\n";
+echo("OK\n");
?>
--EXPECT--
OK
diff --git a/ext/enchant/tests/broker_request_dict_01.phpt b/ext/enchant/tests/broker_request_dict_01.phpt
new file mode 100644
index 0000000000..518b16de44
--- /dev/null
+++ b/ext/enchant/tests/broker_request_dict_01.phpt
@@ -0,0 +1,30 @@
+--TEST--
+enchant_broker_request_dict() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+
+if (is_array($dicts)) {
+ $dict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+ if (is_resource($dict)) {
+ echo("OK\n");
+ } else {
+ echo("fail to request " . $dicts[0]['lang_tag']);
+ }
+} else {
+ echo("list dicts failed\n");
+}
+echo("OK\n");
+?>
+--EXPECT--
+OK
+OK
diff --git a/ext/enchant/tests/broker_request_pwl_dict.phpt b/ext/enchant/tests/broker_request_pwl_dict.phpt
new file mode 100644
index 0000000000..6235aeea5f
--- /dev/null
+++ b/ext/enchant/tests/broker_request_pwl_dict.phpt
@@ -0,0 +1,40 @@
+--TEST--
+resource enchant_broker_request_pwl_dict(resource $broker, string $filename); function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if(!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$pathPwlDict = __DIR__ . "/enchant_broker_request_pwl_dict.pwl";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_pwl_dict($broker, $pathPwlDict);
+
+ if (is_resource($requestDict)) {
+ echo("OK\n");
+ $dictdescribe = enchant_dict_describe($requestDict);
+
+ if ($pathPwlDict === $dictdescribe['file']) {
+ echo("OK\n");
+ } else {
+ echo("broker dict describe is not a resource failed\n");
+ }
+ } else {
+ echo("dict broker request pwl has failed\n");
+ }
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+OK
+OK
diff --git a/ext/enchant/tests/broker_set_ordering.phpt b/ext/enchant/tests/broker_set_ordering.phpt
new file mode 100644
index 0000000000..c3cb2072c9
--- /dev/null
+++ b/ext/enchant/tests/broker_set_ordering.phpt
@@ -0,0 +1,32 @@
+--TEST--
+enchant_broker_set_ordering() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$comma = ";";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ if (enchant_broker_set_ordering($broker,$dicts[0]['lang_tag'],$comma)) {
+ echo("OK\n");
+ } else {
+ echo("enchant failed ==>" . $enchantErr);
+ }
+} else {
+ echo("init failed\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+OK
diff --git a/ext/enchant/tests/dict_add_to_personal.phpt b/ext/enchant/tests/dict_add_to_personal.phpt
new file mode 100644
index 0000000000..96bac1e256
--- /dev/null
+++ b/ext/enchant/tests/dict_add_to_personal.phpt
@@ -0,0 +1,46 @@
+--TEST--
+enchant_dict_add_to_personal() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$newWord = "iLoveJava";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord);
+
+ if (NULL === $AddtoPersonalDict) {
+ var_dump($AddtoPersonalDict);
+
+ } else {
+ echo("dict add to personal failed\n");
+ }
+
+ } else {
+ echo("broker request dict failed\n");
+
+ }
+
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+NULL
+OK
diff --git a/ext/enchant/tests/dict_add_to_session.phpt b/ext/enchant/tests/dict_add_to_session.phpt
new file mode 100644
index 0000000000..78f66f8447
--- /dev/null
+++ b/ext/enchant/tests/dict_add_to_session.phpt
@@ -0,0 +1,45 @@
+--TEST--
+enchant_dict_add_to_session() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$newWord = "iLoveJavaScript";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $AddtoSessionDict = enchant_dict_add_to_session($requestDict,$newWord);
+
+ if (NULL === $AddtoSessionDict) {
+ var_dump($AddtoSessionDict);
+ } else {
+ echo("dict add to session failed\n");
+
+ }
+
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("broker is not a resource; failed;\n");
+
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+NULL
+OK
diff --git a/ext/enchant/tests/dict_check.phpt b/ext/enchant/tests/dict_check.phpt
new file mode 100644
index 0000000000..fd5cf45b34
--- /dev/null
+++ b/ext/enchant/tests/dict_check.phpt
@@ -0,0 +1,46 @@
+--TEST--
+enchant_dict_check() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$newWord = "java";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ enchant_dict_add_to_personal($requestDict, $newWord);
+
+ if (enchant_dict_check($requestDict, $newWord)) {
+ echo("OK\n");
+
+ } else {
+ echo("dict check new word failed\n");
+ }
+
+ } else {
+ echo("broker request dict failed\n");
+
+ }
+
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+OK
+OK
diff --git a/ext/enchant/tests/dict_describe.phpt b/ext/enchant/tests/dict_describe.phpt
new file mode 100644
index 0000000000..60a1e7c3f3
--- /dev/null
+++ b/ext/enchant/tests/dict_describe.phpt
@@ -0,0 +1,40 @@
+--TEST--
+enchant_dict_describe() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $dictDescribe = enchant_dict_describe($requestDict);
+
+ if (is_array($dictDescribe)) {
+ echo("OK\n");
+
+ } else {
+ echo("broker request dict failed\n");
+ }
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+?>
+--EXPECT--
+OK
+OK
+OK
diff --git a/ext/enchant/tests/dict_get_error.phpt b/ext/enchant/tests/dict_get_error.phpt
new file mode 100644
index 0000000000..fc942a55ef
--- /dev/null
+++ b/ext/enchant/tests/dict_get_error.phpt
@@ -0,0 +1,33 @@
+--TEST--
+enchant_dict_get_error() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ var_dump(enchant_dict_get_error($requestDict));
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("init failed\n");
+}
+echo("OK\n");
+?>
+--EXPECT--
+OK
+bool(false)
+OK
diff --git a/ext/enchant/tests/dict_is_in_session.phpt b/ext/enchant/tests/dict_is_in_session.phpt
new file mode 100644
index 0000000000..6bf4af4839
--- /dev/null
+++ b/ext/enchant/tests/dict_is_in_session.phpt
@@ -0,0 +1,42 @@
+--TEST--
+enchant_dict_is_in_session() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$newWord = "aspell";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord);
+
+ if (NULL === $AddtoPersonalDict) {
+ var_dump(enchant_dict_is_in_session($requestDict,$newWord));
+ } else {
+ echo("dict add to personal failed\n");
+ }
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+echo("OK\n");
+?>
+--EXPECT--
+OK
+OK
+bool(true)
+OK
diff --git a/ext/enchant/tests/dict_quick_check.phpt b/ext/enchant/tests/dict_quick_check.phpt
index 3412de1b72..15eb2aec38 100644
--- a/ext/enchant/tests/dict_quick_check.phpt
+++ b/ext/enchant/tests/dict_quick_check.phpt
@@ -1,8 +1,12 @@
--TEST--
enchant_dict_quick_check() basic test
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
--SKIPIF--
<?php
if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
$tag = 'en_US';
$r = enchant_broker_init();
diff --git a/ext/enchant/tests/dict_quick_check_01.phpt b/ext/enchant/tests/dict_quick_check_01.phpt
new file mode 100644
index 0000000000..4ef46829c3
--- /dev/null
+++ b/ext/enchant/tests/dict_quick_check_01.phpt
@@ -0,0 +1,38 @@
+--TEST--
+enchant_dict_quick_check() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$word = "aspell";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ enchant_dict_quick_check($requestDict,$word,$sugs);
+
+ if (is_array($sugs)) {
+ echo("OK\n");
+ } else {
+ echo("dict quick check failed\n");
+ }
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+?>
+--EXPECT--
+OK
+OK
diff --git a/ext/enchant/tests/dict_store_replacement.phpt b/ext/enchant/tests/dict_store_replacement.phpt
new file mode 100644
index 0000000000..3383e77fe1
--- /dev/null
+++ b/ext/enchant/tests/dict_store_replacement.phpt
@@ -0,0 +1,43 @@
+--TEST--
+enchant_dict_store_replacement() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$wrongWord = "sava";
+$rightWord = "java";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $AddtoPersonalDict = enchant_dict_store_replacement($requestDict,$wrongWord,$rightWord);
+
+ if (NULL === $AddtoPersonalDict) {
+ var_dump($AddtoPersonalDict);
+ } else {
+ echo("dict add to personal failed\n");
+ }
+ } else {
+ echo("broker request dict failed\n");
+ }
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+echo "OK\n";
+?>
+--EXPECT--
+OK
+OK
+NULL
+OK
diff --git a/ext/enchant/tests/dict_suggest.phpt b/ext/enchant/tests/dict_suggest.phpt
new file mode 100644
index 0000000000..7317120a3b
--- /dev/null
+++ b/ext/enchant/tests/dict_suggest.phpt
@@ -0,0 +1,43 @@
+--TEST--
+enchant_dict_suggest() function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$dicts = enchant_broker_list_dicts($broker);
+$sugs = "soong";
+
+if (is_resource($broker)) {
+ echo("OK\n");
+ $requestDict = enchant_broker_request_dict($broker, $dicts[0]['lang_tag']);
+
+ if ($requestDict) {
+ echo("OK\n");
+ $dictSuggest = enchant_dict_suggest($requestDict,$sugs);
+
+ if (is_array($dictSuggest)) {
+ echo("OK\n");
+ } else {
+ echo("dict suggest failed\n");
+ }
+
+ } else {
+ echo("broker request dict failed\n");
+
+ }
+
+} else {
+ echo("broker is not a resource; failed;\n");
+}
+?>
+--EXPECT--
+OK
+OK
+OK
diff --git a/ext/enchant/tests/enchant_broker_request_pwl_dict.pwl b/ext/enchant/tests/enchant_broker_request_pwl_dict.pwl
new file mode 100644
index 0000000000..abe4110361
--- /dev/null
+++ b/ext/enchant/tests/enchant_broker_request_pwl_dict.pwl
@@ -0,0 +1,10 @@
+java
+perl
+awk
+clang
+php
+python
+cplusplus
+csharp
+bash
+ruby
diff --git a/ext/enchant/tests/enchant_broker_set_dict_path.phpt b/ext/enchant/tests/enchant_broker_set_dict_path.phpt
new file mode 100644
index 0000000000..47a65093bc
--- /dev/null
+++ b/ext/enchant/tests/enchant_broker_set_dict_path.phpt
@@ -0,0 +1,53 @@
+--TEST--
+proto bool enchant_broker_set_dict_path(resource broker, int dict_type, string value) function
+proto string enchant_broker_get_dict_path(resource broker, int dict_type) function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if(!extension_loaded('enchant')) die('skip, enchant not loader');
+if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
+?>
+--FILE--
+<?php
+$broker = enchant_broker_init();
+$backEndDictType1 = "MYSPELL";
+$backEndDictType2 = "ISPELL";
+$dictTypeValue1 = 1;
+$dictTypeValue2 = 2;
+
+if (is_resource($broker)) {
+ echo("OK\n");
+
+ if (enchant_broker_set_dict_path($broker, $dictTypeValue1, $backEndDictType1)) {
+ echo("OK\n");
+
+ if (enchant_broker_set_dict_path($broker, $dictTypeValue2, $backEndDictType2)) {
+ echo("OK\n");
+
+ if (
+ (enchant_broker_get_dict_path($broker,$dictTypeValue1) == $backEndDictType1) &&
+ (enchant_broker_get_dict_path($broker,$dictTypeValue2) == $backEndDictType2)
+ ) {
+ echo("OK\n");
+
+ } else {
+ echo("broker get dict path has failed \n");
+ }
+
+ } else {
+ echo("broker set dict path {$backEndDictType2} has failed \n");
+ }
+ } else {
+ echo("broker set dict path {$backEndDictType1} has failed \n");
+ }
+} else {
+ echo("broker is not a resource; failed; \n");
+}
+?>
+--EXPECT--
+OK
+OK
+OK
+OK
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 2cd54eb875..44b9fee0b1 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -152,14 +152,10 @@ ZEND_BEGIN_MODULE_GLOBALS(exif)
ZEND_END_MODULE_GLOBALS(exif)
ZEND_DECLARE_MODULE_GLOBALS(exif)
+#define EXIF_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(exif, v)
-#ifdef ZTS
-#define EXIF_G(v) ZEND_TSRMG(exif_globals_id, zend_exif_globals *, v)
-#ifdef COMPILE_DL_EXIF
-ZEND_TSRMLS_CACHE_DEFINE();
-#endif
-#else
-#define EXIF_G(v) (exif_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_EXIF)
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
/* {{{ PHP_INI
@@ -2949,13 +2945,13 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
if (length<byte_count-1) {
/* When there are any characters after the first NUL */
ImageInfo->CopyrightPhotographer = estrdup(value_ptr);
- ImageInfo->CopyrightEditor = estrdup(value_ptr+length+1);
- spprintf(&ImageInfo->Copyright, 0, "%s, %s", value_ptr, value_ptr+length+1);
+ ImageInfo->CopyrightEditor = estrndup(value_ptr+length+1, byte_count-length-1);
+ spprintf(&ImageInfo->Copyright, 0, "%s, %s", ImageInfo->CopyrightPhotographer, ImageInfo->CopyrightEditor);
/* format = TAG_FMT_UNDEFINED; this musn't be ASCII */
/* but we are not supposed to change this */
/* keep in mind that image_info does not store editor value */
} else {
- ImageInfo->Copyright = estrdup(value_ptr);
+ ImageInfo->Copyright = estrndup(value_ptr, byte_count);
}
}
break;
@@ -3046,10 +3042,10 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
break;
case TAG_MAKE:
- ImageInfo->make = estrdup(value_ptr);
+ ImageInfo->make = estrndup(value_ptr, byte_count);
break;
case TAG_MODEL:
- ImageInfo->model = estrdup(value_ptr);
+ ImageInfo->model = estrndup(value_ptr, byte_count);
break;
case TAG_MAKER_NOTE:
@@ -3119,6 +3115,11 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start,
ImageInfo->sections_found |= FOUND_IFD0;
+ if ((dir_start + 2) >= (offset_base+IFDlength)) {
+ exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size");
+ return FALSE;
+ }
+
NumDirEntries = php_ifd_get16u(dir_start, ImageInfo->motorola_intel);
if ((dir_start+2+NumDirEntries*12) > (offset_base+IFDlength)) {
@@ -3142,6 +3143,10 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start,
* Hack to make it process IDF1 I hope
* There are 2 IDFs, the second one holds the keys (0x0201 and 0x0202) to the thumbnail
*/
+ if ((dir_start+2+12*de + 4) >= (offset_base+IFDlength)) {
+ exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size");
+ return FALSE;
+ }
NextDirOffset = php_ifd_get32u(dir_start+2+12*de, ImageInfo->motorola_intel);
if (NextDirOffset) {
/* the next line seems false but here IFDlength means length of all IFDs */
@@ -3191,9 +3196,13 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf,
}
/* Check the next two values for correctness. */
+ if (length < 8) {
+ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Invalid TIFF start (1)");
+ return;
+ }
exif_value_2a = php_ifd_get16u(CharBuf+2, ImageInfo->motorola_intel);
offset_of_ifd = php_ifd_get32u(CharBuf+4, ImageInfo->motorola_intel);
- if ( exif_value_2a != 0x2a || offset_of_ifd < 0x08) {
+ if (exif_value_2a != 0x2a || offset_of_ifd < 0x08) {
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Invalid TIFF start (1)");
return;
}
@@ -4078,7 +4087,7 @@ PHP_FUNCTION(exif_read_data)
exif_discard_imageinfo(&ImageInfo);
#ifdef EXIF_DEBUG
- php_error_docref1(NULL, Z_STRVAL_PP(p_name), E_NOTICE, "done");
+ php_error_docref1(NULL, p_name, E_NOTICE, "done");
#endif
}
/* }}} */
diff --git a/ext/exif/php_exif.h b/ext/exif/php_exif.h
index ed4c066e15..ad53aeade6 100644
--- a/ext/exif/php_exif.h
+++ b/ext/exif/php_exif.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/exif/tests/bug72094.phpt b/ext/exif/tests/bug72094.phpt
new file mode 100644
index 0000000000..611faf9152
--- /dev/null
+++ b/ext/exif/tests/bug72094.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Bug #72094: Out of bounds heap read access in exif header processing
+--SKIPIF--
+<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
+--FILE--
+<?php
+print_r(exif_read_data(__DIR__ . '/bug72094_1.jpg'));
+print_r(exif_read_data(__DIR__ . '/bug72094_2.jpg'));
+print_r(exif_read_data(__DIR__ . '/bug72094_3.jpg'));
+print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg'));
+?>
+DONE
+--EXPECTF--
+Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s%ebug72094.php on line %d
+
+Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
+DONE
diff --git a/ext/exif/tests/bug72094_1.jpg b/ext/exif/tests/bug72094_1.jpg
new file mode 100644
index 0000000000..d21382b44b
--- /dev/null
+++ b/ext/exif/tests/bug72094_1.jpg
Binary files differ
diff --git a/ext/exif/tests/bug72094_2.jpg b/ext/exif/tests/bug72094_2.jpg
new file mode 100644
index 0000000000..ec414ce02b
--- /dev/null
+++ b/ext/exif/tests/bug72094_2.jpg
Binary files differ
diff --git a/ext/exif/tests/bug72094_3.jpg b/ext/exif/tests/bug72094_3.jpg
new file mode 100644
index 0000000000..8b05314b67
--- /dev/null
+++ b/ext/exif/tests/bug72094_3.jpg
Binary files differ
diff --git a/ext/exif/tests/bug72094_4.jpg b/ext/exif/tests/bug72094_4.jpg
new file mode 100644
index 0000000000..ca6d453c2c
--- /dev/null
+++ b/ext/exif/tests/bug72094_4.jpg
Binary files differ
diff --git a/ext/ext_skel b/ext/ext_skel
index a1c64640ae..f5b9b2578d 100755
--- a/ext/ext_skel
+++ b/ext/ext_skel
@@ -299,12 +299,12 @@ if test -n "$proto"; then
warning="
NOTE! Because some arguments to functions were resources, the code generated
cannot yet be compiled without editing. Please consider this to be step 4.5
-in the instructions above.
+in the instructions above.
"
fi
fi
-find . -type f | xargs chmod 644
+find . -type f | xargs chmod 644
find . -type d | xargs chmod 755
fi
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c
index 8663372de3..cc56e188fd 100644
--- a/ext/fileinfo/fileinfo.c
+++ b/ext/fileinfo/fileinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -528,7 +528,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
goto clean;
}
if (CHECK_NULL_PATH(buffer, buffer_len)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid path");
+ php_error_docref(NULL, E_WARNING, "Invalid path");
RETVAL_FALSE;
goto clean;
}
@@ -548,11 +548,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
}
#endif
-#if PHP_API_VERSION < 20100412
- stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
-#else
stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context);
-#endif
if (!stream) {
RETVAL_FALSE;
diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch
index 2e5b09fdd1..5dce310184 100644
--- a/ext/fileinfo/libmagic.patch
+++ b/ext/fileinfo/libmagic.patch
@@ -1,6 +1,6 @@
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
---- libmagic.orig/apprentice.c Mon Feb 9 15:48:48 2015
-+++ libmagic/apprentice.c Sun Mar 29 16:51:28 2015
+--- libmagic.orig/apprentice.c 2016-01-25 11:31:21.473017702 +0800
++++ libmagic/apprentice.c 2016-01-25 11:41:58.210723599 +0800
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
@@ -815,7 +815,15 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
VERSIONNO, dbname, version);
return -1;
}
-@@ -2992,14 +3014,18 @@
+@@ -2983,7 +3005,6 @@
+ {
+ static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
+ static const size_t m = sizeof(**map->magic);
+- int fd = -1;
+ size_t len;
+ char *dbname;
+ int rv = -1;
+@@ -2992,14 +3013,18 @@
struct magic m;
uint32_t h[2 + MAGIC_SETS];
} hdr;
@@ -838,7 +846,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
file_error(ms, errno, "cannot open `%s'", dbname);
goto out;
}
-@@ -3008,24 +3034,25 @@
+@@ -3008,24 +3033,25 @@
hdr.h[1] = VERSIONNO;
memcpy(hdr.h + 2, map->nmagic, nm);
@@ -869,7 +877,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return rv;
}
-@@ -3059,16 +3086,18 @@
+@@ -3059,16 +3085,18 @@
q++;
/* Compatibility with old code that looked in .mime */
if (ms->flags & MAGIC_MIME) {
@@ -894,7 +902,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
/* Compatibility with old code that looked in .mime */
if (strstr(p, ".mime") != NULL)
-@@ -3158,7 +3187,7 @@
+@@ -3158,7 +3186,7 @@
m->offset = swap4((uint32_t)m->offset);
m->in_offset = swap4((uint32_t)m->in_offset);
m->lineno = swap4((uint32_t)m->lineno);
@@ -904,8 +912,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
---- libmagic.orig/ascmagic.c Mon Feb 9 15:48:48 2015
-+++ libmagic/ascmagic.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/ascmagic.c 2016-01-25 11:31:21.495017704 +0800
++++ libmagic/ascmagic.c 2016-01-25 11:31:32.676017695 +0800
@@ -139,7 +139,7 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
@@ -926,8 +934,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
return rv;
}
diff -u libmagic.orig/cdf.c libmagic/cdf.c
---- libmagic.orig/cdf.c Thu Mar 5 15:25:12 2015
-+++ libmagic/cdf.c Sun Mar 29 16:51:28 2015
+--- libmagic.orig/cdf.c 2016-01-25 11:31:21.472017703 +0800
++++ libmagic/cdf.c 2016-01-25 11:31:32.676017695 +0800
@@ -35,7 +35,7 @@
#include "file.h"
@@ -1093,8 +1101,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
#ifdef CDF_DEBUG
else
diff -u libmagic.orig/cdf.h libmagic/cdf.h
---- libmagic.orig/cdf.h Mon Feb 9 15:48:48 2015
-+++ libmagic/cdf.h Sun Mar 29 18:04:24 2015
+--- libmagic.orig/cdf.h 2016-01-25 11:31:21.493017704 +0800
++++ libmagic/cdf.h 2016-01-25 11:31:32.676017695 +0800
@@ -35,10 +35,12 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -1123,8 +1131,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
---- libmagic.orig/cdf_time.c Mon Feb 9 15:48:48 2015
-+++ libmagic/cdf_time.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/cdf_time.c 2016-01-25 11:31:21.494017704 +0800
++++ libmagic/cdf_time.c 2016-01-25 11:31:32.676017695 +0800
@@ -96,7 +96,7 @@
}
@@ -1174,8 +1182,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
static const char *ref = "Sat Apr 23 01:30:00 1977";
diff -u libmagic.orig/compress.c libmagic/compress.c
---- libmagic.orig/compress.c Sun Mar 29 13:11:40 2015
-+++ libmagic/compress.c Sun Mar 29 18:14:23 2015
+--- libmagic.orig/compress.c 2016-01-25 11:31:21.483017704 +0800
++++ libmagic/compress.c 2016-01-25 11:31:32.676017695 +0800
@@ -32,10 +32,11 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
@@ -1374,8 +1382,8 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
diff -u libmagic.orig/elfclass.h libmagic/elfclass.h
---- libmagic.orig/elfclass.h Mon Feb 9 15:48:48 2015
-+++ libmagic/elfclass.h Wed Mar 18 20:10:15 2015
+--- libmagic.orig/elfclass.h 2016-01-25 11:31:21.471017705 +0800
++++ libmagic/elfclass.h 2016-01-25 11:31:32.677017695 +0800
@@ -41,7 +41,7 @@
return toomany(ms, "program headers", phnum);
flags |= FLAGS_IS_CORE;
@@ -1404,8 +1412,8 @@ diff -u libmagic.orig/elfclass.h libmagic/elfclass.h
fsize, elf_getu16(swap, elfhdr.e_machine),
(int)elf_getu16(swap, elfhdr.e_shstrndx),
diff -u libmagic.orig/file.h libmagic/file.h
---- libmagic.orig/file.h Sat Feb 21 15:02:19 2015
-+++ libmagic/file.h Wed Mar 18 20:10:15 2015
+--- libmagic.orig/file.h 2016-01-25 11:31:21.472017703 +0800
++++ libmagic/file.h 2016-01-25 11:31:32.677017695 +0800
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
@@ -1609,11 +1617,10 @@ diff -u libmagic.orig/file.h libmagic/file.h
#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H) && !defined(QUICK)
#define QUICK
-@@ -595,6 +540,14 @@
- #endif
+@@ -596,6 +541,14 @@
#else
#define FILE_RCSID(id)
-+#endif
+ #endif
+
+#ifdef PHP_WIN32
+#define FINFO_LSEEK_FUNC _lseek
@@ -1621,12 +1628,13 @@ diff -u libmagic.orig/file.h libmagic/file.h
+#else
+#define FINFO_LSEEK_FUNC lseek
+#define FINFO_READ_FUNC read
- #endif
++#endif
#ifndef __RCSID
#define __RCSID(a)
+ #endif
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
---- libmagic.orig/fsmagic.c Mon Feb 9 15:48:48 2015
-+++ libmagic/fsmagic.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/fsmagic.c 2016-01-25 11:31:21.471017705 +0800
++++ libmagic/fsmagic.c 2016-01-25 11:31:32.677017695 +0800
@@ -63,27 +63,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
@@ -1977,8 +1985,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
return ret;
}
diff -u libmagic.orig/funcs.c libmagic/funcs.c
---- libmagic.orig/funcs.c Mon Feb 9 15:48:48 2015
-+++ libmagic/funcs.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/funcs.c 2016-01-25 11:31:21.483017704 +0800
++++ libmagic/funcs.c 2016-01-25 11:41:34.164723619 +0800
@@ -31,7 +31,6 @@
#endif /* lint */
@@ -1987,7 +1995,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
-@@ -42,76 +41,80 @@
+@@ -42,76 +41,79 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
#endif
@@ -2040,7 +2048,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
protected int
file_printf(struct magic_set *ms, const char *fmt, ...)
{
- int rv;
+- int rv;
va_list ap;
+ int len;
+ char *buf = NULL, *newstr;
@@ -2104,7 +2112,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
ms->event_flags |= EVENT_HAD_ERR;
ms->error = error;
}
-@@ -158,11 +161,9 @@
+@@ -158,11 +160,9 @@
file_error(ms, errno, "error reading");
}
@@ -2118,7 +2126,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
{
int m = 0, rv = 0, looks_text = 0;
int mime = ms->flags & MAGIC_MIME;
-@@ -201,10 +202,10 @@
+@@ -201,10 +201,10 @@
}
}
#endif
@@ -2132,7 +2140,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
if ((ms->flags & MAGIC_DEBUG) != 0)
(void)fprintf(stderr, "zmagic %d\n", m);
goto done_encoding;
-@@ -219,12 +220,16 @@
+@@ -219,12 +219,16 @@
}
/* Check if we have a CDF file */
@@ -2154,16 +2162,16 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
/* try soft magic tests */
if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0)
-@@ -278,16 +283,13 @@
+@@ -278,7 +282,7 @@
if (file_printf(ms, "%s", code_mime) == -1)
rv = -1;
}
-#if HAVE_FORK
++#if PHP_FILEINFO_UNCOMPRESS
done_encoding:
--#endif
+ #endif
free(u8buf);
- if (rv)
- return rv;
+@@ -287,7 +291,6 @@
return m;
}
@@ -2171,7 +2179,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
protected int
file_reset(struct magic_set *ms)
-@@ -297,11 +299,11 @@
+@@ -297,11 +300,11 @@
return -1;
}
if (ms->o.buf) {
@@ -2185,7 +2193,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
ms->o.pbuf = NULL;
}
ms->event_flags &= ~EVENT_HAD_ERR;
-@@ -320,7 +322,7 @@
+@@ -320,7 +323,7 @@
protected const char *
file_getbuffer(struct magic_set *ms)
{
@@ -2194,7 +2202,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
size_t psize, len;
if (ms->event_flags & EVENT_HAD_ERR)
-@@ -339,11 +341,10 @@
+@@ -339,11 +342,10 @@
return NULL;
}
psize = len * 4 + 1;
@@ -2207,7 +2215,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
#if defined(HAVE_WCHAR_H) && defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
{
-@@ -403,8 +404,8 @@
+@@ -403,8 +405,8 @@
if (level >= ms->c.len) {
len = (ms->c.len += 20) * sizeof(*ms->c.li);
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
@@ -2218,7 +2226,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
if (ms->c.li == NULL) {
file_oomem(ms, len);
return -1;
-@@ -427,70 +428,41 @@
+@@ -427,70 +429,41 @@
protected int
file_replace(struct magic_set *ms, const char *pat, const char *rep)
{
@@ -2249,7 +2257,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+ (void)setlocale(LC_CTYPE, "C");
+
+ opts |= PCRE_MULTILINE;
-+ convert_libmagic_pattern(&patt, pat, strlen(pat), opts);
++ convert_libmagic_pattern(&patt, (char*)pat, strlen(pat), opts);
+ if ((pce = pcre_get_compiled_regex_cache(Z_STR(patt))) == NULL) {
+ zval_ptr_dtor(&patt);
+ rep_cnt = -1;
@@ -2300,8 +2308,8 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
- freelocale(rx->c_lc_ctype);
-#endif
-}
-+ strncpy(ms->o.buf, res->val, res->len);
-+ ms->o.buf[res->len] = '\0';
++ strncpy(ms->o.buf, ZSTR_VAL(res), ZSTR_LEN(res));
++ ms->o.buf[ZSTR_LEN(res)] = '\0';
-protected void
-file_regerror(file_regex_t *rx, int rc, struct magic_set *ms)
@@ -2318,7 +2326,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
}
protected file_pushbuf_t *
-@@ -501,7 +473,7 @@
+@@ -501,7 +474,7 @@
if (ms->event_flags & EVENT_HAD_ERR)
return NULL;
@@ -2327,7 +2335,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
return NULL;
pb->buf = ms->o.buf;
-@@ -519,8 +491,8 @@
+@@ -519,8 +492,8 @@
char *rbuf;
if (ms->event_flags & EVENT_HAD_ERR) {
@@ -2338,7 +2346,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
return NULL;
}
-@@ -529,7 +501,7 @@
+@@ -529,7 +502,7 @@
ms->o.buf = pb->buf;
ms->offset = pb->offset;
@@ -2347,7 +2355,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
return rbuf;
}
-@@ -550,10 +522,11 @@
+@@ -550,10 +523,11 @@
if (ptr >= eptr - 3)
break;
*ptr++ = '\\';
@@ -2363,8 +2371,8 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
}
+
diff -u libmagic.orig/magic.c libmagic/magic.c
---- libmagic.orig/magic.c Mon Feb 9 15:48:48 2015
-+++ libmagic/magic.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/magic.c 2016-01-25 11:31:21.495017704 +0800
++++ libmagic/magic.c 2016-01-25 11:31:32.677017695 +0800
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
@@ -2753,8 +2761,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.orig/magic.h libmagic/magic.h
---- libmagic.orig/magic.h Sat Feb 21 15:03:56 2015
-+++ libmagic/magic.h Wed Mar 18 20:10:15 2015
+--- libmagic.orig/magic.h 2016-01-25 11:31:21.471017705 +0800
++++ libmagic/magic.h 2016-01-25 11:31:32.677017695 +0800
@@ -88,6 +88,7 @@
const char *magic_getpath(const char *, int);
@@ -2772,8 +2780,8 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
int magic_errno(magic_t);
diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h
---- libmagic.orig/patchlevel.h Mon Feb 9 15:48:48 2015
-+++ libmagic/patchlevel.h Wed Mar 18 20:10:15 2015
+--- libmagic.orig/patchlevel.h 2016-01-25 11:31:21.473017702 +0800
++++ libmagic/patchlevel.h 2016-01-25 11:31:32.678017695 +0800
@@ -1,34 +1,43 @@
#define FILE_VERSION_MAJOR 5
-#define patchlevel 6
@@ -2838,8 +2846,8 @@ diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h
* Revision 1.69 2008/07/02 15:27:05 christos
* welcome to 4.25
diff -u libmagic.orig/print.c libmagic/print.c
---- libmagic.orig/print.c Mon Feb 9 15:48:48 2015
-+++ libmagic/print.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/print.c 2016-01-25 11:31:21.495017704 +0800
++++ libmagic/print.c 2016-01-25 11:31:32.678017695 +0800
@@ -28,13 +28,17 @@
/*
* print.c - debugging printout routines
@@ -3111,8 +3119,8 @@ diff -u libmagic.orig/print.c libmagic/print.c
if (tm == NULL)
goto out;
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
---- libmagic.orig/readcdf.c Thu Mar 5 15:25:12 2015
-+++ libmagic/readcdf.c Sun Mar 29 18:07:48 2015
+--- libmagic.orig/readcdf.c 2016-01-25 11:31:21.493017704 +0800
++++ libmagic/readcdf.c 2016-01-25 11:31:32.678017695 +0800
@@ -26,15 +26,21 @@
#include "file.h"
@@ -3237,8 +3245,8 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
#ifdef CDF_DEBUG
cdf_dump_catalog(&h, &scn);
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
---- libmagic.orig/softmagic.c Sat Feb 21 15:02:19 2015
-+++ libmagic/softmagic.c Sun Mar 29 17:55:55 2015
+--- libmagic.orig/softmagic.c 2016-01-25 11:31:21.471017705 +0800
++++ libmagic/softmagic.c 2016-01-25 11:44:35.541684679 +0800
@@ -36,11 +36,19 @@
#endif /* lint */
@@ -3346,7 +3354,12 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int32_t
mprint(struct magic_set *ms, struct magic *m)
{
-@@ -635,14 +629,14 @@
+@@ -630,19 +624,18 @@
+ t = ms->offset + sizeof(double);
+ break;
+
+- case FILE_SEARCH:
+ case FILE_REGEX: {
char *cp;
int rval;
@@ -3363,7 +3376,23 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
if (rval == -1)
return -1;
-@@ -879,16 +873,16 @@
+@@ -654,6 +647,15 @@
+ break;
+ }
+
++ case FILE_SEARCH:
++ if (file_printf(ms, F(ms, m, "%s"), m->value.s) == -1)
++ return -1;
++ if ((m->str_flags & REGEX_OFFSET_START))
++ t = ms->search.offset;
++ else
++ t = ms->search.offset + m->vallen;
++ break;
++
+ case FILE_DEFAULT:
+ case FILE_CLEAR:
+ if (file_printf(ms, "%s", m->desc) == -1)
+@@ -879,16 +881,16 @@
if (m->num_mask) \
switch (m->mask_op & FILE_OPS_MASK) { \
case FILE_OPADD: \
@@ -3384,7 +3413,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
break; \
} \
-@@ -1095,16 +1089,18 @@
+@@ -1095,17 +1097,26 @@
return 0;
}
@@ -3394,24 +3423,33 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
- } else {
- linecnt = 0;
- bytecnt = m->str_range;
+- }
+ /* bytecnt checks are to be kept for PHP, see cve-2014-3538.
+ PCRE might get stuck if the input buffer is too big. */
+ linecnt = m->str_range;
+ bytecnt = linecnt * 80;
-+
-+ if (bytecnt == 0) {
-+ bytecnt = 1 << 14;
- }
- if (bytecnt == 0 || bytecnt > nbytes - offset)
- bytecnt = nbytes - offset;
++ if (bytecnt == 0) {
++ bytecnt = 1 << 14;
++ }
+
+ if (bytecnt > nbytes) {
+ bytecnt = nbytes;
+ }
-
++ if (offset > bytecnt) {
++ offset = bytecnt;
++ }
++ if (s == NULL) {
++ ms->search.s_len = 0;
++ ms->search.s = NULL;
++ return 0;
++ }
buf = RCAST(const char *, s) + offset;
end = last = RCAST(const char *, s) + bytecnt;
-@@ -1221,9 +1217,6 @@
+ /* mget() guarantees buf <= last */
+@@ -1221,9 +1232,6 @@
m->type, m->flag, offset, o, nbytes,
indir_level, *name_count);
mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE));
@@ -3421,7 +3459,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
if (m->flag & INDIR) {
-@@ -1593,9 +1586,6 @@
+@@ -1593,9 +1601,6 @@
if ((ms->flags & MAGIC_DEBUG) != 0) {
mdebug(offset, (char *)(void *)p,
sizeof(union VALUETYPE));
@@ -3431,7 +3469,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
}
-@@ -1676,15 +1666,15 @@
+@@ -1676,15 +1681,15 @@
if (rv == 1) {
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, F(ms, m, "%u"), offset) == -1) {
@@ -3450,7 +3488,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return rv;
case FILE_USE:
-@@ -1799,6 +1789,41 @@
+@@ -1799,6 +1804,41 @@
return file_strncmp(a, b, len, flags);
}
@@ -3462,29 +3500,29 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
+
+ t = zend_string_alloc(len * 2 + 4, 0);
+
-+ t->val[j++] = '~';
++ ZSTR_VAL(t)[j++] = '~';
+
+ for (i = 0; i < len; i++, j++) {
+ switch (val[i]) {
+ case '~':
-+ t->val[j++] = '\\';
-+ t->val[j] = '~';
++ ZSTR_VAL(t)[j++] = '\\';
++ ZSTR_VAL(t)[j] = '~';
+ break;
+ default:
-+ t->val[j] = val[i];
++ ZSTR_VAL(t)[j] = val[i];
+ break;
+ }
+ }
-+ t->val[j++] = '~';
++ ZSTR_VAL(t)[j++] = '~';
+
+ if (options & PCRE_CASELESS)
-+ t->val[j++] = 'i';
++ ZSTR_VAL(t)[j++] = 'i';
+
+ if (options & PCRE_MULTILINE)
-+ t->val[j++] = 'm';
++ ZSTR_VAL(t)[j++] = 'm';
+
-+ t->val[j]='\0';
-+ t->len = j;
++ ZSTR_VAL(t)[j]='\0';
++ ZSTR_LEN(t) = j;
+
+ ZVAL_NEW_STR(pattern, t);
+}
@@ -3492,7 +3530,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
-@@ -1959,73 +1984,111 @@
+@@ -1959,73 +1999,77 @@
break;
}
case FILE_REGEX: {
@@ -3541,28 +3579,6 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
- memcpy(copy, ms->search.s, slen);
- copy[--slen] = '\0';
- search = copy;
-- } else {
-- search = ms->search.s;
-- copy = NULL;
-- }
--#else
-- search = ms->search.s;
-- pmatch[0].rm_so = 0;
-- pmatch[0].rm_eo = slen;
--#endif
-- rc = file_regexec(&rx, (const char *)search,
-- 1, pmatch, REG_STARTEND);
--#if REG_STARTEND == 0
-- free(copy);
--#endif
-- switch (rc) {
-- case 0:
-- ms->search.s += (int)pmatch[0].rm_so;
-- ms->search.offset += (size_t)pmatch[0].rm_so;
-- ms->search.rm_len =
-- (size_t)(pmatch[0].rm_eo - pmatch[0].rm_so);
-- v = 0;
-- break;
+ /* pce now contains the compiled regex */
+ zval retval;
+ zval subpats;
@@ -3575,7 +3591,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
+ haystack = estrndup(ms->search.s, ms->search.s_len);
+
+ /* match v = 0, no match v = 1 */
-+ php_pcre_match_impl(pce, haystack, ms->search.s_len, &retval, &subpats, 1, 1, PREG_OFFSET_CAPTURE, 0);
++ php_pcre_match_impl(pce, haystack, ms->search.s_len, &retval, &subpats, 0, 1, PREG_OFFSET_CAPTURE, 0);
+ /* Free haystack */
+ efree(haystack);
+
@@ -3587,73 +3603,61 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
+ /* Need to fetch global match which equals pmatch[0] */
+ zval *pzval;
+ HashTable *ht = Z_ARRVAL(subpats);
-+ zval *pattern_match = NULL, *pattern_offset = NULL;
-+ int first = 1, inner_first;
-+
-+ ZEND_HASH_FOREACH_VAL(ht, pzval) {
-+ HashTable *inner_ht;
-+ zval *match, *offset;
-+ zval tmpcopy, matchcopy, offsetcopy;
-+
-+ if (first) {
-+ first = 0;
-+ continue;
-+ }
-+ ZVAL_DUP(&tmpcopy, pzval);
-
-- case REG_NOMATCH:
-- v = 1;
-- break;
-+ inner_ht = Z_ARRVAL(tmpcopy);
-
-- default:
-- file_regerror(&rx, rc, ms);
-- v = (uint64_t)-1;
-- break;
++ if ((pzval = zend_hash_index_find(ht, 0)) != NULL && Z_TYPE_P(pzval) == IS_ARRAY) {
+ /* If everything goes according to the master plan
+ tmpcopy now contains two elements:
+ 0 = the match
+ 1 = starting position of the match */
-+ inner_first = 1;
-+ ZEND_HASH_FOREACH_VAL(inner_ht, match) {
-+ if (inner_first) {
-+ inner_first = 0;
-+ continue;
-+ }
-+ ZVAL_DUP(&matchcopy, match);
-+ convert_to_string(&matchcopy);
-+ pattern_match = &matchcopy;
-+ } ZEND_HASH_FOREACH_END();
-+
-+ inner_first = 1;
-+ ZEND_HASH_FOREACH_VAL(inner_ht, offset) {
-+ if (inner_first) {
-+ inner_first = 0;
-+ continue;
++ zval *match, *offset;
++ if ((match = zend_hash_index_find(Z_ARRVAL_P(pzval), 0)) &&
++ (offset = zend_hash_index_find(Z_ARRVAL_P(pzval), 1))) {
++ if (Z_TYPE_P(match) != IS_STRING && Z_TYPE_P(offset) != IS_LONG) {
++ goto error_out;
+ }
-+ ZVAL_DUP(&offsetcopy, offset);
-+ convert_to_long(&offsetcopy);
-+ pattern_offset = &offsetcopy;
-+ } ZEND_HASH_FOREACH_END();
-+
-+ zval_dtor(&tmpcopy);
-+
-+ if ((pattern_match != NULL) && (pattern_offset != NULL)) {
-+ ms->search.s += Z_LVAL_P(pattern_offset); /* this is where the match starts */
-+ ms->search.offset += Z_LVAL_P(pattern_offset); /* this is where the match starts as size_t */
-+ ms->search.rm_len = Z_STRLEN_P(pattern_match) /* This is the length of the matched pattern */;
++ ms->search.s += Z_LVAL_P(offset); /* this is where the match starts */
++ ms->search.offset += Z_LVAL_P(offset); /* this is where the match starts as size_t */
++ ms->search.rm_len = Z_STRLEN_P(match) /* This is the length of the matched pattern */;
+ v = 0;
-+
-+ zval_ptr_dtor(pattern_match);
-+ zval_ptr_dtor(pattern_offset);
+ } else {
-+ zval_ptr_dtor(&subpats);
-+ zval_ptr_dtor(&pattern);
-+ return -1;
++ goto error_out;
+ }
-+ } ZEND_HASH_FOREACH_END();
-+ } else {
-+ v = 1;
++ } else {
++error_out:
++ zval_ptr_dtor(&subpats);
++ zval_ptr_dtor(&pattern);
++ return -1;
++ }
+ } else {
+- search = ms->search.s;
+- copy = NULL;
+- }
+-#else
+- search = ms->search.s;
+- pmatch[0].rm_so = 0;
+- pmatch[0].rm_eo = slen;
+-#endif
+- rc = file_regexec(&rx, (const char *)search,
+- 1, pmatch, REG_STARTEND);
+-#if REG_STARTEND == 0
+- free(copy);
+-#endif
+- switch (rc) {
+- case 0:
+- ms->search.s += (int)pmatch[0].rm_so;
+- ms->search.offset += (size_t)pmatch[0].rm_so;
+- ms->search.rm_len =
+- (size_t)(pmatch[0].rm_eo - pmatch[0].rm_so);
+- v = 0;
+- break;
+-
+- case REG_NOMATCH:
+ v = 1;
+- break;
+-
+- default:
+- file_regerror(&rx, rc, ms);
+- v = (uint64_t)-1;
+- break;
}
+ zval_ptr_dtor(&subpats);
+ zval_ptr_dtor(&pattern);
@@ -3665,8 +3669,8 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
case FILE_INDIRECT:
diff -u libmagic.orig/strcasestr.c libmagic/strcasestr.c
---- libmagic.orig/strcasestr.c Mon Feb 9 15:48:48 2015
-+++ libmagic/strcasestr.c Wed Mar 18 20:10:15 2015
+--- libmagic.orig/strcasestr.c 2016-01-25 11:31:21.494017704 +0800
++++ libmagic/strcasestr.c 2016-01-25 11:31:32.678017695 +0800
@@ -39,6 +39,8 @@
#include "file.h"
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c
index f1de79bad8..8347afdeb7 100644
--- a/ext/fileinfo/libmagic/apprentice.c
+++ b/ext/fileinfo/libmagic/apprentice.c
@@ -3005,7 +3005,6 @@ apprentice_compile(struct magic_set *ms, struct magic_map *map, const char *fn)
{
static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
static const size_t m = sizeof(**map->magic);
- int fd = -1;
size_t len;
char *dbname;
int rv = -1;
diff --git a/ext/fileinfo/libmagic/funcs.c b/ext/fileinfo/libmagic/funcs.c
index 91e9906dcd..9ea5386ebf 100644
--- a/ext/fileinfo/libmagic/funcs.c
+++ b/ext/fileinfo/libmagic/funcs.c
@@ -61,7 +61,6 @@ extern public void convert_libmagic_pattern(zval *pattern, char *val, int len, i
protected int
file_printf(struct magic_set *ms, const char *fmt, ...)
{
- int rv;
va_list ap;
int len;
char *buf = NULL, *newstr;
@@ -283,7 +282,9 @@ simple:
if (file_printf(ms, "%s", code_mime) == -1)
rv = -1;
}
+#if PHP_FILEINFO_UNCOMPRESS
done_encoding:
+#endif
free(u8buf);
if (rv)
return rv;
@@ -402,7 +403,7 @@ file_check_mem(struct magic_set *ms, unsigned int level)
size_t len;
if (level >= ms->c.len) {
- len = (ms->c.len += 20) * sizeof(*ms->c.li);
+ len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
emalloc(len) :
erealloc(ms->c.li, len));
@@ -438,7 +439,7 @@ file_replace(struct magic_set *ms, const char *pat, const char *rep)
(void)setlocale(LC_CTYPE, "C");
opts |= PCRE_MULTILINE;
- convert_libmagic_pattern(&patt, pat, strlen(pat), opts);
+ convert_libmagic_pattern(&patt, (char*)pat, strlen(pat), opts);
if ((pce = pcre_get_compiled_regex_cache(Z_STR(patt))) == NULL) {
zval_ptr_dtor(&patt);
rep_cnt = -1;
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c
index 88c80a5434..41c4aa17d7 100644
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@ -2028,7 +2028,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
haystack = estrndup(ms->search.s, ms->search.s_len);
/* match v = 0, no match v = 1 */
- php_pcre_match_impl(pce, haystack, ms->search.s_len, &retval, &subpats, 1, 1, PREG_OFFSET_CAPTURE, 0);
+ php_pcre_match_impl(pce, haystack, ms->search.s_len, &retval, &subpats, 0, 1, PREG_OFFSET_CAPTURE, 0);
/* Free haystack */
efree(haystack);
@@ -2040,64 +2040,30 @@ magiccheck(struct magic_set *ms, struct magic *m)
/* Need to fetch global match which equals pmatch[0] */
zval *pzval;
HashTable *ht = Z_ARRVAL(subpats);
- zval *pattern_match = NULL, *pattern_offset = NULL;
- int first = 1, inner_first;
-
- ZEND_HASH_FOREACH_VAL(ht, pzval) {
- HashTable *inner_ht;
- zval *match, *offset;
- zval tmpcopy, matchcopy, offsetcopy;
-
- if (first) {
- first = 0;
- continue;
- }
- ZVAL_DUP(&tmpcopy, pzval);
-
- inner_ht = Z_ARRVAL(tmpcopy);
-
+ if ((pzval = zend_hash_index_find(ht, 0)) != NULL && Z_TYPE_P(pzval) == IS_ARRAY) {
/* If everything goes according to the master plan
tmpcopy now contains two elements:
0 = the match
1 = starting position of the match */
- inner_first = 1;
- ZEND_HASH_FOREACH_VAL(inner_ht, match) {
- if (inner_first) {
- inner_first = 0;
- continue;
- }
- ZVAL_DUP(&matchcopy, match);
- convert_to_string(&matchcopy);
- pattern_match = &matchcopy;
- } ZEND_HASH_FOREACH_END();
-
- inner_first = 1;
- ZEND_HASH_FOREACH_VAL(inner_ht, offset) {
- if (inner_first) {
- inner_first = 0;
- continue;
+ zval *match, *offset;
+ if ((match = zend_hash_index_find(Z_ARRVAL_P(pzval), 0)) &&
+ (offset = zend_hash_index_find(Z_ARRVAL_P(pzval), 1))) {
+ if (Z_TYPE_P(match) != IS_STRING && Z_TYPE_P(offset) != IS_LONG) {
+ goto error_out;
}
- ZVAL_DUP(&offsetcopy, offset);
- convert_to_long(&offsetcopy);
- pattern_offset = &offsetcopy;
- } ZEND_HASH_FOREACH_END();
-
- zval_dtor(&tmpcopy);
-
- if ((pattern_match != NULL) && (pattern_offset != NULL)) {
- ms->search.s += Z_LVAL_P(pattern_offset); /* this is where the match starts */
- ms->search.offset += Z_LVAL_P(pattern_offset); /* this is where the match starts as size_t */
- ms->search.rm_len = Z_STRLEN_P(pattern_match) /* This is the length of the matched pattern */;
+ ms->search.s += Z_LVAL_P(offset); /* this is where the match starts */
+ ms->search.offset += Z_LVAL_P(offset); /* this is where the match starts as size_t */
+ ms->search.rm_len = Z_STRLEN_P(match) /* This is the length of the matched pattern */;
v = 0;
-
- zval_ptr_dtor(pattern_match);
- zval_ptr_dtor(pattern_offset);
} else {
- zval_ptr_dtor(&subpats);
- zval_ptr_dtor(&pattern);
- return -1;
+ goto error_out;
}
- } ZEND_HASH_FOREACH_END();
+ } else {
+error_out:
+ zval_ptr_dtor(&subpats);
+ zval_ptr_dtor(&pattern);
+ return -1;
+ }
} else {
v = 1;
}
diff --git a/ext/fileinfo/php_fileinfo.h b/ext/fileinfo/php_fileinfo.h
index b302f87da5..42ab7a22a4 100644
--- a/ext/fileinfo/php_fileinfo.h
+++ b/ext/fileinfo/php_fileinfo.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/fileinfo/tests/bug68819_002.phpt b/ext/fileinfo/tests/bug68819_002.phpt
index cec238d63e..7d5f6c642d 100644
--- a/ext/fileinfo/tests/bug68819_002.phpt
+++ b/ext/fileinfo/tests/bug68819_002.phpt
@@ -12,7 +12,7 @@ $string .= "\r\n";
$string .= "''''";
// Total string length > 8192
-$string .= str_repeat(chr(rand(32, 127)), 8184);
+$string .= str_repeat("a", 8184);
// Ending in this string
$string .= "say";
diff --git a/ext/fileinfo/tests/bug68996.phpt b/ext/fileinfo/tests/bug68996.phpt
index 9fa2190307..214e52fa6f 100644
--- a/ext/fileinfo/tests/bug68996.phpt
+++ b/ext/fileinfo/tests/bug68996.phpt
@@ -19,4 +19,4 @@ finfo_open(FILEINFO_MIME_TYPE, "\xfc\x63");
<br />
<b>Warning</b>: : failed to open stream: No such file or directory in <b>%sbug68996.php</b> on line <b>%d</b><br />
<br />
-<b>Warning</b>: finfo_open(): in <b>%sbug68996.php</b> on line <b>%d</b><br />
+<b>Warning</b>: finfo_open(): Failed to load magic database at '%s�c'. in <b>%sbug68996.php</b> on line <b>%d</b><br />
diff --git a/ext/fileinfo/tests/bug71434.phpt b/ext/fileinfo/tests/bug71434.phpt
new file mode 100644
index 0000000000..d886b6607b
--- /dev/null
+++ b/ext/fileinfo/tests/bug71434.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #68735 fileinfo out-of-bounds memory access
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--FILE--
+<?php
+$a='#!env python
+# -*- coding:utf-8 -*-
+
+from serial import Serial
+from sys import exit
+';
+$finfo = new finfo(FILEINFO_MIME_TYPE);
+echo $finfo->buffer($a) . "\n";
+?>
+--EXPECT--
+text/x-python
diff --git a/ext/fileinfo/tests/bug71527.magic b/ext/fileinfo/tests/bug71527.magic
new file mode 100644
index 0000000000..14d77817be
--- /dev/null
+++ b/ext/fileinfo/tests/bug71527.magic
@@ -0,0 +1 @@
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> \ No newline at end of file
diff --git a/ext/fileinfo/tests/bug71527.phpt b/ext/fileinfo/tests/bug71527.phpt
new file mode 100644
index 0000000000..f5b1d860e8
--- /dev/null
+++ b/ext/fileinfo/tests/bug71527.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #71527 Buffer over-write in finfo_open with malformed magic file
+--SKIPIF--
+<?php
+if (!class_exists('finfo'))
+ die('skip no fileinfo extension');
+--ENV--
+USE_ZEND_ALLOC=0
+--FILE--
+<?php
+ $finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527.magic");
+ $info = finfo_file($finfo, __FILE__);
+ var_dump($info);
+?>
+--EXPECTF--
+Warning: finfo_open(): Failed to load magic database at '%sbug71527.magic'. in %sbug71527.php on line %d
+
+Warning: finfo_file() expects parameter 1 to be resource, boolean given in %sbug71527.php on line %d
+bool(false)
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c
index aebb4f2b43..2142fe47d8 100644
--- a/ext/filter/callback_filter.c
+++ b/ext/filter/callback_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 6f8a7a5f8b..2c8dde9d49 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -152,7 +152,7 @@ zend_module_entry filter_module_entry = {
#ifdef COMPILE_DL_FILTER
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(filter)
#endif
@@ -389,7 +389,12 @@ static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval
ce = Z_OBJCE_P(value);
if (!ce->__tostring) {
zval_ptr_dtor(value);
- ZVAL_FALSE(value);
+ /* #67167: doesn't return null on failure for objects */
+ if (flags & FILTER_NULL_ON_FAILURE) {
+ ZVAL_NULL(value);
+ } else {
+ ZVAL_FALSE(value);
+ }
return;
}
}
@@ -541,7 +546,7 @@ static zval *php_filter_get_storage(zend_long arg)/* {{{ */
if (PG(auto_globals_jit)) {
zend_is_auto_global_str(ZEND_STRL("_ENV"));
}
- array_ptr = &IF_G(env_array) ? &IF_G(env_array) : &PG(http_globals)[TRACK_VARS_ENV];
+ array_ptr = !Z_ISUNDEF(IF_G(env_array)) ? &IF_G(env_array) : &PG(http_globals)[TRACK_VARS_ENV];
break;
case PARSE_SESSION:
/* FIXME: Implement session source */
diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h
index 7f3a0fda12..2f9abc32ba 100644
--- a/ext/filter/filter_private.h
+++ b/ext/filter/filter_private.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c
index ab13ce52f9..75550238e1 100644
--- a/ext/filter/logical_filters.c
+++ b/ext/filter/logical_filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/filter/php_filter.h b/ext/filter/php_filter.h
index 223e7e0015..44c15d78d0 100644
--- a/ext/filter/php_filter.h
+++ b/ext/filter/php_filter.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -65,13 +65,11 @@ ZEND_BEGIN_MODULE_GLOBALS(filter)
zend_long default_filter_flags;
ZEND_END_MODULE_GLOBALS(filter)
-#ifdef ZTS
-#define IF_G(v) ZEND_TSRMG(filter_globals_id, zend_filter_globals *, v)
-ZEND_TSRMLS_CACHE_EXTERN();
-#else
-#define IF_G(v) (filter_globals.v)
+#if defined(COMPILE_DL_FILTER) && defined(ZTS)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
+#define IF_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(filter, v)
#define PHP_INPUT_FILTER_PARAM_DECL zval *value, zend_long flags, zval *option_array, char *charset
void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL);
diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c
index f55cd21181..0b11ecfc2a 100644
--- a/ext/filter/sanitizing_filters.c
+++ b/ext/filter/sanitizing_filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -87,7 +87,7 @@ static void php_filter_encode_url(zval *value, const unsigned char* chars, const
memset(tmp, 1, 32);
}
*/
- str = zend_string_alloc(3 * Z_STRLEN_P(value), 0);
+ str = zend_string_safe_alloc(Z_STRLEN_P(value), 3, 0, 0);
p = (unsigned char *) ZSTR_VAL(str);
s = (unsigned char *) Z_STRVAL_P(value);
e = s + Z_STRLEN_P(value);
diff --git a/ext/filter/tests/bug67167.01.phpt b/ext/filter/tests/bug67167.01.phpt
new file mode 100644
index 0000000000..09e84fd053
--- /dev/null
+++ b/ext/filter/tests/bug67167.01.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #67167: object with VALIDATE_BOOLEAN and NULL_ON_FAILURE
+
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+
+--FILE--
+<?php
+var_dump(filter_var(
+ new \StdClass(),
+ FILTER_VALIDATE_BOOLEAN,
+ FILTER_NULL_ON_FAILURE
+));
+
+--EXPECTF--
+NULL
diff --git a/ext/filter/tests/bug67167.02.phpt b/ext/filter/tests/bug67167.02.phpt
new file mode 100644
index 0000000000..3ab0990dd3
--- /dev/null
+++ b/ext/filter/tests/bug67167.02.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #67167: filter_var(null,FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE) returns null
+
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+
+--FILE--
+<?php
+var_dump(filter_var(
+ null,
+ FILTER_VALIDATE_BOOLEAN,
+ FILTER_NULL_ON_FAILURE
+));
+
+--XFAIL--
+Requires php_zval_filter to not use convert_to_string for all filters.
+
+--EXPECTF--
+NULL
+
diff --git a/ext/filter/tests/bug71063.phpt b/ext/filter/tests/bug71063.phpt
new file mode 100644
index 0000000000..30e8d7d145
--- /dev/null
+++ b/ext/filter/tests/bug71063.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71063 (filter_input(INPUT_ENV, ..) does not work)
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+--ENV--
+PATH=/
+--INI--
+variables_order=E
+--FILE--
+<?php
+var_dump(count($_ENV['PATH']) > 0);
+var_dump(count(filter_input(INPUT_ENV, 'PATH')) > 0);
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/filter/tests/filter_var_array_with_ref.phpt b/ext/filter/tests/filter_var_array_with_ref.phpt
index cd202edf4d..565008ba5a 100644
--- a/ext/filter/tests/filter_var_array_with_ref.phpt
+++ b/ext/filter/tests/filter_var_array_with_ref.phpt
@@ -1,5 +1,7 @@
--TEST--
filter_var_array() on array with reference
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
<?php
diff --git a/ext/ftp/config.w32 b/ext/ftp/config.w32
index 0df5f3c609..b09d688180 100644
--- a/ext/ftp/config.w32
+++ b/ext/ftp/config.w32
@@ -1,11 +1,11 @@
// $Id$
// vim:ft=javascript
-ARG_ENABLE("ftp", "ftp support", "yes");
+ARG_ENABLE("ftp", "ftp support", "no");
-if (PHP_FTP == "yes") {
+if (PHP_FTP != "no") {
- EXTENSION("ftp", "php_ftp.c ftp.c", true);
+ EXTENSION("ftp", "php_ftp.c ftp.c");
if (CHECK_HEADER_ADD_INCLUDE("openssl/ssl.h", "CFLAGS_FTP") &&
CHECK_LIB("ssleay32.lib", "ftp", PHP_FTP) &&
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index bb41b1a621..b3548e70da 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -754,10 +754,11 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
memset(&ftp->pasvaddr, 0, n);
sa = (struct sockaddr *) &ftp->pasvaddr;
-#if HAVE_IPV6
if (getpeername(ftp->fd, sa, &n) < 0) {
return 0;
}
+
+#if HAVE_IPV6
if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
char *endptr, delimiter;
@@ -810,8 +811,9 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
ipbox.c[n] = (unsigned char) b[n];
}
sin = (struct sockaddr_in *) sa;
- sin->sin_family = AF_INET;
- sin->sin_addr = ipbox.ia[0];
+ if (ftp->usepasvaddress) {
+ sin->sin_addr = ipbox.ia[0];
+ }
sin->sin_port = ipbox.s[2];
ftp->pasv = 2;
diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h
index 546c69ccb7..881890e134 100644
--- a/ext/ftp/ftp.h
+++ b/ext/ftp/ftp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,6 +31,7 @@
#define FTP_DEFAULT_TIMEOUT 90
#define FTP_DEFAULT_AUTOSEEK 1
+#define FTP_DEFAULT_USEPASVADDRESS 1
#define PHP_FTP_FAILED 0
#define PHP_FTP_FINISHED 1
#define PHP_FTP_MOREDATA 2
@@ -71,6 +72,7 @@ typedef struct ftpbuf
php_sockaddr_storage pasvaddr; /* passive mode address */
zend_long timeout_sec; /* User configurable timeout (seconds) */
int autoseek; /* User configurable autoseek flag */
+ int usepasvaddress; /* Use the address returned by the pasv command */
int nb; /* "nonblocking" transfer in progress */
databuf_t *data; /* Data connection for "nonblocking" transfers */
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index eaed5c6847..5bbca446b2 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -326,6 +326,7 @@ PHP_MINIT_FUNCTION(ftp)
REGISTER_LONG_CONSTANT("FTP_AUTORESUME", PHP_FTP_AUTORESUME, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("FTP_TIMEOUT_SEC", PHP_FTP_OPT_TIMEOUT_SEC, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("FTP_AUTOSEEK", PHP_FTP_OPT_AUTOSEEK, CONST_PERSISTENT | CONST_CS);
+ REGISTER_LONG_CONSTANT("FTP_USEPASVADDRESS", PHP_FTP_OPT_USEPASVADDRESS, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("FTP_FAILED", PHP_FTP_FAILED, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("FTP_FINISHED", PHP_FTP_FINISHED, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("FTP_MOREDATA", PHP_FTP_MOREDATA, CONST_PERSISTENT | CONST_CS);
@@ -379,6 +380,7 @@ PHP_FUNCTION(ftp_connect)
/* autoseek for resuming */
ftp->autoseek = FTP_DEFAULT_AUTOSEEK;
+ ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS;
#ifdef HAVE_FTP_SSL
/* disable ssl */
ftp->use_ssl = 0;
@@ -415,6 +417,7 @@ PHP_FUNCTION(ftp_ssl_connect)
/* autoseek for resuming */
ftp->autoseek = FTP_DEFAULT_AUTOSEEK;
+ ftp->usepasvaddress = FTP_DEFAULT_USEPASVADDRESS;
/* enable ssl */
ftp->use_ssl = 1;
@@ -1478,6 +1481,15 @@ PHP_FUNCTION(ftp_set_option)
ftp->autoseek = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0;
RETURN_TRUE;
break;
+ case PHP_FTP_OPT_USEPASVADDRESS:
+ if (Z_TYPE_P(z_value) != IS_TRUE && Z_TYPE_P(z_value) != IS_FALSE) {
+ php_error_docref(NULL, E_WARNING, "Option USEPASVADDRESS expects value of type boolean, %s given",
+ zend_zval_type_name(z_value));
+ RETURN_FALSE;
+ }
+ ftp->usepasvaddress = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0;
+ RETURN_TRUE;
+ break;
default:
php_error_docref(NULL, E_WARNING, "Unknown option '%pd'", option);
RETURN_FALSE;
@@ -1509,6 +1521,9 @@ PHP_FUNCTION(ftp_get_option)
case PHP_FTP_OPT_AUTOSEEK:
RETURN_BOOL(ftp->autoseek);
break;
+ case PHP_FTP_OPT_USEPASVADDRESS:
+ RETURN_BOOL(ftp->usepasvaddress);
+ break;
default:
php_error_docref(NULL, E_WARNING, "Unknown option '%pd'", option);
RETURN_FALSE;
diff --git a/ext/ftp/php_ftp.h b/ext/ftp/php_ftp.h
index 3ddc76f074..f23ffcaaed 100644
--- a/ext/ftp/php_ftp.h
+++ b/ext/ftp/php_ftp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,6 +32,7 @@ extern zend_module_entry php_ftp_module_entry;
#define PHP_FTP_OPT_TIMEOUT_SEC 0
#define PHP_FTP_OPT_AUTOSEEK 1
+#define PHP_FTP_OPT_USEPASVADDRESS 2
#define PHP_FTP_AUTORESUME -1
PHP_MINIT_FUNCTION(ftp);
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index 36688e127a..1864d258be 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -9,9 +9,9 @@ dnl
PHP_ARG_WITH(gd, for GD support,
[ --with-gd[=DIR] Include GD support. DIR is the GD library base
install directory [BUNDLED]])
-if test -z "$PHP_VPX_DIR"; then
- PHP_ARG_WITH(vpx-dir, for the location of libvpx,
- [ --with-vpx-dir[=DIR] GD: Set the path to libvpx install prefix], no, no)
+if test -z "$PHP_WEBP_DIR"; then
+ PHP_ARG_WITH(webp-dir, for the location of libwebp,
+ [ --with-webp-dir[=DIR] GD: Set the path to libwebp install prefix], no, no)
fi
if test -z "$PHP_JPEG_DIR"; then
@@ -69,29 +69,37 @@ AC_DEFUN([PHP_GD_ZLIB],[
fi
])
-AC_DEFUN([PHP_GD_VPX],[
- if test "$PHP_VPX_DIR" != "no"; then
+AC_DEFUN([PHP_GD_WEBP],[
+ if test "$PHP_WEBP_DIR" != "no"; then
- for i in $PHP_VPX_DIR /usr/local /usr; do
- test -f $i/include/vpx_codec.h || test -f $i/include/vpx/vpx_codec.h && GD_VPX_DIR=$i && break
+ for i in $PHP_WEBP_DIR /usr/local /usr; do
+ test -f $i/include/webp/decode.h && GD_WEBP_DIR=$i && break
done
- if test -z "$GD_VPX_DIR"; then
- AC_MSG_ERROR([vpx_codec.h not found.])
+ if test -z "$GD_WEBP_DIR"; then
+ AC_MSG_ERROR([webp/decode.h not found.])
fi
- PHP_CHECK_LIBRARY(vpx,vpx_codec_destroy,
+ for i in $PHP_WEBP_DIR /usr/local /usr; do
+ test -f $i/include/webp/encode.h && GD_WEBP_DIR=$i && break
+ done
+
+ if test -z "$GD_WEBP_DIR"; then
+ AC_MSG_ERROR([webp/encode.h not found.])
+ fi
+
+ PHP_CHECK_LIBRARY(webp,WebPGetInfo,
[
- PHP_ADD_INCLUDE($GD_VPX_DIR/include)
+ PHP_ADD_INCLUDE($GD_WEBP_DIR/include)
PHP_ADD_LIBRARY(pthread)
- PHP_ADD_LIBRARY_WITH_PATH(vpx, $GD_VPX_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(webp, $GD_WEBP_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
],[
- AC_MSG_ERROR([Problem with libvpx.(a|so). Please check config.log for more information.])
+ AC_MSG_ERROR([Problem with libwebp.(a|so). Please check config.log for more information.])
],[
- -L$GD_VPX_DIR/$PHP_LIBDIR
+ -L$GD_WEBP_DIR/$PHP_LIBDIR
])
else
- AC_MSG_RESULT([If configure fails try --with-vpx-dir=<DIR>])
+ AC_MSG_RESULT([If configure fails try --with-webp-dir=<DIR>])
fi
])
@@ -242,7 +250,7 @@ dnl PNG is required by GD library
dnl Various checks for GD features
PHP_GD_ZLIB
PHP_GD_TTSTR
- PHP_GD_VPX
+ PHP_GD_WEBP
PHP_GD_JPEG
PHP_GD_PNG
PHP_GD_XPM
@@ -253,7 +261,7 @@ fi
if test "$PHP_GD" = "yes"; then
GD_MODULE_TYPE=builtin
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \
- libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/webpimg.c libgd/gd_webp.c \
+ libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_webp.c \
libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \
libgd/gdfontmb.c libgd/gdfontl.c libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c \
libgd/gdcache.c libgd/gdkanji.c libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c \
@@ -275,9 +283,9 @@ dnl Make sure the libgd/ is first in the include path
dnl Depending which libraries were included to PHP configure,
dnl enable the support in bundled GD library
- if test -n "$GD_VPX_DIR"; then
+ if test -n "$GD_WEBP_DIR"; then
AC_DEFINE(HAVE_GD_WEBP, 1, [ ])
- GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBVPX"
+ GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBWEBP"
fi
if test -n "$GD_JPEG_DIR"; then
@@ -310,7 +318,7 @@ else
dnl Various checks for GD features
PHP_GD_ZLIB
PHP_GD_TTSTR
- PHP_GD_VPX
+ PHP_GD_WEBP
PHP_GD_JPEG
PHP_GD_PNG
PHP_GD_XPM
diff --git a/ext/gd/config.w32 b/ext/gd/config.w32
index a51f027d38..2779a5b32d 100644
--- a/ext/gd/config.w32
+++ b/ext/gd/config.w32
@@ -2,7 +2,7 @@
// vim:ft=javascript
ARG_WITH("gd", "Bundled GD support", "yes,shared");
-ARG_WITH("libvpx", "vpx support", "yes");
+ARG_WITH("libwebp", "webp support", "yes");
if (PHP_GD != "no") {
if (
@@ -11,7 +11,8 @@ if (PHP_GD != "no") {
CHECK_HEADER_ADD_INCLUDE("ft2build.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include" + ";" + PHP_PHP_BUILD + "\\include\\freetype") &&
CHECK_LIB("libpng_a.lib;libpng.lib", "gd", PHP_GD) &&
CHECK_HEADER_ADD_INCLUDE("gd.h", "CFLAGS_GD", PHP_GD + ";ext\\gd\\libgd") &&
- (CHECK_HEADER_ADD_INCLUDE("png.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\libpng15") ||
+ (CHECK_HEADER_ADD_INCLUDE("png.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\libpng16") ||
+ CHECK_HEADER_ADD_INCLUDE("png.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\libpng15") ||
CHECK_HEADER_ADD_INCLUDE("png.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\libpng12")) &&
(CHECK_LIB("libiconv_a.lib;libiconv.lib", "gd", PHP_GD) || CHECK_LIB("iconv_a.lib;iconv.lib", "gd", PHP_GD)) &&
CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_GD", PHP_GD) &&
@@ -21,12 +22,13 @@ if (PHP_GD != "no") {
CHECK_HEADER_ADD_INCLUDE("xpm.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\X11")
) {
- if (PHP_LIBVPX != "no") {
- if (CHECK_LIB("vpxmt.lib", "gd", PHP_GD) &&
- CHECK_HEADER_ADD_INCLUDE("vp8.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\vpx")) {
- ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBVPX /D HAVE_GD_WEBP");
+ if (PHP_LIBWEBP != "no") {
+ if ((CHECK_LIB("libwebp_a.lib", "gd", PHP_GD) || CHECK_LIB("libwebp.lib", "gd", PHP_GD)) &&
+ CHECK_HEADER_ADD_INCLUDE("decode.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\webp") &&
+ CHECK_HEADER_ADD_INCLUDE("encode.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\webp")) {
+ ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBWEBP /D HAVE_GD_WEBP");
} else {
- WARNING("libvpx not enabled; libraries and headers not found");
+ WARNING("libwebp not enabled; libraries and headers not found");
}
}
CHECK_LIB("User32.lib", "gd", PHP_GD);
@@ -38,7 +40,7 @@ if (PHP_GD != "no") {
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c gdhelpers.c gd_io.c gd_io_dp.c \
gd_io_file.c gd_io_ss.c gd_jpeg.c gdkanji.c gd_png.c gd_ss.c \
gdtables.c gd_topal.c gd_wbmp.c gdxpm.c wbmp.c xbm.c gd_security.c gd_transform.c \
- gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c gd_color.c webpimg.c gd_webp.c \
+ gd_filter.c gd_pixelate.c gd_arc.c gd_rotate.c gd_color.c gd_webp.c \
gd_crop.c gd_interpolation.c gd_matrix.c", "gd");
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
ADD_FLAG("CFLAGS_GD", " \
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 9fcbb176c0..b09990938d 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1294,6 +1294,11 @@ PHP_FUNCTION(gd_info)
add_assoc_bool(return_value, "XPM Support", 0);
#endif
add_assoc_bool(return_value, "XBM Support", 1);
+#ifdef HAVE_GD_WEBP
+ add_assoc_bool(return_value, "WebP Support", 1);
+#else
+ add_assoc_bool(return_value, "WebP Support", 0);
+#endif
#if defined(USE_GD_JISX0208)
add_assoc_bool(return_value, "JIS-mapped Japanese Font Support", 1);
#else
@@ -1433,9 +1438,9 @@ PHP_FUNCTION(imagesetstyle)
}
/* copy the style values in the stylearr */
- stylearr = safe_emalloc(sizeof(int), zend_hash_num_elements(HASH_OF(styles)), 0);
+ stylearr = safe_emalloc(sizeof(int), zend_hash_num_elements(Z_ARRVAL_P(styles)), 0);
- ZEND_HASH_FOREACH_VAL(HASH_OF(styles), item) {
+ ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(styles), item) {
stylearr[index++] = zval_get_long(item);
} ZEND_HASH_FOREACH_END();
@@ -2435,7 +2440,7 @@ PHP_FUNCTION(imagecreatefromwebp)
_php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WEBP, "WEBP", gdImageCreateFromWebp, gdImageCreateFromWebpCtx);
}
/* }}} */
-#endif /* HAVE_GD_VPX */
+#endif /* HAVE_GD_WEBP */
/* {{{ proto resource imagecreatefromxbm(string filename)
Create a new image from XBM file or URL */
@@ -3852,10 +3857,9 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
if (extended && EXT) { /* parse extended info */
zval *item;
zend_string *key;
- zend_ulong num_key;
/* walk the assoc array */
- ZEND_HASH_FOREACH_KEY_VAL(HASH_OF(EXT), num_key, key, item) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(EXT), key, item) {
if (key == NULL) {
continue;
}
@@ -4544,28 +4548,28 @@ PHP_FUNCTION(imagecrop)
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "x", sizeof("x") -1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") -1)) != NULL) {
rect.x = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing x position");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "y", sizeof("y") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) {
rect.y = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing y position");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "width", sizeof("width") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) {
rect.width = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing width");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "height", sizeof("height") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) {
rect.height = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing height");
@@ -4663,6 +4667,10 @@ PHP_FUNCTION(imagescale)
}
}
+ if (tmp_h <= 0 || tmp_w <= 0) {
+ RETURN_FALSE;
+ }
+
new_width = tmp_w;
new_height = tmp_h;
@@ -4727,28 +4735,28 @@ PHP_FUNCTION(imageaffine)
}
if (z_rect != NULL) {
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "x", sizeof("x") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") - 1)) != NULL) {
rect.x = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing x position");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "y", sizeof("y") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) {
rect.y = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing y position");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "width", sizeof("width") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) {
rect.width = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing width");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(z_rect), "height", sizeof("height") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) {
rect.height = zval_get_long(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing height");
@@ -4797,14 +4805,14 @@ PHP_FUNCTION(imageaffinematrixget)
php_error_docref(NULL, E_WARNING, "Array expected as options");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(options), "x", sizeof("x") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "x", sizeof("x") - 1)) != NULL) {
x = zval_get_double(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing x position");
RETURN_FALSE;
}
- if ((tmp = zend_hash_str_find(HASH_OF(options), "y", sizeof("y") - 1)) != NULL) {
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "y", sizeof("y") - 1)) != NULL) {
y = zval_get_double(tmp);
} else {
php_error_docref(NULL, E_WARNING, "Missing y position");
diff --git a/ext/gd/gd_compat.c b/ext/gd/gd_compat.c
index d6d8d0b2f9..51020a3c71 100644
--- a/ext/gd/gd_compat.c
+++ b/ext/gd/gd_compat.c
@@ -1,4 +1,8 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#else
#include "php_config.h"
+#endif
#ifdef HAVE_GD_PNG
/* needs to be first */
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c
index c848e438c7..da825671d6 100644
--- a/ext/gd/gd_ctx.c
+++ b/ext/gd/gd_ctx.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -134,6 +134,11 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
php_error_docref(NULL, E_WARNING, "Invalid 2nd parameter, it must a filename or a stream");
RETURN_FALSE;
}
+ } else if (argc > 1 && file != NULL) {
+ stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+ if (stream == NULL) {
+ RETURN_FALSE;
+ }
} else {
ctx = emalloc(sizeof(gdIOCtx));
ctx->putC = _php_image_output_putc;
@@ -181,7 +186,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
q = i;
}
if (image_type == PHP_GDIMG_TYPE_XBM) {
- (*func_p)(im, file, q, ctx);
+ (*func_p)(im, file ? file : "", q, ctx);
} else {
(*func_p)(im, q, ctx);
}
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 3164a2cc9e..0b0d933bfd 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -1767,14 +1767,24 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
return;
}
+ if (!im->trueColor) {
+ if ((color > (im->colorsTotal - 1)) || (border > (im->colorsTotal - 1)) || (color < 0)) {
+ return;
+ }
+ }
+
restoreAlphaBlending = im->alphaBlendingFlag;
im->alphaBlendingFlag = 0;
if (x >= im->sx) {
x = im->sx - 1;
+ } else if (x < 0) {
+ x = 0;
}
if (y >= im->sy) {
y = im->sy - 1;
+ } else if (y < 0) {
+ y = 0;
}
for (i = x; i >= 0; i--) {
@@ -2042,7 +2052,9 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
t=y1;
y1 = y2;
y2 = t;
-
+ }
+
+ if (x2 < x1) {
t = x1;
x1 = x2;
x2 = t;
@@ -2093,12 +2105,16 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
return;
} else {
- y1v = y1h + 1;
- y2v = y2h - 1;
- gdImageLine(im, x1h, y1h, x2h, y1h, color);
- gdImageLine(im, x1h, y2h, x2h, y2h, color);
- gdImageLine(im, x1v, y1v, x1v, y2v, color);
- gdImageLine(im, x2v, y1v, x2v, y2v, color);
+ if (x1 == x2 || y1 == y2) {
+ gdImageLine(im, x1, y1, x2, y2, color);
+ } else {
+ y1v = y1h + 1;
+ y2v = y2h - 1;
+ gdImageLine(im, x1h, y1h, x2h, y1h, color);
+ gdImageLine(im, x1h, y2h, x2h, y2h, color);
+ gdImageLine(im, x1v, y1v, x1v, y2v, color);
+ gdImageLine(im, x2v, y1v, x2v, y2v, color);
+ }
}
}
diff --git a/ext/gd/libgd/gd_arc.c b/ext/gd/libgd/gd_arc.c
index 545dcb3fc5..1c74871388 100644
--- a/ext/gd/libgd/gd_arc.c
+++ b/ext/gd/libgd/gd_arc.c
@@ -58,7 +58,7 @@ void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
int x=0,mx1=0,mx2=0,my1=0,my2=0;
long aq,bq,dx,dy,r,rx,ry,a,b;
int i;
- int old_y1,old_y2;
+ int old_y2;
a=w>>1;
b=h>>1;
@@ -79,7 +79,6 @@ void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
ry = 0;
x = a;
old_y2=-2;
- old_y1=-2;
while (x > 0){
if (r > 0) {
my1++;my2--;
@@ -95,15 +94,10 @@ void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
if(old_y2!=my2){
for(i=mx1;i<=mx2;i++){
gdImageSetPixel(im,i,my1,c);
- }
- }
- if(old_y2!=my2){
- for(i=mx1;i<=mx2;i++){
gdImageSetPixel(im,i,my2,c);
}
}
old_y2 = my2;
- old_y1 = my1;
}
}
diff --git a/ext/gd/libgd/gd_crop.c b/ext/gd/libgd/gd_crop.c
index 84edb5d1f7..8331521446 100644
--- a/ext/gd/libgd/gd_crop.c
+++ b/ext/gd/libgd/gd_crop.c
@@ -80,14 +80,14 @@ printf("rect->x: %i\nrect->y: %i\nrect->width: %i\nrect->height: %i\n", crop->x,
y = crop->y;
if (src->trueColor) {
unsigned int dst_y = 0;
- while (y < (crop->y + (crop->height - 1))) {
+ while (y < (crop->y + crop->height)) {
/* TODO: replace 4 w/byte per channel||pitch once available */
memcpy(dst->tpixels[dst_y++], src->tpixels[y++] + crop->x, crop->width * 4);
}
} else {
int x;
- for (y = crop->y; y < (crop->y + (crop->height - 1)); y++) {
- for (x = crop->x; x < (crop->x + (crop->width - 1)); x++) {
+ for (y = crop->y; y < (crop->y + crop->height); y++) {
+ for (x = crop->x; x < (crop->x + crop->width); x++) {
dst->pixels[y - crop->y][x - crop->x] = src->pixels[y][x];
}
}
diff --git a/ext/gd/libgd/gd_gd2.c b/ext/gd/libgd/gd_gd2.c
index efc6ef47af..6726fee826 100644
--- a/ext/gd/libgd/gd_gd2.c
+++ b/ext/gd/libgd/gd_gd2.c
@@ -145,9 +145,15 @@ static int _gd2GetHeader(gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, in
cidx = gdCalloc(sidx, 1);
for (i = 0; i < nc; i++) {
if (gdGetInt(&cidx[i].offset, in) != 1) {
+ gdFree(cidx);
goto fail1;
}
if (gdGetInt(&cidx[i].size, in) != 1) {
+ gdFree(cidx);
+ goto fail1;
+ }
+ if (cidx[i].offset < 0 || cidx[i].size < 0) {
+ gdFree(cidx);
goto fail1;
}
}
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index ed2fc188f9..6d703b8b30 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -932,9 +932,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi
double dTotalWeight = 0.0;
int iSrc;
- res->ContribRow[u].Left = iLeft;
- res->ContribRow[u].Right = iRight;
-
/* Cut edge points to fit in filter window in case of spill-off */
if (iRight - iLeft + 1 > windows_size) {
if (iLeft < ((int)src_size - 1 / 2)) {
@@ -944,6 +941,9 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi
}
}
+ res->ContribRow[u].Left = iLeft;
+ res->ContribRow[u].Right = iRight;
+
for (iSrc = iLeft; iSrc <= iRight; iSrc++) {
dTotalWeight += (res->ContribRow[u].Weights[iSrc-iLeft] = scale_f_d * (*pFilter)(scale_f_d * (dCenter - (double)iSrc)));
}
@@ -1059,6 +1059,15 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt
gdImagePtr tmp_im;
gdImagePtr dst;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
+ /* Convert to truecolor if it isn't; this code requires it. */
+ if (!src->trueColor) {
+ gdImagePaletteToTrueColor(src);
+ }
+
tmp_im = gdImageCreateTrueColor(new_width, src_height);
if (tmp_im == NULL) {
return NULL;
@@ -1068,12 +1077,12 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt
dst = gdImageCreateTrueColor(new_width, new_height);
if (dst == NULL) {
- gdFree(tmp_im);
+ gdImageDestroy(tmp_im);
return NULL;
}
gdImageSetInterpolationMethod(dst, src->interpolation_id);
_gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height);
- gdFree(tmp_im);
+ gdImageDestroy(tmp_im);
return dst;
}
@@ -1082,6 +1091,10 @@ gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsig
{
gdImagePtr tmp_im;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
tmp_im = gdImageCreateTrueColor(new_width, src_height);
if (tmp_im == NULL) {
return NULL;
@@ -1091,7 +1104,7 @@ gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsig
_gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, src_height);
_gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height);
- gdFree(tmp_im);
+ gdImageDestroy(tmp_im);
return dst;
}
@@ -1115,6 +1128,10 @@ gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width,
unsigned long dst_offset_y = 0;
unsigned int i;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
dst_img = gdImageCreateTrueColor(new_width, new_height);
if (dst_img == NULL) {
@@ -1216,6 +1233,10 @@ static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int
gdImagePtr new_img;
const int transparent = im->transparent;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
new_img = gdImageCreateTrueColor(new_width, new_height);
if (new_img == NULL) {
return NULL;
@@ -1308,6 +1329,10 @@ static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_w
long i;
gdImagePtr new_img;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
new_img = gdImageCreateTrueColor(new_width, new_height);
if (!new_img){
return NULL;
@@ -1407,6 +1432,10 @@ gdImagePtr gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width, co
unsigned int dst_offset_y = 0;
long i;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
/* impact perf a bit, but not that much. Implementation for palette
images can be done at a later point.
*/
@@ -1629,7 +1658,11 @@ gdImagePtr gdImageScale(const gdImagePtr src, const unsigned int new_width, cons
gdImagePtr im_scaled = NULL;
if (src == NULL || src->interpolation_id < 0 || src->interpolation_id > GD_METHOD_COUNT) {
- return 0;
+ return NULL;
+ }
+
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
}
switch (src->interpolation_id) {
@@ -1675,6 +1708,10 @@ gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, co
unsigned int i;
gdImagePtr dst;
+ if (new_width == 0 || new_height == 0) {
+ return NULL;
+ }
+
dst = gdImageCreateTrueColor(new_width, new_height);
if (!dst) {
return NULL;
@@ -2165,7 +2202,7 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
images can be done at a later point.
*/
if (src->trueColor == 0) {
- if (bgcolor >= 0) {
+ if (bgcolor < gdMaxColors) {
bgcolor = gdTrueColorAlpha(src->red[bgcolor], src->green[bgcolor], src->blue[bgcolor], src->alpha[bgcolor]);
}
gdImagePaletteToTrueColor(src);
@@ -2173,10 +2210,13 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
/* no interpolation needed here */
switch (angle_rounded) {
- case 9000:
+ case -27000:
+ case 9000:
return gdImageRotate90(src, 0);
- case 18000:
+ case -18000:
+ case 18000:
return gdImageRotate180(src, 0);
+ case -9000:
case 27000:
return gdImageRotate270(src, 0);
}
diff --git a/ext/gd/libgd/gd_webp.c b/ext/gd/libgd/gd_webp.c
index bf9ac9dd0e..da0cc9d5b8 100644
--- a/ext/gd/libgd/gd_webp.c
+++ b/ext/gd/libgd/gd_webp.c
@@ -1,77 +1,52 @@
+#ifdef HAVE_LIBWEBP
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "gd.h"
-
-
-#ifdef HAVE_LIBVPX
-#include "webpimg.h"
#include "gdhelpers.h"
+#include "webp/decode.h"
+#include "webp/encode.h"
-extern void gd_YUV420toRGBA(uint8* Y,
- uint8* U,
- uint8* V,
- gdImagePtr im);
-
-extern void gd_RGBAToYUV420(gdImagePtr im2,
- uint8* Y,
- uint8* U,
- uint8* V);
-
-const char * gdWebpGetVersionString()
-{
- return "not defined";
-}
+#define GD_WEBP_ALLOC_STEP (4*1024)
gdImagePtr gdImageCreateFromWebp (FILE * inFile)
{
gdImagePtr im;
gdIOCtx *in = gdNewFileCtx(inFile);
+ if (!in)
+ return 0;
im = gdImageCreateFromWebpCtx(in);
in->gd_free(in);
return im;
}
+
gdImagePtr gdImageCreateFromWebpPtr (int size, void *data)
{
- int width, height, ret;
- unsigned char *Y = NULL;
- unsigned char *U = NULL;
- unsigned char *V = NULL;
gdImagePtr im;
-
- ret = WebPDecode(data, size, &Y, &U, &V, &width, &height);
- if (ret != webp_success) {
- if (Y) free(Y);
- if (U) free(U);
- if (V) free(V);
- php_gd_error("WebP decode: fail to decode input data");
- return NULL;
- }
- im = gdImageCreateTrueColor(width, height);
- if (!im) {
- return NULL;
- }
- gd_YUV420toRGBA(Y, U, V, im);
+ gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
+ if (!in)
+ return 0;
+ im = gdImageCreateFromWebpCtx(in);
+ in->gd_free(in);
return im;
}
-#define GD_WEBP_ALLOC_STEP (4*1024)
-
gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
{
- int width, height, ret;
- unsigned char *filedata = NULL;
- unsigned char *read, *temp;
- unsigned char *Y = NULL;
- unsigned char *U = NULL;
- unsigned char *V = NULL;
+ int width, height;
+ uint8_t *filedata = NULL;
+ uint8_t *argb = NULL;
size_t size = 0, n;
gdImagePtr im;
+ int x, y;
+ uint8_t *p;
do {
+ unsigned char *read, *temp;
+
temp = gdRealloc(filedata, size+GD_WEBP_ALLOC_STEP);
if (temp) {
filedata = temp;
@@ -80,31 +55,105 @@ gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
if (filedata) {
gdFree(filedata);
}
- php_gd_error("WebP decode: realloc failed");
+ zend_error(E_ERROR, "WebP decode: realloc failed");
return NULL;
}
n = gdGetBuf(read, GD_WEBP_ALLOC_STEP, infile);
- /* differs from upstream where gdGetBuf return 0 instead of EOF */
if (n>0 && n!=EOF) {
size += n;
}
} while (n>0 && n!=EOF);
- ret = WebPDecode(filedata, size, &Y, &U, &V, &width, &height);
- gdFree(filedata);
- if (ret != webp_success) {
- if (Y) free(Y);
- if (U) free(U);
- if (V) free(V);
- php_gd_error("WebP decode: fail to decode input data");
+ if (WebPGetInfo(filedata,size, &width, &height) == 0) {
+ zend_error(E_ERROR, "gd-webp cannot get webp info");
+ gdFree(filedata);
return NULL;
}
+
im = gdImageCreateTrueColor(width, height);
- gd_YUV420toRGBA(Y, U, V, im);
+ if (!im) {
+ gdFree(filedata);
+ return NULL;
+ }
+ argb = WebPDecodeARGB(filedata, size, &width, &height);
+ if (!argb) {
+ zend_error(E_ERROR, "gd-webp cannot allocate temporary buffer");
+ gdFree(filedata);
+ gdImageDestroy(im);
+ return NULL;
+ }
+ for (y = 0, p = argb; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ register uint8_t a = gdAlphaMax - (*(p++) >> 1);
+ register uint8_t r = *(p++);
+ register uint8_t g = *(p++);
+ register uint8_t b = *(p++);
+ im->tpixels[y][x] = gdTrueColorAlpha(r, g, b, a);
+ }
+ }
+ gdFree(filedata);
+ /* do not use gdFree here, in case gdFree/alloc is mapped to something else than libc */
+ free(argb);
+ im->saveAlphaFlag = 1;
return im;
}
+void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
+{
+ uint8_t *argb;
+ int x, y;
+ uint8_t *p;
+ uint8_t *out;
+ size_t out_size;
+
+ if (im == NULL) {
+ return;
+ }
+
+ if (!gdImageTrueColor(im)) {
+ zend_error(E_ERROR, "Paletter image not supported by webp");
+ return;
+ }
+
+ if (quantization == -1) {
+ quantization = 80;
+ }
+
+ argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
+ if (!argb) {
+ return;
+ }
+ p = argb;
+ for (y = 0; y < gdImageSY(im); y++) {
+ for (x = 0; x < gdImageSX(im); x++) {
+ register int c;
+ register char a;
+ c = im->tpixels[y][x];
+ a = gdTrueColorGetAlpha(c);
+ if (a == 127) {
+ a = 0;
+ } else {
+ a = 255 - ((a << 1) + (a >> 6));
+ }
+ *(p++) = gdTrueColorGetRed(c);
+ *(p++) = gdTrueColorGetGreen(c);
+ *(p++) = gdTrueColorGetBlue(c);
+ *(p++) = a;
+ }
+ }
+ out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quantization, &out);
+ if (out_size == 0) {
+ zend_error(E_ERROR, "gd-webp encoding failed");
+ goto freeargb;
+ }
+ gdPutBuf(out, out_size, outfile);
+ free(out);
+
+freeargb:
+ gdFree(argb);
+}
+
void gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
{
gdIOCtx *out = gdNewFileCtx(outFile);
@@ -115,7 +164,7 @@ void gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
void gdImageWebp (gdImagePtr im, FILE * outFile)
{
gdIOCtx *out = gdNewFileCtx(outFile);
- gdImageWebpCtx(im, out, -1);
+ gdImageWebpCtx(im, out, -1);
out->gd_free(out);
}
@@ -139,74 +188,4 @@ void * gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization)
out->gd_free(out);
return rv;
}
-
-/*
- * Maps normalized QP (quality) to VP8 QP
- */
-int mapQualityToVP8QP(int quality) {
-#define MIN_QUALITY 0
-#define MAX_QUALITY 100
-#define MIN_VP8QP 1
-#define MAX_VP8QP 63
- const float scale = MAX_VP8QP - MIN_VP8QP;
- const float vp8qp =
- scale * (MAX_QUALITY - quality) / (MAX_QUALITY - MIN_QUALITY) + MIN_VP8QP;
- if (quality < MIN_QUALITY || quality > MAX_QUALITY) {
- php_gd_error("Wrong quality value %d.", quality);
- return -1;
- }
-
- return (int)(vp8qp + 0.5);
-}
-
-/* This routine is based in part on code from Dale Lutz (Safe Software Inc.)
- * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide"
- * (http://www.cdrom.com/pub/png/pngbook.html).
- */
-void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
-{
- int width = im->sx;
- int height = im->sy;
- int colors = im->colorsTotal;
- int *open = im->open;
-
- int yuv_width, yuv_height, yuv_nbytes, ret;
- int vp8_quality;
- unsigned char *Y = NULL,
- *U = NULL,
- *V = NULL;
- unsigned char *filedata = NULL;
-
- /* Conversion to Y,U,V buffer */
- yuv_width = (width + 1) >> 1;
- yuv_height = (height + 1) >> 1;
- yuv_nbytes = width * height + 2 * yuv_width * yuv_height;
-
- if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) {
- php_gd_error("gd-webp error: cannot allocate Y buffer");
- return;
- }
- vp8_quality = mapQualityToVP8QP(quantization);
-
- U = Y + width * height;
- V = U + yuv_width * yuv_height;
- gd_RGBAToYUV420(im, Y, U, V);
-
- /* Encode Y,U,V and write data to file */
- ret = WebPEncode(Y, U, V, width, height, width, yuv_width, yuv_height, yuv_width,
- vp8_quality, &filedata, &yuv_nbytes, NULL);
- gdFree(Y);
-
- if (ret != webp_success) {
- if (filedata) {
- free(filedata);
- }
- php_gd_error("gd-webp error: WebP Encoder failed");
- return;
- }
-
- gdPutBuf (filedata, yuv_nbytes, outfile);
- free(filedata);
-}
-
-#endif /* HAVE_LIBVPX */
+#endif /* HAVE_LIBWEBP */
diff --git a/ext/gd/libgd/webpimg.c b/ext/gd/libgd/webpimg.c
deleted file mode 100644
index 9d801a29a3..0000000000
--- a/ext/gd/libgd/webpimg.c
+++ /dev/null
@@ -1,900 +0,0 @@
-/*===========================================================================*
- - Copyright 2010 Google Inc.
- -
- - This code is licensed under the same terms as WebM:
- - Software License Agreement: http://www.webmproject.org/license/software/
- - Additional IP Rights Grant: http://www.webmproject.org/license/additional/
- *===========================================================================*/
-
-/*
- * Encoding/Decoding of WebP still image compression format.
- *
- * 1. WebPDecode: Takes an array of bytes (string) corresponding to the WebP
- * encoded image and generates output in the YUV format with
- * the color components U, V subsampled to 1/2 resolution along
- * each dimension.
- *
- * 2. YUV420toRGBA: Converts from YUV (with color subsampling) such as produced
- * by the WebPDecode routine into 32 bits per pixel RGBA data
- * array. This data array can be directly used by the Leptonica
- * Pix in-memory image format.
- *
- * 3. WebPEncode: Takes a Y, U, V data buffers (with color components U and V
- * subsampled to 1/2 resolution) and generates the WebP string
- *
- * 4. RGBAToYUV420: Generates Y, U, V data (with color subsampling) from 32 bits
- * per pixel RGBA data buffer. The resulting YUV data can be
- * directly fed into the WebPEncode routine.
- *
- * 5. AdjustColorspace:
- *
- * 6. AdjustColorspaceBack:
- */
-#include "gd.h"
-#ifdef HAVE_LIBVPX
-#include "webpimg.h"
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "vpx/vpx_decoder.h"
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_encoder.h"
-#include "vpx/vp8cx.h"
-#include "gd.h"
-
-/*---------------------------------------------------------------------*
- * color conversions *
- *---------------------------------------------------------------------*/
-
-#ifndef inline
-# define inline __inline
-#endif
-static inline int clip(float v, int a, int b) {
- return (v > b) ? b : (v < 0) ? 0 : (int)(v);
-}
-enum {
- COLOR_RED = 0,
- COLOR_GREEN = 1,
- COLOR_BLUE = 2,
- ALPHA_CHANNEL = 3
-};
-
-/* endian neutral extractions of RGBA from a 32 bit pixel */
-static const uint32 RED_SHIFT =
- 8 * (sizeof(uint32) - 1 - COLOR_RED); /* 24 */
-static const uint32 GREEN_SHIFT =
- 8 * (sizeof(uint32) - 1 - COLOR_GREEN); /* 16 */
-static const uint32 BLUE_SHIFT =
- 8 * (sizeof(uint32) - 1 - COLOR_BLUE); /* 8 */
-static const uint32 ALPHA_SHIFT =
- 8 * (sizeof(uint32) - 1 - ALPHA_CHANNEL); /* 0 */
-
-static inline int GetRed(const uint32* rgba) {
- return gdTrueColorGetRed(*rgba);
-}
-
-static inline int GetGreen(const uint32* rgba) {
- return gdTrueColorGetGreen(*rgba);
-}
-
-static inline int GetBlue(const uint32* rgba) {
- return gdTrueColorGetBlue(*rgba);
-}
-
-enum { YUV_FRAC = 16 };
-
-static inline int clip_uv(int v) {
- v = (v + (257 << (YUV_FRAC + 2 - 1))) >> (YUV_FRAC + 2);
- return ((v & ~0xff) == 0) ? v : v < 0 ? 0u : 255u;
-}
-
-
-/* YUV <-----> RGB conversions */
-/* The exact naming is Y'CbCr, following the ITU-R BT.601 standard.
- * More information at: http://en.wikipedia.org/wiki/YCbCr
- */
-static inline int GetLumaY(int r, int g, int b) {
- const int kRound = (1 << (YUV_FRAC - 1)) + (16 << YUV_FRAC);
- // Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16
- const int luma = 16839 * r + 33059 * g + 6420 * b;
- return (luma + kRound) >> YUV_FRAC;
-}
-
-static inline int GetLumaYfromPtr(uint32* rgba) {
- const int r = GetRed(rgba);
- const int g = GetGreen(rgba);
- const int b = GetBlue(rgba);
- return GetLumaY(r, g, b);
-}
-
-static inline int GetChromaU(int r, int g, int b) {
- // U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128
- return clip_uv(-9719 * r - 19081 * g + 28800 * b);
-}
-
-static inline int GetChromaV(int r, int g, int b) {
- // V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128
- return clip_uv(+28800 * r - 24116 * g - 4684 * b);
-}
-
-/* Converts YUV to RGB and writes into a 32 bit pixel in endian
- * neutral fashion
- */
-enum { RGB_FRAC = 16, RGB_HALF = (1 << RGB_FRAC) / 2,
- RGB_RANGE_MIN = -227, RGB_RANGE_MAX = 256 + 226 };
-
-static int init_done = 0;
-static int16_t kVToR[256], kUToB[256];
-static int32_t kVToG[256], kUToG[256];
-static uint8_t kClip[RGB_RANGE_MAX - RGB_RANGE_MIN];
-
-static void InitTables() {
- int i;
- for (i = 0; i < 256; ++i) {
- kVToR[i] = (89858 * (i - 128) + RGB_HALF) >> RGB_FRAC;
- kUToG[i] = -22014 * (i - 128) + RGB_HALF;
- kVToG[i] = -45773 * (i - 128);
- kUToB[i] = (113618 * (i - 128) + RGB_HALF) >> RGB_FRAC;
- }
- for (i = RGB_RANGE_MIN; i < RGB_RANGE_MAX; ++i) {
- const int j = ((i - 16) * 76283 + RGB_HALF) >> RGB_FRAC;
- kClip[i - RGB_RANGE_MIN] = (j < 0) ? 0 : (j > 255) ? 255 : j;
- }
-
- init_done = 1;
-}
-
-static void ToRGB(int y, int u, int v, uint32* const dst) {
- const int r_off = kVToR[v];
- const int g_off = (kVToG[v] + kUToG[u]) >> RGB_FRAC;
- const int b_off = kUToB[u];
- const int r = kClip[y + r_off - RGB_RANGE_MIN];
- const int g = kClip[y + g_off - RGB_RANGE_MIN];
- const int b = kClip[y + b_off - RGB_RANGE_MIN];
- *dst = (r << RED_SHIFT) | (g << GREEN_SHIFT) | (b << BLUE_SHIFT);
-}
-
-static inline uint32 get_le32(const uint8* const data) {
- return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
-}
-
-/* Returns the difference (in dB) between two images represented in YUV format
- *
- * Input:
- * Y1/U1/V1: The Y/U/V data of the first image
- * Y2/U2/V2: The Y/U/V data of the second image
- *
- * Returns the PSNR (http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio)
- * value computed between the two images
- */
-double GetPSNRYuv(const uint8* Y1,
- const uint8* U1,
- const uint8* V1,
- const uint8* Y2,
- const uint8* U2,
- const uint8* V2,
- int y_width,
- int y_height) {
- int x, y, row_idx;
- const int uv_width = ((y_width + 1) >> 1);
- const int uv_height = ((y_height + 1) >> 1);
- double sse = 0., count = 0.;
- for (y = 0; y < y_height; ++y) {
- count += y_width;
- row_idx = y * y_width;
- for (x = 0; x < y_width; ++x) {
- double diff = Y1[row_idx + x] - Y2[row_idx + x];
- sse += diff * diff;
- }
- }
- for (y = 0; y < uv_height; ++y) {
- count += 2 * uv_width;
- row_idx = y * uv_width;
- for (x = 0; x < uv_width; ++x) {
- const double diff_U = U1[row_idx + x] - U2[row_idx + x];
- const double diff_V = V1[row_idx + x] - V2[row_idx + x];
- sse += diff_U * diff_U + diff_V * diff_V;
- }
- }
- return -4.3429448 * log(sse / (255. * 255. * count));
-}
-
-/* Returns the difference (in dB) between two images. One represented
- * using Y,U,V vectors and the other is webp image data.
- * Input:
- * Y1/U1/V1: The Y/U/V data of the first image
- * imgdata: data buffer containing webp image
- * imgdata_size: size of the imgdata buffer
- *
- * Returns the PSNR value computed between the two images
- */
-double WebPGetPSNR(const uint8* Y1,
- const uint8* U1,
- const uint8* V1,
- uint8* imgdata,
- int imgdata_size) {
- uint8* Y2 = NULL;
- uint8* U2 = NULL;
- uint8* V2 = NULL;
- int w = 0, h = 0;
- double psnr = 0;
-
- WebPDecode(imgdata,
- imgdata_size,
- &Y2,
- &U2,
- &V2,
- &w,
- &h);
-
- psnr = GetPSNRYuv(Y1, U1, V1, Y2, U2, V2, w, h);
- free(Y2);
-
- return psnr;
-}
-
-/*---------------------------------------------------------------------*
- * Reading WebP *
- *---------------------------------------------------------------------*/
-
-/* RIFF layout is:
- * 0ffset tag
- * 0...3 "RIFF" 4-byte tag
- * 4...7 size of image data (including metadata) starting at offset 8
- * 8...11 "WEBP" our form-type signature
- * 12..15 "VP8 " 4-byte tags, describing the raw video format used
- * 16..19 size of the raw WebP image data, starting at offset 20
- * 20.... the WebP bytes
- * There can be extra chunks after the "VP8 " chunk (ICMT, ICOP, ...)
- * All 32-bits sizes are in little-endian order.
- * Note: chunk data must be padded to multiple of 2 in size
- */
-
-int SkipRiffHeader(const uint8** data_ptr, int *data_size_ptr) {
- /* 20 bytes RIFF header 10 bytes VP8 header */
- const int kHeaderSize = (20 + 10);
- uint32 chunk_size = 0xffffffffu;
-
- if (*data_size_ptr >= kHeaderSize && !memcmp(*data_ptr, "RIFF", 4)) {
- if (memcmp(*data_ptr + 8, "WEBP", 4)) {
- return 0; /* wrong image file signature */
- } else {
- const uint32 riff_size = get_le32(*data_ptr + 4);
- if (memcmp(*data_ptr + 12, "VP8 ", 4)) {
- return 0; /* invalid compression format */
- }
- chunk_size = get_le32(*data_ptr + 16);
- if ((chunk_size > riff_size + 8) || (chunk_size & 1)) {
- return 0; /* inconsistent size information. */
- }
- /* We have a RIFF container. Skip it. */
- *data_ptr += 20;
- *data_size_ptr -= 20;
- }
- }
- return chunk_size;
-}
-
-/* Generate RGBA row from an YUV row (with width upsampling of chrome data)
- * Input:
- * 1, 2, 3. y_src, u_src, v_src - Pointers to input Y, U, V row data
- * respectively. We reuse these variables, they iterate over all pixels in
- * the row.
- * 4. y_width: width of the Y image plane (aka image width)
- * Output:
- * 5. rgb_sat: pointer to the output rgb row. We reuse this variable, it
- * iterates over all pixels in the row.
- */
-static void YUV420toRGBLine(uint8* y_src,
- uint8* u_src,
- uint8* v_src,
- int y_width,
- uint32* rgb_dst) {
- int x;
- for (x = 0; x < (y_width >> 1); ++x) {
- const int U = u_src[0];
- const int V = v_src[0];
- ToRGB(y_src[0], U, V, rgb_dst);
- ToRGB(y_src[1], U, V, rgb_dst + 1);
- ++u_src;
- ++v_src;
- y_src += 2;
- rgb_dst += 2;
- }
- if (y_width & 1) { /* Rightmost pixel */
- ToRGB(y_src[0], (*u_src), (*v_src), rgb_dst);
- }
-}
-
-/* Converts from YUV (with color subsampling) such as produced by the WebPDecode
- * routine into 32 bits per pixel RGBA data array. This data array can be
- * directly used by the Leptonica Pix in-memory image format.
- * Input:
- * 1, 2, 3. Y, U, V: the input data buffers
- * 4. pixwpl: the desired words per line corresponding to the supplied
- * output pixdata.
- * 5. width, height: the dimensions of the image whose data resides in Y,
- * U, V.
- * Output:
- * 6. pixdata: the output data buffer. Caller should allocate
- * height * pixwpl bytes of memory before calling this routine.
- */
-void YUV420toRGBA(uint8* Y,
- uint8* U,
- uint8* V,
- int words_per_line,
- int width,
- int height,
- uint32* pixdata) {
- int y_width = width;
- int y_stride = y_width;
- int uv_width = ((y_width + 1) >> 1);
- int uv_stride = uv_width;
- int y;
-
- if (!init_done)
- InitTables();
-
- /* note that the U, V upsampling in height is happening here as the U, V
- * buffers sent to successive odd-even pair of lines is same.
- */
- for (y = 0; y < height; ++y) {
- YUV420toRGBLine(Y + y * y_stride,
- U + (y >> 1) * uv_stride,
- V + (y >> 1) * uv_stride,
- width,
- pixdata + y * words_per_line);
- }
-}
-
-void gd_YUV420toRGBA(uint8* Y,
- uint8* U,
- uint8* V,
- gdImagePtr im) {
- int width = im->sx;
- int height = im->sy;
- int y_width = width;
- int y_stride = y_width;
- int uv_width = ((y_width + 1) >> 1);
- int uv_stride = uv_width;
- int y;
-
- /* output im must be truecolor */
- if (!im->trueColor) {
- return;
- }
-
- if (!init_done)
- InitTables();
-
- /* note that the U, V upsampling in height is happening here as the U, V
- * buffers sent to successive odd-even pair of lines is same.
- */
- for (y = 0; y < height; ++y) {
- YUV420toRGBLine(Y + y * y_stride,
- U + (y >> 1) * uv_stride,
- V + (y >> 1) * uv_stride,
- width,
- im->tpixels[y]);
- }
-}
-
-static WebPResult VPXDecode(const uint8* data,
- int data_size,
- uint8** p_Y,
- uint8** p_U,
- uint8** p_V,
- int* p_width,
- int* p_height) {
- vpx_codec_ctx_t dec;
- vp8_postproc_cfg_t ppcfg;
- WebPResult result = webp_failure;
-
- if (!data || data_size <= 10 || !p_Y || !p_U || !p_V
- || *p_Y != NULL || *p_U != NULL || *p_V != NULL) {
- return webp_failure;
- }
-
- if (vpx_codec_dec_init(&dec,
- &vpx_codec_vp8_dx_algo, NULL, 0) != VPX_CODEC_OK) {
- return webp_failure;
- }
-
- ppcfg.post_proc_flag = VP8_NOFILTERING;
- vpx_codec_control(&dec, VP8_SET_POSTPROC, &ppcfg);
-
-
- if (vpx_codec_decode(&dec, data, data_size, NULL, 0) == VPX_CODEC_OK) {
- vpx_codec_iter_t iter = NULL;
- vpx_image_t* const img = vpx_codec_get_frame(&dec, &iter);
- if (img) {
- int y_width = img->d_w;
- int y_height = img->d_h;
- int y_stride = y_width;
- int uv_width = (y_width + 1) >> 1;
- int uv_stride = uv_width;
- int uv_height = ((y_height + 1) >> 1);
- int y;
-
- *p_width = y_width;
- *p_height = y_height;
- if ((*p_Y = (uint8 *)(calloc(y_stride * y_height
- + 2 * uv_stride * uv_height,
- sizeof(uint8)))) != NULL) {
- *p_U = *p_Y + y_height * y_stride;
- *p_V = *p_U + uv_height * uv_stride;
- for (y = 0; y < y_height; ++y) {
- memcpy(*p_Y + y * y_stride,
- img->planes[0] + y * img->stride[0],
- y_width);
- }
- for (y = 0; y < uv_height; ++y) {
- memcpy(*p_U + y * uv_stride,
- img->planes[1] + y * img->stride[1],
- uv_width);
- memcpy(*p_V + y * uv_stride,
- img->planes[2] + y * img->stride[2],
- uv_width);
- }
- result = webp_success;
- }
- }
- }
- vpx_codec_destroy(&dec);
-
- return result;
-}
-
-WebPResult WebPDecode(const uint8* data,
- int data_size,
- uint8** p_Y,
- uint8** p_U,
- uint8** p_V,
- int* p_width,
- int* p_height) {
-
- const uint32 chunk_size = SkipRiffHeader(&data, &data_size);
- if (!chunk_size) {
- return webp_failure; /* unsupported RIFF header */
- }
-
- return VPXDecode(data, data_size, p_Y, p_U, p_V, p_width, p_height);
-}
-
-/*---------------------------------------------------------------------*
- * Writing WebP *
- *---------------------------------------------------------------------*/
-
-/* Takes a pair of RGBA row data as input and generates 2 rows of Y data and one
- * row of subsampled U, V data as output
- * Input:
- * 1, 2. rgb_line1, rgb_line2 - input rgba rows
- * 3. width - image width
- * Outout:
- * 4, 5, 6: Output Y, U, V row
- */
-static void RGBALinepairToYUV420(uint32* rgb_line1,
- uint32* rgb_line2,
- int width,
- uint8* Y_dst1,
- uint8* Y_dst2,
- uint8* u_dst,
- uint8* v_dst) {
- int x;
- for (x = (width >> 1); x > 0; --x) {
- const int sum_r =
- GetRed(rgb_line1 + 0) + GetRed(rgb_line1 + 1) +
- GetRed(rgb_line2 + 0) + GetRed(rgb_line2 + 1);
- const int sum_g =
- GetGreen(rgb_line1 + 0) + GetGreen(rgb_line1 + 1) +
- GetGreen(rgb_line2 + 0) + GetGreen(rgb_line2 + 1);
- const int sum_b =
- GetBlue(rgb_line1 + 0) + GetBlue(rgb_line1 + 1) +
- GetBlue(rgb_line2 + 0) + GetBlue(rgb_line2 + 1);
-
- Y_dst1[0] = GetLumaYfromPtr(rgb_line1 + 0);
- Y_dst1[1] = GetLumaYfromPtr(rgb_line1 + 1);
- Y_dst2[0] = GetLumaYfromPtr(rgb_line2 + 0);
- Y_dst2[1] = GetLumaYfromPtr(rgb_line2 + 1);
-
- *u_dst++ = GetChromaU(sum_r, sum_g, sum_b);
- *v_dst++ = GetChromaV(sum_r, sum_g, sum_b);
-
- rgb_line1 += 2;
- rgb_line2 += 2;
- Y_dst1 += 2;
- Y_dst2 += 2;
- }
-
- if (width & 1) { /* rightmost pixel. */
- const int sum_r = GetRed(rgb_line1) + GetRed(rgb_line2);
- const int sum_g = GetGreen(rgb_line1) + GetGreen(rgb_line2);
- const int sum_b = GetBlue(rgb_line1) + GetBlue(rgb_line2);
-
- Y_dst1[0] = GetLumaYfromPtr(rgb_line1);
- Y_dst2[0] = GetLumaYfromPtr(rgb_line2);
- *u_dst = GetChromaU(2 * sum_r, 2 * sum_g, 2 * sum_b);
- *v_dst = GetChromaV(2 * sum_r, 2 * sum_g, 2 * sum_b);
- }
-}
-
-/* Generates Y, U, V data (with color subsampling) from 32 bits
- * per pixel RGBA data buffer. The resulting YUV data can be directly fed into
- * the WebPEncode routine.
- * Input:
- * 1. pixdatainput rgba data buffer
- * 2. words per line corresponding to pixdata
- * 3, 4. image width and height respectively
- * Output:
- * 5, 6, 7. Output YUV data buffers
- */
-void gd_RGBAToYUV420(gdImagePtr im2,
- uint8* Y,
- uint8* U,
- uint8* V) {
- int y_width = im2->sx;
- int y_height = im2->sy;
- int y_stride = y_width;
- int uv_width = ((y_width + 1) >> 1);
- int uv_stride = uv_width;
- int y;
- gdImagePtr im = NULL;
- int free_im = 0;
-
- if (!im2->trueColor) {
- /* Todo: Replace the color/YUV functions with our own and simplify
- that should boost the conversion a bit as well, not only for
- palette image. */
- im = gdImageCreateTrueColor(im2->sx, im2->sy);
- if (!im) {
- php_gd_error("gd-webp error: cannot convert palette input to truecolor");
- return;
- }
- gdImageCopy(im, im2, 0, 0, 0, 0, im->sx, im->sy);
- free_im = 1;
- } else {
- im = im2;
- }
- for (y = 0; y < (y_height >> 1); ++y) {
- RGBALinepairToYUV420(im->tpixels[2 * y],
- im->tpixels[2 * y + 1],
- y_width,
- Y + 2 * y * y_stride,
- Y + (2 * y + 1) * y_stride,
- U + y * uv_stride,
- V + y * uv_stride);
- }
- if (y_height & 1) {
- RGBALinepairToYUV420(im->tpixels[y_height - 1],
- im->tpixels[y_height - 1],
- y_width,
- Y + (y_height - 1) * y_stride,
- Y + (y_height - 1) * y_stride,
- U + (y_height >> 1) * uv_stride,
- V + (y_height >> 1) * uv_stride);
- }
- if (free_im) {
- gdImageDestroy(im);
- }
-}
-
-/* Generates Y, U, V data (with color subsampling) from 32 bits
- * per pixel RGBA data buffer. The resulting YUV data can be directly fed into
- * the WebPEncode routine.
- * Input:
- * 1. pixdatainput rgba data buffer
- * 2. words per line corresponding to pixdata
- * 3, 4. image width and height respectively
- * Output:
- * 5, 6, 7. Output YUV data buffers
- */
-void RGBAToYUV420(uint32* pixdata,
- int words_per_line,
- int width,
- int height,
- uint8* Y,
- uint8* U,
- uint8* V) {
- int y_width = width;
- int y_height = height;
- int y_stride = y_width;
- int uv_width = ((y_width + 1) >> 1);
- int uv_stride = uv_width;
- int y;
-
- for (y = 0; y < (y_height >> 1); ++y) {
- RGBALinepairToYUV420(pixdata + 2 * y * words_per_line,
- pixdata + (2 * y + 1) * words_per_line,
- y_width,
- Y + 2 * y * y_stride,
- Y + (2 * y + 1) * y_stride,
- U + y * uv_stride,
- V + y * uv_stride);
- }
- if (y_height & 1) {
- RGBALinepairToYUV420(pixdata + (y_height - 1) * words_per_line,
- pixdata + (y_height - 1) * words_per_line,
- y_width,
- Y + (y_height - 1) * y_stride,
- Y + (y_height - 1) * y_stride,
- U + (y_height >> 1) * uv_stride,
- V + (y_height >> 1) * uv_stride);
- }
-}
-
-static int codec_ctl(vpx_codec_ctx_t *enc,
- enum vp8e_enc_control_id id,
- int value) {
- const vpx_codec_err_t res = vpx_codec_control_(enc, id, value);
- if (res != VPX_CODEC_OK) {
- return webp_failure;
- }
- return webp_success;
-}
-
-static void SetupParams(vpx_codec_enc_cfg_t* cfg,
- int QP) {
- cfg->g_threads = 2;
- cfg->rc_min_quantizer = QP;
- cfg->rc_max_quantizer = QP;
- cfg->kf_mode = VPX_KF_FIXED;
-}
-
-/* VPXEncode: Takes a Y, U, V data buffers (with color components U and V
- * subsampled to 1/2 resolution) and generates the VPX string.
- * Output VPX string is placed in the *p_out buffer. container_size
- * indicates number of bytes to be left blank at the beginning of
- * *p_out buffer to accommodate for a container header.
- *
- * Return: success/failure
- */
-static WebPResult VPXEncode(const uint8* Y,
- const uint8* U,
- const uint8* V,
- int y_width,
- int y_height,
- int y_stride,
- int uv_width,
- int uv_height,
- int uv_stride,
- int QP,
- int container_size,
- unsigned char** p_out,
- int* p_out_size_bytes) {
- vpx_codec_iface_t* iface = &vpx_codec_vp8_cx_algo;
- vpx_codec_err_t res;
- vpx_codec_enc_cfg_t cfg;
- vpx_codec_ctx_t enc;
- WebPResult result = webp_failure;
- vpx_image_t img;
-
- *p_out = NULL;
- *p_out_size_bytes = 0;
-
-
- /* validate input parameters. */
- if (!p_out || !Y || !U || !V
- || y_width <= 0 || y_height <= 0 || uv_width <= 0 || uv_height <= 0
- || y_stride < y_width || uv_stride < uv_width
- || QP < 0 || QP > 63) {
- return webp_failure;
- }
-
- res = vpx_codec_enc_config_default(iface, &cfg, 0);
- if (res != VPX_CODEC_OK) {
- return webp_failure;
- }
-
- SetupParams(&cfg, QP);
- cfg.g_w = y_width;
- cfg.g_h = y_height;
-
- res = vpx_codec_enc_init(&enc, iface, &cfg, 0);
-
- if (res == VPX_CODEC_OK) {
- codec_ctl(&enc, VP8E_SET_CPUUSED, 3);
- codec_ctl(&enc, VP8E_SET_NOISE_SENSITIVITY, 0);
- codec_ctl(&enc, VP8E_SET_SHARPNESS, 0);
- codec_ctl(&enc, VP8E_SET_ENABLEAUTOALTREF, 0);
- codec_ctl(&enc, VP8E_SET_ARNR_MAXFRAMES, 0);
- codec_ctl(&enc, VP8E_SET_ARNR_TYPE, 0);
- codec_ctl(&enc, VP8E_SET_ARNR_STRENGTH, 0);
- codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
- codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
-
- vpx_img_wrap(&img, VPX_IMG_FMT_I420,
- y_width, y_height, 16, (uint8*)(Y));
- img.planes[VPX_PLANE_Y] = (uint8*)(Y);
- img.planes[VPX_PLANE_U] = (uint8*)(U);
- img.planes[VPX_PLANE_V] = (uint8*)(V);
- img.stride[VPX_PLANE_Y] = y_stride;
- img.stride[VPX_PLANE_U] = uv_stride;
- img.stride[VPX_PLANE_V] = uv_stride;
-
- res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
-
- if (res == VPX_CODEC_OK) {
- vpx_codec_iter_t iter = NULL;
- const vpx_codec_cx_pkt_t* pkt = vpx_codec_get_cx_data(&enc, &iter);
- if (pkt != NULL) {
- *p_out = (unsigned char*)(calloc(container_size + pkt->data.frame.sz,
- 1));
-
- memcpy(*p_out + container_size,
- (const void*)(pkt->data.frame.buf),
- pkt->data.frame.sz);
- *p_out_size_bytes = container_size + pkt->data.frame.sz;
-
- result = webp_success;
- }
- }
- }
-
- vpx_codec_destroy(&enc);
-
- return result;
-}
-
-WebPResult WebPEncode(const uint8* Y,
- const uint8* U,
- const uint8* V,
- int y_width,
- int y_height,
- int y_stride,
- int uv_width,
- int uv_height,
- int uv_stride,
- int QP,
- unsigned char** p_out,
- int* p_out_size_bytes,
- double *psnr) {
-
- const int kRiffHeaderSize = 20;
-
- if (VPXEncode(Y, U, V,
- y_width, y_height, y_stride,
- uv_width, uv_height, uv_stride,
- QP, kRiffHeaderSize,
- p_out, p_out_size_bytes) != webp_success) {
- return webp_failure;
- } else {
- /* Write RIFF header */
- const int img_size_bytes = *p_out_size_bytes - kRiffHeaderSize;
- const int chunk_size = (img_size_bytes + 1) & ~1; /* make size even */
- const int riff_size = chunk_size + 12;
- const uint8_t kRiffHeader[20] = { 'R', 'I', 'F', 'F',
- (riff_size >> 0) & 255,
- (riff_size >> 8) & 255,
- (riff_size >> 16) & 255,
- (riff_size >> 24) & 255,
- 'W', 'E', 'B', 'P',
- 'V', 'P', '8', ' ',
- (chunk_size >> 0) & 255,
- (chunk_size >> 8) & 255,
- (chunk_size >> 16) & 255,
- (chunk_size >> 24) & 255 };
- memcpy(*p_out, kRiffHeader, kRiffHeaderSize);
-
- if (psnr) {
- *psnr = WebPGetPSNR(Y, U, V, *p_out, *p_out_size_bytes);
- }
-
- return webp_success;
- }
-}
-
-void AdjustColorspace(uint8* Y, uint8* U, uint8* V, int width, int height) {
- int y_width = width;
- int y_height = height;
- int y_stride = y_width;
- int uv_width = ((y_width + 1) >> 1);
- int uv_height = ((y_height + 1) >> 1);
- int uv_stride = uv_width;
- int x, y;
- /* convert luma */
- for (y = 0; y < y_height; ++y) {
- uint8* const Yrow = Y + y * y_stride;
- for (x = 0; x < y_width; ++x) {
- /* maps [0..255] to [16..235] */
- Yrow[x] = ((Yrow[x] * 55 + 32) >> 6) + 16;
- }
- }
- /* convert chroma */
- for (y = 0; y < uv_height; ++y) {
- uint8* const Urow = U + y * uv_stride;
- uint8* const Vrow = V + y * uv_stride;
- for (x = 0; x < uv_width; ++x) {
- /* maps [0..255] to [16..240] */
- Urow[x] = (((Urow[x] - 127) * 7) >> 3) + 128;
- Vrow[x] = (((Vrow[x] - 127) * 7) >> 3) + 128;
- }
- }
-}
-
-void AdjustColorspaceBack(uint8* Y, uint8* U, uint8* V, int width, int height) {
- int y_width = width;
- int y_height = height;
- int y_stride = y_width;
- int uv_width = ((y_width + 1) >> 1);
- int uv_height = ((y_height + 1) >> 1);
- int uv_stride = uv_width;
- int x, y;
- /* convert luma */
- for (y = 0; y < y_height; ++y) {
- uint8* const Yrow = Y + y * y_stride;
- for (x = 0; x < y_width; ++x) {
- /* maps [16..235] to [0..255] */
- const int v = ((Yrow[x] - 16) * 149 + 64) >> 7;
- Yrow[x] = (v < 0) ? 0 : (v > 255) ? 255u : v;
- }
- }
- /* convert chroma */
- for (y = 0; y < uv_height; ++y) {
- uint8* const Urow = U + y * uv_stride;
- uint8* const Vrow = V + y * uv_stride;
- for (x = 0; x < uv_width; ++x) {
- /* maps [0..255] to [16..240] */
- const int ru = (((Urow[x] - 128) * 73) >> 6) + 128;
- const int rv = (((Vrow[x] - 128) * 73) >> 6) + 128;
- Urow[x] = (ru < 0) ? 0 : (ru > 255) ? 255u : ru;
- Vrow[x] = (rv < 0) ? 0 : (rv > 255) ? 255u : rv;
- }
- }
-}
-
-WebPResult WebPGetInfo(const uint8* data,
- int data_size,
- int *width,
- int *height) {
- const uint32 chunk_size = SkipRiffHeader(&data, &data_size);
-
- if (width) *width = 0;
- if (height) *height = 0;
-
- if (!chunk_size) {
- return webp_failure; /* unsupported RIFF header */
- }
-
- /* Validate raw video data */
- if (data_size < 10) {
- return webp_failure; /* not enough data */
- }
-
- /* check signature */
- if (data[3] != 0x9d || data[4] != 0x01 || data[5] != 0x2a) {
- return webp_failure; /* Wrong signature. */
- } else {
- const uint32 bits = data[0] | (data[1] << 8) | (data[2] << 16);
-
- if ((bits & 1)) { /* Not a keyframe. */
- return webp_failure;
- } else {
- const int profile = (bits >> 1) & 7;
- const int show_frame = (bits >> 4) & 1;
- const uint32 partition_length = (bits >> 5);
-
- if (profile > 3) {
- return webp_failure; /* unknown profile */
- }
- if (!show_frame) {
- return webp_failure; /* first frame is invisible! */
- }
- if (partition_length >= chunk_size) {
- return webp_failure; /* inconsistent size information. */
- } else {
- const int w = ((data[7] << 8) | data[6]) & 0x3fff;
- const int h = ((data[9] << 8) | data[8]) & 0x3fff;
- if (width) *width = w;
- if (height) *height = h;
-
- return webp_success;
- }
- }
- }
- return webp_failure;
-}
-#endif /* HAVE_LIBVPX */
diff --git a/ext/gd/libgd/webpimg.h b/ext/gd/libgd/webpimg.h
deleted file mode 100644
index bc0f9722bd..0000000000
--- a/ext/gd/libgd/webpimg.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*===========================================================================*
- - Copyright 2010 Google Inc.
- -
- - This code is licensed under the same terms as WebM:
- - Software License Agreement: http://www.webmproject.org/license/software/
- - Additional IP Rights Grant: http://www.webmproject.org/license/additional/
- *===========================================================================*/
-
-/*
- * Encoding/Decoding of WebP still image compression format.
- *
- * 1. WebPDecode: Takes an array of bytes (string) corresponding to the WebP
- * encoded image and generates output in the YUV format with
- * the color components U, V subsampled to 1/2 resolution along
- * each dimension.
- *
- * 2. YUV420toRGBA: Converts from YUV (with color subsampling) such as produced
- * by the WebPDecode routine into 32 bits per pixel RGBA data
- * array. This data array can be directly used by the Leptonica
- * Pix in-memory image format.
- *
- * 3. WebPEncode: Takes a Y, U, V data buffers (with color components U and V
- * subsampled to 1/2 resolution) and generates the WebP string
- *
- * 4. RGBAToYUV420: Generates Y, U, V data (with color subsampling) from 32 bits
- * per pixel RGBA data buffer. The resulting YUV data can be
- * directly fed into the WebPEncode routine.
- *
- * 5. AdjustColorspace:
- *
- * 6. AdjustColorspaceBack:
- */
-
-#ifndef THIRD_PARTY_VP8_VP8IMG_H_
-#define THIRD_PARTY_VP8_VP8IMG_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-typedef unsigned char uint8;
-typedef unsigned int uint32;
-typedef enum WebPResultType {
- webp_success = 0,
- webp_failure = -1
-} WebPResult;
-
-/* Takes an array of bytes (string) corresponding to the WebP
- * encoded image and generates output in the YUV format with
- * the color components U, V subsampled to 1/2 resolution along
- * each dimension.
- * Input:
- * 1. data: the WebP data stream (array of bytes)
- * 2. data_size: count of bytes in the WebP data stream
- *
- * Output:
- * 3. p_Y/p_U/p_V : pointer to the Y/U/V data buffer (this routine will
- * allocate memory for the buffer, fill the buffer with
- * appropriate data and transfer owner ship of the buffer
- * to caller. Caller is responsible for freeing the memory).
- * Note that the memory for Y, U, V buffers is alloacted
- * in one chunk, hence one should call free(*p_Y) only.
- * Do not try to free the U and V buffers.
- *
- * 6. p_width: this routine returns the width of the decoded image here
- * 7. p_height: this routine returns the width of the decoded image here
- * Return: success/failure
- */
-WebPResult WebPDecode(const uint8* data,
- int data_size,
- uint8** p_Y,
- uint8** p_U,
- uint8** p_V,
- int* p_width,
- int* p_height);
-
-/* WebPEncode: Takes a Y, U, V data buffers (with color components U and V
- * subsampled to 1/2 resolution) and generates the WebP string.
- * Input:
- * 1, 2, 3. Y, U, V: The input YUV data buffers
- * 4, 5. y_width, y_height: The width and height of the image whose data
- * is in Y, U, V. This matches the Y plane. The U
- * and V planes typically have 1/2 width and
- * height.
- * 6. y_stride: The width (in bytes) of one row of Y data. This may not
- * match width if there is end of row padding (e.g., for 32
- * bit row alignment).
- * 7. QP: the quantization parameter. This parameter controls the
- * compression vs quality tradeoff. Use smaller numbers for better
- * quality (compression will be lesser) and vice versa. 20 is a
- * good optimal value.
- * Output:
- * 8. p_out: the output array of bytes corresponding to the encoded WebP
- * image. This routine allocates memory for the buffer, fills it
- * with appropriate values and transfers ownership to caller.
- * Caller responsible for freeing of memory.
- * Return: success/failure
- */
-WebPResult WebPEncode(const uint8* Y,
- const uint8* U,
- const uint8* V,
- int y_width,
- int y_height,
- int y_stride,
- int uv_width,
- int uv_height,
- int uv_stride,
- int QP,
- unsigned char** p_out,
- int* p_out_size_bytes,
- double* psnr);
-
-/* Converts from YUV (with color subsampling) such as produced by the WebPDecode
- * routine into 32 bits per pixel RGBA data array. This data array can be
- * directly used by the Leptonica Pix in-memory image format.
- * Input:
- * 1, 2, 3. Y, U, V: the input data buffers
- * 4. pixwpl: the desired words per line corresponding to the supplied
- * output pixdata.
- * 5. width, height: the dimensions of the image whose data resides in Y,
- * U, V.
- * Output:
- * 6. pixdata: the output data buffer. Caller should allocate
- * height * pixwpl bytes of memory before calling this routine.
- */
-void YUV420toRGBA(uint8* Y,
- uint8* U,
- uint8* V,
- int words_per_line,
- int width,
- int height,
- uint32* pixdata);
-
-/* Generates Y, U, V data (with color subsampling) from 32 bits
- * per pixel RGBA data buffer. The resulting YUV data can be directly fed into
- * the WebPEncode routine.
- * Input:
- * 1. pix data input rgba data buffer
- * 2. words per line corresponding to pixdata
- * 3, 4. image width and height respectively
- * Output:
- * 5, 6, 7. Output YUV data buffers
- */
-void RGBAToYUV420(uint32* pixdata,
- int words_per_line,
- int width,
- int height,
- uint8* Y,
- uint8* U,
- uint8* V);
-
-/* This function adjust from YUV420J (jpeg decoding) to YUV420 (webp input)
- * Hints: http://en.wikipedia.org/wiki/YCbCr
- */
-void AdjustColorspace(uint8* Y, uint8* U, uint8* V, int width, int height);
-
-/* Inverse function: convert from YUV420 to YUV420J */
-void AdjustColorspaceBack(uint8* Y, uint8* U, uint8* V, int width, int height);
-
-/* Checks WebP image header and outputs height and width information of
- * the image
- *
- * Input:
- * 1. data: the WebP data stream (array of bytes)
- * 2. data_size: count of bytes in the WebP data stream
- *
- * Outut:
- * width/height: width and height of the image
- *
- * Return: success/failure
- */
-WebPResult WebPGetInfo(const uint8* data,
- int data_size,
- int *width,
- int *height);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* THIRD_PARTY_VP8_VP8IMG_H_ */
diff --git a/ext/gd/libgd/xbm.c b/ext/gd/libgd/xbm.c
index 1e5173e8a0..d127a1d4ff 100644
--- a/ext/gd/libgd/xbm.c
+++ b/ext/gd/libgd/xbm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h
index 618681478e..19e7063d9c 100644
--- a/ext/gd/php_gd.h
+++ b/ext/gd/php_gd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gd/tests/bug53154.phpt b/ext/gd/tests/bug53154.phpt
new file mode 100644
index 0000000000..6cbae2016c
--- /dev/null
+++ b/ext/gd/tests/bug53154.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #53154 (Zero-height rectangle has whiskers)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(100, 10);
+$red = imagecolorallocate($im, 255, 0, 0);
+imagerectangle($im, 5, 5, 95, 5, $red);
+var_dump(imagecolorat($im, 5, 4) !== $red);
+var_dump(imagecolorat($im, 5, 6) !== $red);
+var_dump(imagecolorat($im, 95, 4) !== $red);
+var_dump(imagecolorat($im, 95, 6) !== $red);
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/gd/tests/bug53156.phpt b/ext/gd/tests/bug53156.phpt
new file mode 100644
index 0000000000..24db8024fe
--- /dev/null
+++ b/ext/gd/tests/bug53156.phpt
@@ -0,0 +1,57 @@
+--TEST--
+Bug #53156 (imagerectangle problem with point ordering)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+function draw_and_check_pixel($x, $y)
+{
+ global $img, $black, $red;
+
+ echo (imagecolorat($img, $x, $y) === $black) ? '+' : '-';
+ imagesetpixel($img, $x, $y, $red);
+}
+
+function draw_and_check_rectangle($x1, $y1, $x2, $y2)
+{
+ global $img, $black;
+
+ echo 'Rectangle: ';
+ imagerectangle($img, $x1, $y1, $x2, $y2, $black);
+ $x = ($x1 + $x2) / 2;
+ $y = ($y1 + $y2) / 2;
+ draw_and_check_pixel($x, $y1);
+ draw_and_check_pixel($x1, $y);
+ draw_and_check_pixel($x, $y2);
+ draw_and_check_pixel($x2, $y);
+ echo PHP_EOL;
+}
+
+$img = imagecreate(110, 210);
+$bgnd = imagecolorallocate($img, 255, 255, 255);
+$black = imagecolorallocate($img, 0, 0, 0);
+$red = imagecolorallocate($img, 255, 0, 0);
+
+draw_and_check_rectangle( 10, 10, 50, 50);
+draw_and_check_rectangle( 50, 60, 10, 100);
+draw_and_check_rectangle( 50, 150, 10, 110);
+draw_and_check_rectangle( 10, 200, 50, 160);
+imagesetthickness($img, 4);
+draw_and_check_rectangle( 60, 10, 100, 50);
+draw_and_check_rectangle(100, 60, 60, 100);
+draw_and_check_rectangle(100, 150, 60, 110);
+draw_and_check_rectangle( 60, 200, 100, 160);
+
+//imagepng($img, __DIR__ . '/bug53156.png'); // debug
+?>
+--EXPECT--
+Rectangle: ++++
+Rectangle: ++++
+Rectangle: ++++
+Rectangle: ++++
+Rectangle: ++++
+Rectangle: ++++
+Rectangle: ++++
+Rectangle: ++++
diff --git a/ext/gd/tests/bug53640.phpt b/ext/gd/tests/bug53640.phpt
new file mode 100644
index 0000000000..a16b7c24c0
--- /dev/null
+++ b/ext/gd/tests/bug53640.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #53640 (XBM images require width to be multiple of 8)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$im = imagecreate(9, 9);
+imagecolorallocate($im, 0, 0, 0); // background
+$white = imagecolorallocate($im, 255, 255, 255);
+imagefilledrectangle($im, 2, 2, 6, 6, $white);
+imagexbm($im, NULL);
+?>
+--XFAIL--
+Padding is not implemented yet
+--EXPECT--
+#define image_width 9
+#define image_height 9
+static unsigned char image_bits[] = {
+ 0xFF, 0x01, 0xFF, 0x01, 0x83, 0x01, 0x83, 0x01, 0x83, 0x01, 0x83, 0x01,
+ 0x83, 0x01, 0xFF, 0x01, 0xFF, 0x01};
diff --git a/ext/gd/tests/bug66339.phpt b/ext/gd/tests/bug66339.phpt
new file mode 100644
index 0000000000..a5ef5c6915
--- /dev/null
+++ b/ext/gd/tests/bug66339.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #66339 (PHP segfaults in imagexbm)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$im = imagecreate(8, 8);
+imagecolorallocate($im, 0, 0, 0); // background
+$white = imagecolorallocate($im, 255, 255, 255);
+imagefilledrectangle($im, 2, 2, 6, 6, $white);
+imagexbm($im, NULL);
+echo "------------\n";
+imagexbm($im, './bug66339.xbm');
+echo file_get_contents('./bug66339.xbm');
+?>
+--CLEAN--
+<?php
+unlink('./bug66339.xbm');
+?>
+--EXPECT--
+#define image_width 8
+#define image_height 8
+static unsigned char image_bits[] = {
+ 0xFF, 0xFF, 0x83, 0x83, 0x83, 0x83, 0x83, 0xFF};
+------------
+#define bug66339_width 8
+#define bug66339_height 8
+static unsigned char bug66339_bits[] = {
+ 0xFF, 0xFF, 0x83, 0x83, 0x83, 0x83, 0x83, 0xFF};
diff --git a/ext/gd/tests/bug66387.phpt b/ext/gd/tests/bug66387.phpt
new file mode 100644
index 0000000000..79c49a527b
--- /dev/null
+++ b/ext/gd/tests/bug66387.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #66387 (Stack overflow with imagefilltoborder)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available!');
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(20, 20);
+$c = imagecolorallocate($im, 255, 0, 0);
+imagefilltoborder($im, 0, -999355, $c, $c);
+echo "ready\n";
+?>
+--EXPECT--
+ready
diff --git a/ext/gd/tests/bug66590.phpt b/ext/gd/tests/bug66590.phpt
new file mode 100644
index 0000000000..a3c5409d6b
--- /dev/null
+++ b/ext/gd/tests/bug66590.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #66590 (imagewebp() doesn't pad to even length)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (!function_exists('imagewebp')) die('skip WebP support not available');
+?>
+--FILE--
+<?php
+$filename = __DIR__ . '/bug66590.webp';
+$im = imagecreatetruecolor(75, 75);
+$red = imagecolorallocate($im, 255, 0, 0);
+imagefilledrectangle($im, 0, 0, 74, 74, $red);
+imagewebp($im, $filename);
+$stream = fopen($filename, 'rb');
+fread($stream, 4); // skip "RIFF"
+$length = fread($stream, 4);
+fclose($stream);
+$length = unpack('V', $length)[1] + 8;
+var_dump($length === filesize($filename));
+?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/bug66590.webp');
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/gd/tests/bug66590_1.phpt b/ext/gd/tests/bug66590_1.phpt
new file mode 100644
index 0000000000..9e598d1eae
--- /dev/null
+++ b/ext/gd/tests/bug66590_1.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #66590 (imagewebp() doesn't pad to even length) - segfault
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (!function_exists('imagewebp')) die('skip WebP support not available');
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(6, 6);
+ob_start();
+imagewebp($im);
+ob_end_clean();
+echo "ready\n";
+?>
+--EXPECT--
+ready
diff --git a/ext/gd/tests/bug66882.phpt b/ext/gd/tests/bug66882.phpt
new file mode 100644
index 0000000000..6dfbdfe06d
--- /dev/null
+++ b/ext/gd/tests/bug66882.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #66882 (imagerotate by -90 degrees truncates image by 1px)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$im = imagerotate(imagecreate(10, 10), -90, 0);
+var_dump(imagesy($im), imagesx($im));
+?>
+--EXPECT--
+int(10)
+int(10)
diff --git a/ext/gd/tests/bug67447.phpt b/ext/gd/tests/bug67447.phpt
new file mode 100644
index 0000000000..2caa49b623
--- /dev/null
+++ b/ext/gd/tests/bug67447.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #67447 (imagecrop() adds a black line when cropping)
+--FILE--
+<?php
+// true color
+$image = imagecreatetruecolor(500, 500);
+$red = imagecolorallocate($image, 255, 0, 0);
+imagefill($image, 0, 0, $red);
+$cropped = imagecrop($image, ['x' => 0, 'y' => 0, 'width' => 250, 'height' => 250]);
+var_dump(imagecolorat($cropped, 249, 249) === $red);
+imagedestroy($image);
+imagedestroy($cropped);
+
+// palette
+$image = imagecreate(500, 500);
+imagecolorallocate($image, 0, 0, 255); // first palette color = background
+$red = imagecolorallocate($image, 255, 0, 0);
+imagefill($image, 0, 0, $red);
+$cropped = imagecrop($image, ['x' => 0, 'y' => 0, 'width' => 250, 'height' => 250]);
+var_dump(imagecolorat($cropped, 249, 249) === $red);
+imagedestroy($image);
+imagedestroy($cropped);
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/gd/tests/bug69024.phpt b/ext/gd/tests/bug69024.phpt
new file mode 100644
index 0000000000..f2113fc44f
--- /dev/null
+++ b/ext/gd/tests/bug69024.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #69024 (imagescale segfault with palette based image)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$im = imagecreate(256, 256);
+imagescale($im, 32, 32, IMG_BICUBIC);
+imagedestroy($im);
+echo "done\n";
+?>
+--EXPECT--
+done
diff --git a/ext/gd/tests/bug70047.phpt b/ext/gd/tests/bug70047.phpt
new file mode 100644
index 0000000000..7dbf8ab59d
--- /dev/null
+++ b/ext/gd/tests/bug70047.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70047 (gd_info() doesn't report WebP support)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$info = gd_info();
+var_dump(array_key_exists('WebP Support', $info));
+var_dump($info['WebP Support'] === function_exists('imagewebp'));
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/gd/tests/bug70102.phpt b/ext/gd/tests/bug70102.phpt
new file mode 100644
index 0000000000..b82c757ebe
--- /dev/null
+++ b/ext/gd/tests/bug70102.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #70102 (imagecreatefromwebm() shifts colors)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (!function_exists('imagewebp') || !function_exists('imagecreatefromwebp'))
+ die('skip WebP support not available');
+?>
+--FILE--
+<?php
+$filename = __DIR__ . '/bug70102.webp';
+
+$im = imagecreatetruecolor(8, 8);
+$white = imagecolorallocate($im, 255, 255, 255);
+var_dump($white & 0xffffff);
+imagefilledrectangle($im, 0, 0, 7, 7, $white);
+imagewebp($im, $filename);
+imagedestroy($im);
+
+$im = imagecreatefromwebp($filename);
+$color = imagecolorat($im, 4, 4);
+var_dump($color & 0xffffff);
+?>
+--CLEAN--
+<?php
+unlink(__DIR__ . '/bug70102.webp');
+?>
+--EXPECT--
+int(16777215)
+int(16777215)
diff --git a/ext/gd/tests/bug70976.phpt b/ext/gd/tests/bug70976.phpt
new file mode 100644
index 0000000000..dfbd4b49ec
--- /dev/null
+++ b/ext/gd/tests/bug70976.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #70976 (Memory Read via gdImageRotateInterpolated Array Index Out of Bounds)
+--SKIPIF--
+<?php
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+?>
+--FILE--
+<?php
+$img = imagerotate(imagecreate(10,10),45,0x7ffffff9);
+var_dump($img);
+?>
+--EXPECTF--
+resource(5) of type (gd) \ No newline at end of file
diff --git a/ext/gd/tests/bug71912.phpt b/ext/gd/tests/bug71912.phpt
new file mode 100644
index 0000000000..c86188b0f2
--- /dev/null
+++ b/ext/gd/tests/bug71912.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71912 (libgd: signedness vulnerability)
+--SKIPIF--
+<?php
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagecreatefromgd2')) die('skip imagecreatefromgd2() not available');
+?>
+--FILE--
+<?php
+imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2");
+?>
+OK
+--EXPECTF--
+
+Warning: imagecreatefromgd2(): '%s%einvalid_neg_size.gd2' is not a valid GD2 file in %s%ebug71912.php on line %d
+OK
diff --git a/ext/gd/tests/bug71952.phpt b/ext/gd/tests/bug71952.phpt
new file mode 100644
index 0000000000..f1f66bf26d
--- /dev/null
+++ b/ext/gd/tests/bug71952.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #71952 (Corruption inside imageaffinematrixget)
+--SKIPIF--
+<?php
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+?>
+--FILE--
+<?php
+$vals=[str_repeat("A","200"),0,1,2,3,4,5,6,7,8,9];
+imageaffinematrixget(4,$vals[0]);
+var_dump($vals[0]);
+?>
+--EXPECTF--
+string(200) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" \ No newline at end of file
diff --git a/ext/gd/tests/bug72227.phpt b/ext/gd/tests/bug72227.phpt
new file mode 100644
index 0000000000..6252be7d0e
--- /dev/null
+++ b/ext/gd/tests/bug72227.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #72227: imagescale out-of-bounds read
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+?>
+--FILE--
+<?php
+
+$img = imagecreatetruecolor ( 100, 100);
+imagescale($img, 13, 1, IMG_BICUBIC);
+?>
+DONE
+--EXPECT--
+DONE \ No newline at end of file
diff --git a/ext/gd/tests/bug72337.phpt b/ext/gd/tests/bug72337.phpt
new file mode 100644
index 0000000000..7b8a869577
--- /dev/null
+++ b/ext/gd/tests/bug72337.phpt
@@ -0,0 +1,14 @@
+--TEST--
+ #72337 segfault in imagescale with new dimensions being <=0)
+--SKIPIF--
+<?php
+ if (!function_exists('imagescale')) die("skip gd extension not available\n");
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(1, 1);
+imagescale($im, 0, 0, IMG_BICUBIC_FIXED);
+echo "OK";
+?>
+--EXPECT--
+OK
diff --git a/ext/gd/tests/github_bug_215.phpt b/ext/gd/tests/github_bug_215.phpt
new file mode 100644
index 0000000000..f44a5401e1
--- /dev/null
+++ b/ext/gd/tests/github_bug_215.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Github #215 (imagefilltoborder stack overflow when invalid pallete index used)
+--SKIPIF--
+<?php
+if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+$image = imagecreate( 10, 10 );
+$bgd = imagecolorallocate( $image, 0, 0, 0 );
+$border = imagecolorallocate( $image, 255, 0, 0 );
+$fillcolor = imagecolorallocate( $image, 255, 0, 0 );
+
+/* Use unallocated color index */
+imagefilltoborder( $image, 0,0, $border+10, $fillcolor);
+echo "#1 passes\n";
+
+/* Use negative color index */
+imagefilltoborder( $image, 0,0, -$border, $fillcolor);
+echo "#2 passes\n";
+
+
+/* Use unallocated color index */
+imagefilltoborder( $image, 0,0, $border, $fillcolor+10);
+echo "#3 passes\n";
+
+/* Use negative color index */
+imagefilltoborder( $image, 0,0, $border, -$fillcolor);
+echo "#4 passes\n";
+
+
+/* Use negative color index */
+imagefilltoborder( $image, 0,0, $border+10, $fillcolor+10);
+echo "#5 passes";
+
+
+?>
+--EXPECT--
+#1 passes
+#2 passes
+#3 passes
+#4 passes
+#5 passes
diff --git a/ext/gd/tests/imagefilledellipse_basic.phpt b/ext/gd/tests/imagefilledellipse_basic.phpt
new file mode 100644
index 0000000000..a1a578ad43
--- /dev/null
+++ b/ext/gd/tests/imagefilledellipse_basic.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Testing imagefilledellipse() of GD library
+--SKIPIF--
+<?php
+if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+
+$image = imagecreatetruecolor(100, 100);
+
+$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
+
+//create an ellipse and fill it with white color
+imagefilledellipse($image, 50, 50, 40, 30, $white);
+
+ob_start();
+imagepng($image);
+$img = ob_get_contents();
+ob_end_clean();
+
+echo md5(base64_encode($img));
+?>
+--EXPECT--
+9ba540bba1b78c9f08efaa6fa0afd93b
diff --git a/ext/gd/tests/imagewebp_nullbyte_injection.phpt b/ext/gd/tests/imagewebp_nullbyte_injection.phpt
index 166beb181f..1808e8fb79 100644
--- a/ext/gd/tests/imagewebp_nullbyte_injection.phpt
+++ b/ext/gd/tests/imagewebp_nullbyte_injection.phpt
@@ -8,7 +8,7 @@ rmdir($tempdir);
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
$support = gd_info();
-if (!isset($support['WEBP Support']) || $support['WEBP Support'] === false) {
+if (!isset($support['WebP Support']) || $support['WebP Support'] === false) {
print 'skip webp support not available';
}
?>
@@ -30,9 +30,9 @@ imagewebp($image, $temp);
var_dump(file_exists($tempdir. "/test1"));
var_dump(file_exists($tempdir. "/test1.tmp"));
foreach (glob($tempdir . "/test*") as $file ) { unlink($file); }
-
+?>
--EXPECTF--
-imagewbmp TEST
+imagewebp TEST
Warning: imagewebp(): Invalid 2nd parameter, filename must not contain null bytes in %s on line %d
bool(false)
diff --git a/ext/gd/tests/invalid_neg_size.gd2 b/ext/gd/tests/invalid_neg_size.gd2
new file mode 100644
index 0000000000..3075f15a81
--- /dev/null
+++ b/ext/gd/tests/invalid_neg_size.gd2
Binary files differ
diff --git a/ext/gd/tests/similarity.inc b/ext/gd/tests/similarity.inc
new file mode 100644
index 0000000000..cb0dba77f2
--- /dev/null
+++ b/ext/gd/tests/similarity.inc
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * A very simple algorithm for finding the dissimilarity between images,
+ * mainly useful for checking lossy compression.
+ */
+
+/**
+ * Gets the individual components of an RGB value.
+ *
+ * @param int $color
+ * @param int $red
+ * @param int $green
+ * @param int $blue
+ *
+ * @return void
+ */
+function get_rgb($color, &$red, &$green, &$blue)
+{
+ // assumes $color is an RGB value
+ $red = ($color >> 16) & 0xFF;
+ $green = ($color >> 8) & 0xFF;
+ $blue = $color & 0xFF;
+}
+
+/**
+ * Calculates the euclidean distance of two RGB values.
+ *
+ * @param int $color1
+ * @param int $color2
+ *
+ * @return int
+ */
+function calc_pixel_distance($color1, $color2)
+{
+ get_rgb($color1, $red1, $green1, $blue1);
+ get_rgb($color2, $red2, $green2, $blue2);
+ return sqrt(
+ pow($red1 - $red2, 2) + pow($green1 - $green2, 2) + pow($blue1 - $blue2, 2)
+ );
+}
+
+/**
+ * Calculates dissimilarity of two images.
+ *
+ * @param resource $image1
+ * @param resource $image2
+ *
+ * @return int The dissimilarity. 0 means the images are identical. The higher
+ * the value, the more dissimilar are the images.
+ */
+function calc_image_dissimilarity($image1, $image2)
+{
+ // assumes image1 and image2 have same width and height
+ $dissimilarity = 0;
+ for ($i = 0, $n = imagesx($image1); $i < $n; $i++) {
+ for ($j = 0, $m = imagesy($image1); $j < $m; $j++) {
+ $color1 = imagecolorat($image1, $i, $j);
+ $color2 = imagecolorat($image2, $i, $j);
+ $dissimilarity += calc_pixel_distance($color1, $color2);
+ }
+ }
+ return $dissimilarity;
+}
diff --git a/ext/gd/tests/webp_basic.phpt b/ext/gd/tests/webp_basic.phpt
new file mode 100644
index 0000000000..75933a9ca4
--- /dev/null
+++ b/ext/gd/tests/webp_basic.phpt
@@ -0,0 +1,35 @@
+--TEST--
+imagewebp() and imagecreatefromwebp() - basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (!function_exists('imagewebp') || !function_exists('imagecreatefromwebp'))
+ die('skip WebP support not available');
+?>
+--FILE--
+<?php
+require_once __DIR__ . '/similarity.inc';
+
+$filename = __DIR__ . '/webp_basic.webp';
+
+$im1 = imagecreatetruecolor(75, 75);
+$white = imagecolorallocate($im1, 255, 255, 255);
+$red = imagecolorallocate($im1, 255, 0, 0);
+$green = imagecolorallocate($im1, 0, 255, 0);
+$blue = imagecolorallocate($im1, 0, 0, 255);
+imagefilledrectangle($im1, 0, 0, 74, 74, $white);
+imageline($im1, 3, 3, 71, 71, $red);
+imageellipse($im1, 18, 54, 36, 36, $green);
+imagerectangle($im1, 41, 3, 71, 33, $blue);
+imagewebp($im1, $filename);
+
+$im2 = imagecreatefromwebp($filename);
+imagewebp($im2, $filename);
+var_dump(calc_image_dissimilarity($im1, $im2) < 10e5);
+?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/webp_basic.webp');
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c
index dfe94c7a27..6169888ce2 100644
--- a/ext/gettext/gettext.c
+++ b/ext/gettext/gettext.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gettext/php_gettext.h b/ext/gettext/php_gettext.h
index d17a6817ba..5bde94f2a3 100644
--- a/ext/gettext/php_gettext.h
+++ b/ext/gettext/php_gettext.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 0cac3dee4c..a1e15899c9 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -215,7 +215,7 @@ zend_module_entry gmp_module_entry = {
#ifdef COMPILE_DL_GMP
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(gmp)
#endif
@@ -585,44 +585,42 @@ static int gmp_unserialize(zval *object, zend_class_entry *ce, const unsigned ch
{
mpz_ptr gmpnum;
const unsigned char *p, *max;
- zval zv;
+ zval *zv;
int retval = FAILURE;
php_unserialize_data_t unserialize_data = (php_unserialize_data_t) data;
- ZVAL_UNDEF(&zv);
PHP_VAR_UNSERIALIZE_INIT(unserialize_data);
gmp_create(object, &gmpnum);
p = buf;
max = buf + buf_len;
- if (!php_var_unserialize(&zv, &p, max, &unserialize_data)
- || Z_TYPE(zv) != IS_STRING
- || convert_to_gmp(gmpnum, &zv, 10) == FAILURE
+ zv = var_tmp_var(&unserialize_data);
+ if (!php_var_unserialize(zv, &p, max, &unserialize_data)
+ || Z_TYPE_P(zv) != IS_STRING
+ || convert_to_gmp(gmpnum, zv, 10) == FAILURE
) {
zend_throw_exception(NULL, "Could not unserialize number", 0);
goto exit;
}
- zval_dtor(&zv);
- ZVAL_UNDEF(&zv);
- if (!php_var_unserialize(&zv, &p, max, &unserialize_data)
- || Z_TYPE(zv) != IS_ARRAY
+ zv = var_tmp_var(&unserialize_data);
+ if (!php_var_unserialize(zv, &p, max, &unserialize_data)
+ || Z_TYPE_P(zv) != IS_ARRAY
) {
zend_throw_exception(NULL, "Could not unserialize properties", 0);
goto exit;
}
- if (zend_hash_num_elements(Z_ARRVAL(zv)) != 0) {
+ if (zend_hash_num_elements(Z_ARRVAL_P(zv)) != 0) {
zend_hash_copy(
- zend_std_get_properties(object), Z_ARRVAL(zv),
+ zend_std_get_properties(object), Z_ARRVAL_P(zv),
(copy_ctor_func_t) zval_add_ref
);
}
retval = SUCCESS;
exit:
- zval_dtor(&zv);
PHP_VAR_UNSERIALIZE_DESTROY(unserialize_data);
return retval;
}
@@ -1146,11 +1144,10 @@ ZEND_FUNCTION(gmp_export)
} else {
size_t bits_per_word = size * 8;
size_t count = (mpz_sizeinbase(gmpnumber, 2) + bits_per_word - 1) / bits_per_word;
- size_t out_len = count * size;
- zend_string *out_string = zend_string_alloc(out_len, 0);
+ zend_string *out_string = zend_string_safe_alloc(count, size, 0, 0);
mpz_export(ZSTR_VAL(out_string), NULL, order, size, endian, 0, gmpnumber);
- ZSTR_VAL(out_string)[out_len] = '\0';
+ ZSTR_VAL(out_string)[ZSTR_LEN(out_string)] = '\0';
RETURN_NEW_STR(out_string);
}
diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h
index 2ca592907e..d8a1d0c5a6 100644
--- a/ext/gmp/php_gmp.h
+++ b/ext/gmp/php_gmp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -95,13 +95,10 @@ ZEND_BEGIN_MODULE_GLOBALS(gmp)
gmp_randstate_t rand_state;
ZEND_END_MODULE_GLOBALS(gmp)
-#ifdef ZTS
-#define GMPG(v) ZEND_TSRMG(gmp_globals_id, zend_gmp_globals *, v)
-#ifdef COMPILE_DL_GMP
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define GMPG(v) (gmp_globals.v)
+#define GMPG(v) ZEND_MODULE_GLOBALS_ACCESSOR(gmp, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_GMP)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#else
diff --git a/ext/gmp/tests/bug70284.phpt b/ext/gmp/tests/bug70284.phpt
new file mode 100644
index 0000000000..58fc50cf2d
--- /dev/null
+++ b/ext/gmp/tests/bug70284.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #70284 (Use after free vulnerability in unserialize() with GMP)
+--SKIPIF--
+<?php if (!extension_loaded("gmp")) print "skip"; ?>
+--FILE--
+<?php
+
+$inner = 'r:2;a:1:{i:0;a:1:{i:0;r:4;}}';
+$exploit = 'a:2:{i:0;s:1:"1";i:1;C:3:"GMP":'.strlen($inner).':{'.$inner.'}}';
+
+$data = unserialize($exploit);
+
+$fakezval = ptr2str(1122334455);
+$fakezval .= ptr2str(0);
+$fakezval .= "\x00\x00\x00\x00";
+$fakezval .= "\x01";
+$fakezval .= "\x00";
+$fakezval .= "\x00\x00";
+
+for ($i = 0; $i < 5; $i++) {
+ $v[$i] = $fakezval.$i;
+}
+
+var_dump($data);
+
+function ptr2str($ptr)
+{
+$out = '';
+ for ($i = 0; $i < 8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+ return $out;
+}
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ object(GMP)#%d (2) {
+ [0]=>
+ array(1) {
+ [0]=>
+ string(1) "1"
+ }
+ ["num"]=>
+ string(1) "1"
+ }
+}
diff --git a/ext/gmp/tests/gmp_random_seed-32bit.phpt b/ext/gmp/tests/gmp_random_seed-32bit.phpt
new file mode 100644
index 0000000000..f0f4fca6e3
--- /dev/null
+++ b/ext/gmp/tests/gmp_random_seed-32bit.phpt
@@ -0,0 +1,230 @@
+--TEST--
+gmp_random_seed() basic tests
+--SKIPIF--
+<?php if (!extension_loaded("gmp")) print "skip"; ?>
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
+--FILE--
+<?php
+
+// zero int
+var_dump(gmp_random_seed(0));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// zero gmp
+var_dump(gmp_random_seed(gmp_init(0)));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// negative int
+var_dump(gmp_random_seed(-100));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// negative gmp
+var_dump(gmp_random_seed(gmp_init(-100)));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// positive int
+var_dump(gmp_random_seed(100));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// positive gmp
+var_dump(gmp_random_seed(100));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+$seed = gmp_init(1);
+$seed <<= 512;
+
+// large negative gmp
+var_dump(gmp_random_seed($seed * -1));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// large positive gmp
+var_dump(gmp_random_seed($seed));
+
+var_dump(gmp_strval(gmp_random()));
+var_dump(gmp_strval(gmp_random(1)));
+var_dump(gmp_strval(gmp_random(10)));
+
+var_dump(gmp_strval(gmp_random_bits(10)));
+var_dump(gmp_strval(gmp_random_bits(100)));
+var_dump(gmp_strval(gmp_random_bits(1000)));
+
+var_dump(gmp_strval(gmp_random_range(0, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 10000)));
+var_dump(gmp_strval(gmp_random_range(-10000, 0)));
+
+
+// standard non conversion error
+var_dump(gmp_random_seed('not a number'));
+
+
+echo "Done\n";
+?>
+--EXPECTF--
+NULL
+string(193) "2000022451473107283132031190545479155678097978829612864726689673263990484954900429188146529905019042225609517482723730948135765344007937183893986134210303199345433818579954244943136664096571499"
+string(10) "3792281639"
+string(97) "1281406676617847191505318987040099388645126071814252743902229506206669580396236451813261179688680"
+string(2) "86"
+string(30) "539590049119295715487546581833"
+string(301) "1421393257467327495225454368915273750356127352353055226245692071178379257048985726109650766437957017507708821700349355658110489309871463201057688894986035545794429493563972043777521547094922637182497036750765553664196591958728194711096442220858890056073974348364544481270013556644174056049511198143353"
+string(4) "8971"
+string(4) "7838"
+string(5) "-7823"
+NULL
+string(193) "2000022451473107283132031190545479155678097978829612864726689673263990484954900429188146529905019042225609517482723730948135765344007937183893986134210303199345433818579954244943136664096571499"
+string(10) "3792281639"
+string(97) "1281406676617847191505318987040099388645126071814252743902229506206669580396236451813261179688680"
+string(2) "86"
+string(30) "539590049119295715487546581833"
+string(301) "1421393257467327495225454368915273750356127352353055226245692071178379257048985726109650766437957017507708821700349355658110489309871463201057688894986035545794429493563972043777521547094922637182497036750765553664196591958728194711096442220858890056073974348364544481270013556644174056049511198143353"
+string(4) "8971"
+string(4) "7838"
+string(5) "-7823"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "2481908463276861025880840116973116041137167231715512003123396619946362384184452775649311777755189162364804428739438733886421190841599393284032499618736594054572838636962845446571583771860379424"
+string(9) "513032517"
+string(97) "1269389652350468424962405917839748437534426606829298977422985976022226588797299164880342257267822"
+string(3) "111"
+string(31) "1007352579363975542750518386428"
+string(301) "5972672173406546932378461222050826195392618168845902231231085819967980051373112173617569638344495916340820360974139193579303652817960325137050189614326029375858951250371622253667077551034119958866481056760107123567590230789917209543206262943739654964107980961862387602012190907147667678648223791029527"
+string(4) "2362"
+string(5) "-9377"
+string(5) "-8435"
+NULL
+string(193) "4314861641594785951065006537821497084129700255567731661104366342587560122488351847486220156468888511744226746306538524023190734733433083354034308520246964938498767672539252131810891590624763642"
+string(10) "3301287097"
+string(97) "1532710025135934106005683287301200805525218110207399702226596673360222079570223526337866801028045"
+string(3) "317"
+string(30) "949682013136255600092941702271"
+string(302) "10419061168407861659407303769436775291881708415032871985692089124472434944956010985892897595466043265819000974537553172663152640727594826474137173310039809413311432062725623183603946900548710858191078057179743726366436832870919212340219523613153893742764101120396858424887711932475871305848021245801132"
+string(4) "2417"
+string(5) "-7975"
+string(4) "-378"
+NULL
+string(193) "4314861641594785951065006537821497084129700255567731661104366342587560122488351847486220156468888511744226746306538524023190734733433083354034308520246964938498767672539252131810891590624763642"
+string(10) "3301287097"
+string(97) "1532710025135934106005683287301200805525218110207399702226596673360222079570223526337866801028045"
+string(3) "317"
+string(30) "949682013136255600092941702271"
+string(302) "10419061168407861659407303769436775291881708415032871985692089124472434944956010985892897595466043265819000974537553172663152640727594826474137173310039809413311432062725623183603946900548710858191078057179743726366436832870919212340219523613153893742764101120396858424887711932475871305848021245801132"
+string(4) "2417"
+string(5) "-7975"
+string(4) "-378"
+
+Warning: gmp_random_seed(): Unable to convert variable to GMP - string is not an integer in %s on line %d
+bool(false)
+Done \ No newline at end of file
diff --git a/ext/gmp/tests/gmp_random_seed.phpt b/ext/gmp/tests/gmp_random_seed.phpt
index 3a832467bb..d28704e124 100644
--- a/ext/gmp/tests/gmp_random_seed.phpt
+++ b/ext/gmp/tests/gmp_random_seed.phpt
@@ -2,6 +2,7 @@
gmp_random_seed() basic tests
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
<?php
diff --git a/ext/gmp/tests/serialize.phpt b/ext/gmp/tests/serialize.phpt
index 208e0e9800..5e308fa14e 100644
--- a/ext/gmp/tests/serialize.phpt
+++ b/ext/gmp/tests/serialize.phpt
@@ -18,7 +18,7 @@ try {
} catch (Exception $e) { var_dump($e->getMessage()); }
try {
- unserialize('C:3:"GMP":8:{s:2:"42"}');
+ unserialize('C:3:"GMP":8:{s:2:"42";}');
} catch (Exception $e) { var_dump($e->getMessage()); }
?>
diff --git a/ext/hash/config.m4 b/ext/hash/config.m4
index 5174db3b71..703cf14a30 100644
--- a/ext/hash/config.m4
+++ b/ext/hash/config.m4
@@ -27,11 +27,11 @@ if test "$PHP_HASH" != "no"; then
EXT_HASH_SOURCES="hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \
hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c hash_adler32.c \
- hash_crc32.c hash_fnv.c hash_joaat.c"
+ hash_crc32.c hash_fnv.c hash_joaat.c hash_sha3.c"
EXT_HASH_HEADERS="php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \
php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \
php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h \
- php_hash_fnv.h php_hash_joaat.h"
+ php_hash_fnv.h php_hash_joaat.h php_hash_sha3.h"
PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, $ext_shared)
ifdef([PHP_INSTALL_HEADERS], [
diff --git a/ext/hash/config.w32 b/ext/hash/config.w32
index 8e9d4c3d48..17711facd8 100644
--- a/ext/hash/config.w32
+++ b/ext/hash/config.w32
@@ -15,10 +15,10 @@ if (PHP_HASH != "no") {
AC_DEFINE('HAVE_HASH_EXT', 1);
EXTENSION("hash", "hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c "
+ "hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c "
- + "hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c");
+ + "hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c hash_sha3.c");
PHP_INSTALL_HEADERS("ext/hash/", "php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h " +
"php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h " +
- "php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h");
+ "php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h");
}
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 325c9b9230..87b11b6dad 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,12 +31,6 @@
static int php_hash_le_hash;
HashTable php_hash_hashtable;
-#if (PHP_MAJOR_VERSION >= 5)
-# define DEFAULT_CONTEXT FG(default_context)
-#else
-# define DEFAULT_CONTEXT NULL
-#endif
-
#ifdef PHP_MHASH_BC
struct mhash_bc_entry {
char *mhash_name;
@@ -137,10 +131,10 @@ static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_
}
if (isfilename) {
if (CHECK_NULL_PATH(data, data_len)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid path");
+ php_error_docref(NULL, E_WARNING, "Invalid path");
RETURN_FALSE;
}
- stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS, NULL, DEFAULT_CONTEXT);
+ stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS, NULL, FG(default_context));
if (!stream) {
/* Stream will report errors opening file */
RETURN_FALSE;
@@ -256,10 +250,10 @@ static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename,
}
if (isfilename) {
if (CHECK_NULL_PATH(data, data_len)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid path");
+ php_error_docref(NULL, E_WARNING, "Invalid path");
RETURN_FALSE;
}
- stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS, NULL, DEFAULT_CONTEXT);
+ stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS, NULL, FG(default_context));
if (!stream) {
/* Stream will report errors opening file */
RETURN_FALSE;
@@ -849,9 +843,7 @@ PHP_FUNCTION(mhash)
return;
}
- SEPARATE_ZVAL(z_algorithm);
- convert_to_long_ex(z_algorithm);
- algorithm = Z_LVAL_P(z_algorithm);
+ algorithm = zval_get_long(z_algorithm);
/* need to convert the first parameter from int constant to string algorithm name */
if (algorithm >= 0 && algorithm < MHASH_NUM_ALGOS) {
@@ -1015,7 +1007,13 @@ PHP_MINIT_FUNCTION(hash)
php_hash_register_algo("sha224", &php_hash_sha224_ops);
php_hash_register_algo("sha256", &php_hash_sha256_ops);
php_hash_register_algo("sha384", &php_hash_sha384_ops);
+ php_hash_register_algo("sha512/224", &php_hash_sha512_224_ops);
+ php_hash_register_algo("sha512/256", &php_hash_sha512_256_ops);
php_hash_register_algo("sha512", &php_hash_sha512_ops);
+ php_hash_register_algo("sha3-224", &php_hash_sha3_224_ops);
+ php_hash_register_algo("sha3-256", &php_hash_sha3_256_ops);
+ php_hash_register_algo("sha3-384", &php_hash_sha3_384_ops);
+ php_hash_register_algo("sha3-512", &php_hash_sha3_512_ops);
php_hash_register_algo("ripemd128", &php_hash_ripemd128_ops);
php_hash_register_algo("ripemd160", &php_hash_ripemd160_ops);
php_hash_register_algo("ripemd256", &php_hash_ripemd256_ops);
diff --git a/ext/hash/hash_adler32.c b/ext/hash/hash_adler32.c
index 0676f1fdad..eac389f896 100644
--- a/ext/hash/hash_adler32.c
+++ b/ext/hash/hash_adler32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,7 +29,7 @@ PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context)
PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned char *input, size_t len)
{
- php_hash_uint32 i, s[2];
+ uint32_t i, s[2];
s[0] = context->state & 0xffff;
s[1] = (context->state >> 16) & 0xffff;
diff --git a/ext/hash/hash_crc32.c b/ext/hash/hash_crc32.c
index b503fdab6a..333070aabb 100644
--- a/ext/hash/hash_crc32.c
+++ b/ext/hash/hash_crc32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/hash/hash_fnv.c b/ext/hash/hash_fnv.c
index 4d21f2fb84..1e6f8d974d 100644
--- a/ext/hash/hash_fnv.c
+++ b/ext/hash/hash_fnv.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -147,8 +147,8 @@ PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * cont
* returns:
* 32 bit hash as a static hash type
*/
-static php_hash_uint32
-fnv_32_buf(void *buf, size_t len, php_hash_uint32 hval, int alternate)
+static uint32_t
+fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate)
{
unsigned char *bp = (unsigned char *)buf; /* start of buffer */
unsigned char *be = bp + len; /* beyond end of buffer */
@@ -163,10 +163,10 @@ fnv_32_buf(void *buf, size_t len, php_hash_uint32 hval, int alternate)
hval *= PHP_FNV_32_PRIME;
/* xor the bottom with the current octet */
- hval ^= (php_hash_uint32)*bp++;
+ hval ^= (uint32_t)*bp++;
} else {
/* xor the bottom with the current octet */
- hval ^= (php_hash_uint32)*bp++;
+ hval ^= (uint32_t)*bp++;
/* multiply by the 32 bit FNV magic prime mod 2^32 */
hval *= PHP_FNV_32_PRIME;
@@ -189,8 +189,8 @@ fnv_32_buf(void *buf, size_t len, php_hash_uint32 hval, int alternate)
* returns:
* 64 bit hash as a static hash type
*/
-static php_hash_uint64
-fnv_64_buf(void *buf, size_t len, php_hash_uint64 hval, int alternate)
+static uint64_t
+fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate)
{
unsigned char *bp = (unsigned char *)buf; /* start of buffer */
unsigned char *be = bp + len; /* beyond end of buffer */
@@ -205,10 +205,10 @@ fnv_64_buf(void *buf, size_t len, php_hash_uint64 hval, int alternate)
hval *= PHP_FNV_64_PRIME;
/* xor the bottom with the current octet */
- hval ^= (php_hash_uint64)*bp++;
+ hval ^= (uint64_t)*bp++;
} else {
/* xor the bottom with the current octet */
- hval ^= (php_hash_uint64)*bp++;
+ hval ^= (uint64_t)*bp++;
/* multiply by the 64 bit FNV magic prime mod 2^64 */
hval *= PHP_FNV_64_PRIME;
diff --git a/ext/hash/hash_gost.c b/ext/hash/hash_gost.c
index e57d06a0a4..4e72117451 100644
--- a/ext/hash/hash_gost.c
+++ b/ext/hash/hash_gost.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -207,10 +207,10 @@
AA(v, l, r); \
}
-static inline void Gost(PHP_GOST_CTX *context, php_hash_uint32 data[8])
+static inline void Gost(PHP_GOST_CTX *context, uint32_t data[8])
{
int i;
- php_hash_uint32 l, r, t, key[8], u[8], v[8], w[8], s[8], *h = context->state, *m = data;
+ uint32_t l, r, t, key[8], u[8], v[8], w[8], s[8], *h = context->state, *m = data;
memcpy(u, context->state, sizeof(u));
memcpy(v, data, sizeof(v));
@@ -227,11 +227,11 @@ static inline void Gost(PHP_GOST_CTX *context, php_hash_uint32 data[8])
static inline void GostTransform(PHP_GOST_CTX *context, const unsigned char input[32])
{
int i, j;
- php_hash_uint32 data[8], temp = 0, save = 0;
+ uint32_t data[8], temp = 0, save = 0;
for (i = 0, j = 0; i < 8; ++i, j += 4) {
- data[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) |
- (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24);
+ data[i] = ((uint32_t) input[j]) | (((uint32_t) input[j + 1]) << 8) |
+ (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24);
save = context->state[i + 8];
context->state[i + 8] += data[i] + temp;
temp = ((context->state[i + 8] < data[i]) || (context->state[i + 8] < save)) ? 1 : 0;
@@ -252,7 +252,7 @@ PHP_HASH_API void PHP_GOSTInitCrypto(PHP_GOST_CTX *context)
context->tables = &tables_crypto;
}
-static const php_hash_uint32 MAX32 = 0xffffffffLU;
+static const uint32_t MAX32 = 0xffffffffLU;
PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *context, const unsigned char *input, size_t len)
{
@@ -288,7 +288,7 @@ PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *context, const unsigned char *inp
PHP_HASH_API void PHP_GOSTFinal(unsigned char digest[32], PHP_GOST_CTX *context)
{
- php_hash_uint32 i, j, l[8] = {0};
+ uint32_t i, j, l[8] = {0};
if (context->length) {
GostTransform(context, context->buffer);
diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c
index 321999f099..08168adbe1 100644
--- a/ext/hash/hash_haval.c
+++ b/ext/hash/hash_haval.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,28 +31,28 @@ static const unsigned char PADDING[128] ={
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-static const php_hash_uint32 D0[8] = {
+static const uint32_t D0[8] = {
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89 };
-static const php_hash_uint32 K2[32] = {
+static const uint32_t K2[32] = {
0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,
0x9216D5D9, 0x8979FB1B, 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, 0xB8E1AFED, 0x6A267E96,
0xBA7C9045, 0xF12C7F99, 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, 0x636920D8, 0x71574E69,
0xA458FEA3, 0xF4933D7E, 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, 0x7B54A41D, 0xC25A59B5 };
-static const php_hash_uint32 K3[32] = {
+static const uint32_t K3[32] = {
0x9C30D539, 0x2AF26013, 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, 0x8E79DCB0, 0x603A180E,
0x6C9E0E8B, 0xB01E8A3E, 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, 0xE65525F3, 0xAA55AB94,
0x57489862, 0x63E81440, 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, 0xA15486AF, 0x7C72E993,
0xB3EE1411, 0x636FBC2A, 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, 0xAFD6BA33, 0x6C24CF5C };
-static const php_hash_uint32 K4[32] = {
+static const uint32_t K4[32] = {
0x7A325381, 0x28958677, 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, 0x61D809CC, 0xFB21A991,
0x487CAC60, 0x5DEC8032, 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, 0x23893E81, 0xD396ACC5,
0x0F6D6FF3, 0x83F44239, 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, 0x21C66842, 0xF6E96C9A,
0x670C9C61, 0xABD388F0, 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, 0x6EEF0B6C, 0x137A3BE4 };
-static const php_hash_uint32 K5[32] = {
+static const uint32_t K5[32] = {
0xBA3BF050, 0x7EFB2A98, 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, 0x8CEE8619, 0x456F9FB4,
0x7D84A5C3, 0x3B8B5EBE, 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, 0x4ED3AA62, 0x363F7706,
0x1BFEDF72, 0x429B023D, 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, 0x075372C9, 0x80991B7B,
@@ -95,10 +95,10 @@ static const short M7[32] = { 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0,
7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0 };
/* {{{ Encode
- Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is
+ Encodes input (uint32_t) into output (unsigned char). Assumes len is
a multiple of 4.
*/
-static void Encode(unsigned char *output, php_hash_uint32 *input, unsigned int len)
+static void Encode(unsigned char *output, uint32_t *input, unsigned int len)
{
unsigned int i, j;
@@ -112,16 +112,16 @@ static void Encode(unsigned char *output, php_hash_uint32 *input, unsigned int l
/* }}} */
/* {{{ Decode
- Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is
+ Decodes input (unsigned char) into output (uint32_t). Assumes len is
a multiple of 4.
*/
-static void Decode(php_hash_uint32 *output, const unsigned char *input, unsigned int len)
+static void Decode(uint32_t *output, const unsigned char *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
- output[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) |
- (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24);
+ output[i] = ((uint32_t) input[j]) | (((uint32_t) input[j + 1]) << 8) |
+ (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24);
}
}
/* }}} */
@@ -141,10 +141,10 @@ static void Decode(php_hash_uint32 *output, const unsigned char *input, unsigned
/* {{{ PHP_3HAVALTransform
*/
-static void PHP_3HAVALTransform(php_hash_uint32 state[8], const unsigned char block[128])
+static void PHP_3HAVALTransform(uint32_t state[8], const unsigned char block[128])
{
- php_hash_uint32 E[8];
- php_hash_uint32 x[32];
+ uint32_t E[8];
+ uint32_t x[32];
int i;
Decode(x, block, 128);
@@ -175,10 +175,10 @@ static void PHP_3HAVALTransform(php_hash_uint32 state[8], const unsigned char bl
/* {{{ PHP_4HAVALTransform
*/
-static void PHP_4HAVALTransform(php_hash_uint32 state[8], const unsigned char block[128])
+static void PHP_4HAVALTransform(uint32_t state[8], const unsigned char block[128])
{
- php_hash_uint32 E[8];
- php_hash_uint32 x[32];
+ uint32_t E[8];
+ uint32_t x[32];
int i;
Decode(x, block, 128);
@@ -212,10 +212,10 @@ static void PHP_4HAVALTransform(php_hash_uint32 state[8], const unsigned char bl
/* {{{ PHP_5HAVALTransform
*/
-static void PHP_5HAVALTransform(php_hash_uint32 state[8], const unsigned char block[128])
+static void PHP_5HAVALTransform(uint32_t state[8], const unsigned char block[128])
{
- php_hash_uint32 E[8];
- php_hash_uint32 x[32];
+ uint32_t E[8];
+ uint32_t x[32];
int i;
Decode(x, block, 128);
@@ -289,10 +289,10 @@ PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *context, const unsigned char *i
/* Compute number of bytes mod 128 */
index = (unsigned int) ((context->count[0] >> 3) & 0x7F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 128 - index;
@@ -336,7 +336,7 @@ PHP_HASH_API void PHP_HAVAL128Final(unsigned char *digest, PHP_HAVAL_CTX * conte
/* Pad out to 118 mod 128.
*/
- index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
+ index = (unsigned int) ((context->count[0] >> 3) & 0x7f);
padLen = (index < 118) ? (118 - index) : (246 - index);
PHP_HAVALUpdate(context, PADDING, padLen);
@@ -390,7 +390,7 @@ PHP_HASH_API void PHP_HAVAL160Final(unsigned char *digest, PHP_HAVAL_CTX * conte
/* Pad out to 118 mod 128.
*/
- index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
+ index = (unsigned int) ((context->count[0] >> 3) & 0x7f);
padLen = (index < 118) ? (118 - index) : (246 - index);
PHP_HAVALUpdate(context, PADDING, padLen);
@@ -444,7 +444,7 @@ PHP_HASH_API void PHP_HAVAL192Final(unsigned char *digest, PHP_HAVAL_CTX * conte
/* Pad out to 118 mod 128.
*/
- index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
+ index = (unsigned int) ((context->count[0] >> 3) & 0x7f);
padLen = (index < 118) ? (118 - index) : (246 - index);
PHP_HAVALUpdate(context, PADDING, padLen);
@@ -484,7 +484,7 @@ PHP_HASH_API void PHP_HAVAL224Final(unsigned char *digest, PHP_HAVAL_CTX * conte
/* Pad out to 118 mod 128.
*/
- index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
+ index = (unsigned int) ((context->count[0] >> 3) & 0x7f);
padLen = (index < 118) ? (118 - index) : (246 - index);
PHP_HAVALUpdate(context, PADDING, padLen);
@@ -525,7 +525,7 @@ PHP_HASH_API void PHP_HAVAL256Final(unsigned char *digest, PHP_HAVAL_CTX * conte
/* Pad out to 118 mod 128.
*/
- index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
+ index = (unsigned int) ((context->count[0] >> 3) & 0x7f);
padLen = (index < 118) ? (118 - index) : (246 - index);
PHP_HAVALUpdate(context, PADDING, padLen);
diff --git a/ext/hash/hash_joaat.c b/ext/hash/hash_joaat.c
index f8dc778df1..98a11a08bc 100644
--- a/ext/hash/hash_joaat.c
+++ b/ext/hash/hash_joaat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -70,8 +70,8 @@ PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * contex
* returns:
* 32 bit hash as a static hash type
*/
-static php_hash_uint32
-joaat_buf(void *buf, size_t len, php_hash_uint32 hval)
+static uint32_t
+joaat_buf(void *buf, size_t len, uint32_t hval)
{
size_t i;
unsigned char *input = (unsigned char *)buf;
diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c
index 2d0778ff4e..711238ad82 100644
--- a/ext/hash/hash_md.c
+++ b/ext/hash/hash_md.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -61,10 +61,10 @@ static const unsigned char PADDING[64] =
};
/* {{{ Encode
- Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is
+ Encodes input (uint32_t) into output (unsigned char). Assumes len is
a multiple of 4.
*/
-static void Encode(unsigned char *output, php_hash_uint32 *input, unsigned int len)
+static void Encode(unsigned char *output, uint32_t *input, unsigned int len)
{
unsigned int i, j;
@@ -78,16 +78,16 @@ static void Encode(unsigned char *output, php_hash_uint32 *input, unsigned int l
/* }}} */
/* {{{ Decode
- Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is
+ Decodes input (unsigned char) into output (uint32_t). Assumes len is
a multiple of 4.
*/
-static void Decode(php_hash_uint32 *output, const unsigned char *input, unsigned int len)
+static void Decode(uint32_t *output, const unsigned char *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) |
- (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24);
+ output[i] = ((uint32_t) input[j]) | (((uint32_t) input[j + 1]) << 8) |
+ (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24);
}
/* }}} */
@@ -224,7 +224,7 @@ PHP_NAMED_FUNCTION(php_if_md5_file)
#define S43 15
#define S44 21
-static void MD5Transform(php_hash_uint32[4], const unsigned char[64]);
+static void MD5Transform(uint32_t[4], const unsigned char[64]);
/* F, G, H and I are basic MD5 functions.
*/
@@ -241,22 +241,22 @@ static void MD5Transform(php_hash_uint32[4], const unsigned char[64]);
Rotation is separate from addition to prevent recomputation.
*/
#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \
+ (a) += F ((b), (c), (d)) + (x) + (uint32_t)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \
+ (a) += G ((b), (c), (d)) + (x) + (uint32_t)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \
+ (a) += H ((b), (c), (d)) + (x) + (uint32_t)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \
+ (a) += I ((b), (c), (d)) + (x) + (uint32_t)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
@@ -290,10 +290,10 @@ PHP_HASH_API void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *inpu
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3))
- < ((php_hash_uint32) inputLen << 3))
+ if ((context->count[0] += ((uint32_t) inputLen << 3))
+ < ((uint32_t) inputLen << 3))
context->count[1]++;
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -352,10 +352,10 @@ PHP_HASH_API void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context)
* MD5 basic transformation. Transforms state based on block.
*/
static void MD5Transform(state, block)
-php_hash_uint32 state[4];
+uint32_t state[4];
const unsigned char block[64];
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode(x, block, 64);
@@ -455,9 +455,9 @@ const unsigned char block[64];
#define MD4_R2(a,b,c,d,k,s) a = ROTL32(s, a + MD4_G(b,c,d) + x[k] + 0x5A827999)
#define MD4_R3(a,b,c,d,k,s) a = ROTL32(s, a + MD4_H(b,c,d) + x[k] + 0x6ED9EBA1)
-static void MD4Transform(php_hash_uint32 state[4], const unsigned char block[64])
+static void MD4Transform(uint32_t state[4], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode(x, block, 64);
@@ -549,10 +549,10 @@ PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX * context, const unsigned char *inpu
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3))
- < ((php_hash_uint32) inputLen << 3))
+ if ((context->count[0] += ((uint32_t) inputLen << 3))
+ < ((uint32_t) inputLen << 3))
context->count[1]++;
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
diff --git a/ext/hash/hash_ripemd.c b/ext/hash/hash_ripemd.c
index 5bcf3f1bef..03d4af8349 100644
--- a/ext/hash/hash_ripemd.c
+++ b/ext/hash/hash_ripemd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -143,9 +143,9 @@ PHP_HASH_API void PHP_RIPEMD320Init(PHP_RIPEMD320_CTX * context)
#define F3(x,y,z) (((x) & (z)) | ((y) & (~(z))))
#define F4(x,y,z) ((x) ^ ((y) | (~(z))))
-static const php_hash_uint32 K_values[5] = { 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E }; /* 128, 256, 160, 320 */
-static const php_hash_uint32 KK_values[4] = { 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x00000000 }; /* 128 & 256 */
-static const php_hash_uint32 KK160_values[5] = { 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000 }; /* 160 & 320 */
+static const uint32_t K_values[5] = { 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E }; /* 128, 256, 160, 320 */
+static const uint32_t KK_values[4] = { 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x00000000 }; /* 128 & 256 */
+static const uint32_t KK160_values[5] = { 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000 }; /* 160 & 320 */
#define K(n) K_values[ (n) >> 4]
#define KK(n) KK_values[(n) >> 4]
@@ -184,27 +184,27 @@ static const unsigned char SS[80] = {
#define ROL(n, x) (((x) << n) | ((x) >> (32 - n)))
/* {{{ RIPEMDDecode
- Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is
+ Decodes input (unsigned char) into output (uint32_t). Assumes len is
a multiple of 4.
*/
-static void RIPEMDDecode(php_hash_uint32 *output, const unsigned char *input, unsigned int len)
+static void RIPEMDDecode(uint32_t *output, const unsigned char *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((php_hash_uint32) input[j + 0]) | (((php_hash_uint32) input[j + 1]) << 8) |
- (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24);
+ output[i] = ((uint32_t) input[j + 0]) | (((uint32_t) input[j + 1]) << 8) |
+ (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24);
}
/* }}} */
/* {{{ RIPEMD128Transform
* ripemd128 basic transformation. Transforms state based on block.
*/
-static void RIPEMD128Transform(php_hash_uint32 state[4], const unsigned char block[64])
+static void RIPEMD128Transform(uint32_t state[4], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3];
- php_hash_uint32 aa = state[0], bb = state[1], cc = state[2], dd = state[3];
- php_hash_uint32 tmp, x[16];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3];
+ uint32_t aa = state[0], bb = state[1], cc = state[2], dd = state[3];
+ uint32_t tmp, x[16];
int j;
RIPEMDDecode(x, block, 64);
@@ -261,10 +261,10 @@ PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX * context, const unsigne
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -291,11 +291,11 @@ PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX * context, const unsigne
/* {{{ RIPEMD256Transform
* ripemd256 basic transformation. Transforms state based on block.
*/
-static void RIPEMD256Transform(php_hash_uint32 state[8], const unsigned char block[64])
+static void RIPEMD256Transform(uint32_t state[8], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3];
- php_hash_uint32 aa = state[4], bb = state[5], cc = state[6], dd = state[7];
- php_hash_uint32 tmp, x[16];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3];
+ uint32_t aa = state[4], bb = state[5], cc = state[6], dd = state[7];
+ uint32_t tmp, x[16];
int j;
RIPEMDDecode(x, block, 64);
@@ -359,10 +359,10 @@ PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX * context, const unsigne
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -389,11 +389,11 @@ PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX * context, const unsigne
/* {{{ RIPEMD160Transform
* ripemd160 basic transformation. Transforms state based on block.
*/
-static void RIPEMD160Transform(php_hash_uint32 state[5], const unsigned char block[64])
+static void RIPEMD160Transform(uint32_t state[5], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], e = state[4];
- php_hash_uint32 aa = state[0], bb = state[1], cc = state[2], dd = state[3], ee = state[4];
- php_hash_uint32 tmp, x[16];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], e = state[4];
+ uint32_t aa = state[0], bb = state[1], cc = state[2], dd = state[3], ee = state[4];
+ uint32_t tmp, x[16];
int j;
RIPEMDDecode(x, block, 64);
@@ -458,10 +458,10 @@ PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX * context, const unsigne
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -488,11 +488,11 @@ PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX * context, const unsigne
/* {{{ RIPEMD320Transform
* ripemd320 basic transformation. Transforms state based on block.
*/
-static void RIPEMD320Transform(php_hash_uint32 state[10], const unsigned char block[64])
+static void RIPEMD320Transform(uint32_t state[10], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], e = state[4];
- php_hash_uint32 aa = state[5], bb = state[6], cc = state[7], dd = state[8], ee = state[9];
- php_hash_uint32 tmp, x[16];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], e = state[4];
+ uint32_t aa = state[5], bb = state[6], cc = state[7], dd = state[8], ee = state[9];
+ uint32_t tmp, x[16];
int j;
RIPEMDDecode(x, block, 64);
@@ -566,10 +566,10 @@ PHP_HASH_API void PHP_RIPEMD320Update(PHP_RIPEMD320_CTX * context, const unsigne
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -601,10 +601,10 @@ static const unsigned char PADDING[64] =
};
/* {{{ RIPEMDEncode
- Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is
+ Encodes input (uint32_t) into output (unsigned char). Assumes len is
a multiple of 4.
*/
-static void RIPEMDEncode(unsigned char *output, php_hash_uint32 *input, unsigned int len)
+static void RIPEMDEncode(unsigned char *output, uint32_t *input, unsigned int len)
{
unsigned int i, j;
diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c
index edd579eee7..d158faaa64 100644
--- a/ext/hash/hash_sha.c
+++ b/ext/hash/hash_sha.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -35,10 +35,10 @@ static const unsigned char PADDING[128] =
};
/* {{{ SHAEncode32
- Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is
+ Encodes input (uint32_t) into output (unsigned char). Assumes len is
a multiple of 4.
*/
-static void SHAEncode32(unsigned char *output, php_hash_uint32 *input, unsigned int len)
+static void SHAEncode32(unsigned char *output, uint32_t *input, unsigned int len)
{
unsigned int i, j;
@@ -53,16 +53,16 @@ static void SHAEncode32(unsigned char *output, php_hash_uint32 *input, unsigned
/* {{{ SHADecode32
- Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is
+ Decodes input (unsigned char) into output (uint32_t). Assumes len is
a multiple of 4.
*/
-static void SHADecode32(php_hash_uint32 *output, const unsigned char *input, unsigned int len)
+static void SHADecode32(uint32_t *output, const unsigned char *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((php_hash_uint32) input[j + 3]) | (((php_hash_uint32) input[j + 2]) << 8) |
- (((php_hash_uint32) input[j + 1]) << 16) | (((php_hash_uint32) input[j]) << 24);
+ output[i] = ((uint32_t) input[j + 3]) | (((uint32_t) input[j + 2]) << 8) |
+ (((uint32_t) input[j + 1]) << 16) | (((uint32_t) input[j]) << 24);
}
/* }}} */
@@ -179,22 +179,22 @@ PHP_FUNCTION(sha1_file)
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
*/
#define FF(a, b, c, d, e, w) { \
- (e) += F ((b), (c), (d)) + (w) + (php_hash_uint32)(0x5A827999); \
+ (e) += F ((b), (c), (d)) + (w) + (uint32_t)(0x5A827999); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
#define GG(a, b, c, d, e, w) { \
- (e) += G ((b), (c), (d)) + (w) + (php_hash_uint32)(0x6ED9EBA1); \
+ (e) += G ((b), (c), (d)) + (w) + (uint32_t)(0x6ED9EBA1); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
#define HH(a, b, c, d, e, w) { \
- (e) += H ((b), (c), (d)) + (w) + (php_hash_uint32)(0x8F1BBCDC); \
+ (e) += H ((b), (c), (d)) + (w) + (uint32_t)(0x8F1BBCDC); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
#define II(a, b, c, d, e, w) { \
- (e) += I ((b), (c), (d)) + (w) + (php_hash_uint32)(0xCA62C1D6); \
+ (e) += I ((b), (c), (d)) + (w) + (uint32_t)(0xCA62C1D6); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
@@ -219,10 +219,10 @@ PHP_HASH_API void PHP_SHA1Init(PHP_SHA1_CTX * context)
/* {{{ SHA1Transform
* SHA1 basic transformation. Transforms state based on block.
*/
-static void SHA1Transform(php_hash_uint32 state[5], const unsigned char block[64])
+static void SHA1Transform(uint32_t state[5], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2];
- php_hash_uint32 d = state[3], e = state[4], x[16], tmp;
+ uint32_t a = state[0], b = state[1], c = state[2];
+ uint32_t d = state[3], e = state[4], x[16], tmp;
SHADecode32(x, block, 64);
@@ -339,10 +339,10 @@ PHP_HASH_API void PHP_SHA1Update(PHP_SHA1_CTX * context, const unsigned char *in
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3))
- < ((php_hash_uint32) inputLen << 3))
+ if ((context->count[0] += ((uint32_t) inputLen << 3))
+ < ((uint32_t) inputLen << 3))
context->count[1]++;
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -445,7 +445,7 @@ const php_hash_ops php_hash_sha224_ops = {
/* OM1 */
#define SHA256_F5(x) (ROTR32(17,(x)) ^ ROTR32(19,(x)) ^ SHR(10,(x)))
-static const php_hash_uint32 SHA256_K[64] = {
+static const uint32_t SHA256_K[64] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
@@ -477,11 +477,11 @@ PHP_HASH_API void PHP_SHA256Init(PHP_SHA256_CTX * context)
/* {{{ SHA256Transform
* SHA256 basic transformation. Transforms state based on block.
*/
-static void SHA256Transform(php_hash_uint32 state[8], const unsigned char block[64])
+static void SHA256Transform(uint32_t state[8], const unsigned char block[64])
{
- php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3];
- php_hash_uint32 e = state[4], f = state[5], g = state[6], h = state[7];
- php_hash_uint32 x[16], T1, T2, W[64];
+ uint32_t a = state[0], b = state[1], c = state[2], d = state[3];
+ uint32_t e = state[4], f = state[5], g = state[6], h = state[7];
+ uint32_t x[16], T1, T2, W[64];
int i;
SHADecode32(x, block, 64);
@@ -547,10 +547,10 @@ PHP_HASH_API void PHP_SHA224Update(PHP_SHA224_CTX * context, const unsigned char
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -624,10 +624,10 @@ PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX * context, const unsigned char
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) {
+ if ((context->count[0] += ((uint32_t) inputLen << 3)) < ((uint32_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -703,7 +703,7 @@ PHP_HASH_API void PHP_SHA256Final(unsigned char digest[32], PHP_SHA256_CTX * con
/* OM1 */
#define SHA512_F5(x) (ROTR64(19, x) ^ ROTR64(61, x) ^ SHR(6, x))
-static const php_hash_uint64 SHA512_K[128] = {
+static const uint64_t SHA512_K[128] = {
L64(0x428a2f98d728ae22), L64(0x7137449123ef65cd), L64(0xb5c0fbcfec4d3b2f), L64(0xe9b5dba58189dbbc),
L64(0x3956c25bf348b538), L64(0x59f111f1b605d019), L64(0x923f82a4af194f9b), L64(0xab1c5ed5da6d8118),
L64(0xd807aa98a3030242), L64(0x12835b0145706fbe), L64(0x243185be4ee4b28c), L64(0x550c7dc3d5ffb4e2),
@@ -726,10 +726,10 @@ static const php_hash_uint64 SHA512_K[128] = {
L64(0x4cc5d4becb3e42b6), L64(0x597f299cfc657e2a), L64(0x5fcb6fab3ad6faec), L64(0x6c44198c4a475817) };
/* {{{ SHAEncode64
- Encodes input (php_hash_uint64) into output (unsigned char). Assumes len is
+ Encodes input (uint64_t) into output (unsigned char). Assumes len is
a multiple of 8.
*/
-static void SHAEncode64(unsigned char *output, php_hash_uint64 *input, unsigned int len)
+static void SHAEncode64(unsigned char *output, uint64_t *input, unsigned int len)
{
unsigned int i, j;
@@ -748,19 +748,19 @@ static void SHAEncode64(unsigned char *output, php_hash_uint64 *input, unsigned
/* {{{ SHADecode64
- Decodes input (unsigned char) into output (php_hash_uint64). Assumes len is
+ Decodes input (unsigned char) into output (uint64_t). Assumes len is
a multiple of 8.
*/
-static void SHADecode64(php_hash_uint64 *output, const unsigned char *input, unsigned int len)
+static void SHADecode64(uint64_t *output, const unsigned char *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 8)
output[i] =
- ((php_hash_uint64) input[j + 7]) | (((php_hash_uint64) input[j + 6]) << 8) |
- (((php_hash_uint64) input[j + 5]) << 16) | (((php_hash_uint64) input[j + 4]) << 24) |
- (((php_hash_uint64) input[j + 3]) << 32) | (((php_hash_uint64) input[j + 2]) << 40) |
- (((php_hash_uint64) input[j + 1]) << 48) | (((php_hash_uint64) input[j]) << 56);
+ ((uint64_t) input[j + 7]) | (((uint64_t) input[j + 6]) << 8) |
+ (((uint64_t) input[j + 5]) << 16) | (((uint64_t) input[j + 4]) << 24) |
+ (((uint64_t) input[j + 3]) << 32) | (((uint64_t) input[j + 2]) << 40) |
+ (((uint64_t) input[j + 1]) << 48) | (((uint64_t) input[j]) << 56);
}
/* }}} */
@@ -787,11 +787,11 @@ PHP_HASH_API void PHP_SHA384Init(PHP_SHA384_CTX * context)
* SHA512 basic transformation. Transforms state based on block.
* SHA384 uses the exact same algorithm
*/
-static void SHA512Transform(php_hash_uint64 state[8], const unsigned char block[128])
+static void SHA512Transform(uint64_t state[8], const unsigned char block[128])
{
- php_hash_uint64 a = state[0], b = state[1], c = state[2], d = state[3];
- php_hash_uint64 e = state[4], f = state[5], g = state[6], h = state[7];
- php_hash_uint64 x[16], T1, T2, W[80];
+ uint64_t a = state[0], b = state[1], c = state[2], d = state[3];
+ uint64_t e = state[4], f = state[5], g = state[6], h = state[7];
+ uint64_t x[16], T1, T2, W[80];
int i;
SHADecode64(x, block, 128);
@@ -838,10 +838,10 @@ PHP_HASH_API void PHP_SHA384Update(PHP_SHA384_CTX * context, const unsigned char
index = (unsigned int) ((context->count[0] >> 3) & 0x7F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint64) inputLen << 3)) < ((php_hash_uint64) inputLen << 3)) {
+ if ((context->count[0] += ((uint64_t) inputLen << 3)) < ((uint64_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint64) inputLen >> 61);
+ context->count[1] += ((uint64_t) inputLen >> 61);
partLen = 128 - index;
@@ -939,6 +939,42 @@ PHP_HASH_API void PHP_SHA512Init(PHP_SHA512_CTX * context)
}
/* }}} */
+/* {{{ PHP_SHA512_256Init
+ * SHA512/245 initialization. Identical algorithm to SHA512, using alternate initval and truncation
+ */
+PHP_HASH_API void PHP_SHA512_256Init(PHP_SHA512_CTX * context)
+{
+ context->count[0] = context->count[1] = 0;
+
+ context->state[0] = L64(0x22312194FC2BF72C);
+ context->state[1] = L64(0x9F555FA3C84C64C2);
+ context->state[2] = L64(0x2393B86B6F53B151);
+ context->state[3] = L64(0x963877195940EABD);
+ context->state[4] = L64(0x96283EE2A88EFFE3);
+ context->state[5] = L64(0xBE5E1E2553863992);
+ context->state[6] = L64(0x2B0199FC2C85B8AA);
+ context->state[7] = L64(0x0EB72DDC81C52CA2);
+}
+/* }}} */
+
+/* {{{ PHP_SHA512_224Init
+ * SHA512/224 initialization. Identical algorithm to SHA512, using alternate initval and truncation
+ */
+PHP_HASH_API void PHP_SHA512_224Init(PHP_SHA512_CTX * context)
+{
+ context->count[0] = context->count[1] = 0;
+
+ context->state[0] = L64(0x8C3D37C819544DA2);
+ context->state[1] = L64(0x73E1996689DCD4D6);
+ context->state[2] = L64(0x1DFAB7AE32FF9C82);
+ context->state[3] = L64(0x679DD514582F9FCF);
+ context->state[4] = L64(0x0F6D2B697BD44DA8);
+ context->state[5] = L64(0x77E36F7304C48942);
+ context->state[6] = L64(0x3F9D85A86A1D36C8);
+ context->state[7] = L64(0x1112E6AD91D692A1);
+}
+/* }}} */
+
/* {{{ PHP_SHA512Update
SHA512 block update operation. Continues an SHA512 message-digest
operation, processing another message block, and updating the
@@ -952,10 +988,10 @@ PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX * context, const unsigned char
index = (unsigned int) ((context->count[0] >> 3) & 0x7F);
/* Update number of bits */
- if ((context->count[0] += ((php_hash_uint64) inputLen << 3)) < ((php_hash_uint64) inputLen << 3)) {
+ if ((context->count[0] += ((uint64_t) inputLen << 3)) < ((uint64_t) inputLen << 3)) {
context->count[1]++;
}
- context->count[1] += ((php_hash_uint64) inputLen >> 61);
+ context->count[1] += ((uint64_t) inputLen >> 61);
partLen = 128 - index;
@@ -1024,6 +1060,28 @@ PHP_HASH_API void PHP_SHA512Final(unsigned char digest[64], PHP_SHA512_CTX * con
}
/* }}} */
+/* {{{ PHP_SHA512_256Final
+ SHA512/256 finalization. Identical to SHA512Final, but with truncation
+ */
+PHP_HASH_API void PHP_SHA512_256Final(unsigned char digest[32], PHP_SHA512_CTX * context)
+{
+ unsigned char full_digest[64];
+ PHP_SHA512Final(full_digest, context);
+ memcpy(digest, full_digest, 32);
+}
+/* }}} */
+
+/* {{{ PHP_SHA512_224Final
+ SHA512/224 finalization. Identical to SHA512Final, but with truncation
+ */
+PHP_HASH_API void PHP_SHA512_224Final(unsigned char digest[28], PHP_SHA512_CTX * context)
+{
+ unsigned char full_digest[64];
+ PHP_SHA512Final(full_digest, context);
+ memcpy(digest, full_digest, 28);
+}
+/* }}} */
+
const php_hash_ops php_hash_sha512_ops = {
(php_hash_init_func_t) PHP_SHA512Init,
(php_hash_update_func_t) PHP_SHA512Update,
@@ -1034,6 +1092,26 @@ const php_hash_ops php_hash_sha512_ops = {
sizeof(PHP_SHA512_CTX)
};
+const php_hash_ops php_hash_sha512_256_ops = {
+ (php_hash_init_func_t) PHP_SHA512_256Init,
+ (php_hash_update_func_t) PHP_SHA512_256Update,
+ (php_hash_final_func_t) PHP_SHA512_256Final,
+ (php_hash_copy_func_t) php_hash_copy,
+ 32,
+ 128,
+ sizeof(PHP_SHA512_CTX)
+};
+
+const php_hash_ops php_hash_sha512_224_ops = {
+ (php_hash_init_func_t) PHP_SHA512_224Init,
+ (php_hash_update_func_t) PHP_SHA512_224Update,
+ (php_hash_final_func_t) PHP_SHA512_224Final,
+ (php_hash_copy_func_t) php_hash_copy,
+ 28,
+ 128,
+ sizeof(PHP_SHA512_CTX)
+};
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/hash/hash_sha3.c b/ext/hash/hash_sha3.c
new file mode 100644
index 0000000000..aab17c1476
--- /dev/null
+++ b/ext/hash/hash_sha3.c
@@ -0,0 +1,238 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Sara Golemon <pollita@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php_hash_sha3.h"
+
+#if (defined(__APPLE__) || defined(__APPLE_CC__)) && \
+ (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
+# if defined(__LITTLE_ENDIAN__)
+# undef WORDS_BIGENDIAN
+# else
+# if defined(__BIG_ENDIAN__)
+# define WORDS_BIGENDIAN
+# endif
+# endif
+#endif
+
+static inline uint64_t rol64(uint64_t v, unsigned char b) {
+ return (v << b) | (v >> (64 - b));
+}
+static inline unsigned char idx(unsigned char x, unsigned char y) {
+ return x + (5 * y);
+}
+
+#ifdef WORDS_BIGENDIAN
+static inline uint64_t load64(const unsigned char* x) {
+ unsigned char i;
+ uint64_t ret = 0;
+ for (i = 7; i >= 0; --i) {
+ ret <<= 8;
+ ret |= x[i];
+ }
+ return ret;
+}
+static inline void store64(unsigned char* x, uint64_t val) {
+ unsigned char i;
+ for (i = 0; i < 8; ++i) {
+ x[i] = val & 0xFF;
+ val >>= 8;
+ }
+}
+static inline void xor64(unsigned char* x, uint64_t val) {
+ unsigned char i;
+ for (i = 0; i < 8; ++i) {
+ x[i] ^= val & 0xFF;
+ val >>= 8;
+ }
+}
+# define readLane(x, y) load64(ctx->state+sizeof(uint64_t)*idx(x, y))
+# define writeLane(x, y, v) store64(ctx->state+sizeof(uint64_t)*idx(x, y), v)
+# define XORLane(x, y, v) xor64(ctx->state+sizeof(uint64_t)*idx(x, y), v)
+#else
+# define readLane(x, y) (((uint64_t*)ctx->state)[idx(x,y)])
+# define writeLane(x, y, v) (((uint64_t*)ctx->state)[idx(x,y)] = v)
+# define XORLane(x, y, v) (((uint64_t*)ctx->state)[idx(x,y)] ^= v)
+#endif
+
+static inline char LFSR86540(unsigned char* pLFSR)
+{
+ unsigned char LFSR = *pLFSR;
+ char result = LFSR & 0x01;
+ if (LFSR & 0x80) {
+ // Primitive polynomial over GF(2): x^8+x^6+x^5+x^4+1
+ LFSR = (LFSR << 1) ^ 0x71;
+ } else {
+ LFSR <<= 1;
+ }
+ *pLFSR = LFSR;
+ return result;
+}
+
+static void permute(PHP_SHA3_CTX* ctx) {
+ unsigned char LFSRstate = 0x01;
+ unsigned char round;
+
+ for (round = 0; round < 24; ++round) {
+ { // Theta step (see [Keccak Reference, Section 2.3.2])
+ uint64_t C[5], D;
+ unsigned char x, y;
+ for (x = 0; x < 5; ++x) {
+ C[x] = readLane(x, 0) ^ readLane(x, 1) ^
+ readLane(x, 2) ^ readLane(x, 3) ^ readLane(x, 4);
+ }
+ for (x = 0; x < 5; ++x) {
+ D = C[(x+4)%5] ^ rol64(C[(x+1)%5], 1);
+ for (y = 0; y < 5; ++y) {
+ XORLane(x, y, D);
+ }
+ }
+ }
+
+ { // p and Pi steps (see [Keccak Reference, Sections 2.3.3 and 2.3.4])
+ unsigned char x = 1, y = 0, t;
+ uint64_t current = readLane(x, y);
+ for (t = 0; t < 24; ++t) {
+ unsigned char r = ((t + 1) * (t + 2) / 2) % 64;
+ unsigned char Y = (2*x + 3*y) % 5;
+ uint64_t temp;
+ x = y;
+ y = Y;
+ temp = readLane(x, y);
+ writeLane(x, y, rol64(current, r));
+ current = temp;
+ }
+ }
+
+ { // X step (see [Keccak Reference, Section 2.3.1])
+ unsigned char x, y;
+ for (y = 0; y < 5; ++y) {
+ uint64_t temp[5];
+ for (x = 0; x < 5; ++x) {
+ temp[x] = readLane(x, y);
+ }
+ for (x = 0; x < 5; ++x) {
+ writeLane(x, y, temp[x] ^((~temp[(x+1)%5]) & temp[(x+2)%5]));
+ }
+ }
+ }
+
+ { // i step (see [Keccak Reference, Section 2.3.5])
+ unsigned char j;
+ for (j = 0; j < 7; ++j) {
+ if (LFSR86540(&LFSRstate)) {
+ uint64_t bitPos = (1<<j) - 1;
+ XORLane(0, 0, (uint64_t)1 << bitPos);
+ }
+ }
+ }
+ }
+}
+
+// ==========================================================================
+
+static void PHP_SHA3_Init(PHP_SHA3_CTX* ctx,
+ int bits) {
+ memset(ctx, 0, sizeof(PHP_SHA3_CTX));
+}
+
+static void PHP_SHA3_Update(PHP_SHA3_CTX* ctx,
+ const unsigned char* buf,
+ unsigned int count,
+ int block_size) {
+ while (count > 0) {
+ int len = block_size - ctx->pos;
+ if (len > count) len = count;
+ count -= len;
+ while (len-- > 0) {
+ ctx->state[ctx->pos++] ^= *(buf++);
+ }
+ if (ctx->pos >= block_size) {
+ permute(ctx);
+ ctx->pos = 0;
+ }
+ }
+}
+
+static void PHP_SHA3_Final(unsigned char* digest,
+ PHP_SHA3_CTX* ctx,
+ int block_size,
+ int digest_size) {
+ int len = digest_size;
+
+ // Pad state to finalize
+ ctx->state[ctx->pos++] ^= 0x06;
+ ctx->state[block_size-1] ^= 0x80;
+ permute(ctx);
+
+ // Square output for digest
+ for(;;) {
+ int bs = (len < block_size) ? len : block_size;
+ memcpy(digest, ctx->state, bs);
+ digest += bs;
+ len -= bs;
+ if (!len) break;
+ permute(ctx);
+ }
+
+ // Zero out context
+ memset(ctx, 0, sizeof(PHP_SHA3_CTX));
+}
+
+// ==========================================================================
+
+#define DECLARE_SHA3_OPS(bits) \
+void PHP_SHA3##bits##Init(PHP_SHA3_##bits##_CTX* ctx) { \
+ PHP_SHA3_Init(ctx, bits); \
+} \
+void PHP_SHA3##bits##Update(PHP_SHA3_##bits##_CTX* ctx, \
+ const unsigned char* input, \
+ unsigned int inputLen) { \
+ PHP_SHA3_Update(ctx, input, inputLen, \
+ (1600 - (2 * bits)) >> 3); \
+} \
+void PHP_SHA3##bits##Final(unsigned char* digest, \
+ PHP_SHA3_##bits##_CTX* ctx) { \
+ PHP_SHA3_Final(digest, ctx, \
+ (1600 - (2 * bits)) >> 3, \
+ bits >> 3); \
+} \
+const php_hash_ops php_hash_sha3_##bits##_ops = { \
+ (php_hash_init_func_t) PHP_SHA3##bits##Init, \
+ (php_hash_update_func_t) PHP_SHA3##bits##Update, \
+ (php_hash_final_func_t) PHP_SHA3##bits##Final, \
+ php_hash_copy, \
+ bits >> 3, \
+ (1600 - (2 * bits)) >> 3, \
+ sizeof(PHP_SHA3_##bits##_CTX) \
+}
+
+DECLARE_SHA3_OPS(224);
+DECLARE_SHA3_OPS(256);
+DECLARE_SHA3_OPS(384);
+DECLARE_SHA3_OPS(512);
+
+#undef DECLARE_SHA3_OPS
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c
index 5382da9280..c7251b0bb1 100644
--- a/ext/hash/hash_snefru.c
+++ b/ext/hash/hash_snefru.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@
#endif
#if DBG_SNEFRU
-void ph(php_hash_uint32 h[16])
+void ph(uint32_t h[16])
{
int i;
for (i = 0; i < 16; i++)
@@ -41,12 +41,12 @@ void ph(php_hash_uint32 h[16])
}
#endif
-static inline void Snefru(php_hash_uint32 input[16])
+static inline void Snefru(uint32_t input[16])
{
static int shifts[4] = {16, 8, 16, 24};
int b, index, rshift, lshift;
- const php_hash_uint32 *t0,*t1;
- php_hash_uint32 SBE,B00,B01,B02,B03,B04,B05,B06,B07,B08,B09,B10,B11,B12,B13,B14,B15;
+ const uint32_t *t0,*t1;
+ uint32_t SBE,B00,B01,B02,B03,B04,B05,B06,B07,B08,B09,B10,B11,B12,B13,B14,B15;
B00 = input[0];
B01 = input[1];
@@ -129,7 +129,7 @@ static inline void SnefruTransform(PHP_SNEFRU_CTX *context, const unsigned char
((input[i+2] & 0xff) << 8) | (input[i+3] & 0xff);
}
Snefru(context->state);
- memset(&context->state[8], 0, sizeof(php_hash_uint32) * 8);
+ memset(&context->state[8], 0, sizeof(uint32_t) * 8);
}
PHP_HASH_API void PHP_SNEFRUInit(PHP_SNEFRU_CTX *context)
@@ -137,7 +137,7 @@ PHP_HASH_API void PHP_SNEFRUInit(PHP_SNEFRU_CTX *context)
memset(context, 0, sizeof(*context));
}
-static const php_hash_uint32 MAX32 = 0xffffffffLU;
+static const uint32_t MAX32 = 0xffffffffLU;
PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *context, const unsigned char *input, size_t len)
{
@@ -173,7 +173,7 @@ PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *context, const unsigned char
PHP_HASH_API void PHP_SNEFRUFinal(unsigned char digest[32], PHP_SNEFRU_CTX *context)
{
- php_hash_uint32 i, j;
+ uint32_t i, j;
if (context->length) {
SnefruTransform(context, context->buffer);
diff --git a/ext/hash/hash_tiger.c b/ext/hash/hash_tiger.c
index 3ba85d34a3..61244de773 100644
--- a/ext/hash/hash_tiger.c
+++ b/ext/hash/hash_tiger.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,13 +42,13 @@
#define round(a,b,c,x,mul) \
c ^= x; \
a -= t1[(unsigned char)(c)] ^ \
- t2[(unsigned char)(((php_hash_uint32)(c))>>(2*8))] ^ \
+ t2[(unsigned char)(((uint32_t)(c))>>(2*8))] ^ \
t3[(unsigned char)((c)>>(4*8))] ^ \
- t4[(unsigned char)(((php_hash_uint32)((c)>>(4*8)))>>(2*8))] ; \
- b += t4[(unsigned char)(((php_hash_uint32)(c))>>(1*8))] ^ \
- t3[(unsigned char)(((php_hash_uint32)(c))>>(3*8))] ^ \
- t2[(unsigned char)(((php_hash_uint32)((c)>>(4*8)))>>(1*8))] ^ \
- t1[(unsigned char)(((php_hash_uint32)((c)>>(4*8)))>>(3*8))]; \
+ t4[(unsigned char)(((uint32_t)((c)>>(4*8)))>>(2*8))] ; \
+ b += t4[(unsigned char)(((uint32_t)(c))>>(1*8))] ^ \
+ t3[(unsigned char)(((uint32_t)(c))>>(3*8))] ^ \
+ t2[(unsigned char)(((uint32_t)((c)>>(4*8)))>>(1*8))] ^ \
+ t1[(unsigned char)(((uint32_t)((c)>>(4*8)))>>(3*8))]; \
b *= mul;
#define pass(a,b,c,mul) \
@@ -105,7 +105,7 @@
# define split(str) \
{ \
int i; \
- php_hash_uint64 tmp[8]; \
+ uint64_t tmp[8]; \
\
for (i = 0; i < 64; ++i) { \
((unsigned char *) tmp)[i^7] = ((unsigned char *) str)[i]; \
@@ -118,8 +118,8 @@
#define tiger_compress(passes, str, state) \
{ \
- register php_hash_uint64 a, b, c, tmpa, x0, x1, x2, x3, x4, x5, x6, x7; \
- php_hash_uint64 aa, bb, cc; \
+ register uint64_t a, b, c, tmpa, x0, x1, x2, x3, x4, x5, x6, x7; \
+ uint64_t aa, bb, cc; \
unsigned int pass_no; \
\
a = state[0]; \
@@ -138,7 +138,7 @@
static inline void TigerFinalize(PHP_TIGER_CTX *context)
{
- context->passed += (php_hash_uint64) context->length << 3;
+ context->passed += (uint64_t) context->length << 3;
context->buffer[context->length++] = 0x1;
if (context->length % 8) {
@@ -148,14 +148,14 @@ static inline void TigerFinalize(PHP_TIGER_CTX *context)
if (context->length > 56) {
memset(&context->buffer[context->length], 0, 64 - context->length);
- tiger_compress(context->passes, ((php_hash_uint64 *) context->buffer), context->state);
+ tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state);
memset(context->buffer, 0, 56);
} else {
memset(&context->buffer[context->length], 0, 56 - context->length);
}
#ifndef WORDS_BIGENDIAN
- memcpy(&context->buffer[56], &context->passed, sizeof(php_hash_uint64));
+ memcpy(&context->buffer[56], &context->passed, sizeof(uint64_t));
#else
context->buffer[56] = (unsigned char) (context->passed & 0xff);
context->buffer[57] = (unsigned char) ((context->passed >> 8) & 0xff);
@@ -166,7 +166,7 @@ static inline void TigerFinalize(PHP_TIGER_CTX *context)
context->buffer[62] = (unsigned char) ((context->passed >> 48) & 0xff);
context->buffer[63] = (unsigned char) ((context->passed >> 56) & 0xff);
#endif
- tiger_compress(context->passes, ((php_hash_uint64 *) context->buffer), context->state);
+ tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state);
}
static inline void TigerDigest(unsigned char *digest_str, unsigned int digest_len, PHP_TIGER_CTX *context)
@@ -206,14 +206,14 @@ PHP_HASH_API void PHP_TIGERUpdate(PHP_TIGER_CTX *context, const unsigned char *i
if (context->length) {
i = 64 - context->length;
memcpy(&context->buffer[context->length], input, i);
- tiger_compress(context->passes, ((const php_hash_uint64 *) context->buffer), context->state);
+ tiger_compress(context->passes, ((const uint64_t *) context->buffer), context->state);
ZEND_SECURE_ZERO(context->buffer, 64);
context->passed += 512;
}
for (; i + 64 <= len; i += 64) {
memcpy(context->buffer, &input[i], 64);
- tiger_compress(context->passes, ((const php_hash_uint64 *) context->buffer), context->state);
+ tiger_compress(context->passes, ((const uint64_t *) context->buffer), context->state);
context->passed += 512;
}
ZEND_SECURE_ZERO(&context->buffer[r], 64-r);
diff --git a/ext/hash/hash_whirlpool.c b/ext/hash/hash_whirlpool.c
index 9c603d9233..e856ffab0c 100644
--- a/ext/hash/hash_whirlpool.c
+++ b/ext/hash/hash_whirlpool.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -41,10 +41,10 @@
static void WhirlpoolTransform(PHP_WHIRLPOOL_CTX *context)
{
int i, r;
- php_hash_uint64 K[8]; /* the round key */
- php_hash_uint64 block[8]; /* mu(buffer) */
- php_hash_uint64 state[8]; /* the cipher state */
- php_hash_uint64 L[8];
+ uint64_t K[8]; /* the round key */
+ uint64_t block[8]; /* mu(buffer) */
+ uint64_t state[8]; /* the cipher state */
+ uint64_t L[8];
unsigned char *buffer = context->buffer.data;
/*
@@ -52,14 +52,14 @@ static void WhirlpoolTransform(PHP_WHIRLPOOL_CTX *context)
*/
for (i = 0; i < 8; i++, buffer += 8) {
block[i] =
- (((php_hash_uint64)buffer[0] ) << 56) ^
- (((php_hash_uint64)buffer[1] & 0xffL) << 48) ^
- (((php_hash_uint64)buffer[2] & 0xffL) << 40) ^
- (((php_hash_uint64)buffer[3] & 0xffL) << 32) ^
- (((php_hash_uint64)buffer[4] & 0xffL) << 24) ^
- (((php_hash_uint64)buffer[5] & 0xffL) << 16) ^
- (((php_hash_uint64)buffer[6] & 0xffL) << 8) ^
- (((php_hash_uint64)buffer[7] & 0xffL) );
+ (((uint64_t)buffer[0] ) << 56) ^
+ (((uint64_t)buffer[1] & 0xffL) << 48) ^
+ (((uint64_t)buffer[2] & 0xffL) << 40) ^
+ (((uint64_t)buffer[3] & 0xffL) << 32) ^
+ (((uint64_t)buffer[4] & 0xffL) << 24) ^
+ (((uint64_t)buffer[5] & 0xffL) << 16) ^
+ (((uint64_t)buffer[6] & 0xffL) << 8) ^
+ (((uint64_t)buffer[7] & 0xffL) );
}
/*
* compute and apply K^0 to the cipher state:
@@ -274,7 +274,7 @@ PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *context)
PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *context, const unsigned char *input, size_t len)
{
- php_hash_uint64 sourceBits = len * 8;
+ uint64_t sourceBits = len * 8;
int sourcePos = 0; /* index of leftmost source unsigned char containing data (1 to 8 bits). */
int sourceGap = (8 - ((int)sourceBits & 7)) & 7; /* space on source[sourcePos]. */
int bufferRem = context->buffer.bits & 7; /* occupied bits on buffer[bufferPos]. */
@@ -283,15 +283,15 @@ PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *context, const unsigned
unsigned char *bitLength = context->bitlength;
int bufferBits = context->buffer.bits;
int bufferPos = context->buffer.pos;
- php_hash_uint32 b, carry;
+ uint32_t b, carry;
int i;
/*
* tally the length of the added data:
*/
- php_hash_uint64 value = sourceBits;
+ uint64_t value = sourceBits;
for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != L64(0)); i--) {
- carry += bitLength[i] + ((php_hash_uint32)value & 0xff);
+ carry += bitLength[i] + ((uint32_t)value & 0xff);
bitLength[i] = (unsigned char)carry;
carry >>= 8;
value >>= 8;
diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h
index c8104710ba..7ec4dfb6c3 100644
--- a/ext/hash/php_hash.h
+++ b/ext/hash/php_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,10 +31,6 @@
#define PHP_HASH_HMAC 0x0001
#define L64 INT64_C
-#define php_hash_int32 int32_t
-#define php_hash_uint32 uint32_t
-#define php_hash_int64 int64_t
-#define php_hash_uint64 uint64_t
typedef void (*php_hash_init_func_t)(void *context);
typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, unsigned int count);
@@ -68,6 +64,12 @@ extern const php_hash_ops php_hash_sha224_ops;
extern const php_hash_ops php_hash_sha256_ops;
extern const php_hash_ops php_hash_sha384_ops;
extern const php_hash_ops php_hash_sha512_ops;
+extern const php_hash_ops php_hash_sha512_256_ops;
+extern const php_hash_ops php_hash_sha512_224_ops;
+extern const php_hash_ops php_hash_sha3_224_ops;
+extern const php_hash_ops php_hash_sha3_256_ops;
+extern const php_hash_ops php_hash_sha3_384_ops;
+extern const php_hash_ops php_hash_sha3_512_ops;
extern const php_hash_ops php_hash_ripemd128_ops;
extern const php_hash_ops php_hash_ripemd160_ops;
extern const php_hash_ops php_hash_ripemd256_ops;
diff --git a/ext/hash/php_hash_adler32.h b/ext/hash/php_hash_adler32.h
index f6a2fa9b3f..dc2dfed9f5 100644
--- a/ext/hash/php_hash_adler32.h
+++ b/ext/hash/php_hash_adler32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,7 @@
#include "ext/standard/basic_functions.h"
typedef struct {
- php_hash_uint32 state;
+ uint32_t state;
} PHP_ADLER32_CTX;
PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context);
diff --git a/ext/hash/php_hash_crc32.h b/ext/hash/php_hash_crc32.h
index 9d03e6df61..377be020cb 100644
--- a/ext/hash/php_hash_crc32.h
+++ b/ext/hash/php_hash_crc32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,7 @@
#include "ext/standard/basic_functions.h"
typedef struct {
- php_hash_uint32 state;
+ uint32_t state;
} PHP_CRC32_CTX;
PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context);
diff --git a/ext/hash/php_hash_crc32_tables.h b/ext/hash/php_hash_crc32_tables.h
index 3132fe3d4b..6af878b3ac 100644
--- a/ext/hash/php_hash_crc32_tables.h
+++ b/ext/hash/php_hash_crc32_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
/* $Id$ */
-static const php_hash_uint32 crc32_table[] = { 0x0,
+static const uint32_t crc32_table[] = { 0x0,
0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
@@ -72,7 +72,7 @@ static const php_hash_uint32 crc32_table[] = { 0x0,
0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
};
-static const php_hash_uint32 crc32b_table[] = {
+static const uint32_t crc32b_table[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
diff --git a/ext/hash/php_hash_fnv.h b/ext/hash/php_hash_fnv.h
index 22af4df046..f825ba8849 100644
--- a/ext/hash/php_hash_fnv.h
+++ b/ext/hash/php_hash_fnv.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,15 +21,15 @@
#ifndef PHP_HASH_FNV_H
#define PHP_HASH_FNV_H
-#define PHP_FNV1_32_INIT ((php_hash_uint32)0x811c9dc5)
+#define PHP_FNV1_32_INIT ((uint32_t)0x811c9dc5)
#define PHP_FNV1_32A_INIT PHP_FNV1_32_INIT
-#define PHP_FNV_32_PRIME ((php_hash_uint32)0x01000193)
+#define PHP_FNV_32_PRIME ((uint32_t)0x01000193)
-#define PHP_FNV1_64_INIT ((php_hash_uint64)0xcbf29ce484222325ULL)
+#define PHP_FNV1_64_INIT ((uint64_t)0xcbf29ce484222325ULL)
#define PHP_FNV1A_64_INIT FNV1_64_INIT
-#define PHP_FNV_64_PRIME ((php_hash_uint64)0x100000001b3ULL)
+#define PHP_FNV_64_PRIME ((uint64_t)0x100000001b3ULL)
/*
@@ -46,11 +46,11 @@ enum php_fnv_type {
};
typedef struct {
- php_hash_uint32 state;
+ uint32_t state;
} PHP_FNV132_CTX;
typedef struct {
- php_hash_uint64 state;
+ uint64_t state;
} PHP_FNV164_CTX;
@@ -64,8 +64,8 @@ PHP_HASH_API void PHP_FNV164Update(PHP_FNV164_CTX *context, const unsigned char
PHP_HASH_API void PHP_FNV1a64Update(PHP_FNV164_CTX *context, const unsigned char *input, unsigned int inputLen);
PHP_HASH_API void PHP_FNV164Final(unsigned char digest[16], PHP_FNV164_CTX * context);
-static php_hash_uint32 fnv_32_buf(void *buf, size_t len, php_hash_uint32 hval, int alternate);
-static php_hash_uint64 fnv_64_buf(void *buf, size_t len, php_hash_uint64 hval, int alternate);
+static uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate);
+static uint64_t fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate);
#endif
diff --git a/ext/hash/php_hash_gost.h b/ext/hash/php_hash_gost.h
index 758fca4e3a..a3d4a18a4c 100644
--- a/ext/hash/php_hash_gost.h
+++ b/ext/hash/php_hash_gost.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,11 +25,11 @@
/* GOST context */
typedef struct {
- php_hash_uint32 state[16];
- php_hash_uint32 count[2];
+ uint32_t state[16];
+ uint32_t count[2];
unsigned char length;
unsigned char buffer[32];
- const php_hash_uint32 (*tables)[4][256];
+ const uint32_t (*tables)[4][256];
} PHP_GOST_CTX;
PHP_HASH_API void PHP_GOSTInit(PHP_GOST_CTX *);
diff --git a/ext/hash/php_hash_gost_tables.h b/ext/hash/php_hash_gost_tables.h
index af6a78b10b..5a8f6e79fd 100644
--- a/ext/hash/php_hash_gost_tables.h
+++ b/ext/hash/php_hash_gost_tables.h
@@ -1,4 +1,4 @@
-static const php_hash_uint32 tables_test[4][256] = {
+static const uint32_t tables_test[4][256] = {
{ /* table 1 */
0x00072000LU, 0x00075000LU, 0x00074800LU, 0x00071000LU, 0x00076800LU, 0x00074000LU, 0x00070000LU, 0x00077000LU,
0x00073000LU, 0x00075800LU, 0x00070800LU, 0x00076000LU, 0x00073800LU, 0x00077800LU, 0x00072800LU, 0x00071800LU,
@@ -137,7 +137,7 @@ static const php_hash_uint32 tables_test[4][256] = {
},
};
-static const php_hash_uint32 tables_crypto[4][256] = {
+static const uint32_t tables_crypto[4][256] = {
{ /* table 1 */
0x0002d000LU, 0x0002a000LU, 0x0002a800LU, 0x0002b000LU, 0x0002c000LU, 0x00028800LU, 0x00029800LU, 0x0002b800LU,
0x0002e800LU, 0x0002e000LU, 0x0002f000LU, 0x00028000LU, 0x0002c800LU, 0x00029000LU, 0x0002d800LU, 0x0002f800LU,
diff --git a/ext/hash/php_hash_haval.h b/ext/hash/php_hash_haval.h
index e3757065d5..8877797bfd 100644
--- a/ext/hash/php_hash_haval.h
+++ b/ext/hash/php_hash_haval.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,13 +24,13 @@
#include "ext/standard/basic_functions.h"
/* HAVAL context. */
typedef struct {
- php_hash_uint32 state[8];
- php_hash_uint32 count[2];
+ uint32_t state[8];
+ uint32_t count[2];
unsigned char buffer[128];
char passes;
short output;
- void (*Transform)(php_hash_uint32 state[8], const unsigned char block[128]);
+ void (*Transform)(uint32_t state[8], const unsigned char block[128]);
} PHP_HAVAL_CTX;
#define PHP_HASH_HAVAL_INIT_DECL(p,b) PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *); \
diff --git a/ext/hash/php_hash_joaat.h b/ext/hash/php_hash_joaat.h
index c6390496f8..97a76daff9 100644
--- a/ext/hash/php_hash_joaat.h
+++ b/ext/hash/php_hash_joaat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,14 +22,14 @@
#define PHP_HASH_JOAAT_H
typedef struct {
- php_hash_uint32 state;
+ uint32_t state;
} PHP_JOAAT_CTX;
PHP_HASH_API void PHP_JOAATInit(PHP_JOAAT_CTX *context);
PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input, unsigned int inputLen);
PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[16], PHP_JOAAT_CTX * context);
-static php_hash_uint32 joaat_buf(void *buf, size_t len, php_hash_uint32 hval);
+static uint32_t joaat_buf(void *buf, size_t len, uint32_t hval);
#endif
diff --git a/ext/hash/php_hash_md.h b/ext/hash/php_hash_md.h
index fb29e97fbc..2e7121f37a 100644
--- a/ext/hash/php_hash_md.h
+++ b/ext/hash/php_hash_md.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -60,8 +60,8 @@
/* MD5 context. */
typedef struct {
- php_hash_uint32 state[4]; /* state (ABCD) */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ uint32_t state[4]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} PHP_MD5_CTX;
@@ -76,8 +76,8 @@ PHP_NAMED_FUNCTION(php_if_md5_file);
/* MD4 context */
typedef struct {
- php_hash_uint32 state[4];
- php_hash_uint32 count[2];
+ uint32_t state[4];
+ uint32_t count[2];
unsigned char buffer[64];
} PHP_MD4_CTX;
diff --git a/ext/hash/php_hash_ripemd.h b/ext/hash/php_hash_ripemd.h
index 3bc03690ab..ae29737756 100644
--- a/ext/hash/php_hash_ripemd.h
+++ b/ext/hash/php_hash_ripemd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,26 +24,26 @@
/* RIPEMD context. */
typedef struct {
- php_hash_uint32 state[4]; /* state (ABCD) */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ uint32_t state[4]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} PHP_RIPEMD128_CTX;
typedef struct {
- php_hash_uint32 state[5]; /* state (ABCD) */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ uint32_t state[5]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} PHP_RIPEMD160_CTX;
typedef struct {
- php_hash_uint32 state[8]; /* state (ABCD) */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ uint32_t state[8]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} PHP_RIPEMD256_CTX;
typedef struct {
- php_hash_uint32 state[10]; /* state (ABCD) */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ uint32_t state[10]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} PHP_RIPEMD320_CTX;
diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h
index a1c8054d83..98b33471b0 100644
--- a/ext/hash/php_hash_sha.h
+++ b/ext/hash/php_hash_sha.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -36,8 +36,8 @@
/* SHA1 context. */
typedef struct {
- php_hash_uint32 state[5]; /* state (ABCD) */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 */
+ uint32_t state[5]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 */
unsigned char buffer[64]; /* input buffer */
} PHP_SHA1_CTX;
@@ -52,8 +52,8 @@ PHP_FUNCTION(sha1_file);
/* SHA224 context. */
typedef struct {
- php_hash_uint32 state[8]; /* state */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 */
+ uint32_t state[8]; /* state */
+ uint32_t count[2]; /* number of bits, modulo 2^64 */
unsigned char buffer[64]; /* input buffer */
} PHP_SHA224_CTX;
@@ -63,8 +63,8 @@ PHP_HASH_API void PHP_SHA224Final(unsigned char[28], PHP_SHA224_CTX *);
/* SHA256 context. */
typedef struct {
- php_hash_uint32 state[8]; /* state */
- php_hash_uint32 count[2]; /* number of bits, modulo 2^64 */
+ uint32_t state[8]; /* state */
+ uint32_t count[2]; /* number of bits, modulo 2^64 */
unsigned char buffer[64]; /* input buffer */
} PHP_SHA256_CTX;
@@ -74,8 +74,8 @@ PHP_HASH_API void PHP_SHA256Final(unsigned char[32], PHP_SHA256_CTX *);
/* SHA384 context */
typedef struct {
- php_hash_uint64 state[8]; /* state */
- php_hash_uint64 count[2]; /* number of bits, modulo 2^128 */
+ uint64_t state[8]; /* state */
+ uint64_t count[2]; /* number of bits, modulo 2^128 */
unsigned char buffer[128]; /* input buffer */
} PHP_SHA384_CTX;
@@ -85,8 +85,8 @@ PHP_HASH_API void PHP_SHA384Final(unsigned char[48], PHP_SHA384_CTX *);
/* SHA512 context */
typedef struct {
- php_hash_uint64 state[8]; /* state */
- php_hash_uint64 count[2]; /* number of bits, modulo 2^128 */
+ uint64_t state[8]; /* state */
+ uint64_t count[2]; /* number of bits, modulo 2^128 */
unsigned char buffer[128]; /* input buffer */
} PHP_SHA512_CTX;
@@ -94,4 +94,12 @@ PHP_HASH_API void PHP_SHA512Init(PHP_SHA512_CTX *);
PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX *, const unsigned char *, unsigned int);
PHP_HASH_API void PHP_SHA512Final(unsigned char[64], PHP_SHA512_CTX *);
+PHP_HASH_API void PHP_SHA512_256Init(PHP_SHA512_CTX *);
+#define PHP_SHA512_256Update PHP_SHA512Update
+PHP_HASH_API void PHP_SHA512_256Final(unsigned char[32], PHP_SHA512_CTX *);
+
+PHP_HASH_API void PHP_SHA512_224Init(PHP_SHA512_CTX *);
+#define PHP_SHA512_224Update PHP_SHA512Update
+PHP_HASH_API void PHP_SHA512_224Final(unsigned char[28], PHP_SHA512_CTX *);
+
#endif /* PHP_HASH_SHA_H */
diff --git a/ext/hash/php_hash_sha3.h b/ext/hash/php_hash_sha3.h
new file mode 100644
index 0000000000..da7c5f46d7
--- /dev/null
+++ b/ext/hash/php_hash_sha3.h
@@ -0,0 +1,59 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Sara Golemon <pollita@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef PHP_HASH_SHA3_H
+#define PHP_HASH_SHA3_H
+
+#include "php.h"
+#include "ext/hash/php_hash.h"
+
+typedef struct {
+ unsigned char state[200]; // 5 * 5 * sizeof(uint64)
+ uint32_t pos;
+} PHP_SHA3_CTX;
+
+typedef PHP_SHA3_CTX PHP_SHA3_224_CTX;
+typedef PHP_SHA3_CTX PHP_SHA3_256_CTX;
+typedef PHP_SHA3_CTX PHP_SHA3_384_CTX;
+typedef PHP_SHA3_CTX PHP_SHA3_512_CTX;
+
+PHP_HASH_API void PHP_SHA3224Init(PHP_SHA3_224_CTX*);
+PHP_HASH_API void PHP_SHA3224Update(PHP_SHA3_224_CTX*, const unsigned char*, unsigned int);
+PHP_HASH_API void PHP_SAH3224Final(unsigned char[32], PHP_SHA3_224_CTX*);
+
+PHP_HASH_API void PHP_SHA3256Init(PHP_SHA3_256_CTX*);
+PHP_HASH_API void PHP_SHA3256Update(PHP_SHA3_256_CTX*, const unsigned char*, unsigned int);
+PHP_HASH_API void PHP_SAH3256Final(unsigned char[32], PHP_SHA3_256_CTX*);
+
+PHP_HASH_API void PHP_SHA3384Init(PHP_SHA3_384_CTX*);
+PHP_HASH_API void PHP_SHA3384Update(PHP_SHA3_384_CTX*, const unsigned char*, unsigned int);
+PHP_HASH_API void PHP_SAH3384Final(unsigned char[32], PHP_SHA3_384_CTX*);
+
+PHP_HASH_API void PHP_SHA3512Init(PHP_SHA3_512_CTX*);
+PHP_HASH_API void PHP_SHA3512Update(PHP_SHA3_512_CTX*, const unsigned char*, unsigned int);
+PHP_HASH_API void PHP_SAH3512Final(unsigned char[32], PHP_SHA3_512_CTX*);
+
+#endif
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
diff --git a/ext/hash/php_hash_snefru.h b/ext/hash/php_hash_snefru.h
index 8dc64fdcb5..64c88fbab1 100644
--- a/ext/hash/php_hash_snefru.h
+++ b/ext/hash/php_hash_snefru.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,8 +29,8 @@
/* SNEFRU context */
typedef struct {
- php_hash_uint32 state[16];
- php_hash_uint32 count[2];
+ uint32_t state[16];
+ uint32_t count[2];
unsigned char length;
unsigned char buffer[32];
} PHP_SNEFRU_CTX;
diff --git a/ext/hash/php_hash_snefru_tables.h b/ext/hash/php_hash_snefru_tables.h
index b1dd26f4a1..ffd1d29eb5 100644
--- a/ext/hash/php_hash_snefru_tables.h
+++ b/ext/hash/php_hash_snefru_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
/* $Id$ */
-static const php_hash_uint32 tables[16][256]= {
+static const uint32_t tables[16][256]= {
{ /* Start of S Box 0 */
diff --git a/ext/hash/php_hash_tiger.h b/ext/hash/php_hash_tiger.h
index db1b14b249..af52a95203 100644
--- a/ext/hash/php_hash_tiger.h
+++ b/ext/hash/php_hash_tiger.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,8 +23,8 @@
/* TIGER context */
typedef struct {
- php_hash_uint64 state[3];
- php_hash_uint64 passed;
+ uint64_t state[3];
+ uint64_t passed;
unsigned char buffer[64];
unsigned int passes:1;
unsigned int length:7;
diff --git a/ext/hash/php_hash_tiger_tables.h b/ext/hash/php_hash_tiger_tables.h
index 360e68f5f7..616213ae28 100644
--- a/ext/hash/php_hash_tiger_tables.h
+++ b/ext/hash/php_hash_tiger_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,7 @@
#define t3 (table+256*2)
#define t4 (table+256*3)
-static const php_hash_uint64 table[4*256] = {
+static const uint64_t table[4*256] = {
L64(0x02AAB17CF7E90C5E) /* 0 */, L64(0xAC424B03E243A8EC) /* 1 */,
L64(0x72CD5BE30DD5FCD3) /* 2 */, L64(0x6D019B93F6F97F3A) /* 3 */,
L64(0xCD9978FFD21F9193) /* 4 */, L64(0x7573A1C9708029E2) /* 5 */,
diff --git a/ext/hash/php_hash_whirlpool.h b/ext/hash/php_hash_whirlpool.h
index 5f8e89c0a6..dec337a390 100644
--- a/ext/hash/php_hash_whirlpool.h
+++ b/ext/hash/php_hash_whirlpool.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
/* WHIRLPOOL context */
typedef struct {
- php_hash_uint64 state[8];
+ uint64_t state[8];
unsigned char bitlength[32];
struct {
int pos;
diff --git a/ext/hash/php_hash_whirlpool_tables.h b/ext/hash/php_hash_whirlpool_tables.h
index 407eab2df1..286d180289 100644
--- a/ext/hash/php_hash_whirlpool_tables.h
+++ b/ext/hash/php_hash_whirlpool_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
#define R 10
-static const php_hash_uint64 rc[R + 1] = {
+static const uint64_t rc[R + 1] = {
L64(0x0000000000000000),
L64(0x1823c6e887b8014f),
L64(0x36a6d2f5796f9152),
@@ -37,7 +37,7 @@ static const php_hash_uint64 rc[R + 1] = {
L64(0xca2dbf07ad5a8333),
};
-static const php_hash_uint64 C0[256] = {
+static const uint64_t C0[256] = {
L64(0x18186018c07830d8), L64(0x23238c2305af4626), L64(0xc6c63fc67ef991b8), L64(0xe8e887e8136fcdfb),
L64(0x878726874ca113cb), L64(0xb8b8dab8a9626d11), L64(0x0101040108050209), L64(0x4f4f214f426e9e0d),
L64(0x3636d836adee6c9b), L64(0xa6a6a2a6590451ff), L64(0xd2d26fd2debdb90c), L64(0xf5f5f3f5fb06f70e),
@@ -104,7 +104,7 @@ static const php_hash_uint64 C0[256] = {
L64(0x2828a0285d885075), L64(0x5c5c6d5cda31b886), L64(0xf8f8c7f8933fed6b), L64(0x8686228644a411c2),
};
-static const php_hash_uint64 C1[256] = {
+static const uint64_t C1[256] = {
L64(0xd818186018c07830), L64(0x2623238c2305af46), L64(0xb8c6c63fc67ef991), L64(0xfbe8e887e8136fcd),
L64(0xcb878726874ca113), L64(0x11b8b8dab8a9626d), L64(0x0901010401080502), L64(0x0d4f4f214f426e9e),
L64(0x9b3636d836adee6c), L64(0xffa6a6a2a6590451), L64(0x0cd2d26fd2debdb9), L64(0x0ef5f5f3f5fb06f7),
@@ -171,7 +171,7 @@ static const php_hash_uint64 C1[256] = {
L64(0x752828a0285d8850), L64(0x865c5c6d5cda31b8), L64(0x6bf8f8c7f8933fed), L64(0xc28686228644a411),
};
-static const php_hash_uint64 C2[256] = {
+static const uint64_t C2[256] = {
L64(0x30d818186018c078), L64(0x462623238c2305af), L64(0x91b8c6c63fc67ef9), L64(0xcdfbe8e887e8136f),
L64(0x13cb878726874ca1), L64(0x6d11b8b8dab8a962), L64(0x0209010104010805), L64(0x9e0d4f4f214f426e),
L64(0x6c9b3636d836adee), L64(0x51ffa6a6a2a65904), L64(0xb90cd2d26fd2debd), L64(0xf70ef5f5f3f5fb06),
@@ -238,7 +238,7 @@ static const php_hash_uint64 C2[256] = {
L64(0x50752828a0285d88), L64(0xb8865c5c6d5cda31), L64(0xed6bf8f8c7f8933f), L64(0x11c28686228644a4),
};
-static const php_hash_uint64 C3[256] = {
+static const uint64_t C3[256] = {
L64(0x7830d818186018c0), L64(0xaf462623238c2305), L64(0xf991b8c6c63fc67e), L64(0x6fcdfbe8e887e813),
L64(0xa113cb878726874c), L64(0x626d11b8b8dab8a9), L64(0x0502090101040108), L64(0x6e9e0d4f4f214f42),
L64(0xee6c9b3636d836ad), L64(0x0451ffa6a6a2a659), L64(0xbdb90cd2d26fd2de), L64(0x06f70ef5f5f3f5fb),
@@ -305,7 +305,7 @@ static const php_hash_uint64 C3[256] = {
L64(0x8850752828a0285d), L64(0x31b8865c5c6d5cda), L64(0x3fed6bf8f8c7f893), L64(0xa411c28686228644),
};
-static const php_hash_uint64 C4[256] = {
+static const uint64_t C4[256] = {
L64(0xc07830d818186018), L64(0x05af462623238c23), L64(0x7ef991b8c6c63fc6), L64(0x136fcdfbe8e887e8),
L64(0x4ca113cb87872687), L64(0xa9626d11b8b8dab8), L64(0x0805020901010401), L64(0x426e9e0d4f4f214f),
L64(0xadee6c9b3636d836), L64(0x590451ffa6a6a2a6), L64(0xdebdb90cd2d26fd2), L64(0xfb06f70ef5f5f3f5),
@@ -372,7 +372,7 @@ static const php_hash_uint64 C4[256] = {
L64(0x5d8850752828a028), L64(0xda31b8865c5c6d5c), L64(0x933fed6bf8f8c7f8), L64(0x44a411c286862286),
};
-static const php_hash_uint64 C5[256] = {
+static const uint64_t C5[256] = {
L64(0x18c07830d8181860), L64(0x2305af462623238c), L64(0xc67ef991b8c6c63f), L64(0xe8136fcdfbe8e887),
L64(0x874ca113cb878726), L64(0xb8a9626d11b8b8da), L64(0x0108050209010104), L64(0x4f426e9e0d4f4f21),
L64(0x36adee6c9b3636d8), L64(0xa6590451ffa6a6a2), L64(0xd2debdb90cd2d26f), L64(0xf5fb06f70ef5f5f3),
@@ -439,7 +439,7 @@ static const php_hash_uint64 C5[256] = {
L64(0x285d8850752828a0), L64(0x5cda31b8865c5c6d), L64(0xf8933fed6bf8f8c7), L64(0x8644a411c2868622),
};
-static const php_hash_uint64 C6[256] = {
+static const uint64_t C6[256] = {
L64(0x6018c07830d81818), L64(0x8c2305af46262323), L64(0x3fc67ef991b8c6c6), L64(0x87e8136fcdfbe8e8),
L64(0x26874ca113cb8787), L64(0xdab8a9626d11b8b8), L64(0x0401080502090101), L64(0x214f426e9e0d4f4f),
L64(0xd836adee6c9b3636), L64(0xa2a6590451ffa6a6), L64(0x6fd2debdb90cd2d2), L64(0xf3f5fb06f70ef5f5),
@@ -506,7 +506,7 @@ static const php_hash_uint64 C6[256] = {
L64(0xa0285d8850752828), L64(0x6d5cda31b8865c5c), L64(0xc7f8933fed6bf8f8), L64(0x228644a411c28686),
};
-static const php_hash_uint64 C7[256] = {
+static const uint64_t C7[256] = {
L64(0x186018c07830d818), L64(0x238c2305af462623), L64(0xc63fc67ef991b8c6), L64(0xe887e8136fcdfbe8),
L64(0x8726874ca113cb87), L64(0xb8dab8a9626d11b8), L64(0x0104010805020901), L64(0x4f214f426e9e0d4f),
L64(0x36d836adee6c9b36), L64(0xa6a2a6590451ffa6), L64(0xd26fd2debdb90cd2), L64(0xf5f3f5fb06f70ef5),
diff --git a/ext/hash/tests/bug70312.phpt b/ext/hash/tests/bug70312.phpt
new file mode 100644
index 0000000000..5ded1ac5a5
--- /dev/null
+++ b/ext/hash/tests/bug70312.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70312 HAVAL gives wrong hashes in specific cases
+--SKIPIF--
+<?php if(!extension_loaded("hash")) print "skip"; ?>
+--FILE--
+<?php
+var_dump(hash('haval128,5', '1234567890123456789012345678901234567890123456789012345678901234'));
+var_dump(hash('haval160,5', '1234567890123456789012345678901234567890123456789012345678901234'));
+var_dump(hash('haval192,5', '1234567890123456789012345678901234567890123456789012345678901234'));
+var_dump(hash('haval224,5', '1234567890123456789012345678901234567890123456789012345678901234'));
+var_dump(hash('haval256,5', '1234567890123456789012345678901234567890123456789012345678901234'));
+?>
+--EXPECTF--
+string(32) "f3f0d23819b87228b4b70ee350afaa9d"
+string(40) "aded6485e137f11d7292212ba3fa961714df0564"
+string(48) "e53da2b16269fe732e9a898a96707a9f28404d7333b02286"
+string(56) "c574fb307f0817b514b9bb2e7c4bfaffb7ad667aca3c8b523fefcf10"
+string(64) "fb73c19300b14d5cb393d929bf005e6c2d459a4c9c009e9813af1d2d3637ee8f" \ No newline at end of file
diff --git a/ext/hash/tests/hash_algos.phpt b/ext/hash/tests/hash_algos.phpt
index f2d6fc3ffb..0014f95b1d 100644
--- a/ext/hash/tests/hash_algos.phpt
+++ b/ext/hash/tests/hash_algos.phpt
@@ -18,7 +18,7 @@ var_dump(hash_algos());
===Done===
--EXPECTF--
*** Testing hash_algos() : basic functionality ***
-array(46) {
+array(52) {
[%d]=>
string(3) "md2"
[%d]=>
@@ -34,8 +34,20 @@ array(46) {
[%d]=>
string(6) "sha384"
[%d]=>
+ string(10) "sha512/224"
+ [%d]=>
+ string(10) "sha512/256"
+ [%d]=>
string(6) "sha512"
[%d]=>
+ string(8) "sha3-224"
+ [%d]=>
+ string(8) "sha3-256"
+ [%d]=>
+ string(8) "sha3-384"
+ [%d]=>
+ string(8) "sha3-512"
+ [%d]=>
string(9) "ripemd128"
[%d]=>
string(9) "ripemd160"
diff --git a/ext/hash/tests/hash_copy_001.phpt b/ext/hash/tests/hash_copy_001.phpt
index f9fe7cc552..b33d449762 100644
--- a/ext/hash/tests/hash_copy_001.phpt
+++ b/ext/hash/tests/hash_copy_001.phpt
@@ -52,9 +52,27 @@ string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba"
string(6) "sha384"
string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
+string(10) "sha512/224"
+string(56) "a2573d0e3f6c3e2d174c935a35a8ea31032f04e9e83499ac3ceda568"
+string(56) "a2573d0e3f6c3e2d174c935a35a8ea31032f04e9e83499ac3ceda568"
+string(10) "sha512/256"
+string(64) "fddacab80b3a610ba024c9d75a5fe0cafe5ae7c789f829b3c5fbea8ef11ccc1a"
+string(64) "fddacab80b3a610ba024c9d75a5fe0cafe5ae7c789f829b3c5fbea8ef11ccc1a"
string(6) "sha512"
string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
+string(8) "sha3-224"
+string(56) "7e1126cffee98e5c4b0e9dd5c6efabd5c9356d668e9a2d3cfab724d4"
+string(56) "7e1126cffee98e5c4b0e9dd5c6efabd5c9356d668e9a2d3cfab724d4"
+string(8) "sha3-256"
+string(64) "834abfed9197af09cbe66b7748c65a050a3755ef7a556d6764eb6eabc93b4c7a"
+string(64) "834abfed9197af09cbe66b7748c65a050a3755ef7a556d6764eb6eabc93b4c7a"
+string(8) "sha3-384"
+string(96) "c9016992586f7a8663c5379ed892349c1140ad258f7c44ee82f61f0b8cb75c675012ea94dc1314e06699be2d1465f67b"
+string(96) "c9016992586f7a8663c5379ed892349c1140ad258f7c44ee82f61f0b8cb75c675012ea94dc1314e06699be2d1465f67b"
+string(8) "sha3-512"
+string(128) "5f85341bc9c6621406bf1841c4ce01727ea8759fdf2927106c3e70a75ad9fffd095b87f995aeee844e1a2c287e1195ce809b9bdb1c31258f7fc098175b6de0b4"
+string(128) "5f85341bc9c6621406bf1841c4ce01727ea8759fdf2927106c3e70a75ad9fffd095b87f995aeee844e1a2c287e1195ce809b9bdb1c31258f7fc098175b6de0b4"
string(9) "ripemd128"
string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
@@ -190,9 +208,27 @@ string(64) "268e7f4cf88504a53fd77136c4c4748169f46ff7150b376569ada9c374836944"
string(6) "sha384"
string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3"
string(96) "0d44981d04bb11b1ef75d5c2932bd0aa2785e7bc454daac954d77e2ca10047879b58997533fc99650b20049c6cb9a6cc"
+string(10) "sha512/224"
+string(56) "a2573d0e3f6c3e2d174c935a35a8ea31032f04e9e83499ac3ceda568"
+string(56) "cbc2bbf0028ed803af785b0f264962c84ec48d8ee0908322ef995ddb"
+string(10) "sha512/256"
+string(64) "fddacab80b3a610ba024c9d75a5fe0cafe5ae7c789f829b3c5fbea8ef11ccc1a"
+string(64) "2cec704878ffa7128e0c4a61eef87d1f3c823184d364dfa3fed73beb00499b00"
string(6) "sha512"
string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13"
string(128) "28d7c721433782a880f840af0c3f3ea2cad4ef55de2114dda9d504cedeb110e1cf2519c49e4b5da3da4484bb6ba4fd1621ceadc6408f4410b2ebe9d83a4202c2"
+string(8) "sha3-224"
+string(56) "7e1126cffee98e5c4b0e9dd5c6efabd5c9356d668e9a2d3cfab724d4"
+string(56) "9a21a5464794c2c9784df50cf89cf72234e11941bddaee93f912753e"
+string(8) "sha3-256"
+string(64) "834abfed9197af09cbe66b7748c65a050a3755ef7a556d6764eb6eabc93b4c7a"
+string(64) "57aa7a90f29b5ab66592760592780da247fd39b4c911773687450f9df8cc8ed0"
+string(8) "sha3-384"
+string(96) "c9016992586f7a8663c5379ed892349c1140ad258f7c44ee82f61f0b8cb75c675012ea94dc1314e06699be2d1465f67b"
+string(96) "5d6d7e42b241288bc707b74c50f90a37d69a4afa854ca72021a22cb379356e53b6233aea1be2f33d393d6effa9b5e36c"
+string(8) "sha3-512"
+string(128) "5f85341bc9c6621406bf1841c4ce01727ea8759fdf2927106c3e70a75ad9fffd095b87f995aeee844e1a2c287e1195ce809b9bdb1c31258f7fc098175b6de0b4"
+string(128) "9b88c689bc13a36e6983b32e8ee9464d63b619f246ca451d1fe2a6c9670f01e71d0c8eb245f3204d27d27c056f2a0fef76a1e3bc30fb74cccbc984dbd4883ae6"
string(9) "ripemd128"
string(32) "5f1bc5f5aeaf747574dd34a6535cd94a"
string(32) "f95f5e22b8875ee0c48219ae97f0674b"
diff --git a/ext/hash/tests/hash_file_basic1.phpt b/ext/hash/tests/hash_file_basic1.phpt
index 339d237f06..9a2bc01016 100644
--- a/ext/hash/tests/hash_file_basic1.phpt
+++ b/ext/hash/tests/hash_file_basic1.phpt
@@ -64,7 +64,7 @@ unlink($file);
adler32: ff87222e
crc32: 61664d33
gost: d9e65f0c0c2ef944e4f8a01f4a46365c4f33a2853756878182a7f03e1490a4cd
-haval128,3: 8bb81269aca8b7f87829020d76a4e841
+haval128,3: c25962b13383c3ed9f13817c8f2ae7d6
md2: 70f791c0d8fa9edd7d08e32fcba8c354
md4: a9d034b16bb290c57a645afd6f14cd3b
md5: 704bf818448f5bbb94061332d2c889aa
diff --git a/ext/hash/tests/hash_hmac_basic.phpt b/ext/hash/tests/hash_hmac_basic.phpt
index 9631aa52c0..a0a49533d5 100644
--- a/ext/hash/tests/hash_hmac_basic.phpt
+++ b/ext/hash/tests/hash_hmac_basic.phpt
@@ -45,7 +45,7 @@ echo "sha256(raw): " . bin2hex(hash_hmac('sha256', $content, $key, TRUE)) . "\n"
adler32: 12c803f7
crc32: 96859101
gost: a4a3c80bdf3f8665bf07376a34dc9c1b11af7c813f4928f62e39f0c0dc564dad
-haval128,3: 82cd0f4bd36729b5c80c33efa8c13ac5
+haval128,3: 4d1318607f0406bd1b7bd50907772672
md2: 6d111dab563025e4cb5f4425c991fa12
md4: 10cdbfe843000c623f8b8da0d5d20b0b
md5: 2a632783e2812cf23de100d7d6a463ae
diff --git a/ext/hash/tests/hash_hmac_file_basic.phpt b/ext/hash/tests/hash_hmac_file_basic.phpt
index 858d673275..5c18fd6a2d 100644
--- a/ext/hash/tests/hash_hmac_file_basic.phpt
+++ b/ext/hash/tests/hash_hmac_file_basic.phpt
@@ -73,7 +73,7 @@ unlink($file);
adler32: 0f8c02f9
crc32: f2a60b9c
gost: 94c39a40d5db852a8dc3d24e37eebf2d53e3d711457c59cd02b614f792a9d918
-haval128,3: e8fcff647f1a675acb429130fb94a17e
+haval128,3: f1cea637451097d790354a86de3f54a3
md2: a685475e600314bb549ab4f33c3b27cb
md4: cbc6bff781f48f57378d3effa27553e4
md5: 8bddf39dd1c566c27acc7fa85ec36acf
diff --git a/ext/hash/tests/sha3.phpt b/ext/hash/tests/sha3.phpt
new file mode 100644
index 0000000000..67fb22f988
--- /dev/null
+++ b/ext/hash/tests/sha3.phpt
@@ -0,0 +1,56 @@
+--TEST--
+sha3 algorithm
+--SKIPIF--
+<?php if(!extension_loaded("hash")) print "skip"; ?>
+--FILE--
+<?php
+
+// Test vectors taken from a combination of NIST FIPS-202,
+// Wikipedia reference vectors,
+// and output from reference implementation
+$subjects = [
+ '',
+ 'a',
+ 'The quick brown fox jumps over the lazy dog',
+ 'The quick brown fox jumps over the lazy dog.',
+ str_repeat('a', 257),
+ str_repeat("\xA3", 200),
+];
+foreach ($subjects as $subject) {
+ echo '== ', urlencode($subject), " ==\n";
+ foreach ([224, 256, 384, 512] as $bits) {
+ echo $bits, ': ', hash("sha3-$bits", $subject), "\n";
+ }
+}
+--EXPECT--
+== ==
+224: 6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7
+256: a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a
+384: 0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004
+512: a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26
+== a ==
+224: 9e86ff69557ca95f405f081269685b38e3a819b309ee942f482b6a8b
+256: 80084bf2fba02475726feb2cab2d8215eab14bc6bdd8bfb2c8151257032ecd8b
+384: 1815f774f320491b48569efec794d249eeb59aae46d22bf77dafe25c5edc28d7ea44f93ee1234aa88f61c91912a4ccd9
+512: 697f2d856172cb8309d6b8b97dac4de344b549d4dee61edfb4962d8698b7fa803f4f93ff24393586e28b5b957ac3d1d369420ce53332712f997bd336d09ab02a
+== The+quick+brown+fox+jumps+over+the+lazy+dog ==
+224: d15dadceaa4d5d7bb3b48f446421d542e08ad8887305e28d58335795
+256: 69070dda01975c8c120c3aada1b282394e7f032fa9cf32f4cb2259a0897dfc04
+384: 7063465e08a93bce31cd89d2e3ca8f602498696e253592ed26f07bf7e703cf328581e1471a7ba7ab119b1a9ebdf8be41
+512: 01dedd5de4ef14642445ba5f5b97c15e47b9ad931326e4b0727cd94cefc44fff23f07bf543139939b49128caf436dc1bdee54fcb24023a08d9403f9b4bf0d450
+== The+quick+brown+fox+jumps+over+the+lazy+dog. ==
+224: 2d0708903833afabdd232a20201176e8b58c5be8a6fe74265ac54db0
+256: a80f839cd4f83f6c3dafc87feae470045e4eb0d366397d5c6ce34ba1739f734d
+384: 1a34d81695b622df178bc74df7124fe12fac0f64ba5250b78b99c1273d4b080168e10652894ecad5f1f4d5b965437fb9
+512: 18f4f4bd419603f95538837003d9d254c26c23765565162247483f65c50303597bc9ce4d289f21d1c2f1f458828e33dc442100331b35e7eb031b5d38ba6460f8
+== aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
+224: 10dd422d71c42ee102a0c4bd398b5b85470341a0794702c954b022ba
+256: 6d115e8744deef792419e8bdb8567d74844e0fa5c2d5e474a19de87ac001449f
+384: c9df41fa389101cde63447257835464d89fd3974e5813f3f58d30e0296e89486e2d4bfc2b4089cd3bb860a20263322b8
+512: 5008048b64c14975181175f157be4a780c3d443d2177edf323d57884bc7e3979b9b53bca1325e880df3da0d97c435693441cb5527fbe950f5585678dfbb37785
+== %A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3%A3 ==
+224: 9376816aba503f72f96ce7eb65ac095deee3be4bf9bbc2a1cb7e11e0
+256: 79f38adec5c20307a98ef76e8324afbfd46cfd81b22e3973c65fa1bd9de31787
+384: 1881de2ca7e41ef95dc4732b8f5f002b189cc1e42b74168ed1732649ce1dbcdd76197a31fd55ee989f2d7050dd473e8f
+512: e76dfad22084a8b1467fcf2ffa58361bec7628edf5f3fdc0e4805dc48caeeca81b7c13c30adf52a3659584739a2df46be589c51ca1a4a8416df6545a1ce8ba00
+
diff --git a/ext/hash/tests/sha512-224.phpt b/ext/hash/tests/sha512-224.phpt
new file mode 100644
index 0000000000..3769832ee6
--- /dev/null
+++ b/ext/hash/tests/sha512-224.phpt
@@ -0,0 +1,13 @@
+--TEST--
+sha512/224 algorithm
+--SKIPIF--
+<?php if(!extension_loaded("hash")) print "skip"; ?>
+--FILE--
+<?php
+echo hash('sha512/224', '') . "\n";
+echo hash('sha512/224', 'abc') . "\n";
+echo hash('sha512/224', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu') . "\n";
+--EXPECT--
+6ed0dd02806fa89e25de060c19d3ac86cabb87d6a0ddd05c333b84f4
+4634270f707b6a54daae7530460842e20e37ed265ceee9a43e8924aa
+23fec5bb94d60b23308192640b0c453335d664734fe40e7268674af9
diff --git a/ext/hash/tests/sha512-256.phpt b/ext/hash/tests/sha512-256.phpt
new file mode 100644
index 0000000000..33ae5f1770
--- /dev/null
+++ b/ext/hash/tests/sha512-256.phpt
@@ -0,0 +1,13 @@
+--TEST--
+sha512/256 algorithm
+--SKIPIF--
+<?php if(!extension_loaded("hash")) print "skip"; ?>
+--FILE--
+<?php
+echo hash('sha512/256', '') . "\n";
+echo hash('sha512/256', 'abc') . "\n";
+echo hash('sha512/256', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu') . "\n";
+--EXPECT--
+c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a
+53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23
+3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 8699174b3a..0d44936ea6 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -165,7 +165,7 @@ zend_module_entry iconv_module_entry = {
#ifdef COMPILE_DL_ICONV
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(iconv)
#endif
@@ -401,7 +401,6 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c
{
char *s, *content_type, *mimetype = NULL;
int output_status, mimetype_len = 0;
- PHP_OUTPUT_TSRMLS(output_context);
if (output_context->op & PHP_OUTPUT_HANDLER_START) {
output_status = php_output_get_status();
@@ -425,9 +424,9 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c
char *p = strstr(get_output_encoding(), "//");
if (p) {
- len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%.*s", mimetype_len ? mimetype_len : (size_t) strlen(mimetype), mimetype, (size_t)(p - get_output_encoding()), get_output_encoding());
+ len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%.*s", mimetype_len ? mimetype_len : (int) strlen(mimetype), mimetype, (int) (p - get_output_encoding()), get_output_encoding());
} else {
- len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%s", mimetype_len ? mimetype_len : (size_t) strlen(mimetype), mimetype, get_output_encoding());
+ len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%s", mimetype_len ? mimetype_len : (int) strlen(mimetype), mimetype, get_output_encoding());
}
if (content_type && SUCCESS == sapi_add_header(content_type, (uint)len, 0)) {
SG(sapi_headers).send_default_content_type = 0;
@@ -2122,7 +2121,7 @@ PHP_FUNCTION(iconv_substr)
PHP_FUNCTION(iconv_strpos)
{
char *charset = get_internal_encoding();
- size_t charset_len = 0;
+ size_t charset_len = 0, haystk_len;
zend_string *haystk;
zend_string *ndl;
zend_long offset = 0;
@@ -2143,8 +2142,17 @@ PHP_FUNCTION(iconv_strpos)
}
if (offset < 0) {
- php_error_docref(NULL, E_WARNING, "Offset not contained in string.");
- RETURN_FALSE;
+ /* Convert negative offset (counted from the end of string) */
+ err = _php_iconv_strlen(&haystk_len, ZSTR_VAL(haystk), ZSTR_LEN(haystk), charset);
+ if (err != PHP_ICONV_ERR_SUCCESS) {
+ _php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset);
+ RETURN_FALSE;
+ }
+ offset += haystk_len;
+ if (offset < 0) { /* If offset before start */
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string.");
+ RETURN_FALSE;
+ }
}
if (ZSTR_LEN(ndl) < 1) {
diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h
index 1dc25de9dd..f8003df9d3 100644
--- a/ext/iconv/php_iconv.h
+++ b/ext/iconv/php_iconv.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -75,13 +75,10 @@ ZEND_BEGIN_MODULE_GLOBALS(iconv)
char *output_encoding;
ZEND_END_MODULE_GLOBALS(iconv)
-#ifdef ZTS
-# define ICONVG(v) ZEND_TSRMG(iconv_globals_id, zend_iconv_globals *, v)
-# ifdef COMPILE_DL_ICONV
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define ICONVG(v) (iconv_globals.v)
+#define ICONVG(v) ZEND_MODULE_GLOBALS_ACCESSOR(iconv, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_ICONV)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#ifdef HAVE_IBM_ICONV
diff --git a/ext/iconv/tests/iconv_strpos.phpt b/ext/iconv/tests/iconv_strpos.phpt
index 6965f6fae1..28e3fe2320 100644
--- a/ext/iconv/tests/iconv_strpos.phpt
+++ b/ext/iconv/tests/iconv_strpos.phpt
@@ -24,6 +24,7 @@ function foo($haystk, $needle, $offset, $to_charset = false, $from_charset = fal
}
}
foo("abecdbcdabef", "bcd", -1);
+foo("abecdbcdabef", "bcd", -7);
foo("abecdbcdabef", "bcd", 100000);
foo("abcabcabcdabcababcdabc", "bcd", 0);
foo("abcabcabcdabcababcdabc", "bcd", 10);
@@ -37,10 +38,10 @@ var_dump(iconv_strpos("", "string"));
?>
--EXPECTF--
-2: %s
bool(false)
-2: %s
bool(false)
+int(5)
+int(5)
2: %s
bool(false)
bool(false)
diff --git a/ext/iconv/tests/iconv_strpos_variation3.phpt b/ext/iconv/tests/iconv_strpos_variation3.phpt
index aa9bc1ae1b..6f27b74a52 100644
--- a/ext/iconv/tests/iconv_strpos_variation3.phpt
+++ b/ext/iconv/tests/iconv_strpos_variation3.phpt
@@ -48,56 +48,58 @@ $fp = fopen(__FILE__, "r");
$inputs = array(
// int data
-/*1*/ 0,
+ 0,
1,
12345,
+ -5,
-2345,
// float data
-/*5*/ 10.5,
- -10.5,
+ 10.5,
+ -9.5,
+ -100.3,
12.3456789000e10,
12.3456789000E-10,
.5,
// null data
-/*10*/ NULL,
+ NULL,
null,
// boolean data
-/*12*/ true,
+ true,
false,
TRUE,
FALSE,
// empty data
-/*16*/ "",
+ "",
'',
// string data
-/*18*/ "string",
+ "string",
'string',
$heredoc,
// object data
-/*21*/ new classA(),
+ new classA(),
// undefined data
-/*22*/ @$undefined_var,
+ @$undefined_var,
// unset data
-/*23*/ @$unset_var,
+ @$unset_var,
// resource variable
-/*24*/ $fp
+ $fp
);
// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
+
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
+ echo "--\n";
+ var_dump($input);
var_dump( iconv_strpos($haystack, $needle, $input, $encoding));
- $iterator++;
};
fclose($fp);
@@ -106,96 +108,103 @@ echo "Done";
?>
--EXPECTF--
*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
+--
+int(0)
int(8)
-
--- Iteration 2 --
+--
+int(1)
int(8)
-
--- Iteration 3 --
+--
+int(12345)
bool(false)
-
--- Iteration 4 --
+--
+int(-5)
+int(8)
+--
+int(-2345)
Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
bool(false)
-
--- Iteration 5 --
+--
+float(10.5)
bool(false)
-
--- Iteration 6 --
+--
+float(-9.5)
+int(8)
+--
+float(-100.3)
Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
bool(false)
-
--- Iteration 7 --
+--
+float(123456789000)
Warning: iconv_strpos() expects parameter 3 to be integer, float given in %s on line %d
bool(false)
-
--- Iteration 8 --
+--
+float(1.23456789E-9)
int(8)
-
--- Iteration 9 --
+--
+float(0.5)
int(8)
-
--- Iteration 10 --
+--
+NULL
int(8)
-
--- Iteration 11 --
+--
+NULL
int(8)
-
--- Iteration 12 --
+--
+bool(true)
int(8)
-
--- Iteration 13 --
+--
+bool(false)
int(8)
-
--- Iteration 14 --
+--
+bool(true)
int(8)
-
--- Iteration 15 --
+--
+bool(false)
int(8)
-
--- Iteration 16 --
+--
+string(0) ""
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 17 --
+--
+string(0) ""
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 18 --
+--
+string(6) "string"
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 19 --
+--
+string(6) "string"
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 20 --
+--
+string(11) "hello world"
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 21 --
+--
+object(classA)#%d (%d) {
+}
Warning: iconv_strpos() expects parameter 3 to be integer, object given in %s on line %d
bool(false)
-
--- Iteration 22 --
+--
+NULL
int(8)
-
--- Iteration 23 --
+--
+NULL
int(8)
-
--- Iteration 24 --
+--
+resource(%d) of type (stream)
Warning: iconv_strpos() expects parameter 3 to be integer, resource given in %s on line %d
bool(false)
-Done \ No newline at end of file
+Done
diff --git a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
index d915339275..2704493235 100644
--- a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
+++ b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
@@ -48,56 +48,58 @@ $fp = fopen(__FILE__, "r");
$inputs = array(
// int data
-/*1*/ 0,
+ 0,
1,
12345,
+ -5,
-2345,
// float data
-/*5*/ 10.5,
- -10.5,
+ 10.5,
+ -9.5,
+ -100.3,
12.3456789000e10,
12.3456789000E-10,
.5,
// null data
-/*10*/ NULL,
+ NULL,
null,
// boolean data
-/*12*/ true,
+ true,
false,
TRUE,
FALSE,
// empty data
-/*16*/ "",
+ "",
'',
// string data
-/*18*/ "string",
+ "string",
'string',
$heredoc,
// object data
-/*21*/ new classA(),
+ new classA(),
// undefined data
-/*22*/ @$undefined_var,
+ @$undefined_var,
// unset data
-/*23*/ @$unset_var,
+ @$unset_var,
// resource variable
-/*24*/ $fp
+ $fp
);
// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
+
foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
+ echo "--\n";
+ var_dump($input);
var_dump( iconv_strpos($haystack, $needle, $input, $encoding));
- $iterator++;
};
fclose($fp);
@@ -106,93 +108,100 @@ echo "Done";
?>
--EXPECTF--
*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
+--
+int(0)
int(8)
-
--- Iteration 2 --
+--
+int(1)
int(8)
-
--- Iteration 3 --
+--
+int(12345)
bool(false)
-
--- Iteration 4 --
+--
+int(-5)
+int(8)
+--
+int(-2345)
Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
bool(false)
-
--- Iteration 5 --
+--
+float(10.5)
bool(false)
-
--- Iteration 6 --
+--
+float(-9.5)
+int(8)
+--
+float(-100.3)
Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
bool(false)
-
--- Iteration 7 --
+--
+float(123456789000)
bool(false)
-
--- Iteration 8 --
+--
+float(1.23456789E-9)
int(8)
-
--- Iteration 9 --
+--
+float(0.5)
int(8)
-
--- Iteration 10 --
+--
+NULL
int(8)
-
--- Iteration 11 --
+--
+NULL
int(8)
-
--- Iteration 12 --
+--
+bool(true)
int(8)
-
--- Iteration 13 --
+--
+bool(false)
int(8)
-
--- Iteration 14 --
+--
+bool(true)
int(8)
-
--- Iteration 15 --
+--
+bool(false)
int(8)
-
--- Iteration 16 --
+--
+string(0) ""
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 17 --
+--
+string(0) ""
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 18 --
+--
+string(6) "string"
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 19 --
+--
+string(6) "string"
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 20 --
+--
+string(11) "hello world"
Warning: iconv_strpos() expects parameter 3 to be integer, string given in %s on line %d
bool(false)
-
--- Iteration 21 --
+--
+object(classA)#%d (%d) {
+}
Warning: iconv_strpos() expects parameter 3 to be integer, object given in %s on line %d
bool(false)
-
--- Iteration 22 --
+--
+NULL
int(8)
-
--- Iteration 23 --
+--
+NULL
int(8)
-
--- Iteration 24 --
+--
+resource(%d) of type (stream)
Warning: iconv_strpos() expects parameter 3 to be integer, resource given in %s on line %d
bool(false)
diff --git a/ext/iconv/tests/iconv_strpos_variation5.phpt b/ext/iconv/tests/iconv_strpos_variation5.phpt
index 3db0634215..fcd5aaecae 100644
--- a/ext/iconv/tests/iconv_strpos_variation5.phpt
+++ b/ext/iconv/tests/iconv_strpos_variation5.phpt
@@ -32,10 +32,9 @@ $needle_mb = base64_decode(b'44CC');
/*
* Loop through integers as multiples of ten for $offset argument
- * iconv_strpos should not be able to accept negative values as $offset.
* 60 is larger than *BYTE* count for $string_mb
*/
-for ($i = -10; $i <= 60; $i += 10) {
+for ($i = -30; $i <= 60; $i += 10) {
echo "\n**-- Offset is: $i --**\n";
echo "-- ASCII String --\n";
var_dump(iconv_strpos($string_ascii, $needle_ascii, $i));
@@ -49,7 +48,7 @@ echo "Done";
--EXPECTF--
*** Testing iconv_strpos() : usage variations ***
-**-- Offset is: -10 --**
+**-- Offset is: -30 --**
-- ASCII String --
Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
@@ -59,6 +58,18 @@ bool(false)
Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
bool(false)
+**-- Offset is: -20 --**
+-- ASCII String --
+int(9)
+--Multibyte String --
+int(9)
+
+**-- Offset is: -10 --**
+-- ASCII String --
+int(20)
+--Multibyte String --
+int(20)
+
**-- Offset is: 0 --**
-- ASCII String --
int(9)
diff --git a/ext/imap/config.m4 b/ext/imap/config.m4
index d664215e66..d0b86cba1c 100644
--- a/ext/imap/config.m4
+++ b/ext/imap/config.m4
@@ -20,9 +20,9 @@ AC_DEFUN([IMAP_LIB_CHK],[
done
])
-dnl PHP_IMAP_TEST_BUILD(function, action-if-ok, action-if-not-ok, extra-libs)
+dnl PHP_IMAP_TEST_BUILD(function, action-if-ok, action-if-not-ok, extra-libs, extra-source)
AC_DEFUN([PHP_IMAP_TEST_BUILD], [
- PHP_TEST_BUILD([$1], [$2], [$3], [$4],
+ PHP_TEST_BUILD([$1], [$2], [$3], [$4], [$5]
[
#if defined(__GNUC__) && __GNUC__ >= 4
# define PHP_IMAP_EXPORT __attribute__ ((visibility("default")))
@@ -228,10 +228,15 @@ if test "$PHP_IMAP" != "no"; then
AC_DEFINE(HAVE_IMAP_AUTH_GSS, 1, [ ])
], [], $TST_LIBS)
- dnl Check if utf8_to_mutf7 exists
- PHP_IMAP_TEST_BUILD(utf8_to_mutf7, [
+ dnl Check if utf8_to_mutf7 exists. We need to do some gymnastics because
+ dnl utf8_to_mutf7 takes an argument and will segfault without it. We
+ dnl therefore test another function utf8_to_mutf7_php() which calls
+ dnl the utf8_to_mutf7() function with the empty string as an argument.
+ PHP_IMAP_TEST_BUILD(utf8_to_mutf7_php, [
AC_DEFINE(HAVE_IMAP_MUTF7, 1, [ ])
- ], [], $TST_LIBS)
+ ], [], $TST_LIBS, [
+ char utf8_to_mutf7_php(){ return utf8_to_mutf7(""); }
+ ])
AC_MSG_CHECKING(whether rfc822_output_address_list function present)
PHP_TEST_BUILD(foobar, [
diff --git a/ext/imap/config.w32 b/ext/imap/config.w32
index 5778c34bb4..9e36ed59d0 100644
--- a/ext/imap/config.w32
+++ b/ext/imap/config.w32
@@ -14,7 +14,7 @@ if (PHP_IMAP == "yes") {
CHECK_LIB("ws2_32.lib", "imap");
CHECK_LIB("Secur32.lib", "imap");
CHECK_LIB("crypt32.lib", "imap");
- EXTENSION("imap", "php_imap.c");
+ EXTENSION("imap", "php_imap.c", true);
ADD_FLAG("CFLAGS_IMAP", "/D HAVE_IMAP2000=1 /D HAVE_IMAP2004=1 /D HAVE_IMAP2007a=1 /D HAVE_IMAP2007b=1 /D HAVE_IMAP_SSL=1");
AC_DEFINE('HAVE_IMAP', 1, 'Have IMAP support', true);
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 245a3555ca..6b5d6392c7 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1167,7 +1167,7 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (params) {
zval *disabled_auth_method;
- if ((disabled_auth_method = zend_hash_str_find(HASH_OF(params), "DISABLE_AUTHENTICATOR", sizeof("DISABLE_AUTHENTICATOR") - 1)) != NULL) {
+ if ((disabled_auth_method = zend_hash_str_find(Z_ARRVAL_P(params), "DISABLE_AUTHENTICATOR", sizeof("DISABLE_AUTHENTICATOR") - 1)) != NULL) {
switch (Z_TYPE_P(disabled_auth_method)) {
case IS_STRING:
if (Z_STRLEN_P(disabled_auth_method) > 1) {
@@ -1315,8 +1315,6 @@ PHP_FUNCTION(imap_append)
zend_string* regex;
pcre_cache_entry *pce; /* Compiled regex */
zval *subpats = NULL; /* Parts (not used) */
- long regex_flags = 0; /* Flags (not used) */
- long start_offset = 0; /* Start offset (not used) */
int global = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS|SS", &streamind, &folder, &message, &flags, &internal_date) == FAILURE) {
@@ -1334,7 +1332,7 @@ PHP_FUNCTION(imap_append)
zend_string_free(regex);
php_pcre_match_impl(pce, ZSTR_VAL(internal_date), ZSTR_LEN(internal_date), return_value, subpats, global,
- 0, regex_flags, start_offset);
+ 0, Z_L(0), Z_L(0));
if (!Z_LVAL_P(return_value)) {
php_error_docref(NULL, E_WARNING, "internal date not correctly formatted");
@@ -4259,7 +4257,7 @@ PHP_FUNCTION(imap_mime_header_decode)
zval myobject;
zend_string *str;
char *string, *charset, encoding, *text, *decode;
- long charset_token, encoding_token, end_token, end, offset=0, i;
+ zend_long charset_token, encoding_token, end_token, end, offset=0, i;
unsigned long newlength;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
@@ -4274,8 +4272,8 @@ PHP_FUNCTION(imap_mime_header_decode)
charset = (char *) safe_emalloc((end + 1), 2, 0);
text = &charset[end + 1];
while (offset < end) { /* Reached end of the string? */
- if ((charset_token = (long)php_memnstr(&string[offset], "=?", 2, string + end))) { /* Is there anything encoded in the string? */
- charset_token -= (long)string;
+ if ((charset_token = (zend_long)php_memnstr(&string[offset], "=?", 2, string + end))) { /* Is there anything encoded in the string? */
+ charset_token -= (zend_long)string;
if (offset != charset_token) { /* Is there anything before the encoded data? */
/* Retrieve unencoded data that is found before encoded data */
memcpy(text, &string[offset], charset_token-offset);
@@ -4285,10 +4283,10 @@ PHP_FUNCTION(imap_mime_header_decode)
add_property_string(&myobject, "text", text);
zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &myobject);
}
- if ((encoding_token = (long)php_memnstr(&string[charset_token+2], "?", 1, string+end))) { /* Find token for encoding */
- encoding_token -= (long)string;
- if ((end_token = (long)php_memnstr(&string[encoding_token+3], "?=", 2, string+end))) { /* Find token for end of encoded data */
- end_token -= (long)string;
+ if ((encoding_token = (zend_long)php_memnstr(&string[charset_token+2], "?", 1, string+end))) { /* Find token for encoding */
+ encoding_token -= (zend_long)string;
+ if ((end_token = (zend_long)php_memnstr(&string[encoding_token+3], "?=", 2, string+end))) { /* Find token for end of encoded data */
+ end_token -= (zend_long)string;
memcpy(charset, &string[charset_token + 2], encoding_token - (charset_token + 2)); /* Extract charset encoding */
charset[encoding_token-(charset_token + 2)] = 0x00;
encoding=string[encoding_token + 1]; /* Extract encoding from string */
@@ -4797,7 +4795,7 @@ PHP_FUNCTION(imap_timeout)
break;
}
- timeout = (long) mail_parameters(NIL, timeout_type, NIL);
+ timeout = (zend_long) mail_parameters(NIL, timeout_type, NIL);
RETURN_LONG(timeout);
} else if (timeout >= 0) {
switch (ttype) {
@@ -4818,7 +4816,7 @@ PHP_FUNCTION(imap_timeout)
break;
}
- timeout = (long) mail_parameters(NIL, timeout_type, (void *) timeout);
+ timeout = (zend_long) mail_parameters(NIL, timeout_type, (void *) timeout);
RETURN_TRUE;
} else {
RETURN_FALSE;
diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h
index eb87a04e47..934b486350 100644
--- a/ext/imap/php_imap.h
+++ b/ext/imap/php_imap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/interbase/config.m4 b/ext/interbase/config.m4
index 4f694caeab..ace3047e65 100644
--- a/ext/interbase/config.m4
+++ b/ext/interbase/config.m4
@@ -37,6 +37,6 @@ if test "$PHP_INTERBASE" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH($IBASE_LIBNAME, $IBASE_LIBDIR, INTERBASE_SHARED_LIBADD)
PHP_ADD_INCLUDE($IBASE_INCDIR)
AC_DEFINE(HAVE_IBASE,1,[ ])
- PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared)
+ PHP_NEW_EXTENSION(interbase, interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_SUBST(INTERBASE_SHARED_LIBADD)
fi
diff --git a/ext/interbase/config.w32 b/ext/interbase/config.w32
index 89cd67219c..9891fae442 100644
--- a/ext/interbase/config.w32
+++ b/ext/interbase/config.w32
@@ -9,7 +9,7 @@ if (PHP_INTERBASE != "no") {
(CHECK_LIB("fbclient_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE) ||
CHECK_LIB("gds32_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE))) {
- EXTENSION("interbase", "interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c");
+ EXTENSION("interbase", "interbase.c ibase_query.c ibase_service.c ibase_events.c ibase_blobs.c", PHP_INTERBASE_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_IBASE', 1, 'Have interbase library');
} else {
WARNING("interbase not enabled; libraries and headers not found");
diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c
index ba384f8cd2..3cd649dbf9 100644
--- a/ext/interbase/ibase_blobs.c
+++ b/ext/interbase/ibase_blobs.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -36,7 +36,7 @@ static void _php_ibase_free_blob(zend_resource *rsrc) /* {{{ */
{
ibase_blob *ib_blob = (ibase_blob *)rsrc->ptr;
- if (ib_blob->bl_handle != NULL) { /* blob open*/
+ if (ib_blob->bl_handle != 0) { /* blob open*/
if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) {
_php_ibase_module_error("You can lose data. Close any blob after reading from or "
"writing to it. Use ibase_blob_close() before calling ibase_close()");
@@ -90,16 +90,16 @@ typedef struct { /* {{{ */
/* }}} */
} IBASE_BLOBINFO;
-int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, unsigned long max_len) /* {{{ */
+int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, zend_ulong max_len) /* {{{ */
{
if (ib_blob->bl_qd.gds_quad_high || ib_blob->bl_qd.gds_quad_low) { /*not null ?*/
ISC_STATUS stat;
zend_string *bl_data;
- unsigned long cur_len;
+ zend_ulong cur_len;
unsigned short seg_len;
- bl_data = zend_string_alloc(max_len, 0);
+ bl_data = zend_string_safe_alloc(1, max_len, 0, 0);
for (cur_len = stat = 0; (stat == 0 || stat == isc_segment) && cur_len < max_len; cur_len += seg_len) {
@@ -126,7 +126,7 @@ int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, unsigned long m
int _php_ibase_blob_add(zval *string_arg, ibase_blob *ib_blob) /* {{{ */
{
- unsigned long put_cnt = 0, rem_cnt;
+ zend_ulong put_cnt = 0, rem_cnt;
unsigned short chunk_size;
convert_to_string_ex(string_arg);
@@ -154,7 +154,7 @@ static int _php_ibase_blob_info(isc_blob_handle bl_handle, IBASE_BLOBINFO *bl_in
isc_info_blob_type
};
- char bl_inf[sizeof(long)*8], *p;
+ char bl_inf[sizeof(zend_long)*8], *p;
bl_info->max_segment = 0;
bl_info->num_segments = 0;
@@ -216,7 +216,7 @@ PHP_FUNCTION(ibase_blob_create)
PHP_IBASE_LINK_TRANS(link, ib_link, trans);
ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob));
- ib_blob->bl_handle = NULL;
+ ib_blob->bl_handle = 0;
ib_blob->type = BLOB_INPUT;
if (isc_create_blob(IB_STATUS, &ib_link->handle, &trans->handle, &ib_blob->bl_handle, &ib_blob->bl_qd)) {
@@ -261,7 +261,7 @@ PHP_FUNCTION(ibase_blob_open)
PHP_IBASE_LINK_TRANS(link, ib_link, trans);
ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob));
- ib_blob->bl_handle = NULL;
+ ib_blob->bl_handle = 0;
ib_blob->type = BLOB_OUTPUT;
do {
@@ -296,7 +296,7 @@ PHP_FUNCTION(ibase_blob_add)
RESET_ERRMSG;
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &blob_arg, &string_arg)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &blob_arg, &string_arg)) {
return;
}
@@ -318,7 +318,7 @@ PHP_FUNCTION(ibase_blob_add)
PHP_FUNCTION(ibase_blob_get)
{
zval *blob_arg;
- unsigned long len_arg;
+ zend_ulong len_arg;
ibase_blob *ib_blob;
RESET_ERRMSG;
@@ -361,7 +361,7 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) /* {{{
RETURN_FALSE;
}
}
- ib_blob->bl_handle = NULL;
+ ib_blob->bl_handle = 0;
RETVAL_NEW_STR(_php_ibase_quad_to_string(ib_blob->bl_qd));
} else { /* discard created blob */
@@ -369,7 +369,7 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) /* {{{
_php_ibase_error();
RETURN_FALSE;
}
- ib_blob->bl_handle = NULL;
+ ib_blob->bl_handle = 0;
RETVAL_TRUE;
}
zend_list_delete(Z_RES_P(blob_arg));
@@ -401,7 +401,7 @@ PHP_FUNCTION(ibase_blob_info)
zval *link = NULL;
ibase_db_link *ib_link;
ibase_trans *trans = NULL;
- ibase_blob ib_blob = { NULL, BLOB_INPUT };
+ ibase_blob ib_blob = { 0, BLOB_INPUT };
IBASE_BLOBINFO bl_info;
RESET_ERRMSG;
@@ -477,7 +477,7 @@ PHP_FUNCTION(ibase_blob_echo)
zval *link = NULL;
ibase_db_link *ib_link;
ibase_trans *trans = NULL;
- ibase_blob ib_blob_id = { NULL, BLOB_OUTPUT };
+ ibase_blob ib_blob_id = { 0, BLOB_OUTPUT };
char bl_data[IBASE_BLOB_SEG];
unsigned short seg_len;
@@ -538,7 +538,7 @@ PHP_FUNCTION(ibase_blob_import)
zval *link = NULL, *file;
int size;
unsigned short b;
- ibase_blob ib_blob = { NULL, 0 };
+ ibase_blob ib_blob = { 0, 0 };
ibase_db_link *ib_link;
ibase_trans *trans = NULL;
char bl_data[IBASE_BLOB_SEG];
diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c
index 6918886060..e748c643af 100644
--- a/ext/interbase/ibase_events.c
+++ b/ext/interbase/ibase_events.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -45,7 +45,8 @@ void _php_ibase_free_event(ibase_event *event) /* {{{ */
if (event->link != NULL) {
ibase_event **node;
- if (event->link->handle != NULL &&
+ zend_list_delete(event->link_res);
+ if (event->link->handle != 0 &&
isc_cancel_events(IB_STATUS, &event->link->handle, &event->event_id)) {
_php_ibase_error();
}
@@ -62,7 +63,9 @@ void _php_ibase_free_event(ibase_event *event) /* {{{ */
_php_ibase_event_free(event->event_buffer,event->result_buffer);
for (i = 0; i < event->event_count; ++i) {
- efree(event->events[i]);
+ if (event->events[i]) {
+ efree(event->events[i]);
+ }
}
efree(event->events);
}
@@ -90,7 +93,7 @@ static void _php_ibase_event_block(ibase_db_link *ib_link, unsigned short count,
char **events, unsigned short *l, char **event_buf, char **result_buf)
{
ISC_STATUS dummy_result[20];
- unsigned long dummy_count[15];
+ ISC_ULONG dummy_count[15];
/**
* Unfortunately, there's no clean and portable way in C to pass arguments to
@@ -128,7 +131,7 @@ PHP_FUNCTION(ibase_wait_event)
int num_args;
char *event_buffer, *result_buffer, *events[15];
unsigned short i = 0, event_count = 0, buffer_size;
- unsigned long occurred_event[15];
+ ISC_ULONG occurred_event[15];
RESET_ERRMSG;
@@ -143,17 +146,14 @@ PHP_FUNCTION(ibase_wait_event)
if (Z_TYPE(args[0]) == IS_RESOURCE) {
if ((ib_link = (ibase_db_link *)zend_fetch_resource2_ex(&args[0], "InterBase link", le_link, le_plink)) == NULL) {
- efree(args);
RETURN_FALSE;
}
i = 1;
} else {
if (ZEND_NUM_ARGS() > 15) {
- efree(args);
WRONG_PARAM_COUNT;
}
- if ((ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), "InterBase link", le_link, le_plink)) == NULL) {
- efree(args);
+ if ((ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), "InterBase link", le_link, le_plink)) == NULL) {
RETURN_FALSE;
}
}
@@ -170,7 +170,6 @@ PHP_FUNCTION(ibase_wait_event)
if (isc_wait_for_event(IB_STATUS, &ib_link->handle, buffer_size, event_buffer, result_buffer)) {
_php_ibase_error();
_php_ibase_event_free(event_buffer,result_buffer);
- efree(args);
RETURN_FALSE;
}
@@ -180,7 +179,6 @@ PHP_FUNCTION(ibase_wait_event)
if (occurred_event[i]) {
zend_string *result = zend_string_init(events[i], strlen(events[i]), 0);
_php_ibase_event_free(event_buffer,result_buffer);
- efree(args);
RETURN_STR(result);
}
}
@@ -188,16 +186,20 @@ PHP_FUNCTION(ibase_wait_event)
/* If we reach this line, isc_wait_for_event() did return, but we don't know
which event fired. */
_php_ibase_event_free(event_buffer,result_buffer);
- efree(args);
RETURN_FALSE;
}
/* }}} */
-static isc_callback _php_ibase_callback(ibase_event *event, /* {{{ */
+#if FB_API_VER >= 20
+#define PHP_ISC_CALLBACK ISC_EVENT_CALLBACK
+static ISC_EVENT_CALLBACK _php_ibase_callback(ibase_event *event, /* {{{ */
+ ISC_USHORT buffer_size, ISC_UCHAR *result_buf)
+#else
+#define PHP_ISC_CALLBACK isc_callback
+static isc_callback _php_ibase_callback(ibase_event *event, /* {{{ */
unsigned short buffer_size, char *result_buf)
+#endif
{
- zval *res;
-
/* this function is called asynchronously by the Interbase client library. */
TSRMLS_FETCH_FROM_CTX(event->thread_ctx);
@@ -208,7 +210,7 @@ static isc_callback _php_ibase_callback(ibase_event *event, /* {{{ */
*/
switch (event->state) {
unsigned short i;
- unsigned long occurred_event[15];
+ ISC_ULONG occurred_event[15];
zval return_value, args[2];
default: /* == DEAD */
@@ -217,15 +219,14 @@ static isc_callback _php_ibase_callback(ibase_event *event, /* {{{ */
/* copy the updated results into the result buffer */
memcpy(event->result_buffer, result_buf, buffer_size);
- res = zend_hash_index_find(&EG(regular_list), event->link_res_id);
- ZVAL_RES(&args[1], Z_RES_P(res));
+ ZVAL_RES(&args[1], event->link_res);
/* find out which event occurred */
isc_event_counts(occurred_event, buffer_size, event->event_buffer, event->result_buffer);
for (i = 0; i < event->event_count; ++i) {
if (occurred_event[i]) {
ZVAL_STRING(&args[0], event->events[i]);
- efree(event->events[i]);
+ //efree(event->events[i]);
break;
}
}
@@ -244,7 +245,7 @@ static isc_callback _php_ibase_callback(ibase_event *event, /* {{{ */
case NEW:
/* re-register the event */
if (isc_que_events(IB_STATUS, &event->link->handle, &event->event_id, buffer_size,
- event->event_buffer,(isc_callback)_php_ibase_callback, (void *)event)) {
+ event->event_buffer,(PHP_ISC_CALLBACK)_php_ibase_callback, (void *)event)) {
_php_ibase_error();
}
@@ -268,7 +269,8 @@ PHP_FUNCTION(ibase_set_event_handler)
ibase_db_link *ib_link;
ibase_event *event;
unsigned short i = 1, buffer_size;
- int link_res_id, num_args;
+ int num_args;
+ zend_resource *link_res;
RESET_ERRMSG;
@@ -297,8 +299,7 @@ PHP_FUNCTION(ibase_set_event_handler)
RETURN_FALSE;
}
- convert_to_long_ex(&args[0]);
- link_res_id = Z_LVAL(args[0]);
+ link_res = Z_RES(args[0]);
} else {
/* callback, event_1 [, ... event_15]
@@ -310,10 +311,10 @@ PHP_FUNCTION(ibase_set_event_handler)
cb_arg = &args[0];
- if ((ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), "InterBase link", le_link, le_plink)) == NULL) {
+ if ((ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), "InterBase link", le_link, le_plink)) == NULL) {
RETURN_FALSE;
}
- link_res_id = IBG(default_link);
+ link_res = IBG(default_link);
}
/* get the callback */
@@ -327,17 +328,22 @@ PHP_FUNCTION(ibase_set_event_handler)
/* allocate the event resource */
event = (ibase_event *) safe_emalloc(sizeof(ibase_event), 1, 0);
TSRMLS_SET_CTX(event->thread_ctx);
- event->link_res_id = link_res_id;
+ event->link_res = link_res;
+ GC_REFCOUNT(link_res)++;
event->link = ib_link;
event->event_count = 0;
event->state = NEW;
- event->events = (char **) safe_emalloc(sizeof(char *),ZEND_NUM_ARGS()-i,0);
+ event->events = (char **) safe_emalloc(sizeof(char *), 15, 0);
ZVAL_DUP(&event->callback, cb_arg);
- for (; i < ZEND_NUM_ARGS(); ++i) {
- convert_to_string_ex(&args[i]);
- event->events[event->event_count++] = estrdup(Z_STRVAL(args[i]));
+ for (; i < 15; ++i) {
+ if (i < ZEND_NUM_ARGS()) {
+ convert_to_string_ex(&args[i]);
+ event->events[event->event_count++] = estrdup(Z_STRVAL(args[i]));
+ } else {
+ event->events[i] = NULL;
+ }
}
/* fills the required data structure with information about the events */
@@ -346,7 +352,7 @@ PHP_FUNCTION(ibase_set_event_handler)
/* now register the events with the Interbase API */
if (isc_que_events(IB_STATUS, &ib_link->handle, &event->event_id, buffer_size,
- event->event_buffer,(isc_callback)_php_ibase_callback, (void *)event)) {
+ event->event_buffer,(PHP_ISC_CALLBACK)_php_ibase_callback, (void *)event)) {
_php_ibase_error();
efree(event);
diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c
index 43fa760833..37e59dd3a7 100644
--- a/ext/interbase/ibase_query.c
+++ b/ext/interbase/ibase_query.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -59,7 +59,7 @@ typedef struct _ib_query {
ibase_db_link *link;
ibase_trans *trans;
ibase_result *result;
- int result_res_id;
+ zend_resource *result_res;
isc_stmt_handle stmt;
XSQLDA *in_sqlda, *out_sqlda;
ibase_array *in_array, *out_array;
@@ -67,7 +67,7 @@ typedef struct _ib_query {
unsigned short dialect;
char statement_type;
char *query;
- long trans_res_id;
+ zend_resource *trans_res;
} ibase_query;
typedef struct {
@@ -219,7 +219,7 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, XSQLDA *sqlda, /* {{{
for (i = n = 0; i < sqlda->sqld; ++i) {
unsigned short dim;
- unsigned long ar_size = 1;
+ zend_ulong ar_size = 1;
XSQLVAR *var = &sqlda->sqlvar[i];
if ((var->sqltype & ~1) == SQL_ARRAY) {
@@ -313,7 +313,7 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, XSQLDA *sqlda, /* {{{
/* allocate and prepare query */
static int _php_ibase_alloc_query(ibase_query *ib_query, ibase_db_link *link, /* {{{ */
- ibase_trans *trans, char *query, unsigned short dialect, int trans_res_id)
+ ibase_trans *trans, char *query, unsigned short dialect, zend_resource *trans_res)
{
static char info_type[] = {isc_info_sql_stmt_type};
char result[8];
@@ -326,14 +326,14 @@ static int _php_ibase_alloc_query(ibase_query *ib_query, ibase_db_link *link, /*
ib_query->link = link;
ib_query->trans = trans;
- ib_query->result_res_id = 0;
+ ib_query->result_res = NULL;
ib_query->result = NULL;
- ib_query->stmt = NULL;
+ ib_query->stmt = 0;
ib_query->in_array = NULL;
ib_query->out_array = NULL;
ib_query->dialect = dialect;
ib_query->query = estrdup(query);
- ib_query->trans_res_id = trans_res_id;
+ ib_query->trans_res = trans_res;
ib_query->out_sqlda = NULL;
ib_query->in_sqlda = NULL;
@@ -430,7 +430,7 @@ _php_ibase_alloc_query_error:
}
/* }}} */
-static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /* {{{ */
+static int _php_ibase_bind_array(zval *val, char *buf, zend_ulong buf_size, /* {{{ */
ibase_array *array, int dim)
{
zval null_val, *pnull_val = &null_val;
@@ -441,7 +441,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
ZVAL_NULL(pnull_val);
if (dim < array->ar_desc.array_desc_dimensions) {
- unsigned long slice_size = buf_size / dim_len;
+ zend_ulong slice_size = buf_size / dim_len;
unsigned short i;
zval *subval = val;
@@ -530,8 +530,12 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
struct tm t = { 0, 0, 0, 0, 0, 0 };
switch (array->el_type) {
+#ifndef HAVE_STRPTIME
unsigned short n;
+#endif
+#if (SIZEOF_ZEND_LONG < 8)
ISC_INT64 l;
+#endif
case SQL_SHORT:
convert_to_long(val);
@@ -543,7 +547,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
break;
case SQL_LONG:
convert_to_long(val);
-#if (SIZEOF_LONG > 4)
+#if (SIZEOF_ZEND_LONG > 4)
if (Z_LVAL_P(val) > ISC_LONG_MAX || Z_LVAL_P(val) < ISC_LONG_MIN) {
_php_ibase_module_error("Array parameter exceeds field width");
return FAILURE;
@@ -552,9 +556,9 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
*(ISC_LONG *) buf = (ISC_LONG) Z_LVAL_P(val);
break;
case SQL_INT64:
-#if (SIZEOF_LONG >= 8)
+#if (SIZEOF_ZEND_LONG >= 8)
convert_to_long(val);
- *(long *) buf = Z_LVAL_P(val);
+ *(zend_long *) buf = Z_LVAL_P(val);
#else
convert_to_string(val);
if (!sscanf(Z_STRVAL_P(val), "%" LL_MASK "d", &l)) {
@@ -737,7 +741,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval *b_vars, BIND_BUF *buf, /* {{{ */
if (Z_STRLEN_P(b_var) != BLOB_ID_LEN ||
!_php_ibase_string_to_quad(Z_STRVAL_P(b_var), &buf[i].val.qval)) {
- ibase_blob ib_blob = { NULL, BLOB_INPUT };
+ ibase_blob ib_blob = { 0, BLOB_INPUT };
if (isc_create_blob(IB_STATUS, &ib_query->link->handle,
&ib_query->trans->handle, &ib_blob.bl_handle, &ib_blob.bl_qd)) {
@@ -883,7 +887,7 @@ static int _php_ibase_exec(INTERNAL_FUNCTION_PARAMETERS, ibase_result **ib_resul
case isc_info_sql_stmt_start_trans:
/* a SET TRANSACTION statement should be executed with a NULL trans handle */
- tr = NULL;
+ tr = 0;
if (isc_dsql_execute_immediate(IB_STATUS, &ib_query->link->handle, &tr, 0,
ib_query->query, ib_query->dialect, NULL)) {
@@ -923,11 +927,11 @@ static int _php_ibase_exec(INTERNAL_FUNCTION_PARAMETERS, ibase_result **ib_resul
goto _php_ibase_exec_error;
}
- if (ib_query->trans->handle == NULL && ib_query->trans_res_id != 0) {
+ if (ib_query->trans->handle == 0 && ib_query->trans_res != NULL) {
/* transaction was released by the query and was a registered resource,
so we have to release it */
- zval *res = zend_hash_index_find(&EG(regular_list), ib_query->trans_res_id);
- zend_list_delete(Z_RES_P(res));
+ zend_list_delete(ib_query->trans_res);
+ ib_query->trans_res = NULL;
}
RETVAL_TRUE;
@@ -1061,8 +1065,9 @@ PHP_FUNCTION(ibase_query)
{
zval *zlink, *ztrans, *bind_args = NULL;
char *query;
- int bind_i, query_len, bind_num;
- long trans_res_id = 0;
+ size_t query_len;
+ int bind_i, bind_num;
+ zend_resource *trans_res = NULL;
ibase_db_link *ib_link = NULL;
ibase_trans *trans = NULL;
ibase_query ib_query = { NULL, NULL, 0, 0 };
@@ -1073,7 +1078,7 @@ PHP_FUNCTION(ibase_query)
RETVAL_FALSE;
switch (ZEND_NUM_ARGS()) {
- long l;
+ zend_long l;
default:
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, 3, "rrs",
@@ -1082,7 +1087,7 @@ PHP_FUNCTION(ibase_query)
ib_link = (ibase_db_link*)zend_fetch_resource2_ex(zlink, LE_LINK, le_link, le_plink);
trans = (ibase_trans*)zend_fetch_resource_ex(ztrans, LE_TRANS, le_trans);
- trans_res_id = Z_RES_P(ztrans)->handle;
+ trans_res = Z_RES_P(ztrans);
bind_i = 3;
break;
}
@@ -1092,7 +1097,7 @@ PHP_FUNCTION(ibase_query)
_php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, zlink, &ib_link, &trans);
if (trans != NULL) {
- trans_res_id = Z_RES_P(zlink)->handle;
+ trans_res = Z_RES_P(zlink);
}
bind_i = 2;
break;
@@ -1101,8 +1106,8 @@ PHP_FUNCTION(ibase_query)
/* the statement is 'CREATE DATABASE ...' if the link argument is IBASE_CREATE */
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
"ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) {
- isc_db_handle db = NULL;
- isc_tr_handle trans = NULL;
+ isc_db_handle db = 0;
+ isc_tr_handle trans = 0;
if (PG(sql_safe_mode)) {
_php_ibase_module_error("CREATE DATABASE is not allowed in SQL safe mode"
@@ -1110,7 +1115,7 @@ PHP_FUNCTION(ibase_query)
} else if (((l = INI_INT("ibase.max_links")) != -1) && (IBG(num_links) >= l)) {
_php_ibase_module_error("CREATE DATABASE is not allowed: maximum link count "
- "(%ld) reached", l);
+ "(" ZEND_LONG_FMT ") reached", l);
} else if (isc_dsql_execute_immediate(IB_STATUS, &db, &trans, (short)query_len,
query, SQL_DIALECT_CURRENT, NULL)) {
@@ -1132,8 +1137,8 @@ PHP_FUNCTION(ibase_query)
RETVAL_RES(zend_register_resource(ib_link, le_link));
Z_TRY_ADDREF_P(return_value);
- IBG(default_link) = Z_RES_P(return_value)->handle;
- ++IBG(num_links);
+ Z_TRY_ADDREF_P(return_value);
+ IBG(default_link) = Z_RES_P(return_value);
}
return;
}
@@ -1141,8 +1146,7 @@ PHP_FUNCTION(ibase_query)
case 0:
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() ? 1 : 0, "s", &query,
&query_len)) {
- ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), LE_LINK,
- le_link, le_plink);
+ ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_plink);
bind_i = 1;
break;
@@ -1152,8 +1156,7 @@ PHP_FUNCTION(ibase_query)
/* open default transaction */
if (ib_link == NULL || FAILURE == _php_ibase_def_trans(ib_link, &trans)
- || FAILURE == _php_ibase_alloc_query(&ib_query, ib_link, trans, query, ib_link->dialect,
- trans_res_id)) {
+ || FAILURE == _php_ibase_alloc_query(&ib_query, ib_link, trans, query, ib_link->dialect, trans_res)) {
return;
}
@@ -1183,7 +1186,7 @@ PHP_FUNCTION(ibase_query)
/* EXECUTE PROCEDURE returns only one row => statement can be released immediately */
if (ib_query.statement_type != isc_info_sql_stmt_exec_procedure) {
- ib_query.stmt = NULL; /* keep stmt when free query */
+ ib_query.stmt = 0; /* keep stmt when free query */
}
RETVAL_RES(zend_register_resource(result, le_result));
Z_TRY_ADDREF_P(return_value);
@@ -1210,7 +1213,7 @@ PHP_FUNCTION(ibase_affected_rows)
}
if (!arg) {
- ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), LE_LINK, le_link, le_plink);
+ ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_plink);
if (ib_link->tr_list == NULL || ib_link->tr_list->trans == NULL) {
RETURN_FALSE;
}
@@ -1312,7 +1315,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
switch (type & ~1) {
unsigned short l;
- long n;
+ zend_long n;
char string_data[255];
struct tm t;
char *format;
@@ -1328,8 +1331,8 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
n = *(short *) data;
goto _sql_long;
case SQL_INT64:
-#if (SIZEOF_LONG >= 8)
- n = *(long *) data;
+#if (SIZEOF_ZEND_LONG >= 8)
+ n = *(zend_long *) data;
goto _sql_long;
#else
if (scale == 0) {
@@ -1355,14 +1358,14 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
if (scale == 0) {
ZVAL_LONG(val,n);
} else {
- long f = (long) scales[-scale];
+ zend_long f = (zend_long) scales[-scale];
if (n >= 0) {
- l = slprintf(string_data, sizeof(string_data), "%ld.%0*ld", n / f, -scale, n % f);
+ l = slprintf(string_data, sizeof(string_data), ZEND_LONG_FMT ".%0*" ZEND_LONG_FMT_SPEC, n / f, -scale, n % f);
} else if (n <= -f) {
- l = slprintf(string_data, sizeof(string_data), "%ld.%0*ld", n / f, -scale, -n % f);
+ l = slprintf(string_data, sizeof(string_data), ZEND_LONG_FMT ".%0*" ZEND_LONG_FMT_SPEC, n / f, -scale, -n % f);
} else {
- l = slprintf(string_data, sizeof(string_data), "-0.%0*ld", -scale, -n % f);
+ l = slprintf(string_data, sizeof(string_data), "-0.%0*" ZEND_LONG_FMT_SPEC, -scale, -n % f);
}
ZVAL_STRINGL(val, string_data, l);
}
@@ -1421,7 +1424,7 @@ format_date_time:
}
/* }}} */
-static int _php_ibase_arr_zval(zval *ar_zval, char *data, unsigned long data_size, /* {{{ */
+static int _php_ibase_arr_zval(zval *ar_zval, char *data, zend_ulong data_size, /* {{{ */
ibase_array *ib_array, int dim, int flag)
{
/**
@@ -1434,7 +1437,7 @@ static int _php_ibase_arr_zval(zval *ar_zval, char *data, unsigned long data_siz
unsigned short i;
if (dim < ib_array->ar_desc.array_desc_dimensions) { /* array again */
- unsigned long slice_size = data_size / dim_len;
+ zend_ulong slice_size = data_size / dim_len;
array_init(ar_zval);
@@ -1472,7 +1475,8 @@ static int _php_ibase_arr_zval(zval *ar_zval, char *data, unsigned long data_siz
static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type) /* {{{ */
{
zval *result_arg;
- long i, array_cnt = 0, flag = 0;
+ zend_long flag = 0;
+ zend_long i, array_cnt = 0;
ibase_result *ib_result;
RESET_ERRMSG;
@@ -1542,12 +1546,12 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
if (flag & PHP_IBASE_FETCH_BLOBS) { /* fetch blob contents into hash */
ibase_blob blob_handle;
- unsigned long max_len = 0;
+ zend_ulong max_len = 0;
static char bl_items[] = {isc_info_blob_total_length};
char bl_info[20];
unsigned short i;
- blob_handle.bl_handle = NULL;
+ blob_handle.bl_handle = 0;
blob_handle.bl_qd = *(ISC_QUAD *) var->sqldata;
if (isc_open_blob(IB_STATUS, &ib_result->link->handle, &ib_result->trans->handle,
@@ -1597,7 +1601,6 @@ static void _php_ibase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int fetch_type)
}
} else { /* blob id only */
- char *s;
ISC_QUAD bl_qd = *(ISC_QUAD *) var->sqldata;
ZVAL_NEW_STR(&result, _php_ibase_quad_to_string(bl_qd));
}
@@ -1684,7 +1687,7 @@ PHP_FUNCTION(ibase_name_result)
{
zval *result_arg;
char *name_arg;
- int name_arg_len;
+ size_t name_arg_len;
ibase_result *ib_result;
RESET_ERRMSG;
@@ -1730,7 +1733,8 @@ PHP_FUNCTION(ibase_prepare)
zval *link_arg, *trans_arg;
ibase_db_link *ib_link;
ibase_trans *trans = NULL;
- size_t query_len, trans_res_id = 0;
+ size_t query_len;
+ zend_resource *trans_res = NULL;
ibase_query *ib_query;
char *query;
@@ -1740,7 +1744,7 @@ PHP_FUNCTION(ibase_prepare)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &query, &query_len) == FAILURE) {
return;
}
- ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), LE_LINK, le_link, le_plink);
+ ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_plink);
} else if (ZEND_NUM_ARGS() == 2) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &link_arg, &query, &query_len) == FAILURE) {
return;
@@ -1748,7 +1752,7 @@ PHP_FUNCTION(ibase_prepare)
_php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, link_arg, &ib_link, &trans);
if (trans != NULL) {
- trans_res_id = Z_RES_P(link_arg)->handle;
+ trans_res = Z_RES_P(link_arg);
}
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrs", &link_arg, &trans_arg, &query, &query_len) == FAILURE) {
@@ -1756,7 +1760,7 @@ PHP_FUNCTION(ibase_prepare)
}
ib_link = (ibase_db_link *)zend_fetch_resource2_ex(link_arg, LE_LINK, le_link, le_plink);
trans = (ibase_trans *)zend_fetch_resource_ex(trans_arg, LE_TRANS, le_trans);
- trans_res_id = Z_RES_P(trans_arg)->handle;
+ trans_res = Z_RES_P(trans_arg);
}
if (FAILURE == _php_ibase_def_trans(ib_link, &trans)) {
@@ -1765,7 +1769,7 @@ PHP_FUNCTION(ibase_prepare)
ib_query = (ibase_query *) emalloc(sizeof(ibase_query));
- if (FAILURE == _php_ibase_alloc_query(ib_query, ib_link, trans, query, ib_link->dialect, trans_res_id)) {
+ if (FAILURE == _php_ibase_alloc_query(ib_query, ib_link, trans, query, ib_link->dialect, trans_res)) {
efree(ib_query);
RETURN_FALSE;
}
@@ -1806,21 +1810,16 @@ PHP_FUNCTION(ibase_execute)
}
/* Have we used this cursor before and it's still open (exec proc has no cursor) ? */
- if (ib_query->result_res_id != 0
+ if (ib_query->result_res != NULL
&& ib_query->statement_type != isc_info_sql_stmt_exec_procedure) {
- zval *res;
-
IBDEBUG("Implicitly closing a cursor");
if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_close)) {
_php_ibase_error();
break;
}
- /* invalidate previous results returned by this query (not necessary for exec proc) */
- res = zend_hash_index_find(&EG(regular_list), ib_query->result_res_id);
- if (res) {
- zend_list_delete(Z_RES_P(res));
- }
+ zend_list_delete(ib_query->result_res);
+ ib_query->result_res = NULL;
}
if (FAILURE == _php_ibase_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, &result, ib_query,
@@ -1829,7 +1828,7 @@ PHP_FUNCTION(ibase_execute)
}
/* free the query if trans handle was released */
- if (ib_query->trans->handle == NULL) {
+ if (ib_query->trans->handle == 0) {
zend_list_delete(Z_RES_P(query));
}
@@ -1838,11 +1837,11 @@ PHP_FUNCTION(ibase_execute)
result->type = EXECUTE_RESULT;
if (ib_query->statement_type == isc_info_sql_stmt_exec_procedure) {
- result->stmt = NULL;
+ result->stmt = 0;
}
ret = zend_list_insert(result, le_result);
- ib_query->result_res_id = Z_RES_HANDLE_P(ret);
+ ib_query->result_res = Z_RES_P(ret);
ZVAL_COPY_VALUE(return_value, ret);
Z_TRY_ADDREF_P(return_value);
Z_TRY_ADDREF_P(return_value);
@@ -1865,6 +1864,10 @@ PHP_FUNCTION(ibase_free_query)
}
ib_query = (ibase_query *)zend_fetch_resource_ex(query_arg, LE_QUERY, le_query);
+ if (!ib_query) {
+ RETURN_FALSE;
+ }
+
zend_list_close(Z_RES_P(query_arg));
RETURN_TRUE;
}
@@ -1998,7 +2001,7 @@ static void _php_ibase_field_info(zval *return_value, XSQLVAR *var) /* {{{ */
PHP_FUNCTION(ibase_field_info)
{
zval *result_arg;
- long field_arg;
+ zend_long field_arg;
int type;
XSQLDA *sqlda;
@@ -2062,7 +2065,7 @@ PHP_FUNCTION(ibase_num_params)
PHP_FUNCTION(ibase_param_info)
{
zval *result_arg;
- long field_arg;
+ zend_long field_arg;
ibase_query *ib_query;
RESET_ERRMSG;
diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c
index 53795f6668..3116ab9def 100644
--- a/ext/interbase/ibase_service.c
+++ b/ext/interbase/ibase_service.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -210,7 +210,7 @@ PHP_FUNCTION(ibase_service_attach)
size_t hlen, ulen, plen, spb_len;
ibase_service *svm;
char buf[128], *host, *user, *pass, *loc;
- isc_svc_handle handle = NULL;
+ isc_svc_handle handle = 0;
RESET_ERRMSG;
@@ -274,7 +274,7 @@ static void _php_ibase_service_query(INTERNAL_FUNCTION_PARAMETERS, /* {{{ */
static char spb[] = { isc_info_svc_timeout, 10, 0, 0, 0 };
char res_buf[400], *result, *heap_buf = NULL, *heap_p;
- long heap_buf_size = 200, line_len;
+ zend_long heap_buf_size = 200, line_len;
/* info about users requires an action first */
if (info_action == isc_info_svc_get_users) {
@@ -312,7 +312,7 @@ query_loop:
}
}
if (!heap_buf || (heap_p - heap_buf + line_len +2) > heap_buf_size) {
- long res_size = heap_buf ? heap_p - heap_buf : 0;
+ zend_long res_size = heap_buf ? heap_p - heap_buf : 0;
while (heap_buf_size < (res_size + line_len +2)) {
heap_buf_size *= 2;
@@ -425,7 +425,7 @@ static void _php_ibase_backup_restore(INTERNAL_FUNCTION_PARAMETERS, char operati
zval *res;
char *db, *bk, buf[200];
size_t dblen, bklen, spb_len;
- long opts = 0;
+ zend_long opts = 0;
zend_bool verbose = 0;
ibase_service *svm;
@@ -488,8 +488,9 @@ static void _php_ibase_service_action(INTERNAL_FUNCTION_PARAMETERS, char svc_act
{
zval *res;
char buf[128], *db;
- int dblen, spb_len;
- long action, argument = 0;
+ size_t dblen;
+ int spb_len;
+ zend_long action, argument = 0;
ibase_service *svm;
RESET_ERRMSG;
@@ -519,7 +520,7 @@ static void _php_ibase_service_action(INTERNAL_FUNCTION_PARAMETERS, char svc_act
switch (action) {
default:
unknown_option:
- _php_ibase_module_error("Unrecognised option (%ld)", action);
+ _php_ibase_module_error("Unrecognised option (" ZEND_LONG_FMT ")", action);
RETURN_FALSE;
case isc_spb_rpr_check_db:
@@ -596,7 +597,7 @@ PHP_FUNCTION(ibase_db_info)
PHP_FUNCTION(ibase_server_info)
{
zval *res;
- long action;
+ zend_long action;
ibase_service *svm;
RESET_ERRMSG;
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 919ea7de5e..531019b841 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -41,7 +41,7 @@
#define COMMIT 1
#define RETAIN 2
-#define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL, E_WARNING, "A link to the server could not be established"); RETURN_FALSE; } }
+#define CHECK_LINK(link) { if (link==NULL) { php_error_docref(NULL, E_WARNING, "A link to the server could not be established"); RETURN_FALSE; } }
ZEND_DECLARE_MODULE_GLOBALS(ibase)
static PHP_GINIT_FUNCTION(ibase);
@@ -460,6 +460,9 @@ zend_module_entry ibase_module_entry = {
};
#ifdef COMPILE_DL_INTERBASE
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE()
+#endif
ZEND_GET_MODULE(ibase)
#endif
@@ -509,7 +512,7 @@ void _php_ibase_error(void) /* {{{ */
IBG(sql_code) = isc_sqlcode(IB_STATUS);
- while ((s - IBG(errmsg)) < MAX_ERRMSG - (IBASE_MSGSIZE + 2) && fb_interpret(s, MAX_ERRMSG, &statusp)) {
+ while ((s - IBG(errmsg)) < MAX_ERRMSG && fb_interpret(s, MAX_ERRMSG - strlen(IBG(errmsg)) - 1, &statusp)) {
strcat(IBG(errmsg), " ");
s = IBG(errmsg) + strlen(IBG(errmsg));
}
@@ -538,7 +541,7 @@ void _php_ibase_module_error(char *msg, ...) /* {{{ */
/* {{{ internal macros, functions and structures */
typedef struct {
isc_db_handle *db_ptr;
- long tpb_len;
+ zend_long tpb_len;
char *tpb_ptr;
} ISC_TEB;
@@ -580,9 +583,9 @@ static void _php_ibase_commit_link(ibase_db_link *link) /* {{{ */
for (l = link->tr_list; l != NULL; ++i) {
ibase_tr_list *p = l;
- if (p->trans != NULL) {
+ if (p->trans != 0) {
if (i == 0) {
- if (p->trans->handle != NULL) {
+ if (p->trans->handle != 0) {
IBDEBUG("Committing default transaction...");
if (isc_commit_transaction(IB_STATUS, &p->trans->handle)) {
_php_ibase_error();
@@ -590,7 +593,7 @@ static void _php_ibase_commit_link(ibase_db_link *link) /* {{{ */
}
efree(p->trans); /* default transaction is not a registered resource: clean up */
} else {
- if (p->trans->handle != NULL) {
+ if (p->trans->handle != 0) {
/* non-default trans might have been rolled back by other call of this dtor */
IBDEBUG("Rolling back other transactions...");
if (isc_rollback_transaction(IB_STATUS, &p->trans->handle)) {
@@ -632,7 +635,7 @@ static void _php_ibase_close_link(zend_resource *rsrc) /* {{{ */
ibase_db_link *link = (ibase_db_link *) rsrc->ptr;
_php_ibase_commit_link(link);
- if (link->handle != NULL) {
+ if (link->handle != 0) {
IBDEBUG("Closing normal link...");
isc_detach_database(IB_STATUS, &link->handle);
}
@@ -647,7 +650,7 @@ static void _php_ibase_close_plink(zend_resource *rsrc) /* {{{ */
_php_ibase_commit_link(link);
IBDEBUG("Closing permanent link...");
- if (link->handle != NULL) {
+ if (link->handle != 0) {
isc_detach_database(IB_STATUS, &link->handle);
}
IBG(num_persistent)--;
@@ -662,7 +665,7 @@ static void _php_ibase_free_trans(zend_resource *rsrc) /* {{{ */
unsigned short i;
IBDEBUG("Cleaning up transaction resource...");
- if (trans->handle != NULL) {
+ if (trans->handle != 0) {
IBDEBUG("Rolling back unhandled transaction...");
if (isc_rollback_transaction(IB_STATUS, &trans->handle)) {
_php_ibase_error();
@@ -717,9 +720,12 @@ PHP_INI_END()
static PHP_GINIT_FUNCTION(ibase)
{
+#if defined(COMPILE_DL_INTERBASE) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE();
+#endif
ibase_globals->num_persistent = ibase_globals->num_links = 0;
ibase_globals->sql_code = *ibase_globals->errmsg = 0;
- ibase_globals->default_link = -1;
+ ibase_globals->default_link = NULL;
}
PHP_MINIT_FUNCTION(ibase)
@@ -774,7 +780,7 @@ PHP_MSHUTDOWN_FUNCTION(ibase)
zend_module_entry *ibase_entry;
if ((ibase_entry = zend_hash_str_find_ptr(&module_registry, ibase_module_entry.name,
strlen(ibase_module_entry.name))) != NULL) {
- ibase_entry->handle = NULL;
+ ibase_entry->handle = 0;
}
#endif
UNREGISTER_INI_ENTRIES();
@@ -784,7 +790,7 @@ PHP_MSHUTDOWN_FUNCTION(ibase)
PHP_RSHUTDOWN_FUNCTION(ibase)
{
IBG(num_links) = IBG(num_persistent);
- IBG(default_link)= -1;
+ IBG(default_link)= NULL;
RESET_ERRMSG;
@@ -842,7 +848,7 @@ static char const dpb_args[] = {
0, isc_dpb_user_name, isc_dpb_password, isc_dpb_lc_ctype, isc_dpb_sql_role_name, 0
};
-int _php_ibase_attach_db(char **args, int *len, long *largs, isc_db_handle *db)
+int _php_ibase_attach_db(char **args, size_t *len, zend_long *largs, isc_db_handle *db) /* {{{ */
{
short i, dpb_len, buf_len = 257-2; /* version byte at the front, and a null at the end */
char dpb_buffer[257] = { isc_dpb_version1, 0 }, *dpb;
@@ -878,11 +884,12 @@ int _php_ibase_attach_db(char **args, int *len, long *largs, isc_db_handle *db)
static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* {{{ */
{
char *c, hash[16], *args[] = { NULL, NULL, NULL, NULL, NULL };
- int i, len[] = { 0, 0, 0, 0, 0 };
- long largs[] = { 0, 0, 0 };
+ int i;
+ size_t len[] = { 0, 0, 0, 0, 0 };
+ zend_long largs[] = { 0, 0, 0 };
PHP_MD5_CTX hash_context;
zend_resource new_index_ptr, *le;
- isc_db_handle db_handle = NULL;
+ isc_db_handle db_handle = 0;
ibase_db_link *ib_link;
RESET_ERRMSG;
@@ -917,8 +924,8 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
for (i = 0; i < sizeof(args)/sizeof(char*); ++i) {
PHP_MD5Update(&hash_context,args[i],len[i]);
}
- for (i = 0; i < sizeof(largs)/sizeof(long); ++i) {
- PHP_MD5Update(&hash_context,(char*)&largs[i],sizeof(long));
+ for (i = 0; i < sizeof(largs)/sizeof(zend_long); ++i) {
+ PHP_MD5Update(&hash_context,(char*)&largs[i],sizeof(zend_long));
}
PHP_MD5Final((unsigned char*)hash, &hash_context);
@@ -932,15 +939,12 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
xlink = (zend_resource*) le->ptr;
if ((!persistent && xlink->type == le_link) || xlink->type == le_plink) {
- if (IBG(default_link) > 0) {
- zval *link = zend_hash_index_find(&EG(regular_list), IBG(default_link));
- if (link) {
- zend_list_delete(Z_RES_P(link));
- }
+ if (IBG(default_link)) {
+ zend_list_close(IBG(default_link));
}
xlink->gc.refcount++;
xlink->gc.refcount++;
- IBG(default_link) = xlink->handle;
+ IBG(default_link) = xlink;
RETVAL_RES(xlink);
} else {
zend_hash_str_del(&EG(regular_list), hash, sizeof(hash)-1);
@@ -949,7 +953,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
/* ... or a persistent one */
do {
- long l;
+ zend_long l;
static char info[] = { isc_info_base_level, isc_info_end };
char result[8];
ISC_STATUS status[20];
@@ -1017,13 +1021,10 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
(void *) &new_index_ptr, sizeof(zend_resource)) == NULL) {
RETURN_FALSE;
}
- if (IBG(default_link) > 0) {
- zval *link = zend_hash_index_find(&EG(regular_list), IBG(default_link));
- if (link) {
- zend_list_delete(Z_RES_P(link));
- }
+ if (IBG(default_link)) {
+ zend_list_delete(IBG(default_link));
}
- IBG(default_link) = Z_RES_P(return_value)->handle;
+ IBG(default_link) = Z_RES_P(return_value);
Z_TRY_ADDREF_P(return_value);
Z_TRY_ADDREF_P(return_value);
}
@@ -1050,8 +1051,7 @@ PHP_FUNCTION(ibase_pconnect)
PHP_FUNCTION(ibase_close)
{
zval *link_arg = NULL;
- ibase_db_link *ib_link;
- int link_id;
+ zend_resource *link_res;
RESET_ERRMSG;
@@ -1060,23 +1060,18 @@ PHP_FUNCTION(ibase_close)
}
if (ZEND_NUM_ARGS() == 0) {
- link_id = IBG(default_link);
- CHECK_LINK(link_id);
- IBG(default_link) = -1;
+ link_res = IBG(default_link);
+ CHECK_LINK(link_res);
+ IBG(default_link) = NULL;
} else {
- link_id = Z_RES_P(link_arg)->handle;
+ link_res = Z_RES_P(link_arg);
}
- ib_link = (ibase_db_link *)zend_fetch_resource2_ex(link_arg, LE_LINK, le_link, le_plink);
- if (!link_arg) {
- link_arg = zend_hash_index_find(&EG(regular_list), link_id);
- zend_list_delete(Z_RES_P(link_arg));
- }
/* we have at least 3 additional references to this resource ??? */
- if (GC_REFCOUNT(Z_RES_P(link_arg)) < 4) {
- zend_list_close(Z_RES_P(link_arg));
+ if (GC_REFCOUNT(link_res) < 4) {
+ zend_list_close(link_res);
} else {
- zend_list_delete(Z_RES_P(link_arg));
+ zend_list_delete(link_res);
}
RETURN_TRUE;
}
@@ -1089,7 +1084,7 @@ PHP_FUNCTION(ibase_drop_db)
zval *link_arg = NULL;
ibase_db_link *ib_link;
ibase_tr_list *l;
- int link_id;
+ zend_resource *link_res;
RESET_ERRMSG;
@@ -1098,14 +1093,18 @@ PHP_FUNCTION(ibase_drop_db)
}
if (ZEND_NUM_ARGS() == 0) {
- link_id = IBG(default_link);
- CHECK_LINK(link_id);
- IBG(default_link) = -1;
+ link_res = IBG(default_link);
+ CHECK_LINK(link_res);
+ IBG(default_link) = NULL;
} else {
- link_id = Z_RES_P(link_arg)->handle;
+ link_res = Z_RES_P(link_arg);
}
- ib_link = (ibase_db_link *)zend_fetch_resource2_ex(link_arg, LE_LINK, le_link, le_plink);
+ ib_link = (ibase_db_link *)zend_fetch_resource2(link_res, LE_LINK, le_link, le_plink);
+
+ if (!ib_link) {
+ RETURN_FALSE;
+ }
if (isc_drop_database(IB_STATUS, &ib_link->handle)) {
_php_ibase_error();
@@ -1114,14 +1113,11 @@ PHP_FUNCTION(ibase_drop_db)
/* isc_drop_database() doesn't invalidate the transaction handles */
for (l = ib_link->tr_list; l != NULL; l = l->next) {
- if (l->trans != NULL) l->trans->handle = NULL;
+ if (l->trans != NULL) l->trans->handle = 0;
}
- if (!link_arg) {
- link_arg = zend_hash_index_find(&EG(regular_list), link_id);
- zend_list_delete(Z_RES_P(link_arg));
- }
- zend_list_delete(Z_RES_P(link_arg));
+ zend_list_delete(link_res);
+
RETURN_TRUE;
}
/* }}} */
@@ -1138,7 +1134,7 @@ PHP_FUNCTION(ibase_trans)
char last_tpb[TPB_MAX_SIZE];
ibase_db_link **ib_link = NULL;
ibase_trans *ib_trans;
- isc_tr_handle tr_handle = NULL;
+ isc_tr_handle tr_handle = 0;
ISC_STATUS result;
RESET_ERRMSG;
@@ -1149,7 +1145,7 @@ PHP_FUNCTION(ibase_trans)
ib_link = (ibase_db_link **) safe_emalloc(sizeof(ibase_db_link *),1+argn,0);
if (argn > 0) {
- long trans_argl = 0;
+ zend_long trans_argl = 0;
char *tpb;
ISC_TEB *teb;
zval *args = NULL;
@@ -1236,7 +1232,7 @@ PHP_FUNCTION(ibase_trans)
if (link_cnt == 0) {
link_cnt = 1;
- if ((ib_link[0] = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), LE_LINK, le_link, le_plink)) == NULL) {
+ if ((ib_link[0] = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_plink)) == NULL) {
efree(ib_link);
RETURN_FALSE;
}
@@ -1297,13 +1293,13 @@ int _php_ibase_def_trans(ibase_db_link *ib_link, ibase_trans **trans) /* {{{ */
if (tr == NULL) {
tr = (ibase_trans *) emalloc(sizeof(ibase_trans));
- tr->handle = NULL;
+ tr->handle = 0;
tr->link_cnt = 1;
tr->affected_rows = 0;
tr->db_link[0] = ib_link;
ib_link->tr_list->trans = tr;
}
- if (tr->handle == NULL) {
+ if (tr->handle == 0) {
if (isc_start_transaction(IB_STATUS, &tr->handle, 1, &ib_link->handle, 0, NULL)) {
_php_ibase_error();
return FAILURE;
@@ -1330,7 +1326,7 @@ static void _php_ibase_trans_end(INTERNAL_FUNCTION_PARAMETERS, int commit) /* {{
}
if (ZEND_NUM_ARGS() == 0) {
- ib_link = (ibase_db_link *)zend_fetch_resource2_ex(IBG(default_link), LE_LINK, le_link, le_plink);
+ ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_plink);
if (ib_link->tr_list == NULL || ib_link->tr_list->trans == NULL) {
/* this link doesn't have a default transaction */
_php_ibase_module_error("Default link has no default transaction");
@@ -1421,7 +1417,7 @@ PHP_FUNCTION(ibase_gen_id)
zval *link = NULL;
char query[128], *generator;
size_t gen_len;
- long inc = 1;
+ zend_long inc = 1;
ibase_db_link *ib_link;
ibase_trans *trans = NULL;
XSQLDA out_sqlda;
@@ -1461,8 +1457,8 @@ PHP_FUNCTION(ibase_gen_id)
}
/* don't return the generator value as a string unless it doesn't fit in a long */
-#if SIZEOF_LONG < 8
- if (result < LONG_MIN || result > LONG_MAX) {
+#if SIZEOF_ZEND_LONG < 8
+ if (result < ZEND_LONG_MIN || result > ZEND_LONG_MAX) {
char *res;
int l;
@@ -1470,7 +1466,7 @@ PHP_FUNCTION(ibase_gen_id)
RETURN_STRINGL(res, l);
}
#endif
- RETURN_LONG((long)result);
+ RETURN_LONG((zend_long)result);
}
/* }}} */
diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h
index 03fa6e3cf0..e2000c1c5f 100644
--- a/ext/interbase/php_ibase_includes.h
+++ b/ext/interbase/php_ibase_includes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -60,10 +60,10 @@ extern int le_link, le_plink, le_trans;
ZEND_BEGIN_MODULE_GLOBALS(ibase)
ISC_STATUS status[20];
- long default_link;
- long num_links, num_persistent;
+ zend_resource *default_link;
+ zend_long num_links, num_persistent;
char errmsg[MAX_ERRMSG];
- long sql_code;
+ zend_long sql_code;
ZEND_END_MODULE_GLOBALS(ibase)
ZEND_EXTERN_MODULE_GLOBALS(ibase)
@@ -95,7 +95,7 @@ typedef struct {
typedef struct event {
ibase_db_link *link;
- long link_res_id;
+ zend_resource* link_res;
ISC_LONG event_id;
unsigned short event_count;
char **events;
@@ -127,17 +127,10 @@ enum php_interbase_option {
PHP_IBASE_NOWAIT = 256
};
-#ifdef ZTS
-#else
-#endif
+#define IBG(v) ZEND_MODULE_GLOBALS_ACCESSOR(ibase, v)
-#ifdef ZTS
-# define IBG(v) ZEND_TSRMG(ibase_globals_id, zend_ibase_globals *, v)
-# ifdef COMPILE_DL_INTERBASE
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-#define IBG(v) (ibase_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_INTERBASE)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#define BLOB_ID_LEN 18
@@ -162,13 +155,15 @@ void _php_ibase_module_error(char *, ...)
/* determine if a resource is a link or transaction handle */
#define PHP_IBASE_LINK_TRANS(zv, lh, th) \
- do { if (!zv) { \
- lh = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), \
- "InterBase link", le_link, le_plink); } \
- else \
- _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, zv, &lh, &th); \
- if (SUCCESS != _php_ibase_def_trans(lh, &th)) { RETURN_FALSE; } \
- } while (0)
+ do { \
+ if (!zv) { \
+ lh = (ibase_db_link *)zend_fetch_resource2( \
+ IBG(default_link), "InterBase link", le_link, le_plink); \
+ } else { \
+ _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, zv, &lh, &th); \
+ } \
+ if (SUCCESS != _php_ibase_def_trans(lh, &th)) { RETURN_FALSE; } \
+ } while (0)
int _php_ibase_def_trans(ibase_db_link *ib_link, ibase_trans **trans);
void _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAMETERS, zval *link_id,
@@ -181,7 +176,7 @@ void php_ibase_query_minit(INIT_FUNC_ARGS);
void php_ibase_blobs_minit(INIT_FUNC_ARGS);
int _php_ibase_string_to_quad(char const *id, ISC_QUAD *qd);
zend_string *_php_ibase_quad_to_string(ISC_QUAD const qd);
-int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, unsigned long max_len);
+int _php_ibase_blob_get(zval *return_value, ibase_blob *ib_blob, zend_ulong max_len);
int _php_ibase_blob_add(zval *string_arg, ibase_blob *ib_blob);
/* provided by ibase_events.c */
diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c
index c12958fa89..e3fe6e7edc 100644
--- a/ext/interbase/php_ibase_udf.c
+++ b/ext/interbase/php_ibase_udf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -250,8 +250,8 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
case dtype_int64:
l = *(ISC_INT64*)argv[i]->dsc_address;
- if (argv[i]->dsc_scale == 0 && l <= LONG_MAX && l >= LONG_MIN) {
- ZVAL_LONG(&args[i], (long)l);
+ if (argv[i]->dsc_scale == 0 && l <= ZEND_LONG_MAX && l >= ZEND_LONG_MIN) {
+ ZVAL_LONG(&args[i], (zend_long)l);
} else {
ZVAL_DOUBLE(&args[i], ((double)l)/scales[-argv[i]->dsc_scale]);
}
@@ -309,8 +309,8 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
case IS_LONG:
r->dsc_dtype = dtype_long;
- *(long*)r->dsc_address = Z_LVAL(return_value);
- r->dsc_length = sizeof(long);
+ *(zend_long*)r->dsc_address = Z_LVAL(return_value);
+ r->dsc_length = sizeof(zend_long);
break;
case IS_DOUBLE:
diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h
index 3e21f07f5a..c1f2feeae4 100644
--- a/ext/interbase/php_interbase.h
+++ b/ext/interbase/php_interbase.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/interbase/tests/004.phpt b/ext/interbase/tests/004.phpt
index e81474a4c4..54a6b7b9b5 100644
--- a/ext/interbase/tests/004.phpt
+++ b/ext/interbase/tests/004.phpt
@@ -109,7 +109,7 @@ InterBase: BLOB test
ibase_commit();
ibase_close();
- ibase_connect($test_base);
+ $link = ibase_connect($test_base);
ibase_blob_echo($link, $row->V_BLOB);
ibase_free_result($q);
diff --git a/ext/interbase/tests/005.phpt b/ext/interbase/tests/005.phpt
index cb68b0a1d5..8523443078 100644
--- a/ext/interbase/tests/005.phpt
+++ b/ext/interbase/tests/005.phpt
@@ -207,7 +207,7 @@ transactions on second link
echo "end of test\n";
?>
---EXPECT--
+--EXPECTF--
default transaction:
empty table
--- test5 ---
@@ -264,7 +264,7 @@ three rows in fourth transaction with deadlock
2
3
4
-errmsg [lock conflict on no wait transaction deadlock ]
+errmsg [lock conflict on no wait transaction deadlock %a]
---
three rows
--- test5 ---
diff --git a/ext/interbase/tests/bug46543.phpt b/ext/interbase/tests/bug46543.phpt
index 59e088c3d0..88f38a6bd1 100644
--- a/ext/interbase/tests/bug46543.phpt
+++ b/ext/interbase/tests/bug46543.phpt
@@ -19,10 +19,10 @@ ibase_trans(1, 2, $x, $x, 3);
?>
--EXPECTF--
-Warning: ibase_trans(): no Firebird/InterBase link resource supplied in %s on line %d
+Warning: ibase_trans(): supplied resource is not a valid Firebird/InterBase link resource in %sbug46543.php on line %d
-Warning: ibase_trans(): no Firebird/InterBase link resource supplied in %s on line %d
+Warning: ibase_trans(): supplied resource is not a valid Firebird/InterBase link resource in %sbug46543.php on line %d
-Warning: ibase_trans(): no Firebird/InterBase link resource supplied in %s on line %d
+Warning: ibase_trans(): supplied resource is not a valid Firebird/InterBase link resource in %sbug46543.php on line %d
-Warning: ibase_trans(): supplied resource is not a valid Firebird/InterBase link resource in %s on line %d
+Warning: ibase_trans(): supplied resource is not a valid Firebird/InterBase link resource in %sbug46543.php on line %d
diff --git a/ext/interbase/tests/ibase_close_001.phpt b/ext/interbase/tests/ibase_close_001.phpt
index f74d109109..cb91e8a75a 100644
--- a/ext/interbase/tests/ibase_close_001.phpt
+++ b/ext/interbase/tests/ibase_close_001.phpt
@@ -17,9 +17,7 @@ var_dump(ibase_close('foo'));
--EXPECTF--
bool(true)
bool(true)
-
-Warning: ibase_close(): supplied resource is not a valid Firebird/InterBase link resource in %s on line %d
-bool(false)
+bool(true)
Warning: ibase_close() expects parameter 1 to be resource,%string given in %s on line %d
NULL
diff --git a/ext/interbase/tests/ibase_trans_001.phpt b/ext/interbase/tests/ibase_trans_001.phpt
index d8b7c81a1b..cceb60e9a1 100644
--- a/ext/interbase/tests/ibase_trans_001.phpt
+++ b/ext/interbase/tests/ibase_trans_001.phpt
@@ -18,6 +18,4 @@ var_dump(ibase_close($x));
resource(%d) of type (Firebird/InterBase transaction)
resource(%d) of type (Firebird/InterBase transaction)
bool(true)
-
-Warning: ibase_close(): supplied resource is not a valid Firebird/InterBase link resource in %s on line %d
-bool(false)
+bool(true)
diff --git a/ext/intl/ERROR.CONVENTIONS b/ext/intl/ERROR.CONVENTIONS
index 41cd14ec06..a7ef53665e 100644
--- a/ext/intl/ERROR.CONVENTIONS
+++ b/ext/intl/ERROR.CONVENTIONS
@@ -21,9 +21,9 @@ intl.use_exceptions you get more fine-grained information about where the
error occurred).
The internal PHP code can set the global last error with:
-void intl_error_set_code(intl_error* err, UErrorCode err_code TSRMLS_DC);
-void intl_error_set_custom_msg(intl_error* err, char* msg, int copyMsg TSRMLS_DC);
-void intl_error_set(intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC);
+void intl_error_set_code(intl_error* err, UErrorCode err_code);
+void intl_error_set_custom_msg(intl_error* err, char* msg, int copyMsg);
+void intl_error_set(intl_error* err, UErrorCode code, char* msg, int copyMsg);
and by passing NULL as the first parameter. The last function is a combination
of the first two. If the message is not a static buffer, copyMsg should be 1.
@@ -44,9 +44,9 @@ typedef struct {
The global error and the object error can be SIMULTANEOUSLY set with these
functions:
-void intl_errors_set_custom_msg(intl_error* err, char* msg, int copyMsg TSRMLS_DC);
-void intl_errors_set_code(intl_error* err, UErrorCode err_code TSRMLS_DC);
-void intl_errors_set(intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC);
+void intl_errors_set_custom_msg(intl_error* err, char* msg, int copyMsg);
+void intl_errors_set_code(intl_error* err, UErrorCode err_code);
+void intl_errors_set(intl_error* err, UErrorCode code, char* msg, int copyMsg);
by passing a pointer to the object's intl_error structed as the first parameter.
Node the extra 's' in the functions' names ('errors', not 'error').
@@ -79,8 +79,8 @@ Errors should be lost after a function call. This is different from the way
ICU operates, where functions return immediately if an error is set.
Error resetting can be done with:
-void intl_error_reset(NULL TSRMLS_DC); /* reset global error */
-void intl_errors_reset(intl_error* err TSRMLS_DC ); /* reset global and object error */
+void intl_error_reset(NULL); /* reset global error */
+void intl_errors_reset(intl_error* err); /* reset global and object error */
In practice, intl_errors_reset() is not used because most classes have also
plain functions mapped to the same internal functions as their instance methods.
@@ -97,10 +97,10 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
BREAKITER_METHOD_INIT_VARS; /* macro also resets global error */
object = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&text, &text_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "breakiter_set_text: bad arguments", 0 TSRMLS_CC);
+ "breakiter_set_text: bad arguments", 0);
RETURN_FALSE;
}
diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp
index 6b6feef8d9..574f9a0fc3 100644
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -177,7 +177,7 @@ static HashTable *Calendar_get_debug_info(zval *object, int *is_temp)
HashTable *debug_info_tz;
timezone_object_construct(&cal->getTimeZone(), &ztz , 0);
- debug_info = Z_OBJ_HANDLER(ztz, get_debug_info)(&ztz, &is_tmp);
+ debug_info_tz = Z_OBJ_HANDLER(ztz, get_debug_info)(&ztz, &is_tmp);
assert(is_tmp == 1);
array_init(&ztz_debug);
@@ -505,8 +505,6 @@ void calendar_register_IntlCalendar_class(void)
CALENDAR_DECL_LONG_CONST("FIELD_AM_PM", UCAL_AM_PM);
CALENDAR_DECL_LONG_CONST("FIELD_HOUR", UCAL_HOUR);
CALENDAR_DECL_LONG_CONST("FIELD_HOUR_OF_DAY", UCAL_HOUR_OF_DAY);
- CALENDAR_DECL_LONG_CONST("FIELD_HOUR", UCAL_HOUR);
- CALENDAR_DECL_LONG_CONST("FIELD_HOUR_OF_DAY", UCAL_HOUR_OF_DAY);
CALENDAR_DECL_LONG_CONST("FIELD_MINUTE", UCAL_MINUTE);
CALENDAR_DECL_LONG_CONST("FIELD_SECOND", UCAL_SECOND);
CALENDAR_DECL_LONG_CONST("FIELD_MILLISECOND", UCAL_MILLISECOND);
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
index ac5b33a89c..155ed5f7f4 100644
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -522,48 +522,28 @@ U_CFUNC PHP_FUNCTION(intlcal_roll)
U_CFUNC PHP_FUNCTION(intlcal_clear)
{
- zval args_a[2] = {0},
- *args = &args_a[0];
- zend_long field;
- int variant;
+ zend_long field;
+ zend_bool field_is_null = 1;
CALENDAR_METHOD_INIT_VARS;
- if (ZEND_NUM_ARGS() > (getThis() ? 1 : 2) ||
- zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: too many arguments", 0);
- RETURN_FALSE;
- }
- if (!getThis()) {
- args++;
- }
- if (Z_ISUNDEF(args[0]) || Z_TYPE(args[0]) == IS_NULL) {
- zval *dummy; /* we know it's null */
- if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
- getThis(), "O|z", &object, Calendar_ce_ptr, &dummy) == FAILURE) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: bad arguments", 0);
- RETURN_FALSE;
- }
- variant = 0;
- } else if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
- getThis(), "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
+ getThis(), "O|l!", &object, Calendar_ce_ptr, &field, &field_is_null) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_clear: bad arguments", 0);
RETURN_FALSE;
- } else if (field < 0 || field >= UCAL_FIELD_COUNT) {
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: invalid field", 0);
- RETURN_FALSE;
- } else {
- variant = 1;
}
CALENDAR_METHOD_FETCH_OBJECT;
- if (variant == 0) {
+ if (field_is_null) {
co->ucal->clear();
} else {
+ if (field < 0 || field >= UCAL_FIELD_COUNT) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intlcal_clear: invalid field", 0);
+ RETURN_FALSE;
+ }
+
co->ucal->clear((UCalendarDateFields)field);
}
@@ -614,7 +594,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_actual_minimum)
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
{
- zend_ulong dow;
+ zend_long dow;
CALENDAR_METHOD_INIT_VARS;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
@@ -923,15 +903,11 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set)
U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
{
double date;
- zval *rawDate = NULL;
+ zend_bool date_is_null = 1;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
- ZEND_NUM_ARGS(), getThis(),
- "O|z!", &object, Calendar_ce_ptr, &rawDate) == FAILURE
- || (rawDate != NULL &&
- zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
- "O|d", &object, Calendar_ce_ptr, &date) == FAILURE)) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
+ "O|d!", &object, Calendar_ce_ptr, &date, &date_is_null) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_is_weekend: bad arguments", 0);
RETURN_FALSE;
@@ -939,7 +915,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
CALENDAR_METHOD_FETCH_OBJECT;
- if (rawDate == NULL) {
+ if (date_is_null) {
RETURN_BOOL((int)co->ucal->isWeekend());
} else {
UBool ret = co->ucal->isWeekend((UDate)date, CALENDAR_ERROR_CODE(co));
diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c
index 8f06c8f1ca..2d431a19d6 100644
--- a/ext/intl/collator/collator_convert.c
+++ b/ext/intl/collator/collator_convert.c
@@ -28,12 +28,6 @@
#include <unicode/ustring.h>
#include <php.h>
-#if PHP_VERSION_ID <= 50100
-#define CAST_OBJECT_SHOULD_FREE ,0
-#else
-#define CAST_OBJECT_SHOULD_FREE
-#endif
-
#define COLLATOR_CONVERT_RETURN_FAILED(retval) { \
Z_TRY_ADDREF_P(retval); \
return retval; \
@@ -258,7 +252,7 @@ zval* collator_convert_object_to_string( zval* obj, zval *rv )
{
zstr = rv;
- if( Z_OBJ_HT_P(obj)->cast_object( obj, zstr, IS_STRING CAST_OBJECT_SHOULD_FREE ) == FAILURE )
+ if( Z_OBJ_HT_P(obj)->cast_object( obj, zstr, IS_STRING ) == FAILURE )
{
/* cast_object failed => bail out. */
zval_ptr_dtor( zstr );
diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c
index 6b0568dd64..4f6efbfa6d 100644
--- a/ext/intl/collator/collator_is_numeric.c
+++ b/ext/intl/collator/collator_is_numeric.c
@@ -17,17 +17,6 @@
#include "collator_is_numeric.h"
-#if ZEND_MODULE_API_NO < 20071006
-/* not 5.3 */
-#ifndef ALLOCA_FLAG
-#define ALLOCA_FLAG(use_heap)
-#endif
-#define _do_alloca(x, y) do_alloca((x))
-#define _free_alloca(x, y) free_alloca((x))
-#else
-#define _do_alloca do_alloca
-#define _free_alloca free_alloca
-#endif
/* {{{ collator_u_strtod
* Taken from PHP6:zend_u_strtod()
*/
@@ -87,7 +76,7 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */
if (length < sizeof(buf)) {
numbuf = buf;
} else {
- numbuf = (char *) _do_alloca(length + 1, use_heap);
+ numbuf = (char *) do_alloca(length + 1, use_heap);
}
bufpos = numbuf;
@@ -100,7 +89,7 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */
value = zend_strtod(numbuf, NULL);
if (numbuf != buf) {
- _free_alloca(numbuf, use_heap);
+ free_alloca(numbuf, use_heap);
}
if (endptr != NULL) {
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index 8727c1d8ab..1ad42d3660 100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
@@ -144,7 +144,6 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2)
*/
static int collator_numeric_compare_function(zval *result, zval *op1, zval *op2)
{
- int rc = SUCCESS;
zval num1, num2;
zval *num1_p = NULL;
zval *num2_p = NULL;
@@ -161,14 +160,14 @@ static int collator_numeric_compare_function(zval *result, zval *op1, zval *op2)
op2 = num2_p;
}
- rc = numeric_compare_function( result, op1, op2);
+ ZVAL_LONG(result, numeric_compare_function(op1, op2));
if( num1_p )
zval_ptr_dtor( num1_p );
if( num2_p )
zval_ptr_dtor( num2_p );
- return rc;
+ return SUCCESS;
}
/* }}} */
@@ -310,7 +309,7 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS )
/* Set 'compare function' according to sort flags. */
INTL_G(compare_func) = collator_get_compare_function( sort_flags );
- hash = HASH_OF( array );
+ hash = Z_ARRVAL_P( array );
/* Convert strings in the specified array from UTF-8 to UTF-16. */
collator_convert_hash_from_utf8_to_utf16( hash, COLLATOR_ERROR_CODE_P( co ) );
@@ -364,6 +363,7 @@ static void collator_sortkey_swap(collator_sort_key_index_t *p, collator_sort_ke
PHP_FUNCTION( collator_sort_with_sort_keys )
{
zval* array = NULL;
+ zval garbage;
HashTable* hash = NULL;
zval* hashData = NULL; /* currently processed item of input hash */
@@ -385,8 +385,6 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
int utf16_buf_size = DEF_UTF16_BUF_SIZE; /* the length of utf16_buf */
int utf16_len = 0; /* length of converted string */
- HashTable* sortedHash = NULL;
-
COLLATOR_METHOD_INIT_VARS
/* Parse parameters. */
@@ -414,7 +412,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
/*
* Sort specified array.
*/
- hash = HASH_OF( array );
+ hash = Z_ARRVAL_P( array );
if( !hash || zend_hash_num_elements( hash ) == 0 )
RETURN_TRUE;
@@ -508,7 +506,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
zend_sort( sortKeyIndxBuf, sortKeyCount,
sortKeyIndxSize, collator_cmp_sort_keys, (swap_func_t)collator_sortkey_swap);
- zval_ptr_dtor( array );
+ ZVAL_COPY_VALUE(&garbage, array);
/* for resulting hash we'll assign new hash keys rather then reordering */
array_init(array);
@@ -521,6 +519,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
if( utf16_buf )
efree( utf16_buf );
+ zval_ptr_dtor(&garbage);
efree( sortKeyIndxBuf );
efree( sortKeyBuf );
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
index e76f3b830f..0531a6b933 100644
--- a/ext/intl/common/common_enum.cpp
+++ b/ext/intl/common/common_enum.cpp
@@ -183,7 +183,7 @@ static zend_object_iterator *IntlIterator_get_iterator(
return NULL;
}
- ++GC_REFCOUNT(ii->iterator);
+ ++GC_REFCOUNT(&ii->iterator->std);
return ii->iterator;
}
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index 1999b6a8c1..00a5cc593c 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -36,46 +36,51 @@ extern "C" {
#include "dateformat_helpers.h"
#include "zend_exceptions.h"
+#if U_ICU_VERSION_MAJOR_NUM < 50
+#define UDAT_PATTERN 0
+#endif
+
+#define INTL_UDATE_FMT_OK(i) \
+ (UDAT_FULL == (i) || UDAT_LONG == (i) || \
+ UDAT_MEDIUM == (i) || UDAT_SHORT == (i) || \
+ UDAT_RELATIVE == (i) || UDAT_FULL_RELATIVE == (i) || \
+ UDAT_LONG_RELATIVE == (i) || UDAT_MEDIUM_RELATIVE == (i) || \
+ UDAT_SHORT_RELATIVE == (i) || UDAT_NONE == (i) || \
+ UDAT_PATTERN == (i))
+
/* {{{ */
static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
{
zval *object;
-
const char *locale_str;
- size_t locale_len = 0;
+ size_t locale_len = 0;
Locale locale;
- zend_long date_type = 0;
- zend_long time_type = 0;
+ zend_long date_type = 0;
+ zend_long time_type = 0;
zval *calendar_zv = NULL;
- Calendar *calendar = NULL;
+ Calendar *calendar = NULL;
zend_long calendar_type;
bool calendar_owned;
zval *timezone_zv = NULL;
- TimeZone *timezone = NULL;
+ TimeZone *timezone = NULL;
bool explicit_tz;
- char* pattern_str = NULL;
- size_t pattern_str_len = 0;
- UChar* svalue = NULL; /* UTF-16 pattern_str */
- int32_t slength = 0;
+ char* pattern_str = NULL;
+ size_t pattern_str_len = 0;
+ UChar* svalue = NULL; /* UTF-16 pattern_str */
+ int32_t slength = 0;
IntlDateFormatter_object* dfo;
int zpp_flags = is_constructor ? ZEND_PARSE_PARAMS_THROW : 0;
intl_error_reset(NULL);
object = return_value;
/* Parse parameters. */
- if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "sll|zzs",
+ if (zend_parse_parameters_ex(zpp_flags, ZEND_NUM_ARGS(), "sll|zzs",
&locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
&calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "
"unable to parse input parameters", 0);
return FAILURE;
- }
-
- INTL_CHECK_LOCALE_LEN_OR_FAILURE(locale_len);
- if (locale_len == 0) {
- locale_str = intl_locale_get_default();
}
- locale = Locale::createFromName(locale_str);
DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
@@ -85,6 +90,21 @@ static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
return FAILURE;
}
+ if (!INTL_UDATE_FMT_OK(date_type)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: invalid date format style", 0);
+ return FAILURE;
+ }
+ if (!INTL_UDATE_FMT_OK(time_type)) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: invalid time format style", 0);
+ return FAILURE;
+ }
+
+ INTL_CHECK_LOCALE_LEN_OR_FAILURE(locale_len);
+ if (locale_len == 0) {
+ locale_str = intl_locale_get_default();
+ }
+ locale = Locale::createFromName(locale_str);
+
/* process calendar */
if (datefmt_process_calendar_arg(calendar_zv, locale, "datefmt_create",
INTL_DATA_ERROR_P(dfo), calendar, calendar_type,
@@ -117,17 +137,19 @@ static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
}
}
+ DATE_FORMAT_OBJECT(dfo) = udat_open((UDateFormatStyle)time_type,
+ (UDateFormatStyle)date_type, locale_str, NULL, 0, svalue,
+ slength, &INTL_DATA_ERROR_CODE(dfo));
+
if (pattern_str && pattern_str_len > 0) {
- DATE_FORMAT_OBJECT(dfo) = udat_open(UDAT_IGNORE, UDAT_IGNORE,
- locale_str, NULL, 0, svalue, slength,
- &INTL_DATA_ERROR_CODE(dfo));
- } else {
- DATE_FORMAT_OBJECT(dfo) = udat_open((UDateFormatStyle)time_type,
- (UDateFormatStyle)date_type, locale_str, NULL, 0, svalue,
- slength, &INTL_DATA_ERROR_CODE(dfo));
+ udat_applyPattern(DATE_FORMAT_OBJECT(dfo), true, svalue, slength);
+ if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
+ intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: error applying pattern", 0);
+ goto error;
+ }
}
- if (!U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
+ if (!U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
DateFormat *df = (DateFormat*)DATE_FORMAT_OBJECT(dfo);
if (calendar_owned) {
df->adoptCalendar(calendar);
@@ -139,7 +161,7 @@ static int datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor)
if (timezone != NULL) {
df->adoptTimeZone(timezone);
}
- } else {
+ } else {
intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: date "
"formatter creation failed", 0);
goto error;
diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp
index 3be76332a8..e96ebe8243 100644
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -146,7 +146,9 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
}
//there's no support for relative time in ICU yet
- timeStyle = (DateFormat::EStyle)(timeStyle & ~DateFormat::kRelative);
+ if (timeStyle != DateFormat::NONE) {
+ timeStyle = (DateFormat::EStyle)(timeStyle & ~DateFormat::kRelative);
+ }
zend_class_entry *instance_ce = Z_OBJCE_P(object);
if (instanceof_function(instance_ce, Calendar_ce_ptr)) {
@@ -188,11 +190,11 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
}
if (pattern) {
- df = new SimpleDateFormat(
- UnicodeString(Z_STRVAL_P(format), Z_STRLEN_P(format),
- UnicodeString::kInvariant),
- Locale::createFromName(locale_str),
- status);
+ StringPiece sp(Z_STRVAL_P(format));
+ df = new SimpleDateFormat(
+ UnicodeString::fromUTF8(sp),
+ Locale::createFromName(locale_str),
+ status);
if (U_FAILURE(status)) {
intl_error_set(NULL, status,
diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c
index 5307e426eb..369756ebdb 100644
--- a/ext/intl/formatter/formatter_format.c
+++ b/ext/intl/formatter/formatter_format.c
@@ -68,7 +68,6 @@ PHP_FUNCTION( numfmt_format )
}
if(Z_TYPE_P(number) != IS_DOUBLE && Z_TYPE_P(number) != IS_LONG) {
- SEPARATE_ZVAL_IF_NOT_REF(number);
convert_scalar_to_number(number );
}
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index b5a1902025..0735a7e822 100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -110,7 +110,7 @@ PHP_FUNCTION(grapheme_strpos)
size_t haystack_len, needle_len;
const char *found;
zend_long loffset = 0;
- int32_t offset = 0;
+ int32_t offset = 0, noffset = 0;
zend_long ret_pos;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
@@ -126,6 +126,7 @@ PHP_FUNCTION(grapheme_strpos)
/* we checked that it will fit: */
offset = (int32_t) loffset;
+ noffset = offset >= 0 ? offset : haystack_len + offset;
/* the offset is 'grapheme count offset' so it still might be invalid - we'll check it later */
@@ -134,20 +135,21 @@ PHP_FUNCTION(grapheme_strpos)
RETURN_FALSE;
}
+ if (offset >= 0) {
+ /* quick check to see if the string might be there
+ * I realize that 'offset' is 'grapheme count offset' but will work in spite of that
+ */
+ found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len);
- /* quick check to see if the string might be there
- * I realize that 'offset' is 'grapheme count offset' but will work in spite of that
- */
- found = php_memnstr(haystack + offset, needle, needle_len, haystack + haystack_len);
-
- /* if it isn't there the we are done */
- if (!found) {
- RETURN_FALSE;
- }
+ /* if it isn't there the we are done */
+ if (!found) {
+ RETURN_FALSE;
+ }
- /* if it is there, and if the haystack is ascii, we are all done */
- if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) {
- RETURN_LONG(found - haystack);
+ /* if it is there, and if the haystack is ascii, we are all done */
+ if ( grapheme_ascii_check((unsigned char *)haystack, haystack_len) >= 0 ) {
+ RETURN_LONG(found - haystack);
+ }
}
/* do utf16 part of the strpos */
@@ -195,16 +197,16 @@ PHP_FUNCTION(grapheme_stripos)
RETURN_FALSE;
}
-
is_ascii = ( grapheme_ascii_check((unsigned char*)haystack, haystack_len) >= 0 );
if ( is_ascii ) {
+ int32_t noffset = offset >= 0 ? offset : haystack_len + offset;
needle_dup = estrndup(needle, needle_len);
php_strtolower(needle_dup, needle_len);
haystack_dup = estrndup(haystack, haystack_len);
php_strtolower(haystack_dup, haystack_len);
- found = php_memnstr(haystack_dup + offset, needle_dup, needle_len, haystack_dup + haystack_len);
+ found = php_memnstr(haystack_dup + noffset, needle_dup, needle_len, haystack_dup + haystack_len);
efree(haystack_dup);
efree(needle_dup);
@@ -383,9 +385,9 @@ PHP_FUNCTION(grapheme_substr)
UBreakIterator* bi = NULL;
int sub_str_start_pos, sub_str_end_pos;
int32_t (*iter_func)(UBreakIterator *);
- int no_length = 1;
+ zend_bool no_length = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", (char **)&str, &str_len, &lstart, &length, &no_length) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &str, &str_len, &lstart, &length, &no_length) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
"grapheme_substr: unable to parse input param", 0 );
RETURN_FALSE;
@@ -802,6 +804,10 @@ PHP_FUNCTION(grapheme_extract)
RETURN_FALSE;
}
+ if (lstart < 0) {
+ lstart += str_len;
+ }
+
if ( NULL != next ) {
if ( !Z_ISREF_P(next) ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -810,7 +816,7 @@ PHP_FUNCTION(grapheme_extract)
} else {
ZVAL_DEREF(next);
/* initialize next */
- SEPARATE_ZVAL(next);
+ SEPARATE_ZVAL_NOREF(next);
zval_dtor(next);
ZVAL_LONG(next, lstart);
}
diff --git a/ext/intl/intl_data.h b/ext/intl/intl_data.h
index 12e0a9924e..74b7092fbb 100644
--- a/ext/intl/intl_data.h
+++ b/ext/intl/intl_data.h
@@ -45,7 +45,7 @@ typedef struct _intl_data {
obj = Z_##oclass##_P( object ); \
intl_error_reset( INTL_DATA_ERROR_P(obj) ); \
-/* Check status by error code, if error - exit */
+/* Check status by error code, if error return false */
#define INTL_CHECK_STATUS(err, msg) \
intl_error_set_code( NULL, (err) ); \
if( U_FAILURE((err)) ) \
@@ -54,6 +54,16 @@ typedef struct _intl_data {
RETURN_FALSE; \
}
+/* Check status by error code, if error return null */
+#define INTL_CHECK_STATUS_OR_NULL(err, msg) \
+ intl_error_set_code( NULL, (err) ); \
+ if( U_FAILURE((err)) ) \
+ { \
+ intl_error_set_custom_msg( NULL, msg, 0 ); \
+ RETURN_NULL(); \
+ }
+
+
/* Check status in object, if error return false */
#define INTL_METHOD_CHECK_STATUS(obj, msg) \
intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((obj)) ); \
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 895d803ef9..857c14a005 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -256,9 +256,9 @@ PHP_NAMED_FUNCTION(zif_locale_set_default)
* common code shared by get_primary_language,get_script or get_region or get_variant
* result = 0 if error, 1 if successful , -1 if no value
*/
-static char* get_icu_value_internal( const char* loc_name , char* tag_name, int* result , int fromParseLocale)
+static zend_string* get_icu_value_internal( const char* loc_name , char* tag_name, int* result , int fromParseLocale)
{
- char* tag_value = NULL;
+ zend_string* tag_value = NULL;
int32_t tag_value_len = 512;
int singletonPos = 0;
@@ -274,7 +274,7 @@ static char* get_icu_value_internal( const char* loc_name , char* tag_name, int*
grOffset = findOffset( LOC_GRANDFATHERED , loc_name );
if( grOffset >= 0 ){
if( strcmp(tag_name , LOC_LANG_TAG)==0 ){
- return estrdup(loc_name);
+ return zend_string_init(loc_name, strlen(loc_name), 0);
} else {
/* Since Grandfathered , no value , do nothing , retutn NULL */
return NULL;
@@ -285,7 +285,7 @@ static char* get_icu_value_internal( const char* loc_name , char* tag_name, int*
/* Handle singletons */
if( strcmp(tag_name , LOC_LANG_TAG)==0 ){
if( strlen(loc_name)>1 && (isIDPrefix(loc_name) == 1) ){
- return estrdup(loc_name);
+ return zend_string_init(loc_name, strlen(loc_name), 0);
}
}
@@ -308,36 +308,41 @@ static char* get_icu_value_internal( const char* loc_name , char* tag_name, int*
}
/* Proceed to ICU */
- do{
- tag_value = erealloc( tag_value , buflen );
+ do{
+ if (tag_value) {
+ tag_value = zend_string_realloc( tag_value , buflen, 0);
+ } else {
+ tag_value = zend_string_alloc( buflen, 0);
+ }
tag_value_len = buflen;
if( strcmp(tag_name , LOC_SCRIPT_TAG)==0 ){
- buflen = uloc_getScript ( mod_loc_name ,tag_value , tag_value_len , &status);
+ buflen = uloc_getScript ( mod_loc_name , tag_value->val , tag_value_len , &status);
}
if( strcmp(tag_name , LOC_LANG_TAG )==0 ){
- buflen = uloc_getLanguage ( mod_loc_name ,tag_value , tag_value_len , &status);
+ buflen = uloc_getLanguage ( mod_loc_name , tag_value->val , tag_value_len , &status);
}
if( strcmp(tag_name , LOC_REGION_TAG)==0 ){
- buflen = uloc_getCountry ( mod_loc_name ,tag_value , tag_value_len , &status);
+ buflen = uloc_getCountry ( mod_loc_name , tag_value->val , tag_value_len , &status);
}
if( strcmp(tag_name , LOC_VARIANT_TAG)==0 ){
- buflen = uloc_getVariant ( mod_loc_name ,tag_value , tag_value_len , &status);
+ buflen = uloc_getVariant ( mod_loc_name , tag_value->val , tag_value_len , &status);
}
if( strcmp(tag_name , LOC_CANONICALIZE_TAG)==0 ){
- buflen = uloc_canonicalize ( mod_loc_name ,tag_value , tag_value_len , &status);
+ buflen = uloc_canonicalize ( mod_loc_name , tag_value->val , tag_value_len , &status);
}
if( U_FAILURE( status ) ) {
if( status == U_BUFFER_OVERFLOW_ERROR ) {
status = U_ZERO_ERROR;
+ buflen++; /* add space for \0 */
continue;
}
/* Error in retriving data */
*result = 0;
if( tag_value ){
- efree( tag_value );
+ zend_string_release( tag_value );
}
if( mod_loc_name ){
efree( mod_loc_name);
@@ -350,7 +355,7 @@ static char* get_icu_value_internal( const char* loc_name , char* tag_name, int*
/* No value found */
*result = -1;
if( tag_value ){
- efree( tag_value );
+ zend_string_release( tag_value );
}
if( mod_loc_name ){
efree( mod_loc_name);
@@ -363,6 +368,8 @@ static char* get_icu_value_internal( const char* loc_name , char* tag_name, int*
if( mod_loc_name ){
efree( mod_loc_name);
}
+
+ tag_value->len = strlen(tag_value->val);
return tag_value;
}
/* }}} */
@@ -377,7 +384,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
const char* loc_name = NULL;
size_t loc_name_len = 0;
- char* tag_value = NULL;
+ zend_string* tag_value = NULL;
char* empty_result = "";
int result = 0;
@@ -406,16 +413,14 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
/* No value found */
if( result == -1 ) {
if( tag_value){
- efree( tag_value);
+ zend_string_release( tag_value);
}
RETURN_STRING( empty_result);
}
/* value found */
if( tag_value){
- RETVAL_STRING( tag_value );
- //???
- efree(tag_value);
+ RETVAL_STR( tag_value );
return;
}
@@ -822,7 +827,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr,
smart_str_appendl(loc_name, Z_STRVAL_P(ele_value) , Z_STRLEN_P(ele_value));
return SUCCESS;
} else if(Z_TYPE_P(ele_value) == IS_ARRAY ) {
- HashTable *arr = HASH_OF(ele_value);
+ HashTable *arr = Z_ARRVAL_P(ele_value);
zval *data;
ZEND_HASH_FOREACH_VAL(arr, data) {
@@ -918,7 +923,7 @@ PHP_FUNCTION(locale_compose)
RETURN_FALSE;
}
- hash_arr = HASH_OF( arr );
+ hash_arr = Z_ARRVAL_P( arr );
if( !hash_arr || zend_hash_num_elements( hash_arr ) == 0 )
RETURN_FALSE;
@@ -985,9 +990,9 @@ PHP_FUNCTION(locale_compose)
* e.g. for locale='en_US-x-prv1-prv2-prv3'
* returns a pointer to the string 'prv1-prv2-prv3'
*/
-static char* get_private_subtags(const char* loc_name)
+static zend_string* get_private_subtags(const char* loc_name)
{
- char* result =NULL;
+ zend_string* result =NULL;
int singletonPos = 0;
int len =0;
const char* mod_loc_name =NULL;
@@ -1005,7 +1010,7 @@ static char* get_private_subtags(const char* loc_name)
}
else{
/* result = mod_loc_name + singletonPos +2; */
- result = estrndup(mod_loc_name + singletonPos+2 , (len -( singletonPos +2) ) );
+ result = zend_string_init(mod_loc_name + singletonPos+2 , (len -( singletonPos +2) ), 0);
}
break;
}
@@ -1032,7 +1037,7 @@ static char* get_private_subtags(const char* loc_name)
*/
static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name)
{
- char* key_value = NULL;
+ zend_string* key_value = NULL;
char* cur_key_name = NULL;
char* token = NULL;
char* last_ptr = NULL;
@@ -1052,7 +1057,7 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name)
( strcmp(key_name , LOC_VARIANT_TAG)==0) ){
if( result > 0 && key_value){
/* Tokenize on the "_" or "-" */
- token = php_strtok_r( key_value , DELIMITER ,&last_ptr);
+ token = php_strtok_r( key_value->val , DELIMITER ,&last_ptr);
if( cur_key_name ){
efree( cur_key_name);
}
@@ -1069,10 +1074,15 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name)
}
*/
}
+ if (key_value) {
+ zend_string_release(key_value);
+ }
} else {
if( result == 1 ){
- add_assoc_string( hash_arr, key_name , key_value);
+ add_assoc_str( hash_arr, key_name , key_value);
cur_result = 1;
+ } else if (key_value) {
+ zend_string_release(key_value);
}
}
@@ -1080,9 +1090,6 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name)
efree( cur_key_name);
}
/*if( key_name != LOC_PRIVATE_TAG && key_value){*/
- if( key_value){
- efree(key_value);
- }
return cur_result;
}
/* }}} */
@@ -1144,7 +1151,7 @@ PHP_FUNCTION(locale_get_all_variants)
int result = 0;
char* token = NULL;
- char* variant = NULL;
+ zend_string* variant = NULL;
char* saved_ptr = NULL;
intl_error_reset( NULL );
@@ -1174,7 +1181,7 @@ PHP_FUNCTION(locale_get_all_variants)
variant = get_icu_value_internal( loc_name , LOC_VARIANT_TAG , &result ,0);
if( result > 0 && variant){
/* Tokenize on the "_" or "-" */
- token = php_strtok_r( variant , DELIMITER , &saved_ptr);
+ token = php_strtok_r( variant->val , DELIMITER , &saved_ptr);
add_next_index_stringl( return_value, token , strlen(token));
/* tokenize on the "_" or "-" and stop at singleton if any */
while( (token = php_strtok_r(NULL , DELIMITER, &saved_ptr)) && (strlen(token)>1) ){
@@ -1182,7 +1189,7 @@ PHP_FUNCTION(locale_get_all_variants)
}
}
if( variant ){
- efree( variant );
+ zend_string_release( variant );
}
}
@@ -1241,8 +1248,8 @@ PHP_FUNCTION(locale_filter_matches)
char* token = 0;
char* chrcheck = NULL;
- char* can_lang_tag = NULL;
- char* can_loc_range = NULL;
+ zend_string* can_lang_tag = NULL;
+ zend_string* can_loc_range = NULL;
char* cur_lang_tag = NULL;
char* cur_loc_range = NULL;
@@ -1288,23 +1295,23 @@ PHP_FUNCTION(locale_filter_matches)
}
/* Convert to lower case for case-insensitive comparison */
- cur_lang_tag = ecalloc( 1, strlen(can_lang_tag) + 1);
+ cur_lang_tag = ecalloc( 1, can_lang_tag->len + 1);
/* Convert to lower case for case-insensitive comparison */
- result = strToMatch( can_lang_tag , cur_lang_tag);
+ result = strToMatch( can_lang_tag->val , cur_lang_tag);
if( result == 0) {
efree( cur_lang_tag );
- efree( can_lang_tag );
+ zend_string_release( can_lang_tag );
RETURN_FALSE;
}
- cur_loc_range = ecalloc( 1, strlen(can_loc_range) + 1);
- result = strToMatch( can_loc_range , cur_loc_range );
+ cur_loc_range = ecalloc( 1, can_loc_range->len + 1);
+ result = strToMatch( can_loc_range->val , cur_loc_range );
if( result == 0) {
efree( cur_lang_tag );
- efree( can_lang_tag );
+ zend_string_release( can_lang_tag );
efree( cur_loc_range );
- efree( can_loc_range );
+ zend_string_release( can_loc_range );
RETURN_FALSE;
}
@@ -1322,10 +1329,10 @@ PHP_FUNCTION(locale_filter_matches)
efree( cur_loc_range );
}
if( can_lang_tag){
- efree( can_lang_tag );
+ zend_string_release( can_lang_tag );
}
if( can_loc_range){
- efree( can_loc_range );
+ zend_string_release( can_loc_range );
}
RETURN_TRUE;
}
@@ -1339,10 +1346,10 @@ PHP_FUNCTION(locale_filter_matches)
efree( cur_loc_range );
}
if( can_lang_tag){
- efree( can_lang_tag );
+ zend_string_release( can_lang_tag );
}
if( can_loc_range){
- efree( can_loc_range );
+ zend_string_release( can_loc_range );
}
RETURN_FALSE;
@@ -1416,12 +1423,12 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
int cur_arr_len = 0;
int result = 0;
- char* lang_tag = NULL;
+ zend_string* lang_tag = NULL;
zval* ele_value = NULL;
char** cur_arr = NULL;
char* cur_loc_range = NULL;
- char* can_loc_range = NULL;
+ zend_string* can_loc_range = NULL;
int saved_pos = 0;
zend_string* return_value = NULL;
@@ -1448,16 +1455,16 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
if(canonicalize) {
for(i=0; i<cur_arr_len; i++) {
lang_tag = get_icu_value_internal(cur_arr[i*2], LOC_CANONICALIZE_TAG, &result, 0);
- if(result != 1 || lang_tag == NULL || !lang_tag[0]) {
+ if(result != 1 || lang_tag == NULL || !lang_tag->val[0]) {
if(lang_tag) {
- efree(lang_tag);
+ zend_string_release(lang_tag);
}
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "lookup_loc_range: unable to canonicalize lang_tag" , 0);
LOOKUP_CLEAN_RETURN(NULL);
}
- cur_arr[i*2] = erealloc(cur_arr[i*2], strlen(lang_tag)+1);
- result = strToMatch(lang_tag, cur_arr[i*2]);
- efree(lang_tag);
+ cur_arr[i*2] = erealloc(cur_arr[i*2], lang_tag->len+1);
+ result = strToMatch(lang_tag->val, cur_arr[i*2]);
+ zend_string_release(lang_tag);
if(result == 0) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "lookup_loc_range: unable to canonicalize lang_tag" , 0);
LOOKUP_CLEAN_RETURN(NULL);
@@ -1469,15 +1476,15 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
if(canonicalize) {
/* Canonicalize the loc_range */
can_loc_range = get_icu_value_internal(loc_range, LOC_CANONICALIZE_TAG, &result , 0);
- if( result != 1 || can_loc_range == NULL || !can_loc_range[0]) {
+ if( result != 1 || can_loc_range == NULL || !can_loc_range->val[0]) {
/* Error */
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "lookup_loc_range: unable to canonicalize loc_range" , 0 );
if(can_loc_range) {
- efree(can_loc_range);
+ zend_string_release(can_loc_range);
}
LOOKUP_CLEAN_RETURN(NULL);
} else {
- loc_range = can_loc_range;
+ loc_range = can_loc_range->val;
}
}
@@ -1485,7 +1492,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
/* convert to lower and replace hyphens */
result = strToMatch(loc_range, cur_loc_range);
if(can_loc_range) {
- efree(can_loc_range);
+ zend_string_release(can_loc_range);
}
if(result == 0) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "lookup_loc_range: unable to canonicalize lang_tag" , 0);
@@ -1542,10 +1549,14 @@ PHP_FUNCTION(locale_lookup)
}
if(loc_range_len == 0) {
- loc_range = intl_locale_get_default();
+ if(fallback_loc_str) {
+ loc_range = ZSTR_VAL(fallback_loc_str);
+ } else {
+ loc_range = intl_locale_get_default();
+ }
}
- hash_arr = HASH_OF(arr);
+ hash_arr = Z_ARRVAL_P(arr);
if( !hash_arr || zend_hash_num_elements( hash_arr ) == 0 ) {
RETURN_EMPTY_STRING();
diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c
index e0919ec42b..d3f8416c03 100644
--- a/ext/intl/msgformat/msgformat.c
+++ b/ext/intl/msgformat/msgformat.c
@@ -23,6 +23,7 @@
#include "php_intl.h"
#include "msgformat_class.h"
+#include "msgformat_data.h"
#include "intl_convert.h"
/* {{{ */
diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c
index a20a7e411d..78eb727c61 100644
--- a/ext/intl/msgformat/msgformat_attr.c
+++ b/ext/intl/msgformat/msgformat_attr.c
@@ -21,11 +21,11 @@
#include "php_intl.h"
#include "msgformat_class.h"
#include "msgformat_attr.h"
+#include "msgformat_data.h"
#include "intl_convert.h"
#include <unicode/ustring.h>
-
/* {{{ proto string MessageFormatter::getPattern( )
* Get formatter pattern. }}} */
/* {{{ proto string msgfmt_get_pattern( MessageFormatter $mf )
diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c
index 5aa68e2735..959a4fd5a0 100644
--- a/ext/intl/msgformat/msgformat_format.c
+++ b/ext/intl/msgformat/msgformat_format.c
@@ -104,7 +104,7 @@ PHP_FUNCTION( msgfmt_format_message )
size_t pattern_len = 0;
const char *slocale = NULL;
size_t slocale_len = 0;
- MessageFormatter_object mf = {0};
+ MessageFormatter_object mf;
MessageFormatter_object *mfo = &mf;
/* Parse parameters. */
@@ -117,6 +117,7 @@ PHP_FUNCTION( msgfmt_format_message )
RETURN_FALSE;
}
+ memset(mfo, 0, sizeof(*mfo));
msgformat_data_init(&mfo->mf_data);
if(pattern && pattern_len) {
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp
index ed63105fa7..ce7899edd9 100644
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -264,6 +264,10 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
type = Formattable::kDouble;
} else if (argType == UMSGPAT_ARG_TYPE_SELECT) {
type = Formattable::kString;
+#if U_ICU_VERSION_MAJOR_NUM >= 50
+ } else if (argType == UMSGPAT_ARG_TYPE_SELECTORDINAL) {
+ type = Formattable::kDouble;
+#endif
} else {
type = Formattable::kString;
}
diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c
index 4d63a0169a..349633912b 100644
--- a/ext/intl/msgformat/msgformat_parse.c
+++ b/ext/intl/msgformat/msgformat_parse.c
@@ -97,7 +97,7 @@ PHP_FUNCTION( msgfmt_parse_message )
size_t slocale_len = 0;
char *source = NULL;
size_t src_len = 0;
- MessageFormatter_object mf = {0};
+ MessageFormatter_object mf;
MessageFormatter_object *mfo = &mf;
/* Parse parameters. */
@@ -110,6 +110,7 @@ PHP_FUNCTION( msgfmt_parse_message )
RETURN_FALSE;
}
+ memset(mfo, 0, sizeof(*mfo));
msgformat_data_init(&mfo->mf_data);
if(pattern && pattern_len) {
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index 12bd9fdc74..fd35e57120 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -892,7 +892,7 @@ zend_module_entry intl_module_entry = {
#ifdef COMPILE_DL_INTL
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE( intl )
#endif
diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h
index 638fdef1ca..e672e54087 100644
--- a/ext/intl/php_intl.h
+++ b/ext/intl/php_intl.h
@@ -55,17 +55,13 @@ ZEND_BEGIN_MODULE_GLOBALS(intl)
zend_bool use_exceptions;
ZEND_END_MODULE_GLOBALS(intl)
-/* Macro to access request-wide global variables. */
-#ifdef ZTS
-#define INTL_G(v) ZEND_TSRMG(intl_globals_id, zend_intl_globals *, v)
-#ifdef COMPILE_DL_INTL
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define INTL_G(v) (intl_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_INTL)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
ZEND_EXTERN_MODULE_GLOBALS(intl)
+/* Macro to access request-wide global variables. */
+#define INTL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(intl, v)
PHP_MINIT_FUNCTION(intl);
PHP_MSHUTDOWN_FUNCTION(intl);
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c
index d6b071a249..fd255d57cd 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.c
+++ b/ext/intl/resourcebundle/resourcebundle_class.c
@@ -49,8 +49,6 @@ static void ResourceBundle_object_destroy( zend_object *object )
if (rb->child) {
ures_close( rb->child );
}
-
- //???zend_object_std_dtor( object );
}
/* }}} */
diff --git a/ext/intl/tests/bug53735.phpt b/ext/intl/tests/bug53735.phpt
new file mode 100644
index 0000000000..5fc14e978c
--- /dev/null
+++ b/ext/intl/tests/bug53735.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #53735 NumberFormatter returns NaN when converting float point
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
+--FILE--
+<?php
+
+$fmt = numfmt_create("da_DK", \NumberFormatter::CURRENCY);
+
+var_dump(numfmt_format($fmt, 5.5));
+setlocale(LC_ALL, "da_DK.UTF-8");
+
+var_dump(numfmt_format($fmt, 5.5));
+var_dump(numfmt_format($fmt, "5,5"));
+
+
+$fmt = new \NumberFormatter("de_DE", \NumberFormatter::DECIMAL);
+var_dump($fmt->format(23.25));
+
+$f = new NumberFormatter('hu_HU', NumberFormatter::PERCENT, '#,##0%');
+var_dump($f->format(0.26));
+
+?>
+==DONE==
+--EXPECTF--
+string(%d) "5,50 kr%A"
+string(%d) "5,50 kr%A"
+string(%d) "5,00 kr%A"
+string(5) "23,25"
+string(3) "26%"
+==DONE==
diff --git a/ext/intl/tests/bug67052.phpt b/ext/intl/tests/bug67052.phpt
index 80c7e88017..7f0c4cba51 100644
--- a/ext/intl/tests/bug67052.phpt
+++ b/ext/intl/tests/bug67052.phpt
@@ -17,7 +17,7 @@ setlocale(LC_ALL, $l);
function ut_main()
{
- setlocale(LC_ALL, 'de_DE');
+ setlocale(LC_ALL, 'de_DE.UTF-8');
$fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
$num = "1.234.567,891";
$res_str = $fmt->parse($num)."\n";
@@ -31,5 +31,5 @@ ut_run();
?>
--EXPECT--
1234567,891
-de_DE
+de_DE.UTF-8
diff --git a/ext/intl/tests/bug69374.phpt b/ext/intl/tests/bug69374.phpt
new file mode 100644
index 0000000000..4d9fffab7a
--- /dev/null
+++ b/ext/intl/tests/bug69374.phpt
@@ -0,0 +1,24 @@
+--TEST--
+IntlDateFormatter::formatObject(): returns wrong utf8 value when $format param is utf8 string pattern.
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
+--FILE--
+<?php
+$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
+$pattern1 = '\'tháng\' MM, y'; // yMM format for Vietnamese
+$pattern2 = 'yë…„ MMM'; // yMM format for Korean
+$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
+$date->setTime($millitimestamp);
+echo IntlDateFormatter::formatObject($date, $pattern1, 'vi_VN'), "\n";
+echo IntlDateFormatter::formatObject ($date, $pattern2, 'ko_KR'), "\n";
+?>
+==DONE==
+
+--EXPECTF--
+tháng 04, 2015
+2015ë…„ 4ì›”
+==DONE==
+
+
diff --git a/ext/intl/tests/bug69398.phpt b/ext/intl/tests/bug69398.phpt
new file mode 100644
index 0000000000..ea7dbd5098
--- /dev/null
+++ b/ext/intl/tests/bug69398.phpt
@@ -0,0 +1,22 @@
+--TEST--
+IntlDateFormatter::formatObject(): returns wrong value when time style is NONE.
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') < 0) die('skip for ICU >= 51.1.2'); ?>
+--FILE--
+<?php
+$millitimestamp = 1428133423941.0; // 14:43:43 April 04 2015
+$date = IntlCalendar::createInstance('Asia/Ho_Chi_Minh');
+$date->setTime($millitimestamp);
+echo IntlDateFormatter::formatObject($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'vi_VN'), "\n";
+echo IntlDateFormatter::formatObject ($date, array(IntlDateFormatter::SHORT, IntlDateFormatter::NONE), 'ko_KR'), "\n";
+?>
+==DONE==
+
+--EXPECTF--
+04/04/2015
+15. 4. 4.
+==DONE==
+
+
diff --git a/ext/intl/tests/bug70451.phpt b/ext/intl/tests/bug70451.phpt
new file mode 100644
index 0000000000..75392c8dad
--- /dev/null
+++ b/ext/intl/tests/bug70451.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #70451 IntlChar::charFromName() not consistent with C library or HHVM
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+var_dump(IntlChar::charFromName("RECYCLING SYMBOL FOR TYPE-1 PLASTICS"));
+var_dump(IntlChar::charFromName("sdfasdfasdfasdf"));
+?>
+--EXPECT--
+int(9843)
+NULL
diff --git a/ext/intl/tests/bug70452.phpt b/ext/intl/tests/bug70452.phpt
new file mode 100644
index 0000000000..ee1cd7053a
--- /dev/null
+++ b/ext/intl/tests/bug70452.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70452 string IntlChar::charName() can sometimes return bool(false)
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+// Rely on the default value for the second parameter
+var_dump(IntlChar::charName("A"));
+// Provide a valid option for the second parameter
+var_dump(IntlChar::charName("A", IntlChar::UNICODE_CHAR_NAME));
+// Another valid option, but with no corresponding name for that given option
+// This properly returns an empty string, as expected
+var_dump(IntlChar::charName("A", IntlChar::UNICODE_10_CHAR_NAME));
+// Provide an invalid value for the second parameter
+var_dump(IntlChar::charName("A", 12345));
+?>
+--EXPECT--
+string(22) "LATIN CAPITAL LETTER A"
+string(22) "LATIN CAPITAL LETTER A"
+string(0) ""
+NULL
diff --git a/ext/intl/tests/bug71020.phpt b/ext/intl/tests/bug71020.phpt
new file mode 100644
index 0000000000..368d967efd
--- /dev/null
+++ b/ext/intl/tests/bug71020.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #71020 (Use after free in Collator::sortWithSortKeys)
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+$var_3=new Collator("Whatever");
+for($x=0;$x<0xbb;$x++)
+ $myarray[substr(md5(microtime()),rand(0,26),9) . strval($x)]= substr(md5(microtime()),rand(0,26),9) . strval($x);
+$var_3->sortWithSortKeys($myarray);
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/intl/tests/bug72061.phpt b/ext/intl/tests/bug72061.phpt
new file mode 100644
index 0000000000..782c32c11c
--- /dev/null
+++ b/ext/intl/tests/bug72061.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #72061: Out-of-bounds reads in zif_grapheme_stripos with negative offset
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+var_dump(grapheme_stripos(str_repeat("ABCD", 16384), "A", -201));
+var_dump(grapheme_strpos(str_repeat("ABCD", 16384), "A", -201));
+?>
+DONE
+--EXPECT--
+int(65336)
+int(65336)
+DONE \ No newline at end of file
diff --git a/ext/intl/tests/bug72241.phpt b/ext/intl/tests/bug72241.phpt
new file mode 100644
index 0000000000..397e1e7834
--- /dev/null
+++ b/ext/intl/tests/bug72241.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #72241: get_icu_value_internal out-of-bounds read
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+$var1=str_repeat("A", 1000);
+$out = locale_get_primary_language($var1);
+echo strlen($out) . PHP_EOL;
+echo unpack('H*', $out)[1] . PHP_EOL;
+--EXPECT--
+1000
+61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
+
diff --git a/ext/intl/tests/calendar_before_after_error.phpt b/ext/intl/tests/calendar_before_after_error.phpt
index 938c7a5fb7..7d57b93a33 100644
--- a/ext/intl/tests/calendar_before_after_error.phpt
+++ b/ext/intl/tests/calendar_before_after_error.phpt
@@ -67,9 +67,9 @@ bool(false)
error: 2, IntlCalendar::before() expects exactly 1 parameter, 0 given
error: 2, IntlCalendar::before(): intlcal_before/after: bad arguments
bool(false)
-error: 1, Argument 1 passed to IntlCalendar::after() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to IntlCalendar::after() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to IntlCalendar::before() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to IntlCalendar::before() must be an instance of IntlCalendar, integer given
error: 2, IntlCalendar::after() expects exactly 1 parameter, 2 given
error: 2, IntlCalendar::after(): intlcal_before/after: bad arguments
diff --git a/ext/intl/tests/calendar_clear_error.phpt b/ext/intl/tests/calendar_clear_error.phpt
index 7e9c52b2a5..7ff2ff0867 100644
--- a/ext/intl/tests/calendar_clear_error.phpt
+++ b/ext/intl/tests/calendar_clear_error.phpt
@@ -18,8 +18,9 @@ var_dump($c->clear(-1));
var_dump(intlcal_clear($c, -1));
var_dump(intlcal_clear(1, 2));
--EXPECTF--
+Warning: IntlCalendar::clear() expects at most 1 parameter, 2 given in %s on line %d
-Warning: IntlCalendar::clear(): intlcal_clear: too many arguments in %s on line %d
+Warning: IntlCalendar::clear(): intlcal_clear: bad arguments in %s on line %d
bool(false)
Warning: IntlCalendar::clear(): intlcal_clear: invalid field in %s on line %d
diff --git a/ext/intl/tests/calendar_equals_error.phpt b/ext/intl/tests/calendar_equals_error.phpt
index 8465541c87..a9f164d38f 100644
--- a/ext/intl/tests/calendar_equals_error.phpt
+++ b/ext/intl/tests/calendar_equals_error.phpt
@@ -49,10 +49,10 @@ try {
error: 2, IntlCalendar::equals() expects exactly 1 parameter, 0 given
error: 2, IntlCalendar::equals(): intlcal_equals: bad arguments
bool(false)
-error: 1, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given
+error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, instance of stdClass given
-error: 1, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to IntlCalendar::equals() must be an instance of IntlCalendar, integer given
-error: 1, Argument 2 passed to intlcal_equals() must be an instance of IntlCalendar, array given
+error: 0, Argument 2 passed to intlcal_equals() must be an instance of IntlCalendar, array given
-error: 1, Argument 1 passed to intlcal_equals() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_equals() must be an instance of IntlCalendar, integer given
diff --git a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
index 3d881a781d..5d74a7d72d 100644
--- a/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
+++ b/ext/intl/tests/calendar_get_Least_Greatest_Minimum_Maximum_error.phpt
@@ -98,11 +98,11 @@ bool(false)
Warning: intlcal_get_minimum(): intlcal_get_minimum: invalid field in %s on line %d
bool(false)
-error: 1, Argument 1 passed to intlcal_get_least_maximum() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get_least_maximum() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to intlcal_get_maximum() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get_maximum() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to intlcal_get_greatest_minimum() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get_greatest_minimum() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to intlcal_get_minimum() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get_minimum() must be an instance of IntlCalendar, integer given
diff --git a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
index b29e8ed0cb..88b03f8cdb 100644
--- a/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
+++ b/ext/intl/tests/calendar_get_getActualMaximum_Minumum_error2.phpt
@@ -105,9 +105,9 @@ bool(false)
error: 2, intlcal_get_actual_minimum() expects parameter 2 to be integer, string given
error: 2, intlcal_get_actual_minimum(): intlcal_get_actual_minimum: bad arguments
bool(false)
-error: 1, Argument 1 passed to intlcal_get() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to intlcal_get_actual_maximum() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get_actual_maximum() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to intlcal_get_actual_minimum() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_get_actual_minimum() must be an instance of IntlCalendar, integer given
diff --git a/ext/intl/tests/calendar_isEquivalentTo_error.phpt b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
index ac19e1dd90..35b8fc189a 100644
--- a/ext/intl/tests/calendar_isEquivalentTo_error.phpt
+++ b/ext/intl/tests/calendar_isEquivalentTo_error.phpt
@@ -50,16 +50,16 @@ try {
}
--EXPECT--
-error: 1, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, integer given
error: 2, IntlCalendar::isEquivalentTo() expects exactly 1 parameter, 2 given
error: 2, IntlCalendar::isEquivalentTo(): intlcal_is_equivalent_to: bad arguments
bool(false)
-error: 1, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to IntlCalendar::isEquivalentTo() must be an instance of IntlCalendar, integer given
error: 2, intlcal_is_equivalent_to() expects exactly 2 parameters, 1 given
error: 2, intlcal_is_equivalent_to(): intlcal_is_equivalent_to: bad arguments
bool(false)
-error: 1, Argument 2 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, integer given
+error: 0, Argument 2 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, integer given
-error: 1, Argument 1 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_is_equivalent_to() must be an instance of IntlCalendar, integer given
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
index 8f723cc3c9..417bcb4c23 100644
--- a/ext/intl/tests/calendar_isWeekend_error.phpt
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -21,6 +21,7 @@ var_dump(intlcal_is_weekend($c, "jj"));
var_dump(intlcal_is_weekend(1));
--EXPECTF--
+Warning: IntlCalendar::isWeekend() expects at most 1 parameter, 2 given in %s on line %d
Warning: IntlCalendar::isWeekend(): intlcal_is_weekend: bad arguments in %s on line %d
bool(false)
diff --git a/ext/intl/tests/calendar_setTimeZone_error.phpt b/ext/intl/tests/calendar_setTimeZone_error.phpt
index 410dc86c60..4dee131ef7 100644
--- a/ext/intl/tests/calendar_setTimeZone_error.phpt
+++ b/ext/intl/tests/calendar_setTimeZone_error.phpt
@@ -51,4 +51,4 @@ bool(false)
error: 2, intlcal_set_time_zone() expects exactly 2 parameters, 3 given
error: 2, intlcal_set_time_zone(): intlcal_set_time_zone: bad arguments
bool(false)
-error: 1, Argument 1 passed to intlcal_set_time_zone() must be an instance of IntlCalendar, integer given
+error: 0, Argument 1 passed to intlcal_set_time_zone() must be an instance of IntlCalendar, integer given
diff --git a/ext/intl/tests/collator_get_sort_key_variant4.phpt b/ext/intl/tests/collator_get_sort_key_variant4.phpt
index ed2c9bc175..bd7af6a284 100644
--- a/ext/intl/tests/collator_get_sort_key_variant4.phpt
+++ b/ext/intl/tests/collator_get_sort_key_variant4.phpt
@@ -1,5 +1,5 @@
--TEST--
-collator_get_sort_key() icu >= 55.1
+collator_get_sort_key() icu >= 54.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
diff --git a/ext/intl/tests/collator_get_sort_key_variant5.phpt b/ext/intl/tests/collator_get_sort_key_variant5.phpt
index 52a3af9766..c7717389b7 100644
--- a/ext/intl/tests/collator_get_sort_key_variant5.phpt
+++ b/ext/intl/tests/collator_get_sort_key_variant5.phpt
@@ -2,6 +2,7 @@
collator_get_sort_key() icu >= 55.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') < 0) die('skip for ICU >= 55.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_get_sort_key_variant6.phpt b/ext/intl/tests/collator_get_sort_key_variant6.phpt
new file mode 100644
index 0000000000..d8105d76d4
--- /dev/null
+++ b/ext/intl/tests/collator_get_sort_key_variant6.phpt
@@ -0,0 +1,98 @@
+--TEST--
+collator_get_sort_key() icu >= 56.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Get sort keys using various locales
+ */
+function sort_arrays( $locale, $data )
+{
+ $res_str = '';
+
+ $coll = ut_coll_create( $locale );
+
+ foreach($data as $value) {
+ $res_val = ut_coll_get_sort_key( $coll, $value );
+ $res_str .= "source: ".$value."\n".
+ "key: ".bin2hex($res_val)."\n";
+ }
+
+ return $res_str;
+}
+
+
+function ut_main()
+{
+ $res_str = '';
+
+ // Regular strings keys
+ $test_params = array(
+ 'abc', 'abd', 'aaa',
+ 'аа', 'а', 'z',
+ '', null , '3',
+ 'y' , 'i' , 'k'
+ );
+
+ $res_str .= sort_arrays( 'en_US', $test_params );
+
+ // Sort a non-ASCII array using ru_RU locale.
+ $test_params = array(
+ 'абг', 'абв', 'жжж', 'ÑÑŽÑ'
+ );
+
+ $res_str .= sort_arrays( 'ru_RU', $test_params );
+
+ // Sort an array using Lithuanian locale.
+ $res_str .= sort_arrays( 'lt_LT', $test_params );
+
+ return $res_str . "\n";
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+?>
+--EXPECT--
+source: abc
+key: 292b2d01070107
+source: abd
+key: 292b2f01070107
+source: aaa
+key: 29292901070107
+source: аа
+key: 60060601060106
+source: а
+key: 600601050105
+source: z
+key: 5b01050105
+source:
+key: 0101
+source:
+key: 0101
+source: 3
+key: 1801050105
+source: y
+key: 5901050105
+source: i
+key: 3901050105
+source: k
+key: 3d01050105
+source: абг
+key: 26060c1001070107
+source: абв
+key: 26060c0e01070107
+source: жжж
+key: 262c2c2c01070107
+source: ÑÑŽÑ
+key: 26eef0f401070107
+source: абг
+key: 60060c1001070107
+source: абв
+key: 60060c0e01070107
+source: жжж
+key: 602c2c2c01070107
+source: ÑÑŽÑ
+key: 60eef0f401070107
diff --git a/ext/intl/tests/dateformat_bug68893.phpt b/ext/intl/tests/dateformat_bug68893.phpt
new file mode 100644
index 0000000000..b3faf54342
--- /dev/null
+++ b/ext/intl/tests/dateformat_bug68893.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #68893 Stackoverflow in datefmt_create
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+$f = datefmt_create("en_us", -10000000, 1);
+var_dump($f, intl_get_error_message());
+
+$f = datefmt_create("en_us", 1, -10000000);
+var_dump($f, intl_get_error_message());
+
+?>
+--EXPECT--
+NULL
+string(67) "datefmt_create: invalid date format style: U_ILLEGAL_ARGUMENT_ERROR"
+NULL
+string(67) "datefmt_create: invalid time format style: U_ILLEGAL_ARGUMENT_ERROR"
diff --git a/ext/intl/tests/dateformat_bug71516.phpt b/ext/intl/tests/dateformat_bug71516.phpt
new file mode 100644
index 0000000000..88ba9bf840
--- /dev/null
+++ b/ext/intl/tests/dateformat_bug71516.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71516 IntlDateFormatter losts locale if pattern is set via constructor
+--SKIPIF--
+<?php
+if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
+--FILE--
+<?php
+
+$loc = "ru_RU";
+$goodFormatter = new IntlDateFormatter($loc, IntlDateFormatter::FULL, IntlDateFormatter::FULL, new DateTimeZone("UTC"));
+$badFormatter = new IntlDateFormatter($loc, IntlDateFormatter::FULL, IntlDateFormatter::FULL, new DateTimeZone("UTC"), null, "d MMM");
+$badFormatter2 = new IntlDateFormatter($loc, IntlDateFormatter::FULL, IntlDateFormatter::FULL, new DateTimeZone("UTC"));
+$badFormatter2->setPattern("d MMM");
+
+echo "Formatter without pattern: " . $goodFormatter->getLocale() . PHP_EOL;
+echo "Formatter with pattern: " . $badFormatter->getLocale() . PHP_EOL;
+echo "Formatter with pattern set later: " . $badFormatter2->getLocale() . PHP_EOL;
+
+?>
+==DONE==
+--EXPECT--
+Formatter without pattern: ru
+Formatter with pattern: ru
+Formatter with pattern set later: ru
+==DONE==
diff --git a/ext/intl/tests/formatter_format5.phpt b/ext/intl/tests/formatter_format5.phpt
index cbaf140a0f..0bc4a6679b 100644
--- a/ext/intl/tests/formatter_format5.phpt
+++ b/ext/intl/tests/formatter_format5.phpt
@@ -1,7 +1,8 @@
--TEST--
-numfmt_format() icu >= 54.1
+numfmt_format() icu >= 54.1 && icu < 56.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '54.1') < 0) die('skip for ICU >= 54.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format6.phpt b/ext/intl/tests/formatter_format6.phpt
new file mode 100644
index 0000000000..80894c332b
--- /dev/null
+++ b/ext/intl/tests/formatter_format6.phpt
@@ -0,0 +1,130 @@
+--TEST--
+numfmt_format() icu >= 56.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Format a number using misc locales/patterns.
+ */
+
+/*
+ * TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
+ * currency and percent formatting.
+ */
+
+function ut_main()
+{
+ $styles = array(
+ NumberFormatter::PATTERN_DECIMAL => '##.#####################',
+ NumberFormatter::DECIMAL => '',
+ NumberFormatter::CURRENCY => '',
+ NumberFormatter::PERCENT => '',
+ NumberFormatter::SCIENTIFIC => '',
+ NumberFormatter::SPELLOUT => '@@@@@@@',
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ NumberFormatter::PATTERN_RULEBASED => '#####.###',
+ 1234999, // bad one
+ );
+
+ $integer = array(
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ );
+ $locales = array(
+ 'en_US',
+ 'ru_UA',
+ 'de',
+ 'fr',
+ 'en_UK'
+ );
+
+ $str_res = '';
+ $number = 1234567.891234567890000;
+
+ foreach( $locales as $locale )
+ {
+ $str_res .= "\nLocale is: $locale\n";
+ foreach( $styles as $style => $pattern )
+ {
+ $fmt = ut_nfmt_create( $locale, $style, $pattern );
+
+ if(!$fmt) {
+ $str_res .= "Bad formatter!\n";
+ continue;
+ }
+ $str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
+ }
+ }
+ return $str_res;
+}
+
+include_once( 'ut_common.inc' );
+
+// Run the test
+ut_run();
+
+?>
+--EXPECTREGEX--
+Locale is: en_US
+'1234567.89123457'
+'1,234,567.891'
+'\$1,234,567.89'
+'123,456,789%'
+'1.23456789123457E6'
+'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
+'1,234,567(th|ᵗʰ)'
+'342:56:07'
+'#####.###'
+'USD1,234,567.89'
+
+Locale is: ru_UA
+'1234567,89123457'
+'1 234 567,891'
+'1 234 567,89 ?(грн\.|₴)'
+'123 456 789 ?%'
+'1,23456789123457E6'
+'один миллион двеÑти тридцать четыре тыÑÑчи пÑтьÑот шеÑтьдеÑÑÑ‚ Ñемь целых воÑемьдеÑÑÑ‚ девÑть миллионов Ñто двадцать три тыÑÑчи четыреÑта пÑтьдеÑÑÑ‚ Ñемь Ñтомиллионных'
+'1 234 567.?'
+'1 234 567'
+'#####.###'
+'1 234 567,89 UAH'
+
+Locale is: de
+'1234567,89123457'
+'1.234.567,891'
+'(¤ )?1.234.567,89( ¤)?'
+'123\.456\.789 %'
+'1,23456789123457E6'
+'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf sieben'
+'1.234.567.?'
+'1.234.567'
+'#####.###'
+'1.234.567,89 ¤¤'
+
+Locale is: fr
+'1234567,89123457'
+'1 234 567,891'
+'1 234 567,89 ¤'
+'123 456 789 ?%'
+'1,23456789123457E6'
+'un million deux cent trente-quatre mille cinq cent soixante-sept virgule huit neuf un deux trois quatre cinq sept'
+'1 234 567e'
+'1 234 567'
+'#####.###'
+'1 234 567,89 ¤¤'
+
+Locale is: en_UK
+'1234567.89123457'
+'1,234,567.891'
+'¤1,234,567.89'
+'123,456,789%'
+'1.23456789123457E6'
+'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
+'1,234,567(th|ᵗʰ)'
+'342:56:07'
+'#####.###'
+'¤¤1,234,567.89'
diff --git a/ext/intl/tests/formatter_get_set_text_attribute.phpt b/ext/intl/tests/formatter_get_set_text_attribute.phpt
index 539ff52322..0535da477b 100644
--- a/ext/intl/tests/formatter_get_set_text_attribute.phpt
+++ b/ext/intl/tests/formatter_get_set_text_attribute.phpt
@@ -1,7 +1,8 @@
--TEST--
-numfmt_get/set_text_attribute()
+numfmt_get/set_text_attribute() ICU < 56.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') >= 0) die('skip for ICU < 56.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_get_set_text_attribute_var2.phpt b/ext/intl/tests/formatter_get_set_text_attribute_var2.phpt
new file mode 100644
index 0000000000..f1306094c4
--- /dev/null
+++ b/ext/intl/tests/formatter_get_set_text_attribute_var2.phpt
@@ -0,0 +1,122 @@
+--TEST--
+numfmt_get/set_text_attribute() ICU >= 56.1
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '56.1') < 0) die('skip for ICU >= 56.1'); ?>
+--FILE--
+<?php
+
+/*
+ * Get/set text attribute.
+ */
+
+
+function ut_main()
+{
+ // Array with data for testing
+ $long_str = str_repeat('blah', 100);
+ $attributes = array(
+ 'POSITIVE_PREFIX' => array( NumberFormatter::POSITIVE_PREFIX, '_+_', 12345.1234 ),
+ 'POSITIVE_SUFFIX' => array( NumberFormatter::POSITIVE_SUFFIX, '_+_', 12345.1234 ),
+ 'NEGATIVE_PREFIX' => array( NumberFormatter::NEGATIVE_PREFIX, '_-_', -12345.1234 ),
+ 'NEGATIVE_SUFFIX' => array( NumberFormatter::NEGATIVE_SUFFIX, '_-_', -12345.1234 ),
+ 'PADDING_CHARACTER' => array( NumberFormatter::PADDING_CHARACTER, '^', 12345.1234 ),
+ 'POSITIVE_PREFIX-2' => array( NumberFormatter::POSITIVE_PREFIX, $long_str, 12345.1234 ),
+// 'CURRENCY_CODE' => array( NumberFormatter::CURRENCY_CODE, '_C_', 12345.1234 )
+// 'DEFAULT_RULESET' => array( NumberFormatter::DEFAULT_RULESET, '_DR_', 12345.1234 ),
+// 'PUBLIC_RULESETS' => array( NumberFormatter::PUBLIC_RULESETS, '_PR_', 12345.1234 )
+ );
+
+ $res_str = '';
+
+ $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
+
+ foreach( $attributes as $attr_name => $data )
+ {
+ list( $attr, $new_val, $test_number ) = $data;
+ $res_str .= "\nAttribute $attr_name\n";
+
+ if( $attr == NumberFormatter::PADDING_CHARACTER )
+ ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 );
+
+ // Get default attribute's value
+ $def_val = ut_nfmt_get_text_attribute( $fmt, $attr );
+ if( $def_val === false )
+ $res_str .= "get_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n";
+
+ $res_str .= "Default value: [$def_val]\n";
+ $res_str .= "Formatting number with default value: " . ut_nfmt_format( $fmt, $test_number ) . "\n";
+
+ // Set new attribute's value and see if it works out.
+ $res_val = ut_nfmt_set_text_attribute( $fmt, $attr, $new_val );
+ if( !$res_val )
+ $res_str .= "set_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n";
+
+ // Get attribute value back.
+ $new_val_check = ut_nfmt_get_text_attribute( $fmt, $attr );
+ $res_str .= "New value: [$new_val_check]\n";
+ $res_str .= "Formatting number with new value: " . ut_nfmt_format( $fmt, $test_number ) . "\n";
+
+ // Check if the new value has been set.
+ if( $new_val !== $new_val_check )
+ $res_str .= "ERROR: New $attr_name symbol value has not been set correctly.\n";
+
+ // Restore attribute's value to default
+ ut_nfmt_set_text_attribute( $fmt, $attr, $def_val );
+
+ if( $attr == NumberFormatter::PADDING_CHARACTER )
+ ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 );
+ }
+
+ //
+ $fmt = ut_nfmt_create( "uk_UA", NumberFormatter::CURRENCY );
+ $res_str .= sprintf( "\nCurrency ISO-code for locale 'uk_UA' is: %s\n",
+ ut_nfmt_get_text_attribute( $fmt, NumberFormatter::CURRENCY_CODE ) );
+
+ return $res_str;
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+
+?>
+--EXPECT--
+Attribute POSITIVE_PREFIX
+Default value: []
+Formatting number with default value: 12,345.123
+New value: [_+_]
+Formatting number with new value: _+_12,345.123
+
+Attribute POSITIVE_SUFFIX
+Default value: []
+Formatting number with default value: 12,345.123
+New value: [_+_]
+Formatting number with new value: 12,345.123_+_
+
+Attribute NEGATIVE_PREFIX
+Default value: [-]
+Formatting number with default value: -12,345.123
+New value: [_-_]
+Formatting number with new value: _-_12,345.123
+
+Attribute NEGATIVE_SUFFIX
+Default value: []
+Formatting number with default value: -12,345.123
+New value: [_-_]
+Formatting number with new value: -12,345.123_-_
+
+Attribute PADDING_CHARACTER
+Default value: [ ]
+Formatting number with default value: 12,345.123
+New value: [^]
+Formatting number with new value: ^^^^^^^^^^^12,345.123
+
+Attribute POSITIVE_PREFIX-2
+Default value: []
+Formatting number with default value: 12,345.123
+New value: [blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah]
+Formatting number with new value: blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah12,345.123
+
+Currency ISO-code for locale 'uk_UA' is: UAH
+
+
diff --git a/ext/intl/tests/grapheme.phpt b/ext/intl/tests/grapheme.phpt
index def9110d0d..251b1d142f 100644
--- a/ext/intl/tests/grapheme.phpt
+++ b/ext/intl/tests/grapheme.phpt
@@ -68,9 +68,13 @@ function ut_main()
array( "abc", "a", 0 ),
array( "abc", "a", 0, 0 ),
array( "abc", "a", 1, "false" ),
+ array( "abc", "a", -1, "false" ),
array( "ababc", "a", 1, 2 ),
array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "o", "o", 2, 6 ),
+ array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "o", "o", -1, 6 ),
+ array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "o", "o", -5, 6 ),
array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_a_ring_nfd . "bc", $char_a_ring_nfd, 2, 3 ),
+ array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_a_ring_nfd . "bc", $char_a_ring_nfd, -4, 3 ),
array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "opq", "op", 5 ),
array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "opq", "opq", 5 ),
@@ -91,6 +95,7 @@ function ut_main()
array( "ababc", "ab", 1, 2 ),
array( "ababc", "abc", 1, 2 ),
array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "o" . $char_a_ring_nfd . "bc", "o" . $char_a_ring_nfd . "bc", 2, 6 ),
+ array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "o" . $char_a_ring_nfd . "bc", "o" . $char_a_ring_nfd . "bc", -8, 6 ),
array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_a_ring_nfd . "bc" . $char_a_ring_nfd . "def", $char_a_ring_nfd . "bc" . $char_a_ring_nfd, 2, 3 ),
);
@@ -120,10 +125,12 @@ function ut_main()
$tests = array(
array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O", "o", 2, 6 ),
+ array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "Oo", "o", -6, 6 ),
array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_A_ring_nfd . "bc", $char_a_ring_nfd, 2, 3 ),
array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "O", "o", 5 ),
array( "a" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd, "O", "false" ),
array( "a" . $char_a_ring_nfd . "bc" . $char_O_diaeresis_nfd, $char_o_diaeresis_nfd, 4 ),
+ array( "a" . $char_a_ring_nfd . "bc" . $char_O_diaeresis_nfd, $char_o_diaeresis_nfd, -1, 4 ),
array( $char_o_diaeresis_nfd . "a" . $char_a_ring_nfd . "bc", $char_A_ring_nfd, 2 ),
array( "a" . $char_A_ring_nfd . "bc", $char_a_ring_nfd, 1 ),
array( "Abc", $char_a_ring_nfd, "false" ),
@@ -153,6 +160,7 @@ function ut_main()
array( "aBc", "abC", 0, 0 ),
array( "abc", "aBc", 1, "false" ),
array( "ABabc", "AB", 1, 2 ),
+ array( "ABabc", "AB", -4, 2 ),
array( "abaBc", "aBc", 1, 2 ),
array( "ao" . $char_a_ring_nfd . "bc" . $char_o_diaeresis_nfd . "o" . $char_A_ring_nfd . "bC", "O" . $char_a_ring_nfd . "bC", 2, 6 ),
array( $char_o_diaeresis_nfd . $char_a_ring_nfd . "a" . $char_A_ring_nfd . "bC" . $char_a_ring_nfd . "def", $char_a_ring_nfd . "Bc" . $char_a_ring_nfd, 2, 3 ),
@@ -559,6 +567,7 @@ function ut_main()
array( "abc", 1, 0, 1, "a" ),
array( "abc", 1, 1, 2, "b" ),
array( "abc", 1, 2, 3, "c" ),
+ array( "abc", 1, -2, 2, "b" ),
array( "abc", 0, 2, 2, "" ),
array( "http://news.bbc.co.uk/2/hi/middle_east/7831588.stm", 48, 48 , 50 , "tm" ),
@@ -569,8 +578,11 @@ function ut_main()
array( $char_a_ring_nfd . "bc", 2, 0, 4, $char_a_ring_nfd . "b" ),
array( $char_a_ring_nfd . "bc", 1, 0, 3, $char_a_ring_nfd . "" ),
array( $char_a_ring_nfd . "bcde", 2, 3, 5, "bc" ),
+ array( $char_a_ring_nfd . "bcde", 2, -4, 5, "bc" ),
array( $char_a_ring_nfd . "bcde", 2, 4, 6, "cd" ),
+ array( $char_a_ring_nfd . "bcde", 2, -7, 4, $char_a_ring_nfd . "b" ),
array( $char_a_ring_nfd . "bcde" . $char_a_ring_nfd . "f", 4, 5, 11, "de" . $char_a_ring_nfd . "f" ),
+ array( $char_a_ring_nfd . "bcde" . $char_a_ring_nfd . "f", 4, -6, 11, "de" . $char_a_ring_nfd . "f" ),
array( $char_a_ring_nfd . $char_o_diaeresis_nfd . $char_o_diaeresis_nfd, 3, $char_a_ring_nfd . $char_o_diaeresis_nfd . $char_o_diaeresis_nfd ),
array( $char_a_ring_nfd . $char_o_diaeresis_nfd . $char_o_diaeresis_nfd, 2, $char_a_ring_nfd . $char_o_diaeresis_nfd ),
@@ -794,9 +806,13 @@ find "b" in "abc" - grapheme_strpos = 1 == 1
find "a" in "abc" - grapheme_strpos = 0 == 0
find "a" in "abc" - grapheme_strpos from 0 = 0 == 0
find "a" in "abc" - grapheme_strpos from 1 = false == false
+find "a" in "abc" - grapheme_strpos from -1 = false == false
find "a" in "ababc" - grapheme_strpos from 1 = 2 == 2
find "o" in "aoa%CC%8Abco%CC%88o" - grapheme_strpos from 2 = 6 == 6
+find "o" in "aoa%CC%8Abco%CC%88o" - grapheme_strpos from -1 = 6 == 6
+find "o" in "aoa%CC%8Abco%CC%88o" - grapheme_strpos from -5 = 6 == 6
find "a%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abc" - grapheme_strpos from 2 = 3 == 3
+find "a%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abc" - grapheme_strpos from -4 = 3 == 3
find "op" in "aa%CC%8Abco%CC%88opq" - grapheme_strpos = 5 == 5
find "opq" in "aa%CC%8Abco%CC%88opq" - grapheme_strpos = 5 == 5
find "abc" in "aa%CC%8Abco%CC%88" - grapheme_strpos = false == false
@@ -816,15 +832,18 @@ find "abc" in "abc" - grapheme_strpos from 1 = false == false
find "ab" in "ababc" - grapheme_strpos from 1 = 2 == 2
find "abc" in "ababc" - grapheme_strpos from 1 = 2 == 2
find "oa%CC%8Abc" in "aoa%CC%8Abco%CC%88oa%CC%8Abc" - grapheme_strpos from 2 = 6 == 6
+find "oa%CC%8Abc" in "aoa%CC%8Abco%CC%88oa%CC%8Abc" - grapheme_strpos from -8 = 6 == 6
find "a%CC%8Abca%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abca%CC%8Adef" - grapheme_strpos from 2 = 3 == 3
function grapheme_stripos($haystack, $needle, $offset = 0) {}
find "o" in "aoa%CC%8Abco%CC%88O" - grapheme_stripos from 2 = 6 == 6
+find "o" in "aoa%CC%8Abco%CC%88Oo" - grapheme_stripos from -6 = 6 == 6
find "a%CC%8A" in "o%CC%88a%CC%8AaA%CC%8Abc" - grapheme_stripos from 2 = 3 == 3
find "o" in "aa%CC%8Abco%CC%88O" - grapheme_stripos = 5 == 5
find "O" in "aa%CC%8Abco%CC%88" - grapheme_stripos = false == false
find "o%CC%88" in "aa%CC%8AbcO%CC%88" - grapheme_stripos = 4 == 4
+find "o%CC%88" in "aa%CC%8AbcO%CC%88" - grapheme_stripos from -1 = 4 == 4
find "A%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_stripos = 2 == 2
find "a%CC%8A" in "aA%CC%8Abc" - grapheme_stripos = 1 == 1
find "a%CC%8A" in "Abc" - grapheme_stripos = false == false
@@ -853,6 +872,7 @@ find "ab" in "ABc" - grapheme_stripos from 0 = 0 == 0
find "abC" in "aBc" - grapheme_stripos from 0 = 0 == 0
find "aBc" in "abc" - grapheme_stripos from 1 = false == false
find "AB" in "ABabc" - grapheme_stripos from 1 = 2 == 2
+find "AB" in "ABabc" - grapheme_stripos from -4 = 2 == 2
find "aBc" in "abaBc" - grapheme_stripos from 1 = 2 == 2
find "Oa%CC%8AbC" in "aoa%CC%8Abco%CC%88oA%CC%8AbC" - grapheme_stripos from 2 = 6 == 6
find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_stripos from 2 = 3 == 3
@@ -1094,6 +1114,7 @@ extract from "abc" "0" graphemes - grapheme_extract starting at byte position 0
extract from "abc" "1" graphemes - grapheme_extract starting at byte position 0 with $next = a == a $next=1 == 1
extract from "abc" "1" graphemes - grapheme_extract starting at byte position 1 with $next = b == b $next=2 == 2
extract from "abc" "1" graphemes - grapheme_extract starting at byte position 2 with $next = c == c $next=3 == 3
+extract from "abc" "1" graphemes - grapheme_extract starting at byte position -2 with $next = b == b $next=2 == 2
extract from "abc" "0" graphemes - grapheme_extract starting at byte position 2 with $next = == $next=2 == 2
extract from "http%3A%2F%2Fnews.bbc.co.uk%2F2%2Fhi%2Fmiddle_east%2F7831588.stm" "48" graphemes - grapheme_extract starting at byte position 48 with $next = tm == tm $next=50 == 50
extract from "a%CC%8Abc" "3" graphemes - grapheme_extract = a%CC%8Abc == a%CC%8Abc
@@ -1103,8 +1124,11 @@ extract from "a%CC%8Abc" "3" graphemes - grapheme_extract starting at byte posit
extract from "a%CC%8Abc" "2" graphemes - grapheme_extract starting at byte position 0 with $next = a%CC%8Ab == a%CC%8Ab $next=4 == 4
extract from "a%CC%8Abc" "1" graphemes - grapheme_extract starting at byte position 0 with $next = a%CC%8A == a%CC%8A $next=3 == 3
extract from "a%CC%8Abcde" "2" graphemes - grapheme_extract starting at byte position 3 with $next = bc == bc $next=5 == 5
+extract from "a%CC%8Abcde" "2" graphemes - grapheme_extract starting at byte position -4 with $next = bc == bc $next=5 == 5
extract from "a%CC%8Abcde" "2" graphemes - grapheme_extract starting at byte position 4 with $next = cd == cd $next=6 == 6
+extract from "a%CC%8Abcde" "2" graphemes - grapheme_extract starting at byte position -7 with $next = a%CC%8Ab == a%CC%8Ab $next=4 == 4
extract from "a%CC%8Abcdea%CC%8Af" "4" graphemes - grapheme_extract starting at byte position 5 with $next = dea%CC%8Af == dea%CC%8Af $next=11 == 11
+extract from "a%CC%8Abcdea%CC%8Af" "4" graphemes - grapheme_extract starting at byte position -6 with $next = dea%CC%8Af == dea%CC%8Af $next=11 == 11
extract from "a%CC%8Ao%CC%88o%CC%88" "3" graphemes - grapheme_extract = a%CC%8Ao%CC%88o%CC%88 == a%CC%8Ao%CC%88o%CC%88
extract from "a%CC%8Ao%CC%88o%CC%88" "2" graphemes - grapheme_extract = a%CC%8Ao%CC%88 == a%CC%8Ao%CC%88
extract from "a%CC%8Ao%CC%88c" "1" graphemes - grapheme_extract = a%CC%8A == a%CC%8A
diff --git a/ext/intl/tests/locale_bug66289.phpt b/ext/intl/tests/locale_bug66289.phpt
new file mode 100644
index 0000000000..6afd821b5a
--- /dev/null
+++ b/ext/intl/tests/locale_bug66289.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #66289 Locale::lookup incorrectly returns en or en_US if locale is empty
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+
+ini_set("intl.default_locale", "en-US");
+$availableLocales = array('fr_FR', 'de', 'es_ES', 'es_419', 'en_US');
+var_dump(locale_lookup($availableLocales, false, true, 'fr_FR'));
+var_dump(locale_lookup($availableLocales, false, true, null));
+
+$availableLocales = array('fr_FR', 'de', 'es_ES', 'es_419');
+var_dump(locale_lookup($availableLocales, false, true, 'fr_FR'));
+
+ini_set("intl.default_locale", "de-DE");
+$availableLocales = array(Locale::getDefault());
+var_dump(locale_lookup($availableLocales, false, true));
+
+?>
+==DONE==
+--EXPECT--
+string(5) "fr_fr"
+string(5) "en_us"
+string(5) "fr_fr"
+string(5) "de_de"
+==DONE==
diff --git a/ext/intl/tests/msgfmt_bug70484.phpt b/ext/intl/tests/msgfmt_bug70484.phpt
new file mode 100644
index 0000000000..9d0bdc4ee8
--- /dev/null
+++ b/ext/intl/tests/msgfmt_bug70484.phpt
@@ -0,0 +1,97 @@
+--TEST--
+Bug #70484 selectordinal doesn't work with named parameters
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '5.0') < 0)
+ die('skip for ICU 5.0+');
+--FILE--
+<?php
+
+$locale = array("de", "fr", "en", "ru",);
+
+$data = array(42, 42.42, 2147483643, 2147483643.12345, 5);
+
+foreach ($locale as $lc) {
+ echo "$lc string key\n";
+ $m = new MessageFormatter($lc, "{n, selectordinal, =5 {five} zero {#-zero} one {#-one} two {#-two} few {#-few} many {#-many} other {#-other}}");
+ foreach ($data as $i) {
+ var_dump($m->format(array("n" => $i)));
+ if ($m->getErrorCode()) {
+ echo "$lc $i ", $m->getErrorMessage();
+ }
+ }
+ echo "\n";
+
+ echo "$lc numeric key\n";
+ $m = new MessageFormatter($lc, "{0, selectordinal, =5 {five} zero {#-zero} one {#-one} two {#-two} few {#-few} many {#-many} other {#-other}}");
+ foreach ($data as $i) {
+ var_dump($m->format(array($i)));
+ if ($m->getErrorCode()) {
+ echo "$lc $i ", $m->getErrorMessage();
+ }
+ }
+ echo "\n";
+}
+
+?>
+==DONE==
+--EXPECT--
+de string key
+string(8) "42-other"
+string(11) "42,42-other"
+string(19) "2.147.483.643-other"
+string(23) "2.147.483.643,123-other"
+string(4) "five"
+
+de numeric key
+string(8) "42-other"
+string(11) "42,42-other"
+string(19) "2.147.483.643-other"
+string(23) "2.147.483.643,123-other"
+string(4) "five"
+
+fr string key
+string(8) "42-other"
+string(11) "42,42-other"
+string(22) "2 147 483 643-other"
+string(26) "2 147 483 643,123-other"
+string(4) "five"
+
+fr numeric key
+string(8) "42-other"
+string(11) "42,42-other"
+string(22) "2 147 483 643-other"
+string(26) "2 147 483 643,123-other"
+string(4) "five"
+
+en string key
+string(6) "42-two"
+string(11) "42.42-other"
+string(17) "2,147,483,643-few"
+string(23) "2,147,483,643.123-other"
+string(4) "five"
+
+en numeric key
+string(6) "42-two"
+string(11) "42.42-other"
+string(17) "2,147,483,643-few"
+string(23) "2,147,483,643.123-other"
+string(4) "five"
+
+ru string key
+string(8) "42-other"
+string(11) "42,42-other"
+string(22) "2 147 483 643-other"
+string(26) "2 147 483 643,123-other"
+string(4) "five"
+
+ru numeric key
+string(8) "42-other"
+string(11) "42,42-other"
+string(22) "2 147 483 643-other"
+string(26) "2 147 483 643,123-other"
+string(4) "five"
+
+==DONE==
diff --git a/ext/intl/tests/timezone_IDforWindowsID_basic.phpt b/ext/intl/tests/timezone_IDforWindowsID_basic.phpt
new file mode 100644
index 0000000000..4127d8e31c
--- /dev/null
+++ b/ext/intl/tests/timezone_IDforWindowsID_basic.phpt
@@ -0,0 +1,46 @@
+--TEST--
+IntlTimeZone::getIDForWindowsID basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '52') < 0)
+ die('skip for ICU >= 52');
+--FILE--
+<?php
+
+$tzs = array(
+ 'Gnomeregan' => array(NULL),
+ 'India Standard Time' => array(NULL),
+ 'Pacific Standard Time' => array('001', 'CA', 'MX', 'US', 'ZZ'),
+ 'Romance Standard Time' => array('001', 'BE', 'DK', 'ES', 'FR'),
+);
+
+foreach ($tzs as $tz => $regions) {
+ echo "** $tz\n";
+ foreach ($regions as $region) {
+ var_dump(IntlTimeZone::getIDForWindowsID($tz, $region));
+ if (intl_get_error_code() != U_ZERO_ERROR) {
+ echo "Error: ", intl_get_error_message(), "\n";
+ }
+ }
+}
+
+--EXPECT--
+** Gnomeregan
+bool(false)
+Error: intltz_get_windows_id: Unknown windows timezone: U_ILLEGAL_ARGUMENT_ERROR
+** India Standard Time
+string(13) "Asia/Calcutta"
+** Pacific Standard Time
+string(19) "America/Los_Angeles"
+string(17) "America/Vancouver"
+string(15) "America/Tijuana"
+string(19) "America/Los_Angeles"
+string(7) "PST8PDT"
+** Romance Standard Time
+string(12) "Europe/Paris"
+string(15) "Europe/Brussels"
+string(17) "Europe/Copenhagen"
+string(13) "Europe/Madrid"
+string(12) "Europe/Paris"
diff --git a/ext/intl/tests/timezone_getCanonicalID_error.phpt b/ext/intl/tests/timezone_getCanonicalID_error.phpt
index e268e216a8..b29ca67701 100644
--- a/ext/intl/tests/timezone_getCanonicalID_error.phpt
+++ b/ext/intl/tests/timezone_getCanonicalID_error.phpt
@@ -11,7 +11,6 @@ ini_set("intl.error_level", E_WARNING);
var_dump(IntlTimeZone::getCanonicalID());
var_dump(IntlTimeZone::getCanonicalID(array()));
var_dump(IntlTimeZone::getCanonicalID("foo\x81"));
-var_dump(IntlTimeZone::getCanonicalID('foobar', null));
--EXPECTF--
@@ -28,8 +27,3 @@ bool(false)
Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
bool(false)
-
-Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in %s:%d
-Stack trace:
-#0 {main}
- thrown in %s on line %d
diff --git a/ext/intl/tests/timezone_hasSameRules_error.phpt b/ext/intl/tests/timezone_hasSameRules_error.phpt
index 5fb5bdde7a..0e9b4a8bd6 100644
--- a/ext/intl/tests/timezone_hasSameRules_error.phpt
+++ b/ext/intl/tests/timezone_hasSameRules_error.phpt
@@ -31,9 +31,9 @@ try {
}
--EXPECT--
-int(1)
+int(0)
string(99) "Argument 1 passed to IntlTimeZone::hasSameRules() must be an instance of IntlTimeZone, string given"
-int(1)
+int(0)
string(92) "Argument 1 passed to intltz_has_same_rules() must be an instance of IntlTimeZone, null given"
diff --git a/ext/intl/tests/timezone_windowsID_basic.phpt b/ext/intl/tests/timezone_windowsID_basic.phpt
new file mode 100644
index 0000000000..dd48f016e2
--- /dev/null
+++ b/ext/intl/tests/timezone_windowsID_basic.phpt
@@ -0,0 +1,43 @@
+--TEST--
+IntlTimeZone::getWindowsID basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('intl'))
+ die('skip intl extension not enabled');
+if (version_compare(INTL_ICU_VERSION, '52') < 0)
+ die('skip for ICU >= 52');
+--FILE--
+<?php
+
+$tzs = array(
+ 'America/Bogota',
+ 'America/Havana',
+ 'America/Indiana/Knox',
+ 'America/Los_Angeles',
+ 'Azeroth/Kalimdor/Durotar',
+ 'Africa/Casablanca',
+ 'Asia/Singapore',
+ 'Australia/Perth',
+ 'Europe/London',
+ 'Europe/Istanbul',
+);
+
+foreach ($tzs as $tz) {
+ var_dump(IntlTimeZone::getWindowsID($tz));
+ if (intl_get_error_code() != U_ZERO_ERROR) {
+ echo "Error: ", intl_get_error_message(), "\n";
+ }
+}
+
+--EXPECT--
+string(24) "SA Pacific Standard Time"
+string(21) "Eastern Standard Time"
+string(21) "Central Standard Time"
+string(21) "Pacific Standard Time"
+bool(false)
+Error: intltz_get_windows_id: Unknown system timezone: U_ILLEGAL_ARGUMENT_ERROR
+string(21) "Morocco Standard Time"
+string(23) "Singapore Standard Time"
+string(26) "W. Australia Standard Time"
+string(17) "GMT Standard Time"
+string(20) "Turkey Standard Time"
diff --git a/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt b/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt
new file mode 100644
index 0000000000..4e381289b3
--- /dev/null
+++ b/ext/intl/tests/uconverter_getAvailable_wrongparam_001.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Check the function UConverter::getAvailable with parameter wrong
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php UConverter::getAvailable("This is an ascii string"); ?>
+--EXPECTF--
+Warning: UConverter::getAvailable() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
index d1e8e2e0a6..f67e55ae4e 100644
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -439,6 +439,17 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_void, 0, 0, 0)
ZEND_END_ARG_INFO()
+#if U_ICU_VERSION_MAJOR_NUM >= 52
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_getWindowsID, 0, ZEND_RETURN_VALUE, 1)
+ ZEND_ARG_INFO(0, timezone)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(ainfo_tz_getIDForWindowsID, 0, ZEND_RETURN_VALUE, 1)
+ ZEND_ARG_INFO(0, timezone)
+ ZEND_ARG_INFO(0, region)
+ZEND_END_ARG_INFO()
+#endif
+
/* }}} */
/* {{{ TimeZone_class_functions
@@ -475,6 +486,10 @@ static zend_function_entry TimeZone_class_functions[] = {
PHP_ME_MAPPING(toDateTimeZone, intltz_to_date_time_zone, ainfo_tz_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getErrorCode, intltz_get_error_code, ainfo_tz_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getErrorMessage, intltz_get_error_message, ainfo_tz_void, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM >= 52
+ PHP_ME_MAPPING(getWindowsID, intltz_get_windows_id, ainfo_tz_getWindowsID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME_MAPPING(getIDForWindowsID, intltz_get_id_for_windows_id, ainfo_tz_getIDForWindowsID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+#endif
PHP_FE_END
};
/* }}} */
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index c46b448bbe..20c0e02480 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -440,7 +440,7 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time)
U_CFUNC PHP_FUNCTION(intltz_get_offset)
{
- UDate date;
+ double date;
zend_bool local;
zval *rawOffsetArg,
*dstOffsetArg;
@@ -458,7 +458,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset)
TIMEZONE_METHOD_FETCH_OBJECT;
- to->utimezone->getOffset(date, (UBool) local, rawOffset, dstOffset,
+ to->utimezone->getOffset((UDate) date, (UBool) local, rawOffset, dstOffset,
TIMEZONE_ERROR_CODE(to));
INTL_METHOD_CHECK_STATUS(to, "intltz_get_offset: error obtaining offset");
@@ -647,3 +647,81 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_message)
message = intl_error_get_message(TIMEZONE_ERROR_P(to));
RETURN_STR(message);
}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 52
+/* {{{ proto string IntlTimeZone::getWindowsID(string $timezone)
+ proto string intltz_get_windows_id(string $timezone)
+Translate a system timezone (e.g. "America/Los_Angeles" into a
+Windows Timezone (e.g. "Pacific Standard Time")
+ */
+U_CFUNC PHP_FUNCTION(intltz_get_windows_id)
+{
+ zend_string *id, *winID;
+ UnicodeString uID, uWinID;
+ UErrorCode error;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &id) == FAILURE) {
+ return;
+ }
+
+ error = U_ZERO_ERROR;
+ if (intl_stringFromChar(uID, id->val, id->len, &error) == FAILURE) {
+ intl_error_set(NULL, error,
+ "intltz_get_windows_id: could not convert time zone id to UTF-16", 0);
+ RETURN_FALSE;
+ }
+
+ error = U_ZERO_ERROR;
+ TimeZone::getWindowsID(uID, uWinID, error);
+ INTL_CHECK_STATUS(error, "intltz_get_windows_id: Unable to get timezone from windows ID");
+ if (uWinID.length() == 0) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_windows_id: Unknown system timezone", 0);
+ RETURN_FALSE;
+ }
+
+ error = U_ZERO_ERROR;
+ winID = intl_convert_utf16_to_utf8(uWinID.getBuffer(), uWinID.length(), &error);
+ INTL_CHECK_STATUS(error, "intltz_get_windows_id: could not convert time zone id to UTF-8");
+ RETURN_STR(winID);
+}
+/* }}} */
+
+/* {{{ proto string IntlTimeZone::getIDForWindowsID(string $timezone[, string $region = NULL])
+ proto string intltz_get_id_for_windows_id(string $timezone[, string $region = NULL])
+Translate a windows timezone (e.g. "Pacific Time Zone" into a
+System Timezone (e.g. "America/Los_Angeles")
+ */
+U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id)
+{
+ zend_string *winID, *region = NULL, *id;
+ UnicodeString uWinID, uID;
+ UErrorCode error;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|S", &winID, &region) == FAILURE) {
+ return;
+ }
+
+ error = U_ZERO_ERROR;
+ if (intl_stringFromChar(uWinID, winID->val, winID->len, &error) == FAILURE) {
+ intl_error_set(NULL, error,
+ "intltz_get_id_for_windows_id: could not convert time zone id to UTF-16", 0);
+ RETURN_FALSE;
+ }
+
+ error = U_ZERO_ERROR;
+ TimeZone::getIDForWindowsID(uWinID, region ? region->val : NULL, uID, error);
+ INTL_CHECK_STATUS(error, "intltz_get_id_for_windows_id: Unable to get windows ID for timezone");
+ if (uID.length() == 0) {
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
+ "intltz_get_windows_id: Unknown windows timezone", 0);
+ RETURN_FALSE;
+ }
+
+ error = U_ZERO_ERROR;
+ id = intl_convert_utf16_to_utf8(uID.getBuffer(), uID.length(), &error);
+ INTL_CHECK_STATUS(error, "intltz_get_id_for_windows_id: could not convert time zone id to UTF-8");
+ RETURN_STR(id);
+}
+/* }}} */
+#endif
diff --git a/ext/intl/timezone/timezone_methods.h b/ext/intl/timezone/timezone_methods.h
index 29d72913fd..6e6fa3f472 100644
--- a/ext/intl/timezone/timezone_methods.h
+++ b/ext/intl/timezone/timezone_methods.h
@@ -65,4 +65,9 @@ PHP_FUNCTION(intltz_get_error_code);
PHP_FUNCTION(intltz_get_error_message);
+#if U_ICU_VERSION_MAJOR_NUM >= 52
+PHP_FUNCTION(intltz_get_windows_id);
+PHP_FUNCTION(intltz_get_id_for_windows_id);
+#endif
+
#endif /* #ifndef TIMEZONE_METHODS_H */
diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c
index 9a4cee97b0..96e52a15fd 100644
--- a/ext/intl/transliterator/transliterator_class.c
+++ b/ext/intl/transliterator/transliterator_class.c
@@ -269,9 +269,15 @@ static zval *Transliterator_read_property( zval *object, zval *member, int type,
static void Transliterator_write_property( zval *object, zval *member, zval *value,
void **cache_slot )
{
+ zend_class_entry *scope;
TRANSLITERATOR_PROPERTY_HANDLER_PROLOG;
- if( ( EG( scope ) != Transliterator_ce_ptr ) &&
+ if (EG(fake_scope)) {
+ scope = EG(fake_scope);
+ } else {
+ scope = zend_get_executed_scope();
+ }
+ if( ( scope != Transliterator_ce_ptr ) &&
( zend_binary_strcmp( "id", sizeof( "id" ) - 1,
Z_STRVAL_P( member ), Z_STRLEN_P( member ) ) == 0 ) )
{
diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c
index e7b0870891..f0e5dcd2e8 100644
--- a/ext/intl/transliterator/transliterator_methods.c
+++ b/ext/intl/transliterator/transliterator_methods.c
@@ -332,7 +332,6 @@ PHP_FUNCTION( transliterator_transliterate )
int res;
if(Z_TYPE_P( arg1 ) != IS_STRING )
{
- SEPARATE_ZVAL( arg1 );
convert_to_string( arg1 );
}
object = &tmp_object;
diff --git a/ext/intl/uchar/tests/basic-functionality.phpt b/ext/intl/uchar/tests/basic-functionality.phpt
index eb8e4fb261..b61e129051 100644
--- a/ext/intl/uchar/tests/basic-functionality.phpt
+++ b/ext/intl/uchar/tests/basic-functionality.phpt
@@ -1,5 +1,7 @@
--TEST--
IntlChar basic functionality
+--SKIPIF--
+<?php if (!extension_loaded('intl')) die("skip requires ext/intl") ?>
--FILE--
<?php
diff --git a/ext/intl/uchar/tests/bug70453.phpt b/ext/intl/uchar/tests/bug70453.phpt
new file mode 100644
index 0000000000..4b3024e241
--- /dev/null
+++ b/ext/intl/uchar/tests/bug70453.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70453 (IntlChar::foldCase() incorrect arguments and missing constants)
+--SKIPIF--
+<?php if (!extension_loaded('intl')) die("skip requires ext/intl") ?>
+--FILE--
+<?php
+$method = new ReflectionMethod('IntlChar', 'foldCase');
+$param = $method->getParameters()[1];
+var_dump($param->name, $param->isOptional(), $param->isPassedByReference());
+var_dump(IntlChar::foldCase('I', IntlChar::FOLD_CASE_DEFAULT));
+var_dump(IntlChar::foldCase('I', IntlChar::FOLD_CASE_EXCLUDE_SPECIAL_I));
+?>
+--EXPECT--
+string(7) "options"
+bool(true)
+bool(false)
+string(1) "i"
+string(2) "ı"
diff --git a/ext/intl/uchar/tests/bug70454.phpt b/ext/intl/uchar/tests/bug70454.phpt
new file mode 100644
index 0000000000..351bb65243
--- /dev/null
+++ b/ext/intl/uchar/tests/bug70454.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70454 (IntlChar::forDigit second parameter should be optional)
+--SKIPIF--
+<?php if (!extension_loaded('intl')) die("skip requires ext/intl") ?>
+--FILE--
+<?php
+var_dump(IntlChar::forDigit(0));
+var_dump(IntlChar::forDigit(3));
+var_dump(IntlChar::forDigit(3, 10));
+var_dump(IntlChar::forDigit(10));
+var_dump(IntlChar::forDigit(10, 16));
+?>
+--EXPECT--
+int(48)
+int(51)
+int(51)
+int(0)
+int(97)
diff --git a/ext/intl/uchar/tests/bug70455.phpt b/ext/intl/uchar/tests/bug70455.phpt
new file mode 100644
index 0000000000..00ee8984a0
--- /dev/null
+++ b/ext/intl/uchar/tests/bug70455.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #70455 Missing constant: IntlChar::NO_NUMERIC_VALUE
+--SKIPIF--
+<?php if (!extension_loaded('intl')) die("skip requires ext/intl") ?>
+--FILE--
+<?php
+$value = IntlChar::getNumericValue("x");
+var_dump($value);
+var_dump($value === IntlChar::NO_NUMERIC_VALUE);
+?>
+--EXPECT--
+float(-123456789)
+bool(true)
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c
index 0dbe9c9cf8..266c62821b 100644
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -32,7 +32,7 @@ static inline int convert_cp(UChar32* pcp, zval *zcp) {
return SUCCESS;
}
-/* {{{ proto string IntlChar::chr(int|string $char)
+/* {{{ proto string IntlChar::chr(int|string $codepoint)
* Converts a numeric codepoint to UTF-8
* Acts as an identify function when given a valid UTF-8 encoded codepoint
*/
@@ -59,7 +59,7 @@ IC_METHOD(chr) {
}
/* }}} */
-/* {{{ proto int IntlChar::ord(int|string $codepoint)
+/* {{{ proto int IntlChar::ord(int|string $character)
* Converts a UTf-8 encoded codepoint to its integer U32 value
* Acts as an identity function when passed a valid integer codepoint
*/
@@ -79,7 +79,7 @@ IC_METHOD(ord) {
}
/* }}} */
-/* {{{ proto bool IntlChar::hasBinaryProperty(int|string $char, int $property) */
+/* {{{ proto bool IntlChar::hasBinaryProperty(int|string $codepoint, int $property) */
ZEND_BEGIN_ARG_INFO_EX(hasBinaryProperty_arginfo, 0, ZEND_RETURN_VALUE, 2)
ZEND_ARG_INFO(0, codepoint)
ZEND_ARG_INFO(0, property)
@@ -98,7 +98,7 @@ IC_METHOD(hasBinaryProperty) {
}
/* }}} */
-/* {{{ proto int IntlChar::getIntPropertyValue(int|string $char, int $property) */
+/* {{{ proto int IntlChar::getIntPropertyValue(int|string $codepoint, int $property) */
ZEND_BEGIN_ARG_INFO_EX(getIntPropertyValue_arginfo, 0, ZEND_RETURN_VALUE, 2)
ZEND_ARG_INFO(0, codepoint)
ZEND_ARG_INFO(0, property)
@@ -147,7 +147,7 @@ IC_METHOD(getIntPropertyMaxValue) {
}
/* }}} */
-/* {{{ proto float IntlChar::getNumericValue(int|string $char) */
+/* {{{ proto float IntlChar::getNumericValue(int|string $codepoint) */
ZEND_BEGIN_ARG_INFO_EX(getNumericValue_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, codepoint)
ZEND_END_ARG_INFO();
@@ -164,7 +164,7 @@ IC_METHOD(getNumericValue) {
}
/* }}} */
-/* {{{ proto void IntlChar::enumCharTypes(callable $cb) */
+/* {{{ proto void IntlChar::enumCharTypes(callable $callback) */
ZEND_BEGIN_ARG_INFO_EX(enumCharTypes_arginfo, 0, ZEND_RETURN_VALUE, 0)
ZEND_ARG_INFO(0, callback)
ZEND_END_ARG_INFO();
@@ -209,7 +209,7 @@ IC_METHOD(enumCharTypes) {
}
/* }}} */
-/* {{{ proto int IntlChar::getBlockCode(int|string $char) */
+/* {{{ proto int IntlChar::getBlockCode(int|string $codepoint) */
ZEND_BEGIN_ARG_INFO_EX(getBlockCode_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, codepoint)
ZEND_END_ARG_INFO()
@@ -226,7 +226,7 @@ IC_METHOD(getBlockCode) {
}
/* }}} */
-/* {{{ proto string IntlChar::charName(int|string $char, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */
+/* {{{ proto string IntlChar::charName(int|string $codepoint, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */
ZEND_BEGIN_ARG_INFO_EX(charName_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, codepoint)
ZEND_ARG_INFO(0, nameChoice)
@@ -241,7 +241,7 @@ IC_METHOD(charName) {
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &nameChoice) == FAILURE) ||
(convert_cp(&cp, zcp) == FAILURE)) {
- return;
+ RETURN_NULL();
}
buffer_len = u_charName(cp, (UCharNameChoice)nameChoice, NULL, 0, &error);
@@ -250,13 +250,13 @@ IC_METHOD(charName) {
buffer_len = u_charName(cp, (UCharNameChoice)nameChoice, ZSTR_VAL(buffer), ZSTR_LEN(buffer) + 1, &error);
if (U_FAILURE(error)) {
zend_string_free(buffer);
- INTL_CHECK_STATUS(error, "Failure getting character name");
+ INTL_CHECK_STATUS_OR_NULL(error, "Failure getting character name");
}
RETURN_NEW_STR(buffer);
}
/* }}} */
-/* {{{ proto int IntlChar::charFromName(string $name, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */
+/* {{{ proto int IntlChar::charFromName(string $characterName, int $nameChoice = IntlChar::UNICODE_CHAR_NAME) */
ZEND_BEGIN_ARG_INFO_EX(charFromName_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, characterName)
ZEND_ARG_INFO(0, nameChoice)
@@ -269,11 +269,11 @@ IC_METHOD(charFromName) {
UErrorCode error = U_ZERO_ERROR;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &name, &name_len, &nameChoice) == FAILURE) {
- return;
+ RETURN_NULL();
}
ret = u_charFromName((UCharNameChoice)nameChoice, name, &error);
- INTL_CHECK_STATUS(error, NULL);
+ INTL_CHECK_STATUS_OR_NULL(error, NULL);
RETURN_LONG(ret);
}
/* }}} */
@@ -374,7 +374,7 @@ IC_METHOD(getPropertyEnum) {
}
/* }}} */
-/* {{{ proto string IntlChar::getPropertyValueName(int $prop, int $val[, int $nameChoice = IntlChar::LONG_PROPERTY_NAME) */
+/* {{{ proto string IntlChar::getPropertyValueName(int $property, int $value[, int $nameChoice = IntlChar::LONG_PROPERTY_NAME) */
ZEND_BEGIN_ARG_INFO_EX(getPropertyValueName_arginfo, 0, ZEND_RETURN_VALUE, 2)
ZEND_ARG_INFO(0, property)
ZEND_ARG_INFO(0, value)
@@ -417,9 +417,10 @@ IC_METHOD(getPropertyValueEnum) {
}
/* }}} */
-/* {{{ proto int|string IntlChar::foldCase(int|string $char, int $options = IntlChar::FOLD_CASE_DEFAULT) */
+/* {{{ proto int|string IntlChar::foldCase(int|string $codepoint, int $options = IntlChar::FOLD_CASE_DEFAULT) */
ZEND_BEGIN_ARG_INFO_EX(foldCase_arginfo, 0, ZEND_RETURN_VALUE, 1)
- ZEND_ARG_INFO(0, foldCase)
+ ZEND_ARG_INFO(0, codepoint)
+ ZEND_ARG_INFO(0, options)
ZEND_END_ARG_INFO();
IC_METHOD(foldCase) {
UChar32 cp, ret;
@@ -444,7 +445,7 @@ IC_METHOD(foldCase) {
}
/* }}} */
-/* {{{ proto int IntlChar::digit(int|string $char[, int $radix = 10]) */
+/* {{{ proto int IntlChar::digit(int|string $codepoint[, int $radix = 10]) */
ZEND_BEGIN_ARG_INFO_EX(digit_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, codepoint)
ZEND_ARG_INFO(0, radix)
@@ -478,7 +479,7 @@ ZEND_END_ARG_INFO();
IC_METHOD(forDigit) {
zend_long digit, radix = 10;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &digit, &radix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &digit, &radix) == FAILURE) {
return;
}
@@ -486,7 +487,7 @@ IC_METHOD(forDigit) {
}
/* }}} */
-/* {{{ proto array IntlChar::charAge(int|string $char) */
+/* {{{ proto array IntlChar::charAge(int|string $codepoint) */
ZEND_BEGIN_ARG_INFO_EX(charAge_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, codepoint)
ZEND_END_ARG_INFO();
@@ -525,7 +526,7 @@ IC_METHOD(getUnicodeVersion) {
}
/* }}} */
-/* {{{ proto string IntlChar::getFC_NFKC_Closure(int|string $char) */
+/* {{{ proto string IntlChar::getFC_NFKC_Closure(int|string $codepoint) */
ZEND_BEGIN_ARG_INFO_EX(getFC_NFKC_Closure_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, codepoint)
ZEND_END_ARG_INFO();
@@ -562,7 +563,7 @@ IC_METHOD(getFC_NFKC_Closure) {
}
/* }}} */
-/* {{{ proto bool IntlChar::<name>(int|string $char) */
+/* {{{ proto bool IntlChar::<name>(int|string $codepoint) */
#define IC_BOOL_METHOD_CHAR(name) \
ZEND_BEGIN_ARG_INFO_EX(name##_arginfo, 0, ZEND_RETURN_VALUE, 1) \
ZEND_ARG_INFO(0, codepoint) \
@@ -604,7 +605,7 @@ IC_BOOL_METHOD_CHAR(isJavaIDPart)
#undef IC_BOOL_METHOD_CHAR
/* }}} */
-/* {{{ proto int IntlChar::<name>(int|string $char) */
+/* {{{ proto int IntlChar::<name>(int|string $codepoint) */
#define IC_INT_METHOD_CHAR(name) \
ZEND_BEGIN_ARG_INFO_EX(name##_arginfo, 0, ZEND_RETURN_VALUE, 1) \
ZEND_ARG_INFO(0, codepoint) \
@@ -622,7 +623,7 @@ IC_INT_METHOD_CHAR(charDigitValue)
#undef IC_INT_METHOD_CHAR
/* }}} */
-/* {{{ proto int|string IntlChar::<name>(int|string $char)
+/* {{{ proto int|string IntlChar::<name>(int|string $codepoint)
* Returns a utf-8 character if codepoint was passed as a utf-8 sequence
* Returns an int otherwise
*/
@@ -734,6 +735,9 @@ int php_uchar_minit(INIT_FUNC_ARGS) {
zend_declare_class_constant_string(ce, "UNICODE_VERSION", sizeof("UNICODE_VERISON")-1, U_UNICODE_VERSION);
IC_CONSTL("CODEPOINT_MIN", UCHAR_MIN_VALUE)
IC_CONSTL("CODEPOINT_MAX", UCHAR_MAX_VALUE)
+ IC_CONSTL("FOLD_CASE_DEFAULT", U_FOLD_CASE_DEFAULT)
+ IC_CONSTL("FOLD_CASE_EXCLUDE_SPECIAL_I", U_FOLD_CASE_EXCLUDE_SPECIAL_I)
+ zend_declare_class_constant_double(ce, "NO_NUMERIC_VALUE", sizeof("NO_NUMERIC_VALUE")-1, U_NO_NUMERIC_VALUE);
/* All enums used by the uchar APIs. There are a LOT of them,
* so they're separated out into include files,
diff --git a/ext/json/json.c b/ext/json/json.c
index 79b9278513..d3c6111d4d 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -13,6 +13,7 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Omar Kilani <omar@php.net> |
+ | Jakub Zelenka <bukka@php.net> |
+----------------------------------------------------------------------+
*/
@@ -48,7 +49,7 @@ static PHP_FUNCTION(json_last_error_msg);
PHP_JSON_API zend_class_entry *php_json_serializable_ce;
-ZEND_DECLARE_MODULE_GLOBALS(json)
+PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json)
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_json_encode, 0, 0, 1)
@@ -92,6 +93,10 @@ static const zend_function_entry json_serializable_interface[] = {
};
/* }}} */
+/* Register constant for options and errors */
+#define PHP_JSON_REGISTER_CONSTANT(_name, _value) \
+ REGISTER_LONG_CONSTANT(_name, _value, CONST_CS | CONST_PERSISTENT);
+
/* {{{ MINIT */
static PHP_MINIT_FUNCTION(json)
{
@@ -100,32 +105,36 @@ static PHP_MINIT_FUNCTION(json)
INIT_CLASS_ENTRY(ce, "JsonSerializable", json_serializable_interface);
php_json_serializable_ce = zend_register_internal_interface(&ce);
- REGISTER_LONG_CONSTANT("JSON_HEX_TAG", PHP_JSON_HEX_TAG, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_HEX_AMP", PHP_JSON_HEX_AMP, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_HEX_APOS", PHP_JSON_HEX_APOS, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_HEX_QUOT", PHP_JSON_HEX_QUOT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_UNESCAPED_SLASHES", PHP_JSON_UNESCAPED_SLASHES, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_PRETTY_PRINT", PHP_JSON_PRETTY_PRINT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_UNESCAPED_UNICODE", PHP_JSON_UNESCAPED_UNICODE, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_PARTIAL_OUTPUT_ON_ERROR", PHP_JSON_PARTIAL_OUTPUT_ON_ERROR, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_PRESERVE_ZERO_FRACTION", PHP_JSON_PRESERVE_ZERO_FRACTION, CONST_CS | CONST_PERSISTENT);
-
- REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_STATE_MISMATCH", PHP_JSON_ERROR_STATE_MISMATCH, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_CTRL_CHAR", PHP_JSON_ERROR_CTRL_CHAR, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_SYNTAX", PHP_JSON_ERROR_SYNTAX, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_UTF8", PHP_JSON_ERROR_UTF8, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_RECURSION", PHP_JSON_ERROR_RECURSION, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_INF_OR_NAN", PHP_JSON_ERROR_INF_OR_NAN, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_UNSUPPORTED_TYPE", PHP_JSON_ERROR_UNSUPPORTED_TYPE, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_INVALID_PROPERTY_NAME", PHP_JSON_ERROR_INVALID_PROPERTY_NAME, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_ERROR_UTF16", PHP_JSON_ERROR_UTF16, CONST_CS | CONST_PERSISTENT);
-
- REGISTER_LONG_CONSTANT("JSON_OBJECT_AS_ARRAY", PHP_JSON_OBJECT_AS_ARRAY, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("JSON_BIGINT_AS_STRING", PHP_JSON_BIGINT_AS_STRING, CONST_CS | CONST_PERSISTENT);
+ /* options for json_encode */
+ PHP_JSON_REGISTER_CONSTANT("JSON_HEX_TAG", PHP_JSON_HEX_TAG);
+ PHP_JSON_REGISTER_CONSTANT("JSON_HEX_AMP", PHP_JSON_HEX_AMP);
+ PHP_JSON_REGISTER_CONSTANT("JSON_HEX_APOS", PHP_JSON_HEX_APOS);
+ PHP_JSON_REGISTER_CONSTANT("JSON_HEX_QUOT", PHP_JSON_HEX_QUOT);
+ PHP_JSON_REGISTER_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT);
+ PHP_JSON_REGISTER_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK);
+ PHP_JSON_REGISTER_CONSTANT("JSON_UNESCAPED_SLASHES", PHP_JSON_UNESCAPED_SLASHES);
+ PHP_JSON_REGISTER_CONSTANT("JSON_PRETTY_PRINT", PHP_JSON_PRETTY_PRINT);
+ PHP_JSON_REGISTER_CONSTANT("JSON_UNESCAPED_UNICODE", PHP_JSON_UNESCAPED_UNICODE);
+ PHP_JSON_REGISTER_CONSTANT("JSON_PARTIAL_OUTPUT_ON_ERROR", PHP_JSON_PARTIAL_OUTPUT_ON_ERROR);
+ PHP_JSON_REGISTER_CONSTANT("JSON_PRESERVE_ZERO_FRACTION", PHP_JSON_PRESERVE_ZERO_FRACTION);
+ PHP_JSON_REGISTER_CONSTANT("JSON_UNESCAPED_LINE_TERMINATORS", PHP_JSON_UNESCAPED_LINE_TERMINATORS);
+
+ /* options for json_decode */
+ PHP_JSON_REGISTER_CONSTANT("JSON_OBJECT_AS_ARRAY", PHP_JSON_OBJECT_AS_ARRAY);
+ PHP_JSON_REGISTER_CONSTANT("JSON_BIGINT_AS_STRING", PHP_JSON_BIGINT_AS_STRING);
+
+ /* json error constants */
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_STATE_MISMATCH", PHP_JSON_ERROR_STATE_MISMATCH);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_CTRL_CHAR", PHP_JSON_ERROR_CTRL_CHAR);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_SYNTAX", PHP_JSON_ERROR_SYNTAX);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_UTF8", PHP_JSON_ERROR_UTF8);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_RECURSION", PHP_JSON_ERROR_RECURSION);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_INF_OR_NAN", PHP_JSON_ERROR_INF_OR_NAN);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_UNSUPPORTED_TYPE", PHP_JSON_ERROR_UNSUPPORTED_TYPE);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_INVALID_PROPERTY_NAME", PHP_JSON_ERROR_INVALID_PROPERTY_NAME);
+ PHP_JSON_REGISTER_CONSTANT("JSON_ERROR_UTF16", PHP_JSON_ERROR_UTF16);
return SUCCESS;
}
@@ -167,7 +176,7 @@ zend_module_entry json_module_entry = {
#ifdef COMPILE_DL_JSON
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(json)
#endif
@@ -245,7 +254,7 @@ static PHP_FUNCTION(json_decode)
return;
}
- JSON_G(error_code) = 0;
+ JSON_G(error_code) = PHP_JSON_ERROR_NONE;
if (!str_len) {
JSON_G(error_code) = PHP_JSON_ERROR_SYNTAX;
diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c
index c3aa348626..62df102847 100644
--- a/ext/json/json_encoder.c
+++ b/ext/json/json_encoder.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -321,7 +321,7 @@ static void php_json_escape_string(smart_str *buf, char *s, size_t len, int opti
do {
us = (unsigned char)s[pos];
- if (us >= 0x80 && !(options & PHP_JSON_UNESCAPED_UNICODE)) {
+ if (us >= 0x80 && (!(options & PHP_JSON_UNESCAPED_UNICODE) || us == 0xE2)) {
/* UTF-8 character */
us = php_next_utf8_char((const unsigned char *)s, len, &pos, &status);
if (status != SUCCESS) {
@@ -332,6 +332,15 @@ static void php_json_escape_string(smart_str *buf, char *s, size_t len, int opti
smart_str_appendl(buf, "null", 4);
return;
}
+ /* Escape U+2028/U+2029 line terminators, UNLESS both
+ JSON_UNESCAPED_UNICODE and
+ JSON_UNESCAPED_LINE_TERMINATORS were provided */
+ if ((options & PHP_JSON_UNESCAPED_UNICODE)
+ && ((options & PHP_JSON_UNESCAPED_LINE_TERMINATORS)
+ || us < 0x2028 || us > 0x2029)) {
+ smart_str_appendl(buf, &s[pos - 3], 3);
+ continue;
+ }
/* From http://en.wikipedia.org/wiki/UTF16 */
if (us >= 0x10000) {
unsigned int next_us;
@@ -448,6 +457,7 @@ static void php_json_encode_serializable_object(smart_str *buf, zval *val, int o
zend_class_entry *ce = Z_OBJCE_P(val);
zval retval, fname;
HashTable* myht;
+ int origin_error_code;
if (Z_TYPE_P(val) == IS_ARRAY) {
myht = Z_ARRVAL_P(val);
@@ -461,8 +471,10 @@ static void php_json_encode_serializable_object(smart_str *buf, zval *val, int o
return;
}
+
ZVAL_STRING(&fname, "jsonSerialize");
+ origin_error_code = JSON_G(error_code);
if (FAILURE == call_user_function_ex(EG(function_table), val, &fname, &retval, 0, NULL, 1, NULL) || Z_TYPE(retval) == IS_UNDEF) {
zend_throw_exception_ex(NULL, 0, "Failed calling %s::jsonSerialize()", ZSTR_VAL(ce->name));
smart_str_appendl(buf, "null", sizeof("null") - 1);
@@ -470,6 +482,7 @@ static void php_json_encode_serializable_object(smart_str *buf, zval *val, int o
return;
}
+ JSON_G(error_code) = origin_error_code;
if (EG(exception)) {
/* Error already raised */
zval_ptr_dtor(&retval);
diff --git a/ext/json/json_parser.tab.c b/ext/json/json_parser.tab.c
index ad19e4fa10..02002d681b 100644
--- a/ext/json/json_parser.tab.c
+++ b/ext/json/json_parser.tab.c
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.6.5. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.6.5"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -65,7 +65,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -98,6 +98,13 @@ int json_yydebug = 1;
#define PHP_JSON_USE_1(uvr, uv1) PHP_JSON_USE(uvr); PHP_JSON_USE(uv1)
#define PHP_JSON_USE_2(uvr, uv1, uv2) PHP_JSON_USE(uvr); PHP_JSON_USE(uv1); PHP_JSON_USE(uv2)
+#define PHP_JSON_DEPTH_DEC --parser->depth
+#define PHP_JSON_DEPTH_INC \
+ if (parser->max_depth && parser->depth >= parser->max_depth) { \
+ parser->scanner.errcode = PHP_JSON_ERROR_DEPTH; \
+ YYERROR; \
+ } \
+ ++parser->depth
@@ -106,20 +113,19 @@ int json_yydebug = 1;
#define yyparse php_json_yyparse
#define yylex php_json_yylex
#define yyerror php_json_yyerror
-#define yylval php_json_yylval
-#define yychar php_json_yychar
#define yydebug php_json_yydebug
#define yynerrs php_json_yynerrs
+
/* Copy the first part of user declarations. */
-# ifndef YY_NULL
+# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
+# define YY_NULLPTR nullptr
# else
-# define YY_NULL 0
+# define YY_NULLPTR 0
# endif
# endif
@@ -133,9 +139,9 @@ int json_yydebug = 1;
/* In a future release of Bison, this section will be replaced
by #include "json_parser.tab.h". */
-#ifndef YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
-# define YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
-/* Enabling traces. */
+#ifndef YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
+# define YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -143,22 +149,21 @@ int json_yydebug = 1;
extern int php_json_yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- PHP_JSON_T_NUL = 258,
- PHP_JSON_T_TRUE = 259,
- PHP_JSON_T_FALSE = 260,
- PHP_JSON_T_INT = 261,
- PHP_JSON_T_DOUBLE = 262,
- PHP_JSON_T_STRING = 263,
- PHP_JSON_T_ESTRING = 264,
- PHP_JSON_T_EOI = 265,
- PHP_JSON_T_ERROR = 266
- };
+ enum yytokentype
+ {
+ PHP_JSON_T_NUL = 258,
+ PHP_JSON_T_TRUE = 259,
+ PHP_JSON_T_FALSE = 260,
+ PHP_JSON_T_INT = 261,
+ PHP_JSON_T_DOUBLE = 262,
+ PHP_JSON_T_STRING = 263,
+ PHP_JSON_T_ESTRING = 264,
+ PHP_JSON_T_EOI = 265,
+ PHP_JSON_T_ERROR = 266
+ };
#endif
/* Tokens. */
#define PHP_JSON_T_NUL 258
@@ -171,10 +176,10 @@ extern int php_json_yydebug;
#define PHP_JSON_T_EOI 265
#define PHP_JSON_T_ERROR 266
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+
+union YYSTYPE
{
@@ -185,29 +190,18 @@ typedef union YYSTYPE
} pair;
+};
-} YYSTYPE;
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int php_json_yyparse (void *YYPARSE_PARAM);
-#else
-int php_json_yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
int php_json_yyparse (php_json_parser *parser);
-#else
-int php_json_yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
+#endif /* !YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
@@ -215,20 +209,8 @@ int php_json_yyparse ();
/* Unqualified %code blocks. */
-int php_json_yylex(union YYSTYPE *value, php_json_parser *parser);
-void php_json_yyerror(php_json_parser *parser, char const *msg);
-void php_json_parser_object_init(php_json_parser *parser, zval *object);
-int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
-void php_json_parser_array_init(zval *object);
-void php_json_parser_array_append(zval *array, zval *zvalue);
-
-#define PHP_JSON_DEPTH_DEC --parser->depth
-#define PHP_JSON_DEPTH_INC \
- if (parser->max_depth && parser->depth >= parser->max_depth) { \
- parser->scanner.errcode = PHP_JSON_ERROR_DEPTH; \
- YYERROR; \
- } \
- ++parser->depth
+static int php_json_yylex(union YYSTYPE *value, php_json_parser *parser);
+static void php_json_yyerror(php_json_parser *parser, char const *msg);
@@ -245,11 +227,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -269,8 +248,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -292,6 +270,33 @@ typedef short int yytype_int16;
# endif
#endif
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
@@ -299,24 +304,26 @@ typedef short int yytype_int16;
# define YYUSE(E) /* empty */
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -334,8 +341,7 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
@@ -347,8 +353,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -364,7 +370,7 @@ YYID (yyi)
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
@@ -372,15 +378,13 @@ YYID (yyi)
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -390,7 +394,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -415,16 +419,16 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
@@ -443,7 +447,7 @@ union yyalloc
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
- while (YYID (0))
+ while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
@@ -459,17 +463,19 @@ union yyalloc
#define YYNNTS 16
/* YYNRULES -- Number of rules. */
#define YYNRULES 36
-/* YYNRULES -- Number of states. */
+/* YYNSTATES -- Number of states. */
#define YYNSTATES 45
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 266
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -502,37 +508,13 @@ static const yytype_uint8 yytranslate[] =
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 6, 9, 10, 15, 17, 19, 20,
- 22, 24, 28, 31, 35, 38, 39, 44, 46, 48,
- 49, 51, 53, 57, 60, 62, 64, 66, 68, 70,
- 72, 74, 76, 78, 80, 82, 84
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 19, 0, -1, 32, 10, -1, 32, 33, -1, -1,
- 12, 21, 23, 22, -1, 13, -1, 14, -1, -1,
- 24, -1, 25, -1, 24, 15, 25, -1, 24, 33,
- -1, 31, 16, 32, -1, 31, 33, -1, -1, 17,
- 27, 29, 28, -1, 14, -1, 13, -1, -1, 30,
- -1, 32, -1, 30, 15, 32, -1, 30, 33, -1,
- 8, -1, 9, -1, 20, -1, 26, -1, 8, -1,
- 9, -1, 6, -1, 7, -1, 3, -1, 4, -1,
- 5, -1, 33, -1, 11, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 92, 92, 98, 105, 105, 113, 114, 123, 126,
- 130, 136, 142, 149, 154, 161, 161, 169, 170, 179,
- 182, 186, 191, 196, 203, 204, 208, 209, 210, 211,
- 212, 213, 214, 215, 216, 217, 221
+ 0, 89, 89, 95, 103, 102, 120, 121, 130, 133,
+ 137, 144, 151, 158, 163, 171, 170, 188, 189, 198,
+ 201, 205, 210, 215, 222, 223, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 240
};
#endif
@@ -547,13 +529,13 @@ static const char *const yytname[] =
"PHP_JSON_T_ERROR", "'{'", "'}'", "']'", "','", "':'", "'['", "$accept",
"start", "object", "$@1", "object_end", "members", "member", "pair",
"array", "$@2", "array_end", "elements", "element", "key", "value",
- "errlex", YY_NULL
+ "errlex", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -561,46 +543,18 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 18, 19, 19, 21, 20, 22, 22, 23, 23,
- 24, 24, 24, 25, 25, 27, 26, 28, 28, 29,
- 29, 30, 30, 30, 31, 31, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 33
-};
+#define YYPACT_NINF -18
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 2, 2, 0, 4, 1, 1, 0, 1,
- 1, 3, 2, 3, 2, 0, 4, 1, 1, 0,
- 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-18)))
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 0, 32, 33, 34, 30, 31, 28, 29, 36, 4,
- 15, 0, 26, 27, 0, 35, 8, 19, 1, 2,
- 3, 24, 25, 0, 9, 10, 0, 0, 20, 21,
- 6, 7, 5, 0, 12, 0, 14, 18, 17, 16,
- 0, 23, 11, 13, 22
-};
+#define YYTABLE_NINF -1
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 11, 12, 16, 32, 23, 24, 25, 13, 17,
- 39, 27, 28, 26, 14, 15
-};
+#define yytable_value_is_error(Yytable_value) \
+ 0
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -18
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int8 yypact[] =
{
-2, -18, -18, -18, -18, -18, -18, -18, -18, -18,
@@ -610,17 +564,35 @@ static const yytype_int8 yypact[] =
-2, -18, -18, -18, -18
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 32, 33, 34, 30, 31, 28, 29, 36, 4,
+ 15, 0, 26, 27, 0, 35, 8, 19, 1, 2,
+ 3, 24, 25, 0, 9, 10, 0, 0, 20, 21,
+ 6, 7, 5, 0, 12, 0, 14, 18, 17, 16,
+ 0, 23, 11, 13, 22
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-18, -18, -18, -18, -18, -18, -18, -11, -18, -18,
-18, -18, -18, -18, -17, 0
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 11, 12, 16, 32, 23, 24, 25, 13, 17,
+ 39, 27, 28, 26, 14, 15
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
29, 1, 2, 3, 4, 5, 6, 7, 8, 8,
@@ -629,12 +601,6 @@ static const yytype_uint8 yytable[] =
22, 30, 31, 37, 38
};
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-18)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
static const yytype_int8 yycheck[] =
{
17, 3, 4, 5, 6, 7, 8, 9, 11, 11,
@@ -643,8 +609,8 @@ static const yytype_int8 yycheck[] =
9, 13, 14, 13, 14
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 11, 12,
@@ -654,30 +620,34 @@ static const yytype_uint8 yystos[] =
15, 33, 25, 32, 32
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 18, 19, 19, 21, 20, 22, 22, 23, 23,
+ 24, 24, 24, 25, 25, 27, 26, 28, 28, 29,
+ 29, 30, 30, 30, 31, 31, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 33
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 2, 0, 4, 1, 1, 0, 1,
+ 1, 3, 2, 3, 2, 0, 4, 1, 1, 0,
+ 1, 1, 3, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
#define YYRECOVERING() (!!yyerrstatus)
@@ -694,27 +664,15 @@ do \
else \
{ \
yyerror (parser, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
+ YYERROR; \
+ } \
+while (0)
/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+#define YYTERROR 1
+#define YYERRCODE 256
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval, parser)
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -724,58 +682,47 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value, parser); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, parser); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, php_json_parser *parser)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- php_json_parser *parser;
-#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
+ YYUSE (parser);
if (!yyvaluep)
return;
- YYUSE (parser);
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}
@@ -783,23 +730,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, php_json_parser *parser)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep, parser)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- php_json_parser *parser;
-#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
YYFPRINTF (yyoutput, ")");
@@ -810,16 +745,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, parser)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -830,50 +757,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule, php_json_parser *parser)
-#else
static void
-yy_reduce_print (yyvsp, yyrule, parser)
- YYSTYPE *yyvsp;
- int yyrule;
- php_json_parser *parser;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, php_json_parser *parser)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , parser);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , parser);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule, parser); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, parser); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -887,7 +806,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -910,15 +829,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -934,16 +846,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -973,27 +877,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1016,12 +920,11 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = YY_NULLPTR;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@@ -1029,10 +932,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
int yycount = 0;
/* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
@@ -1081,11 +980,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break;
}
yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
}
}
}
@@ -1105,10 +1006,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
# undef YYCASE_
}
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
if (*yymsg_alloc < yysize)
{
@@ -1145,133 +1048,143 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, php_json_parser *parser)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep, parser)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- php_json_parser *parser;
-#endif
{
YYUSE (yyvaluep);
YYUSE (parser);
-
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
switch (yytype)
{
- case 3: /* PHP_JSON_T_NUL */
+ case 3: /* PHP_JSON_T_NUL */
+
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 4: /* PHP_JSON_T_TRUE */
+ case 4: /* PHP_JSON_T_TRUE */
- { zval_dtor(&((*yyvaluep).value)); };
+ { zval_dtor(&((*yyvaluep).value)); }
- break;
- case 5: /* PHP_JSON_T_FALSE */
+ break;
- { zval_dtor(&((*yyvaluep).value)); };
+ case 5: /* PHP_JSON_T_FALSE */
- break;
- case 6: /* PHP_JSON_T_INT */
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 7: /* PHP_JSON_T_DOUBLE */
+ case 6: /* PHP_JSON_T_INT */
- { zval_dtor(&((*yyvaluep).value)); };
+ { zval_dtor(&((*yyvaluep).value)); }
- break;
- case 8: /* PHP_JSON_T_STRING */
+ break;
- { zval_dtor(&((*yyvaluep).value)); };
+ case 7: /* PHP_JSON_T_DOUBLE */
- break;
- case 9: /* PHP_JSON_T_ESTRING */
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 10: /* PHP_JSON_T_EOI */
+ case 8: /* PHP_JSON_T_STRING */
- { zval_dtor(&((*yyvaluep).value)); };
+ { zval_dtor(&((*yyvaluep).value)); }
- break;
- case 11: /* PHP_JSON_T_ERROR */
+ break;
- { zval_dtor(&((*yyvaluep).value)); };
+ case 9: /* PHP_JSON_T_ESTRING */
- break;
- case 19: /* start */
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 20: /* object */
+ case 10: /* PHP_JSON_T_EOI */
- { zval_dtor(&((*yyvaluep).value)); };
+ { zval_dtor(&((*yyvaluep).value)); }
- break;
- case 23: /* members */
+ break;
- { zval_dtor(&((*yyvaluep).value)); };
+ case 11: /* PHP_JSON_T_ERROR */
- break;
- case 24: /* member */
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 25: /* pair */
+ case 19: /* start */
- { zend_string_release(((*yyvaluep).pair).key); zval_dtor(&((*yyvaluep).pair).val); };
+ { zval_dtor(&((*yyvaluep).value)); }
- break;
- case 26: /* array */
+ break;
- { zval_dtor(&((*yyvaluep).value)); };
+ case 20: /* object */
- break;
- case 29: /* elements */
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 30: /* element */
+ case 23: /* members */
- { zval_dtor(&((*yyvaluep).value)); };
+ { zval_dtor(&((*yyvaluep).value)); }
- break;
- case 31: /* key */
+ break;
- { zval_dtor(&((*yyvaluep).value)); };
+ case 24: /* member */
- break;
- case 32: /* value */
+ { zval_dtor(&((*yyvaluep).value)); }
- { zval_dtor(&((*yyvaluep).value)); };
+ break;
- break;
- case 33: /* errlex */
+ case 25: /* pair */
- { zval_dtor(&((*yyvaluep).value)); };
+ { zend_string_release(((*yyvaluep).pair).key); zval_dtor(&((*yyvaluep).pair).val); }
+
+ break;
+
+ case 26: /* array */
+
+ { zval_dtor(&((*yyvaluep).value)); }
+
+ break;
+
+ case 29: /* elements */
+
+ { zval_dtor(&((*yyvaluep).value)); }
+
+ break;
+
+ case 30: /* element */
+
+ { zval_dtor(&((*yyvaluep).value)); }
+
+ break;
+
+ case 31: /* key */
+
+ { zval_dtor(&((*yyvaluep).value)); }
+
+ break;
+
+ case 32: /* value */
+
+ { zval_dtor(&((*yyvaluep).value)); }
+
+ break;
+
+ case 33: /* errlex */
+
+ { zval_dtor(&((*yyvaluep).value)); }
+
+ break;
- break;
default:
- break;
+ break;
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1281,56 +1194,18 @@ yydestruct (yymsg, yytype, yyvaluep, parser)
| yyparse. |
`----------*/
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
int
yyparse (php_json_parser *parser)
-#else
-int
-yyparse (parser)
- php_json_parser *parser;
-#endif
-#endif
{
/* The lookahead symbol. */
int yychar;
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
-#else
+/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
-static YYSTYPE yyval_default;
-# define YY_INITIAL_VALUE(Value) = Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
@@ -1340,8 +1215,8 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
@@ -1409,23 +1284,23 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -1433,22 +1308,22 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -1457,10 +1332,10 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1489,7 +1364,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex (&yylval, parser);
}
if (yychar <= YYEOF)
@@ -1554,7 +1429,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1570,30 +1445,42 @@ yyreduce:
case 2:
{
- ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[(1) - (2)].value));
- ZVAL_COPY_VALUE(parser->return_value, &(yyvsp[(1) - (2)].value));
- PHP_JSON_USE((yyvsp[(2) - (2)].value)); YYACCEPT;
+ ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[-1].value));
+ ZVAL_COPY_VALUE(parser->return_value, &(yyvsp[-1].value));
+ PHP_JSON_USE((yyvsp[0].value)); YYACCEPT;
}
+
break;
case 3:
{
- PHP_JSON_USE_2((yyval.value), (yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
+ PHP_JSON_USE_2((yyval.value), (yyvsp[-1].value), (yyvsp[0].value));
}
+
break;
case 4:
- { PHP_JSON_DEPTH_INC; }
+ {
+ PHP_JSON_DEPTH_INC;
+ if (parser->methods.object_start && FAILURE == parser->methods.object_start(parser)) {
+ YYERROR;
+ }
+ }
+
break;
case 5:
{
+ ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[-1].value));
PHP_JSON_DEPTH_DEC;
- (yyval.value) = (yyvsp[(3) - (4)].value);
+ if (parser->methods.object_end && FAILURE == parser->methods.object_end(parser, &(yyval.value))) {
+ YYERROR;
+ }
}
+
break;
case 7:
@@ -1602,66 +1489,85 @@ yyreduce:
parser->scanner.errcode = PHP_JSON_ERROR_STATE_MISMATCH;
YYERROR;
}
+
break;
case 8:
{
- php_json_parser_object_init(parser, &(yyval.value));
+ parser->methods.object_create(parser, &(yyval.value));
}
+
break;
case 10:
{
- php_json_parser_object_init(parser, &(yyval.value));
- if (php_json_parser_object_update(parser, &(yyval.value), (yyvsp[(1) - (1)].pair).key, &(yyvsp[(1) - (1)].pair).val) == FAILURE)
+ parser->methods.object_create(parser, &(yyval.value));
+ if (parser->methods.object_update(parser, &(yyval.value), (yyvsp[0].pair).key, &(yyvsp[0].pair).val) == FAILURE) {
YYERROR;
+ }
}
+
break;
case 11:
{
- if (php_json_parser_object_update(parser, &(yyvsp[(1) - (3)].value), (yyvsp[(3) - (3)].pair).key, &(yyvsp[(3) - (3)].pair).val) == FAILURE)
+ if (parser->methods.object_update(parser, &(yyvsp[-2].value), (yyvsp[0].pair).key, &(yyvsp[0].pair).val) == FAILURE) {
YYERROR;
- ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[(1) - (3)].value));
+ }
+ ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[-2].value));
}
+
break;
case 12:
{
- PHP_JSON_USE_2((yyval.value), (yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
+ PHP_JSON_USE_2((yyval.value), (yyvsp[-1].value), (yyvsp[0].value));
}
+
break;
case 13:
{
- (yyval.pair).key = Z_STR((yyvsp[(1) - (3)].value));
- ZVAL_COPY_VALUE(&(yyval.pair).val, &(yyvsp[(3) - (3)].value));
+ (yyval.pair).key = Z_STR((yyvsp[-2].value));
+ ZVAL_COPY_VALUE(&(yyval.pair).val, &(yyvsp[0].value));
}
+
break;
case 14:
{
- PHP_JSON_USE_2((yyval.pair), (yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
+ PHP_JSON_USE_2((yyval.pair), (yyvsp[-1].value), (yyvsp[0].value));
}
+
break;
case 15:
- { PHP_JSON_DEPTH_INC; }
+ {
+ PHP_JSON_DEPTH_INC;
+ if (parser->methods.array_start && FAILURE == parser->methods.array_start(parser)) {
+ YYERROR;
+ }
+ }
+
break;
case 16:
{
+ ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[-1].value));
PHP_JSON_DEPTH_DEC;
- ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[(3) - (4)].value));
+ if (parser->methods.array_end && FAILURE == parser->methods.array_end(parser, &(yyval.value))) {
+ YYERROR;
+ }
}
+
break;
case 18:
@@ -1670,44 +1576,50 @@ yyreduce:
parser->scanner.errcode = PHP_JSON_ERROR_STATE_MISMATCH;
YYERROR;
}
+
break;
case 19:
{
- php_json_parser_array_init(&(yyval.value));
+ parser->methods.array_create(parser, &(yyval.value));
}
+
break;
case 21:
{
- php_json_parser_array_init(&(yyval.value));
- php_json_parser_array_append(&(yyval.value), &(yyvsp[(1) - (1)].value));
+ parser->methods.array_create(parser, &(yyval.value));
+ parser->methods.array_append(parser, &(yyval.value), &(yyvsp[0].value));
}
+
break;
case 22:
{
- php_json_parser_array_append(&(yyvsp[(1) - (3)].value), &(yyvsp[(3) - (3)].value));
- ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[(1) - (3)].value));
+ parser->methods.array_append(parser, &(yyvsp[-2].value), &(yyvsp[0].value));
+ ZVAL_COPY_VALUE(&(yyval.value), &(yyvsp[-2].value));
}
+
break;
case 23:
{
- PHP_JSON_USE_2((yyval.value), (yyvsp[(1) - (2)].value), (yyvsp[(2) - (2)].value));
+ PHP_JSON_USE_2((yyval.value), (yyvsp[-1].value), (yyvsp[0].value));
}
+
break;
case 36:
{
- PHP_JSON_USE_1((yyval.value), (yyvsp[(1) - (1)].value));
+ PHP_JSON_USE_1((yyval.value), (yyvsp[0].value));
YYERROR;
}
+
break;
@@ -1733,7 +1645,7 @@ yyreduce:
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1748,9 +1660,9 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -1801,20 +1713,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, parser);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, parser);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -1833,7 +1745,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1846,29 +1758,29 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp, parser);
+ yystos[yystate], yyvsp, parser);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -1919,14 +1831,14 @@ yyreturn:
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, parser);
}
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp, parser);
+ yystos[*yyssp], yyvsp, parser);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -1937,38 +1849,32 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
-
-
/* Functions */
-void php_json_parser_init(php_json_parser *parser, zval *return_value, char *str, size_t str_len, int options, int max_depth)
+static int php_json_parser_array_create(php_json_parser *parser, zval *array)
{
- memset(parser, 0, sizeof(php_json_parser));
- php_json_scanner_init(&parser->scanner, str, str_len, options);
- parser->depth = 1;
- parser->max_depth = max_depth;
- parser->return_value = return_value;
+ return array_init(array);
}
-php_json_error_code php_json_parser_error_code(php_json_parser *parser)
+static int php_json_parser_array_append(php_json_parser *parser, zval *array, zval *zvalue)
{
- return parser->scanner.errcode;
+ zend_hash_next_index_insert(Z_ARRVAL_P(array), zvalue);
+ return SUCCESS;
}
-void php_json_parser_object_init(php_json_parser *parser, zval *object)
+static int php_json_parser_object_create(php_json_parser *parser, zval *object)
{
if (parser->scanner.options & PHP_JSON_OBJECT_AS_ARRAY) {
- array_init(object);
+ return array_init(object);
} else {
- object_init(object);
+ return object_init(object);
}
}
-int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
+static int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
{
/* if JSON_OBJECT_AS_ARRAY is set */
if (Z_TYPE_P(object) == IS_ARRAY) {
@@ -1986,7 +1892,7 @@ int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_st
return FAILURE;
}
ZVAL_NEW_STR(&zkey, key);
- zend_std_write_property(object, &zkey, zvalue, NULL);
+ zend_std_write_property(object, &zkey, zvalue, NULL);
if (Z_REFCOUNTED_P(zvalue)) {
Z_DELREF_P(zvalue);
@@ -1997,26 +1903,71 @@ int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_st
return SUCCESS;
}
-void php_json_parser_array_init(zval *array)
-{
- array_init(array);
-}
-
-void php_json_parser_array_append(zval *array, zval *zvalue)
-{
- zend_hash_next_index_insert(Z_ARRVAL_P(array), zvalue);
-}
-
-int php_json_yylex(union YYSTYPE *value, php_json_parser *parser)
+static int php_json_yylex(union YYSTYPE *value, php_json_parser *parser)
{
int token = php_json_scan(&parser->scanner);
value->value = parser->scanner.value;
return token;
}
-void php_json_yyerror(php_json_parser *parser, char const *msg)
+static void php_json_yyerror(php_json_parser *parser, char const *msg)
{
if (!parser->scanner.errcode) {
parser->scanner.errcode = PHP_JSON_ERROR_SYNTAX;
}
}
+
+PHP_JSON_API php_json_error_code php_json_parser_error_code(const php_json_parser *parser)
+{
+ return parser->scanner.errcode;
+}
+
+static const php_json_parser_methods default_parser_methods =
+{
+ php_json_parser_array_create,
+ php_json_parser_array_append,
+ NULL,
+ NULL,
+ php_json_parser_object_create,
+ php_json_parser_object_update,
+ NULL,
+ NULL,
+};
+
+PHP_JSON_API void php_json_parser_init_ex(php_json_parser *parser,
+ zval *return_value,
+ char *str,
+ size_t str_len,
+ int options,
+ int max_depth,
+ const php_json_parser_methods *parser_methods)
+{
+ memset(parser, 0, sizeof(php_json_parser));
+ php_json_scanner_init(&parser->scanner, str, str_len, options);
+ parser->depth = 1;
+ parser->max_depth = max_depth;
+ parser->return_value = return_value;
+ memcpy(&parser->methods, parser_methods, sizeof(php_json_parser_methods));
+}
+
+PHP_JSON_API void php_json_parser_init(php_json_parser *parser,
+ zval *return_value,
+ char *str,
+ size_t str_len,
+ int options,
+ int max_depth)
+{
+ php_json_parser_init_ex(
+ parser,
+ return_value,
+ str,
+ str_len,
+ options,
+ max_depth,
+ &default_parser_methods);
+}
+
+PHP_JSON_API int php_json_parse(php_json_parser *parser)
+{
+ return php_json_yyparse(parser);
+}
diff --git a/ext/json/json_parser.tab.h b/ext/json/json_parser.tab.h
index 20651ce8fb..56bc2c40c9 100644
--- a/ext/json/json_parser.tab.h
+++ b/ext/json/json_parser.tab.h
@@ -1,19 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.6.5. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
-
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,13 +26,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
-# define YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
-/* Enabling traces. */
+#ifndef YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
+# define YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
+/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
@@ -40,22 +40,21 @@
extern int php_json_yydebug;
#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- PHP_JSON_T_NUL = 258,
- PHP_JSON_T_TRUE = 259,
- PHP_JSON_T_FALSE = 260,
- PHP_JSON_T_INT = 261,
- PHP_JSON_T_DOUBLE = 262,
- PHP_JSON_T_STRING = 263,
- PHP_JSON_T_ESTRING = 264,
- PHP_JSON_T_EOI = 265,
- PHP_JSON_T_ERROR = 266
- };
+ enum yytokentype
+ {
+ PHP_JSON_T_NUL = 258,
+ PHP_JSON_T_TRUE = 259,
+ PHP_JSON_T_FALSE = 260,
+ PHP_JSON_T_INT = 261,
+ PHP_JSON_T_DOUBLE = 262,
+ PHP_JSON_T_STRING = 263,
+ PHP_JSON_T_ESTRING = 264,
+ PHP_JSON_T_EOI = 265,
+ PHP_JSON_T_ERROR = 266
+ };
#endif
/* Tokens. */
#define PHP_JSON_T_NUL 258
@@ -68,10 +67,10 @@ extern int php_json_yydebug;
#define PHP_JSON_T_EOI 265
#define PHP_JSON_T_ERROR 266
-
-
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+
+union YYSTYPE
{
@@ -82,26 +81,15 @@ typedef union YYSTYPE
} pair;
+};
-} YYSTYPE;
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int php_json_yyparse (void *YYPARSE_PARAM);
-#else
-int php_json_yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+
int php_json_yyparse (php_json_parser *parser);
-#else
-int php_json_yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
+#endif /* !YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y
index 8e9809c99d..fafe75cbf3 100644
--- a/ext/json/json_parser.y
+++ b/ext/json/json_parser.y
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -36,6 +36,14 @@ int json_yydebug = 1;
#define PHP_JSON_USE_1(uvr, uv1) PHP_JSON_USE(uvr); PHP_JSON_USE(uv1)
#define PHP_JSON_USE_2(uvr, uv1, uv2) PHP_JSON_USE(uvr); PHP_JSON_USE(uv1); PHP_JSON_USE(uv2)
+#define PHP_JSON_DEPTH_DEC --parser->depth
+#define PHP_JSON_DEPTH_INC \
+ if (parser->max_depth && parser->depth >= parser->max_depth) { \
+ parser->scanner.errcode = PHP_JSON_ERROR_DEPTH; \
+ YYERROR; \
+ } \
+ ++parser->depth
+
}
%pure-parser
@@ -70,20 +78,9 @@ int json_yydebug = 1;
%destructor { zend_string_release($$.key); zval_dtor(&$$.val); } <pair>
%code {
-int php_json_yylex(union YYSTYPE *value, php_json_parser *parser);
-void php_json_yyerror(php_json_parser *parser, char const *msg);
-void php_json_parser_object_init(php_json_parser *parser, zval *object);
-int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
-void php_json_parser_array_init(zval *object);
-void php_json_parser_array_append(zval *array, zval *zvalue);
+static int php_json_yylex(union YYSTYPE *value, php_json_parser *parser);
+static void php_json_yyerror(php_json_parser *parser, char const *msg);
-#define PHP_JSON_DEPTH_DEC --parser->depth
-#define PHP_JSON_DEPTH_INC \
- if (parser->max_depth && parser->depth >= parser->max_depth) { \
- parser->scanner.errcode = PHP_JSON_ERROR_DEPTH; \
- YYERROR; \
- } \
- ++parser->depth
}
%% /* Rules */
@@ -102,10 +99,20 @@ start:
;
object:
- '{' { PHP_JSON_DEPTH_INC; } members object_end
+ '{'
{
+ PHP_JSON_DEPTH_INC;
+ if (parser->methods.object_start && FAILURE == parser->methods.object_start(parser)) {
+ YYERROR;
+ }
+ }
+ members object_end
+ {
+ ZVAL_COPY_VALUE(&$$, &$3);
PHP_JSON_DEPTH_DEC;
- $$ = $3;
+ if (parser->methods.object_end && FAILURE == parser->methods.object_end(parser, &$$)) {
+ YYERROR;
+ }
}
;
@@ -121,7 +128,7 @@ object_end:
members:
/* empty */
{
- php_json_parser_object_init(parser, &$$);
+ parser->methods.object_create(parser, &$$);
}
| member
;
@@ -129,14 +136,16 @@ members:
member:
pair
{
- php_json_parser_object_init(parser, &$$);
- if (php_json_parser_object_update(parser, &$$, $1.key, &$1.val) == FAILURE)
+ parser->methods.object_create(parser, &$$);
+ if (parser->methods.object_update(parser, &$$, $1.key, &$1.val) == FAILURE) {
YYERROR;
+ }
}
| member ',' pair
{
- if (php_json_parser_object_update(parser, &$1, $3.key, &$3.val) == FAILURE)
+ if (parser->methods.object_update(parser, &$1, $3.key, &$3.val) == FAILURE) {
YYERROR;
+ }
ZVAL_COPY_VALUE(&$$, &$1);
}
| member errlex
@@ -158,10 +167,20 @@ pair:
;
array:
- '[' { PHP_JSON_DEPTH_INC; } elements array_end
+ '['
+ {
+ PHP_JSON_DEPTH_INC;
+ if (parser->methods.array_start && FAILURE == parser->methods.array_start(parser)) {
+ YYERROR;
+ }
+ }
+ elements array_end
{
- PHP_JSON_DEPTH_DEC;
ZVAL_COPY_VALUE(&$$, &$3);
+ PHP_JSON_DEPTH_DEC;
+ if (parser->methods.array_end && FAILURE == parser->methods.array_end(parser, &$$)) {
+ YYERROR;
+ }
}
;
@@ -177,7 +196,7 @@ array_end:
elements:
/* empty */
{
- php_json_parser_array_init(&$$);
+ parser->methods.array_create(parser, &$$);
}
| element
;
@@ -185,12 +204,12 @@ elements:
element:
value
{
- php_json_parser_array_init(&$$);
- php_json_parser_array_append(&$$, &$1);
+ parser->methods.array_create(parser, &$$);
+ parser->methods.array_append(parser, &$$, &$1);
}
| element ',' value
{
- php_json_parser_array_append(&$1, &$3);
+ parser->methods.array_append(parser, &$1, &$3);
ZVAL_COPY_VALUE(&$$, &$1);
}
| element errlex
@@ -224,33 +243,30 @@ errlex:
YYERROR;
}
;
-
+
%% /* Functions */
-void php_json_parser_init(php_json_parser *parser, zval *return_value, char *str, size_t str_len, int options, int max_depth)
+static int php_json_parser_array_create(php_json_parser *parser, zval *array)
{
- memset(parser, 0, sizeof(php_json_parser));
- php_json_scanner_init(&parser->scanner, str, str_len, options);
- parser->depth = 1;
- parser->max_depth = max_depth;
- parser->return_value = return_value;
+ return array_init(array);
}
-php_json_error_code php_json_parser_error_code(php_json_parser *parser)
+static int php_json_parser_array_append(php_json_parser *parser, zval *array, zval *zvalue)
{
- return parser->scanner.errcode;
+ zend_hash_next_index_insert(Z_ARRVAL_P(array), zvalue);
+ return SUCCESS;
}
-void php_json_parser_object_init(php_json_parser *parser, zval *object)
+static int php_json_parser_object_create(php_json_parser *parser, zval *object)
{
if (parser->scanner.options & PHP_JSON_OBJECT_AS_ARRAY) {
- array_init(object);
+ return array_init(object);
} else {
- object_init(object);
+ return object_init(object);
}
}
-int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
+static int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue)
{
/* if JSON_OBJECT_AS_ARRAY is set */
if (Z_TYPE_P(object) == IS_ARRAY) {
@@ -268,7 +284,7 @@ int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_st
return FAILURE;
}
ZVAL_NEW_STR(&zkey, key);
- zend_std_write_property(object, &zkey, zvalue, NULL);
+ zend_std_write_property(object, &zkey, zvalue, NULL);
if (Z_REFCOUNTED_P(zvalue)) {
Z_DELREF_P(zvalue);
@@ -279,26 +295,71 @@ int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_st
return SUCCESS;
}
-void php_json_parser_array_init(zval *array)
-{
- array_init(array);
-}
-
-void php_json_parser_array_append(zval *array, zval *zvalue)
-{
- zend_hash_next_index_insert(Z_ARRVAL_P(array), zvalue);
-}
-
-int php_json_yylex(union YYSTYPE *value, php_json_parser *parser)
+static int php_json_yylex(union YYSTYPE *value, php_json_parser *parser)
{
int token = php_json_scan(&parser->scanner);
value->value = parser->scanner.value;
return token;
}
-void php_json_yyerror(php_json_parser *parser, char const *msg)
+static void php_json_yyerror(php_json_parser *parser, char const *msg)
{
if (!parser->scanner.errcode) {
parser->scanner.errcode = PHP_JSON_ERROR_SYNTAX;
}
}
+
+PHP_JSON_API php_json_error_code php_json_parser_error_code(const php_json_parser *parser)
+{
+ return parser->scanner.errcode;
+}
+
+static const php_json_parser_methods default_parser_methods =
+{
+ php_json_parser_array_create,
+ php_json_parser_array_append,
+ NULL,
+ NULL,
+ php_json_parser_object_create,
+ php_json_parser_object_update,
+ NULL,
+ NULL,
+};
+
+PHP_JSON_API void php_json_parser_init_ex(php_json_parser *parser,
+ zval *return_value,
+ char *str,
+ size_t str_len,
+ int options,
+ int max_depth,
+ const php_json_parser_methods *parser_methods)
+{
+ memset(parser, 0, sizeof(php_json_parser));
+ php_json_scanner_init(&parser->scanner, str, str_len, options);
+ parser->depth = 1;
+ parser->max_depth = max_depth;
+ parser->return_value = return_value;
+ memcpy(&parser->methods, parser_methods, sizeof(php_json_parser_methods));
+}
+
+PHP_JSON_API void php_json_parser_init(php_json_parser *parser,
+ zval *return_value,
+ char *str,
+ size_t str_len,
+ int options,
+ int max_depth)
+{
+ php_json_parser_init_ex(
+ parser,
+ return_value,
+ str,
+ str_len,
+ options,
+ max_depth,
+ &default_parser_methods);
+}
+
+PHP_JSON_API int php_json_parse(php_json_parser *parser)
+{
+ return php_json_yyparse(parser);
+}
diff --git a/ext/json/json_scanner.c b/ext/json/json_scanner.c
index 7e8ee8b933..ee46a13198 100644
--- a/ext/json/json_scanner.c
+++ b/ext/json/json_scanner.c
@@ -1,9 +1,9 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.14.3 */
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -147,47 +147,46 @@ yyc_JS:
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
};
-
yych = *YYCURSOR;
if (yych <= ']') {
if (yych <= '"') {
if (yych <= '\f') {
if (yych <= 0x08) {
- if (yych >= 0x01) goto yy4;
+ if (yych >= 0x01) goto yy5;
} else {
- if (yych <= '\t') goto yy6;
- if (yych <= '\n') goto yy8;
- goto yy4;
+ if (yych <= '\t') goto yy7;
+ if (yych <= '\n') goto yy9;
+ goto yy5;
}
} else {
if (yych <= 0x1F) {
- if (yych <= '\r') goto yy9;
- goto yy4;
+ if (yych <= '\r') goto yy10;
+ goto yy5;
} else {
- if (yych <= ' ') goto yy10;
- if (yych <= '!') goto yy11;
- goto yy13;
+ if (yych <= ' ') goto yy11;
+ if (yych <= '!') goto yy12;
+ goto yy14;
}
}
} else {
if (yych <= '0') {
if (yych <= ',') {
- if (yych <= '+') goto yy11;
- goto yy15;
+ if (yych <= '+') goto yy12;
+ goto yy16;
} else {
- if (yych <= '-') goto yy17;
- if (yych <= '/') goto yy11;
- goto yy18;
+ if (yych <= '-') goto yy18;
+ if (yych <= '/') goto yy12;
+ goto yy19;
}
} else {
if (yych <= 'Z') {
- if (yych <= '9') goto yy20;
- if (yych <= ':') goto yy21;
- goto yy11;
+ if (yych <= '9') goto yy21;
+ if (yych <= ':') goto yy22;
+ goto yy12;
} else {
- if (yych <= '[') goto yy23;
- if (yych <= '\\') goto yy11;
- goto yy25;
+ if (yych <= '[') goto yy24;
+ if (yych <= '\\') goto yy12;
+ goto yy26;
}
}
}
@@ -195,41 +194,41 @@ yyc_JS:
if (yych <= '}') {
if (yych <= 's') {
if (yych <= 'f') {
- if (yych <= 'e') goto yy11;
- goto yy27;
+ if (yych <= 'e') goto yy12;
+ goto yy28;
} else {
- if (yych == 'n') goto yy28;
- goto yy11;
+ if (yych == 'n') goto yy29;
+ goto yy12;
}
} else {
if (yych <= 'z') {
- if (yych <= 't') goto yy29;
- goto yy11;
+ if (yych <= 't') goto yy30;
+ goto yy12;
} else {
- if (yych <= '{') goto yy30;
- if (yych <= '|') goto yy11;
- goto yy32;
+ if (yych <= '{') goto yy31;
+ if (yych <= '|') goto yy12;
+ goto yy33;
}
}
} else {
if (yych <= 0xEC) {
if (yych <= 0xC1) {
- if (yych <= 0x7F) goto yy11;
- goto yy34;
+ if (yych <= 0x7F) goto yy12;
+ goto yy35;
} else {
- if (yych <= 0xDF) goto yy36;
- if (yych <= 0xE0) goto yy37;
- goto yy38;
+ if (yych <= 0xDF) goto yy37;
+ if (yych <= 0xE0) goto yy38;
+ goto yy39;
}
} else {
if (yych <= 0xF0) {
- if (yych <= 0xED) goto yy39;
- if (yych <= 0xEF) goto yy40;
- goto yy41;
+ if (yych <= 0xED) goto yy40;
+ if (yych <= 0xEF) goto yy41;
+ goto yy42;
} else {
- if (yych <= 0xF3) goto yy42;
- if (yych <= 0xF4) goto yy43;
- goto yy34;
+ if (yych <= 0xF3) goto yy43;
+ if (yych <= 0xF4) goto yy44;
+ goto yy35;
}
}
}
@@ -243,36 +242,36 @@ yyc_JS:
return PHP_JSON_T_ERROR;
}
}
-yy4:
+yy5:
++YYCURSOR;
{
s->errcode = PHP_JSON_ERROR_CTRL_CHAR;
return PHP_JSON_T_ERROR;
}
-yy6:
+yy7:
++YYCURSOR;
yych = *YYCURSOR;
- goto yy81;
-yy7:
- { goto std; }
+ goto yy82;
yy8:
- yych = *++YYCURSOR;
- goto yy7;
+ { goto std; }
yy9:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy82;
- goto yy81;
+ goto yy8;
yy10:
yych = *++YYCURSOR;
- goto yy81;
+ if (yych == '\n') goto yy83;
+ goto yy82;
yy11:
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ goto yy82;
yy12:
+ ++YYCURSOR;
+yy13:
{
s->errcode = PHP_JSON_ERROR_SYNTAX;
return PHP_JSON_T_ERROR;
}
-yy13:
+yy14:
++YYCURSOR;
{
s->str_start = s->cursor;
@@ -280,25 +279,25 @@ yy13:
PHP_JSON_CONDITION_SET(STR_P1);
PHP_JSON_CONDITION_GOTO(STR_P1);
}
-yy15:
+yy16:
++YYCURSOR;
{ return ','; }
-yy17:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy12;
- if (yych <= '0') goto yy79;
- if (yych <= '9') goto yy69;
- goto yy12;
yy18:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy13;
+ if (yych <= '0') goto yy80;
+ if (yych <= '9') goto yy70;
+ goto yy13;
+yy19:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'D') {
- if (yych == '.') goto yy71;
+ if (yych == '.') goto yy72;
} else {
- if (yych <= 'E') goto yy72;
- if (yych == 'e') goto yy72;
+ if (yych <= 'E') goto yy73;
+ if (yych == 'e') goto yy73;
}
-yy19:
+yy20:
{
zend_bool bigint = 0, negative = s->token[0] == '-';
size_t digits = (size_t) (s->cursor - s->token - negative);
@@ -323,305 +322,305 @@ yy19:
return PHP_JSON_T_DOUBLE;
}
}
-yy20:
+yy21:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy70;
-yy21:
+ goto yy71;
+yy22:
++YYCURSOR;
{ return ':'; }
-yy23:
+yy24:
++YYCURSOR;
{ return '['; }
-yy25:
+yy26:
++YYCURSOR;
{ return ']'; }
-yy27:
- yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'a') goto yy64;
- goto yy12;
yy28:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'u') goto yy60;
- goto yy12;
+ if (yych == 'a') goto yy65;
+ goto yy13;
yy29:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'r') goto yy56;
- goto yy12;
+ if (yych == 'u') goto yy61;
+ goto yy13;
yy30:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'r') goto yy57;
+ goto yy13;
+yy31:
++YYCURSOR;
{ return '{'; }
-yy32:
+yy33:
++YYCURSOR;
{ return '}'; }
-yy34:
- ++YYCURSOR;
yy35:
+ ++YYCURSOR;
+yy36:
{
s->errcode = PHP_JSON_ERROR_UTF8;
return PHP_JSON_T_ERROR;
}
-yy36:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy35;
- if (yych <= 0xBF) goto yy47;
- goto yy35;
yy37:
- yyaccept = 2;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x9F) goto yy35;
- if (yych <= 0xBF) goto yy55;
- goto yy35;
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy36;
+ if (yych <= 0xBF) goto yy48;
+ goto yy36;
yy38:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy35;
- if (yych <= 0xBF) goto yy54;
- goto yy35;
+ if (yych <= 0x9F) goto yy36;
+ if (yych <= 0xBF) goto yy56;
+ goto yy36;
yy39:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy35;
- if (yych <= 0x9F) goto yy53;
- goto yy35;
+ if (yych <= 0x7F) goto yy36;
+ if (yych <= 0xBF) goto yy55;
+ goto yy36;
yy40:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy35;
- if (yych <= 0xBF) goto yy52;
- goto yy35;
+ if (yych <= 0x7F) goto yy36;
+ if (yych <= 0x9F) goto yy54;
+ goto yy36;
yy41:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x8F) goto yy35;
- if (yych <= 0xBF) goto yy50;
- goto yy35;
+ if (yych <= 0x7F) goto yy36;
+ if (yych <= 0xBF) goto yy53;
+ goto yy36;
yy42:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy35;
- if (yych <= 0xBF) goto yy48;
- goto yy35;
+ if (yych <= 0x8F) goto yy36;
+ if (yych <= 0xBF) goto yy51;
+ goto yy36;
yy43:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy35;
- if (yych >= 0x90) goto yy35;
+ if (yych <= 0x7F) goto yy36;
+ if (yych <= 0xBF) goto yy49;
+ goto yy36;
+yy44:
+ yyaccept = 2;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy36;
+ if (yych >= 0x90) goto yy36;
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy46;
-yy45:
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy47;
+yy46:
YYCURSOR = YYMARKER;
if (yyaccept <= 1) {
- if (yyaccept <= 0) {
- goto yy19;
+ if (yyaccept == 0) {
+ goto yy20;
} else {
- goto yy12;
+ goto yy13;
}
} else {
- if (yyaccept <= 2) {
- goto yy35;
+ if (yyaccept == 2) {
+ goto yy36;
} else {
- goto yy76;
+ goto yy77;
}
}
-yy46:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych >= 0xC0) goto yy45;
yy47:
yych = *++YYCURSOR;
- goto yy12;
+ if (yych <= 0x7F) goto yy46;
+ if (yych >= 0xC0) goto yy46;
yy48:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych >= 0xC0) goto yy45;
+ goto yy13;
+yy49:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy47;
- goto yy45;
-yy50:
+ if (yych <= 0x7F) goto yy46;
+ if (yych >= 0xC0) goto yy46;
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych >= 0xC0) goto yy45;
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy48;
+ goto yy46;
+yy51:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy47;
- goto yy45;
-yy52:
+ if (yych <= 0x7F) goto yy46;
+ if (yych >= 0xC0) goto yy46;
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy47;
- goto yy45;
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy48;
+ goto yy46;
yy53:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy47;
- goto yy45;
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy48;
+ goto yy46;
yy54:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy47;
- goto yy45;
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy48;
+ goto yy46;
yy55:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy45;
- if (yych <= 0xBF) goto yy47;
- goto yy45;
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy48;
+ goto yy46;
yy56:
yych = *++YYCURSOR;
- if (yych != 'u') goto yy45;
+ if (yych <= 0x7F) goto yy46;
+ if (yych <= 0xBF) goto yy48;
+ goto yy46;
+yy57:
yych = *++YYCURSOR;
- if (yych != 'e') goto yy45;
+ if (yych != 'u') goto yy46;
+ yych = *++YYCURSOR;
+ if (yych != 'e') goto yy46;
++YYCURSOR;
{
ZVAL_TRUE(&s->value);
return PHP_JSON_T_TRUE;
}
-yy60:
+yy61:
yych = *++YYCURSOR;
- if (yych != 'l') goto yy45;
+ if (yych != 'l') goto yy46;
yych = *++YYCURSOR;
- if (yych != 'l') goto yy45;
+ if (yych != 'l') goto yy46;
++YYCURSOR;
{
ZVAL_NULL(&s->value);
return PHP_JSON_T_NUL;
}
-yy64:
+yy65:
yych = *++YYCURSOR;
- if (yych != 'l') goto yy45;
+ if (yych != 'l') goto yy46;
yych = *++YYCURSOR;
- if (yych != 's') goto yy45;
+ if (yych != 's') goto yy46;
yych = *++YYCURSOR;
- if (yych != 'e') goto yy45;
+ if (yych != 'e') goto yy46;
++YYCURSOR;
{
ZVAL_FALSE(&s->value);
return PHP_JSON_T_FALSE;
}
-yy69:
+yy70:
yyaccept = 0;
YYMARKER = ++YYCURSOR;
yych = *YYCURSOR;
-yy70:
+yy71:
if (yybm[0+yych] & 64) {
- goto yy69;
+ goto yy70;
}
if (yych <= 'D') {
- if (yych != '.') goto yy19;
+ if (yych != '.') goto yy20;
} else {
- if (yych <= 'E') goto yy72;
- if (yych == 'e') goto yy72;
- goto yy19;
+ if (yych <= 'E') goto yy73;
+ if (yych == 'e') goto yy73;
+ goto yy20;
}
-yy71:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy45;
- if (yych <= '9') goto yy77;
- goto yy45;
yy72:
yych = *++YYCURSOR;
+ if (yych <= '/') goto yy46;
+ if (yych <= '9') goto yy78;
+ goto yy46;
+yy73:
+ yych = *++YYCURSOR;
if (yych <= ',') {
- if (yych != '+') goto yy45;
+ if (yych != '+') goto yy46;
} else {
- if (yych <= '-') goto yy73;
- if (yych <= '/') goto yy45;
- if (yych <= '9') goto yy74;
- goto yy45;
+ if (yych <= '-') goto yy74;
+ if (yych <= '/') goto yy46;
+ if (yych <= '9') goto yy75;
+ goto yy46;
}
-yy73:
- yych = *++YYCURSOR;
- if (yych <= '/') goto yy45;
- if (yych >= ':') goto yy45;
yy74:
+ yych = *++YYCURSOR;
+ if (yych <= '/') goto yy46;
+ if (yych >= ':') goto yy46;
+yy75:
++YYCURSOR;
yych = *YYCURSOR;
- if (yych <= '/') goto yy76;
- if (yych <= '9') goto yy74;
-yy76:
+ if (yych <= '/') goto yy77;
+ if (yych <= '9') goto yy75;
+yy77:
{
ZVAL_DOUBLE(&s->value, zend_strtod((char *) s->token, NULL));
return PHP_JSON_T_DOUBLE;
}
-yy77:
+yy78:
yyaccept = 3;
YYMARKER = ++YYCURSOR;
yych = *YYCURSOR;
if (yych <= 'D') {
- if (yych <= '/') goto yy76;
- if (yych <= '9') goto yy77;
- goto yy76;
+ if (yych <= '/') goto yy77;
+ if (yych <= '9') goto yy78;
+ goto yy77;
} else {
- if (yych <= 'E') goto yy72;
- if (yych == 'e') goto yy72;
- goto yy76;
+ if (yych <= 'E') goto yy73;
+ if (yych == 'e') goto yy73;
+ goto yy77;
}
-yy79:
+yy80:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'D') {
- if (yych == '.') goto yy71;
- goto yy19;
+ if (yych == '.') goto yy72;
+ goto yy20;
} else {
- if (yych <= 'E') goto yy72;
- if (yych == 'e') goto yy72;
- goto yy19;
+ if (yych <= 'E') goto yy73;
+ if (yych == 'e') goto yy73;
+ goto yy20;
}
-yy80:
+yy81:
++YYCURSOR;
yych = *YYCURSOR;
-yy81:
+yy82:
if (yybm[0+yych] & 128) {
- goto yy80;
+ goto yy81;
}
- goto yy7;
-yy82:
+ goto yy8;
+yy83:
++YYCURSOR;
yych = *YYCURSOR;
- goto yy7;
+ goto yy8;
}
/* *********************************** */
yyc_STR_P1:
yych = *YYCURSOR;
if (yych <= 0xDF) {
if (yych <= '[') {
- if (yych <= 0x1F) goto yy85;
- if (yych == '"') goto yy89;
- goto yy87;
+ if (yych <= 0x1F) goto yy86;
+ if (yych == '"') goto yy90;
+ goto yy88;
} else {
- if (yych <= '\\') goto yy91;
- if (yych <= 0x7F) goto yy87;
- if (yych <= 0xC1) goto yy93;
- goto yy95;
+ if (yych <= '\\') goto yy92;
+ if (yych <= 0x7F) goto yy88;
+ if (yych <= 0xC1) goto yy94;
+ goto yy96;
}
} else {
if (yych <= 0xEF) {
- if (yych <= 0xE0) goto yy96;
- if (yych <= 0xEC) goto yy97;
- if (yych <= 0xED) goto yy98;
- goto yy99;
+ if (yych <= 0xE0) goto yy97;
+ if (yych <= 0xEC) goto yy98;
+ if (yych <= 0xED) goto yy99;
+ goto yy100;
} else {
- if (yych <= 0xF0) goto yy100;
- if (yych <= 0xF3) goto yy101;
- if (yych <= 0xF4) goto yy102;
- goto yy93;
+ if (yych <= 0xF0) goto yy101;
+ if (yych <= 0xF3) goto yy102;
+ if (yych <= 0xF4) goto yy103;
+ goto yy94;
}
}
-yy85:
+yy86:
++YYCURSOR;
{
s->errcode = PHP_JSON_ERROR_CTRL_CHAR;
return PHP_JSON_T_ERROR;
}
-yy87:
- ++YYCURSOR;
yy88:
- { PHP_JSON_CONDITION_GOTO(STR_P1); }
+ ++YYCURSOR;
yy89:
+ { PHP_JSON_CONDITION_GOTO(STR_P1); }
+yy90:
++YYCURSOR;
{
zend_string *str;
@@ -645,392 +644,392 @@ yy89:
return PHP_JSON_T_STRING;
}
}
-yy91:
+yy92:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'e') {
if (yych <= '/') {
- if (yych == '"') goto yy115;
- if (yych >= '/') goto yy115;
+ if (yych == '"') goto yy116;
+ if (yych >= '/') goto yy116;
} else {
if (yych <= '\\') {
- if (yych >= '\\') goto yy115;
+ if (yych >= '\\') goto yy116;
} else {
- if (yych == 'b') goto yy115;
+ if (yych == 'b') goto yy116;
}
}
} else {
if (yych <= 'q') {
- if (yych <= 'f') goto yy115;
- if (yych == 'n') goto yy115;
+ if (yych <= 'f') goto yy116;
+ if (yych == 'n') goto yy116;
} else {
if (yych <= 's') {
- if (yych <= 'r') goto yy115;
+ if (yych <= 'r') goto yy116;
} else {
- if (yych <= 't') goto yy115;
- if (yych <= 'u') goto yy117;
+ if (yych <= 't') goto yy116;
+ if (yych <= 'u') goto yy118;
}
}
}
-yy92:
+yy93:
{
s->errcode = PHP_JSON_ERROR_SYNTAX;
return PHP_JSON_T_ERROR;
}
-yy93:
- ++YYCURSOR;
yy94:
+ ++YYCURSOR;
+yy95:
{
s->errcode = PHP_JSON_ERROR_UTF8;
return PHP_JSON_T_ERROR;
}
-yy95:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy94;
- if (yych <= 0xBF) goto yy106;
- goto yy94;
yy96:
- yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x9F) goto yy94;
- if (yych <= 0xBF) goto yy114;
- goto yy94;
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy95;
+ if (yych <= 0xBF) goto yy107;
+ goto yy95;
yy97:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy94;
- if (yych <= 0xBF) goto yy113;
- goto yy94;
+ if (yych <= 0x9F) goto yy95;
+ if (yych <= 0xBF) goto yy115;
+ goto yy95;
yy98:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy94;
- if (yych <= 0x9F) goto yy112;
- goto yy94;
+ if (yych <= 0x7F) goto yy95;
+ if (yych <= 0xBF) goto yy114;
+ goto yy95;
yy99:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy94;
- if (yych <= 0xBF) goto yy111;
- goto yy94;
+ if (yych <= 0x7F) goto yy95;
+ if (yych <= 0x9F) goto yy113;
+ goto yy95;
yy100:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x8F) goto yy94;
- if (yych <= 0xBF) goto yy109;
- goto yy94;
+ if (yych <= 0x7F) goto yy95;
+ if (yych <= 0xBF) goto yy112;
+ goto yy95;
yy101:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy94;
- if (yych <= 0xBF) goto yy107;
- goto yy94;
+ if (yych <= 0x8F) goto yy95;
+ if (yych <= 0xBF) goto yy110;
+ goto yy95;
yy102:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x7F) goto yy94;
- if (yych >= 0x90) goto yy94;
+ if (yych <= 0x7F) goto yy95;
+ if (yych <= 0xBF) goto yy108;
+ goto yy95;
+yy103:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x7F) goto yy95;
+ if (yych >= 0x90) goto yy95;
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy105;
-yy104:
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy106;
+yy105:
YYCURSOR = YYMARKER;
if (yyaccept <= 1) {
- if (yyaccept <= 0) {
- goto yy92;
+ if (yyaccept == 0) {
+ goto yy93;
} else {
- goto yy94;
+ goto yy95;
}
} else {
- goto yy126;
+ goto yy127;
}
-yy105:
- yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych >= 0xC0) goto yy104;
yy106:
yych = *++YYCURSOR;
- goto yy88;
+ if (yych <= 0x7F) goto yy105;
+ if (yych >= 0xC0) goto yy105;
yy107:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych >= 0xC0) goto yy104;
+ goto yy89;
+yy108:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy106;
- goto yy104;
-yy109:
+ if (yych <= 0x7F) goto yy105;
+ if (yych >= 0xC0) goto yy105;
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych >= 0xC0) goto yy104;
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy107;
+ goto yy105;
+yy110:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy106;
- goto yy104;
-yy111:
+ if (yych <= 0x7F) goto yy105;
+ if (yych >= 0xC0) goto yy105;
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy106;
- goto yy104;
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy107;
+ goto yy105;
yy112:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy106;
- goto yy104;
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy107;
+ goto yy105;
yy113:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy106;
- goto yy104;
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy107;
+ goto yy105;
yy114:
yych = *++YYCURSOR;
- if (yych <= 0x7F) goto yy104;
- if (yych <= 0xBF) goto yy106;
- goto yy104;
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy107;
+ goto yy105;
yy115:
+ yych = *++YYCURSOR;
+ if (yych <= 0x7F) goto yy105;
+ if (yych <= 0xBF) goto yy107;
+ goto yy105;
+yy116:
++YYCURSOR;
{
s->str_esc++;
PHP_JSON_CONDITION_GOTO(STR_P1);
}
-yy117:
+yy118:
yych = *++YYCURSOR;
if (yych <= 'D') {
if (yych <= '9') {
- if (yych <= '/') goto yy104;
- if (yych >= '1') goto yy119;
+ if (yych <= '/') goto yy105;
+ if (yych >= '1') goto yy120;
} else {
- if (yych <= '@') goto yy104;
- if (yych <= 'C') goto yy119;
- goto yy120;
+ if (yych <= '@') goto yy105;
+ if (yych <= 'C') goto yy120;
+ goto yy121;
}
} else {
if (yych <= 'c') {
- if (yych <= 'F') goto yy119;
- if (yych <= '`') goto yy104;
- goto yy119;
+ if (yych <= 'F') goto yy120;
+ if (yych <= '`') goto yy105;
+ goto yy120;
} else {
- if (yych <= 'd') goto yy120;
- if (yych <= 'f') goto yy119;
- goto yy104;
+ if (yych <= 'd') goto yy121;
+ if (yych <= 'f') goto yy120;
+ goto yy105;
}
}
yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych <= '/') goto yy104;
- if (yych <= '0') goto yy139;
- if (yych <= '7') goto yy140;
- goto yy121;
+ if (yych <= '/') goto yy105;
+ if (yych <= '0') goto yy140;
+ if (yych <= '7') goto yy141;
+ goto yy122;
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy104;
- goto yy121;
+ if (yych <= '@') goto yy105;
+ goto yy122;
} else {
- if (yych <= '`') goto yy104;
- if (yych <= 'f') goto yy121;
- goto yy104;
+ if (yych <= '`') goto yy105;
+ if (yych <= 'f') goto yy122;
+ goto yy105;
}
}
-yy119:
+yy120:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych <= '9') goto yy121;
- goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych <= '9') goto yy122;
+ goto yy105;
} else {
- if (yych <= 'F') goto yy121;
- if (yych <= '`') goto yy104;
- if (yych <= 'f') goto yy121;
- goto yy104;
+ if (yych <= 'F') goto yy122;
+ if (yych <= '`') goto yy105;
+ if (yych <= 'f') goto yy122;
+ goto yy105;
}
-yy120:
+yy121:
yych = *++YYCURSOR;
if (yych <= 'B') {
if (yych <= '7') {
- if (yych <= '/') goto yy104;
+ if (yych <= '/') goto yy105;
} else {
- if (yych <= '9') goto yy122;
- if (yych <= '@') goto yy104;
- goto yy122;
+ if (yych <= '9') goto yy123;
+ if (yych <= '@') goto yy105;
+ goto yy123;
}
} else {
if (yych <= '`') {
- if (yych <= 'F') goto yy123;
- goto yy104;
+ if (yych <= 'F') goto yy124;
+ goto yy105;
} else {
- if (yych <= 'b') goto yy122;
- if (yych <= 'f') goto yy123;
- goto yy104;
+ if (yych <= 'b') goto yy123;
+ if (yych <= 'f') goto yy124;
+ goto yy105;
}
}
-yy121:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych <= '9') goto yy136;
- goto yy104;
- } else {
- if (yych <= 'F') goto yy136;
- if (yych <= '`') goto yy104;
- if (yych <= 'f') goto yy136;
- goto yy104;
- }
yy122:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych <= '9') goto yy127;
- goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych <= '9') goto yy137;
+ goto yy105;
} else {
- if (yych <= 'F') goto yy127;
- if (yych <= '`') goto yy104;
- if (yych <= 'f') goto yy127;
- goto yy104;
+ if (yych <= 'F') goto yy137;
+ if (yych <= '`') goto yy105;
+ if (yych <= 'f') goto yy137;
+ goto yy105;
}
yy123:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych <= '9') goto yy128;
+ goto yy105;
} else {
- if (yych <= 'F') goto yy124;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= 'F') goto yy128;
+ if (yych <= '`') goto yy105;
+ if (yych <= 'f') goto yy128;
+ goto yy105;
}
yy124:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
} else {
if (yych <= 'F') goto yy125;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
}
yy125:
- ++YYCURSOR;
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
+ } else {
+ if (yych <= 'F') goto yy126;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
+ }
yy126:
+ ++YYCURSOR;
+yy127:
{
s->errcode = PHP_JSON_ERROR_UTF16;
return PHP_JSON_T_ERROR;
}
-yy127:
+yy128:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
} else {
- if (yych <= 'F') goto yy128;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= 'F') goto yy129;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
}
-yy128:
+yy129:
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych != '\\') goto yy126;
- yych = *++YYCURSOR;
- if (yych != 'u') goto yy104;
+ if (yych != '\\') goto yy127;
yych = *++YYCURSOR;
- if (yych == 'D') goto yy131;
- if (yych != 'd') goto yy104;
-yy131:
+ if (yych != 'u') goto yy105;
yych = *++YYCURSOR;
- if (yych <= 'B') goto yy104;
- if (yych <= 'F') goto yy132;
- if (yych <= 'b') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych == 'D') goto yy132;
+ if (yych != 'd') goto yy105;
yy132:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
- } else {
- if (yych <= 'F') goto yy133;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
- }
+ if (yych <= 'B') goto yy105;
+ if (yych <= 'F') goto yy133;
+ if (yych <= 'b') goto yy105;
+ if (yych >= 'g') goto yy105;
yy133:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
} else {
if (yych <= 'F') goto yy134;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
}
yy134:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
+ } else {
+ if (yych <= 'F') goto yy135;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
+ }
+yy135:
++YYCURSOR;
{
s->str_esc += 8;
PHP_JSON_CONDITION_GOTO(STR_P1);
}
-yy136:
+yy137:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
} else {
- if (yych <= 'F') goto yy137;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= 'F') goto yy138;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
}
-yy137:
+yy138:
++YYCURSOR;
{
s->str_esc += 3;
PHP_JSON_CONDITION_GOTO(STR_P1);
}
-yy139:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych <= '7') goto yy144;
- if (yych <= '9') goto yy141;
- goto yy104;
- } else {
- if (yych <= 'F') goto yy141;
- if (yych <= '`') goto yy104;
- if (yych <= 'f') goto yy141;
- goto yy104;
- }
yy140:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych <= '7') goto yy145;
+ if (yych <= '9') goto yy142;
+ goto yy105;
} else {
- if (yych <= 'F') goto yy141;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= 'F') goto yy142;
+ if (yych <= '`') goto yy105;
+ if (yych <= 'f') goto yy142;
+ goto yy105;
}
yy141:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
} else {
if (yych <= 'F') goto yy142;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
}
yy142:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
+ } else {
+ if (yych <= 'F') goto yy143;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
+ }
+yy143:
++YYCURSOR;
{
s->str_esc += 4;
PHP_JSON_CONDITION_GOTO(STR_P1);
}
-yy144:
+yy145:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy104;
- if (yych >= ':') goto yy104;
+ if (yych <= '/') goto yy105;
+ if (yych >= ':') goto yy105;
} else {
- if (yych <= 'F') goto yy145;
- if (yych <= '`') goto yy104;
- if (yych >= 'g') goto yy104;
+ if (yych <= 'F') goto yy146;
+ if (yych <= '`') goto yy105;
+ if (yych >= 'g') goto yy105;
}
-yy145:
+yy146:
++YYCURSOR;
{
s->str_esc += 5;
@@ -1039,22 +1038,22 @@ yy145:
/* *********************************** */
yyc_STR_P2:
yych = *YYCURSOR;
- if (yych == '"') goto yy151;
- if (yych == '\\') goto yy153;
+ if (yych == '"') goto yy152;
+ if (yych == '\\') goto yy154;
++YYCURSOR;
{ PHP_JSON_CONDITION_GOTO(STR_P2); }
-yy151:
+yy152:
++YYCURSOR;
YYSETCONDITION(yycJS);
{
PHP_JSON_SCANNER_COPY_ESC();
return PHP_JSON_T_STRING;
}
-yy153:
+yy154:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'u') goto yy155;
-yy154:
+ if (yych == 'u') goto yy156;
+yy155:
{
char esc;
PHP_JSON_SCANNER_COPY_ESC();
@@ -1088,103 +1087,103 @@ yy154:
s->str_start = s->cursor;
PHP_JSON_CONDITION_GOTO(STR_P2);
}
-yy155:
+yy156:
yych = *++YYCURSOR;
if (yych <= 'D') {
if (yych <= '9') {
- if (yych <= '/') goto yy156;
- if (yych <= '0') goto yy157;
- goto yy158;
- } else {
- if (yych <= '@') goto yy156;
- if (yych <= 'C') goto yy158;
+ if (yych <= '/') goto yy157;
+ if (yych <= '0') goto yy158;
goto yy159;
+ } else {
+ if (yych <= '@') goto yy157;
+ if (yych <= 'C') goto yy159;
+ goto yy160;
}
} else {
if (yych <= 'c') {
- if (yych <= 'F') goto yy158;
- if (yych >= 'a') goto yy158;
+ if (yych <= 'F') goto yy159;
+ if (yych >= 'a') goto yy159;
} else {
- if (yych <= 'd') goto yy159;
- if (yych <= 'f') goto yy158;
+ if (yych <= 'd') goto yy160;
+ if (yych <= 'f') goto yy159;
}
}
-yy156:
- YYCURSOR = YYMARKER;
- goto yy154;
yy157:
+ YYCURSOR = YYMARKER;
+ goto yy155;
+yy158:
yych = *++YYCURSOR;
if (yych <= '9') {
- if (yych <= '/') goto yy156;
- if (yych <= '0') goto yy174;
- if (yych <= '7') goto yy175;
- goto yy161;
+ if (yych <= '/') goto yy157;
+ if (yych <= '0') goto yy175;
+ if (yych <= '7') goto yy176;
+ goto yy162;
} else {
if (yych <= 'F') {
- if (yych <= '@') goto yy156;
- goto yy161;
+ if (yych <= '@') goto yy157;
+ goto yy162;
} else {
- if (yych <= '`') goto yy156;
- if (yych <= 'f') goto yy161;
- goto yy156;
+ if (yych <= '`') goto yy157;
+ if (yych <= 'f') goto yy162;
+ goto yy157;
}
}
-yy158:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych <= '9') goto yy161;
- goto yy156;
- } else {
- if (yych <= 'F') goto yy161;
- if (yych <= '`') goto yy156;
- if (yych <= 'f') goto yy161;
- goto yy156;
- }
yy159:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych <= '7') goto yy161;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych <= '9') goto yy162;
+ goto yy157;
} else {
- if (yych <= 'B') goto yy160;
- if (yych <= '`') goto yy156;
- if (yych >= 'c') goto yy156;
+ if (yych <= 'F') goto yy162;
+ if (yych <= '`') goto yy157;
+ if (yych <= 'f') goto yy162;
+ goto yy157;
}
yy160:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych <= '9') goto yy165;
- goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych <= '7') goto yy162;
+ if (yych >= ':') goto yy157;
} else {
- if (yych <= 'F') goto yy165;
- if (yych <= '`') goto yy156;
- if (yych <= 'f') goto yy165;
- goto yy156;
+ if (yych <= 'B') goto yy161;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'c') goto yy157;
}
yy161:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych <= '9') goto yy166;
+ goto yy157;
} else {
- if (yych <= 'F') goto yy162;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= 'F') goto yy166;
+ if (yych <= '`') goto yy157;
+ if (yych <= 'f') goto yy166;
+ goto yy157;
}
yy162:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
} else {
if (yych <= 'F') goto yy163;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
}
yy163:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
+ } else {
+ if (yych <= 'F') goto yy164;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
+ }
+yy164:
++YYCURSOR;
{
int utf16 = php_json_ucs2_to_int(s, 4);
@@ -1195,51 +1194,51 @@ yy163:
s->str_start = s->cursor;
PHP_JSON_CONDITION_GOTO(STR_P2);
}
-yy165:
+yy166:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
} else {
- if (yych <= 'F') goto yy166;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= 'F') goto yy167;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
}
-yy166:
+yy167:
yych = *++YYCURSOR;
- if (yych != '\\') goto yy156;
+ if (yych != '\\') goto yy157;
yych = *++YYCURSOR;
- if (yych != 'u') goto yy156;
+ if (yych != 'u') goto yy157;
yych = *++YYCURSOR;
- if (yych == 'D') goto yy169;
- if (yych != 'd') goto yy156;
-yy169:
- yych = *++YYCURSOR;
- if (yych <= 'B') goto yy156;
- if (yych <= 'F') goto yy170;
- if (yych <= 'b') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych == 'D') goto yy170;
+ if (yych != 'd') goto yy157;
yy170:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
- } else {
- if (yych <= 'F') goto yy171;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
- }
+ if (yych <= 'B') goto yy157;
+ if (yych <= 'F') goto yy171;
+ if (yych <= 'b') goto yy157;
+ if (yych >= 'g') goto yy157;
yy171:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
} else {
if (yych <= 'F') goto yy172;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
}
yy172:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
+ } else {
+ if (yych <= 'F') goto yy173;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
+ }
+yy173:
++YYCURSOR;
{
int utf32, utf16_hi, utf16_lo;
@@ -1254,40 +1253,40 @@ yy172:
s->str_start = s->cursor;
PHP_JSON_CONDITION_GOTO(STR_P2);
}
-yy174:
- yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych <= '7') goto yy179;
- if (yych <= '9') goto yy176;
- goto yy156;
- } else {
- if (yych <= 'F') goto yy176;
- if (yych <= '`') goto yy156;
- if (yych <= 'f') goto yy176;
- goto yy156;
- }
yy175:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych <= '7') goto yy180;
+ if (yych <= '9') goto yy177;
+ goto yy157;
} else {
- if (yych <= 'F') goto yy176;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= 'F') goto yy177;
+ if (yych <= '`') goto yy157;
+ if (yych <= 'f') goto yy177;
+ goto yy157;
}
yy176:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
} else {
if (yych <= 'F') goto yy177;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
}
yy177:
+ yych = *++YYCURSOR;
+ if (yych <= '@') {
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
+ } else {
+ if (yych <= 'F') goto yy178;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
+ }
+yy178:
++YYCURSOR;
{
int utf16 = php_json_ucs2_to_int(s, 3);
@@ -1297,17 +1296,17 @@ yy177:
s->str_start = s->cursor;
PHP_JSON_CONDITION_GOTO(STR_P2);
}
-yy179:
+yy180:
yych = *++YYCURSOR;
if (yych <= '@') {
- if (yych <= '/') goto yy156;
- if (yych >= ':') goto yy156;
+ if (yych <= '/') goto yy157;
+ if (yych >= ':') goto yy157;
} else {
- if (yych <= 'F') goto yy180;
- if (yych <= '`') goto yy156;
- if (yych >= 'g') goto yy156;
+ if (yych <= 'F') goto yy181;
+ if (yych <= '`') goto yy157;
+ if (yych >= 'g') goto yy157;
}
-yy180:
+yy181:
++YYCURSOR;
{
int utf16 = php_json_ucs2_to_int(s, 2);
diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re
index eae6325f0a..267de96771 100644
--- a/ext/json/json_scanner.re
+++ b/ext/json/json_scanner.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index c47bc0f401..d1fabd1e6b 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -56,17 +56,22 @@ typedef enum {
} php_json_error_code;
/* json_encode() options */
-#define PHP_JSON_HEX_TAG (1<<0)
-#define PHP_JSON_HEX_AMP (1<<1)
-#define PHP_JSON_HEX_APOS (1<<2)
-#define PHP_JSON_HEX_QUOT (1<<3)
-#define PHP_JSON_FORCE_OBJECT (1<<4)
-#define PHP_JSON_NUMERIC_CHECK (1<<5)
-#define PHP_JSON_UNESCAPED_SLASHES (1<<6)
-#define PHP_JSON_PRETTY_PRINT (1<<7)
-#define PHP_JSON_UNESCAPED_UNICODE (1<<8)
+#define PHP_JSON_HEX_TAG (1<<0)
+#define PHP_JSON_HEX_AMP (1<<1)
+#define PHP_JSON_HEX_APOS (1<<2)
+#define PHP_JSON_HEX_QUOT (1<<3)
+#define PHP_JSON_FORCE_OBJECT (1<<4)
+#define PHP_JSON_NUMERIC_CHECK (1<<5)
+#define PHP_JSON_UNESCAPED_SLASHES (1<<6)
+#define PHP_JSON_PRETTY_PRINT (1<<7)
+#define PHP_JSON_UNESCAPED_UNICODE (1<<8)
#define PHP_JSON_PARTIAL_OUTPUT_ON_ERROR (1<<9)
-#define PHP_JSON_PRESERVE_ZERO_FRACTION (1<<10)
+#define PHP_JSON_PRESERVE_ZERO_FRACTION (1<<10)
+#define PHP_JSON_UNESCAPED_LINE_TERMINATORS (1<<11)
+
+/* json_decode() options */
+#define PHP_JSON_OBJECT_AS_ARRAY (1<<0)
+#define PHP_JSON_BIGINT_AS_STRING (1<<1)
/* Internal flags */
#define PHP_JSON_OUTPUT_ARRAY 0
@@ -81,21 +86,13 @@ ZEND_BEGIN_MODULE_GLOBALS(json)
php_json_error_code error_code;
ZEND_END_MODULE_GLOBALS(json)
-ZEND_EXTERN_MODULE_GLOBALS(json);
+PHP_JSON_API ZEND_EXTERN_MODULE_GLOBALS(json)
+#define JSON_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(json, v)
-#ifdef ZTS
-# define JSON_G(v) ZEND_TSRMG(json_globals_id, zend_json_globals *, v)
-# ifdef COMPILE_DL_JSON
-ZEND_TSRMLS_CACHE_EXTERN;
-# endif
-#else
-# define JSON_G(v) (json_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_JSON)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
-/* json_decode() options */
-#define PHP_JSON_OBJECT_AS_ARRAY (1<<0)
-#define PHP_JSON_BIGINT_AS_STRING (1<<1)
-
PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options);
PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, size_t str_len, zend_long options, zend_long depth);
diff --git a/ext/json/php_json_encoder.h b/ext/json/php_json_encoder.h
index a503286609..b10f7a614a 100644
--- a/ext/json/php_json_encoder.h
+++ b/ext/json/php_json_encoder.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/json/php_json_parser.h b/ext/json/php_json_parser.h
index 1ecaca8d5b..f817a2da70 100644
--- a/ext/json/php_json_parser.h
+++ b/ext/json/php_json_parser.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,16 +22,64 @@
#include "php.h"
#include "php_json_scanner.h"
-typedef struct _php_json_parser {
+typedef struct _php_json_parser php_json_parser;
+
+typedef int (*php_json_parser_func_array_create_t)(
+ php_json_parser *parser, zval *array);
+typedef int (*php_json_parser_func_array_append_t)(
+ php_json_parser *parser, zval *array, zval *zvalue);
+typedef int (*php_json_parser_func_array_start_t)(
+ php_json_parser *parser);
+typedef int (*php_json_parser_func_array_end_t)(
+ php_json_parser *parser, zval *object);
+typedef int (*php_json_parser_func_object_create_t)(
+ php_json_parser *parser, zval *object);
+typedef int (*php_json_parser_func_object_update_t)(
+ php_json_parser *parser, zval *object, zend_string *key, zval *zvalue);
+typedef int (*php_json_parser_func_object_start_t)(
+ php_json_parser *parser);
+typedef int (*php_json_parser_func_object_end_t)(
+ php_json_parser *parser, zval *object);
+
+typedef struct _php_json_parser_methods {
+ php_json_parser_func_array_create_t array_create;
+ php_json_parser_func_array_append_t array_append;
+ php_json_parser_func_array_start_t array_start;
+ php_json_parser_func_array_end_t array_end;
+ php_json_parser_func_object_create_t object_create;
+ php_json_parser_func_object_update_t object_update;
+ php_json_parser_func_object_start_t object_start;
+ php_json_parser_func_object_end_t object_end;
+} php_json_parser_methods;
+
+struct _php_json_parser {
php_json_scanner scanner;
zval *return_value;
- int depth;
+ unsigned int depth;
int max_depth;
-} php_json_parser;
+ php_json_parser_methods methods;
+};
+
+PHP_JSON_API void php_json_parser_init_ex(
+ php_json_parser *parser,
+ zval *return_value,
+ char *str,
+ size_t str_len,
+ int options,
+ int max_depth,
+ const php_json_parser_methods *methods);
+
+PHP_JSON_API void php_json_parser_init(
+ php_json_parser *parser,
+ zval *return_value,
+ char *str,
+ size_t str_len,
+ int options,
+ int max_depth);
-void php_json_parser_init(php_json_parser *parser, zval *return_value, char *str, size_t str_len, int options, int max_depth);
+PHP_JSON_API php_json_error_code php_json_parser_error_code(const php_json_parser *parser);
-php_json_error_code php_json_parser_error_code(php_json_parser *parser);
+PHP_JSON_API int php_json_parse(php_json_parser *parser);
int php_json_yyparse(php_json_parser *parser);
diff --git a/ext/json/php_json_scanner.h b/ext/json/php_json_scanner.h
index 9d3a72b09b..0b73a1d4cd 100644
--- a/ext/json/php_json_scanner.h
+++ b/ext/json/php_json_scanner.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/json/php_json_scanner_defs.h b/ext/json/php_json_scanner_defs.h
index b3867433a7..a75e766a65 100644
--- a/ext/json/php_json_scanner_defs.h
+++ b/ext/json/php_json_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.14.3 */
enum YYCONDTYPE {
yycJS,
diff --git a/ext/json/tests/002.phpt b/ext/json/tests/002.phpt
index 5959d4a5f3..b562b616c8 100644
--- a/ext/json/tests/002.phpt
+++ b/ext/json/tests/002.phpt
@@ -20,7 +20,6 @@ var_dump(json_encode(array(), JSON_FORCE_OBJECT));
var_dump(json_encode(1));
var_dump(json_encode("руÑÑиш"));
-
echo "Done\n";
?>
--EXPECTF--
diff --git a/ext/json/tests/006.phpt b/ext/json/tests/006.phpt
index e1d4b46889..da2fe009f1 100644
--- a/ext/json/tests/006.phpt
+++ b/ext/json/tests/006.phpt
@@ -4,15 +4,14 @@ json_encode() & extended encoding
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-
-$a = array('<foo>',"'bar'",'"baz"','&blong&');
+$a = array('<foo>', "'bar'", '"baz"', '&blong&');
echo "Normal: ", json_encode($a), "\n";
-echo "Tags: ", json_encode($a,JSON_HEX_TAG), "\n";
-echo "Apos: ", json_encode($a,JSON_HEX_APOS), "\n";
-echo "Quot: ", json_encode($a,JSON_HEX_QUOT), "\n";
-echo "Amp: ", json_encode($a,JSON_HEX_AMP), "\n";
-echo "All: ", json_encode($a,JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_AMP), "\n";
+echo "Tags: ", json_encode($a, JSON_HEX_TAG), "\n";
+echo "Apos: ", json_encode($a, JSON_HEX_APOS), "\n";
+echo "Quot: ", json_encode($a, JSON_HEX_QUOT), "\n";
+echo "Amp: ", json_encode($a, JSON_HEX_AMP), "\n";
+echo "All: ", json_encode($a, JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_AMP), "\n";
?>
--EXPECT--
Normal: ["<foo>","'bar'","\"baz\"","&blong&"]
diff --git a/ext/json/tests/007.phpt b/ext/json/tests/007.phpt
index 7557ac9ed7..008d1dd5de 100644
--- a/ext/json/tests/007.phpt
+++ b/ext/json/tests/007.phpt
@@ -15,7 +15,6 @@ var_dump(json_last_error(), json_last_error_msg());
var_dump(json_decode("[1"));
var_dump(json_last_error(), json_last_error_msg());
-
echo "Done\n";
?>
--EXPECT--
diff --git a/ext/json/tests/bug40503.phpt b/ext/json/tests/bug40503.phpt
index 48f18a4e0f..387ba299ec 100644
--- a/ext/json/tests/bug40503.phpt
+++ b/ext/json/tests/bug40503.phpt
@@ -6,14 +6,14 @@ precision=14
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-function show_eq($x,$y) {
- echo "$x ". ($x==$y ? "==" : "!=") ." $y\n";
+function json_test_show_eq($x, $y) {
+ echo "$x ". ( $x == $y ? "==" : "!=") ." $y\n";
}
$value = 0x7FFFFFFF; #2147483647;
-show_eq("$value", json_encode($value));
+json_test_show_eq("$value", json_encode($value));
$value++;
-show_eq("$value", json_encode($value));
+json_test_show_eq("$value", json_encode($value));
?>
--EXPECT--
diff --git a/ext/json/tests/bug41034.phpt b/ext/json/tests/bug41034.phpt
index cc7704122d..58ae281e6c 100644
--- a/ext/json/tests/bug41034.phpt
+++ b/ext/json/tests/bug41034.phpt
@@ -4,7 +4,7 @@ Bug #41034 (json_encode() ignores null byte started keys in arrays)
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-echo json_encode(array(0,"\0ab"=>1,"\0null-prefixed value"));
+echo json_encode(array(0, "\0ab"=>1, "\0null-prefixed value"));
echo "\nDone\n";
?>
--EXPECT--
diff --git a/ext/json/tests/bug41403.phpt b/ext/json/tests/bug41403.phpt
index 1a7343122a..f0e5f3b511 100644
--- a/ext/json/tests/bug41403.phpt
+++ b/ext/json/tests/bug41403.phpt
@@ -2,9 +2,7 @@
Bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.')
--SKIPIF--
<?php
-
if (!extension_loaded('json')) die('skip');
-
if (setlocale(LC_NUMERIC, "de_DE") === false) {
die("skip no de_DE locale");
}
diff --git a/ext/json/tests/bug42785.phpt b/ext/json/tests/bug42785.phpt
index 7bdadbed1e..c4cda1196e 100644
--- a/ext/json/tests/bug42785.phpt
+++ b/ext/json/tests/bug42785.phpt
@@ -2,20 +2,19 @@
Bug #42785 (Incorrect formatting of double values with non-english locales)
--SKIPIF--
<?php
- if (!extension_loaded("json")) {
- print "skip";
- } else if (!setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1")) {
- die("skip locale needed for this test is not supported on this platform");
- }
+if (!extension_loaded('json')) die('skip');
+if (!setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1")) {
+ die("skip locale needed for this test is not supported on this platform");
+}
?>
--FILE--
<?php
setlocale(LC_ALL, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1");
-$foo = Array(100.10,"bar");
+$foo = array(100.10,"bar");
var_dump(json_encode($foo));
-Class bar {}
+class bar {}
$bar1 = new bar;
$bar1->a = 100.10;
$bar1->b = "foo";
diff --git a/ext/json/tests/bug46215.phpt b/ext/json/tests/bug46215.phpt
index 0ac460cc15..be3a80f860 100644
--- a/ext/json/tests/bug46215.phpt
+++ b/ext/json/tests/bug46215.phpt
@@ -1,16 +1,12 @@
--TEST--
Bug #46215 (json_encode mutates its parameter and has some class-specific state)
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
class foo {
- protected $a = array();
+ protected $a = array();
}
$a = new foo;
diff --git a/ext/json/tests/bug46944.phpt b/ext/json/tests/bug46944.phpt
index 812a548875..3d70f3ee11 100644
--- a/ext/json/tests/bug46944.phpt
+++ b/ext/json/tests/bug46944.phpt
@@ -6,8 +6,8 @@ Bug #46944 (json_encode() doesn't handle 3 byte utf8 correctly)
<?php
for ($i = 1; $i <= 16; $i++) {
- $first = 0xf0|($i >> 2);
- $second = 0x8f|($i & 3) << 4;
+ $first = 0xf0 | ($i >> 2);
+ $second = 0x8f | ($i & 3) << 4;
$string = sprintf("aa%c%c\xbf\xbdzz", $first, $second);
echo json_encode($string) . "\n";
}
diff --git a/ext/json/tests/bug47644.phpt b/ext/json/tests/bug47644.phpt
index 5e996b6973..85c4858af5 100644
--- a/ext/json/tests/bug47644.phpt
+++ b/ext/json/tests/bug47644.phpt
@@ -2,8 +2,8 @@
Bug #47644 (valid large integers are truncated)
--SKIPIF--
<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
- if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+if (!extension_loaded('json')) die('skip');
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
diff --git a/ext/json/tests/bug54058.phpt b/ext/json/tests/bug54058.phpt
index df1b3130f8..4b8773f93d 100644
--- a/ext/json/tests/bug54058.phpt
+++ b/ext/json/tests/bug54058.phpt
@@ -22,8 +22,8 @@ json_encode($b);
var_dump(json_last_error(), json_last_error_msg());
$c = array(
- 'foo' => $bad_utf8,
- 'bar' => 1
+ 'foo' => $bad_utf8,
+ 'bar' => 1
);
json_encode($c);
var_dump(json_last_error(), json_last_error_msg());
diff --git a/ext/json/tests/bug54484.phpt b/ext/json/tests/bug54484.phpt
index 897c655afe..f70b96ee13 100644
--- a/ext/json/tests/bug54484.phpt
+++ b/ext/json/tests/bug54484.phpt
@@ -10,15 +10,12 @@ var_dump(json_last_error());
json_decode("");
var_dump(json_last_error());
-
json_decode("invalid json");
var_dump(json_last_error());
-
json_decode("\"\001 invalid json\"");
var_dump(json_last_error());
-
json_decode("");
var_dump(json_last_error());
?>
diff --git a/ext/json/tests/bug61978.phpt b/ext/json/tests/bug61978.phpt
index c34b03f8f7..56b92dc672 100644
--- a/ext/json/tests/bug61978.phpt
+++ b/ext/json/tests/bug61978.phpt
@@ -6,25 +6,25 @@ Bug #61978 (Object recursion not detected for classes that implement JsonSeriali
<?php
class JsonTest1 {
- public $test;
- public $me;
- public function __construct() {
- $this->test = '123';
- $this->me = $this;
- }
+ public $test;
+ public $me;
+ public function __construct() {
+ $this->test = '123';
+ $this->me = $this;
+ }
}
class JsonTest2 implements JsonSerializable {
- public $test;
- public function __construct() {
- $this->test = '123';
- }
- public function jsonSerialize() {
- return array(
- 'test' => $this->test,
- 'me' => $this
- );
- }
+ public $test;
+ public function __construct() {
+ $this->test = '123';
+ }
+ public function jsonSerialize() {
+ return array(
+ 'test' => $this->test,
+ 'me' => $this
+ );
+ }
}
diff --git a/ext/json/tests/bug62369.phpt b/ext/json/tests/bug62369.phpt
index a5efd802c5..cf254bfc18 100644
--- a/ext/json/tests/bug62369.phpt
+++ b/ext/json/tests/bug62369.phpt
@@ -6,28 +6,28 @@ FR #62369 (Segfault on json_encode(deeply_nested_array)
<?php
$array = array();
-for ($i=0; $i<550; $i++) {
- $array = array($array);
+for ($i=0; $i < 550; $i++) {
+ $array = array($array);
}
json_encode($array, 0, 551);
switch (json_last_error()) {
- case JSON_ERROR_NONE:
- echo 'OK'.PHP_EOL;
- break;
- case JSON_ERROR_DEPTH:
- echo 'ERROR'.PHP_EOL;
- break;
+ case JSON_ERROR_NONE:
+ echo 'OK' . PHP_EOL;
+ break;
+ case JSON_ERROR_DEPTH:
+ echo 'ERROR' . PHP_EOL;
+ break;
}
json_encode($array, 0, 540);
switch (json_last_error()) {
- case JSON_ERROR_NONE:
- echo 'OK'.PHP_EOL;
- break;
- case JSON_ERROR_DEPTH:
- echo 'ERROR'.PHP_EOL;
- break;
+ case JSON_ERROR_NONE:
+ echo 'OK' . PHP_EOL;
+ break;
+ case JSON_ERROR_DEPTH:
+ echo 'ERROR' . PHP_EOL;
+ break;
}
--EXPECTF--
OK
diff --git a/ext/json/tests/bug63737.phpt b/ext/json/tests/bug63737.phpt
index 1fb06d485e..35361d850a 100644
--- a/ext/json/tests/bug63737.phpt
+++ b/ext/json/tests/bug63737.phpt
@@ -5,10 +5,10 @@ Bug #63737 (json_decode does not properly decode with options parameter)
--FILE--
<?php
function decode($json) {
- $x = json_decode($json);
- var_dump($x);
- $x = json_decode($json, false, 512, JSON_BIGINT_AS_STRING);
- var_dump($x);
+ $x = json_decode($json);
+ var_dump($x);
+ $x = json_decode($json, false, 512, JSON_BIGINT_AS_STRING);
+ var_dump($x);
}
decode('123456789012345678901234567890');
diff --git a/ext/json/tests/bug64874_part1.phpt b/ext/json/tests/bug64874_part1.phpt
index 6b79b8dc04..9e0cb7e1cf 100644
--- a/ext/json/tests/bug64874_part1.phpt
+++ b/ext/json/tests/bug64874_part1.phpt
@@ -5,9 +5,9 @@ Whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitiv
--FILE--
<?php
function decode($json) {
- var_dump(json_decode($json));
- var_dump(json_last_error() !== 0);
- echo "\n";
+ var_dump(json_decode($json));
+ var_dump(json_last_error() !== 0);
+ echo "\n";
}
// Leading whitespace should be ignored
diff --git a/ext/json/tests/bug64874_part2.phpt b/ext/json/tests/bug64874_part2.phpt
index 338fc1141a..db784bd8e0 100644
--- a/ext/json/tests/bug64874_part2.phpt
+++ b/ext/json/tests/bug64874_part2.phpt
@@ -5,8 +5,8 @@ Case-sensitivity part of bug #64874 ("json_decode handles whitespace and case-se
--FILE--
<?php
function decode($json) {
- var_dump(json_decode($json));
- echo ((json_last_error() !== 0) ? 'ERROR' : 'SUCCESS') . PHP_EOL;
+ var_dump(json_decode($json));
+ echo ((json_last_error() !== 0) ? 'ERROR' : 'SUCCESS') . PHP_EOL;
}
// Only lowercase should work
diff --git a/ext/json/tests/bug66021.phpt b/ext/json/tests/bug66021.phpt
index cf52e0c6df..504d17fc78 100644
--- a/ext/json/tests/bug66021.phpt
+++ b/ext/json/tests/bug66021.phpt
@@ -9,7 +9,7 @@ class Foo {
private $bar = 'baz';
}
-echo json_encode([[], (object)[], new Foo], JSON_PRETTY_PRINT), "\n";
+echo json_encode(array(array(), (object) array(), new Foo), JSON_PRETTY_PRINT);
?>
--EXPECT--
diff --git a/ext/json/tests/bug71835.phpt b/ext/json/tests/bug71835.phpt
new file mode 100644
index 0000000000..dbe313b70c
--- /dev/null
+++ b/ext/json/tests/bug71835.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+class SomeClass implements JsonSerializable {
+ public function jsonSerialize() {
+ return [get_object_vars($this)];
+ }
+}
+$class = new SomeClass;
+$arr = [$class];
+var_dump(json_encode($arr));
+
+class SomeClass2 implements JsonSerializable {
+ public function jsonSerialize() {
+ return [(array)$this];
+ }
+}
+$class = new SomeClass2;
+$arr = [$class];
+var_dump(json_encode($arr));
+?>
+--EXPECT--
+string(6) "[[[]]]"
+string(6) "[[[]]]"
diff --git a/ext/json/tests/bug72069.phpt b/ext/json/tests/bug72069.phpt
new file mode 100644
index 0000000000..0ff8c98621
--- /dev/null
+++ b/ext/json/tests/bug72069.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #72069 (Behavior \JsonSerializable different from json_encode)
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+$result = json_encode(['end' => json_decode(null, true)]);
+var_dump($result);
+
+class A implements \JsonSerializable
+{
+ function jsonSerialize()
+ {
+ return ['end' => json_decode(null, true)];
+ }
+}
+$a = new A();
+$toJsonData = $a->jsonSerialize();
+$result = json_encode($a);
+var_dump($result);
+
+$result = json_encode($toJsonData);
+var_dump($result);
+?>
+--EXPECT--
+string(12) "{"end":null}"
+string(12) "{"end":null}"
+string(12) "{"end":null}"
diff --git a/ext/json/tests/fail001.phpt b/ext/json/tests/fail001.phpt
index 1bf9f12106..ea203746a6 100644
--- a/ext/json/tests/fail001.phpt
+++ b/ext/json/tests/fail001.phpt
@@ -2,43 +2,44 @@
JSON (http://www.crockford.com/JSON/JSON_checker/test/fail*.json)
--SKIPIF--
<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
+ if (!extension_loaded('json')) die('skip');
?>
--FILE--
<?php
-$tests = array('"A JSON payload should be an object or array, not a string."',
- '["Unclosed array"',
- '{unquoted_key: "keys must be quoted}',
- '["extra comma",]',
- '["double extra comma",,]',
- '[ , "<-- missing value"]',
- '["Comma after the close"],',
- '["Extra close"]]',
- '{"Extra comma": true,}',
- '{"Extra value after close": true} "misplaced quoted value"',
- '{"Illegal expression": 1 + 2}',
- '{"Illegal invocation": alert()}',
- '{"Numbers cannot have leading zeroes": 013}',
- '{"Numbers cannot be hex": 0x14}',
- '["Illegal backslash escape: \\x15"]',
- '["Illegal backslash escape: \\\'"]',
- '["Illegal backslash escape: \\017"]',
- '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]',
- '{"Missing colon" null}',
- '{"Double colon":: null}',
- '{"Comma instead of colon", null}',
- '["Colon instead of comma": false]',
- '["Bad value", truth]',
- "['single quote']");
+$tests = array(
+ '"A JSON payload should be an object or array, not a string."',
+ '["Unclosed array"',
+ '{unquoted_key: "keys must be quoted}',
+ '["extra comma",]',
+ '["double extra comma",,]',
+ '[ , "<-- missing value"]',
+ '["Comma after the close"],',
+ '["Extra close"]]',
+ '{"Extra comma": true,}',
+ '{"Extra value after close": true} "misplaced quoted value"',
+ '{"Illegal expression": 1 + 2}',
+ '{"Illegal invocation": alert()}',
+ '{"Numbers cannot have leading zeroes": 013}',
+ '{"Numbers cannot be hex": 0x14}',
+ '["Illegal backslash escape: \\x15"]',
+ '["Illegal backslash escape: \\\'"]',
+ '["Illegal backslash escape: \\017"]',
+ '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]',
+ '{"Missing colon" null}',
+ '{"Double colon":: null}',
+ '{"Comma instead of colon", null}',
+ '["Colon instead of comma": false]',
+ '["Bad value", truth]',
+ "['single quote']"
+);
-foreach ($tests as $test)
-{
- echo 'Testing: ' . $test . "\n";
- echo "AS OBJECT\n";
- var_dump(json_decode($test));
- echo "AS ARRAY\n";
- var_dump(json_decode($test, true));
+foreach ($tests as $test) {
+ echo 'Testing: ' . $test . "\n";
+ echo "AS OBJECT\n";
+ var_dump(json_decode($test));
+ echo "AS ARRAY\n";
+ var_dump(json_decode($test, true));
}
?>
diff --git a/ext/json/tests/json_decode_basic.phpt b/ext/json/tests/json_decode_basic.phpt
index 6dbeadb367..0bc939c257 100644
--- a/ext/json/tests/json_decode_basic.phpt
+++ b/ext/json/tests/json_decode_basic.phpt
@@ -1,50 +1,41 @@
--TEST--
Test json_decode() function : basic functionality
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-/* Prototype : mixed json_decode ( string $json [, bool $assoc ] )
- * Description: Decodes a JSON string
- * Source code: ext/json/php_json.c
- * Alias to functions:
- */
echo "*** Testing json_decode() : basic functionality ***\n";
// array with different values for $string
$inputs = array (
- '0',
- '123',
- '-123',
- '2147483647',
- '-2147483648',
- '123.456',
- '1230',
- '-1230',
- 'true',
- 'false',
- 'null',
- '"abc"',
- '"Hello World\r\n"',
- '[]',
- '[1,2,3,4,5]',
- '{"myInt":99,"myFloat":123.45,"myNull":null,"myBool":true,"myString":"Hello World"}',
- '{"Jan":31,"Feb":29,"Mar":31,"April":30,"May":31,"June":30}',
- '""',
- '{}'
+ '0',
+ '123',
+ '-123',
+ '2147483647',
+ '-2147483648',
+ '123.456',
+ '1230',
+ '-1230',
+ 'true',
+ 'false',
+ 'null',
+ '"abc"',
+ '"Hello World\r\n"',
+ '[]',
+ '[1,2,3,4,5]',
+ '{"myInt":99,"myFloat":123.45,"myNull":null,"myBool":true,"myString":"Hello World"}',
+ '{"Jan":31,"Feb":29,"Mar":31,"April":30,"May":31,"June":30}',
+ '""',
+ '{}'
);
// loop through with each element of the $inputs array to test json_decode() function
$count = 1;
foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump(json_decode($input));
- var_dump(json_decode($input, TRUE));
- $count ++;
+ echo "-- Iteration $count --\n";
+ var_dump(json_decode($input));
+ var_dump(json_decode($input, true));
+ $count++;
}
?>
diff --git a/ext/json/tests/json_decode_error.phpt b/ext/json/tests/json_decode_error.phpt
index 4d5d4e4bee..90a42889a0 100644
--- a/ext/json/tests/json_decode_error.phpt
+++ b/ext/json/tests/json_decode_error.phpt
@@ -1,26 +1,17 @@
--TEST--
Test json_decode() function : error conditions
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-/* Prototype : mixed json_decode ( string $json [, bool $assoc=false [, int $depth=512 ]] )
- * Description: Decodes a JSON string
- * Source code: ext/json/php_json.c
- * Alias to functions:
- */
echo "*** Testing json_decode() : error conditions ***\n";
echo "\n-- Testing json_decode() function with no arguments --\n";
-var_dump( json_decode() );
+var_dump(json_decode());
echo "\n-- Testing json_decode() function with more than expected no. of arguments --\n";
$extra_arg = 10;
-var_dump( json_decode('"abc"', TRUE, 512, 0, $extra_arg) );
+var_dump(json_decode('"abc"', true, 512, 0, $extra_arg));
?>
===Done===
diff --git a/ext/json/tests/json_encode_basic.phpt b/ext/json/tests/json_encode_basic.phpt
index fc348eed81..7fe855d1dc 100644
--- a/ext/json/tests/json_encode_basic.phpt
+++ b/ext/json/tests/json_encode_basic.phpt
@@ -1,18 +1,9 @@
--TEST--
Test json_encode() function : basic functionality
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-/* Prototype : string json_encode ( mixed $value )
- * Description: Returns the JSON representation of a value
- * Source code: ext/json/php_json.c
- * Alias to functions:
- */
echo "*** Testing json_encode() : basic functionality ***\n";
//get an unset variable
@@ -35,64 +26,63 @@ $obj->MyString = "Hello World";
// array with different values for $string
$inputs = array (
+ // integers
+ 0,
+ 123,
+ -123,
+ 2147483647,
+ -2147483648,
- // integers
-/*1*/ 0,
- 123,
- -123,
- 2147483647,
- -2147483648,
+ // floats
+ 123.456,
+ 1.23E3,
+ -1.23E3,
- // floats
-/*6*/ 123.456,
- 1.23E3,
- -1.23E3,
-
- // boolean
-/*9*/ TRUE,
- true,
- FALSE,
- false,
+ // boolean
+ TRUE,
+ true,
+ FALSE,
+ false,
- // NULL
-/*13*/ NULL,
- null,
-
- // strings
-/*15*/ "abc",
- 'abc',
- "Hello\t\tWorld\n",
+ // NULL
+ NULL,
+ null,
- // arrays
-/*18*/ array(),
- array(1,2,3,4,5),
- array(1 => "Sun", 2=>"Mon", 3 => "Tue", 4 => "Wed", 5 => "Thur", 6 => "Fri", 7 => "Sat"),
- array("Jan" => 31, "Feb" => 29, "Mar" => 31, "April" => 30, "May" => 31, "June" => 30),
-
- // empty data
-/*22*/ "",
- '',
+ // strings
+ "abc",
+ 'abc',
+ "Hello\t\tWorld\n",
+
+ // arrays
+ array(),
+ array(1,2,3,4,5),
+ array(1 => "Sun", 2 => "Mon", 3 => "Tue", 4 => "Wed", 5 => "Thur", 6 => "Fri", 7 => "Sat"),
+ array("Jan" => 31, "Feb" => 29, "Mar" => 31, "April" => 30, "May" => 31, "June" => 30),
+
+ // empty data
+ "",
+ '',
- // undefined data
-/*24*/ @$undefined_var,
+ // undefined data
+ @$undefined_var,
- // unset data
-/*25*/ @$unset_var,
+ // unset data
+ @$unset_var,
- // resource variable
-/*26*/ $fp,
+ // resource variable
+ $fp,
- // object variable
-/*27*/ $obj
+ // object variable
+ $obj
);
// loop through with each element of the $inputs array to test json_encode() function
$count = 1;
foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump(json_encode($input));
- $count ++;
+ echo "-- Iteration $count --\n";
+ var_dump(json_encode($input));
+ $count ++;
}
?>
diff --git a/ext/json/tests/json_encode_basic_utf8.phpt b/ext/json/tests/json_encode_basic_utf8.phpt
index a8e8b425ef..d03e83a8a9 100644
--- a/ext/json/tests/json_encode_basic_utf8.phpt
+++ b/ext/json/tests/json_encode_basic_utf8.phpt
@@ -1,18 +1,9 @@
--TEST--
Test json_encode() function : basic functionality with UTF8 string input
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-/* Prototype : string json_encode ( mixed $value )
- * Description: Returns the JSON representation of a value
- * Source code: ext/json/php_json.c
- * Alias to functions:
- */
echo "*** Testing json_encode() : basic functionality with UTF-8 input***\n";
$utf8_string = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII=');
diff --git a/ext/json/tests/json_encode_error.phpt b/ext/json/tests/json_encode_error.phpt
index 547c8bef17..defc7b474c 100644
--- a/ext/json/tests/json_encode_error.phpt
+++ b/ext/json/tests/json_encode_error.phpt
@@ -1,27 +1,17 @@
--TEST--
Test json_encode() function : error conditions
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
-/* Prototype : string json_encode ( mixed $value [, int $options=0 ] )
- * Description: Returns the JSON representation of a value
- * Source code: ext/json/php_json.c
- * Alias to functions:
- */
-
echo "*** Testing json_encode() : error conditions ***\n";
echo "\n-- Testing json_encode() function with no arguments --\n";
-var_dump( json_encode() );
+var_dump(json_encode());
echo "\n-- Testing json_encode() function with more than expected no. of arguments --\n";
$extra_arg = 10;
-var_dump( json_encode("abc", 0, $extra_arg) );
+var_dump(json_encode("abc", 0, $extra_arg));
?>
===Done===
diff --git a/ext/json/tests/json_encode_numeric.phpt b/ext/json/tests/json_encode_numeric.phpt
index 5392350194..5850c4c959 100644
--- a/ext/json/tests/json_encode_numeric.phpt
+++ b/ext/json/tests/json_encode_numeric.phpt
@@ -1,11 +1,7 @@
--TEST--
Test json_encode() function with numeric flag
--SKIPIF--
-<?php
-if (!extension_loaded("json")) {
- die('skip JSON extension not available in this build');
-}
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
var_dump(
diff --git a/ext/json/tests/json_encode_u2028_u2029.phpt b/ext/json/tests/json_encode_u2028_u2029.phpt
new file mode 100644
index 0000000000..4b87e9b307
--- /dev/null
+++ b/ext/json/tests/json_encode_u2028_u2029.phpt
@@ -0,0 +1,36 @@
+--TEST--
+json_encode() tests for U+2028, U+2029
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+var_dump(json_encode(array("a\xC3\xA1b")));
+var_dump(json_encode(array("a\xC3\xA1b"), JSON_UNESCAPED_UNICODE));
+var_dump(json_encode("a\xE2\x80\xA7b"));
+var_dump(json_encode("a\xE2\x80\xA7b", JSON_UNESCAPED_UNICODE));
+var_dump(json_encode("a\xE2\x80\xA8b"));
+var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_UNICODE));
+var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_LINE_TERMINATORS));
+var_dump(json_encode("a\xE2\x80\xA8b", JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS));
+var_dump(json_encode("a\xE2\x80\xA9b"));
+var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_UNICODE));
+var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_LINE_TERMINATORS));
+var_dump(json_encode("a\xE2\x80\xA9b", JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS));
+var_dump(json_encode("a\xE2\x80\xAAb"));
+var_dump(json_encode("a\xE2\x80\xAAb", JSON_UNESCAPED_UNICODE));
+?>
+--EXPECT--
+string(12) "["a\u00e1b"]"
+string(8) "["aáb"]"
+string(10) ""a\u2027b""
+string(7) ""a‧b""
+string(10) ""a\u2028b""
+string(10) ""a\u2028b""
+string(10) ""a\u2028b""
+string(7) ""a
b""
+string(10) ""a\u2029b""
+string(10) ""a\u2029b""
+string(10) ""a\u2029b""
+string(7) ""a
b""
+string(10) ""a\u202ab""
+string(7) ""a‪b""
diff --git a/ext/json/tests/json_last_error_error.phpt b/ext/json/tests/json_last_error_error.phpt
new file mode 100644
index 0000000000..9b520ed9a7
--- /dev/null
+++ b/ext/json/tests/json_last_error_error.phpt
@@ -0,0 +1,21 @@
+--TEST--
+json_last_error() failures
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+var_dump(json_last_error());
+var_dump(json_last_error(true));
+var_dump(json_last_error('some', 4, 'args', 'here'));
+
+?>
+--EXPECTF--
+int(0)
+
+Warning: json_last_error() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: json_last_error() expects exactly 0 parameters, 4 given in %s on line %d
+NULL
+
diff --git a/ext/json/tests/json_last_error_msg_error.phpt b/ext/json/tests/json_last_error_msg_error.phpt
new file mode 100644
index 0000000000..1a5f9d1bda
--- /dev/null
+++ b/ext/json/tests/json_last_error_msg_error.phpt
@@ -0,0 +1,21 @@
+--TEST--
+json_last_error_msg() failures
+--SKIPIF--
+<?php if (!extension_loaded("json")) print "skip"; ?>
+--FILE--
+<?php
+
+var_dump(json_last_error_msg());
+var_dump(json_last_error_msg(true));
+var_dump(json_last_error_msg('some', 4, 'args', 'here'));
+
+?>
+--EXPECTF--
+string(8) "No error"
+
+Warning: json_last_error_msg() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: json_last_error_msg() expects exactly 0 parameters, 4 given in %s on line %d
+NULL
+
diff --git a/ext/json/tests/pass001.1.phpt b/ext/json/tests/pass001.1.phpt
index a51f885780..611c40c4a4 100644
--- a/ext/json/tests/pass001.1.phpt
+++ b/ext/json/tests/pass001.1.phpt
@@ -4,8 +4,8 @@ JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
precision=14
--SKIPIF--
<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
- if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+if (!extension_loaded('json')) die('skip');
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--FILE--
<?php
diff --git a/ext/json/tests/pass001.1_64bit.phpt b/ext/json/tests/pass001.1_64bit.phpt
index ff2714436d..e6666d1599 100644
--- a/ext/json/tests/pass001.1_64bit.phpt
+++ b/ext/json/tests/pass001.1_64bit.phpt
@@ -4,8 +4,8 @@ JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
precision=14
--SKIPIF--
<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
- if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+if (!extension_loaded('json')) die('skip');
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
diff --git a/ext/json/tests/pass001.phpt b/ext/json/tests/pass001.phpt
index 1fd05fcdd8..ffe7c61f01 100644
--- a/ext/json/tests/pass001.phpt
+++ b/ext/json/tests/pass001.phpt
@@ -4,7 +4,7 @@ JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
precision=14
--SKIPIF--
<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
+if (!extension_loaded('json')) die('skip');
?>
--FILE--
<?php
diff --git a/ext/json/tests/pass002.phpt b/ext/json/tests/pass002.phpt
index 24c7e33580..aa61cf5396 100644
--- a/ext/json/tests/pass002.phpt
+++ b/ext/json/tests/pass002.phpt
@@ -1,9 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass2.json)
--SKIPIF--
-<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/json/tests/pass003.phpt b/ext/json/tests/pass003.phpt
index e82bf5cb93..bdfbaf298c 100644
--- a/ext/json/tests/pass003.phpt
+++ b/ext/json/tests/pass003.phpt
@@ -1,9 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass3.json)
--SKIPIF--
-<?php
- if (!extension_loaded('json')) die('skip: json extension not available');
-?>
+<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--
<?php
diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4
index 036d1d3559..947cebca33 100644
--- a/ext/ldap/config.m4
+++ b/ext/ldap/config.m4
@@ -204,7 +204,7 @@ if test "$PHP_LDAP" != "no"; then
dnl Solaris 2.8 claims to be 2004 API, but doesn't have
dnl ldap_parse_reference() nor ldap_start_tls_s()
- AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s])
+ AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find])
dnl
dnl SASL check
diff --git a/ext/ldap/config.w32 b/ext/ldap/config.w32
index 2fa05f4383..9102c6c952 100644
--- a/ext/ldap/config.w32
+++ b/ext/ldap/config.w32
@@ -22,6 +22,7 @@ if (PHP_LDAP != "no") {
AC_DEFINE('HAVE_LDAP_SASL', 1);
AC_DEFINE('HAVE_LDAP_SASL_SASL_H', 1);
AC_DEFINE('LDAP_DEPRECATED', 1);
+ AC_DEFINE('HAVE_LDAP_CONTROL_FIND', 1);
} else {
WARNING("ldap not enabled; libraries and headers not found");
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index ab1186572e..0ead76c894 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -71,9 +71,24 @@
#define PHP_LDAP_ESCAPE_FILTER 0x01
#define PHP_LDAP_ESCAPE_DN 0x02
+#if defined(LDAP_CONTROL_PAGEDRESULTS) && !defined(HAVE_LDAP_CONTROL_FIND)
+LDAPControl *ldap_control_find( const char *oid, LDAPControl **ctrls, LDAPControl ***nextctrlp)
+{
+ assert(nextctrlp == NULL);
+ return ldap_find_control(oid, ctrls);
+}
+#endif
+
+#if !defined(LDAP_API_FEATURE_X_OPENLDAP)
+void ldap_memvfree(void **v)
+{
+ ldap_value_free((char **)v);
+}
+#endif
+
typedef struct {
LDAP *link;
-#if defined(HAVE_3ARG_SETREBINDPROC)
+#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
zval rebindproc;
#endif
} ldap_linkdata;
@@ -97,10 +112,8 @@ static void _close_ldap_link(zend_resource *rsrc) /* {{{ */
{
ldap_linkdata *ld = (ldap_linkdata *)rsrc->ptr;
- /* ldap_unbind_s() is deprecated;
- * the distinction between ldap_unbind() and ldap_unbind_s() is moot */
ldap_unbind_ext(ld->link, NULL, NULL);
-#ifdef HAVE_3ARG_SETREBINDPROC
+#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
zval_ptr_dtor(&ld->rebindproc);
#endif
@@ -175,6 +188,9 @@ PHP_MINIT_FUNCTION(ldap)
#elif defined (LDAP_X_OPT_CONNECT_TIMEOUT)
REGISTER_LONG_CONSTANT("LDAP_OPT_NETWORK_TIMEOUT", LDAP_X_OPT_CONNECT_TIMEOUT, CONST_PERSISTENT | CONST_CS);
#endif
+#ifdef LDAP_OPT_TIMEOUT
+ REGISTER_LONG_CONSTANT("LDAP_OPT_TIMEOUT", LDAP_OPT_TIMEOUT, CONST_PERSISTENT | CONST_CS);
+#endif
REGISTER_LONG_CONSTANT("LDAP_OPT_PROTOCOL_VERSION", LDAP_OPT_PROTOCOL_VERSION, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_NUMBER", LDAP_OPT_ERROR_NUMBER, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_OPT_REFERRALS", LDAP_OPT_REFERRALS, CONST_PERSISTENT | CONST_CS);
@@ -212,6 +228,16 @@ PHP_MINIT_FUNCTION(ldap)
REGISTER_LONG_CONSTANT("GSLC_SSL_TWOWAY_AUTH", GSLC_SSL_TWOWAY_AUTH, CONST_PERSISTENT | CONST_CS);
#endif
+#if (LDAP_API_VERSION > 2000)
+ REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_REQUIRE_CERT", LDAP_OPT_X_TLS_REQUIRE_CERT, CONST_PERSISTENT | CONST_CS);
+
+ REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_NEVER", LDAP_OPT_X_TLS_NEVER, CONST_PERSISTENT | CONST_CS);
+ REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_HARD", LDAP_OPT_X_TLS_HARD, CONST_PERSISTENT | CONST_CS);
+ REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_DEMAND", LDAP_OPT_X_TLS_DEMAND, CONST_PERSISTENT | CONST_CS);
+ REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_ALLOW", LDAP_OPT_X_TLS_ALLOW, CONST_PERSISTENT | CONST_CS);
+ REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_TRY", LDAP_OPT_X_TLS_TRY, CONST_PERSISTENT | CONST_CS);
+#endif
+
REGISTER_LONG_CONSTANT("LDAP_ESCAPE_FILTER", PHP_LDAP_ESCAPE_FILTER, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("LDAP_ESCAPE_DN", PHP_LDAP_ESCAPE_DN, CONST_PERSISTENT | CONST_CS);
@@ -338,11 +364,8 @@ PHP_FUNCTION(ldap_connect)
ld = ecalloc(1, sizeof(ldap_linkdata));
- /* OpenLDAP provides a specific call to detect valid LDAP URIs;
- * ldap_init()/ldap_open() is deprecated, use ldap_initialize() instead.
- */
{
- int rc;
+ int rc = LDAP_SUCCESS;
char *url = host;
if (!ldap_is_ldap_url(url)) {
int urllen = hostlen + sizeof( "ldap://:65535" );
@@ -356,7 +379,21 @@ PHP_FUNCTION(ldap_connect)
snprintf( url, urllen, "ldap://%s:%ld", host ? host : "", port );
}
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ /* ldap_init() is deprecated, use ldap_initialize() instead.
+ */
rc = ldap_initialize(&ldap, url);
+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
+ /* ldap_init does not support URLs.
+ * We must try the original host and port information.
+ */
+ ldap = ldap_init(host, port);
+ if (ldap == NULL) {
+ efree(ld);
+ php_error_docref(NULL, E_WARNING, "Could not create session handle");
+ RETURN_FALSE;
+ }
+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
if (url != host) {
efree(url);
}
@@ -456,14 +493,19 @@ PHP_FUNCTION(ldap_bind)
}
{
+#ifdef LDAP_API_FEATURE_X_OPENLDAP
+ /* ldap_simple_bind_s() is deprecated, use ldap_sasl_bind_s() instead.
+ */
struct berval cred;
- /* ldap_bind_s() is deprecated; use ldap_sasl_bind_s() instead */
cred.bv_val = ldap_bind_pw;
cred.bv_len = ldap_bind_pw ? ldap_bind_pwlen : 0;
rc = ldap_sasl_bind_s(ld->link, ldap_bind_dn, LDAP_SASL_SIMPLE, &cred,
NULL, NULL, /* no controls right now */
NULL); /* we don't care about the server's credentials */
+#else /* ! LDAP_API_FEATURE_X_OPENLDAP */
+ rc = ldap_simple_bind_s(ld->link, ldap_bind_dn, ldap_bind_pw);
+#endif /* ! LDAP_API_FEATURE_X_OPENLDAP */
}
if ( rc != LDAP_SUCCESS) {
php_error_docref(NULL, E_WARNING, "Unable to bind to server: %s", ldap_err2string(rc));
@@ -639,7 +681,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in
/* timelimit */
if (timelimit > -1) {
#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP
- ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_timelimit);
+ ldap_get_option(ldap, LDAP_OPT_TIMELIMIT, old_timelimit);
ldap_set_option(ldap, LDAP_OPT_TIMELIMIT, &timelimit);
#else
*old_timelimit = ldap->ld_timelimit;
@@ -650,7 +692,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in
/* deref */
if (deref > -1) {
#if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP
- ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_deref);
+ ldap_get_option(ldap, LDAP_OPT_DEREF, old_deref);
ldap_set_option(ldap, LDAP_OPT_DEREF, &deref);
#else
*old_deref = ldap->ld_deref;
@@ -699,7 +741,6 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
goto cleanup;
}
- SEPARATE_ZVAL(attr);
convert_to_string_ex(attr);
ldap_attrs[i] = Z_STRVAL_P(attr);
}
@@ -1340,7 +1381,6 @@ PHP_FUNCTION(ldap_explode_dn)
add_index_string(return_value, i, ldap_value[i]);
}
- /* ldap_value_free() is deprecated */
ldap_memvfree((void **)ldap_value);
}
/* }}} */
@@ -1431,6 +1471,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
value = zend_hash_get_current_data(Z_ARRVAL_P(entry));
+ ZVAL_DEREF(value);
if (Z_TYPE_P(value) != IS_ARRAY) {
num_values = 1;
} else {
@@ -2056,6 +2097,9 @@ PHP_FUNCTION(ldap_get_option)
#ifdef LDAP_OPT_RESTART
case LDAP_OPT_RESTART:
#endif
+#ifdef LDAP_OPT_X_TLS_REQUIRE_CERT
+ case LDAP_OPT_X_TLS_REQUIRE_CERT:
+#endif
{
int val;
@@ -2095,6 +2139,25 @@ PHP_FUNCTION(ldap_get_option)
ZVAL_LONG(retval, (timeout / 1000));
} break;
#endif
+#ifdef LDAP_OPT_TIMEOUT
+ case LDAP_OPT_TIMEOUT:
+ {
+ struct timeval *timeout = NULL;
+
+ if (ldap_get_option(ld->link, LDAP_OPT_TIMEOUT, (void *) &timeout)) {
+ if (timeout) {
+ ldap_memfree(timeout);
+ }
+ RETURN_FALSE;
+ }
+ if (!timeout) {
+ RETURN_FALSE;
+ }
+ zval_dtor(retval);
+ ZVAL_LONG(retval, timeout->tv_sec);
+ ldap_memfree(timeout);
+ } break;
+#endif
/* options with string value */
case LDAP_OPT_ERROR_STRING:
#ifdef LDAP_OPT_HOST_NAME
@@ -2167,6 +2230,9 @@ PHP_FUNCTION(ldap_set_option)
#ifdef LDAP_OPT_DEBUG_LEVEL
case LDAP_OPT_DEBUG_LEVEL:
#endif
+#ifdef LDAP_OPT_X_TLS_REQUIRE_CERT
+ case LDAP_OPT_X_TLS_REQUIRE_CERT:
+#endif
{
int val;
@@ -2200,6 +2266,19 @@ PHP_FUNCTION(ldap_set_option)
}
} break;
#endif
+#ifdef LDAP_OPT_TIMEOUT
+ case LDAP_OPT_TIMEOUT:
+ {
+ struct timeval timeout;
+
+ convert_to_long_ex(newval);
+ timeout.tv_sec = Z_LVAL_P(newval);
+ timeout.tv_usec = 0;
+ if (ldap_set_option(ldap, LDAP_OPT_TIMEOUT, (void *) &timeout)) {
+ RETURN_FALSE;
+ }
+ } break;
+#endif
/* options with string value */
case LDAP_OPT_ERROR_STRING:
#ifdef LDAP_OPT_HOST_NAME
@@ -2555,7 +2634,7 @@ PHP_FUNCTION(ldap_start_tls)
#endif
#endif /* (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP */
-#if defined(HAVE_3ARG_SETREBINDPROC)
+#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
/* {{{ _ldap_rebind_proc()
*/
int _ldap_rebind_proc(LDAP *ldap, const char *url, ber_tag_t req, ber_int_t msgid, void *params)
@@ -2664,6 +2743,7 @@ static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value,
ZSTR_VAL(ret)[p] = '\0';
ZSTR_LEN(ret) = p;
+ return ret;
}
static void php_ldap_escape_map_set_chars(zend_bool *map, const char *chars, const int charslen, char escape)
@@ -3209,7 +3289,7 @@ ZEND_END_ARG_INFO()
#endif
#endif
-#if defined(HAVE_3ARG_SETREBINDPROC)
+#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_set_rebind_proc, 0, 0, 2)
ZEND_ARG_INFO(0, link)
ZEND_ARG_INFO(0, callback)
@@ -3297,7 +3377,7 @@ const zend_function_entry ldap_functions[] = {
#endif
#endif
-#if defined(HAVE_3ARG_SETREBINDPROC)
+#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
PHP_FE(ldap_set_rebind_proc, arginfo_ldap_set_rebind_proc)
#endif
diff --git a/ext/ldap/php_ldap.h b/ext/ldap/php_ldap.h
index bce1d6f7aa..dc311c4af1 100644
--- a/ext/ldap/php_ldap.h
+++ b/ext/ldap/php_ldap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/ldap/tests/README b/ext/ldap/tests/README
index b30043abce..4f3b07d6cd 100644
--- a/ext/ldap/tests/README
+++ b/ext/ldap/tests/README
@@ -2,13 +2,16 @@ Most tests here relies on the availability of an LDAP server configured with TLS
Client/Server configuration:
===========================================================
-OpenLDAP 2.3.43 has been used with the configuration below.
+OpenLDAP 2.4.31 has been used with the configuration below.
Notes:
1. A self signed certificate can be generated using:
$ openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650
It is used for testing ldap_start_tls(), which also requires "TLS_REQCERT never" in client configuration
-2. An empty LDAP structure is required for the tests to be PASSed
+2. An empty LDAP structure is required for the tests to be PASSed (except for base and admin)
+
+If you use a debian based distribution, prefer the use of dpkg-reconfigure.
+Otherwise you may alter these configuration files:
(/etc/openldap/)slapd.conf:
-----------------------------------------------------------
@@ -40,6 +43,7 @@ Tests configuration:
The following environment variables may be defined:
LDAP_TEST_HOST (default: localhost) Host to connect to
LDAP_TEST_PORT (default: 389) Port to connect to
+LDAP_TEST_BASE (default: dc=my-domain,dc=com) Base to use. May be the ldap root or a subtree. (ldap_search_variation6 will fail if a subtree is used)
LDAP_TEST_USER (default: cn=Manager,dc=my-domain,dc=com) DN used for binding
LDAP_TEST_SASL_USER (default: Manager) SASL user used for SASL binding
LDAP_TEST_PASSWD (default: secret) Password used for plain and SASL binding
@@ -50,4 +54,4 @@ Credits:
===========================================================
Davide Mendolia <idaf1er@gmail.com>
Patrick Allaert <patrick.allaert@gmail.com>
-
+Côme Bernigaud <mcmic@php.net>
diff --git a/ext/ldap/tests/connect.inc b/ext/ldap/tests/connect.inc
index 002274cf55..f7379ac954 100644
--- a/ext/ldap/tests/connect.inc
+++ b/ext/ldap/tests/connect.inc
@@ -22,6 +22,20 @@ function ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version)
}
function insert_dummy_data($link, $base) {
+ // Create root if not there
+ $testBase = ldap_read($link, $base, '(objectClass=*)', array('objectClass'));
+ if (ldap_count_entries($link, $testBase) < 1) {
+ ldap_add(
+ $link, "$base", array(
+ "objectClass" => array(
+ "top",
+ "organization",
+ "dcObject"
+ ),
+ "o" => "php ldap tests"
+ )
+ );
+ }
ldap_add($link, "o=test,$base", array(
"objectClass" => array(
"top",
diff --git a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt
index 862895e81d..cd189ebf09 100644
--- a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt
+++ b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt
@@ -32,7 +32,7 @@ remove_dummy_data($link, $base);
?>
--EXPECTF--
bool(true)
-resource(6) of type (ldap result)
+resource(%d) of type (ldap result)
array(2) {
["count"]=>
int(1)
diff --git a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt
index 4544a0b85a..7b1715c21b 100644
--- a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt
+++ b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt
@@ -32,7 +32,7 @@ remove_dummy_data($link, $base);
?>
--EXPECTF--
bool(true)
-resource(6) of type (ldap result)
+resource(%d) of type (ldap result)
array(3) {
["count"]=>
int(2)
diff --git a/ext/ldap/tests/ldap_get_option_variation.phpt b/ext/ldap/tests/ldap_get_option_variation.phpt
index da71d89036..f83c505571 100644
--- a/ext/ldap/tests/ldap_get_option_variation.phpt
+++ b/ext/ldap/tests/ldap_get_option_variation.phpt
@@ -21,6 +21,7 @@ ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_NEVER);
ldap_set_option($link, LDAP_OPT_SIZELIMIT, 123);
ldap_set_option($link, LDAP_OPT_TIMELIMIT, 33);
ldap_set_option($link, LDAP_OPT_NETWORK_TIMEOUT, 44);
+ldap_set_option($link, LDAP_OPT_TIMEOUT, 55);
ldap_set_option($link, LDAP_OPT_REFERRALS, false);
ldap_set_option($link, LDAP_OPT_SERVER_CONTROLS, $controls);
ldap_set_option($link, LDAP_OPT_CLIENT_CONTROLS, $controls);
@@ -35,6 +36,8 @@ var_dump(
$option,
ldap_get_option($link, LDAP_OPT_NETWORK_TIMEOUT, $option),
$option,
+ ldap_get_option($link, LDAP_OPT_TIMEOUT, $option),
+ $option,
ldap_get_option($link, LDAP_OPT_REFERRALS, $option),
$option,
ldap_get_option($link, LDAP_OPT_RESTART, $option),
@@ -56,6 +59,8 @@ int(33)
bool(true)
int(44)
bool(true)
+int(55)
+bool(true)
int(0)
bool(true)
int(0)
diff --git a/ext/ldap/tests/ldap_option_reqcert_basic.phpt b/ext/ldap/tests/ldap_option_reqcert_basic.phpt
new file mode 100644
index 0000000000..4a589d773d
--- /dev/null
+++ b/ext/ldap/tests/ldap_option_reqcert_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+ldap_option_reqcert_basic() - Basic test to check if PHP can connect to a LDAP server with an invalid certificate with certificate checking disabled
+--CREDITS--
+Edwin Hoksberg <edwin@edwinhoksberg.nl>
+--SKIPIF--
+<?php
+ require_once dirname(__FILE__) .'/skipif.inc';
+ require_once dirname(__FILE__) .'/skipifbindfailure.inc';
+?>
+--FILE--
+<?php
+require "connect.inc";
+
+ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
+
+$link = ldap_connect($host, $port);
+ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
+
+var_dump(@ldap_bind($link, $user, $passwd));
+?>
+===DONE===
+--EXPECT--
+bool(true)
+===DONE===
diff --git a/ext/ldap/tests/ldap_option_reqcert_error.phpt b/ext/ldap/tests/ldap_option_reqcert_error.phpt
new file mode 100644
index 0000000000..899664ccc9
--- /dev/null
+++ b/ext/ldap/tests/ldap_option_reqcert_error.phpt
@@ -0,0 +1,24 @@
+--TEST--
+ldap_option_reqcert_error() - A test to check if ldap cant connect to a LDAP server with a invalid certificate with certificate checking enabled
+--CREDITS--
+Edwin Hoksberg <edwin@edwinhoksberg.nl>
+--SKIPIF--
+<?php
+ require_once dirname(__FILE__) .'/skipif.inc';
+ require_once dirname(__FILE__) .'/skipifbindfailure.inc';
+?>
+--FILE--
+<?php
+require "connect.inc";
+
+ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_HARD);
+
+$link = ldap_connect($host, $port);
+ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, $protocol_version);
+
+var_dump(@ldap_bind($link, $user, $passwd));
+?>
+===DONE===
+--EXPECT--
+bool(true)
+===DONE===
diff --git a/ext/ldap/tests/ldap_search_overrides.phpt b/ext/ldap/tests/ldap_search_overrides.phpt
new file mode 100644
index 0000000000..72d8e2498e
--- /dev/null
+++ b/ext/ldap/tests/ldap_search_overrides.phpt
@@ -0,0 +1,215 @@
+--TEST--
+ldap_search() test - test that overrides aren't permanent
+--CREDITS--
+Tyson Andre <tandre@ifwe.co>
+# Based on ldap_search_basic.phpt
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifbindfailure.inc');
+?>
+--FILE--
+<?php
+include "connect.inc";
+
+$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
+ldap_set_option($link, LDAP_OPT_DEREF, LDAP_DEREF_SEARCHING);
+ldap_set_option($link, LDAP_OPT_SIZELIMIT, 123);
+ldap_set_option($link, LDAP_OPT_TIMELIMIT, 33);
+ldap_set_option($link, LDAP_OPT_NETWORK_TIMEOUT, 44);
+
+insert_dummy_data($link, $base);
+var_dump(
+ $result = ldap_search($link, "$base", "(objectClass=person)", array(), null, 111, 22, LDAP_DEREF_NEVER),
+ ldap_get_entries($link, $result)
+);
+var_dump(
+ ldap_get_option($link, LDAP_OPT_DEREF, $option),
+ $option,
+ ldap_get_option($link, LDAP_OPT_SIZELIMIT, $option),
+ $option,
+ ldap_get_option($link, LDAP_OPT_TIMELIMIT, $option),
+ $option,
+ ldap_get_option($link, LDAP_OPT_NETWORK_TIMEOUT, $option),
+ $option
+);
+?>
+===DONE===
+--CLEAN--
+<?php
+include "connect.inc";
+
+$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
+remove_dummy_data($link, $base);
+?>
+--EXPECTF--
+resource(%d) of type (ldap result)
+array(4) {
+ ["count"]=>
+ int(3)
+ [0]=>
+ array(14) {
+ ["objectclass"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(6) "person"
+ }
+ [0]=>
+ string(11) "objectclass"
+ ["cn"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(5) "userA"
+ }
+ [1]=>
+ string(2) "cn"
+ ["sn"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(7) "testSN1"
+ }
+ [2]=>
+ string(2) "sn"
+ ["userpassword"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(4) "oops"
+ }
+ [3]=>
+ string(12) "userpassword"
+ ["telephonenumber"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(14) "xx-xx-xx-xx-xx"
+ }
+ [4]=>
+ string(15) "telephonenumber"
+ ["description"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(6) "user A"
+ }
+ [5]=>
+ string(11) "description"
+ ["count"]=>
+ int(6)
+ ["dn"]=>
+ string(%d) "cn=userA,%s"
+ }
+ [1]=>
+ array(12) {
+ ["objectclass"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(6) "person"
+ }
+ [0]=>
+ string(11) "objectclass"
+ ["cn"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(5) "userB"
+ }
+ [1]=>
+ string(2) "cn"
+ ["sn"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(7) "testSN2"
+ }
+ [2]=>
+ string(2) "sn"
+ ["userpassword"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(15) "oopsIDitItAgain"
+ }
+ [3]=>
+ string(12) "userpassword"
+ ["description"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(6) "user B"
+ }
+ [4]=>
+ string(11) "description"
+ ["count"]=>
+ int(5)
+ ["dn"]=>
+ string(%d) "cn=userB,%s"
+ }
+ [2]=>
+ array(10) {
+ ["objectclass"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(6) "person"
+ }
+ [0]=>
+ string(11) "objectclass"
+ ["cn"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(5) "userC"
+ }
+ [1]=>
+ string(2) "cn"
+ ["sn"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(7) "testSN3"
+ }
+ [2]=>
+ string(2) "sn"
+ ["userpassword"]=>
+ array(2) {
+ ["count"]=>
+ int(1)
+ [0]=>
+ string(17) "0r1g1na1 passw0rd"
+ }
+ [3]=>
+ string(12) "userpassword"
+ ["count"]=>
+ int(4)
+ ["dn"]=>
+ string(%d) "cn=userC,cn=userB,%s"
+ }
+}
+bool(true)
+int(1)
+bool(true)
+int(123)
+bool(true)
+int(33)
+bool(true)
+int(44)
+===DONE===
diff --git a/ext/ldap/tests/ldap_set_option_reqcert_basic.phpt b/ext/ldap/tests/ldap_set_option_reqcert_basic.phpt
new file mode 100644
index 0000000000..e31bf350ad
--- /dev/null
+++ b/ext/ldap/tests/ldap_set_option_reqcert_basic.phpt
@@ -0,0 +1,36 @@
+--TEST--
+ldap_option_reqcert_basic() - Error test for TLS require cert ldap option
+--CREDITS--
+Edwin Hoksberg <edwin@edwinhoksberg.nl>
+--FILE--
+<?php
+require "connect.inc";
+$link = ldap_connect($host, $port);
+
+foreach([
+ LDAP_OPT_X_TLS_NEVER,
+ LDAP_OPT_X_TLS_HARD,
+ LDAP_OPT_X_TLS_DEMAND,
+ LDAP_OPT_X_TLS_ALLOW,
+ LDAP_OPT_X_TLS_TRY,
+] as $option) {
+ $result = ldap_set_option($link, LDAP_OPT_X_TLS_REQUIRE_CERT, $option);
+ var_dump($result);
+
+ ldap_get_option($link, LDAP_OPT_X_TLS_REQUIRE_CERT, $optionval);
+ var_dump($optionval);
+}
+?>
+===DONE===
+--EXPECT--
+bool(true)
+int(0)
+bool(true)
+int(1)
+bool(true)
+int(2)
+bool(true)
+int(3)
+bool(true)
+int(4)
+===DONE===
diff --git a/ext/ldap/tests/ldap_set_option_reqcert_error.phpt b/ext/ldap/tests/ldap_set_option_reqcert_error.phpt
new file mode 100644
index 0000000000..1a7796b760
--- /dev/null
+++ b/ext/ldap/tests/ldap_set_option_reqcert_error.phpt
@@ -0,0 +1,17 @@
+--TEST--
+ldap_option_reqcert_basic() - Error test for TLS require cert ldap option
+--CREDITS--
+Edwin Hoksberg <edwin@edwinhoksberg.nl>
+--SKIPIF--
+<?php require_once dirname(__FILE__) .'/skipif.inc'; ?>
+--FILE--
+<?php
+require "connect.inc";
+$link = ldap_connect($host, $port);
+$result = ldap_set_option($link, LDAP_OPT_X_TLS_REQUIRE_CERT, 9001);
+var_dump($result);
+?>
+===DONE===
+--EXPECT--
+bool(false)
+===DONE===
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index edb1d3119a..1969a97959 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -80,7 +80,7 @@ static zend_class_entry *libxmlerror_class_entry;
/* {{{ dynamically loadable module stuff */
#ifdef COMPILE_DL_LIBXML
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(libxml)
#endif /* COMPILE_DL_LIBXML */
@@ -383,6 +383,9 @@ static int php_libxml_streams_IO_read(void *context, char *buffer, int len)
static int php_libxml_streams_IO_write(void *context, const char *buffer, int len)
{
+ if (CG(unclean_shutdown)) {
+ return -1;
+ }
return php_stream_write((php_stream*)context, buffer, len);
}
@@ -664,7 +667,6 @@ is_string:
}
} else if (Z_TYPE(retval) != IS_NULL) {
/* retval not string nor resource nor null; convert to string */
- SEPARATE_ZVAL(&retval);
convert_to_string(&retval);
goto is_string;
} /* else is null; don't try anything */
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h
index 5a68a57494..11fca74938 100644
--- a/ext/libxml/php_libxml.h
+++ b/ext/libxml/php_libxml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -86,7 +86,7 @@ typedef struct _php_libxml_node_object {
static inline php_libxml_node_object *php_libxml_node_fetch_object(zend_object *obj) {
- return (php_libxml_node_object *)((char*)(obj) - XtOffsetOf(php_libxml_node_object, std));
+ return (php_libxml_node_object *)((char*)(obj) - obj->handlers->offset);
}
#define Z_LIBXML_NODE_P(zv) php_libxml_node_fetch_object(Z_OBJ_P((zv)))
@@ -115,13 +115,10 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable);
PHP_LIBXML_API void php_libxml_initialize(void);
PHP_LIBXML_API void php_libxml_shutdown(void);
-#ifdef ZTS
-#define LIBXML(v) ZEND_TSRMG(libxml_globals_id, zend_libxml_globals *, v)
-#ifdef COMPILE_DL_LIBXML
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define LIBXML(v) (libxml_globals.v)
+#define LIBXML(v) ZEND_MODULE_GLOBALS_ACCESSOR(libxml, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_LIBXML)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#else /* HAVE_LIBXML */
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c
index 77736a051b..75d249fbe8 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c
@@ -278,7 +278,7 @@ retry:
w = cp932ext1_ucs_table[s - cp932ext1_ucs_table_min];
} else if (s >= cp932ext2_ucs_table_min && s < cp932ext2_ucs_table_max) {
w = cp932ext2_ucs_table[s - cp932ext2_ucs_table_min];
- } else if (s >= cp932ext3_ucs_table_min && s < cp932ext2_ucs_table_max) {
+ } else if (s >= cp932ext3_ucs_table_min && s < cp932ext3_ucs_table_max) {
w = cp932ext3_ucs_table[s - cp932ext3_ucs_table_min];
} else if (s >= 94 * 94 && s < 114 * 94) {
/* user-defined => PUA (Microsoft extended) */
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c
index a5260807d4..e0d5543882 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c
@@ -48,7 +48,7 @@ const mbfl_encoding mbfl_encoding_2022jp_kddi = {
mbfl_no_encoding_2022jp_kddi,
"ISO-2022-JP-MOBILE#KDDI",
"ISO-2022-JP",
- mbfl_encoding_2022jp_kddi_aliases,
+ &mbfl_encoding_2022jp_kddi_aliases,
NULL,
MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE | MBFL_ENCTYPE_GL_UNSAFE
};
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
index d02e5e6421..4f146cebea 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
@@ -672,6 +672,8 @@ retry:
CK(mbfl_filt_conv_illegal_output(c, filter));
}
}
+
+ return c;
}
int
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c
index a9c141bbfe..e81e0860d2 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_utf8.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8.c
@@ -101,6 +101,7 @@ int mbfl_filt_put_invalid_char(int c, mbfl_convert_filter *filter)
filter->status = 0;
filter->cache = 0;
CK((*filter->output_function)(w, filter->data));
+ return 0;
}
@@ -109,7 +110,7 @@ int mbfl_filt_put_invalid_char(int c, mbfl_convert_filter *filter)
*/
int mbfl_filt_conv_utf8_wchar(int c, mbfl_convert_filter *filter)
{
- int s, c1, w = 0, flag = 0;
+ int s, c1;
retry:
switch (filter->status & 0xff) {
@@ -126,7 +127,7 @@ retry:
filter->status = 0x30;
filter->cache = c & 0x7;
} else {
- mbfl_filt_put_invalid_char(c, filter);
+ CK(mbfl_filt_put_invalid_char(c, filter));
}
break;
case 0x10: /* 2byte code 2nd char: 0x80-0xbf */
@@ -138,7 +139,7 @@ retry:
filter->cache = 0;
CK((*filter->output_function)(s, filter->data));
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -153,7 +154,7 @@ retry:
filter->cache = s;
filter->status++;
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -168,7 +169,7 @@ retry:
filter->cache = s;
filter->status++;
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -177,7 +178,7 @@ retry:
filter->cache = (filter->cache<<6) | (c & 0x3f);
filter->status++;
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -200,7 +201,7 @@ int mbfl_filt_conv_utf8_wchar_flush(mbfl_convert_filter *filter)
filter->cache = 0;
if (status != 0) {
- mbfl_filt_put_invalid_char(cache, filter);
+ CK(mbfl_filt_put_invalid_char(cache, filter));
}
if (filter->flush_function != NULL) {
diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c
index c449d3132a..41e02bf314 100644
--- a/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c
+++ b/ext/mbstring/libmbfl/filters/mbfilter_utf8_mobile.c
@@ -183,14 +183,14 @@ const struct mbfl_convert_vtbl vtbl_wchar_utf8_sb = {
};
#define CK(statement) do { if ((statement) < 0) return (-1); } while (0)
+int mbfl_filt_put_invalid_char(int c, mbfl_convert_filter *filter);
/*
* UTF-8 => wchar
*/
int mbfl_filt_conv_utf8_mobile_wchar(int c, mbfl_convert_filter *filter)
{
- int s, w = 0, flag = 0;
- int s1 = 0, c1 = 0, snd = 0;
+ int s, s1 = 0, c1 = 0, snd = 0;
retry:
switch (filter->status & 0xff) {
@@ -207,7 +207,7 @@ retry:
filter->status = 0x30;
filter->cache = c & 0x7;
} else {
- mbfl_filt_put_invalid_char(c, filter);
+ CK(mbfl_filt_put_invalid_char(c, filter));
}
break;
case 0x10: /* 2byte code 2nd char: 0x80-0xbf */
@@ -237,7 +237,7 @@ retry:
}
CK((*filter->output_function)(s, filter->data));
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -252,7 +252,7 @@ retry:
filter->cache = s;
filter->status++;
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -267,7 +267,7 @@ retry:
filter->cache = s;
filter->status++;
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
@@ -276,7 +276,7 @@ retry:
filter->cache = (filter->cache<<6) | (c & 0x3f);
filter->status++;
} else {
- mbfl_filt_put_invalid_char(filter->cache, filter);
+ CK(mbfl_filt_put_invalid_char(filter->cache, filter));
goto retry;
}
break;
diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c
index 27602d0227..4986472b9b 100644
--- a/ext/mbstring/libmbfl/mbfl/mbfilter.c
+++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c
@@ -1501,7 +1501,7 @@ mbfl_strcut(
if (encoding->flag & (MBFL_ENCTYPE_WCS2BE | MBFL_ENCTYPE_WCS2LE)) {
from &= -2;
- if (from + length >= string->len) {
+ if (length >= string->len - from) {
length = string->len - from;
}
@@ -1510,14 +1510,14 @@ mbfl_strcut(
} else if (encoding->flag & (MBFL_ENCTYPE_WCS4BE | MBFL_ENCTYPE_WCS4LE)) {
from &= -4;
- if (from + length >= string->len) {
+ if (length >= string->len - from) {
length = string->len - from;
}
start = string->val + from;
end = start + (length & -4);
} else if ((encoding->flag & MBFL_ENCTYPE_SBCS)) {
- if (from + length >= string->len) {
+ if (length >= string->len - from) {
length = string->len - from;
}
@@ -1539,7 +1539,7 @@ mbfl_strcut(
start = p;
/* search end position */
- if ((start - string->val) + length >= (int)string->len) {
+ if (length >= (int)string->len - (start - string->val)) {
end = string->val + string->len;
} else {
for (q = p + length; p < q; p += (m = mbtab[*p]));
diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c
index db6b5c47cd..aea4baf6a3 100644
--- a/ext/mbstring/mb_gpc.c
+++ b/ext/mbstring/mb_gpc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -377,8 +377,10 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler)
php_stream_rewind(SG(request_info).request_body);
post_data_str = php_stream_copy_to_mem(SG(request_info).request_body, PHP_STREAM_COPY_ALL, 0);
- detected = _php_mb_encoding_handler_ex(&info, arg, ZSTR_VAL(post_data_str));
- zend_string_release(post_data_str);
+ detected = _php_mb_encoding_handler_ex(&info, arg, post_data_str ? ZSTR_VAL(post_data_str) : NULL);
+ if (post_data_str) {
+ zend_string_release(post_data_str);
+ }
MBSTRG(http_input_identify) = detected;
if (detected) {
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index ea753b9406..423f357eae 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -591,7 +591,7 @@ static sapi_post_entry php_post_entries[] = {
#ifdef COMPILE_DL_MBSTRING
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(mbstring)
#endif
@@ -2097,8 +2097,13 @@ PHP_FUNCTION(mb_parse_str)
detected = _php_mb_encoding_handler_ex(&info, track_vars_array, encstr);
} else {
zval tmp;
- zend_array *symbol_table = zend_rebuild_symbol_table();
+ zend_array *symbol_table;
+ if (zend_forbid_dynamic_call("mb_parse_str() with a single argument") == FAILURE) {
+ efree(encstr);
+ return;
+ }
+ symbol_table = zend_rebuild_symbol_table();
ZVAL_ARR(&tmp, symbol_table);
detected = _php_mb_encoding_handler_ex(&info, &tmp, encstr);
}
@@ -2222,14 +2227,21 @@ PHP_FUNCTION(mb_strlen)
int n;
mbfl_string string;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, string_len;
mbfl_string_init(&string);
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", (char **)&string.val, &string.len, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", (char **)&string.val, &string_len, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(string_len)) {
+ php_error_docref(NULL, E_WARNING, "String overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ string.len = (uint32_t)string_len;
+
string.no_language = MBSTRG(language);
if (enc_name == NULL) {
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
@@ -2255,10 +2267,10 @@ PHP_FUNCTION(mb_strlen)
PHP_FUNCTION(mb_strpos)
{
int n, reverse = 0;
- zend_long offset;
+ zend_long offset = 0, slen;
mbfl_string haystack, needle;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, haystack_len, needle_len;
mbfl_string_init(&haystack);
mbfl_string_init(&needle);
@@ -2266,12 +2278,22 @@ PHP_FUNCTION(mb_strpos)
haystack.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
needle.no_language = MBSTRG(language);
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- offset = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &offset, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (enc_name != NULL) {
haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(enc_name);
if (haystack.no_encoding == mbfl_no_encoding_invalid) {
@@ -2280,7 +2302,11 @@ PHP_FUNCTION(mb_strpos)
}
}
- if (offset < 0 || offset > mbfl_strlen(&haystack)) {
+ slen = mbfl_strlen(&haystack);
+ if (offset < 0) {
+ offset += slen;
+ }
+ if (offset < 0 || offset > slen) {
php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
@@ -2321,7 +2347,7 @@ PHP_FUNCTION(mb_strrpos)
int n;
mbfl_string haystack, needle;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, haystack_len, needle_len;
zval *zoffset = NULL;
long offset = 0, str_flg;
char *enc_name2 = NULL;
@@ -2334,10 +2360,21 @@ PHP_FUNCTION(mb_strrpos)
needle.no_language = MBSTRG(language);
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|zs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &zoffset, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|zs", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &zoffset, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (zoffset) {
if (Z_TYPE_P(zoffset) == IS_STRING) {
enc_name2 = Z_STRVAL_P(zoffset);
@@ -2416,17 +2453,27 @@ PHP_FUNCTION(mb_strrpos)
Finds position of first occurrence of a string within another, case insensitive */
PHP_FUNCTION(mb_stripos)
{
- int n;
- zend_long offset;
+ int n = -1;
+ zend_long offset = 0;
mbfl_string haystack, needle;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
- size_t from_encoding_len;
- n = -1;
- offset = 0;
+ size_t from_encoding_len, haystack_len, needle_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
+
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (needle.len == 0) {
php_error_docref(NULL, E_WARNING, "Empty delimiter");
RETURN_FALSE;
@@ -2445,18 +2492,27 @@ PHP_FUNCTION(mb_stripos)
Finds position of last occurrence of a string within another, case insensitive */
PHP_FUNCTION(mb_strripos)
{
- int n;
- zend_long offset;
+ int n = -1;
+ zend_long offset = 0;
mbfl_string haystack, needle;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
- size_t from_encoding_len;
- n = -1;
- offset = 0;
+ size_t from_encoding_len, haystack_len, needle_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ls", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
n = php_mb_stripos(1, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, offset, from_encoding);
if (n >= 0) {
@@ -2474,7 +2530,7 @@ PHP_FUNCTION(mb_strstr)
int n, len, mblen;
mbfl_string haystack, needle, result, *ret = NULL;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, haystack_len, needle_len;
zend_bool part = 0;
mbfl_string_init(&haystack);
@@ -2484,10 +2540,21 @@ PHP_FUNCTION(mb_strstr)
needle.no_language = MBSTRG(language);
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &part, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &part, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (enc_name != NULL) {
haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(enc_name);
if (haystack.no_encoding == mbfl_no_encoding_invalid) {
@@ -2536,7 +2603,7 @@ PHP_FUNCTION(mb_strrchr)
int n, len, mblen;
mbfl_string haystack, needle, result, *ret = NULL;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, haystack_len, needle_len;
zend_bool part = 0;
mbfl_string_init(&haystack);
@@ -2546,10 +2613,21 @@ PHP_FUNCTION(mb_strrchr)
needle.no_language = MBSTRG(language);
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &part, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (enc_name != NULL) {
haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(enc_name);
if (haystack.no_encoding == mbfl_no_encoding_invalid) {
@@ -2598,7 +2676,7 @@ PHP_FUNCTION(mb_strrchr)
PHP_FUNCTION(mb_stristr)
{
zend_bool part = 0;
- size_t from_encoding_len, len, mblen;
+ size_t from_encoding_len, len, mblen, haystack_len, needle_len;
int n;
mbfl_string haystack, needle, result, *ret = NULL;
const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name;
@@ -2610,10 +2688,21 @@ PHP_FUNCTION(mb_stristr)
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding, &from_encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &part, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (!needle.len) {
php_error_docref(NULL, E_WARNING, "Empty delimiter");
RETURN_FALSE;
@@ -2662,7 +2751,7 @@ PHP_FUNCTION(mb_strrichr)
{
zend_bool part = 0;
int n, len, mblen;
- size_t from_encoding_len;
+ size_t from_encoding_len, haystack_len, needle_len;
mbfl_string haystack, needle, result, *ret = NULL;
const char *from_encoding = MBSTRG(current_internal_encoding)->name;
mbfl_string_init(&haystack);
@@ -2673,10 +2762,21 @@ PHP_FUNCTION(mb_strrichr)
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding, &from_encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|bs", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &part, &from_encoding, &from_encoding_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(from_encoding);
if (haystack.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", from_encoding);
@@ -2721,7 +2821,7 @@ PHP_FUNCTION(mb_substr_count)
int n;
mbfl_string haystack, needle;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, haystack_len, needle_len;
mbfl_string_init(&haystack);
mbfl_string_init(&needle);
@@ -2730,10 +2830,21 @@ PHP_FUNCTION(mb_substr_count)
needle.no_language = MBSTRG(language);
needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|s", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|s", (char **)&haystack.val, &haystack_len, (char **)&needle.val, &needle_len, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Haystack length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ } else if (ZEND_SIZE_T_UINT_OVFL(needle_len)) {
+ php_error_docref(NULL, E_WARNING, "Needle length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ haystack.len = (uint32_t)haystack_len;
+ needle.len = (uint32_t)needle_len;
+
if (enc_name != NULL) {
haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(enc_name);
if (haystack.no_encoding == mbfl_no_encoding_invalid) {
@@ -2760,15 +2871,14 @@ PHP_FUNCTION(mb_substr_count)
Returns part of a string */
PHP_FUNCTION(mb_substr)
{
- size_t argc = ZEND_NUM_ARGS();
- char *str, *encoding;
+ char *str, *encoding = NULL;
zend_long from, len;
int mblen;
size_t str_len, encoding_len;
- zval *z_len = NULL;
+ zend_bool len_is_null = 1;
mbfl_string string, result, *ret;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!s", &str, &str_len, &from, &len, &len_is_null, &encoding, &encoding_len) == FAILURE) {
return;
}
@@ -2776,7 +2886,7 @@ PHP_FUNCTION(mb_substr)
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (argc == 4) {
+ if (encoding) {
string.no_encoding = mbfl_name2no_encoding(encoding);
if (string.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -2787,11 +2897,8 @@ PHP_FUNCTION(mb_substr)
string.val = (unsigned char *)str;
string.len = str_len;
- if (argc < 3 || Z_TYPE_P(z_len) == IS_NULL) {
+ if (len_is_null) {
len = str_len;
- } else {
- convert_to_long_ex(z_len);
- len = Z_LVAL_P(z_len);
}
/* measures length */
@@ -2840,22 +2947,28 @@ PHP_FUNCTION(mb_substr)
Returns part of a string */
PHP_FUNCTION(mb_strcut)
{
- size_t argc = ZEND_NUM_ARGS();
- char *encoding;
+ char *encoding = NULL;
zend_long from, len;
- size_t encoding_len;
- zval *z_len = NULL;
+ size_t encoding_len, string_len;
+ zend_bool len_is_null = 1;
mbfl_string string, result, *ret;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!s", (char **)&string.val, &string_len, &from, &len, &len_is_null, &encoding, &encoding_len) == FAILURE) {
return;
}
- if (argc == 4) {
+ if (ZEND_SIZE_T_UINT_OVFL(string_len)) {
+ php_error_docref(NULL, E_WARNING, "String length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ string.len = (uint32_t)string_len;
+
+ if (encoding) {
string.no_encoding = mbfl_name2no_encoding(encoding);
if (string.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -2863,11 +2976,8 @@ PHP_FUNCTION(mb_strcut)
}
}
- if (argc < 3 || Z_TYPE_P(z_len) == IS_NULL) {
+ if (len_is_null) {
len = string.len;
- } else {
- convert_to_long_ex(z_len);
- len = Z_LVAL_P(z_len);
}
/* if "from" position is negative, count start position from the end
@@ -2912,17 +3022,24 @@ PHP_FUNCTION(mb_strwidth)
int n;
mbfl_string string;
char *enc_name = NULL;
- size_t enc_name_len;
+ size_t enc_name_len, string_len;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", (char **)&string.val, &string.len, &enc_name, &enc_name_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", (char **)&string.val, &string_len, &enc_name, &enc_name_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(string_len)) {
+ php_error_docref(NULL, E_WARNING, "String length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ string.len = (uint32_t)string_len;
+
if (enc_name != NULL) {
string.no_encoding = mbfl_name2no_encoding(enc_name);
if (string.no_encoding == mbfl_no_encoding_invalid) {
@@ -2944,8 +3061,8 @@ PHP_FUNCTION(mb_strwidth)
Trim the string in terminal width */
PHP_FUNCTION(mb_strimwidth)
{
- char *str, *trimmarker, *encoding;
- zend_long from, width;
+ char *str, *trimmarker = NULL, *encoding = NULL;
+ zend_long from, width, swidth;
size_t str_len, trimmarker_len, encoding_len;
mbfl_string string, result, marker, *ret;
@@ -2962,7 +3079,7 @@ PHP_FUNCTION(mb_strimwidth)
marker.val = NULL;
marker.len = 0;
- if (ZEND_NUM_ARGS() == 5) {
+ if (encoding) {
string.no_encoding = marker.no_encoding = mbfl_name2no_encoding(encoding);
if (string.no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -2973,17 +3090,29 @@ PHP_FUNCTION(mb_strimwidth)
string.val = (unsigned char *)str;
string.len = str_len;
+ if ((from < 0) || (width < 0)) {
+ swidth = mbfl_strwidth(&string);
+ }
+
+ if (from < 0) {
+ from += swidth;
+ }
+
if (from < 0 || (size_t)from > str_len) {
php_error_docref(NULL, E_WARNING, "Start position is out of range");
RETURN_FALSE;
}
if (width < 0) {
- php_error_docref(NULL, E_WARNING, "Width is negative value");
+ width = swidth + width - from;
+ }
+
+ if (width < 0) {
+ php_error_docref(NULL, E_WARNING, "Width is out of range");
RETURN_FALSE;
}
- if (ZEND_NUM_ARGS() >= 4) {
+ if (trimmarker) {
marker.val = (unsigned char *)trimmarker;
marker.len = trimmarker_len;
}
@@ -3092,7 +3221,7 @@ PHP_FUNCTION(mb_convert_encoding)
{
char *arg_str, *arg_new;
size_t str_len, new_len;
- zval *arg_old;
+ zval *arg_old = NULL;
size_t size, l, n;
char *_from_encodings = NULL, *ret, *s_free = NULL;
@@ -3103,7 +3232,7 @@ PHP_FUNCTION(mb_convert_encoding)
return;
}
- if (ZEND_NUM_ARGS() == 3) {
+ if (arg_old) {
switch (Z_TYPE_P(arg_old)) {
case IS_ARRAY:
target_hash = Z_ARRVAL_P(arg_old);
@@ -3241,21 +3370,21 @@ PHP_FUNCTION(mb_detect_encoding)
char *str;
size_t str_len;
zend_bool strict=0;
- zval *encoding_list;
+ zval *encoding_list = NULL;
mbfl_string string;
const mbfl_encoding *ret;
const mbfl_encoding **elist, **list;
size_t size;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|zb", &str, &str_len, &encoding_list, &strict) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z!b", &str, &str_len, &encoding_list, &strict) == FAILURE) {
return;
}
/* make encoding list */
list = NULL;
size = 0;
- if (ZEND_NUM_ARGS() >= 2 && !Z_ISNULL_P(encoding_list)) {
+ if (encoding_list) {
switch (Z_TYPE_P(encoding_list)) {
case IS_ARRAY:
if (FAILURE == php_mb_parse_encoding_array(encoding_list, &list, &size, 0)) {
@@ -3319,6 +3448,10 @@ PHP_FUNCTION(mb_list_encodings)
const mbfl_encoding *encoding;
int i;
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
array_init(return_value);
i = 0;
encodings = mbfl_get_supported_encodings();
@@ -3367,17 +3500,24 @@ PHP_FUNCTION(mb_encode_mimeheader)
char *trans_enc_name = NULL;
size_t trans_enc_name_len;
char *linefeed = "\r\n";
- size_t linefeed_len;
+ size_t linefeed_len, string_len;
zend_long indent = 0;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sssl", (char **)&string.val, &string_len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(string_len)) {
+ php_error_docref(NULL, E_WARNING, "String length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ string.len = (uint32_t)string_len;
+
charset = mbfl_no_encoding_pass;
transenc = mbfl_no_encoding_base64;
@@ -3420,15 +3560,23 @@ PHP_FUNCTION(mb_encode_mimeheader)
PHP_FUNCTION(mb_decode_mimeheader)
{
mbfl_string string, result, *ret;
+ size_t string_len;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", (char **)&string.val, &string.len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", (char **)&string.val, &string_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(string_len)) {
+ php_error_docref(NULL, E_WARNING, "String length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ string.len = (uint32_t)string_len;
+
mbfl_string_init(&result);
ret = mbfl_mime_header_decode(&string, &result, MBSTRG(current_internal_encoding)->no_encoding);
if (ret != NULL) {
@@ -3450,16 +3598,23 @@ PHP_FUNCTION(mb_convert_kana)
char *optstr = NULL;
size_t optstr_len;
char *encname = NULL;
- size_t encname_len;
+ size_t encname_len, string_len;
mbfl_string_init(&string);
string.no_language = MBSTRG(language);
string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ss", (char **)&string.val, &string.len, &optstr, &optstr_len, &encname, &encname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ss", (char **)&string.val, &string_len, &optstr, &optstr_len, &encname, &encname_len) == FAILURE) {
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(string_len)) {
+ php_error_docref(NULL, E_WARNING, "String length overflows the max allowed length of %u", UINT_MAX);
+ return;
+ }
+
+ string.len = (uint32_t)string_len;
+
/* option */
if (optstr != NULL) {
char *p = optstr;
@@ -3780,17 +3935,16 @@ detect_end:
static void
php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
{
- char *str, *encoding;
+ char *str, *encoding = NULL;
size_t str_len, encoding_len;
zval *zconvmap, *hash_entry;
HashTable *target_hash;
- int argc = ZEND_NUM_ARGS();
int i, *convmap, *mapelm, mapsize=0;
zend_bool is_hex = 0;
mbfl_string string, result, *ret;
enum mbfl_no_encoding no_encoding;
- if (zend_parse_parameters(argc, "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
return;
}
@@ -3801,7 +3955,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
string.len = str_len;
/* encoding */
- if ((argc == 3 || argc == 4) && encoding_len > 0) {
+ if (encoding && encoding_len > 0) {
no_encoding = mbfl_name2no_encoding(encoding);
if (no_encoding == mbfl_no_encoding_invalid) {
php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
@@ -3811,10 +3965,8 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
}
}
- if (argc == 4) {
- if (type == 0 && is_hex) {
- type = 2; /* output in hex format */
- }
+ if (type == 0 && is_hex) {
+ type = 2; /* output in hex format */
}
/* conversion map */
@@ -4125,11 +4277,12 @@ PHP_FUNCTION(mb_send_mail)
_php_mbstr_parse_mail_headers(&ht_headers, headers, headers_len);
}
- if ((s = zend_hash_str_find_ptr(&ht_headers, "CONTENT-TYPE", sizeof("CONTENT-TYPE") - 1))) {
+ if ((s = zend_hash_str_find(&ht_headers, "CONTENT-TYPE", sizeof("CONTENT-TYPE") - 1))) {
char *tmp;
char *param_name;
char *charset = NULL;
+ ZEND_ASSERT(Z_TYPE_P(s) == IS_STRING);
p = strchr(Z_STRVAL_P(s), ';');
if (p != NULL) {
@@ -4160,9 +4313,10 @@ PHP_FUNCTION(mb_send_mail)
suppressed_hdrs.cnt_type = 1;
}
- if ((s = zend_hash_str_find_ptr(&ht_headers, "CONTENT-TRANSFER-ENCODING", sizeof("CONTENT-TRANSFER-ENCODING") - 1))) {
+ if ((s = zend_hash_str_find(&ht_headers, "CONTENT-TRANSFER-ENCODING", sizeof("CONTENT-TRANSFER-ENCODING") - 1))) {
enum mbfl_no_encoding _body_enc;
+ ZEND_ASSERT(Z_TYPE_P(s) == IS_STRING);
_body_enc = mbfl_name2no_encoding(Z_STRVAL_P(s));
switch (_body_enc) {
case mbfl_no_encoding_base64:
@@ -4736,6 +4890,9 @@ MBSTRING_API int php_mb_stripos(int mode, const char *old_haystack, unsigned int
break;
}
} else {
+ if (offset < 0) {
+ offset += (long)haystack_char_len;
+ }
if (offset < 0 || offset > haystack_char_len) {
php_error_docref(NULL, E_WARNING, "Offset not contained in string");
break;
diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h
index 2dffb63705..71d63b13de 100644
--- a/ext/mbstring/mbstring.h
+++ b/ext/mbstring/mbstring.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -202,11 +202,10 @@ struct mb_overload_def {
char *save_func;
};
-#ifdef ZTS
-#define MBSTRG(v) ZEND_TSRMG(mbstring_globals_id, zend_mbstring_globals *, v)
-ZEND_TSRMLS_CACHE_EXTERN();
-#else
-#define MBSTRG(v) (mbstring_globals.v)
+#define MBSTRG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mbstring, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_MBSTRING)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#else /* HAVE_MBSTRING */
diff --git a/ext/mbstring/oniguruma/regint.h b/ext/mbstring/oniguruma/regint.h
index 0fba09bb58..ee831a8137 100644
--- a/ext/mbstring/oniguruma/regint.h
+++ b/ext/mbstring/oniguruma/regint.h
@@ -227,17 +227,21 @@
} while(0)
/* sizeof(OnigCodePoint) */
-#define WORD_ALIGNMENT_SIZE SIZEOF_LONG
+#ifdef SIZEOF_SIZE_T
+# define WORD_ALIGNMENT_SIZE SIZEOF_SIZE_T
+#else
+# define WORD_ALIGNMENT_SIZE SIZEOF_LONG
+#endif
#define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
(pad_size) = WORD_ALIGNMENT_SIZE \
- - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
+ - ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\
if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\
} while (0)
#define ALIGNMENT_RIGHT(addr) do {\
(addr) += (WORD_ALIGNMENT_SIZE - 1);\
- (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
+ (addr) -= ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\
} while (0)
#endif /* PLATFORM_UNALIGNED_WORD_ACCESS */
@@ -688,7 +692,11 @@ typedef struct {
BBuf* mbuf; /* multi-byte info or NULL */
} CClassNode;
+#ifdef _WIN64
+typedef __int64 OnigStackIndex;
+#else
typedef long OnigStackIndex;
+#endif
typedef struct _OnigStackType {
unsigned int type;
@@ -789,7 +797,12 @@ extern int onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, CClassNod
/* strend hash */
typedef void hash_table_type;
+#ifdef _WIN32
+# include <windows.h>
+typedef ULONG_PTR hash_data_type;
+#else
typedef unsigned long hash_data_type;
+#endif
extern hash_table_type* onig_st_init_strend_table_with_size P_((int size));
extern int onig_st_lookup_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type *value));
diff --git a/ext/mbstring/oniguruma/win32/config.h b/ext/mbstring/oniguruma/win32/config.h
index bdbdaf25c1..b2afbe960c 100644
--- a/ext/mbstring/oniguruma/win32/config.h
+++ b/ext/mbstring/oniguruma/win32/config.h
@@ -15,6 +15,11 @@
#define SIZEOF_VOIDP 4
#define SIZEOF_FLOAT 4
#define SIZEOF_DOUBLE 8
+#ifdef _WIN64
+#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_SIZE_T 4
+#endif
#define HAVE_PROTOTYPES 1
#define TOKEN_PASTE(x,y) x##y
#define HAVE_STDARG_PROTOTYPES 1
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 1423a6ffa6..14e8da4548 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -654,8 +654,7 @@ _php_mb_regex_init_options(const char *parg, int narg, OnigOptionType *option, O
Returns the current encoding for regex as a string. */
PHP_FUNCTION(mb_regex_encoding)
{
- size_t argc = ZEND_NUM_ARGS();
- char *encoding;
+ char *encoding = NULL;
size_t encoding_len;
OnigEncoding mbctype;
@@ -663,7 +662,7 @@ PHP_FUNCTION(mb_regex_encoding)
return;
}
- if (argc == 0) {
+ if (!encoding) {
const char *retval = _php_mb_regex_mbctype2name(MBREX(current_mbctype));
if (retval == NULL) {
@@ -671,7 +670,7 @@ PHP_FUNCTION(mb_regex_encoding)
}
RETURN_STRING((char *)retval);
- } else if (argc == 1) {
+ } else {
mbctype = _php_mb_regex_name2mbctype(encoding);
if (mbctype == ONIG_ENCODING_UNDEF) {
@@ -688,7 +687,7 @@ PHP_FUNCTION(mb_regex_encoding)
/* {{{ _php_mb_regex_ereg_exec */
static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
- zval *arg_pattern, *array;
+ zval *arg_pattern, *array = NULL;
char *string;
size_t string_len;
php_mb_regex_t *re;
@@ -697,8 +696,6 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
OnigOptionType options;
char *str;
- array = NULL;
-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs|z/", &arg_pattern, &string, &string_len, &array) == FAILURE) {
RETURN_FALSE;
}
@@ -910,7 +907,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
}
#endif
/* copy the part of the string before the match */
- smart_str_appendl(&out_buf, pos, (size_t)((OnigUChar *)(string + regs->beg[0]) - pos));
+ smart_str_appendl(&out_buf, (char *)pos, (size_t)((OnigUChar *)(string + regs->beg[0]) - pos));
if (!is_callable) {
/* copy replacement and backrefs */
@@ -939,23 +936,28 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
if (eval) {
zval v;
+ zend_string *eval_str;
/* null terminate buffer */
smart_str_0(&eval_buf);
+
+ if (eval_buf.s) {
+ eval_str = eval_buf.s;
+ } else {
+ eval_str = ZSTR_EMPTY_ALLOC();
+ }
+
/* do eval */
- if (zend_eval_stringl(ZSTR_VAL(eval_buf.s), ZSTR_LEN(eval_buf.s), &v, description) == FAILURE) {
+ if (zend_eval_stringl(ZSTR_VAL(eval_str), ZSTR_LEN(eval_str), &v, description) == FAILURE) {
efree(description);
- zend_throw_error(zend_ce_error, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_buf.s));
- onig_region_free(regs, 0);
- smart_str_free(&out_buf);
- smart_str_free(&eval_buf);
- RETURN_FALSE;
+ zend_throw_error(NULL, "Failed evaluating code: %s%s", PHP_EOL, ZSTR_VAL(eval_str));
+ /* zend_error() does not return in this case */
}
/* result of eval */
convert_to_string(&v);
smart_str_appendl(&out_buf, Z_STRVAL(v), Z_STRLEN(v));
/* Clean up */
- ZSTR_LEN(eval_buf.s) = 0;
+ smart_str_free(&eval_buf);
zval_dtor(&v);
} else if (is_callable) {
zval args[1];
@@ -978,9 +980,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
!Z_ISUNDEF(retval)) {
convert_to_string_ex(&retval);
smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval));
- if (eval_buf.s) {
- ZSTR_LEN(eval_buf.s) = 0;
- }
+ smart_str_free(&eval_buf);
zval_ptr_dtor(&retval);
} else {
efree(description);
@@ -996,14 +996,14 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
pos = (OnigUChar *)string + n;
} else {
if (pos < string_lim) {
- smart_str_appendl(&out_buf, pos, 1);
+ smart_str_appendl(&out_buf, (char *)pos, 1);
}
pos++;
}
} else { /* nomatch */
/* stick that last bit of string on our output */
if (string_lim - pos > 0) {
- smart_str_appendl(&out_buf, pos, string_lim - pos);
+ smart_str_appendl(&out_buf, (char *)pos, string_lim - pos);
}
}
onig_region_free(regs, 0);
@@ -1184,26 +1184,25 @@ PHP_FUNCTION(mb_ereg_match)
static void
_php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
- size_t argc = ZEND_NUM_ARGS();
- char *arg_pattern, *arg_options;
+ char *arg_pattern = NULL, *arg_options = NULL;
size_t arg_pattern_len, arg_options_len;
int n, i, err, pos, len, beg, end;
OnigOptionType option;
OnigUChar *str;
OnigSyntaxType *syntax;
- if (zend_parse_parameters(argc, "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
return;
}
option = MBREX(regex_default_options);
- if (argc == 2) {
+ if (arg_options) {
option = 0;
_php_mb_regex_init_options(arg_options, arg_options_len, &option, &syntax, NULL);
}
- if (argc > 0) {
+ if (arg_pattern) {
/* create regex pattern buffer */
if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(current_mbctype), MBREX(regex_default_syntax))) == NULL) {
RETURN_FALSE;
@@ -1408,6 +1407,11 @@ PHP_FUNCTION(mb_ereg_search_setpos)
return;
}
+ /* Accept negative position if length of search string can be determined */
+ if ((position < 0) && (!Z_ISUNDEF(MBREX(search_str))) && (Z_TYPE(MBREX(search_str)) == IS_STRING)) {
+ position += Z_STRLEN(MBREX(search_str));
+ }
+
if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_t)position >= Z_STRLEN(MBREX(search_str)))) {
php_error_docref(NULL, E_WARNING, "Position is out of range");
MBREX(search_pos) = 0;
diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h
index bdff321fe7..a810add0c7 100644
--- a/ext/mbstring/php_mbregex.h
+++ b/ext/mbstring/php_mbregex.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c
index 7453a54d93..09ba877bb9 100644
--- a/ext/mbstring/php_unicode.c
+++ b/ext/mbstring/php_unicode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h
index a7a7f0ccba..4e659a6aa7 100644
--- a/ext/mbstring/php_unicode.h
+++ b/ext/mbstring/php_unicode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mbstring/tests/bug45923.phpt b/ext/mbstring/tests/bug45923.phpt
index 2d184ab019..41ffd70924 100644
--- a/ext/mbstring/tests/bug45923.phpt
+++ b/ext/mbstring/tests/bug45923.phpt
@@ -6,197 +6,241 @@ Bug #45923 (mb_st[r]ripos() offset not handled correctly)
mbstring.internal_encoding=UTF-8
--FILE--
<?php
-var_dump(strpos("abc abc abc", "abc", 0));
-var_dump(strpos("abc abc abc", "abc", 3));
-var_dump(strpos("abc abc abc", "abc", 6));
-var_dump(strpos("abc abc abc", "abc", 9));
-var_dump(strpos("abc abc abc", "abc", 11));
-var_dump(strpos("abc abc abc", "abc", 12));
-var_dump(strpos("abc abc abc", "abc", -1));
-var_dump(strpos("abc abc abc", "abc", -3));
-var_dump(strpos("abc abc abc", "abc", -6));
-
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 0));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 3));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 6));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 9));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 11));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 12));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -1));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -3));
-var_dump(mb_strpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -6));
-
-var_dump(stripos("abc abc abc", "abc", 0));
-var_dump(stripos("abc abc abc", "abc", 3));
-var_dump(stripos("abc abc abc", "abc", 6));
-var_dump(stripos("abc abc abc", "abc", 9));
-var_dump(stripos("abc abc abc", "abc", 11));
-var_dump(stripos("abc abc abc", "abc", 12));
-var_dump(stripos("abc abc abc", "abc", -1));
-var_dump(stripos("abc abc abc", "abc", -3));
-var_dump(stripos("abc abc abc", "abc", -6));
-
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 0));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 3));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 6));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 9));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 11));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 12));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -1));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -3));
-var_dump(mb_stripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -6));
-
-var_dump(strrpos("abc abc abc", "abc", 0));
-var_dump(strrpos("abc abc abc", "abc", 3));
-var_dump(strrpos("abc abc abc", "abc", 6));
-var_dump(strrpos("abc abc abc", "abc", 9));
-var_dump(strrpos("abc abc abc", "abc", 11));
-var_dump(strrpos("abc abc abc", "abc", 12));
-var_dump(strrpos("abc abc abc", "abc", -1));
-var_dump(strrpos("abc abc abc", "abc", -3));
-var_dump(strrpos("abc abc abc", "abc", -6));
-
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 0));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 3));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 6));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 9));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 11));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 12));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -1));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -3));
-var_dump(mb_strrpos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -6));
-
-var_dump(strripos("abc abc abc", "abc", 0));
-var_dump(strripos("abc abc abc", "abc", 3));
-var_dump(strripos("abc abc abc", "abc", 6));
-var_dump(strripos("abc abc abc", "abc", 9));
-var_dump(strripos("abc abc abc", "abc", 11));
-var_dump(strripos("abc abc abc", "abc", 12));
-var_dump(strripos("abc abc abc", "abc", -1));
-var_dump(strripos("abc abc abc", "abc", -3));
-var_dump(strripos("abc abc abc", "abc", -6));
-
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 0));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 3));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 6));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 9));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 11));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", 12));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -1));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -3));
-var_dump(mb_strripos("â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†", -6));
+function section($func, $haystack, $needle)
+{
+ echo "\n------- $func -----------\n\n";
+ foreach(array(0, 3, 6, 9, 11, 12, -1, -3, -6, -20) as $offset) {
+ echo "> Offset: $offset\n";
+ var_dump($func($haystack,$needle,$offset));
+ }
+}
+
+section('strpos' , "abc abc abc" , "abc");
+section('mb_strpos' , "â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†");
+
+section('stripos' , "abc abc abc" , "abc");
+section('mb_stripos' , "â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†");
+
+section('strrpos' , "abc abc abc" , "abc");
+section('mb_strrpos' , "â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†");
+
+section('strripos' , "abc abc abc" , "abc");
+section('mb_strripos', "â—â—‹â—† â—â—‹â—† â—â—‹â—†", "â—â—‹â—†");
?>
--EXPECTF--
+------- strpos -----------
+
+> Offset: 0
int(0)
+> Offset: 3
int(4)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: strpos(): Offset not contained in string in %s on line %d
bool(false)
-
-Warning: strpos(): Offset not contained in string in %s on line %d
+> Offset: -1
bool(false)
+> Offset: -3
+int(8)
+> Offset: -6
+int(8)
+> Offset: -20
Warning: strpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: strpos(): Offset not contained in string in %s on line %d
-bool(false)
+------- mb_strpos -----------
+
+> Offset: 0
int(0)
+> Offset: 3
int(4)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
+> Offset: -1
bool(false)
+> Offset: -3
+int(8)
+> Offset: -6
+int(8)
+> Offset: -20
Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
-bool(false)
+------- stripos -----------
+
+> Offset: 0
int(0)
+> Offset: 3
int(4)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-
-Warning: stripos(): Offset not contained in string in %s on line %d
+> Offset: -1
bool(false)
+> Offset: -3
+int(8)
+> Offset: -6
+int(8)
+> Offset: -20
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: stripos(): Offset not contained in string in %s on line %d
-bool(false)
+------- mb_stripos -----------
+
+> Offset: 0
int(0)
+> Offset: 3
int(4)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
+> Offset: -1
bool(false)
+> Offset: -3
+int(8)
+> Offset: -6
+int(8)
+> Offset: -20
Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
-bool(false)
+------- strrpos -----------
+
+> Offset: 0
int(8)
+> Offset: 3
int(8)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
bool(false)
+> Offset: -1
int(8)
+> Offset: -3
int(8)
+> Offset: -6
int(4)
+> Offset: -20
+
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false)
+
+------- mb_strrpos -----------
+
+> Offset: 0
int(8)
+> Offset: 3
int(8)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
bool(false)
+> Offset: -1
int(8)
+> Offset: -3
int(8)
+> Offset: -6
int(4)
+> Offset: -20
+
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false)
+
+------- strripos -----------
+
+> Offset: 0
int(8)
+> Offset: 3
int(8)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
bool(false)
+> Offset: -1
int(8)
+> Offset: -3
int(8)
+> Offset: -6
int(4)
+> Offset: -20
+
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false)
+
+------- mb_strripos -----------
+
+> Offset: 0
int(8)
+> Offset: 3
int(8)
+> Offset: 6
int(8)
+> Offset: 9
bool(false)
+> Offset: 11
bool(false)
+> Offset: 12
Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
bool(false)
+> Offset: -1
int(8)
+> Offset: -3
int(8)
+> Offset: -6
int(4)
+> Offset: -20
+
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+bool(false) \ No newline at end of file
diff --git a/ext/mbstring/tests/bug72164.phpt b/ext/mbstring/tests/bug72164.phpt
new file mode 100644
index 0000000000..bd58f7e5a5
--- /dev/null
+++ b/ext/mbstring/tests/bug72164.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #72164 (Null Pointer Dereference - mb_ereg_replace)
+--SKIPIF--
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
+--FILE--
+<?php
+$var0 = "e";
+$var2 = "";
+$var3 = NULL;
+$var8 = mbereg_replace($var2,$var3,$var3,$var0);
+var_dump($var8);
+?>
+--EXPECT--
+string(0) ""
diff --git a/ext/mbstring/tests/mb_ereg_search_setpos.phpt b/ext/mbstring/tests/mb_ereg_search_setpos.phpt
new file mode 100644
index 0000000000..ec354309f3
--- /dev/null
+++ b/ext/mbstring/tests/mb_ereg_search_setpos.phpt
@@ -0,0 +1,70 @@
+--TEST--
+mb_ereg_search_setpos() function
+--SKIPIF--
+<?php
+if (!extension_loaded('mbstring')) die('skip mbstring not enabled');
+?>
+--FILE--
+<?php
+mb_regex_encoding('iso-8859-1');
+$test_str = 'Iñtërnâtiônàlizætiøn'; // Length = 20
+
+var_dump(mb_ereg_search_setpos(50)); // OK
+var_dump(mb_ereg_search_setpos(-1)); // Error
+
+mb_ereg_search_init($test_str);
+
+$positions = array( 5, 19, 20, 25, 0, -5, -20, -30);
+foreach($positions as $pos) {
+ echo("\n* Position: $pos :\n");
+ var_dump(mb_ereg_search_setpos($pos));
+ var_dump(mb_ereg_search_getpos());
+}
+?>
+==DONE==
+--EXPECTF--
+bool(true)
+
+Warning: mb_ereg_search_setpos(): Position is out of range in %s on line %d
+bool(false)
+
+* Position: 5 :
+bool(true)
+int(5)
+
+* Position: 19 :
+bool(true)
+int(19)
+
+* Position: 20 :
+
+Warning: mb_ereg_search_setpos(): Position is out of range in %s on line %d
+bool(false)
+int(0)
+
+* Position: 25 :
+
+Warning: mb_ereg_search_setpos(): Position is out of range in %s on line %d
+bool(false)
+int(0)
+
+* Position: 0 :
+bool(true)
+int(0)
+
+* Position: -5 :
+bool(true)
+int(15)
+
+* Position: -20 :
+bool(true)
+int(0)
+
+* Position: -30 :
+
+Warning: mb_ereg_search_setpos(): Position is out of range in %s on line %d
+bool(false)
+int(0)
+==DONE==
+
+
diff --git a/ext/mbstring/tests/mb_strimwidth.phpt b/ext/mbstring/tests/mb_strimwidth.phpt
index 82780d6756..f257604c6b 100644
--- a/ext/mbstring/tests/mb_strimwidth.phpt
+++ b/ext/mbstring/tests/mb_strimwidth.phpt
@@ -14,30 +14,44 @@ include_once('common.inc');
// EUC-JP
$euc_jp = '0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£';
+print "String width: ".mb_strwidth($euc_jp,'EUC-JP')."\n";
+
print "1: ". mb_strimwidth($euc_jp, 0, 15,'...','EUC-JP') . "\n";
print "2: ". mb_strimwidth($euc_jp, 0, 100,'...','EUC-JP') . "\n";
print "3: ". mb_strimwidth($euc_jp, 15, 100,'...','EUC-JP') . "\n";
-// Note: Did not start form -22 offset. Staring from 0.
-$str = mb_strimwidth($euc_jp,-22, 100,'...','EUC-JP');
-($str === FALSE) ? print "4 OK\n" : print "NG: $str\n";
+print "4: ". mb_strimwidth($euc_jp, -30, 5,'...','EUC-JP') . "\n";
+print "5: ". mb_strimwidth($euc_jp, 38, 5,'...','EUC-JP') . "\n";
+print "6: ". mb_strimwidth($euc_jp, 38, -25,'...','EUC-JP') . "\n";
+print "7: ". mb_strimwidth($euc_jp, -30, -25,'...','EUC-JP') . "\n";
+
+$str = mb_strimwidth($euc_jp, 0, -100,'...','EUC-JP');
+($str === FALSE) ? print "10 OK\n" : print "NG: $str\n";
-$str = mb_strimwidth($euc_jp, 100, -10,'...','EUC-JP');
-($str === FALSE) ? print "5 OK\n" : print "NG: $str\n";
+$str = mb_strimwidth($euc_jp, 100, 10,'...','EUC-JP');
+($str === FALSE) ? print "11 OK\n" : print "NG: $str\n";
$str = mb_strimwidth($euc_jp, -100, 10,'...','EUC-JP');
-($str === FALSE) ? print "6 OK\n" : print "NG: $str\n";
+($str === FALSE) ? print "12 OK\n" : print "NG: $str\n";
+
+$str = mb_strimwidth($euc_jp, -10, -12,'...','EUC-JP');
+($str === FALSE) ? print "13 OK\n" : print "NG: $str\n";
?>
--EXPECT--
+String width: 68
1: 0123¤³¤Îʸ»ú...
2: 0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£
3: ¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£
+4: ¡£
+5: ¡£
+6: ¡£
+7: ¡£
ERR: Warning
-4 OK
+10 OK
ERR: Warning
-5 OK
+11 OK
ERR: Warning
-6 OK
-
-
+12 OK
+ERR: Warning
+13 OK
diff --git a/ext/mbstring/tests/mb_stripos.phpt b/ext/mbstring/tests/mb_stripos.phpt
index 4ea8cfa6d6..8268872223 100644
--- a/ext/mbstring/tests/mb_stripos.phpt
+++ b/ext/mbstring/tests/mb_stripos.phpt
@@ -1,10 +1,7 @@
--TEST--
mb_stripos()
--SKIPIF--
-<?php
-extension_loaded('mbstring') or die('skip');
-function_exists('mb_stripos') or die("skip mb_stripos() is not available in this build");
-?>
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
// TODO: Add more encodings
@@ -17,43 +14,62 @@ include_once('common.inc');
// Test string
$euc_jp = b'0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£0123ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£';
+$slen = mb_strlen($euc_jp, 'EUC-JP');
+echo "String len: $slen\n";
+
// EUC-JP - With encoding parameter
mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n");
echo "== POSITIVE OFFSET ==\n";
-print mb_stripos($euc_jp,b'ÆüËܸì', 0, 'EUC-JP') . "\n";
+
+print mb_stripos($euc_jp, b'ÆüËܸì', 0, 'EUC-JP') . "\n";
print mb_stripos($euc_jp, b'0', 0, 'EUC-JP') . "\n";
print mb_stripos($euc_jp, 3, 0, 'EUC-JP') . "\n";
print mb_stripos($euc_jp, 0, 0, 'EUC-JP') . "\n";
-print mb_stripos($euc_jp,b'ÆüËܸì', 15, 'EUC-JP') . "\n";
+print mb_stripos($euc_jp, b'ÆüËܸì', 15, 'EUC-JP') . "\n";
print mb_stripos($euc_jp, b'0', 15, 'EUC-JP') . "\n";
print mb_stripos($euc_jp, 3, 15, 'EUC-JP') . "\n";
print mb_stripos($euc_jp, 0, 15, 'EUC-JP') . "\n";
+
// Negative offset
-// Note: PHP Warning - offset is negative.
-// Note: For offset(-15). It does not return position of latter string. (ie the same result as -50)
echo "== NEGATIVE OFFSET ==\n";
-$r = mb_stripos($euc_jp,b'ÆüËܸì', -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_stripos($euc_jp, b'0', -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_stripos($euc_jp, 3, -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_stripos($euc_jp, 0, -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_stripos($euc_jp,b'ÆüËܸì', -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+
+print mb_stripos($euc_jp, b'ÆüËܸì', -15, 'EUC-JP') . "\n";
+print mb_stripos($euc_jp, b'0', -15, 'EUC-JP') . "\n";
+print mb_stripos($euc_jp, 3, -15, 'EUC-JP') . "\n";
+print mb_stripos($euc_jp, 0, -15, 'EUC-JP') . "\n";
+print mb_stripos($euc_jp, 0, -43, 'EUC-JP') . "\n";
+
+
+// Invalid offset - should return false with warning
+print ("== INVALID OFFSET ==\n");
+
+$r = mb_stripos($euc_jp, b'ÆüËܸì', 44, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_stripos($euc_jp, b'ÆüËܸì', 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_stripos($euc_jp, b'0', 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_stripos($euc_jp, 3, 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_stripos($euc_jp, 0, 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_stripos($euc_jp, b'ÆüËܸì', -50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_stripos($euc_jp, b'0', -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_stripos($euc_jp, 3, -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_stripos($euc_jp, 0, -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_stripos($euc_jp, 0, -44, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
// Out of range - should return false
print ("== OUT OF RANGE ==\n");
-$r = mb_stripos($euc_jp,b'ÆüËܸì', 40, 'EUC-JP');
+
+$r = mb_stripos($euc_jp, b'ÆüËܸì', 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
$r = mb_stripos($euc_jp, b'0', 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
@@ -61,12 +77,19 @@ $r = mb_stripos($euc_jp, 3, 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
$r = mb_stripos($euc_jp, 0, 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
-// Note: Returned NULL string
-// echo gettype($r). ' val '. $r ."\n";
+$r = mb_stripos($euc_jp, b'ÆüËܸì', -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
+$r = mb_stripos($euc_jp, b'0', -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
+$r = mb_stripos($euc_jp, 3, -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
+$r = mb_stripos($euc_jp, 0, -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
// Non-existent
echo "== NON-EXISTENT ==\n";
+
$r = mb_stripos($euc_jp, b'´Ú¹ñ¸ì', 0, 'EUC-JP');
($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
$r = mb_stripos($euc_jp, b"\n", 0, 'EUC-JP');
@@ -75,30 +98,32 @@ $r = mb_stripos($euc_jp, b"\n", 0, 'EUC-JP');
// EUC-JP - No encoding parameter
echo "== NO ENCODING PARAMETER ==\n";
+
mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
-print mb_stripos($euc_jp,b'ÆüËܸì', 0) . "\n";
+print mb_stripos($euc_jp, b'ÆüËܸì', 0) . "\n";
print mb_stripos($euc_jp, b'0', 0) . "\n";
print mb_stripos($euc_jp, 3, 0) . "\n";
print mb_stripos($euc_jp, 0, 0) . "\n";
-$r = mb_stripos($euc_jp,b'´Ú¹ñ¸ì', 0);
+$r = mb_stripos($euc_jp, b'´Ú¹ñ¸ì', 0);
($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
-$r = mb_stripos($euc_jp,b"\n", 0);
+$r = mb_stripos($euc_jp, b"\n", 0);
($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
// EUC-JP - No offset and encoding parameter
echo "== NO OFFSET AND ENCODING PARAMETER ==\n";
+
mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
-print mb_stripos($euc_jp,b'ÆüËܸì') . "\n";
+print mb_stripos($euc_jp, b'ÆüËܸì') . "\n";
print mb_stripos($euc_jp, b'0') . "\n";
print mb_stripos($euc_jp, 3) . "\n";
print mb_stripos($euc_jp, 0) . "\n";
-$r = mb_stripos($euc_jp,b'´Ú¹ñ¸ì');
+$r = mb_stripos($euc_jp, b'´Ú¹ñ¸ì');
($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
-$r = mb_stripos($euc_jp,b"\n");
+$r = mb_stripos($euc_jp, b"\n");
($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
@@ -113,11 +138,10 @@ $r = mb_stripos($euc_jp, $t_obj, 'EUC-JP');
($r === NULL) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
$r = mb_stripos($euc_jp, $t_obj, 'BAD_ENCODING');
($r === NULL) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");
-
-
?>
-
+==DONE==
--EXPECT--
+String len: 43
== POSITIVE OFFSET ==
10
0
@@ -128,27 +152,41 @@ $r = mb_stripos($euc_jp, $t_obj, 'BAD_ENCODING');
33
30
== NEGATIVE OFFSET ==
+34
+30
+33
+30
+0
+== INVALID OFFSET ==
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
+ERR: Warning
+OK_INVALID_OFFSET
+ERR: Warning
+OK_INVALID_OFFSET
== OUT OF RANGE ==
OK_OUT_RANGE
OK_OUT_RANGE
OK_OUT_RANGE
OK_OUT_RANGE
+OK_OUT_RANGE
+OK_OUT_RANGE
+OK_OUT_RANGE
+OK_OUT_RANGE
== NON-EXISTENT ==
OK_STR
OK_NEWLINE
@@ -175,4 +213,4 @@ ERR: Warning
OK_OBJECT
ERR: Warning
OK_BAD_ENCODING
-
+==DONE==
diff --git a/ext/mbstring/tests/mb_stripos_variation3.phpt b/ext/mbstring/tests/mb_stripos_variation3.phpt
index 21a1293786..69c4a9e53b 100644
--- a/ext/mbstring/tests/mb_stripos_variation3.phpt
+++ b/ext/mbstring/tests/mb_stripos_variation3.phpt
@@ -8,10 +8,9 @@ if (PHP_INT_SIZE != 8) die('skip 64-bit only');
?>
--FILE--
<?php
-/* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of first occurrence of a string within another, case insensitive
+/* Prototype : int mb_stripos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another, case insensitive
* Source code: ext/mbstring/mbstring.c
- * Alias to functions:
*/
/*
@@ -52,45 +51,47 @@ $inputs = array(
/*1*/ 0,
1,
12345,
+ -5,
-2345,
// float data
-/*5*/ 10.5,
- -10.5,
+/*6*/ 10.5,
+ -5.5,
+ -100.5,
12.3456789000e10,
12.3456789000E-10,
.5,
// null data
-/*10*/ NULL,
+/*12*/ NULL,
null,
// boolean data
-/*12*/ true,
+/*14*/ true,
false,
TRUE,
FALSE,
// empty data
-/*16*/ "",
+/*18*/ "",
'',
// string data
-/*18*/ "string",
+/*20*/ "string",
'string',
$heredoc,
// object data
-/*21*/ new classA(),
+/*23*/ new classA(),
// undefined data
-/*22*/ @$undefined_var,
+/*24*/ @$undefined_var,
// unset data
-/*23*/ @$unset_var,
+/*25*/ @$unset_var,
// resource variable
-/*24*/ $fp
+/*26*/ $fp
);
// loop through each element of $inputs to check the behavior of mb_stripos()
@@ -120,28 +121,28 @@ Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 4 --
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
-bool(false)
+int(8)
-- Iteration 5 --
+
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 6 --
-
-Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 7 --
+int(8)
+
+-- Iteration 8 --
Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
--- Iteration 8 --
-int(8)
-
-- Iteration 9 --
-int(8)
+
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
+bool(false)
-- Iteration 10 --
int(8)
@@ -162,42 +163,48 @@ int(8)
int(8)
-- Iteration 16 --
+int(8)
+
+-- Iteration 17 --
+int(8)
+
+-- Iteration 18 --
Warning: mb_stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 17 --
+-- Iteration 19 --
Warning: mb_stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 18 --
+-- Iteration 20 --
Warning: mb_stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 19 --
+-- Iteration 21 --
Warning: mb_stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 20 --
+-- Iteration 22 --
Warning: mb_stripos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 21 --
+-- Iteration 23 --
Warning: mb_stripos() expects parameter 3 to be integer, object given in %s on line %d
NULL
--- Iteration 22 --
+-- Iteration 24 --
int(8)
--- Iteration 23 --
+-- Iteration 25 --
int(8)
--- Iteration 24 --
+-- Iteration 26 --
Warning: mb_stripos() expects parameter 3 to be integer, resource given in %s on line %d
NULL
diff --git a/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt b/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt
index fbe4937ac2..8ffcae5c0f 100644
--- a/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt
+++ b/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt
@@ -7,10 +7,9 @@ function_exists('mb_stripos') or die("skip mb_stripos() is not available in this
?>
--FILE--
<?php
-/* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
- * Description: Finds position of first occurrence of a string within another, case insensitive
+/* Prototype : int mb_stripos(string $haystack, string $needle [, int $offset [, string $encoding]])
+ * Description: Find position of first occurrence of a string within another, case insensitive
* Source code: ext/mbstring/mbstring.c
- * Alias to functions:
*/
/*
@@ -34,7 +33,7 @@ $needle_mb = base64_decode('44CC');
* mb_stripos should not be able to accept negative values as $offset.
* 60 is larger than *BYTE* count for $string_mb
*/
-for ($i = -10; $i <= 60; $i += 10) {
+for ($i = -30; $i <= 60; $i += 10) {
echo "\n**-- Offset is: $i --**\n";
echo "-- ASCII String --\n";
var_dump(mb_stripos($string_ascii, $needle_ascii, $i));
@@ -48,7 +47,7 @@ echo "Done";
--EXPECTF--
*** Testing mb_stripos() : usage variations ***
-**-- Offset is: -10 --**
+**-- Offset is: -30 --**
-- ASCII String --
Warning: mb_stripos(): Offset not contained in string in %s on line %d
@@ -58,6 +57,18 @@ bool(false)
Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
+**-- Offset is: -20 --**
+-- ASCII String --
+int(9)
+--Multibyte String --
+int(9)
+
+**-- Offset is: -10 --**
+-- ASCII String --
+int(20)
+--Multibyte String --
+int(20)
+
**-- Offset is: 0 --**
-- ASCII String --
int(9)
@@ -116,4 +127,3 @@ bool(false)
Warning: mb_stripos(): Offset not contained in string in %s on line %d
bool(false)
Done
-
diff --git a/ext/mbstring/tests/mb_strpos.phpt b/ext/mbstring/tests/mb_strpos.phpt
index e1222ca6dd..364bc7cc1a 100644
--- a/ext/mbstring/tests/mb_strpos.phpt
+++ b/ext/mbstring/tests/mb_strpos.phpt
@@ -14,10 +14,14 @@ include_once('common.inc');
// Test string
$euc_jp = b'0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£0123ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£';
+$slen = mb_strlen($euc_jp, 'EUC-JP');
+echo "String len: $slen\n";
+
// EUC-JP - With encoding parameter
mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n");
echo "== POSITIVE OFFSET ==\n";
+
print mb_strpos($euc_jp, b'ÆüËܸì', 0, 'EUC-JP') . "\n";
print mb_strpos($euc_jp, b'0', 0, 'EUC-JP') . "\n";
print mb_strpos($euc_jp, 3, 0, 'EUC-JP') . "\n";
@@ -27,29 +31,44 @@ print mb_strpos($euc_jp, b'0', 15, 'EUC-JP') . "\n";
print mb_strpos($euc_jp, 3, 15, 'EUC-JP') . "\n";
print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n";
+
// Negative offset
-// Note: PHP Warning - offset is negative.
-// Note: For offset(-15). It does not return position of latter string. (ie the same result as -50)
echo "== NEGATIVE OFFSET ==\n";
-$r = mb_strpos($euc_jp, b'ÆüËܸì', -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_strpos($euc_jp, b'0', -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_strpos($euc_jp, 3, -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
-$r = mb_strpos($euc_jp, 0, -15, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+
+print mb_strpos($euc_jp, b'ÆüËܸì', -15, 'EUC-JP') . "\n";
+print mb_strpos($euc_jp, b'0', -15, 'EUC-JP') . "\n";
+print mb_strpos($euc_jp, 3, -15, 'EUC-JP') . "\n";
+print mb_strpos($euc_jp, 0, -15, 'EUC-JP') . "\n";
+print mb_strpos($euc_jp, 0, -43, 'EUC-JP') . "\n";
+
+
+// Invalid offset - should return false with warning
+print ("== INVALID OFFSET ==\n");
+
+$r = mb_strpos($euc_jp, b'ÆüËܸì', 44, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_strpos($euc_jp, b'ÆüËܸì', 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_strpos($euc_jp, b'0', 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_strpos($euc_jp, 3, 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_strpos($euc_jp, 0, 50, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_strpos($euc_jp, b'ÆüËܸì', -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_strpos($euc_jp, b'0', -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_strpos($euc_jp, 3, -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
$r = mb_strpos($euc_jp, 0, -50, 'EUC-JP');
-($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
+$r = mb_strpos($euc_jp, 0, -44, 'EUC-JP');
+($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
// Out of range - should return false
print ("== OUT OF RANGE ==\n");
+
$r = mb_strpos($euc_jp, b'ÆüËܸì', 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
$r = mb_strpos($euc_jp, b'0', 40, 'EUC-JP');
@@ -58,12 +77,19 @@ $r = mb_strpos($euc_jp, 3, 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
$r = mb_strpos($euc_jp, 0, 40, 'EUC-JP');
($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
-// Note: Returned NULL string
-// echo gettype($r). ' val '. $r ."\n";
+$r = mb_strpos($euc_jp, b'ÆüËܸì', -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
+$r = mb_strpos($euc_jp, b'0', -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
+$r = mb_strpos($euc_jp, 3, -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
+$r = mb_strpos($euc_jp, 0, -3, 'EUC-JP');
+($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
// Non-existent
echo "== NON-EXISTENT ==\n";
+
$r = mb_strpos($euc_jp, b'´Ú¹ñ¸ì', 0, 'EUC-JP');
($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
$r = mb_strpos($euc_jp, b"\n", 0, 'EUC-JP');
@@ -72,6 +98,7 @@ $r = mb_strpos($euc_jp, b"\n", 0, 'EUC-JP');
// EUC-JP - No encoding parameter
echo "== NO ENCODING PARAMETER ==\n";
+
mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
print mb_strpos($euc_jp, b'ÆüËܸì', 0) . "\n";
@@ -86,6 +113,7 @@ $r = mb_strpos($euc_jp, b"\n", 0);
// EUC-JP - No offset and encoding parameter
echo "== NO OFFSET AND ENCODING PARAMETER ==\n";
+
mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
print mb_strpos($euc_jp, b'ÆüËܸì') . "\n";
@@ -110,11 +138,10 @@ $r = mb_strpos($euc_jp, $t_obj, 'EUC-JP');
($r === NULL) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
$r = mb_strpos($euc_jp, $t_obj, 'BAD_ENCODING');
($r === NULL) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");
-
-
?>
-
+==DONE==
--EXPECT--
+String len: 43
== POSITIVE OFFSET ==
10
0
@@ -125,27 +152,41 @@ $r = mb_strpos($euc_jp, $t_obj, 'BAD_ENCODING');
33
30
== NEGATIVE OFFSET ==
+34
+30
+33
+30
+0
+== INVALID OFFSET ==
+ERR: Warning
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
ERR: Warning
-OK_NEGATIVE_OFFSET
+OK_INVALID_OFFSET
+ERR: Warning
+OK_INVALID_OFFSET
== OUT OF RANGE ==
OK_OUT_RANGE
OK_OUT_RANGE
OK_OUT_RANGE
OK_OUT_RANGE
+OK_OUT_RANGE
+OK_OUT_RANGE
+OK_OUT_RANGE
+OK_OUT_RANGE
== NON-EXISTENT ==
OK_STR
OK_NEWLINE
@@ -172,4 +213,4 @@ ERR: Warning
OK_OBJECT
ERR: Warning
OK_BAD_ENCODING
-
+==DONE==
diff --git a/ext/mbstring/tests/mb_strpos_variation3.phpt b/ext/mbstring/tests/mb_strpos_variation3.phpt
index 8079a19021..f30b708183 100644
--- a/ext/mbstring/tests/mb_strpos_variation3.phpt
+++ b/ext/mbstring/tests/mb_strpos_variation3.phpt
@@ -51,45 +51,47 @@ $inputs = array(
/*1*/ 0,
1,
12345,
+ -5,
-2345,
// float data
-/*5*/ 10.5,
- -10.5,
+/*6*/ 10.5,
+ -5.5,
+ -100.5,
12.3456789000e10,
12.3456789000E-10,
.5,
// null data
-/*10*/ NULL,
+/*12*/ NULL,
null,
// boolean data
-/*12*/ true,
+/*14*/ true,
false,
TRUE,
FALSE,
// empty data
-/*16*/ "",
+/*18*/ "",
'',
// string data
-/*18*/ "string",
+/*20*/ "string",
'string',
$heredoc,
// object data
-/*21*/ new classA(),
+/*23*/ new classA(),
// undefined data
-/*22*/ @$undefined_var,
+/*24*/ @$undefined_var,
// unset data
-/*23*/ @$unset_var,
+/*25*/ @$unset_var,
// resource variable
-/*24*/ $fp
+/*26*/ $fp
);
// loop through each element of $inputs to check the behavior of mb_strpos()
@@ -119,28 +121,28 @@ Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 4 --
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
-bool(false)
+int(8)
-- Iteration 5 --
+
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 6 --
-
-Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 7 --
+int(8)
+
+-- Iteration 8 --
Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
--- Iteration 8 --
-int(8)
-
-- Iteration 9 --
-int(8)
+
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
+bool(false)
-- Iteration 10 --
int(8)
@@ -161,42 +163,48 @@ int(8)
int(8)
-- Iteration 16 --
+int(8)
+
+-- Iteration 17 --
+int(8)
+
+-- Iteration 18 --
Warning: mb_strpos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 17 --
+-- Iteration 19 --
Warning: mb_strpos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 18 --
+-- Iteration 20 --
Warning: mb_strpos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 19 --
+-- Iteration 21 --
Warning: mb_strpos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 20 --
+-- Iteration 22 --
Warning: mb_strpos() expects parameter 3 to be integer, string given in %s on line %d
NULL
--- Iteration 21 --
+-- Iteration 23 --
Warning: mb_strpos() expects parameter 3 to be integer, object given in %s on line %d
NULL
--- Iteration 22 --
+-- Iteration 24 --
int(8)
--- Iteration 23 --
+-- Iteration 25 --
int(8)
--- Iteration 24 --
+-- Iteration 26 --
Warning: mb_strpos() expects parameter 3 to be integer, resource given in %s on line %d
NULL
diff --git a/ext/mbstring/tests/mb_strpos_variation5.phpt b/ext/mbstring/tests/mb_strpos_variation5.phpt
index 7a9604abef..23bfa22b61 100644
--- a/ext/mbstring/tests/mb_strpos_variation5.phpt
+++ b/ext/mbstring/tests/mb_strpos_variation5.phpt
@@ -33,7 +33,7 @@ $needle_mb = base64_decode('44CC');
* mb_strpos should not be able to accept negative values as $offset.
* 60 is larger than *BYTE* count for $string_mb
*/
-for ($i = -10; $i <= 60; $i += 10) {
+for ($i = -30; $i <= 60; $i += 10) {
echo "\n**-- Offset is: $i --**\n";
echo "-- ASCII String --\n";
var_dump(mb_strpos($string_ascii, $needle_ascii, $i));
@@ -47,7 +47,7 @@ echo "Done";
--EXPECTF--
*** Testing mb_strpos() : usage variations ***
-**-- Offset is: -10 --**
+**-- Offset is: -30 --**
-- ASCII String --
Warning: mb_strpos(): Offset not contained in string in %s on line %d
@@ -57,6 +57,18 @@ bool(false)
Warning: mb_strpos(): Offset not contained in string in %s on line %d
bool(false)
+**-- Offset is: -20 --**
+-- ASCII String --
+int(9)
+--Multibyte String --
+int(9)
+
+**-- Offset is: -10 --**
+-- ASCII String --
+int(20)
+--Multibyte String --
+int(20)
+
**-- Offset is: 0 --**
-- ASCII String --
int(9)
diff --git a/ext/mbstring/unicode_data.h b/ext/mbstring/unicode_data.h
index 0516b54bb3..16ceb6a975 100644
--- a/ext/mbstring/unicode_data.h
+++ b/ext/mbstring/unicode_data.h
@@ -1,7 +1,7 @@
/* This file was generated from a modified version UCData's ucgendat.
*
* DO NOT EDIT THIS FILE!
- *
+ *
* Instead, compile ucgendat.c (bundled with PHP in ext/mbstring), download
* the appropriate UnicodeData-x.x.x.txt and CompositionExclusions-x.x.x.txt
* files from http://www.unicode.org/Public/ and run this program.
@@ -13,13 +13,13 @@
static const unsigned short _ucprop_size = 50;
static const unsigned short _ucprop_offsets[] = {
- 0x0000, 0x0196, 0x0278, 0x0280, 0x02cc, 0x02e4, 0x0336, 0x0346,
- 0x0348, 0x034a, 0x034e, 0x036c, 0x036e, 0xffff, 0x0374, 0x082a,
- 0x0cec, 0x0d00, 0x0d62, 0x0fe6, 0x0ff2, 0x1010, 0x10a0, 0x112c,
- 0x122c, 0x12b0, 0x12d0, 0x1306, 0x144e, 0x17c0, 0x181e, 0x1834,
- 0x1846, 0x1870, 0x187c, 0x1896, 0x18a0, 0x18a6, 0x18b6, 0x1ba6,
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1d6a, 0x2152,
- 0x2168, 0x217c, 0x21a6, 0x0000
+ 0x0000, 0x0214, 0x033a, 0x0344, 0x03aa, 0x03c2, 0x0436, 0x0444,
+ 0x0446, 0x0448, 0x044c, 0x046e, 0x0470, 0xffff, 0x0476, 0x0958,
+ 0x0e44, 0x0e58, 0x0ec8, 0x122c, 0x1238, 0x125a, 0x12f0, 0x1380,
+ 0x14ba, 0x153a, 0x155c, 0x1596, 0x16ea, 0x1a76, 0x1af0, 0x1b08,
+ 0x1b1a, 0x1b46, 0x1b50, 0x1b6a, 0x1b74, 0x1b7a, 0x1b88, 0x1ee4,
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x20b0, 0x257c,
+ 0x2592, 0x25a6, 0x2614, 0x0000
};
static const unsigned int _ucprop_ranges[] = {
@@ -34,7 +34,7 @@ static const unsigned int _ucprop_ranges[] = {
0x000007a6, 0x000007b0, 0x000007eb, 0x000007f3,
0x00000816, 0x00000819, 0x0000081b, 0x00000823,
0x00000825, 0x00000827, 0x00000829, 0x0000082d,
- 0x00000859, 0x0000085b, 0x00000900, 0x00000902,
+ 0x00000859, 0x0000085b, 0x000008e3, 0x00000902,
0x0000093a, 0x0000093a, 0x0000093c, 0x0000093c,
0x00000941, 0x00000948, 0x0000094d, 0x0000094d,
0x00000951, 0x00000957, 0x00000962, 0x00000963,
@@ -52,136 +52,185 @@ static const unsigned int _ucprop_ranges[] = {
0x00000b41, 0x00000b44, 0x00000b4d, 0x00000b4d,
0x00000b56, 0x00000b56, 0x00000b62, 0x00000b63,
0x00000b82, 0x00000b82, 0x00000bc0, 0x00000bc0,
- 0x00000bcd, 0x00000bcd, 0x00000c3e, 0x00000c40,
- 0x00000c46, 0x00000c48, 0x00000c4a, 0x00000c4d,
- 0x00000c55, 0x00000c56, 0x00000c62, 0x00000c63,
+ 0x00000bcd, 0x00000bcd, 0x00000c00, 0x00000c00,
+ 0x00000c3e, 0x00000c40, 0x00000c46, 0x00000c48,
+ 0x00000c4a, 0x00000c4d, 0x00000c55, 0x00000c56,
+ 0x00000c62, 0x00000c63, 0x00000c81, 0x00000c81,
0x00000cbc, 0x00000cbc, 0x00000cbf, 0x00000cbf,
0x00000cc6, 0x00000cc6, 0x00000ccc, 0x00000ccd,
- 0x00000ce2, 0x00000ce3, 0x00000d41, 0x00000d44,
- 0x00000d4d, 0x00000d4d, 0x00000d62, 0x00000d63,
- 0x00000dca, 0x00000dca, 0x00000dd2, 0x00000dd4,
- 0x00000dd6, 0x00000dd6, 0x00000e31, 0x00000e31,
- 0x00000e34, 0x00000e3a, 0x00000e47, 0x00000e4e,
- 0x00000eb1, 0x00000eb1, 0x00000eb4, 0x00000eb9,
- 0x00000ebb, 0x00000ebc, 0x00000ec8, 0x00000ecd,
- 0x00000f18, 0x00000f19, 0x00000f35, 0x00000f35,
- 0x00000f37, 0x00000f37, 0x00000f39, 0x00000f39,
- 0x00000f71, 0x00000f7e, 0x00000f80, 0x00000f84,
- 0x00000f86, 0x00000f87, 0x00000f8d, 0x00000f97,
- 0x00000f99, 0x00000fbc, 0x00000fc6, 0x00000fc6,
- 0x0000102d, 0x00001030, 0x00001032, 0x00001037,
- 0x00001039, 0x0000103a, 0x0000103d, 0x0000103e,
- 0x00001058, 0x00001059, 0x0000105e, 0x00001060,
- 0x00001071, 0x00001074, 0x00001082, 0x00001082,
- 0x00001085, 0x00001086, 0x0000108d, 0x0000108d,
- 0x0000109d, 0x0000109d, 0x0000135d, 0x0000135f,
- 0x00001712, 0x00001714, 0x00001732, 0x00001734,
- 0x00001752, 0x00001753, 0x00001772, 0x00001773,
+ 0x00000ce2, 0x00000ce3, 0x00000d01, 0x00000d01,
+ 0x00000d41, 0x00000d44, 0x00000d4d, 0x00000d4d,
+ 0x00000d62, 0x00000d63, 0x00000dca, 0x00000dca,
+ 0x00000dd2, 0x00000dd4, 0x00000dd6, 0x00000dd6,
+ 0x00000e31, 0x00000e31, 0x00000e34, 0x00000e3a,
+ 0x00000e47, 0x00000e4e, 0x00000eb1, 0x00000eb1,
+ 0x00000eb4, 0x00000eb9, 0x00000ebb, 0x00000ebc,
+ 0x00000ec8, 0x00000ecd, 0x00000f18, 0x00000f19,
+ 0x00000f35, 0x00000f35, 0x00000f37, 0x00000f37,
+ 0x00000f39, 0x00000f39, 0x00000f71, 0x00000f7e,
+ 0x00000f80, 0x00000f84, 0x00000f86, 0x00000f87,
+ 0x00000f8d, 0x00000f97, 0x00000f99, 0x00000fbc,
+ 0x00000fc6, 0x00000fc6, 0x0000102d, 0x00001030,
+ 0x00001032, 0x00001037, 0x00001039, 0x0000103a,
+ 0x0000103d, 0x0000103e, 0x00001058, 0x00001059,
+ 0x0000105e, 0x00001060, 0x00001071, 0x00001074,
+ 0x00001082, 0x00001082, 0x00001085, 0x00001086,
+ 0x0000108d, 0x0000108d, 0x0000109d, 0x0000109d,
+ 0x0000135d, 0x0000135f, 0x00001712, 0x00001714,
+ 0x00001732, 0x00001734, 0x00001752, 0x00001753,
+ 0x00001772, 0x00001773, 0x000017b4, 0x000017b5,
0x000017b7, 0x000017bd, 0x000017c6, 0x000017c6,
0x000017c9, 0x000017d3, 0x000017dd, 0x000017dd,
0x0000180b, 0x0000180d, 0x000018a9, 0x000018a9,
0x00001920, 0x00001922, 0x00001927, 0x00001928,
0x00001932, 0x00001932, 0x00001939, 0x0000193b,
- 0x00001a17, 0x00001a18, 0x00001a56, 0x00001a56,
- 0x00001a58, 0x00001a5e, 0x00001a60, 0x00001a60,
- 0x00001a62, 0x00001a62, 0x00001a65, 0x00001a6c,
- 0x00001a73, 0x00001a7c, 0x00001a7f, 0x00001a7f,
+ 0x00001a17, 0x00001a18, 0x00001a1b, 0x00001a1b,
+ 0x00001a56, 0x00001a56, 0x00001a58, 0x00001a5e,
+ 0x00001a60, 0x00001a60, 0x00001a62, 0x00001a62,
+ 0x00001a65, 0x00001a6c, 0x00001a73, 0x00001a7c,
+ 0x00001a7f, 0x00001a7f, 0x00001ab0, 0x00001abd,
0x00001b00, 0x00001b03, 0x00001b34, 0x00001b34,
0x00001b36, 0x00001b3a, 0x00001b3c, 0x00001b3c,
0x00001b42, 0x00001b42, 0x00001b6b, 0x00001b73,
0x00001b80, 0x00001b81, 0x00001ba2, 0x00001ba5,
- 0x00001ba8, 0x00001ba9, 0x00001be6, 0x00001be6,
- 0x00001be8, 0x00001be9, 0x00001bed, 0x00001bed,
- 0x00001bef, 0x00001bf1, 0x00001c2c, 0x00001c33,
- 0x00001c36, 0x00001c37, 0x00001cd0, 0x00001cd2,
- 0x00001cd4, 0x00001ce0, 0x00001ce2, 0x00001ce8,
- 0x00001ced, 0x00001ced, 0x00001dc0, 0x00001de6,
- 0x00001dfc, 0x00001dff, 0x000020d0, 0x000020dc,
- 0x000020e1, 0x000020e1, 0x000020e5, 0x000020f0,
- 0x00002cef, 0x00002cf1, 0x00002d7f, 0x00002d7f,
- 0x00002de0, 0x00002dff, 0x0000302a, 0x0000302f,
- 0x00003099, 0x0000309a, 0x0000a66f, 0x0000a66f,
- 0x0000a67c, 0x0000a67d, 0x0000a6f0, 0x0000a6f1,
+ 0x00001ba8, 0x00001ba9, 0x00001bab, 0x00001bad,
+ 0x00001be6, 0x00001be6, 0x00001be8, 0x00001be9,
+ 0x00001bed, 0x00001bed, 0x00001bef, 0x00001bf1,
+ 0x00001c2c, 0x00001c33, 0x00001c36, 0x00001c37,
+ 0x00001cd0, 0x00001cd2, 0x00001cd4, 0x00001ce0,
+ 0x00001ce2, 0x00001ce8, 0x00001ced, 0x00001ced,
+ 0x00001cf4, 0x00001cf4, 0x00001cf8, 0x00001cf9,
+ 0x00001dc0, 0x00001df5, 0x00001dfc, 0x00001dff,
+ 0x000020d0, 0x000020dc, 0x000020e1, 0x000020e1,
+ 0x000020e5, 0x000020f0, 0x00002cef, 0x00002cf1,
+ 0x00002d7f, 0x00002d7f, 0x00002de0, 0x00002dff,
+ 0x0000302a, 0x0000302d, 0x00003099, 0x0000309a,
+ 0x0000a66f, 0x0000a66f, 0x0000a674, 0x0000a67d,
+ 0x0000a69e, 0x0000a69f, 0x0000a6f0, 0x0000a6f1,
0x0000a802, 0x0000a802, 0x0000a806, 0x0000a806,
0x0000a80b, 0x0000a80b, 0x0000a825, 0x0000a826,
0x0000a8c4, 0x0000a8c4, 0x0000a8e0, 0x0000a8f1,
0x0000a926, 0x0000a92d, 0x0000a947, 0x0000a951,
0x0000a980, 0x0000a982, 0x0000a9b3, 0x0000a9b3,
0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bc,
- 0x0000aa29, 0x0000aa2e, 0x0000aa31, 0x0000aa32,
- 0x0000aa35, 0x0000aa36, 0x0000aa43, 0x0000aa43,
- 0x0000aa4c, 0x0000aa4c, 0x0000aab0, 0x0000aab0,
+ 0x0000a9e5, 0x0000a9e5, 0x0000aa29, 0x0000aa2e,
+ 0x0000aa31, 0x0000aa32, 0x0000aa35, 0x0000aa36,
+ 0x0000aa43, 0x0000aa43, 0x0000aa4c, 0x0000aa4c,
+ 0x0000aa7c, 0x0000aa7c, 0x0000aab0, 0x0000aab0,
0x0000aab2, 0x0000aab4, 0x0000aab7, 0x0000aab8,
0x0000aabe, 0x0000aabf, 0x0000aac1, 0x0000aac1,
+ 0x0000aaec, 0x0000aaed, 0x0000aaf6, 0x0000aaf6,
0x0000abe5, 0x0000abe5, 0x0000abe8, 0x0000abe8,
0x0000abed, 0x0000abed, 0x0000fb1e, 0x0000fb1e,
- 0x0000fe00, 0x0000fe0f, 0x0000fe20, 0x0000fe26,
- 0x000101fd, 0x000101fd, 0x00010a01, 0x00010a03,
+ 0x0000fe00, 0x0000fe0f, 0x0000fe20, 0x0000fe2f,
+ 0x000101fd, 0x000101fd, 0x000102e0, 0x000102e0,
+ 0x00010376, 0x0001037a, 0x00010a01, 0x00010a03,
0x00010a05, 0x00010a06, 0x00010a0c, 0x00010a0f,
0x00010a38, 0x00010a3a, 0x00010a3f, 0x00010a3f,
- 0x00011001, 0x00011001, 0x00011038, 0x00011046,
- 0x00011080, 0x00011081, 0x000110b3, 0x000110b6,
- 0x000110b9, 0x000110ba, 0x0001d167, 0x0001d169,
+ 0x00010ae5, 0x00010ae6, 0x00011001, 0x00011001,
+ 0x00011038, 0x00011046, 0x0001107f, 0x00011081,
+ 0x000110b3, 0x000110b6, 0x000110b9, 0x000110ba,
+ 0x00011100, 0x00011102, 0x00011127, 0x0001112b,
+ 0x0001112d, 0x00011134, 0x00011173, 0x00011173,
+ 0x00011180, 0x00011181, 0x000111b6, 0x000111be,
+ 0x000111ca, 0x000111cc, 0x0001122f, 0x00011231,
+ 0x00011234, 0x00011234, 0x00011236, 0x00011237,
+ 0x000112df, 0x000112df, 0x000112e3, 0x000112ea,
+ 0x00011300, 0x00011301, 0x0001133c, 0x0001133c,
+ 0x00011340, 0x00011340, 0x00011366, 0x0001136c,
+ 0x00011370, 0x00011374, 0x000114b3, 0x000114b8,
+ 0x000114ba, 0x000114ba, 0x000114bf, 0x000114c0,
+ 0x000114c2, 0x000114c3, 0x000115b2, 0x000115b5,
+ 0x000115bc, 0x000115bd, 0x000115bf, 0x000115c0,
+ 0x000115dc, 0x000115dd, 0x00011633, 0x0001163a,
+ 0x0001163d, 0x0001163d, 0x0001163f, 0x00011640,
+ 0x000116ab, 0x000116ab, 0x000116ad, 0x000116ad,
+ 0x000116b0, 0x000116b5, 0x000116b7, 0x000116b7,
+ 0x0001171d, 0x0001171f, 0x00011722, 0x00011725,
+ 0x00011727, 0x0001172b, 0x00016af0, 0x00016af4,
+ 0x00016b30, 0x00016b36, 0x00016f8f, 0x00016f92,
+ 0x0001bc9d, 0x0001bc9e, 0x0001d167, 0x0001d169,
0x0001d17b, 0x0001d182, 0x0001d185, 0x0001d18b,
0x0001d1aa, 0x0001d1ad, 0x0001d242, 0x0001d244,
- 0x000e0100, 0x000e01ef, 0x00000903, 0x00000903,
- 0x0000093b, 0x0000093b, 0x0000093e, 0x00000940,
- 0x00000949, 0x0000094c, 0x0000094e, 0x0000094f,
- 0x00000982, 0x00000983, 0x000009be, 0x000009c0,
- 0x000009c7, 0x000009c8, 0x000009cb, 0x000009cc,
- 0x000009d7, 0x000009d7, 0x00000a03, 0x00000a03,
- 0x00000a3e, 0x00000a40, 0x00000a83, 0x00000a83,
- 0x00000abe, 0x00000ac0, 0x00000ac9, 0x00000ac9,
- 0x00000acb, 0x00000acc, 0x00000b02, 0x00000b03,
- 0x00000b3e, 0x00000b3e, 0x00000b40, 0x00000b40,
- 0x00000b47, 0x00000b48, 0x00000b4b, 0x00000b4c,
- 0x00000b57, 0x00000b57, 0x00000bbe, 0x00000bbf,
- 0x00000bc1, 0x00000bc2, 0x00000bc6, 0x00000bc8,
- 0x00000bca, 0x00000bcc, 0x00000bd7, 0x00000bd7,
- 0x00000c01, 0x00000c03, 0x00000c41, 0x00000c44,
- 0x00000c82, 0x00000c83, 0x00000cbe, 0x00000cbe,
- 0x00000cc0, 0x00000cc4, 0x00000cc7, 0x00000cc8,
- 0x00000cca, 0x00000ccb, 0x00000cd5, 0x00000cd6,
- 0x00000d02, 0x00000d03, 0x00000d3e, 0x00000d40,
- 0x00000d46, 0x00000d48, 0x00000d4a, 0x00000d4c,
- 0x00000d57, 0x00000d57, 0x00000d82, 0x00000d83,
- 0x00000dcf, 0x00000dd1, 0x00000dd8, 0x00000ddf,
- 0x00000df2, 0x00000df3, 0x00000f3e, 0x00000f3f,
- 0x00000f7f, 0x00000f7f, 0x0000102b, 0x0000102c,
- 0x00001031, 0x00001031, 0x00001038, 0x00001038,
- 0x0000103b, 0x0000103c, 0x00001056, 0x00001057,
- 0x00001062, 0x00001064, 0x00001067, 0x0000106d,
- 0x00001083, 0x00001084, 0x00001087, 0x0000108c,
- 0x0000108f, 0x0000108f, 0x0000109a, 0x0000109c,
- 0x000017b6, 0x000017b6, 0x000017be, 0x000017c5,
- 0x000017c7, 0x000017c8, 0x00001923, 0x00001926,
- 0x00001929, 0x0000192b, 0x00001930, 0x00001931,
- 0x00001933, 0x00001938, 0x000019b0, 0x000019c0,
- 0x000019c8, 0x000019c9, 0x00001a19, 0x00001a1b,
- 0x00001a55, 0x00001a55, 0x00001a57, 0x00001a57,
- 0x00001a61, 0x00001a61, 0x00001a63, 0x00001a64,
- 0x00001a6d, 0x00001a72, 0x00001b04, 0x00001b04,
- 0x00001b35, 0x00001b35, 0x00001b3b, 0x00001b3b,
- 0x00001b3d, 0x00001b41, 0x00001b43, 0x00001b44,
- 0x00001b82, 0x00001b82, 0x00001ba1, 0x00001ba1,
- 0x00001ba6, 0x00001ba7, 0x00001baa, 0x00001baa,
- 0x00001be7, 0x00001be7, 0x00001bea, 0x00001bec,
- 0x00001bee, 0x00001bee, 0x00001bf2, 0x00001bf3,
- 0x00001c24, 0x00001c2b, 0x00001c34, 0x00001c35,
- 0x00001ce1, 0x00001ce1, 0x00001cf2, 0x00001cf2,
+ 0x0001da00, 0x0001da36, 0x0001da3b, 0x0001da6c,
+ 0x0001da75, 0x0001da75, 0x0001da84, 0x0001da84,
+ 0x0001da9b, 0x0001da9f, 0x0001daa1, 0x0001daaf,
+ 0x0001e8d0, 0x0001e8d6, 0x000e0100, 0x000e01ef,
+ 0x00000903, 0x00000903, 0x0000093b, 0x0000093b,
+ 0x0000093e, 0x00000940, 0x00000949, 0x0000094c,
+ 0x0000094e, 0x0000094f, 0x00000982, 0x00000983,
+ 0x000009be, 0x000009c0, 0x000009c7, 0x000009c8,
+ 0x000009cb, 0x000009cc, 0x000009d7, 0x000009d7,
+ 0x00000a03, 0x00000a03, 0x00000a3e, 0x00000a40,
+ 0x00000a83, 0x00000a83, 0x00000abe, 0x00000ac0,
+ 0x00000ac9, 0x00000ac9, 0x00000acb, 0x00000acc,
+ 0x00000b02, 0x00000b03, 0x00000b3e, 0x00000b3e,
+ 0x00000b40, 0x00000b40, 0x00000b47, 0x00000b48,
+ 0x00000b4b, 0x00000b4c, 0x00000b57, 0x00000b57,
+ 0x00000bbe, 0x00000bbf, 0x00000bc1, 0x00000bc2,
+ 0x00000bc6, 0x00000bc8, 0x00000bca, 0x00000bcc,
+ 0x00000bd7, 0x00000bd7, 0x00000c01, 0x00000c03,
+ 0x00000c41, 0x00000c44, 0x00000c82, 0x00000c83,
+ 0x00000cbe, 0x00000cbe, 0x00000cc0, 0x00000cc4,
+ 0x00000cc7, 0x00000cc8, 0x00000cca, 0x00000ccb,
+ 0x00000cd5, 0x00000cd6, 0x00000d02, 0x00000d03,
+ 0x00000d3e, 0x00000d40, 0x00000d46, 0x00000d48,
+ 0x00000d4a, 0x00000d4c, 0x00000d57, 0x00000d57,
+ 0x00000d82, 0x00000d83, 0x00000dcf, 0x00000dd1,
+ 0x00000dd8, 0x00000ddf, 0x00000df2, 0x00000df3,
+ 0x00000f3e, 0x00000f3f, 0x00000f7f, 0x00000f7f,
+ 0x0000102b, 0x0000102c, 0x00001031, 0x00001031,
+ 0x00001038, 0x00001038, 0x0000103b, 0x0000103c,
+ 0x00001056, 0x00001057, 0x00001062, 0x00001064,
+ 0x00001067, 0x0000106d, 0x00001083, 0x00001084,
+ 0x00001087, 0x0000108c, 0x0000108f, 0x0000108f,
+ 0x0000109a, 0x0000109c, 0x000017b6, 0x000017b6,
+ 0x000017be, 0x000017c5, 0x000017c7, 0x000017c8,
+ 0x00001923, 0x00001926, 0x00001929, 0x0000192b,
+ 0x00001930, 0x00001931, 0x00001933, 0x00001938,
+ 0x00001a19, 0x00001a1a, 0x00001a55, 0x00001a55,
+ 0x00001a57, 0x00001a57, 0x00001a61, 0x00001a61,
+ 0x00001a63, 0x00001a64, 0x00001a6d, 0x00001a72,
+ 0x00001b04, 0x00001b04, 0x00001b35, 0x00001b35,
+ 0x00001b3b, 0x00001b3b, 0x00001b3d, 0x00001b41,
+ 0x00001b43, 0x00001b44, 0x00001b82, 0x00001b82,
+ 0x00001ba1, 0x00001ba1, 0x00001ba6, 0x00001ba7,
+ 0x00001baa, 0x00001baa, 0x00001be7, 0x00001be7,
+ 0x00001bea, 0x00001bec, 0x00001bee, 0x00001bee,
+ 0x00001bf2, 0x00001bf3, 0x00001c24, 0x00001c2b,
+ 0x00001c34, 0x00001c35, 0x00001ce1, 0x00001ce1,
+ 0x00001cf2, 0x00001cf3, 0x0000302e, 0x0000302f,
0x0000a823, 0x0000a824, 0x0000a827, 0x0000a827,
0x0000a880, 0x0000a881, 0x0000a8b4, 0x0000a8c3,
0x0000a952, 0x0000a953, 0x0000a983, 0x0000a983,
0x0000a9b4, 0x0000a9b5, 0x0000a9ba, 0x0000a9bb,
0x0000a9bd, 0x0000a9c0, 0x0000aa2f, 0x0000aa30,
0x0000aa33, 0x0000aa34, 0x0000aa4d, 0x0000aa4d,
- 0x0000aa7b, 0x0000aa7b, 0x0000abe3, 0x0000abe4,
+ 0x0000aa7b, 0x0000aa7b, 0x0000aa7d, 0x0000aa7d,
+ 0x0000aaeb, 0x0000aaeb, 0x0000aaee, 0x0000aaef,
+ 0x0000aaf5, 0x0000aaf5, 0x0000abe3, 0x0000abe4,
0x0000abe6, 0x0000abe7, 0x0000abe9, 0x0000abea,
0x0000abec, 0x0000abec, 0x00011000, 0x00011000,
0x00011002, 0x00011002, 0x00011082, 0x00011082,
0x000110b0, 0x000110b2, 0x000110b7, 0x000110b8,
- 0x0001d165, 0x0001d166, 0x0001d16d, 0x0001d172,
- 0x00000488, 0x00000489, 0x000020dd, 0x000020e0,
+ 0x0001112c, 0x0001112c, 0x00011182, 0x00011182,
+ 0x000111b3, 0x000111b5, 0x000111bf, 0x000111c0,
+ 0x0001122c, 0x0001122e, 0x00011232, 0x00011233,
+ 0x00011235, 0x00011235, 0x000112e0, 0x000112e2,
+ 0x00011302, 0x00011303, 0x0001133e, 0x0001133f,
+ 0x00011341, 0x00011344, 0x00011347, 0x00011348,
+ 0x0001134b, 0x0001134d, 0x00011357, 0x00011357,
+ 0x00011362, 0x00011363, 0x000114b0, 0x000114b2,
+ 0x000114b9, 0x000114b9, 0x000114bb, 0x000114be,
+ 0x000114c1, 0x000114c1, 0x000115af, 0x000115b1,
+ 0x000115b8, 0x000115bb, 0x000115be, 0x000115be,
+ 0x00011630, 0x00011632, 0x0001163b, 0x0001163c,
+ 0x0001163e, 0x0001163e, 0x000116ac, 0x000116ac,
+ 0x000116ae, 0x000116af, 0x000116b6, 0x000116b6,
+ 0x00011720, 0x00011721, 0x00011726, 0x00011726,
+ 0x00016f51, 0x00016f7e, 0x0001d165, 0x0001d166,
+ 0x0001d16d, 0x0001d172, 0x00000488, 0x00000489,
+ 0x00001abe, 0x00001abe, 0x000020dd, 0x000020e0,
0x000020e2, 0x000020e4, 0x0000a670, 0x0000a672,
0x00000030, 0x00000039, 0x00000660, 0x00000669,
0x000006f0, 0x000006f9, 0x000007c0, 0x000007c9,
@@ -189,135 +238,151 @@ static const unsigned int _ucprop_ranges[] = {
0x00000a66, 0x00000a6f, 0x00000ae6, 0x00000aef,
0x00000b66, 0x00000b6f, 0x00000be6, 0x00000bef,
0x00000c66, 0x00000c6f, 0x00000ce6, 0x00000cef,
- 0x00000d66, 0x00000d6f, 0x00000e50, 0x00000e59,
- 0x00000ed0, 0x00000ed9, 0x00000f20, 0x00000f29,
- 0x00001040, 0x00001049, 0x00001090, 0x00001099,
- 0x000017e0, 0x000017e9, 0x00001810, 0x00001819,
- 0x00001946, 0x0000194f, 0x000019d0, 0x000019d9,
- 0x00001a80, 0x00001a89, 0x00001a90, 0x00001a99,
- 0x00001b50, 0x00001b59, 0x00001bb0, 0x00001bb9,
- 0x00001c40, 0x00001c49, 0x00001c50, 0x00001c59,
- 0x0000a620, 0x0000a629, 0x0000a8d0, 0x0000a8d9,
- 0x0000a900, 0x0000a909, 0x0000a9d0, 0x0000a9d9,
+ 0x00000d66, 0x00000d6f, 0x00000de6, 0x00000def,
+ 0x00000e50, 0x00000e59, 0x00000ed0, 0x00000ed9,
+ 0x00000f20, 0x00000f29, 0x00001040, 0x00001049,
+ 0x00001090, 0x00001099, 0x000017e0, 0x000017e9,
+ 0x00001810, 0x00001819, 0x00001946, 0x0000194f,
+ 0x000019d0, 0x000019d9, 0x00001a80, 0x00001a89,
+ 0x00001a90, 0x00001a99, 0x00001b50, 0x00001b59,
+ 0x00001bb0, 0x00001bb9, 0x00001c40, 0x00001c49,
+ 0x00001c50, 0x00001c59, 0x0000a620, 0x0000a629,
+ 0x0000a8d0, 0x0000a8d9, 0x0000a900, 0x0000a909,
+ 0x0000a9d0, 0x0000a9d9, 0x0000a9f0, 0x0000a9f9,
0x0000aa50, 0x0000aa59, 0x0000abf0, 0x0000abf9,
0x0000ff10, 0x0000ff19, 0x000104a0, 0x000104a9,
- 0x00011066, 0x0001106f, 0x0001d7ce, 0x0001d7ff,
- 0x000016ee, 0x000016f0, 0x00002160, 0x00002182,
- 0x00002185, 0x00002188, 0x00003007, 0x00003007,
- 0x00003021, 0x00003029, 0x00003038, 0x0000303a,
- 0x0000a6e6, 0x0000a6ef, 0x00010140, 0x00010174,
- 0x00010341, 0x00010341, 0x0001034a, 0x0001034a,
- 0x000103d1, 0x000103d5, 0x00012400, 0x00012462,
- 0x000000b2, 0x000000b3, 0x000000b9, 0x000000b9,
- 0x000000bc, 0x000000be, 0x000009f4, 0x000009f9,
- 0x00000b72, 0x00000b77, 0x00000bf0, 0x00000bf2,
- 0x00000c78, 0x00000c7e, 0x00000d70, 0x00000d75,
- 0x00000f2a, 0x00000f33, 0x00001369, 0x0000137c,
- 0x000017f0, 0x000017f9, 0x000019da, 0x000019da,
- 0x00002070, 0x00002070, 0x00002074, 0x00002079,
- 0x00002080, 0x00002089, 0x00002150, 0x0000215f,
- 0x00002189, 0x00002189, 0x00002460, 0x0000249b,
- 0x000024ea, 0x000024ff, 0x00002776, 0x00002793,
- 0x00002cfd, 0x00002cfd, 0x00003192, 0x00003195,
- 0x00003220, 0x00003229, 0x00003251, 0x0000325f,
+ 0x00011066, 0x0001106f, 0x000110f0, 0x000110f9,
+ 0x00011136, 0x0001113f, 0x000111d0, 0x000111d9,
+ 0x000112f0, 0x000112f9, 0x000114d0, 0x000114d9,
+ 0x00011650, 0x00011659, 0x000116c0, 0x000116c9,
+ 0x00011730, 0x00011739, 0x000118e0, 0x000118e9,
+ 0x00016a60, 0x00016a69, 0x00016b50, 0x00016b59,
+ 0x0001d7ce, 0x0001d7ff, 0x000016ee, 0x000016f0,
+ 0x00002160, 0x00002182, 0x00002185, 0x00002188,
+ 0x00003007, 0x00003007, 0x00003021, 0x00003029,
+ 0x00003038, 0x0000303a, 0x0000a6e6, 0x0000a6ef,
+ 0x00010140, 0x00010174, 0x00010341, 0x00010341,
+ 0x0001034a, 0x0001034a, 0x000103d1, 0x000103d5,
+ 0x00012400, 0x0001246e, 0x000000b2, 0x000000b3,
+ 0x000000b9, 0x000000b9, 0x000000bc, 0x000000be,
+ 0x000009f4, 0x000009f9, 0x00000b72, 0x00000b77,
+ 0x00000bf0, 0x00000bf2, 0x00000c78, 0x00000c7e,
+ 0x00000d70, 0x00000d75, 0x00000f2a, 0x00000f33,
+ 0x00001369, 0x0000137c, 0x000017f0, 0x000017f9,
+ 0x000019da, 0x000019da, 0x00002070, 0x00002070,
+ 0x00002074, 0x00002079, 0x00002080, 0x00002089,
+ 0x00002150, 0x0000215f, 0x00002189, 0x00002189,
+ 0x00002460, 0x0000249b, 0x000024ea, 0x000024ff,
+ 0x00002776, 0x00002793, 0x00002cfd, 0x00002cfd,
+ 0x00003192, 0x00003195, 0x00003220, 0x00003229,
+ 0x00003248, 0x0000324f, 0x00003251, 0x0000325f,
0x00003280, 0x00003289, 0x000032b1, 0x000032bf,
0x0000a830, 0x0000a835, 0x00010107, 0x00010133,
- 0x00010175, 0x00010178, 0x0001018a, 0x0001018a,
- 0x00010320, 0x00010323, 0x00010858, 0x0001085f,
- 0x00010916, 0x0001091b, 0x00010a40, 0x00010a47,
- 0x00010a7d, 0x00010a7e, 0x00010b58, 0x00010b5f,
- 0x00010b78, 0x00010b7f, 0x00010e60, 0x00010e7e,
- 0x00011052, 0x00011065, 0x0001d360, 0x0001d371,
- 0x0001f100, 0x0001f10a, 0x00000020, 0x00000020,
+ 0x00010175, 0x00010178, 0x0001018a, 0x0001018b,
+ 0x000102e1, 0x000102fb, 0x00010320, 0x00010323,
+ 0x00010858, 0x0001085f, 0x00010879, 0x0001087f,
+ 0x000108a7, 0x000108af, 0x000108fb, 0x000108ff,
+ 0x00010916, 0x0001091b, 0x000109bc, 0x000109bd,
+ 0x000109c0, 0x000109cf, 0x000109d2, 0x000109ff,
+ 0x00010a40, 0x00010a47, 0x00010a7d, 0x00010a7e,
+ 0x00010a9d, 0x00010a9f, 0x00010aeb, 0x00010aef,
+ 0x00010b58, 0x00010b5f, 0x00010b78, 0x00010b7f,
+ 0x00010ba9, 0x00010baf, 0x00010cfa, 0x00010cff,
+ 0x00010e60, 0x00010e7e, 0x00011052, 0x00011065,
+ 0x000111e1, 0x000111f4, 0x0001173a, 0x0001173b,
+ 0x000118ea, 0x000118f2, 0x00016b5b, 0x00016b61,
+ 0x0001d360, 0x0001d371, 0x0001e8c7, 0x0001e8cf,
+ 0x0001f100, 0x0001f10c, 0x00000020, 0x00000020,
0x000000a0, 0x000000a0, 0x00001680, 0x00001680,
- 0x0000180e, 0x0000180e, 0x00002000, 0x0000200a,
- 0x0000202f, 0x0000202f, 0x0000205f, 0x0000205f,
- 0x00003000, 0x00003000, 0x00002028, 0x00002028,
- 0x00002029, 0x00002029, 0x00000000, 0x0000001f,
- 0x0000007f, 0x0000009f, 0x000000ad, 0x000000ad,
- 0x00000600, 0x00000603, 0x000006dd, 0x000006dd,
- 0x0000070f, 0x0000070f, 0x000017b4, 0x000017b5,
+ 0x00002000, 0x0000200a, 0x0000202f, 0x0000202f,
+ 0x0000205f, 0x0000205f, 0x00003000, 0x00003000,
+ 0x00002028, 0x00002028, 0x00002029, 0x00002029,
+ 0x00000000, 0x0000001f, 0x0000007f, 0x0000009f,
+ 0x000000ad, 0x000000ad, 0x00000600, 0x00000605,
+ 0x0000061c, 0x0000061c, 0x000006dd, 0x000006dd,
+ 0x0000070f, 0x0000070f, 0x0000180e, 0x0000180e,
0x0000200b, 0x0000200f, 0x0000202a, 0x0000202e,
- 0x00002060, 0x00002064, 0x0000206a, 0x0000206f,
+ 0x00002060, 0x00002064, 0x00002066, 0x0000206f,
0x0000feff, 0x0000feff, 0x0000fff9, 0x0000fffb,
- 0x000110bd, 0x000110bd, 0x0001d173, 0x0001d17a,
- 0x000e0001, 0x000e0001, 0x000e0020, 0x000e007f,
- 0x00010000, 0x0010ffff, 0x0000e000, 0x0000f8ff,
- 0x000f0000, 0x000ffffd, 0x00100000, 0x0010fffd,
- 0x00000041, 0x0000005a, 0x000000c0, 0x000000d6,
- 0x000000d8, 0x000000de, 0x00000100, 0x00000100,
- 0x00000102, 0x00000102, 0x00000104, 0x00000104,
- 0x00000106, 0x00000106, 0x00000108, 0x00000108,
- 0x0000010a, 0x0000010a, 0x0000010c, 0x0000010c,
- 0x0000010e, 0x0000010e, 0x00000110, 0x00000110,
- 0x00000112, 0x00000112, 0x00000114, 0x00000114,
- 0x00000116, 0x00000116, 0x00000118, 0x00000118,
- 0x0000011a, 0x0000011a, 0x0000011c, 0x0000011c,
- 0x0000011e, 0x0000011e, 0x00000120, 0x00000120,
- 0x00000122, 0x00000122, 0x00000124, 0x00000124,
- 0x00000126, 0x00000126, 0x00000128, 0x00000128,
- 0x0000012a, 0x0000012a, 0x0000012c, 0x0000012c,
- 0x0000012e, 0x0000012e, 0x00000130, 0x00000130,
- 0x00000132, 0x00000132, 0x00000134, 0x00000134,
- 0x00000136, 0x00000136, 0x00000139, 0x00000139,
- 0x0000013b, 0x0000013b, 0x0000013d, 0x0000013d,
- 0x0000013f, 0x0000013f, 0x00000141, 0x00000141,
- 0x00000143, 0x00000143, 0x00000145, 0x00000145,
- 0x00000147, 0x00000147, 0x0000014a, 0x0000014a,
- 0x0000014c, 0x0000014c, 0x0000014e, 0x0000014e,
- 0x00000150, 0x00000150, 0x00000152, 0x00000152,
- 0x00000154, 0x00000154, 0x00000156, 0x00000156,
- 0x00000158, 0x00000158, 0x0000015a, 0x0000015a,
- 0x0000015c, 0x0000015c, 0x0000015e, 0x0000015e,
- 0x00000160, 0x00000160, 0x00000162, 0x00000162,
- 0x00000164, 0x00000164, 0x00000166, 0x00000166,
- 0x00000168, 0x00000168, 0x0000016a, 0x0000016a,
- 0x0000016c, 0x0000016c, 0x0000016e, 0x0000016e,
- 0x00000170, 0x00000170, 0x00000172, 0x00000172,
- 0x00000174, 0x00000174, 0x00000176, 0x00000176,
- 0x00000178, 0x00000179, 0x0000017b, 0x0000017b,
- 0x0000017d, 0x0000017d, 0x00000181, 0x00000182,
- 0x00000184, 0x00000184, 0x00000186, 0x00000187,
- 0x00000189, 0x0000018b, 0x0000018e, 0x00000191,
- 0x00000193, 0x00000194, 0x00000196, 0x00000198,
- 0x0000019c, 0x0000019d, 0x0000019f, 0x000001a0,
- 0x000001a2, 0x000001a2, 0x000001a4, 0x000001a4,
- 0x000001a6, 0x000001a7, 0x000001a9, 0x000001a9,
- 0x000001ac, 0x000001ac, 0x000001ae, 0x000001af,
- 0x000001b1, 0x000001b3, 0x000001b5, 0x000001b5,
- 0x000001b7, 0x000001b8, 0x000001bc, 0x000001bc,
- 0x000001c4, 0x000001c4, 0x000001c7, 0x000001c7,
- 0x000001ca, 0x000001ca, 0x000001cd, 0x000001cd,
- 0x000001cf, 0x000001cf, 0x000001d1, 0x000001d1,
- 0x000001d3, 0x000001d3, 0x000001d5, 0x000001d5,
- 0x000001d7, 0x000001d7, 0x000001d9, 0x000001d9,
- 0x000001db, 0x000001db, 0x000001de, 0x000001de,
- 0x000001e0, 0x000001e0, 0x000001e2, 0x000001e2,
- 0x000001e4, 0x000001e4, 0x000001e6, 0x000001e6,
- 0x000001e8, 0x000001e8, 0x000001ea, 0x000001ea,
- 0x000001ec, 0x000001ec, 0x000001ee, 0x000001ee,
- 0x000001f1, 0x000001f1, 0x000001f4, 0x000001f4,
- 0x000001f6, 0x000001f8, 0x000001fa, 0x000001fa,
- 0x000001fc, 0x000001fc, 0x000001fe, 0x000001fe,
- 0x00000200, 0x00000200, 0x00000202, 0x00000202,
- 0x00000204, 0x00000204, 0x00000206, 0x00000206,
- 0x00000208, 0x00000208, 0x0000020a, 0x0000020a,
- 0x0000020c, 0x0000020c, 0x0000020e, 0x0000020e,
- 0x00000210, 0x00000210, 0x00000212, 0x00000212,
- 0x00000214, 0x00000214, 0x00000216, 0x00000216,
- 0x00000218, 0x00000218, 0x0000021a, 0x0000021a,
- 0x0000021c, 0x0000021c, 0x0000021e, 0x0000021e,
- 0x00000220, 0x00000220, 0x00000222, 0x00000222,
- 0x00000224, 0x00000224, 0x00000226, 0x00000226,
- 0x00000228, 0x00000228, 0x0000022a, 0x0000022a,
- 0x0000022c, 0x0000022c, 0x0000022e, 0x0000022e,
- 0x00000230, 0x00000230, 0x00000232, 0x00000232,
- 0x0000023a, 0x0000023b, 0x0000023d, 0x0000023e,
- 0x00000241, 0x00000241, 0x00000243, 0x00000246,
- 0x00000248, 0x00000248, 0x0000024a, 0x0000024a,
- 0x0000024c, 0x0000024c, 0x0000024e, 0x0000024e,
- 0x00000370, 0x00000370, 0x00000372, 0x00000372,
- 0x00000376, 0x00000376, 0x00000386, 0x00000386,
+ 0x000110bd, 0x000110bd, 0x0001bca0, 0x0001bca3,
+ 0x0001d173, 0x0001d17a, 0x000e0001, 0x000e0001,
+ 0x000e0020, 0x000e007f, 0x00010000, 0x0010ffff,
+ 0x0000e000, 0x0000f8ff, 0x000f0000, 0x000ffffd,
+ 0x00100000, 0x0010fffd, 0x00000041, 0x0000005a,
+ 0x000000c0, 0x000000d6, 0x000000d8, 0x000000de,
+ 0x00000100, 0x00000100, 0x00000102, 0x00000102,
+ 0x00000104, 0x00000104, 0x00000106, 0x00000106,
+ 0x00000108, 0x00000108, 0x0000010a, 0x0000010a,
+ 0x0000010c, 0x0000010c, 0x0000010e, 0x0000010e,
+ 0x00000110, 0x00000110, 0x00000112, 0x00000112,
+ 0x00000114, 0x00000114, 0x00000116, 0x00000116,
+ 0x00000118, 0x00000118, 0x0000011a, 0x0000011a,
+ 0x0000011c, 0x0000011c, 0x0000011e, 0x0000011e,
+ 0x00000120, 0x00000120, 0x00000122, 0x00000122,
+ 0x00000124, 0x00000124, 0x00000126, 0x00000126,
+ 0x00000128, 0x00000128, 0x0000012a, 0x0000012a,
+ 0x0000012c, 0x0000012c, 0x0000012e, 0x0000012e,
+ 0x00000130, 0x00000130, 0x00000132, 0x00000132,
+ 0x00000134, 0x00000134, 0x00000136, 0x00000136,
+ 0x00000139, 0x00000139, 0x0000013b, 0x0000013b,
+ 0x0000013d, 0x0000013d, 0x0000013f, 0x0000013f,
+ 0x00000141, 0x00000141, 0x00000143, 0x00000143,
+ 0x00000145, 0x00000145, 0x00000147, 0x00000147,
+ 0x0000014a, 0x0000014a, 0x0000014c, 0x0000014c,
+ 0x0000014e, 0x0000014e, 0x00000150, 0x00000150,
+ 0x00000152, 0x00000152, 0x00000154, 0x00000154,
+ 0x00000156, 0x00000156, 0x00000158, 0x00000158,
+ 0x0000015a, 0x0000015a, 0x0000015c, 0x0000015c,
+ 0x0000015e, 0x0000015e, 0x00000160, 0x00000160,
+ 0x00000162, 0x00000162, 0x00000164, 0x00000164,
+ 0x00000166, 0x00000166, 0x00000168, 0x00000168,
+ 0x0000016a, 0x0000016a, 0x0000016c, 0x0000016c,
+ 0x0000016e, 0x0000016e, 0x00000170, 0x00000170,
+ 0x00000172, 0x00000172, 0x00000174, 0x00000174,
+ 0x00000176, 0x00000176, 0x00000178, 0x00000179,
+ 0x0000017b, 0x0000017b, 0x0000017d, 0x0000017d,
+ 0x00000181, 0x00000182, 0x00000184, 0x00000184,
+ 0x00000186, 0x00000187, 0x00000189, 0x0000018b,
+ 0x0000018e, 0x00000191, 0x00000193, 0x00000194,
+ 0x00000196, 0x00000198, 0x0000019c, 0x0000019d,
+ 0x0000019f, 0x000001a0, 0x000001a2, 0x000001a2,
+ 0x000001a4, 0x000001a4, 0x000001a6, 0x000001a7,
+ 0x000001a9, 0x000001a9, 0x000001ac, 0x000001ac,
+ 0x000001ae, 0x000001af, 0x000001b1, 0x000001b3,
+ 0x000001b5, 0x000001b5, 0x000001b7, 0x000001b8,
+ 0x000001bc, 0x000001bc, 0x000001c4, 0x000001c4,
+ 0x000001c7, 0x000001c7, 0x000001ca, 0x000001ca,
+ 0x000001cd, 0x000001cd, 0x000001cf, 0x000001cf,
+ 0x000001d1, 0x000001d1, 0x000001d3, 0x000001d3,
+ 0x000001d5, 0x000001d5, 0x000001d7, 0x000001d7,
+ 0x000001d9, 0x000001d9, 0x000001db, 0x000001db,
+ 0x000001de, 0x000001de, 0x000001e0, 0x000001e0,
+ 0x000001e2, 0x000001e2, 0x000001e4, 0x000001e4,
+ 0x000001e6, 0x000001e6, 0x000001e8, 0x000001e8,
+ 0x000001ea, 0x000001ea, 0x000001ec, 0x000001ec,
+ 0x000001ee, 0x000001ee, 0x000001f1, 0x000001f1,
+ 0x000001f4, 0x000001f4, 0x000001f6, 0x000001f8,
+ 0x000001fa, 0x000001fa, 0x000001fc, 0x000001fc,
+ 0x000001fe, 0x000001fe, 0x00000200, 0x00000200,
+ 0x00000202, 0x00000202, 0x00000204, 0x00000204,
+ 0x00000206, 0x00000206, 0x00000208, 0x00000208,
+ 0x0000020a, 0x0000020a, 0x0000020c, 0x0000020c,
+ 0x0000020e, 0x0000020e, 0x00000210, 0x00000210,
+ 0x00000212, 0x00000212, 0x00000214, 0x00000214,
+ 0x00000216, 0x00000216, 0x00000218, 0x00000218,
+ 0x0000021a, 0x0000021a, 0x0000021c, 0x0000021c,
+ 0x0000021e, 0x0000021e, 0x00000220, 0x00000220,
+ 0x00000222, 0x00000222, 0x00000224, 0x00000224,
+ 0x00000226, 0x00000226, 0x00000228, 0x00000228,
+ 0x0000022a, 0x0000022a, 0x0000022c, 0x0000022c,
+ 0x0000022e, 0x0000022e, 0x00000230, 0x00000230,
+ 0x00000232, 0x00000232, 0x0000023a, 0x0000023b,
+ 0x0000023d, 0x0000023e, 0x00000241, 0x00000241,
+ 0x00000243, 0x00000246, 0x00000248, 0x00000248,
+ 0x0000024a, 0x0000024a, 0x0000024c, 0x0000024c,
+ 0x0000024e, 0x0000024e, 0x00000370, 0x00000370,
+ 0x00000372, 0x00000372, 0x00000376, 0x00000376,
+ 0x0000037f, 0x0000037f, 0x00000386, 0x00000386,
0x00000388, 0x0000038a, 0x0000038c, 0x0000038c,
0x0000038e, 0x0000038f, 0x00000391, 0x000003a1,
0x000003a3, 0x000003ab, 0x000003cf, 0x000003cf,
@@ -377,114 +442,118 @@ static const unsigned int _ucprop_ranges[] = {
0x0000051c, 0x0000051c, 0x0000051e, 0x0000051e,
0x00000520, 0x00000520, 0x00000522, 0x00000522,
0x00000524, 0x00000524, 0x00000526, 0x00000526,
+ 0x00000528, 0x00000528, 0x0000052a, 0x0000052a,
+ 0x0000052c, 0x0000052c, 0x0000052e, 0x0000052e,
0x00000531, 0x00000556, 0x000010a0, 0x000010c5,
- 0x00001e00, 0x00001e00, 0x00001e02, 0x00001e02,
- 0x00001e04, 0x00001e04, 0x00001e06, 0x00001e06,
- 0x00001e08, 0x00001e08, 0x00001e0a, 0x00001e0a,
- 0x00001e0c, 0x00001e0c, 0x00001e0e, 0x00001e0e,
- 0x00001e10, 0x00001e10, 0x00001e12, 0x00001e12,
- 0x00001e14, 0x00001e14, 0x00001e16, 0x00001e16,
- 0x00001e18, 0x00001e18, 0x00001e1a, 0x00001e1a,
- 0x00001e1c, 0x00001e1c, 0x00001e1e, 0x00001e1e,
- 0x00001e20, 0x00001e20, 0x00001e22, 0x00001e22,
- 0x00001e24, 0x00001e24, 0x00001e26, 0x00001e26,
- 0x00001e28, 0x00001e28, 0x00001e2a, 0x00001e2a,
- 0x00001e2c, 0x00001e2c, 0x00001e2e, 0x00001e2e,
- 0x00001e30, 0x00001e30, 0x00001e32, 0x00001e32,
- 0x00001e34, 0x00001e34, 0x00001e36, 0x00001e36,
- 0x00001e38, 0x00001e38, 0x00001e3a, 0x00001e3a,
- 0x00001e3c, 0x00001e3c, 0x00001e3e, 0x00001e3e,
- 0x00001e40, 0x00001e40, 0x00001e42, 0x00001e42,
- 0x00001e44, 0x00001e44, 0x00001e46, 0x00001e46,
- 0x00001e48, 0x00001e48, 0x00001e4a, 0x00001e4a,
- 0x00001e4c, 0x00001e4c, 0x00001e4e, 0x00001e4e,
- 0x00001e50, 0x00001e50, 0x00001e52, 0x00001e52,
- 0x00001e54, 0x00001e54, 0x00001e56, 0x00001e56,
- 0x00001e58, 0x00001e58, 0x00001e5a, 0x00001e5a,
- 0x00001e5c, 0x00001e5c, 0x00001e5e, 0x00001e5e,
- 0x00001e60, 0x00001e60, 0x00001e62, 0x00001e62,
- 0x00001e64, 0x00001e64, 0x00001e66, 0x00001e66,
- 0x00001e68, 0x00001e68, 0x00001e6a, 0x00001e6a,
- 0x00001e6c, 0x00001e6c, 0x00001e6e, 0x00001e6e,
- 0x00001e70, 0x00001e70, 0x00001e72, 0x00001e72,
- 0x00001e74, 0x00001e74, 0x00001e76, 0x00001e76,
- 0x00001e78, 0x00001e78, 0x00001e7a, 0x00001e7a,
- 0x00001e7c, 0x00001e7c, 0x00001e7e, 0x00001e7e,
- 0x00001e80, 0x00001e80, 0x00001e82, 0x00001e82,
- 0x00001e84, 0x00001e84, 0x00001e86, 0x00001e86,
- 0x00001e88, 0x00001e88, 0x00001e8a, 0x00001e8a,
- 0x00001e8c, 0x00001e8c, 0x00001e8e, 0x00001e8e,
- 0x00001e90, 0x00001e90, 0x00001e92, 0x00001e92,
- 0x00001e94, 0x00001e94, 0x00001e9e, 0x00001e9e,
- 0x00001ea0, 0x00001ea0, 0x00001ea2, 0x00001ea2,
- 0x00001ea4, 0x00001ea4, 0x00001ea6, 0x00001ea6,
- 0x00001ea8, 0x00001ea8, 0x00001eaa, 0x00001eaa,
- 0x00001eac, 0x00001eac, 0x00001eae, 0x00001eae,
- 0x00001eb0, 0x00001eb0, 0x00001eb2, 0x00001eb2,
- 0x00001eb4, 0x00001eb4, 0x00001eb6, 0x00001eb6,
- 0x00001eb8, 0x00001eb8, 0x00001eba, 0x00001eba,
- 0x00001ebc, 0x00001ebc, 0x00001ebe, 0x00001ebe,
- 0x00001ec0, 0x00001ec0, 0x00001ec2, 0x00001ec2,
- 0x00001ec4, 0x00001ec4, 0x00001ec6, 0x00001ec6,
- 0x00001ec8, 0x00001ec8, 0x00001eca, 0x00001eca,
- 0x00001ecc, 0x00001ecc, 0x00001ece, 0x00001ece,
- 0x00001ed0, 0x00001ed0, 0x00001ed2, 0x00001ed2,
- 0x00001ed4, 0x00001ed4, 0x00001ed6, 0x00001ed6,
- 0x00001ed8, 0x00001ed8, 0x00001eda, 0x00001eda,
- 0x00001edc, 0x00001edc, 0x00001ede, 0x00001ede,
- 0x00001ee0, 0x00001ee0, 0x00001ee2, 0x00001ee2,
- 0x00001ee4, 0x00001ee4, 0x00001ee6, 0x00001ee6,
- 0x00001ee8, 0x00001ee8, 0x00001eea, 0x00001eea,
- 0x00001eec, 0x00001eec, 0x00001eee, 0x00001eee,
- 0x00001ef0, 0x00001ef0, 0x00001ef2, 0x00001ef2,
- 0x00001ef4, 0x00001ef4, 0x00001ef6, 0x00001ef6,
- 0x00001ef8, 0x00001ef8, 0x00001efa, 0x00001efa,
- 0x00001efc, 0x00001efc, 0x00001efe, 0x00001efe,
- 0x00001f08, 0x00001f0f, 0x00001f18, 0x00001f1d,
- 0x00001f28, 0x00001f2f, 0x00001f38, 0x00001f3f,
- 0x00001f48, 0x00001f4d, 0x00001f59, 0x00001f59,
- 0x00001f5b, 0x00001f5b, 0x00001f5d, 0x00001f5d,
- 0x00001f5f, 0x00001f5f, 0x00001f68, 0x00001f6f,
- 0x00001fb8, 0x00001fbb, 0x00001fc8, 0x00001fcb,
- 0x00001fd8, 0x00001fdb, 0x00001fe8, 0x00001fec,
- 0x00001ff8, 0x00001ffb, 0x00002102, 0x00002102,
- 0x00002107, 0x00002107, 0x0000210b, 0x0000210d,
- 0x00002110, 0x00002112, 0x00002115, 0x00002115,
- 0x00002119, 0x0000211d, 0x00002124, 0x00002124,
- 0x00002126, 0x00002126, 0x00002128, 0x00002128,
- 0x0000212a, 0x0000212d, 0x00002130, 0x00002133,
- 0x0000213e, 0x0000213f, 0x00002145, 0x00002145,
- 0x00002183, 0x00002183, 0x00002c00, 0x00002c2e,
- 0x00002c60, 0x00002c60, 0x00002c62, 0x00002c64,
- 0x00002c67, 0x00002c67, 0x00002c69, 0x00002c69,
- 0x00002c6b, 0x00002c6b, 0x00002c6d, 0x00002c70,
- 0x00002c72, 0x00002c72, 0x00002c75, 0x00002c75,
- 0x00002c7e, 0x00002c80, 0x00002c82, 0x00002c82,
- 0x00002c84, 0x00002c84, 0x00002c86, 0x00002c86,
- 0x00002c88, 0x00002c88, 0x00002c8a, 0x00002c8a,
- 0x00002c8c, 0x00002c8c, 0x00002c8e, 0x00002c8e,
- 0x00002c90, 0x00002c90, 0x00002c92, 0x00002c92,
- 0x00002c94, 0x00002c94, 0x00002c96, 0x00002c96,
- 0x00002c98, 0x00002c98, 0x00002c9a, 0x00002c9a,
- 0x00002c9c, 0x00002c9c, 0x00002c9e, 0x00002c9e,
- 0x00002ca0, 0x00002ca0, 0x00002ca2, 0x00002ca2,
- 0x00002ca4, 0x00002ca4, 0x00002ca6, 0x00002ca6,
- 0x00002ca8, 0x00002ca8, 0x00002caa, 0x00002caa,
- 0x00002cac, 0x00002cac, 0x00002cae, 0x00002cae,
- 0x00002cb0, 0x00002cb0, 0x00002cb2, 0x00002cb2,
- 0x00002cb4, 0x00002cb4, 0x00002cb6, 0x00002cb6,
- 0x00002cb8, 0x00002cb8, 0x00002cba, 0x00002cba,
- 0x00002cbc, 0x00002cbc, 0x00002cbe, 0x00002cbe,
- 0x00002cc0, 0x00002cc0, 0x00002cc2, 0x00002cc2,
- 0x00002cc4, 0x00002cc4, 0x00002cc6, 0x00002cc6,
- 0x00002cc8, 0x00002cc8, 0x00002cca, 0x00002cca,
- 0x00002ccc, 0x00002ccc, 0x00002cce, 0x00002cce,
- 0x00002cd0, 0x00002cd0, 0x00002cd2, 0x00002cd2,
- 0x00002cd4, 0x00002cd4, 0x00002cd6, 0x00002cd6,
- 0x00002cd8, 0x00002cd8, 0x00002cda, 0x00002cda,
- 0x00002cdc, 0x00002cdc, 0x00002cde, 0x00002cde,
- 0x00002ce0, 0x00002ce0, 0x00002ce2, 0x00002ce2,
- 0x00002ceb, 0x00002ceb, 0x00002ced, 0x00002ced,
+ 0x000010c7, 0x000010c7, 0x000010cd, 0x000010cd,
+ 0x000013a0, 0x000013f5, 0x00001e00, 0x00001e00,
+ 0x00001e02, 0x00001e02, 0x00001e04, 0x00001e04,
+ 0x00001e06, 0x00001e06, 0x00001e08, 0x00001e08,
+ 0x00001e0a, 0x00001e0a, 0x00001e0c, 0x00001e0c,
+ 0x00001e0e, 0x00001e0e, 0x00001e10, 0x00001e10,
+ 0x00001e12, 0x00001e12, 0x00001e14, 0x00001e14,
+ 0x00001e16, 0x00001e16, 0x00001e18, 0x00001e18,
+ 0x00001e1a, 0x00001e1a, 0x00001e1c, 0x00001e1c,
+ 0x00001e1e, 0x00001e1e, 0x00001e20, 0x00001e20,
+ 0x00001e22, 0x00001e22, 0x00001e24, 0x00001e24,
+ 0x00001e26, 0x00001e26, 0x00001e28, 0x00001e28,
+ 0x00001e2a, 0x00001e2a, 0x00001e2c, 0x00001e2c,
+ 0x00001e2e, 0x00001e2e, 0x00001e30, 0x00001e30,
+ 0x00001e32, 0x00001e32, 0x00001e34, 0x00001e34,
+ 0x00001e36, 0x00001e36, 0x00001e38, 0x00001e38,
+ 0x00001e3a, 0x00001e3a, 0x00001e3c, 0x00001e3c,
+ 0x00001e3e, 0x00001e3e, 0x00001e40, 0x00001e40,
+ 0x00001e42, 0x00001e42, 0x00001e44, 0x00001e44,
+ 0x00001e46, 0x00001e46, 0x00001e48, 0x00001e48,
+ 0x00001e4a, 0x00001e4a, 0x00001e4c, 0x00001e4c,
+ 0x00001e4e, 0x00001e4e, 0x00001e50, 0x00001e50,
+ 0x00001e52, 0x00001e52, 0x00001e54, 0x00001e54,
+ 0x00001e56, 0x00001e56, 0x00001e58, 0x00001e58,
+ 0x00001e5a, 0x00001e5a, 0x00001e5c, 0x00001e5c,
+ 0x00001e5e, 0x00001e5e, 0x00001e60, 0x00001e60,
+ 0x00001e62, 0x00001e62, 0x00001e64, 0x00001e64,
+ 0x00001e66, 0x00001e66, 0x00001e68, 0x00001e68,
+ 0x00001e6a, 0x00001e6a, 0x00001e6c, 0x00001e6c,
+ 0x00001e6e, 0x00001e6e, 0x00001e70, 0x00001e70,
+ 0x00001e72, 0x00001e72, 0x00001e74, 0x00001e74,
+ 0x00001e76, 0x00001e76, 0x00001e78, 0x00001e78,
+ 0x00001e7a, 0x00001e7a, 0x00001e7c, 0x00001e7c,
+ 0x00001e7e, 0x00001e7e, 0x00001e80, 0x00001e80,
+ 0x00001e82, 0x00001e82, 0x00001e84, 0x00001e84,
+ 0x00001e86, 0x00001e86, 0x00001e88, 0x00001e88,
+ 0x00001e8a, 0x00001e8a, 0x00001e8c, 0x00001e8c,
+ 0x00001e8e, 0x00001e8e, 0x00001e90, 0x00001e90,
+ 0x00001e92, 0x00001e92, 0x00001e94, 0x00001e94,
+ 0x00001e9e, 0x00001e9e, 0x00001ea0, 0x00001ea0,
+ 0x00001ea2, 0x00001ea2, 0x00001ea4, 0x00001ea4,
+ 0x00001ea6, 0x00001ea6, 0x00001ea8, 0x00001ea8,
+ 0x00001eaa, 0x00001eaa, 0x00001eac, 0x00001eac,
+ 0x00001eae, 0x00001eae, 0x00001eb0, 0x00001eb0,
+ 0x00001eb2, 0x00001eb2, 0x00001eb4, 0x00001eb4,
+ 0x00001eb6, 0x00001eb6, 0x00001eb8, 0x00001eb8,
+ 0x00001eba, 0x00001eba, 0x00001ebc, 0x00001ebc,
+ 0x00001ebe, 0x00001ebe, 0x00001ec0, 0x00001ec0,
+ 0x00001ec2, 0x00001ec2, 0x00001ec4, 0x00001ec4,
+ 0x00001ec6, 0x00001ec6, 0x00001ec8, 0x00001ec8,
+ 0x00001eca, 0x00001eca, 0x00001ecc, 0x00001ecc,
+ 0x00001ece, 0x00001ece, 0x00001ed0, 0x00001ed0,
+ 0x00001ed2, 0x00001ed2, 0x00001ed4, 0x00001ed4,
+ 0x00001ed6, 0x00001ed6, 0x00001ed8, 0x00001ed8,
+ 0x00001eda, 0x00001eda, 0x00001edc, 0x00001edc,
+ 0x00001ede, 0x00001ede, 0x00001ee0, 0x00001ee0,
+ 0x00001ee2, 0x00001ee2, 0x00001ee4, 0x00001ee4,
+ 0x00001ee6, 0x00001ee6, 0x00001ee8, 0x00001ee8,
+ 0x00001eea, 0x00001eea, 0x00001eec, 0x00001eec,
+ 0x00001eee, 0x00001eee, 0x00001ef0, 0x00001ef0,
+ 0x00001ef2, 0x00001ef2, 0x00001ef4, 0x00001ef4,
+ 0x00001ef6, 0x00001ef6, 0x00001ef8, 0x00001ef8,
+ 0x00001efa, 0x00001efa, 0x00001efc, 0x00001efc,
+ 0x00001efe, 0x00001efe, 0x00001f08, 0x00001f0f,
+ 0x00001f18, 0x00001f1d, 0x00001f28, 0x00001f2f,
+ 0x00001f38, 0x00001f3f, 0x00001f48, 0x00001f4d,
+ 0x00001f59, 0x00001f59, 0x00001f5b, 0x00001f5b,
+ 0x00001f5d, 0x00001f5d, 0x00001f5f, 0x00001f5f,
+ 0x00001f68, 0x00001f6f, 0x00001fb8, 0x00001fbb,
+ 0x00001fc8, 0x00001fcb, 0x00001fd8, 0x00001fdb,
+ 0x00001fe8, 0x00001fec, 0x00001ff8, 0x00001ffb,
+ 0x00002102, 0x00002102, 0x00002107, 0x00002107,
+ 0x0000210b, 0x0000210d, 0x00002110, 0x00002112,
+ 0x00002115, 0x00002115, 0x00002119, 0x0000211d,
+ 0x00002124, 0x00002124, 0x00002126, 0x00002126,
+ 0x00002128, 0x00002128, 0x0000212a, 0x0000212d,
+ 0x00002130, 0x00002133, 0x0000213e, 0x0000213f,
+ 0x00002145, 0x00002145, 0x00002183, 0x00002183,
+ 0x00002c00, 0x00002c2e, 0x00002c60, 0x00002c60,
+ 0x00002c62, 0x00002c64, 0x00002c67, 0x00002c67,
+ 0x00002c69, 0x00002c69, 0x00002c6b, 0x00002c6b,
+ 0x00002c6d, 0x00002c70, 0x00002c72, 0x00002c72,
+ 0x00002c75, 0x00002c75, 0x00002c7e, 0x00002c80,
+ 0x00002c82, 0x00002c82, 0x00002c84, 0x00002c84,
+ 0x00002c86, 0x00002c86, 0x00002c88, 0x00002c88,
+ 0x00002c8a, 0x00002c8a, 0x00002c8c, 0x00002c8c,
+ 0x00002c8e, 0x00002c8e, 0x00002c90, 0x00002c90,
+ 0x00002c92, 0x00002c92, 0x00002c94, 0x00002c94,
+ 0x00002c96, 0x00002c96, 0x00002c98, 0x00002c98,
+ 0x00002c9a, 0x00002c9a, 0x00002c9c, 0x00002c9c,
+ 0x00002c9e, 0x00002c9e, 0x00002ca0, 0x00002ca0,
+ 0x00002ca2, 0x00002ca2, 0x00002ca4, 0x00002ca4,
+ 0x00002ca6, 0x00002ca6, 0x00002ca8, 0x00002ca8,
+ 0x00002caa, 0x00002caa, 0x00002cac, 0x00002cac,
+ 0x00002cae, 0x00002cae, 0x00002cb0, 0x00002cb0,
+ 0x00002cb2, 0x00002cb2, 0x00002cb4, 0x00002cb4,
+ 0x00002cb6, 0x00002cb6, 0x00002cb8, 0x00002cb8,
+ 0x00002cba, 0x00002cba, 0x00002cbc, 0x00002cbc,
+ 0x00002cbe, 0x00002cbe, 0x00002cc0, 0x00002cc0,
+ 0x00002cc2, 0x00002cc2, 0x00002cc4, 0x00002cc4,
+ 0x00002cc6, 0x00002cc6, 0x00002cc8, 0x00002cc8,
+ 0x00002cca, 0x00002cca, 0x00002ccc, 0x00002ccc,
+ 0x00002cce, 0x00002cce, 0x00002cd0, 0x00002cd0,
+ 0x00002cd2, 0x00002cd2, 0x00002cd4, 0x00002cd4,
+ 0x00002cd6, 0x00002cd6, 0x00002cd8, 0x00002cd8,
+ 0x00002cda, 0x00002cda, 0x00002cdc, 0x00002cdc,
+ 0x00002cde, 0x00002cde, 0x00002ce0, 0x00002ce0,
+ 0x00002ce2, 0x00002ce2, 0x00002ceb, 0x00002ceb,
+ 0x00002ced, 0x00002ced, 0x00002cf2, 0x00002cf2,
0x0000a640, 0x0000a640, 0x0000a642, 0x0000a642,
0x0000a644, 0x0000a644, 0x0000a646, 0x0000a646,
0x0000a648, 0x0000a648, 0x0000a64a, 0x0000a64a,
@@ -502,7 +571,8 @@ static const unsigned int _ucprop_ranges[] = {
0x0000a68a, 0x0000a68a, 0x0000a68c, 0x0000a68c,
0x0000a68e, 0x0000a68e, 0x0000a690, 0x0000a690,
0x0000a692, 0x0000a692, 0x0000a694, 0x0000a694,
- 0x0000a696, 0x0000a696, 0x0000a722, 0x0000a722,
+ 0x0000a696, 0x0000a696, 0x0000a698, 0x0000a698,
+ 0x0000a69a, 0x0000a69a, 0x0000a722, 0x0000a722,
0x0000a724, 0x0000a724, 0x0000a726, 0x0000a726,
0x0000a728, 0x0000a728, 0x0000a72a, 0x0000a72a,
0x0000a72c, 0x0000a72c, 0x0000a72e, 0x0000a72e,
@@ -526,161 +596,168 @@ static const unsigned int _ucprop_ranges[] = {
0x0000a780, 0x0000a780, 0x0000a782, 0x0000a782,
0x0000a784, 0x0000a784, 0x0000a786, 0x0000a786,
0x0000a78b, 0x0000a78b, 0x0000a78d, 0x0000a78d,
- 0x0000a790, 0x0000a790, 0x0000a7a0, 0x0000a7a0,
+ 0x0000a790, 0x0000a790, 0x0000a792, 0x0000a792,
+ 0x0000a796, 0x0000a796, 0x0000a798, 0x0000a798,
+ 0x0000a79a, 0x0000a79a, 0x0000a79c, 0x0000a79c,
+ 0x0000a79e, 0x0000a79e, 0x0000a7a0, 0x0000a7a0,
0x0000a7a2, 0x0000a7a2, 0x0000a7a4, 0x0000a7a4,
0x0000a7a6, 0x0000a7a6, 0x0000a7a8, 0x0000a7a8,
- 0x0000ff21, 0x0000ff3a, 0x00010400, 0x00010427,
- 0x0001d400, 0x0001d419, 0x0001d434, 0x0001d44d,
- 0x0001d468, 0x0001d481, 0x0001d49c, 0x0001d49c,
- 0x0001d49e, 0x0001d49f, 0x0001d4a2, 0x0001d4a2,
- 0x0001d4a5, 0x0001d4a6, 0x0001d4a9, 0x0001d4ac,
- 0x0001d4ae, 0x0001d4b5, 0x0001d4d0, 0x0001d4e9,
- 0x0001d504, 0x0001d505, 0x0001d507, 0x0001d50a,
- 0x0001d50d, 0x0001d514, 0x0001d516, 0x0001d51c,
- 0x0001d538, 0x0001d539, 0x0001d53b, 0x0001d53e,
- 0x0001d540, 0x0001d544, 0x0001d546, 0x0001d546,
- 0x0001d54a, 0x0001d550, 0x0001d56c, 0x0001d585,
- 0x0001d5a0, 0x0001d5b9, 0x0001d5d4, 0x0001d5ed,
- 0x0001d608, 0x0001d621, 0x0001d63c, 0x0001d655,
- 0x0001d670, 0x0001d689, 0x0001d6a8, 0x0001d6c0,
- 0x0001d6e2, 0x0001d6fa, 0x0001d71c, 0x0001d734,
- 0x0001d756, 0x0001d76e, 0x0001d790, 0x0001d7a8,
- 0x0001d7ca, 0x0001d7ca, 0x00000061, 0x0000007a,
- 0x000000aa, 0x000000aa, 0x000000b5, 0x000000b5,
- 0x000000ba, 0x000000ba, 0x000000df, 0x000000f6,
- 0x000000f8, 0x000000ff, 0x00000101, 0x00000101,
- 0x00000103, 0x00000103, 0x00000105, 0x00000105,
- 0x00000107, 0x00000107, 0x00000109, 0x00000109,
- 0x0000010b, 0x0000010b, 0x0000010d, 0x0000010d,
- 0x0000010f, 0x0000010f, 0x00000111, 0x00000111,
- 0x00000113, 0x00000113, 0x00000115, 0x00000115,
- 0x00000117, 0x00000117, 0x00000119, 0x00000119,
- 0x0000011b, 0x0000011b, 0x0000011d, 0x0000011d,
- 0x0000011f, 0x0000011f, 0x00000121, 0x00000121,
- 0x00000123, 0x00000123, 0x00000125, 0x00000125,
- 0x00000127, 0x00000127, 0x00000129, 0x00000129,
- 0x0000012b, 0x0000012b, 0x0000012d, 0x0000012d,
- 0x0000012f, 0x0000012f, 0x00000131, 0x00000131,
- 0x00000133, 0x00000133, 0x00000135, 0x00000135,
- 0x00000137, 0x00000138, 0x0000013a, 0x0000013a,
- 0x0000013c, 0x0000013c, 0x0000013e, 0x0000013e,
- 0x00000140, 0x00000140, 0x00000142, 0x00000142,
- 0x00000144, 0x00000144, 0x00000146, 0x00000146,
- 0x00000148, 0x00000149, 0x0000014b, 0x0000014b,
- 0x0000014d, 0x0000014d, 0x0000014f, 0x0000014f,
- 0x00000151, 0x00000151, 0x00000153, 0x00000153,
- 0x00000155, 0x00000155, 0x00000157, 0x00000157,
- 0x00000159, 0x00000159, 0x0000015b, 0x0000015b,
- 0x0000015d, 0x0000015d, 0x0000015f, 0x0000015f,
- 0x00000161, 0x00000161, 0x00000163, 0x00000163,
- 0x00000165, 0x00000165, 0x00000167, 0x00000167,
- 0x00000169, 0x00000169, 0x0000016b, 0x0000016b,
- 0x0000016d, 0x0000016d, 0x0000016f, 0x0000016f,
- 0x00000171, 0x00000171, 0x00000173, 0x00000173,
- 0x00000175, 0x00000175, 0x00000177, 0x00000177,
- 0x0000017a, 0x0000017a, 0x0000017c, 0x0000017c,
- 0x0000017e, 0x00000180, 0x00000183, 0x00000183,
- 0x00000185, 0x00000185, 0x00000188, 0x00000188,
- 0x0000018c, 0x0000018d, 0x00000192, 0x00000192,
- 0x00000195, 0x00000195, 0x00000199, 0x0000019b,
- 0x0000019e, 0x0000019e, 0x000001a1, 0x000001a1,
- 0x000001a3, 0x000001a3, 0x000001a5, 0x000001a5,
- 0x000001a8, 0x000001a8, 0x000001aa, 0x000001ab,
- 0x000001ad, 0x000001ad, 0x000001b0, 0x000001b0,
- 0x000001b4, 0x000001b4, 0x000001b6, 0x000001b6,
- 0x000001b9, 0x000001ba, 0x000001bd, 0x000001bf,
- 0x000001c6, 0x000001c6, 0x000001c9, 0x000001c9,
- 0x000001cc, 0x000001cc, 0x000001ce, 0x000001ce,
- 0x000001d0, 0x000001d0, 0x000001d2, 0x000001d2,
- 0x000001d4, 0x000001d4, 0x000001d6, 0x000001d6,
- 0x000001d8, 0x000001d8, 0x000001da, 0x000001da,
- 0x000001dc, 0x000001dd, 0x000001df, 0x000001df,
- 0x000001e1, 0x000001e1, 0x000001e3, 0x000001e3,
- 0x000001e5, 0x000001e5, 0x000001e7, 0x000001e7,
- 0x000001e9, 0x000001e9, 0x000001eb, 0x000001eb,
- 0x000001ed, 0x000001ed, 0x000001ef, 0x000001f0,
- 0x000001f3, 0x000001f3, 0x000001f5, 0x000001f5,
- 0x000001f9, 0x000001f9, 0x000001fb, 0x000001fb,
- 0x000001fd, 0x000001fd, 0x000001ff, 0x000001ff,
- 0x00000201, 0x00000201, 0x00000203, 0x00000203,
- 0x00000205, 0x00000205, 0x00000207, 0x00000207,
- 0x00000209, 0x00000209, 0x0000020b, 0x0000020b,
- 0x0000020d, 0x0000020d, 0x0000020f, 0x0000020f,
- 0x00000211, 0x00000211, 0x00000213, 0x00000213,
- 0x00000215, 0x00000215, 0x00000217, 0x00000217,
- 0x00000219, 0x00000219, 0x0000021b, 0x0000021b,
- 0x0000021d, 0x0000021d, 0x0000021f, 0x0000021f,
- 0x00000221, 0x00000221, 0x00000223, 0x00000223,
- 0x00000225, 0x00000225, 0x00000227, 0x00000227,
- 0x00000229, 0x00000229, 0x0000022b, 0x0000022b,
- 0x0000022d, 0x0000022d, 0x0000022f, 0x0000022f,
- 0x00000231, 0x00000231, 0x00000233, 0x00000239,
- 0x0000023c, 0x0000023c, 0x0000023f, 0x00000240,
- 0x00000242, 0x00000242, 0x00000247, 0x00000247,
- 0x00000249, 0x00000249, 0x0000024b, 0x0000024b,
- 0x0000024d, 0x0000024d, 0x0000024f, 0x00000293,
- 0x00000295, 0x000002af, 0x00000371, 0x00000371,
- 0x00000373, 0x00000373, 0x00000377, 0x00000377,
- 0x0000037b, 0x0000037d, 0x00000390, 0x00000390,
- 0x000003ac, 0x000003ce, 0x000003d0, 0x000003d1,
- 0x000003d5, 0x000003d7, 0x000003d9, 0x000003d9,
- 0x000003db, 0x000003db, 0x000003dd, 0x000003dd,
- 0x000003df, 0x000003df, 0x000003e1, 0x000003e1,
- 0x000003e3, 0x000003e3, 0x000003e5, 0x000003e5,
- 0x000003e7, 0x000003e7, 0x000003e9, 0x000003e9,
- 0x000003eb, 0x000003eb, 0x000003ed, 0x000003ed,
- 0x000003ef, 0x000003f3, 0x000003f5, 0x000003f5,
- 0x000003f8, 0x000003f8, 0x000003fb, 0x000003fc,
- 0x00000430, 0x0000045f, 0x00000461, 0x00000461,
- 0x00000463, 0x00000463, 0x00000465, 0x00000465,
- 0x00000467, 0x00000467, 0x00000469, 0x00000469,
- 0x0000046b, 0x0000046b, 0x0000046d, 0x0000046d,
- 0x0000046f, 0x0000046f, 0x00000471, 0x00000471,
- 0x00000473, 0x00000473, 0x00000475, 0x00000475,
- 0x00000477, 0x00000477, 0x00000479, 0x00000479,
- 0x0000047b, 0x0000047b, 0x0000047d, 0x0000047d,
- 0x0000047f, 0x0000047f, 0x00000481, 0x00000481,
- 0x0000048b, 0x0000048b, 0x0000048d, 0x0000048d,
- 0x0000048f, 0x0000048f, 0x00000491, 0x00000491,
- 0x00000493, 0x00000493, 0x00000495, 0x00000495,
- 0x00000497, 0x00000497, 0x00000499, 0x00000499,
- 0x0000049b, 0x0000049b, 0x0000049d, 0x0000049d,
- 0x0000049f, 0x0000049f, 0x000004a1, 0x000004a1,
- 0x000004a3, 0x000004a3, 0x000004a5, 0x000004a5,
- 0x000004a7, 0x000004a7, 0x000004a9, 0x000004a9,
- 0x000004ab, 0x000004ab, 0x000004ad, 0x000004ad,
- 0x000004af, 0x000004af, 0x000004b1, 0x000004b1,
- 0x000004b3, 0x000004b3, 0x000004b5, 0x000004b5,
- 0x000004b7, 0x000004b7, 0x000004b9, 0x000004b9,
- 0x000004bb, 0x000004bb, 0x000004bd, 0x000004bd,
- 0x000004bf, 0x000004bf, 0x000004c2, 0x000004c2,
- 0x000004c4, 0x000004c4, 0x000004c6, 0x000004c6,
- 0x000004c8, 0x000004c8, 0x000004ca, 0x000004ca,
- 0x000004cc, 0x000004cc, 0x000004ce, 0x000004cf,
- 0x000004d1, 0x000004d1, 0x000004d3, 0x000004d3,
- 0x000004d5, 0x000004d5, 0x000004d7, 0x000004d7,
- 0x000004d9, 0x000004d9, 0x000004db, 0x000004db,
- 0x000004dd, 0x000004dd, 0x000004df, 0x000004df,
- 0x000004e1, 0x000004e1, 0x000004e3, 0x000004e3,
- 0x000004e5, 0x000004e5, 0x000004e7, 0x000004e7,
- 0x000004e9, 0x000004e9, 0x000004eb, 0x000004eb,
- 0x000004ed, 0x000004ed, 0x000004ef, 0x000004ef,
- 0x000004f1, 0x000004f1, 0x000004f3, 0x000004f3,
- 0x000004f5, 0x000004f5, 0x000004f7, 0x000004f7,
- 0x000004f9, 0x000004f9, 0x000004fb, 0x000004fb,
- 0x000004fd, 0x000004fd, 0x000004ff, 0x000004ff,
- 0x00000501, 0x00000501, 0x00000503, 0x00000503,
- 0x00000505, 0x00000505, 0x00000507, 0x00000507,
- 0x00000509, 0x00000509, 0x0000050b, 0x0000050b,
- 0x0000050d, 0x0000050d, 0x0000050f, 0x0000050f,
- 0x00000511, 0x00000511, 0x00000513, 0x00000513,
- 0x00000515, 0x00000515, 0x00000517, 0x00000517,
- 0x00000519, 0x00000519, 0x0000051b, 0x0000051b,
- 0x0000051d, 0x0000051d, 0x0000051f, 0x0000051f,
- 0x00000521, 0x00000521, 0x00000523, 0x00000523,
- 0x00000525, 0x00000525, 0x00000527, 0x00000527,
- 0x00000561, 0x00000587, 0x00001d00, 0x00001d2b,
- 0x00001d62, 0x00001d77, 0x00001d79, 0x00001d9a,
+ 0x0000a7aa, 0x0000a7ad, 0x0000a7b0, 0x0000a7b4,
+ 0x0000a7b6, 0x0000a7b6, 0x0000ff21, 0x0000ff3a,
+ 0x00010400, 0x00010427, 0x00010c80, 0x00010cb2,
+ 0x000118a0, 0x000118bf, 0x0001d400, 0x0001d419,
+ 0x0001d434, 0x0001d44d, 0x0001d468, 0x0001d481,
+ 0x0001d49c, 0x0001d49c, 0x0001d49e, 0x0001d49f,
+ 0x0001d4a2, 0x0001d4a2, 0x0001d4a5, 0x0001d4a6,
+ 0x0001d4a9, 0x0001d4ac, 0x0001d4ae, 0x0001d4b5,
+ 0x0001d4d0, 0x0001d4e9, 0x0001d504, 0x0001d505,
+ 0x0001d507, 0x0001d50a, 0x0001d50d, 0x0001d514,
+ 0x0001d516, 0x0001d51c, 0x0001d538, 0x0001d539,
+ 0x0001d53b, 0x0001d53e, 0x0001d540, 0x0001d544,
+ 0x0001d546, 0x0001d546, 0x0001d54a, 0x0001d550,
+ 0x0001d56c, 0x0001d585, 0x0001d5a0, 0x0001d5b9,
+ 0x0001d5d4, 0x0001d5ed, 0x0001d608, 0x0001d621,
+ 0x0001d63c, 0x0001d655, 0x0001d670, 0x0001d689,
+ 0x0001d6a8, 0x0001d6c0, 0x0001d6e2, 0x0001d6fa,
+ 0x0001d71c, 0x0001d734, 0x0001d756, 0x0001d76e,
+ 0x0001d790, 0x0001d7a8, 0x0001d7ca, 0x0001d7ca,
+ 0x00000061, 0x0000007a, 0x000000b5, 0x000000b5,
+ 0x000000df, 0x000000f6, 0x000000f8, 0x000000ff,
+ 0x00000101, 0x00000101, 0x00000103, 0x00000103,
+ 0x00000105, 0x00000105, 0x00000107, 0x00000107,
+ 0x00000109, 0x00000109, 0x0000010b, 0x0000010b,
+ 0x0000010d, 0x0000010d, 0x0000010f, 0x0000010f,
+ 0x00000111, 0x00000111, 0x00000113, 0x00000113,
+ 0x00000115, 0x00000115, 0x00000117, 0x00000117,
+ 0x00000119, 0x00000119, 0x0000011b, 0x0000011b,
+ 0x0000011d, 0x0000011d, 0x0000011f, 0x0000011f,
+ 0x00000121, 0x00000121, 0x00000123, 0x00000123,
+ 0x00000125, 0x00000125, 0x00000127, 0x00000127,
+ 0x00000129, 0x00000129, 0x0000012b, 0x0000012b,
+ 0x0000012d, 0x0000012d, 0x0000012f, 0x0000012f,
+ 0x00000131, 0x00000131, 0x00000133, 0x00000133,
+ 0x00000135, 0x00000135, 0x00000137, 0x00000138,
+ 0x0000013a, 0x0000013a, 0x0000013c, 0x0000013c,
+ 0x0000013e, 0x0000013e, 0x00000140, 0x00000140,
+ 0x00000142, 0x00000142, 0x00000144, 0x00000144,
+ 0x00000146, 0x00000146, 0x00000148, 0x00000149,
+ 0x0000014b, 0x0000014b, 0x0000014d, 0x0000014d,
+ 0x0000014f, 0x0000014f, 0x00000151, 0x00000151,
+ 0x00000153, 0x00000153, 0x00000155, 0x00000155,
+ 0x00000157, 0x00000157, 0x00000159, 0x00000159,
+ 0x0000015b, 0x0000015b, 0x0000015d, 0x0000015d,
+ 0x0000015f, 0x0000015f, 0x00000161, 0x00000161,
+ 0x00000163, 0x00000163, 0x00000165, 0x00000165,
+ 0x00000167, 0x00000167, 0x00000169, 0x00000169,
+ 0x0000016b, 0x0000016b, 0x0000016d, 0x0000016d,
+ 0x0000016f, 0x0000016f, 0x00000171, 0x00000171,
+ 0x00000173, 0x00000173, 0x00000175, 0x00000175,
+ 0x00000177, 0x00000177, 0x0000017a, 0x0000017a,
+ 0x0000017c, 0x0000017c, 0x0000017e, 0x00000180,
+ 0x00000183, 0x00000183, 0x00000185, 0x00000185,
+ 0x00000188, 0x00000188, 0x0000018c, 0x0000018d,
+ 0x00000192, 0x00000192, 0x00000195, 0x00000195,
+ 0x00000199, 0x0000019b, 0x0000019e, 0x0000019e,
+ 0x000001a1, 0x000001a1, 0x000001a3, 0x000001a3,
+ 0x000001a5, 0x000001a5, 0x000001a8, 0x000001a8,
+ 0x000001aa, 0x000001ab, 0x000001ad, 0x000001ad,
+ 0x000001b0, 0x000001b0, 0x000001b4, 0x000001b4,
+ 0x000001b6, 0x000001b6, 0x000001b9, 0x000001ba,
+ 0x000001bd, 0x000001bf, 0x000001c6, 0x000001c6,
+ 0x000001c9, 0x000001c9, 0x000001cc, 0x000001cc,
+ 0x000001ce, 0x000001ce, 0x000001d0, 0x000001d0,
+ 0x000001d2, 0x000001d2, 0x000001d4, 0x000001d4,
+ 0x000001d6, 0x000001d6, 0x000001d8, 0x000001d8,
+ 0x000001da, 0x000001da, 0x000001dc, 0x000001dd,
+ 0x000001df, 0x000001df, 0x000001e1, 0x000001e1,
+ 0x000001e3, 0x000001e3, 0x000001e5, 0x000001e5,
+ 0x000001e7, 0x000001e7, 0x000001e9, 0x000001e9,
+ 0x000001eb, 0x000001eb, 0x000001ed, 0x000001ed,
+ 0x000001ef, 0x000001f0, 0x000001f3, 0x000001f3,
+ 0x000001f5, 0x000001f5, 0x000001f9, 0x000001f9,
+ 0x000001fb, 0x000001fb, 0x000001fd, 0x000001fd,
+ 0x000001ff, 0x000001ff, 0x00000201, 0x00000201,
+ 0x00000203, 0x00000203, 0x00000205, 0x00000205,
+ 0x00000207, 0x00000207, 0x00000209, 0x00000209,
+ 0x0000020b, 0x0000020b, 0x0000020d, 0x0000020d,
+ 0x0000020f, 0x0000020f, 0x00000211, 0x00000211,
+ 0x00000213, 0x00000213, 0x00000215, 0x00000215,
+ 0x00000217, 0x00000217, 0x00000219, 0x00000219,
+ 0x0000021b, 0x0000021b, 0x0000021d, 0x0000021d,
+ 0x0000021f, 0x0000021f, 0x00000221, 0x00000221,
+ 0x00000223, 0x00000223, 0x00000225, 0x00000225,
+ 0x00000227, 0x00000227, 0x00000229, 0x00000229,
+ 0x0000022b, 0x0000022b, 0x0000022d, 0x0000022d,
+ 0x0000022f, 0x0000022f, 0x00000231, 0x00000231,
+ 0x00000233, 0x00000239, 0x0000023c, 0x0000023c,
+ 0x0000023f, 0x00000240, 0x00000242, 0x00000242,
+ 0x00000247, 0x00000247, 0x00000249, 0x00000249,
+ 0x0000024b, 0x0000024b, 0x0000024d, 0x0000024d,
+ 0x0000024f, 0x00000293, 0x00000295, 0x000002af,
+ 0x00000371, 0x00000371, 0x00000373, 0x00000373,
+ 0x00000377, 0x00000377, 0x0000037b, 0x0000037d,
+ 0x00000390, 0x00000390, 0x000003ac, 0x000003ce,
+ 0x000003d0, 0x000003d1, 0x000003d5, 0x000003d7,
+ 0x000003d9, 0x000003d9, 0x000003db, 0x000003db,
+ 0x000003dd, 0x000003dd, 0x000003df, 0x000003df,
+ 0x000003e1, 0x000003e1, 0x000003e3, 0x000003e3,
+ 0x000003e5, 0x000003e5, 0x000003e7, 0x000003e7,
+ 0x000003e9, 0x000003e9, 0x000003eb, 0x000003eb,
+ 0x000003ed, 0x000003ed, 0x000003ef, 0x000003f3,
+ 0x000003f5, 0x000003f5, 0x000003f8, 0x000003f8,
+ 0x000003fb, 0x000003fc, 0x00000430, 0x0000045f,
+ 0x00000461, 0x00000461, 0x00000463, 0x00000463,
+ 0x00000465, 0x00000465, 0x00000467, 0x00000467,
+ 0x00000469, 0x00000469, 0x0000046b, 0x0000046b,
+ 0x0000046d, 0x0000046d, 0x0000046f, 0x0000046f,
+ 0x00000471, 0x00000471, 0x00000473, 0x00000473,
+ 0x00000475, 0x00000475, 0x00000477, 0x00000477,
+ 0x00000479, 0x00000479, 0x0000047b, 0x0000047b,
+ 0x0000047d, 0x0000047d, 0x0000047f, 0x0000047f,
+ 0x00000481, 0x00000481, 0x0000048b, 0x0000048b,
+ 0x0000048d, 0x0000048d, 0x0000048f, 0x0000048f,
+ 0x00000491, 0x00000491, 0x00000493, 0x00000493,
+ 0x00000495, 0x00000495, 0x00000497, 0x00000497,
+ 0x00000499, 0x00000499, 0x0000049b, 0x0000049b,
+ 0x0000049d, 0x0000049d, 0x0000049f, 0x0000049f,
+ 0x000004a1, 0x000004a1, 0x000004a3, 0x000004a3,
+ 0x000004a5, 0x000004a5, 0x000004a7, 0x000004a7,
+ 0x000004a9, 0x000004a9, 0x000004ab, 0x000004ab,
+ 0x000004ad, 0x000004ad, 0x000004af, 0x000004af,
+ 0x000004b1, 0x000004b1, 0x000004b3, 0x000004b3,
+ 0x000004b5, 0x000004b5, 0x000004b7, 0x000004b7,
+ 0x000004b9, 0x000004b9, 0x000004bb, 0x000004bb,
+ 0x000004bd, 0x000004bd, 0x000004bf, 0x000004bf,
+ 0x000004c2, 0x000004c2, 0x000004c4, 0x000004c4,
+ 0x000004c6, 0x000004c6, 0x000004c8, 0x000004c8,
+ 0x000004ca, 0x000004ca, 0x000004cc, 0x000004cc,
+ 0x000004ce, 0x000004cf, 0x000004d1, 0x000004d1,
+ 0x000004d3, 0x000004d3, 0x000004d5, 0x000004d5,
+ 0x000004d7, 0x000004d7, 0x000004d9, 0x000004d9,
+ 0x000004db, 0x000004db, 0x000004dd, 0x000004dd,
+ 0x000004df, 0x000004df, 0x000004e1, 0x000004e1,
+ 0x000004e3, 0x000004e3, 0x000004e5, 0x000004e5,
+ 0x000004e7, 0x000004e7, 0x000004e9, 0x000004e9,
+ 0x000004eb, 0x000004eb, 0x000004ed, 0x000004ed,
+ 0x000004ef, 0x000004ef, 0x000004f1, 0x000004f1,
+ 0x000004f3, 0x000004f3, 0x000004f5, 0x000004f5,
+ 0x000004f7, 0x000004f7, 0x000004f9, 0x000004f9,
+ 0x000004fb, 0x000004fb, 0x000004fd, 0x000004fd,
+ 0x000004ff, 0x000004ff, 0x00000501, 0x00000501,
+ 0x00000503, 0x00000503, 0x00000505, 0x00000505,
+ 0x00000507, 0x00000507, 0x00000509, 0x00000509,
+ 0x0000050b, 0x0000050b, 0x0000050d, 0x0000050d,
+ 0x0000050f, 0x0000050f, 0x00000511, 0x00000511,
+ 0x00000513, 0x00000513, 0x00000515, 0x00000515,
+ 0x00000517, 0x00000517, 0x00000519, 0x00000519,
+ 0x0000051b, 0x0000051b, 0x0000051d, 0x0000051d,
+ 0x0000051f, 0x0000051f, 0x00000521, 0x00000521,
+ 0x00000523, 0x00000523, 0x00000525, 0x00000525,
+ 0x00000527, 0x00000527, 0x00000529, 0x00000529,
+ 0x0000052b, 0x0000052b, 0x0000052d, 0x0000052d,
+ 0x0000052f, 0x0000052f, 0x00000561, 0x00000587,
+ 0x000013f8, 0x000013fd, 0x00001d00, 0x00001d2b,
+ 0x00001d6b, 0x00001d77, 0x00001d79, 0x00001d9a,
0x00001e01, 0x00001e01, 0x00001e03, 0x00001e03,
0x00001e05, 0x00001e05, 0x00001e07, 0x00001e07,
0x00001e09, 0x00001e09, 0x00001e0b, 0x00001e0b,
@@ -762,7 +839,7 @@ static const unsigned int _ucprop_ranges[] = {
0x00002c65, 0x00002c66, 0x00002c68, 0x00002c68,
0x00002c6a, 0x00002c6a, 0x00002c6c, 0x00002c6c,
0x00002c71, 0x00002c71, 0x00002c73, 0x00002c74,
- 0x00002c76, 0x00002c7c, 0x00002c81, 0x00002c81,
+ 0x00002c76, 0x00002c7b, 0x00002c81, 0x00002c81,
0x00002c83, 0x00002c83, 0x00002c85, 0x00002c85,
0x00002c87, 0x00002c87, 0x00002c89, 0x00002c89,
0x00002c8b, 0x00002c8b, 0x00002c8d, 0x00002c8d,
@@ -788,54 +865,63 @@ static const unsigned int _ucprop_ranges[] = {
0x00002cdb, 0x00002cdb, 0x00002cdd, 0x00002cdd,
0x00002cdf, 0x00002cdf, 0x00002ce1, 0x00002ce1,
0x00002ce3, 0x00002ce4, 0x00002cec, 0x00002cec,
- 0x00002cee, 0x00002cee, 0x00002d00, 0x00002d25,
- 0x0000a641, 0x0000a641, 0x0000a643, 0x0000a643,
- 0x0000a645, 0x0000a645, 0x0000a647, 0x0000a647,
- 0x0000a649, 0x0000a649, 0x0000a64b, 0x0000a64b,
- 0x0000a64d, 0x0000a64d, 0x0000a64f, 0x0000a64f,
- 0x0000a651, 0x0000a651, 0x0000a653, 0x0000a653,
- 0x0000a655, 0x0000a655, 0x0000a657, 0x0000a657,
- 0x0000a659, 0x0000a659, 0x0000a65b, 0x0000a65b,
- 0x0000a65d, 0x0000a65d, 0x0000a65f, 0x0000a65f,
- 0x0000a661, 0x0000a661, 0x0000a663, 0x0000a663,
- 0x0000a665, 0x0000a665, 0x0000a667, 0x0000a667,
- 0x0000a669, 0x0000a669, 0x0000a66b, 0x0000a66b,
- 0x0000a66d, 0x0000a66d, 0x0000a681, 0x0000a681,
- 0x0000a683, 0x0000a683, 0x0000a685, 0x0000a685,
- 0x0000a687, 0x0000a687, 0x0000a689, 0x0000a689,
- 0x0000a68b, 0x0000a68b, 0x0000a68d, 0x0000a68d,
- 0x0000a68f, 0x0000a68f, 0x0000a691, 0x0000a691,
- 0x0000a693, 0x0000a693, 0x0000a695, 0x0000a695,
- 0x0000a697, 0x0000a697, 0x0000a723, 0x0000a723,
- 0x0000a725, 0x0000a725, 0x0000a727, 0x0000a727,
- 0x0000a729, 0x0000a729, 0x0000a72b, 0x0000a72b,
- 0x0000a72d, 0x0000a72d, 0x0000a72f, 0x0000a731,
- 0x0000a733, 0x0000a733, 0x0000a735, 0x0000a735,
- 0x0000a737, 0x0000a737, 0x0000a739, 0x0000a739,
- 0x0000a73b, 0x0000a73b, 0x0000a73d, 0x0000a73d,
- 0x0000a73f, 0x0000a73f, 0x0000a741, 0x0000a741,
- 0x0000a743, 0x0000a743, 0x0000a745, 0x0000a745,
- 0x0000a747, 0x0000a747, 0x0000a749, 0x0000a749,
- 0x0000a74b, 0x0000a74b, 0x0000a74d, 0x0000a74d,
- 0x0000a74f, 0x0000a74f, 0x0000a751, 0x0000a751,
- 0x0000a753, 0x0000a753, 0x0000a755, 0x0000a755,
- 0x0000a757, 0x0000a757, 0x0000a759, 0x0000a759,
- 0x0000a75b, 0x0000a75b, 0x0000a75d, 0x0000a75d,
- 0x0000a75f, 0x0000a75f, 0x0000a761, 0x0000a761,
- 0x0000a763, 0x0000a763, 0x0000a765, 0x0000a765,
- 0x0000a767, 0x0000a767, 0x0000a769, 0x0000a769,
- 0x0000a76b, 0x0000a76b, 0x0000a76d, 0x0000a76d,
- 0x0000a76f, 0x0000a76f, 0x0000a771, 0x0000a778,
- 0x0000a77a, 0x0000a77a, 0x0000a77c, 0x0000a77c,
- 0x0000a77f, 0x0000a77f, 0x0000a781, 0x0000a781,
- 0x0000a783, 0x0000a783, 0x0000a785, 0x0000a785,
- 0x0000a787, 0x0000a787, 0x0000a78c, 0x0000a78c,
- 0x0000a78e, 0x0000a78e, 0x0000a791, 0x0000a791,
- 0x0000a7a1, 0x0000a7a1, 0x0000a7a3, 0x0000a7a3,
- 0x0000a7a5, 0x0000a7a5, 0x0000a7a7, 0x0000a7a7,
- 0x0000a7a9, 0x0000a7a9, 0x0000a7fa, 0x0000a7fa,
+ 0x00002cee, 0x00002cee, 0x00002cf3, 0x00002cf3,
+ 0x00002d00, 0x00002d25, 0x00002d27, 0x00002d27,
+ 0x00002d2d, 0x00002d2d, 0x0000a641, 0x0000a641,
+ 0x0000a643, 0x0000a643, 0x0000a645, 0x0000a645,
+ 0x0000a647, 0x0000a647, 0x0000a649, 0x0000a649,
+ 0x0000a64b, 0x0000a64b, 0x0000a64d, 0x0000a64d,
+ 0x0000a64f, 0x0000a64f, 0x0000a651, 0x0000a651,
+ 0x0000a653, 0x0000a653, 0x0000a655, 0x0000a655,
+ 0x0000a657, 0x0000a657, 0x0000a659, 0x0000a659,
+ 0x0000a65b, 0x0000a65b, 0x0000a65d, 0x0000a65d,
+ 0x0000a65f, 0x0000a65f, 0x0000a661, 0x0000a661,
+ 0x0000a663, 0x0000a663, 0x0000a665, 0x0000a665,
+ 0x0000a667, 0x0000a667, 0x0000a669, 0x0000a669,
+ 0x0000a66b, 0x0000a66b, 0x0000a66d, 0x0000a66d,
+ 0x0000a681, 0x0000a681, 0x0000a683, 0x0000a683,
+ 0x0000a685, 0x0000a685, 0x0000a687, 0x0000a687,
+ 0x0000a689, 0x0000a689, 0x0000a68b, 0x0000a68b,
+ 0x0000a68d, 0x0000a68d, 0x0000a68f, 0x0000a68f,
+ 0x0000a691, 0x0000a691, 0x0000a693, 0x0000a693,
+ 0x0000a695, 0x0000a695, 0x0000a697, 0x0000a697,
+ 0x0000a699, 0x0000a699, 0x0000a69b, 0x0000a69b,
+ 0x0000a723, 0x0000a723, 0x0000a725, 0x0000a725,
+ 0x0000a727, 0x0000a727, 0x0000a729, 0x0000a729,
+ 0x0000a72b, 0x0000a72b, 0x0000a72d, 0x0000a72d,
+ 0x0000a72f, 0x0000a731, 0x0000a733, 0x0000a733,
+ 0x0000a735, 0x0000a735, 0x0000a737, 0x0000a737,
+ 0x0000a739, 0x0000a739, 0x0000a73b, 0x0000a73b,
+ 0x0000a73d, 0x0000a73d, 0x0000a73f, 0x0000a73f,
+ 0x0000a741, 0x0000a741, 0x0000a743, 0x0000a743,
+ 0x0000a745, 0x0000a745, 0x0000a747, 0x0000a747,
+ 0x0000a749, 0x0000a749, 0x0000a74b, 0x0000a74b,
+ 0x0000a74d, 0x0000a74d, 0x0000a74f, 0x0000a74f,
+ 0x0000a751, 0x0000a751, 0x0000a753, 0x0000a753,
+ 0x0000a755, 0x0000a755, 0x0000a757, 0x0000a757,
+ 0x0000a759, 0x0000a759, 0x0000a75b, 0x0000a75b,
+ 0x0000a75d, 0x0000a75d, 0x0000a75f, 0x0000a75f,
+ 0x0000a761, 0x0000a761, 0x0000a763, 0x0000a763,
+ 0x0000a765, 0x0000a765, 0x0000a767, 0x0000a767,
+ 0x0000a769, 0x0000a769, 0x0000a76b, 0x0000a76b,
+ 0x0000a76d, 0x0000a76d, 0x0000a76f, 0x0000a76f,
+ 0x0000a771, 0x0000a778, 0x0000a77a, 0x0000a77a,
+ 0x0000a77c, 0x0000a77c, 0x0000a77f, 0x0000a77f,
+ 0x0000a781, 0x0000a781, 0x0000a783, 0x0000a783,
+ 0x0000a785, 0x0000a785, 0x0000a787, 0x0000a787,
+ 0x0000a78c, 0x0000a78c, 0x0000a78e, 0x0000a78e,
+ 0x0000a791, 0x0000a791, 0x0000a793, 0x0000a795,
+ 0x0000a797, 0x0000a797, 0x0000a799, 0x0000a799,
+ 0x0000a79b, 0x0000a79b, 0x0000a79d, 0x0000a79d,
+ 0x0000a79f, 0x0000a79f, 0x0000a7a1, 0x0000a7a1,
+ 0x0000a7a3, 0x0000a7a3, 0x0000a7a5, 0x0000a7a5,
+ 0x0000a7a7, 0x0000a7a7, 0x0000a7a9, 0x0000a7a9,
+ 0x0000a7b5, 0x0000a7b5, 0x0000a7b7, 0x0000a7b7,
+ 0x0000a7fa, 0x0000a7fa, 0x0000ab30, 0x0000ab5a,
+ 0x0000ab60, 0x0000ab65, 0x0000ab70, 0x0000abbf,
0x0000fb00, 0x0000fb06, 0x0000fb13, 0x0000fb17,
0x0000ff41, 0x0000ff5a, 0x00010428, 0x0001044f,
+ 0x00010cc0, 0x00010cf2, 0x000118c0, 0x000118df,
0x0001d41a, 0x0001d433, 0x0001d44e, 0x0001d454,
0x0001d456, 0x0001d467, 0x0001d482, 0x0001d49b,
0x0001d4b6, 0x0001d4b9, 0x0001d4bb, 0x0001d4bb,
@@ -866,48 +952,53 @@ static const unsigned int _ucprop_ranges[] = {
0x00000e46, 0x00000e46, 0x00000ec6, 0x00000ec6,
0x000010fc, 0x000010fc, 0x000017d7, 0x000017d7,
0x00001843, 0x00001843, 0x00001aa7, 0x00001aa7,
- 0x00001c78, 0x00001c7d, 0x00001d2c, 0x00001d61,
+ 0x00001c78, 0x00001c7d, 0x00001d2c, 0x00001d6a,
0x00001d78, 0x00001d78, 0x00001d9b, 0x00001dbf,
0x00002071, 0x00002071, 0x0000207f, 0x0000207f,
- 0x00002090, 0x0000209c, 0x00002c7d, 0x00002c7d,
+ 0x00002090, 0x0000209c, 0x00002c7c, 0x00002c7d,
0x00002d6f, 0x00002d6f, 0x00002e2f, 0x00002e2f,
0x00003005, 0x00003005, 0x00003031, 0x00003035,
0x0000303b, 0x0000303b, 0x0000309d, 0x0000309e,
0x000030fc, 0x000030fe, 0x0000a015, 0x0000a015,
0x0000a4f8, 0x0000a4fd, 0x0000a60c, 0x0000a60c,
- 0x0000a67f, 0x0000a67f, 0x0000a717, 0x0000a71f,
- 0x0000a770, 0x0000a770, 0x0000a788, 0x0000a788,
- 0x0000a9cf, 0x0000a9cf, 0x0000aa70, 0x0000aa70,
- 0x0000aadd, 0x0000aadd, 0x0000ff70, 0x0000ff70,
- 0x0000ff9e, 0x0000ff9f, 0x000001bb, 0x000001bb,
- 0x000001c0, 0x000001c3, 0x00000294, 0x00000294,
- 0x000005d0, 0x000005ea, 0x000005f0, 0x000005f2,
- 0x00000620, 0x0000063f, 0x00000641, 0x0000064a,
- 0x0000066e, 0x0000066f, 0x00000671, 0x000006d3,
- 0x000006d5, 0x000006d5, 0x000006ee, 0x000006ef,
- 0x000006fa, 0x000006fc, 0x000006ff, 0x000006ff,
- 0x00000710, 0x00000710, 0x00000712, 0x0000072f,
- 0x0000074d, 0x000007a5, 0x000007b1, 0x000007b1,
- 0x000007ca, 0x000007ea, 0x00000800, 0x00000815,
- 0x00000840, 0x00000858, 0x00000904, 0x00000939,
+ 0x0000a67f, 0x0000a67f, 0x0000a69c, 0x0000a69d,
+ 0x0000a717, 0x0000a71f, 0x0000a770, 0x0000a770,
+ 0x0000a788, 0x0000a788, 0x0000a7f8, 0x0000a7f9,
+ 0x0000a9cf, 0x0000a9cf, 0x0000a9e6, 0x0000a9e6,
+ 0x0000aa70, 0x0000aa70, 0x0000aadd, 0x0000aadd,
+ 0x0000aaf3, 0x0000aaf4, 0x0000ab5c, 0x0000ab5f,
+ 0x0000ff70, 0x0000ff70, 0x0000ff9e, 0x0000ff9f,
+ 0x00016b40, 0x00016b43, 0x00016f93, 0x00016f9f,
+ 0x000000aa, 0x000000aa, 0x000000ba, 0x000000ba,
+ 0x000001bb, 0x000001bb, 0x000001c0, 0x000001c3,
+ 0x00000294, 0x00000294, 0x000005d0, 0x000005ea,
+ 0x000005f0, 0x000005f2, 0x00000620, 0x0000063f,
+ 0x00000641, 0x0000064a, 0x0000066e, 0x0000066f,
+ 0x00000671, 0x000006d3, 0x000006d5, 0x000006d5,
+ 0x000006ee, 0x000006ef, 0x000006fa, 0x000006fc,
+ 0x000006ff, 0x000006ff, 0x00000710, 0x00000710,
+ 0x00000712, 0x0000072f, 0x0000074d, 0x000007a5,
+ 0x000007b1, 0x000007b1, 0x000007ca, 0x000007ea,
+ 0x00000800, 0x00000815, 0x00000840, 0x00000858,
+ 0x000008a0, 0x000008b4, 0x00000904, 0x00000939,
0x0000093d, 0x0000093d, 0x00000950, 0x00000950,
- 0x00000958, 0x00000961, 0x00000972, 0x00000977,
- 0x00000979, 0x0000097f, 0x00000985, 0x0000098c,
- 0x0000098f, 0x00000990, 0x00000993, 0x000009a8,
- 0x000009aa, 0x000009b0, 0x000009b2, 0x000009b2,
- 0x000009b6, 0x000009b9, 0x000009bd, 0x000009bd,
- 0x000009ce, 0x000009ce, 0x000009dc, 0x000009dd,
- 0x000009df, 0x000009e1, 0x000009f0, 0x000009f1,
- 0x00000a05, 0x00000a0a, 0x00000a0f, 0x00000a10,
- 0x00000a13, 0x00000a28, 0x00000a2a, 0x00000a30,
- 0x00000a32, 0x00000a33, 0x00000a35, 0x00000a36,
- 0x00000a38, 0x00000a39, 0x00000a59, 0x00000a5c,
- 0x00000a5e, 0x00000a5e, 0x00000a72, 0x00000a74,
- 0x00000a85, 0x00000a8d, 0x00000a8f, 0x00000a91,
- 0x00000a93, 0x00000aa8, 0x00000aaa, 0x00000ab0,
- 0x00000ab2, 0x00000ab3, 0x00000ab5, 0x00000ab9,
- 0x00000abd, 0x00000abd, 0x00000ad0, 0x00000ad0,
- 0x00000ae0, 0x00000ae1, 0x00000b05, 0x00000b0c,
+ 0x00000958, 0x00000961, 0x00000972, 0x00000980,
+ 0x00000985, 0x0000098c, 0x0000098f, 0x00000990,
+ 0x00000993, 0x000009a8, 0x000009aa, 0x000009b0,
+ 0x000009b2, 0x000009b2, 0x000009b6, 0x000009b9,
+ 0x000009bd, 0x000009bd, 0x000009ce, 0x000009ce,
+ 0x000009dc, 0x000009dd, 0x000009df, 0x000009e1,
+ 0x000009f0, 0x000009f1, 0x00000a05, 0x00000a0a,
+ 0x00000a0f, 0x00000a10, 0x00000a13, 0x00000a28,
+ 0x00000a2a, 0x00000a30, 0x00000a32, 0x00000a33,
+ 0x00000a35, 0x00000a36, 0x00000a38, 0x00000a39,
+ 0x00000a59, 0x00000a5c, 0x00000a5e, 0x00000a5e,
+ 0x00000a72, 0x00000a74, 0x00000a85, 0x00000a8d,
+ 0x00000a8f, 0x00000a91, 0x00000a93, 0x00000aa8,
+ 0x00000aaa, 0x00000ab0, 0x00000ab2, 0x00000ab3,
+ 0x00000ab5, 0x00000ab9, 0x00000abd, 0x00000abd,
+ 0x00000ad0, 0x00000ad0, 0x00000ae0, 0x00000ae1,
+ 0x00000af9, 0x00000af9, 0x00000b05, 0x00000b0c,
0x00000b0f, 0x00000b10, 0x00000b13, 0x00000b28,
0x00000b2a, 0x00000b30, 0x00000b32, 0x00000b33,
0x00000b35, 0x00000b39, 0x00000b3d, 0x00000b3d,
@@ -919,63 +1010,63 @@ static const unsigned int _ucprop_ranges[] = {
0x00000ba3, 0x00000ba4, 0x00000ba8, 0x00000baa,
0x00000bae, 0x00000bb9, 0x00000bd0, 0x00000bd0,
0x00000c05, 0x00000c0c, 0x00000c0e, 0x00000c10,
- 0x00000c12, 0x00000c28, 0x00000c2a, 0x00000c33,
- 0x00000c35, 0x00000c39, 0x00000c3d, 0x00000c3d,
- 0x00000c58, 0x00000c59, 0x00000c60, 0x00000c61,
- 0x00000c85, 0x00000c8c, 0x00000c8e, 0x00000c90,
- 0x00000c92, 0x00000ca8, 0x00000caa, 0x00000cb3,
- 0x00000cb5, 0x00000cb9, 0x00000cbd, 0x00000cbd,
- 0x00000cde, 0x00000cde, 0x00000ce0, 0x00000ce1,
- 0x00000cf1, 0x00000cf2, 0x00000d05, 0x00000d0c,
- 0x00000d0e, 0x00000d10, 0x00000d12, 0x00000d3a,
- 0x00000d3d, 0x00000d3d, 0x00000d4e, 0x00000d4e,
- 0x00000d60, 0x00000d61, 0x00000d7a, 0x00000d7f,
- 0x00000d85, 0x00000d96, 0x00000d9a, 0x00000db1,
- 0x00000db3, 0x00000dbb, 0x00000dbd, 0x00000dbd,
- 0x00000dc0, 0x00000dc6, 0x00000e01, 0x00000e30,
- 0x00000e32, 0x00000e33, 0x00000e40, 0x00000e45,
- 0x00000e81, 0x00000e82, 0x00000e84, 0x00000e84,
- 0x00000e87, 0x00000e88, 0x00000e8a, 0x00000e8a,
- 0x00000e8d, 0x00000e8d, 0x00000e94, 0x00000e97,
- 0x00000e99, 0x00000e9f, 0x00000ea1, 0x00000ea3,
- 0x00000ea5, 0x00000ea5, 0x00000ea7, 0x00000ea7,
- 0x00000eaa, 0x00000eab, 0x00000ead, 0x00000eb0,
- 0x00000eb2, 0x00000eb3, 0x00000ebd, 0x00000ebd,
- 0x00000ec0, 0x00000ec4, 0x00000edc, 0x00000edd,
- 0x00000f00, 0x00000f00, 0x00000f40, 0x00000f47,
- 0x00000f49, 0x00000f6c, 0x00000f88, 0x00000f8c,
- 0x00001000, 0x0000102a, 0x0000103f, 0x0000103f,
- 0x00001050, 0x00001055, 0x0000105a, 0x0000105d,
- 0x00001061, 0x00001061, 0x00001065, 0x00001066,
- 0x0000106e, 0x00001070, 0x00001075, 0x00001081,
- 0x0000108e, 0x0000108e, 0x000010d0, 0x000010fa,
- 0x00001100, 0x00001248, 0x0000124a, 0x0000124d,
- 0x00001250, 0x00001256, 0x00001258, 0x00001258,
- 0x0000125a, 0x0000125d, 0x00001260, 0x00001288,
- 0x0000128a, 0x0000128d, 0x00001290, 0x000012b0,
- 0x000012b2, 0x000012b5, 0x000012b8, 0x000012be,
- 0x000012c0, 0x000012c0, 0x000012c2, 0x000012c5,
- 0x000012c8, 0x000012d6, 0x000012d8, 0x00001310,
- 0x00001312, 0x00001315, 0x00001318, 0x0000135a,
- 0x00001380, 0x0000138f, 0x000013a0, 0x000013f4,
+ 0x00000c12, 0x00000c28, 0x00000c2a, 0x00000c39,
+ 0x00000c3d, 0x00000c3d, 0x00000c58, 0x00000c5a,
+ 0x00000c60, 0x00000c61, 0x00000c85, 0x00000c8c,
+ 0x00000c8e, 0x00000c90, 0x00000c92, 0x00000ca8,
+ 0x00000caa, 0x00000cb3, 0x00000cb5, 0x00000cb9,
+ 0x00000cbd, 0x00000cbd, 0x00000cde, 0x00000cde,
+ 0x00000ce0, 0x00000ce1, 0x00000cf1, 0x00000cf2,
+ 0x00000d05, 0x00000d0c, 0x00000d0e, 0x00000d10,
+ 0x00000d12, 0x00000d3a, 0x00000d3d, 0x00000d3d,
+ 0x00000d4e, 0x00000d4e, 0x00000d5f, 0x00000d61,
+ 0x00000d7a, 0x00000d7f, 0x00000d85, 0x00000d96,
+ 0x00000d9a, 0x00000db1, 0x00000db3, 0x00000dbb,
+ 0x00000dbd, 0x00000dbd, 0x00000dc0, 0x00000dc6,
+ 0x00000e01, 0x00000e30, 0x00000e32, 0x00000e33,
+ 0x00000e40, 0x00000e45, 0x00000e81, 0x00000e82,
+ 0x00000e84, 0x00000e84, 0x00000e87, 0x00000e88,
+ 0x00000e8a, 0x00000e8a, 0x00000e8d, 0x00000e8d,
+ 0x00000e94, 0x00000e97, 0x00000e99, 0x00000e9f,
+ 0x00000ea1, 0x00000ea3, 0x00000ea5, 0x00000ea5,
+ 0x00000ea7, 0x00000ea7, 0x00000eaa, 0x00000eab,
+ 0x00000ead, 0x00000eb0, 0x00000eb2, 0x00000eb3,
+ 0x00000ebd, 0x00000ebd, 0x00000ec0, 0x00000ec4,
+ 0x00000edc, 0x00000edf, 0x00000f00, 0x00000f00,
+ 0x00000f40, 0x00000f47, 0x00000f49, 0x00000f6c,
+ 0x00000f88, 0x00000f8c, 0x00001000, 0x0000102a,
+ 0x0000103f, 0x0000103f, 0x00001050, 0x00001055,
+ 0x0000105a, 0x0000105d, 0x00001061, 0x00001061,
+ 0x00001065, 0x00001066, 0x0000106e, 0x00001070,
+ 0x00001075, 0x00001081, 0x0000108e, 0x0000108e,
+ 0x000010d0, 0x000010fa, 0x000010fd, 0x00001248,
+ 0x0000124a, 0x0000124d, 0x00001250, 0x00001256,
+ 0x00001258, 0x00001258, 0x0000125a, 0x0000125d,
+ 0x00001260, 0x00001288, 0x0000128a, 0x0000128d,
+ 0x00001290, 0x000012b0, 0x000012b2, 0x000012b5,
+ 0x000012b8, 0x000012be, 0x000012c0, 0x000012c0,
+ 0x000012c2, 0x000012c5, 0x000012c8, 0x000012d6,
+ 0x000012d8, 0x00001310, 0x00001312, 0x00001315,
+ 0x00001318, 0x0000135a, 0x00001380, 0x0000138f,
0x00001401, 0x0000166c, 0x0000166f, 0x0000167f,
0x00001681, 0x0000169a, 0x000016a0, 0x000016ea,
- 0x00001700, 0x0000170c, 0x0000170e, 0x00001711,
- 0x00001720, 0x00001731, 0x00001740, 0x00001751,
- 0x00001760, 0x0000176c, 0x0000176e, 0x00001770,
- 0x00001780, 0x000017b3, 0x000017dc, 0x000017dc,
- 0x00001820, 0x00001842, 0x00001844, 0x00001877,
- 0x00001880, 0x000018a8, 0x000018aa, 0x000018aa,
- 0x000018b0, 0x000018f5, 0x00001900, 0x0000191c,
- 0x00001950, 0x0000196d, 0x00001970, 0x00001974,
- 0x00001980, 0x000019ab, 0x000019c1, 0x000019c7,
- 0x00001a00, 0x00001a16, 0x00001a20, 0x00001a54,
- 0x00001b05, 0x00001b33, 0x00001b45, 0x00001b4b,
- 0x00001b83, 0x00001ba0, 0x00001bae, 0x00001baf,
- 0x00001bc0, 0x00001be5, 0x00001c00, 0x00001c23,
- 0x00001c4d, 0x00001c4f, 0x00001c5a, 0x00001c77,
- 0x00001ce9, 0x00001cec, 0x00001cee, 0x00001cf1,
- 0x00002135, 0x00002138, 0x00002d30, 0x00002d65,
+ 0x000016f1, 0x000016f8, 0x00001700, 0x0000170c,
+ 0x0000170e, 0x00001711, 0x00001720, 0x00001731,
+ 0x00001740, 0x00001751, 0x00001760, 0x0000176c,
+ 0x0000176e, 0x00001770, 0x00001780, 0x000017b3,
+ 0x000017dc, 0x000017dc, 0x00001820, 0x00001842,
+ 0x00001844, 0x00001877, 0x00001880, 0x000018a8,
+ 0x000018aa, 0x000018aa, 0x000018b0, 0x000018f5,
+ 0x00001900, 0x0000191e, 0x00001950, 0x0000196d,
+ 0x00001970, 0x00001974, 0x00001980, 0x000019ab,
+ 0x000019b0, 0x000019c9, 0x00001a00, 0x00001a16,
+ 0x00001a20, 0x00001a54, 0x00001b05, 0x00001b33,
+ 0x00001b45, 0x00001b4b, 0x00001b83, 0x00001ba0,
+ 0x00001bae, 0x00001baf, 0x00001bba, 0x00001be5,
+ 0x00001c00, 0x00001c23, 0x00001c4d, 0x00001c4f,
+ 0x00001c5a, 0x00001c77, 0x00001ce9, 0x00001cec,
+ 0x00001cee, 0x00001cf1, 0x00001cf5, 0x00001cf6,
+ 0x00002135, 0x00002138, 0x00002d30, 0x00002d67,
0x00002d80, 0x00002d96, 0x00002da0, 0x00002da6,
0x00002da8, 0x00002dae, 0x00002db0, 0x00002db6,
0x00002db8, 0x00002dbe, 0x00002dc0, 0x00002dc6,
@@ -990,19 +1081,23 @@ static const unsigned int _ucprop_ranges[] = {
0x0000a4d0, 0x0000a4f7, 0x0000a500, 0x0000a60b,
0x0000a610, 0x0000a61f, 0x0000a62a, 0x0000a62b,
0x0000a66e, 0x0000a66e, 0x0000a6a0, 0x0000a6e5,
+ 0x0000a78f, 0x0000a78f, 0x0000a7f7, 0x0000a7f7,
0x0000a7fb, 0x0000a801, 0x0000a803, 0x0000a805,
0x0000a807, 0x0000a80a, 0x0000a80c, 0x0000a822,
0x0000a840, 0x0000a873, 0x0000a882, 0x0000a8b3,
0x0000a8f2, 0x0000a8f7, 0x0000a8fb, 0x0000a8fb,
- 0x0000a90a, 0x0000a925, 0x0000a930, 0x0000a946,
- 0x0000a960, 0x0000a97c, 0x0000a984, 0x0000a9b2,
+ 0x0000a8fd, 0x0000a8fd, 0x0000a90a, 0x0000a925,
+ 0x0000a930, 0x0000a946, 0x0000a960, 0x0000a97c,
+ 0x0000a984, 0x0000a9b2, 0x0000a9e0, 0x0000a9e4,
+ 0x0000a9e7, 0x0000a9ef, 0x0000a9fa, 0x0000a9fe,
0x0000aa00, 0x0000aa28, 0x0000aa40, 0x0000aa42,
0x0000aa44, 0x0000aa4b, 0x0000aa60, 0x0000aa6f,
0x0000aa71, 0x0000aa76, 0x0000aa7a, 0x0000aa7a,
- 0x0000aa80, 0x0000aaaf, 0x0000aab1, 0x0000aab1,
+ 0x0000aa7e, 0x0000aaaf, 0x0000aab1, 0x0000aab1,
0x0000aab5, 0x0000aab6, 0x0000aab9, 0x0000aabd,
0x0000aac0, 0x0000aac0, 0x0000aac2, 0x0000aac2,
- 0x0000aadb, 0x0000aadc, 0x0000ab01, 0x0000ab06,
+ 0x0000aadb, 0x0000aadc, 0x0000aae0, 0x0000aaea,
+ 0x0000aaf2, 0x0000aaf2, 0x0000ab01, 0x0000ab06,
0x0000ab09, 0x0000ab0e, 0x0000ab11, 0x0000ab16,
0x0000ab20, 0x0000ab26, 0x0000ab28, 0x0000ab2e,
0x0000abc0, 0x0000abe2, 0x0000ac00, 0x0000d7a3,
@@ -1022,62 +1117,115 @@ static const unsigned int _ucprop_ranges[] = {
0x00010028, 0x0001003a, 0x0001003c, 0x0001003d,
0x0001003f, 0x0001004d, 0x00010050, 0x0001005d,
0x00010080, 0x000100fa, 0x00010280, 0x0001029c,
- 0x000102a0, 0x000102d0, 0x00010300, 0x0001031e,
+ 0x000102a0, 0x000102d0, 0x00010300, 0x0001031f,
0x00010330, 0x00010340, 0x00010342, 0x00010349,
- 0x00010380, 0x0001039d, 0x000103a0, 0x000103c3,
- 0x000103c8, 0x000103cf, 0x00010450, 0x0001049d,
+ 0x00010350, 0x00010375, 0x00010380, 0x0001039d,
+ 0x000103a0, 0x000103c3, 0x000103c8, 0x000103cf,
+ 0x00010450, 0x0001049d, 0x00010500, 0x00010527,
+ 0x00010530, 0x00010563, 0x00010600, 0x00010736,
+ 0x00010740, 0x00010755, 0x00010760, 0x00010767,
0x00010800, 0x00010805, 0x00010808, 0x00010808,
0x0001080a, 0x00010835, 0x00010837, 0x00010838,
0x0001083c, 0x0001083c, 0x0001083f, 0x00010855,
+ 0x00010860, 0x00010876, 0x00010880, 0x0001089e,
+ 0x000108e0, 0x000108f2, 0x000108f4, 0x000108f5,
0x00010900, 0x00010915, 0x00010920, 0x00010939,
+ 0x00010980, 0x000109b7, 0x000109be, 0x000109bf,
0x00010a00, 0x00010a00, 0x00010a10, 0x00010a13,
0x00010a15, 0x00010a17, 0x00010a19, 0x00010a33,
- 0x00010a60, 0x00010a7c, 0x00010b00, 0x00010b35,
- 0x00010b40, 0x00010b55, 0x00010b60, 0x00010b72,
+ 0x00010a60, 0x00010a7c, 0x00010a80, 0x00010a9c,
+ 0x00010ac0, 0x00010ac7, 0x00010ac9, 0x00010ae4,
+ 0x00010b00, 0x00010b35, 0x00010b40, 0x00010b55,
+ 0x00010b60, 0x00010b72, 0x00010b80, 0x00010b91,
0x00010c00, 0x00010c48, 0x00011003, 0x00011037,
- 0x00011083, 0x000110af, 0x00012000, 0x0001236e,
- 0x00013000, 0x0001342e, 0x00016800, 0x00016a38,
- 0x0001b000, 0x0001b001, 0x00020000, 0x0002a6d6,
- 0x0002a700, 0x0002a700, 0x0002b734, 0x0002b734,
- 0x0002b740, 0x0002b740, 0x0002b81d, 0x0002b81d,
- 0x0002f800, 0x0002fa1d, 0x0000005f, 0x0000005f,
- 0x0000203f, 0x00002040, 0x00002054, 0x00002054,
- 0x0000fe33, 0x0000fe34, 0x0000fe4d, 0x0000fe4f,
- 0x0000ff3f, 0x0000ff3f, 0x0000002d, 0x0000002d,
- 0x0000058a, 0x0000058a, 0x000005be, 0x000005be,
- 0x00001400, 0x00001400, 0x00001806, 0x00001806,
- 0x00002010, 0x00002015, 0x00002e17, 0x00002e17,
- 0x00002e1a, 0x00002e1a, 0x0000301c, 0x0000301c,
- 0x00003030, 0x00003030, 0x000030a0, 0x000030a0,
- 0x0000fe31, 0x0000fe32, 0x0000fe58, 0x0000fe58,
- 0x0000fe63, 0x0000fe63, 0x0000ff0d, 0x0000ff0d,
- 0x00000028, 0x00000028, 0x0000005b, 0x0000005b,
- 0x0000007b, 0x0000007b, 0x00000f3a, 0x00000f3a,
- 0x00000f3c, 0x00000f3c, 0x0000169b, 0x0000169b,
- 0x0000201a, 0x0000201a, 0x0000201e, 0x0000201e,
- 0x00002045, 0x00002045, 0x0000207d, 0x0000207d,
- 0x0000208d, 0x0000208d, 0x00002329, 0x00002329,
- 0x00002768, 0x00002768, 0x0000276a, 0x0000276a,
- 0x0000276c, 0x0000276c, 0x0000276e, 0x0000276e,
- 0x00002770, 0x00002770, 0x00002772, 0x00002772,
- 0x00002774, 0x00002774, 0x000027c5, 0x000027c5,
- 0x000027e6, 0x000027e6, 0x000027e8, 0x000027e8,
- 0x000027ea, 0x000027ea, 0x000027ec, 0x000027ec,
- 0x000027ee, 0x000027ee, 0x00002983, 0x00002983,
- 0x00002985, 0x00002985, 0x00002987, 0x00002987,
- 0x00002989, 0x00002989, 0x0000298b, 0x0000298b,
- 0x0000298d, 0x0000298d, 0x0000298f, 0x0000298f,
- 0x00002991, 0x00002991, 0x00002993, 0x00002993,
- 0x00002995, 0x00002995, 0x00002997, 0x00002997,
- 0x000029d8, 0x000029d8, 0x000029da, 0x000029da,
- 0x000029fc, 0x000029fc, 0x00002e22, 0x00002e22,
- 0x00002e24, 0x00002e24, 0x00002e26, 0x00002e26,
- 0x00002e28, 0x00002e28, 0x00003008, 0x00003008,
+ 0x00011083, 0x000110af, 0x000110d0, 0x000110e8,
+ 0x00011103, 0x00011126, 0x00011150, 0x00011172,
+ 0x00011176, 0x00011176, 0x00011183, 0x000111b2,
+ 0x000111c1, 0x000111c4, 0x000111da, 0x000111da,
+ 0x000111dc, 0x000111dc, 0x00011200, 0x00011211,
+ 0x00011213, 0x0001122b, 0x00011280, 0x00011286,
+ 0x00011288, 0x00011288, 0x0001128a, 0x0001128d,
+ 0x0001128f, 0x0001129d, 0x0001129f, 0x000112a8,
+ 0x000112b0, 0x000112de, 0x00011305, 0x0001130c,
+ 0x0001130f, 0x00011310, 0x00011313, 0x00011328,
+ 0x0001132a, 0x00011330, 0x00011332, 0x00011333,
+ 0x00011335, 0x00011339, 0x0001133d, 0x0001133d,
+ 0x00011350, 0x00011350, 0x0001135d, 0x00011361,
+ 0x00011480, 0x000114af, 0x000114c4, 0x000114c5,
+ 0x000114c7, 0x000114c7, 0x00011580, 0x000115ae,
+ 0x000115d8, 0x000115db, 0x00011600, 0x0001162f,
+ 0x00011644, 0x00011644, 0x00011680, 0x000116aa,
+ 0x00011700, 0x00011719, 0x000118ff, 0x000118ff,
+ 0x00011ac0, 0x00011af8, 0x00012000, 0x00012399,
+ 0x00012480, 0x00012543, 0x00013000, 0x0001342e,
+ 0x00014400, 0x00014646, 0x00016800, 0x00016a38,
+ 0x00016a40, 0x00016a5e, 0x00016ad0, 0x00016aed,
+ 0x00016b00, 0x00016b2f, 0x00016b63, 0x00016b77,
+ 0x00016b7d, 0x00016b8f, 0x00016f00, 0x00016f44,
+ 0x00016f50, 0x00016f50, 0x0001b000, 0x0001b001,
+ 0x0001bc00, 0x0001bc6a, 0x0001bc70, 0x0001bc7c,
+ 0x0001bc80, 0x0001bc88, 0x0001bc90, 0x0001bc99,
+ 0x0001e800, 0x0001e8c4, 0x0001ee00, 0x0001ee03,
+ 0x0001ee05, 0x0001ee1f, 0x0001ee21, 0x0001ee22,
+ 0x0001ee24, 0x0001ee24, 0x0001ee27, 0x0001ee27,
+ 0x0001ee29, 0x0001ee32, 0x0001ee34, 0x0001ee37,
+ 0x0001ee39, 0x0001ee39, 0x0001ee3b, 0x0001ee3b,
+ 0x0001ee42, 0x0001ee42, 0x0001ee47, 0x0001ee47,
+ 0x0001ee49, 0x0001ee49, 0x0001ee4b, 0x0001ee4b,
+ 0x0001ee4d, 0x0001ee4f, 0x0001ee51, 0x0001ee52,
+ 0x0001ee54, 0x0001ee54, 0x0001ee57, 0x0001ee57,
+ 0x0001ee59, 0x0001ee59, 0x0001ee5b, 0x0001ee5b,
+ 0x0001ee5d, 0x0001ee5d, 0x0001ee5f, 0x0001ee5f,
+ 0x0001ee61, 0x0001ee62, 0x0001ee64, 0x0001ee64,
+ 0x0001ee67, 0x0001ee6a, 0x0001ee6c, 0x0001ee72,
+ 0x0001ee74, 0x0001ee77, 0x0001ee79, 0x0001ee7c,
+ 0x0001ee7e, 0x0001ee7e, 0x0001ee80, 0x0001ee89,
+ 0x0001ee8b, 0x0001ee9b, 0x0001eea1, 0x0001eea3,
+ 0x0001eea5, 0x0001eea9, 0x0001eeab, 0x0001eebb,
+ 0x00020000, 0x0002a6d6, 0x0002a700, 0x0002a700,
+ 0x0002b734, 0x0002b734, 0x0002b740, 0x0002b740,
+ 0x0002b81d, 0x0002b81d, 0x0002b820, 0x0002b820,
+ 0x0002cea1, 0x0002cea1, 0x0002f800, 0x0002fa1d,
+ 0x0000005f, 0x0000005f, 0x0000203f, 0x00002040,
+ 0x00002054, 0x00002054, 0x0000fe33, 0x0000fe34,
+ 0x0000fe4d, 0x0000fe4f, 0x0000ff3f, 0x0000ff3f,
+ 0x0000002d, 0x0000002d, 0x0000058a, 0x0000058a,
+ 0x000005be, 0x000005be, 0x00001400, 0x00001400,
+ 0x00001806, 0x00001806, 0x00002010, 0x00002015,
+ 0x00002e17, 0x00002e17, 0x00002e1a, 0x00002e1a,
+ 0x00002e3a, 0x00002e3b, 0x00002e40, 0x00002e40,
+ 0x0000301c, 0x0000301c, 0x00003030, 0x00003030,
+ 0x000030a0, 0x000030a0, 0x0000fe31, 0x0000fe32,
+ 0x0000fe58, 0x0000fe58, 0x0000fe63, 0x0000fe63,
+ 0x0000ff0d, 0x0000ff0d, 0x00000028, 0x00000028,
+ 0x0000005b, 0x0000005b, 0x0000007b, 0x0000007b,
+ 0x00000f3a, 0x00000f3a, 0x00000f3c, 0x00000f3c,
+ 0x0000169b, 0x0000169b, 0x0000201a, 0x0000201a,
+ 0x0000201e, 0x0000201e, 0x00002045, 0x00002045,
+ 0x0000207d, 0x0000207d, 0x0000208d, 0x0000208d,
+ 0x00002308, 0x00002308, 0x0000230a, 0x0000230a,
+ 0x00002329, 0x00002329, 0x00002768, 0x00002768,
+ 0x0000276a, 0x0000276a, 0x0000276c, 0x0000276c,
+ 0x0000276e, 0x0000276e, 0x00002770, 0x00002770,
+ 0x00002772, 0x00002772, 0x00002774, 0x00002774,
+ 0x000027c5, 0x000027c5, 0x000027e6, 0x000027e6,
+ 0x000027e8, 0x000027e8, 0x000027ea, 0x000027ea,
+ 0x000027ec, 0x000027ec, 0x000027ee, 0x000027ee,
+ 0x00002983, 0x00002983, 0x00002985, 0x00002985,
+ 0x00002987, 0x00002987, 0x00002989, 0x00002989,
+ 0x0000298b, 0x0000298b, 0x0000298d, 0x0000298d,
+ 0x0000298f, 0x0000298f, 0x00002991, 0x00002991,
+ 0x00002993, 0x00002993, 0x00002995, 0x00002995,
+ 0x00002997, 0x00002997, 0x000029d8, 0x000029d8,
+ 0x000029da, 0x000029da, 0x000029fc, 0x000029fc,
+ 0x00002e22, 0x00002e22, 0x00002e24, 0x00002e24,
+ 0x00002e26, 0x00002e26, 0x00002e28, 0x00002e28,
+ 0x00002e42, 0x00002e42, 0x00003008, 0x00003008,
0x0000300a, 0x0000300a, 0x0000300c, 0x0000300c,
0x0000300e, 0x0000300e, 0x00003010, 0x00003010,
0x00003014, 0x00003014, 0x00003016, 0x00003016,
0x00003018, 0x00003018, 0x0000301a, 0x0000301a,
- 0x0000301d, 0x0000301d, 0x0000fd3e, 0x0000fd3e,
+ 0x0000301d, 0x0000301d, 0x0000fd3f, 0x0000fd3f,
0x0000fe17, 0x0000fe17, 0x0000fe35, 0x0000fe35,
0x0000fe37, 0x0000fe37, 0x0000fe39, 0x0000fe39,
0x0000fe3b, 0x0000fe3b, 0x0000fe3d, 0x0000fe3d,
@@ -1091,7 +1239,8 @@ static const unsigned int _ucprop_ranges[] = {
0x0000007d, 0x0000007d, 0x00000f3b, 0x00000f3b,
0x00000f3d, 0x00000f3d, 0x0000169c, 0x0000169c,
0x00002046, 0x00002046, 0x0000207e, 0x0000207e,
- 0x0000208e, 0x0000208e, 0x0000232a, 0x0000232a,
+ 0x0000208e, 0x0000208e, 0x00002309, 0x00002309,
+ 0x0000230b, 0x0000230b, 0x0000232a, 0x0000232a,
0x00002769, 0x00002769, 0x0000276b, 0x0000276b,
0x0000276d, 0x0000276d, 0x0000276f, 0x0000276f,
0x00002771, 0x00002771, 0x00002773, 0x00002773,
@@ -1112,7 +1261,7 @@ static const unsigned int _ucprop_ranges[] = {
0x0000300f, 0x0000300f, 0x00003011, 0x00003011,
0x00003015, 0x00003015, 0x00003017, 0x00003017,
0x00003019, 0x00003019, 0x0000301b, 0x0000301b,
- 0x0000301e, 0x0000301f, 0x0000fd3f, 0x0000fd3f,
+ 0x0000301e, 0x0000301f, 0x0000fd3e, 0x0000fd3e,
0x0000fe18, 0x0000fe18, 0x0000fe36, 0x0000fe36,
0x0000fe38, 0x0000fe38, 0x0000fe3a, 0x0000fe3a,
0x0000fe3c, 0x0000fe3c, 0x0000fe3e, 0x0000fe3e,
@@ -1126,30 +1275,32 @@ static const unsigned int _ucprop_ranges[] = {
0x0000002a, 0x0000002a, 0x0000002c, 0x0000002c,
0x0000002e, 0x0000002f, 0x0000003a, 0x0000003b,
0x0000003f, 0x00000040, 0x0000005c, 0x0000005c,
- 0x000000a1, 0x000000a1, 0x000000b7, 0x000000b7,
- 0x000000bf, 0x000000bf, 0x0000037e, 0x0000037e,
- 0x00000387, 0x00000387, 0x0000055a, 0x0000055f,
- 0x00000589, 0x00000589, 0x000005c0, 0x000005c0,
- 0x000005c3, 0x000005c3, 0x000005c6, 0x000005c6,
- 0x000005f3, 0x000005f4, 0x00000609, 0x0000060a,
- 0x0000060c, 0x0000060d, 0x0000061b, 0x0000061b,
- 0x0000061e, 0x0000061f, 0x0000066a, 0x0000066d,
- 0x000006d4, 0x000006d4, 0x00000700, 0x0000070d,
- 0x000007f7, 0x000007f9, 0x00000830, 0x0000083e,
- 0x0000085e, 0x0000085e, 0x00000964, 0x00000965,
- 0x00000970, 0x00000970, 0x00000df4, 0x00000df4,
+ 0x000000a1, 0x000000a1, 0x000000a7, 0x000000a7,
+ 0x000000b6, 0x000000b7, 0x000000bf, 0x000000bf,
+ 0x0000037e, 0x0000037e, 0x00000387, 0x00000387,
+ 0x0000055a, 0x0000055f, 0x00000589, 0x00000589,
+ 0x000005c0, 0x000005c0, 0x000005c3, 0x000005c3,
+ 0x000005c6, 0x000005c6, 0x000005f3, 0x000005f4,
+ 0x00000609, 0x0000060a, 0x0000060c, 0x0000060d,
+ 0x0000061b, 0x0000061b, 0x0000061e, 0x0000061f,
+ 0x0000066a, 0x0000066d, 0x000006d4, 0x000006d4,
+ 0x00000700, 0x0000070d, 0x000007f7, 0x000007f9,
+ 0x00000830, 0x0000083e, 0x0000085e, 0x0000085e,
+ 0x00000964, 0x00000965, 0x00000970, 0x00000970,
+ 0x00000af0, 0x00000af0, 0x00000df4, 0x00000df4,
0x00000e4f, 0x00000e4f, 0x00000e5a, 0x00000e5b,
- 0x00000f04, 0x00000f12, 0x00000f85, 0x00000f85,
- 0x00000fd0, 0x00000fd4, 0x00000fd9, 0x00000fda,
- 0x0000104a, 0x0000104f, 0x000010fb, 0x000010fb,
- 0x00001361, 0x00001368, 0x0000166d, 0x0000166e,
- 0x000016eb, 0x000016ed, 0x00001735, 0x00001736,
- 0x000017d4, 0x000017d6, 0x000017d8, 0x000017da,
- 0x00001800, 0x00001805, 0x00001807, 0x0000180a,
- 0x00001944, 0x00001945, 0x00001a1e, 0x00001a1f,
- 0x00001aa0, 0x00001aa6, 0x00001aa8, 0x00001aad,
- 0x00001b5a, 0x00001b60, 0x00001bfc, 0x00001bff,
- 0x00001c3b, 0x00001c3f, 0x00001c7e, 0x00001c7f,
+ 0x00000f04, 0x00000f12, 0x00000f14, 0x00000f14,
+ 0x00000f85, 0x00000f85, 0x00000fd0, 0x00000fd4,
+ 0x00000fd9, 0x00000fda, 0x0000104a, 0x0000104f,
+ 0x000010fb, 0x000010fb, 0x00001360, 0x00001368,
+ 0x0000166d, 0x0000166e, 0x000016eb, 0x000016ed,
+ 0x00001735, 0x00001736, 0x000017d4, 0x000017d6,
+ 0x000017d8, 0x000017da, 0x00001800, 0x00001805,
+ 0x00001807, 0x0000180a, 0x00001944, 0x00001945,
+ 0x00001a1e, 0x00001a1f, 0x00001aa0, 0x00001aa6,
+ 0x00001aa8, 0x00001aad, 0x00001b5a, 0x00001b60,
+ 0x00001bfc, 0x00001bff, 0x00001c3b, 0x00001c3f,
+ 0x00001c7e, 0x00001c7f, 0x00001cc0, 0x00001cc7,
0x00001cd3, 0x00001cd3, 0x00002016, 0x00002017,
0x00002020, 0x00002027, 0x00002030, 0x00002038,
0x0000203b, 0x0000203e, 0x00002041, 0x00002043,
@@ -1160,15 +1311,17 @@ static const unsigned int _ucprop_ranges[] = {
0x00002e0b, 0x00002e0b, 0x00002e0e, 0x00002e16,
0x00002e18, 0x00002e19, 0x00002e1b, 0x00002e1b,
0x00002e1e, 0x00002e1f, 0x00002e2a, 0x00002e2e,
- 0x00002e30, 0x00002e31, 0x00003001, 0x00003003,
+ 0x00002e30, 0x00002e39, 0x00002e3c, 0x00002e3f,
+ 0x00002e41, 0x00002e41, 0x00003001, 0x00003003,
0x0000303d, 0x0000303d, 0x000030fb, 0x000030fb,
0x0000a4fe, 0x0000a4ff, 0x0000a60d, 0x0000a60f,
0x0000a673, 0x0000a673, 0x0000a67e, 0x0000a67e,
0x0000a6f2, 0x0000a6f7, 0x0000a874, 0x0000a877,
0x0000a8ce, 0x0000a8cf, 0x0000a8f8, 0x0000a8fa,
- 0x0000a92e, 0x0000a92f, 0x0000a95f, 0x0000a95f,
- 0x0000a9c1, 0x0000a9cd, 0x0000a9de, 0x0000a9df,
- 0x0000aa5c, 0x0000aa5f, 0x0000aade, 0x0000aadf,
+ 0x0000a8fc, 0x0000a8fc, 0x0000a92e, 0x0000a92f,
+ 0x0000a95f, 0x0000a95f, 0x0000a9c1, 0x0000a9cd,
+ 0x0000a9de, 0x0000a9df, 0x0000aa5c, 0x0000aa5f,
+ 0x0000aade, 0x0000aadf, 0x0000aaf0, 0x0000aaf1,
0x0000abeb, 0x0000abeb, 0x0000fe10, 0x0000fe16,
0x0000fe19, 0x0000fe19, 0x0000fe30, 0x0000fe30,
0x0000fe45, 0x0000fe46, 0x0000fe49, 0x0000fe4c,
@@ -1179,33 +1332,42 @@ static const unsigned int _ucprop_ranges[] = {
0x0000ff0c, 0x0000ff0c, 0x0000ff0e, 0x0000ff0f,
0x0000ff1a, 0x0000ff1b, 0x0000ff1f, 0x0000ff20,
0x0000ff3c, 0x0000ff3c, 0x0000ff61, 0x0000ff61,
- 0x0000ff64, 0x0000ff65, 0x00010100, 0x00010101,
+ 0x0000ff64, 0x0000ff65, 0x00010100, 0x00010102,
0x0001039f, 0x0001039f, 0x000103d0, 0x000103d0,
- 0x00010857, 0x00010857, 0x0001091f, 0x0001091f,
- 0x0001093f, 0x0001093f, 0x00010a50, 0x00010a58,
- 0x00010a7f, 0x00010a7f, 0x00010b39, 0x00010b3f,
- 0x00011047, 0x0001104d, 0x000110bb, 0x000110bc,
- 0x000110be, 0x000110c1, 0x00012470, 0x00012473,
- 0x0000002b, 0x0000002b, 0x0000003c, 0x0000003e,
- 0x0000007c, 0x0000007c, 0x0000007e, 0x0000007e,
- 0x000000ac, 0x000000ac, 0x000000b1, 0x000000b1,
- 0x000000d7, 0x000000d7, 0x000000f7, 0x000000f7,
- 0x000003f6, 0x000003f6, 0x00000606, 0x00000608,
- 0x00002044, 0x00002044, 0x00002052, 0x00002052,
- 0x0000207a, 0x0000207c, 0x0000208a, 0x0000208c,
- 0x00002118, 0x00002118, 0x00002140, 0x00002144,
- 0x0000214b, 0x0000214b, 0x00002190, 0x00002194,
- 0x0000219a, 0x0000219b, 0x000021a0, 0x000021a0,
- 0x000021a3, 0x000021a3, 0x000021a6, 0x000021a6,
- 0x000021ae, 0x000021ae, 0x000021ce, 0x000021cf,
- 0x000021d2, 0x000021d2, 0x000021d4, 0x000021d4,
- 0x000021f4, 0x000022ff, 0x00002308, 0x0000230b,
+ 0x0001056f, 0x0001056f, 0x00010857, 0x00010857,
+ 0x0001091f, 0x0001091f, 0x0001093f, 0x0001093f,
+ 0x00010a50, 0x00010a58, 0x00010a7f, 0x00010a7f,
+ 0x00010af0, 0x00010af6, 0x00010b39, 0x00010b3f,
+ 0x00010b99, 0x00010b9c, 0x00011047, 0x0001104d,
+ 0x000110bb, 0x000110bc, 0x000110be, 0x000110c1,
+ 0x00011140, 0x00011143, 0x00011174, 0x00011175,
+ 0x000111c5, 0x000111c9, 0x000111cd, 0x000111cd,
+ 0x000111db, 0x000111db, 0x000111dd, 0x000111df,
+ 0x00011238, 0x0001123d, 0x000112a9, 0x000112a9,
+ 0x000114c6, 0x000114c6, 0x000115c1, 0x000115d7,
+ 0x00011641, 0x00011643, 0x0001173c, 0x0001173e,
+ 0x00012470, 0x00012474, 0x00016a6e, 0x00016a6f,
+ 0x00016af5, 0x00016af5, 0x00016b37, 0x00016b3b,
+ 0x00016b44, 0x00016b44, 0x0001bc9f, 0x0001bc9f,
+ 0x0001da87, 0x0001da8b, 0x0000002b, 0x0000002b,
+ 0x0000003c, 0x0000003e, 0x0000007c, 0x0000007c,
+ 0x0000007e, 0x0000007e, 0x000000ac, 0x000000ac,
+ 0x000000b1, 0x000000b1, 0x000000d7, 0x000000d7,
+ 0x000000f7, 0x000000f7, 0x000003f6, 0x000003f6,
+ 0x00000606, 0x00000608, 0x00002044, 0x00002044,
+ 0x00002052, 0x00002052, 0x0000207a, 0x0000207c,
+ 0x0000208a, 0x0000208c, 0x00002118, 0x00002118,
+ 0x00002140, 0x00002144, 0x0000214b, 0x0000214b,
+ 0x00002190, 0x00002194, 0x0000219a, 0x0000219b,
+ 0x000021a0, 0x000021a0, 0x000021a3, 0x000021a3,
+ 0x000021a6, 0x000021a6, 0x000021ae, 0x000021ae,
+ 0x000021ce, 0x000021cf, 0x000021d2, 0x000021d2,
+ 0x000021d4, 0x000021d4, 0x000021f4, 0x000022ff,
0x00002320, 0x00002321, 0x0000237c, 0x0000237c,
0x0000239b, 0x000023b3, 0x000023dc, 0x000023e1,
0x000025b7, 0x000025b7, 0x000025c1, 0x000025c1,
0x000025f8, 0x000025ff, 0x0000266f, 0x0000266f,
- 0x000027c0, 0x000027c4, 0x000027c7, 0x000027ca,
- 0x000027cc, 0x000027cc, 0x000027ce, 0x000027e5,
+ 0x000027c0, 0x000027c4, 0x000027c7, 0x000027e5,
0x000027f0, 0x000027ff, 0x00002900, 0x00002982,
0x00002999, 0x000029d7, 0x000029dc, 0x000029fb,
0x000029fe, 0x00002aff, 0x00002b30, 0x00002b44,
@@ -1219,11 +1381,12 @@ static const unsigned int _ucprop_ranges[] = {
0x0001d735, 0x0001d735, 0x0001d74f, 0x0001d74f,
0x0001d76f, 0x0001d76f, 0x0001d789, 0x0001d789,
0x0001d7a9, 0x0001d7a9, 0x0001d7c3, 0x0001d7c3,
- 0x00000024, 0x00000024, 0x000000a2, 0x000000a5,
+ 0x0001eef0, 0x0001eef1, 0x00000024, 0x00000024,
+ 0x000000a2, 0x000000a5, 0x0000058f, 0x0000058f,
0x0000060b, 0x0000060b, 0x000009f2, 0x000009f3,
0x000009fb, 0x000009fb, 0x00000af1, 0x00000af1,
0x00000bf9, 0x00000bf9, 0x00000e3f, 0x00000e3f,
- 0x000017db, 0x000017db, 0x000020a0, 0x000020b9,
+ 0x000017db, 0x000017db, 0x000020a0, 0x000020be,
0x0000a838, 0x0000a838, 0x0000fdfc, 0x0000fdfc,
0x0000fe69, 0x0000fe69, 0x0000ff04, 0x0000ff04,
0x0000ffe0, 0x0000ffe1, 0x0000ffe5, 0x0000ffe6,
@@ -1238,23 +1401,24 @@ static const unsigned int _ucprop_ranges[] = {
0x00001fdd, 0x00001fdf, 0x00001fed, 0x00001fef,
0x00001ffd, 0x00001ffe, 0x0000309b, 0x0000309c,
0x0000a700, 0x0000a716, 0x0000a720, 0x0000a721,
- 0x0000a789, 0x0000a78a, 0x0000fbb2, 0x0000fbc1,
- 0x0000ff3e, 0x0000ff3e, 0x0000ff40, 0x0000ff40,
- 0x0000ffe3, 0x0000ffe3, 0x000000a6, 0x000000a7,
+ 0x0000a789, 0x0000a78a, 0x0000ab5b, 0x0000ab5b,
+ 0x0000fbb2, 0x0000fbc1, 0x0000ff3e, 0x0000ff3e,
+ 0x0000ff40, 0x0000ff40, 0x0000ffe3, 0x0000ffe3,
+ 0x0001f3fb, 0x0001f3ff, 0x000000a6, 0x000000a6,
0x000000a9, 0x000000a9, 0x000000ae, 0x000000ae,
- 0x000000b0, 0x000000b0, 0x000000b6, 0x000000b6,
- 0x00000482, 0x00000482, 0x0000060e, 0x0000060f,
+ 0x000000b0, 0x000000b0, 0x00000482, 0x00000482,
+ 0x0000058d, 0x0000058e, 0x0000060e, 0x0000060f,
0x000006de, 0x000006de, 0x000006e9, 0x000006e9,
0x000006fd, 0x000006fe, 0x000007f6, 0x000007f6,
0x000009fa, 0x000009fa, 0x00000b70, 0x00000b70,
0x00000bf3, 0x00000bf8, 0x00000bfa, 0x00000bfa,
0x00000c7f, 0x00000c7f, 0x00000d79, 0x00000d79,
- 0x00000f01, 0x00000f03, 0x00000f13, 0x00000f17,
- 0x00000f1a, 0x00000f1f, 0x00000f34, 0x00000f34,
- 0x00000f36, 0x00000f36, 0x00000f38, 0x00000f38,
- 0x00000fbe, 0x00000fc5, 0x00000fc7, 0x00000fcc,
- 0x00000fce, 0x00000fcf, 0x00000fd5, 0x00000fd8,
- 0x0000109e, 0x0000109f, 0x00001360, 0x00001360,
+ 0x00000f01, 0x00000f03, 0x00000f13, 0x00000f13,
+ 0x00000f15, 0x00000f17, 0x00000f1a, 0x00000f1f,
+ 0x00000f34, 0x00000f34, 0x00000f36, 0x00000f36,
+ 0x00000f38, 0x00000f38, 0x00000fbe, 0x00000fc5,
+ 0x00000fc7, 0x00000fcc, 0x00000fce, 0x00000fcf,
+ 0x00000fd5, 0x00000fd8, 0x0000109e, 0x0000109f,
0x00001390, 0x00001399, 0x00001940, 0x00001940,
0x000019de, 0x000019ff, 0x00001b61, 0x00001b6a,
0x00001b74, 0x00001b7c, 0x00002100, 0x00002101,
@@ -1264,29 +1428,32 @@ static const unsigned int _ucprop_ranges[] = {
0x00002127, 0x00002127, 0x00002129, 0x00002129,
0x0000212e, 0x0000212e, 0x0000213a, 0x0000213b,
0x0000214a, 0x0000214a, 0x0000214c, 0x0000214d,
- 0x0000214f, 0x0000214f, 0x00002195, 0x00002199,
- 0x0000219c, 0x0000219f, 0x000021a1, 0x000021a2,
- 0x000021a4, 0x000021a5, 0x000021a7, 0x000021ad,
- 0x000021af, 0x000021cd, 0x000021d0, 0x000021d1,
- 0x000021d3, 0x000021d3, 0x000021d5, 0x000021f3,
- 0x00002300, 0x00002307, 0x0000230c, 0x0000231f,
- 0x00002322, 0x00002328, 0x0000232b, 0x0000237b,
- 0x0000237d, 0x0000239a, 0x000023b4, 0x000023db,
- 0x000023e2, 0x000023f3, 0x00002400, 0x00002426,
- 0x00002440, 0x0000244a, 0x0000249c, 0x000024e9,
- 0x00002500, 0x000025b6, 0x000025b8, 0x000025c0,
- 0x000025c2, 0x000025f7, 0x00002600, 0x0000266e,
- 0x00002670, 0x000026ff, 0x00002701, 0x00002767,
+ 0x0000214f, 0x0000214f, 0x0000218a, 0x0000218b,
+ 0x00002195, 0x00002199, 0x0000219c, 0x0000219f,
+ 0x000021a1, 0x000021a2, 0x000021a4, 0x000021a5,
+ 0x000021a7, 0x000021ad, 0x000021af, 0x000021cd,
+ 0x000021d0, 0x000021d1, 0x000021d3, 0x000021d3,
+ 0x000021d5, 0x000021f3, 0x00002300, 0x00002307,
+ 0x0000230c, 0x0000231f, 0x00002322, 0x00002328,
+ 0x0000232b, 0x0000237b, 0x0000237d, 0x0000239a,
+ 0x000023b4, 0x000023db, 0x000023e2, 0x000023fa,
+ 0x00002400, 0x00002426, 0x00002440, 0x0000244a,
+ 0x0000249c, 0x000024e9, 0x00002500, 0x000025b6,
+ 0x000025b8, 0x000025c0, 0x000025c2, 0x000025f7,
+ 0x00002600, 0x0000266e, 0x00002670, 0x00002767,
0x00002794, 0x000027bf, 0x00002800, 0x000028ff,
0x00002b00, 0x00002b2f, 0x00002b45, 0x00002b46,
- 0x00002b50, 0x00002b59, 0x00002ce5, 0x00002cea,
- 0x00002e80, 0x00002e99, 0x00002e9b, 0x00002ef3,
- 0x00002f00, 0x00002fd5, 0x00002ff0, 0x00002ffb,
- 0x00003004, 0x00003004, 0x00003012, 0x00003013,
- 0x00003020, 0x00003020, 0x00003036, 0x00003037,
- 0x0000303e, 0x0000303f, 0x00003190, 0x00003191,
- 0x00003196, 0x0000319f, 0x000031c0, 0x000031e3,
- 0x00003200, 0x0000321e, 0x0000322a, 0x00003250,
+ 0x00002b4d, 0x00002b73, 0x00002b76, 0x00002b95,
+ 0x00002b98, 0x00002bb9, 0x00002bbd, 0x00002bc8,
+ 0x00002bca, 0x00002bd1, 0x00002bec, 0x00002bef,
+ 0x00002ce5, 0x00002cea, 0x00002e80, 0x00002e99,
+ 0x00002e9b, 0x00002ef3, 0x00002f00, 0x00002fd5,
+ 0x00002ff0, 0x00002ffb, 0x00003004, 0x00003004,
+ 0x00003012, 0x00003013, 0x00003020, 0x00003020,
+ 0x00003036, 0x00003037, 0x0000303e, 0x0000303f,
+ 0x00003190, 0x00003191, 0x00003196, 0x0000319f,
+ 0x000031c0, 0x000031e3, 0x00003200, 0x0000321e,
+ 0x0000322a, 0x00003247, 0x00003250, 0x00003250,
0x00003260, 0x0000327f, 0x0000328a, 0x000032b0,
0x000032c0, 0x000032fe, 0x00003300, 0x000033ff,
0x00004dc0, 0x00004dff, 0x0000a490, 0x0000a4c6,
@@ -1294,35 +1461,35 @@ static const unsigned int _ucprop_ranges[] = {
0x0000a839, 0x0000a839, 0x0000aa77, 0x0000aa79,
0x0000fdfd, 0x0000fdfd, 0x0000ffe4, 0x0000ffe4,
0x0000ffe8, 0x0000ffe8, 0x0000ffed, 0x0000ffee,
- 0x0000fffc, 0x0000fffd, 0x00010102, 0x00010102,
- 0x00010137, 0x0001013f, 0x00010179, 0x00010189,
- 0x00010190, 0x0001019b, 0x000101d0, 0x000101fc,
- 0x0001d000, 0x0001d0f5, 0x0001d100, 0x0001d126,
- 0x0001d129, 0x0001d164, 0x0001d16a, 0x0001d16c,
- 0x0001d183, 0x0001d184, 0x0001d18c, 0x0001d1a9,
- 0x0001d1ae, 0x0001d1dd, 0x0001d200, 0x0001d241,
- 0x0001d245, 0x0001d245, 0x0001d300, 0x0001d356,
+ 0x0000fffc, 0x0000fffd, 0x00010137, 0x0001013f,
+ 0x00010179, 0x00010189, 0x0001018c, 0x0001018c,
+ 0x00010190, 0x0001019b, 0x000101a0, 0x000101a0,
+ 0x000101d0, 0x000101fc, 0x00010877, 0x00010878,
+ 0x00010ac8, 0x00010ac8, 0x0001173f, 0x0001173f,
+ 0x00016b3c, 0x00016b3f, 0x00016b45, 0x00016b45,
+ 0x0001bc9c, 0x0001bc9c, 0x0001d000, 0x0001d0f5,
+ 0x0001d100, 0x0001d126, 0x0001d129, 0x0001d164,
+ 0x0001d16a, 0x0001d16c, 0x0001d183, 0x0001d184,
+ 0x0001d18c, 0x0001d1a9, 0x0001d1ae, 0x0001d1e8,
+ 0x0001d200, 0x0001d241, 0x0001d245, 0x0001d245,
+ 0x0001d300, 0x0001d356, 0x0001d800, 0x0001d9ff,
+ 0x0001da37, 0x0001da3a, 0x0001da6d, 0x0001da74,
+ 0x0001da76, 0x0001da83, 0x0001da85, 0x0001da86,
0x0001f000, 0x0001f02b, 0x0001f030, 0x0001f093,
- 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0be,
- 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0df,
- 0x0001f110, 0x0001f12e, 0x0001f130, 0x0001f169,
+ 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0bf,
+ 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0f5,
+ 0x0001f110, 0x0001f12e, 0x0001f130, 0x0001f16b,
0x0001f170, 0x0001f19a, 0x0001f1e6, 0x0001f202,
0x0001f210, 0x0001f23a, 0x0001f240, 0x0001f248,
- 0x0001f250, 0x0001f251, 0x0001f300, 0x0001f320,
- 0x0001f330, 0x0001f335, 0x0001f337, 0x0001f37c,
- 0x0001f380, 0x0001f393, 0x0001f3a0, 0x0001f3c4,
- 0x0001f3c6, 0x0001f3ca, 0x0001f3e0, 0x0001f3f0,
- 0x0001f400, 0x0001f43e, 0x0001f440, 0x0001f440,
- 0x0001f442, 0x0001f4f7, 0x0001f4f9, 0x0001f4fc,
- 0x0001f500, 0x0001f53d, 0x0001f550, 0x0001f567,
- 0x0001f5fb, 0x0001f5ff, 0x0001f601, 0x0001f610,
- 0x0001f612, 0x0001f614, 0x0001f616, 0x0001f616,
- 0x0001f618, 0x0001f618, 0x0001f61a, 0x0001f61a,
- 0x0001f61c, 0x0001f61e, 0x0001f620, 0x0001f625,
- 0x0001f628, 0x0001f62b, 0x0001f62d, 0x0001f62d,
- 0x0001f630, 0x0001f633, 0x0001f635, 0x0001f640,
- 0x0001f645, 0x0001f64f, 0x0001f680, 0x0001f6c5,
- 0x0001f700, 0x0001f773, 0x00000041, 0x0000005a,
+ 0x0001f250, 0x0001f251, 0x0001f300, 0x0001f3fa,
+ 0x0001f400, 0x0001f579, 0x0001f57b, 0x0001f5a3,
+ 0x0001f5a5, 0x0001f6d0, 0x0001f6e0, 0x0001f6ec,
+ 0x0001f6f0, 0x0001f6f3, 0x0001f700, 0x0001f773,
+ 0x0001f780, 0x0001f7d4, 0x0001f800, 0x0001f80b,
+ 0x0001f810, 0x0001f847, 0x0001f850, 0x0001f859,
+ 0x0001f860, 0x0001f887, 0x0001f890, 0x0001f8ad,
+ 0x0001f910, 0x0001f918, 0x0001f980, 0x0001f984,
+ 0x0001f9c0, 0x0001f9c0, 0x00000041, 0x0000005a,
0x00000061, 0x0000007a, 0x000000aa, 0x000000aa,
0x000000b5, 0x000000b5, 0x000000ba, 0x000000ba,
0x000000c0, 0x000000d6, 0x000000d8, 0x000000f6,
@@ -1330,16 +1497,16 @@ static const unsigned int _ucprop_ranges[] = {
0x000002d0, 0x000002d1, 0x000002e0, 0x000002e4,
0x000002ee, 0x000002ee, 0x00000370, 0x00000373,
0x00000376, 0x00000377, 0x0000037a, 0x0000037d,
- 0x00000386, 0x00000386, 0x00000388, 0x0000038a,
- 0x0000038c, 0x0000038c, 0x0000038e, 0x000003a1,
- 0x000003a3, 0x000003f5, 0x000003f7, 0x00000482,
- 0x0000048a, 0x00000527, 0x00000531, 0x00000556,
- 0x00000559, 0x0000055f, 0x00000561, 0x00000587,
- 0x00000589, 0x00000589, 0x00000903, 0x00000939,
- 0x0000093b, 0x0000093b, 0x0000093d, 0x00000940,
- 0x00000949, 0x0000094c, 0x0000094e, 0x00000950,
- 0x00000958, 0x00000961, 0x00000964, 0x00000977,
- 0x00000979, 0x0000097f, 0x00000982, 0x00000983,
+ 0x0000037f, 0x0000037f, 0x00000386, 0x00000386,
+ 0x00000388, 0x0000038a, 0x0000038c, 0x0000038c,
+ 0x0000038e, 0x000003a1, 0x000003a3, 0x000003f5,
+ 0x000003f7, 0x00000482, 0x0000048a, 0x0000052f,
+ 0x00000531, 0x00000556, 0x00000559, 0x0000055f,
+ 0x00000561, 0x00000587, 0x00000589, 0x00000589,
+ 0x00000903, 0x00000939, 0x0000093b, 0x0000093b,
+ 0x0000093d, 0x00000940, 0x00000949, 0x0000094c,
+ 0x0000094e, 0x00000950, 0x00000958, 0x00000961,
+ 0x00000964, 0x00000980, 0x00000982, 0x00000983,
0x00000985, 0x0000098c, 0x0000098f, 0x00000990,
0x00000993, 0x000009a8, 0x000009aa, 0x000009b0,
0x000009b2, 0x000009b2, 0x000009b6, 0x000009b9,
@@ -1360,27 +1527,27 @@ static const unsigned int _ucprop_ranges[] = {
0x00000ab5, 0x00000ab9, 0x00000abd, 0x00000ac0,
0x00000ac9, 0x00000ac9, 0x00000acb, 0x00000acc,
0x00000ad0, 0x00000ad0, 0x00000ae0, 0x00000ae1,
- 0x00000ae6, 0x00000aef, 0x00000b02, 0x00000b03,
- 0x00000b05, 0x00000b0c, 0x00000b0f, 0x00000b10,
- 0x00000b13, 0x00000b28, 0x00000b2a, 0x00000b30,
- 0x00000b32, 0x00000b33, 0x00000b35, 0x00000b39,
- 0x00000b3d, 0x00000b3e, 0x00000b40, 0x00000b40,
- 0x00000b47, 0x00000b48, 0x00000b4b, 0x00000b4c,
- 0x00000b57, 0x00000b57, 0x00000b5c, 0x00000b5d,
- 0x00000b5f, 0x00000b61, 0x00000b66, 0x00000b77,
- 0x00000b83, 0x00000b83, 0x00000b85, 0x00000b8a,
- 0x00000b8e, 0x00000b90, 0x00000b92, 0x00000b95,
- 0x00000b99, 0x00000b9a, 0x00000b9c, 0x00000b9c,
- 0x00000b9e, 0x00000b9f, 0x00000ba3, 0x00000ba4,
- 0x00000ba8, 0x00000baa, 0x00000bae, 0x00000bb9,
- 0x00000bbe, 0x00000bbf, 0x00000bc1, 0x00000bc2,
- 0x00000bc6, 0x00000bc8, 0x00000bca, 0x00000bcc,
- 0x00000bd0, 0x00000bd0, 0x00000bd7, 0x00000bd7,
- 0x00000be6, 0x00000bf2, 0x00000c01, 0x00000c03,
- 0x00000c05, 0x00000c0c, 0x00000c0e, 0x00000c10,
- 0x00000c12, 0x00000c28, 0x00000c2a, 0x00000c33,
- 0x00000c35, 0x00000c39, 0x00000c3d, 0x00000c3d,
- 0x00000c41, 0x00000c44, 0x00000c58, 0x00000c59,
+ 0x00000ae6, 0x00000af0, 0x00000af9, 0x00000af9,
+ 0x00000b02, 0x00000b03, 0x00000b05, 0x00000b0c,
+ 0x00000b0f, 0x00000b10, 0x00000b13, 0x00000b28,
+ 0x00000b2a, 0x00000b30, 0x00000b32, 0x00000b33,
+ 0x00000b35, 0x00000b39, 0x00000b3d, 0x00000b3e,
+ 0x00000b40, 0x00000b40, 0x00000b47, 0x00000b48,
+ 0x00000b4b, 0x00000b4c, 0x00000b57, 0x00000b57,
+ 0x00000b5c, 0x00000b5d, 0x00000b5f, 0x00000b61,
+ 0x00000b66, 0x00000b77, 0x00000b83, 0x00000b83,
+ 0x00000b85, 0x00000b8a, 0x00000b8e, 0x00000b90,
+ 0x00000b92, 0x00000b95, 0x00000b99, 0x00000b9a,
+ 0x00000b9c, 0x00000b9c, 0x00000b9e, 0x00000b9f,
+ 0x00000ba3, 0x00000ba4, 0x00000ba8, 0x00000baa,
+ 0x00000bae, 0x00000bb9, 0x00000bbe, 0x00000bbf,
+ 0x00000bc1, 0x00000bc2, 0x00000bc6, 0x00000bc8,
+ 0x00000bca, 0x00000bcc, 0x00000bd0, 0x00000bd0,
+ 0x00000bd7, 0x00000bd7, 0x00000be6, 0x00000bf2,
+ 0x00000c01, 0x00000c03, 0x00000c05, 0x00000c0c,
+ 0x00000c0e, 0x00000c10, 0x00000c12, 0x00000c28,
+ 0x00000c2a, 0x00000c39, 0x00000c3d, 0x00000c3d,
+ 0x00000c41, 0x00000c44, 0x00000c58, 0x00000c5a,
0x00000c60, 0x00000c61, 0x00000c66, 0x00000c6f,
0x00000c7f, 0x00000c7f, 0x00000c82, 0x00000c83,
0x00000c85, 0x00000c8c, 0x00000c8e, 0x00000c90,
@@ -1394,36 +1561,37 @@ static const unsigned int _ucprop_ranges[] = {
0x00000d12, 0x00000d3a, 0x00000d3d, 0x00000d40,
0x00000d46, 0x00000d48, 0x00000d4a, 0x00000d4c,
0x00000d4e, 0x00000d4e, 0x00000d57, 0x00000d57,
- 0x00000d60, 0x00000d61, 0x00000d66, 0x00000d75,
+ 0x00000d5f, 0x00000d61, 0x00000d66, 0x00000d75,
0x00000d79, 0x00000d7f, 0x00000d82, 0x00000d83,
0x00000d85, 0x00000d96, 0x00000d9a, 0x00000db1,
0x00000db3, 0x00000dbb, 0x00000dbd, 0x00000dbd,
0x00000dc0, 0x00000dc6, 0x00000dcf, 0x00000dd1,
- 0x00000dd8, 0x00000ddf, 0x00000df2, 0x00000df4,
- 0x00000e01, 0x00000e30, 0x00000e32, 0x00000e33,
- 0x00000e40, 0x00000e46, 0x00000e4f, 0x00000e5b,
- 0x00000e81, 0x00000e82, 0x00000e84, 0x00000e84,
- 0x00000e87, 0x00000e88, 0x00000e8a, 0x00000e8a,
- 0x00000e8d, 0x00000e8d, 0x00000e94, 0x00000e97,
- 0x00000e99, 0x00000e9f, 0x00000ea1, 0x00000ea3,
- 0x00000ea5, 0x00000ea5, 0x00000ea7, 0x00000ea7,
- 0x00000eaa, 0x00000eab, 0x00000ead, 0x00000eb0,
- 0x00000eb2, 0x00000eb3, 0x00000ebd, 0x00000ebd,
- 0x00000ec0, 0x00000ec4, 0x00000ec6, 0x00000ec6,
- 0x00000ed0, 0x00000ed9, 0x00000edc, 0x00000edd,
- 0x00000f00, 0x00000f17, 0x00000f1a, 0x00000f34,
- 0x00000f36, 0x00000f36, 0x00000f38, 0x00000f38,
- 0x00000f3e, 0x00000f47, 0x00000f49, 0x00000f6c,
- 0x00000f7f, 0x00000f7f, 0x00000f85, 0x00000f85,
- 0x00000f88, 0x00000f8c, 0x00000fbe, 0x00000fc5,
- 0x00000fc7, 0x00000fcc, 0x00000fce, 0x00000fda,
- 0x00001000, 0x0000102c, 0x00001031, 0x00001031,
- 0x00001038, 0x00001038, 0x0000103b, 0x0000103c,
- 0x0000103f, 0x00001057, 0x0000105a, 0x0000105d,
- 0x00001061, 0x00001070, 0x00001075, 0x00001081,
- 0x00001083, 0x00001084, 0x00001087, 0x0000108c,
- 0x0000108e, 0x0000109c, 0x0000109e, 0x000010c5,
- 0x000010d0, 0x000010fc, 0x00001100, 0x00001248,
+ 0x00000dd8, 0x00000ddf, 0x00000de6, 0x00000def,
+ 0x00000df2, 0x00000df4, 0x00000e01, 0x00000e30,
+ 0x00000e32, 0x00000e33, 0x00000e40, 0x00000e46,
+ 0x00000e4f, 0x00000e5b, 0x00000e81, 0x00000e82,
+ 0x00000e84, 0x00000e84, 0x00000e87, 0x00000e88,
+ 0x00000e8a, 0x00000e8a, 0x00000e8d, 0x00000e8d,
+ 0x00000e94, 0x00000e97, 0x00000e99, 0x00000e9f,
+ 0x00000ea1, 0x00000ea3, 0x00000ea5, 0x00000ea5,
+ 0x00000ea7, 0x00000ea7, 0x00000eaa, 0x00000eab,
+ 0x00000ead, 0x00000eb0, 0x00000eb2, 0x00000eb3,
+ 0x00000ebd, 0x00000ebd, 0x00000ec0, 0x00000ec4,
+ 0x00000ec6, 0x00000ec6, 0x00000ed0, 0x00000ed9,
+ 0x00000edc, 0x00000edf, 0x00000f00, 0x00000f17,
+ 0x00000f1a, 0x00000f34, 0x00000f36, 0x00000f36,
+ 0x00000f38, 0x00000f38, 0x00000f3e, 0x00000f47,
+ 0x00000f49, 0x00000f6c, 0x00000f7f, 0x00000f7f,
+ 0x00000f85, 0x00000f85, 0x00000f88, 0x00000f8c,
+ 0x00000fbe, 0x00000fc5, 0x00000fc7, 0x00000fcc,
+ 0x00000fce, 0x00000fda, 0x00001000, 0x0000102c,
+ 0x00001031, 0x00001031, 0x00001038, 0x00001038,
+ 0x0000103b, 0x0000103c, 0x0000103f, 0x00001057,
+ 0x0000105a, 0x0000105d, 0x00001061, 0x00001070,
+ 0x00001075, 0x00001081, 0x00001083, 0x00001084,
+ 0x00001087, 0x0000108c, 0x0000108e, 0x0000109c,
+ 0x0000109e, 0x000010c5, 0x000010c7, 0x000010c7,
+ 0x000010cd, 0x000010cd, 0x000010d0, 0x00001248,
0x0000124a, 0x0000124d, 0x00001250, 0x00001256,
0x00001258, 0x00001258, 0x0000125a, 0x0000125d,
0x00001260, 0x00001288, 0x0000128a, 0x0000128d,
@@ -1432,24 +1600,25 @@ static const unsigned int _ucprop_ranges[] = {
0x000012c2, 0x000012c5, 0x000012c8, 0x000012d6,
0x000012d8, 0x00001310, 0x00001312, 0x00001315,
0x00001318, 0x0000135a, 0x00001360, 0x0000137c,
- 0x00001380, 0x0000138f, 0x000013a0, 0x000013f4,
- 0x00001401, 0x0000167f, 0x00001681, 0x0000169a,
- 0x000016a0, 0x000016f0, 0x00001700, 0x0000170c,
- 0x0000170e, 0x00001711, 0x00001720, 0x00001731,
- 0x00001735, 0x00001736, 0x00001740, 0x00001751,
- 0x00001760, 0x0000176c, 0x0000176e, 0x00001770,
- 0x00001780, 0x000017b6, 0x000017be, 0x000017c5,
+ 0x00001380, 0x0000138f, 0x000013a0, 0x000013f5,
+ 0x000013f8, 0x000013fd, 0x00001401, 0x0000167f,
+ 0x00001681, 0x0000169a, 0x000016a0, 0x000016f8,
+ 0x00001700, 0x0000170c, 0x0000170e, 0x00001711,
+ 0x00001720, 0x00001731, 0x00001735, 0x00001736,
+ 0x00001740, 0x00001751, 0x00001760, 0x0000176c,
+ 0x0000176e, 0x00001770, 0x00001780, 0x000017b3,
+ 0x000017b6, 0x000017b6, 0x000017be, 0x000017c5,
0x000017c7, 0x000017c8, 0x000017d4, 0x000017da,
0x000017dc, 0x000017dc, 0x000017e0, 0x000017e9,
0x00001810, 0x00001819, 0x00001820, 0x00001877,
0x00001880, 0x000018a8, 0x000018aa, 0x000018aa,
- 0x000018b0, 0x000018f5, 0x00001900, 0x0000191c,
+ 0x000018b0, 0x000018f5, 0x00001900, 0x0000191e,
0x00001923, 0x00001926, 0x00001929, 0x0000192b,
0x00001930, 0x00001931, 0x00001933, 0x00001938,
0x00001946, 0x0000196d, 0x00001970, 0x00001974,
0x00001980, 0x000019ab, 0x000019b0, 0x000019c9,
0x000019d0, 0x000019da, 0x00001a00, 0x00001a16,
- 0x00001a19, 0x00001a1b, 0x00001a1e, 0x00001a55,
+ 0x00001a19, 0x00001a1a, 0x00001a1e, 0x00001a55,
0x00001a57, 0x00001a57, 0x00001a61, 0x00001a61,
0x00001a63, 0x00001a64, 0x00001a6d, 0x00001a72,
0x00001a80, 0x00001a89, 0x00001a90, 0x00001a99,
@@ -1458,119 +1627,131 @@ static const unsigned int _ucprop_ranges[] = {
0x00001b3d, 0x00001b41, 0x00001b43, 0x00001b4b,
0x00001b50, 0x00001b6a, 0x00001b74, 0x00001b7c,
0x00001b82, 0x00001ba1, 0x00001ba6, 0x00001ba7,
- 0x00001baa, 0x00001baa, 0x00001bae, 0x00001bb9,
- 0x00001bc0, 0x00001be5, 0x00001be7, 0x00001be7,
- 0x00001bea, 0x00001bec, 0x00001bee, 0x00001bee,
- 0x00001bf2, 0x00001bf3, 0x00001bfc, 0x00001c2b,
- 0x00001c34, 0x00001c35, 0x00001c3b, 0x00001c49,
- 0x00001c4d, 0x00001c7f, 0x00001cd3, 0x00001cd3,
+ 0x00001baa, 0x00001baa, 0x00001bae, 0x00001be5,
+ 0x00001be7, 0x00001be7, 0x00001bea, 0x00001bec,
+ 0x00001bee, 0x00001bee, 0x00001bf2, 0x00001bf3,
+ 0x00001bfc, 0x00001c2b, 0x00001c34, 0x00001c35,
+ 0x00001c3b, 0x00001c49, 0x00001c4d, 0x00001c7f,
+ 0x00001cc0, 0x00001cc7, 0x00001cd3, 0x00001cd3,
0x00001ce1, 0x00001ce1, 0x00001ce9, 0x00001cec,
- 0x00001cee, 0x00001cf2, 0x00001d00, 0x00001dbf,
- 0x00001e00, 0x00001f15, 0x00001f18, 0x00001f1d,
- 0x00001f20, 0x00001f45, 0x00001f48, 0x00001f4d,
- 0x00001f50, 0x00001f57, 0x00001f59, 0x00001f59,
- 0x00001f5b, 0x00001f5b, 0x00001f5d, 0x00001f5d,
- 0x00001f5f, 0x00001f7d, 0x00001f80, 0x00001fb4,
- 0x00001fb6, 0x00001fbc, 0x00001fbe, 0x00001fbe,
- 0x00001fc2, 0x00001fc4, 0x00001fc6, 0x00001fcc,
- 0x00001fd0, 0x00001fd3, 0x00001fd6, 0x00001fdb,
- 0x00001fe0, 0x00001fec, 0x00001ff2, 0x00001ff4,
- 0x00001ff6, 0x00001ffc, 0x0000200e, 0x0000200e,
- 0x00002071, 0x00002071, 0x0000207f, 0x0000207f,
- 0x00002090, 0x0000209c, 0x00002102, 0x00002102,
- 0x00002107, 0x00002107, 0x0000210a, 0x00002113,
- 0x00002115, 0x00002115, 0x00002119, 0x0000211d,
- 0x00002124, 0x00002124, 0x00002126, 0x00002126,
- 0x00002128, 0x00002128, 0x0000212a, 0x0000212d,
- 0x0000212f, 0x00002139, 0x0000213c, 0x0000213f,
- 0x00002145, 0x00002149, 0x0000214e, 0x0000214f,
- 0x00002160, 0x00002188, 0x00002336, 0x0000237a,
- 0x00002395, 0x00002395, 0x0000249c, 0x000024e9,
- 0x000026ac, 0x000026ac, 0x00002800, 0x000028ff,
- 0x00002c00, 0x00002c2e, 0x00002c30, 0x00002c5e,
- 0x00002c60, 0x00002ce4, 0x00002ceb, 0x00002cee,
- 0x00002d00, 0x00002d25, 0x00002d30, 0x00002d65,
+ 0x00001cee, 0x00001cf3, 0x00001cf5, 0x00001cf6,
+ 0x00001d00, 0x00001dbf, 0x00001e00, 0x00001f15,
+ 0x00001f18, 0x00001f1d, 0x00001f20, 0x00001f45,
+ 0x00001f48, 0x00001f4d, 0x00001f50, 0x00001f57,
+ 0x00001f59, 0x00001f59, 0x00001f5b, 0x00001f5b,
+ 0x00001f5d, 0x00001f5d, 0x00001f5f, 0x00001f7d,
+ 0x00001f80, 0x00001fb4, 0x00001fb6, 0x00001fbc,
+ 0x00001fbe, 0x00001fbe, 0x00001fc2, 0x00001fc4,
+ 0x00001fc6, 0x00001fcc, 0x00001fd0, 0x00001fd3,
+ 0x00001fd6, 0x00001fdb, 0x00001fe0, 0x00001fec,
+ 0x00001ff2, 0x00001ff4, 0x00001ff6, 0x00001ffc,
+ 0x0000200e, 0x0000200e, 0x00002071, 0x00002071,
+ 0x0000207f, 0x0000207f, 0x00002090, 0x0000209c,
+ 0x00002102, 0x00002102, 0x00002107, 0x00002107,
+ 0x0000210a, 0x00002113, 0x00002115, 0x00002115,
+ 0x00002119, 0x0000211d, 0x00002124, 0x00002124,
+ 0x00002126, 0x00002126, 0x00002128, 0x00002128,
+ 0x0000212a, 0x0000212d, 0x0000212f, 0x00002139,
+ 0x0000213c, 0x0000213f, 0x00002145, 0x00002149,
+ 0x0000214e, 0x0000214f, 0x00002160, 0x00002188,
+ 0x00002336, 0x0000237a, 0x00002395, 0x00002395,
+ 0x0000249c, 0x000024e9, 0x000026ac, 0x000026ac,
+ 0x00002800, 0x000028ff, 0x00002c00, 0x00002c2e,
+ 0x00002c30, 0x00002c5e, 0x00002c60, 0x00002ce4,
+ 0x00002ceb, 0x00002cee, 0x00002cf2, 0x00002cf3,
+ 0x00002d00, 0x00002d25, 0x00002d27, 0x00002d27,
+ 0x00002d2d, 0x00002d2d, 0x00002d30, 0x00002d67,
0x00002d6f, 0x00002d70, 0x00002d80, 0x00002d96,
0x00002da0, 0x00002da6, 0x00002da8, 0x00002dae,
0x00002db0, 0x00002db6, 0x00002db8, 0x00002dbe,
0x00002dc0, 0x00002dc6, 0x00002dc8, 0x00002dce,
0x00002dd0, 0x00002dd6, 0x00002dd8, 0x00002dde,
0x00003005, 0x00003007, 0x00003021, 0x00003029,
- 0x00003031, 0x00003035, 0x00003038, 0x0000303c,
- 0x00003041, 0x00003096, 0x0000309d, 0x0000309f,
- 0x000030a1, 0x000030fa, 0x000030fc, 0x000030ff,
- 0x00003105, 0x0000312d, 0x00003131, 0x0000318e,
- 0x00003190, 0x000031ba, 0x000031f0, 0x0000321c,
- 0x00003220, 0x0000324f, 0x00003260, 0x0000327b,
- 0x0000327f, 0x000032b0, 0x000032c0, 0x000032cb,
- 0x000032d0, 0x000032fe, 0x00003300, 0x00003376,
- 0x0000337b, 0x000033dd, 0x000033e0, 0x000033fe,
- 0x00003400, 0x00004db5, 0x00004e00, 0x0000a48c,
- 0x0000a4d0, 0x0000a60c, 0x0000a610, 0x0000a62b,
- 0x0000a640, 0x0000a66e, 0x0000a680, 0x0000a697,
- 0x0000a6a0, 0x0000a6ef, 0x0000a6f2, 0x0000a6f7,
- 0x0000a722, 0x0000a787, 0x0000a789, 0x0000a78e,
- 0x0000a790, 0x0000a791, 0x0000a7a0, 0x0000a7a9,
- 0x0000a7fa, 0x0000a801, 0x0000a803, 0x0000a805,
+ 0x0000302e, 0x0000302f, 0x00003031, 0x00003035,
+ 0x00003038, 0x0000303c, 0x00003041, 0x00003096,
+ 0x0000309d, 0x0000309f, 0x000030a1, 0x000030fa,
+ 0x000030fc, 0x000030ff, 0x00003105, 0x0000312d,
+ 0x00003131, 0x0000318e, 0x00003190, 0x000031ba,
+ 0x000031f0, 0x0000321c, 0x00003220, 0x0000324f,
+ 0x00003260, 0x0000327b, 0x0000327f, 0x000032b0,
+ 0x000032c0, 0x000032cb, 0x000032d0, 0x000032fe,
+ 0x00003300, 0x00003376, 0x0000337b, 0x000033dd,
+ 0x000033e0, 0x000033fe, 0x00003400, 0x00004db5,
+ 0x00004e00, 0x0000a48c, 0x0000a4d0, 0x0000a60c,
+ 0x0000a610, 0x0000a62b, 0x0000a640, 0x0000a66e,
+ 0x0000a680, 0x0000a69d, 0x0000a6a0, 0x0000a6ef,
+ 0x0000a6f2, 0x0000a6f7, 0x0000a722, 0x0000a787,
+ 0x0000a789, 0x0000a7ad, 0x0000a7b0, 0x0000a7b7,
+ 0x0000a7f7, 0x0000a801, 0x0000a803, 0x0000a805,
0x0000a807, 0x0000a80a, 0x0000a80c, 0x0000a824,
0x0000a827, 0x0000a827, 0x0000a830, 0x0000a837,
0x0000a840, 0x0000a873, 0x0000a880, 0x0000a8c3,
- 0x0000a8ce, 0x0000a8d9, 0x0000a8f2, 0x0000a8fb,
+ 0x0000a8ce, 0x0000a8d9, 0x0000a8f2, 0x0000a8fd,
0x0000a900, 0x0000a925, 0x0000a92e, 0x0000a946,
0x0000a952, 0x0000a953, 0x0000a95f, 0x0000a97c,
0x0000a983, 0x0000a9b2, 0x0000a9b4, 0x0000a9b5,
0x0000a9ba, 0x0000a9bb, 0x0000a9bd, 0x0000a9cd,
- 0x0000a9cf, 0x0000a9d9, 0x0000a9de, 0x0000a9df,
- 0x0000aa00, 0x0000aa28, 0x0000aa2f, 0x0000aa30,
- 0x0000aa33, 0x0000aa34, 0x0000aa40, 0x0000aa42,
- 0x0000aa44, 0x0000aa4b, 0x0000aa4d, 0x0000aa4d,
- 0x0000aa50, 0x0000aa59, 0x0000aa5c, 0x0000aa7b,
- 0x0000aa80, 0x0000aaaf, 0x0000aab1, 0x0000aab1,
- 0x0000aab5, 0x0000aab6, 0x0000aab9, 0x0000aabd,
- 0x0000aac0, 0x0000aac0, 0x0000aac2, 0x0000aac2,
- 0x0000aadb, 0x0000aadf, 0x0000ab01, 0x0000ab06,
+ 0x0000a9cf, 0x0000a9d9, 0x0000a9de, 0x0000a9e4,
+ 0x0000a9e6, 0x0000a9fe, 0x0000aa00, 0x0000aa28,
+ 0x0000aa2f, 0x0000aa30, 0x0000aa33, 0x0000aa34,
+ 0x0000aa40, 0x0000aa42, 0x0000aa44, 0x0000aa4b,
+ 0x0000aa4d, 0x0000aa4d, 0x0000aa50, 0x0000aa59,
+ 0x0000aa5c, 0x0000aa7b, 0x0000aa7d, 0x0000aaaf,
+ 0x0000aab1, 0x0000aab1, 0x0000aab5, 0x0000aab6,
+ 0x0000aab9, 0x0000aabd, 0x0000aac0, 0x0000aac0,
+ 0x0000aac2, 0x0000aac2, 0x0000aadb, 0x0000aaeb,
+ 0x0000aaee, 0x0000aaf5, 0x0000ab01, 0x0000ab06,
0x0000ab09, 0x0000ab0e, 0x0000ab11, 0x0000ab16,
0x0000ab20, 0x0000ab26, 0x0000ab28, 0x0000ab2e,
- 0x0000abc0, 0x0000abe4, 0x0000abe6, 0x0000abe7,
- 0x0000abe9, 0x0000abec, 0x0000abf0, 0x0000abf9,
- 0x0000ac00, 0x0000d7a3, 0x0000d7b0, 0x0000d7c6,
- 0x0000d7cb, 0x0000d7fb, 0x0000e000, 0x0000fb06,
- 0x0000fb13, 0x0000fb17, 0x0000ff21, 0x0000ff3a,
- 0x0000ff41, 0x0000ff5a, 0x0000ff66, 0x0000ffbe,
- 0x0000ffc2, 0x0000ffc7, 0x0000ffca, 0x0000ffcf,
- 0x0000ffd2, 0x0000ffd7, 0x0000ffda, 0x0000ffdc,
- 0x00010000, 0x0002a6d6, 0x0002a700, 0x0002a700,
- 0x0002b734, 0x0002b734, 0x0002b740, 0x0002b740,
- 0x0002b81d, 0x0002b81d, 0x0002f800, 0x0002fa1d,
- 0x000f0000, 0x000ffffd, 0x00100000, 0x0010fffd,
- 0x000005be, 0x000005be, 0x000005c0, 0x000005c0,
- 0x000005c3, 0x000005c3, 0x000005c6, 0x000005c6,
- 0x000005d0, 0x000005ea, 0x000005f0, 0x000005f4,
- 0x000007c0, 0x000007ea, 0x000007f4, 0x000007f5,
- 0x000007fa, 0x000007fa, 0x00000800, 0x00000815,
- 0x0000081a, 0x0000081a, 0x00000824, 0x00000824,
- 0x00000828, 0x00000828, 0x00000830, 0x0000083e,
- 0x00000840, 0x00000858, 0x0000085e, 0x0000085e,
- 0x0000200f, 0x0000200f, 0x0000fb1d, 0x0000fb1d,
- 0x0000fb1f, 0x0000fb28, 0x0000fb2a, 0x0000fb36,
- 0x0000fb38, 0x0000fb3c, 0x0000fb3e, 0x0000fb3e,
- 0x0000fb40, 0x0000fb41, 0x0000fb43, 0x0000fb44,
- 0x0000fb46, 0x0000fb4f, 0x00010800, 0x00010805,
- 0x00010808, 0x00010808, 0x0001080a, 0x00010835,
- 0x00010837, 0x00010838, 0x0001083c, 0x0001083c,
- 0x0001083f, 0x00010855, 0x00010857, 0x0001085f,
- 0x00010900, 0x0001091b, 0x00010920, 0x00010939,
- 0x0001093f, 0x0001093f, 0x00010a00, 0x00010a00,
+ 0x0000ab30, 0x0000ab65, 0x0000ab70, 0x0000abe4,
+ 0x0000abe6, 0x0000abe7, 0x0000abe9, 0x0000abec,
+ 0x0000abf0, 0x0000abf9, 0x0000ac00, 0x0000d7a3,
+ 0x0000d7b0, 0x0000d7c6, 0x0000d7cb, 0x0000d7fb,
+ 0x0000e000, 0x0000fb06, 0x0000fb13, 0x0000fb17,
+ 0x0000ff21, 0x0000ff3a, 0x0000ff41, 0x0000ff5a,
+ 0x0000ff66, 0x0000ffbe, 0x0000ffc2, 0x0000ffc7,
+ 0x0000ffca, 0x0000ffcf, 0x0000ffd2, 0x0000ffd7,
+ 0x0000ffda, 0x0000ffdc, 0x00010000, 0x0002a6d6,
+ 0x0002a700, 0x0002a700, 0x0002b734, 0x0002b734,
+ 0x0002b740, 0x0002b740, 0x0002b81d, 0x0002b81d,
+ 0x0002b820, 0x0002b820, 0x0002cea1, 0x0002cea1,
+ 0x0002f800, 0x0002fa1d, 0x000f0000, 0x000ffffd,
+ 0x00100000, 0x0010fffd, 0x000005be, 0x000005be,
+ 0x000005c0, 0x000005c0, 0x000005c3, 0x000005c3,
+ 0x000005c6, 0x000005c6, 0x000005d0, 0x000005ea,
+ 0x000005f0, 0x000005f4, 0x000007c0, 0x000007ea,
+ 0x000007f4, 0x000007f5, 0x000007fa, 0x000007fa,
+ 0x00000800, 0x00000815, 0x0000081a, 0x0000081a,
+ 0x00000824, 0x00000824, 0x00000828, 0x00000828,
+ 0x00000830, 0x0000083e, 0x00000840, 0x00000858,
+ 0x0000085e, 0x0000085e, 0x0000200f, 0x0000200f,
+ 0x0000fb1d, 0x0000fb1d, 0x0000fb1f, 0x0000fb28,
+ 0x0000fb2a, 0x0000fb36, 0x0000fb38, 0x0000fb3c,
+ 0x0000fb3e, 0x0000fb3e, 0x0000fb40, 0x0000fb41,
+ 0x0000fb43, 0x0000fb44, 0x0000fb46, 0x0000fb4f,
+ 0x00010800, 0x00010805, 0x00010808, 0x00010808,
+ 0x0001080a, 0x00010835, 0x00010837, 0x00010838,
+ 0x0001083c, 0x0001083c, 0x0001083f, 0x00010855,
+ 0x00010857, 0x0001089e, 0x000108a7, 0x000108af,
+ 0x000108e0, 0x000108f2, 0x000108f4, 0x000108f5,
+ 0x000108fb, 0x0001091b, 0x00010920, 0x00010939,
+ 0x0001093f, 0x0001093f, 0x00010980, 0x000109b7,
+ 0x000109bc, 0x000109cf, 0x000109d2, 0x00010a00,
0x00010a10, 0x00010a13, 0x00010a15, 0x00010a17,
0x00010a19, 0x00010a33, 0x00010a40, 0x00010a47,
- 0x00010a50, 0x00010a58, 0x00010a60, 0x00010a7f,
+ 0x00010a50, 0x00010a58, 0x00010a60, 0x00010a9f,
+ 0x00010ac0, 0x00010ae4, 0x00010aeb, 0x00010af6,
0x00010b00, 0x00010b35, 0x00010b40, 0x00010b55,
- 0x00010b58, 0x00010b72, 0x00010b78, 0x00010b7f,
- 0x00010c00, 0x00010c48, 0x00000030, 0x00000039,
- 0x000000b2, 0x000000b3, 0x000000b9, 0x000000b9,
- 0x000006f0, 0x000006f9, 0x00002070, 0x00002070,
- 0x00002074, 0x00002079, 0x00002080, 0x00002089,
- 0x00002488, 0x0000249b, 0x0000ff10, 0x0000ff19,
+ 0x00010b58, 0x00010b72, 0x00010b78, 0x00010b91,
+ 0x00010b99, 0x00010b9c, 0x00010ba9, 0x00010baf,
+ 0x00010c00, 0x00010c48, 0x00010c80, 0x00010cb2,
+ 0x00010cc0, 0x00010cf2, 0x00010cfa, 0x00010cff,
+ 0x0001e800, 0x0001e8c4, 0x0001e8c7, 0x0001e8cf,
+ 0x00000030, 0x00000039, 0x000000b2, 0x000000b3,
+ 0x000000b9, 0x000000b9, 0x000006f0, 0x000006f9,
+ 0x00002070, 0x00002070, 0x00002074, 0x00002079,
+ 0x00002080, 0x00002089, 0x00002488, 0x0000249b,
+ 0x0000ff10, 0x0000ff19, 0x000102e1, 0x000102fb,
0x0001d7ce, 0x0001d7ff, 0x0001f100, 0x0001f10a,
0x0000002b, 0x0000002b, 0x0000002d, 0x0000002d,
0x0000207a, 0x0000207b, 0x0000208a, 0x0000208b,
@@ -1578,18 +1759,18 @@ static const unsigned int _ucprop_ranges[] = {
0x0000fe62, 0x0000fe63, 0x0000ff0b, 0x0000ff0b,
0x0000ff0d, 0x0000ff0d, 0x00000023, 0x00000025,
0x000000a2, 0x000000a5, 0x000000b0, 0x000000b1,
- 0x00000609, 0x0000060a, 0x0000066a, 0x0000066a,
- 0x000009f2, 0x000009f3, 0x000009fb, 0x000009fb,
- 0x00000af1, 0x00000af1, 0x00000bf9, 0x00000bf9,
- 0x00000e3f, 0x00000e3f, 0x000017db, 0x000017db,
- 0x00002030, 0x00002034, 0x000020a0, 0x000020b9,
- 0x0000212e, 0x0000212e, 0x00002213, 0x00002213,
- 0x0000a838, 0x0000a839, 0x0000fe5f, 0x0000fe5f,
- 0x0000fe69, 0x0000fe6a, 0x0000ff03, 0x0000ff05,
- 0x0000ffe0, 0x0000ffe1, 0x0000ffe5, 0x0000ffe6,
- 0x00000600, 0x00000603, 0x00000660, 0x00000669,
- 0x0000066b, 0x0000066c, 0x000006dd, 0x000006dd,
- 0x0000070f, 0x0000070f, 0x00010e60, 0x00010e7e,
+ 0x0000058f, 0x0000058f, 0x00000609, 0x0000060a,
+ 0x0000066a, 0x0000066a, 0x000009f2, 0x000009f3,
+ 0x000009fb, 0x000009fb, 0x00000af1, 0x00000af1,
+ 0x00000bf9, 0x00000bf9, 0x00000e3f, 0x00000e3f,
+ 0x000017db, 0x000017db, 0x00002030, 0x00002034,
+ 0x000020a0, 0x000020be, 0x0000212e, 0x0000212e,
+ 0x00002213, 0x00002213, 0x0000a838, 0x0000a839,
+ 0x0000fe5f, 0x0000fe5f, 0x0000fe69, 0x0000fe6a,
+ 0x0000ff03, 0x0000ff05, 0x0000ffe0, 0x0000ffe1,
+ 0x0000ffe5, 0x0000ffe6, 0x00000600, 0x00000605,
+ 0x00000660, 0x00000669, 0x0000066b, 0x0000066c,
+ 0x000006dd, 0x000006dd, 0x00010e60, 0x00010e7e,
0x0000002c, 0x0000002c, 0x0000002e, 0x0000002f,
0x0000003a, 0x0000003a, 0x000000a0, 0x000000a0,
0x0000060c, 0x0000060c, 0x0000202f, 0x0000202f,
@@ -1602,23 +1783,23 @@ static const unsigned int _ucprop_ranges[] = {
0x00000009, 0x00000009, 0x0000000b, 0x0000000b,
0x0000001f, 0x0000001f, 0x0000000c, 0x0000000c,
0x00000020, 0x00000020, 0x00001680, 0x00001680,
- 0x0000180e, 0x0000180e, 0x00002000, 0x0000200a,
- 0x00002028, 0x00002028, 0x0000205f, 0x0000205f,
- 0x00003000, 0x00003000, 0x00000000, 0x00000008,
- 0x0000000e, 0x0000001b, 0x00000021, 0x00000022,
- 0x00000026, 0x0000002a, 0x0000003b, 0x00000040,
- 0x0000005b, 0x00000060, 0x0000007b, 0x00000084,
- 0x00000086, 0x0000009f, 0x000000a1, 0x000000a1,
- 0x000000a6, 0x000000a9, 0x000000ab, 0x000000af,
- 0x000000b4, 0x000000b4, 0x000000b6, 0x000000b8,
- 0x000000bb, 0x000000bf, 0x000000d7, 0x000000d7,
- 0x000000f7, 0x000000f7, 0x000002b9, 0x000002ba,
- 0x000002c2, 0x000002cf, 0x000002d2, 0x000002df,
- 0x000002e5, 0x000002ed, 0x000002ef, 0x0000036f,
- 0x00000374, 0x00000375, 0x0000037e, 0x0000037e,
- 0x00000384, 0x00000385, 0x00000387, 0x00000387,
- 0x000003f6, 0x000003f6, 0x00000483, 0x00000489,
- 0x0000058a, 0x0000058a, 0x00000591, 0x000005bd,
+ 0x00002000, 0x0000200a, 0x00002028, 0x00002028,
+ 0x0000205f, 0x0000205f, 0x00003000, 0x00003000,
+ 0x00000000, 0x00000008, 0x0000000e, 0x0000001b,
+ 0x00000021, 0x00000022, 0x00000026, 0x0000002a,
+ 0x0000003b, 0x00000040, 0x0000005b, 0x00000060,
+ 0x0000007b, 0x00000084, 0x00000086, 0x0000009f,
+ 0x000000a1, 0x000000a1, 0x000000a6, 0x000000a9,
+ 0x000000ab, 0x000000af, 0x000000b4, 0x000000b4,
+ 0x000000b6, 0x000000b8, 0x000000bb, 0x000000bf,
+ 0x000000d7, 0x000000d7, 0x000000f7, 0x000000f7,
+ 0x000002b9, 0x000002ba, 0x000002c2, 0x000002cf,
+ 0x000002d2, 0x000002df, 0x000002e5, 0x000002ed,
+ 0x000002ef, 0x0000036f, 0x00000374, 0x00000375,
+ 0x0000037e, 0x0000037e, 0x00000384, 0x00000385,
+ 0x00000387, 0x00000387, 0x000003f6, 0x000003f6,
+ 0x00000483, 0x00000489, 0x0000058a, 0x0000058a,
+ 0x0000058d, 0x0000058e, 0x00000591, 0x000005bd,
0x000005bf, 0x000005bf, 0x000005c1, 0x000005c2,
0x000005c4, 0x000005c5, 0x000005c7, 0x000005c7,
0x00000606, 0x00000607, 0x0000060e, 0x0000061a,
@@ -1629,7 +1810,7 @@ static const unsigned int _ucprop_ranges[] = {
0x000007eb, 0x000007f3, 0x000007f6, 0x000007f9,
0x00000816, 0x00000819, 0x0000081b, 0x00000823,
0x00000825, 0x00000827, 0x00000829, 0x0000082d,
- 0x00000859, 0x0000085b, 0x00000900, 0x00000902,
+ 0x00000859, 0x0000085b, 0x000008e3, 0x00000902,
0x0000093a, 0x0000093a, 0x0000093c, 0x0000093c,
0x00000941, 0x00000948, 0x0000094d, 0x0000094d,
0x00000951, 0x00000957, 0x00000962, 0x00000963,
@@ -1648,109 +1829,116 @@ static const unsigned int _ucprop_ranges[] = {
0x00000b56, 0x00000b56, 0x00000b62, 0x00000b63,
0x00000b82, 0x00000b82, 0x00000bc0, 0x00000bc0,
0x00000bcd, 0x00000bcd, 0x00000bf3, 0x00000bf8,
- 0x00000bfa, 0x00000bfa, 0x00000c3e, 0x00000c40,
- 0x00000c46, 0x00000c48, 0x00000c4a, 0x00000c4d,
- 0x00000c55, 0x00000c56, 0x00000c62, 0x00000c63,
- 0x00000c78, 0x00000c7e, 0x00000cbc, 0x00000cbc,
+ 0x00000bfa, 0x00000bfa, 0x00000c00, 0x00000c00,
+ 0x00000c3e, 0x00000c40, 0x00000c46, 0x00000c48,
+ 0x00000c4a, 0x00000c4d, 0x00000c55, 0x00000c56,
+ 0x00000c62, 0x00000c63, 0x00000c78, 0x00000c7e,
+ 0x00000c81, 0x00000c81, 0x00000cbc, 0x00000cbc,
0x00000ccc, 0x00000ccd, 0x00000ce2, 0x00000ce3,
- 0x00000d41, 0x00000d44, 0x00000d4d, 0x00000d4d,
- 0x00000d62, 0x00000d63, 0x00000dca, 0x00000dca,
- 0x00000dd2, 0x00000dd4, 0x00000dd6, 0x00000dd6,
- 0x00000e31, 0x00000e31, 0x00000e34, 0x00000e3a,
- 0x00000e47, 0x00000e4e, 0x00000eb1, 0x00000eb1,
- 0x00000eb4, 0x00000eb9, 0x00000ebb, 0x00000ebc,
- 0x00000ec8, 0x00000ecd, 0x00000f18, 0x00000f19,
- 0x00000f35, 0x00000f35, 0x00000f37, 0x00000f37,
- 0x00000f39, 0x00000f3d, 0x00000f71, 0x00000f7e,
- 0x00000f80, 0x00000f84, 0x00000f86, 0x00000f87,
- 0x00000f8d, 0x00000f97, 0x00000f99, 0x00000fbc,
- 0x00000fc6, 0x00000fc6, 0x0000102d, 0x00001030,
- 0x00001032, 0x00001037, 0x00001039, 0x0000103a,
- 0x0000103d, 0x0000103e, 0x00001058, 0x00001059,
- 0x0000105e, 0x00001060, 0x00001071, 0x00001074,
- 0x00001082, 0x00001082, 0x00001085, 0x00001086,
- 0x0000108d, 0x0000108d, 0x0000109d, 0x0000109d,
- 0x0000135d, 0x0000135f, 0x00001390, 0x00001399,
- 0x00001400, 0x00001400, 0x0000169b, 0x0000169c,
- 0x00001712, 0x00001714, 0x00001732, 0x00001734,
- 0x00001752, 0x00001753, 0x00001772, 0x00001773,
+ 0x00000d01, 0x00000d01, 0x00000d41, 0x00000d44,
+ 0x00000d4d, 0x00000d4d, 0x00000d62, 0x00000d63,
+ 0x00000dca, 0x00000dca, 0x00000dd2, 0x00000dd4,
+ 0x00000dd6, 0x00000dd6, 0x00000e31, 0x00000e31,
+ 0x00000e34, 0x00000e3a, 0x00000e47, 0x00000e4e,
+ 0x00000eb1, 0x00000eb1, 0x00000eb4, 0x00000eb9,
+ 0x00000ebb, 0x00000ebc, 0x00000ec8, 0x00000ecd,
+ 0x00000f18, 0x00000f19, 0x00000f35, 0x00000f35,
+ 0x00000f37, 0x00000f37, 0x00000f39, 0x00000f3d,
+ 0x00000f71, 0x00000f7e, 0x00000f80, 0x00000f84,
+ 0x00000f86, 0x00000f87, 0x00000f8d, 0x00000f97,
+ 0x00000f99, 0x00000fbc, 0x00000fc6, 0x00000fc6,
+ 0x0000102d, 0x00001030, 0x00001032, 0x00001037,
+ 0x00001039, 0x0000103a, 0x0000103d, 0x0000103e,
+ 0x00001058, 0x00001059, 0x0000105e, 0x00001060,
+ 0x00001071, 0x00001074, 0x00001082, 0x00001082,
+ 0x00001085, 0x00001086, 0x0000108d, 0x0000108d,
+ 0x0000109d, 0x0000109d, 0x0000135d, 0x0000135f,
+ 0x00001390, 0x00001399, 0x00001400, 0x00001400,
+ 0x0000169b, 0x0000169c, 0x00001712, 0x00001714,
+ 0x00001732, 0x00001734, 0x00001752, 0x00001753,
+ 0x00001772, 0x00001773, 0x000017b4, 0x000017b5,
0x000017b7, 0x000017bd, 0x000017c6, 0x000017c6,
0x000017c9, 0x000017d3, 0x000017dd, 0x000017dd,
- 0x000017f0, 0x000017f9, 0x00001800, 0x0000180d,
+ 0x000017f0, 0x000017f9, 0x00001800, 0x0000180e,
0x000018a9, 0x000018a9, 0x00001920, 0x00001922,
0x00001927, 0x00001928, 0x00001932, 0x00001932,
0x00001939, 0x0000193b, 0x00001940, 0x00001940,
0x00001944, 0x00001945, 0x000019de, 0x000019ff,
- 0x00001a17, 0x00001a18, 0x00001a56, 0x00001a56,
- 0x00001a58, 0x00001a5e, 0x00001a60, 0x00001a60,
- 0x00001a62, 0x00001a62, 0x00001a65, 0x00001a6c,
- 0x00001a73, 0x00001a7c, 0x00001a7f, 0x00001a7f,
+ 0x00001a17, 0x00001a18, 0x00001a1b, 0x00001a1b,
+ 0x00001a56, 0x00001a56, 0x00001a58, 0x00001a5e,
+ 0x00001a60, 0x00001a60, 0x00001a62, 0x00001a62,
+ 0x00001a65, 0x00001a6c, 0x00001a73, 0x00001a7c,
+ 0x00001a7f, 0x00001a7f, 0x00001ab0, 0x00001abe,
0x00001b00, 0x00001b03, 0x00001b34, 0x00001b34,
0x00001b36, 0x00001b3a, 0x00001b3c, 0x00001b3c,
0x00001b42, 0x00001b42, 0x00001b6b, 0x00001b73,
0x00001b80, 0x00001b81, 0x00001ba2, 0x00001ba5,
- 0x00001ba8, 0x00001ba9, 0x00001be6, 0x00001be6,
- 0x00001be8, 0x00001be9, 0x00001bed, 0x00001bed,
- 0x00001bef, 0x00001bf1, 0x00001c2c, 0x00001c33,
- 0x00001c36, 0x00001c37, 0x00001cd0, 0x00001cd2,
- 0x00001cd4, 0x00001ce0, 0x00001ce2, 0x00001ce8,
- 0x00001ced, 0x00001ced, 0x00001dc0, 0x00001de6,
- 0x00001dfc, 0x00001dff, 0x00001fbd, 0x00001fbd,
- 0x00001fbf, 0x00001fc1, 0x00001fcd, 0x00001fcf,
- 0x00001fdd, 0x00001fdf, 0x00001fed, 0x00001fef,
- 0x00001ffd, 0x00001ffe, 0x0000200b, 0x0000200d,
- 0x00002010, 0x00002027, 0x0000202a, 0x0000202e,
- 0x00002035, 0x00002043, 0x00002045, 0x0000205e,
- 0x00002060, 0x00002064, 0x0000206a, 0x0000206f,
- 0x0000207c, 0x0000207e, 0x0000208c, 0x0000208e,
- 0x000020d0, 0x000020f0, 0x00002100, 0x00002101,
- 0x00002103, 0x00002106, 0x00002108, 0x00002109,
- 0x00002114, 0x00002114, 0x00002116, 0x00002118,
- 0x0000211e, 0x00002123, 0x00002125, 0x00002125,
- 0x00002127, 0x00002127, 0x00002129, 0x00002129,
- 0x0000213a, 0x0000213b, 0x00002140, 0x00002144,
- 0x0000214a, 0x0000214d, 0x00002150, 0x0000215f,
- 0x00002189, 0x00002189, 0x00002190, 0x00002211,
- 0x00002214, 0x00002335, 0x0000237b, 0x00002394,
- 0x00002396, 0x000023f3, 0x00002400, 0x00002426,
- 0x00002440, 0x0000244a, 0x00002460, 0x00002487,
- 0x000024ea, 0x000026ab, 0x000026ad, 0x000026ff,
- 0x00002701, 0x000027ca, 0x000027cc, 0x000027cc,
- 0x000027ce, 0x000027ff, 0x00002900, 0x00002b4c,
- 0x00002b50, 0x00002b59, 0x00002ce5, 0x00002cea,
+ 0x00001ba8, 0x00001ba9, 0x00001bab, 0x00001bad,
+ 0x00001be6, 0x00001be6, 0x00001be8, 0x00001be9,
+ 0x00001bed, 0x00001bed, 0x00001bef, 0x00001bf1,
+ 0x00001c2c, 0x00001c33, 0x00001c36, 0x00001c37,
+ 0x00001cd0, 0x00001cd2, 0x00001cd4, 0x00001ce0,
+ 0x00001ce2, 0x00001ce8, 0x00001ced, 0x00001ced,
+ 0x00001cf4, 0x00001cf4, 0x00001cf8, 0x00001cf9,
+ 0x00001dc0, 0x00001df5, 0x00001dfc, 0x00001dff,
+ 0x00001fbd, 0x00001fbd, 0x00001fbf, 0x00001fc1,
+ 0x00001fcd, 0x00001fcf, 0x00001fdd, 0x00001fdf,
+ 0x00001fed, 0x00001fef, 0x00001ffd, 0x00001ffe,
+ 0x0000200b, 0x0000200d, 0x00002010, 0x00002027,
+ 0x0000202a, 0x0000202e, 0x00002035, 0x00002043,
+ 0x00002045, 0x0000205e, 0x00002060, 0x00002064,
+ 0x0000206a, 0x0000206f, 0x0000207c, 0x0000207e,
+ 0x0000208c, 0x0000208e, 0x000020d0, 0x000020f0,
+ 0x00002100, 0x00002101, 0x00002103, 0x00002106,
+ 0x00002108, 0x00002109, 0x00002114, 0x00002114,
+ 0x00002116, 0x00002118, 0x0000211e, 0x00002123,
+ 0x00002125, 0x00002125, 0x00002127, 0x00002127,
+ 0x00002129, 0x00002129, 0x0000213a, 0x0000213b,
+ 0x00002140, 0x00002144, 0x0000214a, 0x0000214d,
+ 0x00002150, 0x0000215f, 0x00002189, 0x0000218b,
+ 0x00002190, 0x00002211, 0x00002214, 0x00002335,
+ 0x0000237b, 0x00002394, 0x00002396, 0x000023fa,
+ 0x00002400, 0x00002426, 0x00002440, 0x0000244a,
+ 0x00002460, 0x00002487, 0x000024ea, 0x000026ab,
+ 0x000026ad, 0x000027ff, 0x00002900, 0x00002b73,
+ 0x00002b76, 0x00002b95, 0x00002b98, 0x00002bb9,
+ 0x00002bbd, 0x00002bc8, 0x00002bca, 0x00002bd1,
+ 0x00002bec, 0x00002bef, 0x00002ce5, 0x00002cea,
0x00002cef, 0x00002cf1, 0x00002cf9, 0x00002cff,
- 0x00002d7f, 0x00002d7f, 0x00002de0, 0x00002e31,
+ 0x00002d7f, 0x00002d7f, 0x00002de0, 0x00002e42,
0x00002e80, 0x00002e99, 0x00002e9b, 0x00002ef3,
0x00002f00, 0x00002fd5, 0x00002ff0, 0x00002ffb,
0x00003001, 0x00003004, 0x00003008, 0x00003020,
- 0x0000302a, 0x00003030, 0x00003036, 0x00003037,
- 0x0000303d, 0x0000303f, 0x00003099, 0x0000309c,
- 0x000030a0, 0x000030a0, 0x000030fb, 0x000030fb,
- 0x000031c0, 0x000031e3, 0x0000321d, 0x0000321e,
- 0x00003250, 0x0000325f, 0x0000327c, 0x0000327e,
- 0x000032b1, 0x000032bf, 0x000032cc, 0x000032cf,
- 0x00003377, 0x0000337a, 0x000033de, 0x000033df,
- 0x000033ff, 0x000033ff, 0x00004dc0, 0x00004dff,
- 0x0000a490, 0x0000a4c6, 0x0000a60d, 0x0000a60f,
- 0x0000a66f, 0x0000a673, 0x0000a67c, 0x0000a67f,
- 0x0000a6f0, 0x0000a6f1, 0x0000a700, 0x0000a721,
- 0x0000a788, 0x0000a788, 0x0000a802, 0x0000a802,
- 0x0000a806, 0x0000a806, 0x0000a80b, 0x0000a80b,
- 0x0000a825, 0x0000a826, 0x0000a828, 0x0000a82b,
- 0x0000a874, 0x0000a877, 0x0000a8c4, 0x0000a8c4,
- 0x0000a8e0, 0x0000a8f1, 0x0000a926, 0x0000a92d,
- 0x0000a947, 0x0000a951, 0x0000a980, 0x0000a982,
- 0x0000a9b3, 0x0000a9b3, 0x0000a9b6, 0x0000a9b9,
- 0x0000a9bc, 0x0000a9bc, 0x0000aa29, 0x0000aa2e,
+ 0x0000302a, 0x0000302d, 0x00003030, 0x00003030,
+ 0x00003036, 0x00003037, 0x0000303d, 0x0000303f,
+ 0x00003099, 0x0000309c, 0x000030a0, 0x000030a0,
+ 0x000030fb, 0x000030fb, 0x000031c0, 0x000031e3,
+ 0x0000321d, 0x0000321e, 0x00003250, 0x0000325f,
+ 0x0000327c, 0x0000327e, 0x000032b1, 0x000032bf,
+ 0x000032cc, 0x000032cf, 0x00003377, 0x0000337a,
+ 0x000033de, 0x000033df, 0x000033ff, 0x000033ff,
+ 0x00004dc0, 0x00004dff, 0x0000a490, 0x0000a4c6,
+ 0x0000a60d, 0x0000a60f, 0x0000a66f, 0x0000a67f,
+ 0x0000a69e, 0x0000a69f, 0x0000a6f0, 0x0000a6f1,
+ 0x0000a700, 0x0000a721, 0x0000a788, 0x0000a788,
+ 0x0000a802, 0x0000a802, 0x0000a806, 0x0000a806,
+ 0x0000a80b, 0x0000a80b, 0x0000a825, 0x0000a826,
+ 0x0000a828, 0x0000a82b, 0x0000a874, 0x0000a877,
+ 0x0000a8c4, 0x0000a8c4, 0x0000a8e0, 0x0000a8f1,
+ 0x0000a926, 0x0000a92d, 0x0000a947, 0x0000a951,
+ 0x0000a980, 0x0000a982, 0x0000a9b3, 0x0000a9b3,
+ 0x0000a9b6, 0x0000a9b9, 0x0000a9bc, 0x0000a9bc,
+ 0x0000a9e5, 0x0000a9e5, 0x0000aa29, 0x0000aa2e,
0x0000aa31, 0x0000aa32, 0x0000aa35, 0x0000aa36,
0x0000aa43, 0x0000aa43, 0x0000aa4c, 0x0000aa4c,
- 0x0000aab0, 0x0000aab0, 0x0000aab2, 0x0000aab4,
- 0x0000aab7, 0x0000aab8, 0x0000aabe, 0x0000aabf,
- 0x0000aac1, 0x0000aac1, 0x0000abe5, 0x0000abe5,
- 0x0000abe8, 0x0000abe8, 0x0000abed, 0x0000abed,
- 0x0000fb1e, 0x0000fb1e, 0x0000fd3e, 0x0000fd3f,
- 0x0000fdfd, 0x0000fdfd, 0x0000fe00, 0x0000fe19,
- 0x0000fe20, 0x0000fe26, 0x0000fe30, 0x0000fe4f,
+ 0x0000aa7c, 0x0000aa7c, 0x0000aab0, 0x0000aab0,
+ 0x0000aab2, 0x0000aab4, 0x0000aab7, 0x0000aab8,
+ 0x0000aabe, 0x0000aabf, 0x0000aac1, 0x0000aac1,
+ 0x0000aaec, 0x0000aaed, 0x0000aaf6, 0x0000aaf6,
+ 0x0000abe5, 0x0000abe5, 0x0000abe8, 0x0000abe8,
+ 0x0000abed, 0x0000abed, 0x0000fb1e, 0x0000fb1e,
+ 0x0000fd3e, 0x0000fd3f, 0x0000fdfd, 0x0000fdfd,
+ 0x0000fe00, 0x0000fe19, 0x0000fe20, 0x0000fe4f,
0x0000fe51, 0x0000fe51, 0x0000fe54, 0x0000fe54,
0x0000fe56, 0x0000fe5e, 0x0000fe60, 0x0000fe61,
0x0000fe64, 0x0000fe66, 0x0000fe68, 0x0000fe68,
@@ -1759,166 +1947,187 @@ static const unsigned int _ucprop_ranges[] = {
0x0000ff1b, 0x0000ff20, 0x0000ff3b, 0x0000ff40,
0x0000ff5b, 0x0000ff65, 0x0000ffe2, 0x0000ffe4,
0x0000ffe8, 0x0000ffee, 0x0000fff9, 0x0000fffd,
- 0x00010101, 0x00010101, 0x00010140, 0x0001018a,
- 0x00010190, 0x0001019b, 0x000101fd, 0x000101fd,
- 0x0001091f, 0x0001091f, 0x00010a01, 0x00010a03,
- 0x00010a05, 0x00010a06, 0x00010a0c, 0x00010a0f,
- 0x00010a38, 0x00010a3a, 0x00010a3f, 0x00010a3f,
+ 0x00010101, 0x00010101, 0x00010140, 0x0001018c,
+ 0x00010190, 0x0001019b, 0x000101a0, 0x000101a0,
+ 0x000101fd, 0x000101fd, 0x000102e0, 0x000102e0,
+ 0x00010376, 0x0001037a, 0x0001091f, 0x0001091f,
+ 0x00010a01, 0x00010a03, 0x00010a05, 0x00010a06,
+ 0x00010a0c, 0x00010a0f, 0x00010a38, 0x00010a3a,
+ 0x00010a3f, 0x00010a3f, 0x00010ae5, 0x00010ae6,
0x00010b39, 0x00010b3f, 0x00011001, 0x00011001,
0x00011038, 0x00011046, 0x00011052, 0x00011065,
- 0x00011080, 0x00011081, 0x000110b3, 0x000110b6,
- 0x000110b9, 0x000110ba, 0x0001d167, 0x0001d169,
+ 0x0001107f, 0x00011081, 0x000110b3, 0x000110b6,
+ 0x000110b9, 0x000110ba, 0x00011100, 0x00011102,
+ 0x00011127, 0x0001112b, 0x0001112d, 0x00011134,
+ 0x00011173, 0x00011173, 0x00011180, 0x00011181,
+ 0x000111b6, 0x000111be, 0x000111ca, 0x000111cc,
+ 0x0001122f, 0x00011231, 0x00011234, 0x00011234,
+ 0x00011236, 0x00011237, 0x000112df, 0x000112df,
+ 0x000112e3, 0x000112ea, 0x00011300, 0x00011301,
+ 0x0001133c, 0x0001133c, 0x00011340, 0x00011340,
+ 0x00011366, 0x0001136c, 0x00011370, 0x00011374,
+ 0x000114b3, 0x000114b8, 0x000114ba, 0x000114ba,
+ 0x000114bf, 0x000114c0, 0x000114c2, 0x000114c3,
+ 0x000115b2, 0x000115b5, 0x000115bc, 0x000115bd,
+ 0x000115bf, 0x000115c0, 0x000115dc, 0x000115dd,
+ 0x00011633, 0x0001163a, 0x0001163d, 0x0001163d,
+ 0x0001163f, 0x00011640, 0x000116ab, 0x000116ab,
+ 0x000116ad, 0x000116ad, 0x000116b0, 0x000116b5,
+ 0x000116b7, 0x000116b7, 0x0001171d, 0x0001171f,
+ 0x00011722, 0x00011725, 0x00011727, 0x0001172b,
+ 0x00016af0, 0x00016af4, 0x00016b30, 0x00016b36,
+ 0x00016f8f, 0x00016f92, 0x0001bc9d, 0x0001bc9e,
+ 0x0001bca0, 0x0001bca3, 0x0001d167, 0x0001d169,
0x0001d173, 0x0001d182, 0x0001d185, 0x0001d18b,
0x0001d1aa, 0x0001d1ad, 0x0001d200, 0x0001d245,
0x0001d300, 0x0001d356, 0x0001d6db, 0x0001d6db,
0x0001d715, 0x0001d715, 0x0001d74f, 0x0001d74f,
0x0001d789, 0x0001d789, 0x0001d7c3, 0x0001d7c3,
+ 0x0001da00, 0x0001da36, 0x0001da3b, 0x0001da6c,
+ 0x0001da75, 0x0001da75, 0x0001da84, 0x0001da84,
+ 0x0001da9b, 0x0001da9f, 0x0001daa1, 0x0001daaf,
+ 0x0001e8d0, 0x0001e8d6, 0x0001eef0, 0x0001eef1,
0x0001f000, 0x0001f02b, 0x0001f030, 0x0001f093,
- 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0be,
- 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0df,
- 0x0001f300, 0x0001f320, 0x0001f330, 0x0001f335,
- 0x0001f337, 0x0001f37c, 0x0001f380, 0x0001f393,
- 0x0001f3a0, 0x0001f3c4, 0x0001f3c6, 0x0001f3ca,
- 0x0001f3e0, 0x0001f3f0, 0x0001f400, 0x0001f43e,
- 0x0001f440, 0x0001f440, 0x0001f442, 0x0001f48b,
- 0x0001f48d, 0x0001f4f7, 0x0001f4f9, 0x0001f4fc,
- 0x0001f500, 0x0001f523, 0x0001f525, 0x0001f53d,
- 0x0001f550, 0x0001f567, 0x0001f5fb, 0x0001f5ff,
- 0x0001f601, 0x0001f610, 0x0001f612, 0x0001f614,
- 0x0001f616, 0x0001f616, 0x0001f618, 0x0001f618,
- 0x0001f61a, 0x0001f61a, 0x0001f61c, 0x0001f61e,
- 0x0001f620, 0x0001f625, 0x0001f628, 0x0001f62b,
- 0x0001f62d, 0x0001f62d, 0x0001f630, 0x0001f633,
- 0x0001f635, 0x0001f640, 0x0001f645, 0x0001f64f,
- 0x0001f680, 0x0001f6c5, 0x0001f700, 0x0001f773,
- 0x000e0001, 0x000e0001, 0x000e0020, 0x000e007f,
- 0x000e0100, 0x000e01ef, 0x000000c0, 0x000000c5,
- 0x000000c7, 0x000000cf, 0x000000d1, 0x000000d6,
- 0x000000d9, 0x000000dd, 0x000000e0, 0x000000e5,
- 0x000000e7, 0x000000ef, 0x000000f1, 0x000000f6,
- 0x000000f9, 0x000000fd, 0x000000ff, 0x0000010f,
- 0x00000112, 0x00000125, 0x00000128, 0x00000130,
- 0x00000134, 0x00000137, 0x00000139, 0x0000013e,
- 0x00000143, 0x00000148, 0x0000014c, 0x00000151,
- 0x00000154, 0x00000165, 0x00000168, 0x0000017e,
- 0x000001a0, 0x000001a1, 0x000001af, 0x000001b0,
- 0x000001cd, 0x000001dc, 0x000001de, 0x000001e3,
- 0x000001e6, 0x000001f0, 0x000001f4, 0x000001f5,
- 0x000001f8, 0x0000021b, 0x0000021e, 0x0000021f,
- 0x00000226, 0x00000233, 0x00000340, 0x00000341,
- 0x00000343, 0x00000344, 0x00000374, 0x00000374,
- 0x0000037e, 0x0000037e, 0x00000385, 0x0000038a,
- 0x0000038c, 0x0000038c, 0x0000038e, 0x00000390,
- 0x000003aa, 0x000003b0, 0x000003ca, 0x000003ce,
- 0x000003d3, 0x000003d4, 0x00000400, 0x00000401,
- 0x00000403, 0x00000403, 0x00000407, 0x00000407,
- 0x0000040c, 0x0000040e, 0x00000419, 0x00000419,
- 0x00000439, 0x00000439, 0x00000450, 0x00000451,
- 0x00000453, 0x00000453, 0x00000457, 0x00000457,
- 0x0000045c, 0x0000045e, 0x00000476, 0x00000477,
- 0x000004c1, 0x000004c2, 0x000004d0, 0x000004d3,
- 0x000004d6, 0x000004d7, 0x000004da, 0x000004df,
- 0x000004e2, 0x000004e7, 0x000004ea, 0x000004f5,
- 0x000004f8, 0x000004f9, 0x00000622, 0x00000626,
- 0x000006c0, 0x000006c0, 0x000006c2, 0x000006c2,
- 0x000006d3, 0x000006d3, 0x00000929, 0x00000929,
- 0x00000931, 0x00000931, 0x00000934, 0x00000934,
- 0x00000958, 0x0000095f, 0x000009cb, 0x000009cc,
- 0x000009dc, 0x000009dd, 0x000009df, 0x000009df,
- 0x00000a33, 0x00000a33, 0x00000a36, 0x00000a36,
- 0x00000a59, 0x00000a5b, 0x00000a5e, 0x00000a5e,
- 0x00000b48, 0x00000b48, 0x00000b4b, 0x00000b4c,
- 0x00000b5c, 0x00000b5d, 0x00000b94, 0x00000b94,
- 0x00000bca, 0x00000bcc, 0x00000c48, 0x00000c48,
- 0x00000cc0, 0x00000cc0, 0x00000cc7, 0x00000cc8,
- 0x00000cca, 0x00000ccb, 0x00000d4a, 0x00000d4c,
- 0x00000dda, 0x00000dda, 0x00000ddc, 0x00000dde,
- 0x00000f43, 0x00000f43, 0x00000f4d, 0x00000f4d,
- 0x00000f52, 0x00000f52, 0x00000f57, 0x00000f57,
- 0x00000f5c, 0x00000f5c, 0x00000f69, 0x00000f69,
- 0x00000f73, 0x00000f73, 0x00000f75, 0x00000f76,
- 0x00000f78, 0x00000f78, 0x00000f81, 0x00000f81,
- 0x00000f93, 0x00000f93, 0x00000f9d, 0x00000f9d,
- 0x00000fa2, 0x00000fa2, 0x00000fa7, 0x00000fa7,
- 0x00000fac, 0x00000fac, 0x00000fb9, 0x00000fb9,
- 0x00001026, 0x00001026, 0x00001b06, 0x00001b06,
- 0x00001b08, 0x00001b08, 0x00001b0a, 0x00001b0a,
- 0x00001b0c, 0x00001b0c, 0x00001b0e, 0x00001b0e,
- 0x00001b12, 0x00001b12, 0x00001b3b, 0x00001b3b,
- 0x00001b3d, 0x00001b3d, 0x00001b40, 0x00001b41,
- 0x00001b43, 0x00001b43, 0x00001e00, 0x00001e99,
- 0x00001e9b, 0x00001e9b, 0x00001ea0, 0x00001ef9,
- 0x00001f00, 0x00001f15, 0x00001f18, 0x00001f1d,
- 0x00001f20, 0x00001f45, 0x00001f48, 0x00001f4d,
- 0x00001f50, 0x00001f57, 0x00001f59, 0x00001f59,
- 0x00001f5b, 0x00001f5b, 0x00001f5d, 0x00001f5d,
- 0x00001f5f, 0x00001f7d, 0x00001f80, 0x00001fb4,
- 0x00001fb6, 0x00001fbc, 0x00001fbe, 0x00001fbe,
- 0x00001fc1, 0x00001fc4, 0x00001fc6, 0x00001fd3,
- 0x00001fd6, 0x00001fdb, 0x00001fdd, 0x00001fef,
- 0x00001ff2, 0x00001ff4, 0x00001ff6, 0x00001ffd,
- 0x00002000, 0x00002001, 0x00002126, 0x00002126,
- 0x0000212a, 0x0000212b, 0x0000219a, 0x0000219b,
- 0x000021ae, 0x000021ae, 0x000021cd, 0x000021cf,
- 0x00002204, 0x00002204, 0x00002209, 0x00002209,
- 0x0000220c, 0x0000220c, 0x00002224, 0x00002224,
- 0x00002226, 0x00002226, 0x00002241, 0x00002241,
- 0x00002244, 0x00002244, 0x00002247, 0x00002247,
- 0x00002249, 0x00002249, 0x00002260, 0x00002260,
- 0x00002262, 0x00002262, 0x0000226d, 0x00002271,
- 0x00002274, 0x00002275, 0x00002278, 0x00002279,
- 0x00002280, 0x00002281, 0x00002284, 0x00002285,
- 0x00002288, 0x00002289, 0x000022ac, 0x000022af,
- 0x000022e0, 0x000022e3, 0x000022ea, 0x000022ed,
- 0x00002329, 0x0000232a, 0x00002adc, 0x00002adc,
- 0x0000304c, 0x0000304c, 0x0000304e, 0x0000304e,
- 0x00003050, 0x00003050, 0x00003052, 0x00003052,
- 0x00003054, 0x00003054, 0x00003056, 0x00003056,
- 0x00003058, 0x00003058, 0x0000305a, 0x0000305a,
- 0x0000305c, 0x0000305c, 0x0000305e, 0x0000305e,
- 0x00003060, 0x00003060, 0x00003062, 0x00003062,
- 0x00003065, 0x00003065, 0x00003067, 0x00003067,
- 0x00003069, 0x00003069, 0x00003070, 0x00003071,
- 0x00003073, 0x00003074, 0x00003076, 0x00003077,
- 0x00003079, 0x0000307a, 0x0000307c, 0x0000307d,
- 0x00003094, 0x00003094, 0x0000309e, 0x0000309e,
- 0x000030ac, 0x000030ac, 0x000030ae, 0x000030ae,
- 0x000030b0, 0x000030b0, 0x000030b2, 0x000030b2,
- 0x000030b4, 0x000030b4, 0x000030b6, 0x000030b6,
- 0x000030b8, 0x000030b8, 0x000030ba, 0x000030ba,
- 0x000030bc, 0x000030bc, 0x000030be, 0x000030be,
- 0x000030c0, 0x000030c0, 0x000030c2, 0x000030c2,
- 0x000030c5, 0x000030c5, 0x000030c7, 0x000030c7,
- 0x000030c9, 0x000030c9, 0x000030d0, 0x000030d1,
- 0x000030d3, 0x000030d4, 0x000030d6, 0x000030d7,
- 0x000030d9, 0x000030da, 0x000030dc, 0x000030dd,
- 0x000030f4, 0x000030f4, 0x000030f7, 0x000030fa,
- 0x000030fe, 0x000030fe, 0x0000f902, 0x0000fa0d,
- 0x0000fa10, 0x0000fa10, 0x0000fa12, 0x0000fa12,
- 0x0000fa15, 0x0000fa1e, 0x0000fa20, 0x0000fa20,
- 0x0000fa22, 0x0000fa22, 0x0000fa25, 0x0000fa26,
- 0x0000fa2a, 0x0000fa2d, 0x0000fa30, 0x0000fa6d,
+ 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0bf,
+ 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0f5,
+ 0x0001f10b, 0x0001f10c, 0x0001f16a, 0x0001f16b,
+ 0x0001f300, 0x0001f579, 0x0001f57b, 0x0001f5a3,
+ 0x0001f5a5, 0x0001f6d0, 0x0001f6e0, 0x0001f6ec,
+ 0x0001f6f0, 0x0001f6f3, 0x0001f700, 0x0001f773,
+ 0x0001f780, 0x0001f7d4, 0x0001f800, 0x0001f80b,
+ 0x0001f810, 0x0001f847, 0x0001f850, 0x0001f859,
+ 0x0001f860, 0x0001f887, 0x0001f890, 0x0001f8ad,
+ 0x0001f910, 0x0001f918, 0x0001f980, 0x0001f984,
+ 0x0001f9c0, 0x0001f9c0, 0x000e0001, 0x000e0001,
+ 0x000e0020, 0x000e007f, 0x000e0100, 0x000e01ef,
+ 0x000000c0, 0x000000c5, 0x000000c7, 0x000000cf,
+ 0x000000d1, 0x000000d6, 0x000000d9, 0x000000dd,
+ 0x000000e0, 0x000000e5, 0x000000e7, 0x000000ef,
+ 0x000000f1, 0x000000f6, 0x000000f9, 0x000000fd,
+ 0x000000ff, 0x0000010f, 0x00000112, 0x00000125,
+ 0x00000128, 0x00000130, 0x00000134, 0x00000137,
+ 0x00000139, 0x0000013e, 0x00000143, 0x00000148,
+ 0x0000014c, 0x00000151, 0x00000154, 0x00000165,
+ 0x00000168, 0x0000017e, 0x000001a0, 0x000001a1,
+ 0x000001af, 0x000001b0, 0x000001cd, 0x000001dc,
+ 0x000001de, 0x000001e3, 0x000001e6, 0x000001f0,
+ 0x000001f4, 0x000001f5, 0x000001f8, 0x0000021b,
+ 0x0000021e, 0x0000021f, 0x00000226, 0x00000233,
+ 0x00000340, 0x00000341, 0x00000343, 0x00000344,
+ 0x00000374, 0x00000374, 0x0000037e, 0x0000037e,
+ 0x00000385, 0x0000038a, 0x0000038c, 0x0000038c,
+ 0x0000038e, 0x00000390, 0x000003aa, 0x000003b0,
+ 0x000003ca, 0x000003ce, 0x000003d3, 0x000003d4,
+ 0x00000400, 0x00000401, 0x00000403, 0x00000403,
+ 0x00000407, 0x00000407, 0x0000040c, 0x0000040e,
+ 0x00000419, 0x00000419, 0x00000439, 0x00000439,
+ 0x00000450, 0x00000451, 0x00000453, 0x00000453,
+ 0x00000457, 0x00000457, 0x0000045c, 0x0000045e,
+ 0x00000476, 0x00000477, 0x000004c1, 0x000004c2,
+ 0x000004d0, 0x000004d3, 0x000004d6, 0x000004d7,
+ 0x000004da, 0x000004df, 0x000004e2, 0x000004e7,
+ 0x000004ea, 0x000004f5, 0x000004f8, 0x000004f9,
+ 0x00000622, 0x00000626, 0x000006c0, 0x000006c0,
+ 0x000006c2, 0x000006c2, 0x000006d3, 0x000006d3,
+ 0x00000929, 0x00000929, 0x00000931, 0x00000931,
+ 0x00000934, 0x00000934, 0x00000958, 0x0000095f,
+ 0x000009cb, 0x000009cc, 0x000009dc, 0x000009dd,
+ 0x000009df, 0x000009df, 0x00000a33, 0x00000a33,
+ 0x00000a36, 0x00000a36, 0x00000a59, 0x00000a5b,
+ 0x00000a5e, 0x00000a5e, 0x00000b48, 0x00000b48,
+ 0x00000b4b, 0x00000b4c, 0x00000b5c, 0x00000b5d,
+ 0x00000b94, 0x00000b94, 0x00000bca, 0x00000bcc,
+ 0x00000c48, 0x00000c48, 0x00000cc0, 0x00000cc0,
+ 0x00000cc7, 0x00000cc8, 0x00000cca, 0x00000ccb,
+ 0x00000d4a, 0x00000d4c, 0x00000dda, 0x00000dda,
+ 0x00000ddc, 0x00000dde, 0x00000f43, 0x00000f43,
+ 0x00000f4d, 0x00000f4d, 0x00000f52, 0x00000f52,
+ 0x00000f57, 0x00000f57, 0x00000f5c, 0x00000f5c,
+ 0x00000f69, 0x00000f69, 0x00000f73, 0x00000f73,
+ 0x00000f75, 0x00000f76, 0x00000f78, 0x00000f78,
+ 0x00000f81, 0x00000f81, 0x00000f93, 0x00000f93,
+ 0x00000f9d, 0x00000f9d, 0x00000fa2, 0x00000fa2,
+ 0x00000fa7, 0x00000fa7, 0x00000fac, 0x00000fac,
+ 0x00000fb9, 0x00000fb9, 0x00001026, 0x00001026,
+ 0x00001b06, 0x00001b06, 0x00001b08, 0x00001b08,
+ 0x00001b0a, 0x00001b0a, 0x00001b0c, 0x00001b0c,
+ 0x00001b0e, 0x00001b0e, 0x00001b12, 0x00001b12,
+ 0x00001b3b, 0x00001b3b, 0x00001b3d, 0x00001b3d,
+ 0x00001b40, 0x00001b41, 0x00001b43, 0x00001b43,
+ 0x00001e00, 0x00001e99, 0x00001e9b, 0x00001e9b,
+ 0x00001ea0, 0x00001ef9, 0x00001f00, 0x00001f15,
+ 0x00001f18, 0x00001f1d, 0x00001f20, 0x00001f45,
+ 0x00001f48, 0x00001f4d, 0x00001f50, 0x00001f57,
+ 0x00001f59, 0x00001f59, 0x00001f5b, 0x00001f5b,
+ 0x00001f5d, 0x00001f5d, 0x00001f5f, 0x00001f7d,
+ 0x00001f80, 0x00001fb4, 0x00001fb6, 0x00001fbc,
+ 0x00001fbe, 0x00001fbe, 0x00001fc1, 0x00001fc4,
+ 0x00001fc6, 0x00001fd3, 0x00001fd6, 0x00001fdb,
+ 0x00001fdd, 0x00001fef, 0x00001ff2, 0x00001ff4,
+ 0x00001ff6, 0x00001ffd, 0x00002000, 0x00002001,
+ 0x00002126, 0x00002126, 0x0000212a, 0x0000212b,
+ 0x0000219a, 0x0000219b, 0x000021ae, 0x000021ae,
+ 0x000021cd, 0x000021cf, 0x00002204, 0x00002204,
+ 0x00002209, 0x00002209, 0x0000220c, 0x0000220c,
+ 0x00002224, 0x00002224, 0x00002226, 0x00002226,
+ 0x00002241, 0x00002241, 0x00002244, 0x00002244,
+ 0x00002247, 0x00002247, 0x00002249, 0x00002249,
+ 0x00002260, 0x00002260, 0x00002262, 0x00002262,
+ 0x0000226d, 0x00002271, 0x00002274, 0x00002275,
+ 0x00002278, 0x00002279, 0x00002280, 0x00002281,
+ 0x00002284, 0x00002285, 0x00002288, 0x00002289,
+ 0x000022ac, 0x000022af, 0x000022e0, 0x000022e3,
+ 0x000022ea, 0x000022ed, 0x00002329, 0x0000232a,
+ 0x00002adc, 0x00002adc, 0x0000304c, 0x0000304c,
+ 0x0000304e, 0x0000304e, 0x00003050, 0x00003050,
+ 0x00003052, 0x00003052, 0x00003054, 0x00003054,
+ 0x00003056, 0x00003056, 0x00003058, 0x00003058,
+ 0x0000305a, 0x0000305a, 0x0000305c, 0x0000305c,
+ 0x0000305e, 0x0000305e, 0x00003060, 0x00003060,
+ 0x00003062, 0x00003062, 0x00003065, 0x00003065,
+ 0x00003067, 0x00003067, 0x00003069, 0x00003069,
+ 0x00003070, 0x00003071, 0x00003073, 0x00003074,
+ 0x00003076, 0x00003077, 0x00003079, 0x0000307a,
+ 0x0000307c, 0x0000307d, 0x00003094, 0x00003094,
+ 0x0000309e, 0x0000309e, 0x000030ac, 0x000030ac,
+ 0x000030ae, 0x000030ae, 0x000030b0, 0x000030b0,
+ 0x000030b2, 0x000030b2, 0x000030b4, 0x000030b4,
+ 0x000030b6, 0x000030b6, 0x000030b8, 0x000030b8,
+ 0x000030ba, 0x000030ba, 0x000030bc, 0x000030bc,
+ 0x000030be, 0x000030be, 0x000030c0, 0x000030c0,
+ 0x000030c2, 0x000030c2, 0x000030c5, 0x000030c5,
+ 0x000030c7, 0x000030c7, 0x000030c9, 0x000030c9,
+ 0x000030d0, 0x000030d1, 0x000030d3, 0x000030d4,
+ 0x000030d6, 0x000030d7, 0x000030d9, 0x000030da,
+ 0x000030dc, 0x000030dd, 0x000030f4, 0x000030f4,
+ 0x000030f7, 0x000030fa, 0x000030fe, 0x000030fe,
+ 0x0000f902, 0x0000fa0d, 0x0000fa10, 0x0000fa10,
+ 0x0000fa12, 0x0000fa12, 0x0000fa15, 0x0000fa1e,
+ 0x0000fa20, 0x0000fa20, 0x0000fa22, 0x0000fa22,
+ 0x0000fa25, 0x0000fa26, 0x0000fa2a, 0x0000fa6d,
0x0000fa70, 0x0000fad9, 0x0000fb1d, 0x0000fb1d,
0x0000fb1f, 0x0000fb1f, 0x0000fb2a, 0x0000fb36,
0x0000fb38, 0x0000fb3c, 0x0000fb3e, 0x0000fb3e,
0x0000fb40, 0x0000fb41, 0x0000fb43, 0x0000fb44,
0x0000fb46, 0x0000fb4e, 0x0001109a, 0x0001109a,
0x0001109c, 0x0001109c, 0x000110ab, 0x000110ab,
- 0x0001d15e, 0x0001d164, 0x0001d1bb, 0x0001d1c0,
- 0x0002f800, 0x0002fa1d, 0x00000000, 0x00000377,
- 0x0000037a, 0x0000037e, 0x00000384, 0x0000038a,
- 0x0000038c, 0x0000038c, 0x0000038e, 0x000003a1,
- 0x000003a3, 0x00000527, 0x00000531, 0x00000556,
- 0x00000559, 0x0000055f, 0x00000561, 0x00000587,
- 0x00000589, 0x0000058a, 0x00000591, 0x000005c7,
+ 0x0001112e, 0x0001112f, 0x0001134b, 0x0001134c,
+ 0x000114bb, 0x000114bc, 0x000114be, 0x000114be,
+ 0x000115ba, 0x000115bb, 0x0001d15e, 0x0001d164,
+ 0x0001d1bb, 0x0001d1c0, 0x0002f800, 0x0002fa1d,
+ 0x00000000, 0x00000377, 0x0000037a, 0x0000037f,
+ 0x00000384, 0x0000038a, 0x0000038c, 0x0000038c,
+ 0x0000038e, 0x000003a1, 0x000003a3, 0x0000052f,
+ 0x00000531, 0x00000556, 0x00000559, 0x0000055f,
+ 0x00000561, 0x00000587, 0x00000589, 0x0000058a,
+ 0x0000058d, 0x0000058f, 0x00000591, 0x000005c7,
0x000005d0, 0x000005ea, 0x000005f0, 0x000005f4,
- 0x00000600, 0x00000603, 0x00000606, 0x0000061b,
- 0x0000061e, 0x0000070d, 0x0000070f, 0x0000074a,
- 0x0000074d, 0x000007b1, 0x000007c0, 0x000007fa,
- 0x00000800, 0x0000082d, 0x00000830, 0x0000083e,
- 0x00000840, 0x0000085b, 0x0000085e, 0x0000085e,
- 0x00000900, 0x00000977, 0x00000979, 0x0000097f,
- 0x00000981, 0x00000983, 0x00000985, 0x0000098c,
+ 0x00000600, 0x0000061c, 0x0000061e, 0x0000070d,
+ 0x0000070f, 0x0000074a, 0x0000074d, 0x000007b1,
+ 0x000007c0, 0x000007fa, 0x00000800, 0x0000082d,
+ 0x00000830, 0x0000083e, 0x00000840, 0x0000085b,
+ 0x0000085e, 0x0000085e, 0x000008a0, 0x000008b4,
+ 0x000008e3, 0x00000983, 0x00000985, 0x0000098c,
0x0000098f, 0x00000990, 0x00000993, 0x000009a8,
0x000009aa, 0x000009b0, 0x000009b2, 0x000009b2,
0x000009b6, 0x000009b9, 0x000009bc, 0x000009c4,
@@ -1939,7 +2148,7 @@ static const unsigned int _ucprop_ranges[] = {
0x00000ab5, 0x00000ab9, 0x00000abc, 0x00000ac5,
0x00000ac7, 0x00000ac9, 0x00000acb, 0x00000acd,
0x00000ad0, 0x00000ad0, 0x00000ae0, 0x00000ae3,
- 0x00000ae6, 0x00000aef, 0x00000af1, 0x00000af1,
+ 0x00000ae6, 0x00000af1, 0x00000af9, 0x00000af9,
0x00000b01, 0x00000b03, 0x00000b05, 0x00000b0c,
0x00000b0f, 0x00000b10, 0x00000b13, 0x00000b28,
0x00000b2a, 0x00000b30, 0x00000b32, 0x00000b33,
@@ -1955,31 +2164,31 @@ static const unsigned int _ucprop_ranges[] = {
0x00000bbe, 0x00000bc2, 0x00000bc6, 0x00000bc8,
0x00000bca, 0x00000bcd, 0x00000bd0, 0x00000bd0,
0x00000bd7, 0x00000bd7, 0x00000be6, 0x00000bfa,
- 0x00000c01, 0x00000c03, 0x00000c05, 0x00000c0c,
+ 0x00000c00, 0x00000c03, 0x00000c05, 0x00000c0c,
0x00000c0e, 0x00000c10, 0x00000c12, 0x00000c28,
- 0x00000c2a, 0x00000c33, 0x00000c35, 0x00000c39,
- 0x00000c3d, 0x00000c44, 0x00000c46, 0x00000c48,
- 0x00000c4a, 0x00000c4d, 0x00000c55, 0x00000c56,
- 0x00000c58, 0x00000c59, 0x00000c60, 0x00000c63,
- 0x00000c66, 0x00000c6f, 0x00000c78, 0x00000c7f,
- 0x00000c82, 0x00000c83, 0x00000c85, 0x00000c8c,
- 0x00000c8e, 0x00000c90, 0x00000c92, 0x00000ca8,
- 0x00000caa, 0x00000cb3, 0x00000cb5, 0x00000cb9,
- 0x00000cbc, 0x00000cc4, 0x00000cc6, 0x00000cc8,
- 0x00000cca, 0x00000ccd, 0x00000cd5, 0x00000cd6,
- 0x00000cde, 0x00000cde, 0x00000ce0, 0x00000ce3,
- 0x00000ce6, 0x00000cef, 0x00000cf1, 0x00000cf2,
- 0x00000d02, 0x00000d03, 0x00000d05, 0x00000d0c,
- 0x00000d0e, 0x00000d10, 0x00000d12, 0x00000d3a,
- 0x00000d3d, 0x00000d44, 0x00000d46, 0x00000d48,
- 0x00000d4a, 0x00000d4e, 0x00000d57, 0x00000d57,
- 0x00000d60, 0x00000d63, 0x00000d66, 0x00000d75,
- 0x00000d79, 0x00000d7f, 0x00000d82, 0x00000d83,
- 0x00000d85, 0x00000d96, 0x00000d9a, 0x00000db1,
- 0x00000db3, 0x00000dbb, 0x00000dbd, 0x00000dbd,
- 0x00000dc0, 0x00000dc6, 0x00000dca, 0x00000dca,
- 0x00000dcf, 0x00000dd4, 0x00000dd6, 0x00000dd6,
- 0x00000dd8, 0x00000ddf, 0x00000df2, 0x00000df4,
+ 0x00000c2a, 0x00000c39, 0x00000c3d, 0x00000c44,
+ 0x00000c46, 0x00000c48, 0x00000c4a, 0x00000c4d,
+ 0x00000c55, 0x00000c56, 0x00000c58, 0x00000c5a,
+ 0x00000c60, 0x00000c63, 0x00000c66, 0x00000c6f,
+ 0x00000c78, 0x00000c7f, 0x00000c81, 0x00000c83,
+ 0x00000c85, 0x00000c8c, 0x00000c8e, 0x00000c90,
+ 0x00000c92, 0x00000ca8, 0x00000caa, 0x00000cb3,
+ 0x00000cb5, 0x00000cb9, 0x00000cbc, 0x00000cc4,
+ 0x00000cc6, 0x00000cc8, 0x00000cca, 0x00000ccd,
+ 0x00000cd5, 0x00000cd6, 0x00000cde, 0x00000cde,
+ 0x00000ce0, 0x00000ce3, 0x00000ce6, 0x00000cef,
+ 0x00000cf1, 0x00000cf2, 0x00000d01, 0x00000d03,
+ 0x00000d05, 0x00000d0c, 0x00000d0e, 0x00000d10,
+ 0x00000d12, 0x00000d3a, 0x00000d3d, 0x00000d44,
+ 0x00000d46, 0x00000d48, 0x00000d4a, 0x00000d4e,
+ 0x00000d57, 0x00000d57, 0x00000d5f, 0x00000d63,
+ 0x00000d66, 0x00000d75, 0x00000d79, 0x00000d7f,
+ 0x00000d82, 0x00000d83, 0x00000d85, 0x00000d96,
+ 0x00000d9a, 0x00000db1, 0x00000db3, 0x00000dbb,
+ 0x00000dbd, 0x00000dbd, 0x00000dc0, 0x00000dc6,
+ 0x00000dca, 0x00000dca, 0x00000dcf, 0x00000dd4,
+ 0x00000dd6, 0x00000dd6, 0x00000dd8, 0x00000ddf,
+ 0x00000de6, 0x00000def, 0x00000df2, 0x00000df4,
0x00000e01, 0x00000e3a, 0x00000e3f, 0x00000e5b,
0x00000e81, 0x00000e82, 0x00000e84, 0x00000e84,
0x00000e87, 0x00000e88, 0x00000e8a, 0x00000e8a,
@@ -1989,22 +2198,23 @@ static const unsigned int _ucprop_ranges[] = {
0x00000eaa, 0x00000eab, 0x00000ead, 0x00000eb9,
0x00000ebb, 0x00000ebd, 0x00000ec0, 0x00000ec4,
0x00000ec6, 0x00000ec6, 0x00000ec8, 0x00000ecd,
- 0x00000ed0, 0x00000ed9, 0x00000edc, 0x00000edd,
+ 0x00000ed0, 0x00000ed9, 0x00000edc, 0x00000edf,
0x00000f00, 0x00000f47, 0x00000f49, 0x00000f6c,
0x00000f71, 0x00000f97, 0x00000f99, 0x00000fbc,
0x00000fbe, 0x00000fcc, 0x00000fce, 0x00000fda,
- 0x00001000, 0x000010c5, 0x000010d0, 0x000010fc,
- 0x00001100, 0x00001248, 0x0000124a, 0x0000124d,
- 0x00001250, 0x00001256, 0x00001258, 0x00001258,
- 0x0000125a, 0x0000125d, 0x00001260, 0x00001288,
- 0x0000128a, 0x0000128d, 0x00001290, 0x000012b0,
- 0x000012b2, 0x000012b5, 0x000012b8, 0x000012be,
- 0x000012c0, 0x000012c0, 0x000012c2, 0x000012c5,
- 0x000012c8, 0x000012d6, 0x000012d8, 0x00001310,
- 0x00001312, 0x00001315, 0x00001318, 0x0000135a,
- 0x0000135d, 0x0000137c, 0x00001380, 0x00001399,
- 0x000013a0, 0x000013f4, 0x00001400, 0x0000169c,
- 0x000016a0, 0x000016f0, 0x00001700, 0x0000170c,
+ 0x00001000, 0x000010c5, 0x000010c7, 0x000010c7,
+ 0x000010cd, 0x000010cd, 0x000010d0, 0x00001248,
+ 0x0000124a, 0x0000124d, 0x00001250, 0x00001256,
+ 0x00001258, 0x00001258, 0x0000125a, 0x0000125d,
+ 0x00001260, 0x00001288, 0x0000128a, 0x0000128d,
+ 0x00001290, 0x000012b0, 0x000012b2, 0x000012b5,
+ 0x000012b8, 0x000012be, 0x000012c0, 0x000012c0,
+ 0x000012c2, 0x000012c5, 0x000012c8, 0x000012d6,
+ 0x000012d8, 0x00001310, 0x00001312, 0x00001315,
+ 0x00001318, 0x0000135a, 0x0000135d, 0x0000137c,
+ 0x00001380, 0x00001399, 0x000013a0, 0x000013f5,
+ 0x000013f8, 0x000013fd, 0x00001400, 0x0000169c,
+ 0x000016a0, 0x000016f8, 0x00001700, 0x0000170c,
0x0000170e, 0x00001714, 0x00001720, 0x00001736,
0x00001740, 0x00001753, 0x00001760, 0x0000176c,
0x0000176e, 0x00001770, 0x00001772, 0x00001773,
@@ -2012,42 +2222,44 @@ static const unsigned int _ucprop_ranges[] = {
0x000017f0, 0x000017f9, 0x00001800, 0x0000180e,
0x00001810, 0x00001819, 0x00001820, 0x00001877,
0x00001880, 0x000018aa, 0x000018b0, 0x000018f5,
- 0x00001900, 0x0000191c, 0x00001920, 0x0000192b,
+ 0x00001900, 0x0000191e, 0x00001920, 0x0000192b,
0x00001930, 0x0000193b, 0x00001940, 0x00001940,
0x00001944, 0x0000196d, 0x00001970, 0x00001974,
0x00001980, 0x000019ab, 0x000019b0, 0x000019c9,
0x000019d0, 0x000019da, 0x000019de, 0x00001a1b,
0x00001a1e, 0x00001a5e, 0x00001a60, 0x00001a7c,
0x00001a7f, 0x00001a89, 0x00001a90, 0x00001a99,
- 0x00001aa0, 0x00001aad, 0x00001b00, 0x00001b4b,
- 0x00001b50, 0x00001b7c, 0x00001b80, 0x00001baa,
- 0x00001bae, 0x00001bb9, 0x00001bc0, 0x00001bf3,
- 0x00001bfc, 0x00001c37, 0x00001c3b, 0x00001c49,
- 0x00001c4d, 0x00001c7f, 0x00001cd0, 0x00001cf2,
- 0x00001d00, 0x00001de6, 0x00001dfc, 0x00001f15,
- 0x00001f18, 0x00001f1d, 0x00001f20, 0x00001f45,
- 0x00001f48, 0x00001f4d, 0x00001f50, 0x00001f57,
- 0x00001f59, 0x00001f59, 0x00001f5b, 0x00001f5b,
- 0x00001f5d, 0x00001f5d, 0x00001f5f, 0x00001f7d,
- 0x00001f80, 0x00001fb4, 0x00001fb6, 0x00001fc4,
- 0x00001fc6, 0x00001fd3, 0x00001fd6, 0x00001fdb,
- 0x00001fdd, 0x00001fef, 0x00001ff2, 0x00001ff4,
- 0x00001ff6, 0x00001ffe, 0x00002000, 0x00002064,
- 0x0000206a, 0x00002071, 0x00002074, 0x0000208e,
- 0x00002090, 0x0000209c, 0x000020a0, 0x000020b9,
- 0x000020d0, 0x000020f0, 0x00002100, 0x00002189,
- 0x00002190, 0x000023f3, 0x00002400, 0x00002426,
- 0x00002440, 0x0000244a, 0x00002460, 0x000026ff,
- 0x00002701, 0x000027ca, 0x000027cc, 0x000027cc,
- 0x000027ce, 0x00002b4c, 0x00002b50, 0x00002b59,
+ 0x00001aa0, 0x00001aad, 0x00001ab0, 0x00001abe,
+ 0x00001b00, 0x00001b4b, 0x00001b50, 0x00001b7c,
+ 0x00001b80, 0x00001bf3, 0x00001bfc, 0x00001c37,
+ 0x00001c3b, 0x00001c49, 0x00001c4d, 0x00001c7f,
+ 0x00001cc0, 0x00001cc7, 0x00001cd0, 0x00001cf6,
+ 0x00001cf8, 0x00001cf9, 0x00001d00, 0x00001df5,
+ 0x00001dfc, 0x00001f15, 0x00001f18, 0x00001f1d,
+ 0x00001f20, 0x00001f45, 0x00001f48, 0x00001f4d,
+ 0x00001f50, 0x00001f57, 0x00001f59, 0x00001f59,
+ 0x00001f5b, 0x00001f5b, 0x00001f5d, 0x00001f5d,
+ 0x00001f5f, 0x00001f7d, 0x00001f80, 0x00001fb4,
+ 0x00001fb6, 0x00001fc4, 0x00001fc6, 0x00001fd3,
+ 0x00001fd6, 0x00001fdb, 0x00001fdd, 0x00001fef,
+ 0x00001ff2, 0x00001ff4, 0x00001ff6, 0x00001ffe,
+ 0x00002000, 0x00002064, 0x00002066, 0x00002071,
+ 0x00002074, 0x0000208e, 0x00002090, 0x0000209c,
+ 0x000020a0, 0x000020be, 0x000020d0, 0x000020f0,
+ 0x00002100, 0x0000218b, 0x00002190, 0x000023fa,
+ 0x00002400, 0x00002426, 0x00002440, 0x0000244a,
+ 0x00002460, 0x00002b73, 0x00002b76, 0x00002b95,
+ 0x00002b98, 0x00002bb9, 0x00002bbd, 0x00002bc8,
+ 0x00002bca, 0x00002bd1, 0x00002bec, 0x00002bef,
0x00002c00, 0x00002c2e, 0x00002c30, 0x00002c5e,
- 0x00002c60, 0x00002cf1, 0x00002cf9, 0x00002d25,
- 0x00002d30, 0x00002d65, 0x00002d6f, 0x00002d70,
+ 0x00002c60, 0x00002cf3, 0x00002cf9, 0x00002d25,
+ 0x00002d27, 0x00002d27, 0x00002d2d, 0x00002d2d,
+ 0x00002d30, 0x00002d67, 0x00002d6f, 0x00002d70,
0x00002d7f, 0x00002d96, 0x00002da0, 0x00002da6,
0x00002da8, 0x00002dae, 0x00002db0, 0x00002db6,
0x00002db8, 0x00002dbe, 0x00002dc0, 0x00002dc6,
0x00002dc8, 0x00002dce, 0x00002dd0, 0x00002dd6,
- 0x00002dd8, 0x00002dde, 0x00002de0, 0x00002e31,
+ 0x00002dd8, 0x00002dde, 0x00002de0, 0x00002e42,
0x00002e80, 0x00002e99, 0x00002e9b, 0x00002ef3,
0x00002f00, 0x00002fd5, 0x00002ff0, 0x00002ffb,
0x00003000, 0x0000303f, 0x00003041, 0x00003096,
@@ -2058,30 +2270,28 @@ static const unsigned int _ucprop_ranges[] = {
0x00003400, 0x00004db5, 0x00004dc0, 0x00004dff,
0x00004e00, 0x00009fa5, 0x0000a000, 0x0000a48c,
0x0000a490, 0x0000a4c6, 0x0000a4d0, 0x0000a62b,
- 0x0000a640, 0x0000a673, 0x0000a67c, 0x0000a697,
- 0x0000a6a0, 0x0000a6f7, 0x0000a700, 0x0000a78e,
- 0x0000a790, 0x0000a791, 0x0000a7a0, 0x0000a7a9,
- 0x0000a7fa, 0x0000a82b, 0x0000a830, 0x0000a839,
- 0x0000a840, 0x0000a877, 0x0000a880, 0x0000a8c4,
- 0x0000a8ce, 0x0000a8d9, 0x0000a8e0, 0x0000a8fb,
- 0x0000a900, 0x0000a953, 0x0000a95f, 0x0000a97c,
- 0x0000a980, 0x0000a9cd, 0x0000a9cf, 0x0000a9d9,
- 0x0000a9de, 0x0000a9df, 0x0000aa00, 0x0000aa36,
- 0x0000aa40, 0x0000aa4d, 0x0000aa50, 0x0000aa59,
- 0x0000aa5c, 0x0000aa7b, 0x0000aa80, 0x0000aac2,
- 0x0000aadb, 0x0000aadf, 0x0000ab01, 0x0000ab06,
+ 0x0000a640, 0x0000a6f7, 0x0000a700, 0x0000a7ad,
+ 0x0000a7b0, 0x0000a7b7, 0x0000a7f7, 0x0000a82b,
+ 0x0000a830, 0x0000a839, 0x0000a840, 0x0000a877,
+ 0x0000a880, 0x0000a8c4, 0x0000a8ce, 0x0000a8d9,
+ 0x0000a8e0, 0x0000a8fd, 0x0000a900, 0x0000a953,
+ 0x0000a95f, 0x0000a97c, 0x0000a980, 0x0000a9cd,
+ 0x0000a9cf, 0x0000a9d9, 0x0000a9de, 0x0000a9fe,
+ 0x0000aa00, 0x0000aa36, 0x0000aa40, 0x0000aa4d,
+ 0x0000aa50, 0x0000aa59, 0x0000aa5c, 0x0000aac2,
+ 0x0000aadb, 0x0000aaf6, 0x0000ab01, 0x0000ab06,
0x0000ab09, 0x0000ab0e, 0x0000ab11, 0x0000ab16,
0x0000ab20, 0x0000ab26, 0x0000ab28, 0x0000ab2e,
- 0x0000abc0, 0x0000abed, 0x0000abf0, 0x0000abf9,
- 0x0000ac00, 0x0000d7a3, 0x0000d7b0, 0x0000d7c6,
- 0x0000d7cb, 0x0000d7fb, 0x0000f900, 0x0000fb06,
- 0x0000fb13, 0x0000fb17, 0x0000fb1d, 0x0000fb36,
- 0x0000fb38, 0x0000fb3c, 0x0000fb3e, 0x0000fb3e,
- 0x0000fb40, 0x0000fb41, 0x0000fb43, 0x0000fb44,
- 0x0000fb46, 0x0000fbc1, 0x0000fbd3, 0x0000fd3f,
- 0x0000fd50, 0x0000fd8f, 0x0000fd92, 0x0000fdc7,
- 0x0000fdf0, 0x0000fdfd, 0x0000fe00, 0x0000fe19,
- 0x0000fe20, 0x0000fe26, 0x0000fe30, 0x0000fe52,
+ 0x0000ab30, 0x0000ab65, 0x0000ab70, 0x0000abed,
+ 0x0000abf0, 0x0000abf9, 0x0000ac00, 0x0000d7a3,
+ 0x0000d7b0, 0x0000d7c6, 0x0000d7cb, 0x0000d7fb,
+ 0x0000f900, 0x0000fb06, 0x0000fb13, 0x0000fb17,
+ 0x0000fb1d, 0x0000fb36, 0x0000fb38, 0x0000fb3c,
+ 0x0000fb3e, 0x0000fb3e, 0x0000fb40, 0x0000fb41,
+ 0x0000fb43, 0x0000fb44, 0x0000fb46, 0x0000fbc1,
+ 0x0000fbd3, 0x0000fd3f, 0x0000fd50, 0x0000fd8f,
+ 0x0000fd92, 0x0000fdc7, 0x0000fdf0, 0x0000fdfd,
+ 0x0000fe00, 0x0000fe19, 0x0000fe20, 0x0000fe52,
0x0000fe54, 0x0000fe66, 0x0000fe68, 0x0000fe6b,
0x0000fe70, 0x0000fe74, 0x0000fe76, 0x0000fefc,
0x0000feff, 0x0000feff, 0x0000ff01, 0x0000ffbe,
@@ -2093,31 +2303,74 @@ static const unsigned int _ucprop_ranges[] = {
0x0001003c, 0x0001003d, 0x0001003f, 0x0001004d,
0x00010050, 0x0001005d, 0x00010080, 0x000100fa,
0x00010100, 0x00010102, 0x00010107, 0x00010133,
- 0x00010137, 0x0001018a, 0x00010190, 0x0001019b,
- 0x000101d0, 0x000101fd, 0x00010280, 0x0001029c,
- 0x000102a0, 0x000102d0, 0x00010300, 0x0001031e,
- 0x00010320, 0x00010323, 0x00010330, 0x0001034a,
+ 0x00010137, 0x0001018c, 0x00010190, 0x0001019b,
+ 0x000101a0, 0x000101a0, 0x000101d0, 0x000101fd,
+ 0x00010280, 0x0001029c, 0x000102a0, 0x000102d0,
+ 0x000102e0, 0x000102fb, 0x00010300, 0x00010323,
+ 0x00010330, 0x0001034a, 0x00010350, 0x0001037a,
0x00010380, 0x0001039d, 0x0001039f, 0x000103c3,
0x000103c8, 0x000103d5, 0x00010400, 0x0001049d,
- 0x000104a0, 0x000104a9, 0x00010800, 0x00010805,
+ 0x000104a0, 0x000104a9, 0x00010500, 0x00010527,
+ 0x00010530, 0x00010563, 0x0001056f, 0x0001056f,
+ 0x00010600, 0x00010736, 0x00010740, 0x00010755,
+ 0x00010760, 0x00010767, 0x00010800, 0x00010805,
0x00010808, 0x00010808, 0x0001080a, 0x00010835,
0x00010837, 0x00010838, 0x0001083c, 0x0001083c,
- 0x0001083f, 0x00010855, 0x00010857, 0x0001085f,
- 0x00010900, 0x0001091b, 0x0001091f, 0x00010939,
- 0x0001093f, 0x0001093f, 0x00010a00, 0x00010a03,
- 0x00010a05, 0x00010a06, 0x00010a0c, 0x00010a13,
- 0x00010a15, 0x00010a17, 0x00010a19, 0x00010a33,
- 0x00010a38, 0x00010a3a, 0x00010a3f, 0x00010a47,
- 0x00010a50, 0x00010a58, 0x00010a60, 0x00010a7f,
- 0x00010b00, 0x00010b35, 0x00010b39, 0x00010b55,
- 0x00010b58, 0x00010b72, 0x00010b78, 0x00010b7f,
- 0x00010c00, 0x00010c48, 0x00010e60, 0x00010e7e,
+ 0x0001083f, 0x00010855, 0x00010857, 0x0001089e,
+ 0x000108a7, 0x000108af, 0x000108e0, 0x000108f2,
+ 0x000108f4, 0x000108f5, 0x000108fb, 0x0001091b,
+ 0x0001091f, 0x00010939, 0x0001093f, 0x0001093f,
+ 0x00010980, 0x000109b7, 0x000109bc, 0x000109cf,
+ 0x000109d2, 0x00010a03, 0x00010a05, 0x00010a06,
+ 0x00010a0c, 0x00010a13, 0x00010a15, 0x00010a17,
+ 0x00010a19, 0x00010a33, 0x00010a38, 0x00010a3a,
+ 0x00010a3f, 0x00010a47, 0x00010a50, 0x00010a58,
+ 0x00010a60, 0x00010a9f, 0x00010ac0, 0x00010ae6,
+ 0x00010aeb, 0x00010af6, 0x00010b00, 0x00010b35,
+ 0x00010b39, 0x00010b55, 0x00010b58, 0x00010b72,
+ 0x00010b78, 0x00010b91, 0x00010b99, 0x00010b9c,
+ 0x00010ba9, 0x00010baf, 0x00010c00, 0x00010c48,
+ 0x00010c80, 0x00010cb2, 0x00010cc0, 0x00010cf2,
+ 0x00010cfa, 0x00010cff, 0x00010e60, 0x00010e7e,
0x00011000, 0x0001104d, 0x00011052, 0x0001106f,
- 0x00011080, 0x000110c1, 0x00012000, 0x0001236e,
- 0x00012400, 0x00012462, 0x00012470, 0x00012473,
- 0x00013000, 0x0001342e, 0x00016800, 0x00016a38,
- 0x0001b000, 0x0001b001, 0x0001d000, 0x0001d0f5,
- 0x0001d100, 0x0001d126, 0x0001d129, 0x0001d1dd,
+ 0x0001107f, 0x000110c1, 0x000110d0, 0x000110e8,
+ 0x000110f0, 0x000110f9, 0x00011100, 0x00011134,
+ 0x00011136, 0x00011143, 0x00011150, 0x00011176,
+ 0x00011180, 0x000111cd, 0x000111d0, 0x000111df,
+ 0x000111e1, 0x000111f4, 0x00011200, 0x00011211,
+ 0x00011213, 0x0001123d, 0x00011280, 0x00011286,
+ 0x00011288, 0x00011288, 0x0001128a, 0x0001128d,
+ 0x0001128f, 0x0001129d, 0x0001129f, 0x000112a9,
+ 0x000112b0, 0x000112ea, 0x000112f0, 0x000112f9,
+ 0x00011300, 0x00011303, 0x00011305, 0x0001130c,
+ 0x0001130f, 0x00011310, 0x00011313, 0x00011328,
+ 0x0001132a, 0x00011330, 0x00011332, 0x00011333,
+ 0x00011335, 0x00011339, 0x0001133c, 0x00011344,
+ 0x00011347, 0x00011348, 0x0001134b, 0x0001134d,
+ 0x00011350, 0x00011350, 0x00011357, 0x00011357,
+ 0x0001135d, 0x00011363, 0x00011366, 0x0001136c,
+ 0x00011370, 0x00011374, 0x00011480, 0x000114c7,
+ 0x000114d0, 0x000114d9, 0x00011580, 0x000115b5,
+ 0x000115b8, 0x000115dd, 0x00011600, 0x00011644,
+ 0x00011650, 0x00011659, 0x00011680, 0x000116b7,
+ 0x000116c0, 0x000116c9, 0x00011700, 0x00011719,
+ 0x0001171d, 0x0001172b, 0x00011730, 0x0001173f,
+ 0x000118a0, 0x000118f2, 0x000118ff, 0x000118ff,
+ 0x00011ac0, 0x00011af8, 0x00012000, 0x00012399,
+ 0x00012400, 0x0001246e, 0x00012470, 0x00012474,
+ 0x00012480, 0x00012543, 0x00013000, 0x0001342e,
+ 0x00014400, 0x00014646, 0x00016800, 0x00016a38,
+ 0x00016a40, 0x00016a5e, 0x00016a60, 0x00016a69,
+ 0x00016a6e, 0x00016a6f, 0x00016ad0, 0x00016aed,
+ 0x00016af0, 0x00016af5, 0x00016b00, 0x00016b45,
+ 0x00016b50, 0x00016b59, 0x00016b5b, 0x00016b61,
+ 0x00016b63, 0x00016b77, 0x00016b7d, 0x00016b8f,
+ 0x00016f00, 0x00016f44, 0x00016f50, 0x00016f7e,
+ 0x00016f8f, 0x00016f9f, 0x0001b000, 0x0001b001,
+ 0x0001bc00, 0x0001bc6a, 0x0001bc70, 0x0001bc7c,
+ 0x0001bc80, 0x0001bc88, 0x0001bc90, 0x0001bc99,
+ 0x0001bc9c, 0x0001bca3, 0x0001d000, 0x0001d0f5,
+ 0x0001d100, 0x0001d126, 0x0001d129, 0x0001d1e8,
0x0001d200, 0x0001d245, 0x0001d300, 0x0001d356,
0x0001d360, 0x0001d371, 0x0001d400, 0x0001d454,
0x0001d456, 0x0001d49c, 0x0001d49e, 0x0001d49f,
@@ -2129,64 +2382,94 @@ static const unsigned int _ucprop_ranges[] = {
0x0001d51e, 0x0001d539, 0x0001d53b, 0x0001d53e,
0x0001d540, 0x0001d544, 0x0001d546, 0x0001d546,
0x0001d54a, 0x0001d550, 0x0001d552, 0x0001d6a5,
- 0x0001d6a8, 0x0001d7cb, 0x0001d7ce, 0x0001d7ff,
+ 0x0001d6a8, 0x0001d7cb, 0x0001d7ce, 0x0001da8b,
+ 0x0001da9b, 0x0001da9f, 0x0001daa1, 0x0001daaf,
+ 0x0001e800, 0x0001e8c4, 0x0001e8c7, 0x0001e8d6,
+ 0x0001ee00, 0x0001ee03, 0x0001ee05, 0x0001ee1f,
+ 0x0001ee21, 0x0001ee22, 0x0001ee24, 0x0001ee24,
+ 0x0001ee27, 0x0001ee27, 0x0001ee29, 0x0001ee32,
+ 0x0001ee34, 0x0001ee37, 0x0001ee39, 0x0001ee39,
+ 0x0001ee3b, 0x0001ee3b, 0x0001ee42, 0x0001ee42,
+ 0x0001ee47, 0x0001ee47, 0x0001ee49, 0x0001ee49,
+ 0x0001ee4b, 0x0001ee4b, 0x0001ee4d, 0x0001ee4f,
+ 0x0001ee51, 0x0001ee52, 0x0001ee54, 0x0001ee54,
+ 0x0001ee57, 0x0001ee57, 0x0001ee59, 0x0001ee59,
+ 0x0001ee5b, 0x0001ee5b, 0x0001ee5d, 0x0001ee5d,
+ 0x0001ee5f, 0x0001ee5f, 0x0001ee61, 0x0001ee62,
+ 0x0001ee64, 0x0001ee64, 0x0001ee67, 0x0001ee6a,
+ 0x0001ee6c, 0x0001ee72, 0x0001ee74, 0x0001ee77,
+ 0x0001ee79, 0x0001ee7c, 0x0001ee7e, 0x0001ee7e,
+ 0x0001ee80, 0x0001ee89, 0x0001ee8b, 0x0001ee9b,
+ 0x0001eea1, 0x0001eea3, 0x0001eea5, 0x0001eea9,
+ 0x0001eeab, 0x0001eebb, 0x0001eef0, 0x0001eef1,
0x0001f000, 0x0001f02b, 0x0001f030, 0x0001f093,
- 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0be,
- 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0df,
- 0x0001f100, 0x0001f10a, 0x0001f110, 0x0001f12e,
- 0x0001f130, 0x0001f169, 0x0001f170, 0x0001f19a,
+ 0x0001f0a0, 0x0001f0ae, 0x0001f0b1, 0x0001f0bf,
+ 0x0001f0c1, 0x0001f0cf, 0x0001f0d1, 0x0001f0f5,
+ 0x0001f100, 0x0001f10c, 0x0001f110, 0x0001f12e,
+ 0x0001f130, 0x0001f16b, 0x0001f170, 0x0001f19a,
0x0001f1e6, 0x0001f202, 0x0001f210, 0x0001f23a,
0x0001f240, 0x0001f248, 0x0001f250, 0x0001f251,
- 0x0001f300, 0x0001f320, 0x0001f330, 0x0001f335,
- 0x0001f337, 0x0001f37c, 0x0001f380, 0x0001f393,
- 0x0001f3a0, 0x0001f3c4, 0x0001f3c6, 0x0001f3ca,
- 0x0001f3e0, 0x0001f3f0, 0x0001f400, 0x0001f43e,
- 0x0001f440, 0x0001f440, 0x0001f442, 0x0001f4f7,
- 0x0001f4f9, 0x0001f4fc, 0x0001f500, 0x0001f53d,
- 0x0001f550, 0x0001f567, 0x0001f5fb, 0x0001f5ff,
- 0x0001f601, 0x0001f610, 0x0001f612, 0x0001f614,
- 0x0001f616, 0x0001f616, 0x0001f618, 0x0001f618,
- 0x0001f61a, 0x0001f61a, 0x0001f61c, 0x0001f61e,
- 0x0001f620, 0x0001f625, 0x0001f628, 0x0001f62b,
- 0x0001f62d, 0x0001f62d, 0x0001f630, 0x0001f633,
- 0x0001f635, 0x0001f640, 0x0001f645, 0x0001f64f,
- 0x0001f680, 0x0001f6c5, 0x0001f700, 0x0001f773,
- 0x00020000, 0x0002a6d6, 0x0002a700, 0x0002a700,
- 0x0002b734, 0x0002b734, 0x0002b740, 0x0002b740,
- 0x0002b81d, 0x0002b81d, 0x0002f800, 0x0002fa1d,
- 0x000e0001, 0x000e0001, 0x000e0020, 0x000e007f,
- 0x000e0100, 0x000e01ef, 0x000000ab, 0x000000ab,
- 0x00002018, 0x00002018, 0x0000201b, 0x0000201c,
- 0x0000201f, 0x0000201f, 0x00002039, 0x00002039,
- 0x00002e02, 0x00002e02, 0x00002e04, 0x00002e04,
- 0x00002e09, 0x00002e09, 0x00002e0c, 0x00002e0c,
- 0x00002e1c, 0x00002e1c, 0x00002e20, 0x00002e20,
- 0x000000bb, 0x000000bb, 0x00002019, 0x00002019,
- 0x0000201d, 0x0000201d, 0x0000203a, 0x0000203a,
- 0x00002e03, 0x00002e03, 0x00002e05, 0x00002e05,
- 0x00002e0a, 0x00002e0a, 0x00002e0d, 0x00002e0d,
- 0x00002e1d, 0x00002e1d, 0x00002e21, 0x00002e21,
- 0x00000608, 0x00000608, 0x0000060b, 0x0000060b,
- 0x0000060d, 0x0000060d, 0x0000061b, 0x0000061b,
- 0x0000061e, 0x0000064a, 0x0000066d, 0x0000066f,
- 0x00000671, 0x000006d5, 0x000006e5, 0x000006e6,
- 0x000006ee, 0x000006ef, 0x000006fa, 0x0000070d,
- 0x00000710, 0x00000710, 0x00000712, 0x0000072f,
- 0x0000074d, 0x000007a5, 0x000007b1, 0x000007b1,
+ 0x0001f300, 0x0001f579, 0x0001f57b, 0x0001f5a3,
+ 0x0001f5a5, 0x0001f6d0, 0x0001f6e0, 0x0001f6ec,
+ 0x0001f6f0, 0x0001f6f3, 0x0001f700, 0x0001f773,
+ 0x0001f780, 0x0001f7d4, 0x0001f800, 0x0001f80b,
+ 0x0001f810, 0x0001f847, 0x0001f850, 0x0001f859,
+ 0x0001f860, 0x0001f887, 0x0001f890, 0x0001f8ad,
+ 0x0001f910, 0x0001f918, 0x0001f980, 0x0001f984,
+ 0x0001f9c0, 0x0001f9c0, 0x00020000, 0x0002a6d6,
+ 0x0002a700, 0x0002a700, 0x0002b734, 0x0002b734,
+ 0x0002b740, 0x0002b740, 0x0002b81d, 0x0002b81d,
+ 0x0002b820, 0x0002b820, 0x0002cea1, 0x0002cea1,
+ 0x0002f800, 0x0002fa1d, 0x000e0001, 0x000e0001,
+ 0x000e0020, 0x000e007f, 0x000e0100, 0x000e01ef,
+ 0x000000ab, 0x000000ab, 0x00002018, 0x00002018,
+ 0x0000201b, 0x0000201c, 0x0000201f, 0x0000201f,
+ 0x00002039, 0x00002039, 0x00002e02, 0x00002e02,
+ 0x00002e04, 0x00002e04, 0x00002e09, 0x00002e09,
+ 0x00002e0c, 0x00002e0c, 0x00002e1c, 0x00002e1c,
+ 0x00002e20, 0x00002e20, 0x000000bb, 0x000000bb,
+ 0x00002019, 0x00002019, 0x0000201d, 0x0000201d,
+ 0x0000203a, 0x0000203a, 0x00002e03, 0x00002e03,
+ 0x00002e05, 0x00002e05, 0x00002e0a, 0x00002e0a,
+ 0x00002e0d, 0x00002e0d, 0x00002e1d, 0x00002e1d,
+ 0x00002e21, 0x00002e21, 0x00000608, 0x00000608,
+ 0x0000060b, 0x0000060b, 0x0000060d, 0x0000060d,
+ 0x0000061b, 0x0000061c, 0x0000061e, 0x0000064a,
+ 0x0000066d, 0x0000066f, 0x00000671, 0x000006d5,
+ 0x000006e5, 0x000006e6, 0x000006ee, 0x000006ef,
+ 0x000006fa, 0x0000070d, 0x0000070f, 0x00000710,
+ 0x00000712, 0x0000072f, 0x0000074d, 0x000007a5,
+ 0x000007b1, 0x000007b1, 0x000008a0, 0x000008b4,
0x0000fb50, 0x0000fbc1, 0x0000fbd3, 0x0000fd3d,
0x0000fd50, 0x0000fd8f, 0x0000fd92, 0x0000fdc7,
0x0000fdf0, 0x0000fdfc, 0x0000fe70, 0x0000fe74,
- 0x0000fe76, 0x0000fefc
+ 0x0000fe76, 0x0000fefc, 0x0001ee00, 0x0001ee03,
+ 0x0001ee05, 0x0001ee1f, 0x0001ee21, 0x0001ee22,
+ 0x0001ee24, 0x0001ee24, 0x0001ee27, 0x0001ee27,
+ 0x0001ee29, 0x0001ee32, 0x0001ee34, 0x0001ee37,
+ 0x0001ee39, 0x0001ee39, 0x0001ee3b, 0x0001ee3b,
+ 0x0001ee42, 0x0001ee42, 0x0001ee47, 0x0001ee47,
+ 0x0001ee49, 0x0001ee49, 0x0001ee4b, 0x0001ee4b,
+ 0x0001ee4d, 0x0001ee4f, 0x0001ee51, 0x0001ee52,
+ 0x0001ee54, 0x0001ee54, 0x0001ee57, 0x0001ee57,
+ 0x0001ee59, 0x0001ee59, 0x0001ee5b, 0x0001ee5b,
+ 0x0001ee5d, 0x0001ee5d, 0x0001ee5f, 0x0001ee5f,
+ 0x0001ee61, 0x0001ee62, 0x0001ee64, 0x0001ee64,
+ 0x0001ee67, 0x0001ee6a, 0x0001ee6c, 0x0001ee72,
+ 0x0001ee74, 0x0001ee77, 0x0001ee79, 0x0001ee7c,
+ 0x0001ee7e, 0x0001ee7e, 0x0001ee80, 0x0001ee89,
+ 0x0001ee8b, 0x0001ee9b, 0x0001eea1, 0x0001eea3,
+ 0x0001eea5, 0x0001eea9, 0x0001eeab, 0x0001eebb
};
-static const unsigned int _uccase_size = 2080;
+static const unsigned int _uccase_size = 2470;
/* Starting indexes of the case tables
* UpperIndex = 0
* LowerIndex = _uccase_len[0]
* TitleIndex = LowerIndex + _uccase_len[1] */
-static const unsigned short _uccase_len[2] = {3102, 3126};
+static const unsigned short _uccase_len[2] = {3687, 3711};
static const unsigned int _uccase_map[] = {
0x00000041, 0x00000061, 0x00000041,
@@ -2414,6 +2697,7 @@ static const unsigned int _uccase_map[] = {
0x00000370, 0x00000371, 0x00000370,
0x00000372, 0x00000373, 0x00000372,
0x00000376, 0x00000377, 0x00000376,
+ 0x0000037f, 0x000003f3, 0x0000037f,
0x00000386, 0x000003ac, 0x00000386,
0x00000388, 0x000003ad, 0x00000388,
0x00000389, 0x000003ae, 0x00000389,
@@ -2611,6 +2895,10 @@ static const unsigned int _uccase_map[] = {
0x00000522, 0x00000523, 0x00000522,
0x00000524, 0x00000525, 0x00000524,
0x00000526, 0x00000527, 0x00000526,
+ 0x00000528, 0x00000529, 0x00000528,
+ 0x0000052a, 0x0000052b, 0x0000052a,
+ 0x0000052c, 0x0000052d, 0x0000052c,
+ 0x0000052e, 0x0000052f, 0x0000052e,
0x00000531, 0x00000561, 0x00000531,
0x00000532, 0x00000562, 0x00000532,
0x00000533, 0x00000563, 0x00000533,
@@ -2687,6 +2975,94 @@ static const unsigned int _uccase_map[] = {
0x000010c3, 0x00002d23, 0x000010c3,
0x000010c4, 0x00002d24, 0x000010c4,
0x000010c5, 0x00002d25, 0x000010c5,
+ 0x000010c7, 0x00002d27, 0x000010c7,
+ 0x000010cd, 0x00002d2d, 0x000010cd,
+ 0x000013a0, 0x0000ab70, 0x000013a0,
+ 0x000013a1, 0x0000ab71, 0x000013a1,
+ 0x000013a2, 0x0000ab72, 0x000013a2,
+ 0x000013a3, 0x0000ab73, 0x000013a3,
+ 0x000013a4, 0x0000ab74, 0x000013a4,
+ 0x000013a5, 0x0000ab75, 0x000013a5,
+ 0x000013a6, 0x0000ab76, 0x000013a6,
+ 0x000013a7, 0x0000ab77, 0x000013a7,
+ 0x000013a8, 0x0000ab78, 0x000013a8,
+ 0x000013a9, 0x0000ab79, 0x000013a9,
+ 0x000013aa, 0x0000ab7a, 0x000013aa,
+ 0x000013ab, 0x0000ab7b, 0x000013ab,
+ 0x000013ac, 0x0000ab7c, 0x000013ac,
+ 0x000013ad, 0x0000ab7d, 0x000013ad,
+ 0x000013ae, 0x0000ab7e, 0x000013ae,
+ 0x000013af, 0x0000ab7f, 0x000013af,
+ 0x000013b0, 0x0000ab80, 0x000013b0,
+ 0x000013b1, 0x0000ab81, 0x000013b1,
+ 0x000013b2, 0x0000ab82, 0x000013b2,
+ 0x000013b3, 0x0000ab83, 0x000013b3,
+ 0x000013b4, 0x0000ab84, 0x000013b4,
+ 0x000013b5, 0x0000ab85, 0x000013b5,
+ 0x000013b6, 0x0000ab86, 0x000013b6,
+ 0x000013b7, 0x0000ab87, 0x000013b7,
+ 0x000013b8, 0x0000ab88, 0x000013b8,
+ 0x000013b9, 0x0000ab89, 0x000013b9,
+ 0x000013ba, 0x0000ab8a, 0x000013ba,
+ 0x000013bb, 0x0000ab8b, 0x000013bb,
+ 0x000013bc, 0x0000ab8c, 0x000013bc,
+ 0x000013bd, 0x0000ab8d, 0x000013bd,
+ 0x000013be, 0x0000ab8e, 0x000013be,
+ 0x000013bf, 0x0000ab8f, 0x000013bf,
+ 0x000013c0, 0x0000ab90, 0x000013c0,
+ 0x000013c1, 0x0000ab91, 0x000013c1,
+ 0x000013c2, 0x0000ab92, 0x000013c2,
+ 0x000013c3, 0x0000ab93, 0x000013c3,
+ 0x000013c4, 0x0000ab94, 0x000013c4,
+ 0x000013c5, 0x0000ab95, 0x000013c5,
+ 0x000013c6, 0x0000ab96, 0x000013c6,
+ 0x000013c7, 0x0000ab97, 0x000013c7,
+ 0x000013c8, 0x0000ab98, 0x000013c8,
+ 0x000013c9, 0x0000ab99, 0x000013c9,
+ 0x000013ca, 0x0000ab9a, 0x000013ca,
+ 0x000013cb, 0x0000ab9b, 0x000013cb,
+ 0x000013cc, 0x0000ab9c, 0x000013cc,
+ 0x000013cd, 0x0000ab9d, 0x000013cd,
+ 0x000013ce, 0x0000ab9e, 0x000013ce,
+ 0x000013cf, 0x0000ab9f, 0x000013cf,
+ 0x000013d0, 0x0000aba0, 0x000013d0,
+ 0x000013d1, 0x0000aba1, 0x000013d1,
+ 0x000013d2, 0x0000aba2, 0x000013d2,
+ 0x000013d3, 0x0000aba3, 0x000013d3,
+ 0x000013d4, 0x0000aba4, 0x000013d4,
+ 0x000013d5, 0x0000aba5, 0x000013d5,
+ 0x000013d6, 0x0000aba6, 0x000013d6,
+ 0x000013d7, 0x0000aba7, 0x000013d7,
+ 0x000013d8, 0x0000aba8, 0x000013d8,
+ 0x000013d9, 0x0000aba9, 0x000013d9,
+ 0x000013da, 0x0000abaa, 0x000013da,
+ 0x000013db, 0x0000abab, 0x000013db,
+ 0x000013dc, 0x0000abac, 0x000013dc,
+ 0x000013dd, 0x0000abad, 0x000013dd,
+ 0x000013de, 0x0000abae, 0x000013de,
+ 0x000013df, 0x0000abaf, 0x000013df,
+ 0x000013e0, 0x0000abb0, 0x000013e0,
+ 0x000013e1, 0x0000abb1, 0x000013e1,
+ 0x000013e2, 0x0000abb2, 0x000013e2,
+ 0x000013e3, 0x0000abb3, 0x000013e3,
+ 0x000013e4, 0x0000abb4, 0x000013e4,
+ 0x000013e5, 0x0000abb5, 0x000013e5,
+ 0x000013e6, 0x0000abb6, 0x000013e6,
+ 0x000013e7, 0x0000abb7, 0x000013e7,
+ 0x000013e8, 0x0000abb8, 0x000013e8,
+ 0x000013e9, 0x0000abb9, 0x000013e9,
+ 0x000013ea, 0x0000abba, 0x000013ea,
+ 0x000013eb, 0x0000abbb, 0x000013eb,
+ 0x000013ec, 0x0000abbc, 0x000013ec,
+ 0x000013ed, 0x0000abbd, 0x000013ed,
+ 0x000013ee, 0x0000abbe, 0x000013ee,
+ 0x000013ef, 0x0000abbf, 0x000013ef,
+ 0x000013f0, 0x000013f8, 0x000013f0,
+ 0x000013f1, 0x000013f9, 0x000013f1,
+ 0x000013f2, 0x000013fa, 0x000013f2,
+ 0x000013f3, 0x000013fb, 0x000013f3,
+ 0x000013f4, 0x000013fc, 0x000013f4,
+ 0x000013f5, 0x000013fd, 0x000013f5,
0x00001e00, 0x00001e01, 0x00001e00,
0x00001e02, 0x00001e03, 0x00001e02,
0x00001e04, 0x00001e05, 0x00001e04,
@@ -3068,6 +3444,7 @@ static const unsigned int _uccase_map[] = {
0x00002ce2, 0x00002ce3, 0x00002ce2,
0x00002ceb, 0x00002cec, 0x00002ceb,
0x00002ced, 0x00002cee, 0x00002ced,
+ 0x00002cf2, 0x00002cf3, 0x00002cf2,
0x0000a640, 0x0000a641, 0x0000a640,
0x0000a642, 0x0000a643, 0x0000a642,
0x0000a644, 0x0000a645, 0x0000a644,
@@ -3103,6 +3480,8 @@ static const unsigned int _uccase_map[] = {
0x0000a692, 0x0000a693, 0x0000a692,
0x0000a694, 0x0000a695, 0x0000a694,
0x0000a696, 0x0000a697, 0x0000a696,
+ 0x0000a698, 0x0000a699, 0x0000a698,
+ 0x0000a69a, 0x0000a69b, 0x0000a69a,
0x0000a722, 0x0000a723, 0x0000a722,
0x0000a724, 0x0000a725, 0x0000a724,
0x0000a726, 0x0000a727, 0x0000a726,
@@ -3152,11 +3531,27 @@ static const unsigned int _uccase_map[] = {
0x0000a78b, 0x0000a78c, 0x0000a78b,
0x0000a78d, 0x00000265, 0x0000a78d,
0x0000a790, 0x0000a791, 0x0000a790,
+ 0x0000a792, 0x0000a793, 0x0000a792,
+ 0x0000a796, 0x0000a797, 0x0000a796,
+ 0x0000a798, 0x0000a799, 0x0000a798,
+ 0x0000a79a, 0x0000a79b, 0x0000a79a,
+ 0x0000a79c, 0x0000a79d, 0x0000a79c,
+ 0x0000a79e, 0x0000a79f, 0x0000a79e,
0x0000a7a0, 0x0000a7a1, 0x0000a7a0,
0x0000a7a2, 0x0000a7a3, 0x0000a7a2,
0x0000a7a4, 0x0000a7a5, 0x0000a7a4,
0x0000a7a6, 0x0000a7a7, 0x0000a7a6,
0x0000a7a8, 0x0000a7a9, 0x0000a7a8,
+ 0x0000a7aa, 0x00000266, 0x0000a7aa,
+ 0x0000a7ab, 0x0000025c, 0x0000a7ab,
+ 0x0000a7ac, 0x00000261, 0x0000a7ac,
+ 0x0000a7ad, 0x0000026c, 0x0000a7ad,
+ 0x0000a7b0, 0x0000029e, 0x0000a7b0,
+ 0x0000a7b1, 0x00000287, 0x0000a7b1,
+ 0x0000a7b2, 0x0000029d, 0x0000a7b2,
+ 0x0000a7b3, 0x0000ab53, 0x0000a7b3,
+ 0x0000a7b4, 0x0000a7b5, 0x0000a7b4,
+ 0x0000a7b6, 0x0000a7b7, 0x0000a7b6,
0x0000ff21, 0x0000ff41, 0x0000ff21,
0x0000ff22, 0x0000ff42, 0x0000ff22,
0x0000ff23, 0x0000ff43, 0x0000ff23,
@@ -3223,6 +3618,89 @@ static const unsigned int _uccase_map[] = {
0x00010425, 0x0001044d, 0x00010425,
0x00010426, 0x0001044e, 0x00010426,
0x00010427, 0x0001044f, 0x00010427,
+ 0x00010c80, 0x00010cc0, 0x00010c80,
+ 0x00010c81, 0x00010cc1, 0x00010c81,
+ 0x00010c82, 0x00010cc2, 0x00010c82,
+ 0x00010c83, 0x00010cc3, 0x00010c83,
+ 0x00010c84, 0x00010cc4, 0x00010c84,
+ 0x00010c85, 0x00010cc5, 0x00010c85,
+ 0x00010c86, 0x00010cc6, 0x00010c86,
+ 0x00010c87, 0x00010cc7, 0x00010c87,
+ 0x00010c88, 0x00010cc8, 0x00010c88,
+ 0x00010c89, 0x00010cc9, 0x00010c89,
+ 0x00010c8a, 0x00010cca, 0x00010c8a,
+ 0x00010c8b, 0x00010ccb, 0x00010c8b,
+ 0x00010c8c, 0x00010ccc, 0x00010c8c,
+ 0x00010c8d, 0x00010ccd, 0x00010c8d,
+ 0x00010c8e, 0x00010cce, 0x00010c8e,
+ 0x00010c8f, 0x00010ccf, 0x00010c8f,
+ 0x00010c90, 0x00010cd0, 0x00010c90,
+ 0x00010c91, 0x00010cd1, 0x00010c91,
+ 0x00010c92, 0x00010cd2, 0x00010c92,
+ 0x00010c93, 0x00010cd3, 0x00010c93,
+ 0x00010c94, 0x00010cd4, 0x00010c94,
+ 0x00010c95, 0x00010cd5, 0x00010c95,
+ 0x00010c96, 0x00010cd6, 0x00010c96,
+ 0x00010c97, 0x00010cd7, 0x00010c97,
+ 0x00010c98, 0x00010cd8, 0x00010c98,
+ 0x00010c99, 0x00010cd9, 0x00010c99,
+ 0x00010c9a, 0x00010cda, 0x00010c9a,
+ 0x00010c9b, 0x00010cdb, 0x00010c9b,
+ 0x00010c9c, 0x00010cdc, 0x00010c9c,
+ 0x00010c9d, 0x00010cdd, 0x00010c9d,
+ 0x00010c9e, 0x00010cde, 0x00010c9e,
+ 0x00010c9f, 0x00010cdf, 0x00010c9f,
+ 0x00010ca0, 0x00010ce0, 0x00010ca0,
+ 0x00010ca1, 0x00010ce1, 0x00010ca1,
+ 0x00010ca2, 0x00010ce2, 0x00010ca2,
+ 0x00010ca3, 0x00010ce3, 0x00010ca3,
+ 0x00010ca4, 0x00010ce4, 0x00010ca4,
+ 0x00010ca5, 0x00010ce5, 0x00010ca5,
+ 0x00010ca6, 0x00010ce6, 0x00010ca6,
+ 0x00010ca7, 0x00010ce7, 0x00010ca7,
+ 0x00010ca8, 0x00010ce8, 0x00010ca8,
+ 0x00010ca9, 0x00010ce9, 0x00010ca9,
+ 0x00010caa, 0x00010cea, 0x00010caa,
+ 0x00010cab, 0x00010ceb, 0x00010cab,
+ 0x00010cac, 0x00010cec, 0x00010cac,
+ 0x00010cad, 0x00010ced, 0x00010cad,
+ 0x00010cae, 0x00010cee, 0x00010cae,
+ 0x00010caf, 0x00010cef, 0x00010caf,
+ 0x00010cb0, 0x00010cf0, 0x00010cb0,
+ 0x00010cb1, 0x00010cf1, 0x00010cb1,
+ 0x00010cb2, 0x00010cf2, 0x00010cb2,
+ 0x000118a0, 0x000118c0, 0x000118a0,
+ 0x000118a1, 0x000118c1, 0x000118a1,
+ 0x000118a2, 0x000118c2, 0x000118a2,
+ 0x000118a3, 0x000118c3, 0x000118a3,
+ 0x000118a4, 0x000118c4, 0x000118a4,
+ 0x000118a5, 0x000118c5, 0x000118a5,
+ 0x000118a6, 0x000118c6, 0x000118a6,
+ 0x000118a7, 0x000118c7, 0x000118a7,
+ 0x000118a8, 0x000118c8, 0x000118a8,
+ 0x000118a9, 0x000118c9, 0x000118a9,
+ 0x000118aa, 0x000118ca, 0x000118aa,
+ 0x000118ab, 0x000118cb, 0x000118ab,
+ 0x000118ac, 0x000118cc, 0x000118ac,
+ 0x000118ad, 0x000118cd, 0x000118ad,
+ 0x000118ae, 0x000118ce, 0x000118ae,
+ 0x000118af, 0x000118cf, 0x000118af,
+ 0x000118b0, 0x000118d0, 0x000118b0,
+ 0x000118b1, 0x000118d1, 0x000118b1,
+ 0x000118b2, 0x000118d2, 0x000118b2,
+ 0x000118b3, 0x000118d3, 0x000118b3,
+ 0x000118b4, 0x000118d4, 0x000118b4,
+ 0x000118b5, 0x000118d5, 0x000118b5,
+ 0x000118b6, 0x000118d6, 0x000118b6,
+ 0x000118b7, 0x000118d7, 0x000118b7,
+ 0x000118b8, 0x000118d8, 0x000118b8,
+ 0x000118b9, 0x000118d9, 0x000118b9,
+ 0x000118ba, 0x000118da, 0x000118ba,
+ 0x000118bb, 0x000118db, 0x000118bb,
+ 0x000118bc, 0x000118dc, 0x000118bc,
+ 0x000118bd, 0x000118dd, 0x000118bd,
+ 0x000118be, 0x000118de, 0x000118be,
+ 0x000118bf, 0x000118df, 0x000118bf,
0x00000061, 0x00000041, 0x00000041,
0x00000062, 0x00000042, 0x00000042,
0x00000063, 0x00000043, 0x00000043,
@@ -3435,12 +3913,16 @@ static const unsigned int _uccase_map[] = {
0x00000257, 0x0000018a, 0x0000018a,
0x00000259, 0x0000018f, 0x0000018f,
0x0000025b, 0x00000190, 0x00000190,
+ 0x0000025c, 0x0000a7ab, 0x0000a7ab,
0x00000260, 0x00000193, 0x00000193,
+ 0x00000261, 0x0000a7ac, 0x0000a7ac,
0x00000263, 0x00000194, 0x00000194,
0x00000265, 0x0000a78d, 0x0000a78d,
+ 0x00000266, 0x0000a7aa, 0x0000a7aa,
0x00000268, 0x00000197, 0x00000197,
0x00000269, 0x00000196, 0x00000196,
0x0000026b, 0x00002c62, 0x00002c62,
+ 0x0000026c, 0x0000a7ad, 0x0000a7ad,
0x0000026f, 0x0000019c, 0x0000019c,
0x00000271, 0x00002c6e, 0x00002c6e,
0x00000272, 0x0000019d, 0x0000019d,
@@ -3448,12 +3930,15 @@ static const unsigned int _uccase_map[] = {
0x0000027d, 0x00002c64, 0x00002c64,
0x00000280, 0x000001a6, 0x000001a6,
0x00000283, 0x000001a9, 0x000001a9,
+ 0x00000287, 0x0000a7b1, 0x0000a7b1,
0x00000288, 0x000001ae, 0x000001ae,
0x00000289, 0x00000244, 0x00000244,
0x0000028a, 0x000001b1, 0x000001b1,
0x0000028b, 0x000001b2, 0x000001b2,
0x0000028c, 0x00000245, 0x00000245,
0x00000292, 0x000001b7, 0x000001b7,
+ 0x0000029d, 0x0000a7b2, 0x0000a7b2,
+ 0x0000029e, 0x0000a7b0, 0x0000a7b0,
0x00000345, 0x00000399, 0x00000399,
0x00000371, 0x00000370, 0x00000370,
0x00000373, 0x00000372, 0x00000372,
@@ -3515,6 +4000,7 @@ static const unsigned int _uccase_map[] = {
0x000003f0, 0x0000039a, 0x0000039a,
0x000003f1, 0x000003a1, 0x000003a1,
0x000003f2, 0x000003f9, 0x000003f9,
+ 0x000003f3, 0x0000037f, 0x0000037f,
0x000003f5, 0x00000395, 0x00000395,
0x000003f8, 0x000003f7, 0x000003f7,
0x000003fb, 0x000003fa, 0x000003fa,
@@ -3662,6 +4148,10 @@ static const unsigned int _uccase_map[] = {
0x00000523, 0x00000522, 0x00000522,
0x00000525, 0x00000524, 0x00000524,
0x00000527, 0x00000526, 0x00000526,
+ 0x00000529, 0x00000528, 0x00000528,
+ 0x0000052b, 0x0000052a, 0x0000052a,
+ 0x0000052d, 0x0000052c, 0x0000052c,
+ 0x0000052f, 0x0000052e, 0x0000052e,
0x00000561, 0x00000531, 0x00000531,
0x00000562, 0x00000532, 0x00000532,
0x00000563, 0x00000533, 0x00000533,
@@ -3700,6 +4190,12 @@ static const unsigned int _uccase_map[] = {
0x00000584, 0x00000554, 0x00000554,
0x00000585, 0x00000555, 0x00000555,
0x00000586, 0x00000556, 0x00000556,
+ 0x000013f8, 0x000013f0, 0x000013f0,
+ 0x000013f9, 0x000013f1, 0x000013f1,
+ 0x000013fa, 0x000013f2, 0x000013f2,
+ 0x000013fb, 0x000013f3, 0x000013f3,
+ 0x000013fc, 0x000013f4, 0x000013f4,
+ 0x000013fd, 0x000013f5, 0x000013f5,
0x00001d79, 0x0000a77d, 0x0000a77d,
0x00001d7d, 0x00002c63, 0x00002c63,
0x00001e01, 0x00001e00, 0x00001e00,
@@ -4074,6 +4570,7 @@ static const unsigned int _uccase_map[] = {
0x00002ce3, 0x00002ce2, 0x00002ce2,
0x00002cec, 0x00002ceb, 0x00002ceb,
0x00002cee, 0x00002ced, 0x00002ced,
+ 0x00002cf3, 0x00002cf2, 0x00002cf2,
0x00002d00, 0x000010a0, 0x000010a0,
0x00002d01, 0x000010a1, 0x000010a1,
0x00002d02, 0x000010a2, 0x000010a2,
@@ -4112,6 +4609,8 @@ static const unsigned int _uccase_map[] = {
0x00002d23, 0x000010c3, 0x000010c3,
0x00002d24, 0x000010c4, 0x000010c4,
0x00002d25, 0x000010c5, 0x000010c5,
+ 0x00002d27, 0x000010c7, 0x000010c7,
+ 0x00002d2d, 0x000010cd, 0x000010cd,
0x0000a641, 0x0000a640, 0x0000a640,
0x0000a643, 0x0000a642, 0x0000a642,
0x0000a645, 0x0000a644, 0x0000a644,
@@ -4147,6 +4646,8 @@ static const unsigned int _uccase_map[] = {
0x0000a693, 0x0000a692, 0x0000a692,
0x0000a695, 0x0000a694, 0x0000a694,
0x0000a697, 0x0000a696, 0x0000a696,
+ 0x0000a699, 0x0000a698, 0x0000a698,
+ 0x0000a69b, 0x0000a69a, 0x0000a69a,
0x0000a723, 0x0000a722, 0x0000a722,
0x0000a725, 0x0000a724, 0x0000a724,
0x0000a727, 0x0000a726, 0x0000a726,
@@ -4194,11 +4695,100 @@ static const unsigned int _uccase_map[] = {
0x0000a787, 0x0000a786, 0x0000a786,
0x0000a78c, 0x0000a78b, 0x0000a78b,
0x0000a791, 0x0000a790, 0x0000a790,
+ 0x0000a793, 0x0000a792, 0x0000a792,
+ 0x0000a797, 0x0000a796, 0x0000a796,
+ 0x0000a799, 0x0000a798, 0x0000a798,
+ 0x0000a79b, 0x0000a79a, 0x0000a79a,
+ 0x0000a79d, 0x0000a79c, 0x0000a79c,
+ 0x0000a79f, 0x0000a79e, 0x0000a79e,
0x0000a7a1, 0x0000a7a0, 0x0000a7a0,
0x0000a7a3, 0x0000a7a2, 0x0000a7a2,
0x0000a7a5, 0x0000a7a4, 0x0000a7a4,
0x0000a7a7, 0x0000a7a6, 0x0000a7a6,
0x0000a7a9, 0x0000a7a8, 0x0000a7a8,
+ 0x0000a7b5, 0x0000a7b4, 0x0000a7b4,
+ 0x0000a7b7, 0x0000a7b6, 0x0000a7b6,
+ 0x0000ab53, 0x0000a7b3, 0x0000a7b3,
+ 0x0000ab70, 0x000013a0, 0x000013a0,
+ 0x0000ab71, 0x000013a1, 0x000013a1,
+ 0x0000ab72, 0x000013a2, 0x000013a2,
+ 0x0000ab73, 0x000013a3, 0x000013a3,
+ 0x0000ab74, 0x000013a4, 0x000013a4,
+ 0x0000ab75, 0x000013a5, 0x000013a5,
+ 0x0000ab76, 0x000013a6, 0x000013a6,
+ 0x0000ab77, 0x000013a7, 0x000013a7,
+ 0x0000ab78, 0x000013a8, 0x000013a8,
+ 0x0000ab79, 0x000013a9, 0x000013a9,
+ 0x0000ab7a, 0x000013aa, 0x000013aa,
+ 0x0000ab7b, 0x000013ab, 0x000013ab,
+ 0x0000ab7c, 0x000013ac, 0x000013ac,
+ 0x0000ab7d, 0x000013ad, 0x000013ad,
+ 0x0000ab7e, 0x000013ae, 0x000013ae,
+ 0x0000ab7f, 0x000013af, 0x000013af,
+ 0x0000ab80, 0x000013b0, 0x000013b0,
+ 0x0000ab81, 0x000013b1, 0x000013b1,
+ 0x0000ab82, 0x000013b2, 0x000013b2,
+ 0x0000ab83, 0x000013b3, 0x000013b3,
+ 0x0000ab84, 0x000013b4, 0x000013b4,
+ 0x0000ab85, 0x000013b5, 0x000013b5,
+ 0x0000ab86, 0x000013b6, 0x000013b6,
+ 0x0000ab87, 0x000013b7, 0x000013b7,
+ 0x0000ab88, 0x000013b8, 0x000013b8,
+ 0x0000ab89, 0x000013b9, 0x000013b9,
+ 0x0000ab8a, 0x000013ba, 0x000013ba,
+ 0x0000ab8b, 0x000013bb, 0x000013bb,
+ 0x0000ab8c, 0x000013bc, 0x000013bc,
+ 0x0000ab8d, 0x000013bd, 0x000013bd,
+ 0x0000ab8e, 0x000013be, 0x000013be,
+ 0x0000ab8f, 0x000013bf, 0x000013bf,
+ 0x0000ab90, 0x000013c0, 0x000013c0,
+ 0x0000ab91, 0x000013c1, 0x000013c1,
+ 0x0000ab92, 0x000013c2, 0x000013c2,
+ 0x0000ab93, 0x000013c3, 0x000013c3,
+ 0x0000ab94, 0x000013c4, 0x000013c4,
+ 0x0000ab95, 0x000013c5, 0x000013c5,
+ 0x0000ab96, 0x000013c6, 0x000013c6,
+ 0x0000ab97, 0x000013c7, 0x000013c7,
+ 0x0000ab98, 0x000013c8, 0x000013c8,
+ 0x0000ab99, 0x000013c9, 0x000013c9,
+ 0x0000ab9a, 0x000013ca, 0x000013ca,
+ 0x0000ab9b, 0x000013cb, 0x000013cb,
+ 0x0000ab9c, 0x000013cc, 0x000013cc,
+ 0x0000ab9d, 0x000013cd, 0x000013cd,
+ 0x0000ab9e, 0x000013ce, 0x000013ce,
+ 0x0000ab9f, 0x000013cf, 0x000013cf,
+ 0x0000aba0, 0x000013d0, 0x000013d0,
+ 0x0000aba1, 0x000013d1, 0x000013d1,
+ 0x0000aba2, 0x000013d2, 0x000013d2,
+ 0x0000aba3, 0x000013d3, 0x000013d3,
+ 0x0000aba4, 0x000013d4, 0x000013d4,
+ 0x0000aba5, 0x000013d5, 0x000013d5,
+ 0x0000aba6, 0x000013d6, 0x000013d6,
+ 0x0000aba7, 0x000013d7, 0x000013d7,
+ 0x0000aba8, 0x000013d8, 0x000013d8,
+ 0x0000aba9, 0x000013d9, 0x000013d9,
+ 0x0000abaa, 0x000013da, 0x000013da,
+ 0x0000abab, 0x000013db, 0x000013db,
+ 0x0000abac, 0x000013dc, 0x000013dc,
+ 0x0000abad, 0x000013dd, 0x000013dd,
+ 0x0000abae, 0x000013de, 0x000013de,
+ 0x0000abaf, 0x000013df, 0x000013df,
+ 0x0000abb0, 0x000013e0, 0x000013e0,
+ 0x0000abb1, 0x000013e1, 0x000013e1,
+ 0x0000abb2, 0x000013e2, 0x000013e2,
+ 0x0000abb3, 0x000013e3, 0x000013e3,
+ 0x0000abb4, 0x000013e4, 0x000013e4,
+ 0x0000abb5, 0x000013e5, 0x000013e5,
+ 0x0000abb6, 0x000013e6, 0x000013e6,
+ 0x0000abb7, 0x000013e7, 0x000013e7,
+ 0x0000abb8, 0x000013e8, 0x000013e8,
+ 0x0000abb9, 0x000013e9, 0x000013e9,
+ 0x0000abba, 0x000013ea, 0x000013ea,
+ 0x0000abbb, 0x000013eb, 0x000013eb,
+ 0x0000abbc, 0x000013ec, 0x000013ec,
+ 0x0000abbd, 0x000013ed, 0x000013ed,
+ 0x0000abbe, 0x000013ee, 0x000013ee,
+ 0x0000abbf, 0x000013ef, 0x000013ef,
0x0000ff41, 0x0000ff21, 0x0000ff21,
0x0000ff42, 0x0000ff22, 0x0000ff22,
0x0000ff43, 0x0000ff23, 0x0000ff23,
@@ -4265,8 +4855,92 @@ static const unsigned int _uccase_map[] = {
0x0001044d, 0x00010425, 0x00010425,
0x0001044e, 0x00010426, 0x00010426,
0x0001044f, 0x00010427, 0x00010427,
+ 0x00010cc0, 0x00010c80, 0x00010c80,
+ 0x00010cc1, 0x00010c81, 0x00010c81,
+ 0x00010cc2, 0x00010c82, 0x00010c82,
+ 0x00010cc3, 0x00010c83, 0x00010c83,
+ 0x00010cc4, 0x00010c84, 0x00010c84,
+ 0x00010cc5, 0x00010c85, 0x00010c85,
+ 0x00010cc6, 0x00010c86, 0x00010c86,
+ 0x00010cc7, 0x00010c87, 0x00010c87,
+ 0x00010cc8, 0x00010c88, 0x00010c88,
+ 0x00010cc9, 0x00010c89, 0x00010c89,
+ 0x00010cca, 0x00010c8a, 0x00010c8a,
+ 0x00010ccb, 0x00010c8b, 0x00010c8b,
+ 0x00010ccc, 0x00010c8c, 0x00010c8c,
+ 0x00010ccd, 0x00010c8d, 0x00010c8d,
+ 0x00010cce, 0x00010c8e, 0x00010c8e,
+ 0x00010ccf, 0x00010c8f, 0x00010c8f,
+ 0x00010cd0, 0x00010c90, 0x00010c90,
+ 0x00010cd1, 0x00010c91, 0x00010c91,
+ 0x00010cd2, 0x00010c92, 0x00010c92,
+ 0x00010cd3, 0x00010c93, 0x00010c93,
+ 0x00010cd4, 0x00010c94, 0x00010c94,
+ 0x00010cd5, 0x00010c95, 0x00010c95,
+ 0x00010cd6, 0x00010c96, 0x00010c96,
+ 0x00010cd7, 0x00010c97, 0x00010c97,
+ 0x00010cd8, 0x00010c98, 0x00010c98,
+ 0x00010cd9, 0x00010c99, 0x00010c99,
+ 0x00010cda, 0x00010c9a, 0x00010c9a,
+ 0x00010cdb, 0x00010c9b, 0x00010c9b,
+ 0x00010cdc, 0x00010c9c, 0x00010c9c,
+ 0x00010cdd, 0x00010c9d, 0x00010c9d,
+ 0x00010cde, 0x00010c9e, 0x00010c9e,
+ 0x00010cdf, 0x00010c9f, 0x00010c9f,
+ 0x00010ce0, 0x00010ca0, 0x00010ca0,
+ 0x00010ce1, 0x00010ca1, 0x00010ca1,
+ 0x00010ce2, 0x00010ca2, 0x00010ca2,
+ 0x00010ce3, 0x00010ca3, 0x00010ca3,
+ 0x00010ce4, 0x00010ca4, 0x00010ca4,
+ 0x00010ce5, 0x00010ca5, 0x00010ca5,
+ 0x00010ce6, 0x00010ca6, 0x00010ca6,
+ 0x00010ce7, 0x00010ca7, 0x00010ca7,
+ 0x00010ce8, 0x00010ca8, 0x00010ca8,
+ 0x00010ce9, 0x00010ca9, 0x00010ca9,
+ 0x00010cea, 0x00010caa, 0x00010caa,
+ 0x00010ceb, 0x00010cab, 0x00010cab,
+ 0x00010cec, 0x00010cac, 0x00010cac,
+ 0x00010ced, 0x00010cad, 0x00010cad,
+ 0x00010cee, 0x00010cae, 0x00010cae,
+ 0x00010cef, 0x00010caf, 0x00010caf,
+ 0x00010cf0, 0x00010cb0, 0x00010cb0,
+ 0x00010cf1, 0x00010cb1, 0x00010cb1,
+ 0x00010cf2, 0x00010cb2, 0x00010cb2,
+ 0x000118c0, 0x000118a0, 0x000118a0,
+ 0x000118c1, 0x000118a1, 0x000118a1,
+ 0x000118c2, 0x000118a2, 0x000118a2,
+ 0x000118c3, 0x000118a3, 0x000118a3,
+ 0x000118c4, 0x000118a4, 0x000118a4,
+ 0x000118c5, 0x000118a5, 0x000118a5,
+ 0x000118c6, 0x000118a6, 0x000118a6,
+ 0x000118c7, 0x000118a7, 0x000118a7,
+ 0x000118c8, 0x000118a8, 0x000118a8,
+ 0x000118c9, 0x000118a9, 0x000118a9,
+ 0x000118ca, 0x000118aa, 0x000118aa,
+ 0x000118cb, 0x000118ab, 0x000118ab,
+ 0x000118cc, 0x000118ac, 0x000118ac,
+ 0x000118cd, 0x000118ad, 0x000118ad,
+ 0x000118ce, 0x000118ae, 0x000118ae,
+ 0x000118cf, 0x000118af, 0x000118af,
+ 0x000118d0, 0x000118b0, 0x000118b0,
+ 0x000118d1, 0x000118b1, 0x000118b1,
+ 0x000118d2, 0x000118b2, 0x000118b2,
+ 0x000118d3, 0x000118b3, 0x000118b3,
+ 0x000118d4, 0x000118b4, 0x000118b4,
+ 0x000118d5, 0x000118b5, 0x000118b5,
+ 0x000118d6, 0x000118b6, 0x000118b6,
+ 0x000118d7, 0x000118b7, 0x000118b7,
+ 0x000118d8, 0x000118b8, 0x000118b8,
+ 0x000118d9, 0x000118b9, 0x000118b9,
+ 0x000118da, 0x000118ba, 0x000118ba,
+ 0x000118db, 0x000118bb, 0x000118bb,
+ 0x000118dc, 0x000118bc, 0x000118bc,
+ 0x000118dd, 0x000118bd, 0x000118bd,
+ 0x000118de, 0x000118be, 0x000118be,
+ 0x000118df, 0x000118bf, 0x000118bf,
0x000001c5, 0x000001c4, 0x000001c6,
0x000001c8, 0x000001c7, 0x000001c9,
0x000001cb, 0x000001ca, 0x000001cc,
0x000001f2, 0x000001f1, 0x000001f3
};
+
diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4
index ab954e649e..eb5598313a 100644
--- a/ext/mcrypt/config.m4
+++ b/ext/mcrypt/config.m4
@@ -55,5 +55,5 @@ if test "$PHP_MCRYPT" != "no"; then
PHP_ADD_INCLUDE($MCRYPT_DIR/include)
PHP_SUBST(MCRYPT_SHARED_LIBADD)
- PHP_NEW_EXTENSION(mcrypt, mcrypt.c mcrypt_filter.c, $ext_shared)
+ PHP_NEW_EXTENSION(mcrypt, mcrypt.c mcrypt_filter.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
fi
diff --git a/ext/mcrypt/config.w32 b/ext/mcrypt/config.w32
index 8d30db7ce2..169781eeda 100644
--- a/ext/mcrypt/config.w32
+++ b/ext/mcrypt/config.w32
@@ -10,7 +10,7 @@ if (PHP_MCRYPT != "no") {
CHECK_LIB('Advapi32.lib', 'mcrypt')
) {
- EXTENSION('mcrypt', 'mcrypt.c mcrypt_filter.c', false);
+ EXTENSION('mcrypt', 'mcrypt.c mcrypt_filter.c', false, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_LIBMCRYPT', 1);
AC_DEFINE('HAVE_LIBMCRYPT24', 1);
} else {
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index f9cc076d0d..073bfec775 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -251,6 +251,8 @@ const zend_function_entry mcrypt_functions[] = { /* {{{ */
static PHP_MINFO_FUNCTION(mcrypt);
static PHP_MINIT_FUNCTION(mcrypt);
static PHP_MSHUTDOWN_FUNCTION(mcrypt);
+static PHP_GINIT_FUNCTION(mcrypt);
+static PHP_GSHUTDOWN_FUNCTION(mcrypt);
ZEND_DECLARE_MODULE_GLOBALS(mcrypt)
@@ -263,13 +265,16 @@ zend_module_entry mcrypt_module_entry = {
PHP_MINFO(mcrypt),
PHP_MCRYPT_VERSION,
PHP_MODULE_GLOBALS(mcrypt),
- NULL,
- NULL,
+ PHP_GINIT(mcrypt),
+ PHP_GSHUTDOWN(mcrypt),
NULL,
STANDARD_MODULE_PROPERTIES_EX
};
#ifdef COMPILE_DL_MCRYPT
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE()
+#endif
ZEND_GET_MODULE(mcrypt)
#endif
@@ -346,6 +351,28 @@ static void php_mcrypt_module_dtor(zend_resource *rsrc) /* {{{ */
}
/* }}} */
+static PHP_GINIT_FUNCTION(mcrypt)
+{/*{{{*/
+#if defined(COMPILE_DL_MCRYPT) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE();
+#endif
+ mcrypt_globals->fd[RANDOM] = -1;
+ mcrypt_globals->fd[URANDOM] = -1;
+}/*}}}*/
+
+static PHP_GSHUTDOWN_FUNCTION(mcrypt)
+{/*{{{*/
+ if (mcrypt_globals->fd[RANDOM] > 0) {
+ close(mcrypt_globals->fd[RANDOM]);
+ mcrypt_globals->fd[RANDOM] = -1;
+ }
+
+ if (mcrypt_globals->fd[URANDOM] > 0) {
+ close(mcrypt_globals->fd[URANDOM]);
+ mcrypt_globals->fd[URANDOM] = -1;
+ }
+}/*}}}*/
+
static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */
{
le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor, NULL, "mcrypt", module_number);
@@ -403,9 +430,6 @@ static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */
php_stream_filter_register_factory("mcrypt.*", &php_mcrypt_filter_factory);
php_stream_filter_register_factory("mdecrypt.*", &php_mcrypt_filter_factory);
- MCG(fd[RANDOM]) = -1;
- MCG(fd[URANDOM]) = -1;
-
return SUCCESS;
}
/* }}} */
@@ -415,14 +439,6 @@ static PHP_MSHUTDOWN_FUNCTION(mcrypt) /* {{{ */
php_stream_filter_unregister_factory("mcrypt.*");
php_stream_filter_unregister_factory("mdecrypt.*");
- if (MCG(fd[RANDOM]) > 0) {
- close(MCG(fd[RANDOM]));
- }
-
- if (MCG(fd[URANDOM]) > 0) {
- close(MCG(fd[URANDOM]));
- }
-
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
@@ -548,7 +564,7 @@ PHP_FUNCTION(mcrypt_generic_init)
memset(iv_s, 0, iv_size + 1);
if (key_len > max_key_size) {
- php_error_docref(NULL, E_WARNING, "Key size too large; supplied length: %d, max: %d", key_len, max_key_size);
+ php_error_docref(NULL, E_WARNING, "Key size too large; supplied length: %zd, max: %d", key_len, max_key_size);
key_size = max_key_size;
} else {
key_size = (int)key_len;
@@ -556,7 +572,7 @@ PHP_FUNCTION(mcrypt_generic_init)
memcpy(key_s, key, key_len);
if (iv_len != iv_size) {
- php_error_docref(NULL, E_WARNING, "Iv size incorrect; supplied length: %d, needed: %d", iv_len, iv_size);
+ php_error_docref(NULL, E_WARNING, "Iv size incorrect; supplied length: %zd, needed: %d", iv_len, iv_size);
if (iv_len > iv_size) {
iv_len = iv_size;
}
@@ -1202,6 +1218,10 @@ static int php_mcrypt_ensure_valid_iv(MCRYPT td, const char *iv, int iv_size) /*
{
if (mcrypt_enc_mode_has_iv(td) == 1) {
int expected_iv_size = mcrypt_enc_get_iv_size(td);
+ if (expected_iv_size == 0) {
+ /* Algorithm does not use IV, even though mode supports it */
+ return SUCCESS;
+ }
if (!iv) {
php_error_docref(NULL, E_WARNING,
@@ -1361,7 +1381,7 @@ PHP_FUNCTION(mcrypt_create_iv)
while (read_bytes < size) {
n = read(*fd, iv + read_bytes, size - read_bytes);
- if (n < 0) {
+ if (n <= 0) {
break;
}
read_bytes += n;
diff --git a/ext/mcrypt/mcrypt_filter.c b/ext/mcrypt/mcrypt_filter.c
index 3a3f390036..03f1548fc3 100644
--- a/ext/mcrypt/mcrypt_filter.c
+++ b/ext/mcrypt/mcrypt_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -174,7 +174,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
return NULL;
}
- if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("mode")))) {
+ if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("mode")))) {
if (Z_TYPE_P(tmpzval) == IS_STRING) {
mode = Z_STRVAL_P(tmpzval);
} else {
@@ -182,7 +182,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
}
- if ((tmpzval=zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("algorithms_dir")))) {
+ if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("algorithms_dir")))) {
if (Z_TYPE_P(tmpzval) == IS_STRING) {
algo_dir = Z_STRVAL_P(tmpzval);
} else {
@@ -190,7 +190,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
}
- if ((tmpzval=zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("modes_dir")))) {
+ if ((tmpzval=zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("modes_dir")))) {
if (Z_TYPE_P(tmpzval) == IS_STRING) {
mode_dir = Z_STRVAL_P(tmpzval);
} else {
@@ -198,7 +198,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
}
- if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("key"))) &&
+ if ((tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("key"))) &&
Z_TYPE_P(tmpzval) == IS_STRING) {
key = Z_STRVAL_P(tmpzval);
key_len = (int)Z_STRLEN_P(tmpzval);
@@ -218,7 +218,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
key_len = keyl;
}
- if (!(tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("iv"))) ||
+ if (!(tmpzval = zend_hash_str_find(Z_ARRVAL_P(filterparams), ZEND_STRL("iv"))) ||
Z_TYPE_P(tmpzval) != IS_STRING) {
php_error_docref(NULL, E_WARNING, "Filter parameter[iv] not provided or not of type: string");
mcrypt_module_close(mcrypt_module);
diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h
index 1fc9e41fe8..438564219e 100644
--- a/ext/mcrypt/php_mcrypt.h
+++ b/ext/mcrypt/php_mcrypt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -83,11 +83,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mcrypt)
int fd[2]; // RANDOM = 0, URANDOM = 1
ZEND_END_MODULE_GLOBALS(mcrypt)
-#ifdef ZTS
-# define MCG(v) TSRMG(mcrypt_globals_id, zend_mcrypt_globals *, v)
-#else
-# define MCG(v) (mcrypt_globals.v)
-#endif
+#define MCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mcrypt, v)
#else
#define mcrypt_module_ptr NULL
diff --git a/ext/mcrypt/php_mcrypt_filter.h b/ext/mcrypt/php_mcrypt_filter.h
index 5619fb1540..dd623369ae 100644
--- a/ext/mcrypt/php_mcrypt_filter.h
+++ b/ext/mcrypt/php_mcrypt_filter.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mcrypt/tests/bug70625.phpt b/ext/mcrypt/tests/bug70625.phpt
new file mode 100644
index 0000000000..e9c0de0be3
--- /dev/null
+++ b/ext/mcrypt/tests/bug70625.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70625: mcrypt_encrypt() : won't return data when no IV was specified under RC4
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
+--FILE--
+<?php
+
+$key = 'secretkey';
+$ciphertext = mcrypt_encrypt(MCRYPT_ARCFOUR, $key, 'payload', MCRYPT_MODE_STREAM);
+var_dump(bin2hex($ciphertext));
+$plaintext = mcrypt_decrypt(MCRYPT_ARCFOUR, $key, $ciphertext, MCRYPT_MODE_STREAM);
+var_dump($plaintext);
+
+?>
+--EXPECT--
+string(14) "d5c9a57023d0f1"
+string(7) "payload"
diff --git a/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt b/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt
index c89a44ad8a..93db98241a 100644
--- a/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt
+++ b/ext/mcrypt/tests/mcrypt_module_get_algo_block_size.phpt
@@ -8,12 +8,13 @@ var_dump(mcrypt_module_get_algo_block_size(MCRYPT_RIJNDAEL_256));
var_dump(mcrypt_module_get_algo_block_size(MCRYPT_RIJNDAEL_192));
var_dump(mcrypt_module_get_algo_block_size(MCRYPT_RC2));
var_dump(mcrypt_module_get_algo_block_size(MCRYPT_XTEA));
-var_dump(mcrypt_module_get_algo_block_size(MCRYPT_CAST_128));
+var_dump(mcrypt_module_get_algo_block_size(MCRYPT_CAST_256));
var_dump(mcrypt_module_get_algo_block_size(MCRYPT_BLOWFISH));
+?>
--EXPECT--
int(32)
int(24)
int(8)
int(8)
-int(8)
+int(16)
int(8)
diff --git a/ext/mcrypt/tests/mcrypt_module_get_algo_key_size.phpt b/ext/mcrypt/tests/mcrypt_module_get_algo_key_size.phpt
index 7d3841f3e2..35e4721055 100644
--- a/ext/mcrypt/tests/mcrypt_module_get_algo_key_size.phpt
+++ b/ext/mcrypt/tests/mcrypt_module_get_algo_key_size.phpt
@@ -8,12 +8,13 @@ var_dump(mcrypt_module_get_algo_key_size(MCRYPT_RIJNDAEL_256));
var_dump(mcrypt_module_get_algo_key_size(MCRYPT_RIJNDAEL_192));
var_dump(mcrypt_module_get_algo_key_size(MCRYPT_RC2));
var_dump(mcrypt_module_get_algo_key_size(MCRYPT_XTEA));
-var_dump(mcrypt_module_get_algo_key_size(MCRYPT_CAST_128));
+var_dump(mcrypt_module_get_algo_key_size(MCRYPT_CAST_256));
var_dump(mcrypt_module_get_algo_key_size(MCRYPT_BLOWFISH));
+?>
--EXPECT--
int(32)
int(32)
int(128)
int(16)
-int(16)
+int(32)
int(56)
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index b357f4b057..be6c30d46b 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,6 +34,7 @@
#include "php_mysqli_structs.h"
#include "mysqli_priv.h"
#include "zend_exceptions.h"
+#include "ext/spl/spl_exceptions.h"
#include "zend_interfaces.h"
ZEND_DECLARE_MODULE_GLOBALS(mysqli)
@@ -582,9 +583,7 @@ PHP_MINIT_FUNCTION(mysqli)
mysqli_object_handlers.write_property = mysqli_write_property;
mysqli_object_handlers.get_property_ptr_ptr = std_hnd->get_property_ptr_ptr;
mysqli_object_handlers.has_property = mysqli_object_has_property;
-#if PHP_VERSION_ID >= 50300
mysqli_object_handlers.get_debug_info = mysqli_object_get_debug_info;
-#endif
memcpy(&mysqli_object_driver_handlers, &mysqli_object_handlers, sizeof(zend_object_handlers));
mysqli_object_driver_handlers.free_obj = mysqli_driver_free_storage;
memcpy(&mysqli_object_link_handlers, &mysqli_object_handlers, sizeof(zend_object_handlers));
@@ -603,11 +602,7 @@ PHP_MINIT_FUNCTION(mysqli)
"MySqli persistent connection", module_number);
INIT_CLASS_ENTRY(cex, "mysqli_sql_exception", mysqli_exception_methods);
-#ifdef HAVE_SPL
mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, spl_ce_RuntimeException);
-#else
- mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, zend_ce_exception);
-#endif
mysqli_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
zend_declare_property_long(mysqli_exception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED);
zend_declare_property_string(mysqli_exception_class_entry, "sqlstate", sizeof("sqlstate")-1, "00000", ZEND_ACC_PROTECTED);
@@ -718,6 +713,12 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_IGNORE_SPACE", CLIENT_IGNORE_SPACE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_NO_SCHEMA", CLIENT_NO_SCHEMA, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_FOUND_ROWS", CLIENT_FOUND_ROWS, CONST_CS | CONST_PERSISTENT);
+#ifdef CLIENT_SSL_VERIFY_SERVER_CERT
+ REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_SSL_VERIFY_SERVER_CERT", CLIENT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
+#if defined(MYSQLI_USE_MYSQLND)
+ REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT", CLIENT_SSL_DONT_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
+#endif
+#endif
#if (MYSQL_VERSION_ID >= 50611 && defined(CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS)) || defined(MYSQLI_USE_MYSQLND)
REGISTER_LONG_CONSTANT("MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS", CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS", MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, CONST_CS | CONST_PERSISTENT);
@@ -801,7 +802,9 @@ PHP_MINIT_FUNCTION(mysqli)
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_CHAR", FIELD_TYPE_CHAR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_INTERVAL", FIELD_TYPE_INTERVAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_GEOMETRY", FIELD_TYPE_GEOMETRY, CONST_CS | CONST_PERSISTENT);
-
+#ifdef FIELD_TYPE_JSON
+ REGISTER_LONG_CONSTANT("MYSQLI_TYPE_JSON", FIELD_TYPE_JSON, CONST_CS | CONST_PERSISTENT);
+#endif
#if MYSQL_VERSION_ID > 50002 || defined(MYSQLI_USE_MYSQLND)
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_NEWDECIMAL", FIELD_TYPE_NEWDECIMAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_BIT", FIELD_TYPE_BIT, CONST_CS | CONST_PERSISTENT);
@@ -991,9 +994,7 @@ PHP_MINFO_FUNCTION(mysqli)
/* Dependancies */
static const zend_module_dep mysqli_deps[] = {
-#if defined(HAVE_SPL) && (PHP_VERSION_ID >= 50100)
ZEND_MOD_REQUIRED("spl")
-#endif
#if defined(MYSQLI_USE_MYSQLND)
ZEND_MOD_REQUIRED("mysqlnd")
#endif
@@ -1023,7 +1024,7 @@ zend_module_entry mysqli_module_entry = {
#ifdef COMPILE_DL_MYSQLI
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(mysqli)
#endif
@@ -1275,9 +1276,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
object_and_properties_init(return_value, ce, NULL);
if (!ce->default_properties_count && !ce->__set) {
- ALLOC_HASHTABLE(Z_OBJ_P(return_value)->properties);
- *Z_OBJ_P(return_value)->properties = *Z_ARRVAL(dataset);
- efree(Z_ARR(dataset));
+ Z_OBJ_P(return_value)->properties = Z_ARR(dataset);
} else {
zend_merge_properties(return_value, Z_ARRVAL(dataset));
zval_ptr_dtor(&dataset);
@@ -1285,9 +1284,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
if (ce->constructor) {
fci.size = sizeof(fci);
- fci.function_table = &ce->function_table;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = Z_OBJ_P(return_value);
fci.retval = &retval;
fci.params = NULL;
@@ -1309,7 +1306,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
fcc.initialized = 1;
fcc.function_handler = ce->constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index ce33fa832a..333e890f3b 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1267,7 +1267,11 @@ PHP_FUNCTION(mysqli_fetch_lengths)
MYSQL_RES *result;
zval *mysql_result;
unsigned int i;
- zend_ulong *ret;
+#if defined(MYSQLI_USE_MYSQLND)
+ const size_t *ret;
+#else
+ const zend_ulong *ret;
+#endif
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) {
return;
@@ -1693,10 +1697,6 @@ static int mysqli_options_get_option_zval_type(int option)
{
switch (option) {
#ifdef MYSQLI_USE_MYSQLND
-#if PHP_MAJOR_VERSION == 6
- /* PHP-7 doesn't supprt unicode */
- case MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE:
-#endif
case MYSQLND_OPT_NET_CMD_BUFFER_SIZE:
case MYSQLND_OPT_NET_READ_BUFFER_SIZE:
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
@@ -1776,15 +1776,13 @@ PHP_FUNCTION(mysqli_options)
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
-#if PHP_API_VERSION < 20100412
- if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) {
-#else
+#if !defined(MYSQLI_USE_MYSQLND)
if (PG(open_basedir) && PG(open_basedir)[0] != '\0') {
-#endif
if(mysql_option == MYSQL_OPT_LOCAL_INFILE) {
RETURN_FALSE;
}
}
+#endif
expected_type = mysqli_options_get_option_zval_type(mysql_option);
if (expected_type != Z_TYPE_P(mysql_value)) {
switch (expected_type) {
diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c
index 5c4c80cd6f..a161911341 100644
--- a/ext/mysqli/mysqli_driver.c
+++ b/ext/mysqli/mysqli_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_embedded.c b/ext/mysqli/mysqli_embedded.c
index 97232ed0cb..8151421d8b 100644
--- a/ext/mysqli/mysqli_embedded.c
+++ b/ext/mysqli/mysqli_embedded.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -51,16 +51,16 @@ PHP_FUNCTION(mysqli_embedded_server_start)
RETURN_TRUE;
}
/* get arguments */
- if ((argc = zend_hash_num_elements(HASH_OF(args)))) {
+ if ((argc = zend_hash_num_elements(Z_ARRVAL_P(args)))) {
arguments = safe_emalloc(sizeof(char *), argc + 1, 0);
arguments[0] = NULL;
- zend_hash_internal_pointer_reset_ex(HASH_OF(args), &pos);
+ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(args), &pos);
- for (index = 0;; zend_hash_move_forward_ex(HASH_OF(args), &pos)) {
+ for (index = 0;; zend_hash_move_forward_ex(Z_ARRVAL_P(args), &pos)) {
zval **item;
- if (zend_hash_get_current_data_ex(HASH_OF(args), (void **) &item, &pos) == FAILURE) {
+ if (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void **) &item, &pos) == FAILURE) {
break;
}
@@ -72,16 +72,16 @@ PHP_FUNCTION(mysqli_embedded_server_start)
}
/* get groups */
- if ((zend_hash_num_elements(HASH_OF(grps)))) {
- groups = safe_emalloc(sizeof(char *), zend_hash_num_elements(HASH_OF(grps)) + 1, 0);
+ if ((zend_hash_num_elements(Z_ARRVAL_P(grps)))) {
+ groups = safe_emalloc(sizeof(char *), zend_hash_num_elements(Z_ARRVAL_P(grps)) + 1, 0);
groups[0] = NULL;
- zend_hash_internal_pointer_reset_ex(HASH_OF(grps), &pos);
+ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(grps), &pos);
- for (index = 0;; zend_hash_move_forward_ex(HASH_OF(grps), &pos)) {
+ for (index = 0;; zend_hash_move_forward_ex(Z_ARRVAL_P(grps), &pos)) {
zval ** item;
- if (zend_hash_get_current_data_ex(HASH_OF(grps), (void **) &item, &pos) == FAILURE) {
+ if (zend_hash_get_current_data_ex(Z_ARRVAL_P(grps), (void **) &item, &pos) == FAILURE) {
break;
}
diff --git a/ext/mysqli/mysqli_exception.c b/ext/mysqli/mysqli_exception.c
index cb8d6a0668..ba3eebb19a 100644
--- a/ext/mysqli/mysqli_exception.c
+++ b/ext/mysqli/mysqli_exception.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c
index f69491f825..abc23f0699 100644
--- a/ext/mysqli/mysqli_fe.c
+++ b/ext/mysqli/mysqli_fe.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -243,18 +243,14 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_object, 0, 0, 1)
-#if PHP_VERSION_ID > 50399
MYSQLI_ZEND_ARG_OBJ_INFO_RESULT()
ZEND_ARG_INFO(0, class_name)
ZEND_ARG_ARRAY_INFO(0, params, 0)
-#endif
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_object, 0, 0, 0)
-#if PHP_VERSION_ID > 50399
ZEND_ARG_INFO(0, class_name)
ZEND_ARG_ARRAY_INFO(0, params, 0)
-#endif
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_kill, 0, 0, 2)
@@ -551,7 +547,7 @@ const zend_function_entry mysqli_link_methods[] = {
PHP_FALIAS(init,mysqli_init_method, arginfo_mysqli_no_params)
PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill)
PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query)
- PHP_FALIAS(mysqli, mysqli_link_construct, arginfo_mysqli_connect)
+ PHP_FALIAS(__construct, mysqli_link_construct, arginfo_mysqli_connect)
PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params)
PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params)
PHP_FALIAS(options, mysqli_options, arginfo_class_mysqli_options)
diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h
index 4710bb128f..d8e07e73db 100644
--- a/ext/mysqli/mysqli_fe.h
+++ b/ext/mysqli/mysqli_fe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -53,7 +53,6 @@ PHP_FUNCTION(mysqli_field_count);
PHP_FUNCTION(mysqli_field_seek);
PHP_FUNCTION(mysqli_field_tell);
PHP_FUNCTION(mysqli_free_result);
-PHP_FUNCTION(mysqli_get_cache_stats);
PHP_FUNCTION(mysqli_get_client_stats);
PHP_FUNCTION(mysqli_get_connection_stats);
PHP_FUNCTION(mysqli_get_charset);
diff --git a/ext/mysqli/mysqli_libmysql.h b/ext/mysqli/mysqli_libmysql.h
index 24ddd460d2..afeda2acaa 100644
--- a/ext/mysqli/mysqli_libmysql.h
+++ b/ext/mysqli/mysqli_libmysql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_mysqlnd.h b/ext/mysqli/mysqli_mysqlnd.h
index a1656e59eb..1b5f131a89 100644
--- a/ext/mysqli/mysqli_mysqlnd.h
+++ b/ext/mysqli/mysqli_mysqlnd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2009 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,9 +12,9 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Georg Richter <georg@php.net> |
+ | Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 36368755de..49db7bbfe6 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -118,9 +118,11 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne
flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */
/* remove some insecure options */
flags &= ~CLIENT_MULTI_STATEMENTS; /* don't allow multi_queries via connect parameter */
+#if !defined(MYSQLI_USE_MYSQLND)
if (PG(open_basedir) && PG(open_basedir)[0] != '\0') {
flags &= ~CLIENT_LOCAL_FILES;
}
+#endif
}
if (!socket_len || !socket) {
diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h
index 2f994fb12c..c34049c89e 100644
--- a/ext/mysqli/mysqli_priv.h
+++ b/ext/mysqli/mysqli_priv.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -78,10 +78,6 @@ extern void php_mysqli_report_error(const char *sqlstate, int errorno, const cha
extern void php_mysqli_report_index(const char *query, unsigned int status);
extern void php_mysqli_throw_sql_exception(char *sqlstate, int errorno, char *format, ...);
-#ifdef HAVE_SPL
-extern PHPAPI zend_class_entry *spl_ce_RuntimeException;
-#endif
-
#define PHP_MYSQLI_EXPORT(__type) PHP_MYSQLI_API __type
PHP_MYSQLI_EXPORT(zend_object *) mysqli_objects_new(zend_class_entry *);
diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c
index 11f136e603..6b9e95ff7b 100644
--- a/ext/mysqli/mysqli_prop.c
+++ b/ext/mysqli/mysqli_prop.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -15,8 +15,6 @@
| Author: Georg Richter <georg@php.net> |
| Andrey Hristov <andrey@php.net> |
+----------------------------------------------------------------------+
-
- $Id$
*/
#ifdef HAVE_CONFIG_H
@@ -289,7 +287,11 @@ static zval *result_type_read(mysqli_object *obj, zval *retval)
static zval *result_lengths_read(mysqli_object *obj, zval *retval)
{
MYSQL_RES *p;
- zend_ulong *ret;
+#if defined(MYSQLI_USE_MYSQLND)
+ const size_t *ret;
+#else
+ const zend_ulong *ret;
+#endif
uint field_count;
CHECK_STATUS(MYSQLI_STATUS_VALID);
diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c
index 30af7bb11a..00b02fa54a 100644
--- a/ext/mysqli/mysqli_report.c
+++ b/ext/mysqli/mysqli_report.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_result_iterator.c b/ext/mysqli/mysqli_result_iterator.c
index 47fabbadaf..0a33bb4f67 100644
--- a/ext/mysqli/mysqli_result_iterator.c
+++ b/ext/mysqli/mysqli_result_iterator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c
index fa42e87130..d789627e7f 100644
--- a/ext/mysqli/mysqli_warning.c
+++ b/ext/mysqli/mysqli_warning.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h
index 3cfc8fa847..265bee5cee 100644
--- a/ext/mysqli/php_mysqli.h
+++ b/ext/mysqli/php_mysqli.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h
index 5d4bb049f8..c75023c3ad 100644
--- a/ext/mysqli/php_mysqli_structs.h
+++ b/ext/mysqli/php_mysqli_structs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -216,10 +216,6 @@ extern zend_object_iterator *php_mysqli_result_get_iterator(zend_class_entry *ce
extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend_long fetchtype);
-#ifdef HAVE_SPL
-extern PHPAPI zend_class_entry *spl_ce_RuntimeException;
-#endif
-
#define MYSQLI_DISABLE_MQ if (mysql->multi_query) { \
mysql_set_server_option(mysql->mysql, MYSQL_OPTION_MULTI_STATEMENTS_OFF); \
mysql->multi_query = 0; \
@@ -342,14 +338,10 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqli)
zend_bool rollback_on_cached_plink;
ZEND_END_MODULE_GLOBALS(mysqli)
+#define MyG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mysqli, v)
-#ifdef ZTS
-#define MyG(v) ZEND_TSRMG(mysqli_globals_id, zend_mysqli_globals *, v)
-#ifdef COMPILE_DL_MYSQLI
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define MyG(v) (mysqli_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_MYSQLI)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#define my_estrdup(x) (x) ? estrdup(x) : NULL
diff --git a/ext/mysqli/tests/bug32490.phpt b/ext/mysqli/tests/bug32490.phpt
new file mode 100644
index 0000000000..3d877c0d9c
--- /dev/null
+++ b/ext/mysqli/tests/bug32490.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #32490 (constructor of mysqli has wrong name)
+--SKIPIF--
+<?php if (!extension_loaded("mysqli")) die("skip mysqli not available"); ?>
+--FILE--
+<?php
+var_dump(method_exists("mysqli", "mysqli"));
+var_dump(method_exists("mysqli", "__construct"));
+?>
+--EXPECT--
+bool(false)
+bool(true)
+
diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt
index a5f1a23bb5..f3a4823b9d 100644
--- a/ext/mysqli/tests/bug38003.phpt
+++ b/ext/mysqli/tests/bug38003.phpt
@@ -17,7 +17,5 @@ $DB = new DB();
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught Error: Call to private DB::__construct() from invalid context in %s:%d
-Stack trace:
-#0 {main}
- thrown in %s on line %d
+Fatal error: Access level to DB::__construct() must be public (as in class mysqli) in %s%ebug38003.php on line %d
+
diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt
index 78540f1c33..7385538fbb 100644
--- a/ext/mysqli/tests/bug51647.phpt
+++ b/ext/mysqli/tests/bug51647.phpt
@@ -41,11 +41,7 @@ $link->close();
if (!is_object($link = mysqli_init()))
printf("[001] Cannot create link\n");
- $path_to_pems = !$IS_MYSQLND? "ext/mysqli/tests/" : "";
- if (!$link->ssl_set("{$path_to_pems}client-key.pem", "{$path_to_pems}client-cert.pem", "{$path_to_pems}cacert.pem","",""))
- printf("[002] [%d] %s\n", $link->errno, $link->error);
-
- if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
+ if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT)) {
printf("[003] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
}
@@ -65,9 +61,42 @@ $link->close();
} else {
if (!$row = $res->fetch_assoc())
printf("[006] [%d] %s\n", $link->errno, $link->error);
+ if (!strlen($row["Value"]))
+ printf("[007] Empty cipher. No encrytion!");
+ var_dump($row);
}
- var_dump($row);
+ $link->close();
+
+ if (!is_object($link = mysqli_init()))
+ printf("[008] Cannot create link\n");
+
+ if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_SSL)) {
+ printf("[009] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ }
+
+ if (!$res = $link->query('SHOW STATUS like "Ssl_cipher"')) {
+ if (1064 == $link->errno) {
+ /* ERROR 1064 (42000): You have an error in your SQL syntax; = sql strict mode */
+ if ($res = $link->query("SHOW STATUS")) {
+ while ($row = $res->fetch_assoc())
+ if ($row['Variable_name'] == 'Ssl_cipher')
+ break;
+ } else {
+ printf("[010] [%d] %s\n", $link->errno, $link->error);
+ }
+ } else {
+ printf("[011] [%d] %s\n", $link->errno, $link->error);
+ }
+ } else {
+ if (!$row = $res->fetch_assoc())
+ printf("[012] [%d] %s\n", $link->errno, $link->error);
+ if (!strlen($row["Value"]))
+ printf("[013] Empty cipher. No encrytion!");
+ var_dump($row);
+ }
+
+ $link->close();
print "done!";
?>
@@ -78,4 +107,10 @@ array(2) {
["Value"]=>
string(%d) "%S"
}
+array(2) {
+ ["Variable_name"]=>
+ string(10) "Ssl_cipher"
+ ["Value"]=>
+ string(%d) "%S"
+}
done!
diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt
index d03daaee88..a10c604fdd 100644
--- a/ext/mysqli/tests/bug55283.phpt
+++ b/ext/mysqli/tests/bug55283.phpt
@@ -40,7 +40,7 @@ $link->close();
$db1 = new mysqli();
- $flags = MYSQLI_CLIENT_SSL;
+ $flags = MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
$link = mysqli_init();
mysqli_ssl_set($link, null, null, null, null, "RC4-MD5");
diff --git a/ext/mysqli/tests/bug68077.phpt b/ext/mysqli/tests/bug68077.phpt
new file mode 100644
index 0000000000..3b6fa92ae3
--- /dev/null
+++ b/ext/mysqli/tests/bug68077.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+if (!$IS_MYSQLND) {
+ die("skip: test applies only to mysqlnd");
+}
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die("skip Cannot connect to MySQL");
+
+include_once("local_infile_tools.inc");
+if ($msg = check_local_infile_support($link, $engine))
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+
+mysqli_close($link);
+?>
+--INI--
+open_basedir=
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ ini_set("open_basedir", __DIR__);
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ }
+
+ if (!$link->query("DROP TABLE IF EXISTS test")) {
+ printf("[002] [%d] %s\n", $link->errno, $link->error);
+ }
+
+ if (!$link->query("CREATE TABLE test (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) {
+ printf("[003] [%d] %s\n", $link->errno, $link->error);
+ }
+
+ if (FALSE == file_put_contents(__DIR__ . '/bug53503.data', "1\n2\n3\n"))
+ printf("[004] Failed to create CVS file\n");
+
+ if (!$link->query("SELECT 1 FROM DUAL"))
+ printf("[005] [%d] %s\n", $link->errno, $link->error);
+
+ if (!$link->query("LOAD DATA LOCAL INFILE '" . __DIR__ . "/bug53503.data' INTO TABLE test")) {
+ printf("[006] [%d] %s\n", $link->errno, $link->error);
+ echo "bug\n";
+ } else {
+ echo "done\n";
+ }
+
+ ini_set("open_basedir", __DIR__ . "/dummy");
+ if (!$link->query("LOAD DATA LOCAL INFILE '" . __DIR__ . "/bug53503.data' INTO TABLE test")) {
+ printf("[006] [%d] %s\n", $link->errno, $link->error);
+ echo "done\n";
+ } else {
+ echo "bug\n";
+ }
+ $link->close();
+?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ printf("[clean] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+}
+
+if (!$link->query($link, 'DROP TABLE IF EXISTS test')) {
+ printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+}
+
+$link->close();
+
+unlink('bug53503.data');
+?>
+--EXPECTF--
+done
+[006] [2000] open_basedir restriction in effect. Unable to open file
+done
diff --git a/ext/mysqli/tests/bug70384.phpt b/ext/mysqli/tests/bug70384.phpt
new file mode 100644
index 0000000000..aa8662badf
--- /dev/null
+++ b/ext/mysqli/tests/bug70384.phpt
@@ -0,0 +1,62 @@
+--TEST--
+mysqli_float_handling - ensure 4 byte float is handled correctly
+--SKIPIF--
+<?php
+ require_once('skipif.inc');
+ require_once('skipifemb.inc');
+ require_once('skipifconnectfailure.inc');
+ if (@$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ if ($link->server_version < 50709) {
+ die("skip MySQL 5.7.9+ needed. Found [".
+ intval(substr($link->server_version."", -5, 1)).
+ ".".
+ intval(substr($link->server_version."", -4, 2)).
+ ".".
+ intval(substr($link->server_version."", -2, 2)).
+ "]");
+ }
+ }
+?>
+--FILE--
+<?php
+ require('connect.inc');
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ die();
+ }
+
+ if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) {
+ printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ die();
+ }
+
+ if (!mysqli_query($link, "CREATE TABLE test(jsfield JSON) ENGINE = InnoDB")) {
+ printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ die();
+ }
+ $jsfield_data = '{"aaa": 123}';
+ // Insert via string to make sure the real floating number gets to the DB
+ if (!mysqli_query($link, "INSERT INTO test VALUES ('".$jsfield_data."')")) {
+ printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ die();
+ }
+
+ if (!($res = mysqli_query($link, "SELECT * FROM test"))) {
+ printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ die();
+ }
+ $rows = $res->fetch_all();
+ if (json_encode($rows[0][0]) != json_encode($jsfield_data)) {
+ printf("[006] Data differs");
+ var_dump(json_encode($rows[0][0]) != json_encode($jsfield_data));
+ die();
+ }
+ mysqli_close($link);
+ echo "OK";
+?>
+--CLEAN--
+<?php
+ require_once("clean_table.inc");
+?>
+--EXPECTF--
+OK \ No newline at end of file
diff --git a/ext/mysqli/tests/bug70949.phpt b/ext/mysqli/tests/bug70949.phpt
new file mode 100644
index 0000000000..17f7f9d96b
--- /dev/null
+++ b/ext/mysqli/tests/bug70949.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Bug #70949 (SQL Result Sets With NULL Can Cause Fatal Memory Errors)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+require_once("connect.inc");
+if (!$IS_MYSQLND) {
+ die("skip mysqlnd only test");
+}
+?>
+--FILE--
+<?php
+require_once("connect.inc");
+$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
+
+$mysql->query("DROP TABLE IF EXISTS bug70949");
+$mysql->query("CREATE TABLE bug70949(name varchar(255))");
+$mysql->query("INSERT INTO bug70949 VALUES ('dummy'),(NULL),('foo'),('bar')");
+
+$sql = "select * from bug70949";
+
+if ($stmt = $mysql->prepare($sql))
+{
+ $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY);
+
+ if ($stmt->bind_result($name)) {
+ {
+ if ($stmt->execute())
+ {
+ while ($stmt->fetch())
+ {
+ var_dump($name);
+ }
+ }
+ }
+
+ $stmt->free_result();
+ $stmt->close();
+ }
+
+
+ $mysql->close();
+}
+
+?>
+--CLEAN--
+<?php
+require_once("connect.inc");
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
+if (!mysqli_query($link, "DROP TABLE IF EXISTS bug70949"))
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+mysqli_close($link);
+?>
+--EXPECT--
+string(5) "dummy"
+NULL
+string(3) "foo"
+string(3) "bar"
diff --git a/ext/mysqli/tests/cacert.pem b/ext/mysqli/tests/cacert.pem
index e44341384e..a0ba67444e 100644
--- a/ext/mysqli/tests/cacert.pem
+++ b/ext/mysqli/tests/cacert.pem
@@ -1,17 +1,79 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 16263805969935345171 (0xe1b4a55c3ddfa613)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Validity
+ Not Before: Dec 5 04:48:11 2014 GMT
+ Not After : Dec 1 04:48:11 2030 GMT
+ Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Public-Key: (2048 bit)
+ Modulus:
+ 00:b4:95:bd:24:92:73:06:22:01:13:28:0e:09:a3:
+ 94:05:96:54:9d:dc:8f:83:39:f3:64:7a:31:70:f6:
+ d9:c4:14:19:75:87:a6:b1:ea:52:ed:40:54:5a:f6:
+ 9c:13:8e:d8:76:8f:5a:65:a5:20:19:19:bd:51:9d:
+ ba:35:ce:9a:a9:58:0a:fc:11:6e:1d:cb:a8:f1:92:
+ 79:ee:aa:fc:e3:32:5e:aa:0d:0b:23:34:95:e9:d3:
+ 8e:3f:72:93:90:bc:2c:b0:04:75:4f:a4:4a:a0:32:
+ db:ac:89:ac:34:9b:d0:07:e3:81:e9:ca:5b:26:f0:
+ f5:de:fe:d5:5e:a0:54:26:dd:ec:58:07:6e:b9:e5:
+ 97:f6:20:6d:d8:4a:c0:50:cc:81:e6:d2:3f:c7:47:
+ 70:8b:15:89:65:71:2e:47:c3:42:76:b5:ee:16:0e:
+ 26:97:6a:a3:1c:ad:90:53:50:b0:b1:6d:1d:b0:b8:
+ 6d:df:3c:ee:bd:3b:87:e8:db:4d:3a:72:78:dd:db:
+ 40:3d:c9:20:46:b8:4e:33:bb:76:b7:4f:b2:79:da:
+ 03:cc:f9:75:c0:1d:4c:51:0a:b9:9b:25:34:50:11:
+ 97:df:82:46:02:a9:bc:98:51:3e:c3:df:57:ad:b7:
+ 28:be:de:65:ce:2b:f3:2c:22:f5:af:31:28:1c:ef:
+ 10:09
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Subject Key Identifier:
+ 94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+ X509v3 Authority Key Identifier:
+ keyid:94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+
+ X509v3 Basic Constraints:
+ CA:TRUE
+ Signature Algorithm: sha256WithRSAEncryption
+ 32:97:4c:af:bf:ca:e0:10:66:b7:cc:8b:0d:05:d1:d2:ca:b8:
+ 0c:c2:78:57:1f:f6:55:9c:74:fc:bd:31:58:05:18:bc:6d:b5:
+ 79:9a:22:8c:1f:da:33:ea:ef:db:e3:cb:46:bc:36:91:8b:d8:
+ 36:8d:06:40:c2:e9:fe:79:1b:4a:c5:70:74:6d:9d:92:2c:90:
+ be:3c:a7:88:03:e4:b7:ef:f4:b0:00:34:ec:8f:d1:c3:23:2b:
+ ef:bc:ff:ab:a2:0e:bc:ba:11:a5:8e:44:80:fa:d6:f4:26:66:
+ 84:64:2c:e3:23:62:0c:e2:ba:01:ab:5f:24:d6:9d:7e:9c:7b:
+ f4:5d:0e:ba:64:35:6e:a5:fa:98:0c:57:f3:72:e8:3e:2e:ce:
+ b3:f9:e3:fa:ee:aa:79:f9:06:01:19:b2:b3:28:ff:f4:d6:bb:
+ 17:bb:a6:a0:e0:45:23:f3:61:40:31:5c:a3:ee:88:1c:00:31:
+ 54:96:f9:71:37:b5:7f:66:6a:af:04:94:09:39:99:b3:88:86:
+ 9e:bb:d6:36:24:24:f4:37:2c:a6:6c:0b:35:2e:bb:40:af:a7:
+ 64:8a:7f:f2:74:e3:94:0c:32:bd:31:3d:d9:79:68:0f:1e:4b:
+ 17:c0:4e:df:85:3c:f0:84:df:58:f1:d2:4d:2f:ad:ff:1b:d7:
+ c8:9b:fe:dc
-----BEGIN CERTIFICATE-----
-MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV
-BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD
-VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkxMTQ3MTBaFw0xNTAxMjgxMTQ3MTBaMEQx
-CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh
-MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-wQYsOEfrN4ESP3FjsI8cghE+tZVuyK2gck61lwieVxjgFMtBd65mI5a1y9pmlOI1
-yM4SB2Ppqcuw7/e1CdV1y7lvHrGNt5yqEHbN4QX1gvsN8TQauP/2WILturk4R4Hq
-rKg0ZySu7f1Xhl0ed9a48LpaEHD17IcxWEGMMJwAxF0CAwEAAaOBpjCBozAMBgNV
-HRMEBTADAQH/MB0GA1UdDgQWBBSvktYQ0ahLnyxyVKqty+WpBbBrDTB0BgNVHSME
-bTBrgBSvktYQ0ahLnyxyVKqty+WpBbBrDaFIpEYwRDELMAkGA1UEBhMCU0UxEDAO
-BgNVBAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FM
-IEFCggkAwjvFkqOGsNswDQYJKoZIhvcNAQEEBQADgYEAdKN1PjwMHAKG2Ww1145g
-JQGBnKxSFOUaoSvkBi/4ntTM+ysnViWh7WvxyWjR9zU9arfr7aqsDeQxm0XDOqzj
-AQ/cQIla2/Li8tXyfc06bisH/IHRaSc2zWqioTKbEwMdVOdrvq4a8V8ic3xYyIWn
-7F4WeS07J8LKardSvM0+hOA=
+MIIDmTCCAoGgAwIBAgIJAOG0pVw936YTMA0GCSqGSIb3DQEBCwUAMGMxCzAJBgNV
+BAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hvbG0xEjAQBgNVBAcMCVN0b2NraG9sbTEP
+MA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQLDAVNeVNRTDELMAkGA1UEAwwCQ0EwHhcN
+MTQxMjA1MDQ0ODExWhcNMzAxMjAxMDQ0ODExWjBjMQswCQYDVQQGEwJTRTESMBAG
+A1UECAwJU3RvY2tob2xtMRIwEAYDVQQHDAlTdG9ja2hvbG0xDzANBgNVBAoMBk9y
+YWNsZTEOMAwGA1UECwwFTXlTUUwxCzAJBgNVBAMMAkNBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAtJW9JJJzBiIBEygOCaOUBZZUndyPgznzZHoxcPbZ
+xBQZdYemsepS7UBUWvacE47Ydo9aZaUgGRm9UZ26Nc6aqVgK/BFuHcuo8ZJ57qr8
+4zJeqg0LIzSV6dOOP3KTkLwssAR1T6RKoDLbrImsNJvQB+OB6cpbJvD13v7VXqBU
+Jt3sWAduueWX9iBt2ErAUMyB5tI/x0dwixWJZXEuR8NCdrXuFg4ml2qjHK2QU1Cw
+sW0dsLht3zzuvTuH6NtNOnJ43dtAPckgRrhOM7t2t0+yedoDzPl1wB1MUQq5myU0
+UBGX34JGAqm8mFE+w99Xrbcovt5lzivzLCL1rzEoHO8QCQIDAQABo1AwTjAdBgNV
+HQ4EFgQUlGWho4fPv8F0u9iEl7Zr7rKQc7IwHwYDVR0jBBgwFoAUlGWho4fPv8F0
+u9iEl7Zr7rKQc7IwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAMpdM
+r7/K4BBmt8yLDQXR0sq4DMJ4Vx/2VZx0/L0xWAUYvG21eZoijB/aM+rv2+PLRrw2
+kYvYNo0GQMLp/nkbSsVwdG2dkiyQvjyniAPkt+/0sAA07I/RwyMr77z/q6IOvLoR
+pY5EgPrW9CZmhGQs4yNiDOK6AatfJNadfpx79F0OumQ1bqX6mAxX83LoPi7Os/nj
++u6qefkGARmysyj/9Na7F7umoOBFI/NhQDFco+6IHAAxVJb5cTe1f2ZqrwSUCTmZ
+s4iGnrvWNiQk9DcspmwLNS67QK+nZIp/8nTjlAwyvTE92XloDx5LF8BO34U88ITf
+WPHSTS+t/xvXyJv+3A==
-----END CERTIFICATE-----
diff --git a/ext/mysqli/tests/client-cert.pem b/ext/mysqli/tests/client-cert.pem
index ee7f2ab281..f60a088417 100644
--- a/ext/mysqli/tests/client-cert.pem
+++ b/ext/mysqli/tests/client-cert.pem
@@ -1,46 +1,82 @@
Certificate:
Data:
- Version: 1 (0x0)
- Serial Number: 1048577 (0x100001)
- Signature Algorithm: md5WithRSAEncryption
- Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
+ Version: 3 (0x2)
+ Serial Number: 16263805969935345173 (0xe1b4a55c3ddfa615)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA
Validity
- Not Before: Jan 29 11:50:22 2010 GMT
- Not After : Jan 28 11:50:22 2015 GMT
- Subject: C=SE, ST=Uppsala, O=MySQL AB
+ Not Before: Dec 5 04:49:23 2014 GMT
+ Not After : Dec 1 04:49:23 2029 GMT
+ Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=Client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
+ Public-Key: (2048 bit)
Modulus:
- 00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed:
- 78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8:
- a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4:
- 9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be:
- 15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7:
- 87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16:
- 8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48:
- a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f:
- fc:3d:78:9b:49:6e:86:83:77
+ 00:c8:d1:a1:fe:a4:8c:f3:1b:17:71:1b:74:35:11:
+ e0:0e:6c:40:0a:fb:c0:f7:f0:eb:bb:c9:1d:a1:c7:
+ d7:b0:8a:f6:f1:cf:fa:6b:d0:79:64:eb:bb:69:a5:
+ 0d:80:06:df:52:14:d2:85:32:cf:bf:ce:2a:47:28:
+ 5b:cd:0b:28:ab:bb:07:33:d5:8b:d3:b4:72:c4:a6:
+ b5:cc:37:b9:03:a8:78:56:25:58:1f:17:30:7c:d1:
+ 0a:bb:ec:3c:a3:03:90:97:99:92:49:ae:b3:57:96:
+ 5c:1a:e9:e8:02:23:ae:c8:c9:05:50:63:e5:77:a1:
+ 9a:73:06:74:0e:46:50:28:d8:c9:4f:c4:1c:37:b8:
+ 52:18:0b:af:19:2b:d4:e5:66:74:a4:f3:f0:da:09:
+ 30:f7:bc:0c:c9:9b:ce:57:06:04:27:e5:a1:2f:2b:
+ a0:ba:b7:99:69:9d:46:fc:21:b6:45:81:9d:b2:3d:
+ 2f:76:15:78:b5:33:62:ac:1e:6b:66:dd:27:61:0a:
+ 47:02:20:2b:57:bb:32:20:dd:06:4c:76:a4:9b:72:
+ 42:4c:9c:2c:76:72:12:1f:4b:df:1e:11:1f:a9:06:
+ 54:dc:88:12:b0:49:d5:40:83:ef:7e:48:43:86:7a:
+ 37:a6:c1:d7:9b:fe:08:34:98:e0:54:3c:30:4f:79:
+ 15:29
Exponent: 65537 (0x10001)
- Signature Algorithm: md5WithRSAEncryption
- 5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0:
- 34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81:
- c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99:
- 01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b:
- 89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77:
- 02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee:
- 02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35:
- 32:0b
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
+ X509v3 Subject Key Identifier:
+ 26:0C:90:BC:97:12:9E:43:BB:5E:FE:EB:A9:66:B3:C3:EE:B2:18:CB
+ X509v3 Authority Key Identifier:
+ keyid:94:65:A1:A3:87:CF:BF:C1:74:BB:D8:84:97:B6:6B:EE:B2:90:73:B2
+
+ Signature Algorithm: sha256WithRSAEncryption
+ 3e:3c:1f:6c:5b:83:d1:71:15:f5:45:52:fc:7f:67:bc:af:c5:
+ 92:f5:74:78:13:43:3c:fe:b5:61:bf:00:47:43:45:a0:b9:dd:
+ a1:10:0c:29:69:2a:6f:7d:67:3d:1e:09:b5:15:74:bf:73:11:
+ e6:e9:09:b6:6b:b5:cc:1e:06:fd:bd:3a:11:d3:44:bd:ca:7a:
+ a1:f1:09:43:fc:bf:83:89:3a:b1:18:40:f3:cf:6d:12:ef:6e:
+ 0c:b7:a4:99:03:8a:4f:0c:3c:2c:23:78:35:2a:99:ea:de:9c:
+ 1b:e8:8d:19:fb:44:80:13:89:81:c5:05:4b:a7:66:6b:c0:31:
+ 41:f0:6c:60:aa:ec:d3:4c:ff:c1:3b:d5:bb:0d:42:7d:37:5e:
+ 80:e7:9c:7e:60:90:0f:a4:4e:70:20:9c:b1:e4:1b:70:65:b0:
+ ef:bb:41:16:ed:ad:46:ce:34:d3:02:3d:dd:e2:50:fa:3c:5d:
+ f0:e2:71:f8:9a:ef:a3:32:25:c5:8e:64:f4:46:e1:f4:c0:69:
+ d2:34:56:8d:d9:c2:6e:b6:55:3b:6a:4d:b6:d2:84:ab:85:7b:
+ cb:fd:b4:73:40:ba:5d:49:e2:0d:39:77:17:01:49:bb:72:8b:
+ 3a:c9:b1:e2:cd:13:d2:9c:ce:7d:6c:a8:f0:32:c9:a4:af:56:
+ 6f:8a:e6:88
-----BEGIN CERTIFICATE-----
-MIIB5zCCAVACAxAAATANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G
-A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg
-QUIwHhcNMTAwMTI5MTE1MDIyWhcNMTUwMTI4MTE1MDIyWjAyMQswCQYDVQQGEwJT
-RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIwgZ8wDQYJKoZI
-hvcNAQEBBQADgY0AMIGJAoGBAMyaN0kTZtzP4wsToSPteNtOvRH2jA12+aMyVpr4
-oSFqVU5NP+ZnnSaZss2kmtIrWVzXitNgaPgYvcW+FeEqPKPUYcv1EZQXgYH3h4z2
-atLu2OZ39mJmTS4WjQiBSsnGSzHluceKhJZIp0eMDSaQVk7mpW6Ms/Kf/D14m0lu
-hoN3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAXh+jU18kExz4KDKwf2lp8w7ANIcQ
-A33aFYu9GbgaVjHnhUmByX9FIHQ+icDgJoRRzAQWzmmZAeEmmbPj9b3sX6CE5Dja
-dXh7iZzSzWCVILqO43zm33Y6fIl3ApSGETrEYX1vcYMhihf7F+LuAmthwbRSY9fY
-RrLFnG84kYo1Mgs=
+MIIDyDCCArCgAwIBAgIJAOG0pVw936YVMA0GCSqGSIb3DQEBCwUAMGMxCzAJBgNV
+BAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hvbG0xEjAQBgNVBAcMCVN0b2NraG9sbTEP
+MA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQLDAVNeVNRTDELMAkGA1UEAwwCQ0EwHhcN
+MTQxMjA1MDQ0OTIzWhcNMjkxMjAxMDQ0OTIzWjBnMQswCQYDVQQGEwJTRTESMBAG
+A1UECAwJU3RvY2tob2xtMRIwEAYDVQQHDAlTdG9ja2hvbG0xDzANBgNVBAoMBk9y
+YWNsZTEOMAwGA1UECwwFTXlTUUwxDzANBgNVBAMMBkNsaWVudDCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAMjRof6kjPMbF3EbdDUR4A5sQAr7wPfw67vJ
+HaHH17CK9vHP+mvQeWTru2mlDYAG31IU0oUyz7/OKkcoW80LKKu7BzPVi9O0csSm
+tcw3uQOoeFYlWB8XMHzRCrvsPKMDkJeZkkmus1eWXBrp6AIjrsjJBVBj5XehmnMG
+dA5GUCjYyU/EHDe4UhgLrxkr1OVmdKTz8NoJMPe8DMmbzlcGBCfloS8roLq3mWmd
+RvwhtkWBnbI9L3YVeLUzYqwea2bdJ2EKRwIgK1e7MiDdBkx2pJtyQkycLHZyEh9L
+3x4RH6kGVNyIErBJ1UCD735IQ4Z6N6bB15v+CDSY4FQ8ME95FSkCAwEAAaN7MHkw
+CQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2Vy
+dGlmaWNhdGUwHQYDVR0OBBYEFCYMkLyXEp5Du17+66lms8PushjLMB8GA1UdIwQY
+MBaAFJRloaOHz7/BdLvYhJe2a+6ykHOyMA0GCSqGSIb3DQEBCwUAA4IBAQA+PB9s
+W4PRcRX1RVL8f2e8r8WS9XR4E0M8/rVhvwBHQ0Wgud2hEAwpaSpvfWc9Hgm1FXS/
+cxHm6Qm2a7XMHgb9vToR00S9ynqh8QlD/L+DiTqxGEDzz20S724Mt6SZA4pPDDws
+I3g1Kpnq3pwb6I0Z+0SAE4mBxQVLp2ZrwDFB8GxgquzTTP/BO9W7DUJ9N16A55x+
+YJAPpE5wIJyx5BtwZbDvu0EW7a1GzjTTAj3d4lD6PF3w4nH4mu+jMiXFjmT0RuH0
+wGnSNFaN2cJutlU7ak220oSrhXvL/bRzQLpdSeINOXcXAUm7cos6ybHizRPSnM59
+bKjwMsmkr1ZviuaI
-----END CERTIFICATE-----
diff --git a/ext/mysqli/tests/client-key.pem b/ext/mysqli/tests/client-key.pem
index 205b5f31cb..e0aae4f2c4 100644
--- a/ext/mysqli/tests/client-key.pem
+++ b/ext/mysqli/tests/client-key.pem
@@ -1,15 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m
-Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi
-Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB
-AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J
-HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm
-l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f
-T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as
-WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL
-qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo
-HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb
-uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy
-xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU
-RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx
+MIIEowIBAAKCAQEAyNGh/qSM8xsXcRt0NRHgDmxACvvA9/Dru8kdocfXsIr28c/6
+a9B5ZOu7aaUNgAbfUhTShTLPv84qRyhbzQsoq7sHM9WL07RyxKa1zDe5A6h4ViVY
+HxcwfNEKu+w8owOQl5mSSa6zV5ZcGunoAiOuyMkFUGPld6GacwZ0DkZQKNjJT8Qc
+N7hSGAuvGSvU5WZ0pPPw2gkw97wMyZvOVwYEJ+WhLyugureZaZ1G/CG2RYGdsj0v
+dhV4tTNirB5rZt0nYQpHAiArV7syIN0GTHakm3JCTJwsdnISH0vfHhEfqQZU3IgS
+sEnVQIPvfkhDhno3psHXm/4INJjgVDwwT3kVKQIDAQABAoIBAFrliE2abbIcMSAh
+LRhYXvIoTVSrX0za39i/z4nKyvY98EjDurXSRyBHEy1eaB3q/mpIwoFH3oES8FAF
+FIha5K3Wmgv8PK42nzwjuWYWUsg1GULk5F4uQOQ+On2VEF0439m+yVhQmxyqEkac
+WUeenx6C3sTkcpkTrLUj1qQfb2kM6JmeGsXfJNFLP/U36x8Q6kp2089DxBFgVcFu
+W3ge24W08umDBKuZWIF5B9GX8JFzmbAwPT2KATppGeroX0+bo4KAts4F1dBKmbrm
+3815kqYnz+VqyWbw6AHUA7aw2TY6QIT1oHrm+EdfnOQZaf8d/2CHWlIZPmxB46Lz
+6zQTVgECgYEA/L9awju31alISm0WYOPZBBndIHsOve4iKcMmy85GTKSvV+cAvgAZ
+uQwabZi4ZYHYaa4LPF0hbTb5IdV6krQzGYXpAjlwaarW0Zx4VoQIErWyji79OnFD
+QpbzIPGQiUAc0D7Gk7kJpwNmpgjyYcSkjEibF4cFEhDpTVlccbgxboUCgYEAy2c0
+tIfKiu1hwo/8UdcO4LQ6LWJdbIDdNU45HCk/IhIe4FrB0pXnk1yIBBn0ezY7Mgzy
+USYlfPTjFmnQOFF/6bHyGmeB4YTYamlTDuHlUUdH76brCZ3ywUlqpToiAPJFjx36
+nTNjo8JLF7eyjMOy4uN6eJzzS7OP9GwsHllux1UCgYBeFLCo+me8va2uHpsk58th
+TmtUatoa8uh+mSj41kiuwOKQGunYz9rDWfEAeMey6TlwZRvDlXsa10q3QGrG7xLS
+XllUvaLNgo1CKzdUJQOIS2AysuUJ+x0pTV0lFyZRIK9ZCPUMCeXA6HAuP8hRgkwp
+9+DbSiQmDGt7olbZ8dFcrQKBgQCOFzzUWH//aTD/z8H+EfQMuRpjFfIZmDPvxwNS
+TuYRkQMMy5nW2G17ngpOgyss34eewTiNw84waoow4B5bGWP4Bx0PoPs0Za8hNw6U
+uO2PR/JS0hIjF7m7mOPtJJ0YeCZrgg/OvVV/0nzOxr7uYs+WfD7T/yBe48NOhjqT
+wPoIOQKBgGRLd3G8b0AbPTv4NVwzIl3xKHCKYd1EcBbfyPWjAZ8+BagEPK8mJfOt
+MXkMrSKOq6ShEfzRsdJna7eI0te3zNXXFu/G3IHQZUdC0RtksW5T9tXvASRN3wnX
++aaoIM1q/KUgfH0TF/1pQPHFSUfFrGyLDiCDUu1sJ2ijULr5rZES
-----END RSA PRIVATE KEY-----
diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc
index 4acc20cb91..aa33f17f85 100644
--- a/ext/mysqli/tests/connect.inc
+++ b/ext/mysqli/tests/connect.inc
@@ -87,9 +87,8 @@
function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) {
global $connect_flags;
- $flags = ($enable_env_flags) ? $connect_flags : false;
-
- if ($flags !== false) {
+ $flags = $enable_env_flags? $connect_flags:0;
+ if ($flags !== 0) {
$link = mysqli_init();
if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags))
$link = false;
@@ -109,7 +108,7 @@
global $connect_flags;
if ($enable_env_flags)
- $flags & $connect_flags;
+ $flags = $flags | $connect_flags;
return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags);
}
@@ -118,7 +117,7 @@
public function __construct($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) {
global $connect_flags;
- $flags = ($enable_env_flags) ? $connect_flags : false;
+ $flags = ($enable_env_flags) ? $connect_flags : 0;
if ($flags !== false) {
parent::init();
diff --git a/ext/mysqli/tests/mysqli_change_user_new.phpt b/ext/mysqli/tests/mysqli_change_user_new.phpt
index 0820a20b81..ec6b3e31c9 100644
--- a/ext/mysqli/tests/mysqli_change_user_new.phpt
+++ b/ext/mysqli/tests/mysqli_change_user_new.phpt
@@ -30,8 +30,8 @@ if (mysqli_get_server_version($link) < 50600)
if (!$res = mysqli_query($link, 'SELECT 1 AS _one'))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- var_dump($res->fetch_assoc());
+ else
+ var_dump($res->fetch_assoc());
print "done!";
?>
@@ -40,5 +40,4 @@ Warning: mysqli_query(): MySQL server has gone away in %s on line %d
Warning: mysqli_query(): Error reading result set's header in %s on line %d
[003] [2006] MySQL server has gone away
-
-Fatal error: Call to a member function fetch_assoc() on %s in %s on line %d
+done!
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
index ea86c198e7..c816163e13 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
@@ -19,6 +19,7 @@ require_once('skipifconnectfailure.inc');
printf("\nMethods:\n");
$methods = get_class_methods($mysqli);
$expected_methods = array(
+ '__construct' => true,
'autocommit' => true,
'begin_transaction' => true,
'change_user' => true,
@@ -36,7 +37,6 @@ require_once('skipifconnectfailure.inc');
'kill' => true,
'more_results' => true,
'multi_query' => true,
- 'mysqli' => true,
'next_result' => true,
'options' => true,
'ping' => true,
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
index 8f6c24900a..22829ee6ee 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
@@ -37,7 +37,7 @@ Modifiers: '0'
Parent Class: ''
Extension: 'mysqli'
-Inspecting method 'mysqli'
+Inspecting method '__construct'
isFinal: no
isAbstract: no
isPublic: yes
@@ -53,42 +53,100 @@ Modifiers: 8448
Number of Parameters: 6
Number of Required Parameters: 0
-Inspecting parameter 'host' of method 'mysqli'
+Inspecting parameter 'host' of method '__construct'
isArray: no
allowsNull: no
isPassedByReference: no
isOptional: yes
isDefaultValueAvailable: no
-Inspecting parameter 'user' of method 'mysqli'
+Inspecting parameter 'user' of method '__construct'
isArray: no
allowsNull: no
isPassedByReference: no
isOptional: yes
isDefaultValueAvailable: no
-Inspecting parameter 'password' of method 'mysqli'
+Inspecting parameter 'password' of method '__construct'
isArray: no
allowsNull: no
isPassedByReference: no
isOptional: yes
isDefaultValueAvailable: no
-Inspecting parameter 'database' of method 'mysqli'
+Inspecting parameter 'database' of method '__construct'
isArray: no
allowsNull: no
isPassedByReference: no
isOptional: yes
isDefaultValueAvailable: no
-Inspecting parameter 'port' of method 'mysqli'
+Inspecting parameter 'port' of method '__construct'
isArray: no
allowsNull: no
isPassedByReference: no
isOptional: yes
isDefaultValueAvailable: no
-Inspecting parameter 'socket' of method 'mysqli'
+Inspecting parameter 'socket' of method '__construct'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: yes
+isDefaultValueAvailable: no
+
+Inspecting method '__construct'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: 8448
+Number of Parameters: 6
+Number of Required Parameters: 0
+
+Inspecting parameter 'host' of method '__construct'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: yes
+isDefaultValueAvailable: no
+
+Inspecting parameter 'user' of method '__construct'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: yes
+isDefaultValueAvailable: no
+
+Inspecting parameter 'password' of method '__construct'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: yes
+isDefaultValueAvailable: no
+
+Inspecting parameter 'database' of method '__construct'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: yes
+isDefaultValueAvailable: no
+
+Inspecting parameter 'port' of method '__construct'
+isArray: no
+allowsNull: no
+isPassedByReference: no
+isOptional: yes
+isDefaultValueAvailable: no
+
+Inspecting parameter 'socket' of method '__construct'
isArray: no
allowsNull: no
isPassedByReference: no
@@ -525,64 +583,6 @@ isPassedByReference: no
isOptional: no
isDefaultValueAvailable: no
-Inspecting method 'mysqli'
-isFinal: no
-isAbstract: no
-isPublic: yes
-isPrivate: no
-isProtected: no
-isStatic: no
-isConstructor: yes
-isDestructor: no
-isInternal: yes
-isUserDefined: no
-returnsReference: no
-Modifiers: 8448
-Number of Parameters: 6
-Number of Required Parameters: 0
-
-Inspecting parameter 'host' of method 'mysqli'
-isArray: no
-allowsNull: no
-isPassedByReference: no
-isOptional: yes
-isDefaultValueAvailable: no
-
-Inspecting parameter 'user' of method 'mysqli'
-isArray: no
-allowsNull: no
-isPassedByReference: no
-isOptional: yes
-isDefaultValueAvailable: no
-
-Inspecting parameter 'password' of method 'mysqli'
-isArray: no
-allowsNull: no
-isPassedByReference: no
-isOptional: yes
-isDefaultValueAvailable: no
-
-Inspecting parameter 'database' of method 'mysqli'
-isArray: no
-allowsNull: no
-isPassedByReference: no
-isOptional: yes
-isDefaultValueAvailable: no
-
-Inspecting parameter 'port' of method 'mysqli'
-isArray: no
-allowsNull: no
-isPassedByReference: no
-isOptional: yes
-isDefaultValueAvailable: no
-
-Inspecting parameter 'socket' of method 'mysqli'
-isArray: no
-allowsNull: no
-isPassedByReference: no
-isOptional: yes
-isDefaultValueAvailable: no
-
Inspecting method 'next_result'
isFinal: no
isAbstract: no
diff --git a/ext/mysqli/tests/mysqli_connect_oo.phpt b/ext/mysqli/tests/mysqli_connect_oo.phpt
index 35cc116164..32dfac0eb2 100644
--- a/ext/mysqli/tests/mysqli_connect_oo.phpt
+++ b/ext/mysqli/tests/mysqli_connect_oo.phpt
@@ -147,7 +147,7 @@ require_once('skipifconnectfailure.inc');
print "done!";
?>
--EXPECTF--
-Warning: mysqli::mysqli(): (%s/%d): Access denied for user '%sunknown%s'@'%s' (using password: %s) in %s on line %d
+Warning: mysqli::__construct(): (%s/%d): Access denied for user '%sunknown%s'@'%s' (using password: %s) in %s on line %d
... and now Exceptions
Access denied for user '%s'@'%s' (using password: %s)
done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt
index 9bbc8bb4b7..cc5fa9f1c4 100644
--- a/ext/mysqli/tests/mysqli_constants.phpt
+++ b/ext/mysqli/tests/mysqli_constants.phpt
@@ -136,6 +136,12 @@ require_once('skipifconnectfailure.inc');
$expected_constants['MYSQLI_SERVER_QUERY_WAS_SLOW'] = true;
}
+ if ($version >= 50033 || $IS_MYSQLND) {
+ $expected_constants['MYSQLI_CLIENT_SSL_VERIFY_SERVER_CERT'] = true;
+ }
+ if ($IS_MYSQLND) {
+ $expected_constants['MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'] = true;
+ }
/* First introduced in MySQL 6.0, backported to MySQL 5.5 */
if ($version >= 50606 || $IS_MYSQLND) {
@@ -199,6 +205,10 @@ require_once('skipifconnectfailure.inc');
$expected_constants["MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS"] = true;
}
+ if ($IS_MYSQLND) {
+ $expected_constants["MYSQLI_TYPE_JSON"] = true;
+ }
+
$unexpected_constants = array();
foreach ($constants as $group => $consts) {
diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
index 06b936aeed..e234a28fe5 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
@@ -106,7 +106,10 @@ mysqli_close($link);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- if (mysqli_get_server_version($link) > 50600) {
+ $is_maria_db = strpos(mysqli_get_server_info($link), "MariaDB") !== false;
+ if ($is_maria_db) {
+ $columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP BINARY UNSIGNED NOT_NULL';
+ } else if (mysqli_get_server_version($link) > 50600) {
$columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP BINARY NOT_NULL';
}
diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt
index 11dd0a5a4f..9706ceac84 100644
--- a/ext/mysqli/tests/mysqli_fetch_object.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object.phpt
@@ -150,6 +150,6 @@ NULL
NULL
[E_WARNING] mysqli_fetch_object(): Couldn't fetch mysqli_result in %s on line %d
NULL
-[E_ERROR] Argument 3 passed to mysqli_fetch_object() must be of the type array, string given in %s on line %d
+[0] Argument 3 passed to mysqli_fetch_object() must be of the type array, string given in %s on line %d
Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
index 2b3f76c993..82e311cc72 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
@@ -129,9 +129,9 @@ require_once('skipifconnectfailure.inc');
%s on line %d
[E_WARNING] mysqli_result::fetch_object(): Couldn't fetch mysqli_result in %s on line %d
[E_WARNING] mysqli_result::fetch_object() expects parameter 1 to be string, object given in %s on line %d
-[E_ERROR] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
-[E_ERROR] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
-[E_ERROR] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, null given in %s on line %d
+[0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
+[0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
+[0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, null given in %s on line %d
[E_WARNING] Missing argument 2 for mysqli_fetch_object_construct::__construct() in %s on line %d
[E_NOTICE] Undefined variable: b in %s on line %d
NULL
diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt
index a61165ae15..3e80c78e74 100644
--- a/ext/mysqli/tests/mysqli_get_client_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt
@@ -958,7 +958,7 @@ if (!mysqli_query($link, "DROP SERVER IF EXISTS myself"))
mysqli_close($link);
?>
--EXPECTF--
-array(160) {
+array(163) {
[%u|b%"bytes_sent"]=>
%unicode|string%(1) "0"
[%u|b%"bytes_received"]=>
@@ -1125,10 +1125,14 @@ array(160) {
%unicode|string%(1) "0"
[%u|b%"mem_strndup_count"]=>
%unicode|string%(1) "0"
- [%u|b%"mem_estndup_count"]=>
+ [%u|b%"mem_estrdup_count"]=>
%unicode|string%(1) "0"
[%u|b%"mem_strdup_count"]=>
%unicode|string%(1) "0"
+ [%u|b%"mem_edupl_count"]=>
+ %unicode|string%(1) "0"
+ [%u|b%"mem_dupl_count"]=>
+ %unicode|string%(1) "0"
[%u|b%"proto_text_fetched_null"]=>
%unicode|string%(1) "0"
[%u|b%"proto_text_fetched_bit"]=>
@@ -1203,6 +1207,8 @@ array(160) {
%unicode|string%(1) "0"
[%u|b%"proto_binary_fetched_string"]=>
%unicode|string%(1) "0"
+ [%u|b%"proto_binary_fetched_json"]=>
+ %unicode|string%(1) "0"
[%u|b%"proto_binary_fetched_blob"]=>
%unicode|string%(1) "0"
[%u|b%"proto_binary_fetched_enum"]=>
diff --git a/ext/mysqli/tests/mysqli_options_openbasedir.phpt b/ext/mysqli/tests/mysqli_options_openbasedir.phpt
index 4c13ec1ef0..9457adfb5d 100644
--- a/ext/mysqli/tests/mysqli_options_openbasedir.phpt
+++ b/ext/mysqli/tests/mysqli_options_openbasedir.phpt
@@ -8,16 +8,22 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- require_once('connect.inc');
- ini_set("open_basedir", __DIR__);
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- printf("[001] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+require_once('connect.inc');
+ini_set("open_basedir", __DIR__);
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ printf("[001] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+if ($IS_MYSQLND) {
+ if (true !== mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1))
+ printf("[002] Can not set MYSQLI_OPT_LOCAL_INFILE although open_basedir is set!\n");
+
+} else {
if (false !== mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1))
printf("[002] Can set MYSQLI_OPT_LOCAL_INFILE although open_basedir is set!\n");
- mysqli_close($link);
- print "done!";
+}
+mysqli_close($link);
+print "done!";
?>
--EXPECTF--
done!
diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
index 27bbed138c..70835739cf 100644
--- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
+++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt
@@ -124,6 +124,6 @@ mysqlnd.sha256_server_public_key="test_sha256_ini"
?>
--EXPECTF--
-Warning: mysqli::mysqli(): (HY000/1045): %s in %s on line %d
+Warning: mysqli::__construct(): (HY000/1045): %s in %s on line %d
[001] [1045] %s
done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_result_references.phpt b/ext/mysqli/tests/mysqli_result_references.phpt
index 6d80dc1000..8cf759cce6 100644
--- a/ext/mysqli/tests/mysqli_result_references.phpt
+++ b/ext/mysqli/tests/mysqli_result_references.phpt
@@ -85,48 +85,48 @@ array(7) refcount(2){
[0]=>
array(2) refcount(1){
[%u|b%"id"]=>
- long(1)
+ int(1)
[%u|b%"label"]=>
%unicode|string%(1) "a" refcount(%d)
}
[1]=>
array(2) refcount(1){
[%u|b%"id"]=>
- long(2)
+ int(2)
[%u|b%"label"]=>
%unicode|string%(1) "b" refcount(%d)
}
[2]=>
array(2) refcount(1){
[%u|b%"id"]=>
- long(1)
+ int(1)
[%u|b%"label"]=>
%unicode|string%(1) "a" refcount(%d)
}
[3]=>
array(2) refcount(1){
[%u|b%"id"]=>
- long(2)
+ int(2)
[%u|b%"label"]=>
%unicode|string%(1) "b" refcount(%d)
}
[4]=>
array(3) refcount(1){
[%u|b%"id"]=>
- &long(3)
+ &int(3)
[%u|b%"label"]=>
%unicode|string%(1) "a" refcount(%d)
[%u|b%"id2"]=>
- &long(3)
+ &int(3)
}
[5]=>
array(3) refcount(1){
[%u|b%"id"]=>
- &long(4)
+ &int(4)
[%u|b%"label"]=>
%unicode|string%(1) "b" refcount(%d)
[%u|b%"id2"]=>
- &long(4)
+ &int(4)
}
[6]=>
&object(mysqli_result)#%d (5) refcount(%d){
diff --git a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt
index 60c5491b54..15a3f4563a 100644
--- a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt
+++ b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt
@@ -113,7 +113,7 @@ array(2) refcount(%d){
[%u|b%"id_copy"]=>
%unicode|string%(1) "2" refcount(%d)
[%u|b%"id_copy_mod"]=>
- long(2)
+ int(2)
}
}
done!
diff --git a/ext/mysqlnd/config.w32 b/ext/mysqlnd/config.w32
index ff102310dd..52be8f563c 100644
--- a/ext/mysqlnd/config.w32
+++ b/ext/mysqlnd/config.w32
@@ -6,23 +6,26 @@ if (PHP_MYSQLND != "no") {
if (CHECK_LIB("ws2_32.lib", "mysqlnd")) {
mysqlnd_source =
- "mysqlnd.c " +
"mysqlnd_alloc.c " +
"mysqlnd_auth.c " +
"mysqlnd_block_alloc.c " +
+ "mysqlnd_connection.c " +
"mysqlnd_charset.c " +
+ "mysqlnd_commands.c " +
"mysqlnd_debug.c " +
"mysqlnd_driver.c " +
"mysqlnd_ext_plugin.c " +
"mysqlnd_loaddata.c " +
"mysqlnd_reverse_api.c " +
- "mysqlnd_net.c " +
"mysqlnd_plugin.c " +
+ "mysqlnd_protocol_frame_codec.c " +
"mysqlnd_ps.c " +
"mysqlnd_ps_codec.c " +
+ "mysqlnd_read_buffer.c " +
"mysqlnd_result.c " +
"mysqlnd_result_meta.c " +
"mysqlnd_statistics.c " +
+ "mysqlnd_vio.c " +
"mysqlnd_wireprotocol.c " +
"php_mysqlnd.c ";
EXTENSION("mysqlnd", mysqlnd_source, false, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4
index 92cab94367..b5f20a9c8b 100644
--- a/ext/mysqlnd/config9.m4
+++ b/ext/mysqlnd/config9.m4
@@ -18,11 +18,11 @@ fi
dnl If some extension uses mysqlnd it will get compiled in PHP core
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
- mysqlnd_base_sources="mysqlnd.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
- mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_net.c \
+ mysqlnd_base_sources="mysqlnd_connection.c mysqlnd_alloc.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
+ mysqlnd_loaddata.c mysqlnd_reverse_api.c mysqlnd_vio.c mysqlnd_protocol_frame_codec.c \
mysqlnd_statistics.c mysqlnd_driver.c mysqlnd_ext_plugin.c mysqlnd_auth.c \
- mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c\
- mysqlnd_block_alloc.c mysqlnd_plugin.c php_mysqlnd.c"
+ mysqlnd_result.c mysqlnd_result_meta.c mysqlnd_debug.c mysqlnd_commands.c \
+ mysqlnd_block_alloc.c mysqlnd_read_buffer.c mysqlnd_plugin.c php_mysqlnd.c"
if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
diff --git a/ext/mysqlnd/mysql_float_to_double.h b/ext/mysqlnd/mysql_float_to_double.h
index 40728a52ee..88c6fa1e51 100644
--- a/ext/mysqlnd/mysql_float_to_double.h
+++ b/ext/mysqlnd/mysql_float_to_double.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index eded4a1800..d8daadaf41 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,12 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#ifndef MYSQLND_H
#define MYSQLND_H
@@ -61,6 +60,7 @@
#include "mysqlnd_enum_n_def.h"
#include "mysqlnd_structs.h"
+#define MYSQLND_STR_W_LEN(str) str, (sizeof(str) - 1)
/* Library related */
PHPAPI void mysqlnd_library_init(void);
@@ -83,18 +83,23 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const char
/* Connect */
-PHPAPI MYSQLND * mysqlnd_init(unsigned int client_flags, zend_bool persistent);
-PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn,
- const char * host, const char * user,
- const char * passwd, unsigned int passwd_len,
- const char * db, unsigned int db_len,
- unsigned int port,
- const char * socket_or_pipe,
- unsigned int mysql_flags,
- unsigned int client_api_flags
- );
-
-#define mysqlnd_change_user(conn, user, passwd, db, silent) ((conn)->data)->m->change_user((conn)->data, (user), (passwd), (db), (silent), strlen((passwd)))
+#define mysqlnd_init(flags, persistent) mysqlnd_connection_init((flags), (persistent), NULL /*use default factory*/)
+#define mysqlnd_connect(conn, host, user, pass, pass_len, db, db_len, port, socket, mysql_flags, client_api_flags) \
+ mysqlnd_connection_connect((conn), (host), (user), (pass), (pass_len), (db), (db_len), (port), (socket), (mysql_flags), (client_api_flags))
+
+PHPAPI MYSQLND * mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory);
+PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn,
+ const char * const host,
+ const char * const user,
+ const char * const passwd, unsigned int passwd_len,
+ const char * const db, unsigned int db_len,
+ unsigned int port,
+ const char * const socket_or_pipe,
+ unsigned int mysql_flags,
+ unsigned int client_api_flags
+ );
+
+#define mysqlnd_change_user(conn, user, passwd, db, silent) ((conn)->data)->m->change_user((conn)->data, (user), (passwd), (db), (silent), strlen((passwd)))
#define mysqlnd_change_user_ex(conn, user, passwd, db, silent, passwd_len) ((conn)->data)->m->change_user((conn)->data, (user), (passwd), (db), (silent), (passwd_len))
PHPAPI void mysqlnd_debug(const char *mode);
@@ -105,7 +110,7 @@ PHPAPI void mysqlnd_debug(const char *mode);
#define mysqlnd_fetch_all(result, flags, return_value) (result)->m.fetch_all((result), (flags), (return_value) ZEND_FILE_LINE_CC)
#define mysqlnd_result_fetch_field_data(res,offset,ret) (res)->m.fetch_field_data((res), (offset), (ret))
#define mysqlnd_get_connection_stats(conn, values) ((conn)->data)->m->get_statistics((conn)->data, (values) ZEND_FILE_LINE_CC)
-#define mysqlnd_get_client_stats(values) _mysqlnd_get_client_stats((values) ZEND_FILE_LINE_CC)
+#define mysqlnd_get_client_stats(values) _mysqlnd_get_client_stats(mysqlnd_global_stats, (values) ZEND_FILE_LINE_CC)
#define mysqlnd_close(conn,is_forced) (conn)->m->close((conn), (is_forced))
#define mysqlnd_query(conn, query_str, query_len) ((conn)->data)->m->query((conn)->data, (query_str), (query_len))
@@ -180,7 +185,7 @@ PHPAPI void mysqlnd_free_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind);
PHPAPI void mysqlnd_free_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind);
-PHPAPI const char * mysqlnd_field_type_name(enum mysqlnd_field_types field_type);
+PHPAPI const char * mysqlnd_field_type_name(const enum mysqlnd_field_types field_type);
/* LOAD DATA LOCAL */
void mysqlnd_local_infile_default(MYSQLND_CONN_DATA * conn);
@@ -193,7 +198,6 @@ void mysqlnd_local_infile_default(MYSQLND_CONN_DATA * conn);
#define mysqlnd_savepoint(conn, name) ((conn)->data)->m->tx_savepoint((conn)->data, (name))
#define mysqlnd_release_savepoint(conn, name) ((conn)->data)->m->tx_savepoint_release((conn)->data, (name))
#define mysqlnd_list_dbs(conn, wild) ((conn)->data)->m->list_method((conn)->data, wild? "SHOW DATABASES LIKE %s":"SHOW DATABASES", (wild), NULL)
-#define mysqlnd_list_fields(conn, tab,wild) ((conn)->data)->m->list_fields((conn)->data, (tab), (wild))
#define mysqlnd_list_processes(conn) ((conn)->data)->m->list_method((conn)->data, "SHOW PROCESSLIST", NULL, NULL)
#define mysqlnd_list_tables(conn, wild) ((conn)->data)->m->list_method((conn)->data, wild? "SHOW TABLES LIKE %s":"SHOW TABLES", (wild), NULL)
#define mysqlnd_dump_debug_info(conn) ((conn)->data)->m->server_dump_debug_information((conn)->data)
@@ -218,14 +222,14 @@ PHPAPI zend_ulong mysqlnd_old_escape_string(char * newstr, const char * escapest
/* PS */
-#define mysqlnd_stmt_init(conn) ((conn)->data)->m->stmt_init(((conn)->data))
-#define mysqlnd_stmt_store_result(stmt) (!mysqlnd_stmt_field_count((stmt)) ? PASS:((stmt)->m->store_result((stmt))? PASS:FAIL))
-#define mysqlnd_stmt_get_result(stmt) (stmt)->m->get_result((stmt))
-#define mysqlnd_stmt_more_results(stmt) (stmt)->m->more_results((stmt))
-#define mysqlnd_stmt_next_result(stmt) (stmt)->m->next_result((stmt))
-#define mysqlnd_stmt_data_seek(stmt, row) (stmt)->m->seek_data((stmt), (row))
-#define mysqlnd_stmt_prepare(stmt, q, qlen) (stmt)->m->prepare((stmt), (q), (qlen))
-#define mysqlnd_stmt_execute(stmt) (stmt)->m->execute((stmt))
+#define mysqlnd_stmt_init(conn) ((conn)->data)->m->stmt_init(((conn)->data))
+#define mysqlnd_stmt_store_result(stmt) (!mysqlnd_stmt_field_count((stmt)) ? PASS:((stmt)->m->store_result((stmt))? PASS:FAIL))
+#define mysqlnd_stmt_get_result(stmt) (stmt)->m->get_result((stmt))
+#define mysqlnd_stmt_more_results(stmt) (stmt)->m->more_results((stmt))
+#define mysqlnd_stmt_next_result(stmt) (stmt)->m->next_result((stmt))
+#define mysqlnd_stmt_data_seek(stmt, row) (stmt)->m->seek_data((stmt), (row))
+#define mysqlnd_stmt_prepare(stmt, q, qlen) (stmt)->m->prepare((stmt), (q), (qlen))
+#define mysqlnd_stmt_execute(stmt) (stmt)->m->execute((stmt))
#define mysqlnd_stmt_send_long_data(stmt,p,d,l) (stmt)->m->send_long_data((stmt), (p), (d), (l))
#define mysqlnd_stmt_alloc_param_bind(stmt) (stmt)->m->alloc_parameter_bind((stmt))
#define mysqlnd_stmt_free_param_bind(stmt,bind) (stmt)->m->free_parameter_bind((stmt), (bind))
@@ -239,10 +243,10 @@ PHPAPI zend_ulong mysqlnd_old_escape_string(char * newstr, const char * escapest
#define mysqlnd_stmt_param_metadata(stmt) (stmt)->m->get_parameter_metadata((stmt))
#define mysqlnd_stmt_result_metadata(stmt) (stmt)->m->get_result_metadata((stmt))
-#define mysqlnd_stmt_free_result(stmt) (stmt)->m->free_result((stmt))
-#define mysqlnd_stmt_close(stmt, implicit) (stmt)->m->dtor((stmt), (implicit))
-#define mysqlnd_stmt_reset(stmt) (stmt)->m->reset((stmt))
-#define mysqlnd_stmt_flush(stmt) (stmt)->m->flush((stmt))
+#define mysqlnd_stmt_free_result(stmt) (stmt)->m->free_result((stmt))
+#define mysqlnd_stmt_close(stmt, implicit) (stmt)->m->dtor((stmt), (implicit))
+#define mysqlnd_stmt_reset(stmt) (stmt)->m->reset((stmt))
+#define mysqlnd_stmt_flush(stmt) (stmt)->m->flush((stmt))
#define mysqlnd_stmt_attr_get(stmt, attr, value) (stmt)->m->get_attribute((stmt), (attr), (value))
@@ -252,11 +256,54 @@ PHPAPI zend_ulong mysqlnd_old_escape_string(char * newstr, const char * escapest
/* Performance statistics */
-PHPAPI void _mysqlnd_get_client_stats(zval *return_value ZEND_FILE_LINE_DC);
+PHPAPI extern MYSQLND_STATS * mysqlnd_global_stats;
+PHPAPI extern const MYSQLND_STRING mysqlnd_stats_values_names[];
+PHPAPI void _mysqlnd_get_client_stats(MYSQLND_STATS * stats, zval *return_value ZEND_FILE_LINE_DC);
+
+
+#ifndef MYSQLND_CORE_STATISTICS_DISABLED
+
+#define MYSQLND_INC_GLOBAL_STATISTIC(statistic) \
+ MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic))
+
+#define MYSQLND_DEC_GLOBAL_STATISTIC(statistic) \
+ MYSQLND_DEC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic))
+
+#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2, value2) \
+ MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2))
+
+#define MYSQLND_INC_CONN_STATISTIC(conn_stats, statistic) \
+ MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)); \
+ MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), (conn_stats), (statistic));
+
+#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value) \
+ MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic), (value)); \
+ MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), (conn_stats), (statistic), (value));
+
+#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1, statistic2, value2) \
+ MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2)); \
+ MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2));
+
+#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1, statistic2, value2, statistic3, value3) \
+ MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2), (statistic3), (value3)); \
+ MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2), (statistic3), (value3));
+
+#else
+
+#define MYSQLND_INC_GLOBAL_STATISTIC(statistic)
+#define MYSQLND_DEC_GLOBAL_STATISTIC(statistic)
+#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2, value2)
+#define MYSQLND_INC_CONN_STATISTIC(conn_stats, statistic)
+#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value)
+#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1, statistic2, value2)
+#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1, statistic2, value2, statistic3, value3)
+
+#endif /* MYSQLND_CORE_STATISTICS_DISABLED */
+
/* double check the class name to avoid naming conflicts when using these: */
-#define MYSQLND_METHOD(class, method) php_##class##_##method##_pub
-#define MYSQLND_METHOD_PRIVATE(class, method) php_##class##_##method##_priv
+#define MYSQLND_METHOD(class, method) mysqlnd_##class##_##method##_pub
+#define MYSQLND_METHOD_PRIVATE(class, method) mysqlnd_##class##_##method##_priv
ZEND_BEGIN_MODULE_GLOBALS(mysqlnd)
char * debug; /* The actual string */
@@ -281,14 +328,10 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqlnd)
ZEND_END_MODULE_GLOBALS(mysqlnd)
PHPAPI ZEND_EXTERN_MODULE_GLOBALS(mysqlnd)
+#define MYSQLND_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(mysqlnd, v)
-#ifdef ZTS
-#define MYSQLND_G(v) ZEND_TSRMG(mysqlnd_globals_id, zend_mysqlnd_globals *, v)
-#ifdef COMPILE_DL_MYSQLND
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define MYSQLND_G(v) (mysqlnd_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_MYSQLND)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c
index c28044ca7f..6ee19a8630 100644
--- a/ext/mysqlnd/mysqlnd_alloc.c
+++ b/ext/mysqlnd/mysqlnd_alloc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_debug.c 309303 2011-03-16 12:42:59Z andrey $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
@@ -26,6 +24,7 @@
#include "mysqlnd_wireprotocol.h"
#include "mysqlnd_statistics.h"
+#define MYSQLND_DEBUG_MEMORY 1
static const char mysqlnd_emalloc_name[] = "_mysqlnd_emalloc";
static const char mysqlnd_pemalloc_name[] = "_mysqlnd_pemalloc";
@@ -39,6 +38,7 @@ static const char mysqlnd_malloc_name[] = "_mysqlnd_malloc";
static const char mysqlnd_calloc_name[] = "_mysqlnd_calloc";
static const char mysqlnd_realloc_name[] = "_mysqlnd_realloc";
static const char mysqlnd_free_name[] = "_mysqlnd_free";
+static const char mysqlnd_pememdup_name[] = "_mysqlnd_pememdup";
static const char mysqlnd_pestrndup_name[] = "_mysqlnd_pestrndup";
static const char mysqlnd_pestrdup_name[] = "_mysqlnd_pestrdup";
@@ -62,6 +62,8 @@ PHPAPI const char * mysqlnd_debug_std_no_trace_funcs[] =
NULL /* must be always last */
};
+#if MYSQLND_DEBUG_MEMORY
+
#if ZEND_DEBUG
#else
@@ -74,7 +76,7 @@ PHPAPI const char * mysqlnd_debug_std_no_trace_funcs[] =
#define FAKE_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) + sizeof(size_t)) : (p))
/* {{{ _mysqlnd_emalloc */
-void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
+static void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -85,8 +87,8 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
@@ -94,7 +96,7 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = _emalloc(REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = emalloc_rel(REAL_SIZE(size));
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -114,7 +116,7 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D)
/* {{{ _mysqlnd_pemalloc */
-void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
+static void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -125,8 +127,8 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
@@ -134,7 +136,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = (persistent) ? __zend_malloc(REAL_SIZE(size)) : _emalloc(REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = pemalloc_rel(REAL_SIZE(size), persistent);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -157,7 +159,7 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
/* {{{ _mysqlnd_ecalloc */
-void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
+static void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -168,8 +170,8 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("before: %lu", zend_memory_usage(FALSE));
@@ -178,7 +180,7 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = ecalloc_rel(nmemb, REAL_SIZE(size));
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -198,7 +200,7 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
/* {{{ _mysqlnd_pecalloc */
-void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D)
+static void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -208,8 +210,8 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M
TRACE_ALLOC_ENTER(mysqlnd_pecalloc_name);
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
@@ -217,7 +219,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = (persistent) ? __zend_calloc(nmemb, REAL_SIZE(size)) : _ecalloc(nmemb, REAL_SIZE(size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = pecalloc_rel(nmemb, REAL_SIZE(size), persistent);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -240,7 +242,7 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M
/* {{{ _mysqlnd_erealloc */
-void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
+static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -252,8 +254,8 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size);
@@ -262,7 +264,7 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = _erealloc(REAL_PTR(ptr), REAL_SIZE(new_size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = erealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size));
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -281,7 +283,7 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
/* {{{ _mysqlnd_perealloc */
-void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D)
+static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -293,8 +295,8 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, persistent);
@@ -303,7 +305,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
/* -1 is also "true" */
if (*threshold) {
#endif
- ret = perealloc(REAL_PTR(ptr), REAL_SIZE(new_size), persistent);
+ ret = perealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size), persistent);
#if PHP_DEBUG
--*threshold;
} else if (*threshold == 0) {
@@ -325,7 +327,7 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL
/* {{{ _mysqlnd_efree */
-void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)
+static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)
{
size_t free_amount = 0;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -333,8 +335,8 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
@@ -344,7 +346,7 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)
free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t));
TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
}
- _efree(REAL_PTR(ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ efree_rel(REAL_PTR(ptr));
}
if (collect_memory_statistics) {
@@ -356,7 +358,7 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)
/* {{{ _mysqlnd_pefree */
-void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
+static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
{
size_t free_amount = 0;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -364,8 +366,8 @@ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p persistent=%u", ptr, persistent);
@@ -375,7 +377,7 @@ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t));
TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount);
}
- (persistent) ? free(REAL_PTR(ptr)) : _efree(REAL_PTR(ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ pefree_rel(REAL_PTR(ptr), persistent);
}
if (collect_memory_statistics) {
@@ -388,7 +390,7 @@ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D)
/* {{{ _mysqlnd_malloc */
-void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D)
+static void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -399,8 +401,8 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
@@ -427,7 +429,7 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D)
/* {{{ _mysqlnd_calloc */
-void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
+static void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -438,8 +440,8 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
@@ -466,7 +468,7 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
/* {{{ _mysqlnd_realloc */
-void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D)
+static void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D)
{
void *ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -477,8 +479,8 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr);
@@ -508,7 +510,7 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D)
/* {{{ _mysqlnd_free */
-void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
+static void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
{
size_t free_amount = 0;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -516,8 +518,8 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
@@ -537,13 +539,40 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D)
}
/* }}} */
-#define SMART_STR_START_SIZE 2048
-#define SMART_STR_PREALLOC 512
-#include "zend_smart_str.h"
+
+/* {{{ _mysqlnd_pememdup */
+static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D)
+{
+ char * ret;
+ zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
+ TRACE_ALLOC_ENTER(mysqlnd_pememdup_name);
+
+#if PHP_DEBUG
+ {
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
+ }
+#endif
+ TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
+
+ ret = pemalloc_rel(REAL_SIZE(length + 1), persistent);
+ {
+ char * dest = (char *) FAKE_PTR(ret);
+ memcpy(dest, ptr, length);
+ }
+
+ if (collect_memory_statistics) {
+ *(size_t *) ret = length;
+ MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_DUP_COUNT : STAT_MEM_EDUP_COUNT);
+ }
+
+ TRACE_ALLOC_RETURN(FAKE_PTR(ret));
+}
+/* }}} */
/* {{{ _mysqlnd_pestrndup */
-char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D)
+static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D)
{
char * ret;
zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
@@ -551,13 +580,13 @@ char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persi
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
- ret = (persistent) ? __zend_malloc(REAL_SIZE(length + 1)) : _emalloc(REAL_SIZE(length + 1) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = pemalloc_rel(REAL_SIZE(length + 1), persistent);
{
size_t l = length;
char * p = (char *) ptr;
@@ -578,8 +607,13 @@ char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persi
/* }}} */
+#define SMART_STR_START_SIZE 2048
+#define SMART_STR_PREALLOC 512
+#include "zend_smart_str.h"
+
+
/* {{{ _mysqlnd_pestrdup */
-char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D)
+static char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D)
{
char * ret;
smart_str tmp_str = {0, 0};
@@ -588,8 +622,8 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME
TRACE_ALLOC_ENTER(mysqlnd_pestrdup_name);
#if PHP_DEBUG
{
- char * fn = strrchr(__zend_orig_filename, PHP_DIR_SEPARATOR);
- TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_orig_filename, __zend_orig_lineno);
+ char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
+ TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
TRACE_ALLOC_INF_FMT("ptr=%p", ptr);
@@ -597,7 +631,7 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME
smart_str_appendc(&tmp_str, *p);
} while (*p++);
- ret = (persistent) ? __zend_malloc(ZSTR_LEN(tmp_str.s) + sizeof(size_t)) : _emalloc(REAL_SIZE(ZSTR_LEN(tmp_str.s) + sizeof(size_t)) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ ret = pemalloc_rel(ZSTR_LEN(tmp_str.s) + sizeof(size_t), persistent);
memcpy(FAKE_PTR(ret), ZSTR_VAL(tmp_str.s), ZSTR_LEN(tmp_str.s));
if (ret && collect_memory_statistics) {
@@ -611,8 +645,20 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME
/* }}} */
+
+
+#endif /* MYSQLND_DEBUG_MEMORY */
+
+/* {{{ _mysqlnd_sprintf_free */
+static void _mysqlnd_sprintf_free(char * p)
+{
+ efree(p);
+}
+/* }}} */
+
+
/* {{{ _mysqlnd_sprintf */
-PHPAPI int _mysqlnd_sprintf(char ** pbuf, size_t max_len, const char *format, ...)
+static int _mysqlnd_sprintf(char ** pbuf, size_t max_len, const char *format, ...)
{
int len;
va_list ap;
@@ -623,30 +669,21 @@ PHPAPI int _mysqlnd_sprintf(char ** pbuf, size_t max_len, const char *format, ..
}
/* }}} */
-
-/* {{{ _mysqlnd_sprintf_free */
-PHPAPI void _mysqlnd_sprintf_free(char * p)
-{
- efree(p);
-}
-/* }}} */
-
/* {{{ _mysqlnd_vsprintf */
-PHPAPI int _mysqlnd_vsprintf(char ** pbuf, size_t max_len, const char * format, va_list ap)
+static int _mysqlnd_vsprintf(char ** pbuf, size_t max_len, const char * format, va_list ap)
{
return vspprintf(pbuf, max_len, format, ap);
}
/* }}} */
-#define MYSQLND_DEBUG_MEMORY 1
#if MYSQLND_DEBUG_MEMORY == 0
/* {{{ mysqlnd_zend_mm_emalloc */
static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D)
{
- return emalloc(size);
+ return emalloc_rel(size);
}
/* }}} */
@@ -654,7 +691,7 @@ static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D)
/* {{{ mysqlnd_zend_mm_pemalloc */
static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D)
{
- return pemalloc(size, persistent);
+ return pemalloc_rel(size, persistent);
}
/* }}} */
@@ -662,7 +699,7 @@ static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND
/* {{{ mysqlnd_zend_mm_ecalloc */
static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D)
{
- return ecalloc(nmemb, size);
+ return ecalloc_rel(nmemb, size);
}
/* }}} */
@@ -670,7 +707,7 @@ static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_ME
/* {{{ mysqlnd_zend_mm_pecalloc */
static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D)
{
- return pecalloc(nmemb, size, persistent);
+ return pecalloc_rel(nmemb, size, persistent);
}
/* }}} */
@@ -678,7 +715,7 @@ static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_boo
/* {{{ mysqlnd_zend_mm_erealloc */
static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
{
- return erealloc(ptr, new_size);
+ return erealloc_rel(ptr, new_size);
}
/* }}} */
@@ -686,7 +723,7 @@ static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)
/* {{{ mysqlnd_zend_mm_perealloc */
static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D)
{
- return perealloc(ptr, new_size, persistent);
+ return perealloc_rel(ptr, new_size, persistent);
}
/* }}} */
@@ -694,7 +731,7 @@ static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool pe
/* {{{ mysqlnd_zend_mm_efree */
static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D)
{
- efree(ptr);
+ efree_rel(ptr);
}
/* }}} */
@@ -702,7 +739,7 @@ static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D)
/* {{{ mysqlnd_zend_mm_pefree */
static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D)
{
- pefree(ptr, persistent);
+ pefree_rel(ptr, persistent);
}
/* }}} */
@@ -739,10 +776,22 @@ static void mysqlnd_zend_mm_free(void * ptr MYSQLND_MEM_D)
/* }}} */
+/* {{{ mysqlnd_zend_mm_pememdup */
+static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D)
+{
+ char * dest = pemalloc_rel(length, persistent);
+ if (dest) {
+ memcpy(dest, ptr, length);
+ }
+ return dest;
+}
+/* }}} */
+
+
/* {{{ mysqlnd_zend_mm_pestrndup */
static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D)
{
- return pestrndup(ptr, length, persistent);
+ return persistent? zend_strndup(ptr, length ) : estrndup_rel(ptr, length);
}
/* }}} */
@@ -750,7 +799,7 @@ static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, z
/* {{{ mysqlnd_zend_mm_pestrdup */
static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D)
{
- return pestrdup(ptr, persistent);
+ return pestrdup_rel(ptr, persistent);
}
/* }}} */
@@ -759,7 +808,7 @@ static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persist
PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
{
-#if MYSQLND_DEBUG_MEMORY
+#if MYSQLND_DEBUG_MEMORY == 1
_mysqlnd_emalloc,
_mysqlnd_pemalloc,
_mysqlnd_ecalloc,
@@ -772,6 +821,7 @@ PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
_mysqlnd_calloc,
_mysqlnd_realloc,
_mysqlnd_free,
+ _mysqlnd_pememdup,
_mysqlnd_pestrndup,
_mysqlnd_pestrdup,
_mysqlnd_sprintf,
@@ -790,10 +840,12 @@ PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator =
mysqlnd_zend_mm_calloc,
mysqlnd_zend_mm_realloc,
mysqlnd_zend_mm_free,
+ mysqlnd_zend_mm_pememdup,
mysqlnd_zend_mm_pestrndup,
- mysqlnd_zend_mm_pestrdup
- sprintf,
- mysqlnd_zend_mm_efree,
+ mysqlnd_zend_mm_pestrdup,
+ _mysqlnd_sprintf,
+ _mysqlnd_vsprintf,
+ _mysqlnd_sprintf_free,
#endif
};
diff --git a/ext/mysqlnd/mysqlnd_alloc.h b/ext/mysqlnd/mysqlnd_alloc.h
index 958aff8934..894da77823 100644
--- a/ext/mysqlnd/mysqlnd_alloc.h
+++ b/ext/mysqlnd/mysqlnd_alloc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,21 +12,17 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_debug.h 306938 2011-01-01 02:17:06Z felipe $ */
-/* $Id: mysqlnd_debug.h 306938 2011-01-01 02:17:06Z felipe $ */
-
#ifndef MYSQLND_ALLOC_H
#define MYSQLND_ALLOC_H
PHPAPI extern const char * mysqlnd_debug_std_no_trace_funcs[];
-#define MYSQLND_MEM_D ZEND_FILE_LINE_ORIG_DC
+#define MYSQLND_MEM_D ZEND_FILE_LINE_DC
#define MYSQLND_MEM_C ZEND_FILE_LINE_CC
struct st_mysqlnd_allocator_methods
@@ -43,6 +39,7 @@ struct st_mysqlnd_allocator_methods
void * (*m_calloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D);
void * (*m_realloc)(void *ptr, size_t new_size MYSQLND_MEM_D);
void (*m_free)(void *ptr MYSQLND_MEM_D);
+ char * (*m_pememdup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D);
char * (*m_pestrndup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D);
char * (*m_pestrdup)(const char * const ptr, zend_bool persistent MYSQLND_MEM_D);
int (*m_sprintf)(char **pbuf, size_t max_len, const char *format, ...);
@@ -52,24 +49,6 @@ struct st_mysqlnd_allocator_methods
PHPAPI extern struct st_mysqlnd_allocator_methods mysqlnd_allocator;
-PHPAPI void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D);
-PHPAPI void _mysqlnd_efree(void *ptr MYSQLND_MEM_D);
-PHPAPI void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D);
-PHPAPI void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D);
-PHPAPI void _mysqlnd_free(void *ptr MYSQLND_MEM_D);
-PHPAPI char * _mysqlnd_pestrndup(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D);
-PHPAPI char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D);
-PHPAPI int _mysqlnd_sprintf(char **pbuf, size_t max_len, const char *format, ...);
-PHPAPI void _mysqlnd_sprintf_free(char * p);
-PHPAPI int _mysqlnd_vsprintf(char **pbuf, size_t max_len, const char *format, va_list ap);
-
#define mnd_emalloc(size) mysqlnd_allocator.m_emalloc((size) MYSQLND_MEM_C)
#define mnd_pemalloc(size, pers) mysqlnd_allocator.m_pemalloc((size), (pers) MYSQLND_MEM_C)
#define mnd_ecalloc(nmemb, size) mysqlnd_allocator.m_ecalloc((nmemb), (size) MYSQLND_MEM_C)
@@ -82,12 +61,29 @@ PHPAPI int _mysqlnd_vsprintf(char **pbuf, size_t max_len, const char *format, v
#define mnd_calloc(nmemb, size) mysqlnd_allocator.m_calloc((nmemb), (size) MYSQLND_MEM_C)
#define mnd_realloc(ptr, new_size) mysqlnd_allocator.m_realloc((ptr), (new_size) MYSQLND_MEM_C)
#define mnd_free(ptr) mysqlnd_allocator.m_free((ptr) MYSQLND_MEM_C)
+#define mnd_pememdup(ptr, size, pers) mysqlnd_allocator.m_pememdup((ptr), (size), (pers) MYSQLND_MEM_C)
#define mnd_pestrndup(ptr, size, pers) mysqlnd_allocator.m_pestrndup((ptr), (size), (pers) MYSQLND_MEM_C)
#define mnd_pestrdup(ptr, pers) mysqlnd_allocator.m_pestrdup((ptr), (pers) MYSQLND_MEM_C)
#define mnd_sprintf(p, mx_len, fmt,...) mysqlnd_allocator.m_sprintf((p), (mx_len), (fmt), __VA_ARGS__)
#define mnd_vsprintf(p, mx_len, fmt,ap) mysqlnd_allocator.m_vsprintf((p), (mx_len), (fmt), (ap))
#define mnd_sprintf_free(p) mysqlnd_allocator.m_sprintf_free((p))
+static inline MYSQLND_STRING mnd_dup_cstring(const MYSQLND_CSTRING str, const zend_bool persistent)
+{
+ const MYSQLND_STRING ret = {(char*) mnd_pemalloc(str.l + 1, persistent), str.l};
+ if (ret.s) {
+ memcpy(ret.s, str.s, str.l);
+ ret.s[str.l] = '\0';
+ }
+ return ret;
+}
+
+static inline MYSQLND_CSTRING mnd_str2c(const MYSQLND_STRING str)
+{
+ const MYSQLND_CSTRING ret = {str.s, str.l};
+ return ret;
+}
+
#endif /* MYSQLND_ALLOC_H */
/*
diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c
index e4632496f9..6cbd3e1149 100644
--- a/ext/mysqlnd/mysqlnd_auth.c
+++ b/ext/mysqlnd/mysqlnd_auth.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,22 +12,222 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c 307377 2011-01-11 13:02:57Z andrey $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_structs.h"
+#include "mysqlnd_auth.h"
#include "mysqlnd_wireprotocol.h"
+#include "mysqlnd_connection.h"
#include "mysqlnd_priv.h"
-#include "mysqlnd_result.h"
#include "mysqlnd_charset.h"
#include "mysqlnd_debug.h"
+static const char * const mysqlnd_old_passwd = "mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. "
+"Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will "
+"store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords "
+"flag from your my.cnf file";
+
+
+/* {{{ mysqlnd_run_authentication */
+enum_func_status
+mysqlnd_run_authentication(
+ MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const size_t passwd_len,
+ const char * const db,
+ const size_t db_len,
+ const MYSQLND_STRING auth_plugin_data,
+ const char * const auth_protocol,
+ unsigned int charset_no,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags,
+ zend_bool silent,
+ zend_bool is_change_user
+ )
+{
+ enum_func_status ret = FAIL;
+ zend_bool first_call = TRUE;
+
+ char * switch_to_auth_protocol = NULL;
+ size_t switch_to_auth_protocol_len = 0;
+ char * requested_protocol = NULL;
+ zend_uchar * plugin_data;
+ size_t plugin_data_len;
+
+ DBG_ENTER("mysqlnd_run_authentication");
+
+ plugin_data_len = auth_plugin_data.l;
+ plugin_data = mnd_emalloc(plugin_data_len + 1);
+ if (!plugin_data) {
+ goto end;
+ }
+ memcpy(plugin_data, auth_plugin_data.s, plugin_data_len);
+ plugin_data[plugin_data_len] = '\0';
+
+ requested_protocol = mnd_pestrdup(auth_protocol? auth_protocol : MYSQLND_DEFAULT_AUTH_PROTOCOL, FALSE);
+ if (!requested_protocol) {
+ goto end;
+ }
+
+ do {
+ struct st_mysqlnd_authentication_plugin * auth_plugin = conn->m->fetch_auth_plugin_by_name(requested_protocol);
+
+ if (!auth_plugin) {
+ php_error_docref(NULL, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
+ SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
+ goto end;
+ }
+ DBG_INF("plugin found");
+
+ {
+ zend_uchar * switch_to_auth_protocol_data = NULL;
+ size_t switch_to_auth_protocol_data_len = 0;
+ zend_uchar * scrambled_data = NULL;
+ size_t scrambled_data_len = 0;
+
+ switch_to_auth_protocol = NULL;
+ switch_to_auth_protocol_len = 0;
+
+ if (conn->authentication_plugin_data.s) {
+ mnd_pefree(conn->authentication_plugin_data.s, conn->persistent);
+ conn->authentication_plugin_data.s = NULL;
+ }
+ conn->authentication_plugin_data.l = plugin_data_len;
+ conn->authentication_plugin_data.s = mnd_pemalloc(conn->authentication_plugin_data.l, conn->persistent);
+ if (!conn->authentication_plugin_data.s) {
+ SET_OOM_ERROR(conn->error_info);
+ goto end;
+ }
+ memcpy(conn->authentication_plugin_data.s, plugin_data, plugin_data_len);
+
+ DBG_INF_FMT("salt(%d)=[%.*s]", plugin_data_len, plugin_data_len, plugin_data);
+ /* The data should be allocated with malloc() */
+ scrambled_data =
+ auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
+ plugin_data, plugin_data_len, session_options,
+ conn->protocol_frame_codec->data, mysql_flags);
+ if (conn->error_info->error_no) {
+ goto end;
+ }
+ if (FALSE == is_change_user) {
+ ret = mysqlnd_auth_handshake(conn, user, passwd, passwd_len, db, db_len, session_options, mysql_flags,
+ charset_no,
+ first_call,
+ requested_protocol,
+ scrambled_data, scrambled_data_len,
+ &switch_to_auth_protocol, &switch_to_auth_protocol_len,
+ &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
+ );
+ } else {
+ ret = mysqlnd_auth_change_user(conn, user, strlen(user), passwd, passwd_len, db, db_len, silent,
+ first_call,
+ requested_protocol,
+ scrambled_data, scrambled_data_len,
+ &switch_to_auth_protocol, &switch_to_auth_protocol_len,
+ &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
+ );
+ }
+ first_call = FALSE;
+ free(scrambled_data);
+
+ DBG_INF_FMT("switch_to_auth_protocol=%s", switch_to_auth_protocol? switch_to_auth_protocol:"n/a");
+ if (requested_protocol && switch_to_auth_protocol) {
+ mnd_efree(requested_protocol);
+ requested_protocol = switch_to_auth_protocol;
+ }
+
+ if (plugin_data) {
+ mnd_efree(plugin_data);
+ }
+ plugin_data_len = switch_to_auth_protocol_data_len;
+ plugin_data = switch_to_auth_protocol_data;
+ }
+ DBG_INF_FMT("conn->error_info->error_no = %d", conn->error_info->error_no);
+ } while (ret == FAIL && conn->error_info->error_no == 0 && switch_to_auth_protocol != NULL);
+
+ if (ret == PASS) {
+ DBG_INF_FMT("saving requested_protocol=%s", requested_protocol);
+ conn->m->set_client_option(conn, MYSQLND_OPT_AUTH_PROTOCOL, requested_protocol);
+ }
+end:
+ if (plugin_data) {
+ mnd_efree(plugin_data);
+ }
+ if (requested_protocol) {
+ mnd_efree(requested_protocol);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_switch_to_ssl_if_needed */
+static enum_func_status
+mysqlnd_switch_to_ssl_if_needed(MYSQLND_CONN_DATA * conn,
+ unsigned int charset_no,
+ size_t server_capabilities,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags)
+{
+ enum_func_status ret = FAIL;
+ const MYSQLND_CHARSET * charset;
+ DBG_ENTER("mysqlnd_switch_to_ssl_if_needed");
+
+ if (session_options->charset_name && (charset = mysqlnd_find_charset_name(session_options->charset_name))) {
+ charset_no = charset->nr;
+ }
+
+ {
+ size_t client_capabilities = mysql_flags;
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_ENABLE_SSL, conn, client_capabilities, server_capabilities, charset_no);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_connect_run_authentication */
+enum_func_status
+mysqlnd_connect_run_authentication(
+ MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const char * const db,
+ size_t db_len,
+ size_t passwd_len,
+ MYSQLND_STRING authentication_plugin_data,
+ const char * const authentication_protocol,
+ const unsigned int charset_no,
+ size_t server_capabilities,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags
+ )
+{
+ enum_func_status ret = FAIL;
+ DBG_ENTER("mysqlnd_connect_run_authentication");
+
+ ret = mysqlnd_switch_to_ssl_if_needed(conn, charset_no, server_capabilities, session_options, mysql_flags);
+ if (PASS == ret) {
+ ret = mysqlnd_run_authentication(conn, user, passwd, passwd_len, db, db_len,
+ authentication_plugin_data, authentication_protocol,
+ charset_no, session_options, mysql_flags, FALSE /*silent*/, FALSE/*is_change*/);
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
/* {{{ mysqlnd_auth_handshake */
enum_func_status
mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
@@ -36,7 +236,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
const size_t passwd_len,
const char * const db,
const size_t db_len,
- const MYSQLND_OPTIONS * const options,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
zend_ulong mysql_flags,
unsigned int server_charset_no,
zend_bool use_full_blown_auth_packet,
@@ -57,34 +257,34 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
DBG_ENTER("mysqlnd_auth_handshake");
- auth_resp_packet = conn->protocol->m.get_auth_response_packet(conn->protocol, FALSE);
+ auth_resp_packet = conn->payload_decoder_factory->m.get_auth_response_packet(conn->payload_decoder_factory, FALSE);
if (!auth_resp_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto end;
}
if (use_full_blown_auth_packet != TRUE) {
- change_auth_resp_packet = conn->protocol->m.get_change_auth_response_packet(conn->protocol, FALSE);
+ change_auth_resp_packet = conn->payload_decoder_factory->m.get_change_auth_response_packet(conn->payload_decoder_factory, FALSE);
if (!change_auth_resp_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto end;
}
change_auth_resp_packet->auth_data = auth_plugin_data;
change_auth_resp_packet->auth_data_len = auth_plugin_data_len;
- if (!PACKET_WRITE(change_auth_resp_packet, conn)) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ if (!PACKET_WRITE(change_auth_resp_packet)) {
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
+ SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
goto end;
}
} else {
- auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE);
+ auth_packet = conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
auth_packet->client_flags = mysql_flags;
- auth_packet->max_packet_size = options->max_allowed_packet;
- if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) {
+ auth_packet->max_packet_size = session_options->max_allowed_packet;
+ if (session_options->charset_name && (charset = mysqlnd_find_charset_name(session_options->charset_name))) {
auth_packet->charset_no = charset->nr;
} else {
auth_packet->charset_no = server_charset_no;
@@ -103,7 +303,7 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
auth_packet->connect_attr = conn->options->connect_attr;
}
- if (!PACKET_WRITE(auth_packet, conn)) {
+ if (!PACKET_WRITE(auth_packet)) {
goto end;
}
}
@@ -111,12 +311,12 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
conn->charset = mysqlnd_find_charset_nr(auth_packet->charset_no);
}
- if (FAIL == PACKET_READ(auth_resp_packet, conn) || auth_resp_packet->response_code >= 0xFE) {
+ if (FAIL == PACKET_READ(auth_resp_packet) || auth_resp_packet->response_code >= 0xFE) {
if (auth_resp_packet->response_code == 0xFE) {
/* old authentication with new server !*/
if (!auth_resp_packet->new_auth_protocol) {
DBG_ERR(mysqlnd_old_passwd);
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
} else {
*switch_to_auth_protocol = mnd_pestrndup(auth_resp_packet->new_auth_protocol, auth_resp_packet->new_auth_protocol_len, FALSE);
*switch_to_auth_protocol_len = auth_resp_packet->new_auth_protocol_len;
@@ -134,12 +334,12 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
strlcpy(conn->error_info->sqlstate, auth_resp_packet->sqlstate, sizeof(conn->error_info->sqlstate));
DBG_ERR_FMT("ERROR:%u [SQLSTATE:%s] %s", auth_resp_packet->error_no, auth_resp_packet->sqlstate, auth_resp_packet->error);
}
- SET_CLIENT_ERROR(*conn->error_info, auth_resp_packet->error_no, UNKNOWN_SQLSTATE, auth_resp_packet->error);
+ SET_CLIENT_ERROR(conn->error_info, auth_resp_packet->error_no, UNKNOWN_SQLSTATE, auth_resp_packet->error);
}
goto end;
}
- SET_NEW_MESSAGE(conn->last_message, conn->last_message_len, auth_resp_packet->message, auth_resp_packet->message_len, conn->persistent);
+ SET_NEW_MESSAGE(conn->last_message.s, conn->last_message.l, auth_resp_packet->message, auth_resp_packet->message_len, conn->persistent);
ret = PASS;
end:
PACKET_FREE(change_auth_resp_packet);
@@ -178,33 +378,33 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
DBG_ENTER("mysqlnd_auth_change_user");
- chg_user_resp = conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE);
+ chg_user_resp = conn->payload_decoder_factory->m.get_change_user_response_packet(conn->payload_decoder_factory, FALSE);
if (!chg_user_resp) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto end;
}
if (use_full_blown_auth_packet != TRUE) {
- change_auth_resp_packet = conn->protocol->m.get_change_auth_response_packet(conn->protocol, FALSE);
+ change_auth_resp_packet = conn->payload_decoder_factory->m.get_change_auth_response_packet(conn->payload_decoder_factory, FALSE);
if (!change_auth_resp_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto end;
}
change_auth_resp_packet->auth_data = auth_plugin_data;
change_auth_resp_packet->auth_data_len = auth_plugin_data_len;
- if (!PACKET_WRITE(change_auth_resp_packet, conn)) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ if (!PACKET_WRITE(change_auth_resp_packet)) {
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
+ SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
goto end;
}
} else {
- auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE);
+ auth_packet = conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
if (!auth_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto end;
}
@@ -223,21 +423,21 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
auth_packet->charset_no = conn->charset->nr;
}
- if (!PACKET_WRITE(auth_packet, conn)) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ if (!PACKET_WRITE(auth_packet)) {
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
+ SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
goto end;
}
}
- ret = PACKET_READ(chg_user_resp, conn);
- COPY_CLIENT_ERROR(*conn->error_info, chg_user_resp->error_info);
+ ret = PACKET_READ(chg_user_resp);
+ COPY_CLIENT_ERROR(conn->error_info, chg_user_resp->error_info);
if (0xFE == chg_user_resp->response_code) {
ret = FAIL;
if (!chg_user_resp->new_auth_protocol) {
DBG_ERR(mysqlnd_old_passwd);
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
} else {
*switch_to_auth_protocol = mnd_pestrndup(chg_user_resp->new_auth_protocol, chg_user_resp->new_auth_protocol_len, FALSE);
*switch_to_auth_protocol_len = chg_user_resp->new_auth_protocol_len;
@@ -260,36 +460,36 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
When it gets fixed, there should be one more check here
*/
if (conn->m->get_server_version(conn) > 50113L &&conn->m->get_server_version(conn) < 50118L) {
- MYSQLND_PACKET_OK * redundant_error_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE);
+ MYSQLND_PACKET_OK * redundant_error_packet = conn->payload_decoder_factory->m.get_ok_packet(conn->payload_decoder_factory, FALSE);
if (redundant_error_packet) {
- PACKET_READ(redundant_error_packet, conn);
+ PACKET_READ(redundant_error_packet);
PACKET_FREE(redundant_error_packet);
DBG_INF_FMT("Server is %u, buggy, sends two ERR messages", conn->m->get_server_version(conn));
} else {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
}
}
}
if (ret == PASS) {
char * tmp = NULL;
- /* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */
+ /* if we get conn->username as parameter and then we first free it, then estrndup it, we will crash */
tmp = mnd_pestrndup(user, user_len, conn->persistent);
- if (conn->user) {
- mnd_pefree(conn->user, conn->persistent);
+ if (conn->username.s) {
+ mnd_pefree(conn->username.s, conn->persistent);
}
- conn->user = tmp;
+ conn->username.s = tmp;
tmp = mnd_pestrdup(passwd, conn->persistent);
- if (conn->passwd) {
- mnd_pefree(conn->passwd, conn->persistent);
+ if (conn->password.s) {
+ mnd_pefree(conn->password.s, conn->persistent);
}
- conn->passwd = tmp;
+ conn->password.s = tmp;
- if (conn->last_message) {
- mnd_pefree(conn->last_message, conn->persistent);
- conn->last_message = NULL;
+ if (conn->last_message.s) {
+ mnd_pefree(conn->last_message.s, conn->persistent);
+ conn->last_message.s = NULL;
}
- memset(conn->upsert_status, 0, sizeof(*conn->upsert_status));
+ UPSERT_STATUS_RESET(conn->upsert_status);
/* set charset for old servers */
if (conn->m->get_server_version(conn) < 50123) {
ret = conn->m->set_charset(conn, old_cs->name);
@@ -297,7 +497,7 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
} else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) {
/* old authentication with new server !*/
DBG_ERR(mysqlnd_old_passwd);
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
}
end:
PACKET_FREE(change_auth_resp_packet);
@@ -325,7 +525,7 @@ php_mysqlnd_crypt(zend_uchar *buffer, const zend_uchar *s1, const zend_uchar *s2
/* {{{ php_mysqlnd_scramble */
-void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const password, size_t password_len)
+void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const password, const size_t password_len)
{
PHP_SHA1_CTX context;
zend_uchar sha1[SHA1_MAX_LENGTH];
@@ -359,8 +559,8 @@ mysqlnd_native_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options,
- const MYSQLND_NET_OPTIONS * const net_options,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ const MYSQLND_PFC_DATA * const pfc_data,
zend_ulong mysql_flags
)
{
@@ -371,7 +571,7 @@ mysqlnd_native_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
/* 5.5.x reports 21 as scramble length because it needs to show the length of the data before the plugin name */
if (auth_plugin_data_len < SCRAMBLE_LENGTH) {
/* mysql_native_password only works with SCRAMBLE_LENGTH scramble */
- SET_CLIENT_ERROR(*conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "The server sent wrong length for scramble");
+ SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "The server sent wrong length for scramble");
DBG_ERR_FMT("The server sent wrong length for scramble %u. Expected %u", auth_plugin_data_len, SCRAMBLE_LENGTH);
DBG_RETURN(NULL);
}
@@ -396,7 +596,7 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_native_auth_plugin =
MYSQLND_VERSION_ID,
PHP_MYSQLND_VERSION,
"PHP License 3.01",
- "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>, Georg Richter <georg@mysql.com>",
+ "Andrey Hristov <andrey@php.net>, Ulf Wendel <uwendel@mysql.com>, Georg Richter <georg@mysql.com>",
{
NULL, /* no statistics , will be filled later if there are some */
NULL, /* no statistics */
@@ -419,8 +619,8 @@ mysqlnd_pam_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self,
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options,
- const MYSQLND_NET_OPTIONS * const net_options,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ const MYSQLND_PFC_DATA * const pfc_data,
zend_ulong mysql_flags
)
{
@@ -480,18 +680,18 @@ mysqlnd_xor_string(char * dst, const size_t dst_len, const char * xor_str, const
/* {{{ mysqlnd_sha256_get_rsa_key */
static RSA *
mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn,
- const MYSQLND_OPTIONS * const options,
- const MYSQLND_NET_OPTIONS * const net_options
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ const MYSQLND_PFC_DATA * const pfc_data
)
{
RSA * ret = NULL;
- const char * fname = (net_options->sha256_server_public_key && net_options->sha256_server_public_key[0] != '\0')?
- net_options->sha256_server_public_key:
+ const char * fname = (pfc_data->sha256_server_public_key && pfc_data->sha256_server_public_key[0] != '\0')?
+ pfc_data->sha256_server_public_key:
MYSQLND_G(sha256_server_public_key);
php_stream * stream;
DBG_ENTER("mysqlnd_sha256_get_rsa_key");
DBG_INF_FMT("options_s256_pk=[%s] MYSQLND_G(sha256_server_public_key)=[%s]",
- net_options->sha256_server_public_key? net_options->sha256_server_public_key:"n/a",
+ pfc_data->sha256_server_public_key? pfc_data->sha256_server_public_key:"n/a",
MYSQLND_G(sha256_server_public_key)? MYSQLND_G(sha256_server_public_key):"n/a");
if (!fname || fname[0] == '\0') {
MYSQLND_PACKET_SHA256_PK_REQUEST * pk_req_packet = NULL;
@@ -499,28 +699,28 @@ mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn,
do {
DBG_INF("requesting the public key from the server");
- pk_req_packet = conn->protocol->m.get_sha256_pk_request_packet(conn->protocol, FALSE);
+ pk_req_packet = conn->payload_decoder_factory->m.get_sha256_pk_request_packet(conn->payload_decoder_factory, FALSE);
if (!pk_req_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
- pk_resp_packet = conn->protocol->m.get_sha256_pk_request_response_packet(conn->protocol, FALSE);
+ pk_resp_packet = conn->payload_decoder_factory->m.get_sha256_pk_request_response_packet(conn->payload_decoder_factory, FALSE);
if (!pk_resp_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
PACKET_FREE(pk_req_packet);
break;
}
- if (! PACKET_WRITE(pk_req_packet, conn)) {
+ if (! PACKET_WRITE(pk_req_packet)) {
DBG_ERR_FMT("Error while sending public key request packet");
php_error(E_WARNING, "Error while sending public key request packet. PID=%d", getpid());
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
break;
}
- if (FAIL == PACKET_READ(pk_resp_packet, conn) || NULL == pk_resp_packet->public_key) {
+ if (FAIL == PACKET_READ(pk_resp_packet) || NULL == pk_resp_packet->public_key) {
DBG_ERR_FMT("Error while receiving public key");
php_error(E_WARNING, "Error while receiving public key. PID=%d", getpid());
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
break;
}
DBG_INF_FMT("Public key(%d):\n%s", pk_resp_packet->public_key_len, pk_resp_packet->public_key);
@@ -537,7 +737,7 @@ mysqlnd_sha256_get_rsa_key(MYSQLND_CONN_DATA * conn,
DBG_INF_FMT("ret=%p", ret);
DBG_RETURN(ret);
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE,
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE,
"sha256_server_public_key is not set for the connection or as mysqlnd.sha256_server_public_key");
DBG_ERR("server_public_key is not set");
DBG_RETURN(NULL);
@@ -569,8 +769,8 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options,
- const MYSQLND_NET_OPTIONS * const net_options,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ const MYSQLND_PFC_DATA * const pfc_data,
zend_ulong mysql_flags
)
{
@@ -580,7 +780,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
DBG_INF_FMT("salt(%d)=[%.*s]", auth_plugin_data_len, auth_plugin_data_len, auth_plugin_data);
- if (conn->net->data->ssl) {
+ if (conn->protocol_frame_codec->data->ssl) {
DBG_INF("simple clear text under SSL");
/* clear text under SSL */
*auth_data_len = passwd_len;
@@ -588,7 +788,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
memcpy(ret, passwd, passwd_len);
} else {
*auth_data_len = 0;
- server_public_key = mysqlnd_sha256_get_rsa_key(conn, options, net_options);
+ server_public_key = mysqlnd_sha256_get_rsa_key(conn, session_options, pfc_data);
if (server_public_key) {
int server_public_key_len;
@@ -605,7 +805,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
*/
if ((size_t) server_public_key_len - 41 <= passwd_len) {
/* password message is to long */
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long");
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "password is too long");
DBG_ERR("password is too long");
DBG_RETURN(NULL);
}
@@ -629,7 +829,7 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_sha256_authentication_plu
MYSQLND_VERSION_ID,
PHP_MYSQLND_VERSION,
"PHP License 3.01",
- "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>",
+ "Andrey Hristov <andrey@php.net>, Ulf Wendel <uwendel@mysql.com>",
{
NULL, /* no statistics , will be filled later if there are some */
NULL, /* no statistics */
diff --git a/ext/mysqlnd/mysqlnd_auth.h b/ext/mysqlnd/mysqlnd_auth.h
new file mode 100644
index 0000000000..db9460df54
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_auth.h
@@ -0,0 +1,126 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_AUTH_H
+#define MYSQLND_AUTH_H
+enum_func_status
+mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const size_t passwd_len,
+ const char * const db,
+ const size_t db_len,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags,
+ unsigned int server_charset_no,
+ zend_bool use_full_blown_auth_packet,
+ const char * const auth_protocol,
+ const zend_uchar * const auth_plugin_data,
+ const size_t auth_plugin_data_len,
+ char ** switch_to_auth_protocol,
+ size_t * switch_to_auth_protocol_len,
+ zend_uchar ** switch_to_auth_protocol_data,
+ size_t * switch_to_auth_protocol_data_len
+ );
+
+enum_func_status
+mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const size_t passwd_len,
+ const char * const db,
+ const size_t db_len,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags,
+ unsigned int server_charset_no,
+ zend_bool use_full_blown_auth_packet,
+ const char * const auth_protocol,
+ const zend_uchar * const auth_plugin_data,
+ const size_t auth_plugin_data_len,
+ char ** switch_to_auth_protocol,
+ size_t * switch_to_auth_protocol_len,
+ zend_uchar ** switch_to_auth_protocol_data,
+ size_t * switch_to_auth_protocol_data_len
+ );
+
+enum_func_status
+mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
+ const char * const user,
+ const size_t user_len,
+ const char * const passwd,
+ const size_t passwd_len,
+ const char * const db,
+ const size_t db_len,
+ const zend_bool silent,
+ zend_bool use_full_blown_auth_packet,
+ const char * const auth_protocol,
+ zend_uchar * auth_plugin_data,
+ size_t auth_plugin_data_len,
+ char ** switch_to_auth_protocol,
+ size_t * switch_to_auth_protocol_len,
+ zend_uchar ** switch_to_auth_protocol_data,
+ size_t * switch_to_auth_protocol_data_len
+ );
+
+
+enum_func_status
+mysqlnd_connect_run_authentication(
+ MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const char * const db,
+ size_t db_len,
+ size_t passwd_len,
+ MYSQLND_STRING authentication_plugin_data,
+ const char * const authentication_protocol,
+ const unsigned int charset_no,
+ size_t server_capabilities,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags
+ );
+
+enum_func_status
+mysqlnd_run_authentication(
+ MYSQLND_CONN_DATA * conn,
+ const char * const user,
+ const char * const passwd,
+ const size_t passwd_len,
+ const char * const db,
+ const size_t db_len,
+ const MYSQLND_STRING auth_plugin_data,
+ const char * const auth_protocol,
+ unsigned int charset_no,
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ zend_ulong mysql_flags,
+ zend_bool silent,
+ zend_bool is_change_user
+ );
+
+PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, const size_t pass_len);
+
+#endif /* MYSQLND_AUTH_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c
index 9a7fdae0f7..60e6f938ef 100644
--- a/ext/mysqlnd/mysqlnd_block_alloc.c
+++ b/ext/mysqlnd/mysqlnd_block_alloc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_block_alloc.h"
@@ -29,9 +26,8 @@
/* {{{ mysqlnd_mempool_free_chunk */
static void
-mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk)
+mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL * pool, MYSQLND_MEMORY_POOL_CHUNK * chunk)
{
- MYSQLND_MEMORY_POOL * pool = chunk->pool;
DBG_ENTER("mysqlnd_mempool_free_chunk");
if (chunk->from_pool) {
/* Try to back-off and guess if this is the last block allocated */
@@ -42,7 +38,6 @@ mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk)
*/
pool->free_size += chunk->size;
}
- pool->refcount--;
} else {
mnd_efree(chunk->ptr);
}
@@ -54,11 +49,10 @@ mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk)
/* {{{ mysqlnd_mempool_resize_chunk */
static enum_func_status
-mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size)
+mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL * pool, MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size)
{
DBG_ENTER("mysqlnd_mempool_resize_chunk");
if (chunk->from_pool) {
- MYSQLND_MEMORY_POOL * pool = chunk->pool;
/* Try to back-off and guess if this is the last block allocated */
if (chunk->ptr == (pool->arena + (pool->arena_size - pool->free_size - chunk->size))) {
/*
@@ -75,8 +69,7 @@ mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int siz
chunk->ptr = new_ptr;
pool->free_size += chunk->size;
chunk->size = size;
- chunk->pool = NULL; /* now we have no pool memory */
- pool->refcount--;
+ chunk->from_pool = FALSE; /* now we have no pool memory */
} else {
/* If the chunk is > than asked size then free_memory increases, otherwise decreases*/
pool->free_size += (chunk->size - size);
@@ -94,8 +87,7 @@ mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int siz
memcpy(new_ptr, chunk->ptr, chunk->size);
chunk->ptr = new_ptr;
chunk->size = size;
- chunk->pool = NULL; /* now we have non-pool memory */
- pool->refcount--;
+ chunk->from_pool = FALSE; /* now we have non-pool memory */
}
}
} else {
@@ -119,25 +111,21 @@ MYSQLND_MEMORY_POOL_CHUNK * mysqlnd_mempool_get_chunk(MYSQLND_MEMORY_POOL * pool
chunk = mnd_emalloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK));
if (chunk) {
- chunk->free_chunk = mysqlnd_mempool_free_chunk;
- chunk->resize_chunk = mysqlnd_mempool_resize_chunk;
chunk->size = size;
/*
Should not go over MYSQLND_MAX_PACKET_SIZE, since we
expect non-arena memory in mysqlnd_wireprotocol.c . We
realloc the non-arena memory.
*/
- chunk->pool = pool;
if (size > pool->free_size) {
chunk->from_pool = FALSE;
chunk->ptr = mnd_emalloc(size);
if (!chunk->ptr) {
- chunk->free_chunk(chunk);
+ pool->free_chunk(pool, chunk);
chunk = NULL;
}
} else {
chunk->from_pool = TRUE;
- ++pool->refcount;
chunk->ptr = pool->arena + (pool->arena_size - pool->free_size);
/* Last step, update free_size */
pool->free_size -= size;
@@ -157,8 +145,9 @@ mysqlnd_mempool_create(size_t arena_size)
DBG_ENTER("mysqlnd_mempool_create");
if (ret) {
ret->get_chunk = mysqlnd_mempool_get_chunk;
+ ret->free_chunk = mysqlnd_mempool_free_chunk;
+ ret->resize_chunk = mysqlnd_mempool_resize_chunk;
ret->free_size = ret->arena_size = arena_size ? arena_size : 0;
- ret->refcount = 0;
/* OOM ? */
ret->arena = mnd_emalloc(ret->arena_size);
if (!ret->arena) {
diff --git a/ext/mysqlnd/mysqlnd_block_alloc.h b/ext/mysqlnd/mysqlnd_block_alloc.h
index 50e4c90512..54529a0aca 100644
--- a/ext/mysqlnd/mysqlnd_block_alloc.h
+++ b/ext/mysqlnd/mysqlnd_block_alloc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_BLOCK_ALLOC_H
#define MYSQLND_BLOCK_ALLOC_H
diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c
index b9f16e27cb..2b3ddd0831 100644
--- a/ext/mysqlnd/mysqlnd_charset.c
+++ b/ext/mysqlnd/mysqlnd_charset.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,13 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
+
#include "php.h"
-#include "php_globals.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_debug.h"
@@ -867,7 +867,7 @@ static struct st_mysqlnd_plugin_charsets mysqlnd_plugin_charsets_plugin =
MYSQLND_VERSION_ID,
PHP_MYSQLND_VERSION,
"PHP License 3.01",
- "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>, Georg Richter <georg@mysql.com>",
+ "Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>, Georg Richter <georg@php.net>",
{
NULL, /* no statistics , will be filled later if there are some */
NULL, /* no statistics */
diff --git a/ext/mysqlnd/mysqlnd_charset.h b/ext/mysqlnd/mysqlnd_charset.h
index 8bdad7249e..1f7b04063c 100644
--- a/ext/mysqlnd/mysqlnd_charset.h
+++ b/ext/mysqlnd/mysqlnd_charset.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,9 +12,9 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
diff --git a/ext/mysqlnd/mysqlnd_commands.c b/ext/mysqlnd/mysqlnd_commands.c
new file mode 100644
index 0000000000..d276a0f10a
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_commands.c
@@ -0,0 +1,1470 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "mysqlnd.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_priv.h"
+#include "mysqlnd_auth.h"
+#include "mysqlnd_wireprotocol.h"
+#include "mysqlnd_statistics.h"
+#include "mysqlnd_debug.h"
+
+
+struct st_mysqlnd_protocol_no_params_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_protocol_no_params_command_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ } context;
+};
+
+/* {{{ mysqlnd_com_no_params_free_command */
+static void
+mysqlnd_com_no_params_free_command(void * command)
+{
+ DBG_ENTER("mysqlnd_com_no_params_free_command");
+ mnd_efree(command);
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/************************** COM_SET_OPTION ******************************************/
+struct st_mysqlnd_protocol_com_set_option_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_set_option_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ enum_mysqlnd_server_option option;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_set_option_run */
+enum_func_status
+mysqlnd_com_set_option_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_set_option_command * command = (struct st_mysqlnd_protocol_com_set_option_command *) cmd;
+ zend_uchar buffer[2];
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ enum_mysqlnd_server_option option = command->context.option;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_set_option_run");
+ int2store(buffer, (unsigned int) option);
+
+ ret = send_command(conn->payload_decoder_factory, COM_SET_OPTION, buffer, sizeof(buffer), FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_SET_OPTION, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_set_option_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_set_option_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_set_option_command * command;
+ DBG_ENTER("mysqlnd_com_set_option_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_set_option_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.option = va_arg(args, enum_mysqlnd_server_option);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_set_option_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_DEBUG ******************************************/
+/* {{{ mysqlnd_com_debug_run */
+static enum_func_status
+mysqlnd_com_debug_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_no_params_command * command = (struct st_mysqlnd_protocol_no_params_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_debug_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_DEBUG, NULL, 0, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_EOF_PACKET, FALSE, COM_DEBUG, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_debug_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_debug_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_no_params_command * command;
+ DBG_ENTER("mysqlnd_com_debug_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_no_params_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+
+ command->parent.run = mysqlnd_com_debug_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_INIT_DB ******************************************/
+struct st_mysqlnd_protocol_com_init_db_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_init_db_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING db;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_init_db_run */
+static enum_func_status
+mysqlnd_com_init_db_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_init_db_command * command = (struct st_mysqlnd_protocol_com_init_db_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ const MYSQLND_CSTRING db = command->context.db;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_init_db_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_INIT_DB, (zend_uchar*) command->context.db.s, command->context.db.l, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_INIT_DB, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+
+ /*
+ The server sends 0 but libmysql doesn't read it and has established
+ a protocol of giving back -1. Thus we have to follow it :(
+ */
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
+ if (ret == PASS) {
+ if (conn->connect_or_select_db.s) {
+ mnd_pefree(conn->connect_or_select_db.s, conn->persistent);
+ }
+ conn->connect_or_select_db.s = mnd_pestrndup(db.s, db.l, conn->persistent);
+ conn->connect_or_select_db.l = db.l;
+ if (!conn->connect_or_select_db.s) {
+ /* OOM */
+ SET_OOM_ERROR(conn->error_info);
+ ret = FAIL;
+ }
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_init_db_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_init_db_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_init_db_command * command;
+ DBG_ENTER("mysqlnd_com_init_db_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_init_db_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.db = va_arg(args, MYSQLND_CSTRING);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_init_db_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_PING ******************************************/
+/* {{{ mysqlnd_com_ping_run */
+static enum_func_status
+mysqlnd_com_ping_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_no_params_command * command = (struct st_mysqlnd_protocol_no_params_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_ping_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_PING, NULL, 0, TRUE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, TRUE, COM_PING, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+ /*
+ The server sends 0 but libmysql doesn't read it and has established
+ a protocol of giving back -1. Thus we have to follow it :(
+ */
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_ping_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_ping_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_no_params_command * command;
+ DBG_ENTER("mysqlnd_com_ping_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_no_params_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+
+ command->parent.run = mysqlnd_com_ping_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STATISTICS ******************************************/
+struct st_mysqlnd_protocol_com_statistics_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_statistics_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ zend_string ** message;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_statistics_run */
+static enum_func_status
+mysqlnd_com_statistics_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_statistics_command * command = (struct st_mysqlnd_protocol_com_statistics_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ zend_string **message = command->context.message;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_statistics_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_STATISTICS, NULL, 0, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ if (PASS == ret) {
+ MYSQLND_PACKET_STATS * stats_header = conn->payload_decoder_factory->m.get_stats_packet(conn->payload_decoder_factory, FALSE);
+ if (!stats_header) {
+ SET_OOM_ERROR(conn->error_info);
+ } else {
+ if (PASS == (ret = PACKET_READ(stats_header))) {
+ /* will be freed by Zend, thus don't use the mnd_ allocator */
+ *message = zend_string_init(stats_header->message.s, stats_header->message.l, 0);
+ DBG_INF(ZSTR_VAL(*message));
+ }
+ PACKET_FREE(stats_header);
+ }
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_statistics_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_statistics_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_statistics_command * command;
+ DBG_ENTER("mysqlnd_com_statistics_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_statistics_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.message = va_arg(args, zend_string **);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_statistics_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+/************************** COM_PROCESS_KILL ******************************************/
+struct st_mysqlnd_protocol_com_process_kill_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_process_kill_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ unsigned int process_id;
+ zend_bool read_response;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_process_kill_run */
+enum_func_status
+mysqlnd_com_process_kill_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_process_kill_command * command = (struct st_mysqlnd_protocol_com_process_kill_command *) cmd;
+ zend_uchar buff[4];
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ zend_bool read_response = command->context.read_response;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_process_kill_run");
+ int4store(buff, command->context.process_id);
+
+ ret = send_command(conn->payload_decoder_factory, COM_PROCESS_KILL, buff, 4, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret && read_response) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_PROCESS_KILL, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+
+ if (read_response) {
+ /*
+ The server sends 0 but libmysql doesn't read it and has established
+ a protocol of giving back -1. Thus we have to follow it :(
+ */
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
+ } else if (PASS == ret) {
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
+ conn->m->send_close(conn);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_process_kill_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_process_kill_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_process_kill_command * command;
+ DBG_ENTER("mysqlnd_com_process_kill_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_process_kill_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.process_id = va_arg(args, unsigned int);
+ command->context.read_response = va_arg(args, unsigned int)? TRUE:FALSE;
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_process_kill_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+/************************** COM_REFRESH ******************************************/
+struct st_mysqlnd_protocol_com_refresh_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_refresh_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ uint8_t options;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_refresh_run */
+enum_func_status
+mysqlnd_com_refresh_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_refresh_command * command = (struct st_mysqlnd_protocol_com_refresh_command *) cmd;
+ zend_uchar bits[1];
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_refresh_run");
+ int1store(bits, command->context.options);
+
+ ret = send_command(conn->payload_decoder_factory, COM_REFRESH, bits, 1, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_REFRESH, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_refresh_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_refresh_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_refresh_command * command;
+ DBG_ENTER("mysqlnd_com_refresh_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_refresh_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.options = va_arg(args, unsigned int);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_refresh_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_SHUTDOWN ******************************************/
+struct st_mysqlnd_protocol_com_shutdown_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_shutdown_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ uint8_t level;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_shutdown_run */
+enum_func_status
+mysqlnd_com_shutdown_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_shutdown_command * command = (struct st_mysqlnd_protocol_com_shutdown_command *) cmd;
+ zend_uchar bits[1];
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_shutdown_run");
+ int1store(bits, command->context.level);
+
+ ret = send_command(conn->payload_decoder_factory, COM_SHUTDOWN, bits, 1, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_SHUTDOWN, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_shutdown_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_shutdown_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_shutdown_command * command;
+ DBG_ENTER("mysqlnd_com_shutdown_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_shutdown_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.level = va_arg(args, unsigned int);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_shutdown_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_QUIT ******************************************/
+struct st_mysqlnd_protocol_com_quit_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_quit_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_quit_run */
+enum_func_status
+mysqlnd_com_quit_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_quit_command * command = (struct st_mysqlnd_protocol_com_quit_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_quit_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_QUIT, NULL, 0, TRUE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_quit_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_quit_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_quit_command * command;
+ DBG_ENTER("mysqlnd_com_quit_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_quit_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_quit_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+/************************** COM_QUERY ******************************************/
+struct st_mysqlnd_protocol_com_query_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_query_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING query;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_query_run */
+static enum_func_status
+mysqlnd_com_query_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_query_command * command = (struct st_mysqlnd_protocol_com_query_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_query_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_QUERY, (zend_uchar*) command->context.query.s, command->context.query.l, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ if (PASS == ret) {
+ SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_query_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_query_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_query_command * command;
+ DBG_ENTER("mysqlnd_com_query_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_query_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.query = va_arg(args, MYSQLND_CSTRING);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_query_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+/************************** COM_CHANGE_USER ******************************************/
+struct st_mysqlnd_protocol_com_change_user_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_change_user_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING payload;
+ zend_bool silent;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_change_user_run */
+static enum_func_status
+mysqlnd_com_change_user_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_change_user_command * command = (struct st_mysqlnd_protocol_com_change_user_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_change_user_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_CHANGE_USER, (zend_uchar*) command->context.payload.s, command->context.payload.l, command->context.silent,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_change_user_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_change_user_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_change_user_command * command;
+ DBG_ENTER("mysqlnd_com_change_user_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_change_user_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.payload = va_arg(args, MYSQLND_CSTRING);
+ command->context.silent = va_arg(args, unsigned int);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_change_user_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_REAP_RESULT ******************************************/
+struct st_mysqlnd_protocol_com_reap_result_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_reap_result_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_reap_result_run */
+static enum_func_status
+mysqlnd_com_reap_result_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_reap_result_command * command = (struct st_mysqlnd_protocol_com_reap_result_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ const enum_mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state);
+
+ DBG_ENTER("mysqlnd_com_reap_result_run");
+ if (state <= CONN_READY || state == CONN_QUIT_SENT) {
+ php_error_docref(NULL, E_WARNING, "Connection not opened, clear or has been closed");
+ DBG_ERR_FMT("Connection not opened, clear or has been closed. State=%u", state);
+ DBG_RETURN(ret);
+ }
+ ret = conn->m->query_read_result_set_header(conn, NULL);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_reap_result_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_reap_result_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_reap_result_command * command;
+ DBG_ENTER("mysqlnd_com_reap_result_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_reap_result_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_reap_result_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STMT_PREPARE ******************************************/
+struct st_mysqlnd_protocol_com_stmt_prepare_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_stmt_prepare_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING query;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_stmt_prepare_run */
+static enum_func_status
+mysqlnd_com_stmt_prepare_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_stmt_prepare_command * command = (struct st_mysqlnd_protocol_com_stmt_prepare_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_stmt_prepare_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_STMT_PREPARE, (zend_uchar*) command->context.query.s, command->context.query.l, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_stmt_prepare_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_stmt_prepare_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_stmt_prepare_command * command;
+ DBG_ENTER("mysqlnd_com_stmt_prepare_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_stmt_prepare_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.query = va_arg(args, MYSQLND_CSTRING);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_stmt_prepare_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STMT_EXECUTE ******************************************/
+struct st_mysqlnd_protocol_com_stmt_execute_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_stmt_execute_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING payload;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_stmt_execute_run */
+static enum_func_status
+mysqlnd_com_stmt_execute_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_stmt_execute_command * command = (struct st_mysqlnd_protocol_com_stmt_execute_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_stmt_execute_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_STMT_EXECUTE, (zend_uchar*) command->context.payload.s, command->context.payload.l, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_stmt_execute_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_stmt_execute_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_stmt_execute_command * command;
+ DBG_ENTER("mysqlnd_com_stmt_execute_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_stmt_execute_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.payload = va_arg(args, MYSQLND_CSTRING);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_stmt_execute_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STMT_FETCH ******************************************/
+struct st_mysqlnd_protocol_com_stmt_fetch_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_stmt_fetch_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING payload;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_stmt_fetch_run */
+static enum_func_status
+mysqlnd_com_stmt_fetch_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_stmt_fetch_command * command = (struct st_mysqlnd_protocol_com_stmt_fetch_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_stmt_fetch_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_STMT_FETCH, (zend_uchar*) command->context.payload.s, command->context.payload.l, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_stmt_fetch_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_stmt_fetch_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_stmt_fetch_command * command;
+ DBG_ENTER("mysqlnd_com_stmt_fetch_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_stmt_fetch_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.payload = va_arg(args, MYSQLND_CSTRING);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_stmt_fetch_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STMT_RESET ******************************************/
+struct st_mysqlnd_protocol_com_stmt_reset_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_stmt_reset_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ zend_ulong stmt_id;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_stmt_reset_run */
+static enum_func_status
+mysqlnd_com_stmt_reset_run(void *cmd)
+{
+ zend_uchar cmd_buf[MYSQLND_STMT_ID_LENGTH /* statement id */];
+ struct st_mysqlnd_protocol_com_stmt_reset_command * command = (struct st_mysqlnd_protocol_com_stmt_reset_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response = conn->payload_decoder_factory->m.send_command_handle_response;
+
+ DBG_ENTER("mysqlnd_com_stmt_reset_run");
+
+ int4store(cmd_buf, command->context.stmt_id);
+ ret = send_command(conn->payload_decoder_factory, COM_STMT_RESET, cmd_buf, sizeof(cmd_buf), FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+ if (PASS == ret) {
+ ret = send_command_handle_response(conn->payload_decoder_factory, PROT_OK_PACKET, FALSE, COM_STMT_RESET, TRUE,
+ conn->error_info, conn->upsert_status, &conn->last_message, conn->persistent);
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_stmt_reset_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_stmt_reset_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_stmt_reset_command * command;
+ DBG_ENTER("mysqlnd_com_stmt_reset_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_stmt_reset_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.stmt_id = va_arg(args, size_t);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_stmt_reset_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STMT_SEND_LONG_DATA ******************************************/
+struct st_mysqlnd_protocol_com_stmt_send_long_data_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_stmt_send_long_data_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING payload;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_stmt_send_long_data_run */
+static enum_func_status
+mysqlnd_com_stmt_send_long_data_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_stmt_send_long_data_command * command = (struct st_mysqlnd_protocol_com_stmt_send_long_data_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_stmt_send_long_data_run");
+
+ ret = send_command(conn->payload_decoder_factory, COM_STMT_SEND_LONG_DATA, (zend_uchar*) command->context.payload.s, command->context.payload.l, FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_stmt_send_long_data_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_stmt_send_long_data_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_stmt_send_long_data_command * command;
+ DBG_ENTER("mysqlnd_com_stmt_send_long_data_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_stmt_send_long_data_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.payload = va_arg(args, MYSQLND_CSTRING);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_stmt_send_long_data_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+/************************** COM_STMT_CLOSE ******************************************/
+struct st_mysqlnd_protocol_com_stmt_close_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_stmt_close_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ zend_ulong stmt_id;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_stmt_close_run */
+static enum_func_status
+mysqlnd_com_stmt_close_run(void *cmd)
+{
+ zend_uchar cmd_buf[MYSQLND_STMT_ID_LENGTH /* statement id */];
+ struct st_mysqlnd_protocol_com_stmt_close_command * command = (struct st_mysqlnd_protocol_com_stmt_close_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command = conn->payload_decoder_factory->m.send_command;
+
+ DBG_ENTER("mysqlnd_com_stmt_close_run");
+
+ int4store(cmd_buf, command->context.stmt_id);
+ ret = send_command(conn->payload_decoder_factory, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf), FALSE,
+ &conn->state,
+ conn->error_info,
+ conn->upsert_status,
+ conn->stats,
+ conn->m->send_close,
+ conn);
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_stmt_close_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_stmt_close_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_stmt_close_command * command;
+ DBG_ENTER("mysqlnd_com_stmt_close_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_stmt_close_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.stmt_id = va_arg(args, size_t);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_stmt_close_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+
+/************************** COM_ENABLE_SSL ******************************************/
+struct st_mysqlnd_protocol_com_enable_ssl_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_enable_ssl_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ size_t client_capabilities;
+ size_t server_capabilities;
+ unsigned int charset_no;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_enable_ssl_run */
+static enum_func_status
+mysqlnd_com_enable_ssl_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_enable_ssl_command * command = (struct st_mysqlnd_protocol_com_enable_ssl_command *) cmd;
+ enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ MYSQLND_PACKET_AUTH * auth_packet;
+ size_t client_capabilities = command->context.client_capabilities;
+ size_t server_capabilities = command->context.server_capabilities;
+
+ DBG_ENTER("mysqlnd_com_enable_ssl_run");
+ DBG_INF_FMT("client_capability_flags=%lu", client_capabilities);
+ DBG_INF_FMT("CLIENT_LONG_PASSWORD= %d", client_capabilities & CLIENT_LONG_PASSWORD? 1:0);
+ DBG_INF_FMT("CLIENT_FOUND_ROWS= %d", client_capabilities & CLIENT_FOUND_ROWS? 1:0);
+ DBG_INF_FMT("CLIENT_LONG_FLAG= %d", client_capabilities & CLIENT_LONG_FLAG? 1:0);
+ DBG_INF_FMT("CLIENT_NO_SCHEMA= %d", client_capabilities & CLIENT_NO_SCHEMA? 1:0);
+ DBG_INF_FMT("CLIENT_COMPRESS= %d", client_capabilities & CLIENT_COMPRESS? 1:0);
+ DBG_INF_FMT("CLIENT_ODBC= %d", client_capabilities & CLIENT_ODBC? 1:0);
+ DBG_INF_FMT("CLIENT_LOCAL_FILES= %d", client_capabilities & CLIENT_LOCAL_FILES? 1:0);
+ DBG_INF_FMT("CLIENT_IGNORE_SPACE= %d", client_capabilities & CLIENT_IGNORE_SPACE? 1:0);
+ DBG_INF_FMT("CLIENT_PROTOCOL_41= %d", client_capabilities & CLIENT_PROTOCOL_41? 1:0);
+ DBG_INF_FMT("CLIENT_INTERACTIVE= %d", client_capabilities & CLIENT_INTERACTIVE? 1:0);
+ DBG_INF_FMT("CLIENT_SSL= %d", client_capabilities & CLIENT_SSL? 1:0);
+ DBG_INF_FMT("CLIENT_IGNORE_SIGPIPE= %d", client_capabilities & CLIENT_IGNORE_SIGPIPE? 1:0);
+ DBG_INF_FMT("CLIENT_TRANSACTIONS= %d", client_capabilities & CLIENT_TRANSACTIONS? 1:0);
+ DBG_INF_FMT("CLIENT_RESERVED= %d", client_capabilities & CLIENT_RESERVED? 1:0);
+ DBG_INF_FMT("CLIENT_SECURE_CONNECTION=%d", client_capabilities & CLIENT_SECURE_CONNECTION? 1:0);
+ DBG_INF_FMT("CLIENT_MULTI_STATEMENTS=%d", client_capabilities & CLIENT_MULTI_STATEMENTS? 1:0);
+ DBG_INF_FMT("CLIENT_MULTI_RESULTS= %d", client_capabilities & CLIENT_MULTI_RESULTS? 1:0);
+ DBG_INF_FMT("CLIENT_PS_MULTI_RESULTS=%d", client_capabilities & CLIENT_PS_MULTI_RESULTS? 1:0);
+ DBG_INF_FMT("CLIENT_CONNECT_ATTRS= %d", client_capabilities & CLIENT_PLUGIN_AUTH? 1:0);
+ DBG_INF_FMT("CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA= %d", client_capabilities & CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA? 1:0);
+ DBG_INF_FMT("CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS= %d", client_capabilities & CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS? 1:0);
+ DBG_INF_FMT("CLIENT_SESSION_TRACK= %d", client_capabilities & CLIENT_SESSION_TRACK? 1:0);
+ DBG_INF_FMT("CLIENT_SSL_VERIFY_SERVER_CERT= %d", client_capabilities & CLIENT_SSL_VERIFY_SERVER_CERT? 1:0);
+ DBG_INF_FMT("CLIENT_REMEMBER_OPTIONS= %d", client_capabilities & CLIENT_REMEMBER_OPTIONS? 1:0);
+
+ auth_packet = conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
+ if (!auth_packet) {
+ SET_OOM_ERROR(conn->error_info);
+ goto end;
+ }
+ auth_packet->client_flags = client_capabilities;
+ auth_packet->max_packet_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE;
+
+ auth_packet->charset_no = command->context.charset_no;
+
+#ifdef MYSQLND_SSL_SUPPORTED
+ if (client_capabilities & CLIENT_SSL) {
+ const zend_bool server_has_ssl = (server_capabilities & CLIENT_SSL)? TRUE:FALSE;
+ if (server_has_ssl == FALSE) {
+ goto close_conn;
+ } else {
+ enum mysqlnd_ssl_peer verify = client_capabilities & CLIENT_SSL_VERIFY_SERVER_CERT?
+ MYSQLND_SSL_PEER_VERIFY:
+ (client_capabilities & CLIENT_SSL_DONT_VERIFY_SERVER_CERT?
+ MYSQLND_SSL_PEER_DONT_VERIFY:
+ MYSQLND_SSL_PEER_DEFAULT);
+ DBG_INF("Switching to SSL");
+ if (!PACKET_WRITE(auth_packet)) {
+ goto close_conn;
+ }
+
+ conn->vio->data->m.set_client_option(conn->vio, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &verify);
+
+ if (FAIL == conn->vio->data->m.enable_ssl(conn->vio)) {
+ goto end;
+ }
+ }
+ }
+#else
+ auth_packet->client_flags &= ~CLIENT_SSL;
+ if (!PACKET_WRITE(auth_packet)) {
+ goto close_conn;
+ }
+#endif
+ ret = PASS;
+end:
+ PACKET_FREE(auth_packet);
+ DBG_RETURN(ret);
+
+close_conn:
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
+ conn->m->send_close(conn);
+ SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ PACKET_FREE(auth_packet);
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_enable_ssl_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_enable_ssl_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_enable_ssl_command * command;
+ DBG_ENTER("mysqlnd_com_enable_ssl_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_enable_ssl_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.client_capabilities = va_arg(args, size_t);
+ command->context.server_capabilities = va_arg(args, size_t);
+ command->context.charset_no = va_arg(args, unsigned int);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_enable_ssl_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+/************************** COM_READ_HANDSHAKE ******************************************/
+struct st_mysqlnd_protocol_com_handshake_command
+{
+ struct st_mysqlnd_protocol_command parent;
+ struct st_mysqlnd_com_handshake_context
+ {
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_CSTRING user;
+ MYSQLND_CSTRING passwd;
+ MYSQLND_CSTRING database;
+ size_t client_flags;
+ } context;
+};
+
+
+/* {{{ mysqlnd_com_handshake_run */
+static enum_func_status
+mysqlnd_com_handshake_run(void *cmd)
+{
+ struct st_mysqlnd_protocol_com_handshake_command * command = (struct st_mysqlnd_protocol_com_handshake_command *) cmd;
+ const char * user = command->context.user.s;
+
+ const char * passwd = command->context.passwd.s;
+ size_t passwd_len = command->context.passwd.l;
+
+ const char * db = command->context.database.s;
+ size_t db_len = command->context.database.l;
+
+ size_t mysql_flags = command->context.client_flags;
+
+ MYSQLND_CONN_DATA * conn = command->context.conn;
+ MYSQLND_PACKET_GREET * greet_packet;
+
+ DBG_ENTER("mysqlnd_conn_data::connect_handshake");
+ DBG_INF_FMT("stream=%p", conn->vio->data->m.get_stream(conn->vio));
+ DBG_INF_FMT("[user=%s] [db=%s:%d] [flags=%llu]", user, db, db_len, mysql_flags);
+
+ greet_packet = conn->payload_decoder_factory->m.get_greet_packet(conn->payload_decoder_factory, FALSE);
+ if (!greet_packet) {
+ SET_OOM_ERROR(conn->error_info);
+ DBG_RETURN(FAIL); /* OOM */
+ }
+
+ if (FAIL == PACKET_READ(greet_packet)) {
+ DBG_ERR("Error while reading greeting packet");
+ php_error_docref(NULL, E_WARNING, "Error while reading greeting packet. PID=%d", getpid());
+ goto err;
+ } else if (greet_packet->error_no) {
+ DBG_ERR_FMT("errorno=%u error=%s", greet_packet->error_no, greet_packet->error);
+ SET_CLIENT_ERROR(conn->error_info, greet_packet->error_no, greet_packet->sqlstate, greet_packet->error);
+ goto err;
+ } else if (greet_packet->pre41) {
+ DBG_ERR_FMT("Connecting to 3.22, 3.23 & 4.0 is not supported. Server is %-.32s", greet_packet->server_version);
+ php_error_docref(NULL, E_WARNING, "Connecting to 3.22, 3.23 & 4.0 "
+ " is not supported. Server is %-.32s", greet_packet->server_version);
+ SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
+ "Connecting to 3.22, 3.23 & 4.0 servers is not supported");
+ goto err;
+ }
+
+ conn->thread_id = greet_packet->thread_id;
+ conn->protocol_version = greet_packet->protocol_version;
+ conn->server_version = mnd_pestrdup(greet_packet->server_version, conn->persistent);
+
+ conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
+ if (!conn->greet_charset) {
+ php_error_docref(NULL, E_WARNING,
+ "Server sent charset (%d) unknown to the client. Please, report to the developers", greet_packet->charset_no);
+ SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
+ "Server sent charset unknown to the client. Please, report to the developers");
+ goto err;
+ }
+
+ conn->server_capabilities = greet_packet->server_capabilities;
+
+ if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len,
+ greet_packet->authentication_plugin_data, greet_packet->auth_protocol,
+ greet_packet->charset_no, greet_packet->server_capabilities,
+ conn->options, mysql_flags))
+ {
+ goto err;
+ }
+
+ UPSERT_STATUS_RESET(conn->upsert_status);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, greet_packet->server_status);
+
+ PACKET_FREE(greet_packet);
+ DBG_RETURN(PASS);
+err:
+ conn->server_capabilities = 0;
+ PACKET_FREE(greet_packet);
+ DBG_RETURN(FAIL);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_com_handshake_create_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_com_handshake_create_command(va_list args)
+{
+ struct st_mysqlnd_protocol_com_handshake_command * command;
+ DBG_ENTER("mysqlnd_com_handshake_create_command");
+ command = mnd_ecalloc(1, sizeof(struct st_mysqlnd_protocol_com_handshake_command));
+ if (command) {
+ command->context.conn = va_arg(args, MYSQLND_CONN_DATA *);
+ command->context.user = *va_arg(args, const MYSQLND_CSTRING *);
+ command->context.passwd = *va_arg(args, const MYSQLND_CSTRING *);
+ command->context.database = *va_arg(args, const MYSQLND_CSTRING *);
+ command->context.client_flags = va_arg(args, size_t);
+
+ command->parent.free_command = mysqlnd_com_no_params_free_command;
+ command->parent.run = mysqlnd_com_handshake_run;
+ }
+
+ DBG_RETURN((struct st_mysqlnd_protocol_command *) command);
+}
+/* }}} */
+
+
+
+/* {{{ mysqlnd_get_command */
+static struct st_mysqlnd_protocol_command *
+mysqlnd_get_command(enum php_mysqlnd_server_command command, ...)
+{
+ struct st_mysqlnd_protocol_command * ret;
+ va_list args;
+ DBG_ENTER("mysqlnd_get_command");
+
+ va_start(args, command);
+ switch (command) {
+ case COM_SET_OPTION:
+ ret = mysqlnd_com_set_option_create_command(args);
+ break;
+ case COM_DEBUG:
+ ret = mysqlnd_com_debug_create_command(args);
+ break;
+ case COM_INIT_DB:
+ ret = mysqlnd_com_init_db_create_command(args);
+ break;
+ case COM_PING:
+ ret = mysqlnd_com_ping_create_command(args);
+ break;
+ case COM_STATISTICS:
+ ret = mysqlnd_com_statistics_create_command(args);
+ break;
+ case COM_PROCESS_KILL:
+ ret = mysqlnd_com_process_kill_create_command(args);
+ break;
+ case COM_REFRESH:
+ ret = mysqlnd_com_refresh_create_command(args);
+ break;
+ case COM_SHUTDOWN:
+ ret = mysqlnd_com_shutdown_create_command(args);
+ break;
+ case COM_QUIT:
+ ret = mysqlnd_com_quit_create_command(args);
+ break;
+ case COM_QUERY:
+ ret = mysqlnd_com_query_create_command(args);
+ break;
+ case COM_REAP_RESULT:
+ ret = mysqlnd_com_reap_result_create_command(args);
+ break;
+ case COM_CHANGE_USER:
+ ret = mysqlnd_com_change_user_create_command(args);
+ break;
+ case COM_STMT_PREPARE:
+ ret = mysqlnd_com_stmt_prepare_create_command(args);
+ break;
+ case COM_STMT_EXECUTE:
+ ret = mysqlnd_com_stmt_execute_create_command(args);
+ break;
+ case COM_STMT_FETCH:
+ ret = mysqlnd_com_stmt_fetch_create_command(args);
+ break;
+ case COM_STMT_RESET:
+ ret = mysqlnd_com_stmt_reset_create_command(args);
+ break;
+ case COM_STMT_SEND_LONG_DATA:
+ ret = mysqlnd_com_stmt_send_long_data_create_command(args);
+ break;
+ case COM_STMT_CLOSE:
+ ret = mysqlnd_com_stmt_close_create_command(args);
+ break;
+ case COM_ENABLE_SSL:
+ ret = mysqlnd_com_enable_ssl_create_command(args);
+ break;
+ case COM_HANDSHAKE:
+ ret = mysqlnd_com_handshake_create_command(args);
+ break;
+ default:
+ break;
+ }
+ va_end(args);
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+func_mysqlnd__command_factory mysqlnd_command_factory = mysqlnd_get_command;
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_commands.h b/ext/mysqlnd/mysqlnd_commands.h
new file mode 100644
index 0000000000..0df83a91a7
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_commands.h
@@ -0,0 +1,34 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_COMMANDS_H
+#define MYSQLND_COMMANDS_H
+
+extern func_mysqlnd__command_factory mysqlnd_command_factory;
+
+#endif /* MYSQLND_COMMANDS_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd_connection.c
index 0a81d0bb96..bb582dbf6a 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,57 +12,220 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
#include "mysqlnd.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_vio.h"
+#include "mysqlnd_protocol_frame_codec.h"
+#include "mysqlnd_auth.h"
#include "mysqlnd_wireprotocol.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_result.h"
#include "mysqlnd_statistics.h"
#include "mysqlnd_charset.h"
#include "mysqlnd_debug.h"
+#include "mysqlnd_ext_plugin.h"
#include "zend_smart_str.h"
-/*
- TODO :
- - Don't bind so tightly the metadata with the result set. This means
- that the metadata reading should not expect a MYSQLND_RES pointer, it
- does not need it, but return a pointer to the metadata (MYSQLND_FIELD *).
- For normal statements we will then just assign it to a member of
- MYSQLND_RES. For PS statements, it will stay as part of the statement
- (MYSQLND_STMT) between prepare and execute. At execute the new metadata
- will be sent by the server, so we will discard the old one and then
- finally attach it to the result set. This will make the code more clean,
- as a prepared statement won't have anymore stmt->result != NULL, as it
- is now, just to have where to store the metadata.
-
- - Change mysqlnd_simple_command to accept a heap dynamic array of MYSQLND_STRING
- terminated by a string with ptr being NULL. Thus, multi-part messages can be
- sent to the network like writev() and this can save at least for
- mysqlnd_stmt_send_long_data() new malloc. This change will probably make the
- code in few other places cleaner.
-*/
extern MYSQLND_CHARSET *mysqlnd_charsets;
-
-
-PHPAPI const char * const mysqlnd_old_passwd = "mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. "
-"Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will "
-"store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords "
-"flag from your my.cnf file";
-
PHPAPI const char * const mysqlnd_server_gone = "MySQL server has gone away";
PHPAPI const char * const mysqlnd_out_of_sync = "Commands out of sync; you can't run this command now";
PHPAPI const char * const mysqlnd_out_of_memory = "Out of memory";
-PHPAPI MYSQLND_STATS *mysqlnd_global_stats = NULL;
+PHPAPI MYSQLND_STATS * mysqlnd_global_stats = NULL;
+
+
+/* {{{ mysqlnd_upsert_status::reset */
+void
+MYSQLND_METHOD(mysqlnd_upsert_status, reset)(MYSQLND_UPSERT_STATUS * const upsert_status)
+{
+ upsert_status->warning_count = 0;
+ upsert_status->server_status = 0;
+ upsert_status->affected_rows = 0;
+ upsert_status->last_insert_id = 0;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_upsert_status::set_affected_rows_to_error */
+void
+MYSQLND_METHOD(mysqlnd_upsert_status, set_affected_rows_to_error)(MYSQLND_UPSERT_STATUS * upsert_status)
+{
+ upsert_status->affected_rows = (uint64_t) ~0;
+}
+/* }}} */
+
+
+MYSQLND_CLASS_METHODS_START(mysqlnd_upsert_status)
+ MYSQLND_METHOD(mysqlnd_upsert_status, reset),
+ MYSQLND_METHOD(mysqlnd_upsert_status, set_affected_rows_to_error),
+MYSQLND_CLASS_METHODS_END;
+
+
+/* {{{ mysqlnd_upsert_status_init */
+void
+mysqlnd_upsert_status_init(MYSQLND_UPSERT_STATUS * const upsert_status)
+{
+ upsert_status->m = &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_upsert_status);
+ upsert_status->m->reset(upsert_status);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_error_list_pdtor */
+static void
+mysqlnd_error_list_pdtor(void * pDest)
+{
+ MYSQLND_ERROR_LIST_ELEMENT * element = (MYSQLND_ERROR_LIST_ELEMENT *) pDest;
+
+ DBG_ENTER("mysqlnd_error_list_pdtor");
+ if (element->error) {
+ mnd_pefree(element->error, TRUE);
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_error_info::reset */
+static void
+MYSQLND_METHOD(mysqlnd_error_info, reset)(MYSQLND_ERROR_INFO * const info)
+{
+ DBG_ENTER("mysqlnd_error_info::reset");
+
+ info->error_no = 0;
+ info->error[0] = '\0';
+ memset(info->sqlstate, 0, sizeof(info->sqlstate));
+ if (info->error_list) {
+ zend_llist_clean(info->error_list);
+ }
+
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_error_info::set_client_error */
+static void
+MYSQLND_METHOD(mysqlnd_error_info, set_client_error)(MYSQLND_ERROR_INFO * const info,
+ const unsigned int err_no,
+ const char * const sqlstate,
+ const char * const error)
+{
+ DBG_ENTER("mysqlnd_error_info::set_client_error");
+ if (err_no) {
+ info->error_no = err_no;
+ strlcpy(info->sqlstate, sqlstate, sizeof(info->sqlstate));
+ strlcpy(info->error, error, sizeof(info->error));
+ if (info->error_list) {
+ MYSQLND_ERROR_LIST_ELEMENT error_for_the_list = {0};
+
+ error_for_the_list.error_no = err_no;
+ strlcpy(error_for_the_list.sqlstate, sqlstate, sizeof(error_for_the_list.sqlstate));
+ error_for_the_list.error = mnd_pestrdup(error, TRUE);
+ if (error_for_the_list.error) {
+ DBG_INF_FMT("adding error [%s] to the list", error_for_the_list.error);
+ zend_llist_add_element(info->error_list, &error_for_the_list);
+ }
+ }
+ } else {
+ info->m->reset(info);
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+MYSQLND_CLASS_METHODS_START(mysqlnd_error_info)
+ MYSQLND_METHOD(mysqlnd_error_info, reset),
+ MYSQLND_METHOD(mysqlnd_error_info, set_client_error),
+MYSQLND_CLASS_METHODS_END;
+
+
+
+/* {{{ mysqlnd_error_info_init */
+PHPAPI enum_func_status
+mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const zend_bool persistent)
+{
+ DBG_ENTER("mysqlnd_error_info_init");
+ info->m = mysqlnd_error_info_get_methods();
+ info->m->reset(info);
+
+ info->error_list = mnd_pecalloc(1, sizeof(zend_llist), persistent);
+ if (info->error_list) {
+ zend_llist_init(info->error_list, sizeof(MYSQLND_ERROR_LIST_ELEMENT), (llist_dtor_func_t) mysqlnd_error_list_pdtor, persistent);
+ }
+ info->persistent = persistent;
+ DBG_RETURN(info->error_list? PASS:FAIL);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_error_info_free_contents */
+PHPAPI void
+mysqlnd_error_info_free_contents(MYSQLND_ERROR_INFO * const info)
+{
+ DBG_ENTER("mysqlnd_error_info_free_contents");
+ info->m->reset(info);
+ if (info->error_list) {
+ mnd_pefree(info->error_list, info->persistent);
+ info->error_list = NULL;
+ }
+
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+
+
+/* {{{ mysqlnd_connection_state::get */
+static enum mysqlnd_connection_state
+MYSQLND_METHOD(mysqlnd_connection_state, get)(const struct st_mysqlnd_connection_state * const state_struct)
+{
+ DBG_ENTER("mysqlnd_connection_state::get");
+ DBG_INF_FMT("State=%u", state_struct->state);
+ DBG_RETURN(state_struct->state);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_connection_state::set */
+static void
+MYSQLND_METHOD(mysqlnd_connection_state, set)(struct st_mysqlnd_connection_state * const state_struct, const enum mysqlnd_connection_state state)
+{
+ DBG_ENTER("mysqlnd_connection_state::set");
+ DBG_INF_FMT("New state=%u", state);
+ state_struct->state = state;
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+MYSQLND_CLASS_METHODS_START(mysqlnd_connection_state)
+ MYSQLND_METHOD(mysqlnd_connection_state, get),
+ MYSQLND_METHOD(mysqlnd_connection_state, set),
+MYSQLND_CLASS_METHODS_END;
+
+
+/* {{{ mysqlnd_upsert_status_init */
+PHPAPI void
+mysqlnd_connection_state_init(struct st_mysqlnd_connection_state * const state)
+{
+ DBG_ENTER("mysqlnd_error_info_init");
+ state->m = &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_connection_state);
+ state->state = CONN_ALLOCED;
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
/* {{{ mysqlnd_conn_data::free_options */
@@ -118,36 +281,40 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn)
conn->current_result = NULL;
}
- if (conn->net) {
- conn->net->data->m.free_contents(conn->net);
+ if (conn->protocol_frame_codec) {
+ conn->protocol_frame_codec->data->m.free_contents(conn->protocol_frame_codec);
+ }
+
+ if (conn->vio) {
+ conn->vio->data->m.free_contents(conn->vio);
}
DBG_INF("Freeing memory of members");
- if (conn->host) {
- mnd_pefree(conn->host, pers);
- conn->host = NULL;
+ if (conn->hostname.s) {
+ mnd_pefree(conn->hostname.s, pers);
+ conn->hostname.s = NULL;
}
- if (conn->user) {
- mnd_pefree(conn->user, pers);
- conn->user = NULL;
+ if (conn->username.s) {
+ mnd_pefree(conn->username.s, pers);
+ conn->username.s = NULL;
}
- if (conn->passwd) {
- mnd_pefree(conn->passwd, pers);
- conn->passwd = NULL;
+ if (conn->password.s) {
+ mnd_pefree(conn->password.s, pers);
+ conn->password.s = NULL;
}
- if (conn->connect_or_select_db) {
- mnd_pefree(conn->connect_or_select_db, pers);
- conn->connect_or_select_db = NULL;
+ if (conn->connect_or_select_db.s) {
+ mnd_pefree(conn->connect_or_select_db.s, pers);
+ conn->connect_or_select_db.s = NULL;
}
- if (conn->unix_socket) {
- mnd_pefree(conn->unix_socket, pers);
- conn->unix_socket = NULL;
+ if (conn->unix_socket.s) {
+ mnd_pefree(conn->unix_socket.s, pers);
+ conn->unix_socket.s = NULL;
}
- DBG_INF_FMT("scheme=%s", conn->scheme);
- if (conn->scheme) {
- mnd_pefree(conn->scheme, pers);
- conn->scheme = NULL;
+ DBG_INF_FMT("scheme=%s", conn->scheme.s);
+ if (conn->scheme.s) {
+ mnd_pefree(conn->scheme.s, pers);
+ conn->scheme.s = NULL;
}
if (conn->server_version) {
mnd_pefree(conn->server_version, pers);
@@ -157,19 +324,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, free_contents)(MYSQLND_CONN_DATA * conn)
mnd_pefree(conn->host_info, pers);
conn->host_info = NULL;
}
- if (conn->auth_plugin_data) {
- mnd_pefree(conn->auth_plugin_data, pers);
- conn->auth_plugin_data = NULL;
- }
- if (conn->last_message) {
- mnd_pefree(conn->last_message, pers);
- conn->last_message = NULL;
+ if (conn->authentication_plugin_data.s) {
+ mnd_pefree(conn->authentication_plugin_data.s, pers);
+ conn->authentication_plugin_data.s = NULL;
}
- if (conn->error_info->error_list) {
- zend_llist_clean(conn->error_info->error_list);
- mnd_pefree(conn->error_info->error_list, pers);
- conn->error_info->error_list = NULL;
+ if (conn->last_message.s) {
+ mnd_pefree(conn->last_message.s, pers);
+ conn->last_message.s = NULL;
}
+
conn->charset = NULL;
conn->greet_charset = NULL;
@@ -188,202 +351,33 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, dtor)(MYSQLND_CONN_DATA * conn)
conn->m->free_contents(conn);
conn->m->free_options(conn);
- if (conn->net) {
- mysqlnd_net_free(conn->net, conn->stats, conn->error_info);
- conn->net = NULL;
+ if (conn->error_info) {
+ mysqlnd_error_info_free_contents(conn->error_info);
+ conn->error_info = NULL;
}
- if (conn->protocol) {
- mysqlnd_protocol_free(conn->protocol);
- conn->protocol = NULL;
+ if (conn->protocol_frame_codec) {
+ mysqlnd_pfc_free(conn->protocol_frame_codec, conn->stats, conn->error_info);
+ conn->protocol_frame_codec = NULL;
}
- if (conn->stats) {
- mysqlnd_stats_end(conn->stats);
+ if (conn->vio) {
+ mysqlnd_vio_free(conn->vio, conn->stats, conn->error_info);
+ conn->vio = NULL;
}
- mnd_pefree(conn, conn->persistent);
-
- DBG_VOID_RETURN;
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_conn_data::simple_command_handle_response */
-static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, simple_command_handle_response)(MYSQLND_CONN_DATA * conn, enum mysqlnd_packet_type ok_packet,
- zend_bool silent, enum php_mysqlnd_server_command command,
- zend_bool ignore_upsert_status)
-{
- enum_func_status ret = FAIL;
-
- DBG_ENTER("mysqlnd_conn_data::simple_command_handle_response");
- DBG_INF_FMT("silent=%u packet=%u command=%s", silent, ok_packet, mysqlnd_command_to_text[command]);
-
- switch (ok_packet) {
- case PROT_OK_PACKET:{
- MYSQLND_PACKET_OK * ok_response = conn->protocol->m.get_ok_packet(conn->protocol, FALSE);
- if (!ok_response) {
- SET_OOM_ERROR(*conn->error_info);
- break;
- }
- if (FAIL == (ret = PACKET_READ(ok_response, conn))) {
- if (!silent) {
- DBG_ERR_FMT("Error while reading %s's OK packet", mysqlnd_command_to_text[command]);
- php_error_docref(NULL, E_WARNING, "Error while reading %s's OK packet. PID=%u",
- mysqlnd_command_to_text[command], getpid());
- }
- } else {
- DBG_INF_FMT("OK from server");
- if (0xFF == ok_response->field_count) {
- /* The server signalled error. Set the error */
- SET_CLIENT_ERROR(*conn->error_info, ok_response->error_no, ok_response->sqlstate, ok_response->error);
- ret = FAIL;
- /*
- Cover a protocol design error: error packet does not
- contain the server status. Therefore, the client has no way
- to find out whether there are more result sets of
- a multiple-result-set statement pending. Luckily, in 5.0 an
- error always aborts execution of a statement, wherever it is
- a multi-statement or a stored procedure, so it should be
- safe to unconditionally turn off the flag here.
- */
- conn->upsert_status->server_status &= ~SERVER_MORE_RESULTS_EXISTS;
- SET_ERROR_AFF_ROWS(conn);
- } else {
- SET_NEW_MESSAGE(conn->last_message, conn->last_message_len,
- ok_response->message, ok_response->message_len,
- conn->persistent);
-
- if (!ignore_upsert_status) {
- memset(conn->upsert_status, 0, sizeof(*conn->upsert_status));
- conn->upsert_status->warning_count = ok_response->warning_count;
- conn->upsert_status->server_status = ok_response->server_status;
- conn->upsert_status->affected_rows = ok_response->affected_rows;
- conn->upsert_status->last_insert_id = ok_response->last_insert_id;
- }
- }
- }
- PACKET_FREE(ok_response);
- break;
- }
- case PROT_EOF_PACKET:{
- MYSQLND_PACKET_EOF * ok_response = conn->protocol->m.get_eof_packet(conn->protocol, FALSE);
- if (!ok_response) {
- SET_OOM_ERROR(*conn->error_info);
- break;
- }
- if (FAIL == (ret = PACKET_READ(ok_response, conn))) {
- SET_CLIENT_ERROR(*conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE,
- "Malformed packet");
- if (!silent) {
- DBG_ERR_FMT("Error while reading %s's EOF packet", mysqlnd_command_to_text[command]);
- php_error_docref(NULL, E_WARNING, "Error while reading %s's EOF packet. PID=%d",
- mysqlnd_command_to_text[command], getpid());
- }
- } else if (0xFF == ok_response->field_count) {
- /* The server signalled error. Set the error */
- SET_CLIENT_ERROR(*conn->error_info, ok_response->error_no, ok_response->sqlstate, ok_response->error);
- SET_ERROR_AFF_ROWS(conn);
- } else if (0xFE != ok_response->field_count) {
- SET_CLIENT_ERROR(*conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
- if (!silent) {
- DBG_ERR_FMT("EOF packet expected, field count wasn't 0xFE but 0x%2X", ok_response->field_count);
- php_error_docref(NULL, E_WARNING, "EOF packet expected, field count wasn't 0xFE but 0x%2X",
- ok_response->field_count);
- }
- } else {
- DBG_INF_FMT("OK from server");
- }
- PACKET_FREE(ok_response);
- break;
- }
- default:
- SET_CLIENT_ERROR(*conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
- php_error_docref(NULL, E_ERROR, "Wrong response packet %u passed to the function", ok_packet);
- break;
- }
- DBG_INF(ret == PASS ? "PASS":"FAIL");
- DBG_RETURN(ret);
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_conn_data::simple_command_send_request */
-static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
- const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status)
-{
- enum_func_status ret = PASS;
- MYSQLND_PACKET_COMMAND * cmd_packet;
-
- DBG_ENTER("mysqlnd_conn_data::simple_command_send_request");
- DBG_INF_FMT("command=%s silent=%u", mysqlnd_command_to_text[command], silent);
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
- DBG_INF_FMT("sending %u bytes", arg_len + 1); /* + 1 is for the command */
-
- switch (CONN_GET_STATE(conn)) {
- case CONN_READY:
- break;
- case CONN_QUIT_SENT:
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
- DBG_ERR("Server is gone");
- DBG_RETURN(FAIL);
- default:
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
- DBG_ERR_FMT("Command out of sync. State=%u", CONN_GET_STATE(conn));
- DBG_RETURN(FAIL);
- }
-
- SET_ERROR_AFF_ROWS(conn);
- SET_EMPTY_ERROR(*conn->error_info);
-
- cmd_packet = conn->protocol->m.get_command_packet(conn->protocol, FALSE);
- if (!cmd_packet) {
- SET_OOM_ERROR(*conn->error_info);
- DBG_RETURN(FAIL);
+ if (conn->payload_decoder_factory) {
+ mysqlnd_protocol_payload_decoder_factory_free(conn->payload_decoder_factory);
+ conn->payload_decoder_factory = NULL;
}
- cmd_packet->command = command;
- if (arg && arg_len) {
- cmd_packet->argument = arg;
- cmd_packet->arg_len = arg_len;
- }
-
- MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_COM_QUIT + command - 1 /* because of COM_SLEEP */ );
-
- if (! PACKET_WRITE(cmd_packet, conn)) {
- if (!silent) {
- DBG_ERR_FMT("Error while sending %s packet", mysqlnd_command_to_text[command]);
- php_error(E_WARNING, "Error while sending %s packet. PID=%d", mysqlnd_command_to_text[command], getpid());
- }
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
- conn->m->send_close(conn);
- DBG_ERR("Server is gone");
- ret = FAIL;
+ if (conn->stats) {
+ mysqlnd_stats_end(conn->stats, conn->persistent);
}
- PACKET_FREE(cmd_packet);
- DBG_RETURN(ret);
-}
-/* }}} */
+ mnd_pefree(conn, conn->persistent);
-/* {{{ mysqlnd_conn_data::simple_command */
-static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command,
- const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent,
- zend_bool ignore_upsert_status)
-{
- enum_func_status ret;
- DBG_ENTER("mysqlnd_conn_data::simple_command");
-
- ret = conn->m->simple_command_send_request(conn, command, arg, arg_len, silent, ignore_upsert_status);
- if (PASS == ret && ok_packet != PROT_LAST) {
- ret = conn->m->simple_command_handle_response(conn, ok_packet, silent, command, ignore_upsert_status);
- }
-
- DBG_INF(ret == PASS ? "PASS":"FAIL");
- DBG_RETURN(ret);
+ DBG_VOID_RETURN;
}
/* }}} */
@@ -392,14 +386,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, simple_command)(MYSQLND_CONN_DATA * conn, enum
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, set_server_option)(MYSQLND_CONN_DATA * const conn, enum_mysqlnd_server_option option)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, set_server_option);
- zend_uchar buffer[2];
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), set_server_option);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::set_server_option");
if (PASS == conn->m->local_tx_start(conn, this_func)) {
-
- int2store(buffer, (unsigned int) option);
- ret = conn->m->simple_command(conn, COM_SET_OPTION, buffer, sizeof(buffer), PROT_EOF_PACKET, FALSE, TRUE);
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_SET_OPTION, conn, option);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
conn->m->local_tx_end(conn, this_func, ret);
}
@@ -415,9 +410,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, restart_psession)(MYSQLND_CONN_DATA * conn)
DBG_ENTER("mysqlnd_conn_data::restart_psession");
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_CONNECT_REUSED);
/* Free here what should not be seen by the next script */
- if (conn->last_message) {
- mnd_pefree(conn->last_message, conn->persistent);
- conn->last_message = NULL;
+ if (conn->last_message.s) {
+ mnd_pefree(conn->last_message.s, conn->persistent);
+ conn->last_message.s = NULL;
}
DBG_RETURN(PASS);
}
@@ -434,84 +429,6 @@ MYSQLND_METHOD(mysqlnd_conn_data, end_psession)(MYSQLND_CONN_DATA * conn)
/* }}} */
-/* {{{ mysqlnd_switch_to_ssl_if_needed */
-static enum_func_status
-mysqlnd_switch_to_ssl_if_needed(
- MYSQLND_CONN_DATA * conn,
- const MYSQLND_PACKET_GREET * const greet_packet,
- const MYSQLND_OPTIONS * const options,
- zend_ulong mysql_flags)
-{
- enum_func_status ret = FAIL;
- const MYSQLND_CHARSET * charset;
- MYSQLND_PACKET_AUTH * auth_packet;
- DBG_ENTER("mysqlnd_switch_to_ssl_if_needed");
- DBG_INF_FMT("client_capability_flags=%lu", mysql_flags);
- DBG_INF_FMT("CLIENT_LONG_PASSWORD= %d", mysql_flags & CLIENT_LONG_PASSWORD? 1:0);
- DBG_INF_FMT("CLIENT_FOUND_ROWS= %d", mysql_flags & CLIENT_FOUND_ROWS? 1:0);
- DBG_INF_FMT("CLIENT_LONG_FLAG= %d", mysql_flags & CLIENT_LONG_FLAG? 1:0);
- DBG_INF_FMT("CLIENT_NO_SCHEMA= %d", mysql_flags & CLIENT_NO_SCHEMA? 1:0);
- DBG_INF_FMT("CLIENT_COMPRESS= %d", mysql_flags & CLIENT_COMPRESS? 1:0);
- DBG_INF_FMT("CLIENT_ODBC= %d", mysql_flags & CLIENT_ODBC? 1:0);
- DBG_INF_FMT("CLIENT_LOCAL_FILES= %d", mysql_flags & CLIENT_LOCAL_FILES? 1:0);
- DBG_INF_FMT("CLIENT_IGNORE_SPACE= %d", mysql_flags & CLIENT_IGNORE_SPACE? 1:0);
- DBG_INF_FMT("CLIENT_PROTOCOL_41= %d", mysql_flags & CLIENT_PROTOCOL_41? 1:0);
- DBG_INF_FMT("CLIENT_INTERACTIVE= %d", mysql_flags & CLIENT_INTERACTIVE? 1:0);
- DBG_INF_FMT("CLIENT_SSL= %d", mysql_flags & CLIENT_SSL? 1:0);
- DBG_INF_FMT("CLIENT_IGNORE_SIGPIPE= %d", mysql_flags & CLIENT_IGNORE_SIGPIPE? 1:0);
- DBG_INF_FMT("CLIENT_TRANSACTIONS= %d", mysql_flags & CLIENT_TRANSACTIONS? 1:0);
- DBG_INF_FMT("CLIENT_RESERVED= %d", mysql_flags & CLIENT_RESERVED? 1:0);
- DBG_INF_FMT("CLIENT_SECURE_CONNECTION=%d", mysql_flags & CLIENT_SECURE_CONNECTION? 1:0);
- DBG_INF_FMT("CLIENT_MULTI_STATEMENTS=%d", mysql_flags & CLIENT_MULTI_STATEMENTS? 1:0);
- DBG_INF_FMT("CLIENT_MULTI_RESULTS= %d", mysql_flags & CLIENT_MULTI_RESULTS? 1:0);
- DBG_INF_FMT("CLIENT_PS_MULTI_RESULTS=%d", mysql_flags & CLIENT_PS_MULTI_RESULTS? 1:0);
- DBG_INF_FMT("CLIENT_CONNECT_ATTRS= %d", mysql_flags & CLIENT_PLUGIN_AUTH? 1:0);
- DBG_INF_FMT("CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA= %d", mysql_flags & CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA? 1:0);
- DBG_INF_FMT("CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS= %d", mysql_flags & CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS? 1:0);
- DBG_INF_FMT("CLIENT_SESSION_TRACK= %d", mysql_flags & CLIENT_SESSION_TRACK? 1:0);
- DBG_INF_FMT("CLIENT_SSL_VERIFY_SERVER_CERT= %d", mysql_flags & CLIENT_SSL_VERIFY_SERVER_CERT? 1:0);
- DBG_INF_FMT("CLIENT_REMEMBER_OPTIONS= %d", mysql_flags & CLIENT_REMEMBER_OPTIONS? 1:0);
-
- auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE);
- if (!auth_packet) {
- SET_OOM_ERROR(*conn->error_info);
- goto end;
- }
- auth_packet->client_flags = mysql_flags;
- auth_packet->max_packet_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE;
-
- if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) {
- auth_packet->charset_no = charset->nr;
- } else {
- auth_packet->charset_no = greet_packet->charset_no;
- }
-
-#ifdef MYSQLND_SSL_SUPPORTED
- if ((greet_packet->server_capabilities & CLIENT_SSL) && (mysql_flags & CLIENT_SSL)) {
- zend_bool verify = mysql_flags & CLIENT_SSL_VERIFY_SERVER_CERT? TRUE:FALSE;
- DBG_INF("Switching to SSL");
- if (!PACKET_WRITE(auth_packet, conn)) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
- conn->m->send_close(conn);
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
- goto end;
- }
-
- conn->net->data->m.set_client_option(conn->net, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &verify);
-
- if (FAIL == conn->net->data->m.enable_ssl(conn->net)) {
- goto end;
- }
- }
-#endif
- ret = PASS;
-end:
- PACKET_FREE(auth_packet);
- DBG_RETURN(ret);
-}
-/* }}} */
-
-
/* {{{ mysqlnd_conn_data::fetch_auth_plugin_by_name */
static struct st_mysqlnd_authentication_plugin *
MYSQLND_METHOD(mysqlnd_conn_data, fetch_auth_plugin_by_name)(const char * const requested_protocol)
@@ -530,169 +447,6 @@ MYSQLND_METHOD(mysqlnd_conn_data, fetch_auth_plugin_by_name)(const char * const
/* }}} */
-/* {{{ mysqlnd_run_authentication */
-static enum_func_status
-mysqlnd_run_authentication(
- MYSQLND_CONN_DATA * conn,
- const char * const user,
- const char * const passwd,
- const size_t passwd_len,
- const char * const db,
- const size_t db_len,
- const zend_uchar * const auth_plugin_data,
- const size_t auth_plugin_data_len,
- const char * const auth_protocol,
- unsigned int charset_no,
- const MYSQLND_OPTIONS * const options,
- zend_ulong mysql_flags,
- zend_bool silent,
- zend_bool is_change_user
- )
-{
- enum_func_status ret = FAIL;
- zend_bool first_call = TRUE;
-
- char * switch_to_auth_protocol = NULL;
- size_t switch_to_auth_protocol_len = 0;
- char * requested_protocol = NULL;
- zend_uchar * plugin_data;
- size_t plugin_data_len;
-
- DBG_ENTER("mysqlnd_run_authentication");
-
- plugin_data_len = auth_plugin_data_len;
- plugin_data = mnd_emalloc(plugin_data_len + 1);
- if (!plugin_data) {
- goto end;
- }
- memcpy(plugin_data, auth_plugin_data, plugin_data_len);
- plugin_data[plugin_data_len] = '\0';
-
- requested_protocol = mnd_pestrdup(auth_protocol? auth_protocol : MYSQLND_DEFAULT_AUTH_PROTOCOL, FALSE);
- if (!requested_protocol) {
- goto end;
- }
-
- do {
- struct st_mysqlnd_authentication_plugin * auth_plugin = conn->m->fetch_auth_plugin_by_name(requested_protocol);
-
- if (!auth_plugin) {
- php_error_docref(NULL, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
- goto end;
- }
- DBG_INF("plugin found");
-
- {
- zend_uchar * switch_to_auth_protocol_data = NULL;
- size_t switch_to_auth_protocol_data_len = 0;
- zend_uchar * scrambled_data = NULL;
- size_t scrambled_data_len = 0;
-
- switch_to_auth_protocol = NULL;
- switch_to_auth_protocol_len = 0;
-
- if (conn->auth_plugin_data) {
- mnd_pefree(conn->auth_plugin_data, conn->persistent);
- conn->auth_plugin_data = NULL;
- }
- conn->auth_plugin_data_len = plugin_data_len;
- conn->auth_plugin_data = mnd_pemalloc(conn->auth_plugin_data_len, conn->persistent);
- if (!conn->auth_plugin_data) {
- SET_OOM_ERROR(*conn->error_info);
- goto end;
- }
- memcpy(conn->auth_plugin_data, plugin_data, plugin_data_len);
-
- DBG_INF_FMT("salt(%d)=[%.*s]", plugin_data_len, plugin_data_len, plugin_data);
- /* The data should be allocated with malloc() */
- scrambled_data =
- auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
- plugin_data, plugin_data_len, options, &conn->net->data->options, mysql_flags);
- if (conn->error_info->error_no) {
- goto end;
- }
- if (FALSE == is_change_user) {
- ret = mysqlnd_auth_handshake(conn, user, passwd, passwd_len, db, db_len, options, mysql_flags,
- charset_no,
- first_call,
- requested_protocol,
- scrambled_data, scrambled_data_len,
- &switch_to_auth_protocol, &switch_to_auth_protocol_len,
- &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
- );
- } else {
- ret = mysqlnd_auth_change_user(conn, user, strlen(user), passwd, passwd_len, db, db_len, silent,
- first_call,
- requested_protocol,
- scrambled_data, scrambled_data_len,
- &switch_to_auth_protocol, &switch_to_auth_protocol_len,
- &switch_to_auth_protocol_data, &switch_to_auth_protocol_data_len
- );
- }
- first_call = FALSE;
- free(scrambled_data);
-
- DBG_INF_FMT("switch_to_auth_protocol=%s", switch_to_auth_protocol? switch_to_auth_protocol:"n/a");
- if (requested_protocol && switch_to_auth_protocol) {
- mnd_efree(requested_protocol);
- requested_protocol = switch_to_auth_protocol;
- }
-
- if (plugin_data) {
- mnd_efree(plugin_data);
- }
- plugin_data_len = switch_to_auth_protocol_data_len;
- plugin_data = switch_to_auth_protocol_data;
- }
- DBG_INF_FMT("conn->error_info->error_no = %d", conn->error_info->error_no);
- } while (ret == FAIL && conn->error_info->error_no == 0 && switch_to_auth_protocol != NULL);
-
- if (ret == PASS) {
- DBG_INF_FMT("saving requested_protocol=%s", requested_protocol);
- conn->m->set_client_option(conn, MYSQLND_OPT_AUTH_PROTOCOL, requested_protocol);
- }
-end:
- if (plugin_data) {
- mnd_efree(plugin_data);
- }
- if (requested_protocol) {
- mnd_efree(requested_protocol);
- }
-
- DBG_RETURN(ret);
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_connect_run_authentication */
-static enum_func_status
-mysqlnd_connect_run_authentication(
- MYSQLND_CONN_DATA * conn,
- const char * const user,
- const char * const passwd,
- const char * const db,
- size_t db_len,
- size_t passwd_len,
- const MYSQLND_PACKET_GREET * const greet_packet,
- const MYSQLND_OPTIONS * const options,
- zend_ulong mysql_flags
- )
-{
- enum_func_status ret = FAIL;
- DBG_ENTER("mysqlnd_connect_run_authentication");
-
- ret = mysqlnd_switch_to_ssl_if_needed(conn, greet_packet, options, mysql_flags);
- if (PASS == ret) {
- ret = mysqlnd_run_authentication(conn, user, passwd, passwd_len, db, db_len,
- greet_packet->auth_plugin_data, greet_packet->auth_plugin_data_len, greet_packet->auth_protocol,
- greet_packet->charset_no, options, mysql_flags, FALSE /*silent*/, FALSE/*is_change*/);
- }
- DBG_RETURN(ret);
-}
-/* }}} */
-
-
/* {{{ mysqlnd_conn_data::execute_init_commands */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands)(MYSQLND_CONN_DATA * conn)
@@ -729,7 +483,10 @@ MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands)(MYSQLND_CONN_DATA * con
static unsigned int
MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA * conn, unsigned int mysql_flags)
{
- MYSQLND_NET * net = conn->net;
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ MYSQLND_PFC * pfc = conn->protocol_frame_codec;
+#endif
+ MYSQLND_VIO * vio = conn->vio;
DBG_ENTER("mysqlnd_conn_data::get_updated_connect_flags");
/* we allow load data local infile by default */
@@ -737,16 +494,12 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA *
mysql_flags |= conn->options->flags; /* use the flags from set_client_option() */
- if (PG(open_basedir) && strlen(PG(open_basedir))) {
- mysql_flags ^= CLIENT_LOCAL_FILES;
- }
-
#ifndef MYSQLND_COMPRESSION_ENABLED
if (mysql_flags & CLIENT_COMPRESS) {
mysql_flags &= ~CLIENT_COMPRESS;
}
#else
- if (net && net->data->options.flags & MYSQLND_NET_FLAG_USE_COMPRESSION) {
+ if (pfc && pfc->data->flags & MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION) {
mysql_flags |= CLIENT_COMPRESS;
}
#endif
@@ -755,8 +508,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA *
mysql_flags &= ~CLIENT_SSL;
}
#else
- if (net && (net->data->options.ssl_key || net->data->options.ssl_cert ||
- net->data->options.ssl_ca || net->data->options.ssl_capath || net->data->options.ssl_cipher))
+ if (vio && (vio->data->options.ssl_key ||
+ vio->data->options.ssl_cert ||
+ vio->data->options.ssl_ca ||
+ vio->data->options.ssl_capath ||
+ vio->data->options.ssl_cipher))
{
mysql_flags |= CLIENT_SSL;
}
@@ -770,80 +526,62 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA *
/* {{{ mysqlnd_conn_data::connect_handshake */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake)(MYSQLND_CONN_DATA * conn,
- const char * const host, const char * const user,
- const char * const passwd, const unsigned int passwd_len,
- const char * const db, const unsigned int db_len,
+ const MYSQLND_CSTRING * const scheme,
+ const MYSQLND_CSTRING * const username,
+ const MYSQLND_CSTRING * const password,
+ const MYSQLND_CSTRING * const database,
const unsigned int mysql_flags)
{
- MYSQLND_PACKET_GREET * greet_packet;
- MYSQLND_NET * net = conn->net;
-
+ enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::connect_handshake");
- greet_packet = conn->protocol->m.get_greet_packet(conn->protocol, FALSE);
- if (!greet_packet) {
- SET_OOM_ERROR(*conn->error_info);
- DBG_RETURN(FAIL); /* OOM */
- }
-
- if (FAIL == net->data->m.connect_ex(conn->net, conn->scheme, conn->scheme_len, conn->persistent,
- conn->stats, conn->error_info))
+ if (PASS == conn->vio->data->m.connect(conn->vio, *scheme, conn->persistent, conn->stats, conn->error_info) &&
+ PASS == conn->protocol_frame_codec->data->m.reset(conn->protocol_frame_codec, conn->stats, conn->error_info))
{
- goto err;
- }
-
- DBG_INF_FMT("stream=%p", net->data->m.get_stream(net));
-
- if (FAIL == PACKET_READ(greet_packet, conn)) {
- DBG_ERR("Error while reading greeting packet");
- php_error_docref(NULL, E_WARNING, "Error while reading greeting packet. PID=%d", getpid());
- goto err;
- } else if (greet_packet->error_no) {
- DBG_ERR_FMT("errorno=%u error=%s", greet_packet->error_no, greet_packet->error);
- SET_CLIENT_ERROR(*conn->error_info, greet_packet->error_no, greet_packet->sqlstate, greet_packet->error);
- goto err;
- } else if (greet_packet->pre41) {
- DBG_ERR_FMT("Connecting to 3.22, 3.23 & 4.0 is not supported. Server is %-.32s", greet_packet->server_version);
- php_error_docref(NULL, E_WARNING, "Connecting to 3.22, 3.23 & 4.0 "
- " is not supported. Server is %-.32s", greet_packet->server_version);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
- "Connecting to 3.22, 3.23 & 4.0 servers is not supported");
- goto err;
- }
-
- conn->thread_id = greet_packet->thread_id;
- conn->protocol_version = greet_packet->protocol_version;
- conn->server_version = mnd_pestrdup(greet_packet->server_version, conn->persistent);
-
- conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no);
- if (!conn->greet_charset) {
- php_error_docref(NULL, E_WARNING,
- "Server sent charset (%d) unknown to the client. Please, report to the developers", greet_packet->charset_no);
- SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE,
- "Server sent charset unknown to the client. Please, report to the developers");
- goto err;
+ size_t client_flags = mysql_flags;
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_HANDSHAKE, conn, username, password, database, client_flags);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
}
+ DBG_RETURN(ret);
+}
+/* }}} */
- conn->client_flag = mysql_flags;
- conn->server_capabilities = greet_packet->server_capabilities;
-
- if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, (size_t) passwd_len,
- greet_packet, conn->options, mysql_flags))
- {
- goto err;
+/* {{{ mysqlnd_conn_data::get_scheme */
+static MYSQLND_STRING
+MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe)
+{
+ MYSQLND_STRING transport;
+ DBG_ENTER("mysqlnd_conn_data::get_scheme");
+#ifndef PHP_WIN32
+ if (hostname.l == sizeof("localhost") - 1 && !strncasecmp(hostname.s, "localhost", hostname.l)) {
+ DBG_INF_FMT("socket=%s", socket_or_pipe->s? socket_or_pipe->s:"n/a");
+ if (!socket_or_pipe->s) {
+ socket_or_pipe->s = "/tmp/mysql.sock";
+ socket_or_pipe->l = strlen(socket_or_pipe->s);
+ }
+ transport.l = mnd_sprintf(&transport.s, 0, "unix://%s", socket_or_pipe->s);
+ *unix_socket = TRUE;
+#else
+ if (hostname.l == sizeof(".") - 1 && hostname.s[0] == '.') {
+ /* named pipe in socket */
+ if (!socket_or_pipe->s) {
+ socket_or_pipe->s = "\\\\.\\pipe\\MySQL";
+ socket_or_pipe->l = strlen(socket_or_pipe->s);
+ }
+ transport.l = mnd_sprintf(&transport.s, 0, "pipe://%s", socket_or_pipe->s);
+ *named_pipe = TRUE;
+#endif
+ } else {
+ if (!port) {
+ port = 3306;
+ }
+ transport.l = mnd_sprintf(&transport.s, 0, "tcp://%s:%u", hostname.s, port);
}
- memset(conn->upsert_status, 0, sizeof(*conn->upsert_status));
- conn->upsert_status->warning_count = 0;
- conn->upsert_status->server_status = greet_packet->server_status;
- conn->upsert_status->affected_rows = 0;
-
- PACKET_FREE(greet_packet);
- DBG_RETURN(PASS);
-err:
- conn->client_flag = 0;
- conn->server_capabilities = 0;
- PACKET_FREE(greet_packet);
- DBG_RETURN(FAIL);
+ DBG_INF_FMT("transport=%s", transport.s? transport.s:"OOM");
+ DBG_RETURN(transport);
}
/* }}} */
@@ -851,22 +589,23 @@ err:
/* {{{ mysqlnd_conn_data::connect */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
- const char *host, const char *user,
- const char *passwd, unsigned int passwd_len,
- const char *db, unsigned int db_len,
- unsigned int port,
- const char *socket_or_pipe,
- unsigned int mysql_flags
- )
-{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, connect);
- size_t host_len;
+ MYSQLND_CSTRING hostname,
+ MYSQLND_CSTRING username,
+ MYSQLND_CSTRING password,
+ MYSQLND_CSTRING database,
+ unsigned int port,
+ MYSQLND_CSTRING socket_or_pipe,
+ unsigned int mysql_flags
+ )
+{
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), connect);
zend_bool unix_socket = FALSE;
zend_bool named_pipe = FALSE;
zend_bool reconnect = FALSE;
zend_bool saved_compression = FALSE;
zend_bool local_tx_started = FALSE;
- MYSQLND_NET * net = conn->net;
+ MYSQLND_PFC * pfc = conn->protocol_frame_codec;
+ MYSQLND_STRING transport = { NULL, 0 };
DBG_ENTER("mysqlnd_conn_data::connect");
DBG_INF_FMT("conn=%p", conn);
@@ -876,189 +615,161 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
}
local_tx_started = TRUE;
- SET_EMPTY_ERROR(*conn->error_info);
- SET_ERROR_AFF_ROWS(conn);
+ SET_EMPTY_ERROR(conn->error_info);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u persistent=%u state=%u",
- host?host:"", user?user:"", db?db:"", port, mysql_flags,
- conn? conn->persistent:0, conn? CONN_GET_STATE(conn):-1);
+ hostname.s?hostname.s:"", username.s?username.s:"", database.s?database.s:"", port, mysql_flags,
+ conn? conn->persistent:0, conn? GET_CONNECTION_STATE(&conn->state):-1);
- if (CONN_GET_STATE(conn) > CONN_ALLOCED && CONN_GET_STATE(conn) ) {
+ if (GET_CONNECTION_STATE(&conn->state) > CONN_ALLOCED) {
DBG_INF("Connecting on a connected handle.");
- if (CONN_GET_STATE(conn) < CONN_QUIT_SENT) {
+ if (GET_CONNECTION_STATE(&conn->state) < CONN_QUIT_SENT) {
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_CLOSE_IMPLICIT);
reconnect = TRUE;
conn->m->send_close(conn);
}
conn->m->free_contents(conn);
- MYSQLND_DEC_CONN_STATISTIC(conn->stats, STAT_OPENED_CONNECTIONS);
- if (conn->persistent) {
- MYSQLND_DEC_CONN_STATISTIC(conn->stats, STAT_OPENED_PERSISTENT_CONNECTIONS);
- }
/* Now reconnect using the same handle */
- if (net->data->compressed) {
+ if (pfc->data->compressed) {
/*
- we need to save the state. As we will re-connect, net->compressed should be off, or
+ we need to save the state. As we will re-connect, pfc->compressed should be off, or
we will look for a compression header as part of the greet message, but there will
be none.
*/
saved_compression = TRUE;
- net->data->compressed = FALSE;
+ pfc->data->compressed = FALSE;
}
- if (net->data->ssl) {
- net->data->ssl = FALSE;
+ if (pfc->data->ssl) {
+ pfc->data->ssl = FALSE;
}
} else {
unsigned int max_allowed_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE;
conn->m->set_client_option(conn, MYSQLND_OPT_MAX_ALLOWED_PACKET, (char *)&max_allowed_size);
}
- if (!host || !host[0]) {
- host = "localhost";
+ if (!hostname.s || !hostname.s[0]) {
+ hostname.s = "localhost";
+ hostname.l = strlen(hostname.s);
}
- if (!user) {
+ if (!username.s) {
DBG_INF_FMT("no user given, using empty string");
- user = "";
+ username.s = "";
+ username.l = 0;
}
- if (!passwd) {
+ if (!password.s) {
DBG_INF_FMT("no password given, using empty string");
- passwd = "";
- passwd_len = 0;
+ password.s = "";
+ password.l = 0;
}
- if (!db) {
+ if (!database.s) {
DBG_INF_FMT("no db given, using empty string");
- db = "";
- db_len = 0;
+ database.s = "";
+ database.l = 0;
} else {
mysql_flags |= CLIENT_CONNECT_WITH_DB;
}
- host_len = strlen(host);
- {
- char * transport = NULL;
- int transport_len;
-#ifndef PHP_WIN32
- if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
- DBG_INF_FMT("socket=%s", socket_or_pipe? socket_or_pipe:"n/a");
- if (!socket_or_pipe) {
- socket_or_pipe = "/tmp/mysql.sock";
- }
- transport_len = mnd_sprintf(&transport, 0, "unix://%s", socket_or_pipe);
- unix_socket = TRUE;
-#else
- if (host_len == sizeof(".") - 1 && host[0] == '.') {
- /* named pipe in socket */
- if (!socket_or_pipe) {
- socket_or_pipe = "\\\\.\\pipe\\MySQL";
- }
- transport_len = mnd_sprintf(&transport, 0, "pipe://%s", socket_or_pipe);
- named_pipe = TRUE;
-#endif
- } else {
- if (!port) {
- port = 3306;
- }
- transport_len = mnd_sprintf(&transport, 0, "tcp://%s:%u", host, port);
- }
- if (!transport) {
- SET_OOM_ERROR(*conn->error_info);
- goto err; /* OOM */
- }
- DBG_INF_FMT("transport=%s conn->scheme=%s", transport, conn->scheme);
- conn->scheme = mnd_pestrndup(transport, transport_len, conn->persistent);
- conn->scheme_len = transport_len;
- mnd_sprintf_free(transport);
- transport = NULL;
- if (!conn->scheme) {
- goto err; /* OOM */
- }
- }
+ transport = conn->m->get_scheme(conn, hostname, &socket_or_pipe, port, &unix_socket, &named_pipe);
mysql_flags = conn->m->get_updated_connect_flags(conn, mysql_flags);
- if (FAIL == conn->m->connect_handshake(conn, host, user, passwd, passwd_len, db, db_len, mysql_flags)) {
- goto err;
+ {
+ const MYSQLND_CSTRING scheme = { transport.s, transport.l };
+ if (FAIL == conn->m->connect_handshake(conn, &scheme, &username, &password, &database, mysql_flags)) {
+ goto err;
+ }
}
{
- CONN_SET_STATE(conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
if (saved_compression) {
- net->data->compressed = TRUE;
+ pfc->data->compressed = TRUE;
}
/*
If a connect on a existing handle is performed and mysql_flags is
passed which doesn't CLIENT_COMPRESS, then we need to overwrite the value
which we set based on saved_compression.
*/
- net->data->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE;
+ pfc->data->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE;
+
- conn->user_len = strlen(user);
- conn->user = mnd_pestrndup(user, conn->user_len, conn->persistent);
- conn->passwd = mnd_pestrndup(passwd, passwd_len, conn->persistent);
- conn->passwd_len = passwd_len;
+ conn->scheme.s = mnd_pestrndup(transport.s, transport.l, conn->persistent);
+ conn->scheme.l = transport.l;
+ if (transport.s) {
+ mnd_sprintf_free(transport.s);
+ transport.s = NULL;
+ }
+
+ if (!conn->scheme.s) {
+ goto err; /* OOM */
+ }
+
+ conn->username.l = username.l;
+ conn->username.s = mnd_pestrndup(username.s, conn->username.l, conn->persistent);
+ conn->password.l = password.l;
+ conn->password.s = mnd_pestrndup(password.s, conn->password.l, conn->persistent);
conn->port = port;
- conn->connect_or_select_db = mnd_pestrndup(db, db_len, conn->persistent);
- conn->connect_or_select_db_len = db_len;
+ conn->connect_or_select_db.l = database.l;
+ conn->connect_or_select_db.s = mnd_pestrndup(database.s, conn->connect_or_select_db.l, conn->persistent);
- if (!conn->user || !conn->passwd || !conn->connect_or_select_db) {
- SET_OOM_ERROR(*conn->error_info);
+ if (!conn->username.s || !conn->password.s|| !conn->connect_or_select_db.s) {
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
if (!unix_socket && !named_pipe) {
- conn->host = mnd_pestrndup(host, host_len, conn->persistent);
- if (!conn->host) {
- SET_OOM_ERROR(*conn->error_info);
+ conn->hostname.s = mnd_pestrndup(hostname.s, hostname.l, conn->persistent);
+ if (!conn->hostname.s) {
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
- conn->host_len = host_len;
+ conn->hostname.l = hostname.l;
{
char *p;
- mnd_sprintf(&p, 0, "%s via TCP/IP", conn->host);
+ mnd_sprintf(&p, 0, "%s via TCP/IP", conn->hostname);
if (!p) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
conn->host_info = mnd_pestrdup(p, conn->persistent);
mnd_sprintf_free(p);
if (!conn->host_info) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
}
} else {
- conn->unix_socket = mnd_pestrdup(socket_or_pipe, conn->persistent);
+ conn->unix_socket.s = mnd_pestrdup(socket_or_pipe.s, conn->persistent);
if (unix_socket) {
conn->host_info = mnd_pestrdup("Localhost via UNIX socket", conn->persistent);
} else if (named_pipe) {
char *p;
- mnd_sprintf(&p, 0, "%s via named pipe", conn->unix_socket);
+ mnd_sprintf(&p, 0, "%s via named pipe", conn->unix_socket.s);
if (!p) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
conn->host_info = mnd_pestrdup(p, conn->persistent);
mnd_sprintf_free(p);
if (!conn->host_info) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
} else {
php_error_docref(NULL, E_WARNING, "Impossible. Should be either socket or a pipe. Report a bug!");
}
- if (!conn->unix_socket || !conn->host_info) {
- SET_OOM_ERROR(*conn->error_info);
+ if (!conn->unix_socket.s || !conn->host_info) {
+ SET_OOM_ERROR(conn->error_info);
goto err; /* OOM */
}
- conn->unix_socket_len = strlen(conn->unix_socket);
+ conn->unix_socket.l = strlen(conn->unix_socket.s);
}
- conn->max_packet_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE;
- /* todo: check if charset is available */
- SET_EMPTY_ERROR(*conn->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
mysqlnd_local_infile_default(conn);
@@ -1080,12 +791,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
DBG_RETURN(PASS);
}
err:
+ if (transport.s) {
+ mnd_sprintf_free(transport.s);
+ transport.s = NULL;
+ }
- DBG_ERR_FMT("[%u] %.128s (trying to connect via %s)", conn->error_info->error_no, conn->error_info->error, conn->scheme);
+ DBG_ERR_FMT("[%u] %.128s (trying to connect via %s)", conn->error_info->error_no, conn->error_info->error, conn->scheme.s);
if (!conn->error_info->error_no) {
- SET_CLIENT_ERROR(*conn->error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, conn->error_info->error? conn->error_info->error:"Unknown error");
- php_error_docref(NULL, E_WARNING, "[%u] %.128s (trying to connect via %s)",
- conn->error_info->error_no, conn->error_info->error, conn->scheme);
+ SET_CLIENT_ERROR(conn->error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, conn->error_info->error? conn->error_info->error:"Unknown error");
+ php_error_docref(NULL, E_WARNING, "[%u] %.128s (trying to connect via %s)", conn->error_info->error_no, conn->error_info->error, conn->scheme.s);
}
conn->m->free_contents(conn);
@@ -1102,15 +816,15 @@ err:
/* {{{ mysqlnd_conn::connect */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn_handle,
- const char * host, const char * user,
- const char * passwd, unsigned int passwd_len,
- const char * db, unsigned int db_len,
- unsigned int port,
- const char * socket_or_pipe,
- unsigned int mysql_flags
- )
-{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, connect);
+ const MYSQLND_CSTRING hostname,
+ const MYSQLND_CSTRING username,
+ const MYSQLND_CSTRING password,
+ const MYSQLND_CSTRING database,
+ unsigned int port,
+ const MYSQLND_CSTRING socket_or_pipe,
+ unsigned int mysql_flags)
+{
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), connect);
enum_func_status ret = FAIL;
MYSQLND_CONN_DATA * conn = conn_handle->data;
@@ -1118,7 +832,7 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn_handle,
if (PASS == conn->m->local_tx_start(conn, this_func)) {
mysqlnd_options4(conn_handle, MYSQL_OPT_CONNECT_ATTR_ADD, "_client_name", "mysqlnd");
- ret = conn->m->connect(conn, host, user, passwd, passwd_len, db, db_len, port, socket_or_pipe, mysql_flags);
+ ret = conn->m->connect(conn, hostname, username, password, database, port, socket_or_pipe, mysql_flags);
conn->m->local_tx_end(conn, this_func, FAIL);
}
@@ -1127,57 +841,15 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn_handle,
/* }}} */
-/* {{{ mysqlnd_connect */
-PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn_handle,
- const char * host, const char * user,
- const char * passwd, unsigned int passwd_len,
- const char * db, unsigned int db_len,
- unsigned int port,
- const char * socket_or_pipe,
- unsigned int mysql_flags,
- unsigned int client_api_flags
- )
-{
- enum_func_status ret = FAIL;
- zend_bool self_alloced = FALSE;
-
- DBG_ENTER("mysqlnd_connect");
- DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u", host?host:"", user?user:"", db?db:"", port, mysql_flags);
-
- if (!conn_handle) {
- self_alloced = TRUE;
- if (!(conn_handle = mysqlnd_init(client_api_flags, FALSE))) {
- /* OOM */
- DBG_RETURN(NULL);
- }
- }
-
- ret = conn_handle->m->connect(conn_handle, host, user, passwd, passwd_len, db, db_len, port, socket_or_pipe, mysql_flags);
-
- if (ret == FAIL) {
- if (self_alloced) {
- /*
- We have alloced, thus there are no references to this
- object - we are free to kill it!
- */
- conn_handle->m->dtor(conn_handle);
- }
- DBG_RETURN(NULL);
- }
- DBG_RETURN(conn_handle);
-}
-/* }}} */
-
-
/* {{{ mysqlnd_conn_data::query */
/*
If conn->error_info->error_no is not zero, then we had an error.
Still the result from the query is PASS
*/
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, query)(MYSQLND_CONN_DATA * conn, const char * query, unsigned int query_len)
+MYSQLND_METHOD(mysqlnd_conn_data, query)(MYSQLND_CONN_DATA * conn, const char * const query, const size_t query_len)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, query);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), query);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::query");
DBG_INF_FMT("conn=%p conn=%llu query=%s", conn, conn->thread_id, query);
@@ -1187,8 +859,8 @@ MYSQLND_METHOD(mysqlnd_conn_data, query)(MYSQLND_CONN_DATA * conn, const char *
PASS == conn->m->reap_query(conn, MYSQLND_REAP_RESULT_IMPLICIT))
{
ret = PASS;
- if (conn->last_query_type == QUERY_UPSERT && conn->upsert_status->affected_rows) {
- MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_NORMAL, conn->upsert_status->affected_rows);
+ if (conn->last_query_type == QUERY_UPSERT && UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status)) {
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_NORMAL, UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status));
}
}
conn->m->local_tx_end(conn, this_func, ret);
@@ -1200,25 +872,29 @@ MYSQLND_METHOD(mysqlnd_conn_data, query)(MYSQLND_CONN_DATA * conn, const char *
/* {{{ mysqlnd_conn_data::send_query */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, send_query)(MYSQLND_CONN_DATA * conn, const char * query, unsigned int query_len,
+MYSQLND_METHOD(mysqlnd_conn_data, send_query)(MYSQLND_CONN_DATA * conn, const char * const query, const size_t query_len,
enum_mysqlnd_send_query_type type, zval *read_cb, zval *err_cb)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, send_query);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), send_query);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::send_query");
DBG_INF_FMT("conn=%llu query=%s", conn->thread_id, query);
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
+ DBG_INF_FMT("conn->server_status=%u", UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
- if (PASS == conn->m->local_tx_start(conn, this_func)) {
- ret = conn->m->simple_command(conn, COM_QUERY, (zend_uchar *) query, query_len,
- PROT_LAST /* we will handle the OK packet*/,
- FALSE, FALSE);
- if (PASS == ret) {
- CONN_SET_STATE(conn, CONN_QUERY_SENT);
+ if (type == MYSQLND_SEND_QUERY_IMPLICIT || PASS == conn->m->local_tx_start(conn, this_func))
+ {
+ const MYSQLND_CSTRING query_string = {query, query_len};
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_QUERY, conn, query_string);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
+
+ if (type == MYSQLND_SEND_QUERY_EXPLICIT) {
+ conn->m->local_tx_end(conn, this_func, ret);
}
- conn->m->local_tx_end(conn, this_func, ret);
}
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
+ DBG_INF_FMT("conn->server_status=%u", UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
DBG_RETURN(ret);
}
/* }}} */
@@ -1228,302 +904,35 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_query)(MYSQLND_CONN_DATA * conn, const ch
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, reap_query)(MYSQLND_CONN_DATA * conn, enum_mysqlnd_reap_result_type type)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, reap_query);
- enum_mysqlnd_connection_state state = CONN_GET_STATE(conn);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), reap_query);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::reap_query");
DBG_INF_FMT("conn=%llu", conn->thread_id);
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
- if (PASS == conn->m->local_tx_start(conn, this_func)) {
- if (state <= CONN_READY || state == CONN_QUIT_SENT) {
- php_error_docref(NULL, E_WARNING, "Connection not opened, clear or has been closed");
- DBG_ERR_FMT("Connection not opened, clear or has been closed. State=%u", state);
- DBG_RETURN(ret);
- }
- ret = conn->m->query_read_result_set_header(conn, NULL);
-
- conn->m->local_tx_end(conn, this_func, ret);
- }
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
- DBG_RETURN(ret);
-}
-/* }}} */
-
-
-#include "php_network.h"
-
-/* {{{ mysqlnd_stream_array_to_fd_set */
-MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array)
-{
- int cnt = 0;
- MYSQLND **p = conn_array, **p_p;
- MYSQLND **ret = NULL;
-
- while (*p) {
- if (CONN_GET_STATE((*p)->data) <= CONN_READY || CONN_GET_STATE((*p)->data) == CONN_QUIT_SENT) {
- cnt++;
- }
- p++;
- }
- if (cnt) {
- MYSQLND **ret_p = ret = ecalloc(cnt + 1, sizeof(MYSQLND *));
- p_p = p = conn_array;
- while (*p) {
- if (CONN_GET_STATE((*p)->data) <= CONN_READY || CONN_GET_STATE((*p)->data) == CONN_QUIT_SENT) {
- *ret_p = *p;
- *p = NULL;
- ret_p++;
- } else {
- *p_p = *p;
- p_p++;
- }
- p++;
- }
- *ret_p = NULL;
- }
- return ret;
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_stream_array_to_fd_set */
-static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, php_socket_t * max_fd)
-{
- php_socket_t this_fd;
- php_stream *stream = NULL;
- unsigned int cnt = 0;
- MYSQLND **p = conn_array;
- DBG_ENTER("mysqlnd_stream_array_to_fd_set");
-
- while (*p) {
- /* get the fd.
- * NB: Most other code will NOT use the PHP_STREAM_CAST_INTERNAL flag
- * when casting. It is only used here so that the buffered data warning
- * is not displayed.
- * */
- stream = (*p)->data->net->data->m.get_stream((*p)->data->net);
- DBG_INF_FMT("conn=%llu stream=%p", (*p)->data->thread_id, stream);
- if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
- (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
-
- PHP_SAFE_FD_SET(this_fd, fds);
-
- if (this_fd > *max_fd) {
- *max_fd = this_fd;
- }
- cnt++;
+ DBG_INF_FMT("conn->server_status=%u", UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
+ if (type == MYSQLND_REAP_RESULT_IMPLICIT || PASS == conn->m->local_tx_start(conn, this_func))
+ {
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_REAP_RESULT, conn);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
}
- p++;
- }
- DBG_RETURN(cnt ? 1 : 0);
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_stream_array_from_fd_set */
-static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds)
-{
- php_socket_t this_fd;
- php_stream *stream = NULL;
- int ret = 0;
- zend_bool disproportion = FALSE;
- MYSQLND **fwd = conn_array, **bckwd = conn_array;
- DBG_ENTER("mysqlnd_stream_array_from_fd_set");
- while (*fwd) {
- stream = (*fwd)->data->net->data->m.get_stream((*fwd)->data->net);
- DBG_INF_FMT("conn=%llu stream=%p", (*fwd)->data->thread_id, stream);
- if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
- (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
- if (PHP_SAFE_FD_ISSET(this_fd, fds)) {
- if (disproportion) {
- *bckwd = *fwd;
- }
- bckwd++;
- fwd++;
- ret++;
- continue;
- }
+ if (type == MYSQLND_REAP_RESULT_EXPLICIT) {
+ conn->m->local_tx_end(conn, this_func, ret);
}
- disproportion = TRUE;
- fwd++;
}
- *bckwd = NULL;/* NULL-terminate the list */
-
+ DBG_INF_FMT("conn->server_status=%u", UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
DBG_RETURN(ret);
}
/* }}} */
-#ifndef PHP_WIN32
-#define php_select(m, r, w, e, t) select(m, r, w, e, t)
-#else
-#include "win32/select.h"
-#endif
-
-
-/* {{{ mysqlnd_poll */
-PHPAPI enum_func_status
-mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND ***dont_poll, long sec, long usec, int * desc_num)
-{
- struct timeval tv;
- struct timeval *tv_p = NULL;
- fd_set rfds, wfds, efds;
- php_socket_t max_fd = 0;
- int retval, sets = 0;
- int set_count, max_set_count = 0;
-
- DBG_ENTER("_mysqlnd_poll");
- if (sec < 0 || usec < 0) {
- php_error_docref(NULL, E_WARNING, "Negative values passed for sec and/or usec");
- DBG_RETURN(FAIL);
- }
-
- FD_ZERO(&rfds);
- FD_ZERO(&wfds);
- FD_ZERO(&efds);
-
- if (r_array != NULL) {
- *dont_poll = mysqlnd_stream_array_check_for_readiness(r_array);
- set_count = mysqlnd_stream_array_to_fd_set(r_array, &rfds, &max_fd);
- if (set_count > max_set_count) {
- max_set_count = set_count;
- }
- sets += set_count;
- }
-
- if (e_array != NULL) {
- set_count = mysqlnd_stream_array_to_fd_set(e_array, &efds, &max_fd);
- if (set_count > max_set_count) {
- max_set_count = set_count;
- }
- sets += set_count;
- }
-
- if (!sets) {
- php_error_docref(NULL, E_WARNING, *dont_poll ? "All arrays passed are clear":"No stream arrays were passed");
- DBG_ERR_FMT(*dont_poll ? "All arrays passed are clear":"No stream arrays were passed");
- DBG_RETURN(FAIL);
- }
-
- PHP_SAFE_MAX_FD(max_fd, max_set_count);
-
- /* Solaris + BSD do not like microsecond values which are >= 1 sec */
- if (usec > 999999) {
- tv.tv_sec = sec + (usec / 1000000);
- tv.tv_usec = usec % 1000000;
- } else {
- tv.tv_sec = sec;
- tv.tv_usec = usec;
- }
-
- tv_p = &tv;
-
- retval = php_select(max_fd + 1, &rfds, &wfds, &efds, tv_p);
-
- if (retval == -1) {
- php_error_docref(NULL, E_WARNING, "unable to select [%d]: %s (max_fd=%d)",
- errno, strerror(errno), max_fd);
- DBG_RETURN(FAIL);
- }
-
- if (r_array != NULL) {
- mysqlnd_stream_array_from_fd_set(r_array, &rfds);
- }
- if (e_array != NULL) {
- mysqlnd_stream_array_from_fd_set(e_array, &efds);
- }
-
- *desc_num = retval;
- DBG_RETURN(PASS);
-}
-/* }}} */
-
-
-/*
- COM_FIELD_LIST is special, different from a SHOW FIELDS FROM :
- - There is no result set header - status from the command, which
- impacts us to allocate big chunk of memory for reading the metadata.
- - The EOF packet is consumed by the metadata packet reader.
-*/
-
-/* {{{ mysqlnd_conn_data::list_fields */
-MYSQLND_RES *
-MYSQLND_METHOD(mysqlnd_conn_data, list_fields)(MYSQLND_CONN_DATA * conn, const char *table, const char *achtung_wild)
-{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, list_fields);
- /* db + \0 + wild + \0 (for wild) */
- zend_uchar buff[MYSQLND_MAX_ALLOWED_DB_LEN * 2 + 1 + 1], *p;
- size_t table_len, wild_len;
- MYSQLND_RES * result = NULL;
- DBG_ENTER("mysqlnd_conn_data::list_fields");
- DBG_INF_FMT("conn=%llu table=%s wild=%s", conn->thread_id, table? table:"",achtung_wild? achtung_wild:"");
-
- if (PASS == conn->m->local_tx_start(conn, this_func)) {
- do {
- p = buff;
- if (table && (table_len = strlen(table))) {
- size_t to_copy = MIN(table_len, MYSQLND_MAX_ALLOWED_DB_LEN);
- memcpy(p, table, to_copy);
- p += to_copy;
- *p++ = '\0';
- }
-
- if (achtung_wild && (wild_len = strlen(achtung_wild))) {
- size_t to_copy = MIN(wild_len, MYSQLND_MAX_ALLOWED_DB_LEN);
- memcpy(p, achtung_wild, to_copy);
- p += to_copy;
- *p++ = '\0';
- }
-
- if (PASS != conn->m->simple_command(conn, COM_FIELD_LIST, buff, p - buff,
- PROT_LAST /* we will handle the OK packet*/,
- FALSE, TRUE)) {
- conn->m->local_tx_end(conn, 0, FAIL);
- break;
- }
-
- /*
- Prepare for the worst case.
- MyISAM goes to 2500 BIT columns, double it for safety.
- */
- result = conn->m->result_init(5000, conn->persistent);
- if (!result) {
- break;
- }
-
- if (FAIL == result->m.read_result_metadata(result, conn)) {
- DBG_ERR("Error occurred while reading metadata");
- result->m.free_result(result, TRUE);
- result = NULL;
- break;
- }
-
- result->type = MYSQLND_RES_NORMAL;
- result->unbuf = mysqlnd_result_unbuffered_init(result->field_count, FALSE, result->persistent);
- if (!result->unbuf) {
- /* OOM */
- SET_OOM_ERROR(*conn->error_info);
- result->m.free_result(result, TRUE);
- result = NULL;
- break;
- }
- result->unbuf->eof_reached = TRUE;
- } while (0);
- conn->m->local_tx_end(conn, this_func, result == NULL? FAIL:PASS);
- }
-
- DBG_RETURN(result);
-}
-/* }}} */
-
-
/* {{{ mysqlnd_conn_data::list_method */
MYSQLND_RES *
-MYSQLND_METHOD(mysqlnd_conn_data, list_method)(MYSQLND_CONN_DATA * conn, const char * query, const char *achtung_wild, char *par1)
+MYSQLND_METHOD(mysqlnd_conn_data, list_method)(MYSQLND_CONN_DATA * conn, const char * const query, const char * const achtung_wild, const char * const par1)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, list_method);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), list_method);
char * show_query = NULL;
size_t show_query_len;
MYSQLND_RES * result = NULL;
@@ -1559,9 +968,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, list_method)(MYSQLND_CONN_DATA * conn, const c
/* }}} */
-/* {{{ mysqlnd_conn_data::errno */
+/* {{{ mysqlnd_conn_data::err_no */
static unsigned int
-MYSQLND_METHOD(mysqlnd_conn_data, errno)(const MYSQLND_CONN_DATA * const conn)
+MYSQLND_METHOD(mysqlnd_conn_data, err_no)(const MYSQLND_CONN_DATA * const conn)
{
return conn->error_info->error_no;
}
@@ -1601,17 +1010,17 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, ssl_set)(MYSQLND_CONN_DATA * const conn, const char * key, const char * const cert,
const char * const ca, const char * const capath, const char * const cipher)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, ssl_set);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), ssl_set);
enum_func_status ret = FAIL;
- MYSQLND_NET * net = conn->net;
+ MYSQLND_VIO * vio = conn->vio;
DBG_ENTER("mysqlnd_conn_data::ssl_set");
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- ret = (PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_KEY, key) &&
- PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CERT, cert) &&
- PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CA, ca) &&
- PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CAPATH, capath) &&
- PASS == net->data->m.set_client_option(net, MYSQLND_OPT_SSL_CIPHER, cipher)) ? PASS : FAIL;
+ ret = (PASS == vio->data->m.set_client_option(vio, MYSQLND_OPT_SSL_KEY, key) &&
+ PASS == vio->data->m.set_client_option(vio, MYSQLND_OPT_SSL_CERT, cert) &&
+ PASS == vio->data->m.set_client_option(vio, MYSQLND_OPT_SSL_CA, ca) &&
+ PASS == vio->data->m.set_client_option(vio, MYSQLND_OPT_SSL_CAPATH, capath) &&
+ PASS == vio->data->m.set_client_option(vio, MYSQLND_OPT_SSL_CIPHER, cipher)) ? PASS : FAIL;
conn->m->local_tx_end(conn, this_func, ret);
}
@@ -1624,14 +1033,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, ssl_set)(MYSQLND_CONN_DATA * const conn, const
static zend_ulong
MYSQLND_METHOD(mysqlnd_conn_data, escape_string)(MYSQLND_CONN_DATA * const conn, char * newstr, const char * escapestr, size_t escapestr_len)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, escape_string);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), escape_string);
zend_ulong ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::escape_string");
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- DBG_INF_FMT("server_status=%u", conn->upsert_status->server_status);
- if (conn->upsert_status->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES) {
+ DBG_INF_FMT("server_status=%u", UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
+ if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_STATUS_NO_BACKSLASH_ESCAPES) {
ret = mysqlnd_cset_escape_quotes(conn->charset, newstr, escapestr, escapestr_len);
} else {
ret = mysqlnd_cset_escape_slashes(conn->charset, newstr, escapestr, escapestr_len);
@@ -1647,12 +1056,16 @@ MYSQLND_METHOD(mysqlnd_conn_data, escape_string)(MYSQLND_CONN_DATA * const conn,
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, dump_debug_info)(MYSQLND_CONN_DATA * const conn)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, server_dump_debug_information);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), server_dump_debug_information);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::dump_debug_info");
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- ret = conn->m->simple_command(conn, COM_DEBUG, NULL, 0, PROT_EOF_PACKET, FALSE, TRUE);
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_DEBUG, conn);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
conn->m->local_tx_end(conn, this_func, ret);
}
@@ -1664,33 +1077,22 @@ MYSQLND_METHOD(mysqlnd_conn_data, dump_debug_info)(MYSQLND_CONN_DATA * const con
/* {{{ mysqlnd_conn_data::select_db */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, select_db)(MYSQLND_CONN_DATA * const conn, const char * const db, unsigned int db_len)
+MYSQLND_METHOD(mysqlnd_conn_data, select_db)(MYSQLND_CONN_DATA * const conn, const char * const db, const size_t db_len)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, select_db);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), select_db);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::select_db");
DBG_INF_FMT("conn=%llu db=%s", conn->thread_id, db);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- ret = conn->m->simple_command(conn, COM_INIT_DB, (zend_uchar*) db, db_len, PROT_OK_PACKET, FALSE, TRUE);
- /*
- The server sends 0 but libmysql doesn't read it and has established
- a protocol of giving back -1. Thus we have to follow it :(
- */
- SET_ERROR_AFF_ROWS(conn);
- if (ret == PASS) {
- if (conn->connect_or_select_db) {
- mnd_pefree(conn->connect_or_select_db, conn->persistent);
- }
- conn->connect_or_select_db = mnd_pestrndup(db, db_len, conn->persistent);
- conn->connect_or_select_db_len = db_len;
- if (!conn->connect_or_select_db) {
- /* OOM */
- SET_OOM_ERROR(*conn->error_info);
- ret = FAIL;
- }
+ const MYSQLND_CSTRING database = {db, db_len};
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_INIT_DB, conn, database);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
}
+
conn->m->local_tx_end(conn, this_func, ret);
}
DBG_RETURN(ret);
@@ -1702,20 +1104,18 @@ MYSQLND_METHOD(mysqlnd_conn_data, select_db)(MYSQLND_CONN_DATA * const conn, con
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, ping)(MYSQLND_CONN_DATA * const conn)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, ping);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), ping);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::ping");
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- ret = conn->m->simple_command(conn, COM_PING, NULL, 0, PROT_OK_PACKET, TRUE, TRUE);
- /*
- The server sends 0 but libmysql doesn't read it and has established
- a protocol of giving back -1. Thus we have to follow it :(
- */
- SET_ERROR_AFF_ROWS(conn);
-
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_PING, conn);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
conn->m->local_tx_end(conn, this_func, ret);
}
DBG_INF_FMT("ret=%u", ret);
@@ -1728,33 +1128,18 @@ MYSQLND_METHOD(mysqlnd_conn_data, ping)(MYSQLND_CONN_DATA * const conn)
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, statistic)(MYSQLND_CONN_DATA * conn, zend_string **message)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, get_server_statistics);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), get_server_statistics);
enum_func_status ret = FAIL;
- MYSQLND_PACKET_STATS * stats_header;
DBG_ENTER("mysqlnd_conn_data::statistic");
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- do {
- ret = conn->m->simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST, FALSE, TRUE);
- if (FAIL == ret) {
- break;
- }
- stats_header = conn->protocol->m.get_stats_packet(conn->protocol, FALSE);
- if (!stats_header) {
- SET_OOM_ERROR(*conn->error_info);
- break;
- }
-
- if (PASS == (ret = PACKET_READ(stats_header, conn))) {
- /* will be freed by Zend, thus don't use the mnd_ allocator */
- *message = zend_string_init(stats_header->message, stats_header->message_len, 0);
- DBG_INF(ZSTR_VAL(*message));
- }
- PACKET_FREE(stats_header);
- } while (0);
-
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_STATISTICS, conn, message);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
conn->m->local_tx_end(conn, this_func, ret);
}
DBG_RETURN(ret);
@@ -1766,29 +1151,21 @@ MYSQLND_METHOD(mysqlnd_conn_data, statistic)(MYSQLND_CONN_DATA * conn, zend_stri
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, kill)(MYSQLND_CONN_DATA * conn, unsigned int pid)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, kill_connection);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), kill_connection);
enum_func_status ret = FAIL;
- zend_uchar buff[4];
DBG_ENTER("mysqlnd_conn_data::kill");
DBG_INF_FMT("conn=%llu pid=%u", conn->thread_id, pid);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- int4store(buff, pid);
-
- /* If we kill ourselves don't expect OK packet, PROT_LAST will skip it */
- if (pid != conn->thread_id) {
- ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_OK_PACKET, FALSE, TRUE);
- /*
- The server sends 0 but libmysql doesn't read it and has established
- a protocol of giving back -1. Thus we have to follow it :(
- */
- SET_ERROR_AFF_ROWS(conn);
- } else if (PASS == (ret = conn->m->simple_command(conn, COM_PROCESS_KILL, buff, 4, PROT_LAST, FALSE, TRUE))) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
- conn->m->send_close(conn);
+ unsigned int process_id = pid;
+ /* 'unsigned char' is promoted to 'int' when passed through '...' */
+ unsigned int read_response = (pid != conn->thread_id);
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_PROCESS_KILL, conn, process_id, read_response);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
}
-
conn->m->local_tx_end(conn, this_func, ret);
}
DBG_RETURN(ret);
@@ -1800,7 +1177,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, kill)(MYSQLND_CONN_DATA * conn, unsigned int p
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, set_charset)(MYSQLND_CONN_DATA * const conn, const char * const csname)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, set_charset);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), set_charset);
enum_func_status ret = FAIL;
const MYSQLND_CHARSET * const charset = mysqlnd_find_charset_name(csname);
@@ -1808,7 +1185,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_charset)(MYSQLND_CONN_DATA * const conn, c
DBG_INF_FMT("conn=%llu cs=%s", conn->thread_id, csname);
if (!charset) {
- SET_CLIENT_ERROR(*conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE,
+ SET_CLIENT_ERROR(conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE,
"Invalid characterset or character set not supported");
DBG_RETURN(ret);
}
@@ -1839,17 +1216,18 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_charset)(MYSQLND_CONN_DATA * const conn, c
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, refresh)(MYSQLND_CONN_DATA * const conn, uint8_t options)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, refresh_server);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), refresh_server);
enum_func_status ret = FAIL;
- zend_uchar bits[1];
DBG_ENTER("mysqlnd_conn_data::refresh");
DBG_INF_FMT("conn=%llu options=%lu", conn->thread_id, options);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- int1store(bits, options);
-
- ret = conn->m->simple_command(conn, COM_REFRESH, bits, 1, PROT_OK_PACKET, FALSE, TRUE);
-
+ unsigned int options_param = (unsigned int) options;
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_REFRESH, conn, options_param);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
conn->m->local_tx_end(conn, this_func, ret);
}
DBG_RETURN(ret);
@@ -1861,17 +1239,18 @@ MYSQLND_METHOD(mysqlnd_conn_data, refresh)(MYSQLND_CONN_DATA * const conn, uint8
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, shutdown)(MYSQLND_CONN_DATA * const conn, uint8_t level)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, shutdown_server);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), shutdown_server);
enum_func_status ret = FAIL;
- zend_uchar bits[1];
DBG_ENTER("mysqlnd_conn_data::shutdown");
DBG_INF_FMT("conn=%llu level=%lu", conn->thread_id, level);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- int1store(bits, level);
-
- ret = conn->m->simple_command(conn, COM_SHUTDOWN, bits, 1, PROT_OK_PACKET, FALSE, TRUE);
-
+ unsigned int level_param = (unsigned int) level;
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_SHUTDOWN, conn, level_param);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
conn->m->local_tx_end(conn, this_func, ret);
}
DBG_RETURN(ret);
@@ -1884,29 +1263,32 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn)
{
enum_func_status ret = PASS;
- MYSQLND_NET * net = conn->net;
- php_stream * net_stream = net->data->m.get_stream(net);
- enum mysqlnd_connection_state state;
+ MYSQLND_VIO * vio = conn->vio;
+ php_stream * net_stream = vio->data->m.get_stream(vio);
+ enum mysqlnd_connection_state state = GET_CONNECTION_STATE(&conn->state);
DBG_ENTER("mysqlnd_send_close");
- DBG_INF_FMT("conn=%llu net->data->stream->abstract=%p", conn->thread_id, net_stream? net_stream->abstract:NULL);
+ DBG_INF_FMT("conn=%llu vio->data->stream->abstract=%p", conn->thread_id, net_stream? net_stream->abstract:NULL);
+ DBG_INF_FMT("state=%u", state);
- if (CONN_GET_STATE(conn) >= CONN_READY) {
- MYSQLND_DEC_CONN_STATISTIC(conn->stats, STAT_OPENED_CONNECTIONS);
+ if (state >= CONN_READY) {
+ MYSQLND_DEC_GLOBAL_STATISTIC(STAT_OPENED_CONNECTIONS);
if (conn->persistent) {
- MYSQLND_DEC_CONN_STATISTIC(conn->stats, STAT_OPENED_PERSISTENT_CONNECTIONS);
+ MYSQLND_DEC_GLOBAL_STATISTIC(STAT_OPENED_PERSISTENT_CONNECTIONS);
}
}
- state = CONN_GET_STATE(conn);
- DBG_INF_FMT("state=%u", state);
switch (state) {
case CONN_READY:
DBG_INF("Connection clean, sending COM_QUIT");
if (net_stream) {
- ret = conn->m->simple_command(conn, COM_QUIT, NULL, 0, PROT_LAST, TRUE, TRUE);
- net->data->m.close_stream(net, conn->stats, conn->error_info);
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_QUIT, conn);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
+ vio->data->m.close_stream(vio, conn->stats, conn->error_info);
}
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
break;
case CONN_SENDING_LOAD_DATA:
/*
@@ -1917,7 +1299,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn)
case CONN_QUERY_SENT:
case CONN_FETCHING_DATA:
MYSQLND_INC_GLOBAL_STATISTIC(STAT_CLOSE_IN_MIDDLE);
- DBG_ERR_FMT("Brutally closing connection [%p][%s]", conn, conn->scheme);
+ DBG_ERR_FMT("Brutally closing connection [%p][%s]", conn, conn->scheme.s);
/*
Do nothing, the connection will be brutally closed
and the server will catch it and free close from its side.
@@ -1930,11 +1312,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, send_close)(MYSQLND_CONN_DATA * const conn)
Fall-through
*/
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
/* Fall-through */
case CONN_QUIT_SENT:
/* The user has killed its own connection */
- net->data->m.close_stream(net, conn->stats, conn->error_info);
+ vio->data->m.close_stream(vio, conn->stats, conn->error_info);
break;
}
@@ -1976,28 +1358,6 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, free_reference)(MYSQLND_CONN_DATA * co
/* }}} */
-/* {{{ mysqlnd_conn_data::get_state */
-static enum mysqlnd_connection_state
-MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, get_state)(const MYSQLND_CONN_DATA * const conn)
-{
- DBG_ENTER("mysqlnd_conn_data::get_state");
- DBG_RETURN(conn->state);
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_conn_data::set_state */
-static void
-MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, set_state)(MYSQLND_CONN_DATA * const conn, enum mysqlnd_connection_state new_state)
-{
- DBG_ENTER("mysqlnd_conn_data::set_state");
- DBG_INF_FMT("New state=%u", new_state);
- conn->state = new_state;
- DBG_VOID_RETURN;
-}
-/* }}} */
-
-
/* {{{ mysqlnd_conn_data::field_count */
static unsigned int
MYSQLND_METHOD(mysqlnd_conn_data, field_count)(const MYSQLND_CONN_DATA * const conn)
@@ -2011,7 +1371,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, field_count)(const MYSQLND_CONN_DATA * const c
static unsigned int
MYSQLND_METHOD(mysqlnd_conn_data, server_status)(const MYSQLND_CONN_DATA * const conn)
{
- return conn->upsert_status->server_status;
+ return UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status);
}
/* }}} */
@@ -2020,7 +1380,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, server_status)(const MYSQLND_CONN_DATA * const
static uint64_t
MYSQLND_METHOD(mysqlnd_conn_data, insert_id)(const MYSQLND_CONN_DATA * const conn)
{
- return conn->upsert_status->last_insert_id;
+ return UPSERT_STATUS_GET_LAST_INSERT_ID(conn->upsert_status);
}
/* }}} */
@@ -2029,7 +1389,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, insert_id)(const MYSQLND_CONN_DATA * const con
static uint64_t
MYSQLND_METHOD(mysqlnd_conn_data, affected_rows)(const MYSQLND_CONN_DATA * const conn)
{
- return conn->upsert_status->affected_rows;
+ return UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status);
}
/* }}} */
@@ -2038,7 +1398,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, affected_rows)(const MYSQLND_CONN_DATA * const
static unsigned int
MYSQLND_METHOD(mysqlnd_conn_data, warning_count)(const MYSQLND_CONN_DATA * const conn)
{
- return conn->upsert_status->warning_count;
+ return UPSERT_STATUS_GET_WARNINGS(conn->upsert_status);
}
/* }}} */
@@ -2047,10 +1407,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, warning_count)(const MYSQLND_CONN_DATA * const
static const char *
MYSQLND_METHOD(mysqlnd_conn_data, info)(const MYSQLND_CONN_DATA * const conn)
{
- return conn->last_message;
+ return conn->last_message.s;
}
/* }}} */
+
/* {{{ mysqlnd_get_client_info */
PHPAPI const char * mysqlnd_get_client_info()
{
@@ -2140,7 +1501,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, more_results)(const MYSQLND_CONN_DATA * const
{
DBG_ENTER("mysqlnd_conn_data::more_results");
/* (conn->state == CONN_NEXT_RESULT_PENDING) too */
- DBG_RETURN(conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS? TRUE:FALSE);
+ DBG_RETURN(UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS? TRUE:FALSE);
}
/* }}} */
@@ -2149,7 +1510,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, more_results)(const MYSQLND_CONN_DATA * const
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, next_result)(MYSQLND_CONN_DATA * const conn)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, next_result);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), next_result);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::next_result");
@@ -2157,12 +1518,12 @@ MYSQLND_METHOD(mysqlnd_conn_data, next_result)(MYSQLND_CONN_DATA * const conn)
if (PASS == conn->m->local_tx_start(conn, this_func)) {
do {
- if (CONN_GET_STATE(conn) != CONN_NEXT_RESULT_PENDING) {
+ if (GET_CONNECTION_STATE(&conn->state) != CONN_NEXT_RESULT_PENDING) {
break;
}
- SET_EMPTY_ERROR(*conn->error_info);
- SET_ERROR_AFF_ROWS(conn);
+ SET_EMPTY_ERROR(conn->error_info);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
/*
We are sure that there is a result set, since conn->state is set accordingly
in mysqlnd_store_result() or mysqlnd_fetch_row_unbuffered()
@@ -2175,15 +1536,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, next_result)(MYSQLND_CONN_DATA * const conn)
if (!conn->error_info->error_no) {
DBG_ERR_FMT("Serious error. %s::%u", __FILE__, __LINE__);
php_error_docref(NULL, E_WARNING, "Serious error. PID=%d", getpid());
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
conn->m->send_close(conn);
} else {
DBG_INF_FMT("Error from the server : (%u) %s", conn->error_info->error_no, conn->error_info->error);
}
break;
}
- if (conn->last_query_type == QUERY_UPSERT && conn->upsert_status->affected_rows) {
- MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_NORMAL, conn->upsert_status->affected_rows);
+ if (conn->last_query_type == QUERY_UPSERT && UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status)) {
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_NORMAL, UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status));
}
} while (0);
conn->m->local_tx_end(conn, this_func, ret);
@@ -2195,9 +1556,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, next_result)(MYSQLND_CONN_DATA * const conn)
/* {{{ mysqlnd_field_type_name */
-PHPAPI const char *mysqlnd_field_type_name(enum mysqlnd_field_types field_type)
+PHPAPI const char * mysqlnd_field_type_name(const enum mysqlnd_field_types field_type)
{
switch(field_type) {
+ case FIELD_TYPE_JSON:
+ return "json";
case FIELD_TYPE_STRING:
case FIELD_TYPE_VAR_STRING:
return "string";
@@ -2248,14 +1611,14 @@ PHPAPI const char *mysqlnd_field_type_name(enum mysqlnd_field_types field_type)
/* {{{ mysqlnd_conn_data::change_user */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
- const char * user,
- const char * passwd,
- const char * db,
- zend_bool silent,
- size_t passwd_len
- )
-{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, change_user);
+ const char * user,
+ const char * passwd,
+ const char * db,
+ zend_bool silent,
+ size_t passwd_len
+ )
+{
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), change_user);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::change_user");
@@ -2266,14 +1629,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
goto end;
}
- SET_EMPTY_ERROR(*conn->error_info);
- SET_ERROR_AFF_ROWS(conn);
+ SET_EMPTY_ERROR(conn->error_info);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
if (!user) {
user = "";
}
if (!passwd) {
passwd = "";
+ passwd_len = 0;
}
if (!db) {
db = "";
@@ -2281,7 +1645,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, change_user)(MYSQLND_CONN_DATA * const conn,
/* XXX: passwords that have \0 inside work during auth, but in this case won't work with change user */
ret = mysqlnd_run_authentication(conn, user, passwd, passwd_len, db, strlen(db),
- conn->auth_plugin_data, conn->auth_plugin_data_len, conn->options->auth_protocol,
+ conn->authentication_plugin_data, conn->options->auth_protocol,
0 /*charset not used*/, conn->options, conn->server_capabilities, silent, TRUE/*is_change*/);
/*
@@ -2299,11 +1663,11 @@ end:
/* {{{ mysqlnd_conn_data::set_client_option */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const conn,
- enum mysqlnd_option option,
+ enum_mysqlnd_client_option option,
const char * const value
)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, set_client_option);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), set_client_option);
enum_func_status ret = PASS;
DBG_ENTER("mysqlnd_conn_data::set_client_option");
DBG_INF_FMT("conn=%llu option=%u", conn->thread_id, option);
@@ -2312,7 +1676,6 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
goto end;
}
switch (option) {
- case MYSQL_OPT_COMPRESS:
#ifdef WHEN_SUPPORTED_BY_MYSQLI
case MYSQL_OPT_READ_TIMEOUT:
case MYSQL_OPT_WRITE_TIMEOUT:
@@ -2324,10 +1687,13 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
case MYSQLND_OPT_SSL_CIPHER:
case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
case MYSQL_OPT_CONNECT_TIMEOUT:
- case MYSQLND_OPT_NET_CMD_BUFFER_SIZE:
case MYSQLND_OPT_NET_READ_BUFFER_SIZE:
+ ret = conn->vio->data->m.set_client_option(conn->vio, option, value);
+ break;
+ case MYSQLND_OPT_NET_CMD_BUFFER_SIZE:
+ case MYSQL_OPT_COMPRESS:
case MYSQL_SERVER_PUBLIC_KEY:
- ret = conn->net->data->m.set_client_option(conn->net, option, value);
+ ret = conn->protocol_frame_codec->data->m.set_client_option(conn->protocol_frame_codec, option, value);
break;
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
case MYSQLND_OPT_INT_AND_FLOAT_NATIVE:
@@ -2372,7 +1738,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
{
char * new_charset_name;
if (!mysqlnd_find_charset_name(value)) {
- SET_CLIENT_ERROR(*conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE, "Unknown character set");
+ SET_CLIENT_ERROR(conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE, "Unknown character set");
ret = FAIL;
break;
}
@@ -2458,7 +1824,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
conn->m->local_tx_end(conn, this_func, ret);
DBG_RETURN(ret);
oom:
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
conn->m->local_tx_end(conn, this_func, FAIL);
end:
DBG_RETURN(FAIL);
@@ -2469,12 +1835,12 @@ end:
/* {{{ mysqlnd_conn_data::set_client_option_2d */
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d)(MYSQLND_CONN_DATA * const conn,
- enum mysqlnd_option option,
+ const enum_mysqlnd_client_option option,
const char * const key,
const char * const value
)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, set_client_option_2d);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), set_client_option_2d);
enum_func_status ret = PASS;
DBG_ENTER("mysqlnd_conn_data::set_client_option_2d");
DBG_INF_FMT("conn=%llu option=%u", conn->thread_id, option);
@@ -2505,7 +1871,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d)(MYSQLND_CONN_DATA * cons
conn->m->local_tx_end(conn, this_func, ret);
DBG_RETURN(ret);
oom:
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
conn->m->local_tx_end(conn, this_func, FAIL);
end:
DBG_RETURN(FAIL);
@@ -2517,7 +1883,7 @@ end:
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_conn_data, use_result)(MYSQLND_CONN_DATA * const conn, const unsigned int flags)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, use_result);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), use_result);
MYSQLND_RES * result = NULL;
DBG_ENTER("mysqlnd_conn_data::use_result");
@@ -2530,8 +1896,8 @@ MYSQLND_METHOD(mysqlnd_conn_data, use_result)(MYSQLND_CONN_DATA * const conn, co
}
/* Nothing to store for UPSERT/LOAD DATA */
- if (conn->last_query_type != QUERY_SELECT || CONN_GET_STATE(conn) != CONN_FETCHING_DATA) {
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ if (conn->last_query_type != QUERY_SELECT || GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) {
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("Command out of sync");
break;
}
@@ -2559,7 +1925,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, use_result)(MYSQLND_CONN_DATA * const conn, co
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_conn_data, store_result)(MYSQLND_CONN_DATA * const conn, const unsigned int flags)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, store_result);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), store_result);
MYSQLND_RES * result = NULL;
DBG_ENTER("mysqlnd_conn_data::store_result");
@@ -2573,8 +1939,8 @@ MYSQLND_METHOD(mysqlnd_conn_data, store_result)(MYSQLND_CONN_DATA * const conn,
}
/* Nothing to store for UPSERT/LOAD DATA*/
- if (conn->last_query_type != QUERY_SELECT || CONN_GET_STATE(conn) != CONN_FETCHING_DATA) {
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ if (conn->last_query_type != QUERY_SELECT || GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) {
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("Command out of sync");
break;
}
@@ -2594,7 +1960,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, store_result)(MYSQLND_CONN_DATA * const conn,
}
}
if (!(f & (MYSQLND_STORE_NO_COPY | MYSQLND_STORE_COPY))) {
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Unknown fetch mode");
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Unknown fetch mode");
DBG_ERR("Unknown fetch mode");
break;
}
@@ -2615,7 +1981,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, store_result)(MYSQLND_CONN_DATA * const conn,
/* {{{ mysqlnd_conn_data::get_connection_stats */
static void
MYSQLND_METHOD(mysqlnd_conn_data, get_connection_stats)(const MYSQLND_CONN_DATA * const conn,
- zval * return_value ZEND_FILE_LINE_DC)
+ zval * return_value ZEND_FILE_LINE_DC)
{
DBG_ENTER("mysqlnd_conn_data::get_connection_stats");
mysqlnd_fill_stats_hash(conn->stats, mysqlnd_stats_values_names, return_value ZEND_FILE_LINE_CC);
@@ -2628,7 +1994,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_connection_stats)(const MYSQLND_CONN_DATA
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, set_autocommit)(MYSQLND_CONN_DATA * conn, unsigned int mode)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, set_autocommit);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), set_autocommit);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::set_autocommit");
@@ -2739,7 +2105,7 @@ mysqlnd_escape_string_for_tx_name_in_comment(const char * const name)
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * conn, const zend_bool commit, const unsigned int flags, const char * const name)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, tx_commit_or_rollback);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), tx_commit_or_rollback);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::tx_commit_or_rollback");
@@ -2763,7 +2129,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * con
name_esc = NULL;
}
if (!query) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
@@ -2783,7 +2149,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_commit_or_rollback)(MYSQLND_CONN_DATA * con
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsigned int mode, const char * const name)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, tx_begin);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), tx_begin);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::tx_begin");
@@ -2826,7 +2192,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
name_esc = NULL;
}
if (!query) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
ret = conn->m->query(conn, query, query_len);
@@ -2845,7 +2211,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint)(MYSQLND_CONN_DATA * conn, const char * const name)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, tx_savepoint);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), tx_savepoint);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::tx_savepoint");
@@ -2854,12 +2220,12 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint)(MYSQLND_CONN_DATA * conn, const
char * query;
unsigned int query_len;
if (!name) {
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Savepoint name not provided");
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Savepoint name not provided");
break;
}
query_len = mnd_sprintf(&query, 0, "SAVEPOINT `%s`", name);
if (!query) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
ret = conn->m->query(conn, query, query_len);
@@ -2877,7 +2243,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint)(MYSQLND_CONN_DATA * conn, const
static enum_func_status
MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint_release)(MYSQLND_CONN_DATA * conn, const char * const name)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_data_methods, tx_savepoint_release);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data), tx_savepoint_release);
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_conn_data::tx_savepoint_release");
@@ -2886,12 +2252,12 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint_release)(MYSQLND_CONN_DATA * conn
char * query;
unsigned int query_len;
if (!name) {
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Savepoint name not provided");
+ SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Savepoint name not provided");
break;
}
query_len = mnd_sprintf(&query, 0, "RELEASE SAVEPOINT `%s`", name);
if (!query) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
ret = conn->m->query(conn, query, query_len);
@@ -2906,8 +2272,8 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_savepoint_release)(MYSQLND_CONN_DATA * conn
/* {{{ mysqlnd_conn_data::negotiate_client_api_capabilities */
-static unsigned int
-MYSQLND_METHOD(mysqlnd_conn_data, negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const unsigned int flags)
+static size_t
+MYSQLND_METHOD(mysqlnd_conn_data, negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const size_t flags)
{
unsigned int ret = 0;
DBG_ENTER("mysqlnd_conn_data::negotiate_client_api_capabilities");
@@ -2922,7 +2288,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, negotiate_client_api_capabilities)(MYSQLND_CON
/* {{{ mysqlnd_conn_data::get_client_api_capabilities */
-static unsigned int
+static size_t
MYSQLND_METHOD(mysqlnd_conn_data, get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn)
{
DBG_ENTER("mysqlnd_conn_data::get_client_api_capabilities");
@@ -2933,18 +2299,17 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_client_api_capabilities)(const MYSQLND_CON
/* {{{ mysqlnd_conn_data::local_tx_start */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, local_tx_start)(MYSQLND_CONN_DATA * conn, size_t this_func)
+MYSQLND_METHOD(mysqlnd_conn_data, local_tx_start)(MYSQLND_CONN_DATA * conn, const size_t this_func)
{
- enum_func_status ret = PASS;
DBG_ENTER("mysqlnd_conn_data::local_tx_start");
- DBG_RETURN(ret);
+ DBG_RETURN(PASS);
}
/* }}} */
/* {{{ mysqlnd_conn_data::local_tx_end */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end)(MYSQLND_CONN_DATA * conn, size_t this_func, enum_func_status status)
+MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end)(MYSQLND_CONN_DATA * conn, const size_t this_func, const enum_func_status status)
{
DBG_ENTER("mysqlnd_conn_data::local_tx_end");
DBG_RETURN(status);
@@ -2952,27 +2317,19 @@ MYSQLND_METHOD(mysqlnd_conn_data, local_tx_end)(MYSQLND_CONN_DATA * conn, size_t
/* }}} */
-/* {{{ mysqlnd_conn_data::init */
-static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn_data, init)(MYSQLND_CONN_DATA * conn)
+/* {{{ _mysqlnd_stmt_init */
+MYSQLND_STMT *
+MYSQLND_METHOD(mysqlnd_conn_data, stmt_init)(MYSQLND_CONN_DATA * const conn)
{
- DBG_ENTER("mysqlnd_conn_data::init");
- mysqlnd_stats_init(&conn->stats, STAT_LAST);
- SET_ERROR_AFF_ROWS(conn);
-
- conn->net = mysqlnd_net_init(conn->persistent, conn->stats, conn->error_info);
- conn->protocol = mysqlnd_protocol_init(conn->persistent);
-
- DBG_RETURN(conn->stats && conn->net && conn->protocol? PASS:FAIL);
+ MYSQLND_STMT * ret;
+ DBG_ENTER("mysqlnd_conn_data::stmt_init");
+ ret = conn->object_factory.get_prepared_statement(conn, conn->persistent);
+ DBG_RETURN(ret);
}
/* }}} */
-MYSQLND_STMT * _mysqlnd_stmt_init(MYSQLND_CONN_DATA * const conn);
-
-
MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
- MYSQLND_METHOD(mysqlnd_conn_data, init),
MYSQLND_METHOD(mysqlnd_conn_data, connect),
MYSQLND_METHOD(mysqlnd_conn_data, escape_string),
@@ -2985,7 +2342,7 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD(mysqlnd_conn_data, next_result),
MYSQLND_METHOD(mysqlnd_conn_data, more_results),
- _mysqlnd_stmt_init,
+ MYSQLND_METHOD(mysqlnd_conn_data, stmt_init),
MYSQLND_METHOD(mysqlnd_conn_data, shutdown),
MYSQLND_METHOD(mysqlnd_conn_data, refresh),
@@ -2996,7 +2353,7 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD(mysqlnd_conn_data, dump_debug_info),
MYSQLND_METHOD(mysqlnd_conn_data, change_user),
- MYSQLND_METHOD(mysqlnd_conn_data, errno),
+ MYSQLND_METHOD(mysqlnd_conn_data, err_no),
MYSQLND_METHOD(mysqlnd_conn_data, error),
MYSQLND_METHOD(mysqlnd_conn_data, sqlstate),
MYSQLND_METHOD(mysqlnd_conn_data, thread_id),
@@ -3010,7 +2367,6 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD(mysqlnd_conn_data, get_proto_info),
MYSQLND_METHOD(mysqlnd_conn_data, info),
MYSQLND_METHOD(mysqlnd_conn_data, charset_name),
- MYSQLND_METHOD(mysqlnd_conn_data, list_fields),
MYSQLND_METHOD(mysqlnd_conn_data, list_method),
MYSQLND_METHOD(mysqlnd_conn_data, insert_id),
@@ -3031,11 +2387,7 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, get_reference),
MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, free_reference),
- MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, get_state),
- MYSQLND_METHOD_PRIVATE(mysqlnd_conn_data, set_state),
- MYSQLND_METHOD(mysqlnd_conn_data, simple_command),
- MYSQLND_METHOD(mysqlnd_conn_data, simple_command_handle_response),
MYSQLND_METHOD(mysqlnd_conn_data, restart_psession),
MYSQLND_METHOD(mysqlnd_conn_data, end_psession),
MYSQLND_METHOD(mysqlnd_conn_data, send_close),
@@ -3056,13 +2408,14 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn_data)
MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands),
MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags),
MYSQLND_METHOD(mysqlnd_conn_data, connect_handshake),
- MYSQLND_METHOD(mysqlnd_conn_data, simple_command_send_request),
MYSQLND_METHOD(mysqlnd_conn_data, fetch_auth_plugin_by_name),
MYSQLND_METHOD(mysqlnd_conn_data, set_client_option_2d),
MYSQLND_METHOD(mysqlnd_conn_data, negotiate_client_api_capabilities),
- MYSQLND_METHOD(mysqlnd_conn_data, get_client_api_capabilities)
+ MYSQLND_METHOD(mysqlnd_conn_data, get_client_api_capabilities),
+
+ MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)
MYSQLND_CLASS_METHODS_END;
@@ -3072,7 +2425,7 @@ MYSQLND_METHOD(mysqlnd_conn, clone_object)(MYSQLND * const conn)
{
MYSQLND * ret;
DBG_ENTER("mysqlnd_conn::get_reference");
- ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).clone_connection_object(conn);
+ ret = conn->data->object_factory.clone_connection_object(conn);
DBG_RETURN(ret);
}
/* }}} */
@@ -3096,9 +2449,9 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn, dtor)(MYSQLND * conn)
/* {{{ mysqlnd_conn_data::close */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn, close)(MYSQLND * conn_handle, enum_connection_close_type close_type)
+MYSQLND_METHOD(mysqlnd_conn, close)(MYSQLND * conn_handle, const enum_connection_close_type close_type)
{
- size_t this_func = STRUCT_OFFSET(struct st_mysqlnd_conn_methods, close);
+ const size_t this_func = STRUCT_OFFSET(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn), close);
MYSQLND_CONN_DATA * conn = conn_handle->data;
enum_func_status ret = FAIL;
@@ -3106,7 +2459,7 @@ MYSQLND_METHOD(mysqlnd_conn, close)(MYSQLND * conn_handle, enum_connection_close
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (PASS == conn->m->local_tx_start(conn, this_func)) {
- if (CONN_GET_STATE(conn) >= CONN_READY) {
+ if (GET_CONNECTION_STATE(&conn->state) >= CONN_READY) {
static enum_mysqlnd_collected_stats close_type_to_stat_map[MYSQLND_CLOSE_LAST] = {
STAT_CLOSE_EXPLICIT,
STAT_CLOSE_IMPLICIT,
@@ -3121,7 +2474,7 @@ MYSQLND_METHOD(mysqlnd_conn, close)(MYSQLND * conn_handle, enum_connection_close
*/
ret = conn->m->send_close(conn);
- /* do it after free_reference/dtor and we might crash */
+ /* If we do it after free_reference/dtor then we might crash */
conn->m->local_tx_end(conn, this_func, ret);
conn_handle->m->dtor(conn_handle);
@@ -3139,20 +2492,267 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn)
MYSQLND_CLASS_METHODS_END;
-/* {{{ mysqlnd_init */
+#include "php_network.h"
+
+/* {{{ mysqlnd_stream_array_to_fd_set */
+MYSQLND **
+mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array)
+{
+ unsigned int cnt = 0;
+ MYSQLND **p = conn_array, **p_p;
+ MYSQLND **ret = NULL;
+
+ while (*p) {
+ const enum mysqlnd_connection_state conn_state = GET_CONNECTION_STATE(&((*p)->data->state));
+ if (conn_state <= CONN_READY || conn_state == CONN_QUIT_SENT) {
+ cnt++;
+ }
+ p++;
+ }
+ if (cnt) {
+ MYSQLND **ret_p = ret = ecalloc(cnt + 1, sizeof(MYSQLND *));
+ p_p = p = conn_array;
+ while (*p) {
+ const enum mysqlnd_connection_state conn_state = GET_CONNECTION_STATE(&((*p)->data->state));
+ if (conn_state <= CONN_READY || conn_state == CONN_QUIT_SENT) {
+ *ret_p = *p;
+ *p = NULL;
+ ret_p++;
+ } else {
+ *p_p = *p;
+ p_p++;
+ }
+ p++;
+ }
+ *ret_p = NULL;
+ }
+ return ret;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_stream_array_to_fd_set */
+static unsigned int
+mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, php_socket_t * max_fd)
+{
+ php_socket_t this_fd;
+ php_stream *stream = NULL;
+ unsigned int cnt = 0;
+ MYSQLND **p = conn_array;
+ DBG_ENTER("mysqlnd_stream_array_to_fd_set");
+
+ while (*p) {
+ /* get the fd.
+ * NB: Most other code will NOT use the PHP_STREAM_CAST_INTERNAL flag
+ * when casting. It is only used here so that the buffered data warning
+ * is not displayed.
+ * */
+ stream = (*p)->data->vio->data->m.get_stream((*p)->data->vio);
+ DBG_INF_FMT("conn=%llu stream=%p", (*p)->data->thread_id, stream);
+ if (stream != NULL &&
+ SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) &&
+ ZEND_VALID_SOCKET(this_fd))
+ {
+
+ PHP_SAFE_FD_SET(this_fd, fds);
+
+ if (this_fd > *max_fd) {
+ *max_fd = this_fd;
+ }
+ ++cnt;
+ }
+ ++p;
+ }
+ DBG_RETURN(cnt ? 1 : 0);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_stream_array_from_fd_set */
+static unsigned int
+mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds)
+{
+ php_socket_t this_fd;
+ php_stream *stream = NULL;
+ unsigned int ret = 0;
+ zend_bool disproportion = FALSE;
+ MYSQLND **fwd = conn_array, **bckwd = conn_array;
+ DBG_ENTER("mysqlnd_stream_array_from_fd_set");
+
+ while (*fwd) {
+ stream = (*fwd)->data->vio->data->m.get_stream((*fwd)->data->vio);
+ DBG_INF_FMT("conn=%llu stream=%p", (*fwd)->data->thread_id, stream);
+ if (stream != NULL && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL,
+ (void*)&this_fd, 1) && ZEND_VALID_SOCKET(this_fd)) {
+ if (PHP_SAFE_FD_ISSET(this_fd, fds)) {
+ if (disproportion) {
+ *bckwd = *fwd;
+ }
+ ++bckwd;
+ ++fwd;
+ ++ret;
+ continue;
+ }
+ }
+ disproportion = TRUE;
+ ++fwd;
+ }
+ *bckwd = NULL;/* NULL-terminate the list */
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+#ifndef PHP_WIN32
+#define php_select(m, r, w, e, t) select(m, r, w, e, t)
+#else
+#include "win32/select.h"
+#endif
+
+
+/* {{{ mysqlnd_poll */
+PHPAPI enum_func_status
+mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND ***dont_poll, long sec, long usec, int * desc_num)
+{
+ struct timeval tv;
+ struct timeval *tv_p = NULL;
+ fd_set rfds, wfds, efds;
+ php_socket_t max_fd = 0;
+ int retval, sets = 0;
+ int set_count, max_set_count = 0;
+
+ DBG_ENTER("_mysqlnd_poll");
+ if (sec < 0 || usec < 0) {
+ php_error_docref(NULL, E_WARNING, "Negative values passed for sec and/or usec");
+ DBG_RETURN(FAIL);
+ }
+
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+ FD_ZERO(&efds);
+
+ if (r_array != NULL) {
+ *dont_poll = mysqlnd_stream_array_check_for_readiness(r_array);
+ set_count = mysqlnd_stream_array_to_fd_set(r_array, &rfds, &max_fd);
+ if (set_count > max_set_count) {
+ max_set_count = set_count;
+ }
+ sets += set_count;
+ }
+
+ if (e_array != NULL) {
+ set_count = mysqlnd_stream_array_to_fd_set(e_array, &efds, &max_fd);
+ if (set_count > max_set_count) {
+ max_set_count = set_count;
+ }
+ sets += set_count;
+ }
+
+ if (!sets) {
+ php_error_docref(NULL, E_WARNING, *dont_poll ? "All arrays passed are clear":"No stream arrays were passed");
+ DBG_ERR_FMT(*dont_poll ? "All arrays passed are clear":"No stream arrays were passed");
+ DBG_RETURN(FAIL);
+ }
+
+ PHP_SAFE_MAX_FD(max_fd, max_set_count);
+
+ /* Solaris + BSD do not like microsecond values which are >= 1 sec */
+ if (usec > 999999) {
+ tv.tv_sec = sec + (usec / 1000000);
+ tv.tv_usec = usec % 1000000;
+ } else {
+ tv.tv_sec = sec;
+ tv.tv_usec = usec;
+ }
+
+ tv_p = &tv;
+
+ retval = php_select(max_fd + 1, &rfds, &wfds, &efds, tv_p);
+
+ if (retval == -1) {
+ php_error_docref(NULL, E_WARNING, "unable to select [%d]: %s (max_fd=%d)",
+ errno, strerror(errno), max_fd);
+ DBG_RETURN(FAIL);
+ }
+
+ if (r_array != NULL) {
+ mysqlnd_stream_array_from_fd_set(r_array, &rfds);
+ }
+ if (e_array != NULL) {
+ mysqlnd_stream_array_from_fd_set(e_array, &efds);
+ }
+
+ *desc_num = retval;
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_connect */
+PHPAPI MYSQLND * mysqlnd_connection_connect(MYSQLND * conn_handle,
+ const char * const host,
+ const char * const user,
+ const char * const passwd, unsigned int passwd_len,
+ const char * const db, unsigned int db_len,
+ unsigned int port,
+ const char * const sock_or_pipe,
+ unsigned int mysql_flags,
+ unsigned int client_api_flags
+ )
+{
+ enum_func_status ret = FAIL;
+ zend_bool self_alloced = FALSE;
+ MYSQLND_CSTRING hostname = { host, host? strlen(host) : 0 };
+ MYSQLND_CSTRING username = { user, user? strlen(user) : 0 };
+ MYSQLND_CSTRING password = { passwd, passwd_len };
+ MYSQLND_CSTRING database = { db, db_len };
+ MYSQLND_CSTRING socket_or_pipe = { sock_or_pipe, sock_or_pipe? strlen(sock_or_pipe) : 0 };
+
+ DBG_ENTER("mysqlnd_connect");
+ DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u", host? host:"", user? user:"", db? db:"", port, mysql_flags);
+
+ if (!conn_handle) {
+ self_alloced = TRUE;
+ if (!(conn_handle = mysqlnd_connection_init(client_api_flags, FALSE, NULL))) {
+ /* OOM */
+ DBG_RETURN(NULL);
+ }
+ }
+
+ ret = conn_handle->m->connect(conn_handle, hostname, username, password, database, port, socket_or_pipe, mysql_flags);
+
+ if (ret == FAIL) {
+ if (self_alloced) {
+ /*
+ We have alloced, thus there are no references to this
+ object - we are free to kill it!
+ */
+ conn_handle->m->dtor(conn_handle);
+ }
+ DBG_RETURN(NULL);
+ }
+ DBG_RETURN(conn_handle);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_connection_init */
PHPAPI MYSQLND *
-mysqlnd_init(unsigned int flags, zend_bool persistent)
+mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory)
{
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
MYSQLND * ret;
- DBG_ENTER("mysqlnd_init");
- ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).get_connection(persistent);
+ DBG_ENTER("mysqlnd_connection_init");
+ ret = factory->get_connection(factory, persistent);
if (ret && ret->data) {
- ret->data->m->negotiate_client_api_capabilities(ret->data, flags);
+ ret->data->m->negotiate_client_api_capabilities(ret->data, client_flags);
}
DBG_RETURN(ret);
}
/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/mysqlnd/mysqlnd_connection.h b/ext/mysqlnd/mysqlnd_connection.h
new file mode 100644
index 0000000000..71fca55ceb
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_connection.h
@@ -0,0 +1,87 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_CONNECTION_H
+#define MYSQLND_CONNECTION_H
+
+PHPAPI extern const char * const mysqlnd_out_of_sync;
+PHPAPI extern const char * const mysqlnd_server_gone;
+PHPAPI extern const char * const mysqlnd_out_of_memory;
+
+
+void mysqlnd_upsert_status_init(MYSQLND_UPSERT_STATUS * const upsert_status);
+
+#define UPSERT_STATUS_RESET(status) (status)->m->reset((status))
+
+#define UPSERT_STATUS_GET_SERVER_STATUS(status) (status)->server_status
+#define UPSERT_STATUS_SET_SERVER_STATUS(status, server_st) (status)->server_status = (server_st)
+
+#define UPSERT_STATUS_GET_WARNINGS(status) (status)->warning_count
+#define UPSERT_STATUS_SET_WARNINGS(status, warnings) (status)->warning_count = (warnings)
+
+#define UPSERT_STATUS_GET_AFFECTED_ROWS(status) (status)->affected_rows
+#define UPSERT_STATUS_SET_AFFECTED_ROWS(status, rows) (status)->affected_rows = (rows)
+#define UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(status) (status)->m->set_affected_rows_to_error((status))
+
+#define UPSERT_STATUS_GET_LAST_INSERT_ID(status) (status)->last_insert_id
+#define UPSERT_STATUS_SET_LAST_INSERT_ID(status, id) (status)->last_insert_id = (id)
+
+
+/* Error handling */
+#define SET_NEW_MESSAGE(buf, buf_len, message, len, persistent) \
+ {\
+ if ((buf)) { \
+ mnd_pefree((buf), (persistent)); \
+ } \
+ if ((message)) { \
+ (buf) = mnd_pestrndup((message), (len), (persistent)); \
+ } else { \
+ (buf) = NULL; \
+ } \
+ (buf_len) = (len); \
+ }
+
+#define SET_EMPTY_MESSAGE(buf, buf_len, persistent) \
+ {\
+ if ((buf)) { \
+ mnd_pefree((buf), (persistent)); \
+ (buf) = NULL; \
+ } \
+ (buf_len) = 0; \
+ }
+
+
+PHPAPI enum_func_status mysqlnd_error_info_init(MYSQLND_ERROR_INFO * const info, const zend_bool persistent);
+PHPAPI void mysqlnd_error_info_free_contents(MYSQLND_ERROR_INFO * const info);
+
+#define GET_CONNECTION_STATE(state_struct) (state_struct)->m->get((state_struct))
+#define SET_CONNECTION_STATE(state_struct, s) (state_struct)->m->set((state_struct), (s))
+
+PHPAPI void mysqlnd_connection_state_init(struct st_mysqlnd_connection_state * const state);
+
+#endif /* MYSQLND_CONNECTION_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c
index 886a6d8ac6..3a03d56975 100644
--- a/ext/mysqlnd/mysqlnd_debug.c
+++ b/ext/mysqlnd/mysqlnd_debug.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
@@ -761,7 +758,7 @@ static struct st_mysqlnd_plugin_trace_log mysqlnd_plugin_trace_log_plugin =
MYSQLND_VERSION_ID,
PHP_MYSQLND_VERSION,
"PHP License 3.01",
- "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>, Georg Richter <georg@mysql.com>",
+ "Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>, Georg Richter <georg@php.net>",
{
NULL, /* no statistics , will be filled later if there are some */
NULL, /* no statistics */
diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h
index 1e6d0c17a6..c9eced8af3 100644
--- a/ext/mysqlnd/mysqlnd_debug.h
+++ b/ext/mysqlnd/mysqlnd_debug.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_DEBUG_H
#define MYSQLND_DEBUG_H
@@ -70,6 +67,17 @@ void mysqlnd_debug_trace_plugin_register(void);
PHPAPI MYSQLND_DEBUG * mysqlnd_debug_init(const char * skip_functions[]);
+#define MYSQLND_DEBUG_DUMP_TIME 1
+#define MYSQLND_DEBUG_DUMP_TRACE 2
+#define MYSQLND_DEBUG_DUMP_PID 4
+#define MYSQLND_DEBUG_DUMP_LINE 8
+#define MYSQLND_DEBUG_DUMP_FILE 16
+#define MYSQLND_DEBUG_DUMP_LEVEL 32
+#define MYSQLND_DEBUG_APPEND 64
+#define MYSQLND_DEBUG_FLUSH 128
+#define MYSQLND_DEBUG_TRACE_MEMORY_CALLS 256
+#define MYSQLND_DEBUG_PROFILE_CALLS 512
+
#if defined(__GNUC__) || defined(PHP_WIN32)
#ifdef PHP_WIN32
@@ -115,6 +123,7 @@ PHPAPI MYSQLND_DEBUG * mysqlnd_debug_init(const char * skip_functions[]);
struct timeval __dbg_prof_tp = {0}; \
uint64_t __dbg_prof_start = 0; /* initialization is needed */ \
zend_bool dbg_skip_trace = TRUE; \
+ ((void)__dbg_prof_start); \
if ((dbg_obj1)) { \
dbg_skip_trace = !(dbg_obj1)->m->func_enter((dbg_obj1), __LINE__, __FILE__, func_name, strlen(func_name)); \
} \
diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c
index 90da451ae4..ced03cf3b2 100644
--- a/ext/mysqlnd/mysqlnd_driver.c
+++ b/ext/mysqlnd/mysqlnd_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,20 +12,21 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c 317989 2011-10-10 20:49:28Z andrey $ */
#include "php.h"
#include "mysqlnd.h"
+#include "mysqlnd_vio.h"
+#include "mysqlnd_protocol_frame_codec.h"
#include "mysqlnd_wireprotocol.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_ps.h"
+#include "mysqlnd_plugin.h"
#include "mysqlnd_priv.h"
-#include "mysqlnd_result.h"
#include "mysqlnd_statistics.h"
-#include "mysqlnd_charset.h"
#include "mysqlnd_debug.h"
#include "mysqlnd_reverse_api.h"
#include "mysqlnd_ext_plugin.h"
@@ -40,7 +41,7 @@ static struct st_mysqlnd_plugin_core mysqlnd_plugin_core =
MYSQLND_VERSION_ID,
PHP_MYSQLND_VERSION,
"PHP License 3.01",
- "Andrey Hristov <andrey@mysql.com>, Ulf Wendel <uwendel@mysql.com>, Georg Richter <georg@mysql.com>",
+ "Andrey Hristov <andrey@php.net>, Ulf Wendel <uw@php.net>, Georg Richter <georg@php.net>",
{
NULL, /* will be filled later */
mysqlnd_stats_values_names,
@@ -57,7 +58,7 @@ PHPAPI void mysqlnd_library_end(void)
{
if (mysqlnd_library_initted == TRUE) {
mysqlnd_plugin_subsystem_end();
- mysqlnd_stats_end(mysqlnd_global_stats);
+ mysqlnd_stats_end(mysqlnd_global_stats, 1);
mysqlnd_global_stats = NULL;
mysqlnd_library_initted = FALSE;
mysqlnd_reverse_api_end();
@@ -75,7 +76,7 @@ PHPAPI void mysqlnd_library_init(void)
mysqlnd_conn_data_set_methods(&MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_conn_data));
_mysqlnd_init_ps_subsystem();
/* Should be calloc, as mnd_calloc will reference LOCK_access*/
- mysqlnd_stats_init(&mysqlnd_global_stats, STAT_LAST);
+ mysqlnd_stats_init(&mysqlnd_global_stats, STAT_LAST, 1);
mysqlnd_plugin_subsystem_init();
{
mysqlnd_plugin_core.plugin_header.plugin_stats.values = mysqlnd_global_stats;
@@ -93,25 +94,9 @@ PHPAPI void mysqlnd_library_init(void)
/* }}} */
-
-/* {{{ mysqlnd_error_list_pdtor */
-static void
-mysqlnd_error_list_pdtor(void * pDest)
-{
- MYSQLND_ERROR_LIST_ELEMENT * element = (MYSQLND_ERROR_LIST_ELEMENT *) pDest;
-
- DBG_ENTER("mysqlnd_error_list_pdtor");
- if (element->error) {
- mnd_pefree(element->error, TRUE);
- }
- DBG_VOID_RETURN;
-}
-/* }}} */
-
-
/* {{{ mysqlnd_object_factory::get_connection */
static MYSQLND *
-MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory, const zend_bool persistent)
{
size_t alloc_size_ret = sizeof(MYSQLND) + mysqlnd_plugin_count() * sizeof(void *);
size_t alloc_size_ret_data = sizeof(MYSQLND_CONN_DATA) + mysqlnd_plugin_count() * sizeof(void *);
@@ -133,26 +118,36 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(zend_bool persistent)
new_object->m = mysqlnd_conn_get_methods();
data = new_object->data;
- data->error_info = &(data->error_info_impl);
+ if (FAIL == mysqlnd_error_info_init(&data->error_info_impl, persistent)) {
+ new_object->m->dtor(new_object);
+ DBG_RETURN(NULL);
+ }
+ data->error_info = &data->error_info_impl;
+
data->options = &(data->options_impl);
+
+ mysqlnd_upsert_status_init(&data->upsert_status_impl);
data->upsert_status = &(data->upsert_status_impl);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(data->upsert_status);
data->persistent = persistent;
data->m = mysqlnd_conn_data_get_methods();
- CONN_SET_STATE(data, CONN_ALLOCED);
+ data->object_factory = *factory;
+
+ mysqlnd_connection_state_init(&data->state);
+
data->m->get_reference(data);
- if (PASS != data->m->init(data)) {
- new_object->m->dtor(new_object);
- DBG_RETURN(NULL);
- }
+ mysqlnd_stats_init(&data->stats, STAT_LAST, persistent);
- data->error_info->error_list = mnd_pecalloc(1, sizeof(zend_llist), persistent);
- if (!data->error_info->error_list) {
+ data->protocol_frame_codec = mysqlnd_pfc_init(persistent, factory, data->stats, data->error_info);
+ data->vio = mysqlnd_vio_init(persistent, factory, data->stats, data->error_info);
+ data->payload_decoder_factory = mysqlnd_protocol_payload_decoder_factory_init(data, persistent);
+ data->command_factory = mysqlnd_command_factory_get();
+
+ if (!data->protocol_frame_codec || !data->vio || !data->payload_decoder_factory || !data->command_factory) {
new_object->m->dtor(new_object);
DBG_RETURN(NULL);
- } else {
- zend_llist_init(data->error_info->error_list, sizeof(MYSQLND_ERROR_LIST_ELEMENT), (llist_dtor_func_t)mysqlnd_error_list_pdtor, persistent);
}
DBG_RETURN(new_object);
@@ -191,7 +186,7 @@ MYSQLND_METHOD(mysqlnd_object_factory, clone_connection_object)(MYSQLND * to_be_
/* {{{ mysqlnd_object_factory::get_prepared_statement */
static MYSQLND_STMT *
-MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA * const conn)
+MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA * const conn, const zend_bool persistent)
{
size_t alloc_size = sizeof(MYSQLND_STMT) + mysqlnd_plugin_count() * sizeof(void *);
MYSQLND_STMT * ret = mnd_pecalloc(1, alloc_size, conn->persistent);
@@ -205,13 +200,19 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA
ret->m = mysqlnd_stmt_get_methods();
ret->persistent = conn->persistent;
- stmt = ret->data = mnd_pecalloc(1, sizeof(MYSQLND_STMT_DATA), conn->persistent);
+ stmt = ret->data = mnd_pecalloc(1, sizeof(MYSQLND_STMT_DATA), persistent);
DBG_INF_FMT("stmt=%p", stmt);
if (!stmt) {
break;
}
- stmt->persistent = conn->persistent;
- stmt->error_info = &(stmt->error_info_impl);
+ stmt->persistent = persistent;
+
+ if (FAIL == mysqlnd_error_info_init(&stmt->error_info_impl, persistent)) {
+ break;
+ }
+ stmt->error_info = &stmt->error_info_impl;
+
+ mysqlnd_upsert_status_init(&stmt->upsert_status_impl);
stmt->upsert_status = &(stmt->upsert_status_impl);
stmt->state = MYSQLND_STMT_INITTED;
stmt->execute_cmd_buffer.length = 4096;
@@ -221,23 +222,18 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA
}
stmt->prefetch_rows = MYSQLND_DEFAULT_PREFETCH_ROWS;
+
/*
Mark that we reference the connection, thus it won't be
be destructed till there is open statements. The last statement
or normal query result will close it then.
*/
stmt->conn = conn->m->get_reference(conn);
- stmt->error_info->error_list = mnd_pecalloc(1, sizeof(zend_llist), ret->persistent);
- if (!stmt->error_info->error_list) {
- break;
- }
-
- zend_llist_init(stmt->error_info->error_list, sizeof(MYSQLND_ERROR_LIST_ELEMENT), (llist_dtor_func_t) mysqlnd_error_list_pdtor, conn->persistent);
DBG_RETURN(ret);
} while (0);
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
if (ret) {
ret->m->dtor(ret, TRUE);
ret = NULL;
@@ -247,53 +243,89 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement)(MYSQLND_CONN_DATA
/* }}} */
-/* {{{ mysqlnd_object_factory::get_io_channel */
-PHPAPI MYSQLND_NET *
-MYSQLND_METHOD(mysqlnd_object_factory, get_io_channel)(zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
+/* {{{ mysqlnd_object_factory::get_pfc */
+static MYSQLND_PFC *
+MYSQLND_METHOD(mysqlnd_object_factory, get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
+{
+ size_t pfc_alloc_size = sizeof(MYSQLND_PFC) + mysqlnd_plugin_count() * sizeof(void *);
+ size_t pfc_data_alloc_size = sizeof(MYSQLND_PFC_DATA) + mysqlnd_plugin_count() * sizeof(void *);
+ MYSQLND_PFC * pfc = mnd_pecalloc(1, pfc_alloc_size, persistent);
+ MYSQLND_PFC_DATA * pfc_data = mnd_pecalloc(1, pfc_data_alloc_size, persistent);
+
+ DBG_ENTER("mysqlnd_object_factory::get_pfc");
+ DBG_INF_FMT("persistent=%u", persistent);
+ if (pfc && pfc_data) {
+ pfc->data = pfc_data;
+ pfc->persistent = pfc->data->persistent = persistent;
+ pfc->data->m = *mysqlnd_pfc_get_methods();
+
+ if (PASS != pfc->data->m.init(pfc, stats, error_info)) {
+ pfc->data->m.dtor(pfc, stats, error_info);
+ pfc = NULL;
+ }
+ } else {
+ if (pfc_data) {
+ mnd_pefree(pfc_data, persistent);
+ pfc_data = NULL;
+ }
+ if (pfc) {
+ mnd_pefree(pfc, persistent);
+ pfc = NULL;
+ }
+ }
+ DBG_RETURN(pfc);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_object_factory::get_vio */
+static MYSQLND_VIO *
+MYSQLND_METHOD(mysqlnd_object_factory, get_vio)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
{
- size_t net_alloc_size = sizeof(MYSQLND_NET) + mysqlnd_plugin_count() * sizeof(void *);
- size_t net_data_alloc_size = sizeof(MYSQLND_NET_DATA) + mysqlnd_plugin_count() * sizeof(void *);
- MYSQLND_NET * net = mnd_pecalloc(1, net_alloc_size, persistent);
- MYSQLND_NET_DATA * net_data = mnd_pecalloc(1, net_data_alloc_size, persistent);
+ size_t vio_alloc_size = sizeof(MYSQLND_VIO) + mysqlnd_plugin_count() * sizeof(void *);
+ size_t vio_data_alloc_size = sizeof(MYSQLND_VIO_DATA) + mysqlnd_plugin_count() * sizeof(void *);
+ MYSQLND_VIO * vio = mnd_pecalloc(1, vio_alloc_size, persistent);
+ MYSQLND_VIO_DATA * vio_data = mnd_pecalloc(1, vio_data_alloc_size, persistent);
- DBG_ENTER("mysqlnd_object_factory::get_io_channel");
+ DBG_ENTER("mysqlnd_object_factory::get_vio");
DBG_INF_FMT("persistent=%u", persistent);
- if (net && net_data) {
- net->data = net_data;
- net->persistent = net->data->persistent = persistent;
- net->data->m = *mysqlnd_net_get_methods();
-
- if (PASS != net->data->m.init(net, stats, error_info)) {
- net->data->m.dtor(net, stats, error_info);
- net = NULL;
+ if (vio && vio_data) {
+ vio->data = vio_data;
+ vio->persistent = vio->data->persistent = persistent;
+ vio->data->m = *mysqlnd_vio_get_methods();
+
+ if (PASS != vio->data->m.init(vio, stats, error_info)) {
+ vio->data->m.dtor(vio, stats, error_info);
+ vio = NULL;
}
} else {
- if (net_data) {
- mnd_pefree(net_data, persistent);
- net_data = NULL;
+ if (vio_data) {
+ mnd_pefree(vio_data, persistent);
+ vio_data = NULL;
}
- if (net) {
- mnd_pefree(net, persistent);
- net = NULL;
+ if (vio) {
+ mnd_pefree(vio, persistent);
+ vio = NULL;
}
}
- DBG_RETURN(net);
+ DBG_RETURN(vio);
}
/* }}} */
-/* {{{ mysqlnd_object_factory::get_protocol_decoder */
-static MYSQLND_PROTOCOL *
-MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_decoder)(zend_bool persistent)
+/* {{{ mysqlnd_object_factory::get_protocol_payload_decoder_factory */
+static MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *
+MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const zend_bool persistent)
{
- size_t alloc_size = sizeof(MYSQLND_PROTOCOL) + mysqlnd_plugin_count() * sizeof(void *);
- MYSQLND_PROTOCOL *ret = mnd_pecalloc(1, alloc_size, persistent);
+ size_t alloc_size = sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + mysqlnd_plugin_count() * sizeof(void *);
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *ret = mnd_pecalloc(1, alloc_size, persistent);
- DBG_ENTER("mysqlnd_object_factory::get_protocol_decoder");
+ DBG_ENTER("mysqlnd_object_factory::get_protocol_payload_decoder_factory");
DBG_INF_FMT("persistent=%u", persistent);
if (ret) {
ret->persistent = persistent;
- ret->m = mysqlnd_mysqlnd_protocol_methods;
+ ret->conn = conn;
+ ret->m = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
}
DBG_RETURN(ret);
@@ -305,8 +337,9 @@ PHPAPI MYSQLND_CLASS_METHODS_START(mysqlnd_object_factory)
MYSQLND_METHOD(mysqlnd_object_factory, get_connection),
MYSQLND_METHOD(mysqlnd_object_factory, clone_connection_object),
MYSQLND_METHOD(mysqlnd_object_factory, get_prepared_statement),
- MYSQLND_METHOD(mysqlnd_object_factory, get_io_channel),
- MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_decoder)
+ MYSQLND_METHOD(mysqlnd_object_factory, get_pfc),
+ MYSQLND_METHOD(mysqlnd_object_factory, get_vio),
+ MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory)
MYSQLND_CLASS_METHODS_END;
/*
diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h
index 62f45a4f18..50fda41208 100644
--- a/ext/mysqlnd/mysqlnd_enum_n_def.h
+++ b/ext/mysqlnd/mysqlnd_enum_n_def.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,12 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#ifndef MYSQLND_ENUM_N_DEF_H
#define MYSQLND_ENUM_N_DEF_H
@@ -49,6 +48,9 @@
#define MYSQLND_NET_CMD_BUFFER_MIN_SIZE 4096
#define MYSQLND_NET_CMD_BUFFER_MIN_SIZE_STR "4096"
+#define MYSQLND_STMT_ID_LENGTH 4
+
+
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
@@ -101,6 +103,10 @@
#define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21) /* Enable authentication response packet to be larger than 255 bytes. */
#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22) /* Don't close the connection for a connection with expired password. */
#define CLIENT_SESSION_TRACK (1UL << 23) /* Extended OK */
+/*
+ This is a mysqlnd extension. CLIENT_ODBC is not used anyway. We will reuse it for our case and translate it to not using SSL peer verification
+*/
+#define CLIENT_SSL_DONT_VERIFY_SERVER_CERT CLIENT_ODBC
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
@@ -108,7 +114,29 @@
CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION | \
CLIENT_MULTI_RESULTS | CLIENT_LOCAL_FILES | CLIENT_PLUGIN_AUTH)
-#define MYSQLND_NET_FLAG_USE_COMPRESSION 1
+#define MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION 1
+
+
+/* Client Error codes */
+#define CR_UNKNOWN_ERROR 2000
+#define CR_CONNECTION_ERROR 2002
+#define CR_SERVER_GONE_ERROR 2006
+#define CR_OUT_OF_MEMORY 2008
+#define CR_SERVER_LOST 2013
+#define CR_COMMANDS_OUT_OF_SYNC 2014
+#define CR_CANT_FIND_CHARSET 2019
+#define CR_MALFORMED_PACKET 2027
+#define CR_NOT_IMPLEMENTED 2054
+#define CR_NO_PREPARE_STMT 2030
+#define CR_PARAMS_NOT_BOUND 2031
+#define CR_INVALID_PARAMETER_NO 2034
+#define CR_INVALID_BUFFER_USE 2035
+
+#define MYSQLND_EE_FILENOTFOUND 7890
+
+#define UNKNOWN_SQLSTATE "HY000"
+
+#define MAX_CHARSET_LEN 32
#define TRANS_START_NO_OPT 0
@@ -182,7 +210,7 @@ typedef enum mysqlnd_parse_exec_response_type
MYSQLND_PARSE_EXEC_RESPONSE_EXPLICIT,
} enum_mysqlnd_parse_exec_response_type;
-typedef enum mysqlnd_option
+typedef enum mysqlnd_client_option
{
MYSQL_OPT_CONNECT_TIMEOUT,
MYSQL_OPT_COMPRESS,
@@ -228,9 +256,9 @@ typedef enum mysqlnd_option
MYSQLND_OPT_SSL_PASSPHRASE = 209,
MYSQLND_OPT_MAX_ALLOWED_PACKET = 210,
MYSQLND_OPT_AUTH_PROTOCOL = 211
-} enum_mysqlnd_option;
+} enum_mysqlnd_client_option;
-typedef enum mysqlnd_protocol_type
+typedef enum mysqlnd_session_protocol_type
{
MYSQL_PROTOCOL_DEFAULT = 0,
MYSQL_PROTOCOL_TCP, /* all, supported */
@@ -238,7 +266,7 @@ typedef enum mysqlnd_protocol_type
MYSQL_PROTOCOL_PIPE, /* win32, not-supported */
MYSQL_PROTOCOL_MEMORY, /* win32, not-supported */
MYSQL_PROTOCOL_LAST
-} enum_mysqlnd_protocol_type;
+} enum_mysqlnd_session_protocol_type;
typedef enum mysqlnd_field_types
{
@@ -259,6 +287,7 @@ typedef enum mysqlnd_field_types
MYSQL_TYPE_NEWDATE = 14,
MYSQL_TYPE_VARCHAR = 15,
MYSQL_TYPE_BIT = 16,
+ MYSQL_TYPE_JSON=245,
MYSQL_TYPE_NEWDECIMAL=246,
MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248,
@@ -300,6 +329,7 @@ typedef enum mysqlnd_server_option
#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
#define FIELD_TYPE_SET MYSQL_TYPE_SET
+#define FIELD_TYPE_JSON MYSQL_TYPE_JSON
#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
@@ -488,6 +518,8 @@ typedef enum mysqlnd_collected_stats
STAT_MEM_STRNDUP_COUNT,
STAT_MEM_ESTRDUP_COUNT,
STAT_MEM_STRDUP_COUNT,
+ STAT_MEM_EDUP_COUNT,
+ STAT_MEM_DUP_COUNT,
STAT_TEXT_TYPE_FETCHED_NULL,
STAT_TEXT_TYPE_FETCHED_BIT,
STAT_TEXT_TYPE_FETCHED_INT8,
@@ -504,6 +536,7 @@ typedef enum mysqlnd_collected_stats
STAT_TEXT_TYPE_FETCHED_DATETIME,
STAT_TEXT_TYPE_FETCHED_TIMESTAMP,
STAT_TEXT_TYPE_FETCHED_STRING,
+ STAT_TEXT_TYPE_FETCHED_JSON,
STAT_TEXT_TYPE_FETCHED_BLOB,
STAT_TEXT_TYPE_FETCHED_ENUM,
STAT_TEXT_TYPE_FETCHED_SET,
@@ -628,7 +661,11 @@ enum php_mysqlnd_server_command
COM_BINLOG_DUMP_GTID = 30,
COM_RESET_CONNECTION = 31,
COM_STMT_EXECUTE_BATCH = 32,
- COM_END
+ COM_END,
+ /* Here follow own, non-protocol, commands */
+ COM_REAP_RESULT=240, /* own command */
+ COM_ENABLE_SSL, /* own command */
+ COM_HANDSHAKE, /* own command */
};
diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.c b/ext/mysqlnd/mysqlnd_ext_plugin.c
index ec88c29ced..4da47f6921 100644
--- a/ext/mysqlnd/mysqlnd_ext_plugin.c
+++ b/ext/mysqlnd/mysqlnd_ext_plugin.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,28 +12,29 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Johannes Schlüter <johannes@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c 318221 2011-10-19 15:04:12Z andrey $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_result.h"
#include "mysqlnd_debug.h"
+#include "mysqlnd_commands.h"
+#include "mysqlnd_ext_plugin.h"
static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
static struct st_mysqlnd_conn_data_methods * mysqlnd_conn_data_methods;
static struct st_mysqlnd_stmt_methods * mysqlnd_stmt_methods;
-/* {{{ _mysqlnd_plugin_get_plugin_connection_data */
-PHPAPI void **
-_mysqlnd_plugin_get_plugin_connection_data(const MYSQLND * conn, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_connection_data */
+static void **
+mysqlnd_plugin__get_plugin_connection_data(const MYSQLND * conn, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_connection_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_connection_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!conn || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -43,11 +44,11 @@ _mysqlnd_plugin_get_plugin_connection_data(const MYSQLND * conn, unsigned int pl
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_connection_data_data */
-PHPAPI void **
-_mysqlnd_plugin_get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_connection_data_data */
+static void **
+mysqlnd_plugin__get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_connection_data_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_connection_data_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!conn || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -57,10 +58,11 @@ _mysqlnd_plugin_get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn,
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_result_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_result_data */
+static void **
+mysqlnd_plugin__get_plugin_result_data(const MYSQLND_RES * result, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!result || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -70,10 +72,11 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_result_unbuffered_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_unbuffered_data(const MYSQLND_RES_UNBUFFERED * result, unsigned int plugin_id)
+/* {{{ _mysqlnd_plugin__get_plugin_result_unbuffered_data */
+static void **
+mysqlnd_plugin__get_plugin_result_unbuffered_data(const MYSQLND_RES_UNBUFFERED * result, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!result || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -83,10 +86,11 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_unbuffered_data(const MYSQLND_R
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_result_buffered_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_zval(const MYSQLND_RES_BUFFERED_ZVAL * result, unsigned int plugin_id)
+/* {{{ _mysqlnd_plugin__get_plugin_result_buffered_data */
+static void **
+mysqlnd_plugin__get_plugin_result_buffered_data_zval(const MYSQLND_RES_BUFFERED_ZVAL * result, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
+ DBG_ENTER("_mysqlnd_plugin__get_plugin_result_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!result || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -95,10 +99,11 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_zval(const MYSQLN
}
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_result_buffered_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_c(const MYSQLND_RES_BUFFERED_C * result, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_result_buffered_data */
+static void **
+mysqlnd_plugin__get_plugin_result_buffered_data_c(const MYSQLND_RES_BUFFERED_C * result, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_result_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_result_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!result || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -108,24 +113,25 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_c(const MYSQLND_R
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_protocol_data */
-PHPAPI void **
-_mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_protocol_data */
+static void **
+mysqlnd_plugin__get_plugin_protocol_data(const MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_protocol_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_protocol_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
- if (!protocol || plugin_id >= mysqlnd_plugin_count()) {
+ if (!factory || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
}
- DBG_RETURN((void *)((char *)protocol + sizeof(MYSQLND_PROTOCOL) + plugin_id * sizeof(void *)));
+ DBG_RETURN((void *)((char *)factory + sizeof(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY) + plugin_id * sizeof(void *)));
}
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_stmt_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_stmt_data */
+static void **
+mysqlnd_plugin__get_plugin_stmt_data(const MYSQLND_STMT * stmt, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_stmt_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_stmt_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
if (!stmt || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
@@ -135,160 +141,314 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, u
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_net_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsigned int plugin_id)
+/* {{{ mysqlnd_plugin__get_plugin_pfc_data */
+static void **
+mysqlnd_plugin__get_plugin_pfc_data(const MYSQLND_PFC * pfc, const unsigned int plugin_id)
{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_net_data");
+ DBG_ENTER("mysqlnd_plugin__get_plugin_pfc_data");
DBG_INF_FMT("plugin_id=%u", plugin_id);
- if (!net || plugin_id >= mysqlnd_plugin_count()) {
+ if (!pfc || plugin_id >= mysqlnd_plugin_count()) {
return NULL;
}
- DBG_RETURN((void *)((char *)net + sizeof(MYSQLND_NET) + plugin_id * sizeof(void *)));
+ DBG_RETURN((void *)((char *)pfc + sizeof(MYSQLND_PFC) + plugin_id * sizeof(void *)));
}
/* }}} */
+/* {{{ _mysqlnd_plugin__get_plugin_vio_data */
+static void **
+mysqlnd_plugin__get_plugin_vio_data(const MYSQLND_VIO * vio, const unsigned int plugin_id)
+{
+ DBG_ENTER("_mysqlnd_plugin__get_plugin_vio_data");
+ DBG_INF_FMT("plugin_id=%u", plugin_id);
+ if (!vio || plugin_id >= mysqlnd_plugin_count()) {
+ return NULL;
+ }
+ DBG_RETURN((void *)((char *)vio + sizeof(MYSQLND_VIO) + plugin_id * sizeof(void *)));
+}
+/* }}} */
-/* {{{ mysqlnd_conn_get_methods */
-PHPAPI struct st_mysqlnd_conn_methods *
-mysqlnd_conn_get_methods()
+struct st_mysqlnd_plugin__plugin_area_getters mysqlnd_plugin_area_getters =
{
- return mysqlnd_conn_methods;
+ mysqlnd_plugin__get_plugin_connection_data,
+ mysqlnd_plugin__get_plugin_connection_data_data,
+ mysqlnd_plugin__get_plugin_result_data,
+ mysqlnd_plugin__get_plugin_result_unbuffered_data,
+ mysqlnd_plugin__get_plugin_result_buffered_data_zval,
+ mysqlnd_plugin__get_plugin_result_buffered_data_c,
+ mysqlnd_plugin__get_plugin_stmt_data,
+ mysqlnd_plugin__get_plugin_protocol_data,
+ mysqlnd_plugin__get_plugin_pfc_data,
+ mysqlnd_plugin__get_plugin_vio_data,
+};
+
+
+
+/* {{{ _mysqlnd_object_factory_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *
+_mysqlnd_object_factory_get_methods()
+{
+ return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
}
/* }}} */
/* {{{ mysqlnd_conn_set_methods */
-PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods *methods)
+static void
+_mysqlnd_object_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *methods)
+{
+ MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory) = *methods;
+}
+/* }}} */
+
+
+/* {{{ _mysqlnd_conn_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *
+_mysqlnd_conn_get_methods()
+{
+ return mysqlnd_conn_methods;
+}
+/* }}} */
+
+/* {{{ _mysqlnd_conn_set_methods */
+static void
+_mysqlnd_conn_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods)
{
mysqlnd_conn_methods = methods;
}
/* }}} */
-/* {{{ mysqlnd_conn_get_methods */
-PHPAPI struct st_mysqlnd_conn_data_methods *
-mysqlnd_conn_data_get_methods()
+/* {{{ _mysqlnd_conn_data_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *
+_mysqlnd_conn_data_get_methods()
{
return mysqlnd_conn_data_methods;
}
/* }}} */
-/* {{{ mysqlnd_conn_set_methods */
-PHPAPI void mysqlnd_conn_data_set_methods(struct st_mysqlnd_conn_data_methods * methods)
+/* {{{ _mysqlnd_conn_data_set_methods */
+static void
+_mysqlnd_conn_data_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * methods)
{
mysqlnd_conn_data_methods = methods;
}
/* }}} */
-/* {{{ mysqlnd_result_get_methods */
-PHPAPI struct st_mysqlnd_res_methods *
-mysqlnd_result_get_methods()
+/* {{{ _mysqlnd_result_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *
+_mysqlnd_result_get_methods()
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res);
}
/* }}} */
-/* {{{ mysqlnd_result_set_methods */
-PHPAPI void
-mysqlnd_result_set_methods(struct st_mysqlnd_res_methods * methods)
+/* {{{ _mysqlnd_result_set_methods */
+static void
+_mysqlnd_result_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * methods)
{
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res) = *methods;
}
/* }}} */
-/* {{{ mysqlnd_result_unbuffered_get_methods */
-PHPAPI struct st_mysqlnd_result_unbuffered_methods *
-mysqlnd_result_unbuffered_get_methods()
+/* {{{ _mysqlnd_result_unbuffered_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *
+_mysqlnd_result_unbuffered_get_methods()
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered);
}
/* }}} */
-/* {{{ mysqlnd_result_unbuffered_set_methods */
-PHPAPI void
-mysqlnd_result_unbuffered_set_methods(struct st_mysqlnd_result_unbuffered_methods * methods)
+/* {{{ _mysqlnd_result_unbuffered_set_methods */
+static void
+_mysqlnd_result_unbuffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * methods)
{
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered) = *methods;
}
/* }}} */
-/* {{{ mysqlnd_result_buffered_get_methods */
-PHPAPI struct st_mysqlnd_result_buffered_methods *
-mysqlnd_result_buffered_get_methods()
+/* {{{ _mysqlnd_result_buffered_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *
+_mysqlnd_result_buffered_get_methods()
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered);
}
/* }}} */
-/* {{{ mysqlnd_result_buffered_set_methods */
-PHPAPI void
-mysqlnd_result_buffered_set_methods(struct st_mysqlnd_result_buffered_methods * methods)
+/* {{{ _mysqlnd_result_buffered_set_methods */
+static void
+_mysqlnd_result_buffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) * methods)
{
MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered) = *methods;
}
/* }}} */
-/* {{{ mysqlnd_stmt_get_methods */
-PHPAPI struct st_mysqlnd_stmt_methods *
-mysqlnd_stmt_get_methods()
+/* {{{ _mysqlnd_stmt_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *
+_mysqlnd_stmt_get_methods()
{
return mysqlnd_stmt_methods;
}
/* }}} */
-/* {{{ mysqlnd_stmt_set_methods */
-PHPAPI void
-mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods *methods)
+/* {{{ _mysqlnd_stmt_set_methods */
+static void
+_mysqlnd_stmt_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *methods)
{
mysqlnd_stmt_methods = methods;
}
/* }}} */
-/* {{{ mysqlnd_protocol_get_methods */
-PHPAPI struct st_mysqlnd_protocol_methods *
-mysqlnd_protocol_get_methods()
+/* {{{ _mysqlnd_protocol_payload_decoder_factory_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *
+_mysqlnd_protocol_payload_decoder_factory_get_methods()
{
- return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol);
+ return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
}
/* }}} */
-/* {{{ mysqlnd_protocol_set_methods */
-PHPAPI void
-mysqlnd_protocol_set_methods(struct st_mysqlnd_protocol_methods * methods)
+/* {{{ _mysqlnd_protocol_payload_decoder_factory_set_methods */
+static void
+_mysqlnd_protocol_payload_decoder_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) * methods)
{
- MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol) = *methods;
+ MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory) = *methods;
}
/* }}} */
-/* {{{ mysqlnd_net_get_methods */
-PHPAPI struct st_mysqlnd_net_methods *
-mysqlnd_net_get_methods()
+/* {{{ _mysqlnd_pfc_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) *
+_mysqlnd_pfc_get_methods()
{
- return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_net);
+ return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec);
}
/* }}} */
-/* {{{ mysqlnd_net_set_methods */
-PHPAPI void
-mysqlnd_net_set_methods(struct st_mysqlnd_net_methods * methods)
+/* {{{ _mysqlnd_pfc_set_methods */
+static void
+_mysqlnd_pfc_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * methods)
{
- MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_net) = *methods;
+ MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec) = *methods;
}
/* }}} */
+/* {{{ _mysqlnd_vio_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) *
+_mysqlnd_vio_get_methods()
+{
+ return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_vio);
+}
+/* }}} */
+
+
+/* {{{ _mysqlnd_vio_set_methods */
+static void
+_mysqlnd_vio_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * methods)
+{
+ MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_vio) = *methods;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_command_factory_get */
+static func_mysqlnd__command_factory
+_mysqlnd_command_factory_get()
+{
+ return mysqlnd_command_factory;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_command_factory_set */
+static void
+_mysqlnd_command_factory_set(func_mysqlnd__command_factory factory)
+{
+ mysqlnd_command_factory = factory;
+}
+/* }}} */
+
+
+/* {{{ _mysqlnd_error_info_get_methods */
+static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *
+_mysqlnd_error_info_get_methods()
+{
+ return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_error_info);
+}
+/* }}} */
+
+
+/* {{{ _mysqlnd_error_info_set_methods */
+static void
+_mysqlnd_error_info_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *methods)
+{
+ MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_error_info) = *methods;
+}
+/* }}} */
+
+
+struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xetters =
+{
+ {
+ _mysqlnd_object_factory_get_methods,
+ _mysqlnd_object_factory_set_methods
+ },
+ {
+ _mysqlnd_conn_get_methods,
+ _mysqlnd_conn_set_methods,
+ },
+ {
+ _mysqlnd_conn_data_get_methods,
+ _mysqlnd_conn_data_set_methods,
+ },
+ {
+ _mysqlnd_result_get_methods,
+ _mysqlnd_result_set_methods,
+ },
+ {
+ _mysqlnd_result_unbuffered_get_methods,
+ _mysqlnd_result_unbuffered_set_methods,
+ },
+ {
+ _mysqlnd_result_buffered_get_methods,
+ _mysqlnd_result_buffered_set_methods,
+ },
+ {
+ _mysqlnd_stmt_get_methods,
+ _mysqlnd_stmt_set_methods,
+ },
+ {
+ _mysqlnd_protocol_payload_decoder_factory_get_methods,
+ _mysqlnd_protocol_payload_decoder_factory_set_methods,
+ },
+ {
+ _mysqlnd_pfc_get_methods,
+ _mysqlnd_pfc_set_methods,
+ },
+ {
+ _mysqlnd_vio_get_methods,
+ _mysqlnd_vio_set_methods,
+ },
+ {
+ _mysqlnd_error_info_get_methods,
+ _mysqlnd_error_info_set_methods,
+ },
+ {
+ _mysqlnd_command_factory_get,
+ _mysqlnd_command_factory_set,
+ },
+};
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.h b/ext/mysqlnd/mysqlnd_ext_plugin.h
index 2fee96e6c5..ecab5e8fc6 100644
--- a/ext/mysqlnd/mysqlnd_ext_plugin.h
+++ b/ext/mysqlnd/mysqlnd_ext_plugin.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,68 +12,156 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Johannes Schlüter <johannes@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.h 318221 2011-10-19 15:04:12Z andrey $ */
#ifndef MYSQLND_EXT_PLUGIN_H
#define MYSQLND_EXT_PLUGIN_H
-PHPAPI void ** _mysqlnd_plugin_get_plugin_connection_data(const MYSQLND * conn, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_connection_data(c, p_id) _mysqlnd_plugin_get_plugin_connection_data((c), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_connection_data_data(const MYSQLND_CONN_DATA * conn, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_connection_data_data(c, p_id) _mysqlnd_plugin_get_plugin_connection_data_data((c), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_result_data(r, p_id) _mysqlnd_plugin_get_plugin_result_data((r), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_unbuffered_data(const MYSQLND_RES_UNBUFFERED * result, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_result_unbuffered_data(r, p_id) _mysqlnd_plugin_get_plugin_result_unbuffered_data((r), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_zval(const MYSQLND_RES_BUFFERED_ZVAL * result, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_result_buffered_data_zval(r, p_id) _mysqlnd_plugin_get_plugin_result_buffered_data_zval((r), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_result_buffered_data_c(const MYSQLND_RES_BUFFERED_C * result, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_result_buffered_data_c(r, p_id) _mysqlnd_plugin_get_plugin_result_buffered_data_c((r), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_stmt_data(s, p_id) _mysqlnd_plugin_get_plugin_stmt_data((s), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_protocol_data(p, p_id) _mysqlnd_plugin_get_plugin_protocol_data((p), (p_id))
-
-PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsigned int plugin_id);
-#define mysqlnd_plugin_get_plugin_net_data(n, p_id) _mysqlnd_plugin_get_plugin_net_data((n), (p_id))
-
-
-PHPAPI struct st_mysqlnd_conn_methods * mysqlnd_conn_get_methods();
-PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods * methods);
-
-PHPAPI struct st_mysqlnd_conn_data_methods * mysqlnd_conn_data_get_methods();
-PHPAPI void mysqlnd_conn_data_set_methods(struct st_mysqlnd_conn_data_methods * methods);
-
-PHPAPI struct st_mysqlnd_res_methods * mysqlnd_result_get_methods();
-PHPAPI void mysqlnd_result_set_methods(struct st_mysqlnd_res_methods * methods);
-
-PHPAPI struct st_mysqlnd_result_unbuffered_methods * mysqlnd_result_unbuffered_get_methods();
-PHPAPI void mysqlnd_result_unbuffered_set_methods(struct st_mysqlnd_result_unbuffered_methods * methods);
-
-PHPAPI struct st_mysqlnd_result_buffered_methods * mysqlnd_result_buffered_get_methods();
-PHPAPI void mysqlnd_result_buffered_set_methods(struct st_mysqlnd_result_buffered_methods * methods);
-
-PHPAPI struct st_mysqlnd_stmt_methods * mysqlnd_stmt_get_methods();
-PHPAPI void mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods * methods);
-
-PHPAPI struct st_mysqlnd_protocol_methods * mysqlnd_protocol_get_methods();
-PHPAPI void mysqlnd_protocol_set_methods(struct st_mysqlnd_protocol_methods * methods);
-
-PHPAPI struct st_mysqlnd_net_methods * mysqlnd_net_get_methods();
-PHPAPI void mysqlnd_net_set_methods(struct st_mysqlnd_net_methods * methods);
-
+struct st_mysqlnd_plugin__plugin_area_getters
+{
+ void ** (*get_connection_area)(const MYSQLND * conn, const unsigned int plugin_id);
+ void ** (*get_connection_data_area)(const MYSQLND_CONN_DATA * conn, const unsigned int plugin_id);
+ void ** (*get_result_area)(const MYSQLND_RES * result, const unsigned int plugin_id);
+ void ** (*get_unbuffered_area)(const MYSQLND_RES_UNBUFFERED * result, const unsigned int plugin_id);
+ void ** (*get_result_buffered_area)(const MYSQLND_RES_BUFFERED_ZVAL * result, const unsigned int plugin_id);
+ void ** (*get_result_buffered_aread_c)(const MYSQLND_RES_BUFFERED_C * result, const unsigned int plugin_id);
+ void ** (*get_stmt_area)(const MYSQLND_STMT * stmt, const unsigned int plugin_id);
+ void ** (*get_protocol_decoder_area)(const MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory, const unsigned int plugin_id);
+ void ** (*get_pfc_area)(const MYSQLND_PFC * pfc, const unsigned int plugin_id);
+ void ** (*get_vio_area)(const MYSQLND_VIO * vio, const unsigned int plugin_id);
+};
+
+extern struct st_mysqlnd_plugin__plugin_area_getters mysqlnd_plugin_area_getters;
+
+#define mysqlnd_plugin_get_plugin_connection_data(c, p_id) mysqlnd_plugin_area_getters.get_connection_area((c), (p_id))
+#define mysqlnd_plugin_get_plugin_connection_data_data(c, p_id) mysqlnd_plugin_area_getters.get_connection_data_area((c), (p_id))
+#define mysqlnd_plugin_get_plugin_result_data(res, p_id) mysqlnd_plugin_area_getters.get_result_area((res), (p_id))
+#define mysqlnd_plugin_get_plugin_result_unbuffered_data(res, p_id) mysqlnd_plugin_area_getters.get_unbuffered_area((res), (p_id))
+#define mysqlnd_plugin_get_plugin_result_buffered_data_zval(res, p_id) mysqlnd_plugin_area_getters.get_result_buffered_area((res), (p_id))
+#define mysqlnd_plugin_get_plugin_result_buffered_data_c(res, p_id) mysqlnd_plugin_area_getters.get_result_buffered_aread_c((res), (p_id))
+#define mysqlnd_plugin_get_plugin_stmt_data(stmt, p_id) mysqlnd_plugin_area_getters.get_stmt_area((stmt), (p_id))
+#define mysqlnd_plugin_get_plugin_protocol_data(proto, p_id) mysqlnd_plugin_area_getters.get_protocol_decoder_area((proto), (p_id))
+#define mysqlnd_plugin_get_plugin_pfc_data(pfc, p_id) mysqlnd_plugin_area_getters.get_pfc_area((pfc), (p_id))
+#define mysqlnd_plugin_get_plugin_vio_data(vio, p_id) mysqlnd_plugin_area_getters.get_pfc_area((vio), (p_id))
+
+
+struct st_mysqlnd_plugin_methods_xetters
+{
+ struct st_mnd_object_factory_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *methods);
+ } object_factory;
+
+ struct st_mnd_connection_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods);
+ } connection;
+
+ struct st_mnd_connection_data_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *methods);
+ } connection_data;
+
+ struct st_mnd_result_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *methods);
+ } result;
+
+ struct st_mnd_unbuffered_result_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *methods);
+ } unbuffered_result;
+
+ struct st_mnd_buffered_result_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered)* (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *methods);
+ } buffered_result;
+
+ struct st_mnd_stmt_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * methods);
+ } statement;
+
+ struct st_mnd_protocol_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory)* (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *methods);
+ } protocol;
+
+ struct st_mnd_pfc_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * methods);
+ } pfc;
+
+ struct st_mnd_vio_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * methods);
+ } vio;
+
+ struct st_mnd_error_info_xetters
+ {
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) * (*get)();
+ void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) * methods);
+ } error_info;
+
+ struct st_mnd_command_factory_xetters
+ {
+ func_mysqlnd__command_factory (*get)();
+ void (*set)(func_mysqlnd__command_factory factory);
+ } command_factory;
+};
+
+extern struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xetters;
+
+
+#define mysqlnd_object_factory_get_methods() mysqlnd_plugin_methods_xetters.object_factory.get()
+#define mysqlnd_object_factory_set_methods(m) mysqlnd_plugin_methods_xetters.object_factory.set((m))
+
+#define mysqlnd_conn_get_methods() mysqlnd_plugin_methods_xetters.connection.get()
+#define mysqlnd_conn_set_methods(m) mysqlnd_plugin_methods_xetters.connection.set((m))
+
+#define mysqlnd_conn_data_get_methods() mysqlnd_plugin_methods_xetters.connection_data.get()
+#define mysqlnd_conn_data_set_methods(m) mysqlnd_plugin_methods_xetters.connection_data.set((m))
+
+#define mysqlnd_result_get_methods() mysqlnd_plugin_methods_xetters.result.get()
+#define mysqlnd_result_set_methods(m) mysqlnd_plugin_methods_xetters.result.set((m))
+
+#define mysqlnd_result_unbuffered_get_methods() mysqlnd_plugin_methods_xetters.unbuffered_result.get()
+#define mysqlnd_result_unbuffered_set_methods(m) mysqlnd_plugin_methods_xetters.unbuffered_result.set((m))
+
+#define mysqlnd_result_buffered_get_methods() mysqlnd_plugin_methods_xetters.buffered_result.get()
+#define mysqlnd_result_buffered_set_methods(m) mysqlnd_plugin_methods_xetters.buffered_result.set((m))
+
+#define mysqlnd_stmt_get_methods() mysqlnd_plugin_methods_xetters.statement.get()
+#define mysqlnd_stmt_set_methods(m) mysqlnd_plugin_methods_xetters.statement.set((m))
+
+#define mysqlnd_protocol_get_methods() mysqlnd_plugin_methods_xetters.protocol.get()
+#define mysqlnd_protocol_set_methods(m) mysqlnd_plugin_methods_xetters.protocol.set((m))
+
+#define mysqlnd_pfc_get_methods() mysqlnd_plugin_methods_xetters.pfc.get()
+#define mysqlnd_pfc_set_methods(m) mysqlnd_plugin_methods_xetters.pfc.set((m))
+
+#define mysqlnd_vio_get_methods() mysqlnd_plugin_methods_xetters.vio.get()
+#define mysqlnd_vio_set_methods(m) mysqlnd_plugin_methods_xetters.vio.set((m))
+
+#define mysqlnd_command_factory_get() mysqlnd_plugin_methods_xetters.command_factory.get()
+#define mysqlnd_command_factory_set(m) mysqlnd_plugin_methods_xetters.command_factory.set((m))
+
+#define mysqlnd_error_info_get_methods() mysqlnd_plugin_methods_xetters.error_info.get()
+#define mysqlnd_error_info_set_methods(m) mysqlnd_plugin_methods_xetters.error_info.set((m))
#endif /* MYSQLND_EXT_PLUGIN_H */
diff --git a/ext/mysqlnd/mysqlnd_libmysql_compat.h b/ext/mysqlnd/mysqlnd_libmysql_compat.h
index 377cf37cc3..0556ef1d38 100644
--- a/ext/mysqlnd/mysqlnd_libmysql_compat.h
+++ b/ext/mysqlnd/mysqlnd_libmysql_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
-
*/
-
#ifndef MYSQLND_LIBMYSQL_COMPAT_H
#define MYSQLND_LIBMYSQL_COMPAT_H
@@ -59,11 +57,10 @@
#define mysql_field_count(r) mysqlnd_field_count((r))
#define mysql_field_seek(r,o) mysqlnd_field_seek((r), (o))
#define mysql_field_tell(r) mysqlnd_field_tell((r))
-#define mysql_init(a) mysqlnd_init((a))
+#define mysql_init(a) mysqlnd_connection_init((a), false)
#define mysql_insert_id(r) mysqlnd_insert_id((r))
#define mysql_kill(r,n) mysqlnd_kill((r), (n))
#define mysql_list_dbs(c, wild) mysqlnd_list_dbs((c), (wild))
-#define mysql_list_fields(c, tab, wild) mysqlnd_list_fields((c), (tab), (wild))
#define mysql_list_processes(c) mysqlnd_list_processes((c))
#define mysql_list_tables(c, wild) mysqlnd_list_tables((c), (wild))
#define mysql_more_results(r) mysqlnd_more_results((r))
diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c
index 9679bec4df..14dee737bf 100644
--- a/ext/mysqlnd/mysqlnd_loaddata.c
+++ b/ext/mysqlnd/mysqlnd_loaddata.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,12 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
-
#include "php.h"
-#include "php_globals.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
#include "mysqlnd_priv.h"
@@ -136,12 +134,12 @@ mysqlnd_local_infile_default(MYSQLND_CONN_DATA * conn)
/* }}} */
-static const char *lost_conn = "Lost connection to MySQL server during LOAD DATA of local file";
+static const char *lost_conn = "Lost connection to MySQL server during LOAD DATA of a local file";
/* {{{ mysqlnd_handle_local_infile */
enum_func_status
-mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zend_bool * is_warning)
+mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning)
{
zend_uchar *buf = NULL;
zend_uchar empty_packet[MYSQLND_HEADER_SIZE];
@@ -151,14 +149,15 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
int bufsize;
size_t ret;
MYSQLND_INFILE infile;
- MYSQLND_NET * net = conn->net;
+ MYSQLND_PFC * net = conn->protocol_frame_codec;
+ MYSQLND_VIO * vio = conn->vio;
DBG_ENTER("mysqlnd_handle_local_infile");
if (!(conn->options->flags & CLIENT_LOCAL_FILES)) {
php_error_docref(NULL, E_WARNING, "LOAD DATA LOCAL INFILE forbidden");
/* write empty packet to server */
- ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info);
+ ret = net->data->m.send(net, vio, empty_packet, 0, conn->stats, conn->error_info);
*is_warning = TRUE;
goto infile_error;
}
@@ -176,24 +175,24 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
*is_warning = TRUE;
/* error occurred */
tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
- SET_CLIENT_ERROR(*conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
+ SET_CLIENT_ERROR(conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
/* write empty packet to server */
- ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info);
+ ret = net->data->m.send(net, vio, empty_packet, 0, conn->stats, conn->error_info);
goto infile_error;
}
/* read data */
while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEADER_SIZE)) > 0) {
- if ((ret = net->data->m.send_ex(net, buf, bufsize, conn->stats, conn->error_info)) == 0) {
+ if ((ret = net->data->m.send(net, vio, buf, bufsize, conn->stats, conn->error_info)) == 0) {
DBG_ERR_FMT("Error during read : %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
+ SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
goto infile_error;
}
}
/* send empty packet for eof */
- if ((ret = net->data->m.send_ex(net, empty_packet, 0, conn->stats, conn->error_info)) == 0) {
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
+ if ((ret = net->data->m.send(net, vio, empty_packet, 0, conn->stats, conn->error_info)) == 0) {
+ SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
goto infile_error;
}
@@ -204,7 +203,7 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
*is_warning = TRUE;
DBG_ERR_FMT("Bufsize < 0, warning, %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn);
tmp_error_no = infile.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
- SET_CLIENT_ERROR(*conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
+ SET_CLIENT_ERROR(conn->error_info, tmp_error_no, UNKNOWN_SQLSTATE, tmp_buf);
goto infile_error;
}
@@ -212,7 +211,13 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zen
infile_error:
/* get response from server and update upsert values */
- if (FAIL == conn->m->simple_command_handle_response(conn, PROT_OK_PACKET, FALSE, COM_QUERY, FALSE)) {
+ if (FAIL == conn->payload_decoder_factory->m.send_command_handle_response(
+ conn->payload_decoder_factory,
+ PROT_OK_PACKET, FALSE, COM_QUERY, FALSE,
+ conn->error_info,
+ conn->upsert_status,
+ &conn->last_message,
+ conn->persistent)) {
result = FAIL;
}
diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c
index bcd40d7ab6..111a4898d0 100644
--- a/ext/mysqlnd/mysqlnd_net.c
+++ b/ext/mysqlnd/mysqlnd_net.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_ps.c 316906 2011-09-17 10:24:18Z pajoye $ */
#include "php.h"
#include "php_globals.h"
#include "mysqlnd.h"
@@ -61,6 +59,27 @@ mysqlnd_set_sock_no_delay(php_stream * stream)
/* }}} */
+/* {{{ mysqlnd_set_sock_keepalive */
+static int
+mysqlnd_set_sock_keepalive(php_stream * stream)
+{
+
+ int socketd = ((php_netstream_data_t*)stream->abstract)->socket;
+ int ret = SUCCESS;
+ int flag = 1;
+ int result = setsockopt(socketd, SOL_SOCKET, SO_KEEPALIVE, (char *) &flag, sizeof(int));
+
+ DBG_ENTER("mysqlnd_set_sock_keepalive");
+
+ if (result == -1) {
+ ret = FAILURE;
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
/* {{{ mysqlnd_net::network_read_ex */
static enum_func_status
MYSQLND_METHOD(mysqlnd_net, network_read_ex)(MYSQLND_NET * const net, zend_uchar * const buffer, const size_t count,
@@ -112,11 +131,7 @@ MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const char * con
const zend_bool persistent,
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
{
-#if PHP_API_VERSION < 20100412
- unsigned int streams_options = ENFORCE_SAFE_MODE;
-#else
unsigned int streams_options = 0;
-#endif
dtor_func_t origin_dtor;
php_stream * net_stream = NULL;
@@ -152,11 +167,7 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
const zend_bool persistent,
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
{
-#if PHP_API_VERSION < 20100412
- unsigned int streams_options = ENFORCE_SAFE_MODE;
-#else
unsigned int streams_options = 0;
-#endif
unsigned int streams_flags = STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT;
char * hashed_details = NULL;
int hashed_details_len = 0;
@@ -190,9 +201,11 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha
mnd_sprintf_free(hashed_details);
}
errcode = CR_CONNECTION_ERROR;
- SET_CLIENT_ERROR(*error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, ZSTR_VAL(errstr));
+ SET_CLIENT_ERROR(*error_info,
+ CR_CONNECTION_ERROR,
+ UNKNOWN_SQLSTATE,
+ errstr? ZSTR_VAL(errstr):"Unknown error while connecting");
if (errstr) {
- /* no mnd_ since we don't allocate it */
zend_string_release(errstr);
}
DBG_RETURN(NULL);
@@ -260,6 +273,8 @@ MYSQLND_METHOD(mysqlnd_net, post_connect_set_opt)(MYSQLND_NET * const net,
if (!memcmp(scheme, "tcp://", sizeof("tcp://") - 1)) {
/* TCP -> Set TCP_NODELAY */
mysqlnd_set_sock_no_delay(net_stream);
+ /* TCP -> Set SO_KEEPALIVE */
+ mysqlnd_set_sock_keepalive(net_stream);
}
}
@@ -781,8 +796,27 @@ MYSQLND_METHOD(mysqlnd_net, set_client_option)(MYSQLND_NET * const net, enum mys
break;
}
case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
- net->data->options.ssl_verify_peer = value? ((*(zend_bool *)value)? TRUE:FALSE): FALSE;
+ {
+ enum mysqlnd_ssl_peer val = *((enum mysqlnd_ssl_peer *)value);
+ switch (val) {
+ case MYSQLND_SSL_PEER_VERIFY:
+ DBG_INF("MYSQLND_SSL_PEER_VERIFY");
+ break;
+ case MYSQLND_SSL_PEER_DONT_VERIFY:
+ DBG_INF("MYSQLND_SSL_PEER_DONT_VERIFY");
+ break;
+ case MYSQLND_SSL_PEER_DEFAULT:
+ DBG_INF("MYSQLND_SSL_PEER_DEFAULT");
+ val = MYSQLND_SSL_PEER_DEFAULT;
+ break;
+ default:
+ DBG_INF("default = MYSQLND_SSL_PEER_DEFAULT_ACTION");
+ val = MYSQLND_SSL_PEER_DEFAULT;
+ break;
+ }
+ net->data->options.ssl_verify_peer = val;
break;
+ }
case MYSQL_OPT_READ_TIMEOUT:
net->data->options.timeout_read = *(unsigned int*) value;
break;
@@ -869,6 +903,7 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net)
#ifdef MYSQLND_SSL_SUPPORTED
php_stream_context * context = php_stream_context_alloc();
php_stream * net_stream = net->data->m.get_stream(net);
+ zend_bool any_flag = FALSE;
DBG_ENTER("mysqlnd_net::enable_ssl");
if (!context) {
@@ -879,11 +914,8 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net)
zval key_zval;
ZVAL_STRING(&key_zval, net->data->options.ssl_key);
php_stream_context_set_option(context, "ssl", "local_pk", &key_zval);
- }
- if (net->data->options.ssl_verify_peer) {
- zval verify_peer_zval;
- ZVAL_TRUE(&verify_peer_zval);
- php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval);
+ zval_ptr_dtor(&key_zval);
+ any_flag = TRUE;
}
if (net->data->options.ssl_cert) {
zval cert_zval;
@@ -892,32 +924,56 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net)
if (!net->data->options.ssl_key) {
php_stream_context_set_option(context, "ssl", "local_pk", &cert_zval);
}
+ zval_ptr_dtor(&cert_zval);
+ any_flag = TRUE;
}
if (net->data->options.ssl_ca) {
zval cafile_zval;
ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca);
php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval);
+ any_flag = TRUE;
}
if (net->data->options.ssl_capath) {
zval capath_zval;
ZVAL_STRING(&capath_zval, net->data->options.ssl_capath);
- php_stream_context_set_option(context, "ssl", "cafile", &capath_zval);
+ php_stream_context_set_option(context, "ssl", "capath", &capath_zval);
+ zval_ptr_dtor(&capath_zval);
+ any_flag = TRUE;
}
if (net->data->options.ssl_passphrase) {
zval passphrase_zval;
ZVAL_STRING(&passphrase_zval, net->data->options.ssl_passphrase);
php_stream_context_set_option(context, "ssl", "passphrase", &passphrase_zval);
+ zval_ptr_dtor(&passphrase_zval);
+ any_flag = TRUE;
}
if (net->data->options.ssl_cipher) {
zval cipher_zval;
ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher);
php_stream_context_set_option(context, "ssl", "ciphers", &cipher_zval);
+ zval_ptr_dtor(&cipher_zval);
+ any_flag = TRUE;
+ }
+ {
+ zval verify_peer_zval;
+ zend_bool verify;
+
+ if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) {
+ net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DONT_VERIFY;
+ }
+
+ verify = net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_VERIFY? TRUE:FALSE;
+
+ DBG_INF_FMT("VERIFY=%d", verify);
+ ZVAL_BOOL(&verify_peer_zval, verify);
+ php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval);
+ php_stream_context_set_option(context, "ssl", "verify_peer_name", &verify_peer_zval);
+ if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) {
+ ZVAL_TRUE(&verify_peer_zval);
+ php_stream_context_set_option(context, "ssl", "allow_self_signed", &verify_peer_zval);
+ }
}
-#if PHP_API_VERSION >= 20131106
- php_stream_context_set(net_stream, context);
-#else
php_stream_context_set(net_stream, context);
-#endif
if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL) < 0 ||
php_stream_xport_crypto_enable(net_stream, 1) < 0)
{
@@ -933,11 +989,7 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net)
of the context, which means usage of already freed memory, bad. Actually we don't need this
context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it.
*/
-#if PHP_API_VERSION >= 20131106
php_stream_context_set(net_stream, NULL);
-#else
- php_stream_context_set(net_stream, NULL);
-#endif
if (net->data->options.timeout_read) {
struct timeval tv;
diff --git a/ext/mysqlnd/mysqlnd_plugin.c b/ext/mysqlnd/mysqlnd_plugin.c
index 094bd554ae..b90081a0ef 100644
--- a/ext/mysqlnd/mysqlnd_plugin.c
+++ b/ext/mysqlnd/mysqlnd_plugin.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c 306407 2010-12-16 12:56:19Z andrey $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
@@ -71,7 +69,7 @@ enum_func_status mysqlnd_example_plugin_end(void * p)
{
struct st_mysqlnd_typeii_plugin_example * plugin = (struct st_mysqlnd_typeii_plugin_example *) p;
DBG_ENTER("mysqlnd_example_plugin_end");
- mysqlnd_stats_end(plugin->plugin_header.plugin_stats.values);
+ mysqlnd_stats_end(plugin->plugin_header.plugin_stats.values, 1);
plugin->plugin_header.plugin_stats.values = NULL;
DBG_RETURN(PASS);
}
@@ -82,7 +80,7 @@ enum_func_status mysqlnd_example_plugin_end(void * p)
void
mysqlnd_example_plugin_register(void)
{
- mysqlnd_stats_init(&mysqlnd_plugin_example_stats, EXAMPLE_STAT_LAST);
+ mysqlnd_stats_init(&mysqlnd_plugin_example_stats, EXAMPLE_STAT_LAST, 1);
mysqlnd_example_plugin.plugin_header.plugin_stats.values = mysqlnd_plugin_example_stats;
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_example_plugin);
}
diff --git a/ext/mysqlnd/mysqlnd_plugin.h b/ext/mysqlnd/mysqlnd_plugin.h
new file mode 100644
index 0000000000..f01c99579a
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_plugin.h
@@ -0,0 +1,41 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_PLUGIN_H
+#define MYSQLND_PLUGIN_H
+
+
+void mysqlnd_plugin_subsystem_init(void);
+void mysqlnd_plugin_subsystem_end(void);
+
+void mysqlnd_register_builtin_authentication_plugins(void);
+
+void mysqlnd_example_plugin_register(void);
+
+#endif /* MYSQLND_PLUGIN_H */
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h
index b9a83e6292..cb09a47915 100644
--- a/ext/mysqlnd/mysqlnd_portability.h
+++ b/ext/mysqlnd/mysqlnd_portability.h
@@ -5,7 +5,7 @@ This file is public domain and comes with NO WARRANTY of any kind */
Parts of the original, which are not applicable to mysqlnd have been removed.
With small modifications, mostly casting but adding few more macros by
- Andrey Hristov <andrey@mysql.com> . The additions are in the public domain and
+ Andrey Hristov <andrey@php.net> . The additions are in the public domain and
were added to improve the header file, to get it more consistent.
*/
diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h
index 683670f307..cea1bc68c7 100644
--- a/ext/mysqlnd/mysqlnd_priv.h
+++ b/ext/mysqlnd/mysqlnd_priv.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,237 +12,28 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_PRIV_H
#define MYSQLND_PRIV_H
-
-#ifndef Z_ADDREF_P
-/* PHP 5.2, old GC */
-#define Z_ADDREF_P(pz) (++(pz)->refcount)
-#define Z_DELREF_P(pz) (--(pz)->refcount)
-#define Z_REFCOUNT_P(pz) ((pz)->refcount)
-#define Z_SET_REFCOUNT_P(pz, rc) ((pz)->refcount = rc)
-#define Z_REFCOUNT_PP(ppz) Z_REFCOUNT_P(*(ppz))
-#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-#ifndef pestrndup
-#define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
-#endif
-
-#define MYSQLND_STR_W_LEN(str) str, (sizeof(str) - 1)
-
-#define MYSQLND_DEBUG_DUMP_TIME 1
-#define MYSQLND_DEBUG_DUMP_TRACE 2
-#define MYSQLND_DEBUG_DUMP_PID 4
-#define MYSQLND_DEBUG_DUMP_LINE 8
-#define MYSQLND_DEBUG_DUMP_FILE 16
-#define MYSQLND_DEBUG_DUMP_LEVEL 32
-#define MYSQLND_DEBUG_APPEND 64
-#define MYSQLND_DEBUG_FLUSH 128
-#define MYSQLND_DEBUG_TRACE_MEMORY_CALLS 256
-#define MYSQLND_DEBUG_PROFILE_CALLS 512
-
-
-/* Client Error codes */
-#define CR_UNKNOWN_ERROR 2000
-#define CR_CONNECTION_ERROR 2002
-#define CR_SERVER_GONE_ERROR 2006
-#define CR_OUT_OF_MEMORY 2008
-#define CR_SERVER_LOST 2013
-#define CR_COMMANDS_OUT_OF_SYNC 2014
-#define CR_CANT_FIND_CHARSET 2019
-#define CR_MALFORMED_PACKET 2027
-#define CR_NOT_IMPLEMENTED 2054
-#define CR_NO_PREPARE_STMT 2030
-#define CR_PARAMS_NOT_BOUND 2031
-#define CR_INVALID_PARAMETER_NO 2034
-#define CR_INVALID_BUFFER_USE 2035
-
-#define MYSQLND_EE_FILENOTFOUND 7890
-
-#define UNKNOWN_SQLSTATE "HY000"
-
-#define MAX_CHARSET_LEN 32
-
-
-#define SET_ERROR_AFF_ROWS(s) (s)->upsert_status->affected_rows = (uint64_t) ~0
-
-/* Error handling */
-#define SET_NEW_MESSAGE(buf, buf_len, message, len, persistent) \
- {\
- if ((buf)) { \
- mnd_pefree((buf), (persistent)); \
- } \
- if ((message)) { \
- (buf) = mnd_pestrndup((message), (len), (persistent)); \
- } else { \
- (buf) = NULL; \
- } \
- (buf_len) = (len); \
- }
-
-#define SET_EMPTY_MESSAGE(buf, buf_len, persistent) \
- {\
- if ((buf)) { \
- mnd_pefree((buf), (persistent)); \
- (buf) = NULL; \
- } \
- (buf_len) = 0; \
- }
-
-
-#define SET_EMPTY_ERROR(error_info) \
- { \
- (error_info).error_no = 0; \
- (error_info).error[0] = '\0'; \
- strlcpy((error_info).sqlstate, "00000", sizeof((error_info).sqlstate)); \
- if ((error_info).error_list) { \
- zend_llist_clean((error_info).error_list); \
- } \
- }
-
-
-#define SET_CLIENT_ERROR(error_info, a, b, c) \
-{ \
- if (0 == (a)) { \
- SET_EMPTY_ERROR((error_info)); \
- } else { \
- (error_info).error_no = (a); \
- strlcpy((error_info).sqlstate, (b), sizeof((error_info).sqlstate)); \
- strlcpy((error_info).error, (c), sizeof((error_info).error)); \
- if ((error_info).error_list) {\
- MYSQLND_ERROR_LIST_ELEMENT error_for_the_list = {0}; \
- \
- error_for_the_list.error_no = (a); \
- strlcpy(error_for_the_list.sqlstate, (b), sizeof(error_for_the_list.sqlstate)); \
- error_for_the_list.error = mnd_pestrdup((c), TRUE); \
- if (error_for_the_list.error) { \
- DBG_INF_FMT("adding error [%s] to the list", error_for_the_list.error); \
- zend_llist_add_element((error_info).error_list, &error_for_the_list); \
- } \
- } \
- } \
-}
-
-
-#define COPY_CLIENT_ERROR(error_info_to, error_info_from) \
- { \
- SET_CLIENT_ERROR((error_info_to), (error_info_from).error_no, (error_info_from).sqlstate, (error_info_from).error); \
- }
-
-
-#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR((error_info), CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory)
-
-
-#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(*(stmt)->error_info, a, b, c)
-
-#define CONN_GET_STATE(c) (c)->m->get_state((c))
-#define CONN_SET_STATE(c, s) (c)->m->set_state((c), (s))
-
-/* PS stuff */
-typedef void (*ps_field_fetch_func)(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row);
-struct st_mysqlnd_perm_bind {
- ps_field_fetch_func func;
- /* should be signed int */
- int pack_len;
- unsigned int php_type;
- zend_bool is_possibly_blob;
- zend_bool can_ret_as_str_in_uni;
-};
-
-extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1];
-
-enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything);
-enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything);
-
-
-PHPAPI extern const char * const mysqlnd_old_passwd;
-PHPAPI extern const char * const mysqlnd_out_of_sync;
-PHPAPI extern const char * const mysqlnd_server_gone;
-PHPAPI extern const char * const mysqlnd_out_of_memory;
-
PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_object_factory);
PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn);
PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_conn_data);
PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_res);
PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_result_unbuffered);
PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_result_buffered);
-PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol);
-PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_net);
-
-enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * filename, zend_bool * is_warning);
-
-
-
-void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */
-void _mysqlnd_init_ps_fetch_subsystem();
-
-void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row, unsigned int byte_count);
-
-void mysqlnd_plugin_subsystem_init(void);
-void mysqlnd_plugin_subsystem_end(void);
-
-void mysqlnd_register_builtin_authentication_plugins(void);
-
-void mysqlnd_example_plugin_register(void);
-
-struct st_mysqlnd_packet_greet;
-struct st_mysqlnd_authentication_plugin;
-
-enum_func_status
-mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
- const char * const user,
- const char * const passwd,
- const size_t passwd_len,
- const char * const db,
- const size_t db_len,
- const MYSQLND_OPTIONS * const options,
- zend_ulong mysql_flags,
- unsigned int server_charset_no,
- zend_bool use_full_blown_auth_packet,
- const char * const auth_protocol,
- const zend_uchar * const auth_plugin_data,
- const size_t auth_plugin_data_len,
- char ** switch_to_auth_protocol,
- size_t * switch_to_auth_protocol_len,
- zend_uchar ** switch_to_auth_protocol_data,
- size_t * switch_to_auth_protocol_data_len
- );
-
-enum_func_status
-mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
- const char * const user,
- const size_t user_len,
- const char * const passwd,
- const size_t passwd_len,
- const char * const db,
- const size_t db_len,
- const zend_bool silent,
- zend_bool use_full_blown_auth_packet,
- const char * const auth_protocol,
- zend_uchar * auth_plugin_data,
- size_t auth_plugin_data_len,
- char ** switch_to_auth_protocol,
- size_t * switch_to_auth_protocol_len,
- zend_uchar ** switch_to_auth_protocol_data,
- size_t * switch_to_auth_protocol_data_len
- );
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol_payload_decoder_factory);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_protocol_packet_frame_codec);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_vio);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_upsert_status);
+PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_error_info);
+enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning);
#endif /* MYSQLND_PRIV_H */
-
/*
* Local variables:
* tab-width: 4
diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c
new file mode 100644
index 0000000000..36b9d77958
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c
@@ -0,0 +1,508 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "mysqlnd.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_priv.h"
+#include "mysqlnd_read_buffer.h"
+#include "mysqlnd_wireprotocol.h"
+#include "mysqlnd_statistics.h"
+#include "mysqlnd_debug.h"
+#ifdef MYSQLND_COMPRESSION_ENABLED
+#include <zlib.h>
+#endif
+
+
+/* {{{ mysqlnd_pfc::reset */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, reset)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ DBG_ENTER("mysqlnd_pfc::reset");
+ pfc->data->packet_no = pfc->data->compressed_envelope_packet_no = 0;
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* We assume that MYSQLND_HEADER_SIZE is 4 bytes !! */
+#define COPY_HEADER(T,A) do { \
+ *(((char *)(T))) = *(((char *)(A)));\
+ *(((char *)(T))+1) = *(((char *)(A))+1);\
+ *(((char *)(T))+2) = *(((char *)(A))+2);\
+ *(((char *)(T))+3) = *(((char *)(A))+3); } while (0)
+#define STORE_HEADER_SIZE(safe_storage, buffer) COPY_HEADER((safe_storage), (buffer))
+#define RESTORE_HEADER_SIZE(buffer, safe_storage) STORE_HEADER_SIZE((safe_storage), (buffer))
+
+
+/* {{{ mysqlnd_pfc::send */
+/*
+ IMPORTANT : It's expected that buffer has place in the beginning for MYSQLND_HEADER_SIZE !!!!
+ This is done for performance reasons in the caller of this function.
+ Otherwise we will have to do send two TCP packets, or do new alloc and memcpy.
+ Neither are quick, thus the clients of this function are obligated to do
+ what they are asked for.
+
+ `count` is actually the length of the payload data. Thus :
+ count + MYSQLND_HEADER_SIZE = sizeof(buffer) (not the pointer but the actual buffer)
+*/
+static size_t
+MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar * const buffer, const size_t count,
+ MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ zend_uchar safe_buf[((MYSQLND_HEADER_SIZE) + (sizeof(zend_uchar)) - 1) / (sizeof(zend_uchar))];
+ zend_uchar * safe_storage = safe_buf;
+ size_t bytes_sent, packets_sent = 1;
+ size_t left = count;
+ zend_uchar * p = (zend_uchar *) buffer;
+ zend_uchar * compress_buf = NULL;
+ size_t to_be_sent;
+
+ DBG_ENTER("mysqlnd_pfc::send");
+ DBG_INF_FMT("count=" MYSQLND_SZ_T_SPEC " compression=%u", count, pfc->data->compressed);
+
+ if (pfc->data->compressed == TRUE) {
+ size_t comp_buf_size = MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE + MIN(left, MYSQLND_MAX_PACKET_SIZE);
+ DBG_INF_FMT("compress_buf_size="MYSQLND_SZ_T_SPEC, comp_buf_size);
+ compress_buf = mnd_emalloc(comp_buf_size);
+ }
+
+ do {
+ to_be_sent = MIN(left, MYSQLND_MAX_PACKET_SIZE);
+ DBG_INF_FMT("to_be_sent=%u", to_be_sent);
+ DBG_INF_FMT("packets_sent=%u", packets_sent);
+ DBG_INF_FMT("compressed_envelope_packet_no=%u", pfc->data->compressed_envelope_packet_no);
+ DBG_INF_FMT("packet_no=%u", pfc->data->packet_no);
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ if (pfc->data->compressed == TRUE) {
+ /* here we need to compress the data and then write it, first comes the compressed header */
+ size_t tmp_complen = to_be_sent;
+ size_t payload_size;
+ zend_uchar * uncompressed_payload = p; /* should include the header */
+
+ STORE_HEADER_SIZE(safe_storage, uncompressed_payload);
+ int3store(uncompressed_payload, to_be_sent);
+ int1store(uncompressed_payload + 3, pfc->data->packet_no);
+ if (PASS == pfc->data->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen,
+ uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE))
+ {
+ int3store(compress_buf + MYSQLND_HEADER_SIZE, to_be_sent + MYSQLND_HEADER_SIZE);
+ payload_size = tmp_complen;
+ } else {
+ int3store(compress_buf + MYSQLND_HEADER_SIZE, 0);
+ memcpy(compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE);
+ payload_size = to_be_sent + MYSQLND_HEADER_SIZE;
+ }
+ RESTORE_HEADER_SIZE(uncompressed_payload, safe_storage);
+
+ int3store(compress_buf, payload_size);
+ int1store(compress_buf + 3, pfc->data->packet_no);
+ DBG_INF_FMT("writing "MYSQLND_SZ_T_SPEC" bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE);
+ bytes_sent = vio->data->m.network_write(vio, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, conn_stats, error_info);
+ pfc->data->compressed_envelope_packet_no++;
+ #if WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY
+ if (res == Z_OK) {
+ size_t decompressed_size = left + MYSQLND_HEADER_SIZE;
+ zend_uchar * decompressed_data = mnd_malloc(decompressed_size);
+ int error = pfc->data->m.decode(decompressed_data, decompressed_size,
+ compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, payload_size);
+ if (error == Z_OK) {
+ int i;
+ DBG_INF("success decompressing");
+ for (i = 0 ; i < decompressed_size; i++) {
+ if (i && (i % 30 == 0)) {
+ printf("\n\t\t");
+ }
+ printf("%.2X ", (int)*((char*)&(decompressed_data[i])));
+ DBG_INF_FMT("%.2X ", (int)*((char*)&(decompressed_data[i])));
+ }
+ } else {
+ DBG_INF("error decompressing");
+ }
+ mnd_free(decompressed_data);
+ }
+ #endif /* WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY */
+ } else
+#endif /* MYSQLND_COMPRESSION_ENABLED */
+ {
+ DBG_INF("no compression");
+ STORE_HEADER_SIZE(safe_storage, p);
+ int3store(p, to_be_sent);
+ int1store(p + 3, pfc->data->packet_no);
+ bytes_sent = vio->data->m.network_write(vio, p, to_be_sent + MYSQLND_HEADER_SIZE, conn_stats, error_info);
+ RESTORE_HEADER_SIZE(p, safe_storage);
+ pfc->data->compressed_envelope_packet_no++;
+ }
+ pfc->data->packet_no++;
+
+ p += to_be_sent;
+ left -= to_be_sent;
+ packets_sent++;
+ /*
+ if left is 0 then there is nothing more to send, but if the last packet was exactly
+ with the size MYSQLND_MAX_PACKET_SIZE we need to send additional packet, which has
+ empty payload. Thus if left == 0 we check for to_be_sent being the max size. If it is
+ indeed it then loop once more, then to_be_sent will become 0, left will stay 0. Empty
+ packet will be sent and this loop will end.
+ */
+ } while (bytes_sent && (left > 0 || to_be_sent == MYSQLND_MAX_PACKET_SIZE));
+
+ DBG_INF_FMT("packet_size="MYSQLND_SZ_T_SPEC" packet_no=%u", left, pfc->data->packet_no);
+
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats,
+ STAT_BYTES_SENT, count + packets_sent * MYSQLND_HEADER_SIZE,
+ STAT_PROTOCOL_OVERHEAD_OUT, packets_sent * MYSQLND_HEADER_SIZE,
+ STAT_PACKETS_SENT, packets_sent);
+
+ if (compress_buf) {
+ mnd_efree(compress_buf);
+ }
+
+ /* Even for zero size payload we have to send a packet */
+ if (!bytes_sent) {
+ DBG_ERR_FMT("Can't %u send bytes", count);
+ SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ }
+ DBG_RETURN(bytes_sent);
+}
+/* }}} */
+
+
+#ifdef MYSQLND_COMPRESSION_ENABLED
+
+/* {{{ mysqlnd_pfc::read_compressed_packet_from_stream_and_fill_read_buffer */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, read_compressed_packet_from_stream_and_fill_read_buffer)
+ (MYSQLND_PFC * pfc, MYSQLND_VIO * vio, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info)
+{
+ size_t decompressed_size;
+ enum_func_status retval = PASS;
+ zend_uchar * compressed_data = NULL;
+ zend_uchar comp_header[COMPRESSED_HEADER_SIZE];
+ DBG_ENTER("mysqlnd_pfc::read_compressed_packet_from_stream_and_fill_read_buffer");
+
+ /* Read the compressed header */
+ if (FAIL == vio->data->m.network_read(vio, comp_header, COMPRESSED_HEADER_SIZE, conn_stats, error_info)) {
+ DBG_RETURN(FAIL);
+ }
+ decompressed_size = uint3korr(comp_header);
+
+ /* When decompressed_size is 0, then the data is not compressed, and we have wasted 3 bytes */
+ /* we need to decompress the data */
+
+ if (decompressed_size) {
+ compressed_data = mnd_emalloc(net_payload_size);
+ if (FAIL == vio->data->m.network_read(vio, compressed_data, net_payload_size, conn_stats, error_info)) {
+ retval = FAIL;
+ goto end;
+ }
+ pfc->data->uncompressed_data = mysqlnd_create_read_buffer(decompressed_size);
+ retval = pfc->data->m.decode(pfc->data->uncompressed_data->data, decompressed_size, compressed_data, net_payload_size);
+ if (FAIL == retval) {
+ goto end;
+ }
+ } else {
+ DBG_INF_FMT("The server decided not to compress the data. Our job is easy. Copying %u bytes", net_payload_size);
+ pfc->data->uncompressed_data = mysqlnd_create_read_buffer(net_payload_size);
+ if (FAIL == vio->data->m.network_read(vio, pfc->data->uncompressed_data->data, net_payload_size, conn_stats, error_info)) {
+ retval = FAIL;
+ goto end;
+ }
+ }
+end:
+ if (compressed_data) {
+ mnd_efree(compressed_data);
+ }
+ DBG_RETURN(retval);
+}
+/* }}} */
+#endif /* MYSQLND_COMPRESSION_ENABLED */
+
+
+/* {{{ mysqlnd_pfc::decode */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, decode)(zend_uchar * uncompressed_data, const size_t uncompressed_data_len,
+ const zend_uchar * const compressed_data, const size_t compressed_data_len)
+{
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ int error;
+ uLongf tmp_complen = uncompressed_data_len;
+ DBG_ENTER("mysqlnd_pfc::decode");
+ error = uncompress(uncompressed_data, &tmp_complen, compressed_data, compressed_data_len);
+
+ DBG_INF_FMT("compressed data: decomp_len=%lu compressed_size="MYSQLND_SZ_T_SPEC, tmp_complen, compressed_data_len);
+ if (error != Z_OK) {
+ DBG_INF_FMT("decompression NOT successful. error=%d Z_OK=%d Z_BUF_ERROR=%d Z_MEM_ERROR=%d", error, Z_OK, Z_BUF_ERROR, Z_MEM_ERROR);
+ }
+ DBG_RETURN(error == Z_OK? PASS:FAIL);
+#else
+ DBG_ENTER("mysqlnd_pfc::decode");
+ DBG_RETURN(FAIL);
+#endif
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc::encode */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len,
+ const zend_uchar * const uncompressed_data, const size_t uncompressed_data_len)
+{
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ int error;
+ uLongf tmp_complen = *compress_buffer_len;
+ DBG_ENTER("mysqlnd_pfc::encode");
+ error = compress(compress_buffer, &tmp_complen, uncompressed_data, uncompressed_data_len);
+
+ if (error != Z_OK) {
+ DBG_INF_FMT("compression NOT successful. error=%d Z_OK=%d Z_BUF_ERROR=%d Z_MEM_ERROR=%d", error, Z_OK, Z_BUF_ERROR, Z_MEM_ERROR);
+ } else {
+ *compress_buffer_len = tmp_complen;
+ DBG_INF_FMT("compression successful. compressed size=%lu", tmp_complen);
+ }
+
+ DBG_RETURN(error == Z_OK? PASS:FAIL);
+#else
+ DBG_ENTER("mysqlnd_pfc::encode");
+ DBG_RETURN(FAIL);
+#endif
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc::receive */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, receive)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar * const buffer, const size_t count,
+ MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ size_t to_read = count;
+ zend_uchar * p = buffer;
+
+ DBG_ENTER("mysqlnd_pfc::receive");
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ if (pfc->data->compressed) {
+ if (pfc->data->uncompressed_data) {
+ size_t to_read_from_buffer = MIN(pfc->data->uncompressed_data->bytes_left(pfc->data->uncompressed_data), to_read);
+ DBG_INF_FMT("reading "MYSQLND_SZ_T_SPEC" from uncompressed_data buffer", to_read_from_buffer);
+ if (to_read_from_buffer) {
+ pfc->data->uncompressed_data->read(pfc->data->uncompressed_data, to_read_from_buffer, (zend_uchar *) p);
+ p += to_read_from_buffer;
+ to_read -= to_read_from_buffer;
+ }
+ DBG_INF_FMT("left "MYSQLND_SZ_T_SPEC" to read", to_read);
+ if (TRUE == pfc->data->uncompressed_data->is_empty(pfc->data->uncompressed_data)) {
+ /* Everything was consumed. This should never happen here, but for security */
+ pfc->data->uncompressed_data->free_buffer(&pfc->data->uncompressed_data);
+ }
+ }
+ if (to_read) {
+ zend_uchar net_header[MYSQLND_HEADER_SIZE];
+ size_t net_payload_size;
+ zend_uchar packet_no;
+
+ if (FAIL == vio->data->m.network_read(vio, net_header, MYSQLND_HEADER_SIZE, conn_stats, error_info)) {
+ DBG_RETURN(FAIL);
+ }
+ net_payload_size = uint3korr(net_header);
+ packet_no = uint1korr(net_header + 3);
+ if (pfc->data->compressed_envelope_packet_no != packet_no) {
+ DBG_ERR_FMT("Transport level: packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC,
+ pfc->data->compressed_envelope_packet_no, packet_no, net_payload_size);
+
+ php_error(E_WARNING, "Packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC,
+ pfc->data->compressed_envelope_packet_no, packet_no, net_payload_size);
+ DBG_RETURN(FAIL);
+ }
+ pfc->data->compressed_envelope_packet_no++;
+#ifdef MYSQLND_DUMP_HEADER_N_BODY
+ DBG_INF_FMT("HEADER: hwd_packet_no=%u size=%3u", packet_no, (zend_ulong) net_payload_size);
+#endif
+ /* Now let's read from the wire, decompress it and fill the read buffer */
+ pfc->data->m.read_compressed_packet_from_stream_and_fill_read_buffer(pfc, vio, net_payload_size, conn_stats, error_info);
+
+ /*
+ Now a bit of recursion - read from the read buffer,
+ if the data which we have just read from the wire
+ is not enough, then the recursive call will try to
+ satisfy it until it is satisfied.
+ */
+ DBG_RETURN(pfc->data->m.receive(pfc, vio, p, to_read, conn_stats, error_info));
+ }
+ DBG_RETURN(PASS);
+ }
+#endif /* MYSQLND_COMPRESSION_ENABLED */
+ DBG_RETURN(vio->data->m.network_read(vio, p, to_read, conn_stats, error_info));
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc::set_client_option */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, set_client_option)(MYSQLND_PFC * const pfc, enum_mysqlnd_client_option option, const char * const value)
+{
+ DBG_ENTER("mysqlnd_pfc::set_client_option");
+ DBG_INF_FMT("option=%u", option);
+ switch (option) {
+ case MYSQL_OPT_COMPRESS:
+ pfc->data->flags |= MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION;
+ break;
+ case MYSQL_SERVER_PUBLIC_KEY: {
+ const zend_bool pers = pfc->persistent;
+ if (pfc->data->sha256_server_public_key) {
+ mnd_pefree(pfc->data->sha256_server_public_key, pers);
+ }
+ pfc->data->sha256_server_public_key = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ case MYSQLND_OPT_NET_CMD_BUFFER_SIZE:
+ DBG_INF("MYSQLND_OPT_NET_CMD_BUFFER_SIZE");
+ if (*(unsigned int*) value < MYSQLND_NET_CMD_BUFFER_MIN_SIZE) {
+ DBG_RETURN(FAIL);
+ }
+ pfc->cmd_buffer.length = *(unsigned int*) value;
+ DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, pfc->cmd_buffer.length);
+ if (!pfc->cmd_buffer.buffer) {
+ pfc->cmd_buffer.buffer = mnd_pemalloc(pfc->cmd_buffer.length, pfc->persistent);
+ } else {
+ pfc->cmd_buffer.buffer = mnd_perealloc(pfc->cmd_buffer.buffer, pfc->cmd_buffer.length, pfc->persistent);
+ }
+ break;
+ }
+ default:
+ DBG_RETURN(FAIL);
+ }
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc::free_contents */
+static void
+MYSQLND_METHOD(mysqlnd_pfc, free_contents)(MYSQLND_PFC * pfc)
+{
+ DBG_ENTER("mysqlnd_pfc::free_contents");
+
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ if (pfc->data->uncompressed_data) {
+ pfc->data->uncompressed_data->free_buffer(&pfc->data->uncompressed_data);
+ }
+#endif
+ if (pfc->data->sha256_server_public_key) {
+ mnd_pefree(pfc->data->sha256_server_public_key, pfc->persistent);
+ pfc->data->sha256_server_public_key = NULL;
+ }
+
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc::init */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_pfc, init)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ unsigned int buf_size;
+ DBG_ENTER("mysqlnd_pfc::init");
+
+ buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/
+ pfc->data->m.set_client_option(pfc, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size);
+
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc::dtor */
+static void
+MYSQLND_METHOD(mysqlnd_pfc, dtor)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ DBG_ENTER("mysqlnd_pfc::dtor");
+ if (pfc) {
+ pfc->data->m.free_contents(pfc);
+
+ if (pfc->cmd_buffer.buffer) {
+ DBG_INF("Freeing cmd buffer");
+ mnd_pefree(pfc->cmd_buffer.buffer, pfc->persistent);
+ pfc->cmd_buffer.buffer = NULL;
+ }
+
+ mnd_pefree(pfc->data, pfc->data->persistent);
+ mnd_pefree(pfc, pfc->persistent);
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+MYSQLND_CLASS_METHODS_START(mysqlnd_protocol_packet_frame_codec)
+ MYSQLND_METHOD(mysqlnd_pfc, init),
+ MYSQLND_METHOD(mysqlnd_pfc, dtor),
+ MYSQLND_METHOD(mysqlnd_pfc, reset),
+
+ MYSQLND_METHOD(mysqlnd_pfc, set_client_option),
+
+ MYSQLND_METHOD(mysqlnd_pfc, decode),
+ MYSQLND_METHOD(mysqlnd_pfc, encode),
+
+ MYSQLND_METHOD(mysqlnd_pfc, send),
+ MYSQLND_METHOD(mysqlnd_pfc, receive),
+
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ MYSQLND_METHOD(mysqlnd_pfc, read_compressed_packet_from_stream_and_fill_read_buffer),
+#else
+ NULL,
+#endif
+
+ MYSQLND_METHOD(mysqlnd_pfc, free_contents),
+MYSQLND_CLASS_METHODS_END;
+
+
+/* {{{ mysqlnd_pfc_init */
+PHPAPI MYSQLND_PFC *
+mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
+{
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
+ MYSQLND_PFC * pfc;
+ DBG_ENTER("mysqlnd_pfc_init");
+ pfc = factory->get_protocol_frame_codec(persistent, stats, error_info);
+ DBG_RETURN(pfc);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_pfc_free */
+PHPAPI void
+mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
+{
+ DBG_ENTER("mysqlnd_pfc_free");
+ if (pfc) {
+ pfc->data->m.dtor(pfc, stats, error_info);
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_net.h b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h
index d863753a86..b00d0c5b08 100644
--- a/ext/mysqlnd/mysqlnd_net.h
+++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,21 +12,18 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd_wireprotocol.h 291983 2009-12-11 11:58:57Z andrey $ */
+#ifndef MYSQLND_PROTOCOL_FRAME_CODEC_H
+#define MYSQLND_PROTOCOL_FRAME_CODEC_H
-#ifndef MYSQLND_NET_H
-#define MYSQLND_NET_H
+PHPAPI MYSQLND_PFC * mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
+PHPAPI void mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
-PHPAPI MYSQLND_NET * mysqlnd_net_init(zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
-PHPAPI void mysqlnd_net_free(MYSQLND_NET * const net, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
-
-#endif /* MYSQLND_NET_H */
+#endif /* MYSQLND_PROTOCOL_FRAME_CODEC_H */
/*
* Local variables:
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index 767ba34ab0..432bc78ade 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,17 +12,17 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
+#include "mysqlnd_connection.h"
#include "mysqlnd_priv.h"
+#include "mysqlnd_ps.h"
#include "mysqlnd_result.h"
#include "mysqlnd_result_meta.h"
#include "mysqlnd_statistics.h"
@@ -30,9 +30,6 @@
#include "mysqlnd_block_alloc.h"
#include "mysqlnd_ext_plugin.h"
-#define MYSQLND_SILENT
-
-
const char * const mysqlnd_not_bound_as_blob = "Can't send long data for non-string/non-binary data types";
const char * const mysqlnd_stmt_not_prepared = "Statement not prepared";
@@ -41,25 +38,23 @@ enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, z
enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer);
static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt);
-static void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned int param_no);
+static void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, const unsigned int param_no);
/* {{{ mysqlnd_stmt::store_result */
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
enum_func_status ret;
- MYSQLND_CONN_DATA * conn;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
MYSQLND_RES * result;
DBG_ENTER("mysqlnd_stmt::store_result");
- if (!stmt || !stmt->conn || !stmt->result) {
+ if (!stmt || !conn || !stmt->result) {
DBG_RETURN(NULL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- conn = stmt->conn;
-
/* be compliant with libmysql - NULL will turn */
if (!stmt->field_count) {
DBG_RETURN(NULL);
@@ -71,18 +66,16 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
}
/* Nothing to store for UPSERT/LOAD DATA*/
- if (CONN_GET_STATE(conn) != CONN_FETCHING_DATA ||
- stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE)
+ if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA || stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE)
{
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC,
- UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_RETURN(NULL);
}
stmt->default_rset_handler = s->m->store_result;
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_PS_BUFFERED_SETS);
result = stmt->result;
@@ -91,7 +84,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
result->stored_data = (MYSQLND_RES_BUFFERED *) mysqlnd_result_buffered_zval_init(result->field_count, TRUE, result->persistent);
if (!result->stored_data) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
@@ -100,19 +93,18 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
result->stored_data->m.fetch_row = mysqlnd_stmt_fetch_row_buffered;
if (PASS == ret) {
- /* Overflow ? */
if (result->stored_data->type == MYSQLND_BUFFERED_TYPE_ZVAL) {
MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result->stored_data;
if (result->stored_data->row_count) {
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
if (result->stored_data->row_count * result->meta->field_count * sizeof(zval *) > SIZE_MAX) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
/* if pecalloc is used valgrind barks gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) */
set->data = mnd_emalloc((size_t)(result->stored_data->row_count * result->meta->field_count * sizeof(zval)));
if (!set->data) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
memset(set->data, 0, (size_t)(result->stored_data->row_count * result->meta->field_count * sizeof(zval)));
@@ -124,11 +116,11 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
}
/* libmysql API docs say it should be so for SELECT statements */
- stmt->upsert_status->affected_rows = stmt->result->stored_data->row_count;
+ UPSERT_STATUS_SET_AFFECTED_ROWS(stmt->upsert_status, stmt->result->stored_data->row_count);
stmt->state = MYSQLND_STMT_USE_OR_STORE_CALLED;
} else {
- COPY_CLIENT_ERROR(*conn->error_info, result->stored_data->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info);
stmt->result->m.free_result_contents(stmt->result);
mnd_efree(stmt->result);
stmt->result = NULL;
@@ -144,18 +136,16 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- MYSQLND_CONN_DATA * conn;
- MYSQLND_RES *result;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+ MYSQLND_RES * result;
DBG_ENTER("mysqlnd_stmt::get_result");
- if (!stmt || !stmt->conn || !stmt->result) {
+ if (!stmt || !conn || !stmt->result) {
DBG_RETURN(NULL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- conn = stmt->conn;
-
/* be compliant with libmysql - NULL will turn */
if (!stmt->field_count) {
DBG_RETURN(NULL);
@@ -167,35 +157,34 @@ MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const s)
}
/* Nothing to store for UPSERT/LOAD DATA*/
- if (CONN_GET_STATE(conn) != CONN_FETCHING_DATA || stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) {
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC,
- UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA || stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) {
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_RETURN(NULL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_BUFFERED_SETS);
do {
result = conn->m->result_init(stmt->result->field_count, stmt->persistent);
if (!result) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE);
if (!result->meta) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
break;
}
if ((result = result->m.store_result(result, conn, MYSQLND_STORE_PS | MYSQLND_STORE_NO_COPY))) {
- stmt->upsert_status->affected_rows = result->stored_data->row_count;
+ UPSERT_STATUS_SET_AFFECTED_ROWS(stmt->upsert_status, result->stored_data->row_count);
stmt->state = MYSQLND_STMT_PREPARED;
result->type = MYSQLND_RES_PS_BUF;
} else {
- COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
stmt->state = MYSQLND_STMT_PREPARED;
break;
}
@@ -214,12 +203,11 @@ MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const s)
static zend_bool
MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
DBG_ENTER("mysqlnd_stmt::more_results");
/* (conn->state == CONN_NEXT_RESULT_PENDING) too */
- DBG_RETURN((stmt && stmt->conn && (stmt->conn->m->get_server_status(stmt->conn) & SERVER_MORE_RESULTS_EXISTS))?
- TRUE:
- FALSE);
+ DBG_RETURN((stmt && conn && (conn->m->get_server_status(conn) & SERVER_MORE_RESULTS_EXISTS))? TRUE: FALSE);
}
/* }}} */
@@ -228,21 +216,20 @@ MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * s)
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, next_result)(MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- MYSQLND_CONN_DATA * conn;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
DBG_ENTER("mysqlnd_stmt::next_result");
- if (!stmt || !stmt->conn || !stmt->result) {
+ if (!stmt || !conn || !stmt->result) {
DBG_RETURN(FAIL);
}
- conn = stmt->conn;
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- if (CONN_GET_STATE(conn) != CONN_NEXT_RESULT_PENDING || !(conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS)) {
+ if (GET_CONNECTION_STATE(&conn->state) != CONN_NEXT_RESULT_PENDING || !(UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS)) {
DBG_RETURN(FAIL);
}
- DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status, stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS);
+ DBG_INF_FMT("server_status=%u cursor=%u", UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status), UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_STATUS_CURSOR_EXISTS);
/* Free space for next result */
s->m->free_stmt_result(s);
@@ -258,27 +245,28 @@ MYSQLND_METHOD(mysqlnd_stmt, next_result)(MYSQLND_STMT * s)
static enum_func_status
mysqlnd_stmt_skip_metadata(MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
/* Follows parameter metadata, we have just to skip it, as libmysql does */
unsigned int i = 0;
enum_func_status ret = FAIL;
MYSQLND_PACKET_RES_FIELD * field_packet;
DBG_ENTER("mysqlnd_stmt_skip_metadata");
- if (!stmt || !stmt->conn || !stmt->conn->protocol) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- field_packet = stmt->conn->protocol->m.get_result_field_packet(stmt->conn->protocol, FALSE);
+ field_packet = conn->payload_decoder_factory->m.get_result_field_packet(conn->payload_decoder_factory, FALSE);
if (!field_packet) {
- SET_OOM_ERROR(*stmt->error_info);
- SET_OOM_ERROR(*stmt->conn->error_info);
+ SET_OOM_ERROR(stmt->error_info);
+ SET_OOM_ERROR(conn->error_info);
} else {
ret = PASS;
field_packet->skip_parsing = TRUE;
for (;i < stmt->param_count; i++) {
- if (FAIL == PACKET_READ(field_packet, stmt->conn)) {
+ if (FAIL == PACKET_READ(field_packet)) {
ret = FAIL;
break;
}
@@ -295,38 +283,39 @@ mysqlnd_stmt_skip_metadata(MYSQLND_STMT * s)
static enum_func_status
mysqlnd_stmt_read_prepare_response(MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
MYSQLND_PACKET_PREPARE_RESPONSE * prepare_resp;
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_stmt_read_prepare_response");
- if (!stmt || !stmt->conn || !stmt->conn->protocol) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- prepare_resp = stmt->conn->protocol->m.get_prepare_response_packet(stmt->conn->protocol, FALSE);
+ prepare_resp = conn->payload_decoder_factory->m.get_prepare_response_packet(conn->payload_decoder_factory, FALSE);
if (!prepare_resp) {
- SET_OOM_ERROR(*stmt->error_info);
- SET_OOM_ERROR(*stmt->conn->error_info);
+ SET_OOM_ERROR(stmt->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto done;
}
- if (FAIL == PACKET_READ(prepare_resp, stmt->conn)) {
+ if (FAIL == PACKET_READ(prepare_resp)) {
goto done;
}
if (0xFF == prepare_resp->error_code) {
- COPY_CLIENT_ERROR(*stmt->error_info, prepare_resp->error_info);
- COPY_CLIENT_ERROR(*stmt->conn->error_info, prepare_resp->error_info);
+ COPY_CLIENT_ERROR(stmt->error_info, prepare_resp->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, prepare_resp->error_info);
goto done;
}
ret = PASS;
stmt->stmt_id = prepare_resp->stmt_id;
- stmt->warning_count = stmt->conn->upsert_status->warning_count = prepare_resp->warning_count;
- stmt->field_count = stmt->conn->field_count = prepare_resp->field_count;
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, prepare_resp->warning_count);
+ UPSERT_STATUS_SET_AFFECTED_ROWS(stmt->upsert_status, 0); /* be like libmysql */
+ stmt->field_count = conn->field_count = prepare_resp->field_count;
stmt->param_count = prepare_resp->param_count;
- stmt->upsert_status->affected_rows = 0; /* be like libmysql */
done:
PACKET_FREE(prepare_resp);
@@ -339,31 +328,37 @@ done:
static enum_func_status
mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
MYSQLND_PACKET_EOF * fields_eof;
enum_func_status ret = FAIL;
DBG_ENTER("mysqlnd_stmt_prepare_read_eof");
- if (!stmt || !stmt->conn || !stmt->conn->protocol) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- fields_eof = stmt->conn->protocol->m.get_eof_packet(stmt->conn->protocol, FALSE);
+ fields_eof = conn->payload_decoder_factory->m.get_eof_packet(conn->payload_decoder_factory, FALSE);
if (!fields_eof) {
- SET_OOM_ERROR(*stmt->error_info);
- SET_OOM_ERROR(*stmt->conn->error_info);
+ SET_OOM_ERROR(stmt->error_info);
+ SET_OOM_ERROR(conn->error_info);
} else {
- if (FAIL == (ret = PACKET_READ(fields_eof, stmt->conn))) {
+ if (FAIL == (ret = PACKET_READ(fields_eof))) {
if (stmt->result) {
stmt->result->m.free_result_contents(stmt->result);
mnd_efree(stmt->result);
+ /* XXX: This will crash, because we will null also the methods.
+ But seems it happens in extreme cases or doesn't. Should be fixed by exporting a function
+ (from mysqlnd_driver.c?) to do the reset.
+ This bad handling is also in mysqlnd_result.c
+ */
memset(stmt, 0, sizeof(MYSQLND_STMT_DATA));
stmt->state = MYSQLND_STMT_INITTED;
}
} else {
- stmt->upsert_status->server_status = fields_eof->server_status;
- stmt->upsert_status->warning_count = fields_eof->warning_count;
+ UPSERT_STATUS_SET_SERVER_STATUS(stmt->upsert_status, fields_eof->server_status);
+ UPSERT_STATUS_SET_WARNINGS(stmt->upsert_status, fields_eof->warning_count);
stmt->state = MYSQLND_STMT_PREPARED;
}
PACKET_FREE(fields_eof);
@@ -376,24 +371,25 @@ mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT * s)
/* {{{ mysqlnd_stmt::prepare */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const query, unsigned int query_len)
+MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const query, const size_t query_len)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
MYSQLND_STMT * s_to_prepare = s;
MYSQLND_STMT_DATA * stmt_to_prepare = stmt;
DBG_ENTER("mysqlnd_stmt::prepare");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
DBG_INF_FMT("query=%s", query);
- SET_ERROR_AFF_ROWS(stmt);
- SET_ERROR_AFF_ROWS(stmt->conn);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(stmt->upsert_status);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->state > MYSQLND_STMT_INITTED) {
/* See if we have to clean the wire */
@@ -410,16 +406,27 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const
Create a new test statement, which we will prepare, but if anything
fails, we will scrap it.
*/
- s_to_prepare = stmt->conn->m->stmt_init(stmt->conn);
+ s_to_prepare = conn->m->stmt_init(conn);
if (!s_to_prepare) {
goto fail;
}
stmt_to_prepare = s_to_prepare->data;
}
- if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, (const zend_uchar *) query, query_len, PROT_LAST, FALSE, TRUE) ||
- FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare))
{
+ enum_func_status ret = FAIL;
+ const MYSQLND_CSTRING query_string = {query, query_len};
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_STMT_PREPARE, conn, query_string);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
+ if (FAIL == ret) {
+ goto fail;
+ }
+ }
+
+ if (FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare)) {
goto fail;
}
@@ -437,19 +444,19 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const
no metadata at prepare.
*/
if (stmt_to_prepare->field_count) {
- MYSQLND_RES * result = stmt->conn->m->result_init(stmt_to_prepare->field_count, stmt_to_prepare->persistent);
+ MYSQLND_RES * result = conn->m->result_init(stmt_to_prepare->field_count, stmt_to_prepare->persistent);
if (!result) {
- SET_OOM_ERROR(*stmt->conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
goto fail;
}
/* Allocate the result now as it is needed for the reading of metadata */
stmt_to_prepare->result = result;
- result->conn = stmt_to_prepare->conn->m->get_reference(stmt_to_prepare->conn);
+ result->conn = conn->m->get_reference(conn);
result->type = MYSQLND_RES_PS_BUF;
- if (FAIL == result->m.read_result_metadata(result, stmt_to_prepare->conn) ||
+ if (FAIL == result->m.read_result_metadata(result, conn) ||
FAIL == mysqlnd_stmt_prepare_read_eof(s_to_prepare))
{
goto fail;
@@ -491,23 +498,22 @@ fail:
static enum_func_status
mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s, enum_mysqlnd_parse_exec_response_type type)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
enum_func_status ret;
- MYSQLND_CONN_DATA * conn;
DBG_ENTER("mysqlnd_stmt_execute_parse_response");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
- conn = stmt->conn;
- CONN_SET_STATE(conn, CONN_QUERY_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_QUERY_SENT);
- ret = mysqlnd_query_read_result_set_header(stmt->conn, s);
+ ret = conn->m->query_read_result_set_header(conn, s);
if (ret == FAIL) {
- COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
- memset(stmt->upsert_status, 0, sizeof(*stmt->upsert_status));
- stmt->upsert_status->affected_rows = conn->upsert_status->affected_rows;
- if (CONN_GET_STATE(conn) == CONN_QUIT_SENT) {
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
+ UPSERT_STATUS_RESET(stmt->upsert_status);
+ UPSERT_STATUS_SET_AFFECTED_ROWS(stmt->upsert_status, UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status));
+ if (GET_CONNECTION_STATE(&conn->state) == CONN_QUIT_SENT) {
/* close the statement here, the connection has been closed */
}
stmt->state = MYSQLND_STMT_PREPARED;
@@ -520,9 +526,13 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s, enum_mysqlnd_parse_e
value is > LONG_MAX or < LONG_MIN, there is string conversion and we have
to resend the types. Next execution will also need to resend the type.
*/
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
- *stmt->upsert_status = *conn->upsert_status; /* copy status */
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
+ UPSERT_STATUS_SET_WARNINGS(stmt->upsert_status, UPSERT_STATUS_GET_WARNINGS(conn->upsert_status));
+ UPSERT_STATUS_SET_AFFECTED_ROWS(stmt->upsert_status, UPSERT_STATUS_GET_AFFECTED_ROWS(conn->upsert_status));
+ UPSERT_STATUS_SET_SERVER_STATUS(stmt->upsert_status, UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
+ UPSERT_STATUS_SET_LAST_INSERT_ID(stmt->upsert_status, UPSERT_STATUS_GET_LAST_INSERT_ID(conn->upsert_status));
+
stmt->state = MYSQLND_STMT_EXECUTED;
if (conn->last_query_type == QUERY_UPSERT || conn->last_query_type == QUERY_LOAD_LOCAL) {
DBG_INF("PASS");
@@ -535,7 +545,7 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s, enum_mysqlnd_parse_e
For SHOW we don't create (bypasses PS in server)
a result set at prepare and thus a connection was missing
*/
- stmt->result->conn = stmt->conn->m->get_reference(stmt->conn);
+ stmt->result->conn = conn->m->get_reference(conn);
}
/* Update stmt->field_count as SHOW sets it to 0 at prepare */
@@ -552,13 +562,13 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s, enum_mysqlnd_parse_e
use_result() or store_result() and we should be able to scrap the
data on the line, if he just decides to close the statement.
*/
- DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status,
- stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS);
+ DBG_INF_FMT("server_status=%u cursor=%u", UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status),
+ UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status) & SERVER_STATUS_CURSOR_EXISTS);
- if (stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS) {
+ if (UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status) & SERVER_STATUS_CURSOR_EXISTS) {
DBG_INF("cursor exists");
stmt->cursor_exists = TRUE;
- CONN_SET_STATE(conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
/* Only cursor read */
stmt->default_rset_handler = s->m->use_result;
DBG_INF("use_result");
@@ -586,7 +596,7 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s, enum_mysqlnd_parse_e
}
}
#ifndef MYSQLND_DONT_SKIP_OUT_PARAMS_RESULTSET
- if (stmt->upsert_status->server_status & SERVER_PS_OUT_PARAMS) {
+ if (UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status) & SERVER_PS_OUT_PARAMS) {
s->m->free_stmt_content(s);
DBG_INF("PS OUT Variable RSet, skipping");
/* OUT params result set. Skip for now to retain compatibility */
@@ -594,10 +604,10 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s, enum_mysqlnd_parse_e
}
#endif
- DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status->server_status, stmt->upsert_status->server_status & SERVER_STATUS_CURSOR_EXISTS);
+ DBG_INF_FMT("server_status=%u cursor=%u", UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status), UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status) & SERVER_STATUS_CURSOR_EXISTS);
- if (ret == PASS && conn->last_query_type == QUERY_UPSERT && stmt->upsert_status->affected_rows) {
- MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_PS, stmt->upsert_status->affected_rows);
+ if (ret == PASS && conn->last_query_type == QUERY_UPSERT && UPSERT_STATUS_GET_AFFECTED_ROWS(stmt->upsert_status)) {
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_PS, UPSERT_STATUS_GET_AFFECTED_ROWS(stmt->upsert_status));
}
DBG_INF(ret == PASS? "PASS":"FAIL");
@@ -623,24 +633,23 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const s)
/* {{{ mysqlnd_stmt::send_execute */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_send_execute_type type, zval * read_cb, zval * err_cb)
+MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, const enum_mysqlnd_send_execute_type type, zval * read_cb, zval * err_cb)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
enum_func_status ret;
- MYSQLND_CONN_DATA * conn;
zend_uchar *request = NULL;
size_t request_len;
zend_bool free_request;
DBG_ENTER("mysqlnd_stmt::send_execute");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
- conn = stmt->conn;
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- SET_ERROR_AFF_ROWS(stmt);
- SET_ERROR_AFF_ROWS(stmt->conn);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(stmt->upsert_status);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED && stmt->field_count) {
/*
@@ -688,9 +697,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
stmt->state = MYSQLND_STMT_PREPARED;
} else if (stmt->state < MYSQLND_STMT_PREPARED) {
/* Only initted - error */
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE,
- mysqlnd_out_of_sync);
- SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ SET_CLIENT_ERROR(stmt->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_INF("FAIL");
DBG_RETURN(FAIL);
}
@@ -698,8 +705,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
if (stmt->param_count) {
unsigned int i, not_bound = 0;
if (!stmt->param_bind) {
- SET_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE,
- "No data supplied for parameters in prepared statement");
+ SET_CLIENT_ERROR(stmt->error_info, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE, "No data supplied for parameters in prepared statement");
DBG_INF("FAIL");
DBG_RETURN(FAIL);
}
@@ -712,7 +718,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
char * msg;
mnd_sprintf(&msg, 0, "No data supplied for %u parameter%s in prepared statement",
not_bound, not_bound>1 ?"s":"");
- SET_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE, msg);
+ SET_CLIENT_ERROR(stmt->error_info, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE, msg);
if (msg) {
mnd_sprintf_free(msg);
}
@@ -722,12 +728,15 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
}
ret = s->m->generate_execute_request(s, &request, &request_len, &free_request);
if (ret == PASS) {
- /* support for buffer types should be added here ! */
- ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, request, request_len,
- PROT_LAST /* we will handle the response packet*/,
- FALSE, FALSE);
+ const MYSQLND_CSTRING payload = {(const char*) request, request_len};
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_STMT_EXECUTE, conn, payload);
+ ret = FAIL;
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ }
} else {
- SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Couldn't generate the request. Possibly OOM.");
+ SET_CLIENT_ERROR(stmt->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Couldn't generate the request. Possibly OOM.");
}
if (free_request) {
@@ -735,7 +744,7 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
}
if (ret == FAIL) {
- COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
DBG_INF("FAIL");
DBG_RETURN(FAIL);
}
@@ -748,10 +757,10 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_
/* {{{ mysqlnd_stmt_fetch_row_buffered */
enum_func_status
-mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything)
+mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything)
{
MYSQLND_STMT * s = (MYSQLND_STMT *) param;
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
const MYSQLND_RES_METADATA * const meta = result->meta;
unsigned int field_count = meta->field_count;
@@ -849,12 +858,13 @@ mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, unsigned int
/* {{{ mysqlnd_stmt_fetch_row_unbuffered */
enum_func_status
-mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything)
+mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything)
{
enum_func_status ret;
MYSQLND_STMT * s = (MYSQLND_STMT *) param;
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
MYSQLND_PACKET_ROW * row_packet;
+ MYSQLND_CONN_DATA * conn = result->conn;
const MYSQLND_RES_METADATA * const meta = result->meta;
DBG_ENTER("mysqlnd_stmt_fetch_row_unbuffered");
@@ -866,9 +876,8 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
DBG_INF("EOF already reached");
DBG_RETURN(PASS);
}
- if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) {
- SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC,
- UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) {
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("command out of sync");
DBG_RETURN(FAIL);
}
@@ -883,11 +892,11 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
If we skip rows (stmt == NULL || stmt->result_bind == NULL) we have to
result->unbuf->m.free_last_data() before it. The function returns always true.
*/
- if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) {
+ if (PASS == (ret = PACKET_READ(row_packet)) && !row_packet->eof) {
unsigned int i, field_count = result->field_count;
if (!row_packet->skip_extraction) {
- result->unbuf->m.free_last_data(result->unbuf, result->conn? result->conn->stats : NULL);
+ result->unbuf->m.free_last_data(result->unbuf, conn->stats);
result->unbuf->last_row_data = row_packet->fields;
result->unbuf->last_row_buffer = row_packet->row_buffer;
@@ -898,8 +907,8 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
result->unbuf->last_row_data,
row_packet->field_count,
row_packet->fields_metadata,
- result->conn->options->int_and_float_native,
- result->conn->stats))
+ conn->options->int_and_float_native,
+ conn->stats))
{
DBG_RETURN(FAIL);
}
@@ -918,8 +927,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
zval_dtor(result);
#endif
if (!Z_ISNULL_P(data)) {
- if ((Z_TYPE_P(data) == IS_STRING) &&
- (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))) {
+ if ((Z_TYPE_P(data) == IS_STRING) && (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))){
meta->fields[i].max_length = Z_STRLEN_P(data);
}
ZVAL_COPY_VALUE(result, data);
@@ -930,7 +938,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
}
}
}
- MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF);
} else {
DBG_INF("skipping extraction");
/*
@@ -939,7 +947,8 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
the bound variables. Thus we need to do part of what it does or Zend will
report leaks.
*/
- row_packet->row_buffer->free_chunk(row_packet->row_buffer);
+ row_packet->result_set_memory_pool->free_chunk(
+ row_packet->result_set_memory_pool, row_packet->row_buffer);
row_packet->row_buffer = NULL;
}
@@ -947,26 +956,27 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
*fetched_anything = TRUE;
} else if (ret == FAIL) {
if (row_packet->error_info.error_no) {
- COPY_CLIENT_ERROR(*stmt->conn->error_info, row_packet->error_info);
- COPY_CLIENT_ERROR(*stmt->error_info, row_packet->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info);
+ COPY_CLIENT_ERROR(stmt->error_info, row_packet->error_info);
}
- CONN_SET_STATE(result->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
} else if (row_packet->eof) {
DBG_INF("EOF");
/* Mark the connection as usable again */
result->unbuf->eof_reached = TRUE;
- memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status));
- result->conn->upsert_status->warning_count = row_packet->warning_count;
- result->conn->upsert_status->server_status = row_packet->server_status;
+ UPSERT_STATUS_RESET(conn->upsert_status);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status);
+
/*
result->row_packet will be cleaned when
destroying the result object
*/
- if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) {
- CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING);
+ if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) {
+ SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING);
} else {
- CONN_SET_STATE(result->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
}
}
@@ -980,32 +990,29 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, unsigned i
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
MYSQLND_RES * result;
- MYSQLND_CONN_DATA * conn;
DBG_ENTER("mysqlnd_stmt::use_result");
- if (!stmt || !stmt->conn || !stmt->result) {
+ if (!stmt || !conn || !stmt->result) {
DBG_RETURN(NULL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- conn = stmt->conn;
-
if (!stmt->field_count ||
- (!stmt->cursor_exists && CONN_GET_STATE(conn) != CONN_FETCHING_DATA) ||
- (stmt->cursor_exists && CONN_GET_STATE(conn) != CONN_READY) ||
+ (!stmt->cursor_exists && GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) ||
+ (stmt->cursor_exists && GET_CONNECTION_STATE(&conn->state) != CONN_READY) ||
(stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE))
{
- SET_CLIENT_ERROR(*conn->error_info, CR_COMMANDS_OUT_OF_SYNC,
- UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("command out of sync");
DBG_RETURN(NULL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
- MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_PS_UNBUFFERED_SETS);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_PS_UNBUFFERED_SETS);
result = stmt->result;
result->m.use_result(stmt->result, TRUE);
@@ -1019,16 +1026,15 @@ MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT * s)
/* }}} */
-#define STMT_ID_LENGTH 4
-
/* {{{ mysqlnd_fetch_row_cursor */
enum_func_status
-mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything)
+mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything)
{
enum_func_status ret;
MYSQLND_STMT * s = (MYSQLND_STMT *) param;
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- zend_uchar buf[STMT_ID_LENGTH /* statement id */ + 4 /* number of rows to fetch */];
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+ zend_uchar buf[MYSQLND_STMT_ID_LENGTH /* statement id */ + 4 /* number of rows to fetch */];
MYSQLND_PACKET_ROW * row_packet;
DBG_ENTER("mysqlnd_fetch_stmt_row_cursor");
@@ -1037,13 +1043,11 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
DBG_ERR("no statement");
DBG_RETURN(FAIL);
}
-
DBG_INF_FMT("stmt=%lu flags=%u", stmt->stmt_id, flags);
if (stmt->state < MYSQLND_STMT_USER_FETCHING) {
/* Only initted - error */
- SET_CLIENT_ERROR(*stmt->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE,
- mysqlnd_out_of_sync);
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("command out of sync");
DBG_RETURN(FAIL);
}
@@ -1051,28 +1055,38 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
DBG_RETURN(FAIL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
int4store(buf, stmt->stmt_id);
- int4store(buf + STMT_ID_LENGTH, 1); /* for now fetch only one row */
+ int4store(buf + MYSQLND_STMT_ID_LENGTH, 1); /* for now fetch only one row */
+
+ {
+ const MYSQLND_CSTRING payload = {(const char*) buf, sizeof(buf)};
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_STMT_FETCH, conn, payload);
+ ret = FAIL;
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ if (ret == FAIL) {
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
+ }
+ }
+ if (FAIL == ret) {
+ DBG_RETURN(FAIL);
+ }
- if (FAIL == stmt->conn->m->simple_command(stmt->conn, COM_STMT_FETCH, buf, sizeof(buf),
- PROT_LAST /* we will handle the response packet*/,
- FALSE, TRUE)) {
- COPY_CLIENT_ERROR(*stmt->error_info, *stmt->conn->error_info);
- DBG_RETURN(FAIL);
}
row_packet->skip_extraction = stmt->result_bind? FALSE:TRUE;
- memset(stmt->upsert_status, 0, sizeof(*stmt->upsert_status));
- if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) {
+ UPSERT_STATUS_RESET(stmt->upsert_status);
+ if (PASS == (ret = PACKET_READ(row_packet)) && !row_packet->eof) {
const MYSQLND_RES_METADATA * const meta = result->meta;
unsigned int i, field_count = result->field_count;
if (!row_packet->skip_extraction) {
- result->unbuf->m.free_last_data(result->unbuf, result->conn? result->conn->stats : NULL);
+ result->unbuf->m.free_last_data(result->unbuf, conn->stats);
result->unbuf->last_row_data = row_packet->fields;
result->unbuf->last_row_buffer = row_packet->row_buffer;
@@ -1083,8 +1097,8 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
result->unbuf->last_row_data,
row_packet->field_count,
row_packet->fields_metadata,
- result->conn->options->int_and_float_native,
- result->conn->stats))
+ conn->options->int_and_float_native,
+ conn->stats))
{
DBG_RETURN(FAIL);
}
@@ -1115,6 +1129,8 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
ZVAL_COPY_VALUE(result, data);
/* copied data, thus also the ownership. Thus null data */
ZVAL_NULL(data);
+ } else {
+ ZVAL_NULL(result);
}
}
}
@@ -1126,38 +1142,36 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
the bound variables. Thus we need to do part of what it does or Zend will
report leaks.
*/
- row_packet->row_buffer->free_chunk(row_packet->row_buffer);
+ row_packet->result_set_memory_pool->free_chunk(
+ row_packet->result_set_memory_pool, row_packet->row_buffer);
row_packet->row_buffer = NULL;
}
/* We asked for one row, the next one should be EOF, eat it */
- ret = PACKET_READ(row_packet, result->conn);
+ ret = PACKET_READ(row_packet);
if (row_packet->row_buffer) {
- row_packet->row_buffer->free_chunk(row_packet->row_buffer);
+ row_packet->result_set_memory_pool->free_chunk(
+ row_packet->result_set_memory_pool, row_packet->row_buffer);
row_packet->row_buffer = NULL;
}
- MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR);
result->unbuf->row_count++;
*fetched_anything = TRUE;
} else {
*fetched_anything = FALSE;
+ UPSERT_STATUS_SET_WARNINGS(stmt->upsert_status, row_packet->warning_count);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count);
- stmt->upsert_status->warning_count =
- stmt->conn->upsert_status->warning_count =
- row_packet->warning_count;
-
- stmt->upsert_status->server_status =
- stmt->conn->upsert_status->server_status =
- row_packet->server_status;
+ UPSERT_STATUS_SET_SERVER_STATUS(stmt->upsert_status, row_packet->server_status);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status);
result->unbuf->eof_reached = row_packet->eof;
}
- stmt->upsert_status->warning_count =
- stmt->conn->upsert_status->warning_count =
- row_packet->warning_count;
- stmt->upsert_status->server_status =
- stmt->conn->upsert_status->server_status =
- row_packet->server_status;
+ UPSERT_STATUS_SET_WARNINGS(stmt->upsert_status, row_packet->warning_count);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count);
+
+ UPSERT_STATUS_SET_SERVER_STATUS(stmt->upsert_status, row_packet->server_status);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status);
DBG_INF_FMT("ret=%s fetched=%u server_status=%u warnings=%u eof=%u",
ret == PASS? "PASS":"FAIL", *fetched_anything,
@@ -1172,7 +1186,8 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, unsigned int f
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fetched_anything)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
enum_func_status ret;
DBG_ENTER("mysqlnd_stmt::fetch");
if (!stmt || !stmt->conn) {
@@ -1180,10 +1195,8 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fe
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- if (!stmt->result ||
- stmt->state < MYSQLND_STMT_WAITING_USE_OR_STORE) {
- SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
-
+ if (!stmt->result || stmt->state < MYSQLND_STMT_WAITING_USE_OR_STORE) {
+ SET_CLIENT_ERROR(stmt->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("command out of sync");
DBG_RETURN(FAIL);
} else if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) {
@@ -1193,8 +1206,8 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fe
}
stmt->state = MYSQLND_STMT_USER_FETCHING;
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
DBG_INF_FMT("result_bind=%p separated_once=%u", &stmt->result_bind, stmt->result_zvals_separated_once);
/*
@@ -1228,18 +1241,18 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fe
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
enum_func_status ret = PASS;
- zend_uchar cmd_buf[STMT_ID_LENGTH /* statement id */];
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
DBG_ENTER("mysqlnd_stmt::reset");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->stmt_id) {
MYSQLND_CONN_DATA * conn = stmt->conn;
@@ -1262,12 +1275,18 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s)
be separated before that.
*/
- int4store(cmd_buf, stmt->stmt_id);
- if (CONN_GET_STATE(conn) == CONN_READY &&
- FAIL == (ret = conn->m->simple_command(conn, COM_STMT_RESET, cmd_buf,
- sizeof(cmd_buf), PROT_OK_PACKET,
- FALSE, TRUE))) {
- COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
+ if (GET_CONNECTION_STATE(&conn->state) == CONN_READY) {
+ size_t stmt_id = stmt->stmt_id;
+ struct st_mysqlnd_protocol_command * command = stmt->conn->command_factory(COM_STMT_RESET, stmt->conn, stmt_id);
+ ret = FAIL;
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+
+ if (ret == FAIL) {
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
+ }
+ }
}
*stmt->upsert_status = *conn->upsert_status;
}
@@ -1281,11 +1300,12 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s)
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, flush)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
enum_func_status ret = PASS;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
DBG_ENTER("mysqlnd_stmt::flush");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
@@ -1318,76 +1338,72 @@ MYSQLND_METHOD(mysqlnd_stmt, flush)(MYSQLND_STMT * const s)
/* {{{ mysqlnd_stmt::send_long_data */
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned int param_no,
- const char * const data, zend_ulong length)
+ const char * const data, zend_ulong data_length)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
enum_func_status ret = FAIL;
- MYSQLND_CONN_DATA * conn;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
zend_uchar * cmd_buf;
- enum php_mysqlnd_server_command cmd = COM_STMT_SEND_LONG_DATA;
DBG_ENTER("mysqlnd_stmt::send_long_data");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
- DBG_INF_FMT("stmt=%lu param_no=%u data_len=%lu", stmt->stmt_id, param_no, length);
-
- conn = stmt->conn;
+ DBG_INF_FMT("stmt=%lu param_no=%u data_len=%lu", stmt->stmt_id, param_no, data_length);
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->state < MYSQLND_STMT_PREPARED) {
- SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
+ SET_CLIENT_ERROR(stmt->error_info, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
DBG_ERR("not prepared");
DBG_RETURN(FAIL);
}
if (!stmt->param_bind) {
- SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ SET_CLIENT_ERROR(stmt->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_ERR("command out of sync");
DBG_RETURN(FAIL);
}
if (param_no >= stmt->param_count) {
- SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number");
+ SET_CLIENT_ERROR(stmt->error_info, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);
}
if (stmt->param_bind[param_no].type != MYSQL_TYPE_LONG_BLOB) {
- SET_STMT_ERROR(stmt, CR_INVALID_BUFFER_USE, UNKNOWN_SQLSTATE, mysqlnd_not_bound_as_blob);
+ SET_CLIENT_ERROR(stmt->error_info, CR_INVALID_BUFFER_USE, UNKNOWN_SQLSTATE, mysqlnd_not_bound_as_blob);
DBG_ERR("param_no is not of a blob type");
DBG_RETURN(FAIL);
}
- /*
- XXX: Unfortunately we have to allocate additional buffer to be able the
- additional data, which is like a header inside the payload.
- This should be optimised, but it will be a pervasive change, so
- conn->m->simple_command() will accept not a buffer, but actually MYSQLND_STRING*
- terminated by NULL, to send. If the strings are not big, we can collapse them
- on the buffer every connection has, but otherwise we will just send them
- one by one to the wire.
- */
-
- if (CONN_GET_STATE(conn) == CONN_READY) {
- size_t packet_len;
- cmd_buf = mnd_emalloc(packet_len = STMT_ID_LENGTH + 2 + length);
+ if (GET_CONNECTION_STATE(&conn->state) == CONN_READY) {
+ const size_t packet_len = MYSQLND_STMT_ID_LENGTH + 2 + data_length;
+ cmd_buf = mnd_emalloc(packet_len);
if (cmd_buf) {
stmt->param_bind[param_no].flags |= MYSQLND_PARAM_BIND_BLOB_USED;
int4store(cmd_buf, stmt->stmt_id);
- int2store(cmd_buf + STMT_ID_LENGTH, param_no);
- memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);
+ int2store(cmd_buf + MYSQLND_STMT_ID_LENGTH, param_no);
+ memcpy(cmd_buf + MYSQLND_STMT_ID_LENGTH + 2, data, data_length);
- /* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
- ret = conn->m->simple_command(conn, cmd, cmd_buf, packet_len, PROT_LAST , FALSE, TRUE);
- mnd_efree(cmd_buf);
- if (FAIL == ret) {
- COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
+ /* COM_STMT_SEND_LONG_DATA doesn't acknowledge with an OK packet */
+ {
+ const MYSQLND_CSTRING payload = {(const char *) cmd_buf, packet_len};
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_STMT_SEND_LONG_DATA, conn, payload);
+ ret = FAIL;
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+ if (ret == FAIL) {
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
+ }
+ }
}
+
+ mnd_efree(cmd_buf);
} else {
ret = FAIL;
- SET_OOM_ERROR(*stmt->error_info);
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(stmt->error_info);
+ SET_OOM_ERROR(conn->error_info);
}
/*
Cover protocol error: COM_STMT_SEND_LONG_DATA was designed to be quick and not
@@ -1409,12 +1425,12 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned in
#if HAVE_USLEEP && !defined(PHP_WIN32)
usleep(120000);
#endif
- if ((packet_len = conn->net->m.consume_uneaten_data(conn->net, cmd))) {
+ if ((packet_len = conn->protocol_frame_codec->m.consume_uneaten_data(conn->protocol_frame_codec, COM_STMT_SEND_LONG_DATA))) {
php_error_docref(NULL, E_WARNING, "There was an error "
"while sending long data. Probably max_allowed_packet_size "
"is smaller than the data. You have to increase it or send "
"smaller chunks of data. Answer was "MYSQLND_SZ_T_SPEC" bytes long.", packet_len);
- SET_STMT_ERROR(stmt, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE,
+ SET_CLIENT_ERROR(stmt->error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE,
"Server responded to COM_STMT_SEND_LONG_DATA.");
ret = FAIL;
}
@@ -1431,15 +1447,17 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned in
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const s, MYSQLND_PARAM_BIND * const param_bind)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+
DBG_ENTER("mysqlnd_stmt::bind_param");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count);
if (stmt->state < MYSQLND_STMT_PREPARED) {
- SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
+ SET_CLIENT_ERROR(stmt->error_info, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
DBG_ERR("not prepared");
if (param_bind) {
s->m->free_parameter_bind(s, param_bind);
@@ -1447,14 +1465,14 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const s, MYSQLND_PA
DBG_RETURN(FAIL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->param_count) {
unsigned int i = 0;
if (!param_bind) {
- SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, "Re-binding (still) not supported");
+ SET_CLIENT_ERROR(stmt->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, "Re-binding (still) not supported");
DBG_ERR("Re-binding (still) not supported");
DBG_RETURN(FAIL);
} else if (stmt->param_bind) {
@@ -1500,26 +1518,28 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const s, unsigned int param_no,
zval * const zv, zend_uchar type)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+
DBG_ENTER("mysqlnd_stmt::bind_one_parameter");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu param_no=%u param_count=%u type=%u", stmt->stmt_id, param_no, stmt->param_count, type);
if (stmt->state < MYSQLND_STMT_PREPARED) {
- SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
+ SET_CLIENT_ERROR(stmt->error_info, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
DBG_ERR("not prepared");
DBG_RETURN(FAIL);
}
if (param_no >= stmt->param_count) {
- SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number");
+ SET_CLIENT_ERROR(stmt->error_info, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->param_count) {
if (!stmt->param_bind) {
@@ -1554,21 +1574,23 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const s, unsigne
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, refresh_bind_param)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+
DBG_ENTER("mysqlnd_stmt::refresh_bind_param");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count);
if (stmt->state < MYSQLND_STMT_PREPARED) {
- SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
+ SET_CLIENT_ERROR(stmt->error_info, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
DBG_ERR("not prepared");
DBG_RETURN(FAIL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->param_count) {
stmt->send_types_to_server = 1;
@@ -1583,15 +1605,17 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const s,
MYSQLND_RESULT_BIND * const result_bind)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+
DBG_ENTER("mysqlnd_stmt::bind_result");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu field_count=%u", stmt->stmt_id, stmt->field_count);
if (stmt->state < MYSQLND_STMT_PREPARED) {
- SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
+ SET_CLIENT_ERROR(stmt->error_info, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
if (result_bind) {
s->m->free_result_bind(s, result_bind);
}
@@ -1599,8 +1623,8 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const s,
DBG_RETURN(FAIL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->field_count) {
unsigned int i = 0;
@@ -1639,27 +1663,29 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const s,
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const s, unsigned int param_no)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+
DBG_ENTER("mysqlnd_stmt::bind_result");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu field_count=%u", stmt->stmt_id, stmt->field_count);
if (stmt->state < MYSQLND_STMT_PREPARED) {
- SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
+ SET_CLIENT_ERROR(stmt->error_info, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared);
DBG_ERR("not prepared");
DBG_RETURN(FAIL);
}
if (param_no >= stmt->field_count) {
- SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number");
+ SET_CLIENT_ERROR(stmt->error_info, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);
}
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (stmt->field_count) {
mysqlnd_stmt_separate_one_result_bind(s, param_no);
@@ -1690,8 +1716,8 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const s, unsigned i
static uint64_t
MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- return stmt? stmt->upsert_status->last_insert_id : 0;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ return stmt? UPSERT_STATUS_GET_LAST_INSERT_ID(stmt->upsert_status) : 0;
}
/* }}} */
@@ -1700,8 +1726,8 @@ MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const s)
static uint64_t
MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- return stmt? stmt->upsert_status->affected_rows : 0;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ return stmt? UPSERT_STATUS_GET_AFFECTED_ROWS(stmt->upsert_status) : 0;
}
/* }}} */
@@ -1710,7 +1736,7 @@ MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const s)
static uint64_t
MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt && stmt->result? mysqlnd_num_rows(stmt->result):0;
}
/* }}} */
@@ -1720,8 +1746,8 @@ MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const s)
static unsigned int
MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- return stmt? stmt->upsert_status->warning_count : 0;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ return stmt? UPSERT_STATUS_GET_WARNINGS(stmt->upsert_status) : 0;
}
/* }}} */
@@ -1730,8 +1756,8 @@ MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const s)
static unsigned int
MYSQLND_METHOD(mysqlnd_stmt, server_status)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- return stmt? stmt->upsert_status->server_status : 0;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ return stmt? UPSERT_STATUS_GET_SERVER_STATUS(stmt->upsert_status) : 0;
}
/* }}} */
@@ -1740,7 +1766,7 @@ MYSQLND_METHOD(mysqlnd_stmt, server_status)(const MYSQLND_STMT * const s)
static unsigned int
MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt? stmt->field_count : 0;
}
/* }}} */
@@ -1750,7 +1776,7 @@ MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const s)
static unsigned int
MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt? stmt->param_count : 0;
}
/* }}} */
@@ -1760,7 +1786,7 @@ MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const s)
static unsigned int
MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt? stmt->error_info->error_no : 0;
}
/* }}} */
@@ -1770,7 +1796,7 @@ MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const s)
static const char *
MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt? stmt->error_info->error : 0;
}
/* }}} */
@@ -1780,7 +1806,7 @@ MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const s)
static const char *
MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt && stmt->error_info->sqlstate[0] ? stmt->error_info->sqlstate:MYSQLND_SQLSTATE_NULL;
}
/* }}} */
@@ -1790,7 +1816,7 @@ MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const s)
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const s, uint64_t row)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
return stmt && stmt->result? stmt->result->m.seek_data(stmt->result, row) : FAIL;
}
/* }}} */
@@ -1800,7 +1826,7 @@ MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const s, uint64_t r
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
if (!stmt || !stmt->param_count) {
return NULL;
}
@@ -1813,57 +1839,57 @@ MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const s)
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_stmt, result_metadata)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- MYSQLND_RES *result;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+ MYSQLND_RES * result_meta = NULL;
DBG_ENTER("mysqlnd_stmt::result_metadata");
- if (!stmt) {
+ if (!stmt || ! conn) {
DBG_RETURN(NULL);
}
DBG_INF_FMT("stmt=%u field_count=%u", stmt->stmt_id, stmt->field_count);
- if (!stmt->field_count || !stmt->conn || !stmt->result || !stmt->result->meta) {
+ if (!stmt->field_count || !stmt->result || !stmt->result->meta) {
DBG_INF("NULL");
DBG_RETURN(NULL);
}
if (stmt->update_max_length && stmt->result->stored_data) {
/* stored result, we have to update the max_length before we clone the meta data :( */
- stmt->result->stored_data->m.initialize_result_set_rest(stmt->result->stored_data, stmt->result->meta, stmt->conn->stats,
- stmt->conn->options->int_and_float_native);
+ stmt->result->stored_data->m.initialize_result_set_rest(stmt->result->stored_data,
+ stmt->result->meta,
+ conn->stats,
+ conn->options->int_and_float_native);
}
/*
TODO: This implementation is kind of a hack,
find a better way to do it. In different functions I have put
fuses to check for result->m.fetch_row() being NULL. This should
be handled in a better way.
-
- In the meantime we don't need a zval cache reference for this fake
- result set, so we don't get one.
*/
do {
- result = stmt->conn->m->result_init(stmt->field_count, stmt->persistent);
- if (!result) {
+ result_meta = conn->m->result_init(stmt->field_count, stmt->persistent);
+ if (!result_meta) {
break;
}
- result->type = MYSQLND_RES_NORMAL;
- result->unbuf = mysqlnd_result_unbuffered_init(stmt->field_count, TRUE, result->persistent);
- if (!result->unbuf) {
+ result_meta->type = MYSQLND_RES_NORMAL;
+ result_meta->unbuf = mysqlnd_result_unbuffered_init(stmt->field_count, TRUE, result_meta->persistent);
+ if (!result_meta->unbuf) {
break;
}
- result->unbuf->eof_reached = TRUE;
- result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE);
- if (!result->meta) {
+ result_meta->unbuf->eof_reached = TRUE;
+ result_meta->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE);
+ if (!result_meta->meta) {
break;
}
- DBG_INF_FMT("result=%p", result);
- DBG_RETURN(result);
+ DBG_INF_FMT("result_meta=%p", result_meta);
+ DBG_RETURN(result_meta);
} while (0);
- SET_OOM_ERROR(*stmt->conn->error_info);
- if (result) {
- result->m.free_result(result, TRUE);
+ SET_OOM_ERROR(conn->error_info);
+ if (result_meta) {
+ result_meta->m.free_result(result_meta, TRUE);
}
DBG_RETURN(NULL);
}
@@ -1876,7 +1902,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s,
enum mysqlnd_stmt_attr attr_type,
const void * const value)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt::attr_set");
if (!stmt) {
DBG_RETURN(FAIL);
@@ -1896,7 +1922,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s,
case STMT_ATTR_CURSOR_TYPE: {
unsigned int ival = *(unsigned int *) value;
if (ival > (zend_ulong) CURSOR_TYPE_READ_ONLY) {
- SET_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented");
+ SET_CLIENT_ERROR(stmt->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented");
DBG_INF("FAIL");
DBG_RETURN(FAIL);
}
@@ -1908,7 +1934,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s,
if (ival == 0) {
ival = MYSQLND_DEFAULT_PREFETCH_ROWS;
} else if (ival > 1) {
- SET_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented");
+ SET_CLIENT_ERROR(stmt->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented");
DBG_INF("FAIL");
DBG_RETURN(FAIL);
}
@@ -1916,7 +1942,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s,
break;
}
default:
- SET_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented");
+ SET_CLIENT_ERROR(stmt->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Not implemented");
DBG_RETURN(FAIL);
}
DBG_INF("PASS");
@@ -1931,7 +1957,7 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const s,
enum mysqlnd_stmt_attr attr_type,
void * const value)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt::attr_set");
if (!stmt) {
DBG_RETURN(FAIL);
@@ -1962,9 +1988,11 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const s,
static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
+
DBG_ENTER("mysqlnd_stmt::free_result");
- if (!stmt || !stmt->conn) {
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
@@ -2005,7 +2033,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const s)
}
/* Line is free! */
- CONN_SET_STATE(stmt->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
DBG_RETURN(PASS);
}
@@ -2016,7 +2044,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const s)
static void
mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
unsigned int i;
DBG_ENTER("mysqlnd_stmt_separate_result_bind");
@@ -2037,8 +2065,7 @@ mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const s)
for (i = 0; i < stmt->field_count; i++) {
/* Let's try with no cache */
if (stmt->result_bind[i].bound == TRUE) {
- DBG_INF_FMT("%u has refcount=%u", i,
- Z_REFCOUNTED(stmt->result_bind[i].zv)? Z_REFCOUNT(stmt->result_bind[i].zv) : 0);
+ DBG_INF_FMT("%u has refcount=%u", i, Z_REFCOUNTED(stmt->result_bind[i].zv)? Z_REFCOUNT(stmt->result_bind[i].zv) : 0);
zval_ptr_dtor(&stmt->result_bind[i].zv);
}
}
@@ -2053,9 +2080,9 @@ mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const s)
/* {{{ mysqlnd_stmt_separate_one_result_bind */
static void
-mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const s, unsigned int param_no)
+mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const s, const unsigned int param_no)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt_separate_one_result_bind");
if (!stmt) {
DBG_VOID_RETURN;
@@ -2073,9 +2100,7 @@ mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const s, unsigned int param
*/
/* Let's try with no cache */
if (stmt->result_bind[param_no].bound == TRUE) {
- DBG_INF_FMT("%u has refcount=%u", param_no,
- Z_REFCOUNTED(stmt->result_bind[param_no].zv)?
- Z_REFCOUNT(stmt->result_bind[param_no].zv) : 0);
+ DBG_INF_FMT("%u has refcount=%u", param_no, Z_REFCOUNTED(stmt->result_bind[param_no].zv)? Z_REFCOUNT(stmt->result_bind[param_no].zv) : 0);
zval_ptr_dtor(&stmt->result_bind[param_no].zv);
}
@@ -2088,7 +2113,7 @@ mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const s, unsigned int param
static void
MYSQLND_METHOD(mysqlnd_stmt, free_stmt_result)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt::free_stmt_result");
if (!stmt) {
DBG_VOID_RETURN;
@@ -2119,7 +2144,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_stmt_result)(MYSQLND_STMT * const s)
static void
MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt::free_stmt_content");
if (!stmt) {
DBG_VOID_RETURN;
@@ -2151,25 +2176,22 @@ MYSQLND_METHOD(mysqlnd_stmt, free_stmt_content)(MYSQLND_STMT * const s)
/* }}} */
-/* {{{ mysqlnd_stmt::net_close */
+/* {{{ mysqlnd_stmt::close_on_server */
static enum_func_status
-MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_bool implicit)
+MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server)(MYSQLND_STMT * const s, zend_bool implicit)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- MYSQLND_CONN_DATA * conn;
- zend_uchar cmd_buf[STMT_ID_LENGTH /* statement id */];
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
+ MYSQLND_CONN_DATA * conn = stmt? stmt->conn : NULL;
enum_mysqlnd_collected_stats statistic = STAT_LAST;
- DBG_ENTER("mysqlnd_stmt::net_close");
- if (!stmt || !stmt->conn) {
+ DBG_ENTER("mysqlnd_stmt::close_on_server");
+ if (!stmt || !conn) {
DBG_RETURN(FAIL);
}
DBG_INF_FMT("stmt=%lu", stmt->stmt_id);
- conn = stmt->conn;
-
- SET_EMPTY_ERROR(*stmt->error_info);
- SET_EMPTY_ERROR(*stmt->conn->error_info);
+ SET_EMPTY_ERROR(stmt->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
/*
If the user decided to close the statement right after execute()
@@ -2197,13 +2219,21 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_boo
MYSQLND_INC_GLOBAL_STATISTIC(implicit == TRUE? STAT_FREE_RESULT_IMPLICIT:
STAT_FREE_RESULT_EXPLICIT);
- int4store(cmd_buf, stmt->stmt_id);
- if (CONN_GET_STATE(conn) == CONN_READY &&
- FAIL == conn->m->simple_command(conn, COM_STMT_CLOSE, cmd_buf, sizeof(cmd_buf),
- PROT_LAST /* COM_STMT_CLOSE doesn't send an OK packet*/,
- FALSE, TRUE)) {
- COPY_CLIENT_ERROR(*stmt->error_info, *conn->error_info);
- DBG_RETURN(FAIL);
+ if (GET_CONNECTION_STATE(&conn->state) == CONN_READY) {
+ enum_func_status ret = FAIL;
+ size_t stmt_id = stmt->stmt_id;
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_STMT_CLOSE, conn, stmt_id);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
+
+ if (ret == FAIL) {
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
+ }
+ }
+ if (ret == FAIL) {
+ DBG_RETURN(FAIL);
+ }
}
}
switch (stmt->execute_count) {
@@ -2227,8 +2257,8 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_boo
s->m->free_stmt_content(s);
- if (stmt->conn) {
- stmt->conn->m->free_reference(stmt->conn);
+ if (conn) {
+ conn->m->free_reference(conn);
stmt->conn = NULL;
}
@@ -2251,7 +2281,7 @@ MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, zend_bool implicit)
MYSQLND_INC_GLOBAL_STATISTIC(implicit == TRUE? STAT_STMT_CLOSE_IMPLICIT:
STAT_STMT_CLOSE_EXPLICIT);
- ret = s->m->net_close(s, implicit);
+ ret = s->m->close_on_server(s, implicit);
mnd_pefree(stmt, persistent);
}
mnd_pefree(s, persistent);
@@ -2266,7 +2296,7 @@ MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, zend_bool implicit)
static MYSQLND_PARAM_BIND *
MYSQLND_METHOD(mysqlnd_stmt, alloc_param_bind)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt::alloc_param_bind");
if (!stmt) {
DBG_RETURN(NULL);
@@ -2280,7 +2310,7 @@ MYSQLND_METHOD(mysqlnd_stmt, alloc_param_bind)(MYSQLND_STMT * const s)
static MYSQLND_RESULT_BIND *
MYSQLND_METHOD(mysqlnd_stmt, alloc_result_bind)(MYSQLND_STMT * const s)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
DBG_ENTER("mysqlnd_stmt::alloc_result_bind");
if (!stmt) {
DBG_RETURN(NULL);
@@ -2294,7 +2324,7 @@ MYSQLND_METHOD(mysqlnd_stmt, alloc_result_bind)(MYSQLND_STMT * const s)
PHPAPI void
MYSQLND_METHOD(mysqlnd_stmt, free_parameter_bind)(MYSQLND_STMT * const s, MYSQLND_PARAM_BIND * param_bind)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
if (stmt) {
mnd_pefree(param_bind, stmt->persistent);
}
@@ -2306,7 +2336,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_parameter_bind)(MYSQLND_STMT * const s, MYSQLN
PHPAPI void
MYSQLND_METHOD(mysqlnd_stmt, free_result_bind)(MYSQLND_STMT * const s, MYSQLND_RESULT_BIND * result_bind)
{
- MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
+ MYSQLND_STMT_DATA * stmt = s? s->data : NULL;
if (stmt) {
mnd_pefree(result_bind, stmt->persistent);
}
@@ -2327,7 +2357,7 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_stmt)
MYSQLND_METHOD(mysqlnd_stmt, free_result),
MYSQLND_METHOD(mysqlnd_stmt, data_seek),
MYSQLND_METHOD(mysqlnd_stmt, reset),
- MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close),
+ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, close_on_server),
MYSQLND_METHOD(mysqlnd_stmt, dtor),
MYSQLND_METHOD(mysqlnd_stmt, fetch),
@@ -2370,18 +2400,6 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_stmt)
MYSQLND_CLASS_METHODS_END;
-/* {{{ _mysqlnd_stmt_init */
-MYSQLND_STMT *
-_mysqlnd_stmt_init(MYSQLND_CONN_DATA * const conn)
-{
- MYSQLND_STMT * ret;
- DBG_ENTER("_mysqlnd_stmt_init");
- ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).get_prepared_statement(conn);
- DBG_RETURN(ret);
-}
-/* }}} */
-
-
/* {{{ _mysqlnd_init_ps_subsystem */
void _mysqlnd_init_ps_subsystem()
{
diff --git a/ext/mysqlnd/mysqlnd_ps.h b/ext/mysqlnd/mysqlnd_ps.h
new file mode 100644
index 0000000000..42361d0a7d
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_ps.h
@@ -0,0 +1,54 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_PS_H
+#define MYSQLND_PS_H
+
+/* PS stuff */
+typedef void (*ps_field_fetch_func)(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row);
+
+struct st_mysqlnd_perm_bind {
+ ps_field_fetch_func func;
+ /* should be signed int */
+ int pack_len;
+ unsigned int php_type;
+ zend_bool is_possibly_blob;
+ zend_bool can_ret_as_str_in_uni;
+};
+
+extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1];
+
+enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything);
+enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything);
+
+void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */
+void _mysqlnd_init_ps_fetch_subsystem();
+
+void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row, unsigned int byte_count);
+
+#endif /* MYSQLND_PS_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index f16333adf0..d989101060 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,21 +12,19 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_ps.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_debug.h"
-#include "ext/mysqlnd/mysql_float_to_double.h"
-
-#define MYSQLND_SILENT
+#include "mysql_float_to_double.h"
enum mysqlnd_timestamp_type
@@ -55,8 +53,8 @@ struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1];
/* {{{ ps_fetch_from_1_to_8_bytes */
void
-ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len,
- zend_uchar ** row, unsigned int byte_count)
+ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len,
+ const zend_uchar ** row, unsigned int byte_count)
{
char tmp[22];
size_t tmp_len = 0;
@@ -128,7 +126,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne
/* {{{ ps_fetch_null */
static void
-ps_fetch_null(zval *zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_null(zval *zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
ZVAL_NULL(zv);
}
@@ -137,7 +135,7 @@ ps_fetch_null(zval *zv, const MYSQLND_FIELD * const field, unsigned int pack_len
/* {{{ ps_fetch_int8 */
static void
-ps_fetch_int8(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_int8(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 1);
}
@@ -146,7 +144,7 @@ ps_fetch_int8(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_le
/* {{{ ps_fetch_int16 */
static void
-ps_fetch_int16(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_int16(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 2);
}
@@ -155,7 +153,7 @@ ps_fetch_int16(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_l
/* {{{ ps_fetch_int32 */
static void
-ps_fetch_int32(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_int32(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 4);
}
@@ -164,7 +162,7 @@ ps_fetch_int32(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_l
/* {{{ ps_fetch_int64 */
static void
-ps_fetch_int64(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_int64(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, 8);
}
@@ -173,7 +171,7 @@ ps_fetch_int64(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_l
/* {{{ ps_fetch_float */
static void
-ps_fetch_float(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_float(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
float fval;
double dval;
@@ -196,7 +194,7 @@ ps_fetch_float(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_l
/* {{{ ps_fetch_double */
static void
-ps_fetch_double(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_double(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
double value;
DBG_ENTER("ps_fetch_double");
@@ -211,7 +209,7 @@ ps_fetch_double(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_
/* {{{ ps_fetch_time */
static void
-ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
struct st_mysqlnd_time t;
zend_ulong length; /* First byte encodes the length*/
@@ -219,7 +217,7 @@ ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_le
DBG_ENTER("ps_fetch_time");
if ((length = php_mysqlnd_net_field_length(row))) {
- zend_uchar * to= *row;
+ const zend_uchar * to = *row;
t.time_type = MYSQLND_TIMESTAMP_TIME;
t.neg = (zend_bool) to[0];
@@ -254,7 +252,7 @@ ps_fetch_time(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_le
/* {{{ ps_fetch_date */
static void
-ps_fetch_date(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_date(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
struct st_mysqlnd_time t = {0};
zend_ulong length; /* First byte encodes the length*/
@@ -262,10 +260,10 @@ ps_fetch_date(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_le
DBG_ENTER("ps_fetch_date");
if ((length = php_mysqlnd_net_field_length(row))) {
- zend_uchar *to= *row;
+ const zend_uchar * to = *row;
- t.time_type= MYSQLND_TIMESTAMP_DATE;
- t.neg= 0;
+ t.time_type = MYSQLND_TIMESTAMP_DATE;
+ t.neg = 0;
t.second_part = t.hour = t.minute = t.second = 0;
@@ -291,7 +289,7 @@ ps_fetch_date(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_le
/* {{{ ps_fetch_datetime */
static void
-ps_fetch_datetime(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_datetime(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
struct st_mysqlnd_time t;
zend_ulong length; /* First byte encodes the length*/
@@ -299,10 +297,10 @@ ps_fetch_datetime(zval * zv, const MYSQLND_FIELD * const field, unsigned int pac
DBG_ENTER("ps_fetch_datetime");
if ((length = php_mysqlnd_net_field_length(row))) {
- zend_uchar * to = *row;
+ const zend_uchar * to = *row;
t.time_type = MYSQLND_TIMESTAMP_DATETIME;
- t.neg = 0;
+ t.neg = 0;
t.year = (unsigned int) sint2korr(to);
t.month = (unsigned int) to[2];
@@ -335,7 +333,7 @@ ps_fetch_datetime(zval * zv, const MYSQLND_FIELD * const field, unsigned int pac
/* {{{ ps_fetch_string */
static void
-ps_fetch_string(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_string(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
/*
For now just copy, before we make it possible
@@ -355,9 +353,9 @@ ps_fetch_string(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_
/* {{{ ps_fetch_bit */
static void
-ps_fetch_bit(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_len, zend_uchar ** row)
+ps_fetch_bit(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row)
{
- zend_ulong length = php_mysqlnd_net_field_length(row);
+ const zend_ulong length = php_mysqlnd_net_field_length(row);
ps_fetch_from_1_to_8_bytes(zv, field, pack_len, row, length);
}
/* }}} */
@@ -437,6 +435,12 @@ void _mysqlnd_init_ps_fetch_subsystem()
mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].php_type= IS_STRING;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].can_ret_as_str_in_uni = TRUE;
+ mysqlnd_ps_fetch_functions[MYSQL_TYPE_JSON].func = ps_fetch_string;
+ mysqlnd_ps_fetch_functions[MYSQL_TYPE_JSON].pack_len= MYSQLND_PS_SKIP_RESULT_STR;
+ mysqlnd_ps_fetch_functions[MYSQL_TYPE_JSON].php_type = IS_STRING;
+ mysqlnd_ps_fetch_functions[MYSQL_TYPE_JSON].is_possibly_blob = TRUE;
+ mysqlnd_ps_fetch_functions[MYSQL_TYPE_JSON].can_ret_as_str_in_uni = TRUE;
+
mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].func = ps_fetch_string;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].pack_len= MYSQLND_PS_SKIP_RESULT_STR;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].php_type = IS_STRING;
@@ -545,7 +549,7 @@ mysqlnd_stmt_execute_check_n_enlarge_buffer(zend_uchar **buf, zend_uchar **p, si
size_t left = (*buf_len - (*p - *buf));
if (left < (needed_bytes + overalloc)) {
- size_t offset = *p - *buf;
+ const size_t offset = *p - *buf;
zend_uchar *tmp_buf;
*buf_len = offset + needed_bytes + overalloc;
tmp_buf = mnd_emalloc(*buf_len);
@@ -572,7 +576,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie
unsigned int i;
DBG_ENTER("mysqlnd_stmt_execute_prepare_param_types");
for (i = 0; i < stmt->param_count; i++) {
- short current_type = stmt->param_bind[i].type;
+ const short current_type = stmt->param_bind[i].type;
zval *parameter = &stmt->param_bind[i].zv;
ZVAL_DEREF(parameter);
@@ -581,7 +585,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie
if (Z_TYPE_P(parameter) != IS_LONG &&
PASS != mysqlnd_stmt_copy_it(copies_param, parameter, stmt->param_count, i))
{
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
/*
@@ -689,7 +693,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval
/* Double binding of the same zval, make a copy */
if (!*copies_param || Z_ISUNDEF((*copies_param)[i])) {
if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) {
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
}
@@ -704,7 +708,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval
if (Z_TYPE_P(the_var) != IS_DOUBLE) {
if (!*copies_param || Z_ISUNDEF((*copies_param)[i])) {
if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) {
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
}
@@ -739,7 +743,7 @@ use_string:
if (Z_TYPE_P(the_var) != IS_STRING) {
if (!*copies_param || Z_ISUNDEF((*copies_param)[i])) {
if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) {
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
}
@@ -804,7 +808,7 @@ mysqlnd_stmt_execute_store_param_values(MYSQLND_STMT_DATA * stmt, zval * copies,
case MYSQL_TYPE_VAR_STRING:
send_string:
{
- size_t len = Z_STRLEN_P(data);
+ const size_t len = Z_STRLEN_P(data);
/* to is after p. The latter hasn't been moved */
*p = php_mysqlnd_net_store_length(*p, len);
memcpy(*p, Z_STRVAL_P(data), len);
@@ -839,7 +843,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar
{
unsigned int null_count = (stmt->param_count + 7) / 8;
if (FAIL == mysqlnd_stmt_execute_check_n_enlarge_buffer(buf, p, buf_len, provided_buffer, null_count)) {
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
/* put `null` bytes */
@@ -865,7 +869,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar
if (stmt->send_types_to_server) {
if (FAIL == mysqlnd_stmt_execute_check_n_enlarge_buffer(buf, p, buf_len, provided_buffer, stmt->param_count * 2)) {
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
mysqlnd_stmt_execute_store_types(stmt, copies, p);
@@ -881,7 +885,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar
/* 2.2 Enlarge the buffer, if needed */
if (FAIL == mysqlnd_stmt_execute_check_n_enlarge_buffer(buf, p, buf_len, provided_buffer, data_size)) {
- SET_OOM_ERROR(*stmt->error_info);
+ SET_OOM_ERROR(stmt->error_info);
goto end;
}
diff --git a/ext/mysqlnd/mysqlnd_read_buffer.c b/ext/mysqlnd/mysqlnd_read_buffer.c
new file mode 100644
index 0000000000..1d214c21db
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_read_buffer.c
@@ -0,0 +1,96 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "mysqlnd.h"
+#include "mysqlnd_debug.h"
+#include "mysqlnd_read_buffer.h"
+
+
+/* {{{ mysqlnd_read_buffer_is_empty */
+static zend_bool
+mysqlnd_read_buffer_is_empty(const MYSQLND_READ_BUFFER * const buffer)
+{
+ return buffer->len? FALSE:TRUE;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_read_buffer_read */
+static void
+mysqlnd_read_buffer_read(MYSQLND_READ_BUFFER * buffer, const size_t count, zend_uchar * dest)
+{
+ if (buffer->len >= count) {
+ memcpy(dest, buffer->data + buffer->offset, count);
+ buffer->offset += count;
+ buffer->len -= count;
+ }
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_read_buffer_bytes_left */
+static size_t
+mysqlnd_read_buffer_bytes_left(const MYSQLND_READ_BUFFER * const buffer)
+{
+ return buffer->len;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_read_buffer_free */
+static void
+mysqlnd_read_buffer_free(MYSQLND_READ_BUFFER ** buffer)
+{
+ DBG_ENTER("mysqlnd_read_buffer_free");
+ if (*buffer) {
+ mnd_efree((*buffer)->data);
+ mnd_efree(*buffer);
+ *buffer = NULL;
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_create_read_buffer */
+PHPAPI MYSQLND_READ_BUFFER *
+mysqlnd_create_read_buffer(const size_t count)
+{
+ MYSQLND_READ_BUFFER * ret = mnd_emalloc(sizeof(MYSQLND_READ_BUFFER));
+ DBG_ENTER("mysqlnd_create_read_buffer");
+ ret->is_empty = mysqlnd_read_buffer_is_empty;
+ ret->read = mysqlnd_read_buffer_read;
+ ret->bytes_left = mysqlnd_read_buffer_bytes_left;
+ ret->free_buffer = mysqlnd_read_buffer_free;
+ ret->data = mnd_emalloc(count);
+ ret->size = ret->len = count;
+ ret->offset = 0;
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_read_buffer.h b/ext/mysqlnd/mysqlnd_read_buffer.h
new file mode 100644
index 0000000000..f353f8557a
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_read_buffer.h
@@ -0,0 +1,25 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_READ_BUFFER_H
+#define MYSQLND_READ_BUFFER_H
+
+PHPAPI MYSQLND_READ_BUFFER * mysqlnd_create_read_buffer(const size_t count);
+
+#endif /* MYSQLND_READ_BUFFER_H */
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c
index 4208097cf7..c4aa537eb0 100644
--- a/ext/mysqlnd/mysqlnd_result.c
+++ b/ext/mysqlnd/mysqlnd_result.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,17 +12,16 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_wireprotocol.h"
#include "mysqlnd_block_alloc.h"
+#include "mysqlnd_connection.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_result.h"
#include "mysqlnd_result_meta.h"
@@ -30,18 +29,16 @@
#include "mysqlnd_debug.h"
#include "mysqlnd_ext_plugin.h"
-#define MYSQLND_SILENT
-
/* {{{ mysqlnd_result_buffered_zval::initialize_result_set_rest */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_result_buffered_zval, initialize_result_set_rest)(MYSQLND_RES_BUFFERED * const result, MYSQLND_RES_METADATA * const meta,
- MYSQLND_STATS * stats, zend_bool int_and_float_native)
+MYSQLND_METHOD(mysqlnd_result_buffered_zval, initialize_result_set_rest)(MYSQLND_RES_BUFFERED * const result,
+ MYSQLND_RES_METADATA * const meta,
+ MYSQLND_STATS * stats,
+ zend_bool int_and_float_native)
{
- unsigned int i;
enum_func_status ret = PASS;
const unsigned int field_count = meta->field_count;
const uint64_t row_count = result->row_count;
- enum_func_status rc;
zval *data_begin = ((MYSQLND_RES_BUFFERED_ZVAL *) result)->data;
zval *data_cursor = data_begin;
@@ -53,25 +50,27 @@ MYSQLND_METHOD(mysqlnd_result_buffered_zval, initialize_result_set_rest)(MYSQLND
}
while ((data_cursor - data_begin) < (int)(row_count * field_count)) {
if (Z_ISUNDEF(data_cursor[0])) {
- rc = result->m.row_decoder(result->row_buffers[(data_cursor - data_begin) / field_count],
- data_cursor,
- field_count,
- meta->fields,
- int_and_float_native,
- stats);
+ unsigned int i;
+ const size_t current_row_num = (data_cursor - data_begin) / field_count;
+ enum_func_status rc = result->m.row_decoder(result->row_buffers[current_row_num],
+ data_cursor,
+ field_count,
+ meta->fields,
+ int_and_float_native,
+ stats);
if (rc != PASS) {
ret = FAIL;
break;
}
- result->initialized_rows++;
- for (i = 0; i < field_count; i++) {
+ ++result->initialized_rows;
+ for (i = 0; i < field_count; ++i) {
/*
NULL fields are 0 length, 0 is not more than 0
String of zero size, definitely can't be the next max_length.
Thus for NULL and zero-length we are quite efficient.
*/
if (Z_TYPE(data_cursor[i]) == IS_STRING) {
- zend_ulong len = Z_STRLEN(data_cursor[i]);
+ const size_t len = Z_STRLEN(data_cursor[i]);
if (meta->fields[i].max_length < len) {
meta->fields[i].max_length = len;
}
@@ -87,8 +86,10 @@ MYSQLND_METHOD(mysqlnd_result_buffered_zval, initialize_result_set_rest)(MYSQLND
/* {{{ mysqlnd_result_buffered_c::initialize_result_set_rest */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_result_buffered_c, initialize_result_set_rest)(MYSQLND_RES_BUFFERED * const result, MYSQLND_RES_METADATA * const meta,
- MYSQLND_STATS * stats, zend_bool int_and_float_native)
+MYSQLND_METHOD(mysqlnd_result_buffered_c, initialize_result_set_rest)(MYSQLND_RES_BUFFERED * const result,
+ MYSQLND_RES_METADATA * const meta,
+ MYSQLND_STATS * stats,
+ zend_bool int_and_float_native)
{
unsigned int i;
enum_func_status ret = PASS;
@@ -126,7 +127,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, initialize_result_set_rest)(MYSQLND_RE
Thus for NULL and zero-length we are quite efficient.
*/
if (Z_TYPE(current_row[i]) == IS_STRING) {
- zend_ulong len = Z_STRLEN(current_row[i]);
+ const size_t len = Z_STRLEN(current_row[i]);
if (meta->fields[i].max_length < len) {
meta->fields[i].max_length = len;
}
@@ -165,7 +166,8 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, free_last_data)(MYSQLND_RES_UNBUFFERED
if (unbuf->last_row_buffer) {
DBG_INF("Freeing last row buffer");
/* Nothing points to this buffer now, free it */
- unbuf->last_row_buffer->free_chunk(unbuf->last_row_buffer);
+ unbuf->result_set_memory_pool->free_chunk(
+ unbuf->result_set_memory_pool, unbuf->last_row_buffer);
unbuf->last_row_buffer = NULL;
}
@@ -214,7 +216,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_zval, free_result)(MYSQLND_RES_BUFFERED_Z
set->data = NULL; /* prevent double free if following loop is interrupted */
if (data) {
- unsigned int field_count = set->field_count;
+ const unsigned int field_count = set->field_count;
int64_t row;
for (row = set->row_count - 1; row >= 0; row--) {
@@ -252,6 +254,7 @@ static void
MYSQLND_METHOD(mysqlnd_result_buffered, free_result)(MYSQLND_RES_BUFFERED * const set)
{
int64_t row;
+ MYSQLND_MEMORY_POOL * pool;
DBG_ENTER("mysqlnd_result_buffered::free_result");
DBG_INF_FMT("Freeing "MYSQLND_LLU_SPEC" row(s)", set->row_count);
@@ -262,9 +265,10 @@ MYSQLND_METHOD(mysqlnd_result_buffered, free_result)(MYSQLND_RES_BUFFERED * cons
MYSQLND_METHOD(mysqlnd_result_buffered_c, free_result)((MYSQLND_RES_BUFFERED_C *) set);
}
+ pool = set->result_set_memory_pool;
for (row = set->row_count - 1; row >= 0; row--) {
MYSQLND_MEMORY_POOL_CHUNK *current_buffer = set->row_buffers[row];
- current_buffer->free_chunk(current_buffer);
+ pool->free_chunk(pool, current_buffer);
}
if (set->lengths) {
@@ -282,7 +286,6 @@ MYSQLND_METHOD(mysqlnd_result_buffered, free_result)(MYSQLND_RES_BUFFERED * cons
set->result_set_memory_pool = NULL;
}
-
set->row_count = 0;
mnd_pefree(set, set->persistent);
@@ -307,7 +310,6 @@ MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES * result)
result->stored_data = NULL;
}
-
DBG_VOID_RETURN;
}
/* }}} */
@@ -371,7 +373,7 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_
result->meta = result->m.result_meta_init(result->field_count, result->persistent);
if (!result->meta) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(FAIL);
}
@@ -401,26 +403,27 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_
enum_func_status
mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
{
- MYSQLND_STMT_DATA * stmt = s ? s->data:NULL;
enum_func_status ret;
+ MYSQLND_STMT_DATA * stmt = s ? s->data : NULL;
MYSQLND_PACKET_RSET_HEADER * rset_header = NULL;
MYSQLND_PACKET_EOF * fields_eof = NULL;
+ const zend_bool persistent = conn->persistent;
DBG_ENTER("mysqlnd_query_read_result_set_header");
DBG_INF_FMT("stmt=%lu", stmt? stmt->stmt_id:0);
ret = FAIL;
do {
- rset_header = conn->protocol->m.get_rset_header_packet(conn->protocol, FALSE);
+ rset_header = conn->payload_decoder_factory->m.get_rset_header_packet(conn->payload_decoder_factory, FALSE);
if (!rset_header) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
break;
}
- SET_ERROR_AFF_ROWS(conn);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
- if (FAIL == (ret = PACKET_READ(rset_header, conn))) {
+ if (FAIL == (ret = PACKET_READ(rset_header))) {
php_error_docref(NULL, E_WARNING, "Error reading result set's header");
break;
}
@@ -435,16 +438,16 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
a multi-statement or a stored procedure, so it should be
safe to unconditionally turn off the flag here.
*/
- conn->upsert_status->server_status &= ~SERVER_MORE_RESULTS_EXISTS;
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS);
/*
This will copy the error code and the messages, as they
are buffers in the struct
*/
- COPY_CLIENT_ERROR(*conn->error_info, rset_header->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, rset_header->error_info);
ret = FAIL;
DBG_ERR_FMT("error=%s", rset_header->error_info.error);
/* Return back from CONN_QUERY_SENT */
- CONN_SET_STATE(conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
break;
}
conn->error_info->error_no = 0;
@@ -455,9 +458,9 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
DBG_INF("LOAD DATA");
conn->last_query_type = QUERY_LOAD_LOCAL;
conn->field_count = 0; /* overwrite previous value, or the last value could be used and lead to bug#53503 */
- CONN_SET_STATE(conn, CONN_SENDING_LOAD_DATA);
- ret = mysqlnd_handle_local_infile(conn, rset_header->info_or_local_file, &is_warning);
- CONN_SET_STATE(conn, (ret == PASS || is_warning == TRUE)? CONN_READY:CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(&conn->state, CONN_SENDING_LOAD_DATA);
+ ret = mysqlnd_handle_local_infile(conn, rset_header->info_or_local_file.s, &is_warning);
+ SET_CONNECTION_STATE(&conn->state, (ret == PASS || is_warning == TRUE)? CONN_READY:CONN_QUIT_SENT);
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY);
break;
}
@@ -465,19 +468,19 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
DBG_INF("UPSERT");
conn->last_query_type = QUERY_UPSERT;
conn->field_count = rset_header->field_count;
- memset(conn->upsert_status, 0, sizeof(*conn->upsert_status));
- conn->upsert_status->warning_count = rset_header->warning_count;
- conn->upsert_status->server_status = rset_header->server_status;
- conn->upsert_status->affected_rows = rset_header->affected_rows;
- conn->upsert_status->last_insert_id = rset_header->last_insert_id;
- SET_NEW_MESSAGE(conn->last_message, conn->last_message_len,
- rset_header->info_or_local_file, rset_header->info_or_local_file_len,
- conn->persistent);
+ UPSERT_STATUS_RESET(conn->upsert_status);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, rset_header->warning_count);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, rset_header->server_status);
+ UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, rset_header->affected_rows);
+ UPSERT_STATUS_SET_LAST_INSERT_ID(conn->upsert_status, rset_header->last_insert_id);
+ SET_NEW_MESSAGE(conn->last_message.s, conn->last_message.l,
+ rset_header->info_or_local_file.s, rset_header->info_or_local_file.l,
+ persistent);
/* Result set can follow UPSERT statement, check server_status */
- if (conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) {
- CONN_SET_STATE(conn, CONN_NEXT_RESULT_PENDING);
+ if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) {
+ SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING);
} else {
- CONN_SET_STATE(conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
}
ret = PASS;
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY);
@@ -487,19 +490,19 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
enum_mysqlnd_collected_stats statistic = STAT_LAST;
DBG_INF("Result set pending");
- SET_EMPTY_MESSAGE(conn->last_message, conn->last_message_len, conn->persistent);
+ SET_EMPTY_MESSAGE(conn->last_message.s, conn->last_message.l, persistent);
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_RSET_QUERY);
- memset(conn->upsert_status, 0, sizeof(*conn->upsert_status));
+ UPSERT_STATUS_RESET(conn->upsert_status);
/* restore after zeroing */
- SET_ERROR_AFF_ROWS(conn);
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
conn->last_query_type = QUERY_SELECT;
- CONN_SET_STATE(conn, CONN_FETCHING_DATA);
+ SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA);
/* PS has already allocated it */
conn->field_count = rset_header->field_count;
if (!stmt) {
- result = conn->current_result = conn->m->result_init(rset_header->field_count, conn->persistent);
+ result = conn->current_result = conn->m->result_init(rset_header->field_count, persistent);
} else {
if (!stmt->result) {
DBG_INF("This is 'SHOW'/'EXPLAIN'-like query.");
@@ -526,7 +529,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
result = stmt->result;
}
if (!result) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
break;
}
@@ -542,13 +545,13 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
}
/* Check for SERVER_STATUS_MORE_RESULTS if needed */
- fields_eof = conn->protocol->m.get_eof_packet(conn->protocol, FALSE);
+ fields_eof = conn->payload_decoder_factory->m.get_eof_packet(conn->payload_decoder_factory, FALSE);
if (!fields_eof) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
break;
}
- if (FAIL == (ret = PACKET_READ(fields_eof, conn))) {
+ if (FAIL == (ret = PACKET_READ(fields_eof))) {
DBG_ERR("Error occurred while reading the EOF packet");
result->m.free_result_contents(result);
mnd_efree(result);
@@ -556,12 +559,17 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
conn->current_result = NULL;
} else {
stmt->result = NULL;
+ /* XXX: This will crash, because we will null also the methods.
+ But seems it happens in extreme cases or doesn't. Should be fixed by exporting a function
+ (from mysqlnd_driver.c?) to do the reset.
+ This is done also in mysqlnd_ps.c
+ */
memset(stmt, 0, sizeof(*stmt));
stmt->state = MYSQLND_STMT_INITTED;
}
} else {
DBG_INF_FMT("warnings=%u server_status=%u", fields_eof->warning_count, fields_eof->server_status);
- conn->upsert_status->warning_count = fields_eof->warning_count;
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, fields_eof->warning_count);
/*
If SERVER_MORE_RESULTS_EXISTS is set then this is either MULTI_QUERY or a CALL()
The first packet after sending the query/com_execute has the bit set only
@@ -569,7 +577,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
will include many result sets. What actually matters are the bits set at the end
of every result set (the EOF packet).
*/
- conn->upsert_status->server_status = fields_eof->server_status;
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, fields_eof->server_status);
if (fields_eof->server_status & SERVER_QUERY_NO_GOOD_INDEX_USED) {
statistic = STAT_BAD_INDEX_USED;
} else if (fields_eof->server_status & SERVER_QUERY_NO_INDEX_USED) {
@@ -599,7 +607,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
of PHP, to be called as separate function. But let's have it for
completeness.
*/
-static zend_ulong *
+static const size_t *
MYSQLND_METHOD(mysqlnd_result_buffered_zval, fetch_lengths)(MYSQLND_RES_BUFFERED * const result)
{
const MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result;
@@ -631,7 +639,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_zval, fetch_lengths)(MYSQLND_RES_BUFFERED
of PHP, to be called as separate function. But let's have it for
completeness.
*/
-static zend_ulong *
+static const size_t *
MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_lengths)(MYSQLND_RES_BUFFERED * const result)
{
const MYSQLND_RES_BUFFERED_C * set = (MYSQLND_RES_BUFFERED_C *) result;
@@ -648,7 +656,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_lengths)(MYSQLND_RES_BUFFERED *
/* {{{ mysqlnd_result_unbuffered::fetch_lengths */
-static zend_ulong *
+static const size_t *
MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_lengths)(MYSQLND_RES_UNBUFFERED * const result)
{
/* simulate output of libmysql */
@@ -658,10 +666,10 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_lengths)(MYSQLND_RES_UNBUFFERED
/* {{{ mysqlnd_res::fetch_lengths */
-static zend_ulong *
+static const size_t *
MYSQLND_METHOD(mysqlnd_res, fetch_lengths)(MYSQLND_RES * const result)
{
- zend_ulong * ret;
+ const size_t * ret;
DBG_ENTER("mysqlnd_res::fetch_lengths");
ret = result->stored_data && result->stored_data->m.fetch_lengths ?
result->stored_data->m.fetch_lengths(result->stored_data) :
@@ -681,7 +689,8 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
enum_func_status ret;
MYSQLND_ROW_C *row = (MYSQLND_ROW_C *) param;
MYSQLND_PACKET_ROW *row_packet = result->unbuf->row_packet;
- const MYSQLND_RES_METADATA * const meta = result->meta;
+ MYSQLND_RES_METADATA * const meta = result->meta;
+ MYSQLND_CONN_DATA * const conn = result->conn;
DBG_ENTER("mysqlnd_result_unbuffered::fetch_row_c");
@@ -690,8 +699,8 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
/* No more rows obviously */
DBG_RETURN(PASS);
}
- if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) {
- SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ if (!conn || GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) {
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_RETURN(FAIL);
}
if (!row_packet) {
@@ -705,15 +714,15 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
If we skip rows (row == NULL) we have to
result->m.unbuffered_free_last_data() before it. The function returns always true.
*/
- if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) {
- result->unbuf->m.free_last_data(result->unbuf, result->conn? result->conn->stats : NULL);
+ if (PASS == (ret = PACKET_READ(row_packet)) && !row_packet->eof) {
+ result->unbuf->m.free_last_data(result->unbuf, conn->stats);
result->unbuf->last_row_data = row_packet->fields;
result->unbuf->last_row_buffer = row_packet->row_buffer;
row_packet->fields = NULL;
row_packet->row_buffer = NULL;
- MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF);
if (!row_packet->skip_extraction) {
unsigned int i, field_count = meta->field_count;
@@ -722,8 +731,8 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
result->unbuf->last_row_data,
field_count,
row_packet->fields_metadata,
- result->conn->options->int_and_float_native,
- result->conn->stats);
+ conn->options->int_and_float_native,
+ conn->stats);
if (PASS != rc) {
DBG_RETURN(FAIL);
}
@@ -731,11 +740,11 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
*row = mnd_malloc(field_count * sizeof(char *));
if (*row) {
MYSQLND_FIELD * field = meta->fields;
- zend_ulong * lengths = result->unbuf->lengths;
+ size_t * lengths = result->unbuf->lengths;
for (i = 0; i < field_count; i++, field++) {
zval * data = &result->unbuf->last_row_data[i];
- unsigned int len = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
+ const size_t len = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
/* BEGIN difference between normal normal fetch and _c */
if (Z_TYPE_P(data) != IS_NULL) {
@@ -755,7 +764,7 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
}
}
} else {
- SET_OOM_ERROR(*result->conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
}
}
}
@@ -763,28 +772,29 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row_c)(MYSQLND_RES * result, voi
*fetched_anything = TRUE;
} else if (ret == FAIL) {
if (row_packet->error_info.error_no) {
- COPY_CLIENT_ERROR(*result->conn->error_info, row_packet->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info);
DBG_ERR_FMT("errorno=%u error=%s", row_packet->error_info.error_no, row_packet->error_info.error);
}
- CONN_SET_STATE(result->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
} else if (row_packet->eof) {
/* Mark the connection as usable again */
DBG_INF_FMT("warnings=%u server_status=%u", row_packet->warning_count, row_packet->server_status);
result->unbuf->eof_reached = TRUE;
- memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status));
- result->conn->upsert_status->warning_count = row_packet->warning_count;
- result->conn->upsert_status->server_status = row_packet->server_status;
+
+ UPSERT_STATUS_RESET(conn->upsert_status);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status);
/*
result->row_packet will be cleaned when
destroying the result object
*/
- if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) {
- CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING);
+ if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) {
+ SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING);
} else {
- CONN_SET_STATE(result->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
}
- result->unbuf->m.free_last_data(result->unbuf, result->conn? result->conn->stats : NULL);
+ result->unbuf->m.free_last_data(result->unbuf, conn->stats);
}
DBG_INF_FMT("ret=%s fetched=%u", ret == PASS? "PASS":"FAIL", *fetched_anything);
@@ -801,6 +811,7 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, void
zval *row = (zval *) param;
MYSQLND_PACKET_ROW *row_packet = result->unbuf->row_packet;
const MYSQLND_RES_METADATA * const meta = result->meta;
+ MYSQLND_CONN_DATA * const conn = result->conn;
DBG_ENTER("mysqlnd_result_unbuffered::fetch_row");
@@ -809,8 +820,8 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, void
/* No more rows obviously */
DBG_RETURN(PASS);
}
- if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) {
- SET_CLIENT_ERROR(*result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ if (GET_CONNECTION_STATE(&conn->state) != CONN_FETCHING_DATA) {
+ SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
DBG_RETURN(FAIL);
}
if (!row_packet) {
@@ -824,36 +835,36 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, void
If we skip rows (row == NULL) we have to
result->m.unbuffered_free_last_data() before it. The function returns always true.
*/
- if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) {
- result->unbuf->m.free_last_data(result->unbuf, result->conn? result->conn->stats : NULL);
+ if (PASS == (ret = PACKET_READ(row_packet)) && !row_packet->eof) {
+ result->unbuf->m.free_last_data(result->unbuf, conn->stats);
result->unbuf->last_row_data = row_packet->fields;
result->unbuf->last_row_buffer = row_packet->row_buffer;
row_packet->fields = NULL;
row_packet->row_buffer = NULL;
- MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF);
if (!row_packet->skip_extraction) {
unsigned int i, field_count = meta->field_count;
enum_func_status rc = result->unbuf->m.row_decoder(result->unbuf->last_row_buffer,
- result->unbuf->last_row_data,
- field_count,
- row_packet->fields_metadata,
- result->conn->options->int_and_float_native,
- result->conn->stats);
+ result->unbuf->last_row_data,
+ field_count,
+ row_packet->fields_metadata,
+ conn->options->int_and_float_native,
+ conn->stats);
if (PASS != rc) {
DBG_RETURN(FAIL);
}
{
HashTable * row_ht = Z_ARRVAL_P(row);
MYSQLND_FIELD * field = meta->fields;
- zend_ulong * lengths = result->unbuf->lengths;
+ size_t * lengths = result->unbuf->lengths;
for (i = 0; i < field_count; i++, field++) {
zval * data = &result->unbuf->last_row_data[i];
- unsigned int len = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
+ const size_t len = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
if (flags & MYSQLND_FETCH_NUM) {
Z_TRY_ADDREF_P(data);
@@ -869,9 +880,9 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, void
*/
Z_TRY_ADDREF_P(data);
if (meta->zend_hash_keys[i].is_numeric == FALSE) {
- zend_hash_update(Z_ARRVAL_P(row), meta->fields[i].sname, data);
+ zend_hash_update(row_ht, meta->fields[i].sname, data);
} else {
- zend_hash_index_update(Z_ARRVAL_P(row), meta->zend_hash_keys[i].key, data);
+ zend_hash_index_update(row_ht, meta->zend_hash_keys[i].key, data);
}
}
@@ -889,28 +900,29 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, void
*fetched_anything = TRUE;
} else if (ret == FAIL) {
if (row_packet->error_info.error_no) {
- COPY_CLIENT_ERROR(*result->conn->error_info, row_packet->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, row_packet->error_info);
DBG_ERR_FMT("errorno=%u error=%s", row_packet->error_info.error_no, row_packet->error_info.error);
}
- CONN_SET_STATE(result->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */
} else if (row_packet->eof) {
/* Mark the connection as usable again */
DBG_INF_FMT("warnings=%u server_status=%u", row_packet->warning_count, row_packet->server_status);
result->unbuf->eof_reached = TRUE;
- memset(result->conn->upsert_status, 0, sizeof(*result->conn->upsert_status));
- result->conn->upsert_status->warning_count = row_packet->warning_count;
- result->conn->upsert_status->server_status = row_packet->server_status;
+
+ UPSERT_STATUS_RESET(conn->upsert_status);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status);
/*
result->row_packet will be cleaned when
destroying the result object
*/
- if (result->conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) {
- CONN_SET_STATE(result->conn, CONN_NEXT_RESULT_PENDING);
+ if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) {
+ SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING);
} else {
- CONN_SET_STATE(result->conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
}
- result->unbuf->m.free_last_data(result->unbuf, result->conn? result->conn->stats : NULL);
+ result->unbuf->m.free_last_data(result->unbuf, conn->stats);
}
DBG_INF_FMT("ret=%s fetched=%u", ret == PASS? "PASS":"FAIL", *fetched_anything);
@@ -921,11 +933,12 @@ MYSQLND_METHOD(mysqlnd_result_unbuffered, fetch_row)(MYSQLND_RES * result, void
/* {{{ mysqlnd_res::use_result */
static MYSQLND_RES *
-MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps)
+MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, const zend_bool ps)
{
+ MYSQLND_CONN_DATA * const conn = result->conn;
DBG_ENTER("mysqlnd_res::use_result");
- SET_EMPTY_ERROR(*result->conn->error_info);
+ SET_EMPTY_ERROR(conn->error_info);
if (ps == FALSE) {
result->type = MYSQLND_RES_NORMAL;
@@ -944,20 +957,24 @@ MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps
this to be not NULL.
*/
/* FALSE = non-persistent */
- result->unbuf->row_packet = result->conn->protocol->m.get_row_packet(result->conn->protocol, FALSE);
- if (!result->unbuf->row_packet) {
- goto oom;
+ {
+ struct st_mysqlnd_packet_row * row_packet = conn->payload_decoder_factory->m.get_row_packet(conn->payload_decoder_factory, FALSE);
+ if (!row_packet) {
+ goto oom;
+ }
+ row_packet->result_set_memory_pool = result->unbuf->result_set_memory_pool;
+ row_packet->field_count = result->field_count;
+ row_packet->binary_protocol = ps;
+ row_packet->fields_metadata = result->meta->fields;
+ row_packet->bit_fields_count = result->meta->bit_fields_count;
+ row_packet->bit_fields_total_len = result->meta->bit_fields_total_len;
+
+ result->unbuf->row_packet = row_packet;
}
- result->unbuf->row_packet->result_set_memory_pool = result->unbuf->result_set_memory_pool;
- result->unbuf->row_packet->field_count = result->field_count;
- result->unbuf->row_packet->binary_protocol = ps;
- result->unbuf->row_packet->fields_metadata = result->meta->fields;
- result->unbuf->row_packet->bit_fields_count = result->meta->bit_fields_count;
- result->unbuf->row_packet->bit_fields_total_len = result->meta->bit_fields_total_len;
DBG_RETURN(result);
oom:
- SET_OOM_ERROR(*result->conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
/* }}} */
@@ -967,10 +984,11 @@ oom:
static enum_func_status
MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row_c)(MYSQLND_RES * result, void * param, unsigned int flags, zend_bool * fetched_anything)
{
+ enum_func_status ret = FAIL;
MYSQLND_ROW_C * row = (MYSQLND_ROW_C *) param;
const MYSQLND_RES_METADATA * const meta = result->meta;
unsigned int field_count = meta->field_count;
- enum_func_status ret = FAIL;
+ MYSQLND_CONN_DATA * const conn = result->conn;
DBG_ENTER("mysqlnd_result_buffered::fetch_row_c");
if (result->stored_data->type == MYSQLND_BUFFERED_TYPE_ZVAL) {
@@ -989,20 +1007,20 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row_c)(MYSQLND_RES * result, void
current_row,
field_count,
meta->fields,
- result->conn->options->int_and_float_native,
- result->conn->stats);
+ conn->options->int_and_float_native,
+ conn->stats);
if (rc != PASS) {
DBG_RETURN(FAIL);
}
- set->initialized_rows++;
- for (i = 0; i < field_count; i++) {
+ ++set->initialized_rows;
+ for (i = 0; i < field_count; ++i) {
/*
NULL fields are 0 length, 0 is not more than 0
String of zero size, definitely can't be the next max_length.
Thus for NULL and zero-length we are quite efficient.
*/
if (Z_TYPE(current_row[i]) == IS_STRING) {
- zend_ulong len = Z_STRLEN(current_row[i]);
+ const size_t len = Z_STRLEN(current_row[i]);
if (meta->fields[i].max_length < len) {
meta->fields[i].max_length = len;
}
@@ -1014,7 +1032,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row_c)(MYSQLND_RES * result, void
/* there is no conn handle in this function thus we can't set OOM in error_info */
*row = mnd_malloc(field_count * sizeof(char *));
if (*row) {
- for (i = 0; i < field_count; i++) {
+ for (i = 0; i < field_count; ++i) {
zval * data = &current_row[i];
set->lengths[i] = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
@@ -1029,7 +1047,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row_c)(MYSQLND_RES * result, void
set->data_cursor += field_count;
MYSQLND_INC_GLOBAL_STATISTIC(STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF);
} else {
- SET_OOM_ERROR(*result->conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
}
/* END difference between normal normal fetch and _c */
@@ -1059,41 +1077,40 @@ MYSQLND_METHOD(mysqlnd_result_buffered, fetch_row_c)(MYSQLND_RES * result, void
static enum_func_status
MYSQLND_METHOD(mysqlnd_result_buffered_zval, fetch_row)(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything)
{
+ enum_func_status ret = FAIL;
zval * row = (zval *) param;
const MYSQLND_RES_METADATA * const meta = result->meta;
- unsigned int field_count = meta->field_count;
- enum_func_status ret = FAIL;
+ const unsigned int field_count = meta->field_count;
MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result->stored_data;
+ MYSQLND_CONN_DATA * const conn = result->conn;
DBG_ENTER("mysqlnd_result_buffered_zval::fetch_row");
/* If we haven't read everything */
- if (set->data_cursor &&
- (set->data_cursor - set->data) < (set->row_count * field_count))
- {
+ if (set->data_cursor && (set->data_cursor - set->data) < (set->row_count * field_count)) {
unsigned int i;
zval *current_row = set->data_cursor;
if (Z_ISUNDEF(current_row[0])) {
- uint64_t row_num = (set->data_cursor - set->data) / field_count;
+ const size_t row_num = (set->data_cursor - set->data) / field_count;
enum_func_status rc = set->m.row_decoder(set->row_buffers[row_num],
- current_row,
- field_count,
- meta->fields,
- result->conn->options->int_and_float_native,
- result->conn->stats);
+ current_row,
+ field_count,
+ meta->fields,
+ conn->options->int_and_float_native,
+ conn->stats);
if (rc != PASS) {
DBG_RETURN(FAIL);
}
- set->initialized_rows++;
- for (i = 0; i < field_count; i++) {
+ ++set->initialized_rows;
+ for (i = 0; i < field_count; ++i) {
/*
NULL fields are 0 length, 0 is not more than 0
String of zero size, definitely can't be the next max_length.
Thus for NULL and zero-length we are quite efficient.
*/
if (Z_TYPE(current_row[i]) == IS_STRING) {
- zend_ulong len = Z_STRLEN(current_row[i]);
+ const size_t len = Z_STRLEN(current_row[i]);
if (meta->fields[i].max_length < len) {
meta->fields[i].max_length = len;
}
@@ -1101,7 +1118,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_zval, fetch_row)(MYSQLND_RES * result, vo
}
}
- for (i = 0; i < field_count; i++) {
+ for (i = 0; i < field_count; ++i) {
zval * data = &current_row[i];
set->lengths[i] = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
@@ -1146,10 +1163,11 @@ MYSQLND_METHOD(mysqlnd_result_buffered_zval, fetch_row)(MYSQLND_RES * result, vo
static enum_func_status
MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_row)(MYSQLND_RES * result, void * param, const unsigned int flags, zend_bool * fetched_anything)
{
+ enum_func_status ret = FAIL;
zval * row = (zval *) param;
const MYSQLND_RES_METADATA * const meta = result->meta;
- unsigned int field_count = meta->field_count;
- enum_func_status ret = FAIL;
+ const unsigned int field_count = meta->field_count;
+ MYSQLND_CONN_DATA * const conn = result->conn;
MYSQLND_RES_BUFFERED_C * set = (MYSQLND_RES_BUFFERED_C *) result->stored_data;
@@ -1157,38 +1175,38 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_row)(MYSQLND_RES * result, void
/* If we haven't read everything */
if (set->current_row < set->row_count) {
- zval *current_row;
enum_func_status rc;
+ zval * current_row;
unsigned int i;
current_row = mnd_emalloc(field_count * sizeof(zval));
if (!current_row) {
- SET_OOM_ERROR(*result->conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(FAIL);
}
rc = result->stored_data->m.row_decoder(result->stored_data->row_buffers[set->current_row],
- current_row,
- field_count,
- meta->fields,
- result->conn->options->int_and_float_native,
- result->conn->stats);
+ current_row,
+ field_count,
+ meta->fields,
+ conn->options->int_and_float_native,
+ conn->stats);
if (rc != PASS) {
DBG_RETURN(FAIL);
}
if (!(set->initialized[set->current_row >> 3] & (1 << (set->current_row & 7)))) {
set->initialized[set->current_row >> 3] |= (1 << (set->current_row & 7)); /* mark initialized */
- set->initialized_rows++;
+ ++set->initialized_rows;
- for (i = 0; i < field_count; i++) {
+ for (i = 0; i < field_count; ++i) {
/*
NULL fields are 0 length, 0 is not more than 0
String of zero size, definitely can't be the next max_length.
Thus for NULL and zero-length we are quite efficient.
*/
if (Z_TYPE(current_row[i]) == IS_STRING) {
- zend_ulong len = Z_STRLEN(current_row[i]);
+ const size_t len = Z_STRLEN(current_row[i]);
if (meta->fields[i].max_length < len) {
meta->fields[i].max_length = len;
}
@@ -1196,7 +1214,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_row)(MYSQLND_RES * result, void
}
}
- for (i = 0; i < field_count; i++) {
+ for (i = 0; i < field_count; ++i) {
zval * data = &current_row[i];
set->lengths[i] = (Z_TYPE_P(data) == IS_STRING)? Z_STRLEN_P(data) : 0;
@@ -1229,7 +1247,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, fetch_row)(MYSQLND_RES * result, void
zval_ptr_dtor(data);
}
mnd_efree(current_row);
- set->current_row++;
+ ++set->current_row;
MYSQLND_INC_GLOBAL_STATISTIC(STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF);
*fetched_anything = TRUE;
ret = PASS;
@@ -1272,14 +1290,11 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
zend_bool binary_protocol)
{
enum_func_status ret;
- MYSQLND_PACKET_ROW * row_packet = NULL;
unsigned int next_extend = STORE_RESULT_PREALLOCATED_SET_IF_NOT_EMPTY, free_rows = 1;
- MYSQLND_RES_BUFFERED *set;
+ MYSQLND_RES_BUFFERED * set = result->stored_data;
+ MYSQLND_PACKET_ROW * row_packet = NULL;
DBG_ENTER("mysqlnd_res::store_result_fetch_data");
-
- set = result->stored_data;
-
if (!set || !row_buffers) {
ret = FAIL;
goto end;
@@ -1287,20 +1302,20 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
if (free_rows) {
*row_buffers = mnd_pemalloc((size_t)(free_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *)), 0);
if (!*row_buffers) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
goto end;
}
}
- set->references = 1;
-
/* non-persistent */
- row_packet = conn->protocol->m.get_row_packet(conn->protocol, FALSE);
+ row_packet = conn->payload_decoder_factory->m.get_row_packet(conn->payload_decoder_factory, FALSE);
if (!row_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
goto end;
}
+ set->references = 1;
+
row_packet->result_set_memory_pool = result->stored_data->result_set_memory_pool;
row_packet->field_count = meta->field_count;
row_packet->binary_protocol = binary_protocol;
@@ -1310,7 +1325,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
row_packet->skip_extraction = TRUE; /* let php_mysqlnd_rowp_read() not allocate row_packet->fields, we will do it */
- while (FAIL != (ret = PACKET_READ(row_packet, conn)) && !row_packet->eof) {
+ while (FAIL != (ret = PACKET_READ(row_packet)) && !row_packet->eof) {
if (!free_rows) {
uint64_t total_allocated_rows = free_rows = next_extend = next_extend * 11 / 10; /* extend with 10% */
MYSQLND_MEMORY_POOL_CHUNK ** new_row_buffers;
@@ -1318,13 +1333,13 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
if (total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *) > SIZE_MAX) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
goto end;
}
new_row_buffers = mnd_perealloc(*row_buffers, (size_t)(total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *)), 0);
if (!new_row_buffers) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
goto end;
}
@@ -1354,35 +1369,38 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
/* Finally clean */
if (row_packet->eof) {
- memset(conn->upsert_status, 0, sizeof(*conn->upsert_status));
- conn->upsert_status->warning_count = row_packet->warning_count;
- conn->upsert_status->server_status = row_packet->server_status;
+ UPSERT_STATUS_RESET(conn->upsert_status);
+ UPSERT_STATUS_SET_WARNINGS(conn->upsert_status, row_packet->warning_count);
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet->server_status);
}
/* save some memory */
if (free_rows) {
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
if (set->row_count * sizeof(MYSQLND_MEMORY_POOL_CHUNK *) > SIZE_MAX) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
ret = FAIL;
goto end;
}
*row_buffers = mnd_perealloc(*row_buffers, (size_t) (set->row_count * sizeof(MYSQLND_MEMORY_POOL_CHUNK *)), 0);
}
- if (conn->upsert_status->server_status & SERVER_MORE_RESULTS_EXISTS) {
- CONN_SET_STATE(conn, CONN_NEXT_RESULT_PENDING);
+ if (UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & SERVER_MORE_RESULTS_EXISTS) {
+ SET_CONNECTION_STATE(&conn->state, CONN_NEXT_RESULT_PENDING);
} else {
- CONN_SET_STATE(conn, CONN_READY);
+ SET_CONNECTION_STATE(&conn->state, CONN_READY);
}
if (ret == FAIL) {
- COPY_CLIENT_ERROR(set->error_info, row_packet->error_info);
+ COPY_CLIENT_ERROR(&set->error_info, row_packet->error_info);
} else {
/* libmysql's documentation says it should be so for SELECT statements */
- conn->upsert_status->affected_rows = set->row_count;
+ UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count);
}
DBG_INF_FMT("ret=%s row_count=%u warnings=%u server_status=%u",
- ret == PASS? "PASS":"FAIL", (uint) set->row_count, conn->upsert_status->warning_count, conn->upsert_status->server_status);
+ ret == PASS? "PASS":"FAIL",
+ (uint) set->row_count,
+ UPSERT_STATUS_GET_WARNINGS(conn->upsert_status),
+ UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
end:
PACKET_FREE(row_packet);
DBG_INF_FMT("rows=%llu", (unsigned long long)result->stored_data->row_count);
@@ -1407,19 +1425,19 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result,
result->conn = conn->m->get_reference(conn);
result->type = MYSQLND_RES_NORMAL;
- CONN_SET_STATE(conn, CONN_FETCHING_DATA);
+ SET_CONNECTION_STATE(&conn->state, CONN_FETCHING_DATA);
if (flags & MYSQLND_STORE_NO_COPY) {
result->stored_data = (MYSQLND_RES_BUFFERED *) mysqlnd_result_buffered_zval_init(result->field_count, flags & MYSQLND_STORE_PS, result->persistent);
if (!result->stored_data) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
row_buffers = &result->stored_data->row_buffers;
} else if (flags & MYSQLND_STORE_COPY) {
result->stored_data = (MYSQLND_RES_BUFFERED *) mysqlnd_result_buffered_c_init(result->field_count, flags & MYSQLND_STORE_PS, result->persistent);
if (!result->stored_data) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
row_buffers = &result->stored_data->row_buffers;
@@ -1428,26 +1446,26 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result,
if (FAIL == ret) {
if (result->stored_data) {
- COPY_CLIENT_ERROR(*conn->error_info, result->stored_data->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info);
} else {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
}
DBG_RETURN(NULL);
} else {
- /* Overflow ? */
if (flags & MYSQLND_STORE_NO_COPY) {
- MYSQLND_RES_METADATA * meta = result->meta;
+ const MYSQLND_RES_METADATA * const meta = result->meta;
MYSQLND_RES_BUFFERED_ZVAL * set = (MYSQLND_RES_BUFFERED_ZVAL *) result->stored_data;
+
if (set->row_count) {
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */
if (set->row_count * meta->field_count * sizeof(zval *) > SIZE_MAX) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
/* if pecalloc is used valgrind barks gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) */
set->data = mnd_emalloc((size_t)(set->row_count * meta->field_count * sizeof(zval)));
if (!set->data) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(NULL);
}
memset(set->data, 0, (size_t)(set->row_count * meta->field_count * sizeof(zval)));
@@ -1457,12 +1475,12 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result,
} else if (flags & MYSQLND_STORE_COPY) {
MYSQLND_RES_BUFFERED_C * set = (MYSQLND_RES_BUFFERED_C *) result->stored_data;
set->current_row = 0;
- set->initialized = mnd_pecalloc((set->row_count / 8) + 1, sizeof(zend_uchar), set->persistent); /* +1 for safety */
+ set->initialized = mnd_pecalloc((unsigned int) ((set->row_count / 8) + 1), sizeof(zend_uchar), set->persistent); /* +1 for safety */
}
}
/* libmysql's documentation says it should be so for SELECT statements */
- conn->upsert_status->affected_rows = result->stored_data->row_count;
+ UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, result->stored_data->row_count);
DBG_RETURN(result);
}
@@ -1482,9 +1500,10 @@ MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result)
fetch_row function isn't actually set (NULL), thus we have to skip these.
*/
if (result->unbuf && !result->unbuf->eof_reached) {
+ MYSQLND_CONN_DATA * const conn = result->conn;
DBG_INF("skipping result");
/* We have to fetch all data to clean the line */
- MYSQLND_INC_CONN_STATISTIC(result->conn->stats,
+ MYSQLND_INC_CONN_STATISTIC(conn->stats,
result->type == MYSQLND_RES_NORMAL? STAT_FLUSHED_NORMAL_SETS:
STAT_FLUSHED_PS_SETS);
@@ -1499,7 +1518,7 @@ MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result)
/* {{{ mysqlnd_res::free_result */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, zend_bool implicit)
+MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, const zend_bool implicit)
{
DBG_ENTER("mysqlnd_res::free_result");
@@ -1566,7 +1585,7 @@ static uint64_t
MYSQLND_METHOD(mysqlnd_result_unbuffered, num_rows)(const MYSQLND_RES_UNBUFFERED * const result)
{
/* Be compatible with libmysql. We count row_count, but will return 0 */
- return result->eof_reached? result->row_count:0;
+ return result->eof_reached? result->row_count : 0;
}
/* }}} */
@@ -1618,10 +1637,13 @@ MYSQLND_METHOD(mysqlnd_res, fetch_field)(MYSQLND_RES * const result)
not during mysqli_fetch_field() time.
*/
if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) {
+ const MYSQLND_CONN_DATA * const conn = result->conn;
DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request");
/* we have to initialize the rest to get the updated max length */
- if (PASS != result->stored_data->m.initialize_result_set_rest(result->stored_data, result->meta, result->conn->stats,
- result->conn->options->int_and_float_native))
+ if (PASS != result->stored_data->m.initialize_result_set_rest(result->stored_data,
+ result->meta,
+ conn->stats,
+ conn->options->int_and_float_native))
{
break;
}
@@ -1652,10 +1674,13 @@ MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result, cons
not during mysqli_fetch_field_direct() time.
*/
if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) {
+ const MYSQLND_CONN_DATA * const conn = result->conn;
DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request");
/* we have to initialized the rest to get the updated max length */
- if (PASS != result->stored_data->m.initialize_result_set_rest(result->stored_data, result->meta, result->conn->stats,
- result->conn->options->int_and_float_native))
+ if (PASS != result->stored_data->m.initialize_result_set_rest(result->stored_data,
+ result->meta,
+ conn->stats,
+ conn->options->int_and_float_native))
{
break;
}
@@ -1677,9 +1702,12 @@ MYSQLND_METHOD(mysqlnd_res, fetch_fields)(MYSQLND_RES * const result)
do {
if (result->meta) {
if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) {
+ const MYSQLND_CONN_DATA * const conn = result->conn;
/* we have to initialize the rest to get the updated max length */
- if (PASS != result->stored_data->m.initialize_result_set_rest(result->stored_data, result->meta, result->conn->stats,
- result->conn->options->int_and_float_native))
+ if (PASS != result->stored_data->m.initialize_result_set_rest(result->stored_data,
+ result->meta,
+ conn->stats,
+ conn->options->int_and_float_native))
{
break;
}
@@ -1784,7 +1812,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, const unsigned int
if ((!result->unbuf && !set)) {
php_error_docref(NULL, E_WARNING, "fetch_all can be used only with buffered sets");
if (result->conn) {
- SET_CLIENT_ERROR(*result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be used only with buffered sets");
+ SET_CLIENT_ERROR(result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be used only with buffered sets");
}
RETVAL_NULL();
DBG_VOID_RETURN;
@@ -1894,9 +1922,9 @@ MYSQLND_CLASS_METHODS_END;
/* {{{ mysqlnd_result_init */
PHPAPI MYSQLND_RES *
-mysqlnd_result_init(unsigned int field_count, zend_bool persistent)
+mysqlnd_result_init(const unsigned int field_count, const zend_bool persistent)
{
- size_t alloc_size = sizeof(MYSQLND_RES) + mysqlnd_plugin_count() * sizeof(void *);
+ const size_t alloc_size = sizeof(MYSQLND_RES) + mysqlnd_plugin_count() * sizeof(void *);
MYSQLND_RES * ret = mnd_pecalloc(1, alloc_size, persistent);
DBG_ENTER("mysqlnd_result_init");
@@ -1916,9 +1944,9 @@ mysqlnd_result_init(unsigned int field_count, zend_bool persistent)
/* {{{ mysqlnd_result_unbuffered_init */
PHPAPI MYSQLND_RES_UNBUFFERED *
-mysqlnd_result_unbuffered_init(unsigned int field_count, zend_bool ps, zend_bool persistent)
+mysqlnd_result_unbuffered_init(const unsigned int field_count, const zend_bool ps, const zend_bool persistent)
{
- size_t alloc_size = sizeof(MYSQLND_RES_UNBUFFERED) + mysqlnd_plugin_count() * sizeof(void *);
+ const size_t alloc_size = sizeof(MYSQLND_RES_UNBUFFERED) + mysqlnd_plugin_count() * sizeof(void *);
MYSQLND_RES_UNBUFFERED * ret = mnd_pecalloc(1, alloc_size, persistent);
DBG_ENTER("mysqlnd_result_unbuffered_init");
@@ -1927,7 +1955,7 @@ mysqlnd_result_unbuffered_init(unsigned int field_count, zend_bool ps, zend_bool
DBG_RETURN(NULL);
}
- if (!(ret->lengths = mnd_pecalloc(field_count, sizeof(zend_ulong), persistent))) {
+ if (!(ret->lengths = mnd_pecalloc(field_count, sizeof(size_t), persistent))) {
mnd_pefree(ret, persistent);
DBG_RETURN(NULL);
}
@@ -1957,9 +1985,9 @@ mysqlnd_result_unbuffered_init(unsigned int field_count, zend_bool ps, zend_bool
/* {{{ mysqlnd_result_buffered_zval_init */
PHPAPI MYSQLND_RES_BUFFERED_ZVAL *
-mysqlnd_result_buffered_zval_init(unsigned int field_count, zend_bool ps, zend_bool persistent)
+mysqlnd_result_buffered_zval_init(const unsigned int field_count, const zend_bool ps, const zend_bool persistent)
{
- size_t alloc_size = sizeof(MYSQLND_RES_BUFFERED_ZVAL) + mysqlnd_plugin_count() * sizeof(void *);
+ const size_t alloc_size = sizeof(MYSQLND_RES_BUFFERED_ZVAL) + mysqlnd_plugin_count() * sizeof(void *);
MYSQLND_RES_BUFFERED_ZVAL * ret = mnd_pecalloc(1, alloc_size, persistent);
DBG_ENTER("mysqlnd_result_buffered_zval_init");
@@ -1967,7 +1995,7 @@ mysqlnd_result_buffered_zval_init(unsigned int field_count, zend_bool ps, zend_b
if (!ret) {
DBG_RETURN(NULL);
}
- if (!(ret->lengths = mnd_pecalloc(field_count, sizeof(zend_ulong), persistent))) {
+ if (!(ret->lengths = mnd_pecalloc(field_count, sizeof(size_t), persistent))) {
mnd_pefree(ret, persistent);
DBG_RETURN(NULL);
}
@@ -2000,9 +2028,9 @@ mysqlnd_result_buffered_zval_init(unsigned int field_count, zend_bool ps, zend_b
/* {{{ mysqlnd_result_buffered_c_init */
PHPAPI MYSQLND_RES_BUFFERED_C *
-mysqlnd_result_buffered_c_init(unsigned int field_count, zend_bool ps, zend_bool persistent)
+mysqlnd_result_buffered_c_init(const unsigned int field_count, const zend_bool ps, const zend_bool persistent)
{
- size_t alloc_size = sizeof(MYSQLND_RES_BUFFERED_C) + mysqlnd_plugin_count() * sizeof(void *);
+ const size_t alloc_size = sizeof(MYSQLND_RES_BUFFERED_C) + mysqlnd_plugin_count() * sizeof(void *);
MYSQLND_RES_BUFFERED_C * ret = mnd_pecalloc(1, alloc_size, persistent);
DBG_ENTER("mysqlnd_result_buffered_c_init");
@@ -2010,7 +2038,7 @@ mysqlnd_result_buffered_c_init(unsigned int field_count, zend_bool ps, zend_bool
if (!ret) {
DBG_RETURN(NULL);
}
- if (!(ret->lengths = mnd_pecalloc(field_count, sizeof(zend_ulong), persistent))) {
+ if (!(ret->lengths = mnd_pecalloc(field_count, sizeof(size_t), persistent))) {
mnd_pefree(ret, persistent);
DBG_RETURN(NULL);
}
diff --git a/ext/mysqlnd/mysqlnd_result.h b/ext/mysqlnd/mysqlnd_result.h
index fffae33e4c..3f91195b32 100644
--- a/ext/mysqlnd/mysqlnd_result.h
+++ b/ext/mysqlnd/mysqlnd_result.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,21 +12,18 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_RESULT_H
#define MYSQLND_RESULT_H
-PHPAPI MYSQLND_RES * mysqlnd_result_init(unsigned int field_count, zend_bool persistent);
-PHPAPI MYSQLND_RES_UNBUFFERED * mysqlnd_result_unbuffered_init(unsigned int field_count, zend_bool ps, zend_bool persistent);
-PHPAPI MYSQLND_RES_BUFFERED_ZVAL * mysqlnd_result_buffered_zval_init(unsigned int field_count, zend_bool ps, zend_bool persistent);
-PHPAPI MYSQLND_RES_BUFFERED_C * mysqlnd_result_buffered_c_init(unsigned int field_count, zend_bool ps, zend_bool persistent);
+PHPAPI MYSQLND_RES * mysqlnd_result_init(const unsigned int field_count, const zend_bool persistent);
+PHPAPI MYSQLND_RES_UNBUFFERED * mysqlnd_result_unbuffered_init(const unsigned int field_count, const zend_bool ps, const zend_bool persistent);
+PHPAPI MYSQLND_RES_BUFFERED_ZVAL * mysqlnd_result_buffered_zval_init(const unsigned int field_count, const zend_bool ps, const zend_bool persistent);
+PHPAPI MYSQLND_RES_BUFFERED_C * mysqlnd_result_buffered_c_init(const unsigned int field_count, const zend_bool ps, const zend_bool persistent);
enum_func_status mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * stmt);
diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c
index 154d05357f..3934edd03e 100644
--- a/ext/mysqlnd/mysqlnd_result_meta.c
+++ b/ext/mysqlnd/mysqlnd_result_meta.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,15 +12,15 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
#include "mysqlnd.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_ps.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_result.h"
#include "mysqlnd_wireprotocol.h"
@@ -57,9 +57,9 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
DBG_ENTER("mysqlnd_res_meta::read_metadata");
- field_packet = conn->protocol->m.get_result_field_packet(conn->protocol, FALSE);
+ field_packet = conn->payload_decoder_factory->m.get_result_field_packet(conn->payload_decoder_factory, FALSE);
if (!field_packet) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(conn->error_info);
DBG_RETURN(FAIL);
}
field_packet->persistent_alloc = meta->persistent;
@@ -73,29 +73,20 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met
}
field_packet->metadata = &(meta->fields[i]);
- if (FAIL == PACKET_READ(field_packet, conn)) {
+ if (FAIL == PACKET_READ(field_packet)) {
PACKET_FREE(field_packet);
DBG_RETURN(FAIL);
}
if (field_packet->error_info.error_no) {
- COPY_CLIENT_ERROR(*conn->error_info, field_packet->error_info);
+ COPY_CLIENT_ERROR(conn->error_info, field_packet->error_info);
/* Return back from CONN_QUERY_SENT */
PACKET_FREE(field_packet);
DBG_RETURN(FAIL);
}
- if (field_packet->stupid_list_fields_eof == TRUE) {
- meta->field_count = i;
- break;
- }
-
if (mysqlnd_ps_fetch_functions[meta->fields[i].type].func == NULL) {
- DBG_ERR_FMT("Unknown type %u sent by the server. Please send a report to the developers",
- meta->fields[i].type);
- php_error_docref(NULL, E_WARNING,
- "Unknown type %u sent by the server. "
- "Please send a report to the developers",
- meta->fields[i].type);
+ DBG_ERR_FMT("Unknown type %u sent by the server. Please send a report to the developers", meta->fields[i].type);
+ php_error_docref(NULL, E_WARNING, "Unknown type %u sent by the server. Please send a report to the developers", meta->fields[i].type);
PACKET_FREE(field_packet);
DBG_RETURN(FAIL);
}
@@ -180,7 +171,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta)
/* {{{ mysqlnd_res::clone_metadata */
static MYSQLND_RES_METADATA *
-MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * const meta, const zend_bool persistent)
{
unsigned int i;
/* +1 is to have empty marker at the end */
diff --git a/ext/mysqlnd/mysqlnd_result_meta.h b/ext/mysqlnd/mysqlnd_result_meta.h
index 7b20994f0e..4f22dc8a8f 100644
--- a/ext/mysqlnd/mysqlnd_result_meta.h
+++ b/ext/mysqlnd/mysqlnd_result_meta.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,12 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Johannes Schlüter <johannes@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_RESULT_META_H
#define MYSQLND_RESULT_META_H
diff --git a/ext/mysqlnd/mysqlnd_reverse_api.c b/ext/mysqlnd/mysqlnd_reverse_api.c
index 5af3bd1aac..3ac3ff8ff2 100644
--- a/ext/mysqlnd/mysqlnd_reverse_api.c
+++ b/ext/mysqlnd/mysqlnd_reverse_api.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,12 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Johannes Schlüter <johannes@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.c 317989 2011-10-10 20:49:28Z andrey $ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
diff --git a/ext/mysqlnd/mysqlnd_reverse_api.h b/ext/mysqlnd/mysqlnd_reverse_api.h
index cb26af0224..cc2fc917cd 100644
--- a/ext/mysqlnd/mysqlnd_reverse_api.h
+++ b/ext/mysqlnd/mysqlnd_reverse_api.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,12 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mysqlnd.h 318051 2011-10-12 16:18:02Z andrey $ */
#ifndef MYSQLND_REVERSE_API_H
#define MYSQLND_REVERSE_API_H
diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c
index f550948035..7f12a72511 100644
--- a/ext/mysqlnd/mysqlnd_statistics.c
+++ b/ext/mysqlnd/mysqlnd_statistics.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,13 +12,12 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ | Georg Richter <georg@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
@@ -26,9 +25,7 @@
#include "mysqlnd_debug.h"
-/* {{{ mysqlnd_stats_values_names
- */
-
+/* {{{ mysqlnd_stats_values_names */
const MYSQLND_STRING mysqlnd_stats_values_names[STAT_LAST] =
{
{ MYSQLND_STR_W_LEN("bytes_sent") },
@@ -114,8 +111,10 @@ const MYSQLND_STRING mysqlnd_stats_values_names[STAT_LAST] =
{ MYSQLND_STR_W_LEN("mem_free_amount") },
{ MYSQLND_STR_W_LEN("mem_estrndup_count") },
{ MYSQLND_STR_W_LEN("mem_strndup_count") },
- { MYSQLND_STR_W_LEN("mem_estndup_count") },
+ { MYSQLND_STR_W_LEN("mem_estrdup_count") },
{ MYSQLND_STR_W_LEN("mem_strdup_count") },
+ { MYSQLND_STR_W_LEN("mem_edupl_count") },
+ { MYSQLND_STR_W_LEN("mem_dupl_count") },
{ MYSQLND_STR_W_LEN("proto_text_fetched_null") },
{ MYSQLND_STR_W_LEN("proto_text_fetched_bit") },
{ MYSQLND_STR_W_LEN("proto_text_fetched_tinyint") },
@@ -153,6 +152,7 @@ const MYSQLND_STRING mysqlnd_stats_values_names[STAT_LAST] =
{ MYSQLND_STR_W_LEN("proto_binary_fetched_datetime") },
{ MYSQLND_STR_W_LEN("proto_binary_fetched_timestamp") },
{ MYSQLND_STR_W_LEN("proto_binary_fetched_string") },
+ { MYSQLND_STR_W_LEN("proto_binary_fetched_json") },
{ MYSQLND_STR_W_LEN("proto_binary_fetched_blob") },
{ MYSQLND_STR_W_LEN("proto_binary_fetched_enum") },
{ MYSQLND_STR_W_LEN("proto_binary_fetched_set") },
@@ -212,32 +212,16 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING
/* }}} */
-/* {{{ _mysqlnd_get_client_stats */
-PHPAPI void
-_mysqlnd_get_client_stats(zval *return_value ZEND_FILE_LINE_DC)
-{
- MYSQLND_STATS stats, *stats_ptr = mysqlnd_global_stats;
- DBG_ENTER("_mysqlnd_get_client_stats");
- if (!stats_ptr) {
- memset(&stats, 0, sizeof(stats));
- stats_ptr = &stats;
- }
- mysqlnd_fill_stats_hash(stats_ptr, mysqlnd_stats_values_names, return_value ZEND_FILE_LINE_CC);
- DBG_VOID_RETURN;
-}
-/* }}} */
-
-
/* {{{ mysqlnd_stats_init */
PHPAPI void
-mysqlnd_stats_init(MYSQLND_STATS ** stats, size_t statistic_count)
+mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const zend_bool persistent)
{
- *stats = calloc(1, sizeof(MYSQLND_STATS));
+ *stats = pecalloc(1, sizeof(MYSQLND_STATS), persistent);
if (*stats == NULL) {
return;
}
- (*stats)->values = calloc(statistic_count, sizeof(uint64_t));
- (*stats)->triggers = calloc(statistic_count, sizeof(mysqlnd_stat_trigger));
+ (*stats)->values = pecalloc(statistic_count, sizeof(uint64_t), persistent);
+ (*stats)->triggers = pecalloc(statistic_count, sizeof(mysqlnd_stat_trigger), persistent);
(*stats)->in_trigger = FALSE;
(*stats)->count = statistic_count;
#ifdef ZTS
@@ -249,15 +233,15 @@ mysqlnd_stats_init(MYSQLND_STATS ** stats, size_t statistic_count)
/* {{{ mysqlnd_stats_end */
PHPAPI void
-mysqlnd_stats_end(MYSQLND_STATS * stats)
+mysqlnd_stats_end(MYSQLND_STATS * stats, const zend_bool persistent)
{
#ifdef ZTS
tsrm_mutex_free(stats->LOCK_access);
#endif
- free(stats->triggers);
- free(stats->values);
+ pefree(stats->triggers, persistent);
+ pefree(stats->values, persistent);
/* mnd_free will reference LOCK_access and crash...*/
- free(stats);
+ pefree(stats, persistent);
}
/* }}} */
@@ -295,6 +279,25 @@ mysqlnd_stats_reset_triggers(MYSQLND_STATS * const stats)
/* }}} */
+/************ MYSQLND specific code **********/
+
+/* {{{ _mysqlnd_get_client_stats */
+PHPAPI void
+_mysqlnd_get_client_stats(MYSQLND_STATS * stats_ptr, zval *return_value ZEND_FILE_LINE_DC)
+{
+ MYSQLND_STATS stats;
+ DBG_ENTER("_mysqlnd_get_client_stats");
+ if (!stats_ptr) {
+ memset(&stats, 0, sizeof(stats));
+ stats_ptr = &stats;
+ }
+ mysqlnd_fill_stats_hash(stats_ptr, mysqlnd_stats_values_names, return_value ZEND_FILE_LINE_CC);
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h
index ea2611c19c..ea909fcfcb 100644
--- a/ext/mysqlnd/mysqlnd_statistics.h
+++ b/ext/mysqlnd/mysqlnd_statistics.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,22 +12,14 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_STATISTICS_H
#define MYSQLND_STATISTICS_H
-
-PHPAPI extern MYSQLND_STATS * mysqlnd_global_stats;
-
-extern const MYSQLND_STRING mysqlnd_stats_values_names[];
-
#ifdef ZTS
#define MYSQLND_STATS_LOCK(stats) tsrm_mutex_lock((stats)->LOCK_access)
#define MYSQLND_STATS_UNLOCK(stats) tsrm_mutex_unlock((stats)->LOCK_access)
@@ -118,50 +110,11 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[];
-#ifndef MYSQLND_CORE_STATISTICS_DISABLED
-
-#define MYSQLND_INC_GLOBAL_STATISTIC(statistic) \
- MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic))
-
-#define MYSQLND_DEC_CONN_STATISTIC(conn_stats, statistic) \
- MYSQLND_DEC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic))
-
-#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2, value2) \
- MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2))
-
-#define MYSQLND_INC_CONN_STATISTIC(conn_stats, statistic) \
- MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)); \
- MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), (conn_stats), (statistic));
-
-#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value) \
- MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic), (value)); \
- MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), (conn_stats), (statistic), (value));
-
-#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1, statistic2, value2) \
- MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2)); \
- MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2));
-
-#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1, statistic2, value2, statistic3, value3) \
- MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2), (statistic3), (value3)); \
- MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2), (statistic3), (value3));
-
-#else
-
-#define MYSQLND_INC_GLOBAL_STATISTIC(statistic)
-#define MYSQLND_DEC_CONN_STATISTIC(conn_stats, statistic)
-#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2, value2)
-#define MYSQLND_INC_CONN_STATISTIC(conn_stats, statistic)
-#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value)
-#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1, statistic2, value2)
-#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1, statistic2, value2, statistic3, value3)
-
-#endif /* MYSQLND_CORE_STATISTICS_DISABLED */
+PHPAPI void mysqlnd_stats_init(MYSQLND_STATS ** stats, const size_t statistic_count, const zend_bool persistent);
+PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats, const zend_bool persistent);
PHPAPI void mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING * names, zval *return_value ZEND_FILE_LINE_DC);
-PHPAPI void mysqlnd_stats_init(MYSQLND_STATS ** stats, size_t statistic_count);
-PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats);
-
PHPAPI mysqlnd_stat_trigger mysqlnd_stats_set_trigger(MYSQLND_STATS * const stats, enum_mysqlnd_collected_stats stat, mysqlnd_stat_trigger trigger);
PHPAPI mysqlnd_stat_trigger mysqlnd_stats_reset_triggers(MYSQLND_STATS * const stats);
diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h
index 84c78e2c85..3f26425604 100644
--- a/ext/mysqlnd/mysqlnd_structs.h
+++ b/ext/mysqlnd/mysqlnd_structs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,14 +12,11 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_STRUCTS_H
#define MYSQLND_STRUCTS_H
@@ -28,11 +25,28 @@
#define MYSQLND_TYPEDEFED_METHODS
#define MYSQLND_CLASS_METHOD_TABLE_NAME(class) mysqlnd_##class##_methods
-#define MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(class) struct st_##class##_methods MYSQLND_CLASS_METHOD_TABLE_NAME(class)
+#define MYSQLND_CLASS_METHODS_TYPE(class) struct st_##class##_methods
+#define MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(class) MYSQLND_CLASS_METHODS_TYPE(class) MYSQLND_CLASS_METHOD_TABLE_NAME(class)
#define MYSQLND_CLASS_METHODS_START(class) MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(class) = {
#define MYSQLND_CLASS_METHODS_END }
+#define MYSQLND_CLASS_METHODS_INSTANCE_NAME(class) mysqlnd_##class##_methods_ptr
+#define MYSQLND_CLASS_METHODS_INSTANCE_DECLARE(class) extern const MYSQLND_CLASS_METHODS_TYPE(class) * MYSQLND_CLASS_METHODS_INSTANCE_NAME(class)
+#define MYSQLND_CLASS_METHODS_INSTANCE_DEFINE(class) const MYSQLND_CLASS_METHODS_TYPE(class) * MYSQLND_CLASS_METHODS_INSTANCE_NAME(class) = & MYSQLND_CLASS_METHOD_TABLE_NAME(class)
+
+typedef struct st_mysqlnd_string
+{
+ char *s;
+ size_t l;
+} MYSQLND_STRING;
+
+typedef struct st_mysqlnd_const_string
+{
+ const char *s;
+ size_t l;
+} MYSQLND_CSTRING;
+
typedef struct st_mysqlnd_memory_pool MYSQLND_MEMORY_POOL;
typedef struct st_mysqlnd_memory_pool_chunk MYSQLND_MEMORY_POOL_CHUNK;
@@ -44,20 +58,18 @@ typedef struct st_mysqlnd_memory_pool_chunk_llist MYSQLND_MEMORY_POOL_CHUNK_LLIS
struct st_mysqlnd_memory_pool
{
zend_uchar *arena;
- unsigned int refcount;
unsigned int arena_size;
unsigned int free_size;
MYSQLND_MEMORY_POOL_CHUNK* (*get_chunk)(MYSQLND_MEMORY_POOL * pool, unsigned int size);
+ enum_func_status (*resize_chunk)(MYSQLND_MEMORY_POOL * pool, MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size);
+ void (*free_chunk)(MYSQLND_MEMORY_POOL * pool, MYSQLND_MEMORY_POOL_CHUNK * chunk);
};
struct st_mysqlnd_memory_pool_chunk
{
size_t app;
- MYSQLND_MEMORY_POOL *pool;
zend_uchar *ptr;
- enum_func_status (*resize_chunk)(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size);
- void (*free_chunk)(MYSQLND_MEMORY_POOL_CHUNK * chunk);
unsigned int size;
zend_bool from_pool;
};
@@ -79,7 +91,7 @@ typedef struct st_mysqlnd_field
const char *org_table; /* Org table name, if table was an alias */
const char *db; /* Database for table */
const char *catalog; /* Catalog for table */
- char *def; /* Default value (set by mysql_list_fields) */
+ char *def; /* Default value */
zend_ulong length; /* Width of column (create length) */
zend_ulong max_length; /* Max width for selected set */
unsigned int name_length;
@@ -98,22 +110,53 @@ typedef struct st_mysqlnd_field
} MYSQLND_FIELD;
-typedef struct st_mysqlnd_upsert_result
+typedef struct st_mysqlnd_upsert_status MYSQLND_UPSERT_STATUS;
+typedef void (*func_mysqlnd_upsert_status__reset)(MYSQLND_UPSERT_STATUS * const upsert_status);
+typedef void (*func_mysqlnd_upsert_status__set_affected_rows_to_error)(MYSQLND_UPSERT_STATUS * const upsert_status);
+
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_upsert_status)
+{
+ func_mysqlnd_upsert_status__reset reset;
+ func_mysqlnd_upsert_status__set_affected_rows_to_error set_affected_rows_to_error;
+};
+
+struct st_mysqlnd_upsert_status
{
unsigned int warning_count;
unsigned int server_status;
uint64_t affected_rows;
uint64_t last_insert_id;
-} MYSQLND_UPSERT_STATUS;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_upsert_status) *m;
+};
+
+#define SET_EMPTY_ERROR(info) (info)->m->reset((info))
+#define SET_CLIENT_ERROR(info, err_no, sqlstate, error) (err_no)? (info)->m->set_client_error((info), (err_no), (sqlstate), (error)) : (info)->m->reset((info))
+#define SET_OOM_ERROR(info) SET_CLIENT_ERROR((info), CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory)
+#define COPY_CLIENT_ERROR(dest, source) SET_CLIENT_ERROR((dest), (source).error_no, (source).sqlstate, (source).error)
+
+
+typedef struct st_mysqlnd_error_info MYSQLND_ERROR_INFO;
+typedef void (*func_mysqlnd_error_info__reset)(MYSQLND_ERROR_INFO * const info);
+typedef void (*func_mysqlnd_error_info__set_client_error)(MYSQLND_ERROR_INFO * const info, const unsigned int err_no, const char * const sqlstate, const char * const error);
+
+
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info)
+{
+ func_mysqlnd_error_info__reset reset;
+ func_mysqlnd_error_info__set_client_error set_client_error;
+};
-typedef struct st_mysqlnd_error_info
+struct st_mysqlnd_error_info
{
char error[MYSQLND_ERRMSG_SIZE+1];
char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1];
unsigned int error_no;
zend_llist * error_list;
-} MYSQLND_ERROR_INFO;
+
+ zend_bool persistent;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *m;
+};
typedef struct st_mysqlnd_error_list_element
@@ -156,7 +199,7 @@ typedef struct st_mysqlnd_infile
void (*local_infile_end)(void *ptr);
} MYSQLND_INFILE;
-typedef struct st_mysqlnd_options
+typedef struct st_mysqlnd_session_options
{
ulong flags;
@@ -175,11 +218,11 @@ typedef struct st_mysqlnd_options
in the memory which can crash external code. Feel free to reuse these.
*/
HashTable * connect_attr;
+ char * unused1;
+ char * unused2;
char * unused3;
- char * unused4;
- char * unused5;
- enum_mysqlnd_protocol_type protocol;
+ enum_mysqlnd_session_protocol_type protocol;
char *charset_name;
/* maximum allowed packet size for communication */
@@ -188,9 +231,10 @@ typedef struct st_mysqlnd_options
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
zend_bool int_and_float_native;
#endif
-} MYSQLND_OPTIONS;
+} MYSQLND_SESSION_OPTIONS;
+
-typedef struct st_mysqlnd_net_options
+typedef struct st_mysqlnd_vio_options
{
/* timeouts */
unsigned int timeout_connect;
@@ -206,23 +250,24 @@ typedef struct st_mysqlnd_net_options
char *ssl_capath;
char *ssl_cipher;
char *ssl_passphrase;
- zend_bool ssl_verify_peer;
- uint64_t flags;
+ enum mysqlnd_ssl_peer {
+ MYSQLND_SSL_PEER_DEFAULT = 0,
+ MYSQLND_SSL_PEER_VERIFY = 1,
+ MYSQLND_SSL_PEER_DONT_VERIFY = 2,
- char * sha256_server_public_key;
+#define MYSQLND_SSL_PEER_DEFAULT_ACTION MYSQLND_SSL_PEER_VERIFY
+ } ssl_verify_peer;
+} MYSQLND_VIO_OPTIONS;
- char * unused1;
- char * unused2;
- char * unused3;
- char * unused4;
-} MYSQLND_NET_OPTIONS;
typedef struct st_mysqlnd_connection MYSQLND;
typedef struct st_mysqlnd_connection_data MYSQLND_CONN_DATA;
-typedef struct st_mysqlnd_net MYSQLND_NET;
-typedef struct st_mysqlnd_net_data MYSQLND_NET_DATA;
-typedef struct st_mysqlnd_protocol MYSQLND_PROTOCOL;
+typedef struct st_mysqlnd_protocol_frame_codec MYSQLND_PFC;
+typedef struct st_mysqlnd_protocol_frame_codec_data MYSQLND_PFC_DATA;
+typedef struct st_mysqlnd_vio MYSQLND_VIO;
+typedef struct st_mysqlnd_vio_data MYSQLND_VIO_DATA;
+typedef struct st_mysqlnd_protocol_payload_decoder_factory MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY;
typedef struct st_mysqlnd_res MYSQLND_RES;
typedef char** MYSQLND_ROW_C; /* return data as array of strings */
typedef struct st_mysqlnd_stmt_data MYSQLND_STMT_DATA;
@@ -266,158 +311,87 @@ struct st_mysqlnd_stats
};
-typedef struct st_mysqlnd_read_buffer {
- zend_uchar * data;
- size_t offset;
- size_t size;
- size_t len;
- zend_bool (*is_empty)(struct st_mysqlnd_read_buffer *);
- void (*read)(struct st_mysqlnd_read_buffer *, size_t count, zend_uchar * dest);
- size_t (*bytes_left)(struct st_mysqlnd_read_buffer *);
- void (*free_buffer)(struct st_mysqlnd_read_buffer **);
-} MYSQLND_READ_BUFFER;
+typedef enum_func_status (*func_mysqlnd_vio__init)(MYSQLND_VIO * const vio, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
+typedef void (*func_mysqlnd_vio__dtor)(MYSQLND_VIO * const vio, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef enum_func_status (*func_mysqlnd_vio__connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef void (*func_mysqlnd_vio__close_stream)(MYSQLND_VIO * const vio, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef php_stream * (*func_mysqlnd_vio__open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef php_stream * (*func_mysqlnd_vio__get_stream)(const MYSQLND_VIO * const vio);
+typedef enum_func_status (*func_mysqlnd_vio__set_stream)(MYSQLND_VIO * const vio, php_stream * vio_stream);
+typedef zend_bool (*func_mysqlnd_vio__has_valid_stream)(const MYSQLND_VIO * const vio);
+typedef func_mysqlnd_vio__open_stream (*func_mysqlnd_vio__get_open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, MYSQLND_ERROR_INFO * const error_info);
-typedef enum_func_status (*func_mysqlnd_net__set_client_option)(MYSQLND_NET * const net, enum_mysqlnd_option option, const char * const value);
-typedef enum_func_status (*func_mysqlnd_net__decode)(zend_uchar * uncompressed_data, const size_t uncompressed_data_len, const zend_uchar * const compressed_data, const size_t compressed_data_len);
-typedef enum_func_status (*func_mysqlnd_net__encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len, const zend_uchar * const uncompressed_data, const size_t uncompressed_data_len);
-typedef size_t (*func_mysqlnd_net__consume_uneaten_data)(MYSQLND_NET * const net, enum php_mysqlnd_server_command cmd);
-typedef void (*func_mysqlnd_net__free_contents)(MYSQLND_NET * net);
-typedef enum_func_status (*func_mysqlnd_net__enable_ssl)(MYSQLND_NET * const net);
-typedef enum_func_status (*func_mysqlnd_net__disable_ssl)(MYSQLND_NET * const net);
-typedef enum_func_status (*func_mysqlnd_net__network_read_ex)(MYSQLND_NET * const net, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
-typedef size_t (*func_mysqlnd_net__network_write_ex)(MYSQLND_NET * const net, const zend_uchar * const buf, const size_t count, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
-typedef size_t (*func_mysqlnd_net__send_ex)(MYSQLND_NET * const net, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef enum_func_status (*func_mysqlnd_net__receive_ex)(MYSQLND_NET * const net, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef enum_func_status (*func_mysqlnd_net__init)(MYSQLND_NET * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
-typedef void (*func_mysqlnd_net__dtor)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef enum_func_status (*func_mysqlnd_net__connect_ex)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef void (*func_mysqlnd_net__close_stream)(MYSQLND_NET * const net, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef php_stream * (*func_mysqlnd_net__open_stream)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef php_stream * (*func_mysqlnd_net__get_stream)(const MYSQLND_NET * const net);
-typedef php_stream * (*func_mysqlnd_net__set_stream)(MYSQLND_NET * const net, php_stream * net_stream);
-typedef func_mysqlnd_net__open_stream (*func_mysqlnd_net__get_open_stream)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, MYSQLND_ERROR_INFO * const error_info);
-typedef void (*func_mysqlnd_net__post_connect_set_opt)(MYSQLND_NET * const net, const char * const scheme, const size_t scheme_len, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
-typedef enum_func_status (*func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_NET * net, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info);
-
-struct st_mysqlnd_net_methods
-{
- func_mysqlnd_net__init init;
- func_mysqlnd_net__dtor dtor;
- func_mysqlnd_net__connect_ex connect_ex;
- func_mysqlnd_net__close_stream close_stream;
- func_mysqlnd_net__open_stream open_pipe;
- func_mysqlnd_net__open_stream open_tcp_or_unix;
-
- func_mysqlnd_net__get_stream get_stream;
- func_mysqlnd_net__set_stream set_stream;
- func_mysqlnd_net__get_open_stream get_open_stream;
-
- func_mysqlnd_net__post_connect_set_opt post_connect_set_opt;
-
- func_mysqlnd_net__set_client_option set_client_option;
- func_mysqlnd_net__decode decode;
- func_mysqlnd_net__encode encode;
- func_mysqlnd_net__consume_uneaten_data consume_uneaten_data;
- func_mysqlnd_net__free_contents free_contents;
- func_mysqlnd_net__enable_ssl enable_ssl;
- func_mysqlnd_net__disable_ssl disable_ssl;
-
- func_mysqlnd_net__network_read_ex network_read_ex;
- func_mysqlnd_net__network_write_ex network_write_ex;
- func_mysqlnd_net__send_ex send_ex;
- func_mysqlnd_net__receive_ex receive_ex;
-
- func_mysqlnd_net__read_compressed_packet_from_stream_and_fill_read_buffer read_compressed_packet_from_stream_and_fill_read_buffer;
+typedef enum_func_status (*func_mysqlnd_vio__set_client_option)(MYSQLND_VIO * const vio, enum_mysqlnd_client_option option, const char * const value);
+typedef void (*func_mysqlnd_vio__post_connect_set_opt)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
- void * unused1;
- void * unused2;
- void * unused3;
- void * unused4;
- void * unused5;
-};
+typedef enum_func_status (*func_mysqlnd_vio__enable_ssl)(MYSQLND_VIO * const vio);
+typedef enum_func_status (*func_mysqlnd_vio__disable_ssl)(MYSQLND_VIO * const vio);
+typedef enum_func_status (*func_mysqlnd_vio__network_read)(MYSQLND_VIO * const vio, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
+typedef size_t (*func_mysqlnd_vio__network_write)(MYSQLND_VIO * const vio, const zend_uchar * const buf, const size_t count, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
+typedef size_t (*func_mysqlnd_vio__consume_uneaten_data)(MYSQLND_VIO * const vio, enum php_mysqlnd_server_command cmd);
+
+typedef void (*func_mysqlnd_vio__free_contents)(MYSQLND_VIO * vio);
-struct st_mysqlnd_packet_greet;
-struct st_mysqlnd_packet_greet;
-struct st_mysqlnd_packet_auth;
-struct st_mysqlnd_packet_ok;
-struct st_mysqlnd_packet_command;
-struct st_mysqlnd_packet_eof;
-struct st_mysqlnd_packet_rset_header;
-struct st_mysqlnd_packet_res_field;
-struct st_mysqlnd_packet_row;
-struct st_mysqlnd_packet_stats;
-struct st_mysqlnd_packet_prepare_response;
-struct st_mysqlnd_packet_chg_user_resp;
-struct st_mysqlnd_packet_auth_pam;
-struct st_mysqlnd_packet_sha256_pk_request;
-struct st_mysqlnd_packet_sha256_pk_request_response;
-typedef struct st_mysqlnd_packet_greet * (*func_mysqlnd_protocol__get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_auth * (*func_mysqlnd_protocol__get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_auth_response *(*func_mysqlnd_protocol__get_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_change_auth_response * (*func_mysqlnd_protocol__get_change_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_ok * (*func_mysqlnd_protocol__get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_command * (*func_mysqlnd_protocol__get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_eof * (*func_mysqlnd_protocol__get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_rset_header * (*func_mysqlnd_protocol__get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_res_field * (*func_mysqlnd_protocol__get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_row * (*func_mysqlnd_protocol__get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_stats * (*func_mysqlnd_protocol__get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_prepare_response *(*func_mysqlnd_protocol__get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol__get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_sha256_pk_request *(*func_mysqlnd_protocol__get_sha256_pk_request_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-typedef struct st_mysqlnd_packet_sha256_pk_request_response *(*func_mysqlnd_protocol__get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent);
-
-struct st_mysqlnd_protocol_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio)
{
- func_mysqlnd_protocol__get_greet_packet get_greet_packet;
- func_mysqlnd_protocol__get_auth_packet get_auth_packet;
- func_mysqlnd_protocol__get_auth_response_packet get_auth_response_packet;
- func_mysqlnd_protocol__get_change_auth_response_packet get_change_auth_response_packet;
- func_mysqlnd_protocol__get_ok_packet get_ok_packet;
- func_mysqlnd_protocol__get_command_packet get_command_packet;
- func_mysqlnd_protocol__get_eof_packet get_eof_packet;
- func_mysqlnd_protocol__get_rset_header_packet get_rset_header_packet;
- func_mysqlnd_protocol__get_result_field_packet get_result_field_packet;
- func_mysqlnd_protocol__get_row_packet get_row_packet;
- func_mysqlnd_protocol__get_stats_packet get_stats_packet;
- func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet;
- func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet;
- func_mysqlnd_protocol__get_sha256_pk_request_packet get_sha256_pk_request_packet;
- func_mysqlnd_protocol__get_sha256_pk_request_response_packet get_sha256_pk_request_response_packet;
+ func_mysqlnd_vio__init init;
+ func_mysqlnd_vio__dtor dtor;
+ func_mysqlnd_vio__connect connect;
- void * unused1;
- void * unused2;
- void * unused3;
+ func_mysqlnd_vio__close_stream close_stream;
+ func_mysqlnd_vio__open_stream open_pipe;
+ func_mysqlnd_vio__open_stream open_tcp_or_unix;
+
+ func_mysqlnd_vio__get_stream get_stream;
+ func_mysqlnd_vio__set_stream set_stream;
+ func_mysqlnd_vio__has_valid_stream has_valid_stream;
+ func_mysqlnd_vio__get_open_stream get_open_stream;
+
+ func_mysqlnd_vio__set_client_option set_client_option;
+ func_mysqlnd_vio__post_connect_set_opt post_connect_set_opt;
+
+ func_mysqlnd_vio__enable_ssl enable_ssl;
+ func_mysqlnd_vio__disable_ssl disable_ssl;
+
+ func_mysqlnd_vio__network_read network_read;
+ func_mysqlnd_vio__network_write network_write;
+
+ func_mysqlnd_vio__consume_uneaten_data consume_uneaten_data;
+
+ func_mysqlnd_vio__free_contents free_contents;
};
-typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(zend_bool persistent);
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory);
+
+typedef MYSQLND * (*func_mysqlnd_object_factory__get_connection)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * factory, const zend_bool persistent);
typedef MYSQLND * (*func_mysqlnd_object_factory__clone_connection_object)(MYSQLND * conn);
-typedef MYSQLND_STMT * (*func_mysqlnd_object_factory__get_prepared_statement)(MYSQLND_CONN_DATA * conn);
-typedef MYSQLND_NET * (*func_mysqlnd_object_factory__get_io_channel)(zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
-typedef MYSQLND_PROTOCOL * (*func_mysqlnd_object_factory__get_protocol_decoder)(zend_bool persistent);
+typedef MYSQLND_STMT * (*func_mysqlnd_object_factory__get_prepared_statement)(MYSQLND_CONN_DATA * conn, const zend_bool persistent);
+typedef MYSQLND_PFC * (*func_mysqlnd_object_factory__get_pfc)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
+typedef MYSQLND_VIO * (*func_mysqlnd_object_factory__get_vio)(const zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
+typedef MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * (*func_mysqlnd_object_factory__get_protocol_payload_decoder_factory)(MYSQLND_CONN_DATA * conn, const zend_bool persistent);
-struct st_mysqlnd_object_factory_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory)
{
func_mysqlnd_object_factory__get_connection get_connection;
func_mysqlnd_object_factory__clone_connection_object clone_connection_object;
func_mysqlnd_object_factory__get_prepared_statement get_prepared_statement;
- func_mysqlnd_object_factory__get_io_channel get_io_channel;
- func_mysqlnd_object_factory__get_protocol_decoder get_protocol_decoder;
+ func_mysqlnd_object_factory__get_pfc get_protocol_frame_codec;
+ func_mysqlnd_object_factory__get_vio get_vio;
+ func_mysqlnd_object_factory__get_protocol_payload_decoder_factory get_protocol_payload_decoder_factory;
};
-typedef enum_func_status (*func_mysqlnd_conn_data__init)(MYSQLND_CONN_DATA * conn);
-typedef enum_func_status (*func_mysqlnd_conn_data__connect)(MYSQLND_CONN_DATA * conn, const char * host, const char * user, const char * passwd, unsigned int passwd_len, const char * db, unsigned int db_len, unsigned int port, const char * socket_or_pipe, unsigned int mysql_flags);
-typedef zend_ulong (*func_mysqlnd_conn_data__escape_string)(MYSQLND_CONN_DATA * const conn, char *newstr, const char *escapestr, size_t escapestr_len);
+typedef enum_func_status (*func_mysqlnd_conn_data__connect)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING username, MYSQLND_CSTRING password, MYSQLND_CSTRING database, unsigned int port, MYSQLND_CSTRING socket_or_pipe, unsigned int mysql_flags);
+typedef zend_ulong (*func_mysqlnd_conn_data__escape_string)(MYSQLND_CONN_DATA * const conn, char *newstr, const char *escapestr, size_t escapestr_len);
typedef enum_func_status (*func_mysqlnd_conn_data__set_charset)(MYSQLND_CONN_DATA * const conn, const char * const charset);
-typedef enum_func_status (*func_mysqlnd_conn_data__query)(MYSQLND_CONN_DATA * conn, const char * query, unsigned int query_len);
-typedef enum_func_status (*func_mysqlnd_conn_data__send_query)(MYSQLND_CONN_DATA * conn, const char *query, unsigned int query_len, enum_mysqlnd_send_query_type type, zval *read_cb, zval *err_cb);
+typedef enum_func_status (*func_mysqlnd_conn_data__query)(MYSQLND_CONN_DATA * conn, const char * const query, const size_t query_len);
+typedef enum_func_status (*func_mysqlnd_conn_data__send_query)(MYSQLND_CONN_DATA * conn, const char * const query, const size_t query_len, enum_mysqlnd_send_query_type type, zval *read_cb, zval *err_cb);
typedef enum_func_status (*func_mysqlnd_conn_data__reap_query)(MYSQLND_CONN_DATA * conn, enum_mysqlnd_reap_result_type type);
typedef MYSQLND_RES * (*func_mysqlnd_conn_data__use_result)(MYSQLND_CONN_DATA * const conn, const unsigned int flags);
typedef MYSQLND_RES * (*func_mysqlnd_conn_data__store_result)(MYSQLND_CONN_DATA * const conn, const unsigned int flags);
@@ -431,7 +405,7 @@ typedef enum_func_status (*func_mysqlnd_conn_data__refresh_server)(MYSQLND_CONN_
typedef enum_func_status (*func_mysqlnd_conn_data__ping)(MYSQLND_CONN_DATA * const conn);
typedef enum_func_status (*func_mysqlnd_conn_data__kill_connection)(MYSQLND_CONN_DATA * conn, unsigned int pid);
-typedef enum_func_status (*func_mysqlnd_conn_data__select_db)(MYSQLND_CONN_DATA * const conn, const char * const db, unsigned int db_len);
+typedef enum_func_status (*func_mysqlnd_conn_data__select_db)(MYSQLND_CONN_DATA * const conn, const char * const db, const size_t db_len);
typedef enum_func_status (*func_mysqlnd_conn_data__server_dump_debug_information)(MYSQLND_CONN_DATA * const conn);
typedef enum_func_status (*func_mysqlnd_conn_data__change_user)(MYSQLND_CONN_DATA * const conn, const char * user, const char * passwd, const char * db, zend_bool silent, size_t passwd_len);
@@ -441,15 +415,14 @@ typedef const char * (*func_mysqlnd_conn_data__get_sqlstate)(const MYSQLND_CONN
typedef uint64_t (*func_mysqlnd_conn_data__get_thread_id)(const MYSQLND_CONN_DATA * const conn);
typedef void (*func_mysqlnd_conn_data__get_statistics)(const MYSQLND_CONN_DATA * const conn, zval *return_value ZEND_FILE_LINE_DC);
-typedef zend_ulong (*func_mysqlnd_conn_data__get_server_version)(const MYSQLND_CONN_DATA * const conn);
+typedef zend_ulong (*func_mysqlnd_conn_data__get_server_version)(const MYSQLND_CONN_DATA * const conn);
typedef const char * (*func_mysqlnd_conn_data__get_server_information)(const MYSQLND_CONN_DATA * const conn);
typedef enum_func_status (*func_mysqlnd_conn_data__get_server_statistics)(MYSQLND_CONN_DATA * conn, zend_string **message);
typedef const char * (*func_mysqlnd_conn_data__get_host_information)(const MYSQLND_CONN_DATA * const conn);
typedef unsigned int (*func_mysqlnd_conn_data__get_protocol_information)(const MYSQLND_CONN_DATA * const conn);
typedef const char * (*func_mysqlnd_conn_data__get_last_message)(const MYSQLND_CONN_DATA * const conn);
typedef const char * (*func_mysqlnd_conn_data__charset_name)(const MYSQLND_CONN_DATA * const conn);
-typedef MYSQLND_RES * (*func_mysqlnd_conn_data__list_fields)(MYSQLND_CONN_DATA * conn, const char * table, const char * achtung_wild);
-typedef MYSQLND_RES * (*func_mysqlnd_conn_data__list_method)(MYSQLND_CONN_DATA * conn, const char * query, const char * achtung_wild, char *par1);
+typedef MYSQLND_RES * (*func_mysqlnd_conn_data__list_method)(MYSQLND_CONN_DATA * conn, const char * const query, const char * const achtung_wild, const char * const par1);
typedef uint64_t (*func_mysqlnd_conn_data__get_last_insert_id)(const MYSQLND_CONN_DATA * const conn);
typedef uint64_t (*func_mysqlnd_conn_data__get_affected_rows)(const MYSQLND_CONN_DATA * const conn);
@@ -459,7 +432,7 @@ typedef unsigned int (*func_mysqlnd_conn_data__get_field_count)(const MYSQLND_C
typedef unsigned int (*func_mysqlnd_conn_data__get_server_status)(const MYSQLND_CONN_DATA * const conn);
typedef enum_func_status (*func_mysqlnd_conn_data__set_server_option)(MYSQLND_CONN_DATA * const conn, enum_mysqlnd_server_option option);
-typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option)(MYSQLND_CONN_DATA * const conn, enum_mysqlnd_option option, const char * const value);
+typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option)(MYSQLND_CONN_DATA * const conn, enum_mysqlnd_client_option option, const char * const value);
typedef void (*func_mysqlnd_conn_data__free_contents)(MYSQLND_CONN_DATA * conn);/* private */
typedef void (*func_mysqlnd_conn_data__free_options)(MYSQLND_CONN_DATA * conn); /* private */
typedef void (*func_mysqlnd_conn_data__dtor)(MYSQLND_CONN_DATA * conn); /* private */
@@ -468,11 +441,9 @@ typedef enum_func_status (*func_mysqlnd_conn_data__query_read_result_set_header)
typedef MYSQLND_CONN_DATA * (*func_mysqlnd_conn_data__get_reference)(MYSQLND_CONN_DATA * const conn);
typedef enum_func_status (*func_mysqlnd_conn_data__free_reference)(MYSQLND_CONN_DATA * const conn);
-typedef enum mysqlnd_connection_state (*func_mysqlnd_conn_data__get_state)(const MYSQLND_CONN_DATA * const conn);
-typedef void (*func_mysqlnd_conn_data__set_state)(MYSQLND_CONN_DATA * const conn, enum mysqlnd_connection_state new_state);
-typedef enum_func_status (*func_mysqlnd_conn_data__simple_command)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status);
-typedef enum_func_status (*func_mysqlnd_conn_data__simple_command_handle_response)(MYSQLND_CONN_DATA * conn, enum mysqlnd_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status);
+typedef enum_func_status (*func_mysqlnd_conn_data__send_command_do_request)(MYSQLND_CONN_DATA * const conn, const enum php_mysqlnd_server_command command, const zend_uchar * const arg, const size_t arg_len, const zend_bool silent, const zend_bool ignore_upsert_status);
+typedef enum_func_status (*func_mysqlnd_conn_data__send_command_handle_response)(MYSQLND_CONN_DATA * const conn, const enum mysqlnd_packet_type ok_packet, const zend_bool silent, const enum php_mysqlnd_server_command command, const zend_bool ignore_upsert_status);
typedef enum_func_status (*func_mysqlnd_conn_data__restart_psession)(MYSQLND_CONN_DATA * conn);
typedef enum_func_status (*func_mysqlnd_conn_data__end_psession)(MYSQLND_CONN_DATA * conn);
@@ -491,24 +462,25 @@ typedef void (*func_mysqlnd_conn_data__tx_cor_options_to_string)(const MYSQLN
typedef enum_func_status (*func_mysqlnd_conn_data__tx_savepoint)(MYSQLND_CONN_DATA * conn, const char * const name);
typedef enum_func_status (*func_mysqlnd_conn_data__tx_savepoint_release)(MYSQLND_CONN_DATA * conn, const char * const name);
-typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_start)(MYSQLND_CONN_DATA * conn, size_t this_func);
-typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_end)(MYSQLND_CONN_DATA * conn, size_t this_func, enum_func_status status);
+typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_start)(MYSQLND_CONN_DATA * conn, const size_t this_func);
+typedef enum_func_status (*func_mysqlnd_conn_data__local_tx_end)(MYSQLND_CONN_DATA * conn, const size_t this_func, const enum_func_status status);
typedef enum_func_status (*func_mysqlnd_conn_data__execute_init_commands)(MYSQLND_CONN_DATA * conn);
typedef unsigned int (*func_mysqlnd_conn_data__get_updated_connect_flags)(MYSQLND_CONN_DATA * conn, unsigned int mysql_flags);
-typedef enum_func_status (*func_mysqlnd_conn_data__connect_handshake)(MYSQLND_CONN_DATA * conn, const char * const host, const char * const user, const char * const passwd, const unsigned int passwd_len, const char * const db, const unsigned int db_len, const unsigned int mysql_flags);
-typedef enum_func_status (*func_mysqlnd_conn_data__simple_command_send_request)(MYSQLND_CONN_DATA * conn, enum php_mysqlnd_server_command command, const zend_uchar * const arg, size_t arg_len, zend_bool silent, zend_bool ignore_upsert_status);
+typedef enum_func_status (*func_mysqlnd_conn_data__connect_handshake)(MYSQLND_CONN_DATA * conn, const MYSQLND_CSTRING * const scheme, const MYSQLND_CSTRING * const username, const MYSQLND_CSTRING * const password, const MYSQLND_CSTRING * const database, const unsigned int mysql_flags);
typedef struct st_mysqlnd_authentication_plugin * (*func_mysqlnd_conn_data__fetch_auth_plugin_by_name)(const char * const requested_protocol);
-typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND_CONN_DATA * const conn, enum mysqlnd_option option, const char * const key, const char * const value);
+typedef enum_func_status (*func_mysqlnd_conn_data__set_client_option_2d)(MYSQLND_CONN_DATA * const conn, const enum_mysqlnd_client_option option, const char * const key, const char * const value);
+
+typedef size_t (*func_mysqlnd_conn_data__negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const size_t flags);
+typedef size_t (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn);
-typedef unsigned int (*func_mysqlnd_conn_data__negotiate_client_api_capabilities)(MYSQLND_CONN_DATA * const conn, const unsigned int flags);
-typedef unsigned int (*func_mysqlnd_conn_data__get_client_api_capabilities)(const MYSQLND_CONN_DATA * const conn);
+typedef MYSQLND_STRING (*func_mysqlnd_conn_data__get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_CSTRING hostname, MYSQLND_CSTRING *socket_or_pipe, unsigned int port, zend_bool * unix_socket, zend_bool * named_pipe);
-struct st_mysqlnd_conn_data_methods
+
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data)
{
- func_mysqlnd_conn_data__init init;
func_mysqlnd_conn_data__connect connect;
func_mysqlnd_conn_data__escape_string escape_string;
func_mysqlnd_conn_data__set_charset set_charset;
@@ -544,7 +516,6 @@ struct st_mysqlnd_conn_data_methods
func_mysqlnd_conn_data__get_protocol_information get_protocol_information;
func_mysqlnd_conn_data__get_last_message get_last_message;
func_mysqlnd_conn_data__charset_name charset_name;
- func_mysqlnd_conn_data__list_fields list_fields;
func_mysqlnd_conn_data__list_method list_method;
func_mysqlnd_conn_data__get_last_insert_id get_last_insert_id;
@@ -565,11 +536,6 @@ struct st_mysqlnd_conn_data_methods
func_mysqlnd_conn_data__get_reference get_reference;
func_mysqlnd_conn_data__free_reference free_reference;
- func_mysqlnd_conn_data__get_state get_state;
- func_mysqlnd_conn_data__set_state set_state;
-
- func_mysqlnd_conn_data__simple_command simple_command;
- func_mysqlnd_conn_data__simple_command_handle_response simple_command_handle_response;
func_mysqlnd_conn_data__restart_psession restart_psession;
func_mysqlnd_conn_data__end_psession end_psession;
@@ -593,22 +559,23 @@ struct st_mysqlnd_conn_data_methods
func_mysqlnd_conn_data__execute_init_commands execute_init_commands;
func_mysqlnd_conn_data__get_updated_connect_flags get_updated_connect_flags;
func_mysqlnd_conn_data__connect_handshake connect_handshake;
- func_mysqlnd_conn_data__simple_command_send_request simple_command_send_request;
func_mysqlnd_conn_data__fetch_auth_plugin_by_name fetch_auth_plugin_by_name;
func_mysqlnd_conn_data__set_client_option_2d set_client_option_2d;
func_mysqlnd_conn_data__negotiate_client_api_capabilities negotiate_client_api_capabilities;
func_mysqlnd_conn_data__get_client_api_capabilities get_client_api_capabilities;
+
+ func_mysqlnd_conn_data__get_scheme get_scheme;
};
-typedef enum_func_status (*func_mysqlnd_data__connect)(MYSQLND * conn, const char * host, const char * user, const char * passwd, unsigned int passwd_len, const char * db, unsigned int db_len, unsigned int port, const char * socket_or_pipe, unsigned int mysql_flags);
+typedef enum_func_status (*func_mysqlnd_data__connect)(MYSQLND * conn, const MYSQLND_CSTRING hostname, const MYSQLND_CSTRING username, const MYSQLND_CSTRING password, const MYSQLND_CSTRING database, unsigned int port, const MYSQLND_CSTRING socket_or_pipe, unsigned int mysql_flags);
typedef MYSQLND * (*func_mysqlnd_conn__clone_object)(MYSQLND * const conn);
typedef void (*func_mysqlnd_conn__dtor)(MYSQLND * conn);
-typedef enum_func_status (*func_mysqlnd_conn__close)(MYSQLND * conn, enum_connection_close_type close_type);
+typedef enum_func_status (*func_mysqlnd_conn__close)(MYSQLND * conn, const enum_connection_close_type close_type);
-struct st_mysqlnd_conn_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn)
{
func_mysqlnd_data__connect connect;
func_mysqlnd_conn__clone_object clone_object;
@@ -616,13 +583,14 @@ struct st_mysqlnd_conn_methods
func_mysqlnd_conn__close close;
};
+
/* for decoding - binary or text protocol */
typedef enum_func_status (*func_mysqlnd_res__row_decoder)(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval * fields,
unsigned int field_count, const MYSQLND_FIELD * fields_metadata,
zend_bool as_int_or_float, MYSQLND_STATS * stats);
-typedef MYSQLND_RES * (*func_mysqlnd_res__use_result)(MYSQLND_RES * const result, zend_bool ps_protocol);
+typedef MYSQLND_RES * (*func_mysqlnd_res__use_result)(MYSQLND_RES * const result, const zend_bool ps_protocol);
typedef MYSQLND_RES * (*func_mysqlnd_res__store_result)(MYSQLND_RES * result, MYSQLND_CONN_DATA * const conn, const unsigned int flags);
typedef void (*func_mysqlnd_res__fetch_into)(MYSQLND_RES *result, const unsigned int flags, zval *return_value, enum_mysqlnd_extension ext ZEND_FILE_LINE_DC);
typedef MYSQLND_ROW_C (*func_mysqlnd_res__fetch_row_c)(MYSQLND_RES *result);
@@ -639,11 +607,11 @@ typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_field_direct)(MYSQLND_RES
typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_fields)(MYSQLND_RES * const result);
typedef enum_func_status (*func_mysqlnd_res__read_result_metadata)(MYSQLND_RES * result, MYSQLND_CONN_DATA * conn);
-typedef zend_ulong * (*func_mysqlnd_res__fetch_lengths)(MYSQLND_RES * const result);
+typedef const size_t * (*func_mysqlnd_res__fetch_lengths)(MYSQLND_RES * const result);
typedef enum_func_status (*func_mysqlnd_res__store_result_fetch_data)(MYSQLND_CONN_DATA * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA * meta, MYSQLND_MEMORY_POOL_CHUNK *** row_buffers, zend_bool binary_protocol);
typedef void (*func_mysqlnd_res__free_result_buffers)(MYSQLND_RES * result); /* private */
-typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, zend_bool implicit);
+typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, const zend_bool implicit);
typedef void (*func_mysqlnd_res__free_result_internal)(MYSQLND_RES *result);
typedef void (*func_mysqlnd_res__free_result_contents)(MYSQLND_RES *result);
typedef void (*func_mysqlnd_res__free_buffered_data)(MYSQLND_RES *result);
@@ -652,7 +620,7 @@ typedef void (*func_mysqlnd_res__unbuffered_free_last_data)(MYSQLND_RES *resu
typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent);
-struct st_mysqlnd_res_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res)
{
mysqlnd_fetch_row_func fetch_row;
@@ -689,12 +657,12 @@ struct st_mysqlnd_res_methods
};
-typedef uint64_t (*func_mysqlnd_result_unbuffered__num_rows)(const MYSQLND_RES_UNBUFFERED * const result);
-typedef zend_ulong * (*func_mysqlnd_result_unbuffered__fetch_lengths)(MYSQLND_RES_UNBUFFERED * const result);
-typedef void (*func_mysqlnd_result_unbuffered__free_last_data)(MYSQLND_RES_UNBUFFERED * result, MYSQLND_STATS * const global_stats);
-typedef void (*func_mysqlnd_result_unbuffered__free_result)(MYSQLND_RES_UNBUFFERED * const result, MYSQLND_STATS * const global_stats);
+typedef uint64_t (*func_mysqlnd_result_unbuffered__num_rows)(const MYSQLND_RES_UNBUFFERED * const result);
+typedef const size_t * (*func_mysqlnd_result_unbuffered__fetch_lengths)(MYSQLND_RES_UNBUFFERED * const result);
+typedef void (*func_mysqlnd_result_unbuffered__free_last_data)(MYSQLND_RES_UNBUFFERED * result, MYSQLND_STATS * const global_stats);
+typedef void (*func_mysqlnd_result_unbuffered__free_result)(MYSQLND_RES_UNBUFFERED * const result, MYSQLND_STATS * const global_stats);
-struct st_mysqlnd_result_unbuffered_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered)
{
mysqlnd_fetch_row_func fetch_row;
func_mysqlnd_res__row_decoder row_decoder;
@@ -707,11 +675,11 @@ struct st_mysqlnd_result_unbuffered_methods
typedef uint64_t (*func_mysqlnd_result_buffered__num_rows)(const MYSQLND_RES_BUFFERED * const result);
typedef enum_func_status (*func_mysqlnd_result_buffered__initialize_result_set_rest)(MYSQLND_RES_BUFFERED * const result, MYSQLND_RES_METADATA * const meta,
MYSQLND_STATS * stats, zend_bool int_and_float_native);
-typedef zend_ulong * (*func_mysqlnd_result_buffered__fetch_lengths)(MYSQLND_RES_BUFFERED * const result);
+typedef const size_t * (*func_mysqlnd_result_buffered__fetch_lengths)(MYSQLND_RES_BUFFERED * const result);
typedef enum_func_status (*func_mysqlnd_result_buffered__data_seek)(MYSQLND_RES_BUFFERED * const result, const uint64_t row);
typedef void (*func_mysqlnd_result_buffered__free_result)(MYSQLND_RES_BUFFERED * const result);
-struct st_mysqlnd_result_buffered_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered)
{
mysqlnd_fetch_row_func fetch_row;
func_mysqlnd_res__row_decoder row_decoder;
@@ -729,10 +697,10 @@ typedef const MYSQLND_FIELD * (*func_mysqlnd_res_meta__fetch_fields)(MYSQLND_RES
typedef MYSQLND_FIELD_OFFSET (*func_mysqlnd_res_meta__field_tell)(const MYSQLND_RES_METADATA * const meta);
typedef MYSQLND_FIELD_OFFSET (*func_mysqlnd_res_meta__field_seek)(MYSQLND_RES_METADATA * const meta, const MYSQLND_FIELD_OFFSET field_offset);
typedef enum_func_status (*func_mysqlnd_res_meta__read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND_CONN_DATA * conn);
-typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res_meta__clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent);
+typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res_meta__clone_metadata)(const MYSQLND_RES_METADATA * const meta, const zend_bool persistent);
typedef void (*func_mysqlnd_res_meta__free_metadata)(MYSQLND_RES_METADATA * meta);
-struct st_mysqlnd_res_meta_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res_meta)
{
func_mysqlnd_res_meta__fetch_field fetch_field;
func_mysqlnd_res_meta__fetch_field_direct fetch_field_direct;
@@ -745,8 +713,8 @@ struct st_mysqlnd_res_meta_methods
};
-typedef enum_func_status (*func_mysqlnd_stmt__prepare)(MYSQLND_STMT * const stmt, const char * const query, unsigned int query_len);
-typedef enum_func_status (*func_mysqlnd_stmt__send_execute)(MYSQLND_STMT * const s, enum_mysqlnd_send_execute_type type, zval * read_cb, zval * err_cb);
+typedef enum_func_status (*func_mysqlnd_stmt__prepare)(MYSQLND_STMT * const stmt, const char * const query, const size_t query_len);
+typedef enum_func_status (*func_mysqlnd_stmt__send_execute)(MYSQLND_STMT * const s, const enum_mysqlnd_send_execute_type type, zval * read_cb, zval * err_cb);
typedef enum_func_status (*func_mysqlnd_stmt__execute)(MYSQLND_STMT * const stmt);
typedef MYSQLND_RES * (*func_mysqlnd_stmt__use_result)(MYSQLND_STMT * const stmt);
typedef MYSQLND_RES * (*func_mysqlnd_stmt__store_result)(MYSQLND_STMT * const stmt);
@@ -756,7 +724,7 @@ typedef enum_func_status (*func_mysqlnd_stmt__next_result)(MYSQLND_STMT * const
typedef enum_func_status (*func_mysqlnd_stmt__free_result)(MYSQLND_STMT * const stmt);
typedef enum_func_status (*func_mysqlnd_stmt__seek_data)(const MYSQLND_STMT * const stmt, uint64_t row);
typedef enum_func_status (*func_mysqlnd_stmt__reset)(MYSQLND_STMT * const stmt);
-typedef enum_func_status (*func_mysqlnd_stmt__net_close)(MYSQLND_STMT * const stmt, zend_bool implicit); /* private */
+typedef enum_func_status (*func_mysqlnd_stmt__close_on_server)(MYSQLND_STMT * const stmt, zend_bool implicit); /* private */
typedef enum_func_status (*func_mysqlnd_stmt__dtor)(MYSQLND_STMT * const stmt, zend_bool implicit); /* use this for mysqlnd_stmt_close */
typedef enum_func_status (*func_mysqlnd_stmt__fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything);
typedef enum_func_status (*func_mysqlnd_stmt__bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind);
@@ -789,7 +757,7 @@ typedef void (*func_mysqlnd_stmt__free_stmt_content)(MYSQLND_STMT * const s)
typedef enum_func_status (*func_mysqlnd_stmt__flush)(MYSQLND_STMT * const stmt);
typedef void (*func_mysqlnd_stmt__free_stmt_result)(MYSQLND_STMT * const s);
-struct st_mysqlnd_stmt_methods
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt)
{
func_mysqlnd_stmt__prepare prepare;
func_mysqlnd_stmt__send_execute send_execute;
@@ -802,7 +770,7 @@ struct st_mysqlnd_stmt_methods
func_mysqlnd_stmt__free_result free_result;
func_mysqlnd_stmt__seek_data seek_data;
func_mysqlnd_stmt__reset reset;
- func_mysqlnd_stmt__net_close net_close;
+ func_mysqlnd_stmt__close_on_server close_on_server;
func_mysqlnd_stmt__dtor dtor;
func_mysqlnd_stmt__fetch fetch;
@@ -849,103 +817,96 @@ struct st_mysqlnd_stmt_methods
};
-struct st_mysqlnd_net_data
+struct st_mysqlnd_vio_data
{
php_stream *stream;
- zend_bool compressed;
zend_bool ssl;
+ MYSQLND_VIO_OPTIONS options;
#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
zend_uchar last_command;
#else
zend_uchar unused_pad1;
#endif
- MYSQLND_NET_OPTIONS options;
-
- unsigned int refcount;
zend_bool persistent;
- struct st_mysqlnd_net_methods m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) m;
};
-struct st_mysqlnd_net
+struct st_mysqlnd_vio
{
- /* cmd buffer */
- MYSQLND_CMD_BUFFER cmd_buffer;
+ struct st_mysqlnd_vio_data * data;
- struct st_mysqlnd_net_data * data;
+ zend_bool persistent;
+};
-#ifdef MYSQLND_COMPRESSION_ENABLED
- MYSQLND_READ_BUFFER * uncompressed_data;
-#else
- void * unused_pad1;
-#endif
- zend_bool persistent;
- /* sequence for simple checking of correct packets */
- zend_uchar packet_no;
- zend_uchar compressed_envelope_packet_no;
+struct st_mysqlnd_protocol_command
+{
+ enum_func_status (*run)(void *cmd);
+ void (*free_command)(void * cmd);
};
+typedef struct st_mysqlnd_protocol_command * (*func_mysqlnd__command_factory)(enum php_mysqlnd_server_command command, ...);
+
+
-struct st_mysqlnd_protocol
+typedef struct st_mysqlnd_connection_state MYSQLND_CONNECTION_STATE;
+typedef enum mysqlnd_connection_state (*func_mysqlnd_connection_state__get)(const MYSQLND_CONNECTION_STATE * const state_struct);
+typedef void (*func_mysqlnd_connection_state__set)(MYSQLND_CONNECTION_STATE * const state_struct, const enum mysqlnd_connection_state state);
+
+
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_connection_state)
{
- zend_bool persistent;
- struct st_mysqlnd_protocol_methods m;
+ func_mysqlnd_connection_state__get get;
+ func_mysqlnd_connection_state__set set;
};
+struct st_mysqlnd_connection_state
+{
+ enum mysqlnd_connection_state state;
+
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_connection_state) *m;
+};
struct st_mysqlnd_connection_data
{
/* Operation related */
- MYSQLND_NET * net;
- MYSQLND_PROTOCOL * protocol;
+ MYSQLND_PFC * protocol_frame_codec;
+ MYSQLND_VIO * vio;
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory;
/* Information related */
- char *host;
- unsigned int host_len;
- char *unix_socket;
- unsigned int unix_socket_len;
- char *user;
- unsigned int user_len;
- char *passwd;
- unsigned int passwd_len;
- char *scheme;
- unsigned int scheme_len;
+ MYSQLND_STRING hostname;
+ MYSQLND_STRING unix_socket;
+ MYSQLND_STRING username;
+ MYSQLND_STRING password;
+ MYSQLND_STRING scheme;
uint64_t thread_id;
char *server_version;
char *host_info;
- zend_uchar *auth_plugin_data;
- size_t auth_plugin_data_len;
+ MYSQLND_STRING authentication_plugin_data;
const MYSQLND_CHARSET *charset;
const MYSQLND_CHARSET *greet_charset;
- char *connect_or_select_db;
- unsigned int connect_or_select_db_len;
+ MYSQLND_STRING connect_or_select_db;
MYSQLND_INFILE infile;
unsigned int protocol_version;
- zend_ulong max_packet_size;
unsigned int port;
- zend_ulong client_flag;
- zend_ulong server_capabilities;
+ zend_ulong server_capabilities;
/* For UPSERT queries */
MYSQLND_UPSERT_STATUS * upsert_status;
MYSQLND_UPSERT_STATUS upsert_status_impl;
- char *last_message;
- unsigned int last_message_len;
+ MYSQLND_STRING last_message;
/* If error packet, we use these */
MYSQLND_ERROR_INFO * error_info;
MYSQLND_ERROR_INFO error_info_impl;
- /*
- To prevent queries during unbuffered fetches. Also to
- mark the connection as destroyed for garbage collection.
- */
- enum mysqlnd_connection_state state;
- enum_mysqlnd_query_type last_query_type;
+ MYSQLND_CONNECTION_STATE state;
+ enum_mysqlnd_query_type last_query_type;
/* Temporary storage between query and (use|store)_result() call */
MYSQLND_RES *current_result;
@@ -962,20 +923,23 @@ struct st_mysqlnd_connection_data
unsigned int field_count;
/* options */
- MYSQLND_OPTIONS * options;
- MYSQLND_OPTIONS options_impl;
+ MYSQLND_SESSION_OPTIONS * options;
+ MYSQLND_SESSION_OPTIONS options_impl;
/* stats */
MYSQLND_STATS * stats;
- unsigned int client_api_capabilities;
+ size_t client_api_capabilities;
zval async_read_cb;
zval async_err_cb;
zend_bool in_async_read_cb;
zend_bool in_async_err_cb;
- struct st_mysqlnd_conn_data_methods * m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) object_factory;
+ func_mysqlnd__command_factory command_factory;
+
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * m;
/* persistent connection */
zend_bool persistent;
@@ -986,10 +950,192 @@ struct st_mysqlnd_connection
{
MYSQLND_CONN_DATA * data;
zend_bool persistent;
- struct st_mysqlnd_conn_methods * m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * m;
+};
+
+
+
+struct st_mysqlnd_packet_greet;
+struct st_mysqlnd_packet_greet;
+struct st_mysqlnd_packet_auth;
+struct st_mysqlnd_packet_ok;
+struct st_mysqlnd_packet_command;
+struct st_mysqlnd_packet_eof;
+struct st_mysqlnd_packet_rset_header;
+struct st_mysqlnd_packet_res_field;
+struct st_mysqlnd_packet_row;
+struct st_mysqlnd_packet_stats;
+struct st_mysqlnd_packet_prepare_response;
+struct st_mysqlnd_packet_chg_user_resp;
+struct st_mysqlnd_packet_auth_pam;
+struct st_mysqlnd_packet_sha256_pk_request;
+struct st_mysqlnd_packet_sha256_pk_request_response;
+
+typedef struct st_mysqlnd_packet_greet * (*func_mysqlnd_protocol_payload_decoder_factory__get_greet_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_auth * (*func_mysqlnd_protocol_payload_decoder_factory__get_auth_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_auth_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_change_auth_response * (*func_mysqlnd_protocol_payload_decoder_factory__get_change_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_ok * (*func_mysqlnd_protocol_payload_decoder_factory__get_ok_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_command * (*func_mysqlnd_protocol_payload_decoder_factory__get_command_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_eof * (*func_mysqlnd_protocol_payload_decoder_factory__get_eof_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_rset_header * (*func_mysqlnd_protocol_payload_decoder_factory__get_rset_header_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_res_field * (*func_mysqlnd_protocol_payload_decoder_factory__get_result_field_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_row * (*func_mysqlnd_protocol_payload_decoder_factory__get_row_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_stats * (*func_mysqlnd_protocol_payload_decoder_factory__get_stats_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_prepare_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_prepare_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol_payload_decoder_factory__get_change_user_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_sha256_pk_request *(*func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+typedef struct st_mysqlnd_packet_sha256_pk_request_response *(*func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent);
+
+typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory,
+ const enum php_mysqlnd_server_command command,
+ const zend_uchar * const arg, const size_t arg_len,
+ const zend_bool silent,
+
+ MYSQLND_CONNECTION_STATE * connection_state,
+ MYSQLND_ERROR_INFO * error_info,
+ MYSQLND_UPSERT_STATUS * upsert_status,
+ MYSQLND_STATS * stats,
+ func_mysqlnd_conn_data__send_close send_close,
+ void * send_close_ctx);
+
+typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_OK)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory,
+ MYSQLND_ERROR_INFO * const error_info,
+ MYSQLND_UPSERT_STATUS * const upsert_status,
+ const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */
+ MYSQLND_STRING * const last_message,
+ const zend_bool last_message_persistent);
+
+typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_EOF)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory,
+ MYSQLND_ERROR_INFO * const error_info,
+ MYSQLND_UPSERT_STATUS * const upsert_status);
+
+typedef enum_func_status (*func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory,
+ const enum mysqlnd_packet_type ok_packet,
+ const zend_bool silent,
+ const enum php_mysqlnd_server_command command,
+ const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */
+
+ MYSQLND_ERROR_INFO * error_info,
+ MYSQLND_UPSERT_STATUS * upsert_status,
+ MYSQLND_STRING * last_message,
+ zend_bool last_message_persistent);
+
+
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory)
+{
+ func_mysqlnd_protocol_payload_decoder_factory__get_greet_packet get_greet_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_auth_packet get_auth_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_auth_response_packet get_auth_response_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_change_auth_response_packet get_change_auth_response_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_ok_packet get_ok_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_command_packet get_command_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_eof_packet get_eof_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_rset_header_packet get_rset_header_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_result_field_packet get_result_field_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_row_packet get_row_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_stats_packet get_stats_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_prepare_response_packet get_prepare_response_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_change_user_response_packet get_change_user_response_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_packet get_sha256_pk_request_packet;
+ func_mysqlnd_protocol_payload_decoder_factory__get_sha256_pk_request_response_packet get_sha256_pk_request_response_packet;
+
+ func_mysqlnd_protocol_payload_decoder_factory__send_command send_command;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_response send_command_handle_response;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_OK send_command_handle_OK;
+ func_mysqlnd_protocol_payload_decoder_factory__send_command_handle_EOF send_command_handle_EOF;
+};
+
+struct st_mysqlnd_protocol_payload_decoder_factory
+{
+ MYSQLND_CONN_DATA * conn;
+ zend_bool persistent;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) m;
+};
+
+
+typedef struct st_mysqlnd_read_buffer {
+ zend_uchar * data;
+ size_t offset;
+ size_t size;
+ size_t len;
+ zend_bool (*is_empty)(const struct st_mysqlnd_read_buffer *);
+ void (*read)(struct st_mysqlnd_read_buffer *, size_t count, zend_uchar * dest);
+ size_t (*bytes_left)(const struct st_mysqlnd_read_buffer *);
+ void (*free_buffer)(struct st_mysqlnd_read_buffer **);
+} MYSQLND_READ_BUFFER;
+
+
+
+typedef enum_func_status (*func_mysqlnd_pfc__init)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info);
+typedef void (*func_mysqlnd_pfc__dtor)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef enum_func_status (*func_mysqlnd_pfc__reset)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef enum_func_status (*func_mysqlnd_pfc__set_client_option)(MYSQLND_PFC * const pfc, enum_mysqlnd_client_option option, const char * const value);
+typedef enum_func_status (*func_mysqlnd_pfc__decode)(zend_uchar * uncompressed_data, const size_t uncompressed_data_len, const zend_uchar * const compressed_data, const size_t compressed_data_len);
+typedef enum_func_status (*func_mysqlnd_pfc__encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len, const zend_uchar * const uncompressed_data, const size_t uncompressed_data_len);
+typedef size_t (*func_mysqlnd_pfc__send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef enum_func_status (*func_mysqlnd_pfc__receive)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info);
+typedef enum_func_status (*func_mysqlnd_pfc__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_PFC * pfc, MYSQLND_VIO * const vio, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info);
+typedef void (*func_mysqlnd_pfc__free_contents)(MYSQLND_PFC * pfc);
+
+MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec)
+{
+ func_mysqlnd_pfc__init init;
+ func_mysqlnd_pfc__dtor dtor;
+ func_mysqlnd_pfc__reset reset;
+ func_mysqlnd_pfc__set_client_option set_client_option;
+
+ func_mysqlnd_pfc__decode decode;
+ func_mysqlnd_pfc__encode encode;
+
+ func_mysqlnd_pfc__send send;
+ func_mysqlnd_pfc__receive receive;
+
+ func_mysqlnd_pfc__read_compressed_packet_from_stream_and_fill_read_buffer read_compressed_packet_from_stream_and_fill_read_buffer;
+
+ func_mysqlnd_pfc__free_contents free_contents;
};
+struct st_mysqlnd_protocol_frame_codec_data
+{
+ php_stream *stream;
+ zend_bool compressed;
+ zend_bool ssl;
+ uint64_t flags;
+ char * sha256_server_public_key;
+
+#ifdef MYSQLND_COMPRESSION_ENABLED
+ MYSQLND_READ_BUFFER * uncompressed_data;
+#else
+ void * unused_pad1;
+#endif
+
+ /* sequence for simple checking of correct packets */
+ zend_uchar packet_no;
+ zend_uchar compressed_envelope_packet_no;
+
+ zend_bool persistent;
+
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) m;
+};
+
+
+struct st_mysqlnd_protocol_frame_codec
+{
+ MYSQLND_CMD_BUFFER cmd_buffer;
+
+ struct st_mysqlnd_protocol_frame_codec_data * data;
+
+ zend_bool persistent;
+};
+
+
+
struct mysqlnd_field_hash_key
{
zend_bool is_numeric;
@@ -1002,7 +1148,7 @@ struct st_mysqlnd_result_metadata
MYSQLND_FIELD *fields;
struct mysqlnd_field_hash_key *zend_hash_keys;
- struct st_mysqlnd_res_meta_methods * m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res_meta) * m;
size_t bit_fields_total_len; /* trailing \0 not counted */
/* We need this to make fast allocs in rowp_read */
@@ -1021,7 +1167,7 @@ struct st_mysqlnd_result_metadata
uint64_t initialized_rows; \
\
/* Column lengths of current row - both buffered and unbuffered. For buffered results it duplicates the data found in **data */ \
- zend_ulong *lengths; \
+ size_t *lengths; \
\
MYSQLND_MEMORY_POOL *result_set_memory_pool; \
\
@@ -1032,7 +1178,7 @@ struct st_mysqlnd_result_metadata
unsigned int field_count; \
zend_bool ps; \
zend_bool persistent; \
- struct st_mysqlnd_result_buffered_methods m; \
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) m; \
enum mysqlnd_buffered_type type; \
void * unused1; \
void * unused2; \
@@ -1065,7 +1211,7 @@ struct st_mysqlnd_buffered_result_c
struct st_mysqlnd_unbuffered_result
{
- struct st_mysqlnd_result_unbuffered_methods m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) m;
uint64_t row_count;
/* For unbuffered (both normal and PS) */
@@ -1076,7 +1222,7 @@ struct st_mysqlnd_unbuffered_result
Column lengths of current row - both buffered and unbuffered.
For buffered results it duplicates the data found in **data
*/
- zend_ulong *lengths;
+ size_t *lengths;
MYSQLND_MEMORY_POOL *result_set_memory_pool;
@@ -1106,8 +1252,7 @@ struct st_mysqlnd_res
MYSQLND_RES_UNBUFFERED *unbuf;
zend_bool persistent;
-
- struct st_mysqlnd_res_methods m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) m;
};
@@ -1131,7 +1276,6 @@ struct st_mysqlnd_stmt_data
zend_ulong stmt_id;
zend_ulong flags;/* cursor is set here */
enum_mysqlnd_stmt_state state;
- unsigned int warning_count;
MYSQLND_RES *result;
unsigned int field_count;
unsigned int param_count;
@@ -1166,18 +1310,11 @@ struct st_mysqlnd_stmt_data
struct st_mysqlnd_stmt
{
MYSQLND_STMT_DATA * data;
- struct st_mysqlnd_stmt_methods *m;
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * m;
zend_bool persistent;
};
-typedef struct st_mysqlnd_string
-{
- char *s;
- size_t l;
-} MYSQLND_STRING;
-
-
struct st_mysqlnd_plugin_header
{
unsigned int plugin_api_version;
@@ -1218,8 +1355,8 @@ typedef zend_uchar * (*func_auth_plugin__get_auth_data)(struct st_mysqlnd_authen
size_t * auth_data_len,
MYSQLND_CONN_DATA * conn, const char * const user, const char * const passwd,
const size_t passwd_len, zend_uchar * auth_plugin_data, size_t auth_plugin_data_len,
- const MYSQLND_OPTIONS * const options,
- const MYSQLND_NET_OPTIONS * const net_options, zend_ulong mysql_flags
+ const MYSQLND_SESSION_OPTIONS * const session_options,
+ const MYSQLND_PFC_DATA * const pfc_data, zend_ulong mysql_flags
);
struct st_mysqlnd_authentication_plugin
@@ -1230,5 +1367,4 @@ struct st_mysqlnd_authentication_plugin
} methods;
};
-
#endif /* MYSQLND_STRUCTS_H */
diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c
new file mode 100644
index 0000000000..6bff5ae4c6
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_vio.c
@@ -0,0 +1,805 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "mysqlnd.h"
+#include "mysqlnd_priv.h"
+#include "mysqlnd_statistics.h"
+#include "mysqlnd_debug.h"
+#include "mysqlnd_ext_plugin.h"
+#include "php_network.h"
+
+#ifndef PHP_WIN32
+#include <netinet/tcp.h>
+#else
+#include <winsock.h>
+#endif
+
+
+/* {{{ mysqlnd_set_sock_no_delay */
+static int
+mysqlnd_set_sock_no_delay(php_stream * stream)
+{
+ int socketd = ((php_netstream_data_t*)stream->abstract)->socket;
+ int ret = SUCCESS;
+ int flag = 1;
+ int result = setsockopt(socketd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
+
+ DBG_ENTER("mysqlnd_set_sock_no_delay");
+
+ if (result == -1) {
+ ret = FAILURE;
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_set_sock_keepalive */
+static int
+mysqlnd_set_sock_keepalive(php_stream * stream)
+{
+ int socketd = ((php_netstream_data_t*)stream->abstract)->socket;
+ int ret = SUCCESS;
+ int flag = 1;
+ int result = setsockopt(socketd, SOL_SOCKET, SO_KEEPALIVE, (char *) &flag, sizeof(int));
+
+ DBG_ENTER("mysqlnd_set_sock_keepalive");
+
+ if (result == -1) {
+ ret = FAILURE;
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::network_read */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, network_read)(MYSQLND_VIO * const vio, zend_uchar * const buffer, const size_t count,
+ MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ enum_func_status return_value = PASS;
+ php_stream * net_stream = vio->data->m.get_stream(vio);
+ size_t old_chunk_size = net_stream->chunk_size;
+ size_t to_read = count, ret;
+ zend_uchar * p = buffer;
+
+ DBG_ENTER("mysqlnd_vio::network_read");
+ DBG_INF_FMT("count="MYSQLND_SZ_T_SPEC, count);
+
+ net_stream->chunk_size = MIN(to_read, vio->data->options.net_read_buffer_size);
+ while (to_read) {
+ if (!(ret = php_stream_read(net_stream, (char *) p, to_read))) {
+ DBG_ERR_FMT("Error while reading header from socket");
+ return_value = FAIL;
+ break;
+ }
+ p += ret;
+ to_read -= ret;
+ }
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE(stats, STAT_BYTES_RECEIVED, count - to_read);
+ net_stream->chunk_size = old_chunk_size;
+ DBG_RETURN(return_value);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::network_write */
+static size_t
+MYSQLND_METHOD(mysqlnd_vio, network_write)(MYSQLND_VIO * const vio, const zend_uchar * const buffer, const size_t count,
+ MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ size_t ret;
+ DBG_ENTER("mysqlnd_vio::network_write");
+ DBG_INF_FMT("sending %u bytes", count);
+ ret = php_stream_write(vio->data->m.get_stream(vio), (char *)buffer, count);
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::open_pipe */
+static php_stream *
+MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent,
+ MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ unsigned int streams_options = 0;
+ dtor_func_t origin_dtor;
+ php_stream * net_stream = NULL;
+
+ DBG_ENTER("mysqlnd_vio::open_pipe");
+ if (persistent) {
+ streams_options |= STREAM_OPEN_PERSISTENT;
+ }
+ streams_options |= IGNORE_URL;
+ net_stream = php_stream_open_wrapper(scheme.s + sizeof("pipe://") - 1, "r+", streams_options, NULL);
+ if (!net_stream) {
+ SET_CLIENT_ERROR(error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "Unknown errror while connecting");
+ DBG_RETURN(NULL);
+ }
+ /*
+ Streams are not meant for C extensions! Thus we need a hack. Every connected stream will
+ be registered as resource (in EG(regular_list). So far, so good. However, it won't be
+ unregistered until the script ends. So, we need to take care of that.
+ */
+ origin_dtor = EG(regular_list).pDestructor;
+ EG(regular_list).pDestructor = NULL;
+ zend_hash_index_del(&EG(regular_list), net_stream->res->handle); /* ToDO: should it be res->handle, do streams register with addref ?*/
+ EG(regular_list).pDestructor = origin_dtor;
+ net_stream->res = NULL;
+
+ DBG_RETURN(net_stream);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::open_tcp_or_unix */
+static php_stream *
+MYSQLND_METHOD(mysqlnd_vio, open_tcp_or_unix)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent,
+ MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ unsigned int streams_options = 0;
+ unsigned int streams_flags = STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT;
+ char * hashed_details = NULL;
+ int hashed_details_len = 0;
+ zend_string *errstr = NULL;
+ int errcode = 0;
+ struct timeval tv;
+ dtor_func_t origin_dtor;
+ php_stream * net_stream = NULL;
+
+ DBG_ENTER("mysqlnd_vio::open_tcp_or_unix");
+
+ vio->data->stream = NULL;
+
+ if (persistent) {
+ hashed_details_len = mnd_sprintf(&hashed_details, 0, "%p", vio);
+ DBG_INF_FMT("hashed_details=%s", hashed_details);
+ }
+
+ if (vio->data->options.timeout_connect) {
+ tv.tv_sec = vio->data->options.timeout_connect;
+ tv.tv_usec = 0;
+ }
+
+ DBG_INF_FMT("calling php_stream_xport_create");
+ net_stream = php_stream_xport_create(scheme.s, scheme.l, streams_options, streams_flags,
+ hashed_details, (vio->data->options.timeout_connect) ? &tv : NULL,
+ NULL /*ctx*/, &errstr, &errcode);
+ if (errstr || !net_stream) {
+ DBG_ERR("Error");
+ if (hashed_details) {
+ mnd_sprintf_free(hashed_details);
+ }
+ errcode = CR_CONNECTION_ERROR;
+ SET_CLIENT_ERROR(error_info,
+ CR_CONNECTION_ERROR,
+ UNKNOWN_SQLSTATE,
+ errstr? ZSTR_VAL(errstr):"Unknown error while connecting");
+ if (errstr) {
+ zend_string_release(errstr);
+ }
+ DBG_RETURN(NULL);
+ }
+ if (hashed_details) {
+ /*
+ If persistent, the streams register it in EG(persistent_list).
+ This is unwanted. ext/mysql or ext/mysqli are responsible to clean,
+ whatever they have to.
+ */
+ zend_resource *le;
+
+ if ((le = zend_hash_str_find_ptr(&EG(persistent_list), hashed_details, hashed_details_len))) {
+ origin_dtor = EG(persistent_list).pDestructor;
+ /*
+ in_free will let streams code skip destructing - big HACK,
+ but STREAMS suck big time regarding persistent streams.
+ Just not compatible for extensions that need persistency.
+ */
+ EG(persistent_list).pDestructor = NULL;
+ zend_hash_str_del(&EG(persistent_list), hashed_details, hashed_details_len);
+ EG(persistent_list).pDestructor = origin_dtor;
+ pefree(le, 1);
+ }
+#if ZEND_DEBUG
+ /* Shut-up the streams, they don't know what they are doing */
+ net_stream->__exposed = 1;
+#endif
+ mnd_sprintf_free(hashed_details);
+ }
+
+ /*
+ Streams are not meant for C extensions! Thus we need a hack. Every connected stream will
+ be registered as resource (in EG(regular_list). So far, so good. However, it won't be
+ unregistered until the script ends. So, we need to take care of that.
+ */
+ origin_dtor = EG(regular_list).pDestructor;
+ EG(regular_list).pDestructor = NULL;
+ zend_hash_index_del(&EG(regular_list), net_stream->res->handle); /* ToDO: should it be res->handle, do streams register with addref ?*/
+ efree(net_stream->res);
+ net_stream->res = NULL;
+ EG(regular_list).pDestructor = origin_dtor;
+ DBG_RETURN(net_stream);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::post_connect_set_opt */
+static void
+MYSQLND_METHOD(mysqlnd_vio, post_connect_set_opt)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme,
+ MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ php_stream * net_stream = vio->data->m.get_stream(vio);
+ DBG_ENTER("mysqlnd_vio::post_connect_set_opt");
+ if (net_stream) {
+ if (vio->data->options.timeout_read) {
+ struct timeval tv;
+ DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", vio->data->options.timeout_read);
+ tv.tv_sec = vio->data->options.timeout_read;
+ tv.tv_usec = 0;
+ php_stream_set_option(net_stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv);
+ }
+
+ if (!memcmp(scheme.s, "tcp://", sizeof("tcp://") - 1)) {
+ /* TCP -> Set TCP_NODELAY */
+ mysqlnd_set_sock_no_delay(net_stream);
+ /* TCP -> Set SO_KEEPALIVE */
+ mysqlnd_set_sock_keepalive(net_stream);
+ }
+ }
+
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::get_open_stream */
+static func_mysqlnd_vio__open_stream
+MYSQLND_METHOD(mysqlnd_vio, get_open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme,
+ MYSQLND_ERROR_INFO * const error_info)
+{
+ func_mysqlnd_vio__open_stream ret = NULL;
+ DBG_ENTER("mysqlnd_vio::get_open_stream");
+ if (scheme.l > (sizeof("pipe://") - 1) && !memcmp(scheme.s, "pipe://", sizeof("pipe://") - 1)) {
+ ret = vio->data->m.open_pipe;
+ } else if ((scheme.l > (sizeof("tcp://") - 1) && !memcmp(scheme.s, "tcp://", sizeof("tcp://") - 1))
+ ||
+ (scheme.l > (sizeof("unix://") - 1) && !memcmp(scheme.s, "unix://", sizeof("unix://") - 1)))
+ {
+ ret = vio->data->m.open_tcp_or_unix;
+ }
+
+ if (!ret) {
+ SET_CLIENT_ERROR(error_info, CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, "No handler for this scheme");
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::connect */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, connect)(MYSQLND_VIO * const vio, const MYSQLND_CSTRING scheme, const zend_bool persistent,
+ MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ enum_func_status ret = FAIL;
+ func_mysqlnd_vio__open_stream open_stream = NULL;
+ DBG_ENTER("mysqlnd_vio::connect");
+
+ vio->data->m.close_stream(vio, conn_stats, error_info);
+
+ open_stream = vio->data->m.get_open_stream(vio, scheme, error_info);
+ if (open_stream) {
+ php_stream * net_stream = open_stream(vio, scheme, persistent, conn_stats, error_info);
+ if (net_stream && PASS == vio->data->m.set_stream(vio, net_stream)) {
+ vio->data->m.post_connect_set_opt(vio, scheme, conn_stats, error_info);
+ ret = PASS;
+ }
+ }
+
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::set_client_option */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mysqlnd_client_option option, const char * const value)
+{
+ DBG_ENTER("mysqlnd_vio::set_client_option");
+ DBG_INF_FMT("option=%u", option);
+ switch (option) {
+ case MYSQLND_OPT_NET_READ_BUFFER_SIZE:
+ DBG_INF("MYSQLND_OPT_NET_READ_BUFFER_SIZE");
+ net->data->options.net_read_buffer_size = *(unsigned int*) value;
+ DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->data->options.net_read_buffer_size);
+ break;
+ case MYSQL_OPT_CONNECT_TIMEOUT:
+ DBG_INF("MYSQL_OPT_CONNECT_TIMEOUT");
+ net->data->options.timeout_connect = *(unsigned int*) value;
+ break;
+ case MYSQLND_OPT_SSL_KEY:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.ssl_key) {
+ mnd_pefree(net->data->options.ssl_key, pers);
+ }
+ net->data->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
+ case MYSQLND_OPT_SSL_CERT:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.ssl_cert) {
+ mnd_pefree(net->data->options.ssl_cert, pers);
+ }
+ net->data->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
+ case MYSQLND_OPT_SSL_CA:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.ssl_ca) {
+ mnd_pefree(net->data->options.ssl_ca, pers);
+ }
+ net->data->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
+ case MYSQLND_OPT_SSL_CAPATH:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.ssl_capath) {
+ mnd_pefree(net->data->options.ssl_capath, pers);
+ }
+ net->data->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
+ case MYSQLND_OPT_SSL_CIPHER:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.ssl_cipher) {
+ mnd_pefree(net->data->options.ssl_cipher, pers);
+ }
+ net->data->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
+ case MYSQLND_OPT_SSL_PASSPHRASE:
+ {
+ zend_bool pers = net->persistent;
+ if (net->data->options.ssl_passphrase) {
+ mnd_pefree(net->data->options.ssl_passphrase, pers);
+ }
+ net->data->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL;
+ break;
+ }
+ case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
+ {
+ enum mysqlnd_ssl_peer val = *((enum mysqlnd_ssl_peer *)value);
+ switch (val) {
+ case MYSQLND_SSL_PEER_VERIFY:
+ DBG_INF("MYSQLND_SSL_PEER_VERIFY");
+ break;
+ case MYSQLND_SSL_PEER_DONT_VERIFY:
+ DBG_INF("MYSQLND_SSL_PEER_DONT_VERIFY");
+ break;
+ case MYSQLND_SSL_PEER_DEFAULT:
+ DBG_INF("MYSQLND_SSL_PEER_DEFAULT");
+ val = MYSQLND_SSL_PEER_DEFAULT;
+ break;
+ default:
+ DBG_INF("default = MYSQLND_SSL_PEER_DEFAULT_ACTION");
+ val = MYSQLND_SSL_PEER_DEFAULT;
+ break;
+ }
+ net->data->options.ssl_verify_peer = val;
+ break;
+ }
+ case MYSQL_OPT_READ_TIMEOUT:
+ net->data->options.timeout_read = *(unsigned int*) value;
+ break;
+#ifdef WHEN_SUPPORTED_BY_MYSQLI
+ case MYSQL_OPT_WRITE_TIMEOUT:
+ net->data->options.timeout_write = *(unsigned int*) value;
+ break;
+#endif
+ default:
+ DBG_RETURN(FAIL);
+ }
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::consume_uneaten_data */
+size_t
+MYSQLND_METHOD(mysqlnd_vio, consume_uneaten_data)(MYSQLND_VIO * const net, enum php_mysqlnd_server_command cmd)
+{
+#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
+ /*
+ Switch to non-blocking mode and try to consume something from
+ the line, if possible, then continue. This saves us from looking for
+ the actual place where out-of-order packets have been sent.
+ If someone is completely sure that everything is fine, he can switch it
+ off.
+ */
+ char tmp_buf[256];
+ size_t skipped_bytes = 0;
+ int opt = PHP_STREAM_OPTION_BLOCKING;
+ php_stream * net_stream = net->data->get_stream(net);
+ int was_blocked = net_stream->ops->set_option(net_stream, opt, 0, NULL);
+
+ DBG_ENTER("mysqlnd_vio::consume_uneaten_data");
+
+ if (PHP_STREAM_OPTION_RETURN_ERR != was_blocked) {
+ /* Do a read of 1 byte */
+ int bytes_consumed;
+
+ do {
+ skipped_bytes += (bytes_consumed = php_stream_read(net_stream, tmp_buf, sizeof(tmp_buf)));
+ } while (bytes_consumed == sizeof(tmp_buf));
+
+ if (was_blocked) {
+ net_stream->ops->set_option(net_stream, opt, 1, NULL);
+ }
+
+ if (bytes_consumed) {
+ DBG_ERR_FMT("Skipped %u bytes. Last command hasn't consumed all the output from the server",
+ bytes_consumed, mysqlnd_command_to_text[net->last_command]);
+ php_error_docref(NULL, E_WARNING, "Skipped %u bytes. Last command %s hasn't "
+ "consumed all the output from the server",
+ bytes_consumed, mysqlnd_command_to_text[net->last_command]);
+ }
+ }
+ net->last_command = cmd;
+
+ DBG_RETURN(skipped_bytes);
+#else
+ return 0;
+#endif
+}
+/* }}} */
+
+/*
+ in libmyusql, if cert and !key then key=cert
+*/
+/* {{{ mysqlnd_vio::enable_ssl */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
+{
+#ifdef MYSQLND_SSL_SUPPORTED
+ php_stream_context * context = php_stream_context_alloc();
+ php_stream * net_stream = net->data->m.get_stream(net);
+ zend_bool any_flag = FALSE;
+
+ DBG_ENTER("mysqlnd_vio::enable_ssl");
+ if (!context) {
+ DBG_RETURN(FAIL);
+ }
+
+ if (net->data->options.ssl_key) {
+ zval key_zval;
+ ZVAL_STRING(&key_zval, net->data->options.ssl_key);
+ php_stream_context_set_option(context, "ssl", "local_pk", &key_zval);
+ zval_ptr_dtor(&key_zval);
+ any_flag = TRUE;
+ }
+ if (net->data->options.ssl_cert) {
+ zval cert_zval;
+ ZVAL_STRING(&cert_zval, net->data->options.ssl_cert);
+ php_stream_context_set_option(context, "ssl", "local_cert", &cert_zval);
+ if (!net->data->options.ssl_key) {
+ php_stream_context_set_option(context, "ssl", "local_pk", &cert_zval);
+ }
+ zval_ptr_dtor(&cert_zval);
+ any_flag = TRUE;
+ }
+ if (net->data->options.ssl_ca) {
+ zval cafile_zval;
+ ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca);
+ php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval);
+ any_flag = TRUE;
+ }
+ if (net->data->options.ssl_capath) {
+ zval capath_zval;
+ ZVAL_STRING(&capath_zval, net->data->options.ssl_capath);
+ php_stream_context_set_option(context, "ssl", "capath", &capath_zval);
+ zval_ptr_dtor(&capath_zval);
+ any_flag = TRUE;
+ }
+ if (net->data->options.ssl_passphrase) {
+ zval passphrase_zval;
+ ZVAL_STRING(&passphrase_zval, net->data->options.ssl_passphrase);
+ php_stream_context_set_option(context, "ssl", "passphrase", &passphrase_zval);
+ zval_ptr_dtor(&passphrase_zval);
+ any_flag = TRUE;
+ }
+ if (net->data->options.ssl_cipher) {
+ zval cipher_zval;
+ ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher);
+ php_stream_context_set_option(context, "ssl", "ciphers", &cipher_zval);
+ zval_ptr_dtor(&cipher_zval);
+ any_flag = TRUE;
+ }
+ {
+ zval verify_peer_zval;
+ zend_bool verify;
+
+ if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) {
+ net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DONT_VERIFY;
+ }
+
+ verify = net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_VERIFY? TRUE:FALSE;
+
+ DBG_INF_FMT("VERIFY=%d", verify);
+ ZVAL_BOOL(&verify_peer_zval, verify);
+ php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval);
+ php_stream_context_set_option(context, "ssl", "verify_peer_name", &verify_peer_zval);
+ if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) {
+ ZVAL_TRUE(&verify_peer_zval);
+ php_stream_context_set_option(context, "ssl", "allow_self_signed", &verify_peer_zval);
+ }
+ }
+ php_stream_context_set(net_stream, context);
+ if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL) < 0 ||
+ php_stream_xport_crypto_enable(net_stream, 1) < 0)
+ {
+ DBG_ERR("Cannot connect to MySQL by using SSL");
+ php_error_docref(NULL, E_WARNING, "Cannot connect to MySQL by using SSL");
+ DBG_RETURN(FAIL);
+ }
+ net->data->ssl = TRUE;
+ /*
+ get rid of the context. we are persistent and if this is a real pconn used by mysql/mysqli,
+ then the context would not survive cleaning of EG(regular_list), where it is registered, as a
+ resource. What happens is that after this destruction any use of the network will mean usage
+ of the context, which means usage of already freed memory, bad. Actually we don't need this
+ context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it.
+ */
+ php_stream_context_set(net_stream, NULL);
+
+ if (net->data->options.timeout_read) {
+ struct timeval tv;
+ DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->data->options.timeout_read);
+ tv.tv_sec = net->data->options.timeout_read;
+ tv.tv_usec = 0;
+ php_stream_set_option(net_stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv);
+ }
+
+ DBG_RETURN(PASS);
+#else
+ DBG_ENTER("mysqlnd_vio::enable_ssl");
+ DBG_INF("MYSQLND_SSL_SUPPORTED is not defined");
+ DBG_RETURN(PASS);
+#endif
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::disable_ssl */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, disable_ssl)(MYSQLND_VIO * const vio)
+{
+ DBG_ENTER("mysqlnd_vio::disable_ssl");
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::free_contents */
+static void
+MYSQLND_METHOD(mysqlnd_vio, free_contents)(MYSQLND_VIO * net)
+{
+ zend_bool pers = net->persistent;
+ DBG_ENTER("mysqlnd_vio::free_contents");
+
+ if (net->data->options.ssl_key) {
+ mnd_pefree(net->data->options.ssl_key, pers);
+ net->data->options.ssl_key = NULL;
+ }
+ if (net->data->options.ssl_cert) {
+ mnd_pefree(net->data->options.ssl_cert, pers);
+ net->data->options.ssl_cert = NULL;
+ }
+ if (net->data->options.ssl_ca) {
+ mnd_pefree(net->data->options.ssl_ca, pers);
+ net->data->options.ssl_ca = NULL;
+ }
+ if (net->data->options.ssl_capath) {
+ mnd_pefree(net->data->options.ssl_capath, pers);
+ net->data->options.ssl_capath = NULL;
+ }
+ if (net->data->options.ssl_cipher) {
+ mnd_pefree(net->data->options.ssl_cipher, pers);
+ net->data->options.ssl_cipher = NULL;
+ }
+
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::close_stream */
+static void
+MYSQLND_METHOD(mysqlnd_vio, close_stream)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ php_stream * net_stream;
+ DBG_ENTER("mysqlnd_vio::close_stream");
+ if (net && (net_stream = net->data->m.get_stream(net))) {
+ zend_bool pers = net->persistent;
+ DBG_INF_FMT("Freeing stream. abstract=%p", net_stream->abstract);
+ if (pers) {
+ if (EG(active)) {
+ php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE_PERSISTENT | PHP_STREAM_FREE_RSRC_DTOR);
+ } else {
+ /*
+ otherwise we will crash because the EG(persistent_list) has been freed already,
+ before the modules are shut down
+ */
+ php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_RSRC_DTOR);
+ }
+ } else {
+ php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE);
+ }
+ net->data->m.set_stream(net, NULL);
+ }
+
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::init */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, init)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ unsigned int buf_size;
+ DBG_ENTER("mysqlnd_vio::init");
+
+ buf_size = MYSQLND_G(net_read_buffer_size); /* this is long, cast to unsigned int*/
+ net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size);
+
+ buf_size = MYSQLND_G(net_read_timeout); /* this is long, cast to unsigned int*/
+ net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size);
+
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::dtor */
+static void
+MYSQLND_METHOD(mysqlnd_vio, dtor)(MYSQLND_VIO * const vio, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
+{
+ DBG_ENTER("mysqlnd_vio::dtor");
+ if (vio) {
+ vio->data->m.free_contents(vio);
+ vio->data->m.close_stream(vio, stats, error_info);
+
+ mnd_pefree(vio->data, vio->data->persistent);
+ mnd_pefree(vio, vio->persistent);
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::get_stream */
+static php_stream *
+MYSQLND_METHOD(mysqlnd_vio, get_stream)(const MYSQLND_VIO * const net)
+{
+ DBG_ENTER("mysqlnd_vio::get_stream");
+ DBG_INF_FMT("%p", net? net->data->stream:NULL);
+ DBG_RETURN(net? net->data->stream:NULL);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::set_stream */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_vio, set_stream)(MYSQLND_VIO * const vio, php_stream * net_stream)
+{
+ DBG_ENTER("mysqlnd_vio::set_stream");
+ if (vio) {
+ vio->data->stream = net_stream;
+ DBG_RETURN(PASS);
+ }
+ DBG_RETURN(FAIL);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio::has_valid_stream */
+static zend_bool
+MYSQLND_METHOD(mysqlnd_vio, has_valid_stream)(const MYSQLND_VIO * const vio)
+{
+ DBG_ENTER("mysqlnd_vio::has_valid_stream");
+ DBG_INF_FMT("%p %p", vio, vio? vio->data->stream:NULL);
+ DBG_RETURN((vio && vio->data->stream)? TRUE: FALSE);
+}
+/* }}} */
+
+
+MYSQLND_CLASS_METHODS_START(mysqlnd_vio)
+ MYSQLND_METHOD(mysqlnd_vio, init),
+ MYSQLND_METHOD(mysqlnd_vio, dtor),
+
+ MYSQLND_METHOD(mysqlnd_vio, connect),
+
+ MYSQLND_METHOD(mysqlnd_vio, close_stream),
+ MYSQLND_METHOD(mysqlnd_vio, open_pipe),
+ MYSQLND_METHOD(mysqlnd_vio, open_tcp_or_unix),
+
+ MYSQLND_METHOD(mysqlnd_vio, get_stream),
+ MYSQLND_METHOD(mysqlnd_vio, set_stream),
+ MYSQLND_METHOD(mysqlnd_vio, has_valid_stream),
+ MYSQLND_METHOD(mysqlnd_vio, get_open_stream),
+
+ MYSQLND_METHOD(mysqlnd_vio, set_client_option),
+ MYSQLND_METHOD(mysqlnd_vio, post_connect_set_opt),
+
+ MYSQLND_METHOD(mysqlnd_vio, enable_ssl),
+ MYSQLND_METHOD(mysqlnd_vio, disable_ssl),
+
+ MYSQLND_METHOD(mysqlnd_vio, network_read),
+ MYSQLND_METHOD(mysqlnd_vio, network_write),
+
+ MYSQLND_METHOD(mysqlnd_vio, consume_uneaten_data),
+
+ MYSQLND_METHOD(mysqlnd_vio, free_contents),
+MYSQLND_CLASS_METHODS_END;
+
+
+/* {{{ mysqlnd_vio_init */
+PHPAPI MYSQLND_VIO *
+mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
+{
+ MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *factory = object_factory? object_factory : &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
+ MYSQLND_VIO * vio;
+ DBG_ENTER("mysqlnd_vio_init");
+ vio = factory->get_vio(persistent, stats, error_info);
+ DBG_RETURN(vio);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_vio_free */
+PHPAPI void
+mysqlnd_vio_free(MYSQLND_VIO * const vio, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info)
+{
+ DBG_ENTER("mysqlnd_vio_free");
+ if (vio) {
+ vio->data->m.dtor(vio, stats, error_info);
+ }
+ DBG_VOID_RETURN;
+}
+/* }}} */
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_vio.h b/ext/mysqlnd/mysqlnd_vio.h
new file mode 100644
index 0000000000..bb773516b8
--- /dev/null
+++ b/ext/mysqlnd/mysqlnd_vio.h
@@ -0,0 +1,35 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2006-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef MYSQLND_VIO_H
+#define MYSQLND_VIO_H
+
+PHPAPI MYSQLND_VIO * mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *object_factory, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
+PHPAPI void mysqlnd_vio_free(MYSQLND_VIO * const vio, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info);
+
+#endif /* MYSQLND_VIO_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index 70e0cf3d55..825c56feae 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,54 +12,19 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
-#include "php_globals.h"
#include "mysqlnd.h"
+#include "mysqlnd_connection.h"
+#include "mysqlnd_ps.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_wireprotocol.h"
#include "mysqlnd_statistics.h"
#include "mysqlnd_debug.h"
-#include "zend_ini.h"
-
-#define MYSQLND_SILENT 1
-
-#define MYSQLND_DUMP_HEADER_N_BODY
-
-#define PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_size, packet_type_as_text, packet_type) \
- { \
- DBG_INF_FMT("buf=%p size=%u", (buf), (buf_size)); \
- if (FAIL == mysqlnd_read_header((conn)->net, &((packet)->header), (conn)->stats, ((conn)->error_info))) {\
- CONN_SET_STATE(conn, CONN_QUIT_SENT); \
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);\
- php_error_docref(NULL, E_WARNING, "%s", mysqlnd_server_gone); \
- DBG_ERR_FMT("Can't read %s's header", (packet_type_as_text)); \
- DBG_RETURN(FAIL);\
- }\
- if ((buf_size) < (packet)->header.size) { \
- DBG_ERR_FMT("Packet buffer %u wasn't big enough %u, %u bytes will be unread", \
- (buf_size), (packet)->header.size, (packet)->header.size - (buf_size)); \
- DBG_RETURN(FAIL); \
- }\
- if (FAIL == conn->net->data->m.receive_ex((conn)->net, (buf), (packet)->header.size, (conn)->stats, ((conn)->error_info))) { \
- CONN_SET_STATE(conn, CONN_QUIT_SENT); \
- SET_CLIENT_ERROR(*conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);\
- php_error_docref(NULL, E_WARNING, "%s", mysqlnd_server_gone); \
- DBG_ERR_FMT("Empty '%s' packet body", (packet_type_as_text)); \
- DBG_RETURN(FAIL);\
- } \
- MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, packet_type_to_statistic_byte_count[packet_type], \
- MYSQLND_HEADER_SIZE + (packet)->header.size, \
- packet_type_to_statistic_packet_count[packet_type], \
- 1); \
- }
-
#define BAIL_IF_NO_MORE_DATA \
if ((size_t)(p - begin) > packet->header.size) { \
@@ -127,9 +92,9 @@ static enum_mysqlnd_collected_stats packet_type_to_statistic_packet_count[PROT_L
/* {{{ php_mysqlnd_net_field_length
Get next field's length */
zend_ulong
-php_mysqlnd_net_field_length(zend_uchar **packet)
+php_mysqlnd_net_field_length(const zend_uchar **packet)
{
- register zend_uchar *p= (zend_uchar *)*packet;
+ register const zend_uchar *p= (const zend_uchar *)*packet;
if (*p < 251) {
(*packet)++;
@@ -157,9 +122,9 @@ php_mysqlnd_net_field_length(zend_uchar **packet)
/* {{{ php_mysqlnd_net_field_length_ll
Get next field's length */
uint64_t
-php_mysqlnd_net_field_length_ll(zend_uchar **packet)
+php_mysqlnd_net_field_length_ll(const zend_uchar **packet)
{
- register zend_uchar *p = (zend_uchar *)*packet;
+ register const zend_uchar *p = (zend_uchar *)*packet;
if (*p < 251) {
(*packet)++;
@@ -186,7 +151,7 @@ php_mysqlnd_net_field_length_ll(zend_uchar **packet)
/* {{{ php_mysqlnd_net_store_length */
zend_uchar *
-php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length)
+php_mysqlnd_net_store_length(zend_uchar *packet, const uint64_t length)
{
if (length < (uint64_t) L64(251)) {
*packet = (zend_uchar) length;
@@ -231,12 +196,12 @@ php_mysqlnd_net_store_length_size(uint64_t length)
/* {{{ php_mysqlnd_read_error_from_line */
static enum_func_status
-php_mysqlnd_read_error_from_line(zend_uchar *buf, size_t buf_len,
- char *error, int error_buf_len,
- unsigned int *error_no, char *sqlstate)
+php_mysqlnd_read_error_from_line(const zend_uchar * const buf, const size_t buf_len,
+ char *error, const size_t error_buf_len,
+ unsigned int *error_no, char *sqlstate)
{
- zend_uchar *p = buf;
- int error_msg_len= 0;
+ const zend_uchar *p = buf;
+ size_t error_msg_len = 0;
DBG_ENTER("php_mysqlnd_read_error_from_line");
@@ -275,64 +240,110 @@ end:
/* {{{ mysqlnd_read_header */
static enum_func_status
-mysqlnd_read_header(MYSQLND_NET * net, MYSQLND_PACKET_HEADER * header,
+mysqlnd_read_header(MYSQLND_PFC * pfc, MYSQLND_VIO * vio, MYSQLND_PACKET_HEADER * header,
MYSQLND_STATS * conn_stats, MYSQLND_ERROR_INFO * error_info)
{
zend_uchar buffer[MYSQLND_HEADER_SIZE];
DBG_ENTER(mysqlnd_read_header_name);
- DBG_INF_FMT("compressed=%u", net->data->compressed);
- if (FAIL == net->data->m.receive_ex(net, buffer, MYSQLND_HEADER_SIZE, conn_stats, error_info)) {
+ DBG_INF_FMT("compressed=%u", pfc->data->compressed);
+ if (FAIL == pfc->data->m.receive(pfc, vio, buffer, MYSQLND_HEADER_SIZE, conn_stats, error_info)) {
DBG_RETURN(FAIL);
}
header->size = uint3korr(buffer);
header->packet_no = uint1korr(buffer + 3);
-#ifdef MYSQLND_DUMP_HEADER_N_BODY
DBG_INF_FMT("HEADER: prot_packet_no=%u size=%3u", header->packet_no, header->size);
-#endif
MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats,
STAT_PROTOCOL_OVERHEAD_IN, MYSQLND_HEADER_SIZE,
STAT_PACKETS_RECEIVED, 1);
- if (net->data->compressed || net->packet_no == header->packet_no) {
+ if (pfc->data->compressed || pfc->data->packet_no == header->packet_no) {
/*
Have to increase the number, so we can send correct number back. It will
round at 255 as this is unsigned char. The server needs this for simple
flow control checking.
*/
- net->packet_no++;
+ pfc->data->packet_no++;
DBG_RETURN(PASS);
}
DBG_ERR_FMT("Logical link: packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC,
- net->packet_no, header->packet_no, header->size);
+ pfc->data->packet_no, header->packet_no, header->size);
php_error(E_WARNING, "Packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC,
- net->packet_no, header->packet_no, header->size);
+ pfc->data->packet_no, header->packet_no, header->size);
DBG_RETURN(FAIL);
}
/* }}} */
+/* {{{ mysqlnd_read_packet_header_and_body */
+static enum_func_status
+mysqlnd_read_packet_header_and_body(MYSQLND_PACKET_HEADER * packet_header,
+ MYSQLND_PFC * pfc,
+ MYSQLND_VIO * vio,
+ MYSQLND_STATS * stats,
+ MYSQLND_ERROR_INFO * error_info,
+ MYSQLND_CONNECTION_STATE * connection_state,
+ zend_uchar * buf, size_t buf_size, const char * const packet_type_as_text,
+ enum mysqlnd_packet_type packet_type)
+{
+ DBG_ENTER("mysqlnd_read_packet_header_and_body");
+ DBG_INF_FMT("buf=%p size=%u", buf, buf_size);
+ if (FAIL == mysqlnd_read_header(pfc, vio, packet_header, stats, error_info)) {
+ SET_CONNECTION_STATE(connection_state, CONN_QUIT_SENT);
+ SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ php_error_docref(NULL, E_WARNING, "%s", mysqlnd_server_gone);
+ DBG_ERR_FMT("Can't read %s's header", packet_type_as_text);
+ DBG_RETURN(FAIL);
+ }
+ if (buf_size < packet_header->size) {
+ DBG_ERR_FMT("Packet buffer %u wasn't big enough %u, %u bytes will be unread",
+ buf_size, packet_header->size, packet_header->size - buf_size);
+ DBG_RETURN(FAIL);
+ }
+ if (FAIL == pfc->data->m.receive(pfc, vio, buf, packet_header->size, stats, error_info)) {
+ SET_CONNECTION_STATE(connection_state, CONN_QUIT_SENT);
+ SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ php_error_docref(NULL, E_WARNING, "%s", mysqlnd_server_gone);
+ DBG_ERR_FMT("Empty '%s' packet body", packet_type_as_text);
+ DBG_RETURN(FAIL);
+ }
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE2(stats, packet_type_to_statistic_byte_count[packet_type],
+ MYSQLND_HEADER_SIZE + packet_header->size,
+ packet_type_to_statistic_packet_count[packet_type],
+ 1);
+ DBG_RETURN(PASS);
+}
+/* }}} */
+
+
/* {{{ php_mysqlnd_greet_read */
static enum_func_status
-php_mysqlnd_greet_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_greet_read(void * _packet)
{
zend_uchar buf[2048];
- zend_uchar *p = buf;
- zend_uchar *begin = buf;
- zend_uchar *pad_start = NULL;
+ const zend_uchar * p = buf;
+ const zend_uchar * const begin = buf;
+ const zend_uchar * pad_start = NULL;
MYSQLND_PACKET_GREET *packet= (MYSQLND_PACKET_GREET *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
DBG_ENTER("php_mysqlnd_greet_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, sizeof(buf), "greeting", PROT_GREET_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, sizeof(buf), "greeting", PROT_GREET_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
- packet->auth_plugin_data = packet->intern_auth_plugin_data;
- packet->auth_plugin_data_len = sizeof(packet->intern_auth_plugin_data);
+ packet->authentication_plugin_data.s = packet->intern_auth_plugin_data;
+ packet->authentication_plugin_data.l = sizeof(packet->intern_auth_plugin_data);
if (packet->header.size < sizeof(buf)) {
/*
@@ -370,7 +381,7 @@ php_mysqlnd_greet_read(void * _packet, MYSQLND_CONN_DATA * conn)
p+=4;
BAIL_IF_NO_MORE_DATA;
- memcpy(packet->auth_plugin_data, p, SCRAMBLE_LENGTH_323);
+ memcpy(packet->authentication_plugin_data.s, p, SCRAMBLE_LENGTH_323);
p+= SCRAMBLE_LENGTH_323;
BAIL_IF_NO_MORE_DATA;
@@ -397,7 +408,7 @@ php_mysqlnd_greet_read(void * _packet, MYSQLND_CONN_DATA * conn)
if ((size_t) (p - buf) < packet->header.size) {
/* auth_plugin_data is split into two parts */
- memcpy(packet->auth_plugin_data + SCRAMBLE_LENGTH_323, p, SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323);
+ memcpy(packet->authentication_plugin_data.s + SCRAMBLE_LENGTH_323, p, SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323);
p+= SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323;
p++; /* 0x0 at the end of the scramble and thus last byte in the packet in 5.1 and previous */
} else {
@@ -412,19 +423,19 @@ php_mysqlnd_greet_read(void * _packet, MYSQLND_CONN_DATA * conn)
/* Additional 16 bits for server capabilities */
packet->server_capabilities |= uint2korr(pad_start) << 16;
/* And a length of the server scramble in one byte */
- packet->auth_plugin_data_len = uint1korr(pad_start + 2);
- if (packet->auth_plugin_data_len > SCRAMBLE_LENGTH) {
+ packet->authentication_plugin_data.l = uint1korr(pad_start + 2);
+ if (packet->authentication_plugin_data.l > SCRAMBLE_LENGTH) {
/* more data*/
- zend_uchar * new_auth_plugin_data = emalloc(packet->auth_plugin_data_len);
+ char * new_auth_plugin_data = emalloc(packet->authentication_plugin_data.l);
if (!new_auth_plugin_data) {
goto premature_end;
}
/* copy what we already have */
- memcpy(new_auth_plugin_data, packet->auth_plugin_data, SCRAMBLE_LENGTH);
+ memcpy(new_auth_plugin_data, packet->authentication_plugin_data.s, SCRAMBLE_LENGTH);
/* add additional scramble data 5.5+ sent us */
- memcpy(new_auth_plugin_data + SCRAMBLE_LENGTH, p, packet->auth_plugin_data_len - SCRAMBLE_LENGTH);
- p+= (packet->auth_plugin_data_len - SCRAMBLE_LENGTH);
- packet->auth_plugin_data = new_auth_plugin_data;
+ memcpy(new_auth_plugin_data + SCRAMBLE_LENGTH, p, packet->authentication_plugin_data.l - SCRAMBLE_LENGTH);
+ p+= (packet->authentication_plugin_data.l - SCRAMBLE_LENGTH);
+ packet->authentication_plugin_data.s = new_auth_plugin_data;
}
}
@@ -440,7 +451,7 @@ php_mysqlnd_greet_read(void * _packet, MYSQLND_CONN_DATA * conn)
DBG_INF_FMT("server_capabilities=%u charset_no=%u server_status=%i auth_protocol=%s scramble_length=%u",
packet->server_capabilities, packet->charset_no, packet->server_status,
- packet->auth_protocol? packet->auth_protocol:"n/a", packet->auth_plugin_data_len);
+ packet->auth_protocol? packet->auth_protocol:"n/a", packet->authentication_plugin_data.l);
DBG_RETURN(PASS);
premature_end:
@@ -461,9 +472,9 @@ void php_mysqlnd_greet_free_mem(void * _packet, zend_bool stack_allocation)
efree(p->server_version);
p->server_version = NULL;
}
- if (p->auth_plugin_data && p->auth_plugin_data != p->intern_auth_plugin_data) {
- efree(p->auth_plugin_data);
- p->auth_plugin_data = NULL;
+ if (p->authentication_plugin_data.s && p->authentication_plugin_data.s != p->intern_auth_plugin_data) {
+ efree(p->authentication_plugin_data.s);
+ p->authentication_plugin_data.s = NULL;
}
if (p->auth_protocol) {
efree(p->auth_protocol);
@@ -480,12 +491,18 @@ void php_mysqlnd_greet_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_auth_write */
static
-size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
+size_t php_mysqlnd_auth_write(void * _packet)
{
zend_uchar buffer[AUTH_WRITE_BUFFER_LEN];
zend_uchar *p = buffer + MYSQLND_HEADER_SIZE; /* start after the header */
- int len;
+ size_t len;
MYSQLND_PACKET_AUTH * packet= (MYSQLND_PACKET_AUTH *) _packet;
+ MYSQLND_CONN_DATA * conn = packet->header.conn;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
DBG_ENTER("php_mysqlnd_auth_write");
@@ -516,7 +533,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
if (packet->auth_data_len > 0xFF) {
const char * const msg = "Authentication data too long. "
"Won't fit into the buffer and will be truncated. Authentication will thus fail";
- SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, msg);
+ SET_CLIENT_ERROR(error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, msg);
php_error_docref(NULL, E_WARNING, "%s", msg);
DBG_RETURN(0);
}
@@ -552,7 +569,7 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
}
if (packet->auth_plugin_name) {
- size_t len = MIN(strlen(packet->auth_plugin_name), sizeof(buffer) - (p - buffer) - 1);
+ len = MIN(strlen(packet->auth_plugin_name), sizeof(buffer) - (p - buffer) - 1);
memcpy(p, packet->auth_plugin_name, len);
p+= len;
*p++= '\0';
@@ -560,31 +577,11 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
if (packet->connect_attr && zend_hash_num_elements(packet->connect_attr)) {
size_t ca_payload_len = 0;
-#ifdef OLD_CODE
- HashPosition pos_value;
- const char ** entry_value;
- zend_hash_internal_pointer_reset_ex(packet->connect_attr, &pos_value);
- while (SUCCESS == zend_hash_get_current_data_ex(packet->connect_attr, (void **)&entry_value, &pos_value)) {
- char *s_key;
- unsigned int s_len;
- zend_ulong num_key;
- size_t value_len = strlen(*entry_value);
-
- if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(packet->connect_attr, &s_key, &s_len, &num_key, &pos_value)) {
- ca_payload_len += php_mysqlnd_net_store_length_size(s_len);
- ca_payload_len += s_len;
- ca_payload_len += php_mysqlnd_net_store_length_size(value_len);
- ca_payload_len += value_len;
- }
- zend_hash_move_forward_ex(conn->options->connect_attr, &pos_value);
- }
-#else
{
zend_string * key;
- zend_ulong unused_num_key;
zval * entry_value;
- ZEND_HASH_FOREACH_KEY_VAL(packet->connect_attr, unused_num_key, key, entry_value) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(packet->connect_attr, key, entry_value) {
if (key) { /* HASH_KEY_IS_STRING */
size_t value_len = Z_STRLEN_P(entry_value);
@@ -595,35 +592,14 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
}
} ZEND_HASH_FOREACH_END();
}
-#endif
+
if (sizeof(buffer) >= (ca_payload_len + php_mysqlnd_net_store_length_size(ca_payload_len) + (p - buffer))) {
p = php_mysqlnd_net_store_length(p, ca_payload_len);
-#ifdef OLD_CODE
- zend_hash_internal_pointer_reset_ex(packet->connect_attr, &pos_value);
- while (SUCCESS == zend_hash_get_current_data_ex(packet->connect_attr, (void **)&entry_value, &pos_value)) {
- char *s_key;
- unsigned int s_len;
- zend_ulong num_key;
- size_t value_len = strlen(*entry_value);
- if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(packet->connect_attr, &s_key, &s_len, &num_key, &pos_value)) {
- /* copy key */
- p = php_mysqlnd_net_store_length(p, s_len);
- memcpy(p, s_key, s_len);
- p+= s_len;
- /* copy value */
- p = php_mysqlnd_net_store_length(p, value_len);
- memcpy(p, *entry_value, value_len);
- p+= value_len;
- }
- zend_hash_move_forward_ex(conn->options->connect_attr, &pos_value);
- }
-#else
{
zend_string * key;
- zend_ulong unused_num_key;
zval * entry_value;
- ZEND_HASH_FOREACH_KEY_VAL(packet->connect_attr, unused_num_key, key, entry_value) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(packet->connect_attr, key, entry_value) {
if (key) { /* HASH_KEY_IS_STRING */
size_t value_len = Z_STRLEN_P(entry_value);
@@ -638,23 +614,26 @@ size_t php_mysqlnd_auth_write(void * _packet, MYSQLND_CONN_DATA * conn)
}
} ZEND_HASH_FOREACH_END();
}
-#endif
} else {
/* cannot put the data - skip */
}
}
}
if (packet->is_change_user_packet) {
- if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer + MYSQLND_HEADER_SIZE, p - buffer - MYSQLND_HEADER_SIZE,
- PROT_LAST /* the caller will handle the OK packet */,
- packet->silent, TRUE)) {
- DBG_RETURN(0);
+ enum_func_status ret = FAIL;
+ const MYSQLND_CSTRING payload = {(char*) buffer + MYSQLND_HEADER_SIZE, p - (buffer + MYSQLND_HEADER_SIZE)};
+ const unsigned int silent = packet->silent;
+ struct st_mysqlnd_protocol_command * command = conn->command_factory(COM_CHANGE_USER, conn, payload, silent);
+ if (command) {
+ ret = command->run(command);
+ command->free_command(command);
}
- DBG_RETURN(p - buffer - MYSQLND_HEADER_SIZE);
+
+ DBG_RETURN(ret == PASS? (p - buffer - MYSQLND_HEADER_SIZE) : 0);
} else {
- size_t sent = conn->net->data->m.send_ex(conn->net, buffer, p - buffer - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info);
+ size_t sent = pfc->data->m.send(pfc, vio, buffer, p - buffer - MYSQLND_HEADER_SIZE, stats, error_info);
if (!sent) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(connection_state, CONN_QUIT_SENT);
}
DBG_RETURN(sent);
}
@@ -678,21 +657,27 @@ void php_mysqlnd_auth_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_auth_response_read */
static enum_func_status
-php_mysqlnd_auth_response_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_auth_response_read(void * _packet)
{
- zend_uchar local_buf[AUTH_RESP_BUFFER_SIZE];
- size_t buf_len = conn->net->cmd_buffer.buffer? conn->net->cmd_buffer.length: AUTH_RESP_BUFFER_SIZE;
- zend_uchar *buf = conn->net->cmd_buffer.buffer? (zend_uchar *) conn->net->cmd_buffer.buffer : local_buf;
- zend_uchar *p = buf;
- zend_uchar *begin = buf;
- zend_ulong i;
register MYSQLND_PACKET_AUTH_RESPONSE * packet= (MYSQLND_PACKET_AUTH_RESPONSE *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
+ zend_uchar local_buf[AUTH_RESP_BUFFER_SIZE];
+ size_t buf_len = pfc->cmd_buffer.buffer? pfc->cmd_buffer.length: AUTH_RESP_BUFFER_SIZE;
+ zend_uchar *buf = pfc->cmd_buffer.buffer? (zend_uchar *) pfc->cmd_buffer.buffer : local_buf;
+ const zend_uchar * p = buf;
+ const zend_uchar * const begin = buf;
DBG_ENTER("php_mysqlnd_auth_response_read");
/* leave space for terminating safety \0 */
buf_len--;
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "OK", PROT_OK_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "OK", PROT_OK_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
/*
@@ -729,6 +714,7 @@ php_mysqlnd_auth_response_read(void * _packet, MYSQLND_CONN_DATA * conn)
DBG_INF_FMT("Server salt : [%d][%.*s]", packet->new_auth_protocol_data_len, packet->new_auth_protocol_data_len, packet->new_auth_protocol_data);
}
} else {
+ zend_ulong net_len;
/* Everything was fine! */
packet->affected_rows = php_mysqlnd_net_field_length_ll(&p);
BAIL_IF_NO_MORE_DATA;
@@ -745,8 +731,8 @@ php_mysqlnd_auth_response_read(void * _packet, MYSQLND_CONN_DATA * conn)
BAIL_IF_NO_MORE_DATA;
/* There is a message */
- if (packet->header.size > (size_t) (p - buf) && (i = php_mysqlnd_net_field_length(&p))) {
- packet->message_len = MIN(i, buf_len - (p - begin));
+ if (packet->header.size > (size_t) (p - buf) && (net_len = php_mysqlnd_net_field_length(&p))) {
+ packet->message_len = MIN(net_len, buf_len - (p - begin));
packet->message = mnd_pestrndup((char *)p, packet->message_len, FALSE);
} else {
packet->message = NULL;
@@ -798,11 +784,16 @@ php_mysqlnd_auth_response_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_change_auth_response_write */
static size_t
-php_mysqlnd_change_auth_response_write(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_change_auth_response_write(void * _packet)
{
MYSQLND_PACKET_CHANGE_AUTH_RESPONSE *packet= (MYSQLND_PACKET_CHANGE_AUTH_RESPONSE *) _packet;
- zend_uchar * buffer = conn->net->cmd_buffer.length >= packet->auth_data_len? conn->net->cmd_buffer.buffer : mnd_emalloc(packet->auth_data_len);
- zend_uchar *p = buffer + MYSQLND_HEADER_SIZE; /* start after the header */
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
+ zend_uchar * buffer = pfc->cmd_buffer.length >= packet->auth_data_len? pfc->cmd_buffer.buffer : mnd_emalloc(packet->auth_data_len);
+ zend_uchar * p = buffer + MYSQLND_HEADER_SIZE; /* start after the header */
DBG_ENTER("php_mysqlnd_change_auth_response_write");
@@ -812,12 +803,12 @@ php_mysqlnd_change_auth_response_write(void * _packet, MYSQLND_CONN_DATA * conn)
}
{
- size_t sent = conn->net->data->m.send_ex(conn->net, buffer, p - buffer - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info);
- if (buffer != conn->net->cmd_buffer.buffer) {
+ size_t sent = pfc->data->m.send(pfc, vio, buffer, p - buffer - MYSQLND_HEADER_SIZE, stats, error_info);
+ if (buffer != pfc->cmd_buffer.buffer) {
mnd_efree(buffer);
}
if (!sent) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(connection_state, CONN_QUIT_SENT);
}
DBG_RETURN(sent);
}
@@ -841,19 +832,26 @@ php_mysqlnd_change_auth_response_free_mem(void * _packet, zend_bool stack_alloca
/* {{{ php_mysqlnd_ok_read */
static enum_func_status
-php_mysqlnd_ok_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_ok_read(void * _packet)
{
- zend_uchar local_buf[OK_BUFFER_SIZE];
- size_t buf_len = conn->net->cmd_buffer.buffer? conn->net->cmd_buffer.length : OK_BUFFER_SIZE;
- zend_uchar *buf = conn->net->cmd_buffer.buffer? (zend_uchar *) conn->net->cmd_buffer.buffer : local_buf;
- zend_uchar *p = buf;
- zend_uchar *begin = buf;
- zend_ulong i;
register MYSQLND_PACKET_OK *packet= (MYSQLND_PACKET_OK *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
+ zend_uchar local_buf[OK_BUFFER_SIZE];
+ size_t buf_len = pfc->cmd_buffer.buffer? pfc->cmd_buffer.length : OK_BUFFER_SIZE;
+ zend_uchar * buf = pfc->cmd_buffer.buffer? (zend_uchar *) pfc->cmd_buffer.buffer : local_buf;
+ const zend_uchar * p = buf;
+ const zend_uchar * const begin = buf;
+ zend_ulong net_len;
DBG_ENTER("php_mysqlnd_ok_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "OK", PROT_OK_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "OK", PROT_OK_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
/* Should be always 0x0 or ERROR_MARKER for error */
@@ -866,7 +864,6 @@ php_mysqlnd_ok_read(void * _packet, MYSQLND_CONN_DATA * conn)
packet->error, sizeof(packet->error),
&packet->error_no, packet->sqlstate
);
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
DBG_RETURN(PASS);
}
/* Everything was fine! */
@@ -885,8 +882,8 @@ php_mysqlnd_ok_read(void * _packet, MYSQLND_CONN_DATA * conn)
BAIL_IF_NO_MORE_DATA;
/* There is a message */
- if (packet->header.size > (size_t) (p - buf) && (i = php_mysqlnd_net_field_length(&p))) {
- packet->message_len = MIN(i, buf_len - (p - begin));
+ if (packet->header.size > (size_t) (p - buf) && (net_len = php_mysqlnd_net_field_length(&p))) {
+ packet->message_len = MIN(net_len, buf_len - (p - begin));
packet->message = mnd_pestrndup((char *)p, packet->message_len, FALSE);
} else {
packet->message = NULL;
@@ -927,7 +924,7 @@ php_mysqlnd_ok_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_eof_read */
static enum_func_status
-php_mysqlnd_eof_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_eof_read(void * _packet)
{
/*
EOF packet is since 4.1 five bytes long,
@@ -936,14 +933,21 @@ php_mysqlnd_eof_read(void * _packet, MYSQLND_CONN_DATA * conn)
Error : error_code + '#' + sqlstate + MYSQLND_ERRMSG_SIZE
*/
MYSQLND_PACKET_EOF *packet= (MYSQLND_PACKET_EOF *) _packet;
- size_t buf_len = conn->net->cmd_buffer.length;
- zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer;
- zend_uchar *p = buf;
- zend_uchar *begin = buf;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
+ size_t buf_len = pfc->cmd_buffer.length;
+ zend_uchar * buf = (zend_uchar *) pfc->cmd_buffer.buffer;
+ const zend_uchar * p = buf;
+ const zend_uchar * const begin = buf;
DBG_ENTER("php_mysqlnd_eof_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "EOF", PROT_EOF_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "EOF", PROT_EOF_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
/* Should be always EODATA_MARKER */
@@ -1004,11 +1008,15 @@ void php_mysqlnd_eof_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_cmd_write */
-size_t php_mysqlnd_cmd_write(void * _packet, MYSQLND_CONN_DATA * conn)
+size_t php_mysqlnd_cmd_write(void * _packet)
{
/* Let's have some space, which we can use, if not enough, we will allocate new buffer */
MYSQLND_PACKET_COMMAND * packet= (MYSQLND_PACKET_COMMAND *) _packet;
- MYSQLND_NET * net = conn->net;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
unsigned int error_reporting = EG(error_reporting);
size_t sent = 0;
@@ -1017,28 +1025,27 @@ size_t php_mysqlnd_cmd_write(void * _packet, MYSQLND_CONN_DATA * conn)
Reset packet_no, or we will get bad handshake!
Every command starts a new TX and packet numbers are reset to 0.
*/
- net->packet_no = 0;
- net->compressed_envelope_packet_no = 0; /* this is for the response */
+ pfc->data->m.reset(pfc, stats, error_info);
if (error_reporting) {
EG(error_reporting) = 0;
}
- MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_PACKETS_SENT_CMD);
+ MYSQLND_INC_CONN_STATISTIC(stats, STAT_PACKETS_SENT_CMD);
#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
- net->data->m.consume_uneaten_data(net, packet->command);
+ vio->data->m.consume_uneaten_data(vio, packet->command);
#endif
- if (!packet->argument || !packet->arg_len) {
+ if (!packet->argument.s || !packet->argument.l) {
zend_uchar buffer[MYSQLND_HEADER_SIZE + 1];
int1store(buffer + MYSQLND_HEADER_SIZE, packet->command);
- sent = net->data->m.send_ex(net, buffer, 1, conn->stats, conn->error_info);
+ sent = pfc->data->m.send(pfc, vio, buffer, 1, stats, error_info);
} else {
- size_t tmp_len = packet->arg_len + 1 + MYSQLND_HEADER_SIZE;
+ size_t tmp_len = packet->argument.l + 1 + MYSQLND_HEADER_SIZE;
zend_uchar *tmp, *p;
- tmp = (tmp_len > net->cmd_buffer.length)? mnd_emalloc(tmp_len):net->cmd_buffer.buffer;
+ tmp = (tmp_len > pfc->cmd_buffer.length)? mnd_emalloc(tmp_len):pfc->cmd_buffer.buffer;
if (!tmp) {
goto end;
}
@@ -1047,11 +1054,11 @@ size_t php_mysqlnd_cmd_write(void * _packet, MYSQLND_CONN_DATA * conn)
int1store(p, packet->command);
p++;
- memcpy(p, packet->argument, packet->arg_len);
+ memcpy(p, packet->argument.s, packet->argument.l);
- sent = net->data->m.send_ex(net, tmp, tmp_len - MYSQLND_HEADER_SIZE, conn->stats, conn->error_info);
- if (tmp != net->cmd_buffer.buffer) {
- MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_CMD_BUFFER_TOO_SMALL);
+ sent = pfc->data->m.send(pfc, vio, tmp, tmp_len - MYSQLND_HEADER_SIZE, stats, error_info);
+ if (tmp != pfc->cmd_buffer.buffer) {
+ MYSQLND_INC_CONN_STATISTIC(stats, STAT_CMD_BUFFER_TOO_SMALL);
mnd_efree(tmp);
}
}
@@ -1061,7 +1068,7 @@ end:
EG(error_reporting) = error_reporting;
}
if (!sent) {
- CONN_SET_STATE(conn, CONN_QUIT_SENT);
+ SET_CONNECTION_STATE(connection_state, CONN_QUIT_SENT);
}
DBG_RETURN(sent);
}
@@ -1082,19 +1089,26 @@ void php_mysqlnd_cmd_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_rset_header_read */
static enum_func_status
-php_mysqlnd_rset_header_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_rset_header_read(void * _packet)
{
+ MYSQLND_PACKET_RSET_HEADER * packet= (MYSQLND_PACKET_RSET_HEADER *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
enum_func_status ret = PASS;
- size_t buf_len = conn->net->cmd_buffer.length;
- zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer;
- zend_uchar *p = buf;
- zend_uchar *begin = buf;
+ size_t buf_len = pfc->cmd_buffer.length;
+ zend_uchar * buf = (zend_uchar *) pfc->cmd_buffer.buffer;
+ const zend_uchar * p = buf;
+ const zend_uchar * const begin = buf;
size_t len;
- MYSQLND_PACKET_RSET_HEADER *packet= (MYSQLND_PACKET_RSET_HEADER *) _packet;
DBG_ENTER("php_mysqlnd_rset_header_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "resultset header", PROT_RSET_HEADER_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "resultset header", PROT_RSET_HEADER_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
/*
@@ -1109,7 +1123,6 @@ php_mysqlnd_rset_header_read(void * _packet, MYSQLND_CONN_DATA * conn)
packet->error_info.error, sizeof(packet->error_info.error),
&packet->error_info.error_no, packet->error_info.sqlstate
);
- DBG_INF_FMT("conn->server_status=%u", conn->upsert_status->server_status);
DBG_RETURN(PASS);
}
@@ -1127,13 +1140,13 @@ php_mysqlnd_rset_header_read(void * _packet, MYSQLND_CONN_DATA * conn)
would lead to 0 byte allocation but 2^32 or 2^64 bytes copied.
*/
len = packet->header.size - 1;
- packet->info_or_local_file = mnd_emalloc(len + 1);
- if (packet->info_or_local_file) {
- memcpy(packet->info_or_local_file, p, len);
- packet->info_or_local_file[len] = '\0';
- packet->info_or_local_file_len = len;
+ packet->info_or_local_file.s = mnd_emalloc(len + 1);
+ if (packet->info_or_local_file.s) {
+ memcpy(packet->info_or_local_file.s, p, len);
+ packet->info_or_local_file.s[len] = '\0';
+ packet->info_or_local_file.l = len;
} else {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(error_info);
ret = FAIL;
}
break;
@@ -1154,13 +1167,13 @@ php_mysqlnd_rset_header_read(void * _packet, MYSQLND_CONN_DATA * conn)
BAIL_IF_NO_MORE_DATA;
/* Check for additional textual data */
if (packet->header.size > (size_t) (p - buf) && (len = php_mysqlnd_net_field_length(&p))) {
- packet->info_or_local_file = mnd_emalloc(len + 1);
- if (packet->info_or_local_file) {
- memcpy(packet->info_or_local_file, p, len);
- packet->info_or_local_file[len] = '\0';
- packet->info_or_local_file_len = len;
+ packet->info_or_local_file.s = mnd_emalloc(len + 1);
+ if (packet->info_or_local_file.s) {
+ memcpy(packet->info_or_local_file.s, p, len);
+ packet->info_or_local_file.s[len] = '\0';
+ packet->info_or_local_file.l = len;
} else {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(error_info);
ret = FAIL;
}
}
@@ -1191,9 +1204,9 @@ void php_mysqlnd_rset_header_free_mem(void * _packet, zend_bool stack_allocation
{
MYSQLND_PACKET_RSET_HEADER *p= (MYSQLND_PACKET_RSET_HEADER *) _packet;
DBG_ENTER("php_mysqlnd_rset_header_free_mem");
- if (p->info_or_local_file) {
- mnd_efree(p->info_or_local_file);
- p->info_or_local_file = NULL;
+ if (p->info_or_local_file.s) {
+ mnd_efree(p->info_or_local_file.s);
+ p->info_or_local_file.s = NULL;
}
if (!stack_allocation) {
mnd_pefree(p, p->header.persistent);
@@ -1221,14 +1234,19 @@ static size_t rset_field_offsets[] =
/* {{{ php_mysqlnd_rset_field_read */
static enum_func_status
-php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_rset_field_read(void * _packet)
{
/* Should be enough for the metadata of a single row */
MYSQLND_PACKET_RES_FIELD *packet = (MYSQLND_PACKET_RES_FIELD *) _packet;
- size_t buf_len = conn->net->cmd_buffer.length, total_len = 0;
- zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer;
- zend_uchar *p = buf;
- zend_uchar *begin = buf;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
+ size_t buf_len = pfc->cmd_buffer.length, total_len = 0;
+ zend_uchar * buf = (zend_uchar *) pfc->cmd_buffer.buffer;
+ const zend_uchar * p = buf;
+ const zend_uchar * const begin = buf;
char *root_ptr;
zend_ulong len;
MYSQLND_FIELD *meta;
@@ -1236,7 +1254,9 @@ php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn)
DBG_ENTER("php_mysqlnd_rset_field_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "field", PROT_RSET_FLD_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "field", PROT_RSET_FLD_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
if (packet->skip_parsing) {
DBG_RETURN(PASS);
@@ -1254,9 +1274,8 @@ php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn)
DBG_ERR_FMT("Server error : (%u) %s", packet->error_info.error_no, packet->error_info.error);
DBG_RETURN(PASS);
} else if (EODATA_MARKER == *p && packet->header.size < 8) {
- /* Premature EOF. That should be COM_FIELD_LIST */
+ /* Premature EOF. That should be COM_FIELD_LIST. But we don't support COM_FIELD_LIST anymore, thus this should not happen */
DBG_INF("Premature EOF. That should be COM_FIELD_LIST");
- packet->stupid_list_fields_eof = TRUE;
DBG_RETURN(PASS);
}
@@ -1338,7 +1357,7 @@ php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn)
DBG_INF_FMT("Def found, length %lu, persistent=%u", len, packet->persistent_alloc);
meta->def = mnd_pemalloc(len + 1, packet->persistent_alloc);
if (!meta->def) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(error_info);
DBG_RETURN(FAIL);
}
memcpy(meta->def, p, len);
@@ -1349,7 +1368,7 @@ php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn)
root_ptr = meta->root = mnd_pemalloc(total_len, packet->persistent_alloc);
if (!root_ptr) {
- SET_OOM_ERROR(*conn->error_info);
+ SET_OOM_ERROR(error_info);
DBG_RETURN(FAIL);
}
@@ -1435,7 +1454,11 @@ void php_mysqlnd_rset_field_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_read_row_ex */
static enum_func_status
-php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_set_memory_pool,
+php_mysqlnd_read_row_ex(MYSQLND_PFC * pfc,
+ MYSQLND_VIO * vio,
+ MYSQLND_STATS * stats,
+ MYSQLND_ERROR_INFO * error_info,
+ MYSQLND_MEMORY_POOL * pool,
MYSQLND_MEMORY_POOL_CHUNK ** buffer,
size_t * data_size, zend_bool persistent_alloc,
unsigned int prealloc_more_bytes)
@@ -1457,7 +1480,7 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
*data_size = prealloc_more_bytes;
while (1) {
- if (FAIL == mysqlnd_read_header(conn->net, &header, conn->stats, conn->error_info)) {
+ if (FAIL == mysqlnd_read_header(pfc, vio, &header, stats, error_info)) {
ret = FAIL;
break;
}
@@ -1466,7 +1489,7 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
if (first_iteration) {
first_iteration = FALSE;
- *buffer = result_set_memory_pool->get_chunk(result_set_memory_pool, *data_size);
+ *buffer = pool->get_chunk(pool, *data_size);
if (!*buffer) {
ret = FAIL;
break;
@@ -1481,8 +1504,8 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
/*
We have to realloc the buffer.
*/
- if (FAIL == (*buffer)->resize_chunk((*buffer), *data_size)) {
- SET_OOM_ERROR(*conn->error_info);
+ if (FAIL == pool->resize_chunk(pool, *buffer, *data_size)) {
+ SET_OOM_ERROR(error_info);
ret = FAIL;
break;
}
@@ -1490,7 +1513,7 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
p = (*buffer)->ptr + (*data_size - header.size);
}
- if (PASS != (ret = conn->net->data->m.receive_ex(conn->net, p, header.size, conn->stats, conn->error_info))) {
+ if (PASS != (ret = pfc->data->m.receive(pfc, vio, p, header.size, stats, error_info))) {
DBG_ERR("Empty row packet body");
php_error(E_WARNING, "Empty row packet body");
break;
@@ -1501,7 +1524,7 @@ php_mysqlnd_read_row_ex(MYSQLND_CONN_DATA * conn, MYSQLND_MEMORY_POOL * result_s
}
}
if (ret == FAIL && *buffer) {
- (*buffer)->free_chunk((*buffer));
+ pool->free_chunk(pool, *buffer);
*buffer = NULL;
}
*data_size -= prealloc_more_bytes;
@@ -1517,8 +1540,9 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
zend_bool as_int_or_float, MYSQLND_STATS * stats)
{
unsigned int i;
- zend_uchar *p = row_buffer->ptr;
- zend_uchar *null_ptr, bit;
+ const zend_uchar * p = row_buffer->ptr;
+ const zend_uchar * null_ptr;
+ zend_uchar bit;
zval *current_field, *end_field, *start_field;
DBG_ENTER("php_mysqlnd_rowp_read_binary_protocol");
@@ -1537,7 +1561,7 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
for (i = 0, current_field = start_field; current_field < end_field; current_field++, i++) {
enum_mysqlnd_collected_stats statistic;
- zend_uchar * orig_p = p;
+ const zend_uchar * orig_p = p;
DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u",
current_field, i,
@@ -1622,7 +1646,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
for (i = 0, current_field = start_field; current_field < end_field; current_field++, i++) {
/* php_mysqlnd_net_field_length() call should be after *this_field_len_pos = p; */
- zend_ulong len = php_mysqlnd_net_field_length(&p);
+ const zend_ulong len = php_mysqlnd_net_field_length((const zend_uchar **) &p);
/* NULL or NOT NULL, this is the question! */
if (len == MYSQLND_NULL_LENGTH) {
@@ -1655,6 +1679,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
case MYSQL_TYPE_NEWDECIMAL: statistic = STAT_TEXT_TYPE_FETCHED_DECIMAL; break;
case MYSQL_TYPE_ENUM: statistic = STAT_TEXT_TYPE_FETCHED_ENUM; break;
case MYSQL_TYPE_SET: statistic = STAT_TEXT_TYPE_FETCHED_SET; break;
+ case MYSQL_TYPE_JSON: statistic = STAT_TEXT_TYPE_FETCHED_JSON; break;
case MYSQL_TYPE_TINY_BLOB: statistic = STAT_TEXT_TYPE_FETCHED_BLOB; break;
case MYSQL_TYPE_MEDIUM_BLOB:statistic = STAT_TEXT_TYPE_FETCHED_BLOB; break;
case MYSQL_TYPE_LONG_BLOB: statistic = STAT_TEXT_TYPE_FETCHED_BLOB; break;
@@ -1724,7 +1749,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
Definitely not nice, _hackish_ :(, but works.
*/
zend_uchar *start = bit_area;
- ps_fetch_from_1_to_8_bytes(current_field, &(fields_metadata[i]), 0, &p, len);
+ ps_fetch_from_1_to_8_bytes(current_field, &(fields_metadata[i]), 0, (const zend_uchar **) &p, len);
/*
We have advanced in ps_fetch_from_1_to_8_bytes. We should go back because
later in this function there will be an advancement.
@@ -1786,11 +1811,15 @@ php_mysqlnd_rowp_read_text_protocol_c(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
if PS => packet->fields is passed from outside
*/
static enum_func_status
-php_mysqlnd_rowp_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_rowp_read(void * _packet)
{
+ MYSQLND_PACKET_ROW *packet= (MYSQLND_PACKET_ROW *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
zend_uchar *p;
enum_func_status ret = PASS;
- MYSQLND_PACKET_ROW *packet= (MYSQLND_PACKET_ROW *) _packet;
size_t post_alloc_for_bit_fields = 0;
size_t data_size = 0;
@@ -1801,13 +1830,14 @@ php_mysqlnd_rowp_read(void * _packet, MYSQLND_CONN_DATA * conn)
post_alloc_for_bit_fields = packet->bit_fields_total_len + packet->bit_fields_count;
}
- ret = php_mysqlnd_read_row_ex(conn, packet->result_set_memory_pool, &packet->row_buffer, &data_size,
+ ret = php_mysqlnd_read_row_ex(pfc, vio, stats, error_info,
+ packet->result_set_memory_pool, &packet->row_buffer, &data_size,
packet->persistent_alloc, post_alloc_for_bit_fields
);
if (FAIL == ret) {
goto end;
}
- MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, packet_type_to_statistic_byte_count[PROT_ROW_PACKET],
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE2(stats, packet_type_to_statistic_byte_count[PROT_ROW_PACKET],
MYSQLND_HEADER_SIZE + packet->header.size,
packet_type_to_statistic_packet_count[PROT_ROW_PACKET],
1);
@@ -1840,7 +1870,7 @@ php_mysqlnd_rowp_read(void * _packet, MYSQLND_CONN_DATA * conn)
DBG_INF_FMT("server_status=%u warning_count=%u", packet->server_status, packet->warning_count);
}
} else {
- MYSQLND_INC_CONN_STATISTIC(conn->stats,
+ MYSQLND_INC_CONN_STATISTIC(stats,
packet->binary_protocol? STAT_ROWS_FETCHED_FROM_SERVER_PS:
STAT_ROWS_FETCHED_FROM_SERVER_NORMAL);
@@ -1864,7 +1894,7 @@ php_mysqlnd_rowp_read(void * _packet, MYSQLND_CONN_DATA * conn)
packet->persistent_alloc);
}
} else {
- MYSQLND_INC_CONN_STATISTIC(conn->stats,
+ MYSQLND_INC_CONN_STATISTIC(stats,
packet->binary_protocol? STAT_ROWS_SKIPPED_PS:
STAT_ROWS_SKIPPED_NORMAL);
}
@@ -1885,7 +1915,7 @@ php_mysqlnd_rowp_free_mem(void * _packet, zend_bool stack_allocation)
DBG_ENTER("php_mysqlnd_rowp_free_mem");
p = (MYSQLND_PACKET_ROW *) _packet;
if (p->row_buffer) {
- p->row_buffer->free_chunk(p->row_buffer);
+ p->result_set_memory_pool->free_chunk(p->result_set_memory_pool, p->row_buffer);
p->row_buffer = NULL;
}
DBG_INF_FMT("stack_allocation=%u persistent=%u", (int)stack_allocation, (int)p->header.persistent);
@@ -1906,20 +1936,27 @@ php_mysqlnd_rowp_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_stats_read */
static enum_func_status
-php_mysqlnd_stats_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_stats_read(void * _packet)
{
MYSQLND_PACKET_STATS *packet= (MYSQLND_PACKET_STATS *) _packet;
- size_t buf_len = conn->net->cmd_buffer.length;
- zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
+ size_t buf_len = pfc->cmd_buffer.length;
+ zend_uchar *buf = (zend_uchar *) pfc->cmd_buffer.buffer;
DBG_ENTER("php_mysqlnd_stats_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "statistics", PROT_STATS_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "statistics", PROT_STATS_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
- packet->message = mnd_emalloc(packet->header.size + 1);
- memcpy(packet->message, buf, packet->header.size);
- packet->message[packet->header.size] = '\0';
- packet->message_len = packet->header.size;
+ packet->message.s = mnd_emalloc(packet->header.size + 1);
+ memcpy(packet->message.s, buf, packet->header.size);
+ packet->message.s[packet->header.size] = '\0';
+ packet->message.l = packet->header.size;
DBG_RETURN(PASS);
}
@@ -1931,9 +1968,9 @@ static
void php_mysqlnd_stats_free_mem(void * _packet, zend_bool stack_allocation)
{
MYSQLND_PACKET_STATS *p= (MYSQLND_PACKET_STATS *) _packet;
- if (p->message) {
- mnd_efree(p->message);
- p->message = NULL;
+ if (p->message.s) {
+ mnd_efree(p->message.s);
+ p->message.s = NULL;
}
if (!stack_allocation) {
mnd_pefree(p, p->header.persistent);
@@ -1948,19 +1985,26 @@ void php_mysqlnd_stats_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_prepare_read */
static enum_func_status
-php_mysqlnd_prepare_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_prepare_read(void * _packet)
{
+ MYSQLND_PACKET_PREPARE_RESPONSE *packet= (MYSQLND_PACKET_PREPARE_RESPONSE *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
/* In case of an error, we should have place to put it */
- size_t buf_len = conn->net->cmd_buffer.length;
- zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer;
+ size_t buf_len = pfc->cmd_buffer.length;
+ zend_uchar *buf = (zend_uchar *) pfc->cmd_buffer.buffer;
zend_uchar *p = buf;
- zend_uchar *begin = buf;
+ const zend_uchar * const begin = buf;
unsigned int data_size;
- MYSQLND_PACKET_PREPARE_RESPONSE *packet= (MYSQLND_PACKET_PREPARE_RESPONSE *) _packet;
DBG_ENTER("php_mysqlnd_prepare_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "prepare", PROT_PREPARE_RESP_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "prepare", PROT_PREPARE_RESP_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
data_size = packet->header.size;
@@ -2036,18 +2080,25 @@ php_mysqlnd_prepare_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_chg_user_read */
static enum_func_status
-php_mysqlnd_chg_user_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_chg_user_read(void * _packet)
{
+ MYSQLND_PACKET_CHG_USER_RESPONSE *packet= (MYSQLND_PACKET_CHG_USER_RESPONSE *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
/* There could be an error message */
- size_t buf_len = conn->net->cmd_buffer.length;
- zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer;
+ size_t buf_len = pfc->cmd_buffer.length;
+ zend_uchar *buf = (zend_uchar *) pfc->cmd_buffer.buffer;
zend_uchar *p = buf;
- zend_uchar *begin = buf;
- MYSQLND_PACKET_CHG_USER_RESPONSE *packet= (MYSQLND_PACKET_CHG_USER_RESPONSE *) _packet;
+ const zend_uchar * const begin = buf;
DBG_ENTER("php_mysqlnd_chg_user_read");
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "change user response", PROT_CHG_USER_RESP_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, buf_len, "change user response", PROT_CHG_USER_RESP_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
/*
@@ -2124,15 +2175,20 @@ php_mysqlnd_chg_user_free_mem(void * _packet, zend_bool stack_allocation)
/* {{{ php_mysqlnd_sha256_pk_request_write */
static
-size_t php_mysqlnd_sha256_pk_request_write(void * _packet, MYSQLND_CONN_DATA * conn)
+size_t php_mysqlnd_sha256_pk_request_write(void * _packet)
{
+ MYSQLND_PACKET_SHA256_PK_REQUEST * packet = (MYSQLND_PACKET_SHA256_PK_REQUEST *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
zend_uchar buffer[MYSQLND_HEADER_SIZE + 1];
size_t sent;
DBG_ENTER("php_mysqlnd_sha256_pk_request_write");
int1store(buffer + MYSQLND_HEADER_SIZE, '\1');
- sent = conn->net->data->m.send_ex(conn->net, buffer, 1, conn->stats, conn->error_info);
+ sent = pfc->data->m.send(pfc, vio, buffer, 1, stats, error_info);
DBG_RETURN(sent);
}
@@ -2155,17 +2211,24 @@ void php_mysqlnd_sha256_pk_request_free_mem(void * _packet, zend_bool stack_allo
/* {{{ php_mysqlnd_sha256_pk_request_response_read */
static enum_func_status
-php_mysqlnd_sha256_pk_request_response_read(void * _packet, MYSQLND_CONN_DATA * conn)
+php_mysqlnd_sha256_pk_request_response_read(void * _packet)
{
+ MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE * packet= (MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE *) _packet;
+ MYSQLND_ERROR_INFO * error_info = packet->header.error_info;
+ MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
+ MYSQLND_VIO * vio = packet->header.vio;
+ MYSQLND_STATS * stats = packet->header.stats;
+ MYSQLND_CONNECTION_STATE * connection_state = packet->header.connection_state;
zend_uchar buf[SHA256_PK_REQUEST_RESP_BUFFER_SIZE];
zend_uchar *p = buf;
- zend_uchar *begin = buf;
- MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE * packet= (MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE *) _packet;
+ const zend_uchar * const begin = buf;
DBG_ENTER("php_mysqlnd_sha256_pk_request_response_read");
/* leave space for terminating safety \0 */
- PACKET_READ_HEADER_AND_BODY(packet, conn, buf, sizeof(buf), "SHA256_PK_REQUEST_RESPONSE", PROT_SHA256_PK_REQUEST_RESPONSE_PACKET);
+ if (FAIL == mysqlnd_read_packet_header_and_body(&(packet->header), pfc, vio, stats, error_info, connection_state, buf, sizeof(buf), "SHA256_PK_REQUEST_RESPONSE", PROT_SHA256_PK_REQUEST_RESPONSE_PACKET)) {
+ DBG_RETURN(FAIL);
+ }
BAIL_IF_NO_MORE_DATA;
p++;
@@ -2305,12 +2368,20 @@ mysqlnd_packet_methods packet_methods[PROT_LAST] =
/* {{{ mysqlnd_protocol::get_greet_packet */
static struct st_mysqlnd_packet_greet *
-MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_greet * packet = mnd_pecalloc(1, packet_methods[PROT_GREET_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_greet_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_GREET_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2320,12 +2391,21 @@ MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL * const prot
/* {{{ mysqlnd_protocol::get_auth_packet */
static struct st_mysqlnd_packet_auth *
-MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_auth * packet = mnd_pecalloc(1, packet_methods[PROT_AUTH_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_auth_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_AUTH_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.conn = factory->conn;
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2335,12 +2415,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const proto
/* {{{ mysqlnd_protocol::get_auth_response_packet */
static struct st_mysqlnd_packet_auth_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_auth_response * packet = mnd_pecalloc(1, packet_methods[PROT_AUTH_RESP_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_auth_response_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_AUTH_RESP_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2350,12 +2438,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet)(MYSQLND_PROTOCOL * co
/* {{{ mysqlnd_protocol::get_change_auth_response_packet */
static struct st_mysqlnd_packet_change_auth_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_change_auth_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_change_auth_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_change_auth_response * packet = mnd_pecalloc(1, packet_methods[PROT_CHANGE_AUTH_RESP_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_change_auth_response_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_CHANGE_AUTH_RESP_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2365,12 +2461,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_change_auth_response_packet)(MYSQLND_PROTOC
/* {{{ mysqlnd_protocol::get_ok_packet */
static struct st_mysqlnd_packet_ok *
-MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_ok * packet = mnd_pecalloc(1, packet_methods[PROT_OK_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_ok_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_OK_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2380,12 +2484,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL * const protoco
/* {{{ mysqlnd_protocol::get_eof_packet */
static struct st_mysqlnd_packet_eof *
-MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_eof * packet = mnd_pecalloc(1, packet_methods[PROT_EOF_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_eof_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_EOF_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2395,12 +2507,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL * const protoc
/* {{{ mysqlnd_protocol::get_command_packet */
static struct st_mysqlnd_packet_command *
-MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_command * packet = mnd_pecalloc(1, packet_methods[PROT_CMD_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_command_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_CMD_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2410,12 +2530,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL * const pr
/* {{{ mysqlnd_protocol::get_rset_packet */
static struct st_mysqlnd_packet_rset_header *
-MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_rset_header * packet = mnd_pecalloc(1, packet_methods[PROT_RSET_HEADER_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_rset_header_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_RSET_HEADER_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2425,12 +2553,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL * cons
/* {{{ mysqlnd_protocol::get_result_field_packet */
static struct st_mysqlnd_packet_res_field *
-MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_res_field * packet = mnd_pecalloc(1, packet_methods[PROT_RSET_FLD_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_result_field_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_RSET_FLD_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2440,12 +2576,21 @@ MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL * con
/* {{{ mysqlnd_protocol::get_row_packet */
static struct st_mysqlnd_packet_row *
-MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_row * packet = mnd_pecalloc(1, packet_methods[PROT_ROW_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_row_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_ROW_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.conn = factory->conn;
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2455,12 +2600,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL * const protoc
/* {{{ mysqlnd_protocol::get_stats_packet */
static struct st_mysqlnd_packet_stats *
-MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_stats * packet = mnd_pecalloc(1, packet_methods[PROT_STATS_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_stats_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_STATS_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2470,12 +2623,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const prot
/* {{{ mysqlnd_protocol::get_prepare_response_packet */
static struct st_mysqlnd_packet_prepare_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_prepare_response * packet = mnd_pecalloc(1, packet_methods[PROT_PREPARE_RESP_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_prepare_response_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_PREPARE_RESP_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2485,12 +2646,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL *
/* {{{ mysqlnd_protocol::get_change_user_response_packet */
static struct st_mysqlnd_packet_chg_user_resp*
-MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_chg_user_resp * packet = mnd_pecalloc(1, packet_methods[PROT_CHG_USER_RESP_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_change_user_response_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_CHG_USER_RESP_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2500,12 +2669,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOC
/* {{{ mysqlnd_protocol::get_sha256_pk_request_packet */
static struct st_mysqlnd_packet_sha256_pk_request *
-MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_sha256_pk_request * packet = mnd_pecalloc(1, packet_methods[PROT_SHA256_PK_REQUEST_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_sha256_pk_request_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2515,12 +2692,20 @@ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet)(MYSQLND_PROTOCOL
/* {{{ mysqlnd_protocol::get_sha256_pk_request_response_packet */
static struct st_mysqlnd_packet_sha256_pk_request_response *
-MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent)
+MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory, const zend_bool persistent)
{
struct st_mysqlnd_packet_sha256_pk_request_response * packet = mnd_pecalloc(1, packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET].struct_size, persistent);
DBG_ENTER("mysqlnd_protocol::get_sha256_pk_request_response_packet");
if (packet) {
packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET];
+ packet->header.factory = factory;
+
+ packet->header.protocol_frame_codec = factory->conn->protocol_frame_codec;
+ packet->header.vio = factory->conn->vio;
+ packet->header.stats = factory->conn->stats;
+ packet->header.error_info = factory->conn->error_info;
+ packet->header.connection_state = &factory->conn->state;
+
packet->header.persistent = persistent;
}
DBG_RETURN(packet);
@@ -2528,8 +2713,220 @@ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)(MYSQLND_
/* }}} */
+/* {{{ mysqlnd_protocol::send_command */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_protocol, send_command)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory,
+ const enum php_mysqlnd_server_command command,
+ const zend_uchar * const arg, const size_t arg_len,
+ const zend_bool silent,
+
+ struct st_mysqlnd_connection_state * connection_state,
+ MYSQLND_ERROR_INFO * error_info,
+ MYSQLND_UPSERT_STATUS * upsert_status,
+ MYSQLND_STATS * stats,
+ func_mysqlnd_conn_data__send_close send_close,
+ void * send_close_ctx)
+{
+ enum_func_status ret = PASS;
+ MYSQLND_PACKET_COMMAND * cmd_packet = NULL;
+ enum mysqlnd_connection_state state;
+ DBG_ENTER("mysqlnd_protocol::send_command");
+ DBG_INF_FMT("command=%s silent=%u", mysqlnd_command_to_text[command], silent);
+ DBG_INF_FMT("server_status=%u", UPSERT_STATUS_GET_SERVER_STATUS(upsert_status));
+ DBG_INF_FMT("sending %u bytes", arg_len + 1); /* + 1 is for the command */
+ state = connection_state->m->get(connection_state);
+
+ switch (state) {
+ case CONN_READY:
+ break;
+ case CONN_QUIT_SENT:
+ SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone);
+ DBG_ERR("Server is gone");
+ DBG_RETURN(FAIL);
+ default:
+ SET_CLIENT_ERROR(error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync);
+ DBG_ERR_FMT("Command out of sync. State=%u", state);
+ DBG_RETURN(FAIL);
+ }
+
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(upsert_status);
+ SET_EMPTY_ERROR(error_info);
+
+ cmd_packet = payload_decoder_factory->m.get_command_packet(payload_decoder_factory, FALSE);
+ if (!cmd_packet) {
+ SET_OOM_ERROR(error_info);
+ DBG_RETURN(FAIL);
+ }
+
+ cmd_packet->command = command;
+ if (arg && arg_len) {
+ cmd_packet->argument.s = (char *) arg;
+ cmd_packet->argument.l = arg_len;
+ }
+
+ MYSQLND_INC_CONN_STATISTIC(stats, STAT_COM_QUIT + command - 1 /* because of COM_SLEEP */ );
+
+ if (! PACKET_WRITE(cmd_packet)) {
+ if (!silent) {
+ DBG_ERR_FMT("Error while sending %s packet", mysqlnd_command_to_text[command]);
+ php_error(E_WARNING, "Error while sending %s packet. PID=%d", mysqlnd_command_to_text[command], getpid());
+ }
+ connection_state->m->set(connection_state, CONN_QUIT_SENT);
+ send_close(send_close_ctx);
+ DBG_ERR("Server is gone");
+ ret = FAIL;
+ }
+ PACKET_FREE(cmd_packet);
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_protocol::send_command_handle_OK */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory,
+ MYSQLND_ERROR_INFO * const error_info,
+ MYSQLND_UPSERT_STATUS * const upsert_status,
+ const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */
+ MYSQLND_STRING * const last_message,
+ const zend_bool last_message_persistent)
+{
+ enum_func_status ret = FAIL;
+ MYSQLND_PACKET_OK * ok_response = payload_decoder_factory->m.get_ok_packet(payload_decoder_factory, FALSE);
+
+ DBG_ENTER("mysqlnd_protocol::send_command_handle_OK");
+ if (!ok_response) {
+ SET_OOM_ERROR(error_info);
+ DBG_RETURN(FAIL);
+ }
+ if (FAIL == (ret = PACKET_READ(ok_response))) {
+ DBG_INF("Error while reading OK packet");
+ SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
+ goto end;
+ }
+ DBG_INF_FMT("OK from server");
+ if (0xFF == ok_response->field_count) {
+ /* The server signalled error. Set the error */
+ SET_CLIENT_ERROR(error_info, ok_response->error_no, ok_response->sqlstate, ok_response->error);
+ ret = FAIL;
+ /*
+ Cover a protocol design error: error packet does not
+ contain the server status. Therefore, the client has no way
+ to find out whether there are more result sets of
+ a multiple-result-set statement pending. Luckily, in 5.0 an
+ error always aborts execution of a statement, wherever it is
+ a multi-statement or a stored procedure, so it should be
+ safe to unconditionally turn off the flag here.
+ */
+ upsert_status->server_status &= ~SERVER_MORE_RESULTS_EXISTS;
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(upsert_status);
+ } else {
+ SET_NEW_MESSAGE(last_message->s, last_message->l,
+ ok_response->message, ok_response->message_len,
+ last_message_persistent);
+ if (!ignore_upsert_status) {
+ UPSERT_STATUS_RESET(upsert_status);
+ UPSERT_STATUS_SET_WARNINGS(upsert_status, ok_response->warning_count);
+ UPSERT_STATUS_SET_SERVER_STATUS(upsert_status, ok_response->server_status);
+ UPSERT_STATUS_SET_AFFECTED_ROWS(upsert_status, ok_response->affected_rows);
+ UPSERT_STATUS_SET_LAST_INSERT_ID(upsert_status, ok_response->last_insert_id);
+ } else {
+ /* LOAD DATA */
+ }
+ }
+end:
+ PACKET_FREE(ok_response);
+ DBG_INF(ret == PASS ? "PASS":"FAIL");
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ mysqlnd_protocol::send_command_handle_EOF */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_EOF)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory,
+ MYSQLND_ERROR_INFO * const error_info,
+ MYSQLND_UPSERT_STATUS * const upsert_status)
+{
+ enum_func_status ret = FAIL;
+ MYSQLND_PACKET_EOF * response = payload_decoder_factory->m.get_eof_packet(payload_decoder_factory, FALSE);
+
+ DBG_ENTER("mysqlnd_protocol::send_command_handle_EOF");
+
+ if (!response) {
+ SET_OOM_ERROR(error_info);
+ DBG_RETURN(FAIL);
+ }
+ if (FAIL == (ret = PACKET_READ(response))) {
+ DBG_INF("Error while reading EOF packet");
+ SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
+ } else if (0xFF == response->field_count) {
+ /* The server signalled error. Set the error */
+ DBG_INF_FMT("Error_no=%d SQLstate=%s Error=%s", response->error_no, response->sqlstate, response->error);
+
+ SET_CLIENT_ERROR(error_info, response->error_no, response->sqlstate, response->error);
+
+ UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(upsert_status);
+ } else if (0xFE != response->field_count) {
+ SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
+ DBG_ERR_FMT("EOF packet expected, field count wasn't 0xFE but 0x%2X", response->field_count);
+ php_error_docref(NULL, E_WARNING, "EOF packet expected, field count wasn't 0xFE but 0x%2X", response->field_count);
+ } else {
+ DBG_INF_FMT("EOF from server");
+ }
+ PACKET_FREE(response);
+
+ DBG_INF(ret == PASS ? "PASS":"FAIL");
+ DBG_RETURN(ret);
+}
+/* }}} */
+
+
+/* {{{ send_command_handle_response */
+static enum_func_status
+MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_response)(
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * payload_decoder_factory,
+ const enum mysqlnd_packet_type ok_packet,
+ const zend_bool silent,
+ const enum php_mysqlnd_server_command command,
+ const zend_bool ignore_upsert_status, /* actually used only by LOAD DATA. COM_QUERY and COM_EXECUTE handle the responses themselves */
+
+ MYSQLND_ERROR_INFO * error_info,
+ MYSQLND_UPSERT_STATUS * upsert_status,
+ MYSQLND_STRING * last_message,
+ zend_bool last_message_persistent
+ )
+{
+ enum_func_status ret = FAIL;
+
+ DBG_ENTER("mysqlnd_protocol::send_command_handle_response");
+ DBG_INF_FMT("silent=%u packet=%u command=%s", silent, ok_packet, mysqlnd_command_to_text[command]);
+
+ switch (ok_packet) {
+ case PROT_OK_PACKET:
+ ret = payload_decoder_factory->m.send_command_handle_OK(payload_decoder_factory, error_info, upsert_status, ignore_upsert_status, last_message, last_message_persistent);
+ break;
+ case PROT_EOF_PACKET:
+ ret = payload_decoder_factory->m.send_command_handle_EOF(payload_decoder_factory, error_info, upsert_status);
+ break;
+ default:
+ SET_CLIENT_ERROR(error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet");
+ php_error_docref(NULL, E_ERROR, "Wrong response packet %u passed to the function", ok_packet);
+ break;
+ }
+ if (!silent && error_info->error_no == CR_MALFORMED_PACKET) {
+ php_error_docref(NULL, E_WARNING, "Error while reading %s's response packet. PID=%d", mysqlnd_command_to_text[command], getpid());
+ }
+ DBG_INF(ret == PASS ? "PASS":"FAIL");
+ DBG_RETURN(ret);
+}
+/* }}} */
-MYSQLND_CLASS_METHODS_START(mysqlnd_protocol)
+
+MYSQLND_CLASS_METHODS_START(mysqlnd_protocol_payload_decoder_factory)
MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_auth_response_packet),
@@ -2544,31 +2941,36 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_protocol)
MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet),
MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_packet),
- MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet)
+ MYSQLND_METHOD(mysqlnd_protocol, get_sha256_pk_request_response_packet),
+
+ MYSQLND_METHOD(mysqlnd_protocol, send_command),
+ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_response),
+ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_OK),
+ MYSQLND_METHOD(mysqlnd_protocol, send_command_handle_EOF),
MYSQLND_CLASS_METHODS_END;
-/* {{{ mysqlnd_protocol_init */
-PHPAPI MYSQLND_PROTOCOL *
-mysqlnd_protocol_init(zend_bool persistent)
+/* {{{ mysqlnd_protocol_payload_decoder_factory_init */
+PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY *
+mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const zend_bool persistent)
{
- MYSQLND_PROTOCOL * ret;
- DBG_ENTER("mysqlnd_protocol_init");
- ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).get_protocol_decoder(persistent);
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * ret;
+ DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_init");
+ ret = MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory).get_protocol_payload_decoder_factory(conn, persistent);
DBG_RETURN(ret);
}
/* }}} */
-/* {{{ mysqlnd_protocol_free */
+/* {{{ mysqlnd_protocol_payload_decoder_factory_free */
PHPAPI void
-mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol)
+mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const factory)
{
- DBG_ENTER("mysqlnd_protocol_free");
+ DBG_ENTER("mysqlnd_protocol_payload_decoder_factory_free");
- if (protocol) {
- zend_bool pers = protocol->persistent;
- mnd_pefree(protocol, pers);
+ if (factory) {
+ zend_bool pers = factory->persistent;
+ mnd_pefree(factory, pers);
}
DBG_VOID_RETURN;
}
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h
index 26b90c6750..337143fb9f 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.h
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,19 +12,14 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
-
#ifndef MYSQLND_WIREPROTOCOL_H
#define MYSQLND_WIREPROTOCOL_H
-#include "mysqlnd_net.h"
-
#define MYSQLND_HEADER_SIZE 4
#define COMPRESSED_HEADER_SIZE 3
@@ -36,8 +31,8 @@ PHPAPI extern const char mysqlnd_read_body_name[];
/* Packet handling */
-#define PACKET_WRITE(packet, conn) ((packet)->header.m->write_to_net((packet), (conn)))
-#define PACKET_READ(packet, conn) ((packet)->header.m->read_from_net((packet), (conn)))
+#define PACKET_WRITE(packet) ((packet)->header.m->write_to_net((packet)))
+#define PACKET_READ(packet) ((packet)->header.m->read_from_net((packet)))
#define PACKET_FREE(packet) \
do { \
DBG_INF_FMT("PACKET_FREE(%p)", packet); \
@@ -51,17 +46,26 @@ PHPAPI extern const char * const mysqlnd_command_to_text[COM_END];
/* Low-level extraction functionality */
typedef struct st_mysqlnd_packet_methods {
size_t struct_size;
- enum_func_status (*read_from_net)(void * packet, MYSQLND_CONN_DATA * conn);
- size_t (*write_to_net)(void * packet, MYSQLND_CONN_DATA * conn);
+ enum_func_status (*read_from_net)(void * packet);
+ size_t (*write_to_net)(void * packet);
void (*free_mem)(void *packet, zend_bool stack_allocation);
} mysqlnd_packet_methods;
typedef struct st_mysqlnd_packet_header {
size_t size;
- mysqlnd_packet_methods *m;
zend_uchar packet_no;
zend_bool persistent;
+
+ mysqlnd_packet_methods *m;
+
+ MYSQLND_CONN_DATA * conn;
+ MYSQLND_PFC * protocol_frame_codec;
+ MYSQLND_VIO * vio;
+ MYSQLND_ERROR_INFO * error_info;
+ MYSQLND_STATS * stats;
+ MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * factory;
+ MYSQLND_CONNECTION_STATE * connection_state;
} MYSQLND_PACKET_HEADER;
/* Server greets the client */
@@ -70,9 +74,8 @@ typedef struct st_mysqlnd_packet_greet {
uint8_t protocol_version;
char *server_version;
uint32_t thread_id;
- zend_uchar intern_auth_plugin_data[SCRAMBLE_LENGTH];
- zend_uchar * auth_plugin_data;
- size_t auth_plugin_data_len;
+ char intern_auth_plugin_data[SCRAMBLE_LENGTH];
+ MYSQLND_STRING authentication_plugin_data;
/* 1 byte pad */
uint32_t server_capabilities;
uint8_t charset_no;
@@ -157,8 +160,7 @@ typedef struct st_mysqlnd_packet_ok {
typedef struct st_mysqlnd_packet_command {
MYSQLND_PACKET_HEADER header;
enum php_mysqlnd_server_command command;
- const zend_uchar *argument;
- size_t arg_len;
+ MYSQLND_CSTRING argument;
} MYSQLND_PACKET_COMMAND;
@@ -178,7 +180,7 @@ typedef struct st_mysqlnd_packet_eof {
/* Result Set header*/
typedef struct st_mysqlnd_packet_rset_header {
- MYSQLND_PACKET_HEADER header;
+ MYSQLND_PACKET_HEADER header;
/*
0x00 => ok
~0 => LOAD DATA LOCAL
@@ -195,8 +197,7 @@ typedef struct st_mysqlnd_packet_rset_header {
uint64_t affected_rows;
uint64_t last_insert_id;
/* This is for both LOAD DATA or info, when no result set */
- char *info_or_local_file;
- size_t info_or_local_file_len;
+ MYSQLND_STRING info_or_local_file;
/* If error packet, we use these */
MYSQLND_ERROR_INFO error_info;
} MYSQLND_PACKET_RSET_HEADER;
@@ -208,7 +209,6 @@ typedef struct st_mysqlnd_packet_res_field {
MYSQLND_FIELD *metadata;
/* For table definitions, empty for result sets */
zend_bool skip_parsing;
- zend_bool stupid_list_fields_eof;
zend_bool persistent_alloc;
MYSQLND_ERROR_INFO error_info;
@@ -247,9 +247,7 @@ typedef struct st_mysqlnd_packet_row {
/* Statistics packet */
typedef struct st_mysqlnd_packet_stats {
MYSQLND_PACKET_HEADER header;
- char *message;
- /* message_len is not part of the packet*/
- size_t message_len;
+ MYSQLND_STRING message;
} MYSQLND_PACKET_STATS;
@@ -298,10 +296,8 @@ typedef struct st_mysqlnd_packet_sha256_pk_request_response {
} MYSQLND_PACKET_SHA256_PK_REQUEST_RESPONSE;
-PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, size_t pass_len);
-
-zend_ulong php_mysqlnd_net_field_length(zend_uchar **packet);
-zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length);
+zend_ulong php_mysqlnd_net_field_length(const zend_uchar **packet);
+zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, const uint64_t length);
size_t php_mysqlnd_net_store_length_size(uint64_t length);
PHPAPI const extern char * const mysqlnd_empty_string;
@@ -320,8 +316,8 @@ enum_func_status php_mysqlnd_rowp_read_text_protocol_c(MYSQLND_MEMORY_POOL_CHUNK
zend_bool as_int_or_float, MYSQLND_STATS * stats);
-PHPAPI MYSQLND_PROTOCOL * mysqlnd_protocol_init(zend_bool persistent);
-PHPAPI void mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol);
+PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decoder_factory_init(MYSQLND_CONN_DATA * conn, const zend_bool persistent);
+PHPAPI void mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory);
#endif /* MYSQLND_WIREPROTOCOL_H */
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c
index 5f1bf05217..87e5009183 100644
--- a/ext/mysqlnd/php_mysqlnd.c
+++ b/ext/mysqlnd/php_mysqlnd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,15 +12,12 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#include "php.h"
-#include "php_ini.h"
#include "mysqlnd.h"
#include "mysqlnd_priv.h"
#include "mysqlnd_debug.h"
@@ -361,7 +358,7 @@ zend_module_entry mysqlnd_module_entry = {
/* {{{ COMPILE_DL_MYSQLND */
#ifdef COMPILE_DL_MYSQLND
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(mysqlnd)
#endif
diff --git a/ext/mysqlnd/php_mysqlnd.h b/ext/mysqlnd/php_mysqlnd.h
index a012ff3528..87e6a75b07 100644
--- a/ext/mysqlnd/php_mysqlnd.h
+++ b/ext/mysqlnd/php_mysqlnd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -12,12 +12,9 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Andrey Hristov <andrey@mysql.com> |
- | Ulf Wendel <uwendel@mysql.com> |
- | Georg Richter <georg@mysql.com> |
+ | Authors: Andrey Hristov <andrey@php.net> |
+ | Ulf Wendel <uw@php.net> |
+----------------------------------------------------------------------+
-
- $Id$
*/
#ifndef PHP_MYSQLND_H
diff --git a/ext/oci8/LICENSE b/ext/oci8/LICENSE
index 6059c80e12..e0bc44cac1 100644
--- a/ext/oci8/LICENSE
+++ b/ext/oci8/LICENSE
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.01
-Copyright (c) 1999 - 2014 The PHP Group. All rights reserved.
+Copyright (c) 1999 - 2016 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/ext/oci8/README b/ext/oci8/README
index d662072743..42833e27c0 100644
--- a/ext/oci8/README
+++ b/ext/oci8/README
@@ -5,16 +5,22 @@ Use the OCI8 extension to access Oracle Database.
Documentation is at http://php.net/oci8
-The extension can be linked with Oracle client libraries from Oracle
-Database 10.2, 11, or 12.1. These libraries are found in the database
-installation, or in the free Oracle Instant Client available from
-Oracle.
+PHP OCI8 2.1 builds with PHP 7.
+
+Use 'pecl install oci8' to install OCI8 for PHP 7.
+
+Use 'pecl install oci8-2.0.10' to install OCI8 for PHP 5.2 - PHP 5.6.
+
+Use 'pecl install oci8-1.4.10' to install OCI8 for PHP 4.3.9 - PHP 5.1.
+
+The OCI8 extension needs to be linked with Oracle 12.1, 11, or 10.2
+client libraries. These libraries are found in your database
+installation, or in the free Oracle Instant Client from
+http://www.oracle.com/technetwork/database/features/instant-client/
+Install the 'Basic' or 'Basic Lite' Instant Client package. If
+building from source, then also install the SDK package.
Oracle's standard cross-version connectivity applies. For example,
PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
Database 9.2 onward. See Oracle's note "Oracle Client / Server
Interoperability Support" (ID 207303.1) for details.
-
-PHP OCI8 2.0 can be built with PHP 5.2 onward. Use the older PHP OCI8
-1.4.10 when using PHP 4.3.9 through to PHP 5.1.x, or when only Oracle
-Database 9.2 client libraries are available.
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index f431dcaba9..120f055a3a 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -40,6 +40,9 @@
/* PHP 5.2 is the minimum supported version for OCI8 2.0 */
#if PHP_MAJOR_VERSION < 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION <= 1)
#error Use PHP OCI8 1.4 for your version of PHP
+#elif PHP_MAJOR_VERSION < 7
+/* PHP 7 is the minimum supported version for OCI8 2.1 */
+#error Use PHP OCI8 2.0 for your version of PHP
#endif
#include "php_oci8.h"
@@ -100,19 +103,6 @@ zend_class_entry *oci_coll_class_entry_ptr;
#define SQLT_CFILEE 115
#endif
-#ifdef OCI_ERROR_MAXMSG_SIZE2
-/* Bigger size is defined from 11.2.0.3 onwards */
-#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE2
-#else
-#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE
-#endif
-
-#if ZEND_MODULE_API_NO > 20020429
-#define ONUPDATELONGFUNC OnUpdateLong
-#else
-#define ONUPDATELONGFUNC OnUpdateInt
-#endif
-
#ifdef ZTS
#define PHP_OCI_INIT_MODE (OCI_DEFAULT | OCI_OBJECT | OCI_THREADED | OCI_NO_MUTEX)
#else
@@ -148,8 +138,6 @@ ZEND_GET_MODULE(oci8)
#endif /* COMPILE_DL */
/* }}} */
-#if defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3)
-
/* {{{ Function arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_define_by_name, 0, 0, 3)
ZEND_ARG_INFO(0, statement_resource)
@@ -645,118 +633,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim_method, 0, 0, 1)
ZEND_END_ARG_INFO()
/* }}} */
-#else /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
-/* {{{ Keep the old arginfo behavior when building with PHP 4 */
-
-static unsigned char arginfo_ocifetchinto[] = { 2, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_fetch_all[] = { 2, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_define_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_bind_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_bind_array_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-
-#define arginfo_oci_free_descriptor NULL
-#define arginfo_oci_lob_save NULL
-#define arginfo_oci_lob_import NULL
-#define arginfo_oci_lob_load NULL
-#define arginfo_oci_lob_read NULL
-#define arginfo_oci_lob_eof NULL
-#define arginfo_oci_lob_tell NULL
-#define arginfo_oci_lob_rewind NULL
-#define arginfo_oci_lob_seek NULL
-#define arginfo_oci_lob_size NULL
-#define arginfo_oci_lob_write NULL
-#define arginfo_oci_lob_append NULL
-#define arginfo_oci_lob_truncate NULL
-#define arginfo_oci_lob_erase NULL
-#define arginfo_oci_lob_flush NULL
-#define arginfo_ocisetbufferinglob NULL
-#define arginfo_ocigetbufferinglob NULL
-#define arginfo_oci_lob_copy NULL
-#define arginfo_oci_lob_is_equal NULL
-#define arginfo_oci_lob_export NULL
-#define arginfo_oci_new_descriptor NULL
-#define arginfo_oci_rollback NULL
-#define arginfo_oci_commit NULL
-#define arginfo_oci_field_name NULL
-#define arginfo_oci_field_size NULL
-#define arginfo_oci_field_scale NULL
-#define arginfo_oci_field_precision NULL
-#define arginfo_oci_field_type NULL
-#define arginfo_oci_field_type_raw NULL
-#define arginfo_oci_field_is_null NULL
-#define arginfo_oci_internal_debug NULL
-#define arginfo_oci_execute NULL
-#define arginfo_oci_cancel NULL
-#define arginfo_oci_fetch NULL
-#define arginfo_oci_fetch_object NULL
-#define arginfo_oci_fetch_row NULL
-#define arginfo_oci_fetch_assoc NULL
-#define arginfo_oci_fetch_array NULL
-#define arginfo_oci_free_statement NULL
-#define arginfo_oci_close NULL
-#define arginfo_oci_new_connect NULL
-#define arginfo_oci_connect NULL
-#define arginfo_oci_pconnect NULL
-#define arginfo_oci_error NULL
-#define arginfo_oci_num_fields NULL
-#define arginfo_oci_parse NULL
-#define arginfo_oci_get_implicit_resultset NULL
-#define arginfo_oci_set_prefetch NULL
-#define arginfo_oci_set_client_identifier NULL
-#define arginfo_oci_set_edition NULL
-#define arginfo_oci_set_module_name NULL
-#define arginfo_oci_set_action NULL
-#define arginfo_oci_set_client_info NULL
-#ifdef WAITIING_ORACLE_BUG_16695981_FIX
-#define arginfo_oci_set_db_operation NULL
-#endif
-#define arginfo_oci_password_change NULL
-#define arginfo_oci_new_cursor NULL
-#define arginfo_oci_result NULL
-#define arginfo_oci_client_version NULL
-#define arginfo_oci_server_version NULL
-#define arginfo_oci_statement_type NULL
-#define arginfo_oci_num_rows NULL
-#define arginfo_oci_free_collection NULL
-#define arginfo_oci_collection_append NULL
-#define arginfo_oci_collection_element_get NULL
-#define arginfo_oci_collection_assign NULL
-#define arginfo_oci_collection_element_assign NULL
-#define arginfo_oci_collection_size NULL
-#define arginfo_oci_collection_max NULL
-#define arginfo_oci_collection_trim NULL
-#define arginfo_oci_new_collection NULL
-#define arginfo_oci_lob_size_method NULL
-#define arginfo_oci_lob_getbuffering_method NULL
-#define arginfo_oci_lob_close_method NULL
-#define arginfo_oci_lob_save_method NULL
-#define arginfo_oci_lob_import_method NULL
-#define arginfo_oci_lob_read_method NULL
-#define arginfo_oci_lob_seek_method NULL
-#define arginfo_oci_lob_write_method NULL
-#define arginfo_oci_lob_append_method NULL
-#define arginfo_oci_lob_truncate_method NULL
-#define arginfo_oci_lob_erase_method NULL
-#define arginfo_oci_lob_flush_method NULL
-#define arginfo_oci_lob_setbuffering_method NULL
-#define arginfo_oci_lob_export_method NULL
-#define arginfo_oci_lob_write_temporary_method NULL
-#define arginfo_oci_lob_load_method NULL
-#define arginfo_oci_lob_tell_method NULL
-#define arginfo_oci_lob_rewind_method NULL
-#define arginfo_oci_lob_eof_method NULL
-#define arginfo_oci_free_descriptor_method NULL
-#define arginfo_oci_collection_append_method NULL
-#define arginfo_oci_collection_element_get_method NULL
-#define arginfo_oci_collection_assign_method NULL
-#define arginfo_oci_collection_size_method NULL
-#define arginfo_oci_collection_element_assign_method NULL
-#define arginfo_oci_collection_max_method NULL
-#define arginfo_oci_collection_trim_method NULL
-#define arginfo_oci_collection_free_method NULL
-/* }}} */
-#endif /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
-
/* {{{ extension function prototypes
*/
PHP_FUNCTION(oci_bind_by_name);
@@ -843,12 +719,7 @@ PHP_FUNCTION(oci_collection_trim);
/* {{{ extension definition structures
*/
-static
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 2) || (PHP_MAJOR_VERSION > 5)
-/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-const
-#endif
-zend_function_entry php_oci_functions[] = {
+static const zend_function_entry php_oci_functions[] = {
PHP_FE(oci_define_by_name, arginfo_oci_define_by_name)
PHP_FE(oci_bind_by_name, arginfo_oci_bind_by_name)
PHP_FE(oci_bind_array_by_name, arginfo_oci_bind_array_by_name)
@@ -974,19 +845,10 @@ zend_function_entry php_oci_functions[] = {
PHP_FALIAS(ocicollsize, oci_collection_size, arginfo_oci_collection_size)
PHP_FALIAS(ocicollmax, oci_collection_max, arginfo_oci_collection_max)
PHP_FALIAS(ocicolltrim, oci_collection_trim, arginfo_oci_collection_trim)
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 7) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) || (PHP_MAJOR_VERSION > 5)
PHP_FE_END
-#else
- {NULL,NULL,NULL}
-#endif
};
-static
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 2) || (PHP_MAJOR_VERSION > 5)
-/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-const
-#endif
-zend_function_entry php_oci_lob_class_functions[] = {
+static const zend_function_entry php_oci_lob_class_functions[] = {
PHP_FALIAS(load, oci_lob_load, arginfo_oci_lob_load_method)
PHP_FALIAS(tell, oci_lob_tell, arginfo_oci_lob_tell_method)
PHP_FALIAS(truncate, oci_lob_truncate, arginfo_oci_lob_truncate_method)
@@ -1009,19 +871,10 @@ zend_function_entry php_oci_lob_class_functions[] = {
PHP_FALIAS(save, oci_lob_save, arginfo_oci_lob_save_method)
PHP_FALIAS(savefile, oci_lob_import, arginfo_oci_lob_import_method)
PHP_FALIAS(free, oci_free_descriptor, arginfo_oci_free_descriptor_method)
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 7) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) || (PHP_MAJOR_VERSION > 5)
PHP_FE_END
-#else
- {NULL,NULL,NULL}
-#endif
};
-static
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 2) || (PHP_MAJOR_VERSION > 5)
-/* This "if" allows PECL builds from this file to be portable to older PHP releases */
-const
-#endif
-zend_function_entry php_oci_coll_class_functions[] = {
+static const zend_function_entry php_oci_coll_class_functions[] = {
PHP_FALIAS(append, oci_collection_append, arginfo_oci_collection_append_method)
PHP_FALIAS(getelem, oci_collection_element_get, arginfo_oci_collection_element_get_method)
PHP_FALIAS(assignelem, oci_collection_element_assign, arginfo_oci_collection_element_assign_method)
@@ -1030,11 +883,7 @@ zend_function_entry php_oci_coll_class_functions[] = {
PHP_FALIAS(max, oci_collection_max, arginfo_oci_collection_max_method)
PHP_FALIAS(trim, oci_collection_trim, arginfo_oci_collection_trim_method)
PHP_FALIAS(free, oci_free_collection, arginfo_oci_collection_free_method)
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION >= 7) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 4) || (PHP_MAJOR_VERSION > 5)
PHP_FE_END
-#else
- {NULL,NULL,NULL}
-#endif
};
zend_module_entry oci8_module_entry = {
@@ -1057,12 +906,12 @@ zend_module_entry oci8_module_entry = {
/* {{{ PHP_INI */
PHP_INI_BEGIN()
- STD_PHP_INI_ENTRY( "oci8.max_persistent", "-1", PHP_INI_SYSTEM, ONUPDATELONGFUNC, max_persistent, zend_oci_globals, oci_globals)
- STD_PHP_INI_ENTRY( "oci8.persistent_timeout", "-1", PHP_INI_SYSTEM, ONUPDATELONGFUNC, persistent_timeout, zend_oci_globals, oci_globals)
- STD_PHP_INI_ENTRY( "oci8.ping_interval", "60", PHP_INI_SYSTEM, ONUPDATELONGFUNC, ping_interval, zend_oci_globals, oci_globals)
+ STD_PHP_INI_ENTRY( "oci8.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateLong, max_persistent, zend_oci_globals, oci_globals)
+ STD_PHP_INI_ENTRY( "oci8.persistent_timeout", "-1", PHP_INI_SYSTEM, OnUpdateLong, persistent_timeout, zend_oci_globals, oci_globals)
+ STD_PHP_INI_ENTRY( "oci8.ping_interval", "60", PHP_INI_SYSTEM, OnUpdateLong, ping_interval, zend_oci_globals, oci_globals)
STD_PHP_INI_BOOLEAN("oci8.privileged_connect", "0", PHP_INI_SYSTEM, OnUpdateBool, privileged_connect, zend_oci_globals, oci_globals)
- STD_PHP_INI_ENTRY( "oci8.statement_cache_size", "20", PHP_INI_SYSTEM, ONUPDATELONGFUNC, statement_cache_size, zend_oci_globals, oci_globals)
- STD_PHP_INI_ENTRY( "oci8.default_prefetch", "100", PHP_INI_SYSTEM, ONUPDATELONGFUNC, default_prefetch, zend_oci_globals, oci_globals)
+ STD_PHP_INI_ENTRY( "oci8.statement_cache_size", "20", PHP_INI_SYSTEM, OnUpdateLong, statement_cache_size, zend_oci_globals, oci_globals)
+ STD_PHP_INI_ENTRY( "oci8.default_prefetch", "100", PHP_INI_SYSTEM, OnUpdateLong, default_prefetch, zend_oci_globals, oci_globals)
STD_PHP_INI_BOOLEAN("oci8.old_oci_close_semantics", "0", PHP_INI_SYSTEM, OnUpdateBool, old_oci_close_semantics,zend_oci_globals, oci_globals)
#if (OCI_MAJOR_VERSION >= 11)
STD_PHP_INI_ENTRY( "oci8.connection_class", "", PHP_INI_ALL, OnUpdateString, connection_class, zend_oci_globals, oci_globals)
@@ -1084,7 +933,7 @@ static void php_oci_init_global_handles(void)
{
sword errstatus;
sb4 ora_error_code = 0;
- text tmp_buf[OCI_ERROR_MAXMSG_SIZE]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
+ text tmp_buf[PHP_OCI_ERRBUF_LEN]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
errstatus = OCIEnvNlsCreate(&OCI_G(env), PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, 0, 0);
@@ -1095,7 +944,7 @@ static void php_oci_init_global_handles(void)
php_error_docref(NULL, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right directories");
#endif
if (OCI_G(env)
- && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+ && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
&& *tmp_buf) {
php_error_docref(NULL, E_WARNING, "%s", tmp_buf);
}
@@ -1124,10 +973,10 @@ static void php_oci_init_global_handles(void)
PHP_OCI_CALL(OCIHandleFree, (cpoolh, OCI_HTYPE_CPOOL));
#endif
} else {
- OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ERROR);
+ OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR);
if (ora_error_code) {
- int tmp_buf_len = strlen((char *)tmp_buf);
+ int tmp_buf_len = (int) strlen((char *)tmp_buf);
if (tmp_buf_len > 0 && tmp_buf[tmp_buf_len - 1] == '\n') {
tmp_buf[tmp_buf_len - 1] = '\0';
@@ -1334,7 +1183,7 @@ PHP_MINFO_FUNCTION(oci)
{
char buf[32];
#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2)))
- char *ver;
+ char ver[256];
#endif
php_info_print_table_start();
@@ -1348,9 +1197,8 @@ PHP_MINFO_FUNCTION(oci)
php_info_print_table_row(2, "Revision", "$Id$");
#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2)))
- php_oci_client_get_version(&ver);
+ php_oci_client_get_version(ver, sizeof(ver));
php_info_print_table_row(2, "Oracle Run-time Client Library Version", ver);
- efree(ver);
#else
php_info_print_table_row(2, "Oracle Run-time Client Library Version", "Unknown");
#endif
@@ -1453,14 +1301,16 @@ static void php_oci_pconnection_list_np_dtor(zend_resource *entry)
OCI_G(in_call)) {
/* Remove the hash entry if present */
- zvp = zend_hash_find(&EG(persistent_list), connection->hash_key);
- le = Z_RES_P(zvp); /* PHPNG TODO check for null zvp */
- if (le != NULL && le->type == le_pconnection && le->ptr == connection) {
- zend_hash_del(&EG(persistent_list), connection->hash_key);
- }
- else {
- php_oci_connection_close(connection);
- OCI_G(num_persistent)--;
+ if (connection->hash_key) {
+ zvp = zend_hash_find(&EG(persistent_list), connection->hash_key);
+ le = zvp ? Z_RES_P(zvp) : NULL;
+ if (le != NULL && le->type == le_pconnection && le->ptr == connection) {
+ zend_hash_del(&EG(persistent_list), connection->hash_key);
+ }
+ else {
+ php_oci_connection_close(connection);
+ OCI_G(num_persistent)--;
+ }
}
#ifdef HAVE_OCI8_DTRACE
@@ -1534,12 +1384,12 @@ void php_oci_define_hash_dtor(zval *data)
{
php_oci_define *define = (php_oci_define *) Z_PTR_P(data);
- zval_ptr_dtor(&define->zval);
-
if (define->name) {
efree(define->name);
define->name = NULL;
}
+
+ efree(define);
}
/* }}} */
@@ -1553,17 +1403,20 @@ void php_oci_bind_hash_dtor(zval *data)
if (bind->array.elements) {
efree(bind->array.elements);
+ bind->array.elements = NULL;
}
if (bind->array.element_lengths) {
efree(bind->array.element_lengths);
+ bind->array.element_lengths = NULL;
}
if (bind->array.indicators) {
efree(bind->array.indicators);
+ bind->array.indicators = NULL;
}
+
efree(bind);
- /*zval_ptr_dtor(&bind->zval); */
}
/* }}} */
@@ -1579,8 +1432,11 @@ void php_oci_column_hash_dtor(zval *data)
zend_list_close(column->stmtid);
}
- if (column->is_descr) {
- zend_list_close(column->descid);
+ if (column->descid) {
+ if (GC_REFCOUNT(column->descid) == 1)
+ zend_list_close(column->descid);
+ else
+ GC_REFCOUNT(column->descid)--;
}
if (column->data) {
@@ -1633,17 +1489,16 @@ void php_oci_connection_descriptors_free(php_oci_connection *connection)
*/
sb4 php_oci_error(OCIError *err_p, sword errstatus)
{
- text *errbuf = (text *)NULL;
+ text errbuf[PHP_OCI_ERRBUF_LEN];
sb4 errcode = 0; /* Oracle error number */
switch (errstatus) {
case OCI_SUCCESS:
break;
case OCI_SUCCESS_WITH_INFO:
- errcode = php_oci_fetch_errmsg(err_p, &errbuf);
- if (errbuf) {
+ errcode = php_oci_fetch_errmsg(err_p, errbuf, sizeof(errbuf));
+ if (errcode) {
php_error_docref(NULL, E_WARNING, "OCI_SUCCESS_WITH_INFO: %s", errbuf);
- efree(errbuf);
} else {
php_error_docref(NULL, E_WARNING, "OCI_SUCCESS_WITH_INFO: failed to fetch error message");
}
@@ -1652,19 +1507,17 @@ sb4 php_oci_error(OCIError *err_p, sword errstatus)
php_error_docref(NULL, E_WARNING, "OCI_NEED_DATA");
break;
case OCI_NO_DATA:
- errcode = php_oci_fetch_errmsg(err_p, &errbuf);
- if (errbuf) {
+ errcode = php_oci_fetch_errmsg(err_p, errbuf, sizeof(errbuf));
+ if (errcode) {
php_error_docref(NULL, E_WARNING, "%s", errbuf);
- efree(errbuf);
} else {
php_error_docref(NULL, E_WARNING, "OCI_NO_DATA: failed to fetch error message");
}
break;
case OCI_ERROR:
- errcode = php_oci_fetch_errmsg(err_p, &errbuf);
- if (errbuf) {
- php_error_docref(NULL, E_WARNING, "%s", errbuf);
- efree(errbuf);
+ errcode = php_oci_fetch_errmsg(err_p, errbuf, sizeof(errbuf));
+ if (errcode) {
+ php_error_docref(NULL, E_WARNING, "%s", errbuf, sizeof(errbuf));
} else {
php_error_docref(NULL, E_WARNING, "failed to fetch error message");
}
@@ -1697,23 +1550,17 @@ sb4 php_oci_error(OCIError *err_p, sword errstatus)
*
* Fetch error message into the buffer from the error handle provided
*/
-sb4 php_oci_fetch_errmsg(OCIError *error_handle, text **error_buf)
+sb4 php_oci_fetch_errmsg(OCIError *error_handle, text *error_buf, size_t error_buf_size)
{
sb4 error_code = 0;
- text err_buf[PHP_OCI_ERRBUF_LEN];
- memset(err_buf, 0, sizeof(err_buf));
- PHP_OCI_CALL(OCIErrorGet, (error_handle, (ub4)1, NULL, &error_code, err_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR));
+ PHP_OCI_CALL(OCIErrorGet, (error_handle, (ub4)1, NULL, &error_code, error_buf, (ub4)error_buf_size, (ub4)OCI_HTYPE_ERROR));
if (error_code) {
- int err_buf_len = strlen((char *)err_buf);
+ int err_buf_len = (int) strlen((char *)error_buf);
- if (err_buf_len && err_buf[err_buf_len - 1] == '\n') {
- err_buf[err_buf_len - 1] = '\0';
- }
- if (err_buf_len && error_buf) {
- *error_buf = NULL;
- *error_buf = (text *)estrndup((char *)err_buf, err_buf_len);
+ if (err_buf_len && error_buf[err_buf_len - 1] == '\n') {
+ error_buf[err_buf_len - 1] = '\0';
}
}
return error_code;
@@ -1777,7 +1624,7 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
charset = NULL;
}
- connection = php_oci_do_connect_ex(username, username_len, password, password_len, NULL, 0, dbname, dbname_len, charset, session_mode, persistent, exclusive);
+ connection = php_oci_do_connect_ex(username, (int) username_len, password, (int) password_len, NULL, 0, dbname, (int) dbname_len, charset, session_mode, persistent, exclusive);
#ifdef HAVE_OCI8_DTRACE
if (DTRACE_OCI8_CONNECT_RETURN_ENABLED()) {
@@ -1845,13 +1692,6 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
php_error_docref(NULL, E_WARNING, "Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA");
return NULL;
}
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
- /* Safe mode has been removed in PHP 5.4 */
- if (PG(safe_mode)) {
- php_error_docref(NULL, E_WARNING, "Privileged connect is disabled in Safe Mode");
- return NULL;
- }
-#endif
}
}
@@ -1926,14 +1766,16 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
smart_str_append_unsigned_ex(&hashed_details, session_mode, 0);
smart_str_0(&hashed_details);
+ if (persistent) {
+ smart_str_appendl_ex(&hashed_details, "pc", sizeof("pc") - 1, 0);
+ }
+
/* make it lowercase */
- /* PHPNG TODO is this safe to do? What about interned strings? */
- php_strtolower(hashed_details.s->val, hashed_details.s->len);
+ php_strtolower(ZSTR_VAL(hashed_details.s), ZSTR_LEN(hashed_details.s));
if (!exclusive && !new_password) {
zend_bool found = 0;
- /* PHPNG TODO Check hashed_details is used correctly */
if (persistent && ((zvp = zend_hash_find(&EG(persistent_list), hashed_details.s))) != NULL) {
zend_resource *le = Z_RES_P(zvp);
@@ -1946,12 +1788,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
le = Z_RES_P(zvp);
found = 1;
if (le->type == le_index_ptr) {
- int type, link;
- void *ptr;
+ zend_resource *ptr;
- ptr = le->ptr; /* PHPNG TODO */
- if (ptr && (le->type == le_connection)) {
- connection = (php_oci_connection *)ptr;
+ ptr = (zend_resource *) le->ptr;
+ if (ptr && (ptr->type == le_connection)) {
+ connection = (php_oci_connection *)ptr->ptr;
}
}
}
@@ -1970,7 +1811,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
* TODO: put in negative code for non-persistent stubs
*/
if (connection && connection->is_persistent && connection->is_stub) {
- if (php_oci_create_session(connection, NULL, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, session_mode)) {
+ if (php_oci_create_session(connection, NULL, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, (int) session_mode)) {
smart_str_free(&hashed_details);
zend_hash_del(&EG(persistent_list), connection->hash_key);
@@ -1984,7 +1825,6 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
if (connection->is_open) {
/* found an open connection. now ping it */
if (connection->is_persistent) {
- int rsrc_type;
/* Check connection liveness in the following order:
* 1) always check OCI_ATTR_SERVER_STATUS
@@ -2002,15 +1842,24 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
if (!ping_done && (*(connection->next_pingp) > 0) && (timestamp >= *(connection->next_pingp)) && !php_oci_connection_ping(connection)) {
/* server died */
} else {
- php_oci_connection *tmp;
+ php_oci_connection *tmp = (php_oci_connection *) NULL;
+ zval *tmp_val = (zval *) NULL;
/* okay, the connection is open and the server is still alive */
connection->used_this_request = 1;
- tmp = (php_oci_connection *)connection->id->ptr;
-
- if (tmp != NULL && rsrc_type == le_pconnection && tmp->hash_key->len == hashed_details.s->len &&
- memcmp(tmp->hash_key->val, hashed_details.s->val, tmp->hash_key->len) == 0 && ++GC_REFCOUNT(connection->id) == SUCCESS) {
- /* do nothing */
+ if (connection->id) {
+ tmp_val = zend_hash_index_find(&EG(regular_list), connection->id->handle);
+ if ((tmp_val != NULL) && (Z_TYPE_P(tmp_val) == IS_RESOURCE)) {
+ tmp = Z_RES_VAL_P(tmp_val);
+ }
+
+ if ((tmp_val != NULL) && (tmp != NULL) &&
+ (ZSTR_LEN(tmp->hash_key) == ZSTR_LEN(hashed_details.s)) &&
+ (memcmp(ZSTR_VAL(tmp->hash_key), ZSTR_VAL(hashed_details.s),
+ ZSTR_LEN(tmp->hash_key)) == 0)) {
+ connection = tmp;
+ ++GC_REFCOUNT(connection->id);
+ }
} else {
PHP_OCI_REGISTER_RESOURCE(connection, le_pconnection);
/* Persistent connections: For old close semantics we artificially
@@ -2039,7 +1888,6 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
* if ping fails
*/
if (persistent){
- int rsrc_type;
connection->is_open = 0;
connection->used_this_request = 1;
@@ -2047,7 +1895,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
/* We have to do a hash_del but need to preserve the resource if there is a positive
* refcount. Set the data pointer in the list entry to NULL
*/
- if (connection == connection->id->ptr && rsrc_type == le_pconnection) {
+ if (connection == connection->id->ptr) {
le->ptr = NULL;
}
@@ -2153,13 +2001,13 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
* connect/password change
*/
if (!use_spool) {
- if (php_oci_old_create_session(connection, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, session_mode)) {
+ if (php_oci_old_create_session(connection, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, (int) session_mode)) {
php_oci_connection_close(connection);
return NULL;
}
} else {
/* create using the client-side session pool */
- if (php_oci_create_session(connection, session_pool, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, session_mode)) {
+ if (php_oci_create_session(connection, session_pool, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, (int) session_mode)) {
php_oci_connection_close(connection);
return NULL;
}
@@ -2235,10 +2083,10 @@ static int php_oci_connection_ping(php_oci_connection *connection)
return 1;
} else {
sb4 error_code = 0;
- text tmp_buf[OCI_ERROR_MAXMSG_SIZE];
+ text tmp_buf[PHP_OCI_ERRBUF_LEN];
/* Treat ORA-1010 as a successful Ping */
- OCIErrorGet(OCI_G(err), (ub4)1, NULL, &error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ERROR);
+ OCIErrorGet(OCI_G(err), (ub4)1, NULL, &error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR);
if (error_code == 1010) {
return 1;
}
@@ -2369,14 +2217,21 @@ static int php_oci_connection_close(php_oci_connection *connection)
* (like env) on the session pool
*/
php_oci_spool_close(connection->private_spool);
+ connection->private_spool = NULL;
+ }
+
+ if (GC_REFCOUNT(connection->hash_key) >= 2) {
+ zend_hash_del(&EG(regular_list), connection->hash_key);
}
if (connection->hash_key) {
pefree(connection->hash_key, connection->is_persistent);
+ connection->hash_key = NULL;
}
#ifdef HAVE_OCI8_DTRACE
if (connection->client_id) {
pefree(connection->client_id, connection->is_persistent);
+ connection->client_id = NULL;
}
#endif /* HAVE_OCI8_DTRACE */
pefree(connection, connection->is_persistent);
@@ -2458,6 +2313,7 @@ int php_oci_connection_release(php_oci_connection *connection)
connection->svc = NULL;
connection->server = NULL;
connection->session = NULL;
+ connection->id = NULL;
connection->is_attached = connection->is_open = connection->rb_on_disconnect = connection->used_this_request = 0;
connection->is_stub = 1;
@@ -2504,9 +2360,8 @@ int php_oci_password_change(php_oci_connection *connection, char *user, int user
*
* Get Oracle client library version
*/
-void php_oci_client_get_version(char **version)
+void php_oci_client_get_version(char *version, size_t version_size)
{
- char version_buff[256];
#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2))) /* OCIClientVersion only available 10.2 onwards */
sword major_version = 0;
sword minor_version = 0;
@@ -2515,11 +2370,10 @@ void php_oci_client_get_version(char **version)
sword port_update_num = 0;
PHP_OCI_CALL(OCIClientVersion, (&major_version, &minor_version, &update_num, &patch_num, &port_update_num));
- snprintf(version_buff, sizeof(version_buff), "%d.%d.%d.%d.%d", major_version, minor_version, update_num, patch_num, port_update_num);
+ snprintf(version, version_size, "%d.%d.%d.%d.%d", major_version, minor_version, update_num, patch_num, port_update_num);
#else
- memcpy(version_buff, "Unknown", sizeof("Unknown"));
+ memcpy(version, "Unknown", sizeof("Unknown"));
#endif
- *version = estrdup(version_buff);
}
/* }}} */
@@ -2527,12 +2381,11 @@ void php_oci_client_get_version(char **version)
*
* Get Oracle server version
*/
-int php_oci_server_get_version(php_oci_connection *connection, char **version)
+int php_oci_server_get_version(php_oci_connection *connection, char *version, size_t version_size)
{
sword errstatus;
- char version_buff[256];
- PHP_OCI_CALL_RETURN(errstatus, OCIServerVersion, (connection->svc, connection->err, (text *)version_buff, sizeof(version_buff), OCI_HTYPE_SVCCTX));
+ PHP_OCI_CALL_RETURN(errstatus, OCIServerVersion, (connection->svc, connection->err, (text *)version, (ub4) version_size, OCI_HTYPE_SVCCTX));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
@@ -2540,7 +2393,6 @@ int php_oci_server_get_version(php_oci_connection *connection, char **version)
return 1;
}
- *version = estrdup(version_buff);
return 0;
}
/* }}} */
@@ -2554,7 +2406,7 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
php_oci_descriptor *descriptor;
ub4 lob_length;
int column_size;
- char *lob_buffer;
+ char *lob_buffer = (char *)0;
int lob_fetch_status;
if (column->indicator == -1) { /* column is NULL */
@@ -2568,12 +2420,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
} else if (column->is_descr) {
if (column->data_type != SQLT_RDD) {
- int rsrc_type;
/* reset descriptor's length */
descriptor = (php_oci_descriptor *) column->descid->ptr;
- if (!descriptor || rsrc_type != le_descriptor) {
+ if (!descriptor) {
php_error_docref(NULL, E_WARNING, "Unable to find LOB descriptor #%d", column->descid);
return 1;
}
@@ -2601,6 +2452,8 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
} else {
ZVAL_EMPTY_STRING(value);
}
+ if (lob_buffer)
+ efree(lob_buffer);
return 0;
}
} else {
@@ -2640,6 +2493,8 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_args)
{
zval *z_statement, *array;
+ zval *placeholder = (zval*) NULL;
+/* zend_array *temp_array = (zend_array *) NULL;*/
php_oci_statement *statement; /* statement that will be fetched from */
#if (OCI_MAJOR_VERSION >= 12)
php_oci_statement *invokedstatement; /* statement this function was invoked with */
@@ -2659,6 +2514,12 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
if (ZEND_NUM_ARGS() == 2) {
fetch_mode = mode;
}
+
+ if (Z_ISREF_P(array))
+ placeholder = Z_REFVAL_P(array);
+ else
+ placeholder = array;
+
} else if (expected_args == 2) {
/* only for oci_fetch_array() */
@@ -2747,7 +2608,13 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
}
#endif /* OCI_MAJOR_VERSION */
- array_init(return_value);
+ if (placeholder == NULL) {
+ placeholder = return_value;
+ } else {
+ zval_dtor(placeholder);
+ }
+
+ array_init(placeholder);
for (i = 0; i < statement->ncolumns; i++) {
@@ -2763,32 +2630,29 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
if (!(column->indicator == -1)) {
zval element;
- php_oci_column_to_zval(column, &element, fetch_mode);
+ php_oci_column_to_zval(column, &element, (int) fetch_mode);
if (fetch_mode & PHP_OCI_NUM || !(fetch_mode & PHP_OCI_ASSOC)) {
- add_index_zval(return_value, i, &element);
+ add_index_zval(placeholder, i, &element);
}
if (fetch_mode & PHP_OCI_ASSOC) {
if (fetch_mode & PHP_OCI_NUM) {
- Z_ADDREF(element);
+ Z_TRY_ADDREF_P(&element);
}
- add_assoc_zval(return_value, column->name, &element);
+ add_assoc_zval(placeholder, column->name, &element);
}
} else {
if (fetch_mode & PHP_OCI_NUM || !(fetch_mode & PHP_OCI_ASSOC)) {
- add_index_null(return_value, i);
+ add_index_null(placeholder, i);
}
if (fetch_mode & PHP_OCI_ASSOC) {
- add_assoc_null(return_value, column->name);
+ add_assoc_null(placeholder, column->name);
}
}
}
if (expected_args > 2) {
- /* Only for ocifetchinto BC. In all other cases we return array, not long */
- ZVAL_COPY_VALUE(array, return_value); /* copy return_value to given reference */
- zval_dtor(return_value);
RETURN_LONG(statement->ncolumns);
}
}
@@ -2847,7 +2711,7 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha
}
/* Populate key if passed */
- if (hash_key && hash_key->val) {
+ if (hash_key && (ZSTR_LEN(hash_key) > 0)) {
session_pool->spool_hash_key = zend_string_dup(hash_key, 1);
if (session_pool->spool_hash_key == NULL) {
iserror = 1;
@@ -2972,7 +2836,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char *
{
smart_str spool_hashed_details = {0};
php_oci_spool *session_pool = NULL;
- zend_resource spool_le = {0};
+ zend_resource spool_le = {{0}};
zend_resource *spool_out_le = NULL;
zend_bool iserror = 0;
zval *spool_out_zv = NULL;
@@ -3003,8 +2867,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char *
/* Session Pool Hash Key : oci8spool***username**edition**hashedpassword**dbname**charset */
smart_str_0(&spool_hashed_details);
- /* PHPNG TODO is this safe to do? */
- php_strtolower(spool_hashed_details.s->val, spool_hashed_details.s->len);
+ php_strtolower(ZSTR_VAL(spool_hashed_details.s), ZSTR_LEN(spool_hashed_details.s));
/* }}} */
spool_out_zv = zend_hash_find(&EG(persistent_list), spool_hashed_details.s);
@@ -3025,8 +2888,8 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char *
PHP_OCI_REGISTER_RESOURCE(session_pool, le_psessionpool);
zend_hash_update_mem(&EG(persistent_list), session_pool->spool_hash_key, (void *)&spool_le, sizeof(zend_resource));
} else if (spool_out_le->type == le_psessionpool &&
- ((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key->len == spool_hashed_details.s->len &&
- memcmp(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key->val, spool_hashed_details.s->val, spool_hashed_details.s->len) == 0) {
+ ZSTR_LEN(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key) == ZSTR_LEN(spool_hashed_details.s) &&
+ memcmp(ZSTR_VAL(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key), ZSTR_VAL(spool_hashed_details.s), ZSTR_LEN(spool_hashed_details.s)) == 0) {
/* retrieve the cached session pool */
session_pool = (php_oci_spool *)(spool_out_le->ptr);
}
@@ -3056,7 +2919,7 @@ static OCIEnv *php_oci_create_env(ub2 charsetid)
if (OCI_G(errcode) != OCI_SUCCESS) {
sb4 ora_error_code = 0;
- text ora_msg_buf[OCI_ERROR_MAXMSG_SIZE]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
+ text ora_msg_buf[PHP_OCI_ERRBUF_LEN]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */
#ifdef HAVE_OCI_INSTANT_CLIENT
php_error_docref(NULL, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that " PHP_OCI8_LIB_PATH_MSG " includes the directory with Oracle Instant Client libraries");
@@ -3064,7 +2927,7 @@ static OCIEnv *php_oci_create_env(ub2 charsetid)
php_error_docref(NULL, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right directories");
#endif
if (retenv
- && OCIErrorGet(retenv, (ub4)1, NULL, &ora_error_code, ora_msg_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
+ && OCIErrorGet(retenv, (ub4)1, NULL, &ora_error_code, ora_msg_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS
&& *ora_msg_buf) {
php_error_docref(NULL, E_WARNING, "%s", ora_msg_buf);
}
@@ -3082,7 +2945,14 @@ static OCIEnv *php_oci_create_env(ub2 charsetid)
*/
static int php_oci_old_create_session(php_oci_connection *connection, char *dbname, int dbname_len, char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, int session_mode)
{
- ub4 statement_cache_size = (OCI_G(statement_cache_size) > 0) ? OCI_G(statement_cache_size) : 0;
+ ub4 statement_cache_size = 0;
+
+ if (OCI_G(statement_cache_size) > 0) {
+ if (OCI_G(statement_cache_size) > SB4MAXVAL)
+ statement_cache_size = (ub4) SB4MAXVAL;
+ else
+ statement_cache_size = (ub4) OCI_G(statement_cache_size);
+ }
/* Create the OCI environment separate for each connection */
if (!(connection->env = php_oci_create_env(connection->charset))) {
@@ -3270,7 +3140,14 @@ static int php_oci_create_session(php_oci_connection *connection, php_oci_spool
ub4 purity = -2; /* Illegal value to initialize */
#endif
time_t timestamp = time(NULL);
- ub4 statement_cache_size = (OCI_G(statement_cache_size) > 0) ? OCI_G(statement_cache_size) : 0;
+ ub4 statement_cache_size = 0;
+
+ if (OCI_G(statement_cache_size) > 0) {
+ if (OCI_G(statement_cache_size) > SB4MAXVAL)
+ statement_cache_size = (ub4) SB4MAXVAL;
+ else
+ statement_cache_size = (ub4) OCI_G(statement_cache_size);
+ }
/* Persistent connections have private session pools */
if (connection->is_persistent && !connection->private_spool &&
diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c
index 7b648d48e6..21102dc46f 100644
--- a/ext/oci8/oci8_collection.c
+++ b/ext/oci8/oci8_collection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -278,7 +278,7 @@ int php_oci_collection_trim(php_oci_collection *collection, zend_long trim_size)
php_oci_connection *connection = collection->connection;
sword errstatus;
- PHP_OCI_CALL_RETURN(errstatus, OCICollTrim, (connection->env, connection->err, trim_size, collection->collection));
+ PHP_OCI_CALL_RETURN(errstatus, OCICollTrim, (connection->env, connection->err, (sb4) trim_size, collection->collection));
if (errstatus != OCI_SUCCESS) {
errstatus = php_oci_error(connection->err, errstatus);
diff --git a/ext/oci8/oci8_dtrace.d b/ext/oci8/oci8_dtrace.d
index 30c98de912..c8b5dfcfc3 100644
--- a/ext/oci8/oci8_dtrace.d
+++ b/ext/oci8/oci8_dtrace.d
@@ -4,11 +4,11 @@
+----------------------------------------------------------------------+
| Copyright (c) 2013 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the Zend license, |
+ | This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.zend.com/license/3_01.txt. |
- | If you did not receive a copy of the Zend license and are unable to |
+ | http://www.php.net/license/3_01.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index bccab92a48..bb8828b746 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -54,7 +54,7 @@ PHP_FUNCTION(oci_define_by_name)
size_t name_len;
zend_long type = 0;
php_oci_statement *statement;
- php_oci_define *define, *tmp_define;
+ php_oci_define *define;
zend_string *zvtmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/|l", &stmt, &name, &name_len, &var, &type) == FAILURE) {
@@ -72,26 +72,28 @@ PHP_FUNCTION(oci_define_by_name)
ALLOC_HASHTABLE(statement->defines);
zend_hash_init(statement->defines, 13, NULL, php_oci_define_hash_dtor, 0);
}
+ else if (zend_hash_str_exists(statement->defines, (const char *)name, name_len)) {
+ RETURN_FALSE;
+ }
define = ecalloc(1,sizeof(php_oci_define));
/* if (zend_hash_add(statement->defines, name, name_len, define, sizeof(php_oci_define), (void **)&tmp_define) == SUCCESS) { */
zvtmp = zend_string_init(name, name_len, 0);
- if ((tmp_define = zend_hash_add_new_ptr(statement->defines, zvtmp, define)) != NULL) {
- efree(define);
+ if ((define = zend_hash_add_new_ptr(statement->defines, zvtmp, define)) != NULL) {
zend_string_release(zvtmp);
- define = tmp_define;
} else {
efree(define);
zend_string_release(zvtmp);
RETURN_FALSE;
}
- define->name = (text*) estrndup(name, name_len);
- define->name_len = name_len;
- define->type = type;
- memmove(&define->zval, var, sizeof(zval));
- Z_ADDREF_P(var);
+ define->name = (text*) ecalloc(1, name_len+1);
+ memcpy(define->name, name, name_len);
+ define->name[name_len] = '\0';
+ define->name_len = (ub4) name_len;
+ define->type = (ub4) type;
+ define->zval = var;
RETURN_TRUE;
}
@@ -155,7 +157,7 @@ PHP_FUNCTION(oci_bind_array_by_name)
RETURN_FALSE;
}
- if (php_oci_bind_array_by_name(statement, name, name_len, bind_var, max_array_len, max_item_len, type)) {
+ if (php_oci_bind_array_by_name(statement, name, (sb4) name_len, bind_var, max_array_len, max_item_len, type)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -175,14 +177,14 @@ PHP_FUNCTION(oci_free_descriptor)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- zend_list_delete(descriptor->id);
+ zend_list_close(descriptor->id);
RETURN_TRUE;
}
/* }}} */
@@ -209,7 +211,7 @@ PHP_FUNCTION(oci_lob_save)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -221,7 +223,7 @@ PHP_FUNCTION(oci_lob_save)
RETURN_FALSE;
}
- if (php_oci_lob_write(descriptor, offset, data, data_len, &bytes_written)) {
+ if (php_oci_lob_write(descriptor, (ub4) offset, data, (ub4) data_len, &bytes_written)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -238,33 +240,17 @@ PHP_FUNCTION(oci_lob_import)
size_t filename_len;
if (getThis()) {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
-#else
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) {
-#endif
return;
}
}
else {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) {
-#else
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) {
-#endif
return;
}
}
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
- /* The "p" parsing parameter handles this case in PHP 5.4+ */
- if (strlen(filename) != filename_len) {
- php_error_docref(NULL, E_WARNING, "Filename cannot contain null bytes");
- RETURN_FALSE;
- }
-#endif
-
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -293,7 +279,7 @@ PHP_FUNCTION(oci_lob_load)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -304,7 +290,10 @@ PHP_FUNCTION(oci_lob_load)
RETURN_FALSE;
}
if (buffer_len > 0) {
- RETURN_STRINGL(buffer, buffer_len);
+ zend_string *ret = zend_string_init(buffer, buffer_len, 0);
+ if (buffer)
+ efree(buffer);
+ RETURN_STR(ret);
}
else {
RETURN_EMPTY_STRING();
@@ -333,7 +322,7 @@ PHP_FUNCTION(oci_lob_read)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -349,7 +338,9 @@ PHP_FUNCTION(oci_lob_read)
RETURN_FALSE;
}
if (buffer_len > 0) {
- RETURN_STRINGL(buffer, buffer_len);
+ zend_string *ret = zend_string_init(buffer, buffer_len, 0);
+ efree(buffer);
+ RETURN_STR(ret);
}
else {
RETURN_EMPTY_STRING();
@@ -371,14 +362,14 @@ PHP_FUNCTION(oci_lob_eof)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- if (!php_oci_lob_get_length(descriptor, &lob_length) && lob_length >= 0) {
+ if (!php_oci_lob_get_length(descriptor, &lob_length)) {
if (lob_length == descriptor->lob_current_position) {
RETURN_TRUE;
}
@@ -400,7 +391,7 @@ PHP_FUNCTION(oci_lob_tell)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -424,7 +415,7 @@ PHP_FUNCTION(oci_lob_rewind)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -456,8 +447,8 @@ PHP_FUNCTION(oci_lob_seek)
return;
}
}
-
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -470,11 +461,11 @@ PHP_FUNCTION(oci_lob_seek)
switch(whence) {
case PHP_OCI_SEEK_CUR:
- descriptor->lob_current_position += offset;
+ descriptor->lob_current_position += (ub4) offset;
break;
case PHP_OCI_SEEK_END:
if ((descriptor->lob_size + offset) >= 0) {
- descriptor->lob_current_position = descriptor->lob_size + offset;
+ descriptor->lob_current_position = descriptor->lob_size + (ub4) offset;
}
else {
descriptor->lob_current_position = 0;
@@ -482,9 +473,13 @@ PHP_FUNCTION(oci_lob_seek)
break;
case PHP_OCI_SEEK_SET:
default:
- descriptor->lob_current_position = (offset > 0) ? offset : 0;
+ descriptor->lob_current_position = (offset > 0) ? (ub4) offset : 0;
break;
}
+ if (descriptor->lob_current_position > UB4MAXVAL) {
+ php_error_docref(NULL, E_WARNING, "Invalid offset or LOB position");
+ RETURN_FALSE;
+ }
RETURN_TRUE;
}
/* }}} */
@@ -503,7 +498,7 @@ PHP_FUNCTION(oci_lob_size)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -534,7 +529,7 @@ PHP_FUNCTION(oci_lob_write)
}
if (ZEND_NUM_ARGS() == 2) {
- data_len = MIN(data_len, write_len);
+ data_len = MIN((zend_long) data_len, write_len);
}
}
else {
@@ -543,11 +538,11 @@ PHP_FUNCTION(oci_lob_write)
}
if (ZEND_NUM_ARGS() == 3) {
- data_len = MIN(data_len, write_len);
+ data_len = MIN((zend_long) data_len, write_len);
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -558,7 +553,7 @@ PHP_FUNCTION(oci_lob_write)
RETURN_LONG(0);
}
- if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, data_len, &bytes_written)) {
+ if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, (ub4) data_len, &bytes_written)) {
RETURN_FALSE;
}
RETURN_LONG(bytes_written);
@@ -583,12 +578,12 @@ PHP_FUNCTION(oci_lob_append)
}
}
- if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object");
RETURN_FALSE;
}
- if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object");
RETURN_FALSE;
}
@@ -624,7 +619,7 @@ PHP_FUNCTION(oci_lob_truncate)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -684,14 +679,14 @@ PHP_FUNCTION(oci_lob_erase)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- if (php_oci_lob_erase(descriptor, offset, length, &bytes_erased)) {
+ if (php_oci_lob_erase(descriptor, offset, (ub4) length, &bytes_erased)) {
RETURN_FALSE;
}
RETURN_LONG(bytes_erased);
@@ -717,7 +712,7 @@ PHP_FUNCTION(oci_lob_flush)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -755,7 +750,7 @@ PHP_FUNCTION(ocisetbufferinglob)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -782,7 +777,7 @@ PHP_FUNCTION(ocigetbufferinglob)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -808,12 +803,12 @@ PHP_FUNCTION(oci_lob_copy)
return;
}
- if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object");
RETURN_FALSE;
}
- if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object");
RETURN_FALSE;
}
@@ -850,12 +845,12 @@ PHP_FUNCTION(oci_lob_is_equal)
return;
}
- if ((tmp_first = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_first), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_first = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_first), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object");
RETURN_FALSE;
}
- if ((tmp_second = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_second), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_second = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_second), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object");
RETURN_FALSE;
}
@@ -888,11 +883,7 @@ PHP_FUNCTION(oci_lob_export)
ub4 lob_length;
if (getThis()) {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ll", &filename, &filename_len, &start, &length) == FAILURE) {
-#else
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ll", &filename, &filename_len, &start, &length) == FAILURE) {
-#endif
return;
}
@@ -906,11 +897,7 @@ PHP_FUNCTION(oci_lob_export)
}
}
else {
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) {
-#else
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) {
-#endif
return;
}
@@ -924,15 +911,7 @@ PHP_FUNCTION(oci_lob_export)
}
}
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
- /* The "p" parsing parameter handles this case in PHP 5.4+ */
- if (strlen(filename) != filename_len) {
- php_error_docref(NULL, E_WARNING, "Filename cannot contain null bytes");
- RETURN_FALSE;
- }
-#endif
-
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -950,28 +929,21 @@ PHP_FUNCTION(oci_lob_export)
if (length == -1) {
length = lob_length - descriptor->lob_current_position;
}
-
+
+ if (lob_length == 0) {
+ length = 0;
+ }
+
if (length == 0) {
/* nothing to write, fail silently */
RETURN_FALSE;
}
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
- /* Safe mode has been removed in PHP 5.4 */
- if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
- RETURN_FALSE;
- }
-#endif
-
if (php_check_open_basedir(filename)) {
RETURN_FALSE;
}
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
stream = php_stream_open_wrapper_ex(filename, "w", REPORT_ERRORS, NULL, NULL);
-#else
- stream = php_stream_open_wrapper_ex(filename, "w", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, NULL);
-#endif
block_length = PHP_OCI_LOB_BUFFER_SIZE;
if (block_length > length) {
@@ -986,7 +958,8 @@ PHP_FUNCTION(oci_lob_export)
}
if (tmp_bytes_read && !php_stream_write(stream, buffer, tmp_bytes_read)) {
php_stream_close(stream);
- efree(buffer);
+ if (buffer)
+ efree(buffer);
RETURN_FALSE;
}
if (buffer) {
@@ -1028,14 +1001,14 @@ PHP_FUNCTION(oci_lob_write_temporary)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- if (php_oci_lob_write_tmp(descriptor, type, data, data_len)) {
+ if (php_oci_lob_write_tmp(descriptor, type, data, (int) data_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1055,7 +1028,7 @@ PHP_FUNCTION(oci_lob_close)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
RETURN_FALSE;
}
@@ -1331,7 +1304,7 @@ PHP_FUNCTION(oci_execute)
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
- if (php_oci_statement_execute(statement, mode)) {
+ if (php_oci_statement_execute(statement, (ub4) mode)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1407,15 +1380,17 @@ PHP_FUNCTION(oci_fetch_all)
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
zval_dtor(array);
- array_init(array);
while (skip--) {
if (php_oci_statement_fetch(statement, nrows)) {
+ array_init(array);
RETURN_LONG(0);
}
}
if (flags & PHP_OCI_FETCHSTATEMENT_BY_ROW) {
+ /* Fetch by Row: array will contain one sub-array per query row */
+ array_init(array);
columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0);
for (i = 0; i < statement->ncolumns; i++) {
@@ -1425,7 +1400,7 @@ PHP_FUNCTION(oci_fetch_all)
while (!php_oci_statement_fetch(statement, nrows)) {
zval row;
- array_init(&row);
+ array_init_size(&row, statement->ncolumns);
for (i = 0; i < statement->ncolumns; i++) {
php_oci_column_to_zval(columns[ i ], &element, PHP_OCI_RETURN_LOBS);
@@ -1451,6 +1426,8 @@ PHP_FUNCTION(oci_fetch_all)
efree(columns);
} else { /* default to BY_COLUMN */
+ /* Fetch by columns: array will contain one sub-array per query column */
+ array_init_size(array, statement->ncolumns);
columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0);
outarrs = safe_emalloc(statement->ncolumns, sizeof(zval*), 0);
@@ -1544,7 +1521,7 @@ PHP_FUNCTION(oci_free_statement)
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
- zend_list_delete(statement->id);
+ zend_list_close(statement->id);
RETURN_TRUE;
}
/* }}} */
@@ -1573,9 +1550,13 @@ PHP_FUNCTION(oci_close)
}
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- zend_list_delete(connection->id);
+ if (GC_REFCOUNT(connection->id) == 2) /* CHANGED VERSION::PHP7
+ Changed the refCount to 2 since
+ internally Zend engine increments
+ RefCount value by 1 */
+ zend_list_close(connection->id);
- ZVAL_NULL(z_connection);
+ /* ZVAL_NULL(z_connection); */
RETURN_TRUE;
}
@@ -1612,7 +1593,7 @@ PHP_FUNCTION(oci_error)
zval *arg = NULL;
php_oci_statement *statement;
php_oci_connection *connection;
- text *errbuf;
+ text errbuf[PHP_OCI_ERRBUF_LEN];
sb4 errcode = 0;
dvoid *errh = NULL;
ub2 error_offset = 0;
@@ -1662,14 +1643,13 @@ go_out:
RETURN_FALSE;
}
- errcode = php_oci_fetch_errmsg(errh, &errbuf);
+ errcode = php_oci_fetch_errmsg(errh, errbuf, sizeof(errbuf));
if (errcode) {
array_init(return_value);
add_assoc_long(return_value, "code", errcode);
/* TODO: avoid reallocation ??? */
add_assoc_string(return_value, "message", (char*) errbuf);
- efree(errbuf);
add_assoc_long(return_value, "offset", error_offset);
add_assoc_string(return_value, "sqltext", sqltext ? (char *) sqltext : "");
} else {
@@ -1711,7 +1691,7 @@ PHP_FUNCTION(oci_parse)
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- statement = php_oci_statement_create(connection, query, query_len);
+ statement = php_oci_statement_create(connection, query, (int) query_len);
if (statement) {
RETURN_RES(statement->id);
@@ -1966,14 +1946,6 @@ PHP_FUNCTION(oci_password_change)
size_t user_len, pass_old_len, pass_new_len, dbname_len;
php_oci_connection *connection;
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
- /* Safe mode has been removed in PHP 5.4 */
- if (PG(safe_mode)) {
- php_error_docref(NULL, E_WARNING, "is disabled in Safe Mode");
- RETURN_FALSE;
- }
-#endif
-
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "rsss", &z_connection, &user, &user_len, &pass_old, &pass_old_len, &pass_new, &pass_new_len) == SUCCESS) {
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
@@ -1990,7 +1962,7 @@ PHP_FUNCTION(oci_password_change)
RETURN_FALSE;
}
- if (php_oci_password_change(connection, user, user_len, pass_old, pass_old_len, pass_new, pass_new_len)) {
+ if (php_oci_password_change(connection, user, (int) user_len, pass_old, (int) pass_old_len, pass_new, (int) pass_new_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -2009,7 +1981,7 @@ PHP_FUNCTION(oci_password_change)
RETURN_FALSE;
}
- connection = php_oci_do_connect_ex(user, user_len, pass_old, pass_old_len, pass_new, pass_new_len, dbname, dbname_len, NULL, OCI_DEFAULT, 0, 0);
+ connection = php_oci_do_connect_ex(user, (int) user_len, pass_old, (int) pass_old_len, pass_new, (int) pass_new_len, dbname, (int) dbname_len, NULL, OCI_DEFAULT, 0, 0);
if (!connection) {
RETURN_FALSE;
}
@@ -2062,9 +2034,9 @@ PHP_FUNCTION(oci_result)
Return a string containing runtime client library version information */
PHP_FUNCTION(oci_client_version)
{
- char *version = NULL;
+ char version[256];
- php_oci_client_get_version(&version);
+ php_oci_client_get_version(version, sizeof(version));
RETURN_STRING(version);
}
/* }}} */
@@ -2075,7 +2047,8 @@ PHP_FUNCTION(oci_server_version)
{
zval *z_connection;
php_oci_connection *connection;
- char *version = NULL;
+ char version[256];
+ zend_string *ret;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &z_connection) == FAILURE) {
return;
@@ -2083,11 +2056,12 @@ PHP_FUNCTION(oci_server_version)
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- if (php_oci_server_get_version(connection, &version)) {
+ if (php_oci_server_get_version(connection, version, sizeof(version))) {
RETURN_FALSE;
}
- RETURN_STRING(version);
+ ret = zend_string_init(version, strlen(version), 0);
+ RETURN_STR(ret);
}
/* }}} */
@@ -2180,14 +2154,14 @@ PHP_FUNCTION(oci_free_collection)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection);
- zend_list_delete(collection->id);
+ zend_list_close(collection->id);
RETURN_TRUE;
}
/* }}} */
@@ -2212,14 +2186,14 @@ PHP_FUNCTION(oci_collection_append)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection);
- if (php_oci_collection_append(collection, value, value_len)) {
+ if (php_oci_collection_append(collection, value, (int) value_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -2246,7 +2220,7 @@ PHP_FUNCTION(oci_collection_element_get)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
@@ -2279,12 +2253,12 @@ PHP_FUNCTION(oci_collection_assign)
}
}
- if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_collection_dest), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_collection_dest), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property. The first argument should be valid collection object");
RETURN_FALSE;
}
- if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_collection_from), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_collection_from), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property. The second argument should be valid collection object");
RETURN_FALSE;
}
@@ -2320,14 +2294,14 @@ PHP_FUNCTION(oci_collection_element_assign)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection);
- if (php_oci_collection_element_set(collection, element_index, value, value_len)) {
+ if (php_oci_collection_element_set(collection, element_index, value, (int) value_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -2348,7 +2322,7 @@ PHP_FUNCTION(oci_collection_size)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
@@ -2376,7 +2350,7 @@ PHP_FUNCTION(oci_collection_max)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
@@ -2409,7 +2383,7 @@ PHP_FUNCTION(oci_collection_trim)
}
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
RETURN_FALSE;
}
@@ -2439,7 +2413,7 @@ PHP_FUNCTION(oci_new_collection)
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- if ( (collection = php_oci_collection_create(connection, tdo, tdo_len, schema, schema_len)) ) {
+ if ( (collection = php_oci_collection_create(connection, tdo, (int) tdo_len, schema, (int) schema_len)) ) {
object_init_ex(return_value, oci_coll_class_entry_ptr);
add_property_resource(return_value, "collection", collection->id);
}
diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c
index 7661a048db..78ba8f11fa 100644
--- a/ext/oci8/oci8_lob.c
+++ b/ext/oci8/oci8_lob.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -69,7 +69,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon
}
descriptor = ecalloc(1, sizeof(php_oci_descriptor));
- descriptor->type = type;
+ descriptor->type = (ub4) type;
descriptor->connection = connection;
++GC_REFCOUNT(descriptor->connection->id);
@@ -109,7 +109,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon
return NULL;
}
- zend_hash_index_update_ptr(connection->descriptors, descriptor->index, &descriptor);
+ zend_hash_index_update_ptr(connection->descriptors, descriptor->index, descriptor);
}
return descriptor;
@@ -216,7 +216,7 @@ static inline int php_oci_lob_calculate_buffer(php_oci_descriptor *descriptor, z
sword errstatus;
if (descriptor->type == OCI_DTYPE_FILE) {
- return read_length;
+ return (int) read_length;
}
if (!descriptor->chunk_size) {
@@ -225,16 +225,16 @@ static inline int php_oci_lob_calculate_buffer(php_oci_descriptor *descriptor, z
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- return read_length; /* we have to return original length here */
+ return (int) read_length; /* we have to return original length here */
}
descriptor->chunk_size = chunk_size;
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
}
if ((read_length % descriptor->chunk_size) != 0) {
- return descriptor->chunk_size * ((read_length / descriptor->chunk_size) + 1);
+ return (int) descriptor->chunk_size * (((int) read_length / descriptor->chunk_size) + 1);
}
- return read_length;
+ return (int) read_length;
}
/* }}} */
@@ -278,7 +278,7 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, zend_long read_length, zen
requested_len = length;
}
- if (requested_len > (length - initial_offset)) {
+ if ((ub4) requested_len > (length - (ub4) initial_offset)) {
requested_len = length - initial_offset;
}
@@ -324,7 +324,7 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, zend_long read_length, zen
/* BLOBs don't have encoding, so bytes_per_char == 1 */
}
- ctx.alloc_len = (requested_len + 1) * bytes_per_char;
+ ctx.alloc_len = ((ub4) requested_len + 1) * bytes_per_char;
*data = ecalloc(bytes_per_char, requested_len + 1);
if (is_clob) {
@@ -335,7 +335,7 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, zend_long read_length, zen
bytes_read = requested_len;
}
- buffer_size = (requested_len < buffer_size ) ? requested_len : buffer_size; /* optimize buffer size */
+ buffer_size = ((int) requested_len < buffer_size ) ? (int) requested_len : buffer_size; /* optimize buffer size */
buffer_size = php_oci_lob_calculate_buffer(descriptor, buffer_size); /* use chunk size */
bufp = (ub1 *) ecalloc(1, buffer_size);
@@ -416,10 +416,6 @@ int php_oci_lob_write (php_oci_descriptor *descriptor, ub4 offset, char *data, i
return 0;
}
- if (offset < 0) {
- offset = 0;
- }
-
if (offset > descriptor->lob_current_position) {
offset = descriptor->lob_current_position;
}
@@ -450,7 +446,7 @@ int php_oci_lob_write (php_oci_descriptor *descriptor, ub4 offset, char *data, i
*bytes_written = data_len;
descriptor->lob_current_position += data_len;
- if (descriptor->lob_current_position > descriptor->lob_size) {
+ if ((int) descriptor->lob_current_position > (int) descriptor->lob_size) {
descriptor->lob_size = descriptor->lob_current_position;
}
@@ -529,7 +525,7 @@ int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor *d
if (length == -1) {
copy_len = length_from - descriptor_from->lob_current_position;
} else {
- copy_len = length;
+ copy_len = (ub4) length;
}
if ((int)copy_len <= 0) {
@@ -646,7 +642,7 @@ int php_oci_lob_flush(php_oci_descriptor *descriptor, zend_long flush_flag)
return 0;
}
- PHP_OCI_CALL_RETURN(errstatus, OCILobFlushBuffer, (connection->svc, connection->err, lob, flush_flag));
+ PHP_OCI_CALL_RETURN(errstatus, OCILobFlushBuffer, (connection->svc, connection->err, lob, (ub4) flush_flag));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
@@ -670,11 +666,11 @@ void php_oci_lob_free (php_oci_descriptor *descriptor)
}
if (descriptor->connection->descriptors) {
- /* delete descriptor from the hash */
- zend_hash_index_del(descriptor->connection->descriptors, descriptor->index);
if (zend_hash_num_elements(descriptor->connection->descriptors) == 0) {
descriptor->connection->descriptor_count = 0;
} else {
+ /* delete descriptor from the hash */
+ zend_hash_index_del(descriptor->connection->descriptors, descriptor->index);
if (descriptor->index + 1 == descriptor->connection->descriptor_count) {
/* If the descriptor being freed is the end-most one
* allocated, then the descriptor_count is reduced so
@@ -720,12 +716,7 @@ int php_oci_lob_import (php_oci_descriptor *descriptor, char *filename)
ub4 offset = 1;
sword errstatus;
-#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
- /* Safe mode has been removed in PHP 5.4 */
if (php_check_open_basedir(filename)) {
-#else
- if ((PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename)) {
-#endif
return 1;
}
@@ -830,7 +821,7 @@ int php_oci_lob_truncate (php_oci_descriptor *descriptor, zend_long new_lob_leng
return 1;
}
- PHP_OCI_CALL_RETURN(errstatus, OCILobTrim, (connection->svc, connection->err, lob, new_lob_length));
+ PHP_OCI_CALL_RETURN(errstatus, OCILobTrim, (connection->svc, connection->err, lob, (ub4) new_lob_length));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
@@ -838,7 +829,7 @@ int php_oci_lob_truncate (php_oci_descriptor *descriptor, zend_long new_lob_leng
return 1;
}
- descriptor->lob_size = new_lob_length;
+ descriptor->lob_size = (ub4) new_lob_length;
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
return 0;
@@ -868,7 +859,7 @@ int php_oci_lob_erase (php_oci_descriptor *descriptor, zend_long offset, ub4 len
length = lob_length;
}
- PHP_OCI_CALL_RETURN(errstatus, OCILobErase, (connection->svc, connection->err, lob, (ub4 *)&length, offset+1));
+ PHP_OCI_CALL_RETURN(errstatus, OCILobErase, (connection->svc, connection->err, lob, (ub4 *)&length, (ub4) offset+1));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index 3f5e826a7b..55983d3e9f 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -91,7 +91,8 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char
}
if (query && query_len) {
- statement->last_query = estrndup(query, query_len);
+ statement->last_query = ecalloc(1, query_len + 1);
+ memcpy(statement->last_query, query, query_len);
statement->last_query_len = query_len;
}
else {
@@ -166,8 +167,8 @@ php_oci_statement *php_oci_get_implicit_resultset(php_oci_statement *statement)
statement2->has_descr = 0;
statement2->stmttype = 0;
- Z_ADDREF_P(statement->id);
- Z_ADDREF_P(statement2->connection->id);
+ GC_REFCOUNT(statement->id)++;
+ GC_REFCOUNT(statement2->connection->id)++;
php_oci_statement_set_prefetch(statement2, statement->prefetch_count);
@@ -359,8 +360,8 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows)
continue;
}
- zval_dtor(&column->define->zval);
- php_oci_column_to_zval(column, &column->define->zval, 0);
+ zval_dtor(column->define->zval);
+ php_oci_column_to_zval(column, column->define->zval, 0);
}
return 0;
@@ -677,7 +678,8 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode)
}
PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM));
- outcol->name = estrndup((char*) colname, outcol->name_len);
+ outcol->name = ecalloc(1, outcol->name_len + 1);
+ memcpy(outcol->name, colname, outcol->name_len);
/* find a user-set define */
if (statement->defines) {
@@ -873,19 +875,19 @@ void php_oci_statement_free(php_oci_statement *statement)
efree(statement->last_query);
}
- if (statement->columns) {
- zend_hash_destroy(statement->columns);
- FREE_HASHTABLE(statement->columns);
- }
-
if (statement->binds) {
zend_hash_destroy(statement->binds);
- FREE_HASHTABLE(statement->binds);
+ efree(statement->binds);
}
if (statement->defines) {
zend_hash_destroy(statement->defines);
- FREE_HASHTABLE(statement->defines);
+ efree(statement->defines);
+ }
+
+ if (statement->columns) {
+ zend_hash_destroy(statement->columns);
+ efree(statement->columns);
}
if (statement->parent_stmtid) {
@@ -907,7 +909,7 @@ int php_oci_bind_pre_exec(zval *data, void *result)
*(int *)result = 0;
- if (Z_TYPE(bind->zval) == IS_ARRAY) {
+ if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
/* These checks are currently valid for oci_bind_by_name, not
* oci_bind_array_by_name. Also bind->type and
* bind->indicator are not used for oci_bind_array_by_name.
@@ -921,7 +923,7 @@ int php_oci_bind_pre_exec(zval *data, void *result)
case SQLT_CLOB:
case SQLT_BLOB:
case SQLT_RDD:
- if (Z_TYPE(bind->zval) != IS_OBJECT) {
+ if (Z_TYPE_P(bind->zval) != IS_OBJECT) {
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
*(int *)result = 1;
}
@@ -937,14 +939,14 @@ int php_oci_bind_pre_exec(zval *data, void *result)
case SQLT_LBI:
case SQLT_BIN:
case SQLT_LNG:
- if (Z_TYPE(bind->zval) == IS_RESOURCE || Z_TYPE(bind->zval) == IS_OBJECT) {
+ if (Z_TYPE_P(bind->zval) == IS_RESOURCE || Z_TYPE_P(bind->zval) == IS_OBJECT) {
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
*(int *)result = 1;
}
break;
case SQLT_RSET:
- if (Z_TYPE(bind->zval) != IS_RESOURCE) {
+ if (Z_TYPE_P(bind->zval) != IS_RESOURCE) {
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
*(int *)result = 1;
}
@@ -967,27 +969,27 @@ int php_oci_bind_post_exec(zval *data)
sword errstatus;
if (bind->indicator == -1) { /* NULL */
- zval *val = &bind->zval;
+ zval *val = bind->zval;
if (Z_TYPE_P(val) == IS_STRING) {
*Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */
}
zval_dtor(val);
ZVAL_NULL(val);
- } else if (Z_TYPE(bind->zval) == IS_STRING
- && Z_STRLEN(bind->zval) > 0
- && Z_STRVAL(bind->zval)[ Z_STRLEN(bind->zval) ] != '\0') {
+ } else if (Z_TYPE_P(bind->zval) == IS_STRING
+ && Z_STRLEN_P(bind->zval) > 0
+ && Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] != '\0') {
/* The post- PHP 5.3 feature for "interned" strings disallows
* their reallocation but (i) any IN binds either interned or
* not should already be null terminated and (ii) for OUT
* binds, php_oci_bind_out_callback() should have allocated a
* new string that we can modify here.
*/
- Z_STR(bind->zval) = zend_string_extend(Z_STR(bind->zval), Z_STRLEN(bind->zval)+1, 0);
- Z_STRVAL(bind->zval)[ Z_STRLEN(bind->zval) ] = '\0';
- } else if (Z_TYPE(bind->zval) == IS_ARRAY) {
+ Z_STR_P(bind->zval) = zend_string_extend(Z_STR_P(bind->zval), Z_STRLEN_P(bind->zval)+1, 0);
+ Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0';
+ } else if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
int i;
zval *entry = NULL;
- HashTable *hash = HASH_OF(&bind->zval);
+ HashTable *hash = HASH_OF(bind->zval);
zend_hash_internal_pointer_reset(hash);
@@ -995,35 +997,35 @@ int php_oci_bind_post_exec(zval *data)
case SQLT_NUM:
case SQLT_INT:
case SQLT_LNG:
- for (i = 0; i < bind->array.current_length; i++) {
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
zval_dtor(entry);
ZVAL_LONG(entry, ((ub4 *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
} else {
- add_next_index_long(&bind->zval, ((ub4 *)(bind->array.elements))[i]);
+ add_next_index_long(bind->zval, ((ub4 *)(bind->array.elements))[i]);
}
}
break;
case SQLT_FLT:
- for (i = 0; i < bind->array.current_length; i++) {
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
zval_dtor(entry);
ZVAL_DOUBLE(entry, ((double *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
} else {
- add_next_index_double(&bind->zval, ((double *)(bind->array.elements))[i]);
+ add_next_index_double(bind->zval, ((double *)(bind->array.elements))[i]);
}
}
break;
case SQLT_ODT:
- for (i = 0; i < bind->array.current_length; i++) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
oratext buff[1024];
ub4 buff_len = 1024;
memset((void*)buff,0,sizeof(buff));
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.elements))[i]), 0, 0, 0, 0, &buff_len, buff));
zval_dtor(entry);
@@ -1041,10 +1043,10 @@ int php_oci_bind_post_exec(zval *data)
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- add_next_index_null(&bind->zval);
+ add_next_index_null(bind->zval);
} else {
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
- add_next_index_stringl(&bind->zval, (char *)buff, buff_len);
+ add_next_index_stringl(bind->zval, (char *)buff, buff_len);
}
}
}
@@ -1056,19 +1058,24 @@ int php_oci_bind_post_exec(zval *data)
case SQLT_AVC:
case SQLT_STR:
case SQLT_LVC:
- for (i = 0; i < bind->array.current_length; i++) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
/* int curr_element_length = strlen(((text *)bind->array.elements)+i*bind->array.max_length); */
int curr_element_length = bind->array.element_lengths[i];
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
zval_dtor(entry);
ZVAL_STRINGL(entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
zend_hash_move_forward(hash);
} else {
- add_next_index_stringl(&bind->zval, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
+ add_next_index_stringl(bind->zval, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
}
}
break;
}
+ } else if ((Z_TYPE_P(bind->zval) == IS_TRUE) || (Z_TYPE_P(bind->zval) == IS_FALSE)) {
+ if (Z_LVAL_P(bind->zval) == 0)
+ ZVAL_BOOL(bind->zval, FALSE);
+ else if (Z_LVAL_P(bind->zval) == 1)
+ ZVAL_BOOL(bind->zval, TRUE);
}
return 0;
@@ -1077,7 +1084,7 @@ int php_oci_bind_post_exec(zval *data)
/* {{{ php_oci_bind_by_name()
Bind zval to the given placeholder */
-int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long maxlength, ub2 type)
+int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long maxlength, ub2 type)
{
php_oci_collection *bind_collection = NULL;
php_oci_descriptor *bind_descriptor = NULL;
@@ -1086,7 +1093,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
/* dvoid *php_oci_collection = NULL; */
OCIStmt *oci_stmt = NULL;
dvoid *bind_data = NULL;
- php_oci_bind bind, *old_bind, *bindp;
+ php_oci_bind *old_bind, *bindp;
int mode = OCI_DATA_AT_EXEC;
sb4 value_sz = -1;
sword errstatus;
@@ -1096,7 +1103,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
{
zval *tmp;
- if (Z_TYPE_P(var) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(var), "collection", sizeof("collection"))) == NULL) {
+ if (Z_TYPE_P(var) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(var), "collection", sizeof("collection")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find collection property");
return 1;
}
@@ -1118,7 +1125,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
{
zval *tmp;
- if (Z_TYPE_P(var) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(var), "descriptor", sizeof("descriptor"))) == NULL) {
+ if (Z_TYPE_P(var) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(var), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find descriptor property");
return 1;
}
@@ -1142,8 +1149,14 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
return 1;
}
convert_to_long(var);
+#if defined(OCI_MAJOR_VERSION) && (OCI_MAJOR_VERSION > 10) && \
+ (defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64))
+ bind_data = (ub8 *)&Z_LVAL_P(var);
+ value_sz = sizeof(ub8);
+#else
bind_data = (ub4 *)&Z_LVAL_P(var);
value_sz = sizeof(ub4);
+#endif
mode = OCI_DEFAULT;
break;
@@ -1159,10 +1172,16 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
if (Z_TYPE_P(var) != IS_NULL) {
convert_to_string(var);
}
- if (maxlength == -1) {
- value_sz = (Z_TYPE_P(var) == IS_STRING) ? Z_STRLEN_P(var) : 0;
+ if ((maxlength == -1) || (maxlength == 0)) {
+ if (type == SQLT_LNG) {
+ value_sz = SB4MAXVAL;
+ } else if (Z_TYPE_P(var) == IS_STRING) {
+ value_sz = (sb4) Z_STRLEN_P(var);
+ } else {
+ value_sz = PHP_OCI_PIECE_SIZE;
+ }
} else {
- value_sz = maxlength;
+ value_sz = (sb4) maxlength;
}
break;
@@ -1188,8 +1207,17 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
return 1;
}
convert_to_boolean(var);
- bind_data = (int *)&Z_LVAL_P(var);
- value_sz = sizeof(int);
+ bind_data = (zend_long *)&Z_LVAL_P(var);
+ if (Z_TYPE_P(var) == IS_TRUE)
+ *(zend_long *)bind_data = 1;
+ else if (Z_TYPE_P(var) == IS_FALSE)
+ *(zend_long *)bind_data = 0;
+ else {
+ php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
+ return 1;
+ }
+
+ value_sz = sizeof(zend_long);
mode = OCI_DEFAULT;
break;
@@ -1200,11 +1228,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
return 1;
break;
}
-
- if (value_sz == 0) {
- value_sz = 1;
- }
-
+
if (!statement->binds) {
ALLOC_HASHTABLE(statement->binds);
zend_hash_init(statement->binds, 13, NULL, php_oci_bind_hash_dtor, 0);
@@ -1212,10 +1236,9 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
if ((old_bind = zend_hash_str_find_ptr(statement->binds, name, name_len)) != NULL) {
bindp = old_bind;
- zval_ptr_dtor(&bindp->zval);
} else {
zend_string *zvtmp;
- zvtmp = zend_string_init(name, name_len + 1, 0);
+ zvtmp = zend_string_init(name, name_len, 0);
bindp = (php_oci_bind *) ecalloc(1, sizeof(php_oci_bind));
bindp = zend_hash_update_ptr(statement->binds, zvtmp, bindp);
zend_string_release(zvtmp);
@@ -1224,10 +1247,14 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
bindp->descriptor = oci_desc;
bindp->statement = oci_stmt;
bindp->parent_statement = statement;
- ZVAL_COPY(&bindp->zval, var);
+ bindp->zval = var;
bindp->type = type;
- Z_TRY_ADDREF_P(var);
-
+ /* Storing max length set in OCIBindByName() to check it later in
+ * php_oci_bind_in_callback() function to avoid ORA-1406 error while
+ * executing OCIStmtExecute()
+ */
+ bindp->dummy_len = value_sz;
+
PHP_OCI_CALL_RETURN(errstatus,
OCIBindByName,
(
@@ -1235,7 +1262,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
(OCIBind **)&bindp->bind, /* bind hdl (will alloc) */
statement->err, /* error handle */
(text*) name, /* placeholder name */
- name_len, /* placeholder length */
+ (sb4) name_len, /* placeholder length */
(dvoid *)bind_data, /* in/out data */
value_sz, /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */
type, /* in/out data type */
@@ -1314,7 +1341,7 @@ sb4 php_oci_bind_in_callback(
php_oci_bind *phpbind;
zval *val;
- if (!(phpbind=(php_oci_bind *)ictxp) || !(val = &phpbind->zval)) {
+ if (!(phpbind=(php_oci_bind *)ictxp) || !(val = phpbind->zval)) {
php_error_docref(NULL, E_WARNING, "Invalid phpbind pointer value");
return OCI_ERROR;
}
@@ -1330,7 +1357,15 @@ sb4 php_oci_bind_in_callback(
convert_to_string(val);
*bufpp = Z_STRVAL_P(val);
- *alenp = Z_STRLEN_P(val);
+ *alenp = (ub4) Z_STRLEN_P(val);
+ /*
+ * bind_char_1: If max length set in OCIBindByName is less than the
+ * actual length of input string, then we have to overwrite alenp with
+ * max value set in OCIBindByName (dummy_len). Or else it will cause
+ * ORA-1406 error in OCIStmtExecute
+ */
+ if ((phpbind->dummy_len > 0) && (phpbind->dummy_len < *alenp))
+ *alenp = phpbind->dummy_len;
*indpp = (dvoid *)&phpbind->indicator;
} else if (phpbind->statement != 0) {
/* RSET */
@@ -1367,7 +1402,7 @@ sb4 php_oci_bind_out_callback(
zval *val;
sb4 retval = OCI_ERROR;
- if (!(phpbind=(php_oci_bind *)octxp) || !(val = &phpbind->zval)) {
+ if (!(phpbind=(php_oci_bind *)octxp) || !(val = phpbind->zval)) {
php_error_docref(NULL, E_WARNING, "Invalid phpbind pointer value");
return retval;
}
@@ -1394,7 +1429,7 @@ sb4 php_oci_bind_out_callback(
* out-bind as the contents would have been changed for in/out
* binds (Bug #46994).
*/
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(val), "descriptor", sizeof("descriptor"))) == NULL) {
+ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(val), "descriptor", sizeof("descriptor")-1)) == NULL) {
php_error_docref(NULL, E_WARNING, "Unable to find object outbind descriptor property");
return OCI_ERROR;
}
@@ -1411,16 +1446,21 @@ sb4 php_oci_bind_out_callback(
convert_to_string(val);
zval_dtor(val);
-#if 0
+ {
+ char *p = ecalloc(1, PHP_OCI_PIECE_SIZE);
+ ZVAL_STRINGL(val, p, PHP_OCI_PIECE_SIZE);
+ efree(p);
+ }
+#if 0
Z_STRLEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
- Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(phpbind->zval) + 1);
+ Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(val) + 1);
/* XXX is this right? */
-#endif
ZVAL_STRINGL(val, NULL, Z_STRLEN(phpbind->zval) + 1);
+#endif
/* XXX we assume that zend-zval len has 4 bytes */
- *alenpp = (ub4*) &Z_STRLEN(phpbind->zval);
- *bufpp = Z_STRVAL(phpbind->zval);
+ *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
+ *bufpp = Z_STRVAL_P(phpbind->zval);
*piecep = OCI_ONE_PIECE;
*rcodepp = &phpbind->retcode;
*indpp = &phpbind->indicator;
@@ -1454,7 +1494,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
}
if (Z_TYPE_P(column_index) == IS_STRING) {
- column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), Z_STRLEN_P(column_index));
+ column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), (int) Z_STRLEN_P(column_index));
if (!column) {
php_error_docref(NULL, E_WARNING, "Invalid column name \"%s\"", Z_STRVAL_P(column_index));
return NULL;
@@ -1525,7 +1565,7 @@ int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows)
/* {{{ php_oci_bind_array_by_name()
Bind arrays to PL/SQL types */
-int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type)
+int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type)
{
php_oci_bind *bind, *bindp;
sword errstatus;
@@ -1575,52 +1615,65 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int nam
return 1;
}
- if (!statement->binds) {
- ALLOC_HASHTABLE(statement->binds);
- zend_hash_init(statement->binds, 13, NULL, php_oci_bind_hash_dtor, 0);
- }
-
- zvtmp = zend_string_init(name, name_len + 1, 0);
- bindp = zend_hash_update_ptr(statement->binds, zvtmp, bind);
- zend_string_release(zvtmp);
-
- bindp->descriptor = NULL;
- bindp->statement = NULL;
- bindp->parent_statement = statement;
- bindp->bind = NULL;
- ZVAL_COPY(&bindp->zval, var);
- bindp->array.type = type;
- bindp->indicator = 0; /* not used for array binds */
- bindp->type = 0; /* not used for array binds */
-
- Z_ADDREF_P(var);
+ bind->descriptor = NULL;
+ bind->statement = NULL;
+ bind->parent_statement = statement;
+ bind->bind = NULL;
+ bind->zval = var;
+ bind->array.type = type;
+ bind->indicator = 0; /* not used for array binds */
+ bind->type = 0; /* not used for array binds */
PHP_OCI_CALL_RETURN(errstatus,
OCIBindByName,
(
statement->stmt,
- (OCIBind **)&bindp->bind,
+ (OCIBind **)&bind->bind,
statement->err,
(text *)name,
- name_len,
- (dvoid *) bindp->array.elements,
- (sb4) bindp->array.max_length,
+ (sb4) name_len,
+ (dvoid *) bind->array.elements,
+ (sb4) bind->array.max_length,
(ub2)type,
- (dvoid *)bindp->array.indicators,
- (ub2 *)bindp->array.element_lengths,
+ (dvoid *)bind->array.indicators,
+ (ub2 *)bind->array.element_lengths,
(ub2 *)0, /* bindp->array.retcodes, */
(ub4) max_table_length,
- (ub4 *) &(bindp->array.current_length),
+ (ub4 *) &(bind->array.current_length),
(ub4) OCI_DEFAULT
)
);
if (errstatus != OCI_SUCCESS) {
+ if (bind->array.elements) {
+ efree(bind->array.elements);
+ }
+
+ if (bind->array.element_lengths) {
+ efree(bind->array.element_lengths);
+ }
+
+ if (bind->array.indicators) {
+ efree(bind->array.indicators);
+ }
+
+ efree(bind);
+
statement->errcode = php_oci_error(statement->err, errstatus);
PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode);
return 1;
}
+
+ if (!statement->binds) {
+ ALLOC_HASHTABLE(statement->binds);
+ zend_hash_init(statement->binds, 13, NULL, php_oci_bind_hash_dtor, 0);
+ }
+
+ zvtmp = zend_string_init(name, name_len, 0);
+ bindp = zend_hash_update_ptr(statement->binds, zvtmp, bind);
+ zend_string_release(zvtmp);
+
statement->errcode = 0; /* retain backwards compat with OCI8 1.4 */
return 0;
}
@@ -1642,7 +1695,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
while ((entry = zend_hash_get_current_data(hash)) != NULL) {
convert_to_string_ex(entry);
- if (maxlength == -1 || Z_STRLEN_P(entry) > maxlength) {
+ if (maxlength == -1 || Z_STRLEN_P(entry) > (size_t) maxlength) {
maxlength = Z_STRLEN_P(entry) + 1;
}
@@ -1655,7 +1708,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text));
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
bind->array.old_length = bind->array.current_length;
- bind->array.max_length = maxlength;
+ bind->array.max_length = (ub4) maxlength;
bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0);
memset(bind->array.element_lengths, 0, max_table_length*sizeof(ub2));
bind->array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0);
@@ -1666,7 +1719,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
for (i = 0; i < bind->array.current_length; i++) {
if ((entry = zend_hash_get_current_data(hash)) != NULL) {
convert_to_string_ex(entry);
- bind->array.element_lengths[i] = Z_STRLEN_P(entry);
+ bind->array.element_lengths[i] = (ub2) Z_STRLEN_P(entry);
if (Z_STRLEN_P(entry) == 0) {
bind->array.indicators[i] = -1;
}
@@ -1682,7 +1735,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
int element_length;
convert_to_string_ex(entry);
- element_length = (maxlength > Z_STRLEN_P(entry)) ? Z_STRLEN_P(entry) : maxlength;
+ element_length = ((size_t) maxlength > Z_STRLEN_P(entry)) ? (int) Z_STRLEN_P(entry) : (int) maxlength;
memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_P(entry), element_length);
((text *)bind->array.elements)[i*maxlength + element_length] = '\0';
@@ -1806,7 +1859,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng
if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
convert_to_string_ex(entry);
- PHP_OCI_CALL_RETURN(errstatus, OCIDateFromText, (connection->err, (CONST text *)Z_STRVAL_P(entry), Z_STRLEN_P(entry), NULL, 0, NULL, 0, &oci_date));
+ PHP_OCI_CALL_RETURN(errstatus, OCIDateFromText, (connection->err, (CONST text *)Z_STRVAL_P(entry), (ub4) Z_STRLEN_P(entry), NULL, 0, NULL, 0, &oci_date));
if (errstatus != OCI_SUCCESS) {
/* failed to convert string to date */
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index bb2b660b14..88462415cb 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -8,17 +8,18 @@ http://pear.php.net/dtd/package-2.0.xsd">
<summary>Extension for Oracle Database</summary>
<description>
-Use the OCI8 extension to access Oracle Database. The extension can
-be linked with Oracle client libraries from Oracle Database 10.2, 11,
-or 12.1. These libraries are found in the database installation, or
-in the free Oracle Instant Client available from Oracle. Oracle's
-standard cross-version connectivity applies. For example, PHP OCI8
-linked with Instant Client 11.2 can connect to Oracle Database 9.2
-onward. See Oracle's note "Oracle Client / Server Interoperability
-Support" (ID 207303.1) for details. PHP OCI8 2.0 can be built with
-PHP 5.2 onward. Use the older PHP OCI8 1.4.10 when using PHP 4.3.9
-through to PHP 5.1.x, or when only Oracle Database 9.2 client
-libraries are available.
+Use the OCI8 extension to access Oracle Database. PHP OCI8 2.1 builds
+with PHP 7. Use 'pecl install oci8-2.0.11' to install OCI8 for PHP
+5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10' to install PHP OCI8 1.4
+for PHP 4.3.9 - PHP 5.1. The OCI8 extension can be linked with Oracle
+client libraries from Oracle Database 12.1, 11, or 10.2. These
+libraries are found in your database installation, or in the free
+Oracle Instant Client from
+http://www.oracle.com/technetwork/database/features/instant-client/.
+Oracle's standard cross-version connectivity applies. For example,
+PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
+Database 9.2 onward. See Oracle's note "Oracle Client / Server
+Interoperability Support" (ID 207303.1) for details.
</description>
<lead>
<name>Christopher Jones</name>
@@ -45,12 +46,12 @@ libraries are available.
<active>no</active>
</lead>
- <date>2014-03-19</date>
+ <date>2016-04-15</date>
<time>12:00:00</time>
<version>
- <release>2.0.9</release>
- <api>2.0.9</api>
+ <release>2.1.1</release>
+ <api>2.1.1</api>
</version>
<stability>
<release>stable</release>
@@ -58,7 +59,8 @@ libraries are available.
</stability>
<license uri="http://www.php.net/license">PHP</license>
<notes>
-Fixed oci_field_* reflection: $field can be a column name or index
+This version is for PHP 7 only.
+Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns)
</notes>
<contents>
<dir name="/">
@@ -79,53 +81,54 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="array_bind_014.phpt" role="test" />
<file name="array_bind_bdouble.phpt" role="test" />
<file name="array_bind_bfloat.phpt" role="test" />
- <file name="array_bind_date1.phpt" role="test" />
<file name="array_bind_date.phpt" role="test" />
- <file name="array_bind_float1.phpt" role="test" />
+ <file name="array_bind_date1.phpt" role="test" />
<file name="array_bind_float.phpt" role="test" />
- <file name="array_bind_int1.phpt" role="test" />
+ <file name="array_bind_float1.phpt" role="test" />
<file name="array_bind_int.phpt" role="test" />
- <file name="array_bind_str1.phpt" role="test" />
+ <file name="array_bind_int1.phpt" role="test" />
<file name="array_bind_str.phpt" role="test" />
+ <file name="array_bind_str1.phpt" role="test" />
<file name="array_bind_uin.phpt" role="test" />
<file name="b47243_1.phpt" role="test" />
<file name="b47243_2.phpt" role="test" />
<file name="b47243_3.phpt" role="test" />
<file name="bind_boolean_1.phpt" role="test" />
- <file name="bind_char_1_11gR1.phpt" role="test" />
<file name="bind_char_1.phpt" role="test" />
- <file name="bind_char_2_11gR1.phpt" role="test" />
+ <file name="bind_char_1_11gR1.phpt" role="test" />
<file name="bind_char_2.phpt" role="test" />
- <file name="bind_char_3_11gR1.phpt" role="test" />
+ <file name="bind_char_2_11gR1.phpt" role="test" />
<file name="bind_char_3.phpt" role="test" />
- <file name="bind_char_4_11gR1.phpt" role="test" />
+ <file name="bind_char_3_11gR1.phpt" role="test" />
<file name="bind_char_4.phpt" role="test" />
+ <file name="bind_char_4_11gR1.phpt" role="test" />
<file name="bind_empty.phpt" role="test" />
<file name="bind_long.phpt" role="test" />
<file name="bind_long_raw.phpt" role="test" />
- <file name="bind_misccoltypes_errs.phpt" role="test" />
<file name="bind_misccoltypes.phpt" role="test" />
+ <file name="bind_misccoltypes_errs.phpt" role="test" />
<file name="bind_number.phpt" role="test" />
<file name="bind_query.phpt" role="test" />
- <file name="bind_raw_2.phpt" role="test" />
<file name="bind_raw.phpt" role="test" />
+ <file name="bind_raw_2.phpt" role="test" />
<file name="bind_rowid.phpt" role="test" />
<file name="bind_sqltafc.phpt" role="test" />
<file name="bind_sqltchr_1.phpt" role="test" />
<file name="bind_sqltchr_2.phpt" role="test" />
<file name="bind_sqltint.phpt" role="test" />
<file name="bind_sqltnum.phpt" role="test" />
+ <file name="bind_sqltnum_11g.phpt" role="test" />
<file name="bind_unsupported_1.phpt" role="test" />
<file name="bind_unsupported_2.phpt" role="test" />
<file name="bind_unsupported_3.phpt" role="test" />
<file name="bug26133.phpt" role="test" />
- <file name="bug27303_1_11gR1.phpt" role="test" />
<file name="bug27303_1.phpt" role="test" />
- <file name="bug27303_2_11gR1.phpt" role="test" />
+ <file name="bug27303_1_11gR1.phpt" role="test" />
<file name="bug27303_2.phpt" role="test" />
+ <file name="bug27303_2_11gR1.phpt" role="test" />
<file name="bug27303_3.phpt" role="test" />
- <file name="bug27303_4_11gR1.phpt" role="test" />
<file name="bug27303_4.phpt" role="test" />
+ <file name="bug27303_4_11gR1.phpt" role="test" />
<file name="bug32325.phpt" role="test" />
<file name="bug35973.phpt" role="test" />
<file name="bug36010.phpt" role="test" />
@@ -143,8 +146,8 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="bug42496_1.phpt" role="test" />
<file name="bug42496_2.phpt" role="test" />
<file name="bug42841.phpt" role="test" />
- <file name="bug43492_2.phpt" role="test" />
<file name="bug43492.phpt" role="test" />
+ <file name="bug43492_2.phpt" role="test" />
<file name="bug43497.phpt" role="test" />
<file name="bug44008.phpt" role="test" />
<file name="bug44113.phpt" role="test" />
@@ -157,54 +160,57 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="bug51253.phpt" role="test" />
<file name="bug51291_1.phpt" role="test" />
<file name="bug51291_2.phpt" role="test" />
+ <file name="bug68298.phpt" role="test" />
+ <file name="bug71422.phpt" role="test" />
+ <file name="bug71600.phpt" role="test" />
<file name="clientversion.phpt" role="test" />
<file name="close.phpt" role="test" />
<file name="coll_001.phpt" role="test" />
- <file name="coll_002_func.phpt" role="test" />
<file name="coll_002.phpt" role="test" />
- <file name="coll_003_func.phpt" role="test" />
+ <file name="coll_002_func.phpt" role="test" />
<file name="coll_003.phpt" role="test" />
- <file name="coll_004_func.phpt" role="test" />
+ <file name="coll_003_func.phpt" role="test" />
<file name="coll_004.phpt" role="test" />
+ <file name="coll_004_func.phpt" role="test" />
<file name="coll_005.phpt" role="test" />
- <file name="coll_006_func.phpt" role="test" />
<file name="coll_006.phpt" role="test" />
+ <file name="coll_006_func.phpt" role="test" />
<file name="coll_007.phpt" role="test" />
<file name="coll_008.phpt" role="test" />
- <file name="coll_009_func.phpt" role="test" />
<file name="coll_009.phpt" role="test" />
- <file name="coll_010_func.phpt" role="test" />
+ <file name="coll_009_func.phpt" role="test" />
<file name="coll_010.phpt" role="test" />
- <file name="coll_011_func.phpt" role="test" />
+ <file name="coll_010_func.phpt" role="test" />
<file name="coll_011.phpt" role="test" />
- <file name="coll_012_func.phpt" role="test" />
+ <file name="coll_011_func.phpt" role="test" />
<file name="coll_012.phpt" role="test" />
- <file name="coll_013_func.phpt" role="test" />
+ <file name="coll_012_func.phpt" role="test" />
<file name="coll_013.phpt" role="test" />
- <file name="coll_014_func.phpt" role="test" />
+ <file name="coll_013_func.phpt" role="test" />
<file name="coll_014.phpt" role="test" />
- <file name="coll_015_func.phpt" role="test" />
+ <file name="coll_014_func.phpt" role="test" />
<file name="coll_015.phpt" role="test" />
- <file name="coll_016_func.phpt" role="test" />
+ <file name="coll_015_func.phpt" role="test" />
<file name="coll_016.phpt" role="test" />
- <file name="coll_017_func.phpt" role="test" />
+ <file name="coll_016_func.phpt" role="test" />
<file name="coll_017.phpt" role="test" />
+ <file name="coll_017_func.phpt" role="test" />
<file name="coll_018.phpt" role="test" />
<file name="coll_019.phpt" role="test" />
<file name="commit_001.phpt" role="test" />
<file name="commit_002.phpt" role="test" />
<file name="commit_old.phpt" role="test" />
+ <file name="conn_attr.inc" role="test" />
<file name="conn_attr_1.phpt" role="test" />
<file name="conn_attr_2.phpt" role="test" />
<file name="conn_attr_3.phpt" role="test" />
<file name="conn_attr_4.phpt" role="test" />
<file name="conn_attr_5.phpt" role="test" />
- <file name="conn_attr.inc" role="test" />
- <file name="connect_1_old.phpt" role="test" />
- <file name="connect_1.phpt" role="test" />
<file name="connect.inc" role="test" />
- <file name="connect_old.phpt" role="test" />
<file name="connect.phpt" role="test" />
+ <file name="connect_1.phpt" role="test" />
+ <file name="connect_1_old.phpt" role="test" />
+ <file name="connect_old.phpt" role="test" />
<file name="connect_scope1.phpt" role="test" />
<file name="connect_scope2.phpt" role="test" />
<file name="connect_scope_try1.phpt" role="test" />
@@ -214,24 +220,25 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="connect_scope_try5.phpt" role="test" />
<file name="connect_scope_try6.phpt" role="test" />
<file name="connect_with_charset_001.phpt" role="test" />
+ <file name="connect_without_oracle_home.phpt" role="test" />
<file name="connect_without_oracle_home_11.phpt" role="test" />
- <file name="connect_without_oracle_home_old_11.phpt" role="test" />
<file name="connect_without_oracle_home_old.phpt" role="test" />
- <file name="connect_without_oracle_home.phpt" role="test" />
+ <file name="connect_without_oracle_home_old_11.phpt" role="test" />
<file name="create_table.inc" role="test" />
<file name="create_type.inc" role="test" />
- <file name="cursor_bind_err.phpt" role="test" />
<file name="cursor_bind.phpt" role="test" />
- <file name="cursors_old.phpt" role="test" />
+ <file name="cursor_bind_err.phpt" role="test" />
<file name="cursors.phpt" role="test" />
- <file name="dbmsoutput.phpt" role="test" />
+ <file name="cursors_old.phpt" role="test" />
<file name="db_op_1.phpt" role="test" />
<file name="db_op_2.phpt" role="test" />
+ <file name="dbmsoutput.phpt" role="test" />
<file name="debug.phpt" role="test" />
+ <file name="default_prefetch.phpt" role="test" />
<file name="default_prefetch0.phpt" role="test" />
<file name="default_prefetch1.phpt" role="test" />
<file name="default_prefetch2.phpt" role="test" />
- <file name="default_prefetch.phpt" role="test" />
+ <file name="define.phpt" role="test" />
<file name="define0.phpt" role="test" />
<file name="define1.phpt" role="test" />
<file name="define2.phpt" role="test" />
@@ -240,7 +247,6 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="define5.phpt" role="test" />
<file name="define6.phpt" role="test" />
<file name="define_old.phpt" role="test" />
- <file name="define.phpt" role="test" />
<file name="descriptors.phpt" role="test" />
<file name="details.inc" role="test" />
<file name="drcp_cclass1.phpt" role="test" />
@@ -260,11 +266,13 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="drcp_scope4.phpt" role="test" />
<file name="drcp_scope5.phpt" role="test" />
<file name="driver_name.phpt" role="test" />
+ <file name="driver_name_11gR2.phpt" role="test" />
<file name="drop_table.inc" role="test" />
<file name="drop_type.inc" role="test" />
<file name="dupcolnames.phpt" role="test" />
<file name="edition_1.phpt" role="test" />
<file name="edition_2.phpt" role="test" />
+ <file name="error.phpt" role="test" />
<file name="error1.phpt" role="test" />
<file name="error2.phpt" role="test" />
<file name="error3.phpt" role="test" />
@@ -273,7 +281,6 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="error_bind_3.phpt" role="test" />
<file name="error_old.phpt" role="test" />
<file name="error_parse.phpt" role="test" />
- <file name="error.phpt" role="test" />
<file name="error_set.phpt" role="test" />
<file name="exec_fetch.phpt" role="test" />
<file name="execute_mode.phpt" role="test" />
@@ -281,28 +288,28 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="extauth_02.phpt" role="test" />
<file name="extauth_03.phpt" role="test" />
<file name="extauth_04.phpt" role="test" />
+ <file name="fetch.phpt" role="test" />
+ <file name="fetch_all.phpt" role="test" />
<file name="fetch_all1.phpt" role="test" />
<file name="fetch_all2.phpt" role="test" />
<file name="fetch_all3.phpt" role="test" />
<file name="fetch_all4.phpt" role="test" />
<file name="fetch_all5.phpt" role="test" />
- <file name="fetch_all.phpt" role="test" />
<file name="fetch_array.phpt" role="test" />
<file name="fetch_assoc.phpt" role="test" />
+ <file name="fetch_into.phpt" role="test" />
<file name="fetch_into1.phpt" role="test" />
<file name="fetch_into2.phpt" role="test" />
- <file name="fetch_into.phpt" role="test" />
+ <file name="fetch_object.phpt" role="test" />
<file name="fetch_object_1.phpt" role="test" />
<file name="fetch_object_2.phpt" role="test" />
- <file name="fetch_object.phpt" role="test" />
- <file name="fetch.phpt" role="test" />
<file name="fetch_row.phpt" role="test" />
+ <file name="field_funcs.phpt" role="test" />
<file name="field_funcs0.phpt" role="test" />
<file name="field_funcs1.phpt" role="test" />
<file name="field_funcs2.phpt" role="test" />
<file name="field_funcs3.phpt" role="test" />
<file name="field_funcs_old.phpt" role="test" />
- <file name="field_funcs.phpt" role="test" />
<file name="function_aliases.phpt" role="test" />
<file name="imp_res_1.phpt" role="test" />
<file name="imp_res_2.phpt" role="test" />
@@ -383,33 +390,33 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="lob_044.phpt" role="test" />
<file name="lob_aliases.phpt" role="test" />
<file name="lob_null.phpt" role="test" />
+ <file name="lob_temp.phpt" role="test" />
<file name="lob_temp1.phpt" role="test" />
<file name="lob_temp2.phpt" role="test" />
- <file name="lob_temp.phpt" role="test" />
<file name="minfo.phpt" role="test" />
<file name="null_byte_1.phpt" role="test" />
<file name="null_byte_2.phpt" role="test" />
<file name="null_byte_3.phpt" role="test" />
<file name="num.phpt" role="test" />
<file name="oci_execute_segfault.phpt" role="test" />
- <file name="old_oci_close1.phpt" role="test" />
<file name="old_oci_close.phpt" role="test" />
+ <file name="old_oci_close1.phpt" role="test" />
+ <file name="password.phpt" role="test" />
<file name="password_2.phpt" role="test" />
<file name="password_new.phpt" role="test" />
<file name="password_old.phpt" role="test" />
- <file name="password.phpt" role="test" />
- <file name="pecl_bug10194_blob_64.phpt" role="test" />
- <file name="pecl_bug10194_blob.phpt" role="test" />
<file name="pecl_bug10194.phpt" role="test" />
+ <file name="pecl_bug10194_blob.phpt" role="test" />
+ <file name="pecl_bug10194_blob_64.phpt" role="test" />
<file name="pecl_bug16035.phpt" role="test" />
<file name="pecl_bug16842.phpt" role="test" />
<file name="pecl_bug6109.phpt" role="test" />
<file name="pecl_bug8816.phpt" role="test" />
<file name="persistent.phpt" role="test" />
- <file name="prefetch_old.phpt" role="test" />
<file name="prefetch.phpt" role="test" />
- <file name="privileged_connect1.phpt" role="test" />
+ <file name="prefetch_old.phpt" role="test" />
<file name="privileged_connect.phpt" role="test" />
+ <file name="privileged_connect1.phpt" role="test" />
<file name="refcur_prefetch_1.phpt" role="test" />
<file name="refcur_prefetch_2.phpt" role="test" />
<file name="refcur_prefetch_3.phpt" role="test" />
@@ -420,11 +427,11 @@ Fixed oci_field_* reflection: $field can be a column name or index
<file name="serverversion.phpt" role="test" />
<file name="skipif.inc" role="test" />
<file name="statement_cache.phpt" role="test" />
- <file name="statement_type_old.phpt" role="test" />
<file name="statement_type.phpt" role="test" />
+ <file name="statement_type_old.phpt" role="test" />
<file name="test.gif" role="test" />
- <file name="testping.phpt" role="test" />
<file name="test.txt" role="test" />
+ <file name="testping.phpt" role="test" />
<file name="uncommitted.phpt" role="test" />
<file name="xmltype_01.phpt" role="test" />
<file name="xmltype_02.phpt" role="test" />
@@ -447,7 +454,7 @@ Fixed oci_field_* reflection: $field can be a column name or index
<dependencies>
<required>
<php>
- <min>5.2.0</min>
+ <min>7.0.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
@@ -462,6 +469,52 @@ Fixed oci_field_* reflection: $field can be a column name or index
<release>
<version>
+ <release>2.1.0</release>
+ <api>2.1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+This version is for PHP 7 only.
+Updated driver name format.
+ </notes>
+</release>
+
+<release>
+ <version>
+ <release>2.0.10</release>
+ <api>2.0.10</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Fixed bug #68298 (OCI int overflow)
+ </notes>
+</release>
+
+<release>
+ <version>
+ <release>2.0.9</release>
+ <api>2.0.9</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+Fixed oci_field_* reflection: $field can be a column name or index
+ </notes>
+</release>
+
+<release>
+ <version>
<release>2.0.8</release>
<api>2.0.8</api>
</version>
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index bdffc01b4b..da62aabac6 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -45,7 +45,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
-#define PHP_OCI8_VERSION "2.0.9"
+#define PHP_OCI8_VERSION "2.1.1"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index 9f1da48cd1..c0bc898cc1 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -95,6 +95,13 @@ extern zend_class_entry *oci_coll_class_entry_ptr;
#define PHP_OCI_LOB_BUFFER_ENABLED 1
#define PHP_OCI_LOB_BUFFER_USED 2
+#ifdef OCI_ERROR_MAXMSG_SIZE2
+/* Bigger size is defined from 11.2.0.3 onwards */
+#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE2
+#else
+#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE
+#endif
+
/* The mode parameter for oci_connect() is overloaded and accepts both
* privilege and external authentication flags OR'd together.
* PHP_OCI_CRED_EXT must be distinct from the OCI_xxx privilege
@@ -114,7 +121,7 @@ extern zend_class_entry *oci_coll_class_entry_ptr;
* Name passed to Oracle for tracing. Note some DB views only show
* the first nine characters of the driver name.
*/
-#define PHP_OCI8_DRIVER_NAME "PHP OCI8 " PHP_OCI8_VERSION
+#define PHP_OCI8_DRIVER_NAME "PHP OCI8 : " PHP_OCI8_VERSION
/* }}} */
@@ -144,7 +151,7 @@ typedef struct {
sb4 errcode; /* last ORA- error number */
HashTable *descriptors; /* descriptors hash, used to flush all the LOBs using this connection on commit */
- zend_ulong descriptor_count; /* used to index the descriptors hash table. Not an accurate count */
+ zend_ulong descriptor_count; /* used to index the descriptors hash table. Not an accurate count */
unsigned is_open:1; /* hels to determine if the connection is dead or not */
unsigned is_attached:1; /* hels to determine if we should detach from the server when closing/freeing the connection */
unsigned is_persistent:1; /* self-descriptive */
@@ -169,7 +176,7 @@ typedef struct {
php_oci_connection *connection; /* parent connection handle */
dvoid *descriptor; /* OCI descriptor handle */
ub4 type; /* descriptor type (FILE/LOB) */
- int lob_current_position; /* LOB internal pointer */
+ ub4 lob_current_position; /* LOB internal pointer */
int lob_size; /* cached LOB size. -1 = Lob wasn't initialized yet */
int buffering; /* cached buffering flag. 0 - off, 1 - on, 2 - on and buffer was used */
ub4 chunk_size; /* chunk size of the LOB. 0 - unknown */
@@ -202,7 +209,7 @@ typedef struct {
/* {{{ php_oci_define */
typedef struct {
- zval zval; /* zval used in define */
+ zval *zval; /* zval used in define */
text *name; /* placeholder's name */
ub4 name_len; /* placeholder's name length */
ub4 type; /* define type */
@@ -221,7 +228,7 @@ typedef struct {
OCIStmt *stmt; /* statement handle */
char *last_query; /* last query issued. also used to determine if this is a statement or a refcursor received from Oracle */
char impres_flag; /* PHP_OCI_IMPRES_*_ */
- zend_long last_query_len; /* last query length */
+ zend_long last_query_len; /* last query length */
HashTable *columns; /* hash containing all the result columns */
HashTable *binds; /* binds hash */
HashTable *defines; /* defines hash */
@@ -237,7 +244,7 @@ typedef struct {
/* {{{ php_oci_bind */
typedef struct {
OCIBind *bind; /* bind handle */
- zval zval; /* value */
+ zval *zval; /* value */
dvoid *descriptor; /* used for binding of LOBS etc */
OCIStmt *statement; /* used for binding REFCURSORs */
php_oci_statement *parent_statement; /* pointer to the parent statement */
@@ -412,7 +419,7 @@ void php_oci_bind_hash_dtor(zval *data);
void php_oci_descriptor_flush_hash_dtor(zval *data);
void php_oci_connection_descriptors_free(php_oci_connection *connection);
sb4 php_oci_error(OCIError *err_p, sword status);
-sb4 php_oci_fetch_errmsg(OCIError *error_handle, text **error_buf);
+sb4 php_oci_fetch_errmsg(OCIError *error_handle, text *error_buf, size_t error_buf_size);
int php_oci_fetch_sqltext_offset(php_oci_statement *statement, text **sqltext, ub2 *error_offset);
void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclusive);
php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, char *dbname, int dbname_len, char *charset, zend_long session_mode, int persistent, int exclusive);
@@ -420,8 +427,8 @@ int php_oci_connection_rollback(php_oci_connection *connection);
int php_oci_connection_commit(php_oci_connection *connection);
int php_oci_connection_release(php_oci_connection *connection);
int php_oci_password_change(php_oci_connection *connection, char *user, int user_len, char *pass_old, int pass_old_len, char *pass_new, int pass_new_len);
-void php_oci_client_get_version(char **version);
-int php_oci_server_get_version(php_oci_connection *connection, char **version);
+void php_oci_client_get_version(char *version, size_t version_size);
+int php_oci_server_get_version(php_oci_connection *connection, char *version, size_t version_size);
void php_oci_fetch_row(INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_args);
int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode);
void php_oci_dtrace_check_connection(php_oci_connection *connection, sb4 errcode, ub4 serverStatus);
@@ -485,14 +492,14 @@ int php_oci_statement_cancel(php_oci_statement *statement);
void php_oci_statement_free(php_oci_statement *statement);
int php_oci_bind_pre_exec(zval *data, void *result);
int php_oci_bind_post_exec(zval *data);
-int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long maxlength, ub2 type);
+int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long maxlength, ub2 type);
sb4 php_oci_bind_in_callback(dvoid *ictxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 *alenp, ub1 *piecep, dvoid **indpp);
sb4 php_oci_bind_out_callback(dvoid *octxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 **alenpp, ub1 *piecep, dvoid **indpp, ub2 **rcodepp);
php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS, int need_data);
int php_oci_cleanup_pre_fetch(zval *data);
int php_oci_statement_get_type(php_oci_statement *statement, ub2 *type);
int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows);
-int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type);
+int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type);
php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_length);
php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_length);
php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_length, zend_long maxlength);
@@ -545,4 +552,6 @@ ZEND_EXTERN_MODULE_GLOBALS(oci)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
*/
diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt
index dc162ff943..bb368fc7da 100644
--- a/ext/oci8/tests/bind_char_1.phpt
+++ b/ext/oci8/tests/bind_char_1.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -223,9 +223,6 @@ Test 1.4: Type: AFC: Length: strlen
::
Test 1.5: Type: AFC. Length: strlen-1
Querying:
- :1:
- :abc :
- ::
Test 1.6: Type: AFC. Length: strlen+1
Querying:
:1:
@@ -271,9 +268,6 @@ Test 3.4: Type: AFC: Length: strlen
:abc:
Test 3.5: Type: AFC. Length: strlen-1
Querying:
- :2:
- ::
- :abc:
Test 3.6: Type: AFC. Length: strlen+1
Querying:
:2:
diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt
index bdc29f766d..5b22cdc8c4 100644
--- a/ext/oci8/tests/bind_char_1_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_1_11gR1.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -215,7 +215,9 @@ Test 1.2: Type: AFC. Length: default
::
Test 1.3: Type: AFC: Length: 0
Querying:
- Oci_execute error ORA-1460 Exiting Query
+ :1:
+ :abc :
+ ::
Test 1.4: Type: AFC: Length: strlen
Querying:
:1:
@@ -223,7 +225,6 @@ Test 1.4: Type: AFC: Length: strlen
::
Test 1.5: Type: AFC. Length: strlen-1
Querying:
- Oci_execute error ORA-1460 Exiting Query
Test 1.6: Type: AFC. Length: strlen+1
Querying:
:1:
@@ -259,7 +260,9 @@ Test 3.2: Type: AFC. Length: default
:abc:
Test 3.3: Type: AFC: Length: 0
Querying:
- Oci_execute error ORA-1460 Exiting Query
+ :2:
+ ::
+ :abc:
Test 3.4: Type: AFC: Length: strlen
Querying:
:2:
@@ -267,7 +270,6 @@ Test 3.4: Type: AFC: Length: strlen
:abc:
Test 3.5: Type: AFC. Length: strlen-1
Querying:
- Oci_execute error ORA-1460 Exiting Query
Test 3.6: Type: AFC. Length: strlen+1
Querying:
:2:
diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt
index 9c61a858c8..57b0c610f1 100644
--- a/ext/oci8/tests/bind_char_2.phpt
+++ b/ext/oci8/tests/bind_char_2.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -102,15 +102,14 @@ Test 1.2: Type: AFC. Length: default
:2008-04-20:
Test 1.3: Type: AFC: Length: 0
Querying:
- Oci_execute error ORA-1460 Exiting Query
+ :1:
+ :2008-04-20:
Test 1.4: Type: AFC: Length: strlen
Querying:
:1:
:2008-04-20:
Test 1.5: Type: AFC. Length: strlen-1
Querying:
- :1:
- :2008-04-20:
Test 1.6: Type: AFC. Length: strlen+1
Querying:
:1:
diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt
index 06c37afc93..438885e12a 100644
--- a/ext/oci8/tests/bind_char_2_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_2_11gR1.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -102,14 +102,14 @@ Test 1.2: Type: AFC. Length: default
:2008-04-20:
Test 1.3: Type: AFC: Length: 0
Querying:
- Oci_execute error ORA-1460 Exiting Query
+ :1:
+ :2008-04-20:
Test 1.4: Type: AFC: Length: strlen
Querying:
:1:
:2008-04-20:
Test 1.5: Type: AFC. Length: strlen-1
Querying:
- Oci_execute error ORA-1460 Exiting Query
Test 1.6: Type: AFC. Length: strlen+1
Querying:
:1:
diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt
index 177676e25c..67aafae3cc 100644
--- a/ext/oci8/tests/bind_char_3.phpt
+++ b/ext/oci8/tests/bind_char_3.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -259,19 +259,20 @@ string(3) "abc"
Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC
Executing:
string(3) "abc"
-string(30) "abc "
+string(10) "abc "
Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC
Executing:
string(3) "abc"
-string(9) "abc "
+string(3) "abc"
Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC
Executing:
+ Oci_execute error ORA-6502
+string(3) "abc"
string(3) "abc"
-string(6) "abc "
Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC
Executing:
string(3) "abc"
-string(12) "abc "
+string(4) "abc "
Tests with ''
diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt
index c3ec999d0f..5c8b286249 100644
--- a/ext/oci8/tests/bind_char_3_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_3_11gR1.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -246,9 +246,8 @@ echo "Done\n";
--EXPECTF--
Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default
Executing:
- Oci_execute error ORA-6502
string(3) "abc"
-NULL
+string(3) "abc"
Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default
Executing:
string(3) "abc"
diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt
index b4d3e089b1..9ca369a172 100644
--- a/ext/oci8/tests/bind_char_4.phpt
+++ b/ext/oci8/tests/bind_char_4.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] >= 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -261,19 +261,20 @@ string(3) "abc"
Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC
Executing:
string(3) "abc"
-string(30) "abc "
+string(10) "abc "
Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC
Executing:
string(3) "abc"
-string(9) "abc "
+string(3) "abc"
Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC
Executing:
+ Oci_execute error ORA-6502
+string(3) "abc"
string(3) "abc"
-string(6) "abc "
Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC
Executing:
string(3) "abc"
-string(12) "abc "
+string(4) "abc "
Tests with ''
diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt
index ccad2cb789..56a666e4a5 100644
--- a/ext/oci8/tests/bind_char_4_11gR1.phpt
+++ b/ext/oci8/tests/bind_char_4_11gR1.phpt
@@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) {
}
?>
--ENV--
-NLS_LANG=
+NLS_LANG=.AL32UTF8
--FILE--
<?php
@@ -248,9 +248,8 @@ echo "Done\n";
--EXPECTF--
Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default
Executing:
- Oci_execute error ORA-6502
string(3) "abc"
-NULL
+string(3) "abc"
Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default
Executing:
string(3) "abc"
diff --git a/ext/oci8/tests/bind_long.phpt b/ext/oci8/tests/bind_long.phpt
index 40c579992d..cbd83128cb 100644
--- a/ext/oci8/tests/bind_long.phpt
+++ b/ext/oci8/tests/bind_long.phpt
@@ -20,8 +20,8 @@ echo "Test 1\n";
$stmt = oci_parse ($c, "insert into phptestlng (id, filetxt) values (:id, :filetxt)");
$i=1;
-$filetxt = file_get_contents( dirname(__FILE__)."/test.txt");
-
+$filetxt1 = file_get_contents( dirname(__FILE__)."/test.txt");
+$filetxt = str_replace("\r", "", $filetxt1);
oci_bind_by_name( $stmt, ":id", $i, -1);
oci_bind_by_name( $stmt, ":filetxt", $filetxt, -1, SQLT_LNG);
diff --git a/ext/oci8/tests/bind_sqltnum.phpt b/ext/oci8/tests/bind_sqltnum.phpt
index 93fc4809ec..6612745e57 100644
--- a/ext/oci8/tests/bind_sqltnum.phpt
+++ b/ext/oci8/tests/bind_sqltnum.phpt
@@ -3,6 +3,10 @@ Bind with SQLT_NUM
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
+preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+if (!(isset($matches[0]) && $matches[0] >= 12)) {
+ die("skip works only with Oracle 12c or greater version of Oracle client libraries");
+}
?>
--FILE--
<?php
@@ -25,7 +29,7 @@ oci8_test_sql_execute($c, $stmtarray);
function check_col($c, $colname, $id)
{
- $s = oci_parse($c, "select $colname from bind_sqltnum_tab where id = :id");
+ $s = oci_parse($c, "select dump($colname) from bind_sqltnum_tab where id = :id");
oci_bind_by_name($s, ":id", $id);
oci_execute($s);
oci_fetch_all($s, $r);
@@ -194,73 +198,73 @@ Warning: oci_execute(): ORA-12899: %s "%s"."BIND_SQLTNUM_TAB"."VARCHAR2_T10" (%s
TEST42 insert numbers SQLT_NUM
array(1) {
- ["NUMBER_T"]=>
+ ["DUMP(NUMBER_T)"]=>
array(1) {
[0]=>
- NULL
+ string(29) "Typ=2 Len=8: 42,0,0,0,0,0,0,0"
}
}
TEST43 insert numbers SQLT_NUM
array(1) {
- ["NUMBER_T"]=>
+ ["DUMP(NUMBER_T)"]=>
array(1) {
[0]=>
- NULL
+ string(29) "Typ=2 Len=8: 42,0,0,0,0,0,0,0"
}
}
TEST44
array(1) {
- ["NUMBER_T"]=>
+ ["DUMP(NUMBER_T)"]=>
array(1) {
[0]=>
- string(127) "-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ string(28) "Typ=2 Len=8: 0,0,0,0,0,0,0,0"
}
}
TEST45
array(1) {
- ["NUMBER_T"]=>
+ ["DUMP(NUMBER_T)"]=>
array(1) {
[0]=>
- NULL
+ string(44) "Typ=2 Len=8: 233,255,255,255,255,255,255,255"
}
}
TEST46 insert numbers
array(1) {
- ["NUMBER_T"]=>
+ ["DUMP(NUMBER_T)"]=>
array(1) {
[0]=>
- NULL
+ string(44) "Typ=2 Len=8: 233,255,255,255,255,255,255,255"
}
}
TEST47
array(1) {
- ["NUMBER_T"]=>
+ ["DUMP(NUMBER_T)"]=>
array(1) {
[0]=>
- NULL
+ string(29) "Typ=2 Len=8: 23,0,0,0,0,0,0,0"
}
}
TEST48
array(1) {
- ["NUMBER_T92"]=>
+ ["DUMP(NUMBER_T92)"]=>
array(1) {
[0]=>
- string(1) "0"
+ string(16) "Typ=2 Len=1: 128"
}
}
TEST49
array(1) {
- ["NUMBER_T92"]=>
+ ["DUMP(NUMBER_T92)"]=>
array(1) {
[0]=>
- string(1) "0"
+ string(16) "Typ=2 Len=1: 128"
}
}
@@ -268,7 +272,7 @@ TEST50
Warning: oci_execute(): ORA-01438: %s in %sbind_sqltnum.php on line %d
array(1) {
- ["NUMBER_T92"]=>
+ ["DUMP(NUMBER_T92)"]=>
array(0) {
}
}
diff --git a/ext/oci8/tests/bind_sqltnum_11g.phpt b/ext/oci8/tests/bind_sqltnum_11g.phpt
new file mode 100644
index 0000000000..1969893604
--- /dev/null
+++ b/ext/oci8/tests/bind_sqltnum_11g.phpt
@@ -0,0 +1,279 @@
+--TEST--
+Bind with SQLT_NUM
+--SKIPIF--
+<?php
+if (!extension_loaded('oci8')) die("skip no oci8 extension");
+preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+if (!(isset($matches[0]) && $matches[0] <= 11)) {
+ die("skip works only with Oracle 11 or earlier version of Oracle client libraries");
+}
+?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+// Initialization
+
+$stmtarray = array(
+ "drop table bind_sqltnum_tab",
+
+ "create table bind_sqltnum_tab (
+ id number,
+ varchar2_t10 varchar2(10),
+ number_t number,
+ number_t92 number(9,2))"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
+
+function check_col($c, $colname, $id)
+{
+ $s = oci_parse($c, "select $colname from bind_sqltnum_tab where id = :id");
+ oci_bind_by_name($s, ":id", $id);
+ oci_execute($s);
+ oci_fetch_all($s, $r);
+ var_dump($r);
+}
+
+
+// Run Test
+
+echo "Test 1 - baseline test\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, varchar2_t10) VALUES (100, :c2)");
+$c2 = "Hood";
+$r = oci_bind_by_name($s, ":c2", $c2, -1);
+if (!$r) {
+ $e = oci_error($s);
+ var_dump($e);
+}
+$r = oci_execute($s, OCI_DEFAULT);
+if (!$r) {
+ $e = oci_error($s);
+ var_dump($e);
+}
+
+$s = oci_parse($c, "select id, varchar2_t10 from bind_sqltnum_tab");
+oci_execute($s);
+oci_fetch_all($s, $data);
+var_dump($data);
+
+echo "Test 2 - SQLT_NUM to a VARCHAR2 column\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, varchar2_t10) VALUES (100, :c2)");
+$c2 = "Hood";
+$r = oci_bind_by_name($s, ":c2", $c2, -1, SQLT_NUM);
+if (!$r) {
+ $e = oci_error($s);
+ var_dump($e['message']);
+}
+$r = oci_execute($s, OCI_DEFAULT);
+if (!$r) {
+ $e = oci_error($s);
+ var_dump($e['message']);
+}
+
+echo "\nTEST41 wrong bind type SQLT_NUM\n";
+
+$c2 = "Hood41";
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, varchar2_t10) VALUES (41, :c2)");
+oci_bind_by_name($s, ":c2", $c2, -1, SQLT_NUM);
+oci_execute($s);
+
+echo "\nTEST42 insert numbers SQLT_NUM\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t) VALUES (42, :n1)");
+$n1 = 42;
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t', 42);
+
+echo "\nTEST43 insert numbers SQLT_NUM\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t) VALUES (43, :n1)");
+$n1 = 42.69;
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t', 43);
+
+echo "\nTEST44\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t) VALUES (44, :n1)");
+$n1 = 0;
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t', 44);
+
+echo "\nTEST45\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t) VALUES (45, :n1)");
+$n1 = -23;
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t', 45);
+
+echo "\nTEST46 insert numbers\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t) VALUES (46, :n1)");
+$n1 = "-23";
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t', 46);
+
+echo "\nTEST47\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t) VALUES (47, :n1)");
+$n1 = "23";
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t', 47);
+
+echo "\nTEST48\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t92) VALUES (48, :n1)");
+$n1 = 123.56;
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t92', 48);
+
+echo "\nTEST49\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t92) VALUES (49, :n1)");
+$n1 = "123.56";
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t92', 49);
+
+echo "\nTEST50\n";
+
+$s = oci_parse($c, "INSERT INTO bind_sqltnum_tab (id, number_t92) VALUES (50, :n1)");
+$n1 = "";
+oci_bind_by_name($s, ":n1", $n1, -1, SQLT_NUM);
+oci_execute($s);
+
+check_col($c, 'number_t92', 50);
+
+// Clean up
+
+$stmtarray = array(
+ "drop table bind_sqltnum_tab"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Test 1 - baseline test
+array(2) {
+ ["ID"]=>
+ array(1) {
+ [0]=>
+ string(3) "100"
+ }
+ ["VARCHAR2_T10"]=>
+ array(1) {
+ [0]=>
+ string(4) "Hood"
+ }
+}
+Test 2 - SQLT_NUM to a VARCHAR2 column
+
+Warning: oci_execute(): ORA-12899: %s (%s: 40, %s: 10) in %sbind_sqltnum_11g.php on line %d
+string(%d) "ORA-12899: %s"
+
+TEST41 wrong bind type SQLT_NUM
+
+Warning: oci_execute(): ORA-12899: %s "%s"."BIND_SQLTNUM_TAB"."VARCHAR2_T10" (%s: 40, %s: 10) in %sbind_sqltnum_11g.php on line %d
+
+TEST42 insert numbers SQLT_NUM
+array(1) {
+ ["NUMBER_T"]=>
+ array(1) {
+ [0]=>
+ NULL
+ }
+}
+
+TEST43 insert numbers SQLT_NUM
+array(1) {
+ ["NUMBER_T"]=>
+ array(1) {
+ [0]=>
+ NULL
+ }
+}
+
+TEST44
+array(1) {
+ ["NUMBER_T"]=>
+ array(1) {
+ [0]=>
+ string(127) "-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ }
+}
+
+TEST45
+array(1) {
+ ["NUMBER_T"]=>
+ array(1) {
+ [0]=>
+ NULL
+ }
+}
+
+TEST46 insert numbers
+array(1) {
+ ["NUMBER_T"]=>
+ array(1) {
+ [0]=>
+ NULL
+ }
+}
+
+TEST47
+array(1) {
+ ["NUMBER_T"]=>
+ array(1) {
+ [0]=>
+ NULL
+ }
+}
+
+TEST48
+array(1) {
+ ["NUMBER_T92"]=>
+ array(1) {
+ [0]=>
+ string(1) "0"
+ }
+}
+
+TEST49
+array(1) {
+ ["NUMBER_T92"]=>
+ array(1) {
+ [0]=>
+ string(1) "0"
+ }
+}
+
+TEST50
+
+Warning: oci_execute(): ORA-01438: %s in %sbind_sqltnum_11g.php on line %d
+array(1) {
+ ["NUMBER_T92"]=>
+ array(0) {
+ }
+}
+===DONE===
diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt
index d2018783bc..44fcc588e8 100644
--- a/ext/oci8/tests/bug27303_1_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_1_11gR1.phpt
@@ -61,194 +61,194 @@ string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
+string(2) "10"
+string(2) "11"
+string(2) "12"
+string(2) "13"
+string(2) "14"
+string(2) "15"
+string(2) "16"
+string(2) "17"
+string(2) "18"
+string(2) "19"
+string(2) "20"
+string(2) "21"
+string(2) "22"
+string(2) "23"
+string(2) "24"
+string(2) "25"
+string(2) "26"
+string(2) "27"
+string(2) "28"
+string(2) "29"
+string(2) "30"
+string(2) "31"
+string(2) "32"
+string(2) "33"
+string(2) "34"
+string(2) "35"
+string(2) "36"
+string(2) "37"
+string(2) "38"
+string(2) "39"
+string(2) "40"
+string(2) "41"
+string(2) "42"
+string(2) "43"
+string(2) "44"
+string(2) "45"
+string(2) "46"
+string(2) "47"
+string(2) "48"
+string(2) "49"
+string(2) "50"
+string(2) "51"
+string(2) "52"
+string(2) "53"
+string(2) "54"
+string(2) "55"
+string(2) "56"
+string(2) "57"
+string(2) "58"
+string(2) "59"
+string(2) "60"
+string(2) "61"
+string(2) "62"
+string(2) "63"
+string(2) "64"
+string(2) "65"
+string(2) "66"
+string(2) "67"
+string(2) "68"
+string(2) "69"
+string(2) "70"
+string(2) "71"
+string(2) "72"
+string(2) "73"
+string(2) "74"
+string(2) "75"
+string(2) "76"
+string(2) "77"
+string(2) "78"
+string(2) "79"
+string(2) "80"
+string(2) "81"
+string(2) "82"
+string(2) "83"
+string(2) "84"
+string(2) "85"
+string(2) "86"
+string(2) "87"
+string(2) "88"
+string(2) "89"
+string(2) "90"
+string(2) "91"
+string(2) "92"
+string(2) "93"
+string(2) "94"
+string(2) "95"
+string(2) "96"
+string(2) "97"
+string(2) "98"
+string(2) "99"
+string(3) "100"
+string(3) "101"
+string(3) "102"
+string(3) "103"
+string(3) "104"
+string(3) "105"
+string(3) "106"
+string(3) "107"
+string(3) "108"
+string(3) "109"
+string(3) "110"
+string(3) "111"
+string(3) "112"
+string(3) "113"
+string(3) "114"
+string(3) "115"
+string(3) "116"
+string(3) "117"
+string(3) "118"
+string(3) "119"
+string(3) "120"
+string(3) "121"
+string(3) "122"
+string(3) "123"
+string(3) "124"
+string(3) "125"
+string(3) "126"
+string(3) "127"
+string(3) "128"
+string(3) "129"
+string(3) "130"
+string(3) "131"
+string(3) "132"
+string(3) "133"
+string(3) "134"
+string(3) "135"
+string(3) "136"
+string(3) "137"
+string(3) "138"
+string(3) "139"
+string(3) "140"
+string(3) "141"
+string(3) "142"
+string(3) "143"
+string(3) "144"
+string(3) "145"
+string(3) "146"
+string(3) "147"
+string(3) "148"
+string(3) "149"
+string(3) "150"
+string(3) "151"
+string(3) "152"
+string(3) "153"
+string(3) "154"
+string(3) "155"
+string(3) "156"
+string(3) "157"
+string(3) "158"
+string(3) "159"
+string(3) "160"
+string(3) "161"
+string(3) "162"
+string(3) "163"
+string(3) "164"
+string(3) "165"
+string(3) "166"
+string(3) "167"
+string(3) "168"
+string(3) "169"
+string(3) "170"
+string(3) "171"
+string(3) "172"
+string(3) "173"
+string(3) "174"
+string(3) "175"
+string(3) "176"
+string(3) "177"
+string(3) "178"
+string(3) "179"
+string(3) "180"
+string(3) "181"
+string(3) "182"
+string(3) "183"
+string(3) "184"
+string(3) "185"
+string(3) "186"
+string(3) "187"
+string(3) "188"
+string(3) "189"
+string(3) "190"
+string(3) "191"
+string(3) "192"
+string(3) "193"
+string(3) "194"
+string(3) "195"
+string(3) "196"
+string(3) "197"
+string(3) "198"
+string(3) "199"
Done
diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt
index 06133e0115..d9a68b8cc7 100644
--- a/ext/oci8/tests/bug27303_2_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_2_11gR1.phpt
@@ -10,6 +10,8 @@ if (!(isset($matches[0]) && $matches[1] < 12)) {
die("skip expected output only valid when using pre-Oracle 12c database");
}
?>
+--ENV--
+NLS_LANG=
--FILE--
<?php
@@ -153,104 +155,104 @@ string(2) "96"
string(2) "97"
string(2) "98"
string(2) "99"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "10"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "11"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "12"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "13"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "14"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "15"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "16"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "17"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "18"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
-string(2) "19"
+string(3) "100"
+string(3) "101"
+string(3) "102"
+string(3) "103"
+string(3) "104"
+string(3) "105"
+string(3) "106"
+string(3) "107"
+string(3) "108"
+string(3) "109"
+string(3) "110"
+string(3) "111"
+string(3) "112"
+string(3) "113"
+string(3) "114"
+string(3) "115"
+string(3) "116"
+string(3) "117"
+string(3) "118"
+string(3) "119"
+string(3) "120"
+string(3) "121"
+string(3) "122"
+string(3) "123"
+string(3) "124"
+string(3) "125"
+string(3) "126"
+string(3) "127"
+string(3) "128"
+string(3) "129"
+string(3) "130"
+string(3) "131"
+string(3) "132"
+string(3) "133"
+string(3) "134"
+string(3) "135"
+string(3) "136"
+string(3) "137"
+string(3) "138"
+string(3) "139"
+string(3) "140"
+string(3) "141"
+string(3) "142"
+string(3) "143"
+string(3) "144"
+string(3) "145"
+string(3) "146"
+string(3) "147"
+string(3) "148"
+string(3) "149"
+string(3) "150"
+string(3) "151"
+string(3) "152"
+string(3) "153"
+string(3) "154"
+string(3) "155"
+string(3) "156"
+string(3) "157"
+string(3) "158"
+string(3) "159"
+string(3) "160"
+string(3) "161"
+string(3) "162"
+string(3) "163"
+string(3) "164"
+string(3) "165"
+string(3) "166"
+string(3) "167"
+string(3) "168"
+string(3) "169"
+string(3) "170"
+string(3) "171"
+string(3) "172"
+string(3) "173"
+string(3) "174"
+string(3) "175"
+string(3) "176"
+string(3) "177"
+string(3) "178"
+string(3) "179"
+string(3) "180"
+string(3) "181"
+string(3) "182"
+string(3) "183"
+string(3) "184"
+string(3) "185"
+string(3) "186"
+string(3) "187"
+string(3) "188"
+string(3) "189"
+string(3) "190"
+string(3) "191"
+string(3) "192"
+string(3) "193"
+string(3) "194"
+string(3) "195"
+string(3) "196"
+string(3) "197"
+string(3) "198"
+string(3) "199"
Done
diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt
index 550d89fdcc..d65fbc5f88 100644
--- a/ext/oci8/tests/bug27303_4_11gR1.phpt
+++ b/ext/oci8/tests/bug27303_4_11gR1.phpt
@@ -59,194 +59,194 @@ string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "2"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "3"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "4"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "5"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "6"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "7"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "8"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "9"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
-string(1) "1"
+string(2) "10"
+string(2) "11"
+string(2) "12"
+string(2) "13"
+string(2) "14"
+string(2) "15"
+string(2) "16"
+string(2) "17"
+string(2) "18"
+string(2) "19"
+string(2) "20"
+string(2) "21"
+string(2) "22"
+string(2) "23"
+string(2) "24"
+string(2) "25"
+string(2) "26"
+string(2) "27"
+string(2) "28"
+string(2) "29"
+string(2) "30"
+string(2) "31"
+string(2) "32"
+string(2) "33"
+string(2) "34"
+string(2) "35"
+string(2) "36"
+string(2) "37"
+string(2) "38"
+string(2) "39"
+string(2) "40"
+string(2) "41"
+string(2) "42"
+string(2) "43"
+string(2) "44"
+string(2) "45"
+string(2) "46"
+string(2) "47"
+string(2) "48"
+string(2) "49"
+string(2) "50"
+string(2) "51"
+string(2) "52"
+string(2) "53"
+string(2) "54"
+string(2) "55"
+string(2) "56"
+string(2) "57"
+string(2) "58"
+string(2) "59"
+string(2) "60"
+string(2) "61"
+string(2) "62"
+string(2) "63"
+string(2) "64"
+string(2) "65"
+string(2) "66"
+string(2) "67"
+string(2) "68"
+string(2) "69"
+string(2) "70"
+string(2) "71"
+string(2) "72"
+string(2) "73"
+string(2) "74"
+string(2) "75"
+string(2) "76"
+string(2) "77"
+string(2) "78"
+string(2) "79"
+string(2) "80"
+string(2) "81"
+string(2) "82"
+string(2) "83"
+string(2) "84"
+string(2) "85"
+string(2) "86"
+string(2) "87"
+string(2) "88"
+string(2) "89"
+string(2) "90"
+string(2) "91"
+string(2) "92"
+string(2) "93"
+string(2) "94"
+string(2) "95"
+string(2) "96"
+string(2) "97"
+string(2) "98"
+string(2) "99"
+string(3) "100"
+string(3) "101"
+string(3) "102"
+string(3) "103"
+string(3) "104"
+string(3) "105"
+string(3) "106"
+string(3) "107"
+string(3) "108"
+string(3) "109"
+string(3) "110"
+string(3) "111"
+string(3) "112"
+string(3) "113"
+string(3) "114"
+string(3) "115"
+string(3) "116"
+string(3) "117"
+string(3) "118"
+string(3) "119"
+string(3) "120"
+string(3) "121"
+string(3) "122"
+string(3) "123"
+string(3) "124"
+string(3) "125"
+string(3) "126"
+string(3) "127"
+string(3) "128"
+string(3) "129"
+string(3) "130"
+string(3) "131"
+string(3) "132"
+string(3) "133"
+string(3) "134"
+string(3) "135"
+string(3) "136"
+string(3) "137"
+string(3) "138"
+string(3) "139"
+string(3) "140"
+string(3) "141"
+string(3) "142"
+string(3) "143"
+string(3) "144"
+string(3) "145"
+string(3) "146"
+string(3) "147"
+string(3) "148"
+string(3) "149"
+string(3) "150"
+string(3) "151"
+string(3) "152"
+string(3) "153"
+string(3) "154"
+string(3) "155"
+string(3) "156"
+string(3) "157"
+string(3) "158"
+string(3) "159"
+string(3) "160"
+string(3) "161"
+string(3) "162"
+string(3) "163"
+string(3) "164"
+string(3) "165"
+string(3) "166"
+string(3) "167"
+string(3) "168"
+string(3) "169"
+string(3) "170"
+string(3) "171"
+string(3) "172"
+string(3) "173"
+string(3) "174"
+string(3) "175"
+string(3) "176"
+string(3) "177"
+string(3) "178"
+string(3) "179"
+string(3) "180"
+string(3) "181"
+string(3) "182"
+string(3) "183"
+string(3) "184"
+string(3) "185"
+string(3) "186"
+string(3) "187"
+string(3) "188"
+string(3) "189"
+string(3) "190"
+string(3) "191"
+string(3) "192"
+string(3) "193"
+string(3) "194"
+string(3) "195"
+string(3) "196"
+string(3) "197"
+string(3) "198"
+string(3) "199"
Done
diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt
index 00c43c22da..0990a95f3b 100644
--- a/ext/oci8/tests/bug47281.phpt
+++ b/ext/oci8/tests/bug47281.phpt
@@ -63,5 +63,5 @@ oci8_test_sql_execute($c, $stmtarray);
Test 1
ORA-20000: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccDeeeeeeeeeeee
Test 2
-oci_execute(): ORA-20000: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+oci_execute(): ORA-20000: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccDeeeeeeeeeeee
===DONE===
diff --git a/ext/oci8/tests/bug51253.phpt b/ext/oci8/tests/bug51253.phpt
index 111da929bb..b38bc7606b 100644
--- a/ext/oci8/tests/bug51253.phpt
+++ b/ext/oci8/tests/bug51253.phpt
@@ -93,15 +93,15 @@ echo "Done\n";
Test 1
array(5) {
[0]=>
- string(4) "five"
+ string(3) "one"
[1]=>
- string(4) "four"
+ string(3) "two"
[2]=>
string(5) "three"
[3]=>
- string(3) "two"
+ string(4) "four"
[4]=>
- string(3) "one"
+ string(4) "five"
}
array(5) {
[0]=>
diff --git a/ext/oci8/tests/bug68298.phpt b/ext/oci8/tests/bug68298.phpt
new file mode 100644
index 0000000000..223faa5cad
--- /dev/null
+++ b/ext/oci8/tests/bug68298.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Bug #68298 (OCI int overflow)
+--SKIPIF--
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
+?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+$stmtarray = array(
+ "DROP TABLE BUG68298",
+ "CREATE TABLE BUG68298 (COL1 NUMBER(20))"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
+
+$s = oci_parse($c, "INSERT INTO BUG68298 VALUES (:INTVALUE)");
+$intvalue = 1152921504606846975;
+oci_bind_by_name($s, ":INTVALUE", $intvalue, -1, SQLT_INT);
+oci_execute($s);
+
+$s = oci_parse($c, "INSERT INTO BUG68298 VALUES (:INTVALUE)");
+$intvalue = -1152921504606846975;
+oci_bind_by_name($s, ":INTVALUE", $intvalue, -1, SQLT_INT);
+oci_execute($s);
+
+
+$s = oci_parse($c, "SELECT COL1 FROM BUG68298");
+oci_execute($s);
+oci_fetch_all($s, $r);
+var_dump($r);
+
+$stmtarray = array("DROP TABLE BUG68298");
+oci8_test_sql_execute($c, $stmtarray);
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+array(1) {
+ ["COL1"]=>
+ array(2) {
+ [0]=>
+ string(19) "1152921504606846975"
+ [1]=>
+ string(20) "-1152921504606846975"
+ }
+}
+===DONE===
diff --git a/ext/oci8/tests/bug71422.phpt b/ext/oci8/tests/bug71422.phpt
new file mode 100644
index 0000000000..5978e04ece
--- /dev/null
+++ b/ext/oci8/tests/bug71422.phpt
@@ -0,0 +1,65 @@
+--TEST--
+Bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column)
+--SKIPIF--
+<?php
+if (!extension_loaded('oci8')) die ("skip no oci8 extension");
+?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+$stmtarray = array(
+ "DROP TABLE BUG71422_TEST",
+ "CREATE TABLE BUG71422_TEST (TEST_ID NUMBER(*,0) NOT NULL, LABEL VARCHAR2(50 CHAR), CONSTRAINT BUG71422_TEST_PK PRIMARY KEY (TEST_ID))",
+ "INSERT INTO BUG71422_TEST (TEST_ID, LABEL) VALUES (1, 'Foo')"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
+
+$stmt = oci_parse($c, 'SELECT LABEL AS RAW_QUERY FROM BUG71422_TEST WHERE TEST_ID=1');
+oci_execute($stmt);
+while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
+ var_dump($row);
+}
+
+$stmt = oci_parse($c, 'SELECT LABEL AS NUMERIC_BIND_PARAMETER FROM BUG71422_TEST WHERE TEST_ID=:test_id');
+$value = 1;
+oci_bind_by_name($stmt, ':test_id', $value, -1, SQLT_INT);
+oci_execute($stmt);
+while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
+ var_dump($row);
+}
+
+$stmt = oci_parse($c, 'SELECT LABEL AS STRING_BIND_PARAMETER FROM BUG71422_TEST WHERE TEST_ID=:test_id');
+$value = 1;
+oci_bind_by_name($stmt, ':test_id', $value, -1, SQLT_CHR);
+oci_execute($stmt);
+while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
+ var_dump($row);
+}
+
+// Cleanup
+
+$stmtarray = array(
+ "DROP TABLE BUG71422_TEST"
+);
+oci8_test_sql_execute($c, $stmtarray);
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+array(1) {
+ ["RAW_QUERY"]=>
+ string(3) "Foo"
+}
+array(1) {
+ ["NUMERIC_BIND_PARAMETER"]=>
+ string(3) "Foo"
+}
+array(1) {
+ ["STRING_BIND_PARAMETER"]=>
+ string(3) "Foo"
+}
+===DONE===
diff --git a/ext/oci8/tests/bug71600.phpt b/ext/oci8/tests/bug71600.phpt
new file mode 100644
index 0000000000..102c59f81a
--- /dev/null
+++ b/ext/oci8/tests/bug71600.phpt
@@ -0,0 +1,96 @@
+--TEST--
+Bug #71600 (oci_fetch_all result in segfault when select more than 8 columns)
+--SKIPIF--
+<?php
+$target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs
+require(dirname(__FILE__).'/skipif.inc');
+?>
+--FILE--
+<?php
+
+require(dirname(__FILE__).'/connect.inc');
+
+// Initialize
+
+$stmtarray = array(
+ "create table bug71600_tab (col1 number, col2 number, col3 number,
+ col4 number, col5 number, col6 number,
+ col7 number, col8 number, col9 number)",
+ "insert into bug71600_tab values(1, 2, 3, 4, 5, 6, 7, 8, 9)",
+ "insert into bug71600_tab values(11, 12, 13, 14, 15, 16, 17, 18, 19)"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
+
+// Run test
+
+$sql = "select col1,col2,col3,col4,col5,col6,col7,col8,col9 from bug71600_tab";
+
+echo "Test 1\n";
+$stmt = oci_parse($c, $sql);
+
+echo "Executing SELECT statament...\n";
+oci_execute($stmt,OCI_DEFAULT);
+
+echo "Fetching data by columns...\n";
+oci_fetch_all($stmt, $result);
+oci_free_statement($stmt);
+
+$rsRows=(count($result,1)/($rows = count($result,0)))-1;
+echo "$rsRows Records Found\n";
+$rsCount=0;
+while($rsCount < $rsRows)
+{
+ $col1 =$result['COL1'][$rsCount];
+ $col9 =$result['COL9'][$rsCount];
+ echo "$rsCount|$col1|$col9\n";
+ $rsCount++;
+}
+
+echo "Test 2\n";
+$stmt = oci_parse($c, $sql);
+
+echo "Re-executing SELECT statament...\n";
+oci_execute($stmt,OCI_DEFAULT);
+
+echo "Fetching data by rows...\n";
+oci_fetch_all($stmt, $result, 0, -1, OCI_FETCHSTATEMENT_BY_ROW);
+oci_free_statement($stmt);
+
+$rsRows=count($result,0);
+echo "$rsRows Records Found\n";
+$rsCount=0;
+while($rsCount < $rsRows)
+{
+ $col1 = $result[$rsCount]['COL1'];
+ $col9 = $result[$rsCount]['COL9'];
+ echo "$rsCount|$col1|$col9\n";
+ $rsCount++;
+}
+
+
+// Cleanup
+
+$stmtarray = array(
+ "drop table bug71600_tab"
+);
+
+oci8_test_sql_execute($c, $stmtarray);
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECT--
+Test 1
+Executing SELECT statament...
+Fetching data by columns...
+2 Records Found
+0|1|9
+1|11|19
+Test 2
+Re-executing SELECT statament...
+Fetching data by rows...
+2 Records Found
+0|1|9
+1|11|19
+===DONE===
diff --git a/ext/oci8/tests/coll_002.phpt b/ext/oci8/tests/coll_002.phpt
index cd068ff0b2..6633380c27 100644
--- a/ext/oci8/tests/coll_002.phpt
+++ b/ext/oci8/tests/coll_002.phpt
@@ -28,6 +28,6 @@ object(OCI-Collection)#%d (1) {
}
bool(true)
-Warning: OCI-Collection::size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
diff --git a/ext/oci8/tests/coll_002_func.phpt b/ext/oci8/tests/coll_002_func.phpt
index 9d8e4cf976..d309de249c 100644
--- a/ext/oci8/tests/coll_002_func.phpt
+++ b/ext/oci8/tests/coll_002_func.phpt
@@ -28,6 +28,6 @@ object(OCI-Collection)#%d (1) {
}
bool(true)
-Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: oci_collection_size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
diff --git a/ext/oci8/tests/coll_006.phpt b/ext/oci8/tests/coll_006.phpt
index 4799eb6b79..f9e06d4fab 100644
--- a/ext/oci8/tests/coll_006.phpt
+++ b/ext/oci8/tests/coll_006.phpt
@@ -28,6 +28,6 @@ object(OCI-Collection)#%d (1) {
}
bool(true)
-Warning: OCI-Collection::size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
diff --git a/ext/oci8/tests/coll_006_func.phpt b/ext/oci8/tests/coll_006_func.phpt
index 3d65606148..87cbd7498c 100644
--- a/ext/oci8/tests/coll_006_func.phpt
+++ b/ext/oci8/tests/coll_006_func.phpt
@@ -28,6 +28,6 @@ object(OCI-Collection)#%d (1) {
}
bool(true)
-Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: oci_collection_size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
diff --git a/ext/oci8/tests/conn_attr_2.phpt b/ext/oci8/tests/conn_attr_2.phpt
index ad83f70c20..000b2cec74 100644
--- a/ext/oci8/tests/conn_attr_2.phpt
+++ b/ext/oci8/tests/conn_attr_2.phpt
@@ -71,7 +71,7 @@ if (!$sys_c1) {
} else {
set_attr($sys_c1,'ACTION',10);
get_sys_attr($sys_c1,'ACTION');
- get_attr($pc2,'ACTION');
+ get_attr($sys_c1,'ACTION');
oci_close($sys_c1);
}
diff --git a/ext/oci8/tests/define4.phpt b/ext/oci8/tests/define4.phpt
index 3114a73937..6aae1d99b2 100644
--- a/ext/oci8/tests/define4.phpt
+++ b/ext/oci8/tests/define4.phpt
@@ -68,7 +68,7 @@ Test 3
bool(true)
string(4) "some"
-Warning: oci_result(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_result(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)
Done
diff --git a/ext/oci8/tests/drcp_cclass1.phpt b/ext/oci8/tests/drcp_cclass1.phpt
index 5c78a2943e..0a929317bb 100644
--- a/ext/oci8/tests/drcp_cclass1.phpt
+++ b/ext/oci8/tests/drcp_cclass1.phpt
@@ -5,6 +5,9 @@ DRCP: Test setting connection class inline
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__).'/connect.inc');
if (!$test_drcp) die("skip testing DRCP connection class only works in DRCP mode");
+// Looked for :pooled in EZ connect string
+if (strpos($dbase, "/") !== false && stripos($dbase, ":pooled") === false)
+ die('skip DRCP test requires a DRCP pooled server connection');
if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches_sv);
diff --git a/ext/oci8/tests/drcp_privileged.phpt b/ext/oci8/tests/drcp_privileged.phpt
index 3871341bc5..c57216672f 100644
--- a/ext/oci8/tests/drcp_privileged.phpt
+++ b/ext/oci8/tests/drcp_privileged.phpt
@@ -5,6 +5,9 @@ DRCP: privileged connect
if (!extension_loaded('oci8')) die("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
if (!$test_drcp) die("skip requires DRCP connection");
+// Looked for :pooled in EZ connect string
+if (strpos($dbase, "/") !== false && stripos($dbase, ":pooled") === false)
+ die('skip DRCP test requires a DRCP pooled server connection');
if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
ob_start();
phpinfo(INFO_MODULES);
diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt
index f63979d6b5..0ff9bc485f 100644
--- a/ext/oci8/tests/driver_name.phpt
+++ b/ext/oci8/tests/driver_name.phpt
@@ -8,18 +8,15 @@ if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to
if ($test_drcp) die("skip as Output might vary with DRCP");
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] >= 2) ||
- ($matches[1] >= 12)
- ))) {
- die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+if (!(isset($matches[0]) &&
+ ($matches[1] == 12 && $matches[2] == 1 && $matches[3] >= 0
+ && $matches[4] >= 2) || ($matches[1] == 12 && $matches[2] > 1))) {
+ die("skip test expected to work only with Oracle 12.1.0.2 database or its later patchsets");
}
+
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
-if (!(isset($matches[0]) &&
- (($matches[1] == 11 && $matches[2] >= 2) ||
- ($matches[1] >= 12)
- ))) {
- die("skip test expected to work only with Oracle 11gR2 or greater version of client");
+if (!(isset($matches[0]) && ($matches[1] == 11 && $matches[2] >= 2) || ($matches[1] > 11))) {
+ die("skip test expected to work only with Oracle 11.2 or greater version of client");
}
?>
@@ -54,17 +51,17 @@ function get_attr($conn)
$s2 = oci_parse($conn,$sel_stmt);
oci_execute($s2,OCI_DEFAULT);
oci_fetch($s2);
- echo "The value of DRIVER_NAME is ".oci_result($s2,1)."\n";
+ echo "The value of DRIVER_NAME is ".trim(oci_result($s2,1))."\n";
}
?>
--EXPECT--
**Test 1.1 - Default values for the attribute **************
-The value of DRIVER_NAME is PHP OCI8
+The value of DRIVER_NAME is PHP OCI8 : 2.1.1
***Test 1.2 - Get the values from different connections **************
Testing with oci_pconnect()
-The value of DRIVER_NAME is PHP OCI8
+The value of DRIVER_NAME is PHP OCI8 : 2.1.1
Testing with oci_new_connect()
-The value of DRIVER_NAME is PHP OCI8
+The value of DRIVER_NAME is PHP OCI8 : 2.1.1
Done
diff --git a/ext/oci8/tests/driver_name_11gR2.phpt b/ext/oci8/tests/driver_name_11gR2.phpt
new file mode 100644
index 0000000000..3c21d57b93
--- /dev/null
+++ b/ext/oci8/tests/driver_name_11gR2.phpt
@@ -0,0 +1,64 @@
+--TEST--
+Verify that the Driver Name attribute is set
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension");
+
+require(dirname(__FILE__)."/connect.inc");
+if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
+if ($test_drcp) die("skip as Output might vary with DRCP");
+
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) && ($matches[1] == 11 && $matches[2] >= 2))) {
+ die("skip expected output only valid when using Oracle 11.2 database or its later patchsets");
+}
+preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
+if (!(isset($matches[0]) && ($matches[1] == 11 && $matches[2] >= 2) || ($matches[1] > 11))) {
+ die("skip test expected to work only with Oracle 11.2 or greater version of client");
+}
+
+?>
+--FILE--
+<?php
+require(dirname(__FILE__)."/connect.inc");
+
+echo"**Test 1.1 - Default values for the attribute **************\n";
+get_attr($c);
+oci_close($c);
+
+echo"\n***Test 1.2 - Get the values from different connections **************\n";
+// with oci_pconnect()
+echo "Testing with oci_pconnect()\n";
+$pc1=oci_pconnect($user,$password,$dbase);
+get_attr($pc1);
+oci_close($pc1);
+
+echo "Testing with oci_new_connect()\n";
+$nc1=oci_new_connect($user,$password,$dbase);
+get_attr($nc1);
+oci_close($nc1);
+echo "Done\n";
+
+function get_attr($conn)
+{
+ $sel_stmt = "select client_driver
+ from v\$session_connect_info sci, v\$session s
+ where sci.client_driver is not null
+ and sci.sid = s.sid
+ and s.audsid = userenv('SESSIONID')";
+ $s2 = oci_parse($conn,$sel_stmt);
+ oci_execute($s2,OCI_DEFAULT);
+ oci_fetch($s2);
+ echo "The value of DRIVER_NAME is ".trim(oci_result($s2,1))."\n";
+}
+
+?>
+--EXPECT--
+**Test 1.1 - Default values for the attribute **************
+The value of DRIVER_NAME is PHP OCI8
+
+***Test 1.2 - Get the values from different connections **************
+Testing with oci_pconnect()
+The value of DRIVER_NAME is PHP OCI8
+Testing with oci_new_connect()
+The value of DRIVER_NAME is PHP OCI8
+Done
diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt
index 1194ae180d..7099b40945 100644
--- a/ext/oci8/tests/extauth_01.phpt
+++ b/ext/oci8/tests/extauth_01.phpt
@@ -88,7 +88,7 @@ var_dump($c);
echo "Test 9\n";
-$c = oci_connect('/', '', 'c', null, OCI_SYSDBA+OCI_CRED_EXT);
+$c = oci_connect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT);
if (!$c) {
$m = oci_error();
var_dump($m);
@@ -97,7 +97,7 @@ var_dump($c);
echo "Test 10\n";
-$c = oci_connect('/', '', 'c', null, OCI_SYSOPER+OCI_CRED_EXT);
+$c = oci_connect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT);
if (!$c) {
$m = oci_error();
var_dump($m);
diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt
index 0a3227019c..ea665eb918 100644
--- a/ext/oci8/tests/extauth_02.phpt
+++ b/ext/oci8/tests/extauth_02.phpt
@@ -87,7 +87,7 @@ var_dump($c);
echo "Test 9\n";
-$c = oci_new_connect('/', '', 'c', null, OCI_SYSDBA+OCI_CRED_EXT);
+$c = oci_new_connect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT);
if (!$c) {
$m = oci_error();
var_dump($m);
@@ -96,7 +96,7 @@ var_dump($c);
echo "Test 10\n";
-$c = oci_new_connect('/', '', 'c', null, OCI_SYSOPER+OCI_CRED_EXT);
+$c = oci_new_connect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT);
if (!$c) {
$m = oci_error();
var_dump($m);
diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt
index d7884ce6b4..3ced42fc23 100644
--- a/ext/oci8/tests/extauth_03.phpt
+++ b/ext/oci8/tests/extauth_03.phpt
@@ -87,7 +87,7 @@ var_dump($c);
echo "Test 9\n";
-$c = oci_pconnect('/', '', 'c', null, OCI_SYSDBA+OCI_CRED_EXT);
+$c = oci_pconnect('/', '', 'd', null, OCI_SYSDBA+OCI_CRED_EXT);
if (!$c) {
$m = oci_error();
var_dump($m);
@@ -96,7 +96,7 @@ var_dump($c);
echo "Test 10\n";
-$c = oci_pconnect('/', '', 'c', null, OCI_SYSOPER+OCI_CRED_EXT);
+$c = oci_pconnect('/', '', 'd', null, OCI_SYSOPER+OCI_CRED_EXT);
if (!$c) {
$m = oci_error();
var_dump($m);
diff --git a/ext/oci8/tests/extauth_04.phpt b/ext/oci8/tests/extauth_04.phpt
index e502435bb0..1597c2a942 100644
--- a/ext/oci8/tests/extauth_04.phpt
+++ b/ext/oci8/tests/extauth_04.phpt
@@ -42,14 +42,17 @@ var_dump($c);
<?php exit(0); ?>
--EXPECTF--
Test 1
+
Warning: oci_connect(): External Authentication is not supported on Windows in %s on line %d
bool(false)
bool(false)
Test 2
+
Warning: oci_new_connect(): External Authentication is not supported on Windows in %s on line %d
bool(false)
bool(false)
Test 3
+
Warning: oci_pconnect(): External Authentication is not supported on Windows in %s on line %d
bool(false)
bool(false)
diff --git a/ext/oci8/tests/imp_res_close.phpt b/ext/oci8/tests/imp_res_close.phpt
index 01ac2c75e0..f01205dc48 100644
--- a/ext/oci8/tests/imp_res_close.phpt
+++ b/ext/oci8/tests/imp_res_close.phpt
@@ -63,7 +63,6 @@ oci8_test_sql_execute($c, $stmtarray);
--EXPECTF--
Test 1
1
- 2
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %simp_res_close.php on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %simp_res_close.php on line %d
===DONE===
diff --git a/ext/oci8/tests/imp_res_get_close_1.phpt b/ext/oci8/tests/imp_res_get_close_1.phpt
index 2edc8bf604..0e3b3b0c13 100644
--- a/ext/oci8/tests/imp_res_get_close_1.phpt
+++ b/ext/oci8/tests/imp_res_get_close_1.phpt
@@ -58,11 +58,11 @@ oci_free_statement($s);
Test 1
1
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d
3
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d
5
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d
===DONE===
diff --git a/ext/oci8/tests/imp_res_get_close_2.phpt b/ext/oci8/tests/imp_res_get_close_2.phpt
index b3153834ba..419a4f4f05 100644
--- a/ext/oci8/tests/imp_res_get_close_2.phpt
+++ b/ext/oci8/tests/imp_res_get_close_2.phpt
@@ -56,9 +56,8 @@ while (($s1 = oci_get_implicit_resultset($s))) {
--EXPECTF--
Test 1
1
- 2
Warning: oci_fetch_array(): OCI_INVALID_HANDLE in %s on line %d
-Warning: oci_get_implicit_resultset(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_get_implicit_resultset(): supplied resource is not a valid oci8 statement resource in %s on line %d
===DONE===
diff --git a/ext/oci8/tests/lob_009.phpt b/ext/oci8/tests/lob_009.phpt
index 4702e61aca..dc7c1b4628 100644
--- a/ext/oci8/tests/lob_009.phpt
+++ b/ext/oci8/tests/lob_009.phpt
@@ -35,7 +35,7 @@ oci_execute($s, OCI_DEFAULT);
var_dump($row = oci_fetch_array($s));
while (!$row[0]->eof()) {
- var_dump($row[0]->read(1024));
+ var_dump(str_replace("\r", "", $row[0]->read(1024)));
}
require dirname(__FILE__).'/drop_table.inc';
diff --git a/ext/oci8/tests/lob_014.phpt b/ext/oci8/tests/lob_014.phpt
index 2a1a6bed64..e319178683 100644
--- a/ext/oci8/tests/lob_014.phpt
+++ b/ext/oci8/tests/lob_014.phpt
@@ -50,7 +50,7 @@ bool(true)
int(4)
bool(true)
-Warning: OCI-Lob::write(): %d is not a valid oci8 descriptor resource in %slob_014.php on line %d
+Warning: OCI-Lob::write(): %s is not a valid oci8 descriptor resource in %slob_014.php on line %d
bool(false)
array(1) {
[0]=>
diff --git a/ext/oci8/tests/lob_021.phpt b/ext/oci8/tests/lob_021.phpt
index b7489271b9..16b389dd05 100644
--- a/ext/oci8/tests/lob_021.phpt
+++ b/ext/oci8/tests/lob_021.phpt
@@ -55,10 +55,10 @@ bool(true)
int(4)
bool(true)
-Warning: OCI-Lob::write(): %d is not a valid oci8 descriptor resource in %s on line %d
+Warning: OCI-Lob::write(): %s is not a valid oci8 descriptor resource in %s on line %d
bool(false)
-Warning: oci_free_descriptor(): %d is not a valid oci8 descriptor resource in %s on line %d
+Warning: oci_free_descriptor(): %s is not a valid oci8 descriptor resource in %s on line %d
bool(false)
Warning: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in %s on line %d
diff --git a/ext/oci8/tests/lob_023.phpt b/ext/oci8/tests/lob_023.phpt
index 6416fb45a6..1a1ee80ead 100644
--- a/ext/oci8/tests/lob_023.phpt
+++ b/ext/oci8/tests/lob_023.phpt
@@ -40,7 +40,7 @@ oci_execute($s, OCI_DEFAULT);
var_dump($row = oci_fetch_array($s));
while (!$row[0]->eof()) {
- var_dump($row[0]->read(1024));
+ var_dump(str_replace("\r", "", $row[0]->read(1024)));
}
require dirname(__FILE__).'/drop_table.inc';
diff --git a/ext/oci8/tests/lob_041.phpt b/ext/oci8/tests/lob_041.phpt
index aa1ea98a52..c5c0a209f3 100644
--- a/ext/oci8/tests/lob_041.phpt
+++ b/ext/oci8/tests/lob_041.phpt
@@ -72,7 +72,7 @@ Test 2 - implicit statement close
test data
object(OCI-Lob)#%d (1) {
["descriptor"]=>
- resource(%d) of type (oci8 descriptor)
+ resource(%d) of type (Unknown)
}
Test 3 - no preallocated descriptor
diff --git a/ext/oci8/tests/old_oci_close1.phpt b/ext/oci8/tests/old_oci_close1.phpt
index 9af2eeb398..02b68f45c7 100644
--- a/ext/oci8/tests/old_oci_close1.phpt
+++ b/ext/oci8/tests/old_oci_close1.phpt
@@ -20,6 +20,6 @@ echo "Done\n";
resource(%d) of type (oci8 connection)
bool(true)
-Warning: oci_parse() expects parameter 1 to be resource, null given in %s on line %d
-NULL
+Warning: oci_parse(): supplied resource is not a valid oci8 connection resource in %sold_oci_close1.php on line %d
+bool(false)
Done
diff --git a/ext/oci8/tests/xmltype_01.phpt b/ext/oci8/tests/xmltype_01.phpt
index ebbbb31fac..1855ed0887 100644
--- a/ext/oci8/tests/xmltype_01.phpt
+++ b/ext/oci8/tests/xmltype_01.phpt
@@ -34,7 +34,7 @@ $stmtarray = array(
</Xt>'))"
);
-oci8_test_sql_execute($c, $stmtarray);
+oci8_test_sql_execute($c, str_replace("\r", "", $stmtarray));
function do_query($c)
{
diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c
index a1c8ffa7f8..9ece945f4f 100644
--- a/ext/odbc/birdstep.c
+++ b/ext/odbc/birdstep.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -618,7 +618,7 @@ PHP_FUNCTION(birdstep_off_autocommit)
*/
PHP_FUNCTION(birdstep_commit)
{
-zend_long
+ zend_long id;
RETCODE stat;
VConn *conn;
diff --git a/ext/odbc/php_birdstep.h b/ext/odbc/php_birdstep.h
index 9a8502cbf2..da2722a468 100644
--- a/ext/odbc/php_birdstep.h
+++ b/ext/odbc/php_birdstep.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 11fecbd617..f432dcd551 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -387,7 +387,7 @@ const zend_function_entry odbc_functions[] = {
};
/* }}} */
-ZEND_DECLARE_MODULE_GLOBALS(odbc)
+PHP_ODBC_API ZEND_DECLARE_MODULE_GLOBALS(odbc)
static PHP_GINIT_FUNCTION(odbc);
/* {{{ odbc_module_entry
@@ -412,7 +412,7 @@ zend_module_entry odbc_module_entry = {
#ifdef COMPILE_DL_ODBC
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(odbc)
#endif
@@ -434,7 +434,8 @@ static void _free_odbc_result(zend_resource *rsrc)
efree(res->values);
res->values = NULL;
}
- if (res->stmt) {
+ /* If aborted via timer expiration, don't try to call any unixODBC function */
+ if (res->stmt && !(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
#if defined(HAVE_SOLID) || defined(HAVE_SOLID_30) || defined(HAVE_SOLID_35)
SQLTransact(res->conn_ptr->henv, res->conn_ptr->hdbc,
(SQLUSMALLINT) SQL_COMMIT);
@@ -445,6 +446,9 @@ static void _free_odbc_result(zend_resource *rsrc)
* zend_list_delete(res->conn_ptr->id);
*/
}
+ if (res->param_info) {
+ efree(res->param_info);
+ }
efree(res);
}
}
@@ -484,9 +488,12 @@ static void _close_odbc_conn(zend_resource *rsrc)
}
} ZEND_HASH_FOREACH_END();
- safe_odbc_disconnect(conn->hdbc);
- SQLFreeConnect(conn->hdbc);
- SQLFreeEnv(conn->henv);
+ /* If aborted via timer expiration, don't try to call any unixODBC function */
+ if (!(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
+ safe_odbc_disconnect(conn->hdbc);
+ SQLFreeConnect(conn->hdbc);
+ SQLFreeEnv(conn->henv);
+ }
efree(conn);
ODBCG(num_links)--;
}
@@ -509,9 +516,12 @@ static void _close_odbc_pconn(zend_resource *rsrc)
}
} ZEND_HASH_FOREACH_END();
- safe_odbc_disconnect(conn->hdbc);
- SQLFreeConnect(conn->hdbc);
- SQLFreeEnv(conn->henv);
+ /* If aborted via timer expiration, don't try to call any unixODBC function */
+ if (!(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
+ safe_odbc_disconnect(conn->hdbc);
+ SQLFreeConnect(conn->hdbc);
+ SQLFreeEnv(conn->henv);
+ }
free(conn);
ODBCG(num_links)--;
@@ -1184,6 +1194,7 @@ PHP_FUNCTION(odbc_prepare)
odbc_result *result = NULL;
odbc_connection *conn;
RETCODE rc;
+ int i;
#ifdef HAVE_SQL_EXTENDED_FETCH
SQLUINTEGER scrollopts;
#endif
@@ -1199,6 +1210,7 @@ PHP_FUNCTION(odbc_prepare)
result = (odbc_result *)ecalloc(1, sizeof(odbc_result));
result->numparams = 0;
+ result->param_info = NULL;
rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt));
if (rc == SQL_INVALID_HANDLE) {
@@ -1255,6 +1267,20 @@ PHP_FUNCTION(odbc_prepare)
Z_ADDREF_P(pv_conn);
result->conn_ptr = conn;
result->fetched = 0;
+
+ result->param_info = (odbc_param_info *) safe_emalloc(sizeof(odbc_param_info), result->numparams, 0);
+ for (i=0;i<result->numparams;i++) {
+ rc = SQLDescribeParam(result->stmt, (SQLUSMALLINT)(i+1), &result->param_info[i].sqltype, &result->param_info[i].precision,
+ &result->param_info[i].scale, &result->param_info[i].nullable);
+ if (rc == SQL_ERROR) {
+ odbc_sql_error(result->conn_ptr, result->stmt, "SQLDescribeParameter");
+ SQLFreeStmt(result->stmt, SQL_RESET_PARAMS);
+ efree(result->param_info);
+ efree(result);
+ RETURN_FALSE;
+ }
+ }
+
RETURN_RES(zend_register_resource(result, le_result));
}
/* }}} */
@@ -1275,9 +1301,7 @@ PHP_FUNCTION(odbc_execute)
params_t *params = NULL;
char *filename;
unsigned char otype;
- SQLSMALLINT sqltype, ctype, scale;
- SQLSMALLINT nullable;
- SQLULEN precision;
+ SQLSMALLINT ctype;
odbc_result *result;
int numArgs, i, ne;
RETCODE rc;
@@ -1337,22 +1361,10 @@ PHP_FUNCTION(odbc_execute)
RETURN_FALSE;
}
- rc = SQLDescribeParam(result->stmt, (SQLUSMALLINT)i, &sqltype, &precision, &scale, &nullable);
params[i-1].vallen = Z_STRLEN_P(tmp);
params[i-1].fp = -1;
- if (rc == SQL_ERROR) {
- odbc_sql_error(result->conn_ptr, result->stmt, "SQLDescribeParam");
- SQLFreeStmt(result->stmt, SQL_RESET_PARAMS);
- for (i = 0; i < result->numparams; i++) {
- if (params[i].fp != -1) {
- close(params[i].fp);
- }
- }
- efree(params);
- RETURN_FALSE;
- }
- if (IS_SQL_BINARY(sqltype)) {
+ if (IS_SQL_BINARY(result->param_info[i-1].sqltype)) {
ctype = SQL_C_BINARY;
} else {
ctype = SQL_C_CHAR;
@@ -1399,7 +1411,7 @@ PHP_FUNCTION(odbc_execute)
params[i-1].vallen = SQL_LEN_DATA_AT_EXEC(0);
rc = SQLBindParameter(result->stmt, (SQLUSMALLINT)i, SQL_PARAM_INPUT,
- ctype, sqltype, precision, scale,
+ ctype, result->param_info[i-1].sqltype, result->param_info[i-1].precision, result->param_info[i-1].scale,
(void *)(intptr_t)params[i-1].fp, 0,
&params[i-1].vallen);
} else {
@@ -1411,7 +1423,7 @@ PHP_FUNCTION(odbc_execute)
}
rc = SQLBindParameter(result->stmt, (SQLUSMALLINT)i, SQL_PARAM_INPUT,
- ctype, sqltype, precision, scale,
+ ctype, result->param_info[i-1].sqltype, result->param_info[i-1].precision, result->param_info[i-1].scale,
Z_STRVAL_P(tmp), 0,
&params[i-1].vallen);
}
@@ -1530,7 +1542,7 @@ PHP_FUNCTION(odbc_cursor)
result->stmt, state, &error, errormsg,
sizeof(errormsg)-1, &errormsgsize);
if (!strncmp(state,"S1015",5)) {
- snprintf(cursorname, max_len+1, "php_curs_%d", (int)result->stmt);
+ snprintf(cursorname, max_len+1, "php_curs_" ZEND_ULONG_FMT, (zend_ulong)result->stmt);
if (SQLSetCursorName(result->stmt,cursorname,SQL_NTS) != SQL_SUCCESS) {
odbc_sql_error(result->conn_ptr, result->stmt, "SQLSetCursorName");
RETVAL_FALSE;
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index 857397b467..ac63c0fab7 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -101,6 +101,14 @@ PHP_FUNCTION(odbc_primarykeys);
PHP_FUNCTION(odbc_specialcolumns);
PHP_FUNCTION(odbc_statistics);
+#ifdef PHP_WIN32
+# define PHP_ODBC_API __declspec(dllexport)
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define PHP_ODBC_API __attribute__ ((visibility("default")))
+#else
+# define PHP_ODBC_API
+#endif
+
#else
#define odbc_module_ptr NULL
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h
index 832c65da3e..93e2c96871 100644
--- a/ext/odbc/php_odbc_includes.h
+++ b/ext/odbc/php_odbc_includes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -233,6 +233,13 @@ typedef struct odbc_result_value {
SQLLEN coltype;
} odbc_result_value;
+typedef struct odbc_param_info {
+ SQLSMALLINT sqltype;
+ SQLSMALLINT scale;
+ SQLSMALLINT nullable;
+ SQLULEN precision;
+} odbc_param_info;
+
typedef struct odbc_result {
ODBC_SQL_STMT_T stmt;
odbc_result_value *values;
@@ -244,6 +251,7 @@ typedef struct odbc_result {
zend_long longreadlen;
int binmode;
int fetched;
+ odbc_param_info * param_info;
odbc_connection *conn_ptr;
} odbc_result;
@@ -296,14 +304,11 @@ void odbc_sql_error(ODBC_SQL_ERROR_PARAMS);
#endif
#define IS_SQL_BINARY(x) (x == SQL_BINARY || x == SQL_VARBINARY || x == SQL_LONGVARBINARY)
-#ifdef ZTS
-# define ODBCG(v) ZEND_TSRMG(odbc_globals_id, zend_odbc_globals *, v)
-# ifdef COMPILE_DL_ODBC
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define ODBCG(v) (odbc_globals.v)
-extern ZEND_API zend_odbc_globals odbc_globals;
+PHP_ODBC_API ZEND_EXTERN_MODULE_GLOBALS(odbc)
+#define ODBCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(odbc, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_ODBC)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif /* HAVE_UODBC */
diff --git a/ext/odbc/tests/bug47803.phpt b/ext/odbc/tests/bug47803.phpt
new file mode 100644
index 0000000000..9a2600dd18
--- /dev/null
+++ b/ext/odbc/tests/bug47803.phpt
@@ -0,0 +1,185 @@
+--TEST--
+Bug #47803 Executing prepared statements is succesfull only for the first two statements
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+
+include dirname(__FILE__) . "/config.inc";
+
+$create_table = "CREATE TABLE FOO(
+ [PAR_ID] [int] NOT NULL,
+ [PAR_INT] [int] NULL,
+ [PAR_CHR] [varchar](500) NULL
+)";
+
+$inserts = "INSERT INTO FOO
+ ([PAR_ID]
+ ,[PAR_INT]
+ ,[PAR_CHR])
+ VALUES
+ (1,14,''),
+ (2,30,''),
+ (3,7,''),
+ (4,7,''),
+ (5,0,''),
+ (6,0,''),
+ (7,20130901,''),
+ (8,20140201,''),
+ (9,20140201,''),
+ (10,20140620,''),
+ (11,221,'')";
+
+
+date_default_timezone_set('Europe/Warsaw');
+
+$link = odbc_connect($dsn, $user, $pass);
+
+odbc_exec($link, 'CREATE DATABASE odbcTEST');
+odbc_exec($link, $create_table);
+odbc_exec($link, $inserts);
+
+$upd_params = array(
+ array('id'=>1, 'name'=>'test 1'),
+ array('id'=>2, 'name'=>'test 2'),
+ array('id'=>3, 'name'=>'test 3'),
+ array('id'=>4, 'name'=>'test 4'),
+ array('id'=>5, 'name'=>'test 5'),
+ array('id'=>10, 'name'=>'test 10'),
+ array('id'=>9, 'name'=>'test 9'),
+ array('id'=>8, 'name'=>'test 8'),
+ array('id'=>7, 'name'=>'test 7'),
+ array('id'=>6, 'name'=>'test 6'),
+);
+$sql = "UPDATE FOO
+ SET [PAR_CHR] = ?
+ WHERE [PAR_ID] = ?";
+$result = odbc_prepare($link, $sql);
+if (!$result) {
+ print ('[sql] prep: '.$sql);
+ goto out;
+}
+foreach ($upd_params as &$k) {
+ if(!odbc_execute($result, array($k['name'], $k['id']))) {
+ print ('[sql] exec: '."array({$k['name']}, {$k['id']})");
+ goto out;
+ }
+}
+odbc_free_result($result);
+
+$sql = "SELECT * FROM FOO WHERE [PAR_ID] = ?";
+$result = odbc_prepare($link, $sql);
+if (!$result) {
+ print ('[sql] prep: '.$sql);
+ goto out;
+}
+foreach ($upd_params as $k) {
+ if(!odbc_execute($result, array($k['id']))) {
+ print ('[sql] exec: '."array({$k['id']})");
+ goto out;
+ }
+ while (($r = odbc_fetch_array($result)) !== false) {
+ var_dump($r);
+ }
+}
+
+out:
+if ($result) odbc_free_result($result);
+odbc_close($link);
+
+?>
+==DONE==
+--EXPECT--
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "1"
+ ["PAR_INT"]=>
+ string(2) "14"
+ ["PAR_CHR"]=>
+ string(6) "test 1"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "2"
+ ["PAR_INT"]=>
+ string(2) "30"
+ ["PAR_CHR"]=>
+ string(6) "test 2"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "3"
+ ["PAR_INT"]=>
+ string(1) "7"
+ ["PAR_CHR"]=>
+ string(6) "test 3"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "4"
+ ["PAR_INT"]=>
+ string(1) "7"
+ ["PAR_CHR"]=>
+ string(6) "test 4"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "5"
+ ["PAR_INT"]=>
+ string(1) "0"
+ ["PAR_CHR"]=>
+ string(6) "test 5"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(2) "10"
+ ["PAR_INT"]=>
+ string(8) "20140620"
+ ["PAR_CHR"]=>
+ string(7) "test 10"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "9"
+ ["PAR_INT"]=>
+ string(8) "20140201"
+ ["PAR_CHR"]=>
+ string(6) "test 9"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "8"
+ ["PAR_INT"]=>
+ string(8) "20140201"
+ ["PAR_CHR"]=>
+ string(6) "test 8"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "7"
+ ["PAR_INT"]=>
+ string(8) "20130901"
+ ["PAR_CHR"]=>
+ string(6) "test 7"
+}
+array(3) {
+ ["PAR_ID"]=>
+ string(1) "7"
+ ["PAR_INT"]=>
+ string(8) "20130901"
+ ["PAR_CHR"]=>
+ string(6) "test 7"
+}
+==DONE==
+--CLEAN--
+<?php
+include 'config.inc';
+
+$conn = odbc_connect($dsn, $user, $pass);
+
+odbc_exec($conn, 'DROP TABLE FOO');
+odbc_exec($conn, 'DROP DATABASE odbcTEST');
+
+odbc_close($conn);
+
+?>
diff --git a/ext/odbc/tests/bug71171.phpt b/ext/odbc/tests/bug71171.phpt
new file mode 100644
index 0000000000..94cfb4d0e8
--- /dev/null
+++ b/ext/odbc/tests/bug71171.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #71171 odbc_fetch_array generates SIGFAULT, variant 0
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+
+include 'config.inc';
+
+$conn = odbc_connect($dsn, $user, $pass);
+
+@odbc_exec($conn, 'CREATE DATABASE odbcTEST');
+
+odbc_exec($conn, 'CREATE TABLE FOO (ID INT, VARCHAR_COL NVARCHAR(40))');
+
+odbc_exec($conn, "INSERT INTO FOO(ID, VARCHAR_COL) VALUES (1, '" . chr(0x81) . "')");
+
+$res = odbc_exec($conn,"SELECT ID FROM FOO WHERE VARCHAR_COL = '" . chr(0x81) . "'");
+if ($res) {
+ while($record = odbc_fetch_array($res)) var_dump($record);
+}
+
+odbc_close($conn);
+?>
+==DONE==
+--EXPECT--
+array(1) {
+ ["ID"]=>
+ string(1) "1"
+}
+==DONE==
+--CLEAN--
+<?php
+include 'config.inc';
+
+$conn = odbc_connect($dsn, $user, $pass);
+
+odbc_exec($conn, 'DROP TABLE FOO');
+odbc_exec($conn, 'DROP DATABASE odbcTEST');
+
+odbc_close($conn);
+
+?>
diff --git a/ext/odbc/tests/config.inc b/ext/odbc/tests/config.inc
index a88eea4ed0..dcc4cbb3bf 100644
--- a/ext/odbc/tests/config.inc
+++ b/ext/odbc/tests/config.inc
@@ -3,6 +3,17 @@
putenv('ODBCINI=/etc/odbc.ini');
putenv('ODBCSYSINI=/etc');
-$dsn = 'myodbc3';
-$user = 'root';
-$pass = '';
+$dsn = getenv("ODBC_TEST_DSN");
+$user = getenv("ODBC_TEST_USER");
+$pass = getenv("ODBC_TEST_PASS");
+
+if (false === $dsn) {
+ $dsn = 'myodbc3';
+}
+if (false === $user) {
+ $user = 'root';
+}
+if (false == $pass) {
+ $pass = '';
+}
+
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index ee9bda6094..02fb8192a6 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,8 +26,9 @@
#include "zend_constants.h"
#include "zend_execute.h"
#include "zend_vm.h"
-
-#define DEBUG_BLOCKPASS 0
+#include "zend_bitset.h"
+#include "zend_cfg.h"
+#include "zend_dump.h"
/* Checks if a constant (like "true") may be replaced by its value */
int zend_optimizer_get_persistent_constant(zend_string *name, zval *result, int copy)
@@ -38,7 +39,7 @@ int zend_optimizer_get_persistent_constant(zend_string *name, zval *result, int
ALLOCA_FLAG(use_heap);
if ((c = zend_hash_find_ptr(EG(zend_constants), name)) == NULL) {
- lookup_name = DO_ALLOCA(ZSTR_LEN(name) + 1);
+ lookup_name = do_alloca(ZSTR_LEN(name) + 1, use_heap);
memcpy(lookup_name, ZSTR_VAL(name), ZSTR_LEN(name) + 1);
zend_str_tolower(lookup_name, ZSTR_LEN(name));
@@ -49,7 +50,7 @@ int zend_optimizer_get_persistent_constant(zend_string *name, zval *result, int
} else {
retval = 0;
}
- FREE_ALLOCA(lookup_name);
+ free_alloca(lookup_name, use_heap);
}
if (retval) {
@@ -66,483 +67,10 @@ int zend_optimizer_get_persistent_constant(zend_string *name, zval *result, int
return retval;
}
-#if DEBUG_BLOCKPASS
-# define BLOCK_REF(b) b?op_array->opcodes-b->start_opline:-1
-
-static inline void print_block(zend_code_block *block, zend_op *opcodes, char *txt)
-{
- fprintf(stderr, "%sBlock: %d-%d (%d)", txt, block->start_opline - opcodes, block->start_opline - opcodes + block->len - 1, block->len);
- if (!block->access) {
- fprintf(stderr, " unused");
- }
- if (block->op1_to) {
- fprintf(stderr, " 1: %d", block->op1_to->start_opline - opcodes);
- }
- if (block->op2_to) {
- fprintf(stderr, " 2: %d", block->op2_to->start_opline - opcodes);
- }
- if (block->ext_to) {
- fprintf(stderr, " e: %d", block->ext_to->start_opline - opcodes);
- }
- if (block->follow_to) {
- fprintf(stderr, " f: %d", block->follow_to->start_opline - opcodes);
- }
-
- if (block->sources) {
- zend_block_source *bs = block->sources;
- fprintf(stderr, " s:");
- while (bs) {
- fprintf(stderr, " %d", bs->from->start_opline - opcodes);
- bs = bs->next;
- }
- }
-
- fprintf(stderr, "\n");
- fflush(stderr);
-}
-#else
-#define print_block(a,b,c)
-#endif
-
-#define START_BLOCK_OP(opno) blocks[opno].start_opline = &op_array->opcodes[opno]; blocks[opno].start_opline_no = opno; blocks[opno].access = 1
-
-/* find code blocks in op_array
- code block is a set of opcodes with single flow of control, i.e. without jmps,
- branches, etc. */
-static int find_code_blocks(zend_op_array *op_array, zend_cfg *cfg, zend_optimizer_ctx *ctx)
-{
- zend_op *opline;
- zend_op *end = op_array->opcodes + op_array->last;
- zend_code_block *blocks, *cur_block;
- uint32_t opno = 0;
-
- memset(cfg, 0, sizeof(zend_cfg));
- blocks = cfg->blocks = zend_arena_calloc(&ctx->arena, op_array->last + 2, sizeof(zend_code_block));
- opline = op_array->opcodes;
- blocks[0].start_opline = opline;
- blocks[0].start_opline_no = 0;
- while (opline < end) {
- switch((unsigned)opline->opcode) {
- case ZEND_GOTO:
- /* would not optimize GOTOs - we cannot really know where it jumps,
- * so these optimizations are too dangerous */
- return 0;
- case ZEND_FAST_CALL:
- START_BLOCK_OP(ZEND_OP1(opline).opline_num);
- if (opline->extended_value) {
- START_BLOCK_OP(ZEND_OP2(opline).opline_num);
- }
- START_BLOCK_OP(opno + 1);
- break;
- case ZEND_FAST_RET:
- if (opline->extended_value) {
- START_BLOCK_OP(ZEND_OP2(opline).opline_num);
- }
- START_BLOCK_OP(opno + 1);
- break;
- case ZEND_JMP:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
- START_BLOCK_OP(ZEND_OP1(opline).opline_num);
- /* break missing intentionally */
- case ZEND_RETURN:
- case ZEND_RETURN_BY_REF:
- case ZEND_GENERATOR_RETURN:
- case ZEND_EXIT:
- case ZEND_THROW:
- /* start new block from this+1 */
- START_BLOCK_OP(opno + 1);
- break;
- /* TODO: if conditional jmp depends on constant,
- don't start block that won't be executed */
- case ZEND_CATCH:
- START_BLOCK_OP(opline->extended_value);
- START_BLOCK_OP(opno + 1);
- break;
- case ZEND_JMPZNZ:
- START_BLOCK_OP(opline->extended_value);
- case ZEND_JMPZ:
- case ZEND_JMPNZ:
- case ZEND_JMPZ_EX:
- case ZEND_JMPNZ_EX:
- case ZEND_FE_RESET_R:
- case ZEND_FE_RESET_RW:
- case ZEND_NEW:
- case ZEND_JMP_SET:
- case ZEND_COALESCE:
- case ZEND_ASSERT_CHECK:
- START_BLOCK_OP(ZEND_OP2(opline).opline_num);
- START_BLOCK_OP(opno + 1);
- break;
- case ZEND_FE_FETCH_R:
- case ZEND_FE_FETCH_RW:
- START_BLOCK_OP(opline->extended_value);
- START_BLOCK_OP(opno + 1);
- break;
- }
- opno++;
- opline++;
- }
-
- /* first find block start points */
- if (op_array->last_try_catch) {
- int i;
- cfg->try = zend_arena_calloc(&ctx->arena, op_array->last_try_catch, sizeof(zend_code_block *));
- cfg->catch = zend_arena_calloc(&ctx->arena, op_array->last_try_catch, sizeof(zend_code_block *));
- for (i = 0; i< op_array->last_try_catch; i++) {
- cfg->try[i] = &blocks[op_array->try_catch_array[i].try_op];
- cfg->catch[i] = &blocks[op_array->try_catch_array[i].catch_op];
- START_BLOCK_OP(op_array->try_catch_array[i].try_op);
- START_BLOCK_OP(op_array->try_catch_array[i].catch_op);
- blocks[op_array->try_catch_array[i].try_op].protected = 1;
- }
- }
- /* Currently, we don't optimize op_arrays with BRK/CONT/GOTO opcodes,
- * but, we have to keep brk_cont_array to avoid memory leaks during
- * exception handling */
- if (op_array->last_brk_cont) {
- int i, j;
-
- j = 0;
- for (i = 0; i< op_array->last_brk_cont; i++) {
- if (op_array->brk_cont_array[i].start >= 0 &&
- (op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_FREE ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_FE_FREE ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_ROPE_END ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_END_SILENCE)) {
- int parent = op_array->brk_cont_array[i].parent;
-
- while (parent >= 0 &&
- op_array->brk_cont_array[parent].start < 0 &&
- (op_array->opcodes[op_array->brk_cont_array[parent].brk].opcode != ZEND_FREE ||
- op_array->opcodes[op_array->brk_cont_array[parent].brk].opcode != ZEND_FE_FREE ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode != ZEND_ROPE_END ||
- op_array->opcodes[op_array->brk_cont_array[parent].brk].opcode != ZEND_END_SILENCE)) {
- parent = op_array->brk_cont_array[parent].parent;
- }
- op_array->brk_cont_array[i].parent = parent;
- j++;
- }
- }
- if (j) {
- cfg->loop_start = zend_arena_calloc(&ctx->arena, op_array->last_brk_cont, sizeof(zend_code_block *));
- cfg->loop_cont = zend_arena_calloc(&ctx->arena, op_array->last_brk_cont, sizeof(zend_code_block *));
- cfg->loop_brk = zend_arena_calloc(&ctx->arena, op_array->last_brk_cont, sizeof(zend_code_block *));
- j = 0;
- for (i = 0; i< op_array->last_brk_cont; i++) {
- if (op_array->brk_cont_array[i].start >= 0 &&
- (op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_FREE ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_FE_FREE ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_ROPE_END ||
- op_array->opcodes[op_array->brk_cont_array[i].brk].opcode == ZEND_END_SILENCE)) {
- if (i != j) {
- op_array->brk_cont_array[j] = op_array->brk_cont_array[i];
- }
- cfg->loop_start[j] = &blocks[op_array->brk_cont_array[j].start];
- cfg->loop_cont[j] = &blocks[op_array->brk_cont_array[j].cont];
- cfg->loop_brk[j] = &blocks[op_array->brk_cont_array[j].brk];
- START_BLOCK_OP(op_array->brk_cont_array[j].start);
- START_BLOCK_OP(op_array->brk_cont_array[j].cont);
- START_BLOCK_OP(op_array->brk_cont_array[j].brk);
- blocks[op_array->brk_cont_array[j].start].protected = 1;
- blocks[op_array->brk_cont_array[j].brk].protected = 1;
- j++;
- }
- }
- op_array->last_brk_cont = j;
- } else {
- efree(op_array->brk_cont_array);
- op_array->brk_cont_array = NULL;
- op_array->last_brk_cont = 0;
- }
- }
-
- /* Build CFG (Control Flow Graph) */
- cur_block = blocks;
- for (opno = 1; opno < op_array->last; opno++) {
- if (blocks[opno].start_opline) {
- /* found new block start */
- cur_block->len = blocks[opno].start_opline - cur_block->start_opline;
- cur_block->next = &blocks[opno];
- /* what is the last OP of previous block? */
- opline = blocks[opno].start_opline - 1;
- if (opline->opcode == ZEND_OP_DATA) {
- opline--;
- }
- switch((unsigned)opline->opcode) {
- case ZEND_RETURN:
- case ZEND_RETURN_BY_REF:
- case ZEND_GENERATOR_RETURN:
- case ZEND_EXIT:
- case ZEND_THROW:
- break;
- case ZEND_FAST_CALL:
- if (opline->extended_value) {
- cur_block->op2_to = &blocks[ZEND_OP2(opline).opline_num];
- }
- cur_block->op1_to = &blocks[ZEND_OP1(opline).opline_num];
- break;
- case ZEND_FAST_RET:
- if (opline->extended_value) {
- cur_block->op2_to = &blocks[ZEND_OP2(opline).opline_num];
- }
- break;
- case ZEND_JMP:
- cur_block->op1_to = &blocks[ZEND_OP1(opline).opline_num];
- break;
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
- cur_block->op1_to = &blocks[ZEND_OP1(opline).opline_num];
- cur_block->follow_to = &blocks[opno];
- break;
- case ZEND_JMPZNZ:
- cur_block->op2_to = &blocks[ZEND_OP2(opline).opline_num];
- cur_block->ext_to = &blocks[opline->extended_value];
- break;
- case ZEND_CATCH:
- cur_block->ext_to = &blocks[opline->extended_value];
- cur_block->follow_to = &blocks[opno];
- break;
- case ZEND_FE_FETCH_R:
- case ZEND_FE_FETCH_RW:
- cur_block->ext_to = &blocks[opline->extended_value];
- cur_block->follow_to = &blocks[opno];
- break;
- case ZEND_JMPZ:
- case ZEND_JMPNZ:
- case ZEND_JMPZ_EX:
- case ZEND_JMPNZ_EX:
- case ZEND_FE_RESET_R:
- case ZEND_FE_RESET_RW:
- case ZEND_NEW:
- case ZEND_JMP_SET:
- case ZEND_COALESCE:
- case ZEND_ASSERT_CHECK:
- cur_block->op2_to = &blocks[ZEND_OP2(opline).opline_num];
- /* break missing intentionally */
- default:
- /* next block follows this */
- cur_block->follow_to = &blocks[opno];
- break;
- }
- print_block(cur_block, op_array->opcodes, "");
- cur_block = cur_block->next;
- }
- }
- cur_block->len = end - cur_block->start_opline;
- cur_block->next = &blocks[op_array->last + 1];
- print_block(cur_block, op_array->opcodes, "");
-
- return 1;
-}
-
/* CFG back references management */
-#define ADD_SOURCE(fromb, tob) { \
- zend_block_source *__s = tob->sources; \
- while (__s && __s->from != fromb) __s = __s->next; \
- if (__s == NULL) { \
- zend_block_source *__t = zend_arena_alloc(&ctx->arena, sizeof(zend_block_source)); \
- __t->next = tob->sources; \
- tob->sources = __t; \
- __t->from = fromb; \
- } \
-}
-
-#define DEL_SOURCE(cs) do { \
- *(cs) = (*(cs))->next; \
- } while (0)
-
-
-static inline void replace_source(zend_block_source *list, zend_code_block *old, zend_code_block *new)
-{
- /* replace all references to 'old' in 'list' with 'new' */
- zend_block_source **cs;
- int found = 0;
-
- for (cs = &list; *cs; cs = &((*cs)->next)) {
- if ((*cs)->from == new) {
- if (found) {
- DEL_SOURCE(cs);
- } else {
- found = 1;
- }
- }
-
- if ((*cs)->from == old) {
- if (found) {
- DEL_SOURCE(cs);
- } else {
- (*cs)->from = new;
- found = 1;
- }
- }
- }
-}
-
-static inline void del_source(zend_code_block *from, zend_code_block *to)
-{
- /* delete source 'from' from 'to'-s sources list */
- zend_block_source **cs = &to->sources;
-
- if (to->sources == NULL) {
- to->access = 0;
- return;
- }
-
- while (*cs) {
- if ((*cs)->from == from) {
- DEL_SOURCE(cs);
- break;
- }
- cs = &((*cs)->next);
- }
-
- if (to->sources == NULL) {
- /* 'to' has no more sources - it's unused, will be stripped */
- to->access = 0;
- return;
- }
-
- if (!to->protected && to->sources->next == NULL) {
- /* source to only one block */
- zend_code_block *from_block = to->sources->from;
-
- if (from_block->access && from_block->follow_to == to &&
- from_block->op1_to == NULL &&
- from_block->op2_to == NULL &&
- from_block->ext_to == NULL) {
- /* this block follows it's only predecessor - we can join them */
- zend_op *new_to = from_block->start_opline + from_block->len;
- if (new_to != to->start_opline) {
- /* move block to new location */
- memmove(new_to, to->start_opline, sizeof(zend_op)*to->len);
- }
- /* join blocks' lengths */
- from_block->len += to->len;
- /* move 'to'`s references to 'from' */
- to->start_opline = NULL;
- to->access = 0;
- to->sources = NULL;
- from_block->follow_to = to->follow_to;
- if (to->op1_to) {
- from_block->op1_to = to->op1_to;
- replace_source(to->op1_to->sources, to, from_block);
- }
- if (to->op2_to) {
- from_block->op2_to = to->op2_to;
- replace_source(to->op2_to->sources, to, from_block);
- }
- if (to->ext_to) {
- from_block->ext_to = to->ext_to;
- replace_source(to->ext_to->sources, to, from_block);
- }
- if (to->follow_to) {
- replace_source(to->follow_to->sources, to, from_block);
- }
- /* remove "to" from list */
- }
- }
-}
-
-static void delete_code_block(zend_code_block *block, zend_optimizer_ctx *ctx)
-{
- if (block->protected) {
- return;
- }
- if (block->follow_to) {
- zend_block_source *bs = block->sources;
- while (bs) {
- zend_code_block *from_block = bs->from;
- zend_code_block *to = block->follow_to;
- if (from_block->op1_to == block) {
- from_block->op1_to = to;
- ADD_SOURCE(from_block, to);
- }
- if (from_block->op2_to == block) {
- from_block->op2_to = to;
- ADD_SOURCE(from_block, to);
- }
- if (from_block->ext_to == block) {
- from_block->ext_to = to;
- ADD_SOURCE(from_block, to);
- }
- if (from_block->follow_to == block) {
- from_block->follow_to = to;
- ADD_SOURCE(from_block, to);
- }
- bs = bs->next;
- }
- }
- block->access = 0;
-}
-
-static void zend_access_path(zend_code_block *block, zend_optimizer_ctx *ctx)
-{
- if (block->access) {
- return;
- }
-
- block->access = 1;
- if (block->op1_to) {
- zend_access_path(block->op1_to, ctx);
- ADD_SOURCE(block, block->op1_to);
- }
- if (block->op2_to) {
- zend_access_path(block->op2_to, ctx);
- ADD_SOURCE(block, block->op2_to);
- }
- if (block->ext_to) {
- zend_access_path(block->ext_to, ctx);
- ADD_SOURCE(block, block->ext_to);
- }
- if (block->follow_to) {
- zend_access_path(block->follow_to, ctx);
- ADD_SOURCE(block, block->follow_to);
- }
-}
-
-/* Traverse CFG, mark reachable basic blocks and build back references */
-static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int find_start, zend_optimizer_ctx *ctx)
-{
- zend_code_block *blocks = cfg->blocks;
- zend_code_block *start = find_start? NULL : blocks;
- zend_code_block *b;
-
- /* Mark all blocks as unaccessible and destroy back references */
- b = blocks;
- while (b != NULL) {
- if (!start && b->access) {
- start = b;
- }
- b->access = 0;
- b->sources = NULL;
- b = b->next;
- }
-
- /* Walk thorough all paths */
- zend_access_path(start, ctx);
-
- /* Add brk/cont paths */
- if (op_array->last_brk_cont) {
- int i;
- for (i=0; i< op_array->last_brk_cont; i++) {
- zend_access_path(cfg->loop_start[i], ctx);
- zend_access_path(cfg->loop_cont[i], ctx);
- zend_access_path(cfg->loop_brk[i], ctx);
- }
- }
-
- /* Add exception paths */
- if (op_array->last_try_catch) {
- int i;
- for (i=0; i< op_array->last_try_catch; i++) {
- if (!cfg->catch[i]->access) {
- zend_access_path(cfg->catch[i], ctx);
- }
- }
- }
-}
+#define DEL_SOURCE(from, to)
+#define ADD_SOURCE(from, to)
/* Data dependencies macros */
@@ -551,8 +79,6 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
#define VAR_SOURCE(op) Tsource[VAR_NUM(op.var)]
#define SET_VAR_SOURCE(opline) Tsource[VAR_NUM(opline->result.var)] = opline
-#define VAR_UNSET(op) do { if (op ## _type & (IS_TMP_VAR|IS_VAR)) {VAR_SOURCE(op) = NULL;}} while (0)
-
#define convert_to_string_safe(v) \
if (Z_TYPE_P((v)) == IS_NULL) { \
ZVAL_STRINGL((v), "", 0); \
@@ -560,136 +86,184 @@ static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int
convert_to_string((v)); \
}
-static void strip_nop(zend_code_block *block, zend_optimizer_ctx *ctx)
+static void strip_leading_nops(zend_op_array *op_array, zend_basic_block *b)
{
- zend_op *opline = block->start_opline;
- zend_op *end, *new_end;
+ zend_op *opcodes = op_array->opcodes;
- /* remove leading NOPs */
- while (block->len > 0 && block->start_opline->opcode == ZEND_NOP) {
- if (block->len == 1) {
- /* this block is all NOPs, join with following block */
- if (block->follow_to) {
- delete_code_block(block, ctx);
- }
- return;
- }
- block->start_opline++;
- block->start_opline_no++;
- block->len--;
+ while (b->len > 0 && opcodes[b->start].opcode == ZEND_NOP) {
+ b->start++;
+ b->len--;
}
+}
- /* strip the inside NOPs */
- opline = new_end = block->start_opline;
- end = opline + block->len;
-
- while (opline < end) {
- zend_op *src;
- int len = 0;
+static void strip_nops(zend_op_array *op_array, zend_basic_block *b)
+{
+ uint32_t i, j;
- while (opline < end && opline->opcode == ZEND_NOP) {
- opline++;
- }
- src = opline;
+ strip_leading_nops(op_array, b);
+ if (b->len == 0) {
+ return;
+ }
- while (opline < end && opline->opcode != ZEND_NOP) {
- opline++;
+ /* strip the inside NOPs */
+ i = j = b->start + 1;
+ while (i < b->start + b->len) {
+ if (op_array->opcodes[i].opcode != ZEND_NOP) {
+ if (i != j) {
+ op_array->opcodes[j] = op_array->opcodes[i];
+ }
+ j++;
}
- len = opline - src;
-
- /* move up non-NOP opcodes */
- memmove(new_end, src, len*sizeof(zend_op));
-
- new_end += len;
+ i++;
+ }
+ b->len = j - b->start;
+ while (j < i) {
+ MAKE_NOP(op_array->opcodes + j);
+ j++;
}
- block->len = new_end - block->start_opline;
}
-static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array, char *used_ext, zend_cfg *cfg, zend_optimizer_ctx *ctx)
+static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array, zend_bitset used_ext, zend_cfg *cfg, zend_op **Tsource)
{
- zend_op *opline = block->start_opline;
+ zend_op *opline, *src;
zend_op *end, *last_op = NULL;
- zend_op **Tsource = cfg->Tsource;
-
- print_block(block, op_array->opcodes, "Opt ");
/* remove leading NOPs */
- while (block->len > 0 && block->start_opline->opcode == ZEND_NOP) {
- if (block->len == 1) {
- /* this block is all NOPs, join with following block */
- if (block->follow_to) {
- delete_code_block(block, ctx);
- }
- return;
- }
- block->start_opline++;
- block->start_opline_no++;
- block->len--;
- }
+ strip_leading_nops(op_array, block);
- /* we track data dependencies only insight a single basic block */
- memset(Tsource, 0, (op_array->last_var + op_array->T) * sizeof(zend_op *));
- opline = block->start_opline;
+ opline = op_array->opcodes + block->start;
end = opline + block->len;
- while ((op_array->T) && (opline < end)) {
- /* strip X = QM_ASSIGN(const) */
- if ((ZEND_OP1_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- VAR_SOURCE(opline->op1) &&
- VAR_SOURCE(opline->op1)->opcode == ZEND_QM_ASSIGN &&
- ZEND_OP1_TYPE(VAR_SOURCE(opline->op1)) == IS_CONST &&
- opline->opcode != ZEND_CASE && /* CASE _always_ expects variable */
- opline->opcode != ZEND_FETCH_LIST &&
- (opline->opcode != ZEND_FE_RESET_R || opline->opcode != ZEND_FE_RESET_RW) &&
- opline->opcode != ZEND_FREE
- ) {
- zend_op *src = VAR_SOURCE(opline->op1);
- zval c = ZEND_OP1_LITERAL(src);
- VAR_UNSET(opline->op1);
- zval_copy_ctor(&c);
- zend_optimizer_update_op1_const(op_array, opline, &c);
- literal_dtor(&ZEND_OP1_LITERAL(src));
- MAKE_NOP(src);
+ while (opline < end) {
+ /* Constant Propagation: strip X = QM_ASSIGN(const) */
+ if ((opline->op1_type & (IS_TMP_VAR|IS_VAR)) &&
+ opline->opcode != ZEND_FREE) {
+ src = VAR_SOURCE(opline->op1);
+ if (src &&
+ src->opcode == ZEND_QM_ASSIGN &&
+ src->op1_type == IS_CONST) {
+
+ znode_op op1 = opline->op1;
+ zval c = ZEND_OP1_LITERAL(src);
+
+ zval_copy_ctor(&c);
+ if (zend_optimizer_update_op1_const(op_array, opline, &c)) {
+ zend_optimizer_remove_live_range(op_array, op1.var);
+ VAR_SOURCE(op1) = NULL;
+ literal_dtor(&ZEND_OP1_LITERAL(src));
+ MAKE_NOP(src);
+ }
+ }
}
- /* T = QM_ASSIGN(C), F(T) => NOP, F(C) */
- if ((ZEND_OP2_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- VAR_SOURCE(opline->op2) &&
- VAR_SOURCE(opline->op2)->opcode == ZEND_QM_ASSIGN &&
- ZEND_OP1_TYPE(VAR_SOURCE(opline->op2)) == IS_CONST) {
- zend_op *src = VAR_SOURCE(opline->op2);
- zval c = ZEND_OP1_LITERAL(src);
- VAR_UNSET(opline->op2);
- zval_copy_ctor(&c);
- zend_optimizer_update_op2_const(op_array, opline, &c);
- literal_dtor(&ZEND_OP1_LITERAL(src));
- MAKE_NOP(src);
- }
+ /* Constant Propagation: strip X = QM_ASSIGN(const) */
+ if (opline->op2_type & (IS_TMP_VAR|IS_VAR)) {
+ src = VAR_SOURCE(opline->op2);
+ if (src &&
+ src->opcode == ZEND_QM_ASSIGN &&
+ src->op1_type == IS_CONST) {
- /* T = CAST(X, String), ECHO(T) => NOP, ECHO(X) */
- if (opline->opcode == ZEND_ECHO &&
- ZEND_OP1_TYPE(opline) & (IS_TMP_VAR|IS_VAR) &&
- VAR_SOURCE(opline->op1) &&
- VAR_SOURCE(opline->op1)->opcode == ZEND_CAST &&
- VAR_SOURCE(opline->op1)->extended_value == IS_STRING) {
- zend_op *src = VAR_SOURCE(opline->op1);
- COPY_NODE(opline->op1, src->op1);
- MAKE_NOP(src);
- }
+ znode_op op2 = opline->op2;
+ zval c = ZEND_OP1_LITERAL(src);
- /* T = BOOL(X), FREE(T) => NOP */
- if (opline->opcode == ZEND_FREE &&
- ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
- VAR_SOURCE(opline->op1)) {
- zend_op *src = VAR_SOURCE(opline->op1);
- if (src->opcode == ZEND_BOOL) {
- if (ZEND_OP1_TYPE(src) == IS_CONST) {
+ zval_copy_ctor(&c);
+ if (zend_optimizer_update_op2_const(op_array, opline, &c)) {
+ zend_optimizer_remove_live_range(op_array, op2.var);
+ VAR_SOURCE(op2) = NULL;
literal_dtor(&ZEND_OP1_LITERAL(src));
+ MAKE_NOP(src);
+ }
+ }
+ }
+
+ if (opline->opcode == ZEND_ECHO) {
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
+ src = VAR_SOURCE(opline->op1);
+ if (src &&
+ src->opcode == ZEND_CAST &&
+ src->extended_value == IS_STRING) {
+ /* T = CAST(X, String), ECHO(T) => NOP, ECHO(X) */
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ MAKE_NOP(src);
+ }
+ }
+
+ if (opline->op1_type == IS_CONST) {
+ if (last_op && last_op->opcode == ZEND_ECHO &&
+ last_op->op1_type == IS_CONST &&
+ Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_DOUBLE &&
+ Z_TYPE(ZEND_OP1_LITERAL(last_op)) != IS_DOUBLE) {
+ /* compress consecutive ECHO's.
+ * Float to string conversion may be affected by current
+ * locale setting.
+ */
+ int l, old_len;
+
+ if (Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_STRING) {
+ convert_to_string_safe(&ZEND_OP1_LITERAL(opline));
+ }
+ if (Z_TYPE(ZEND_OP1_LITERAL(last_op)) != IS_STRING) {
+ convert_to_string_safe(&ZEND_OP1_LITERAL(last_op));
+ }
+ old_len = Z_STRLEN(ZEND_OP1_LITERAL(last_op));
+ l = old_len + Z_STRLEN(ZEND_OP1_LITERAL(opline));
+ if (!Z_REFCOUNTED(ZEND_OP1_LITERAL(last_op))) {
+ zend_string *tmp = zend_string_alloc(l, 0);
+ memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP1_LITERAL(last_op)), old_len);
+ Z_STR(ZEND_OP1_LITERAL(last_op)) = tmp;
+ } else {
+ Z_STR(ZEND_OP1_LITERAL(last_op)) = zend_string_extend(Z_STR(ZEND_OP1_LITERAL(last_op)), l, 0);
+ }
+ Z_TYPE_INFO(ZEND_OP1_LITERAL(last_op)) = IS_STRING_EX;
+ memcpy(Z_STRVAL(ZEND_OP1_LITERAL(last_op)) + old_len, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)));
+ Z_STRVAL(ZEND_OP1_LITERAL(last_op))[l] = '\0';
+ zval_dtor(&ZEND_OP1_LITERAL(opline));
+ ZVAL_STR(&ZEND_OP1_LITERAL(opline), zend_new_interned_string(Z_STR(ZEND_OP1_LITERAL(last_op))));
+ ZVAL_NULL(&ZEND_OP1_LITERAL(last_op));
+ MAKE_NOP(last_op);
}
- MAKE_NOP(src);
- MAKE_NOP(opline);
+ last_op = opline;
+ } else {
+ last_op = NULL;
}
+ } else {
+ last_op = NULL;
}
+ switch (opline->opcode) {
+
+ case ZEND_FREE:
+ if (opline->op1_type == IS_TMP_VAR) {
+ src = VAR_SOURCE(opline->op1);
+ if (src &&
+ (src->opcode == ZEND_BOOL || src->opcode == ZEND_BOOL_NOT)) {
+ /* T = BOOL(X), FREE(T) => NOP */
+ if (ZEND_OP1_TYPE(src) == IS_CONST) {
+ literal_dtor(&ZEND_OP1_LITERAL(src));
+ }
+ VAR_SOURCE(opline->op1) = NULL;
+ MAKE_NOP(src);
+ MAKE_NOP(opline);
+ }
+ } else if (opline->op1_type == IS_VAR) {
+ src = VAR_SOURCE(opline->op1);
+ /* V = OP, FREE(V) => OP. NOP */
+ if (src &&
+ src->opcode != ZEND_FETCH_R &&
+ src->opcode != ZEND_FETCH_STATIC_PROP_R &&
+ src->opcode != ZEND_FETCH_DIM_R &&
+ src->opcode != ZEND_FETCH_OBJ_R &&
+ src->opcode != ZEND_NEW) {
+ if (opline->extended_value & ZEND_FREE_ON_RETURN) {
+ /* mark as removed (empty live range) */
+ op_array->live_range[opline->op2.num].var = (uint32_t)-1;
+ }
+ ZEND_RESULT_TYPE(src) = IS_UNUSED;
+ MAKE_NOP(opline);
+ }
+ }
+ break;
+
#if 0
/* pre-evaluate functions:
constant(x)
@@ -753,480 +327,641 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
}
#endif
- /* IS_EQ(TRUE, X) => BOOL(X)
- * IS_EQ(FALSE, X) => BOOL_NOT(X)
- * IS_NOT_EQ(TRUE, X) => BOOL_NOT(X)
- * IS_NOT_EQ(FALSE, X) => BOOL(X)
- * CASE(TRUE, X) => BOOL(X)
- * CASE(FALSE, X) => BOOL_NOT(X)
- */
- if (opline->opcode == ZEND_IS_EQUAL ||
- opline->opcode == ZEND_IS_NOT_EQUAL ||
- opline->opcode == ZEND_CASE) {
- if (ZEND_OP1_TYPE(opline) == IS_CONST &&
- (Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_FALSE ||
- Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_TRUE)) {
- /* T = IS_EQUAL(TRUE, X) => T = BOOL(X) */
- /* T = IS_EQUAL(FALSE, X) => T = BOOL_NOT(X) */
- /* T = IS_NOT_EQUAL(TRUE, X) => T = BOOL_NOT(X) */
- /* T = IS_NOT_EQUAL(FALSE, X) => T = BOOL(X) */
- /* Optimization of comparison with "null" is not safe,
- * because ("0" == null) is not equal to !("0")
- */
- opline->opcode =
- ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP1_LITERAL(opline))) == IS_TRUE)) ?
- ZEND_BOOL : ZEND_BOOL_NOT;
- COPY_NODE(opline->op1, opline->op2);
- SET_UNUSED(opline->op2);
- } else if (ZEND_OP2_TYPE(opline) == IS_CONST &&
- (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_FALSE ||
- Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_TRUE)) {
- /* T = IS_EQUAL(X, TRUE) => T = BOOL(X) */
- /* T = IS_EQUAL(X, FALSE) => T = BOOL_NOT(X) */
- /* T = IS_NOT_EQUAL(X, TRUE) => T = BOOL_NOT(X) */
- /* T = IS_NOT_EQUAL(X, FALSE) => T = BOOL(X) */
- /* Optimization of comparison with "null" is not safe,
- * because ("0" == null) is not equal to !("0")
- */
- opline->opcode =
- ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP2_LITERAL(opline))) == IS_TRUE)) ?
- ZEND_BOOL : ZEND_BOOL_NOT;
- SET_UNUSED(opline->op2);
- }
- }
+ case ZEND_FETCH_LIST:
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
+ /* LIST variable will be deleted later by FREE */
+ Tsource[VAR_NUM(opline->op1.var)] = NULL;
+ }
+ break;
- if ((opline->opcode == ZEND_BOOL ||
- opline->opcode == ZEND_BOOL_NOT ||
- opline->opcode == ZEND_JMPZ ||
- opline->opcode == ZEND_JMPNZ ||
- opline->opcode == ZEND_JMPZNZ) &&
- ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
- VAR_SOURCE(opline->op1) != NULL &&
- !used_ext[VAR_NUM(ZEND_OP1(opline).var)] &&
- VAR_SOURCE(opline->op1)->opcode == ZEND_BOOL_NOT) {
- /* T = BOOL_NOT(X) + JMPZ(T) -> NOP, JMPNZ(X) */
- zend_op *src = VAR_SOURCE(opline->op1);
-
- COPY_NODE(opline->op1, src->op1);
-
- switch (opline->opcode) {
- case ZEND_BOOL:
- /* T = BOOL_NOT(X) + BOOL(T) -> NOP, BOOL_NOT(X) */
- opline->opcode = ZEND_BOOL_NOT;
- break;
- case ZEND_BOOL_NOT:
- /* T = BOOL_NOT(X) + BOOL_BOOL(T) -> NOP, BOOL(X) */
- opline->opcode = ZEND_BOOL;
+ case ZEND_CASE:
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
+ /* CASE variable will be deleted later by FREE, so we can't optimize it */
+ Tsource[VAR_NUM(opline->op1.var)] = NULL;
break;
- case ZEND_JMPZ:
- /* T = BOOL_NOT(X) + JMPZ(T,L) -> NOP, JMPNZ(X,L) */
- opline->opcode = ZEND_JMPNZ;
- break;
- case ZEND_JMPNZ:
- /* T = BOOL_NOT(X) + JMPNZ(T,L) -> NOP, JMPZ(X,L) */
- opline->opcode = ZEND_JMPZ;
+ }
+ if (opline->op1_type == IS_CONST &&
+ opline->op2_type == IS_CONST) {
break;
- case ZEND_JMPZNZ:
- {
- /* T = BOOL_NOT(X) + JMPZNZ(T,L1,L2) -> NOP, JMPZNZ(X,L2,L1) */
- int op_t;
- zend_code_block *op_b;
-
- op_t = opline->extended_value;
- opline->extended_value = ZEND_OP2(opline).opline_num;
- ZEND_OP2(opline).opline_num = op_t;
-
- op_b = block->ext_to;
- block->ext_to = block->op2_to;
- block->op2_to = op_b;
+ }
+ /* break missing intentionally */
+
+ case ZEND_IS_EQUAL:
+ case ZEND_IS_NOT_EQUAL:
+ if (opline->op1_type == IS_CONST &&
+ opline->op2_type == IS_CONST) {
+ goto optimize_constant_binary_op;
+ }
+ /* IS_EQ(TRUE, X) => BOOL(X)
+ * IS_EQ(FALSE, X) => BOOL_NOT(X)
+ * IS_NOT_EQ(TRUE, X) => BOOL_NOT(X)
+ * IS_NOT_EQ(FALSE, X) => BOOL(X)
+ * CASE(TRUE, X) => BOOL(X)
+ * CASE(FALSE, X) => BOOL_NOT(X)
+ */
+ if (opline->op1_type == IS_CONST &&
+ (Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_FALSE ||
+ Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_TRUE)) {
+ /* Optimization of comparison with "null" is not safe,
+ * because ("0" == null) is not equal to !("0")
+ */
+ opline->opcode =
+ ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP1_LITERAL(opline))) == IS_TRUE)) ?
+ ZEND_BOOL : ZEND_BOOL_NOT;
+ COPY_NODE(opline->op1, opline->op2);
+ SET_UNUSED(opline->op2);
+ goto optimize_bool;
+ } else if (opline->op2_type == IS_CONST &&
+ (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_FALSE ||
+ Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_TRUE)) {
+ /* Optimization of comparison with "null" is not safe,
+ * because ("0" == null) is not equal to !("0")
+ */
+ opline->opcode =
+ ((opline->opcode != ZEND_IS_NOT_EQUAL) == ((Z_TYPE(ZEND_OP2_LITERAL(opline))) == IS_TRUE)) ?
+ ZEND_BOOL : ZEND_BOOL_NOT;
+ SET_UNUSED(opline->op2);
+ goto optimize_bool;
}
break;
- }
- VAR_UNSET(opline->op1);
- MAKE_NOP(src);
- continue;
- } else
+ case ZEND_BOOL:
+ case ZEND_BOOL_NOT:
+ optimize_bool:
+ if (opline->op1_type == IS_CONST) {
+ goto optimize_const_unary_op;
+ }
+ if (opline->op1_type == IS_TMP_VAR &&
+ !zend_bitset_in(used_ext, VAR_NUM(opline->op1.var))) {
+ src = VAR_SOURCE(opline->op1);
+ if (src) {
+ switch (src->opcode) {
+ case ZEND_BOOL_NOT:
+ /* T = BOOL_NOT(X) + BOOL(T) -> NOP, BOOL_NOT(X) */
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ opline->opcode = (opline->opcode == ZEND_BOOL) ? ZEND_BOOL_NOT : ZEND_BOOL;
+ MAKE_NOP(src);
+ goto optimize_bool;
+ case ZEND_BOOL:
+ /* T = BOOL(X) + BOOL(T) -> NOP, BOOL(X) */
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ MAKE_NOP(src);
+ goto optimize_bool;
+ case ZEND_IS_EQUAL:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ src->opcode = ZEND_IS_NOT_EQUAL;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ case ZEND_IS_NOT_EQUAL:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ src->opcode = ZEND_IS_EQUAL;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ case ZEND_IS_IDENTICAL:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ src->opcode = ZEND_IS_NOT_IDENTICAL;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ case ZEND_IS_NOT_IDENTICAL:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ src->opcode = ZEND_IS_IDENTICAL;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ case ZEND_IS_SMALLER:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ zend_uchar tmp_type;
+ uint32_t tmp;
+
+ src->opcode = ZEND_IS_SMALLER_OR_EQUAL;
+ tmp_type = src->op1_type;
+ src->op1_type = src->op2_type;
+ src->op2_type = tmp_type;
+ tmp = src->op1.num;
+ src->op1.num = src->op2.num;
+ src->op2.num = tmp;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ case ZEND_IS_SMALLER_OR_EQUAL:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ zend_uchar tmp_type;
+ uint32_t tmp;
+
+ src->opcode = ZEND_IS_SMALLER;
+ tmp_type = src->op1_type;
+ src->op1_type = src->op2_type;
+ src->op2_type = tmp_type;
+ tmp = src->op1.num;
+ src->op1.num = src->op2.num;
+ src->op2.num = tmp;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ case ZEND_ISSET_ISEMPTY_VAR:
+ case ZEND_ISSET_ISEMPTY_DIM_OBJ:
+ case ZEND_ISSET_ISEMPTY_PROP_OBJ:
+ case ZEND_ISSET_ISEMPTY_STATIC_PROP:
+ case ZEND_INSTANCEOF:
+ case ZEND_TYPE_CHECK:
+ case ZEND_DEFINED:
+ if (opline->opcode == ZEND_BOOL_NOT) {
+ break;
+ }
+ COPY_NODE(src->result, opline->result);
+ SET_VAR_SOURCE(src);
+ MAKE_NOP(opline);
+ break;
+ }
+ }
+ }
+ break;
+
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_JMPZNZ:
+ optimize_jmpznz:
+ if (opline->op1_type == IS_TMP_VAR &&
+ (!zend_bitset_in(used_ext, VAR_NUM(opline->op1.var)) ||
+ (opline->result_type == opline->op1_type &&
+ opline->result.var == opline->op1.var))) {
+ src = VAR_SOURCE(opline->op1);
+ if (src) {
+ if (src->opcode == ZEND_BOOL_NOT &&
+ opline->opcode != ZEND_JMPZ_EX &&
+ opline->opcode != ZEND_JMPNZ_EX) {
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ if (opline->opcode == ZEND_JMPZ) {
+ /* T = BOOL_NOT(X) + JMPZ(T) -> NOP, JMPNZ(X) */
+ opline->opcode = ZEND_JMPNZ;
+ } else if (opline->opcode == ZEND_JMPNZ) {
+ /* T = BOOL_NOT(X) + JMPNZ(T) -> NOP, JMPZ(X) */
+ opline->opcode = ZEND_JMPZ;
#if 0
- /* T = BOOL_NOT(X) + T = JMPZ_EX(T, X) -> T = BOOL_NOT(X), JMPNZ(X) */
- if(0 && (opline->opcode == ZEND_JMPZ_EX ||
- opline->opcode == ZEND_JMPNZ_EX) &&
- ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
- VAR_SOURCE(opline->op1) != NULL &&
- VAR_SOURCE(opline->op1)->opcode == ZEND_BOOL_NOT &&
- ZEND_OP1(opline).var == ZEND_RESULT(opline).var
- ) {
- zend_op *src = VAR_SOURCE(opline->op1);
- if(opline->opcode == ZEND_JMPZ_EX) {
- opline->opcode = ZEND_JMPNZ;
- } else {
- opline->opcode = ZEND_JMPZ;
- }
- COPY_NODE(opline->op1, src->op1);
- SET_UNUSED(opline->result);
- continue;
- } else
+ } else if (opline->opcode == ZEND_JMPZ_EX) {
+ /* T = BOOL_NOT(X) + JMPZ_EX(T) -> NOP, JMPNZ_EX(X) */
+ opline->opcode = ZEND_JMPNZ_EX;
+ } else if (opline->opcode == ZEND_JMPNZ_EX) {
+ /* T = BOOL_NOT(X) + JMPNZ_EX(T) -> NOP, JMPZ_EX(X) */
+ opline->opcode = ZEND_JMPZ;
#endif
- /* T = BOOL(X) + JMPZ(T) -> NOP, JMPZ(X) */
- if ((opline->opcode == ZEND_BOOL ||
- opline->opcode == ZEND_BOOL_NOT ||
- opline->opcode == ZEND_JMPZ ||
- opline->opcode == ZEND_JMPZ_EX ||
- opline->opcode == ZEND_JMPNZ_EX ||
- opline->opcode == ZEND_JMPNZ ||
- opline->opcode == ZEND_JMPZNZ) &&
- (ZEND_OP1_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- VAR_SOURCE(opline->op1) != NULL &&
- (!used_ext[VAR_NUM(ZEND_OP1(opline).var)] ||
- ((ZEND_RESULT_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- ZEND_RESULT(opline).var == ZEND_OP1(opline).var)) &&
- (VAR_SOURCE(opline->op1)->opcode == ZEND_BOOL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_QM_ASSIGN)) {
- zend_op *src = VAR_SOURCE(opline->op1);
- COPY_NODE(opline->op1, src->op1);
-
- VAR_UNSET(opline->op1);
- MAKE_NOP(src);
- continue;
- } else if (last_op && opline->opcode == ZEND_ECHO &&
- last_op->opcode == ZEND_ECHO &&
- ZEND_OP1_TYPE(opline) == IS_CONST &&
- Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_DOUBLE &&
- ZEND_OP1_TYPE(last_op) == IS_CONST &&
- Z_TYPE(ZEND_OP1_LITERAL(last_op)) != IS_DOUBLE) {
- /* compress consecutive ECHO's.
- * Float to string conversion may be affected by current
- * locale setting.
- */
- int l, old_len;
-
- if (Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_STRING) {
- convert_to_string_safe(&ZEND_OP1_LITERAL(opline));
- }
- if (Z_TYPE(ZEND_OP1_LITERAL(last_op)) != IS_STRING) {
- convert_to_string_safe(&ZEND_OP1_LITERAL(last_op));
- }
- old_len = Z_STRLEN(ZEND_OP1_LITERAL(last_op));
- l = old_len + Z_STRLEN(ZEND_OP1_LITERAL(opline));
- if (!Z_REFCOUNTED(ZEND_OP1_LITERAL(last_op))) {
- zend_string *tmp = zend_string_alloc(l, 0);
- memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP1_LITERAL(last_op)), old_len);
- Z_STR(ZEND_OP1_LITERAL(last_op)) = tmp;
- } else {
- Z_STR(ZEND_OP1_LITERAL(last_op)) = zend_string_extend(Z_STR(ZEND_OP1_LITERAL(last_op)), l, 0);
- }
- Z_TYPE_INFO(ZEND_OP1_LITERAL(last_op)) = IS_STRING_EX;
- memcpy(Z_STRVAL(ZEND_OP1_LITERAL(last_op)) + old_len, Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)));
- Z_STRVAL(ZEND_OP1_LITERAL(last_op))[l] = '\0';
- zval_dtor(&ZEND_OP1_LITERAL(opline));
- Z_STR(ZEND_OP1_LITERAL(opline)) = zend_new_interned_string(Z_STR(ZEND_OP1_LITERAL(last_op)));
- if (!Z_REFCOUNTED(ZEND_OP1_LITERAL(opline))) {
- Z_TYPE_FLAGS(ZEND_OP1_LITERAL(opline)) &= ~ (IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE);
- }
- ZVAL_NULL(&ZEND_OP1_LITERAL(last_op));
- MAKE_NOP(last_op);
- } else if ((opline->opcode == ZEND_CONCAT) &&
- ZEND_OP2_TYPE(opline) == IS_CONST &&
- ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
- VAR_SOURCE(opline->op1) &&
- (VAR_SOURCE(opline->op1)->opcode == ZEND_CONCAT ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT) &&
- ZEND_OP2_TYPE(VAR_SOURCE(opline->op1)) == IS_CONST &&
- ZEND_RESULT(VAR_SOURCE(opline->op1)).var == ZEND_OP1(opline).var) {
- /* compress consecutive CONCAT/ADD_STRING/ADD_CHARs */
- zend_op *src = VAR_SOURCE(opline->op1);
- int l, old_len;
-
- if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_STRING) {
- convert_to_string_safe(&ZEND_OP2_LITERAL(opline));
- }
- if (Z_TYPE(ZEND_OP2_LITERAL(src)) != IS_STRING) {
- convert_to_string_safe(&ZEND_OP2_LITERAL(src));
- }
+ } else {
+ /* T = BOOL_NOT(X) + JMPZNZ(T,L1,L2) -> NOP, JMPZNZ(X,L2,L1) */
+ uint32_t tmp;
+
+ ZEND_ASSERT(opline->opcode == ZEND_JMPZNZ);
+ tmp = block->successors[0];
+ block->successors[0] = block->successors[1];
+ block->successors[1] = tmp;
+ }
+ MAKE_NOP(src);
+ goto optimize_jmpznz;
+ } else if (src->opcode == ZEND_BOOL ||
+ src->opcode == ZEND_QM_ASSIGN) {
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ MAKE_NOP(src);
+ goto optimize_jmpznz;
+ }
+ }
+ }
+ break;
- VAR_UNSET(opline->op1);
- COPY_NODE(opline->op1, src->op1);
- old_len = Z_STRLEN(ZEND_OP2_LITERAL(src));
- l = old_len + Z_STRLEN(ZEND_OP2_LITERAL(opline));
- if (!Z_REFCOUNTED(ZEND_OP2_LITERAL(src))) {
- zend_string *tmp = zend_string_alloc(l, 0);
- memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP2_LITERAL(src)), old_len);
- Z_STR(ZEND_OP2_LITERAL(last_op)) = tmp;
- } else {
- Z_STR(ZEND_OP2_LITERAL(src)) = zend_string_extend(Z_STR(ZEND_OP2_LITERAL(src)), l, 0);
- }
- Z_TYPE_INFO(ZEND_OP2_LITERAL(last_op)) = IS_STRING_EX;
- memcpy(Z_STRVAL(ZEND_OP2_LITERAL(src)) + old_len, Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)));
- Z_STRVAL(ZEND_OP2_LITERAL(src))[l] = '\0';
- zend_string_release(Z_STR(ZEND_OP2_LITERAL(opline)));
- Z_STR(ZEND_OP2_LITERAL(opline)) = zend_new_interned_string(Z_STR(ZEND_OP2_LITERAL(src)));
- if (!Z_REFCOUNTED(ZEND_OP2_LITERAL(opline))) {
- Z_TYPE_FLAGS(ZEND_OP2_LITERAL(opline)) &= ~ (IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE);
- }
- ZVAL_NULL(&ZEND_OP2_LITERAL(src));
- MAKE_NOP(src);
- } else if ((opline->opcode == ZEND_ADD ||
- opline->opcode == ZEND_SUB ||
- opline->opcode == ZEND_MUL ||
- opline->opcode == ZEND_DIV ||
- opline->opcode == ZEND_MOD ||
- opline->opcode == ZEND_SL ||
- opline->opcode == ZEND_SR ||
- opline->opcode == ZEND_CONCAT ||
- opline->opcode == ZEND_FAST_CONCAT ||
- opline->opcode == ZEND_IS_EQUAL ||
- opline->opcode == ZEND_IS_NOT_EQUAL ||
- opline->opcode == ZEND_IS_SMALLER ||
- opline->opcode == ZEND_IS_SMALLER_OR_EQUAL ||
- opline->opcode == ZEND_IS_IDENTICAL ||
- opline->opcode == ZEND_IS_NOT_IDENTICAL ||
- opline->opcode == ZEND_BOOL_XOR ||
- opline->opcode == ZEND_BW_OR ||
- opline->opcode == ZEND_BW_AND ||
- opline->opcode == ZEND_BW_XOR) &&
- ZEND_OP1_TYPE(opline)==IS_CONST &&
- ZEND_OP2_TYPE(opline)==IS_CONST) {
- /* evaluate constant expressions */
- binary_op_type binary_op = get_binary_op(opline->opcode);
- zval result;
- int er;
-
- if ((opline->opcode == ZEND_DIV || opline->opcode == ZEND_MOD) &&
- zval_get_long(&ZEND_OP2_LITERAL(opline)) == 0) {
- if (RESULT_USED(opline)) {
- SET_VAR_SOURCE(opline);
+ case ZEND_CONCAT:
+ case ZEND_FAST_CONCAT:
+ if (opline->op1_type == IS_CONST &&
+ opline->op2_type == IS_CONST) {
+ goto optimize_constant_binary_op;
}
- opline++;
- continue;
- } else if ((opline->opcode == ZEND_SL || opline->opcode == ZEND_SR) &&
- zval_get_long(&ZEND_OP2_LITERAL(opline)) < 0) {
- if (RESULT_USED(opline)) {
- SET_VAR_SOURCE(opline);
+
+ if (opline->op2_type == IS_CONST &&
+ opline->op1_type == IS_TMP_VAR) {
+
+ src = VAR_SOURCE(opline->op1);
+ if (src &&
+ (src->opcode == ZEND_CONCAT ||
+ src->opcode == ZEND_FAST_CONCAT) &&
+ src->op2_type == IS_CONST) {
+ /* compress consecutive CONCATs */
+ int l, old_len;
+
+ if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_STRING) {
+ convert_to_string_safe(&ZEND_OP2_LITERAL(opline));
+ }
+ if (Z_TYPE(ZEND_OP2_LITERAL(src)) != IS_STRING) {
+ convert_to_string_safe(&ZEND_OP2_LITERAL(src));
+ }
+
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ old_len = Z_STRLEN(ZEND_OP2_LITERAL(src));
+ l = old_len + Z_STRLEN(ZEND_OP2_LITERAL(opline));
+ if (!Z_REFCOUNTED(ZEND_OP2_LITERAL(src))) {
+ zend_string *tmp = zend_string_alloc(l, 0);
+ memcpy(ZSTR_VAL(tmp), Z_STRVAL(ZEND_OP2_LITERAL(src)), old_len);
+ Z_STR(ZEND_OP2_LITERAL(src)) = tmp;
+ } else {
+ Z_STR(ZEND_OP2_LITERAL(src)) = zend_string_extend(Z_STR(ZEND_OP2_LITERAL(src)), l, 0);
+ }
+ Z_TYPE_INFO(ZEND_OP2_LITERAL(src)) = IS_STRING_EX;
+ memcpy(Z_STRVAL(ZEND_OP2_LITERAL(src)) + old_len, Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)));
+ Z_STRVAL(ZEND_OP2_LITERAL(src))[l] = '\0';
+ zend_string_release(Z_STR(ZEND_OP2_LITERAL(opline)));
+ ZVAL_STR(&ZEND_OP2_LITERAL(opline), zend_new_interned_string(Z_STR(ZEND_OP2_LITERAL(src))));
+ ZVAL_NULL(&ZEND_OP2_LITERAL(src));
+ MAKE_NOP(src);
+ }
}
- opline++;
- continue;
- }
- er = EG(error_reporting);
- EG(error_reporting) = 0;
- if (binary_op(&result, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LITERAL(opline)) == SUCCESS) {
- literal_dtor(&ZEND_OP1_LITERAL(opline));
- literal_dtor(&ZEND_OP2_LITERAL(opline));
- opline->opcode = ZEND_QM_ASSIGN;
- SET_UNUSED(opline->op2);
- zend_optimizer_update_op1_const(op_array, opline, &result);
- }
- EG(error_reporting) = er;
- } else if ((opline->opcode == ZEND_BOOL ||
- opline->opcode == ZEND_BOOL_NOT ||
- opline->opcode == ZEND_BW_NOT) && ZEND_OP1_TYPE(opline) == IS_CONST) {
- /* evaluate constant unary ops */
- unary_op_type unary_op = get_unary_op(opline->opcode);
- zval result;
-
- if (unary_op) {
- unary_op(&result, &ZEND_OP1_LITERAL(opline));
- literal_dtor(&ZEND_OP1_LITERAL(opline));
- } else {
- /* BOOL */
- result = ZEND_OP1_LITERAL(opline);
- convert_to_boolean(&result);
- ZVAL_NULL(&ZEND_OP1_LITERAL(opline));
- }
- opline->opcode = ZEND_QM_ASSIGN;
- zend_optimizer_update_op1_const(op_array, opline, &result);
- } else if ((opline->opcode == ZEND_RETURN || opline->opcode == ZEND_EXIT) &&
- (ZEND_OP1_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- VAR_SOURCE(opline->op1) &&
- VAR_SOURCE(opline->op1)->opcode == ZEND_QM_ASSIGN) {
- /* T = QM_ASSIGN(X), RETURN(T) to RETURN(X) */
- zend_op *src = VAR_SOURCE(opline->op1);
- VAR_UNSET(opline->op1);
- COPY_NODE(opline->op1, src->op1);
- MAKE_NOP(src);
- } else if (opline->opcode == ZEND_CONCAT || opline->opcode == ZEND_FAST_CONCAT) {
- if ((ZEND_OP1_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- VAR_SOURCE(opline->op1) &&
- VAR_SOURCE(opline->op1)->opcode == ZEND_CAST &&
- VAR_SOURCE(opline->op1)->extended_value == IS_STRING) {
- /* convert T1 = CAST(STRING, X), T2 = CONCAT(T1, Y) to T2 = CONCAT(X,Y) */
- zend_op *src = VAR_SOURCE(opline->op1);
- VAR_UNSET(opline->op1);
- COPY_NODE(opline->op1, src->op1);
- MAKE_NOP(src);
- }
- if ((ZEND_OP2_TYPE(opline) & (IS_TMP_VAR|IS_VAR)) &&
- VAR_SOURCE(opline->op2) &&
- VAR_SOURCE(opline->op2)->opcode == ZEND_CAST &&
- VAR_SOURCE(opline->op2)->extended_value == IS_STRING) {
- /* convert T1 = CAST(STRING, X), T2 = CONCAT(Y, T1) to T2 = CONCAT(Y,X) */
- zend_op *src = VAR_SOURCE(opline->op2);
- VAR_UNSET(opline->op2);
- COPY_NODE(opline->op2, src->op1);
- MAKE_NOP(src);
- }
- if (ZEND_OP1_TYPE(opline) == IS_CONST &&
- Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING &&
- Z_STRLEN(ZEND_OP1_LITERAL(opline)) == 0) {
- /* convert CONCAT('', X) => CAST(STRING, X) */
- literal_dtor(&ZEND_OP1_LITERAL(opline));
- opline->opcode = ZEND_CAST;
- opline->extended_value = IS_STRING;
- COPY_NODE(opline->op1, opline->op2);
- opline->op2_type = IS_UNUSED;
- opline->op2.var = 0;
- } else if (ZEND_OP2_TYPE(opline) == IS_CONST &&
+
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
+ src = VAR_SOURCE(opline->op1);
+ if (src &&
+ src->opcode == ZEND_CAST &&
+ src->extended_value == IS_STRING) {
+ /* convert T1 = CAST(STRING, X), T2 = CONCAT(T1, Y) to T2 = CONCAT(X,Y) */
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ MAKE_NOP(src);
+ }
+ }
+ if (opline->op2_type & (IS_TMP_VAR|IS_VAR)) {
+ src = VAR_SOURCE(opline->op2);
+ if (src &&
+ src->opcode == ZEND_CAST &&
+ src->extended_value == IS_STRING) {
+ /* convert T1 = CAST(STRING, X), T2 = CONCAT(Y, T1) to T2 = CONCAT(Y,X) */
+ zend_op *src = VAR_SOURCE(opline->op2);
+ VAR_SOURCE(opline->op2) = NULL;
+ COPY_NODE(opline->op2, src->op1);
+ MAKE_NOP(src);
+ }
+ }
+ if (opline->op1_type == IS_CONST &&
+ Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING &&
+ Z_STRLEN(ZEND_OP1_LITERAL(opline)) == 0) {
+ /* convert CONCAT('', X) => CAST(STRING, X) */
+ literal_dtor(&ZEND_OP1_LITERAL(opline));
+ opline->opcode = ZEND_CAST;
+ opline->extended_value = IS_STRING;
+ COPY_NODE(opline->op1, opline->op2);
+ opline->op2_type = IS_UNUSED;
+ opline->op2.var = 0;
+ } else if (opline->op2_type == IS_CONST &&
Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING &&
Z_STRLEN(ZEND_OP2_LITERAL(opline)) == 0) {
- /* convert CONCAT(X, '') => CAST(STRING, X) */
- literal_dtor(&ZEND_OP2_LITERAL(opline));
- opline->opcode = ZEND_CAST;
- opline->extended_value = IS_STRING;
- opline->op2_type = IS_UNUSED;
- opline->op2.var = 0;
- } else if (opline->opcode == ZEND_CONCAT &&
- (opline->op1_type == IS_CONST ||
- (opline->op1_type == IS_TMP_VAR &&
- VAR_SOURCE(opline->op1) &&
- (VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_ROPE_END ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CONSTANT))) &&
- (opline->op2_type == IS_CONST ||
- (opline->op2_type == IS_TMP_VAR &&
- VAR_SOURCE(opline->op2) &&
- (VAR_SOURCE(opline->op2)->opcode == ZEND_FAST_CONCAT ||
- VAR_SOURCE(opline->op2)->opcode == ZEND_ROPE_END ||
- VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CONSTANT)))) {
- opline->opcode = ZEND_FAST_CONCAT;
- }
- } else if (opline->opcode == ZEND_QM_ASSIGN &&
- ZEND_OP1_TYPE(opline) == ZEND_RESULT_TYPE(opline) &&
- ZEND_OP1(opline).var == ZEND_RESULT(opline).var) {
- /* strip T = QM_ASSIGN(T) */
- MAKE_NOP(opline);
- } else if (opline->opcode == ZEND_BOOL &&
- ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
- VAR_SOURCE(opline->op1) &&
- (VAR_SOURCE(opline->op1)->opcode == ZEND_IS_EQUAL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_IS_NOT_EQUAL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_IS_SMALLER ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_IS_SMALLER_OR_EQUAL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_BOOL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_IS_IDENTICAL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_IS_NOT_IDENTICAL ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_ISSET_ISEMPTY_VAR ||
- VAR_SOURCE(opline->op1)->opcode == ZEND_ISSET_ISEMPTY_DIM_OBJ) &&
- !used_ext[VAR_NUM(ZEND_OP1(opline).var)]) {
- /* T = IS_SMALLER(X, Y), T1 = BOOL(T) => T = IS_SMALLER(X, Y), T1 = QM_ASSIGN(T) */
- zend_op *src = VAR_SOURCE(opline->op1);
- COPY_NODE(src->result, opline->result);
- SET_VAR_SOURCE(src);
- MAKE_NOP(opline);
+ /* convert CONCAT(X, '') => CAST(STRING, X) */
+ literal_dtor(&ZEND_OP2_LITERAL(opline));
+ opline->opcode = ZEND_CAST;
+ opline->extended_value = IS_STRING;
+ opline->op2_type = IS_UNUSED;
+ opline->op2.var = 0;
+ } else if (opline->opcode == ZEND_CONCAT &&
+ (opline->op1_type == IS_CONST ||
+ (opline->op1_type == IS_TMP_VAR &&
+ VAR_SOURCE(opline->op1) &&
+ (VAR_SOURCE(opline->op1)->opcode == ZEND_FAST_CONCAT ||
+ VAR_SOURCE(opline->op1)->opcode == ZEND_ROPE_END ||
+ VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CONSTANT ||
+ VAR_SOURCE(opline->op1)->opcode == ZEND_FETCH_CLASS_CONSTANT))) &&
+ (opline->op2_type == IS_CONST ||
+ (opline->op2_type == IS_TMP_VAR &&
+ VAR_SOURCE(opline->op2) &&
+ (VAR_SOURCE(opline->op2)->opcode == ZEND_FAST_CONCAT ||
+ VAR_SOURCE(opline->op2)->opcode == ZEND_ROPE_END ||
+ VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CONSTANT ||
+ VAR_SOURCE(opline->op2)->opcode == ZEND_FETCH_CLASS_CONSTANT)))) {
+ opline->opcode = ZEND_FAST_CONCAT;
+ }
+ break;
+
+ case ZEND_ADD:
+ case ZEND_SUB:
+ case ZEND_MUL:
+ case ZEND_DIV:
+ case ZEND_MOD:
+ case ZEND_SL:
+ case ZEND_SR:
+ case ZEND_IS_SMALLER:
+ case ZEND_IS_SMALLER_OR_EQUAL:
+ case ZEND_IS_IDENTICAL:
+ case ZEND_IS_NOT_IDENTICAL:
+ case ZEND_BOOL_XOR:
+ case ZEND_BW_OR:
+ case ZEND_BW_AND:
+ case ZEND_BW_XOR:
+ if (opline->op1_type == IS_CONST &&
+ opline->op2_type == IS_CONST) {
+ /* evaluate constant expressions */
+ binary_op_type binary_op;
+ zval result;
+ int er;
+
+optimize_constant_binary_op:
+ binary_op = get_binary_op(opline->opcode);
+ if ((opline->opcode == ZEND_DIV || opline->opcode == ZEND_MOD) &&
+ zval_get_long(&ZEND_OP2_LITERAL(opline)) == 0) {
+ SET_VAR_SOURCE(opline);
+ opline++;
+ continue;
+ } else if ((opline->opcode == ZEND_SL || opline->opcode == ZEND_SR) &&
+ zval_get_long(&ZEND_OP2_LITERAL(opline)) < 0) {
+ SET_VAR_SOURCE(opline);
+ opline++;
+ continue;
+ } else if (zend_binary_op_produces_numeric_string_error(opline->opcode, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LITERAL(opline))) {
+ SET_VAR_SOURCE(opline);
+ opline++;
+ continue;
+ }
+ er = EG(error_reporting);
+ EG(error_reporting) = 0;
+ if (binary_op(&result, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LITERAL(opline)) == SUCCESS) {
+ literal_dtor(&ZEND_OP1_LITERAL(opline));
+ literal_dtor(&ZEND_OP2_LITERAL(opline));
+ opline->opcode = ZEND_QM_ASSIGN;
+ SET_UNUSED(opline->op2);
+ zend_optimizer_update_op1_const(op_array, opline, &result);
+ }
+ EG(error_reporting) = er;
+ }
+ break;
+
+ case ZEND_BW_NOT:
+ if (opline->op1_type == IS_CONST) {
+ /* evaluate constant unary ops */
+ unary_op_type unary_op;
+ zval result;
+
+optimize_const_unary_op:
+ unary_op = get_unary_op(opline->opcode);
+ if (unary_op) {
+ unary_op(&result, &ZEND_OP1_LITERAL(opline));
+ literal_dtor(&ZEND_OP1_LITERAL(opline));
+ } else {
+ /* BOOL */
+ result = ZEND_OP1_LITERAL(opline);
+ convert_to_boolean(&result);
+ ZVAL_NULL(&ZEND_OP1_LITERAL(opline));
+ }
+ opline->opcode = ZEND_QM_ASSIGN;
+ zend_optimizer_update_op1_const(op_array, opline, &result);
+ }
+ break;
+
+ case ZEND_RETURN:
+ case ZEND_EXIT:
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
+ src = VAR_SOURCE(opline->op1);
+ if (src && src->opcode == ZEND_QM_ASSIGN) {
+ /* T = QM_ASSIGN(X), RETURN(T) to NOP, RETURN(X) */
+ VAR_SOURCE(opline->op1) = NULL;
+ COPY_NODE(opline->op1, src->op1);
+ MAKE_NOP(src);
+ }
+ }
+ break;
+
+ case ZEND_QM_ASSIGN:
+ if (opline->op1_type == opline->result_type &&
+ opline->op1.var == opline->result.var) {
+ /* strip T = QM_ASSIGN(T) */
+ MAKE_NOP(opline);
+ }
+ break;
}
+
/* get variable source */
- if (RESULT_USED(opline)) {
+ if (opline->result_type & (IS_VAR|IS_TMP_VAR)) {
SET_VAR_SOURCE(opline);
}
- if (opline->opcode != ZEND_NOP) {
- last_op = opline;
- }
opline++;
}
- strip_nop(block, ctx);
+ strip_nops(op_array, block);
}
/* Rebuild plain (optimized) op_array from CFG */
static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array)
{
- zend_code_block *blocks = cfg->blocks;
- zend_op *new_opcodes = emalloc(op_array->last * sizeof(zend_op));
- zend_op *opline = new_opcodes;
- zend_code_block *cur_block = blocks;
+ zend_basic_block *blocks = cfg->blocks;
+ zend_basic_block *end = blocks + cfg->blocks_count;
+ zend_basic_block *b;
+ zend_op *new_opcodes;
+ zend_op *opline;
+ uint32_t len = 0;
+ int n;
- /* Copy code of reachable blocks into a single buffer */
- while (cur_block) {
- if (cur_block->access) {
- memcpy(opline, cur_block->start_opline, cur_block->len * sizeof(zend_op));
- cur_block->start_opline = opline;
- opline += cur_block->len;
- if ((opline - 1)->opcode == ZEND_JMP) {
- zend_code_block *next;
- next = cur_block->next;
- while (next && !next->access) {
- next = next->next;
+ for (b = blocks; b < end; b++) {
+ if (b->len == 0) {
+ continue;
+ }
+ if (b->flags & ZEND_BB_REACHABLE) {
+ opline = op_array->opcodes + b->start + b->len - 1;
+ if (opline->opcode == ZEND_JMP) {
+ zend_basic_block *next = b + 1;
+
+ while (next < end && !(next->flags & ZEND_BB_REACHABLE)) {
+ next++;
}
- if (next && next == cur_block->op1_to) {
+ if (next < end && next == blocks + b->successors[0]) {
/* JMP to the next block - strip it */
- cur_block->follow_to = cur_block->op1_to;
- cur_block->op1_to = NULL;
- MAKE_NOP((opline - 1));
- opline--;
- cur_block->len--;
+ MAKE_NOP(opline);
+ b->len--;
}
+ } else if (b->len == 1 && opline->opcode == ZEND_NOP) {
+ /* skip empty block */
+ b->len--;
}
+ len += b->len;
} else {
/* this block will not be used, delete all constants there */
- zend_op *_opl;
- zend_op *end = cur_block->start_opline + cur_block->len;
- for (_opl = cur_block->start_opline; _opl && _opl < end; _opl++) {
- if (ZEND_OP1_TYPE(_opl) == IS_CONST) {
- literal_dtor(&ZEND_OP1_LITERAL(_opl));
+ zend_op *op = op_array->opcodes + b->start;
+ zend_op *end = op + b->len;
+ for (; op < end; op++) {
+ if (ZEND_OP1_TYPE(op) == IS_CONST) {
+ literal_dtor(&ZEND_OP1_LITERAL(op));
}
- if (ZEND_OP2_TYPE(_opl) == IS_CONST) {
- literal_dtor(&ZEND_OP2_LITERAL(_opl));
+ if (ZEND_OP2_TYPE(op) == IS_CONST) {
+ literal_dtor(&ZEND_OP2_LITERAL(op));
}
}
}
- cur_block = cur_block->next;
}
- op_array->last = opline-new_opcodes;
+ new_opcodes = emalloc(len * sizeof(zend_op));
+ opline = new_opcodes;
+
+ /* Copy code of reachable blocks into a single buffer */
+ for (b = blocks; b < end; b++) {
+ if (b->flags & ZEND_BB_REACHABLE) {
+ memcpy(opline, op_array->opcodes + b->start, b->len * sizeof(zend_op));
+ b->start = opline - new_opcodes;
+ opline += b->len;
+ }
+ }
+
+ /* adjust jump targets */
+ efree(op_array->opcodes);
+ op_array->opcodes = new_opcodes;
+ op_array->last = len;
+
+ for (b = blocks; b < end; b++) {
+ if (!(b->flags & ZEND_BB_REACHABLE) || b->len == 0) {
+ continue;
+ }
+ opline = op_array->opcodes + b->start + b->len - 1;
+ switch (opline->opcode) {
+ case ZEND_FAST_CALL:
+ case ZEND_JMP:
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op1, new_opcodes + blocks[b->successors[0]].start);
+ break;
+ case ZEND_JMPZNZ:
+ opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[1]].start);
+ /* break missing intentionally */
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ case ZEND_ASSERT_CHECK:
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, new_opcodes + blocks[b->successors[0]].start);
+ break;
+ case ZEND_CATCH:
+ if (!opline->result.var) {
+ opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[0]].start);
+ }
+ break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[0]].start);
+ break;
+ }
+ }
- /* adjust exception jump targets */
+ /* adjust exception jump targets & remove unused try_catch_array entries */
if (op_array->last_try_catch) {
int i, j;
+ uint32_t *map;
+ ALLOCA_FLAG(use_heap);
+
+ map = (uint32_t *)do_alloca(sizeof(uint32_t) * op_array->last_try_catch, use_heap);
for (i = 0, j = 0; i< op_array->last_try_catch; i++) {
- if (cfg->try[i]->access) {
- op_array->try_catch_array[j].try_op = cfg->try[i]->start_opline - new_opcodes;
- op_array->try_catch_array[j].catch_op = cfg->catch[i]->start_opline - new_opcodes;
+ if (blocks[cfg->map[op_array->try_catch_array[i].try_op]].flags & ZEND_BB_REACHABLE) {
+ map[i] = j;
+ op_array->try_catch_array[j].try_op = blocks[cfg->map[op_array->try_catch_array[i].try_op]].start;
+ if (op_array->try_catch_array[i].catch_op) {
+ op_array->try_catch_array[j].catch_op = blocks[cfg->map[op_array->try_catch_array[i].catch_op]].start;
+ } else {
+ op_array->try_catch_array[j].catch_op = 0;
+ }
+ if (op_array->try_catch_array[i].finally_op) {
+ op_array->try_catch_array[j].finally_op = blocks[cfg->map[op_array->try_catch_array[i].finally_op]].start;
+ } else {
+ op_array->try_catch_array[j].finally_op = 0;
+ }
+ if (!op_array->try_catch_array[i].finally_end) {
+ op_array->try_catch_array[j].finally_end = 0;
+ } else {
+ op_array->try_catch_array[j].finally_end = blocks[cfg->map[op_array->try_catch_array[i].finally_end]].start;
+ }
j++;
}
}
- op_array->last_try_catch = j;
- }
-
- /* adjust loop jump targets */
- if (op_array->last_brk_cont) {
- int i;
- for (i = 0; i< op_array->last_brk_cont; i++) {
- op_array->brk_cont_array[i].start = cfg->loop_start[i]->start_opline - new_opcodes;
- op_array->brk_cont_array[i].cont = cfg->loop_cont[i]->start_opline - new_opcodes;
- op_array->brk_cont_array[i].brk = cfg->loop_brk[i]->start_opline - new_opcodes;
+ if (i != j) {
+ op_array->last_try_catch = j;
+ if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
+ zend_op *opline = new_opcodes;
+ zend_op *end = opline + len;
+ while (opline < end) {
+ if (opline->opcode == ZEND_FAST_RET &&
+ opline->op2.num != (uint32_t)-1 &&
+ opline->op2.num < (uint32_t)j) {
+ opline->op2.num = map[opline->op2.num];
+ }
+ opline++;
+ }
+ }
}
+ free_alloca(map, use_heap);
}
- /* adjust jump targets */
- for (cur_block = blocks; cur_block; cur_block = cur_block->next) {
- if (!cur_block->access) {
- continue;
- }
- opline = cur_block->start_opline + cur_block->len - 1;
- if (opline->opcode == ZEND_OP_DATA) {
- opline--;
- }
- if (cur_block->op1_to) {
- ZEND_OP1(opline).opline_num = cur_block->op1_to->start_opline - new_opcodes;
- }
- if (cur_block->op2_to) {
- ZEND_OP2(opline).opline_num = cur_block->op2_to->start_opline - new_opcodes;
+ /* adjust loop jump targets & remove unused live range entries */
+ if (op_array->last_live_range) {
+ int i, j;
+ uint32_t *map;
+ ALLOCA_FLAG(use_heap);
+
+ map = (uint32_t *)do_alloca(sizeof(uint32_t) * op_array->last_live_range, use_heap);
+
+ for (i = 0, j = 0; i < op_array->last_live_range; i++) {
+ if (op_array->live_range[i].var == (uint32_t)-1) {
+ /* this live range already removed */
+ continue;
+ }
+ if (!(blocks[cfg->map[op_array->live_range[i].start]].flags & ZEND_BB_REACHABLE)) {
+ ZEND_ASSERT(!(blocks[cfg->map[op_array->live_range[i].end]].flags & ZEND_BB_REACHABLE));
+ } else {
+ uint32_t start_op = blocks[cfg->map[op_array->live_range[i].start]].start;
+ uint32_t end_op = blocks[cfg->map[op_array->live_range[i].end]].start;
+
+ if (start_op == end_op) {
+ /* skip empty live range */
+ continue;
+ }
+ op_array->live_range[i].start = start_op;
+ op_array->live_range[i].end = end_op;
+ map[i] = j;
+ if (i != j) {
+ op_array->live_range[j] = op_array->live_range[i];
+ }
+ j++;
+ }
}
- if (cur_block->ext_to) {
- opline->extended_value = cur_block->ext_to->start_opline - new_opcodes;
+
+ if (i != j) {
+ if ((op_array->last_live_range = j)) {
+ zend_op *opline = new_opcodes;
+ zend_op *end = opline + len;
+ while (opline != end) {
+ if ((opline->opcode == ZEND_FREE || opline->opcode == ZEND_FE_FREE) &&
+ opline->extended_value == ZEND_FREE_ON_RETURN) {
+ ZEND_ASSERT(opline->op2.num < (uint32_t) i);
+ opline->op2.num = map[opline->op2.num];
+ }
+ opline++;
+ }
+ } else {
+ efree(op_array->live_range);
+ op_array->live_range = NULL;
+ }
}
- print_block(cur_block, new_opcodes, "Out ");
+ free_alloca(map, use_heap);
}
- efree(op_array->opcodes);
- op_array->opcodes = erealloc(new_opcodes, op_array->last * sizeof(zend_op));
/* adjust early binding list */
if (op_array->early_binding != (uint32_t)-1) {
@@ -1244,45 +979,56 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array)
}
*opline_num = -1;
}
+
+ /* rebuild map (just for printing) */
+ memset(cfg->map, -1, sizeof(int) * op_array->last);
+ for (n = 0; n < cfg->blocks_count; n++) {
+ if (cfg->blocks[n].flags & ZEND_BB_REACHABLE) {
+ cfg->map[cfg->blocks[n].start] = n;
+ }
+ }
}
-static void zend_jmp_optimization(zend_code_block *block, zend_op_array *op_array, zend_code_block *blocks, zend_cfg *cfg, zend_optimizer_ctx *ctx)
+static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_array, zend_cfg *cfg, zend_uchar *same_t)
{
/* last_op is the last opcode of the current block */
- zend_op *last_op = (block->start_opline + block->len - 1);
+ zend_basic_block *blocks = cfg->blocks;
+ zend_op *last_op;
- if (!block->len) {
+ if (block->len == 0) {
return;
}
+
+ last_op = op_array->opcodes + block->start + block->len - 1;
switch (last_op->opcode) {
case ZEND_JMP:
{
- zend_op *target = block->op1_to->start_opline;
- zend_code_block *next = block->next;
+ zend_basic_block *target_block = blocks + block->successors[0];
+ zend_op *target = op_array->opcodes + target_block->start;
+ int next = (block - blocks) + 1;
- while (next && !next->access) {
+ while (next < cfg->blocks_count && !(blocks[next].flags & ZEND_BB_REACHABLE)) {
/* find used one */
- next = next->next;
+ next++;
}
/* JMP(next) -> NOP */
- if (block->op1_to == next) {
- block->follow_to = block->op1_to;
- block->op1_to = NULL;
+ if (block->successors[0] == next) {
MAKE_NOP(last_op);
block->len--;
- if (block->len == 0) {
- /* this block is nothing but NOP now */
- delete_code_block(block, ctx);
- }
break;
}
- if (((target->opcode == ZEND_JMP &&
- block->op1_to != block->op1_to->op1_to) ||
- target->opcode == ZEND_JMPZNZ) &&
- !block->op1_to->protected) {
+ if (target->opcode == ZEND_JMP &&
+ block->successors[0] != target_block->successors[0] &&
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMP L, L: JMP L1 -> JMP L1 */
+ *last_op = *target;
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == ZEND_JMPZNZ &&
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMP L, L: JMPZNZ L1,L2 -> JMPZNZ L1,L2 */
*last_op = *target;
if (ZEND_OP1_TYPE(last_op) == IS_CONST) {
@@ -1290,25 +1036,15 @@ static void zend_jmp_optimization(zend_code_block *block, zend_op_array *op_arra
zval_copy_ctor(&zv);
last_op->op1.constant = zend_optimizer_add_literal(op_array, &zv);
}
- del_source(block, block->op1_to);
- if (block->op1_to->op2_to) {
- block->op2_to = block->op1_to->op2_to;
- ADD_SOURCE(block, block->op2_to);
- }
- if (block->op1_to->ext_to) {
- block->ext_to = block->op1_to->ext_to;
- ADD_SOURCE(block, block->ext_to);
- }
- if (block->op1_to->op1_to) {
- block->op1_to = block->op1_to->op1_to;
- ADD_SOURCE(block, block->op1_to);
- } else {
- block->op1_to = NULL;
- }
- } else if (target->opcode == ZEND_RETURN ||
- target->opcode == ZEND_RETURN_BY_REF ||
- target->opcode == ZEND_FAST_RET ||
- target->opcode == ZEND_EXIT) {
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ block->successors[1] = target_block->successors[1];
+ ADD_SOURCE(block, block->successors[0]);
+ ADD_SOURCE(block, block->successors[1]);
+ } else if ((target->opcode == ZEND_RETURN ||
+ target->opcode == ZEND_RETURN_BY_REF ||
+ target->opcode == ZEND_EXIT) &&
+ !(op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
/* JMP L, L: RETURN to immediate RETURN */
*last_op = *target;
if (ZEND_OP1_TYPE(last_op) == IS_CONST) {
@@ -1316,8 +1052,8 @@ static void zend_jmp_optimization(zend_code_block *block, zend_op_array *op_arra
zval_copy_ctor(&zv);
last_op->op1.constant = zend_optimizer_add_literal(op_array, &zv);
}
- del_source(block, block->op1_to);
- block->op1_to = NULL;
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = -1;
#if 0
/* Temporarily disabled - see bug #0025274 */
} else if (0&& block->op1_to != block &&
@@ -1350,7 +1086,7 @@ static void zend_jmp_optimization(zend_code_block *block, zend_op_array *op_arra
next = next->follow_to;
}
if (can_reorder) {
- zend_code_block *prev = blocks;
+ zend_basic_block *prev = blocks;
while (prev->next != block->op1_to) {
prev = prev->next;
@@ -1389,159 +1125,135 @@ static void zend_jmp_optimization(zend_code_block *block, zend_op_array *op_arra
if (should_jmp) {
/* JMPNZ(true) -> JMP */
last_op->opcode = ZEND_JMP;
- COPY_NODE(last_op->op1, last_op->op2);
- block->op1_to = block->op2_to;
- del_source(block, block->follow_to);
- block->op2_to = NULL;
- block->follow_to = NULL;
+ DEL_SOURCE(block, block->successors[1]);
+ block->successors[1] = -1;
} else {
/* JMPNZ(false) -> NOP */
MAKE_NOP(last_op);
- del_source(block, block->op2_to);
- block->op2_to = NULL;
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = block->successors[1];
+ block->successors[1] = -1;
}
break;
}
- if (block->op2_to == block->follow_to) {
- /* L: JMPZ(X, L+1) -> NOP or FREE(X) */
-
- if (last_op->op1_type == IS_VAR) {
- zend_op **Tsource = cfg->Tsource;
- zend_op *src = VAR_SOURCE(last_op->op1);
+ if (block->successors[0] == block->successors[1]) {
+ /* L: JMP[N]Z(X, L+1) -> NOP or FREE(X) */
- if (src &&
- src->opcode != ZEND_FETCH_R &&
- src->opcode != ZEND_FETCH_DIM_R &&
- src->opcode != ZEND_FETCH_OBJ_R) {
- ZEND_RESULT_TYPE(src) |= EXT_TYPE_UNUSED;
- MAKE_NOP(last_op);
- block->op2_to = NULL;
- break;
- }
- }
if (last_op->op1_type & (IS_VAR|IS_TMP_VAR)) {
last_op->opcode = ZEND_FREE;
last_op->op2.num = 0;
- block->op2_to = NULL;
} else {
MAKE_NOP(last_op);
- block->op2_to = NULL;
}
+ block->successors[1] = -1;
break;
}
- if (block->op2_to) {
+ if (1) {
zend_uchar same_type = ZEND_OP1_TYPE(last_op);
uint32_t same_var = VAR_NUM_EX(last_op->op1);
zend_op *target;
zend_op *target_end;
- zend_code_block *target_block = block->op2_to;;
+ zend_basic_block *target_block = blocks + block->successors[0];
next_target:
- target = target_block->start_opline;
- target_end = target_block->start_opline + target_block->len;
+ target = op_array->opcodes + target_block->start;
+ target_end = target + target_block->len;
while (target < target_end && target->opcode == ZEND_NOP) {
target++;
}
/* next block is only NOP's */
if (target == target_end) {
- target_block = target_block->follow_to;
+ target_block = blocks + target_block->successors[0];
goto next_target;
} else if (target->opcode == INV_COND(last_op->opcode) &&
/* JMPZ(X, L), L: JMPNZ(X, L2) -> JMPZ(X, L+1) */
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
same_type == ZEND_OP1_TYPE(target) &&
same_var == VAR_NUM_EX(target->op1) &&
- target_block->follow_to &&
- !target_block->protected
+ !(target_block->flags & ZEND_BB_PROTECTED)
) {
- del_source(block, block->op2_to);
- block->op2_to = target_block->follow_to;
- ADD_SOURCE(block, block->op2_to);
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[1];
+ ADD_SOURCE(block, block->successors[0]);
} else if (target->opcode == INV_COND_EX(last_op->opcode) &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
same_type == ZEND_OP1_TYPE(target) &&
same_var == VAR_NUM_EX(target->op1) &&
- target_block->follow_to &&
- !target_block->protected) {
- /* JMPZ(X, L), L: X = JMPNZ_EX(X, L2) -> JMPZ(X, L+1) */
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
+ /* JMPZ(X, L), L: T = JMPNZ_EX(X, L2) -> T = JMPZ_EX(X, L+1) */
last_op->opcode += 3;
- last_op->result = target->result;
- del_source(block, block->op2_to);
- block->op2_to = target_block->follow_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op2_to &&
- target->opcode == last_op->opcode &&
+ COPY_NODE(last_op->result, target->result);
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[1];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == last_op->opcode &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
same_type == ZEND_OP1_TYPE(target) &&
same_var == VAR_NUM_EX(target->op1) &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMPZ(X, L), L: JMPZ(X, L2) -> JMPZ(X, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op2_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op1_to &&
- target->opcode == ZEND_JMP &&
- !target_block->protected) {
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == ZEND_JMP &&
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMPZ(X, L), L: JMP(L2) -> JMPZ(X, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op1_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op2_to &&
- target_block->ext_to &&
- target->opcode == ZEND_JMPZNZ &&
- (ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
- same_type == ZEND_OP1_TYPE(target) &&
- same_var == VAR_NUM_EX(target->op1) &&
- !target_block->protected) {
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == ZEND_JMPZNZ &&
+ (ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
+ same_type == ZEND_OP1_TYPE(target) &&
+ same_var == VAR_NUM_EX(target->op1) &&
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMPZ(X, L), L: JMPZNZ(X, L2, L3) -> JMPZ(X, L2) */
- del_source(block, block->op2_to);
+ DEL_SOURCE(block, block->successors[0]);
if (last_op->opcode == ZEND_JMPZ) {
- block->op2_to = target_block->op2_to;
+ block->successors[0] = target_block->successors[0];
} else {
- block->op2_to = target_block->ext_to;
+ block->successors[0] = target_block->successors[1];
}
- ADD_SOURCE(block, block->op2_to);
+ ADD_SOURCE(block, block->successors[0]);
}
}
- if (block->follow_to &&
- (last_op->opcode == ZEND_JMPZ || last_op->opcode == ZEND_JMPNZ)) {
+ if (last_op->opcode == ZEND_JMPZ || last_op->opcode == ZEND_JMPNZ) {
zend_op *target;
zend_op *target_end;
+ zend_basic_block *target_block;
while (1) {
- target = block->follow_to->start_opline;
- target_end = block->follow_to->start_opline + block->follow_to->len;
+ target_block = blocks + block->successors[1];
+ target = op_array->opcodes + target_block->start;
+ target_end = op_array->opcodes + target_block->start + 1;
while (target < target_end && target->opcode == ZEND_NOP) {
target++;
}
/* next block is only NOP's */
- if (target == target_end && ! block->follow_to->protected) {
- del_source(block, block->follow_to);
- block->follow_to = block->follow_to->follow_to;
- ADD_SOURCE(block, block->follow_to);
+ if (target == target_end && !(target_block->flags & ZEND_BB_PROTECTED)) {
+ DEL_SOURCE(block, block->successors[1]);
+ block->successors[1] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[1]);
} else {
break;
}
}
/* JMPZ(X,L1), JMP(L2) -> JMPZNZ(X,L1,L2) */
if (target->opcode == ZEND_JMP &&
- block->follow_to->op1_to &&
- !block->follow_to->protected) {
- del_source(block, block->follow_to);
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
+ DEL_SOURCE(block, block->successors[1]);
if (last_op->opcode == ZEND_JMPZ) {
- block->ext_to = block->follow_to->op1_to;
- ADD_SOURCE(block, block->ext_to);
+ block->successors[1] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[1]);
} else {
- block->ext_to = block->op2_to;
- block->op2_to = block->follow_to->op1_to;
- ADD_SOURCE(block, block->op2_to);
+ block->successors[1] = block->successors[0];
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
}
- block->follow_to = NULL;
last_op->opcode = ZEND_JMPZNZ;
}
}
@@ -1562,207 +1274,182 @@ next_target:
*/
last_op->opcode = ZEND_QM_ASSIGN;
SET_UNUSED(last_op->op2);
- del_source(block, block->op2_to);
- block->op2_to = NULL;
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = block->successors[1];
+ block->successors[1] = -1;
}
break;
}
- if (block->op2_to) {
+ if (1) {
zend_op *target, *target_end;
- char *same_t=NULL;
- zend_code_block *target_block;
+ zend_basic_block *target_block;
int var_num = op_array->last_var + op_array->T;
if (var_num <= 0) {
return;
}
- same_t = cfg->same_t;
memset(same_t, 0, var_num);
same_t[VAR_NUM_EX(last_op->op1)] |= ZEND_OP1_TYPE(last_op);
same_t[VAR_NUM_EX(last_op->result)] |= ZEND_RESULT_TYPE(last_op);
- target_block = block->op2_to;
+ target_block = blocks + block->successors[0];
next_target_ex:
- target = target_block->start_opline;
- target_end = target_block->start_opline + target_block->len;
+ target = op_array->opcodes + target_block->start;
+ target_end = target + target_block->len;
while (target < target_end && target->opcode == ZEND_NOP) {
target++;
}
/* next block is only NOP's */
if (target == target_end) {
- target_block = target_block->follow_to;
+ target_block = blocks + target_block->successors[0];
goto next_target_ex;
- } else if (target_block->op2_to &&
- target->opcode == last_op->opcode-3 &&
+ } else if (target->opcode == last_op->opcode-3 &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
(same_t[VAR_NUM_EX(target->op1)] & ZEND_OP1_TYPE(target)) != 0 &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* T = JMPZ_EX(X, L1), L1: JMPZ({X|T}, L2) -> T = JMPZ_EX(X, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op2_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op2_to &&
- target->opcode == INV_EX_COND(last_op->opcode) &&
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == INV_EX_COND(last_op->opcode) &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
(same_t[VAR_NUM_EX(target->op1)] & ZEND_OP1_TYPE(target)) != 0 &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* T = JMPZ_EX(X, L1), L1: JMPNZ({X|T1}, L2) -> T = JMPZ_EX(X, L1+1) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->follow_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op2_to &&
- target->opcode == INV_EX_COND_EX(last_op->opcode) &&
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[1];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == INV_EX_COND_EX(last_op->opcode) &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
(same_t[VAR_NUM_EX(target->op1)] & ZEND_OP1_TYPE(target)) != 0 &&
(same_t[VAR_NUM_EX(target->result)] & ZEND_RESULT_TYPE(target)) != 0 &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* T = JMPZ_EX(X, L1), L1: T = JMPNZ_EX(T, L2) -> T = JMPZ_EX(X, L1+1) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->follow_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op2_to &&
- target->opcode == last_op->opcode &&
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[1];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == last_op->opcode &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
(same_t[VAR_NUM_EX(target->op1)] & ZEND_OP1_TYPE(target)) != 0 &&
(same_t[VAR_NUM_EX(target->result)] & ZEND_RESULT_TYPE(target)) != 0 &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* T = JMPZ_EX(X, L1), L1: T = JMPZ({X|T}, L2) -> T = JMPZ_EX(X, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op2_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op1_to &&
- target->opcode == ZEND_JMP &&
- !target_block->protected) {
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == ZEND_JMP &&
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* T = JMPZ_EX(X, L), L: JMP(L2) -> T = JMPZ(X, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op1_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op2_to &&
- target_block->ext_to &&
- target->opcode == ZEND_JMPZNZ &&
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == ZEND_JMPZNZ &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
(same_t[VAR_NUM_EX(target->op1)] & ZEND_OP1_TYPE(target)) != 0 &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* T = JMPZ_EX(X, L), L: JMPZNZ({X|T}, L2, L3) -> T = JMPZ_EX(X, L2) */
- del_source(block, block->op2_to);
+ DEL_SOURCE(block, block->successors[0]);
if (last_op->opcode == ZEND_JMPZ_EX) {
- block->op2_to = target_block->op2_to;
+ block->successors[0] = target_block->successors[0];
} else {
- block->op2_to = target_block->ext_to;
+ block->successors[0] = target_block->successors[1];
}
- ADD_SOURCE(block, block->op2_to);
+ ADD_SOURCE(block, block->successors[0]);
}
}
break;
case ZEND_JMPZNZ: {
- zend_code_block *next = block->next;
+ int next = (block - blocks) + 1;
- while (next && !next->access) {
+ while (next < cfg->blocks_count && !(blocks[next].flags & ZEND_BB_REACHABLE)) {
/* find first accessed one */
- next = next->next;
+ next++;
}
if (ZEND_OP1_TYPE(last_op) == IS_CONST) {
if (!zend_is_true(&ZEND_OP1_LITERAL(last_op))) {
/* JMPZNZ(false,L1,L2) -> JMP(L1) */
- zend_code_block *todel;
-
literal_dtor(&ZEND_OP1_LITERAL(last_op));
last_op->opcode = ZEND_JMP;
SET_UNUSED(last_op->op1);
SET_UNUSED(last_op->op2);
- block->op1_to = block->op2_to;
- todel = block->ext_to;
- block->op2_to = NULL;
- block->ext_to = NULL;
- del_source(block, todel);
+ DEL_SOURCE(block, block->successors[1]);
+ block->successors[1] = -1;
} else {
/* JMPZNZ(true,L1,L2) -> JMP(L2) */
- zend_code_block *todel;
-
literal_dtor(&ZEND_OP1_LITERAL(last_op));
last_op->opcode = ZEND_JMP;
SET_UNUSED(last_op->op1);
SET_UNUSED(last_op->op2);
- block->op1_to = block->ext_to;
- todel = block->op2_to;
- block->op2_to = NULL;
- block->ext_to = NULL;
- del_source(block, todel);
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = block->successors[1];
+ block->successors[1] = -1;
}
- } else if (block->op2_to == block->ext_to) {
+ } else if (block->successors[0] == block->successors[1]) {
/* both goto the same one - it's JMP */
if (!(last_op->op1_type & (IS_VAR|IS_TMP_VAR))) {
/* JMPZNZ(?,L,L) -> JMP(L) */
last_op->opcode = ZEND_JMP;
SET_UNUSED(last_op->op1);
SET_UNUSED(last_op->op2);
- block->op1_to = block->op2_to;
- block->op2_to = NULL;
- block->ext_to = NULL;
+ block->successors[1] = -1;
}
- } else if (block->op2_to == next) {
+ } else if (block->successors[0] == next) {
/* jumping to next on Z - can follow to it and jump only on NZ */
/* JMPZNZ(X,L1,L2) L1: -> JMPNZ(X,L2) */
last_op->opcode = ZEND_JMPNZ;
- block->op2_to = block->ext_to;
- block->follow_to = next;
- block->ext_to = NULL;
- /* no need to add source - it's block->op2_to */
- } else if (block->ext_to == next) {
+ block->successors[0] = block->successors[1];
+ block->successors[1] = next;
+ /* no need to add source */
+ } else if (block->successors[1] == next) {
/* jumping to next on NZ - can follow to it and jump only on Z */
/* JMPZNZ(X,L1,L2) L2: -> JMPZ(X,L1) */
last_op->opcode = ZEND_JMPZ;
- block->follow_to = next;
- block->ext_to = NULL;
- /* no need to add source - it's block->ext_to */
+ /* no need to add source */
}
- if (last_op->opcode == ZEND_JMPZNZ && block->op2_to) {
+ if (last_op->opcode == ZEND_JMPZNZ) {
zend_uchar same_type = ZEND_OP1_TYPE(last_op);
zend_uchar same_var = VAR_NUM_EX(last_op->op1);
zend_op *target;
zend_op *target_end;
- zend_code_block *target_block = block->op2_to;
+ zend_basic_block *target_block = blocks + block->successors[0];
next_target_znz:
- target = target_block->start_opline;
- target_end = target_block->start_opline + target_block->len;
+ target = op_array->opcodes + target_block->start;
+ target_end = target + target_block->len;
while (target < target_end && target->opcode == ZEND_NOP) {
target++;
}
/* next block is only NOP's */
if (target == target_end) {
- target_block = target_block->follow_to;
+ target_block = blocks + target_block->successors[0];
goto next_target_znz;
- } else if (target_block->op2_to &&
- (target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) &&
+ } else if ((target->opcode == ZEND_JMPZ || target->opcode == ZEND_JMPZNZ) &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
same_type == ZEND_OP1_TYPE(target) &&
same_var == VAR_NUM_EX(target->op1) &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMPZNZ(X, L1, L2), L1: JMPZ(X, L3) -> JMPZNZ(X, L3, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op2_to;
- ADD_SOURCE(block, block->op2_to);
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
} else if (target->opcode == ZEND_JMPNZ &&
(ZEND_OP1_TYPE(target) & (IS_TMP_VAR|IS_CV)) &&
same_type == ZEND_OP1_TYPE(target) &&
same_var == VAR_NUM_EX(target->op1) &&
- target_block->follow_to &&
- !target_block->protected) {
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMPZNZ(X, L1, L2), L1: X = JMPNZ(X, L3) -> JMPZNZ(X, L1+1, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->follow_to;
- ADD_SOURCE(block, block->op2_to);
- } else if (target_block->op1_to &&
- target->opcode == ZEND_JMP &&
- !target_block->protected) {
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[1];
+ ADD_SOURCE(block, block->successors[0]);
+ } else if (target->opcode == ZEND_JMP &&
+ !(target_block->flags & ZEND_BB_PROTECTED)) {
/* JMPZNZ(X, L1, L2), L1: JMP(L3) -> JMPZNZ(X, L3, L2) */
- del_source(block, block->op2_to);
- block->op2_to = target_block->op1_to;
- ADD_SOURCE(block, block->op2_to);
+ DEL_SOURCE(block, block->successors[0]);
+ block->successors[0] = target_block->successors[0];
+ ADD_SOURCE(block, block->successors[0]);
}
}
break;
@@ -1772,24 +1459,19 @@ next_target_znz:
/* Global data dependencies */
-#define T_USAGE(op) do { \
- if ((op ## _type & (IS_VAR | IS_TMP_VAR)) && \
- !defined_here[VAR_NUM(op.var)] && !used_ext[VAR_NUM(op.var)]) { \
- used_ext[VAR_NUM(op.var)] = 1; \
- } \
- } while (0)
-
-#define NEVER_USED(op) ((op ## _type & (IS_VAR | IS_TMP_VAR)) && !usage[VAR_NUM(op.var)]) /* !used_ext[op.var] && */
-#define RES_NEVER_USED(opline) (opline->result_type == IS_UNUSED || NEVER_USED(opline->result))
-
/* Find a set of variables which are used outside of the block where they are
* defined. We won't apply some optimization patterns for such variables. */
-static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *used_ext, zend_optimizer_ctx *ctx)
+static void zend_t_usage(zend_cfg *cfg, zend_op_array *op_array, zend_bitset used_ext, zend_optimizer_ctx *ctx)
{
- zend_code_block *next_block = block->next;
- char *usage;
- char *defined_here;
+ int n;
+ zend_basic_block *block, *next_block;
+ uint32_t var_num;
+ uint32_t bitset_len;
+ zend_bitset usage;
+ zend_bitset defined_here;
void *checkpoint;
+ zend_op *opline, *end;
+
if (op_array->T == 0) {
/* shortcut - if no Ts, nothing to do */
@@ -1797,206 +1479,338 @@ static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *
}
checkpoint = zend_arena_checkpoint(ctx->arena);
- usage = zend_arena_alloc(&ctx->arena, op_array->last_var + op_array->T);
- memset(usage, 0, op_array->last_var + op_array->T);
- defined_here = zend_arena_alloc(&ctx->arena, op_array->last_var + op_array->T);
+ bitset_len = zend_bitset_len(op_array->last_var + op_array->T);
+ defined_here = zend_arena_alloc(&ctx->arena, bitset_len * ZEND_BITSET_ELM_SIZE);
- while (next_block) {
- zend_op *opline = next_block->start_opline;
- zend_op *end = opline + next_block->len;
+ zend_bitset_clear(defined_here, bitset_len);
+ for (n = 1; n < cfg->blocks_count; n++) {
+ block = cfg->blocks + n;
- if (!next_block->access) {
- next_block = next_block->next;
+ if (!(block->flags & ZEND_BB_REACHABLE)) {
continue;
}
- memset(defined_here, 0, op_array->last_var + op_array->T);
+
+ opline = op_array->opcodes + block->start;
+ end = opline + block->len;
+ if (!(block->flags & ZEND_BB_FOLLOW) ||
+ (block->flags & ZEND_BB_TARGET)) {
+ /* Skip continuation of "extended" BB */
+ zend_bitset_clear(defined_here, bitset_len);
+ }
while (opline<end) {
- T_USAGE(opline->op1);
- if (opline->op2_type & (IS_VAR | IS_TMP_VAR)) {
- if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) {
+ if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
+ var_num = VAR_NUM(opline->op1.var);
+ if (!zend_bitset_in(defined_here, var_num)) {
+ zend_bitset_incl(used_ext, var_num);
+ }
+ }
+ if (opline->op2_type == IS_VAR) {
+ var_num = VAR_NUM(opline->op2.var);
+ if (opline->opcode == ZEND_FE_FETCH_R ||
+ opline->opcode == ZEND_FE_FETCH_RW) {
/* these opcode use the op2 as result */
- defined_here[VAR_NUM(ZEND_OP2(opline).var)] = 1;
- } else {
- T_USAGE(opline->op2);
+ zend_bitset_incl(defined_here, var_num);
+ } else if (!zend_bitset_in(defined_here, var_num)) {
+ zend_bitset_incl(used_ext, var_num);
+ }
+ } else if (opline->op2_type == IS_TMP_VAR) {
+ var_num = VAR_NUM(opline->op2.var);
+ if (!zend_bitset_in(defined_here, var_num)) {
+ zend_bitset_incl(used_ext, var_num);
}
}
- if (RESULT_USED(opline)) {
- if (!defined_here[VAR_NUM(ZEND_RESULT(opline).var)] && !used_ext[VAR_NUM(ZEND_RESULT(opline).var)] &&
- opline->opcode == ZEND_ADD_ARRAY_ELEMENT) {
- /* these opcode use the result as argument */
- used_ext[VAR_NUM(ZEND_RESULT(opline).var)] = 1;
+ if (opline->result_type == IS_VAR) {
+ var_num = VAR_NUM(opline->result.var);
+ zend_bitset_incl(defined_here, var_num);
+ } else if (opline->result_type == IS_TMP_VAR) {
+ var_num = VAR_NUM(opline->result.var);
+ switch (opline->opcode) {
+ case ZEND_ADD_ARRAY_ELEMENT:
+ case ZEND_ROPE_ADD:
+ /* these opcodes use the result as argument */
+ if (!zend_bitset_in(defined_here, var_num)) {
+ zend_bitset_incl(used_ext, var_num);
+ }
+ break;
+ default :
+ zend_bitset_incl(defined_here, var_num);
}
- defined_here[VAR_NUM(ZEND_RESULT(opline).var)] = 1;
}
opline++;
}
- next_block = next_block->next;
}
-#if DEBUG_BLOCKPASS
- {
- int i;
+ if (ctx->debug_level & ZEND_DUMP_BLOCK_PASS_VARS) {
+ int printed = 0;
+ uint32_t i;
+
for (i = op_array->last_var; i< op_array->T; i++) {
- fprintf(stderr, "T%d: %c\n", i, used_ext[i] + '0');
+ if (zend_bitset_in(used_ext, i)) {
+ if (!printed) {
+ fprintf(stderr, "NON-LOCAL-VARS: %d", i);
+ printed = 1;
+ } else {
+ fprintf(stderr, ", %d", i);
+ }
+ }
+ }
+ if (printed) {
+ fprintf(stderr, "\n");
}
}
-#endif
- while (block) {
- zend_op *opline = block->start_opline + block->len - 1;
+ usage = defined_here;
+ next_block = NULL;
+ for (n = cfg->blocks_count; n > 0;) {
+ block = cfg->blocks + (--n);
- if (!block->access) {
- block = block->next;
+ if (!(block->flags & ZEND_BB_REACHABLE) || block->len == 0) {
continue;
}
- memcpy(usage, used_ext, op_array->last_var + op_array->T);
+ end = op_array->opcodes + block->start;
+ opline = end + block->len - 1;
+ if (!next_block ||
+ !(next_block->flags & ZEND_BB_FOLLOW) ||
+ (next_block->flags & ZEND_BB_TARGET)) {
+ /* Skip continuation of "extended" BB */
+ zend_bitset_copy(usage, used_ext, bitset_len);
+ } else if (block->successors[1] != -1) {
+ zend_bitset_union(usage, used_ext, bitset_len);
+ }
+ next_block = block;
- while (opline >= block->start_opline) {
+ while (opline >= end) {
/* usage checks */
- if (RES_NEVER_USED(opline)) {
- switch (opline->opcode) {
- case ZEND_ASSIGN_ADD:
- case ZEND_ASSIGN_SUB:
- case ZEND_ASSIGN_MUL:
- case ZEND_ASSIGN_DIV:
- case ZEND_ASSIGN_MOD:
- case ZEND_ASSIGN_SL:
- case ZEND_ASSIGN_SR:
- case ZEND_ASSIGN_CONCAT:
- case ZEND_ASSIGN_BW_OR:
- case ZEND_ASSIGN_BW_AND:
- case ZEND_ASSIGN_BW_XOR:
- case ZEND_PRE_INC:
- case ZEND_PRE_DEC:
- case ZEND_POST_INC:
- case ZEND_POST_DEC:
- case ZEND_ASSIGN:
- case ZEND_ASSIGN_REF:
- case ZEND_DO_FCALL:
- case ZEND_DO_ICALL:
- case ZEND_DO_UCALL:
- case ZEND_DO_FCALL_BY_NAME:
- if (ZEND_RESULT_TYPE(opline) == IS_VAR) {
- ZEND_RESULT_TYPE(opline) |= EXT_TYPE_UNUSED;
- }
- break;
- case ZEND_QM_ASSIGN:
- case ZEND_BOOL:
- case ZEND_BOOL_NOT:
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- literal_dtor(&ZEND_OP1_LITERAL(opline));
- }
- MAKE_NOP(opline);
- break;
- case ZEND_JMPZ_EX:
- case ZEND_JMPNZ_EX:
- opline->opcode -= 3;
- SET_UNUSED(opline->result);
- break;
- }
- }
-
- if (opline->opcode == ZEND_ADD_ARRAY_ELEMENT) {
- if (ZEND_OP1_TYPE(opline) == IS_VAR || ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
- usage[VAR_NUM(ZEND_RESULT(opline).var)] = 1;
+ if (opline->result_type == IS_VAR) {
+ if (!zend_bitset_in(usage, VAR_NUM(opline->result.var))) {
+ switch (opline->opcode) {
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_POW:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_PRE_INC:
+ case ZEND_PRE_DEC:
+ case ZEND_ASSIGN:
+ case ZEND_ASSIGN_REF:
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ opline->result_type = IS_UNUSED;
+ break;
+ }
+ } else {
+ zend_bitset_excl(usage, VAR_NUM(opline->result.var));
}
- } else {
- if (RESULT_USED(opline)) {
- usage[VAR_NUM(ZEND_RESULT(opline).var)] = 0;
+ } else if (opline->result_type == IS_TMP_VAR) {
+ if (!zend_bitset_in(usage, VAR_NUM(opline->result.var))) {
+ switch (opline->opcode) {
+ case ZEND_POST_INC:
+ case ZEND_POST_DEC:
+ opline->opcode -= 2;
+ opline->result_type = IS_UNUSED;
+ break;
+ case ZEND_QM_ASSIGN:
+ case ZEND_BOOL:
+ case ZEND_BOOL_NOT:
+ if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ literal_dtor(&ZEND_OP1_LITERAL(opline));
+ } else if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
+ opline->opcode = ZEND_FREE;
+ } else {
+ MAKE_NOP(opline);
+ }
+ break;
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ opline->opcode -= 3;
+ SET_UNUSED(opline->result);
+ break;
+ case ZEND_ADD_ARRAY_ELEMENT:
+ case ZEND_ROPE_ADD:
+ zend_bitset_incl(usage, VAR_NUM(opline->result.var));
+ break;
+ }
+ } else {
+ switch (opline->opcode) {
+ case ZEND_ADD_ARRAY_ELEMENT:
+ case ZEND_ROPE_ADD:
+ break;
+ default:
+ zend_bitset_excl(usage, VAR_NUM(opline->result.var));
+ break;
+ }
}
}
- if (ZEND_OP1_TYPE(opline) == IS_VAR || ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
- usage[VAR_NUM(ZEND_OP1(opline).var)] = 1;
+ if (opline->op2_type == IS_VAR) {
+ switch (opline->opcode) {
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ zend_bitset_excl(usage, VAR_NUM(opline->op2.var));
+ break;
+ default:
+ zend_bitset_incl(usage, VAR_NUM(opline->op2.var));
+ break;
+ }
+ } else if (opline->op2_type == IS_TMP_VAR) {
+ zend_bitset_incl(usage, VAR_NUM(opline->op2.var));
}
- if (ZEND_OP2_TYPE(opline) == IS_VAR || ZEND_OP2_TYPE(opline) == IS_TMP_VAR) {
- usage[VAR_NUM(ZEND_OP2(opline).var)] = 1;
+ if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
+ zend_bitset_incl(usage, VAR_NUM(opline->op1.var));
}
- if ((ZEND_RESULT_TYPE(opline) & IS_VAR) &&
- (ZEND_RESULT_TYPE(opline) & EXT_TYPE_UNUSED) &&
- usage[VAR_NUM(ZEND_RESULT(opline).var)]) {
- ZEND_RESULT_TYPE(opline) &= ~EXT_TYPE_UNUSED;
- }
-
opline--;
}
- block = block->next;
- } /* end blocks */
+ }
zend_arena_release(&ctx->arena, checkpoint);
}
+static void zend_merge_blocks(zend_op_array *op_array, zend_cfg *cfg)
+{
+ int i;
+ zend_basic_block *b, *bb;
+ zend_basic_block *prev = NULL;
+
+ for (i = 0; i < cfg->blocks_count; i++) {
+ b = cfg->blocks + i;
+ if (b->flags & ZEND_BB_REACHABLE) {
+ if ((b->flags & ZEND_BB_FOLLOW) &&
+ !(b->flags & (ZEND_BB_TARGET | ZEND_BB_PROTECTED)) &&
+ prev &&
+ prev->successors[0] == i && prev->successors[1] == -1)
+ {
+ zend_op *last_op = op_array->opcodes + prev->start + prev->len - 1;
+ if (prev->len != 0 && last_op->opcode == ZEND_JMP) {
+ MAKE_NOP(last_op);
+ }
+
+ for (bb = prev + 1; bb != b; bb++) {
+ zend_op *op = op_array->opcodes + bb->start;
+ zend_op *end = op + bb->len;
+ while (op < end) {
+ if (ZEND_OP1_TYPE(op) == IS_CONST) {
+ literal_dtor(&ZEND_OP1_LITERAL(op));
+ }
+ if (ZEND_OP2_TYPE(op) == IS_CONST) {
+ literal_dtor(&ZEND_OP2_LITERAL(op));
+ }
+ MAKE_NOP(op);
+ op++;
+ }
+ /* make block empty */
+ bb->len = 0;
+ }
+
+ /* re-link */
+ prev->flags |= (b->flags & ZEND_BB_EXIT);
+ prev->len = b->start + b->len - prev->start;
+ prev->successors[0] = b->successors[0];
+ prev->successors[1] = b->successors[1];
+
+ /* unlink & make block empty and unreachable */
+ b->flags = 0;
+ b->len = 0;
+ b->successors[0] = -1;
+ b->successors[1] = -1;
+ } else {
+ prev = b;
+ }
+ }
+ }
+}
+
#define PASSES 3
-void optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx)
+void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx)
{
zend_cfg cfg;
- zend_code_block *cur_block;
+ zend_basic_block *blocks, *end, *b;
int pass;
- char *usage;
+ uint32_t bitset_len;
+ zend_bitset usage;
void *checkpoint;
-
-#if DEBUG_BLOCKPASS
- fprintf(stderr, "File %s func %s\n", op_array->filename, op_array->function_name? op_array->function_name : "main");
- fflush(stderr);
-#endif
-
- if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
- return;
- }
+ zend_op **Tsource;
+ zend_uchar *same_t;
/* Build CFG */
checkpoint = zend_arena_checkpoint(ctx->arena);
- if (!find_code_blocks(op_array, &cfg, ctx)) {
+ if (zend_build_cfg(&ctx->arena, op_array, ZEND_CFG_SPLIT_AT_LIVE_RANGES, &cfg, NULL) != SUCCESS) {
zend_arena_release(&ctx->arena, checkpoint);
return;
}
- zend_rebuild_access_path(&cfg, op_array, 0, ctx);
- /* full rebuild here to produce correct sources! */
+ if (ctx->debug_level & ZEND_DUMP_BEFORE_BLOCK_PASS) {
+ zend_dump_op_array(op_array, ZEND_DUMP_CFG, "before block pass", &cfg);
+ }
+
if (op_array->last_var || op_array->T) {
- cfg.Tsource = zend_arena_calloc(&ctx->arena, op_array->last_var + op_array->T, sizeof(zend_op *));
- cfg.same_t = zend_arena_alloc(&ctx->arena, op_array->last_var + op_array->T);
- usage = zend_arena_alloc(&ctx->arena, op_array->last_var + op_array->T);
+ bitset_len = zend_bitset_len(op_array->last_var + op_array->T);
+ Tsource = zend_arena_calloc(&ctx->arena, op_array->last_var + op_array->T, sizeof(zend_op *));
+ same_t = zend_arena_alloc(&ctx->arena, op_array->last_var + op_array->T);
+ usage = zend_arena_alloc(&ctx->arena, bitset_len * ZEND_BITSET_ELM_SIZE);
} else {
- cfg.Tsource = NULL;
- cfg.same_t = NULL;
+ bitset_len = 0;
+ Tsource = NULL;
+ same_t = NULL;
usage = NULL;
}
+ blocks = cfg.blocks;
+ end = blocks + cfg.blocks_count;
for (pass = 0; pass < PASSES; pass++) {
/* Compute data dependencies */
- memset(usage, 0, op_array->last_var + op_array->T);
- zend_t_usage(cfg.blocks, op_array, usage, ctx);
+ zend_bitset_clear(usage, bitset_len);
+ zend_t_usage(&cfg, op_array, usage, ctx);
/* optimize each basic block separately */
- for (cur_block = cfg.blocks; cur_block; cur_block = cur_block->next) {
- if (!cur_block->access) {
+ for (b = blocks; b < end; b++) {
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
continue;
}
- zend_optimize_block(cur_block, op_array, usage, &cfg, ctx);
+ /* we track data dependencies only insight a single basic block */
+ if (!(b->flags & ZEND_BB_FOLLOW) ||
+ (b->flags & ZEND_BB_TARGET)) {
+ /* Skip continuation of "extended" BB */
+ memset(Tsource, 0, (op_array->last_var + op_array->T) * sizeof(zend_op *));
+ }
+ zend_optimize_block(b, op_array, usage, &cfg, Tsource);
}
/* Jump optimization for each block */
- for (cur_block = cfg.blocks; cur_block; cur_block = cur_block->next) {
- if (!cur_block->access) {
- continue;
+ for (b = blocks; b < end; b++) {
+ if (b->flags & ZEND_BB_REACHABLE) {
+ zend_jmp_optimization(b, op_array, &cfg, same_t);
}
- zend_jmp_optimization(cur_block, op_array, cfg.blocks, &cfg, ctx);
}
/* Eliminate unreachable basic blocks */
- zend_rebuild_access_path(&cfg, op_array, 1, ctx);
+ zend_cfg_remark_reachable_blocks(op_array, &cfg);
+
+ /* Merge Blocks */
+ zend_merge_blocks(op_array, &cfg);
}
- memset(usage, 0, op_array->last_var + op_array->T);
- zend_t_usage(cfg.blocks, op_array, usage, ctx);
+ zend_bitset_clear(usage, bitset_len);
+ zend_t_usage(&cfg, op_array, usage, ctx);
assemble_code_blocks(&cfg, op_array);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_BLOCK_PASS) {
+ zend_dump_op_array(op_array, ZEND_DUMP_CFG | ZEND_DUMP_HIDE_UNREACHABLE, "after block pass", &cfg);
+ }
+
/* Destroy CFG */
zend_arena_release(&ctx->arena, checkpoint);
}
diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c
index 812f24fe8f..76c89fe828 100644
--- a/ext/opcache/Optimizer/compact_literals.c
+++ b/ext/opcache/Optimizer/compact_literals.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -177,52 +177,45 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
LITERAL_INFO(opline->op1.constant, LITERAL_CONST, 1, 1, 2);
break;
case ZEND_FETCH_CONSTANT:
- if (ZEND_OP1_TYPE(opline) == IS_UNUSED) {
- if ((opline->extended_value & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) {
- LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 1, 1, 5);
- } else {
- LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 1, 1, 3);
- }
+ if ((opline->extended_value & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) {
+ LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 1, 1, 5);
} else {
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- LITERAL_INFO(opline->op1.constant, LITERAL_CLASS, 1, 1, 2);
- }
+ LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 1, 1, 3);
+ }
+ break;
+ case ZEND_FETCH_CLASS_CONSTANT:
+ if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ LITERAL_INFO(opline->op1.constant, LITERAL_CLASS, 1, 1, 2);
+ }
+ optimizer_literal_class_info(
+ info,
+ opline->op1_type,
+ opline->op1,
+ opline->op2.constant,
+ LITERAL_CLASS_CONST, (ZEND_OP1_TYPE(opline) == IS_CONST) ? 1 : 2, 1,
+ op_array);
+ break;
+ case ZEND_FETCH_STATIC_PROP_R:
+ case ZEND_FETCH_STATIC_PROP_W:
+ case ZEND_FETCH_STATIC_PROP_RW:
+ case ZEND_FETCH_STATIC_PROP_IS:
+ case ZEND_FETCH_STATIC_PROP_UNSET:
+ case ZEND_FETCH_STATIC_PROP_FUNC_ARG:
+ case ZEND_UNSET_STATIC_PROP:
+ case ZEND_ISSET_ISEMPTY_STATIC_PROP:
+ if (ZEND_OP2_TYPE(opline) == IS_CONST) {
+ LITERAL_INFO(opline->op2.constant, LITERAL_CLASS, 1, 1, 2);
+ }
+ if (ZEND_OP1_TYPE(opline) == IS_CONST) {
optimizer_literal_class_info(
info,
- opline->op1_type,
- opline->op1,
- opline->op2.constant,
- LITERAL_CLASS_CONST, (ZEND_OP1_TYPE(opline) == IS_CONST) ? 1 : 2, 1,
+ opline->op2_type,
+ opline->op2,
+ opline->op1.constant,
+ LITERAL_STATIC_PROPERTY, 2, 1,
op_array);
}
break;
- case ZEND_FETCH_R:
- case ZEND_FETCH_W:
- case ZEND_FETCH_RW:
- case ZEND_FETCH_IS:
- case ZEND_FETCH_UNSET:
- case ZEND_FETCH_FUNC_ARG:
- case ZEND_UNSET_VAR:
- case ZEND_ISSET_ISEMPTY_VAR:
- if (ZEND_OP2_TYPE(opline) == IS_UNUSED) {
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 1, 0, 1);
- }
- } else {
- if (ZEND_OP2_TYPE(opline) == IS_CONST) {
- LITERAL_INFO(opline->op2.constant, LITERAL_CLASS, 1, 1, 2);
- }
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- optimizer_literal_class_info(
- info,
- opline->op2_type,
- opline->op2,
- opline->op1.constant,
- LITERAL_STATIC_PROPERTY, 2, 1,
- op_array);
- }
- }
- break;
case ZEND_FETCH_CLASS:
case ZEND_ADD_INTERFACE:
case ZEND_ADD_TRAIT:
@@ -263,6 +256,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
case ZEND_ASSIGN_SUB:
case ZEND_ASSIGN_MUL:
case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_POW:
case ZEND_ASSIGN_MOD:
case ZEND_ASSIGN_SL:
case ZEND_ASSIGN_SR:
@@ -294,7 +288,14 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
cache_size += sizeof(void *);
}
break;
+ case ZEND_DECLARE_FUNCTION:
+ case ZEND_DECLARE_CLASS:
+ case ZEND_DECLARE_INHERITED_CLASS:
+ case ZEND_DECLARE_INHERITED_CLASS_DELAYED:
+ LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 1, 0, 2);
+ break;
case ZEND_RECV:
+ case ZEND_RECV_VARIADIC:
case ZEND_VERIFY_RETURN_TYPE:
if (opline->op2.num != -1) {
opline->op2.num = cache_size;
@@ -420,13 +421,13 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
case IS_CONSTANT:
if (info[i].flags & LITERAL_MAY_MERGE) {
if (info[i].flags & LITERAL_EX_OBJ) {
- int key_len = MAX_LENGTH_OF_LONG + sizeof("->") + Z_STRLEN(op_array->literals[i]);
+ int key_len = MAX_LENGTH_OF_LONG + sizeof("->") - 1 + Z_STRLEN(op_array->literals[i]);
key = zend_string_alloc(key_len, 0);
ZSTR_LEN(key) = snprintf(ZSTR_VAL(key), ZSTR_LEN(key)-1, "%d->%s", info[i].u.num, Z_STRVAL(op_array->literals[i]));
} else if (info[i].flags & LITERAL_EX_CLASS) {
int key_len;
zval *class_name = &op_array->literals[(info[i].u.num < i) ? map[info[i].u.num] : info[i].u.num];
- key_len = Z_STRLEN_P(class_name) + sizeof("::") + Z_STRLEN(op_array->literals[i]);
+ key_len = Z_STRLEN_P(class_name) + sizeof("::") - 1 + Z_STRLEN(op_array->literals[i]);
key = zend_string_alloc(key_len, 0);
memcpy(ZSTR_VAL(key), Z_STRVAL_P(class_name), Z_STRLEN_P(class_name));
memcpy(ZSTR_VAL(key) + Z_STRLEN_P(class_name), "::", sizeof("::") - 1);
diff --git a/ext/opcache/Optimizer/dfa_pass.c b/ext/opcache/Optimizer/dfa_pass.c
new file mode 100644
index 0000000000..1b3de7e2b6
--- /dev/null
+++ b/ext/opcache/Optimizer/dfa_pass.c
@@ -0,0 +1,632 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend OPcache |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "Optimizer/zend_optimizer.h"
+#include "Optimizer/zend_optimizer_internal.h"
+#include "zend_API.h"
+#include "zend_constants.h"
+#include "zend_execute.h"
+#include "zend_vm.h"
+#include "zend_bitset.h"
+#include "zend_cfg.h"
+#include "zend_ssa.h"
+#include "zend_func_info.h"
+#include "zend_call_graph.h"
+#include "zend_inference.h"
+#include "zend_dump.h"
+
+int zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa, uint32_t *flags)
+{
+ uint32_t build_flags;
+
+ if (op_array->last_try_catch) {
+ /* TODO: we can't analyze functions with try/catch/finally ??? */
+ return FAILURE;
+ }
+
+ /* Build SSA */
+ memset(ssa, 0, sizeof(zend_ssa));
+
+ if (zend_build_cfg(&ctx->arena, op_array,
+ ZEND_CFG_NO_ENTRY_PREDECESSORS, &ssa->cfg, flags) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (*flags & ZEND_FUNC_INDIRECT_VAR_ACCESS) {
+ /* TODO: we can't analyze functions with indirect variable access ??? */
+ return FAILURE;
+ }
+
+ if (zend_cfg_build_predecessors(&ctx->arena, &ssa->cfg) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (ctx->debug_level & ZEND_DUMP_DFA_CFG) {
+ zend_dump_op_array(op_array, ZEND_DUMP_CFG, "dfa cfg", &ssa->cfg);
+ }
+
+ /* Compute Dominators Tree */
+ if (zend_cfg_compute_dominators_tree(op_array, &ssa->cfg) != SUCCESS) {
+ return FAILURE;
+ }
+
+ /* Identify reducible and irreducible loops */
+ if (zend_cfg_identify_loops(op_array, &ssa->cfg, flags) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (ctx->debug_level & ZEND_DUMP_DFA_DOMINATORS) {
+ zend_dump_dominators(op_array, &ssa->cfg);
+ }
+
+ build_flags = 0;
+ if (ctx->debug_level & ZEND_DUMP_DFA_LIVENESS) {
+ build_flags |= ZEND_SSA_DEBUG_LIVENESS;
+ }
+ if (ctx->debug_level & ZEND_DUMP_DFA_PHI) {
+ build_flags |= ZEND_SSA_DEBUG_PHI_PLACEMENT;
+ }
+ if (zend_build_ssa(&ctx->arena, op_array, build_flags, ssa, flags) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (ctx->debug_level & ZEND_DUMP_DFA_SSA) {
+ zend_dump_op_array(op_array, ZEND_DUMP_SSA, "before dfa pass", ssa);
+ }
+
+
+ if (zend_ssa_compute_use_def_chains(&ctx->arena, op_array, ssa) != SUCCESS){
+ return FAILURE;
+ }
+
+ if (zend_ssa_find_false_dependencies(op_array, ssa) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (zend_ssa_find_sccs(op_array, ssa) != SUCCESS){
+ return FAILURE;
+ }
+
+ if (zend_ssa_inference(&ctx->arena, op_array, ctx->script, ssa) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (ctx->debug_level & ZEND_DUMP_DFA_SSA_VARS) {
+ zend_dump_ssa_variables(op_array, ssa, 0);
+ }
+
+ return SUCCESS;
+}
+
+static void zend_ssa_remove_nops(zend_op_array *op_array, zend_ssa *ssa)
+{
+ zend_basic_block *blocks = ssa->cfg.blocks;
+ zend_basic_block *end = blocks + ssa->cfg.blocks_count;
+ zend_basic_block *b;
+ zend_func_info *func_info;
+ int j;
+ uint32_t i;
+ uint32_t target = 0;
+ uint32_t *shiftlist;
+ ALLOCA_FLAG(use_heap);
+
+ shiftlist = (uint32_t *)do_alloca(sizeof(uint32_t) * op_array->last, use_heap);
+ memset(shiftlist, 0, sizeof(uint32_t) * op_array->last);
+ for (b = blocks; b < end; b++) {
+ if (b->flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
+ uint32_t end;
+ if (b->flags & ZEND_BB_UNREACHABLE_FREE) {
+ /* Only keep the FREE for the loop var */
+ ZEND_ASSERT(op_array->opcodes[b->start].opcode == ZEND_FREE
+ || op_array->opcodes[b->start].opcode == ZEND_FE_FREE);
+ b->len = 1;
+ }
+
+ end = b->start + b->len;
+ i = b->start;
+ b->start = target;
+ while (i < end) {
+ shiftlist[i] = i - target;
+ if (EXPECTED(op_array->opcodes[i].opcode != ZEND_NOP) ||
+ /*keep NOP to support ZEND_VM_SMART_BRANCH */
+ (i > 0 &&
+ i + 1 < op_array->last &&
+ (op_array->opcodes[i+1].opcode == ZEND_JMPZ ||
+ op_array->opcodes[i+1].opcode == ZEND_JMPNZ) &&
+ (op_array->opcodes[i-1].opcode == ZEND_IS_IDENTICAL ||
+ op_array->opcodes[i-1].opcode == ZEND_IS_NOT_IDENTICAL ||
+ op_array->opcodes[i-1].opcode == ZEND_IS_EQUAL ||
+ op_array->opcodes[i-1].opcode == ZEND_IS_NOT_EQUAL ||
+ op_array->opcodes[i-1].opcode == ZEND_IS_SMALLER ||
+ op_array->opcodes[i-1].opcode == ZEND_IS_SMALLER_OR_EQUAL ||
+ op_array->opcodes[i-1].opcode == ZEND_CASE ||
+ op_array->opcodes[i-1].opcode == ZEND_ISSET_ISEMPTY_VAR ||
+ op_array->opcodes[i-1].opcode == ZEND_ISSET_ISEMPTY_STATIC_PROP ||
+ op_array->opcodes[i-1].opcode == ZEND_ISSET_ISEMPTY_DIM_OBJ ||
+ op_array->opcodes[i-1].opcode == ZEND_ISSET_ISEMPTY_PROP_OBJ ||
+ op_array->opcodes[i-1].opcode == ZEND_INSTANCEOF ||
+ op_array->opcodes[i-1].opcode == ZEND_TYPE_CHECK ||
+ op_array->opcodes[i-1].opcode == ZEND_DEFINED))) {
+ if (i != target) {
+ op_array->opcodes[target] = op_array->opcodes[i];
+ ssa->ops[target] = ssa->ops[i];
+ }
+ target++;
+ }
+ i++;
+ }
+ if (target != end && b->len != 0) {
+ zend_op *opline;
+ zend_op *new_opline;
+
+ opline = op_array->opcodes + end - 1;
+ b->len = target - b->start;
+ new_opline = op_array->opcodes + target - 1;
+ switch (new_opline->opcode) {
+ case ZEND_JMP:
+ case ZEND_FAST_CALL:
+ ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op1, ZEND_OP1_JMP_ADDR(opline));
+ break;
+ case ZEND_JMPZNZ:
+ new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ /* break missing intentionally */
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ case ZEND_ASSERT_CHECK:
+ ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op2, ZEND_OP2_JMP_ADDR(opline));
+ break;
+ case ZEND_CATCH:
+ if (!opline->result.num) {
+ new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ }
+ break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ break;
+ }
+ }
+ }
+ }
+
+ if (target != op_array->last) {
+ /* reset rest opcodes */
+ for (i = target; i < op_array->last; i++) {
+ MAKE_NOP(op_array->opcodes + i);
+ }
+
+ /* update SSA variables */
+ for (j = 0; j < ssa->vars_count; j++) {
+ if (ssa->vars[j].definition >= 0) {
+ ssa->vars[j].definition -= shiftlist[ssa->vars[j].definition];
+ }
+ if (ssa->vars[j].use_chain >= 0) {
+ ssa->vars[j].use_chain -= shiftlist[ssa->vars[j].use_chain];
+ }
+ }
+ for (i = 0; i < op_array->last; i++) {
+ if (ssa->ops[i].op1_use_chain >= 0) {
+ ssa->ops[i].op1_use_chain -= shiftlist[ssa->ops[i].op1_use_chain];
+ }
+ if (ssa->ops[i].op2_use_chain >= 0) {
+ ssa->ops[i].op2_use_chain -= shiftlist[ssa->ops[i].op2_use_chain];
+ }
+ if (ssa->ops[i].res_use_chain >= 0) {
+ ssa->ops[i].res_use_chain -= shiftlist[ssa->ops[i].res_use_chain];
+ }
+ }
+
+ /* update branch targets */
+ for (b = blocks; b < end; b++) {
+ if ((b->flags & ZEND_BB_REACHABLE) && b->len != 0) {
+ zend_op *opline = op_array->opcodes + b->start + b->len - 1;
+
+ switch (opline->opcode) {
+ case ZEND_JMP:
+ case ZEND_FAST_CALL:
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op1, ZEND_OP1_JMP_ADDR(opline) - shiftlist[ZEND_OP1_JMP_ADDR(opline) - op_array->opcodes]);
+ break;
+ case ZEND_JMPZNZ:
+ opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
+ /* break missing intentionally */
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ case ZEND_ASSERT_CHECK:
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP2_JMP_ADDR(opline) - shiftlist[ZEND_OP2_JMP_ADDR(opline) - op_array->opcodes]);
+ break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ case ZEND_CATCH:
+ opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
+ break;
+ }
+ }
+ }
+
+ /* update brk/cont array */
+ for (j = 0; j < op_array->last_live_range; j++) {
+ op_array->live_range[j].start -= shiftlist[op_array->live_range[j].start];
+ op_array->live_range[j].end -= shiftlist[op_array->live_range[j].end];
+ }
+
+ /* update try/catch array */
+ for (j = 0; j < op_array->last_try_catch; j++) {
+ op_array->try_catch_array[j].try_op -= shiftlist[op_array->try_catch_array[j].try_op];
+ op_array->try_catch_array[j].catch_op -= shiftlist[op_array->try_catch_array[j].catch_op];
+ if (op_array->try_catch_array[j].finally_op) {
+ op_array->try_catch_array[j].finally_op -= shiftlist[op_array->try_catch_array[j].finally_op];
+ op_array->try_catch_array[j].finally_end -= shiftlist[op_array->try_catch_array[j].finally_end];
+ }
+ }
+
+ /* update early binding list */
+ if (op_array->early_binding != (uint32_t)-1) {
+ uint32_t *opline_num = &op_array->early_binding;
+
+ do {
+ *opline_num -= shiftlist[*opline_num];
+ opline_num = &ZEND_RESULT(&op_array->opcodes[*opline_num]).opline_num;
+ } while (*opline_num != (uint32_t)-1);
+ }
+
+ /* update call graph */
+ func_info = ZEND_FUNC_INFO(op_array);
+ if (func_info) {
+ zend_call_info *call_info = func_info->callee_info;
+ while (call_info) {
+ call_info->caller_init_opline -=
+ shiftlist[call_info->caller_init_opline - op_array->opcodes];
+ call_info->caller_call_opline -=
+ shiftlist[call_info->caller_call_opline - op_array->opcodes];
+ call_info = call_info->next_callee;
+ }
+ }
+
+ op_array->last = target;
+ }
+ free_alloca(shiftlist, use_heap);
+}
+
+static inline zend_bool can_elide_return_type_check(
+ zend_op_array *op_array, zend_ssa *ssa, zend_ssa_op *ssa_op) {
+ zend_arg_info *info = &op_array->arg_info[-1];
+ zend_ssa_var_info *use_info = &ssa->var_info[ssa_op->op1_use];
+ zend_ssa_var_info *def_info = &ssa->var_info[ssa_op->op1_def];
+
+ /* A type is possible that is not in the allowed types */
+ if ((use_info->type & (MAY_BE_ANY|MAY_BE_UNDEF)) & ~(def_info->type & MAY_BE_ANY)) {
+ return 0;
+ }
+
+ if (info->type_hint == IS_CALLABLE) {
+ return 0;
+ }
+
+ if (info->class_name) {
+ if (!use_info->ce || !def_info->ce || !instanceof_function(use_info->ce, def_info->ce)) {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa)
+{
+ if (ctx->debug_level & ZEND_DUMP_BEFORE_DFA_PASS) {
+ zend_dump_op_array(op_array, ZEND_DUMP_SSA, "before dfa pass", ssa);
+ }
+
+ if (ssa->var_info) {
+ int op_1;
+ int v;
+ int remove_nops = 0;
+ zend_op *opline;
+ zval tmp;
+
+ for (v = op_array->last_var; v < ssa->vars_count; v++) {
+
+ op_1 = ssa->vars[v].definition;
+
+ if (op_1 < 0) {
+ continue;
+ }
+
+ opline = op_array->opcodes + op_1;
+
+ /* Convert LONG constants to DOUBLE */
+ if (ssa->var_info[v].use_as_double) {
+ if (opline->opcode == ZEND_ASSIGN
+ && opline->op2_type == IS_CONST
+ && ssa->ops[op_1].op1_def == v
+ && !RETURN_VALUE_USED(opline)
+ ) {
+
+// op_1: ASSIGN ? -> #v [use_as_double], long(?) => ASSIGN ? -> #v, double(?)
+
+ zval *zv = CT_CONSTANT_EX(op_array, opline->op2.constant);
+ ZEND_ASSERT(Z_TYPE_INFO_P(zv) == IS_LONG);
+ ZVAL_DOUBLE(&tmp, zval_get_double(zv));
+ opline->op2.constant = zend_optimizer_add_literal(op_array, &tmp);
+
+ } else if (opline->opcode == ZEND_QM_ASSIGN
+ && opline->op1_type == IS_CONST
+ ) {
+
+// op_1: QM_ASSIGN #v [use_as_double], long(?) => QM_ASSIGN #v, double(?)
+
+ zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant);
+ ZEND_ASSERT(Z_TYPE_INFO_P(zv) == IS_LONG);
+ ZVAL_DOUBLE(&tmp, zval_get_double(zv));
+ opline->op1.constant = zend_optimizer_add_literal(op_array, &tmp);
+ }
+
+ } else {
+ if (opline->opcode == ZEND_ADD
+ || opline->opcode == ZEND_SUB
+ || opline->opcode == ZEND_MUL
+ || opline->opcode == ZEND_IS_EQUAL
+ || opline->opcode == ZEND_IS_NOT_EQUAL
+ || opline->opcode == ZEND_IS_SMALLER
+ || opline->opcode == ZEND_IS_SMALLER_OR_EQUAL
+ ) {
+
+ if (opline->op1_type == IS_CONST
+ && opline->op2_type != IS_CONST
+ && (OP2_INFO() & MAY_BE_ANY) == MAY_BE_DOUBLE
+ && Z_TYPE_INFO_P(CT_CONSTANT_EX(op_array, opline->op1.constant)) == IS_LONG
+ ) {
+
+// op_1: #v.? = ADD long(?), #?.? [double] => #v.? = ADD double(?), #?.? [double]
+
+ zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant);
+ ZVAL_DOUBLE(&tmp, zval_get_double(zv));
+ opline->op1.constant = zend_optimizer_add_literal(op_array, &tmp);
+
+ } else if (opline->op1_type != IS_CONST
+ && opline->op2_type == IS_CONST
+ && (OP1_INFO() & MAY_BE_ANY) == MAY_BE_DOUBLE
+ && Z_TYPE_INFO_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG
+ ) {
+
+// op_1: #v.? = ADD #?.? [double], long(?) => #v.? = ADD #?.? [double], double(?)
+
+ zval *zv = CT_CONSTANT_EX(op_array, opline->op2.constant);
+ ZVAL_DOUBLE(&tmp, zval_get_double(zv));
+ opline->op2.constant = zend_optimizer_add_literal(op_array, &tmp);
+ }
+ }
+ }
+
+ if (ssa->vars[v].var >= op_array->last_var) {
+ /* skip TMP and VAR */
+ continue;
+ }
+
+ if (opline->opcode == ZEND_ASSIGN
+ && ssa->ops[op_1].op1_def == v
+ && !RETURN_VALUE_USED(opline)
+ ) {
+ int orig_var = ssa->ops[op_1].op1_use;
+
+ if (orig_var >= 0
+ && !(ssa->var_info[orig_var].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))
+ ) {
+
+ int src_var = ssa->ops[op_1].op2_use;
+
+ if ((opline->op2_type & (IS_TMP_VAR|IS_VAR))
+ && src_var >= 0
+ && !(ssa->var_info[src_var].type & MAY_BE_REF)
+ && ssa->vars[src_var].definition >= 0
+ && ssa->ops[ssa->vars[src_var].definition].result_def == src_var
+ && ssa->ops[ssa->vars[src_var].definition].result_use < 0
+ && ssa->vars[src_var].use_chain == op_1
+ && ssa->ops[op_1].op2_use_chain < 0
+ && !ssa->vars[src_var].phi_use_chain
+ && !ssa->vars[src_var].sym_use_chain
+ /* see Zend/tests/generators/aborted_yield_during_new.phpt */
+ && op_array->opcodes[ssa->vars[src_var].definition].opcode != ZEND_NEW
+ ) {
+
+ int op_2 = ssa->vars[src_var].definition;
+
+// op_2: #src_var.T = OP ... => #v.CV = OP ...
+// op_1: ASSIGN #orig_var.CV [undef,scalar] -> #v.CV, #src_var.T NOP
+
+ if (zend_ssa_unlink_use_chain(ssa, op_1, orig_var)) {
+ /* Reconstruct SSA */
+ ssa->vars[v].definition = op_2;
+ ssa->ops[op_2].result_def = v;
+
+ ssa->vars[src_var].definition = -1;
+ ssa->vars[src_var].use_chain = -1;
+
+ ssa->ops[op_1].op1_use = -1;
+ ssa->ops[op_1].op2_use = -1;
+ ssa->ops[op_1].op1_def = -1;
+ ssa->ops[op_1].op1_use_chain = -1;
+
+ /* Update opcodes */
+ op_array->opcodes[op_2].result_type = opline->op1_type;
+ op_array->opcodes[op_2].result.var = opline->op1.var;
+ MAKE_NOP(opline);
+ remove_nops = 1;
+ }
+ } else if (opline->op2_type == IS_CONST
+ || ((opline->op2_type & (IS_TMP_VAR|IS_VAR|IS_CV))
+ && ssa->ops[op_1].op2_use >= 0
+ && ssa->ops[op_1].op2_def < 0)
+ ) {
+
+// op_1: ASSIGN #orig_var.CV [undef,scalar] -> #v.CV, CONST|TMPVAR => QM_ASSIGN v.CV, CONST|TMPVAR
+
+ if (zend_ssa_unlink_use_chain(ssa, op_1, orig_var)) {
+ /* Reconstruct SSA */
+ ssa->ops[op_1].result_def = v;
+ ssa->ops[op_1].op1_def = -1;
+ ssa->ops[op_1].op1_use = ssa->ops[op_1].op2_use;
+ ssa->ops[op_1].op1_use_chain = ssa->ops[op_1].op2_use_chain;
+ ssa->ops[op_1].op2_use = -1;
+ ssa->ops[op_1].op2_use_chain = -1;
+
+ /* Update opcode */
+ opline->result_type = opline->op1_type;
+ opline->result.var = opline->op1.var;
+ opline->op1_type = opline->op2_type;
+ opline->op1.var = opline->op2.var;
+ opline->op2_type = IS_UNUSED;
+ opline->op2.var = 0;
+ opline->opcode = ZEND_QM_ASSIGN;
+ }
+ }
+ }
+
+ } else if (opline->opcode == ZEND_ASSIGN_ADD
+ && opline->extended_value == 0
+ && ssa->ops[op_1].op1_def == v
+ && opline->op2_type == IS_CONST
+ && Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG
+ && Z_LVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == 1
+ && ssa->ops[op_1].op1_use >= 0
+ && !(ssa->var_info[ssa->ops[op_1].op1_use].type & (MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) {
+
+// op_1: ASSIGN_ADD #?.CV [undef,null,int,foat] ->#v.CV, int(1) => PRE_INC #?.CV ->#v.CV
+
+ opline->opcode = ZEND_PRE_INC;
+ SET_UNUSED(opline->op2);
+
+ } else if (opline->opcode == ZEND_ASSIGN_SUB
+ && opline->extended_value == 0
+ && ssa->ops[op_1].op1_def == v
+ && opline->op2_type == IS_CONST
+ && Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG
+ && Z_LVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == 1
+ && ssa->ops[op_1].op1_use >= 0
+ && !(ssa->var_info[ssa->ops[op_1].op1_use].type & (MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))) {
+
+// op_1: ASSIGN_SUB #?.CV [undef,null,int,foat] -> #v.CV, int(1) => PRE_DEC #?.CV ->#v.CV
+
+ opline->opcode = ZEND_PRE_DEC;
+ SET_UNUSED(opline->op2);
+
+ } else if (opline->opcode == ZEND_VERIFY_RETURN_TYPE
+ && ssa->ops[op_1].op1_def == v
+ && ssa->ops[op_1].op1_use >= 0
+ && ssa->ops[op_1].op1_use_chain == -1
+ && ssa->vars[v].use_chain >= 0
+ && can_elide_return_type_check(op_array, ssa, &ssa->ops[op_1])) {
+
+// op_1: VERIFY_RETURN_TYPE #orig_var.CV [T] -> #v.CV [T] => NOP
+
+ int orig_var = ssa->ops[op_1].op1_use;
+ int ret = ssa->vars[v].use_chain;
+
+ ssa->vars[orig_var].use_chain = ret;
+ ssa->ops[ret].op1_use = orig_var;
+
+ ssa->vars[v].definition = -1;
+ ssa->vars[v].use_chain = -1;
+
+ ssa->ops[op_1].op1_def = -1;
+ ssa->ops[op_1].op1_use = -1;
+
+ MAKE_NOP(opline);
+ remove_nops = 1;
+
+ } else if (ssa->ops[op_1].op1_def == v
+ && !RETURN_VALUE_USED(opline)
+ && ssa->ops[op_1].op1_use >= 0
+ && !(ssa->var_info[ssa->ops[op_1].op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))
+ && (opline->opcode == ZEND_ASSIGN_ADD
+ || opline->opcode == ZEND_ASSIGN_SUB
+ || opline->opcode == ZEND_ASSIGN_MUL
+ || opline->opcode == ZEND_ASSIGN_DIV
+ || opline->opcode == ZEND_ASSIGN_MOD
+ || opline->opcode == ZEND_ASSIGN_SL
+ || opline->opcode == ZEND_ASSIGN_SR
+ || opline->opcode == ZEND_ASSIGN_BW_OR
+ || opline->opcode == ZEND_ASSIGN_BW_AND
+ || opline->opcode == ZEND_ASSIGN_BW_XOR)
+ && opline->extended_value == 0) {
+
+// op_1: ASSIGN_ADD #orig_var.CV [undef,null,bool,int,double] -> #v.CV, ? => #v.CV = ADD #orig_var.CV, ?
+
+ /* Reconstruct SSA */
+ ssa->ops[op_1].result_def = ssa->ops[op_1].op1_def;
+ ssa->ops[op_1].op1_def = -1;
+
+ /* Update opcode */
+ opline->opcode -= (ZEND_ASSIGN_ADD - ZEND_ADD);
+ opline->result_type = opline->op1_type;
+ opline->result.var = opline->op1.var;
+
+ }
+ }
+
+ if (remove_nops) {
+ zend_ssa_remove_nops(op_array, ssa);
+ }
+ }
+
+ if (ctx->debug_level & ZEND_DUMP_AFTER_DFA_PASS) {
+ zend_dump_op_array(op_array, ZEND_DUMP_SSA, "after dfa pass", ssa);
+ }
+}
+
+void zend_optimize_dfa(zend_op_array *op_array, zend_optimizer_ctx *ctx)
+{
+ void *checkpoint = zend_arena_checkpoint(ctx->arena);
+ uint32_t flags = 0;
+ zend_ssa ssa;
+
+ if (zend_dfa_analyze_op_array(op_array, ctx, &ssa, &flags) != SUCCESS) {
+ zend_arena_release(&ctx->arena, checkpoint);
+ return;
+ }
+
+ zend_dfa_optimize_op_array(op_array, ctx, &ssa);
+
+ /* Destroy SSA */
+ zend_arena_release(&ctx->arena, checkpoint);
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/nop_removal.c b/ext/opcache/Optimizer/nop_removal.c
index 20510b4163..3ebbdad8cf 100644
--- a/ext/opcache/Optimizer/nop_removal.c
+++ b/ext/opcache/Optimizer/nop_removal.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,23 +39,15 @@ void zend_optimizer_nop_removal(zend_op_array *op_array)
uint32_t *shiftlist;
ALLOCA_FLAG(use_heap);
- shiftlist = (uint32_t *)DO_ALLOCA(sizeof(uint32_t) * op_array->last);
+ shiftlist = (uint32_t *)do_alloca(sizeof(uint32_t) * op_array->last, use_heap);
i = new_count = shift = 0;
end = op_array->opcodes + op_array->last;
for (opline = op_array->opcodes; opline < end; opline++) {
- /* GOTO target is unresolved yet. We can't optimize. */
- if (opline->opcode == ZEND_GOTO &&
- Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_LONG) {
- /* TODO: in general we can avoid this restriction */
- FREE_ALLOCA(shiftlist);
- return;
- }
-
/* Kill JMP-over-NOP-s */
- if (opline->opcode == ZEND_JMP && ZEND_OP1(opline).opline_num > i) {
+ if (opline->opcode == ZEND_JMP && ZEND_OP1_JMP_ADDR(opline) > op_array->opcodes + i) {
/* check if there are only NOPs under the branch */
- zend_op *target = op_array->opcodes + ZEND_OP1(opline).opline_num - 1;
+ zend_op *target = ZEND_OP1_JMP_ADDR(opline) - 1;
while (target->opcode == ZEND_NOP) {
target--;
@@ -71,7 +63,40 @@ void zend_optimizer_nop_removal(zend_op_array *op_array)
shift++;
} else {
if (shift) {
- op_array->opcodes[new_count] = *opline;
+ zend_op *new_opline = op_array->opcodes + new_count;
+
+ *new_opline = *opline;
+ switch (new_opline->opcode) {
+ case ZEND_JMP:
+ case ZEND_FAST_CALL:
+ ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op1, ZEND_OP1_JMP_ADDR(opline));
+ break;
+ case ZEND_JMPZNZ:
+ new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ /* break missing intentionally */
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ case ZEND_ASSERT_CHECK:
+ ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op2, ZEND_OP2_JMP_ADDR(opline));
+ break;
+ case ZEND_CATCH:
+ if (!opline->result.num) {
+ new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ }
+ break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ break;
+ }
}
new_count++;
}
@@ -85,43 +110,37 @@ void zend_optimizer_nop_removal(zend_op_array *op_array)
for (opline = op_array->opcodes; opline<end; opline++) {
switch (opline->opcode) {
case ZEND_JMP:
- case ZEND_GOTO:
case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
- ZEND_OP1(opline).opline_num -= shiftlist[ZEND_OP1(opline).opline_num];
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op1, ZEND_OP1_JMP_ADDR(opline) - shiftlist[ZEND_OP1_JMP_ADDR(opline) - op_array->opcodes]);
break;
+ case ZEND_JMPZNZ:
+ opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
+ /* break missing intentionally */
case ZEND_JMPZ:
case ZEND_JMPNZ:
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
case ZEND_FE_RESET_R:
case ZEND_FE_RESET_RW:
- case ZEND_NEW:
case ZEND_JMP_SET:
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
- ZEND_OP2(opline).opline_num -= shiftlist[ZEND_OP2(opline).opline_num];
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP2_JMP_ADDR(opline) - shiftlist[ZEND_OP2_JMP_ADDR(opline) - op_array->opcodes]);
break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
- opline->extended_value -= shiftlist[opline->extended_value];
- break;
- case ZEND_JMPZNZ:
- ZEND_OP2(opline).opline_num -= shiftlist[ZEND_OP2(opline).opline_num];
- opline->extended_value -= shiftlist[opline->extended_value];
- break;
case ZEND_CATCH:
- opline->extended_value -= shiftlist[opline->extended_value];
+ opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) - shiftlist[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
break;
}
}
/* update brk/cont array */
- for (j = 0; j < op_array->last_brk_cont; j++) {
- op_array->brk_cont_array[j].brk -= shiftlist[op_array->brk_cont_array[j].brk];
- op_array->brk_cont_array[j].cont -= shiftlist[op_array->brk_cont_array[j].cont];
- op_array->brk_cont_array[j].start -= shiftlist[op_array->brk_cont_array[j].start];
+ for (j = 0; j < op_array->last_live_range; j++) {
+ op_array->live_range[j].start -= shiftlist[op_array->live_range[j].start];
+ op_array->live_range[j].end -= shiftlist[op_array->live_range[j].end];
}
/* update try/catch array */
@@ -144,5 +163,5 @@ void zend_optimizer_nop_removal(zend_op_array *op_array)
} while (*opline_num != (uint32_t)-1);
}
}
- FREE_ALLOCA(shiftlist);
+ free_alloca(shiftlist, use_heap);
}
diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c
index c82df24c58..75120d2501 100644
--- a/ext/opcache/Optimizer/optimize_func_calls.c
+++ b/ext/opcache/Optimizer/optimize_func_calls.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,6 +29,9 @@
#include "zend_execute.h"
#include "zend_vm.h"
+#define ZEND_OP1_IS_CONST_STRING(opline) \
+ (ZEND_OP1_TYPE(opline) == IS_CONST && \
+ Z_TYPE(op_array->literals[(opline)->op1.constant]) == IS_STRING)
#define ZEND_OP2_IS_CONST_STRING(opline) \
(ZEND_OP2_TYPE(opline) == IS_CONST && \
Z_TYPE(op_array->literals[(opline)->op2.constant]) == IS_STRING)
@@ -38,7 +41,7 @@ typedef struct _optimizer_call_info {
zend_op *opline;
} optimizer_call_info;
-void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
+void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
{
zend_op *opline = op_array->opcodes;
zend_op *end = opline + op_array->last;
@@ -56,19 +59,13 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
switch (opline->opcode) {
case ZEND_INIT_FCALL_BY_NAME:
case ZEND_INIT_NS_FCALL_BY_NAME:
- if (ZEND_OP2_IS_CONST_STRING(opline)) {
- zend_function *func;
- zval *function_name = &op_array->literals[opline->op2.constant + 1];
- if ((func = zend_hash_find_ptr(&ctx->script->function_table,
- Z_STR_P(function_name))) != NULL) {
- call_stack[call].func = func;
- }
- }
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ case ZEND_INIT_METHOD_CALL:
+ call_stack[call].func = zend_optimizer_get_called_func(
+ ctx->script, op_array, opline, 0);
/* break missing intentionally */
case ZEND_NEW:
case ZEND_INIT_DYNAMIC_CALL:
- case ZEND_INIT_METHOD_CALL:
- case ZEND_INIT_STATIC_METHOD_CALL:
case ZEND_INIT_FCALL:
case ZEND_INIT_USER_CALL:
call_stack[call].opline = opline;
@@ -88,7 +85,7 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
Z_CACHE_SLOT(op_array->literals[fcall->op2.constant + 1]) = Z_CACHE_SLOT(op_array->literals[fcall->op2.constant]);
literal_dtor(&ZEND_OP2_LITERAL(fcall));
fcall->op2.constant = fcall->op2.constant + 1;
- opline->opcode = zend_get_call_op(ZEND_INIT_FCALL, call_stack[call].func);
+ opline->opcode = zend_get_call_op(fcall, call_stack[call].func);
} else if (fcall->opcode == ZEND_INIT_NS_FCALL_BY_NAME) {
fcall->opcode = ZEND_INIT_FCALL;
fcall->op1.num = zend_vm_calc_used_stack(fcall->extended_value, call_stack[call].func);
@@ -96,7 +93,10 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
literal_dtor(&op_array->literals[fcall->op2.constant]);
literal_dtor(&op_array->literals[fcall->op2.constant + 2]);
fcall->op2.constant = fcall->op2.constant + 1;
- opline->opcode = zend_get_call_op(ZEND_INIT_FCALL, call_stack[call].func);
+ opline->opcode = zend_get_call_op(fcall, call_stack[call].func);
+ } else if (fcall->opcode == ZEND_INIT_STATIC_METHOD_CALL
+ || fcall->opcode == ZEND_INIT_METHOD_CALL) {
+ /* We don't have specialized opcodes for this, do nothing */
} else {
ZEND_ASSERT(0);
}
@@ -105,15 +105,24 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
call_stack[call].opline = NULL;
break;
case ZEND_FETCH_FUNC_ARG:
+ case ZEND_FETCH_STATIC_PROP_FUNC_ARG:
case ZEND_FETCH_OBJ_FUNC_ARG:
case ZEND_FETCH_DIM_FUNC_ARG:
if (call_stack[call - 1].func) {
if (ARG_SHOULD_BE_SENT_BY_REF(call_stack[call - 1].func, (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
opline->extended_value &= ZEND_FETCH_TYPE_MASK;
- opline->opcode -= 9;
+ if (opline->opcode != ZEND_FETCH_STATIC_PROP_FUNC_ARG) {
+ opline->opcode -= 9;
+ } else {
+ opline->opcode = ZEND_FETCH_STATIC_PROP_W;
+ }
} else {
opline->extended_value &= ZEND_FETCH_TYPE_MASK;
- opline->opcode -= 12;
+ if (opline->opcode != ZEND_FETCH_STATIC_PROP_FUNC_ARG) {
+ opline->opcode -= 12;
+ } else {
+ opline->opcode = ZEND_FETCH_STATIC_PROP_R;
+ }
}
}
break;
@@ -136,19 +145,20 @@ void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
}
}
break;
- case ZEND_SEND_VAR_NO_REF:
- if (!(opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) && call_stack[call - 1].func) {
- if (ARG_SHOULD_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) {
- opline->extended_value |= ZEND_ARG_COMPILE_TIME_BOUND | ZEND_ARG_SEND_BY_REF;
+ case ZEND_SEND_VAR_NO_REF_EX:
+ if (call_stack[call - 1].func) {
+ if (ARG_MUST_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) {
+ opline->opcode = ZEND_SEND_VAR_NO_REF;
+ } else if (ARG_MAY_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) {
+ opline->opcode = ZEND_SEND_VAL;
} else {
opline->opcode = ZEND_SEND_VAR;
- opline->extended_value = 0;
}
}
break;
#if 0
case ZEND_SEND_REF:
- if (opline->extended_value != ZEND_ARG_COMPILE_TIME_BOUND && call_stack[call - 1].func) {
+ if (call_stack[call - 1].func) {
/* We won't handle run-time pass by reference */
call_stack[call - 1].opline = NULL;
}
diff --git a/ext/opcache/Optimizer/optimize_temp_vars_5.c b/ext/opcache/Optimizer/optimize_temp_vars_5.c
index 77b4d66f94..f0e5747dc6 100644
--- a/ext/opcache/Optimizer/optimize_temp_vars_5.c
+++ b/ext/opcache/Optimizer/optimize_temp_vars_5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,25 +26,27 @@
#include "zend_constants.h"
#include "zend_execute.h"
#include "zend_vm.h"
-
-#define GET_AVAILABLE_T() \
- for (i = 0; i < T; i++) { \
- if (!taken_T[i]) { \
- break; \
- } \
- } \
- taken_T[i] = 1; \
- if (i > max) { \
- max = i; \
+#include "zend_bitset.h"
+
+#define GET_AVAILABLE_T() \
+ for (i = 0; i < T; i++) { \
+ if (!zend_bitset_in(taken_T, i)) { \
+ break; \
+ } \
+ } \
+ zend_bitset_incl(taken_T, i); \
+ if (i > max) { \
+ max = i; \
}
-void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx)
+void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx)
{
int T = op_array->T;
int offset = op_array->last_var;
- char *taken_T; /* T index in use */
+ uint32_t bitset_len;
+ zend_bitset taken_T; /* T index in use */
zend_op **start_of_T; /* opline where T is first used */
- char *valid_T; /* Is the map_T valid */
+ zend_bitset valid_T; /* Is the map_T valid */
int *map_T; /* Map's the T to its new index */
zend_op *opline, *end;
int currT;
@@ -53,9 +55,10 @@ void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *c
int var_to_free = -1;
void *checkpoint = zend_arena_checkpoint(ctx->arena);
- taken_T = (char *) zend_arena_alloc(&ctx->arena, T);
+ bitset_len = zend_bitset_len(T);
+ taken_T = (zend_bitset) zend_arena_alloc(&ctx->arena, bitset_len * ZEND_BITSET_ELM_SIZE);
start_of_T = (zend_op **) zend_arena_alloc(&ctx->arena, T * sizeof(zend_op *));
- valid_T = (char *) zend_arena_alloc(&ctx->arena, T);
+ valid_T = (zend_bitset) zend_arena_alloc(&ctx->arena, bitset_len * ZEND_BITSET_ELM_SIZE);
map_T = (int *) zend_arena_alloc(&ctx->arena, T * sizeof(int));
end = op_array->opcodes;
@@ -69,91 +72,93 @@ void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *c
opline--;
}
- memset(valid_T, 0, T);
- memset(taken_T, 0, T);
+ zend_bitset_clear(valid_T, bitset_len);
+ zend_bitset_clear(taken_T, bitset_len);
end = op_array->opcodes;
opline = &op_array->opcodes[op_array->last - 1];
while (opline >= end) {
if ((ZEND_OP1_TYPE(opline) & (IS_VAR | IS_TMP_VAR))) {
-
currT = VAR_NUM(ZEND_OP1(opline).var) - offset;
if (opline->opcode == ZEND_ROPE_END) {
int num = (((opline->extended_value + 1) * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval);
int var;
var = max;
- while (var >= 0 && !taken_T[var]) {
+ while (var >= 0 && !zend_bitset_in(taken_T, var)) {
var--;
}
max = MAX(max, var + num);
var = var + 1;
map_T[currT] = var;
- valid_T[currT] = 1;
- taken_T[var] = 1;
+ zend_bitset_incl(valid_T, currT);
+ zend_bitset_incl(taken_T, var);
ZEND_OP1(opline).var = NUM_VAR(var + offset);
while (num > 1) {
num--;
- taken_T[var + num] = 1;
+ zend_bitset_incl(taken_T, var + num);
}
} else {
- if (!valid_T[currT]) {
- GET_AVAILABLE_T();
+ if (!zend_bitset_in(valid_T, currT)) {
+ int use_new_var = 0;
+
+ /* Code in "finally" blocks may modify temorary variables.
+ * We allocate new temporaries for values that need to
+ * relive FAST_CALLs.
+ */
+ if ((op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) &&
+ (opline->opcode == ZEND_RETURN ||
+ opline->opcode == ZEND_RETURN_BY_REF ||
+ opline->opcode == ZEND_FREE ||
+ opline->opcode == ZEND_FE_FREE)) {
+ zend_op *curr = opline;
+
+ while (--curr >= end) {
+ if (curr->opcode == ZEND_FAST_CALL) {
+ use_new_var = 1;
+ break;
+ } else if (curr->opcode != ZEND_FREE &&
+ curr->opcode != ZEND_FE_FREE &&
+ curr->opcode != ZEND_VERIFY_RETURN_TYPE &&
+ curr->opcode != ZEND_DISCARD_EXCEPTION) {
+ break;
+ }
+ }
+ }
+ if (use_new_var) {
+ i = ++max;
+ zend_bitset_incl(taken_T, i);
+ } else {
+ GET_AVAILABLE_T();
+ }
map_T[currT] = i;
- valid_T[currT] = 1;
+ zend_bitset_incl(valid_T, currT);
}
ZEND_OP1(opline).var = NUM_VAR(map_T[currT] + offset);
}
}
- /* Skip OP_DATA */
- if (opline->opcode == ZEND_OP_DATA &&
- (opline-1)->opcode == ZEND_ASSIGN_DIM) {
- opline--;
- continue;
- }
-
if ((ZEND_OP2_TYPE(opline) & (IS_VAR | IS_TMP_VAR))) {
currT = VAR_NUM(ZEND_OP2(opline).var) - offset;
- if (!valid_T[currT]) {
+ if (!zend_bitset_in(valid_T, currT)) {
GET_AVAILABLE_T();
map_T[currT] = i;
- valid_T[currT] = 1;
+ zend_bitset_incl(valid_T, currT);
}
ZEND_OP2(opline).var = NUM_VAR(map_T[currT] + offset);
}
- if (opline->opcode == ZEND_DECLARE_INHERITED_CLASS ||
- opline->opcode == ZEND_DECLARE_ANON_INHERITED_CLASS ||
- opline->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED) {
- currT = VAR_NUM(opline->extended_value) - offset;
- if (!valid_T[currT]) {
- GET_AVAILABLE_T();
- map_T[currT] = i;
- valid_T[currT] = 1;
- }
- opline->extended_value = NUM_VAR(map_T[currT] + offset);
- }
-
- /* Allocate OP_DATA->op2 after "operands", but before "result" */
- if (opline->opcode == ZEND_ASSIGN_DIM &&
- (opline + 1)->opcode == ZEND_OP_DATA &&
- ZEND_OP2_TYPE(opline + 1) & (IS_VAR | IS_TMP_VAR)) {
- currT = VAR_NUM(ZEND_OP2(opline + 1).var) - offset;
- GET_AVAILABLE_T();
- map_T[currT] = i;
- valid_T[currT] = 1;
- taken_T[i] = 0;
- ZEND_OP2(opline + 1).var = NUM_VAR(i + offset);
- var_to_free = i;
- }
-
if (ZEND_RESULT_TYPE(opline) & (IS_VAR | IS_TMP_VAR)) {
currT = VAR_NUM(ZEND_RESULT(opline).var) - offset;
- if (valid_T[currT]) {
+ if (zend_bitset_in(valid_T, currT)) {
if (start_of_T[currT] == opline) {
- taken_T[map_T[currT]] = 0;
+ /* ZEND_FAST_CALL can not share temporary var with others
+ * since the fast_var could also be set by ZEND_HANDLE_EXCEPTION
+ * which could be ahead of it */
+ if (opline->opcode != ZEND_FAST_CALL) {
+ zend_bitset_excl(taken_T, map_T[currT]);
+ }
}
ZEND_RESULT(opline).var = NUM_VAR(map_T[currT] + offset);
if (opline->opcode == ZEND_ROPE_INIT) {
@@ -161,32 +166,35 @@ void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *c
uint32_t num = ((opline->extended_value * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval);
while (num > 1) {
num--;
- taken_T[map_T[currT]+num] = 0;
+ zend_bitset_excl(taken_T, map_T[currT]+num);
}
}
}
- } else { /* Au still needs to be assigned a T which is a bit dumb. Should consider changing Zend */
+ } else {
+ /* Code which gets here is using a wrongly built opcode such as RECV() */
GET_AVAILABLE_T();
-
- if (RESULT_UNUSED(opline)) {
- taken_T[i] = 0;
- } else {
- /* Code which gets here is using a wrongly built opcode such as RECV() */
- map_T[currT] = i;
- valid_T[currT] = 1;
- }
+ map_T[currT] = i;
+ zend_bitset_incl(valid_T, currT);
ZEND_RESULT(opline).var = NUM_VAR(i + offset);
}
}
if (var_to_free >= 0) {
- taken_T[var_to_free] = 0;
+ zend_bitset_excl(taken_T, var_to_free);
var_to_free = -1;
}
opline--;
}
+ if (op_array->live_range) {
+ for (i = 0; i < op_array->last_live_range; i++) {
+ op_array->live_range[i].var =
+ NUM_VAR(map_T[VAR_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK) - offset] + offset) |
+ (op_array->live_range[i].var & ZEND_LIVE_MASK);
+ }
+ }
+
zend_arena_release(&ctx->arena, checkpoint);
op_array->T = max + 1;
}
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index 6fcdc3e47a..71f879e958 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,7 +42,8 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
int i = 0;
zend_op *opline = op_array->opcodes;
zend_op *end = opline + op_array->last;
- zend_bool collect_constants = (op_array == &ctx->script->main_op_array);
+ zend_bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & ctx->optimization_level)?
+ (op_array == &ctx->script->main_op_array) : 0;
while (opline < end) {
switch (opline->opcode) {
@@ -66,6 +67,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
case ZEND_BW_AND:
case ZEND_BW_XOR:
case ZEND_BOOL_XOR:
+ case ZEND_SPACESHIP:
if (ZEND_OP1_TYPE(opline) == IS_CONST &&
ZEND_OP2_TYPE(opline) == IS_CONST) {
/* binary operation with constant operands */
@@ -82,6 +84,9 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
zval_get_long(&ZEND_OP2_LITERAL(opline)) < 0) {
/* shift by negative number */
break;
+ } else if (zend_binary_op_produces_numeric_string_error(opline->opcode, &ZEND_OP1_LITERAL(opline), &ZEND_OP2_LITERAL(opline))) {
+ /* produces numeric string E_NOTICE/E_WARNING */
+ break;
}
er = EG(error_reporting);
EG(error_reporting) = 0;
@@ -238,8 +243,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
#endif
case ZEND_FETCH_CONSTANT:
- if (ZEND_OP1_TYPE(opline) == IS_UNUSED &&
- ZEND_OP2_TYPE(opline) == IS_CONST &&
+ if (ZEND_OP2_TYPE(opline) == IS_CONST &&
Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING &&
Z_STRLEN(ZEND_OP2_LITERAL(opline)) == sizeof("__COMPILER_HALT_OFFSET__") - 1 &&
memcmp(Z_STRVAL(ZEND_OP2_LITERAL(opline)), "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1) == 0) {
@@ -263,8 +267,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
break;
}
- if (ZEND_OP1_TYPE(opline) == IS_UNUSED &&
- ZEND_OP2_TYPE(opline) == IS_CONST &&
+ if (ZEND_OP2_TYPE(opline) == IS_CONST &&
Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) {
/* substitute persistent constants */
uint32_t tv = ZEND_RESULT(opline).var;
@@ -283,10 +286,10 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
MAKE_NOP(opline);
}
}
+ break;
- /* class constant */
- if (ZEND_OP1_TYPE(opline) != IS_UNUSED &&
- ZEND_OP2_TYPE(opline) == IS_CONST &&
+ case ZEND_FETCH_CLASS_CONSTANT:
+ if (ZEND_OP2_TYPE(opline) == IS_CONST &&
Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) {
zend_class_entry *ce = NULL;
@@ -304,15 +307,20 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
(ce->type == ZEND_INTERNAL_CLASS &&
ce->info.internal.module->type != MODULE_PERSISTENT) ||
(ce->type == ZEND_USER_CLASS &&
- ZEND_CE_FILENAME(ce) != op_array->filename)) {
+ ce->info.user.filename != op_array->filename)) {
break;
}
}
} else if (op_array->scope &&
+ ZEND_OP1_TYPE(opline) == IS_UNUSED &&
+ (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ /* for self::B */
+ ce = op_array->scope;
+ } else if (op_array->scope &&
ZEND_OP1_TYPE(opline) == IS_VAR &&
(opline - 1)->opcode == ZEND_FETCH_CLASS &&
(ZEND_OP1_TYPE(opline - 1) == IS_UNUSED &&
- ((opline - 1)->extended_value & ~ZEND_FETCH_CLASS_NO_AUTOLOAD) == ZEND_FETCH_CLASS_SELF) &&
+ ((opline - 1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) &&
ZEND_RESULT((opline - 1)).var == ZEND_OP1(opline).var) {
/* for self::B */
ce = op_array->scope;
@@ -320,11 +328,13 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
if (ce) {
uint32_t tv = ZEND_RESULT(opline).var;
+ zend_class_constant *cc;
zval *c, t;
- if ((c = zend_hash_find(&ce->constants_table,
- Z_STR(ZEND_OP2_LITERAL(opline)))) != NULL) {
- ZVAL_DEREF(c);
+ if ((cc = zend_hash_find_ptr(&ce->constants_table,
+ Z_STR(ZEND_OP2_LITERAL(opline)))) != NULL &&
+ (Z_ACCESS_FLAGS(cc->value) & ZEND_ACC_PPP_MASK) == ZEND_ACC_PUBLIC) {
+ c = &cc->value;
if (Z_TYPE_P(c) == IS_CONSTANT_AST) {
break;
}
@@ -338,12 +348,12 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
zval_copy_ctor(&t);
}
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- literal_dtor(&ZEND_OP1_LITERAL(opline));
- } else {
- MAKE_NOP((opline - 1));
- }
if (zend_optimizer_replace_by_const(op_array, opline, IS_TMP_VAR, tv, &t)) {
+ if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ literal_dtor(&ZEND_OP1_LITERAL(opline));
+ } else if (ZEND_OP1_TYPE(opline) == IS_VAR) {
+ MAKE_NOP((opline - 1));
+ }
literal_dtor(&ZEND_OP2_LITERAL(opline));
MAKE_NOP(opline);
}
@@ -624,7 +634,6 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
case ZEND_EXIT:
case ZEND_THROW:
case ZEND_CATCH:
- case ZEND_GOTO:
case ZEND_FAST_CALL:
case ZEND_FAST_RET:
case ZEND_JMP:
@@ -637,74 +646,11 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
case ZEND_FE_RESET_RW:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
- case ZEND_NEW:
case ZEND_JMP_SET:
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
collect_constants = 0;
break;
- case ZEND_FETCH_R:
- case ZEND_FETCH_W:
- case ZEND_FETCH_RW:
- case ZEND_FETCH_FUNC_ARG:
- case ZEND_FETCH_IS:
- case ZEND_FETCH_UNSET:
- if (opline != op_array->opcodes &&
- (opline-1)->opcode == ZEND_BEGIN_SILENCE &&
- (opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_LOCAL &&
- opline->op1_type == IS_CONST &&
- opline->op2_type == IS_UNUSED &&
- Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING &&
- (Z_STRLEN(ZEND_OP1_LITERAL(opline)) != sizeof("this")-1 ||
- memcmp(Z_STRVAL(ZEND_OP1_LITERAL(opline)), "this", sizeof("this") - 1) != 0)) {
-
- int var = opline->result.var;
- int level = 0;
- zend_op *op = opline + 1;
- zend_op *use = NULL;
-
- while (op < end) {
- if (op->opcode == ZEND_BEGIN_SILENCE) {
- level++;
- } else if (op->opcode == ZEND_END_SILENCE) {
- if (level == 0) {
- break;
- } else {
- level--;
- }
- }
- if (op->op1_type == IS_VAR && op->op1.var == var) {
- if (use) {
- /* used more than once */
- use = NULL;
- break;
- }
- use = op;
- } else if (op->op2_type == IS_VAR && op->op2.var == var) {
- if (use) {
- /* used more than once */
- use = NULL;
- break;
- }
- use = op;
- }
- op++;
- }
- if (use) {
- if (use->op1_type == IS_VAR && use->op1.var == var) {
- use->op1_type = IS_CV;
- use->op1.var = zend_optimizer_lookup_cv(op_array,
- Z_STR(ZEND_OP1_LITERAL(opline)));
- MAKE_NOP(opline);
- } else if (use->op2_type == IS_VAR && use->op2.var == var) {
- use->op2_type = IS_CV;
- use->op2.var = zend_optimizer_lookup_cv(op_array,
- Z_STR(ZEND_OP1_LITERAL(opline)));
- MAKE_NOP(opline);
- }
- }
- }
- break;
}
opline++;
i++;
diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c
index a9d85daa6f..c24d87a4ad 100644
--- a/ext/opcache/Optimizer/pass2.c
+++ b/ext/opcache/Optimizer/pass2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,6 @@
/* pass 2:
* - convert non-numeric constants to numeric constants in numeric operators
* - optimize constant conditional JMPs
- * - optimize static BRKs and CONTs
*/
#include "php.h"
@@ -45,9 +44,13 @@ void zend_optimizer_pass2(zend_op_array *op_array)
case ZEND_SUB:
case ZEND_MUL:
case ZEND_DIV:
+ case ZEND_POW:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
if (Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING) {
- convert_scalar_to_number(&ZEND_OP1_LITERAL(opline));
+ /* don't optimise if it should produce a runtime numeric string error */
+ if (is_numeric_string(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)), NULL, NULL, 0)) {
+ convert_scalar_to_number(&ZEND_OP1_LITERAL(opline));
+ }
}
}
/* break missing *intentionally* - the assign_op's may only optimize op2 */
@@ -55,13 +58,17 @@ void zend_optimizer_pass2(zend_op_array *op_array)
case ZEND_ASSIGN_SUB:
case ZEND_ASSIGN_MUL:
case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_POW:
if (opline->extended_value != 0) {
/* object tristate op - don't attempt to optimize it! */
break;
}
if (ZEND_OP2_TYPE(opline) == IS_CONST) {
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) {
- convert_scalar_to_number(&ZEND_OP2_LITERAL(opline));
+ /* don't optimise if it should produce a runtime numeric string error */
+ if (is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0)) {
+ convert_scalar_to_number(&ZEND_OP2_LITERAL(opline));
+ }
}
}
break;
@@ -71,7 +78,11 @@ void zend_optimizer_pass2(zend_op_array *op_array)
case ZEND_SR:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
if (Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_LONG) {
- convert_to_long(&ZEND_OP1_LITERAL(opline));
+ /* don't optimise if it should produce a runtime numeric string error */
+ if (!(Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING
+ && !is_numeric_string(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)), NULL, NULL, 0))) {
+ convert_to_long(&ZEND_OP1_LITERAL(opline));
+ }
}
}
/* break missing *intentionally - the assign_op's may only optimize op2 */
@@ -84,7 +95,11 @@ void zend_optimizer_pass2(zend_op_array *op_array)
}
if (ZEND_OP2_TYPE(opline) == IS_CONST) {
if (Z_TYPE(ZEND_OP2_LITERAL(opline)) != IS_LONG) {
- convert_to_long(&ZEND_OP2_LITERAL(opline));
+ /* don't optimise if it should produce a runtime numeric string error */
+ if (!(Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING
+ && !is_numeric_string(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline)), NULL, NULL, 0))) {
+ convert_to_long(&ZEND_OP2_LITERAL(opline));
+ }
}
}
break;
@@ -112,14 +127,21 @@ void zend_optimizer_pass2(zend_op_array *op_array)
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
/* convert Ti = JMPZ_EX(Ti, L) to JMPZ(Ti, L) */
- if (0 && /* FIXME: temporary disable unsafe pattern */
- ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
+#if 0
+ /* Disabled unsafe pattern: in conjunction with
+ * ZEND_VM_SMART_BRANCH() this may improperly eliminate
+ * assignment to Ti.
+ */
+ if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
ZEND_RESULT_TYPE(opline) == IS_TMP_VAR &&
ZEND_OP1(opline).var == ZEND_RESULT(opline).var) {
opline->opcode -= 3;
+ SET_UNUSED(opline->result);
+ } else
+#endif
/* convert Ti = JMPZ_EX(C, L) => Ti = QM_ASSIGN(C)
in case we know it wouldn't jump */
- } else if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ if (ZEND_OP1_TYPE(opline) == IS_CONST) {
int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(opline));
if (opline->opcode == ZEND_JMPZ_EX) {
should_jmp = !should_jmp;
@@ -152,15 +174,15 @@ void zend_optimizer_pass2(zend_op_array *op_array)
if ((opline + 1)->opcode == ZEND_JMP) {
/* JMPZ(X, L1), JMP(L2) => JMPZNZ(X, L1, L2) */
/* JMPNZ(X, L1), JMP(L2) => JMPZNZ(X, L2, L1) */
- if (ZEND_OP2(opline).opline_num == ZEND_OP1(opline + 1).opline_num) {
+ if (ZEND_OP2_JMP_ADDR(opline) == ZEND_OP1_JMP_ADDR(opline + 1)) {
/* JMPZ(X, L1), JMP(L1) => NOP, JMP(L1) */
MAKE_NOP(opline);
} else {
if (opline->opcode == ZEND_JMPZ) {
- opline->extended_value = ZEND_OP1(opline + 1).opline_num;
+ opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, ZEND_OP1_JMP_ADDR(opline + 1));
} else {
- opline->extended_value = ZEND_OP2(opline).opline_num;
- COPY_NODE(opline->op2, (opline + 1)->op1);
+ opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, ZEND_OP2_JMP_ADDR(opline));
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP1_JMP_ADDR(opline + 1));
}
opline->opcode = ZEND_JMPZNZ;
}
@@ -169,14 +191,15 @@ void zend_optimizer_pass2(zend_op_array *op_array)
case ZEND_JMPZNZ:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
- int opline_num;
+ zend_op *target_opline;
+
if (zend_is_true(&ZEND_OP1_LITERAL(opline))) {
- opline_num = opline->extended_value; /* JMPNZ */
+ target_opline = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value); /* JMPNZ */
} else {
- opline_num = ZEND_OP2(opline).opline_num; /* JMPZ */
+ target_opline = ZEND_OP2_JMP_ADDR(opline); /* JMPZ */
}
literal_dtor(&ZEND_OP1_LITERAL(opline));
- ZEND_OP1(opline).opline_num = opline_num;
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op1, target_opline);
ZEND_OP1_TYPE(opline) = IS_UNUSED;
opline->opcode = ZEND_JMP;
}
diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c
index 3e589df628..ce04e4f7cb 100644
--- a/ext/opcache/Optimizer/pass3.c
+++ b/ext/opcache/Optimizer/pass3.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,31 +39,31 @@
/* we use "jmp_hitlist" to avoid infinity loops during jmp optimization */
#define CHECK_JMP(target, label) \
for (i=0; i<jmp_hitlist_count; i++) { \
- if (jmp_hitlist[i] == ZEND_OP1(&op_array->opcodes[target]).opline_num) { \
+ if (jmp_hitlist[i] == ZEND_OP1_JMP_ADDR(target)) { \
goto label; \
} \
} \
- jmp_hitlist[jmp_hitlist_count++] = ZEND_OP1(&op_array->opcodes[target]).opline_num;
+ jmp_hitlist[jmp_hitlist_count++] = ZEND_OP1_JMP_ADDR(target);
#define CHECK_JMP2(target, label) \
for (i=0; i<jmp_hitlist_count; i++) { \
- if (jmp_hitlist[i] == ZEND_OP2(&op_array->opcodes[target]).opline_num) { \
+ if (jmp_hitlist[i] == ZEND_OP2_JMP_ADDR(target)) { \
goto label; \
} \
} \
- jmp_hitlist[jmp_hitlist_count++] = ZEND_OP2(&op_array->opcodes[target]).opline_num;
+ jmp_hitlist[jmp_hitlist_count++] = ZEND_OP2_JMP_ADDR(target);
void zend_optimizer_pass3(zend_op_array *op_array)
{
zend_op *opline;
zend_op *end = op_array->opcodes + op_array->last;
- uint32_t *jmp_hitlist;
+ zend_op **jmp_hitlist;
int jmp_hitlist_count;
int i;
uint32_t opline_num = 0;
ALLOCA_FLAG(use_heap);
- jmp_hitlist = (uint32_t *)DO_ALLOCA(sizeof(uint32_t)*op_array->last);
+ jmp_hitlist = (zend_op**)do_alloca(sizeof(zend_op*)*op_array->last, use_heap);
opline = op_array->opcodes;
while (opline < end) {
@@ -93,7 +93,7 @@ void zend_optimizer_pass3(zend_op_array *op_array)
break;
}
- if ((ZEND_OP2_TYPE(opline) == IS_VAR || ZEND_OP2_TYPE(opline) == IS_CV)
+ if ((ZEND_OP2_TYPE(opline) & (IS_VAR | IS_CV))
&& ZEND_OP2(opline).var == ZEND_OP1(next_opline).var &&
(opline->opcode == ZEND_ADD ||
opline->opcode == ZEND_MUL ||
@@ -106,13 +106,15 @@ void zend_optimizer_pass3(zend_op_array *op_array)
zend_uchar tmp_type = opline->op1_type;
znode_op tmp = opline->op1;
- if (opline->opcode != ZEND_ADD || ZEND_OP1_TYPE(opline) == IS_CONST) {
+ if (opline->opcode != ZEND_ADD
+ || (ZEND_OP1_TYPE(opline) == IS_CONST
+ && Z_TYPE(ZEND_OP1_LITERAL(opline)) != IS_ARRAY)) {
/* protection from array add: $a = array + $a is not commutative! */
COPY_NODE(opline->op1, opline->op2);
COPY_NODE(opline->op2, tmp);
}
}
- if ((ZEND_OP1_TYPE(opline) == IS_VAR || ZEND_OP1_TYPE(opline) == IS_CV)
+ if ((ZEND_OP1_TYPE(opline) & (IS_VAR | IS_CV))
&& ZEND_OP1(opline).var == ZEND_OP1(next_opline).var
&& ZEND_OP1_TYPE(opline) == ZEND_OP1_TYPE(next_opline)) {
switch (opline->opcode) {
@@ -167,17 +169,17 @@ void zend_optimizer_pass3(zend_op_array *op_array)
}
/* convert L: JMP L+1 to NOP */
- if (ZEND_OP1(opline).opline_num == opline_num + 1) {
+ if (ZEND_OP1_JMP_ADDR(opline) == opline + 1) {
MAKE_NOP(opline);
goto done_jmp_optimization;
}
/* convert JMP L1 ... L1: JMP L2 to JMP L2 .. L1: JMP L2 */
- while (ZEND_OP1(opline).opline_num < op_array->last
- && op_array->opcodes[ZEND_OP1(opline).opline_num].opcode == ZEND_JMP) {
- int target = ZEND_OP1(opline).opline_num;
+ while (ZEND_OP1_JMP_ADDR(opline) < end
+ && ZEND_OP1_JMP_ADDR(opline)->opcode == ZEND_JMP) {
+ zend_op *target = ZEND_OP1_JMP_ADDR(opline);
CHECK_JMP(target, done_jmp_optimization);
- ZEND_OP1(opline).opline_num = ZEND_OP1(&op_array->opcodes[target]).opline_num;
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op1, ZEND_OP1_JMP_ADDR(target));
}
break;
@@ -187,10 +189,10 @@ void zend_optimizer_pass3(zend_op_array *op_array)
break;
}
- while (ZEND_OP2(opline).opline_num < op_array->last) {
- int target = ZEND_OP2(opline).opline_num;
- if (op_array->opcodes[target].opcode == ZEND_JMP) {
- ZEND_OP2(opline).opline_num = ZEND_OP1(&op_array->opcodes[target]).opline_num;
+ while (ZEND_OP2_JMP_ADDR(opline) < end) {
+ zend_op *target = ZEND_OP2_JMP_ADDR(opline);
+ if (target->opcode == ZEND_JMP) {
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP1_JMP_ADDR(target));
} else {
break;
}
@@ -202,40 +204,41 @@ void zend_optimizer_pass3(zend_op_array *op_array)
break;
}
- while (ZEND_OP2(opline).opline_num < op_array->last) {
- int target = ZEND_OP2(opline).opline_num;
+ while (ZEND_OP2_JMP_ADDR(opline) < end) {
+ zend_op *target = ZEND_OP2_JMP_ADDR(opline);
- if (op_array->opcodes[target].opcode == ZEND_JMP) {
+ if (target->opcode == ZEND_JMP) {
/* plain JMP */
/* JMPZ(X,L1), L1: JMP(L2) => JMPZ(X,L2), L1: JMP(L2) */
CHECK_JMP(target, done_jmp_optimization);
- ZEND_OP2(opline).opline_num = ZEND_OP1(&op_array->opcodes[target]).opline_num;
- } else if (op_array->opcodes[target].opcode == opline->opcode &&
- SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP1_JMP_ADDR(target));
+ } else if (target->opcode == opline->opcode &&
+ SAME_VAR(opline->op1, target->op1)) {
/* same opcode and same var as this opcode */
/* JMPZ(X,L1), L1: JMPZ(X,L2) => JMPZ(X,L2), L1: JMPZ(X,L2) */
CHECK_JMP2(target, done_jmp_optimization);
- ZEND_OP2(opline).opline_num = ZEND_OP2(&op_array->opcodes[target]).opline_num;
- } else if (op_array->opcodes[target].opcode == opline->opcode + 3 &&
- SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP2_JMP_ADDR(target));
+ } else if (target->opcode == opline->opcode + 3 &&
+ SAME_VAR(opline->op1, target->op1)) {
/* convert JMPZ(X,L1), L1: T JMPZ_EX(X,L2) to
T = JMPZ_EX(X, L2) */
- ZEND_OP2(opline).opline_num = ZEND_OP2(&op_array->opcodes[target]).opline_num;opline->opcode += 3;
- COPY_NODE(opline->result, op_array->opcodes[target].result);
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP2_JMP_ADDR(target));
+ opline->opcode += 3;
+ COPY_NODE(opline->result, target->result);
break;
- } else if (op_array->opcodes[target].opcode == INV_COND(opline->opcode) &&
- SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
+ } else if (target->opcode == INV_COND(opline->opcode) &&
+ SAME_VAR(opline->op1, target->op1)) {
/* convert JMPZ(X,L1), L1: JMPNZ(X,L2) to
JMPZ(X,L1+1) */
- ZEND_OP2(opline).opline_num = target + 1;
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target + 1);
break;
- } else if (op_array->opcodes[target].opcode == INV_COND_EX(opline->opcode) &&
- SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
+ } else if (target->opcode == INV_COND_EX(opline->opcode) &&
+ SAME_VAR(opline->op1, target->op1)) {
/* convert JMPZ(X,L1), L1: T = JMPNZ_EX(X,L2) to
T = JMPZ_EX(X,L1+1) */
- ZEND_OP2(opline).opline_num = target + 1;
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target + 1);
opline->opcode += 3;
- COPY_NODE(opline->result, op_array->opcodes[target].result);
+ COPY_NODE(opline->result, target->result);
break;
} else {
break;
@@ -254,7 +257,7 @@ void zend_optimizer_pass3(zend_op_array *op_array)
/* convert L: T = JMPZ_EX X,L+1 to T = BOOL(X) */
/* convert L: T = JMPZ_EX T,L+1 to NOP */
- if (ZEND_OP2(opline).opline_num == opline_num + 1) {
+ if (ZEND_OP2_JMP_ADDR(opline) == opline + 1) {
if (ZEND_OP1(opline).var == ZEND_RESULT(opline).var) {
MAKE_NOP(opline);
} else {
@@ -264,36 +267,38 @@ void zend_optimizer_pass3(zend_op_array *op_array)
goto done_jmp_optimization;
}
- while (ZEND_OP2(opline).opline_num < op_array->last) {
- int target = ZEND_OP2(opline).opline_num;
- if (SAME_OPCODE_EX(opline->opcode, op_array->opcodes[target].opcode) &&
- SAME_VAR(op_array->opcodes[target].op1, T)) {
+ while (ZEND_OP2_JMP_ADDR(opline) < end) {
+ zend_op *target = ZEND_OP2_JMP_ADDR(opline);
+
+ if (SAME_OPCODE_EX(opline->opcode, target->opcode) &&
+ SAME_VAR(target->op1, T)) {
/* Check for JMPZ_EX to JMPZ[_EX] with the same condition, either with _EX or not */
- if (op_array->opcodes[target].opcode == opline->opcode) {
+ if (target->opcode == opline->opcode) {
/* change T only if we have _EX opcode there */
- COPY_NODE(T, op_array->opcodes[target].result);
+ COPY_NODE(T, target->result);
}
CHECK_JMP2(target, continue_jmp_ex_optimization);
- ZEND_OP2(opline).opline_num = ZEND_OP2(&op_array->opcodes[target]).opline_num;
- } else if (op_array->opcodes[target].opcode == ZEND_JMPZNZ &&
- SAME_VAR(op_array->opcodes[target].op1, T)) {
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP2_JMP_ADDR(target));
+ } else if (target->opcode == ZEND_JMPZNZ &&
+ SAME_VAR(target->op1, T)) {
/* Check for JMPZNZ with same cond variable */
- int new_target;
+ zend_op *new_target;
+
CHECK_JMP2(target, continue_jmp_ex_optimization);
if (opline->opcode == ZEND_JMPZ_EX) {
- new_target = ZEND_OP2(&op_array->opcodes[target]).opline_num;
+ new_target = ZEND_OP2_JMP_ADDR(target);
} else {
/* JMPNZ_EX */
- new_target = op_array->opcodes[target].extended_value;
+ new_target = ZEND_OFFSET_TO_OPLINE(target, target->extended_value);
}
- ZEND_OP2(opline).opline_num = new_target;
- } else if ((op_array->opcodes[target].opcode == INV_EX_COND_EX(opline->opcode) ||
- op_array->opcodes[target].opcode == INV_EX_COND(opline->opcode)) &&
- SAME_VAR(opline->op1, op_array->opcodes[target].op1)) {
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, new_target);
+ } else if ((target->opcode == INV_EX_COND_EX(opline->opcode) ||
+ target->opcode == INV_EX_COND(opline->opcode)) &&
+ SAME_VAR(opline->op1, target->op1)) {
/* convert JMPZ_EX(X,L1), L1: JMPNZ_EX(X,L2) to
JMPZ_EX(X,L1+1) */
- ZEND_OP2(opline).opline_num = target + 1;
- break;
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, target + 1);
+ break;
} else {
break;
}
@@ -385,19 +390,19 @@ continue_jmp_ex_optimization:
}
/* JMPZNZ(X,L1,L2), L1: JMP(L3) => JMPZNZ(X,L3,L2), L1: JMP(L3) */
- while (ZEND_OP2(opline).opline_num < op_array->last
- && op_array->opcodes[ZEND_OP2(opline).opline_num].opcode == ZEND_JMP) {
- int target = ZEND_OP2(opline).opline_num;
+ while (ZEND_OP2_JMP_ADDR(opline) < end
+ && ZEND_OP2_JMP_ADDR(opline)->opcode == ZEND_JMP) {
+ zend_op *target = ZEND_OP2_JMP_ADDR(opline);
CHECK_JMP(target, continue_jmpznz_optimization);
- ZEND_OP2(opline).opline_num = ZEND_OP1(&op_array->opcodes[target]).opline_num;
+ ZEND_SET_OP_JMP_ADDR(opline, opline->op2, ZEND_OP1_JMP_ADDR(target));
}
continue_jmpznz_optimization:
/* JMPZNZ(X,L1,L2), L2: JMP(L3) => JMPZNZ(X,L1,L3), L2: JMP(L3) */
- while (opline->extended_value < op_array->last
- && op_array->opcodes[opline->extended_value].opcode == ZEND_JMP) {
- int target = opline->extended_value;
+ while (ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value) < end
+ && ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value)->opcode == ZEND_JMP) {
+ zend_op *target = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value);
CHECK_JMP(target, done_jmp_optimization);
- opline->extended_value = ZEND_OP1(&op_array->opcodes[target]).opline_num;
+ opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, ZEND_OP1_JMP_ADDR(target));
}
break;
@@ -412,15 +417,8 @@ continue_jmpznz_optimization:
if (next_op->opcode == ZEND_FREE &&
ZEND_OP1(next_op).var == ZEND_RESULT(opline).var) {
MAKE_NOP(next_op);
- switch (opline->opcode) {
- case ZEND_POST_INC:
- opline->opcode = ZEND_PRE_INC;
- break;
- case ZEND_POST_DEC:
- opline->opcode = ZEND_PRE_DEC;
- break;
- }
- ZEND_RESULT_TYPE(opline) = IS_VAR | EXT_TYPE_UNUSED;
+ opline->opcode -= 2;
+ ZEND_RESULT_TYPE(opline) = IS_UNUSED;
}
}
break;
@@ -429,5 +427,5 @@ done_jmp_optimization:
opline++;
opline_num++;
}
- FREE_ALLOCA(jmp_hitlist);
+ free_alloca(jmp_hitlist, use_heap);
}
diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c
new file mode 100644
index 0000000000..53eb0a84ea
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_call_graph.c
@@ -0,0 +1,300 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, Call Graph |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id:$ */
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_extensions.h"
+#include "Optimizer/zend_optimizer.h"
+#include "zend_optimizer_internal.h"
+#include "zend_inference.h"
+#include "zend_call_graph.h"
+#include "zend_func_info.h"
+#include "zend_inference.h"
+#include "zend_call_graph.h"
+
+typedef int (*zend_op_array_func_t)(zend_call_graph *call_graph, zend_op_array *op_array);
+
+static int zend_op_array_calc(zend_call_graph *call_graph, zend_op_array *op_array)
+{
+ (void) op_array;
+
+ call_graph->op_arrays_count++;
+ return SUCCESS;
+}
+
+static int zend_op_array_collect(zend_call_graph *call_graph, zend_op_array *op_array)
+{
+ zend_func_info *func_info = call_graph->func_infos + call_graph->op_arrays_count;
+
+ ZEND_SET_FUNC_INFO(op_array, func_info);
+ call_graph->op_arrays[call_graph->op_arrays_count] = op_array;
+ func_info->num = call_graph->op_arrays_count;
+ func_info->num_args = -1;
+ func_info->return_value_used = -1;
+ call_graph->op_arrays_count++;
+ return SUCCESS;
+}
+
+static int zend_foreach_op_array(zend_call_graph *call_graph, zend_script *script, zend_op_array_func_t func)
+{
+ zend_class_entry *ce;
+ zend_op_array *op_array;
+
+ if (func(call_graph, &script->main_op_array) != SUCCESS) {
+ return FAILURE;
+ }
+
+ ZEND_HASH_FOREACH_PTR(&script->function_table, op_array) {
+ if (func(call_graph, op_array) != SUCCESS) {
+ return FAILURE;
+ }
+ } ZEND_HASH_FOREACH_END();
+
+ ZEND_HASH_FOREACH_PTR(&script->class_table, ce) {
+ ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) {
+ if (op_array->scope == ce) {
+ if (func(call_graph, op_array) != SUCCESS) {
+ return FAILURE;
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+ } ZEND_HASH_FOREACH_END();
+
+ return SUCCESS;
+}
+
+static void zend_collect_args_info(zend_call_info *call_info)
+{
+ zend_op *opline = call_info->caller_init_opline;
+ zend_op *end = call_info->caller_call_opline;
+ uint32_t i;
+ int num;
+ int level = 0;
+
+ ZEND_ASSERT(opline && end);
+ if (!opline->extended_value) {
+ return;
+ }
+ for (i = 0; i < opline->extended_value; i++) {
+ call_info->arg_info[i].opline = NULL;
+ }
+ while (opline < end) {
+ opline++;
+ switch (opline->opcode) {
+ case ZEND_SEND_VAL:
+ case ZEND_SEND_VAR:
+ case ZEND_SEND_VAL_EX:
+ case ZEND_SEND_VAR_EX:
+ case ZEND_SEND_REF:
+ case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_VAR_NO_REF_EX:
+ num = opline->op2.num;
+ if (num > 0) {
+ num--;
+ }
+ if (!level) {
+ call_info->arg_info[num].opline = opline;
+ }
+ break;
+ case ZEND_SEND_ARRAY:
+ case ZEND_SEND_USER:
+ case ZEND_SEND_UNPACK:
+ // ???
+ break;
+ case ZEND_INIT_FCALL:
+ case ZEND_INIT_FCALL_BY_NAME:
+ case ZEND_INIT_NS_FCALL_BY_NAME:
+ case ZEND_INIT_DYNAMIC_CALL:
+ case ZEND_NEW:
+ case ZEND_INIT_METHOD_CALL:
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ case ZEND_INIT_USER_CALL:
+ level++;
+ break;
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ level--;
+ break;
+ }
+ }
+}
+
+static int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t build_flags, zend_op_array *op_array, zend_func_info *func_info)
+{
+ zend_op *opline = op_array->opcodes;
+ zend_op *end = opline + op_array->last;
+ zend_function *func;
+ zend_call_info *call_info;
+ int call = 0;
+ zend_call_info **call_stack;
+ ALLOCA_FLAG(use_heap);
+
+ call_stack = do_alloca((op_array->last / 2) * sizeof(zend_call_info*), use_heap);
+ while (opline != end) {
+ call_info = NULL;
+ switch (opline->opcode) {
+ case ZEND_INIT_FCALL:
+ case ZEND_INIT_METHOD_CALL:
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ func = zend_optimizer_get_called_func(
+ script, op_array, opline, (build_flags & ZEND_RT_CONSTANTS) != 0);
+ if (func) {
+ call_info = zend_arena_calloc(arena, 1, sizeof(zend_call_info) + (sizeof(zend_send_arg_info) * ((int)opline->extended_value - 1)));
+ call_info->caller_op_array = op_array;
+ call_info->caller_init_opline = opline;
+ call_info->caller_call_opline = NULL;
+ call_info->callee_func = func;
+ call_info->num_args = opline->extended_value;
+ call_info->next_callee = func_info->callee_info;
+ func_info->callee_info = call_info;
+
+ if (func->type == ZEND_INTERNAL_FUNCTION) {
+ call_info->next_caller = NULL;
+ } else {
+ zend_func_info *callee_func_info = ZEND_FUNC_INFO(&func->op_array);
+ call_info->next_caller = callee_func_info ? callee_func_info->caller_info : NULL;
+ }
+ }
+ /* break missing intentionally */
+ case ZEND_INIT_FCALL_BY_NAME:
+ case ZEND_INIT_NS_FCALL_BY_NAME:
+ case ZEND_INIT_DYNAMIC_CALL:
+ case ZEND_NEW:
+ case ZEND_INIT_USER_CALL:
+ call_stack[call] = call_info;
+ call++;
+ break;
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ func_info->flags |= ZEND_FUNC_HAS_CALLS;
+ call--;
+ if (call_stack[call]) {
+ call_stack[call]->caller_call_opline = opline;
+ zend_collect_args_info(call_stack[call]);
+ }
+ break;
+ }
+ opline++;
+ }
+ free_alloca(call_stack, use_heap);
+ return SUCCESS;
+}
+
+static int zend_is_indirectly_recursive(zend_op_array *root, zend_op_array *op_array, zend_bitset visited)
+{
+ zend_func_info *func_info;
+ zend_call_info *call_info;
+ int ret = 0;
+
+ if (op_array == root) {
+ return 1;
+ }
+
+ func_info = ZEND_FUNC_INFO(op_array);
+ if (zend_bitset_in(visited, func_info->num)) {
+ return 0;
+ }
+ zend_bitset_incl(visited, func_info->num);
+ call_info = func_info->caller_info;
+ while (call_info) {
+ if (zend_is_indirectly_recursive(root, call_info->caller_op_array, visited)) {
+ call_info->recursive = 1;
+ ret = 1;
+ }
+ call_info = call_info->next_caller;
+ }
+ return ret;
+}
+
+static void zend_analyze_recursion(zend_call_graph *call_graph)
+{
+ zend_op_array *op_array;
+ zend_func_info *func_info;
+ zend_call_info *call_info;
+ int i;
+ int set_len = zend_bitset_len(call_graph->op_arrays_count);
+ zend_bitset visited;
+ ALLOCA_FLAG(use_heap);
+
+ visited = ZEND_BITSET_ALLOCA(set_len, use_heap);
+ for (i = 0; i < call_graph->op_arrays_count; i++) {
+ op_array = call_graph->op_arrays[i];
+ func_info = call_graph->func_infos + i;
+ call_info = func_info->caller_info;
+ while (call_info) {
+ if (call_info->caller_op_array == op_array) {
+ call_info->recursive = 1;
+ func_info->flags |= ZEND_FUNC_RECURSIVE | ZEND_FUNC_RECURSIVE_DIRECTLY;
+ } else {
+ memset(visited, 0, sizeof(zend_ulong) * set_len);
+ if (zend_is_indirectly_recursive(op_array, call_info->caller_op_array, visited)) {
+ call_info->recursive = 1;
+ func_info->flags |= ZEND_FUNC_RECURSIVE | ZEND_FUNC_RECURSIVE_INDIRECTLY;
+ }
+ }
+ call_info = call_info->next_caller;
+ }
+ }
+
+ free_alloca(visited, use_heap);
+}
+
+static void zend_sort_op_arrays(zend_call_graph *call_graph)
+{
+ (void) call_graph;
+
+ // TODO: perform topological sort of cyclic call graph
+}
+
+int zend_build_call_graph(zend_arena **arena, zend_script *script, uint32_t build_flags, zend_call_graph *call_graph) /* {{{ */
+{
+ int i;
+
+ call_graph->op_arrays_count = 0;
+ if (zend_foreach_op_array(call_graph, script, zend_op_array_calc) != SUCCESS) {
+ return FAILURE;
+ }
+ call_graph->op_arrays = (zend_op_array**)zend_arena_calloc(arena, call_graph->op_arrays_count, sizeof(zend_op_array*));
+ call_graph->func_infos = (zend_func_info*)zend_arena_calloc(arena, call_graph->op_arrays_count, sizeof(zend_func_info));
+ call_graph->op_arrays_count = 0;
+ if (zend_foreach_op_array(call_graph, script, zend_op_array_collect) != SUCCESS) {
+ return FAILURE;
+ }
+ for (i = 0; i < call_graph->op_arrays_count; i++) {
+ zend_analyze_calls(arena, script, build_flags, call_graph->op_arrays[i], call_graph->func_infos + i);
+ }
+ zend_analyze_recursion(call_graph);
+ zend_sort_op_arrays(call_graph);
+
+ return SUCCESS;
+}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_call_graph.h b/ext/opcache/Optimizer/zend_call_graph.h
new file mode 100644
index 0000000000..64eb9e8e1b
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_call_graph.h
@@ -0,0 +1,83 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, Call Graph |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_CALL_GRAPH_H
+#define ZEND_CALL_GRAPH_H
+
+#include "zend_ssa.h"
+#include "zend_func_info.h"
+#include "zend_optimizer.h"
+
+typedef struct _zend_send_arg_info {
+ zend_op *opline;
+} zend_send_arg_info;
+
+typedef struct _zend_recv_arg_info {
+ int ssa_var;
+ zend_ssa_var_info info;
+} zend_recv_arg_info;
+
+struct _zend_call_info {
+ zend_op_array *caller_op_array;
+ zend_op *caller_init_opline;
+ zend_op *caller_call_opline;
+ zend_function *callee_func;
+ zend_call_info *next_caller;
+ zend_call_info *next_callee;
+ zend_func_info *clone;
+ int recursive;
+ int num_args;
+ zend_send_arg_info arg_info[1];
+};
+
+struct _zend_func_info {
+ int num;
+ uint32_t flags;
+ zend_ssa ssa; /* Static Single Assignmnt Form */
+ zend_call_info *caller_info; /* where this function is called from */
+ zend_call_info *callee_info; /* which functions are called from this one */
+ int num_args; /* (-1 - unknown) */
+ zend_recv_arg_info *arg_info;
+ zend_ssa_var_info return_info;
+ zend_func_info *clone;
+ int clone_num;
+ int return_value_used; /* -1 unknown, 0 no, 1 yes */
+ void *codegen_data;
+};
+
+typedef struct _zend_call_graph {
+ int op_arrays_count;
+ zend_op_array **op_arrays;
+ zend_func_info *func_infos;
+} zend_call_graph;
+
+BEGIN_EXTERN_C()
+
+int zend_build_call_graph(zend_arena **arena, zend_script *script, uint32_t build_flags, zend_call_graph *call_graph);
+
+END_EXTERN_C()
+
+#endif /* ZEND_CALL_GRAPH_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c
new file mode 100644
index 0000000000..e986ac0c20
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_cfg.c
@@ -0,0 +1,844 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, CFG - Control Flow Graph |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_cfg.h"
+#include "zend_func_info.h"
+#include "zend_worklist.h"
+#include "zend_optimizer.h"
+#include "zend_optimizer_internal.h"
+
+static void zend_mark_reachable(zend_op *opcodes, zend_basic_block *blocks, zend_basic_block *b) /* {{{ */
+{
+ zend_uchar opcode;
+ zend_basic_block *b0;
+ int successor_0, successor_1;
+
+ while (1) {
+ b->flags |= ZEND_BB_REACHABLE;
+ successor_0 = b->successors[0];
+ if (successor_0 >= 0) {
+ successor_1 = b->successors[1];
+ if (successor_1 >= 0) {
+ b0 = blocks + successor_0;
+ b0->flags |= ZEND_BB_TARGET;
+ if (!(b0->flags & ZEND_BB_REACHABLE)) {
+ zend_mark_reachable(opcodes, blocks, b0);
+ }
+
+ ZEND_ASSERT(b->len != 0);
+ opcode = opcodes[b->start + b->len - 1].opcode;
+ b = blocks + successor_1;
+ if (opcode == ZEND_JMPZNZ) {
+ b->flags |= ZEND_BB_TARGET;
+ } else {
+ b->flags |= ZEND_BB_FOLLOW;
+ }
+ } else if (b->len != 0) {
+ opcode = opcodes[b->start + b->len - 1].opcode;
+ b = blocks + successor_0;
+ if (opcode == ZEND_JMP) {
+ b->flags |= ZEND_BB_TARGET;
+ } else {
+ b->flags |= ZEND_BB_FOLLOW;
+
+ //TODO: support for stackless CFG???
+ if (0/*stackless*/) {
+ if (opcode == ZEND_INCLUDE_OR_EVAL ||
+ opcode == ZEND_GENERATOR_CREATE ||
+ opcode == ZEND_YIELD ||
+ opcode == ZEND_YIELD_FROM ||
+ opcode == ZEND_DO_FCALL ||
+ opcode == ZEND_DO_UCALL ||
+ opcode == ZEND_DO_FCALL_BY_NAME) {
+ b->flags |= ZEND_BB_ENTRY;
+ }
+ }
+ }
+ } else {
+ b = blocks + successor_0;
+ b->flags |= ZEND_BB_FOLLOW;
+ }
+ if (b->flags & ZEND_BB_REACHABLE) return;
+ } else {
+ b->flags |= ZEND_BB_EXIT;
+ return;
+ }
+ }
+}
+/* }}} */
+
+static void zend_mark_reachable_blocks(const zend_op_array *op_array, zend_cfg *cfg, int start) /* {{{ */
+{
+ zend_basic_block *blocks = cfg->blocks;
+
+ blocks[start].flags = ZEND_BB_START;
+ zend_mark_reachable(op_array->opcodes, blocks, blocks + start);
+
+ if (op_array->last_live_range || op_array->last_try_catch) {
+ zend_basic_block *b;
+ int j, changed;
+ uint32_t *block_map = cfg->map;
+
+ do {
+ changed = 0;
+
+ /* Add live range paths */
+ for (j = 0; j < op_array->last_live_range; j++) {
+ zend_live_range *live_range = &op_array->live_range[j];
+ if (live_range->var == (uint32_t)-1) {
+ /* this live range already removed */
+ continue;
+ }
+ b = blocks + block_map[live_range->start];
+ if (b->flags & ZEND_BB_REACHABLE) {
+ while (b->len > 0 && op_array->opcodes[b->start].opcode == ZEND_NOP) {
+ b->start++;
+ b->len--;
+ }
+ if (b->len == 0 && b->successors[0] == block_map[live_range->end]) {
+ /* mark as removed (empty live range) */
+ live_range->var = (uint32_t)-1;
+ continue;
+ }
+ b->flags |= ZEND_BB_GEN_VAR;
+ b = blocks + block_map[live_range->end];
+ b->flags |= ZEND_BB_KILL_VAR;
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ if (cfg->split_at_live_ranges) {
+ changed = 1;
+ zend_mark_reachable(op_array->opcodes, blocks, b);
+ } else {
+ ZEND_ASSERT(!(b->flags & ZEND_BB_UNREACHABLE_FREE));
+ ZEND_ASSERT(b->start == live_range->end);
+ b->flags |= ZEND_BB_UNREACHABLE_FREE;
+ }
+ }
+ } else {
+ ZEND_ASSERT(!(blocks[block_map[live_range->end]].flags & ZEND_BB_REACHABLE));
+ }
+ }
+
+ /* Add exception paths */
+ for (j = 0; j < op_array->last_try_catch; j++) {
+
+ /* check for jumps into the middle of try block */
+ b = blocks + block_map[op_array->try_catch_array[j].try_op];
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ zend_basic_block *end;
+
+ if (op_array->try_catch_array[j].catch_op) {
+ end = blocks + block_map[op_array->try_catch_array[j].catch_op];
+ while (b != end) {
+ if (b->flags & ZEND_BB_REACHABLE) {
+ op_array->try_catch_array[j].try_op = b->start;
+ break;
+ }
+ b++;
+ }
+ }
+ b = blocks + block_map[op_array->try_catch_array[j].try_op];
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ if (op_array->try_catch_array[j].finally_op) {
+ end = blocks + block_map[op_array->try_catch_array[j].finally_op];
+ while (b != end) {
+ if (b->flags & ZEND_BB_REACHABLE) {
+ op_array->try_catch_array[j].try_op = op_array->try_catch_array[j].catch_op;
+ changed = 1;
+ zend_mark_reachable(op_array->opcodes, blocks, blocks + block_map[op_array->try_catch_array[j].try_op]);
+ break;
+ }
+ b++;
+ }
+ }
+ }
+ }
+
+ b = blocks + block_map[op_array->try_catch_array[j].try_op];
+ if (b->flags & ZEND_BB_REACHABLE) {
+ b->flags |= ZEND_BB_TRY;
+ if (op_array->try_catch_array[j].catch_op) {
+ b = blocks + block_map[op_array->try_catch_array[j].catch_op];
+ b->flags |= ZEND_BB_CATCH;
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ changed = 1;
+ zend_mark_reachable(op_array->opcodes, blocks, b);
+ }
+ }
+ if (op_array->try_catch_array[j].finally_op) {
+ b = blocks + block_map[op_array->try_catch_array[j].finally_op];
+ b->flags |= ZEND_BB_FINALLY;
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ changed = 1;
+ zend_mark_reachable(op_array->opcodes, blocks, b);
+ }
+ }
+ if (op_array->try_catch_array[j].finally_end) {
+ b = blocks + block_map[op_array->try_catch_array[j].finally_end];
+ b->flags |= ZEND_BB_FINALLY_END;
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ changed = 1;
+ zend_mark_reachable(op_array->opcodes, blocks, b);
+ }
+ }
+ } else {
+ if (op_array->try_catch_array[j].catch_op) {
+ ZEND_ASSERT(!(blocks[block_map[op_array->try_catch_array[j].catch_op]].flags & ZEND_BB_REACHABLE));
+ }
+ if (op_array->try_catch_array[j].finally_op) {
+ ZEND_ASSERT(!(blocks[block_map[op_array->try_catch_array[j].finally_op]].flags & ZEND_BB_REACHABLE));
+ }
+ if (op_array->try_catch_array[j].finally_end) {
+ ZEND_ASSERT(!(blocks[block_map[op_array->try_catch_array[j].finally_end]].flags & ZEND_BB_REACHABLE));
+ }
+ }
+ }
+ } while (changed);
+ }
+}
+/* }}} */
+
+void zend_cfg_remark_reachable_blocks(const zend_op_array *op_array, zend_cfg *cfg) /* {{{ */
+{
+ zend_basic_block *blocks = cfg->blocks;
+ int i;
+ int start = 0;
+
+ for (i = 0; i < cfg->blocks_count; i++) {
+ if (blocks[i].flags & ZEND_BB_REACHABLE) {
+ start = i;
+ i++;
+ break;
+ }
+ }
+
+ /* clear all flags */
+ for (i = 0; i < cfg->blocks_count; i++) {
+ blocks[i].flags = 0;
+ }
+
+ zend_mark_reachable_blocks(op_array, cfg, start);
+}
+/* }}} */
+
+static void record_successor(zend_basic_block *blocks, int pred, int n, int succ)
+{
+ blocks[pred].successors[n] = succ;
+}
+
+static void initialize_block(zend_basic_block *block) {
+ block->flags = 0;
+ block->successors[0] = -1;
+ block->successors[1] = -1;
+ block->predecessors_count = 0;
+ block->predecessor_offset = -1;
+ block->idom = -1;
+ block->loop_header = -1;
+ block->level = -1;
+ block->children = -1;
+ block->next_child = -1;
+}
+
+#define BB_START(i) do { \
+ if (!block_map[i]) { blocks_count++;} \
+ block_map[i]++; \
+ } while (0)
+
+int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flags, zend_cfg *cfg, uint32_t *func_flags) /* {{{ */
+{
+ uint32_t flags = 0;
+ uint32_t i;
+ int j;
+ uint32_t *block_map;
+ zend_function *fn;
+ int blocks_count = 0;
+ zend_basic_block *blocks;
+ zval *zv;
+ zend_bool extra_entry_block = 0;
+
+ cfg->split_at_live_ranges = (build_flags & ZEND_CFG_SPLIT_AT_LIVE_RANGES) != 0;
+ cfg->map = block_map = zend_arena_calloc(arena, op_array->last, sizeof(uint32_t));
+ if (!block_map) {
+ return FAILURE;
+ }
+
+ /* Build CFG, Step 1: Find basic blocks starts, calculate number of blocks */
+ BB_START(0);
+ for (i = 0; i < op_array->last; i++) {
+ zend_op *opline = op_array->opcodes + i;
+ switch(opline->opcode) {
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ case ZEND_GENERATOR_RETURN:
+ case ZEND_EXIT:
+ case ZEND_THROW:
+ if (i + 1 < op_array->last) {
+ BB_START(i + 1);
+ }
+ break;
+ case ZEND_INCLUDE_OR_EVAL:
+ flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ case ZEND_GENERATOR_CREATE:
+ case ZEND_YIELD:
+ case ZEND_YIELD_FROM:
+ if (build_flags & ZEND_CFG_STACKLESS) {
+ BB_START(i + 1);
+ }
+ break;
+ case ZEND_DO_FCALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ flags |= ZEND_FUNC_HAS_CALLS;
+ if (build_flags & ZEND_CFG_STACKLESS) {
+ BB_START(i + 1);
+ }
+ break;
+ case ZEND_DO_ICALL:
+ flags |= ZEND_FUNC_HAS_CALLS;
+ break;
+ case ZEND_INIT_FCALL:
+ case ZEND_INIT_NS_FCALL_BY_NAME:
+ zv = CRT_CONSTANT(opline->op2);
+ if (opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME) {
+ /* The third literal is the lowercased unqualified name */
+ zv += 2;
+ }
+ if ((fn = zend_hash_find_ptr(EG(function_table), Z_STR_P(zv))) != NULL) {
+ if (fn->type == ZEND_INTERNAL_FUNCTION) {
+ flags |= zend_optimizer_classify_function(
+ Z_STR_P(zv), opline->extended_value);
+ }
+ }
+ break;
+ case ZEND_FAST_CALL:
+ BB_START(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes);
+ BB_START(i + 1);
+ break;
+ case ZEND_FAST_RET:
+ if (i + 1 < op_array->last) {
+ BB_START(i + 1);
+ }
+ break;
+ case ZEND_JMP:
+ BB_START(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes);
+ if (i + 1 < op_array->last) {
+ BB_START(i + 1);
+ }
+ break;
+ case ZEND_JMPZNZ:
+ BB_START(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes);
+ BB_START(ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ if (i + 1 < op_array->last) {
+ BB_START(i + 1);
+ }
+ break;
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ case ZEND_ASSERT_CHECK:
+ BB_START(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes);
+ BB_START(i + 1);
+ break;
+ case ZEND_CATCH:
+ if (!opline->result.num) {
+ BB_START(ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ }
+ BB_START(i + 1);
+ break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ BB_START(ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ BB_START(i + 1);
+ break;
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ BB_START(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes);
+ BB_START(i + 1);
+ break;
+ case ZEND_UNSET_VAR:
+ case ZEND_ISSET_ISEMPTY_VAR:
+ if (((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_LOCAL) &&
+ !(opline->extended_value & ZEND_QUICK_SET)) {
+ flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_GLOBAL ||
+ (opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_GLOBAL_LOCK) &&
+ !op_array->function_name) {
+ flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ }
+ break;
+ case ZEND_FETCH_R:
+ case ZEND_FETCH_W:
+ case ZEND_FETCH_RW:
+ case ZEND_FETCH_FUNC_ARG:
+ case ZEND_FETCH_IS:
+ case ZEND_FETCH_UNSET:
+ if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_LOCAL) {
+ flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_GLOBAL ||
+ (opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_GLOBAL_LOCK) &&
+ !op_array->function_name) {
+ flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ }
+ break;
+ }
+ }
+
+ /* If the entry block has predecessors, we may need to split it */
+ if ((build_flags & ZEND_CFG_NO_ENTRY_PREDECESSORS)
+ && op_array->last > 0 && block_map[0] > 1) {
+ extra_entry_block = 1;
+ }
+
+ if (cfg->split_at_live_ranges) {
+ for (j = 0; j < op_array->last_live_range; j++) {
+ BB_START(op_array->live_range[j].start);
+ BB_START(op_array->live_range[j].end);
+ }
+ }
+
+ if (op_array->last_try_catch) {
+ for (j = 0; j < op_array->last_try_catch; j++) {
+ BB_START(op_array->try_catch_array[j].try_op);
+ if (op_array->try_catch_array[j].catch_op) {
+ BB_START(op_array->try_catch_array[j].catch_op);
+ }
+ if (op_array->try_catch_array[j].finally_op) {
+ BB_START(op_array->try_catch_array[j].finally_op);
+ }
+ if (op_array->try_catch_array[j].finally_end) {
+ BB_START(op_array->try_catch_array[j].finally_end);
+ }
+ }
+ }
+
+ blocks_count += extra_entry_block;
+ cfg->blocks_count = blocks_count;
+
+ /* Build CFG, Step 2: Build Array of Basic Blocks */
+ cfg->blocks = blocks = zend_arena_calloc(arena, sizeof(zend_basic_block), blocks_count);
+ if (!blocks) {
+ return FAILURE;
+ }
+
+ blocks_count = -1;
+
+ if (extra_entry_block) {
+ initialize_block(&blocks[0]);
+ blocks[0].start = 0;
+ blocks[0].len = 0;
+ blocks_count++;
+ }
+
+ for (i = 0; i < op_array->last; i++) {
+ if (block_map[i]) {
+ if (blocks_count >= 0) {
+ blocks[blocks_count].len = i - blocks[blocks_count].start;
+ }
+ blocks_count++;
+ initialize_block(&blocks[blocks_count]);
+ blocks[blocks_count].start = i;
+ }
+ block_map[i] = blocks_count;
+ }
+
+ blocks[blocks_count].len = i - blocks[blocks_count].start;
+ blocks_count++;
+
+ /* Build CFG, Step 3: Calculate successors */
+ for (j = 0; j < blocks_count; j++) {
+ zend_op *opline;
+ if (blocks[j].len == 0) {
+ record_successor(blocks, j, 0, j + 1);
+ continue;
+ }
+
+ opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1;
+ switch (opline->opcode) {
+ case ZEND_FAST_RET:
+ case ZEND_RETURN:
+ case ZEND_RETURN_BY_REF:
+ case ZEND_GENERATOR_RETURN:
+ case ZEND_EXIT:
+ case ZEND_THROW:
+ break;
+ case ZEND_JMP:
+ record_successor(blocks, j, 0, block_map[OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes]);
+ break;
+ case ZEND_JMPZNZ:
+ record_successor(blocks, j, 0, block_map[OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes]);
+ record_successor(blocks, j, 1, block_map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
+ break;
+ case ZEND_JMPZ:
+ case ZEND_JMPNZ:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ case ZEND_ASSERT_CHECK:
+ record_successor(blocks, j, 0, block_map[OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes]);
+ record_successor(blocks, j, 1, j + 1);
+ break;
+ case ZEND_CATCH:
+ if (!opline->result.num) {
+ record_successor(blocks, j, 0, block_map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
+ record_successor(blocks, j, 1, j + 1);
+ } else {
+ record_successor(blocks, j, 0, j + 1);
+ }
+ break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ record_successor(blocks, j, 0, block_map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]);
+ record_successor(blocks, j, 1, j + 1);
+ break;
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ record_successor(blocks, j, 0, block_map[OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes]);
+ record_successor(blocks, j, 1, j + 1);
+ break;
+ case ZEND_FAST_CALL:
+ record_successor(blocks, j, 0, block_map[OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes]);
+ record_successor(blocks, j, 1, j + 1);
+ break;
+ default:
+ record_successor(blocks, j, 0, j + 1);
+ break;
+ }
+ }
+
+ /* Build CFG, Step 4, Mark Reachable Basic Blocks */
+ zend_mark_reachable_blocks(op_array, cfg, 0);
+
+ if (func_flags) {
+ *func_flags |= flags;
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+int zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg) /* {{{ */
+{
+ int j, edges;
+ zend_basic_block *b;
+ zend_basic_block *blocks = cfg->blocks;
+ zend_basic_block *end = blocks + cfg->blocks_count;
+ int *predecessors;
+
+ edges = 0;
+ for (b = blocks; b < end; b++) {
+ b->predecessors_count = 0;
+ }
+ for (b = blocks; b < end; b++) {
+ if (!(b->flags & ZEND_BB_REACHABLE)) {
+ b->successors[0] = -1;
+ b->successors[1] = -1;
+ b->predecessors_count = 0;
+ } else {
+ if (b->successors[0] >= 0) {
+ edges++;
+ blocks[b->successors[0]].predecessors_count++;
+ if (b->successors[1] >= 0 && b->successors[1] != b->successors[0]) {
+ edges++;
+ blocks[b->successors[1]].predecessors_count++;
+ }
+ }
+ }
+ }
+
+ cfg->predecessors = predecessors = (int*)zend_arena_calloc(arena, sizeof(int), edges);
+
+ if (!predecessors) {
+ return FAILURE;
+ }
+
+ edges = 0;
+ for (b = blocks; b < end; b++) {
+ if (b->flags & ZEND_BB_REACHABLE) {
+ b->predecessor_offset = edges;
+ edges += b->predecessors_count;
+ b->predecessors_count = 0;
+ }
+ }
+
+ for (j = 0; j < cfg->blocks_count; j++) {
+ if (blocks[j].flags & ZEND_BB_REACHABLE) {
+ if (blocks[j].successors[0] >= 0) {
+ zend_basic_block *b = blocks + blocks[j].successors[0];
+ predecessors[b->predecessor_offset + b->predecessors_count] = j;
+ b->predecessors_count++;
+ if (blocks[j].successors[1] >= 0
+ && blocks[j].successors[1] != blocks[j].successors[0]) {
+ zend_basic_block *b = blocks + blocks[j].successors[1];
+ predecessors[b->predecessor_offset + b->predecessors_count] = j;
+ b->predecessors_count++;
+ }
+ }
+ }
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+/* Computes a postorder numbering of the CFG */
+static void compute_postnum_recursive(
+ int *postnum, int *cur, const zend_cfg *cfg, int block_num) /* {{{ */
+{
+ zend_basic_block *block = &cfg->blocks[block_num];
+ if (postnum[block_num] != -1) {
+ return;
+ }
+
+ postnum[block_num] = -2; /* Marker for "currently visiting" */
+ if (block->successors[0] >= 0) {
+ compute_postnum_recursive(postnum, cur, cfg, block->successors[0]);
+ if (block->successors[1] >= 0) {
+ compute_postnum_recursive(postnum, cur, cfg, block->successors[1]);
+ }
+ }
+ postnum[block_num] = (*cur)++;
+}
+/* }}} */
+
+/* Computes dominator tree using algorithm from "A Simple, Fast Dominance Algorithm" by
+ * Cooper, Harvey and Kennedy. */
+int zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg) /* {{{ */
+{
+ zend_basic_block *blocks = cfg->blocks;
+ int blocks_count = cfg->blocks_count;
+ int j, k, changed;
+
+ ALLOCA_FLAG(use_heap)
+ int *postnum = do_alloca(sizeof(int) * cfg->blocks_count, use_heap);
+ memset(postnum, -1, sizeof(int) * cfg->blocks_count);
+ j = 0;
+ compute_postnum_recursive(postnum, &j, cfg, 0);
+
+ /* FIXME: move declarations */
+ blocks[0].idom = 0;
+ do {
+ changed = 0;
+ /* Iterating in RPO here would converge faster */
+ for (j = 1; j < blocks_count; j++) {
+ int idom = -1;
+
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+ for (k = 0; k < blocks[j].predecessors_count; k++) {
+ int pred = cfg->predecessors[blocks[j].predecessor_offset + k];
+
+ if (idom < 0) {
+ if (blocks[pred].idom >= 0)
+ idom = pred;
+ continue;
+ }
+
+ if (blocks[pred].idom >= 0) {
+ while (idom != pred) {
+ while (postnum[pred] < postnum[idom]) pred = blocks[pred].idom;
+ while (postnum[idom] < postnum[pred]) idom = blocks[idom].idom;
+ }
+ }
+ }
+
+ if (idom >= 0 && blocks[j].idom != idom) {
+ blocks[j].idom = idom;
+ changed = 1;
+ }
+ }
+ } while (changed);
+ blocks[0].idom = -1;
+
+ for (j = 1; j < blocks_count; j++) {
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+ if (blocks[j].idom >= 0) {
+ /* Sort by block number to traverse children in pre-order */
+ if (blocks[blocks[j].idom].children < 0 ||
+ j < blocks[blocks[j].idom].children) {
+ blocks[j].next_child = blocks[blocks[j].idom].children;
+ blocks[blocks[j].idom].children = j;
+ } else {
+ int k = blocks[blocks[j].idom].children;
+ while (blocks[k].next_child >=0 && j > blocks[k].next_child) {
+ k = blocks[k].next_child;
+ }
+ blocks[j].next_child = blocks[k].next_child;
+ blocks[k].next_child = j;
+ }
+ }
+ }
+
+ for (j = 0; j < blocks_count; j++) {
+ int idom = blocks[j].idom, level = 0;
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+ while (idom >= 0) {
+ level++;
+ if (blocks[idom].level >= 0) {
+ level += blocks[idom].level;
+ break;
+ } else {
+ idom = blocks[idom].idom;
+ }
+ }
+ blocks[j].level = level;
+ }
+
+ free_alloca(postnum, use_heap);
+ return SUCCESS;
+}
+/* }}} */
+
+static int dominates(zend_basic_block *blocks, int a, int b) /* {{{ */
+{
+ while (blocks[b].level > blocks[a].level) {
+ b = blocks[b].idom;
+ }
+ return a == b;
+}
+/* }}} */
+
+int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg, uint32_t *flags) /* {{{ */
+{
+ int i, j, k;
+ int depth;
+ zend_basic_block *blocks = cfg->blocks;
+ int *dj_spanning_tree;
+ zend_worklist work;
+ int flag = ZEND_FUNC_NO_LOOPS;
+ ALLOCA_FLAG(list_use_heap)
+ ALLOCA_FLAG(tree_use_heap)
+
+ ZEND_WORKLIST_ALLOCA(&work, cfg->blocks_count, list_use_heap);
+ dj_spanning_tree = do_alloca(sizeof(int) * cfg->blocks_count, tree_use_heap);
+
+ for (i = 0; i < cfg->blocks_count; i++) {
+ dj_spanning_tree[i] = -1;
+ }
+ zend_worklist_push(&work, 0);
+ while (zend_worklist_len(&work)) {
+ next:
+ i = zend_worklist_peek(&work);
+ /* Visit blocks immediately dominated by i. */
+ for (j = blocks[i].children; j >= 0; j = blocks[j].next_child) {
+ if (zend_worklist_push(&work, j)) {
+ dj_spanning_tree[j] = i;
+ goto next;
+ }
+ }
+ /* Visit join edges. */
+ for (j = 0; j < 2; j++) {
+ int succ = blocks[i].successors[j];
+ if (succ < 0) {
+ continue;
+ } else if (blocks[succ].idom == i) {
+ continue;
+ } else if (zend_worklist_push(&work, succ)) {
+ dj_spanning_tree[succ] = i;
+ goto next;
+ }
+ }
+ zend_worklist_pop(&work);
+ }
+
+ /* Identify loops. See Sreedhar et al, "Identifying Loops Using DJ
+ Graphs". */
+
+ for (i = 0, depth = 0; i < cfg->blocks_count; i++) {
+ if (blocks[i].level > depth) {
+ depth = blocks[i].level;
+ }
+ }
+ for (; depth >= 0; depth--) {
+ for (i = 0; i < cfg->blocks_count; i++) {
+ if (blocks[i].level != depth) {
+ continue;
+ }
+ zend_bitset_clear(work.visited, zend_bitset_len(cfg->blocks_count));
+ for (j = 0; j < blocks[i].predecessors_count; j++) {
+ int pred = cfg->predecessors[blocks[i].predecessor_offset + j];
+
+ /* A join edge is one for which the predecessor does not
+ immediately dominate the successor. */
+ if (blocks[i].idom == pred) {
+ continue;
+ }
+
+ /* In a loop back-edge (back-join edge), the successor dominates
+ the predecessor. */
+ if (dominates(blocks, i, pred)) {
+ blocks[i].flags |= ZEND_BB_LOOP_HEADER;
+ flag &= ~ZEND_FUNC_NO_LOOPS;
+ zend_worklist_push(&work, pred);
+ } else {
+ /* Otherwise it's a cross-join edge. See if it's a branch
+ to an ancestor on the dominator spanning tree. */
+ int dj_parent = pred;
+ while (dj_parent >= 0) {
+ if (dj_parent == i) {
+ /* An sp-back edge: mark as irreducible. */
+ blocks[i].flags |= ZEND_BB_IRREDUCIBLE_LOOP;
+ flag |= ZEND_FUNC_IRREDUCIBLE;
+ flag &= ~ZEND_FUNC_NO_LOOPS;
+ break;
+ } else {
+ dj_parent = dj_spanning_tree[dj_parent];
+ }
+ }
+ }
+ }
+ while (zend_worklist_len(&work)) {
+ j = zend_worklist_pop(&work);
+ if (blocks[j].loop_header < 0 && j != i) {
+ blocks[j].loop_header = i;
+ for (k = 0; k < blocks[j].predecessors_count; k++) {
+ zend_worklist_push(&work, cfg->predecessors[blocks[j].predecessor_offset + k]);
+ }
+ }
+ }
+ }
+ }
+
+ free_alloca(dj_spanning_tree, tree_use_heap);
+ ZEND_WORKLIST_FREE_ALLOCA(&work, list_use_heap);
+ *flags |= flag;
+
+ return SUCCESS;
+}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_cfg.h b/ext/opcache/Optimizer/zend_cfg.h
new file mode 100644
index 0000000000..da908fdbe3
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_cfg.h
@@ -0,0 +1,132 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, CFG - Control Flow Graph |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_CFG_H
+#define ZEND_CFG_H
+
+/* zend_basic_bloc.flags */
+#define ZEND_BB_START (1<<0) /* fist block */
+#define ZEND_BB_FOLLOW (1<<1) /* follows the next block */
+#define ZEND_BB_TARGET (1<<2) /* jump taget */
+#define ZEND_BB_EXIT (1<<3) /* without successors */
+#define ZEND_BB_ENTRY (1<<4) /* stackless entry */
+#define ZEND_BB_TRY (1<<5) /* start of try block */
+#define ZEND_BB_CATCH (1<<6) /* start of catch block */
+#define ZEND_BB_FINALLY (1<<7) /* start of finally block */
+#define ZEND_BB_FINALLY_END (1<<8) /* end of finally block */
+#define ZEND_BB_GEN_VAR (1<<9) /* start of live range */
+#define ZEND_BB_KILL_VAR (1<<10) /* end of live range */
+#define ZEND_BB_UNREACHABLE_FREE (1<<11) /* unreachable loop free */
+
+#define ZEND_BB_LOOP_HEADER (1<<16)
+#define ZEND_BB_IRREDUCIBLE_LOOP (1<<17)
+
+#define ZEND_BB_REACHABLE (1<<31)
+
+#define ZEND_BB_PROTECTED (ZEND_BB_ENTRY|ZEND_BB_TRY|ZEND_BB_CATCH|ZEND_BB_FINALLY|ZEND_BB_FINALLY_END|ZEND_BB_GEN_VAR|ZEND_BB_KILL_VAR)
+
+typedef struct _zend_basic_block {
+ uint32_t flags;
+ uint32_t start; /* first opcode number */
+ uint32_t len; /* number of opcodes */
+ int successors[2]; /* up to 2 successor blocks */
+ int predecessors_count; /* number of predecessors */
+ int predecessor_offset; /* offset of 1-st predecessor */
+ int idom; /* immediate dominator block */
+ int loop_header; /* closest loop header, or -1 */
+ int level; /* steps away from the entry in the dom. tree */
+ int children; /* list of dominated blocks */
+ int next_child; /* next dominated block */
+} zend_basic_block;
+
+/*
++------------+---+---+---+---+---+
+| |OP1|OP2|EXT| 0 | 1 |
++------------+---+---+---+---+---+
+|JMP |ADR| | |OP1| - |
+|JMPZ | |ADR| |OP2|FOL|
+|JMPNZ | |ADR| |OP2|FOL|
+|JMPZNZ | |ADR|ADR|OP2|EXT|
+|JMPZ_EX | |ADR| |OP2|FOL|
+|JMPNZ_EX | |ADR| |OP2|FOL|
+|JMP_SET | |ADR| |OP2|FOL|
+|COALESCE | |ADR| |OP2|FOL|
+|ASSERT_CHK | |ADR| |OP2|FOL|
+|NEW | |ADR| |OP2|FOL|
+|DCL_ANON* |ADR| | |OP1|FOL|
+|FE_RESET_* | |ADR| |OP2|FOL|
+|FE_FETCH_* | | |ADR|EXT|FOL|
+|CATCH | | |ADR|EXT|FOL|
+|FAST_CALL |ADR| | |OP1|FOL|
+|FAST_RET | | | | - | - |
+|RETURN* | | | | - | - |
+|EXIT | | | | - | - |
+|THROW | | | | - | - |
+|* | | | |FOL| - |
++------------+---+---+---+---+---+
+*/
+
+typedef struct _zend_cfg {
+ int blocks_count; /* number of basic blocks */
+ zend_basic_block *blocks; /* array of basic blocks */
+ int *predecessors;
+ uint32_t *map;
+ unsigned int split_at_live_ranges : 1;
+} zend_cfg;
+
+/* Build Flags */
+#define ZEND_RT_CONSTANTS (1<<31)
+#define ZEND_CFG_STACKLESS (1<<30)
+#define ZEND_SSA_DEBUG_LIVENESS (1<<29)
+#define ZEND_SSA_DEBUG_PHI_PLACEMENT (1<<28)
+#define ZEND_SSA_RC_INFERENCE (1<<27)
+#define ZEND_CFG_SPLIT_AT_LIVE_RANGES (1<<26)
+#define ZEND_CFG_NO_ENTRY_PREDECESSORS (1<<25)
+
+#define CRT_CONSTANT_EX(op_array, node, rt_constants) \
+ ((rt_constants) ? \
+ RT_CONSTANT(op_array, (node)) \
+ : \
+ CT_CONSTANT_EX(op_array, (node).constant) \
+ )
+
+#define CRT_CONSTANT(node) \
+ CRT_CONSTANT_EX(op_array, node, (build_flags & ZEND_RT_CONSTANTS))
+
+#define RETURN_VALUE_USED(opline) \
+ ((opline)->result_type != IS_UNUSED)
+
+BEGIN_EXTERN_C()
+
+int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flags, zend_cfg *cfg, uint32_t *func_flags);
+void zend_cfg_remark_reachable_blocks(const zend_op_array *op_array, zend_cfg *cfg);
+int zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg);
+int zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg);
+int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg, uint32_t *flags);
+
+END_EXTERN_C()
+
+#endif /* ZEND_CFG_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_dfg.c b/ext/opcache/Optimizer/zend_dfg.c
new file mode 100644
index 0000000000..97fc846d3c
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_dfg.c
@@ -0,0 +1,248 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, DFG - Data Flow Graph |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_dfg.h"
+
+int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags) /* {{{ */
+{
+ int set_size;
+ zend_basic_block *blocks = cfg->blocks;
+ int blocks_count = cfg->blocks_count;
+ zend_bitset tmp, def, use, in, out;
+ uint32_t k, var_num;
+ int j;
+
+ set_size = dfg->size;
+ tmp = dfg->tmp;
+ def = dfg->def;
+ use = dfg->use;
+ in = dfg->in;
+ out = dfg->out;
+
+ /* Collect "def" and "use" sets */
+ for (j = 0; j < blocks_count; j++) {
+ zend_op *opline, *end;
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+
+ opline = op_array->opcodes + blocks[j].start;
+ end = opline + blocks[j].len;
+ for (; opline < end; opline++) {
+ if (opline->opcode != ZEND_OP_DATA) {
+ zend_op *next = opline + 1;
+ if (next < end && next->opcode == ZEND_OP_DATA) {
+ if (next->op1_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ var_num = EX_VAR_TO_NUM(next->op1.var);
+ if (!DFG_ISSET(def, set_size, j, var_num)) {
+ DFG_SET(use, set_size, j, var_num);
+ }
+ }
+ if (next->op2_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ var_num = EX_VAR_TO_NUM(next->op2.var);
+ if (!DFG_ISSET(def, set_size, j, var_num)) {
+ DFG_SET(use, set_size, j, var_num);
+ }
+ }
+ }
+ if (opline->op1_type == IS_CV) {
+ var_num = EX_VAR_TO_NUM(opline->op1.var);
+ switch (opline->opcode) {
+ case ZEND_ADD_ARRAY_ELEMENT:
+ case ZEND_INIT_ARRAY:
+ if ((build_flags & ZEND_SSA_RC_INFERENCE)
+ || (opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
+ goto op1_def;
+ }
+ goto op1_use;
+ case ZEND_FE_RESET_R:
+ if (build_flags & ZEND_SSA_RC_INFERENCE) {
+ goto op1_def;
+ }
+ goto op1_use;
+ case ZEND_YIELD:
+ if ((build_flags & ZEND_SSA_RC_INFERENCE)
+ || (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
+ goto op1_def;
+ }
+ goto op1_use;
+ case ZEND_UNSET_VAR:
+ ZEND_ASSERT(opline->extended_value & ZEND_QUICK_SET);
+ /* break missing intentionally */
+ case ZEND_ASSIGN:
+ case ZEND_ASSIGN_REF:
+ case ZEND_BIND_GLOBAL:
+ case ZEND_BIND_STATIC:
+ case ZEND_SEND_VAR_EX:
+ case ZEND_SEND_REF:
+ case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_VAR_NO_REF_EX:
+ case ZEND_FE_RESET_RW:
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_ASSIGN_POW:
+ case ZEND_PRE_INC:
+ case ZEND_PRE_DEC:
+ case ZEND_POST_INC:
+ case ZEND_POST_DEC:
+ case ZEND_ASSIGN_DIM:
+ case ZEND_ASSIGN_OBJ:
+ case ZEND_UNSET_DIM:
+ case ZEND_UNSET_OBJ:
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_FETCH_DIM_UNSET:
+ case ZEND_FETCH_OBJ_W:
+ case ZEND_FETCH_OBJ_RW:
+ case ZEND_FETCH_OBJ_FUNC_ARG:
+ case ZEND_FETCH_OBJ_UNSET:
+ case ZEND_VERIFY_RETURN_TYPE:
+op1_def:
+ /* `def` always come along with dtor or separation,
+ * thus the origin var info might be also `use`d in the feature(CG) */
+ DFG_SET(use, set_size, j, var_num);
+ DFG_SET(def, set_size, j, var_num);
+ break;
+ default:
+op1_use:
+ if (!DFG_ISSET(def, set_size, j, var_num)) {
+ DFG_SET(use, set_size, j, var_num);
+ }
+ }
+ } else if (opline->op1_type & (IS_VAR|IS_TMP_VAR)) {
+ var_num = EX_VAR_TO_NUM(opline->op1.var);
+ if (opline->opcode == ZEND_VERIFY_RETURN_TYPE) {
+ DFG_SET(use, set_size, j, var_num);
+ DFG_SET(def, set_size, j, var_num);
+ } else if (!DFG_ISSET(def, set_size, j, var_num)) {
+ DFG_SET(use, set_size, j, var_num);
+ }
+ }
+ if (opline->op2_type == IS_CV) {
+ var_num = EX_VAR_TO_NUM(opline->op2.var);
+ switch (opline->opcode) {
+ case ZEND_ASSIGN:
+ if (build_flags & ZEND_SSA_RC_INFERENCE) {
+ goto op2_def;
+ }
+ goto op2_use;
+ case ZEND_BIND_LEXICAL:
+ if ((build_flags & ZEND_SSA_RC_INFERENCE) || opline->extended_value) {
+ goto op2_def;
+ }
+ goto op2_use;
+ case ZEND_ASSIGN_REF:
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+op2_def:
+ // FIXME: include into "use" too ...?
+ DFG_SET(use, set_size, j, var_num);
+ DFG_SET(def, set_size, j, var_num);
+ break;
+ default:
+op2_use:
+ if (!DFG_ISSET(def, set_size, j, var_num)) {
+ DFG_SET(use, set_size, j, var_num);
+ }
+ break;
+ }
+ } else if (opline->op2_type & (IS_VAR|IS_TMP_VAR)) {
+ var_num = EX_VAR_TO_NUM(opline->op2.var);
+ if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) {
+ DFG_SET(def, set_size, j, var_num);
+ } else {
+ if (!DFG_ISSET(def, set_size, j, var_num)) {
+ DFG_SET(use, set_size, j, var_num);
+ }
+ }
+ }
+ if (opline->result_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ var_num = EX_VAR_TO_NUM(opline->result.var);
+ DFG_SET(def, set_size, j, var_num);
+ }
+ }
+ }
+ }
+
+ /* Calculate "in" and "out" sets */
+ {
+ uint32_t worklist_len = zend_bitset_len(blocks_count);
+ zend_bitset worklist;
+ ALLOCA_FLAG(use_heap);
+ worklist = ZEND_BITSET_ALLOCA(worklist_len, use_heap);
+ memset(worklist, 0, worklist_len * ZEND_BITSET_ELM_SIZE);
+ for (j = 0; j < blocks_count; j++) {
+ zend_bitset_incl(worklist, j);
+ }
+ while (!zend_bitset_empty(worklist, worklist_len)) {
+ /* We use the last block on the worklist, because predecessors tend to be located
+ * before the succeeding block, so this converges faster. */
+ j = zend_bitset_last(worklist, worklist_len);
+ zend_bitset_excl(worklist, j);
+
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+ if (blocks[j].successors[0] >= 0) {
+ zend_bitset_copy(DFG_BITSET(out, set_size, j), DFG_BITSET(in, set_size, blocks[j].successors[0]), set_size);
+ if (blocks[j].successors[1] >= 0) {
+ zend_bitset_union(DFG_BITSET(out, set_size, j), DFG_BITSET(in, set_size, blocks[j].successors[1]), set_size);
+ }
+ } else {
+ zend_bitset_clear(DFG_BITSET(out, set_size, j), set_size);
+ }
+ zend_bitset_union_with_difference(tmp, DFG_BITSET(use, set_size, j), DFG_BITSET(out, set_size, j), DFG_BITSET(def, set_size, j), set_size);
+ if (!zend_bitset_equal(DFG_BITSET(in, set_size, j), tmp, set_size)) {
+ zend_bitset_copy(DFG_BITSET(in, set_size, j), tmp, set_size);
+
+ /* Add predecessors of changed block to worklist */
+ {
+ int *predecessors = &cfg->predecessors[blocks[j].predecessor_offset];
+ for (k = 0; k < blocks[j].predecessors_count; k++) {
+ zend_bitset_incl(worklist, predecessors[k]);
+ }
+ }
+ }
+ }
+
+ free_alloca(worklist, use_heap);
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_dfg.h b/ext/opcache/Optimizer/zend_dfg.h
new file mode 100644
index 0000000000..5ed8cfc5d0
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_dfg.h
@@ -0,0 +1,58 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, DFG - Data Flow Graph |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_DFG_H
+#define ZEND_DFG_H
+
+#include "zend_bitset.h"
+#include "zend_cfg.h"
+
+typedef struct _zend_dfg {
+ int vars;
+ uint32_t size;
+ zend_bitset tmp;
+ zend_bitset def;
+ zend_bitset use;
+ zend_bitset in;
+ zend_bitset out;
+} zend_dfg;
+
+#define DFG_BITSET(set, set_size, block_num) \
+ ((set) + ((block_num) * (set_size)))
+
+#define DFG_SET(set, set_size, block_num, var_num) \
+ zend_bitset_incl(DFG_BITSET(set, set_size, block_num), (var_num))
+
+#define DFG_ISSET(set, set_size, block_num, var_num) \
+ zend_bitset_in(DFG_BITSET(set, set_size, block_num), (var_num))
+
+BEGIN_EXTERN_C()
+
+int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags);
+
+END_EXTERN_C()
+
+#endif /* ZEND_DFG_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c
new file mode 100644
index 0000000000..7c225bbbe8
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_dump.c
@@ -0,0 +1,1171 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, Bytecode Visualisation |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_cfg.h"
+#include "zend_ssa.h"
+#include "zend_inference.h"
+#include "zend_func_info.h"
+#include "zend_call_graph.h"
+#include "zend_dump.h"
+
+static void zend_dump_const(const zval *zv)
+{
+ switch (Z_TYPE_P(zv)) {
+ case IS_NULL:
+ fprintf(stderr, " null");
+ break;
+ case IS_FALSE:
+ fprintf(stderr, " bool(false)");
+ break;
+ case IS_TRUE:
+ fprintf(stderr, " bool(true)");
+ break;
+ case IS_LONG:
+ fprintf(stderr, " int(" ZEND_LONG_FMT ")", Z_LVAL_P(zv));
+ break;
+ case IS_DOUBLE:
+ fprintf(stderr, " float(%g)", Z_DVAL_P(zv));
+ break;
+ case IS_STRING:
+ fprintf(stderr, " string(\"%s\")", Z_STRVAL_P(zv));
+ break;
+ case IS_ARRAY:
+ fprintf(stderr, " array(...)");
+ break;
+ default:
+ fprintf(stderr, " zval(type=%d)", Z_TYPE_P(zv));
+ break;
+ }
+}
+
+static void zend_dump_class_fetch_type(uint32_t fetch_type)
+{
+ switch (fetch_type & ZEND_FETCH_CLASS_MASK) {
+ case ZEND_FETCH_CLASS_SELF:
+ fprintf(stderr, " (self)");
+ break;
+ case ZEND_FETCH_CLASS_PARENT:
+ fprintf(stderr, " (parent)");
+ break;
+ case ZEND_FETCH_CLASS_STATIC:
+ fprintf(stderr, " (static)");
+ break;
+ case ZEND_FETCH_CLASS_AUTO:
+ fprintf(stderr, " (auto)");
+ break;
+ case ZEND_FETCH_CLASS_INTERFACE:
+ fprintf(stderr, " (interface)");
+ break;
+ case ZEND_FETCH_CLASS_TRAIT:
+ fprintf(stderr, " (trait)");
+ break;
+ }
+ if (fetch_type & ZEND_FETCH_CLASS_NO_AUTOLOAD) {
+ fprintf(stderr, " (no-autolod)");
+ }
+ if (fetch_type & ZEND_FETCH_CLASS_SILENT) {
+ fprintf(stderr, " (silent)");
+ }
+ if (fetch_type & ZEND_FETCH_CLASS_EXCEPTION) {
+ fprintf(stderr, " (exception)");
+ }
+}
+
+static void zend_dump_unused_op(const zend_op *opline, znode_op op, uint32_t flags) {
+ if (ZEND_VM_OP_NUM == (flags & ZEND_VM_OP_MASK)) {
+ fprintf(stderr, " %u", op.num);
+ } else if (ZEND_VM_OP_TRY_CATCH == (flags & ZEND_VM_OP_MASK)) {
+ if (op.num != (uint32_t)-1) {
+ fprintf(stderr, " try-catch(%u)", op.num);
+ }
+ } else if (ZEND_VM_OP_LIVE_RANGE == (flags & ZEND_VM_OP_MASK)) {
+ if (opline->extended_value & ZEND_FREE_ON_RETURN) {
+ fprintf(stderr, " live-range(%u)", op.num);
+ }
+ } else if (ZEND_VM_OP_THIS == (flags & ZEND_VM_OP_MASK)) {
+ fprintf(stderr, " THIS");
+ } else if (ZEND_VM_OP_NEXT == (flags & ZEND_VM_OP_MASK)) {
+ fprintf(stderr, " NEXT");
+ } else if (ZEND_VM_OP_CLASS_FETCH == (flags & ZEND_VM_OP_MASK)) {
+ zend_dump_class_fetch_type(op.num);
+ } else if (ZEND_VM_OP_CONSTRUCTOR == (flags & ZEND_VM_OP_MASK)) {
+ fprintf(stderr, " CONSTRUCTOR");
+ }
+}
+
+void zend_dump_var(const zend_op_array *op_array, zend_uchar var_type, int var_num)
+{
+ if (var_type == IS_CV && var_num < op_array->last_var) {
+ fprintf(stderr, "CV%d($%s)", var_num, op_array->vars[var_num]->val);
+ } else if (var_type == IS_VAR) {
+ fprintf(stderr, "V%d", var_num);
+ } else if (var_type == IS_TMP_VAR) {
+ fprintf(stderr, "T%d", var_num);
+ } else {
+ fprintf(stderr, "X%d", var_num);
+ }
+}
+
+static void zend_dump_range(const zend_ssa_range *r)
+{
+ if (r->underflow && r->overflow) {
+ return;
+ }
+ fprintf(stderr, " RANGE[");
+ if (r->underflow) {
+ fprintf(stderr, "--..");
+ } else {
+ fprintf(stderr, ZEND_LONG_FMT "..", r->min);
+ }
+ if (r->overflow) {
+ fprintf(stderr, "++]");
+ } else {
+ fprintf(stderr, ZEND_LONG_FMT "]", r->max);
+ }
+}
+
+static void zend_dump_type_info(uint32_t info, zend_class_entry *ce, int is_instanceof, uint32_t dump_flags)
+{
+ int first = 1;
+
+ fprintf(stderr, " [");
+ if (info & MAY_BE_UNDEF) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "undef");
+ }
+ if (info & MAY_BE_REF) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "ref");
+ }
+ if (dump_flags & ZEND_DUMP_RC_INFERENCE) {
+ if (info & MAY_BE_RC1) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "rc1");
+ }
+ if (info & MAY_BE_RCN) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "rcn");
+ }
+ }
+ if (info & MAY_BE_CLASS) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "class");
+ if (ce) {
+ if (is_instanceof) {
+ fprintf(stderr, " (instanceof %s)", ce->name->val);
+ } else {
+ fprintf(stderr, " (%s)", ce->name->val);
+ }
+ }
+ } else if ((info & MAY_BE_ANY) == MAY_BE_ANY) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "any");
+ } else {
+ if (info & MAY_BE_NULL) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "null");
+ }
+ if ((info & MAY_BE_FALSE) && (info & MAY_BE_TRUE)) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "bool");
+ } else if (info & MAY_BE_FALSE) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "false");
+ } else if (info & MAY_BE_TRUE) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "true");
+ }
+ if (info & MAY_BE_LONG) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "long");
+ }
+ if (info & MAY_BE_DOUBLE) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "double");
+ }
+ if (info & MAY_BE_STRING) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "string");
+ }
+ if (info & MAY_BE_ARRAY) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "array");
+ if ((info & MAY_BE_ARRAY_KEY_ANY) != 0 &&
+ (info & MAY_BE_ARRAY_KEY_ANY) != MAY_BE_ARRAY_KEY_ANY) {
+ int afirst = 1;
+ fprintf(stderr, " [");
+ if (info & MAY_BE_ARRAY_KEY_LONG) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "long");
+ }
+ if (info & MAY_BE_ARRAY_KEY_STRING) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "string");
+ }
+ fprintf(stderr, "]");
+ }
+ if (info & (MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF)) {
+ int afirst = 1;
+ fprintf(stderr, " of [");
+ if ((info & MAY_BE_ARRAY_OF_ANY) == MAY_BE_ARRAY_OF_ANY) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "any");
+ } else {
+ if (info & MAY_BE_ARRAY_OF_NULL) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "null");
+ }
+ if (info & MAY_BE_ARRAY_OF_FALSE) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "false");
+ }
+ if (info & MAY_BE_ARRAY_OF_TRUE) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "true");
+ }
+ if (info & MAY_BE_ARRAY_OF_LONG) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "long");
+ }
+ if (info & MAY_BE_ARRAY_OF_DOUBLE) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "double");
+ }
+ if (info & MAY_BE_ARRAY_OF_STRING) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "string");
+ }
+ if (info & MAY_BE_ARRAY_OF_ARRAY) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "array");
+ }
+ if (info & MAY_BE_ARRAY_OF_OBJECT) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "object");
+ }
+ if (info & MAY_BE_ARRAY_OF_RESOURCE) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "resource");
+ }
+ }
+ if (info & MAY_BE_ARRAY_OF_REF) {
+ if (afirst) afirst = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "ref");
+ }
+ fprintf(stderr, "]");
+ }
+ }
+ if (info & MAY_BE_OBJECT) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "object");
+ if (ce) {
+ if (is_instanceof) {
+ fprintf(stderr, " (instanceof %s)", ce->name->val);
+ } else {
+ fprintf(stderr, " (%s)", ce->name->val);
+ }
+ }
+ }
+ if (info & MAY_BE_RESOURCE) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "resource");
+ }
+ }
+ if (info & MAY_BE_ERROR) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "error");
+ }
+//TODO: this is useful only for JIT???
+ if (info & MAY_BE_IN_REG) {
+ if (first) first = 0; else fprintf(stderr, ", ");
+ fprintf(stderr, "reg");
+ }
+ fprintf(stderr, "]");
+}
+
+static void zend_dump_ssa_var_info(const zend_ssa *ssa, int ssa_var_num, uint32_t dump_flags)
+{
+ zend_dump_type_info(
+ ssa->var_info[ssa_var_num].type,
+ ssa->var_info[ssa_var_num].ce,
+ ssa->var_info[ssa_var_num].ce ?
+ ssa->var_info[ssa_var_num].is_instanceof : 0,
+ dump_flags);
+}
+
+static void zend_dump_ssa_var(const zend_op_array *op_array, const zend_ssa *ssa, int ssa_var_num, zend_uchar var_type, int var_num, uint32_t dump_flags)
+{
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, "#%d.", ssa_var_num);
+ } else {
+ fprintf(stderr, "#?.");
+ }
+ zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : var_type), var_num);
+
+ if (ssa_var_num >= 0 && ssa->vars) {
+ if (ssa_var_num >= 0 && ssa->vars[ssa_var_num].no_val) {
+ fprintf(stderr, " NOVAL");
+ }
+ if (ssa->var_info) {
+ zend_dump_ssa_var_info(ssa, ssa_var_num, dump_flags);
+ if (ssa->var_info[ssa_var_num].has_range) {
+ zend_dump_range(&ssa->var_info[ssa_var_num].range);
+ }
+ }
+ }
+}
+
+static void zend_dump_pi_constraint(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_pi_constraint *r, uint32_t dump_flags)
+{
+ if (r->type_mask != (uint32_t) -1) {
+ fprintf(stderr, " TYPE");
+ zend_dump_type_info(r->type_mask, NULL, 0, dump_flags);
+ return;
+ }
+
+ if (r->range.underflow && r->range.overflow) {
+ return;
+ }
+ fprintf(stderr, " RANGE");
+ if (r->negative) {
+ fprintf(stderr, "~");
+ }
+ fprintf(stderr, "[");
+ if (r->range.underflow) {
+ fprintf(stderr, "-- .. ");
+ } else {
+ if (r->min_ssa_var >= 0) {
+ zend_dump_ssa_var(op_array, ssa, r->min_ssa_var, (r->min_var < op_array->last_var ? IS_CV : 0), r->min_var, dump_flags);
+ if (r->range.min > 0) {
+ fprintf(stderr, " + " ZEND_LONG_FMT, r->range.min);
+ } else if (r->range.min < 0) {
+ fprintf(stderr, " - " ZEND_LONG_FMT, -r->range.min);
+ }
+ fprintf(stderr, " .. ");
+ } else {
+ fprintf(stderr, ZEND_LONG_FMT " .. ", r->range.min);
+ }
+ }
+ if (r->range.overflow) {
+ fprintf(stderr, "++]");
+ } else {
+ if (r->max_ssa_var >= 0) {
+ zend_dump_ssa_var(op_array, ssa, r->max_ssa_var, (r->max_var < op_array->last_var ? IS_CV : 0), r->max_var, dump_flags);
+ if (r->range.max > 0) {
+ fprintf(stderr, " + " ZEND_LONG_FMT, r->range.max);
+ } else if (r->range.max < 0) {
+ fprintf(stderr, " - " ZEND_LONG_FMT, -r->range.max);
+ }
+ fprintf(stderr, "]");
+ } else {
+ fprintf(stderr, ZEND_LONG_FMT "]", r->range.max);
+ }
+ }
+}
+
+static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, const zend_op *opline, uint32_t dump_flags, const void *data)
+{
+ const char *name = zend_get_opcode_name(opline->opcode);
+ uint32_t flags = zend_get_opcode_flags(opline->opcode);
+ uint32_t n = 0;
+ int len = 0;
+ const zend_ssa *ssa = NULL;
+
+ if (dump_flags & ZEND_DUMP_SSA) {
+ ssa = (const zend_ssa*)data;
+ }
+
+ if (!b) {
+ len = fprintf(stderr, "L%u:", (uint32_t)(opline - op_array->opcodes));
+ }
+ fprintf(stderr, "%*c", 8-len, ' ');
+
+ if (!ssa || !ssa->ops || ssa->ops[opline - op_array->opcodes].result_use < 0) {
+ if (opline->result_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_def >= 0) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def;
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.var), dump_flags);
+ } else {
+ zend_dump_var(op_array, opline->result_type, EX_VAR_TO_NUM(opline->result.var));
+ }
+ fprintf(stderr, " = ");
+ }
+ }
+
+ if (name) {
+ fprintf(stderr, "%s", (name + 5));
+ } else {
+ fprintf(stderr, "OP_%d", (int)opline->opcode);
+ }
+
+ if (ZEND_VM_EXT_NUM == (flags & ZEND_VM_EXT_MASK)) {
+ fprintf(stderr, " %u", opline->extended_value);
+ } else if (ZEND_VM_EXT_DIM_OBJ == (flags & ZEND_VM_EXT_MASK)) {
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ fprintf(stderr, " (dim)");
+ } else if (opline->extended_value == ZEND_ASSIGN_OBJ) {
+ fprintf(stderr, " (obj)");
+ }
+ } else if (ZEND_VM_EXT_CLASS_FETCH == (flags & ZEND_VM_EXT_MASK)) {
+ zend_dump_class_fetch_type(opline->extended_value);
+ } else if (ZEND_VM_EXT_CONST_FETCH == (flags & ZEND_VM_EXT_MASK)) {
+ if (opline->extended_value & IS_CONSTANT_UNQUALIFIED) {
+ fprintf(stderr, " (unqualified)");
+ }
+ if (opline->extended_value & IS_CONSTANT_CLASS) {
+ fprintf(stderr, " (__class__)");
+ }
+ if (opline->extended_value & IS_CONSTANT_IN_NAMESPACE) {
+ fprintf(stderr, " (in-namespace)");
+ }
+ } else if (ZEND_VM_EXT_TYPE == (flags & ZEND_VM_EXT_MASK)) {
+ switch (opline->extended_value) {
+ case IS_NULL:
+ fprintf(stderr, " (null)");
+ break;
+ case IS_FALSE:
+ fprintf(stderr, " (false)");
+ break;
+ case IS_TRUE:
+ fprintf(stderr, " (true)");
+ break;
+ case IS_LONG:
+ fprintf(stderr, " (long)");
+ break;
+ case IS_DOUBLE:
+ fprintf(stderr, " (double)");
+ break;
+ case IS_STRING:
+ fprintf(stderr, " (string)");
+ break;
+ case IS_ARRAY:
+ fprintf(stderr, " (array)");
+ break;
+ case IS_OBJECT:
+ fprintf(stderr, " (object)");
+ break;
+ case IS_RESOURCE:
+ fprintf(stderr, " (resource)");
+ break;
+ case _IS_BOOL:
+ fprintf(stderr, " (bool)");
+ break;
+ case IS_CALLABLE:
+ fprintf(stderr, " (callable)");
+ break;
+ case IS_VOID:
+ fprintf(stderr, " (void)");
+ break;
+ default:
+ fprintf(stderr, " (\?\?\?)");
+ break;
+ }
+ } else if (ZEND_VM_EXT_EVAL == (flags & ZEND_VM_EXT_MASK)) {
+ switch (opline->extended_value) {
+ case ZEND_EVAL:
+ fprintf(stderr, " (eval)");
+ break;
+ case ZEND_INCLUDE:
+ fprintf(stderr, " (include)");
+ break;
+ case ZEND_INCLUDE_ONCE:
+ fprintf(stderr, " (include_once)");
+ break;
+ case ZEND_REQUIRE:
+ fprintf(stderr, " (require)");
+ break;
+ case ZEND_REQUIRE_ONCE:
+ fprintf(stderr, " (require_once)");
+ break;
+ default:
+ fprintf(stderr, " (\?\?\?)");
+ break;
+ }
+ } else if (ZEND_VM_EXT_SRC == (flags & ZEND_VM_EXT_MASK)) {
+ if (opline->extended_value == ZEND_RETURNS_VALUE) {
+ fprintf(stderr, " (value)");
+ } else if (opline->extended_value == ZEND_RETURNS_FUNCTION) {
+ fprintf(stderr, " (function)");
+ }
+ } else {
+ if (ZEND_VM_EXT_VAR_FETCH & flags) {
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ fprintf(stderr, " (global)");
+ break;
+ case ZEND_FETCH_LOCAL:
+ fprintf(stderr, " (local)");
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ fprintf(stderr, " (global+lock)");
+ break;
+ }
+ }
+ if (ZEND_VM_EXT_ISSET & flags) {
+ if (opline->extended_value & ZEND_QUICK_SET) {
+ fprintf(stderr, " (quick)");
+ }
+ if (opline->extended_value & ZEND_ISSET) {
+ fprintf(stderr, " (isset)");
+ } else if (opline->extended_value & ZEND_ISEMPTY) {
+ fprintf(stderr, " (empty)");
+ }
+ }
+ if (ZEND_VM_EXT_ARG_NUM & flags) {
+ fprintf(stderr, " %u", opline->extended_value & ZEND_FETCH_ARG_MASK);
+ }
+ if (ZEND_VM_EXT_ARRAY_INIT & flags) {
+ fprintf(stderr, " %u", opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT);
+ if (!(opline->extended_value & ZEND_ARRAY_NOT_PACKED)) {
+ fprintf(stderr, " (packed)");
+ }
+ }
+ if (ZEND_VM_EXT_REF & flags) {
+ if (opline->extended_value & ZEND_ARRAY_ELEMENT_REF) {
+ fprintf(stderr, " (ref)");
+ }
+ }
+ }
+
+ if (opline->op1_type == IS_CONST) {
+ zend_dump_const(CRT_CONSTANT_EX(op_array, opline->op1, (dump_flags & ZEND_DUMP_RT_CONSTANTS)));
+ } else if (opline->op1_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ if (ssa && ssa->ops) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].op1_use;
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, " ");
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var), dump_flags);
+ } else if (ssa->ops[opline - op_array->opcodes].op1_def < 0) {
+ fprintf(stderr, " ");
+ zend_dump_var(op_array, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var));
+ }
+ } else {
+ fprintf(stderr, " ");
+ zend_dump_var(op_array, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var));
+ }
+ if (ssa && ssa->ops) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].op1_def;
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, " -> ");
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op1_type, EX_VAR_TO_NUM(opline->op1.var), dump_flags);
+ }
+ }
+ } else {
+ uint32_t op1_flags = ZEND_VM_OP1_FLAGS(flags);
+ if (ZEND_VM_OP_JMP_ADDR == (op1_flags & ZEND_VM_OP_MASK)) {
+ if (b) {
+ fprintf(stderr, " BB%d", b->successors[n++]);
+ } else {
+ fprintf(stderr, " L%u", (uint32_t)(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes));
+ }
+ } else {
+ zend_dump_unused_op(opline, opline->op1, op1_flags);
+ }
+ }
+
+ if (opline->op2_type == IS_CONST) {
+ zend_dump_const(CRT_CONSTANT_EX(op_array, opline->op2, (dump_flags & ZEND_DUMP_RT_CONSTANTS)));
+ } else if (opline->op2_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ if (ssa && ssa->ops) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].op2_use;
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, " ");
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var), dump_flags);
+ } else if (ssa->ops[opline - op_array->opcodes].op2_def < 0) {
+ fprintf(stderr, " ");
+ zend_dump_var(op_array, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var));
+ }
+ } else {
+ fprintf(stderr, " ");
+ zend_dump_var(op_array, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var));
+ }
+ if (ssa && ssa->ops) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].op2_def;
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, " -> ");
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->op2_type, EX_VAR_TO_NUM(opline->op2.var), dump_flags);
+ }
+ }
+ } else {
+ uint32_t op2_flags = ZEND_VM_OP2_FLAGS(flags);
+ if (ZEND_VM_OP_JMP_ADDR == (op2_flags & ZEND_VM_OP_MASK)) {
+ if (b) {
+ fprintf(stderr, " BB%d", b->successors[n++]);
+ } else {
+ fprintf(stderr, " L%u", (uint32_t)(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes));
+ }
+ } else {
+ zend_dump_unused_op(opline, opline->op2, op2_flags);
+ }
+ }
+
+ if (ZEND_VM_EXT_JMP_ADDR == (flags & ZEND_VM_EXT_MASK)) {
+ if (opline->opcode != ZEND_CATCH || !opline->result.num) {
+ if (b) {
+ fprintf(stderr, " BB%d", b->successors[n++]);
+ } else {
+ fprintf(stderr, " L%u", (uint32_t)ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
+ }
+ }
+ }
+ if (opline->result_type == IS_CONST) {
+ zend_dump_const(CRT_CONSTANT_EX(op_array, opline->result, (dump_flags & ZEND_DUMP_RT_CONSTANTS)));
+ } else if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_use >= 0) {
+ if (opline->result_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ if (ssa && ssa->ops) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_use;
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, " ");
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.var), dump_flags);
+ }
+ } else {
+ fprintf(stderr, " ");
+ zend_dump_var(op_array, opline->result_type, EX_VAR_TO_NUM(opline->result.var));
+ }
+ if (ssa && ssa->ops) {
+ int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def;
+ if (ssa_var_num >= 0) {
+ fprintf(stderr, " -> ");
+ zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.var), dump_flags);
+ }
+ }
+ }
+ }
+ fprintf(stderr, "\n");
+}
+
+static void zend_dump_block_info(const zend_cfg *cfg, int n, uint32_t dump_flags)
+{
+ zend_basic_block *b = cfg->blocks + n;
+ int printed = 0;
+
+ fprintf(stderr, "BB%d:", n);
+ if (b->flags & ZEND_BB_START) {
+ fprintf(stderr, " start");
+ }
+ if (b->flags & ZEND_BB_FOLLOW) {
+ fprintf(stderr, " follow");
+ }
+ if (b->flags & ZEND_BB_TARGET) {
+ fprintf(stderr, " target");
+ }
+ if (b->flags & ZEND_BB_EXIT) {
+ fprintf(stderr, " exit");
+ }
+ if (b->flags & ZEND_BB_ENTRY) {
+ fprintf(stderr, " entry");
+ }
+ if (b->flags & ZEND_BB_TRY) {
+ fprintf(stderr, " try");
+ }
+ if (b->flags & ZEND_BB_CATCH) {
+ fprintf(stderr, " catch");
+ }
+ if (b->flags & ZEND_BB_FINALLY) {
+ fprintf(stderr, " finally");
+ }
+ if (b->flags & ZEND_BB_FINALLY_END) {
+ fprintf(stderr, " finally_end");
+ }
+ if (b->flags & ZEND_BB_GEN_VAR) {
+ fprintf(stderr, " gen_var");
+ }
+ if (b->flags & ZEND_BB_KILL_VAR) {
+ fprintf(stderr, " kill_var");
+ }
+ if (!(dump_flags & ZEND_DUMP_HIDE_UNREACHABLE) & !(b->flags & ZEND_BB_REACHABLE)) {
+ fprintf(stderr, " unreachable");
+ }
+ if (b->flags & ZEND_BB_LOOP_HEADER) {
+ fprintf(stderr, " loop_header");
+ }
+ if (b->flags & ZEND_BB_IRREDUCIBLE_LOOP) {
+ fprintf(stderr, " irreducible");
+ }
+ if (b->len != 0) {
+ fprintf(stderr, " lines=[%d-%d]", b->start, b->start + b->len - 1);
+ } else {
+ fprintf(stderr, " empty");
+ }
+ fprintf(stderr, "\n");
+
+ if (b->predecessors_count) {
+ int *p = cfg->predecessors + b->predecessor_offset;
+ int *end = p + b->predecessors_count;
+
+ fprintf(stderr, " ; from=(BB%d", *p);
+ for (p++; p < end; p++) {
+ fprintf(stderr, ", BB%d", *p);
+ }
+ fprintf(stderr, ")\n");
+ }
+
+ if (b->successors[0] != -1) {
+ fprintf(stderr, " ; to=(BB%d", b->successors[0]);
+ printed = 1;
+ if (b->successors[1] != -1) {
+ fprintf(stderr, ", BB%d", b->successors[1]);
+ }
+ }
+ if (printed) {
+ fprintf(stderr, ")\n");
+ }
+
+ if (b->idom >= 0) {
+ fprintf(stderr, " ; idom=BB%d\n", b->idom);
+ }
+ if (b->level >= 0) {
+ fprintf(stderr, " ; level=%d\n", b->level);
+ }
+ if (b->loop_header >= 0) {
+ fprintf(stderr, " ; loop_header=%d\n", b->level);
+ }
+ if (b->children >= 0) {
+ int j = b->children;
+ fprintf(stderr, " ; children=(BB%d", j);
+ j = cfg->blocks[j].next_child;
+ while (j >= 0) {
+ fprintf(stderr, ", BB%d", j);
+ j = cfg->blocks[j].next_child;
+ }
+ fprintf(stderr, ")\n");
+ }
+}
+
+static void zend_dump_block_header(const zend_cfg *cfg, const zend_op_array *op_array, const zend_ssa *ssa, int n, uint32_t dump_flags)
+{
+ zend_dump_block_info(cfg, n, dump_flags);
+ if (ssa && ssa->blocks && ssa->blocks[n].phis) {
+ zend_ssa_phi *p = ssa->blocks[n].phis;
+
+ do {
+ int j;
+
+ fprintf(stderr, " ");
+ zend_dump_ssa_var(op_array, ssa, p->ssa_var, 0, p->var, dump_flags);
+ if (p->pi < 0) {
+ fprintf(stderr, " = Phi(");
+ for (j = 0; j < cfg->blocks[n].predecessors_count; j++) {
+ if (j > 0) {
+ fprintf(stderr, ", ");
+ }
+ zend_dump_ssa_var(op_array, ssa, p->sources[j], 0, p->var, dump_flags);
+ }
+ fprintf(stderr, ")\n");
+ } else {
+ fprintf(stderr, " = Pi<BB%d>(", p->pi);
+ zend_dump_ssa_var(op_array, ssa, p->sources[0], 0, p->var, dump_flags);
+ fprintf(stderr, " &");
+ zend_dump_pi_constraint(op_array, ssa, &p->constraint, dump_flags);
+ fprintf(stderr, ")\n");
+ }
+ p = p->next;
+ } while (p);
+ }
+}
+
+static void zend_dump_op_array_name(const zend_op_array *op_array)
+{
+ zend_func_info *func_info = NULL;
+
+ func_info = ZEND_FUNC_INFO(op_array);
+ if (op_array->function_name) {
+ if (op_array->scope && op_array->scope->name) {
+ fprintf(stderr, "%s::%s", op_array->scope->name->val, op_array->function_name->val);
+ } else {
+ fprintf(stderr, "%s", op_array->function_name->val);
+ }
+ } else {
+ fprintf(stderr, "%s", "$_main");
+ }
+ if (func_info && func_info->clone_num > 0) {
+ fprintf(stderr, "_@_clone_%d", func_info->clone_num);
+ }
+}
+
+void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, const char *msg, const void *data)
+{
+ int i;
+ const zend_cfg *cfg = NULL;
+ const zend_ssa *ssa = NULL;
+ zend_func_info *func_info = NULL;
+ uint32_t func_flags = 0;
+
+ if (dump_flags & (ZEND_DUMP_CFG|ZEND_DUMP_SSA)) {
+ cfg = (const zend_cfg*)data;
+ if (!cfg->blocks) {
+ cfg = data = NULL;
+ }
+ }
+ if (dump_flags & ZEND_DUMP_SSA) {
+ ssa = (const zend_ssa*)data;
+ }
+
+ func_info = ZEND_FUNC_INFO(op_array);
+ if (func_info) {
+ func_flags = func_info->flags;
+ }
+
+ fprintf(stderr, "\n");
+ zend_dump_op_array_name(op_array);
+ fprintf(stderr, ": ; (lines=%d, args=%d",
+ op_array->last,
+ op_array->num_args);
+ if (func_info && func_info->num_args >= 0) {
+ fprintf(stderr, "/%d", func_info->num_args);
+ }
+ fprintf(stderr, ", vars=%d, tmps=%d", op_array->last_var, op_array->T);
+ if (ssa) {
+ fprintf(stderr, ", ssa_vars=%d", ssa->vars_count);
+ }
+ if (func_flags & ZEND_FUNC_INDIRECT_VAR_ACCESS) {
+ fprintf(stderr, ", dynamic");
+ }
+ if (func_flags & ZEND_FUNC_RECURSIVE) {
+ fprintf(stderr, ", recursive");
+ if (func_flags & ZEND_FUNC_RECURSIVE_DIRECTLY) {
+ fprintf(stderr, " directly");
+ }
+ if (func_flags & ZEND_FUNC_RECURSIVE_INDIRECTLY) {
+ fprintf(stderr, " indirectly");
+ }
+ }
+ if (func_flags & ZEND_FUNC_IRREDUCIBLE) {
+ fprintf(stderr, ", irreducable");
+ }
+ if (func_flags & ZEND_FUNC_NO_LOOPS) {
+ fprintf(stderr, ", no_loops");
+ }
+//TODO: this is useful only for JIT???
+#if 0
+ if (info->flags & ZEND_JIT_FUNC_NO_IN_MEM_CVS) {
+ fprintf(stderr, ", no_in_mem_cvs");
+ }
+ if (info->flags & ZEND_JIT_FUNC_NO_USED_ARGS) {
+ fprintf(stderr, ", no_used_args");
+ }
+ if (info->flags & ZEND_JIT_FUNC_NO_SYMTAB) {
+ fprintf(stderr, ", no_symtab");
+ }
+ if (info->flags & ZEND_JIT_FUNC_NO_FRAME) {
+ fprintf(stderr, ", no_frame");
+ }
+ if (info->flags & ZEND_JIT_FUNC_INLINE) {
+ fprintf(stderr, ", inline");
+ }
+#endif
+ if (func_info && func_info->return_value_used == 0) {
+ fprintf(stderr, ", no_return_value");
+ } else if (func_info && func_info->return_value_used == 1) {
+ fprintf(stderr, ", return_value");
+ }
+ fprintf(stderr, ")\n");
+ if (msg) {
+ fprintf(stderr, " ; (%s)\n", msg);
+ }
+ fprintf(stderr, " ; %s:%u-%u\n", op_array->filename->val, op_array->line_start, op_array->line_end);
+
+ if (func_info && func_info->num_args > 0) {
+ for (i = 0; i < MIN(op_array->num_args, func_info->num_args ); i++) {
+ fprintf(stderr, " ; arg %d ", i);
+ zend_dump_type_info(func_info->arg_info[i].info.type, func_info->arg_info[i].info.ce, func_info->arg_info[i].info.is_instanceof, dump_flags);
+ zend_dump_range(&func_info->arg_info[i].info.range);
+ fprintf(stderr, "\n");
+ }
+ }
+
+ if (func_info) {
+ fprintf(stderr, " ; return ");
+ zend_dump_type_info(func_info->return_info.type, func_info->return_info.ce, func_info->return_info.is_instanceof, dump_flags);
+ zend_dump_range(&func_info->return_info.range);
+ fprintf(stderr, "\n");
+ }
+
+ if (ssa && ssa->var_info) {
+ for (i = 0; i < op_array->last_var; i++) {
+ fprintf(stderr, " ; ");
+ zend_dump_ssa_var(op_array, ssa, i, IS_CV, i, dump_flags);
+ fprintf(stderr, "\n");
+ }
+ }
+
+ if (cfg) {
+ int n;
+ zend_basic_block *b;
+
+ for (n = 0; n < cfg->blocks_count; n++) {
+ b = cfg->blocks + n;
+ if (!(dump_flags & ZEND_DUMP_HIDE_UNREACHABLE) || (b->flags & ZEND_BB_REACHABLE)) {
+ const zend_op *opline;
+ const zend_op *end;
+
+ zend_dump_block_header(cfg, op_array, ssa, n, dump_flags);
+ opline = op_array->opcodes + b->start;
+ end = opline + b->len;
+ while (opline < end) {
+ zend_dump_op(op_array, b, opline, dump_flags, data);
+ opline++;
+ }
+ }
+ }
+ if (op_array->last_live_range) {
+ fprintf(stderr, "LIVE RANGES:\n");
+ for (i = 0; i < op_array->last_live_range; i++) {
+ if (cfg->split_at_live_ranges) {
+ fprintf(stderr, " %u: BB%u - BB%u ",
+ EX_VAR_TO_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK),
+ cfg->map[op_array->live_range[i].start],
+ cfg->map[op_array->live_range[i].end]);
+ } else {
+ fprintf(stderr, " %u: L%u - L%u ",
+ EX_VAR_TO_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK),
+ op_array->live_range[i].start,
+ op_array->live_range[i].end);
+ }
+ switch (op_array->live_range[i].var & ZEND_LIVE_MASK) {
+ case ZEND_LIVE_TMPVAR:
+ fprintf(stderr, "(tmp/var)\n");
+ break;
+ case ZEND_LIVE_LOOP:
+ fprintf(stderr, "(loop)\n");
+ break;
+ case ZEND_LIVE_SILENCE:
+ fprintf(stderr, "(silence)\n");
+ break;
+ case ZEND_LIVE_ROPE:
+ fprintf(stderr, "(rope)\n");
+ break;
+ }
+ }
+ }
+ if (op_array->last_try_catch) {
+ fprintf(stderr, "EXCEPTION TABLE:\n");
+ for (i = 0; i < op_array->last_try_catch; i++) {
+ fprintf(stderr, " BB%u",
+ cfg->map[op_array->try_catch_array[i].try_op]);
+ if (op_array->try_catch_array[i].catch_op) {
+ fprintf(stderr, ", BB%u",
+ cfg->map[op_array->try_catch_array[i].catch_op]);
+ } else {
+ fprintf(stderr, ", -");
+ }
+ if (op_array->try_catch_array[i].finally_op) {
+ fprintf(stderr, ", BB%u",
+ cfg->map[op_array->try_catch_array[i].finally_op]);
+ } else {
+ fprintf(stderr, ", -");
+ }
+ if (op_array->try_catch_array[i].finally_end) {
+ fprintf(stderr, ", BB%u\n",
+ cfg->map[op_array->try_catch_array[i].finally_end]);
+ } else {
+ fprintf(stderr, ", -\n");
+ }
+ }
+ }
+ } else {
+ const zend_op *opline = op_array->opcodes;
+ const zend_op *end = opline + op_array->last;
+
+ while (opline < end) {
+ zend_dump_op(op_array, NULL, opline, dump_flags, data);
+ opline++;
+ }
+ if (op_array->last_live_range) {
+ fprintf(stderr, "LIVE RANGES:\n");
+ for (i = 0; i < op_array->last_live_range; i++) {
+ fprintf(stderr, " %u: L%u - L%u ",
+ EX_VAR_TO_NUM(op_array->live_range[i].var & ~ZEND_LIVE_MASK),
+ op_array->live_range[i].start,
+ op_array->live_range[i].end);
+ switch (op_array->live_range[i].var & ZEND_LIVE_MASK) {
+ case ZEND_LIVE_TMPVAR:
+ fprintf(stderr, "(tmp/var)\n");
+ break;
+ case ZEND_LIVE_LOOP:
+ fprintf(stderr, "(loop)\n");
+ break;
+ case ZEND_LIVE_SILENCE:
+ fprintf(stderr, "(silence)\n");
+ break;
+ case ZEND_LIVE_ROPE:
+ fprintf(stderr, "(rope)\n");
+ break;
+ }
+ }
+ }
+ if (op_array->last_try_catch) {
+ fprintf(stderr, "EXCEPTION TABLE:\n");
+ for (i = 0; i < op_array->last_try_catch; i++) {
+ fprintf(stderr, " L%u",
+ op_array->try_catch_array[i].try_op);
+ if (op_array->try_catch_array[i].catch_op) {
+ fprintf(stderr, ", L%u",
+ op_array->try_catch_array[i].catch_op);
+ } else {
+ fprintf(stderr, ", -");
+ }
+ if (op_array->try_catch_array[i].finally_op) {
+ fprintf(stderr, ", L%u",
+ op_array->try_catch_array[i].finally_op);
+ } else {
+ fprintf(stderr, ", -");
+ }
+ if (op_array->try_catch_array[i].finally_end) {
+ fprintf(stderr, ", L%u\n",
+ op_array->try_catch_array[i].finally_end);
+ } else {
+ fprintf(stderr, ", -\n");
+ }
+ }
+ }
+ }
+}
+
+void zend_dump_dominators(const zend_op_array *op_array, const zend_cfg *cfg)
+{
+ int j;
+
+ fprintf(stderr, "\nDOMINATORS-TREE for \"");
+ zend_dump_op_array_name(op_array);
+ fprintf(stderr, "\"\n");
+ for (j = 0; j < cfg->blocks_count; j++) {
+ zend_basic_block *b = cfg->blocks + j;
+ if (b->flags & ZEND_BB_REACHABLE) {
+ zend_dump_block_info(cfg, j, 0);
+ }
+ }
+}
+
+void zend_dump_variables(const zend_op_array *op_array)
+{
+ int j;
+
+ fprintf(stderr, "\nCV Variables for \"");
+ zend_dump_op_array_name(op_array);
+ fprintf(stderr, "\"\n");
+ for (j = 0; j < op_array->last_var; j++) {
+ fprintf(stderr, " ");
+ zend_dump_var(op_array, IS_CV, j);
+ fprintf(stderr, "\n");
+ }
+}
+
+void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flags)
+{
+ int j;
+
+ if (ssa->vars) {
+ fprintf(stderr, "\nSSA Variable for \"");
+ zend_dump_op_array_name(op_array);
+ fprintf(stderr, "\"\n");
+
+ for (j = 0; j < ssa->vars_count; j++) {
+ fprintf(stderr, " ");
+ zend_dump_ssa_var(op_array, ssa, j, IS_CV, ssa->vars[j].var, dump_flags);
+ if (ssa->vars[j].scc >= 0) {
+ if (ssa->vars[j].scc_entry) {
+ fprintf(stderr, " *");
+ } else {
+ fprintf(stderr, " ");
+ }
+ fprintf(stderr, "SCC=%d", ssa->vars[j].scc);
+ }
+ fprintf(stderr, "\n");
+ }
+ }
+}
+
+static void zend_dump_var_set(const zend_op_array *op_array, const char *name, zend_bitset set)
+{
+ int first = 1;
+ uint32_t i;
+
+ fprintf(stderr, " ; %s = {", name);
+ for (i = 0; i < op_array->last_var + op_array->T; i++) {
+ if (zend_bitset_in(set, i)) {
+ if (first) {
+ first = 0;
+ } else {
+ fprintf(stderr, ", ");
+ }
+ zend_dump_var(op_array, IS_CV, i);
+ }
+ }
+ fprintf(stderr, "}\n");
+}
+
+void zend_dump_dfg(const zend_op_array *op_array, const zend_cfg *cfg, const zend_dfg *dfg)
+{
+ int j;
+ fprintf(stderr, "\nVariable Liveness for \"");
+ zend_dump_op_array_name(op_array);
+ fprintf(stderr, "\"\n");
+
+ for (j = 0; j < cfg->blocks_count; j++) {
+ fprintf(stderr, " BB%d:\n", j);
+ zend_dump_var_set(op_array, "def", DFG_BITSET(dfg->def, dfg->size, j));
+ zend_dump_var_set(op_array, "use", DFG_BITSET(dfg->use, dfg->size, j));
+ zend_dump_var_set(op_array, "in ", DFG_BITSET(dfg->in, dfg->size, j));
+ zend_dump_var_set(op_array, "out", DFG_BITSET(dfg->out, dfg->size, j));
+ }
+}
+
+void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa)
+{
+ int j;
+ zend_ssa_block *ssa_blocks = ssa->blocks;
+ int blocks_count = ssa->cfg.blocks_count;
+
+ fprintf(stderr, "\nSSA Phi() Placement for \"");
+ zend_dump_op_array_name(op_array);
+ fprintf(stderr, "\"\n");
+ for (j = 0; j < blocks_count; j++) {
+ if (ssa_blocks && ssa_blocks[j].phis) {
+ zend_ssa_phi *p = ssa_blocks[j].phis;
+ int first = 1;
+
+ fprintf(stderr, " BB%d:\n", j);
+ if (p->pi >= 0) {
+ fprintf(stderr, " ; pi={");
+ } else {
+ fprintf(stderr, " ; phi={");
+ }
+ do {
+ if (first) {
+ first = 0;
+ } else {
+ fprintf(stderr, ", ");
+ }
+ zend_dump_var(op_array, IS_CV, p->var);
+ p = p->next;
+ } while (p);
+ fprintf(stderr, "}\n");
+ }
+ }
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_dump.h b/ext/opcache/Optimizer/zend_dump.h
new file mode 100644
index 0000000000..38b955c3a1
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_dump.h
@@ -0,0 +1,51 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, Bytecode Visualisation |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_DUMP_H
+#define ZEND_DUMP_H
+
+#include "zend_ssa.h"
+#include "zend_dfg.h"
+
+#define ZEND_DUMP_HIDE_UNREACHABLE (1<<0)
+#define ZEND_DUMP_RC_INFERENCE (1<<1)
+#define ZEND_DUMP_CFG (1<<2)
+#define ZEND_DUMP_SSA (1<<3)
+#define ZEND_DUMP_RT_CONSTANTS ZEND_RT_CONSTANTS
+
+BEGIN_EXTERN_C()
+
+void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, const char *msg, const void *data);
+void zend_dump_dominators(const zend_op_array *op_array, const zend_cfg *cfg);
+void zend_dump_dfg(const zend_op_array *op_array, const zend_cfg *cfg, const zend_dfg *dfg);
+void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa);
+void zend_dump_variables(const zend_op_array *op_array);
+void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flags);
+void zend_dump_var(const zend_op_array *op_array, zend_uchar var_type, int var_num);
+
+END_EXTERN_C()
+
+#endif /* ZEND_DUMP_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
new file mode 100644
index 0000000000..a684a16e73
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -0,0 +1,1288 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, Func Info |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id:$ */
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_extensions.h"
+#include "zend_ssa.h"
+#include "zend_inference.h"
+#include "zend_call_graph.h"
+#include "zend_func_info.h"
+#include "zend_inference.h"
+
+typedef uint32_t (*info_func_t)(const zend_call_info *call_info, const zend_ssa *ssa);
+
+typedef struct _func_info_t {
+ const char *name;
+ int name_len;
+ uint32_t info;
+ info_func_t info_func;
+} func_info_t;
+
+#define F0(name, info) \
+ {name, sizeof(name)-1, (info), NULL}
+#define F1(name, info) \
+ {name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_RC1 | (info)), NULL}
+#define FN(name, info) \
+ {name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_RCN | (info)), NULL}
+#define FR(name, info) \
+ {name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_REF | (info)), NULL}
+#define FX(name, info) \
+ {name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | (info)), NULL}
+#define I1(name, info) \
+ {name, sizeof(name)-1, (MAY_BE_RC1 | (info)), NULL}
+#define FC(name, callback) \
+ {name, sizeof(name)-1, 0, callback}
+
+static uint32_t zend_strlen_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ call_info->num_args == 1) {
+
+ uint32_t tmp = MAY_BE_RC1;
+ if (call_info->arg_info[0].opline) {
+ uint32_t arg_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
+
+ if (arg_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) {
+ tmp |= MAY_BE_LONG;
+ }
+ if (arg_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
+ /* warning, and returns NULL */
+ tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
+ }
+ if ((arg_info & MAY_BE_ANY) == MAY_BE_STRING) {
+ /* TODO: strlen() may be overriden by mbstring */
+ tmp |= FUNC_MAY_INLINE;
+ }
+ } else {
+ tmp |= MAY_BE_LONG | FUNC_MAY_WARN | MAY_BE_NULL;
+ }
+ return tmp;
+ } else {
+ /* warning, and returns NULL */
+ return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_NULL;
+ }
+}
+
+static uint32_t zend_dechex_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ call_info->num_args == 1) {
+ return MAY_BE_RC1 | MAY_BE_STRING;
+ } else {
+ /* warning, and returns NULL */
+ return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_NULL;
+ }
+}
+
+static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ (call_info->num_args == 2 || call_info->num_args == 3)) {
+
+ uint32_t t1 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
+ uint32_t t2 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[1].opline);
+ uint32_t t3 = 0;
+ uint32_t tmp = MAY_BE_RC1 | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG;
+
+ if (call_info->num_args == 3) {
+ t3 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[2].opline);
+ }
+ if ((t1 & MAY_BE_STRING) && (t2 & MAY_BE_STRING)) {
+ tmp |= MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING;
+ tmp |= FUNC_MAY_WARN | MAY_BE_FALSE;
+ }
+ if ((t1 & MAY_BE_DOUBLE) || (t2 & MAY_BE_DOUBLE) || (t3 & MAY_BE_DOUBLE)) {
+ tmp |= MAY_BE_ARRAY_OF_DOUBLE;
+ tmp |= FUNC_MAY_WARN | MAY_BE_FALSE;
+ }
+ if ((t1 & (MAY_BE_ANY-(MAY_BE_STRING|MAY_BE_DOUBLE))) && (t2 & (MAY_BE_ANY-(MAY_BE_STRING|MAY_BE_DOUBLE)))) {
+ if (call_info->num_args == 2 && !(t3 & MAY_BE_DOUBLE)) {
+ tmp |= MAY_BE_ARRAY_OF_LONG;
+ }
+ if (call_info->num_args == 3) {
+ tmp |= FUNC_MAY_WARN | MAY_BE_FALSE;
+ }
+ }
+ return tmp;
+ } else {
+ /* may warning, and return FALSE */
+ return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING;
+ }
+}
+
+static uint32_t zend_is_type_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ call_info->num_args == 1) {
+ return MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_TRUE | FUNC_MAY_INLINE;
+ } else {
+ return MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_TRUE | FUNC_MAY_WARN;
+ }
+}
+
+static uint32_t zend_l_ss_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ call_info->num_args == 2) {
+
+ uint32_t arg1_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
+ uint32_t arg2_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[1].opline);
+ uint32_t tmp = MAY_BE_RC1;
+
+ if ((arg1_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) &&
+ (arg2_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT))) {
+ tmp |= MAY_BE_LONG;
+ }
+ if ((arg1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) ||
+ (arg2_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
+ /* warning, and returns NULL */
+ tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
+ }
+ return tmp;
+ } else {
+ /* warning, and returns NULL */
+ return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_NULL | MAY_BE_LONG;
+ }
+}
+
+static uint32_t zend_lb_ssn_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ call_info->num_args == 3) {
+ uint32_t arg1_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
+ uint32_t arg2_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[1].opline);
+ uint32_t arg3_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[2].opline);
+ uint32_t tmp = MAY_BE_RC1;
+
+ if ((arg1_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) &&
+ (arg2_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) &&
+ (arg3_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT))) {
+ tmp |= MAY_BE_LONG | MAY_BE_FALSE;
+ }
+ if ((arg1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) ||
+ (arg2_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) ||
+ (arg3_info & (MAY_BE_STRING|MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_OBJECT))) {
+ /* warning, and returns NULL */
+ tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
+ }
+ return tmp;
+ } else {
+ /* warning, and returns NULL */
+ return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_NULL | MAY_BE_LONG;
+ }
+}
+
+static uint32_t zend_b_s_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ if (call_info->caller_init_opline->extended_value == call_info->num_args &&
+ call_info->num_args == 1) {
+
+ uint32_t arg1_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
+ uint32_t tmp = MAY_BE_RC1;
+
+ if (arg1_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) {
+ tmp |= MAY_BE_FALSE | MAY_BE_TRUE;
+ }
+ if (arg1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
+ /* warning, and returns NULL */
+ tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
+ }
+ return tmp;
+ } else {
+ /* warning, and returns NULL */
+ return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE;
+ }
+}
+
+#define UNKNOWN_INFO (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF)
+
+static const func_info_t func_infos[] = {
+ /* zend */
+ I1("zend_version", MAY_BE_STRING),
+ I1("gc_collect_cycles", MAY_BE_LONG),
+ I1("gc_enabled", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("gc_enable", MAY_BE_NULL),
+ F1("gc_disable", MAY_BE_NULL),
+ F1("func_num_args", MAY_BE_LONG),
+ F1("func_get_arg", UNKNOWN_INFO),
+ F1("func_get_args", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
+ FC("strlen", zend_strlen_info),
+ FC("strcmp", zend_l_ss_info),
+ FC("strncmp", zend_lb_ssn_info),
+ FC("strcasecmp", zend_l_ss_info),
+ FC("strncasecmp", zend_lb_ssn_info),
+ F1("each", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("error_reporting", MAY_BE_NULL | MAY_BE_LONG),
+ F1("define", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_NULL), // TODO: inline
+ FC("defined", zend_b_s_info), // TODO: inline
+ F1("get_class", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("get_called_class", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("get_parrent_class", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("is_subclass_of", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline
+ F1("is_a", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline
+ F1("get_class_vars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
+ F1("get_object_vars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
+ F1("get_class_methods", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("method_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("property_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("class_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("interface_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("trait_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ FC("function_exists", zend_b_s_info), // TODO: inline
+ F1("class_alias", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("get_included_files", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("trigger_error", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("user_error", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("set_error_handler", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_OBJECT | MAY_BE_OBJECT),
+ I1("restore_error_handler", MAY_BE_TRUE),
+ F1("get_declared_traits", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("get_declared_classes", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("get_declared_interfaces", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("get_defined_functions", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ I1("get_defined_vars", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
+ F1("create_function", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
+ F1("get_resource_type", MAY_BE_NULL | MAY_BE_STRING),
+ F1("get_defined_constants", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_RESOURCE | MAY_BE_ARRAY_OF_ARRAY),
+ F1("debug_print_backtrace", MAY_BE_NULL),
+ F1("debug_backtrace", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
+ F1("get_loaded_extensions", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ FC("extension_loaded", zend_b_s_info),
+ F1("get_extension_funcs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+
+ /* ext/statdard */
+ F1("constant", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING | MAY_BE_RESOURCE),
+ F1("bin2hex", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("hex2bin", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("sleep", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("usleep", MAY_BE_NULL | MAY_BE_FALSE),
+#if HAVE_NANOSLEEP
+ F1("time_nanosleep", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("time_sleep_until", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+#if HAVE_STRPTIME
+ F1("strptime", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+#endif
+ F1("flush", MAY_BE_NULL),
+ F1("wordwrap", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("htmlspecialchars", MAY_BE_NULL | MAY_BE_STRING),
+ F1("htmlentities", MAY_BE_NULL | MAY_BE_STRING),
+ F1("html_entity_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("htmlspecialchars_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("get_html_translation_table", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
+ F1("sha1", MAY_BE_NULL | MAY_BE_STRING),
+ F1("sha1_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("md5", MAY_BE_NULL | MAY_BE_STRING),
+ F1("md5_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("crc32", MAY_BE_NULL | MAY_BE_LONG),
+ F1("iptcparse", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("iptcembed", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("getimagesize", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("getimagesizefromstring", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("image_type_to_mime_type", MAY_BE_NULL | MAY_BE_STRING),
+ F1("image_type_to_extension", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("phpinfo", MAY_BE_NULL | MAY_BE_TRUE),
+ F1("phpversion", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("phpcredits", MAY_BE_NULL | MAY_BE_TRUE),
+ F1("php_sapi_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("php_uname", MAY_BE_NULL | MAY_BE_STRING),
+ F1("php_ini_scanned_files", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("php_ini_loaded_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("strnatcmp", MAY_BE_NULL | MAY_BE_LONG),
+ F1("strnatcasecmp", MAY_BE_NULL | MAY_BE_LONG),
+ F1("substr_count", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("strspn", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("strcspn", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("strtok", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("strtoupper", MAY_BE_NULL | MAY_BE_STRING),
+ F1("strtolower", MAY_BE_NULL | MAY_BE_STRING),
+ F1("strpos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stripos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("strrpos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("strripos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("strrev", MAY_BE_NULL | MAY_BE_STRING),
+ F1("hebrev", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("hebrevc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("nl2br", MAY_BE_NULL | MAY_BE_STRING),
+ F1("basename", MAY_BE_NULL | MAY_BE_STRING),
+ F1("dirname", MAY_BE_NULL | MAY_BE_STRING),
+ F1("pathinfo", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
+ F1("stripslashes", MAY_BE_NULL | MAY_BE_STRING),
+ F1("stripcslashes", MAY_BE_NULL | MAY_BE_STRING),
+ F1("strstr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("stristr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("strrchr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("str_shuffle", MAY_BE_NULL | MAY_BE_STRING),
+ F1("str_word_count", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("str_split", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("substr_compare", MAY_BE_FALSE | MAY_BE_LONG),
+#ifdef HAVE_STRCOLL
+ F1("strcoll", MAY_BE_NULL | MAY_BE_LONG),
+#endif
+#ifdef HAVE_STRFMON
+ F1("money_format", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+ F1("substr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("substr_replace", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
+ F1("quotemeta", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ucfirst", MAY_BE_NULL | MAY_BE_STRING),
+ F1("lcfirst", MAY_BE_NULL | MAY_BE_STRING),
+ F1("ucwords", MAY_BE_NULL | MAY_BE_STRING),
+ F1("strtr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("addslashes", MAY_BE_NULL | MAY_BE_STRING),
+ F1("addcslashes", MAY_BE_NULL | MAY_BE_STRING),
+ F1("rtrim", MAY_BE_NULL | MAY_BE_STRING),
+ F1("str_replace", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
+ F1("str_ireplace", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
+ F1("str_repeat", MAY_BE_NULL | MAY_BE_STRING),
+ F1("count_chars", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
+ F1("chunk_split", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("trim", MAY_BE_NULL | MAY_BE_STRING),
+ F1("ltrim", MAY_BE_NULL | MAY_BE_STRING),
+ F1("strip_tags", MAY_BE_NULL | MAY_BE_STRING),
+ F1("similar_text", MAY_BE_NULL | MAY_BE_LONG),
+ F1("explode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("implode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("join", MAY_BE_NULL | MAY_BE_STRING),
+ F1("setlocale", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("localeconv", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+#if HAVE_NL_LANGINFO
+ F1("nl_langinfo", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+ F1("soundex", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("levenshtein", MAY_BE_NULL | MAY_BE_LONG),
+ F1("chr", MAY_BE_NULL | MAY_BE_STRING),
+ F1("ord", MAY_BE_NULL | MAY_BE_LONG),
+ F1("parse_str", MAY_BE_NULL),
+ F1("str_getcsv", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
+ F1("str_pad", MAY_BE_NULL | MAY_BE_STRING),
+ F1("chop", MAY_BE_NULL | MAY_BE_STRING),
+ F1("strchr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("sprintf", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("printf", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("vprintf", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("vsprintf", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("fprintf", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("vfprintf", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("sscanf", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
+ F1("fscanf", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
+ F1("parse_url", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_LONG),
+ F1("urlencode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("urldecode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("rawurlencode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("rawurldecode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("http_build_query", MAY_BE_FALSE | MAY_BE_STRING),
+#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
+ F1("readlink", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("linkinfo", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("symlink", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("link", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("unlink", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("exec", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("system", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("escapeshellcmd", MAY_BE_NULL | MAY_BE_STRING),
+ F1("escapeshellarg", MAY_BE_NULL | MAY_BE_STRING),
+ F1("passthru", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("shell_exec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#ifdef PHP_CAN_SUPPORT_PROC_OPEN
+ F1("proc_open", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("proc_close", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("proc_terminate", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("proc_get_status", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+#endif
+#ifdef HAVE_NICE
+ F1("proc_nice", MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("rand", MAY_BE_NULL | MAY_BE_LONG),
+ F1("srand", MAY_BE_NULL),
+ F1("getrandmax", MAY_BE_NULL | MAY_BE_LONG),
+ F1("mt_rand", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mt_srand", MAY_BE_NULL),
+ F1("mt_getrandmax", MAY_BE_NULL | MAY_BE_LONG),
+#if HAVE_GETSERVBYNAME
+ F1("getservbyname", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+#endif
+#if HAVE_GETSERVBYPORT
+ F1("getservbyport", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+#if HAVE_GETPROTOBYNAME
+ F1("getprotobyname", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+#endif
+#if HAVE_GETPROTOBYNUMBER
+ F1("getprotobynumber", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+ F1("getmyuid", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("getmygid", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("getmypid", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("getmyinode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("getlastmod", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("base64_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("base64_encode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("password_hash", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("password_get_info", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("password_needs_rehash", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("password_verify", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("convert_uuencode", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("convert_uudecode", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("abs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("ceil", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("floor", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("round", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("sin", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("cos", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("tan", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("asin", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("acos", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("atan", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("atanh", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("atan2", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("sinh", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("cosh", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("tanh", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("asinh", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("acosh", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("expm1", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("log1p", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("pi", MAY_BE_DOUBLE),
+ F1("is_finite", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_nan", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_infinite", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("pow", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("exp", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("log", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("log10", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("sqrt", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("hypot", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("deg2rad", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("rad2deg", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("bindec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("hexdec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("octdec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("decbin", MAY_BE_NULL | MAY_BE_STRING),
+ F1("decoct", MAY_BE_NULL | MAY_BE_STRING),
+ FC("dechex", zend_dechex_info),
+ F1("base_convert", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("number_format", MAY_BE_NULL | MAY_BE_STRING),
+ F1("fmod", MAY_BE_NULL | MAY_BE_DOUBLE),
+#ifdef HAVE_INET_NTOP
+ F1("inet_ntop", MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+#ifdef HAVE_INET_PTON
+ F1("inet_pton", MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+ F1("ip2long", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("long2ip", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("getenv", MAY_BE_FALSE | MAY_BE_STRING),
+#ifdef HAVE_PUTENV
+ F1("putenv", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("getopt", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+#ifdef HAVE_GETLOADAVG
+ F1("sys_getloadavg", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_DOUBLE),
+#endif
+#ifdef HAVE_GETTIMEOFDAY
+ F1("microtime", MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_STRING),
+ F1("gettimeofday", MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_STRING),
+#endif
+#ifdef HAVE_GETRUSAGE
+ F1("getrusage", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
+#endif
+#ifdef HAVE_GETTIMEOFDAY
+ F1("uniqid", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+ F1("quoted_printable_decode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("quoted_printable_encode", MAY_BE_NULL | MAY_BE_STRING),
+ F1("convert_cyr_string", MAY_BE_NULL | MAY_BE_STRING),
+ F1("get_current_user", MAY_BE_NULL | MAY_BE_STRING),
+ F1("set_time_limit", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("header_register_callback", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("get_cfg_var", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("magic_quotes_runtime", MAY_BE_NULL | MAY_BE_FALSE),
+ F1("set_magic_quotes_runtime", MAY_BE_NULL | MAY_BE_FALSE),
+ F1("get_magic_quotes_gpc", MAY_BE_NULL | MAY_BE_FALSE),
+ F1("get_magic_quotes_runtime", MAY_BE_NULL | MAY_BE_FALSE),
+ F1("error_log", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("error_get_last", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("call_user_func", UNKNOWN_INFO),
+ F1("call_user_func_array", UNKNOWN_INFO),
+ F1("call_user_method", UNKNOWN_INFO),
+ F1("call_user_method_array", UNKNOWN_INFO),
+ F1("forward_static_call", UNKNOWN_INFO),
+ F1("forward_static_call_array", UNKNOWN_INFO),
+ F1("serialize", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ FN("unserialize", UNKNOWN_INFO),
+ F1("var_dump", MAY_BE_NULL),
+ F1("var_export", MAY_BE_NULL | MAY_BE_STRING),
+ F1("debug_zval_dump", MAY_BE_NULL),
+ F1("print_r", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("memory_get_usage", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("memory_get_peak_usage", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("register_shutdown_function", MAY_BE_NULL | MAY_BE_FALSE),
+ F1("register_tick_function", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("unregister_tick_function", MAY_BE_NULL),
+ F1("highlight_file", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("show_source", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("highlight_string", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("php_strip_whitespace", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ini_get", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ini_get_all", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("ini_set", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ini_alter", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ini_restore", MAY_BE_NULL),
+ F1("get_include_path", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("set_include_path", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("restore_include_path", MAY_BE_NULL),
+ F1("setcookie", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("setrawcookie", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("header", MAY_BE_NULL),
+ F1("header_remove", MAY_BE_NULL),
+ F1("headers_sent", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("headers_list", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("http_response_code", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("connection_aborted", MAY_BE_LONG),
+ F1("connection_status", MAY_BE_LONG),
+ F1("ignore_user_abort", MAY_BE_NULL | MAY_BE_LONG),
+ F1("parse_ini_file", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("parse_ini_string", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+#if ZEND_DEBUG
+ F1("config_get_hash", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+#endif
+ F1("is_uploaded_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("move_uploaded_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("gethostbyaddr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gethostbyname", MAY_BE_NULL | MAY_BE_STRING),
+ F1("gethostbynamel", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+#ifdef HAVE_GETHOSTNAME
+ F1("gethostname", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+#if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
+ F1("dns_check_record", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("checkdnsrr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+# if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
+ F1("dns_get_mx", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("getmxrr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("dns_get_record", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
+# endif
+#endif
+ F1("intval", MAY_BE_NULL | MAY_BE_LONG),
+ F1("floatval", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("doubleval", MAY_BE_NULL | MAY_BE_DOUBLE),
+ F1("strval", MAY_BE_NULL | MAY_BE_STRING),
+ F1("boolval", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("gettype", MAY_BE_NULL | MAY_BE_STRING),
+ F1("settype", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ FC("is_null", zend_is_type_info),
+ F1("is_resource", MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline with support for closed resources
+ FC("is_bool", zend_is_type_info),
+ FC("is_long", zend_is_type_info),
+ FC("is_float", zend_is_type_info),
+ FC("is_int", zend_is_type_info),
+ FC("is_integer", zend_is_type_info),
+ FC("is_double", zend_is_type_info),
+ FC("is_real", zend_is_type_info),
+ F1("is_numeric", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ FC("is_string", zend_is_type_info),
+ FC("is_array", zend_is_type_info),
+ F1("is_object", MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline with support for incomplete class
+ F1("is_scalar", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_callable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("pclose", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("popen", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("readfile", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("rewind", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("rmdir", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("umask", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("fclose", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("feof", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("fgetc", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("fgets", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("fgetss", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("fread", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("fopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("fpassthru", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("ftruncate", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("fstat", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
+ F1("fseek", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("ftell", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("fflush", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("fwrite", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("fputs", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mkdir", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("rename", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("copy", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("tempnam", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("tmpfile", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("file_get_contents", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("file_put_contents", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stream_select", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stream_context_create", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_context_set_params", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_context_get_params", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("stream_context_set_option", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_context_get_options", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("stream_context_get_default", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_context_set_default", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_filter_prepend", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_filter_append", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_filter_remove", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_socket_client", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_socket_server", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_socket_accept", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("stream_socket_get_name", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("stream_socket_recvfrom", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("stream_socket_sendto", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stream_socket_enable_crypto", MAY_BE_FALSE | MAY_BE_LONG),
+#ifdef HAVE_SHUTDOWN
+ F1("stream_socket_shutdown", MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+#if HAVE_SOCKETPAIR
+ F1("stream_socket_pair", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_RESOURCE),
+#endif
+ F1("stream_copy_to_stream", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stream_get_contents", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("stream_supports_lock", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("fgetcsv", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
+ F1("fputcsv", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("flock", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("get_meta_tags", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
+ F1("stream_set_read_buffer", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stream_set_write_buffer", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("set_file_buffer", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("stream_set_chunk_size", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("set_socket_blocking", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_set_blocking", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("socket_set_blocking", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_get_meta_data", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("stream_get_line", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("stream_wrapper_register", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_register_wrapper", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_wrapper_unregister", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_wrapper_restore", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_get_wrappers", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("stream_get_transports", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("stream_resolve_include_path", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("stream_is_local", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("get_headers", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
+ F1("stream_set_timeout", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("socket_set_timeout", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("socket_get_status", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
+ F1("realpath", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+#ifdef HAVE_FNMATCH
+ F1("fnmatch", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("fsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("pfsockopen", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("pack", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("unpack", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
+ F1("get_browser", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("crypt", MAY_BE_NULL | MAY_BE_STRING),
+ F1("opendir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("closedir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("chdir", MAY_BE_FALSE | MAY_BE_TRUE),
+#if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
+ F1("chroot", MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("getcwd", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("rewinddir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("readdir", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("dir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("scandir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+#ifdef HAVE_GLOB
+ F1("glob", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+#endif
+ F1("fileatime", MAY_BE_NULL | MAY_BE_LONG),
+ F1("filectime", MAY_BE_NULL | MAY_BE_LONG),
+ F1("filegroup", MAY_BE_NULL | MAY_BE_LONG),
+ F1("fileinode", MAY_BE_NULL | MAY_BE_LONG),
+ F1("filemtime", MAY_BE_NULL | MAY_BE_LONG),
+ F1("fileowner", MAY_BE_NULL | MAY_BE_LONG),
+ F1("fileperms", MAY_BE_NULL | MAY_BE_LONG),
+ F1("filesize", MAY_BE_NULL | MAY_BE_LONG),
+ F1("filetype", MAY_BE_NULL | MAY_BE_STRING),
+ F1("file_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_writable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_writeable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_readable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_executable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_dir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("is_link", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stat", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("lstat", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+#ifndef NETWARE
+ F1("chown", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("chgrp", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+#if HAVE_LCHOWN
+ F1("lchown", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+#if HAVE_LCHOWN
+ F1("lchgrp", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("chmod", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#if HAVE_UTIME
+ F1("touch", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("clearstatcache", MAY_BE_NULL),
+ F1("disk_total_space", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("disk_free_space", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("diskfreespace", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
+ F1("realpath_cache_size", MAY_BE_NULL | MAY_BE_LONG),
+ F1("realpath_cache_get", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING),
+ F1("mail", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("ezmlm_hash", MAY_BE_NULL | MAY_BE_LONG),
+#ifdef HAVE_SYSLOG_H
+ F1("openlog", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("syslog", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("closelog", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+#endif
+ F1("lcg_value", MAY_BE_DOUBLE),
+ F1("metaphone", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ob_start", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("ob_flush", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("ob_clean", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("ob_end_flush", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("ob_end_clean", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("ob_get_flush", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ob_get_clean", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ob_get_length", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("ob_get_level", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("ob_get_status", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("ob_get_contents", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ob_implicit_flush", MAY_BE_NULL),
+ F1("ob_list_handlers", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("ksort", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("krsort", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("natsort", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("natcasesort", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("asort", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("arsort", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("sort", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("rsort", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("usort", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("uasort", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("uksort", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("shuffle", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("array_walk", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("array_walk_recursive", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("count", MAY_BE_NULL | MAY_BE_LONG),
+ F1("end", UNKNOWN_INFO),
+ F1("prev", UNKNOWN_INFO),
+ F1("next", UNKNOWN_INFO),
+ F1("reset", UNKNOWN_INFO),
+ F1("current", UNKNOWN_INFO),
+ F1("key", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING),
+ F1("min", UNKNOWN_INFO),
+ F1("max", UNKNOWN_INFO),
+ F1("in_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("array_search", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
+ F1("extract", MAY_BE_NULL | MAY_BE_LONG),
+ F1("compact", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_fill", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
+ F1("array_fill_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ FC("range", zend_range_info),
+ F1("array_multisort", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("array_push", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("array_pop", UNKNOWN_INFO),
+ F1("array_shift", UNKNOWN_INFO),
+ F1("array_unshift", MAY_BE_NULL | MAY_BE_LONG),
+ F1("array_splice", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_slice", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_merge", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_merge_recursive", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_replace", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_replace_recursive", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_keys", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("array_values", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_count_values", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
+ F1("array_column", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_reverse", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_reduce", UNKNOWN_INFO),
+ F1("array_pad", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_flip", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("array_change_key_case", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_rand", UNKNOWN_INFO),
+ F1("array_unique", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_intersect", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_intersect_key", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_intersect_ukey", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_uintersect", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_intersect_assoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_uintersect_assoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_intersect_uassoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_uintersect_uassoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_diff", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_diff_key", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_diff_ukey", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_udiff", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_diff_assoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_udiff_assoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_diff_uassoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_udiff_uassoc", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_sum", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("array_product", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE),
+ F1("array_filter", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_map", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_chunk", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_combine", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("array_key_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("pos", UNKNOWN_INFO),
+ F1("sizeof", MAY_BE_NULL | MAY_BE_LONG),
+ F1("key_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("assert", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("assert_options", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_OBJECT | MAY_BE_OBJECT),
+ F1("version_compare", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG),
+#if HAVE_FTOK
+ F1("ftok", MAY_BE_NULL | MAY_BE_LONG),
+#endif
+ F1("str_rot13", MAY_BE_NULL | MAY_BE_STRING),
+ F1("stream_get_filters", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("stream_filter_register", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("stream_bucket_make_writeable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("stream_bucket_prepend", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("stream_bucket_append", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("stream_bucket_new", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("output_add_rewrite_var", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("output_reset_rewrite_vars", MAY_BE_FALSE),
+ F1("sys_get_temp_dir", MAY_BE_NULL | MAY_BE_STRING),
+
+ /* ext/date */
+ F1("strtotime", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("date", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("idate", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gmdate", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mktime", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gmmktime", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("checkdate", MAY_BE_FALSE | MAY_BE_TRUE),
+#ifdef HAVE_STRFTIME
+ F1("strftime", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gmstrftime", MAY_BE_FALSE | MAY_BE_STRING),
+#endif
+ F1("time", MAY_BE_LONG),
+ F1("localtime", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
+ F1("getdate", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("date_create", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_create_immutable", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_create_from_format", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_create_immutable_from_format", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_parse", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("date_parse_from_format", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("date_get_last_errors", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_ARRAY),
+ F1("date_format", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("date_modify", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_add", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_sub", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_timezone_get", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_timezone_set", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_offset_get", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("date_diff", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_time_set", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_date_set", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_isodate_set", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_timestamp_set", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_timestamp_get", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("timezone_open", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("timezone_name_get", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("timezone_name_from_abbr", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("timezone_offset_get", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("timezone_transitions_get", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
+ F1("timezone_location_get", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING),
+ F1("timezone_identifiers_list", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("timezone_abbreviations_list", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("timezone_version_get", MAY_BE_STRING),
+ F1("date_interval_create_from_date_string", MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("date_interval_format", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("date_default_timezone_set", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("date_default_timezone_get", MAY_BE_STRING),
+ F1("date_sunrise", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING),
+ F1("date_sunset", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING),
+ F1("date_sun_info", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG),
+
+ /* ext/preg */
+ F1("preg_match", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("preg_match_all", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("preg_replace", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
+ F1("preg_replace_callback", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
+ F1("preg_filter", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
+ F1("preg_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("preg_quote", MAY_BE_NULL | MAY_BE_STRING),
+ F1("preg_grep", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
+ F1("preg_last_error", MAY_BE_NULL | MAY_BE_LONG),
+
+ /* ext/ereg */
+ F1("ereg", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("ereg_replace", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("eregi", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("eregi_replace", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("split", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("spliti", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("sql_regcase", MAY_BE_NULL | MAY_BE_STRING),
+
+ /* ext/mysql */
+ F1("mysql_connect", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_pconnect", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_close", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_select_db", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_create_db", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_drop_db", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE),
+ F1("mysql_unbuffered_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE),
+ F1("mysql_db_query", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE),
+ F1("mysql_list_dbs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_list_tables", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_list_fields", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_list_processes", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_error", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_errno", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_affected_rows", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_insert_id", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_num_rows", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_num_fields", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_fetch_row", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
+ F1("mysql_fetch_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
+ F1("mysql_fetch_assoc", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
+ F1("mysql_fetch_object", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("mysql_data_seek", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_fetch_lengths", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
+ F1("mysql_fetch_field", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
+ F1("mysql_field_seek", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_free_result", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_field_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_field_table", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_field_len", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_field_type", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_field_flags", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_escape_string", MAY_BE_NULL | MAY_BE_STRING),
+ F1("mysql_real_escape_string", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_stat", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_thread_id", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_client_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_ping", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_get_client_info", MAY_BE_NULL | MAY_BE_STRING),
+ F1("mysql_get_host_info", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_get_proto_info", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_get_server_info", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_info", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_set_charset", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_fieldname", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_fieldtable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_fieldlen", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_fieldtype", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_fieldflags", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_selectdb", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_createdb", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_dropdb", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_freeresult", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mysql_numfields", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_numrows", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mysql_listdbs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_listtables", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_listfields", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("mysql_db_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_dbname", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_tablename", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mysql_table_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+
+ /* ext/curl */
+ F1("curl_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("curl_copy_handle", MAY_BE_NULL | MAY_BE_RESOURCE),
+ F1("curl_version", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("curl_setopt", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("curl_setopt_array", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("curl_exec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("curl_getinfo", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
+ F1("curl_error", MAY_BE_NULL | MAY_BE_STRING),
+ F1("curl_errno", MAY_BE_NULL | MAY_BE_LONG),
+ F1("curl_close", MAY_BE_NULL),
+ F1("curl_strerror", MAY_BE_NULL | MAY_BE_STRING),
+ F1("curl_multi_strerror", MAY_BE_NULL | MAY_BE_STRING),
+ F1("curl_reset", MAY_BE_NULL),
+ F1("curl_escape", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("curl_unescape", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("curl_pause", MAY_BE_NULL | MAY_BE_LONG),
+ F1("curl_multi_init", MAY_BE_NULL | MAY_BE_RESOURCE),
+ F1("curl_multi_add_handle", MAY_BE_NULL | MAY_BE_LONG),
+ F1("curl_multi_remove_handle", MAY_BE_NULL | MAY_BE_LONG),
+ F1("curl_multi_select", MAY_BE_NULL | MAY_BE_LONG),
+ F1("curl_multi_exec", MAY_BE_NULL | MAY_BE_LONG),
+ F1("curl_multi_getcontent", MAY_BE_NULL | MAY_BE_STRING),
+ F1("curl_multi_info_read", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_RESOURCE),
+ F1("curl_multi_close", MAY_BE_NULL),
+ F1("curl_multi_setopt", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("curl_share_init", MAY_BE_NULL | MAY_BE_RESOURCE),
+ F1("curl_share_close", MAY_BE_NULL),
+ F1("curl_share_setopt", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("curl_file_create", MAY_BE_OBJECT),
+
+ /* ext/mbstring */
+ F1("mb_convert_case", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strtoupper", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strtolower", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_language", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_internal_encoding", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_http_input", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_http_output", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_detect_order", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("mb_substitute_character", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
+ F1("mb_parse_str", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mb_output_handler", MAY_BE_NULL | MAY_BE_STRING),
+ F1("mb_preferred_mime_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strlen", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_strpos", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_strrpos", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_stripos", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_strripos", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_strstr", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strrchr", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_stristr", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strrichr", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_substr_count", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_substr", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strcut", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_strwidth", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_strimwidth", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_convert_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_detect_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_list_encodings", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("mb_encoding_aliases", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("mb_convert_kana", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_encode_mimeheader", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_decode_mimeheader", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_convert_variables", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_encode_numericentity", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_decode_numericentity", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_send_mail", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mb_get_info", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+ F1("mb_check_encoding", MAY_BE_FALSE | MAY_BE_TRUE),
+
+ F1("mb_regex_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_regex_set_options", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_ereg", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_eregi", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mb_ereg_replace", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_eregi_replace", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_ereg_replace_callback", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mb_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("mb_ereg_match", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mb_ereg_search", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mb_ereg_search_pos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
+ F1("mb_ereg_search_regs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
+ F1("mb_ereg_search_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mb_ereg_search_getregs", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
+ F1("mb_ereg_search_getpos", MAY_BE_LONG),
+ F1("mb_ereg_search_setpos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+
+ F1("mbregex_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mbereg", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mberegi", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mbereg_replace", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mberegi_replace", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mbsplit", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("mbereg_match", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mbereg_search", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mbereg_search_pos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
+ F1("mbereg_search_regs", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
+ F1("mbereg_search_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("mbereg_search_getregs", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
+ F1("mbereg_search_getpos", MAY_BE_LONG),
+ F1("mbereg_search_setpos", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+
+ /* ext/iconv */
+ F1("iconv", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("iconv_get_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
+ F1("iconv_set_encoding", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("iconv_strlen", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("iconv_substr", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("iconv_strpos", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("iconv_strrpos", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("iconv_mime_encode", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("iconv_mime_decode", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("iconv_mime_decode_headers", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
+
+ /* ext/json */
+ F1("json_encode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("json_decode", MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
+ F1("json_last_error", MAY_BE_NULL | MAY_BE_LONG),
+ F1("json_last_error_msg", MAY_BE_NULL | MAY_BE_STRING),
+
+ /* ext/xml */
+ F1("xml_parser_create", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("xml_parser_create_ns", MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("xml_set_object", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_element_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_character_data_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_processing_instruction_handler",MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_default_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_unparsed_entity_decl_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_notation_decl_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_external_entity_ref_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_start_namespace_decl_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_set_end_namespace_decl_handler", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_parse", MAY_BE_NULL | MAY_BE_LONG),
+ F1("xml_parse_into_struct", MAY_BE_NULL | MAY_BE_LONG),
+ F1("xml_get_error_code", MAY_BE_NULL | MAY_BE_LONG),
+ F1("xml_error_string", MAY_BE_NULL | MAY_BE_STRING),
+ F1("xml_get_current_line_number", MAY_BE_NULL | MAY_BE_LONG),
+ F1("xml_get_current_column_number", MAY_BE_NULL | MAY_BE_LONG),
+ F1("xml_get_current_byte_index", MAY_BE_NULL | MAY_BE_LONG),
+ F1("xml_parser_free", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_parser_set_option", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("xml_parser_get_option", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
+ F1("utf8_encode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("utf8_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+
+ /* ext/zlib */
+ F1("readgzfile", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gzrewind", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("gzclose", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("gzeof", MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("gzgetc", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzgets", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzgetss", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzread", MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzopen", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("gzpassthru", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gzseek", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gztell", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gzwrite", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gzputs", MAY_BE_FALSE | MAY_BE_LONG),
+ F1("gzfile", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("gzcompress", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzuncompress", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzdeflate", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzinflate", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzencode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("gzdecode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("zlib_encode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("zlib_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("zlib_get_coding_type", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("ob_gzhandler", MAY_BE_FALSE | MAY_BE_STRING),
+
+ /* ext/hash */
+ F1("hash", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("hash_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("hash_hmac", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("hash_hmac_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("hash_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("hash_update", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("hash_update_stream", MAY_BE_NULL | MAY_BE_LONG),
+ F1("hash_update_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ F1("hash_final", MAY_BE_NULL | MAY_BE_STRING),
+ F1("hash_copy", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
+ F1("hash_algos", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
+ F1("hash_pbkdf2", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mhash_keygen_s2k", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mhash_get_block_size", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
+ F1("mhash_get_hash_name", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+ F1("mhash_count", MAY_BE_NULL | MAY_BE_LONG),
+ F1("mhash", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
+};
+
+static HashTable func_info;
+int zend_func_info_rid = -1;
+
+uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa)
+{
+ uint32_t ret = 0;
+
+ if (call_info->callee_func->type == ZEND_INTERNAL_FUNCTION) {
+ func_info_t *info;
+
+ if ((info = zend_hash_find_ptr(&func_info, Z_STR_P(CRT_CONSTANT_EX(call_info->caller_op_array, call_info->caller_init_opline->op2, ssa->rt_constants)))) != NULL) {
+ if (info->info_func) {
+ ret = info->info_func(call_info, ssa);
+ } else {
+ ret = info->info;
+ }
+#if 0
+ } else {
+ fprintf(stderr, "Unknown internal function '%s'\n", func->common.function_name);
+#endif
+ }
+ } else {
+ // FIXME: the order of functions matters!!!
+ zend_func_info *info = ZEND_FUNC_INFO((zend_op_array*)call_info->callee_func);
+ if (info) {
+ ret = info->return_info.type;
+ }
+ }
+ if (!ret) {
+ ret = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ if (call_info->callee_func->type == ZEND_INTERNAL_FUNCTION) {
+ ret |= FUNC_MAY_WARN;
+ }
+ if (call_info->callee_func->common.fn_flags & ZEND_ACC_GENERATOR) {
+ ret = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_OBJECT;
+ } else if (call_info->callee_func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ ret |= MAY_BE_REF;
+ } else {
+ ret |= MAY_BE_RC1 | MAY_BE_RCN;
+ }
+ }
+ return ret;
+}
+
+int zend_func_info_startup(void)
+{
+ zend_extension dummy;
+ int i;
+
+ if (zend_func_info_rid == -1) {
+ zend_func_info_rid = zend_get_resource_handle(&dummy);
+ if (zend_func_info_rid < 0) {
+ return FAILURE;
+ }
+
+ zend_hash_init(&func_info, sizeof(func_infos)/sizeof(func_info_t), NULL, NULL, 1);
+ for (i = 0; i < sizeof(func_infos)/sizeof(func_info_t); i++) {
+ if (zend_hash_str_add_ptr(&func_info, func_infos[i].name, func_infos[i].name_len, (void**)&func_infos[i]) == NULL) {
+ fprintf(stderr, "ERROR: Duplicate function info for \"%s\"\n", func_infos[i].name);
+ }
+ }
+ }
+
+ return SUCCESS;
+}
+
+int zend_func_info_shutdown(void)
+{
+ if (zend_func_info_rid != -1) {
+ zend_hash_destroy(&func_info);
+ zend_func_info_rid = -1;
+ }
+ return SUCCESS;
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_func_info.h b/ext/opcache/Optimizer/zend_func_info.h
new file mode 100644
index 0000000000..8fcf00d26a
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_func_info.h
@@ -0,0 +1,70 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, Func Info |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_FUNC_INFO_H
+#define ZEND_FUNC_INFO_H
+
+#include "zend_ssa.h"
+
+/* func flags */
+#define ZEND_FUNC_INDIRECT_VAR_ACCESS (1<<0)
+#define ZEND_FUNC_HAS_CALLS (1<<1)
+#define ZEND_FUNC_VARARG (1<<2)
+#define ZEND_FUNC_NO_LOOPS (1<<3)
+#define ZEND_FUNC_IRREDUCIBLE (1<<4)
+#define ZEND_FUNC_RECURSIVE (1<<7)
+#define ZEND_FUNC_RECURSIVE_DIRECTLY (1<<8)
+#define ZEND_FUNC_RECURSIVE_INDIRECTLY (1<<9)
+
+/* The following flags are valid only for return values of internal functions
+ * returned by zend_get_func_info()
+ */
+#define FUNC_MAY_WARN (1<<30)
+#define FUNC_MAY_INLINE (1<<31)
+
+typedef struct _zend_func_info zend_func_info;
+typedef struct _zend_call_info zend_call_info;
+
+#define ZEND_FUNC_INFO(op_array) \
+ ((zend_func_info*)((op_array)->reserved[zend_func_info_rid]))
+
+#define ZEND_SET_FUNC_INFO(op_array, info) do { \
+ zend_func_info** pinfo = (zend_func_info**)&(op_array)->reserved[zend_func_info_rid]; \
+ *pinfo = info; \
+ } while (0)
+
+BEGIN_EXTERN_C()
+
+extern int zend_func_info_rid;
+
+uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa);
+
+int zend_func_info_startup(void);
+int zend_func_info_shutdown(void);
+
+END_EXTERN_C()
+
+#endif /* ZEND_FUNC_INFO_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
new file mode 100644
index 0000000000..cb8540c64b
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -0,0 +1,4051 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, e-SSA based Type & Range Inference |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_generators.h"
+#include "zend_inference.h"
+#include "zend_func_info.h"
+#include "zend_call_graph.h"
+#include "zend_worklist.h"
+
+//#define LOG_SSA_RANGE
+//#define LOG_NEG_RANGE
+#define SYM_RANGE
+#define NEG_RANGE
+#define RANGE_WARMAP_PASSES 16
+
+#define CHECK_SCC_VAR(var2) \
+ do { \
+ if (!ssa->vars[var2].no_val) { \
+ if (dfs[var2] < 0) { \
+ zend_ssa_check_scc_var(op_array, ssa, var2, index, dfs, root, stack); \
+ } \
+ if (ssa->vars[var2].scc < 0 && dfs[root[var]] >= dfs[root[var2]]) { \
+ root[var] = root[var2]; \
+ } \
+ } \
+ } while (0)
+
+#define CHECK_SCC_ENTRY(var2) \
+ do { \
+ if (ssa->vars[var2].scc != ssa->vars[var].scc) { \
+ ssa->vars[var2].scc_entry = 1; \
+ } \
+ } while (0)
+
+#define ADD_SCC_VAR(_var) \
+ do { \
+ if (ssa->vars[_var].scc == scc) { \
+ zend_bitset_incl(worklist, _var); \
+ } \
+ } while (0)
+
+#define ADD_SCC_VAR_1(_var) \
+ do { \
+ if (ssa->vars[_var].scc == scc && \
+ !zend_bitset_in(visited, _var)) { \
+ zend_bitset_incl(worklist, _var); \
+ } \
+ } while (0)
+
+#define FOR_EACH_DEFINED_VAR(line, MACRO) \
+ do { \
+ if (ssa->ops[line].op1_def >= 0) { \
+ MACRO(ssa->ops[line].op1_def); \
+ } \
+ if (ssa->ops[line].op2_def >= 0) { \
+ MACRO(ssa->ops[line].op2_def); \
+ } \
+ if (ssa->ops[line].result_def >= 0) { \
+ MACRO(ssa->ops[line].result_def); \
+ } \
+ if (op_array->opcodes[line].opcode == ZEND_OP_DATA) { \
+ if (ssa->ops[line-1].op1_def >= 0) { \
+ MACRO(ssa->ops[line-1].op1_def); \
+ } \
+ if (ssa->ops[line-1].op2_def >= 0) { \
+ MACRO(ssa->ops[line-1].op2_def); \
+ } \
+ if (ssa->ops[line-1].result_def >= 0) { \
+ MACRO(ssa->ops[line-1].result_def); \
+ } \
+ } else if (line+1 < op_array->last && \
+ op_array->opcodes[line+1].opcode == ZEND_OP_DATA) { \
+ if (ssa->ops[line+1].op1_def >= 0) { \
+ MACRO(ssa->ops[line+1].op1_def); \
+ } \
+ if (ssa->ops[line+1].op2_def >= 0) { \
+ MACRO(ssa->ops[line+1].op2_def); \
+ } \
+ if (ssa->ops[line+1].result_def >= 0) { \
+ MACRO(ssa->ops[line+1].result_def); \
+ } \
+ } \
+ } while (0)
+
+
+#define FOR_EACH_VAR_USAGE(_var, MACRO) \
+ do { \
+ zend_ssa_phi *p = ssa->vars[_var].phi_use_chain; \
+ int use = ssa->vars[_var].use_chain; \
+ while (use >= 0) { \
+ FOR_EACH_DEFINED_VAR(use, MACRO); \
+ use = zend_ssa_next_use(ssa->ops, _var, use); \
+ } \
+ p = ssa->vars[_var].phi_use_chain; \
+ while (p) { \
+ MACRO(p->ssa_var); \
+ p = zend_ssa_next_use_phi(ssa, _var, p); \
+ } \
+ } while (0)
+
+static void zend_ssa_check_scc_var(const zend_op_array *op_array, zend_ssa *ssa, int var, int *index, int *dfs, int *root, zend_worklist_stack *stack) /* {{{ */
+{
+#ifdef SYM_RANGE
+ zend_ssa_phi *p;
+#endif
+
+ dfs[var] = *index;
+ (*index)++;
+ root[var] = var;
+
+ FOR_EACH_VAR_USAGE(var, CHECK_SCC_VAR);
+
+#ifdef SYM_RANGE
+ /* Process symbolic control-flow constraints */
+ p = ssa->vars[var].sym_use_chain;
+ while (p) {
+ CHECK_SCC_VAR(p->ssa_var);
+ p = p->sym_use_chain;
+ }
+#endif
+
+ if (root[var] == var) {
+ ssa->vars[var].scc = ssa->sccs;
+ while (stack->len > 0) {
+ int var2 = zend_worklist_stack_peek(stack);
+ if (dfs[var2] <= dfs[var]) {
+ break;
+ }
+ zend_worklist_stack_pop(stack);
+ ssa->vars[var2].scc = ssa->sccs;
+ }
+ ssa->sccs++;
+ } else {
+ zend_worklist_stack_push(stack, var);
+ }
+}
+/* }}} */
+
+int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
+{
+ int index = 0, *dfs, *root;
+ zend_worklist_stack stack;
+ int j;
+ ALLOCA_FLAG(dfs_use_heap)
+ ALLOCA_FLAG(root_use_heap)
+ ALLOCA_FLAG(stack_use_heap)
+
+ dfs = do_alloca(sizeof(int) * ssa->vars_count, dfs_use_heap);
+ memset(dfs, -1, sizeof(int) * ssa->vars_count);
+ root = do_alloca(sizeof(int) * ssa->vars_count, root_use_heap);
+ ZEND_WORKLIST_STACK_ALLOCA(&stack, ssa->vars_count, stack_use_heap);
+
+ /* Find SCCs */
+ for (j = 0; j < ssa->vars_count; j++) {
+ if (!ssa->vars[j].no_val && dfs[j] < 0) {
+ zend_ssa_check_scc_var(op_array, ssa, j, &index, dfs, root, &stack);
+ }
+ }
+
+ /* Revert SCC order */
+ for (j = 0; j < ssa->vars_count; j++) {
+ if (ssa->vars[j].scc >= 0) {
+ ssa->vars[j].scc = ssa->sccs - (ssa->vars[j].scc + 1);
+ }
+ }
+
+ for (j = 0; j < ssa->vars_count; j++) {
+ if (ssa->vars[j].scc >= 0) {
+ int var = j;
+ if (root[j] == j) {
+ ssa->vars[j].scc_entry = 1;
+ }
+ FOR_EACH_VAR_USAGE(var, CHECK_SCC_ENTRY);
+ }
+ }
+
+ ZEND_WORKLIST_STACK_FREE_ALLOCA(&stack, stack_use_heap);
+ free_alloca(root, root_use_heap);
+ free_alloca(dfs, dfs_use_heap);
+
+ return SUCCESS;
+}
+/* }}} */
+
+static inline zend_bool is_no_val_use(const zend_op *opline, const zend_ssa_op *ssa_op, int var)
+{
+ if (opline->opcode == ZEND_ASSIGN ||
+ (opline->opcode == ZEND_UNSET_VAR && (opline->extended_value & ZEND_QUICK_SET))) {
+ return ssa_op->op1_use == var && ssa_op->op2_use != var;
+ }
+ if (opline->opcode == ZEND_FE_FETCH_R) {
+ return ssa_op->op2_use == var && ssa_op->op1_use != var;
+ }
+ return 0;
+}
+
+int zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
+{
+ zend_ssa_var *ssa_vars = ssa->vars;
+ zend_ssa_op *ssa_ops = ssa->ops;
+ int ssa_vars_count = ssa->vars_count;
+ zend_bitset worklist;
+ int i, j, use;
+ zend_ssa_phi *p;
+ ALLOCA_FLAG(use_heap);
+
+ if (!op_array->function_name || !ssa->vars || !ssa->ops) {
+ return SUCCESS;
+ }
+
+ worklist = do_alloca(sizeof(zend_ulong) * zend_bitset_len(ssa_vars_count), use_heap);
+ memset(worklist, 0, sizeof(zend_ulong) * zend_bitset_len(ssa_vars_count));
+
+ for (i = 0; i < ssa_vars_count; i++) {
+ ssa_vars[i].no_val = 1; /* mark as unused */
+ use = ssa->vars[i].use_chain;
+ while (use >= 0) {
+ if (!is_no_val_use(&op_array->opcodes[use], &ssa->ops[use], i)) {
+ ssa_vars[i].no_val = 0; /* used directly */
+ zend_bitset_incl(worklist, i);
+ break;
+ }
+ use = zend_ssa_next_use(ssa_ops, i, use);
+ }
+ }
+
+ while (!zend_bitset_empty(worklist, zend_bitset_len(ssa_vars_count))) {
+ i = zend_bitset_first(worklist, zend_bitset_len(ssa_vars_count));
+ zend_bitset_excl(worklist, i);
+ if (ssa_vars[i].definition_phi) {
+ /* mark all possible sources as used */
+ p = ssa_vars[i].definition_phi;
+ if (p->pi >= 0) {
+ if (ssa_vars[p->sources[0]].no_val) {
+ ssa_vars[p->sources[0]].no_val = 0; /* used indirectly */
+ zend_bitset_incl(worklist, p->sources[0]);
+ }
+ } else {
+ for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) {
+ if (p->sources[j] >= 0 && ssa->vars[p->sources[j]].no_val) {
+ ssa_vars[p->sources[j]].no_val = 0; /* used indirectly */
+ zend_bitset_incl(worklist, p->sources[j]);
+ }
+ }
+ }
+ }
+ }
+
+ free_alloca(worklist, use_heap);
+
+ return SUCCESS;
+}
+/* }}} */
+
+/* From "Hacker's Delight" */
+zend_ulong minOR(zend_ulong a, zend_ulong b, zend_ulong c, zend_ulong d)
+{
+ zend_ulong m, temp;
+
+ m = 1L << (sizeof(zend_ulong) * 8 - 1);
+ while (m != 0) {
+ if (~a & c & m) {
+ temp = (a | m) & -m;
+ if (temp <= b) {
+ a = temp;
+ break;
+ }
+ } else if (a & ~c & m) {
+ temp = (c | m) & -m;
+ if (temp <= d) {
+ c = temp;
+ break;
+ }
+ }
+ m = m >> 1;
+ }
+ return a | c;
+}
+
+zend_ulong maxOR(zend_ulong a, zend_ulong b, zend_ulong c, zend_ulong d)
+{
+ zend_ulong m, temp;
+
+ m = 1L << (sizeof(zend_ulong) * 8 - 1);
+ while (m != 0) {
+ if (b & d & m) {
+ temp = (b - m) | (m - 1);
+ if (temp >= a) {
+ b = temp;
+ break;
+ }
+ temp = (d - m) | (m - 1);
+ if (temp >= c) {
+ d = temp;
+ break;
+ }
+ }
+ m = m >> 1;
+ }
+ return b | d;
+}
+
+zend_ulong minAND(zend_ulong a, zend_ulong b, zend_ulong c, zend_ulong d)
+{
+ zend_ulong m, temp;
+
+ m = 1L << (sizeof(zend_ulong) * 8 - 1);
+ while (m != 0) {
+ if (~a & ~c & m) {
+ temp = (a | m) & -m;
+ if (temp <= b) {
+ a = temp;
+ break;
+ }
+ temp = (c | m) & -m;
+ if (temp <= d) {
+ c = temp;
+ break;
+ }
+ }
+ m = m >> 1;
+ }
+ return a & c;
+}
+
+zend_ulong maxAND(zend_ulong a, zend_ulong b, zend_ulong c, zend_ulong d)
+{
+ zend_ulong m, temp;
+
+ m = 1L << (sizeof(zend_ulong) * 8 - 1);
+ while (m != 0) {
+ if (b & ~d & m) {
+ temp = (b | ~m) | (m - 1);
+ if (temp >= a) {
+ b = temp;
+ break;
+ }
+ } else if (~b & d & m) {
+ temp = (d | ~m) | (m - 1);
+ if (temp >= c) {
+ d = temp;
+ break;
+ }
+ }
+ m = m >> 1;
+ }
+ return b & d;
+}
+
+zend_ulong minXOR(zend_ulong a, zend_ulong b, zend_ulong c, zend_ulong d)
+{
+ return minAND(a, b, ~d, ~c) | minAND(~b, ~a, c, d);
+}
+
+zend_ulong maxXOR(zend_ulong a, zend_ulong b, zend_ulong c, zend_ulong d)
+{
+ return maxOR(0, maxAND(a, b, ~d, ~c), 0, maxAND(~b, ~a, c, d));
+}
+
+/* Based on "Hacker's Delight" */
+
+/*
+0: + + + + 0 0 0 0 => 0 0 + min/max
+2: + + - + 0 0 1 0 => 1 0 ? min(a,b,c,-1)/max(a,b,0,d)
+3: + + - - 0 0 1 1 => 1 1 - min/max
+8: - + + + 1 0 0 0 => 1 0 ? min(a,-1,b,d)/max(0,b,c,d)
+a: - + - + 1 0 1 0 => 1 0 ? MIN(a,c)/max(0,b,0,d)
+b: - + - - 1 0 1 1 => 1 1 - c/-1
+c: - - + + 1 1 0 0 => 1 1 - min/max
+e: - - - + 1 1 1 0 => 1 1 - a/-1
+f - - - - 1 1 1 1 => 1 1 - min/max
+*/
+static void zend_ssa_range_or(zend_long a, zend_long b, zend_long c, zend_long d, zend_ssa_range *tmp)
+{
+ int x = ((a < 0) ? 8 : 0) |
+ ((b < 0) ? 4 : 0) |
+ ((c < 0) ? 2 : 0) |
+ ((d < 0) ? 2 : 0);
+ switch (x) {
+ case 0x0:
+ case 0x3:
+ case 0xc:
+ case 0xf:
+ tmp->min = minOR(a, b, c, d);
+ tmp->max = maxOR(a, b, c, d);
+ break;
+ case 0x2:
+ tmp->min = minOR(a, b, c, -1);
+ tmp->max = maxOR(a, b, 0, d);
+ break;
+ case 0x8:
+ tmp->min = minOR(a, -1, c, d);
+ tmp->max = maxOR(0, b, c, d);
+ break;
+ case 0xa:
+ tmp->min = MIN(a, c);
+ tmp->max = maxOR(0, b, 0, d);
+ break;
+ case 0xb:
+ tmp->min = c;
+ tmp->max = -1;
+ break;
+ case 0xe:
+ tmp->min = a;
+ tmp->max = -1;
+ break;
+ }
+}
+
+/*
+0: + + + + 0 0 0 0 => 0 0 + min/max
+2: + + - + 0 0 1 0 => 0 0 + 0/b
+3: + + - - 0 0 1 1 => 0 0 + min/max
+8: - + + + 1 0 0 0 => 0 0 + 0/d
+a: - + - + 1 0 1 0 => 1 0 ? min(a,-1,c,-1)/NAX(b,d)
+b: - + - - 1 0 1 1 => 1 0 ? min(a,-1,c,d)/max(0,b,c,d)
+c: - - + + 1 1 0 0 => 1 1 - min/max
+e: - - - + 1 1 1 0 => 1 0 ? min(a,b,c,-1)/max(a,b,0,d)
+f - - - - 1 1 1 1 => 1 1 - min/max
+*/
+static void zend_ssa_range_and(zend_long a, zend_long b, zend_long c, zend_long d, zend_ssa_range *tmp)
+{
+ int x = ((a < 0) ? 8 : 0) |
+ ((b < 0) ? 4 : 0) |
+ ((c < 0) ? 2 : 0) |
+ ((d < 0) ? 2 : 0);
+ switch (x) {
+ case 0x0:
+ case 0x3:
+ case 0xc:
+ case 0xf:
+ tmp->min = minAND(a, b, c, d);
+ tmp->max = maxAND(a, b, c, d);
+ break;
+ case 0x2:
+ tmp->min = 0;
+ tmp->max = b;
+ break;
+ case 0x8:
+ tmp->min = 0;
+ tmp->max = d;
+ break;
+ case 0xa:
+ tmp->min = minAND(a, -1, c, -1);
+ tmp->max = MAX(b, d);
+ break;
+ case 0xb:
+ tmp->min = minAND(a, -1, c, d);
+ tmp->max = maxAND(0, b, c, d);
+ break;
+ case 0xe:
+ tmp->min = minAND(a, b, c, -1);
+ tmp->max = maxAND(a, b, 0, d);
+ break;
+ }
+}
+
+int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp)
+{
+ uint32_t line;
+ zend_op *opline;
+ zend_long op1_min, op2_min, op1_max, op2_max, t1, t2, t3, t4;
+
+ if (ssa->vars[var].definition_phi) {
+ zend_ssa_phi *p = ssa->vars[var].definition_phi;
+ int i;
+
+ tmp->underflow = 0;
+ tmp->min = ZEND_LONG_MAX;
+ tmp->max = ZEND_LONG_MIN;
+ tmp->overflow = 0;
+ if (p->pi >= 0 && p->constraint.type_mask == (uint32_t) -1) {
+ if (p->constraint.negative) {
+ if (ssa->var_info[p->sources[0]].has_range) {
+ tmp->underflow = ssa->var_info[p->sources[0]].range.underflow;
+ tmp->min = ssa->var_info[p->sources[0]].range.min;
+ tmp->max = ssa->var_info[p->sources[0]].range.max;
+ tmp->overflow = ssa->var_info[p->sources[0]].range.overflow;
+ } else if (narrowing) {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ tmp->overflow = 1;
+ }
+#ifdef NEG_RANGE
+ if (p->constraint.min_ssa_var < 0 &&
+ p->constraint.min_ssa_var < 0 &&
+ ssa->var_info[p->ssa_var].has_range) {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "%s() #%d [%ld..%ld] -> [%ld..%ld]?\n",
+ op_array->function_name,
+ p->ssa_var,
+ ssa->var_info[p->ssa_var].range.min,
+ ssa->var_info[p->ssa_var].range.max,
+ tmp->min,
+ tmp->max);
+#endif
+ if (p->constraint.negative == NEG_USE_LT &&
+ tmp->max >= p->constraint.range.min) {
+ tmp->overflow = 0;
+ tmp->max = p->constraint.range.min - 1;
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, " => [%ld..%ld]\n",
+ tmp->min,
+ tmp->max);
+#endif
+ } else if (p->constraint.negative == NEG_USE_GT &&
+ tmp->min <= p->constraint.range.max) {
+ tmp->underflow = 0;
+ tmp->min = p->constraint.range.max + 1;
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, " => [%ld..%ld]\n",
+ tmp->min,
+ tmp->max);
+#endif
+ }
+ }
+#endif
+ } else if (ssa->var_info[p->sources[0]].has_range) {
+ /* intersection */
+ tmp->underflow = ssa->var_info[p->sources[0]].range.underflow;
+ tmp->min = ssa->var_info[p->sources[0]].range.min;
+ tmp->max = ssa->var_info[p->sources[0]].range.max;
+ tmp->overflow = ssa->var_info[p->sources[0]].range.overflow;
+ if (p->constraint.min_ssa_var < 0) {
+ tmp->underflow = p->constraint.range.underflow && tmp->underflow;
+ tmp->min = MAX(p->constraint.range.min, tmp->min);
+#ifdef SYM_RANGE
+ } else if (narrowing && ssa->var_info[p->constraint.min_ssa_var].has_range) {
+ tmp->underflow = ssa->var_info[p->constraint.min_ssa_var].range.underflow && tmp->underflow;
+ tmp->min = MAX(ssa->var_info[p->constraint.min_ssa_var].range.min + p->constraint.range.min, tmp->min);
+#endif
+ }
+ if (p->constraint.max_ssa_var < 0) {
+ tmp->max = MIN(p->constraint.range.max, tmp->max);
+ tmp->overflow = p->constraint.range.overflow && tmp->overflow;
+#ifdef SYM_RANGE
+ } else if (narrowing && ssa->var_info[p->constraint.max_ssa_var].has_range) {
+ tmp->max = MIN(ssa->var_info[p->constraint.max_ssa_var].range.max + p->constraint.range.max, tmp->max);
+ tmp->overflow = ssa->var_info[p->constraint.max_ssa_var].range.overflow && tmp->overflow;
+#endif
+ }
+ } else if (narrowing) {
+ if (p->constraint.min_ssa_var < 0) {
+ tmp->underflow = p->constraint.range.underflow;
+ tmp->min = p->constraint.range.min;
+#ifdef SYM_RANGE
+ } else if (narrowing && ssa->var_info[p->constraint.min_ssa_var].has_range) {
+ tmp->underflow = ssa->var_info[p->constraint.min_ssa_var].range.underflow;
+ tmp->min = ssa->var_info[p->constraint.min_ssa_var].range.min + p->constraint.range.min;
+#endif
+ } else {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ }
+ if (p->constraint.max_ssa_var < 0) {
+ tmp->max = p->constraint.range.max;
+ tmp->overflow = p->constraint.range.overflow;
+#ifdef SYM_RANGE
+ } else if (narrowing && ssa->var_info[p->constraint.max_ssa_var].has_range) {
+ tmp->max = ssa->var_info[p->constraint.max_ssa_var].range.max + p->constraint.range.max;
+ tmp->overflow = ssa->var_info[p->constraint.max_ssa_var].range.overflow;
+#endif
+ } else {
+ tmp->max = ZEND_LONG_MAX;
+ tmp->overflow = 1;
+ }
+ }
+ } else {
+ for (i = 0; i < ssa->cfg.blocks[p->block].predecessors_count; i++) {
+ if (p->sources[i] >= 0 && ssa->var_info[p->sources[i]].has_range) {
+ /* union */
+ tmp->underflow |= ssa->var_info[p->sources[i]].range.underflow;
+ tmp->min = MIN(tmp->min, ssa->var_info[p->sources[i]].range.min);
+ tmp->max = MAX(tmp->max, ssa->var_info[p->sources[i]].range.max);
+ tmp->overflow |= ssa->var_info[p->sources[i]].range.overflow;
+ } else if (narrowing) {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ tmp->overflow = 1;
+ }
+ }
+ }
+ return (tmp->min <= tmp->max);
+ } else if (ssa->vars[var].definition < 0) {
+ if (var < op_array->last_var &&
+ var != EX_VAR_TO_NUM(op_array->this_var) &&
+ op_array->function_name) {
+
+ tmp->min = 0;
+ tmp->max = 0;
+ tmp->underflow = 0;
+ tmp->overflow = 0;
+ return 1;
+ }
+ return 0;
+ }
+ line = ssa->vars[var].definition;
+ opline = op_array->opcodes + line;
+
+ tmp->underflow = 0;
+ tmp->overflow = 0;
+ switch (opline->opcode) {
+ case ZEND_ADD:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ tmp->min = op1_min + op2_min;
+ tmp->max = op1_max + op2_max;
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ (op1_min < 0 && op2_min < 0 && tmp->min >= 0)) {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ }
+ if (OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ (op1_max > 0 && op2_max > 0 && tmp->max <= 0)) {
+ tmp->overflow = 1;
+ tmp->max = ZEND_LONG_MAX;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_SUB:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ tmp->min = op1_min - op2_max;
+ tmp->max = op1_max - op2_min;
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ (op1_min < 0 && op2_max > 0 && tmp->min >= 0)) {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ }
+ if (OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ (op1_max > 0 && op2_min < 0 && tmp->max <= 0)) {
+ tmp->overflow = 1;
+ tmp->max = ZEND_LONG_MAX;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_MUL:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ t1 = op1_min * op2_min;
+ t2 = op1_min * op2_max;
+ t3 = op1_max * op2_min;
+ t4 = op1_max * op2_max;
+ // FIXME: more careful overflow checks?
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ (double)t1 != (double)op1_min * (double)op2_min ||
+ (double)t2 != (double)op1_min * (double)op2_max ||
+ (double)t3 != (double)op1_max * (double)op2_min ||
+ (double)t4 != (double)op1_max * (double)op2_max) {
+ tmp->underflow = 1;
+ tmp->overflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_DIV:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ if (op2_min <= 0 && op2_max >= 0) {
+ break;
+ }
+ t1 = op1_min / op2_min;
+ t2 = op1_min / op2_max;
+ t3 = op1_max / op2_min;
+ t4 = op1_max / op2_max;
+ // FIXME: more careful overflow checks?
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ t1 != (zend_long)((double)op1_min / (double)op2_min) ||
+ t2 != (zend_long)((double)op1_min / (double)op2_max) ||
+ t3 != (zend_long)((double)op1_max / (double)op2_min) ||
+ t4 != (zend_long)((double)op1_max / (double)op2_max)) {
+ tmp->underflow = 1;
+ tmp->overflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_MOD:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ if (op2_min == 0 || op2_max == 0) {
+ /* avoid division by zero */
+ break;
+ }
+ t1 = (op2_min == -1) ? 0 : (op1_min % op2_min);
+ t2 = (op2_max == -1) ? 0 : (op1_min % op2_max);
+ t3 = (op2_min == -1) ? 0 : (op1_max % op2_min);
+ t4 = (op2_max == -1) ? 0 : (op1_max % op2_max);
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ }
+ }
+ break;
+ case ZEND_SL:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ t1 = op1_min << op2_min;
+ t2 = op1_min << op2_max;
+ t3 = op1_max << op2_min;
+ t4 = op1_max << op2_max;
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_SR:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ t1 = op1_min >> op2_min;
+ t2 = op1_min >> op2_max;
+ t3 = op1_max >> op2_min;
+ t4 = op1_max >> op2_max;
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_BW_OR:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ zend_ssa_range_or(op1_min, op1_max, op2_min, op2_max, tmp);
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_BW_AND:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ zend_ssa_range_and(op1_min, op1_max, op2_min, op2_max, tmp);
+ }
+ return 1;
+ }
+ }
+ break;
+// case ZEND_BW_XOR:
+ case ZEND_BW_NOT:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ tmp->min = ~op1_max;
+ tmp->max = ~op1_min;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_CAST:
+ if (ssa->ops[line].result_def == var) {
+ if (opline->extended_value == IS_NULL) {
+ tmp->min = 0;
+ tmp->max = 0;
+ return 1;
+ } else if (opline->extended_value == _IS_BOOL) {
+ if (OP1_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ tmp->min = (op1_min > 0 || op1_max < 0);
+ tmp->max = (op1_min != 0 || op1_max != 0);
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ } else if (opline->extended_value == IS_LONG) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ return 1;
+ } else {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_BOOL:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ tmp->min = (op1_min > 0 || op1_max < 0);
+ tmp->max = (op1_min != 0 || op1_max != 0);
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_BOOL_NOT:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ tmp->min = (op1_min == 0 && op1_max == 0);
+ tmp->max = (op1_min <= 0 && op1_max >= 0);
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_BOOL_XOR:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ op1_min = (op1_min > 0 || op1_max < 0);
+ op1_max = (op1_min != 0 || op1_max != 0);
+ op2_min = (op2_min > 0 || op2_max < 0);
+ op2_max = (op2_min != 0 || op2_max != 0);
+ tmp->min = 0;
+ tmp->max = 1;
+ if (op1_min == op1_max && op2_min == op2_max) {
+ if (op1_min == op2_min) {
+ tmp->max = 0;
+ } else {
+ tmp->min = 1;
+ }
+ }
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_IS_IDENTICAL:
+ case ZEND_IS_EQUAL:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+
+ tmp->min = (op1_min == op1_max &&
+ op2_min == op2_max &&
+ op1_min == op2_max);
+ tmp->max = (op1_min <= op2_max && op1_max >= op2_min);
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_IS_NOT_IDENTICAL:
+ case ZEND_IS_NOT_EQUAL:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+
+ tmp->min = (op1_min > op2_max || op1_max < op2_min);
+ tmp->max = (op1_min != op1_max ||
+ op2_min != op2_max ||
+ op1_min != op2_max);
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_IS_SMALLER:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+
+ tmp->min = op1_max < op2_min;
+ tmp->max = op1_min < op2_max;
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_IS_SMALLER_OR_EQUAL:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+
+ tmp->min = op1_max <= op2_min;
+ tmp->max = op1_min <= op2_max;
+ return 1;
+ } else {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ }
+ break;
+ case ZEND_QM_ASSIGN:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ if (ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ break;
+ case ZEND_ASSERT_CHECK:
+ if (ssa->ops[line].result_def == var) {
+ tmp->min = 0;
+ tmp->max = 1;
+ return 1;
+ }
+ break;
+ case ZEND_SEND_VAR:
+ if (ssa->ops[line].op1_def == var) {
+ if (ssa->ops[line].op1_def >= 0) {
+ if (OP1_HAS_RANGE()) {
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_PRE_INC:
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ if (tmp->max < ZEND_LONG_MAX) {
+ tmp->max++;
+ } else {
+ tmp->overflow = 1;
+ }
+ if (tmp->min < ZEND_LONG_MAX && !tmp->underflow) {
+ tmp->min++;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_PRE_DEC:
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ if (tmp->min > ZEND_LONG_MIN) {
+ tmp->min--;
+ } else {
+ tmp->underflow = 1;
+ }
+ if (tmp->max > ZEND_LONG_MIN && !tmp->overflow) {
+ tmp->max--;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_POST_INC:
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ if (ssa->ops[line].result_def == var) {
+ return 1;
+ }
+ if (tmp->max < ZEND_LONG_MAX) {
+ tmp->max++;
+ } else {
+ tmp->overflow = 1;
+ }
+ if (tmp->min < ZEND_LONG_MAX && !tmp->underflow) {
+ tmp->min++;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_POST_DEC:
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ if (ssa->ops[line].result_def == var) {
+ return 1;
+ }
+ if (tmp->min > ZEND_LONG_MIN) {
+ tmp->min--;
+ } else {
+ tmp->underflow = 1;
+ }
+ if (tmp->max > ZEND_LONG_MIN && !tmp->overflow) {
+ tmp->max--;
+ }
+ return 1;
+ }
+ }
+ break;
+ case ZEND_UNSET_DIM:
+ case ZEND_UNSET_OBJ:
+ if (ssa->ops[line].op1_def == var) {
+ /* If op1 is scalar, UNSET_DIM and UNSET_OBJ have no effect, so we can keep
+ * the previous ranges. */
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ break;
+ case ZEND_ASSIGN:
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].op2_def == var || ssa->ops[line].result_def == var) {
+ if (OP2_HAS_RANGE()) {
+ tmp->min = OP2_MIN_RANGE();
+ tmp->max = OP2_MAX_RANGE();
+ tmp->underflow = OP2_RANGE_UNDERFLOW();
+ tmp->overflow = OP2_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ break;
+ case ZEND_ASSIGN_DIM:
+ case ZEND_ASSIGN_OBJ:
+ if (ssa->ops[line+1].op1_def == var) {
+ if ((opline+1)->opcode == ZEND_OP_DATA) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ break;
+ case ZEND_ASSIGN_ADD:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ tmp->min = op1_min + op2_min;
+ tmp->max = op1_max + op2_max;
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ (op1_min < 0 && op2_min < 0 && tmp->min >= 0)) {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ }
+ if (OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ (op1_max > 0 && op2_max > 0 && tmp->max <= 0)) {
+ tmp->overflow = 1;
+ tmp->max = ZEND_LONG_MAX;
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ opline++;
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_SUB:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ tmp->min = op1_min - op2_max;
+ tmp->max = op1_max - op2_min;
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ (op1_min < 0 && op2_max > 0 && tmp->min >= 0)) {
+ tmp->underflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ }
+ if (OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ (op1_max > 0 && op2_min < 0 && tmp->max <= 0)) {
+ tmp->overflow = 1;
+ tmp->max = ZEND_LONG_MAX;
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ opline++;
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_MUL:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ t1 = op1_min * op2_min;
+ t2 = op1_min * op2_max;
+ t3 = op1_max * op2_min;
+ t4 = op1_max * op2_max;
+ // FIXME: more careful overflow checks?
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ (double)t1 != (double)op1_min * (double)op2_min ||
+ (double)t2 != (double)op1_min * (double)op2_min ||
+ (double)t3 != (double)op1_min * (double)op2_min ||
+ (double)t4 != (double)op1_min * (double)op2_min) {
+ tmp->underflow = 1;
+ tmp->overflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_DIV:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ if (op2_min <= 0 && op2_max >= 0) {
+ break;
+ }
+ t1 = op1_min / op2_min;
+ t2 = op1_min / op2_max;
+ t3 = op1_max / op2_min;
+ t4 = op1_max / op2_max;
+ // FIXME: more careful overflow checks?
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW() ||
+ t1 != (zend_long)((double)op1_min / (double)op2_min) ||
+ t2 != (zend_long)((double)op1_min / (double)op2_max) ||
+ t3 != (zend_long)((double)op1_max / (double)op2_min) ||
+ t4 != (zend_long)((double)op1_max / (double)op2_max)) {
+ tmp->underflow = 1;
+ tmp->overflow = 1;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_MOD:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ if (op2_min == 0 || op2_max == 0) {
+ /* avoid division by zero */
+ break;
+ }
+ t1 = op1_min % op2_min;
+ t2 = op1_min % op2_max;
+ t3 = op1_max % op2_min;
+ t4 = op1_max % op2_max;
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_SL:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ t1 = op1_min << op2_min;
+ t2 = op1_min << op2_max;
+ t3 = op1_max << op2_min;
+ t4 = op1_max << op2_max;
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_SR:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ t1 = op1_min >> op2_min;
+ t2 = op1_min >> op2_max;
+ t3 = op1_max >> op2_min;
+ t4 = op1_max >> op2_max;
+ tmp->min = MIN(MIN(t1, t2), MIN(t3, t4));
+ tmp->max = MAX(MAX(t1, t2), MAX(t3, t4));
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_BW_OR:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ zend_ssa_range_or(op1_min, op1_max, op2_min, op2_max, tmp);
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_ASSIGN_BW_AND:
+ if (opline->extended_value == 0) {
+ if (ssa->ops[line].op1_def == var || ssa->ops[line].result_def == var) {
+ if (OP1_HAS_RANGE() && OP2_HAS_RANGE()) {
+ if (OP1_RANGE_UNDERFLOW() ||
+ OP2_RANGE_UNDERFLOW() ||
+ OP1_RANGE_OVERFLOW() ||
+ OP2_RANGE_OVERFLOW()) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else {
+ op1_min = OP1_MIN_RANGE();
+ op2_min = OP2_MIN_RANGE();
+ op1_max = OP1_MAX_RANGE();
+ op2_max = OP2_MAX_RANGE();
+ zend_ssa_range_and(op1_min, op1_max, op2_min, op2_max, tmp);
+ }
+ return 1;
+ }
+ }
+ } else if ((opline+1)->opcode == ZEND_OP_DATA) {
+ if (ssa->ops[line+1].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ opline++;
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ }
+ break;
+// case ZEND_ASSIGN_BW_XOR:
+// case ZEND_ASSIGN_CONCAT:
+ case ZEND_OP_DATA:
+ if ((opline-1)->opcode == ZEND_ASSIGN_DIM ||
+ (opline-1)->opcode == ZEND_ASSIGN_OBJ ||
+ (opline-1)->opcode == ZEND_ASSIGN_ADD ||
+ (opline-1)->opcode == ZEND_ASSIGN_SUB ||
+ (opline-1)->opcode == ZEND_ASSIGN_MUL) {
+ if (ssa->ops[line].op1_def == var) {
+ if (OP1_HAS_RANGE()) {
+ tmp->min = OP1_MIN_RANGE();
+ tmp->max = OP1_MAX_RANGE();
+ tmp->underflow = OP1_RANGE_UNDERFLOW();
+ tmp->overflow = OP1_RANGE_OVERFLOW();
+ return 1;
+ }
+ }
+ break;
+ }
+ break;
+ case ZEND_RECV:
+ case ZEND_RECV_INIT:
+ if (ssa->ops[line].result_def == var) {
+ zend_func_info *func_info = ZEND_FUNC_INFO(op_array);
+
+ if (func_info &&
+ (int)opline->op1.num-1 < func_info->num_args &&
+ func_info->arg_info[opline->op1.num-1].info.has_range) {
+ *tmp = func_info->arg_info[opline->op1.num-1].info.range;
+ return 1;
+ } else if (op_array->arg_info &&
+ opline->op1.num <= op_array->num_args) {
+ if (op_array->arg_info[opline->op1.num-1].type_hint == IS_LONG) {
+ tmp->underflow = 0;
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ tmp->overflow = 0;
+ return 1;
+ } else if (op_array->arg_info[opline->op1.num-1].type_hint == _IS_BOOL) {
+ tmp->underflow = 0;
+ tmp->min = 0;
+ tmp->max = 1;
+ tmp->overflow = 0;
+ return 1;
+ }
+ }
+ }
+ break;
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ if (ssa->ops[line].result_def == var && ZEND_FUNC_INFO(op_array)) {
+ zend_func_info *func_info = ZEND_FUNC_INFO(op_array);
+ zend_call_info *call_info = func_info->callee_info;
+
+ while (call_info && call_info->caller_call_opline != opline) {
+ call_info = call_info->next_callee;
+ }
+ if (call_info) {
+ if (call_info->callee_func->type == ZEND_USER_FUNCTION) {
+ func_info = ZEND_FUNC_INFO(&call_info->callee_func->op_array);
+ if (func_info && func_info->return_info.has_range) {
+ *tmp = func_info->return_info.range;
+ return 1;
+ }
+ }
+//TODO: we can't use type inference for internal functions at this point ???
+#if 0
+ uint32_t type;
+
+ type = zend_get_func_info(call_info, ssa);
+ if (!(type & (MAY_BE_ANY - (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG)))) {
+ tmp->underflow = 0;
+ tmp->min = 0;
+ tmp->max = 0;
+ tmp->overflow = 0;
+ if (type & MAY_BE_LONG) {
+ tmp->min = ZEND_LONG_MIN;
+ tmp->max = ZEND_LONG_MAX;
+ } else if (type & MAY_BE_TRUE) {
+ if (!(type & (MAY_BE_NULL|MAY_BE_FALSE))) {
+ tmp->min = 1;
+ }
+ tmp->max = 1;
+ }
+ return 1;
+ }
+#endif
+ }
+ }
+ break;
+ // FIXME: support for more opcodes
+ default:
+ break;
+ }
+ return 0;
+}
+
+void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, zend_bool underflow, zend_long min, zend_long max, zend_bool overflow)
+{
+ if (underflow) {
+ min = ZEND_LONG_MIN;
+ }
+ if (overflow) {
+ max = ZEND_LONG_MAX;
+ }
+ ssa->var_info[var].has_range = 1;
+ ssa->var_info[var].range.underflow = underflow;
+ ssa->var_info[var].range.min = min;
+ ssa->var_info[var].range.max = max;
+ ssa->var_info[var].range.overflow = overflow;
+#ifdef LOG_SSA_RANGE
+ fprintf(stderr, " change range (init SCC %2d) %2d [%s%ld..%ld%s]\n", ssa->vars[var].scc, var, (underflow?"-- ":""), min, max, (overflow?" ++":""));
+#endif
+}
+
+int zend_inference_widening_meet(zend_ssa_var_info *var_info, zend_ssa_range *r)
+{
+ if (!var_info->has_range) {
+ var_info->has_range = 1;
+ } else {
+ if (r->underflow ||
+ var_info->range.underflow ||
+ r->min < var_info->range.min) {
+ r->underflow = 1;
+ r->min = ZEND_LONG_MIN;
+ }
+ if (r->overflow ||
+ var_info->range.overflow ||
+ r->max > var_info->range.max) {
+ r->overflow = 1;
+ r->max = ZEND_LONG_MAX;
+ }
+ if (var_info->range.min == r->min &&
+ var_info->range.max == r->max &&
+ var_info->range.underflow == r->underflow &&
+ var_info->range.overflow == r->overflow) {
+ return 0;
+ }
+ }
+ var_info->range = *r;
+ return 1;
+}
+
+static int zend_ssa_range_widening(const zend_op_array *op_array, zend_ssa *ssa, int var, int scc)
+{
+ zend_ssa_range tmp;
+
+ if (zend_inference_calc_range(op_array, ssa, var, 1, 0, &tmp)) {
+ if (zend_inference_widening_meet(&ssa->var_info[var], &tmp)) {
+#ifdef LOG_SSA_RANGE
+ fprintf(stderr, " change range (widening SCC %2d) %2d [%s%ld..%ld%s]\n", scc, var, (tmp.underflow?"-- ":""), tmp.min, tmp.max, (tmp.overflow?" ++":""));
+#endif
+ return 1;
+ }
+ }
+ return 0;
+}
+
+int zend_inference_narrowing_meet(zend_ssa_var_info *var_info, zend_ssa_range *r)
+{
+ if (!var_info->has_range) {
+ var_info->has_range = 1;
+ } else {
+ if (!r->underflow &&
+ !var_info->range.underflow &&
+ var_info->range.min < r->min) {
+ r->min = var_info->range.min;
+ }
+ if (!r->overflow &&
+ !var_info->range.overflow &&
+ var_info->range.max > r->max) {
+ r->max = var_info->range.max;
+ }
+ if (r->underflow) {
+ r->min = ZEND_LONG_MIN;
+ }
+ if (r->overflow) {
+ r->max = ZEND_LONG_MAX;
+ }
+ if (var_info->range.min == r->min &&
+ var_info->range.max == r->max &&
+ var_info->range.underflow == r->underflow &&
+ var_info->range.overflow == r->overflow) {
+ return 0;
+ }
+ }
+ var_info->range = *r;
+ return 1;
+}
+
+static int zend_ssa_range_narrowing(const zend_op_array *op_array, zend_ssa *ssa, int var, int scc)
+{
+ zend_ssa_range tmp;
+
+ if (zend_inference_calc_range(op_array, ssa, var, 0, 1, &tmp)) {
+ if (zend_inference_narrowing_meet(&ssa->var_info[var], &tmp)) {
+#ifdef LOG_SSA_RANGE
+ fprintf(stderr, " change range (narrowing SCC %2d) %2d [%s%ld..%ld%s]\n", scc, var, (tmp.underflow?"-- ":""), tmp.min, tmp.max, (tmp.overflow?" ++":""));
+#endif
+ return 1;
+ }
+ }
+ return 0;
+}
+
+#ifdef NEG_RANGE
+# define CHECK_INNER_CYCLE(var2) \
+ do { \
+ if (ssa->vars[var2].scc == ssa->vars[var].scc && \
+ !ssa->vars[var2].scc_entry && \
+ !zend_bitset_in(visited, var2) && \
+ zend_check_inner_cycles(op_array, ssa, worklist, visited, var2)) { \
+ return 1; \
+ } \
+ } while (0)
+
+static int zend_check_inner_cycles(const zend_op_array *op_array, zend_ssa *ssa, zend_bitset worklist, zend_bitset visited, int var)
+{
+ if (zend_bitset_in(worklist, var)) {
+ return 1;
+ }
+ zend_bitset_incl(worklist, var);
+ FOR_EACH_VAR_USAGE(var, CHECK_INNER_CYCLE);
+ zend_bitset_incl(visited, var);
+ return 0;
+}
+#endif
+
+static void zend_infer_ranges_warmup(const zend_op_array *op_array, zend_ssa *ssa, int *scc_var, int *next_scc_var, int scc)
+{
+ int worklist_len = zend_bitset_len(ssa->vars_count);
+ zend_bitset worklist;
+ zend_bitset visited;
+ int j, n;
+ zend_ssa_range tmp;
+#ifdef NEG_RANGE
+ int has_inner_cycles = 0;
+ ALLOCA_FLAG(use_heap);
+
+ worklist = do_alloca(sizeof(zend_ulong) * worklist_len * 2, use_heap);
+ visited = worklist + worklist_len;
+ memset(worklist, 0, sizeof(zend_ulong) * worklist_len);
+ memset(visited, 0, sizeof(zend_ulong) * worklist_len);
+ j= scc_var[scc];
+ while (j >= 0) {
+ if (!zend_bitset_in(visited, j) &&
+ zend_check_inner_cycles(op_array, ssa, worklist, visited, j)) {
+ has_inner_cycles = 1;
+ break;
+ }
+ j = next_scc_var[j];
+ }
+#endif
+
+ memset(worklist, 0, sizeof(zend_ulong) * worklist_len);
+
+ for (n = 0; n < RANGE_WARMAP_PASSES; n++) {
+ j= scc_var[scc];
+ while (j >= 0) {
+ if (ssa->vars[j].scc_entry) {
+ zend_bitset_incl(worklist, j);
+ }
+ j = next_scc_var[j];
+ }
+
+ memset(visited, 0, sizeof(zend_ulong) * worklist_len);
+
+ while (!zend_bitset_empty(worklist, worklist_len)) {
+ j = zend_bitset_first(worklist, worklist_len);
+ zend_bitset_excl(worklist, j);
+ if (zend_inference_calc_range(op_array, ssa, j, 0, 0, &tmp)) {
+#ifdef NEG_RANGE
+ if (!has_inner_cycles &&
+ ssa->var_info[j].has_range &&
+ ssa->vars[j].definition_phi &&
+ ssa->vars[j].definition_phi->pi >= 0 &&
+ ssa->vars[j].definition_phi->constraint.type_mask == (uint32_t) -1 &&
+ ssa->vars[j].definition_phi->constraint.negative &&
+ ssa->vars[j].definition_phi->constraint.min_ssa_var < 0 &&
+ ssa->vars[j].definition_phi->constraint.min_ssa_var < 0) {
+ if (tmp.min == ssa->var_info[j].range.min &&
+ tmp.max == ssa->var_info[j].range.max) {
+ if (ssa->vars[j].definition_phi->constraint.negative == NEG_INIT) {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "#%d INVARIANT\n", j);
+#endif
+ ssa->vars[j].definition_phi->constraint.negative = NEG_INVARIANT;
+ }
+ } else if (tmp.min == ssa->var_info[j].range.min &&
+ tmp.max == ssa->var_info[j].range.max + 1 &&
+ tmp.max < ssa->vars[j].definition_phi->constraint.range.min) {
+ if (ssa->vars[j].definition_phi->constraint.negative == NEG_INIT ||
+ ssa->vars[j].definition_phi->constraint.negative == NEG_INVARIANT) {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "#%d LT\n", j);
+#endif
+ ssa->vars[j].definition_phi->constraint.negative = NEG_USE_LT;
+//???NEG
+ } else if (ssa->vars[j].definition_phi->constraint.negative == NEG_USE_GT) {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "#%d UNKNOWN\n", j);
+#endif
+ ssa->vars[j].definition_phi->constraint.negative = NEG_UNKNOWN;
+ }
+ } else if (tmp.max == ssa->var_info[j].range.max &&
+ tmp.min == ssa->var_info[j].range.min - 1 &&
+ tmp.min > ssa->vars[j].definition_phi->constraint.range.max) {
+ if (ssa->vars[j].definition_phi->constraint.negative == NEG_INIT ||
+ ssa->vars[j].definition_phi->constraint.negative == NEG_INVARIANT) {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "#%d GT\n", j);
+#endif
+ ssa->vars[j].definition_phi->constraint.negative = NEG_USE_GT;
+//???NEG
+ } else if (ssa->vars[j].definition_phi->constraint.negative == NEG_USE_LT) {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "#%d UNKNOWN\n", j);
+#endif
+ ssa->vars[j].definition_phi->constraint.negative = NEG_UNKNOWN;
+ }
+ } else {
+#ifdef LOG_NEG_RANGE
+ fprintf(stderr, "#%d UNKNOWN\n", j);
+#endif
+ ssa->vars[j].definition_phi->constraint.negative = NEG_UNKNOWN;
+ }
+ }
+#endif
+ if (zend_inference_narrowing_meet(&ssa->var_info[j], &tmp)) {
+#ifdef LOG_SSA_RANGE
+ fprintf(stderr, " change range (warmup %d SCC %2d) %2d [%s%ld..%ld%s]\n", n, scc, j, (tmp.underflow?"-- ":""), tmp.min, tmp.max, (tmp.overflow?" ++":""));
+#endif
+ zend_bitset_incl(visited, j);
+ FOR_EACH_VAR_USAGE(j, ADD_SCC_VAR_1);
+ }
+ }
+ }
+ }
+ free_alloca(worklist, use_heap);
+}
+
+static int zend_infer_ranges(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
+{
+ int worklist_len = zend_bitset_len(ssa->vars_count);
+ zend_bitset worklist;
+ int *next_scc_var;
+ int *scc_var;
+ zend_ssa_phi *p;
+ zend_ssa_range tmp;
+ int scc, j;
+ ALLOCA_FLAG(use_heap);
+
+ worklist = do_alloca(
+ sizeof(zend_ulong) * worklist_len +
+ sizeof(int) * ssa->vars_count +
+ sizeof(int) * ssa->sccs, use_heap);
+ next_scc_var = (int*)(worklist + worklist_len);
+ scc_var = next_scc_var + ssa->vars_count;
+
+#ifdef LOG_SSA_RANGE
+ fprintf(stderr, "Range Inference\n");
+#endif
+
+ /* Create linked lists of SSA variables for each SCC */
+ memset(scc_var, -1, sizeof(int) * ssa->sccs);
+ for (j = 0; j < ssa->vars_count; j++) {
+ if (ssa->vars[j].scc >= 0) {
+ next_scc_var[j] = scc_var[ssa->vars[j].scc];
+ scc_var[ssa->vars[j].scc] = j;
+ }
+ }
+
+ for (scc = 0; scc < ssa->sccs; scc++) {
+ j = scc_var[scc];
+ if (next_scc_var[j] < 0) {
+ /* SCC with a single element */
+ if (zend_inference_calc_range(op_array, ssa, j, 0, 1, &tmp)) {
+ zend_inference_init_range(op_array, ssa, j, tmp.underflow, tmp.min, tmp.max, tmp.overflow);
+ } else {
+ zend_inference_init_range(op_array, ssa, j, 1, ZEND_LONG_MIN, ZEND_LONG_MAX, 1);
+ }
+ } else {
+ /* Find SCC entry points */
+ memset(worklist, 0, sizeof(zend_ulong) * worklist_len);
+ do {
+ if (ssa->vars[j].scc_entry) {
+ zend_bitset_incl(worklist, j);
+ }
+ j = next_scc_var[j];
+ } while (j >= 0);
+
+#if RANGE_WARMAP_PASSES > 0
+ zend_infer_ranges_warmup(op_array, ssa, scc_var, next_scc_var, scc);
+ j = scc_var[scc];
+ do {
+ zend_bitset_incl(worklist, j);
+ j = next_scc_var[j];
+ } while (j >= 0);
+#endif
+
+ /* widening */
+ while (!zend_bitset_empty(worklist, worklist_len)) {
+ j = zend_bitset_first(worklist, worklist_len);
+ zend_bitset_excl(worklist, j);
+ if (zend_ssa_range_widening(op_array, ssa, j, scc)) {
+ FOR_EACH_VAR_USAGE(j, ADD_SCC_VAR);
+ }
+ }
+
+ /* Add all SCC entry variables into worklist for narrowing */
+ for (j = scc_var[scc]; j >= 0; j = next_scc_var[j]) {
+ if (!ssa->var_info[j].has_range) {
+ zend_inference_init_range(op_array, ssa, j, 1, ZEND_LONG_MIN, ZEND_LONG_MAX, 1);
+ }
+ zend_bitset_incl(worklist, j);
+ }
+
+ /* narrowing */
+ while (!zend_bitset_empty(worklist, worklist_len)) {
+ j = zend_bitset_first(worklist, worklist_len);
+ zend_bitset_excl(worklist, j);
+ if (zend_ssa_range_narrowing(op_array, ssa, j, scc)) {
+ FOR_EACH_VAR_USAGE(j, ADD_SCC_VAR);
+#ifdef SYM_RANGE
+ /* Process symbolic control-flow constraints */
+ p = ssa->vars[j].sym_use_chain;
+ while (p) {
+ ADD_SCC_VAR(p->ssa_var);
+ p = p->sym_use_chain;
+ }
+#endif
+ }
+ }
+ }
+ }
+
+ free_alloca(worklist, use_heap);
+
+ return SUCCESS;
+}
+/* }}} */
+
+#define UPDATE_SSA_TYPE(_type, _var) \
+ do { \
+ uint32_t __type = (_type); \
+ int __var = (_var); \
+ if (__type & MAY_BE_REF) { \
+ __type |= MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; \
+ } \
+ if (__var >= 0) { \
+ if (ssa_vars[__var].var < op_array->last_var) { \
+ if (__type & (MAY_BE_REF|MAY_BE_RCN)) { \
+ __type |= MAY_BE_RC1 | MAY_BE_RCN; \
+ } \
+ } \
+ if (ssa_var_info[__var].type != __type) { \
+ check_type_narrowing(op_array, ssa, worklist, \
+ __var, ssa_var_info[__var].type, __type); \
+ ssa_var_info[__var].type = __type; \
+ add_usages(op_array, ssa, worklist, __var); \
+ } \
+ /*zend_bitset_excl(worklist, var);*/ \
+ } \
+ } while (0)
+
+#define UPDATE_SSA_OBJ_TYPE(_ce, _is_instanceof, var) \
+ do { \
+ if (var >= 0) { \
+ if (ssa_var_info[var].ce != (_ce) || \
+ ssa_var_info[var].is_instanceof != (_is_instanceof)) { \
+ ssa_var_info[var].ce = (_ce); \
+ ssa_var_info[var].is_instanceof = (_is_instanceof); \
+ add_usages(op_array, ssa, worklist, var); \
+ } \
+ /*zend_bitset_excl(worklist, var);*/ \
+ } \
+ } while (0)
+
+#define COPY_SSA_OBJ_TYPE(from_var, to_var) do { \
+ if ((from_var) >= 0 && (ssa_var_info[(from_var)].type & MAY_BE_OBJECT) \
+ && ssa_var_info[(from_var)].ce) { \
+ UPDATE_SSA_OBJ_TYPE(ssa_var_info[(from_var)].ce, \
+ ssa_var_info[(from_var)].is_instanceof, (to_var)); \
+ } else { \
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, (to_var)); \
+ } \
+} while (0)
+
+static void add_usages(const zend_op_array *op_array, zend_ssa *ssa, zend_bitset worklist, int var)
+{
+ if (ssa->vars[var].phi_use_chain) {
+ zend_ssa_phi *p = ssa->vars[var].phi_use_chain;
+ do {
+ zend_bitset_incl(worklist, p->ssa_var);
+ p = zend_ssa_next_use_phi(ssa, var, p);
+ } while (p);
+ }
+ if (ssa->vars[var].use_chain >= 0) {
+ int use = ssa->vars[var].use_chain;
+ zend_ssa_op *op;
+
+ do {
+ op = ssa->ops + use;
+ if (op->result_def >= 0) {
+ zend_bitset_incl(worklist, op->result_def);
+ }
+ if (op->op1_def >= 0) {
+ zend_bitset_incl(worklist, op->op1_def);
+ }
+ if (op->op2_def >= 0) {
+ zend_bitset_incl(worklist, op->op2_def);
+ }
+ if (op_array->opcodes[use].opcode == ZEND_OP_DATA) {
+ op--;
+ if (op->result_def >= 0) {
+ zend_bitset_incl(worklist, op->result_def);
+ }
+ if (op->op1_def >= 0) {
+ zend_bitset_incl(worklist, op->op1_def);
+ }
+ if (op->op2_def >= 0) {
+ zend_bitset_incl(worklist, op->op2_def);
+ }
+ }
+ use = zend_ssa_next_use(ssa->ops, var, use);
+ } while (use >= 0);
+ }
+}
+
+static void reset_dependent_vars(const zend_op_array *op_array, zend_ssa *ssa, zend_bitset worklist, int var)
+{
+ zend_ssa_op *ssa_ops = ssa->ops;
+ zend_ssa_var *ssa_vars = ssa->vars;
+ zend_ssa_var_info *ssa_var_info = ssa->var_info;
+ zend_ssa_phi *p;
+ int use;
+
+ p = ssa_vars[var].phi_use_chain;
+ while (p) {
+ if (ssa_var_info[p->ssa_var].type) {
+ ssa_var_info[p->ssa_var].type = 0;
+ zend_bitset_incl(worklist, p->ssa_var);
+ reset_dependent_vars(op_array, ssa, worklist, p->ssa_var);
+ }
+ p = zend_ssa_next_use_phi(ssa, var, p);
+ }
+ use = ssa_vars[var].use_chain;
+ while (use >= 0) {
+ if (ssa_ops[use].op1_def >= 0 && ssa_var_info[ssa_ops[use].op1_def].type) {
+ ssa_var_info[ssa_ops[use].op1_def].type = 0;
+ zend_bitset_incl(worklist, ssa_ops[use].op1_def);
+ reset_dependent_vars(op_array, ssa, worklist, ssa_ops[use].op1_def);
+ }
+ if (ssa_ops[use].op2_def >= 0 && ssa_var_info[ssa_ops[use].op2_def].type) {
+ ssa_var_info[ssa_ops[use].op2_def].type = 0;
+ zend_bitset_incl(worklist, ssa_ops[use].op2_def);
+ reset_dependent_vars(op_array, ssa, worklist, ssa_ops[use].op2_def);
+ }
+ if (ssa_ops[use].result_def >= 0 && ssa_var_info[ssa_ops[use].result_def].type) {
+ ssa_var_info[ssa_ops[use].result_def].type = 0;
+ zend_bitset_incl(worklist, ssa_ops[use].result_def);
+ reset_dependent_vars(op_array, ssa, worklist, ssa_ops[use].result_def);
+ }
+ if (op_array->opcodes[use+1].opcode == ZEND_OP_DATA) {
+ if (ssa_ops[use+1].op1_def >= 0 && ssa_var_info[ssa_ops[use+1].op1_def].type) {
+ ssa_var_info[ssa_ops[use+1].op1_def].type = 0;
+ zend_bitset_incl(worklist, ssa_ops[use+1].op1_def);
+ reset_dependent_vars(op_array, ssa, worklist, ssa_ops[use+1].op1_def);
+ }
+ if (ssa_ops[use+1].op2_def >= 0 && ssa_var_info[ssa_ops[use+1].op2_def].type) {
+ ssa_var_info[ssa_ops[use+1].op2_def].type = 0;
+ zend_bitset_incl(worklist, ssa_ops[use+1].op2_def);
+ reset_dependent_vars(op_array, ssa, worklist, ssa_ops[use+1].op2_def);
+ }
+ if (ssa_ops[use+1].result_def >= 0 && ssa_var_info[ssa_ops[use+1].result_def].type) {
+ ssa_var_info[ssa_ops[use+1].result_def].type = 0;
+ zend_bitset_incl(worklist, ssa_ops[use+1].result_def);
+ reset_dependent_vars(op_array, ssa, worklist, ssa_ops[use+1].result_def);
+ }
+ }
+ use = zend_ssa_next_use(ssa_ops, var, use);
+ }
+#ifdef SYM_RANGE
+ /* Process symbolic control-flow constraints */
+ p = ssa->vars[var].sym_use_chain;
+ while (p) {
+ ssa_var_info[p->ssa_var].type = 0;
+ zend_bitset_incl(worklist, p->ssa_var);
+ reset_dependent_vars(op_array, ssa, worklist, p->ssa_var);
+ p = p->sym_use_chain;
+ }
+#endif
+}
+
+static void check_type_narrowing(const zend_op_array *op_array, zend_ssa *ssa, zend_bitset worklist, int var, uint32_t old_type, uint32_t new_type)
+{
+ /* if new_type set resets some bits from old_type set
+ * We have completely recalculate types of some dependent SSA variables
+ * (this may occurs mainly because of incremental inter-precudure
+ * type inference)
+ */
+ if (old_type & ~new_type) {
+ reset_dependent_vars(op_array, ssa, worklist, var);
+ }
+}
+
+uint32_t zend_array_element_type(uint32_t t1, int write, int insert)
+{
+ uint32_t tmp = 0;
+
+ if (t1 & MAY_BE_OBJECT) {
+ tmp |= MAY_BE_ANY | MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ }
+ if (t1 & MAY_BE_ARRAY) {
+ if (insert) {
+ tmp |= MAY_BE_NULL | MAY_BE_RCN;
+ } else {
+ tmp |= MAY_BE_NULL | ((t1 & MAY_BE_ARRAY_OF_ANY) >> MAY_BE_ARRAY_SHIFT);
+ if (tmp & MAY_BE_ARRAY) {
+ tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ }
+ if (t1 & MAY_BE_ARRAY_OF_REF) {
+ tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN;
+ } else {
+ tmp |= MAY_BE_RC1 | MAY_BE_RCN;
+ }
+ }
+ }
+ if (t1 & MAY_BE_STRING) {
+ tmp |= MAY_BE_STRING | MAY_BE_RC1;
+ if (write) {
+ tmp |= MAY_BE_NULL;
+ }
+ }
+ if (t1 & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) {
+ tmp |= MAY_BE_NULL | MAY_BE_RCN;
+ if (t1 & MAY_BE_ERROR) {
+ if (write) {
+ tmp |= MAY_BE_ERROR;
+ }
+ }
+ }
+ if (t1 & (MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_RESOURCE)) {
+ tmp |= MAY_BE_NULL | MAY_BE_RCN;
+ if (write) {
+ tmp |= MAY_BE_ERROR;
+ }
+ }
+ return tmp;
+}
+
+static uint32_t assign_dim_result_type(
+ uint32_t arr_type, uint32_t dim_type, uint32_t value_type, zend_uchar dim_op_type) {
+ uint32_t tmp = arr_type
+ & (MAY_BE_ANY|MAY_BE_REF|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF)
+ & ~(MAY_BE_NULL|MAY_BE_FALSE);
+ if (arr_type & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_STRING)) {
+ tmp |= MAY_BE_ARRAY;
+ }
+ if (arr_type & (MAY_BE_RC1|MAY_BE_RCN)) {
+ tmp |= MAY_BE_RC1;
+ }
+ if (tmp & MAY_BE_ARRAY) {
+ tmp |= (value_type & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT;
+ if (value_type & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_ARRAY_OF_NULL;
+ }
+ if (dim_op_type == IS_UNUSED) {
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ } else {
+ if (dim_type & (MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_RESOURCE|MAY_BE_DOUBLE)) {
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ }
+ if (dim_type & MAY_BE_STRING) {
+ tmp |= MAY_BE_ARRAY_KEY_STRING;
+ if (dim_op_type != IS_CONST) {
+ // FIXME: numeric string
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ }
+ }
+ if (dim_type & (MAY_BE_UNDEF|MAY_BE_NULL)) {
+ tmp |= MAY_BE_ARRAY_KEY_STRING;
+ }
+ }
+ }
+ return tmp;
+}
+
+/* For binary ops that have compound assignment operators */
+static uint32_t binary_op_result_type(
+ zend_ssa *ssa, zend_uchar opcode, uint32_t t1, uint32_t t2, uint32_t result_var) {
+ uint32_t tmp;
+ uint32_t t1_type = (t1 & MAY_BE_ANY) | (t1 & MAY_BE_UNDEF ? MAY_BE_NULL : 0);
+ uint32_t t2_type = (t2 & MAY_BE_ANY) | (t2 & MAY_BE_UNDEF ? MAY_BE_NULL : 0);
+ switch (opcode) {
+ case ZEND_ADD:
+ tmp = MAY_BE_RC1;
+ if (t1_type == MAY_BE_LONG && t2_type == MAY_BE_LONG) {
+ if (!ssa->var_info[result_var].has_range ||
+ ssa->var_info[result_var].range.underflow ||
+ ssa->var_info[result_var].range.overflow) {
+ /* may overflow */
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ } else {
+ tmp |= MAY_BE_LONG;
+ }
+ } else if (t1_type == MAY_BE_DOUBLE || t2_type == MAY_BE_DOUBLE) {
+ tmp |= MAY_BE_DOUBLE;
+ } else if (t1_type == MAY_BE_ARRAY && t2_type == MAY_BE_ARRAY) {
+ tmp |= MAY_BE_ARRAY;
+ tmp |= t1 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF);
+ tmp |= t2 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF);
+ } else {
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ if ((t1_type & MAY_BE_ARRAY) && (t2_type & MAY_BE_ARRAY)) {
+ tmp |= MAY_BE_ARRAY;
+ tmp |= t1 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF);
+ tmp |= t2 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF);
+ }
+ }
+ break;
+ case ZEND_SUB:
+ case ZEND_MUL:
+ tmp = MAY_BE_RC1;
+ if (t1_type == MAY_BE_LONG && t2_type == MAY_BE_LONG) {
+ if (!ssa->var_info[result_var].has_range ||
+ ssa->var_info[result_var].range.underflow ||
+ ssa->var_info[result_var].range.overflow) {
+ /* may overflow */
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ } else {
+ tmp |= MAY_BE_LONG;
+ }
+ } else if (t1_type == MAY_BE_DOUBLE || t2_type == MAY_BE_DOUBLE) {
+ tmp |= MAY_BE_DOUBLE;
+ } else {
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ }
+ break;
+ case ZEND_DIV:
+ case ZEND_POW:
+ tmp = MAY_BE_RC1;
+ if (t1_type == MAY_BE_DOUBLE || t2_type == MAY_BE_DOUBLE) {
+ tmp |= MAY_BE_DOUBLE;
+ } else {
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ }
+ /* Division by zero results in Inf/-Inf/Nan (double), so it doesn't need any special
+ * handling */
+ break;
+ case ZEND_MOD:
+ tmp = MAY_BE_RC1 | MAY_BE_LONG;
+ /* Division by zero results in an exception, so it doesn't need any special handling */
+ break;
+ case ZEND_BW_OR:
+ case ZEND_BW_AND:
+ case ZEND_BW_XOR:
+ tmp = MAY_BE_RC1;
+ if ((t1_type & MAY_BE_STRING) && (t2_type & MAY_BE_STRING)) {
+ tmp |= MAY_BE_STRING;
+ }
+ if ((t1_type & ~MAY_BE_STRING) || (t2_type & ~MAY_BE_STRING)) {
+ tmp |= MAY_BE_LONG;
+ }
+ break;
+ case ZEND_SL:
+ case ZEND_SR:
+ tmp = MAY_BE_RC1|MAY_BE_LONG;
+ break;
+ case ZEND_CONCAT:
+ /* TODO: +MAY_BE_OBJECT ??? */
+ tmp = MAY_BE_RC1|MAY_BE_STRING;
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ return tmp;
+}
+
+/* Get the normal op corresponding to a compound assignment op */
+static inline zend_uchar get_compound_assign_op(zend_uchar opcode) {
+ switch (opcode) {
+ case ZEND_ASSIGN_ADD: return ZEND_ADD;
+ case ZEND_ASSIGN_SUB: return ZEND_SUB;
+ case ZEND_ASSIGN_MUL: return ZEND_MUL;
+ case ZEND_ASSIGN_DIV: return ZEND_DIV;
+ case ZEND_ASSIGN_MOD: return ZEND_MOD;
+ case ZEND_ASSIGN_SL: return ZEND_SL;
+ case ZEND_ASSIGN_SR: return ZEND_SR;
+ case ZEND_ASSIGN_CONCAT: return ZEND_CONCAT;
+ case ZEND_ASSIGN_BW_OR: return ZEND_BW_OR;
+ case ZEND_ASSIGN_BW_AND: return ZEND_BW_AND;
+ case ZEND_ASSIGN_BW_XOR: return ZEND_BW_XOR;
+ case ZEND_ASSIGN_POW: return ZEND_POW;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+}
+
+static inline zend_class_entry *get_class_entry(const zend_script *script, zend_string *lcname) {
+ zend_class_entry *ce = zend_hash_find_ptr(&script->class_table, lcname);
+ if (ce) {
+ return ce;
+ }
+
+ ce = zend_hash_find_ptr(CG(class_table), lcname);
+ if (ce && ce->type == ZEND_INTERNAL_CLASS) {
+ return ce;
+ }
+
+ return NULL;
+}
+
+static uint32_t zend_fetch_arg_info(const zend_script *script, zend_arg_info *arg_info, zend_class_entry **pce)
+{
+ uint32_t tmp = 0;
+
+ *pce = NULL;
+ if (arg_info->class_name) {
+ // class type hinting...
+ zend_string *lcname = zend_string_tolower(arg_info->class_name);
+ tmp |= MAY_BE_OBJECT;
+ *pce = get_class_entry(script, lcname);
+ zend_string_release(lcname);
+ } else if (arg_info->type_hint != IS_UNDEF) {
+ if (arg_info->type_hint == IS_VOID) {
+ tmp |= MAY_BE_NULL;
+ } else if (arg_info->type_hint == IS_CALLABLE) {
+ tmp |= MAY_BE_STRING|MAY_BE_OBJECT|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ } else if (arg_info->type_hint == IS_ARRAY) {
+ tmp |= MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ } else if (arg_info->type_hint == _IS_BOOL) {
+ tmp |= MAY_BE_TRUE|MAY_BE_FALSE;
+ } else {
+ ZEND_ASSERT(arg_info->type_hint < IS_REFERENCE);
+ tmp |= 1 << arg_info->type_hint;
+ }
+ } else {
+ tmp |= MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ }
+ if (arg_info->allow_null) {
+ tmp |= MAY_BE_NULL;
+ }
+ return tmp;
+}
+
+static void zend_update_type_info(const zend_op_array *op_array,
+ zend_ssa *ssa,
+ const zend_script *script,
+ zend_bitset worklist,
+ int i)
+{
+ uint32_t t1, t2;
+ uint32_t tmp, orig;
+ zend_op *opline = op_array->opcodes + i;
+ zend_ssa_op *ssa_ops = ssa->ops;
+ zend_ssa_var *ssa_vars = ssa->vars;
+ zend_ssa_var_info *ssa_var_info = ssa->var_info;
+ zend_class_entry *ce;
+ int j;
+
+ if (opline->opcode == ZEND_OP_DATA) {
+ opline--;
+ i--;
+ }
+
+ t1 = OP1_INFO();
+ t2 = OP2_INFO();
+
+ switch (opline->opcode) {
+ case ZEND_ADD:
+ case ZEND_SUB:
+ case ZEND_MUL:
+ case ZEND_DIV:
+ case ZEND_POW:
+ case ZEND_MOD:
+ case ZEND_BW_OR:
+ case ZEND_BW_AND:
+ case ZEND_BW_XOR:
+ case ZEND_SL:
+ case ZEND_SR:
+ case ZEND_CONCAT:
+ tmp = binary_op_result_type(ssa, opline->opcode, t1, t2, ssa_ops[i].result_def);
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ break;
+ case ZEND_BW_NOT:
+ tmp = MAY_BE_RC1;
+ if (t1 & MAY_BE_STRING) {
+ tmp |= MAY_BE_STRING;
+ }
+ if (t1 & (MAY_BE_ANY-MAY_BE_STRING)) {
+ tmp |= MAY_BE_LONG;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ break;
+ case ZEND_BEGIN_SILENCE:
+ UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_LONG, ssa_ops[i].result_def);
+ break;
+ case ZEND_BOOL_NOT:
+ case ZEND_BOOL_XOR:
+ case ZEND_IS_IDENTICAL:
+ case ZEND_IS_NOT_IDENTICAL:
+ case ZEND_IS_EQUAL:
+ case ZEND_IS_NOT_EQUAL:
+ case ZEND_IS_SMALLER:
+ case ZEND_IS_SMALLER_OR_EQUAL:
+ case ZEND_INSTANCEOF:
+ case ZEND_JMPZ_EX:
+ case ZEND_JMPNZ_EX:
+ case ZEND_CASE:
+ case ZEND_BOOL:
+ case ZEND_ISSET_ISEMPTY_VAR:
+ case ZEND_ISSET_ISEMPTY_DIM_OBJ:
+ case ZEND_ISSET_ISEMPTY_PROP_OBJ:
+ case ZEND_ISSET_ISEMPTY_STATIC_PROP:
+ case ZEND_ASSERT_CHECK:
+ UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_FALSE|MAY_BE_TRUE, ssa_ops[i].result_def);
+ break;
+ case ZEND_CAST:
+ tmp = MAY_BE_RC1;
+ if (opline->extended_value == _IS_BOOL) {
+ tmp |= MAY_BE_TRUE|MAY_BE_FALSE;
+ } else {
+ tmp |= 1 << opline->extended_value;
+ }
+ if (opline->extended_value == IS_ARRAY) {
+ if (t1 & MAY_BE_ARRAY) {
+ tmp |= t1 & (MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF);
+ }
+ if (t1 & MAY_BE_OBJECT) {
+ tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ } else {
+ tmp |= ((t1 & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT) | MAY_BE_ARRAY_KEY_LONG;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ break;
+ case ZEND_QM_ASSIGN:
+ case ZEND_JMP_SET:
+ case ZEND_COALESCE:
+ tmp = t1 & ~(MAY_BE_UNDEF|MAY_BE_REF);
+ if (t1 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ if (opline->op1_type & (IS_CV|IS_VAR)) {
+ tmp |= MAY_BE_RCN;
+ }
+ if (opline->opcode != ZEND_QM_ASSIGN) {
+ /* COALESCE and JMP_SET result can't be null */
+ tmp &= ~MAY_BE_NULL;
+ if (opline->opcode == ZEND_JMP_SET) {
+ /* JMP_SET result can't be false either */
+ tmp &= ~MAY_BE_FALSE;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].result_def);
+ break;
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_POW:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_ASSIGN_CONCAT:
+ orig = 0;
+ if (opline->extended_value == ZEND_ASSIGN_OBJ) {
+ tmp = MAY_BE_RC1;
+ orig = t1 & ~MAY_BE_UNDEF;
+ t1 = MAY_BE_ANY;
+ t2 = OP1_DATA_INFO();
+ } else if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ tmp = MAY_BE_RC1;
+ orig = t1 & ~MAY_BE_UNDEF;
+ t1 = zend_array_element_type(t1, 1, 0);
+ t2 = OP1_DATA_INFO();
+ } else {
+ tmp = 0;
+ if (t1 & (MAY_BE_RC1|MAY_BE_RCN)) {
+ tmp |= MAY_BE_RC1;
+ if (ssa_ops[i].result_def >= 0) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ if (t1 & MAY_BE_REF) {
+ tmp |= MAY_BE_REF;
+ }
+ }
+
+ tmp |= binary_op_result_type(
+ ssa, get_compound_assign_op(opline->opcode), t1, t2, ssa_ops[i].op1_def);
+
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ if (opline->op1_type == IS_CV) {
+ orig = assign_dim_result_type(orig, OP2_INFO(), tmp, opline->op1_type);
+ UPDATE_SSA_TYPE(orig, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ } else if (opline->extended_value == ZEND_ASSIGN_OBJ) {
+ if (opline->op1_type == IS_CV) {
+ if (orig & (MAY_BE_UNDEF | MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING)) {
+ orig |= MAY_BE_OBJECT;
+ }
+ if (orig & MAY_BE_RCN) {
+ orig |= MAY_BE_RC1;
+ }
+ UPDATE_SSA_TYPE(orig, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ } else {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_PRE_INC:
+ case ZEND_PRE_DEC:
+ tmp = 0;
+ if (t1 & MAY_BE_REF) {
+ tmp |= MAY_BE_REF;
+ }
+ if (t1 & (MAY_BE_RC1|MAY_BE_RCN)) {
+ tmp |= MAY_BE_RC1;
+ if (ssa_ops[i].result_def >= 0) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ if ((t1 & MAY_BE_ANY) == MAY_BE_LONG) {
+ if (!ssa_var_info[ssa_ops[i].op1_use].has_range ||
+ (opline->opcode == ZEND_PRE_DEC &&
+ (ssa_var_info[ssa_ops[i].op1_use].range.underflow ||
+ ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MIN)) ||
+ (opline->opcode == ZEND_PRE_INC &&
+ (ssa_var_info[ssa_ops[i].op1_use].range.overflow ||
+ ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MAX))) {
+ /* may overflow */
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ } else {
+ tmp |= MAY_BE_LONG;
+ }
+ } else {
+ if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
+ tmp |= MAY_BE_LONG;
+ }
+ if (t1 & MAY_BE_LONG) {
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ }
+ if (t1 & MAY_BE_DOUBLE) {
+ tmp |= MAY_BE_DOUBLE;
+ }
+ if (t1 & MAY_BE_STRING) {
+ tmp |= MAY_BE_STRING | MAY_BE_LONG | MAY_BE_DOUBLE;
+ }
+ tmp |= t1 & (MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_KEY_ANY);
+ }
+ if (ssa_ops[i].op1_def >= 0) {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_POST_INC:
+ case ZEND_POST_DEC:
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = (MAY_BE_RC1 | t1) & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_REF|MAY_BE_RCN);
+ if (t1 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ tmp = 0;
+ if (t1 & MAY_BE_REF) {
+ tmp |= MAY_BE_REF;
+ }
+ if (t1 & (MAY_BE_RC1|MAY_BE_RCN)) {
+ tmp |= MAY_BE_RC1;
+ }
+ if ((t1 & MAY_BE_ANY) == MAY_BE_LONG) {
+ if (!ssa_var_info[ssa_ops[i].op1_use].has_range ||
+ (opline->opcode == ZEND_PRE_DEC &&
+ (ssa_var_info[ssa_ops[i].op1_use].range.underflow ||
+ ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MIN)) ||
+ (opline->opcode == ZEND_PRE_INC &&
+ (ssa_var_info[ssa_ops[i].op1_use].range.overflow ||
+ ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MAX))) {
+ /* may overflow */
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ } else {
+ tmp |= MAY_BE_LONG;
+ }
+ } else {
+ if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
+ tmp |= MAY_BE_LONG;
+ }
+ if (t1 & MAY_BE_LONG) {
+ tmp |= MAY_BE_LONG | MAY_BE_DOUBLE;
+ }
+ if (t1 & MAY_BE_DOUBLE) {
+ tmp |= MAY_BE_DOUBLE;
+ }
+ if (t1 & MAY_BE_STRING) {
+ tmp |= MAY_BE_STRING | MAY_BE_LONG | MAY_BE_DOUBLE;
+ }
+ tmp |= t1 & (MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_KEY_ANY);
+ }
+ if (ssa_ops[i].op1_def >= 0) {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
+ case ZEND_ASSIGN_DIM:
+ if (opline->op1_type == IS_CV) {
+ tmp = assign_dim_result_type(t1, t2, OP1_DATA_INFO(), opline->op2_type);
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = 0;
+ if (t1 & MAY_BE_STRING) {
+ tmp |= MAY_BE_STRING;
+ }
+ if (t1 & (MAY_BE_ANY - MAY_BE_STRING)) {
+ tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));
+ }
+ tmp |= MAY_BE_RC1 | MAY_BE_RCN;
+ if (t1 & MAY_BE_OBJECT) {
+ tmp |= MAY_BE_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ if ((opline+1)->op1_type == IS_CV && ssa_ops[i+1].op1_def >= 0) {
+ opline++;
+ i++;
+ tmp = OP1_INFO();
+ if (tmp & (MAY_BE_ANY | MAY_BE_REF)) {
+ if (tmp & MAY_BE_RC1) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
+ case ZEND_ASSIGN_OBJ:
+ if (opline->op1_type == IS_CV) {
+ tmp = (t1 & (MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF));
+ tmp &= ~MAY_BE_NULL;
+ if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING)) {
+ tmp |= MAY_BE_OBJECT;
+ }
+ if (t1 & MAY_BE_REF) {
+ tmp |= MAY_BE_REF;
+ }
+ if (t1 & (MAY_BE_RC1|MAY_BE_RCN)) {
+ tmp |= MAY_BE_RC1;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ // TODO: ???
+ tmp = MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ if ((opline+1)->op1_type == IS_CV) {
+ opline++;
+ i++;
+ tmp = OP1_INFO();
+ if (tmp & (MAY_BE_ANY | MAY_BE_REF)) {
+ if (tmp & MAY_BE_RC1) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
+ case ZEND_ASSIGN:
+ if (opline->op2_type == IS_CV && ssa_ops[i].op2_def >= 0) {
+ tmp = t2;
+ if (tmp & (MAY_BE_ANY | MAY_BE_REF)) {
+ if (tmp & MAY_BE_RC1) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def);
+ }
+ tmp = t2 & ~(MAY_BE_UNDEF|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN);
+ if (t2 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ if (t1 & MAY_BE_REF) {
+ tmp |= MAY_BE_REF;
+ }
+ if (t1 & (MAY_BE_RC1 | MAY_BE_RCN)) {
+ if (t2 & MAY_BE_REF) {
+ tmp |= MAY_BE_RC1;
+ }
+ if (t2 & MAY_BE_RC1) {
+ tmp |= MAY_BE_RC1;
+ if (opline->op2_type & (IS_CV|IS_VAR)) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ if (t2 & MAY_BE_RCN) {
+ tmp |= MAY_BE_RCN;
+ }
+ if (RETURN_VALUE_USED(opline) && (tmp & MAY_BE_RC1)) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ if (ssa_ops[i].op1_def >= 0) {
+ if (ssa_var_info[ssa_ops[i].op1_def].use_as_double) {
+ tmp &= ~MAY_BE_LONG;
+ tmp |= MAY_BE_DOUBLE;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op2_use, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ UPDATE_SSA_TYPE(tmp & ~MAY_BE_REF, ssa_ops[i].result_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op2_use, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_ASSIGN_REF:
+// TODO: ???
+ if (opline->op2_type == IS_CV) {
+ tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN);
+ if (t2 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def);
+ }
+ if (opline->op2_type == IS_VAR && opline->extended_value == ZEND_RETURNS_FUNCTION) {
+ tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF;
+ } else {
+ tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_RC1|MAY_BE_RCN);
+ }
+ if (t2 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ if (ssa_ops[i].result_def >= 0) {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_BIND_GLOBAL:
+ tmp = (MAY_BE_REF | MAY_BE_ANY);
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ break;
+ case ZEND_BIND_STATIC:
+ tmp = MAY_BE_ANY | (opline->extended_value ? MAY_BE_REF : (MAY_BE_RC1 | MAY_BE_RCN));
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ break;
+ case ZEND_SEND_VAR:
+ UPDATE_SSA_TYPE(t1 | MAY_BE_RC1 | MAY_BE_RCN, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ break;
+ case ZEND_BIND_LEXICAL:
+ if (ssa_ops[i].op2_def >= 0) {
+ tmp = t2 | MAY_BE_RC1 | MAY_BE_RCN;
+ if (opline->extended_value) {
+ tmp |= MAY_BE_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op2_use, ssa_ops[i].op2_def);
+ }
+ break;
+ case ZEND_YIELD:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = t1 | MAY_BE_RC1 | MAY_BE_RCN;
+ if (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ tmp |= MAY_BE_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF
+ | MAY_BE_RC1 | MAY_BE_RCN;
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_SEND_VAR_EX:
+ case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_VAR_NO_REF_EX:
+ case ZEND_SEND_REF:
+// TODO: ???
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = (t1 & MAY_BE_UNDEF)|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
+ case ZEND_SEND_UNPACK:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = t1 | MAY_BE_RC1|MAY_BE_RCN;
+ if (t1 & MAY_BE_ARRAY) {
+ /* SEND_UNPACK may acquire references into the array */
+ tmp |= MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
+ case ZEND_FAST_CONCAT:
+ case ZEND_ROPE_INIT:
+ case ZEND_ROPE_ADD:
+ case ZEND_ROPE_END:
+ UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_STRING, ssa_ops[i].result_def);
+ break;
+ case ZEND_RECV:
+ case ZEND_RECV_INIT:
+ {
+ /* Typehinting */
+ zend_func_info *func_info;
+ zend_arg_info *arg_info = NULL;
+ if (op_array->arg_info && opline->op1.num <= op_array->num_args) {
+ arg_info = &op_array->arg_info[opline->op1.num-1];
+ }
+
+ ce = NULL;
+ if (arg_info) {
+ tmp = zend_fetch_arg_info(script, arg_info, &ce);
+ if (opline->opcode == ZEND_RECV_INIT &&
+ Z_CONSTANT_P(CRT_CONSTANT_EX(op_array, opline->op2, ssa->rt_constants))) {
+ /* The constant may resolve to NULL */
+ tmp |= MAY_BE_NULL;
+ }
+ if (arg_info->pass_by_reference) {
+ tmp |= MAY_BE_REF;
+ } else {
+ tmp |= MAY_BE_RC1|MAY_BE_RCN;
+ }
+ } else {
+ tmp = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ }
+ func_info = ZEND_FUNC_INFO(op_array);
+ if (func_info && (int)opline->op1.num-1 < func_info->num_args) {
+ tmp = (tmp & (MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF)) |
+ (tmp & func_info->arg_info[opline->op1.num-1].info.type);
+ } else {
+ if (opline->opcode == ZEND_RECV && (!arg_info || arg_info->type_hint == IS_UNDEF)) {
+ /* If the argument has no default value and no typehint, it is possible
+ * to pass less arguments than the function expects */
+ tmp |= MAY_BE_UNDEF|MAY_BE_RC1;
+ }
+ }
+#if 0
+ /* We won't recieve unused arguments */
+ if (ssa_vars[ssa_ops[i].result_def].use_chain < 0 &&
+ ssa_vars[ssa_ops[i].result_def].phi_use_chain == NULL &&
+ op_array->arg_info &&
+ opline->op1.num <= op_array->num_args &&
+ op_array->arg_info[opline->op1.num-1].class_name == NULL &&
+ !op_array->arg_info[opline->op1.num-1].type_hint) {
+ tmp = MAY_BE_UNDEF|MAY_BE_RCN;
+ }
+#endif
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ if (func_info &&
+ (int)opline->op1.num-1 < func_info->num_args &&
+ func_info->arg_info[opline->op1.num-1].info.ce) {
+ UPDATE_SSA_OBJ_TYPE(
+ func_info->arg_info[opline->op1.num-1].info.ce,
+ func_info->arg_info[opline->op1.num-1].info.is_instanceof,
+ ssa_ops[i].result_def);
+ } else if (ce) {
+ UPDATE_SSA_OBJ_TYPE(ce, 1, ssa_ops[i].result_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ }
+ break;
+ }
+ case ZEND_DECLARE_CLASS:
+ case ZEND_DECLARE_INHERITED_CLASS:
+ UPDATE_SSA_TYPE(MAY_BE_CLASS, ssa_ops[i].result_def);
+ if ((ce = zend_hash_find_ptr(&script->class_table, Z_STR_P(CRT_CONSTANT_EX(op_array, opline->op1, ssa->rt_constants)))) != NULL) {
+ UPDATE_SSA_OBJ_TYPE(ce, 0, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_FETCH_CLASS:
+ UPDATE_SSA_TYPE(MAY_BE_CLASS, ssa_ops[i].result_def);
+ if (opline->op2_type == IS_UNUSED) {
+ switch (opline->extended_value & ZEND_FETCH_CLASS_MASK) {
+ case ZEND_FETCH_CLASS_SELF:
+ if (op_array->scope) {
+ UPDATE_SSA_OBJ_TYPE(op_array->scope, 0, ssa_ops[i].result_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_FETCH_CLASS_PARENT:
+ if (op_array->scope && op_array->scope->parent) {
+ UPDATE_SSA_OBJ_TYPE(op_array->scope->parent, 0, ssa_ops[i].result_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_FETCH_CLASS_STATIC:
+ default:
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ break;
+ }
+ } else if (opline->op2_type == IS_CONST) {
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->op2, ssa->rt_constants);
+ if (Z_TYPE_P(zv) == IS_STRING) {
+ ce = get_class_entry(script, Z_STR_P(zv+1));
+ UPDATE_SSA_OBJ_TYPE(ce, 0, ssa_ops[i].result_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ }
+ } else {
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op2_use, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_NEW:
+ tmp = MAY_BE_RC1|MAY_BE_RCN|MAY_BE_OBJECT;
+ if (opline->op1_type == IS_CONST &&
+ (ce = get_class_entry(script, Z_STR_P(CRT_CONSTANT_EX(op_array, opline->op1, ssa->rt_constants)+1))) != NULL) {
+ UPDATE_SSA_OBJ_TYPE(ce, 0, ssa_ops[i].result_def);
+ } else if ((t1 & MAY_BE_CLASS) && ssa_ops[i].op1_use >= 0 && ssa_var_info[ssa_ops[i].op1_use].ce) {
+ UPDATE_SSA_OBJ_TYPE(ssa_var_info[ssa_ops[i].op1_use].ce, ssa_var_info[ssa_ops[i].op1_use].is_instanceof, ssa_ops[i].result_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ break;
+ case ZEND_CLONE:
+ UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_RCN|MAY_BE_OBJECT, ssa_ops[i].result_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].result_def);
+ break;
+ case ZEND_INIT_ARRAY:
+ case ZEND_ADD_ARRAY_ELEMENT:
+ if (opline->op1_type == IS_CV && ssa_ops[i].op1_def >= 0) {
+ if (opline->extended_value & ZEND_ARRAY_ELEMENT_REF) {
+ tmp = (MAY_BE_REF | t1) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN);
+ if (t1 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ } else if ((t1 & (MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN)) == MAY_BE_REF) {
+ tmp = (MAY_BE_REF | t1) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN);
+ if (t1 & MAY_BE_UNDEF) {
+ tmp |= MAY_BE_NULL;
+ }
+ } else if (t1 & MAY_BE_REF) {
+ tmp = (MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | t1);
+ } else {
+ tmp = t1;
+ if (t1 & MAY_BE_RC1) {
+ tmp |= MAY_BE_RCN;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = MAY_BE_RC1|MAY_BE_ARRAY;
+ if (opline->op1_type != IS_UNUSED) {
+ tmp |= (t1 & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT;
+ if (opline->extended_value & ZEND_ARRAY_ELEMENT_REF) {
+ tmp |= MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ }
+ }
+ if (ssa_ops[i].result_use >= 0) {
+ tmp |= ssa_var_info[ssa_ops[i].result_use].type;
+ }
+ if (opline->op2_type == IS_UNUSED) {
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ } else {
+ if (t2 & (MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_DOUBLE)) {
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ }
+ if (t2 & (MAY_BE_STRING)) {
+ tmp |= MAY_BE_ARRAY_KEY_STRING;
+ if (opline->op2_type != IS_CONST) {
+ // FIXME: numeric string
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ }
+ }
+ if (t2 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
+ tmp |= MAY_BE_ARRAY_KEY_STRING;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_UNSET_VAR:
+ ZEND_ASSERT(opline->extended_value & ZEND_QUICK_SET);
+ tmp = MAY_BE_UNDEF|MAY_BE_RCN;
+ if (!op_array->function_name) {
+ /* In global scope, we know nothing */
+ tmp |= MAY_BE_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ break;
+ case ZEND_UNSET_DIM:
+ case ZEND_UNSET_OBJ:
+ if (ssa_ops[i].op1_def >= 0) {
+ UPDATE_SSA_TYPE(t1, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ break;
+// case ZEND_INCLUDE_OR_EVAL:
+// case ZEND_ISSET_ISEMPTY_VAR:
+// TODO: ???
+// break;
+ case ZEND_FE_RESET_R:
+ case ZEND_FE_RESET_RW:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = t1;
+ if (t1 & MAY_BE_RCN) {
+ tmp |= MAY_BE_RC1;
+ }
+ if (opline->opcode == ZEND_FE_RESET_RW) {
+//???
+ tmp |= MAY_BE_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ if (opline->opcode == ZEND_FE_RESET_RW) {
+//???
+ tmp = MAY_BE_REF | (t1 & (MAY_BE_ARRAY | MAY_BE_OBJECT));
+ } else if (opline->op1_type == IS_TMP_VAR || opline->op1_type == IS_CONST) {
+ tmp = MAY_BE_RC1 | (t1 & (MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));
+ } else {
+ tmp = MAY_BE_RC1 | MAY_BE_RCN | (t1 & (MAY_BE_REF | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].result_def);
+ break;
+ case ZEND_FE_FETCH_R:
+ case ZEND_FE_FETCH_RW:
+ if (t1 & MAY_BE_OBJECT) {
+ if (opline->opcode == ZEND_FE_FETCH_RW) {
+ tmp = MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ } else {
+ tmp = MAY_BE_REF | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ }
+ } else if (t1 & MAY_BE_ARRAY) {
+ if (opline->opcode == ZEND_FE_FETCH_RW) {
+ tmp = MAY_BE_REF | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ } else {
+ tmp = ((t1 & MAY_BE_ARRAY_OF_ANY) >> MAY_BE_ARRAY_SHIFT);
+ if (tmp & MAY_BE_ARRAY) {
+ tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ }
+ if (t1 & MAY_BE_ARRAY_OF_REF) {
+ tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN;
+ } else {
+ tmp |= MAY_BE_RC1 | MAY_BE_RCN;
+ }
+ }
+ } else {
+ if (opline->opcode == ZEND_FE_FETCH_RW) {
+ tmp = MAY_BE_REF;
+ } else {
+ tmp = MAY_BE_RCN;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def);
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = MAY_BE_RC1;
+ if (t1 & MAY_BE_OBJECT) {
+ tmp |= MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ } else if (t1 & MAY_BE_ARRAY) {
+ if (t1 & MAY_BE_ARRAY_KEY_LONG) {
+ tmp |= MAY_BE_LONG;
+ }
+ if (t1 & MAY_BE_ARRAY_KEY_STRING) {
+ tmp |= MAY_BE_STRING;
+ }
+ if (!(tmp & (MAY_BE_LONG|MAY_BE_STRING))) {
+ tmp |= MAY_BE_NULL;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+// case ZEND_CATCH:
+// TODO: ???
+// break;
+ case ZEND_FETCH_DIM_R:
+ case ZEND_FETCH_DIM_IS:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_UNSET:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_FETCH_LIST:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = t1;
+ if (opline->opcode == ZEND_FETCH_DIM_W ||
+ opline->opcode == ZEND_FETCH_DIM_RW ||
+ opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) {
+ if (opline->opcode != ZEND_FETCH_DIM_FUNC_ARG) {
+ tmp &= ~MAY_BE_UNDEF;
+ if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
+ tmp &= ~MAY_BE_NULL;
+ tmp |= MAY_BE_ARRAY;
+ } else if (t1 & (MAY_BE_FALSE|MAY_BE_STRING)) {
+ tmp |= MAY_BE_ARRAY;
+ }
+ }
+ if (tmp & MAY_BE_RCN) {
+ tmp |= MAY_BE_RC1;
+ }
+ if (t2 & (MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_RESOURCE|MAY_BE_DOUBLE)) {
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ }
+ if (t2 & (MAY_BE_STRING)) {
+ // FIXME: numeric string
+ tmp |= MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_KEY_LONG;
+ }
+ if (t2 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
+ tmp |= MAY_BE_ARRAY_KEY_STRING;
+ }
+
+ }
+ ZEND_ASSERT(!ssa_vars[ssa_ops[i].result_def].phi_use_chain);
+ j = ssa_vars[ssa_ops[i].result_def].use_chain;
+ while (j >= 0) {
+ switch (op_array->opcodes[j].opcode) {
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_ASSIGN_POW:
+ case ZEND_ASSIGN_DIM:
+ tmp |= MAY_BE_ARRAY | MAY_BE_ARRAY_OF_ARRAY;
+ break;
+ case ZEND_SEND_VAR:
+ break;
+ case ZEND_SEND_VAR_EX:
+ case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_VAR_NO_REF_EX:
+ case ZEND_SEND_REF:
+ case ZEND_ASSIGN_REF:
+ tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ break;
+ case ZEND_PRE_INC:
+ case ZEND_PRE_DEC:
+ case ZEND_POST_INC:
+ case ZEND_POST_DEC:
+ if (tmp & MAY_BE_ARRAY_OF_LONG) {
+ /* may overflow */
+ tmp |= MAY_BE_ARRAY_OF_DOUBLE;
+ } else if (!(tmp & (MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_DOUBLE))) {
+ tmp |= MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE;
+ }
+ break;
+ default :
+ break;
+ }
+ j = zend_ssa_next_use(ssa_ops, ssa_ops[i].result_def, j);
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ /* FETCH_LIST on a string behaves like FETCH_R on null */
+ tmp = zend_array_element_type(
+ opline->opcode != ZEND_FETCH_LIST ? t1 : ((t1 & ~MAY_BE_STRING) | MAY_BE_NULL),
+ opline->opcode != ZEND_FETCH_DIM_R && opline->opcode != ZEND_FETCH_DIM_IS
+ && opline->opcode != ZEND_FETCH_LIST,
+ opline->op2_type == IS_UNUSED);
+ if (opline->opcode == ZEND_FETCH_DIM_W ||
+ opline->opcode == ZEND_FETCH_DIM_RW ||
+ opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) {
+ if (t1 & (MAY_BE_ERROR|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_RESOURCE|MAY_BE_OBJECT)) {
+ tmp |= MAY_BE_ERROR;
+ } else if (opline->op2_type == IS_UNUSED) {
+ tmp |= MAY_BE_ERROR;
+ } else if (t2 & (MAY_BE_ARRAY|MAY_BE_OBJECT)) {
+ tmp |= MAY_BE_ERROR;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ break;
+ case ZEND_FETCH_OBJ_R:
+ case ZEND_FETCH_OBJ_IS:
+ case ZEND_FETCH_OBJ_RW:
+ case ZEND_FETCH_OBJ_W:
+ case ZEND_FETCH_OBJ_UNSET:
+ case ZEND_FETCH_OBJ_FUNC_ARG:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = t1;
+ if (opline->opcode == ZEND_FETCH_OBJ_W ||
+ opline->opcode == ZEND_FETCH_OBJ_RW ||
+ opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG) {
+ if (opline->opcode != ZEND_FETCH_DIM_FUNC_ARG) {
+ tmp &= ~MAY_BE_UNDEF;
+ if (t1 & (MAY_BE_UNDEF | MAY_BE_NULL)) {
+ tmp &= ~MAY_BE_NULL;
+ tmp |= MAY_BE_OBJECT;
+ } else if (t1 & (MAY_BE_FALSE|MAY_BE_STRING)) {
+ tmp |= MAY_BE_OBJECT;
+ }
+ }
+ if (tmp & MAY_BE_RCN) {
+ tmp |= MAY_BE_RC1;
+ }
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ if (opline->opcode != ZEND_FETCH_OBJ_R && opline->opcode != ZEND_FETCH_OBJ_IS) {
+ tmp |= MAY_BE_ERROR;
+ }
+ if (opline->result_type == IS_TMP_VAR) {
+ tmp |= MAY_BE_RC1;
+ } else {
+ tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ case ZEND_DO_FCALL:
+ case ZEND_DO_ICALL:
+ case ZEND_DO_UCALL:
+ case ZEND_DO_FCALL_BY_NAME:
+ if (ssa_ops[i].result_def >= 0) {
+ zend_func_info *func_info = ZEND_FUNC_INFO(op_array);
+ zend_call_info *call_info;
+
+ if (!func_info) {
+ goto unknown_opcode;
+ }
+ call_info = func_info->callee_info;
+ while (call_info && call_info->caller_call_opline != opline) {
+ call_info = call_info->next_callee;
+ }
+ if (!call_info) {
+ goto unknown_opcode;
+ }
+ tmp = zend_get_func_info(call_info, ssa) & ~(FUNC_MAY_WARN|FUNC_MAY_INLINE);
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ if (call_info->callee_func->type == ZEND_USER_FUNCTION) {
+ func_info = ZEND_FUNC_INFO(&call_info->callee_func->op_array);
+ if (func_info) {
+ UPDATE_SSA_OBJ_TYPE(
+ func_info->return_info.ce,
+ func_info->return_info.is_instanceof,
+ ssa_ops[i].result_def);
+ }
+ }
+ }
+ break;
+ case ZEND_FETCH_CONSTANT:
+ case ZEND_FETCH_CLASS_CONSTANT:
+ UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_RCN|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY, ssa_ops[i].result_def);
+ break;
+ case ZEND_STRLEN:
+ tmp = MAY_BE_RC1|MAY_BE_LONG;
+ if (t1 & (MAY_BE_ANY - (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT))) {
+ tmp |= MAY_BE_NULL;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ break;
+ case ZEND_TYPE_CHECK:
+ case ZEND_DEFINED:
+ UPDATE_SSA_TYPE(MAY_BE_RC1|MAY_BE_FALSE|MAY_BE_TRUE, ssa_ops[i].result_def);
+ break;
+ case ZEND_VERIFY_RETURN_TYPE:
+ {
+ zend_arg_info *ret_info = op_array->arg_info - 1;
+
+ tmp = zend_fetch_arg_info(script, ret_info, &ce);
+ tmp |= MAY_BE_RC1 | MAY_BE_RCN;
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR|IS_CV)) {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ if (ce) {
+ UPDATE_SSA_OBJ_TYPE(ce, 1, ssa_ops[i].op1_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].op1_def);
+ }
+ } else {
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ if (ce) {
+ UPDATE_SSA_OBJ_TYPE(ce, 1, ssa_ops[i].result_def);
+ } else {
+ UPDATE_SSA_OBJ_TYPE(NULL, 0, ssa_ops[i].result_def);
+ }
+ }
+ break;
+ }
+ default:
+unknown_opcode:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = MAY_BE_ANY | MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ if (ssa_ops[i].result_def >= 0) {
+ tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ if (opline->result_type == IS_TMP_VAR) {
+ tmp |= MAY_BE_RC1;
+ } else {
+ tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
+ }
+ break;
+ }
+}
+
+static uint32_t get_class_entry_rank(zend_class_entry *ce) {
+ uint32_t rank = 0;
+ while (ce->parent) {
+ rank++;
+ ce = ce->parent;
+ }
+ return rank;
+}
+
+/* Compute least common ancestor on class inheritance tree only */
+static zend_class_entry *join_class_entries(
+ zend_class_entry *ce1, zend_class_entry *ce2, int *is_instanceof) {
+ uint32_t rank1, rank2;
+ if (ce1 == ce2) {
+ return ce1;
+ }
+ if (!ce1 || !ce2) {
+ return NULL;
+ }
+
+ rank1 = get_class_entry_rank(ce1);
+ rank2 = get_class_entry_rank(ce2);
+
+ while (rank1 != rank2) {
+ if (rank1 > rank2) {
+ ce1 = ce1->parent;
+ rank1--;
+ } else {
+ ce2 = ce2->parent;
+ rank2--;
+ }
+ }
+
+ while (ce1 != ce2) {
+ ce1 = ce1->parent;
+ ce2 = ce2->parent;
+ }
+
+ if (ce1) {
+ *is_instanceof = 1;
+ }
+ return ce1;
+}
+
+int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_bitset worklist)
+{
+ zend_basic_block *blocks = ssa->cfg.blocks;
+ zend_ssa_var *ssa_vars = ssa->vars;
+ zend_ssa_var_info *ssa_var_info = ssa->var_info;
+ int ssa_vars_count = ssa->vars_count;
+ uint i;
+ int j;
+ uint32_t tmp;
+
+ while (!zend_bitset_empty(worklist, zend_bitset_len(ssa_vars_count))) {
+ j = zend_bitset_first(worklist, zend_bitset_len(ssa_vars_count));
+ zend_bitset_excl(worklist, j);
+ if (ssa_vars[j].definition_phi) {
+ zend_ssa_phi *p = ssa_vars[j].definition_phi;
+ if (p->pi >= 0) {
+ tmp = get_ssa_var_info(ssa, p->sources[0]);
+ if (p->constraint.type_mask != (uint32_t) -1) {
+ tmp &= p->constraint.type_mask;
+ }
+ UPDATE_SSA_TYPE(tmp, j);
+ if (ssa_var_info[p->sources[0]].ce) {
+ UPDATE_SSA_OBJ_TYPE(ssa_var_info[p->sources[0]].ce, ssa_var_info[p->sources[0]].is_instanceof, j);
+ }
+ } else {
+ int first = 1;
+ int is_instanceof = 0;
+ zend_class_entry *ce = NULL;
+
+ tmp = 0;
+ for (i = 0; i < blocks[p->block].predecessors_count; i++) {
+ tmp |= get_ssa_var_info(ssa, p->sources[i]);
+ }
+ UPDATE_SSA_TYPE(tmp, j);
+ for (i = 0; i < blocks[p->block].predecessors_count; i++) {
+ if (p->sources[i] >= 0) {
+ zend_ssa_var_info *info = &ssa_var_info[p->sources[i]];
+ if (info->type & MAY_BE_OBJECT) {
+ if (first) {
+ ce = info->ce;
+ is_instanceof = info->is_instanceof;
+ first = 0;
+ } else {
+ is_instanceof |= info->is_instanceof;
+ ce = join_class_entries(ce, info->ce, &is_instanceof);
+ }
+ }
+ }
+ }
+ UPDATE_SSA_OBJ_TYPE(ce, ce ? is_instanceof : 0, j);
+ }
+ } else if (ssa_vars[j].definition >= 0) {
+ i = ssa_vars[j].definition;
+ zend_update_type_info(op_array, ssa, script, worklist, i);
+ }
+ }
+ return SUCCESS;
+}
+
+static zend_bool is_narrowable_instr(zend_op *opline) {
+ return opline->opcode == ZEND_ADD || opline->opcode == ZEND_SUB
+ || opline->opcode == ZEND_MUL || opline->opcode == ZEND_DIV;
+}
+
+static zend_bool is_effective_op1_double_cast(zend_op *opline, zval *op2) {
+ return (opline->opcode == ZEND_ADD && Z_LVAL_P(op2) == 0)
+ || (opline->opcode == ZEND_SUB && Z_LVAL_P(op2) == 0)
+ || (opline->opcode == ZEND_MUL && Z_LVAL_P(op2) == 1)
+ || (opline->opcode == ZEND_DIV && Z_LVAL_P(op2) == 1);
+}
+static zend_bool is_effective_op2_double_cast(zend_op *opline, zval *op1) {
+ /* In PHP it holds that (double)(0-$int) is bitwise identical to 0.0-(double)$int,
+ * so allowing SUB here is fine. */
+ return (opline->opcode == ZEND_ADD && Z_LVAL_P(op1) == 0)
+ || (opline->opcode == ZEND_SUB && Z_LVAL_P(op1) == 0)
+ || (opline->opcode == ZEND_MUL && Z_LVAL_P(op1) == 1);
+}
+
+/* This function recursively checks whether it's possible to convert an integer variable
+ * initialization to a double initialization. The basic idea is that if the value is used
+ * only in add/sub/mul/div ("narrowable" instructions) with a double result value, then it
+ * will be cast to double at that point anyway, so we may as well do it earlier already.
+ *
+ * The tricky case are chains of operations, where it's not necessarily a given that converting
+ * an integer to double before the chain of operations is the same as converting it after the
+ * chain. What this function does is detect two cases where it is safe:
+ * * If the operations only involve constants, then we can simply verify that performing the
+ * calculation on integers and doubles yields the same value.
+ * * Even if one operand is not known, we may be able to determine that the operations with the
+ * integer replaced by a double only acts as an effective double cast on the unknown operand.
+ * E.g. 0+$i and 0.0+$i only differ by that cast. If then the consuming instruction of this
+ * result will perform a double cast anyway, the conversion is safe.
+ *
+ * The checks happens recursively, while keeping track of which variables are already visisted to
+ * avoid infinite loops. An iterative, worklist driven approach would be possible, but the state
+ * management more cumbersome to implement, so we don't bother for now.
+ */
+static zend_bool can_convert_to_double(
+ const zend_op_array *op_array, zend_ssa *ssa, int var_num,
+ zval *value, zend_bitset visited) {
+ zend_ssa_var *var = &ssa->vars[var_num];
+ zend_ssa_phi *phi;
+ int use;
+ uint32_t type;
+
+ if (zend_bitset_in(visited, var_num)) {
+ return 1;
+ }
+ zend_bitset_incl(visited, var_num);
+
+ for (use = var->use_chain; use >= 0; use = zend_ssa_next_use(ssa->ops, var_num, use)) {
+ zend_op *opline = &op_array->opcodes[use];
+ zend_ssa_op *ssa_op = &ssa->ops[use];
+
+ if (is_no_val_use(opline, ssa_op, var_num)) {
+ continue;
+ }
+
+ if (!is_narrowable_instr(opline)) {
+ return 0;
+ }
+
+ /* Instruction always returns double, the conversion is certainly fine */
+ type = ssa->var_info[ssa_op->result_def].type;
+ if ((type & MAY_BE_ANY) == MAY_BE_DOUBLE) {
+ continue;
+ }
+
+ /* UNDEF signals that the previous result is an effective double cast, this is only allowed
+ * if this instruction would have done the cast anyway (previous check). */
+ if (Z_ISUNDEF_P(value)) {
+ return 0;
+ }
+
+ /* Check that narrowing can actually be useful */
+ if ((type & MAY_BE_ANY) & ~(MAY_BE_LONG|MAY_BE_DOUBLE)) {
+ return 0;
+ }
+
+ {
+ /* For calculation on original values */
+ zval orig_op1, orig_op2, orig_result;
+ /* For calculation with var_num cast to double */
+ zval dval_op1, dval_op2, dval_result;
+
+ ZVAL_UNDEF(&orig_op1);
+ ZVAL_UNDEF(&dval_op1);
+ if (ssa_op->op1_use == var_num) {
+ ZVAL_COPY_VALUE(&orig_op1, value);
+ ZVAL_DOUBLE(&dval_op1, (double) Z_LVAL_P(value));
+ } else if (opline->op1_type == IS_CONST) {
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->op1, ssa->rt_constants);
+ if (Z_TYPE_P(zv) == IS_LONG || Z_TYPE_P(zv) == IS_DOUBLE) {
+ ZVAL_COPY_VALUE(&orig_op1, zv);
+ ZVAL_COPY_VALUE(&dval_op1, zv);
+ }
+ }
+
+ ZVAL_UNDEF(&orig_op2);
+ ZVAL_UNDEF(&dval_op2);
+ if (ssa_op->op2_use == var_num) {
+ ZVAL_COPY_VALUE(&orig_op2, value);
+ ZVAL_DOUBLE(&dval_op2, (double) Z_LVAL_P(value));
+ } else if (opline->op2_type == IS_CONST) {
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->op2, ssa->rt_constants);
+ if (Z_TYPE_P(zv) == IS_LONG || Z_TYPE_P(zv) == IS_DOUBLE) {
+ ZVAL_COPY_VALUE(&orig_op2, zv);
+ ZVAL_COPY_VALUE(&dval_op2, zv);
+ }
+ }
+
+ ZEND_ASSERT(!Z_ISUNDEF(orig_op1) || !Z_ISUNDEF(orig_op2));
+ if (Z_ISUNDEF(orig_op1)) {
+ if (opline->opcode == ZEND_MUL && Z_LVAL(orig_op2) == 0) {
+ ZVAL_LONG(&orig_result, 0);
+ } else if (is_effective_op1_double_cast(opline, &orig_op2)) {
+ ZVAL_UNDEF(&orig_result);
+ } else {
+ return 0;
+ }
+ } else if (Z_ISUNDEF(orig_op2)) {
+ if (opline->opcode == ZEND_MUL && Z_LVAL(orig_op1) == 0) {
+ ZVAL_LONG(&orig_result, 0);
+ } else if (is_effective_op2_double_cast(opline, &orig_op1)) {
+ ZVAL_UNDEF(&orig_result);
+ } else {
+ return 0;
+ }
+ } else {
+ /* Avoid division by zero */
+ if (opline->opcode == ZEND_DIV && zval_get_double(&orig_op2) == 0.0) {
+ return 0;
+ }
+
+ get_binary_op(opline->opcode)(&orig_result, &orig_op1, &orig_op2);
+ get_binary_op(opline->opcode)(&dval_result, &dval_op1, &dval_op2);
+ ZEND_ASSERT(Z_TYPE(dval_result) == IS_DOUBLE);
+ if (zval_get_double(&orig_result) != Z_DVAL(dval_result)) {
+ return 0;
+ }
+ }
+
+ if (!can_convert_to_double(op_array, ssa, ssa_op->result_def, &orig_result, visited)) {
+ return 0;
+ }
+ }
+ }
+
+ for (phi = var->phi_use_chain; phi; phi = zend_ssa_next_use_phi(ssa, var_num, phi)) {
+ /* Check that narrowing can actually be useful */
+ type = ssa->var_info[phi->ssa_var].type;
+ if ((type & MAY_BE_ANY) & ~(MAY_BE_LONG|MAY_BE_DOUBLE)) {
+ return 0;
+ }
+
+ if (!can_convert_to_double(op_array, ssa, phi->ssa_var, value, visited)) {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+static int zend_type_narrowing(const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa)
+{
+ uint32_t bitset_len = zend_bitset_len(ssa->vars_count);
+ ALLOCA_FLAG(use_heap);
+ zend_bitset visited = ZEND_BITSET_ALLOCA(2 * bitset_len, use_heap);
+ zend_bitset worklist = visited + bitset_len;
+ int i;
+ uint32_t v;
+ zend_op *opline;
+ zend_bool narrowed = 0;
+
+ zend_bitset_clear(worklist, bitset_len);
+
+ for (v = op_array->last_var; v < ssa->vars_count; v++) {
+ if ((ssa->var_info[v].type & (MAY_BE_REF | MAY_BE_ANY | MAY_BE_UNDEF)) != MAY_BE_LONG) continue;
+ if (ssa->vars[v].definition < 0) continue;
+ if (ssa->vars[v].no_val) continue;
+ opline = op_array->opcodes + ssa->vars[v].definition;
+ /* Go through assignments of literal integers and check if they can be converted to
+ * doubles instead, in the hope that we'll narrow long|double to double. */
+ if (opline->opcode == ZEND_ASSIGN && opline->result_type == IS_UNUSED &&
+ opline->op1_type == IS_CV && opline->op2_type == IS_CONST) {
+ zval *value = CRT_CONSTANT_EX(op_array, opline->op2, ssa->rt_constants);
+
+ zend_bitset_clear(visited, bitset_len);
+ if (can_convert_to_double(op_array, ssa, v, value, visited)) {
+ narrowed = 1;
+ ssa->var_info[v].use_as_double = 1;
+ /* The "visited" vars are exactly those which may change their type due to
+ * narrowing. Reset their types and add them to the type inference worklist */
+ ZEND_BITSET_FOREACH(visited, bitset_len, i) {
+ ssa->var_info[i].type &= ~MAY_BE_ANY;
+ } ZEND_BITSET_FOREACH_END();
+ zend_bitset_union(worklist, visited, bitset_len);
+ }
+ }
+ }
+
+ if (!narrowed) {
+ free_alloca(visited, use_heap);
+ return SUCCESS;
+ }
+
+ if (zend_infer_types_ex(op_array, script, ssa, worklist) != SUCCESS) {
+ free_alloca(visited, use_heap);
+ return FAILURE;
+ }
+
+ free_alloca(visited, use_heap);
+ return SUCCESS;
+}
+
+static int is_recursive_tail_call(const zend_op_array *op_array,
+ zend_op *opline)
+{
+ zend_func_info *info = ZEND_FUNC_INFO(op_array);
+
+ if (info->ssa.ops && info->ssa.vars &&
+ info->ssa.ops[opline - op_array->opcodes].op1_use >= 0 &&
+ info->ssa.vars[info->ssa.ops[opline - op_array->opcodes].op1_use].definition >= 0) {
+
+ zend_op *op = op_array->opcodes + info->ssa.vars[info->ssa.ops[opline - op_array->opcodes].op1_use].definition;
+
+ if (op->opcode == ZEND_DO_UCALL) {
+ zend_call_info *call_info = info->callee_info;
+
+ while (call_info && call_info->caller_call_opline != op) {
+ call_info = call_info->next_callee;
+ }
+ if (call_info && op_array == &call_info->callee_func->op_array) {
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+void zend_init_func_return_info(const zend_op_array *op_array,
+ const zend_script *script,
+ zend_ssa_var_info *ret)
+{
+ if (op_array->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
+ zend_arg_info *ret_info = op_array->arg_info - 1;
+ zend_ssa_range tmp_range = {0, 0, 0, 0};
+
+ ret->type = zend_fetch_arg_info(script, ret_info, &ret->ce);
+ ret->is_instanceof = (ret->ce) ? 1 : 0;
+ ret->range = tmp_range;
+ ret->has_range = 0;
+ }
+}
+
+void zend_func_return_info(const zend_op_array *op_array,
+ const zend_script *script,
+ int recursive,
+ int widening,
+ zend_ssa_var_info *ret)
+{
+ zend_func_info *info = ZEND_FUNC_INFO(op_array);
+ zend_ssa *ssa = &info->ssa;
+ int blocks_count = info->ssa.cfg.blocks_count;
+ zend_basic_block *blocks = info->ssa.cfg.blocks;
+ int j;
+ uint32_t t1;
+ uint32_t tmp = 0;
+ zend_class_entry *tmp_ce = NULL;
+ int tmp_is_instanceof = -1;
+ zend_class_entry *arg_ce;
+ int arg_is_instanceof;
+ zend_ssa_range tmp_range = {0, 0, 0, 0};
+ int tmp_has_range = -1;
+
+ if (op_array->fn_flags & ZEND_ACC_GENERATOR) {
+ ret->type = MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN;
+ ret->ce = zend_ce_generator;
+ ret->is_instanceof = 0;
+ ret->range = tmp_range;
+ ret->has_range = 0;
+ return;
+ }
+
+ for (j = 0; j < blocks_count; j++) {
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) && blocks[j].len != 0) {
+ zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1;
+
+ if (opline->opcode == ZEND_RETURN || opline->opcode == ZEND_RETURN_BY_REF) {
+ if (!recursive &&
+ info->ssa.ops &&
+ info->ssa.var_info &&
+ info->ssa.ops[opline - op_array->opcodes].op1_use >= 0 &&
+ info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].recursive) {
+ continue;
+ }
+ if (is_recursive_tail_call(op_array, opline)) {
+ continue;
+ }
+ t1 = OP1_INFO();
+ if (t1 & MAY_BE_UNDEF) {
+ t1 |= MAY_BE_NULL;
+ }
+ if (opline->opcode == ZEND_RETURN) {
+ t1 |= MAY_BE_RC1 | MAY_BE_RCN;
+ t1 &= ~(MAY_BE_UNDEF | MAY_BE_REF);
+ } else {
+ t1 |= MAY_BE_REF;
+ t1 &= ~(MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN);
+ }
+ tmp |= t1;
+
+ if (info->ssa.ops &&
+ info->ssa.var_info &&
+ info->ssa.ops[opline - op_array->opcodes].op1_use >= 0 &&
+ info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].ce) {
+ arg_ce = info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].ce;
+ arg_is_instanceof = info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].is_instanceof;
+ } else {
+ arg_ce = NULL;
+ arg_is_instanceof = 0;
+ }
+
+ if (tmp_is_instanceof < 0) {
+ tmp_ce = arg_ce;
+ tmp_is_instanceof = arg_is_instanceof;
+ } else if (arg_ce && arg_ce == tmp_ce) {
+ if (tmp_is_instanceof != arg_is_instanceof) {
+ tmp_is_instanceof = 1;
+ }
+ } else {
+ tmp_ce = NULL;
+ tmp_is_instanceof = 0;
+ }
+
+ if (opline->op1_type == IS_CONST) {
+ if (Z_TYPE_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants)) == IS_NULL) {
+ if (tmp_has_range < 0) {
+ tmp_has_range = 1;
+ tmp_range.underflow = 0;
+ tmp_range.min = 0;
+ tmp_range.max = 0;
+ tmp_range.overflow = 0;
+ } else if (tmp_has_range) {
+ if (!tmp_range.underflow) {
+ tmp_range.min = MIN(tmp_range.min, 0);
+ }
+ if (!tmp_range.overflow) {
+ tmp_range.max = MAX(tmp_range.max, 0);
+ }
+ }
+ } else if (Z_TYPE_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants)) == IS_FALSE) {
+ if (tmp_has_range < 0) {
+ tmp_has_range = 1;
+ tmp_range.underflow = 0;
+ tmp_range.min = 0;
+ tmp_range.max = 0;
+ tmp_range.overflow = 0;
+ } else if (tmp_has_range) {
+ if (!tmp_range.underflow) {
+ tmp_range.min = MIN(tmp_range.min, 0);
+ }
+ if (!tmp_range.overflow) {
+ tmp_range.max = MAX(tmp_range.max, 0);
+ }
+ }
+ } else if (Z_TYPE_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants)) == IS_TRUE) {
+ if (tmp_has_range < 0) {
+ tmp_has_range = 1;
+ tmp_range.underflow = 0;
+ tmp_range.min = 1;
+ tmp_range.max = 1;
+ tmp_range.overflow = 0;
+ } else if (tmp_has_range) {
+ if (!tmp_range.underflow) {
+ tmp_range.min = MIN(tmp_range.min, 1);
+ }
+ if (!tmp_range.overflow) {
+ tmp_range.max = MAX(tmp_range.max, 1);
+ }
+ }
+ } else if (Z_TYPE_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants)) == IS_LONG) {
+ if (tmp_has_range < 0) {
+ tmp_has_range = 1;
+ tmp_range.underflow = 0;
+ tmp_range.min = Z_LVAL_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants));
+ tmp_range.max = Z_LVAL_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants));
+ tmp_range.overflow = 0;
+ } else if (tmp_has_range) {
+ if (!tmp_range.underflow) {
+ tmp_range.min = MIN(tmp_range.min, Z_LVAL_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants)));
+ }
+ if (!tmp_range.overflow) {
+ tmp_range.max = MAX(tmp_range.max, Z_LVAL_P(CRT_CONSTANT_EX(op_array, opline->op1, info->ssa.rt_constants)));
+ }
+ }
+ } else {
+ tmp_has_range = 0;
+ }
+ } else if (info->ssa.ops &&
+ info->ssa.var_info &&
+ info->ssa.ops[opline - op_array->opcodes].op1_use >= 0) {
+ if (info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].has_range) {
+ if (tmp_has_range < 0) {
+ tmp_has_range = 1;
+ tmp_range = info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].range;
+ } else if (tmp_has_range) {
+ /* union */
+ if (info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].range.underflow) {
+ tmp_range.underflow = 1;
+ tmp_range.min = ZEND_LONG_MIN;
+ } else {
+ tmp_range.min = MIN(tmp_range.min, info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].range.min);
+ }
+ if (info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].range.overflow) {
+ tmp_range.overflow = 1;
+ tmp_range.max = ZEND_LONG_MAX;
+ } else {
+ tmp_range.max = MAX(tmp_range.max, info->ssa.var_info[info->ssa.ops[opline - op_array->opcodes].op1_use].range.max);
+ }
+ }
+ } else if (!widening) {
+ tmp_has_range = 1;
+ tmp_range.underflow = 1;
+ tmp_range.min = ZEND_LONG_MIN;
+ tmp_range.max = ZEND_LONG_MAX;
+ tmp_range.overflow = 1;
+ }
+ } else {
+ tmp_has_range = 0;
+ }
+ }
+ }
+ }
+
+ if (!(op_array->fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) {
+ if (tmp_is_instanceof < 0) {
+ tmp_is_instanceof = 0;
+ tmp_ce = NULL;
+ }
+ if (tmp_has_range < 0) {
+ tmp_has_range = 0;
+ }
+ ret->type = tmp;
+ ret->ce = tmp_ce;
+ ret->is_instanceof = tmp_is_instanceof;
+ }
+ ret->range = tmp_range;
+ ret->has_range = tmp_has_range;
+}
+
+static int zend_infer_types(const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa)
+{
+ zend_ssa_var_info *ssa_var_info = ssa->var_info;
+ int ssa_vars_count = ssa->vars_count;
+ int j;
+ zend_bitset worklist;
+ ALLOCA_FLAG(use_heap);
+
+ worklist = do_alloca(sizeof(zend_ulong) * zend_bitset_len(ssa_vars_count), use_heap);
+ memset(worklist, 0, sizeof(zend_ulong) * zend_bitset_len(ssa_vars_count));
+
+ /* Type Inference */
+ for (j = op_array->last_var; j < ssa_vars_count; j++) {
+ zend_bitset_incl(worklist, j);
+ ssa_var_info[j].type = 0;
+ }
+
+ if (zend_infer_types_ex(op_array, script, ssa, worklist) != SUCCESS) {
+ free_alloca(worklist, use_heap);
+ return FAILURE;
+ }
+
+ /* Narrowing integer initialization to doubles */
+ zend_type_narrowing(op_array, script, ssa);
+
+ for (j = 0; j < op_array->last_var; j++) {
+ if (zend_string_equals_literal(op_array->vars[j], "php_errormsg")) {
+ /* Mark all SSA vars for $php_errormsg as references,
+ * to make sure we don't optimize it. */
+ int i;
+ for (i = 0; i < ssa_vars_count; i++) {
+ if (ssa->vars[i].var == j) {
+ ssa_var_info[i].type |= MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ }
+ }
+ }
+ }
+
+ if (ZEND_FUNC_INFO(op_array)) {
+ zend_func_return_info(op_array, script, 1, 0, &ZEND_FUNC_INFO(op_array)->return_info);
+ }
+
+ free_alloca(worklist, use_heap);
+ return SUCCESS;
+}
+
+int zend_ssa_inference(zend_arena **arena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa) /* {{{ */
+{
+ zend_ssa_var_info *ssa_var_info;
+ int i;
+
+ if (!ssa->var_info) {
+ ssa->var_info = zend_arena_calloc(arena, ssa->vars_count, sizeof(zend_ssa_var_info));
+ }
+ ssa_var_info = ssa->var_info;
+
+ if (!op_array->function_name) {
+ for (i = 0; i < op_array->last_var; i++) {
+ ssa_var_info[i].type = MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
+ ssa_var_info[i].has_range = 0;
+ }
+ } else {
+ for (i = 0; i < op_array->last_var; i++) {
+ if (i == EX_VAR_TO_NUM(op_array->this_var)) {
+ ssa_var_info[i].type = MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_OBJECT;
+ ssa_var_info[i].ce = op_array->scope;
+ ssa_var_info[i].is_instanceof = 1;
+ } else {
+ ssa_var_info[i].type = MAY_BE_UNDEF | MAY_BE_RCN;
+ }
+ ssa_var_info[i].has_range = 0;
+ }
+ }
+ for (i = op_array->last_var; i < ssa->vars_count; i++) {
+ ssa_var_info[i].type = 0;
+ ssa_var_info[i].has_range = 0;
+ }
+
+ if (zend_infer_ranges(op_array, ssa) != SUCCESS) {
+ return FAILURE;
+ }
+
+ if (zend_infer_types(op_array, script, ssa) != SUCCESS) {
+ return FAILURE;
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+void zend_inference_check_recursive_dependencies(zend_op_array *op_array)
+{
+ zend_func_info *info = ZEND_FUNC_INFO(op_array);
+ zend_call_info *call_info;
+ zend_bitset worklist;
+ int worklist_len;
+ ALLOCA_FLAG(use_heap);
+
+ if (!info->ssa.var_info || !(info->flags & ZEND_FUNC_RECURSIVE)) {
+ return;
+ }
+ worklist_len = zend_bitset_len(info->ssa.vars_count);
+ worklist = do_alloca(sizeof(zend_ulong) * worklist_len, use_heap);
+ memset(worklist, 0, sizeof(zend_ulong) * worklist_len);
+ call_info = info->callee_info;
+ while (call_info) {
+ if (call_info->recursive &&
+ info->ssa.ops[call_info->caller_call_opline - op_array->opcodes].result_def >= 0) {
+ zend_bitset_incl(worklist, info->ssa.ops[call_info->caller_call_opline - op_array->opcodes].result_def);
+ }
+ call_info = call_info->next_callee;
+ }
+ while (!zend_bitset_empty(worklist, worklist_len)) {
+ int i = zend_bitset_first(worklist, worklist_len);
+ zend_bitset_excl(worklist, i);
+ if (!info->ssa.var_info[i].recursive) {
+ info->ssa.var_info[i].recursive = 1;
+ add_usages(op_array, &info->ssa, worklist, i);
+ }
+ }
+ free_alloca(worklist, use_heap);
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_inference.h b/ext/opcache/Optimizer/zend_inference.h
new file mode 100644
index 0000000000..6bf68090c5
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_inference.h
@@ -0,0 +1,263 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, e-SSA based Type & Range Inference |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_INFERENCE_H
+#define ZEND_INFERENCE_H
+
+#include "zend_optimizer.h"
+#include "zend_ssa.h"
+#include "zend_bitset.h"
+
+/* Bitmask for type inference (zend_ssa_var_info.type) */
+#include "zend_type_info.h"
+
+#define MAY_BE_IN_REG (1<<25) /* value allocated in CPU register */
+
+//TODO: remome MAY_BE_RC1, MAY_BE_RCN???
+#define MAY_BE_RC1 (1<<27) /* may be non-reference with refcount == 1 */
+#define MAY_BE_RCN (1<<28) /* may be non-reference with refcount > 1 */
+
+
+#define DEFINE_SSA_OP_HAS_RANGE(opN) \
+ static zend_always_inline zend_bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ if (opline->opN##_type == IS_CONST) { \
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->opN, ssa->rt_constants); \
+ return (Z_TYPE_P(zv) == IS_LONG || Z_TYPE_P(zv) == IS_TRUE || Z_TYPE_P(zv) == IS_FALSE || Z_TYPE_P(zv) == IS_NULL); \
+ } else { \
+ return (opline->opN##_type != IS_UNUSED && \
+ ssa->ops && \
+ ssa->var_info && \
+ ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \
+ ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range); \
+ } \
+ return 0; \
+ }
+
+#define DEFINE_SSA_OP_MIN_RANGE(opN) \
+ static zend_always_inline zend_long _ssa_##opN##_min_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ if (opline->opN##_type == IS_CONST) { \
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->opN, ssa->rt_constants); \
+ if (Z_TYPE_P(zv) == IS_LONG) { \
+ return Z_LVAL_P(zv); \
+ } else if (Z_TYPE_P(zv) == IS_TRUE) { \
+ return 1; \
+ } else if (Z_TYPE_P(zv) == IS_FALSE) { \
+ return 0; \
+ } else if (Z_TYPE_P(zv) == IS_NULL) { \
+ return 0; \
+ } \
+ } else if (opline->opN##_type != IS_UNUSED && \
+ ssa->ops && \
+ ssa->var_info && \
+ ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \
+ ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \
+ return ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].range.min; \
+ } \
+ return ZEND_LONG_MIN; \
+ }
+
+#define DEFINE_SSA_OP_MAX_RANGE(opN) \
+ static zend_always_inline zend_long _ssa_##opN##_max_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ if (opline->opN##_type == IS_CONST) { \
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->opN, ssa->rt_constants); \
+ if (Z_TYPE_P(zv) == IS_LONG) { \
+ return Z_LVAL_P(zv); \
+ } else if (Z_TYPE_P(zv) == IS_TRUE) { \
+ return 1; \
+ } else if (Z_TYPE_P(zv) == IS_FALSE) { \
+ return 0; \
+ } else if (Z_TYPE_P(zv) == IS_NULL) { \
+ return 0; \
+ } \
+ } else if (opline->opN##_type != IS_UNUSED && \
+ ssa->ops && \
+ ssa->var_info && \
+ ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \
+ ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \
+ return ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].range.max; \
+ } \
+ return ZEND_LONG_MAX; \
+ }
+
+#define DEFINE_SSA_OP_RANGE_UNDERFLOW(opN) \
+ static zend_always_inline char _ssa_##opN##_range_underflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ if (opline->opN##_type == IS_CONST) { \
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->opN, ssa->rt_constants); \
+ if (Z_TYPE_P(zv) == IS_LONG || Z_TYPE_P(zv) == IS_TRUE || Z_TYPE_P(zv) == IS_FALSE || Z_TYPE_P(zv) == IS_NULL) { \
+ return 0; \
+ } \
+ } else if (opline->opN##_type != IS_UNUSED && \
+ ssa->ops && \
+ ssa->var_info && \
+ ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \
+ ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \
+ return ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].range.underflow; \
+ } \
+ return 1; \
+ }
+
+#define DEFINE_SSA_OP_RANGE_OVERFLOW(opN) \
+ static zend_always_inline char _ssa_##opN##_range_overflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ if (opline->opN##_type == IS_CONST) { \
+ zval *zv = CRT_CONSTANT_EX(op_array, opline->opN, ssa->rt_constants); \
+ if (Z_TYPE_P(zv) == IS_LONG || Z_TYPE_P(zv) == IS_TRUE || Z_TYPE_P(zv) == IS_FALSE || Z_TYPE_P(zv) == IS_NULL) { \
+ return 0; \
+ } \
+ } else if (opline->opN##_type != IS_UNUSED && \
+ ssa->ops && \
+ ssa->var_info && \
+ ssa->ops[opline - op_array->opcodes].opN##_use >= 0 && \
+ ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].has_range) { \
+ return ssa->var_info[ssa->ops[opline - op_array->opcodes].opN##_use].range.overflow; \
+ } \
+ return 1; \
+ }
+
+DEFINE_SSA_OP_HAS_RANGE(op1)
+DEFINE_SSA_OP_MIN_RANGE(op1)
+DEFINE_SSA_OP_MAX_RANGE(op1)
+DEFINE_SSA_OP_RANGE_UNDERFLOW(op1)
+DEFINE_SSA_OP_RANGE_OVERFLOW(op1)
+DEFINE_SSA_OP_HAS_RANGE(op2)
+DEFINE_SSA_OP_MIN_RANGE(op2)
+DEFINE_SSA_OP_MAX_RANGE(op2)
+DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
+DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
+
+#define OP1_HAS_RANGE() (_ssa_op1_has_range (op_array, ssa, opline))
+#define OP1_MIN_RANGE() (_ssa_op1_min_range (op_array, ssa, opline))
+#define OP1_MAX_RANGE() (_ssa_op1_max_range (op_array, ssa, opline))
+#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline))
+#define OP1_RANGE_OVERFLOW() (_ssa_op1_range_overflow (op_array, ssa, opline))
+#define OP2_HAS_RANGE() (_ssa_op2_has_range (op_array, ssa, opline))
+#define OP2_MIN_RANGE() (_ssa_op2_min_range (op_array, ssa, opline))
+#define OP2_MAX_RANGE() (_ssa_op2_max_range (op_array, ssa, opline))
+#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline))
+#define OP2_RANGE_OVERFLOW() (_ssa_op2_range_overflow (op_array, ssa, opline))
+
+static zend_always_inline uint32_t _const_op_type(const zval *zv) {
+ if (Z_TYPE_P(zv) == IS_CONSTANT) {
+ return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
+ } else if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
+ return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
+ } else if (Z_TYPE_P(zv) == IS_ARRAY) {
+ HashTable *ht = Z_ARRVAL_P(zv);
+ uint32_t tmp = MAY_BE_ARRAY | MAY_BE_RC1 | MAY_BE_RCN;
+
+ zend_string *str;
+ zval *val;
+ ZEND_HASH_FOREACH_STR_KEY_VAL(ht, str, val) {
+ if (str) {
+ tmp |= MAY_BE_ARRAY_KEY_STRING;
+ } else {
+ tmp |= MAY_BE_ARRAY_KEY_LONG;
+ }
+ tmp |= 1 << (Z_TYPE_P(val) + MAY_BE_ARRAY_SHIFT);
+ } ZEND_HASH_FOREACH_END();
+ return tmp;
+ } else {
+ return (1 << Z_TYPE_P(zv)) | MAY_BE_RC1 | MAY_BE_RCN;
+ }
+}
+
+static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa_var_num)
+{
+ if (ssa->var_info && ssa_var_num >= 0) {
+ return ssa->var_info[ssa_var_num].type;
+ } else {
+ return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ERROR;
+ }
+}
+
+#define DEFINE_SSA_OP_INFO(opN) \
+ static zend_always_inline uint32_t _ssa_##opN##_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ if (opline->opN##_type == IS_CONST) { \
+ return _const_op_type(CRT_CONSTANT_EX(op_array, opline->opN, ssa->rt_constants)); \
+ } else { \
+ return get_ssa_var_info(ssa, ssa->ops ? ssa->ops[opline - op_array->opcodes].opN##_use : -1); \
+ } \
+ }
+
+#define DEFINE_SSA_OP_DEF_INFO(opN) \
+ static zend_always_inline uint32_t _ssa_##opN##_def_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline) \
+ { \
+ return get_ssa_var_info(ssa, ssa->ops ? ssa->ops[opline - op_array->opcodes].opN##_def : -1); \
+ }
+
+
+DEFINE_SSA_OP_INFO(op1)
+DEFINE_SSA_OP_INFO(op2)
+DEFINE_SSA_OP_INFO(result)
+DEFINE_SSA_OP_DEF_INFO(op1)
+DEFINE_SSA_OP_DEF_INFO(op2)
+DEFINE_SSA_OP_DEF_INFO(result)
+
+#define OP1_INFO() (_ssa_op1_info(op_array, ssa, opline))
+#define OP2_INFO() (_ssa_op2_info(op_array, ssa, opline))
+#define OP1_DATA_INFO() (_ssa_op1_info(op_array, ssa, (opline+1)))
+#define OP2_DATA_INFO() (_ssa_op2_info(op_array, ssa, (opline+1)))
+#define RES_USE_INFO() (_ssa_result_info(op_array, ssa, opline))
+#define OP1_DEF_INFO() (_ssa_op1_def_info(op_array, ssa, opline))
+#define OP2_DEF_INFO() (_ssa_op2_def_info(op_array, ssa, opline))
+#define OP1_DATA_DEF_INFO() (_ssa_op1_def_info(op_array, ssa, (opline+1)))
+#define OP2_DATA_DEF_INFO() (_ssa_op2_def_info(op_array, ssa, (opline+1)))
+#define RES_INFO() (_ssa_result_def_info(op_array, ssa, opline))
+
+
+BEGIN_EXTERN_C()
+
+int zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa);
+int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
+int zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa);
+
+uint32_t zend_array_element_type(uint32_t t1, int write, int insert);
+
+int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp);
+void zend_inference_init_range(const zend_op_array *op_array, zend_ssa *ssa, int var, zend_bool underflow, zend_long min, zend_long max, zend_bool overflow);
+int zend_inference_narrowing_meet(zend_ssa_var_info *var_info, zend_ssa_range *r);
+int zend_inference_widening_meet(zend_ssa_var_info *var_info, zend_ssa_range *r);
+void zend_inference_check_recursive_dependencies(zend_op_array *op_array);
+
+int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_bitset worklist);
+
+void zend_init_func_return_info(const zend_op_array *op_array,
+ const zend_script *script,
+ zend_ssa_var_info *ret);
+void zend_func_return_info(const zend_op_array *op_array,
+ const zend_script *script,
+ int recursive,
+ int widening,
+ zend_ssa_var_info *ret);
+
+END_EXTERN_C()
+
+#endif /* ZEND_INFERENCE_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index dc69d2511e..35dff98362 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,6 +26,15 @@
#include "zend_constants.h"
#include "zend_execute.h"
#include "zend_vm.h"
+#include "zend_cfg.h"
+#include "zend_func_info.h"
+#include "zend_call_graph.h"
+#include "zend_inference.h"
+#include "zend_dump.h"
+
+#ifndef HAVE_DFA_PASS
+# define HAVE_DFA_PASS 1
+#endif
static void zend_optimizer_zval_dtor_wrapper(zval *zvalue)
{
@@ -88,11 +97,6 @@ int zend_optimizer_lookup_cv(zend_op_array *op_array, zend_string* name)
if (opline->result_type & (IS_TMP_VAR|IS_VAR)) {
opline->result.var += sizeof(zval);
}
- if (opline->opcode == ZEND_DECLARE_INHERITED_CLASS ||
- opline->opcode == ZEND_DECLARE_ANON_INHERITED_CLASS ||
- opline->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED) {
- opline->extended_value += sizeof(zval);
- }
opline++;
}
}
@@ -110,6 +114,13 @@ int zend_optimizer_add_literal(zend_op_array *op_array, zval *zv)
return i;
}
+static inline int zend_optimizer_add_literal_string(zend_op_array *op_array, zend_string *str) {
+ zval zv;
+ ZVAL_STR(&zv, str);
+ zend_string_hash_val(str);
+ return zend_optimizer_add_literal(op_array, &zv);
+}
+
int zend_optimizer_is_disabled_func(const char *name, size_t len) {
zend_function *fbc = (zend_function *)zend_hash_str_find_ptr(EG(function_table), name, len);
@@ -117,178 +128,271 @@ int zend_optimizer_is_disabled_func(const char *name, size_t len) {
fbc->internal_function.handler == ZEND_FN(display_disabled_function));
}
-void zend_optimizer_update_op1_const(zend_op_array *op_array,
- zend_op *opline,
- zval *val)
-{
- if (opline->opcode == ZEND_FREE) {
- MAKE_NOP(opline);
+static inline void drop_leading_backslash(zval *val) {
+ if (Z_STRVAL_P(val)[0] == '\\') {
+ zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0);
zval_dtor(val);
- } else {
- ZEND_OP1_TYPE(opline) = IS_CONST;
- if (Z_TYPE_P(val) == IS_STRING) {
- switch (opline->opcode) {
- case ZEND_INIT_STATIC_METHOD_CALL:
- case ZEND_CATCH:
- case ZEND_FETCH_CONSTANT:
- case ZEND_DEFINED:
- case ZEND_NEW:
- opline->op1.constant = zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(ZEND_OP1_LITERAL(opline)));
- Z_CACHE_SLOT(op_array->literals[opline->op1.constant]) = op_array->cache_size;
- op_array->cache_size += sizeof(void*);
- zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
- zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(op_array->literals[opline->op1.constant+1]));
- break;
- default:
- opline->op1.constant = zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(ZEND_OP1_LITERAL(opline)));
- break;
- }
- } else {
- if (opline->opcode == ZEND_CONCAT ||
- opline->opcode == ZEND_FAST_CONCAT) {
- convert_to_string(val);
- }
+ ZVAL_STR(val, str);
+ }
+}
+
+static inline void alloc_cache_slots_op1(zend_op_array *op_array, zend_op *opline, uint32_t num) {
+ Z_CACHE_SLOT(op_array->literals[opline->op1.constant]) = op_array->cache_size;
+ op_array->cache_size += num * sizeof(void *);
+}
+static inline void alloc_cache_slots_op2(zend_op_array *op_array, zend_op *opline, uint32_t num) {
+ Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = op_array->cache_size;
+ op_array->cache_size += num * sizeof(void *);
+}
+
+#define REQUIRES_STRING(val) do { \
+ if (Z_TYPE_P(val) != IS_STRING) { \
+ zval_dtor(val); \
+ return 0; \
+ } \
+} while (0)
+
+#define TO_STRING_NOWARN(val) do { \
+ if (Z_TYPE_P(val) >= IS_ARRAY) { \
+ zval_dtor(val); \
+ return 0; \
+ } \
+ convert_to_string(val); \
+} while (0)
+
+int zend_optimizer_update_op1_const(zend_op_array *op_array,
+ zend_op *opline,
+ zval *val)
+{
+ switch (opline->opcode) {
+ case ZEND_FREE:
+ MAKE_NOP(opline);
+ zval_dtor(val);
+ return 1;
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ case ZEND_CATCH:
+ case ZEND_FETCH_CONSTANT:
+ case ZEND_FETCH_CLASS_CONSTANT:
+ case ZEND_DEFINED:
+ case ZEND_NEW:
+ REQUIRES_STRING(val);
+ drop_leading_backslash(val);
opline->op1.constant = zend_optimizer_add_literal(op_array, val);
- }
+ alloc_cache_slots_op1(op_array, opline, 1);
+ zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val)));
+ break;
+ case ZEND_FETCH_STATIC_PROP_R:
+ case ZEND_FETCH_STATIC_PROP_W:
+ case ZEND_FETCH_STATIC_PROP_RW:
+ case ZEND_FETCH_STATIC_PROP_IS:
+ case ZEND_FETCH_STATIC_PROP_UNSET:
+ case ZEND_FETCH_STATIC_PROP_FUNC_ARG:
+ TO_STRING_NOWARN(val);
+ opline->op1.constant = zend_optimizer_add_literal(op_array, val);
+ alloc_cache_slots_op1(op_array, opline, 2);
+ break;
+ case ZEND_CONCAT:
+ case ZEND_FAST_CONCAT:
+ case ZEND_FETCH_R:
+ case ZEND_FETCH_W:
+ case ZEND_FETCH_RW:
+ case ZEND_FETCH_IS:
+ case ZEND_FETCH_UNSET:
+ case ZEND_FETCH_FUNC_ARG:
+ TO_STRING_NOWARN(val);
+ /* break missing intentionally */
+ default:
+ opline->op1.constant = zend_optimizer_add_literal(op_array, val);
+ break;
+ }
+
+ ZEND_OP1_TYPE(opline) = IS_CONST;
+ if (Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_STRING) {
+ zend_string_hash_val(Z_STR(ZEND_OP1_LITERAL(opline)));
}
+ return 1;
}
-void zend_optimizer_update_op2_const(zend_op_array *op_array,
- zend_op *opline,
- zval *val)
+int zend_optimizer_update_op2_const(zend_op_array *op_array,
+ zend_op *opline,
+ zval *val)
{
- ZEND_OP2_TYPE(opline) = IS_CONST;
- if (opline->opcode == ZEND_INIT_FCALL) {
- zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
- opline->op2.constant = zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(ZEND_OP2_LITERAL(opline)));
- Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = op_array->cache_size;
- op_array->cache_size += sizeof(void*);
- return;
- } else if (opline->opcode == ZEND_ROPE_INIT ||
- opline->opcode == ZEND_ROPE_ADD ||
- opline->opcode == ZEND_ROPE_END ||
- opline->opcode == ZEND_CONCAT ||
- opline->opcode == ZEND_FAST_CONCAT) {
- convert_to_string(val);
- }
- opline->op2.constant = zend_optimizer_add_literal(op_array, val);
- if (Z_TYPE_P(val) == IS_STRING) {
- zend_string_hash_val(Z_STR(ZEND_OP2_LITERAL(opline)));
- switch (opline->opcode) {
- case ZEND_FETCH_R:
- case ZEND_FETCH_W:
- case ZEND_FETCH_RW:
- case ZEND_FETCH_IS:
- case ZEND_FETCH_UNSET:
- case ZEND_FETCH_FUNC_ARG:
- case ZEND_FETCH_CLASS:
- case ZEND_INIT_FCALL_BY_NAME:
- /*case ZEND_INIT_NS_FCALL_BY_NAME:*/
- case ZEND_UNSET_VAR:
- case ZEND_ISSET_ISEMPTY_VAR:
- case ZEND_ADD_INTERFACE:
- case ZEND_ADD_TRAIT:
- case ZEND_INSTANCEOF:
- Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = op_array->cache_size;
- op_array->cache_size += sizeof(void*);
- zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
- zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(op_array->literals[opline->op2.constant+1]));
- break;
- case ZEND_INIT_DYNAMIC_CALL:
+ switch (opline->opcode) {
+ case ZEND_ASSIGN_REF:
+ zval_dtor(val);
+ return 0;
+ case ZEND_FETCH_CLASS:
+ case ZEND_INIT_FCALL_BY_NAME:
+ /*case ZEND_INIT_NS_FCALL_BY_NAME:*/
+ case ZEND_ADD_INTERFACE:
+ case ZEND_ADD_TRAIT:
+ case ZEND_INSTANCEOF:
+ case ZEND_FETCH_STATIC_PROP_R:
+ case ZEND_FETCH_STATIC_PROP_W:
+ case ZEND_FETCH_STATIC_PROP_RW:
+ case ZEND_FETCH_STATIC_PROP_IS:
+ case ZEND_FETCH_STATIC_PROP_UNSET:
+ case ZEND_FETCH_STATIC_PROP_FUNC_ARG:
+ case ZEND_UNSET_STATIC_PROP:
+ case ZEND_ISSET_ISEMPTY_STATIC_PROP:
+ REQUIRES_STRING(val);
+ drop_leading_backslash(val);
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val)));
+ alloc_cache_slots_op2(op_array, opline, 1);
+ break;
+ case ZEND_INIT_FCALL:
+ REQUIRES_STRING(val);
+ zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ alloc_cache_slots_op2(op_array, opline, 1);
+ break;
+ case ZEND_INIT_DYNAMIC_CALL:
+ if (Z_TYPE_P(val) == IS_STRING) {
+ if (zend_memrchr(Z_STRVAL_P(val), ':', Z_STRLEN_P(val))) {
+ zval_dtor(val);
+ return 0;
+ }
+
+ if (zend_optimizer_classify_function(Z_STR_P(val), opline->extended_value)) {
+ /* Dynamic call to various special functions must stay dynamic,
+ * otherwise would drop a warning */
+ zval_dtor(val);
+ return 0;
+ }
+
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
- Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = op_array->cache_size;
- op_array->cache_size += sizeof(void*);
- zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
- zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(op_array->literals[opline->op2.constant+1]));
- break;
- case ZEND_INIT_METHOD_CALL:
- case ZEND_INIT_STATIC_METHOD_CALL:
- zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
- zend_optimizer_add_literal(op_array, val);
- zend_string_hash_val(Z_STR(op_array->literals[opline->op2.constant+1]));
- /* break missing intentionally */
- /*case ZEND_FETCH_CONSTANT:*/
- case ZEND_ASSIGN_OBJ:
- case ZEND_FETCH_OBJ_R:
- case ZEND_FETCH_OBJ_W:
- case ZEND_FETCH_OBJ_RW:
- case ZEND_FETCH_OBJ_IS:
- case ZEND_FETCH_OBJ_UNSET:
- case ZEND_FETCH_OBJ_FUNC_ARG:
- case ZEND_UNSET_OBJ:
- case ZEND_PRE_INC_OBJ:
- case ZEND_PRE_DEC_OBJ:
- case ZEND_POST_INC_OBJ:
- case ZEND_POST_DEC_OBJ:
- case ZEND_ISSET_ISEMPTY_PROP_OBJ:
- Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = op_array->cache_size;
- op_array->cache_size += 2 * sizeof(void*);
- break;
- case ZEND_ASSIGN_ADD:
- case ZEND_ASSIGN_SUB:
- case ZEND_ASSIGN_MUL:
- case ZEND_ASSIGN_DIV:
- case ZEND_ASSIGN_MOD:
- case ZEND_ASSIGN_SL:
- case ZEND_ASSIGN_SR:
- case ZEND_ASSIGN_CONCAT:
- case ZEND_ASSIGN_BW_OR:
- case ZEND_ASSIGN_BW_AND:
- case ZEND_ASSIGN_BW_XOR:
- if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_CACHE_SLOT(op_array->literals[opline->op2.constant]) = op_array->cache_size;
- op_array->cache_size += 2 * sizeof(void*);
+ drop_leading_backslash(val);
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val)));
+ alloc_cache_slots_op2(op_array, opline, 1);
+ } else {
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ }
+ break;
+ case ZEND_INIT_METHOD_CALL:
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ REQUIRES_STRING(val);
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val)));
+ alloc_cache_slots_op2(op_array, opline, 2);
+ break;
+ /*case ZEND_FETCH_CLASS_CONSTANT:*/
+ case ZEND_ASSIGN_OBJ:
+ case ZEND_FETCH_OBJ_R:
+ case ZEND_FETCH_OBJ_W:
+ case ZEND_FETCH_OBJ_RW:
+ case ZEND_FETCH_OBJ_IS:
+ case ZEND_FETCH_OBJ_UNSET:
+ case ZEND_FETCH_OBJ_FUNC_ARG:
+ case ZEND_UNSET_OBJ:
+ case ZEND_PRE_INC_OBJ:
+ case ZEND_PRE_DEC_OBJ:
+ case ZEND_POST_INC_OBJ:
+ case ZEND_POST_DEC_OBJ:
+ case ZEND_ISSET_ISEMPTY_PROP_OBJ:
+ TO_STRING_NOWARN(val);
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ alloc_cache_slots_op2(op_array, opline, 2);
+ break;
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_POW:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ if (opline->extended_value == ZEND_ASSIGN_OBJ) {
+ TO_STRING_NOWARN(val);
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ alloc_cache_slots_op2(op_array, opline, 2);
+ } else {
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ }
+ break;
+ case ZEND_ISSET_ISEMPTY_DIM_OBJ:
+ case ZEND_ADD_ARRAY_ELEMENT:
+ case ZEND_INIT_ARRAY:
+ case ZEND_ASSIGN_DIM:
+ case ZEND_UNSET_DIM:
+ case ZEND_FETCH_DIM_R:
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_IS:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_FETCH_DIM_UNSET:
+ case ZEND_FETCH_LIST:
+ if (Z_TYPE_P(val) == IS_STRING) {
+ zend_ulong index;
+ if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) {
+ zval_dtor(val);
+ ZVAL_LONG(val, index);
}
- break;
- case ZEND_OP_DATA:
- if ((opline-1)->opcode == ZEND_ASSIGN_DIM ||
- ((opline-1)->extended_value == ZEND_ASSIGN_DIM &&
- ((opline-1)->opcode == ZEND_ASSIGN_ADD ||
- (opline-1)->opcode == ZEND_ASSIGN_SUB ||
- (opline-1)->opcode == ZEND_ASSIGN_MUL ||
- (opline-1)->opcode == ZEND_ASSIGN_DIV ||
- (opline-1)->opcode == ZEND_ASSIGN_MOD ||
- (opline-1)->opcode == ZEND_ASSIGN_SL ||
- (opline-1)->opcode == ZEND_ASSIGN_SR ||
- (opline-1)->opcode == ZEND_ASSIGN_CONCAT ||
- (opline-1)->opcode == ZEND_ASSIGN_BW_OR ||
- (opline-1)->opcode == ZEND_ASSIGN_BW_AND ||
- (opline-1)->opcode == ZEND_ASSIGN_BW_XOR))) {
- goto check_numeric;
+ }
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ break;
+ case ZEND_ROPE_INIT:
+ case ZEND_ROPE_ADD:
+ case ZEND_ROPE_END:
+ case ZEND_CONCAT:
+ case ZEND_FAST_CONCAT:
+ TO_STRING_NOWARN(val);
+ /* break missing intentionally */
+ default:
+ opline->op2.constant = zend_optimizer_add_literal(op_array, val);
+ break;
+ }
+
+ ZEND_OP2_TYPE(opline) = IS_CONST;
+ if (Z_TYPE(ZEND_OP2_LITERAL(opline)) == IS_STRING) {
+ zend_string_hash_val(Z_STR(ZEND_OP2_LITERAL(opline)));
+ }
+ return 1;
+}
+
+void zend_optimizer_remove_live_range(zend_op_array *op_array, uint32_t var)
+{
+ if (op_array->last_live_range) {
+ int i = 0;
+ int j = 0;
+ uint32_t *map;
+ ALLOCA_FLAG(use_heap);
+
+ map = (uint32_t *)do_alloca(sizeof(uint32_t) * op_array->last_live_range, use_heap);
+
+ do {
+ if ((op_array->live_range[i].var & ~ZEND_LIVE_MASK) != var) {
+ map[i] = j;
+ if (i != j) {
+ op_array->live_range[j] = op_array->live_range[i];
}
- break;
- case ZEND_ISSET_ISEMPTY_DIM_OBJ:
- case ZEND_ADD_ARRAY_ELEMENT:
- case ZEND_INIT_ARRAY:
- case ZEND_ASSIGN_DIM:
- case ZEND_UNSET_DIM:
- case ZEND_FETCH_DIM_R:
- case ZEND_FETCH_DIM_W:
- case ZEND_FETCH_DIM_RW:
- case ZEND_FETCH_DIM_IS:
- case ZEND_FETCH_DIM_FUNC_ARG:
- case ZEND_FETCH_DIM_UNSET:
- case ZEND_FETCH_LIST:
-check_numeric:
- {
- zend_ulong index;
-
- if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) {
- zval_dtor(val);
- ZVAL_LONG(val, index);
- op_array->literals[opline->op2.constant] = *val;
- }
+ j++;
+ }
+ i++;
+ } while (i < op_array->last_live_range);
+ if (i != j) {
+ if ((op_array->last_live_range = j)) {
+ zend_op *opline = op_array->opcodes;
+ zend_op *end = opline + op_array->last;
+
+ while (opline != end) {
+ if ((opline->opcode == ZEND_FREE || opline->opcode == ZEND_FE_FREE) &&
+ opline->extended_value == ZEND_FREE_ON_RETURN) {
+ opline->op2.num = map[opline->op2.num];
+ }
+ opline++;
}
- break;
- default:
- break;
+ } else {
+ efree(op_array->live_range);
+ op_array->live_range = NULL;
+ }
}
+ free_alloca(map, use_heap);
}
}
@@ -310,6 +414,8 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
case ZEND_FETCH_DIM_UNSET:
case ZEND_ASSIGN_DIM:
case ZEND_SEPARATE:
+ case ZEND_RETURN_BY_REF:
+ zval_dtor(val);
return 0;
case ZEND_SEND_VAR:
opline->extended_value = 0;
@@ -320,17 +426,13 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
opline->opcode = ZEND_SEND_VAL_EX;
break;
case ZEND_SEND_VAR_NO_REF:
- if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) {
- if (opline->extended_value & ZEND_ARG_SEND_BY_REF) {
- zval_dtor(val);
- return 0;
- }
- opline->extended_value = 0;
- opline->opcode = ZEND_SEND_VAL_EX;
- } else {
- opline->extended_value = 0;
- opline->opcode = ZEND_SEND_VAL;
- }
+ zval_dtor(val);
+ return 0;
+ case ZEND_SEND_VAR_NO_REF_EX:
+ opline->opcode = ZEND_SEND_VAL;
+ break;
+ case ZEND_SEND_USER:
+ opline->opcode = ZEND_SEND_VAL_EX;
break;
/* In most cases IS_TMP_VAR operand may be used only once.
* The operands are usually destroyed by the opcode handler.
@@ -341,11 +443,11 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
case ZEND_FREE:
case ZEND_CASE: {
zend_op *m, *n;
- int brk = op_array->last_brk_cont;
+ int brk = op_array->last_live_range;
zend_bool in_switch = 0;
while (brk--) {
- if (op_array->brk_cont_array[brk].start <= (opline - op_array->opcodes) &&
- op_array->brk_cont_array[brk].brk > (opline - op_array->opcodes)) {
+ if (op_array->live_range[brk].start <= (uint32_t)(opline - op_array->opcodes) &&
+ op_array->live_range[brk].end > (uint32_t)(opline - op_array->opcodes)) {
in_switch = 1;
break;
}
@@ -359,7 +461,13 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
}
m = opline;
- n = op_array->opcodes + op_array->brk_cont_array[brk].brk + 1;
+ n = op_array->opcodes + op_array->live_range[brk].end;
+ if (n->opcode == ZEND_FREE &&
+ !(n->extended_value & ZEND_FREE_ON_RETURN)) {
+ n++;
+ } else {
+ n = op_array->opcodes + op_array->last;
+ }
while (m < n) {
if (ZEND_OP1_TYPE(m) == type &&
ZEND_OP1(m).var == var) {
@@ -378,26 +486,40 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
m++;
}
zval_dtor(val);
+ zend_optimizer_remove_live_range(op_array, var);
return 1;
}
+ case ZEND_VERIFY_RETURN_TYPE: {
+ zend_arg_info *ret_info = op_array->arg_info - 1;
+ ZEND_ASSERT((opline + 1)->opcode == ZEND_RETURN || (opline + 1)->opcode == ZEND_RETURN_BY_REF);
+ if (ret_info->class_name
+ || ret_info->type_hint == IS_CALLABLE
+ || !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(val))
+ || (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
+ zval_dtor(val);
+ return 0;
+ }
+ MAKE_NOP(opline);
+ opline++;
+ break;
+ }
default:
break;
}
- zend_optimizer_update_op1_const(op_array, opline, val);
- break;
+ if (zend_optimizer_update_op1_const(op_array, opline, val)) {
+ zend_optimizer_remove_live_range(op_array, var);
+ return 1;
+ }
+ return 0;
}
if (ZEND_OP2_TYPE(opline) == type &&
ZEND_OP2(opline).var == var) {
- switch (opline->opcode) {
- case ZEND_ASSIGN_REF:
- zval_dtor(val);
- return 0;
- default:
- break;
+ if (zend_optimizer_update_op2_const(op_array, opline, val)) {
+ zend_optimizer_remove_live_range(op_array, var);
+ return 1;
}
- zend_optimizer_update_op2_const(op_array, opline, val);
- break;
+ return 0;
}
opline++;
}
@@ -405,6 +527,94 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array,
return 1;
}
+zend_function *zend_optimizer_get_called_func(
+ zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool rt_constants)
+{
+#define GET_OP(op) CRT_CONSTANT_EX(op_array, opline->op, rt_constants)
+ switch (opline->opcode) {
+ case ZEND_INIT_FCALL:
+ {
+ zend_string *function_name = Z_STR_P(GET_OP(op2));
+ zend_function *func;
+ if ((func = zend_hash_find_ptr(&script->function_table, function_name)) != NULL) {
+ return func;
+ } else if ((func = zend_hash_find_ptr(EG(function_table), function_name)) != NULL) {
+ ZEND_ASSERT(func->type == ZEND_INTERNAL_FUNCTION);
+ return func;
+ }
+ break;
+ }
+ case ZEND_INIT_FCALL_BY_NAME:
+ case ZEND_INIT_NS_FCALL_BY_NAME:
+ if (opline->op2_type == IS_CONST && Z_TYPE_P(GET_OP(op2)) == IS_STRING) {
+ zval *function_name = GET_OP(op2) + 1;
+ return zend_hash_find_ptr(&script->function_table, Z_STR_P(function_name));
+ }
+ break;
+ case ZEND_INIT_STATIC_METHOD_CALL:
+ if (opline->op2_type == IS_CONST && Z_TYPE_P(GET_OP(op2)) == IS_STRING) {
+ zend_class_entry *ce = NULL;
+ if (opline->op1_type == IS_CONST && Z_TYPE_P(GET_OP(op1)) == IS_STRING) {
+ zend_string *class_name = Z_STR_P(GET_OP(op1) + 1);
+ ce = zend_hash_find_ptr(&script->class_table, class_name);
+ } else if (opline->op1_type == IS_UNUSED && op_array->scope
+ && !(op_array->scope->ce_flags & ZEND_ACC_TRAIT)
+ && (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
+ ce = op_array->scope;
+ }
+ if (ce) {
+ zend_string *func_name = Z_STR_P(GET_OP(op2) + 1);
+ return zend_hash_find_ptr(&ce->function_table, func_name);
+ }
+ }
+ break;
+ case ZEND_INIT_METHOD_CALL:
+ if (opline->op1_type == IS_UNUSED
+ && opline->op2_type == IS_CONST && Z_TYPE_P(GET_OP(op2)) == IS_STRING
+ && op_array->scope && !(op_array->scope->ce_flags & ZEND_ACC_TRAIT)) {
+ zend_string *method_name = Z_STR_P(GET_OP(op2) + 1);
+ zend_function *fbc = zend_hash_find_ptr(
+ &op_array->scope->function_table, method_name);
+ if (fbc) {
+ zend_bool is_private = (fbc->common.fn_flags & ZEND_ACC_PRIVATE) != 0;
+ zend_bool is_final = (fbc->common.fn_flags & ZEND_ACC_FINAL) != 0;
+ zend_bool same_scope = fbc->common.scope == op_array->scope;
+ if ((is_private && same_scope)
+ || (is_final && (!is_private || same_scope))) {
+ return fbc;
+ }
+ }
+ }
+ break;
+ }
+ return NULL;
+#undef GET_OP
+}
+
+uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args) {
+ if (zend_string_equals_literal(name, "extract")) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "compact")) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "parse_str") && num_args <= 1) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "mb_parse_str") && num_args <= 1) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "get_defined_vars")) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "assert")) {
+ return ZEND_FUNC_INDIRECT_VAR_ACCESS;
+ } else if (zend_string_equals_literal(name, "func_num_args")) {
+ return ZEND_FUNC_VARARG;
+ } else if (zend_string_equals_literal(name, "func_get_arg")) {
+ return ZEND_FUNC_VARARG;
+ } else if (zend_string_equals_literal(name, "func_get_args")) {
+ return ZEND_FUNC_VARARG;
+ } else {
+ return 0;
+ }
+}
+
static void zend_optimize(zend_op_array *op_array,
zend_optimizer_ctx *ctx)
{
@@ -412,24 +622,33 @@ static void zend_optimize(zend_op_array *op_array,
return;
}
+ if (ctx->debug_level & ZEND_DUMP_BEFORE_OPTIMIZER) {
+ zend_dump_op_array(op_array, 0, "before optimizer", NULL);
+ }
+
/* pass 1
* - substitute persistent constants (true, false, null, etc)
* - perform compile-time evaluation of constant binary and unary operations
* - optimize series of ADD_STRING and/or ADD_CHAR
* - convert CAST(IS_BOOL,x) into BOOL(x)
+ * - pre-evaluate constant function calls
*/
- if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
+ if (ZEND_OPTIMIZER_PASS_1 & ctx->optimization_level) {
zend_optimizer_pass1(op_array, ctx);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_1) {
+ zend_dump_op_array(op_array, 0, "after pass 1", NULL);
+ }
}
/* pass 2:
* - convert non-numeric constants to numeric constants in numeric operators
* - optimize constant conditional JMPs
- * - optimize static BRKs and CONTs
- * - pre-evaluate constant function calls
*/
- if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
+ if (ZEND_OPTIMIZER_PASS_2 & ctx->optimization_level) {
zend_optimizer_pass2(op_array);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_2) {
+ zend_dump_op_array(op_array, 0, "after pass 2", NULL);
+ }
}
/* pass 3:
@@ -437,52 +656,85 @@ static void zend_optimize(zend_op_array *op_array,
* - optimize series of JMPs
* - change $i++ to ++$i where possible
*/
- if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
+ if (ZEND_OPTIMIZER_PASS_3 & ctx->optimization_level) {
zend_optimizer_pass3(op_array);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_3) {
+ zend_dump_op_array(op_array, 0, "after pass 1", NULL);
+ }
}
/* pass 4:
* - INIT_FCALL_BY_NAME -> DO_FCALL
*/
- if (ZEND_OPTIMIZER_PASS_4 & OPTIMIZATION_LEVEL) {
- optimize_func_calls(op_array, ctx);
+ if (ZEND_OPTIMIZER_PASS_4 & ctx->optimization_level) {
+ zend_optimize_func_calls(op_array, ctx);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_4) {
+ zend_dump_op_array(op_array, 0, "after pass 1", NULL);
+ }
}
/* pass 5:
* - CFG optimization
*/
- if (ZEND_OPTIMIZER_PASS_5 & OPTIMIZATION_LEVEL) {
- optimize_cfg(op_array, ctx);
+ if (ZEND_OPTIMIZER_PASS_5 & ctx->optimization_level) {
+ zend_optimize_cfg(op_array, ctx);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_5) {
+ zend_dump_op_array(op_array, 0, "after pass 5", NULL);
+ }
}
+#if HAVE_DFA_PASS
+ /* pass 6:
+ * - DFA optimization
+ */
+ if ((ZEND_OPTIMIZER_PASS_6 & ctx->optimization_level) &&
+ !(ZEND_OPTIMIZER_PASS_7 & ctx->optimization_level)) {
+ zend_optimize_dfa(op_array, ctx);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_6) {
+ zend_dump_op_array(op_array, 0, "after pass 6", NULL);
+ }
+ }
+#endif
+
/* pass 9:
* - Optimize temp variables usage
*/
- if (ZEND_OPTIMIZER_PASS_9 & OPTIMIZATION_LEVEL) {
- optimize_temporary_variables(op_array, ctx);
+ if (ZEND_OPTIMIZER_PASS_9 & ctx->optimization_level) {
+ zend_optimize_temporary_variables(op_array, ctx);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_9) {
+ zend_dump_op_array(op_array, 0, "after pass 9", NULL);
+ }
}
/* pass 10:
* - remove NOPs
*/
- if (((ZEND_OPTIMIZER_PASS_10|ZEND_OPTIMIZER_PASS_5) & OPTIMIZATION_LEVEL) == ZEND_OPTIMIZER_PASS_10) {
+ if (((ZEND_OPTIMIZER_PASS_10|ZEND_OPTIMIZER_PASS_5) & ctx->optimization_level) == ZEND_OPTIMIZER_PASS_10) {
zend_optimizer_nop_removal(op_array);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_10) {
+ zend_dump_op_array(op_array, 0, "after pass 10", NULL);
+ }
}
/* pass 11:
* - Compact literals table
*/
- if (ZEND_OPTIMIZER_PASS_11 & OPTIMIZATION_LEVEL) {
+ if (ZEND_OPTIMIZER_PASS_11 & ctx->optimization_level) {
zend_optimizer_compact_literals(op_array, ctx);
+ if (ctx->debug_level & ZEND_DUMP_AFTER_PASS_11) {
+ zend_dump_op_array(op_array, 0, "after pass 11", NULL);
+ }
+ }
+
+ if (ctx->debug_level & ZEND_DUMP_AFTER_OPTIMIZER) {
+ zend_dump_op_array(op_array, 0, "after optimizer", NULL);
}
}
-static void zend_accel_optimize(zend_op_array *op_array,
- zend_optimizer_ctx *ctx)
+static void zend_revert_pass_two(zend_op_array *op_array)
{
zend_op *opline, *end;
- /* Revert pass_two() */
opline = op_array->opcodes;
end = opline + op_array->last;
while (opline < end) {
@@ -492,42 +744,14 @@ static void zend_accel_optimize(zend_op_array *op_array,
if (opline->op2_type == IS_CONST) {
ZEND_PASS_TWO_UNDO_CONSTANT(op_array, opline->op2);
}
- switch (opline->opcode) {
- case ZEND_JMP:
- case ZEND_GOTO:
- case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
- ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, ZEND_OP1(opline));
- break;
- case ZEND_JMPZNZ:
- /* relative offset into absolute index */
- opline->extended_value = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value);
- /* break omitted intentionally */
- case ZEND_JMPZ:
- case ZEND_JMPNZ:
- case ZEND_JMPZ_EX:
- case ZEND_JMPNZ_EX:
- case ZEND_JMP_SET:
- case ZEND_COALESCE:
- case ZEND_NEW:
- case ZEND_FE_RESET_R:
- case ZEND_FE_RESET_RW:
- case ZEND_ASSERT_CHECK:
- ZEND_PASS_TWO_UNDO_JMP_TARGET(op_array, opline, ZEND_OP2(opline));
- break;
- case ZEND_FE_FETCH_R:
- case ZEND_FE_FETCH_RW:
- opline->extended_value = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value);
- break;
- }
opline++;
}
+}
- /* Do actual optimizations */
- zend_optimize(op_array, ctx);
+static void zend_redo_pass_two(zend_op_array *op_array)
+{
+ zend_op *opline, *end;
- /* Redo pass_two() */
opline = op_array->opcodes;
end = opline + op_array->last;
while (opline < end) {
@@ -537,41 +761,53 @@ static void zend_accel_optimize(zend_op_array *op_array,
if (opline->op2_type == IS_CONST) {
ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op2);
}
- switch (opline->opcode) {
- case ZEND_JMP:
- case ZEND_GOTO:
- case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
- ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, ZEND_OP1(opline));
- break;
- case ZEND_JMPZNZ:
- /* absolute index to relative offset */
- opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);
- /* break omitted intentionally */
- case ZEND_JMPZ:
- case ZEND_JMPNZ:
- case ZEND_JMPZ_EX:
- case ZEND_JMPNZ_EX:
- case ZEND_JMP_SET:
- case ZEND_COALESCE:
- case ZEND_NEW:
- case ZEND_FE_RESET_R:
- case ZEND_FE_RESET_RW:
- case ZEND_ASSERT_CHECK:
- ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, ZEND_OP2(opline));
- break;
- case ZEND_FE_FETCH_R:
- case ZEND_FE_FETCH_RW:
- opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, opline->extended_value);
- break;
- }
ZEND_VM_SET_OPCODE_HANDLER(opline);
opline++;
}
}
-static void zend_accel_adjust_fcall_stack_size(zend_op_array *op_array, zend_optimizer_ctx *ctx)
+#if HAVE_DFA_PASS
+static void zend_redo_pass_two_ex(zend_op_array *op_array, zend_ssa *ssa)
+{
+ zend_op *opline, *end;
+
+ opline = op_array->opcodes;
+ end = opline + op_array->last;
+ while (opline < end) {
+ zend_vm_set_opcode_handler_ex(opline,
+ opline->op1_type == IS_UNUSED ? 0 : (OP1_INFO() & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_KEY_ANY)),
+ opline->op2_type == IS_UNUSED ? 0 : (OP2_INFO() & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_KEY_ANY)),
+ (opline->opcode == ZEND_PRE_INC ||
+ opline->opcode == ZEND_PRE_DEC ||
+ opline->opcode == ZEND_POST_INC ||
+ opline->opcode == ZEND_POST_DEC) ?
+ ((ssa->ops[opline - op_array->opcodes].op1_def >= 0) ? (OP1_DEF_INFO() & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_KEY_ANY)) : MAY_BE_ANY) :
+ (opline->result_type == IS_UNUSED ? 0 : (RES_INFO() & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_KEY_ANY))));
+ if (opline->op1_type == IS_CONST) {
+ ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op1);
+ }
+ if (opline->op2_type == IS_CONST) {
+ ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline->op2);
+ }
+ opline++;
+ }
+}
+#endif
+
+static void zend_optimize_op_array(zend_op_array *op_array,
+ zend_optimizer_ctx *ctx)
+{
+ /* Revert pass_two() */
+ zend_revert_pass_two(op_array);
+
+ /* Do actual optimizations */
+ zend_optimize(op_array, ctx);
+
+ /* Redo pass_two() */
+ zend_redo_pass_two(op_array);
+}
+
+static void zend_adjust_fcall_stack_size(zend_op_array *op_array, zend_optimizer_ctx *ctx)
{
zend_function *func;
zend_op *opline, *end;
@@ -591,78 +827,147 @@ static void zend_accel_adjust_fcall_stack_size(zend_op_array *op_array, zend_opt
}
}
-int zend_accel_script_optimize(zend_persistent_script *script)
+#if HAVE_DFA_PASS
+static void zend_adjust_fcall_stack_size_graph(zend_op_array *op_array)
+{
+ zend_func_info *func_info = ZEND_FUNC_INFO(op_array);
+
+ if (func_info) {
+ zend_call_info *call_info =func_info->callee_info;
+
+ while (call_info) {
+ zend_op *opline = call_info->caller_init_opline;
+
+ if (opline && call_info->callee_func && opline->opcode == ZEND_INIT_FCALL) {
+ opline->op1.num = zend_vm_calc_used_stack(opline->extended_value, call_info->callee_func);
+ }
+ call_info = call_info->next_callee;
+ }
+ }
+}
+#endif
+
+int zend_optimize_script(zend_script *script, zend_long optimization_level, zend_long debug_level)
{
- uint idx, j;
- Bucket *p, *q;
zend_class_entry *ce;
zend_op_array *op_array;
+ zend_string *name;
zend_optimizer_ctx ctx;
+#if HAVE_DFA_PASS
+ zend_call_graph call_graph;
+#endif
ctx.arena = zend_arena_create(64 * 1024);
ctx.script = script;
ctx.constants = NULL;
+ ctx.optimization_level = optimization_level;
+ ctx.debug_level = debug_level;
- zend_accel_optimize(&script->main_op_array, &ctx);
+ zend_optimize_op_array(&script->main_op_array, &ctx);
- for (idx = 0; idx < script->function_table.nNumUsed; idx++) {
- p = script->function_table.arData + idx;
- if (Z_TYPE(p->val) == IS_UNDEF) continue;
- op_array = (zend_op_array*)Z_PTR(p->val);
- zend_accel_optimize(op_array, &ctx);
- }
+ ZEND_HASH_FOREACH_PTR(&script->function_table, op_array) {
+ zend_optimize_op_array(op_array, &ctx);
+ } ZEND_HASH_FOREACH_END();
- for (idx = 0; idx < script->class_table.nNumUsed; idx++) {
- p = script->class_table.arData + idx;
- if (Z_TYPE(p->val) == IS_UNDEF) continue;
- ce = (zend_class_entry*)Z_PTR(p->val);
- for (j = 0; j < ce->function_table.nNumUsed; j++) {
- q = ce->function_table.arData + j;
- if (Z_TYPE(q->val) == IS_UNDEF) continue;
- op_array = (zend_op_array*)Z_PTR(q->val);
+ ZEND_HASH_FOREACH_PTR(&script->class_table, ce) {
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, name, op_array) {
if (op_array->scope == ce) {
- zend_accel_optimize(op_array, &ctx);
+ zend_optimize_op_array(op_array, &ctx);
} else if (op_array->type == ZEND_USER_FUNCTION) {
zend_op_array *orig_op_array;
- if ((orig_op_array = zend_hash_find_ptr(&op_array->scope->function_table, q->key)) != NULL) {
+ if ((orig_op_array = zend_hash_find_ptr(&op_array->scope->function_table, name)) != NULL) {
HashTable *ht = op_array->static_variables;
*op_array = *orig_op_array;
op_array->static_variables = ht;
}
}
+ } ZEND_HASH_FOREACH_END();
+ } ZEND_HASH_FOREACH_END();
+
+#if HAVE_DFA_PASS
+ if ((ZEND_OPTIMIZER_PASS_6 & optimization_level) &&
+ (ZEND_OPTIMIZER_PASS_7 & optimization_level) &&
+ zend_build_call_graph(&ctx.arena, script, ZEND_RT_CONSTANTS, &call_graph) == SUCCESS) {
+ /* Optimize using call-graph */
+ void *checkpoint = zend_arena_checkpoint(ctx.arena);
+ int i;
+ zend_func_info *func_info;
+
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ zend_revert_pass_two(call_graph.op_arrays[i]);
+ }
+
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ if (call_graph.op_arrays[i]->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
+ func_info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
+ if (func_info) {
+ zend_init_func_return_info(call_graph.op_arrays[i], script, &func_info->return_info);
+ }
+ }
}
- }
- if (ZEND_OPTIMIZER_PASS_12 & OPTIMIZATION_LEVEL) {
- zend_accel_adjust_fcall_stack_size(&script->main_op_array, &ctx);
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ func_info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
+ if (func_info) {
+ zend_dfa_analyze_op_array(call_graph.op_arrays[i], &ctx, &func_info->ssa, &func_info->flags);
+ }
+ }
- for (idx = 0; idx < script->function_table.nNumUsed; idx++) {
- p = script->function_table.arData + idx;
- if (Z_TYPE(p->val) == IS_UNDEF) continue;
- op_array = (zend_op_array*)Z_PTR(p->val);
- zend_accel_adjust_fcall_stack_size(op_array, &ctx);
+ //TODO: perform inner-script inference???
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ func_info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
+ if (func_info) {
+ zend_dfa_optimize_op_array(call_graph.op_arrays[i], &ctx, &func_info->ssa);
+ }
}
- for (idx = 0; idx < script->class_table.nNumUsed; idx++) {
- p = script->class_table.arData + idx;
- if (Z_TYPE(p->val) == IS_UNDEF) continue;
- ce = (zend_class_entry*)Z_PTR(p->val);
- for (j = 0; j < ce->function_table.nNumUsed; j++) {
- q = ce->function_table.arData + j;
- if (Z_TYPE(q->val) == IS_UNDEF) continue;
- op_array = (zend_op_array*)Z_PTR(q->val);
+ if (debug_level & ZEND_DUMP_AFTER_PASS_7) {
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ zend_dump_op_array(call_graph.op_arrays[i], 0, "after pass 7", NULL);
+ }
+ }
+
+ if (ZEND_OPTIMIZER_PASS_12 & optimization_level) {
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ zend_adjust_fcall_stack_size_graph(call_graph.op_arrays[i]);
+ }
+ }
+
+ for (i = 0; i < call_graph.op_arrays_count; i++) {
+ func_info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
+ if (func_info && func_info->ssa.var_info) {
+ zend_redo_pass_two_ex(call_graph.op_arrays[i], &func_info->ssa);
+ ZEND_SET_FUNC_INFO(call_graph.op_arrays[i], NULL);
+ } else {
+ zend_redo_pass_two(call_graph.op_arrays[i]);
+ }
+ }
+
+ zend_arena_release(&ctx.arena, checkpoint);
+ } else
+#endif
+
+ if (ZEND_OPTIMIZER_PASS_12 & optimization_level) {
+ zend_adjust_fcall_stack_size(&script->main_op_array, &ctx);
+
+ ZEND_HASH_FOREACH_PTR(&script->function_table, op_array) {
+ zend_adjust_fcall_stack_size(op_array, &ctx);
+ } ZEND_HASH_FOREACH_END();
+
+ ZEND_HASH_FOREACH_PTR(&script->class_table, ce) {
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, name, op_array) {
if (op_array->scope == ce) {
- zend_accel_adjust_fcall_stack_size(op_array, &ctx);
+ zend_adjust_fcall_stack_size(op_array, &ctx);
} else if (op_array->type == ZEND_USER_FUNCTION) {
zend_op_array *orig_op_array;
- if ((orig_op_array = zend_hash_find_ptr(&op_array->scope->function_table, q->key)) != NULL) {
+ if ((orig_op_array = zend_hash_find_ptr(&op_array->scope->function_table, name)) != NULL) {
HashTable *ht = op_array->static_variables;
*op_array = *orig_op_array;
op_array->static_variables = ht;
}
}
- }
- }
+ } ZEND_HASH_FOREACH_END();
+ } ZEND_HASH_FOREACH_END();
}
if (ctx.constants) {
@@ -672,3 +977,21 @@ int zend_accel_script_optimize(zend_persistent_script *script)
return 1;
}
+
+int zend_optimizer_startup(void)
+{
+ return zend_func_info_startup();
+}
+
+int zend_optimizer_shutdown(void)
+{
+ return zend_func_info_shutdown();
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_optimizer.h b/ext/opcache/Optimizer/zend_optimizer.h
index 27c6159b7d..1492d09b36 100644
--- a/ext/opcache/Optimizer/zend_optimizer.h
+++ b/ext/opcache/Optimizer/zend_optimizer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -30,8 +30,8 @@
#define ZEND_OPTIMIZER_PASS_3 (1<<2) /* ++, +=, series of jumps */
#define ZEND_OPTIMIZER_PASS_4 (1<<3) /* INIT_FCALL_BY_NAME -> DO_FCALL */
#define ZEND_OPTIMIZER_PASS_5 (1<<4) /* CFG based optimization */
-#define ZEND_OPTIMIZER_PASS_6 (1<<5)
-#define ZEND_OPTIMIZER_PASS_7 (1<<6)
+#define ZEND_OPTIMIZER_PASS_6 (1<<5) /* DFA based optimization */
+#define ZEND_OPTIMIZER_PASS_7 (1<<6) /* CALL GRAPH optimization */
#define ZEND_OPTIMIZER_PASS_8 (1<<7)
#define ZEND_OPTIMIZER_PASS_9 (1<<8) /* TMP VAR usage */
#define ZEND_OPTIMIZER_PASS_10 (1<<9) /* NOP removal */
@@ -39,9 +39,53 @@
#define ZEND_OPTIMIZER_PASS_12 (1<<11) /* Adjust used stack */
#define ZEND_OPTIMIZER_PASS_13 (1<<12)
#define ZEND_OPTIMIZER_PASS_14 (1<<13)
+#define ZEND_OPTIMIZER_PASS_15 (1<<14) /* Collect constants */
-#define ZEND_OPTIMIZER_ALL_PASSES 0xFFFFFFFF
+#define ZEND_OPTIMIZER_ALL_PASSES 0x7FFFFFFF
-#define DEFAULT_OPTIMIZATION_LEVEL "0xFFFFFFFF"
+#define DEFAULT_OPTIMIZATION_LEVEL "0x7FFFBFFF"
+
+
+#define ZEND_DUMP_AFTER_PASS_1 ZEND_OPTIMIZER_PASS_1
+#define ZEND_DUMP_AFTER_PASS_2 ZEND_OPTIMIZER_PASS_2
+#define ZEND_DUMP_AFTER_PASS_3 ZEND_OPTIMIZER_PASS_3
+#define ZEND_DUMP_AFTER_PASS_4 ZEND_OPTIMIZER_PASS_4
+#define ZEND_DUMP_AFTER_PASS_5 ZEND_OPTIMIZER_PASS_5
+#define ZEND_DUMP_AFTER_PASS_6 ZEND_OPTIMIZER_PASS_6
+#define ZEND_DUMP_AFTER_PASS_7 ZEND_OPTIMIZER_PASS_7
+#define ZEND_DUMP_AFTER_PASS_8 ZEND_OPTIMIZER_PASS_8
+#define ZEND_DUMP_AFTER_PASS_9 ZEND_OPTIMIZER_PASS_9
+#define ZEND_DUMP_AFTER_PASS_10 ZEND_OPTIMIZER_PASS_10
+#define ZEND_DUMP_AFTER_PASS_11 ZEND_OPTIMIZER_PASS_11
+#define ZEND_DUMP_AFTER_PASS_12 ZEND_OPTIMIZER_PASS_12
+#define ZEND_DUMP_AFTER_PASS_13 ZEND_OPTIMIZER_PASS_13
+#define ZEND_DUMP_AFTER_PASS_14 ZEND_OPTIMIZER_PASS_14
+
+#define ZEND_DUMP_BEFORE_OPTIMIZER (1<<16)
+#define ZEND_DUMP_AFTER_OPTIMIZER (1<<17)
+
+#define ZEND_DUMP_BEFORE_BLOCK_PASS (1<<18)
+#define ZEND_DUMP_AFTER_BLOCK_PASS (1<<19)
+#define ZEND_DUMP_BLOCK_PASS_VARS (1<<20)
+
+#define ZEND_DUMP_BEFORE_DFA_PASS (1<<21)
+#define ZEND_DUMP_AFTER_DFA_PASS (1<<22)
+#define ZEND_DUMP_DFA_CFG (1<<23)
+#define ZEND_DUMP_DFA_DOMINATORS (1<<24)
+#define ZEND_DUMP_DFA_LIVENESS (1<<25)
+#define ZEND_DUMP_DFA_PHI (1<<26)
+#define ZEND_DUMP_DFA_SSA (1<<27)
+#define ZEND_DUMP_DFA_SSA_VARS (1<<28)
+
+typedef struct _zend_script {
+ zend_string *filename;
+ zend_op_array main_op_array;
+ HashTable function_table;
+ HashTable class_table;
+} zend_script;
+
+int zend_optimize_script(zend_script *script, zend_long optimization_level, zend_long debug_level);
+int zend_optimizer_startup(void);
+int zend_optimizer_shutdown(void);
#endif
diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h
index c2f97ff715..e2e9823c78 100644
--- a/ext/opcache/Optimizer/zend_optimizer_internal.h
+++ b/ext/opcache/Optimizer/zend_optimizer_internal.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,18 @@
#ifndef ZEND_OPTIMIZER_INTERNAL_H
#define ZEND_OPTIMIZER_INTERNAL_H
-#include "ZendAccelerator.h"
+#include "zend_ssa.h"
+
+#define ZEND_RESULT_TYPE(opline) (opline)->result_type
+#define ZEND_RESULT(opline) (opline)->result
+#define ZEND_OP1_TYPE(opline) (opline)->op1_type
+#define ZEND_OP1(opline) (opline)->op1
+#define ZEND_OP1_LITERAL(opline) (op_array)->literals[(opline)->op1.constant]
+#define ZEND_OP1_JMP_ADDR(opline) OP_JMP_ADDR(opline, (opline)->op1)
+#define ZEND_OP2_TYPE(opline) (opline)->op2_type
+#define ZEND_OP2(opline) (opline)->op2
+#define ZEND_OP2_LITERAL(opline) (op_array)->literals[(opline)->op2.constant]
+#define ZEND_OP2_JMP_ADDR(opline) OP_JMP_ADDR(opline, (opline)->op2)
#define VAR_NUM(v) EX_VAR_TO_NUM(v)
#define NUM_VAR(v) ((uint32_t)(zend_uintptr_t)ZEND_CALL_VAR_NUM(0, v))
@@ -32,62 +43,17 @@
#define INV_COND_EX(op) ((op) == ZEND_JMPZ ? ZEND_JMPNZ_EX : ZEND_JMPZ_EX)
#define INV_EX_COND_EX(op) ((op) == ZEND_JMPZ_EX ? ZEND_JMPNZ_EX : ZEND_JMPZ_EX)
-#undef MAKE_NOP
-
-#define MAKE_NOP(opline) do { \
- (opline)->opcode = ZEND_NOP; \
- memset(&(opline)->result, 0, sizeof((opline)->result)); \
- memset(&(opline)->op1, 0, sizeof((opline)->op1)); \
- memset(&(opline)->op2, 0, sizeof((opline)->op2)); \
- (opline)->result_type = (opline)->op1_type = (opline)->op2_type=IS_UNUSED; \
- zend_vm_set_opcode_handler(opline); \
-} while (0);
-#define RESULT_USED(op) (((op->result_type & IS_VAR) && !(op->result_type & EXT_TYPE_UNUSED)) || op->result_type == IS_TMP_VAR)
-#define RESULT_UNUSED(op) ((op->result_type & EXT_TYPE_UNUSED) != 0)
-#define SAME_VAR(op1, op2) ((((op1 ## _type & IS_VAR) && (op2 ## _type & IS_VAR)) || (op1 ## _type == IS_TMP_VAR && op2 ## _type == IS_TMP_VAR)) && op1.var == op2.var)
+#define RESULT_UNUSED(op) (op->result_type == IS_UNUSED)
+#define SAME_VAR(op1, op2) (op1 ## _type == op2 ## _type && op1.var == op2.var)
typedef struct _zend_optimizer_ctx {
zend_arena *arena;
- zend_persistent_script *script;
+ zend_script *script;
HashTable *constants;
+ zend_long optimization_level;
+ zend_long debug_level;
} zend_optimizer_ctx;
-typedef struct _zend_code_block zend_code_block;
-typedef struct _zend_block_source zend_block_source;
-
-struct _zend_code_block {
- int access;
- zend_op *start_opline;
- int start_opline_no;
- int len;
- zend_code_block *op1_to;
- zend_code_block *op2_to;
- zend_code_block *ext_to;
- zend_code_block *follow_to;
- zend_code_block *next;
- zend_block_source *sources;
- zend_bool protected; /* don't merge this block with others */
-};
-
-typedef struct _zend_cfg {
- zend_code_block *blocks;
- zend_code_block **try;
- zend_code_block **catch;
- zend_code_block **loop_start;
- zend_code_block **loop_cont;
- zend_code_block **loop_brk;
- zend_op **Tsource;
- char *same_t;
-} zend_cfg;
-
-struct _zend_block_source {
- zend_code_block *from;
- zend_block_source *next;
-};
-
-#define OPTIMIZATION_LEVEL \
- ZCG(accel_directives).optimization_level
-
#define LITERAL_LONG(op, val) do { \
zval _c; \
ZVAL_LONG(&_c, val); \
@@ -115,26 +81,33 @@ int zend_optimizer_get_persistent_constant(zend_string *name, zval *result, int
void zend_optimizer_collect_constant(zend_optimizer_ctx *ctx, zval *name, zval* value);
int zend_optimizer_get_collected_constant(HashTable *constants, zval *name, zval* value);
int zend_optimizer_lookup_cv(zend_op_array *op_array, zend_string* name);
-void zend_optimizer_update_op1_const(zend_op_array *op_array,
- zend_op *opline,
- zval *val);
-void zend_optimizer_update_op2_const(zend_op_array *op_array,
- zend_op *opline,
- zval *val);
+int zend_optimizer_update_op1_const(zend_op_array *op_array,
+ zend_op *opline,
+ zval *val);
+int zend_optimizer_update_op2_const(zend_op_array *op_array,
+ zend_op *opline,
+ zval *val);
int zend_optimizer_replace_by_const(zend_op_array *op_array,
zend_op *opline,
zend_uchar type,
uint32_t var,
zval *val);
+void zend_optimizer_remove_live_range(zend_op_array *op_array, uint32_t var);
void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx);
void zend_optimizer_pass2(zend_op_array *op_array);
void zend_optimizer_pass3(zend_op_array *op_array);
-void optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx);
-void optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx);
-void optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx);
+void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx);
+void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx);
+void zend_optimize_dfa(zend_op_array *op_array, zend_optimizer_ctx *ctx);
+int zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa, uint32_t *flags);
+void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa);
+void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx);
void zend_optimizer_nop_removal(zend_op_array *op_array);
void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx *ctx);
int zend_optimizer_is_disabled_func(const char *name, size_t len);
+zend_function *zend_optimizer_get_called_func(
+ zend_script *script, zend_op_array *op_array, zend_op *opline, zend_bool rt_constants);
+uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args);
#endif
diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c
new file mode 100644
index 0000000000..fc55acf527
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_ssa.c
@@ -0,0 +1,1103 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, SSA - Static Single Assignment Form |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#include "php.h"
+#include "zend_compile.h"
+#include "zend_dfg.h"
+#include "zend_ssa.h"
+#include "zend_dump.h"
+#include "zend_inference.h"
+
+static zend_bool dominates(const zend_basic_block *blocks, int a, int b) {
+ while (blocks[b].level > blocks[a].level) {
+ b = blocks[b].idom;
+ }
+ return a == b;
+}
+
+static zend_bool dominates_other_predecessors(
+ const zend_cfg *cfg, const zend_basic_block *block, int check, int exclude) {
+ int i;
+ for (i = 0; i < block->predecessors_count; i++) {
+ int predecessor = cfg->predecessors[block->predecessor_offset + i];
+ if (predecessor != exclude && !dominates(cfg->blocks, check, predecessor)) {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */
+{
+ zend_basic_block *from_block, *to_block;
+ int other_successor;
+
+ if (!DFG_ISSET(dfg->in, dfg->size, to, var)) {
+ /* Variable is not live, certainly won't benefit from pi */
+ return 0;
+ }
+
+ to_block = &ssa->cfg.blocks[to];
+ if (to_block->predecessors_count == 1) {
+ /* Always place pi if one predecessor (an if branch) */
+ return 1;
+ }
+
+ /* Check that the other successor of the from block does not dominate all other predecessors.
+ * If it does, we'd probably end up annihilating a positive+negative pi assertion. */
+ from_block = &ssa->cfg.blocks[from];
+ other_successor = from_block->successors[0] == to
+ ? from_block->successors[1] : from_block->successors[0];
+ return !dominates_other_predecessors(&ssa->cfg, to_block, other_successor, from);
+}
+/* }}} */
+
+static zend_ssa_phi *add_pi(
+ zend_arena **arena, const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa,
+ int from, int to, int var) /* {{{ */
+{
+ zend_ssa_phi *phi;
+ if (!needs_pi(op_array, dfg, ssa, from, to, var)) {
+ return NULL;
+ }
+
+ phi = zend_arena_calloc(arena, 1,
+ sizeof(zend_ssa_phi) +
+ sizeof(int) * ssa->cfg.blocks[to].predecessors_count +
+ sizeof(void*) * ssa->cfg.blocks[to].predecessors_count);
+ phi->sources = (int*)(((char*)phi) + sizeof(zend_ssa_phi));
+ memset(phi->sources, 0xff, sizeof(int) * ssa->cfg.blocks[to].predecessors_count);
+ phi->use_chains = (zend_ssa_phi**)(((char*)phi->sources) + sizeof(int) * ssa->cfg.blocks[to].predecessors_count);
+
+ phi->pi = from;
+ phi->var = var;
+ phi->ssa_var = -1;
+ phi->next = ssa->blocks[to].phis;
+ ssa->blocks[to].phis = phi;
+
+ /* Block "to" now defines "var" via the pi statement, so add it to the "def" set. Note that
+ * this is not entirely accurate, because the pi is actually placed along the edge from->to.
+ * If there is a back-edge to "to" this may result in non-minimal SSA form. */
+ DFG_SET(dfg->def, dfg->size, to, var);
+
+ /* If there are multiple predecessors in the target block, we need to place a phi there.
+ * However this can (generally) not be expressed in terms of dominance frontiers, so place it
+ * explicitly. dfg->use here really is dfg->phi, we're reusing the set. */
+ if (ssa->cfg.blocks[to].predecessors_count > 1) {
+ DFG_SET(dfg->use, dfg->size, to, var);
+ }
+
+ return phi;
+}
+/* }}} */
+
+static void pi_range(
+ zend_ssa_phi *phi, int min_var, int max_var, zend_long min, zend_long max,
+ char underflow, char overflow, char negative) /* {{{ */
+{
+ phi->constraint.min_var = min_var;
+ phi->constraint.max_var = max_var;
+ phi->constraint.min_ssa_var = -1;
+ phi->constraint.max_ssa_var = -1;
+ phi->constraint.range.min = min;
+ phi->constraint.range.max = max;
+ phi->constraint.range.underflow = underflow;
+ phi->constraint.range.overflow = overflow;
+ phi->constraint.negative = negative ? NEG_INIT : NEG_NONE;
+ phi->constraint.type_mask = (uint32_t) -1;
+}
+/* }}} */
+
+static inline void pi_range_equals(zend_ssa_phi *phi, int var, zend_long val) {
+ pi_range(phi, var, var, val, val, 0, 0, 0);
+}
+static inline void pi_range_not_equals(zend_ssa_phi *phi, int var, zend_long val) {
+ pi_range(phi, var, var, val, val, 0, 0, 1);
+}
+static inline void pi_range_min(zend_ssa_phi *phi, int var, zend_long val) {
+ pi_range(phi, var, -1, val, ZEND_LONG_MAX, 0, 1, 0);
+}
+static inline void pi_range_max(zend_ssa_phi *phi, int var, zend_long val) {
+ pi_range(phi, -1, var, ZEND_LONG_MIN, val, 1, 0, 0);
+}
+
+static void pi_type_mask(zend_ssa_phi *phi, uint32_t type_mask) {
+ phi->constraint.type_mask = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN;
+ phi->constraint.type_mask |= type_mask;
+ if (type_mask & MAY_BE_NULL) {
+ phi->constraint.type_mask |= MAY_BE_UNDEF;
+ }
+}
+static inline void pi_not_type_mask(zend_ssa_phi *phi, uint32_t type_mask) {
+ uint32_t relevant = MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ pi_type_mask(phi, ~type_mask & relevant);
+}
+static inline uint32_t mask_for_type_check(uint32_t type) {
+ if (type == _IS_BOOL) {
+ return MAY_BE_TRUE|MAY_BE_FALSE;
+ } else if (type == IS_ARRAY) {
+ return MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ } else {
+ return 1 << type;
+ }
+}
+
+/* We can interpret $a + 5 == 0 as $a = 0 - 5, i.e. shift the adjustment to the other operand.
+ * This negated adjustment is what is written into the "adjustment" parameter. */
+static int find_adjusted_tmp_var(const zend_op_array *op_array, uint32_t build_flags, zend_op *opline, uint32_t var_num, zend_long *adjustment) /* {{{ */
+{
+ zend_op *op = opline;
+ while (op != op_array->opcodes) {
+ op--;
+ if (op->result_type != IS_TMP_VAR || op->result.var != var_num) {
+ continue;
+ }
+
+ if (op->opcode == ZEND_POST_DEC) {
+ if (op->op1_type == IS_CV) {
+ *adjustment = -1;
+ return EX_VAR_TO_NUM(op->op1.var);
+ }
+ } else if (op->opcode == ZEND_POST_INC) {
+ if (op->op1_type == IS_CV) {
+ *adjustment = 1;
+ return EX_VAR_TO_NUM(op->op1.var);
+ }
+ } else if (op->opcode == ZEND_ADD) {
+ if (op->op1_type == IS_CV &&
+ op->op2_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT(op->op2)) == IS_LONG &&
+ Z_LVAL_P(CRT_CONSTANT(op->op2)) != ZEND_LONG_MIN) {
+ *adjustment = -Z_LVAL_P(CRT_CONSTANT(op->op2));
+ return EX_VAR_TO_NUM(op->op1.var);
+ } else if (op->op2_type == IS_CV &&
+ op->op1_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT(op->op1)) == IS_LONG &&
+ Z_LVAL_P(CRT_CONSTANT(op->op1)) != ZEND_LONG_MIN) {
+ *adjustment = -Z_LVAL_P(CRT_CONSTANT(op->op1));
+ return EX_VAR_TO_NUM(op->op2.var);
+ }
+ } else if (op->opcode == ZEND_SUB) {
+ if (op->op1_type == IS_CV &&
+ op->op2_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT(op->op2)) == IS_LONG) {
+ *adjustment = Z_LVAL_P(CRT_CONSTANT(op->op2));
+ return EX_VAR_TO_NUM(op->op1.var);
+ }
+ }
+ break;
+ }
+ return -1;
+}
+/* }}} */
+
+static inline zend_bool add_will_overflow(zend_long a, zend_long b) {
+ return (b > 0 && a > ZEND_LONG_MAX - b)
+ || (b < 0 && a < ZEND_LONG_MIN - b);
+}
+static inline zend_bool sub_will_overflow(zend_long a, zend_long b) {
+ return (b > 0 && a < ZEND_LONG_MIN + b)
+ || (b < 0 && a > ZEND_LONG_MAX + b);
+}
+
+/* e-SSA construction: Pi placement (Pi is actually a Phi with single
+ * source and constraint).
+ * Order of Phis is importent, Pis must be placed before Phis
+ */
+static void place_essa_pis(
+ zend_arena **arena, const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa,
+ zend_dfg *dfg) /* {{{ */ {
+ zend_basic_block *blocks = ssa->cfg.blocks;
+ int j, blocks_count = ssa->cfg.blocks_count;
+ for (j = 0; j < blocks_count; j++) {
+ zend_ssa_phi *pi;
+ zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1;
+ int bt; /* successor block number if a condition is true */
+ int bf; /* successor block number if a condition is false */
+
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0 || blocks[j].len == 0) {
+ continue;
+ }
+ /* the last instruction of basic block is conditional branch,
+ * based on comparison of CV(s)
+ */
+ switch (opline->opcode) {
+ case ZEND_JMPZ:
+ case ZEND_JMPZNZ:
+ bf = blocks[j].successors[0];
+ bt = blocks[j].successors[1];
+ break;
+ case ZEND_JMPNZ:
+ bt = blocks[j].successors[0];
+ bf = blocks[j].successors[1];
+ break;
+ default:
+ continue;
+ }
+ if (opline->op1_type == IS_TMP_VAR &&
+ ((opline-1)->opcode == ZEND_IS_EQUAL ||
+ (opline-1)->opcode == ZEND_IS_NOT_EQUAL ||
+ (opline-1)->opcode == ZEND_IS_SMALLER ||
+ (opline-1)->opcode == ZEND_IS_SMALLER_OR_EQUAL) &&
+ opline->op1.var == (opline-1)->result.var) {
+ int var1 = -1;
+ int var2 = -1;
+ zend_long val1 = 0;
+ zend_long val2 = 0;
+// long val = 0;
+
+ if ((opline-1)->op1_type == IS_CV) {
+ var1 = EX_VAR_TO_NUM((opline-1)->op1.var);
+ } else if ((opline-1)->op1_type == IS_TMP_VAR) {
+ var1 = find_adjusted_tmp_var(
+ op_array, build_flags, opline, (opline-1)->op1.var, &val2);
+ }
+
+ if ((opline-1)->op2_type == IS_CV) {
+ var2 = EX_VAR_TO_NUM((opline-1)->op2.var);
+ } else if ((opline-1)->op2_type == IS_TMP_VAR) {
+ var2 = find_adjusted_tmp_var(
+ op_array, build_flags, opline, (opline-1)->op2.var, &val1);
+ }
+
+ if (var1 >= 0 && var2 >= 0) {
+ if (!sub_will_overflow(val1, val2) && !sub_will_overflow(val2, val1)) {
+ zend_long tmp = val1;
+ val1 -= val2;
+ val2 -= tmp;
+ } else {
+ var1 = -1;
+ var2 = -1;
+ }
+ } else if (var1 >= 0 && var2 < 0) {
+ zend_long add_val2 = 0;
+ if ((opline-1)->op2_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT((opline-1)->op2)) == IS_LONG) {
+ add_val2 = Z_LVAL_P(CRT_CONSTANT((opline-1)->op2));
+ } else if ((opline-1)->op2_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT((opline-1)->op2)) == IS_FALSE) {
+ add_val2 = 0;
+ } else if ((opline-1)->op2_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT((opline-1)->op2)) == IS_TRUE) {
+ add_val2 = 1;
+ } else {
+ var1 = -1;
+ }
+ if (!add_will_overflow(val2, add_val2)) {
+ val2 += add_val2;
+ } else {
+ var1 = -1;
+ }
+ } else if (var1 < 0 && var2 >= 0) {
+ zend_long add_val1 = 0;
+ if ((opline-1)->op1_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT((opline-1)->op1)) == IS_LONG) {
+ add_val1 = Z_LVAL_P(CRT_CONSTANT((opline-1)->op1));
+ } else if ((opline-1)->op1_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT((opline-1)->op1)) == IS_FALSE) {
+ add_val1 = 0;
+ } else if ((opline-1)->op1_type == IS_CONST &&
+ Z_TYPE_P(CRT_CONSTANT((opline-1)->op1)) == IS_TRUE) {
+ add_val1 = 1;
+ } else {
+ var2 = -1;
+ }
+ if (!add_will_overflow(val1, add_val1)) {
+ val1 += add_val1;
+ } else {
+ var2 = -1;
+ }
+ }
+
+ if (var1 >= 0) {
+ if ((opline-1)->opcode == ZEND_IS_EQUAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) {
+ pi_range_equals(pi, var2, val2);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) {
+ pi_range_not_equals(pi, var2, val2);
+ }
+ } else if ((opline-1)->opcode == ZEND_IS_NOT_EQUAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) {
+ pi_range_equals(pi, var2, val2);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) {
+ pi_range_not_equals(pi, var2, val2);
+ }
+ } else if ((opline-1)->opcode == ZEND_IS_SMALLER) {
+ if (val2 > ZEND_LONG_MIN) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) {
+ pi_range_max(pi, var2, val2-1);
+ }
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) {
+ pi_range_min(pi, var2, val2);
+ }
+ } else if ((opline-1)->opcode == ZEND_IS_SMALLER_OR_EQUAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) {
+ pi_range_max(pi, var2, val2);
+ }
+ if (val2 < ZEND_LONG_MAX) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) {
+ pi_range_min(pi, var2, val2+1);
+ }
+ }
+ }
+ }
+ if (var2 >= 0) {
+ if((opline-1)->opcode == ZEND_IS_EQUAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) {
+ pi_range_equals(pi, var1, val1);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) {
+ pi_range_not_equals(pi, var1, val1);
+ }
+ } else if ((opline-1)->opcode == ZEND_IS_NOT_EQUAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) {
+ pi_range_equals(pi, var1, val1);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) {
+ pi_range_not_equals(pi, var1, val1);
+ }
+ } else if ((opline-1)->opcode == ZEND_IS_SMALLER) {
+ if (val1 < ZEND_LONG_MAX) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) {
+ pi_range_min(pi, var1, val1+1);
+ }
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) {
+ pi_range_max(pi, var1, val1);
+ }
+ } else if ((opline-1)->opcode == ZEND_IS_SMALLER_OR_EQUAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) {
+ pi_range_min(pi, var1, val1);
+ }
+ if (val1 > ZEND_LONG_MIN) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) {
+ pi_range_max(pi, var1, val1-1);
+ }
+ }
+ }
+ }
+ } else if (opline->op1_type == IS_TMP_VAR &&
+ ((opline-1)->opcode == ZEND_POST_INC ||
+ (opline-1)->opcode == ZEND_POST_DEC) &&
+ opline->op1.var == (opline-1)->result.var &&
+ (opline-1)->op1_type == IS_CV) {
+ int var = EX_VAR_TO_NUM((opline-1)->op1.var);
+
+ if ((opline-1)->opcode == ZEND_POST_DEC) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) {
+ pi_range_equals(pi, -1, -1);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) {
+ pi_range_not_equals(pi, -1, -1);
+ }
+ } else if ((opline-1)->opcode == ZEND_POST_INC) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) {
+ pi_range_equals(pi, -1, 1);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) {
+ pi_range_not_equals(pi, -1, 1);
+ }
+ }
+ } else if (opline->op1_type == IS_VAR &&
+ ((opline-1)->opcode == ZEND_PRE_INC ||
+ (opline-1)->opcode == ZEND_PRE_DEC) &&
+ opline->op1.var == (opline-1)->result.var &&
+ (opline-1)->op1_type == IS_CV) {
+ int var = EX_VAR_TO_NUM((opline-1)->op1.var);
+
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) {
+ pi_range_equals(pi, -1, 0);
+ }
+ /* speculative */
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) {
+ pi_range_not_equals(pi, -1, 0);
+ }
+ } else if (opline->op1_type == IS_TMP_VAR && (opline-1)->opcode == ZEND_TYPE_CHECK &&
+ opline->op1.var == (opline-1)->result.var && (opline-1)->op1_type == IS_CV) {
+ int var = EX_VAR_TO_NUM((opline-1)->op1.var);
+ uint32_t type = (opline-1)->extended_value;
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) {
+ pi_type_mask(pi, mask_for_type_check(type));
+ }
+ if (type != IS_OBJECT && type != IS_RESOURCE) {
+ /* is_object() and is_resource() may return false, even though the value is
+ * an object/resource. */
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) {
+ pi_not_type_mask(pi, mask_for_type_check(type));
+ }
+ }
+ } else if (opline->op1_type == IS_TMP_VAR &&
+ ((opline-1)->opcode == ZEND_IS_IDENTICAL
+ || (opline-1)->opcode == ZEND_IS_NOT_IDENTICAL) &&
+ opline->op1.var == (opline-1)->result.var) {
+ int var;
+ zval *val;
+ uint32_t type_mask;
+ if ((opline-1)->op1_type == IS_CV && (opline-1)->op2_type == IS_CONST) {
+ var = EX_VAR_TO_NUM((opline-1)->op1.var);
+ val = CRT_CONSTANT((opline-1)->op2);
+ } else if ((opline-1)->op1_type == IS_CONST && (opline-1)->op2_type == IS_CV) {
+ var = EX_VAR_TO_NUM((opline-1)->op2.var);
+ val = CRT_CONSTANT((opline-1)->op1);
+ } else {
+ continue;
+ }
+
+ /* We're interested in === null/true/false comparisons here, because they eliminate
+ * a type in the false-branch. Other === VAL comparisons are unlikely to be useful. */
+ if (Z_TYPE_P(val) != IS_NULL && Z_TYPE_P(val) != IS_TRUE && Z_TYPE_P(val) != IS_FALSE) {
+ continue;
+ }
+
+ type_mask = _const_op_type(val);
+ if ((opline-1)->opcode == ZEND_IS_IDENTICAL) {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) {
+ pi_type_mask(pi, type_mask);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) {
+ pi_not_type_mask(pi, type_mask);
+ }
+ } else {
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) {
+ pi_type_mask(pi, type_mask);
+ }
+ if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) {
+ pi_not_type_mask(pi, type_mask);
+ }
+ }
+ }
+ }
+}
+/* }}} */
+
+static int zend_ssa_rename(const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa, int *var, int n) /* {{{ */
+{
+ zend_basic_block *blocks = ssa->cfg.blocks;
+ zend_ssa_block *ssa_blocks = ssa->blocks;
+ zend_ssa_op *ssa_ops = ssa->ops;
+ int ssa_vars_count = ssa->vars_count;
+ int i, j;
+ zend_op *opline, *end;
+ int *tmp = NULL;
+ ALLOCA_FLAG(use_heap);
+
+ // FIXME: Can we optimize this copying out in some cases?
+ if (blocks[n].next_child >= 0) {
+ tmp = do_alloca(sizeof(int) * (op_array->last_var + op_array->T), use_heap);
+ memcpy(tmp, var, sizeof(int) * (op_array->last_var + op_array->T));
+ var = tmp;
+ }
+
+ if (ssa_blocks[n].phis) {
+ zend_ssa_phi *phi = ssa_blocks[n].phis;
+ do {
+ if (phi->ssa_var < 0) {
+ phi->ssa_var = ssa_vars_count;
+ var[phi->var] = ssa_vars_count;
+ ssa_vars_count++;
+ } else {
+ var[phi->var] = phi->ssa_var;
+ }
+ phi = phi->next;
+ } while (phi);
+ }
+
+ opline = op_array->opcodes + blocks[n].start;
+ end = opline + blocks[n].len;
+ for (; opline < end; opline++) {
+ uint32_t k = opline - op_array->opcodes;
+ if (opline->opcode != ZEND_OP_DATA) {
+ zend_op *next = opline + 1;
+ if (next < end && next->opcode == ZEND_OP_DATA) {
+ if (next->op1_type == IS_CV) {
+ ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)];
+ //USE_SSA_VAR(next->op1.var);
+ } else if (next->op1_type & (IS_VAR|IS_TMP_VAR)) {
+ ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)];
+ //USE_SSA_VAR(op_array->last_var + next->op1.var);
+ }
+ if (next->op2_type == IS_CV) {
+ ssa_ops[k + 1].op2_use = var[EX_VAR_TO_NUM(next->op2.var)];
+ //USE_SSA_VAR(next->op2.var);
+ } else if (next->op2_type & (IS_VAR|IS_TMP_VAR)) {
+ ssa_ops[k + 1].op2_use = var[EX_VAR_TO_NUM(next->op2.var)];
+ //USE_SSA_VAR(op_array->last_var + next->op2.var);
+ }
+ }
+ if (opline->op1_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ ssa_ops[k].op1_use = var[EX_VAR_TO_NUM(opline->op1.var)];
+ //USE_SSA_VAR(op_array->last_var + opline->op1.var)
+ }
+ if (opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) {
+ if (opline->op2_type == IS_CV) {
+ ssa_ops[k].op2_use = var[EX_VAR_TO_NUM(opline->op2.var)];
+ }
+ ssa_ops[k].op2_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op2.var)
+ } else if (opline->op2_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
+ ssa_ops[k].op2_use = var[EX_VAR_TO_NUM(opline->op2.var)];
+ //USE_SSA_VAR(op_array->last_var + opline->op2.var)
+ }
+ switch (opline->opcode) {
+ case ZEND_ASSIGN:
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ if ((build_flags & ZEND_SSA_RC_INFERENCE) && opline->op2_type == IS_CV) {
+ ssa_ops[k].op2_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op2.var)
+ }
+ break;
+ case ZEND_ASSIGN_REF:
+//TODO: ???
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ if (opline->op2_type == IS_CV) {
+ ssa_ops[k].op2_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op2.var)
+ }
+ break;
+ case ZEND_BIND_GLOBAL:
+ case ZEND_BIND_STATIC:
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ break;
+ case ZEND_ASSIGN_DIM:
+ case ZEND_ASSIGN_OBJ:
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ if ((build_flags & ZEND_SSA_RC_INFERENCE) && next->op1_type == IS_CV) {
+ ssa_ops[k + 1].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(next->op1.var)
+ }
+ break;
+ case ZEND_ADD_ARRAY_ELEMENT:
+ ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)];
+ case ZEND_INIT_ARRAY:
+ if (((build_flags & ZEND_SSA_RC_INFERENCE)
+ || (opline->extended_value & ZEND_ARRAY_ELEMENT_REF))
+ && opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline+->op1.var)
+ }
+ break;
+ case ZEND_SEND_VAR_NO_REF:
+ case ZEND_SEND_VAR_NO_REF_EX:
+ case ZEND_SEND_VAR_EX:
+ case ZEND_SEND_REF:
+ case ZEND_SEND_UNPACK:
+ case ZEND_FE_RESET_RW:
+//TODO: ???
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ break;
+ case ZEND_FE_RESET_R:
+ if ((build_flags & ZEND_SSA_RC_INFERENCE) && opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ break;
+ case ZEND_ASSIGN_ADD:
+ case ZEND_ASSIGN_SUB:
+ case ZEND_ASSIGN_MUL:
+ case ZEND_ASSIGN_DIV:
+ case ZEND_ASSIGN_MOD:
+ case ZEND_ASSIGN_SL:
+ case ZEND_ASSIGN_SR:
+ case ZEND_ASSIGN_CONCAT:
+ case ZEND_ASSIGN_BW_OR:
+ case ZEND_ASSIGN_BW_AND:
+ case ZEND_ASSIGN_BW_XOR:
+ case ZEND_ASSIGN_POW:
+ case ZEND_PRE_INC:
+ case ZEND_PRE_DEC:
+ case ZEND_POST_INC:
+ case ZEND_POST_DEC:
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ break;
+ case ZEND_UNSET_VAR:
+ if (opline->extended_value & ZEND_QUICK_SET) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ }
+ break;
+ case ZEND_UNSET_DIM:
+ case ZEND_UNSET_OBJ:
+ case ZEND_FETCH_DIM_W:
+ case ZEND_FETCH_DIM_RW:
+ case ZEND_FETCH_DIM_FUNC_ARG:
+ case ZEND_FETCH_DIM_UNSET:
+ case ZEND_FETCH_OBJ_W:
+ case ZEND_FETCH_OBJ_RW:
+ case ZEND_FETCH_OBJ_FUNC_ARG:
+ case ZEND_FETCH_OBJ_UNSET:
+ if (opline->op1_type == IS_CV) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ break;
+ case ZEND_BIND_LEXICAL:
+ if (opline->extended_value || (build_flags & ZEND_SSA_RC_INFERENCE)) {
+ ssa_ops[k].op2_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ }
+ break;
+ case ZEND_YIELD:
+ if (opline->op1_type == IS_CV
+ && ((op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ || (build_flags & ZEND_SSA_RC_INFERENCE))) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ }
+ break;
+ case ZEND_VERIFY_RETURN_TYPE:
+ if (opline->op1_type & (IS_TMP_VAR|IS_VAR|IS_CV)) {
+ ssa_ops[k].op1_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->op1.var)
+ }
+ break;
+ default:
+ break;
+ }
+ if (opline->result_type == IS_CV) {
+ ssa_ops[k].result_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->result.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(opline->result.var)
+ } else if (opline->result_type & (IS_VAR|IS_TMP_VAR)) {
+ ssa_ops[k].result_def = ssa_vars_count;
+ var[EX_VAR_TO_NUM(opline->result.var)] = ssa_vars_count;
+ ssa_vars_count++;
+ //NEW_SSA_VAR(op_array->last_var + opline->result.var)
+ }
+ }
+ }
+
+ for (i = 0; i < 2; i++) {
+ int succ = blocks[n].successors[i];
+ if (succ >= 0) {
+ zend_ssa_phi *p;
+ for (p = ssa_blocks[succ].phis; p; p = p->next) {
+ if (p->pi == n) {
+ /* e-SSA Pi */
+ if (p->constraint.min_var >= 0) {
+ p->constraint.min_ssa_var = var[p->constraint.min_var];
+ }
+ if (p->constraint.max_var >= 0) {
+ p->constraint.max_ssa_var = var[p->constraint.max_var];
+ }
+ for (j = 0; j < blocks[succ].predecessors_count; j++) {
+ p->sources[j] = var[p->var];
+ }
+ if (p->ssa_var < 0) {
+ p->ssa_var = ssa_vars_count;
+ ssa_vars_count++;
+ }
+ } else if (p->pi < 0) {
+ /* Normal Phi */
+ for (j = 0; j < blocks[succ].predecessors_count; j++)
+ if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) {
+ break;
+ }
+ ZEND_ASSERT(j < blocks[succ].predecessors_count);
+ p->sources[j] = var[p->var];
+ }
+ }
+ for (p = ssa_blocks[succ].phis; p && (p->pi >= 0); p = p->next) {
+ if (p->pi == n) {
+ zend_ssa_phi *q = p->next;
+ while (q) {
+ if (q->pi < 0 && q->var == p->var) {
+ for (j = 0; j < blocks[succ].predecessors_count; j++) {
+ if (ssa->cfg.predecessors[blocks[succ].predecessor_offset + j] == n) {
+ break;
+ }
+ }
+ ZEND_ASSERT(j < blocks[succ].predecessors_count);
+ q->sources[j] = p->ssa_var;
+ }
+ q = q->next;
+ }
+ }
+ }
+ }
+ }
+
+ ssa->vars_count = ssa_vars_count;
+
+ j = blocks[n].children;
+ while (j >= 0) {
+ // FIXME: Tail call optimization?
+ if (zend_ssa_rename(op_array, build_flags, ssa, var, j) != SUCCESS)
+ return FAILURE;
+ j = blocks[j].next_child;
+ }
+
+ if (tmp) {
+ free_alloca(tmp, use_heap);
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+int zend_build_ssa(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa, uint32_t *func_flags) /* {{{ */
+{
+ zend_basic_block *blocks = ssa->cfg.blocks;
+ zend_ssa_block *ssa_blocks;
+ int blocks_count = ssa->cfg.blocks_count;
+ uint32_t set_size;
+ zend_bitset def, in, phi;
+ int *var = NULL;
+ int i, j, k, changed;
+ zend_dfg dfg;
+ ALLOCA_FLAG(dfg_use_heap)
+ ALLOCA_FLAG(var_use_heap)
+
+ ssa->rt_constants = (build_flags & ZEND_RT_CONSTANTS);
+ ssa_blocks = zend_arena_calloc(arena, blocks_count, sizeof(zend_ssa_block));
+ if (!ssa_blocks) {
+ return FAILURE;
+ }
+ ssa->blocks = ssa_blocks;
+
+ /* Compute Variable Liveness */
+ dfg.vars = op_array->last_var + op_array->T;
+ dfg.size = set_size = zend_bitset_len(dfg.vars);
+ dfg.tmp = do_alloca((set_size * sizeof(zend_ulong)) * (blocks_count * 4 + 1), dfg_use_heap);
+ memset(dfg.tmp, 0, (set_size * sizeof(zend_ulong)) * (blocks_count * 4 + 1));
+ dfg.def = dfg.tmp + set_size;
+ dfg.use = dfg.def + set_size * blocks_count;
+ dfg.in = dfg.use + set_size * blocks_count;
+ dfg.out = dfg.in + set_size * blocks_count;
+
+ if (zend_build_dfg(op_array, &ssa->cfg, &dfg, build_flags) != SUCCESS) {
+ free_alloca(dfg.tmp, dfg_use_heap);
+ return FAILURE;
+ }
+
+ if (build_flags & ZEND_SSA_DEBUG_LIVENESS) {
+ zend_dump_dfg(op_array, &ssa->cfg, &dfg);
+ }
+
+ def = dfg.def;
+ in = dfg.in;
+
+ /* Reuse the "use" set, as we no longer need it */
+ phi = dfg.use;
+ zend_bitset_clear(phi, set_size * blocks_count);
+
+ /* Place e-SSA pis. This will add additional "def" points, so it must
+ * happen before def propagation. */
+ place_essa_pis(arena, op_array, build_flags, ssa, &dfg);
+
+ /* SSA construction, Step 1: Propagate "def" sets in merge points */
+ do {
+ changed = 0;
+ for (j = 0; j < blocks_count; j++) {
+ zend_bitset def_j = def + j * set_size, phi_j = phi + j * set_size;
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+ if (blocks[j].predecessors_count > 1) {
+ if (blocks[j].flags & ZEND_BB_IRREDUCIBLE_LOOP) {
+ /* Prevent any values from flowing into irreducible loops by
+ replacing all incoming values with explicit phis. The
+ register allocator depends on this property. */
+ zend_bitset_union(phi_j, in + (j * set_size), set_size);
+ } else {
+ for (k = 0; k < blocks[j].predecessors_count; k++) {
+ i = ssa->cfg.predecessors[blocks[j].predecessor_offset + k];
+ while (i != -1 && i != blocks[j].idom) {
+ zend_bitset_union_with_intersection(
+ phi_j, phi_j, def + (i * set_size), in + (j * set_size), set_size);
+ i = blocks[i].idom;
+ }
+ }
+ }
+ if (!zend_bitset_subset(phi_j, def_j, set_size)) {
+ zend_bitset_union(def_j, phi_j, set_size);
+ changed = 1;
+ }
+ }
+ }
+ } while (changed);
+
+ /* SSA construction, Step 2: Phi placement based on Dominance Frontiers */
+ var = do_alloca(sizeof(int) * (op_array->last_var + op_array->T), var_use_heap);
+ if (!var) {
+ free_alloca(dfg.tmp, dfg_use_heap);
+ return FAILURE;
+ }
+
+ for (j = 0; j < blocks_count; j++) {
+ if ((blocks[j].flags & ZEND_BB_REACHABLE) == 0) {
+ continue;
+ }
+ if (!zend_bitset_empty(phi + j * set_size, set_size)) {
+ ZEND_BITSET_REVERSE_FOREACH(phi + j * set_size, set_size, i) {
+ zend_ssa_phi *phi = zend_arena_calloc(arena, 1,
+ sizeof(zend_ssa_phi) +
+ sizeof(int) * blocks[j].predecessors_count +
+ sizeof(void*) * blocks[j].predecessors_count);
+
+ phi->sources = (int*)(((char*)phi) + sizeof(zend_ssa_phi));
+ memset(phi->sources, 0xff, sizeof(int) * blocks[j].predecessors_count);
+ phi->use_chains = (zend_ssa_phi**)(((char*)phi->sources) + sizeof(int) * ssa->cfg.blocks[j].predecessors_count);
+
+ phi->pi = -1;
+ phi->var = i;
+ phi->ssa_var = -1;
+
+ /* Place phis after pis */
+ {
+ zend_ssa_phi **pp = &ssa_blocks[j].phis;
+ while (*pp) {
+ if ((*pp)->pi < 0) {
+ break;
+ }
+ pp = &(*pp)->next;
+ }
+ phi->next = *pp;
+ *pp = phi;
+ }
+ } ZEND_BITSET_FOREACH_END();
+ }
+ }
+
+ if (build_flags & ZEND_SSA_DEBUG_PHI_PLACEMENT) {
+ zend_dump_phi_placement(op_array, ssa);
+ }
+
+ /* SSA construction, Step 3: Renaming */
+ ssa->ops = zend_arena_calloc(arena, op_array->last, sizeof(zend_ssa_op));
+ memset(ssa->ops, 0xff, op_array->last * sizeof(zend_ssa_op));
+ memset(var + op_array->last_var, 0xff, op_array->T * sizeof(int));
+ /* Create uninitialized SSA variables for each CV */
+ for (j = 0; j < op_array->last_var; j++) {
+ var[j] = j;
+ }
+ ssa->vars_count = op_array->last_var;
+ if (zend_ssa_rename(op_array, build_flags, ssa, var, 0) != SUCCESS) {
+ free_alloca(var, var_use_heap);
+ free_alloca(dfg.tmp, dfg_use_heap);
+ return FAILURE;
+ }
+
+ free_alloca(var, var_use_heap);
+ free_alloca(dfg.tmp, dfg_use_heap);
+
+ return SUCCESS;
+}
+/* }}} */
+
+int zend_ssa_compute_use_def_chains(zend_arena **arena, const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
+{
+ zend_ssa_var *ssa_vars;
+ int i;
+
+ if (!ssa->vars) {
+ ssa->vars = zend_arena_calloc(arena, ssa->vars_count, sizeof(zend_ssa_var));
+ }
+ ssa_vars = ssa->vars;
+
+ for (i = 0; i < op_array->last_var; i++) {
+ ssa_vars[i].var = i;
+ ssa_vars[i].scc = -1;
+ ssa_vars[i].definition = -1;
+ ssa_vars[i].use_chain = -1;
+ }
+ for (i = op_array->last_var; i < ssa->vars_count; i++) {
+ ssa_vars[i].var = -1;
+ ssa_vars[i].scc = -1;
+ ssa_vars[i].definition = -1;
+ ssa_vars[i].use_chain = -1;
+ }
+
+ for (i = op_array->last - 1; i >= 0; i--) {
+ zend_ssa_op *op = ssa->ops + i;
+
+ if (op->op1_use >= 0) {
+ op->op1_use_chain = ssa_vars[op->op1_use].use_chain;
+ ssa_vars[op->op1_use].use_chain = i;
+ }
+ if (op->op2_use >= 0 && op->op2_use != op->op1_use) {
+ op->op2_use_chain = ssa_vars[op->op2_use].use_chain;
+ ssa_vars[op->op2_use].use_chain = i;
+ }
+ if (op->result_use >= 0) {
+ op->res_use_chain = ssa_vars[op->result_use].use_chain;
+ ssa_vars[op->result_use].use_chain = i;
+ }
+ if (op->op1_def >= 0) {
+ ssa_vars[op->op1_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].op1.var);
+ ssa_vars[op->op1_def].definition = i;
+ }
+ if (op->op2_def >= 0) {
+ ssa_vars[op->op2_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].op2.var);
+ ssa_vars[op->op2_def].definition = i;
+ }
+ if (op->result_def >= 0) {
+ ssa_vars[op->result_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].result.var);
+ ssa_vars[op->result_def].definition = i;
+ }
+ }
+
+ for (i = 0; i < ssa->cfg.blocks_count; i++) {
+ zend_ssa_phi *phi = ssa->blocks[i].phis;
+ while (phi) {
+ phi->block = i;
+ ssa_vars[phi->ssa_var].var = phi->var;
+ ssa_vars[phi->ssa_var].definition_phi = phi;
+ if (phi->pi >= 0) {
+ if (phi->sources[0] >= 0) {
+ zend_ssa_phi *p = ssa_vars[phi->sources[0]].phi_use_chain;
+ while (p && p != phi) {
+ p = zend_ssa_next_use_phi(ssa, phi->sources[0], p);
+ }
+ if (!p) {
+ phi->use_chains[0] = ssa_vars[phi->sources[0]].phi_use_chain;
+ ssa_vars[phi->sources[0]].phi_use_chain = phi;
+ }
+ }
+ /* min and max variables can't be used together */
+ if (phi->constraint.min_ssa_var >= 0) {
+ phi->sym_use_chain = ssa_vars[phi->constraint.min_ssa_var].sym_use_chain;
+ ssa_vars[phi->constraint.min_ssa_var].sym_use_chain = phi;
+ } else if (phi->constraint.max_ssa_var >= 0) {
+ phi->sym_use_chain = ssa_vars[phi->constraint.max_ssa_var].sym_use_chain;
+ ssa_vars[phi->constraint.max_ssa_var].sym_use_chain = phi;
+ }
+ } else {
+ int j;
+
+ for (j = 0; j < ssa->cfg.blocks[i].predecessors_count; j++) {
+ if (phi->sources[j] >= 0) {
+ zend_ssa_phi *p = ssa_vars[phi->sources[j]].phi_use_chain;
+ while (p && p != phi) {
+ p = zend_ssa_next_use_phi(ssa, phi->sources[j], p);
+ }
+ if (!p) {
+ phi->use_chains[j] = ssa_vars[phi->sources[j]].phi_use_chain;
+ ssa_vars[phi->sources[j]].phi_use_chain = phi;
+ }
+ }
+ }
+ }
+ phi = phi->next;
+ }
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+int zend_ssa_unlink_use_chain(zend_ssa *ssa, int op, int var) /* {{{ */
+{
+ if (ssa->vars[var].use_chain == op) {
+ ssa->vars[var].use_chain = zend_ssa_next_use(ssa->ops, var, op);
+ return 1;
+ } else {
+ int use = ssa->vars[var].use_chain;
+
+ while (use >= 0) {
+ if (ssa->ops[use].result_use == var) {
+ if (ssa->ops[use].res_use_chain == op) {
+ ssa->ops[use].res_use_chain = zend_ssa_next_use(ssa->ops, var, op);
+ return 1;
+ } else {
+ use = ssa->ops[use].res_use_chain;
+ }
+ } else if (ssa->ops[use].op1_use == var) {
+ if (ssa->ops[use].op1_use_chain == op) {
+ ssa->ops[use].op1_use_chain = zend_ssa_next_use(ssa->ops, var, op);
+ return 1;
+ } else {
+ use = ssa->ops[use].op1_use_chain;
+ }
+ } else if (ssa->ops[use].op2_use == var) {
+ if (ssa->ops[use].op2_use_chain == op) {
+ ssa->ops[use].op2_use_chain = zend_ssa_next_use(ssa->ops, var, op);
+ return 1;
+ } else {
+ use = ssa->ops[use].op2_use_chain;
+ }
+ } else {
+ break;
+ }
+ }
+ /* something wrong */
+ ZEND_ASSERT(0);
+ return 0;
+ }
+}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_ssa.h b/ext/opcache/Optimizer/zend_ssa.h
new file mode 100644
index 0000000000..1bb43052f7
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_ssa.h
@@ -0,0 +1,157 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine, SSA - Static Single Assignment Form |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+#ifndef ZEND_SSA_H
+#define ZEND_SSA_H
+
+#include "zend_cfg.h"
+
+typedef struct _zend_ssa_range {
+ zend_long min;
+ zend_long max;
+ zend_bool underflow;
+ zend_bool overflow;
+} zend_ssa_range;
+
+typedef enum _zend_ssa_negative_lat {
+ NEG_NONE = 0,
+ NEG_INIT = 1,
+ NEG_INVARIANT = 2,
+ NEG_USE_LT = 3,
+ NEG_USE_GT = 4,
+ NEG_UNKNOWN = 5
+} zend_ssa_negative_lat;
+
+/* Special kind of SSA Phi function used in eSSA */
+typedef struct _zend_ssa_pi_constraint {
+ zend_ssa_range range; /* simple range constraint */
+ int min_var;
+ int max_var;
+ int min_ssa_var; /* ((min_var>0) ? MIN(ssa_var) : 0) + range.min */
+ int max_ssa_var; /* ((max_var>0) ? MAX(ssa_var) : 0) + range.max */
+ zend_ssa_negative_lat negative;
+ uint32_t type_mask; /* If -1 this is a range constraint */
+} zend_ssa_pi_constraint;
+
+/* SSA Phi - ssa_var = Phi(source0, source1, ...sourceN) */
+typedef struct _zend_ssa_phi zend_ssa_phi;
+struct _zend_ssa_phi {
+ zend_ssa_phi *next; /* next Phi in the same BB */
+ int pi; /* if >= 0 this is actually a e-SSA Pi */
+ zend_ssa_pi_constraint constraint; /* e-SSA Pi constraint */
+ int var; /* Original CV, VAR or TMP variable index */
+ int ssa_var; /* SSA variable index */
+ int block; /* current BB index */
+ int visited; /* flag to avoid recursive processing */
+ zend_ssa_phi **use_chains;
+ zend_ssa_phi *sym_use_chain;
+ int *sources; /* Array of SSA IDs that produce this var.
+ As many as this block has
+ predecessors. */
+};
+
+typedef struct _zend_ssa_block {
+ zend_ssa_phi *phis;
+} zend_ssa_block;
+
+typedef struct _zend_ssa_op {
+ int op1_use;
+ int op2_use;
+ int result_use;
+ int op1_def;
+ int op2_def;
+ int result_def;
+ int op1_use_chain;
+ int op2_use_chain;
+ int res_use_chain;
+} zend_ssa_op;
+
+typedef struct _zend_ssa_var {
+ int var; /* original var number; op.var for CVs and following numbers for VARs and TMP_VARs */
+ int scc; /* strongly connected component */
+ int definition; /* opcode that defines this value */
+ zend_ssa_phi *definition_phi; /* phi that defines this value */
+ int use_chain; /* uses of this value, linked through opN_use_chain */
+ zend_ssa_phi *phi_use_chain; /* uses of this value in Phi, linked through use_chain */
+ zend_ssa_phi *sym_use_chain; /* uses of this value in Pi constaints */
+ unsigned int no_val : 1; /* value doesn't mater (used as op1 in ZEND_ASSIGN) */
+ unsigned int scc_entry : 1;
+} zend_ssa_var;
+
+typedef struct _zend_ssa_var_info {
+ uint32_t type; /* inferred type (see zend_inference.h) */
+ zend_ssa_range range;
+ zend_class_entry *ce;
+ unsigned int has_range : 1;
+ unsigned int is_instanceof : 1; /* 0 - class == "ce", 1 - may be child of "ce" */
+ unsigned int recursive : 1;
+ unsigned int use_as_double : 1;
+} zend_ssa_var_info;
+
+typedef struct _zend_ssa {
+ zend_cfg cfg; /* control flow graph */
+ int rt_constants; /* run-time or compile-time */
+ int vars_count; /* number of SSA variables */
+ zend_ssa_block *blocks; /* array of SSA blocks */
+ zend_ssa_op *ops; /* array of SSA instructions */
+ zend_ssa_var *vars; /* use/def chain of SSA variables */
+ int sccs; /* number of SCCs */
+ zend_ssa_var_info *var_info;
+} zend_ssa;
+
+BEGIN_EXTERN_C()
+
+int zend_build_ssa(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa, uint32_t *func_flags);
+int zend_ssa_compute_use_def_chains(zend_arena **arena, const zend_op_array *op_array, zend_ssa *ssa);
+int zend_ssa_unlink_use_chain(zend_ssa *ssa, int op, int var);
+
+END_EXTERN_C()
+
+static zend_always_inline int zend_ssa_next_use(const zend_ssa_op *ssa_op, int var, int use)
+{
+ ssa_op += use;
+ if (ssa_op->result_use == var) {
+ return ssa_op->res_use_chain;
+ }
+ return (ssa_op->op1_use == var) ? ssa_op->op1_use_chain : ssa_op->op2_use_chain;
+}
+
+static zend_always_inline zend_ssa_phi* zend_ssa_next_use_phi(const zend_ssa *ssa, int var, const zend_ssa_phi *p)
+{
+ if (p->pi >= 0) {
+ return p->use_chains[0];
+ } else {
+ int j;
+ for (j = 0; j < ssa->cfg.blocks[p->block].predecessors_count; j++) {
+ if (p->sources[j] == var) {
+ return p->use_chains[j];
+ }
+ }
+ }
+ return NULL;
+}
+
+#endif /* ZEND_SSA_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/Optimizer/zend_worklist.h b/ext/opcache/Optimizer/zend_worklist.h
new file mode 100644
index 0000000000..a1db05482b
--- /dev/null
+++ b/ext/opcache/Optimizer/zend_worklist.h
@@ -0,0 +1,137 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andy Wingo <wingo@igalia.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id:$ */
+
+#ifndef _ZEND_WORKLIST_H_
+#define _ZEND_WORKLIST_H_
+
+#include "zend_arena.h"
+#include "zend_bitset.h"
+
+typedef struct _zend_worklist_stack {
+ int *buf;
+ int len;
+ int capacity;
+} zend_worklist_stack;
+
+#define ZEND_WORKLIST_STACK_ALLOCA(s, _len, use_heap) do { \
+ (s)->buf = (int*)do_alloca(sizeof(int) * _len, use_heap); \
+ (s)->len = 0; \
+ (s)->capacity = _len; \
+ } while (0)
+
+#define ZEND_WORKLIST_STACK_FREE_ALLOCA(s, use_heap) \
+ free_alloca((s)->buf, use_heap)
+
+static inline int zend_worklist_stack_prepare(zend_arena **arena, zend_worklist_stack *stack, int len)
+{
+ ZEND_ASSERT(len >= 0);
+
+ stack->buf = (int*)zend_arena_calloc(arena, sizeof(*stack->buf), len);
+ if (!stack->buf) {
+ return FAILURE;
+ }
+ stack->len = 0;
+ stack->capacity = len;
+
+ return SUCCESS;
+}
+
+static inline void zend_worklist_stack_push(zend_worklist_stack *stack, int i)
+{
+ ZEND_ASSERT(stack->len < stack->capacity);
+ stack->buf[stack->len++] = i;
+}
+
+static inline int zend_worklist_stack_peek(zend_worklist_stack *stack)
+{
+ ZEND_ASSERT(stack->len);
+ return stack->buf[stack->len - 1];
+}
+
+static inline int zend_worklist_stack_pop(zend_worklist_stack *stack)
+{
+ ZEND_ASSERT(stack->len);
+ return stack->buf[--stack->len];
+}
+
+typedef struct _zend_worklist {
+ zend_bitset visited;
+ zend_worklist_stack stack;
+} zend_worklist;
+
+#define ZEND_WORKLIST_ALLOCA(w, _len, use_heap) do { \
+ (w)->stack.buf = (int*)do_alloca(sizeof(int) * _len + sizeof(zend_ulong) * zend_bitset_len(_len), use_heap); \
+ (w)->stack.len = 0; \
+ (w)->stack.capacity = _len; \
+ (w)->visited = (zend_bitset)((w)->stack.buf + _len); \
+ memset((w)->visited, 0, sizeof(zend_ulong) * zend_bitset_len(_len)); \
+ } while (0)
+
+#define ZEND_WORKLIST_FREE_ALLOCA(w, use_heap) \
+ free_alloca((w)->stack.buf, use_heap)
+
+static inline int zend_worklist_prepare(zend_arena **arena, zend_worklist *worklist, int len)
+{
+ ZEND_ASSERT(len >= 0);
+ worklist->visited = (zend_bitset)zend_arena_calloc(arena, sizeof(zend_ulong), zend_bitset_len(len));
+ if (!worklist->visited) {
+ return FAILURE;
+ }
+ return zend_worklist_stack_prepare(arena, &worklist->stack, len);
+}
+
+static inline int zend_worklist_len(zend_worklist *worklist)
+{
+ return worklist->stack.len;
+}
+
+static inline int zend_worklist_push(zend_worklist *worklist, int i)
+{
+ ZEND_ASSERT(i >= 0 && i < worklist->stack.capacity);
+
+ if (zend_bitset_in(worklist->visited, i)) {
+ return 0;
+ }
+
+ zend_bitset_incl(worklist->visited, i);
+ zend_worklist_stack_push(&worklist->stack, i);
+ return 1;
+}
+
+static inline int zend_worklist_peek(zend_worklist *worklist)
+{
+ return zend_worklist_stack_peek(&worklist->stack);
+}
+
+static inline int zend_worklist_pop(zend_worklist *worklist)
+{
+ /* Does not clear visited flag */
+ return zend_worklist_stack_pop(&worklist->stack);
+}
+
+#endif /* _ZEND_WORKLIST_H_ */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/ext/opcache/README b/ext/opcache/README
index c074440130..e4d36ba51a 100644
--- a/ext/opcache/README
+++ b/ext/opcache/README
@@ -213,3 +213,6 @@ opcache.mmap_base
processes have to map shared memory into the same address space. This
directive allows to manually fix the "Unable to reattach to base address"
errors.
+
+opcache.lockfile_path (default "/tmp")
+ Absolute path used to store shared lockfiles (for *nix only)
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 2234d5ee56..222935bad0 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -40,10 +40,10 @@
#include "zend_accelerator_util_funcs.h"
#include "zend_accelerator_hash.h"
#include "ext/pcre/php_pcre.h"
+#include "ext/standard/md5.h"
#ifdef HAVE_OPCACHE_FILE_CACHE
# include "zend_file_cache.h"
-# include "ext/standard/md5.h"
#endif
#ifndef ZEND_WIN32
@@ -97,7 +97,7 @@ zend_accel_globals accel_globals;
#else
int accel_globals_id;
#if defined(COMPILE_DL_OPCACHE)
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
#endif
@@ -108,6 +108,9 @@ zend_accel_shared_globals *accel_shared_globals = NULL;
zend_bool accel_startup_ok = 0;
static char *zps_failure_reason = NULL;
char *zps_api_failure_reason = NULL;
+#if ENABLE_FILE_CACHE_FALLBACK
+zend_bool fallback_process = 0; /* process uses file cache fallback */
+#endif
static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type);
static int (*accelerator_orig_zend_stream_open_function)(const char *filename, zend_file_handle *handle );
@@ -217,6 +220,124 @@ static ZEND_INI_MH(accel_include_path_on_modify)
return ret;
}
+static inline void accel_restart_enter(void)
+{
+#ifdef ZEND_WIN32
+ INCREMENT(restart_in);
+#else
+# ifdef _AIX
+ static FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
+# else
+ static const FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
+#endif
+
+ if (fcntl(lock_file, F_SETLK, &restart_in_progress) == -1) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(+1): %s (%d)", strerror(errno), errno);
+ }
+#endif
+ ZCSG(restart_in_progress) = 1;
+}
+
+static inline void accel_restart_leave(void)
+{
+#ifdef ZEND_WIN32
+ ZCSG(restart_in_progress) = 0;
+ DECREMENT(restart_in);
+#else
+# ifdef _AIX
+ static FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
+# else
+ static const FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
+# endif
+
+ ZCSG(restart_in_progress) = 0;
+ if (fcntl(lock_file, F_SETLK, &restart_finished) == -1) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(-1): %s (%d)", strerror(errno), errno);
+ }
+#endif
+}
+
+static inline int accel_restart_is_active(void)
+{
+ if (ZCSG(restart_in_progress)) {
+#ifndef ZEND_WIN32
+ FLOCK_STRUCTURE(restart_check, F_WRLCK, SEEK_SET, 2, 1);
+
+ if (fcntl(lock_file, F_GETLK, &restart_check) == -1) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "RestartC: %s (%d)", strerror(errno), errno);
+ return FAILURE;
+ }
+ if (restart_check.l_type == F_UNLCK) {
+ ZCSG(restart_in_progress) = 0;
+ return 0;
+ } else {
+ return 1;
+ }
+#else
+ return LOCKVAL(restart_in) != 0;
+#endif
+ }
+ return 0;
+}
+
+/* Creates a read lock for SHM access */
+static inline int accel_activate_add(void)
+{
+#ifdef ZEND_WIN32
+ INCREMENT(mem_usage);
+#else
+# ifdef _AIX
+ static FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
+# else
+ static const FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
+# endif
+
+ if (fcntl(lock_file, F_SETLK, &mem_usage_lock) == -1) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(+1): %s (%d)", strerror(errno), errno);
+ return FAILURE;
+ }
+#endif
+ return SUCCESS;
+}
+
+/* Releases a lock for SHM access */
+static inline void accel_deactivate_sub(void)
+{
+#ifdef ZEND_WIN32
+ if (ZCG(counted)) {
+ DECREMENT(mem_usage);
+ ZCG(counted) = 0;
+ }
+#else
+# ifdef _AIX
+ static FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
+# else
+ static const FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
+# endif
+
+ if (fcntl(lock_file, F_SETLK, &mem_usage_unlock) == -1) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(-1): %s (%d)", strerror(errno), errno);
+ }
+#endif
+}
+
+static inline void accel_unlock_all(void)
+{
+#ifdef ZEND_WIN32
+ accel_deactivate_sub();
+#else
+# ifdef _AIX
+ static FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
+# else
+ static const FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
+# endif
+
+ if (fcntl(lock_file, F_SETLK, &mem_usage_unlock_all) == -1) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "UnlockAll: %s (%d)", strerror(errno), errno);
+ }
+#endif
+}
+
/* Interned strings support */
static zend_string *(*orig_new_interned_string)(zend_string *str);
static void (*orig_interned_strings_snapshot)(void);
@@ -246,6 +367,8 @@ static void accel_interned_strings_restore_state(void)
uint nIndex;
Bucket *p;
+ memset(ZCSG(interned_strings_saved_top),
+ 0, ZCSG(interned_strings_top) - ZCSG(interned_strings_saved_top));
ZCSG(interned_strings_top) = ZCSG(interned_strings_saved_top);
while (idx > 0) {
idx--;
@@ -286,6 +409,12 @@ static zend_string *accel_find_interned_string(zend_string *str)
/* this is already an interned string */
return str;
}
+ if (!ZCG(counted)) {
+ if (accel_activate_add() == FAILURE) {
+ return str;
+ }
+ ZCG(counted) = 1;
+ }
h = zend_string_hash_val(str);
nIndex = h | ZCSG(interned_strings).nTableMask;
@@ -394,6 +523,9 @@ static void accel_use_shm_interned_strings(void)
s[1] = 0;
CG(one_char_string)[j] = accel_new_interned_string(zend_string_init(s, 1, 0));
}
+ for (j = 0; j < CG(known_strings_count); j++) {
+ CG(known_strings)[j] = accel_new_interned_string(CG(known_strings)[j]);
+ }
/* function table hash keys */
for (idx = 0; idx < CG(function_table)->nNumUsed; idx++) {
@@ -487,102 +619,6 @@ static void accel_use_shm_interned_strings(void)
}
#endif
-static inline void accel_restart_enter(void)
-{
-#ifdef ZEND_WIN32
- INCREMENT(restart_in);
-#else
- static const FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
-
- if (fcntl(lock_file, F_SETLK, &restart_in_progress) == -1) {
- zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(+1): %s (%d)", strerror(errno), errno);
- }
-#endif
- ZCSG(restart_in_progress) = 1;
-}
-
-static inline void accel_restart_leave(void)
-{
-#ifdef ZEND_WIN32
- ZCSG(restart_in_progress) = 0;
- DECREMENT(restart_in);
-#else
- static const FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
-
- ZCSG(restart_in_progress) = 0;
- if (fcntl(lock_file, F_SETLK, &restart_finished) == -1) {
- zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(-1): %s (%d)", strerror(errno), errno);
- }
-#endif
-}
-
-static inline int accel_restart_is_active(void)
-{
- if (ZCSG(restart_in_progress)) {
-#ifndef ZEND_WIN32
- FLOCK_STRUCTURE(restart_check, F_WRLCK, SEEK_SET, 2, 1);
-
- if (fcntl(lock_file, F_GETLK, &restart_check) == -1) {
- zend_accel_error(ACCEL_LOG_DEBUG, "RestartC: %s (%d)", strerror(errno), errno);
- return FAILURE;
- }
- if (restart_check.l_type == F_UNLCK) {
- ZCSG(restart_in_progress) = 0;
- return 0;
- } else {
- return 1;
- }
-#else
- return LOCKVAL(restart_in) != 0;
-#endif
- }
- return 0;
-}
-
-/* Creates a read lock for SHM access */
-static inline void accel_activate_add(void)
-{
-#ifdef ZEND_WIN32
- INCREMENT(mem_usage);
-#else
- static const FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
-
- if (fcntl(lock_file, F_SETLK, &mem_usage_lock) == -1) {
- zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(+1): %s (%d)", strerror(errno), errno);
- }
-#endif
-}
-
-/* Releases a lock for SHM access */
-static inline void accel_deactivate_sub(void)
-{
-#ifdef ZEND_WIN32
- if (ZCG(counted)) {
- DECREMENT(mem_usage);
- ZCG(counted) = 0;
- }
-#else
- static const FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
-
- if (fcntl(lock_file, F_SETLK, &mem_usage_unlock) == -1) {
- zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(-1): %s (%d)", strerror(errno), errno);
- }
-#endif
-}
-
-static inline void accel_unlock_all(void)
-{
-#ifdef ZEND_WIN32
- accel_deactivate_sub();
-#else
- static const FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
-
- if (fcntl(lock_file, F_SETLK, &mem_usage_unlock_all) == -1) {
- zend_accel_error(ACCEL_LOG_DEBUG, "UnlockAll: %s (%d)", strerror(errno), errno);
- }
-#endif
-}
-
#ifndef ZEND_WIN32
static inline void kill_all_lockers(struct flock *mem_usage_check)
{
@@ -846,17 +882,17 @@ static inline int do_validate_timestamps(zend_persistent_script *persistent_scri
* See bug #15140
*/
if (file_handle->opened_path) {
- if (persistent_script->full_path != file_handle->opened_path &&
- (ZSTR_LEN(persistent_script->full_path) != ZSTR_LEN(file_handle->opened_path) ||
- memcmp(ZSTR_VAL(persistent_script->full_path), ZSTR_VAL(file_handle->opened_path), ZSTR_LEN(file_handle->opened_path)) != 0)) {
+ if (persistent_script->script.filename != file_handle->opened_path &&
+ (ZSTR_LEN(persistent_script->script.filename) != ZSTR_LEN(file_handle->opened_path) ||
+ memcmp(ZSTR_VAL(persistent_script->script.filename), ZSTR_VAL(file_handle->opened_path), ZSTR_LEN(file_handle->opened_path)) != 0)) {
return FAILURE;
}
} else {
full_path_ptr = accelerator_orig_zend_resolve_path(file_handle->filename, strlen(file_handle->filename));
if (full_path_ptr &&
- persistent_script->full_path != full_path_ptr &&
- (ZSTR_LEN(persistent_script->full_path) != ZSTR_LEN(full_path_ptr) ||
- memcmp(ZSTR_VAL(persistent_script->full_path), ZSTR_VAL(full_path_ptr), ZSTR_LEN(full_path_ptr)) != 0)) {
+ persistent_script->script.filename != full_path_ptr &&
+ (ZSTR_LEN(persistent_script->script.filename) != ZSTR_LEN(full_path_ptr) ||
+ memcmp(ZSTR_VAL(persistent_script->script.filename), ZSTR_VAL(full_path_ptr), ZSTR_LEN(full_path_ptr)) != 0)) {
zend_string_release(full_path_ptr);
return FAILURE;
}
@@ -884,8 +920,8 @@ static inline int do_validate_timestamps(zend_persistent_script *persistent_scri
}
ps_handle.type = ZEND_HANDLE_FILENAME;
- ps_handle.filename = ZSTR_VAL(persistent_script->full_path);
- ps_handle.opened_path = persistent_script->full_path;
+ ps_handle.filename = ZSTR_VAL(persistent_script->script.filename);
+ ps_handle.opened_path = persistent_script->script.filename;
if (zend_get_file_handle_timestamp(&ps_handle, NULL) == persistent_script->timestamp) {
return SUCCESS;
@@ -917,13 +953,16 @@ char *accel_make_persistent_key(const char *path, int path_length, int *key_len)
/* CWD and include_path don't matter for absolute file names and streams */
if (IS_ABSOLUTE_PATH(path, path_length)) {
/* pass */
+ ZCG(key_len) = 0;
} else if (UNEXPECTED(is_stream_path(path))) {
if (!is_cacheable_stream_path(path)) {
return NULL;
}
/* pass */
+ ZCG(key_len) = 0;
} else if (UNEXPECTED(!ZCG(accel_directives).use_cwd)) {
/* pass */
+ ZCG(key_len) = 0;
} else {
const char *include_path = NULL, *cwd = NULL;
int include_path_len = 0, cwd_len = 0;
@@ -954,6 +993,7 @@ char *accel_make_persistent_key(const char *path, int path_length, int *key_len)
zend_shared_alloc_lock();
str = accel_new_interned_string(zend_string_copy(cwd_str));
if (str == cwd_str) {
+ zend_string_release(str);
str = NULL;
}
zend_shared_alloc_unlock();
@@ -1068,15 +1108,6 @@ int zend_accel_invalidate(const char *filename, int filename_len, zend_bool forc
zend_persistent_script *persistent_script;
if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled) || accelerator_shm_read_lock() != SUCCESS) {
-#ifdef HAVE_OPCACHE_FILE_CACHE
- if (ZCG(accel_directives).file_cache) {
- realpath = accelerator_orig_zend_resolve_path(filename, filename_len);
- if (realpath) {
- zend_file_cache_invalidate(realpath);
- zend_string_release(realpath);
- }
- }
-#endif
return FAILURE;
}
@@ -1158,7 +1189,7 @@ static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script
return new_persistent_script;
}
- if (!zend_accel_script_optimize(new_persistent_script)) {
+ if (!zend_optimize_script(&new_persistent_script->script, ZCG(accel_directives).optimization_level, ZCG(accel_directives).opt_debug_level)) {
return new_persistent_script;
}
@@ -1182,16 +1213,16 @@ static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script
zend_shared_alloc_destroy_xlat_table();
new_persistent_script->is_phar =
- new_persistent_script->full_path &&
- strstr(ZSTR_VAL(new_persistent_script->full_path), ".phar") &&
- !strstr(ZSTR_VAL(new_persistent_script->full_path), "://");
+ new_persistent_script->script.filename &&
+ strstr(ZSTR_VAL(new_persistent_script->script.filename), ".phar") &&
+ !strstr(ZSTR_VAL(new_persistent_script->script.filename), "://");
/* Consistency check */
if ((char*)new_persistent_script->mem + new_persistent_script->size != (char*)ZCG(mem)) {
zend_accel_error(
((char*)new_persistent_script->mem + new_persistent_script->size < (char*)ZCG(mem)) ? ACCEL_LOG_ERROR : ACCEL_LOG_WARNING,
"Internal error: wrong size calculation: %s start=0x%08x, end=0x%08x, real=0x%08x\n",
- ZSTR_VAL(new_persistent_script->full_path),
+ ZSTR_VAL(new_persistent_script->script.filename),
new_persistent_script->mem,
(char *)new_persistent_script->mem + new_persistent_script->size,
ZCG(mem));
@@ -1216,7 +1247,7 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
return new_persistent_script;
}
- if (!zend_accel_script_optimize(new_persistent_script)) {
+ if (!zend_optimize_script(&new_persistent_script->script, ZCG(accel_directives).optimization_level, ZCG(accel_directives).opt_debug_level)) {
return new_persistent_script;
}
@@ -1234,7 +1265,7 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
/* Check if we still need to put the file into the cache (may be it was
* already stored by another process. This final check is done under
* exclusive lock) */
- bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->full_path);
+ bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->script.filename);
if (bucket) {
zend_persistent_script *existing_persistent_script = (zend_persistent_script *)bucket->data;
@@ -1276,16 +1307,16 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
zend_shared_alloc_destroy_xlat_table();
new_persistent_script->is_phar =
- new_persistent_script->full_path &&
- strstr(ZSTR_VAL(new_persistent_script->full_path), ".phar") &&
- !strstr(ZSTR_VAL(new_persistent_script->full_path), "://");
+ new_persistent_script->script.filename &&
+ strstr(ZSTR_VAL(new_persistent_script->script.filename), ".phar") &&
+ !strstr(ZSTR_VAL(new_persistent_script->script.filename), "://");
/* Consistency check */
if ((char*)new_persistent_script->mem + new_persistent_script->size != (char*)ZCG(mem)) {
zend_accel_error(
((char*)new_persistent_script->mem + new_persistent_script->size < (char*)ZCG(mem)) ? ACCEL_LOG_ERROR : ACCEL_LOG_WARNING,
"Internal error: wrong size calculation: %s start=0x%08x, end=0x%08x, real=0x%08x\n",
- ZSTR_VAL(new_persistent_script->full_path),
+ ZSTR_VAL(new_persistent_script->script.filename),
new_persistent_script->mem,
(char *)new_persistent_script->mem + new_persistent_script->size,
ZCG(mem));
@@ -1294,14 +1325,14 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
new_persistent_script->dynamic_members.checksum = zend_accel_script_checksum(new_persistent_script);
/* store script structure in the hash table */
- bucket = zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(new_persistent_script->full_path), ZSTR_LEN(new_persistent_script->full_path), 0, new_persistent_script);
+ bucket = zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(new_persistent_script->script.filename), ZSTR_LEN(new_persistent_script->script.filename), 0, new_persistent_script);
if (bucket) {
- zend_accel_error(ACCEL_LOG_INFO, "Cached script '%s'", new_persistent_script->full_path);
+ zend_accel_error(ACCEL_LOG_INFO, "Cached script '%s'", new_persistent_script->script.filename);
if (key &&
/* key may contain non-persistent PHAR aliases (see issues #115 and #149) */
memcmp(key, "phar://", sizeof("phar://") - 1) != 0 &&
- (ZSTR_LEN(new_persistent_script->full_path) != key_length ||
- memcmp(ZSTR_VAL(new_persistent_script->full_path), key, key_length) != 0)) {
+ (ZSTR_LEN(new_persistent_script->script.filename) != key_length ||
+ memcmp(ZSTR_VAL(new_persistent_script->script.filename), key, key_length) != 0)) {
/* link key to the same persistent script in hash table */
if (zend_accel_hash_update(&ZCSG(hash), key, key_length, 1, bucket)) {
zend_accel_error(ACCEL_LOG_INFO, "Added key '%s'", key);
@@ -1469,7 +1500,7 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl
/* Override them with ours */
CG(function_table) = &ZCG(function_table);
- EG(class_table) = CG(class_table) = &new_persistent_script->class_table;
+ EG(class_table) = CG(class_table) = &new_persistent_script->script.class_table;
ZVAL_UNDEF(&EG(user_error_handler));
zend_try {
@@ -1506,8 +1537,8 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl
Here we aren't sure we would store it, but we will need it
further anyway.
*/
- zend_accel_move_user_functions(&ZCG(function_table), &new_persistent_script->function_table);
- new_persistent_script->main_op_array = *op_array;
+ zend_accel_move_user_functions(&ZCG(function_table), &new_persistent_script->script.function_table);
+ new_persistent_script->script.main_op_array = *op_array;
efree(op_array); /* we have valid persistent_script, so it's safe to free op_array */
@@ -1528,11 +1559,11 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl
}
if (file_handle->opened_path) {
- new_persistent_script->full_path = zend_string_copy(file_handle->opened_path);
+ new_persistent_script->script.filename = zend_string_copy(file_handle->opened_path);
} else {
- new_persistent_script->full_path = zend_string_init(file_handle->filename, strlen(file_handle->filename), 0);
+ new_persistent_script->script.filename = zend_string_init(file_handle->filename, strlen(file_handle->filename), 0);
}
- zend_string_hash_val(new_persistent_script->full_path);
+ zend_string_hash_val(new_persistent_script->script.filename);
/* Now persistent_script structure is ready in process memory */
return new_persistent_script;
@@ -1563,24 +1594,26 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type)
}
}
+ SHM_UNPROTECT();
persistent_script = zend_file_cache_script_load(file_handle);
+ SHM_PROTECT();
if (persistent_script) {
/* see bug #15471 (old BTS) */
- if (persistent_script->full_path) {
+ if (persistent_script->script.filename) {
if (!EG(current_execute_data) || !EG(current_execute_data)->opline ||
!EG(current_execute_data)->func ||
!ZEND_USER_CODE(EG(current_execute_data)->func->common.type) ||
EG(current_execute_data)->opline->opcode != ZEND_INCLUDE_OR_EVAL ||
(EG(current_execute_data)->opline->extended_value != ZEND_INCLUDE_ONCE &&
EG(current_execute_data)->opline->extended_value != ZEND_REQUIRE_ONCE)) {
- if (zend_hash_add_empty_element(&EG(included_files), persistent_script->full_path) != NULL) {
+ if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) {
/* ext/phar has to load phar's metadata into memory */
if (persistent_script->is_phar) {
php_stream_statbuf ssb;
- char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->full_path));
+ char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename));
memcpy(fname, "phar://", sizeof("phar://") - 1);
- memcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->full_path), ZSTR_LEN(persistent_script->full_path) + 1);
+ memcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persistent_script->script.filename) + 1);
php_stream_stat_path(fname, &ssb);
efree(fname);
}
@@ -1589,8 +1622,6 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type)
}
zend_file_handle_dtor(file_handle);
- persistent_script->dynamic_members.last_used = ZCG(request_time);
-
if (persistent_script->ping_auto_globals_mask) {
zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask);
}
@@ -1709,8 +1740,15 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
* each execution)
*/
if (!ZCG(counted)) {
+ if (accel_activate_add() == FAILURE) {
+#ifdef HAVE_OPCACHE_FILE_CACHE
+ if (ZCG(accel_directives).file_cache) {
+ return file_cache_compile_file(file_handle, type);
+ }
+#endif
+ return accelerator_orig_compile_file(file_handle, type);
+ }
ZCG(counted) = 1;
- accel_activate_add();
}
SHM_UNPROTECT();
@@ -1742,7 +1780,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
if (checksum != persistent_script->dynamic_members.checksum ) {
/* The checksum is wrong */
zend_accel_error(ACCEL_LOG_INFO, "Checksum failed for '%s': expected=0x%0.8X, found=0x%0.8X",
- persistent_script->full_path, persistent_script->dynamic_members.checksum, checksum);
+ persistent_script->script.filename, persistent_script->dynamic_members.checksum, checksum);
zend_shared_alloc_lock();
if (!persistent_script->corrupted) {
persistent_script->corrupted = 1;
@@ -1810,26 +1848,30 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
ZCSG(hits)++; /* TBFixed: may lose one hit */
persistent_script->dynamic_members.hits++; /* see above */
#else
- INCREMENT(hits);
+#ifdef _M_X64
+ InterlockedIncrement64(&ZCSG(hits));
+#else
+ InterlockedIncrement(&ZCSG(hits));
+#endif
InterlockedIncrement64(&persistent_script->dynamic_members.hits);
#endif
/* see bug #15471 (old BTS) */
- if (persistent_script->full_path) {
+ if (persistent_script->script.filename) {
if (!EG(current_execute_data) || !EG(current_execute_data)->opline ||
!EG(current_execute_data)->func ||
!ZEND_USER_CODE(EG(current_execute_data)->func->common.type) ||
EG(current_execute_data)->opline->opcode != ZEND_INCLUDE_OR_EVAL ||
(EG(current_execute_data)->opline->extended_value != ZEND_INCLUDE_ONCE &&
EG(current_execute_data)->opline->extended_value != ZEND_REQUIRE_ONCE)) {
- if (zend_hash_add_empty_element(&EG(included_files), persistent_script->full_path) != NULL) {
+ if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) {
/* ext/phar has to load phar's metadata into memory */
if (persistent_script->is_phar) {
php_stream_statbuf ssb;
- char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->full_path));
+ char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename));
memcpy(fname, "phar://", sizeof("phar://") - 1);
- memcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->full_path), ZSTR_LEN(persistent_script->full_path) + 1);
+ memcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persistent_script->script.filename) + 1);
php_stream_stat_path(fname, &ssb);
efree(fname);
}
@@ -1868,7 +1910,7 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
/* we are in include_once or FastCGI request */
handle->filename = (char*)filename;
handle->free_filename = 0;
- handle->opened_path = zend_string_copy(ZCG(cache_persistent_script)->full_path);
+ handle->opened_path = zend_string_copy(ZCG(cache_persistent_script)->script.filename);
handle->type = ZEND_HANDLE_FILENAME;
return SUCCESS;
}
@@ -1910,7 +1952,7 @@ static zend_string* persistent_zend_resolve_path(const char *filename, int filen
if (!persistent_script->corrupted) {
ZCG(cache_opline) = EG(current_execute_data) ? EG(current_execute_data)->opline : NULL;
ZCG(cache_persistent_script) = persistent_script;
- return zend_string_copy(persistent_script->full_path);
+ return zend_string_copy(persistent_script->script.filename);
}
}
} else {
@@ -1973,7 +2015,7 @@ static void accel_reset_pcre_cache(void)
ZEND_HASH_FOREACH_BUCKET(&PCRE_G(pcre_cache), p) {
/* Remove PCRE cache entries with inconsistent keys */
- if (ZSTR_IS_INTERNED(p->key)) {
+ if (zend_accel_in_shm(p->key)) {
p->key = NULL;
zend_hash_del_bucket(&PCRE_G(pcre_cache), p);
}
@@ -2274,6 +2316,19 @@ static void zend_accel_fast_shutdown(void)
}
#endif
+int accel_post_deactivate(void)
+{
+ if (!ZCG(enabled) || !accel_startup_ok) {
+ return SUCCESS;
+ }
+
+ zend_shared_alloc_safe_unlock(); /* be sure we didn't leave cache locked */
+ accel_unlock_all();
+ ZCG(counted) = 0;
+
+ return SUCCESS;
+}
+
static void accel_deactivate(void)
{
/* ensure that we restore function_table and class_table
@@ -2281,25 +2336,20 @@ static void accel_deactivate(void)
* the script is aborted abnormally, they may become messed up.
*/
+ if (ZCG(cwd)) {
+ zend_string_release(ZCG(cwd));
+ ZCG(cwd) = NULL;
+ }
+
if (!ZCG(enabled) || !accel_startup_ok) {
return;
}
- zend_shared_alloc_safe_unlock(); /* be sure we didn't leave cache locked */
- accel_unlock_all();
- ZCG(counted) = 0;
-
#if !ZEND_DEBUG
- if (ZCG(accel_directives).fast_shutdown) {
+ if (ZCG(accel_directives).fast_shutdown && is_zend_mm()) {
zend_accel_fast_shutdown();
}
#endif
-
- if (ZCG(cwd)) {
- zend_string_release(ZCG(cwd));
- ZCG(cwd) = NULL;
- }
-
}
static int accelerator_remove_cb(zend_extension *element1, zend_extension *element2)
@@ -2345,6 +2395,7 @@ static inline int accel_find_sapi(void)
"apache2filter",
"apache2handler",
"litespeed",
+ "uwsgi",
NULL
};
const char **sapi_name;
@@ -2372,6 +2423,7 @@ static int zend_accel_init_shm(void)
accel_shared_globals = zend_shared_alloc(sizeof(zend_accel_shared_globals));
if (!accel_shared_globals) {
zend_accel_error(ACCEL_LOG_FATAL, "Insufficient shared memory!");
+ zend_shared_alloc_unlock();
return FAILURE;
}
ZSMMG(app_shared_globals) = accel_shared_globals;
@@ -2389,6 +2441,7 @@ static int zend_accel_init_shm(void)
ZCSG(interned_strings_start) = zend_shared_alloc((ZCG(accel_directives).interned_strings_buffer * 1024 * 1024));
if (!data || !ZCSG(interned_strings_start)) {
zend_accel_error(ACCEL_LOG_FATAL, ACCELERATOR_PRODUCT_NAME " cannot allocate buffer for interned strings");
+ zend_shared_alloc_unlock();
return FAILURE;
}
HT_SET_DATA_ADDR(&ZCSG(interned_strings), data);
@@ -2454,8 +2507,6 @@ static void accel_globals_dtor(zend_accel_globals *accel_globals)
}
}
-#ifdef HAVE_OPCACHE_FILE_CACHE
-
#define ZEND_BIN_ID "BIN_" ZEND_TOSTR(SIZEOF_CHAR) ZEND_TOSTR(SIZEOF_INT) ZEND_TOSTR(SIZEOF_LONG) ZEND_TOSTR(SIZEOF_SIZE_T) ZEND_TOSTR(SIZEOF_ZEND_LONG) ZEND_TOSTR(ZEND_MM_ALIGNMENT)
static void accel_gen_system_id(void)
@@ -2484,7 +2535,113 @@ static void accel_gen_system_id(void)
md5str[(i * 2) + 1] = c;
}
}
-#endif
+
+#ifdef HAVE_HUGE_CODE_PAGES
+# ifndef _WIN32
+# include <sys/mman.h>
+# ifndef MAP_ANON
+# ifdef MAP_ANONYMOUS
+# define MAP_ANON MAP_ANONYMOUS
+# endif
+# endif
+# ifndef MAP_FAILED
+# define MAP_FAILED ((void*)-1)
+# endif
+# endif
+
+# if defined(MAP_HUGETLB) || defined(MADV_HUGEPAGE)
+static int accel_remap_huge_pages(void *start, size_t size, const char *name, size_t offset)
+{
+ void *ret = MAP_FAILED;
+ void *mem;
+
+ mem = mmap(NULL, size,
+ PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS,
+ -1, 0);
+ if (mem == MAP_FAILED) {
+ zend_error(E_WARNING,
+ ACCELERATOR_PRODUCT_NAME " huge_code_pages: mmap failed: %s (%d)",
+ strerror(errno), errno);
+ return -1;
+ }
+ memcpy(mem, start, size);
+
+# ifdef MAP_HUGETLB
+ ret = mmap(start, size,
+ PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_HUGETLB,
+ -1, 0);
+# endif
+ if (ret == MAP_FAILED) {
+ ret = mmap(start, size,
+ PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
+ -1, 0);
+ /* this should never happen? */
+ ZEND_ASSERT(ret != MAP_FAILED);
+# ifdef MADV_HUGEPAGE
+ if (-1 == madvise(start, size, MADV_HUGEPAGE)) {
+ memcpy(start, mem, size);
+ mprotect(start, size, PROT_READ | PROT_EXEC);
+ munmap(mem, size);
+ zend_error(E_WARNING,
+ ACCELERATOR_PRODUCT_NAME " huge_code_pages: madvise(HUGEPAGE) failed: %s (%d)",
+ strerror(errno), errno);
+ return -1;
+ }
+# else
+ memcpy(start, mem, size);
+ mprotect(start, size, PROT_READ | PROT_EXEC);
+ munmap(mem, size);
+ zend_error(E_WARNING,
+ ACCELERATOR_PRODUCT_NAME " huge_code_pages: mmap(HUGETLB) failed: %s (%d)",
+ strerror(errno), errno);
+ return -1;
+# endif
+ }
+
+ if (ret == start) {
+ memcpy(start, mem, size);
+ mprotect(start, size, PROT_READ | PROT_EXEC);
+ }
+ munmap(mem, size);
+
+ return (ret == start) ? 0 : -1;
+}
+
+static void accel_move_code_to_huge_pages(void)
+{
+ FILE *f;
+ long unsigned int huge_page_size = 2 * 1024 * 1024;
+
+ f = fopen("/proc/self/maps", "r");
+ if (f) {
+ long unsigned int start, end, offset, inode;
+ char perm[5], dev[6], name[MAXPATHLEN];
+ int ret;
+
+ ret = fscanf(f, "%lx-%lx %4s %lx %5s %ld %s\n", &start, &end, perm, &offset, dev, &inode, name);
+ if (ret == 7 && perm[0] == 'r' && perm[1] == '-' && perm[2] == 'x' && name[0] == '/') {
+ long unsigned int seg_start = ZEND_MM_ALIGNED_SIZE_EX(start, huge_page_size);
+ long unsigned int seg_end = (end & ~(huge_page_size-1L));
+
+ if (seg_end > seg_start) {
+ zend_accel_error(ACCEL_LOG_DEBUG, "remap to huge page %lx-%lx %s \n", seg_start, seg_end, name);
+ accel_remap_huge_pages((void*)seg_start, seg_end - seg_start, name, offset + seg_start - start);
+ }
+ }
+ fclose(f);
+ }
+}
+# else
+static void accel_move_code_to_huge_pages(void)
+{
+ zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME ": opcache.huge_code_pages has no affect as huge page is not supported");
+ return;
+}
+# endif /* defined(MAP_HUGETLB) || defined(MADV_HUGEPAGE) */
+#endif /* HAVE_HUGE_CODE_PAGES */
static int accel_startup(zend_extension *extension)
{
@@ -2507,8 +2664,16 @@ static int accel_startup(zend_extension *extension)
return FAILURE;
}
-#ifdef HAVE_OPCACHE_FILE_CACHE
accel_gen_system_id();
+
+#ifdef HAVE_HUGE_CODE_PAGES
+ if (ZCG(accel_directives).huge_code_pages &&
+ (strcmp(sapi_module.name, "cli") == 0 ||
+ strcmp(sapi_module.name, "cli-server") == 0 ||
+ strcmp(sapi_module.name, "cgi-fcgi") == 0 ||
+ strcmp(sapi_module.name, "fpm-fcgi") == 0)) {
+ accel_move_code_to_huge_pages();
+ }
#endif
/* no supported SAPI found - disable acceleration and stop initialization */
@@ -2547,8 +2712,8 @@ static int accel_startup(zend_extension *extension)
zend_accel_error(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - probably not enough shared memory.");
return SUCCESS;
case SUCCESSFULLY_REATTACHED:
- accel_shared_globals = (zend_accel_shared_globals *) ZSMMG(app_shared_globals);
zend_shared_alloc_lock();
+ accel_shared_globals = (zend_accel_shared_globals *) ZSMMG(app_shared_globals);
orig_new_interned_string = zend_new_interned_string;
orig_interned_strings_snapshot = zend_interned_strings_snapshot;
orig_interned_strings_restore = zend_interned_strings_restore;
@@ -2566,6 +2731,15 @@ static int accel_startup(zend_extension *extension)
zend_accel_error(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - can not reattach to exiting shared memory.");
return SUCCESS;
break;
+#if ENABLE_FILE_CACHE_FALLBACK
+ case ALLOC_FALLBACK:
+ zend_shared_alloc_lock();
+ fallback_process = 1;
+ zend_accel_init_auto_globals();
+ zend_shared_alloc_unlock();
+ goto file_cache_fallback;
+ break;
+#endif
}
/* from this point further, shared memory is supposed to be OK */
@@ -2593,6 +2767,9 @@ static int accel_startup(zend_extension *extension)
zend_accel_init_auto_globals();
#endif
}
+#if ENABLE_FILE_CACHE_FALLBACK
+file_cache_fallback:
+#endif
/* Override compiler */
accelerator_orig_compile_file = zend_compile_file;
@@ -2638,6 +2815,8 @@ static int accel_startup(zend_extension *extension)
zend_accel_blacklist_load(&accel_blacklist, ZCG(accel_directives.user_blacklist_filename));
}
+ zend_optimizer_startup();
+
return SUCCESS;
}
@@ -2655,6 +2834,8 @@ void accel_shutdown(void)
zend_ini_entry *ini_entry;
zend_bool file_cache_only = 0;
+ zend_optimizer_shutdown();
+
zend_accel_blacklist_shutdown(&accel_blacklist);
if (!ZCG(enabled) || !accel_startup_ok) {
@@ -2735,13 +2916,16 @@ int accelerator_shm_read_lock(void)
} else {
/* here accelerator is active but we do not hold SHM lock. This means restart was scheduled
or is in progress now */
- accel_activate_add(); /* acquire usage lock */
+ if (accel_activate_add() == FAILURE) { /* acquire usage lock */
+ return FAILURE;
+ }
/* Now if we weren't inside restart, restart would not begin until we remove usage lock */
if (ZCSG(restart_in_progress)) {
/* we already were inside restart this means it's not safe to touch shm */
accel_deactivate_now(); /* drop usage lock */
return FAILURE;
}
+ ZCG(counted) = 1;
}
return SUCCESS;
}
@@ -2757,10 +2941,10 @@ void accelerator_shm_read_unlock(void)
ZEND_EXT_API zend_extension zend_extension_entry = {
ACCELERATOR_PRODUCT_NAME, /* name */
- ACCELERATOR_VERSION, /* version */
+ PHP_VERSION, /* version */
"Zend Technologies", /* author */
"http://www.zend.com/", /* URL */
- "Copyright (c) 1999-2015", /* copyright */
+ "Copyright (c) 1999-2016", /* copyright */
accel_startup, /* startup */
NULL, /* shutdown */
accel_activate, /* per-script activation */
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index 6ce4613d2f..48e0c1b4cc 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -27,8 +27,6 @@
#endif
#define ACCELERATOR_PRODUCT_NAME "Zend OPcache"
-#define PHP_ZENDOPCACHE_VERSION "7.0.6-dev"
-#define ACCELERATOR_VERSION PHP_ZENDOPCACHE_VERSION
/* 2 - added Profiler support, on 20010712 */
/* 3 - added support for Optimizer's encoded-only-files mode */
/* 4 - works with the new Optimizer, that supports the file format with licenses */
@@ -87,14 +85,6 @@
# include <sys/param.h>
#endif
-#define PHP_5_0_X_API_NO 220040412
-#define PHP_5_1_X_API_NO 220051025
-#define PHP_5_2_X_API_NO 220060519
-#define PHP_5_3_X_API_NO 220090626
-#define PHP_5_4_X_API_NO 220100525
-#define PHP_5_5_X_API_NO 220121212
-#define PHP_5_6_X_API_NO 220131226
-
/*** file locking ***/
#ifndef ZEND_WIN32
extern int lock_file;
@@ -127,18 +117,9 @@ extern int lock_file;
# endif
#endif
-#define PZ_REFCOUNT_P(pz) (pz)->refcount__gc
-#define PZ_SET_REFCOUNT_P(pz, v) (pz)->refcount__gc = (v)
-#define PZ_ADDREF_P(pz) ++((pz)->refcount__gc)
-#define PZ_DELREF_P(pz) --((pz)->refcount__gc)
-#define PZ_ISREF_P(pz) (pz)->is_ref__gc
-#define PZ_SET_ISREF_P(pz) Z_SET_ISREF_TO_P(pz, 1)
-#define PZ_UNSET_ISREF_P(pz) Z_SET_ISREF_TO_P(pz, 0)
-#define PZ_SET_ISREF_TO_P(pz, isref) (pz)->is_ref__gc = (isref)
-
-#define DO_ALLOCA(x) do_alloca(x, use_heap)
-#define FREE_ALLOCA(x) free_alloca(x, use_heap)
-
+#if defined(HAVE_OPCACHE_FILE_CACHE) && defined(ZEND_WIN32)
+# define ENABLE_FILE_CACHE_FALLBACK 1
+#endif
#if ZEND_WIN32
typedef unsigned __int64 accel_time_t;
@@ -153,11 +134,8 @@ typedef enum _zend_accel_restart_reason {
} zend_accel_restart_reason;
typedef struct _zend_persistent_script {
- zend_string *full_path; /* full real path with resolved symlinks */
- zend_op_array main_op_array;
- HashTable function_table;
- HashTable class_table;
- zend_long compiler_halt_offset; /* position of __HALT_COMPILER or -1 */
+ zend_script script;
+ zend_long compiler_halt_offset; /* position of __HALT_COMPILER or -1 */
int ping_auto_globals_mask; /* which autoglobals are used by the script */
accel_time_t timestamp; /* the script modification time */
zend_bool corrupted;
@@ -211,14 +189,24 @@ typedef struct _zend_accel_directives {
zend_long log_verbosity_level;
zend_long optimization_level;
+ zend_long opt_debug_level;
zend_long max_file_size;
zend_long interned_strings_buffer;
char *restrict_api;
+#ifndef ZEND_WIN32
+ char *lockfile_path;
+#endif
#ifdef HAVE_OPCACHE_FILE_CACHE
char *file_cache;
zend_bool file_cache_only;
zend_bool file_cache_consistency_checks;
#endif
+#if ENABLE_FILE_CACHE_FALLBACK
+ zend_bool file_cache_fallback;
+#endif
+#ifdef HAVE_HUGE_CODE_PAGES
+ zend_bool huge_code_pages;
+#endif
} zend_accel_directives;
typedef struct _zend_accel_globals {
@@ -242,9 +230,7 @@ typedef struct _zend_accel_globals {
int auto_globals_mask;
time_t request_time;
time_t last_restart_time; /* used to synchronize SHM and in-process caches */
-#ifdef HAVE_OPCACHE_FILE_CACHE
char system_id[32];
-#endif
HashTable xlat_table;
/* preallocated shared-memory block to save current script */
void *mem;
@@ -290,6 +276,9 @@ typedef struct _zend_accel_shared_globals {
} zend_accel_shared_globals;
extern zend_bool accel_startup_ok;
+#if ENABLE_FILE_CACHE_FALLBACK
+extern zend_bool fallback_process;
+#endif
extern zend_accel_shared_globals *accel_shared_globals;
#define ZCSG(element) (accel_shared_globals->element)
@@ -298,7 +287,7 @@ extern zend_accel_shared_globals *accel_shared_globals;
# define ZCG(v) ZEND_TSRMG(accel_globals_id, zend_accel_globals *, v)
extern int accel_globals_id;
# ifdef COMPILE_DL_OPCACHE
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
# endif
#else
# define ZCG(v) (accel_globals.v)
@@ -308,42 +297,21 @@ extern zend_accel_globals accel_globals;
extern char *zps_api_failure_reason;
void accel_shutdown(void);
+int accel_post_deactivate(void);
void zend_accel_schedule_restart(zend_accel_restart_reason reason);
void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason);
accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_t *size);
int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle);
int zend_accel_invalidate(const char *filename, int filename_len, zend_bool force);
-int zend_accel_script_optimize(zend_persistent_script *persistent_script);
int accelerator_shm_read_lock(void);
void accelerator_shm_read_unlock(void);
char *accel_make_persistent_key(const char *path, int path_length, int *key_len);
zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type);
-#if !defined(ZEND_DECLARE_INHERITED_CLASS_DELAYED)
-# define ZEND_DECLARE_INHERITED_CLASS_DELAYED 145
-#endif
-
-#define ZEND_DECLARE_INHERITED_CLASS_DELAYED_FLAG 0x80
-
#define IS_ACCEL_INTERNED(str) \
((char*)(str) >= ZCSG(interned_strings_start) && (char*)(str) < ZCSG(interned_strings_end))
zend_string *accel_new_interned_string(zend_string *str);
-# define ZEND_RESULT_TYPE(opline) (opline)->result_type
-# define ZEND_RESULT(opline) (opline)->result
-# define ZEND_OP1_TYPE(opline) (opline)->op1_type
-# define ZEND_OP1(opline) (opline)->op1
-# define ZEND_OP1_CONST(opline) (*(opline)->op1.zv)
-# define ZEND_OP1_LITERAL(opline) (op_array)->literals[(opline)->op1.constant]
-# define ZEND_OP2_TYPE(opline) (opline)->op2_type
-# define ZEND_OP2(opline) (opline)->op2
-# define ZEND_OP2_CONST(opline) (*(opline)->op2.zv)
-# define ZEND_OP2_LITERAL(opline) (op_array)->literals[(opline)->op2.constant]
-# define ZEND_DONE_PASS_TWO(op_array) (((op_array)->fn_flags & ZEND_ACC_DONE_PASS_TWO) != 0)
-# define ZEND_CE_FILENAME(ce) (ce)->info.user.filename
-# define ZEND_CE_DOC_COMMENT(ce) (ce)->info.user.doc_comment
-# define ZEND_CE_DOC_COMMENT_LEN(ce) (ce)->info.user.doc_comment_len
-
#endif /* ZEND_ACCELERATOR_H */
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
index 856f24ab58..ded7f3dab2 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
@@ -5,19 +5,29 @@ dnl
PHP_ARG_ENABLE(opcache, whether to enable Zend OPcache support,
[ --disable-opcache Disable Zend OPcache support], yes)
-PHP_ARG_ENABLE(opcache-file, whether to enable file based caching (experimental),
-[ --enable-opcache-file Enable file based caching], no)
+PHP_ARG_ENABLE(opcache-file, whether to enable file based caching,
+[ --disable-opcache-file Disable file based caching], yes, no)
+
+PHP_ARG_ENABLE(huge-code-pages, whether to enable copying PHP CODE pages into HUGE PAGES,
+[ --disable-huge-code-pages
+ Disable copying PHP CODE pages into HUGE PAGES], yes, no)
if test "$PHP_OPCACHE" != "no"; then
- if test "$PHP_OPCACHE_FILE" == "yes"; then
+ if test "$PHP_OPCACHE_FILE" = "yes"; then
AC_DEFINE(HAVE_OPCACHE_FILE_CACHE, 1, [Define to enable file based caching (experimental)])
fi
+ if test "$PHP_HUGE_CODE_PAGES" = "yes"; then
+ AC_DEFINE(HAVE_HUGE_CODE_PAGES, 1, [Define to enable copying PHP CODE pages into HUGE PAGES (experimental)])
+ fi
+
AC_CHECK_FUNC(mprotect,[
AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
])
+ AC_CHECK_HEADERS([unistd.h sys/uio.h])
+
AC_MSG_CHECKING(for sysvipc shared memory support)
AC_TRY_RUN([
#include <sys/types.h>
@@ -366,7 +376,7 @@ AC_TRY_RUN([
AC_MSG_RESULT("yes")
], AC_MSG_RESULT("no") )
-if test "$flock_type" == "unknown"; then
+if test "$flock_type" = "unknown"; then
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
fi
@@ -392,7 +402,15 @@ fi
Optimizer/block_pass.c \
Optimizer/optimize_temp_vars_5.c \
Optimizer/nop_removal.c \
- Optimizer/compact_literals.c,
+ Optimizer/compact_literals.c \
+ Optimizer/zend_cfg.c \
+ Optimizer/zend_dfg.c \
+ Optimizer/dfa_pass.c \
+ Optimizer/zend_ssa.c \
+ Optimizer/zend_inference.c \
+ Optimizer/zend_func_info.c \
+ Optimizer/zend_call_graph.c \
+ Optimizer/zend_dump.c,
shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,,yes)
PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
diff --git a/ext/opcache/config.w32 b/ext/opcache/config.w32
index dcc2501ffc..35c4645620 100644
--- a/ext/opcache/config.w32
+++ b/ext/opcache/config.w32
@@ -1,6 +1,6 @@
ARG_ENABLE("opcache", "whether to enable Zend OPcache support", "yes");
-ARG_ENABLE("opcache-file", "whether to enable file based caching (experimental)", "no");
+ARG_ENABLE("opcache-file", "whether to enable file based caching", "yes");
var PHP_OPCACHE_PGO = false;
@@ -23,7 +23,7 @@ if (PHP_OPCACHE != "no") {
zend_shared_alloc.c \
shared_alloc_win32.c", true, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
- ADD_SOURCES(configure_module_dirname + "/Optimizer", "zend_optimizer.c pass1_5.c pass2.c pass3.c optimize_func_calls.c block_pass.c optimize_temp_vars_5.c nop_removal.c compact_literals.c", "opcache", "OptimizerObj");
+ ADD_SOURCES(configure_module_dirname + "/Optimizer", "zend_optimizer.c pass1_5.c pass2.c pass3.c optimize_func_calls.c block_pass.c optimize_temp_vars_5.c nop_removal.c compact_literals.c zend_cfg.c zend_dfg.c dfa_pass.c zend_ssa.c zend_inference.c zend_func_info.c zend_call_graph.c zend_dump.c", "opcache", "OptimizerObj");
ADD_FLAG('CFLAGS_OPCACHE', "/I " + configure_module_dirname);
diff --git a/ext/opcache/shared_alloc_mmap.c b/ext/opcache/shared_alloc_mmap.c
index 62aff7ed43..2c3dc58125 100644
--- a/ext/opcache/shared_alloc_mmap.c
+++ b/ext/opcache/shared_alloc_mmap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/shared_alloc_posix.c b/ext/opcache/shared_alloc_posix.c
index b7197eb6cd..994f3ca609 100644
--- a/ext/opcache/shared_alloc_posix.c
+++ b/ext/opcache/shared_alloc_posix.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c
index 4ca7924a09..6e23ded836 100644
--- a/ext/opcache/shared_alloc_shm.c
+++ b/ext/opcache/shared_alloc_shm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 92cf086ab1..c71f253b0a 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -76,18 +76,18 @@ static void zend_win_error_message(int type, char *msg, int err)
static char *create_name_with_username(char *name)
{
- static char newname[MAXPATHLEN + UNLEN + 4];
+ static char newname[MAXPATHLEN + UNLEN + 4 + 1 + 32];
char uname[UNLEN + 1];
DWORD unsize = UNLEN;
GetUserName(uname, &unsize);
- snprintf(newname, sizeof(newname) - 1, "%s@%s", name, uname);
+ snprintf(newname, sizeof(newname) - 1, "%s@%s@%.32s", name, uname, ZCG(system_id));
return newname;
}
static char *get_mmap_base_file(void)
{
- static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@")];
+ static char windir[MAXPATHLEN+UNLEN + 3 + sizeof("\\\\@") + 1 + 32];
char uname[UNLEN + 1];
DWORD unsize = UNLEN;
int l;
@@ -95,7 +95,7 @@ static char *get_mmap_base_file(void)
GetTempPath(MAXPATHLEN, windir);
GetUserName(uname, &unsize);
l = strlen(windir);
- snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s", ACCEL_FILEMAP_BASE, uname);
+ snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.32s", ACCEL_FILEMAP_BASE, uname, ZCG(system_id));
return windir;
}
@@ -146,13 +146,37 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
return ALLOC_FAILURE;
}
fclose(fp);
-
/* Check if the requested address space is free */
if (VirtualQuery(wanted_mapping_base, &info, sizeof(info)) == 0 ||
info.State != MEM_FREE ||
info.RegionSize < requested_size) {
+#if ENABLE_FILE_CACHE_FALLBACK
+ if (ZCG(accel_directives).file_cache && ZCG(accel_directives).file_cache_fallback) {
+ size_t pre_size, wanted_mb_save;
+
+ wanted_mb_save = (size_t)wanted_mapping_base;
+
+ err = ERROR_INVALID_ADDRESS;
+ zend_win_error_message(ACCEL_LOG_WARNING, "Base address marks unusable memory region (fall-back to file cache)", err);
+
+ pre_size = ZEND_ALIGNED_SIZE(sizeof(zend_smm_shared_globals)) + ZEND_ALIGNED_SIZE(sizeof(zend_shared_segment)) + ZEND_ALIGNED_SIZE(sizeof(void *)) + ZEND_ALIGNED_SIZE(sizeof(int));
+ /* Map only part of SHM to have access opcache shared globals */
+ mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, pre_size + ZEND_ALIGNED_SIZE(sizeof(zend_accel_shared_globals)), NULL);
+ if (mapping_base == NULL) {
+ err = GetLastError();
+ zend_win_error_message(ACCEL_LOG_FATAL, "Unable to reattach to opcache shared globals", err);
+ return ALLOC_FAILURE;
+ }
+ accel_shared_globals = (zend_accel_shared_globals *)((char *)((zend_smm_shared_globals *)mapping_base)->app_shared_globals + ((char *)mapping_base - (char *)wanted_mb_save));
+
+ /* Make this process to use file-cache only */
+ ZCG(accel_directives).file_cache_only = 1;
+
+ return ALLOC_FALLBACK;
+ }
+#endif
err = ERROR_INVALID_ADDRESS;
- zend_win_error_message(ACCEL_LOG_FATAL, "Unable to reattach to base address", err);
+ zend_win_error_message(ACCEL_LOG_FATAL, "Base address marks unusable memory region. Please setup opcache.file_cache and opcache.file_cache_callback directives for more convenient Opcache usage", err);
return ALLOC_FAILURE;
}
@@ -204,14 +228,19 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
err = GetLastError();
if (ret == ALLOC_FAIL_MAPPING) {
/* Mapping failed, wait for mapping object to get freed and retry */
- CloseHandle(memfile);
+ CloseHandle(memfile);
memfile = NULL;
+ if (++map_retries >= MAX_MAP_RETRIES) {
+ break;
+ }
+ zend_shared_alloc_unlock_win32();
Sleep(1000 * (map_retries + 1));
+ zend_shared_alloc_lock_win32();
} else {
zend_shared_alloc_unlock_win32();
return ret;
}
- } while (++map_retries < MAX_MAP_RETRIES);
+ } while (1);
if (map_retries == MAX_MAP_RETRIES) {
zend_shared_alloc_unlock_win32();
@@ -246,29 +275,7 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
be taken (fail to map). So under Vista, we try to map into a hard coded predefined addresses
in high memory. */
if (!ZCG(accel_directives).mmap_base || !*ZCG(accel_directives).mmap_base) {
- do {
- OSVERSIONINFOEX osvi;
- SYSTEM_INFO si;
-
- ZeroMemory(&si, sizeof(SYSTEM_INFO));
- ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
-
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
- if (! GetVersionEx ((OSVERSIONINFO *) &osvi)) {
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
- break;
- }
- }
-
- GetSystemInfo(&si);
-
- /* Are we running Vista ? */
- if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion == 6) {
- wanted_mapping_base = vista_mapping_base_set;
- }
- } while (0);
+ wanted_mapping_base = vista_mapping_base_set;
} else {
char *s = ZCG(accel_directives).mmap_base;
@@ -324,10 +331,13 @@ static int detach_segment(zend_shared_segment *shared_segment)
zend_shared_alloc_lock_win32();
if (mapping_base) {
UnmapViewOfFile(mapping_base);
+ mapping_base = NULL;
}
CloseHandle(memfile);
+ memfile = NULL;
zend_shared_alloc_unlock_win32();
CloseHandle(memory_mutex);
+ memory_mutex = NULL;
return 0;
}
diff --git a/ext/opcache/tests/bug65915.phpt b/ext/opcache/tests/bug65915.phpt
index 6496ee3253..c616c4fb5f 100644
--- a/ext/opcache/tests/bug65915.phpt
+++ b/ext/opcache/tests/bug65915.phpt
@@ -3,6 +3,7 @@ Bug #65915 (Inconsistent results with require return value)
--INI--
opcache.enable=1
opcache.enable_cli=1
+opcache.file_cache_only=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
@@ -13,7 +14,7 @@ file_put_contents($tmp, '<?php return function(){ return "a";};');
$f = require $tmp;
var_dump($f());
-opcache_invalidate($tmp, true);
+var_dump(opcache_invalidate($tmp, true));
file_put_contents($tmp, '<?php return function(){ return "b";};');
$f = require $tmp;
@@ -23,4 +24,5 @@ var_dump($f());
?>
--EXPECT--
string(1) "a"
+bool(true)
string(1) "b"
diff --git a/ext/opcache/tests/bug66338.phpt b/ext/opcache/tests/bug66338.phpt
index ed7f8ab475..6553f83f29 100644
--- a/ext/opcache/tests/bug66338.phpt
+++ b/ext/opcache/tests/bug66338.phpt
@@ -15,13 +15,13 @@ file_put_contents( "$root-Officials.inc", '<?php
file_put_contents( "$root-clientUS.php", '<?php
class LocalTerms { const GOV_LEADER = "Barack Hussein Obama II"; }
- require "'.$root.'-Officials.inc";
+ require \''.$root.'-Officials.inc\';
printf( "The President of the USA is %s\n", Officials::getLeader() );
' );
file_put_contents( "$root-clientUK.php", '<?php
class LocalTerms { const GOV_LEADER = "David William Donald Cameron"; }
- require "'.$root.'-Officials.inc";
+ require \''.$root.'-Officials.inc\';
printf( "The Prime Minister of the UK is %s\n", Officials::getLeader() );
' );
diff --git a/ext/opcache/tests/bug67215.phpt b/ext/opcache/tests/bug67215.phpt
index 24842b4e04..4a9ac7c711 100644
--- a/ext/opcache/tests/bug67215.phpt
+++ b/ext/opcache/tests/bug67215.phpt
@@ -11,7 +11,7 @@ opcache.file_update_protection=0
$file_c = __DIR__ . "/bug67215.c.php";
$file_p = __DIR__ . "/bug67215.p.php";
-file_put_contents($file_c, "<?php require \"$file_p\"; class c extends p {} ?>");
+file_put_contents($file_c, "<?php require '$file_p'; class c extends p {} ?>");
file_put_contents($file_p, '<?php class p { protected $var = ""; } ?>');
require $file_c;
$a = new c();
diff --git a/ext/opcache/tests/bug70111.phpt b/ext/opcache/tests/bug70111.phpt
new file mode 100644
index 0000000000..465d0ee848
--- /dev/null
+++ b/ext/opcache/tests/bug70111.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70111 (Segfault when a function uses both an explicit return type and an explicit cast)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+var_dump(foo());
+
+function foo() : string {
+ return (string) 42;
+}
+?>
+--EXPECT--
+string(2) "42"
diff --git a/ext/opcache/tests/bug70207.phpt b/ext/opcache/tests/bug70207.phpt
new file mode 100644
index 0000000000..c684ee6d33
--- /dev/null
+++ b/ext/opcache/tests/bug70207.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #70207 Finally is broken with opcache
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+opcache.file_update_protection=0
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+function bar() {
+ return "bar";
+}
+function foo() {
+ try { return bar(); }
+ finally { @fclose(null); }
+}
+
+var_dump(foo());
+?>
+--EXPECT--
+string(3) "bar"
diff --git a/ext/opcache/tests/bug70237.phpt b/ext/opcache/tests/bug70237.phpt
new file mode 100644
index 0000000000..6bd0318f0b
--- /dev/null
+++ b/ext/opcache/tests/bug70237.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #70237 (Empty while and do-while segmentation fault with opcode on CLI enabled)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+
+function neverUsed() {
+ $bool = false;
+ while ($bool) { };
+ //do { } while ($bool);
+}
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/opcache/tests/bug70423.phpt b/ext/opcache/tests/bug70423.phpt
new file mode 100644
index 0000000000..030b8a24e8
--- /dev/null
+++ b/ext/opcache/tests/bug70423.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Bug #70423 Warning Internal error: wrong size calculation
+--INI--
+open_basedir=.
+opcache.enabled=1
+opcache.enable_cli=1
+opcache.log_verbosity_level=2
+--FILE--
+<?php
+
+/* forked from Zend\tests\bug53958.phpt */
+
+
+// TEST 1
+$a = 1;
+$fn1 = function() use ($a) {echo "$a\n"; $a++;};
+$fn2 = function() use ($a) {echo "$a\n"; $a++;};
+$a = 5;
+$fn1(); // 1
+$fn2(); // 1
+$fn1(); // 1
+$fn2(); // 1
+
+// TEST 2
+$b = 1;
+$fn1 = function() use (&$b) {echo "$b\n"; $b++;};
+$fn2 = function() use (&$b) {echo "$b\n"; $b++;};
+$b = 5;
+$fn1(); // 5
+$fn2(); // 6
+$fn1(); // 7
+$fn2(); // 8
+
+// TEST 3
+$c = 1;
+$fn1 = function() use (&$c) {echo "$c\n"; $c++;};
+$fn2 = function() use ($c) {echo "$c\n"; $c++;};
+$c = 5;
+$fn1(); // 5
+$fn2(); // 1
+$fn1(); // 6
+$fn2(); // 1
+
+// TEST 4
+$d = 1;
+$fn1 = function() use ($d) {echo "$d\n"; $d++;};
+$fn2 = function() use (&$d) {echo "$d\n"; $d++;};
+$d = 5;
+$fn1(); // 1
+$fn2(); // 5
+$fn1(); // 1
+$fn2(); // 6
+?>
+--EXPECT--
+1
+1
+1
+1
+5
+6
+7
+8
+5
+1
+6
+1
+1
+5
+1
+6
diff --git a/ext/opcache/tests/bug71127.phpt b/ext/opcache/tests/bug71127.phpt
new file mode 100644
index 0000000000..0c606097fe
--- /dev/null
+++ b/ext/opcache/tests/bug71127.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71127 (Define in auto_prepend_file is overwrite)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=0x7FFFBFFF
+--SKIPIF--
+<?php if (!extension_loaded('Zend OPcache')) die("skip"); ?>
+--FILE--
+<?php
+$file = __DIR__ . "/bug71127.inc";
+
+file_put_contents($file, "<?php define('FOO', 'bad'); echo FOO;?>");
+
+define("FOO", "okey");
+
+include($file);
+?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . "/bug71127.inc");
+?>
+--EXPECTF--
+Notice: Constant FOO already defined in %sbug71127.inc on line %d
+okey
diff --git a/ext/opcache/tests/bug71443.phpt b/ext/opcache/tests/bug71443.phpt
new file mode 100644
index 0000000000..558ac075b6
--- /dev/null
+++ b/ext/opcache/tests/bug71443.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #71443 (Segfault using built-in webserver with intl using symfony)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.file_cache=/tmp/
+opcache.file_cache_only=1
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+<?php if (substr(PHP_OS, 0, 3) == 'WIN') die('skip.. not for Windows'); ?>
+--FILE--
+<?php
+ini_set("include_path", "/tmp");
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/opcache/tests/bug71843.phpt b/ext/opcache/tests/bug71843.phpt
new file mode 100644
index 0000000000..73301a6e96
--- /dev/null
+++ b/ext/opcache/tests/bug71843.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #71843 (null ptr deref ZEND_RETURN_SPEC_CONST_HANDLER (zend_vm_execute.h:3479))
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=0xFFFFBFFF
+--SKIPIF--
+<?php if (!extension_loaded('Zend OPcache')) die("skip"); ?>
+--FILE--
+<?php
+0 & ~E & ~R;
+6 && ~See
+?>
+okey
+--EXPECTF--
+Notice: Use of undefined constant E - assumed 'E' in %sbug71843.php on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Notice: Use of undefined constant R - assumed 'R' in %sbug71843.php on line %d
+
+Warning: A non-numeric value encountered in %s on line %d
+
+Notice: Use of undefined constant See - assumed 'See' in %sbug71843.php on line %d
+okey
diff --git a/ext/opcache/tests/bug72014.phpt b/ext/opcache/tests/bug72014.phpt
new file mode 100644
index 0000000000..d2ad96c0f1
--- /dev/null
+++ b/ext/opcache/tests/bug72014.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #72014 (Including a file with anonymous classes multiple times leads to fatal error)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.file_update_protection=0
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+file_put_contents(__DIR__ . "/bug72014.annon.php", <<<PHP
+<?php
+\$a = new class() { public \$testvar = "Foo\n"; };
+echo \$a->testvar;
+PHP
+);
+
+include(__DIR__ . "/bug72014.annon.php");
+include(__DIR__ . "/bug72014.annon.php");
+include(__DIR__ . "/bug72014.annon.php");
+?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . "/bug72014.annon.php")
+?>
+--EXPECT--
+Foo
+Foo
+Foo
diff --git a/ext/opcache/tests/issue0140.phpt b/ext/opcache/tests/issue0140.phpt
index 98e0e45cc2..97fc11b3c7 100644
--- a/ext/opcache/tests/issue0140.phpt
+++ b/ext/opcache/tests/issue0140.phpt
@@ -8,6 +8,7 @@ opcache.file_update_protection=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
+<?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow tests excluded by request") ?>
--FILE--
<?php
define("FILENAME", dirname(__FILE__) . "/issuer0140.inc.php");
diff --git a/ext/opcache/tests/revalidate_path_01.phpt b/ext/opcache/tests/revalidate_path_01.phpt
index cf2ac0d829..8261633334 100644
--- a/ext/opcache/tests/revalidate_path_01.phpt
+++ b/ext/opcache/tests/revalidate_path_01.phpt
@@ -25,16 +25,30 @@ while (filemtime($file1) != filemtime($file2)) {
touch($file1);
touch($file2);
}
-@unlink($link);
-@symlink($dir1, $link);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ @rmdir($link);
+ $ln = str_replace('/', '\\', $link);
+ $d1 = realpath($dir1);
+ `mklink /j $ln $d1`;
+} else {
+ @unlink($link);
+ @symlink($dir1, $link);
+}
include "php_cli_server.inc";
//php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.revalidate_path=1');
php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.revalidate_path=1 -d opcache.file_update_protection=0 -d realpath_cache_size=0');
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/main.php');
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/main.php');
-@unlink($link);
-@symlink($dir2, $link);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ @rmdir($link);
+ $ln = str_replace('/', '\\', $link);
+ $d2 = realpath($dir2);
+ `mklink /j $ln $d2`;
+} else {
+ @unlink($link);
+ @symlink($dir2, $link);
+}
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/main.php');
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/main.php');
?>
@@ -48,7 +62,11 @@ $file1 = "$dir1/index.php";
$file2 = "$dir2/index.php";
$main = "$dir/main.php";
@unlink($main);
-@unlink($link);
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ @rmdir($link);
+} else {
+ @unlink($link);
+}
@unlink($file1);
@unlink($file2);
@rmdir($dir1);
diff --git a/ext/opcache/tests/ssa_bug_001.phpt b/ext/opcache/tests/ssa_bug_001.phpt
new file mode 100644
index 0000000000..56757f56a4
--- /dev/null
+++ b/ext/opcache/tests/ssa_bug_001.phpt
@@ -0,0 +1,19 @@
+--TEST--
+SSA constrution for CFG with unreachable basic blocks
+--FILE--
+<?php
+class X {
+ public function __get($n) {
+ if ($n === 'type') {
+ trigger_error('Deprecated type property called; use instanceof', E_USER_NOTICE);
+ switch (get_class($this)) {
+ case 'HTMLPurifier_Token_Start': return 'start';
+ default: return null;
+ }
+ }
+ }
+}
+?>
+OK
+--EXPECT--
+OK
diff --git a/ext/opcache/tests/ssa_bug_002.phpt b/ext/opcache/tests/ssa_bug_002.phpt
new file mode 100644
index 0000000000..9ff6f799f4
--- /dev/null
+++ b/ext/opcache/tests/ssa_bug_002.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Incorrect NOP removal on jump to NOP
+--FILE--
+<?php
+
+function test(int $i) : int {
+ if ($i == 1) {
+ $x = $i + 1;
+ }
+ return $i;
+}
+var_dump(test(42));
+
+?>
+--EXPECT--
+int(42)
diff --git a/ext/opcache/tests/ssa_bug_003.phpt b/ext/opcache/tests/ssa_bug_003.phpt
new file mode 100644
index 0000000000..2895551c08
--- /dev/null
+++ b/ext/opcache/tests/ssa_bug_003.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Incorrect elision of return type checks
+--FILE--
+<?php
+
+function test1($x) : callable {
+ if ($x == 1) {
+ $c = 'foo';
+ } elseif ($x == 2) {
+ $c = new stdClass;
+ } else {
+ $c = [$x => &$x];
+ }
+ return $c;
+}
+
+try {
+ test1(1);
+} catch (Error $e) {
+ echo "Error: {$e->getMessage()}\n";
+}
+
+class Foo {}
+function test2() : Foo {
+ $obj = new stdClass;
+ return $obj;
+}
+
+try {
+ test2();
+} catch (Error $e) {
+ echo "Error: {$e->getMessage()}\n";
+}
+
+?>
+--EXPECT--
+Error: Return value of test1() must be callable, string returned
+Error: Return value of test2() must be an instance of Foo, instance of stdClass returned
diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c
index a6fe16ad59..df6abe8519 100644
--- a/ext/opcache/zend_accelerator_blacklist.c
+++ b/ext/opcache/zend_accelerator_blacklist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_blacklist.h b/ext/opcache/zend_accelerator_blacklist.h
index ef93ca907c..13197a661c 100644
--- a/ext/opcache/zend_accelerator_blacklist.h
+++ b/ext/opcache/zend_accelerator_blacklist.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_debug.c b/ext/opcache/zend_accelerator_debug.c
index 4dbe43191f..8fcc01b4d4 100644
--- a/ext/opcache/zend_accelerator_debug.c
+++ b/ext/opcache/zend_accelerator_debug.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_debug.h b/ext/opcache/zend_accelerator_debug.h
index 540f4e18cf..5522605013 100644
--- a/ext/opcache/zend_accelerator_debug.h
+++ b/ext/opcache/zend_accelerator_debug.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c
index a1fadd46c9..a533d06120 100644
--- a/ext/opcache/zend_accelerator_hash.c
+++ b/ext/opcache/zend_accelerator_hash.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_hash.h b/ext/opcache/zend_accelerator_hash.h
index 4e8d7242f4..3aa2451d1c 100644
--- a/ext/opcache/zend_accelerator_hash.h
+++ b/ext/opcache/zend_accelerator_hash.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index eb93f59413..61698b4a9f 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -242,7 +242,6 @@ static ZEND_INI_MH(OnEnable)
}
#ifdef HAVE_OPCACHE_FILE_CACHE
-
static ZEND_INI_MH(OnUpdateFileCache)
{
if (new_value) {
@@ -295,12 +294,15 @@ ZEND_INI_BEGIN()
STD_PHP_INI_ENTRY("opcache.fast_shutdown" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.fast_shutdown, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.optimization_level" , DEFAULT_OPTIMIZATION_LEVEL , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.optimization_level, zend_accel_globals, accel_globals)
+ STD_PHP_INI_ENTRY("opcache.opt_debug_level" , "0" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.opt_debug_level, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.enable_file_override" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_override_enabled, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.enable_cli" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.enable_cli, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.error_log" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.error_log, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.restrict_api" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.restrict_api, zend_accel_globals, accel_globals)
-#ifdef ZEND_WIN32
+#ifndef ZEND_WIN32
+ STD_PHP_INI_ENTRY("opcache.lockfile_path" , "/tmp" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.lockfile_path, zend_accel_globals, accel_globals)
+#else
STD_PHP_INI_ENTRY("opcache.mmap_base", NULL, PHP_INI_SYSTEM, OnUpdateString, accel_directives.mmap_base, zend_accel_globals, accel_globals)
#endif
@@ -309,6 +311,12 @@ ZEND_INI_BEGIN()
STD_PHP_INI_ENTRY("opcache.file_cache_only" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_cache_only, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.file_cache_consistency_checks" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_cache_consistency_checks, zend_accel_globals, accel_globals)
#endif
+#if ENABLE_FILE_CACHE_FALLBACK
+ STD_PHP_INI_ENTRY("opcache.file_cache_fallback" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_cache_fallback, zend_accel_globals, accel_globals)
+#endif
+#ifdef HAVE_HUGE_CODE_PAGES
+ STD_PHP_INI_BOOLEAN("opcache.huge_code_pages" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.huge_code_pages, zend_accel_globals, accel_globals)
+#endif
ZEND_INI_END()
static int filename_is_in_cache(zend_string *filename)
@@ -424,12 +432,18 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
{
php_info_print_table_start();
- if (ZCG(enabled) && accel_startup_ok && (ZCG(counted) || ZCSG(accelerator_enabled))) {
+ if (ZCG(enabled) && accel_startup_ok &&
+#ifdef HAVE_OPCACHE_FILE_CACHE
+ ((ZCG(counted) || ZCSG(accelerator_enabled)) || ZCG(accel_directives).file_cache_only)
+#else
+ (ZCG(counted) || ZCSG(accelerator_enabled))
+#endif
+ ) {
php_info_print_table_row(2, "Opcode Caching", "Up and Running");
} else {
php_info_print_table_row(2, "Opcode Caching", "Disabled");
}
- if (ZCG(enabled) && accel_startup_ok && ZCSG(accelerator_enabled) && ZCG(accel_directives).optimization_level) {
+ if (ZCG(enabled) && accel_startup_ok && ZCG(accel_directives).optimization_level) {
php_info_print_table_row(2, "Optimization", "Enabled");
} else {
php_info_print_table_row(2, "Optimization", "Disabled");
@@ -504,8 +518,10 @@ static zend_module_entry accel_module_entry = {
NULL,
NULL,
zend_accel_info,
- ACCELERATOR_VERSION "FE",
- STANDARD_MODULE_PROPERTIES
+ PHP_VERSION,
+ NO_MODULE_GLOBALS,
+ accel_post_deactivate,
+ STANDARD_MODULE_PROPERTIES_EX
};
int start_accel_module(void)
@@ -540,7 +556,7 @@ static int accelerator_get_scripts(zval *return_value)
script = (zend_persistent_script *)cache_entry->data;
array_init(&persistent_script_report);
- add_assoc_str(&persistent_script_report, "full_path", zend_string_dup(script->full_path, 0));
+ add_assoc_str(&persistent_script_report, "full_path", zend_string_dup(script->script.filename, 0));
add_assoc_long(&persistent_script_report, "hits", (zend_long)script->dynamic_members.hits);
add_assoc_long(&persistent_script_report, "memory_consumption", script->dynamic_members.memory_consumption);
ta = localtime(&script->dynamic_members.last_used);
@@ -698,6 +714,10 @@ static ZEND_FUNCTION(opcache_get_configuration)
add_assoc_bool(&directives, "opcache.enable_file_override", ZCG(accel_directives).file_override_enabled);
add_assoc_long(&directives, "opcache.optimization_level", ZCG(accel_directives).optimization_level);
+#ifndef ZEND_WIN32
+ add_assoc_string(&directives, "opcache.lockfile_path", STRING_NOT_NULL(ZCG(accel_directives).lockfile_path));
+#endif
+
#ifdef HAVE_OPCACHE_FILE_CACHE
add_assoc_string(&directives, "opcache.file_cache", ZCG(accel_directives).file_cache ? ZCG(accel_directives).file_cache : "");
add_assoc_bool(&directives, "opcache.file_cache_only", ZCG(accel_directives).file_cache_only);
@@ -708,7 +728,7 @@ static ZEND_FUNCTION(opcache_get_configuration)
/*version */
array_init(&version);
- add_assoc_string(&version, "version", ACCELERATOR_VERSION);
+ add_assoc_string(&version, "version", PHP_VERSION);
add_assoc_string(&version, "opcache_product_name", ACCELERATOR_PRODUCT_NAME);
add_assoc_zval(return_value, "version", &version);
@@ -730,7 +750,11 @@ static ZEND_FUNCTION(opcache_reset)
RETURN_FALSE;
}
- if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled)) {
+ if ((!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled))
+#if ENABLE_FILE_CACHE_FALLBACK
+ && !fallback_process
+#endif
+ ) {
RETURN_FALSE;
}
diff --git a/ext/opcache/zend_accelerator_module.h b/ext/opcache/zend_accelerator_module.h
index 147052dd6b..f519eba718 100644
--- a/ext/opcache/zend_accelerator_module.h
+++ b/ext/opcache/zend_accelerator_module.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index a737e8db6b..61c9c15d2b 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -30,8 +30,8 @@
# define accel_xlat_set(old, new) zend_hash_index_add_new_ptr(&ZCG(bind_hash), (zend_ulong)(zend_uintptr_t)(old), (new))
# define accel_xlat_get(old) zend_hash_index_find_ptr(&ZCG(bind_hash), (zend_ulong)(zend_uintptr_t)(old))
#else
-# define accel_xlat_set(old, new) (zend_hash_str_add_new_ptr(&ZCG(bind_hash), (char*)&(old), sizeof(void*), (zend_ulong)(zend_uintptr_t)(old), (void**)&(new))
-# define accel_xlat_get(old, new) ((new) = zend_hash_str_find_ptr(&ZCG(bind_hash), (char*)&(old), sizeof(void*), (zend_ulong)(zend_uintptr_t)(old), (void**)&(new)))
+# define accel_xlat_set(old, new) zend_hash_str_add_new_ptr(&ZCG(bind_hash), (char*)&(old), sizeof(void*), (old))
+# define accel_xlat_get(old) zend_hash_str_find_ptr(&ZCG(bind_hash), (char*)&(old), sizeof(void*))
#endif
#define ARENA_REALLOC(ptr) \
@@ -40,8 +40,6 @@
typedef int (*id_function_t)(void *, void *);
typedef void (*unique_copy_ctor_func_t)(void *pElement);
-static zend_ast *zend_ast_clone(zend_ast *ast);
-
static void zend_accel_destroy_zend_function(zval *zv)
{
zend_function *function = Z_PTR_P(zv);
@@ -72,12 +70,12 @@ zend_persistent_script* create_persistent_script(void)
zend_persistent_script *persistent_script = (zend_persistent_script *) emalloc(sizeof(zend_persistent_script));
memset(persistent_script, 0, sizeof(zend_persistent_script));
- zend_hash_init(&persistent_script->function_table, 128, NULL, ZEND_FUNCTION_DTOR, 0);
+ zend_hash_init(&persistent_script->script.function_table, 128, NULL, ZEND_FUNCTION_DTOR, 0);
/* class_table is usually destroyed by free_persistent_script() that
* overrides destructor. ZEND_CLASS_DTOR may be used by standard
* PHP compiler
*/
- zend_hash_init(&persistent_script->class_table, 16, NULL, ZEND_CLASS_DTOR, 0);
+ zend_hash_init(&persistent_script->script.class_table, 16, NULL, ZEND_CLASS_DTOR, 0);
return persistent_script;
}
@@ -85,18 +83,18 @@ zend_persistent_script* create_persistent_script(void)
void free_persistent_script(zend_persistent_script *persistent_script, int destroy_elements)
{
if (destroy_elements) {
- persistent_script->function_table.pDestructor = zend_accel_destroy_zend_function;
- persistent_script->class_table.pDestructor = zend_accel_destroy_zend_class;
+ persistent_script->script.function_table.pDestructor = zend_accel_destroy_zend_function;
+ persistent_script->script.class_table.pDestructor = zend_accel_destroy_zend_class;
} else {
- persistent_script->function_table.pDestructor = NULL;
- persistent_script->class_table.pDestructor = NULL;
+ persistent_script->script.function_table.pDestructor = NULL;
+ persistent_script->script.class_table.pDestructor = NULL;
}
- zend_hash_destroy(&persistent_script->function_table);
- zend_hash_destroy(&persistent_script->class_table);
+ zend_hash_destroy(&persistent_script->script.function_table);
+ zend_hash_destroy(&persistent_script->script.class_table);
- if (persistent_script->full_path) {
- zend_string_release(persistent_script->full_path);
+ if (persistent_script->script.filename) {
+ zend_string_release(persistent_script->script.filename);
}
efree(persistent_script);
@@ -169,67 +167,13 @@ static inline void zend_clone_zval(zval *src)
src = Z_REFVAL_P(src);
}
}
- if (Z_TYPE_P(src) == IS_CONSTANT_AST) {
- if (Z_REFCOUNT_P(src) > 1 && (ptr = accel_xlat_get(Z_AST_P(src))) != NULL) {
- Z_AST_P(src) = ptr;
- } else {
- zend_ast_ref *old = Z_AST_P(src);
-
- ZVAL_NEW_AST(src, old->ast);
- Z_AST_P(src)->gc = old->gc;
- if (Z_REFCOUNT_P(src) > 1) {
- accel_xlat_set(old, Z_AST_P(src));
- }
- Z_ASTVAL_P(src) = zend_ast_clone(Z_ASTVAL_P(src));
- }
- }
-}
-
-static zend_ast *zend_ast_clone(zend_ast *ast)
-{
- uint32_t i;
-
- if (ast->kind == ZEND_AST_ZVAL) {
- zend_ast_zval *copy = emalloc(sizeof(zend_ast_zval));
- copy->kind = ZEND_AST_ZVAL;
- copy->attr = ast->attr;
- ZVAL_COPY_VALUE(&copy->val, zend_ast_get_zval(ast));
- return (zend_ast *) copy;
- } else if (zend_ast_is_list(ast)) {
- zend_ast_list *list = zend_ast_get_list(ast);
- zend_ast_list *copy = emalloc(
- sizeof(zend_ast_list) - sizeof(zend_ast *) + sizeof(zend_ast *) * list->children);
- copy->kind = list->kind;
- copy->attr = list->attr;
- copy->children = list->children;
- for (i = 0; i < list->children; i++) {
- if (list->child[i]) {
- copy->child[i] = zend_ast_clone(list->child[i]);
- } else {
- copy->child[i] = NULL;
- }
- }
- return (zend_ast *) copy;
- } else {
- uint32_t children = zend_ast_get_num_children(ast);
- zend_ast *copy = emalloc(sizeof(zend_ast) - sizeof(zend_ast *) + sizeof(zend_ast *) * children);
- copy->kind = ast->kind;
- copy->attr = ast->attr;
- for (i = 0; i < children; i++) {
- if (ast->child[i]) {
- copy->child[i] = zend_ast_clone(ast->child[i]);
- } else {
- copy->child[i] = NULL;
- }
- }
- return copy;
- }
}
static void zend_hash_clone_constants(HashTable *ht, HashTable *source)
{
Bucket *p, *q, *end;
zend_ulong nIndex;
+ zend_class_constant *c;
ht->nTableSize = source->nTableSize;
ht->nTableMask = source->nTableMask;
@@ -265,8 +209,14 @@ static void zend_hash_clone_constants(HashTable *ht, HashTable *source)
q->key = p->key;
/* Copy data */
- ZVAL_COPY_VALUE(&q->val, &p->val);
- zend_clone_zval(&q->val);
+ c = ARENA_REALLOC(Z_PTR(p->val));
+ ZVAL_PTR(&q->val, c);
+
+ zend_clone_zval(&c->value);
+ if ((void*)c->ce >= ZCG(current_persistent_script)->arena_mem &&
+ (void*)c->ce < (void*)((char*)ZCG(current_persistent_script)->arena_mem + ZCG(current_persistent_script)->arena_size)) {
+ c->ce = ARENA_REALLOC(c->ce);
+ }
}
}
@@ -610,7 +560,6 @@ failure:
static void zend_accel_class_hash_copy(HashTable *target, HashTable *source, unique_copy_ctor_func_t pCopyConstructor)
{
- zend_class_entry *ce1;
Bucket *p, *end;
zval *t;
@@ -626,7 +575,17 @@ static void zend_accel_class_hash_copy(HashTable *target, HashTable *source, uni
/* Mangled key - ignore and wait for runtime */
continue;
} else if (UNEXPECTED(!ZCG(accel_directives).ignore_dups)) {
- goto failure;
+ zend_class_entry *ce1 = Z_PTR(p->val);
+ if (!(ce1->ce_flags & ZEND_ACC_ANON_CLASS)) {
+ CG(in_compilation) = 1;
+ zend_set_compiled_filename(ce1->info.user.filename);
+ CG(zend_lineno) = ce1->info.user.line_start;
+ zend_error(E_ERROR,
+ "Cannot declare %s %s, because the name is already in use",
+ zend_get_object_type(ce1), ZSTR_VAL(ce1->name));
+ return;
+ }
+ continue;
}
} else {
t = _zend_hash_append_ptr(target, p->key, Z_PTR(p->val));
@@ -637,13 +596,6 @@ static void zend_accel_class_hash_copy(HashTable *target, HashTable *source, uni
}
target->nInternalPointer = target->nNumOfElements ? 0 : HT_INVALID_IDX;
return;
-
-failure:
- ce1 = Z_PTR(p->val);
- CG(in_compilation) = 1;
- zend_set_compiled_filename(ce1->info.user.filename);
- CG(zend_lineno) = ce1->info.user.line_start;
- zend_error(E_ERROR, "Cannot declare %s %s, because the name is already in use", zend_get_object_type(ce1), ZSTR_VAL(ce1->name));
}
#ifdef __SSE2__
@@ -658,16 +610,17 @@ static zend_always_inline void fast_memcpy(void *dest, const void *src, size_t s
do {
_mm_prefetch(dqsrc + 4, _MM_HINT_NTA);
+ _mm_prefetch(dqdest + 4, _MM_HINT_T0);
__m128i xmm0 = _mm_load_si128(dqsrc + 0);
__m128i xmm1 = _mm_load_si128(dqsrc + 1);
__m128i xmm2 = _mm_load_si128(dqsrc + 2);
__m128i xmm3 = _mm_load_si128(dqsrc + 3);
dqsrc += 4;
- _mm_stream_si128(dqdest + 0, xmm0);
- _mm_stream_si128(dqdest + 1, xmm1);
- _mm_stream_si128(dqdest + 2, xmm2);
- _mm_stream_si128(dqdest + 3, xmm3);
+ _mm_store_si128(dqdest + 0, xmm0);
+ _mm_store_si128(dqdest + 1, xmm1);
+ _mm_store_si128(dqdest + 2, xmm2);
+ _mm_store_si128(dqdest + 3, xmm3);
dqdest += 4;
} while (dqsrc != end);
}
@@ -678,7 +631,7 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script,
zend_op_array *op_array;
op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
- *op_array = persistent_script->main_op_array;
+ *op_array = persistent_script->script.main_op_array;
if (EXPECTED(from_shared_memory)) {
zend_hash_init(&ZCG(bind_hash), 10, NULL, NULL, 0);
@@ -698,22 +651,22 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script,
}
/* Copy all the necessary stuff from shared memory to regular memory, and protect the shared script */
- if (zend_hash_num_elements(&persistent_script->class_table) > 0) {
- zend_accel_class_hash_copy(CG(class_table), &persistent_script->class_table, (unique_copy_ctor_func_t) zend_class_copy_ctor);
+ if (zend_hash_num_elements(&persistent_script->script.class_table) > 0) {
+ zend_accel_class_hash_copy(CG(class_table), &persistent_script->script.class_table, (unique_copy_ctor_func_t) zend_class_copy_ctor);
}
/* we must first to copy all classes and then prepare functions, since functions may try to bind
classes - which depend on pre-bind class entries existent in the class table */
- if (zend_hash_num_elements(&persistent_script->function_table) > 0) {
- zend_accel_function_hash_copy_from_shm(CG(function_table), &persistent_script->function_table);
+ if (zend_hash_num_elements(&persistent_script->script.function_table) > 0) {
+ zend_accel_function_hash_copy_from_shm(CG(function_table), &persistent_script->script.function_table);
}
/* Register __COMPILER_HALT_OFFSET__ constant */
if (persistent_script->compiler_halt_offset != 0 &&
- persistent_script->full_path) {
+ persistent_script->script.filename) {
zend_string *name;
char haltoff[] = "__COMPILER_HALT_OFFSET__";
- name = zend_mangle_property_name(haltoff, sizeof(haltoff) - 1, ZSTR_VAL(persistent_script->full_path), ZSTR_LEN(persistent_script->full_path), 0);
+ name = zend_mangle_property_name(haltoff, sizeof(haltoff) - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persistent_script->script.filename), 0);
if (!zend_hash_exists(EG(zend_constants), name)) {
zend_register_long_constant(ZSTR_VAL(name), ZSTR_LEN(name), persistent_script->compiler_halt_offset, CONST_CS, 0);
}
@@ -723,17 +676,17 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script,
zend_hash_destroy(&ZCG(bind_hash));
ZCG(current_persistent_script) = NULL;
} else /* if (!from_shared_memory) */ {
- if (zend_hash_num_elements(&persistent_script->function_table) > 0) {
- zend_accel_function_hash_copy(CG(function_table), &persistent_script->function_table);
+ if (zend_hash_num_elements(&persistent_script->script.function_table) > 0) {
+ zend_accel_function_hash_copy(CG(function_table), &persistent_script->script.function_table);
}
- if (zend_hash_num_elements(&persistent_script->class_table) > 0) {
- zend_accel_class_hash_copy(CG(class_table), &persistent_script->class_table, NULL);
+ if (zend_hash_num_elements(&persistent_script->script.class_table) > 0) {
+ zend_accel_class_hash_copy(CG(class_table), &persistent_script->script.class_table, NULL);
}
}
if (op_array->early_binding != (uint32_t)-1) {
zend_string *orig_compiled_filename = CG(compiled_filename);
- CG(compiled_filename) = persistent_script->full_path;
+ CG(compiled_filename) = persistent_script->script.filename;
zend_do_delayed_early_binding(op_array);
CG(compiled_filename) = orig_compiled_filename;
}
diff --git a/ext/opcache/zend_accelerator_util_funcs.h b/ext/opcache/zend_accelerator_util_funcs.h
index e2d8433145..4cfd77d4ed 100644
--- a/ext/opcache/zend_accelerator_util_funcs.h
+++ b/ext/opcache/zend_accelerator_util_funcs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c
index 0781b91c9d..6ac4f0e35f 100644
--- a/ext/opcache/zend_file_cache.c
+++ b/ext/opcache/zend_file_cache.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -20,6 +20,7 @@
#include "zend_virtual_cwd.h"
#include "zend_compile.h"
#include "zend_vm.h"
+#include "zend_interfaces.h"
#include "php.h"
@@ -35,6 +36,10 @@
#include <sys/stat.h>
#include <fcntl.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#ifdef HAVE_SYS_UIO_H
# include <sys/uio.h>
#endif
@@ -219,15 +224,16 @@ static void *zend_file_cache_unserialize_interned(zend_string *str, int in_shm)
zend_string *ret;
str = (zend_string*)((char*)ZCG(mem) + ((size_t)(str) & ~Z_UL(1)));
- ret = accel_new_interned_string(str);
- if (ret == str) {
- /* String wasn't interned but we will use it as interned anyway */
- if (in_shm) {
+ if (in_shm) {
+ ret = accel_new_interned_string(str);
+ if (ret == str) {
+ /* String wasn't interned but we will use it as interned anyway */
GC_FLAGS(ret) |= IS_STR_INTERNED | IS_STR_PERMANENT;
- } else {
- GC_FLAGS(ret) |= IS_STR_INTERNED;
- GC_FLAGS(ret) &= ~IS_STR_PERMANENT;
}
+ } else {
+ ret = str;
+ GC_FLAGS(ret) |= IS_STR_INTERNED;
+ GC_FLAGS(ret) &= ~IS_STR_PERMANENT;
}
return ret;
}
@@ -367,7 +373,6 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra
}
if (!IS_SERIALIZED(op_array->opcodes)) {
-#if ZEND_USE_ABS_CONST_ADDR || ZEND_USE_ABS_JMP_ADDR
zend_op *opline, *end;
SERIALIZE_PTR(op_array->opcodes);
@@ -375,21 +380,18 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra
UNSERIALIZE_PTR(opline);
end = opline + op_array->last;
while (opline < end) {
-# if ZEND_USE_ABS_CONST_ADDR
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+#if ZEND_USE_ABS_CONST_ADDR
+ if (opline->op1_type == IS_CONST) {
SERIALIZE_PTR(opline->op1.zv);
}
- if (ZEND_OP2_TYPE(opline) == IS_CONST) {
+ if (opline->op2_type == IS_CONST) {
SERIALIZE_PTR(opline->op2.zv);
}
-# endif
-# if ZEND_USE_ABS_JMP_ADDR
+#endif
+#if ZEND_USE_ABS_JMP_ADDR
switch (opline->opcode) {
case ZEND_JMP:
- case ZEND_GOTO:
case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
SERIALIZE_PTR(opline->op1.jmp_addr);
break;
case ZEND_JMPZNZ:
@@ -401,23 +403,22 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
case ZEND_COALESCE:
- case ZEND_NEW:
case ZEND_FE_RESET_R:
case ZEND_FE_RESET_RW:
case ZEND_ASSERT_CHECK:
SERIALIZE_PTR(opline->op2.jmp_addr);
break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
/* relative extended_value don't have to be changed */
break;
}
-# endif
+#endif
+ zend_serialize_opcode_handler(opline);
opline++;
}
-#else
- SERIALIZE_PTR(op_array->opcodes);
-#endif
if (op_array->arg_info) {
zend_arg_info *p, *end;
@@ -459,7 +460,7 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra
SERIALIZE_STR(op_array->function_name);
SERIALIZE_STR(op_array->filename);
- SERIALIZE_PTR(op_array->brk_cont_array);
+ SERIALIZE_PTR(op_array->live_range);
SERIALIZE_PTR(op_array->scope);
SERIALIZE_STR(op_array->doc_comment);
SERIALIZE_PTR(op_array->try_catch_array);
@@ -504,6 +505,28 @@ static void zend_file_cache_serialize_prop_info(zval *zv,
}
}
+static void zend_file_cache_serialize_class_constant(zval *zv,
+ zend_persistent_script *script,
+ zend_file_cache_metainfo *info,
+ void *buf)
+{
+ if (!IS_SERIALIZED(Z_PTR_P(zv))) {
+ zend_class_constant *c;
+
+ SERIALIZE_PTR(Z_PTR_P(zv));
+ c = Z_PTR_P(zv);
+ UNSERIALIZE_PTR(c);
+
+ zend_file_cache_serialize_zval(&c->value, script, info, buf);
+ if (c->ce && !IS_SERIALIZED(c->ce)) {
+ SERIALIZE_PTR(c->ce);
+ }
+ if (c->doc_comment && !IS_SERIALIZED(c->doc_comment)) {
+ SERIALIZE_STR(c->doc_comment);
+ }
+ }
+}
+
static void zend_file_cache_serialize_class(zval *zv,
zend_persistent_script *script,
zend_file_cache_metainfo *info,
@@ -541,9 +564,9 @@ static void zend_file_cache_serialize_class(zval *zv,
p++;
}
}
- zend_file_cache_serialize_hash(&ce->constants_table, script, info, buf, zend_file_cache_serialize_zval);
- SERIALIZE_STR(ZEND_CE_FILENAME(ce));
- SERIALIZE_STR(ZEND_CE_DOC_COMMENT(ce));
+ zend_file_cache_serialize_hash(&ce->constants_table, script, info, buf, zend_file_cache_serialize_class_constant);
+ SERIALIZE_STR(ce->info.user.filename);
+ SERIALIZE_STR(ce->info.user.doc_comment);
zend_file_cache_serialize_hash(&ce->properties_info, script, info, buf, zend_file_cache_serialize_prop_info);
if (ce->trait_aliases) {
@@ -655,36 +678,61 @@ static void zend_file_cache_serialize(zend_persistent_script *script,
memcpy(buf, script->mem, script->size);
new_script = (zend_persistent_script*)((char*)buf + info->script_offset);
- SERIALIZE_STR(new_script->full_path);
+ SERIALIZE_STR(new_script->script.filename);
- zend_file_cache_serialize_hash(&new_script->class_table, script, info, buf, zend_file_cache_serialize_class);
- zend_file_cache_serialize_hash(&new_script->function_table, script, info, buf, zend_file_cache_serialize_func);
- zend_file_cache_serialize_op_array(&new_script->main_op_array, script, info, buf);
+ zend_file_cache_serialize_hash(&new_script->script.class_table, script, info, buf, zend_file_cache_serialize_class);
+ zend_file_cache_serialize_hash(&new_script->script.function_table, script, info, buf, zend_file_cache_serialize_func);
+ zend_file_cache_serialize_op_array(&new_script->script.main_op_array, script, info, buf);
SERIALIZE_PTR(new_script->arena_mem);
new_script->mem = NULL;
}
-int zend_file_cache_script_store(zend_persistent_script *script, int in_shm)
+static char *zend_file_cache_get_bin_file_path(zend_string *script_path)
{
size_t len;
+ char *filename;
+
+ len = strlen(ZCG(accel_directives).file_cache);
+ filename = emalloc(len + 33 + ZSTR_LEN(script_path) + sizeof(SUFFIX));
+ memcpy(filename, ZCG(accel_directives).file_cache, len);
+#ifndef ZEND_WIN32
+ filename[len] = '/';
+ memcpy(filename + len + 1, ZCG(system_id), 32);
+ memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path));
+ memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX));
+#else
+ filename[len] = '\\';
+ memcpy(filename + len + 1, ZCG(system_id), 32);
+ if (ZSTR_LEN(script_path) >= 2 && ':' == ZSTR_VAL(script_path)[1]) {
+ /* local fs */
+ *(filename + len + 33) = '\\';
+ *(filename + len + 34) = ZSTR_VAL(script_path)[0];
+ memcpy(filename + len + 35, ZSTR_VAL(script_path) + 2, ZSTR_LEN(script_path) - 2);
+ memcpy(filename + len + 35 + ZSTR_LEN(script_path) - 2, SUFFIX, sizeof(SUFFIX));
+ } else {
+ /* network path */
+ memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path));
+ memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX));
+ }
+#endif
+
+ return filename;
+}
+
+int zend_file_cache_script_store(zend_persistent_script *script, int in_shm)
+{
int fd;
char *filename;
zend_file_cache_metainfo info;
-#ifndef ZEND_WIN32
+#ifdef HAVE_SYS_UIO_H
struct iovec vec[3];
#endif
void *mem, *buf;
- len = strlen(ZCG(accel_directives).file_cache);
- filename = emalloc(len + 33 + ZSTR_LEN(script->full_path) + sizeof(SUFFIX));
- memcpy(filename, ZCG(accel_directives).file_cache, len);
- filename[len] = '/';
- memcpy(filename + len + 1, ZCG(system_id), 32);
- memcpy(filename + len + 33, ZSTR_VAL(script->full_path), ZSTR_LEN(script->full_path));
- memcpy(filename + len + 33 + ZSTR_LEN(script->full_path), SUFFIX, sizeof(SUFFIX));
+ filename = zend_file_cache_get_bin_file_path(script->script.filename);
- if (zend_file_cache_mkdir(filename, len) != SUCCESS) {
+ if (zend_file_cache_mkdir(filename, strlen(ZCG(accel_directives).file_cache)) != SUCCESS) {
zend_accel_error(ACCEL_LOG_WARNING, "opcache cannot create directory for file '%s'\n", filename);
efree(filename);
return FAILURE;
@@ -732,7 +780,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm)
info.checksum = zend_adler32(ADLER32_INIT, buf, script->size);
info.checksum = zend_adler32(info.checksum, (signed char*)ZSTR_VAL((zend_string*)ZCG(mem)), info.str_size);
-#ifndef ZEND_WIN32
+#ifdef HAVE_SYS_UIO_H
vec[0].iov_base = &info;
vec[0].iov_len = sizeof(info);
vec[1].iov_base = buf;
@@ -777,10 +825,12 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm)
static void zend_file_cache_unserialize_hash(HashTable *ht,
zend_persistent_script *script,
void *buf,
- unserialize_callback_t func)
+ unserialize_callback_t func,
+ dtor_func_t dtor)
{
Bucket *p, *end;
+ ht->pDestructor = dtor;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
return;
@@ -845,7 +895,8 @@ static void zend_file_cache_unserialize_zval(zval *zv,
UNSERIALIZE_PTR(Z_ARR_P(zv));
ht = Z_ARR_P(zv);
- zend_file_cache_unserialize_hash(ht, script, buf, zend_file_cache_unserialize_zval);
+ zend_file_cache_unserialize_hash(ht,
+ script, buf, zend_file_cache_unserialize_zval, ZVAL_PTR_DTOR);
}
break;
case IS_REFERENCE:
@@ -880,7 +931,8 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
UNSERIALIZE_PTR(op_array->static_variables);
ht = op_array->static_variables;
- zend_file_cache_unserialize_hash(ht, script, buf, zend_file_cache_unserialize_zval);
+ zend_file_cache_unserialize_hash(ht,
+ script, buf, zend_file_cache_unserialize_zval, ZVAL_PTR_DTOR);
}
if (op_array->literals && !IS_UNSERIALIZED(op_array->literals)) {
@@ -903,20 +955,17 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
end = opline + op_array->last;
while (opline < end) {
# if ZEND_USE_ABS_CONST_ADDR
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ if (opline->op1_type == IS_CONST) {
UNSERIALIZE_PTR(opline->op1.zv);
}
- if (ZEND_OP2_TYPE(opline) == IS_CONST) {
+ if (opline->op2_type == IS_CONST) {
UNSERIALIZE_PTR(opline->op2.zv);
}
# endif
# if ZEND_USE_ABS_JMP_ADDR
switch (opline->opcode) {
case ZEND_JMP:
- case ZEND_GOTO:
case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
UNSERIALIZE_PTR(opline->op1.jmp_addr);
break;
case ZEND_JMPZNZ:
@@ -928,19 +977,20 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
case ZEND_COALESCE:
- case ZEND_NEW:
case ZEND_FE_RESET_R:
case ZEND_FE_RESET_RW:
case ZEND_ASSERT_CHECK:
UNSERIALIZE_PTR(opline->op2.jmp_addr);
break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
/* relative extended_value don't have to be changed */
break;
}
# endif
- ZEND_VM_SET_OPCODE_HANDLER(opline);
+ zend_deserialize_opcode_handler(opline);
opline++;
}
@@ -982,7 +1032,7 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
UNSERIALIZE_STR(op_array->function_name);
UNSERIALIZE_STR(op_array->filename);
- UNSERIALIZE_PTR(op_array->brk_cont_array);
+ UNSERIALIZE_PTR(op_array->live_range);
UNSERIALIZE_PTR(op_array->scope);
UNSERIALIZE_STR(op_array->doc_comment);
UNSERIALIZE_PTR(op_array->try_catch_array);
@@ -1023,6 +1073,26 @@ static void zend_file_cache_unserialize_prop_info(zval *zv,
}
}
+static void zend_file_cache_unserialize_class_constant(zval *zv,
+ zend_persistent_script *script,
+ void *buf)
+{
+ if (!IS_UNSERIALIZED(Z_PTR_P(zv))) {
+ zend_class_constant *c;
+
+ UNSERIALIZE_PTR(Z_PTR_P(zv));
+ c = Z_PTR_P(zv);
+
+ zend_file_cache_unserialize_zval(&c->value, script, buf);
+ if (c->ce && !IS_UNSERIALIZED(c->ce)) {
+ UNSERIALIZE_PTR(c->ce);
+ }
+ if (c->doc_comment && !IS_UNSERIALIZED(c->doc_comment)) {
+ UNSERIALIZE_STR(c->doc_comment);
+ }
+ }
+}
+
static void zend_file_cache_unserialize_class(zval *zv,
zend_persistent_script *script,
void *buf)
@@ -1033,7 +1103,8 @@ static void zend_file_cache_unserialize_class(zval *zv,
ce = Z_PTR_P(zv);
UNSERIALIZE_STR(ce->name);
- zend_file_cache_unserialize_hash(&ce->function_table, script, buf, zend_file_cache_unserialize_func);
+ zend_file_cache_unserialize_hash(&ce->function_table,
+ script, buf, zend_file_cache_unserialize_func, ZEND_FUNCTION_DTOR);
if (ce->default_properties_table) {
zval *p, *end;
@@ -1056,10 +1127,12 @@ static void zend_file_cache_unserialize_class(zval *zv,
p++;
}
}
- zend_file_cache_unserialize_hash(&ce->constants_table, script, buf, zend_file_cache_unserialize_zval);
- UNSERIALIZE_STR(ZEND_CE_FILENAME(ce));
- UNSERIALIZE_STR(ZEND_CE_DOC_COMMENT(ce));
- zend_file_cache_unserialize_hash(&ce->properties_info, script, buf, zend_file_cache_unserialize_prop_info);
+ zend_file_cache_unserialize_hash(&ce->constants_table,
+ script, buf, zend_file_cache_unserialize_class_constant, NULL);
+ UNSERIALIZE_STR(ce->info.user.filename);
+ UNSERIALIZE_STR(ce->info.user.doc_comment);
+ zend_file_cache_unserialize_hash(&ce->properties_info,
+ script, buf, zend_file_cache_unserialize_prop_info, ZVAL_PTR_DTOR);
if (ce->trait_aliases) {
zend_trait_alias **p, *q;
@@ -1145,6 +1218,11 @@ static void zend_file_cache_unserialize_class(zval *zv,
UNSERIALIZE_PTR(ce->__tostring);
UNSERIALIZE_PTR(ce->__callstatic);
UNSERIALIZE_PTR(ce->__debugInfo);
+
+ if (UNEXPECTED((ce->ce_flags & ZEND_ACC_ANON_CLASS))) {
+ ce->serialize = zend_class_serialize_deny;
+ ce->unserialize = zend_class_unserialize_deny;
+ }
}
static void zend_file_cache_unserialize(zend_persistent_script *script,
@@ -1152,11 +1230,13 @@ static void zend_file_cache_unserialize(zend_persistent_script *script,
{
script->mem = buf;
- UNSERIALIZE_STR(script->full_path);
+ UNSERIALIZE_STR(script->script.filename);
- zend_file_cache_unserialize_hash(&script->class_table, script, buf, zend_file_cache_unserialize_class);
- zend_file_cache_unserialize_hash(&script->function_table, script, buf, zend_file_cache_unserialize_func);
- zend_file_cache_unserialize_op_array(&script->main_op_array, script, buf);
+ zend_file_cache_unserialize_hash(&script->script.class_table,
+ script, buf, zend_file_cache_unserialize_class, ZEND_CLASS_DTOR);
+ zend_file_cache_unserialize_hash(&script->script.function_table,
+ script, buf, zend_file_cache_unserialize_func, ZEND_FUNCTION_DTOR);
+ zend_file_cache_unserialize_op_array(&script->script.main_op_array, script, buf);
UNSERIALIZE_PTR(script->arena_mem);
}
@@ -1164,7 +1244,6 @@ static void zend_file_cache_unserialize(zend_persistent_script *script,
zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handle)
{
zend_string *full_path = file_handle->opened_path;
- size_t len;
int fd;
char *filename;
zend_persistent_script *script;
@@ -1176,13 +1255,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
if (!full_path) {
return NULL;
}
- len = strlen(ZCG(accel_directives).file_cache);
- filename = emalloc(len + 33 + ZSTR_LEN(full_path) + sizeof(SUFFIX));
- memcpy(filename, ZCG(accel_directives).file_cache, len);
- filename[len] = '/';
- memcpy(filename + len + 1, ZCG(system_id), 32);
- memcpy(filename + len + 33, ZSTR_VAL(full_path), ZSTR_LEN(full_path));
- memcpy(filename + len + 33 + ZSTR_LEN(full_path), SUFFIX, sizeof(SUFFIX));
+ filename = zend_file_cache_get_bin_file_path(full_path);
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0) {
@@ -1206,9 +1279,16 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
}
/* verify header */
- if (memcmp(info.magic, "OPCACHE", 8) != 0 ||
- memcmp(info.system_id, ZCG(system_id), 32) != 0) {
- zend_accel_error(ACCEL_LOG_WARNING, "opcache cannot read from file '%s'\n", filename);
+ if (memcmp(info.magic, "OPCACHE", 8) != 0) {
+ zend_accel_error(ACCEL_LOG_WARNING, "opcache cannot read from file '%s' (wrong header)\n", filename);
+ zend_file_cache_flock(fd, LOCK_UN);
+ close(fd);
+ unlink(filename);
+ efree(filename);
+ return NULL;
+ }
+ if (memcmp(info.system_id, ZCG(system_id), 32) != 0) {
+ zend_accel_error(ACCEL_LOG_WARNING, "opcache cannot read from file '%s' (wrong \"system_id\")\n", filename);
zend_file_cache_flock(fd, LOCK_UN);
close(fd);
unlink(filename);
@@ -1261,7 +1341,9 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
return NULL;
}
- if (!ZCG(accel_directives).file_cache_only) {
+ if (!ZCG(accel_directives).file_cache_only &&
+ !ZCSG(restart_in_progress) &&
+ accelerator_shm_read_lock() == SUCCESS) {
/* exclusive lock */
zend_shared_alloc_lock();
@@ -1315,8 +1397,9 @@ use_process_mem:
if (cache_it) {
script->dynamic_members.checksum = zend_accel_script_checksum(script);
+ script->dynamic_members.last_used = ZCG(request_time);
- zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(script->full_path), ZSTR_LEN(script->full_path), 0, script);
+ zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(script->script.filename), ZSTR_LEN(script->script.filename), 0, script);
zend_shared_alloc_unlock();
zend_arena_release(&CG(arena), checkpoint);
@@ -1328,16 +1411,9 @@ use_process_mem:
void zend_file_cache_invalidate(zend_string *full_path)
{
- size_t len;
char *filename;
- len = strlen(ZCG(accel_directives).file_cache);
- filename = emalloc(len + 33 + ZSTR_LEN(full_path) + sizeof(SUFFIX));
- memcpy(filename, ZCG(accel_directives).file_cache, len);
- filename[len] = '/';
- memcpy(filename + len + 1, ZCG(system_id), 32);
- memcpy(filename + len + 33, ZSTR_VAL(full_path), ZSTR_LEN(full_path));
- memcpy(filename + len + 33 + ZSTR_LEN(full_path), SUFFIX, sizeof(SUFFIX));
+ filename = zend_file_cache_get_bin_file_path(full_path);
unlink(filename);
efree(filename);
diff --git a/ext/opcache/zend_file_cache.h b/ext/opcache/zend_file_cache.h
index 575a6aa72a..69e8acd1d3 100644
--- a/ext/opcache/zend_file_cache.h
+++ b/ext/opcache/zend_file_cache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index bbcb20713b..25a504575d 100644
--- a/ext/opcache/zend_persist.c
+++ b/ext/opcache/zend_persist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -65,7 +65,6 @@
typedef void (*zend_persist_func_t)(zval*);
static void zend_persist_zval(zval *z);
-static void zend_persist_zval_const(zval *z);
static const uint32_t uninitialized_bucket[-HT_MIN_MASK] =
{HT_INVALID_IDX, HT_INVALID_IDX};
@@ -79,6 +78,13 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
return;
}
+ if (ht->nNumUsed == 0) {
+ efree(HT_GET_DATA_ADDR(ht));
+ ht->nTableMask = HT_MIN_MASK;
+ HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
+ ht->u.flags &= ~HASH_FLAG_INITIALIZED;
+ return;
+ }
if (ht->u.flags & HASH_FLAG_PACKED) {
void *data = HT_GET_DATA_ADDR(ht);
zend_accel_store(data, HT_USED_SIZE(ht));
@@ -87,12 +93,18 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
/* compact table */
void *old_data = HT_GET_DATA_ADDR(ht);
Bucket *old_buckets = ht->arData;
- int32_t hash_size = -(int32_t)ht->nTableMask;
+ int32_t hash_size;
- while (hash_size >> 1 > ht->nNumUsed) {
- hash_size >>= 1;
+ if (ht->nNumUsed <= HT_MIN_SIZE) {
+ hash_size = HT_MIN_SIZE;
+ } else {
+ hash_size = -(int32_t)ht->nTableMask;
+ while (hash_size >> 1 > ht->nNumUsed) {
+ hash_size >>= 1;
+ }
}
ht->nTableMask = -hash_size;
+ ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
HT_SET_DATA_ADDR(ht, ZCG(mem));
ZCG(mem) = (void*)((char*)ZCG(mem) + ZEND_ALIGNED_SIZE((hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket))));
HT_HASH_RESET(ht);
@@ -120,6 +132,7 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
void *data = ZCG(mem);
void *old_data = HT_GET_DATA_ADDR(ht);
+ ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
ZCG(mem) = (void*)((char*)data + HT_USED_SIZE(ht));
memcpy(data, old_data, HT_USED_SIZE(ht));
efree(old_data);
@@ -149,18 +162,31 @@ static void zend_hash_persist_immutable(HashTable *ht)
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
return;
}
+ if (ht->nNumUsed == 0) {
+ efree(HT_GET_DATA_ADDR(ht));
+ ht->nTableMask = HT_MIN_MASK;
+ HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
+ ht->u.flags &= ~HASH_FLAG_INITIALIZED;
+ return;
+ }
if (ht->u.flags & HASH_FLAG_PACKED) {
HT_SET_DATA_ADDR(ht, zend_accel_memdup(HT_GET_DATA_ADDR(ht), HT_USED_SIZE(ht)));
} else if (ht->nNumUsed < -(int32_t)ht->nTableMask / 2) {
/* compact table */
void *old_data = HT_GET_DATA_ADDR(ht);
Bucket *old_buckets = ht->arData;
- int32_t hash_size = -(int32_t)ht->nTableMask;
+ int32_t hash_size;
- while (hash_size >> 1 > ht->nNumUsed) {
- hash_size >>= 1;
+ if (ht->nNumUsed <= HT_MIN_SIZE) {
+ hash_size = HT_MIN_SIZE;
+ } else {
+ hash_size = -(int32_t)ht->nTableMask;
+ while (hash_size >> 1 > ht->nNumUsed) {
+ hash_size >>= 1;
+ }
}
ht->nTableMask = -hash_size;
+ ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
HT_SET_DATA_ADDR(ht, ZCG(mem));
ZCG(mem) = (void*)((char*)ZCG(mem) + (hash_size * sizeof(uint32_t)) + (ht->nNumUsed * sizeof(Bucket)));
HT_HASH_RESET(ht);
@@ -177,7 +203,7 @@ static void zend_hash_persist_immutable(HashTable *ht)
}
/* persist the data itself */
- zend_persist_zval_const(&p->val);
+ zend_persist_zval(&p->val);
nIndex = p->h | ht->nTableMask;
Z_NEXT(p->val) = HT_HASH(ht, nIndex);
@@ -187,6 +213,7 @@ static void zend_hash_persist_immutable(HashTable *ht)
} else {
void *data = ZCG(mem);
+ ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
ZCG(mem) = (void*)((char*)data + HT_USED_SIZE(ht));
memcpy(data, HT_GET_DATA_ADDR(ht), HT_USED_SIZE(ht));
HT_SET_DATA_ADDR(ht, data);
@@ -201,7 +228,7 @@ static void zend_hash_persist_immutable(HashTable *ht)
}
/* persist the data itself */
- zend_persist_zval_const(&p->val);
+ zend_persist_zval(&p->val);
}
}
@@ -250,63 +277,10 @@ static void zend_persist_zval(zval *z)
zend_accel_store_interned_string(Z_STR_P(z));
Z_GC_FLAGS_P(z) |= flags;
Z_TYPE_FLAGS_P(z) &= ~(IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE);
- break;
- case IS_ARRAY:
- new_ptr = zend_shared_alloc_get_xlat_entry(Z_ARR_P(z));
- if (new_ptr) {
- Z_ARR_P(z) = new_ptr;
- Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE;
- } else {
- if (Z_IMMUTABLE_P(z)) {
- Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array));
- zend_hash_persist_immutable(Z_ARRVAL_P(z));
- } else {
- GC_REMOVE_FROM_BUFFER(Z_ARR_P(z));
- zend_accel_store(Z_ARR_P(z), sizeof(zend_array));
- zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval);
- /* make immutable array */
- Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE;
- GC_REFCOUNT(Z_COUNTED_P(z)) = 2;
- GC_FLAGS(Z_COUNTED_P(z)) |= IS_ARRAY_IMMUTABLE;
- Z_ARRVAL_P(z)->u.flags |= HASH_FLAG_STATIC_KEYS;
- Z_ARRVAL_P(z)->u.flags &= ~HASH_FLAG_APPLY_PROTECTION;
- }
+ if (Z_TYPE_P(z) == IS_CONSTANT) {
+ Z_TYPE_FLAGS_P(z) |= IS_TYPE_IMMUTABLE;
}
break;
- case IS_REFERENCE:
- new_ptr = zend_shared_alloc_get_xlat_entry(Z_REF_P(z));
- if (new_ptr) {
- Z_REF_P(z) = new_ptr;
- } else {
- zend_accel_store(Z_REF_P(z), sizeof(zend_reference));
- zend_persist_zval(Z_REFVAL_P(z));
- }
- break;
- case IS_CONSTANT_AST:
- new_ptr = zend_shared_alloc_get_xlat_entry(Z_AST_P(z));
- if (new_ptr) {
- Z_AST_P(z) = new_ptr;
- } else {
- zend_accel_store(Z_AST_P(z), sizeof(zend_ast_ref));
- Z_ASTVAL_P(z) = zend_persist_ast(Z_ASTVAL_P(z));
- }
- break;
- }
-}
-
-static void zend_persist_zval_static(zval *z)
-{
- zend_uchar flags;
- void *new_ptr;
-
- switch (Z_TYPE_P(z)) {
- case IS_STRING:
- case IS_CONSTANT:
- flags = Z_GC_FLAGS_P(z) & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT);
- zend_accel_store_interned_string(Z_STR_P(z));
- Z_GC_FLAGS_P(z) |= flags;
- Z_TYPE_FLAGS_P(z) &= ~(IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE);
- break;
case IS_ARRAY:
new_ptr = zend_shared_alloc_get_xlat_entry(Z_ARR_P(z));
if (new_ptr) {
@@ -353,62 +327,6 @@ static void zend_persist_zval_static(zval *z)
}
}
-static void zend_persist_zval_const(zval *z)
-{
- zend_uchar flags;
- void *new_ptr;
-
- switch (Z_TYPE_P(z)) {
- case IS_STRING:
- case IS_CONSTANT:
- flags = Z_GC_FLAGS_P(z) & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT);
- zend_accel_memdup_interned_string(Z_STR_P(z));
- Z_GC_FLAGS_P(z) |= flags;
- Z_TYPE_FLAGS_P(z) &= ~(IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE);
- break;
- case IS_ARRAY:
- new_ptr = zend_shared_alloc_get_xlat_entry(Z_ARR_P(z));
- if (new_ptr) {
- Z_ARR_P(z) = new_ptr;
- Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE;
- } else {
- if (Z_IMMUTABLE_P(z)) {
- Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array));
- zend_hash_persist_immutable(Z_ARRVAL_P(z));
- } else {
- GC_REMOVE_FROM_BUFFER(Z_ARR_P(z));
- zend_accel_store(Z_ARR_P(z), sizeof(zend_array));
- zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval);
- /* make immutable array */
- Z_TYPE_FLAGS_P(z) = IS_TYPE_IMMUTABLE;
- GC_REFCOUNT(Z_COUNTED_P(z)) = 2;
- GC_FLAGS(Z_COUNTED_P(z)) |= IS_ARRAY_IMMUTABLE;
- Z_ARRVAL_P(z)->u.flags |= HASH_FLAG_STATIC_KEYS;
- Z_ARRVAL_P(z)->u.flags &= ~HASH_FLAG_APPLY_PROTECTION;
- }
- }
- break;
- case IS_REFERENCE:
- new_ptr = zend_shared_alloc_get_xlat_entry(Z_REF_P(z));
- if (new_ptr) {
- Z_REF_P(z) = new_ptr;
- } else {
- zend_accel_store(Z_REF_P(z), sizeof(zend_reference));
- zend_persist_zval(Z_REFVAL_P(z));
- }
- break;
- case IS_CONSTANT_AST:
- new_ptr = zend_shared_alloc_get_xlat_entry(Z_AST_P(z));
- if (new_ptr) {
- Z_AST_P(z) = new_ptr;
- } else {
- zend_accel_store(Z_AST_P(z), sizeof(zend_ast_ref));
- Z_ASTVAL_P(z) = zend_persist_ast(Z_ASTVAL_P(z));
- }
- break;
- }
-}
-
static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_script* main_persistent_script)
{
int already_stored = 0;
@@ -444,7 +362,7 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
if (stored) {
op_array->static_variables = stored;
} else {
- zend_hash_persist(op_array->static_variables, zend_persist_zval_static);
+ zend_hash_persist(op_array->static_variables, zend_persist_zval);
zend_accel_store(op_array->static_variables, sizeof(HashTable));
/* make immutable array */
GC_REFCOUNT(op_array->static_variables) = 2;
@@ -489,23 +407,20 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
for (; opline < end ; opline++, offset++) {
# if ZEND_USE_ABS_CONST_ADDR
- if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+ if (opline->op1_type == IS_CONST) {
opline->op1.zv = (zval*)((char*)opline->op1.zv + ((char*)op_array->literals - (char*)orig_literals));
}
- if (ZEND_OP2_TYPE(opline) == IS_CONST) {
+ if (opline->op2_type == IS_CONST) {
opline->op2.zv = (zval*)((char*)opline->op2.zv + ((char*)op_array->literals - (char*)orig_literals));
}
# endif
# if ZEND_USE_ABS_JMP_ADDR
- if (ZEND_DONE_PASS_TWO(op_array)) {
+ if (op_array->fn_flags & ZEND_ACC_DONE_PASS_TWO) {
/* fix jumps to point to new array */
switch (opline->opcode) {
case ZEND_JMP:
- case ZEND_GOTO:
case ZEND_FAST_CALL:
- case ZEND_DECLARE_ANON_CLASS:
- case ZEND_DECLARE_ANON_INHERITED_CLASS:
- ZEND_OP1(opline).jmp_addr = &new_opcodes[ZEND_OP1(opline).jmp_addr - op_array->opcodes];
+ opline->op1.jmp_addr = &new_opcodes[opline->op1.jmp_addr - op_array->opcodes];
break;
case ZEND_JMPZNZ:
/* relative extended_value don't have to be changed */
@@ -516,12 +431,13 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
case ZEND_COALESCE:
- case ZEND_NEW:
case ZEND_FE_RESET_R:
case ZEND_FE_RESET_RW:
case ZEND_ASSERT_CHECK:
- ZEND_OP2(opline).jmp_addr = &new_opcodes[ZEND_OP2(opline).jmp_addr - op_array->opcodes];
+ opline->op2.jmp_addr = &new_opcodes[opline->op2.jmp_addr - op_array->opcodes];
break;
+ case ZEND_DECLARE_ANON_CLASS:
+ case ZEND_DECLARE_ANON_INHERITED_CLASS:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
/* relative extended_value don't have to be changed */
@@ -590,8 +506,8 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
op_array->arg_info = arg_info;
}
- if (op_array->brk_cont_array) {
- zend_accel_store(op_array->brk_cont_array, sizeof(zend_brk_cont_element) * op_array->last_brk_cont);
+ if (op_array->live_range) {
+ zend_accel_store(op_array->live_range, sizeof(zend_live_range) * op_array->last_live_range);
}
if (op_array->scope) {
@@ -640,6 +556,8 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
} else {
op_array->prototype = NULL;
}
+
+ ZCG(mem) = (void*)((char*)ZCG(mem) + ZEND_ALIGNED_SIZE(zend_extensions_op_array_persist(op_array, ZCG(mem))));
}
static void zend_persist_op_array(zval *zv)
@@ -687,6 +605,39 @@ static void zend_persist_property_info(zval *zv)
}
}
+static void zend_persist_class_constant(zval *zv)
+{
+ zend_class_constant *c = zend_shared_alloc_get_xlat_entry(Z_PTR_P(zv));
+
+ if (c) {
+ Z_PTR_P(zv) = c;
+ return;
+ }
+ memcpy(ZCG(arena_mem), Z_PTR_P(zv), sizeof(zend_class_constant));
+ zend_shared_alloc_register_xlat_entry(Z_PTR_P(zv), ZCG(arena_mem));
+ c = Z_PTR_P(zv) = ZCG(arena_mem);
+ ZCG(arena_mem) = (void*)((char*)ZCG(arena_mem) + ZEND_ALIGNED_SIZE(sizeof(zend_class_constant)));
+ zend_persist_zval(&c->value);
+ c->ce = zend_shared_alloc_get_xlat_entry(c->ce);
+ if (c->doc_comment) {
+ if (ZCG(accel_directives).save_comments) {
+ zend_string *doc_comment = zend_shared_alloc_get_xlat_entry(c->doc_comment);
+ if (doc_comment) {
+ c->doc_comment = doc_comment;
+ } else {
+ zend_accel_store_string(c->doc_comment);
+ }
+ } else {
+ zend_string *doc_comment = zend_shared_alloc_get_xlat_entry(c->doc_comment);
+ if (!doc_comment) {
+ zend_shared_alloc_register_xlat_entry(c->doc_comment, c->doc_comment);
+ zend_string_release(c->doc_comment);
+ }
+ c->doc_comment = NULL;
+ }
+ }
+}
+
static void zend_persist_class_entry(zval *zv)
{
zend_class_entry *ce = Z_PTR_P(zv);
@@ -716,21 +667,21 @@ static void zend_persist_class_entry(zval *zv)
}
ce->static_members_table = NULL;
- zend_hash_persist(&ce->constants_table, zend_persist_zval);
+ zend_hash_persist(&ce->constants_table, zend_persist_class_constant);
- if (ZEND_CE_FILENAME(ce)) {
+ if (ce->info.user.filename) {
/* do not free! PHP has centralized filename storage, compiler will free it */
- zend_accel_memdup_string(ZEND_CE_FILENAME(ce));
+ zend_accel_memdup_string(ce->info.user.filename);
}
- if (ZEND_CE_DOC_COMMENT(ce)) {
+ if (ce->info.user.doc_comment) {
if (ZCG(accel_directives).save_comments) {
- zend_accel_store_string(ZEND_CE_DOC_COMMENT(ce));
+ zend_accel_store_string(ce->info.user.doc_comment);
} else {
- if (!zend_shared_alloc_get_xlat_entry(ZEND_CE_DOC_COMMENT(ce))) {
- zend_shared_alloc_register_xlat_entry(ZEND_CE_DOC_COMMENT(ce), ZEND_CE_DOC_COMMENT(ce));
- zend_string_release(ZEND_CE_DOC_COMMENT(ce));
+ if (!zend_shared_alloc_get_xlat_entry(ce->info.user.doc_comment)) {
+ zend_shared_alloc_register_xlat_entry(ce->info.user.doc_comment, ce->info.user.doc_comment);
+ zend_string_release(ce->info.user.doc_comment);
}
- ZEND_CE_DOC_COMMENT(ce) = NULL;
+ ce->info.user.doc_comment = NULL;
}
}
zend_hash_persist(&ce->properties_info, zend_persist_property_info);
@@ -870,25 +821,28 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
{
script->mem = ZCG(mem);
+ ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
zend_shared_alloc_clear_xlat_table();
zend_accel_store(script, sizeof(zend_persistent_script));
if (key && *key) {
*key = zend_accel_memdup(*key, key_length + 1);
}
- zend_accel_store_string(script->full_path);
+ zend_accel_store_string(script->script.filename);
#ifdef __SSE2__
/* Align to 64-byte boundary */
ZCG(mem) = (void*)(((zend_uintptr_t)ZCG(mem) + 63L) & ~63L);
+#else
+ ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
#endif
script->arena_mem = ZCG(arena_mem) = ZCG(mem);
ZCG(mem) = (void*)((char*)ZCG(mem) + script->arena_size);
- zend_accel_persist_class_table(&script->class_table);
- zend_hash_persist(&script->function_table, zend_persist_op_array);
- zend_persist_op_array_ex(&script->main_op_array, script);
+ zend_accel_persist_class_table(&script->script.class_table);
+ zend_hash_persist(&script->script.function_table, zend_persist_op_array);
+ zend_persist_op_array_ex(&script->script.main_op_array, script);
return script;
}
diff --git a/ext/opcache/zend_persist.h b/ext/opcache/zend_persist.h
index e4d5cb4379..a03689ee44 100644
--- a/ext/opcache/zend_persist.h
+++ b/ext/opcache/zend_persist.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index d78cc59259..22e74d6b36 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,7 +34,9 @@
# define ADD_STRING(str) ADD_DUP_SIZE((str), _ZSTR_STRUCT_SIZE(ZSTR_LEN(str)))
# define ADD_INTERNED_STRING(str, do_free) do { \
- if (!IS_ACCEL_INTERNED(str)) { \
+ if (ZCG(current_persistent_script)->corrupted) { \
+ ADD_STRING(str); \
+ } else if (!IS_ACCEL_INTERNED(str)) { \
zend_string *tmp = accel_new_interned_string(str); \
if (tmp != (str)) { \
if (do_free) { \
@@ -54,16 +56,21 @@ static void zend_hash_persist_calc(HashTable *ht, void (*pPersistElement)(zval *
uint idx;
Bucket *p;
- if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
+ if (!(ht->u.flags & HASH_FLAG_INITIALIZED) || ht->nNumUsed == 0) {
return;
}
if (!(ht->u.flags & HASH_FLAG_PACKED) && ht->nNumUsed < -(int32_t)ht->nTableMask / 2) {
/* compact table */
- int32_t hash_size = -(int32_t)ht->nTableMask;
+ int32_t hash_size;
- while (hash_size >> 1 > ht->nNumUsed) {
- hash_size >>= 1;
+ if (ht->nNumUsed <= HT_MIN_SIZE) {
+ hash_size = HT_MIN_SIZE;
+ } else {
+ hash_size = -(int32_t)ht->nTableMask;
+ while (hash_size >> 1 > ht->nNumUsed) {
+ hash_size >>= 1;
+ }
}
ADD_SIZE(hash_size * sizeof(uint32_t) + ht->nNumUsed * sizeof(Bucket));
} else {
@@ -121,7 +128,7 @@ static void zend_persist_zval_calc(zval *z)
case IS_CONSTANT:
flags = Z_GC_FLAGS_P(z) & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT);
ADD_INTERNED_STRING(Z_STR_P(z), 0);
- if (!Z_REFCOUNTED_P(z)) {
+ if (ZSTR_IS_INTERNED(Z_STR_P(z))) {
Z_TYPE_FLAGS_P(z) &= ~ (IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE);
}
Z_GC_FLAGS_P(z) |= flags;
@@ -229,8 +236,8 @@ static void zend_persist_op_array_calc_ex(zend_op_array *op_array)
}
}
- if (op_array->brk_cont_array) {
- ADD_DUP_SIZE(op_array->brk_cont_array, sizeof(zend_brk_cont_element) * op_array->last_brk_cont);
+ if (op_array->live_range) {
+ ADD_DUP_SIZE(op_array->live_range, sizeof(zend_live_range) * op_array->last_live_range);
}
if (ZCG(accel_directives).save_comments && op_array->doc_comment) {
@@ -249,6 +256,8 @@ static void zend_persist_op_array_calc_ex(zend_op_array *op_array)
ADD_INTERNED_STRING(op_array->vars[i], 0);
}
}
+
+ ADD_SIZE(ZEND_ALIGNED_SIZE(zend_extensions_op_array_persist_calc(op_array)));
}
static void zend_persist_op_array_calc(zval *zv)
@@ -285,6 +294,21 @@ static void zend_persist_property_info_calc(zval *zv)
}
}
+static void zend_persist_class_constant_calc(zval *zv)
+{
+ zend_class_constant *c = Z_PTR_P(zv);
+
+ if (!zend_shared_alloc_get_xlat_entry(c)) {
+ zend_shared_alloc_register_xlat_entry(c, c);
+ ADD_ARENA_SIZE(sizeof(zend_class_constant));
+ zend_persist_zval_calc(&c->value);
+ if (ZCG(accel_directives).save_comments && c->doc_comment) {
+ ADD_STRING(c->doc_comment);
+ }
+ }
+}
+
+
static void zend_persist_class_entry_calc(zval *zv)
{
zend_class_entry *ce = Z_PTR_P(zv);
@@ -309,13 +333,13 @@ static void zend_persist_class_entry_calc(zval *zv)
zend_persist_zval_calc(&ce->default_static_members_table[i]);
}
}
- zend_hash_persist_calc(&ce->constants_table, zend_persist_zval_calc);
+ zend_hash_persist_calc(&ce->constants_table, zend_persist_class_constant_calc);
- if (ZEND_CE_FILENAME(ce)) {
- ADD_STRING(ZEND_CE_FILENAME(ce));
+ if (ce->info.user.filename) {
+ ADD_STRING(ce->info.user.filename);
}
- if (ZCG(accel_directives).save_comments && ZEND_CE_DOC_COMMENT(ce)) {
- ADD_STRING(ZEND_CE_DOC_COMMENT(ce));
+ if (ZCG(accel_directives).save_comments && ce->info.user.doc_comment) {
+ ADD_STRING(ce->info.user.doc_comment);
}
zend_hash_persist_calc(&ce->properties_info, zend_persist_property_info_calc);
@@ -378,22 +402,26 @@ uint zend_accel_script_persist_calc(zend_persistent_script *new_persistent_scrip
new_persistent_script->size = 0;
new_persistent_script->arena_mem = NULL;
new_persistent_script->arena_size = 0;
+ new_persistent_script->corrupted = 0;
ZCG(current_persistent_script) = new_persistent_script;
ADD_DUP_SIZE(new_persistent_script, sizeof(zend_persistent_script));
if (key) {
ADD_DUP_SIZE(key, key_length + 1);
+ } else {
+ /* script is not going to be saved in SHM */
+ new_persistent_script->corrupted = 1;
}
- ADD_STRING(new_persistent_script->full_path);
+ ADD_STRING(new_persistent_script->script.filename);
#ifdef __SSE2__
/* Align size to 64-byte boundary */
new_persistent_script->size = (new_persistent_script->size + 63) & ~63;
#endif
- zend_accel_persist_class_table_calc(&new_persistent_script->class_table);
- zend_hash_persist_calc(&new_persistent_script->function_table, zend_persist_op_array_calc);
- zend_persist_op_array_calc_ex(&new_persistent_script->main_op_array);
+ zend_accel_persist_class_table_calc(&new_persistent_script->script.class_table);
+ zend_hash_persist_calc(&new_persistent_script->script.function_table, zend_persist_op_array_calc);
+ zend_persist_op_array_calc_ex(&new_persistent_script->script.main_op_array);
#ifdef __SSE2__
/* Align size to 64-byte boundary */
@@ -401,6 +429,7 @@ uint zend_accel_script_persist_calc(zend_persistent_script *new_persistent_scrip
#endif
new_persistent_script->size += new_persistent_script->arena_size;
+ new_persistent_script->corrupted = 0;
ZCG(current_persistent_script) = NULL;
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index ca50ab9219..ff42c4cf0b 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -38,7 +38,6 @@
# include "sys/mman.h"
#endif
-#define TMP_DIR "/tmp"
#define SEM_FILENAME_PREFIX ".ZendSem."
#define S_H(s) g_shared_alloc_handler->s
@@ -55,7 +54,7 @@ zend_smm_shared_globals *smm_shared_globals;
static MUTEX_T zts_lock;
#endif
int lock_file;
-static char lockfile_name[sizeof(TMP_DIR) + sizeof(SEM_FILENAME_PREFIX) + 8];
+static char lockfile_name[MAXPATHLEN];
#endif
static const zend_shared_memory_handler_entry handler_table[] = {
@@ -75,7 +74,7 @@ static const zend_shared_memory_handler_entry handler_table[] = {
};
#ifndef ZEND_WIN32
-void zend_shared_alloc_create_lock(void)
+void zend_shared_alloc_create_lock(char *lockfile_path)
{
int val;
@@ -83,7 +82,7 @@ void zend_shared_alloc_create_lock(void)
zts_lock = tsrm_mutex_alloc();
#endif
- sprintf(lockfile_name, "%s/%sXXXXXX", TMP_DIR, SEM_FILENAME_PREFIX);
+ snprintf(lockfile_name, sizeof(lockfile_name), "%s/%sXXXXXX", lockfile_path, SEM_FILENAME_PREFIX);
lock_file = mkstemp(lockfile_name);
fchmod(lock_file, 0666);
@@ -163,7 +162,11 @@ int zend_shared_alloc_startup(size_t requested_size)
smm_shared_globals = &tmp_shared_globals;
ZSMMG(shared_free) = requested_size; /* goes to tmp_shared_globals.shared_free */
+#ifndef ZEND_WIN32
+ zend_shared_alloc_create_lock(ZCG(accel_directives).lockfile_path);
+#else
zend_shared_alloc_create_lock();
+#endif
if (ZCG(accel_directives).memory_model && ZCG(accel_directives).memory_model[0]) {
char *model = ZCG(accel_directives).memory_model;
@@ -187,6 +190,11 @@ int zend_shared_alloc_startup(size_t requested_size)
smm_shared_globals = NULL;
return res;
}
+#if ENABLE_FILE_CACHE_FALLBACK
+ if (ALLOC_FALLBACK == res) {
+ return ALLOC_FALLBACK;
+ }
+#endif
if (!g_shared_alloc_handler) {
/* try memory handlers in order */
@@ -207,6 +215,11 @@ int zend_shared_alloc_startup(size_t requested_size)
if (res == SUCCESSFULLY_REATTACHED) {
return res;
}
+#if ENABLE_FILE_CACHE_FALLBACK
+ if (ALLOC_FALLBACK == res) {
+ return ALLOC_FALLBACK;
+ }
+#endif
shared_segments_array_size = ZSMMG(shared_segments_count) * S_H(segment_type_size)();
@@ -313,6 +326,7 @@ void *zend_shared_alloc(size_t size)
ZSMMG(shared_segments)[i]->pos += block_size;
ZSMMG(shared_free) -= block_size;
memset(retval, 0, block_size);
+ ZEND_ASSERT(((zend_uintptr_t)retval & 0x7) == 0); /* should be 8 byte aligned */
return retval;
}
}
@@ -485,6 +499,10 @@ void zend_accel_shared_protect(int mode)
#ifdef HAVE_MPROTECT
int i;
+ if (!smm_shared_globals) {
+ return;
+ }
+
if (mode) {
mode = PROT_READ;
} else {
@@ -496,3 +514,20 @@ void zend_accel_shared_protect(int mode)
}
#endif
}
+
+int zend_accel_in_shm(void *ptr)
+{
+ int i;
+
+ if (!smm_shared_globals) {
+ return 0;
+ }
+
+ for (i = 0; i < ZSMMG(shared_segments_count); i++) {
+ if ((char*)ptr >= (char*)ZSMMG(shared_segments)[i]->p &&
+ (char*)ptr < (char*)ZSMMG(shared_segments)[i]->p + ZSMMG(shared_segments)[i]->size) {
+ return 1;
+ }
+ }
+ return 0;
+}
diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h
index 63947169b4..03b82d16ac 100644
--- a/ext/opcache/zend_shared_alloc.h
+++ b/ext/opcache/zend_shared_alloc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend OPcache |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 The PHP Group |
+ | Copyright (c) 1998-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -68,6 +68,7 @@
#define FAILED_REATTACHED 2
#define SUCCESSFULLY_REATTACHED 4
#define ALLOC_FAIL_MAPPING 8
+#define ALLOC_FALLBACK 9
typedef struct _zend_shared_segment {
size_t size;
@@ -127,6 +128,8 @@ void *zend_shared_alloc(size_t size);
void *_zend_shared_memdup(void *p, size_t size, zend_bool free_source);
int zend_shared_memdup_size(void *p, size_t size);
+int zend_accel_in_shm(void *ptr);
+
typedef union _align_test {
void *ptr;
double dbl;
@@ -134,13 +137,13 @@ typedef union _align_test {
} align_test;
#if ZEND_GCC_VERSION >= 2000
-# define PLATFORM_ALIGNMENT (__alignof__ (align_test))
+# define PLATFORM_ALIGNMENT (__alignof__(align_test) < 8 ? 8 : __alignof__(align_test))
#else
# define PLATFORM_ALIGNMENT (sizeof(align_test))
#endif
#define ZEND_ALIGNED_SIZE(size) \
- ((size + PLATFORM_ALIGNMENT - 1) & ~(PLATFORM_ALIGNMENT - 1))
+ ZEND_MM_ALIGNED_SIZE_EX(size, PLATFORM_ALIGNMENT)
/* exclusive locking */
void zend_shared_alloc_lock(void);
diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4
index a9484b4acc..01fc89b28d 100644
--- a/ext/openssl/config0.m4
+++ b/ext/openssl/config0.m4
@@ -3,7 +3,7 @@ dnl $Id$
dnl
PHP_ARG_WITH(openssl, for OpenSSL support,
-[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6)])
+[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.8)])
PHP_ARG_WITH(kerberos, for Kerberos support,
[ --with-kerberos[=DIR] OPENSSL: Include Kerberos support], no, no)
@@ -19,8 +19,6 @@ if test "$PHP_OPENSSL" != "no"; then
PHP_SETUP_KERBEROS(OPENSSL_SHARED_LIBADD)
fi
- AC_CHECK_LIB(ssl, DSA_get_default_method, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
- AC_CHECK_LIB(crypto, X509_free, AC_DEFINE(HAVE_DSA_DEFAULT_METHOD, 1, [OpenSSL 0.9.7 or later]))
AC_CHECK_FUNCS([RAND_egd])
PHP_SETUP_OPENSSL(OPENSSL_SHARED_LIBADD,
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 277814f789..a3b8f2bac7 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -128,15 +128,15 @@ PHP_FUNCTION(openssl_random_pseudo_bytes);
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 0, 2)
- ZEND_ARG_INFO(0, x509)
- ZEND_ARG_INFO(0, outfilename)
- ZEND_ARG_INFO(0, notext)
+ ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(0, outfilename)
+ ZEND_ARG_INFO(0, notext)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_export, 0, 0, 2)
- ZEND_ARG_INFO(0, x509)
- ZEND_ARG_INFO(1, out)
- ZEND_ARG_INFO(0, notext)
+ ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(1, out)
+ ZEND_ARG_INFO(0, notext)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_fingerprint, 0, 0, 1)
@@ -146,287 +146,290 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_fingerprint, 0, 0, 1)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_check_private_key, 0)
- ZEND_ARG_INFO(0, cert)
- ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, cert)
+ ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_parse, 0)
- ZEND_ARG_INFO(0, x509)
- ZEND_ARG_INFO(0, shortname)
+ ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(0, shortname)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_checkpurpose, 0, 0, 3)
- ZEND_ARG_INFO(0, x509cert)
- ZEND_ARG_INFO(0, purpose)
- ZEND_ARG_INFO(0, cainfo) /* array */
- ZEND_ARG_INFO(0, untrustedfile)
+ ZEND_ARG_INFO(0, x509cert)
+ ZEND_ARG_INFO(0, purpose)
+ ZEND_ARG_INFO(0, cainfo) /* array */
+ ZEND_ARG_INFO(0, untrustedfile)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_read, 0)
- ZEND_ARG_INFO(0, cert)
+ ZEND_ARG_INFO(0, cert)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_free, 0)
- ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(0, x509)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs12_export_to_file, 0, 0, 4)
- ZEND_ARG_INFO(0, x509)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, priv_key)
- ZEND_ARG_INFO(0, pass)
- ZEND_ARG_INFO(0, args) /* array */
+ ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(0, filename)
+ ZEND_ARG_INFO(0, priv_key)
+ ZEND_ARG_INFO(0, pass)
+ ZEND_ARG_INFO(0, args) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkcs12_export, 0)
- ZEND_ARG_INFO(0, x509)
- ZEND_ARG_INFO(1, out)
- ZEND_ARG_INFO(0, priv_key)
- ZEND_ARG_INFO(0, pass)
- ZEND_ARG_INFO(0, args) /* array */
+ ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(1, out)
+ ZEND_ARG_INFO(0, priv_key)
+ ZEND_ARG_INFO(0, pass)
+ ZEND_ARG_INFO(0, args) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkcs12_read, 0)
- ZEND_ARG_INFO(0, PKCS12)
- ZEND_ARG_INFO(1, certs) /* array */
- ZEND_ARG_INFO(0, pass)
+ ZEND_ARG_INFO(0, PKCS12)
+ ZEND_ARG_INFO(1, certs) /* array */
+ ZEND_ARG_INFO(0, pass)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_export_to_file, 0, 0, 2)
- ZEND_ARG_INFO(0, csr)
- ZEND_ARG_INFO(0, outfilename)
- ZEND_ARG_INFO(0, notext)
+ ZEND_ARG_INFO(0, csr)
+ ZEND_ARG_INFO(0, outfilename)
+ ZEND_ARG_INFO(0, notext)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_export, 0, 0, 2)
- ZEND_ARG_INFO(0, csr)
- ZEND_ARG_INFO(1, out)
- ZEND_ARG_INFO(0, notext)
+ ZEND_ARG_INFO(0, csr)
+ ZEND_ARG_INFO(1, out)
+ ZEND_ARG_INFO(0, notext)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_sign, 0, 0, 4)
- ZEND_ARG_INFO(0, csr)
- ZEND_ARG_INFO(0, x509)
- ZEND_ARG_INFO(0, priv_key)
- ZEND_ARG_INFO(0, days)
- ZEND_ARG_INFO(0, config_args) /* array */
- ZEND_ARG_INFO(0, serial)
+ ZEND_ARG_INFO(0, csr)
+ ZEND_ARG_INFO(0, x509)
+ ZEND_ARG_INFO(0, priv_key)
+ ZEND_ARG_INFO(0, days)
+ ZEND_ARG_INFO(0, config_args) /* array */
+ ZEND_ARG_INFO(0, serial)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_new, 0, 0, 2)
- ZEND_ARG_INFO(0, dn) /* array */
- ZEND_ARG_INFO(1, privkey)
- ZEND_ARG_INFO(0, configargs)
- ZEND_ARG_INFO(0, extraattribs)
+ ZEND_ARG_INFO(0, dn) /* array */
+ ZEND_ARG_INFO(1, privkey)
+ ZEND_ARG_INFO(0, configargs)
+ ZEND_ARG_INFO(0, extraattribs)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_csr_get_subject, 0)
- ZEND_ARG_INFO(0, csr)
+ ZEND_ARG_INFO(0, csr)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_csr_get_public_key, 0)
- ZEND_ARG_INFO(0, csr)
+ ZEND_ARG_INFO(0, csr)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_new, 0, 0, 0)
- ZEND_ARG_INFO(0, configargs) /* array */
+ ZEND_ARG_INFO(0, configargs) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_export_to_file, 0, 0, 2)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, outfilename)
- ZEND_ARG_INFO(0, passphrase)
- ZEND_ARG_INFO(0, config_args) /* array */
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, outfilename)
+ ZEND_ARG_INFO(0, passphrase)
+ ZEND_ARG_INFO(0, config_args) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_export, 0, 0, 2)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(1, out)
- ZEND_ARG_INFO(0, passphrase)
- ZEND_ARG_INFO(0, config_args) /* array */
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(1, out)
+ ZEND_ARG_INFO(0, passphrase)
+ ZEND_ARG_INFO(0, config_args) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkey_get_public, 0)
- ZEND_ARG_INFO(0, cert)
+ ZEND_ARG_INFO(0, cert)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkey_free, 0)
- ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_get_private, 0, 0, 1)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, passphrase)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, passphrase)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkey_get_details, 0)
- ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pbkdf2, 0, 0, 4)
- ZEND_ARG_INFO(0, password)
- ZEND_ARG_INFO(0, salt)
- ZEND_ARG_INFO(0, key_length)
- ZEND_ARG_INFO(0, iterations)
- ZEND_ARG_INFO(0, digest_algorithm)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, salt)
+ ZEND_ARG_INFO(0, key_length)
+ ZEND_ARG_INFO(0, iterations)
+ ZEND_ARG_INFO(0, digest_algorithm)
ZEND_END_ARG_INFO()
#endif
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_verify, 0, 0, 2)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, signerscerts)
- ZEND_ARG_INFO(0, cainfo) /* array */
- ZEND_ARG_INFO(0, extracerts)
- ZEND_ARG_INFO(0, content)
+ ZEND_ARG_INFO(0, filename)
+ ZEND_ARG_INFO(0, flags)
+ ZEND_ARG_INFO(0, signerscerts)
+ ZEND_ARG_INFO(0, cainfo) /* array */
+ ZEND_ARG_INFO(0, extracerts)
+ ZEND_ARG_INFO(0, content)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_encrypt, 0, 0, 4)
- ZEND_ARG_INFO(0, infile)
- ZEND_ARG_INFO(0, outfile)
- ZEND_ARG_INFO(0, recipcerts)
- ZEND_ARG_INFO(0, headers) /* array */
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, cipher)
+ ZEND_ARG_INFO(0, infile)
+ ZEND_ARG_INFO(0, outfile)
+ ZEND_ARG_INFO(0, recipcerts)
+ ZEND_ARG_INFO(0, headers) /* array */
+ ZEND_ARG_INFO(0, flags)
+ ZEND_ARG_INFO(0, cipher)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_sign, 0, 0, 5)
- ZEND_ARG_INFO(0, infile)
- ZEND_ARG_INFO(0, outfile)
- ZEND_ARG_INFO(0, signcert)
- ZEND_ARG_INFO(0, signkey)
- ZEND_ARG_INFO(0, headers) /* array */
- ZEND_ARG_INFO(0, flags)
- ZEND_ARG_INFO(0, extracertsfilename)
+ ZEND_ARG_INFO(0, infile)
+ ZEND_ARG_INFO(0, outfile)
+ ZEND_ARG_INFO(0, signcert)
+ ZEND_ARG_INFO(0, signkey)
+ ZEND_ARG_INFO(0, headers) /* array */
+ ZEND_ARG_INFO(0, flags)
+ ZEND_ARG_INFO(0, extracertsfilename)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs7_decrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, infilename)
- ZEND_ARG_INFO(0, outfilename)
- ZEND_ARG_INFO(0, recipcert)
- ZEND_ARG_INFO(0, recipkey)
+ ZEND_ARG_INFO(0, infilename)
+ ZEND_ARG_INFO(0, outfilename)
+ ZEND_ARG_INFO(0, recipcert)
+ ZEND_ARG_INFO(0, recipkey)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_private_encrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, crypted)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, padding)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, crypted)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, padding)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_private_decrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, crypted)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, padding)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, crypted)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, padding)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_public_encrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, crypted)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, padding)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, crypted)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, padding)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_public_decrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, crypted)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, padding)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, crypted)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, padding)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_error_string, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_sign, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, signature)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, signature)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_verify, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(0, signature)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(0, signature)
+ ZEND_ARG_INFO(0, key)
+ ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_openssl_seal, 0)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, sealdata)
- ZEND_ARG_INFO(1, ekeys) /* arary */
- ZEND_ARG_INFO(0, pubkeys) /* array */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_seal, 0, 0, 4)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, sealdata)
+ ZEND_ARG_INFO(1, ekeys) /* arary */
+ ZEND_ARG_INFO(0, pubkeys) /* array */
+ ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(1, iv)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_open, 0)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(1, opendata)
- ZEND_ARG_INFO(0, ekey)
- ZEND_ARG_INFO(0, privkey)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(1, opendata)
+ ZEND_ARG_INFO(0, ekey)
+ ZEND_ARG_INFO(0, privkey)
+ ZEND_ARG_INFO(0, iv)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_get_md_methods, 0, 0, 0)
- ZEND_ARG_INFO(0, aliases)
+ ZEND_ARG_INFO(0, aliases)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_get_cipher_methods, 0, 0, 0)
- ZEND_ARG_INFO(0, aliases)
+ ZEND_ARG_INFO(0, aliases)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_digest, 0, 0, 2)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(0, method)
- ZEND_ARG_INFO(0, raw_output)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(0, raw_output)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_encrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(0, method)
- ZEND_ARG_INFO(0, password)
- ZEND_ARG_INFO(0, options)
- ZEND_ARG_INFO(0, iv)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, options)
+ ZEND_ARG_INFO(0, iv)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_decrypt, 0, 0, 3)
- ZEND_ARG_INFO(0, data)
- ZEND_ARG_INFO(0, method)
- ZEND_ARG_INFO(0, password)
- ZEND_ARG_INFO(0, options)
- ZEND_ARG_INFO(0, iv)
+ ZEND_ARG_INFO(0, data)
+ ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(0, password)
+ ZEND_ARG_INFO(0, options)
+ ZEND_ARG_INFO(0, iv)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_cipher_iv_length, 0)
- ZEND_ARG_INFO(0, method)
+ ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_dh_compute_key, 0)
- ZEND_ARG_INFO(0, pub_key)
- ZEND_ARG_INFO(0, dh_key)
+ ZEND_ARG_INFO(0, pub_key)
+ ZEND_ARG_INFO(0, dh_key)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_random_pseudo_bytes, 0, 0, 1)
- ZEND_ARG_INFO(0, length)
- ZEND_ARG_INFO(1, result_is_strong)
+ ZEND_ARG_INFO(0, length)
+ ZEND_ARG_INFO(1, result_is_strong)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_spki_new, 0, 0, 2)
- ZEND_ARG_INFO(0, privkey)
- ZEND_ARG_INFO(0, challenge)
- ZEND_ARG_INFO(0, algo)
+ ZEND_ARG_INFO(0, privkey)
+ ZEND_ARG_INFO(0, challenge)
+ ZEND_ARG_INFO(0, algo)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_spki_verify, 0)
- ZEND_ARG_INFO(0, spki)
+ ZEND_ARG_INFO(0, spki)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_spki_export, 0)
- ZEND_ARG_INFO(0, spki)
+ ZEND_ARG_INFO(0, spki)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_spki_export_challenge, 0)
- ZEND_ARG_INFO(0, spki)
+ ZEND_ARG_INFO(0, spki)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_get_cert_locations, 0)
@@ -459,7 +462,7 @@ const zend_function_entry openssl_functions[] = {
/* x.509 cert funcs */
PHP_FE(openssl_x509_read, arginfo_openssl_x509_read)
- PHP_FE(openssl_x509_free, arginfo_openssl_x509_free)
+ PHP_FE(openssl_x509_free, arginfo_openssl_x509_free)
PHP_FE(openssl_x509_parse, arginfo_openssl_x509_parse)
PHP_FE(openssl_x509_checkpurpose, arginfo_openssl_x509_checkpurpose)
PHP_FE(openssl_x509_check_private_key, arginfo_openssl_x509_check_private_key)
@@ -507,9 +510,9 @@ const zend_function_entry openssl_functions[] = {
PHP_FE(openssl_get_md_methods, arginfo_openssl_get_md_methods)
PHP_FE(openssl_get_cipher_methods, arginfo_openssl_get_cipher_methods)
- PHP_FE(openssl_dh_compute_key, arginfo_openssl_dh_compute_key)
+ PHP_FE(openssl_dh_compute_key, arginfo_openssl_dh_compute_key)
- PHP_FE(openssl_random_pseudo_bytes, arginfo_openssl_random_pseudo_bytes)
+ PHP_FE(openssl_random_pseudo_bytes, arginfo_openssl_random_pseudo_bytes)
PHP_FE(openssl_error_string, arginfo_openssl_error_string)
PHP_FE_END
};
@@ -535,6 +538,25 @@ zend_module_entry openssl_module_entry = {
ZEND_GET_MODULE(openssl)
#endif
+/* number conversion flags checks */
+#define PHP_OPENSSL_CHECK_NUMBER_CONVERSION(_cond, _name) \
+ do { \
+ if (_cond) { \
+ php_error_docref(NULL, E_WARNING, #_name" is too long"); \
+ RETURN_FALSE; \
+ } \
+ } while(0)
+/* check if size_t can be safely casted to int */
+#define PHP_OPENSSL_CHECK_SIZE_T_TO_INT(_var, _name) \
+ PHP_OPENSSL_CHECK_NUMBER_CONVERSION(ZEND_SIZE_T_INT_OVFL(_var), _name)
+/* check if size_t can be safely casted to unsigned int */
+#define PHP_OPENSSL_CHECK_SIZE_T_TO_UINT(_var, _name) \
+ PHP_OPENSSL_CHECK_NUMBER_CONVERSION(ZEND_SIZE_T_UINT_OVFL(_var), _name)
+/* check if long can be safely casted to int */
+#define PHP_OPENSSL_CHECK_LONG_TO_INT(_var, _name) \
+ PHP_OPENSSL_CHECK_NUMBER_CONVERSION(ZEND_LONG_EXCEEDS_INT(_var), _name)
+
+
static int le_key;
static int le_x509;
static int le_csr;
@@ -599,8 +621,8 @@ struct php_x509_request { /* {{{ */
LHASH_OF(CONF_VALUE) * global_config; /* Global SSL config */
LHASH_OF(CONF_VALUE) * req_config; /* SSL config for this request */
#else
- LHASH * global_config; /* Global SSL config */
- LHASH * req_config; /* SSL config for this request */
+ LHASH * global_config; /* Global SSL config */
+ LHASH * req_config; /* SSL config for this request */
#endif
const EVP_MD * md_alg;
const EVP_MD * digest;
@@ -616,7 +638,7 @@ struct php_x509_request { /* {{{ */
EVP_PKEY * priv_key;
- const EVP_CIPHER * priv_key_encrypt_cipher;
+ const EVP_CIPHER * priv_key_encrypt_cipher;
};
/* }}} */
@@ -650,7 +672,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
int to_add_len = 0;
- ne = X509_NAME_get_entry(name, i);
+ ne = X509_NAME_get_entry(name, i);
obj = X509_NAME_ENTRY_get_object(ne);
nid = OBJ_obj2nid(obj);
@@ -684,7 +706,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
}
}
if (key != NULL) {
- zend_hash_str_update(HASH_OF(val), key, strlen(key), &subitem);
+ zend_hash_str_update(Z_ARRVAL_P(val), key, strlen(key), &subitem);
}
}
/* }}} */
@@ -859,18 +881,18 @@ static const EVP_CIPHER * php_openssl_get_evp_cipher_from_algo(zend_long algo);
/* {{{ strip line endings from spkac */
static int openssl_spki_cleanup(const char *src, char *dest)
{
- int removed=0;
-
- while (*src) {
- if (*src!='\n'&&*src!='\r') {
- *dest++=*src;
- } else {
- ++removed;
- }
- ++src;
- }
- *dest=0;
- return removed;
+ int removed = 0;
+
+ while (*src) {
+ if (*src != '\n' && *src != '\r') {
+ *dest++ = *src;
+ } else {
+ ++removed;
+ }
+ ++src;
+ }
+ *dest = 0;
+ return removed;
}
/* }}} */
@@ -933,7 +955,7 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
if (cipher == NULL) {
php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm for private key.");
return FAILURE;
- } else {
+ } else {
req->priv_key_encrypt_cipher = cipher;
}
} else {
@@ -1284,6 +1306,7 @@ PHP_MINFO_FUNCTION(openssl)
php_info_print_table_row(2, "OpenSSL support", "enabled");
php_info_print_table_row(2, "OpenSSL Library Version", SSLeay_version(SSLEAY_VERSION));
php_info_print_table_row(2, "OpenSSL Header Version", OPENSSL_VERSION_TEXT);
+ php_info_print_table_row(2, "Openssl default config", default_ssl_conf_filename);
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
@@ -1295,6 +1318,13 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
{
EVP_cleanup();
+#if OPENSSL_VERSION_NUMBER >= 0x00090805f
+ /* prevent accessing locking callback from unloaded extension */
+ CRYPTO_set_locking_callback(NULL);
+ /* free allocated error strings */
+ ERR_free_strings();
+#endif
+
php_unregister_url_stream_wrapper("https");
php_unregister_url_stream_wrapper("ftps");
@@ -1671,7 +1701,7 @@ PHP_FUNCTION(openssl_spki_export)
}
out = BIO_new(BIO_s_mem());
- if (out && PEM_write_bio_PUBKEY(out, pkey)) {
+ if (out && PEM_write_bio_PUBKEY(out, pkey)) {
BUF_MEM *bio_buf;
BIO_get_mem_ptr(out, &bio_buf);
@@ -1768,7 +1798,7 @@ PHP_FUNCTION(openssl_x509_export)
if (!notext) {
X509_print(bio_out, cert);
}
- if (PEM_write_bio_X509(bio_out, cert)) {
+ if (PEM_write_bio_X509(bio_out, cert)) {
BUF_MEM *bio_buf;
zval_dtor(zout);
@@ -1894,10 +1924,10 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
p = extension->value->data;
length = extension->value->length;
if (method->it) {
- names = (GENERAL_NAMES*)(ASN1_item_d2i(NULL, &p, length,
- ASN1_ITEM_ptr(method->it)));
+ names = (GENERAL_NAMES*) (ASN1_item_d2i(NULL, &p, length,
+ ASN1_ITEM_ptr(method->it)));
} else {
- names = (GENERAL_NAMES*)(method->d2i(NULL, &p, length));
+ names = (GENERAL_NAMES*) (method->d2i(NULL, &p, length));
}
if (names == NULL) {
return -1;
@@ -1905,33 +1935,33 @@ static int openssl_x509v3_subjectAltName(BIO *bio, X509_EXTENSION *extension)
num = sk_GENERAL_NAME_num(names);
for (i = 0; i < num; i++) {
- GENERAL_NAME *name;
- ASN1_STRING *as;
- name = sk_GENERAL_NAME_value(names, i);
- switch (name->type) {
- case GEN_EMAIL:
- BIO_puts(bio, "email:");
- as = name->d.rfc822Name;
- BIO_write(bio, ASN1_STRING_data(as),
- ASN1_STRING_length(as));
- break;
- case GEN_DNS:
- BIO_puts(bio, "DNS:");
- as = name->d.dNSName;
- BIO_write(bio, ASN1_STRING_data(as),
- ASN1_STRING_length(as));
- break;
- case GEN_URI:
- BIO_puts(bio, "URI:");
- as = name->d.uniformResourceIdentifier;
- BIO_write(bio, ASN1_STRING_data(as),
- ASN1_STRING_length(as));
- break;
- default:
- /* use builtin print for GEN_OTHERNAME, GEN_X400,
- * GEN_EDIPARTY, GEN_DIRNAME, GEN_IPADD and GEN_RID
- */
- GENERAL_NAME_print(bio, name);
+ GENERAL_NAME *name;
+ ASN1_STRING *as;
+ name = sk_GENERAL_NAME_value(names, i);
+ switch (name->type) {
+ case GEN_EMAIL:
+ BIO_puts(bio, "email:");
+ as = name->d.rfc822Name;
+ BIO_write(bio, ASN1_STRING_data(as),
+ ASN1_STRING_length(as));
+ break;
+ case GEN_DNS:
+ BIO_puts(bio, "DNS:");
+ as = name->d.dNSName;
+ BIO_write(bio, ASN1_STRING_data(as),
+ ASN1_STRING_length(as));
+ break;
+ case GEN_URI:
+ BIO_puts(bio, "URI:");
+ as = name->d.uniformResourceIdentifier;
+ BIO_write(bio, ASN1_STRING_data(as),
+ ASN1_STRING_length(as));
+ break;
+ default:
+ /* use builtin print for GEN_OTHERNAME, GEN_X400,
+ * GEN_EDIPARTY, GEN_DIRNAME, GEN_IPADD and GEN_RID
+ */
+ GENERAL_NAME_print(bio, name);
}
/* trailing ', ' except for last element */
if (i < (num - 1)) {
@@ -1956,7 +1986,7 @@ PHP_FUNCTION(openssl_x509_parse)
zval subitem;
X509_EXTENSION *extension;
char *extname;
- BIO *bio_out;
+ BIO *bio_out;
BUF_MEM *bio_buf;
char buf[256];
@@ -2226,7 +2256,7 @@ static X509_STORE * setup_verify(zval * calist)
}
if (calist && (Z_TYPE_P(calist) == IS_ARRAY)) {
- ZEND_HASH_FOREACH_VAL(HASH_OF(calist), item) {
+ ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(calist), item) {
convert_to_string_ex(item);
if (VCWD_STAT(Z_STRVAL_P(item), &sb) == -1) {
@@ -2325,14 +2355,14 @@ static STACK_OF(X509) * php_array_to_X509_sk(zval * zcerts) /* {{{ */
{
zval * zcertval;
STACK_OF(X509) * sk = NULL;
- X509 * cert;
- zend_resource *certresource;
+ X509 * cert;
+ zend_resource *certresource;
sk = sk_X509_new_null();
/* get certs */
if (Z_TYPE_P(zcerts) == IS_ARRAY) {
- ZEND_HASH_FOREACH_VAL(HASH_OF(zcerts), zcertval) {
+ ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(zcerts), zcertval) {
cert = php_openssl_x509_from_zval(zcertval, 0, &certresource);
if (cert == NULL) {
goto clean_exit;
@@ -2365,8 +2395,8 @@ static STACK_OF(X509) * php_array_to_X509_sk(zval * zcerts) /* {{{ */
sk_X509_push(sk, cert);
}
- clean_exit:
- return sk;
+clean_exit:
+ return sk;
}
/* }}} */
@@ -2424,7 +2454,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
/* end parse extra config */
/*PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, STACK_OF(X509) *ca,
- int nid_key, int nid_cert, int iter, int mac_iter, int keytype);*/
+ int nid_key, int nid_cert, int iter, int mac_iter, int keytype);*/
p12 = PKCS12_create(pass, friendly_name, priv_key, cert, ca, 0, 0, 0, 0, 0);
@@ -2500,7 +2530,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
p12 = PKCS12_create(pass, friendly_name, priv_key, cert, ca, 0, 0, 0, 0, 0);
bio_out = BIO_new(BIO_s_mem());
- if (i2d_PKCS12_bio(bio_out, p12)) {
+ if (i2d_PKCS12_bio(bio_out, p12)) {
BUF_MEM *bio_buf;
zval_dtor(zout);
@@ -2544,6 +2574,8 @@ PHP_FUNCTION(openssl_pkcs12_read)
RETVAL_FALSE;
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(zp12_len, pkcs12);
+
bio_in = BIO_new(BIO_s_mem());
if(0 >= BIO_write(bio_in, zp12, (int)zp12_len))
@@ -2614,7 +2646,7 @@ PHP_FUNCTION(openssl_pkcs12_read)
}
}
- cleanup:
+ cleanup:
if (bio_in) {
BIO_free(bio_in);
}
@@ -2663,7 +2695,7 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
subj = X509_REQ_get_subject_name(csr);
/* apply values from the dn hash */
- ZEND_HASH_FOREACH_STR_KEY_VAL(HASH_OF(dn), strindex, item) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(dn), strindex, item) {
if (strindex) {
int nid;
@@ -2736,9 +2768,14 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
}
}
if (attribs) {
- ZEND_HASH_FOREACH_STR_KEY_VAL(HASH_OF(attribs), strindex, item) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(attribs), strindex, item) {
int nid;
+ if (NULL == strindex) {
+ php_error_docref(NULL, E_WARNING, "dn: numeric fild names are not supported");
+ continue;
+ }
+
convert_to_string_ex(item);
nid = OBJ_txt2nid(ZSTR_VAL(strindex));
@@ -3223,7 +3260,7 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval * val, int public_key, char * p
/* get passphrase */
- if ((zphrase = zend_hash_index_find(HASH_OF(val), 1)) == NULL) {
+ if ((zphrase = zend_hash_index_find(Z_ARRVAL_P(val), 1)) == NULL) {
php_error_docref(NULL, E_WARNING, "key array must be of the form array(0 => key, 1 => phrase)");
return NULL;
}
@@ -3237,7 +3274,7 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval * val, int public_key, char * p
}
/* now set val to be the key param and continue */
- if ((val = zend_hash_index_find(HASH_OF(val), 0)) == NULL) {
+ if ((val = zend_hash_index_find(Z_ARRVAL_P(val), 0)) == NULL) {
php_error_docref(NULL, E_WARNING, "key array must be of the form array(0 => key, 1 => phrase)");
TMP_CLEAN;
}
@@ -3397,7 +3434,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
}
}
break;
-#if !defined(NO_DSA) && defined(HAVE_DSA_DEFAULT_METHOD)
+#if !defined(NO_DSA)
case OPENSSL_KEYTYPE_DSA:
{
DSA *dsaparam = NULL;
@@ -3552,9 +3589,9 @@ PHP_FUNCTION(openssl_pkey_new)
EVP_PKEY *pkey;
if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "rsa", sizeof("rsa")-1)) != NULL &&
- Z_TYPE_P(data) == IS_ARRAY) {
- pkey = EVP_PKEY_new();
- if (pkey) {
+ Z_TYPE_P(data) == IS_ARRAY) {
+ pkey = EVP_PKEY_new();
+ if (pkey) {
RSA *rsa = RSA_new();
if (rsa) {
OPENSSL_PKEY_SET_BN(Z_ARRVAL_P(data), rsa, n);
@@ -3575,10 +3612,10 @@ PHP_FUNCTION(openssl_pkey_new)
EVP_PKEY_free(pkey);
}
RETURN_FALSE;
- } else if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "dsa", sizeof("dsa")-1)) != NULL &&
- Z_TYPE_P(data) == IS_ARRAY) {
- pkey = EVP_PKEY_new();
- if (pkey) {
+ } else if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "dsa", sizeof("dsa") - 1)) != NULL &&
+ Z_TYPE_P(data) == IS_ARRAY) {
+ pkey = EVP_PKEY_new();
+ if (pkey) {
DSA *dsa = DSA_new();
if (dsa) {
OPENSSL_PKEY_SET_BN(Z_ARRVAL_P(data), dsa, p);
@@ -3599,24 +3636,21 @@ PHP_FUNCTION(openssl_pkey_new)
EVP_PKEY_free(pkey);
}
RETURN_FALSE;
- } else if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "dh", sizeof("dh")-1)) != NULL &&
- Z_TYPE_P(data) == IS_ARRAY) {
- pkey = EVP_PKEY_new();
- if (pkey) {
+ } else if ((data = zend_hash_str_find(Z_ARRVAL_P(args), "dh", sizeof("dh") - 1)) != NULL &&
+ Z_TYPE_P(data) == IS_ARRAY) {
+ pkey = EVP_PKEY_new();
+ if (pkey) {
DH *dh = DH_new();
if (dh) {
OPENSSL_PKEY_SET_BN(Z_ARRVAL_P(data), dh, p);
OPENSSL_PKEY_SET_BN(Z_ARRVAL_P(data), dh, g);
OPENSSL_PKEY_SET_BN(Z_ARRVAL_P(data), dh, priv_key);
OPENSSL_PKEY_SET_BN(Z_ARRVAL_P(data), dh, pub_key);
- if (dh->p && dh->g) {
- if (!dh->pub_key) {
- DH_generate_key(dh);
- }
- if (EVP_PKEY_assign_DH(pkey, dh)) {
- ZVAL_COPY_VALUE(return_value, zend_list_insert(pkey, le_key));
- return;
- }
+ if (dh->p && dh->g &&
+ (dh->pub_key || DH_generate_key(dh)) &&
+ EVP_PKEY_assign_DH(pkey, dh)) {
+ ZVAL_COPY_VALUE(return_value, zend_list_insert(pkey, le_key));
+ return;
}
DH_free(dh);
}
@@ -3662,6 +3696,8 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
}
RETVAL_FALSE;
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len, passphrase);
+
key = php_openssl_evp_from_zval(zpkey, 0, passphrase, 0, &key_resource);
if (key == NULL) {
@@ -3734,6 +3770,8 @@ PHP_FUNCTION(openssl_pkey_export)
}
RETVAL_FALSE;
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len, passphrase);
+
key = php_openssl_evp_from_zval(zpkey, 0, passphrase, 0, &key_resource);
if (key == NULL) {
@@ -4024,6 +4062,11 @@ PHP_FUNCTION(openssl_pbkdf2)
RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_LONG_TO_INT(key_length, key);
+ PHP_OPENSSL_CHECK_LONG_TO_INT(iterations, iterations);
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(password_len, password);
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(salt_len, salt);
+
out_buffer = zend_string_alloc(key_length, 0);
if (PKCS5_PBKDF2_HMAC(password, (int)password_len, (unsigned char *)salt, (int)salt_len, (int)iterations, digest, (int)key_length, (unsigned char*)ZSTR_VAL(out_buffer)) == 1) {
@@ -4197,7 +4240,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
/* get certs */
if (Z_TYPE_P(zrecipcerts) == IS_ARRAY) {
- ZEND_HASH_FOREACH_VAL(HASH_OF(zrecipcerts), zcertval) {
+ ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(zrecipcerts), zcertval) {
zend_resource *certresource;
cert = php_openssl_x509_from_zval(zcertval, 0, &certresource);
@@ -4251,7 +4294,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
/* tack on extra headers */
if (zheaders) {
- ZEND_HASH_FOREACH_STR_KEY_VAL(HASH_OF(zheaders), strindex, zcertval) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(zheaders), strindex, zcertval) {
convert_to_string_ex(zcertval);
if (strindex) {
@@ -4355,7 +4398,7 @@ PHP_FUNCTION(openssl_pkcs7_sign)
/* tack on extra headers */
if (zheaders) {
- ZEND_HASH_FOREACH_STR_KEY_VAL(HASH_OF(zheaders), strindex, hval) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(zheaders), strindex, hval) {
convert_to_string_ex(hval);
if (strindex) {
@@ -4482,18 +4525,17 @@ PHP_FUNCTION(openssl_private_encrypt)
if (pkey == NULL) {
php_error_docref(NULL, E_WARNING, "key param is not a valid private key");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
cryptedlen = EVP_PKEY_size(pkey);
cryptedbuf = zend_string_alloc(cryptedlen, 0);
switch (pkey->type) {
case EVP_PKEY_RSA:
case EVP_PKEY_RSA2:
- successful = (RSA_private_encrypt((int)data_len,
+ successful = (RSA_private_encrypt((int)data_len,
(unsigned char *)data,
(unsigned char *)ZSTR_VAL(cryptedbuf),
pkey->pkey.rsa,
@@ -4543,11 +4585,10 @@ PHP_FUNCTION(openssl_private_decrypt)
if (pkey == NULL) {
php_error_docref(NULL, E_WARNING, "key parameter is not a valid private key");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
cryptedlen = EVP_PKEY_size(pkey);
crypttemp = emalloc(cryptedlen + 1);
@@ -4610,11 +4651,10 @@ PHP_FUNCTION(openssl_public_encrypt)
if (pkey == NULL) {
php_error_docref(NULL, E_WARNING, "key parameter is not a valid public key");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
cryptedlen = EVP_PKEY_size(pkey);
cryptedbuf = zend_string_alloc(cryptedlen, 0);
@@ -4672,11 +4712,10 @@ PHP_FUNCTION(openssl_public_decrypt)
if (pkey == NULL) {
php_error_docref(NULL, E_WARNING, "key parameter is not a valid public key");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
cryptedlen = EVP_PKEY_size(pkey);
crypttemp = emalloc(cryptedlen + 1);
@@ -4809,7 +4848,7 @@ PHP_FUNCTION(openssl_verify)
zval *key;
EVP_PKEY *pkey;
int err;
- EVP_MD_CTX md_ctx;
+ EVP_MD_CTX md_ctx;
const EVP_MD *mdtype;
zend_resource *keyresource = NULL;
char * data;
@@ -4823,6 +4862,8 @@ PHP_FUNCTION(openssl_verify)
return;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_UINT(signature_len, signature);
+
if (method == NULL || Z_TYPE_P(method) == IS_LONG) {
if (method != NULL) {
signature_algo = Z_LVAL_P(method);
@@ -4845,9 +4886,9 @@ PHP_FUNCTION(openssl_verify)
RETURN_FALSE;
}
- EVP_VerifyInit (&md_ctx, mdtype);
+ EVP_VerifyInit (&md_ctx, mdtype);
EVP_VerifyUpdate (&md_ctx, data, data_len);
- err = EVP_VerifyFinal (&md_ctx, (unsigned char *)signature, (int)signature_len, pkey);
+ err = EVP_VerifyFinal(&md_ctx, (unsigned char *)signature, (unsigned int)signature_len, pkey);
EVP_MD_CTX_cleanup(&md_ctx);
if (keyresource == NULL) {
@@ -4861,12 +4902,12 @@ PHP_FUNCTION(openssl_verify)
Seals data */
PHP_FUNCTION(openssl_seal)
{
- zval *pubkeys, *pubkey, *sealdata, *ekeys;
+ zval *pubkeys, *pubkey, *sealdata, *ekeys, *iv = NULL;
HashTable *pubkeysht;
EVP_PKEY **pkeys;
zend_resource ** key_resources; /* so we know what to cleanup */
- int i, len1, len2, *eksl, nkeys;
- unsigned char *buf = NULL, **eks;
+ int i, len1, len2, *eksl, nkeys, iv_len;
+ unsigned char iv_buf[EVP_MAX_IV_LENGTH + 1], *buf = NULL, **eks;
char * data;
size_t data_len;
char *method =NULL;
@@ -4874,19 +4915,19 @@ PHP_FUNCTION(openssl_seal)
const EVP_CIPHER *cipher;
EVP_CIPHER_CTX ctx;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z/a/|s", &data, &data_len, &sealdata, &ekeys, &pubkeys, &method, &method_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z/a/|sz/", &data, &data_len,
+ &sealdata, &ekeys, &pubkeys, &method, &method_len, &iv) == FAILURE) {
return;
}
- pubkeysht = HASH_OF(pubkeys);
+ pubkeysht = Z_ARRVAL_P(pubkeys);
nkeys = pubkeysht ? zend_hash_num_elements(pubkeysht) : 0;
if (!nkeys) {
php_error_docref(NULL, E_WARNING, "Fourth argument to openssl_seal() must be a non-empty array");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
if (method) {
cipher = EVP_get_cipherbyname(method);
if (!cipher) {
@@ -4897,12 +4938,20 @@ PHP_FUNCTION(openssl_seal)
cipher = EVP_rc4();
}
+ iv_len = EVP_CIPHER_iv_length(cipher);
+ if (!iv && iv_len > 0) {
+ php_error_docref(NULL, E_WARNING,
+ "Cipher algorithm requires an IV to be supplied as a sixth parameter");
+ RETURN_FALSE;
+ }
+
pkeys = safe_emalloc(nkeys, sizeof(*pkeys), 0);
eksl = safe_emalloc(nkeys, sizeof(*eksl), 0);
eks = safe_emalloc(nkeys, sizeof(*eks), 0);
memset(eks, 0, sizeof(*eks) * nkeys);
key_resources = safe_emalloc(nkeys, sizeof(zend_resource*), 0);
memset(key_resources, 0, sizeof(zend_resource*) * nkeys);
+ memset(pkeys, 0, sizeof(*pkeys) * nkeys);
/* get the public keys we are using to seal this data */
i = 0;
@@ -4923,24 +4972,19 @@ PHP_FUNCTION(openssl_seal)
goto clean_exit;
}
-#if 0
- /* Need this if allow ciphers that require initialization vector */
- ivlen = EVP_CIPHER_CTX_iv_length(&ctx);
- iv = ivlen ? emalloc(ivlen + 1) : NULL;
-#endif
/* allocate one byte extra to make room for \0 */
buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(&ctx));
EVP_CIPHER_CTX_cleanup(&ctx);
- if (!EVP_SealInit(&ctx, cipher, eks, eksl, NULL, pkeys, nkeys) || !EVP_SealUpdate(&ctx, buf, &len1, (unsigned char *)data, (int)data_len)) {
+ if (!EVP_SealInit(&ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) ||
+ !EVP_SealUpdate(&ctx, buf, &len1, (unsigned char *)data, (int)data_len) ||
+ !EVP_SealFinal(&ctx, buf + len1, &len2)) {
RETVAL_FALSE;
efree(buf);
EVP_CIPHER_CTX_cleanup(&ctx);
goto clean_exit;
}
- EVP_SealFinal(&ctx, buf + len1, &len2);
-
if (len1 + len2 > 0) {
zval_dtor(sealdata);
buf[len1 + len2] = '\0';
@@ -4955,17 +4999,12 @@ PHP_FUNCTION(openssl_seal)
efree(eks[i]);
eks[i] = NULL;
}
-#if 0
- /* If allow ciphers that need IV, we need this */
- zval_dtor(*ivec);
- if (ivlen) {
- iv[ivlen] = '\0';
- ZVAL_STRINGL(*ivec, iv, ivlen);
- efree(iv);
- } else {
- ZVAL_EMPTY_STRING(*ivec);
+
+ if (iv) {
+ zval_dtor(iv);
+ iv_buf[iv_len] = '\0';
+ ZVAL_NEW_STR(iv, zend_string_init((char*)iv_buf, iv_len, 0));
}
-#endif
} else {
efree(buf);
}
@@ -4974,7 +5013,7 @@ PHP_FUNCTION(openssl_seal)
clean_exit:
for (i=0; i<nkeys; i++) {
- if (key_resources[i] == NULL) {
+ if (key_resources[i] == NULL && pkeys[i] != NULL) {
EVP_PKEY_free(pkeys[i]);
}
if (eks[i]) {
@@ -4994,19 +5033,20 @@ PHP_FUNCTION(openssl_open)
{
zval *privkey, *opendata;
EVP_PKEY *pkey;
- int len1, len2;
- unsigned char *buf;
+ int len1, len2, cipher_iv_len;
+ unsigned char *buf, *iv_buf;
zend_resource *keyresource = NULL;
EVP_CIPHER_CTX ctx;
char * data;
size_t data_len;
char * ekey;
size_t ekey_len;
- char *method =NULL;
- size_t method_len = 0;
+ char *method = NULL, *iv = NULL;
+ size_t method_len = 0, iv_len = 0;
const EVP_CIPHER *cipher;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/sz|s", &data, &data_len, &opendata, &ekey, &ekey_len, &privkey, &method, &method_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/sz|ss", &data, &data_len, &opendata,
+ &ekey, &ekey_len, &privkey, &method, &method_len, &iv, &iv_len) == FAILURE) {
return;
}
@@ -5014,14 +5054,11 @@ PHP_FUNCTION(openssl_open)
if (pkey == NULL) {
php_error_docref(NULL, E_WARNING, "unable to coerce parameter 4 into a private key");
RETURN_FALSE;
- } else if (INT_MAX < ekey_len) {
- php_error_docref(NULL, E_WARNING, "ekey is too long");
- RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(ekey_len, ekey);
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
if (method) {
cipher = EVP_get_cipherbyname(method);
if (!cipher) {
@@ -5032,9 +5069,26 @@ PHP_FUNCTION(openssl_open)
cipher = EVP_rc4();
}
+ cipher_iv_len = EVP_CIPHER_iv_length(cipher);
+ if (cipher_iv_len > 0) {
+ if (!iv) {
+ php_error_docref(NULL, E_WARNING,
+ "Cipher algorithm requires an IV to be supplied as a sixth parameter");
+ RETURN_FALSE;
+ }
+ if (cipher_iv_len != iv_len) {
+ php_error_docref(NULL, E_WARNING, "IV length is invalid");
+ RETURN_FALSE;
+ }
+ iv_buf = (unsigned char *)iv;
+ } else {
+ iv_buf = NULL;
+ }
+
buf = emalloc(data_len + 1);
- if (EVP_OpenInit(&ctx, cipher, (unsigned char *)ekey, (int)ekey_len, NULL, pkey) && EVP_OpenUpdate(&ctx, buf, &len1, (unsigned char *)data, (int)data_len)) {
+ if (EVP_OpenInit(&ctx, cipher, (unsigned char *)ekey, (int)ekey_len, iv_buf, pkey) &&
+ EVP_OpenUpdate(&ctx, buf, &len1, (unsigned char *)data, (int)data_len)) {
if (!EVP_OpenFinal(&ctx, buf + len1, &len2) || (len1 + len2 == 0)) {
efree(buf);
RETVAL_FALSE;
@@ -5163,22 +5217,22 @@ static zend_bool php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_
if (*piv_len == 0) {
/* BC behavior */
*piv_len = iv_required_len;
- *piv = iv_new;
+ *piv = iv_new;
return 1;
}
if (*piv_len < iv_required_len) {
- php_error_docref(NULL, E_WARNING, "IV passed is only %d bytes long, cipher expects an IV of precisely %d bytes, padding with \\0", *piv_len, iv_required_len);
+ php_error_docref(NULL, E_WARNING, "IV passed is only %zd bytes long, cipher expects an IV of precisely %zd bytes, padding with \\0", *piv_len, iv_required_len);
memcpy(iv_new, *piv, *piv_len);
*piv_len = iv_required_len;
- *piv = iv_new;
+ *piv = iv_new;
return 1;
}
- php_error_docref(NULL, E_WARNING, "IV passed is %d bytes long which is longer than the %d expected by selected cipher, truncating", *piv_len, iv_required_len);
+ php_error_docref(NULL, E_WARNING, "IV passed is %zd bytes long which is longer than the %zd expected by selected cipher, truncating", *piv_len, iv_required_len);
memcpy(iv_new, *piv, iv_required_len);
*piv_len = iv_required_len;
- *piv = iv_new;
+ *piv = iv_new;
return 1;
}
@@ -5204,11 +5258,10 @@ PHP_FUNCTION(openssl_encrypt)
if (!cipher_type) {
php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
keylen = EVP_CIPHER_key_length(cipher_type);
if (keylen > password_len) {
key = emalloc(keylen);
@@ -5229,6 +5282,7 @@ PHP_FUNCTION(openssl_encrypt)
EVP_EncryptInit(&cipher_ctx, cipher_type, NULL, NULL);
if (password_len > keylen) {
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(password_len, password);
EVP_CIPHER_CTX_set_key_length(&cipher_ctx, (int)password_len);
}
EVP_EncryptInit_ex(&cipher_ctx, NULL, NULL, key, (unsigned char *)iv);
@@ -5288,11 +5342,10 @@ PHP_FUNCTION(openssl_decrypt)
if (!method_len) {
php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm");
RETURN_FALSE;
- } else if (INT_MAX < data_len) {
- php_error_docref(NULL, E_WARNING, "data is too long");
- RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(data_len, data);
+
cipher_type = EVP_get_cipherbyname(method);
if (!cipher_type) {
php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm");
@@ -5325,6 +5378,7 @@ PHP_FUNCTION(openssl_decrypt)
EVP_DecryptInit(&cipher_ctx, cipher_type, NULL, NULL);
if (password_len > keylen) {
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(password_len, password);
EVP_CIPHER_CTX_set_key_length(&cipher_ctx, (int)password_len);
}
EVP_DecryptInit_ex(&cipher_ctx, NULL, NULL, key, (unsigned char *)iv);
@@ -5404,6 +5458,7 @@ PHP_FUNCTION(openssl_dh_compute_key)
RETURN_FALSE;
}
+ PHP_OPENSSL_CHECK_SIZE_T_TO_INT(pub_len, pub_key);
pub = BN_bin2bn((unsigned char*)pub_str, (int)pub_len, NULL);
data = zend_string_alloc(DH_size(pkey->pkey.dh), 0);
@@ -5429,7 +5484,6 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
zend_long buffer_length;
zend_string *buffer = NULL;
zval *zstrong_result_returned = NULL;
- int strong_result = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|z/", &buffer_length, &zstrong_result_returned) == FAILURE) {
return;
@@ -5447,7 +5501,6 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
buffer = zend_string_alloc(buffer_length, 0);
#ifdef PHP_WIN32
- strong_result = 1;
/* random/urandom equivalent on Windows */
if (php_win32_get_random_bytes((unsigned char*)buffer->val, (size_t) buffer_length) == FAILURE){
zend_string_release(buffer);
@@ -5457,7 +5510,10 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
RETURN_FALSE;
}
#else
- if ((strong_result = RAND_pseudo_bytes((unsigned char*)ZSTR_VAL(buffer), buffer_length)) < 0) {
+
+ PHP_OPENSSL_CHECK_LONG_TO_INT(buffer_length, length);
+
+ if (RAND_bytes((unsigned char*)ZSTR_VAL(buffer), (int)buffer_length) <= 0) {
zend_string_release(buffer);
if (zstrong_result_returned) {
ZVAL_FALSE(zstrong_result_returned);
@@ -5470,7 +5526,7 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
RETVAL_STR(buffer);
if (zstrong_result_returned) {
- ZVAL_BOOL(zstrong_result_returned, strong_result);
+ ZVAL_BOOL(zstrong_result_returned, 1);
}
}
/* }}} */
diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h
index 5ff2353777..92e01241f4 100644
--- a/ext/openssl/php_openssl.h
+++ b/ext/openssl/php_openssl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/openssl/tests/002.phpt b/ext/openssl/tests/002.phpt
deleted file mode 100644
index dd4f04a25c..0000000000
--- a/ext/openssl/tests/002.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-openssl_seal() tests
---SKIPIF--
-<?php if (!extension_loaded("openssl")) print "skip"; ?>
---FILE--
-<?php
-
-$a = 1;
-$b = array(1);
-$c = array(1);
-$d = array(1);
-
-var_dump(openssl_seal($a, $b, $c, $d));
-var_dump(openssl_seal($a, $a, $a, array()));
-var_dump(openssl_seal($c, $c, $c, 1));
-var_dump(openssl_seal($b, $b, $b, ""));
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on line %d
-bool(false)
-
-Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
-bool(false)
-
-Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
-NULL
-
-Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
-NULL
-Done
diff --git a/ext/openssl/tests/007.phpt b/ext/openssl/tests/007.phpt
deleted file mode 100644
index 0a74bd3411..0000000000
--- a/ext/openssl/tests/007.phpt
+++ /dev/null
@@ -1,60 +0,0 @@
---TEST--
-openssl_x509_read() and openssl_x509_free() tests
---SKIPIF--
-<?php if (!extension_loaded("openssl")) print "skip"; ?>
---FILE--
-<?php
-$fp = fopen(dirname(__FILE__) . "/cert.crt","r");
-$a = fread($fp,8192);
-fclose($fp);
-
-$b = "file://" . dirname(__FILE__) . "/cert.crt";
-$c = "invalid cert";
-$d = openssl_x509_read($a);
-$e = array();
-$f = array($b);
-
-var_dump($res = openssl_x509_read($a)); // read cert as a string
-openssl_x509_free($res);
-var_dump($res);
-var_dump($res = openssl_x509_read($b)); // read cert as a filename string
-openssl_x509_free($res);
-var_dump($res);
-var_dump($res = openssl_x509_read($c)); // read an invalid cert, fails
-openssl_x509_free($res);
-var_dump($res);
-var_dump($res = openssl_x509_read($d)); // read cert from a resource
-openssl_x509_free($res);
-var_dump($res);
-var_dump($res = openssl_x509_read($e)); // read an array
-openssl_x509_free($res);
-var_dump($res);
-var_dump($res = openssl_x509_read($f)); // read an array with the filename
-openssl_x509_free($res);
-var_dump($res);
-?>
---EXPECTF--
-resource(%d) of type (OpenSSL X.509)
-resource(%d) of type (Unknown)
-resource(%d) of type (OpenSSL X.509)
-resource(%d) of type (Unknown)
-
-Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in %s on line %d
-bool(false)
-
-Warning: openssl_x509_free() expects parameter 1 to be resource, boolean given in %s on line %d
-bool(false)
-resource(%d) of type (OpenSSL X.509)
-resource(%d) of type (Unknown)
-
-Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in %s on line %d
-bool(false)
-
-Warning: openssl_x509_free() expects parameter 1 to be resource, boolean given in %s on line %d
-bool(false)
-
-Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in %s on line %d
-bool(false)
-
-Warning: openssl_x509_free() expects parameter 1 to be resource, boolean given in %s on line %d
-bool(false)
diff --git a/ext/openssl/tests/008.phpt b/ext/openssl/tests/008.phpt
deleted file mode 100644
index 171ca27fba..0000000000
--- a/ext/openssl/tests/008.phpt
+++ /dev/null
@@ -1,79 +0,0 @@
---TEST--
-openssl_x509_export() and openssl_x509_export_to_file() tests
---SKIPIF--
-<?php if (!extension_loaded("openssl")) print "skip"; ?>
---FILE--
-<?php
-$fp = fopen(dirname(__FILE__) . "/cert.crt","r");
-$a = fread($fp,8192);
-fclose($fp);
-
-$b = "file://" . dirname(__FILE__) . "/cert.crt";
-$c = "invalid cert";
-$d = openssl_x509_read($a);
-$e = array();
-
-var_dump(openssl_x509_export($a, $output)); // read cert as a binary string
-var_dump(openssl_x509_export($b, $output2)); // read cert from a filename string
-var_dump(openssl_x509_export($c, $output3)); // read an invalid cert, fails
-var_dump(openssl_x509_export($d, $output4)); // read cert from a resource
-var_dump(openssl_x509_export($e, $output5)); // read an array, fails
-
-$outfilename = tempnam("/tmp", "ssl");
-if ($outfilename === false)
- die("failed to get a temporary filename!");
-
-echo "---\n";
-
-var_dump(openssl_x509_export_to_file($a, $outfilename)); // read cert as a binary string
-var_dump(openssl_x509_export_to_file($b, $outfilename)); // read cert from a filename string
-var_dump(openssl_x509_export_to_file($c, $outfilename)); // read an invalid cert, fails
-var_dump(openssl_x509_export_to_file($d, $outfilename)); // read cert from a resource
-var_dump(openssl_x509_export_to_file($e, $outfilename)); // read an array, fails
-echo "---\n";
-
-var_dump($exists = file_exists($outfilename));
-if ($exists) {
- @unlink($outfilename);
-}
-echo "---\n";
-
-if (PHP_EOL !== "\n") {
- $a = str_replace(PHP_EOL, "\n", $a);
-}
-
-var_dump(strcmp($output, $a));
-var_dump(strcmp($output, $output2));
-var_dump(strcmp($output, $output3));
-var_dump(strcmp($output, $output4)); // different
-var_dump(strcmp($output, $output5)); // different
-
-?>
---EXPECTF--
-bool(true)
-bool(true)
-
-Warning: openssl_x509_export(): cannot get cert from parameter 1 in %s on line %d
-bool(false)
-bool(true)
-
-Warning: openssl_x509_export(): cannot get cert from parameter 1 in %s on line %d
-bool(false)
----
-bool(true)
-bool(true)
-
-Warning: openssl_x509_export_to_file(): cannot get cert from parameter 1 in %s on line %d
-bool(false)
-bool(true)
-
-Warning: openssl_x509_export_to_file(): cannot get cert from parameter 1 in %s on line %d
-bool(false)
----
-bool(true)
----
-int(0)
-int(0)
-int(%d)
-int(0)
-int(%d)
diff --git a/ext/openssl/tests/012.phpt b/ext/openssl/tests/012.phpt
deleted file mode 100644
index dbd03ac0af..0000000000
--- a/ext/openssl/tests/012.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-openssl_seal() error tests
---SKIPIF--
-<?php if (!extension_loaded("openssl")) print "skip"; ?>
---FILE--
-<?php
-$data = "openssl_open() test";
-$pub_key = "file://" . dirname(__FILE__) . "/public.key";
-$wrong = "wrong";
-
-openssl_seal($data, $sealed, $ekeys, array($pub_key)); // no output
-openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key)); // no output
-openssl_seal($data, $sealed, $ekeys, array($pub_key, $wrong));
-openssl_seal($data, $sealed, $ekeys, $pub_key);
-openssl_seal($data, $sealed, $ekeys, array());
-openssl_seal($data, $sealed, $ekeys, array($wrong));
-?>
---EXPECTF--
-
-Warning: openssl_seal(): not a public key (2th member of pubkeys) in %s on line %d
-
-Warning: openssl_seal() expects parameter 4 to be array, string given in %s on line %d
-
-Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
-
-Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on line %d
-
diff --git a/ext/openssl/tests/026.phpt b/ext/openssl/tests/026.phpt
deleted file mode 100644
index 38d626d742..0000000000
--- a/ext/openssl/tests/026.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Options type checks
---SKIPIF--
-<?php if (!extension_loaded("openssl")) print "skip"; ?>
---FILE--
-<?php
-$x = openssl_pkey_new();
-$csr = openssl_csr_new(["countryName" => "DE"], $x, ["x509_extensions" => 0xDEADBEEF]);
-?>
-DONE
---EXPECT--
-DONE
diff --git a/ext/openssl/tests/bug55259.phpt b/ext/openssl/tests/bug55259.phpt
new file mode 100644
index 0000000000..27ededdb18
--- /dev/null
+++ b/ext/openssl/tests/bug55259.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #55259 (openssl extension does not get the DH parameters from DH key resource)
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) die("skip"); ?>
+--FILE--
+<?php
+
+$phex = 'dcf93a0b883972ec0e19989ac5a2ce310e1d37717e8d9571bb7623731866e61e' .
+ 'f75a2e27898b057f9891c2e27a639c3f29b60814581cd3b2ca3986d268370557' .
+ '7d45c2e7e52dc81c7a171876e5cea74b1448bfdfaf18828efd2519f14e45e382' .
+ '6634af1949e5b535cc829a483b8a76223e5d490a257f05bdff16f2fb22c583ab';
+$dh_details = array( 'p' => $phex, 'g' => '2' );
+$dh = openssl_pkey_new(array( 'dh'=> array( 'p' => $phex, 'g' => '2' )));
+var_dump($dh);
+$dh = openssl_pkey_new(array( 'dh'=> array( 'p' => hex2bin($phex), 'g' => '2' )));
+$details = openssl_pkey_get_details($dh);
+var_dump(bin2hex($details['dh']['p']));
+var_dump($details['dh']['g']);
+var_dump(strlen($details['dh']['pub_key']));
+var_dump(strlen($details['dh']['priv_key']));
+echo "Done";
+?>
+--EXPECT--
+bool(false)
+string(256) "dcf93a0b883972ec0e19989ac5a2ce310e1d37717e8d9571bb7623731866e61ef75a2e27898b057f9891c2e27a639c3f29b60814581cd3b2ca3986d2683705577d45c2e7e52dc81c7a171876e5cea74b1448bfdfaf18828efd2519f14e45e3826634af1949e5b535cc829a483b8a76223e5d490a257f05bdff16f2fb22c583ab"
+string(1) "2"
+int(128)
+int(128)
+Done
diff --git a/ext/openssl/tests/bug60632.phpt b/ext/openssl/tests/bug60632.phpt
new file mode 100644
index 0000000000..eb51276fa5
--- /dev/null
+++ b/ext/openssl/tests/bug60632.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #60632: openssl_seal fails with AES
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip openssl not loaded");
+?>
+--FILE--
+<?php
+
+$pkey = openssl_pkey_new(array(
+ 'digest_alg' => 'sha256',
+ 'private_key_bits' => 1024,
+ 'private_key_type' => OPENSSL_KEYTYPE_RSA,
+ 'encrypt_key' => false,
+ 'config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf',
+));
+$details = openssl_pkey_get_details($pkey);
+$test_pubkey = $details['key'];
+$pubkey = openssl_pkey_get_public($test_pubkey);
+$encrypted = null;
+$ekeys = array();
+$result = openssl_seal('test phrase', $encrypted, $ekeys, array($pubkey), 'AES-256-CBC');
+echo "Done";
+?>
+--EXPECTF--
+Warning: openssl_seal(): Cipher algorithm requires an IV to be supplied as a sixth parameter in %s on line %d
+Done
diff --git a/ext/openssl/tests/bug70395.phpt b/ext/openssl/tests/bug70395.phpt
new file mode 100644
index 0000000000..bfa881a0cd
--- /dev/null
+++ b/ext/openssl/tests/bug70395.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #70395 (Missing ARG_INFO for openssl_seal())
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip openssl not loaded");
+?>
+--FILE--
+<?php
+$func = new ReflectionFunction('openssl_seal');
+$param = $func->getParameters()[4];
+var_dump($param);
+var_dump($param->isOptional());
+?>
+--EXPECTF--
+object(ReflectionParameter)#%d (1) {
+ ["name"]=>
+ string(6) "method"
+}
+bool(true)
diff --git a/ext/openssl/tests/bug70438.phpt b/ext/openssl/tests/bug70438.phpt
new file mode 100644
index 0000000000..937e9f3bd9
--- /dev/null
+++ b/ext/openssl/tests/bug70438.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Request #70438: Add IV parameter for openssl_seal and openssl_open
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) {
+ print "skip";
+}
+if (!in_array('AES-128-CBC', openssl_get_cipher_methods(true))) {
+ print "skip";
+}
+?>
+--FILE--
+<?php
+$data = "openssl_seal() test";
+$cipher = 'AES-128-CBC';
+$pub_key = "file://" . dirname(__FILE__) . "/public.key";
+$priv_key = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
+
+openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), $cipher);
+openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), 'sparkles', $iv);
+openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), $cipher, $iv);
+openssl_open($sealed, $decrypted, $ekeys[0], $priv_key, $cipher, $iv);
+echo $decrypted;
+?>
+--EXPECTF--
+Warning: openssl_seal(): Cipher algorithm requires an IV to be supplied as a sixth parameter in %s on line %d
+
+Warning: openssl_seal(): Unknown signature algorithm. in %s on line %d
+openssl_seal() test
diff --git a/ext/openssl/tests/bug71475.phpt b/ext/openssl/tests/bug71475.phpt
new file mode 100644
index 0000000000..e959371c4c
--- /dev/null
+++ b/ext/openssl/tests/bug71475.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71475: openssl_seal() uninitialized memory usage
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip openssl not loaded");
+?>
+--FILE--
+<?php
+$_ = str_repeat("A", 512);
+openssl_seal($_, $_, $_, array_fill(0,64,0));
+?>
+DONE
+--EXPECTF--
+
+Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s%ebug71475.php on line %d
+DONE
diff --git a/ext/openssl/tests/bug72165.phpt b/ext/openssl/tests/bug72165.phpt
new file mode 100644
index 0000000000..93b3c3d4a8
--- /dev/null
+++ b/ext/openssl/tests/bug72165.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #72165 Null pointer dereference - openssl_csr_new
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+?>
+--FILE--
+<?php
+$var0 = array(0 => "hello", 1 => "world");
+$var2 = openssl_csr_new(array(0),$var0,null,array(0));
+?>
+==DONE==
+--EXPECTF--
+Warning: openssl_csr_new(): dn: numeric fild names are not supported in %sbug72165.php on line %d
+
+Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min -> 4 (failed; check error queue and value of string_mask OpenSSL option if illegal characters are reported) in %sbug72165.php on line %d
+==DONE==
diff --git a/ext/openssl/tests/005_crt.txt b/ext/openssl/tests/cert.csr
index 39084bce05..39084bce05 100644
--- a/ext/openssl/tests/005_crt.txt
+++ b/ext/openssl/tests/cert.csr
diff --git a/ext/openssl/tests/check_default_conf_path.phpt b/ext/openssl/tests/check_default_conf_path.phpt
new file mode 100644
index 0000000000..16aaa4bc1d
--- /dev/null
+++ b/ext/openssl/tests/check_default_conf_path.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Check for default OpenSSL config path on Windows
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+
+ob_start();
+phpinfo();
+$info = ob_get_contents();
+ob_end_clean();
+
+preg_match(",Openssl default config .* (.*),", $info, $m);
+
+if (isset($m[1])) {
+ var_dump(str_replace('/', '\\', strtolower($m[1])));
+}
+?>
+--EXPECT--
+string(28) "c:\usr\local\ssl\openssl.cnf"
diff --git a/ext/openssl/tests/022.phpt b/ext/openssl/tests/openssl_csr_export_bacis.phpt
index 1fa84d9f42..d3f8842e71 100644
--- a/ext/openssl/tests/022.phpt
+++ b/ext/openssl/tests/openssl_csr_export_bacis.phpt
@@ -14,7 +14,7 @@ $dn = array(
"localityName" => "Porto Alegre",
"commonName" => "Henrique do N. Angelo",
"emailAddress" => "hnangelo@php.net"
- );
+);
$args = array(
"digest_alg" => "sha1",
@@ -22,7 +22,7 @@ $args = array(
"private_key_type" => OPENSSL_KEYTYPE_DSA,
"encrypt_key" => true,
"config" => $config,
- );
+);
$privkey = openssl_pkey_new($config_arg);
$csr = openssl_csr_new($dn, $privkey, $args);
diff --git a/ext/openssl/tests/005.phpt b/ext/openssl/tests/openssl_csr_get_subject_basic.phpt
index f7fa201561..895ed3695d 100644
--- a/ext/openssl/tests/005.phpt
+++ b/ext/openssl/tests/openssl_csr_get_subject_basic.phpt
@@ -8,7 +8,7 @@ if (!function_exists("utf8_decode")) die("skip");
--FILE--
<?php
-$csr = file_get_contents(dirname(__FILE__) . '/005_crt.txt');
+$csr = file_get_contents(dirname(__FILE__) . '/cert.csr');
if ($out = openssl_csr_get_subject($csr, 1)) {
var_dump($out);
}
diff --git a/ext/openssl/tests/004.phpt b/ext/openssl/tests/openssl_csr_new_basic.phpt
index 508ccabc85..e0f52d739f 100644
--- a/ext/openssl/tests/004.phpt
+++ b/ext/openssl/tests/openssl_csr_new_basic.phpt
@@ -9,12 +9,18 @@ $a = 1;
var_dump(openssl_csr_new(1,$a));
var_dump(openssl_csr_new(1,$a,1,1));
$a = array();
-var_dump(openssl_csr_new(array(), $a, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'), array()));
-//this leaks
+$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');
+var_dump(openssl_csr_new(array(), $a, $conf, array()));
+
+// this leaks
$a = array(1,2);
$b = array(1,2);
-var_dump(openssl_csr_new($a, $b, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf')));
+var_dump(openssl_csr_new($a, $b, $conf));
+
+// options type check
+$x = openssl_pkey_new($conf);
+var_dump(openssl_csr_new(["countryName" => "DE"], $x, $conf + ["x509_extensions" => 0xDEADBEEF]));
echo "Done\n";
@@ -31,4 +37,5 @@ Warning: openssl_csr_new(): key array must be of the form array(0 => key, 1 => p
Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min -> 4 (failed; check error queue and value of string_mask OpenSSL option if illegal characters are reported) in %s on line %d
bool(false)
resource(%d) of type (OpenSSL X.509 CSR)
+resource(%d) of type (OpenSSL X.509 CSR)
Done
diff --git a/ext/openssl/tests/021.phpt b/ext/openssl/tests/openssl_csr_sign_basic.phpt
index 9fdf8e4e65..34cf50a997 100644
--- a/ext/openssl/tests/021.phpt
+++ b/ext/openssl/tests/openssl_csr_sign_basic.phpt
@@ -5,7 +5,7 @@ openssl_csr_sign() tests
--FILE--
<?php
$cert = "file://" . dirname(__FILE__) . "/cert.crt";
-$priv = "file://" . dirname(__FILE__) . "/private.key";
+$priv = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$wrong = "wrong";
$pub = "file://" . dirname(__FILE__) . "/public.key";
$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
diff --git a/ext/openssl/tests/011.phpt b/ext/openssl/tests/openssl_decrypt_basic.phpt
index 118e952a51..1c29767cc5 100644
--- a/ext/openssl/tests/011.phpt
+++ b/ext/openssl/tests/openssl_decrypt_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-openssl_encrypt() and openssl_decrypt() tests
+openssl_decrypt() tests dependent on openssl_encrypt
--SKIPIF--
<?php if (!extension_loaded("openssl")) print "skip"; ?>
--FILE--
diff --git a/ext/openssl/tests/openssl_error_string_basic.phpt b/ext/openssl/tests/openssl_error_string_basic.phpt
new file mode 100644
index 0000000000..7f39f70621
--- /dev/null
+++ b/ext/openssl/tests/openssl_error_string_basic.phpt
@@ -0,0 +1,182 @@
+--TEST--
+openssl_error_string() tests
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) print "skip";
+//if (OPENSSL_VERSION_NUMBER < 0x10001001) die("skip OpenSSLv1.0.1 required");
+?>
+--XFAIL--
+ot ready baked yet, fails different ways on different envs
+--FILE--
+<?php
+// helper function to dump openssl errors
+function dump_openssl_errors() {
+ while (($error_string = openssl_error_string()) !== false) {
+ var_dump($error_string);
+ }
+}
+
+// common output file
+$output_file = __DIR__ . "/openssl_error_string_basic_output.tmp";
+// invalid file for read is something that does not exist in current directory
+$invalid_file_for_read = __DIR__ . "/invalid_file_for_read_operation.txt";
+// invalid file for is the test dir as writting file to existing dir should alway fail
+$invalid_file_for_write = __DIR__;
+// crt file
+$crt_file = "file://" . __DIR__ . "/cert.crt";
+// csr file
+$csr_file = "file://" . __DIR__ . "/cert.csr";
+// public key file
+$public_key_file = "file://" .__DIR__ . "/public.key";
+// private key file
+$private_key_file = "file://" .__DIR__ . "/private_rsa_1024.key";
+// private key file with password (password is 'php')
+$private_key_file_with_pass = "file://" .__DIR__ . "/private_rsa_2048_pass_php.key";
+
+// ENCRYPTION
+$data = "test";
+$method = "AES-128-ECB";
+$enc_key = str_repeat('x', 40);
+// error because password is longer then key length and
+// EVP_CIPHER_CTX_set_key_length fails for AES
+openssl_encrypt($data, $method, $enc_key);
+$enc_error = openssl_error_string();
+var_dump($enc_error);
+// make sure that error is cleared now
+var_dump(openssl_error_string());
+// internally OpenSSL ERR won't save more than 15 (16 - 1) errors so lets test it
+for ($i = 0; $i < 20; $i++) {
+ openssl_encrypt($data, $method, $enc_key);
+}
+$error_queue_size = 0;
+while (($enc_error_new = openssl_error_string()) !== false) {
+ if ($enc_error_new !== $enc_error) {
+ echo "The new encoding error doesn't match the expected one\n";
+ }
+ ++$error_queue_size;
+}
+var_dump($error_queue_size);
+
+// PKEY
+echo "PKEY errors\n";
+// file for pkey (file:///) fails when opennig (BIO_new_file)
+openssl_pkey_export_to_file("file://" . $invalid_file_for_read, $output_file);
+dump_openssl_errors();
+// file or private pkey is not correct PEM - failing PEM_read_bio_PrivateKey
+openssl_pkey_export_to_file($csr_file, $output_file);
+dump_openssl_errors();
+// file to export cannot be written
+openssl_pkey_export_to_file($private_key_file, $invalid_file_for_write);
+dump_openssl_errors();
+// succesful export
+openssl_pkey_export($private_key_file_with_pass, $out, 'wrong pwd');
+dump_openssl_errors();
+// invalid x509 for getting public key
+openssl_pkey_get_public($private_key_file);
+dump_openssl_errors();
+// private encrypt with unknown padding
+openssl_private_encrypt("data", $crypted, $private_key_file, 1000);
+dump_openssl_errors();
+// private decrypt with failed padding check
+openssl_private_decrypt("data", $crypted, $private_key_file);
+dump_openssl_errors();
+// public encrypt and decrypt with failed padding check and padding
+openssl_public_encrypt("data", $crypted, $public_key_file, 1000);
+openssl_public_decrypt("data", $crypted, $public_key_file);
+dump_openssl_errors();
+
+// X509
+echo "X509 errors\n";
+// file for x509 (file:///) fails when opennig (BIO_new_file)
+openssl_x509_export_to_file("file://" . $invalid_file_for_read, $output_file);
+dump_openssl_errors();
+// file or str cert is not correct PEM - failing PEM_read_bio_X509 or PEM_ASN1_read_bio
+openssl_x509_export_to_file($csr_file, $output_file);
+dump_openssl_errors();
+// file to export cannot be written
+openssl_x509_export_to_file($crt_file, $invalid_file_for_write);
+dump_openssl_errors();
+// checking purpose fails because there is no such purpose 1000
+openssl_x509_checkpurpose($crt_file, 1000);
+dump_openssl_errors();
+// make sure that X509_STORE_add_lookup will not emmit any error (just PHP warning)
+openssl_x509_checkpurpose($crt_file, X509_PURPOSE_SSL_CLIENT, array( __DIR__ . "/cert.csr"));
+dump_openssl_errors();
+
+// CSR
+echo "CSR errors\n";
+// file for csr (file:///) fails when opennig (BIO_new_file)
+openssl_csr_get_subject("file://" . $invalid_file_for_read);
+dump_openssl_errors();
+// file or str csr is not correct PEM - failing PEM_read_bio_X509_REQ
+openssl_csr_get_subject($crt_file);
+dump_openssl_errors();
+
+// other possible cuases that are difficult to catch:
+// - ASN1_STRING_to_UTF8 fails in add_assoc_name_entry
+// - invalid php_x509_request field (NULL) would cause error with CONF_get_string
+
+?>
+--CLEAN--
+<?php
+$output_file = __DIR__ . "/openssl_error_string_basic_output.tmp";
+if (is_file($output_file)) {
+ unlink($output_file);
+}
+?>
+--EXPECTF--
+string(89) "error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length"
+bool(false)
+int(15)
+PKEY errors
+
+Warning: openssl_pkey_export_to_file(): cannot get key from parameter 1 in %s on line %d
+string(61) "error:02001002:system library:fopen:No such file or directory"
+string(53) "error:2006D080:BIO routines:BIO_new_file:no such file"
+
+Warning: openssl_pkey_export_to_file(): cannot get key from parameter 1 in %s on line %d
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+string(68) "error:0E06D06C:configuration file routines:NCONF_get_string:no value"
+string(68) "error:0E06D06C:configuration file routines:NCONF_get_string:no value"
+string(68) "error:0E06D06C:configuration file routines:NCONF_get_string:no value"
+string(68) "error:0E06D06C:configuration file routines:NCONF_get_string:no value"
+string(68) "error:0E06D06C:configuration file routines:NCONF_get_string:no value"
+string(68) "error:0E06D06C:configuration file routines:NCONF_get_string:no value"
+string(50) "error:02001015:system library:fopen:Is a directory"
+string(51) "error:2006D002:BIO routines:BIO_new_file:system lib"
+string(49) "error:09072007:PEM routines:PEM_write_bio:BUF lib"
+
+Warning: openssl_pkey_export(): cannot get key from parameter 1 in %s on line %d
+string(72) "error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt"
+string(53) "error:0906A065:PEM routines:PEM_do_header:bad decrypt"
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+string(72) "error:04066076:rsa routines:RSA_EAY_PRIVATE_ENCRYPT:unknown padding type"
+string(78) "error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error"
+string(72) "error:04065072:rsa routines:RSA_EAY_PRIVATE_DECRYPT:padding check failed"
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+string(71) "error:04068076:rsa routines:RSA_EAY_PUBLIC_ENCRYPT:unknown padding type"
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+string(79) "error:0407006A:rsa routines:RSA_padding_check_PKCS1_type_1:block type is not 01"
+string(71) "error:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding check failed"
+X509 errors
+
+Warning: openssl_x509_export_to_file(): cannot get cert from parameter 1 in %s on line %d
+string(61) "error:02001002:system library:fopen:No such file or directory"
+string(53) "error:2006D080:BIO routines:BIO_new_file:no such file"
+
+Warning: openssl_x509_export_to_file(): cannot get cert from parameter 1 in %s on line %d
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+
+Warning: openssl_x509_export_to_file(): error opening file %s in %s on line %d
+string(50) "error:02001015:system library:fopen:Is a directory"
+string(51) "error:2006D002:BIO routines:BIO_new_file:system lib"
+string(90) "error:0B086079:x509 certificate routines:X509_STORE_CTX_purpose_inherit:unknown purpose id"
+
+Warning: openssl_x509_checkpurpose(): error loading file %s in %s on line %d
+CSR errors
+string(61) "error:02001002:system library:fopen:No such file or directory"
+string(53) "error:2006D080:BIO routines:BIO_new_file:no such file"
+string(55) "error:20068079:BIO routines:BIO_gets:unsupported method"
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
+string(54) "error:0906D06C:PEM routines:PEM_read_bio:no start line"
diff --git a/ext/openssl/tests/openssl_get_cipher_methods.phpt b/ext/openssl/tests/openssl_get_cipher_methods.phpt
new file mode 100644
index 0000000000..cae223f4c4
--- /dev/null
+++ b/ext/openssl/tests/openssl_get_cipher_methods.phpt
@@ -0,0 +1,16 @@
+--TEST--
+openssl_get_cipher_methods basic test
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) print "skip";
+?>
+--FILE--
+<?php
+var_dump(is_array(openssl_get_cipher_methods(true)));
+var_dump(is_array(openssl_get_cipher_methods(false)));
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/openssl/tests/openssl_get_md_methods.phpt b/ext/openssl/tests/openssl_get_md_methods.phpt
new file mode 100644
index 0000000000..b35e55d69f
--- /dev/null
+++ b/ext/openssl/tests/openssl_get_md_methods.phpt
@@ -0,0 +1,16 @@
+--TEST--
+openssl_get_md_methods basic test
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) print "skip";
+?>
+--FILE--
+<?php
+var_dump(is_array(openssl_get_md_methods(true)));
+var_dump(is_array(openssl_get_md_methods(false)));
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/openssl/tests/013.phpt b/ext/openssl/tests/openssl_open_basic.phpt
index 91bb73dab3..55bb9eb0e3 100644
--- a/ext/openssl/tests/013.phpt
+++ b/ext/openssl/tests/openssl_open_basic.phpt
@@ -6,7 +6,7 @@ openssl_open() tests
<?php
$data = "openssl_open() test";
$pub_key = "file://" . dirname(__FILE__) . "/public.key";
-$priv_key = "file://" . dirname(__FILE__) . "/private.key";
+$priv_key = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$wrong = "wrong";
openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key, $pub_key));
diff --git a/ext/openssl/tests/openssl_pbkdf2.phpt b/ext/openssl/tests/openssl_pbkdf2_basic.phpt
index 3ec4dce236..3ec4dce236 100644
--- a/ext/openssl/tests/openssl_pbkdf2.phpt
+++ b/ext/openssl/tests/openssl_pbkdf2_basic.phpt
diff --git a/ext/openssl/tests/openssl_peer_fingerprint.phpt b/ext/openssl/tests/openssl_peer_fingerprint_basic.phpt
index 743233579a..743233579a 100644
--- a/ext/openssl/tests/openssl_peer_fingerprint.phpt
+++ b/ext/openssl/tests/openssl_peer_fingerprint_basic.phpt
diff --git a/ext/openssl/tests/024.phpt b/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt
index 0a61840de3..5589abb039 100644
--- a/ext/openssl/tests/024.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt
@@ -5,7 +5,7 @@ openssl_pkcs7_decrypt() tests
--FILE--
<?php
$infile = dirname(__FILE__) . "/cert.crt";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$encrypted = tempnam("/tmp", "ssl");
if ($encrypted === false)
die("failed to get a temporary filename!");
diff --git a/ext/openssl/tests/003.phpt b/ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt
index 39363c4548..e8ba264550 100644
--- a/ext/openssl/tests/003.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt
@@ -6,7 +6,7 @@ openssl_pkcs7_decrypt() and invalid parameters
<?php
function myErrorHandler($errno, $errstr, $errfile, $errline) {
-var_dump($errstr);
+ var_dump($errstr);
}
set_error_handler("myErrorHandler");
diff --git a/ext/openssl/tests/023.phpt b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt
index 1489613327..5f74f97b0c 100644
--- a/ext/openssl/tests/023.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt
@@ -13,7 +13,7 @@ if ($outfile2 === false)
die("failed to get a temporary filename!");
$single_cert = "file://" . dirname(__FILE__) . "/cert.crt";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$multi_certs = array($single_cert, $single_cert);
$assoc_headers = array("To" => "test@test", "Subject" => "testing openssl_pkcs7_encrypt()");
$headers = array("test@test", "testing openssl_pkcs7_encrypt()");
diff --git a/ext/openssl/tests/025.phpt b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
index ac567a517a..ac8edf19a9 100644
--- a/ext/openssl/tests/025.phpt
+++ b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
@@ -6,10 +6,11 @@ openssl_pkcs7_sign() tests
<?php
$infile = dirname(__FILE__) . "/cert.crt";
$outfile = tempnam("/tmp", "ssl");
-if ($outfile === false)
+if ($outfile === false) {
die("failed to get a temporary filename!");
+}
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$single_cert = "file://" . dirname(__FILE__) . "/cert.crt";
$assoc_headers = array("To" => "test@test", "Subject" => "testing openssl_pkcs7_sign()");
$headers = array("test@test", "testing openssl_pkcs7_sign()");
diff --git a/ext/openssl/tests/027.phpt b/ext/openssl/tests/openssl_pkey_export_basic.phpt
index 8311ab1bd9..d229d6b135 100644
--- a/ext/openssl/tests/027.phpt
+++ b/ext/openssl/tests/openssl_pkey_export_basic.phpt
@@ -10,7 +10,9 @@ if (!defined('OPENSSL_KEYTYPE_EC')) die("skip no EC available");
$key = openssl_pkey_get_private('file://' . dirname(__FILE__) . '/private_ec.key');
var_dump($key);
-var_dump(openssl_pkey_export($key, $output));
+$config_arg = array("config" => __DIR__ . DIRECTORY_SEPARATOR . "openssl.cnf");
+
+var_dump(openssl_pkey_export($key, $output, NULL, $config_arg));
echo $output;
// Load the private key from the exported pem string
@@ -18,7 +20,7 @@ $details = openssl_pkey_get_details(openssl_pkey_get_private($output));
var_dump(OPENSSL_KEYTYPE_EC === $details['type']);
// Export key with passphrase
-openssl_pkey_export($key, $output, 'passphrase');
+openssl_pkey_export($key, $output, 'passphrase', $config_arg);
$details = openssl_pkey_get_details(openssl_pkey_get_private($output, 'passphrase'));
var_dump(OPENSSL_KEYTYPE_EC === $details['type']);
@@ -32,7 +34,7 @@ var_dump($details === openssl_pkey_get_details($pKey));
// Export to file
$tempname = tempnam(sys_get_temp_dir(), 'openssl_ec');
-var_dump(openssl_pkey_export_to_file($key, $tempname));
+var_dump(openssl_pkey_export_to_file($key, $tempname, NULL, $config_arg));
$details = openssl_pkey_get_details(openssl_pkey_get_private('file://' . $tempname));
var_dump(OPENSSL_KEYTYPE_EC === $details['type']);
diff --git a/ext/openssl/tests/028.phpt b/ext/openssl/tests/openssl_pkey_get_details_basic.phpt
index 8e0cef46c0..8e0cef46c0 100644
--- a/ext/openssl/tests/028.phpt
+++ b/ext/openssl/tests/openssl_pkey_get_details_basic.phpt
diff --git a/ext/openssl/tests/openssl_pkey_new_basic.phpt b/ext/openssl/tests/openssl_pkey_new_basic.phpt
new file mode 100644
index 0000000000..b0fd530975
--- /dev/null
+++ b/ext/openssl/tests/openssl_pkey_new_basic.phpt
@@ -0,0 +1,106 @@
+--TEST--
+openssl_pkey_new() basic usage tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+function openssl_pkey_test_cmp($expected, $bin_key) {
+ var_dump(strcasecmp(ltrim($expected, '0'), bin2hex($bin_key)));
+}
+
+// RSA
+$nhex = "BBF82F090682CE9C2338AC2B9DA871F7368D07EED41043A440D6B6F07454F51F" .
+ "B8DFBAAF035C02AB61EA48CEEB6FCD4876ED520D60E1EC4619719D8A5B8B807F" .
+ "AFB8E0A3DFC737723EE6B4B7D93A2584EE6A649D060953748834B2454598394E" .
+ "E0AAB12D7B61A51F527A9A41F6C1687FE2537298CA2A8F5946F8E5FD091DBDCB";
+
+$ehex = "11";
+$dhex = "A5DAFC5341FAF289C4B988DB30C1CDF83F31251E0668B42784813801579641B2" .
+ "9410B3C7998D6BC465745E5C392669D6870DA2C082A939E37FDCB82EC93EDAC9" .
+ "7FF3AD5950ACCFBC111C76F1A9529444E56AAF68C56C092CD38DC3BEF5D20A93" .
+ "9926ED4F74A13EDDFBE1A1CECC4894AF9428C2B7B8883FE4463A4BC85B1CB3C1";
+
+$phex = "EECFAE81B1B9B3C908810B10A1B5600199EB9F44AEF4FDA493B81A9E3D84F632" .
+ "124EF0236E5D1E3B7E28FAE7AA040A2D5B252176459D1F397541BA2A58FB6599";
+
+$qhex = "C97FB1F027F453F6341233EAAAD1D9353F6C42D08866B1D05A0F2035028B9D86" .
+ "9840B41666B42E92EA0DA3B43204B5CFCE3352524D0416A5A441E700AF461503";
+
+$rsa= openssl_pkey_new(array(
+ 'rsa' => array(
+ 'n' => hex2bin($nhex),
+ 'e' => hex2bin($ehex),
+ 'd' => hex2bin($dhex),
+ 'p' => hex2bin($phex),
+ 'q' => hex2bin($qhex),
+ )
+));
+$details = openssl_pkey_get_details($rsa);
+$rsa_details = $details['rsa'];
+openssl_pkey_test_cmp($nhex, $rsa_details['n']);
+openssl_pkey_test_cmp($ehex, $rsa_details['e']);
+openssl_pkey_test_cmp($dhex, $rsa_details['d']);
+openssl_pkey_test_cmp($phex, $rsa_details['p']);
+openssl_pkey_test_cmp($qhex, $rsa_details['q']);
+
+// DSA
+$phex = '00f8000ae45b2dacb47dd977d58b719d097bdf07cb2c17660ad898518c08' .
+ '1a61659a16daadfaa406a0a994c743df5eda07e36bd0adcad921b77432ff' .
+ '24ccc31e782d647e66768122b578857e9293df78387dc8b44af2a4a3f305' .
+ '1f236b1000a3e31da489c6681b0031f7ec37c2e1091bdb698e7660f135b6' .
+ '996def90090303b7ad';
+
+$qhex = '009b3734fc9f7a4a9d6437ec314e0a78c2889af64b';
+
+$ghex = '00b320300a0bc55b8f0ec6edc218e2185250f38fbb8291db8a89227f6e41' .
+ '00d47d6ccb9c7d42fc43280ecc2ed386e81ff65bc5d6a2ae78db7372f5dc' .
+ 'f780f4558e7ed3dd0c96a1b40727ac56c5165aed700a3b63997893a1fb21' .
+ '4e882221f0dd9604820dc34e2725dd6901c93e0ca56f6d76d495c332edc5' .
+ 'b81747c4c447a941f3';
+$dsa = openssl_pkey_new(array(
+ 'dsa' => array(
+ 'p' => hex2bin($phex),
+ 'q' => hex2bin($qhex),
+ 'g' => hex2bin($ghex)
+ )
+));
+$details = openssl_pkey_get_details($dsa);
+$dsa_details = $details['dsa'];
+openssl_pkey_test_cmp($phex, $dsa_details['p']);
+openssl_pkey_test_cmp($qhex, $dsa_details['q']);
+openssl_pkey_test_cmp($ghex, $dsa_details['g']);
+var_dump(strlen($dsa_details['priv_key']));
+var_dump(strlen($dsa_details['pub_key']));
+
+// DH
+$phex = 'dcf93a0b883972ec0e19989ac5a2ce310e1d37717e8d9571bb7623731866e61e' .
+ 'f75a2e27898b057f9891c2e27a639c3f29b60814581cd3b2ca3986d268370557' .
+ '7d45c2e7e52dc81c7a171876e5cea74b1448bfdfaf18828efd2519f14e45e382' .
+ '6634af1949e5b535cc829a483b8a76223e5d490a257f05bdff16f2fb22c583ab';
+
+$dh_details = array('p' => $phex, 'g' => '2');
+$dh = openssl_pkey_new(array(
+ 'dh'=> array('p' => hex2bin($phex), 'g' => '2'))
+);
+$details = openssl_pkey_get_details($dh);
+$dh_details = $details['dh'];
+openssl_pkey_test_cmp($phex, $dh_details['p']);
+var_dump($dh_details['g']);
+var_dump(strlen($dh_details['pub_key']));
+var_dump(strlen($dh_details['priv_key']));
+?>
+--EXPECT--
+int(0)
+int(0)
+int(0)
+int(0)
+int(0)
+int(0)
+int(0)
+int(0)
+int(20)
+int(128)
+int(0)
+string(1) "2"
+int(128)
+int(128)
diff --git a/ext/openssl/tests/006.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt
index d6e41e496b..c5993411c3 100644
--- a/ext/openssl/tests/006.phpt
+++ b/ext/openssl/tests/openssl_pkey_new_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-openssl_pkey_new() with an empty sub-array arg generates a malformed resource
+openssl_pkey_new() error tests
--SKIPIF--
<?php if (!extension_loaded("openssl")) print "skip"; ?>
--FILE--
diff --git a/ext/openssl/tests/017.phpt b/ext/openssl/tests/openssl_private_decrypt_basic.phpt
index 65a7cd1025..76a08b8d55 100644
--- a/ext/openssl/tests/017.phpt
+++ b/ext/openssl/tests/openssl_private_decrypt_basic.phpt
@@ -5,7 +5,7 @@ openssl_private_decrypt() tests
--FILE--
<?php
$data = "Testing openssl_public_decrypt()";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$pubkey = "file://" . dirname(__FILE__) . "/public.key";
$wrong = "wrong";
diff --git a/ext/openssl/tests/014.phpt b/ext/openssl/tests/openssl_private_encrypt_basic.phpt
index 6123964ee5..a2a5152158 100644
--- a/ext/openssl/tests/014.phpt
+++ b/ext/openssl/tests/openssl_private_encrypt_basic.phpt
@@ -5,13 +5,14 @@ openssl_private_encrypt() tests
--FILE--
<?php
$data = "Testing openssl_private_encrypt()";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$pubkey = "file://" . dirname(__FILE__) . "/public.key";
$wrong = "wrong";
+
class test {
- function __toString() {
- return "test";
- }
+ function __toString() {
+ return "test";
+ }
}
$obj = new test;
diff --git a/ext/openssl/tests/016.phpt b/ext/openssl/tests/openssl_public_decrypt_basic.phpt
index 2d772e7a36..42d72b9cd4 100644
--- a/ext/openssl/tests/016.phpt
+++ b/ext/openssl/tests/openssl_public_decrypt_basic.phpt
@@ -5,7 +5,7 @@ openssl_public_decrypt() tests
--FILE--
<?php
$data = "Testing openssl_public_decrypt()";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$pubkey = "file://" . dirname(__FILE__) . "/public.key";
$wrong = "wrong";
diff --git a/ext/openssl/tests/015.phpt b/ext/openssl/tests/openssl_public_encrypt_basic.phpt
index a89121de10..a3c4c57539 100644
--- a/ext/openssl/tests/015.phpt
+++ b/ext/openssl/tests/openssl_public_encrypt_basic.phpt
@@ -5,13 +5,14 @@ openssl_public_encrypt() tests
--FILE--
<?php
$data = "Testing openssl_public_encrypt()";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$pubkey = "file://" . dirname(__FILE__) . "/public.key";
$wrong = "wrong";
+
class test {
- function __toString() {
- return "test";
- }
+ function __toString() {
+ return "test";
+ }
}
$obj = new test;
diff --git a/ext/openssl/tests/openssl_random_pseudo_bytes.phpt b/ext/openssl/tests/openssl_random_pseudo_bytes_basic.phpt
index ac5a3079a1..ac5a3079a1 100644
--- a/ext/openssl/tests/openssl_random_pseudo_bytes.phpt
+++ b/ext/openssl/tests/openssl_random_pseudo_bytes_basic.phpt
diff --git a/ext/openssl/tests/openssl_seal_basic.phpt b/ext/openssl/tests/openssl_seal_basic.phpt
new file mode 100644
index 0000000000..4f1958a365
--- /dev/null
+++ b/ext/openssl/tests/openssl_seal_basic.phpt
@@ -0,0 +1,58 @@
+--TEST--
+openssl_seal() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+// simple tests
+$a = 1;
+$b = array(1);
+$c = array(1);
+$d = array(1);
+
+var_dump(openssl_seal($a, $b, $c, $d));
+var_dump(openssl_seal($a, $a, $a, array()));
+var_dump(openssl_seal($c, $c, $c, 1));
+var_dump(openssl_seal($b, $b, $b, ""));
+
+// tests with cert
+$data = "openssl_open() test";
+$pub_key = "file://" . dirname(__FILE__) . "/public.key";
+$wrong = "wrong";
+
+var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key))); // no output
+var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key))); // no output
+var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key, $wrong)));
+var_dump(openssl_seal($data, $sealed, $ekeys, $pub_key));
+var_dump(openssl_seal($data, $sealed, $ekeys, array()));
+var_dump(openssl_seal($data, $sealed, $ekeys, array($wrong)));
+
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on line %d
+bool(false)
+
+Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
+bool(false)
+
+Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
+NULL
+
+Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
+NULL
+int(19)
+int(19)
+
+Warning: openssl_seal(): not a public key (2th member of pubkeys) in %s on line %d
+bool(false)
+
+Warning: openssl_seal() expects parameter 4 to be array, string given in %s on line %d
+NULL
+
+Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
+bool(false)
+
+Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on line %d
+bool(false)
+Done
diff --git a/ext/openssl/tests/018.phpt b/ext/openssl/tests/openssl_sign_basic.phpt
index 230c0a89db..3d41ee1d34 100644
--- a/ext/openssl/tests/018.phpt
+++ b/ext/openssl/tests/openssl_sign_basic.phpt
@@ -5,7 +5,7 @@ openssl_sign() tests
--FILE--
<?php
$data = "Testing openssl_sign()";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$wrong = "wrong";
var_dump(openssl_sign($data, $sign, $privkey)); // no output
diff --git a/ext/openssl/tests/openssl_spki_export.phpt b/ext/openssl/tests/openssl_spki_export.phpt
deleted file mode 100644
index 59332f70a5..0000000000
--- a/ext/openssl/tests/openssl_spki_export.phpt
+++ /dev/null
@@ -1,62 +0,0 @@
---TEST--
-Testing openssl_spki_export()
-Creates SPKAC for all available key sizes & signature algorithms and exports public key
---SKIPIF--
-<?php
-if (!extension_loaded("openssl")) die("skip");
-if (!@openssl_pkey_new()) die("skip cannot create private key");
-?>
---FILE--
-<?php
-
-/* array of private key sizes to test */
-$ksize = array('1024'=>1024,
- '2048'=>2048,
- '4096'=>4096);
-
-/* array of available hashings to test */
-$algo = array('md4'=>OPENSSL_ALGO_MD4,
- 'md5'=>OPENSSL_ALGO_MD5,
- 'sha1'=>OPENSSL_ALGO_SHA1,
- 'sha224'=>OPENSSL_ALGO_SHA224,
- 'sha256'=>OPENSSL_ALGO_SHA256,
- 'sha384'=>OPENSSL_ALGO_SHA384,
- 'sha512'=>OPENSSL_ALGO_SHA512,
- 'rmd160'=>OPENSSL_ALGO_RMD160);
-
-/* loop over key sizes for test */
-foreach($ksize as $k => $v) {
-
- /* generate new private key of specified size to use for tests */
- $pkey = openssl_pkey_new(array('digest_alg' => 'sha512',
- 'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 'private_key_bits' => $v));
- openssl_pkey_export($pkey, $pass);
-
- /* loop to create and verify results */
- foreach($algo as $key => $value) {
- $spkac = openssl_spki_new($pkey, _uuid(), $value);
- echo openssl_spki_export(preg_replace('/SPKAC=/', '', $spkac));
- }
- openssl_free_key($pkey);
-}
-
-/* generate a random challenge */
-function _uuid()
-{
- return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
- mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff));
-}
-
-?>
---EXPECTREGEX--
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
-\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
diff --git a/ext/openssl/tests/openssl_spki_export_basic.phpt b/ext/openssl/tests/openssl_spki_export_basic.phpt
new file mode 100644
index 0000000000..1e3bd1fd39
--- /dev/null
+++ b/ext/openssl/tests/openssl_spki_export_basic.phpt
@@ -0,0 +1,60 @@
+--TEST--
+openssl_spki_export() tests for exporting public key
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+if (!@openssl_pkey_new()) die("skip cannot create private key");
+?>
+--FILE--
+<?php
+
+/* array of private key sizes to test */
+$key_sizes = array(1024, 2048, 4096);
+$pkeys = array();
+foreach ($key_sizes as $key_size) {
+ $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key";
+ $pkeys[] = openssl_pkey_get_private($key_file);
+}
+
+
+/* array of available hashings to test */
+$algo = array(
+ OPENSSL_ALGO_MD4,
+ OPENSSL_ALGO_MD5,
+ OPENSSL_ALGO_SHA1,
+ OPENSSL_ALGO_SHA224,
+ OPENSSL_ALGO_SHA256,
+ OPENSSL_ALGO_SHA384,
+ OPENSSL_ALGO_SHA512,
+ OPENSSL_ALGO_RMD160
+);
+
+/* loop over key sizes for test */
+foreach ($pkeys as $pkey) {
+
+ /* loop to create and verify results */
+ foreach ($algo as $value) {
+ $spkac = openssl_spki_new($pkey, _uuid(), $value);
+ echo openssl_spki_export(preg_replace('/SPKAC=/', '', $spkac));
+ }
+}
+
+/* generate a random challenge */
+function _uuid() {
+ return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
+ mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff));
+}
+
+
+?>
+--EXPECTREGEX--
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
+\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-.*\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-
diff --git a/ext/openssl/tests/openssl_spki_export_challenge.phpt b/ext/openssl/tests/openssl_spki_export_challenge_basic.phpt
index 71ef62edd5..07a69d3b45 100644
--- a/ext/openssl/tests/openssl_spki_export_challenge.phpt
+++ b/ext/openssl/tests/openssl_spki_export_challenge_basic.phpt
@@ -1,6 +1,5 @@
--TEST--
-Testing openssl_spki_export_challenge()
-Creates SPKAC for all available key sizes & signature algorithms and exports challenge
+openssl_spki_export_challenge() tests for exporting challenge
--INI--
error_reporting=0
--SKIPIF--
@@ -12,47 +11,46 @@ if (!@openssl_pkey_new()) die("skip cannot create private key");
<?php
/* array of private key sizes to test */
-$ksize = array('1024'=>1024,
- '2048'=>2048,
- '4096'=>4096);
+$key_sizes = array(1024, 2048, 4096);
+$pkeys = array();
+foreach ($key_sizes as $key_size) {
+ $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key";
+ $pkeys[] = openssl_pkey_get_private($key_file);
+}
+
/* array of available hashings to test */
-$algo = array('md4'=>OPENSSL_ALGO_MD4,
- 'md5'=>OPENSSL_ALGO_MD5,
- 'sha1'=>OPENSSL_ALGO_SHA1,
- 'sha224'=>OPENSSL_ALGO_SHA224,
- 'sha256'=>OPENSSL_ALGO_SHA256,
- 'sha384'=>OPENSSL_ALGO_SHA384,
- 'sha512'=>OPENSSL_ALGO_SHA512,
- 'rmd160'=>OPENSSL_ALGO_RMD160);
+$algo = array(
+ OPENSSL_ALGO_MD4,
+ OPENSSL_ALGO_MD5,
+ OPENSSL_ALGO_SHA1,
+ OPENSSL_ALGO_SHA224,
+ OPENSSL_ALGO_SHA256,
+ OPENSSL_ALGO_SHA384,
+ OPENSSL_ALGO_SHA512,
+ OPENSSL_ALGO_RMD160
+);
/* loop over key sizes for test */
-foreach($ksize as $k => $v) {
-
- /* generate new private key of specified size to use for tests */
- $pkey = openssl_pkey_new(array('digest_alg' => 'sha512',
- 'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 'private_key_bits' => $v));
- openssl_pkey_export($pkey, $pass);
+foreach ($pkeys as $pkey) {
/* loop to create and verify results */
- foreach($algo as $key => $value) {
+ foreach ($algo as $value) {
$spkac = openssl_spki_new($pkey, _uuid(), $value);
var_dump(openssl_spki_export_challenge(preg_replace('/SPKAC=/', '', $spkac)));
- var_dump(openssl_spki_export_challenge($spkac.'Make it fail'));
+ var_dump(openssl_spki_export_challenge($spkac . 'Make it fail'));
}
- openssl_free_key($pkey);
}
/* generate a random challenge */
-function _uuid()
-{
- return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
- mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff));
+function _uuid() {
+ return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
+ mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff));
}
+
?>
--EXPECTREGEX--
string\(36\) \"[0-9a-f]{8}\-([0-9a-f]{4}\-){3}[0-9a-f]{12}\"
diff --git a/ext/openssl/tests/openssl_spki_new.phpt b/ext/openssl/tests/openssl_spki_new.phpt
deleted file mode 100644
index e40f9bf28e..0000000000
--- a/ext/openssl/tests/openssl_spki_new.phpt
+++ /dev/null
@@ -1,77 +0,0 @@
---TEST--
-Testing openssl_spki_new()
-Tests SPKAC for all available private key sizes & hashing algorithms
---SKIPIF--
-<?php
-if (!extension_loaded("openssl")) die("skip");
-if (!@openssl_pkey_new()) die("skip cannot create private key");
-?>
---FILE--
-<?php
-
-/* array of private key sizes to test */
-$ksize = array('1024'=>1024,
- '2048'=>2048,
- '4096'=>4096);
-
-/* array of available hashings to test */
-$algo = array('md4'=>OPENSSL_ALGO_MD4,
- 'md5'=>OPENSSL_ALGO_MD5,
- 'sha1'=>OPENSSL_ALGO_SHA1,
- 'sha224'=>OPENSSL_ALGO_SHA224,
- 'sha256'=>OPENSSL_ALGO_SHA256,
- 'sha384'=>OPENSSL_ALGO_SHA384,
- 'sha512'=>OPENSSL_ALGO_SHA512,
- 'rmd160'=>OPENSSL_ALGO_RMD160);
-
-/* loop over key sizes for test */
-foreach($ksize as $k => $v) {
-
- /* generate new private key of specified size to use for tests */
- $pkey = openssl_pkey_new(array('digest_alg' => 'sha512',
- 'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 'private_key_bits' => $v));
- openssl_pkey_export($pkey, $pass);
-
- /* loop to create and verify results */
- foreach($algo as $key => $value) {
- var_dump(openssl_spki_new($pkey, _uuid(), $value));
- }
- openssl_free_key($pkey);
-}
-
-/* generate a random challenge */
-function _uuid()
-{
- return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
- mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff));
-}
-
-?>
---EXPECTF--
-string(478) "%s"
-string(478) "%s"
-string(478) "%s"
-string(478) "%s"
-string(478) "%s"
-string(478) "%s"
-string(478) "%s"
-string(474) "%s"
-string(830) "%s"
-string(830) "%s"
-string(830) "%s"
-string(830) "%s"
-string(830) "%s"
-string(830) "%s"
-string(830) "%s"
-string(826) "%s"
-string(1510) "%s"
-string(1510) "%s"
-string(1510) "%s"
-string(1510) "%s"
-string(1510) "%s"
-string(1510) "%s"
-string(1510) "%s"
-string(1506) "%s"
diff --git a/ext/openssl/tests/openssl_spki_new_basic.phpt b/ext/openssl/tests/openssl_spki_new_basic.phpt
new file mode 100644
index 0000000000..b31d6f9184
--- /dev/null
+++ b/ext/openssl/tests/openssl_spki_new_basic.phpt
@@ -0,0 +1,73 @@
+--TEST--
+openssl_spki_new() test for creating SPKI string
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+?>
+--FILE--
+<?php
+
+/* array of private key sizes to test */
+$key_sizes = array(1024, 2048, 4096);
+$pkeys = array();
+foreach ($key_sizes as $key_size) {
+ $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key";
+ $pkeys[] = openssl_pkey_get_private($key_file);
+}
+
+
+/* array of available hashings to test */
+$algo = array(
+ OPENSSL_ALGO_MD4,
+ OPENSSL_ALGO_MD5,
+ OPENSSL_ALGO_SHA1,
+ OPENSSL_ALGO_SHA224,
+ OPENSSL_ALGO_SHA256,
+ OPENSSL_ALGO_SHA384,
+ OPENSSL_ALGO_SHA512,
+ OPENSSL_ALGO_RMD160
+);
+
+/* loop over key sizes for test */
+foreach ($pkeys as $pkey) {
+
+ /* loop to create and verify results */
+ foreach ($algo as $value) {
+ var_dump(openssl_spki_new($pkey, _uuid(), $value));
+ }
+}
+
+/* generate a random challenge */
+function _uuid() {
+ return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
+ mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff));
+}
+
+?>
+--EXPECTF--
+string(478) "%s"
+string(478) "%s"
+string(478) "%s"
+string(478) "%s"
+string(478) "%s"
+string(478) "%s"
+string(478) "%s"
+string(474) "%s"
+string(830) "%s"
+string(830) "%s"
+string(830) "%s"
+string(830) "%s"
+string(830) "%s"
+string(830) "%s"
+string(830) "%s"
+string(826) "%s"
+string(1510) "%s"
+string(1510) "%s"
+string(1510) "%s"
+string(1510) "%s"
+string(1510) "%s"
+string(1510) "%s"
+string(1510) "%s"
+string(1506) "%s"
diff --git a/ext/openssl/tests/openssl_spki_verify.phpt b/ext/openssl/tests/openssl_spki_verify.phpt
deleted file mode 100644
index 52dc8e2045..0000000000
--- a/ext/openssl/tests/openssl_spki_verify.phpt
+++ /dev/null
@@ -1,91 +0,0 @@
---TEST--
-Testing openssl_spki_verify()
-Creates SPKAC for all available key sizes & signature algorithms and tests for valid signature
---INI--
-error_reporting=0
---SKIPIF--
-<?php
-if (!extension_loaded("openssl")) die("skip");
-if (!@openssl_pkey_new()) die("skip cannot create private key");
-?>
---FILE--
-<?php
-
-/* array of private key sizes to test */
-$ksize = array('1024'=>1024,
- '2048'=>2048,
- '4096'=>4096);
-
-/* array of available hashings to test */
-$algo = array('sha1'=>OPENSSL_ALGO_SHA1,
- 'sha224'=>OPENSSL_ALGO_SHA224,
- 'sha256'=>OPENSSL_ALGO_SHA256,
- 'sha384'=>OPENSSL_ALGO_SHA384,
- 'sha512'=>OPENSSL_ALGO_SHA512,
- 'rmd160'=>OPENSSL_ALGO_RMD160);
-
-/* loop over key sizes for test */
-foreach($ksize as $k => $v) {
-
- /* generate new private key of specified size to use for tests */
- $pkey = openssl_pkey_new(array('digest_alg' => 'sha512',
- 'private_key_type' => OPENSSL_KEYTYPE_RSA,
- 'private_key_bits' => $v));
- openssl_pkey_export($pkey, $pass);
-
- /* loop to create and verify results */
- foreach($algo as $key => $value) {
- $spkac = openssl_spki_new($pkey, _uuid(), $value);
- var_dump(openssl_spki_verify(preg_replace('/SPKAC=/', '', $spkac)));
- var_dump(openssl_spki_verify($spkac.'Make it fail'));
- }
- openssl_free_key($pkey);
-}
-
-/* generate a random challenge */
-function _uuid()
-{
- return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
- mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
- mt_rand(0, 0xffff), mt_rand(0, 0xffff));
-}
-
-?>
---EXPECT--
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false)
-bool(true)
-bool(false) \ No newline at end of file
diff --git a/ext/openssl/tests/openssl_spki_verify_basic.phpt b/ext/openssl/tests/openssl_spki_verify_basic.phpt
new file mode 100644
index 0000000000..7b56a37e13
--- /dev/null
+++ b/ext/openssl/tests/openssl_spki_verify_basic.phpt
@@ -0,0 +1,88 @@
+--TEST--
+openssl_spki_verify() tests for valid signature
+--INI--
+error_reporting=0
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+?>
+--FILE--
+<?php
+
+/* array of private key sizes to test */
+$key_sizes = array(1024, 2048, 4096);
+$pkeys = array();
+foreach ($key_sizes as $key_size) {
+ $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key";
+ $pkeys[] = openssl_pkey_get_private($key_file);
+}
+
+
+/* array of available hashings to test */
+$algo = array(
+ OPENSSL_ALGO_SHA1,
+ OPENSSL_ALGO_SHA224,
+ OPENSSL_ALGO_SHA256,
+ OPENSSL_ALGO_SHA384,
+ OPENSSL_ALGO_SHA512,
+ OPENSSL_ALGO_RMD160
+);
+
+/* loop over key sizes for test */
+foreach ($pkeys as $pkey) {
+
+ /* loop to create and verify results */
+ foreach ($algo as $value) {
+ $spkac = openssl_spki_new($pkey, _uuid(), $value);
+ var_dump(openssl_spki_verify(preg_replace('/SPKAC=/', '', $spkac)));
+ var_dump(openssl_spki_verify($spkac . 'Make it fail'));
+ }
+}
+
+/* generate a random challenge */
+function _uuid() {
+ return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000,
+ mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff),
+ mt_rand(0, 0xffff), mt_rand(0, 0xffff));
+}
+
+
+?>
+--EXPECT--
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
diff --git a/ext/openssl/tests/019.phpt b/ext/openssl/tests/openssl_verify_basic.phpt
index c1f186c335..a21dfedb01 100644
--- a/ext/openssl/tests/019.phpt
+++ b/ext/openssl/tests/openssl_verify_basic.phpt
@@ -5,7 +5,7 @@ openssl_verify() tests
--FILE--
<?php
$data = "Testing openssl_verify()";
-$privkey = "file://" . dirname(__FILE__) . "/private.key";
+$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
$pubkey = "file://" . dirname(__FILE__) . "/public.key";
$wrong = "wrong";
diff --git a/ext/openssl/tests/009.phpt b/ext/openssl/tests/openssl_x509_check_private_key_basic.phpt
index a7156dd8d0..b4842aae18 100644
--- a/ext/openssl/tests/009.phpt
+++ b/ext/openssl/tests/openssl_x509_check_private_key_basic.phpt
@@ -5,15 +5,15 @@ openssl_x509_check_private_key() tests
--FILE--
<?php
$fp = fopen(dirname(__FILE__) . "/cert.crt","r");
-$a = fread($fp,8192);
+$a = fread($fp, 8192);
fclose($fp);
-$fp = fopen(dirname(__FILE__) . "/private.key","r");
-$b = fread($fp,8192);
+$fp = fopen(dirname(__FILE__) . "/private_rsa_1024.key","r");
+$b = fread($fp, 8192);
fclose($fp);
$cert = "file://" . dirname(__FILE__) . "/cert.crt";
-$key = "file://" . dirname(__FILE__) . "/private.key";
+$key = "file://" . dirname(__FILE__) . "/private_rsa_1024.key";
var_dump(openssl_x509_check_private_key($cert, $key));
var_dump(openssl_x509_check_private_key("", $key));
diff --git a/ext/openssl/tests/openssl_x509_checkpurpose.phpt b/ext/openssl/tests/openssl_x509_checkpurpose.phpt
new file mode 100644
index 0000000000..2126330a02
--- /dev/null
+++ b/ext/openssl/tests/openssl_x509_checkpurpose.phpt
@@ -0,0 +1,149 @@
+--TEST--
+int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose [, array $cainfo = array() [, string $untrustedfile ]] ) function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip";
+if (OPENSSL_VERSION_NUMBER < 0x10000000) die("skip Output requires OpenSSL 1.0");
+?>
+--FILE--
+<?php
+$cert = "file://" . dirname(__FILE__) . "/cert.crt";
+$bert = "file://" . dirname(__FILE__) . "/bug41033.pem";
+$sert = "file://" . dirname(__FILE__) . "/san-cert.pem";
+$cpca = dirname(__FILE__) . "/san-ca.pem";
+$utfl = dirname(__FILE__) . "/sni_server_domain1.pem";
+
+/* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose); */
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_CLIENT));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_SERVER));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_NS_SSL_SERVER));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SMIME_SIGN));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SMIME_ENCRYPT));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_CRL_SIGN));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_ANY));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SSL_CLIENT));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SSL_SERVER));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_NS_SSL_SERVER));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SMIME_SIGN));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SMIME_ENCRYPT));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_CRL_SIGN));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_ANY));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SSL_CLIENT));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SSL_SERVER));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_NS_SSL_SERVER));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_SIGN));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_ENCRYPT));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_CRL_SIGN));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_ANY));
+
+/* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose [, array $cainfo = array() ] ); */
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_CLIENT, array($cpca)));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_SERVER, array($cpca)));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_NS_SSL_SERVER, array($cpca)));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SMIME_SIGN, array($cpca)));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SMIME_ENCRYPT, array($cpca)));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_CRL_SIGN, array($cpca)));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_ANY, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SSL_CLIENT, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SSL_SERVER, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_NS_SSL_SERVER, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SMIME_SIGN, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SMIME_ENCRYPT, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_CRL_SIGN, array($cpca)));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_ANY, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SSL_CLIENT, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SSL_SERVER, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_NS_SSL_SERVER, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_SIGN, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_ENCRYPT, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_CRL_SIGN, array($cpca)));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_ANY, array($cpca)));
+
+/* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose [, array $cainfo = array() [, string $untrustedfile ]] ); function */
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_CLIENT, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_SERVER, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_NS_SSL_SERVER, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SMIME_SIGN, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_SMIME_ENCRYPT, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_CRL_SIGN, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($cert, X509_PURPOSE_ANY, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SSL_CLIENT, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SSL_SERVER, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_NS_SSL_SERVER, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SMIME_SIGN, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_SMIME_ENCRYPT, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_CRL_SIGN, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($bert, X509_PURPOSE_ANY, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SSL_CLIENT, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SSL_SERVER, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_NS_SSL_SERVER, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_SIGN, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_ENCRYPT, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_CRL_SIGN, array($cpca), $utfl));
+var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_ANY, array($cpca), $utfl));
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+int(-1)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/openssl/tests/openssl_x509_export_basic.phpt b/ext/openssl/tests/openssl_x509_export_basic.phpt
new file mode 100644
index 0000000000..4177bd7798
--- /dev/null
+++ b/ext/openssl/tests/openssl_x509_export_basic.phpt
@@ -0,0 +1,45 @@
+--TEST--
+openssl_x509_export() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+$cert_file = dirname(__FILE__) . "/cert.crt";
+
+$a = file_get_contents($cert_file);
+$b = "file://" . $cert_file;
+$c = "invalid cert";
+$d = openssl_x509_read($a);
+$e = array();
+
+var_dump(openssl_x509_export($a, $output)); // read cert as a binary string
+var_dump(openssl_x509_export($b, $output2)); // read cert from a filename string
+var_dump(openssl_x509_export($c, $output3)); // read an invalid cert, fails
+var_dump(openssl_x509_export($d, $output4)); // read cert from a resource
+var_dump(openssl_x509_export($e, $output5)); // read an array, fails
+
+if (PHP_EOL !== "\n") {
+ $a = str_replace(PHP_EOL, "\n", $a);
+}
+
+var_dump(strcmp($output, $a));
+var_dump(strcmp($output, $output2));
+var_dump(strcmp($output, $output3));
+var_dump(strcmp($output, $output4)); // different
+var_dump(strcmp($output, $output5)); // different
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+
+Warning: openssl_x509_export(): cannot get cert from parameter 1 in %s on line %d
+bool(false)
+bool(true)
+
+Warning: openssl_x509_export(): cannot get cert from parameter 1 in %s on line %d
+bool(false)
+int(0)
+int(0)
+int(%d)
+int(0)
+int(%d)
diff --git a/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt b/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt
new file mode 100644
index 0000000000..68ba93230d
--- /dev/null
+++ b/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt
@@ -0,0 +1,42 @@
+--TEST--
+openssl_x509_export_to_file() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+$outfilename = dirname(__FILE__) . "/openssl_x509_export_to_file__outfilename.tmp";
+$cert_file = dirname(__FILE__) . "/cert.crt";
+
+$a = file_get_contents($cert_file);
+$b = "file://" . $cert_file;
+$c = "invalid cert";
+$d = openssl_x509_read($a);
+$e = array();
+
+var_dump(openssl_x509_export_to_file($a, $outfilename)); // read cert as a binary string
+var_dump(openssl_x509_export_to_file($b, $outfilename)); // read cert from a filename string
+var_dump(openssl_x509_export_to_file($c, $outfilename)); // read an invalid cert, fails
+var_dump(openssl_x509_export_to_file($d, $outfilename)); // read cert from a resource
+var_dump(openssl_x509_export_to_file($e, $outfilename)); // read an array, fails
+echo "---\n";
+var_dump($exists = file_exists($outfilename));
+?>
+--CLEAN--
+<?php
+$outfilename = dirname(__FILE__) . "/openssl_x509_export_to_file__outfilename.tmp";
+if (file_exists($outfilename)) {
+ unlink($outfilename);
+}
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+
+Warning: openssl_x509_export_to_file(): cannot get cert from parameter 1 in %s on line %d
+bool(false)
+bool(true)
+
+Warning: openssl_x509_export_to_file(): cannot get cert from parameter 1 in %s on line %d
+bool(false)
+---
+bool(true)
diff --git a/ext/openssl/tests/openssl_x509_fingerprint.phpt b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt
index 6cd464a894..766b158fab 100644
--- a/ext/openssl/tests/openssl_x509_fingerprint.phpt
+++ b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Testing openssl_x509_fingerprint()
+openssl_x509_fingerprint() tests
--SKIPIF--
<?php
if (!extension_loaded("openssl")) die("skip");
diff --git a/ext/openssl/tests/openssl_x509_free_basic.phpt b/ext/openssl/tests/openssl_x509_free_basic.phpt
new file mode 100644
index 0000000000..d8b586e8b4
--- /dev/null
+++ b/ext/openssl/tests/openssl_x509_free_basic.phpt
@@ -0,0 +1,16 @@
+--TEST--
+openssl_x509_free() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+var_dump($res = openssl_x509_read("file://" . dirname(__FILE__) . "/cert.crt"));
+openssl_x509_free($res);
+var_dump($res);
+openssl_x509_free(false);
+?>
+--EXPECTF--
+resource(%d) of type (OpenSSL X.509)
+resource(%d) of type (Unknown)
+
+Warning: openssl_x509_free() expects parameter 1 to be resource, boolean given in %s on line %d
diff --git a/ext/openssl/tests/openssl_x509_parse_basic.phpt b/ext/openssl/tests/openssl_x509_parse_basic.phpt
index 325b2ee4b9..00e32c3b60 100644
--- a/ext/openssl/tests/openssl_x509_parse_basic.phpt
+++ b/ext/openssl/tests/openssl_x509_parse_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-openssl_x509_parse() basic test
+openssl_x509_parse() tests
--SKIPIF--
<?php if (!extension_loaded("openssl")) print "skip";
if (OPENSSL_VERSION_NUMBER < 0x10000000) die("skip Output requires OpenSSL 1.0");
diff --git a/ext/openssl/tests/openssl_x509_parse_basic_v9.phpt b/ext/openssl/tests/openssl_x509_parse_basic_v9.phpt
deleted file mode 100644
index 89862eff50..0000000000
--- a/ext/openssl/tests/openssl_x509_parse_basic_v9.phpt
+++ /dev/null
@@ -1,276 +0,0 @@
---TEST--
-openssl_x509_parse() basic test for OpenSSL 0.9
---SKIPIF--
-<?php if (!extension_loaded("openssl")) print "skip";
-if (OPENSSL_VERSION_NUMBER > 0x10000000) die("skip Output requires OpenSSL 0.9");
-?>
---FILE--
-<?php
-$cert = "file://" . dirname(__FILE__) . "/cert.crt";
-
-var_dump(openssl_x509_parse($cert));
-var_dump(openssl_x509_parse($cert, false));
-?>
---EXPECTF--
-array(12) {
- ["name"]=>
- string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
- ["subject"]=>
- array(5) {
- ["C"]=>
- string(2) "BR"
- ["ST"]=>
- string(17) "Rio Grande do Sul"
- ["L"]=>
- string(12) "Porto Alegre"
- ["CN"]=>
- string(21) "Henrique do N. Angelo"
- ["emailAddress"]=>
- string(16) "hnangelo@php.net"
- }
- ["hash"]=>
- string(8) "%s"
- ["issuer"]=>
- array(5) {
- ["C"]=>
- string(2) "BR"
- ["ST"]=>
- string(17) "Rio Grande do Sul"
- ["L"]=>
- string(12) "Porto Alegre"
- ["CN"]=>
- string(21) "Henrique do N. Angelo"
- ["emailAddress"]=>
- string(16) "hnangelo@php.net"
- }
- ["version"]=>
- int(2)
- ["serialNumber"]=>
- string(20) "12593567369101004962"
- ["validFrom"]=>
- string(13) "080630102843Z"
- ["validTo"]=>
- string(13) "080730102843Z"
- ["validFrom_time_t"]=>
- int(1214821723)
- ["validTo_time_t"]=>
- int(1217413723)
- ["purposes"]=>
- array(8) {
- [1]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(9) "sslclient"
- }
- [2]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(9) "sslserver"
- }
- [3]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(11) "nssslserver"
- }
- [4]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(9) "smimesign"
- }
- [5]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(12) "smimeencrypt"
- }
- [6]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(7) "crlsign"
- }
- [7]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(3) "any"
- }
- [8]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(10) "ocsphelper"
- }
- }
- ["extensions"]=>
- array(3) {
- ["subjectKeyIdentifier"]=>
- string(59) "DB:7E:40:72:BD:5C:35:85:EC:29:29:81:12:E8:62:68:6A:B7:3F:7D"
- ["authorityKeyIdentifier"]=>
- string(202) "keyid:DB:7E:40:72:BD:5C:35:85:EC:29:29:81:12:E8:62:68:6A:B7:3F:7D
-DirName:/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net
-serial:AE:C5:56:CC:72:37:50:A2
-"
- ["basicConstraints"]=>
- string(7) "CA:TRUE"
- }
-}
-array(12) {
- ["name"]=>
- string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
- ["subject"]=>
- array(5) {
- ["countryName"]=>
- string(2) "BR"
- ["stateOrProvinceName"]=>
- string(17) "Rio Grande do Sul"
- ["localityName"]=>
- string(12) "Porto Alegre"
- ["commonName"]=>
- string(21) "Henrique do N. Angelo"
- ["emailAddress"]=>
- string(16) "hnangelo@php.net"
- }
- ["hash"]=>
- string(8) "%s"
- ["issuer"]=>
- array(5) {
- ["countryName"]=>
- string(2) "BR"
- ["stateOrProvinceName"]=>
- string(17) "Rio Grande do Sul"
- ["localityName"]=>
- string(12) "Porto Alegre"
- ["commonName"]=>
- string(21) "Henrique do N. Angelo"
- ["emailAddress"]=>
- string(16) "hnangelo@php.net"
- }
- ["version"]=>
- int(2)
- ["serialNumber"]=>
- string(20) "12593567369101004962"
- ["validFrom"]=>
- string(13) "080630102843Z"
- ["validTo"]=>
- string(13) "080730102843Z"
- ["validFrom_time_t"]=>
- int(1214821723)
- ["validTo_time_t"]=>
- int(1217413723)
- ["purposes"]=>
- array(8) {
- [1]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(10) "SSL client"
- }
- [2]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(10) "SSL server"
- }
- [3]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(19) "Netscape SSL server"
- }
- [4]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(14) "S/MIME signing"
- }
- [5]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(17) "S/MIME encryption"
- }
- [6]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(11) "CRL signing"
- }
- [7]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(11) "Any Purpose"
- }
- [8]=>
- array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- string(11) "OCSP helper"
- }
- }
- ["extensions"]=>
- array(3) {
- ["subjectKeyIdentifier"]=>
- string(59) "DB:7E:40:72:BD:5C:35:85:EC:29:29:81:12:E8:62:68:6A:B7:3F:7D"
- ["authorityKeyIdentifier"]=>
- string(202) "keyid:DB:7E:40:72:BD:5C:35:85:EC:29:29:81:12:E8:62:68:6A:B7:3F:7D
-DirName:/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net
-serial:AE:C5:56:CC:72:37:50:A2
-"
- ["basicConstraints"]=>
- string(7) "CA:TRUE"
- }
-}
diff --git a/ext/openssl/tests/openssl_x509_read_basic.phpt b/ext/openssl/tests/openssl_x509_read_basic.phpt
new file mode 100644
index 0000000000..5f530534ff
--- /dev/null
+++ b/ext/openssl/tests/openssl_x509_read_basic.phpt
@@ -0,0 +1,37 @@
+--TEST--
+openssl_x509_read() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+$fp = fopen(dirname(__FILE__) . "/cert.crt","r");
+$a = fread($fp,8192);
+fclose($fp);
+
+$b = "file://" . dirname(__FILE__) . "/cert.crt";
+$c = "invalid cert";
+$d = openssl_x509_read($a);
+$e = array();
+$f = array($b);
+
+var_dump(openssl_x509_read($a)); // read cert as a string
+var_dump(openssl_x509_read($b)); // read cert as a filename string
+var_dump(openssl_x509_read($c)); // read an invalid cert, fails
+var_dump(openssl_x509_read($d)); // read cert from a resource
+var_dump(openssl_x509_read($e)); // read an array
+var_dump(openssl_x509_read($f)); // read an array with the filename
+?>
+--EXPECTF--
+resource(%d) of type (OpenSSL X.509)
+resource(%d) of type (OpenSSL X.509)
+
+Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in %s on line %d
+bool(false)
+resource(%d) of type (OpenSSL X.509)
+
+Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in %s on line %d
+bool(false)
+
+Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in %s on line %d
+bool(false)
+
diff --git a/ext/openssl/tests/private.key b/ext/openssl/tests/private_rsa_1024.key
index bce512e050..bce512e050 100644
--- a/ext/openssl/tests/private.key
+++ b/ext/openssl/tests/private_rsa_1024.key
diff --git a/ext/openssl/tests/private_rsa_2048.key b/ext/openssl/tests/private_rsa_2048.key
new file mode 100644
index 0000000000..d83e1b85c9
--- /dev/null
+++ b/ext/openssl/tests/private_rsa_2048.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEArbUmVW1Y+rJzZRC3DYB0kdIgvk7MAday78ybGPPDhVlbAb4C
+jWbaPs4nyUCTEt9KVG0H7pXHxDbWSsC2974zdvqlP0L2op1/M2SteTcGCBOdwGH2
+jORVAZL8/WbTOf9IpKAM77oN14scsyOlQBJqhh+xrLg8ksB2dOos54yDqo0Tq7R5
+tldV+alKZXWlJnqRCfFuxvqtfWI5nGTAedVZhvjQfLQQgujfXHoFWoGbXn2buzfw
+KGJEeqWPbQOZF/FeOJPlgOBhhDb3BAFNVCtM3k71Rblj54pNd3yvq152xsgFd0o3
+s15fuSwZgerUjeEuw/wTK9k7vyp+MrIQHQmPdQIDAQABAoIBABPDKDlP12+uHbLB
+1BGVK63rWg5MqKkM5A6kGIEeOoBRSilIlMHBkdLTYXNkBVeAT9SLEvvxzmhkVLzs
+b+R/nxtKKMKpu6WEhZQzQAkqWWVR1gCtJH+i+ojTUDUEHcPbZ0hTbSVY5XpAOWOo
+CoTfk37u3CfqTfnkK5XhjnpJYjFk60fLeTKKG90xb4WmPGCOxBZGeI9yk+gEgMVx
+4qYBQEgcaJEBXebvM0q8BCDh/rlYxwQ/q0RJ6W1D84SOeyYv/9LesFZSbnUN16tA
+/YezkhYVkVIrQFzh1al7NKvWEUZ3Yx3AEuggKtijlZyO9zOAOigSiFQjtqOl7S6e
+jbVfLYECgYEA51E5TNvN6IW6p58wOXTmINnsW3sDYS1CyPh3TkSvWU2OqMXJxQSA
+bASpXtqicAY32wkBOiazyY/+L7x1ReG/8z3tTm53AsYwkLKrgUfjdrOFhXWk8QI3
+0WS/1hS7qZ4Ycxi5B2X+rPPLnc2+mUvaEX6/B2Fjbqp4nIt+ZAE8SvcCgYEAwD47
+anMk8z68wdgzxY4J10sgCKfgHCe7J8ikpzloznX1HnbZTWf74FLlA/8ctfFJCVAy
+4dG1s0D+JSpxxMSkk4hvi10Ha6t5U+BreD9VPAQRspGSKhn8JfwvLfKPH65uazBP
+yvBtVIdagBf/msLfF33vkrQSjAEJM1njl6XMEfMCgYB1BddqNa0G3Figol0gRC6E
+Iht78FC2YdJun5yj4QWgtSbd5Sn9XRinDPiufwc8izjIu9Z+F8ROzWT3u2zMzLdy
+FDswuZvFsIQzP+CaB8dgbtO2v9yQ/OFGMqUGZfjGh6+w0qoQvx3HW5MAI20wWnpY
+7Xkw/6jw/JcGA2AOsb1R4wKBgQCFfnF54Q1GkEk4/m4tAA4bX4KWICUCyCAxZyXX
+LYl23PhiuDr7gnqockevt8ZzHWMPQY6juyFGoZoZqtinv7lc7YAvsWEGxmMQ+KUI
+Mkp4y4aSjn2GGNc8dVs5t9blNBZe/oRaMwxohzkz+/Y1vJ54TK5BHCRI7is6anAd
+jTchOwKBgQDP9yOdQTfUwJRUMERWmzXWU2oDXeEMdpbGPLGJ4/e/hu1CW7bdQRoc
+jBSEpn3hOodmdwdmoXtbJReMCE8qS6yVHNn4orpJf+uOBr5fVnHwttFfN8HID9js
+Lml8jAAQItMFw1CEPR75NVdFb7ksNKlxE9376tG63JhrTttRGwO3CA==
+-----END RSA PRIVATE KEY-----
diff --git a/ext/openssl/tests/private_rsa_2048_pass_php.key b/ext/openssl/tests/private_rsa_2048_pass_php.key
new file mode 100644
index 0000000000..242b1868c7
--- /dev/null
+++ b/ext/openssl/tests/private_rsa_2048_pass_php.key
@@ -0,0 +1,30 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: AES-128-CBC,D839E12F98A22F4FA90401E31A896A03
+
+gVJ/972mKRrZ2+55rofbFXuLY03Umb7+m7OotGHkYa3dJpNuOLta+LDpSMRdgKcT
+7s+vZ7CERJsWolbdCSphwWs74FV4fJheuzrnEthmVazmIcDwWu1FiiD5XEmRQMFH
+AvwUKTN5PIyN67eCusbrV5/FJsVdxvRwLUM70UE+nhBW8rg6AhszDtSHhGG1KN9T
+TwT2m8xYOgzzPPseQN/VcKNJ+LZcUVN/8+12duy1Ej/HoFaE7wp5GH0mueeShf0R
+xFZ6mizZ3x+Ef4+PbTDnSXRheF9uvSdwmff4rUS4Szpk0aYpSrluJJjzI9Unjvqi
+129ZQsNUfLebJlaauTYYNsHHh64hRXelqKz5mNmcF/OV+pbCjYljgDsyndmrZ5jB
+xjfjp/1VGQAU26VnF0X9zv5q9Gz3/bkl3VFnS7gNyMCanyTuaXNNFNcbkY59Iq1l
+rWjGGMeujWttFhYsChtCb6Clsq4aCiXJ9lqFNTU+eqVD9F5C4v5ATM6VHqjxwvj3
+RB4P98pQsGLkHUKgAZrYqxhLjN6O7FvZuuSRSZl+Q6suYcie+hR4p2TRopRTttc2
+d/gdJCBEbboJH3XOFlHz08mhxgVobi5ACzAoSpCVT4NIahG+Gt7h8Rk6+A9/uiwj
+Jy6+MRiylhAOXAfOps7+FvBFi4nKByFXtWOHRL6DGpYWy20vCk0gsuICRpwL33A4
+e6YAJiuygQSWTExyGfeRk5VQRkZrWL1s3nTnA0MLqx1VdIbDeNPtIZ+dQHCN5vYt
+pP7zFSuF6fse8mSobzA9x4hKXUKWQ/V985arHYzYpJXfIRMyZDqKjRW5xKGYR0eH
+adhpbOCWx73+vVa8tABbvNIPjp/7KPaGPSp7uV9Afvvt5qjM/nho/VstyWscivM0
+c+oylG4cNBaJCVyb6nsiBYK2XE/Llfjsj/l2+SRfIZOwmvhL+CG7z7okPEiNp7EB
+DcefH7/N/Fg4R4PzWskHfb6ZU+nnPKV9JJdBitw/EQFAN8qO7b6O1HRsXUJziBsH
+cgQBDT0wOue49lDFratmWBx1K10paRuAl1DmO5WtstC/cthGYvKVGDWclLbIVRpv
+/DyXZMsXdt9IaP31vHs+W0Yj/1Pcj3iKFX/oh0e7Kb2MQziquQcMzJM2n3BVa2PQ
+dZ3FGKSoDtdT3RhEWGAY5zh7nwPUDqR2frCTGdRAASJbHmC/dn3Fs/m7kQHCUTw8
+EpDCCFZhp23DODk96Q0vtgtPU16qONMzVlzSH8REjS23GrbZ4wn/SW8Qm5QZiScH
+WbJ3Aj5iemcFnL5aDN81BNX9GtUvJFK2jvmmPcv1x5+x51RweMQYErgahI9YVFtM
+0cEN2cm27hZjktHxduJefc+WVu6vCyzSA0q/CbT58eIWBPyvyIM8AB65h4TFxX9N
+4g0/0Kh8gqe3EVg1x62LEAC6AaRZEm/GBeux41DlNDYbCik6VdLRHVozmf7PYm+X
+6miR4EfGE+kM7/V+shMQZni/Q64gzIn+/vpMiNV5JQsr1E2tqUp2/P6N0puUwWv2
+ORVWWk6gy8wnJ//LsDNEhSKfCrffuv2u2oVQWMcBwyqbR6ru/V3i9+9ngWd2D4E0
+-----END RSA PRIVATE KEY-----
diff --git a/ext/openssl/tests/private_rsa_4096.key b/ext/openssl/tests/private_rsa_4096.key
new file mode 100644
index 0000000000..8338c86cbb
--- /dev/null
+++ b/ext/openssl/tests/private_rsa_4096.key
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKAIBAAKCAgEAtlmPieG4yL/HQ1j98U+VqlAzO55+aSHKXOV9q5+uTevtzXVV
+s+rOPUAlPkUi7kcp3Yrum+Y0rNCnTNpSmpFB2f/Y1rHb6Rxn8SXzWSq8BM0BhbCm
+yE+PY3DyIBizX6isb13vJyvU7f8Ayv4xAQ/ve8ytFAnBXUdIhtQNygraxvr8aoZw
+81cBRQ8NhBkk/qDZWVkOiePC9voZ05sENhL4aUZw3Xew2JtZyw+lRxheczkYYc71
+OQuOKoU06j3ZpLhdhtdjpOVC6csIk9qyq8ki8t9m66a2BdiPaz1cWGZGqQg4SDrJ
+0XKG6/wdSWgdUKMp0wB2Kwph2SWwLm7BQEpdtMtXnNGB2dT+lffjtqRvyT4HKO03
+R9b7ZxUVA34Tzi+kX04g3e4qI4eD0bsHYwioUlkKf/q7E1+WjwaQ2LLbOUnWeKqb
+wGBsZYMWeWGTc/FO4oyDJBG9gnsqmSHasAsxsW6ojsGnz9IXywpwInlz+R4pB+ua
+dXHiUZEuT8lCdBUWKAtCIb/F9cNEJg/Vq0iVoWFaOYd5D4PHXV5aXjEx18ez7GvN
+98XPYNXQmVBmsIlOHQpytz0RdrlstksxBqWhaBUT3ZJU6czchNgYeFsEuYKkUNK+
+fwQLhA9aeT6RBdet2efhyaf4y3vQFb5kxx4JcljXjIYVR3yB9iZnD0WGQxkCAwEA
+AQKCAgBHrhkQmFxs/YY04SyhySkKFBCvpPQIG7JSphuqdVCtbMrD8xXHbcu4pBh/
+y+mZRPweDFkTi4C1VigNu9ywydza9wmkC7JohjQNxV9Nc9EJChVJGlHVeADjlCh5
+mXwZZFK0THaQLVi8XXtQUG+u/TaksaZvtA4Avt6xsXXiMDYj9dF3hnWsEk17ehlU
+DhZOyafmyW0/ovqm31V7qvoSz446w+fmBwDLhPXdLr9HnTqzjIQbHqGi1PoDmO1e
+DwYZDCgns0+GKGEPSjKK/HMzuBM26b6pb5Up4yEthKdiUIICPCrzqbhfzudeqHJS
+wsyTQDBWs13AOYqRM5F4Dy2EOjdvCgt2zElO0c3r/pOTplk3/v7VrsqiNN33xGfc
+4zGw3d0xLjQRhA9vhG5Kdtqqs1GqZDf3mNmPxv8gHJDdB6Twkk9iNlUnV5neew6R
+0KKklZvMApE+KMVrRKmez0+ab/ktpoAe9Xox9ChBfLaZQgJlDwNDktjRu8RT1da8
+L6SMy5+mP+aSKxWxgNGoM0BQiv3DBriyTuyhcu+2SIr4c0LrWqedZRI1eRREZjhG
+VLBpftvQH7AMTZuIHXYjtF8XcZneaa2/fI7SNH6RpPc7WJmLCF3ufjv6HVp3qA8B
+ahRCgsr4sBZDJqwMkbNJQfuF/zNOAGmO5VRBodb/P9UQeEVeAQKCAQEA6TkahKZq
+374hUnElMH3mmYPVxOKfqx4EMrS+MP8cjXXmiw7bWjQlufcmbMhxHaXkGiU9+/TB
+VdFPtLZvo7Aa+m2sHCySJ1pG2T4kkmV9cNVExKPllraH3/QvDK3o34aA2DxgOXAT
+33wxlxvmmaMmrjjP6BZduvS/W/vwL6+aA1erZbsBuA1CoeyiyE95zdcD43+TlZWi
+fwCqCZ27wrKHCPFcEN/ecpjKQTQQdogDNWdJJzaTH7y3iWNOsLdTNeLRYrvu94dS
+J9n7cCoLCEFzdylaXx/jGCNrnaNtqDj46JHW6XSQ6e3D0UpV2hx5V2+0q1gbEhWe
+wtBrhGsHj/jj+QKCAQEAyCiOlcE6a1tjIdMihAO1hqdUiFcIKzoiDQKNBEaY9ELz
+oWkuZj2fUnhjeAKhkQ4ZheH6+fk2Tt0+kU1Jl+Iym/ciE/m/N8RUyqq2FOnmwktz
+yGqD9fQeLix2b2txp+0dyi1niQ+S8ZKAJBbxKTb3CBefowrkz5JK7+jWqaUDNQ5h
+8KoGCcAB8kSkXGgqVOapXyGb31YdyM3X1mJGv95jO4A+OmFI2faPAOtZrg9EicSI
+7U84bfFMhfhrpxZuU7Bbyz6Kg9hleAv0q/3tBFSJvMTOiuM7OFtlUAByL+pWwZ9Y
+haQ4ojojsPaQ6pMmf0JNXwnp8Rhz2+QNDyFzRm/gIQKCAQEA3dmA/S/kuAL/ZZHV
+g4QvyFYdEdVVdwvtiGJgDPGPsoy1ig/O3sZ+IKEWPyKIX2B/U9ObW8Hd6wlZXZix
+J68Maq3Kq15GhQKeJGa1mUDLi3qDmN4jNjNZmtKHsvL3czFZ/Nep3NldPhjAf3J9
+8CW/VLkcJDSqYn4QTaqhNms/APDzTKkQIIkUmj0kN5FKV2CyBUVFGWSml1MFbHJL
+ug/i3cHiBvc9fhsTQeUJyAbnrnQapR+H4ge9OwZpQzaQA9FHxjjpPzLNFrWHNZH4
+vpisAm0m1xfZCQwggWqFlCDlvS2FlrtYYf3XaI3ijsDJOEA9R0RfM9u3Eq/5ppO9
+NNnX2QKCAQAJ63ilk14B1BWlp4EeadClS8W0vBt7iPYHDwlOHPGXqXnJlhzmlEdB
+HxZO7FJ1je1V5U069k7quaxQJzRugpdfg2/87XO8n85T/QHpJ254UqT6Wc0Qc3jL
+cQitnPWVDPtc+cMX193AezI+l6R8Fm1HyWPwAKo2X1m3aiK5ZaQzDPNtqf+CnDF8
+gEplCgSPEJ90R4YiG3J+cTUxOs2m1K62VDTBT/D8XGvZ79ASAE+1RDhFCpgRWtQg
+D5/GOCZfn23tNLxIrIDa4jzOCVelz0rEQDy8RWa59E2hGWSPW13RWsRYWzszTw5V
+xuKHvaM6y15qR2OAv2V+kF7VUSMVapYBAoIBAEyZDn9H+IMQBkRyZgxPLsE5cgd3
+DeR2Txn2RxQBpop9+lgniuq/NVHiUIRscynsJ01/bFifmFNkgD2cRORy7SU+wsNr
+zsWlLPO1e/axdfMsT0OIBOQ84jZ6FDGi5JnqnC8zVVPU7g2iNoDEtA7ltlXknUUX
+uigFoR1CXoNz8KdW+18MtYDjBLR1crfGa+zqPOpxfjoXBhehtCKG9ZxtrBSWq6mz
+lR9N5Tv9USiJW1r6+85aLsC5E9ARjAxMLhTKvD+NXbQDwZJgfM/vs1eZ6eIYMYE9
+lB7kMFfHKqsagNXdyhRFzfEfx+FkKTHaqC6V5rOp6q0t8AO41ZvZO/tKdi8=
+-----END RSA PRIVATE KEY-----
diff --git a/ext/openssl/tests/sni_001.phpt b/ext/openssl/tests/sni_001.phpt
deleted file mode 100644
index e7dbf3f19e..0000000000
--- a/ext/openssl/tests/sni_001.phpt
+++ /dev/null
@@ -1,184 +0,0 @@
---TEST--
-SNI 001
---SKIPIF--
-<?php
- if (!extension_loaded('openssl')) die("skip openssl extension not available");
- if (!getenv('SNI_TESTS')) die("skip Set SNI_TESTS to enable this test (uses remote resources)");
-?>
---FILE--
-<?php
-/* Server Name Indication (SNI) tests
- *
- * This test relies on https://sni.velox.ch/ and thus is disabled by default.
- *
- * sni.velox.ch uses 3 certificates :
- * - CN=alice.sni.velox.ch (sent in response to server_name = alice.sni.velox.ch or not set)
- * - CN=bob.sni.velox.ch (sent in response to server_name = bob.sni.velox.ch)
- * - CN=*.sni.velox.ch (sent in response to server_name = mallory.sni.velox.ch or *.sni.velox.ch or sni.velox.ch)
- *
- * The test sends requests to the server, sending different names, and checks which certificate
- * the server returned.
- */
-
-function context($host = NULL) {
-
- $ctx = stream_context_create();
- stream_context_set_option($ctx, 'ssl', 'capture_peer_cert', true);
- stream_context_set_option($ctx, 'ssl', 'verify_peer', false);
- if ($host) {
- stream_context_set_option($ctx, 'ssl', 'peer_name', $host);
- } else {
- stream_context_set_option($ctx, 'ssl', 'verify_peer_name', false);
- }
-
- return $ctx;
-}
-
-function get_CN($context) {
-
- $ary = stream_context_get_options($context);
- assert($ary);
-
- $cert = $ary['ssl']['peer_certificate'];
- assert($cert);
-
- $cert_ary = openssl_x509_parse($cert);
- return $cert_ary['subject']['CN'];
-}
-
-function do_http_test($url, $context) {
-
- $fh = fopen($url, 'r', false, $context);
- assert($fh);
-
- var_dump(get_CN($context));
-}
-
-function do_ssl_test($url, $context) {
-
- $fh = stream_socket_client($url, $errno, $errstr,
- ini_get("default_socket_timeout"), STREAM_CLIENT_CONNECT, $context);
- assert($fh);
-
- var_dump(get_CN($context));
-}
-
-function do_enable_crypto_test($url, $context) {
-
- $fh = stream_socket_client($url, $errno, $errstr,
- ini_get("default_socket_timeout"), STREAM_CLIENT_CONNECT, $context);
- assert($fh);
-
- $r = stream_socket_enable_crypto($fh, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
- assert($r);
-
- var_dump(get_CN($context));
-}
-
-/* Test https:// streams */
-
-echo "-- auto host name (1) --\n";
-do_http_test('https://alice.sni.velox.ch/', context('alice.sni.velox.ch'));
-
-echo "-- auto host name (2) --\n";
-do_http_test('https://bob.sni.velox.ch/', context('bob.sni.velox.ch'));
-
-echo "-- auto host name (3) --\n";
-do_http_test('https://bob.sni.velox.ch./', context('bob.sni.velox.ch'));
-
-echo "-- user supplied server name --\n";
-
-$context = context();
-stream_context_set_option($context, 'ssl', 'peer_name', 'bob.sni.velox.ch');
-stream_context_set_option($context, 'http', 'header', b'Host: bob.sni.velox.ch');
-do_http_test('https://alice.sni.velox.ch/', $context);
-
-echo "-- sni disabled --\n";
-
-$context = context();
-stream_context_set_option($context, 'ssl', 'SNI_enabled', false);
-do_http_test('https://bob.sni.velox.ch/', $context);
-
-/* Test ssl:// socket streams */
-
-echo "-- raw SSL stream (1) --\n";
-do_ssl_test('ssl://bob.sni.velox.ch:443', context('bob.sni.velox.ch'));
-
-echo "-- raw SSL stream (2) --\n";
-do_ssl_test('ssl://mallory.sni.velox.ch:443', context('mallory.sni.velox.ch'));
-
-echo "-- raw SSL stream with user supplied sni --\n";
-
-$context = context('bob.sni.velox.ch');
-stream_context_set_option($context, 'ssl', 'peer_name', 'bob.sni.velox.ch');
-
-do_ssl_test('ssl://mallory.sni.velox.ch:443', $context);
-
-echo "-- raw SSL stream with sni disabled --\n";
-
-$context = context();
-stream_context_set_option($context, 'ssl', 'SNI_enabled', false);
-
-do_ssl_test('ssl://mallory.sni.velox.ch:443', $context);
-
-/* Test tcp:// socket streams with SSL enabled */
-
-echo "-- stream_socket_enable_crypto (1) --\n";
-
-do_enable_crypto_test('tcp://bob.sni.velox.ch:443', context());
-
-echo "-- stream_socket_enable_crypto (2) --\n";
-
-do_enable_crypto_test('tcp://mallory.sni.velox.ch:443', context());
-
-echo "-- stream_socket_enable_crypto with user supplied sni --\n";
-
-$context = context();
-stream_context_set_option($context, 'ssl', 'peer_name', 'bob.sni.velox.ch');
-
-do_enable_crypto_test('tcp://mallory.sni.velox.ch:443', $context);
-
-echo "-- stream_socket_enable_crypto with sni disabled --\n";
-
-$context = context();
-stream_context_set_option($context, 'ssl', 'SNI_enabled', false);
-
-do_enable_crypto_test('tcp://mallory.sni.velox.ch:443', $context);
-
-echo "-- stream_socket_enable_crypto with long name --\n";
-
-$context = context();
-stream_context_set_option($context, 'ssl', 'peer_name', str_repeat('a.', 500) . '.sni.velox.ch');
-
-do_enable_crypto_test('tcp://mallory.sni.velox.ch:443', $context);
-
-?>
---EXPECTF--
--- auto host name (1) --
-%unicode|string%(18) "alice.sni.velox.ch"
--- auto host name (2) --
-%unicode|string%(16) "bob.sni.velox.ch"
--- auto host name (3) --
-%unicode|string%(16) "bob.sni.velox.ch"
--- user supplied server name --
-%unicode|string%(16) "bob.sni.velox.ch"
--- sni disabled --
-%unicode|string%(18) "alice.sni.velox.ch"
--- raw SSL stream (1) --
-%unicode|string%(16) "bob.sni.velox.ch"
--- raw SSL stream (2) --
-%unicode|string%(14) "*.sni.velox.ch"
--- raw SSL stream with user supplied sni --
-%unicode|string%(16) "bob.sni.velox.ch"
--- raw SSL stream with sni disabled --
-%unicode|string%(18) "alice.sni.velox.ch"
--- stream_socket_enable_crypto (1) --
-%unicode|string%(16) "bob.sni.velox.ch"
--- stream_socket_enable_crypto (2) --
-%unicode|string%(14) "*.sni.velox.ch"
--- stream_socket_enable_crypto with user supplied sni --
-%unicode|string%(16) "bob.sni.velox.ch"
--- stream_socket_enable_crypto with sni disabled --
-%unicode|string%(18) "alice.sni.velox.ch"
--- stream_socket_enable_crypto with long name --
-%unicode|string%(18) "alice.sni.velox.ch"
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 41d6a0a8d1..6f542323d2 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1728,6 +1728,7 @@ static int capture_peer_certs(php_stream *stream, php_openssl_netstream_data_t *
) {
ZVAL_RES(&zcert, zend_register_resource(peer_cert, php_openssl_get_x509_list_id()));
php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "peer_certificate", &zcert);
+ zval_ptr_dtor(&zcert);
cert_captured = 1;
}
@@ -1755,7 +1756,7 @@ static int capture_peer_certs(php_stream *stream, php_openssl_netstream_data_t *
}
php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "peer_certificate_chain", &arr);
- zval_dtor(&arr);
+ zval_ptr_dtor(&arr);
}
return cert_captured;
@@ -1874,7 +1875,7 @@ static int php_openssl_enable_crypto(php_stream *stream,
zval meta_arr;
ZVAL_ARR(&meta_arr, capture_session_meta(sslsock->ssl_handle));
php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "session_meta", &meta_arr);
- zval_dtor(&meta_arr);
+ zval_ptr_dtor(&meta_arr);
}
}
}
@@ -1946,7 +1947,7 @@ static size_t php_openssl_sockop_io(int read, php_stream *stream, char *buf, siz
timeout = &sslsock->s.timeout;
}
- if (timeout && php_set_sock_blocking(sslsock->s.socket, 0 TSRMLS_CC) == SUCCESS) {
+ if (timeout && php_set_sock_blocking(sslsock->s.socket, 0) == SUCCESS) {
sslsock->s.is_blocked = 0;
}
@@ -2198,39 +2199,39 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_
php_stream_xport_param *xparam STREAMS_DC)
{
int clisock;
-
+ zend_bool nodelay = 0;
+ zval *tmpzval = NULL;
+
xparam->outputs.client = NULL;
+ if ((tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "tcp_nodelay")) != NULL &&
+ zend_is_true(tmpzval)) {
+ nodelay = 1;
+ }
+
clisock = php_network_accept_incoming(sock->s.socket,
- xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
- xparam->want_addr ? &xparam->outputs.addr : NULL,
- xparam->want_addr ? &xparam->outputs.addrlen : NULL,
- xparam->inputs.timeout,
- xparam->want_errortext ? &xparam->outputs.error_text : NULL,
- &xparam->outputs.error_code
- );
+ xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
+ xparam->want_addr ? &xparam->outputs.addr : NULL,
+ xparam->want_addr ? &xparam->outputs.addrlen : NULL,
+ xparam->inputs.timeout,
+ xparam->want_errortext ? &xparam->outputs.error_text : NULL,
+ &xparam->outputs.error_code,
+ nodelay);
if (clisock >= 0) {
- php_openssl_netstream_data_t *clisockdata;
+ php_openssl_netstream_data_t *clisockdata = (php_openssl_netstream_data_t*) emalloc(sizeof(*clisockdata));
- clisockdata = emalloc(sizeof(*clisockdata));
+ /* copy underlying tcp fields */
+ memset(clisockdata, 0, sizeof(*clisockdata));
+ memcpy(clisockdata, sock, sizeof(clisockdata->s));
- if (clisockdata == NULL) {
- closesocket(clisock);
- /* technically a fatal error */
- } else {
- /* copy underlying tcp fields */
- memset(clisockdata, 0, sizeof(*clisockdata));
- memcpy(clisockdata, sock, sizeof(clisockdata->s));
-
- clisockdata->s.socket = clisock;
+ clisockdata->s.socket = clisock;
- xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
- if (xparam->outputs.client) {
- xparam->outputs.client->ctx = stream->ctx;
- if (stream->ctx) {
- GC_REFCOUNT(stream->ctx)++;
- }
+ xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
+ if (xparam->outputs.client) {
+ xparam->outputs.client->ctx = stream->ctx;
+ if (stream->ctx) {
+ GC_REFCOUNT(stream->ctx)++;
}
}
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 6661c2a715..ef3c7fbe3d 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -513,7 +513,7 @@ PHP_MINIT_FUNCTION(pcntl)
{
php_register_signal_constants(INIT_FUNC_ARGS_PASSTHRU);
php_pcntl_register_errno_constants(INIT_FUNC_ARGS_PASSTHRU);
- php_add_tick_function(pcntl_signal_dispatch);
+ php_add_tick_function(pcntl_signal_dispatch, NULL);
return SUCCESS;
}
@@ -624,12 +624,11 @@ PHP_FUNCTION(pcntl_waitpid)
struct rusage rusage;
#endif
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz/|lz/", &pid, &z_status, &options, &z_rusage) == FAILURE)
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz/|lz/", &pid, &z_status, &options, &z_rusage) == FAILURE) {
return;
+ }
- convert_to_long_ex(z_status);
-
- status = Z_LVAL_P(z_status);
+ status = zval_get_long(z_status);
#ifdef HAVE_WAIT4
if (z_rusage) {
@@ -659,7 +658,8 @@ PHP_FUNCTION(pcntl_waitpid)
}
#endif
- Z_LVAL_P(z_status) = status;
+ zval_dtor(z_status);
+ ZVAL_LONG(z_status, status);
RETURN_LONG((zend_long) child_id);
}
@@ -677,12 +677,11 @@ PHP_FUNCTION(pcntl_wait)
struct rusage rusage;
#endif
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z/|lz/", &z_status, &options, &z_rusage) == FAILURE)
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z/|lz/", &z_status, &options, &z_rusage) == FAILURE) {
return;
+ }
- convert_to_long_ex(z_status);
-
- status = Z_LVAL_P(z_status);
+ status = zval_get_long(z_status);
#ifdef HAVE_WAIT3
if (z_rusage) {
if (Z_TYPE_P(z_rusage) != IS_ARRAY) {
@@ -711,7 +710,9 @@ PHP_FUNCTION(pcntl_wait)
PHP_RUSAGE_TO_ARRAY(rusage, z_rusage);
}
#endif
- Z_LVAL_P(z_status) = status;
+
+ zval_dtor(z_status);
+ ZVAL_LONG(z_status, status);
RETURN_LONG((zend_long) child_id);
}
@@ -871,7 +872,7 @@ PHP_FUNCTION(pcntl_exec)
if (ZEND_NUM_ARGS() > 1) {
/* Build argument list */
- args_hash = HASH_OF(args);
+ args_hash = Z_ARRVAL_P(args);
argc = zend_hash_num_elements(args_hash);
argv = safe_emalloc((argc + 2), sizeof(char *), 0);
@@ -893,7 +894,7 @@ PHP_FUNCTION(pcntl_exec)
if ( ZEND_NUM_ARGS() == 3 ) {
/* Build environment pair list */
- envs_hash = HASH_OF(envs);
+ envs_hash = Z_ARRVAL_P(envs);
envc = zend_hash_num_elements(envs_hash);
pair = envp = safe_emalloc((envc + 1), sizeof(char *), 0);
@@ -1040,11 +1041,7 @@ PHP_FUNCTION(pcntl_sigprocmask)
}
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(user_set), user_signo) {
- if (Z_TYPE_P(user_signo) != IS_LONG) {
- SEPARATE_ZVAL(user_signo);
- convert_to_long_ex(user_signo);
- }
- signo = Z_LVAL_P(user_signo);
+ signo = zval_get_long(user_signo);
if (sigaddset(&set, signo) != 0) {
PCNTL_G(last_error) = errno;
php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
@@ -1105,11 +1102,7 @@ static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{
}
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(user_set), user_signo) {
- if (Z_TYPE_P(user_signo) != IS_LONG) {
- SEPARATE_ZVAL(user_signo);
- convert_to_long_ex(user_signo);
- }
- signo = Z_LVAL_P(user_signo);
+ signo = zval_get_long(user_signo);
if (sigaddset(&set, signo) != 0) {
PCNTL_G(last_error) = errno;
php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h
index 68f2983a24..20e7b2964a 100644
--- a/ext/pcntl/php_pcntl.h
+++ b/ext/pcntl/php_pcntl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,9 @@
#ifndef PHP_PCNTL_H
#define PHP_PCNTL_H
-#define HAVE_WCONTINUED defined(WCONTINUED) && defined (WIFCONTINUED)
+#if defined(WCONTINUED) && defined(WIFCONTINUED)
+#define HAVE_WCONTINUED 1
+#endif
extern zend_module_entry pcntl_module_entry;
#define phpext_pcntl_ptr &pcntl_module_entry
diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c
index ca091e0b78..7aa5d5a7c1 100644
--- a/ext/pcntl/php_signal.c
+++ b/ext/pcntl/php_signal.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pcntl/php_signal.h b/ext/pcntl/php_signal.h
index ad34e2d991..1ad90700e2 100644
--- a/ext/pcntl/php_signal.h
+++ b/ext/pcntl/php_signal.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pcntl/tests/bug72154.phpt b/ext/pcntl/tests/bug72154.phpt
new file mode 100644
index 0000000000..6bbbd4c5f0
--- /dev/null
+++ b/ext/pcntl/tests/bug72154.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #72154 (pcntl_wait/pcntl_waitpid array internal structure overwrite)
+--SKIPIF--
+<?php if (!extension_loaded("pcntl")) print "skip"; ?>
+--FILE--
+<?php
+$b = 666;
+var_dump($b);
+$c = &$b;
+$var5 = pcntl_wait($b,0,$c);
+unset($b);
+
+$b = 666;
+var_dump($b);
+$c = &$b;
+$var5 = pcntl_waitpid(0,$b,0,$c);
+unset($b);
+?>
+--EXPECT--
+int(666)
+int(666)
diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog
index 359b412958..5e5bf188ce 100644
--- a/ext/pcre/pcrelib/ChangeLog
+++ b/ext/pcre/pcrelib/ChangeLog
@@ -1,6 +1,182 @@
ChangeLog for PCRE
------------------
+Note that the PCRE 8.xx series (PCRE1) is now in a bugfix-only state. All
+development is happening in the PCRE2 10.xx series.
+
+Version 8.38 23-November-2015
+-----------------------------
+
+1. If a group that contained a recursive back reference also contained a
+ forward reference subroutine call followed by a non-forward-reference
+ subroutine call, for example /.((?2)(?R)\1)()/, pcre2_compile() failed to
+ compile correct code, leading to undefined behaviour or an internally
+ detected error. This bug was discovered by the LLVM fuzzer.
+
+2. Quantification of certain items (e.g. atomic back references) could cause
+ incorrect code to be compiled when recursive forward references were
+ involved. For example, in this pattern: /(?1)()((((((\1++))\x85)+)|))/.
+ This bug was discovered by the LLVM fuzzer.
+
+3. A repeated conditional group whose condition was a reference by name caused
+ a buffer overflow if there was more than one group with the given name.
+ This bug was discovered by the LLVM fuzzer.
+
+4. A recursive back reference by name within a group that had the same name as
+ another group caused a buffer overflow. For example:
+ /(?J)(?'d'(?'d'\g{d}))/. This bug was discovered by the LLVM fuzzer.
+
+5. A forward reference by name to a group whose number is the same as the
+ current group, for example in this pattern: /(?|(\k'Pm')|(?'Pm'))/, caused
+ a buffer overflow at compile time. This bug was discovered by the LLVM
+ fuzzer.
+
+6. A lookbehind assertion within a set of mutually recursive subpatterns could
+ provoke a buffer overflow. This bug was discovered by the LLVM fuzzer.
+
+7. Another buffer overflow bug involved duplicate named groups with a
+ reference between their definition, with a group that reset capture
+ numbers, for example: /(?J:(?|(?'R')(\k'R')|((?'R'))))/. This has been
+ fixed by always allowing for more memory, even if not needed. (A proper fix
+ is implemented in PCRE2, but it involves more refactoring.)
+
+8. There was no check for integer overflow in subroutine calls such as (?123).
+
+9. The table entry for \l in EBCDIC environments was incorrect, leading to its
+ being treated as a literal 'l' instead of causing an error.
+
+10. There was a buffer overflow if pcre_exec() was called with an ovector of
+ size 1. This bug was found by american fuzzy lop.
+
+11. If a non-capturing group containing a conditional group that could match
+ an empty string was repeated, it was not identified as matching an empty
+ string itself. For example: /^(?:(?(1)x|)+)+$()/.
+
+12. In an EBCDIC environment, pcretest was mishandling the escape sequences
+ \a and \e in test subject lines.
+
+13. In an EBCDIC environment, \a in a pattern was converted to the ASCII
+ instead of the EBCDIC value.
+
+14. The handling of \c in an EBCDIC environment has been revised so that it is
+ now compatible with the specification in Perl's perlebcdic page.
+
+15. The EBCDIC character 0x41 is a non-breaking space, equivalent to 0xa0 in
+ ASCII/Unicode. This has now been added to the list of characters that are
+ recognized as white space in EBCDIC.
+
+16. When PCRE was compiled without UCP support, the use of \p and \P gave an
+ error (correctly) when used outside a class, but did not give an error
+ within a class.
+
+17. \h within a class was incorrectly compiled in EBCDIC environments.
+
+18. A pattern with an unmatched closing parenthesis that contained a backward
+ assertion which itself contained a forward reference caused buffer
+ overflow. And example pattern is: /(?=di(?<=(?1))|(?=(.))))/.
+
+19. JIT should return with error when the compiled pattern requires more stack
+ space than the maximum.
+
+20. A possessively repeated conditional group that could match an empty string,
+ for example, /(?(R))*+/, was incorrectly compiled.
+
+21. Fix infinite recursion in the JIT compiler when certain patterns such as
+ /(?:|a|){100}x/ are analysed.
+
+22. Some patterns with character classes involving [: and \\ were incorrectly
+ compiled and could cause reading from uninitialized memory or an incorrect
+ error diagnosis.
+
+23. Pathological patterns containing many nested occurrences of [: caused
+ pcre_compile() to run for a very long time.
+
+24. A conditional group with only one branch has an implicit empty alternative
+ branch and must therefore be treated as potentially matching an empty
+ string.
+
+25. If (?R was followed by - or + incorrect behaviour happened instead of a
+ diagnostic.
+
+26. Arrange to give up on finding the minimum matching length for overly
+ complex patterns.
+
+27. Similar to (4) above: in a pattern with duplicated named groups and an
+ occurrence of (?| it is possible for an apparently non-recursive back
+ reference to become recursive if a later named group with the relevant
+ number is encountered. This could lead to a buffer overflow. Wen Guanxing
+ from Venustech ADLAB discovered this bug.
+
+28. If pcregrep was given the -q option with -c or -l, or when handling a
+ binary file, it incorrectly wrote output to stdout.
+
+29. The JIT compiler did not restore the control verb head in case of *THEN
+ control verbs. This issue was found by Karl Skomski with a custom LLVM
+ fuzzer.
+
+30. Error messages for syntax errors following \g and \k were giving inaccurate
+ offsets in the pattern.
+
+31. Added a check for integer overflow in conditions (?(<digits>) and
+ (?(R<digits>). This omission was discovered by Karl Skomski with the LLVM
+ fuzzer.
+
+32. Handling recursive references such as (?2) when the reference is to a group
+ later in the pattern uses code that is very hacked about and error-prone.
+ It has been re-written for PCRE2. Here in PCRE1, a check has been added to
+ give an internal error if it is obvious that compiling has gone wrong.
+
+33. The JIT compiler should not check repeats after a {0,1} repeat byte code.
+ This issue was found by Karl Skomski with a custom LLVM fuzzer.
+
+34. The JIT compiler should restore the control chain for empty possessive
+ repeats. This issue was found by Karl Skomski with a custom LLVM fuzzer.
+
+35. Match limit check added to JIT recursion. This issue was found by Karl
+ Skomski with a custom LLVM fuzzer.
+
+36. Yet another case similar to 27 above has been circumvented by an
+ unconditional allocation of extra memory. This issue is fixed "properly" in
+ PCRE2 by refactoring the way references are handled. Wen Guanxing
+ from Venustech ADLAB discovered this bug.
+
+37. Fix two assertion fails in JIT. These issues were found by Karl Skomski
+ with a custom LLVM fuzzer.
+
+38. Fixed a corner case of range optimization in JIT.
+
+39. An incorrect error "overran compiling workspace" was given if there were
+ exactly enough group forward references such that the last one extended
+ into the workspace safety margin. The next one would have expanded the
+ workspace. The test for overflow was not including the safety margin.
+
+40. A match limit issue is fixed in JIT which was found by Karl Skomski
+ with a custom LLVM fuzzer.
+
+41. Remove the use of /dev/null in testdata/testinput2, because it doesn't
+ work under Windows. (Why has it taken so long for anyone to notice?)
+
+42. In a character class such as [\W\p{Any}] where both a negative-type escape
+ ("not a word character") and a property escape were present, the property
+ escape was being ignored.
+
+43. Fix crash caused by very long (*MARK) or (*THEN) names.
+
+44. A sequence such as [[:punct:]b] that is, a POSIX character class followed
+ by a single ASCII character in a class item, was incorrectly compiled in
+ UCP mode. The POSIX class got lost, but only if the single character
+ followed it.
+
+45. [:punct:] in UCP mode was matching some characters in the range 128-255
+ that should not have been matched.
+
+46. If [:^ascii:] or [:^xdigit:] or [:^cntrl:] are present in a non-negated
+ class, all characters with code points greater than 255 are in the class.
+ When a Unicode property was also in the class (if PCRE_UCP is set, escapes
+ such as \w are turned into Unicode properties), wide characters were not
+ correctly handled, and could fail to match.
+
+
Version 8.37 28-April-2015
--------------------------
diff --git a/ext/pcre/pcrelib/NEWS b/ext/pcre/pcrelib/NEWS
index 064bf27819..7e42dcb360 100644
--- a/ext/pcre/pcrelib/NEWS
+++ b/ext/pcre/pcrelib/NEWS
@@ -1,6 +1,14 @@
News about PCRE releases
------------------------
+Release 8.38 23-November-2015
+-----------------------------
+
+This is bug-fix release. Note that this library (now called PCRE1) is now being
+maintained for bug fixes only. New projects are advised to use the new PCRE2
+libraries.
+
+
Release 8.37 28-April-2015
--------------------------
diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h
index 9714cf5bbd..0f7a9f73ff 100644
--- a/ext/pcre/pcrelib/config.h
+++ b/ext/pcre/pcrelib/config.h
@@ -24,41 +24,37 @@
#endif
+/* Exclude these below definitions when building within PHP */
+#ifndef ZEND_API
+
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
+
/* PCRE is written in Standard C, but there are a few non-standard things it
can cope with, allowing it to run on SunOS4 and other "close to standard"
systems.
-In environments that support the GNU autotools, config.h.in is converted into
-config.h by the "configure" script. In environments that use CMake,
-config-cmake.in is converted into config.h. If you are going to build PCRE "by
-hand" without using "configure" or CMake, you should copy the distributed
-config.h.generic to config.h, and edit the macro definitions to be the way you
-need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
-so that config.h is included at the start of every source.
+In environments that support the facilities, config.h.in is converted by
+"configure", or config-cmake.h.in is converted by CMake, into config.h. If you
+are going to build PCRE "by hand" without using "configure" or CMake, you
+should copy the distributed config.h.generic to config.h, and then edit the
+macro definitions to be the way you need them. You must then add
+-DHAVE_CONFIG_H to all of your compile commands, so that config.h is included
+at the start of every source.
Alternatively, you can avoid editing by using -D on the compiler command line
-to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
-but if you do, default values will be taken from config.h for non-boolean
-macros that are not defined on the command line.
-
-Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE8 should either be defined
-(conventionally to 1) for TRUE, and not defined at all for FALSE. All such
-macros are listed as a commented #undef in config.h.generic. Macros such as
-MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
-surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
+to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
-PCRE uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
-HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
-sure both macros are undefined; an emulation function will then be used. */
+PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
+HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
+them both to 0; an emulation function will be used. */
/* By default, the \R escape sequence matches any Unicode line ending
character or sequence of characters. If BSR_ANYCRLF is defined (to any
value), this is changed so that backslash-R matches only CR, LF, or CRLF.
The build-time default can be overridden by the user of PCRE at runtime. */
-/* #undef BSR_ANYCRLF */
+#undef BSR_ANYCRLF
/* If you are compiling for a system that uses EBCDIC instead of ASCII
character codes, define this macro to any value. You must also edit the
@@ -68,80 +64,113 @@ sure both macros are undefined; an emulation function will then be used. */
strings are in EBCDIC. If you do not define this macro, PCRE will assume
input strings are ASCII or UTF-8/16/32 Unicode. It is not possible to build
a version of PCRE that supports both EBCDIC and UTF-8/16/32. */
-/* #undef EBCDIC */
+#undef EBCDIC
/* In an EBCDIC environment, define this macro to any value to arrange for the
NL character to be 0x25 instead of the default 0x15. NL plays the role that
LF does in an ASCII/Unicode environment. The value must also be set in the
NEWLINE macro below. On systems that can use "configure" or CMake to set
EBCDIC_NL25, the adjustment of NEWLINE is automatic. */
-/* #undef EBCDIC_NL25 */
+#undef EBCDIC_NL25
/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
+#ifndef HAVE_BCOPY
+#define HAVE_BCOPY 1
+#endif
/* Define to 1 if you have the <bits/type_traits.h> header file. */
/* #undef HAVE_BITS_TYPE_TRAITS_H */
/* Define to 1 if you have the <bzlib.h> header file. */
-/* #undef HAVE_BZLIB_H */
+#ifndef HAVE_BZLIB_H
+#define HAVE_BZLIB_H 1
+#endif
/* Define to 1 if you have the <dirent.h> header file. */
-/* #undef HAVE_DIRENT_H */
+#ifndef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
+#endif
/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
+#ifndef HAVE_DLFCN_H
+#define HAVE_DLFCN_H 1
+#endif
/* Define to 1 if you have the <editline/readline.h> header file. */
-/* #undef HAVE_EDITLINE_READLINE_H */
+/*#undef HAVE_EDITLINE_READLINE_H*/
/* Define to 1 if you have the <edit/readline/readline.h> header file. */
/* #undef HAVE_EDIT_READLINE_READLINE_H */
/* Define to 1 if you have the <inttypes.h> header file. */
-/* #undef HAVE_INTTYPES_H */
+#ifndef HAVE_INTTYPES_H
+#define HAVE_INTTYPES_H 1
+#endif
/* Define to 1 if you have the <limits.h> header file. */
-/* #undef HAVE_LIMITS_H */
+#ifndef HAVE_LIMITS_H
+#define HAVE_LIMITS_H 1
+#endif
/* Define to 1 if the system has the type `long long'. */
-/* #undef HAVE_LONG_LONG */
+#ifndef HAVE_LONG_LONG
+#define HAVE_LONG_LONG 1
+#endif
/* Define to 1 if you have the `memmove' function. */
-/* #undef HAVE_MEMMOVE */
+#ifndef HAVE_MEMMOVE
+#define HAVE_MEMMOVE 1
+#endif
/* Define to 1 if you have the <memory.h> header file. */
-/* #undef HAVE_MEMORY_H */
+#ifndef HAVE_MEMORY_H
+#define HAVE_MEMORY_H 1
+#endif
/* Define if you have POSIX threads libraries and header files. */
-/* #undef HAVE_PTHREAD */
+#undef HAVE_PTHREAD
/* Have PTHREAD_PRIO_INHERIT. */
-/* #undef HAVE_PTHREAD_PRIO_INHERIT */
-
+#undef HAVE_PTHREAD_PRIO_INHERIT
/* Define to 1 if you have the <readline/history.h> header file. */
-/* #undef HAVE_READLINE_HISTORY_H */
+#ifndef HAVE_READLINE_HISTORY_H
+#define HAVE_READLINE_HISTORY_H 1
+#endif
/* Define to 1 if you have the <readline/readline.h> header file. */
-/* #undef HAVE_READLINE_READLINE_H */
+#ifndef HAVE_READLINE_READLINE_H
+#define HAVE_READLINE_READLINE_H 1
+#endif
/* Define to 1 if you have the <stdint.h> header file. */
-/* #undef HAVE_STDINT_H */
+#ifndef HAVE_STDINT_H
+#define HAVE_STDINT_H 1
+#endif
/* Define to 1 if you have the <stdlib.h> header file. */
-/* #undef HAVE_STDLIB_H */
+#ifndef HAVE_STDLIB_H
+#define HAVE_STDLIB_H 1
+#endif
/* Define to 1 if you have the `strerror' function. */
-/* #undef HAVE_STRERROR */
+#ifndef HAVE_STRERROR
+#define HAVE_STRERROR 1
+#endif
/* Define to 1 if you have the <string> header file. */
-/* #undef HAVE_STRING */
+#ifndef HAVE_STRING
+#define HAVE_STRING 1
+#endif
/* Define to 1 if you have the <strings.h> header file. */
-/* #undef HAVE_STRINGS_H */
+#ifndef HAVE_STRINGS_H
+#define HAVE_STRINGS_H 1
+#endif
/* Define to 1 if you have the <string.h> header file. */
-/* #undef HAVE_STRING_H */
+#ifndef HAVE_STRING_H
+#define HAVE_STRING_H 1
+#endif
/* Define to 1 if you have `strtoimax'. */
/* #undef HAVE_STRTOIMAX */
@@ -150,46 +179,62 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef HAVE_STRTOLL */
/* Define to 1 if you have `strtoq'. */
-/* #undef HAVE_STRTOQ */
+#ifndef HAVE_STRTOQ
+#define HAVE_STRTOQ 1
+#endif
/* Define to 1 if you have the <sys/stat.h> header file. */
-/* #undef HAVE_SYS_STAT_H */
+#ifndef HAVE_SYS_STAT_H
+#define HAVE_SYS_STAT_H 1
+#endif
/* Define to 1 if you have the <sys/types.h> header file. */
-/* #undef HAVE_SYS_TYPES_H */
+#ifndef HAVE_SYS_TYPES_H
+#define HAVE_SYS_TYPES_H 1
+#endif
/* Define to 1 if you have the <type_traits.h> header file. */
/* #undef HAVE_TYPE_TRAITS_H */
/* Define to 1 if you have the <unistd.h> header file. */
-/* #undef HAVE_UNISTD_H */
+#ifndef HAVE_UNISTD_H
+#define HAVE_UNISTD_H 1
+#endif
/* Define to 1 if the system has the type `unsigned long long'. */
-/* #undef HAVE_UNSIGNED_LONG_LONG */
+#ifndef HAVE_UNSIGNED_LONG_LONG
+#define HAVE_UNSIGNED_LONG_LONG 1
+#endif
-/* Define to 1 if the compiler supports simple visibility declarations. */
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+ declarations. */
/* #undef HAVE_VISIBILITY */
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <zlib.h> header file. */
-/* #undef HAVE_ZLIB_H */
+#ifndef HAVE_ZLIB_H
+#define HAVE_ZLIB_H 1
+#endif
/* Define to 1 if you have `_strtoi64'. */
/* #undef HAVE__STRTOI64 */
+/* Exclude these above definitions when building within PHP */
+#endif
+
/* The value of LINK_SIZE determines the number of bytes used to store links
as offsets within the compiled regex. The default is 2, which allows for
compiled patterns up to 64K long. This covers the vast majority of cases.
However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows
- for longer patterns in extreme cases. */
+ for longer patterns in extreme cases. On systems that support it,
+ "configure" can be used to override this default. */
#ifndef LINK_SIZE
#define LINK_SIZE 2
#endif
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
/* This is ignored unless you are using libtool. */
#ifndef LT_OBJDIR
#define LT_OBJDIR ".libs/"
@@ -200,7 +245,8 @@ sure both macros are undefined; an emulation function will then be used. */
pcre_exec(). There is a runtime interface for setting a different limit.
The limit exists in order to catch runaway regular expressions that take
for ever to determine that they do not match. The default is set very large
- so that it does not accidentally catch legitimate cases. */
+ so that it does not accidentally catch legitimate cases. On systems that
+ support it, "configure" can be used to override this default default. */
#ifndef MATCH_LIMIT
#define MATCH_LIMIT 10000000
#endif
@@ -212,7 +258,8 @@ sure both macros are undefined; an emulation function will then be used. */
used. The value of MATCH_LIMIT_RECURSION applies only to recursive calls of
match(). To have any useful effect, it must be less than the value of
MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There is
- a runtime method for setting a different limit. */
+ a runtime method for setting a different limit. On systems that support it,
+ "configure" can be used to override the default. */
#ifndef MATCH_LIMIT_RECURSION
#define MATCH_LIMIT_RECURSION MATCH_LIMIT
#endif
@@ -243,6 +290,9 @@ sure both macros are undefined; an emulation function will then be used. */
#define NEWLINE 10
#endif
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
/* PCRE uses recursive function calls to handle backtracking while matching.
This can sometimes be a problem on systems that have stacks of limited
size. Define NO_RECURSE to any value to get a version that doesn't use
@@ -252,6 +302,8 @@ sure both macros are undefined; an emulation function will then be used. */
*/
/* #undef NO_RECURSE */
+#define PARENS_NEST_LIMIT 250
+
/* Name of package */
#define PACKAGE "pcre"
@@ -262,7 +314,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.37"
+#define PACKAGE_STRING "PCRE 8.38"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre"
@@ -271,7 +323,13 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.37"
+#define PACKAGE_VERSION "8.38"
+
+/* to make a symbol visible */
+/* #undef PCRECPP_EXP_DECL */
+
+/* to make a symbol visible */
+/* #undef PCRECPP_EXP_DEFN */
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
parentheses (of any kind) in a pattern. This limits the amount of system
@@ -285,9 +343,20 @@ sure both macros are undefined; an emulation function will then be used. */
minimum value. The actual amount of memory used by pcregrep is three times
this number, because it allows for the buffering of "before" and "after"
lines. */
-#ifndef PCREGREP_BUFSIZE
-#define PCREGREP_BUFSIZE 20480
-#endif
+/* #undef PCREGREP_BUFSIZE */
+
+/* to make a symbol visible */
+/* #undef PCREPOSIX_EXP_DECL */
+
+/* to make a symbol visible */
+/* #undef PCREPOSIX_EXP_DEFN */
+
+/* to make a symbol visible */
+/* #undef PCRE_EXP_DATA_DEFN */
+
+/* to make a symbol visible */
+/* #undef PCRE_EXP_DECL */
+
/* If you are compiling for a system other than a Unix-like system or
Win32, and it needs some magic to be inserted before the definition
@@ -319,7 +388,13 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* Define to 1 if you have the ANSI C header files. */
-/* #undef STDC_HEADERS */
+#ifndef STDC_HEADERS
+#define STDC_HEADERS 1
+#endif
+
+/* Define to allow pcretest and pcregrep to be linked with gcov, so that they
+ are able to generate code coverage reports. */
+#undef SUPPORT_GCOV
/* Define to any value to enable support for Just-In-Time compiling. */
#define SUPPORT_JIT
@@ -329,7 +404,7 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_LIBBZ2 */
/* Define to any value to allow pcretest to be linked with libedit. */
-/* #undef SUPPORT_LIBEDIT */
+#undef SUPPORT_LIBEDIT
/* Define to any value to allow pcretest to be linked with libreadline. */
/* #undef SUPPORT_LIBREADLINE */
@@ -348,23 +423,23 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_PCRE8 */
/* Define to any value to enable JIT support in pcregrep. */
-#define SUPPORT_PCREGREP_JIT
+/* #undef SUPPORT_PCREGREP_JIT */
-/* Define to any value to enable support for Unicode properties. */
+/* Define to enable support for Unicode properties */
/* #undef SUPPORT_UCP */
/* Define to any value to enable support for the UTF-8/16/32 Unicode encoding.
This will work even in an EBCDIC environment, but it is incompatible with
the EBCDIC macro. That is, PCRE can support *either* EBCDIC code *or*
ASCII/UTF-8/16/32, but not both at once. */
-/* #undef SUPPORT_UTF */
+/* #undef SUPPORT_UTF8 */
-/* Define to any value for valgrind support to find invalid memory reads. */
+/* Valgrind support to find invalid memory reads. */
/* #undef SUPPORT_VALGRIND */
/* Version number of package */
#ifndef VERSION
-#define VERSION "8.37"
+#define VERSION "8.38"
#endif
/* Define to empty if `const' does not conform to ANSI C. */
@@ -376,4 +451,3 @@ sure both macros are undefined; an emulation function will then be used. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
-
diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt
index ce27f4b3e0..76a47c79ef 100644
--- a/ext/pcre/pcrelib/doc/pcre.txt
+++ b/ext/pcre/pcrelib/doc/pcre.txt
@@ -13,7 +13,18 @@ PCRE(3) Library Functions Manual PCRE(3)
NAME
- PCRE - Perl-compatible regular expressions
+ PCRE - Perl-compatible regular expressions (original API)
+
+PLEASE TAKE NOTE
+
+ This document relates to PCRE releases that use the original API, with
+ library names libpcre, libpcre16, and libpcre32. January 2015 saw the
+ first release of a new API, known as PCRE2, with release numbers start-
+ ing at 10.00 and library names libpcre2-8, libpcre2-16, and
+ libpcre2-32. The old libraries (now called PCRE1) are still being main-
+ tained for bug fixes, but there will be no new development. New
+ projects are advised to use the new PCRE2 libraries.
+
INTRODUCTION
@@ -179,8 +190,8 @@ AUTHOR
REVISION
- Last updated: 08 January 2014
- Copyright (c) 1997-2014 University of Cambridge.
+ Last updated: 10 February 2015
+ Copyright (c) 1997-2015 University of Cambridge.
------------------------------------------------------------------------------
@@ -4989,7 +5000,8 @@ BACKSLASH
appearance of non-printing characters, apart from the binary zero that
terminates a pattern, but when a pattern is being prepared by text
editing, it is often easier to use one of the following escape
- sequences than the binary character it represents:
+ sequences than the binary character it represents. In an ASCII or Uni-
+ code environment, these escapes are as follows:
\a alarm, that is, the BEL character (hex 07)
\cx "control-x", where x is any ASCII character
@@ -5005,55 +5017,67 @@ BACKSLASH
\x{hhh..} character with hex code hhh.. (non-JavaScript mode)
\uhhhh character with hex code hhhh (JavaScript mode only)
- The precise effect of \cx on ASCII characters is as follows: if x is a
- lower case letter, it is converted to upper case. Then bit 6 of the
+ The precise effect of \cx on ASCII characters is as follows: if x is a
+ lower case letter, it is converted to upper case. Then bit 6 of the
character (hex 40) is inverted. Thus \cA to \cZ become hex 01 to hex 1A
- (A is 41, Z is 5A), but \c{ becomes hex 3B ({ is 7B), and \c; becomes
- hex 7B (; is 3B). If the data item (byte or 16-bit value) following \c
- has a value greater than 127, a compile-time error occurs. This locks
+ (A is 41, Z is 5A), but \c{ becomes hex 3B ({ is 7B), and \c; becomes
+ hex 7B (; is 3B). If the data item (byte or 16-bit value) following \c
+ has a value greater than 127, a compile-time error occurs. This locks
out non-ASCII characters in all modes.
- The \c facility was designed for use with ASCII characters, but with
- the extension to Unicode it is even less useful than it once was. It
- is, however, recognized when PCRE is compiled in EBCDIC mode, where
- data items are always bytes. In this mode, all values are valid after
- \c. If the next character is a lower case letter, it is converted to
- upper case. Then the 0xc0 bits of the byte are inverted. Thus \cA
- becomes hex 01, as in ASCII (A is C1), but because the EBCDIC letters
- are disjoint, \cZ becomes hex 29 (Z is E9), and other characters also
- generate different values.
-
- After \0 up to two further octal digits are read. If there are fewer
- than two digits, just those that are present are used. Thus the
- sequence \0\x\07 specifies two binary zeros followed by a BEL character
- (code value 7). Make sure you supply two digits after the initial zero
+ When PCRE is compiled in EBCDIC mode, \a, \e, \f, \n, \r, and \t gener-
+ ate the appropriate EBCDIC code values. The \c escape is processed as
+ specified for Perl in the perlebcdic document. The only characters that
+ are allowed after \c are A-Z, a-z, or one of @, [, \, ], ^, _, or ?.
+ Any other character provokes a compile-time error. The sequence \@
+ encodes character code 0; the letters (in either case) encode charac-
+ ters 1-26 (hex 01 to hex 1A); [, \, ], ^, and _ encode characters 27-31
+ (hex 1B to hex 1F), and \? becomes either 255 (hex FF) or 95 (hex 5F).
+
+ Thus, apart from \?, these escapes generate the same character code
+ values as they do in an ASCII environment, though the meanings of the
+ values mostly differ. For example, \G always generates code value 7,
+ which is BEL in ASCII but DEL in EBCDIC.
+
+ The sequence \? generates DEL (127, hex 7F) in an ASCII environment,
+ but because 127 is not a control character in EBCDIC, Perl makes it
+ generate the APC character. Unfortunately, there are several variants
+ of EBCDIC. In most of them the APC character has the value 255 (hex
+ FF), but in the one Perl calls POSIX-BC its value is 95 (hex 5F). If
+ certain other characters have POSIX-BC values, PCRE makes \? generate
+ 95; otherwise it generates 255.
+
+ After \0 up to two further octal digits are read. If there are fewer
+ than two digits, just those that are present are used. Thus the
+ sequence \0\x\015 specifies two binary zeros followed by a CR character
+ (code value 13). Make sure you supply two digits after the initial zero
if the pattern character that follows is itself an octal digit.
- The escape \o must be followed by a sequence of octal digits, enclosed
- in braces. An error occurs if this is not the case. This escape is a
- recent addition to Perl; it provides way of specifying character code
- points as octal numbers greater than 0777, and it also allows octal
+ The escape \o must be followed by a sequence of octal digits, enclosed
+ in braces. An error occurs if this is not the case. This escape is a
+ recent addition to Perl; it provides way of specifying character code
+ points as octal numbers greater than 0777, and it also allows octal
numbers and back references to be unambiguously specified.
For greater clarity and unambiguity, it is best to avoid following \ by
a digit greater than zero. Instead, use \o{} or \x{} to specify charac-
- ter numbers, and \g{} to specify back references. The following para-
+ ter numbers, and \g{} to specify back references. The following para-
graphs describe the old, ambiguous syntax.
The handling of a backslash followed by a digit other than 0 is compli-
- cated, and Perl has changed in recent releases, causing PCRE also to
+ cated, and Perl has changed in recent releases, causing PCRE also to
change. Outside a character class, PCRE reads the digit and any follow-
- ing digits as a decimal number. If the number is less than 8, or if
- there have been at least that many previous capturing left parentheses
- in the expression, the entire sequence is taken as a back reference. A
- description of how this works is given later, following the discussion
+ ing digits as a decimal number. If the number is less than 8, or if
+ there have been at least that many previous capturing left parentheses
+ in the expression, the entire sequence is taken as a back reference. A
+ description of how this works is given later, following the discussion
of parenthesized subpatterns.
- Inside a character class, or if the decimal number following \ is
+ Inside a character class, or if the decimal number following \ is
greater than 7 and there have not been that many capturing subpatterns,
- PCRE handles \8 and \9 as the literal characters "8" and "9", and oth-
+ PCRE handles \8 and \9 as the literal characters "8" and "9", and oth-
erwise re-reads up to three octal digits following the backslash, using
- them to generate a data character. Any subsequent digits stand for
+ them to generate a data character. Any subsequent digits stand for
themselves. For example:
\040 is another way of writing an ASCII space
@@ -5071,31 +5095,31 @@ BACKSLASH
\81 is either a back reference, or the two
characters "8" and "1"
- Note that octal values of 100 or greater that are specified using this
- syntax must not be introduced by a leading zero, because no more than
+ Note that octal values of 100 or greater that are specified using this
+ syntax must not be introduced by a leading zero, because no more than
three octal digits are ever read.
- By default, after \x that is not followed by {, from zero to two hexa-
- decimal digits are read (letters can be in upper or lower case). Any
+ By default, after \x that is not followed by {, from zero to two hexa-
+ decimal digits are read (letters can be in upper or lower case). Any
number of hexadecimal digits may appear between \x{ and }. If a charac-
- ter other than a hexadecimal digit appears between \x{ and }, or if
+ ter other than a hexadecimal digit appears between \x{ and }, or if
there is no terminating }, an error occurs.
- If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x
- is as just described only when it is followed by two hexadecimal dig-
- its. Otherwise, it matches a literal "x" character. In JavaScript
+ If the PCRE_JAVASCRIPT_COMPAT option is set, the interpretation of \x
+ is as just described only when it is followed by two hexadecimal dig-
+ its. Otherwise, it matches a literal "x" character. In JavaScript
mode, support for code points greater than 256 is provided by \u, which
- must be followed by four hexadecimal digits; otherwise it matches a
+ must be followed by four hexadecimal digits; otherwise it matches a
literal "u" character.
Characters whose value is less than 256 can be defined by either of the
- two syntaxes for \x (or by \u in JavaScript mode). There is no differ-
+ two syntaxes for \x (or by \u in JavaScript mode). There is no differ-
ence in the way they are handled. For example, \xdc is exactly the same
as \x{dc} (or \u00dc in JavaScript mode).
Constraints on character values
- Characters that are specified using octal or hexadecimal numbers are
+ Characters that are specified using octal or hexadecimal numbers are
limited to certain values, as follows:
8-bit non-UTF mode less than 0x100
@@ -5105,44 +5129,44 @@ BACKSLASH
32-bit non-UTF mode less than 0x100000000
32-bit UTF-32 mode less than 0x10ffff and a valid codepoint
- Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-
+ Invalid Unicode codepoints are the range 0xd800 to 0xdfff (the so-
called "surrogate" codepoints), and 0xffef.
Escape sequences in character classes
All the sequences that define a single character value can be used both
- inside and outside character classes. In addition, inside a character
+ inside and outside character classes. In addition, inside a character
class, \b is interpreted as the backspace character (hex 08).
- \N is not allowed in a character class. \B, \R, and \X are not special
- inside a character class. Like other unrecognized escape sequences,
- they are treated as the literal characters "B", "R", and "X" by
- default, but cause an error if the PCRE_EXTRA option is set. Outside a
+ \N is not allowed in a character class. \B, \R, and \X are not special
+ inside a character class. Like other unrecognized escape sequences,
+ they are treated as the literal characters "B", "R", and "X" by
+ default, but cause an error if the PCRE_EXTRA option is set. Outside a
character class, these sequences have different meanings.
Unsupported escape sequences
- In Perl, the sequences \l, \L, \u, and \U are recognized by its string
- handler and used to modify the case of following characters. By
- default, PCRE does not support these escape sequences. However, if the
- PCRE_JAVASCRIPT_COMPAT option is set, \U matches a "U" character, and
+ In Perl, the sequences \l, \L, \u, and \U are recognized by its string
+ handler and used to modify the case of following characters. By
+ default, PCRE does not support these escape sequences. However, if the
+ PCRE_JAVASCRIPT_COMPAT option is set, \U matches a "U" character, and
\u can be used to define a character by code point, as described in the
previous section.
Absolute and relative back references
- The sequence \g followed by an unsigned or a negative number, option-
- ally enclosed in braces, is an absolute or relative back reference. A
+ The sequence \g followed by an unsigned or a negative number, option-
+ ally enclosed in braces, is an absolute or relative back reference. A
named back reference can be coded as \g{name}. Back references are dis-
cussed later, following the discussion of parenthesized subpatterns.
Absolute and relative subroutine calls
- For compatibility with Oniguruma, the non-Perl syntax \g followed by a
+ For compatibility with Oniguruma, the non-Perl syntax \g followed by a
name or a number enclosed either in angle brackets or single quotes, is
- an alternative syntax for referencing a subpattern as a "subroutine".
- Details are discussed later. Note that \g{...} (Perl syntax) and
- \g<...> (Oniguruma syntax) are not synonymous. The former is a back
+ an alternative syntax for referencing a subpattern as a "subroutine".
+ Details are discussed later. Note that \g{...} (Perl syntax) and
+ \g<...> (Oniguruma syntax) are not synonymous. The former is a back
reference; the latter is a subroutine call.
Generic character types
@@ -5161,59 +5185,59 @@ BACKSLASH
\W any "non-word" character
There is also the single sequence \N, which matches a non-newline char-
- acter. This is the same as the "." metacharacter when PCRE_DOTALL is
- not set. Perl also uses \N to match characters by name; PCRE does not
+ acter. This is the same as the "." metacharacter when PCRE_DOTALL is
+ not set. Perl also uses \N to match characters by name; PCRE does not
support this.
- Each pair of lower and upper case escape sequences partitions the com-
- plete set of characters into two disjoint sets. Any given character
- matches one, and only one, of each pair. The sequences can appear both
- inside and outside character classes. They each match one character of
- the appropriate type. If the current matching point is at the end of
- the subject string, all of them fail, because there is no character to
+ Each pair of lower and upper case escape sequences partitions the com-
+ plete set of characters into two disjoint sets. Any given character
+ matches one, and only one, of each pair. The sequences can appear both
+ inside and outside character classes. They each match one character of
+ the appropriate type. If the current matching point is at the end of
+ the subject string, all of them fail, because there is no character to
match.
- For compatibility with Perl, \s did not used to match the VT character
- (code 11), which made it different from the the POSIX "space" class.
- However, Perl added VT at release 5.18, and PCRE followed suit at
- release 8.34. The default \s characters are now HT (9), LF (10), VT
- (11), FF (12), CR (13), and space (32), which are defined as white
+ For compatibility with Perl, \s did not used to match the VT character
+ (code 11), which made it different from the the POSIX "space" class.
+ However, Perl added VT at release 5.18, and PCRE followed suit at
+ release 8.34. The default \s characters are now HT (9), LF (10), VT
+ (11), FF (12), CR (13), and space (32), which are defined as white
space in the "C" locale. This list may vary if locale-specific matching
- is taking place. For example, in some locales the "non-breaking space"
- character (\xA0) is recognized as white space, and in others the VT
+ is taking place. For example, in some locales the "non-breaking space"
+ character (\xA0) is recognized as white space, and in others the VT
character is not.
- A "word" character is an underscore or any character that is a letter
- or digit. By default, the definition of letters and digits is con-
- trolled by PCRE's low-valued character tables, and may vary if locale-
- specific matching is taking place (see "Locale support" in the pcreapi
- page). For example, in a French locale such as "fr_FR" in Unix-like
- systems, or "french" in Windows, some character codes greater than 127
- are used for accented letters, and these are then matched by \w. The
+ A "word" character is an underscore or any character that is a letter
+ or digit. By default, the definition of letters and digits is con-
+ trolled by PCRE's low-valued character tables, and may vary if locale-
+ specific matching is taking place (see "Locale support" in the pcreapi
+ page). For example, in a French locale such as "fr_FR" in Unix-like
+ systems, or "french" in Windows, some character codes greater than 127
+ are used for accented letters, and these are then matched by \w. The
use of locales with Unicode is discouraged.
- By default, characters whose code points are greater than 127 never
+ By default, characters whose code points are greater than 127 never
match \d, \s, or \w, and always match \D, \S, and \W, although this may
- vary for characters in the range 128-255 when locale-specific matching
- is happening. These escape sequences retain their original meanings
- from before Unicode support was available, mainly for efficiency rea-
- sons. If PCRE is compiled with Unicode property support, and the
- PCRE_UCP option is set, the behaviour is changed so that Unicode prop-
+ vary for characters in the range 128-255 when locale-specific matching
+ is happening. These escape sequences retain their original meanings
+ from before Unicode support was available, mainly for efficiency rea-
+ sons. If PCRE is compiled with Unicode property support, and the
+ PCRE_UCP option is set, the behaviour is changed so that Unicode prop-
erties are used to determine character types, as follows:
\d any character that matches \p{Nd} (decimal digit)
\s any character that matches \p{Z} or \h or \v
\w any character that matches \p{L} or \p{N}, plus underscore
- The upper case escapes match the inverse sets of characters. Note that
- \d matches only decimal digits, whereas \w matches any Unicode digit,
- as well as any Unicode letter, and underscore. Note also that PCRE_UCP
- affects \b, and \B because they are defined in terms of \w and \W.
+ The upper case escapes match the inverse sets of characters. Note that
+ \d matches only decimal digits, whereas \w matches any Unicode digit,
+ as well as any Unicode letter, and underscore. Note also that PCRE_UCP
+ affects \b, and \B because they are defined in terms of \w and \W.
Matching these sequences is noticeably slower when PCRE_UCP is set.
- The sequences \h, \H, \v, and \V are features that were added to Perl
- at release 5.10. In contrast to the other sequences, which match only
- ASCII characters by default, these always match certain high-valued
+ The sequences \h, \H, \v, and \V are features that were added to Perl
+ at release 5.10. In contrast to the other sequences, which match only
+ ASCII characters by default, these always match certain high-valued
code points, whether or not PCRE_UCP is set. The horizontal space char-
acters are:
@@ -5252,110 +5276,110 @@ BACKSLASH
Newline sequences
- Outside a character class, by default, the escape sequence \R matches
- any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent
+ Outside a character class, by default, the escape sequence \R matches
+ any Unicode newline sequence. In 8-bit non-UTF-8 mode \R is equivalent
to the following:
(?>\r\n|\n|\x0b|\f|\r|\x85)
- This is an example of an "atomic group", details of which are given
+ This is an example of an "atomic group", details of which are given
below. This particular group matches either the two-character sequence
- CR followed by LF, or one of the single characters LF (linefeed,
- U+000A), VT (vertical tab, U+000B), FF (form feed, U+000C), CR (car-
- riage return, U+000D), or NEL (next line, U+0085). The two-character
+ CR followed by LF, or one of the single characters LF (linefeed,
+ U+000A), VT (vertical tab, U+000B), FF (form feed, U+000C), CR (car-
+ riage return, U+000D), or NEL (next line, U+0085). The two-character
sequence is treated as a single unit that cannot be split.
- In other modes, two additional characters whose codepoints are greater
+ In other modes, two additional characters whose codepoints are greater
than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa-
- rator, U+2029). Unicode character property support is not needed for
+ rator, U+2029). Unicode character property support is not needed for
these characters to be recognized.
It is possible to restrict \R to match only CR, LF, or CRLF (instead of
- the complete set of Unicode line endings) by setting the option
+ the complete set of Unicode line endings) by setting the option
PCRE_BSR_ANYCRLF either at compile time or when the pattern is matched.
(BSR is an abbrevation for "backslash R".) This can be made the default
- when PCRE is built; if this is the case, the other behaviour can be
- requested via the PCRE_BSR_UNICODE option. It is also possible to
- specify these settings by starting a pattern string with one of the
+ when PCRE is built; if this is the case, the other behaviour can be
+ requested via the PCRE_BSR_UNICODE option. It is also possible to
+ specify these settings by starting a pattern string with one of the
following sequences:
(*BSR_ANYCRLF) CR, LF, or CRLF only
(*BSR_UNICODE) any Unicode newline sequence
These override the default and the options given to the compiling func-
- tion, but they can themselves be overridden by options given to a
- matching function. Note that these special settings, which are not
- Perl-compatible, are recognized only at the very start of a pattern,
- and that they must be in upper case. If more than one of them is
- present, the last one is used. They can be combined with a change of
+ tion, but they can themselves be overridden by options given to a
+ matching function. Note that these special settings, which are not
+ Perl-compatible, are recognized only at the very start of a pattern,
+ and that they must be in upper case. If more than one of them is
+ present, the last one is used. They can be combined with a change of
newline convention; for example, a pattern can start with:
(*ANY)(*BSR_ANYCRLF)
- They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF)
+ They can also be combined with the (*UTF8), (*UTF16), (*UTF32), (*UTF)
or (*UCP) special sequences. Inside a character class, \R is treated as
- an unrecognized escape sequence, and so matches the letter "R" by
+ an unrecognized escape sequence, and so matches the letter "R" by
default, but causes an error if PCRE_EXTRA is set.
Unicode character properties
When PCRE is built with Unicode character property support, three addi-
- tional escape sequences that match characters with specific properties
- are available. When in 8-bit non-UTF-8 mode, these sequences are of
- course limited to testing characters whose codepoints are less than
+ tional escape sequences that match characters with specific properties
+ are available. When in 8-bit non-UTF-8 mode, these sequences are of
+ course limited to testing characters whose codepoints are less than
256, but they do work in this mode. The extra escape sequences are:
\p{xx} a character with the xx property
\P{xx} a character without the xx property
\X a Unicode extended grapheme cluster
- The property names represented by xx above are limited to the Unicode
+ The property names represented by xx above are limited to the Unicode
script names, the general category properties, "Any", which matches any
- character (including newline), and some special PCRE properties
- (described in the next section). Other Perl properties such as "InMu-
- sicalSymbols" are not currently supported by PCRE. Note that \P{Any}
+ character (including newline), and some special PCRE properties
+ (described in the next section). Other Perl properties such as "InMu-
+ sicalSymbols" are not currently supported by PCRE. Note that \P{Any}
does not match any characters, so always causes a match failure.
Sets of Unicode characters are defined as belonging to certain scripts.
- A character from one of these sets can be matched using a script name.
+ A character from one of these sets can be matched using a script name.
For example:
\p{Greek}
\P{Han}
- Those that are not part of an identified script are lumped together as
+ Those that are not part of an identified script are lumped together as
"Common". The current list of scripts is:
- Arabic, Armenian, Avestan, Balinese, Bamum, Bassa_Vah, Batak, Bengali,
- Bopomofo, Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Car-
+ Arabic, Armenian, Avestan, Balinese, Bamum, Bassa_Vah, Batak, Bengali,
+ Bopomofo, Brahmi, Braille, Buginese, Buhid, Canadian_Aboriginal, Car-
ian, Caucasian_Albanian, Chakma, Cham, Cherokee, Common, Coptic, Cunei-
form, Cypriot, Cyrillic, Deseret, Devanagari, Duployan, Egyptian_Hiero-
glyphs, Elbasan, Ethiopic, Georgian, Glagolitic, Gothic, Grantha,
- Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana,
- Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip-
- tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li,
- Kharoshthi, Khmer, Khojki, Khudawadi, Lao, Latin, Lepcha, Limbu, Lin-
- ear_A, Linear_B, Lisu, Lycian, Lydian, Mahajani, Malayalam, Mandaic,
- Manichaean, Meetei_Mayek, Mende_Kikakui, Meroitic_Cursive,
- Meroitic_Hieroglyphs, Miao, Modi, Mongolian, Mro, Myanmar, Nabataean,
- New_Tai_Lue, Nko, Ogham, Ol_Chiki, Old_Italic, Old_North_Arabian,
+ Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana,
+ Imperial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscrip-
+ tional_Parthian, Javanese, Kaithi, Kannada, Katakana, Kayah_Li,
+ Kharoshthi, Khmer, Khojki, Khudawadi, Lao, Latin, Lepcha, Limbu, Lin-
+ ear_A, Linear_B, Lisu, Lycian, Lydian, Mahajani, Malayalam, Mandaic,
+ Manichaean, Meetei_Mayek, Mende_Kikakui, Meroitic_Cursive,
+ Meroitic_Hieroglyphs, Miao, Modi, Mongolian, Mro, Myanmar, Nabataean,
+ New_Tai_Lue, Nko, Ogham, Ol_Chiki, Old_Italic, Old_North_Arabian,
Old_Permic, Old_Persian, Old_South_Arabian, Old_Turkic, Oriya, Osmanya,
Pahawh_Hmong, Palmyrene, Pau_Cin_Hau, Phags_Pa, Phoenician,
- Psalter_Pahlavi, Rejang, Runic, Samaritan, Saurashtra, Sharada, Sha-
- vian, Siddham, Sinhala, Sora_Sompeng, Sundanese, Syloti_Nagri, Syriac,
- Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, Takri, Tamil, Telugu,
- Thaana, Thai, Tibetan, Tifinagh, Tirhuta, Ugaritic, Vai, Warang_Citi,
+ Psalter_Pahlavi, Rejang, Runic, Samaritan, Saurashtra, Sharada, Sha-
+ vian, Siddham, Sinhala, Sora_Sompeng, Sundanese, Syloti_Nagri, Syriac,
+ Tagalog, Tagbanwa, Tai_Le, Tai_Tham, Tai_Viet, Takri, Tamil, Telugu,
+ Thaana, Thai, Tibetan, Tifinagh, Tirhuta, Ugaritic, Vai, Warang_Citi,
Yi.
Each character has exactly one Unicode general category property, spec-
- ified by a two-letter abbreviation. For compatibility with Perl, nega-
- tion can be specified by including a circumflex between the opening
- brace and the property name. For example, \p{^Lu} is the same as
+ ified by a two-letter abbreviation. For compatibility with Perl, nega-
+ tion can be specified by including a circumflex between the opening
+ brace and the property name. For example, \p{^Lu} is the same as
\P{Lu}.
If only one letter is specified with \p or \P, it includes all the gen-
- eral category properties that start with that letter. In this case, in
- the absence of negation, the curly brackets in the escape sequence are
+ eral category properties that start with that letter. In this case, in
+ the absence of negation, the curly brackets in the escape sequence are
optional; these two examples have the same effect:
\p{L}
@@ -5407,73 +5431,73 @@ BACKSLASH
Zp Paragraph separator
Zs Space separator
- The special property L& is also supported: it matches a character that
- has the Lu, Ll, or Lt property, in other words, a letter that is not
+ The special property L& is also supported: it matches a character that
+ has the Lu, Ll, or Lt property, in other words, a letter that is not
classified as a modifier or "other".
- The Cs (Surrogate) property applies only to characters in the range
- U+D800 to U+DFFF. Such characters are not valid in Unicode strings and
- so cannot be tested by PCRE, unless UTF validity checking has been
+ The Cs (Surrogate) property applies only to characters in the range
+ U+D800 to U+DFFF. Such characters are not valid in Unicode strings and
+ so cannot be tested by PCRE, unless UTF validity checking has been
turned off (see the discussion of PCRE_NO_UTF8_CHECK,
- PCRE_NO_UTF16_CHECK and PCRE_NO_UTF32_CHECK in the pcreapi page). Perl
+ PCRE_NO_UTF16_CHECK and PCRE_NO_UTF32_CHECK in the pcreapi page). Perl
does not support the Cs property.
- The long synonyms for property names that Perl supports (such as
- \p{Letter}) are not supported by PCRE, nor is it permitted to prefix
+ The long synonyms for property names that Perl supports (such as
+ \p{Letter}) are not supported by PCRE, nor is it permitted to prefix
any of these properties with "Is".
No character that is in the Unicode table has the Cn (unassigned) prop-
erty. Instead, this property is assumed for any code point that is not
in the Unicode table.
- Specifying caseless matching does not affect these escape sequences.
- For example, \p{Lu} always matches only upper case letters. This is
+ Specifying caseless matching does not affect these escape sequences.
+ For example, \p{Lu} always matches only upper case letters. This is
different from the behaviour of current versions of Perl.
- Matching characters by Unicode property is not fast, because PCRE has
- to do a multistage table lookup in order to find a character's prop-
+ Matching characters by Unicode property is not fast, because PCRE has
+ to do a multistage table lookup in order to find a character's prop-
erty. That is why the traditional escape sequences such as \d and \w do
not use Unicode properties in PCRE by default, though you can make them
- do so by setting the PCRE_UCP option or by starting the pattern with
+ do so by setting the PCRE_UCP option or by starting the pattern with
(*UCP).
Extended grapheme clusters
- The \X escape matches any number of Unicode characters that form an
+ The \X escape matches any number of Unicode characters that form an
"extended grapheme cluster", and treats the sequence as an atomic group
- (see below). Up to and including release 8.31, PCRE matched an ear-
+ (see below). Up to and including release 8.31, PCRE matched an ear-
lier, simpler definition that was equivalent to
(?>\PM\pM*)
- That is, it matched a character without the "mark" property, followed
- by zero or more characters with the "mark" property. Characters with
- the "mark" property are typically non-spacing accents that affect the
+ That is, it matched a character without the "mark" property, followed
+ by zero or more characters with the "mark" property. Characters with
+ the "mark" property are typically non-spacing accents that affect the
preceding character.
- This simple definition was extended in Unicode to include more compli-
- cated kinds of composite character by giving each character a grapheme
- breaking property, and creating rules that use these properties to
- define the boundaries of extended grapheme clusters. In releases of
+ This simple definition was extended in Unicode to include more compli-
+ cated kinds of composite character by giving each character a grapheme
+ breaking property, and creating rules that use these properties to
+ define the boundaries of extended grapheme clusters. In releases of
PCRE later than 8.31, \X matches one of these clusters.
- \X always matches at least one character. Then it decides whether to
+ \X always matches at least one character. Then it decides whether to
add additional characters according to the following rules for ending a
cluster:
1. End at the end of the subject string.
- 2. Do not end between CR and LF; otherwise end after any control char-
+ 2. Do not end between CR and LF; otherwise end after any control char-
acter.
- 3. Do not break Hangul (a Korean script) syllable sequences. Hangul
- characters are of five types: L, V, T, LV, and LVT. An L character may
- be followed by an L, V, LV, or LVT character; an LV or V character may
+ 3. Do not break Hangul (a Korean script) syllable sequences. Hangul
+ characters are of five types: L, V, T, LV, and LVT. An L character may
+ be followed by an L, V, LV, or LVT character; an LV or V character may
be followed by a V or T character; an LVT or T character may be follwed
only by a T character.
- 4. Do not end before extending characters or spacing marks. Characters
- with the "mark" property always have the "extend" grapheme breaking
+ 4. Do not end before extending characters or spacing marks. Characters
+ with the "mark" property always have the "extend" grapheme breaking
property.
5. Do not end after prepend characters.
@@ -5482,9 +5506,9 @@ BACKSLASH
PCRE's additional properties
- As well as the standard Unicode properties described above, PCRE sup-
- ports four more that make it possible to convert traditional escape
- sequences such as \w and \s to use Unicode properties. PCRE uses these
+ As well as the standard Unicode properties described above, PCRE sup-
+ ports four more that make it possible to convert traditional escape
+ sequences such as \w and \s to use Unicode properties. PCRE uses these
non-standard, non-Perl properties internally when PCRE_UCP is set. How-
ever, they may also be used explicitly. These properties are:
@@ -5493,54 +5517,54 @@ BACKSLASH
Xsp Any Perl space character
Xwd Any Perl "word" character
- Xan matches characters that have either the L (letter) or the N (num-
- ber) property. Xps matches the characters tab, linefeed, vertical tab,
- form feed, or carriage return, and any other character that has the Z
- (separator) property. Xsp is the same as Xps; it used to exclude ver-
- tical tab, for Perl compatibility, but Perl changed, and so PCRE fol-
- lowed at release 8.34. Xwd matches the same characters as Xan, plus
+ Xan matches characters that have either the L (letter) or the N (num-
+ ber) property. Xps matches the characters tab, linefeed, vertical tab,
+ form feed, or carriage return, and any other character that has the Z
+ (separator) property. Xsp is the same as Xps; it used to exclude ver-
+ tical tab, for Perl compatibility, but Perl changed, and so PCRE fol-
+ lowed at release 8.34. Xwd matches the same characters as Xan, plus
underscore.
- There is another non-standard property, Xuc, which matches any charac-
- ter that can be represented by a Universal Character Name in C++ and
- other programming languages. These are the characters $, @, ` (grave
- accent), and all characters with Unicode code points greater than or
- equal to U+00A0, except for the surrogates U+D800 to U+DFFF. Note that
- most base (ASCII) characters are excluded. (Universal Character Names
- are of the form \uHHHH or \UHHHHHHHH where H is a hexadecimal digit.
+ There is another non-standard property, Xuc, which matches any charac-
+ ter that can be represented by a Universal Character Name in C++ and
+ other programming languages. These are the characters $, @, ` (grave
+ accent), and all characters with Unicode code points greater than or
+ equal to U+00A0, except for the surrogates U+D800 to U+DFFF. Note that
+ most base (ASCII) characters are excluded. (Universal Character Names
+ are of the form \uHHHH or \UHHHHHHHH where H is a hexadecimal digit.
Note that the Xuc property does not match these sequences but the char-
acters that they represent.)
Resetting the match start
- The escape sequence \K causes any previously matched characters not to
+ The escape sequence \K causes any previously matched characters not to
be included in the final matched sequence. For example, the pattern:
foo\Kbar
- matches "foobar", but reports that it has matched "bar". This feature
- is similar to a lookbehind assertion (described below). However, in
- this case, the part of the subject before the real match does not have
- to be of fixed length, as lookbehind assertions do. The use of \K does
- not interfere with the setting of captured substrings. For example,
+ matches "foobar", but reports that it has matched "bar". This feature
+ is similar to a lookbehind assertion (described below). However, in
+ this case, the part of the subject before the real match does not have
+ to be of fixed length, as lookbehind assertions do. The use of \K does
+ not interfere with the setting of captured substrings. For example,
when the pattern
(foo)\Kbar
matches "foobar", the first substring is still set to "foo".
- Perl documents that the use of \K within assertions is "not well
- defined". In PCRE, \K is acted upon when it occurs inside positive
- assertions, but is ignored in negative assertions. Note that when a
- pattern such as (?=ab\K) matches, the reported start of the match can
+ Perl documents that the use of \K within assertions is "not well
+ defined". In PCRE, \K is acted upon when it occurs inside positive
+ assertions, but is ignored in negative assertions. Note that when a
+ pattern such as (?=ab\K) matches, the reported start of the match can
be greater than the end of the match.
Simple assertions
- The final use of backslash is for certain simple assertions. An asser-
- tion specifies a condition that has to be met at a particular point in
- a match, without consuming any characters from the subject string. The
- use of subpatterns for more complicated assertions is described below.
+ The final use of backslash is for certain simple assertions. An asser-
+ tion specifies a condition that has to be met at a particular point in
+ a match, without consuming any characters from the subject string. The
+ use of subpatterns for more complicated assertions is described below.
The backslashed assertions are:
\b matches at a word boundary
@@ -5551,161 +5575,161 @@ BACKSLASH
\z matches only at the end of the subject
\G matches at the first matching position in the subject
- Inside a character class, \b has a different meaning; it matches the
- backspace character. If any other of these assertions appears in a
- character class, by default it matches the corresponding literal char-
+ Inside a character class, \b has a different meaning; it matches the
+ backspace character. If any other of these assertions appears in a
+ character class, by default it matches the corresponding literal char-
acter (for example, \B matches the letter B). However, if the
- PCRE_EXTRA option is set, an "invalid escape sequence" error is gener-
+ PCRE_EXTRA option is set, an "invalid escape sequence" error is gener-
ated instead.
- A word boundary is a position in the subject string where the current
- character and the previous character do not both match \w or \W (i.e.
- one matches \w and the other matches \W), or the start or end of the
- string if the first or last character matches \w, respectively. In a
- UTF mode, the meanings of \w and \W can be changed by setting the
- PCRE_UCP option. When this is done, it also affects \b and \B. Neither
- PCRE nor Perl has a separate "start of word" or "end of word" metase-
- quence. However, whatever follows \b normally determines which it is.
+ A word boundary is a position in the subject string where the current
+ character and the previous character do not both match \w or \W (i.e.
+ one matches \w and the other matches \W), or the start or end of the
+ string if the first or last character matches \w, respectively. In a
+ UTF mode, the meanings of \w and \W can be changed by setting the
+ PCRE_UCP option. When this is done, it also affects \b and \B. Neither
+ PCRE nor Perl has a separate "start of word" or "end of word" metase-
+ quence. However, whatever follows \b normally determines which it is.
For example, the fragment \ba matches "a" at the start of a word.
- The \A, \Z, and \z assertions differ from the traditional circumflex
+ The \A, \Z, and \z assertions differ from the traditional circumflex
and dollar (described in the next section) in that they only ever match
- at the very start and end of the subject string, whatever options are
- set. Thus, they are independent of multiline mode. These three asser-
+ at the very start and end of the subject string, whatever options are
+ set. Thus, they are independent of multiline mode. These three asser-
tions are not affected by the PCRE_NOTBOL or PCRE_NOTEOL options, which
- affect only the behaviour of the circumflex and dollar metacharacters.
- However, if the startoffset argument of pcre_exec() is non-zero, indi-
+ affect only the behaviour of the circumflex and dollar metacharacters.
+ However, if the startoffset argument of pcre_exec() is non-zero, indi-
cating that matching is to start at a point other than the beginning of
- the subject, \A can never match. The difference between \Z and \z is
+ the subject, \A can never match. The difference between \Z and \z is
that \Z matches before a newline at the end of the string as well as at
the very end, whereas \z matches only at the end.
- The \G assertion is true only when the current matching position is at
- the start point of the match, as specified by the startoffset argument
- of pcre_exec(). It differs from \A when the value of startoffset is
- non-zero. By calling pcre_exec() multiple times with appropriate argu-
+ The \G assertion is true only when the current matching position is at
+ the start point of the match, as specified by the startoffset argument
+ of pcre_exec(). It differs from \A when the value of startoffset is
+ non-zero. By calling pcre_exec() multiple times with appropriate argu-
ments, you can mimic Perl's /g option, and it is in this kind of imple-
mentation where \G can be useful.
- Note, however, that PCRE's interpretation of \G, as the start of the
+ Note, however, that PCRE's interpretation of \G, as the start of the
current match, is subtly different from Perl's, which defines it as the
- end of the previous match. In Perl, these can be different when the
- previously matched string was empty. Because PCRE does just one match
+ end of the previous match. In Perl, these can be different when the
+ previously matched string was empty. Because PCRE does just one match
at a time, it cannot reproduce this behaviour.
- If all the alternatives of a pattern begin with \G, the expression is
+ If all the alternatives of a pattern begin with \G, the expression is
anchored to the starting match position, and the "anchored" flag is set
in the compiled regular expression.
CIRCUMFLEX AND DOLLAR
- The circumflex and dollar metacharacters are zero-width assertions.
- That is, they test for a particular condition being true without con-
+ The circumflex and dollar metacharacters are zero-width assertions.
+ That is, they test for a particular condition being true without con-
suming any characters from the subject string.
Outside a character class, in the default matching mode, the circumflex
- character is an assertion that is true only if the current matching
- point is at the start of the subject string. If the startoffset argu-
- ment of pcre_exec() is non-zero, circumflex can never match if the
- PCRE_MULTILINE option is unset. Inside a character class, circumflex
+ character is an assertion that is true only if the current matching
+ point is at the start of the subject string. If the startoffset argu-
+ ment of pcre_exec() is non-zero, circumflex can never match if the
+ PCRE_MULTILINE option is unset. Inside a character class, circumflex
has an entirely different meaning (see below).
- Circumflex need not be the first character of the pattern if a number
- of alternatives are involved, but it should be the first thing in each
- alternative in which it appears if the pattern is ever to match that
- branch. If all possible alternatives start with a circumflex, that is,
- if the pattern is constrained to match only at the start of the sub-
- ject, it is said to be an "anchored" pattern. (There are also other
+ Circumflex need not be the first character of the pattern if a number
+ of alternatives are involved, but it should be the first thing in each
+ alternative in which it appears if the pattern is ever to match that
+ branch. If all possible alternatives start with a circumflex, that is,
+ if the pattern is constrained to match only at the start of the sub-
+ ject, it is said to be an "anchored" pattern. (There are also other
constructs that can cause a pattern to be anchored.)
- The dollar character is an assertion that is true only if the current
- matching point is at the end of the subject string, or immediately
- before a newline at the end of the string (by default). Note, however,
- that it does not actually match the newline. Dollar need not be the
+ The dollar character is an assertion that is true only if the current
+ matching point is at the end of the subject string, or immediately
+ before a newline at the end of the string (by default). Note, however,
+ that it does not actually match the newline. Dollar need not be the
last character of the pattern if a number of alternatives are involved,
- but it should be the last item in any branch in which it appears. Dol-
+ but it should be the last item in any branch in which it appears. Dol-
lar has no special meaning in a character class.
- The meaning of dollar can be changed so that it matches only at the
- very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at
+ The meaning of dollar can be changed so that it matches only at the
+ very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at
compile time. This does not affect the \Z assertion.
The meanings of the circumflex and dollar characters are changed if the
- PCRE_MULTILINE option is set. When this is the case, a circumflex
- matches immediately after internal newlines as well as at the start of
- the subject string. It does not match after a newline that ends the
- string. A dollar matches before any newlines in the string, as well as
- at the very end, when PCRE_MULTILINE is set. When newline is specified
- as the two-character sequence CRLF, isolated CR and LF characters do
+ PCRE_MULTILINE option is set. When this is the case, a circumflex
+ matches immediately after internal newlines as well as at the start of
+ the subject string. It does not match after a newline that ends the
+ string. A dollar matches before any newlines in the string, as well as
+ at the very end, when PCRE_MULTILINE is set. When newline is specified
+ as the two-character sequence CRLF, isolated CR and LF characters do
not indicate newlines.
- For example, the pattern /^abc$/ matches the subject string "def\nabc"
- (where \n represents a newline) in multiline mode, but not otherwise.
- Consequently, patterns that are anchored in single line mode because
- all branches start with ^ are not anchored in multiline mode, and a
- match for circumflex is possible when the startoffset argument of
- pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if
+ For example, the pattern /^abc$/ matches the subject string "def\nabc"
+ (where \n represents a newline) in multiline mode, but not otherwise.
+ Consequently, patterns that are anchored in single line mode because
+ all branches start with ^ are not anchored in multiline mode, and a
+ match for circumflex is possible when the startoffset argument of
+ pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if
PCRE_MULTILINE is set.
- Note that the sequences \A, \Z, and \z can be used to match the start
- and end of the subject in both modes, and if all branches of a pattern
- start with \A it is always anchored, whether or not PCRE_MULTILINE is
+ Note that the sequences \A, \Z, and \z can be used to match the start
+ and end of the subject in both modes, and if all branches of a pattern
+ start with \A it is always anchored, whether or not PCRE_MULTILINE is
set.
FULL STOP (PERIOD, DOT) AND \N
Outside a character class, a dot in the pattern matches any one charac-
- ter in the subject string except (by default) a character that signi-
+ ter in the subject string except (by default) a character that signi-
fies the end of a line.
- When a line ending is defined as a single character, dot never matches
- that character; when the two-character sequence CRLF is used, dot does
- not match CR if it is immediately followed by LF, but otherwise it
- matches all characters (including isolated CRs and LFs). When any Uni-
- code line endings are being recognized, dot does not match CR or LF or
+ When a line ending is defined as a single character, dot never matches
+ that character; when the two-character sequence CRLF is used, dot does
+ not match CR if it is immediately followed by LF, but otherwise it
+ matches all characters (including isolated CRs and LFs). When any Uni-
+ code line endings are being recognized, dot does not match CR or LF or
any of the other line ending characters.
- The behaviour of dot with regard to newlines can be changed. If the
- PCRE_DOTALL option is set, a dot matches any one character, without
+ The behaviour of dot with regard to newlines can be changed. If the
+ PCRE_DOTALL option is set, a dot matches any one character, without
exception. If the two-character sequence CRLF is present in the subject
string, it takes two dots to match it.
- The handling of dot is entirely independent of the handling of circum-
- flex and dollar, the only relationship being that they both involve
+ The handling of dot is entirely independent of the handling of circum-
+ flex and dollar, the only relationship being that they both involve
newlines. Dot has no special meaning in a character class.
- The escape sequence \N behaves like a dot, except that it is not
- affected by the PCRE_DOTALL option. In other words, it matches any
- character except one that signifies the end of a line. Perl also uses
+ The escape sequence \N behaves like a dot, except that it is not
+ affected by the PCRE_DOTALL option. In other words, it matches any
+ character except one that signifies the end of a line. Perl also uses
\N to match characters by name; PCRE does not support this.
MATCHING A SINGLE DATA UNIT
- Outside a character class, the escape sequence \C matches any one data
- unit, whether or not a UTF mode is set. In the 8-bit library, one data
- unit is one byte; in the 16-bit library it is a 16-bit unit; in the
- 32-bit library it is a 32-bit unit. Unlike a dot, \C always matches
- line-ending characters. The feature is provided in Perl in order to
+ Outside a character class, the escape sequence \C matches any one data
+ unit, whether or not a UTF mode is set. In the 8-bit library, one data
+ unit is one byte; in the 16-bit library it is a 16-bit unit; in the
+ 32-bit library it is a 32-bit unit. Unlike a dot, \C always matches
+ line-ending characters. The feature is provided in Perl in order to
match individual bytes in UTF-8 mode, but it is unclear how it can use-
- fully be used. Because \C breaks up characters into individual data
- units, matching one unit with \C in a UTF mode means that the rest of
+ fully be used. Because \C breaks up characters into individual data
+ units, matching one unit with \C in a UTF mode means that the rest of
the string may start with a malformed UTF character. This has undefined
results, because PCRE assumes that it is dealing with valid UTF strings
- (and by default it checks this at the start of processing unless the
- PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK or PCRE_NO_UTF32_CHECK option
+ (and by default it checks this at the start of processing unless the
+ PCRE_NO_UTF8_CHECK, PCRE_NO_UTF16_CHECK or PCRE_NO_UTF32_CHECK option
is used).
- PCRE does not allow \C to appear in lookbehind assertions (described
- below) in a UTF mode, because this would make it impossible to calcu-
+ PCRE does not allow \C to appear in lookbehind assertions (described
+ below) in a UTF mode, because this would make it impossible to calcu-
late the length of the lookbehind.
In general, the \C escape sequence is best avoided. However, one way of
- using it that avoids the problem of malformed UTF characters is to use
- a lookahead to check the length of the next character, as in this pat-
- tern, which could be used with a UTF-8 string (ignore white space and
+ using it that avoids the problem of malformed UTF characters is to use
+ a lookahead to check the length of the next character, as in this pat-
+ tern, which could be used with a UTF-8 string (ignore white space and
line breaks):
(?| (?=[\x00-\x7f])(\C) |
@@ -5713,11 +5737,11 @@ MATCHING A SINGLE DATA UNIT
(?=[\x{800}-\x{ffff}])(\C)(\C)(\C) |
(?=[\x{10000}-\x{1fffff}])(\C)(\C)(\C)(\C))
- A group that starts with (?| resets the capturing parentheses numbers
- in each alternative (see "Duplicate Subpattern Numbers" below). The
- assertions at the start of each branch check the next UTF-8 character
- for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
- character's individual bytes are then captured by the appropriate num-
+ A group that starts with (?| resets the capturing parentheses numbers
+ in each alternative (see "Duplicate Subpattern Numbers" below). The
+ assertions at the start of each branch check the next UTF-8 character
+ for values whose encoding uses 1, 2, 3, or 4 bytes, respectively. The
+ character's individual bytes are then captured by the appropriate num-
ber of groups.
@@ -5727,109 +5751,109 @@ SQUARE BRACKETS AND CHARACTER CLASSES
closing square bracket. A closing square bracket on its own is not spe-
cial by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set,
a lone closing square bracket causes a compile-time error. If a closing
- square bracket is required as a member of the class, it should be the
- first data character in the class (after an initial circumflex, if
+ square bracket is required as a member of the class, it should be the
+ first data character in the class (after an initial circumflex, if
present) or escaped with a backslash.
- A character class matches a single character in the subject. In a UTF
- mode, the character may be more than one data unit long. A matched
+ A character class matches a single character in the subject. In a UTF
+ mode, the character may be more than one data unit long. A matched
character must be in the set of characters defined by the class, unless
- the first character in the class definition is a circumflex, in which
+ the first character in the class definition is a circumflex, in which
case the subject character must not be in the set defined by the class.
- If a circumflex is actually required as a member of the class, ensure
+ If a circumflex is actually required as a member of the class, ensure
it is not the first character, or escape it with a backslash.
- For example, the character class [aeiou] matches any lower case vowel,
- while [^aeiou] matches any character that is not a lower case vowel.
+ For example, the character class [aeiou] matches any lower case vowel,
+ while [^aeiou] matches any character that is not a lower case vowel.
Note that a circumflex is just a convenient notation for specifying the
- characters that are in the class by enumerating those that are not. A
- class that starts with a circumflex is not an assertion; it still con-
- sumes a character from the subject string, and therefore it fails if
+ characters that are in the class by enumerating those that are not. A
+ class that starts with a circumflex is not an assertion; it still con-
+ sumes a character from the subject string, and therefore it fails if
the current pointer is at the end of the string.
In UTF-8 (UTF-16, UTF-32) mode, characters with values greater than 255
- (0xffff) can be included in a class as a literal string of data units,
+ (0xffff) can be included in a class as a literal string of data units,
or by using the \x{ escaping mechanism.
- When caseless matching is set, any letters in a class represent both
- their upper case and lower case versions, so for example, a caseless
- [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
- match "A", whereas a caseful version would. In a UTF mode, PCRE always
- understands the concept of case for characters whose values are less
- than 128, so caseless matching is always possible. For characters with
- higher values, the concept of case is supported if PCRE is compiled
- with Unicode property support, but not otherwise. If you want to use
- caseless matching in a UTF mode for characters 128 and above, you must
- ensure that PCRE is compiled with Unicode property support as well as
+ When caseless matching is set, any letters in a class represent both
+ their upper case and lower case versions, so for example, a caseless
+ [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not
+ match "A", whereas a caseful version would. In a UTF mode, PCRE always
+ understands the concept of case for characters whose values are less
+ than 128, so caseless matching is always possible. For characters with
+ higher values, the concept of case is supported if PCRE is compiled
+ with Unicode property support, but not otherwise. If you want to use
+ caseless matching in a UTF mode for characters 128 and above, you must
+ ensure that PCRE is compiled with Unicode property support as well as
with UTF support.
- Characters that might indicate line breaks are never treated in any
- special way when matching character classes, whatever line-ending
- sequence is in use, and whatever setting of the PCRE_DOTALL and
+ Characters that might indicate line breaks are never treated in any
+ special way when matching character classes, whatever line-ending
+ sequence is in use, and whatever setting of the PCRE_DOTALL and
PCRE_MULTILINE options is used. A class such as [^a] always matches one
of these characters.
- The minus (hyphen) character can be used to specify a range of charac-
- ters in a character class. For example, [d-m] matches any letter
- between d and m, inclusive. If a minus character is required in a
- class, it must be escaped with a backslash or appear in a position
- where it cannot be interpreted as indicating a range, typically as the
+ The minus (hyphen) character can be used to specify a range of charac-
+ ters in a character class. For example, [d-m] matches any letter
+ between d and m, inclusive. If a minus character is required in a
+ class, it must be escaped with a backslash or appear in a position
+ where it cannot be interpreted as indicating a range, typically as the
first or last character in the class, or immediately after a range. For
- example, [b-d-z] matches letters in the range b to d, a hyphen charac-
+ example, [b-d-z] matches letters in the range b to d, a hyphen charac-
ter, or z.
It is not possible to have the literal character "]" as the end charac-
- ter of a range. A pattern such as [W-]46] is interpreted as a class of
- two characters ("W" and "-") followed by a literal string "46]", so it
- would match "W46]" or "-46]". However, if the "]" is escaped with a
- backslash it is interpreted as the end of range, so [W-\]46] is inter-
- preted as a class containing a range followed by two other characters.
- The octal or hexadecimal representation of "]" can also be used to end
+ ter of a range. A pattern such as [W-]46] is interpreted as a class of
+ two characters ("W" and "-") followed by a literal string "46]", so it
+ would match "W46]" or "-46]". However, if the "]" is escaped with a
+ backslash it is interpreted as the end of range, so [W-\]46] is inter-
+ preted as a class containing a range followed by two other characters.
+ The octal or hexadecimal representation of "]" can also be used to end
a range.
- An error is generated if a POSIX character class (see below) or an
- escape sequence other than one that defines a single character appears
- at a point where a range ending character is expected. For example,
+ An error is generated if a POSIX character class (see below) or an
+ escape sequence other than one that defines a single character appears
+ at a point where a range ending character is expected. For example,
[z-\xff] is valid, but [A-\d] and [A-[:digit:]] are not.
- Ranges operate in the collating sequence of character values. They can
- also be used for characters specified numerically, for example
- [\000-\037]. Ranges can include any characters that are valid for the
+ Ranges operate in the collating sequence of character values. They can
+ also be used for characters specified numerically, for example
+ [\000-\037]. Ranges can include any characters that are valid for the
current mode.
If a range that includes letters is used when caseless matching is set,
it matches the letters in either case. For example, [W-c] is equivalent
- to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if
- character tables for a French locale are in use, [\xc8-\xcb] matches
- accented E characters in both cases. In UTF modes, PCRE supports the
- concept of case for characters with values greater than 128 only when
+ to [][\\^_`wxyzabc], matched caselessly, and in a non-UTF mode, if
+ character tables for a French locale are in use, [\xc8-\xcb] matches
+ accented E characters in both cases. In UTF modes, PCRE supports the
+ concept of case for characters with values greater than 128 only when
it is compiled with Unicode property support.
- The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V,
+ The character escape sequences \d, \D, \h, \H, \p, \P, \s, \S, \v, \V,
\w, and \W may appear in a character class, and add the characters that
- they match to the class. For example, [\dABCDEF] matches any hexadeci-
- mal digit. In UTF modes, the PCRE_UCP option affects the meanings of
- \d, \s, \w and their upper case partners, just as it does when they
- appear outside a character class, as described in the section entitled
+ they match to the class. For example, [\dABCDEF] matches any hexadeci-
+ mal digit. In UTF modes, the PCRE_UCP option affects the meanings of
+ \d, \s, \w and their upper case partners, just as it does when they
+ appear outside a character class, as described in the section entitled
"Generic character types" above. The escape sequence \b has a different
- meaning inside a character class; it matches the backspace character.
- The sequences \B, \N, \R, and \X are not special inside a character
- class. Like any other unrecognized escape sequences, they are treated
- as the literal characters "B", "N", "R", and "X" by default, but cause
+ meaning inside a character class; it matches the backspace character.
+ The sequences \B, \N, \R, and \X are not special inside a character
+ class. Like any other unrecognized escape sequences, they are treated
+ as the literal characters "B", "N", "R", and "X" by default, but cause
an error if the PCRE_EXTRA option is set.
- A circumflex can conveniently be used with the upper case character
- types to specify a more restricted set of characters than the matching
- lower case type. For example, the class [^\W_] matches any letter or
+ A circumflex can conveniently be used with the upper case character
+ types to specify a more restricted set of characters than the matching
+ lower case type. For example, the class [^\W_] matches any letter or
digit, but not underscore, whereas [\w] includes underscore. A positive
character class should be read as "something OR something OR ..." and a
negative class as "NOT something AND NOT something AND NOT ...".
- The only metacharacters that are recognized in character classes are
- backslash, hyphen (only where it can be interpreted as specifying a
- range), circumflex (only at the start), opening square bracket (only
- when it can be interpreted as introducing a POSIX class name, or for a
- special compatibility feature - see the next two sections), and the
+ The only metacharacters that are recognized in character classes are
+ backslash, hyphen (only where it can be interpreted as specifying a
+ range), circumflex (only at the start), opening square bracket (only
+ when it can be interpreted as introducing a POSIX class name, or for a
+ special compatibility feature - see the next two sections), and the
terminating closing square bracket. However, escaping other non-
alphanumeric characters does no harm.
@@ -5837,7 +5861,7 @@ SQUARE BRACKETS AND CHARACTER CLASSES
POSIX CHARACTER CLASSES
Perl supports the POSIX notation for character classes. This uses names
- enclosed by [: and :] within the enclosing square brackets. PCRE also
+ enclosed by [: and :] within the enclosing square brackets. PCRE also
supports this notation. For example,
[01[:alpha:]%]
@@ -5860,28 +5884,28 @@ POSIX CHARACTER CLASSES
word "word" characters (same as \w)
xdigit hexadecimal digits
- The default "space" characters are HT (9), LF (10), VT (11), FF (12),
- CR (13), and space (32). If locale-specific matching is taking place,
- the list of space characters may be different; there may be fewer or
+ The default "space" characters are HT (9), LF (10), VT (11), FF (12),
+ CR (13), and space (32). If locale-specific matching is taking place,
+ the list of space characters may be different; there may be fewer or
more of them. "Space" used to be different to \s, which did not include
VT, for Perl compatibility. However, Perl changed at release 5.18, and
- PCRE followed at release 8.34. "Space" and \s now match the same set
+ PCRE followed at release 8.34. "Space" and \s now match the same set
of characters.
- The name "word" is a Perl extension, and "blank" is a GNU extension
- from Perl 5.8. Another Perl extension is negation, which is indicated
+ The name "word" is a Perl extension, and "blank" is a GNU extension
+ from Perl 5.8. Another Perl extension is negation, which is indicated
by a ^ character after the colon. For example,
[12[:^digit:]]
- matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
+ matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the
POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but
these are not supported, and an error is given if they are encountered.
By default, characters with values greater than 128 do not match any of
- the POSIX character classes. However, if the PCRE_UCP option is passed
- to pcre_compile(), some of the classes are changed so that Unicode
- character properties are used. This is achieved by replacing certain
+ the POSIX character classes. However, if the PCRE_UCP option is passed
+ to pcre_compile(), some of the classes are changed so that Unicode
+ character properties are used. This is achieved by replacing certain
POSIX classes by other sequences, as follows:
[:alnum:] becomes \p{Xan}
@@ -5893,10 +5917,10 @@ POSIX CHARACTER CLASSES
[:upper:] becomes \p{Lu}
[:word:] becomes \p{Xwd}
- Negated versions, such as [:^alpha:] use \P instead of \p. Three other
+ Negated versions, such as [:^alpha:] use \P instead of \p. Three other
POSIX classes are handled specially in UCP mode:
- [:graph:] This matches characters that have glyphs that mark the page
+ [:graph:] This matches characters that have glyphs that mark the page
when printed. In Unicode property terms, it matches all char-
acters with the L, M, N, P, S, or Cf properties, except for:
@@ -5905,58 +5929,58 @@ POSIX CHARACTER CLASSES
U+2066 - U+2069 Various "isolate"s
- [:print:] This matches the same characters as [:graph:] plus space
- characters that are not controls, that is, characters with
+ [:print:] This matches the same characters as [:graph:] plus space
+ characters that are not controls, that is, characters with
the Zs property.
[:punct:] This matches all characters that have the Unicode P (punctua-
- tion) property, plus those characters whose code points are
+ tion) property, plus those characters whose code points are
less than 128 that have the S (Symbol) property.
- The other POSIX classes are unchanged, and match only characters with
+ The other POSIX classes are unchanged, and match only characters with
code points less than 128.
COMPATIBILITY FEATURE FOR WORD BOUNDARIES
- In the POSIX.2 compliant library that was included in 4.4BSD Unix, the
- ugly syntax [[:<:]] and [[:>:]] is used for matching "start of word"
+ In the POSIX.2 compliant library that was included in 4.4BSD Unix, the
+ ugly syntax [[:<:]] and [[:>:]] is used for matching "start of word"
and "end of word". PCRE treats these items as follows:
[[:<:]] is converted to \b(?=\w)
[[:>:]] is converted to \b(?<=\w)
Only these exact character sequences are recognized. A sequence such as
- [a[:<:]b] provokes error for an unrecognized POSIX class name. This
- support is not compatible with Perl. It is provided to help migrations
+ [a[:<:]b] provokes error for an unrecognized POSIX class name. This
+ support is not compatible with Perl. It is provided to help migrations
from other environments, and is best not used in any new patterns. Note
- that \b matches at the start and the end of a word (see "Simple asser-
- tions" above), and in a Perl-style pattern the preceding or following
- character normally shows which is wanted, without the need for the
- assertions that are used above in order to give exactly the POSIX be-
+ that \b matches at the start and the end of a word (see "Simple asser-
+ tions" above), and in a Perl-style pattern the preceding or following
+ character normally shows which is wanted, without the need for the
+ assertions that are used above in order to give exactly the POSIX be-
haviour.
VERTICAL BAR
- Vertical bar characters are used to separate alternative patterns. For
+ Vertical bar characters are used to separate alternative patterns. For
example, the pattern
gilbert|sullivan
- matches either "gilbert" or "sullivan". Any number of alternatives may
- appear, and an empty alternative is permitted (matching the empty
+ matches either "gilbert" or "sullivan". Any number of alternatives may
+ appear, and an empty alternative is permitted (matching the empty
string). The matching process tries each alternative in turn, from left
- to right, and the first one that succeeds is used. If the alternatives
- are within a subpattern (defined below), "succeeds" means matching the
+ to right, and the first one that succeeds is used. If the alternatives
+ are within a subpattern (defined below), "succeeds" means matching the
rest of the main pattern as well as the alternative in the subpattern.
INTERNAL OPTION SETTING
- The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
- PCRE_EXTENDED options (which are Perl-compatible) can be changed from
- within the pattern by a sequence of Perl option letters enclosed
+ The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
+ PCRE_EXTENDED options (which are Perl-compatible) can be changed from
+ within the pattern by a sequence of Perl option letters enclosed
between "(?" and ")". The option letters are
i for PCRE_CASELESS
@@ -5966,51 +5990,51 @@ INTERNAL OPTION SETTING
For example, (?im) sets caseless, multiline matching. It is also possi-
ble to unset these options by preceding the letter with a hyphen, and a
- combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
- LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
- is also permitted. If a letter appears both before and after the
+ combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
+ LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
+ is also permitted. If a letter appears both before and after the
hyphen, the option is unset.
- The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
- can be changed in the same way as the Perl-compatible options by using
+ The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA
+ can be changed in the same way as the Perl-compatible options by using
the characters J, U and X respectively.
- When one of these option changes occurs at top level (that is, not
- inside subpattern parentheses), the change applies to the remainder of
+ When one of these option changes occurs at top level (that is, not
+ inside subpattern parentheses), the change applies to the remainder of
the pattern that follows. If the change is placed right at the start of
a pattern, PCRE extracts it into the global options (and it will there-
fore show up in data extracted by the pcre_fullinfo() function).
- An option change within a subpattern (see below for a description of
- subpatterns) affects only that part of the subpattern that follows it,
+ An option change within a subpattern (see below for a description of
+ subpatterns) affects only that part of the subpattern that follows it,
so
(a(?i)b)c
matches abc and aBc and no other strings (assuming PCRE_CASELESS is not
- used). By this means, options can be made to have different settings
- in different parts of the pattern. Any changes made in one alternative
- do carry on into subsequent branches within the same subpattern. For
+ used). By this means, options can be made to have different settings
+ in different parts of the pattern. Any changes made in one alternative
+ do carry on into subsequent branches within the same subpattern. For
example,
(a(?i)b|c)
- matches "ab", "aB", "c", and "C", even though when matching "C" the
- first branch is abandoned before the option setting. This is because
- the effects of option settings happen at compile time. There would be
+ matches "ab", "aB", "c", and "C", even though when matching "C" the
+ first branch is abandoned before the option setting. This is because
+ the effects of option settings happen at compile time. There would be
some very weird behaviour otherwise.
- Note: There are other PCRE-specific options that can be set by the
- application when the compiling or matching functions are called. In
- some cases the pattern can contain special leading sequences such as
- (*CRLF) to override what the application has set or what has been
- defaulted. Details are given in the section entitled "Newline
- sequences" above. There are also the (*UTF8), (*UTF16),(*UTF32), and
- (*UCP) leading sequences that can be used to set UTF and Unicode prop-
- erty modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16,
- PCRE_UTF32 and the PCRE_UCP options, respectively. The (*UTF) sequence
- is a generic version that can be used with any of the libraries. How-
- ever, the application can set the PCRE_NEVER_UTF option, which locks
+ Note: There are other PCRE-specific options that can be set by the
+ application when the compiling or matching functions are called. In
+ some cases the pattern can contain special leading sequences such as
+ (*CRLF) to override what the application has set or what has been
+ defaulted. Details are given in the section entitled "Newline
+ sequences" above. There are also the (*UTF8), (*UTF16),(*UTF32), and
+ (*UCP) leading sequences that can be used to set UTF and Unicode prop-
+ erty modes; they are equivalent to setting the PCRE_UTF8, PCRE_UTF16,
+ PCRE_UTF32 and the PCRE_UCP options, respectively. The (*UTF) sequence
+ is a generic version that can be used with any of the libraries. How-
+ ever, the application can set the PCRE_NEVER_UTF option, which locks
out the use of the (*UTF) sequences.
@@ -6023,18 +6047,18 @@ SUBPATTERNS
cat(aract|erpillar|)
- matches "cataract", "caterpillar", or "cat". Without the parentheses,
+ matches "cataract", "caterpillar", or "cat". Without the parentheses,
it would match "cataract", "erpillar" or an empty string.
- 2. It sets up the subpattern as a capturing subpattern. This means
- that, when the whole pattern matches, that portion of the subject
+ 2. It sets up the subpattern as a capturing subpattern. This means
+ that, when the whole pattern matches, that portion of the subject
string that matched the subpattern is passed back to the caller via the
- ovector argument of the matching function. (This applies only to the
- traditional matching functions; the DFA matching functions do not sup-
+ ovector argument of the matching function. (This applies only to the
+ traditional matching functions; the DFA matching functions do not sup-
port capturing.)
Opening parentheses are counted from left to right (starting from 1) to
- obtain numbers for the capturing subpatterns. For example, if the
+ obtain numbers for the capturing subpatterns. For example, if the
string "the red king" is matched against the pattern
the ((red|white) (king|queen))
@@ -6042,12 +6066,12 @@ SUBPATTERNS
the captured substrings are "red king", "red", and "king", and are num-
bered 1, 2, and 3, respectively.
- The fact that plain parentheses fulfil two functions is not always
- helpful. There are often times when a grouping subpattern is required
- without a capturing requirement. If an opening parenthesis is followed
- by a question mark and a colon, the subpattern does not do any captur-
- ing, and is not counted when computing the number of any subsequent
- capturing subpatterns. For example, if the string "the white queen" is
+ The fact that plain parentheses fulfil two functions is not always
+ helpful. There are often times when a grouping subpattern is required
+ without a capturing requirement. If an opening parenthesis is followed
+ by a question mark and a colon, the subpattern does not do any captur-
+ ing, and is not counted when computing the number of any subsequent
+ capturing subpatterns. For example, if the string "the white queen" is
matched against the pattern
the ((?:red|white) (king|queen))
@@ -6055,37 +6079,37 @@ SUBPATTERNS
the captured substrings are "white queen" and "queen", and are numbered
1 and 2. The maximum number of capturing subpatterns is 65535.
- As a convenient shorthand, if any option settings are required at the
- start of a non-capturing subpattern, the option letters may appear
+ As a convenient shorthand, if any option settings are required at the
+ start of a non-capturing subpattern, the option letters may appear
between the "?" and the ":". Thus the two patterns
(?i:saturday|sunday)
(?:(?i)saturday|sunday)
match exactly the same set of strings. Because alternative branches are
- tried from left to right, and options are not reset until the end of
- the subpattern is reached, an option setting in one branch does affect
- subsequent branches, so the above patterns match "SUNDAY" as well as
+ tried from left to right, and options are not reset until the end of
+ the subpattern is reached, an option setting in one branch does affect
+ subsequent branches, so the above patterns match "SUNDAY" as well as
"Saturday".
DUPLICATE SUBPATTERN NUMBERS
Perl 5.10 introduced a feature whereby each alternative in a subpattern
- uses the same numbers for its capturing parentheses. Such a subpattern
- starts with (?| and is itself a non-capturing subpattern. For example,
+ uses the same numbers for its capturing parentheses. Such a subpattern
+ starts with (?| and is itself a non-capturing subpattern. For example,
consider this pattern:
(?|(Sat)ur|(Sun))day
- Because the two alternatives are inside a (?| group, both sets of cap-
- turing parentheses are numbered one. Thus, when the pattern matches,
- you can look at captured substring number one, whichever alternative
- matched. This construct is useful when you want to capture part, but
+ Because the two alternatives are inside a (?| group, both sets of cap-
+ turing parentheses are numbered one. Thus, when the pattern matches,
+ you can look at captured substring number one, whichever alternative
+ matched. This construct is useful when you want to capture part, but
not all, of one of a number of alternatives. Inside a (?| group, paren-
- theses are numbered as usual, but the number is reset at the start of
- each branch. The numbers of any capturing parentheses that follow the
- subpattern start after the highest number used in any branch. The fol-
+ theses are numbered as usual, but the number is reset at the start of
+ each branch. The numbers of any capturing parentheses that follow the
+ subpattern start after the highest number used in any branch. The fol-
lowing example is taken from the Perl documentation. The numbers under-
neath show in which buffer the captured content will be stored.
@@ -6093,58 +6117,58 @@ DUPLICATE SUBPATTERN NUMBERS
/ ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x
# 1 2 2 3 2 3 4
- A back reference to a numbered subpattern uses the most recent value
- that is set for that number by any subpattern. The following pattern
+ A back reference to a numbered subpattern uses the most recent value
+ that is set for that number by any subpattern. The following pattern
matches "abcabc" or "defdef":
/(?|(abc)|(def))\1/
- In contrast, a subroutine call to a numbered subpattern always refers
- to the first one in the pattern with the given number. The following
+ In contrast, a subroutine call to a numbered subpattern always refers
+ to the first one in the pattern with the given number. The following
pattern matches "abcabc" or "defabc":
/(?|(abc)|(def))(?1)/
- If a condition test for a subpattern's having matched refers to a non-
- unique number, the test is true if any of the subpatterns of that num-
+ If a condition test for a subpattern's having matched refers to a non-
+ unique number, the test is true if any of the subpatterns of that num-
ber have matched.
- An alternative approach to using this "branch reset" feature is to use
+ An alternative approach to using this "branch reset" feature is to use
duplicate named subpatterns, as described in the next section.
NAMED SUBPATTERNS
- Identifying capturing parentheses by number is simple, but it can be
- very hard to keep track of the numbers in complicated regular expres-
- sions. Furthermore, if an expression is modified, the numbers may
- change. To help with this difficulty, PCRE supports the naming of sub-
+ Identifying capturing parentheses by number is simple, but it can be
+ very hard to keep track of the numbers in complicated regular expres-
+ sions. Furthermore, if an expression is modified, the numbers may
+ change. To help with this difficulty, PCRE supports the naming of sub-
patterns. This feature was not added to Perl until release 5.10. Python
- had the feature earlier, and PCRE introduced it at release 4.0, using
- the Python syntax. PCRE now supports both the Perl and the Python syn-
- tax. Perl allows identically numbered subpatterns to have different
+ had the feature earlier, and PCRE introduced it at release 4.0, using
+ the Python syntax. PCRE now supports both the Perl and the Python syn-
+ tax. Perl allows identically numbered subpatterns to have different
names, but PCRE does not.
- In PCRE, a subpattern can be named in one of three ways: (?<name>...)
- or (?'name'...) as in Perl, or (?P<name>...) as in Python. References
- to capturing parentheses from other parts of the pattern, such as back
- references, recursion, and conditions, can be made by name as well as
+ In PCRE, a subpattern can be named in one of three ways: (?<name>...)
+ or (?'name'...) as in Perl, or (?P<name>...) as in Python. References
+ to capturing parentheses from other parts of the pattern, such as back
+ references, recursion, and conditions, can be made by name as well as
by number.
- Names consist of up to 32 alphanumeric characters and underscores, but
- must start with a non-digit. Named capturing parentheses are still
- allocated numbers as well as names, exactly as if the names were not
- present. The PCRE API provides function calls for extracting the name-
- to-number translation table from a compiled pattern. There is also a
+ Names consist of up to 32 alphanumeric characters and underscores, but
+ must start with a non-digit. Named capturing parentheses are still
+ allocated numbers as well as names, exactly as if the names were not
+ present. The PCRE API provides function calls for extracting the name-
+ to-number translation table from a compiled pattern. There is also a
convenience function for extracting a captured substring by name.
- By default, a name must be unique within a pattern, but it is possible
+ By default, a name must be unique within a pattern, but it is possible
to relax this constraint by setting the PCRE_DUPNAMES option at compile
- time. (Duplicate names are also always permitted for subpatterns with
- the same number, set up as described in the previous section.) Dupli-
- cate names can be useful for patterns where only one instance of the
- named parentheses can match. Suppose you want to match the name of a
- weekday, either as a 3-letter abbreviation or as the full name, and in
+ time. (Duplicate names are also always permitted for subpatterns with
+ the same number, set up as described in the previous section.) Dupli-
+ cate names can be useful for patterns where only one instance of the
+ named parentheses can match. Suppose you want to match the name of a
+ weekday, either as a 3-letter abbreviation or as the full name, and in
both cases you want to extract the abbreviation. This pattern (ignoring
the line breaks) does the job:
@@ -6154,18 +6178,18 @@ NAMED SUBPATTERNS
(?<DN>Thu)(?:rsday)?|
(?<DN>Sat)(?:urday)?
- There are five capturing substrings, but only one is ever set after a
+ There are five capturing substrings, but only one is ever set after a
match. (An alternative way of solving this problem is to use a "branch
reset" subpattern, as described in the previous section.)
- The convenience function for extracting the data by name returns the
- substring for the first (and in this example, the only) subpattern of
- that name that matched. This saves searching to find which numbered
+ The convenience function for extracting the data by name returns the
+ substring for the first (and in this example, the only) subpattern of
+ that name that matched. This saves searching to find which numbered
subpattern it was.
- If you make a back reference to a non-unique named subpattern from
- elsewhere in the pattern, the subpatterns to which the name refers are
- checked in the order in which they appear in the overall pattern. The
+ If you make a back reference to a non-unique named subpattern from
+ elsewhere in the pattern, the subpatterns to which the name refers are
+ checked in the order in which they appear in the overall pattern. The
first one that is set is used for the reference. For example, this pat-
tern matches both "foofoo" and "barbar" but not "foobar" or "barfoo":
@@ -6173,29 +6197,29 @@ NAMED SUBPATTERNS
If you make a subroutine call to a non-unique named subpattern, the one
- that corresponds to the first occurrence of the name is used. In the
+ that corresponds to the first occurrence of the name is used. In the
absence of duplicate numbers (see the previous section) this is the one
with the lowest number.
If you use a named reference in a condition test (see the section about
conditions below), either to check whether a subpattern has matched, or
- to check for recursion, all subpatterns with the same name are tested.
- If the condition is true for any one of them, the overall condition is
- true. This is the same behaviour as testing by number. For further
- details of the interfaces for handling named subpatterns, see the
+ to check for recursion, all subpatterns with the same name are tested.
+ If the condition is true for any one of them, the overall condition is
+ true. This is the same behaviour as testing by number. For further
+ details of the interfaces for handling named subpatterns, see the
pcreapi documentation.
Warning: You cannot use different names to distinguish between two sub-
- patterns with the same number because PCRE uses only the numbers when
+ patterns with the same number because PCRE uses only the numbers when
matching. For this reason, an error is given at compile time if differ-
- ent names are given to subpatterns with the same number. However, you
+ ent names are given to subpatterns with the same number. However, you
can always give the same name to subpatterns with the same number, even
when PCRE_DUPNAMES is not set.
REPETITION
- Repetition is specified by quantifiers, which can follow any of the
+ Repetition is specified by quantifiers, which can follow any of the
following items:
a literal data character
@@ -6209,17 +6233,17 @@ REPETITION
a parenthesized subpattern (including assertions)
a subroutine call to a subpattern (recursive or otherwise)
- The general repetition quantifier specifies a minimum and maximum num-
- ber of permitted matches, by giving the two numbers in curly brackets
- (braces), separated by a comma. The numbers must be less than 65536,
+ The general repetition quantifier specifies a minimum and maximum num-
+ ber of permitted matches, by giving the two numbers in curly brackets
+ (braces), separated by a comma. The numbers must be less than 65536,
and the first must be less than or equal to the second. For example:
z{2,4}
- matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
- special character. If the second number is omitted, but the comma is
- present, there is no upper limit; if the second number and the comma
- are both omitted, the quantifier specifies an exact number of required
+ matches "zz", "zzz", or "zzzz". A closing brace on its own is not a
+ special character. If the second number is omitted, but the comma is
+ present, there is no upper limit; if the second number and the comma
+ are both omitted, the quantifier specifies an exact number of required
matches. Thus
[aeiou]{3,}
@@ -6228,50 +6252,50 @@ REPETITION
\d{8}
- matches exactly 8 digits. An opening curly bracket that appears in a
- position where a quantifier is not allowed, or one that does not match
- the syntax of a quantifier, is taken as a literal character. For exam-
+ matches exactly 8 digits. An opening curly bracket that appears in a
+ position where a quantifier is not allowed, or one that does not match
+ the syntax of a quantifier, is taken as a literal character. For exam-
ple, {,6} is not a quantifier, but a literal string of four characters.
In UTF modes, quantifiers apply to characters rather than to individual
- data units. Thus, for example, \x{100}{2} matches two characters, each
+ data units. Thus, for example, \x{100}{2} matches two characters, each
of which is represented by a two-byte sequence in a UTF-8 string. Simi-
- larly, \X{3} matches three Unicode extended grapheme clusters, each of
- which may be several data units long (and they may be of different
+ larly, \X{3} matches three Unicode extended grapheme clusters, each of
+ which may be several data units long (and they may be of different
lengths).
The quantifier {0} is permitted, causing the expression to behave as if
the previous item and the quantifier were not present. This may be use-
- ful for subpatterns that are referenced as subroutines from elsewhere
+ ful for subpatterns that are referenced as subroutines from elsewhere
in the pattern (but see also the section entitled "Defining subpatterns
- for use by reference only" below). Items other than subpatterns that
+ for use by reference only" below). Items other than subpatterns that
have a {0} quantifier are omitted from the compiled pattern.
- For convenience, the three most common quantifiers have single-charac-
+ For convenience, the three most common quantifiers have single-charac-
ter abbreviations:
* is equivalent to {0,}
+ is equivalent to {1,}
? is equivalent to {0,1}
- It is possible to construct infinite loops by following a subpattern
+ It is possible to construct infinite loops by following a subpattern
that can match no characters with a quantifier that has no upper limit,
for example:
(a?)*
Earlier versions of Perl and PCRE used to give an error at compile time
- for such patterns. However, because there are cases where this can be
- useful, such patterns are now accepted, but if any repetition of the
- subpattern does in fact match no characters, the loop is forcibly bro-
+ for such patterns. However, because there are cases where this can be
+ useful, such patterns are now accepted, but if any repetition of the
+ subpattern does in fact match no characters, the loop is forcibly bro-
ken.
- By default, the quantifiers are "greedy", that is, they match as much
- as possible (up to the maximum number of permitted times), without
- causing the rest of the pattern to fail. The classic example of where
+ By default, the quantifiers are "greedy", that is, they match as much
+ as possible (up to the maximum number of permitted times), without
+ causing the rest of the pattern to fail. The classic example of where
this gives problems is in trying to match comments in C programs. These
- appear between /* and */ and within the comment, individual * and /
- characters may appear. An attempt to match C comments by applying the
+ appear between /* and */ and within the comment, individual * and /
+ characters may appear. An attempt to match C comments by applying the
pattern
/\*.*\*/
@@ -6280,19 +6304,19 @@ REPETITION
/* first comment */ not comment /* second comment */
- fails, because it matches the entire string owing to the greediness of
+ fails, because it matches the entire string owing to the greediness of
the .* item.
- However, if a quantifier is followed by a question mark, it ceases to
+ However, if a quantifier is followed by a question mark, it ceases to
be greedy, and instead matches the minimum number of times possible, so
the pattern
/\*.*?\*/
- does the right thing with the C comments. The meaning of the various
- quantifiers is not otherwise changed, just the preferred number of
- matches. Do not confuse this use of question mark with its use as a
- quantifier in its own right. Because it has two uses, it can sometimes
+ does the right thing with the C comments. The meaning of the various
+ quantifiers is not otherwise changed, just the preferred number of
+ matches. Do not confuse this use of question mark with its use as a
+ quantifier in its own right. Because it has two uses, it can sometimes
appear doubled, as in
\d??\d
@@ -6300,45 +6324,45 @@ REPETITION
which matches one digit by preference, but can match two if that is the
only way the rest of the pattern matches.
- If the PCRE_UNGREEDY option is set (an option that is not available in
- Perl), the quantifiers are not greedy by default, but individual ones
- can be made greedy by following them with a question mark. In other
+ If the PCRE_UNGREEDY option is set (an option that is not available in
+ Perl), the quantifiers are not greedy by default, but individual ones
+ can be made greedy by following them with a question mark. In other
words, it inverts the default behaviour.
- When a parenthesized subpattern is quantified with a minimum repeat
- count that is greater than 1 or with a limited maximum, more memory is
- required for the compiled pattern, in proportion to the size of the
+ When a parenthesized subpattern is quantified with a minimum repeat
+ count that is greater than 1 or with a limited maximum, more memory is
+ required for the compiled pattern, in proportion to the size of the
minimum or maximum.
If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equiv-
- alent to Perl's /s) is set, thus allowing the dot to match newlines,
- the pattern is implicitly anchored, because whatever follows will be
- tried against every character position in the subject string, so there
- is no point in retrying the overall match at any position after the
- first. PCRE normally treats such a pattern as though it were preceded
+ alent to Perl's /s) is set, thus allowing the dot to match newlines,
+ the pattern is implicitly anchored, because whatever follows will be
+ tried against every character position in the subject string, so there
+ is no point in retrying the overall match at any position after the
+ first. PCRE normally treats such a pattern as though it were preceded
by \A.
- In cases where it is known that the subject string contains no new-
- lines, it is worth setting PCRE_DOTALL in order to obtain this opti-
+ In cases where it is known that the subject string contains no new-
+ lines, it is worth setting PCRE_DOTALL in order to obtain this opti-
mization, or alternatively using ^ to indicate anchoring explicitly.
- However, there are some cases where the optimization cannot be used.
+ However, there are some cases where the optimization cannot be used.
When .* is inside capturing parentheses that are the subject of a back
reference elsewhere in the pattern, a match at the start may fail where
a later one succeeds. Consider, for example:
(.*)abc\1
- If the subject is "xyz123abc123" the match point is the fourth charac-
+ If the subject is "xyz123abc123" the match point is the fourth charac-
ter. For this reason, such a pattern is not implicitly anchored.
- Another case where implicit anchoring is not applied is when the lead-
- ing .* is inside an atomic group. Once again, a match at the start may
+ Another case where implicit anchoring is not applied is when the lead-
+ ing .* is inside an atomic group. Once again, a match at the start may
fail where a later one succeeds. Consider this pattern:
(?>.*?a)b
- It matches "ab" in the subject "aab". The use of the backtracking con-
+ It matches "ab" in the subject "aab". The use of the backtracking con-
trol verbs (*PRUNE) and (*SKIP) also disable this optimization.
When a capturing subpattern is repeated, the value captured is the sub-
@@ -6347,8 +6371,8 @@ REPETITION
(tweedle[dume]{3}\s*)+
has matched "tweedledum tweedledee" the value of the captured substring
- is "tweedledee". However, if there are nested capturing subpatterns,
- the corresponding captured values may have been set in previous itera-
+ is "tweedledee". However, if there are nested capturing subpatterns,
+ the corresponding captured values may have been set in previous itera-
tions. For example, after
/(a|(b))+/
@@ -6358,53 +6382,53 @@ REPETITION
ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS
- With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
- repetition, failure of what follows normally causes the repeated item
- to be re-evaluated to see if a different number of repeats allows the
- rest of the pattern to match. Sometimes it is useful to prevent this,
- either to change the nature of the match, or to cause it fail earlier
- than it otherwise might, when the author of the pattern knows there is
+ With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy")
+ repetition, failure of what follows normally causes the repeated item
+ to be re-evaluated to see if a different number of repeats allows the
+ rest of the pattern to match. Sometimes it is useful to prevent this,
+ either to change the nature of the match, or to cause it fail earlier
+ than it otherwise might, when the author of the pattern knows there is
no point in carrying on.
- Consider, for example, the pattern \d+foo when applied to the subject
+ Consider, for example, the pattern \d+foo when applied to the subject
line
123456bar
After matching all 6 digits and then failing to match "foo", the normal
- action of the matcher is to try again with only 5 digits matching the
- \d+ item, and then with 4, and so on, before ultimately failing.
- "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides
- the means for specifying that once a subpattern has matched, it is not
+ action of the matcher is to try again with only 5 digits matching the
+ \d+ item, and then with 4, and so on, before ultimately failing.
+ "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides
+ the means for specifying that once a subpattern has matched, it is not
to be re-evaluated in this way.
- If we use atomic grouping for the previous example, the matcher gives
- up immediately on failing to match "foo" the first time. The notation
+ If we use atomic grouping for the previous example, the matcher gives
+ up immediately on failing to match "foo" the first time. The notation
is a kind of special parenthesis, starting with (?> as in this example:
(?>\d+)foo
- This kind of parenthesis "locks up" the part of the pattern it con-
- tains once it has matched, and a failure further into the pattern is
- prevented from backtracking into it. Backtracking past it to previous
+ This kind of parenthesis "locks up" the part of the pattern it con-
+ tains once it has matched, and a failure further into the pattern is
+ prevented from backtracking into it. Backtracking past it to previous
items, however, works as normal.
- An alternative description is that a subpattern of this type matches
- the string of characters that an identical standalone pattern would
+ An alternative description is that a subpattern of this type matches
+ the string of characters that an identical standalone pattern would
match, if anchored at the current point in the subject string.
Atomic grouping subpatterns are not capturing subpatterns. Simple cases
such as the above example can be thought of as a maximizing repeat that
- must swallow everything it can. So, while both \d+ and \d+? are pre-
- pared to adjust the number of digits they match in order to make the
+ must swallow everything it can. So, while both \d+ and \d+? are pre-
+ pared to adjust the number of digits they match in order to make the
rest of the pattern match, (?>\d+) can only match an entire sequence of
digits.
- Atomic groups in general can of course contain arbitrarily complicated
- subpatterns, and can be nested. However, when the subpattern for an
+ Atomic groups in general can of course contain arbitrarily complicated
+ subpatterns, and can be nested. However, when the subpattern for an
atomic group is just a single repeated item, as in the example above, a
- simpler notation, called a "possessive quantifier" can be used. This
- consists of an additional + character following a quantifier. Using
+ simpler notation, called a "possessive quantifier" can be used. This
+ consists of an additional + character following a quantifier. Using
this notation, the previous example can be rewritten as
\d++foo
@@ -6414,45 +6438,45 @@ ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS
(abc|xyz){2,3}+
- Possessive quantifiers are always greedy; the setting of the
+ Possessive quantifiers are always greedy; the setting of the
PCRE_UNGREEDY option is ignored. They are a convenient notation for the
- simpler forms of atomic group. However, there is no difference in the
- meaning of a possessive quantifier and the equivalent atomic group,
- though there may be a performance difference; possessive quantifiers
+ simpler forms of atomic group. However, there is no difference in the
+ meaning of a possessive quantifier and the equivalent atomic group,
+ though there may be a performance difference; possessive quantifiers
should be slightly faster.
- The possessive quantifier syntax is an extension to the Perl 5.8 syn-
- tax. Jeffrey Friedl originated the idea (and the name) in the first
+ The possessive quantifier syntax is an extension to the Perl 5.8 syn-
+ tax. Jeffrey Friedl originated the idea (and the name) in the first
edition of his book. Mike McCloskey liked it, so implemented it when he
- built Sun's Java package, and PCRE copied it from there. It ultimately
+ built Sun's Java package, and PCRE copied it from there. It ultimately
found its way into Perl at release 5.10.
PCRE has an optimization that automatically "possessifies" certain sim-
- ple pattern constructs. For example, the sequence A+B is treated as
- A++B because there is no point in backtracking into a sequence of A's
+ ple pattern constructs. For example, the sequence A+B is treated as
+ A++B because there is no point in backtracking into a sequence of A's
when B must follow.
- When a pattern contains an unlimited repeat inside a subpattern that
- can itself be repeated an unlimited number of times, the use of an
- atomic group is the only way to avoid some failing matches taking a
+ When a pattern contains an unlimited repeat inside a subpattern that
+ can itself be repeated an unlimited number of times, the use of an
+ atomic group is the only way to avoid some failing matches taking a
very long time indeed. The pattern
(\D+|<\d+>)*[!?]
- matches an unlimited number of substrings that either consist of non-
- digits, or digits enclosed in <>, followed by either ! or ?. When it
+ matches an unlimited number of substrings that either consist of non-
+ digits, or digits enclosed in <>, followed by either ! or ?. When it
matches, it runs quickly. However, if it is applied to
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- it takes a long time before reporting failure. This is because the
- string can be divided between the internal \D+ repeat and the external
- * repeat in a large number of ways, and all have to be tried. (The
- example uses [!?] rather than a single character at the end, because
- both PCRE and Perl have an optimization that allows for fast failure
- when a single character is used. They remember the last single charac-
- ter that is required for a match, and fail early if it is not present
- in the string.) If the pattern is changed so that it uses an atomic
+ it takes a long time before reporting failure. This is because the
+ string can be divided between the internal \D+ repeat and the external
+ * repeat in a large number of ways, and all have to be tried. (The
+ example uses [!?] rather than a single character at the end, because
+ both PCRE and Perl have an optimization that allows for fast failure
+ when a single character is used. They remember the last single charac-
+ ter that is required for a match, and fail early if it is not present
+ in the string.) If the pattern is changed so that it uses an atomic
group, like this:
((?>\D+)|<\d+>)*[!?]
@@ -6464,28 +6488,28 @@ BACK REFERENCES
Outside a character class, a backslash followed by a digit greater than
0 (and possibly further digits) is a back reference to a capturing sub-
- pattern earlier (that is, to its left) in the pattern, provided there
+ pattern earlier (that is, to its left) in the pattern, provided there
have been that many previous capturing left parentheses.
However, if the decimal number following the backslash is less than 10,
- it is always taken as a back reference, and causes an error only if
- there are not that many capturing left parentheses in the entire pat-
- tern. In other words, the parentheses that are referenced need not be
- to the left of the reference for numbers less than 10. A "forward back
- reference" of this type can make sense when a repetition is involved
- and the subpattern to the right has participated in an earlier itera-
+ it is always taken as a back reference, and causes an error only if
+ there are not that many capturing left parentheses in the entire pat-
+ tern. In other words, the parentheses that are referenced need not be
+ to the left of the reference for numbers less than 10. A "forward back
+ reference" of this type can make sense when a repetition is involved
+ and the subpattern to the right has participated in an earlier itera-
tion.
- It is not possible to have a numerical "forward back reference" to a
- subpattern whose number is 10 or more using this syntax because a
- sequence such as \50 is interpreted as a character defined in octal.
+ It is not possible to have a numerical "forward back reference" to a
+ subpattern whose number is 10 or more using this syntax because a
+ sequence such as \50 is interpreted as a character defined in octal.
See the subsection entitled "Non-printing characters" above for further
- details of the handling of digits following a backslash. There is no
- such problem when named parentheses are used. A back reference to any
+ details of the handling of digits following a backslash. There is no
+ such problem when named parentheses are used. A back reference to any
subpattern is possible using named parentheses (see below).
- Another way of avoiding the ambiguity inherent in the use of digits
- following a backslash is to use the \g escape sequence. This escape
+ Another way of avoiding the ambiguity inherent in the use of digits
+ following a backslash is to use the \g escape sequence. This escape
must be followed by an unsigned number or a negative number, optionally
enclosed in braces. These examples are all identical:
@@ -6493,7 +6517,7 @@ BACK REFERENCES
(ring), \g1
(ring), \g{1}
- An unsigned number specifies an absolute reference without the ambigu-
+ An unsigned number specifies an absolute reference without the ambigu-
ity that is present in the older syntax. It is also useful when literal
digits follow the reference. A negative number is a relative reference.
Consider this example:
@@ -6502,33 +6526,33 @@ BACK REFERENCES
The sequence \g{-1} is a reference to the most recently started captur-
ing subpattern before \g, that is, is it equivalent to \2 in this exam-
- ple. Similarly, \g{-2} would be equivalent to \1. The use of relative
- references can be helpful in long patterns, and also in patterns that
- are created by joining together fragments that contain references
+ ple. Similarly, \g{-2} would be equivalent to \1. The use of relative
+ references can be helpful in long patterns, and also in patterns that
+ are created by joining together fragments that contain references
within themselves.
- A back reference matches whatever actually matched the capturing sub-
- pattern in the current subject string, rather than anything matching
+ A back reference matches whatever actually matched the capturing sub-
+ pattern in the current subject string, rather than anything matching
the subpattern itself (see "Subpatterns as subroutines" below for a way
of doing that). So the pattern
(sens|respons)e and \1ibility
- matches "sense and sensibility" and "response and responsibility", but
- not "sense and responsibility". If caseful matching is in force at the
- time of the back reference, the case of letters is relevant. For exam-
+ matches "sense and sensibility" and "response and responsibility", but
+ not "sense and responsibility". If caseful matching is in force at the
+ time of the back reference, the case of letters is relevant. For exam-
ple,
((?i)rah)\s+\1
- matches "rah rah" and "RAH RAH", but not "RAH rah", even though the
+ matches "rah rah" and "RAH RAH", but not "RAH rah", even though the
original capturing subpattern is matched caselessly.
- There are several different ways of writing back references to named
- subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or
- \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's
+ There are several different ways of writing back references to named
+ subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or
+ \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's
unified back reference syntax, in which \g can be used for both numeric
- and named references, is also supported. We could rewrite the above
+ and named references, is also supported. We could rewrite the above
example in any of the following ways:
(?<p1>(?i)rah)\s+\k<p1>
@@ -6536,84 +6560,84 @@ BACK REFERENCES
(?P<p1>(?i)rah)\s+(?P=p1)
(?<p1>(?i)rah)\s+\g{p1}
- A subpattern that is referenced by name may appear in the pattern
+ A subpattern that is referenced by name may appear in the pattern
before or after the reference.
- There may be more than one back reference to the same subpattern. If a
- subpattern has not actually been used in a particular match, any back
+ There may be more than one back reference to the same subpattern. If a
+ subpattern has not actually been used in a particular match, any back
references to it always fail by default. For example, the pattern
(a|(bc))\2
- always fails if it starts to match "a" rather than "bc". However, if
+ always fails if it starts to match "a" rather than "bc". However, if
the PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back refer-
ence to an unset value matches an empty string.
- Because there may be many capturing parentheses in a pattern, all dig-
- its following a backslash are taken as part of a potential back refer-
- ence number. If the pattern continues with a digit character, some
- delimiter must be used to terminate the back reference. If the
- PCRE_EXTENDED option is set, this can be white space. Otherwise, the
+ Because there may be many capturing parentheses in a pattern, all dig-
+ its following a backslash are taken as part of a potential back refer-
+ ence number. If the pattern continues with a digit character, some
+ delimiter must be used to terminate the back reference. If the
+ PCRE_EXTENDED option is set, this can be white space. Otherwise, the
\g{ syntax or an empty comment (see "Comments" below) can be used.
Recursive back references
- A back reference that occurs inside the parentheses to which it refers
- fails when the subpattern is first used, so, for example, (a\1) never
- matches. However, such references can be useful inside repeated sub-
+ A back reference that occurs inside the parentheses to which it refers
+ fails when the subpattern is first used, so, for example, (a\1) never
+ matches. However, such references can be useful inside repeated sub-
patterns. For example, the pattern
(a|b\1)+
matches any number of "a"s and also "aba", "ababbaa" etc. At each iter-
- ation of the subpattern, the back reference matches the character
- string corresponding to the previous iteration. In order for this to
- work, the pattern must be such that the first iteration does not need
- to match the back reference. This can be done using alternation, as in
+ ation of the subpattern, the back reference matches the character
+ string corresponding to the previous iteration. In order for this to
+ work, the pattern must be such that the first iteration does not need
+ to match the back reference. This can be done using alternation, as in
the example above, or by a quantifier with a minimum of zero.
- Back references of this type cause the group that they reference to be
- treated as an atomic group. Once the whole group has been matched, a
- subsequent matching failure cannot cause backtracking into the middle
+ Back references of this type cause the group that they reference to be
+ treated as an atomic group. Once the whole group has been matched, a
+ subsequent matching failure cannot cause backtracking into the middle
of the group.
ASSERTIONS
- An assertion is a test on the characters following or preceding the
- current matching point that does not actually consume any characters.
- The simple assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are
+ An assertion is a test on the characters following or preceding the
+ current matching point that does not actually consume any characters.
+ The simple assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are
described above.
- More complicated assertions are coded as subpatterns. There are two
- kinds: those that look ahead of the current position in the subject
- string, and those that look behind it. An assertion subpattern is
- matched in the normal way, except that it does not cause the current
+ More complicated assertions are coded as subpatterns. There are two
+ kinds: those that look ahead of the current position in the subject
+ string, and those that look behind it. An assertion subpattern is
+ matched in the normal way, except that it does not cause the current
matching position to be changed.
- Assertion subpatterns are not capturing subpatterns. If such an asser-
- tion contains capturing subpatterns within it, these are counted for
- the purposes of numbering the capturing subpatterns in the whole pat-
- tern. However, substring capturing is carried out only for positive
+ Assertion subpatterns are not capturing subpatterns. If such an asser-
+ tion contains capturing subpatterns within it, these are counted for
+ the purposes of numbering the capturing subpatterns in the whole pat-
+ tern. However, substring capturing is carried out only for positive
assertions. (Perl sometimes, but not always, does do capturing in nega-
tive assertions.)
- For compatibility with Perl, assertion subpatterns may be repeated;
- though it makes no sense to assert the same thing several times, the
- side effect of capturing parentheses may occasionally be useful. In
+ For compatibility with Perl, assertion subpatterns may be repeated;
+ though it makes no sense to assert the same thing several times, the
+ side effect of capturing parentheses may occasionally be useful. In
practice, there only three cases:
- (1) If the quantifier is {0}, the assertion is never obeyed during
- matching. However, it may contain internal capturing parenthesized
+ (1) If the quantifier is {0}, the assertion is never obeyed during
+ matching. However, it may contain internal capturing parenthesized
groups that are called from elsewhere via the subroutine mechanism.
- (2) If quantifier is {0,n} where n is greater than zero, it is treated
- as if it were {0,1}. At run time, the rest of the pattern match is
+ (2) If quantifier is {0,n} where n is greater than zero, it is treated
+ as if it were {0,1}. At run time, the rest of the pattern match is
tried with and without the assertion, the order depending on the greed-
iness of the quantifier.
- (3) If the minimum repetition is greater than zero, the quantifier is
- ignored. The assertion is obeyed just once when encountered during
+ (3) If the minimum repetition is greater than zero, the quantifier is
+ ignored. The assertion is obeyed just once when encountered during
matching.
Lookahead assertions
@@ -6623,38 +6647,38 @@ ASSERTIONS
\w+(?=;)
- matches a word followed by a semicolon, but does not include the semi-
+ matches a word followed by a semicolon, but does not include the semi-
colon in the match, and
foo(?!bar)
- matches any occurrence of "foo" that is not followed by "bar". Note
+ matches any occurrence of "foo" that is not followed by "bar". Note
that the apparently similar pattern
(?!foo)bar
- does not find an occurrence of "bar" that is preceded by something
- other than "foo"; it finds any occurrence of "bar" whatsoever, because
+ does not find an occurrence of "bar" that is preceded by something
+ other than "foo"; it finds any occurrence of "bar" whatsoever, because
the assertion (?!foo) is always true when the next three characters are
"bar". A lookbehind assertion is needed to achieve the other effect.
If you want to force a matching failure at some point in a pattern, the
- most convenient way to do it is with (?!) because an empty string
- always matches, so an assertion that requires there not to be an empty
+ most convenient way to do it is with (?!) because an empty string
+ always matches, so an assertion that requires there not to be an empty
string must always fail. The backtracking control verb (*FAIL) or (*F)
is a synonym for (?!).
Lookbehind assertions
- Lookbehind assertions start with (?<= for positive assertions and (?<!
+ Lookbehind assertions start with (?<= for positive assertions and (?<!
for negative assertions. For example,
(?<!foo)bar
- does find an occurrence of "bar" that is not preceded by "foo". The
- contents of a lookbehind assertion are restricted such that all the
+ does find an occurrence of "bar" that is not preceded by "foo". The
+ contents of a lookbehind assertion are restricted such that all the
strings it matches must have a fixed length. However, if there are sev-
- eral top-level alternatives, they do not all have to have the same
+ eral top-level alternatives, they do not all have to have the same
fixed length. Thus
(?<=bullock|donkey)
@@ -6663,62 +6687,62 @@ ASSERTIONS
(?<!dogs?|cats?)
- causes an error at compile time. Branches that match different length
- strings are permitted only at the top level of a lookbehind assertion.
+ causes an error at compile time. Branches that match different length
+ strings are permitted only at the top level of a lookbehind assertion.
This is an extension compared with Perl, which requires all branches to
match the same length of string. An assertion such as
(?<=ab(c|de))
- is not permitted, because its single top-level branch can match two
+ is not permitted, because its single top-level branch can match two
different lengths, but it is acceptable to PCRE if rewritten to use two
top-level branches:
(?<=abc|abde)
- In some cases, the escape sequence \K (see above) can be used instead
+ In some cases, the escape sequence \K (see above) can be used instead
of a lookbehind assertion to get round the fixed-length restriction.
- The implementation of lookbehind assertions is, for each alternative,
- to temporarily move the current position back by the fixed length and
+ The implementation of lookbehind assertions is, for each alternative,
+ to temporarily move the current position back by the fixed length and
then try to match. If there are insufficient characters before the cur-
rent position, the assertion fails.
- In a UTF mode, PCRE does not allow the \C escape (which matches a sin-
- gle data unit even in a UTF mode) to appear in lookbehind assertions,
- because it makes it impossible to calculate the length of the lookbe-
- hind. The \X and \R escapes, which can match different numbers of data
+ In a UTF mode, PCRE does not allow the \C escape (which matches a sin-
+ gle data unit even in a UTF mode) to appear in lookbehind assertions,
+ because it makes it impossible to calculate the length of the lookbe-
+ hind. The \X and \R escapes, which can match different numbers of data
units, are also not permitted.
- "Subroutine" calls (see below) such as (?2) or (?&X) are permitted in
- lookbehinds, as long as the subpattern matches a fixed-length string.
+ "Subroutine" calls (see below) such as (?2) or (?&X) are permitted in
+ lookbehinds, as long as the subpattern matches a fixed-length string.
Recursion, however, is not supported.
- Possessive quantifiers can be used in conjunction with lookbehind
+ Possessive quantifiers can be used in conjunction with lookbehind
assertions to specify efficient matching of fixed-length strings at the
end of subject strings. Consider a simple pattern such as
abcd$
- when applied to a long string that does not match. Because matching
+ when applied to a long string that does not match. Because matching
proceeds from left to right, PCRE will look for each "a" in the subject
- and then see if what follows matches the rest of the pattern. If the
+ and then see if what follows matches the rest of the pattern. If the
pattern is specified as
^.*abcd$
- the initial .* matches the entire string at first, but when this fails
+ the initial .* matches the entire string at first, but when this fails
(because there is no following "a"), it backtracks to match all but the
- last character, then all but the last two characters, and so on. Once
- again the search for "a" covers the entire string, from right to left,
+ last character, then all but the last two characters, and so on. Once
+ again the search for "a" covers the entire string, from right to left,
so we are no better off. However, if the pattern is written as
^.*+(?<=abcd)
- there can be no backtracking for the .*+ item; it can match only the
- entire string. The subsequent lookbehind assertion does a single test
- on the last four characters. If it fails, the match fails immediately.
- For long strings, this approach makes a significant difference to the
+ there can be no backtracking for the .*+ item; it can match only the
+ entire string. The subsequent lookbehind assertion does a single test
+ on the last four characters. If it fails, the match fails immediately.
+ For long strings, this approach makes a significant difference to the
processing time.
Using multiple assertions
@@ -6727,18 +6751,18 @@ ASSERTIONS
(?<=\d{3})(?<!999)foo
- matches "foo" preceded by three digits that are not "999". Notice that
- each of the assertions is applied independently at the same point in
- the subject string. First there is a check that the previous three
- characters are all digits, and then there is a check that the same
+ matches "foo" preceded by three digits that are not "999". Notice that
+ each of the assertions is applied independently at the same point in
+ the subject string. First there is a check that the previous three
+ characters are all digits, and then there is a check that the same
three characters are not "999". This pattern does not match "foo" pre-
- ceded by six characters, the first of which are digits and the last
- three of which are not "999". For example, it doesn't match "123abc-
+ ceded by six characters, the first of which are digits and the last
+ three of which are not "999". For example, it doesn't match "123abc-
foo". A pattern to do that is
(?<=\d{3}...)(?<!999)foo
- This time the first assertion looks at the preceding six characters,
+ This time the first assertion looks at the preceding six characters,
checking that the first three are digits, and then the second assertion
checks that the preceding three characters are not "999".
@@ -6746,29 +6770,29 @@ ASSERTIONS
(?<=(?<!foo)bar)baz
- matches an occurrence of "baz" that is preceded by "bar" which in turn
+ matches an occurrence of "baz" that is preceded by "bar" which in turn
is not preceded by "foo", while
(?<=\d{3}(?!999)...)foo
- is another pattern that matches "foo" preceded by three digits and any
+ is another pattern that matches "foo" preceded by three digits and any
three characters that are not "999".
CONDITIONAL SUBPATTERNS
- It is possible to cause the matching process to obey a subpattern con-
- ditionally or to choose between two alternative subpatterns, depending
- on the result of an assertion, or whether a specific capturing subpat-
- tern has already been matched. The two possible forms of conditional
+ It is possible to cause the matching process to obey a subpattern con-
+ ditionally or to choose between two alternative subpatterns, depending
+ on the result of an assertion, or whether a specific capturing subpat-
+ tern has already been matched. The two possible forms of conditional
subpattern are:
(?(condition)yes-pattern)
(?(condition)yes-pattern|no-pattern)
- If the condition is satisfied, the yes-pattern is used; otherwise the
- no-pattern (if present) is used. If there are more than two alterna-
- tives in the subpattern, a compile-time error occurs. Each of the two
+ If the condition is satisfied, the yes-pattern is used; otherwise the
+ no-pattern (if present) is used. If there are more than two alterna-
+ tives in the subpattern, a compile-time error occurs. Each of the two
alternatives may itself contain nested subpatterns of any form, includ-
ing conditional subpatterns; the restriction to two alternatives
applies only at the level of the condition. This pattern fragment is an
@@ -6777,68 +6801,68 @@ CONDITIONAL SUBPATTERNS
(?(1) (A|B|C) | (D | (?(2)E|F) | E) )
- There are four kinds of condition: references to subpatterns, refer-
+ There are four kinds of condition: references to subpatterns, refer-
ences to recursion, a pseudo-condition called DEFINE, and assertions.
Checking for a used subpattern by number
- If the text between the parentheses consists of a sequence of digits,
+ If the text between the parentheses consists of a sequence of digits,
the condition is true if a capturing subpattern of that number has pre-
- viously matched. If there is more than one capturing subpattern with
- the same number (see the earlier section about duplicate subpattern
- numbers), the condition is true if any of them have matched. An alter-
- native notation is to precede the digits with a plus or minus sign. In
- this case, the subpattern number is relative rather than absolute. The
- most recently opened parentheses can be referenced by (?(-1), the next
- most recent by (?(-2), and so on. Inside loops it can also make sense
+ viously matched. If there is more than one capturing subpattern with
+ the same number (see the earlier section about duplicate subpattern
+ numbers), the condition is true if any of them have matched. An alter-
+ native notation is to precede the digits with a plus or minus sign. In
+ this case, the subpattern number is relative rather than absolute. The
+ most recently opened parentheses can be referenced by (?(-1), the next
+ most recent by (?(-2), and so on. Inside loops it can also make sense
to refer to subsequent groups. The next parentheses to be opened can be
- referenced as (?(+1), and so on. (The value zero in any of these forms
+ referenced as (?(+1), and so on. (The value zero in any of these forms
is not used; it provokes a compile-time error.)
- Consider the following pattern, which contains non-significant white
+ Consider the following pattern, which contains non-significant white
space to make it more readable (assume the PCRE_EXTENDED option) and to
divide it into three parts for ease of discussion:
( \( )? [^()]+ (?(1) \) )
- The first part matches an optional opening parenthesis, and if that
+ The first part matches an optional opening parenthesis, and if that
character is present, sets it as the first captured substring. The sec-
- ond part matches one or more characters that are not parentheses. The
- third part is a conditional subpattern that tests whether or not the
- first set of parentheses matched. If they did, that is, if subject
- started with an opening parenthesis, the condition is true, and so the
- yes-pattern is executed and a closing parenthesis is required. Other-
- wise, since no-pattern is not present, the subpattern matches nothing.
- In other words, this pattern matches a sequence of non-parentheses,
+ ond part matches one or more characters that are not parentheses. The
+ third part is a conditional subpattern that tests whether or not the
+ first set of parentheses matched. If they did, that is, if subject
+ started with an opening parenthesis, the condition is true, and so the
+ yes-pattern is executed and a closing parenthesis is required. Other-
+ wise, since no-pattern is not present, the subpattern matches nothing.
+ In other words, this pattern matches a sequence of non-parentheses,
optionally enclosed in parentheses.
- If you were embedding this pattern in a larger one, you could use a
+ If you were embedding this pattern in a larger one, you could use a
relative reference:
...other stuff... ( \( )? [^()]+ (?(-1) \) ) ...
- This makes the fragment independent of the parentheses in the larger
+ This makes the fragment independent of the parentheses in the larger
pattern.
Checking for a used subpattern by name
- Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a
- used subpattern by name. For compatibility with earlier versions of
- PCRE, which had this facility before Perl, the syntax (?(name)...) is
+ Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a
+ used subpattern by name. For compatibility with earlier versions of
+ PCRE, which had this facility before Perl, the syntax (?(name)...) is
also recognized.
Rewriting the above example to use a named subpattern gives this:
(?<OPEN> \( )? [^()]+ (?(<OPEN>) \) )
- If the name used in a condition of this kind is a duplicate, the test
- is applied to all subpatterns of the same name, and is true if any one
+ If the name used in a condition of this kind is a duplicate, the test
+ is applied to all subpatterns of the same name, and is true if any one
of them has matched.
Checking for pattern recursion
If the condition is the string (R), and there is no subpattern with the
- name R, the condition is true if a recursive call to the whole pattern
+ name R, the condition is true if a recursive call to the whole pattern
or any subpattern has been made. If digits or a name preceded by amper-
sand follow the letter R, for example:
@@ -6846,51 +6870,51 @@ CONDITIONAL SUBPATTERNS
the condition is true if the most recent recursion is into a subpattern
whose number or name is given. This condition does not check the entire
- recursion stack. If the name used in a condition of this kind is a
+ recursion stack. If the name used in a condition of this kind is a
duplicate, the test is applied to all subpatterns of the same name, and
is true if any one of them is the most recent recursion.
- At "top level", all these recursion test conditions are false. The
+ At "top level", all these recursion test conditions are false. The
syntax for recursive patterns is described below.
Defining subpatterns for use by reference only
- If the condition is the string (DEFINE), and there is no subpattern
- with the name DEFINE, the condition is always false. In this case,
- there may be only one alternative in the subpattern. It is always
- skipped if control reaches this point in the pattern; the idea of
- DEFINE is that it can be used to define subroutines that can be refer-
- enced from elsewhere. (The use of subroutines is described below.) For
- example, a pattern to match an IPv4 address such as "192.168.23.245"
+ If the condition is the string (DEFINE), and there is no subpattern
+ with the name DEFINE, the condition is always false. In this case,
+ there may be only one alternative in the subpattern. It is always
+ skipped if control reaches this point in the pattern; the idea of
+ DEFINE is that it can be used to define subroutines that can be refer-
+ enced from elsewhere. (The use of subroutines is described below.) For
+ example, a pattern to match an IPv4 address such as "192.168.23.245"
could be written like this (ignore white space and line breaks):
(?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
\b (?&byte) (\.(?&byte)){3} \b
- The first part of the pattern is a DEFINE group inside which a another
- group named "byte" is defined. This matches an individual component of
- an IPv4 address (a number less than 256). When matching takes place,
- this part of the pattern is skipped because DEFINE acts like a false
- condition. The rest of the pattern uses references to the named group
- to match the four dot-separated components of an IPv4 address, insist-
+ The first part of the pattern is a DEFINE group inside which a another
+ group named "byte" is defined. This matches an individual component of
+ an IPv4 address (a number less than 256). When matching takes place,
+ this part of the pattern is skipped because DEFINE acts like a false
+ condition. The rest of the pattern uses references to the named group
+ to match the four dot-separated components of an IPv4 address, insist-
ing on a word boundary at each end.
Assertion conditions
- If the condition is not in any of the above formats, it must be an
- assertion. This may be a positive or negative lookahead or lookbehind
- assertion. Consider this pattern, again containing non-significant
+ If the condition is not in any of the above formats, it must be an
+ assertion. This may be a positive or negative lookahead or lookbehind
+ assertion. Consider this pattern, again containing non-significant
white space, and with the two alternatives on the second line:
(?(?=[^a-z]*[a-z])
\d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
- The condition is a positive lookahead assertion that matches an
- optional sequence of non-letters followed by a letter. In other words,
- it tests for the presence of at least one letter in the subject. If a
- letter is found, the subject is matched against the first alternative;
- otherwise it is matched against the second. This pattern matches
- strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are
+ The condition is a positive lookahead assertion that matches an
+ optional sequence of non-letters followed by a letter. In other words,
+ it tests for the presence of at least one letter in the subject. If a
+ letter is found, the subject is matched against the first alternative;
+ otherwise it is matched against the second. This pattern matches
+ strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are
letters and dd are digits.
@@ -6899,41 +6923,41 @@ COMMENTS
There are two ways of including comments in patterns that are processed
by PCRE. In both cases, the start of the comment must not be in a char-
acter class, nor in the middle of any other sequence of related charac-
- ters such as (?: or a subpattern name or number. The characters that
+ ters such as (?: or a subpattern name or number. The characters that
make up a comment play no part in the pattern matching.
- The sequence (?# marks the start of a comment that continues up to the
- next closing parenthesis. Nested parentheses are not permitted. If the
+ The sequence (?# marks the start of a comment that continues up to the
+ next closing parenthesis. Nested parentheses are not permitted. If the
PCRE_EXTENDED option is set, an unescaped # character also introduces a
- comment, which in this case continues to immediately after the next
- newline character or character sequence in the pattern. Which charac-
+ comment, which in this case continues to immediately after the next
+ newline character or character sequence in the pattern. Which charac-
ters are interpreted as newlines is controlled by the options passed to
- a compiling function or by a special sequence at the start of the pat-
+ a compiling function or by a special sequence at the start of the pat-
tern, as described in the section entitled "Newline conventions" above.
Note that the end of this type of comment is a literal newline sequence
- in the pattern; escape sequences that happen to represent a newline do
- not count. For example, consider this pattern when PCRE_EXTENDED is
+ in the pattern; escape sequences that happen to represent a newline do
+ not count. For example, consider this pattern when PCRE_EXTENDED is
set, and the default newline convention is in force:
abc #comment \n still comment
- On encountering the # character, pcre_compile() skips along, looking
- for a newline in the pattern. The sequence \n is still literal at this
- stage, so it does not terminate the comment. Only an actual character
+ On encountering the # character, pcre_compile() skips along, looking
+ for a newline in the pattern. The sequence \n is still literal at this
+ stage, so it does not terminate the comment. Only an actual character
with the code value 0x0a (the default newline) does so.
RECURSIVE PATTERNS
- Consider the problem of matching a string in parentheses, allowing for
- unlimited nested parentheses. Without the use of recursion, the best
- that can be done is to use a pattern that matches up to some fixed
- depth of nesting. It is not possible to handle an arbitrary nesting
+ Consider the problem of matching a string in parentheses, allowing for
+ unlimited nested parentheses. Without the use of recursion, the best
+ that can be done is to use a pattern that matches up to some fixed
+ depth of nesting. It is not possible to handle an arbitrary nesting
depth.
For some time, Perl has provided a facility that allows regular expres-
- sions to recurse (amongst other things). It does this by interpolating
- Perl code in the expression at run time, and the code can refer to the
+ sions to recurse (amongst other things). It does this by interpolating
+ Perl code in the expression at run time, and the code can refer to the
expression itself. A Perl pattern using code interpolation to solve the
parentheses problem can be created like this:
@@ -6943,201 +6967,201 @@ RECURSIVE PATTERNS
refers recursively to the pattern in which it appears.
Obviously, PCRE cannot support the interpolation of Perl code. Instead,
- it supports special syntax for recursion of the entire pattern, and
- also for individual subpattern recursion. After its introduction in
- PCRE and Python, this kind of recursion was subsequently introduced
+ it supports special syntax for recursion of the entire pattern, and
+ also for individual subpattern recursion. After its introduction in
+ PCRE and Python, this kind of recursion was subsequently introduced
into Perl at release 5.10.
- A special item that consists of (? followed by a number greater than
- zero and a closing parenthesis is a recursive subroutine call of the
- subpattern of the given number, provided that it occurs inside that
- subpattern. (If not, it is a non-recursive subroutine call, which is
- described in the next section.) The special item (?R) or (?0) is a
+ A special item that consists of (? followed by a number greater than
+ zero and a closing parenthesis is a recursive subroutine call of the
+ subpattern of the given number, provided that it occurs inside that
+ subpattern. (If not, it is a non-recursive subroutine call, which is
+ described in the next section.) The special item (?R) or (?0) is a
recursive call of the entire regular expression.
- This PCRE pattern solves the nested parentheses problem (assume the
+ This PCRE pattern solves the nested parentheses problem (assume the
PCRE_EXTENDED option is set so that white space is ignored):
\( ( [^()]++ | (?R) )* \)
- First it matches an opening parenthesis. Then it matches any number of
- substrings which can either be a sequence of non-parentheses, or a
- recursive match of the pattern itself (that is, a correctly parenthe-
+ First it matches an opening parenthesis. Then it matches any number of
+ substrings which can either be a sequence of non-parentheses, or a
+ recursive match of the pattern itself (that is, a correctly parenthe-
sized substring). Finally there is a closing parenthesis. Note the use
of a possessive quantifier to avoid backtracking into sequences of non-
parentheses.
- If this were part of a larger pattern, you would not want to recurse
+ If this were part of a larger pattern, you would not want to recurse
the entire pattern, so instead you could use this:
( \( ( [^()]++ | (?1) )* \) )
- We have put the pattern into parentheses, and caused the recursion to
+ We have put the pattern into parentheses, and caused the recursion to
refer to them instead of the whole pattern.
- In a larger pattern, keeping track of parenthesis numbers can be
- tricky. This is made easier by the use of relative references. Instead
+ In a larger pattern, keeping track of parenthesis numbers can be
+ tricky. This is made easier by the use of relative references. Instead
of (?1) in the pattern above you can write (?-2) to refer to the second
- most recently opened parentheses preceding the recursion. In other
- words, a negative number counts capturing parentheses leftwards from
+ most recently opened parentheses preceding the recursion. In other
+ words, a negative number counts capturing parentheses leftwards from
the point at which it is encountered.
- It is also possible to refer to subsequently opened parentheses, by
- writing references such as (?+2). However, these cannot be recursive
- because the reference is not inside the parentheses that are refer-
- enced. They are always non-recursive subroutine calls, as described in
+ It is also possible to refer to subsequently opened parentheses, by
+ writing references such as (?+2). However, these cannot be recursive
+ because the reference is not inside the parentheses that are refer-
+ enced. They are always non-recursive subroutine calls, as described in
the next section.
- An alternative approach is to use named parentheses instead. The Perl
- syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also
+ An alternative approach is to use named parentheses instead. The Perl
+ syntax for this is (?&name); PCRE's earlier syntax (?P>name) is also
supported. We could rewrite the above example as follows:
(?<pn> \( ( [^()]++ | (?&pn) )* \) )
- If there is more than one subpattern with the same name, the earliest
+ If there is more than one subpattern with the same name, the earliest
one is used.
- This particular example pattern that we have been looking at contains
+ This particular example pattern that we have been looking at contains
nested unlimited repeats, and so the use of a possessive quantifier for
matching strings of non-parentheses is important when applying the pat-
- tern to strings that do not match. For example, when this pattern is
+ tern to strings that do not match. For example, when this pattern is
applied to
(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
- it yields "no match" quickly. However, if a possessive quantifier is
- not used, the match runs for a very long time indeed because there are
- so many different ways the + and * repeats can carve up the subject,
+ it yields "no match" quickly. However, if a possessive quantifier is
+ not used, the match runs for a very long time indeed because there are
+ so many different ways the + and * repeats can carve up the subject,
and all have to be tested before failure can be reported.
- At the end of a match, the values of capturing parentheses are those
- from the outermost level. If you want to obtain intermediate values, a
- callout function can be used (see below and the pcrecallout documenta-
+ At the end of a match, the values of capturing parentheses are those
+ from the outermost level. If you want to obtain intermediate values, a
+ callout function can be used (see below and the pcrecallout documenta-
tion). If the pattern above is matched against
(ab(cd)ef)
- the value for the inner capturing parentheses (numbered 2) is "ef",
- which is the last value taken on at the top level. If a capturing sub-
- pattern is not matched at the top level, its final captured value is
- unset, even if it was (temporarily) set at a deeper level during the
+ the value for the inner capturing parentheses (numbered 2) is "ef",
+ which is the last value taken on at the top level. If a capturing sub-
+ pattern is not matched at the top level, its final captured value is
+ unset, even if it was (temporarily) set at a deeper level during the
matching process.
- If there are more than 15 capturing parentheses in a pattern, PCRE has
- to obtain extra memory to store data during a recursion, which it does
+ If there are more than 15 capturing parentheses in a pattern, PCRE has
+ to obtain extra memory to store data during a recursion, which it does
by using pcre_malloc, freeing it via pcre_free afterwards. If no memory
can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
- Do not confuse the (?R) item with the condition (R), which tests for
- recursion. Consider this pattern, which matches text in angle brack-
- ets, allowing for arbitrary nesting. Only digits are allowed in nested
- brackets (that is, when recursing), whereas any characters are permit-
+ Do not confuse the (?R) item with the condition (R), which tests for
+ recursion. Consider this pattern, which matches text in angle brack-
+ ets, allowing for arbitrary nesting. Only digits are allowed in nested
+ brackets (that is, when recursing), whereas any characters are permit-
ted at the outer level.
< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >
- In this pattern, (?(R) is the start of a conditional subpattern, with
- two different alternatives for the recursive and non-recursive cases.
+ In this pattern, (?(R) is the start of a conditional subpattern, with
+ two different alternatives for the recursive and non-recursive cases.
The (?R) item is the actual recursive call.
Differences in recursion processing between PCRE and Perl
- Recursion processing in PCRE differs from Perl in two important ways.
- In PCRE (like Python, but unlike Perl), a recursive subpattern call is
+ Recursion processing in PCRE differs from Perl in two important ways.
+ In PCRE (like Python, but unlike Perl), a recursive subpattern call is
always treated as an atomic group. That is, once it has matched some of
the subject string, it is never re-entered, even if it contains untried
- alternatives and there is a subsequent matching failure. This can be
- illustrated by the following pattern, which purports to match a palin-
- dromic string that contains an odd number of characters (for example,
+ alternatives and there is a subsequent matching failure. This can be
+ illustrated by the following pattern, which purports to match a palin-
+ dromic string that contains an odd number of characters (for example,
"a", "aba", "abcba", "abcdcba"):
^(.|(.)(?1)\2)$
The idea is that it either matches a single character, or two identical
- characters surrounding a sub-palindrome. In Perl, this pattern works;
- in PCRE it does not if the pattern is longer than three characters.
+ characters surrounding a sub-palindrome. In Perl, this pattern works;
+ in PCRE it does not if the pattern is longer than three characters.
Consider the subject string "abcba":
- At the top level, the first character is matched, but as it is not at
+ At the top level, the first character is matched, but as it is not at
the end of the string, the first alternative fails; the second alterna-
tive is taken and the recursion kicks in. The recursive call to subpat-
- tern 1 successfully matches the next character ("b"). (Note that the
+ tern 1 successfully matches the next character ("b"). (Note that the
beginning and end of line tests are not part of the recursion).
- Back at the top level, the next character ("c") is compared with what
- subpattern 2 matched, which was "a". This fails. Because the recursion
- is treated as an atomic group, there are now no backtracking points,
- and so the entire match fails. (Perl is able, at this point, to re-
- enter the recursion and try the second alternative.) However, if the
+ Back at the top level, the next character ("c") is compared with what
+ subpattern 2 matched, which was "a". This fails. Because the recursion
+ is treated as an atomic group, there are now no backtracking points,
+ and so the entire match fails. (Perl is able, at this point, to re-
+ enter the recursion and try the second alternative.) However, if the
pattern is written with the alternatives in the other order, things are
different:
^((.)(?1)\2|.)$
- This time, the recursing alternative is tried first, and continues to
- recurse until it runs out of characters, at which point the recursion
- fails. But this time we do have another alternative to try at the
- higher level. That is the big difference: in the previous case the
+ This time, the recursing alternative is tried first, and continues to
+ recurse until it runs out of characters, at which point the recursion
+ fails. But this time we do have another alternative to try at the
+ higher level. That is the big difference: in the previous case the
remaining alternative is at a deeper recursion level, which PCRE cannot
use.
- To change the pattern so that it matches all palindromic strings, not
- just those with an odd number of characters, it is tempting to change
+ To change the pattern so that it matches all palindromic strings, not
+ just those with an odd number of characters, it is tempting to change
the pattern to this:
^((.)(?1)\2|.?)$
- Again, this works in Perl, but not in PCRE, and for the same reason.
- When a deeper recursion has matched a single character, it cannot be
- entered again in order to match an empty string. The solution is to
- separate the two cases, and write out the odd and even cases as alter-
+ Again, this works in Perl, but not in PCRE, and for the same reason.
+ When a deeper recursion has matched a single character, it cannot be
+ entered again in order to match an empty string. The solution is to
+ separate the two cases, and write out the odd and even cases as alter-
natives at the higher level:
^(?:((.)(?1)\2|)|((.)(?3)\4|.))
- If you want to match typical palindromic phrases, the pattern has to
+ If you want to match typical palindromic phrases, the pattern has to
ignore all non-word characters, which can be done like this:
^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$
If run with the PCRE_CASELESS option, this pattern matches phrases such
as "A man, a plan, a canal: Panama!" and it works well in both PCRE and
- Perl. Note the use of the possessive quantifier *+ to avoid backtrack-
- ing into sequences of non-word characters. Without this, PCRE takes a
- great deal longer (ten times or more) to match typical phrases, and
+ Perl. Note the use of the possessive quantifier *+ to avoid backtrack-
+ ing into sequences of non-word characters. Without this, PCRE takes a
+ great deal longer (ten times or more) to match typical phrases, and
Perl takes so long that you think it has gone into a loop.
- WARNING: The palindrome-matching patterns above work only if the sub-
- ject string does not start with a palindrome that is shorter than the
- entire string. For example, although "abcba" is correctly matched, if
- the subject is "ababa", PCRE finds the palindrome "aba" at the start,
- then fails at top level because the end of the string does not follow.
- Once again, it cannot jump back into the recursion to try other alter-
+ WARNING: The palindrome-matching patterns above work only if the sub-
+ ject string does not start with a palindrome that is shorter than the
+ entire string. For example, although "abcba" is correctly matched, if
+ the subject is "ababa", PCRE finds the palindrome "aba" at the start,
+ then fails at top level because the end of the string does not follow.
+ Once again, it cannot jump back into the recursion to try other alter-
natives, so the entire match fails.
- The second way in which PCRE and Perl differ in their recursion pro-
- cessing is in the handling of captured values. In Perl, when a subpat-
- tern is called recursively or as a subpattern (see the next section),
- it has no access to any values that were captured outside the recur-
- sion, whereas in PCRE these values can be referenced. Consider this
+ The second way in which PCRE and Perl differ in their recursion pro-
+ cessing is in the handling of captured values. In Perl, when a subpat-
+ tern is called recursively or as a subpattern (see the next section),
+ it has no access to any values that were captured outside the recur-
+ sion, whereas in PCRE these values can be referenced. Consider this
pattern:
^(.)(\1|a(?2))
- In PCRE, this pattern matches "bab". The first capturing parentheses
- match "b", then in the second group, when the back reference \1 fails
- to match "b", the second alternative matches "a" and then recurses. In
- the recursion, \1 does now match "b" and so the whole match succeeds.
- In Perl, the pattern fails to match because inside the recursive call
+ In PCRE, this pattern matches "bab". The first capturing parentheses
+ match "b", then in the second group, when the back reference \1 fails
+ to match "b", the second alternative matches "a" and then recurses. In
+ the recursion, \1 does now match "b" and so the whole match succeeds.
+ In Perl, the pattern fails to match because inside the recursive call
\1 cannot access the externally set value.
SUBPATTERNS AS SUBROUTINES
- If the syntax for a recursive subpattern call (either by number or by
- name) is used outside the parentheses to which it refers, it operates
- like a subroutine in a programming language. The called subpattern may
- be defined before or after the reference. A numbered reference can be
+ If the syntax for a recursive subpattern call (either by number or by
+ name) is used outside the parentheses to which it refers, it operates
+ like a subroutine in a programming language. The called subpattern may
+ be defined before or after the reference. A numbered reference can be
absolute or relative, as in these examples:
(...(absolute)...)...(?2)...
@@ -7148,79 +7172,79 @@ SUBPATTERNS AS SUBROUTINES
(sens|respons)e and \1ibility
- matches "sense and sensibility" and "response and responsibility", but
+ matches "sense and sensibility" and "response and responsibility", but
not "sense and responsibility". If instead the pattern
(sens|respons)e and (?1)ibility
- is used, it does match "sense and responsibility" as well as the other
- two strings. Another example is given in the discussion of DEFINE
+ is used, it does match "sense and responsibility" as well as the other
+ two strings. Another example is given in the discussion of DEFINE
above.
- All subroutine calls, whether recursive or not, are always treated as
- atomic groups. That is, once a subroutine has matched some of the sub-
+ All subroutine calls, whether recursive or not, are always treated as
+ atomic groups. That is, once a subroutine has matched some of the sub-
ject string, it is never re-entered, even if it contains untried alter-
- natives and there is a subsequent matching failure. Any capturing
- parentheses that are set during the subroutine call revert to their
+ natives and there is a subsequent matching failure. Any capturing
+ parentheses that are set during the subroutine call revert to their
previous values afterwards.
- Processing options such as case-independence are fixed when a subpat-
- tern is defined, so if it is used as a subroutine, such options cannot
+ Processing options such as case-independence are fixed when a subpat-
+ tern is defined, so if it is used as a subroutine, such options cannot
be changed for different calls. For example, consider this pattern:
(abc)(?i:(?-1))
- It matches "abcabc". It does not match "abcABC" because the change of
+ It matches "abcabc". It does not match "abcABC" because the change of
processing option does not affect the called subpattern.
ONIGURUMA SUBROUTINE SYNTAX
- For compatibility with Oniguruma, the non-Perl syntax \g followed by a
+ For compatibility with Oniguruma, the non-Perl syntax \g followed by a
name or a number enclosed either in angle brackets or single quotes, is
- an alternative syntax for referencing a subpattern as a subroutine,
- possibly recursively. Here are two of the examples used above, rewrit-
+ an alternative syntax for referencing a subpattern as a subroutine,
+ possibly recursively. Here are two of the examples used above, rewrit-
ten using this syntax:
(?<pn> \( ( (?>[^()]+) | \g<pn> )* \) )
(sens|respons)e and \g'1'ibility
- PCRE supports an extension to Oniguruma: if a number is preceded by a
+ PCRE supports an extension to Oniguruma: if a number is preceded by a
plus or a minus sign it is taken as a relative reference. For example:
(abc)(?i:\g<-1>)
- Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not
- synonymous. The former is a back reference; the latter is a subroutine
+ Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not
+ synonymous. The former is a back reference; the latter is a subroutine
call.
CALLOUTS
Perl has a feature whereby using the sequence (?{...}) causes arbitrary
- Perl code to be obeyed in the middle of matching a regular expression.
+ Perl code to be obeyed in the middle of matching a regular expression.
This makes it possible, amongst other things, to extract different sub-
strings that match the same pair of parentheses when there is a repeti-
tion.
PCRE provides a similar feature, but of course it cannot obey arbitrary
Perl code. The feature is called "callout". The caller of PCRE provides
- an external function by putting its entry point in the global variable
- pcre_callout (8-bit library) or pcre[16|32]_callout (16-bit or 32-bit
- library). By default, this variable contains NULL, which disables all
+ an external function by putting its entry point in the global variable
+ pcre_callout (8-bit library) or pcre[16|32]_callout (16-bit or 32-bit
+ library). By default, this variable contains NULL, which disables all
calling out.
- Within a regular expression, (?C) indicates the points at which the
- external function is to be called. If you want to identify different
- callout points, you can put a number less than 256 after the letter C.
- The default value is zero. For example, this pattern has two callout
+ Within a regular expression, (?C) indicates the points at which the
+ external function is to be called. If you want to identify different
+ callout points, you can put a number less than 256 after the letter C.
+ The default value is zero. For example, this pattern has two callout
points:
(?C1)abc(?C2)def
- If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call-
- outs are automatically installed before each item in the pattern. They
- are all numbered 255. If there is a conditional group in the pattern
+ If the PCRE_AUTO_CALLOUT flag is passed to a compiling function, call-
+ outs are automatically installed before each item in the pattern. They
+ are all numbered 255. If there is a conditional group in the pattern
whose condition is an assertion, an additional callout is inserted just
before the condition. An explicit callout may also be set at this posi-
tion, as in this example:
@@ -7230,120 +7254,120 @@ CALLOUTS
Note that this applies only to assertion conditions, not to other types
of condition.
- During matching, when PCRE reaches a callout point, the external func-
- tion is called. It is provided with the number of the callout, the
- position in the pattern, and, optionally, one item of data originally
- supplied by the caller of the matching function. The callout function
+ During matching, when PCRE reaches a callout point, the external func-
+ tion is called. It is provided with the number of the callout, the
+ position in the pattern, and, optionally, one item of data originally
+ supplied by the caller of the matching function. The callout function
may cause matching to proceed, to backtrack, or to fail altogether.
- By default, PCRE implements a number of optimizations at compile time
- and matching time, and one side-effect is that sometimes callouts are
- skipped. If you need all possible callouts to happen, you need to set
- options that disable the relevant optimizations. More details, and a
- complete description of the interface to the callout function, are
+ By default, PCRE implements a number of optimizations at compile time
+ and matching time, and one side-effect is that sometimes callouts are
+ skipped. If you need all possible callouts to happen, you need to set
+ options that disable the relevant optimizations. More details, and a
+ complete description of the interface to the callout function, are
given in the pcrecallout documentation.
BACKTRACKING CONTROL
- Perl 5.10 introduced a number of "Special Backtracking Control Verbs",
- which are still described in the Perl documentation as "experimental
- and subject to change or removal in a future version of Perl". It goes
- on to say: "Their usage in production code should be noted to avoid
- problems during upgrades." The same remarks apply to the PCRE features
+ Perl 5.10 introduced a number of "Special Backtracking Control Verbs",
+ which are still described in the Perl documentation as "experimental
+ and subject to change or removal in a future version of Perl". It goes
+ on to say: "Their usage in production code should be noted to avoid
+ problems during upgrades." The same remarks apply to the PCRE features
described in this section.
- The new verbs make use of what was previously invalid syntax: an open-
+ The new verbs make use of what was previously invalid syntax: an open-
ing parenthesis followed by an asterisk. They are generally of the form
- (*VERB) or (*VERB:NAME). Some may take either form, possibly behaving
- differently depending on whether or not a name is present. A name is
+ (*VERB) or (*VERB:NAME). Some may take either form, possibly behaving
+ differently depending on whether or not a name is present. A name is
any sequence of characters that does not include a closing parenthesis.
The maximum length of name is 255 in the 8-bit library and 65535 in the
- 16-bit and 32-bit libraries. If the name is empty, that is, if the
- closing parenthesis immediately follows the colon, the effect is as if
- the colon were not there. Any number of these verbs may occur in a
+ 16-bit and 32-bit libraries. If the name is empty, that is, if the
+ closing parenthesis immediately follows the colon, the effect is as if
+ the colon were not there. Any number of these verbs may occur in a
pattern.
- Since these verbs are specifically related to backtracking, most of
- them can be used only when the pattern is to be matched using one of
- the traditional matching functions, because these use a backtracking
- algorithm. With the exception of (*FAIL), which behaves like a failing
- negative assertion, the backtracking control verbs cause an error if
+ Since these verbs are specifically related to backtracking, most of
+ them can be used only when the pattern is to be matched using one of
+ the traditional matching functions, because these use a backtracking
+ algorithm. With the exception of (*FAIL), which behaves like a failing
+ negative assertion, the backtracking control verbs cause an error if
encountered by a DFA matching function.
- The behaviour of these verbs in repeated groups, assertions, and in
+ The behaviour of these verbs in repeated groups, assertions, and in
subpatterns called as subroutines (whether or not recursively) is docu-
mented below.
Optimizations that affect backtracking verbs
- PCRE contains some optimizations that are used to speed up matching by
+ PCRE contains some optimizations that are used to speed up matching by
running some checks at the start of each match attempt. For example, it
- may know the minimum length of matching subject, or that a particular
+ may know the minimum length of matching subject, or that a particular
character must be present. When one of these optimizations bypasses the
- running of a match, any included backtracking verbs will not, of
+ running of a match, any included backtracking verbs will not, of
course, be processed. You can suppress the start-of-match optimizations
- by setting the PCRE_NO_START_OPTIMIZE option when calling pcre_com-
+ by setting the PCRE_NO_START_OPTIMIZE option when calling pcre_com-
pile() or pcre_exec(), or by starting the pattern with (*NO_START_OPT).
There is more discussion of this option in the section entitled "Option
bits for pcre_exec()" in the pcreapi documentation.
- Experiments with Perl suggest that it too has similar optimizations,
+ Experiments with Perl suggest that it too has similar optimizations,
sometimes leading to anomalous results.
Verbs that act immediately
- The following verbs act as soon as they are encountered. They may not
+ The following verbs act as soon as they are encountered. They may not
be followed by a name.
(*ACCEPT)
- This verb causes the match to end successfully, skipping the remainder
- of the pattern. However, when it is inside a subpattern that is called
- as a subroutine, only that subpattern is ended successfully. Matching
+ This verb causes the match to end successfully, skipping the remainder
+ of the pattern. However, when it is inside a subpattern that is called
+ as a subroutine, only that subpattern is ended successfully. Matching
then continues at the outer level. If (*ACCEPT) in triggered in a posi-
- tive assertion, the assertion succeeds; in a negative assertion, the
+ tive assertion, the assertion succeeds; in a negative assertion, the
assertion fails.
- If (*ACCEPT) is inside capturing parentheses, the data so far is cap-
+ If (*ACCEPT) is inside capturing parentheses, the data so far is cap-
tured. For example:
A((?:A|B(*ACCEPT)|C)D)
- This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
+ This matches "AB", "AAD", or "ACD"; when it matches "AB", "B" is cap-
tured by the outer parentheses.
(*FAIL) or (*F)
- This verb causes a matching failure, forcing backtracking to occur. It
- is equivalent to (?!) but easier to read. The Perl documentation notes
- that it is probably useful only when combined with (?{}) or (??{}).
- Those are, of course, Perl features that are not present in PCRE. The
- nearest equivalent is the callout feature, as for example in this pat-
+ This verb causes a matching failure, forcing backtracking to occur. It
+ is equivalent to (?!) but easier to read. The Perl documentation notes
+ that it is probably useful only when combined with (?{}) or (??{}).
+ Those are, of course, Perl features that are not present in PCRE. The
+ nearest equivalent is the callout feature, as for example in this pat-
tern:
a+(?C)(*FAIL)
- A match with the string "aaaa" always fails, but the callout is taken
+ A match with the string "aaaa" always fails, but the callout is taken
before each backtrack happens (in this example, 10 times).
Recording which path was taken
- There is one verb whose main purpose is to track how a match was
- arrived at, though it also has a secondary use in conjunction with
+ There is one verb whose main purpose is to track how a match was
+ arrived at, though it also has a secondary use in conjunction with
advancing the match starting point (see (*SKIP) below).
(*MARK:NAME) or (*:NAME)
- A name is always required with this verb. There may be as many
- instances of (*MARK) as you like in a pattern, and their names do not
+ A name is always required with this verb. There may be as many
+ instances of (*MARK) as you like in a pattern, and their names do not
have to be unique.
- When a match succeeds, the name of the last-encountered (*MARK:NAME),
- (*PRUNE:NAME), or (*THEN:NAME) on the matching path is passed back to
- the caller as described in the section entitled "Extra data for
- pcre_exec()" in the pcreapi documentation. Here is an example of
- pcretest output, where the /K modifier requests the retrieval and out-
+ When a match succeeds, the name of the last-encountered (*MARK:NAME),
+ (*PRUNE:NAME), or (*THEN:NAME) on the matching path is passed back to
+ the caller as described in the section entitled "Extra data for
+ pcre_exec()" in the pcreapi documentation. Here is an example of
+ pcretest output, where the /K modifier requests the retrieval and out-
putting of (*MARK) data:
re> /X(*MARK:A)Y|X(*MARK:B)Z/K
@@ -7355,73 +7379,73 @@ BACKTRACKING CONTROL
MK: B
The (*MARK) name is tagged with "MK:" in this output, and in this exam-
- ple it indicates which of the two alternatives matched. This is a more
- efficient way of obtaining this information than putting each alterna-
+ ple it indicates which of the two alternatives matched. This is a more
+ efficient way of obtaining this information than putting each alterna-
tive in its own capturing parentheses.
- If a verb with a name is encountered in a positive assertion that is
- true, the name is recorded and passed back if it is the last-encoun-
+ If a verb with a name is encountered in a positive assertion that is
+ true, the name is recorded and passed back if it is the last-encoun-
tered. This does not happen for negative assertions or failing positive
assertions.
- After a partial match or a failed match, the last encountered name in
+ After a partial match or a failed match, the last encountered name in
the entire match process is returned. For example:
re> /X(*MARK:A)Y|X(*MARK:B)Z/K
data> XP
No match, mark = B
- Note that in this unanchored example the mark is retained from the
+ Note that in this unanchored example the mark is retained from the
match attempt that started at the letter "X" in the subject. Subsequent
match attempts starting at "P" and then with an empty string do not get
as far as the (*MARK) item, but nevertheless do not reset it.
- If you are interested in (*MARK) values after failed matches, you
- should probably set the PCRE_NO_START_OPTIMIZE option (see above) to
+ If you are interested in (*MARK) values after failed matches, you
+ should probably set the PCRE_NO_START_OPTIMIZE option (see above) to
ensure that the match is always attempted.
Verbs that act after backtracking
The following verbs do nothing when they are encountered. Matching con-
- tinues with what follows, but if there is no subsequent match, causing
- a backtrack to the verb, a failure is forced. That is, backtracking
- cannot pass to the left of the verb. However, when one of these verbs
+ tinues with what follows, but if there is no subsequent match, causing
+ a backtrack to the verb, a failure is forced. That is, backtracking
+ cannot pass to the left of the verb. However, when one of these verbs
appears inside an atomic group or an assertion that is true, its effect
- is confined to that group, because once the group has been matched,
- there is never any backtracking into it. In this situation, backtrack-
- ing can "jump back" to the left of the entire atomic group or asser-
- tion. (Remember also, as stated above, that this localization also
+ is confined to that group, because once the group has been matched,
+ there is never any backtracking into it. In this situation, backtrack-
+ ing can "jump back" to the left of the entire atomic group or asser-
+ tion. (Remember also, as stated above, that this localization also
applies in subroutine calls.)
- These verbs differ in exactly what kind of failure occurs when back-
- tracking reaches them. The behaviour described below is what happens
- when the verb is not in a subroutine or an assertion. Subsequent sec-
+ These verbs differ in exactly what kind of failure occurs when back-
+ tracking reaches them. The behaviour described below is what happens
+ when the verb is not in a subroutine or an assertion. Subsequent sec-
tions cover these special cases.
(*COMMIT)
- This verb, which may not be followed by a name, causes the whole match
+ This verb, which may not be followed by a name, causes the whole match
to fail outright if there is a later matching failure that causes back-
- tracking to reach it. Even if the pattern is unanchored, no further
+ tracking to reach it. Even if the pattern is unanchored, no further
attempts to find a match by advancing the starting point take place. If
- (*COMMIT) is the only backtracking verb that is encountered, once it
+ (*COMMIT) is the only backtracking verb that is encountered, once it
has been passed pcre_exec() is committed to finding a match at the cur-
rent starting point, or not at all. For example:
a+(*COMMIT)b
- This matches "xxaab" but not "aacaab". It can be thought of as a kind
+ This matches "xxaab" but not "aacaab". It can be thought of as a kind
of dynamic anchor, or "I've started, so I must finish." The name of the
- most recently passed (*MARK) in the path is passed back when (*COMMIT)
+ most recently passed (*MARK) in the path is passed back when (*COMMIT)
forces a match failure.
- If there is more than one backtracking verb in a pattern, a different
- one that follows (*COMMIT) may be triggered first, so merely passing
+ If there is more than one backtracking verb in a pattern, a different
+ one that follows (*COMMIT) may be triggered first, so merely passing
(*COMMIT) during a match does not always guarantee that a match must be
at this starting point.
- Note that (*COMMIT) at the start of a pattern is not the same as an
- anchor, unless PCRE's start-of-match optimizations are turned off, as
+ Note that (*COMMIT) at the start of a pattern is not the same as an
+ anchor, unless PCRE's start-of-match optimizations are turned off, as
shown in this output from pcretest:
re> /(*COMMIT)abc/
@@ -7432,207 +7456,207 @@ BACKTRACKING CONTROL
For this pattern, PCRE knows that any match must start with "a", so the
optimization skips along the subject to "a" before applying the pattern
- to the first set of data. The match attempt then succeeds. In the sec-
- ond set of data, the escape sequence \Y is interpreted by the pcretest
- program. It causes the PCRE_NO_START_OPTIMIZE option to be set when
+ to the first set of data. The match attempt then succeeds. In the sec-
+ ond set of data, the escape sequence \Y is interpreted by the pcretest
+ program. It causes the PCRE_NO_START_OPTIMIZE option to be set when
pcre_exec() is called. This disables the optimization that skips along
to the first character. The pattern is now applied starting at "x", and
- so the (*COMMIT) causes the match to fail without trying any other
+ so the (*COMMIT) causes the match to fail without trying any other
starting points.
(*PRUNE) or (*PRUNE:NAME)
- This verb causes the match to fail at the current starting position in
+ This verb causes the match to fail at the current starting position in
the subject if there is a later matching failure that causes backtrack-
- ing to reach it. If the pattern is unanchored, the normal "bumpalong"
- advance to the next starting character then happens. Backtracking can
- occur as usual to the left of (*PRUNE), before it is reached, or when
- matching to the right of (*PRUNE), but if there is no match to the
- right, backtracking cannot cross (*PRUNE). In simple cases, the use of
- (*PRUNE) is just an alternative to an atomic group or possessive quan-
+ ing to reach it. If the pattern is unanchored, the normal "bumpalong"
+ advance to the next starting character then happens. Backtracking can
+ occur as usual to the left of (*PRUNE), before it is reached, or when
+ matching to the right of (*PRUNE), but if there is no match to the
+ right, backtracking cannot cross (*PRUNE). In simple cases, the use of
+ (*PRUNE) is just an alternative to an atomic group or possessive quan-
tifier, but there are some uses of (*PRUNE) that cannot be expressed in
- any other way. In an anchored pattern (*PRUNE) has the same effect as
+ any other way. In an anchored pattern (*PRUNE) has the same effect as
(*COMMIT).
The behaviour of (*PRUNE:NAME) is the not the same as
- (*MARK:NAME)(*PRUNE). It is like (*MARK:NAME) in that the name is
- remembered for passing back to the caller. However, (*SKIP:NAME)
+ (*MARK:NAME)(*PRUNE). It is like (*MARK:NAME) in that the name is
+ remembered for passing back to the caller. However, (*SKIP:NAME)
searches only for names set with (*MARK).
(*SKIP)
- This verb, when given without a name, is like (*PRUNE), except that if
- the pattern is unanchored, the "bumpalong" advance is not to the next
+ This verb, when given without a name, is like (*PRUNE), except that if
+ the pattern is unanchored, the "bumpalong" advance is not to the next
character, but to the position in the subject where (*SKIP) was encoun-
- tered. (*SKIP) signifies that whatever text was matched leading up to
+ tered. (*SKIP) signifies that whatever text was matched leading up to
it cannot be part of a successful match. Consider:
a+(*SKIP)b
- If the subject is "aaaac...", after the first match attempt fails
- (starting at the first character in the string), the starting point
+ If the subject is "aaaac...", after the first match attempt fails
+ (starting at the first character in the string), the starting point
skips on to start the next attempt at "c". Note that a possessive quan-
- tifer does not have the same effect as this example; although it would
- suppress backtracking during the first match attempt, the second
- attempt would start at the second character instead of skipping on to
+ tifer does not have the same effect as this example; although it would
+ suppress backtracking during the first match attempt, the second
+ attempt would start at the second character instead of skipping on to
"c".
(*SKIP:NAME)
When (*SKIP) has an associated name, its behaviour is modified. When it
is triggered, the previous path through the pattern is searched for the
- most recent (*MARK) that has the same name. If one is found, the
+ most recent (*MARK) that has the same name. If one is found, the
"bumpalong" advance is to the subject position that corresponds to that
(*MARK) instead of to where (*SKIP) was encountered. If no (*MARK) with
a matching name is found, the (*SKIP) is ignored.
- Note that (*SKIP:NAME) searches only for names set by (*MARK:NAME). It
+ Note that (*SKIP:NAME) searches only for names set by (*MARK:NAME). It
ignores names that are set by (*PRUNE:NAME) or (*THEN:NAME).
(*THEN) or (*THEN:NAME)
- This verb causes a skip to the next innermost alternative when back-
- tracking reaches it. That is, it cancels any further backtracking
- within the current alternative. Its name comes from the observation
+ This verb causes a skip to the next innermost alternative when back-
+ tracking reaches it. That is, it cancels any further backtracking
+ within the current alternative. Its name comes from the observation
that it can be used for a pattern-based if-then-else block:
( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ...
- If the COND1 pattern matches, FOO is tried (and possibly further items
- after the end of the group if FOO succeeds); on failure, the matcher
- skips to the second alternative and tries COND2, without backtracking
- into COND1. If that succeeds and BAR fails, COND3 is tried. If subse-
- quently BAZ fails, there are no more alternatives, so there is a back-
- track to whatever came before the entire group. If (*THEN) is not
+ If the COND1 pattern matches, FOO is tried (and possibly further items
+ after the end of the group if FOO succeeds); on failure, the matcher
+ skips to the second alternative and tries COND2, without backtracking
+ into COND1. If that succeeds and BAR fails, COND3 is tried. If subse-
+ quently BAZ fails, there are no more alternatives, so there is a back-
+ track to whatever came before the entire group. If (*THEN) is not
inside an alternation, it acts like (*PRUNE).
- The behaviour of (*THEN:NAME) is the not the same as
- (*MARK:NAME)(*THEN). It is like (*MARK:NAME) in that the name is
- remembered for passing back to the caller. However, (*SKIP:NAME)
+ The behaviour of (*THEN:NAME) is the not the same as
+ (*MARK:NAME)(*THEN). It is like (*MARK:NAME) in that the name is
+ remembered for passing back to the caller. However, (*SKIP:NAME)
searches only for names set with (*MARK).
- A subpattern that does not contain a | character is just a part of the
- enclosing alternative; it is not a nested alternation with only one
- alternative. The effect of (*THEN) extends beyond such a subpattern to
- the enclosing alternative. Consider this pattern, where A, B, etc. are
- complex pattern fragments that do not contain any | characters at this
+ A subpattern that does not contain a | character is just a part of the
+ enclosing alternative; it is not a nested alternation with only one
+ alternative. The effect of (*THEN) extends beyond such a subpattern to
+ the enclosing alternative. Consider this pattern, where A, B, etc. are
+ complex pattern fragments that do not contain any | characters at this
level:
A (B(*THEN)C) | D
- If A and B are matched, but there is a failure in C, matching does not
+ If A and B are matched, but there is a failure in C, matching does not
backtrack into A; instead it moves to the next alternative, that is, D.
- However, if the subpattern containing (*THEN) is given an alternative,
+ However, if the subpattern containing (*THEN) is given an alternative,
it behaves differently:
A (B(*THEN)C | (*FAIL)) | D
- The effect of (*THEN) is now confined to the inner subpattern. After a
+ The effect of (*THEN) is now confined to the inner subpattern. After a
failure in C, matching moves to (*FAIL), which causes the whole subpat-
- tern to fail because there are no more alternatives to try. In this
+ tern to fail because there are no more alternatives to try. In this
case, matching does now backtrack into A.
- Note that a conditional subpattern is not considered as having two
- alternatives, because only one is ever used. In other words, the |
+ Note that a conditional subpattern is not considered as having two
+ alternatives, because only one is ever used. In other words, the |
character in a conditional subpattern has a different meaning. Ignoring
white space, consider:
^.*? (?(?=a) a | b(*THEN)c )
- If the subject is "ba", this pattern does not match. Because .*? is
- ungreedy, it initially matches zero characters. The condition (?=a)
- then fails, the character "b" is matched, but "c" is not. At this
- point, matching does not backtrack to .*? as might perhaps be expected
- from the presence of the | character. The conditional subpattern is
+ If the subject is "ba", this pattern does not match. Because .*? is
+ ungreedy, it initially matches zero characters. The condition (?=a)
+ then fails, the character "b" is matched, but "c" is not. At this
+ point, matching does not backtrack to .*? as might perhaps be expected
+ from the presence of the | character. The conditional subpattern is
part of the single alternative that comprises the whole pattern, and so
- the match fails. (If there was a backtrack into .*?, allowing it to
+ the match fails. (If there was a backtrack into .*?, allowing it to
match "b", the match would succeed.)
- The verbs just described provide four different "strengths" of control
+ The verbs just described provide four different "strengths" of control
when subsequent matching fails. (*THEN) is the weakest, carrying on the
- match at the next alternative. (*PRUNE) comes next, failing the match
- at the current starting position, but allowing an advance to the next
- character (for an unanchored pattern). (*SKIP) is similar, except that
+ match at the next alternative. (*PRUNE) comes next, failing the match
+ at the current starting position, but allowing an advance to the next
+ character (for an unanchored pattern). (*SKIP) is similar, except that
the advance may be more than one character. (*COMMIT) is the strongest,
causing the entire match to fail.
More than one backtracking verb
- If more than one backtracking verb is present in a pattern, the one
- that is backtracked onto first acts. For example, consider this pat-
+ If more than one backtracking verb is present in a pattern, the one
+ that is backtracked onto first acts. For example, consider this pat-
tern, where A, B, etc. are complex pattern fragments:
(A(*COMMIT)B(*THEN)C|ABD)
- If A matches but B fails, the backtrack to (*COMMIT) causes the entire
+ If A matches but B fails, the backtrack to (*COMMIT) causes the entire
match to fail. However, if A and B match, but C fails, the backtrack to
- (*THEN) causes the next alternative (ABD) to be tried. This behaviour
- is consistent, but is not always the same as Perl's. It means that if
- two or more backtracking verbs appear in succession, all the the last
+ (*THEN) causes the next alternative (ABD) to be tried. This behaviour
+ is consistent, but is not always the same as Perl's. It means that if
+ two or more backtracking verbs appear in succession, all the the last
of them has no effect. Consider this example:
...(*COMMIT)(*PRUNE)...
If there is a matching failure to the right, backtracking onto (*PRUNE)
- causes it to be triggered, and its action is taken. There can never be
+ causes it to be triggered, and its action is taken. There can never be
a backtrack onto (*COMMIT).
Backtracking verbs in repeated groups
- PCRE differs from Perl in its handling of backtracking verbs in
+ PCRE differs from Perl in its handling of backtracking verbs in
repeated groups. For example, consider:
/(a(*COMMIT)b)+ac/
- If the subject is "abac", Perl matches, but PCRE fails because the
+ If the subject is "abac", Perl matches, but PCRE fails because the
(*COMMIT) in the second repeat of the group acts.
Backtracking verbs in assertions
- (*FAIL) in an assertion has its normal effect: it forces an immediate
+ (*FAIL) in an assertion has its normal effect: it forces an immediate
backtrack.
(*ACCEPT) in a positive assertion causes the assertion to succeed with-
- out any further processing. In a negative assertion, (*ACCEPT) causes
+ out any further processing. In a negative assertion, (*ACCEPT) causes
the assertion to fail without any further processing.
- The other backtracking verbs are not treated specially if they appear
- in a positive assertion. In particular, (*THEN) skips to the next
- alternative in the innermost enclosing group that has alternations,
+ The other backtracking verbs are not treated specially if they appear
+ in a positive assertion. In particular, (*THEN) skips to the next
+ alternative in the innermost enclosing group that has alternations,
whether or not this is within the assertion.
- Negative assertions are, however, different, in order to ensure that
- changing a positive assertion into a negative assertion changes its
+ Negative assertions are, however, different, in order to ensure that
+ changing a positive assertion into a negative assertion changes its
result. Backtracking into (*COMMIT), (*SKIP), or (*PRUNE) causes a neg-
ative assertion to be true, without considering any further alternative
branches in the assertion. Backtracking into (*THEN) causes it to skip
- to the next enclosing alternative within the assertion (the normal be-
- haviour), but if the assertion does not have such an alternative,
+ to the next enclosing alternative within the assertion (the normal be-
+ haviour), but if the assertion does not have such an alternative,
(*THEN) behaves like (*PRUNE).
Backtracking verbs in subroutines
- These behaviours occur whether or not the subpattern is called recur-
+ These behaviours occur whether or not the subpattern is called recur-
sively. Perl's treatment of subroutines is different in some cases.
- (*FAIL) in a subpattern called as a subroutine has its normal effect:
+ (*FAIL) in a subpattern called as a subroutine has its normal effect:
it forces an immediate backtrack.
- (*ACCEPT) in a subpattern called as a subroutine causes the subroutine
- match to succeed without any further processing. Matching then contin-
+ (*ACCEPT) in a subpattern called as a subroutine causes the subroutine
+ match to succeed without any further processing. Matching then contin-
ues after the subroutine call.
(*COMMIT), (*SKIP), and (*PRUNE) in a subpattern called as a subroutine
cause the subroutine match to fail.
- (*THEN) skips to the next alternative in the innermost enclosing group
- within the subpattern that has alternatives. If there is no such group
+ (*THEN) skips to the next alternative in the innermost enclosing group
+ within the subpattern that has alternatives. If there is no such group
within the subpattern, (*THEN) causes the subroutine match to fail.
SEE ALSO
- pcreapi(3), pcrecallout(3), pcrematching(3), pcresyntax(3), pcre(3),
+ pcreapi(3), pcrecallout(3), pcrematching(3), pcresyntax(3), pcre(3),
pcre16(3), pcre32(3).
@@ -7645,8 +7669,8 @@ AUTHOR
REVISION
- Last updated: 08 January 2014
- Copyright (c) 1997-2014 University of Cambridge.
+ Last updated: 14 June 2015
+ Copyright (c) 1997-2015 University of Cambridge.
------------------------------------------------------------------------------
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index 58ed46a2a3..bf6351f883 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
-#define PCRE_MINOR 37
+#define PCRE_MINOR 38
#define PCRE_PRERELEASE
-#define PCRE_DATE 2015-04-28
+#define PCRE_DATE 2015-11-23
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c
index 9a32becb50..11a9d26ff6 100644
--- a/ext/pcre/pcrelib/pcre_compile.c
+++ b/ext/pcre/pcrelib/pcre_compile.c
@@ -172,7 +172,7 @@ static const short int escapes[] = {
-ESC_Z, CHAR_LEFT_SQUARE_BRACKET,
CHAR_BACKSLASH, CHAR_RIGHT_SQUARE_BRACKET,
CHAR_CIRCUMFLEX_ACCENT, CHAR_UNDERSCORE,
- CHAR_GRAVE_ACCENT, 7,
+ CHAR_GRAVE_ACCENT, ESC_a,
-ESC_b, 0,
-ESC_d, ESC_e,
ESC_f, 0,
@@ -200,9 +200,9 @@ static const short int escapes[] = {
/* 68 */ 0, 0, '|', ',', '%', '_', '>', '?',
/* 70 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* 78 */ 0, '`', ':', '#', '@', '\'', '=', '"',
-/* 80 */ 0, 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
+/* 80 */ 0, ESC_a, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
/* 88 */-ESC_h, 0, 0, '{', 0, 0, 0, 0,
-/* 90 */ 0, 0, -ESC_k, 'l', 0, ESC_n, 0, -ESC_p,
+/* 90 */ 0, 0, -ESC_k, 0, 0, ESC_n, 0, -ESC_p,
/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0,
/* A0 */ 0, '~', -ESC_s, ESC_tee, 0,-ESC_v, -ESC_w, 0,
/* A8 */ 0,-ESC_z, 0, 0, 0, '[', 0, 0,
@@ -217,6 +217,12 @@ static const short int escapes[] = {
/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* F8 */ 0, 0, 0, 0, 0, 0, 0, 0
};
+
+/* We also need a table of characters that may follow \c in an EBCDIC
+environment for characters 0-31. */
+
+static unsigned char ebcdic_escape_c[] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
+
#endif
@@ -456,7 +462,7 @@ static const char error_texts[] =
"range out of order in character class\0"
"nothing to repeat\0"
/* 10 */
- "operand of unlimited repeat could match the empty string\0" /** DEAD **/
+ "internal error: invalid forward reference offset\0"
"internal error: unexpected repeat\0"
"unrecognized character after (? or (?-\0"
"POSIX named classes are supported only within a class\0"
@@ -525,7 +531,11 @@ static const char error_texts[] =
"different names for subpatterns of the same number are not allowed\0"
"(*MARK) must have an argument\0"
"this version of PCRE is not compiled with Unicode property support\0"
+#ifndef EBCDIC
"\\c must be followed by an ASCII character\0"
+#else
+ "\\c must be followed by a letter or one of [\\]^_?\0"
+#endif
"\\k is not followed by a braced, angle-bracketed, or quoted name\0"
/* 70 */
"internal error: unknown opcode in find_fixedlength()\0"
@@ -1423,7 +1433,16 @@ else
c ^= 0x40;
#else /* EBCDIC coding */
if (c >= CHAR_a && c <= CHAR_z) c += 64;
- c ^= 0xC0;
+ if (c == CHAR_QUESTION_MARK)
+ c = ('\\' == 188 && '`' == 74)? 0x5f : 0xff;
+ else
+ {
+ for (i = 0; i < 32; i++)
+ {
+ if (c == ebcdic_escape_c[i]) break;
+ }
+ if (i < 32) c = i; else *errorcodeptr = ERR68;
+ }
#endif
break;
@@ -1797,7 +1816,7 @@ for (;;)
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
do cc += GET(cc, 1); while (*cc == OP_ALT);
- cc += PRIV(OP_lengths)[*cc];
+ cc += 1 + LINK_SIZE;
break;
/* Skip over things that don't match chars */
@@ -2485,7 +2504,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
if (c == OP_BRA || c == OP_BRAPOS ||
c == OP_CBRA || c == OP_CBRAPOS ||
c == OP_ONCE || c == OP_ONCE_NC ||
- c == OP_COND)
+ c == OP_COND || c == OP_SCOND)
{
BOOL empty_branch;
if (GET(code, 1) == 0) return TRUE; /* Hit unclosed bracket */
@@ -3884,11 +3903,11 @@ didn't consider this to be a POSIX class. Likewise for [:1234:].
The problem in trying to be exactly like Perl is in the handling of escapes. We
have to be sure that [abc[:x\]pqr] is *not* treated as containing a POSIX
class, but [abc[:x\]pqr:]] is (so that an error can be generated). The code
-below handles the special case of \], but does not try to do any other escape
-processing. This makes it different from Perl for cases such as [:l\ower:]
-where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize
-"l\ower". This is a lesser evil than not diagnosing bad classes when Perl does,
-I think.
+below handles the special cases \\ and \], but does not try to do any other
+escape processing. This makes it different from Perl for cases such as
+[:l\ower:] where Perl recognizes it as the POSIX class "lower" but PCRE does
+not recognize "l\ower". This is a lesser evil than not diagnosing bad classes
+when Perl does, I think.
A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
It seems that the appearance of a nested POSIX class supersedes an apparent
@@ -3915,21 +3934,16 @@ pcre_uchar terminator; /* Don't combine these lines; the Solaris cc */
terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
for (++ptr; *ptr != CHAR_NULL; ptr++)
{
- if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ if (*ptr == CHAR_BACKSLASH &&
+ (ptr[1] == CHAR_RIGHT_SQUARE_BRACKET ||
+ ptr[1] == CHAR_BACKSLASH))
ptr++;
- else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
- else
+ else if ((*ptr == CHAR_LEFT_SQUARE_BRACKET && ptr[1] == terminator) ||
+ *ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
+ else if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
- if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
- {
- *endptr = ptr;
- return TRUE;
- }
- if (*ptr == CHAR_LEFT_SQUARE_BRACKET &&
- (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
- ptr[1] == CHAR_EQUALS_SIGN) &&
- check_posix_syntax(ptr, endptr))
- return FALSE;
+ *endptr = ptr;
+ return TRUE;
}
}
return FALSE;
@@ -3983,11 +3997,12 @@ have their offsets adjusted. That one of the jobs of this function. Before it
is called, the partially compiled regex must be temporarily terminated with
OP_END.
-This function has been extended with the possibility of forward references for
-recursions and subroutine calls. It must also check the list of such references
-for the group we are dealing with. If it finds that one of the recursions in
-the current group is on this list, it adjusts the offset in the list, not the
-value in the reference (which is a group number).
+This function has been extended to cope with forward references for recursions
+and subroutine calls. It must check the list of such references for the
+group we are dealing with. If it finds that one of the recursions in the
+current group is on this list, it does not adjust the value in the reference
+(which is a group number). After the group has been scanned, all the offsets in
+the forward reference list for the group are adjusted.
Arguments:
group points to the start of the group
@@ -4003,29 +4018,21 @@ static void
adjust_recurse(pcre_uchar *group, int adjust, BOOL utf, compile_data *cd,
size_t save_hwm_offset)
{
+int offset;
+pcre_uchar *hc;
pcre_uchar *ptr = group;
while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
{
- int offset;
- pcre_uchar *hc;
-
- /* See if this recursion is on the forward reference list. If so, adjust the
- reference. */
-
for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset; hc < cd->hwm;
hc += LINK_SIZE)
{
offset = (int)GET(hc, 0);
- if (cd->start_code + offset == ptr + 1)
- {
- PUT(hc, 0, offset + adjust);
- break;
- }
+ if (cd->start_code + offset == ptr + 1) break;
}
- /* Otherwise, adjust the recursion offset if it's after the start of this
- group. */
+ /* If we have not found this recursion on the forward reference list, adjust
+ the recursion's offset if it's after the start of this group. */
if (hc >= cd->hwm)
{
@@ -4035,6 +4042,15 @@ while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
ptr += 1 + LINK_SIZE;
}
+
+/* Now adjust all forward reference offsets for the group. */
+
+for (hc = (pcre_uchar *)cd->start_workspace + save_hwm_offset; hc < cd->hwm;
+ hc += LINK_SIZE)
+ {
+ offset = (int)GET(hc, 0);
+ PUT(hc, 0, offset + adjust);
+ }
}
@@ -4463,7 +4479,7 @@ const pcre_uchar *tempptr;
const pcre_uchar *nestptr = NULL;
pcre_uchar *previous = NULL;
pcre_uchar *previous_callout = NULL;
-size_t save_hwm_offset = 0;
+size_t item_hwm_offset = 0;
pcre_uint8 classbits[32];
/* We can fish out the UTF-8 setting once and for all into a BOOL, but we
@@ -4621,8 +4637,7 @@ for (;; ptr++)
/* In the real compile phase, just check the workspace used by the forward
reference list. */
- else if (cd->hwm > cd->start_workspace + cd->workspace_size -
- WORK_SIZE_SAFETY_MARGIN)
+ else if (cd->hwm > cd->start_workspace + cd->workspace_size)
{
*errorcodeptr = ERR52;
goto FAILED;
@@ -4765,6 +4780,7 @@ for (;; ptr++)
zeroreqchar = reqchar;
zeroreqcharflags = reqcharflags;
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
*code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY;
break;
@@ -4816,6 +4832,7 @@ for (;; ptr++)
/* Handle a real character class. */
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
/* PCRE supports POSIX class stuff inside a class. Perl gives an error if
they are encountered at the top level, so we'll do that too. */
@@ -4921,9 +4938,10 @@ for (;; ptr++)
(which is on the stack). We have to remember that there was XCLASS data,
however. */
+ if (class_uchardata > class_uchardata_base) xclass = TRUE;
+
if (lengthptr != NULL && class_uchardata > class_uchardata_base)
{
- xclass = TRUE;
*lengthptr += (int)(class_uchardata - class_uchardata_base);
class_uchardata = class_uchardata_base;
}
@@ -5026,10 +5044,26 @@ for (;; ptr++)
ptr = tempptr + 1;
continue;
- /* For all other POSIX classes, no special action is taken in UCP
- mode. Fall through to the non_UCP case. */
+ /* For the other POSIX classes (ascii, xdigit) we are going to fall
+ through to the non-UCP case and build a bit map for characters with
+ code points less than 256. If we are in a negated POSIX class
+ within a non-negated overall class, characters with code points
+ greater than 255 must all match. In the special case where we have
+ not yet generated any xclass data, and this is the final item in
+ the overall class, we need do nothing: later on, the opcode
+ OP_NCLASS will be used to indicate that characters greater than 255
+ are acceptable. If we have already seen an xclass item or one may
+ follow (we have to assume that it might if this is not the end of
+ the class), explicitly match all wide codepoints. */
default:
+ if (!negate_class && local_negate &&
+ (xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
+ {
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x100, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(0x10ffff, class_uchardata);
+ }
break;
}
}
@@ -5193,9 +5227,9 @@ for (;; ptr++)
cd, PRIV(vspace_list));
continue;
-#ifdef SUPPORT_UCP
case ESC_p:
case ESC_P:
+#ifdef SUPPORT_UCP
{
BOOL negated;
unsigned int ptype = 0, pdata = 0;
@@ -5209,6 +5243,9 @@ for (;; ptr++)
class_has_8bitchar--; /* Undo! */
continue;
}
+#else
+ *errorcodeptr = ERR45;
+ goto FAILED;
#endif
/* Unrecognized escapes are faulted if PCRE is running in its
strict mode. By default, for compatibility with Perl, they are
@@ -5365,16 +5402,20 @@ for (;; ptr++)
CLASS_SINGLE_CHARACTER:
if (class_one_char < 2) class_one_char++;
- /* If class_one_char is 1, we have the first single character in the
- class, and there have been no prior ranges, or XCLASS items generated by
- escapes. If this is the final character in the class, we can optimize by
- turning the item into a 1-character OP_CHAR[I] if it's positive, or
- OP_NOT[I] if it's negative. In the positive case, it can cause firstchar
- to be set. Otherwise, there can be no first char if this item is first,
- whatever repeat count may follow. In the case of reqchar, save the
- previous value for reinstating. */
+ /* If xclass_has_prop is false and class_one_char is 1, we have the first
+ single character in the class, and there have been no prior ranges, or
+ XCLASS items generated by escapes. If this is the final character in the
+ class, we can optimize by turning the item into a 1-character OP_CHAR[I]
+ if it's positive, or OP_NOT[I] if it's negative. In the positive case, it
+ can cause firstchar to be set. Otherwise, there can be no first char if
+ this item is first, whatever repeat count may follow. In the case of
+ reqchar, save the previous value for reinstating. */
- if (!inescq && class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ if (!inescq &&
+#ifdef SUPPORT_UCP
+ !xclass_has_prop &&
+#endif
+ class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
ptr++;
zeroreqchar = reqchar;
@@ -5490,9 +5531,10 @@ for (;; ptr++)
actual compiled code. */
#ifdef SUPPORT_UTF
- if (xclass && (!should_flip_negation || (options & PCRE_UCP) != 0))
+ if (xclass && (xclass_has_prop || !should_flip_negation ||
+ (options & PCRE_UCP) != 0))
#elif !defined COMPILE_PCRE8
- if (xclass && !should_flip_negation)
+ if (xclass && (xclass_has_prop || !should_flip_negation))
#endif
#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
{
@@ -5928,7 +5970,7 @@ for (;; ptr++)
{
register int i;
int len = (int)(code - previous);
- size_t base_hwm_offset = save_hwm_offset;
+ size_t base_hwm_offset = item_hwm_offset;
pcre_uchar *bralink = NULL;
pcre_uchar *brazeroptr = NULL;
@@ -5983,7 +6025,7 @@ for (;; ptr++)
if (repeat_max <= 1) /* Covers 0, 1, and unlimited */
{
*code = OP_END;
- adjust_recurse(previous, 1, utf, cd, save_hwm_offset);
+ adjust_recurse(previous, 1, utf, cd, item_hwm_offset);
memmove(previous + 1, previous, IN_UCHARS(len));
code++;
if (repeat_max == 0)
@@ -6007,7 +6049,7 @@ for (;; ptr++)
{
int offset;
*code = OP_END;
- adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, save_hwm_offset);
+ adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, item_hwm_offset);
memmove(previous + 2 + LINK_SIZE, previous, IN_UCHARS(len));
code += 2 + LINK_SIZE;
*previous++ = OP_BRAZERO + repeat_type;
@@ -6252,6 +6294,12 @@ for (;; ptr++)
while (*scode == OP_ALT);
}
+ /* A conditional group with only one branch has an implicit empty
+ alternative branch. */
+
+ if (*bracode == OP_COND && bracode[GET(bracode,1)] != OP_ALT)
+ *bracode = OP_SCOND;
+
/* Handle possessive quantifiers. */
if (possessive_quantifier)
@@ -6265,11 +6313,11 @@ for (;; ptr++)
{
int nlen = (int)(code - bracode);
*code = OP_END;
- adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, save_hwm_offset);
+ adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, item_hwm_offset);
memmove(bracode + 1 + LINK_SIZE, bracode, IN_UCHARS(nlen));
code += 1 + LINK_SIZE;
nlen += 1 + LINK_SIZE;
- *bracode = OP_BRAPOS;
+ *bracode = (*bracode == OP_COND)? OP_BRAPOS : OP_SBRAPOS;
*code++ = OP_KETRPOS;
PUTINC(code, 0, nlen);
PUT(bracode, 1, nlen);
@@ -6399,7 +6447,7 @@ for (;; ptr++)
else
{
*code = OP_END;
- adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm_offset);
+ adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, item_hwm_offset);
memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
code += 1 + LINK_SIZE;
len += 1 + LINK_SIZE;
@@ -6448,7 +6496,7 @@ for (;; ptr++)
default:
*code = OP_END;
- adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm_offset);
+ adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, item_hwm_offset);
memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
code += 1 + LINK_SIZE;
len += 1 + LINK_SIZE;
@@ -6584,9 +6632,17 @@ for (;; ptr++)
goto FAILED;
}
setverb = *code++ = verbs[i].op_arg;
- *code++ = arglen;
- memcpy(code, arg, IN_UCHARS(arglen));
- code += arglen;
+ if (lengthptr != NULL) /* In pass 1 just add in the length */
+ { /* to avoid potential workspace */
+ *lengthptr += arglen; /* overflow. */
+ *code++ = 0;
+ }
+ else
+ {
+ *code++ = arglen;
+ memcpy(code, arg, IN_UCHARS(arglen));
+ code += arglen;
+ }
*code++ = 0;
}
@@ -6621,7 +6677,7 @@ for (;; ptr++)
newoptions = options;
skipbytes = 0;
bravalue = OP_CBRA;
- save_hwm_offset = cd->hwm - cd->start_workspace;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
reset_bracount = FALSE;
/* Deal with the extended parentheses; all are introduced by '?', and the
@@ -6639,6 +6695,7 @@ for (;; ptr++)
/* ------------------------------------------------------------ */
case CHAR_VERTICAL_LINE: /* Reset capture count for each branch */
reset_bracount = TRUE;
+ cd->dupgroups = TRUE; /* Record (?| encountered */
/* Fall through */
/* ------------------------------------------------------------ */
@@ -6739,6 +6796,12 @@ for (;; ptr++)
{
while (IS_DIGIT(*ptr))
{
+ if (recno > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ while (IS_DIGIT(*ptr)) ptr++;
+ *errorcodeptr = ERR61;
+ goto FAILED;
+ }
recno = recno * 10 + (int)(*ptr - CHAR_0);
ptr++;
}
@@ -6767,7 +6830,7 @@ for (;; ptr++)
ptr++;
}
namelen = (int)(ptr - name);
- if (lengthptr != NULL) *lengthptr += IMM2_SIZE;
+ if (lengthptr != NULL) skipbytes += IMM2_SIZE;
}
/* Check the terminator */
@@ -6873,6 +6936,11 @@ for (;; ptr++)
*errorcodeptr = ERR15;
goto FAILED;
}
+ if (recno > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ *errorcodeptr = ERR61;
+ goto FAILED;
+ }
recno = recno * 10 + name[i] - CHAR_0;
}
if (recno == 0) recno = RREF_ANY;
@@ -7149,6 +7217,7 @@ for (;; ptr++)
if (lengthptr != NULL)
{
named_group *ng;
+ recno = 0;
if (namelen == 0)
{
@@ -7166,20 +7235,6 @@ for (;; ptr++)
goto FAILED;
}
- /* The name table does not exist in the first pass; instead we must
- scan the list of names encountered so far in order to get the
- number. If the name is not found, set the value to 0 for a forward
- reference. */
-
- ng = cd->named_groups;
- for (i = 0; i < cd->names_found; i++, ng++)
- {
- if (namelen == ng->length &&
- STRNCMP_UC_UC(name, ng->name, namelen) == 0)
- break;
- }
- recno = (i < cd->names_found)? ng->number : 0;
-
/* Count named back references. */
if (!is_recurse) cd->namedrefcount++;
@@ -7189,6 +7244,56 @@ for (;; ptr++)
16-bit data item. */
*lengthptr += IMM2_SIZE;
+
+ /* If this is a forward reference and we are within a (?|...) group,
+ the reference may end up as the number of a group which we are
+ currently inside, that is, it could be a recursive reference. In the
+ real compile this will be picked up and the reference wrapped with
+ OP_ONCE to make it atomic, so we must space in case this occurs. */
+
+ /* In fact, this can happen for a non-forward reference because
+ another group with the same number might be created later. This
+ issue is fixed "properly" in PCRE2. As PCRE1 is now in maintenance
+ only mode, we finesse the bug by allowing more memory always. */
+
+ *lengthptr += 2 + 2*LINK_SIZE;
+
+ /* It is even worse than that. The current reference may be to an
+ existing named group with a different number (so apparently not
+ recursive) but which later on is also attached to a group with the
+ current number. This can only happen if $(| has been previous
+ encountered. In that case, we allow yet more memory, just in case.
+ (Again, this is fixed "properly" in PCRE2. */
+
+ if (cd->dupgroups) *lengthptr += 4 + 4*LINK_SIZE;
+
+ /* Otherwise, check for recursion here. The name table does not exist
+ in the first pass; instead we must scan the list of names encountered
+ so far in order to get the number. If the name is not found, leave
+ the value of recno as 0 for a forward reference. */
+
+ else
+ {
+ ng = cd->named_groups;
+ for (i = 0; i < cd->names_found; i++, ng++)
+ {
+ if (namelen == ng->length &&
+ STRNCMP_UC_UC(name, ng->name, namelen) == 0)
+ {
+ open_capitem *oc;
+ recno = ng->number;
+ if (is_recurse) break;
+ for (oc = cd->open_caps; oc != NULL; oc = oc->next)
+ {
+ if (oc->number == recno)
+ {
+ oc->flag = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ }
}
/* In the real compile, search the name table. We check the name
@@ -7235,8 +7340,6 @@ for (;; ptr++)
for (i++; i < cd->names_found; i++)
{
if (STRCMP_UC_UC(slot + IMM2_SIZE, cslot + IMM2_SIZE) != 0) break;
-
-
count++;
cslot += cd->name_entry_size;
}
@@ -7245,6 +7348,7 @@ for (;; ptr++)
{
if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
*code++ = ((options & PCRE_CASELESS) != 0)? OP_DNREFI : OP_DNREF;
PUT2INC(code, 0, index);
PUT2INC(code, 0, count);
@@ -7282,9 +7386,14 @@ for (;; ptr++)
/* ------------------------------------------------------------ */
- case CHAR_R: /* Recursion */
- ptr++; /* Same as (?0) */
- /* Fall through */
+ case CHAR_R: /* Recursion, same as (?0) */
+ recno = 0;
+ if (*(++ptr) != CHAR_RIGHT_PARENTHESIS)
+ {
+ *errorcodeptr = ERR29;
+ goto FAILED;
+ }
+ goto HANDLE_RECURSION;
/* ------------------------------------------------------------ */
@@ -7321,7 +7430,15 @@ for (;; ptr++)
recno = 0;
while(IS_DIGIT(*ptr))
+ {
+ if (recno > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ while (IS_DIGIT(*ptr)) ptr++;
+ *errorcodeptr = ERR61;
+ goto FAILED;
+ }
recno = recno * 10 + *ptr++ - CHAR_0;
+ }
if (*ptr != (pcre_uchar)terminator)
{
@@ -7358,6 +7475,7 @@ for (;; ptr++)
HANDLE_RECURSION:
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
called = cd->start_code;
/* When we are actually compiling, find the bracket that is being
@@ -7559,7 +7677,11 @@ for (;; ptr++)
previous = NULL;
cd->iscondassert = FALSE;
}
- else previous = code;
+ else
+ {
+ previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
+ }
*code = bravalue;
tempcode = code;
@@ -7807,7 +7929,7 @@ for (;; ptr++)
const pcre_uchar *p;
pcre_uint32 cf;
- save_hwm_offset = cd->hwm - cd->start_workspace; /* Normally this is set when '(' is read */
+ item_hwm_offset = cd->hwm - cd->start_workspace; /* Normally this is set when '(' is read */
terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
@@ -7836,7 +7958,7 @@ for (;; ptr++)
if (*p != (pcre_uchar)terminator)
{
*errorcodeptr = ERR57;
- break;
+ goto FAILED;
}
ptr++;
goto HANDLE_NUMERICAL_RECURSION;
@@ -7851,7 +7973,7 @@ for (;; ptr++)
ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
{
*errorcodeptr = ERR69;
- break;
+ goto FAILED;
}
is_recurse = FALSE;
terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
@@ -7875,6 +7997,7 @@ for (;; ptr++)
HANDLE_REFERENCE:
if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
*code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
PUT2INC(code, 0, recno);
cd->backref_map |= (recno < 32)? (1 << recno) : 1;
@@ -7904,6 +8027,7 @@ for (;; ptr++)
if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
goto FAILED;
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
*code++ = ((escape == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
*code++ = ptype;
*code++ = pdata;
@@ -7944,6 +8068,7 @@ for (;; ptr++)
{
previous = (escape > ESC_b && escape < ESC_Z)? code : NULL;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
*code++ = (!utf && escape == ESC_C)? OP_ALLANY : escape;
}
}
@@ -7987,6 +8112,7 @@ for (;; ptr++)
ONE_CHAR:
previous = code;
+ item_hwm_offset = cd->hwm - cd->start_workspace;
/* For caseless UTF-8 mode when UCP support is available, check whether
this character has more than one other case. If so, generate a special
@@ -9162,6 +9288,7 @@ cd->names_found = 0;
cd->name_entry_size = 0;
cd->name_table = NULL;
cd->dupnames = FALSE;
+cd->dupgroups = FALSE;
cd->namedrefcount = 0;
cd->start_code = cworkspace;
cd->hwm = cworkspace;
@@ -9334,6 +9461,16 @@ if (cd->hwm > cd->start_workspace)
int offset, recno;
cd->hwm -= LINK_SIZE;
offset = GET(cd->hwm, 0);
+
+ /* Check that the hwm handling hasn't gone wrong. This whole area is
+ rewritten in PCRE2 because there are some obscure cases. */
+
+ if (offset == 0 || codestart[offset-1] != OP_RECURSE)
+ {
+ errorcode = ERR10;
+ break;
+ }
+
recno = GET(codestart, offset);
if (recno != prev_recno)
{
@@ -9364,7 +9501,7 @@ used in this code because at least one compiler gives a warning about loss of
"const" attribute if the cast (pcre_uchar *)codestart is used directly in the
function call. */
-if ((options & PCRE_NO_AUTO_POSSESS) == 0)
+if (errorcode == 0 && (options & PCRE_NO_AUTO_POSSESS) == 0)
{
pcre_uchar *temp = (pcre_uchar *)codestart;
auto_possessify(temp, utf, cd);
@@ -9378,7 +9515,7 @@ OP_RECURSE that are not fixed length get a diagnosic with a useful offset. The
exceptional ones forgo this. We scan the pattern to check that they are fixed
length, and set their lengths. */
-if (cd->check_lookbehind)
+if (errorcode == 0 && cd->check_lookbehind)
{
pcre_uchar *cc = (pcre_uchar *)codestart;
@@ -9591,4 +9728,3 @@ return (pcre32 *)re;
}
/* End of pcre_compile.c */
-
diff --git a/ext/pcre/pcrelib/pcre_exec.c b/ext/pcre/pcrelib/pcre_exec.c
index f64a1410cd..c783ff6e7e 100644
--- a/ext/pcre/pcrelib/pcre_exec.c
+++ b/ext/pcre/pcrelib/pcre_exec.c
@@ -686,7 +686,7 @@ the alternative names that are used. */
#define foc number
#define save_mark data
-/* These statements are here to stop the compiler complaining about uninitialized
+/* These statements are here to stop the compiler complaining about unitialized
variables. */
#ifdef SUPPORT_UCP
@@ -6683,7 +6683,8 @@ if (md->offset_vector != NULL)
register int *iend = iptr - re->top_bracket;
if (iend < md->offset_vector + 2) iend = md->offset_vector + 2;
while (--iptr >= iend) *iptr = -1;
- md->offset_vector[0] = md->offset_vector[1] = -1;
+ if (offsetcount > 0) md->offset_vector[0] = -1;
+ if (offsetcount > 1) md->offset_vector[1] = -1;
}
/* Set up the first character to match, if available. The first_char value is
diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h
index dd0ac7fc91..f7a5ee7aa6 100644
--- a/ext/pcre/pcrelib/pcre_internal.h
+++ b/ext/pcre/pcrelib/pcre_internal.h
@@ -984,7 +984,7 @@ other. NOTE: The values also appear in pcre_jit_compile.c. */
#ifndef EBCDIC
#define HSPACE_LIST \
- CHAR_HT, CHAR_SPACE, 0xa0, \
+ CHAR_HT, CHAR_SPACE, CHAR_NBSP, \
0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, \
0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202f, 0x205f, 0x3000, \
NOTACHAR
@@ -1010,7 +1010,7 @@ other. NOTE: The values also appear in pcre_jit_compile.c. */
#define HSPACE_BYTE_CASES \
case CHAR_HT: \
case CHAR_SPACE: \
- case 0xa0 /* NBSP */
+ case CHAR_NBSP
#define HSPACE_CASES \
HSPACE_BYTE_CASES: \
@@ -1037,11 +1037,12 @@ other. NOTE: The values also appear in pcre_jit_compile.c. */
/* ------ EBCDIC environments ------ */
#else
-#define HSPACE_LIST CHAR_HT, CHAR_SPACE
+#define HSPACE_LIST CHAR_HT, CHAR_SPACE, CHAR_NBSP, NOTACHAR
#define HSPACE_BYTE_CASES \
case CHAR_HT: \
- case CHAR_SPACE
+ case CHAR_SPACE: \
+ case CHAR_NBSP
#define HSPACE_CASES HSPACE_BYTE_CASES
@@ -1215,6 +1216,7 @@ same code point. */
#define CHAR_ESC '\047'
#define CHAR_DEL '\007'
+#define CHAR_NBSP '\x41'
#define STR_ESC "\047"
#define STR_DEL "\007"
@@ -1229,6 +1231,7 @@ a positive value. */
#define CHAR_NEL ((unsigned char)'\x85')
#define CHAR_ESC '\033'
#define CHAR_DEL '\177'
+#define CHAR_NBSP ((unsigned char)'\xa0')
#define STR_LF "\n"
#define STR_NL STR_LF
@@ -1606,6 +1609,7 @@ only. */
#define CHAR_VERTICAL_LINE '\174'
#define CHAR_RIGHT_CURLY_BRACKET '\175'
#define CHAR_TILDE '\176'
+#define CHAR_NBSP ((unsigned char)'\xa0')
#define STR_HT "\011"
#define STR_VT "\013"
@@ -1762,6 +1766,10 @@ only. */
/* Escape items that are just an encoding of a particular data value. */
+#ifndef ESC_a
+#define ESC_a CHAR_BEL
+#endif
+
#ifndef ESC_e
#define ESC_e CHAR_ESC
#endif
@@ -2446,6 +2454,7 @@ typedef struct compile_data {
BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
BOOL check_lookbehind; /* Lookbehinds need later checking */
BOOL dupnames; /* Duplicate names exist */
+ BOOL dupgroups; /* Duplicate groups exist: (?| found */
BOOL iscondassert; /* Next assert is a condition */
int nltype; /* Newline type */
int nllen; /* Newline string length */
diff --git a/ext/pcre/pcrelib/pcre_jit_compile.c b/ext/pcre/pcrelib/pcre_jit_compile.c
index debdf6ef45..445de0cbef 100644
--- a/ext/pcre/pcrelib/pcre_jit_compile.c
+++ b/ext/pcre/pcrelib/pcre_jit_compile.c
@@ -1064,6 +1064,7 @@ pcre_uchar *alternative;
pcre_uchar *end = NULL;
int private_data_ptr = *private_data_start;
int space, size, bracketlen;
+BOOL repeat_check = TRUE;
while (cc < ccend)
{
@@ -1071,9 +1072,10 @@ while (cc < ccend)
size = 0;
bracketlen = 0;
if (private_data_ptr > SLJIT_MAX_LOCAL_SIZE)
- return;
+ break;
- if (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND)
+ if (repeat_check && (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND))
+ {
if (detect_repeat(common, cc))
{
/* These brackets are converted to repeats, so no global
@@ -1081,6 +1083,8 @@ while (cc < ccend)
if (cc >= end)
end = bracketend(cc);
}
+ }
+ repeat_check = TRUE;
switch(*cc)
{
@@ -1136,6 +1140,13 @@ while (cc < ccend)
bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
break;
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ repeat_check = FALSE;
+ size = 1;
+ break;
+
CASE_ITERATOR_PRIVATE_DATA_1
space = 1;
size = -2;
@@ -1162,12 +1173,17 @@ while (cc < ccend)
size = 1;
break;
- CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+ case OP_TYPEUPTO:
if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI)
space = 2;
size = 1 + IMM2_SIZE;
break;
+ case OP_TYPEMINUPTO:
+ space = 2;
+ size = 1 + IMM2_SIZE;
+ break;
+
case OP_CLASS:
case OP_NCLASS:
size += 1 + 32 / sizeof(pcre_uchar);
@@ -1316,6 +1332,13 @@ while (cc < ccend)
cc += 1 + LINK_SIZE + IMM2_SIZE;
break;
+ case OP_THEN:
+ stack_restore = TRUE;
+ if (common->control_head_ptr != 0)
+ *needs_control_head = TRUE;
+ cc ++;
+ break;
+
default:
stack_restore = TRUE;
/* Fall through. */
@@ -2220,6 +2243,7 @@ while (current != NULL)
SLJIT_ASSERT_STOP();
break;
}
+ SLJIT_ASSERT(current > (sljit_sw*)current[-1]);
current = (sljit_sw*)current[-1];
}
return -1;
@@ -3209,7 +3233,7 @@ bytes[len] = byte;
bytes[0] = len;
}
-static int scan_prefix(compiler_common *common, pcre_uchar *cc, pcre_uint32 *chars, pcre_uint8 *bytes, int max_chars)
+static int scan_prefix(compiler_common *common, pcre_uchar *cc, pcre_uint32 *chars, pcre_uint8 *bytes, int max_chars, pcre_uint32 *rec_count)
{
/* Recursive function, which scans prefix literals. */
BOOL last, any, caseless;
@@ -3227,9 +3251,14 @@ pcre_uchar othercase[1];
repeat = 1;
while (TRUE)
{
+ if (*rec_count == 0)
+ return 0;
+ (*rec_count)--;
+
last = TRUE;
any = FALSE;
caseless = FALSE;
+
switch (*cc)
{
case OP_CHARI:
@@ -3291,7 +3320,7 @@ while (TRUE)
#ifdef SUPPORT_UTF
if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc);
#endif
- max_chars = scan_prefix(common, cc + len, chars, bytes, max_chars);
+ max_chars = scan_prefix(common, cc + len, chars, bytes, max_chars, rec_count);
if (max_chars == 0)
return consumed;
last = FALSE;
@@ -3314,7 +3343,7 @@ while (TRUE)
alternative = cc + GET(cc, 1);
while (*alternative == OP_ALT)
{
- max_chars = scan_prefix(common, alternative + 1 + LINK_SIZE, chars, bytes, max_chars);
+ max_chars = scan_prefix(common, alternative + 1 + LINK_SIZE, chars, bytes, max_chars, rec_count);
if (max_chars == 0)
return consumed;
alternative += GET(alternative, 1);
@@ -3556,6 +3585,7 @@ int i, max, from;
int range_right = -1, range_len = 3 - 1;
sljit_ub *update_table = NULL;
BOOL in_range;
+pcre_uint32 rec_count;
for (i = 0; i < MAX_N_CHARS; i++)
{
@@ -3564,7 +3594,8 @@ for (i = 0; i < MAX_N_CHARS; i++)
bytes[i * MAX_N_BYTES] = 0;
}
-max = scan_prefix(common, common->start, chars, bytes, MAX_N_CHARS);
+rec_count = 10000;
+max = scan_prefix(common, common->start, chars, bytes, MAX_N_CHARS, &rec_count);
if (max <= 1)
return FALSE;
@@ -4311,8 +4342,10 @@ switch(length)
case 4:
if ((ranges[1] - ranges[0]) == (ranges[3] - ranges[2])
&& (ranges[0] | (ranges[2] - ranges[0])) == ranges[2]
+ && (ranges[1] & (ranges[2] - ranges[0])) == 0
&& is_powerof2(ranges[2] - ranges[0]))
{
+ SLJIT_ASSERT((ranges[0] & (ranges[2] - ranges[0])) == 0 && (ranges[2] & ranges[3] & (ranges[2] - ranges[0])) != 0);
OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[0]);
if (ranges[2] + 1 != ranges[3])
{
@@ -4900,9 +4933,10 @@ else if ((cc[-1] & XCL_MAP) != 0)
if (!check_class_ranges(common, (const pcre_uint8 *)cc, FALSE, TRUE, list))
{
#ifdef COMPILE_PCRE8
- SLJIT_ASSERT(common->utf);
+ jump = NULL;
+ if (common->utf)
#endif
- jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
@@ -4911,7 +4945,10 @@ else if ((cc[-1] & XCL_MAP) != 0)
OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
add_jump(compiler, list, JUMP(SLJIT_NOT_ZERO));
- JUMPHERE(jump);
+#ifdef COMPILE_PCRE8
+ if (common->utf)
+#endif
+ JUMPHERE(jump);
}
OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
@@ -5219,7 +5256,7 @@ while (*cc != XCL_END)
OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
SET_CHAR_OFFSET(0);
- OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xff);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x7f);
OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
SET_TYPE_OFFSET(ucp_Pc);
@@ -7665,6 +7702,10 @@ while (*cc != OP_KETRPOS)
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
}
+ /* Even if the match is empty, we need to reset the control head. */
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
add_jump(compiler, &emptymatch, CMP(SLJIT_EQUAL, TMP1, 0, STR_PTR, 0));
@@ -7692,6 +7733,10 @@ while (*cc != OP_KETRPOS)
OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw), STR_PTR, 0);
}
+ /* Even if the match is empty, we need to reset the control head. */
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
add_jump(compiler, &emptymatch, CMP(SLJIT_EQUAL, TMP1, 0, STR_PTR, 0));
@@ -7704,9 +7749,6 @@ while (*cc != OP_KETRPOS)
}
}
- if (needs_control_head)
- OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
-
JUMPTO(SLJIT_JUMP, loop);
flush_stubs(common);
@@ -8441,8 +8483,7 @@ while (cc < ccend)
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), STR_PTR, 0);
}
BACKTRACK_AS(braminzero_backtrack)->matchingpath = LABEL();
- if (cc[1] > OP_ASSERTBACK_NOT)
- count_match(common);
+ count_match(common);
break;
case OP_ONCE:
@@ -9624,7 +9665,7 @@ static SLJIT_INLINE void compile_recurse(compiler_common *common)
DEFINE_COMPILER;
pcre_uchar *cc = common->start + common->currententry->start;
pcre_uchar *ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);
-pcre_uchar *ccend = bracketend(cc);
+pcre_uchar *ccend = bracketend(cc) - (1 + LINK_SIZE);
BOOL needs_control_head;
int framesize = get_framesize(common, cc, NULL, TRUE, &needs_control_head);
int private_data_size = get_private_data_copy_length(common, ccbegin, ccend, needs_control_head);
@@ -9648,6 +9689,7 @@ set_jumps(common->currententry->calls, common->currententry->entry);
sljit_emit_fast_enter(compiler, TMP2, 0);
allocate_stack(common, private_data_size + framesize + alternativesize);
+count_match(common);
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);
copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
if (needs_control_head)
@@ -9992,6 +10034,7 @@ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
OP1(SLJIT_MOV_UI, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, limit_match));
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, base));
OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LIMIT_MATCH, TMP1, 0);
if (mode == JIT_PARTIAL_SOFT_COMPILE)
diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c
index cc20b28c5c..38ab820853 100644
--- a/ext/pcre/pcrelib/pcre_study.c
+++ b/ext/pcre/pcrelib/pcre_study.c
@@ -69,6 +69,7 @@ Arguments:
startcode pointer to start of the whole pattern's code
options the compiling options
recurses chain of recurse_check to catch mutual recursion
+ countptr pointer to call count (to catch over complexity)
Returns: the minimum length
-1 if \C in UTF-8 mode or (*ACCEPT) was encountered
@@ -78,7 +79,8 @@ Returns: the minimum length
static int
find_minlength(const REAL_PCRE *re, const pcre_uchar *code,
- const pcre_uchar *startcode, int options, recurse_check *recurses)
+ const pcre_uchar *startcode, int options, recurse_check *recurses,
+ int *countptr)
{
int length = -1;
/* PCRE_UTF16 has the same value as PCRE_UTF8. */
@@ -88,6 +90,8 @@ recurse_check this_recurse;
register int branchlength = 0;
register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE;
+if ((*countptr)++ > 1000) return -1; /* too complex */
+
if (*code == OP_CBRA || *code == OP_SCBRA ||
*code == OP_CBRAPOS || *code == OP_SCBRAPOS) cc += IMM2_SIZE;
@@ -129,7 +133,7 @@ for (;;)
case OP_SBRAPOS:
case OP_ONCE:
case OP_ONCE_NC:
- d = find_minlength(re, cc, startcode, options, recurses);
+ d = find_minlength(re, cc, startcode, options, recurses, countptr);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
@@ -413,7 +417,8 @@ for (;;)
int dd;
this_recurse.prev = recurses;
this_recurse.group = cs;
- dd = find_minlength(re, cs, startcode, options, &this_recurse);
+ dd = find_minlength(re, cs, startcode, options, &this_recurse,
+ countptr);
if (dd < d) d = dd;
}
}
@@ -449,7 +454,8 @@ for (;;)
{
this_recurse.prev = recurses;
this_recurse.group = cs;
- d = find_minlength(re, cs, startcode, options, &this_recurse);
+ d = find_minlength(re, cs, startcode, options, &this_recurse,
+ countptr);
}
}
}
@@ -512,7 +518,7 @@ for (;;)
this_recurse.prev = recurses;
this_recurse.group = cs;
branchlength += find_minlength(re, cs, startcode, options,
- &this_recurse);
+ &this_recurse, countptr);
}
}
cc += 1 + LINK_SIZE;
@@ -1451,6 +1457,7 @@ pcre32_study(const pcre32 *external_re, int options, const char **errorptr)
#endif
{
int min;
+int count = 0;
BOOL bits_set = FALSE;
pcre_uint8 start_bits[32];
PUBL(extra) *extra = NULL;
@@ -1537,7 +1544,7 @@ if ((re->options & PCRE_ANCHORED) == 0 &&
/* Find the minimum length of subject string. */
-switch(min = find_minlength(re, code, code, re->options, NULL))
+switch(min = find_minlength(re, code, code, re->options, NULL, &count))
{
case -2: *errorptr = "internal error: missing capturing bracket"; return NULL;
case -3: *errorptr = "internal error: opcode not recognized"; return NULL;
diff --git a/ext/pcre/pcrelib/pcre_xclass.c b/ext/pcre/pcrelib/pcre_xclass.c
index 6f800c20a9..782748f241 100644
--- a/ext/pcre/pcrelib/pcre_xclass.c
+++ b/ext/pcre/pcrelib/pcre_xclass.c
@@ -244,7 +244,7 @@ while ((t = *data++) != XCL_END)
case PT_PXPUNCT:
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P ||
- (c < 256 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
+ (c < 128 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
return !negated;
break;
diff --git a/ext/pcre/pcrelib/sljit/sljitConfig.h b/ext/pcre/pcrelib/sljit/sljitConfig.h
index 10364c3b60..1c8a521aa8 100644
--- a/ext/pcre/pcrelib/sljit/sljitConfig.h
+++ b/ext/pcre/pcrelib/sljit/sljitConfig.h
@@ -96,6 +96,15 @@
#define SLJIT_EXECUTABLE_ALLOCATOR 1
#endif
+/* Force cdecl calling convention even if a better calling
+ convention (e.g. fastcall) is supported by the C compiler.
+ If this option is enabled, C functions without
+ SLJIT_CALL can also be called from JIT code. */
+#ifndef SLJIT_USE_CDECL_CALLING_CONVENTION
+/* Disabled by default */
+#define SLJIT_USE_CDECL_CALLING_CONVENTION 0
+#endif
+
/* Return with error when an invalid argument is passed. */
#ifndef SLJIT_ARGUMENT_CHECKS
/* Disabled by default */
diff --git a/ext/pcre/pcrelib/sljit/sljitConfigInternal.h b/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
index 3284012f19..16e3547c93 100644
--- a/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
+++ b/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
@@ -468,7 +468,12 @@ typedef double sljit_d;
#ifndef SLJIT_CALL
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+#if (defined SLJIT_USE_CDECL_CALLING_CONVENTION && SLJIT_USE_CDECL_CALLING_CONVENTION)
+
+/* Force cdecl. */
+#define SLJIT_CALL
+
+#elif (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
#if defined(__GNUC__) && !defined(__APPLE__)
@@ -608,6 +613,12 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void);
#define SLJIT_LOCALS_OFFSET_BASE ((23 + 1) * sizeof(sljit_sw))
#endif
+#elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+
+#define SLJIT_NUMBER_OF_REGISTERS 10
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 5
+#define SLJIT_LOCALS_OFFSET_BASE 0
+
#elif (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
#define SLJIT_NUMBER_OF_REGISTERS 0
diff --git a/ext/pcre/pcrelib/sljit/sljitLir.c b/ext/pcre/pcrelib/sljit/sljitLir.c
index 5039a7e04e..0f1b1c9cce 100644
--- a/ext/pcre/pcrelib/sljit/sljitLir.c
+++ b/ext/pcre/pcrelib/sljit/sljitLir.c
@@ -845,8 +845,8 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *comp
}
static SLJIT_CONST char* op0_names[] = {
- (char*)"breakpoint", (char*)"nop",
- (char*)"lumul", (char*)"lsmul", (char*)"ludiv", (char*)"lsdiv",
+ (char*)"breakpoint", (char*)"nop", (char*)"lumul", (char*)"lsmul",
+ (char*)"udivmod", (char*)"sdivmod", (char*)"udivi", (char*)"sdivi"
};
static SLJIT_CONST char* op1_names[] = {
@@ -1036,7 +1036,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler
{
#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
CHECK_ARGUMENT((op >= SLJIT_BREAKPOINT && op <= SLJIT_LSMUL)
- || ((op & ~SLJIT_INT_OP) >= SLJIT_LUDIV && (op & ~SLJIT_INT_OP) <= SLJIT_LSDIV));
+ || ((op & ~SLJIT_INT_OP) >= SLJIT_UDIVMOD && (op & ~SLJIT_INT_OP) <= SLJIT_SDIVI));
CHECK_ARGUMENT(op < SLJIT_LUMUL || compiler->scratches >= 2);
#endif
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
@@ -1447,6 +1447,8 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_com
static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
{
+ SLJIT_UNUSED_ARG(offset);
+
#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
FUNCTION_CHECK_DST(dst, dstw);
#endif
@@ -1462,6 +1464,8 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_co
static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value)
{
+ SLJIT_UNUSED_ARG(init_value);
+
#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
FUNCTION_CHECK_DST(dst, dstw);
#endif
diff --git a/ext/pcre/pcrelib/sljit/sljitLir.h b/ext/pcre/pcrelib/sljit/sljitLir.h
index 24c0f60399..2e2e9ac09c 100644
--- a/ext/pcre/pcrelib/sljit/sljitLir.h
+++ b/ext/pcre/pcrelib/sljit/sljitLir.h
@@ -687,7 +687,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *
#define SLJIT_OP0_BASE 0
/* Flags: - (never set any flags)
- Note: breakpoint instruction is not supported by all architectures (namely ppc)
+ Note: breakpoint instruction is not supported by all architectures (e.g. ppc)
It falls back to SLJIT_NOP in those cases. */
#define SLJIT_BREAKPOINT (SLJIT_OP0_BASE + 0)
/* Flags: - (never set any flags)
@@ -696,24 +696,42 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *
#define SLJIT_NOP (SLJIT_OP0_BASE + 1)
/* Flags: - (may destroy flags)
Unsigned multiplication of SLJIT_R0 and SLJIT_R1.
- Result goes to SLJIT_R1:SLJIT_R0 (high:low) word */
+ Result is placed into SLJIT_R1:SLJIT_R0 (high:low) word */
#define SLJIT_LUMUL (SLJIT_OP0_BASE + 2)
/* Flags: - (may destroy flags)
Signed multiplication of SLJIT_R0 and SLJIT_R1.
- Result goes to SLJIT_R1:SLJIT_R0 (high:low) word */
+ Result is placed into SLJIT_R1:SLJIT_R0 (high:low) word */
#define SLJIT_LSMUL (SLJIT_OP0_BASE + 3)
/* Flags: I - (may destroy flags)
Unsigned divide of the value in SLJIT_R0 by the value in SLJIT_R1.
- The result is placed in SLJIT_R0 and the remainder goes to SLJIT_R1.
- Note: if SLJIT_R1 contains 0, the behaviour is undefined. */
-#define SLJIT_LUDIV (SLJIT_OP0_BASE + 4)
-#define SLJIT_ILUDIV (SLJIT_LUDIV | SLJIT_INT_OP)
+ The result is placed into SLJIT_R0 and the remainder into SLJIT_R1.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined. */
+#define SLJIT_UDIVMOD (SLJIT_OP0_BASE + 4)
+#define SLJIT_IUDIVMOD (SLJIT_UDIVMOD | SLJIT_INT_OP)
/* Flags: I - (may destroy flags)
Signed divide of the value in SLJIT_R0 by the value in SLJIT_R1.
- The result is placed in SLJIT_R0 and the remainder goes to SLJIT_R1.
- Note: if SLJIT_R1 contains 0, the behaviour is undefined. */
-#define SLJIT_LSDIV (SLJIT_OP0_BASE + 5)
-#define SLJIT_ILSDIV (SLJIT_LSDIV | SLJIT_INT_OP)
+ The result is placed into SLJIT_R0 and the remainder into SLJIT_R1.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined.
+ Note: if SLJIT_R1 is -1 and SLJIT_R0 is integer min (0x800..00),
+ the behaviour is undefined. */
+#define SLJIT_SDIVMOD (SLJIT_OP0_BASE + 5)
+#define SLJIT_ISDIVMOD (SLJIT_SDIVMOD | SLJIT_INT_OP)
+/* Flags: I - (may destroy flags)
+ Unsigned divide of the value in SLJIT_R0 by the value in SLJIT_R1.
+ The result is placed into SLJIT_R0. SLJIT_R1 preserves its value.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined.
+ Note: SLJIT_SDIV is single precision divide. */
+#define SLJIT_UDIVI (SLJIT_OP0_BASE + 6)
+#define SLJIT_IUDIVI (SLJIT_UDIVI | SLJIT_INT_OP)
+/* Flags: I - (may destroy flags)
+ Signed divide of the value in SLJIT_R0 by the value in SLJIT_R1.
+ The result is placed into SLJIT_R0. SLJIT_R1 preserves its value.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined.
+ Note: if SLJIT_R1 is -1 and SLJIT_R0 is integer min (0x800..00),
+ the behaviour is undefined.
+ Note: SLJIT_SDIV is single precision divide. */
+#define SLJIT_SDIVI (SLJIT_OP0_BASE + 7)
+#define SLJIT_ISDIVI (SLJIT_SDIVI | SLJIT_INT_OP)
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op);
@@ -851,34 +869,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler
sljit_si src1, sljit_sw src1w,
sljit_si src2, sljit_sw src2w);
-/* The following function is a helper function for sljit_emit_op_custom.
- It returns with the real machine register index ( >=0 ) of any SLJIT_R,
- SLJIT_S and SLJIT_SP registers.
-
- Note: it returns with -1 for virtual registers (only on x86-32). */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg);
-
-/* The following function is a helper function for sljit_emit_op_custom.
- It returns with the real machine register index of any SLJIT_FLOAT register.
-
- Note: the index is always an even number on ARM (except ARM-64), MIPS, and SPARC. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg);
-
-/* Any instruction can be inserted into the instruction stream by
- sljit_emit_op_custom. It has a similar purpose as inline assembly.
- The size parameter must match to the instruction size of the target
- architecture:
-
- x86: 0 < size <= 15. The instruction argument can be byte aligned.
- Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
- if size == 4, the instruction argument must be 4 byte aligned.
- Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, sljit_si size);
-
/* Returns with non-zero if fpu is available. */
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void);
@@ -1196,4 +1186,64 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct
#endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
+/* --------------------------------------------------------------------- */
+/* CPU specific functions */
+/* --------------------------------------------------------------------- */
+
+/* The following function is a helper function for sljit_emit_op_custom.
+ It returns with the real machine register index ( >=0 ) of any SLJIT_R,
+ SLJIT_S and SLJIT_SP registers.
+
+ Note: it returns with -1 for virtual registers (only on x86-32). */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg);
+
+/* The following function is a helper function for sljit_emit_op_custom.
+ It returns with the real machine register index of any SLJIT_FLOAT register.
+
+ Note: the index is always an even number on ARM (except ARM-64), MIPS, and SPARC. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg);
+
+/* Any instruction can be inserted into the instruction stream by
+ sljit_emit_op_custom. It has a similar purpose as inline assembly.
+ The size parameter must match to the instruction size of the target
+ architecture:
+
+ x86: 0 < size <= 15. The instruction argument can be byte aligned.
+ Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
+ if size == 4, the instruction argument must be 4 byte aligned.
+ Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_si size);
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+/* Returns with non-zero if sse2 is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_sse2_available(void);
+
+/* Returns with non-zero if cmov instruction is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_cmov_available(void);
+
+/* Emit a conditional mov instruction on x86 CPUs. This instruction
+ moves src to destination, if the condition is satisfied. Unlike
+ other arithmetic instructions, destination must be a register.
+ Before such instructions are emitted, cmov support should be
+ checked by sljit_x86_is_cmov_available function.
+ type must be between SLJIT_EQUAL and SLJIT_S_ORDERED
+ dst_reg must be a valid register and it can be combined
+ with SLJIT_INT_OP to perform 32 bit arithmetic
+ Flags: I - (never set any flags)
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_emit_cmov(struct sljit_compiler *compiler,
+ sljit_si type,
+ sljit_si dst_reg,
+ sljit_si src, sljit_sw srcw);
+
+#endif
+
#endif /* _SLJIT_LIR_H_ */
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c b/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
index aca1d31fdf..5cd4c71a29 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeARM_32.c
@@ -1833,18 +1833,33 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
| (reg_map[SLJIT_R0] << 8)
| reg_map[TMP_REG1]);
#endif
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
- if (compiler->scratches >= 3)
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
+ SLJIT_COMPILE_ASSERT((SLJIT_UDIVMOD & 0x2) == 0 && SLJIT_UDIVI - 0x2 == SLJIT_UDIVMOD, bad_div_opcode_assignments);
+ SLJIT_COMPILE_ASSERT(reg_map[2] == 1 && reg_map[3] == 2, bad_register_mapping);
+
+ if ((op >= SLJIT_UDIVI) && (compiler->scratches >= 3)) {
FAIL_IF(push_inst(compiler, 0xe52d2008 /* str r2, [sp, #-8]! */));
+ FAIL_IF(push_inst(compiler, 0xe58d1004 /* str r1, [sp, #4] */));
+ }
+ else if ((op >= SLJIT_UDIVI) || (compiler->scratches >= 3))
+ FAIL_IF(push_inst(compiler, 0xe52d0008 | (op >= SLJIT_UDIVI ? 0x1000 : 0x2000) /* str r1/r2, [sp, #-8]! */));
+
#if defined(__GNUC__)
FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
- (op == SLJIT_LUDIV ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
+ ((op | 0x2) == SLJIT_UDIVI ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
#else
#error "Software divmod functions are needed"
#endif
- if (compiler->scratches >= 3)
- return push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */);
+
+ if ((op >= SLJIT_UDIVI) && (compiler->scratches >= 3)) {
+ FAIL_IF(push_inst(compiler, 0xe59d1004 /* ldr r1, [sp, #4] */));
+ FAIL_IF(push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */));
+ }
+ else if ((op >= SLJIT_UDIVI) || (compiler->scratches >= 3))
+ return push_inst(compiler, 0xe49d0008 | (op >= SLJIT_UDIVI ? 0x1000 : 0x2000) /* ldr r1/r2, [sp], #8 */);
return SLJIT_SUCCESS;
}
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeARM_64.c b/ext/pcre/pcrelib/sljit/sljitNativeARM_64.c
index b66455f756..044a675eee 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeARM_64.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeARM_64.c
@@ -1087,14 +1087,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
saved_regs_size += sizeof(sljit_sw);
}
local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
- FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
+ if (saved_regs_size > 0)
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
}
tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
prev = -1;
for (i = SLJIT_S0; i >= tmp; i--) {
if (prev == -1) {
- prev = i;
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, STRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
continue;
}
FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
@@ -1104,7 +1110,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
if (prev == -1) {
- prev = i;
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, STRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
continue;
}
FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
@@ -1112,8 +1123,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
prev = -1;
}
- if (prev != -1)
- FAIL_IF(push_inst(compiler, STRI | RT(prev) | RN(TMP_SP) | (offs >> 5)));
+ SLJIT_ASSERT(prev == -1);
if (compiler->local_size > (63 * sizeof(sljit_sw))) {
/* The local_size is already adjusted by the saved registers. */
@@ -1188,7 +1198,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
prev = -1;
for (i = SLJIT_S0; i >= tmp; i--) {
if (prev == -1) {
- prev = i;
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, LDRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
continue;
}
FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
@@ -1198,7 +1213,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
if (prev == -1) {
- prev = i;
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, LDRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
continue;
}
FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
@@ -1206,13 +1226,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
prev = -1;
}
- if (prev != -1)
- FAIL_IF(push_inst(compiler, LDRI | RT(prev) | RN(TMP_SP) | (offs >> 5)));
+ SLJIT_ASSERT(prev == -1);
if (compiler->local_size <= (63 * sizeof(sljit_sw))) {
FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
| RN(TMP_SP) | (((local_size >> 3) & 0x7f) << 15)));
- } else {
+ } else if (saved_regs_size > 0) {
FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
}
@@ -1242,12 +1261,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
FAIL_IF(push_inst(compiler, ORR | RD(TMP_REG1) | RN(TMP_ZERO) | RM(SLJIT_R0)));
FAIL_IF(push_inst(compiler, MADD | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1) | RT2(TMP_ZERO)));
return push_inst(compiler, (op == SLJIT_LUMUL ? UMULH : SMULH) | RD(SLJIT_R1) | RN(TMP_REG1) | RM(SLJIT_R1));
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(TMP_REG1) | RN(TMP_ZERO) | RM(SLJIT_R0)));
- FAIL_IF(push_inst(compiler, ((op == SLJIT_LUDIV ? UDIV : SDIV) ^ inv_bits) | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1)));
+ FAIL_IF(push_inst(compiler, ((op == SLJIT_UDIVMOD ? UDIV : SDIV) ^ inv_bits) | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1)));
FAIL_IF(push_inst(compiler, (MADD ^ inv_bits) | RD(SLJIT_R1) | RN(SLJIT_R0) | RM(SLJIT_R1) | RT2(TMP_ZERO)));
return push_inst(compiler, (SUB ^ inv_bits) | RD(SLJIT_R1) | RN(TMP_REG1) | RM(SLJIT_R1));
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
+ return push_inst(compiler, ((op == SLJIT_UDIVI ? UDIV : SDIV) ^ inv_bits) | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1));
}
return SLJIT_SUCCESS;
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeARM_T2_32.c b/ext/pcre/pcrelib/sljit/sljitNativeARM_T2_32.c
index 6e38cec899..f9803f5d44 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeARM_T2_32.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeARM_T2_32.c
@@ -1239,6 +1239,9 @@ extern int __aeabi_idivmod(int numerator, int denominator);
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
{
+ sljit_sw saved_reg_list[3];
+ sljit_sw saved_reg_count;
+
CHECK_ERROR();
CHECK(check_sljit_emit_op0(compiler, op));
@@ -1255,24 +1258,53 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
| (reg_map[SLJIT_R0] << 12)
| (reg_map[SLJIT_R0] << 16)
| reg_map[SLJIT_R1]);
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
- if (compiler->scratches >= 4) {
- FAIL_IF(push_inst32(compiler, 0xf84d2d04 /* str r2, [sp, #-4]! */));
- FAIL_IF(push_inst32(compiler, 0xf84dcd04 /* str ip, [sp, #-4]! */));
- } else if (compiler->scratches >= 3)
- FAIL_IF(push_inst32(compiler, 0xf84d2d08 /* str r2, [sp, #-8]! */));
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
+ SLJIT_COMPILE_ASSERT((SLJIT_UDIVMOD & 0x2) == 0 && SLJIT_UDIVI - 0x2 == SLJIT_UDIVMOD, bad_div_opcode_assignments);
+ SLJIT_COMPILE_ASSERT(reg_map[2] == 1 && reg_map[3] == 2 && reg_map[4] == 12, bad_register_mapping);
+
+ saved_reg_count = 0;
+ if (compiler->scratches >= 4)
+ saved_reg_list[saved_reg_count++] = 12;
+ if (compiler->scratches >= 3)
+ saved_reg_list[saved_reg_count++] = 2;
+ if (op >= SLJIT_UDIVI)
+ saved_reg_list[saved_reg_count++] = 1;
+
+ if (saved_reg_count > 0) {
+ FAIL_IF(push_inst32(compiler, 0xf84d0d00 | (saved_reg_count >= 3 ? 16 : 8)
+ | (saved_reg_list[0] << 12) /* str rX, [sp, #-8/-16]! */));
+ if (saved_reg_count >= 2) {
+ SLJIT_ASSERT(saved_reg_list[1] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9001 | (saved_reg_list[1] << 8) /* str rX, [sp, #4] */));
+ }
+ if (saved_reg_count >= 3) {
+ SLJIT_ASSERT(saved_reg_list[2] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9002 | (saved_reg_list[2] << 8) /* str rX, [sp, #8] */));
+ }
+ }
+
#if defined(__GNUC__)
FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
- (op == SLJIT_LUDIV ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
+ ((op | 0x2) == SLJIT_UDIVI ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
#else
#error "Software divmod functions are needed"
#endif
- if (compiler->scratches >= 4) {
- FAIL_IF(push_inst32(compiler, 0xf85dcb04 /* ldr ip, [sp], #4 */));
- return push_inst32(compiler, 0xf85d2b04 /* ldr r2, [sp], #4 */);
- } else if (compiler->scratches >= 3)
- return push_inst32(compiler, 0xf85d2b08 /* ldr r2, [sp], #8 */);
+
+ if (saved_reg_count > 0) {
+ if (saved_reg_count >= 3) {
+ SLJIT_ASSERT(saved_reg_list[2] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9802 | (saved_reg_list[2] << 8) /* ldr rX, [sp, #8] */));
+ }
+ if (saved_reg_count >= 2) {
+ SLJIT_ASSERT(saved_reg_list[1] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9801 | (saved_reg_list[1] << 8) /* ldr rX, [sp, #4] */));
+ }
+ return push_inst32(compiler, 0xf85d0b00 | (saved_reg_count >= 3 ? 16 : 8)
+ | (saved_reg_list[0] << 12) /* ldr rX, [sp], #8/16 */);
+ }
return SLJIT_SUCCESS;
}
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c
index 3e2c9f0232..cf3535f81a 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c
@@ -1053,8 +1053,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
#endif
FAIL_IF(push_inst(compiler, MFLO | D(SLJIT_R0), DR(SLJIT_R0)));
return push_inst(compiler, MFHI | D(SLJIT_R1), DR(SLJIT_R1));
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
+ SLJIT_COMPILE_ASSERT((SLJIT_UDIVMOD & 0x2) == 0 && SLJIT_UDIVI - 0x2 == SLJIT_UDIVMOD, bad_div_opcode_assignments);
#if !(defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
@@ -1062,15 +1065,15 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
if (int_op)
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? DIVU : DIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_UDIVI ? DIVU : DIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
else
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? DDIVU : DDIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_UDIVI ? DDIVU : DDIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
#else
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? DIVU : DIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_UDIVI ? DIVU : DIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
#endif
FAIL_IF(push_inst(compiler, MFLO | D(SLJIT_R0), DR(SLJIT_R0)));
- return push_inst(compiler, MFHI | D(SLJIT_R1), DR(SLJIT_R1));
+ return (op >= SLJIT_UDIVI) ? SLJIT_SUCCESS : push_inst(compiler, MFHI | D(SLJIT_R1), DR(SLJIT_R1));
}
return SLJIT_SUCCESS;
diff --git a/ext/pcre/pcrelib/sljit/sljitNativePPC_common.c b/ext/pcre/pcrelib/sljit/sljitNativePPC_common.c
index 08d5356f5a..b6a043f4e4 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativePPC_common.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativePPC_common.c
@@ -1267,22 +1267,23 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R1)));
return push_inst(compiler, (op == SLJIT_LUMUL ? MULHWU : MULHW) | D(SLJIT_R1) | A(TMP_REG1) | B(SLJIT_R1));
#endif
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R0)));
#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
- if (int_op) {
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? DIVWU : DIVW) | D(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R1)));
- FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_R1) | A(SLJIT_R0) | B(SLJIT_R1)));
- } else {
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? DIVDU : DIVD) | D(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R1)));
- FAIL_IF(push_inst(compiler, MULLD | D(SLJIT_R1) | A(SLJIT_R0) | B(SLJIT_R1)));
- }
- return push_inst(compiler, SUBF | D(SLJIT_R1) | A(SLJIT_R1) | B(TMP_REG1));
+ FAIL_IF(push_inst(compiler, (int_op ? (op == SLJIT_UDIVMOD ? DIVWU : DIVW) : (op == SLJIT_UDIVMOD ? DIVDU : DIVD)) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1)));
+ FAIL_IF(push_inst(compiler, (int_op ? MULLW : MULLD) | D(SLJIT_R1) | A(SLJIT_R0) | B(SLJIT_R1)));
#else
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? DIVWU : DIVW) | D(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R1)));
+ FAIL_IF(push_inst(compiler, (op == SLJIT_UDIVMOD ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1)));
FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_R1) | A(SLJIT_R0) | B(SLJIT_R1)));
+#endif
return push_inst(compiler, SUBF | D(SLJIT_R1) | A(SLJIT_R1) | B(TMP_REG1));
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ return push_inst(compiler, (int_op ? (op == SLJIT_UDIVI ? DIVWU : DIVW) : (op == SLJIT_UDIVI ? DIVDU : DIVD)) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1));
+#else
+ return push_inst(compiler, (op == SLJIT_UDIVI ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1));
#endif
}
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeSPARC_common.c b/ext/pcre/pcrelib/sljit/sljitNativeSPARC_common.c
index 0b1927a824..327c4267be 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeSPARC_common.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeSPARC_common.c
@@ -777,20 +777,25 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
#else
#error "Implementation required"
#endif
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
+ SLJIT_COMPILE_ASSERT((SLJIT_UDIVMOD & 0x2) == 0 && SLJIT_UDIVI - 0x2 == SLJIT_UDIVMOD, bad_div_opcode_assignments);
#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
- if (op == SLJIT_LUDIV)
+ if ((op | 0x2) == SLJIT_UDIVI)
FAIL_IF(push_inst(compiler, WRY | S1(0), MOVABLE_INS));
else {
FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(SLJIT_R0) | IMM(31), DR(TMP_REG1)));
FAIL_IF(push_inst(compiler, WRY | S1(TMP_REG1), MOVABLE_INS));
}
- FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_R0), DR(TMP_REG2)));
- FAIL_IF(push_inst(compiler, (op == SLJIT_LUDIV ? UDIV : SDIV) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R0)));
+ if (op <= SLJIT_SDIVMOD)
+ FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_R0), DR(TMP_REG2)));
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_UDIVI ? UDIV : SDIV) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R0)));
+ if (op >= SLJIT_UDIVI)
+ return SLJIT_SUCCESS;
FAIL_IF(push_inst(compiler, SMUL | D(SLJIT_R1) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R1)));
- FAIL_IF(push_inst(compiler, SUB | D(SLJIT_R1) | S1(TMP_REG2) | S2(SLJIT_R1), DR(SLJIT_R1)));
- return SLJIT_SUCCESS;
+ return push_inst(compiler, SUB | D(SLJIT_R1) | S1(TMP_REG2) | S2(SLJIT_R1), DR(SLJIT_R1));
#else
#error "Implementation required"
#endif
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c b/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
index 1d6aa5a110..4d40392fa8 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c
@@ -35,21 +35,21 @@
#define SIMM_16BIT_MIN (-0x8000)
#define SIMM_17BIT_MAX (0xffff)
#define SIMM_17BIT_MIN (-0x10000)
-#define SIMM_32BIT_MIN (-0x80000000)
#define SIMM_32BIT_MAX (0x7fffffff)
-#define SIMM_48BIT_MIN (0x800000000000L)
+#define SIMM_32BIT_MIN (-0x7fffffff - 1)
#define SIMM_48BIT_MAX (0x7fffffff0000L)
+#define SIMM_48BIT_MIN (-0x800000000000L)
#define IMM16(imm) ((imm) & 0xffff)
#define UIMM_16BIT_MAX (0xffff)
-#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-#define ADDR_TMP (SLJIT_NO_REGISTERS + 4)
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define ADDR_TMP (SLJIT_NUMBER_OF_REGISTERS + 5)
#define PIC_ADDR_REG TMP_REG2
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
+static SLJIT_CONST sljit_ub reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
63, 0, 1, 2, 3, 4, 30, 31, 32, 33, 34, 54, 5, 16, 6, 7
};
@@ -58,11 +58,6 @@ static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
#define TMP_REG2_mapped 16
#define TMP_REG3_mapped 6
#define ADDR_TMP_mapped 7
-#define SLJIT_SAVED_REG1_mapped 30
-#define SLJIT_SAVED_REG2_mapped 31
-#define SLJIT_SAVED_REG3_mapped 32
-#define SLJIT_SAVED_EREG1_mapped 33
-#define SLJIT_SAVED_EREG2_mapped 34
/* Flags are keept in volatile registers. */
#define EQUAL_FLAG 8
@@ -399,6 +394,9 @@ static sljit_si push_inst(struct sljit_compiler *compiler, sljit_ins ins)
#define SUB(dst, srca, srcb) \
push_3_buffer(compiler, TILEGX_OPC_SUB, dst, srca, srcb, __LINE__)
+#define MUL(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_MULX, dst, srca, srcb, __LINE__)
+
#define NOR(dst, srca, srcb) \
push_3_buffer(compiler, TILEGX_OPC_NOR, dst, srca, srcb, __LINE__)
@@ -547,8 +545,8 @@ const struct Format* compute_format()
const struct Format* match = NULL;
const struct Format *b = NULL;
- unsigned int i = 0;
- for (i; i < sizeof formats / sizeof formats[0]; i++) {
+ unsigned int i;
+ for (i = 0; i < sizeof formats / sizeof formats[0]; i++) {
b = &formats[i];
if ((b->pipe_mask & compatible_pipes) == b->pipe_mask) {
match = b;
@@ -625,7 +623,6 @@ tilegx_bundle_bits get_bundle_bit(struct jit_instr *inst)
static sljit_si update_buffer(struct sljit_compiler *compiler)
{
- int count;
int i;
int orig_index = inst_buf_index;
struct jit_instr inst0 = inst_buf[0];
@@ -738,8 +735,10 @@ static sljit_si update_buffer(struct sljit_compiler *compiler)
static sljit_si flush_buffer(struct sljit_compiler *compiler)
{
- while (inst_buf_index != 0)
- update_buffer(compiler);
+ while (inst_buf_index != 0) {
+ FAIL_IF(update_buffer(compiler));
+ }
+ return SLJIT_SUCCESS;
}
static sljit_si push_4_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int op0, int op1, int op2, int op3, int line)
@@ -787,6 +786,7 @@ static sljit_si push_3_buffer(struct sljit_compiler *compiler, tilegx_mnemonic o
case TILEGX_OPC_ADD:
case TILEGX_OPC_AND:
case TILEGX_OPC_SUB:
+ case TILEGX_OPC_MULX:
case TILEGX_OPC_OR:
case TILEGX_OPC_XOR:
case TILEGX_OPC_NOR:
@@ -905,7 +905,6 @@ static SLJIT_INLINE sljit_ins * detect_jump_type(struct sljit_jump *jump, sljit_
sljit_sw diff;
sljit_uw target_addr;
sljit_ins *inst;
- sljit_ins saved_inst;
if (jump->flags & SLJIT_REWRITABLE_JUMP)
return code_ptr;
@@ -1009,7 +1008,7 @@ SLJIT_API_FUNC_ATTRIBUTE void * sljit_generate_code(struct sljit_compiler *compi
struct sljit_const *const_;
CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
+ CHECK_PTR(check_sljit_generate_code(compiler));
reverse_buf(compiler);
code = (sljit_ins *)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
@@ -1178,13 +1177,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
sljit_si fscratches, sljit_si fsaveds, sljit_si local_size)
{
sljit_ins base;
- sljit_ins bundle = 0;
-
+ sljit_si i, tmp;
+
CHECK_ERROR();
- check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
- local_size += (saveds + 1) * sizeof(sljit_sw);
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
local_size = (local_size + 7) & ~7;
compiler->local_size = local_size;
@@ -1200,56 +1199,52 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
local_size = 0;
}
+ /* Save the return address. */
FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 8));
FAIL_IF(ST_ADD(ADDR_TMP_mapped, RA, -8));
- if (saveds >= 1)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_REG1_mapped, -8));
-
- if (saveds >= 2)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_REG2_mapped, -8));
-
- if (saveds >= 3)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_REG3_mapped, -8));
-
- if (saveds >= 4)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_EREG1_mapped, -8));
-
- if (saveds >= 5)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_EREG2_mapped, -8));
-
- if (args >= 1)
- FAIL_IF(ADD(SLJIT_SAVED_REG1_mapped, 0, ZERO));
+ /* Save the S registers. */
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, reg_map[i], -8));
+ }
- if (args >= 2)
- FAIL_IF(ADD(SLJIT_SAVED_REG2_mapped, 1, ZERO));
+ /* Save the R registers that need to be reserved. */
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, reg_map[i], -8));
+ }
- if (args >= 3)
- FAIL_IF(ADD(SLJIT_SAVED_REG3_mapped, 2, ZERO));
+ /* Move the arguments to S registers. */
+ for (i = 0; i < args; i++) {
+ FAIL_IF(ADD(reg_map[SLJIT_S0 - i], i, ZERO));
+ }
return SLJIT_SUCCESS;
}
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler,
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler,
sljit_si options, sljit_si args, sljit_si scratches, sljit_si saveds,
sljit_si fscratches, sljit_si fsaveds, sljit_si local_size)
{
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
- local_size += (saveds + 1) * sizeof(sljit_sw);
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
compiler->local_size = (local_size + 7) & ~7;
+
+ return SLJIT_SUCCESS;
}
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
{
sljit_si local_size;
sljit_ins base;
- int addr_initialized = 0;
+ sljit_si i, tmp;
+ sljit_si saveds;
CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
@@ -1263,50 +1258,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
local_size = 0;
}
+ /* Restore the return address. */
FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 8));
- FAIL_IF(LD(RA, ADDR_TMP_mapped));
-
- if (compiler->saveds >= 5) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 48));
- addr_initialized = 1;
+ FAIL_IF(LD_ADD(RA, ADDR_TMP_mapped, -8));
- FAIL_IF(LD_ADD(SLJIT_SAVED_EREG2_mapped, ADDR_TMP_mapped, 8));
+ /* Restore the S registers. */
+ saveds = compiler->saveds;
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ FAIL_IF(LD_ADD(reg_map[i], ADDR_TMP_mapped, -8));
}
- if (compiler->saveds >= 4) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 40));
- addr_initialized = 1;
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_EREG1_mapped, ADDR_TMP_mapped, 8));
- }
-
- if (compiler->saveds >= 3) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 32));
- addr_initialized = 1;
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_REG3_mapped, ADDR_TMP_mapped, 8));
- }
-
- if (compiler->saveds >= 2) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 24));
- addr_initialized = 1;
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_REG2_mapped, ADDR_TMP_mapped, 8));
- }
-
- if (compiler->saveds >= 1) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 16));
- /* addr_initialized = 1; no need to initialize as it's the last one. */
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_REG1_mapped, ADDR_TMP_mapped, 8));
+ /* Restore the R registers that need to be reserved. */
+ for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ FAIL_IF(LD_ADD(reg_map[i], ADDR_TMP_mapped, -8));
}
if (compiler->local_size <= SIMM_16BIT_MAX)
@@ -1585,7 +1550,7 @@ static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
{
CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw);
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
ADJUST_LOCAL_OFFSET(dst, dstw);
/* For UNUSED dst. Uncommon, but possible. */
@@ -1602,7 +1567,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *c
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
{
CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
ADJUST_LOCAL_OFFSET(src, srcw);
if (FAST_IS_REG(src))
@@ -1636,9 +1601,11 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
if (op == SLJIT_MOV_SI)
return BFEXTS(reg_map[dst], reg_map[src2], 0, 31);
- return BFEXTU(reg_map[dst], reg_map[src2], 0, 31);
- } else if (dst != src2)
- SLJIT_ASSERT_STOP();
+ return BFEXTU(reg_map[dst], reg_map[src2], 0, 31);
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
return SLJIT_SUCCESS;
@@ -1650,8 +1617,10 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
return BFEXTS(reg_map[dst], reg_map[src2], 0, 7);
return BFEXTU(reg_map[dst], reg_map[src2], 0, 7);
- } else if (dst != src2)
- SLJIT_ASSERT_STOP();
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
return SLJIT_SUCCESS;
@@ -1663,8 +1632,10 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
return BFEXTS(reg_map[dst], reg_map[src2], 0, 15);
return BFEXTU(reg_map[dst], reg_map[src2], 0, 15);
- } else if (dst != src2)
- SLJIT_ASSERT_STOP();
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
return SLJIT_SUCCESS;
@@ -1811,7 +1782,6 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
else {
/* Rare ocasion. */
FAIL_IF(ADD(TMP_EREG2, reg_map[src1], ZERO));
-
overflow_ra = TMP_EREG2;
}
}
@@ -1903,6 +1873,17 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
return SLJIT_SUCCESS;
+ case SLJIT_MUL:
+ if (flags & SRC2_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG2_mapped, src2));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ FAIL_IF(MUL(reg_map[dst], reg_map[src1], reg_map[src2]));
+
+ return SLJIT_SUCCESS;
+
#define EMIT_LOGICAL(op_imm, op_norm) \
if (flags & SRC2_IMM) { \
FAIL_IF(load_immediate(compiler, ADDR_TMP_mapped, src2)); \
@@ -1950,8 +1931,8 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
} else { \
if (op & SLJIT_SET_E) \
FAIL_IF(push_3_buffer( \
- compiler, op_imm, reg_map[dst], reg_map[src1], \
- src2 & 0x3F, __LINE__)); \
+ compiler, op_norm, EQUAL_FLAG, reg_map[src1], \
+ reg_map[src2], __LINE__)); \
if (CHECK_FLAGS(SLJIT_SET_E)) \
FAIL_IF(push_3_buffer( \
compiler, op_norm, reg_map[dst], reg_map[src1], \
@@ -2105,66 +2086,61 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *com
{
sljit_si sugg_dst_ar, dst_ar;
sljit_si flags = GET_ALL_FLAGS(op);
+ sljit_si mem_type = (op & SLJIT_INT_OP) ? (INT_DATA | SIGNED_DATA) : WORD_DATA;
CHECK_ERROR();
- check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type);
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
ADJUST_LOCAL_OFFSET(dst, dstw);
if (dst == SLJIT_UNUSED)
return SLJIT_SUCCESS;
op = GET_OPCODE(op);
+ if (op == SLJIT_MOV_SI || op == SLJIT_MOV_UI)
+ mem_type = INT_DATA | SIGNED_DATA;
sugg_dst_ar = reg_map[(op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2];
compiler->cache_arg = 0;
compiler->cache_argw = 0;
if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
ADJUST_LOCAL_OFFSET(src, srcw);
- FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1_mapped, src, srcw, dst, dstw));
+ FAIL_IF(emit_op_mem2(compiler, mem_type | LOAD_DATA, TMP_REG1_mapped, src, srcw, dst, dstw));
src = TMP_REG1;
srcw = 0;
}
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_NOT_EQUAL:
+ switch (type & 0xff) {
+ case SLJIT_EQUAL:
+ case SLJIT_NOT_EQUAL:
FAIL_IF(CMPLTUI(sugg_dst_ar, EQUAL_FLAG, 1));
dst_ar = sugg_dst_ar;
break;
- case SLJIT_C_LESS:
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_LESS:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
+ case SLJIT_LESS:
+ case SLJIT_GREATER_EQUAL:
dst_ar = ULESS_FLAG;
break;
- case SLJIT_C_GREATER:
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_GREATER:
- case SLJIT_C_FLOAT_LESS_EQUAL:
+ case SLJIT_GREATER:
+ case SLJIT_LESS_EQUAL:
dst_ar = UGREATER_FLAG;
break;
- case SLJIT_C_SIG_LESS:
- case SLJIT_C_SIG_GREATER_EQUAL:
+ case SLJIT_SIG_LESS:
+ case SLJIT_SIG_GREATER_EQUAL:
dst_ar = LESS_FLAG;
break;
- case SLJIT_C_SIG_GREATER:
- case SLJIT_C_SIG_LESS_EQUAL:
+ case SLJIT_SIG_GREATER:
+ case SLJIT_SIG_LESS_EQUAL:
dst_ar = GREATER_FLAG;
break;
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_NOT_OVERFLOW:
+ case SLJIT_OVERFLOW:
+ case SLJIT_NOT_OVERFLOW:
dst_ar = OVERFLOW_FLAG;
break;
- case SLJIT_C_MUL_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
FAIL_IF(CMPLTUI(sugg_dst_ar, OVERFLOW_FLAG, 1));
dst_ar = sugg_dst_ar;
type ^= 0x1; /* Flip type bit for the XORI below. */
break;
- case SLJIT_C_FLOAT_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- dst_ar = EQUAL_FLAG;
- break;
default:
SLJIT_ASSERT_STOP();
@@ -2180,11 +2156,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *com
if (op >= SLJIT_ADD) {
if (TMP_REG2_mapped != dst_ar)
FAIL_IF(ADD(TMP_REG2_mapped, dst_ar, ZERO));
- return emit_op(compiler, op | flags, CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
+ return emit_op(compiler, op | flags, mem_type | CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
}
if (dst & SLJIT_MEM)
- return emit_op_mem(compiler, WORD_DATA, dst_ar, dst, dstw);
+ return emit_op_mem(compiler, mem_type, dst_ar, dst, dstw);
if (sugg_dst_ar != dst_ar)
return ADD(sugg_dst_ar, dst_ar, ZERO);
@@ -2194,7 +2170,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *com
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) {
CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
+ CHECK(check_sljit_emit_op0(compiler, op));
op = GET_OPCODE(op);
switch (op) {
@@ -2204,10 +2180,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
case SLJIT_BREAKPOINT:
return PI(BPT);
- case SLJIT_UMUL:
- case SLJIT_SMUL:
- case SLJIT_UDIV:
- case SLJIT_SDIV:
+ case SLJIT_LUMUL:
+ case SLJIT_LSMUL:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
SLJIT_ASSERT_STOP();
}
@@ -2217,7 +2193,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, sljit_si dst, sljit_sw dstw, sljit_si src, sljit_sw srcw)
{
CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
ADJUST_LOCAL_OFFSET(dst, dstw);
ADJUST_LOCAL_OFFSET(src, srcw);
@@ -2273,7 +2249,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler
return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
case SLJIT_CLZ:
- return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw);
+ return emit_op(compiler, op, (op & SLJIT_INT_OP) ? INT_DATA : WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
}
return SLJIT_SUCCESS;
@@ -2282,7 +2258,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, sljit_si dst, sljit_sw dstw, sljit_si src1, sljit_sw src1w, sljit_si src2, sljit_sw src2w)
{
CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
ADJUST_LOCAL_OFFSET(dst, dstw);
ADJUST_LOCAL_OFFSET(src1, src1w);
ADJUST_LOCAL_OFFSET(src2, src2w);
@@ -2325,7 +2301,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_label * sljit_emit_label(struct sljit_comp
flush_buffer(compiler);
CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
+ CHECK_PTR(check_sljit_emit_label(compiler));
if (compiler->last_label && compiler->last_label->size == compiler->size)
return compiler->last_label;
@@ -2344,7 +2320,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compil
flush_buffer(compiler);
CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
ADJUST_LOCAL_OFFSET(src, srcw);
if (FAST_IS_REG(src)) {
@@ -2404,8 +2380,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compil
return SLJIT_SUCCESS;
- } else if (src & SLJIT_MEM)
+ } else if (src & SLJIT_MEM) {
FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+ flush_buffer(compiler);
+ }
FAIL_IF(JR_SOLO(reg_map[src_r]));
@@ -2432,7 +2410,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compil
flush_buffer(compiler);
CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
jump = (struct sljit_jump *)ensure_abuf(compiler, sizeof(struct sljit_jump));
PTR_FAIL_IF(!jump);
@@ -2440,48 +2418,42 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compil
type &= 0xff;
switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
+ case SLJIT_EQUAL:
BR_NZ(EQUAL_FLAG);
break;
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_FLOAT_EQUAL:
+ case SLJIT_NOT_EQUAL:
BR_Z(EQUAL_FLAG);
break;
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
+ case SLJIT_LESS:
BR_Z(ULESS_FLAG);
break;
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL:
BR_NZ(ULESS_FLAG);
break;
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
+ case SLJIT_GREATER:
BR_Z(UGREATER_FLAG);
break;
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL:
BR_NZ(UGREATER_FLAG);
break;
- case SLJIT_C_SIG_LESS:
+ case SLJIT_SIG_LESS:
BR_Z(LESS_FLAG);
break;
- case SLJIT_C_SIG_GREATER_EQUAL:
+ case SLJIT_SIG_GREATER_EQUAL:
BR_NZ(LESS_FLAG);
break;
- case SLJIT_C_SIG_GREATER:
+ case SLJIT_SIG_GREATER:
BR_Z(GREATER_FLAG);
break;
- case SLJIT_C_SIG_LESS_EQUAL:
+ case SLJIT_SIG_LESS_EQUAL:
BR_NZ(GREATER_FLAG);
break;
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
BR_Z(OVERFLOW_FLAG);
break;
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
BR_NZ(OVERFLOW_FLAG);
break;
default:
@@ -2536,7 +2508,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const * sljit_emit_const(struct sljit_comp
flush_buffer(compiler);
CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
ADJUST_LOCAL_OFFSET(dst, dstw);
const_ = (struct sljit_const *)ensure_abuf(compiler, sizeof(struct sljit_const));
@@ -2572,3 +2544,18 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta
inst[3] = (inst[3] & ~(0xFFFFL << 43)) | ((new_constant & 0xFFFFL) << 43);
SLJIT_CACHE_FLUSH(inst, inst + 4);
}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_si size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
diff --git a/ext/pcre/pcrelib/sljit/sljitNativeX86_common.c b/ext/pcre/pcrelib/sljit/sljitNativeX86_common.c
index 22a163fcc6..416c15afaf 100644
--- a/ext/pcre/pcrelib/sljit/sljitNativeX86_common.c
+++ b/ext/pcre/pcrelib/sljit/sljitNativeX86_common.c
@@ -273,7 +273,9 @@ static sljit_si cpu_has_sse2 = -1;
#endif
static sljit_si cpu_has_cmov = -1;
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#ifdef _WIN32_WCE
+#include <cmnintrin.h>
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
#include <intrin.h>
#endif
@@ -742,8 +744,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
break;
case SLJIT_LUMUL:
case SLJIT_LSMUL:
- case SLJIT_LUDIV:
- case SLJIT_LSDIV:
+ case SLJIT_UDIVMOD:
+ case SLJIT_SDIVMOD:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
compiler->flags_saved = 0;
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
#ifdef _WIN64
@@ -761,9 +765,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
#endif
compiler->mode32 = op & SLJIT_INT_OP;
#endif
+ SLJIT_COMPILE_ASSERT((SLJIT_UDIVMOD & 0x2) == 0 && SLJIT_UDIVI - 0x2 == SLJIT_UDIVMOD, bad_div_opcode_assignments);
op = GET_OPCODE(op);
- if (op == SLJIT_LUDIV) {
+ if ((op | 0x2) == SLJIT_UDIVI) {
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R1, 0);
inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0);
@@ -774,7 +779,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
*inst = XOR_r_rm;
}
- if (op == SLJIT_LSDIV) {
+ if ((op | 0x2) == SLJIT_SDIVI) {
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R1, 0);
#endif
@@ -805,10 +810,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
FAIL_IF(!inst);
INC_SIZE(2);
*inst++ = GROUP_F7;
- *inst = MOD_REG | ((op >= SLJIT_LUDIV) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]);
+ *inst = MOD_REG | ((op >= SLJIT_UDIVMOD) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]);
#else
#ifdef _WIN64
- size = (!compiler->mode32 || op >= SLJIT_LUDIV) ? 3 : 2;
+ size = (!compiler->mode32 || op >= SLJIT_UDIVMOD) ? 3 : 2;
#else
size = (!compiler->mode32) ? 3 : 2;
#endif
@@ -817,11 +822,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
INC_SIZE(size);
#ifdef _WIN64
if (!compiler->mode32)
- *inst++ = REX_W | ((op >= SLJIT_LUDIV) ? REX_B : 0);
- else if (op >= SLJIT_LUDIV)
+ *inst++ = REX_W | ((op >= SLJIT_UDIVMOD) ? REX_B : 0);
+ else if (op >= SLJIT_UDIVMOD)
*inst++ = REX_B;
*inst++ = GROUP_F7;
- *inst = MOD_REG | ((op >= SLJIT_LUDIV) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]);
+ *inst = MOD_REG | ((op >= SLJIT_UDIVMOD) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]);
#else
if (!compiler->mode32)
*inst++ = REX_W;
@@ -836,15 +841,21 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
case SLJIT_LSMUL:
*inst |= IMUL;
break;
- case SLJIT_LUDIV:
+ case SLJIT_UDIVMOD:
+ case SLJIT_UDIVI:
*inst |= DIV;
break;
- case SLJIT_LSDIV:
+ case SLJIT_SDIVMOD:
+ case SLJIT_SDIVI:
*inst |= IDIV;
break;
}
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && !defined(_WIN64)
- EMIT_MOV(compiler, SLJIT_R1, 0, TMP_REG1, 0);
+ if (op <= SLJIT_SDIVMOD)
+ EMIT_MOV(compiler, SLJIT_R1, 0, TMP_REG1, 0);
+#else
+ if (op >= SLJIT_UDIVI)
+ EMIT_MOV(compiler, SLJIT_R1, 0, TMP_REG1, 0);
#endif
break;
}
@@ -1905,60 +1916,62 @@ static sljit_si emit_test_binary(struct sljit_compiler *compiler,
return SLJIT_SUCCESS;
}
- if (FAST_IS_REG(src1)) {
+ if (!(src1 & SLJIT_IMM)) {
if (src2 & SLJIT_IMM) {
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
if (IS_HALFWORD(src2w) || compiler->mode32) {
- inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
FAIL_IF(!inst);
*inst = GROUP_F7;
}
else {
FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
- inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, 0);
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, src1w);
FAIL_IF(!inst);
*inst = TEST_rm_r;
}
#else
- inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
FAIL_IF(!inst);
*inst = GROUP_F7;
#endif
+ return SLJIT_SUCCESS;
}
- else {
+ else if (FAST_IS_REG(src1)) {
inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
FAIL_IF(!inst);
*inst = TEST_rm_r;
+ return SLJIT_SUCCESS;
}
- return SLJIT_SUCCESS;
}
- if (FAST_IS_REG(src2)) {
+ if (!(src2 & SLJIT_IMM)) {
if (src1 & SLJIT_IMM) {
#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
if (IS_HALFWORD(src1w) || compiler->mode32) {
- inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, 0);
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, src2w);
FAIL_IF(!inst);
*inst = GROUP_F7;
}
else {
FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src1w));
- inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, 0);
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, src2w);
FAIL_IF(!inst);
*inst = TEST_rm_r;
}
#else
- inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, 0);
+ inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, src2w);
FAIL_IF(!inst);
*inst = GROUP_F7;
#endif
+ return SLJIT_SUCCESS;
}
- else {
+ else if (FAST_IS_REG(src2)) {
inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
FAIL_IF(!inst);
*inst = TEST_rm_r;
+ return SLJIT_SUCCESS;
}
- return SLJIT_SUCCESS;
}
EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
@@ -2923,3 +2936,69 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta
{
*(sljit_sw*)addr = new_constant;
}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_sse2_available(void)
+{
+#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
+ if (cpu_has_sse2 == -1)
+ get_cpu_features();
+ return cpu_has_sse2;
+#else
+ return 1;
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_cmov_available(void)
+{
+ if (cpu_has_cmov == -1)
+ get_cpu_features();
+ return cpu_has_cmov;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_emit_cmov(struct sljit_compiler *compiler,
+ sljit_si type,
+ sljit_si dst_reg,
+ sljit_si src, sljit_sw srcw)
+{
+ sljit_ub* inst;
+
+ CHECK_ERROR();
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_x86_is_cmov_available());
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_INT_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_D_ORDERED);
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(dst_reg & ~SLJIT_INT_OP));
+ FUNCTION_CHECK_SRC(src, srcw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " x86_cmov%s %s%s, ",
+ !(dst_reg & SLJIT_INT_OP) ? "" : ".i",
+ JUMP_PREFIX(type), jump_names[type & 0xff]);
+ sljit_verbose_reg(compiler, dst_reg & ~SLJIT_INT_OP);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+
+ ADJUST_LOCAL_OFFSET(src, srcw);
+ CHECK_EXTRA_REGS(src, srcw, (void)0);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = dst_reg & SLJIT_INT_OP;
+#endif
+ dst_reg &= ~SLJIT_INT_OP;
+
+ if (SLJIT_UNLIKELY(src & SLJIT_IMM)) {
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, srcw);
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = get_jump_code(type & 0xff) - 0x40;
+ return SLJIT_SUCCESS;
+}
diff --git a/ext/pcre/pcrelib/testdata/grepoutput b/ext/pcre/pcrelib/testdata/grepoutput
index 9bf9d9d62e..f23dac7693 100644
--- a/ext/pcre/pcrelib/testdata/grepoutput
+++ b/ext/pcre/pcrelib/testdata/grepoutput
@@ -743,3 +743,15 @@ RC=0
---------------------------- Test 106 -----------------------------
a
RC=0
+---------------------------- Test 107 -----------------------------
+1:0,1
+2:0,1
+2:1,1
+2:2,1
+2:3,1
+2:4,1
+RC=0
+---------------------------- Test 108 ------------------------------
+RC=0
+---------------------------- Test 109 -----------------------------
+RC=0
diff --git a/ext/pcre/pcrelib/testdata/testinput1 b/ext/pcre/pcrelib/testdata/testinput1
index 123e3d3cfd..8379ce04d5 100644
--- a/ext/pcre/pcrelib/testdata/testinput1
+++ b/ext/pcre/pcrelib/testdata/testinput1
@@ -5720,4 +5720,17 @@ AbcdCBefgBhiBqz
/[\Q]a\E]+/
aa]]
+/(?:((abcd))|(((?:(?:(?:(?:abc|(?:abcdef))))b)abcdefghi)abc)|((*ACCEPT)))/
+ 1234abcd
+
+/(\2)(\1)/
+
+"Z*(|d*){216}"
+
+"(?1)(?#?'){8}(a)"
+ baaaaaaaaac
+
+"(?|(\k'Pm')|(?'Pm'))"
+ abcd
+
/-- End of testinput1 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput11 b/ext/pcre/pcrelib/testdata/testinput11
index 7e8e54221d..ac9d228985 100644
--- a/ext/pcre/pcrelib/testdata/testinput11
+++ b/ext/pcre/pcrelib/testdata/testinput11
@@ -134,4 +134,8 @@ is required for these tests. --/
/(((a\2)|(a*)\g<-1>))*a?/B
+/((?+1)(\1))/B
+
+/.((?2)(?R)\1)()/B
+
/-- End of testinput11 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput12 b/ext/pcre/pcrelib/testdata/testinput12
index 5d727af26a..944be6943f 100644
--- a/ext/pcre/pcrelib/testdata/testinput12
+++ b/ext/pcre/pcrelib/testdata/testinput12
@@ -8,6 +8,8 @@ and a couple of things that are different with JIT. --/
/(?(?C1)(?=a)a)/S!+I
+/b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*/S+I
+
/abc/S+I>testsavedregex
<testsavedregex
@@ -87,4 +89,19 @@ and a couple of things that are different with JIT. --/
/^12345678abcd/mS++
12345678abcd
+/-- Test pattern compilation --/
+
+/(?:a|b|c|d|e)(?R)/S++
+
+/(?:a|b|c|d|e)(?R)(?R)/S++
+
+/(a(?:a|b|c|d|e)b){8,16}/S++
+
+/(?:|a|){100}x/S++
+
+/(x(?1)){4}/S++
+
+/(.|.)*?bx/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
+
/-- End of testinput12 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput14 b/ext/pcre/pcrelib/testdata/testinput14
index 325ed9e361..192b8d64d5 100644
--- a/ext/pcre/pcrelib/testdata/testinput14
+++ b/ext/pcre/pcrelib/testdata/testinput14
@@ -340,4 +340,6 @@ not matter. --/
/[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ
+/(?'ABC'[bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar](*THEN:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/
+
/-- End of testinput14 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput17 b/ext/pcre/pcrelib/testdata/testinput17
index 1d933c7942..c48e77f97f 100644
--- a/ext/pcre/pcrelib/testdata/testinput17
+++ b/ext/pcre/pcrelib/testdata/testinput17
@@ -304,4 +304,6 @@
/^[\x{1234}\x{4321}]{2,4}?/
\x{1234}\x{1234}\x{1234}
+/(*THEN:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)/
+
/-- End of testinput17 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2
index c6816bf322..e2e520f740 100644
--- a/ext/pcre/pcrelib/testdata/testinput2
+++ b/ext/pcre/pcrelib/testdata/testinput2
@@ -1380,6 +1380,8 @@
1X
123456\P
+//KF>testsavedregex
+
/abc/IS>testsavedregex
<testsavedregex
abc
@@ -4078,4 +4080,141 @@ backtracking verbs. --/
/\x{whatever}/
+"((?=(?(?=(?(?=(?(?=()))))))))"
+ a
+
+"(?(?=)==)(((((((((?=)))))))))"
+ a
+
+/^(?:(a)|b)(?(1)A|B)/I
+ aA123\O3
+ aA123\O6
+
+'^(?:(?<AA>a)|b)(?(<AA>)A|B)'
+ aA123\O3
+ aA123\O6
+
+'^(?<AA>)(?:(?<AA>a)|b)(?(<AA>)A|B)'J
+ aA123\O3
+ aA123\O6
+
+'^(?:(?<AA>X)|)(?:(?<AA>a)|b)\k{AA}'J
+ aa123\O3
+ aa123\O6
+
+/(?<N111>(?J)(?<N111>1(111111)11|)1|1|)(?(<N111>)1)/
+
+/(?(?=0)?)+/
+
+/(?(?=0)(?=00)?00765)/
+ 00765
+
+/(?(?=0)(?=00)?00765|(?!3).56)/
+ 00765
+ 456
+ ** Failers
+ 356
+
+'^(a)*+(\w)'
+ g
+ g\O3
+
+'^(?:a)*+(\w)'
+ g
+ g\O3
+
+//C
+ \O\C+
+
+"((?2){0,1999}())?"
+
+/((?+1)(\1))/BZ
+
+/(?(?!)a|b)/
+ bbb
+ aaa
+
+"((?2)+)((?1))"
+
+"(?(?<E>.*!.*)?)"
+
+"X((?2)()*+){2}+"BZ
+
+"X((?2)()*+){2}"BZ
+
+"(?<=((?2))((?1)))"
+
+/(?<=\Ka)/g+
+ aaaaa
+
+/(?<=\Ka)/G+
+ aaaaa
+
+/((?2){73}(?2))((?1))/
+
+/.((?2)(?R)\1)()/BZ
+
+/(?1)()((((((\1++))\x85)+)|))/
+
+/(\9*+(?2);\3++()2|)++{/
+
+/\V\x85\9*+((?2)\3++()2)*:2/
+
+/(((?(R)){0,2}) (?''((?'R')((?'R')))))/J
+
+/(((?(X)){0,2}) (?''((?'X')((?'X')))))/J
+
+/(((?(R)){0,2}) (?''((?'X')((?'R')))))/
+
+"(?J)(?'d'(?'d'\g{d}))"
+
+".*?\h.+.\.+\R*?\xd(?i)(?=!(?=b`b`b`\`b\xa9b!)`\a`bbbbbbbbbbbbb`bbbbbbbbbbbb*R\x85bbbbbbb\C?{((?2)(?))((
+\H){8(?<=(?1){29}\xa8bbbb\x16\xd\xc6^($(?<! )(\xa9H4){4}h}1)B))\x15')"
+
+"(?J:(?|(?'R')(\k'R')|((?'R'))))"
+
+/(?<=|(\,\$(?73591620449005828816)\xa8.{7}){6}\x09)/
+
+//
+\O1
+
+/^(?:(?(1)x|)+)+$()/BZ
+
+/(?=di(?<=(?1))|(?=(.))))/
+
+/(?(R))*+/BZ
+
+/[[:\\](?'abc')[a:]/
+
+"[[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[:::::::::::::::::[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[[[:::E[[[:[:[[:[:::[[:::E[[[:[:[[:'[:::::E[[[:[::::::[[[:[[[[[[[::E[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~"
+
+/()(?(R)0)*+/BZ
+
+/(?R-:(?</
+
+/(?1){3918}(((((0(\k'R'))))(?J)(?'R'(?'R'\3){99})))/I
+
+/(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R')))/
+
+/0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/
+ 01
+
+/((?(R8000000000)))/
+
+/(?(8000000000/
+
+/(?:ab)?(?:ab)(?:ab)/
+ abab
+ ababab
+ aba
+
+/((*MARK:A))++a(*SKIP:B)b/
+ aacb
+
+/(?J:(?|(:(?|(?'R')(\z(?|(?'R')(\k'R')|((?'R')))k'R')|((?'R')))H'Ak'Rf)|s(?'R')))/
+
+/(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?<a>1)/
+
+/a[[:punct:]b]/BZ
+
/-- End of testinput2 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput4 b/ext/pcre/pcrelib/testdata/testinput4
index 0110267bd8..8bdbdac4c2 100644
--- a/ext/pcre/pcrelib/testdata/testinput4
+++ b/ext/pcre/pcrelib/testdata/testinput4
@@ -722,4 +722,9 @@
/^#[^\x{ffff}]#[^\x{ffff}]#[^\x{ffff}]#/8
#\x{10000}#\x{100}#\x{10ffff}#
+"[\S\V\H]"8
+
+/\C(\W?Å¿)'?{{/8
+ \\C(\\W?Å¿)'?{{
+
/-- End of testinput4 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput5 b/ext/pcre/pcrelib/testdata/testinput5
index e36b09d637..28561a9357 100644
--- a/ext/pcre/pcrelib/testdata/testinput5
+++ b/ext/pcre/pcrelib/testdata/testinput5
@@ -790,4 +790,12 @@
/[b-d\x{200}-\x{250}]*[ae-h]?#[\x{200}-\x{250}]{0,8}[\x00-\xff]*#[\x{200}-\x{250}]+[a-z]/8BZ
+/[^\xff]*PRUNE:\x{100}abc(xyz(?1))/8DZ
+
+/(?<=\K\x{17f})/8g+
+ \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
+
+/(?<=\K\x{17f})/8G+
+ \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
+
/-- End of testinput5 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6
index 82c3ed5c77..aeb62a073f 100644
--- a/ext/pcre/pcrelib/testdata/testinput6
+++ b/ext/pcre/pcrelib/testdata/testinput6
@@ -1496,4 +1496,61 @@
/^s?c/mi8
scat
+/[A-`]/i8
+ abcdefghijklmno
+
+/\C\X*QT/8
+ Ó…\x0aT
+
+/[\pS#moq]/
+ =
+
+/[[:punct:]]/8W
+ \xc2\xb4
+ \x{b4}
+
+/[[:^ascii:]]/8W
+ \x{100}
+ \x{200}
+ \x{300}
+ \x{37e}
+ a
+ 9
+ g
+
+/[[:^ascii:]\w]/8W
+ a
+ 9
+ g
+ \x{100}
+ \x{200}
+ \x{300}
+ \x{37e}
+
+/[\w[:^ascii:]]/8W
+ a
+ 9
+ g
+ \x{100}
+ \x{200}
+ \x{300}
+ \x{37e}
+
+/[^[:ascii:]\W]/8W
+ a
+ 9
+ g
+ \x{100}
+ \x{200}
+ \x{300}
+ \x{37e}
+
+/[[:^ascii:]a]/8W
+ a
+ 9
+ g
+ \x{100}
+ \x{200}
+ \x{37e}
+
/-- End of testinput6 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7
index 7a66025434..e411a4b842 100644
--- a/ext/pcre/pcrelib/testdata/testinput7
+++ b/ext/pcre/pcrelib/testdata/testinput7
@@ -838,4 +838,19 @@ of case for anything other than the ASCII letters. --/
/^s?c/mi8I
scat
+/[\W\p{Any}]/BZ
+ abc
+ 123
+
+/[\W\pL]/BZ
+ abc
+ ** Failers
+ 123
+
+/a[[:punct:]b]/WBZ
+
+/a[[:punct:]b]/8WBZ
+
+/a[b[:punct:]]/8WBZ
+
/-- End of testinput7 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput8 b/ext/pcre/pcrelib/testdata/testinput8
index 06334cd36e..931dd717e7 100644
--- a/ext/pcre/pcrelib/testdata/testinput8
+++ b/ext/pcre/pcrelib/testdata/testinput8
@@ -4837,4 +4837,8 @@
'\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
+/(?(?!)a|b)/
+ bbb
+ aaa
+
/-- End of testinput8 --/
diff --git a/ext/pcre/pcrelib/testdata/testinputEBC b/ext/pcre/pcrelib/testdata/testinputEBC
index 56efcd00aa..378755d3b9 100644
--- a/ext/pcre/pcrelib/testdata/testinputEBC
+++ b/ext/pcre/pcrelib/testdata/testinputEBC
@@ -29,13 +29,16 @@ in EBCDIC, but can be specified as escapes. --/
/^A\ˆ/
A B
+ A\x41B
/-- Test \H --/
/^A\È/
AB
+ A\x42B
** Fail
A B
+ A\x41B
/-- Test \R --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1
index 5e719002ed..e852ab9544 100644
--- a/ext/pcre/pcrelib/testdata/testoutput1
+++ b/ext/pcre/pcrelib/testdata/testoutput1
@@ -9411,4 +9411,27 @@ No match
aa]]
0: aa]]
+/(?:((abcd))|(((?:(?:(?:(?:abc|(?:abcdef))))b)abcdefghi)abc)|((*ACCEPT)))/
+ 1234abcd
+ 0:
+ 1: <unset>
+ 2: <unset>
+ 3: <unset>
+ 4: <unset>
+ 5:
+
+/(\2)(\1)/
+
+"Z*(|d*){216}"
+
+"(?1)(?#?'){8}(a)"
+ baaaaaaaaac
+ 0: aaaaaaaaa
+ 1: a
+
+"(?|(\k'Pm')|(?'Pm'))"
+ abcd
+ 0:
+ 1:
+
/-- End of testinput1 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput11-16 b/ext/pcre/pcrelib/testdata/testoutput11-16
index a1db3f3422..9a0a12d509 100644
--- a/ext/pcre/pcrelib/testdata/testoutput11-16
+++ b/ext/pcre/pcrelib/testdata/testoutput11-16
@@ -231,7 +231,7 @@ Memory allocation (code space): 73
------------------------------------------------------------------
/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 57
+Memory allocation (code space): 77
------------------------------------------------------------------
0 24 Bra
2 5 CBra 1
@@ -650,18 +650,18 @@ Memory allocation (code space): 14
/[[:^alpha:][:^cntrl:]]+/8WB
------------------------------------------------------------------
- 0 26 Bra
- 2 [ -~\x80-\xff\P{L}]++
- 26 26 Ket
- 28 End
+ 0 30 Bra
+ 2 [ -~\x80-\xff\P{L}\x{100}-\x{10ffff}]++
+ 30 30 Ket
+ 32 End
------------------------------------------------------------------
/[[:^cntrl:][:^alpha:]]+/8WB
------------------------------------------------------------------
- 0 26 Bra
- 2 [ -~\x80-\xff\P{L}]++
- 26 26 Ket
- 28 End
+ 0 30 Bra
+ 2 [ -~\x80-\xff\x{100}-\x{10ffff}\P{L}]++
+ 30 30 Ket
+ 32 End
------------------------------------------------------------------
/[[:alpha:]]+/8WB
@@ -733,4 +733,36 @@ Memory allocation (code space): 14
41 End
------------------------------------------------------------------
+/((?+1)(\1))/B
+------------------------------------------------------------------
+ 0 20 Bra
+ 2 16 Once
+ 4 12 CBra 1
+ 7 9 Recurse
+ 9 5 CBra 2
+ 12 \1
+ 14 5 Ket
+ 16 12 Ket
+ 18 16 Ket
+ 20 20 Ket
+ 22 End
+------------------------------------------------------------------
+
+/.((?2)(?R)\1)()/B
+------------------------------------------------------------------
+ 0 23 Bra
+ 2 Any
+ 3 13 Once
+ 5 9 CBra 1
+ 8 18 Recurse
+ 10 0 Recurse
+ 12 \1
+ 14 9 Ket
+ 16 13 Ket
+ 18 3 CBra 2
+ 21 3 Ket
+ 23 23 Ket
+ 25 End
+------------------------------------------------------------------
+
/-- End of testinput11 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput11-32 b/ext/pcre/pcrelib/testdata/testoutput11-32
index 7b7b030fdc..57e5da0279 100644
--- a/ext/pcre/pcrelib/testdata/testoutput11-32
+++ b/ext/pcre/pcrelib/testdata/testoutput11-32
@@ -231,7 +231,7 @@ Memory allocation (code space): 155
------------------------------------------------------------------
/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 117
+Memory allocation (code space): 157
------------------------------------------------------------------
0 24 Bra
2 5 CBra 1
@@ -650,18 +650,18 @@ Memory allocation (code space): 28
/[[:^alpha:][:^cntrl:]]+/8WB
------------------------------------------------------------------
- 0 18 Bra
- 2 [ -~\x80-\xff\P{L}]++
- 18 18 Ket
- 20 End
+ 0 21 Bra
+ 2 [ -~\x80-\xff\P{L}\x{100}-\x{10ffff}]++
+ 21 21 Ket
+ 23 End
------------------------------------------------------------------
/[[:^cntrl:][:^alpha:]]+/8WB
------------------------------------------------------------------
- 0 18 Bra
- 2 [ -~\x80-\xff\P{L}]++
- 18 18 Ket
- 20 End
+ 0 21 Bra
+ 2 [ -~\x80-\xff\x{100}-\x{10ffff}\P{L}]++
+ 21 21 Ket
+ 23 End
------------------------------------------------------------------
/[[:alpha:]]+/8WB
@@ -733,4 +733,36 @@ Memory allocation (code space): 28
41 End
------------------------------------------------------------------
+/((?+1)(\1))/B
+------------------------------------------------------------------
+ 0 20 Bra
+ 2 16 Once
+ 4 12 CBra 1
+ 7 9 Recurse
+ 9 5 CBra 2
+ 12 \1
+ 14 5 Ket
+ 16 12 Ket
+ 18 16 Ket
+ 20 20 Ket
+ 22 End
+------------------------------------------------------------------
+
+/.((?2)(?R)\1)()/B
+------------------------------------------------------------------
+ 0 23 Bra
+ 2 Any
+ 3 13 Once
+ 5 9 CBra 1
+ 8 18 Recurse
+ 10 0 Recurse
+ 12 \1
+ 14 9 Ket
+ 16 13 Ket
+ 18 3 CBra 2
+ 21 3 Ket
+ 23 23 Ket
+ 25 End
+------------------------------------------------------------------
+
/-- End of testinput11 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput11-8 b/ext/pcre/pcrelib/testdata/testoutput11-8
index f5ec652af8..748548a5ab 100644
--- a/ext/pcre/pcrelib/testdata/testoutput11-8
+++ b/ext/pcre/pcrelib/testdata/testoutput11-8
@@ -231,7 +231,7 @@ Memory allocation (code space): 45
------------------------------------------------------------------
/(?P<a>a)...(?P=a)bbb(?P>a)d/BM
-Memory allocation (code space): 34
+Memory allocation (code space): 50
------------------------------------------------------------------
0 30 Bra
3 7 CBra 1
@@ -650,18 +650,18 @@ Memory allocation (code space): 10
/[[:^alpha:][:^cntrl:]]+/8WB
------------------------------------------------------------------
- 0 44 Bra
- 3 [ -~\x80-\xff\P{L}]++
- 44 44 Ket
- 47 End
+ 0 51 Bra
+ 3 [ -~\x80-\xff\P{L}\x{100}-\x{10ffff}]++
+ 51 51 Ket
+ 54 End
------------------------------------------------------------------
/[[:^cntrl:][:^alpha:]]+/8WB
------------------------------------------------------------------
- 0 44 Bra
- 3 [ -~\x80-\xff\P{L}]++
- 44 44 Ket
- 47 End
+ 0 51 Bra
+ 3 [ -~\x80-\xff\x{100}-\x{10ffff}\P{L}]++
+ 51 51 Ket
+ 54 End
------------------------------------------------------------------
/[[:alpha:]]+/8WB
@@ -733,4 +733,36 @@ Memory allocation (code space): 10
60 End
------------------------------------------------------------------
+/((?+1)(\1))/B
+------------------------------------------------------------------
+ 0 31 Bra
+ 3 25 Once
+ 6 19 CBra 1
+ 11 14 Recurse
+ 14 8 CBra 2
+ 19 \1
+ 22 8 Ket
+ 25 19 Ket
+ 28 25 Ket
+ 31 31 Ket
+ 34 End
+------------------------------------------------------------------
+
+/.((?2)(?R)\1)()/B
+------------------------------------------------------------------
+ 0 35 Bra
+ 3 Any
+ 4 20 Once
+ 7 14 CBra 1
+ 12 27 Recurse
+ 15 0 Recurse
+ 18 \1
+ 21 14 Ket
+ 24 20 Ket
+ 27 5 CBra 2
+ 32 5 Ket
+ 35 35 Ket
+ 38 End
+------------------------------------------------------------------
+
/-- End of testinput11 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput12 b/ext/pcre/pcrelib/testdata/testoutput12
index 67ad2c8aec..87911086f4 100644
--- a/ext/pcre/pcrelib/testdata/testoutput12
+++ b/ext/pcre/pcrelib/testdata/testoutput12
@@ -30,6 +30,15 @@ Subject length lower bound = -1
No starting char list
JIT study was not successful
+/b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*b*/S+I
+Capturing subpattern count = 0
+May match empty string
+No options
+No first char
+No need char
+Study returned NULL
+JIT study was not successful
+
/abc/S+I>testsavedregex
Capturing subpattern count = 0
No options
@@ -176,4 +185,20 @@ No match, mark = m (JIT)
12345678abcd
0: 12345678abcd (JIT)
+/-- Test pattern compilation --/
+
+/(?:a|b|c|d|e)(?R)/S++
+
+/(?:a|b|c|d|e)(?R)(?R)/S++
+
+/(a(?:a|b|c|d|e)b){8,16}/S++
+
+/(?:|a|){100}x/S++
+
+/(x(?1)){4}/S++
+
+/(.|.)*?bx/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
+Error -8 (match limit exceeded)
+
/-- End of testinput12 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput14 b/ext/pcre/pcrelib/testdata/testoutput14
index ae85681e0e..020f51e3a2 100644
--- a/ext/pcre/pcrelib/testdata/testoutput14
+++ b/ext/pcre/pcrelib/testdata/testoutput14
@@ -527,4 +527,6 @@ Failed: character value in \u.... sequence is too large at offset 6
End
------------------------------------------------------------------
+/(?'ABC'[bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar]([bar](*THEN:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/
+
/-- End of testinput14 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput17 b/ext/pcre/pcrelib/testdata/testoutput17
index 1a3b492fb4..9ef6c7279f 100644
--- a/ext/pcre/pcrelib/testdata/testoutput17
+++ b/ext/pcre/pcrelib/testdata/testoutput17
@@ -555,4 +555,6 @@ MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB
\x{1234}\x{1234}\x{1234}
0: \x{1234}\x{1234}
+/(*THEN:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)/
+
/-- End of testinput17 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2
index 1e87026cc6..85c565d132 100644
--- a/ext/pcre/pcrelib/testdata/testoutput2
+++ b/ext/pcre/pcrelib/testdata/testoutput2
@@ -561,7 +561,7 @@ Failed: assertion expected after (?( at offset 3
Failed: reference to non-existent subpattern at offset 7
/(?(?<ab))/
-Failed: syntax error in subpattern name (missing terminator) at offset 7
+Failed: assertion expected after (?( at offset 3
/((?s)blah)\s+\1/I
Capturing subpattern count = 1
@@ -1566,30 +1566,35 @@ Need char = 'b'
/a(?(1)b)(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
No need char
/a(?(1)bag|big)(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
Need char = 'g'
/a(?(1)bag|big)*(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
No need char
/a(?(1)bag|big)+(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
Need char = 'g'
/a(?(1)b..|b..)(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
Need char = 'b'
@@ -3379,24 +3384,28 @@ Need char = 'a'
/(?(1)ab|ac)(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
No need char
/(?(1)abz|acz)(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
First char = 'a'
Need char = 'z'
/(?(1)abz)(.)/I
Capturing subpattern count = 1
+Max back reference = 1
No options
No first char
No need char
/(?(1)abz)(1)23/I
Capturing subpattern count = 1
+Max back reference = 1
No options
No first char
Need char = '3'
@@ -5605,6 +5614,10 @@ No match
123456\P
No match
+//KF>testsavedregex
+Compiled pattern written to testsavedregex
+Study data written to testsavedregex
+
/abc/IS>testsavedregex
Capturing subpattern count = 0
No options
@@ -6336,6 +6349,7 @@ No need char
/^(?P<A>a)?(?(A)a|b)/I
Capturing subpattern count = 1
+Max back reference = 1
Named capturing subpatterns:
A 1
Options: anchored
@@ -6353,6 +6367,7 @@ No match
/(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
Capturing subpattern count = 1
+Max back reference = 1
Named capturing subpatterns:
ZZ 1
No options
@@ -6370,6 +6385,7 @@ Failed: reference to non-existent subpattern at offset 9
/(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
Capturing subpattern count = 1
+Max back reference = 1
Named capturing subpatterns:
ZZ 1
No options
@@ -6381,6 +6397,7 @@ Need char = 'X'
/(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
Capturing subpattern count = 1
+Max back reference = 1
Named capturing subpatterns:
ZZ 1
No options
@@ -9118,10 +9135,10 @@ Failed: subpattern name expected at offset 3
Failed: subpattern name expected at offset 3
/\k/
-Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2
+Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 1
/\kabc/
-Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5
+Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 1
/(?P=)/
Failed: subpattern name expected at offset 4
@@ -9169,7 +9186,7 @@ Failed: unknown POSIX class name at offset 6
Failed: unknown POSIX class name at offset 3
/(^(a|b\g<-1'c))/
-Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15
+Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8
/^(?+1)(?<a>x|y){0}z/
xzxx
@@ -10226,6 +10243,7 @@ No starting char list
(?(1)|.) # check that there was an empty component
/xiIS
Capturing subpattern count = 1
+Max back reference = 1
Options: anchored caseless extended
No first char
Need char = ':'
@@ -10255,6 +10273,7 @@ Failed: different names for subpatterns of the same number are not allowed at of
b(?<quote> (?<apostrophe>')|(?<realquote>")) )
(?('quote')[a-z]+|[0-9]+)/JIx
Capturing subpattern count = 6
+Max back reference = 1
Named capturing subpatterns:
apostrophe 2
apostrophe 5
@@ -10317,6 +10336,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 4
+Max back reference = 4
Named capturing subpatterns:
D 4
D 1
@@ -10364,6 +10384,7 @@ No match
End
------------------------------------------------------------------
Capturing subpattern count = 4
+Max back reference = 1
Named capturing subpatterns:
A 1
A 4
@@ -10486,6 +10507,7 @@ No starting char list
/()i(?(1)a)/SI
Capturing subpattern count = 1
+Max back reference = 1
No options
No first char
Need char = 'i'
@@ -14076,10 +14098,10 @@ Failed: group name must start with a non-digit at offset 3
Failed: group name must start with a non-digit at offset 4
/\g'3gh'/
-Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7
+Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 2
/\g<5fg>/
-Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7
+Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 2
/(?(<4gh>)abc)/
Failed: group name must start with a non-digit at offset 4
@@ -14206,4 +14228,350 @@ Failed: digits missing in \x{} or \o{} at offset 3
/\x{whatever}/
Failed: non-hex character in \x{} (closing brace missing?) at offset 3
+"((?=(?(?=(?(?=(?(?=()))))))))"
+ a
+ 0:
+ 1:
+ 2:
+
+"(?(?=)==)(((((((((?=)))))))))"
+ a
+No match
+
+/^(?:(a)|b)(?(1)A|B)/I
+Capturing subpattern count = 1
+Max back reference = 1
+Options: anchored
+No first char
+No need char
+ aA123\O3
+Matched, but too many substrings
+ 0: aA
+ aA123\O6
+ 0: aA
+ 1: a
+
+'^(?:(?<AA>a)|b)(?(<AA>)A|B)'
+ aA123\O3
+Matched, but too many substrings
+ 0: aA
+ aA123\O6
+ 0: aA
+ 1: a
+
+'^(?<AA>)(?:(?<AA>a)|b)(?(<AA>)A|B)'J
+ aA123\O3
+Matched, but too many substrings
+ 0: aA
+ aA123\O6
+Matched, but too many substrings
+ 0: aA
+ 1:
+
+'^(?:(?<AA>X)|)(?:(?<AA>a)|b)\k{AA}'J
+ aa123\O3
+Matched, but too many substrings
+ 0: aa
+ aa123\O6
+Matched, but too many substrings
+ 0: aa
+ 1: <unset>
+
+/(?<N111>(?J)(?<N111>1(111111)11|)1|1|)(?(<N111>)1)/
+
+/(?(?=0)?)+/
+Failed: nothing to repeat at offset 7
+
+/(?(?=0)(?=00)?00765)/
+ 00765
+ 0: 00765
+
+/(?(?=0)(?=00)?00765|(?!3).56)/
+ 00765
+ 0: 00765
+ 456
+ 0: 456
+ ** Failers
+No match
+ 356
+No match
+
+'^(a)*+(\w)'
+ g
+ 0: g
+ 1: <unset>
+ 2: g
+ g\O3
+Matched, but too many substrings
+ 0: g
+
+'^(?:a)*+(\w)'
+ g
+ 0: g
+ 1: g
+ g\O3
+Matched, but too many substrings
+ 0: g
+
+//C
+ \O\C+
+Callout 255: last capture = -1
+--->
+ +0 ^
+Matched, but too many substrings
+
+"((?2){0,1999}())?"
+
+/((?+1)(\1))/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ Recurse
+ CBra 2
+ \1
+ Ket
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?(?!)a|b)/
+ bbb
+ 0: b
+ aaa
+No match
+
+"((?2)+)((?1))"
+
+"(?(?<E>.*!.*)?)"
+Failed: assertion expected after (?( at offset 3
+
+"X((?2)()*+){2}+"BZ
+------------------------------------------------------------------
+ Bra
+ X
+ Once
+ CBra 1
+ Recurse
+ Braposzero
+ SCBraPos 2
+ KetRpos
+ Ket
+ CBra 1
+ Recurse
+ Braposzero
+ SCBraPos 2
+ KetRpos
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+"X((?2)()*+){2}"BZ
+------------------------------------------------------------------
+ Bra
+ X
+ CBra 1
+ Recurse
+ Braposzero
+ SCBraPos 2
+ KetRpos
+ Ket
+ CBra 1
+ Recurse
+ Braposzero
+ SCBraPos 2
+ KetRpos
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+"(?<=((?2))((?1)))"
+Failed: lookbehind assertion is not fixed length at offset 17
+
+/(?<=\Ka)/g+
+ aaaaa
+ 0: a
+ 0+ aaaa
+ 0: a
+ 0+ aaaa
+ 0: a
+ 0+ aaa
+ 0: a
+ 0+ aa
+ 0: a
+ 0+ a
+ 0: a
+ 0+
+
+/(?<=\Ka)/G+
+ aaaaa
+ 0: a
+ 0+ aaaa
+ 0: a
+ 0+ aaa
+ 0: a
+ 0+ aa
+ 0: a
+ 0+ a
+ 0: a
+ 0+
+
+/((?2){73}(?2))((?1))/
+
+/.((?2)(?R)\1)()/BZ
+------------------------------------------------------------------
+ Bra
+ Any
+ Once
+ CBra 1
+ Recurse
+ Recurse
+ \1
+ Ket
+ Ket
+ CBra 2
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?1)()((((((\1++))\x85)+)|))/
+
+/(\9*+(?2);\3++()2|)++{/
+Failed: reference to non-existent subpattern at offset 22
+
+/\V\x85\9*+((?2)\3++()2)*:2/
+Failed: reference to non-existent subpattern at offset 26
+
+/(((?(R)){0,2}) (?''((?'R')((?'R')))))/J
+
+/(((?(X)){0,2}) (?''((?'X')((?'X')))))/J
+
+/(((?(R)){0,2}) (?''((?'X')((?'R')))))/
+
+"(?J)(?'d'(?'d'\g{d}))"
+
+".*?\h.+.\.+\R*?\xd(?i)(?=!(?=b`b`b`\`b\xa9b!)`\a`bbbbbbbbbbbbb`bbbbbbbbbbbb*R\x85bbbbbbb\C?{((?2)(?))((
+\H){8(?<=(?1){29}\xa8bbbb\x16\xd\xc6^($(?<! )(\xa9H4){4}h}1)B))\x15')"
+
+"(?J:(?|(?'R')(\k'R')|((?'R'))))"
+
+/(?<=|(\,\$(?73591620449005828816)\xa8.{7}){6}\x09)/
+Failed: number is too big at offset 32
+
+//
+\O1
+Matched, but too many substrings
+
+/^(?:(?(1)x|)+)+$()/BZ
+------------------------------------------------------------------
+ Bra
+ ^
+ SBra
+ SCond
+ 1 Cond ref
+ x
+ Alt
+ KetRmax
+ KetRmax
+ $
+ CBra 1
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?=di(?<=(?1))|(?=(.))))/
+Failed: unmatched parentheses at offset 23
+
+/(?(R))*+/BZ
+------------------------------------------------------------------
+ Bra
+ Braposzero
+ SBraPos
+ SCond
+ Cond recurse any
+ Ket
+ KetRpos
+ Ket
+ End
+------------------------------------------------------------------
+
+/[[:\\](?'abc')[a:]/
+
+"[[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[:::::::::::::::::[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[[[:::E[[[:[:[[:[:::[[:::E[[[:[:[[:'[:::::E[[[:[::::::[[[:[[[[[[[::E[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~"
+Failed: missing terminating ] for character class at offset 353
+
+/()(?(R)0)*+/BZ
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ Ket
+ Braposzero
+ SBraPos
+ SCond
+ Cond recurse any
+ 0
+ Ket
+ KetRpos
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?R-:(?</
+Failed: (?R or (?[+-]digits must be followed by ) at offset 3
+
+/(?1){3918}(((((0(\k'R'))))(?J)(?'R'(?'R'\3){99})))/I
+Capturing subpattern count = 8
+Max back reference = 8
+Named capturing subpatterns:
+ R 7
+ R 8
+No options
+Duplicate name status changes
+No first char
+Need char = '0'
+
+/(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R')))/
+
+/0(?0)|(1)(*THEN)(*SKIP:0)(*FAIL)/
+ 01
+No match
+
+/((?(R8000000000)))/
+Failed: number is too big at offset 16
+
+/(?(8000000000/
+Failed: number is too big at offset 13
+
+/(?:ab)?(?:ab)(?:ab)/
+ abab
+ 0: abab
+ ababab
+ 0: ababab
+ aba
+No match
+
+/((*MARK:A))++a(*SKIP:B)b/
+ aacb
+No match
+
+/(?J:(?|(:(?|(?'R')(\z(?|(?'R')(\k'R')|((?'R')))k'R')|((?'R')))H'Ak'Rf)|s(?'R')))/
+
+/(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?&a)(?<a>1)/
+
+/a[[:punct:]b]/BZ
+------------------------------------------------------------------
+ Bra
+ a
+ [!-/:-@[-`b{-~]
+ Ket
+ End
+------------------------------------------------------------------
+
/-- End of testinput2 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput4 b/ext/pcre/pcrelib/testdata/testoutput4
index dcf13b0850..d43c12392d 100644
--- a/ext/pcre/pcrelib/testdata/testoutput4
+++ b/ext/pcre/pcrelib/testdata/testoutput4
@@ -1271,4 +1271,10 @@ No match
#\x{10000}#\x{100}#\x{10ffff}#
0: #\x{10000}#\x{100}#\x{10ffff}#
+"[\S\V\H]"8
+
+/\C(\W?Å¿)'?{{/8
+ \\C(\\W?Å¿)'?{{
+No match
+
/-- End of testinput4 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput5 b/ext/pcre/pcrelib/testdata/testoutput5
index 5c098e650b..bab989ca7e 100644
--- a/ext/pcre/pcrelib/testdata/testoutput5
+++ b/ext/pcre/pcrelib/testdata/testoutput5
@@ -1897,4 +1897,49 @@ Failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 5
End
------------------------------------------------------------------
+/[^\xff]*PRUNE:\x{100}abc(xyz(?1))/8DZ
+------------------------------------------------------------------
+ Bra
+ [^\x{ff}]*
+ PRUNE:\x{100}abc
+ CBra 1
+ xyz
+ Recurse
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options: utf
+No first char
+Need char = 'z'
+
+/(?<=\K\x{17f})/8g+
+ \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}
+ 0: \x{17f}
+ 0+
+
+/(?<=\K\x{17f})/8G+
+ \x{17f}\x{17f}\x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}\x{17f}
+ 0: \x{17f}
+ 0+ \x{17f}
+ 0: \x{17f}
+ 0+
+
/-- End of testinput5 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6
index a990ba13eb..beb85aaa0b 100644
--- a/ext/pcre/pcrelib/testdata/testoutput6
+++ b/ext/pcre/pcrelib/testdata/testoutput6
@@ -2461,4 +2461,100 @@ No match
scat
0: sc
+/[A-`]/i8
+ abcdefghijklmno
+ 0: a
+
+/\C\X*QT/8
+ Ó…\x0aT
+No match
+
+/[\pS#moq]/
+ =
+ 0: =
+
+/[[:punct:]]/8W
+ \xc2\xb4
+No match
+ \x{b4}
+No match
+
+/[[:^ascii:]]/8W
+ \x{100}
+ 0: \x{100}
+ \x{200}
+ 0: \x{200}
+ \x{300}
+ 0: \x{300}
+ \x{37e}
+ 0: \x{37e}
+ a
+No match
+ 9
+No match
+ g
+No match
+
+/[[:^ascii:]\w]/8W
+ a
+ 0: a
+ 9
+ 0: 9
+ g
+ 0: g
+ \x{100}
+ 0: \x{100}
+ \x{200}
+ 0: \x{200}
+ \x{300}
+ 0: \x{300}
+ \x{37e}
+ 0: \x{37e}
+
+/[\w[:^ascii:]]/8W
+ a
+ 0: a
+ 9
+ 0: 9
+ g
+ 0: g
+ \x{100}
+ 0: \x{100}
+ \x{200}
+ 0: \x{200}
+ \x{300}
+ 0: \x{300}
+ \x{37e}
+ 0: \x{37e}
+
+/[^[:ascii:]\W]/8W
+ a
+No match
+ 9
+No match
+ g
+No match
+ \x{100}
+ 0: \x{100}
+ \x{200}
+ 0: \x{200}
+ \x{300}
+No match
+ \x{37e}
+No match
+
+/[[:^ascii:]a]/8W
+ a
+ 0: a
+ 9
+No match
+ g
+No match
+ \x{100}
+ 0: \x{100}
+ \x{200}
+ 0: \x{200}
+ \x{37e}
+ 0: \x{37e}
+
/-- End of testinput6 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7
index ee46bdbb5a..cc9ebdd558 100644
--- a/ext/pcre/pcrelib/testdata/testoutput7
+++ b/ext/pcre/pcrelib/testdata/testoutput7
@@ -949,7 +949,7 @@ No match
/[[:^alpha:][:^cntrl:]]+/8WBZ
------------------------------------------------------------------
Bra
- [ -~\x80-\xff\P{L}]++
+ [ -~\x80-\xff\P{L}\x{100}-\x{10ffff}]++
Ket
End
------------------------------------------------------------------
@@ -961,7 +961,7 @@ No match
/[[:^cntrl:][:^alpha:]]+/8WBZ
------------------------------------------------------------------
Bra
- [ -~\x80-\xff\P{L}]++
+ [ -~\x80-\xff\x{100}-\x{10ffff}\P{L}]++
Ket
End
------------------------------------------------------------------
@@ -2295,4 +2295,57 @@ Need char = 'c' (caseless)
scat
0: sc
+/[\W\p{Any}]/BZ
+------------------------------------------------------------------
+ Bra
+ [\x00-/:-@[-^`{-\xff\p{Any}]
+ Ket
+ End
+------------------------------------------------------------------
+ abc
+ 0: a
+ 123
+ 0: 1
+
+/[\W\pL]/BZ
+------------------------------------------------------------------
+ Bra
+ [\x00-/:-@[-^`{-\xff\p{L}]
+ Ket
+ End
+------------------------------------------------------------------
+ abc
+ 0: a
+ ** Failers
+ 0: *
+ 123
+No match
+
+/a[[:punct:]b]/WBZ
+------------------------------------------------------------------
+ Bra
+ a
+ [b[:punct:]]
+ Ket
+ End
+------------------------------------------------------------------
+
+/a[[:punct:]b]/8WBZ
+------------------------------------------------------------------
+ Bra
+ a
+ [b[:punct:]]
+ Ket
+ End
+------------------------------------------------------------------
+
+/a[b[:punct:]]/8WBZ
+------------------------------------------------------------------
+ Bra
+ a
+ [b[:punct:]]
+ Ket
+ End
+------------------------------------------------------------------
+
/-- End of testinput7 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput8 b/ext/pcre/pcrelib/testdata/testoutput8
index 95c4e4db1b..e4fa497756 100644
--- a/ext/pcre/pcrelib/testdata/testoutput8
+++ b/ext/pcre/pcrelib/testdata/testoutput8
@@ -7785,4 +7785,10 @@ Matched, but offsets vector is too small to show all matches
NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
0: NON QUOTED "QUOT""ED" AFTER
+/(?(?!)a|b)/
+ bbb
+ 0: b
+ aaa
+No match
+
/-- End of testinput8 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutputEBC b/ext/pcre/pcrelib/testdata/testoutputEBC
index abbfdc43fc..72b6fa3edf 100644
--- a/ext/pcre/pcrelib/testdata/testoutputEBC
+++ b/ext/pcre/pcrelib/testdata/testoutputEBC
@@ -41,16 +41,22 @@ No match
/^A\ˆ/
A B
0: A\x20
+ A\x41B
+ 0: AA
/-- Test \H --/
/^A\È/
AB
0: AB
+ A\x42B
+ 0: AB
** Fail
No match
A B
No match
+ A\x41B
+No match
/-- Test \R --/
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 8e40f84673..9225c0f976 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -44,18 +44,29 @@
#define PCRE_CACHE_SIZE 4096
+/* not fully functional workaround for libpcre < 8.0, see bug #70232 */
+#ifndef PCRE_NOTEMPTY_ATSTART
+# define PCRE_NOTEMPTY_ATSTART PCRE_NOTEMPTY
+#endif
+
enum {
PHP_PCRE_NO_ERROR = 0,
PHP_PCRE_INTERNAL_ERROR,
PHP_PCRE_BACKTRACK_LIMIT_ERROR,
PHP_PCRE_RECURSION_LIMIT_ERROR,
PHP_PCRE_BAD_UTF8_ERROR,
- PHP_PCRE_BAD_UTF8_OFFSET_ERROR
+ PHP_PCRE_BAD_UTF8_OFFSET_ERROR,
+ PHP_PCRE_JIT_STACKLIMIT_ERROR
};
PHPAPI ZEND_DECLARE_MODULE_GLOBALS(pcre)
+#ifdef PCRE_STUDY_JIT_COMPILE
+#define PCRE_JIT_STACK_MIN_SIZE (32 * 1024)
+#define PCRE_JIT_STACK_MAX_SIZE (64 * 1024)
+ZEND_TLS pcre_jit_stack *jit_stack = NULL;
+#endif
static void pcre_handle_exec_error(int pcre_code) /* {{{ */
{
@@ -77,6 +88,12 @@ static void pcre_handle_exec_error(int pcre_code) /* {{{ */
case PCRE_ERROR_BADUTF8_OFFSET:
preg_code = PHP_PCRE_BAD_UTF8_OFFSET_ERROR;
break;
+
+#ifdef PCRE_STUDY_JIT_COMPILE
+ case PCRE_ERROR_JIT_STACKLIMIT:
+ preg_code = PHP_PCRE_JIT_STACKLIMIT_ERROR;
+ break;
+#endif
default:
preg_code = PHP_PCRE_INTERNAL_ERROR;
@@ -117,6 +134,16 @@ static PHP_GINIT_FUNCTION(pcre) /* {{{ */
static PHP_GSHUTDOWN_FUNCTION(pcre) /* {{{ */
{
zend_hash_destroy(&pcre_globals->pcre_cache);
+
+#ifdef PCRE_STUDY_JIT_COMPILE
+ /* Stack may only be destroyed when no cached patterns
+ possibly associated with it do exist. */
+ if (jit_stack) {
+ pcre_jit_stack_free(jit_stack);
+ jit_stack = NULL;
+ }
+#endif
+
}
/* }}} */
@@ -169,6 +196,7 @@ static PHP_MINIT_FUNCTION(pcre)
REGISTER_LONG_CONSTANT("PREG_RECURSION_LIMIT_ERROR", PHP_PCRE_RECURSION_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_ERROR", PHP_PCRE_BAD_UTF8_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_OFFSET_ERROR", PHP_PCRE_BAD_UTF8_OFFSET_ERROR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("PREG_JIT_STACKLIMIT_ERROR", PHP_PCRE_JIT_STACKLIMIT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
return SUCCESS;
@@ -184,6 +212,19 @@ static PHP_MSHUTDOWN_FUNCTION(pcre)
}
/* }}} */
+#ifdef PCRE_STUDY_JIT_COMPILE
+/* {{{ PHP_RINIT_FUNCTION(pcre) */
+static PHP_RINIT_FUNCTION(pcre)
+{
+ if (PCRE_G(jit)) {
+ jit_stack = pcre_jit_stack_alloc(PCRE_JIT_STACK_MIN_SIZE,PCRE_JIT_STACK_MAX_SIZE);
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+#endif
+
/* {{{ static pcre_clean_cache */
static int pcre_clean_cache(zval *data, void *arg)
{
@@ -448,6 +489,11 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex)
extra->flags |= PCRE_EXTRA_MATCH_LIMIT | PCRE_EXTRA_MATCH_LIMIT_RECURSION;
extra->match_limit = (unsigned long)PCRE_G(backtrack_limit);
extra->match_limit_recursion = (unsigned long)PCRE_G(recursion_limit);
+#ifdef PCRE_STUDY_JIT_COMPILE
+ if (PCRE_G(jit) && jit_stack) {
+ pcre_assign_jit_stack(extra, NULL, jit_stack);
+ }
+#endif
}
if (error != NULL) {
php_error_docref(NULL, E_WARNING, "Error while studying pattern");
@@ -600,6 +646,11 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ *
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
#endif
+ if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(subject))) {
+ php_error_docref(NULL, E_WARNING, "Subject is too long");
+ RETURN_FALSE;
+ }
+
/* Compile regex or get it from cache. */
if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) {
RETURN_FALSE;
@@ -740,7 +791,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
/* If subpatterns array has been passed, fill it in with values. */
if (subpats != NULL) {
/* Try to get the list of substrings and display a warning if failed. */
- if (pcre_get_substring_list(subject, offsets, count, &stringlist) < 0) {
+ if ((offsets[1] - offsets[0] < 0) || pcre_get_substring_list(subject, offsets, count, &stringlist) < 0) {
if (subpat_names) {
efree(subpat_names);
}
@@ -868,7 +919,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
pcre_free((void *) stringlist);
}
} else if (count == PCRE_ERROR_NOMATCH) {
- /* If we previously set PCRE_NOTEMPTY after a null match,
+ /* If we previously set PCRE_NOTEMPTY_ATSTART after a null match,
this is not necessarily the end. We need to advance
the start offset, and continue. Fudge the offset values
to achieve this, unless we're already at the end of the string. */
@@ -885,10 +936,10 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
}
/* If we have matched an empty string, mimic what Perl's /g options does.
- This turns out to be rather cunning. First we set PCRE_NOTEMPTY and try
+ This turns out to be rather cunning. First we set PCRE_NOTEMPTY_ATSTART and try
the match again at the same point. If this fails (picked up above) we
advance to the next character. */
- g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY | PCRE_ANCHORED : 0;
+ g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0;
/* Advance to the position right after the last full match */
start_offset = offsets[1];
@@ -979,7 +1030,7 @@ static int preg_get_backref(char **str, int *backref)
}
if (in_brace) {
- if (*walk == 0 || *walk != '}')
+ if (*walk != '}')
return 0;
else
walk++;
@@ -1068,8 +1119,8 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
char **subpat_names; /* Array for named subpatterns */
int num_subpats; /* Number of captured subpatterns */
int size_offsets; /* Size of the offsets array */
- int new_len; /* Length of needed storage */
- int alloc_len; /* Actual allocated length */
+ size_t new_len; /* Length of needed storage */
+ size_t alloc_len; /* Actual allocated length */
int match_len; /* Length of the current match */
int backref; /* Backreference number */
int start_offset; /* Where the new search starts */
@@ -1159,7 +1210,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
piece = subject + start_offset;
/* if (EXPECTED(count > 0 && (limit == -1 || limit > 0))) */
- if (EXPECTED(count > 0 && limit)) {
+ if (EXPECTED(count > 0 && (offsets[1] - offsets[0] >= 0) && limit)) {
if (UNEXPECTED(replace_count)) {
++*replace_count;
}
@@ -1263,7 +1314,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
limit--;
}
} else if (count == PCRE_ERROR_NOMATCH || UNEXPECTED(limit == 0)) {
- /* If we previously set PCRE_NOTEMPTY after a null match,
+ /* If we previously set PCRE_NOTEMPTY_ATSTART after a null match,
this is not necessarily the end. We need to advance
the start offset, and continue. Fudge the offset values
to achieve this, unless we're already at the end of the string. */
@@ -1305,10 +1356,10 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
}
/* If we have matched an empty string, mimic what Perl's /g options does.
- This turns out to be rather cunning. First we set PCRE_NOTEMPTY and try
+ This turns out to be rather cunning. First we set PCRE_NOTEMPTY_ATSTART and try
the match again at the same point. If this fails (picked up above) we
advance to the next character. */
- g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY | PCRE_ANCHORED : 0;
+ g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0;
/* Advance to the next piece. */
start_offset = offsets[1];
@@ -1332,7 +1383,6 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
static zend_string *php_replace_in_subject(zval *regex, zval *replace, zval *subject, int limit, int is_callable_replace, int *replace_count)
{
zval *regex_entry,
- *replace_entry = NULL,
*replace_value,
empty_replace;
zend_string *result;
@@ -1342,6 +1392,11 @@ static zend_string *php_replace_in_subject(zval *regex, zval *replace, zval *sub
/* FIXME: This might need to be changed to ZSTR_EMPTY_ALLOC(). Check if this zval could be dtor()'ed somehow */
ZVAL_EMPTY_STRING(&empty_replace);
+ if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(subject_str))) {
+ php_error_docref(NULL, E_WARNING, "Subject is too long");
+ return NULL;
+ }
+
/* If regex is an array */
if (Z_TYPE_P(regex) == IS_ARRAY) {
replace_value = replace;
@@ -1349,25 +1404,26 @@ static zend_string *php_replace_in_subject(zval *regex, zval *replace, zval *sub
/* For each entry in the regex array, get the entry */
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(regex), regex_entry) {
+ zval replace_str;
/* Make sure we're dealing with strings. */
zend_string *regex_str = zval_get_string(regex_entry);
+ ZVAL_UNDEF(&replace_str);
/* If replace is an array and not a callable construct */
if (Z_TYPE_P(replace) == IS_ARRAY && !is_callable_replace) {
/* Get current entry */
- replace_entry = NULL;
while (replace_idx < Z_ARRVAL_P(replace)->nNumUsed) {
- if (Z_TYPE(Z_ARRVAL_P(replace)->arData[replace_idx].val) != IS_UNUSED) {
- replace_entry = &Z_ARRVAL_P(replace)->arData[replace_idx].val;
+ if (Z_TYPE(Z_ARRVAL_P(replace)->arData[replace_idx].val) != IS_UNDEF) {
+ ZVAL_COPY(&replace_str, &Z_ARRVAL_P(replace)->arData[replace_idx].val);
break;
}
replace_idx++;
}
- if (replace_entry != NULL) {
+ if (!Z_ISUNDEF(replace_str)) {
if (!is_callable_replace) {
- convert_to_string_ex(replace_entry);
+ convert_to_string(&replace_str);
}
- replace_value = replace_entry;
+ replace_value = &replace_str;
replace_idx++;
} else {
/* We've run out of replacement strings, so use an empty one */
@@ -1390,10 +1446,12 @@ static zend_string *php_replace_in_subject(zval *regex, zval *replace, zval *sub
} else {
zend_string_release(subject_str);
zend_string_release(regex_str);
+ zval_dtor(&replace_str);
return NULL;
}
zend_string_release(regex_str);
+ zval_dtor(&replace_str);
} ZEND_HASH_FOREACH_END();
return subject_str;
@@ -1423,12 +1481,10 @@ static int preg_replace_impl(zval *return_value, zval *regex, zval *replace, zva
int replace_count = 0, old_replace_count;
if (Z_TYPE_P(replace) != IS_ARRAY && (Z_TYPE_P(replace) != IS_OBJECT || !is_callable_replace)) {
- SEPARATE_ZVAL(replace);
convert_to_string_ex(replace);
}
if (Z_TYPE_P(regex) != IS_ARRAY) {
- SEPARATE_ZVAL(regex);
convert_to_string_ex(regex);
}
@@ -1686,6 +1742,11 @@ static PHP_FUNCTION(preg_split)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
#endif
+ if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(subject))) {
+ php_error_docref(NULL, E_WARNING, "Subject is too long");
+ RETURN_FALSE;
+ }
+
/* Compile regex or get it from cache. */
if ((pce = pcre_get_compiled_regex_cache(regex)) == NULL) {
RETURN_FALSE;
@@ -1703,8 +1764,6 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
zend_long limit_val, zend_long flags)
{
pcre_extra *extra = pce->extra;/* Holds results of studying */
- pcre *re_bump = NULL; /* Regex instance for empty matches */
- pcre_extra *extra_bump = NULL; /* Almost dummy */
pcre_extra extra_data; /* Used locally for exec options */
int *offsets; /* Array of subpattern offsets */
int size_offsets; /* Size of the offsets array */
@@ -1771,7 +1830,7 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
}
/* If something matched */
- if (count > 0) {
+ if (count > 0 && (offsets[1] - offsets[0] >= 0)) {
if (!no_empty || &subject[offsets[0]] != last_match) {
if (offset_capture) {
@@ -1807,44 +1866,26 @@ PHPAPI void php_pcre_split_impl(pcre_cache_entry *pce, char *subject, int subjec
}
}
} else if (count == PCRE_ERROR_NOMATCH) {
- /* If we previously set PCRE_NOTEMPTY after a null match,
+ /* If we previously set PCRE_NOTEMPTY_ATSTART after a null match,
this is not necessarily the end. We need to advance
the start offset, and continue. Fudge the offset values
to achieve this, unless we're already at the end of the string. */
if (g_notempty != 0 && start_offset < subject_len) {
- if (pce->compile_options & PCRE_UTF8) {
- if (re_bump == NULL) {
- int dummy;
- zend_string *regex = zend_string_init("/./us", sizeof("/./us")-1, 0);
- re_bump = pcre_get_compiled_regex(regex, &extra_bump, &dummy);
- zend_string_release(regex);
- if (re_bump == NULL) {
- RETURN_FALSE;
- }
- }
- count = pcre_exec(re_bump, extra_bump, subject,
- subject_len, start_offset,
- exoptions, offsets, size_offsets);
- if (count < 1) {
- php_error_docref(NULL, E_WARNING, "Unknown error");
- RETURN_FALSE;
- }
- } else {
- offsets[0] = start_offset;
- offsets[1] = start_offset + 1;
- }
- } else
+ offsets[0] = start_offset;
+ offsets[1] = start_offset + calculate_unit_length(pce, subject + start_offset);
+ } else {
break;
+ }
} else {
pcre_handle_exec_error(count);
break;
}
/* If we have matched an empty string, mimic what Perl's /g options does.
- This turns out to be rather cunning. First we set PCRE_NOTEMPTY and try
+ This turns out to be rather cunning. First we set PCRE_NOTEMPTY_ATSTART and try
the match again at the same point. If this fails (picked up above) we
advance to the next character. */
- g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY | PCRE_ANCHORED : 0;
+ g_notempty = (offsets[1] == offsets[0])? PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED : 0;
/* Advance to the position right after the last full match */
start_offset = offsets[1];
@@ -2191,7 +2232,11 @@ zend_module_entry pcre_module_entry = {
pcre_functions,
PHP_MINIT(pcre),
PHP_MSHUTDOWN(pcre),
- NULL,
+#ifdef PCRE_STUDY_JIT_COMPILE
+ PHP_RINIT(pcre),
+#else
+ NULL
+#endif
NULL,
PHP_MINFO(pcre),
PHP_PCRE_VERSION,
diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h
index fb155c467e..7515726449 100644
--- a/ext/pcre/php_pcre.h
+++ b/ext/pcre/php_pcre.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -81,13 +81,8 @@ ZEND_BEGIN_MODULE_GLOBALS(pcre)
int error_code;
ZEND_END_MODULE_GLOBALS(pcre)
-PHPAPI ZEND_EXTERN_MODULE_GLOBALS(pcre);
-
-#ifdef ZTS
-# define PCRE_G(v) ZEND_TSRMG(pcre_globals_id, zend_pcre_globals *, v)
-#else
-# define PCRE_G(v) (pcre_globals.v)
-#endif
+PHPAPI ZEND_EXTERN_MODULE_GLOBALS(pcre)
+#define PCRE_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(pcre, v)
#else
diff --git a/ext/pcre/tests/backtrack_limit.phpt b/ext/pcre/tests/backtrack_limit.phpt
index 419e6c2009..3f0d8e6446 100644
--- a/ext/pcre/tests/backtrack_limit.phpt
+++ b/ext/pcre/tests/backtrack_limit.phpt
@@ -8,6 +8,7 @@ if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
?>
--INI--
pcre.backtrack_limit=2
+pcre.jit=0
--FILE--
<?php
diff --git a/ext/pcre/tests/bug69864.phpt b/ext/pcre/tests/bug69864.phpt
index d84862aeda..cf7ba5b72e 100644
--- a/ext/pcre/tests/bug69864.phpt
+++ b/ext/pcre/tests/bug69864.phpt
@@ -1,7 +1,13 @@
--TEST--
Bug #69864 (Segfault in preg_replace_callback)
+--SKIPIF--
+<?php
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+?>
--FILE--
<?php
+/* CAUTION: this test will most likely fail with valgrind until --smc-check=all is used. */
+
const PREG_CACHE_SIZE = 4096; // this has to be >= the resp. constant in php_pcre.c
var_dump(preg_replace_callback('/a/', function($m) {
diff --git a/ext/pcre/tests/bug70232.phpt b/ext/pcre/tests/bug70232.phpt
new file mode 100644
index 0000000000..f421e9c43d
--- /dev/null
+++ b/ext/pcre/tests/bug70232.phpt
@@ -0,0 +1,68 @@
+--TEST--
+Bug #70232 (Incorrect bump-along behavior with \K and empty string match)
+--SKIPIF--
+<?php
+if (version_compare(explode(' ', PCRE_VERSION)[0], '8.0', 'lt')) {
+ die("skip this test requires libpcre >= 8.0");
+}
+?>
+--FILE--
+<?php
+$pattern = '~(?: |\G)\d\B\K~';
+$subject = "123 a123 1234567 b123 123";
+preg_match_all($pattern, $subject, $matches);
+var_dump($matches);
+var_dump(preg_replace($pattern, "*", $subject));
+var_dump(preg_split($pattern, $subject));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(10) {
+ [0]=>
+ string(0) ""
+ [1]=>
+ string(0) ""
+ [2]=>
+ string(0) ""
+ [3]=>
+ string(0) ""
+ [4]=>
+ string(0) ""
+ [5]=>
+ string(0) ""
+ [6]=>
+ string(0) ""
+ [7]=>
+ string(0) ""
+ [8]=>
+ string(0) ""
+ [9]=>
+ string(0) ""
+ }
+}
+string(35) "1*2*3 a123 1*2*3*4*5*6*7 b123 1*2*3"
+array(11) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(1) "2"
+ [2]=>
+ string(8) "3 a123 1"
+ [3]=>
+ string(1) "2"
+ [4]=>
+ string(1) "3"
+ [5]=>
+ string(1) "4"
+ [6]=>
+ string(1) "5"
+ [7]=>
+ string(1) "6"
+ [8]=>
+ string(8) "7 b123 1"
+ [9]=>
+ string(1) "2"
+ [10]=>
+ string(1) "3"
+}
diff --git a/ext/pcre/tests/bug70345.phpt b/ext/pcre/tests/bug70345.phpt
new file mode 100644
index 0000000000..0947ba3daa
--- /dev/null
+++ b/ext/pcre/tests/bug70345.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #70345 (Multiple vulnerabilities related to PCRE functions)
+--FILE--
+<?php
+$regex = '/(?=xyz\K)/';
+$subject = "aaaaxyzaaaa";
+
+$v = preg_split($regex, $subject);
+print_r($v);
+
+$regex = '/(a(?=xyz\K))/';
+$subject = "aaaaxyzaaaa";
+preg_match($regex, $subject, $matches);
+
+var_dump($matches);
+--EXPECTF--
+Array
+(
+ [0] => aaaaxyzaaaa
+)
+
+Warning: preg_match(): Get subpatterns list failed in %s on line %d
+array(0) {
+}
diff --git a/ext/pcre/tests/bug71537.phpt b/ext/pcre/tests/bug71537.phpt
new file mode 100644
index 0000000000..cdc2928a28
--- /dev/null
+++ b/ext/pcre/tests/bug71537.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Fixed bug #71537 (PCRE segfault from Opcache)
+--FILE--
+<?php
+
+var_dump(preg_replace(array("/Monkey/"), array(2016), "Happy Year of Monkey"));
+?>
+--EXPECT--
+string(18) "Happy Year of 2016"
diff --git a/ext/pcre/tests/cache_limit.phpt b/ext/pcre/tests/cache_limit.phpt
index bfe7f1b9a9..d6f3510e9d 100644
--- a/ext/pcre/tests/cache_limit.phpt
+++ b/ext/pcre/tests/cache_limit.phpt
@@ -1,5 +1,9 @@
--TEST--
Compiled regex cache limit
+--SKIPIF--
+<?php
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+?>
--FILE--
<?php
define('PREG_CACHE_SIZE', 4096+1);
diff --git a/ext/pcre/tests/preg_match_error3.phpt b/ext/pcre/tests/preg_match_error3.phpt
new file mode 100644
index 0000000000..7202b68b34
--- /dev/null
+++ b/ext/pcre/tests/preg_match_error3.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Test preg_match() function : error conditions - jit stacklimit exhausted
+--FILE--
+<?php
+var_dump(preg_match('/^(foo)+$/', str_repeat('foo', 1024*8192)));
+var_dump(preg_last_error() === PREG_JIT_STACKLIMIT_ERROR);
+?>
+--EXPECT--
+bool(false)
+bool(true)
diff --git a/ext/pcre/tests/preg_match_error4.phpt b/ext/pcre/tests/preg_match_error4.phpt
new file mode 100644
index 0000000000..06aa82b469
--- /dev/null
+++ b/ext/pcre/tests/preg_match_error4.phpt
@@ -0,0 +1,935 @@
+--TEST--
+Pattern exhausting PCRE JIT stack
+--FILE--
+<?php
+
+$re = '{^(\\s*\\{\\s*(?:"(?:[^\\0-\\x09\\x0a-\\x1f\\\\"]+|\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4})*"\\s*:\\s*(?:[0-9.]+|null|true|false|"(?:[^\\0-\\x09\\x0a-\\x1f\\\\"]+|\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4})*"|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[[^\\]]*\\])*\\])*\\])*\\]|(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*)*\\]|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*\\})\\s*,\\s*)*?)("require"\\s*:\\s*)((?:[0-9.]+|null|true|false|"(?:[^\\0-\\x09\\x0a-\\x1f\\\\"]+|\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4})*"|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[[^\\]]*\\])*\\])*\\])*\\]|(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*)*\\]|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*\\}))(.*)}s';
+
+$str = '{
+ "config": {
+ "cache-files-ttl": 0,
+ "discard-changes": true
+ },
+ "minimum-stability": "stable",
+ "prefer-stable": false,
+ "provide": {
+ "heroku-sys\\/cedar": "14.2016.03.12"
+ },
+ "repositories": [
+ {
+ "packagist": false
+ },
+ {
+ "type": "path",
+ "url": "\\/tmp\\/buildpacktUY7k\\/support\\/installer\\/",
+ "options": {
+ "symlink": false
+ }
+ },
+ {
+ "type": "composer",
+ "url": "https:\\/\\/lang-php.s3.amazonaws.com\\/dist-cedar-14-stable\\/"
+ },
+ {
+ "type": "package",
+ "package": [
+ {
+ "type": "metapackage",
+ "name": "algolia\\/algoliasearch-client-php",
+ "version": "1.8.1",
+ "require": {
+ "heroku-sys\\/ext-mbstring": "*",
+ "heroku-sys\\/php": ">=5.4"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "algolia\\/algoliasearch-laravel",
+ "version": "1.0.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "asm89\\/stack-cors",
+ "version": "0.2.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "aws\\/aws-sdk-php",
+ "version": "3.15.7",
+ "require": {
+ "heroku-sys\\/php": ">=5.5"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "aws\\/aws-sdk-php-laravel",
+ "version": "3.1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "barryvdh\\/laravel-cors",
+ "version": "v0.7.3",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "bookingsync\\/oauth2-bookingsync-php",
+ "version": "0.1.3",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "classpreloader\\/classpreloader",
+ "version": "3.0.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "danielstjules\\/stringy",
+ "version": "1.10.0",
+ "require": {
+ "heroku-sys\\/ext-mbstring": "*",
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "dnoegel\\/php-xdg-base-dir",
+ "version": "0.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/annotations",
+ "version": "v1.2.7",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/cache",
+ "version": "v1.6.0",
+ "require": {
+ "heroku-sys\\/php": "~5.5|~7.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/collections",
+ "version": "v1.3.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/common",
+ "version": "v2.6.1",
+ "require": {
+ "heroku-sys\\/php": "~5.5|~7.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/dbal",
+ "version": "v2.5.4",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/inflector",
+ "version": "v1.1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "doctrine\\/lexer",
+ "version": "v1.0.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "fabpot\\/goutte",
+ "version": "v3.1.2",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "graham-campbell\\/manager",
+ "version": "v2.3.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "guzzle\\/guzzle",
+ "version": "v3.9.3",
+ "require": {
+ "heroku-sys\\/ext-curl": "*",
+ "heroku-sys\\/php": ">=5.3.3"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "guzzlehttp\\/guzzle",
+ "version": "6.1.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "guzzlehttp\\/promises",
+ "version": "1.1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "guzzlehttp\\/psr7",
+ "version": "1.2.3",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "intercom\\/intercom-php",
+ "version": "v1.4.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "intervention\\/image",
+ "version": "2.3.6",
+ "require": {
+ "heroku-sys\\/ext-fileinfo": "*",
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "jakub-onderka\\/php-console-color",
+ "version": "0.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "jakub-onderka\\/php-console-highlighter",
+ "version": "v0.3.2",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "jeremeamia\\/SuperClosure",
+ "version": "2.2.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.4"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "jlapp\\/swaggervel",
+ "version": "dev-master",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "laravel\\/framework",
+ "version": "v5.1.31",
+ "require": {
+ "heroku-sys\\/ext-mbstring": "*",
+ "heroku-sys\\/ext-openssl": "*",
+ "heroku-sys\\/php": ">=5.5.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "laravelcollective\\/html",
+ "version": "v5.1.9",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "league\\/flysystem",
+ "version": "1.0.18",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "league\\/flysystem-aws-s3-v3",
+ "version": "1.0.9",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "league\\/fractal",
+ "version": "0.13.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.4"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "league\\/glide",
+ "version": "1.0.0",
+ "require": {
+ "heroku-sys\\/php": "^5.4 | ^7.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "league\\/oauth2-client",
+ "version": "0.12.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "mindscape\\/raygun4php",
+ "version": "dev-master",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "monolog\\/monolog",
+ "version": "1.18.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "mtdowling\\/cron-expression",
+ "version": "v1.1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "mtdowling\\/jmespath.php",
+ "version": "2.3.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "namshi\\/jose",
+ "version": "5.0.2",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.3"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "nesbot\\/carbon",
+ "version": "1.21.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "nikic\\/php-parser",
+ "version": "v2.0.1",
+ "require": {
+ "heroku-sys\\/ext-tokenizer": "*",
+ "heroku-sys\\/php": ">=5.4"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "orangehill\\/iseed",
+ "version": "dev-master",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "paragonie\\/random_compat",
+ "version": "v1.2.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.2.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "phpseclib\\/phpseclib",
+ "version": "0.3.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.0.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "predis\\/predis",
+ "version": "v1.0.3",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "psr\\/http-message",
+ "version": "1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "psy\\/psysh",
+ "version": "v0.7.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "swiftmailer\\/swiftmailer",
+ "version": "v5.4.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.3"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/browser-kit",
+ "version": "v2.8.3",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/console",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/css-selector",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/debug",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/dom-crawler",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/event-dispatcher",
+ "version": "v2.8.3",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/finder",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/http-foundation",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/http-kernel",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/polyfill-php56",
+ "version": "v1.1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.3"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/polyfill-util",
+ "version": "v1.1.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.3"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/process",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/routing",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/translation",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "symfony\\/var-dumper",
+ "version": "v2.7.10",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.9"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "twilio\\/sdk",
+ "version": "4.10.0",
+ "require": {
+ "heroku-sys\\/php": ">=5.2.1"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "tymon\\/jwt-auth",
+ "version": "0.5.9",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "vinkla\\/algolia",
+ "version": "2.2.1",
+ "require": {
+ "heroku-sys\\/php": "^5.5.9 || ^7.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "vlucas\\/phpdotenv",
+ "version": "v1.1.1",
+ "require": {
+ "heroku-sys\\/php": ">=5.3.2"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "zircote\\/swagger-php",
+ "version": "2.0.6",
+ "require": {
+ "heroku-sys\\/php": ">=5.4.0"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ },
+ {
+ "type": "metapackage",
+ "name": "composer.json\\/composer.lock",
+ "version": "dev-a923f6cdbbc9439cabb74aa9003f6d51",
+ "require": {
+ "heroku-sys\\/php": ">=5.5.9",
+ "heroku-sys\\/ext-gd": "*",
+ "heroku-sys\\/ext-exif": "*",
+ "heroku-sys\\/ext-fileinfo": "*"
+ },
+ "replace": [],
+ "provide": [],
+ "conflict": []
+ }
+ ]
+ }
+ ],
+ "require": {
+ "composer.json\\/composer.lock": "dev-a923f6cdbbc9439cabb74aa9003f6d51",
+ "algolia\\/algoliasearch-client-php": "1.8.1",
+ "algolia\\/algoliasearch-laravel": "1.0.10",
+ "asm89\\/stack-cors": "0.2.1",
+ "aws\\/aws-sdk-php": "3.15.7",
+ "aws\\/aws-sdk-php-laravel": "3.1.0",
+ "barryvdh\\/laravel-cors": "v0.7.3",
+ "bookingsync\\/oauth2-bookingsync-php": "0.1.3",
+ "classpreloader\\/classpreloader": "3.0.0",
+ "danielstjules\\/stringy": "1.10.0",
+ "dnoegel\\/php-xdg-base-dir": "0.1",
+ "doctrine\\/annotations": "v1.2.7",
+ "doctrine\\/cache": "v1.6.0",
+ "doctrine\\/collections": "v1.3.0",
+ "doctrine\\/common": "v2.6.1",
+ "doctrine\\/dbal": "v2.5.4",
+ "doctrine\\/inflector": "v1.1.0",
+ "doctrine\\/lexer": "v1.0.1",
+ "fabpot\\/goutte": "v3.1.2",
+ "graham-campbell\\/manager": "v2.3.1",
+ "guzzle\\/guzzle": "v3.9.3",
+ "guzzlehttp\\/guzzle": "6.1.1",
+ "guzzlehttp\\/promises": "1.1.0",
+ "guzzlehttp\\/psr7": "1.2.3",
+ "intercom\\/intercom-php": "v1.4.0",
+ "intervention\\/image": "2.3.6",
+ "jakub-onderka\\/php-console-color": "0.1",
+ "jakub-onderka\\/php-console-highlighter": "v0.3.2",
+ "jeremeamia\\/SuperClosure": "2.2.0",
+ "jlapp\\/swaggervel": "dev-master",
+ "laravel\\/framework": "v5.1.31",
+ "laravelcollective\\/html": "v5.1.9",
+ "league\\/flysystem": "1.0.18",
+ "league\\/flysystem-aws-s3-v3": "1.0.9",
+ "league\\/fractal": "0.13.0",
+ "league\\/glide": "1.0.0",
+ "league\\/oauth2-client": "0.12.1",
+ "mindscape\\/raygun4php": "dev-master",
+ "monolog\\/monolog": "1.18.0",
+ "mtdowling\\/cron-expression": "v1.1.0",
+ "mtdowling\\/jmespath.php": "2.3.0",
+ "namshi\\/jose": "5.0.2",
+ "nesbot\\/carbon": "1.21.0",
+ "nikic\\/php-parser": "v2.0.1",
+ "orangehill\\/iseed": "dev-master",
+ "paragonie\\/random_compat": "v1.2.1",
+ "phpseclib\\/phpseclib": "0.3.10",
+ "predis\\/predis": "v1.0.3",
+ "psr\\/http-message": "1.0",
+ "psy\\/psysh": "v0.7.1",
+ "swiftmailer\\/swiftmailer": "v5.4.1",
+ "symfony\\/browser-kit": "v2.8.3",
+ "symfony\\/console": "v2.7.10",
+ "symfony\\/css-selector": "v2.7.10",
+ "symfony\\/debug": "v2.7.10",
+ "symfony\\/dom-crawler": "v2.7.10",
+ "symfony\\/event-dispatcher": "v2.8.3",
+ "symfony\\/finder": "v2.7.10",
+ "symfony\\/http-foundation": "v2.7.10",
+ "symfony\\/http-kernel": "v2.7.10",
+ "symfony\\/polyfill-php56": "v1.1.0",
+ "symfony\\/polyfill-util": "v1.1.0",
+ "symfony\\/process": "v2.7.10",
+ "symfony\\/routing": "v2.7.10",
+ "symfony\\/translation": "v2.7.10",
+ "symfony\\/var-dumper": "v2.7.10",
+ "twilio\\/sdk": "4.10.0",
+ "tymon\\/jwt-auth": "0.5.9",
+ "vinkla\\/algolia": "2.2.1",
+ "vlucas\\/phpdotenv": "v1.1.1",
+ "zircote\\/swagger-php": "2.0.6",
+ "heroku-sys\\/apache": "^2.4.10",
+ "heroku-sys\\/nginx": "~1.8.0"
+ }
+}';
+
+$count = preg_match($re, $str, $matches);
+
+if($count === false) {
+ switch (preg_last_error()) {
+ case PREG_NO_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_NO_ERROR', PREG_NO_ERROR);
+ case PREG_INTERNAL_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_INTERNAL_ERROR', PREG_INTERNAL_ERROR);
+ case PREG_BACKTRACK_LIMIT_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_BACKTRACK_LIMIT_ERROR', PREG_BACKTRACK_LIMIT_ERROR);
+ case PREG_RECURSION_LIMIT_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_RECURSION_LIMIT_ERROR', PREG_RECURSION_LIMIT_ERROR);
+ case PREG_BAD_UTF8_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_BAD_UTF8_ERROR', PREG_BAD_UTF8_ERROR);
+ case PREG_BAD_UTF8_OFFSET_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_BAD_UTF8_OFFSET_ERROR', PREG_BAD_UTF8_OFFSET_ERROR);
+ case PREG_JIT_STACKLIMIT_ERROR:
+ throw new \RuntimeException('Failed to execute regex: PREG_JIT_STACKLIMIT_ERROR', PREG_JIT_STACKLIMIT_ERROR);
+ default:
+ throw new \RuntimeException('Failed to execute regex: Unknown error');
+ }
+} else {
+ var_dump("Done, $count matches.");
+}
+?>
+==DONE==
+--EXPECT--
+string(16) "Done, 1 matches."
+==DONE==
diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag
index dc25c9f70b..58125ed872 100644
--- a/ext/pdo/Makefile.frag
+++ b/ext/pdo/Makefile.frag
@@ -10,7 +10,7 @@ $(srcdir)/pdo_sql_parser.c: $(srcdir)/pdo_sql_parser.re
(cd $(top_srcdir); $(RE2C) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re)
install-pdo-headers:
- @echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/"
+ @echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo
@for f in $(PDO_HEADER_FILES); do \
if test -f "$(top_srcdir)/$$f"; then \
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index 15265d9755..e0fc9d74f2 100644
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,8 +32,7 @@
#include "php_pdo_driver.h"
#include "php_pdo_int.h"
#include "zend_exceptions.h"
-
-static zend_class_entry *spl_ce_RuntimeException;
+#include "ext/spl/spl_exceptions.h"
zend_class_entry *pdo_dbh_ce, *pdo_dbstmt_ce, *pdo_row_ce;
@@ -79,20 +78,9 @@ PDO_API char *php_pdo_str_tolower_dup(const char *src, int len) /* {{{ */
PDO_API zend_class_entry *php_pdo_get_exception_base(int root) /* {{{ */
{
-#if defined(HAVE_SPL)
if (!root) {
- if (!spl_ce_RuntimeException) {
- zend_class_entry *pce;
-
- if ((pce = zend_hash_str_find_ptr(CG(class_table), "runtimeexception", sizeof("RuntimeException") - 1))) {
- spl_ce_RuntimeException = pce;
- return pce;
- }
- } else {
- return spl_ce_RuntimeException;
- }
+ return spl_ce_RuntimeException;
}
-#endif
return zend_ce_exception;
}
/* }}} */
@@ -128,14 +116,10 @@ const zend_function_entry pdo_functions[] = {
/* }}} */
/* {{{ pdo_functions[] */
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_deps[] = {
-#ifdef HAVE_SPL
ZEND_MOD_REQUIRED("spl")
-#endif
ZEND_MOD_END
};
-#endif
/* }}} */
/* {{{ pdo_module_entry */
@@ -351,8 +335,6 @@ PHP_MINIT_FUNCTION(pdo)
{
zend_class_entry ce;
- spl_ce_RuntimeException = NULL;
-
if (FAILURE == pdo_sqlstate_init_error_table()) {
return FAILURE;
}
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 70a8bd2ea5..624281c18b 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -281,8 +281,7 @@ static PHP_METHOD(PDO, dbh_constructor)
Z_STRVAL_P(v));
is_persistent = 1;
} else {
- convert_to_long_ex(v);
- is_persistent = Z_LVAL_P(v) ? 1 : 0;
+ is_persistent = zval_get_long(v) ? 1 : 0;
plen = spprintf(&hashkey, 0, "PDO:DBH:DSN=%s:%s:%s", data_source,
username ? username : "",
password ? password : "");
@@ -416,8 +415,6 @@ static zval *pdo_stmt_instantiate(pdo_dbh_t *dbh, zval *object, zend_class_entry
if (UNEXPECTED(object_init_ex(object, dbstmt_ce) != SUCCESS)) {
return NULL;
}
- // ??? Z_SET_REFCOUNT_P(object, 1);
- //Z_SET_ISREF_P(object);
return object;
} /* }}} */
@@ -439,10 +436,8 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
zval retval;
fci.size = sizeof(zend_fcall_info);
- fci.function_table = &dbstmt_ce->function_table;
ZVAL_UNDEF(&fci.function_name);
fci.object = Z_OBJ_P(object);
- fci.symbol_table = NULL;
fci.retval = &retval;
fci.param_count = 0;
fci.params = NULL;
@@ -452,7 +447,7 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
fcc.initialized = 1;
fcc.function_handler = dbstmt_ce->constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(object);
fcc.object = Z_OBJ_P(object);
@@ -670,6 +665,7 @@ static PHP_METHOD(PDO, inTransaction)
static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* {{{ */
{
+ zend_long lval;
#define PDO_LONG_PARAM_CHECK \
if (Z_TYPE_P(value) != IS_LONG && Z_TYPE_P(value) != IS_STRING && Z_TYPE_P(value) != IS_FALSE && Z_TYPE_P(value) != IS_TRUE) { \
@@ -681,12 +677,12 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /*
switch (attr) {
case PDO_ATTR_ERRMODE:
PDO_LONG_PARAM_CHECK;
- convert_to_long(value);
- switch (Z_LVAL_P(value)) {
+ lval = zval_get_long(value);
+ switch (lval) {
case PDO_ERRMODE_SILENT:
case PDO_ERRMODE_WARNING:
case PDO_ERRMODE_EXCEPTION:
- dbh->error_mode = Z_LVAL_P(value);
+ dbh->error_mode = lval;
return SUCCESS;
default:
pdo_raise_impl_error(dbh, NULL, "HY000", "invalid error mode");
@@ -697,12 +693,12 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /*
case PDO_ATTR_CASE:
PDO_LONG_PARAM_CHECK;
- convert_to_long(value);
- switch (Z_LVAL_P(value)) {
+ lval = zval_get_long(value);
+ switch (lval) {
case PDO_CASE_NATURAL:
case PDO_CASE_UPPER:
case PDO_CASE_LOWER:
- dbh->desired_case = Z_LVAL_P(value);
+ dbh->desired_case = lval;
return SUCCESS;
default:
pdo_raise_impl_error(dbh, NULL, "HY000", "invalid case folding mode");
@@ -713,8 +709,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /*
case PDO_ATTR_ORACLE_NULLS:
PDO_LONG_PARAM_CHECK;
- convert_to_long(value);
- dbh->oracle_nulls = Z_LVAL_P(value);
+ dbh->oracle_nulls = zval_get_long(value);
return SUCCESS;
case PDO_ATTR_DEFAULT_FETCH_MODE:
@@ -729,18 +724,17 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /*
} else {
PDO_LONG_PARAM_CHECK;
}
- convert_to_long(value);
- if (Z_LVAL_P(value) == PDO_FETCH_USE_DEFAULT) {
+ lval = zval_get_long(value);
+ if (lval == PDO_FETCH_USE_DEFAULT) {
pdo_raise_impl_error(dbh, NULL, "HY000", "invalid fetch mode type");
return FAILURE;
}
- dbh->default_fetch_type = Z_LVAL_P(value);
+ dbh->default_fetch_type = lval;
return SUCCESS;
case PDO_ATTR_STRINGIFY_FETCHES:
PDO_LONG_PARAM_CHECK;
- convert_to_long(value);
- dbh->stringify = Z_LVAL_P(value) ? 1 : 0;
+ dbh->stringify = zval_get_long(value) ? 1 : 0;
return SUCCESS;
case PDO_ATTR_STATEMENT_CLASS: {
@@ -1019,14 +1013,17 @@ static PHP_METHOD(PDO, errorInfo)
if (dbh->query_stmt) {
add_next_index_string(return_value, dbh->query_stmt->error_code);
+ if(!strncmp(dbh->query_stmt->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE))) goto fill_array;
} else {
add_next_index_string(return_value, dbh->error_code);
+ if(!strncmp(dbh->error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE))) goto fill_array;
}
if (dbh->methods->fetch_err) {
dbh->methods->fetch_err(dbh, dbh->query_stmt, return_value);
}
+fill_array:
/**
* In order to be consistent, we have to make sure we add the good amount
* of nulls depending on the current number of elements. We make a simple
@@ -1262,12 +1259,20 @@ static void cls_method_dtor(zval *el) /* {{{ */ {
}
/* }}} */
+static void cls_method_pdtor(zval *el) /* {{{ */ {
+ zend_function *func = (zend_function*)Z_PTR_P(el);
+ if (func->common.function_name) {
+ zend_string_release(func->common.function_name);
+ }
+ pefree(func, 1);
+}
+/* }}} */
+
/* {{{ overloaded object handlers for PDO class */
int pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind)
{
const zend_function_entry *funcs;
- zend_function func;
- zend_internal_function *ifunc = (zend_internal_function*)&func;
+ zend_internal_function func;
size_t namelen;
char *lc_name;
pdo_dbh_t *dbh = dbh_obj->inner;
@@ -1283,43 +1288,46 @@ int pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind)
if (!(dbh->cls_methods[kind] = pemalloc(sizeof(HashTable), dbh->is_persistent))) {
php_error_docref(NULL, E_ERROR, "out of memory while allocating PDO methods.");
}
- zend_hash_init_ex(dbh->cls_methods[kind], 8, NULL, cls_method_dtor, dbh->is_persistent, 0);
+ zend_hash_init_ex(dbh->cls_methods[kind], 8, NULL,
+ dbh->is_persistent? cls_method_pdtor : cls_method_dtor, dbh->is_persistent, 0);
+
+ memset(&func, 0, sizeof(func));
while (funcs->fname) {
- ifunc->type = ZEND_INTERNAL_FUNCTION;
- ifunc->handler = funcs->handler;
- ifunc->function_name = zend_string_init(funcs->fname, strlen(funcs->fname), 0);
- ifunc->scope = dbh_obj->std.ce;
- ifunc->prototype = NULL;
+ func.type = ZEND_INTERNAL_FUNCTION;
+ func.handler = funcs->handler;
+ func.function_name = zend_string_init(funcs->fname, strlen(funcs->fname), dbh->is_persistent);
+ func.scope = dbh_obj->std.ce;
+ func.prototype = NULL;
if (funcs->flags) {
- ifunc->fn_flags = funcs->flags | ZEND_ACC_NEVER_CACHE;
+ func.fn_flags = funcs->flags | ZEND_ACC_NEVER_CACHE;
} else {
- ifunc->fn_flags = ZEND_ACC_PUBLIC | ZEND_ACC_NEVER_CACHE;
+ func.fn_flags = ZEND_ACC_PUBLIC | ZEND_ACC_NEVER_CACHE;
}
if (funcs->arg_info) {
zend_internal_function_info *info = (zend_internal_function_info*)funcs->arg_info;
- ifunc->arg_info = (zend_internal_arg_info*)funcs->arg_info + 1;
- ifunc->num_args = funcs->num_args;
+ func.arg_info = (zend_internal_arg_info*)funcs->arg_info + 1;
+ func.num_args = funcs->num_args;
if (info->required_num_args == -1) {
- ifunc->required_num_args = funcs->num_args;
+ func.required_num_args = funcs->num_args;
} else {
- ifunc->required_num_args = info->required_num_args;
+ func.required_num_args = info->required_num_args;
}
if (info->return_reference) {
- ifunc->fn_flags |= ZEND_ACC_RETURN_REFERENCE;
+ func.fn_flags |= ZEND_ACC_RETURN_REFERENCE;
}
if (funcs->arg_info[funcs->num_args].is_variadic) {
- ifunc->fn_flags |= ZEND_ACC_VARIADIC;
+ func.fn_flags |= ZEND_ACC_VARIADIC;
/* Don't count the variadic argument */
- ifunc->num_args--;
+ func.num_args--;
}
} else {
- ifunc->arg_info = NULL;
- ifunc->num_args = 0;
- ifunc->required_num_args = 0;
+ func.arg_info = NULL;
+ func.num_args = 0;
+ func.required_num_args = 0;
}
- zend_set_function_arg_flags((zend_function*)ifunc);
+ zend_set_function_arg_flags((zend_function*)&func);
namelen = strlen(funcs->fname);
lc_name = emalloc(namelen+1);
zend_str_tolower_copy(lc_name, funcs->fname, namelen);
@@ -1422,9 +1430,7 @@ void pdo_dbh_init(void)
REGISTER_PDO_CLASS_CONST_LONG("FETCH_KEY_PAIR", (zend_long)PDO_FETCH_KEY_PAIR);
REGISTER_PDO_CLASS_CONST_LONG("FETCH_CLASSTYPE", (zend_long)PDO_FETCH_CLASSTYPE);
-#if PHP_VERSION_ID >= 50100
REGISTER_PDO_CLASS_CONST_LONG("FETCH_SERIALIZE",(zend_long)PDO_FETCH_SERIALIZE);
-#endif
REGISTER_PDO_CLASS_CONST_LONG("FETCH_PROPS_LATE", (zend_long)PDO_FETCH_PROPS_LATE);
REGISTER_PDO_CLASS_CONST_LONG("FETCH_NAMED", (zend_long)PDO_FETCH_NAMED);
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index 155ca95c1c..0095c3d8dc 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -54,7 +54,6 @@ static int scan(Scanner *s)
#line 55 "ext/pdo/pdo_sql_parser.c"
{
YYCTYPE yych;
- unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
@@ -62,31 +61,32 @@ static int scan(Scanner *s)
case 0x00: goto yy2;
case '"': goto yy3;
case '\'': goto yy5;
- case '-': goto yy11;
- case '/': goto yy9;
+ case '(':
+ case ')':
+ case '*':
+ case '+':
+ case ',':
+ case '.': goto yy9;
+ case '-': goto yy10;
+ case '/': goto yy11;
case ':': goto yy6;
case '?': goto yy7;
default: goto yy12;
}
yy2:
YYCURSOR = YYMARKER;
- switch (yyaccept) {
- case 0: goto yy4;
- case 1: goto yy10;
- }
+ goto yy4;
yy3:
- yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych >= 0x01) goto yy43;
+ if (yych >= 0x01) goto yy37;
yy4:
#line 63 "ext/pdo/pdo_sql_parser.re"
{ SKIP_ONE(PDO_PARSER_TEXT); }
-#line 85 "ext/pdo/pdo_sql_parser.c"
+#line 86 "ext/pdo/pdo_sql_parser.c"
yy5:
- yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x00) goto yy4;
- goto yy38;
+ goto yy32;
yy6:
yych = *++YYCURSOR;
switch (yych) {
@@ -152,14 +152,14 @@ yy6:
case 'w':
case 'x':
case 'y':
- case 'z': goto yy32;
- case ':': goto yy35;
+ case 'z': goto yy26;
+ case ':': goto yy29;
default: goto yy4;
}
yy7:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
- case '?': goto yy29;
+ case '?': goto yy23;
default: goto yy8;
}
yy8:
@@ -167,133 +167,89 @@ yy8:
{ RET(PDO_PARSER_BIND_POS); }
#line 169 "ext/pdo/pdo_sql_parser.c"
yy9:
- ++YYCURSOR;
- switch ((yych = *YYCURSOR)) {
- case '*': goto yy19;
- default: goto yy13;
- }
+ yych = *++YYCURSOR;
+ goto yy4;
yy10:
-#line 65 "ext/pdo/pdo_sql_parser.re"
- { RET(PDO_PARSER_TEXT); }
-#line 179 "ext/pdo/pdo_sql_parser.c"
-yy11:
yych = *++YYCURSOR;
switch (yych) {
- case '-': goto yy14;
- default: goto yy13;
+ case '-': goto yy21;
+ default: goto yy4;
+ }
+yy11:
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch (yych) {
+ case '*': goto yy15;
+ default: goto yy4;
}
yy12:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy13:
switch (yych) {
case 0x00:
case '"':
case '\'':
+ case '(':
+ case ')':
+ case '*':
+ case '+':
+ case ',':
+ case '-':
+ case '.':
+ case '/':
case ':':
- case '?': goto yy10;
+ case '?': goto yy14;
default: goto yy12;
}
yy14:
+#line 65 "ext/pdo/pdo_sql_parser.re"
+ { RET(PDO_PARSER_TEXT); }
+#line 208 "ext/pdo/pdo_sql_parser.c"
+yy15:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case 0x00:
- case '"':
- case '\'':
- case ':':
- case '?': goto yy17;
- case '\n':
- case '\r': goto yy12;
- default: goto yy14;
+ case '*': goto yy17;
+ default: goto yy15;
}
-yy16:
-#line 64 "ext/pdo/pdo_sql_parser.re"
- { RET(PDO_PARSER_TEXT); }
-#line 216 "ext/pdo/pdo_sql_parser.c"
yy17:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case '\n':
- case '\r': goto yy16;
- default: goto yy17;
+ case '*': goto yy17;
+ case '/': goto yy19;
+ default: goto yy15;
}
yy19:
- yyaccept = 1;
- YYMARKER = ++YYCURSOR;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- switch (yych) {
- case 0x00:
- case '"':
- case '\'':
- case ':':
- case '?': goto yy21;
- case '*': goto yy23;
- default: goto yy19;
- }
+ ++YYCURSOR;
+yy20:
+#line 64 "ext/pdo/pdo_sql_parser.re"
+ { RET(PDO_PARSER_TEXT); }
+#line 231 "ext/pdo/pdo_sql_parser.c"
yy21:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case '*': goto yy26;
+ case '\n':
+ case '\r': goto yy20;
default: goto yy21;
}
yy23:
- yyaccept = 1;
- YYMARKER = ++YYCURSOR;
- if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
- yych = *YYCURSOR;
- switch (yych) {
- case 0x00:
- case '"':
- case '\'':
- case ':':
- case '?': goto yy21;
- case '*': goto yy23;
- case '/': goto yy25;
- default: goto yy19;
- }
-yy25:
- yych = *++YYCURSOR;
- switch (yych) {
- case 0x00:
- case '"':
- case '\'':
- case ':':
- case '?': goto yy16;
- default: goto yy12;
- }
-yy26:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case '*': goto yy26;
- case '/': goto yy28;
- default: goto yy21;
+ case '?': goto yy23;
+ default: goto yy25;
}
-yy28:
- yych = *++YYCURSOR;
- goto yy16;
-yy29:
- ++YYCURSOR;
- if (YYLIMIT <= YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
- switch (yych) {
- case '?': goto yy29;
- default: goto yy31;
- }
-yy31:
+yy25:
#line 60 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 296 "ext/pdo/pdo_sql_parser.c"
-yy32:
+#line 252 "ext/pdo/pdo_sql_parser.c"
+yy26:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
@@ -360,65 +316,65 @@ yy32:
case 'w':
case 'x':
case 'y':
- case 'z': goto yy32;
- default: goto yy34;
+ case 'z': goto yy26;
+ default: goto yy28;
}
-yy34:
+yy28:
#line 61 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_BIND); }
-#line 370 "ext/pdo/pdo_sql_parser.c"
-yy35:
+#line 326 "ext/pdo/pdo_sql_parser.c"
+yy29:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch (yych) {
- case ':': goto yy35;
- default: goto yy31;
+ case ':': goto yy29;
+ default: goto yy25;
}
-yy37:
+yy31:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy38:
+yy32:
switch (yych) {
case 0x00: goto yy2;
- case '\'': goto yy40;
- case '\\': goto yy39;
- default: goto yy37;
+ case '\'': goto yy34;
+ case '\\': goto yy33;
+ default: goto yy31;
}
-yy39:
+yy33:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if (yych <= 0x00) goto yy2;
- goto yy37;
-yy40:
+ goto yy31;
+yy34:
++YYCURSOR;
#line 59 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 400 "ext/pdo/pdo_sql_parser.c"
-yy42:
+#line 356 "ext/pdo/pdo_sql_parser.c"
+yy36:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy43:
+yy37:
switch (yych) {
case 0x00: goto yy2;
- case '"': goto yy45;
- case '\\': goto yy44;
- default: goto yy42;
+ case '"': goto yy39;
+ case '\\': goto yy38;
+ default: goto yy36;
}
-yy44:
+yy38:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if (yych <= 0x00) goto yy2;
- goto yy42;
-yy45:
+ goto yy36;
+yy39:
++YYCURSOR;
#line 58 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 422 "ext/pdo/pdo_sql_parser.c"
+#line 378 "ext/pdo/pdo_sql_parser.c"
}
#line 66 "ext/pdo/pdo_sql_parser.re"
@@ -575,6 +531,9 @@ safe:
zend_string *buf;
buf = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0);
+ if (!buf) {
+ buf = ZSTR_EMPTY_ALLOC();
+ }
if (!stmt->dbh->methods->quoter(stmt->dbh, ZSTR_VAL(buf), ZSTR_LEN(buf), &plc->quoted, &plc->qlen,
param->param_type)) {
/* bork */
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index 9922e03690..3279b47056 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -49,7 +49,7 @@ static int scan(Scanner *s)
BINDCHR = [:][a-zA-Z0-9_]+;
QUESTION = [?];
COMMENTS = ("/*"([^*]+|[*]+[^/*])*[*]*"*/"|"--"[^\r\n]*);
- SPECIALS = [:?"'];
+ SPECIALS = [:?"'-/];
MULTICHAR = ([:]{2,}|[?]{2,});
ANYNOEOF = [\001-\377];
*/
@@ -217,6 +217,9 @@ safe:
zend_string *buf;
buf = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0);
+ if (!buf) {
+ buf = ZSTR_EMPTY_ALLOC();
+ }
if (!stmt->dbh->methods->quoter(stmt->dbh, ZSTR_VAL(buf), ZSTR_LEN(buf), &plc->quoted, &plc->qlen,
param->param_type)) {
/* bork */
diff --git a/ext/pdo/pdo_sqlstate.c b/ext/pdo/pdo_sqlstate.c
index dc57a6dee5..24ed49b414 100644
--- a/ext/pdo/pdo_sqlstate.c
+++ b/ext/pdo/pdo_sqlstate.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 78cee77230..c2f3c13399 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -707,10 +707,9 @@ static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zen
if (!Z_ISREF(param->parameter)) {
continue;
}
- // ???? convert_to_string(&param->parameter);
/* delete old value */
- zval_dtor(Z_REFVAL(param->parameter));
+ zval_ptr_dtor(Z_REFVAL(param->parameter));
/* set new value */
fetch_value(stmt, Z_REFVAL(param->parameter), param->paramno, (int *)&param->param_type);
@@ -741,9 +740,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */
}
if (ce->constructor) {
- fci->function_table = &ce->function_table;
ZVAL_UNDEF(&fci->function_name);
- fci->symbol_table = NULL;
fci->retval = &stmt->fetch.cls.retval;
fci->param_count = 0;
fci->params = NULL;
@@ -753,7 +750,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */
fcc->initialized = 1;
fcc->function_handler = ce->constructor;
- fcc->calling_scope = EG(scope);
+ fcc->calling_scope = zend_get_executed_scope();
fcc->called_scope = ce;
return 1;
} else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) {
@@ -809,7 +806,7 @@ static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */
/* fci.size is used to check if it is valid */
if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) {
if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) {
- /* Added to free constructor arguments ??? */
+ /* Added to free constructor arguments */
zend_fcall_info_args_clear(&stmt->fetch.cls.fci, 1);
} else {
efree(stmt->fetch.cls.fci.params);
@@ -1005,8 +1002,6 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
}
if (return_all && how != PDO_FETCH_KEY_PAIR) {
- //???
- //ZVAL_NULL(&grp_val);
if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) {
fetch_value(stmt, &grp_val, colno, NULL);
} else {
@@ -1244,7 +1239,6 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, zend_long mode, int fetch_all)
return 0;
}
/* fall through */
-
default:
if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_SERIALIZE can only be used together with PDO::FETCH_CLASS");
@@ -1510,9 +1504,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
}
if (!error) {
if ((how & PDO_FETCH_GROUP)) {
- do {
- //??? MAKE_STD_ZVAL(data);
- } while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all));
+ while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all));
} else if (how == PDO_FETCH_KEY_PAIR || (how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR)) {
while (do_fetch(stmt, 1, &data, how | flags, PDO_FETCH_ORI_NEXT, 0, return_all));
} else {
@@ -1547,16 +1539,16 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
{
struct pdo_bound_param_data param = {{{0}}};
zend_long param_type = PDO_PARAM_STR;
- zval *parameter;
+ zval *parameter, *driver_params = NULL;
param.paramno = -1;
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
"lz|llz!", &param.paramno, &parameter, &param_type, &param.max_value_len,
- &param.driver_params)) {
+ &driver_params)) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Sz|llz!", &param.name,
&parameter, &param_type, &param.max_value_len,
- &param.driver_params)) {
+ &driver_params)) {
return 0;
}
}
@@ -1570,6 +1562,10 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
return 0;
}
+ if (driver_params) {
+ ZVAL_COPY(&param.driver_params, driver_params);
+ }
+
ZVAL_COPY(&param.parameter, parameter);
if (!really_register_bound_param(&param, stmt, is_param)) {
if (!Z_ISUNDEF(param.parameter)) {
@@ -2112,9 +2108,9 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
RETURN_FALSE;
}
- php_stream_printf(out, "SQL: [%d] %.*s\n",
+ php_stream_printf(out, "SQL: [%zd] %.*s\n",
stmt->query_stringlen,
- stmt->query_stringlen, stmt->query_string);
+ (int) stmt->query_stringlen, stmt->query_string);
php_stream_printf(out, "Params: %d\n",
stmt->bound_params ? zend_hash_num_elements(stmt->bound_params) : 0);
@@ -2124,13 +2120,14 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
zend_string *key = NULL;
ZEND_HASH_FOREACH_KEY_PTR(stmt->bound_params, num, key, param) {
if (key) {
- php_stream_printf(out, "Key: Name: [%d] %.*s\n", ZSTR_LEN(key), ZSTR_LEN(key), ZSTR_VAL(key));
+ php_stream_printf(out, "Key: Name: [%zd] %.*s\n",
+ ZSTR_LEN(key), (int) ZSTR_LEN(key), ZSTR_VAL(key));
} else {
php_stream_printf(out, "Key: Position #%pd:\n", num);
}
- php_stream_printf(out, "paramno=%pd\nname=[%d] \"%.*s\"\nis_param=%d\nparam_type=%d\n",
- param->paramno, param->name? ZSTR_LEN(param->name) : 0, param->name? ZSTR_LEN(param->name) : 0,
+ php_stream_printf(out, "paramno=%pd\nname=[%zd] \"%.*s\"\nis_param=%d\nparam_type=%d\n",
+ param->paramno, param->name ? ZSTR_LEN(param->name) : 0, param->name ? (int) ZSTR_LEN(param->name) : 0,
param->name ? ZSTR_VAL(param->name) : "",
param->is_param,
param->param_type);
@@ -2219,6 +2216,7 @@ static union _zend_function *dbstmt_method_get(zend_object **object_pp, zend_str
lc_method_name = zend_string_alloc(ZSTR_LEN(method_name), 0);
zend_str_tolower_copy(ZSTR_VAL(lc_method_name), ZSTR_VAL(method_name), ZSTR_LEN(method_name));
+
if ((fbc = zend_hash_find_ptr(&object->ce->function_table, lc_method_name)) == NULL) {
pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object);
/* instance not created by PDO object */
@@ -2243,6 +2241,9 @@ static union _zend_function *dbstmt_method_get(zend_object **object_pp, zend_str
out:
zend_string_release(lc_method_name);
+ if (!fbc) {
+ fbc = std_object_handlers.get_method(object_pp, method_name, key);
+ }
return fbc;
}
@@ -2509,9 +2510,6 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl
if (ZSTR_LEN(stmt->columns[colno].name) == Z_STRLEN_P(member) &&
strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) {
fetch_value(stmt, rv, colno, NULL);
- //???
- //Z_SET_REFCOUNT_P(rv, 0);
- //Z_UNSET_ISREF_P(rv);
return rv;
}
}
@@ -2523,10 +2521,6 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl
}
}
- //???
- //Z_SET_REFCOUNT_P(return_value, 0);
- //Z_UNSET_ISREF_P(return_value);
-
return rv;
}
@@ -2630,6 +2624,7 @@ static union _zend_function *row_method_get(
}
zend_string_release(lc_method_name);
+
return fbc;
}
diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h
index c9217dfffb..d2fecb46d3 100644
--- a/ext/pdo/php_pdo.h
+++ b/ext/pdo/php_pdo.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index efa21a4e14..f4420dcbdd 100644
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -199,20 +199,18 @@ static inline zend_long pdo_attr_lval(zval *options, enum pdo_attribute_type opt
zval *v;
if (options && (v = zend_hash_index_find(Z_ARRVAL_P(options), option_name))) {
- convert_to_long_ex(v);
- return Z_LVAL_P(v);
+ return zval_get_long(v);
}
return defval;
}
-static inline char *pdo_attr_strval(zval *options, enum pdo_attribute_type option_name, char *defval)
+static inline zend_string *pdo_attr_strval(zval *options, enum pdo_attribute_type option_name, zend_string *defval)
{
zval *v;
if (options && (v = zend_hash_index_find(Z_ARRVAL_P(options), option_name))) {
- convert_to_string_ex(v);
- return estrndup(Z_STRVAL_P(v), Z_STRLEN_P(v));
+ return zval_get_string(v);
}
- return defval ? estrdup(defval) : NULL;
+ return defval ? zend_string_copy(defval) : NULL;
}
/* }}} */
diff --git a/ext/pdo/php_pdo_error.h b/ext/pdo/php_pdo_error.h
index 5d222029cf..5df4d3a737 100644
--- a/ext/pdo/php_pdo_error.h
+++ b/ext/pdo/php_pdo_error.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h
index 739f9d33d0..f7e8a18c75 100644
--- a/ext/pdo/php_pdo_int.h
+++ b/ext/pdo/php_pdo_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo/tests/bug_44159.phpt b/ext/pdo/tests/bug_44159.phpt
index 9f1961c267..4382fbddda 100644
--- a/ext/pdo/tests/bug_44159.phpt
+++ b/ext/pdo/tests/bug_44159.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
+PDO Common: Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded('pdo')) die('skip PDO not available');
diff --git a/ext/pdo/tests/bug47769.phpt b/ext/pdo/tests/bug_47769.phpt
index b0b38325d1..f713effd5d 100644
--- a/ext/pdo/tests/bug47769.phpt
+++ b/ext/pdo/tests/bug_47769.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #47769 (Strange extends PDO)
+PDO Common: Bug #47769 (Strange extends PDO)
--SKIPIF--
<?php
if (!extension_loaded("pdo_sqlite"))
diff --git a/ext/pdo/tests/bug_52098.phpt b/ext/pdo/tests/bug_52098.phpt
new file mode 100644
index 0000000000..c9d39af522
--- /dev/null
+++ b/ext/pdo/tests/bug_52098.phpt
@@ -0,0 +1,59 @@
+--TEST--
+PDO Common: Bug #52098 Own PDOStatement implementation ignore __call()
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo')) die('skip');
+$dir = getenv('REDIR_TEST_DIR');
+if (false == $dir) die('skip no driver');
+require_once $dir . 'pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
+require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
+$db = PDOTest::factory();
+
+@$db->exec("DROP TABLE test");
+$db->exec("CREATE TABLE test (x int)");
+$db->exec("INSERT INTO test VALUES (1)");
+
+class MyStatement extends PDOStatement
+{
+ public function __call($name, $arguments)
+ {
+ echo "Calling object method '$name'" . implode(', ', $arguments). "\n";
+ }
+}
+/*
+Test prepared statement with PDOStatement class.
+*/
+$derived = $db->prepare('SELECT * FROM test', array(PDO::ATTR_STATEMENT_CLASS=>array('MyStatement')));
+$derived->execute();
+$derived->foo();
+$derived->fetchAll();
+$derived = null;
+
+/*
+Test regular statement with PDOStatement class.
+*/
+$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('MyStatement'));
+$r = $db->query('SELECT * FROM test');
+echo $r->bar();
+$r->fetchAll();
+$r = null;
+
+/*
+Test object instance of PDOStatement class.
+*/
+$obj = new MyStatement;
+echo $obj->lucky();
+
+$db->exec("DROP TABLE test");
+?>
+===DONE===
+--EXPECTF--
+Calling object method 'foo'
+Calling object method 'bar'
+Calling object method 'lucky'
+===DONE=== \ No newline at end of file
diff --git a/ext/pdo/tests/bug61292.phpt b/ext/pdo/tests/bug_61292.phpt
index 05b2e9c011..0e41be3859 100644
--- a/ext/pdo/tests/bug61292.phpt
+++ b/ext/pdo/tests/bug_61292.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #61292 (Segfault while calling a method on an overloaded PDO object)
+PDO Common: Bug #61292 (Segfault while calling a method on an overloaded PDO object)
--SKIPIF--
<?php
if (!extension_loaded('pdo')) die('skip');
diff --git a/ext/pdo/tests/bug_64172.phpt b/ext/pdo/tests/bug_64172.phpt
new file mode 100644
index 0000000000..e8949fe597
--- /dev/null
+++ b/ext/pdo/tests/bug_64172.phpt
@@ -0,0 +1,84 @@
+--TEST--
+PDO Common: Bug #64172 errorInfo is not properly cleaned up
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo')) die('skip');
+$dir = getenv('REDIR_TEST_DIR');
+if (false == $dir) die('skip no driver');
+require_once $dir . 'pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
+require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
+
+$db = PDOTest::factory();
+
+@$db->exec("DROP TABLE test");
+$db->exec("CREATE TABLE test (x int)");
+$db->exec("INSERT INTO test VALUES (1)");
+
+echo "===FAIL===\n";
+$db->query('SELECT * FROM bad_table');
+echo "\n";
+echo "===TEST===\n";
+var_dump(is_string($db->errorInfo()[0])) . "\n";
+var_dump(is_int($db->errorInfo()[1])) . "\n";
+var_dump(is_string($db->errorInfo()[2])) . "\n";
+echo "===GOOD===\n";
+$stmt = $db->query('SELECT * FROM test');
+$stmt->fetchAll();
+$stmt = null;
+var_dump($db->errorInfo());
+
+echo "===FAIL===\n";
+$db->exec("INSERT INTO bad_table VALUES(1)");
+echo "\n";
+echo "===TEST===\n";
+var_dump(is_string($db->errorInfo()[0])) . "\n";
+var_dump(is_int($db->errorInfo()[1])) . "\n";
+var_dump(is_string($db->errorInfo()[2])) . "\n";
+echo "===GOOD===\n";
+$db->exec("INSERT INTO test VALUES (2)");
+var_dump($db->errorInfo());
+
+$db->exec("DROP TABLE test");
+?>
+===DONE===
+--EXPECTF--
+===FAIL===
+
+Warning: PDO::query(): SQLSTATE[%s]: %s
+%A
+===TEST===
+bool(true)
+bool(true)
+bool(true)
+===GOOD===
+array(3) {
+ [0]=>
+ string(5) "00000"
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+===FAIL===
+
+Warning: PDO::exec(): SQLSTATE[%s]: %s
+%A
+===TEST===
+bool(true)
+bool(true)
+bool(true)
+===GOOD===
+array(3) {
+ [0]=>
+ string(5) "00000"
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
+===DONE=== \ No newline at end of file
diff --git a/ext/pdo/tests/bug65946.phpt b/ext/pdo/tests/bug_65946.phpt
index 4b63a14bb5..13a622ecb8 100644
--- a/ext/pdo/tests/bug65946.phpt
+++ b/ext/pdo/tests/bug_65946.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #65946 (pdo_sql_parser.c permanently converts values bound to strings)
+PDO Common: Bug #65946 (pdo_sql_parser.c permanently converts values bound to strings)
--SKIPIF--
<?php
if (!extension_loaded('pdo')) die('skip');
@@ -18,6 +18,9 @@ $db->exec('CREATE TABLE test(id int)');
$db->exec('INSERT INTO test VALUES(1)');
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
$sql = 'SELECT FIRST :limit * FROM test';
+} else if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
+ //$sql = 'SELECT * FROM test FETCH FIRST :limit ROWS ONLY'; // Oracle 12c syntax
+ $sql = "select id from (select a.*, rownum rnum from (SELECT * FROM test) a where rownum <= :limit)";
} else {
$sql = 'SELECT * FROM test LIMIT :limit';
}
diff --git a/ext/pdo/tests/bug_71447.phpt b/ext/pdo/tests/bug_71447.phpt
new file mode 100644
index 0000000000..8b5c0732f1
--- /dev/null
+++ b/ext/pdo/tests/bug_71447.phpt
@@ -0,0 +1,104 @@
+--TEST--
+PDO Common: Bug #71447 (Quotes inside comments not properly handled)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo')) die('skip');
+$dir = getenv('REDIR_TEST_DIR');
+if (false == $dir) die('skip no driver');
+require_once $dir . 'pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
+require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
+
+$db = PDOTest::factory();
+$db->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
+$db->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_NUM);
+$db->setAttribute (\PDO::ATTR_EMULATE_PREPARES, false);
+$db->exec('CREATE TABLE test(id int)');
+$db->exec('INSERT INTO test VALUES(1)');
+
+// Comment without quotes or placeholders
+$stmt = $db->prepare("
+ SELECT -- Thats all folks!
+ '\"abc\":8000'
+ FROM test
+");
+
+$stmt->execute();
+var_dump($stmt->fetchColumn());
+
+// Comment and placeholder within a string
+$stmt = $db->prepare("
+ SELECT
+ '\"abc\":8001 -- Wat?'
+ FROM test
+");
+
+$stmt->execute();
+var_dump($stmt->fetchColumn());
+
+// Comment with single quote
+$stmt = $db->prepare("
+ SELECT -- That's all folks!
+ '\"abc\":8002'
+ FROM test
+");
+
+$stmt->execute();
+var_dump($stmt->fetchColumn());
+
+// C-Style comment with single quote
+$stmt = $db->prepare("
+ SELECT /* That's all folks! */
+ '\"abc\":8003'
+ FROM test
+");
+
+$stmt->execute();
+var_dump($stmt->fetchColumn());
+
+// Comment with double quote
+$stmt = $db->prepare("
+ SELECT -- Is it only \"single quotes?
+ '\"abc\":8004'
+ FROM test
+");
+
+$stmt->execute();
+var_dump($stmt->fetchColumn());
+
+// Comment with ? placeholder
+$stmt = $db->prepare("
+ SELECT -- What about question marks here?
+ *
+ FROM test
+ WHERE id = ?
+");
+
+$stmt->execute([1]);
+var_dump($stmt->fetchColumn());
+
+// Comment with named placeholder
+$stmt = $db->prepare("
+ SELECT -- What about placeholders :bar
+ *
+ FROM test
+ WHERE id = :id
+");
+
+$stmt->execute(['id' => 1]);
+var_dump($stmt->fetchColumn());
+
+
+?>
+--EXPECT--
+string(10) ""abc":8000"
+string(18) ""abc":8001 -- Wat?"
+string(10) ""abc":8002"
+string(10) ""abc":8003"
+string(10) ""abc":8004"
+string(1) "1"
+string(1) "1"
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index b3014a9fc0..ad54ae57b3 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -101,6 +101,7 @@ static int dblib_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len
stmt->driver_data = S;
stmt->methods = &dblib_stmt_methods;
stmt->supports_placeholders = PDO_PLACEHOLDER_NONE;
+ S->computed_column_name_count = 0;
S->err.sqlstate = stmt->error_code;
return 1;
@@ -170,7 +171,7 @@ static int dblib_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unqu
*
*/
*quotedlen = (unquotedlen * 2) + 2; /* 2 chars per byte +2 for "0x" prefix */
- q = *quoted = emalloc(*quotedlen);
+ q = *quoted = emalloc(*quotedlen+1); /* Add byte for terminal null */
*q++ = '0';
*q++ = 'x';
@@ -181,7 +182,7 @@ static int dblib_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unqu
} else {
/* Alpha/Numeric Quoting */
*quotedlen += 2; /* +2 for opening, closing quotes */
- q = *quoted = emalloc(*quotedlen);
+ q = *quoted = emalloc(*quotedlen+1); /* Add byte for terminal null */
*q++ = '\'';
for (i=0;i<unquotedlen;i++) {
@@ -331,9 +332,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
,{"auto",0} /* Only works with FreeTDS. Other drivers will bork */
};
-
- nvers = sizeof(tdsver)/sizeof(tdsver[0]);
-
+
struct pdo_data_src_parser vars[] = {
{ "charset", NULL, 0 }
,{ "appname", "PHP " PDO_DBLIB_FLAVOUR, 0 }
@@ -344,13 +343,24 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
};
nvars = sizeof(vars)/sizeof(vars[0]);
-
+ nvers = sizeof(tdsver)/sizeof(tdsver[0]);
+
php_pdo_parse_data_source(dbh->data_source, dbh->data_source_len, vars, nvars);
if (driver_options) {
+ int connect_timeout = pdo_attr_lval(driver_options, PDO_DBLIB_ATTR_CONNECTION_TIMEOUT, -1);
+ int query_timeout = pdo_attr_lval(driver_options, PDO_DBLIB_ATTR_QUERY_TIMEOUT, -1);
int timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 30);
- dbsetlogintime(timeout); /* Connection/Login Timeout */
- dbsettime(timeout); /* Statement Timeout */
+
+ if (connect_timeout == -1) {
+ connect_timeout = timeout;
+ }
+ if (query_timeout == -1) {
+ query_timeout = timeout;
+ }
+
+ dbsetlogintime(connect_timeout); /* Connection/Login Timeout */
+ dbsettime(query_timeout); /* Statement Timeout */
}
H = pecalloc(1, sizeof(*H), dbh->is_persistent);
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index 97776548b2..a1055434d3 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -95,6 +95,22 @@ static char *pdo_dblib_get_field_name(int type)
}
/* }}} */
+static void pdo_dblib_err_dtor(pdo_dblib_err *err)
+{
+ if (err->dberrstr) {
+ efree(err->dberrstr);
+ err->dberrstr = NULL;
+ }
+ if (err->lastmsg) {
+ efree(err->lastmsg);
+ err->lastmsg = NULL;
+ }
+ if (err->oserrstr) {
+ efree(err->oserrstr);
+ err->oserrstr = NULL;
+ }
+}
+
static int pdo_dblib_stmt_cursor_closer(pdo_stmt_t *stmt)
{
pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data;
@@ -103,6 +119,8 @@ static int pdo_dblib_stmt_cursor_closer(pdo_stmt_t *stmt)
/* Cancel any pending results */
dbcancel(H->link);
+ pdo_dblib_err_dtor(&H->err);
+
return 1;
}
@@ -110,6 +128,8 @@ static int pdo_dblib_stmt_dtor(pdo_stmt_t *stmt)
{
pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data;
+ pdo_dblib_err_dtor(&S->err);
+
efree(S);
return 1;
@@ -192,17 +212,37 @@ static int pdo_dblib_stmt_describe(pdo_stmt_t *stmt, int colno)
pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data;
pdo_dblib_db_handle *H = S->H;
struct pdo_column_data *col;
- zend_string *str;
-
+ char *fname;
+
if(colno >= stmt->column_count || colno < 0) {
return FAILURE;
}
+ if (colno == 0) {
+ S->computed_column_name_count = 0;
+ }
+
col = &stmt->columns[colno];
- str = dbcolname(H->link, colno+1);
- col->name = zend_string_init(str, strlen(str), 0);
+ fname = (char*)dbcolname(H->link, colno+1);
+
+ if (fname && *fname) {
+ col->name = zend_string_init(fname, strlen(fname), 0);
+ } else {
+ if (S->computed_column_name_count > 0) {
+ char buf[16];
+ int len;
+
+ len = snprintf(buf, sizeof(buf), "computed%d", S->computed_column_name_count);
+ col->name = zend_string_init(buf, len, 0);
+ } else {
+ col->name = zend_string_init("computed", strlen("computed"), 0);
+ }
+
+ S->computed_column_name_count++;
+ }
+
col->maxlen = dbcollen(H->link, colno+1);
- col->param_type = PDO_PARAM_STR;
+ col->param_type = PDO_PARAM_ZVAL;
return 1;
}
@@ -215,59 +255,161 @@ static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,
pdo_dblib_db_handle *H = S->H;
int coltype;
- unsigned int tmp_len;
- char *tmp_ptr = NULL;
+ char *data, *tmp_data;
+ unsigned int data_len, tmp_data_len;
+ zval *zv = NULL;
coltype = dbcoltype(H->link, colno+1);
+ data = dbdata(H->link, colno+1);
+ data_len = dbdatlen(H->link, colno+1);
+
+ if (data_len != 0 || data != NULL) {
+ if (stmt->dbh->stringify) {
+ switch (coltype) {
+ case SQLFLT4:
+ case SQLFLT8:
+ case SQLINT4:
+ case SQLINT2:
+ case SQLINT1:
+ case SQLBIT: {
+ if (dbwillconvert(coltype, SQLCHAR)) {
+ tmp_data_len = 32 + (2 * (data_len)); /* FIXME: We allocate more than we need here */
+ tmp_data = emalloc(tmp_data_len);
+ data_len = dbconvert(NULL, coltype, data, data_len, SQLCHAR, tmp_data, -1);
+
+ zv = emalloc(sizeof(zval));
+ ZVAL_STRING(zv, tmp_data);
+
+ efree(tmp_data);
+ }
+ break;
+ }
+ }
+ }
- *len = dbdatlen(H->link, colno+1);
- *ptr = dbdata(H->link, colno+1);
+ if (!zv) {
+ switch (coltype) {
+ case SQLCHAR:
+ case SQLVARCHAR:
+ case SQLTEXT: {
+#if ilia_0
+ while (data_len>0 && data[data_len-1] == ' ') { /* nuke trailing whitespace */
+ data_len--;
+ }
+#endif
+ }
+ case SQLVARBINARY:
+ case SQLBINARY:
+ case SQLIMAGE: {
+ zv = emalloc(sizeof(zval));
+ ZVAL_STRINGL(zv, data, data_len);
+
+ break;
+ }
+ case SQLDATETIME:
+ case SQLDATETIM4: {
+ int dl;
+ DBDATEREC di;
+ DBDATEREC dt;
+
+ dbconvert(H->link, coltype, data, -1, SQLDATETIME, (LPBYTE) &dt, -1);
+ dbdatecrack(H->link, &di, (DBDATETIME *) &dt);
+
+ dl = spprintf(&tmp_data, 20, "%d-%02d-%02d %02d:%02d:%02d",
+#if defined(PHP_DBLIB_IS_MSSQL) || defined(MSDBLIB)
+ di.year, di.month, di.day, di.hour, di.minute, di.second
+#else
+ di.dateyear, di.datemonth+1, di.datedmonth, di.datehour, di.dateminute, di.datesecond
+#endif
+ );
+
+ zv = emalloc(sizeof(zval));
+ ZVAL_STRINGL(zv, tmp_data, dl);
+
+ efree(tmp_data);
+
+ break;
+ }
+ case SQLFLT4: {
+ zv = emalloc(sizeof(zval));
+ ZVAL_DOUBLE(zv, (double) (*(DBFLT4 *) data));
+
+ break;
+ }
+ case SQLFLT8: {
+ zv = emalloc(sizeof(zval));
+ ZVAL_DOUBLE(zv, (double) (*(DBFLT8 *) data));
+
+ break;
+ }
+ case SQLINT4: {
+ zv = emalloc(sizeof(zval));
+ ZVAL_LONG(zv, (long) ((int) *(DBINT *) data));
+
+ break;
+ }
+ case SQLINT2: {
+ zv = emalloc(sizeof(zval));
+ ZVAL_LONG(zv, (long) ((int) *(DBSMALLINT *) data));
+
+ break;
+ }
+ case SQLINT1:
+ case SQLBIT: {
+ zv = emalloc(sizeof(zval));
+ ZVAL_LONG(zv, (long) ((int) *(DBTINYINT *) data));
+
+ break;
+ }
+ case SQLMONEY:
+ case SQLMONEY4:
+ case SQLMONEYN: {
+ DBFLT8 money_value;
+ dbconvert(NULL, coltype, data, 8, SQLFLT8, (LPBYTE)&money_value, -1);
+
+ zv = emalloc(sizeof(zval));
+ ZVAL_DOUBLE(zv, money_value);
+
+ if (stmt->dbh->stringify) {
+ convert_to_string(zv);
+ }
+
+ break;
+ }
+#ifdef SQLUNIQUE
+ case SQLUNIQUE: {
+#else
+ case 36: { /* FreeTDS hack */
+#endif
+ zv = emalloc(sizeof(zval));
+ ZVAL_STRINGL(zv, data, 16); /* uniqueidentifier is a 16-byte binary number */
- if (*len == 0 && *ptr == NULL) {
- return 1;
- }
+ break;
+ }
+ default: {
+ if (dbwillconvert(coltype, SQLCHAR)) {
+ tmp_data_len = 32 + (2 * (data_len)); /* FIXME: We allocate more than we need here */
+ tmp_data = emalloc(tmp_data_len);
+ data_len = dbconvert(NULL, coltype, data, data_len, SQLCHAR, tmp_data, -1);
- switch (coltype) {
- case SQLVARBINARY:
- case SQLBINARY:
- case SQLIMAGE:
- case SQLTEXT:
- /* FIXME: Above types should be returned as a stream as they can be VERY large */
- case SQLCHAR:
- case SQLVARCHAR:
- tmp_ptr = emalloc(*len + 1);
- memcpy(tmp_ptr, *ptr, *len);
- tmp_ptr[*len] = '\0';
- *ptr = tmp_ptr;
- break;
- case SQLMONEY:
- case SQLMONEY4:
- case SQLMONEYN: {
- DBFLT8 money_value;
- dbconvert(NULL, coltype, *ptr, *len, SQLFLT8, (LPBYTE)&money_value, 8);
- *len = spprintf(&tmp_ptr, 0, "%.4f", money_value);
- *ptr = tmp_ptr;
- break;
- }
- case SQLUNIQUE: {
- *len = 37;
- tmp_ptr = emalloc(*len + 1);
- *len = dbconvert(NULL, SQLUNIQUE, *ptr, *len, SQLCHAR, tmp_ptr, *len);
- php_strtoupper(tmp_ptr, *len);
- tmp_ptr[36] = '\0';
- *ptr = tmp_ptr;
- break;
- }
- default:
- if (dbwillconvert(coltype, SQLCHAR)) {
- tmp_len = 32 + (2 * (*len)); /* FIXME: We allocate more than we need here */
- tmp_ptr = emalloc(tmp_len);
- *len = dbconvert(NULL, coltype, *ptr, *len, SQLCHAR, tmp_ptr, -1);
- *ptr = tmp_ptr;
- } else {
- *len = 0; /* FIXME: Silently fails and returns null on conversion errors */
- *ptr = NULL;
+ zv = emalloc(sizeof(zval));
+ ZVAL_STRING(zv, tmp_data);
+
+ efree(tmp_data);
+ }
+
+ break;
+ }
}
+ }
+ }
+
+ if (zv != NULL) {
+ *ptr = (char*)zv;
+ *len = sizeof(zval);
+ } else {
+ *ptr = NULL;
+ *len = 0;
}
*caller_frees = 1;
@@ -286,6 +428,7 @@ static int pdo_dblib_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zva
pdo_dblib_stmt *S = (pdo_dblib_stmt*)stmt->driver_data;
pdo_dblib_db_handle *H = S->H;
DBTYPEINFO* dbtypeinfo;
+ int coltype;
if(colno >= stmt->column_count || colno < 0) {
return FAILURE;
@@ -297,14 +440,28 @@ static int pdo_dblib_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zva
if(!dbtypeinfo) return FAILURE;
+ coltype = dbcoltype(H->link, colno+1);
+
add_assoc_long(return_value, "max_length", dbcollen(H->link, colno+1) );
add_assoc_long(return_value, "precision", (int) dbtypeinfo->precision );
add_assoc_long(return_value, "scale", (int) dbtypeinfo->scale );
add_assoc_string(return_value, "column_source", dbcolsource(H->link, colno+1));
- add_assoc_string(return_value, "native_type", pdo_dblib_get_field_name(dbcoltype(H->link, colno+1)));
- add_assoc_long(return_value, "native_type_id", dbcoltype(H->link, colno+1));
+ add_assoc_string(return_value, "native_type", pdo_dblib_get_field_name(coltype));
+ add_assoc_long(return_value, "native_type_id", coltype);
add_assoc_long(return_value, "native_usertype_id", dbcolutype(H->link, colno+1));
+ switch (coltype) {
+ case SQLBIT:
+ case SQLINT1:
+ case SQLINT2:
+ case SQLINT4:
+ add_assoc_long(return_value, "pdo_type", PDO_PARAM_INT);
+ break;
+ default:
+ add_assoc_long(return_value, "pdo_type", PDO_PARAM_STR);
+ break;
+ }
+
return 1;
}
diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c
index 58ef3e270c..dd64cbe882 100644
--- a/ext/pdo_dblib/pdo_dblib.c
+++ b/ext/pdo_dblib/pdo_dblib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,24 +39,18 @@ const zend_function_entry pdo_dblib_functions[] = {
PHP_FE_END
};
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_dblib_deps[] = {
ZEND_MOD_REQUIRED("pdo")
ZEND_MOD_END
};
-#endif
#if PDO_DBLIB_IS_MSSQL
zend_module_entry pdo_mssql_module_entry = {
#else
zend_module_entry pdo_dblib_module_entry = {
#endif
-#if ZEND_MODULE_API_NO >= 20050922
STANDARD_MODULE_HEADER_EX, NULL,
pdo_dblib_deps,
-#else
- STANDARD_MODULE_HEADER,
-#endif
#if PDO_DBLIB_IS_MSSQL
"pdo_mssql",
#elif defined(PHP_WIN32)
@@ -177,6 +171,9 @@ PHP_RSHUTDOWN_FUNCTION(pdo_dblib)
PHP_MINIT_FUNCTION(pdo_dblib)
{
+ REGISTER_PDO_CLASS_CONST_LONG("DBLIB_ATTR_CONNECTION_TIMEOUT", (long) PDO_DBLIB_ATTR_CONNECTION_TIMEOUT);
+ REGISTER_PDO_CLASS_CONST_LONG("DBLIB_ATTR_QUERY_TIMEOUT", (long) PDO_DBLIB_ATTR_QUERY_TIMEOUT);
+
if (FAIL == dbinit()) {
return FAILURE;
}
diff --git a/ext/pdo_dblib/php_pdo_dblib.h b/ext/pdo_dblib/php_pdo_dblib.h
index 740ba21029..c72a859716 100644
--- a/ext/pdo_dblib/php_pdo_dblib.h
+++ b/ext/pdo_dblib/php_pdo_dblib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_dblib/php_pdo_dblib_int.h b/ext/pdo_dblib/php_pdo_dblib_int.h
index 73c4ce754b..01586881d5 100644
--- a/ext/pdo_dblib/php_pdo_dblib_int.h
+++ b/ext/pdo_dblib/php_pdo_dblib_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -118,6 +118,7 @@ typedef struct {
typedef struct {
pdo_dblib_db_handle *H;
pdo_dblib_err err;
+ unsigned int computed_column_name_count;
} pdo_dblib_stmt;
typedef struct {
@@ -137,7 +138,12 @@ ZEND_END_MODULE_GLOBALS(dblib)
# define DBLIB_G(v) (dblib_globals.v)
#endif
-ZEND_EXTERN_MODULE_GLOBALS(dblib);
+ZEND_EXTERN_MODULE_GLOBALS(dblib)
+
+enum {
+ PDO_DBLIB_ATTR_CONNECTION_TIMEOUT = PDO_ATTR_DRIVER_SPECIFIC,
+ PDO_DBLIB_ATTR_QUERY_TIMEOUT
+};
#endif
diff --git a/ext/pdo_dblib/tests/bug_38955.phpt b/ext/pdo_dblib/tests/bug_38955.phpt
index 1954ed460b..57adbf6c40 100644
--- a/ext/pdo_dblib/tests/bug_38955.phpt
+++ b/ext/pdo_dblib/tests/bug_38955.phpt
@@ -37,21 +37,21 @@ array(4) {
[0]=>
array(1) {
["val"]=>
- string(1) "1"
+ int(1)
}
[1]=>
array(1) {
["val"]=>
- string(1) "2"
+ int(2)
}
[2]=>
array(1) {
["val"]=>
- string(1) "3"
+ int(3)
}
[3]=>
array(1) {
["val"]=>
- string(1) "4"
+ int(4)
}
}
diff --git a/ext/pdo_dblib/tests/bug_45876.phpt b/ext/pdo_dblib/tests/bug_45876.phpt
index 920905830a..5f1026e623 100644
--- a/ext/pdo_dblib/tests/bug_45876.phpt
+++ b/ext/pdo_dblib/tests/bug_45876.phpt
@@ -14,8 +14,8 @@ $stmt->execute();
var_dump($stmt->getColumnMeta(0));
$stmt = null;
?>
---EXPECT--
-array(8) {
+--EXPECTF--
+array(10) {
["max_length"]=>
int(255)
["precision"]=>
@@ -26,10 +26,14 @@ array(8) {
string(13) "TABLE_CATALOG"
["native_type"]=>
string(4) "char"
+ ["native_type_id"]=>
+ int(%d)
+ ["native_usertype_id"]=>
+ int(%d)
+ ["pdo_type"]=>
+ int(2)
["name"]=>
string(13) "TABLE_CATALOG"
["len"]=>
int(255)
- ["pdo_type"]=>
- int(2)
}
diff --git a/ext/pdo_dblib/tests/bug_47588.phpt b/ext/pdo_dblib/tests/bug_47588.phpt
index d8f424e872..262720f632 100644
--- a/ext/pdo_dblib/tests/bug_47588.phpt
+++ b/ext/pdo_dblib/tests/bug_47588.phpt
@@ -23,21 +23,21 @@ array(3) {
[0]=>
array(2) {
["My Field"]=>
- string(1) "1"
+ int(1)
["Another Field"]=>
string(11) "test_string"
}
[1]=>
array(2) {
["My Field"]=>
- string(1) "2"
+ int(2)
["Another Field"]=>
string(11) "test_string"
}
[2]=>
array(2) {
["My Field"]=>
- string(1) "3"
+ int(3)
["Another Field"]=>
string(11) "test_string"
}
diff --git a/ext/pdo_dblib/tests/bug_54648.phpt b/ext/pdo_dblib/tests/bug_54648.phpt
new file mode 100644
index 0000000000..aa9f292669
--- /dev/null
+++ b/ext/pdo_dblib/tests/bug_54648.phpt
@@ -0,0 +1,26 @@
+--TEST--
+PDO_DBLIB: Does not force correct dateformat
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+$db->query('set dateformat ymd');
+$rs = $db->query("select cast('1950-01-18 23:00:00' as smalldatetime) as sdt, cast('2030-01-01 23:59:59' as datetime) as dt");
+var_dump($rs->fetchAll(PDO::FETCH_ASSOC));
+echo "Done.\n";
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(2) {
+ ["sdt"]=>
+ string(19) "1950-01-18 23:00:00"
+ ["dt"]=>
+ string(19) "2030-01-01 23:59:59"
+ }
+}
+Done.
diff --git a/ext/pdo_dblib/tests/bug_68957.phpt b/ext/pdo_dblib/tests/bug_68957.phpt
new file mode 100644
index 0000000000..47ff461bb3
--- /dev/null
+++ b/ext/pdo_dblib/tests/bug_68957.phpt
@@ -0,0 +1,29 @@
+--TEST--
+PDO_DBLIB bug #68957 PDO::query doesn't support several queries
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+
+$query = "declare @myInt int = 1; select @myInt;";
+$stmt = $db->query($query);
+$stmt->nextRowset(); // Added line
+$rows = $stmt->fetchAll();
+print_r($rows);
+
+?>
+--EXPECT--
+Array
+(
+ [0] => Array
+ (
+ [computed] => 1
+ [0] => 1
+ )
+
+)
+
diff --git a/ext/pdo_dblib/tests/bug_69757.phpt b/ext/pdo_dblib/tests/bug_69757.phpt
new file mode 100644
index 0000000000..611f41bec1
--- /dev/null
+++ b/ext/pdo_dblib/tests/bug_69757.phpt
@@ -0,0 +1,32 @@
+--TEST--
+PDO_DBLIB: Segmentation fault on pdo_dblib::nextRowset
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require __DIR__ . '/config.inc';
+?>
+--FILE--
+<?php
+require __DIR__ . '/config.inc';
+
+$sql = "
+ exec dbo.sp_executesql N'
+ SELECT TOP 1 * FROM sysobjects
+ SELECT TOP 1 * FROM syscolumns
+ '
+";
+$stmt = $db->query($sql);
+$resultset1 = $stmt->fetchAll(PDO::FETCH_ASSOC);
+if (true !== $stmt->nextRowset()) {
+ die('expect TRUE on nextRowset');
+}
+$resultset2 = $stmt->fetchAll(PDO::FETCH_ASSOC);
+if (false !== $stmt->nextRowset()) {
+ die('expect FALSE on nextRowset');
+}
+$stmt->closeCursor();
+
+echo "OK\n";
+?>
+--EXPECT--
+OK
diff --git a/ext/pdo_dblib/tests/bug_71667.phpt b/ext/pdo_dblib/tests/bug_71667.phpt
new file mode 100644
index 0000000000..1c5005fd6a
--- /dev/null
+++ b/ext/pdo_dblib/tests/bug_71667.phpt
@@ -0,0 +1,34 @@
+--TEST--
+PDO_DBLIB: Emulate how mssql extension names "computed" columns
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+
+$stmt = $db->prepare("SELECT 1, 2 AS named, 3");
+$stmt->execute();
+var_dump($stmt->fetchAll());
+
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(6) {
+ ["computed"]=>
+ string(1) "1"
+ [0]=>
+ string(1) "1"
+ ["named"]=>
+ string(1) "2"
+ [1]=>
+ string(1) "2"
+ ["computed1"]=>
+ string(1) "3"
+ [2]=>
+ string(1) "3"
+ }
+}
diff --git a/ext/pdo_dblib/tests/pdo_dblib_quote.phpt b/ext/pdo_dblib/tests/pdo_dblib_quote.phpt
new file mode 100644
index 0000000000..24a36dec0b
--- /dev/null
+++ b/ext/pdo_dblib/tests/pdo_dblib_quote.phpt
@@ -0,0 +1,24 @@
+--TEST--
+PDO_DBLIB: Ensure quote function returns expected results
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+var_dump($db->quote(true, PDO::PARAM_BOOL));
+var_dump($db->quote(false, PDO::PARAM_BOOL));
+var_dump($db->quote(42, PDO::PARAM_INT));
+var_dump($db->quote(null, PDO::PARAM_NULL));
+var_dump($db->quote('\'', PDO::PARAM_STR));
+var_dump($db->quote('foo', PDO::PARAM_STR));
+?>
+--EXPECT--
+string(3) "'1'"
+string(2) "''"
+string(4) "'42'"
+string(2) "''"
+string(4) "''''"
+string(5) "'foo'"
diff --git a/ext/pdo_dblib/tests/timeout.phpt b/ext/pdo_dblib/tests/timeout.phpt
new file mode 100644
index 0000000000..f92a7da72f
--- /dev/null
+++ b/ext/pdo_dblib/tests/timeout.phpt
@@ -0,0 +1,51 @@
+--TEST--
+PDO_DBLIB: Set query timeouts
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+
+$sql = 'WAITFOR DELAY \'00:00:02\'';
+
+// querying without a timeout will succeed
+$stmt = $db->prepare($sql);
+if ($stmt->execute()) {
+ echo "OK\n";
+}
+
+// regular timeout attribute will affect query timeout, causing this query to fail
+$db = new PDO($dsn, $user, $pass, [PDO::ATTR_TIMEOUT => 1]);
+$stmt = $db->prepare($sql);
+if (!$stmt->execute()) {
+ echo "OK\n";
+
+ // expect some kind of error code
+ if ($stmt->errorCode() != '00000') {
+ echo "OK\n";
+ }
+}
+
+// pdo_dblib-specific timeout attribute will control query timeout, causing this query to fail
+$db = new PDO($dsn, $user, $pass, [PDO::DBLIB_ATTR_QUERY_TIMEOUT => 1]);
+$stmt = $db->prepare($sql);
+if (!$stmt->execute()) {
+ echo "OK\n";
+
+ // expect some kind of error code
+ if ($stmt->errorCode() != '00000') {
+ echo "OK\n";
+ }
+}
+
+?>
+--EXPECT--
+OK
+OK
+OK
+OK
+OK
diff --git a/ext/pdo_dblib/tests/types.phpt b/ext/pdo_dblib/tests/types.phpt
new file mode 100644
index 0000000000..dd849adcf8
--- /dev/null
+++ b/ext/pdo_dblib/tests/types.phpt
@@ -0,0 +1,66 @@
+--TEST--
+PDO_DBLIB: Column data types, with or without stringifying
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require __DIR__ . '/config.inc';
+?>
+--FILE--
+<?php
+require __DIR__ . '/config.inc';
+
+$sql = "
+ SELECT
+ 'foo' AS [char],
+ CAST('2030-01-01 23:59:59' AS DATETIME) AS [datetime],
+ CAST(0 AS BIT) AS [false],
+ 10.5 AS [float],
+ 1000 AS [int],
+ CAST(10.5 AS MONEY) AS [money],
+ CAST('1950-01-18 23:00:00' AS SMALLDATETIME) as [smalldatetime],
+ CAST(1 AS BIT) AS [true]
+";
+
+$stmt = $db->query($sql);
+$row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+var_dump($row['char'] === 'foo');
+var_dump($row['datetime'] === '2030-01-01 23:59:59');
+var_dump($row['false'] === 0);
+var_dump($row['float'] === 10.5);
+var_dump($row['int'] === 1000);
+var_dump($row['money'] === 10.5);
+var_dump($row['smalldatetime'] === '1950-01-18 23:00:00');
+var_dump($row['true'] === 1);
+
+$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
+$stmt = $db->query($sql);
+$row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+var_dump($row['char'] === 'foo');
+var_dump($row['datetime'] === '2030-01-01 23:59:59');
+var_dump($row['false'] === '0');
+var_dump($row['float'] === '10.5');
+var_dump($row['int'] === '1000');
+var_dump($row['money'] === '10.5');
+var_dump($row['smalldatetime'] === '1950-01-18 23:00:00');
+var_dump($row['true'] === '1');
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
index 4bba4b6b1f..b26939ccd2 100644
--- a/ext/pdo_firebird/firebird_driver.c
+++ b/ext/pdo_firebird/firebird_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -138,7 +138,7 @@ static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_
HashTable *np;
do {
- isc_stmt_handle s = NULL;
+ isc_stmt_handle s = PDO_FIREBIRD_HANDLE_INITIALIZER;
XSQLDA num_sqlda;
static char const info[] = { isc_info_sql_stmt_type };
char result[8];
@@ -219,7 +219,7 @@ static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_
static zend_long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_len) /* {{{ */
{
pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
- isc_stmt_handle stmt = NULL;
+ isc_stmt_handle stmt = PDO_FIREBIRD_HANDLE_INITIALIZER;
static char const info_count[] = { isc_info_sql_records };
char result[64];
int ret = 0;
@@ -474,56 +474,65 @@ static int firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v
switch (attr) {
case PDO_ATTR_AUTOCOMMIT:
-
- convert_to_boolean(val);
-
- /* ignore if the new value equals the old one */
- if (dbh->auto_commit ^ (Z_TYPE_P(val) == IS_TRUE? 1 : 0)) {
- if (dbh->in_txn) {
- if (Z_TYPE_P(val) == IS_TRUE) {
- /* turning on auto_commit with an open transaction is illegal, because
- we won't know what to do with it */
- H->last_app_error = "Cannot enable auto-commit while a transaction is already open";
- return 0;
- } else {
- /* close the transaction */
- if (!firebird_handle_commit(dbh)) {
- break;
+ {
+ zend_bool bval = zval_get_long(val)? 1 : 0;
+
+ /* ignore if the new value equals the old one */
+ if (dbh->auto_commit ^ bval) {
+ if (dbh->in_txn) {
+ if (bval) {
+ /* turning on auto_commit with an open transaction is illegal, because
+ we won't know what to do with it */
+ H->last_app_error = "Cannot enable auto-commit while a transaction is already open";
+ return 0;
+ } else {
+ /* close the transaction */
+ if (!firebird_handle_commit(dbh)) {
+ break;
+ }
+ dbh->in_txn = 0;
}
- dbh->in_txn = 0;
}
+ dbh->auto_commit = bval;
}
- dbh->auto_commit = Z_TYPE_P(val) == IS_TRUE? 1 : 0;
}
return 1;
case PDO_ATTR_FETCH_TABLE_NAMES:
- convert_to_boolean(val);
- H->fetch_table_names = Z_TYPE_P(val) == IS_TRUE? 1 : 0;
+ H->fetch_table_names = zval_get_long(val)? 1 : 0;
return 1;
case PDO_FB_ATTR_DATE_FORMAT:
- convert_to_string(val);
- if (H->date_format) {
- efree(H->date_format);
+ {
+ zend_string *str = zval_get_string(val);
+ if (H->date_format) {
+ efree(H->date_format);
+ }
+ spprintf(&H->date_format, 0, "%s", ZSTR_VAL(str));
+ zend_string_release(str);
}
- spprintf(&H->date_format, 0, "%s", Z_STRVAL_P(val));
return 1;
case PDO_FB_ATTR_TIME_FORMAT:
- convert_to_string(val);
- if (H->time_format) {
- efree(H->time_format);
+ {
+ zend_string *str = zval_get_string(val);
+ if (H->time_format) {
+ efree(H->time_format);
+ }
+ spprintf(&H->time_format, 0, "%s", ZSTR_VAL(str));
+ zend_string_release(str);
}
- spprintf(&H->time_format, 0, "%s", Z_STRVAL_P(val));
return 1;
case PDO_FB_ATTR_TIMESTAMP_FORMAT:
- convert_to_string(val);
- if (H->timestamp_format) {
- efree(H->timestamp_format);
+ {
+ zend_string *str = zval_get_string(val);
+ if (H->timestamp_format) {
+ efree(H->timestamp_format);
+ }
+ spprintf(&H->timestamp_format, 0, "%s", ZSTR_VAL(str));
+ zend_string_release(str);
}
- spprintf(&H->timestamp_format, 0, "%s", Z_STRVAL_P(val));
return 1;
}
return 0;
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c
index 1e0151dc9d..d6bfa021a5 100644
--- a/ext/pdo_firebird/firebird_statement.c
+++ b/ext/pdo_firebird/firebird_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -223,7 +223,7 @@ static int firebird_fetch_blob(pdo_stmt_t *stmt, int colno, char **ptr, /* {{{ *
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
pdo_firebird_db_handle *H = S->H;
- isc_blob_handle blobh = NULL;
+ isc_blob_handle blobh = PDO_FIREBIRD_HANDLE_INITIALIZER;
char const bl_item = isc_info_blob_total_length;
char bl_info[20];
unsigned short i;
@@ -367,7 +367,7 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{
break;
case SQL_LONG:
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
- *len = slprintf(*ptr, CHAR_BUF_LEN, "%ld", *(ISC_LONG*)var->sqldata);
+ *len = slprintf(*ptr, CHAR_BUF_LEN, "%d", *(ISC_LONG*)var->sqldata);
break;
case SQL_INT64:
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
@@ -412,7 +412,7 @@ static int firebird_bind_blob(pdo_stmt_t *stmt, ISC_QUAD *blob_id, zval *param)
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
pdo_firebird_db_handle *H = S->H;
- isc_blob_handle h = NULL;
+ isc_blob_handle h = PDO_FIREBIRD_HANDLE_INITIALIZER;
zend_ulong put_cnt = 0, rem_cnt;
unsigned short chunk_size;
int result = 1;
@@ -523,12 +523,13 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
}
if (Z_TYPE_P(parameter) == IS_RESOURCE) {
- php_stream *stm;
+ php_stream *stm = NULL;
php_stream_from_zval_no_verify(stm, parameter);
if (stm) {
+ zend_string *mem = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0);
zval_ptr_dtor(parameter);
- ZVAL_STR(parameter, php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0));
+ ZVAL_STR(parameter, mem ? mem : ZSTR_EMPTY_ALLOC());
} else {
pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource");
return 0;
diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c
index 4b75e4b6bf..d1a4619d40 100644
--- a/ext/pdo_firebird/pdo_firebird.c
+++ b/ext/pdo_firebird/pdo_firebird.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_firebird/php_pdo_firebird.h b/ext/pdo_firebird/php_pdo_firebird.h
index 185ff14853..61f7486a1c 100644
--- a/ext/pdo_firebird/php_pdo_firebird.h
+++ b/ext/pdo_firebird/php_pdo_firebird.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h
index 42c2290b29..917f224e80 100644
--- a/ext/pdo_firebird/php_pdo_firebird_int.h
+++ b/ext/pdo_firebird/php_pdo_firebird_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -61,6 +61,12 @@ typedef void (*info_func_t)(char*);
#define min(a,b) ((a)<(b)?(a):(b))
#endif
+#if defined(_LP64) || defined(__LP64__) || defined(__arch64__) || defined(_WIN64)
+# define PDO_FIREBIRD_HANDLE_INITIALIZER 0U
+#else
+# define PDO_FIREBIRD_HANDLE_INITIALIZER NULL
+#endif
+
typedef struct {
/* the result of the last API call */
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 4f55d96d00..1b1d1abbea 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -147,11 +147,9 @@ static int mysql_handle_closer(pdo_dbh_t *dbh)
if (H) {
if (H->server) {
mysql_close(H->server);
- H->server = NULL;
}
if (H->einfo.errmsg) {
pefree(H->einfo.errmsg, dbh->is_persistent);
- H->einfo.errmsg = NULL;
}
pefree(H, dbh->is_persistent);
dbh->driver_data = NULL;
@@ -370,43 +368,40 @@ static inline int mysql_handle_autocommit(pdo_dbh_t *dbh)
/* {{{ pdo_mysql_set_attribute */
static int pdo_mysql_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val)
{
+ zend_long lval = zval_get_long(val);
+ zend_bool bval = lval? 1 : 0;
PDO_DBG_ENTER("pdo_mysql_set_attribute");
PDO_DBG_INF_FMT("dbh=%p", dbh);
PDO_DBG_INF_FMT("attr=%l", attr);
switch (attr) {
case PDO_ATTR_AUTOCOMMIT:
- convert_to_boolean(val);
/* ignore if the new value equals the old one */
- if (dbh->auto_commit ^ (Z_TYPE_P(val) == IS_TRUE)) {
- dbh->auto_commit = (Z_TYPE_P(val) == IS_TRUE);
+ if (dbh->auto_commit ^ bval) {
+ dbh->auto_commit = bval;
mysql_handle_autocommit(dbh);
}
PDO_DBG_RETURN(1);
case PDO_MYSQL_ATTR_USE_BUFFERED_QUERY:
- convert_to_boolean(val);
/* ignore if the new value equals the old one */
- ((pdo_mysql_db_handle *)dbh->driver_data)->buffered = (Z_TYPE_P(val) == IS_TRUE);
+ ((pdo_mysql_db_handle *)dbh->driver_data)->buffered = bval;
PDO_DBG_RETURN(1);
case PDO_MYSQL_ATTR_DIRECT_QUERY:
case PDO_ATTR_EMULATE_PREPARES:
- convert_to_boolean(val);
/* ignore if the new value equals the old one */
- ((pdo_mysql_db_handle *)dbh->driver_data)->emulate_prepare = (Z_TYPE_P(val) == IS_TRUE);
+ ((pdo_mysql_db_handle *)dbh->driver_data)->emulate_prepare = bval;
PDO_DBG_RETURN(1);
case PDO_ATTR_FETCH_TABLE_NAMES:
- convert_to_boolean(val);
- ((pdo_mysql_db_handle *)dbh->driver_data)->fetch_table_names = (Z_TYPE_P(val) == IS_TRUE);
+ ((pdo_mysql_db_handle *)dbh->driver_data)->fetch_table_names = bval;
PDO_DBG_RETURN(1);
#ifndef PDO_USE_MYSQLND
case PDO_MYSQL_ATTR_MAX_BUFFER_SIZE:
- convert_to_long(val);
- if (Z_LVAL_P(val) < 0) {
+ if (lval < 0) {
/* TODO: Johannes, can we throw a warning here? */
((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = 1024*1024;
PDO_DBG_INF_FMT("Adjusting invalid buffer size to =%l", ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size);
} else {
- ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = Z_LVAL_P(val);
+ ((pdo_mysql_db_handle *)dbh->driver_data)->max_buffer_size = lval;
}
PDO_DBG_RETURN(1);
break;
@@ -604,12 +599,12 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
if (driver_options) {
zend_long connect_timeout = pdo_attr_lval(driver_options, PDO_ATTR_TIMEOUT, 30);
zend_long local_infile = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_LOCAL_INFILE, 0);
- char *init_cmd = NULL;
+ zend_string *init_cmd = NULL;
#ifndef PDO_USE_MYSQLND
- char *default_file = NULL, *default_group = NULL;
+ zend_string *default_file = NULL, *default_group = NULL;
#endif
zend_long compress = 0;
- char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL;
+ zend_string *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL;
H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
H->emulate_prepare = pdo_attr_lval(driver_options,
@@ -634,14 +629,11 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
goto cleanup;
}
-#if PHP_API_VERSION < 20100412
- if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode))
-#else
- if (PG(open_basedir) && PG(open_basedir)[0] != '\0')
-#endif
- {
+#ifndef PDO_USE_MYSQLND
+ if (PG(open_basedir) && PG(open_basedir)[0] != '\0') {
local_infile = 0;
}
+#endif
#if defined(MYSQL_OPT_LOCAL_INFILE) || defined(PDO_USE_MYSQLND)
if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) {
pdo_mysql_error(dbh);
@@ -660,32 +652,32 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
#endif
init_cmd = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_INIT_COMMAND, NULL);
if (init_cmd) {
- if (mysql_options(H->server, MYSQL_INIT_COMMAND, (const char *)init_cmd)) {
- efree(init_cmd);
+ if (mysql_options(H->server, MYSQL_INIT_COMMAND, (const char *)ZSTR_VAL(init_cmd))) {
+ zend_string_release(init_cmd);
pdo_mysql_error(dbh);
goto cleanup;
}
- efree(init_cmd);
+ zend_string_release(init_cmd);
}
#ifndef PDO_USE_MYSQLND
default_file = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_FILE, NULL);
if (default_file) {
- if (mysql_options(H->server, MYSQL_READ_DEFAULT_FILE, (const char *)default_file)) {
- efree(default_file);
+ if (mysql_options(H->server, MYSQL_READ_DEFAULT_FILE, (const char *)ZSTR_VAL(default_file))) {
+ zend_string_release(default_file);
pdo_mysql_error(dbh);
goto cleanup;
}
- efree(default_file);
+ zend_string_release(default_file);
}
- default_group= pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_GROUP, NULL);
+ default_group = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_GROUP, NULL);
if (default_group) {
- if (mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, (const char *)default_group)) {
- efree(default_group);
+ if (mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, (const char *)ZSTR_VAL(default_group))) {
+ zend_string_release(default_group);
pdo_mysql_error(dbh);
goto cleanup;
}
- efree(default_group);
+ zend_string_release(default_group);
}
#endif
compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0);
@@ -703,34 +695,39 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
ssl_cipher = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CIPHER, NULL);
if (ssl_key || ssl_cert || ssl_ca || ssl_capath || ssl_cipher) {
- mysql_ssl_set(H->server, ssl_key, ssl_cert, ssl_ca, ssl_capath, ssl_cipher);
+ mysql_ssl_set(H->server,
+ ssl_key? ZSTR_VAL(ssl_key) : NULL,
+ ssl_cert? ZSTR_VAL(ssl_cert) : NULL,
+ ssl_ca? ZSTR_VAL(ssl_ca) : NULL,
+ ssl_capath? ZSTR_VAL(ssl_capath) : NULL,
+ ssl_cipher? ZSTR_VAL(ssl_cipher) : NULL);
if (ssl_key) {
- efree(ssl_key);
+ zend_string_release(ssl_key);
}
if (ssl_cert) {
- efree(ssl_cert);
+ zend_string_release(ssl_cert);
}
if (ssl_ca) {
- efree(ssl_ca);
+ zend_string_release(ssl_ca);
}
if (ssl_capath) {
- efree(ssl_capath);
+ zend_string_release(ssl_capath);
}
if (ssl_cipher) {
- efree(ssl_cipher);
+ zend_string_release(ssl_cipher);
}
}
#if MYSQL_VERSION_ID > 50605 || defined(PDO_USE_MYSQLND)
{
- char *public_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY, NULL);
+ zend_string *public_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SERVER_PUBLIC_KEY, NULL);
if (public_key) {
- if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, public_key)) {
+ if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, ZSTR_VAL(public_key))) {
pdo_mysql_error(dbh);
- efree(public_key);
+ zend_string_release(public_key);
goto cleanup;
}
- efree(public_key);
+ zend_string_release(public_key);
}
}
#endif
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 551960560e..b141de79ef 100644
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -88,8 +88,8 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
}
#endif
-
- if (S->H->server) {
+ if (IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)])
+ && (!(GC_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED))) {
while (mysql_more_results(S->H->server)) {
MYSQL_RES *res;
if (mysql_next_result(S->H->server) != 0) {
@@ -523,10 +523,12 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
parameter = Z_REFVAL(param->parameter);
}
if (Z_TYPE_P(parameter) == IS_RESOURCE) {
- php_stream *stm;
+ php_stream *stm = NULL;
php_stream_from_zval_no_verify(stm, parameter);
if (stm) {
- ZVAL_STR(parameter, php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0));
+ zend_string *mem = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0);
+ zval_ptr_dtor(parameter);
+ ZVAL_STR(parameter, mem ? mem : ZSTR_EMPTY_ALLOC());
} else {
pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource");
return 0;
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
index 6adf3b11c0..fdf7062f62 100644
--- a/ext/pdo_mysql/pdo_mysql.c
+++ b/ext/pdo_mysql/pdo_mysql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@
#ifdef COMPILE_DL_PDO_MYSQL
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(pdo_mysql)
#endif
@@ -229,7 +229,6 @@ const zend_function_entry pdo_mysql_functions[] = {
/* }}} */
/* {{{ pdo_mysql_deps[] */
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_mysql_deps[] = {
ZEND_MOD_REQUIRED("pdo")
#ifdef PDO_USE_MYSQLND
@@ -237,7 +236,6 @@ static const zend_module_dep pdo_mysql_deps[] = {
#endif
ZEND_MOD_END
};
-#endif
/* }}} */
/* {{{ pdo_mysql_module_entry */
diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h
index 78b16ef861..b922f76add 100644
--- a/ext/pdo_mysql/php_pdo_mysql.h
+++ b/ext/pdo_mysql/php_pdo_mysql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h
index 17bace7882..20d640c405 100644
--- a/ext/pdo_mysql/php_pdo_mysql_int.h
+++ b/ext/pdo_mysql/php_pdo_mysql_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -43,7 +43,12 @@
#define PDO_DBG_ERR(msg) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "error: ", (msg)); } while (0)
#define PDO_DBG_INF_FMT(...) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log_va(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "info : ", __VA_ARGS__); } while (0)
#define PDO_DBG_ERR_FMT(...) do { if (dbg_skip_trace == FALSE) PDO_MYSQL_G(dbg)->m->log_va(PDO_MYSQL_G(dbg), __LINE__, __FILE__, -1, "error: ", __VA_ARGS__); } while (0)
-#define PDO_DBG_ENTER(func_name) zend_bool dbg_skip_trace = TRUE; if (PDO_MYSQL_G(dbg)) dbg_skip_trace = !PDO_MYSQL_G(dbg)->m->func_enter(PDO_MYSQL_G(dbg), __LINE__, __FILE__, func_name, strlen(func_name));
+#define PDO_DBG_ENTER(func_name) \
+ zend_bool dbg_skip_trace = TRUE; \
+ ((void) dbg_skip_trace); \
+ if (PDO_MYSQL_G(dbg)) \
+ dbg_skip_trace = !PDO_MYSQL_G(dbg)->m->func_enter(PDO_MYSQL_G(dbg), __LINE__, __FILE__, func_name, strlen(func_name));
+
#define PDO_DBG_RETURN(value) do { if (PDO_MYSQL_G(dbg)) PDO_MYSQL_G(dbg)->m->func_leave(PDO_MYSQL_G(dbg), __LINE__, __FILE__, 0); return (value); } while (0)
#define PDO_DBG_VOID_RETURN do { if (PDO_MYSQL_G(dbg)) PDO_MYSQL_G(dbg)->m->func_leave(PDO_MYSQL_G(dbg), __LINE__, __FILE__, 0); return; } while (0)
@@ -81,14 +86,10 @@ ZEND_BEGIN_MODULE_GLOBALS(pdo_mysql)
ZEND_END_MODULE_GLOBALS(pdo_mysql)
ZEND_EXTERN_MODULE_GLOBALS(pdo_mysql)
+#define PDO_MYSQL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(pdo_mysql, v)
-#ifdef ZTS
-#define PDO_MYSQL_G(v) ZEND_TSRMG(pdo_mysql_globals_id, zend_pdo_mysql_globals *, v)
-# ifdef COMPILE_DL_PDO_MYSQL
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-#define PDO_MYSQL_G(v) (pdo_mysql_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_PDO_MYSQL)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
@@ -125,9 +126,9 @@ typedef struct {
const MYSQL_FIELD *fields;
MYSQL_ROW current_data;
#if PDO_USE_MYSQLND
- zend_ulong *current_lengths;
+ const size_t *current_lengths;
#else
- zend_long *current_lengths;
+ zend_long *current_lengths;
#endif
pdo_mysql_error_info einfo;
#if PDO_USE_MYSQLND
@@ -143,7 +144,7 @@ typedef struct {
#endif
PDO_MYSQL_PARAM_BIND *bound_result;
my_bool *out_null;
- zend_ulong *out_length;
+ zend_ulong *out_length;
unsigned int params_given;
unsigned max_length:1;
} pdo_mysql_stmt;
diff --git a/ext/pdo_mysql/tests/PDO_getAvaliableDrivers.phpt b/ext/pdo_mysql/tests/PDO_getAvaliableDrivers.phpt
new file mode 100644
index 0000000000..07ddca183a
--- /dev/null
+++ b/ext/pdo_mysql/tests/PDO_getAvaliableDrivers.phpt
@@ -0,0 +1,11 @@
+--TEST--
+public static array PDO::getAvailableDrivers ( void );
+array pdo_drivers ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--FILE--
+<?php
+print((is_array(PDO::getAvailableDrivers())) ? ("yes") : ("Test failed"));
+?>
+--EXPECT--
+yes
diff --git a/ext/pdo_mysql/tests/bug54929.phpt b/ext/pdo_mysql/tests/bug54929.phpt
index 84b9e7d04f..0a111d8935 100644
--- a/ext/pdo_mysql/tests/bug54929.phpt
+++ b/ext/pdo_mysql/tests/bug54929.phpt
@@ -54,7 +54,7 @@ array(3) {
[1]=>
int(1064)
[2]=>
- string(149) "You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '--'' at line 1"
+ string(%d) "You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '--'' at line 1"
}
array(1) {
["f1"]=>
diff --git a/ext/pdo_mysql/tests/bug70272.phpt b/ext/pdo_mysql/tests/bug70272.phpt
new file mode 100644
index 0000000000..cd9b9d7da2
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug70272.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #70272 (Segfault in pdo_mysql)
+--SKIPIF--
+<?php
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+?>
+--INI--
+report_memleaks=off
+--FILE--
+<?php
+$a = new Stdclass();
+$a->a = &$a;
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+
+$dummy = new StdClass();
+
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$dummy = NULL;
+
+$a->c = $db;
+$a->b = $db->prepare("select 1");
+$a->d = $db->prepare("select 2");
+$a->e = $db->prepare("select 3");
+$a->f = $db->prepare("select 4");
+gc_disable();
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/pdo_mysql/tests/bug70389.phpt b/ext/pdo_mysql/tests/bug70389.phpt
new file mode 100644
index 0000000000..b9084f63e3
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug70389.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Bug #70389 (PDO constructor changes unrelated variables)
+--SKIPIF--
+<?php
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+?>
+--FILE--
+<?php
+require(dirname(__FILE__). DIRECTORY_SEPARATOR . 'config.inc');
+$flags = [
+ PDO::MYSQL_ATTR_FOUND_ROWS => true,
+ PDO::MYSQL_ATTR_LOCAL_INFILE => true,
+ PDO::ATTR_PERSISTENT => true,
+];
+
+$std = new StdClass();
+$std->flags = $flags;
+
+new PDO(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, $flags);
+var_dump($flags);
+
+?>
+--EXPECTF--
+array(3) {
+ [1005]=>
+ bool(true)
+ [1001]=>
+ bool(true)
+ [12]=>
+ bool(true)
+}
diff --git a/ext/pdo_mysql/tests/bug70862.phpt b/ext/pdo_mysql/tests/bug70862.phpt
new file mode 100644
index 0000000000..4a3a618854
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug70862.phpt
@@ -0,0 +1,46 @@
+--TEST--
+MySQL Prepared Statements and BLOBs
+--SKIPIF--
+<?php
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+?>
+--FILE--
+<?php
+ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+ $db = MySQLPDOTest::factory();
+
+ $db->exec('DROP TABLE IF EXISTS test');
+ $db->exec(sprintf('CREATE TABLE test(id INT, label BLOB)'));
+
+ $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
+ $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
+
+ class HelloWrapper {
+ public function stream_open() { return true; }
+ public function stream_eof() { return true; }
+ public function stream_read() { return NULL; }
+ public function stream_stat() { return array(); }
+ }
+ stream_wrapper_register("hello", "HelloWrapper");
+
+ $f = fopen("hello://there", "r");
+
+ $stmt = $db->prepare('INSERT INTO test(id, label) VALUES (1, :para)');
+ $stmt->bindParam(":para", $f, PDO::PARAM_LOB);
+ $stmt->execute();
+
+ var_dump($f);
+
+ print "done!";
+?>
+--CLEAN--
+<?php
+require dirname(__FILE__) . '/mysql_pdo_test.inc';
+$db = MySQLPDOTest::factory();
+$db->exec('DROP TABLE IF EXISTS test');
+?>
+--EXPECTF--
+string(0) ""
+done!
diff --git a/ext/pdo_mysql/tests/bug71569.phpt b/ext/pdo_mysql/tests/bug71569.phpt
new file mode 100644
index 0000000000..32c14b4622
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug71569.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71569 (#70389 fix causes segmentation fault)
+--SKIPIF--
+<?php
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+?>
+--FILE--
+<?php
+require(dirname(__FILE__). DIRECTORY_SEPARATOR . 'config.inc');
+
+try {
+ new PDO(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, [
+ PDO::MYSQL_ATTR_INIT_COMMAND => null,
+ ]);
+} catch (PDOException $e) {
+ echo $e->getMessage();
+}
+
+?>
+--EXPECT--
+SQLSTATE[42000] [1065] Query was empty
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt
new file mode 100644
index 0000000000..b4609b1629
--- /dev/null
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt
@@ -0,0 +1,79 @@
+--TEST--
+MySQL PDO->__construct() - URI
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip only for Windows');
+}
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+MySQLPDOTest::skip();
+?>
+--FILE--
+<?php
+ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+
+ try {
+
+ if ($tmp = MySQLPDOTest::getTempDir()) {
+
+ $file = $tmp . DIRECTORY_SEPARATOR . 'pdomuri.tst';
+ $dsn = MySQLPDOTest::getDSN();
+ $user = PDO_MYSQL_TEST_USER;
+ $pass = PDO_MYSQL_TEST_PASS;
+ $uri = sprintf('uri:file:%s', $file);
+
+ if ($fp = @fopen($file, 'w')) {
+ // ok, great we can create a file with a DSN in it
+ fwrite($fp, $dsn);
+ fclose($fp);
+ clearstatcache();
+ assert(file_exists($file));
+ try {
+ $db = new PDO($uri, $user, $pass);
+ } catch (PDOException $e) {
+ printf("[002] URI=%s, DSN=%s, File=%s (%d bytes, '%s'), %s\n",
+ $uri, $dsn,
+ $file, filesize($file), file_get_contents($file),
+ $e->getMessage());
+ }
+ unlink($file);
+ }
+
+ if ($fp = @fopen($file, 'w')) {
+ fwrite($fp, sprintf('mysql:dbname=letshopeinvalid;%s%s',
+ chr(0), $dsn));
+ fclose($fp);
+ clearstatcache();
+ assert(file_exists($file));
+ try {
+ $db = new PDO($uri, $user, $pass);
+ } catch (PDOException $e) {
+ printf("[003] URI=%s, DSN=%s, File=%s (%d bytes, '%s'), chr(0) test, %s\n",
+ $uri, $dsn,
+ $file, filesize($file), file_get_contents($file),
+ $e->getMessage());
+ }
+ unlink($file);
+ }
+
+ }
+
+ /* TODO: safe mode */
+
+ } catch (PDOException $e) {
+ printf("[001] %s, [%s] %s\n",
+ $e->getMessage(),
+ (is_object($db)) ? $db->errorCode() : 'n/a',
+ (is_object($db)) ? implode(' ', $db->errorInfo()) : 'n/a');
+ }
+
+ print "done!";
+?>
+--EXPECTF--
+Warning: PDO::__construct(file:%spdomuri.tst): failed to open stream: Invalid argument in %s on line %d
+[002] URI=uri:file:%spdomuri.tst, DSN=mysql%sdbname=%s, File=%spdomuri.tst (%d bytes, 'mysql%sdbname=%s'), invalid data source URI
+
+Warning: PDO::__construct(file:%spdomuri.tst): failed to open stream: Invalid argument in %s on line %d
+[003] URI=uri:file:%spdomuri.tst, DSN=mysql%sdbname=%s, File=%spdomuri.tst (%d bytes, 'mysql%sdbname=letshopeinvalid%s'), chr(0) test, invalid data source URI
+done!
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
index d5dd3e67f9..0b1cf3fe65 100644
--- a/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
@@ -2,6 +2,9 @@
MySQL PDO->__construct() - URI
--SKIPIF--
<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip not for Windows');
+}
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt
index d5a348957f..9028f0b49f 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt
@@ -129,8 +129,8 @@ array(3) {
[0]=>
%unicode|string%(5) "00000"
[1]=>
- int(1146)
+ NULL
[2]=>
- %unicode|string%(%d) "Table '%s.ihopeitdoesnotexist' doesn't exist"
+ NULL
}
done!
diff --git a/ext/pdo_oci/EXPERIMENTAL b/ext/pdo_oci/EXPERIMENTAL
deleted file mode 100644
index e69de29bb2..0000000000
--- a/ext/pdo_oci/EXPERIMENTAL
+++ /dev/null
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index 2551554476..bcbcee5532 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -302,15 +302,13 @@ static int oci_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len,
}
- prefetch = pdo_oci_sanitize_prefetch((long) pdo_attr_lval(driver_options, PDO_ATTR_PREFETCH, PDO_OCI_PREFETCH_DEFAULT));
- if (prefetch) {
+ prefetch = H->prefetch; /* Note 0 is allowed so in future REF CURSORs can be used & then passed with no row loss*/
+ H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0,
+ OCI_ATTR_PREFETCH_ROWS, H->err);
+ if (!H->last_err) {
+ prefetch *= PDO_OCI_PREFETCH_ROWSIZE;
H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0,
- OCI_ATTR_PREFETCH_ROWS, H->err);
- if (!H->last_err) {
- prefetch *= PDO_OCI_PREFETCH_ROWSIZE;
- H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0,
- OCI_ATTR_PREFETCH_MEMORY, H->err);
- }
+ OCI_ATTR_PREFETCH_MEMORY, H->err);
}
stmt->driver_data = S;
@@ -442,6 +440,7 @@ static int oci_handle_rollback(pdo_dbh_t *dbh) /* {{{ */
static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /* {{{ */
{
+ zend_long lval = zval_get_long(val);
pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;
if (attr == PDO_ATTR_AUTOCOMMIT) {
@@ -456,9 +455,10 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /
dbh->in_txn = 0;
}
- convert_to_long(val);
-
- dbh->auto_commit = (unsigned int) (Z_LVAL_P(val)) ? 1 : 0;
+ dbh->auto_commit = (unsigned int)lval? 1 : 0;
+ return 1;
+ } else if (attr == PDO_ATTR_PREFETCH) {
+ H->prefetch = pdo_oci_sanitize_prefetch(lval);
return 1;
} else {
return 0;
@@ -524,6 +524,9 @@ static int oci_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return
ZVAL_BOOL(return_value, dbh->auto_commit);
return TRUE;
+ case PDO_ATTR_PREFETCH:
+ ZVAL_LONG(return_value, H->prefetch);
+ return TRUE;
default:
return FALSE;
@@ -602,6 +605,8 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ *
H = pecalloc(1, sizeof(*H), dbh->is_persistent);
dbh->driver_data = H;
+ H->prefetch = PDO_OCI_PREFETCH_DEFAULT;
+
/* allocate an environment */
#if HAVE_OCIENVNLSCREATE
if (vars[0].optval) {
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
index 3148162d61..1d8eb51266 100644
--- a/ext/pdo_oci/oci_statement.c
+++ b/ext/pdo_oci/oci_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -51,7 +51,16 @@
} \
} while(0)
-static php_stream *oci_create_lob_stream(pdo_stmt_t *stmt, OCILobLocator *lob);
+static php_stream *oci_create_lob_stream(zval *dbh, pdo_stmt_t *stmt, OCILobLocator *lob);
+
+#define OCI_TEMPLOB_CLOSE(envhp, svchp, errhp, lob) \
+ do \
+ { \
+ boolean isTempLOB; \
+ OCILobIsTemporary(envhp, errhp, lob, &isTempLOB); \
+ if (isTempLOB) \
+ OCILobFreeTemporary(svchp, errhp, lob); \
+ } while(0)
static int oci_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
{
@@ -99,6 +108,8 @@ static int oci_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
switch (S->cols[i].dtype) {
case SQLT_BLOB:
case SQLT_CLOB:
+ OCI_TEMPLOB_CLOSE(S->H->env, S->H->svc, S->H->err,
+ (OCILobLocator *) S->cols[i].data);
OCIDescriptorFree(S->cols[i].data, OCI_DTYPE_LOB);
break;
default:
@@ -254,13 +265,12 @@ static sb4 oci_bind_output_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, d
convert_to_string(parameter);
zval_dtor(parameter);
- Z_STRLEN_P(parameter) = param->max_value_len;
- Z_STR_P(parameter) = ecalloc(1, Z_STRLEN_P(parameter)+1);
+ Z_STR_P(parameter) = zend_string_alloc(param->max_value_len, 1);
P->used_for_output = 1;
P->actual_len = (ub4) Z_STRLEN_P(parameter);
*alenpp = &P->actual_len;
- *bufpp = Z_STRVAL_P(parameter);
+ *bufpp = (Z_STR_P(parameter))->val;
*piecep = OCI_ONE_PIECE;
*rcodepp = &P->retcode;
*indpp = &P->indicator;
@@ -294,7 +304,13 @@ static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *pa
case PDO_PARAM_EVT_FREE:
P = param->driver_data;
- if (P) {
+ if (P && P->thing) {
+ OCI_TEMPLOB_CLOSE(S->H->env, S->H->svc, S->H->err, P->thing);
+ OCIDescriptorFree(P->thing, OCI_DTYPE_LOB);
+ P->thing = NULL;
+ efree(P);
+ }
+ else if (P) {
efree(P);
}
break;
@@ -368,9 +384,7 @@ static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *pa
zval_dtor(parameter);
ZVAL_UNDEF(parameter);
} else if (Z_TYPE_P(parameter) == IS_STRING) {
- Z_STRLEN_P(parameter) = P->actual_len;
- Z_STR_P(parameter) = erealloc(Z_STRVAL_P(parameter), P->actual_len+1);
- Z_STRVAL_P(parameter)[P->actual_len] = '\0';
+ Z_STR_P(parameter) = zend_string_init(Z_STRVAL_P(parameter), P->actual_len, 1);
}
} else if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && P->thing) {
php_stream *stm;
@@ -380,11 +394,10 @@ static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *pa
* wanted to bind a lob locator into it from the query
* */
- stm = oci_create_lob_stream(stmt, (OCILobLocator*)P->thing);
+ stm = oci_create_lob_stream(&stmt->database_object_handle, stmt, (OCILobLocator*)P->thing);
if (stm) {
OCILobOpen(S->H->svc, S->err, (OCILobLocator*)P->thing, OCI_LOB_READWRITE);
php_stream_to_zval(stm, parameter);
- P->thing = NULL;
}
} else {
/* we're a LOB being used for insert; transfer the data now */
@@ -433,6 +446,7 @@ static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *pa
OCILobClose(S->H->svc, S->err, (OCILobLocator*)P->thing);
}
}
+ OCI_TEMPLOB_CLOSE(S->H->env, S->H->svc, S->H->err, P->thing);
OCIDescriptorFree(P->thing, OCI_DTYPE_LOB);
P->thing = NULL;
}
@@ -610,10 +624,18 @@ static int oci_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
return 1;
} /* }}} */
+struct _oci_lob_env {
+ OCISvcCtx *svc;
+ OCIError *err;
+};
+typedef struct _oci_lob_env oci_lob_env;
+
struct oci_lob_self {
+ zval dbh;
pdo_stmt_t *stmt;
pdo_oci_stmt *S;
OCILobLocator *lob;
+ oci_lob_env *E;
ub4 offset;
};
@@ -624,7 +646,7 @@ static size_t oci_blob_write(php_stream *stream, const char *buf, size_t count)
sword r;
amt = (ub4) count;
- r = OCILobWrite(self->S->H->svc, self->S->err, self->lob,
+ r = OCILobWrite(self->E->svc, self->E->err, self->lob,
&amt, self->offset, (char*)buf, (ub4) count,
OCI_ONE_PIECE,
NULL, NULL, 0, SQLCS_IMPLICIT);
@@ -644,7 +666,7 @@ static size_t oci_blob_read(php_stream *stream, char *buf, size_t count)
sword r;
amt = (ub4) count;
- r = OCILobRead(self->S->H->svc, self->S->err, self->lob,
+ r = OCILobRead(self->E->svc, self->E->err, self->lob,
&amt, self->offset, buf, (ub4) count,
NULL, NULL, 0, SQLCS_IMPLICIT);
@@ -662,10 +684,15 @@ static size_t oci_blob_read(php_stream *stream, char *buf, size_t count)
static int oci_blob_close(php_stream *stream, int close_handle)
{
struct oci_lob_self *self = (struct oci_lob_self *)stream->abstract;
- /* pdo_stmt_t *stmt = self->stmt; */
+ pdo_stmt_t *stmt = self->stmt;
if (close_handle) {
- OCILobClose(self->S->H->svc, self->S->err, self->lob);
+ zend_object *obj = &stmt->std;
+
+ OCILobClose(self->E->svc, self->E->err, self->lob);
+ zval_ptr_dtor(&self->dbh);
+ GC_REFCOUNT(obj)--;
+ efree(self->E);
efree(self);
}
@@ -676,7 +703,7 @@ static int oci_blob_close(php_stream *stream, int close_handle)
static int oci_blob_flush(php_stream *stream)
{
struct oci_lob_self *self = (struct oci_lob_self*)stream->abstract;
- OCILobFlushBuffer(self->S->H->svc, self->S->err, self->lob, 0);
+ OCILobFlushBuffer(self->E->svc, self->E->err, self->lob, 0);
return 0;
}
@@ -704,18 +731,27 @@ static php_stream_ops oci_blob_stream_ops = {
NULL
};
-static php_stream *oci_create_lob_stream(pdo_stmt_t *stmt, OCILobLocator *lob)
+static php_stream *oci_create_lob_stream(zval *dbh, pdo_stmt_t *stmt, OCILobLocator *lob)
{
php_stream *stm;
struct oci_lob_self *self = ecalloc(1, sizeof(*self));
+
+ ZVAL_COPY_VALUE(&self->dbh, dbh);
self->lob = lob;
self->offset = 1; /* 1-based */
self->stmt = stmt;
self->S = (pdo_oci_stmt*)stmt->driver_data;
+ self->E = ecalloc(1, sizeof(oci_lob_env));
+ self->E->svc = self->S->H->svc;
+ self->E->err = self->S->err;
stm = php_stream_alloc(&oci_blob_stream_ops, self, 0, "r+b");
if (stm) {
+ zend_object *obj;
+ obj = &stmt->std;
+ Z_ADDREF(self->dbh);
+ GC_REFCOUNT(obj)++;
return stm;
}
@@ -739,7 +775,7 @@ static int oci_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_t *len
if (C->dtype == SQLT_BLOB || C->dtype == SQLT_CLOB) {
if (C->data) {
- *ptr = (char*)oci_create_lob_stream(stmt, (OCILobLocator*)C->data);
+ *ptr = (char*)oci_create_lob_stream(&stmt->database_object_handle, stmt, (OCILobLocator*)C->data);
OCILobOpen(S->H->svc, S->err, (OCILobLocator*)C->data, OCI_LOB_READONLY);
}
*len = (size_t) 0;
diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c
index e6e9505c9d..0c0cf84574 100644
--- a/ext/pdo_oci/pdo_oci.c
+++ b/ext/pdo_oci/pdo_oci.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -38,12 +38,10 @@ const zend_function_entry pdo_oci_functions[] = {
/* {{{ pdo_oci_module_entry */
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_oci_deps[] = {
ZEND_MOD_REQUIRED("pdo")
ZEND_MOD_END
};
-#endif
zend_module_entry pdo_oci_module_entry = {
STANDARD_MODULE_HEADER_EX, NULL,
diff --git a/ext/pdo_oci/php_pdo_oci.h b/ext/pdo_oci/php_pdo_oci.h
index aae58ae1ec..c827a9bf8e 100644
--- a/ext/pdo_oci/php_pdo_oci.h
+++ b/ext/pdo_oci/php_pdo_oci.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h
index 683146a05e..682458438b 100644
--- a/ext/pdo_oci/php_pdo_oci_int.h
+++ b/ext/pdo_oci/php_pdo_oci_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -35,6 +35,7 @@ typedef struct {
OCIError *err;
OCISvcCtx *svc;
/* OCI9; 0 == use NLS_LANG */
+ ub4 prefetch;
ub2 charset;
sword last_err;
diff --git a/ext/pdo_oci/tests/bug44301.phpt b/ext/pdo_oci/tests/bug44301.phpt
index c0f79356af..1a3d8ad797 100644
--- a/ext/pdo_oci/tests/bug44301.phpt
+++ b/ext/pdo_oci/tests/bug44301.phpt
@@ -22,4 +22,4 @@ try {
$db = null;
--EXPECTF--
SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view does not exist
- (%s/ext/pdo_oci/oci_statement.c:%d)
+ (%s%epdo_oci%eoci_statement.c:%d)
diff --git a/ext/pdo_oci/tests/bug46274.phpt b/ext/pdo_oci/tests/bug46274.phpt
index 77f2a01151..23ee8ee20f 100644
--- a/ext/pdo_oci/tests/bug46274.phpt
+++ b/ext/pdo_oci/tests/bug46274.phpt
@@ -56,8 +56,6 @@ var_dump($res->fetch());
$db->exec("DROP TABLE test_one_blob");
?>
---XFAIL--
-Corrupts memory
--EXPECTF--
array(2) {
["blob1"]=>
diff --git a/ext/pdo_oci/tests/bug46274_2.phpt b/ext/pdo_oci/tests/bug46274_2.phpt
index 9e9225415f..cbadcef4f8 100644
--- a/ext/pdo_oci/tests/bug46274_2.phpt
+++ b/ext/pdo_oci/tests/bug46274_2.phpt
@@ -60,8 +60,6 @@ fclose($row[0]);
$db->exec("DROP TABLE test_one_blob");
?>
---XFAIL--
-Corrupts memory
--EXPECTF--
array(2) {
["blob1"]=>
diff --git a/ext/pdo_oci/tests/bug57702.phpt b/ext/pdo_oci/tests/bug57702.phpt
index 0060bb0f2e..d0abc6ff8c 100644
--- a/ext/pdo_oci/tests/bug57702.phpt
+++ b/ext/pdo_oci/tests/bug57702.phpt
@@ -81,7 +81,6 @@ while ($stmt->fetch(PDO::FETCH_BOUND)) {
var_dump($clob1);
var_dump($clob2);
}
-print "done\n";
////////////////////
@@ -123,6 +122,22 @@ for ($i = 0; $i < count($a); $i++) {
var_dump(stream_get_contents($a[$i][1]));
}
+////////////////////
+
+echo "\nSixth Query\n";
+
+$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); // Let's use streams
+
+$a = array();
+$i = 0;
+foreach($db->query("select data1 as d4_1, data2 as d4_2 from bug57702 order by id") as $row) {
+ $a[$i][0] = $row['d4_1'];
+ $a[$i][1] = $row['d4_2'];
+ var_dump(stream_get_contents($a[$i][0]));
+ var_dump(stream_get_contents($a[$i][1]));
+ $i++;
+}
+
// Cleanup
$query = "drop table bug57702";
$stmt = $db->prepare($query);
@@ -149,7 +164,6 @@ string(11) "row 1 col 1"
string(11) "row 1 col 2"
string(11) "row 2 col 1"
string(11) "row 2 col 2"
-done
Fourth Query
string(11) "row 1 col 1"
@@ -162,4 +176,10 @@ string(11) "row 2 col 1"
string(11) "row 2 col 2"
string(11) "row 2 col 1"
string(11) "row 2 col 2"
+
+Sixth Query
+string(11) "row 1 col 1"
+string(11) "row 1 col 2"
+string(11) "row 2 col 1"
+string(11) "row 2 col 2"
done
diff --git a/ext/pdo_oci/tests/checkliveness.phpt b/ext/pdo_oci/tests/checkliveness.phpt
new file mode 100644
index 0000000000..4bb070f40d
--- /dev/null
+++ b/ext/pdo_oci/tests/checkliveness.phpt
@@ -0,0 +1,55 @@
+--TEST--
+PDO OCI checkliveness (code coverage)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
+require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+
+require 'ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
+
+$dsn = getenv('PDOTEST_DSN');
+$user = getenv('PDOTEST_USER');
+$pass = getenv('PDOTEST_PASS');
+$attr = getenv('PDOTEST_ATTR');
+
+try {
+ $db = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true));
+}
+catch (PDOException $e) {
+ echo 'Connection failed: ' . $e->getMessage();
+ exit;
+}
+
+// This triggers the call to check liveness
+try {
+ $db = new PDO($dsn, $user, $pass, array(PDO::ATTR_PERSISTENT => true));
+}
+catch (PDOException $e) {
+ echo 'Connection failed: ' . $e->getMessage();
+ exit;
+}
+
+$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
+
+try {
+ $stmt = $db->prepare('SELECT * FROM dual');
+ $stmt->execute();
+ $row = $stmt->fetch();
+ var_dump($row);
+} catch (PDOException $e) {
+ print $e->getMessage();
+}
+
+$db = null;
+--EXPECTF--
+array(2) {
+ ["DUMMY"]=>
+ string(1) "X"
+ [0]=>
+ string(1) "X"
+}
diff --git a/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt b/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt
index 839fe83b02..0b42ecb660 100644
--- a/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt
+++ b/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt
@@ -13,12 +13,44 @@ require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
$dbh = PDOTest::factory();
-echo "Test connect: (value is ignored & has no effect)\n";
+echo "Test connect\n";
putenv('PDOTEST_ATTR='.serialize(array(PDO::ATTR_PREFETCH=>101)));
$dbh = PDOTest::factory();
-echo "Test set: (value is ignored & has no effect)\n";
+echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n";
+
+// Verify can fetch
+$s = $dbh->prepare("select dummy from dual" );
+$s->execute();
+while ($r = $s->fetch()) {
+ echo $r[0] . "\n";
+}
+
+echo "Test set 102\n";
$dbh->setAttribute(PDO::ATTR_PREFETCH, 102);
+echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n";
+
+// Verify can fetch
+$s = $dbh->prepare("select dummy from dual" );
+$s->execute();
+while ($r = $s->fetch()) {
+ echo $r[0] . "\n";
+}
+
+echo "Test set -1: (Uses 0)\n";
+$dbh->setAttribute(PDO::ATTR_PREFETCH, -1);
+echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n";
+
+// Verify can fetch
+$s = $dbh->prepare("select dummy from dual" );
+$s->execute();
+while ($r = $s->fetch()) {
+ echo $r[0] . "\n";
+}
+
+echo "Test set PHP_INT_MAX: (Uses default)\n";
+$dbh->setAttribute(PDO::ATTR_PREFETCH, PHP_INT_MAX);
+echo $dbh->getAttribute(PDO::ATTR_PREFETCH), "\n";
// Verify can fetch
$s = $dbh->prepare("select dummy from dual" );
@@ -31,7 +63,16 @@ echo "Done\n";
?>
--EXPECT--
-Test connect: (value is ignored & has no effect)
-Test set: (value is ignored & has no effect)
+Test connect
+101
+X
+Test set 102
+102
+X
+Test set -1: (Uses 0)
+0
+X
+Test set PHP_INT_MAX: (Uses default)
+100
X
Done
diff --git a/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt b/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt
new file mode 100644
index 0000000000..72d2ed93b1
--- /dev/null
+++ b/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt
@@ -0,0 +1,74 @@
+--TEST--
+PDO OCI: Inserts 10K with 1 number and 2 LOB columns (stress test)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
+require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
+PDOTest::skip();
+?>
+--FILE--
+<?php
+
+require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
+
+$db = PDOTest::factory();
+
+$query = "begin execute immediate 'drop table pdo_oci_stream_2'; exception when others then if sqlcode <> -942 then raise; end if; end;";
+$stmt = $db->prepare($query);
+$stmt->execute();
+
+$query = "create table pdo_oci_stream_2 (id number, data1 blob, data2 blob)";
+$stmt = $db->prepare($query);
+$stmt->execute();
+
+function do_insert($db, $id, $data1, $data2)
+{
+ $db->beginTransaction();
+ $stmt = $db->prepare("insert into pdo_oci_stream_2 (id, data1, data2) values (:id, empty_blob(), empty_blob()) returning data1, data2 into :blob1, :blob2");
+ $stmt->bindParam(':id', $id);
+ $stmt->bindParam(':blob1', $blob1, PDO::PARAM_LOB);
+ $stmt->bindParam(':blob2', $blob2, PDO::PARAM_LOB);
+ $blob1 = null;
+ $blob2 = null;
+ $stmt->execute();
+
+ fwrite($blob1, $data1);
+ fclose($blob1);
+ fwrite($blob2, $data2);
+ fclose($blob2);
+ $db->commit();
+}
+
+$a1 = str_repeat('a', 4086);
+$a2 = str_repeat('b', 4087);
+$a3 = str_repeat('c', 4088);
+$a4 = str_repeat('d', 4089);
+$a5 = str_repeat('e', 4090);
+$a6 = str_repeat('f', 4091);
+$a7 = str_repeat('g', 4092);
+$a8 = str_repeat('h', 4093);
+$a9 = str_repeat('i', 4094);
+$a10 = str_repeat('j', 4095);
+
+printf("Inserting 10000 Records ... ");
+for($i=0; $i<1000; $i++) {
+ do_insert($db, $i * 10 + 1, $a1, $a10);
+ do_insert($db, $i * 10 + 2, $a2, $a9);
+ do_insert($db, $i * 10 + 3, $a3, $a8);
+ do_insert($db, $i * 10 + 4, $a4, $a7);
+ do_insert($db, $i * 10 + 5, $a5, $a6);
+ do_insert($db, $i * 10 + 6, $a6, $a5);
+ do_insert($db, $i * 10 + 7, $a7, $a4);
+ do_insert($db, $i * 10 + 8, $a8, $a3);
+ do_insert($db, $i * 10 + 9, $a9, $a2);
+ do_insert($db, $i * 10 + 10, $a10, $a1);
+}
+printf("Done\n");
+
+/* Cleanup is done in pdo_oci_stream_2b.phpt */
+//$db->exec("drop table pdo_oci_stream_2");
+
+?>
+--EXPECT--
+Inserting 10000 Records ... Done
diff --git a/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt b/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt
new file mode 100644
index 0000000000..22ae7c6724
--- /dev/null
+++ b/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt
@@ -0,0 +1,70 @@
+--TEST--
+PDO OCI: Fetches 10K records from a table that contains 1 number and 2 LOB columns (stress test)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
+if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
+require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
+PDOTest::skip();
+?>
+--FILE--
+<?php
+
+// !! Note: uses data inserted in pdo_oci_stream_2a.phpt !!
+
+require('ext/pdo/tests/pdo_test.inc');
+$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
+
+$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); // Let's use streams
+
+// Since each column only has one lob descriptor, the last row is
+// shown twice because the lob descriptor for each column is reused in
+// the stream
+
+$i = 0;
+$j = 9;
+$a_val = ord('a');
+foreach($db->query("select data1 as d4_1, data2 as d4_2 from pdo_oci_stream_2 order by id") as $row) {
+ $a = $row['d4_1'];
+ $a1 = $row['d4_2'];
+
+ $str1 = stream_get_contents($a);
+ $str2 = stream_get_contents($a1);
+
+ $str1len = strlen($str1);
+ $str2len = strlen($str2);
+
+ $b = ord($str1[0]);
+ $b1 = ord($str2[0]);
+
+ if (($b != ($a_val + $i)) && ($str1len != (4086 + $i)) &&
+ ($b1 != ($a_val + $j)) && ($str2len != (4086 + $j))) {
+ printf("There is a bug!\n");
+ printf("Col1:\n");
+ printf("a_val = %d\n", $a_val);
+ printf("b = %d\n", $b);
+ printf("i = %d\n", $i);
+ printf("str1len = %d\n", $str1len);
+
+ printf("Col2:\n");
+ printf("a_val = %d\n", $a_val);
+ printf("b1 = %d\n", $b1);
+ printf("j = %d\n", $j);
+ printf("str2len = %d\n", $str1len);
+
+ }
+ $i++;
+ if ($i>9)
+ $i = 0;
+ $j--;
+ if ($j<0)
+ $j = 9;
+}
+echo "Fetch operation done!\n";
+
+/* Cleanup */
+$db->exec("drop table pdo_oci_stream_2");
+
+?>
+--EXPECTF--
+Fetch operation done!
diff --git a/ext/pdo_oci/tests/pdo_oci_templob_1.phpt b/ext/pdo_oci/tests/pdo_oci_templob_1.phpt
new file mode 100644
index 0000000000..41391058dd
--- /dev/null
+++ b/ext/pdo_oci/tests/pdo_oci_templob_1.phpt
@@ -0,0 +1,85 @@
+--TEST--
+PDO OCI: Test to verify all implicitly created temporary LOB are cleaned up
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
+require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
+PDOTest::skip();
+?>
+--FILE--
+<?PHP
+
+require('ext/pdo/tests/pdo_test.inc');
+$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
+
+$clobquery1 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery2 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery3 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery4 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery5 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery6 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery7 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery8 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery9 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+$clobquery10 = "select TO_CLOB('Hello World') CLOB_DATA from dual";
+
+$stmt= $db->prepare($clobquery1);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery2);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery3);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery4);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery5);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery6);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery7);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery8);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery9);
+$stmt->execute();
+$row = $stmt->fetch();
+$stmt= $db->prepare($clobquery10);
+$stmt->execute();
+$row = $stmt->fetch();
+
+$query1 = "SELECT SYS_CONTEXT('USERENV', 'SID') SID FROM DUAL";
+
+$stmt1 = $db->prepare($query1);
+$stmt1->execute();
+
+$row1 = $stmt1->fetch();
+$sid_value = $row1[0];
+
+$query2 = "SELECT (CACHE_LOBS+NOCACHE_LOBS+ABSTRACT_LOBS) FROM V\$TEMPORARY_LOBS WHERE SID = :SID_VALUE";
+
+$stmt2 = $db->prepare($query2);
+$stmt2->bindParam(':SID_VALUE', $sid_value);
+$stmt2->execute();
+
+$row2 = $stmt2->fetch();
+/* 1 temporary LOB still exists in V$TEMPORARY_LOBS since the destructor of $stmt is not yet called by PHP */
+if ($row2[0] > 1)
+{
+ echo "TEMP_LOB is not yet cleared!" . $row2[0] . "\n";
+}
+else
+{
+ echo "Success! All the temporary LOB in previously closed statements are properly cleaned.\n";
+}
+
+?>
+--EXPECTF--
+Success! All the temporary LOB in previously closed statements are properly cleaned.
+
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 54440d0068..3a9300c5cd 100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -393,7 +393,7 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
pdo_odbc_db_handle *H;
RETCODE rc;
int use_direct = 0;
- SQLUINTEGER cursor_lib;
+ zend_ulong cursor_lib;
H = pecalloc(1, sizeof(*H), dbh->is_persistent);
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 6421cb6701..904c345f1b 100644
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -574,6 +574,24 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno)
sizeof(S->cols[colno].colname)-1, &colnamelen,
&S->cols[colno].coltype, &colsize, NULL, NULL);
+ /* This fixes a known issue with SQL Server and (max) lengths,
+ may affect others as well. If we are SQL_VARCHAR,
+ SQL_VARBINARY, or SQL_WVARCHAR (or any of the long variations)
+ and zero is returned from colsize then consider it long */
+ if (0 == colsize &&
+ (S->cols[colno].coltype == SQL_VARCHAR ||
+ S->cols[colno].coltype == SQL_LONGVARCHAR ||
+#ifdef SQL_WVARCHAR
+ S->cols[colno].coltype == SQL_WVARCHAR ||
+#endif
+#ifdef SQL_WLONGVARCHAR
+ S->cols[colno].coltype == SQL_WLONGVARCHAR ||
+#endif
+ S->cols[colno].coltype == SQL_VARBINARY ||
+ S->cols[colno].coltype == SQL_LONGVARBINARY)) {
+ S->going_long = 1;
+ }
+
if (rc != SQL_SUCCESS) {
pdo_odbc_stmt_error("SQLDescribeCol");
if (rc != SQL_SUCCESS_WITH_INFO) {
diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c
index aa40462da4..61f6fcc62b 100644
--- a/ext/pdo_odbc/pdo_odbc.c
+++ b/ext/pdo_odbc/pdo_odbc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -37,12 +37,10 @@ const zend_function_entry pdo_odbc_functions[] = {
/* }}} */
/* {{{ pdo_odbc_deps[] */
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_odbc_deps[] = {
ZEND_MOD_REQUIRED("pdo")
ZEND_MOD_END
};
-#endif
/* }}} */
/* {{{ pdo_odbc_module_entry */
@@ -66,8 +64,8 @@ ZEND_GET_MODULE(pdo_odbc)
#endif
#ifdef SQL_ATTR_CONNECTION_POOLING
-SQLUINTEGER pdo_odbc_pool_on = SQL_CP_OFF;
-SQLUINTEGER pdo_odbc_pool_mode = SQL_CP_ONE_PER_HENV;
+zend_ulong pdo_odbc_pool_on = SQL_CP_OFF;
+zend_ulong pdo_odbc_pool_mode = SQL_CP_ONE_PER_HENV;
#endif
#if defined(DB2CLI_VER) && !defined(PHP_WIN32)
diff --git a/ext/pdo_odbc/php_pdo_odbc.h b/ext/pdo_odbc/php_pdo_odbc.h
index fb0be1b0b9..6686bef368 100644
--- a/ext/pdo_odbc/php_pdo_odbc.h
+++ b/ext/pdo_odbc/php_pdo_odbc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -47,16 +47,6 @@ ZEND_BEGIN_MODULE_GLOBALS(pdo_odbc)
ZEND_END_MODULE_GLOBALS(pdo_odbc)
*/
-/* In every utility function you add that needs to use variables
- in php_pdo_odbc_globals, call TSRMLS_FETCH(); after declaring other
- variables used by that function, or better yet, pass in
- after the last function argument and declare your utility function
- with after the last declared argument. Always refer to
- the globals in your function as PDO_ODBC_G(variable). You are
- encouraged to rename these macros something shorter, see
- examples in any other php module directory.
-*/
-
#ifdef ZTS
#define PDO_ODBC_G(v) TSRMG(pdo_odbc_globals_id, zend_pdo_odbc_globals *, v)
#else
diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h
index 1e51e71264..5306c96822 100644
--- a/ext/pdo_odbc/php_pdo_odbc_int.h
+++ b/ext/pdo_odbc/php_pdo_odbc_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -176,8 +176,8 @@ void pdo_odbc_init_error_table(void);
void pdo_odbc_fini_error_table(void);
#ifdef SQL_ATTR_CONNECTION_POOLING
-extern SQLUINTEGER pdo_odbc_pool_on;
-extern SQLUINTEGER pdo_odbc_pool_mode;
+extern zend_ulong pdo_odbc_pool_on;
+extern zend_ulong pdo_odbc_pool_mode;
#endif
enum {
diff --git a/ext/pdo_odbc/tests/max_columns.phpt b/ext/pdo_odbc/tests/max_columns.phpt
new file mode 100644
index 0000000000..301fa764ca
--- /dev/null
+++ b/ext/pdo_odbc/tests/max_columns.phpt
@@ -0,0 +1,46 @@
+--TEST--
+PDO ODBC varying character with max/no length
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo_odbc')) print 'skip not loaded';
+?>
+--FILE--
+<?php
+require 'ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory('ext/pdo_odbc/tests/common.phpt');
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
+
+if (false === $db->exec('CREATE TABLE TEST (id INT NOT NULL PRIMARY KEY, data varchar(max))')) {
+ if (false === $db->exec('CREATE TABLE TEST (id INT NOT NULL PRIMARY KEY, data longtext)')) {
+ if (false === $db->exec('CREATE TABLE TEST (id INT NOT NULL PRIMARY KEY, data CLOB)')) {
+ die("BORK: don't know how to create a long column here:\n" . implode(", ", $db->errorInfo()));
+ }
+ }
+}
+
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+$sizes = array(32, 64, 128, 253, 254, 255, 256, 257, 258, 512, 1024, 2048, 3998, 3999, 4000);
+
+$db->beginTransaction();
+$insert = $db->prepare('INSERT INTO TEST VALUES (?, ?)');
+foreach ($sizes as $num) {
+ $insert->execute(array($num, str_repeat('i', $num)));
+}
+$insert = null;
+$db->commit();
+
+foreach ($db->query('SELECT id, data from TEST') as $row) {
+ $expect = str_repeat('i', $row[0]);
+ if (strcmp($expect, $row[1])) {
+ echo "Failed on size $row[id]:\n";
+ printf("Expected %d bytes, got %d\n", strlen($expect), strlen($row['data']));
+ echo bin2hex($expect) . "\n";
+ echo bin2hex($row['data']) . "\n";
+ }
+}
+
+echo "Finished\n";
+
+--EXPECT--
+Finished
diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c
index 83d243f072..1661fbe2d6 100644
--- a/ext/pdo_pgsql/pdo_pgsql.c
+++ b/ext/pdo_pgsql/pdo_pgsql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -47,12 +47,10 @@ const zend_function_entry pdo_pgsql_functions[] = {
/* {{{ pdo_sqlite_deps
*/
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_pgsql_deps[] = {
ZEND_MOD_REQUIRED("pdo")
ZEND_MOD_END
};
-#endif
/* }}} */
/* {{{ pdo_pgsql_module_entry */
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 9f75f17cfe..3f92525506 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1152,16 +1152,15 @@ static const zend_function_entry *pdo_pgsql_get_driver_methods(pdo_dbh_t *dbh, i
static int pdo_pgsql_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
{
+ zend_bool bval = zval_get_long(val)? 1 : 0;
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
switch (attr) {
case PDO_ATTR_EMULATE_PREPARES:
- convert_to_long(val);
- H->emulate_prepares = 0 != Z_LVAL_P(val);
+ H->emulate_prepares = bval;
return 1;
case PDO_PGSQL_ATTR_DISABLE_PREPARES:
- convert_to_long(val);
- H->disable_prepares = 0 != Z_LVAL_P(val);
+ H->disable_prepares = bval;
return 1;
default:
return 0;
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 1e211733e7..ee06cfc439 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -36,17 +36,33 @@
#endif
/* from postgresql/src/include/catalog/pg_type.h */
+#define BOOLLABEL "bool"
#define BOOLOID 16
+#define BYTEALABEL "bytea"
#define BYTEAOID 17
-#define INT8OID 20
+#define DATELABEL "date"
+#define DATEOID 1082
+#define INT2LABEL "int2"
#define INT2OID 21
+#define INT4LABEL "int4"
#define INT4OID 23
-#define TEXTOID 25
+#define INT8LABEL "int8"
+#define INT8OID 20
#define OIDOID 26
+#define TEXTLABEL "text"
+#define TEXTOID 25
+#define TIMESTAMPLABEL "timestamp"
+#define TIMESTAMPOID 1114
+#define VARCHARLABEL "varchar"
+#define VARCHAROID 1043
+
+
static int pgsql_stmt_dtor(pdo_stmt_t *stmt)
{
pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data;
+ zend_bool server_obj_usable = IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)])
+ && !(GC_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED);
if (S->result) {
/* free the resource */
@@ -55,11 +71,11 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt)
}
if (S->stmt_name) {
- pdo_pgsql_db_handle *H = S->H;
- char *q = NULL;
- PGresult *res;
+ if (S->is_prepared && server_obj_usable) {
+ pdo_pgsql_db_handle *H = S->H;
+ char *q = NULL;
+ PGresult *res;
- if (S->is_prepared) {
spprintf(&q, 0, "DEALLOCATE %s", S->stmt_name);
res = PQexec(H->server, q);
efree(q);
@@ -92,14 +108,16 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt)
}
if (S->cursor_name) {
- pdo_pgsql_db_handle *H = S->H;
- char *q = NULL;
- PGresult *res;
+ if (server_obj_usable) {
+ pdo_pgsql_db_handle *H = S->H;
+ char *q = NULL;
+ PGresult *res;
- spprintf(&q, 0, "CLOSE %s", S->cursor_name);
- res = PQexec(H->server, q);
- efree(q);
- if (res) PQclear(res);
+ spprintf(&q, 0, "CLOSE %s", S->cursor_name);
+ res = PQexec(H->server, q);
+ efree(q);
+ if (res) PQclear(res);
+ }
efree(S->cursor_name);
S->cursor_name = NULL;
}
@@ -274,6 +292,10 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
break;
case PDO_PARAM_EVT_ALLOC:
+ if (!zend_hash_index_exists(stmt->bound_param_map, param->paramno)) {
+ pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined");
+ return 0;
+ }
case PDO_PARAM_EVT_EXEC_POST:
case PDO_PARAM_EVT_FETCH_PRE:
case PDO_PARAM_EVT_FETCH_POST:
@@ -301,10 +323,12 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
if (param->paramno >= 0) {
zval *parameter;
+ /*
if (param->paramno >= zend_hash_num_elements(stmt->bound_params)) {
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined");
return 0;
}
+ */
if (Z_ISREF(param->parameter)) {
parameter = Z_REFVAL(param->parameter);
@@ -376,10 +400,10 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
/* We need to manually convert to a pg native boolean value */
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_BOOL &&
((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
- SEPARATE_ZVAL(&param->parameter);
+ const char *s = zend_is_true(&param->parameter) ? "t" : "f";
param->param_type = PDO_PARAM_STR;
- convert_to_boolean(&param->parameter);
- ZVAL_STRINGL(&param->parameter, Z_TYPE_P(&param->parameter) == IS_TRUE ? "t" : "f", 1);
+ zval_ptr_dtor(&param->parameter);
+ ZVAL_STRINGL(&param->parameter, s, 1);
}
}
return 1;
@@ -573,12 +597,40 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, zend_ulon
return 1;
}
+static zend_always_inline char * pdo_pgsql_translate_oid_to_table(Oid oid, PGconn *conn)
+{
+ char *table_name = NULL;
+ PGresult *tmp_res;
+ char *querystr = NULL;
+
+ spprintf(&querystr, 0, "SELECT RELNAME FROM PG_CLASS WHERE OID=%d", oid);
+
+ if ((tmp_res = PQexec(conn, querystr)) == NULL || PQresultStatus(tmp_res) != PGRES_TUPLES_OK) {
+ if (tmp_res) {
+ PQclear(tmp_res);
+ }
+ efree(querystr);
+ return 0;
+ }
+ efree(querystr);
+
+ if ((table_name = PQgetvalue(tmp_res, 0, 0)) == NULL) {
+ PQclear(tmp_res);
+ return 0;
+ }
+
+ PQclear(tmp_res);
+ return table_name;
+}
+
static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zval *return_value)
{
pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data;
PGresult *res;
char *q=NULL;
ExecStatusType status;
+ Oid table_oid;
+ char *table_name=NULL;
if (!S->result) {
return FAILURE;
@@ -591,28 +643,52 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zval *r
array_init(return_value);
add_assoc_long(return_value, "pgsql:oid", S->cols[colno].pgsql_type);
- /* Fetch metadata from Postgres system catalogue */
- spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type);
- res = PQexec(S->H->server, q);
- efree(q);
-
- status = PQresultStatus(res);
-
- if (status != PGRES_TUPLES_OK) {
- /* Failed to get system catalogue, but return success
- * with the data we have collected so far
- */
- goto done;
+ table_oid = PQftable(S->result, colno);
+ add_assoc_long(return_value, "pgsql:table_oid", table_oid);
+ table_name = pdo_pgsql_translate_oid_to_table(table_oid, S->H->server);
+ if (table_name) {
+ add_assoc_string(return_value, "table", table_name);
}
- /* We want exactly one row returned */
- if (1 != PQntuples(res)) {
- goto done;
+ switch (S->cols[colno].pgsql_type) {
+ case BOOLOID:
+ add_assoc_string(return_value, "native_type", BOOLLABEL);
+ break;
+ case BYTEAOID:
+ add_assoc_string(return_value, "native_type", BYTEALABEL);
+ break;
+ case INT8OID:
+ add_assoc_string(return_value, "native_type", INT8LABEL);
+ break;
+ case INT2OID:
+ add_assoc_string(return_value, "native_type", INT2LABEL);
+ break;
+ case INT4OID:
+ add_assoc_string(return_value, "native_type", INT4LABEL);
+ break;
+ case TEXTOID:
+ add_assoc_string(return_value, "native_type", TEXTLABEL);
+ break;
+ case VARCHAROID:
+ add_assoc_string(return_value, "native_type", VARCHARLABEL);
+ break;
+ case DATEOID:
+ add_assoc_string(return_value, "native_type", DATELABEL);
+ break;
+ case TIMESTAMPOID:
+ add_assoc_string(return_value, "native_type", TIMESTAMPLABEL);
+ break;
+ default:
+ /* Fetch metadata from Postgres system catalogue */
+ spprintf(&q, 0, "SELECT TYPNAME FROM PG_TYPE WHERE OID=%u", S->cols[colno].pgsql_type);
+ res = PQexec(S->H->server, q);
+ efree(q);
+ status = PQresultStatus(res);
+ if (status == PGRES_TUPLES_OK && 1 == PQntuples(res)) {
+ add_assoc_string(return_value, "native_type", PQgetvalue(res, 0, 0));
+ }
+ PQclear(res);
}
-
- add_assoc_string(return_value, "native_type", PQgetvalue(res, 0, 0));
-done:
- PQclear(res);
return 1;
}
diff --git a/ext/pdo_pgsql/php_pdo_pgsql.h b/ext/pdo_pgsql/php_pdo_pgsql.h
index 359c45213c..4f41e9bf4f 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index 2f33e4efdf..30c2cc2d52 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_pgsql/tests/bug62498-32bit.phpt b/ext/pdo_pgsql/tests/bug62498-32bit.phpt
new file mode 100644
index 0000000000..edcf52048c
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug62498-32bit.phpt
@@ -0,0 +1,221 @@
+--TEST--
+PDO PgSQL Bug #62498 (pdo_pgsql inefficient when getColumnMeta() is used), 32-bit
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+if (PHP_INT_SIZE > 4) die("skip relevant for 32-bit only");
+?>
+--FILE--
+<?php
+echo "Begin test...\n";
+
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$db->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
+
+// create the table
+$db->exec("CREATE TEMPORARY TABLE bugtest_62498 (int2col INT2, int4col INT4, int8col INT8, stringcol VARCHAR(255), boolcol BOOLEAN, datecol DATE, textcol TEXT, tscol TIMESTAMP, byteacol BYTEA)");
+
+// insert some data
+$statement = $db->prepare("INSERT INTO bugtest_62498 (int2col, int4col, int8col, stringcol, boolcol, datecol, textcol, tscol, byteacol) VALUES (:int2val, :int4val, :int8val, :stringval, :boolval, :dateval, :textval, :tsval, :byteaval)");
+$vals = array(
+ "int2val" => "42",
+ "int4val" => "42",
+ "int8val" => "42",
+ "stringval" => "The Answer",
+ "boolval" => true,
+ "dateval" => '2015-12-14',
+ "textval" => "some text",
+ "tsval" => 19990108,
+ "byteaval" => 0,
+);
+$statement->execute($vals);
+
+$select = $db->query('SELECT int2col, int4col, int8col, stringcol, boolcol, datecol, textcol, tscol, byteacol FROM bugtest_62498');
+$meta = [];
+for ($i=0; $i < count($vals); $i++) {
+ $meta[] = $select->getColumnMeta($i);
+}
+var_dump($meta);
+
+?>
+Done
+--EXPECTF--
+Begin test...
+array(9) {
+ [0]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(21)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "int2"
+ ["name"]=>
+ string(7) "int2col"
+ ["len"]=>
+ int(2)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(1)
+ }
+ [1]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(23)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "int4"
+ ["name"]=>
+ string(7) "int4col"
+ ["len"]=>
+ int(4)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(1)
+ }
+ [2]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(20)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "int8"
+ ["name"]=>
+ string(7) "int8col"
+ ["len"]=>
+ int(8)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [3]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(1043)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(7) "varchar"
+ ["name"]=>
+ string(9) "stringcol"
+ ["len"]=>
+ int(-1)
+ ["precision"]=>
+ int(259)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [4]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(16)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "bool"
+ ["name"]=>
+ string(7) "boolcol"
+ ["len"]=>
+ int(1)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(5)
+ }
+ [5]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(1082)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "date"
+ ["name"]=>
+ string(7) "datecol"
+ ["len"]=>
+ int(4)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [6]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(25)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "text"
+ ["name"]=>
+ string(7) "textcol"
+ ["len"]=>
+ int(-1)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [7]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(1114)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(9) "timestamp"
+ ["name"]=>
+ string(5) "tscol"
+ ["len"]=>
+ int(8)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [8]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(17)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(5) "bytea"
+ ["name"]=>
+ string(8) "byteacol"
+ ["len"]=>
+ int(-1)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(3)
+ }
+}
+Done
diff --git a/ext/pdo_pgsql/tests/bug62498.phpt b/ext/pdo_pgsql/tests/bug62498.phpt
new file mode 100644
index 0000000000..53d42fc3fa
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug62498.phpt
@@ -0,0 +1,221 @@
+--TEST--
+PDO PgSQL Bug #62498 (pdo_pgsql inefficient when getColumnMeta() is used), 64-bit
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+if (PHP_INT_SIZE < 8) die("skip valid for 64-bit only");
+?>
+--FILE--
+<?php
+echo "Begin test...\n";
+
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+$db->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
+
+// create the table
+$db->exec("CREATE TEMPORARY TABLE bugtest_62498 (int2col INT2, int4col INT4, int8col INT8, stringcol VARCHAR(255), boolcol BOOLEAN, datecol DATE, textcol TEXT, tscol TIMESTAMP, byteacol BYTEA)");
+
+// insert some data
+$statement = $db->prepare("INSERT INTO bugtest_62498 (int2col, int4col, int8col, stringcol, boolcol, datecol, textcol, tscol, byteacol) VALUES (:int2val, :int4val, :int8val, :stringval, :boolval, :dateval, :textval, :tsval, :byteaval)");
+$vals = array(
+ "int2val" => "42",
+ "int4val" => "42",
+ "int8val" => "42",
+ "stringval" => "The Answer",
+ "boolval" => true,
+ "dateval" => '2015-12-14',
+ "textval" => "some text",
+ "tsval" => 19990108,
+ "byteaval" => 0,
+);
+$statement->execute($vals);
+
+$select = $db->query('SELECT int2col, int4col, int8col, stringcol, boolcol, datecol, textcol, tscol, byteacol FROM bugtest_62498');
+$meta = [];
+for ($i=0; $i < count($vals); $i++) {
+ $meta[] = $select->getColumnMeta($i);
+}
+var_dump($meta);
+
+?>
+Done
+--EXPECTF--
+Begin test...
+array(9) {
+ [0]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(21)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "int2"
+ ["name"]=>
+ string(7) "int2col"
+ ["len"]=>
+ int(2)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(1)
+ }
+ [1]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(23)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "int4"
+ ["name"]=>
+ string(7) "int4col"
+ ["len"]=>
+ int(4)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(1)
+ }
+ [2]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(20)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "int8"
+ ["name"]=>
+ string(7) "int8col"
+ ["len"]=>
+ int(8)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(1)
+ }
+ [3]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(1043)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(7) "varchar"
+ ["name"]=>
+ string(9) "stringcol"
+ ["len"]=>
+ int(-1)
+ ["precision"]=>
+ int(259)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [4]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(16)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "bool"
+ ["name"]=>
+ string(7) "boolcol"
+ ["len"]=>
+ int(1)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(5)
+ }
+ [5]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(1082)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "date"
+ ["name"]=>
+ string(7) "datecol"
+ ["len"]=>
+ int(4)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [6]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(25)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(4) "text"
+ ["name"]=>
+ string(7) "textcol"
+ ["len"]=>
+ int(-1)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [7]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(1114)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(9) "timestamp"
+ ["name"]=>
+ string(5) "tscol"
+ ["len"]=>
+ int(8)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(2)
+ }
+ [8]=>
+ array(8) {
+ ["pgsql:oid"]=>
+ int(17)
+ ["pgsql:table_oid"]=>
+ int(%d)
+ ["table"]=>
+ string(13) "bugtest_62498"
+ ["native_type"]=>
+ string(5) "bytea"
+ ["name"]=>
+ string(8) "byteacol"
+ ["len"]=>
+ int(-1)
+ ["precision"]=>
+ int(-1)
+ ["pdo_type"]=>
+ int(3)
+ }
+}
+Done
diff --git a/ext/pdo_pgsql/tests/bug70861.phpt b/ext/pdo_pgsql/tests/bug70861.phpt
new file mode 100644
index 0000000000..7edebba1e6
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug70861.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #70861 Segmentation fault in pdo_parse_params() during Drupal 8 test suite
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
+
+try {
+ @$db->query("SET bytea_output = 'escape'");
+} catch (Exception $e) {
+}
+
+$db->query('DROP TABLE IF EXISTS test_blob_crash CASCADE');
+$db->query('CREATE TABLE test_blob_crash (id SERIAL NOT NULL, blob1 BYTEA)');
+
+class HelloWrapper {
+ public function stream_open() { return true; }
+ public function stream_eof() { return true; }
+ public function stream_read() { return NULL; }
+ public function stream_stat() { return array(); }
+}
+stream_wrapper_register("hello", "HelloWrapper");
+
+$f = fopen("hello://there", "r");
+
+$stmt = $db->prepare("INSERT INTO test_one_blob (blob1) VALUES (:foo)", array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
+
+$stmt->bindparam(':foo', $f, PDO::PARAM_LOB);
+$stmt->execute();
+
+fclose($f);
+
+?>
++++DONE+++
+--EXPECTF--
+%a
++++DONE+++
diff --git a/ext/pdo_pgsql/tests/bug71573.phpt b/ext/pdo_pgsql/tests/bug71573.phpt
new file mode 100644
index 0000000000..d3046bff6b
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug71573.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #71573 (Segfault (core dumped) if paramno beyond bound)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+require_once dirname(__FILE__) . '/config.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+require_once dirname(__FILE__) . '/config.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$statement = $db->prepare('select ?');
+$statement->execute([ 'test', 'test', 'test' ]);
+
+?>
+--EXPECTF--
+Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in %sbug71573.php on line %d
diff --git a/ext/pdo_pgsql/tests/bug72294.phpt b/ext/pdo_pgsql/tests/bug72294.phpt
new file mode 100644
index 0000000000..d6bb661733
--- /dev/null
+++ b/ext/pdo_pgsql/tests/bug72294.phpt
@@ -0,0 +1,149 @@
+--TEST--
+Bug #72294 Segmentation fault/invalid pointer in connection with pgsql_stmt_dtor
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+
+function handleError($errno, $errstr, $errfile, $errline)
+{
+ if (!($errno & error_reporting())) {
+ return false;
+ }
+
+ throw new RuntimeException( $errstr, $errno );
+}
+
+abstract class PHPUnit_Framework_TestCase
+{
+ private $name = null;
+ private $result;
+
+ public function run(PHPUnit_Framework_TestResult $result = null)
+ {
+ $result->run($this);
+ }
+
+ public function runBare()
+ {
+ $class = new ReflectionClass($this);
+ $method = $class->getMethod($this->name);
+ $method->invoke($this);
+
+ if( $x ) {
+ }
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+}
+
+class PHPUnit_Framework_TestFailure
+{
+ private $testName;
+
+ protected $failedTest;
+
+ protected $thrownException;
+
+ public function __construct( $failedTest, $t)
+ {
+ if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
+ $this->testName = $failedTest->toString();
+ } else {
+ $this->testName = get_class($failedTest);
+ }
+
+ $this->thrownException = $t;
+ }
+}
+
+class PHPUnit_Framework_TestResult
+{
+ public function run( $test)
+ {
+ $error = false;
+
+ $oldErrorHandler = set_error_handler(
+ 'handleError',
+ E_ALL | E_STRICT
+ );
+
+ try {
+ $test->runBare();
+ } catch (RuntimeException $e) {
+ $error = true;
+ }
+
+ restore_error_handler();
+
+ if ($error === true) {
+ $this->errors[] = new PHPUnit_Framework_TestFailure($test, $e);
+ }
+ }
+}
+
+$result = new PHPUnit_Framework_TestResult();
+
+class PreparedStatementCache
+{
+ private $cached_statements = array();
+
+ public function prepare( $pdo, $sql )
+ {
+ //return $pdo->prepare( $sql );
+ $this->cached_statements[$sql] = $pdo->prepare( $sql );
+
+ return $this->cached_statements[$sql];
+ }
+}
+
+class DatabaseTest extends PHPUnit_Framework_TestCase
+{
+ public function testIt()
+ {
+ $pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+ $prepared_statement_cache = new PreparedStatementCache( $pdo );
+
+ for( $i = 1; $i <= 300; ++$i ) {
+ $statement = $prepared_statement_cache->prepare( $pdo, <<<SQL
+ SELECT $i;
+SQL
+ );
+ $statement->execute();
+ }
+ }
+
+ public function test_construct()
+ {
+ $pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+ $pdo->exec( 'CREATE TEMPORARY TABLE temp_table ( test_column INT NOT NULL );' );
+
+ $this->cache = new PreparedStatementCache( $pdo );
+
+ $statement = $this->cache->prepare( $pdo, 'SELECT * FROM temp_table WHERE test_column > 0' );
+ $statement->execute();
+ }
+}
+
+$test = new DatabaseTest();
+$test->setName( 'testIt' );
+$test->run( $result );
+$test->setName( 'test_construct' );
+$test->run( $result );
+
+?>
+==NOCRASH==
+--EXPECT--
+==NOCRASH==
+
diff --git a/ext/pdo_pgsql/tests/common.phpt b/ext/pdo_pgsql/tests/common.phpt
index 8a21371bf9..e764b39839 100644
--- a/ext/pdo_pgsql/tests/common.phpt
+++ b/ext/pdo_pgsql/tests/common.phpt
@@ -8,7 +8,7 @@ if (!extension_loaded('pdo_pgsql')) print 'skip'; ?>
# Also update config.inc if you make changes here...
$config = array(
- 'TESTS' => 'ext/pdo/tests'
+ 'TESTS' => __DIR__ . '/ext/pdo/tests'
);
if (false !== getenv('PDO_PGSQL_TEST_DSN')) {
diff --git a/ext/pdo_pgsql/tests/copy_from.phpt b/ext/pdo_pgsql/tests/copy_from.phpt
index de1140dfea..31d7752174 100644
--- a/ext/pdo_pgsql/tests/copy_from.phpt
+++ b/ext/pdo_pgsql/tests/copy_from.phpt
@@ -124,7 +124,7 @@ foreach (array($filename, $filenameWithDifferentNullValues, $filenameWithDiffere
@unlink($f);
}
?>
---EXPECT--
+--EXPECTF--
Preparing test file and array for CopyFrom tests
Testing pgsqlCopyFromArray() with default parameters
bool(true)
@@ -259,7 +259,7 @@ array(6) {
NULL
}
Testing pgsqlCopyFromArray() with error
-Exception: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "test_error" does not exist
+Exception: SQLSTATE[42P01]: Undefined table: 7 %s: %s "test_error" %s
Testing pgsqlCopyFromFile() with default parameters
bool(true)
array(6) {
@@ -393,7 +393,7 @@ array(6) {
NULL
}
Testing pgsqlCopyFromFile() with error
-Exception: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "test_error" does not exist
+Exception: SQLSTATE[42P01]: Undefined table: 7 %s: %s "test_error" %s
Testing pgsqlCopyFromFile() with non existing file
Exception: SQLSTATE[HY000]: General error: 7 Unable to open the file
diff --git a/ext/pdo_pgsql/tests/copy_to.phpt b/ext/pdo_pgsql/tests/copy_to.phpt
index 7bc46c6e0b..93aab16679 100644
--- a/ext/pdo_pgsql/tests/copy_to.phpt
+++ b/ext/pdo_pgsql/tests/copy_to.phpt
@@ -77,7 +77,7 @@ if(isset($filename)) {
@unlink($filename);
}
?>
---EXPECT--
+--EXPECTF--
Preparing test table for CopyTo tests
Testing pgsqlCopyToArray() with default parameters
array(3) {
@@ -116,7 +116,7 @@ array(3) {
"
}
Testing pgsqlCopyToArray() with error
-Exception: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "test_error" does not exist
+Exception: SQLSTATE[42P01]: Undefined table: 7 %s: %s "test_error" %s
Testing pgsqlCopyToFile() with default parameters
bool(true)
0 test insert 0 \N
@@ -133,7 +133,7 @@ bool(true)
1;NULL
2;NULL
Testing pgsqlCopyToFile() with error
-Exception: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "test_error" does not exist
+Exception: SQLSTATE[42P01]: Undefined table: 7 %s: %s "test_error" %s
Testing pgsqlCopyToFile() to unwritable file
Exception: SQLSTATE[HY000]: General error: 7 Unable to open the file for writing
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index 689a71a0db..ca077092a3 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
+++ b/ext/pdo_sqlite/pdo_sqlite.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,12 +39,10 @@ const zend_function_entry pdo_sqlite_functions[] = {
/* {{{ pdo_sqlite_deps
*/
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep pdo_sqlite_deps[] = {
ZEND_MOD_REQUIRED("pdo")
ZEND_MOD_END
};
-#endif
/* }}} */
/* {{{ pdo_sqlite_module_entry
diff --git a/ext/pdo_sqlite/php_pdo_sqlite.h b/ext/pdo_sqlite/php_pdo_sqlite.h
index ea7c5a601f..5d924f800b 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -48,16 +48,6 @@ ZEND_BEGIN_MODULE_GLOBALS(pdo_sqlite)
ZEND_END_MODULE_GLOBALS(pdo_sqlite)
*/
-/* In every utility function you add that needs to use variables
- in php_pdo_sqlite_globals, call TSRMLS_FETCH(); after declaring other
- variables used by that function, or better yet, pass in
- after the last function argument and declare your utility function
- with after the last declared argument. Always refer to
- the globals in your function as PDO_SQLITE_G(variable). You are
- encouraged to rename these macros something shorter, see
- examples in any other php module directory.
-*/
-
#ifdef ZTS
#define PDO_SQLITE_G(v) TSRMG(pdo_sqlite_globals_id, zend_pdo_sqlite_globals *, v)
#else
diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h
index 76ce0771a9..e761b35236 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite_int.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 6dff114c01..4e729aab0e 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -301,8 +301,7 @@ static int pdo_sqlite_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
switch (attr) {
case PDO_ATTR_TIMEOUT:
- convert_to_long(val);
- sqlite3_busy_timeout(H->db, Z_LVAL_P(val) * 1000);
+ sqlite3_busy_timeout(H->db, zval_get_long(val) * 1000);
return 1;
}
return 0;
@@ -326,9 +325,7 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
fake_argc = argc + is_agg;
fc->fci.size = sizeof(fc->fci);
- fc->fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
- fc->fci.symbol_table = NULL;
fc->fci.object = NULL;
fc->fci.retval = &retval;
fc->fci.param_count = fake_argc;
@@ -477,9 +474,7 @@ static int php_sqlite3_collation_callback(void *context,
struct pdo_sqlite_collation *collation = (struct pdo_sqlite_collation*) context;
collation->fc.fci.size = sizeof(collation->fc.fci);
- collation->fc.fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&collation->fc.fci.function_name, &collation->callback);
- collation->fc.fci.symbol_table = NULL;
collation->fc.fci.object = NULL;
collation->fc.fci.retval = &retval;
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index 53d12a719d..5d35897500 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -138,11 +138,12 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
parameter = &param->parameter;
}
if (Z_TYPE_P(parameter) == IS_RESOURCE) {
- php_stream *stm;
+ php_stream *stm = NULL;
php_stream_from_zval_no_verify(stm, parameter);
if (stm) {
+ zend_string *mem = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0);
zval_ptr_dtor(parameter);
- ZVAL_STR(parameter, php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0));
+ ZVAL_STR(parameter, mem ? mem : ZSTR_EMPTY_ALLOC());
} else {
pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource");
return 0;
@@ -233,7 +234,7 @@ static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt,
static int pdo_sqlite_stmt_describe(pdo_stmt_t *stmt, int colno)
{
pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data;
- char *str;
+ const char *str;
if(colno >= sqlite3_column_count(S->stmt)) {
/* error invalid column */
diff --git a/ext/pdo_sqlite/tests/bug70221.phpt b/ext/pdo_sqlite/tests/bug70221.phpt
new file mode 100644
index 0000000000..2d1aea0e8b
--- /dev/null
+++ b/ext/pdo_sqlite/tests/bug70221.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70221 (persistent sqlite connection + custom function segfaults)
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
+?>
+--FILE--
+<?php
+$dbfile = __DIR__ . '/test.sqlite';
+$db = new PDO('sqlite:'.$dbfile, null, null, array(PDO::ATTR_PERSISTENT => true));
+function _test() { return 42; }
+$db->sqliteCreateFunction('test', '_test', 0);
+print("Everything is fine, no exceptions here\n");
+unset($db);
+@unlink($dbfile);
+?>
+--EXPECT--
+Everything is fine, no exceptions here
diff --git a/ext/pdo_sqlite/tests/bug70862.phpt b/ext/pdo_sqlite/tests/bug70862.phpt
new file mode 100644
index 0000000000..3df1e4f2bd
--- /dev/null
+++ b/ext/pdo_sqlite/tests/bug70862.phpt
@@ -0,0 +1,36 @@
+--TEST--
+PDO_sqlite: Testing sqliteCreateCollation()
+--SKIPIF--
+<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
+--FILE--
+<?php
+
+$db = new pdo('sqlite::memory:');
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+$db->exec('CREATE TABLE test(field BLOB)');
+
+$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
+$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
+
+class HelloWrapper {
+ public function stream_open() { return true; }
+ public function stream_eof() { return true; }
+ public function stream_read() { return NULL; }
+ public function stream_stat() { return array(); }
+}
+stream_wrapper_register("hello", "HelloWrapper");
+
+$f = fopen("hello://there", "r");
+
+$stmt = $db->prepare('INSERT INTO test(field) VALUES (:para)');
+$stmt->bindParam(":para", $f, PDO::PARAM_LOB);
+$stmt->execute();
+
+var_dump($f);
+
+?>
++++DONE+++
+--EXPECTF--
+string(0) ""
++++DONE+++
diff --git a/ext/pdo_sqlite/tests/common.phpt b/ext/pdo_sqlite/tests/common.phpt
index 65ea0c96f4..da28d91950 100644
--- a/ext/pdo_sqlite/tests/common.phpt
+++ b/ext/pdo_sqlite/tests/common.phpt
@@ -8,5 +8,5 @@ return array(
'ENV' => array(
'PDOTEST_DSN' => 'sqlite::memory:'
),
- 'TESTS' => 'ext/pdo/tests'
+ 'TESTS' => __DIR__ . '/ext/pdo/tests'
);
diff --git a/ext/pgsql/config.w32 b/ext/pgsql/config.w32
index 5775dfa023..c94cb55796 100644
--- a/ext/pgsql/config.w32
+++ b/ext/pgsql/config.w32
@@ -8,7 +8,7 @@ if (PHP_PGSQL != "no") {
CHECK_HEADER_ADD_INCLUDE("libpq-fe.h", "CFLAGS_PGSQL", PHP_PGSQL + "\\include;" + PHP_PHP_BUILD + "\\include\\pgsql;" + PHP_PHP_BUILD + "\\include\\libpq;" + PHP_PGSQL)) {
EXTENSION("pgsql", "pgsql.c", PHP_PGSQL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE('HAVE_PGSQL', 1, 'Have PostgreSQL library');
- ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D HAVE_PQEXECPREPARED /D HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE /D HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND /D HAVE_PQGETCOPYDATA /D HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA /D HAVE_PQFTABLE /D HAVE_PQESCAPE_CONN /D HAVE_PQESCAPE_BYTEA_CONN /D HAVE_PQFREEMEM /D HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT /D HAVE_PQPROTOCOLVERSION /D HAVE_PG_LO_CREATE /D HAVE_PG_LO_IMPORT_WITH_OID /D HAVE_PG_LO_TRUNCATE /D HAVE_PG_LO64 /D HAVE_PQESCAPELITERAL /D HAVE_PQOIDVALUE");
+ ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D HAVE_PQEXECPREPARED /D HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE /D HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND /D HAVE_PQGETCOPYDATA /D HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA /D HAVE_PQFTABLE /D HAVE_PQESCAPE_CONN /D HAVE_PQESCAPE_BYTEA_CONN /D HAVE_PQFREEMEM /D HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT /D HAVE_PQPROTOCOLVERSION /D HAVE_PG_LO_CREATE /D HAVE_PG_LO_IMPORT_WITH_OID /D HAVE_PG_LO_TRUNCATE" + (X64 ? " /D HAVE_PG_LO64" : "") + " /D HAVE_PQESCAPELITERAL /D HAVE_PQOIDVALUE");
} else {
WARNING("pgsql not enabled; libraries and headers not found");
}
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 9282d48364..16a84ffcd8 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -56,9 +56,13 @@
#define InvalidOid ((Oid) 0)
#endif
-#define PGSQL_ASSOC 1<<0
-#define PGSQL_NUM 1<<1
-#define PGSQL_BOTH (PGSQL_ASSOC|PGSQL_NUM)
+#define PGSQL_ASSOC 1<<0
+#define PGSQL_NUM 1<<1
+#define PGSQL_BOTH (PGSQL_ASSOC|PGSQL_NUM)
+
+#define PGSQL_NOTICE_LAST 1 /* Get the last notice */
+#define PGSQL_NOTICE_ALL 2 /* Get all notices */
+#define PGSQL_NOTICE_CLEAR 3 /* Remove notices */
#define PGSQL_STATUS_LONG 1
#define PGSQL_STATUS_STRING 2
@@ -208,6 +212,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_last_notice, 0, 0, 1)
ZEND_ARG_INFO(0, connection)
+ ZEND_ARG_INFO(0, option)
ZEND_END_ARG_INFO()
#ifdef HAVE_PQFTABLE
@@ -276,6 +281,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_fetch_all, 0, 0, 1)
ZEND_ARG_INFO(0, result)
+ ZEND_ARG_INFO(0, result_type)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_fetch_all_columns, 0, 0, 1)
@@ -582,6 +588,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_select, 0, 0, 3)
ZEND_ARG_INFO(0, table)
ZEND_ARG_INFO(0, ids)
ZEND_ARG_INFO(0, options)
+ ZEND_ARG_INFO(0, result_type)
ZEND_END_ARG_INFO()
/* }}} */
@@ -773,7 +780,7 @@ zend_module_entry pgsql_module_entry = {
#ifdef COMPILE_DL_PGSQL
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(pgsql)
#endif
@@ -961,29 +968,24 @@ static void _close_pgsql_plink(zend_resource *rsrc)
*/
static void _php_pgsql_notice_handler(void *resource_id, const char *message)
{
- php_pgsql_notice *notice;
+ zval *notices;
+ zval tmp;
+ char *trimed_message;
+ size_t trimed_message_len;
if (! PGG(ignore_notices)) {
- notice = (php_pgsql_notice *)emalloc(sizeof(php_pgsql_notice));
- notice->message = _php_pgsql_trim_message(message, &notice->len);
+ notices = zend_hash_index_find(&PGG(notices), (zend_ulong)resource_id);
+ if (!notices) {
+ array_init(&tmp);
+ notices = &tmp;
+ zend_hash_index_update(&PGG(notices), (zend_ulong)resource_id, notices);
+ }
+ trimed_message = _php_pgsql_trim_message(message, &trimed_message_len);
if (PGG(log_notices)) {
- php_error_docref(NULL, E_NOTICE, "%s", notice->message);
+ php_error_docref(NULL, E_NOTICE, "%s", trimed_message);
}
- zend_hash_index_update_ptr(&PGG(notices), (zend_ulong)resource_id, notice);
- }
-}
-/* }}} */
-
-#define PHP_PGSQL_NOTICE_PTR_DTOR _php_pgsql_notice_ptr_dtor
-
-/* {{{ _php_pgsql_notice_dtor
- */
-static void _php_pgsql_notice_ptr_dtor(zval *el)
-{
- php_pgsql_notice *notice = (php_pgsql_notice *)Z_PTR_P(el);
- if (notice) {
- efree(notice->message);
- efree(notice);
+ add_next_index_stringl(notices, trimed_message, trimed_message_len);
+ efree(trimed_message);
}
}
/* }}} */
@@ -1096,7 +1098,7 @@ static PHP_GINIT_FUNCTION(pgsql)
#endif
memset(pgsql_globals, 0, sizeof(zend_pgsql_globals));
/* Initilize notice message hash at MINIT only */
- zend_hash_init_ex(&pgsql_globals->notices, 0, NULL, PHP_PGSQL_NOTICE_PTR_DTOR, 1, 0);
+ zend_hash_init_ex(&pgsql_globals->notices, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
}
/* }}} */
@@ -1123,6 +1125,10 @@ PHP_MINIT_FUNCTION(pgsql)
REGISTER_LONG_CONSTANT("PGSQL_ASSOC", PGSQL_ASSOC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PGSQL_NUM", PGSQL_NUM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PGSQL_BOTH", PGSQL_BOTH, CONST_CS | CONST_PERSISTENT);
+ /* For pg_last_notice() */
+ REGISTER_LONG_CONSTANT("PGSQL_NOTICE_LAST", PGSQL_NOTICE_LAST, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("PGSQL_NOTICE_ALL", PGSQL_NOTICE_ALL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("PGSQL_NOTICE_CLEAR", PGSQL_NOTICE_CLEAR, CONST_CS | CONST_PERSISTENT);
/* For pg_connection_status() */
REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_BAD", CONNECTION_BAD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_OK", CONNECTION_OK, CONST_CS | CONST_PERSISTENT);
@@ -1252,7 +1258,7 @@ PHP_MINFO_FUNCTION(pgsql)
#else
php_info_print_table_row(2, "Multibyte character support", "disabled");
#endif
-#ifdef USE_SSL
+#if defined(USE_SSL) || defined(USE_OPENSSL)
php_info_print_table_row(2, "SSL support", "enabled");
#else
php_info_print_table_row(2, "SSL support", "disabled");
@@ -1300,7 +1306,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
smart_str_append_long(&str, Z_LVAL(args[1]) ^ PGSQL_CONNECT_FORCE_NEW);
}
}
- convert_to_string_ex(&args[i]);
+ ZVAL_STR(&args[i], zval_get_string(&args[i]));
smart_str_appendc(&str, '_');
smart_str_appendl(&str, Z_STRVAL(args[i]), Z_STRLEN(args[i]));
}
@@ -1327,7 +1333,6 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
break;
}
}
- efree(args);
if (persistent && PGG(allow_persistent)) {
zend_resource *le;
@@ -1371,7 +1376,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
PGG(num_persistent)++;
} else { /* we do */
if (le->type != le_plink) {
- RETURN_FALSE;
+ goto err;
}
/* ensure that the link did not die */
if (PGG(auto_reset_persistent) & 1) {
@@ -1422,7 +1427,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
zend_resource *link;
if (index_ptr->type != le_index_ptr) {
- RETURN_FALSE;
+ goto err;
}
link = (zend_resource *)index_ptr->ptr;
@@ -1488,10 +1493,18 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
php_pgsql_set_default_link(Z_RES_P(return_value));
cleanup:
+ for (i = 0; i < ZEND_NUM_ARGS(); i++) {
+ zval_dtor(&args[i]);
+ }
+ efree(args);
smart_str_free(&str);
return;
err:
+ for (i = 0; i < ZEND_NUM_ARGS(); i++) {
+ zval_dtor(&args[i]);
+ }
+ efree(args);
smart_str_free(&str);
RETURN_FALSE;
}
@@ -1968,7 +1981,7 @@ PHP_FUNCTION(pg_query_params)
params = (char **)safe_emalloc(sizeof(char *), num_params, 0);
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(pv_param_arr), tmp) {
-
+ ZVAL_DEREF(tmp);
if (Z_TYPE_P(tmp) == IS_NULL) {
params[i] = NULL;
} else {
@@ -2306,15 +2319,16 @@ PHP_FUNCTION(pg_affected_rows)
/* }}} */
#endif
-/* {{{ proto string pg_last_notice(resource connection)
+/* {{{ proto mixed pg_last_notice(resource connection [, long option])
Returns the last notice set by the backend */
PHP_FUNCTION(pg_last_notice)
{
zval *pgsql_link = NULL;
+ zval *notice, *notices;
PGconn *pg_link;
- php_pgsql_notice *notice;
+ zend_long option = PGSQL_NOTICE_LAST;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &pgsql_link, &option) == FAILURE) {
return;
}
@@ -2323,10 +2337,38 @@ PHP_FUNCTION(pg_last_notice)
RETURN_FALSE;
}
- if ((notice = zend_hash_index_find_ptr(&PGG(notices), (zend_ulong)Z_RES_HANDLE_P(pgsql_link))) == NULL) {
- RETURN_FALSE;
+ notices = zend_hash_index_find(&PGG(notices), (zend_ulong)Z_RES_HANDLE_P(pgsql_link));
+ switch (option) {
+ case PGSQL_NOTICE_LAST:
+ if (notices) {
+ zend_hash_internal_pointer_end(Z_ARRVAL_P(notices));
+ if ((notice = zend_hash_get_current_data(Z_ARRVAL_P(notices))) == NULL) {
+ RETURN_EMPTY_STRING();
+ }
+ RETURN_ZVAL(notice, 1, 0);
+ } else {
+ RETURN_EMPTY_STRING();
+ }
+ break;
+ case PGSQL_NOTICE_ALL:
+ if (notices) {
+ RETURN_ZVAL(notices, 1, 0);
+ } else {
+ array_init(return_value);
+ return;
+ }
+ break;
+ case PGSQL_NOTICE_CLEAR:
+ if (notices) {
+ zend_hash_clean(&PGG(notices));
+ }
+ RETURN_TRUE;
+ break;
+ default:
+ php_error_docref(NULL, E_WARNING,
+ "Invalid option specified (" ZEND_LONG_FMT ")", option);
}
- RETURN_STRINGL(notice->message, notice->len);
+ RETURN_FALSE;
}
/* }}} */
@@ -2368,7 +2410,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
continue;
}
- ZSTR_LEN(str.s) = 0;
+ smart_str_free(&str);
smart_str_appends(&str, "pgsql_oid_");
smart_str_appends(&str, tmp_oid);
smart_str_0(&str);
@@ -2781,9 +2823,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
ZVAL_COPY_VALUE(&dataset, return_value);
object_and_properties_init(return_value, ce, NULL);
if (!ce->default_properties_count && !ce->__set) {
- ALLOC_HASHTABLE(Z_OBJ_P(return_value)->properties);
- *Z_OBJ_P(return_value)->properties = *Z_ARRVAL(dataset);
- efree(Z_ARR(dataset));
+ Z_OBJ_P(return_value)->properties = Z_ARR(dataset);
} else {
zend_merge_properties(return_value, Z_ARRVAL(dataset));
zval_ptr_dtor(&dataset);
@@ -2791,9 +2831,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
if (ce->constructor) {
fci.size = sizeof(fci);
- fci.function_table = &ce->function_table;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = Z_OBJ_P(return_value);
fci.retval = &retval;
fci.params = NULL;
@@ -2815,7 +2853,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
fcc.initialized = 1;
fcc.function_handler = ce->constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
@@ -2872,25 +2910,31 @@ PHP_FUNCTION(pg_fetch_object)
}
/* }}} */
-/* {{{ proto array pg_fetch_all(resource result)
+/* {{{ proto array pg_fetch_all(resource result [, int result_type])
Fetch all rows into array */
PHP_FUNCTION(pg_fetch_all)
{
zval *result;
+ long result_type = PGSQL_ASSOC;
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &result, &result_type) == FAILURE) {
return;
}
+ if (!(result_type & PGSQL_BOTH)) {
+ php_error_docref(NULL, E_WARNING, "Invalid result type");
+ RETURN_FALSE;
+ }
+
if ((pg_result = (pgsql_result_handle *)zend_fetch_resource(Z_RES_P(result), "PostgreSQL result", le_result)) == NULL) {
RETURN_FALSE;
}
pgsql_result = pg_result->result;
array_init(return_value);
- if (php_pgsql_result2array(pgsql_result, return_value) == FAILURE) {
+ if (php_pgsql_result2array(pgsql_result, return_value, result_type) == FAILURE) {
zval_dtor(return_value);
RETURN_FALSE;
}
@@ -3035,7 +3079,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
RETVAL_LONG(PQgetlength(pgsql_result, pgsql_row, field_offset));
break;
case PHP_PG_DATA_ISNULL:
- RETVAL_LONG(PQgetisnull(pgsql_result, pgsql_row, field_offset))
+ RETVAL_LONG(PQgetisnull(pgsql_result, pgsql_row, field_offset));
break;
}
}
@@ -3208,8 +3252,10 @@ PHP_FUNCTION(pg_lo_create)
if (pgsql_link == NULL) {
link = FETCH_DEFAULT_LINK();
CHECK_DEFAULT_LINK(link);
- } else {
+ } else if ((Z_TYPE_P(pgsql_link) == IS_RESOURCE)) {
link = Z_RES_P(pgsql_link);
+ } else {
+ link = NULL;
}
if ((pgsql = (PGconn *)zend_fetch_resource2(link, "PostgreSQL link", le_link, le_plink)) == NULL) {
@@ -5506,7 +5552,7 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z
tmp_name = php_strtok_r(src, ".", &tmp_name2);
if (!tmp_name) {
efree(src);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "The table name must be specified");
+ php_error_docref(NULL, E_WARNING, "The table name must be specified");
return FAILURE;
}
if (!tmp_name2 || !*tmp_name2) {
@@ -5803,7 +5849,6 @@ static int php_pgsql_add_quotes(zval *src, zend_bool should_free)
PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, zend_ulong opt)
{
zend_string *field = NULL;
- zend_ulong num_idx = -1;
zval meta, *def, *type, *not_null, *has_default, *is_enum, *val, new_val;
int err = 0, skip_field;
php_pgsql_data_type data_type;
@@ -5824,7 +5869,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
return FAILURE;
}
- ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(values), num_idx, field, val) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(values), field, val) {
skip_field = 0;
ZVAL_NULL(&new_val);
@@ -6130,8 +6175,11 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
ZVAL_STRINGL(&new_val, "NULL", sizeof("NULL")-1);
}
else {
- /* better regex? IPV6 and IPV4 */
- if (php_pgsql_convert_match(Z_STRVAL_P(val), Z_STRLEN_P(val), "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$", 0) == FAILURE) {
+ /* The inet type holds an IPv4 or IPv6 host address, and optionally its subnet, all in one field. See more in the doc.
+ The regex might still be not perfect, but catches the most of IP variants. We might decide to remove the regex
+ at all though and let the server side to handle it.*/
+ if (php_pgsql_convert_match(Z_STRVAL_P(val), Z_STRLEN_P(val), "^((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])(\\/[0-9]{1,3})?$", 0) == FAILURE
+ && php_pgsql_convert_match(Z_STRVAL_P(val), Z_STRLEN_P(val), "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\\/[0-9]{1,3})?$", 0) == FAILURE) {
err = 1;
}
else {
@@ -6150,7 +6198,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
}
PGSQL_CONV_CHECK_IGNORE();
if (err) {
- php_error_docref(NULL, E_NOTICE, "Expects NULL or string for '%s' (%s)", Z_STRVAL_P(type), ZSTR_VAL(field));
+ php_error_docref(NULL, E_NOTICE, "Expects NULL or IPv4 or IPv6 address string for '%s' (%s)", Z_STRVAL_P(type), ZSTR_VAL(field));
}
break;
@@ -6165,7 +6213,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
ZVAL_STRINGL(&new_val, "NOW()", sizeof("NOW()")-1);
} else {
/* better regex? */
- if (php_pgsql_convert_match(Z_STRVAL_P(val), Z_STRLEN_P(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,4}(:[0-9]{1,2}){0,1}|[-a-zA-Z_/+]{1,50})){0,1})){0,1}$", 1) == FAILURE) {
+ if (php_pgsql_convert_match(Z_STRVAL_P(val), Z_STRLEN_P(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})(([ \\t]+|T)(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,4}(:[0-9]{1,2}){0,1}|[-a-zA-Z_/+]{1,50})){0,1})){0,1}$", 1) == FAILURE) {
err = 1;
} else {
ZVAL_STRING(&new_val, Z_STRVAL_P(val));
@@ -6550,7 +6598,6 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var
char *tmp;
smart_str querystr = {0};
int ret = FAILURE;
- zend_ulong num_idx;
zend_string *fld;
assert(pg_link != NULL);
@@ -6579,7 +6626,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var
build_tablename(&querystr, pg_link, table);
smart_str_appends(&querystr, " (");
- ZEND_HASH_FOREACH_KEY(Z_ARRVAL_P(var_array), num_idx, fld) {
+ ZEND_HASH_FOREACH_STR_KEY(Z_ARRVAL_P(var_array), fld) {
if (fld == NULL) {
php_error_docref(NULL, E_NOTICE, "Expects associative array for values to be inserted");
goto cleanup;
@@ -6748,11 +6795,10 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr,
{
char *tmp;
char buf[256];
- zend_ulong num_idx;
zend_string *fld;
zval *val;
- ZEND_HASH_FOREACH_KEY_VAL(ht, num_idx, fld, val) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(ht, fld, val) {
if (fld == NULL) {
php_error_docref(NULL, E_NOTICE, "Expects associative array for values to be inserted");
return -1;
@@ -7007,7 +7053,7 @@ PHP_FUNCTION(pg_delete)
/* {{{ php_pgsql_result2array
*/
-PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array)
+PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long result_type)
{
zval row;
char *field_name;
@@ -7022,16 +7068,24 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array)
for (pg_row = 0; pg_row < pg_numrows; pg_row++) {
array_init(&row);
for (i = 0, num_fields = PQnfields(pg_result); i < num_fields; i++) {
+ field_name = PQfname(pg_result, i);
if (PQgetisnull(pg_result, pg_row, i)) {
- field_name = PQfname(pg_result, i);
- add_assoc_null(&row, field_name);
+ if (result_type & PGSQL_ASSOC) {
+ add_assoc_null(&row, field_name);
+ }
+ if (result_type & PGSQL_NUM) {
+ add_next_index_null(&row);
+ }
} else {
char *element = PQgetvalue(pg_result, pg_row, i);
if (element) {
const size_t element_len = strlen(element);
-
- field_name = PQfname(pg_result, i);
- add_assoc_stringl(&row, field_name, element, element_len);
+ if (result_type & PGSQL_ASSOC) {
+ add_assoc_stringl(&row, field_name, element, element_len);
+ }
+ if (result_type & PGSQL_NUM) {
+ add_next_index_stringl(&row, element, element_len);
+ }
}
}
}
@@ -7043,7 +7097,7 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array)
/* {{{ php_pgsql_select
*/
-PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids_array, zval *ret_array, zend_ulong opt, zend_string **sql)
+ PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids_array, zval *ret_array, zend_ulong opt, long result_type, zend_string **sql)
{
zval ids_converted;
smart_str querystr = {0};
@@ -7081,7 +7135,7 @@ PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids
pg_result = PQexec(pg_link, ZSTR_VAL(querystr.s));
if (PQresultStatus(pg_result) == PGRES_TUPLES_OK) {
- ret = php_pgsql_result2array(pg_result, ret_array);
+ ret = php_pgsql_result2array(pg_result, ret_array, result_type);
} else {
php_error_docref(NULL, E_NOTICE, "Failed to execute '%s'", ZSTR_VAL(querystr.s));
}
@@ -7099,7 +7153,7 @@ cleanup:
}
/* }}} */
-/* {{{ proto mixed pg_select(resource db, string table, array ids[, int options])
+/* {{{ proto mixed pg_select(resource db, string table, array ids[, int options [, int result_type])
Select records that has ids (id=>value) */
PHP_FUNCTION(pg_select)
{
@@ -7107,18 +7161,23 @@ PHP_FUNCTION(pg_select)
char *table;
size_t table_len;
zend_ulong option = PGSQL_DML_EXEC;
+ long result_type = PGSQL_ASSOC;
PGconn *pg_link;
zend_string *sql = NULL;
int argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc, "rsa|l",
- &pgsql_link, &table, &table_len, &ids, &option) == FAILURE) {
+ &pgsql_link, &table, &table_len, &ids, &option, &result_type) == FAILURE) {
return;
}
if (option & ~(PGSQL_CONV_FORCE_NULL|PGSQL_DML_NO_CONV|PGSQL_DML_EXEC|PGSQL_DML_ASYNC|PGSQL_DML_STRING|PGSQL_DML_ESCAPE)) {
php_error_docref(NULL, E_WARNING, "Invalid option is specified");
RETURN_FALSE;
}
+ if (!(result_type & PGSQL_BOTH)) {
+ php_error_docref(NULL, E_WARNING, "Invalid result type");
+ RETURN_FALSE;
+ }
if ((pg_link = (PGconn *)zend_fetch_resource2(Z_RES_P(pgsql_link), "PostgreSQL link", le_link, le_plink)) == NULL) {
RETURN_FALSE;
@@ -7128,7 +7187,7 @@ PHP_FUNCTION(pg_select)
php_error_docref(NULL, E_NOTICE, "Detected unhandled result(s) in connection");
}
array_init(return_value);
- if (php_pgsql_select(pg_link, table, ids, return_value, option, &sql) == FAILURE) {
+ if (php_pgsql_select(pg_link, table, ids, return_value, option, result_type, &sql) == FAILURE) {
zval_ptr_dtor(return_value);
RETURN_FALSE;
}
diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h
index 1b31c75b31..12549d7bfe 100644
--- a/ext/pgsql/php_pgsql.h
+++ b/ext/pgsql/php_pgsql.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -211,15 +211,14 @@ PHP_FUNCTION(pg_select);
#define PGSQL_DML_STRING (1<<11) /* Return query string */
#define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */
-
/* exported functions */
PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, zend_bool extended);
PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, zend_ulong opt);
PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, zend_ulong opt, zend_string **sql);
PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql);
PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_ulong opt, zend_string **sql);
-PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, zend_string **sql );
-PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array);
+PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, long fetch_option, zend_string **sql );
+PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long fetch_option);
/* internal functions */
static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent);
@@ -323,14 +322,10 @@ ZEND_BEGIN_MODULE_GLOBALS(pgsql)
ZEND_END_MODULE_GLOBALS(pgsql)
ZEND_EXTERN_MODULE_GLOBALS(pgsql)
+# define PGG(v) ZEND_MODULE_GLOBALS_ACCESSOR(pgsql, v)
-#ifdef ZTS
-# define PGG(v) ZEND_TSRMG(pgsql_globals_id, zend_pgsql_globals *, v)
-# ifdef COMPILE_DL_PGSQL
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define PGG(v) (pgsql_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_PGSQL)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif
diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt
index db671016e3..fb5dc8325c 100644
--- a/ext/pgsql/tests/09notice.phpt
+++ b/ext/pgsql/tests/09notice.phpt
@@ -9,35 +9,66 @@ _skip_lc_messages();
?>
--INI--
-pgsql.log_notice=1
-pgsql.ignore_notice=0
--FILE--
<?php
include 'config.inc';
include 'lcmess.inc';
+ini_set('pgsql.log_notice', TRUE);
+ini_set('pgsql.ignore_notice', FALSE);
+
$db = pg_connect($conn_str);
_set_lc_messages();
-$res = pg_query($db, 'SET client_min_messages TO NOTICE;');
+$res = pg_query($db, 'SET client_min_messages TO NOTICE;');
var_dump($res);
+// Get empty notice
+var_dump(pg_last_notice($db));
+var_dump(pg_last_notice($db, PGSQL_NOTICE_ALL));
+
+pg_query($db, "BEGIN;");
+pg_query($db, "BEGIN;");
pg_query($db, "BEGIN;");
pg_query($db, "BEGIN;");
-$msg = pg_last_notice($db);
-if ($msg === FALSE) {
- echo "Cannot find notice message in hash\n";
- var_dump($msg);
-}
-echo $msg."\n";
-echo "pg_last_notice() is Ok\n";
+// Get notices
+var_dump(pg_last_notice($db));
+var_dump(pg_last_notice($db, PGSQL_NOTICE_ALL));
+
+// Clear and get notices
+var_dump(pg_last_notice($db, PGSQL_NOTICE_CLEAR));
+var_dump(pg_last_notice($db, PGSQL_NOTICE_LAST));
+var_dump(pg_last_notice($db, PGSQL_NOTICE_ALL));
+// Invalid option
+var_dump(pg_last_notice($db, 99));
?>
--EXPECTF--
resource(%d) of type (pgsql result)
+string(0) ""
+array(0) {
+}
Notice: pg_query(): %s already a transaction in progress in %s on line %d
-%s already a transaction in progress
-pg_last_notice() is Ok
+
+Notice: pg_query(): %s already a transaction in progress in %s on line %d
+
+Notice: pg_query(): %s already a transaction in progress in %s on line %d
+string(52) "WARNING: there is already a transaction in progress"
+array(3) {
+ [0]=>
+ string(52) "WARNING: there is already a transaction in progress"
+ [1]=>
+ string(52) "WARNING: there is already a transaction in progress"
+ [2]=>
+ string(52) "WARNING: there is already a transaction in progress"
+}
+bool(true)
+string(0) ""
+array(0) {
+}
+
+Warning: pg_last_notice(): Invalid option specified (99) in %s/09notice.php on line %d
+bool(false)
diff --git a/ext/pgsql/tests/14pg_update.phpt b/ext/pgsql/tests/14pg_update.phpt
index d804574405..843dbac957 100644
--- a/ext/pgsql/tests/14pg_update.phpt
+++ b/ext/pgsql/tests/14pg_update.phpt
@@ -23,4 +23,5 @@ echo "Ok\n";
?>
--EXPECT--
UPDATE "php_pgsql_test" SET "num"=1234,"str"=E'ABC',"bin"=E'XYZ' WHERE "num"=1234;
-Ok \ No newline at end of file
+UPDATE "php_pgsql_test" SET "num='1234',"str='ABC',"bin='XYZ' WHERE "num='1234';
+Ok
diff --git a/ext/pgsql/tests/bug46408.phpt b/ext/pgsql/tests/bug46408.phpt
index bf84290907..5803347988 100644
--- a/ext/pgsql/tests/bug46408.phpt
+++ b/ext/pgsql/tests/bug46408.phpt
@@ -14,7 +14,7 @@ require_once('config.inc');
$dbh = pg_connect($conn_str);
setlocale(LC_ALL, 'hr_HR.utf-8', 'hr_HR');
-echo 3.5.PHP_EOL;
+echo 3.5 , "\n";
pg_query_params("SELECT $1::numeric", array(3.5));
pg_close($dbh);
diff --git a/ext/pgsql/tests/bug71062.phpt b/ext/pgsql/tests/bug71062.phpt
new file mode 100644
index 0000000000..56e350daad
--- /dev/null
+++ b/ext/pgsql/tests/bug71062.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #71062 pg_convert() doesn't accept ISO 8601 for datatype timestamp
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+
+include('config.inc');
+
+$db = pg_connect($conn_str);
+
+$table = "public.test_table_bug71062_bug71062";
+
+pg_query($db, "CREATE TABLE $table ( test_field TIMESTAMPTZ )");
+
+// ISO 8601 (with 'T' between date and time)
+$date_string_php_iso8601 = date_create('8 Dec 2015 5:38')->format(DateTime::ISO8601);
+
+// ISO 8601 with the 'T' removed
+$modified_format = 'Y-m-d H:i:sO';
+$date_string_modified_iso8601 = date_create('8 Dec 2015 5:38')->format($modified_format);
+
+printf("trying format %s \n", DateTime::ISO8601);
+pg_convert($db, $table, ['test_field' => $date_string_php_iso8601]);
+
+printf("trying format %s \n", $modified_format);
+pg_convert($db, $table, ['test_field' => $date_string_modified_iso8601]);
+
+print "done\n";
+
+pg_query($db, "DROP TABLE $table");
+
+?>
+==OK==
+--EXPECT--
+trying format Y-m-d\TH:i:sO
+trying format Y-m-d H:i:sO
+done
+==OK==
diff --git a/ext/pgsql/tests/bug71998.phpt b/ext/pgsql/tests/bug71998.phpt
new file mode 100644
index 0000000000..b9924166f9
--- /dev/null
+++ b/ext/pgsql/tests/bug71998.phpt
@@ -0,0 +1,196 @@
+--TEST--
+Bug #71998 Function pg_insert does not insert when column type = inet
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+// Kudos for the IP regex to
+// http://stackoverflow.com/a/17871737/3358424
+
+include('config.inc');
+
+$db = pg_connect($conn_str);
+
+pg_query("CREATE TABLE tmp_statistics (id integer NOT NULL, remote_addr inet);");
+
+$ips = array(
+ /* IPv4*/
+ "127.0.0.1",
+ "10.0.0.1",
+ "192.168.1.1",
+ "0.0.0.0",
+ "255.255.255.255",
+ "192.168.1.35/24",
+
+ /* IPv6 */
+ "::1",
+ "::10.2.3.4",
+ "::ffff:10.4.3.2",
+ "1:2:3:4:5:6:7:8",
+ "::ffff:10.0.0.1",
+ "::ffff:1.2.3.4",
+ "::ffff:0.0.0.0",
+ "1:2:3:4:5:6:77:88",
+ "::ffff:255.255.255.255",
+ "fe08::7:8",
+ "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
+ "::5:aef1:ffff/128",
+ "2001:4f8:3:ba::/112",
+
+);
+
+$bad = array(
+ /* bad */
+ "256.257.258.259",
+ "fe08::7:8interface",
+ "schnitzel",
+ "10002.3.4",
+ "1.2.3.4.5",
+ "256.0.0.0",
+ "260.0.0.0",
+);
+
+$ips = array_merge($ips, $bad);
+$i = 0;
+$errors = 0;
+foreach ($ips as $ip) {
+ $data = array("id" => ++$i, "remote_addr" => $ip);
+ $r = @pg_insert($db, 'tmp_statistics', $data);
+
+ if (!$r && in_array($ip, $bad)) {
+ $errors++;
+ //echo pg_last_error($db);
+ }
+
+ //pg_query($db, "INSERT INTO tmp_statistics (id, remote_addr) VALUES (2, '127.0.0.1')"); // OK, record inserted
+}
+
+
+$r = pg_query($db, "SELECT * FROM tmp_statistics");
+while (false != ($row = pg_fetch_row($r))) {
+ var_dump($row);
+}
+echo $errors, " errors catched\n";
+
+pg_query($db, "DROP TABLE tmp_statistics");
+pg_close($db);
+
+?>
+==DONE==
+--EXPECT--
+array(2) {
+ [0]=>
+ string(1) "1"
+ [1]=>
+ string(9) "127.0.0.1"
+}
+array(2) {
+ [0]=>
+ string(1) "2"
+ [1]=>
+ string(8) "10.0.0.1"
+}
+array(2) {
+ [0]=>
+ string(1) "3"
+ [1]=>
+ string(11) "192.168.1.1"
+}
+array(2) {
+ [0]=>
+ string(1) "4"
+ [1]=>
+ string(7) "0.0.0.0"
+}
+array(2) {
+ [0]=>
+ string(1) "5"
+ [1]=>
+ string(15) "255.255.255.255"
+}
+array(2) {
+ [0]=>
+ string(1) "6"
+ [1]=>
+ string(15) "192.168.1.35/24"
+}
+array(2) {
+ [0]=>
+ string(1) "7"
+ [1]=>
+ string(3) "::1"
+}
+array(2) {
+ [0]=>
+ string(1) "8"
+ [1]=>
+ string(10) "::10.2.3.4"
+}
+array(2) {
+ [0]=>
+ string(1) "9"
+ [1]=>
+ string(15) "::ffff:10.4.3.2"
+}
+array(2) {
+ [0]=>
+ string(2) "10"
+ [1]=>
+ string(15) "1:2:3:4:5:6:7:8"
+}
+array(2) {
+ [0]=>
+ string(2) "11"
+ [1]=>
+ string(15) "::ffff:10.0.0.1"
+}
+array(2) {
+ [0]=>
+ string(2) "12"
+ [1]=>
+ string(14) "::ffff:1.2.3.4"
+}
+array(2) {
+ [0]=>
+ string(2) "13"
+ [1]=>
+ string(14) "::ffff:0.0.0.0"
+}
+array(2) {
+ [0]=>
+ string(2) "14"
+ [1]=>
+ string(17) "1:2:3:4:5:6:77:88"
+}
+array(2) {
+ [0]=>
+ string(2) "15"
+ [1]=>
+ string(22) "::ffff:255.255.255.255"
+}
+array(2) {
+ [0]=>
+ string(2) "16"
+ [1]=>
+ string(9) "fe08::7:8"
+}
+array(2) {
+ [0]=>
+ string(2) "17"
+ [1]=>
+ string(39) "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
+}
+array(2) {
+ [0]=>
+ string(2) "18"
+ [1]=>
+ string(13) "::5:aef1:ffff"
+}
+array(2) {
+ [0]=>
+ string(2) "19"
+ [1]=>
+ string(19) "2001:4f8:3:ba::/112"
+}
+7 errors catched
+==DONE==
diff --git a/ext/pgsql/tests/bug72028.phpt b/ext/pgsql/tests/bug72028.phpt
new file mode 100644
index 0000000000..217a03abc7
--- /dev/null
+++ b/ext/pgsql/tests/bug72028.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Bug #72028 pg_query_params(): NULL converts to empty string
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+// create test table
+
+include('config.inc');
+
+$conn = pg_connect($conn_str);
+
+$table = "bug72028_" . md5(uniqid(time()));
+
+pg_query("CREATE TABLE $table (value TEXT, details TEXT);");
+
+$sql = "INSERT INTO $table (value, details) VALUES ($1, $2)";
+
+$params = array(null, "insert before looping with a reference");
+$result = pg_query_params($conn, $sql, $params);
+
+$params2 = array(null, "insert after looping with a reference");
+foreach ($params2 as &$p) {
+ // doing nothing
+}
+unset($p);
+
+$result = pg_query_params($conn, $sql, $params2);
+
+$r = pg_query("SELECT * FROM $table");
+while (false !== ($i = pg_fetch_assoc($r))) {
+ var_dump($i);
+}
+
+pg_query("DROP TABLE $table");
+
+?>
+==DONE==
+--EXPECT--
+array(2) {
+ ["value"]=>
+ NULL
+ ["details"]=>
+ string(38) "insert before looping with a reference"
+}
+array(2) {
+ ["value"]=>
+ NULL
+ ["details"]=>
+ string(37) "insert after looping with a reference"
+}
+==DONE==
diff --git a/ext/pgsql/tests/bug72195.phpt b/ext/pgsql/tests/bug72195.phpt
new file mode 100644
index 0000000000..2f33e1ab1c
--- /dev/null
+++ b/ext/pgsql/tests/bug72195.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #72195 (pg_pconnect/pg_connect cause use-after-free)
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+$val = [];
+$var1 = $val;
+printf("%x\n", count($val));
+@pg_pconnect($var1, "2", "3", "4");
+$var1 = "";
+tempnam('/tmp', 'ABCDEFGHI');
+printf("%x\n", count($val));
+?>
+--EXPECT--
+0
+0
diff --git a/ext/pgsql/tests/bug72197.phpt b/ext/pgsql/tests/bug72197.phpt
new file mode 100644
index 0000000000..2ce15bdaf4
--- /dev/null
+++ b/ext/pgsql/tests/bug72197.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #72197 pg_lo_create arbitrary read
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+/* This shouldn't crash. */
+$var1=-32768;
+$var2="12";
+pg_lo_create($var1, $var2);
+
+/* This should work correctly. */
+include('config.inc');
+
+/* Check with explicit link. */
+$conn = pg_connect($conn_str);
+pg_query($conn, "BEGIN");
+$oid = pg_lo_create($conn);
+var_dump($oid);
+
+/* Check with default link */
+$oid = pg_lo_create();
+var_dump($oid);
+
+/* don't commit */
+pg_query($conn, "ROLLBACK");
+pg_close($conn);
+?>
+==DONE==
+--EXPECTF--
+Warning: pg_lo_create(): supplied resource is not a valid PostgreSQL link resource in %sbug72197.php on line %d%w
+int(%d)
+int(%d)
+==DONE==
+
diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c
index 6cb78ad692..33dfffc3c0 100644
--- a/ext/phar/dirstream.c
+++ b/ext/phar/dirstream.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar:// stream wrapper support |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -199,13 +199,14 @@ static php_stream *phar_make_dirstream(char *dir, HashTable *manifest) /* {{{ */
zend_hash_internal_pointer_reset(manifest);
while (FAILURE != zend_hash_has_more_elements(manifest)) {
+ keylen = 0;
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key(manifest, &str_key, &unused)) {
break;
}
keylen = ZSTR_LEN(str_key);
if (keylen <= (uint)dirlen) {
- if (keylen < (uint)dirlen || !strncmp(ZSTR_VAL(str_key), dir, dirlen)) {
+ if (keylen == 0 || keylen < (uint)dirlen || !strncmp(ZSTR_VAL(str_key), dir, dirlen)) {
if (SUCCESS != zend_hash_move_forward(manifest)) {
break;
}
diff --git a/ext/phar/dirstream.h b/ext/phar/dirstream.h
index b0e5f50ae4..3f9bc884ac 100644
--- a/ext/phar/dirstream.h
+++ b/ext/phar/dirstream.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c
index dc08bd424f..54610939dd 100644
--- a/ext/phar/func_interceptors.c
+++ b/ext/phar/func_interceptors.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -568,35 +568,35 @@ static void phar_fancy_stat(zend_stat_t *stat_sb, int type, zval *return_value)
ZVAL_LONG(&stat_blocks,-1);
#endif
/* Store numeric indexes in proper order */
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_dev);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_ino);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_mode);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_nlink);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_uid);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_gid);
-
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_rdev);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_size);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_atime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_mtime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_ctime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_blksize);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_blocks);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_dev);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ino);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mode);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_nlink);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_uid);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_gid);
+
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_rdev);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_size);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_atime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mtime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ctime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blksize);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blocks);
/* Store string indexes referencing the same zval*/
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks);
return;
}
diff --git a/ext/phar/func_interceptors.h b/ext/phar/func_interceptors.h
index 2b2bc8a395..f7bc3db613 100644
--- a/ext/phar/func_interceptors.h
+++ b/ext/phar/func_interceptors.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/phar.1.in b/ext/phar/phar.1.in
index 52c3046222..46eed77e24 100644
--- a/ext/phar/phar.1.in
+++ b/ext/phar/phar.1.in
@@ -1,4 +1,4 @@
-.TH PHAR 1 "2013" "The PHP Group" "User Commands"
+.TH PHAR 1 "2016" "The PHP Group" "User Commands"
.SH NAME
phar, phar.phar \- PHAR (PHP archive) command line tool
.SH SYNOPSIS
@@ -507,7 +507,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphar\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2014 The PHP Group
+Copyright \(co 1997\-2016 The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 9956effb3f..2b65a54ed9 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -194,8 +194,8 @@ ZEND_INI_MH(phar_ini_cache_list) /* {{{ */
/* }}} */
PHP_INI_BEGIN()
- STD_PHP_INI_BOOLEAN( "phar.readonly", "1", PHP_INI_ALL, phar_ini_modify_handler, readonly, zend_phar_globals, phar_globals)
- STD_PHP_INI_BOOLEAN( "phar.require_hash", "1", PHP_INI_ALL, phar_ini_modify_handler, require_hash, zend_phar_globals, phar_globals)
+ STD_PHP_INI_BOOLEAN("phar.readonly", "1", PHP_INI_ALL, phar_ini_modify_handler, readonly, zend_phar_globals, phar_globals)
+ STD_PHP_INI_BOOLEAN("phar.require_hash", "1", PHP_INI_ALL, phar_ini_modify_handler, require_hash, zend_phar_globals, phar_globals)
STD_PHP_INI_ENTRY("phar.cache_list", "", PHP_INI_SYSTEM, phar_ini_cache_list, cache_list, zend_phar_globals, phar_globals)
PHP_INI_END()
@@ -516,15 +516,15 @@ void phar_entry_remove(phar_entry_data *idata, char **error) /* {{{ */
memcpy(&var, buffer, sizeof(var)); \
buffer += 4
# define PHAR_GET_16(buffer, var) \
- var = *(php_uint16*)(buffer); \
+ var = *(uint16_t*)(buffer); \
buffer += 2
#endif
-#define PHAR_ZIP_16(var) ((php_uint16)((((php_uint16)var[0]) & 0xff) | \
- (((php_uint16)var[1]) & 0xff) << 8))
-#define PHAR_ZIP_32(var) ((php_uint32)((((php_uint32)var[0]) & 0xff) | \
- (((php_uint32)var[1]) & 0xff) << 8 | \
- (((php_uint32)var[2]) & 0xff) << 16 | \
- (((php_uint32)var[3]) & 0xff) << 24))
+#define PHAR_ZIP_16(var) ((uint16_t)((((uint16_t)var[0]) & 0xff) | \
+ (((uint16_t)var[1]) & 0xff) << 8))
+#define PHAR_ZIP_32(var) ((uint32_t)((((uint32_t)var[0]) & 0xff) | \
+ (((uint32_t)var[1]) & 0xff) << 8 | \
+ (((uint32_t)var[2]) & 0xff) << 16 | \
+ (((uint32_t)var[3]) & 0xff) << 24))
/**
* Open an already loaded phar
@@ -604,7 +604,7 @@ int phar_open_parsed_phar(char *fname, int fname_len, char *alias, int alias_len
*
* data is the serialized zval
*/
-int phar_parse_metadata(char **buffer, zval *metadata, php_uint32 zip_metadata_len) /* {{{ */
+int phar_parse_metadata(char **buffer, zval *metadata, uint32_t zip_metadata_len) /* {{{ */
{
php_unserialize_data_t var_hash;
@@ -649,14 +649,14 @@ int phar_parse_metadata(char **buffer, zval *metadata, php_uint32 zip_metadata_l
* This is used by phar_open_from_filename to process the manifest, but can be called
* directly.
*/
-static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char *alias, int alias_len, zend_long halt_offset, phar_archive_data** pphar, php_uint32 compression, char **error) /* {{{ */
+static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char *alias, int alias_len, zend_long halt_offset, phar_archive_data** pphar, uint32_t compression, char **error) /* {{{ */
{
char b32[4], *buffer, *endbuffer, *savebuf;
phar_archive_data *mydata = NULL;
phar_entry_info entry;
- php_uint32 manifest_len, manifest_count, manifest_flags, manifest_index, tmp_len, sig_flags;
- php_uint16 manifest_ver;
- php_uint32 len;
+ uint32_t manifest_len, manifest_count, manifest_flags, manifest_index, tmp_len, sig_flags;
+ uint16_t manifest_ver;
+ uint32_t len;
zend_long offset;
int sig_len, register_alias = 0, temp_alias = 0;
char *signature = NULL;
@@ -778,7 +778,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
switch(sig_flags) {
case PHAR_SIG_OPENSSL: {
- php_uint32 signature_len;
+ uint32_t signature_len;
char *sig;
zend_off_t whence;
@@ -1326,11 +1326,6 @@ int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int a
if (!pphar) {
pphar = &mydata;
}
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
- return FAILURE;
- }
-#endif
if (php_check_open_basedir(fname)) {
return FAILURE;
}
@@ -1490,11 +1485,6 @@ int phar_open_from_filename(char *fname, int fname_len, char *alias, int alias_l
} else if (error && *error) {
return FAILURE;
}
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
- return FAILURE;
- }
-#endif
if (php_check_open_basedir(fname)) {
return FAILURE;
}
@@ -1575,7 +1565,7 @@ static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *a
const zend_long tokenlen = sizeof(token) - 1;
zend_long halt_offset;
size_t got;
- php_uint32 compression = PHAR_FILE_COMPRESSED_NONE;
+ uint32_t compression = PHAR_FILE_COMPRESSED_NONE;
if (error) {
*error = NULL;
@@ -1794,8 +1784,11 @@ static int phar_analyze_path(const char *fname, const char *ext, int ext_len, in
#ifdef PHP_WIN32
phar_unixify_path_separators(realpath, strlen(realpath));
#endif
- slash = strstr(realpath, filename) + ((ext - fname) + ext_len);
- *slash = '\0';
+ slash = strstr(realpath, filename);
+ if (slash) {
+ slash += ((ext - fname) + ext_len);
+ *slash = '\0';
+ }
slash = strrchr(realpath, '/');
if (slash) {
@@ -2073,7 +2066,7 @@ static int php_check_dots(const char *element, int n) /* {{{ */
*/
char *phar_fix_filepath(char *path, int *new_len, int use_cwd) /* {{{ */
{
- char newpath[MAXPATHLEN];
+ char *newpath;
int newpath_len;
char *ptr;
char *tok;
@@ -2081,8 +2074,10 @@ char *phar_fix_filepath(char *path, int *new_len, int use_cwd) /* {{{ */
if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') {
newpath_len = PHAR_G(cwd_len);
+ newpath = emalloc(strlen(path) + newpath_len + 1);
memcpy(newpath, PHAR_G(cwd), newpath_len);
} else {
+ newpath = emalloc(strlen(path) + 2);
newpath[0] = '/';
newpath_len = 1;
}
@@ -2105,6 +2100,7 @@ char *phar_fix_filepath(char *path, int *new_len, int use_cwd) /* {{{ */
if (*tok == '.') {
efree(path);
*new_len = 1;
+ efree(newpath);
return estrndup("/", 1);
}
break;
@@ -2112,9 +2108,11 @@ char *phar_fix_filepath(char *path, int *new_len, int use_cwd) /* {{{ */
if (tok[0] == '.' && tok[1] == '.') {
efree(path);
*new_len = 1;
+ efree(newpath);
return estrndup("/", 1);
}
}
+ efree(newpath);
return path;
}
@@ -2163,7 +2161,8 @@ last_time:
efree(path);
*new_len = newpath_len;
- return estrndup(newpath, newpath_len);
+ newpath[newpath_len] = '\0';
+ return erealloc(newpath, newpath_len + 1);
}
/* }}} */
@@ -2187,6 +2186,14 @@ int phar_split_fname(const char *filename, int filename_len, char **arch, int *a
#endif
int ext_len;
+ if (CHECK_NULL_PATH(filename, filename_len)) {
+ return FAILURE;
+ }
+
+ if (CHECK_NULL_PATH(filename, filename_len)) {
+ return FAILURE;
+ }
+
if (!strncasecmp(filename, "phar://", 7)) {
filename += 7;
filename_len -= 7;
@@ -2279,13 +2286,6 @@ int phar_open_executed_filename(char *alias, int alias_len, char **error) /* {{{
return FAILURE;
}
-
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
- return FAILURE;
- }
-#endif
-
if (php_check_open_basedir(fname)) {
return FAILURE;
}
@@ -2320,9 +2320,9 @@ int phar_open_executed_filename(char *alias, int alias_len, char **error) /* {{{
/**
* Validate the CRC32 of a file opened from within the phar
*/
-int phar_postprocess_file(phar_entry_data *idata, php_uint32 crc32, char **error, int process_zip) /* {{{ */
+int phar_postprocess_file(phar_entry_data *idata, uint32_t crc32, char **error, int process_zip) /* {{{ */
{
- php_uint32 crc = ~0;
+ uint32_t crc = ~0;
int len = idata->internal_file->uncompressed_filesize;
php_stream *fp = idata->fp;
phar_entry_info *entry = idata->internal_file;
@@ -2487,8 +2487,8 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
zend_off_t manifest_ftell;
zend_long offset;
size_t wrote;
- php_uint32 manifest_len, mytime, loc, new_manifest_count;
- php_uint32 newcrc32;
+ uint32_t manifest_len, mytime, loc, new_manifest_count;
+ uint32_t newcrc32;
php_stream *file, *oldfile, *newfile, *stubfile;
php_stream_filter *filter;
php_serialize_data_t metadata_hash;
@@ -2820,7 +2820,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
php_stream_flush(entry->cfp);
php_stream_filter_remove(filter, 1);
php_stream_seek(entry->cfp, 0, SEEK_END);
- entry->compressed_filesize = (php_uint32) php_stream_tell(entry->cfp);
+ entry->compressed_filesize = (uint32_t) php_stream_tell(entry->cfp);
/* generate crc on compressed file */
php_stream_rewind(entry->cfp);
entry->old_flags = entry->flags;
@@ -3220,7 +3220,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
#ifdef COMPILE_DL_PHAR
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(phar)
#endif
@@ -3575,9 +3575,7 @@ static const zend_module_dep phar_deps[] = {
#if defined(HAVE_HASH) && !defined(COMPILE_DL_HASH)
ZEND_MOD_REQUIRED("hash")
#endif
-#if HAVE_SPL
ZEND_MOD_REQUIRED("spl")
-#endif
ZEND_MOD_END
};
diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h
index f5209faf75..cd562ea411 100644
--- a/ext/phar/phar_internal.h
+++ b/ext/phar/phar_internal.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -55,13 +55,11 @@
#include "TSRM/tsrm_strtok_r.h"
#endif
#include "Zend/zend_virtual_cwd.h"
-#if HAVE_SPL
#include "ext/spl/spl_array.h"
#include "ext/spl/spl_directory.h"
#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
-#endif
#include "php_phar.h"
#ifdef PHAR_HASH_OK
#include "ext/hash/php_hash.h"
@@ -195,30 +193,16 @@ ZEND_BEGIN_MODULE_GLOBALS(phar)
ZEND_END_MODULE_GLOBALS(phar)
ZEND_EXTERN_MODULE_GLOBALS(phar)
+#define PHAR_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(phar, v)
-#ifdef ZTS
-# include "TSRM.h"
-# ifdef COMPILE_DL_PHAR
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-# define PHAR_G(v) ZEND_TSRMG(phar_globals_id, zend_phar_globals *, v)
-#else
-# define PHAR_G(v) (phar_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_PHAR)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
-#ifndef php_uint16
-# if SIZEOF_SHORT == 2
-# define php_uint16 unsigned short
-# else
-# define php_uint16 uint16_t
-# endif
-#endif
#include "pharzip.h"
-#if HAVE_SPL
typedef union _phar_archive_object phar_archive_object;
typedef union _phar_entry_object phar_entry_object;
-#endif
/*
* used in phar_entry_info->fp_type to
@@ -238,17 +222,17 @@ enum phar_fp_type {
/* entry for one file in a phar file */
typedef struct _phar_entry_info {
/* first bytes are exactly as in file */
- php_uint32 uncompressed_filesize;
- php_uint32 timestamp;
- php_uint32 compressed_filesize;
- php_uint32 crc32;
- php_uint32 flags;
+ uint32_t uncompressed_filesize;
+ uint32_t timestamp;
+ uint32_t compressed_filesize;
+ uint32_t crc32;
+ uint32_t flags;
/* remainder */
/* when changing compression, save old flags in case fp is NULL */
- php_uint32 old_flags;
+ uint32_t old_flags;
zval metadata;
int metadata_len; /* only used for cached manifests */
- php_uint32 filename_len;
+ uint32_t filename_len;
char *filename;
enum phar_fp_type fp_type;
/* offset within original phar file of the file contents */
@@ -304,14 +288,14 @@ struct _phar_archive_data {
HashTable virtual_dirs;
/* hash of mounted directory paths */
HashTable mounted_dirs;
- php_uint32 flags;
- php_uint32 min_timestamp;
- php_uint32 max_timestamp;
+ uint32_t flags;
+ uint32_t min_timestamp;
+ uint32_t max_timestamp;
php_stream *fp;
/* decompressed file contents are stored here */
php_stream *ufp;
int refcount;
- php_uint32 sig_flags;
+ uint32_t sig_flags;
int sig_len;
char *signature;
zval metadata;
@@ -478,21 +462,17 @@ typedef struct _phar_entry_data {
phar_entry_info *internal_file;
} phar_entry_data;
-#if HAVE_SPL
/* archive php object */
union _phar_archive_object {
spl_filesystem_object spl;
phar_archive_data *archive;
};
-#endif
-#if HAVE_SPL
/* entry php object */
union _phar_entry_object {
spl_filesystem_object spl;
phar_entry_info *entry;
};
-#endif
#ifndef PHAR_MAIN
extern zend_string *(*phar_save_resolve_path)(const char *filename, int filename_len);
@@ -529,14 +509,17 @@ static inline void phar_set_inode(phar_entry_info *entry) /* {{{ */
{
char tmp[MAXPATHLEN];
int tmp_len;
- size_t len;
+ size_t len1, len2;
tmp_len = MIN(MAXPATHLEN, entry->filename_len + entry->phar->fname_len);
- len = MIN(entry->phar->fname_len, tmp_len);
- memcpy(tmp, entry->phar->fname, len);
- len = MIN(tmp_len - len, entry->filename_len);
- memcpy(tmp + entry->phar->fname_len, entry->filename, len);
- entry->inode = (unsigned short)zend_hash_func(tmp, tmp_len);
+
+ len1 = MIN(entry->phar->fname_len, tmp_len);
+ memcpy(tmp, entry->phar->fname, len1);
+
+ len2 = MIN(tmp_len - len1, entry->filename_len);
+ memcpy(tmp + len1, entry->filename, len2);
+
+ entry->inode = (unsigned short) zend_hash_func(tmp, tmp_len);
}
/* }}} */
@@ -546,7 +529,7 @@ void phar_object_init(void);
void phar_destroy_phar_data(phar_archive_data *phar);
int phar_open_entry_file(phar_archive_data *phar, phar_entry_info *entry, char **error);
-int phar_postprocess_file(phar_entry_data *idata, php_uint32 crc32, char **error, int process_zip);
+int phar_postprocess_file(phar_entry_data *idata, uint32_t crc32, char **error, int process_zip);
int phar_open_from_filename(char *fname, int fname_len, char *alias, int alias_len, int options, phar_archive_data** pphar, char **error);
int phar_open_or_create_filename(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error);
int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error);
@@ -554,7 +537,7 @@ int phar_open_executed_filename(char *alias, int alias_len, char **error);
int phar_free_alias(phar_archive_data *phar, char *alias, int alias_len);
int phar_get_archive(phar_archive_data **archive, char *fname, int fname_len, char *alias, int alias_len, char **error);
int phar_open_parsed_phar(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error);
-int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_type, char *sig, int sig_len, char *fname, char **signature, int *signature_len, char **error);
+int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, char *sig, int sig_len, char *fname, char **signature, int *signature_len, char **error);
int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signature, int *signature_length, char **error);
/* utility functions */
@@ -568,7 +551,7 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, int filename_len,
zend_string *phar_find_in_include_path(char *file, int file_len, phar_archive_data **pphar);
char *phar_fix_filepath(char *path, int *new_len, int use_cwd);
phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry, char **error);
-int phar_parse_metadata(char **buffer, zval *metadata, php_uint32 zip_metadata_len);
+int phar_parse_metadata(char **buffer, zval *metadata, uint32_t zip_metadata_len);
void destroy_phar_manifest_entry(zval *zv);
int phar_seek_efp(phar_entry_info *entry, zend_off_t offset, int whence, zend_off_t position, int follow_links);
php_stream *phar_get_efp(phar_entry_info *entry, int follow_links);
@@ -582,7 +565,7 @@ int phar_copy_on_write(phar_archive_data **pphar);
/* tar functions in tar.c */
int phar_is_tar(char *buf, char *fname);
-int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 compression, char **error);
+int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, uint32_t compression, char **error);
int phar_open_or_create_tar(char *fname, int fname_len, char *alias, int alias_len, int is_data, int options, phar_archive_data** pphar, char **error);
int phar_tar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int defaultstub, char **error);
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 0c7f97105a..ebacc88db1 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,16 +25,7 @@
static zend_class_entry *phar_ce_archive;
static zend_class_entry *phar_ce_data;
static zend_class_entry *phar_ce_PharException;
-
-#if HAVE_SPL
static zend_class_entry *phar_ce_entry;
-#endif
-
-#if PHP_VERSION_ID >= 50300
-# define PHAR_ARG_INFO
-#else
-# define PHAR_ARG_INFO static
-#endif
static int phar_file_type(HashTable *mimes, char *file, char **mime_type) /* {{{ */
{
@@ -459,7 +450,7 @@ PHP_METHOD(Phar, mount)
size_t path_len, actual_len;
phar_archive_data *pphar;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &path, &path_len, &actual, &actual_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &path, &path_len, &actual, &actual_len) == FAILURE) {
return;
}
@@ -938,7 +929,7 @@ PHP_METHOD(Phar, createDefaultStub)
zend_string *stub;
size_t index_len = 0, webindex_len = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ss", &index, &index_len, &webindex, &webindex_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|pp", &index, &index_len, &webindex, &webindex_len) == FAILURE) {
return;
}
@@ -982,7 +973,7 @@ PHP_METHOD(Phar, loadPhar)
char *fname, *alias = NULL, *error;
size_t fname_len, alias_len = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s!", &fname, &fname_len, &alias, &alias_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s!", &fname, &fname_len, &alias, &alias_len) == FAILURE) {
return;
}
@@ -1062,7 +1053,7 @@ PHP_METHOD(Phar, isValidPharFilename)
int ext_len, is_executable;
zend_bool executable = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b", &fname, &fname_len, &executable) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &fname, &fname_len, &executable) == FAILURE) {
return;
}
@@ -1071,7 +1062,6 @@ PHP_METHOD(Phar, isValidPharFilename)
}
/* }}} */
-#if HAVE_SPL
/**
* from spl_directory
*/
@@ -1104,7 +1094,6 @@ static spl_other_handler phar_spl_foreign_handler = {
phar_spl_foreign_dtor,
phar_spl_foreign_clone
};
-#endif /* HAVE_SPL */
/* {{{ proto void Phar::__construct(string fname [, int flags [, string alias]])
* Construct a Phar archive object
@@ -1117,9 +1106,6 @@ static spl_other_handler phar_spl_foreign_handler = {
*/
PHP_METHOD(Phar, __construct)
{
-#if !HAVE_SPL
- zend_throw_exception_ex(zend_ce_exception, 0, "Cannot instantiate Phar object without SPL extension");
-#else
char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname;
size_t fname_len, alias_len = 0;
int arch_len, entry_len, is_data;
@@ -1134,11 +1120,11 @@ PHP_METHOD(Phar, __construct)
is_data = instanceof_function(Z_OBJCE_P(zobj), phar_ce_data);
if (is_data) {
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "s|ls!l", &fname, &fname_len, &flags, &alias, &alias_len, &format) == FAILURE) {
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|ls!l", &fname, &fname_len, &flags, &alias, &alias_len, &format) == FAILURE) {
return;
}
} else {
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "s|ls!", &fname, &fname_len, &flags, &alias, &alias_len) == FAILURE) {
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p|ls!", &fname, &fname_len, &flags, &alias, &alias_len) == FAILURE) {
return;
}
}
@@ -1244,7 +1230,6 @@ PHP_METHOD(Phar, __construct)
phar_obj->spl.info_class = phar_ce_entry;
efree(fname);
-#endif /* HAVE_SPL */
}
/* }}} */
@@ -1307,7 +1292,7 @@ PHP_METHOD(Phar, unlinkArchive)
int zname_len, arch_len, entry_len;
phar_archive_data *phar;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &fname, &fname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
RETURN_FALSE;
}
@@ -1363,8 +1348,6 @@ PHP_METHOD(Phar, unlinkArchive)
}
/* }}} */
-#if HAVE_SPL
-
#define PHAR_ARCHIVE_OBJECT() \
zval *zobj = getThis(); \
phar_archive_object *phar_obj = (phar_archive_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset); \
@@ -1588,21 +1571,6 @@ phar_spl_fileinfo:
return ZEND_HASH_APPLY_STOP;
}
}
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
- zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that safe mode prevents opening", ZSTR_VAL(ce->name), fname);
-
- if (save) {
- efree(save);
- }
-
- if (temp) {
- efree(temp);
- }
-
- return ZEND_HASH_APPLY_STOP;
- }
-#endif
if (php_check_open_basedir(fname)) {
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %v returned a path \"%s\" that open_basedir prevents opening", ZSTR_VAL(ce->name), fname);
@@ -1739,7 +1707,7 @@ PHP_METHOD(Phar, buildFromDirectory)
return;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &dir, &dir_len, &regex, &regex_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s", &dir, &dir_len, &regex, &regex_len) == FAILURE) {
RETURN_FALSE;
}
@@ -1996,9 +1964,10 @@ static int phar_copy_file_contents(phar_entry_info *entry, php_stream *fp) /* {{
}
/* }}} */
-static zend_object *phar_rename_archive(phar_archive_data *phar, char *ext, zend_bool compress) /* {{{ */
+static zend_object *phar_rename_archive(phar_archive_data **sphar, char *ext, zend_bool compress) /* {{{ */
{
const char *oldname = NULL;
+ phar_archive_data *phar = *sphar;
char *oldpath = NULL;
char *basename = NULL, *basepath = NULL;
char *newname = NULL, *newpath = NULL;
@@ -2108,6 +2077,7 @@ static zend_object *phar_rename_archive(phar_archive_data *phar, char *ext, zend
pphar->fp = phar->fp;
phar->fp = NULL;
phar_destroy_phar_data(phar);
+ *sphar = NULL;
phar = pphar;
phar->refcount++;
newpath = oldpath;
@@ -2194,7 +2164,7 @@ its_ok:
}
/* }}} */
-static zend_object *phar_convert_to_other(phar_archive_data *source, int convert, char *ext, php_uint32 flags) /* {{{ */
+static zend_object *phar_convert_to_other(phar_archive_data *source, int convert, char *ext, uint32_t flags) /* {{{ */
{
phar_archive_data *phar;
phar_entry_info *entry, newentry;
@@ -2290,15 +2260,19 @@ no_copy:
phar_add_virtual_dirs(phar, newentry.filename, newentry.filename_len);
} ZEND_HASH_FOREACH_END();
- if ((ret = phar_rename_archive(phar, ext, 0))) {
+ if ((ret = phar_rename_archive(&phar, ext, 0))) {
return ret;
} else {
- zend_hash_destroy(&(phar->manifest));
- zend_hash_destroy(&(phar->mounted_dirs));
- zend_hash_destroy(&(phar->virtual_dirs));
- php_stream_close(phar->fp);
- efree(phar->fname);
- efree(phar);
+ if(phar != NULL) {
+ zend_hash_destroy(&(phar->manifest));
+ zend_hash_destroy(&(phar->mounted_dirs));
+ zend_hash_destroy(&(phar->virtual_dirs));
+ if (phar->fp) {
+ php_stream_close(phar->fp);
+ }
+ efree(phar->fname);
+ efree(phar);
+ }
return NULL;
}
}
@@ -2314,7 +2288,7 @@ PHP_METHOD(Phar, convertToExecutable)
char *ext = NULL;
int is_data;
size_t ext_len = 0;
- php_uint32 flags;
+ uint32_t flags;
zend_object *ret;
/* a number that is not 0, 1 or 2 (Which is also Greg's birthday, so there) */
zend_long format = 9021976, method = 9021976;
@@ -2418,7 +2392,7 @@ PHP_METHOD(Phar, convertToData)
char *ext = NULL;
int is_data;
size_t ext_len = 0;
- php_uint32 flags;
+ uint32_t flags;
zend_object *ret;
/* a number that is not 0, 1 or 2 (Which is also Greg's birthday so there) */
zend_long format = 9021976, method = 9021976;
@@ -2580,7 +2554,7 @@ PHP_METHOD(Phar, delete)
return;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &fname, &fname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
RETURN_FALSE;
}
@@ -3092,7 +3066,7 @@ PHP_METHOD(Phar, getModified)
static int phar_set_compression(zval *zv, void *argument) /* {{{ */
{
phar_entry_info *entry = (phar_entry_info *)Z_PTR_P(zv);
- php_uint32 compress = *(php_uint32 *)argument;
+ uint32_t compress = *(uint32_t *)argument;
if (entry->is_deleted) {
return ZEND_HASH_APPLY_KEEP;
@@ -3130,7 +3104,7 @@ static int phar_test_compression(zval *zv, void *argument) /* {{{ */
}
/* }}} */
-static void pharobj_set_compression(HashTable *manifest, php_uint32 compress) /* {{{ */
+static void pharobj_set_compression(HashTable *manifest, uint32_t compress) /* {{{ */
{
zend_hash_apply_with_argument(manifest, phar_set_compression, &compress);
}
@@ -3156,7 +3130,7 @@ PHP_METHOD(Phar, compress)
zend_long method;
char *ext = NULL;
size_t ext_len = 0;
- php_uint32 flags;
+ uint32_t flags;
zend_object *ret;
PHAR_ARCHIVE_OBJECT();
@@ -3265,7 +3239,7 @@ PHP_METHOD(Phar, decompress)
PHP_METHOD(Phar, compressFiles)
{
char *error;
- php_uint32 flags;
+ uint32_t flags;
zend_long method;
PHAR_ARCHIVE_OBJECT();
@@ -3394,7 +3368,7 @@ PHP_METHOD(Phar, copy)
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &oldfile, &oldfile_len, &newfile, &newfile_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &oldfile, &oldfile_len, &newfile, &newfile_len) == FAILURE) {
return;
}
@@ -3494,7 +3468,7 @@ PHP_METHOD(Phar, offsetExists)
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &fname, &fname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
return;
}
@@ -3532,7 +3506,7 @@ PHP_METHOD(Phar, offsetGet)
zend_string *sfname;
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &fname, &fname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
return;
}
@@ -3679,8 +3653,8 @@ PHP_METHOD(Phar, offsetSet)
return;
}
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "sr", &fname, &fname_len, &zresource) == FAILURE
- && zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &fname, &fname_len, &cont_str, &cont_len) == FAILURE) {
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "pr", &fname, &fname_len, &zresource) == FAILURE
+ && zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &fname, &fname_len, &cont_str, &cont_len) == FAILURE) {
return;
}
@@ -3718,7 +3692,7 @@ PHP_METHOD(Phar, offsetUnset)
return;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &fname, &fname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
return;
}
@@ -3765,7 +3739,7 @@ PHP_METHOD(Phar, addEmptyDir)
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &dirname, &dirname_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &dirname, &dirname_len) == FAILURE) {
return;
}
@@ -3790,16 +3764,9 @@ PHP_METHOD(Phar, addFile)
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &fname, &fname_len, &localname, &localname_len) == FAILURE) {
- return;
- }
-
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
- zend_throw_exception_ex(spl_ce_RuntimeException, 0, "phar error: unable to open file \"%s\" to add to phar archive, safe_mode restrictions prevent this", fname);
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|s", &fname, &fname_len, &localname, &localname_len) == FAILURE) {
return;
}
-#endif
if (!strstr(fname, "://") && php_check_open_basedir(fname)) {
zend_throw_exception_ex(spl_ce_RuntimeException, 0, "phar error: unable to open file \"%s\" to add to phar archive, open_basedir restrictions prevent this", fname);
@@ -3832,7 +3799,7 @@ PHP_METHOD(Phar, addFromString)
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &localname, &localname_len, &cont_str, &cont_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ps", &localname, &localname_len, &cont_str, &cont_len) == FAILURE) {
return;
}
@@ -4046,13 +4013,6 @@ PHP_METHOD(Phar, delMetadata)
}
}
/* }}} */
-#if PHP_API_VERSION < 20100412
-#define PHAR_OPENBASEDIR_CHECKPATH(filename) \
- (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename)
-#else
-#define PHAR_OPENBASEDIR_CHECKPATH(filename) \
- php_check_open_basedir(filename)
-#endif
static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *dest, int dest_len, char **error) /* {{{ */
{
@@ -4062,6 +4022,9 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
char *fullpath;
const char *slash;
mode_t mode;
+ cwd_state new_state;
+ char *filename;
+ size_t filename_len;
if (entry->is_mounted) {
/* silently ignore mounted entries */
@@ -4071,8 +4034,39 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
if (entry->filename_len >= sizeof(".phar")-1 && !memcmp(entry->filename, ".phar", sizeof(".phar")-1)) {
return SUCCESS;
}
+ /* strip .. from path and restrict it to be under dest directory */
+ new_state.cwd = (char*)emalloc(2);
+ new_state.cwd[0] = DEFAULT_SLASH;
+ new_state.cwd[1] = '\0';
+ new_state.cwd_length = 1;
+ if (virtual_file_ex(&new_state, entry->filename, NULL, CWD_EXPAND) != 0 ||
+ new_state.cwd_length <= 1) {
+ if (EINVAL == errno && entry->filename_len > 50) {
+ char *tmp = estrndup(entry->filename, 50);
+ spprintf(error, 4096, "Cannot extract \"%s...\" to \"%s...\", extracted filename is too long for filesystem", tmp, dest);
+ efree(tmp);
+ } else {
+ spprintf(error, 4096, "Cannot extract \"%s\", internal error", entry->filename);
+ }
+ efree(new_state.cwd);
+ return FAILURE;
+ }
+ filename = new_state.cwd + 1;
+ filename_len = new_state.cwd_length - 1;
+#ifdef PHP_WIN32
+ /* unixify the path back, otherwise non zip formats might be broken */
+ {
+ int cnt = filename_len;
- len = spprintf(&fullpath, 0, "%s/%s", dest, entry->filename);
+ do {
+ if ('\\' == filename[cnt]) {
+ filename[cnt] = '/';
+ }
+ } while (cnt-- >= 0);
+ }
+#endif
+
+ len = spprintf(&fullpath, 0, "%s/%s", dest, filename);
if (len >= MAXPATHLEN) {
char *tmp;
@@ -4086,18 +4080,21 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
spprintf(error, 4096, "Cannot extract \"%s\" to \"%s...\", extracted filename is too long for filesystem", entry->filename, fullpath);
}
efree(fullpath);
+ efree(new_state.cwd);
return FAILURE;
}
if (!len) {
spprintf(error, 4096, "Cannot extract \"%s\", internal error", entry->filename);
efree(fullpath);
+ efree(new_state.cwd);
return FAILURE;
}
- if (PHAR_OPENBASEDIR_CHECKPATH(fullpath)) {
+ if (php_check_open_basedir(fullpath)) {
spprintf(error, 4096, "Cannot extract \"%s\" to \"%s\", openbasedir/safe mode restrictions in effect", entry->filename, fullpath);
efree(fullpath);
+ efree(new_state.cwd);
return FAILURE;
}
@@ -4105,14 +4102,15 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
if (!overwrite && SUCCESS == php_stream_stat_path(fullpath, &ssb)) {
spprintf(error, 4096, "Cannot extract \"%s\" to \"%s\", path already exists", entry->filename, fullpath);
efree(fullpath);
+ efree(new_state.cwd);
return FAILURE;
}
/* perform dirname */
- slash = zend_memrchr(entry->filename, '/', entry->filename_len);
+ slash = zend_memrchr(filename, '/', filename_len);
if (slash) {
- fullpath[dest_len + (slash - entry->filename) + 1] = '\0';
+ fullpath[dest_len + (slash - filename) + 1] = '\0';
} else {
fullpath[dest_len] = '\0';
}
@@ -4122,34 +4120,34 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
if (!php_stream_mkdir(fullpath, entry->flags & PHAR_ENT_PERM_MASK, PHP_STREAM_MKDIR_RECURSIVE, NULL)) {
spprintf(error, 4096, "Cannot extract \"%s\", could not create directory \"%s\"", entry->filename, fullpath);
efree(fullpath);
+ free(new_state.cwd);
return FAILURE;
}
} else {
if (!php_stream_mkdir(fullpath, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL)) {
spprintf(error, 4096, "Cannot extract \"%s\", could not create directory \"%s\"", entry->filename, fullpath);
efree(fullpath);
+ free(new_state.cwd);
return FAILURE;
}
}
}
if (slash) {
- fullpath[dest_len + (slash - entry->filename) + 1] = '/';
+ fullpath[dest_len + (slash - filename) + 1] = '/';
} else {
fullpath[dest_len] = '/';
}
+ filename = NULL;
+ efree(new_state.cwd);
/* it is a standalone directory, job done */
if (entry->is_dir) {
efree(fullpath);
return SUCCESS;
}
-#if PHP_API_VERSION < 20100412
- fp = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
-#else
fp = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL);
-#endif
if (!fp) {
spprintf(error, 4096, "Cannot extract \"%s\", could not open for writing \"%s\"", entry->filename, fullpath);
@@ -4216,7 +4214,7 @@ PHP_METHOD(Phar, extractTo)
PHAR_ARCHIVE_OBJECT();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z!b", &pathto, &pathto_len, &zval_files, &overwrite) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|z!b", &pathto, &pathto_len, &zval_files, &overwrite) == FAILURE) {
return;
}
@@ -4348,7 +4346,7 @@ PHP_METHOD(PharFileInfo, __construct)
phar_archive_data *phar_data;
zval *zobj = getThis(), arg1;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "s", &fname, &fname_len) == FAILURE) {
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
return;
}
@@ -4995,10 +4993,7 @@ PHP_METHOD(PharFileInfo, decompress)
}
/* }}} */
-#endif /* HAVE_SPL */
-
/* {{{ phar methods */
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar___construct, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, flags)
@@ -5006,47 +5001,39 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar___construct, 0, 0, 1)
ZEND_ARG_INFO(0, fileformat)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_createDS, 0, 0, 0)
ZEND_ARG_INFO(0, index)
ZEND_ARG_INFO(0, webindex)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_cancompress, 0, 0, 0)
ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_isvalidpharfilename, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, executable)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_loadPhar, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, alias)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_mapPhar, 0, 0, 0)
ZEND_ARG_INFO(0, alias)
ZEND_ARG_INFO(0, offset)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_mount, 0, 0, 2)
ZEND_ARG_INFO(0, inphar)
ZEND_ARG_INFO(0, externalfile)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_mungServer, 0, 0, 1)
ZEND_ARG_INFO(0, munglist)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_webPhar, 0, 0, 0)
ZEND_ARG_INFO(0, alias)
ZEND_ARG_INFO(0, index)
@@ -5055,141 +5042,112 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_webPhar, 0, 0, 0)
ZEND_ARG_INFO(0, rewrites)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 1)
ZEND_ARG_INFO(0, retphar)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_ua, 0, 0, 1)
ZEND_ARG_INFO(0, archive)
ZEND_END_ARG_INFO()
-#if HAVE_SPL
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_build, 0, 0, 1)
ZEND_ARG_INFO(0, iterator)
ZEND_ARG_INFO(0, base_directory)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_conv, 0, 0, 0)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, compression_type)
ZEND_ARG_INFO(0, file_ext)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_comps, 0, 0, 1)
ZEND_ARG_INFO(0, compression_type)
ZEND_ARG_INFO(0, file_ext)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_decomp, 0, 0, 0)
ZEND_ARG_INFO(0, file_ext)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_comp, 0, 0, 1)
ZEND_ARG_INFO(0, compression_type)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_compo, 0, 0, 0)
ZEND_ARG_INFO(0, compression_type)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_copy, 0, 0, 2)
ZEND_ARG_INFO(0, newfile)
ZEND_ARG_INFO(0, oldfile)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_delete, 0, 0, 1)
ZEND_ARG_INFO(0, entry)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_fromdir, 0, 0, 1)
ZEND_ARG_INFO(0, base_dir)
ZEND_ARG_INFO(0, regex)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_offsetExists, 0, 0, 1)
ZEND_ARG_INFO(0, entry)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_offsetSet, 0, 0, 2)
ZEND_ARG_INFO(0, entry)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_setAlias, 0, 0, 1)
ZEND_ARG_INFO(0, alias)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_setMetadata, 0, 0, 1)
ZEND_ARG_INFO(0, metadata)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_setSigAlgo, 0, 0, 1)
ZEND_ARG_INFO(0, algorithm)
ZEND_ARG_INFO(0, privatekey)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_setStub, 0, 0, 1)
ZEND_ARG_INFO(0, newstub)
ZEND_ARG_INFO(0, maxlen)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_emptydir, 0, 0, 0)
ZEND_ARG_INFO(0, dirname)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_extract, 0, 0, 1)
ZEND_ARG_INFO(0, pathto)
ZEND_ARG_INFO(0, files)
ZEND_ARG_INFO(0, overwrite)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_addfile, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, localname)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_fromstring, 0, 0, 1)
ZEND_ARG_INFO(0, localname)
ZEND_ARG_INFO(0, contents)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_isff, 0, 0, 1)
ZEND_ARG_INFO(0, fileformat)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO(arginfo_phar__void, 0)
ZEND_END_ARG_INFO()
-#endif /* HAVE_SPL */
-
zend_function_entry php_archive_methods[] = {
-#if !HAVE_SPL
- PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PRIVATE)
-#else
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PUBLIC)
PHP_ME(Phar, __destruct, arginfo_phar__void, ZEND_ACC_PUBLIC)
PHP_ME(Phar, addEmptyDir, arginfo_phar_emptydir, ZEND_ACC_PUBLIC)
@@ -5231,7 +5189,6 @@ zend_function_entry php_archive_methods[] = {
PHP_ME(Phar, setStub, arginfo_phar_setStub, ZEND_ACC_PUBLIC)
PHP_ME(Phar, startBuffering, arginfo_phar__void, ZEND_ACC_PUBLIC)
PHP_ME(Phar, stopBuffering, arginfo_phar__void, ZEND_ACC_PUBLIC)
-#endif
/* static member functions */
PHP_ME(Phar, apiVersion, arginfo_phar__void, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
PHP_ME(Phar, canCompress, arginfo_phar_cancompress, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
@@ -5251,13 +5208,10 @@ zend_function_entry php_archive_methods[] = {
PHP_FE_END
};
-#if HAVE_SPL
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_entry___construct, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_END_ARG_INFO()
-PHAR_ARG_INFO
ZEND_BEGIN_ARG_INFO_EX(arginfo_entry_chmod, 0, 0, 1)
ZEND_ARG_INFO(0, perms)
ZEND_END_ARG_INFO()
@@ -5280,7 +5234,6 @@ zend_function_entry php_entry_methods[] = {
PHP_ME(PharFileInfo, setMetadata, arginfo_phar_setMetadata, ZEND_ACC_PUBLIC)
PHP_FE_END
};
-#endif /* HAVE_SPL */
zend_function_entry phar_exception_methods[] = {
PHP_FE_END
@@ -5297,7 +5250,6 @@ void phar_object_init(void) /* {{{ */
INIT_CLASS_ENTRY(ce, "PharException", phar_exception_methods);
phar_ce_PharException = zend_register_internal_class_ex(&ce, zend_ce_exception);
-#if HAVE_SPL
INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods);
phar_ce_archive = zend_register_internal_class_ex(&ce, spl_ce_RecursiveDirectoryIterator);
@@ -5310,15 +5262,6 @@ void phar_object_init(void) /* {{{ */
INIT_CLASS_ENTRY(ce, "PharFileInfo", php_entry_methods);
phar_ce_entry = zend_register_internal_class_ex(&ce, spl_ce_SplFileInfo);
-#else
- INIT_CLASS_ENTRY(ce, "Phar", php_archive_methods);
- phar_ce_archive = zend_register_internal_class(&ce);
- phar_ce_archive->ce_flags |= ZEND_ACC_FINAL;
-
- INIT_CLASS_ENTRY(ce, "PharData", php_archive_methods);
- phar_ce_data = zend_register_internal_class(&ce);
- phar_ce_data->ce_flags |= ZEND_ACC_FINAL;
-#endif
REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "BZ2", PHAR_ENT_COMPRESSED_BZ2)
REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "GZ", PHAR_ENT_COMPRESSED_GZ)
diff --git a/ext/phar/phar_path_check.c b/ext/phar/phar_path_check.c
index db68069799..6fc23713aa 100644
--- a/ext/phar/phar_path_check.c
+++ b/ext/phar/phar_path_check.c
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2007-2015 The PHP Group |
+ | Copyright (c) 2007-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/phar_path_check.re b/ext/phar/phar_path_check.re
index c03131b7e9..3a016c44eb 100644
--- a/ext/phar/phar_path_check.re
+++ b/ext/phar/phar_path_check.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2007-2015 The PHP Group |
+ | Copyright (c) 2007-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/pharzip.h b/ext/phar/pharzip.h
index 36560ec855..9efdacc3fe 100644
--- a/ext/phar/pharzip.h
+++ b/ext/phar/pharzip.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/php_phar.h b/ext/phar/php_phar.h
index c797e75096..a767148874 100644
--- a/ext/phar/php_phar.h
+++ b/ext/phar/php_phar.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/stream.c b/ext/phar/stream.c
index 13177cb917..e68c04b0ec 100644
--- a/ext/phar/stream.c
+++ b/ext/phar/stream.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar:// stream wrapper support |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/stream.h b/ext/phar/stream.h
index 2b637c0caf..ecdf7eb56f 100644
--- a/ext/phar/stream.h
+++ b/ext/phar/stream.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension |
+----------------------------------------------------------------------+
- | Copyright (c) 2006-2015 The PHP Group |
+ | Copyright (c) 2006-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/stub.h b/ext/phar/stub.h
index db1940bdec..139ac5da57 100644
--- a/ext/phar/stub.h
+++ b/ext/phar/stub.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| phar php single-file executable PHP extension generated stub |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index 61ae79be8c..e40739726b 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| TAR archive support for Phar |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,9 +19,9 @@
#include "phar_internal.h"
-static php_uint32 phar_tar_number(char *buf, int len) /* {{{ */
+static uint32_t phar_tar_number(char *buf, int len) /* {{{ */
{
- php_uint32 num = 0;
+ uint32_t num = 0;
int i = 0;
while (i < len && buf[i] == ' ') {
@@ -62,7 +62,7 @@ static php_uint32 phar_tar_number(char *buf, int len) /* {{{ */
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-static int phar_tar_octal(char *buf, php_uint32 val, int len) /* {{{ */
+static int phar_tar_octal(char *buf, uint32_t val, int len) /* {{{ */
{
char *p = buf;
int s = len;
@@ -84,9 +84,9 @@ static int phar_tar_octal(char *buf, php_uint32 val, int len) /* {{{ */
}
/* }}} */
-static php_uint32 phar_tar_checksum(char *buf, int len) /* {{{ */
+static uint32_t phar_tar_checksum(char *buf, int len) /* {{{ */
{
- php_uint32 sum = 0;
+ uint32_t sum = 0;
char *end = buf + len;
while (buf != end) {
@@ -100,8 +100,8 @@ static php_uint32 phar_tar_checksum(char *buf, int len) /* {{{ */
int phar_is_tar(char *buf, char *fname) /* {{{ */
{
tar_header *header = (tar_header *) buf;
- php_uint32 checksum = phar_tar_number(header->checksum, sizeof(header->checksum));
- php_uint32 ret;
+ uint32_t checksum = phar_tar_number(header->checksum, sizeof(header->checksum));
+ uint32_t ret;
char save[sizeof(header->checksum)], *bname;
/* assume that the first filename in a tar won't begin with <?php */
@@ -195,15 +195,23 @@ static int phar_tar_process_metadata(phar_entry_info *entry, php_stream *fp) /*
}
/* }}} */
-int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 compression, char **error) /* {{{ */
+#if !HAVE_STRNLEN
+static size_t strnlen(const char *s, size_t maxlen) {
+ char *r = (char *)memchr(s, '\0', maxlen);
+ return r ? r-s : maxlen;
+}
+#endif
+
+int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, uint32_t compression, char **error) /* {{{ */
{
char buf[512], *actual_alias = NULL, *p;
phar_entry_info entry = {0};
size_t pos = 0, read, totalsize;
tar_header *hdr;
- php_uint32 sum1, sum2, size, old;
+ uint32_t sum1, sum2, size, old;
phar_archive_data *myphar, *actual;
int last_was_longlink = 0;
+ int linkname_len;
if (error) {
*error = NULL;
@@ -264,7 +272,7 @@ int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias,
goto next;
}
- if (((!old && hdr->prefix[0] == 0) || old) && strlen(hdr->name) == sizeof(".phar/signature.bin")-1 && !strncmp(hdr->name, ".phar/signature.bin", sizeof(".phar/signature.bin")-1)) {
+ if (((!old && hdr->prefix[0] == 0) || old) && strnlen(hdr->name, 100) == sizeof(".phar/signature.bin")-1 && !strncmp(hdr->name, ".phar/signature.bin", sizeof(".phar/signature.bin")-1)) {
zend_off_t curloc;
if (size > 511) {
@@ -291,7 +299,7 @@ bail:
| ((((unsigned char*)(buffer))[1]) << 8) \
| (((unsigned char*)(buffer))[0]))
#else
-# define PHAR_GET_32(buffer) (php_uint32) *(buffer)
+# define PHAR_GET_32(buffer) (uint32_t) *(buffer)
#endif
myphar->sig_flags = PHAR_GET_32(buf);
if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, myphar->sig_flags, buf + 8, size - 8, fname, &myphar->signature, &myphar->sig_len, error)) {
@@ -348,7 +356,7 @@ bail:
entry.filename_len = entry.uncompressed_filesize;
/* Check for overflow - bug 61065 */
- if (entry.filename_len == UINT_MAX) {
+ if (entry.filename_len == UINT_MAX || entry.filename_len == 0) {
if (error) {
spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (invalid entry size)", fname);
}
@@ -472,30 +480,27 @@ bail:
}
entry.link = NULL;
-
+ /* link field is null-terminated unless it has 100 non-null chars.
+ * Thus we can not use strlen. */
+ linkname_len = strnlen(hdr->linkname, 100);
if (entry.tar_type == TAR_LINK) {
- if (!zend_hash_str_exists(&myphar->manifest, hdr->linkname, strlen(hdr->linkname))) {
+ if (!zend_hash_str_exists(&myphar->manifest, hdr->linkname, linkname_len)) {
if (error) {
- spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file - hard link to non-existent file \"%s\"", fname, hdr->linkname);
+ spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file - hard link to non-existent file \"%.*s\"", fname, linkname_len, hdr->linkname);
}
pefree(entry.filename, entry.is_persistent);
php_stream_close(fp);
phar_destroy_phar_data(myphar);
return FAILURE;
}
- entry.link = estrdup(hdr->linkname);
+ entry.link = estrndup(hdr->linkname, linkname_len);
} else if (entry.tar_type == TAR_SYMLINK) {
- entry.link = estrdup(hdr->linkname);
+ entry.link = estrndup(hdr->linkname, linkname_len);
}
phar_set_inode(&entry);
- if ((newentry = zend_hash_str_add_mem(&myphar->manifest, entry.filename, entry.filename_len, (void*)&entry, sizeof(phar_entry_info))) == NULL) {
- if (error) {
- spprintf(error, 4096, "phar error: tar-based phar \"%s\" cannot be registered", entry.filename);
- }
- php_stream_close(fp);
- phar_destroy_phar_data(myphar);
- return FAILURE;
- }
+
+ newentry = zend_hash_str_update_mem(&myphar->manifest, entry.filename, entry.filename_len, (void*)&entry, sizeof(phar_entry_info));
+ ZEND_ASSERT(newentry != NULL);
if (entry.is_persistent) {
++entry.manifest_pos;
@@ -1225,12 +1230,12 @@ nostub:
}
#ifdef WORDS_BIGENDIAN
# define PHAR_SET_32(var, buffer) \
- *(php_uint32 *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \
+ *(uint32_t *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \
| ((((unsigned char*)&(buffer))[2]) << 16) \
| ((((unsigned char*)&(buffer))[1]) << 8) \
| (((unsigned char*)&(buffer))[0]))
#else
-# define PHAR_SET_32(var, buffer) *(php_uint32 *)(var) = (php_uint32) (buffer)
+# define PHAR_SET_32(var, buffer) *(uint32_t *)(var) = (uint32_t) (buffer)
#endif
PHAR_SET_32(sigbuf, phar->sig_flags);
PHAR_SET_32(sigbuf + 4, signature_length);
diff --git a/ext/phar/tar.h b/ext/phar/tar.h
index c92d16280e..02399aa6bb 100644
--- a/ext/phar/tar.h
+++ b/ext/phar/tar.h
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| TAR archive support for Phar |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt
index a1a9fb78a0..4d0887f66f 100644
--- a/ext/phar/tests/badparameters.phpt
+++ b/ext/phar/tests/badparameters.phpt
@@ -147,19 +147,19 @@ echo $e->getMessage() . "\n";
--EXPECTF--
Warning: Phar::mungServer() expects parameter 1 to be array, %string given in %sbadparameters.php on line %d
-Warning: Phar::createDefaultStub() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: Phar::createDefaultStub() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-Warning: Phar::loadPhar() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: Phar::loadPhar() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
Warning: Phar::canCompress() expects parameter 1 to be integer, %string given in %sbadparameters.php on line %d
-Exception: Phar::__construct() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Exception: Phar::__construct() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
Warning: Phar::convertToExecutable() expects parameter 1 to be integer, array given in %sbadparameters.php on line %d
Warning: Phar::convertToData() expects parameter 1 to be integer, array given in %sbadparameters.php on line %d
-Warning: PharData::delete() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: PharData::delete() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
Cannot write out phar archive, phar is read-only
Entry oops does not exist and cannot be deleted
%sfiles/frontcontroller10.phar
@@ -186,18 +186,18 @@ Phar is readonly, cannot change compression
Warning: Phar::copy() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
Cannot copy "a" to "b", phar is read-only
-Warning: Phar::offsetExists() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: Phar::offsetExists() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-Warning: Phar::offsetGet() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: Phar::offsetGet() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
Warning: Phar::offsetSet() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
-Warning: PharData::offsetUnset() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: PharData::offsetUnset() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
Write operations disabled by the php.ini setting phar.readonly
-Warning: Phar::addEmptyDir() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: Phar::addEmptyDir() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
-Warning: Phar::addFile() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d
+Warning: Phar::addFile() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d
Warning: Phar::addFromString() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d
Write operations disabled by the php.ini setting phar.readonly
diff --git a/ext/phar/tests/bug64931/bug64931.phpt b/ext/phar/tests/bug64931/bug64931.phpt
index 9c1f9dcaf1..630746cdf8 100644
--- a/ext/phar/tests/bug64931/bug64931.phpt
+++ b/ext/phar/tests/bug64931/bug64931.phpt
@@ -48,11 +48,12 @@ try {
<?php
@unlink(__DIR__."/bug64931.phar");
?>
---EXPECT--
+--EXPECTF--
Test
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
CAUGHT: Cannot create any files in magic ".phar" directory
-CAUGHT: Cannot create any files in magic ".phar" directory
-===DONE=== \ No newline at end of file
+
+Warning: Phar::addFromString() expects parameter 1 to be a valid path, string given in %s%ebug64931.php on line %d
+===DONE===
diff --git a/ext/phar/tests/bug69720.phar b/ext/phar/tests/bug69720.phar
new file mode 100644
index 0000000000..f62fb11280
--- /dev/null
+++ b/ext/phar/tests/bug69720.phar
Binary files differ
diff --git a/ext/phar/tests/bug69720.phpt b/ext/phar/tests/bug69720.phpt
new file mode 100644
index 0000000000..286d3cbdbe
--- /dev/null
+++ b/ext/phar/tests/bug69720.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Phar - bug #69720 - Null pointer dereference in phar_get_fp_offset()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+try {
+ // open an existing phar
+ $p = new Phar(__DIR__."/bug69720.phar",0);
+ // Phar extends SPL's DirectoryIterator class
+ echo $p->getMetadata();
+ foreach (new RecursiveIteratorIterator($p) as $file) {
+ // $file is a PharFileInfo class, and inherits from SplFileInfo
+ $temp="";
+ $temp= $file->getFileName() . "\n";
+ $temp.=file_get_contents($file->getPathName()) . "\n"; // display contents
+ var_dump($file->getMetadata());
+ }
+}
+ catch (Exception $e) {
+ echo 'Could not open Phar: ', $e;
+}
+?>
+--EXPECTF--
+
+MY_METADATA_NULL
+
+Warning: file_get_contents(phar://%s): failed to open stream: phar error: "test.php" is not a file in phar "%s.phar" in %s.php on line %d
+array(1) {
+ ["whatever"]=>
+ int(123)
+}
+object(DateTime)#2 (3) {
+ ["date"]=>
+ string(26) "2000-01-01 00:00:00.000000"
+ ["timezone_type"]=>
+ int(3)
+ ["timezone"]=>
+ string(3) "UTC"
+}
diff --git a/ext/phar/tests/bug69958.phpt b/ext/phar/tests/bug69958.phpt
new file mode 100644
index 0000000000..96f2198b14
--- /dev/null
+++ b/ext/phar/tests/bug69958.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Phar: bug #69958: Segfault in Phar::convertToData on invalid file
+--XFAIL--
+Still has memory leaks, see https://bugs.php.net/bug.php?id=70005
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$tarphar = new PharData(__DIR__.'/bug69958.tar');
+$phar = $tarphar->convertToData(Phar::TAR);
+--EXPECTF--
+Fatal error: Uncaught exception 'BadMethodCallException' with message 'phar "%s/bug69958.tar" exists and must be unlinked prior to conversion' in %s/bug69958.php:%d
+Stack trace:
+#0 %s/bug69958.php(%d): PharData->convertToData(%d)
+#1 {main}
+ thrown in %s/bug69958.php on line %d
diff --git a/ext/phar/tests/bug69958.tar b/ext/phar/tests/bug69958.tar
new file mode 100644
index 0000000000..02275248bd
--- /dev/null
+++ b/ext/phar/tests/bug69958.tar
Binary files differ
diff --git a/ext/phar/tests/bug70019.phpt b/ext/phar/tests/bug70019.phpt
new file mode 100644
index 0000000000..85bf1780aa
--- /dev/null
+++ b/ext/phar/tests/bug70019.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #70019 Files extracted from archive may be placed outside of destination directory
+--SKIPIF--
+<?php if (!extension_loaded("phar") || !extension_loaded('zlib')) die("skip"); ?>
+--FILE--
+<?php
+$dir = __DIR__."/bug70019";
+$phar = new PharData(__DIR__."/bug70019.zip");
+if(!is_dir($dir)) {
+ mkdir($dir);
+}
+$phar->extractTo($dir);
+var_dump(file_exists("$dir/ThisIsATestFile.txt"));
+?>
+===DONE===
+--CLEAN--
+<?php
+$dir = __DIR__."/bug70019";
+unlink("$dir/ThisIsATestFile.txt");
+rmdir($dir);
+?>
+--EXPECTF--
+bool(true)
+===DONE===
diff --git a/ext/phar/tests/bug70019.zip b/ext/phar/tests/bug70019.zip
new file mode 100644
index 0000000000..faf152df7e
--- /dev/null
+++ b/ext/phar/tests/bug70019.zip
Binary files differ
diff --git a/ext/phar/tests/bug70433.phpt b/ext/phar/tests/bug70433.phpt
new file mode 100644
index 0000000000..cc8f438463
--- /dev/null
+++ b/ext/phar/tests/bug70433.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Phar - bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/"
+--SKIPIF--
+<?php if (!extension_loaded("phar") || !extension_loaded("zlib")) die("skip"); ?>
+--FILE--
+<?php
+$phar = new PharData(__DIR__."/bug70433.zip");
+var_dump($phar);
+$meta = $phar->getMetadata();
+var_dump($meta);
+?>
+DONE
+--EXPECTF--
+object(PharData)#1 (3) {
+ ["pathName":"SplFileInfo":private]=>
+ string(0) ""
+ ["glob":"DirectoryIterator":private]=>
+ bool(false)
+ ["subPathName":"RecursiveDirectoryIterator":private]=>
+ string(0) ""
+}
+NULL
+DONE
diff --git a/ext/phar/tests/bug70433.zip b/ext/phar/tests/bug70433.zip
new file mode 100755
index 0000000000..232a2210f5
--- /dev/null
+++ b/ext/phar/tests/bug70433.zip
Binary files differ
diff --git a/ext/phar/tests/bug71331.phpt b/ext/phar/tests/bug71331.phpt
new file mode 100644
index 0000000000..0026c406e8
--- /dev/null
+++ b/ext/phar/tests/bug71331.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #71331 (Uninitialized pointer in phar_make_dirstream())
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$p = new PharData(__DIR__."/bug71331.tar");
+?>
+DONE
+--EXPECTF--
+Fatal error: Uncaught UnexpectedValueException: phar error: "%s%ebug71331.tar" is a corrupted tar file (invalid entry size) in %s%ebug71331.php:2
+Stack trace:
+#0 %s%ebug71331.php(2): PharData->__construct('%s')
+#1 {main}
+ thrown in %s%ebug71331.php on line 2
diff --git a/ext/phar/tests/bug71331.tar b/ext/phar/tests/bug71331.tar
new file mode 100644
index 0000000000..14eec28781
--- /dev/null
+++ b/ext/phar/tests/bug71331.tar
Binary files differ
diff --git a/ext/phar/tests/bug71354.phpt b/ext/phar/tests/bug71354.phpt
new file mode 100644
index 0000000000..43230f1520
--- /dev/null
+++ b/ext/phar/tests/bug71354.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Phar: bug #71354: Heap corruption in tar/zip/phar parser.
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$p = new PharData(__DIR__."/bug71354.tar");
+var_dump($p['aaaa']->getContent());
+?>
+DONE
+--EXPECT--
+string(0) ""
+DONE \ No newline at end of file
diff --git a/ext/phar/tests/bug71354.tar b/ext/phar/tests/bug71354.tar
new file mode 100644
index 0000000000..b0bd992b9e
--- /dev/null
+++ b/ext/phar/tests/bug71354.tar
Binary files differ
diff --git a/ext/phar/tests/bug71391.phpt b/ext/phar/tests/bug71391.phpt
new file mode 100644
index 0000000000..b8d84f5375
--- /dev/null
+++ b/ext/phar/tests/bug71391.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Phar: bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+// duplicate since the tar will change
+copy(__DIR__."/bug71391.tar", __DIR__."/bug71391.test.tar");
+$p = new PharData(__DIR__."/bug71391.test.tar");
+$p->delMetaData();
+?>
+DONE
+--CLEAN--
+<?php
+unlink(__DIR__."/bug71391.test.tar");
+?>
+--EXPECT--
+DONE \ No newline at end of file
diff --git a/ext/phar/tests/bug71391.tar b/ext/phar/tests/bug71391.tar
new file mode 100644
index 0000000000..a5b155ac87
--- /dev/null
+++ b/ext/phar/tests/bug71391.tar
Binary files differ
diff --git a/ext/phar/tests/bug71488.phpt b/ext/phar/tests/bug71488.phpt
new file mode 100644
index 0000000000..22d2bf098f
--- /dev/null
+++ b/ext/phar/tests/bug71488.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: bug #71488: Stack overflow when decompressing tar archives
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$p = new PharData(__DIR__."/bug71488.tar");
+$newp = $p->decompress("test");
+?>
+
+DONE
+--CLEAN--
+<?php
+@unlink(__DIR__."/bug71488.test");
+?>
+--EXPECT--
+DONE \ No newline at end of file
diff --git a/ext/phar/tests/bug71488.tar b/ext/phar/tests/bug71488.tar
new file mode 100644
index 0000000000..6e14195025
--- /dev/null
+++ b/ext/phar/tests/bug71488.tar
Binary files differ
diff --git a/ext/phar/tests/bug71498.phpt b/ext/phar/tests/bug71498.phpt
new file mode 100644
index 0000000000..4157ac20b6
--- /dev/null
+++ b/ext/phar/tests/bug71498.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Phar: bug #71498: Out-of-Bound Read in phar_parse_zipfile()
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+try {
+$p = new PharData(__DIR__."/bug71498.zip");
+} catch(UnexpectedValueException $e) {
+ echo $e->getMessage();
+}
+?>
+
+DONE
+--EXPECTF--
+phar error: end of central directory not found in zip-based phar "%s%ebug71498.zip"
+DONE
diff --git a/ext/phar/tests/bug71498.zip b/ext/phar/tests/bug71498.zip
new file mode 100644
index 0000000000..ae78dd871e
--- /dev/null
+++ b/ext/phar/tests/bug71498.zip
Binary files differ
diff --git a/ext/phar/tests/bug71625.phpt b/ext/phar/tests/bug71625.phpt
new file mode 100644
index 0000000000..8e6c31f462
--- /dev/null
+++ b/ext/phar/tests/bug71625.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Phar - Bug #71625 - Crash in php7.dll
+--INI--
+phar.readonly=0
+--SKIPIF--
+<?php
+
+if (!extension_loaded("phar") || !extension_loaded("zlib")) die("skip");
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+
+?>
+--FILE--
+<?php
+$phar = new Phar("A:A:.phar");
+$phar["hello_habr.txt"] = '<? Hello Habr!?>';
+?>
+DONE
+--EXPECTF--
+Fatal error: Uncaught UnexpectedValueException: Cannot create phar 'A:A:.phar', file extension (or combination) not recognised or the directory does not exist in %sbug71625.php:%d
+Stack trace:
+#0 %sbug71625.php(%d): Phar->__construct('A:A:.phar')
+#1 {main}
+ thrown in %sbug71625.php on line %d
diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt
index fe2cd3e22b..3449b07fc6 100644
--- a/ext/phar/tests/create_path_error.phpt
+++ b/ext/phar/tests/create_path_error.phpt
@@ -80,6 +80,5 @@ string(5) "query"
11:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contains illegal character
12:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contains illegal character
13:Error: file_put_contents(phar://%s): failed to open stream: phar error: invalid path "%s" contains illegal character
-Exception: Entry a does not exist and cannot be created: phar error: invalid path "a" contains illegal character
-===DONE===
+Error: Phar::offsetSet() expects parameter 1 to be a valid path, string given===DONE===
diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt
index bc545236fd..f7d1403d59 100644
--- a/ext/phar/tests/phar_extract.phpt
+++ b/ext/phar/tests/phar_extract.phpt
@@ -138,7 +138,7 @@ string(3) "hi2"
bool(false)
Invalid argument, expected a filename (string) or array of filenames
-Warning: Phar::extractTo() expects parameter 1 to be %string, array given in %sphar_extract.php on line %d
+Warning: Phar::extractTo() expects parameter 1 to be a valid path, array given in %sphar_extract.php on line %d
Invalid argument, extraction path must be non-zero length
Unable to use path "%soops" for extraction, it is a file, must be a directory
Invalid argument, array of filenames to extract contains non-string value
diff --git a/ext/phar/tests/phar_isvalidpharfilename.phpt b/ext/phar/tests/phar_isvalidpharfilename.phpt
index dee9b7dc03..da07bec287 100644
--- a/ext/phar/tests/phar_isvalidpharfilename.phpt
+++ b/ext/phar/tests/phar_isvalidpharfilename.phpt
@@ -76,7 +76,7 @@ var_dump(Phar::isValidPharFilename('dir.phar.php', false));
<?php
rmdir(dirname(__FILE__) . '/.phar');
--EXPECTF--
-Warning: Phar::isValidPharFilename() expects parameter 1 to be %string, array given in %sphar_isvalidpharfilename.php on line %d
+Warning: Phar::isValidPharFilename() expects parameter 1 to be a valid path, array given in %sphar_isvalidpharfilename.php on line %d
*
bool(false)
bool(false)
diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt
index 4800c5272d..2f441bace5 100644
--- a/ext/phar/tests/phar_unlinkarchive.phpt
+++ b/ext/phar/tests/phar_unlinkarchive.phpt
@@ -90,7 +90,7 @@ Unknown phar archive ""
Unknown phar archive "%sphar_unlinkarchive.phar"
Unknown phar archive "%sphar_unlinkarchive.phar.tar": internal corruption of phar "%sphar_unlinkarchive.phar.tar" (truncated entry)
-Warning: Phar::unlinkArchive() expects parameter 1 to be %string, array given in %sphar_unlinkarchive.php on line %d
+Warning: Phar::unlinkArchive() expects parameter 1 to be a valid path, array given in %sphar_unlinkarchive.php on line %d
bool(false)
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
phar archive "%sphar_unlinkarchive.phar" has open file handles or objects. fclose() all file handles, and unset() all objects prior to calling unlinkArchive()
diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt
index 1f4f6177b0..53ee5143cf 100644
--- a/ext/phar/tests/pharfileinfo_construct.phpt
+++ b/ext/phar/tests/pharfileinfo_construct.phpt
@@ -50,7 +50,7 @@ echo $e->getMessage() . "\n";
<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?>
--EXPECTF--
Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry)
-PharFileInfo::__construct() expects parameter 1 to be string, array given
+PharFileInfo::__construct() expects parameter 1 to be a valid path, array given
Cannot access phar file entry '%s' in archive '%s'
Cannot call constructor twice
'%s' is not a valid phar archive URL (must have at least phar://filename.phar)
diff --git a/ext/phar/tests/tar/bug71317-duplicate-filename.phpt b/ext/phar/tests/tar/bug71317-duplicate-filename.phpt
new file mode 100644
index 0000000000..bcbccab1c8
--- /dev/null
+++ b/ext/phar/tests/tar/bug71317-duplicate-filename.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #71317: regression in opening tar based phar files
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--FILE--
+<?php
+include dirname(__FILE__) . '/files/tarmaker.php.inc';
+
+$testDirectory = __DIR__ . '/files/test_bug71317';
+$testTarFilename = __DIR__ . '/files/test_bug71317.tar';
+
+$tar = new tarmaker($testTarFilename, 'none');
+$tar->init();
+$tar->addFile('file1.txt', 'file1');
+$tar->addFile('file2.txt', 'file2');
+$tar->addFile('file3.txt', 'file3');
+$tar->addFile('file4.txt', 'file4');
+$tar->addFile('file5.txt', 'file5');
+$tar->addFile('file2.txt', 'file2a');
+$tar->close();
+
+$fname = str_replace('\\', '/', $testTarFilename);
+try {
+ mkdir($testDirectory);
+ $tar = new PharData($fname);
+ $tar->extractTo($testDirectory);
+
+ $fileContent = file_get_contents($testDirectory . '/file2.txt');
+ $expectedContent = 'file2a';
+ if ($fileContent !== $expectedContent) {
+ throw new Exception(sprintf('Contents of file2.txt ("%s") is invalid, expected "%s"', $fileContent, $expectedContent));
+ }
+} catch(Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--CLEAN--
+<?php
+$testDirectory = __DIR__ . '/files/test_bug71317';
+$testTarFilename = __DIR__ . '/files/test_bug71317.tar';
+
+unlink($testTarFilename);
+array_map('unlink', glob($testDirectory . "/*.txt"));
+rmdir($testDirectory);
+?>
+--EXPECT--
+===DONE===
diff --git a/ext/phar/tests/tar/bug71504.phpt b/ext/phar/tests/tar/bug71504.phpt
new file mode 100644
index 0000000000..e85078810e
--- /dev/null
+++ b/ext/phar/tests/tar/bug71504.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #71504: Parsing of tar file with duplicate filenames causes memory leak
+--SKIPIF--
+<?php if (!extension_loaded('phar')) die('skip'); ?>
+<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
+<?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?>
+--FILE--
+<?php
+$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/HTML_CSS-1.5.4.tgz');
+try {
+ $tar = new PharData($fname);
+} catch(Exception $e) {
+ echo $e->getMessage() . "\n";
+}
+?>
+===DONE===
+--EXPECT--
+===DONE===
diff --git a/ext/phar/tests/tar/files/HTML_CSS-1.5.4.tgz b/ext/phar/tests/tar/files/HTML_CSS-1.5.4.tgz
new file mode 100644
index 0000000000..d0b2313e7a
--- /dev/null
+++ b/ext/phar/tests/tar/files/HTML_CSS-1.5.4.tgz
Binary files differ
diff --git a/ext/phar/util.c b/ext/phar/util.c
index d561342cca..39ecf399ae 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -3,7 +3,7 @@
| phar php single-file executable PHP extension |
| utility functions |
+----------------------------------------------------------------------+
- | Copyright (c) 2005-2015 The PHP Group |
+ | Copyright (c) 2005-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -199,13 +199,6 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, int filename_len,
entry.tmp = estrndup(filename, filename_len);
}
}
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && !is_phar && (!php_checkuid(entry.tmp, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
- efree(entry.tmp);
- efree(entry.filename);
- return FAILURE;
- }
-#endif
filename = entry.tmp;
/* only check openbasedir for files, not for phar streams */
@@ -493,7 +486,12 @@ really_get_entry:
(*ret)->is_tar = entry->is_tar;
(*ret)->fp = phar_get_efp(entry, 1);
if (entry->link) {
- (*ret)->zero = phar_get_fp_offset(phar_get_link_source(entry));
+ phar_entry_info *link = phar_get_link_source(entry);
+ if(!link) {
+ efree(*ret);
+ return FAILURE;
+ }
+ (*ret)->zero = phar_get_fp_offset(link);
} else {
(*ret)->zero = phar_get_fp_offset(entry);
}
@@ -1179,7 +1177,7 @@ char * phar_compress_filter(phar_entry_info * entry, int return_unknown) /* {{{
*/
char * phar_decompress_filter(phar_entry_info * entry, int return_unknown) /* {{{ */
{
- php_uint32 flags;
+ uint32_t flags;
if (entry->is_modified) {
flags = entry->old_flags;
@@ -1475,7 +1473,7 @@ static int phar_call_openssl_signverify(int is_sign, php_stream *fp, zend_off_t
/* }}} */
#endif /* #ifndef PHAR_HAVE_OPENSSL */
-int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_type, char *sig, int sig_len, char *fname, char **signature, int *signature_len, char **error) /* {{{ */
+int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type, char *sig, int sig_len, char *fname, char **signature, int *signature_len, char **error) /* {{{ */
{
int read_size, len;
zend_off_t read_len;
@@ -1924,7 +1922,7 @@ void phar_add_virtual_dirs(phar_archive_data *phar, char *filename, int filename
while ((s = zend_memrchr(filename, '/', filename_len))) {
filename_len = s - filename;
- if (NULL == zend_hash_str_add_empty_element(&phar->virtual_dirs, filename, filename_len)) {
+ if (!filename_len || NULL == zend_hash_str_add_empty_element(&phar->virtual_dirs, filename, filename_len)) {
break;
}
}
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index 7421a89de3..30c52c0479 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| ZIP archive support for Phar |
+----------------------------------------------------------------------+
- | Copyright (c) 2007-2015 The PHP Group |
+ | Copyright (c) 2007-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,28 +18,28 @@
#include "phar_internal.h"
-#define PHAR_GET_16(var) ((php_uint16)((((php_uint16)var[0]) & 0xff) | \
- (((php_uint16)var[1]) & 0xff) << 8))
-#define PHAR_GET_32(var) ((php_uint32)((((php_uint32)var[0]) & 0xff) | \
- (((php_uint32)var[1]) & 0xff) << 8 | \
- (((php_uint32)var[2]) & 0xff) << 16 | \
- (((php_uint32)var[3]) & 0xff) << 24))
-static inline void phar_write_32(char buffer[4], php_uint32 value)
+#define PHAR_GET_16(var) ((uint16_t)((((uint16_t)var[0]) & 0xff) | \
+ (((uint16_t)var[1]) & 0xff) << 8))
+#define PHAR_GET_32(var) ((uint32_t)((((uint32_t)var[0]) & 0xff) | \
+ (((uint32_t)var[1]) & 0xff) << 8 | \
+ (((uint32_t)var[2]) & 0xff) << 16 | \
+ (((uint32_t)var[3]) & 0xff) << 24))
+static inline void phar_write_32(char buffer[4], uint32_t value)
{
buffer[3] = (unsigned char) ((value & 0xff000000) >> 24);
buffer[2] = (unsigned char) ((value & 0xff0000) >> 16);
buffer[1] = (unsigned char) ((value & 0xff00) >> 8);
buffer[0] = (unsigned char) (value & 0xff);
}
-static inline void phar_write_16(char buffer[2], php_uint32 value)
+static inline void phar_write_16(char buffer[2], uint32_t value)
{
buffer[1] = (unsigned char) ((value & 0xff00) >> 8);
buffer[0] = (unsigned char) (value & 0xff);
}
-# define PHAR_SET_32(var, value) phar_write_32(var, (php_uint32) (value));
-# define PHAR_SET_16(var, value) phar_write_16(var, (php_uint16) (value));
+# define PHAR_SET_32(var, value) phar_write_32(var, (uint32_t) (value));
+# define PHAR_SET_16(var, value) phar_write_16(var, (uint16_t) (value));
-static int phar_zip_process_extra(php_stream *fp, phar_entry_info *entry, php_uint16 len) /* {{{ */
+static int phar_zip_process_extra(php_stream *fp, phar_entry_info *entry, uint16_t len) /* {{{ */
{
union {
phar_zip_extra_field_header header;
@@ -143,7 +143,7 @@ static time_t phar_zip_d2u_time(char *cdtime, char *cddate) /* {{{ */
static void phar_zip_u2d_time(time_t time, char *dtime, char *ddate) /* {{{ */
{
- php_uint16 ctime, cdate;
+ uint16_t ctime, cdate;
struct tm *tm, tmbuf;
tm = php_localtime_r(&time, &tmbuf);
@@ -168,7 +168,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias,
phar_zip_dir_end locator;
char buf[sizeof(locator) + 65536];
zend_long size;
- php_uint16 i;
+ uint16_t i;
phar_archive_data *mydata = NULL;
phar_entry_info entry = {0};
char *p = buf, *ext, *actual_alias = NULL;
@@ -199,7 +199,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias,
}
while ((p=(char *) memchr(p + 1, 'P', (size_t) (size - (p + 1 - buf)))) != NULL) {
- if (!memcmp(p + 1, "K\5\6", 3)) {
+ if ((p - buf) + sizeof(locator) <= size && !memcmp(p + 1, "K\5\6", 3)) {
memcpy((void *)&locator, (void *) p, sizeof(locator));
if (PHAR_GET_16(locator.centraldisk) != 0 || PHAR_GET_16(locator.disknumber) != 0) {
/* split archives not handled */
@@ -384,7 +384,9 @@ foundit:
if (entry.filename[entry.filename_len - 1] == '/') {
entry.is_dir = 1;
- entry.filename_len--;
+ if(entry.filename_len > 1) {
+ entry.filename_len--;
+ }
entry.flags |= PHAR_ENT_PERM_DEF_DIR;
} else {
entry.is_dir = 0;
@@ -789,7 +791,7 @@ static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg) /* {{{
phar_zip_unix3 perms;
phar_zip_central_dir_file central;
struct _phar_zip_pass *p;
- php_uint32 newcrc32;
+ uint32_t newcrc32;
zend_off_t offset;
int not_really_modified = 0;
p = (struct _phar_zip_pass*) arg;
@@ -820,7 +822,7 @@ static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg) /* {{{
PHAR_SET_16(perms.size, sizeof(perms) - 4);
PHAR_SET_16(perms.perms, entry->flags & PHAR_ENT_PERM_MASK);
{
- php_uint32 crc = (php_uint32) ~0;
+ uint32_t crc = (uint32_t) ~0;
CRC32(crc, perms.perms[0]);
CRC32(crc, perms.perms[1]);
PHAR_SET_32(perms.crc32, ~crc);
@@ -846,7 +848,7 @@ static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg) /* {{{
/* do extra field for perms later */
if (entry->is_modified) {
- php_uint32 loc;
+ uint32_t loc;
php_stream_filter *filter;
php_stream *efp;
@@ -934,7 +936,7 @@ static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg) /* {{{
php_stream_flush(entry->cfp);
php_stream_filter_remove(filter, 1);
php_stream_seek(entry->cfp, 0, SEEK_END);
- entry->compressed_filesize = (php_uint32) php_stream_tell(entry->cfp);
+ entry->compressed_filesize = (uint32_t) php_stream_tell(entry->cfp);
PHAR_SET_32(central.compsize, entry->compressed_filesize);
PHAR_SET_32(local.compsize, entry->compressed_filesize);
/* generate crc on compressed file */
@@ -1192,7 +1194,7 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, zend_long len, int
char *temperr = NULL;
struct _phar_zip_pass pass;
phar_zip_dir_end eocd;
- php_uint32 cdir_size, cdir_offset;
+ uint32_t cdir_size, cdir_offset;
pass.error = &temperr;
entry.flags = PHAR_ENT_PERM_DEF_FILE;
diff --git a/ext/posix/config.m4 b/ext/posix/config.m4
index 82b80ce972..9dfa70d1db 100644
--- a/ext/posix/config.m4
+++ b/ext/posix/config.m4
@@ -11,7 +11,7 @@ if test "$PHP_POSIX" = "yes"; then
AC_CHECK_HEADERS(sys/mkdev.h)
- AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
+ AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod setrlimit getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
AC_MSG_CHECKING([for working ttyname_r() implementation])
AC_TRY_RUN([
diff --git a/ext/posix/php_posix.h b/ext/posix/php_posix.h
index ced4afe2c6..e954b359b0 100644
--- a/ext/posix/php_posix.h
+++ b/ext/posix/php_posix.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -113,6 +113,10 @@ PHP_FUNCTION(posix_getpwuid);
PHP_FUNCTION(posix_getrlimit);
#endif
+#ifdef HAVE_SETRLIMIT
+PHP_FUNCTION(posix_setrlimit);
+#endif
+
#ifdef HAVE_INITGROUPS
PHP_FUNCTION(posix_initgroups);
#endif
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 12fb3f3e36..771e316325 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -199,6 +199,14 @@ ZEND_BEGIN_ARG_INFO(arginfo_posix_getrlimit, 0)
ZEND_END_ARG_INFO()
#endif
+#ifdef HAVE_SETRLIMIT
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setrlimit, 0, 0, 3)
+ ZEND_ARG_INFO(0, resource)
+ ZEND_ARG_INFO(0, softlimit)
+ ZEND_ARG_INFO(0, hardlimit)
+ZEND_END_ARG_INFO()
+#endif
+
ZEND_BEGIN_ARG_INFO(arginfo_posix_get_last_error, 0)
ZEND_END_ARG_INFO()
@@ -293,6 +301,9 @@ const zend_function_entry posix_functions[] = {
#ifdef HAVE_GETRLIMIT
PHP_FE(posix_getrlimit, arginfo_posix_getrlimit)
#endif
+#ifdef HAVE_SETRLIMIT
+ PHP_FE(posix_setrlimit, arginfo_posix_setrlimit)
+#endif
PHP_FE(posix_get_last_error, arginfo_posix_get_last_error)
PHP_FALIAS(posix_errno, posix_get_last_error, arginfo_posix_get_last_error)
@@ -344,7 +355,57 @@ static PHP_MINIT_FUNCTION(posix)
#ifdef S_IFSOCK
REGISTER_LONG_CONSTANT("POSIX_S_IFSOCK", S_IFSOCK, CONST_CS | CONST_PERSISTENT);
#endif
-
+#ifdef RLIMIT_AS
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_AS", RLIMIT_AS, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_CORE
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_CORE", RLIMIT_CORE, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_CPU
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_CPU", RLIMIT_CPU, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_DATA
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_DATA", RLIMIT_DATA, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_FSIZE
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_FSIZE", RLIMIT_FSIZE, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_LOCKS
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_LOCKS", RLIMIT_LOCKS, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_MEMLOCK
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_MEMLOCK", RLIMIT_MEMLOCK, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_MSGQUEUE
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_MSGQUEUE", RLIMIT_MSGQUEUE, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_NICE
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_NICE", RLIMIT_NICE, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_NOFILE
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_NOFILE", RLIMIT_NOFILE, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_NPROC
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_NPROC", RLIMIT_NPROC, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_RSS
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_RSS", RLIMIT_RSS, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_RTPRIO
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_RTPRIO", RLIMIT_RTPRIO, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_RTTIME
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_RTTIME", RLIMIT_RTTIME, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_SIGPENDING
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_SIGPENDING", RLIMIT_SIGPENDING, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef RLIMIT_STACK
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_STACK", RLIMIT_STACK, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef HAVE_SETRLIMIT
+ REGISTER_LONG_CONSTANT("POSIX_RLIMIT_INFINITY", RLIM_INFINITY, CONST_CS | CONST_PERSISTENT);
+#endif
return SUCCESS;
}
/* }}} */
@@ -926,8 +987,12 @@ int php_posix_group_to_array(struct group *g, zval *array_group) /* {{{ */
array_init(&array_members);
add_assoc_string(array_group, "name", g->gr_name);
- add_assoc_string(array_group, "passwd", g->gr_passwd);
- for (count=0; g->gr_mem[count] != NULL; count++) {
+ if (g->gr_passwd) {
+ add_assoc_string(array_group, "passwd", g->gr_passwd);
+ } else {
+ add_assoc_null(array_group, "passwd");
+ }
+ for (count = 0; g->gr_mem[count] != NULL; count++) {
add_next_index_string(&array_members, g->gr_mem[count]);
}
zend_hash_str_update(Z_ARRVAL_P(array_group), "members", sizeof("members")-1, &array_members);
@@ -1322,6 +1387,33 @@ PHP_FUNCTION(posix_getrlimit)
#endif /* HAVE_GETRLIMIT */
+#ifdef HAVE_SETRLIMIT
+/* {{{ proto bool posix_setrlimit(int resource, int softlimit, int hardlimit)
+ Set system resource consumption limits (POSIX.1-2001) */
+PHP_FUNCTION(posix_setrlimit)
+{
+ struct rlimit rl;
+ zend_long res, cur, max;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &res, &cur, &max) == FAILURE) {
+ RETURN_FALSE;
+ }
+
+ rl.rlim_cur = cur;
+ rl.rlim_max = max;
+
+ if (setrlimit(res, &rl) == -1) {
+ POSIX_G(last_error) = errno;
+ RETURN_FALSE;
+ }
+
+ RETURN_TRUE;
+}
+/* }}} */
+
+#endif /* HAVE_SETRLIMIT */
+
+
/* {{{ proto int posix_get_last_error(void)
Retrieve the error number set by the last posix function which failed. */
PHP_FUNCTION(posix_get_last_error)
diff --git a/ext/posix/tests/posix_setrlimit.phpt b/ext/posix/tests/posix_setrlimit.phpt
new file mode 100644
index 0000000000..4806fcfb4d
--- /dev/null
+++ b/ext/posix/tests/posix_setrlimit.phpt
@@ -0,0 +1,18 @@
+--TEST--
+posix_setrlimit(): Basic tests
+--SKIPIF--
+<?php
+if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+if (!function_exists('posix_setrlimit')) die('skip posix_setrlimit() not found');
+?>
+--FILE--
+<?php
+
+var_dump(posix_setrlimit(POSIX_RLIMIT_NOFILE, 128, 128));
+var_dump(posix_setrlimit(POSIX_RLIMIT_NOFILE, 129, 128));
+
+?>
+--EXPECTF--
+bool(true)
+bool(false)
+
diff --git a/ext/pspell/php_pspell.h b/ext/pspell/php_pspell.h
index 1f6e3cfcbf..106825bf4f 100644
--- a/ext/pspell/php_pspell.h
+++ b/ext/pspell/php_pspell.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index a7c42f7621..58d7f4a4c9 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/readline/config.w32 b/ext/readline/config.w32
new file mode 100644
index 0000000000..482c99cc04
--- /dev/null
+++ b/ext/readline/config.w32
@@ -0,0 +1,16 @@
+// $Id$
+// vim:ft=javascript
+
+ARG_WITH("readline", "Readline support", "yes");
+
+if (PHP_READLINE != "no") {
+ if (CHECK_LIB("edit_a.lib;edit.lib", "readline", PHP_READLINE) &&
+ CHECK_HEADER_ADD_INCLUDE("editline/readline.h", "CFLAGS_READLINE")) {
+ EXTENSION("readline", "readline.c readline_cli.c");
+ ADD_FLAG("CFLAGS_READLINE", "/D HAVE_LIBEDIT");
+ ADD_FLAG("CFLAGS_READLINE", "/D HAVE_RL_COMPLETION_MATCHES");
+ } else {
+ WARNING("readline not enabled; libraries and headers not found");
+ }
+}
+
diff --git a/ext/readline/php_readline.h b/ext/readline/php_readline.h
index dac79f04e7..e3a0aba676 100644
--- a/ext/readline/php_readline.h
+++ b/ext/readline/php_readline.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,9 +22,11 @@
#define PHP_READLINE_H
#if HAVE_LIBREADLINE || HAVE_LIBEDIT
+#ifndef PHP_WIN32
#ifdef ZTS
#warning Readline module will *NEVER* be thread-safe
#endif
+#endif
extern zend_module_entry readline_module_entry;
#define phpext_readline_ptr &readline_module_entry
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 47e59d8363..0e6f849444 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -188,7 +188,7 @@ PHP_MSHUTDOWN_FUNCTION(readline)
PHP_RSHUTDOWN_FUNCTION(readline)
{
- zval_dtor(&_readline_completion);
+ zval_ptr_dtor(&_readline_completion);
ZVAL_UNDEF(&_readline_completion);
#if HAVE_RL_CALLBACK_READ_CHAR
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
@@ -251,7 +251,9 @@ PHP_FUNCTION(readline_info)
array_init(return_value);
add_assoc_string(return_value,"line_buffer",SAFE_STRING(rl_line_buffer));
add_assoc_long(return_value,"point",rl_point);
+#ifndef PHP_WIN32
add_assoc_long(return_value,"end",rl_end);
+#endif
#ifdef HAVE_LIBREADLINE
add_assoc_long(return_value,"mark",rl_mark);
add_assoc_long(return_value,"done",rl_done);
@@ -262,7 +264,9 @@ PHP_FUNCTION(readline_info)
#if HAVE_ERASE_EMPTY_LINE
add_assoc_long(return_value,"erase_empty_line",rl_erase_empty_line);
#endif
+#ifndef PHP_WIN32
add_assoc_string(return_value,"library_version",(char *)SAFE_STRING(rl_library_version));
+#endif
add_assoc_string(return_value,"readline_name",(char *)SAFE_STRING(rl_readline_name));
add_assoc_long(return_value,"attempted_completion_over",rl_attempted_completion_over);
} else {
@@ -276,8 +280,10 @@ PHP_FUNCTION(readline_info)
RETVAL_STRING(SAFE_STRING(oldstr));
} else if (!strcasecmp(what, "point")) {
RETVAL_LONG(rl_point);
+#ifndef PHP_WIN32
} else if (!strcasecmp(what, "end")) {
RETVAL_LONG(rl_end);
+#endif
#ifdef HAVE_LIBREADLINE
} else if (!strcasecmp(what, "mark")) {
RETVAL_LONG(rl_mark);
@@ -305,12 +311,14 @@ PHP_FUNCTION(readline_info)
oldval = rl_erase_empty_line;
if (value) {
convert_to_long_ex(value);
- rl_erase_empty_line = Z_LVAL_PP(value);
+ rl_erase_empty_line = Z_LVAL_P(value);
}
RETVAL_LONG(oldval);
#endif
+#ifndef PHP_WIN32
} else if (!strcasecmp(what,"library_version")) {
RETVAL_STRING((char *)SAFE_STRING(rl_library_version));
+#endif
} else if (!strcasecmp(what, "readline_name")) {
oldstr = (char*)rl_readline_name;
if (value) {
@@ -505,7 +513,7 @@ static char **_readline_completion_cb(const char *text, int start, int end)
for (i = 0; i < 3; i++) {
zval_ptr_dtor(&params[i]);
}
- zval_dtor(&_readline_array);
+ zval_ptr_dtor(&_readline_array);
return matches;
}
@@ -526,8 +534,8 @@ PHP_FUNCTION(readline_completion_function)
}
zend_string_release(name);
- zval_dtor(&_readline_completion);
- ZVAL_DUP(&_readline_completion, arg);
+ zval_ptr_dtor(&_readline_completion);
+ ZVAL_COPY(&_readline_completion, arg);
rl_attempted_completion_function = _readline_completion_cb;
if (rl_attempted_completion_function == NULL) {
@@ -552,7 +560,7 @@ static void php_rl_callback_handler(char *the_line)
call_user_function(CG(function_table), NULL, &_prepped_callback, &dummy, 1, params);
zval_ptr_dtor(&params[0]);
- zval_dtor(&dummy);
+ zval_ptr_dtor(&dummy);
}
/* {{{ proto void readline_callback_handler_install(string prompt, mixed callback)
@@ -577,10 +585,10 @@ PHP_FUNCTION(readline_callback_handler_install)
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
rl_callback_handler_remove();
- zval_dtor(&_prepped_callback);
+ zval_ptr_dtor(&_prepped_callback);
}
- ZVAL_DUP(&_prepped_callback, callback);
+ ZVAL_COPY(&_prepped_callback, callback);
rl_callback_handler_install(prompt, php_rl_callback_handler);
@@ -604,7 +612,7 @@ PHP_FUNCTION(readline_callback_handler_remove)
{
if (Z_TYPE(_prepped_callback) != IS_UNDEF) {
rl_callback_handler_remove();
- zval_dtor(&_prepped_callback);
+ zval_ptr_dtor(&_prepped_callback);
ZVAL_UNDEF(&_prepped_callback);
RETURN_TRUE;
}
diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c
index 125b09e920..2cce2292f4 100644
--- a/ext/readline/readline_cli.c
+++ b/ext/readline/readline_cli.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,6 +19,10 @@
/* $Id$ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "php.h"
#ifndef HAVE_RL_COMPLETION_MATCHES
@@ -63,7 +67,7 @@
#include "sapi/cli/cli.h"
#include "readline_cli.h"
-#ifdef COMPILE_DL_READLINE
+#if defined(COMPILE_DL_READLINE) && !defined(PHP_WIN32)
#include <dlfcn.h>
#endif
@@ -102,7 +106,8 @@ static size_t readline_shell_ub_write(const char *str, size_t str_length) /* {{{
caller (sapi_cli_single_write in sapi/cli) which will actually
write due to -1 return code */
php_last_char = str[str_length-1];
- return -1;
+
+ return (size_t) -1;
}
/* }}} */
@@ -587,7 +592,7 @@ static int readline_shell_run(void) /* {{{ */
if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) {
zend_file_handle *prepend_file_p;
- zend_file_handle prepend_file = {0};
+ zend_file_handle prepend_file = {{0}};
prepend_file.filename = PG(auto_prepend_file);
prepend_file.opened_path = NULL;
@@ -598,9 +603,15 @@ static int readline_shell_run(void) /* {{{ */
zend_execute_scripts(ZEND_REQUIRE, NULL, 1, prepend_file_p);
}
+#ifndef PHP_WIN32
history_file = tilde_expand("~/.php_history");
+#else
+ spprintf(&history_file, MAX_PATH, "%s/.php_history", getenv("USERPROFILE"));
+#endif
rl_attempted_completion_function = cli_code_completion;
+#ifndef PHP_WIN32
rl_special_prefixes = "$";
+#endif
read_history(history_file);
EG(exit_status) = 0;
@@ -686,13 +697,33 @@ static int readline_shell_run(void) /* {{{ */
php_last_char = '\0';
}
+#ifdef PHP_WIN32
+ efree(history_file);
+#else
free(history_file);
+#endif
efree(code);
zend_string_release(prompt);
return EG(exit_status);
}
/* }}} */
+#ifdef PHP_WIN32
+typedef cli_shell_callbacks_t *(__cdecl *get_cli_shell_callbacks)(void);
+#define GET_SHELL_CB(cb) \
+ do { \
+ get_cli_shell_callbacks get_callbacks; \
+ HMODULE hMod = GetModuleHandle("php.exe"); \
+ (cb) = NULL; \
+ if (strlen(sapi_module.name) >= 3 && 0 == strncmp("cli", sapi_module.name, 3)) { \
+ get_callbacks = (get_cli_shell_callbacks)GetProcAddress(hMod, "php_cli_get_shell_callbacks"); \
+ if (get_callbacks) { \
+ (cb) = get_callbacks(); \
+ } \
+ } \
+ } while(0)
+
+#else
/*
#ifdef COMPILE_DL_READLINE
This dlsym() is always used as even the CGI SAPI is linked against "CLI"-only
@@ -711,6 +742,7 @@ this extension sharedto offer compatibility.
/*#else
#define GET_SHELL_CB(cb) (cb) = php_cli_get_shell_callbacks()
#endif*/
+#endif
PHP_MINIT_FUNCTION(cli_readline)
{
@@ -755,7 +787,11 @@ PHP_MINFO_FUNCTION(cli_readline)
{
php_info_print_table_start();
php_info_print_table_header(2, "Readline Support", "enabled");
+#ifdef PHP_WIN32
+ php_info_print_table_row(2, "Readline library", "WinEditLine");
+#else
php_info_print_table_row(2, "Readline library", (rl_library_version ? rl_library_version : "Unknown"));
+#endif
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
diff --git a/ext/readline/readline_cli.h b/ext/readline/readline_cli.h
index c543c1fe63..2bcb3cca45 100644
--- a/ext/readline/readline_cli.h
+++ b/ext/readline/readline_cli.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/readline/tests/libedit_info_001-win32.phpt b/ext/readline/tests/libedit_info_001-win32.phpt
new file mode 100644
index 0000000000..5d43921c60
--- /dev/null
+++ b/ext/readline/tests/libedit_info_001-win32.phpt
@@ -0,0 +1,42 @@
+--TEST--
+readline_info(): Basic test
+--SKIPIF--
+<?php if (!extension_loaded("readline")) die("skip");
+if (READLINE_LIB != "libedit") die("skip libedit only");
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+
+var_dump(readline_info());
+var_dump(readline_info(1));
+var_dump(readline_info(1,1));
+var_dump(readline_info('line_buffer'));
+var_dump(readline_info('readline_name'));
+var_dump(readline_info('readline_name', 1));
+var_dump(readline_info('readline_name'));
+var_dump(readline_info('attempted_completion_over',1));
+var_dump(readline_info('attempted_completion_over'));
+
+?>
+--EXPECTF--
+array(4) {
+ ["line_buffer"]=>
+ string(0) ""
+ ["point"]=>
+ int(0)
+ ["readline_name"]=>
+ string(0) ""
+ ["attempted_completion_over"]=>
+ int(0)
+}
+NULL
+NULL
+string(0) ""
+string(0) ""
+string(0) ""
+string(1) "1"
+int(0)
+int(1)
diff --git a/ext/readline/tests/libedit_info_001.phpt b/ext/readline/tests/libedit_info_001.phpt
index 1d79f4ad0c..33dc144add 100644
--- a/ext/readline/tests/libedit_info_001.phpt
+++ b/ext/readline/tests/libedit_info_001.phpt
@@ -3,6 +3,9 @@ readline_info(): Basic test
--SKIPIF--
<?php if (!extension_loaded("readline")) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip not for windows');
+}
?>
--FILE--
<?php
diff --git a/ext/readline/tests/libedit_write_history_001-win32.phpt b/ext/readline/tests/libedit_write_history_001-win32.phpt
new file mode 100644
index 0000000000..28af4cbfdd
--- /dev/null
+++ b/ext/readline/tests/libedit_write_history_001-win32.phpt
@@ -0,0 +1,29 @@
+--TEST--
+readline_write_history(): Basic test
+--SKIPIF--
+<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip");
+if (READLINE_LIB != "libedit") die("skip libedit only");
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+
+$name = tempnam(sys_get_temp_dir(), 'readline.tmp');
+
+readline_add_history('foo');
+readline_add_history('');
+readline_add_history(1);
+readline_add_history(NULL);
+readline_write_history($name);
+
+var_dump(file_get_contents($name));
+
+unlink($name);
+
+?>
+--EXPECT--
+string(6) "foo
+1
+"
diff --git a/ext/readline/tests/libedit_write_history_001.phpt b/ext/readline/tests/libedit_write_history_001.phpt
index e9b6dbee8d..14c3282e6d 100644
--- a/ext/readline/tests/libedit_write_history_001.phpt
+++ b/ext/readline/tests/libedit_write_history_001.phpt
@@ -3,6 +3,9 @@ readline_write_history(): Basic test
--SKIPIF--
<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip not for windows');
+}
?>
--FILE--
<?php
diff --git a/ext/readline/tests/readline_read_history_error_001.phpt b/ext/readline/tests/readline_read_history_error_001.phpt
index 0a65a66d5c..1b39cbfb12 100644
--- a/ext/readline/tests/readline_read_history_error_001.phpt
+++ b/ext/readline/tests/readline_read_history_error_001.phpt
@@ -3,7 +3,7 @@ readline_read_history() function - Error cases
--CREDITS--
Pedro Manoel Evangelista <pedro.evangelista at gmail dot com>
--SKIPIF--
-<?php if (!extension_loaded("readline") || !function_exists('readline_read_history')) die("skip"); ?>
+<?php if (!extension_loaded("readline") || !function_exists('readline_read_history') || READLINE_LIB != "libedit") die("skip"); ?>
--FILE--
<?php
var_dump(readline_read_history());
diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h
index 83c021f701..24ee0bac78 100644
--- a/ext/recode/php_recode.h
+++ b/ext/recode/php_recode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/recode/recode.c b/ext/recode/recode.c
index d945431636..8db0435105 100644
--- a/ext/recode/recode.c
+++ b/ext/recode/recode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/recode/tests/001.phpt b/ext/recode/tests/001.phpt
new file mode 100644
index 0000000000..c03b44a811
--- /dev/null
+++ b/ext/recode/tests/001.phpt
@@ -0,0 +1,38 @@
+--TEST--
+recode_string() function - Testing string conversions between latin1, UTF-8 and html
+--SKIPIF--
+<?php if (!extension_loaded("recode")) print "skip"; ?>
+--FILE--
+<?php
+function ascii2hex($ascii) {
+ $hex = '';
+ for ($i = 0; $i < strlen($ascii); $i++) {
+ $byte = dechex(ord($ascii{$i}));
+ $byte = str_repeat('0', 2 - strlen($byte)).$byte;
+ $hex .= $byte . " ";
+ }
+ return $hex;
+}
+
+function hex2ascii($hex){
+ $ascii='';
+ $hex=str_replace(" ", "", $hex);
+ for($i=0; $i<strlen($hex); $i=$i+2) {
+ $ascii .= chr(hexdec(substr($hex, $i, 2)));
+ }
+ return($ascii);
+}
+
+$lat1_hex_org = '31 32 33 e5 e4 f6 61 62 63';
+$utf8_hex = ascii2hex(recode_string('lat1..utf-8', hex2ascii($lat1_hex_org)));
+$html = recode_string('utf-8..html', hex2ascii($utf8_hex));
+$lat1_hex = ascii2hex(recode_string('html..lat1', $html));
+
+echo "#" . $utf8_hex . "#\n";
+echo "#" . $html . "#\n";
+echo "#" . $lat1_hex . "#\n";
+?>
+--EXPECT--
+#31 32 33 c3 a5 c3 a4 c3 b6 61 62 63 #
+#123&aring;&auml;&ouml;abc#
+#31 32 33 e5 e4 f6 61 62 63 # \ No newline at end of file
diff --git a/ext/recode/tests/002.phpt b/ext/recode/tests/002.phpt
new file mode 100644
index 0000000000..fb9f286422
--- /dev/null
+++ b/ext/recode/tests/002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+recode_string() function - Testing string conversions between latin1, UTF-8 and html
+--SKIPIF--
+<?php if (!extension_loaded("recode")) print "skip"; ?>
+--FILE--
+<?php
+function ascii2hex($ascii) {
+ $hex = '';
+ for ($i = 0; $i < strlen($ascii); $i++) {
+ $byte = dechex(ord($ascii{$i}));
+ $byte = str_repeat('0', 2 - strlen($byte)).$byte;
+ $hex .= $byte . " ";
+ }
+ return $hex;
+}
+
+$html_file = fopen(realpath(dirname(__FILE__)) . '/html.raw', 'r');
+$utf_8_filepath = realpath(dirname(__FILE__)) . '/utf8.raw';
+$utf_8_file = fopen($utf_8_filepath, 'w+');
+
+recode_file('html..utf8', $html_file, $utf_8_file);
+
+rewind($utf_8_file);
+echo '#' . ascii2hex(fread($utf_8_file, filesize($utf_8_filepath))) . "#\n";
+
+fclose($html_file);
+fclose($utf_8_file);
+
+unlink($utf_8_filepath);
+?>
+--EXPECT--
+#31 32 33 c3 a5 c3 a4 c3 b6 61 62 63 #
diff --git a/ext/recode/tests/html.raw b/ext/recode/tests/html.raw
new file mode 100644
index 0000000000..64ecf1331f
--- /dev/null
+++ b/ext/recode/tests/html.raw
@@ -0,0 +1 @@
+123&aring;&auml;&ouml;abc \ No newline at end of file
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 4684954567..3138ee41d7 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -64,6 +64,7 @@ PHPAPI zend_class_entry *reflection_class_ptr;
PHPAPI zend_class_entry *reflection_object_ptr;
PHPAPI zend_class_entry *reflection_method_ptr;
PHPAPI zend_class_entry *reflection_property_ptr;
+PHPAPI zend_class_entry *reflection_class_constant_ptr;
PHPAPI zend_class_entry *reflection_extension_ptr;
PHPAPI zend_class_entry *reflection_zend_extension_ptr;
@@ -87,8 +88,8 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
/* Method macros */
#define METHOD_NOTSTATIC(ce) \
- if (!Z_OBJ(EX(This)) || !instanceof_function(Z_OBJCE(EX(This)), ce)) { \
- zend_throw_error(zend_ce_error, "%s() cannot be called statically", get_active_function_name()); \
+ if ((Z_TYPE(EX(This)) != IS_OBJECT) || !instanceof_function(Z_OBJCE(EX(This)), ce)) { \
+ php_error_docref(NULL, E_ERROR, "%s() cannot be called statically", get_active_function_name()); \
return; \
} \
@@ -104,7 +105,7 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
#define GET_REFLECTION_OBJECT() \
intern = Z_REFLECTION_P(getThis()); \
- if (intern == NULL || intern->ptr == NULL) { \
+ if (intern->ptr == NULL) { \
RETURN_ON_EXCEPTION \
zend_throw_error(zend_ce_error, "Internal error: Failed to retrieve the reflection object"); \
return; \
@@ -216,7 +217,8 @@ typedef enum {
REF_TYPE_PARAMETER,
REF_TYPE_TYPE,
REF_TYPE_PROPERTY,
- REF_TYPE_DYNAMIC_PROPERTY
+ REF_TYPE_DYNAMIC_PROPERTY,
+ REF_TYPE_CLASS_CONSTANT
} reflection_type_t;
/* Struct for reflection objects */
@@ -334,7 +336,7 @@ static void reflection_free_objects_storage(zend_object *object) /* {{{ */
efree(intern->ptr);
break;
case REF_TYPE_GENERATOR:
- break;
+ case REF_TYPE_CLASS_CONSTANT:
case REF_TYPE_OTHER:
break;
}
@@ -369,6 +371,7 @@ static zval *reflection_instantiate(zend_class_entry *pce, zval *object) /* {{{
static void _const_string(string *str, char *name, zval *value, char *indent);
static void _function_string(string *str, zend_function *fptr, zend_class_entry *scope, char* indent);
static void _property_string(string *str, zend_property_info *prop, char *prop_name, char* indent);
+static void _class_const_string(string *str, char *name, zend_class_constant *c, char* indent);
static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *indent);
static void _extension_string(string *str, zend_module_entry *module, char *indent);
static void _zend_extension_string(string *str, zend_extension *extension, char *indent);
@@ -384,7 +387,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
/* TBD: Repair indenting of doc comment (or is this to be done in the parser?) */
if (ce->type == ZEND_USER_CLASS && ce->info.user.doc_comment) {
- string_printf(str, "%s%s", indent, ce->info.user.doc_comment);
+ string_printf(str, "%s%s", indent, ZSTR_VAL(ce->info.user.doc_comment));
string_write(str, "\n", 1);
}
@@ -446,102 +449,94 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
}
/* Constants */
- if (&ce->constants_table) {
- string_printf(str, "\n");
- count = zend_hash_num_elements(&ce->constants_table);
- string_printf(str, "%s - Constants [%d] {\n", indent, count);
- if (count > 0) {
- zend_string *key;
- zval *value;
-
- ZEND_HASH_FOREACH_STR_KEY_VAL(&ce->constants_table, key, value) {
- zval_update_constant_ex(value, 1, NULL);
- _const_string(str, ZSTR_VAL(key), value, indent);
- } ZEND_HASH_FOREACH_END();
- }
- string_printf(str, "%s }\n", indent);
+ string_printf(str, "\n");
+ count = zend_hash_num_elements(&ce->constants_table);
+ string_printf(str, "%s - Constants [%d] {\n", indent, count);
+ if (count > 0) {
+ zend_string *key;
+ zend_class_constant *c;
+
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
+ zval_update_constant_ex(&c->value, c->ce);
+ _class_const_string(str, ZSTR_VAL(key), c, ZSTR_VAL(sub_indent.buf));
+ } ZEND_HASH_FOREACH_END();
}
+ string_printf(str, "%s }\n", indent);
/* Static properties */
- if (&ce->properties_info) {
- /* counting static properties */
- count = zend_hash_num_elements(&ce->properties_info);
- if (count > 0) {
- zend_property_info *prop;
-
- ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
- if(prop->flags & ZEND_ACC_SHADOW) {
- count_shadow_props++;
- } else if (prop->flags & ZEND_ACC_STATIC) {
- count_static_props++;
- }
- } ZEND_HASH_FOREACH_END();
- }
+ /* counting static properties */
+ count = zend_hash_num_elements(&ce->properties_info);
+ if (count > 0) {
+ zend_property_info *prop;
+
+ ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
+ if(prop->flags & ZEND_ACC_SHADOW) {
+ count_shadow_props++;
+ } else if (prop->flags & ZEND_ACC_STATIC) {
+ count_static_props++;
+ }
+ } ZEND_HASH_FOREACH_END();
+ }
- /* static properties */
- string_printf(str, "\n%s - Static properties [%d] {\n", indent, count_static_props);
- if (count_static_props > 0) {
- zend_property_info *prop;
+ /* static properties */
+ string_printf(str, "\n%s - Static properties [%d] {\n", indent, count_static_props);
+ if (count_static_props > 0) {
+ zend_property_info *prop;
- ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
- if ((prop->flags & ZEND_ACC_STATIC) && !(prop->flags & ZEND_ACC_SHADOW)) {
- _property_string(str, prop, NULL, ZSTR_VAL(sub_indent.buf));
- }
- } ZEND_HASH_FOREACH_END();
- }
- string_printf(str, "%s }\n", indent);
+ ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
+ if ((prop->flags & ZEND_ACC_STATIC) && !(prop->flags & ZEND_ACC_SHADOW)) {
+ _property_string(str, prop, NULL, ZSTR_VAL(sub_indent.buf));
+ }
+ } ZEND_HASH_FOREACH_END();
}
+ string_printf(str, "%s }\n", indent);
/* Static methods */
- if (&ce->function_table) {
- /* counting static methods */
- count = zend_hash_num_elements(&ce->function_table);
- if (count > 0) {
- zend_function *mptr;
-
- ZEND_HASH_FOREACH_PTR(&ce->function_table, mptr) {
- if (mptr->common.fn_flags & ZEND_ACC_STATIC
- && ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce))
- {
- count_static_funcs++;
- }
- } ZEND_HASH_FOREACH_END();
- }
+ /* counting static methods */
+ count = zend_hash_num_elements(&ce->function_table);
+ if (count > 0) {
+ zend_function *mptr;
+
+ ZEND_HASH_FOREACH_PTR(&ce->function_table, mptr) {
+ if (mptr->common.fn_flags & ZEND_ACC_STATIC
+ && ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce))
+ {
+ count_static_funcs++;
+ }
+ } ZEND_HASH_FOREACH_END();
+ }
- /* static methods */
- string_printf(str, "\n%s - Static methods [%d] {", indent, count_static_funcs);
- if (count_static_funcs > 0) {
- zend_function *mptr;
+ /* static methods */
+ string_printf(str, "\n%s - Static methods [%d] {", indent, count_static_funcs);
+ if (count_static_funcs > 0) {
+ zend_function *mptr;
- ZEND_HASH_FOREACH_PTR(&ce->function_table, mptr) {
- if (mptr->common.fn_flags & ZEND_ACC_STATIC
- && ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce))
- {
- string_printf(str, "\n");
- _function_string(str, mptr, ce, ZSTR_VAL(sub_indent.buf));
- }
- } ZEND_HASH_FOREACH_END();
- } else {
- string_printf(str, "\n");
- }
- string_printf(str, "%s }\n", indent);
+ ZEND_HASH_FOREACH_PTR(&ce->function_table, mptr) {
+ if (mptr->common.fn_flags & ZEND_ACC_STATIC
+ && ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce))
+ {
+ string_printf(str, "\n");
+ _function_string(str, mptr, ce, ZSTR_VAL(sub_indent.buf));
+ }
+ } ZEND_HASH_FOREACH_END();
+ } else {
+ string_printf(str, "\n");
}
+ string_printf(str, "%s }\n", indent);
/* Default/Implicit properties */
- if (&ce->properties_info) {
- count = zend_hash_num_elements(&ce->properties_info) - count_static_props - count_shadow_props;
- string_printf(str, "\n%s - Properties [%d] {\n", indent, count);
- if (count > 0) {
- zend_property_info *prop;
-
- ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
- if (!(prop->flags & (ZEND_ACC_STATIC|ZEND_ACC_SHADOW))) {
- _property_string(str, prop, NULL, ZSTR_VAL(sub_indent.buf));
- }
- } ZEND_HASH_FOREACH_END();
- }
- string_printf(str, "%s }\n", indent);
+ count = zend_hash_num_elements(&ce->properties_info) - count_static_props - count_shadow_props;
+ string_printf(str, "\n%s - Properties [%d] {\n", indent, count);
+ if (count > 0) {
+ zend_property_info *prop;
+
+ ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop) {
+ if (!(prop->flags & (ZEND_ACC_STATIC|ZEND_ACC_SHADOW))) {
+ _property_string(str, prop, NULL, ZSTR_VAL(sub_indent.buf));
+ }
+ } ZEND_HASH_FOREACH_END();
}
+ string_printf(str, "%s }\n", indent);
if (obj && Z_TYPE_P(obj) == IS_OBJECT && Z_OBJ_HT_P(obj)->get_properties) {
string dyn;
@@ -569,56 +564,54 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
}
/* Non static methods */
- if (&ce->function_table) {
- count = zend_hash_num_elements(&ce->function_table) - count_static_funcs;
- if (count > 0) {
- zend_function *mptr;
- zend_string *key;
- string dyn;
-
- count = 0;
- string_init(&dyn);
-
- ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, key, mptr) {
- if ((mptr->common.fn_flags & ZEND_ACC_STATIC) == 0
- && ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce))
- {
- size_t len = ZSTR_LEN(mptr->common.function_name);
+ count = zend_hash_num_elements(&ce->function_table) - count_static_funcs;
+ if (count > 0) {
+ zend_function *mptr;
+ zend_string *key;
+ string dyn;
+
+ count = 0;
+ string_init(&dyn);
- /* Do not display old-style inherited constructors */
- if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0
- || mptr->common.scope == ce
- || !key
- || zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0)
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, key, mptr) {
+ if ((mptr->common.fn_flags & ZEND_ACC_STATIC) == 0
+ && ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce))
+ {
+ size_t len = ZSTR_LEN(mptr->common.function_name);
+
+ /* Do not display old-style inherited constructors */
+ if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0
+ || mptr->common.scope == ce
+ || !key
+ || zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0)
+ {
+ zend_function *closure;
+ /* see if this is a closure */
+ if (ce == zend_ce_closure && obj && (len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
+ && memcmp(ZSTR_VAL(mptr->common.function_name), ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0
+ && (closure = zend_get_closure_invoke_method(Z_OBJ_P(obj))) != NULL)
{
- zend_function *closure;
- /* see if this is a closure */
- if (ce == zend_ce_closure && obj && (len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
- && memcmp(ZSTR_VAL(mptr->common.function_name), ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0
- && (closure = zend_get_closure_invoke_method(Z_OBJ_P(obj))) != NULL)
- {
- mptr = closure;
- } else {
- closure = NULL;
- }
- string_printf(&dyn, "\n");
- _function_string(&dyn, mptr, ce, ZSTR_VAL(sub_indent.buf));
- count++;
- _free_function(closure);
+ mptr = closure;
+ } else {
+ closure = NULL;
}
+ string_printf(&dyn, "\n");
+ _function_string(&dyn, mptr, ce, ZSTR_VAL(sub_indent.buf));
+ count++;
+ _free_function(closure);
}
- } ZEND_HASH_FOREACH_END();
- string_printf(str, "\n%s - Methods [%d] {", indent, count);
- if (!count) {
- string_printf(str, "\n");
}
- string_append(str, &dyn);
- string_free(&dyn);
- } else {
- string_printf(str, "\n%s - Methods [0] {\n", indent);
+ } ZEND_HASH_FOREACH_END();
+ string_printf(str, "\n%s - Methods [%d] {", indent, count);
+ if (!count) {
+ string_printf(str, "\n");
}
- string_printf(str, "%s }\n", indent);
+ string_append(str, &dyn);
+ string_free(&dyn);
+ } else {
+ string_printf(str, "\n%s - Methods [0] {\n", indent);
}
+ string_printf(str, "%s }\n", indent);
string_printf(str, "%s}\n", indent);
string_free(&sub_indent);
@@ -638,6 +631,24 @@ static void _const_string(string *str, char *name, zval *value, char *indent)
}
/* }}} */
+/* {{{ _class_const_string */
+static void _class_const_string(string *str, char *name, zend_class_constant *c, char *indent)
+{
+ char *visibility = zend_visibility_string(Z_ACCESS_FLAGS(c->value));
+ zend_string *value_str;
+ char *type;
+
+ zval_update_constant_ex(&c->value, c->ce);
+ value_str = zval_get_string(&c->value);
+ type = zend_zval_type_name(&c->value);
+
+ string_printf(str, "%sConstant [ %s %s %s ] { %s }\n",
+ indent, visibility, type, name, ZSTR_VAL(value_str));
+
+ zend_string_release(value_str);
+}
+/* }}} */
+
/* {{{ _get_recv_opcode */
static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset)
{
@@ -700,14 +711,10 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset);
if (precv && precv->opcode == ZEND_RECV_INIT && precv->op2_type != IS_UNUSED) {
zval zv;
- zend_class_entry *old_scope;
string_write(str, " = ", sizeof(" = ")-1);
ZVAL_DUP(&zv, RT_CONSTANT(&fptr->op_array, precv->op2));
- old_scope = EG(scope);
- EG(scope) = fptr->common.scope;
- zval_update_constant_ex(&zv, 1, NULL);
- EG(scope) = old_scope;
+ zval_update_constant_ex(&zv, fptr->common.scope);
if (Z_TYPE(zv) == IS_TRUE) {
string_write(str, "true", sizeof("true")-1);
} else if (Z_TYPE(zv) == IS_FALSE) {
@@ -1367,6 +1374,27 @@ static void reflection_property_factory(zend_class_entry *ce, zend_property_info
}
/* }}} */
+/* {{{ reflection_class_constant_factory */
+static void reflection_class_constant_factory(zend_class_entry *ce, zend_string *name_str, zend_class_constant *constant, zval *object)
+{
+ reflection_object *intern;
+ zval name;
+ zval classname;
+
+ ZVAL_STR_COPY(&name, name_str);
+ ZVAL_STR_COPY(&classname, ce->name);
+
+ reflection_instantiate(reflection_class_constant_ptr, object);
+ intern = Z_REFLECTION_P(object);
+ intern->ptr = constant;
+ intern->ref_type = REF_TYPE_CLASS_CONSTANT;
+ intern->ce = constant->ce;
+ intern->ignore_visibility = 0;
+ reflection_update_property(object, "name", &name);
+ reflection_update_property(object, "class", &classname);
+}
+/* }}} */
+
/* {{{ _reflection_export */
static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_ptr, int ctor_argc)
{
@@ -1401,9 +1429,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
/* Call __construct() */
fci.size = sizeof(fci);
- fci.function_table = NULL;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = Z_OBJ(reflector);
fci.retval = &retval;
fci.param_count = ctor_argc;
@@ -1435,7 +1461,6 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
ZVAL_COPY_VALUE(&params[1], output_ptr);
ZVAL_STRINGL(&fci.function_name, "reflection::export", sizeof("reflection::export") - 1);
- fci.function_table = &reflection_ptr->function_table;
fci.object = NULL;
fci.retval = &retval;
fci.param_count = 2;
@@ -1470,7 +1495,7 @@ static parameter_reference *_reflection_param_get_default_param(INTERNAL_FUNCTIO
parameter_reference *param;
intern = Z_REFLECTION_P(getThis());
- if (intern == NULL || intern->ptr == NULL) {
+ if (intern->ptr == NULL) {
if (EG(exception) && EG(exception)->ce == reflection_exception_ptr) {
return NULL;
}
@@ -1625,9 +1650,6 @@ ZEND_METHOD(reflection_function, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "O", &closure, zend_ce_closure) == SUCCESS) {
fptr = (zend_function*)zend_get_closure_method_def(closure);
@@ -1764,7 +1786,12 @@ ZEND_METHOD(reflection_function, getClosure)
}
GET_REFLECTION_OBJECT_PTR(fptr);
- zend_create_closure(return_value, fptr, NULL, NULL, NULL);
+ if (!Z_ISUNDEF(intern->obj)) {
+ /* Closures are immutable objects */
+ ZVAL_COPY(return_value, &intern->obj);
+ } else {
+ zend_create_fake_closure(return_value, fptr, NULL, NULL, NULL);
+ }
}
/* }}} */
@@ -1906,7 +1933,7 @@ ZEND_METHOD(reflection_function, getStaticVariables)
fptr->op_array.static_variables = zend_array_dup(fptr->op_array.static_variables);
}
ZEND_HASH_FOREACH_VAL(fptr->op_array.static_variables, val) {
- if (UNEXPECTED(zval_update_constant_ex(val, 1, fptr->common.scope) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(val, fptr->common.scope) != SUCCESS)) {
return;
}
} ZEND_HASH_FOREACH_END();
@@ -1935,9 +1962,7 @@ ZEND_METHOD(reflection_function, invoke)
}
fci.size = sizeof(fci);
- fci.function_table = NULL;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = NULL;
fci.retval = &retval;
fci.param_count = num_args;
@@ -1946,7 +1971,7 @@ ZEND_METHOD(reflection_function, invoke)
fcc.initialized = 1;
fcc.function_handler = fptr;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = NULL;
fcc.object = NULL;
@@ -1995,9 +2020,7 @@ ZEND_METHOD(reflection_function, invokeArgs)
} ZEND_HASH_FOREACH_END();
fci.size = sizeof(fci);
- fci.function_table = NULL;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = NULL;
fci.retval = &retval;
fci.param_count = argc;
@@ -2006,7 +2029,7 @@ ZEND_METHOD(reflection_function, invokeArgs)
fcc.initialized = 1;
fcc.function_handler = fptr;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = NULL;
fcc.object = NULL;
@@ -2164,9 +2187,6 @@ ZEND_METHOD(reflection_generator, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "O", &generator, zend_ce_generator) == FAILURE) {
return;
@@ -2294,7 +2314,7 @@ ZEND_METHOD(reflection_generator, getThis)
REFLECTION_CHECK_VALID_GENERATOR(ex)
- if (Z_OBJ(ex->This)) {
+ if (Z_TYPE(ex->This) == IS_OBJECT) {
ZVAL_COPY(return_value, &ex->This);
} else {
ZVAL_NULL(return_value);
@@ -2316,7 +2336,7 @@ ZEND_METHOD(reflection_generator, getExecutingGenerator)
REFLECTION_CHECK_VALID_GENERATOR(ex)
current = zend_generator_get_current(generator);
- ++GC_REFCOUNT(current);
+ ++GC_REFCOUNT(&current->std);
ZVAL_OBJ(return_value, (zend_object *) current);
}
@@ -2353,9 +2373,6 @@ ZEND_METHOD(reflection_parameter, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
/* First, find the function */
switch (Z_TYPE_P(reference)) {
@@ -2873,15 +2890,9 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
return;
}
- ZVAL_COPY_VALUE(return_value, RT_CONSTANT(&param->fptr->op_array, precv->op2));
+ ZVAL_DUP(return_value, RT_CONSTANT(&param->fptr->op_array, precv->op2));
if (Z_CONSTANT_P(return_value)) {
- zend_class_entry *old_scope = EG(scope);
-
- EG(scope) = param->fptr->common.scope;
- zval_update_constant_ex(return_value, 0, NULL);
- EG(scope) = old_scope;
- } else {
- zval_copy_ctor(return_value);
+ zval_update_constant_ex(return_value, param->fptr->common.scope);
}
}
/* }}} */
@@ -3007,6 +3018,7 @@ ZEND_METHOD(reflection_type, __toString)
case _IS_BOOL: RETURN_STRINGL("bool", sizeof("bool") - 1);
case IS_LONG: RETURN_STRINGL("int", sizeof("int") - 1);
case IS_DOUBLE: RETURN_STRINGL("float", sizeof("float") - 1);
+ case IS_VOID: RETURN_STRINGL("void", sizeof("void") - 1);
EMPTY_SWITCH_DEFAULT_CASE()
}
}
@@ -3058,9 +3070,6 @@ ZEND_METHOD(reflection_method, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
/* Find the class entry */
switch (Z_TYPE_P(classname)) {
@@ -3146,7 +3155,7 @@ ZEND_METHOD(reflection_method, getClosure)
GET_REFLECTION_OBJECT_PTR(mptr);
if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
- zend_create_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
+ zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
} else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
return;
@@ -3163,7 +3172,7 @@ ZEND_METHOD(reflection_method, getClosure)
{
ZVAL_COPY(return_value, obj);
} else {
- zend_create_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
+ zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_OBJCE_P(obj), obj);
}
}
}
@@ -3235,9 +3244,7 @@ ZEND_METHOD(reflection_method, invoke)
}
fci.size = sizeof(fci);
- fci.function_table = NULL;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = object;
fci.retval = &retval;
fci.param_count = num_args - 1;
@@ -3342,9 +3349,7 @@ ZEND_METHOD(reflection_method, invokeArgs)
}
fci.size = sizeof(fci);
- fci.function_table = NULL;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = object ? Z_OBJ_P(object) : NULL;
fci.retval = &retval;
fci.param_count = argc;
@@ -3667,11 +3672,198 @@ ZEND_METHOD(reflection_method, setAccessible)
intern = Z_REFLECTION_P(getThis());
- if (intern == NULL) {
+ intern->ignore_visibility = visible;
+}
+/* }}} */
+
+/* {{{ proto public void ReflectionClassConstant::__construct(mixed class, string name)
+ Constructor. Throws an Exception in case the given class constant does not exist */
+ZEND_METHOD(reflection_class_constant, __construct)
+{
+ zval *classname, *object, name, cname;
+ zend_string *constname;
+ reflection_object *intern;
+ zend_class_entry *ce;
+ zend_class_constant *constant = NULL;
+
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "zS", &classname, &constname) == FAILURE) {
return;
}
- intern->ignore_visibility = visible;
+ object = getThis();
+ intern = Z_REFLECTION_P(object);
+
+ /* Find the class entry */
+ switch (Z_TYPE_P(classname)) {
+ case IS_STRING:
+ if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0,
+ "Class %s does not exist", Z_STRVAL_P(classname));
+ return;
+ }
+ break;
+
+ case IS_OBJECT:
+ ce = Z_OBJCE_P(classname);
+ break;
+
+ default:
+ _DO_THROW("The parameter class is expected to be either a string or an object");
+ /* returns out of this function */
+ }
+
+ if ((constant = zend_hash_find_ptr(&ce->constants_table, constname)) == NULL) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0, "Class Constant %s::%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(constname));
+ return;
+ }
+
+ ZVAL_STR_COPY(&name, constname);
+ ZVAL_STR_COPY(&cname, ce->name);
+
+ intern->ptr = constant;
+ intern->ref_type = REF_TYPE_CLASS_CONSTANT;
+ intern->ce = constant->ce;
+ intern->ignore_visibility = 0;
+ reflection_update_property(object, "name", &name);
+ reflection_update_property(object, "class", &cname);
+}
+/* }}} */
+
+/* {{{ proto public string ReflectionClassConstant::__toString()
+ Returns a string representation */
+ZEND_METHOD(reflection_class_constant, __toString)
+{
+ reflection_object *intern;
+ zend_class_constant *ref;
+ string str;
+ zval name;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ref);
+ string_init(&str);
+ _default_get_entry(getThis(), "name", sizeof("name")-1, &name);
+ _class_const_string(&str, Z_STRVAL(name), ref, "");
+ zval_ptr_dtor(&name);
+ RETURN_NEW_STR(str.buf);
+}
+/* }}} */
+
+/* {{{ proto public string ReflectionClassConstant::getName()
+ Returns the constant' name */
+ZEND_METHOD(reflection_class_constant, getName)
+{
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ _default_get_entry(getThis(), "name", sizeof("name")-1, return_value);
+}
+/* }}} */
+
+static void _class_constant_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) /* {{{ */
+{
+ reflection_object *intern;
+ zend_class_constant *ref;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ref);
+ RETURN_BOOL(Z_ACCESS_FLAGS(ref->value) & mask);
+}
+/* }}} */
+
+/* {{{ proto public bool ReflectionClassConstant::isPublic()
+ Returns whether this constant is public */
+ZEND_METHOD(reflection_class_constant, isPublic)
+{
+ _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PUBLIC | ZEND_ACC_IMPLICIT_PUBLIC);
+}
+/* }}} */
+
+/* {{{ proto public bool ReflectionClassConstant::isPrivate()
+ Returns whether this constant is private */
+ZEND_METHOD(reflection_class_constant, isPrivate)
+{
+ _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PRIVATE);
+}
+/* }}} */
+
+/* {{{ proto public bool ReflectionClassConstant::isProtected()
+ Returns whether this constant is protected */
+ZEND_METHOD(reflection_class_constant, isProtected)
+{
+ _class_constant_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PROTECTED);
+}
+/* }}} */
+
+/* {{{ proto public int ReflectionClassConstant::getModifiers()
+ Returns a bitfield of the access modifiers for this constant */
+ZEND_METHOD(reflection_class_constant, getModifiers)
+{
+ reflection_object *intern;
+ zend_class_constant *ref;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ref);
+
+ RETURN_LONG(Z_ACCESS_FLAGS(ref->value));
+}
+/* }}} */
+
+/* {{{ proto public mixed ReflectionClassConstant::getValue()
+ Returns this constant's value */
+ZEND_METHOD(reflection_class_constant, getValue)
+{
+ reflection_object *intern;
+ zend_class_constant *ref;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ref);
+
+ ZVAL_DUP(return_value, &ref->value);
+ if (Z_CONSTANT_P(return_value)) {
+ zval_update_constant_ex(return_value, ref->ce);
+ }
+}
+/* }}} */
+
+/* {{{ proto public ReflectionClass ReflectionClassConstant::getDeclaringClass()
+ Get the declaring class */
+ZEND_METHOD(reflection_class_constant, getDeclaringClass)
+{
+ reflection_object *intern;
+ zend_class_constant *ref;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ref);
+
+ zend_reflection_class_factory(ref->ce, return_value);
+}
+/* }}} */
+
+/* {{{ proto public string ReflectionClassConstant::getDocComment()
+ Returns the doc comment for this constant */
+ZEND_METHOD(reflection_class_constant, getDocComment)
+{
+ reflection_object *intern;
+ zend_class_constant *ref;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ref);
+ if (ref->doc_comment) {
+ RETURN_STR_COPY(ref->doc_comment);
+ }
+ RETURN_FALSE;
}
/* }}} */
@@ -3704,9 +3896,6 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
if (Z_TYPE_P(argument) == IS_OBJECT) {
ZVAL_STR_COPY(&classname, Z_OBJCE_P(argument)->name);
@@ -3775,7 +3964,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
/* this is necessary to make it able to work with default array
* properties, returned to user */
if (Z_CONSTANT(prop_copy)) {
- if (UNEXPECTED(zval_update_constant_ex(&prop_copy, 1, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(&prop_copy, NULL) != SUCCESS)) {
return;
}
}
@@ -3865,6 +4054,7 @@ ZEND_METHOD(reflection_class, setStaticPropertyValue)
"Class %s does not have a property named %s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
return;
}
+ ZVAL_DEREF(variable_ptr);
zval_ptr_dtor(variable_ptr);
ZVAL_COPY(variable_ptr, value);
}
@@ -4420,6 +4610,8 @@ ZEND_METHOD(reflection_class, getConstants)
{
reflection_object *intern;
zend_class_entry *ce;
+ zend_string *key;
+ zend_class_constant *c;
zval *val;
if (zend_parse_parameters_none() == FAILURE) {
@@ -4427,12 +4619,36 @@ ZEND_METHOD(reflection_class, getConstants)
}
GET_REFLECTION_OBJECT_PTR(ce);
array_init(return_value);
- ZEND_HASH_FOREACH_VAL(&ce->constants_table, val) {
- if (UNEXPECTED(zval_update_constant_ex(val, 1, ce) != SUCCESS)) {
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, key, c) {
+ if (UNEXPECTED(zval_update_constant_ex(&c->value, ce) != SUCCESS)) {
+ zend_array_destroy(Z_ARRVAL_P(return_value));
return;
}
+ val = zend_hash_add_new(Z_ARRVAL_P(return_value), key, &c->value);
+ Z_TRY_ADDREF_P(val);
+ } ZEND_HASH_FOREACH_END();
+}
+/* }}} */
+
+/* {{{ proto public array ReflectionClass::getReflectionConstants()
+ Returns an associative array containing this class' constants as ReflectionClassConstant objects */
+ZEND_METHOD(reflection_class, getReflectionConstants)
+{
+ reflection_object *intern;
+ zend_class_entry *ce;
+ zend_string *name;
+ zend_class_constant *constant;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(ce);
+ array_init(return_value);
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->constants_table, name, constant) {
+ zval class_const;
+ reflection_class_constant_factory(ce, name, constant, &class_const);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &class_const);
} ZEND_HASH_FOREACH_END();
- zend_hash_copy(Z_ARRVAL_P(return_value), &ce->constants_table, zval_add_ref_unref);
}
/* }}} */
@@ -4442,7 +4658,7 @@ ZEND_METHOD(reflection_class, getConstant)
{
reflection_object *intern;
zend_class_entry *ce;
- zval *value;
+ zend_class_constant *c;
zend_string *name;
METHOD_NOTSTATIC(reflection_class_ptr);
@@ -4451,15 +4667,36 @@ ZEND_METHOD(reflection_class, getConstant)
}
GET_REFLECTION_OBJECT_PTR(ce);
- ZEND_HASH_FOREACH_VAL(&ce->constants_table, value) {
- if (UNEXPECTED(zval_update_constant_ex(value, 1, ce) != SUCCESS)) {
+ ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) {
+ if (UNEXPECTED(zval_update_constant_ex(&c->value, ce) != SUCCESS)) {
return;
}
} ZEND_HASH_FOREACH_END();
- if ((value = zend_hash_find(&ce->constants_table, name)) == NULL) {
+ if ((c = zend_hash_find_ptr(&ce->constants_table, name)) == NULL) {
RETURN_FALSE;
}
- ZVAL_DUP(return_value, value);
+ ZVAL_DUP(return_value, &c->value);
+}
+/* }}} */
+
+/* {{{ proto public mixed ReflectionClass::getReflectionConstant(string name)
+ Returns the class' constant as ReflectionClassConstant objects */
+ZEND_METHOD(reflection_class, getReflectionConstant)
+{
+ reflection_object *intern;
+ zend_class_entry *ce;
+ zend_class_constant *constant;
+ zend_string *name;
+
+ GET_REFLECTION_OBJECT_PTR(ce);
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) {
+ return;
+ }
+
+ if ((constant = zend_hash_find_ptr(&ce->constants_table, name)) == NULL) {
+ RETURN_FALSE;
+ }
+ reflection_class_constant_factory(ce, name, constant, return_value);
}
/* }}} */
@@ -4618,10 +4855,10 @@ ZEND_METHOD(reflection_class, newInstance)
return;
}
- old_scope = EG(scope);
- EG(scope) = ce;
+ old_scope = EG(fake_scope);
+ EG(fake_scope) = ce;
constructor = Z_OBJ_HT_P(return_value)->get_constructor(Z_OBJ_P(return_value));
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
/* Run the constructor if there is one */
if (constructor) {
@@ -4646,9 +4883,7 @@ ZEND_METHOD(reflection_class, newInstance)
}
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = Z_OBJ_P(return_value);
fci.retval = &retval;
fci.param_count = num_args;
@@ -4657,7 +4892,7 @@ ZEND_METHOD(reflection_class, newInstance)
fcc.initialized = 1;
fcc.function_handler = constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();;
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
@@ -4723,10 +4958,10 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
return;
}
- old_scope = EG(scope);
- EG(scope) = ce;
+ old_scope = EG(fake_scope);
+ EG(fake_scope) = ce;
constructor = Z_OBJ_HT_P(return_value)->get_constructor(Z_OBJ_P(return_value));
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
/* Run the constructor if there is one */
if (constructor) {
@@ -4750,9 +4985,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
}
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = Z_OBJ_P(return_value);
fci.retval = &retval;
fci.param_count = argc;
@@ -4761,7 +4994,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
fcc.initialized = 1;
fcc.function_handler = constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
@@ -4956,7 +5189,7 @@ ZEND_METHOD(reflection_class, isSubclassOf)
case IS_OBJECT:
if (instanceof_function(Z_OBJCE_P(class_name), reflection_class_ptr)) {
argument = Z_REFLECTION_P(class_name);
- if (argument == NULL || argument->ptr == NULL) {
+ if (argument->ptr == NULL) {
zend_throw_error(zend_ce_error, "Internal error: Failed to retrieve the argument's reflection object");
return;
}
@@ -5000,7 +5233,7 @@ ZEND_METHOD(reflection_class, implementsInterface)
case IS_OBJECT:
if (instanceof_function(Z_OBJCE_P(interface), reflection_class_ptr)) {
argument = Z_REFLECTION_P(interface);
- if (argument == NULL || argument->ptr == NULL) {
+ if (argument->ptr == NULL) {
zend_throw_error(zend_ce_error, "Internal error: Failed to retrieve the argument's reflection object");
return;
}
@@ -5177,6 +5410,14 @@ ZEND_METHOD(reflection_property, export)
}
/* }}} */
+/* {{{ proto public static mixed ReflectionClassConstant::export(mixed class, string name [, bool return]) throws ReflectionException
+ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
+ZEND_METHOD(reflection_class_constant, export)
+{
+ _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_class_constant_ptr, 2);
+}
+/* }}} */
+
/* {{{ proto public void ReflectionProperty::__construct(mixed class, string name)
Constructor. Throws an Exception in case the given property does not exist */
ZEND_METHOD(reflection_property, __construct)
@@ -5197,9 +5438,6 @@ ZEND_METHOD(reflection_property, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
/* Find the class entry */
switch (Z_TYPE_P(classname)) {
@@ -5400,7 +5638,9 @@ ZEND_METHOD(reflection_property, getValue)
zend_throw_error(zend_ce_error, "Internal error: Could not find the property %s::%s", ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->prop.name));
/* Bails out */
}
- ZVAL_DUP(return_value, &CE_STATIC_MEMBERS(intern->ce)[ref->prop.offset]);
+ member_p = &CE_STATIC_MEMBERS(intern->ce)[ref->prop.offset];
+ ZVAL_DEREF(member_p);
+ ZVAL_COPY(return_value, member_p);
} else {
const char *class_name, *prop_name;
size_t prop_name_len;
@@ -5410,9 +5650,22 @@ ZEND_METHOD(reflection_property, getValue)
return;
}
+ if (!instanceof_function(Z_OBJCE_P(object), ref->ce)) {
+ _DO_THROW("Given object is not an instance of the class this property was declared in");
+ /* Returns from this function */
+ }
+
zend_unmangle_property_name_ex(ref->prop.name, &class_name, &prop_name, &prop_name_len);
- member_p = zend_read_property(ref->ce, object, prop_name, prop_name_len, 1, &rv);
- ZVAL_DUP(return_value, member_p);
+ member_p = zend_read_property(ref->ce, object, prop_name, prop_name_len, 0, &rv);
+ if (member_p != &rv) {
+ ZVAL_DEREF(member_p);
+ ZVAL_COPY(return_value, member_p);
+ } else {
+ if (Z_ISREF_P(member_p)) {
+ zend_unwrap_reference(member_p);
+ }
+ ZVAL_COPY_VALUE(return_value, member_p);
+ }
}
}
/* }}} */
@@ -5454,31 +5707,16 @@ ZEND_METHOD(reflection_property, setValue)
}
variable_ptr = &CE_STATIC_MEMBERS(intern->ce)[ref->prop.offset];
if (variable_ptr != value) {
- if (Z_ISREF_P(variable_ptr)) {
- zval garbage;
+ zval garbage;
- ZVAL_COPY_VALUE(&garbage, variable_ptr); /* old value should be destroyed */
+ ZVAL_DEREF(variable_ptr);
+ ZVAL_DEREF(value);
- /* To check: can't *variable_ptr be some system variable like error_zval here? */
- ZVAL_COPY_VALUE(variable_ptr, value);
- if (Z_REFCOUNTED_P(value) && Z_REFCOUNT_P(value) > 0) {
- zval_copy_ctor(variable_ptr);
- }
- zval_dtor(&garbage);
- } else {
- zval garbage;
+ ZVAL_COPY_VALUE(&garbage, variable_ptr);
- ZVAL_COPY_VALUE(&garbage, variable_ptr);
- /* if we assign referenced variable, we should separate it */
- if (Z_REFCOUNTED_P(value)) {
- Z_ADDREF_P(value);
- }
- if (Z_ISREF_P(value)) {
- SEPARATE_ZVAL(value);
- }
- ZVAL_COPY_VALUE(variable_ptr, value);
- zval_ptr_dtor(&garbage);
- }
+ ZVAL_COPY(variable_ptr, value);
+
+ zval_ptr_dtor(&garbage);
}
} else {
const char *class_name, *prop_name;
@@ -5563,10 +5801,6 @@ ZEND_METHOD(reflection_property, setAccessible)
intern = Z_REFLECTION_P(getThis());
- if (intern == NULL) {
- return;
- }
-
intern->ignore_visibility = visible;
}
/* }}} */
@@ -5598,9 +5832,6 @@ ZEND_METHOD(reflection_extension, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
lcname = do_alloca(name_len + 1, use_heap);
zend_str_tolower_copy(lcname, name_str, name_len);
if ((module = zend_hash_str_find_ptr(&module_registry, lcname, name_len)) == NULL) {
@@ -5966,9 +6197,6 @@ ZEND_METHOD(reflection_zend_extension, __construct)
object = getThis();
intern = Z_REFLECTION_P(object);
- if (intern == NULL) {
- return;
- }
extension = zend_get_extension(name_str);
if (!extension) {
@@ -6355,7 +6583,9 @@ static const zend_function_entry reflection_class_functions[] = {
ZEND_ME(reflection_class, getProperties, arginfo_reflection_class_getProperties, 0)
ZEND_ME(reflection_class, hasConstant, arginfo_reflection_class_hasConstant, 0)
ZEND_ME(reflection_class, getConstants, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class, getReflectionConstants, arginfo_reflection__void, 0)
ZEND_ME(reflection_class, getConstant, arginfo_reflection_class_getConstant, 0)
+ ZEND_ME(reflection_class, getReflectionConstant, arginfo_reflection_class_getConstant, 0)
ZEND_ME(reflection_class, getInterfaces, arginfo_reflection__void, 0)
ZEND_ME(reflection_class, getInterfaceNames, arginfo_reflection__void, 0)
ZEND_ME(reflection_class, isInterface, arginfo_reflection__void, 0)
@@ -6447,6 +6677,33 @@ static const zend_function_entry reflection_property_functions[] = {
PHP_FE_END
};
+ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_class_constant_export, 0, 0, 2)
+ ZEND_ARG_INFO(0, class)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, return)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_class_constant___construct, 0, 0, 2)
+ ZEND_ARG_INFO(0, class)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+static const zend_function_entry reflection_class_constant_functions[] = {
+ ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
+ ZEND_ME(reflection_class_constant, export, arginfo_reflection_class_constant_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
+ ZEND_ME(reflection_class_constant, __construct, arginfo_reflection_class_constant___construct, 0)
+ ZEND_ME(reflection_class_constant, __toString, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, getName, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, getValue, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, isPublic, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, isPrivate, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, isProtected, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, getModifiers, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, getDeclaringClass, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_class_constant, getDocComment, arginfo_reflection__void, 0)
+ PHP_FE_END
+};
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_parameter_export, 0, 0, 2)
ZEND_ARG_INFO(0, function)
ZEND_ARG_INFO(0, parameter)
@@ -6643,6 +6900,13 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */
zend_declare_property_string(reflection_property_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
zend_declare_property_string(reflection_property_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC);
+ INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClassConstant", reflection_class_constant_functions);
+ _reflection_entry.create_object = reflection_objects_new;
+ reflection_class_constant_ptr = zend_register_internal_class(&_reflection_entry);
+ zend_class_implements(reflection_class_constant_ptr, 1, reflector_ptr);
+ zend_declare_property_string(reflection_class_constant_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC);
+ zend_declare_property_string(reflection_class_constant_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC);
+
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_STATIC", ZEND_ACC_STATIC);
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PUBLIC", ZEND_ACC_PUBLIC);
REGISTER_REFLECTION_CLASS_CONST_LONG(property, "IS_PROTECTED", ZEND_ACC_PROTECTED);
diff --git a/ext/reflection/php_reflection.h b/ext/reflection/php_reflection.h
index b50309d9ff..b4f2cd7bc0 100644
--- a/ext/reflection/php_reflection.h
+++ b/ext/reflection/php_reflection.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/reflection/tests/017.phpt b/ext/reflection/tests/017.phpt
index d40c4d83f9..1d9275d21b 100644
--- a/ext/reflection/tests/017.phpt
+++ b/ext/reflection/tests/017.phpt
@@ -10,12 +10,12 @@ class Foo {
$class = new ReflectionClass("Foo");
echo $class;
?>
---EXPECTF--
+--EXPECTF--
Class [ <user> class Foo ] {
@@ %s017.php 2-4
- Constants [1] {
- Constant [ string test ] { ok }
+ Constant [ public string test ] { ok }
}
- Static properties [0] {
diff --git a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt
new file mode 100644
index 0000000000..fd8118650f
--- /dev/null
+++ b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt
@@ -0,0 +1,194 @@
+--TEST--
+Test usage of ReflectionClassConstant methods __toString(), export(), getName(), getValue(), isPublic(), isPrivate(), isProtected(), getModifiers(), getDeclaringClass() and getDocComment().
+--FILE--
+<?php
+
+function reflectClassConstant($base, $constant) {
+ $constInfo = new ReflectionClassConstant($base, $constant);
+ echo "**********************************\n";
+ $class = is_object($base) ? get_class($base) : $base;
+ echo "Reflecting on class constant $class::$constant\n\n";
+ echo "__toString():\n";
+ var_dump($constInfo->__toString());
+ echo "export():\n";
+ var_dump(ReflectionClassConstant::export($base, $constant, true));
+ echo "export():\n";
+ var_dump(ReflectionClassConstant::export($base, $constant, false));
+ echo "getName():\n";
+ var_dump($constInfo->getName());
+ echo "getValue():\n";
+ var_dump($constInfo->getValue());
+ echo "isPublic():\n";
+ var_dump($constInfo->isPublic());
+ echo "isPrivate():\n";
+ var_dump($constInfo->isPrivate());
+ echo "isProtected():\n";
+ var_dump($constInfo->isProtected());
+ echo "getModifiers():\n";
+ var_dump($constInfo->getModifiers());
+ echo "getDeclaringClass():\n";
+ var_dump($constInfo->getDeclaringClass());
+ echo "getDocComment():\n";
+ var_dump($constInfo->getDocComment());
+ echo "\n**********************************\n";
+}
+
+class TestClass {
+ public const /** My Doc comment */ PUB = true;
+ /** Another doc comment */
+ protected const PROT = 4;
+ private const PRIV = "keepOut";
+}
+$instance = new TestClass();
+
+reflectClassConstant("TestClass", "PUB");
+reflectClassConstant("TestClass", "PROT");
+reflectClassConstant("TestClass", "PRIV");
+reflectClassConstant($instance, "PRIV");
+reflectClassConstant($instance, "BAD_CONST");
+
+?>
+--EXPECTF--
+**********************************
+Reflecting on class constant TestClass::PUB
+
+__toString():
+string(38) "Constant [ public boolean PUB ] { 1 }
+"
+export():
+string(38) "Constant [ public boolean PUB ] { 1 }
+"
+export():
+Constant [ public boolean PUB ] { 1 }
+
+NULL
+getName():
+string(3) "PUB"
+getValue():
+bool(true)
+isPublic():
+bool(true)
+isPrivate():
+bool(false)
+isProtected():
+bool(false)
+getModifiers():
+int(256)
+getDeclaringClass():
+object(ReflectionClass)#3 (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+string(21) "/** My Doc comment */"
+
+**********************************
+**********************************
+Reflecting on class constant TestClass::PROT
+
+__toString():
+string(42) "Constant [ protected integer PROT ] { 4 }
+"
+export():
+string(42) "Constant [ protected integer PROT ] { 4 }
+"
+export():
+Constant [ protected integer PROT ] { 4 }
+
+NULL
+getName():
+string(4) "PROT"
+getValue():
+int(4)
+isPublic():
+bool(false)
+isPrivate():
+bool(false)
+isProtected():
+bool(true)
+getModifiers():
+int(512)
+getDeclaringClass():
+object(ReflectionClass)#3 (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+string(26) "/** Another doc comment */"
+
+**********************************
+**********************************
+Reflecting on class constant TestClass::PRIV
+
+__toString():
+string(45) "Constant [ private string PRIV ] { keepOut }
+"
+export():
+string(45) "Constant [ private string PRIV ] { keepOut }
+"
+export():
+Constant [ private string PRIV ] { keepOut }
+
+NULL
+getName():
+string(4) "PRIV"
+getValue():
+string(7) "keepOut"
+isPublic():
+bool(false)
+isPrivate():
+bool(true)
+isProtected():
+bool(false)
+getModifiers():
+int(1024)
+getDeclaringClass():
+object(ReflectionClass)#3 (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+bool(false)
+
+**********************************
+**********************************
+Reflecting on class constant TestClass::PRIV
+
+__toString():
+string(45) "Constant [ private string PRIV ] { keepOut }
+"
+export():
+string(45) "Constant [ private string PRIV ] { keepOut }
+"
+export():
+Constant [ private string PRIV ] { keepOut }
+
+NULL
+getName():
+string(4) "PRIV"
+getValue():
+string(7) "keepOut"
+isPublic():
+bool(false)
+isPrivate():
+bool(true)
+isProtected():
+bool(false)
+getModifiers():
+int(1024)
+getDeclaringClass():
+object(ReflectionClass)#3 (1) {
+ ["name"]=>
+ string(9) "TestClass"
+}
+getDocComment():
+bool(false)
+
+**********************************
+
+Fatal error: Uncaught ReflectionException: Class Constant TestClass::BAD_CONST does not exist in %s:%d
+Stack trace:
+#0 %s(%d): ReflectionClassConstant->__construct(Object(TestClass), 'BAD_CONST')
+#1 %s(%d): reflectClassConstant(Object(TestClass), 'BAD_CONST')
+#2 {main}
+ thrown in %s on line %d
diff --git a/ext/reflection/tests/ReflectionClassConstant_getValue.phpt b/ext/reflection/tests/ReflectionClassConstant_getValue.phpt
new file mode 100644
index 0000000000..e447d15357
--- /dev/null
+++ b/ext/reflection/tests/ReflectionClassConstant_getValue.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Test variations of getting constant values
+--FILE--
+<?php
+
+/* Use separate classes to make sure that in-place constant updates don't interfere */
+class A {
+ const X = self::Y * 2;
+ const Y = 1;
+}
+class B {
+ const X = self::Y * 2;
+ const Y = 1;
+}
+class C {
+ const X = self::Y * 2;
+ const Y = 1;
+}
+
+var_dump((new ReflectionClassConstant('A', 'X'))->getValue());
+echo new ReflectionClassConstant('B', 'X');
+echo new ReflectionClass('C');
+
+?>
+--EXPECTF--
+int(2)
+Constant [ public integer X ] { 2 }
+Class [ <user> class C ] {
+ @@ %s 12-15
+
+ - Constants [2] {
+ Constant [ public integer X ] { 2 }
+ Constant [ public integer Y ] { 1 }
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [0] {
+ }
+}
diff --git a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
index 900ce21d45..bbe5fdbaec 100644
--- a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
+++ b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
@@ -5,7 +5,7 @@ Stefan Koopmanschap <stefan@phpgg.nl>
TestFest PHP|Tek
--SKIPIF--
<?php
-if (!extension_loaded('reflection)) print 'skip';
+if (!extension_loaded('reflection')) print 'skip';
?>
--FILE--
<?php
diff --git a/ext/reflection/tests/ReflectionClass_isArray.phpt b/ext/reflection/tests/ReflectionClass_isArray.phpt
new file mode 100644
index 0000000000..3eec0dac54
--- /dev/null
+++ b/ext/reflection/tests/ReflectionClass_isArray.phpt
@@ -0,0 +1,24 @@
+--TEST--
+public bool ReflectionParameter::isArray ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
+--FILE--
+<?php
+function testReflectionIsArray($a = null, $b = 0, array $c, $d=true, array $e, $f=1.5, $g="", array $h, $i="#F989898") {}
+
+$reflection = new ReflectionFunction('testReflectionIsArray');
+
+foreach ($reflection->getParameters() as $parameter) {
+ var_dump($parameter->isArray());
+}
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt
index b9a9b0d559..29d58420e3 100644
--- a/ext/reflection/tests/ReflectionClass_toString_001.phpt
+++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt
@@ -12,9 +12,9 @@ echo $rc;
Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
- Constants [3] {
- Constant [ integer IS_IMPLICIT_ABSTRACT ] { 16 }
- Constant [ integer IS_EXPLICIT_ABSTRACT ] { 32 }
- Constant [ integer IS_FINAL ] { 4 }
+ Constant [ public integer IS_IMPLICIT_ABSTRACT ] { 16 }
+ Constant [ public integer IS_EXPLICIT_ABSTRACT ] { 32 }
+ Constant [ public integer IS_FINAL ] { 4 }
}
- Static properties [0] {
@@ -34,7 +34,7 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
Property [ <default> public $name ]
}
- - Methods [50] {
+ - Methods [52] {
Method [ <internal:Reflection> final private method __clone ] {
- Parameters [0] {
@@ -175,6 +175,12 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
}
}
+ Method [ <internal:Reflection> public method getReflectionConstants ] {
+
+ - Parameters [0] {
+ }
+ }
+
Method [ <internal:Reflection> public method getConstant ] {
- Parameters [1] {
@@ -182,6 +188,13 @@ Class [ <internal:Reflection> class ReflectionClass implements Reflector ] {
}
}
+ Method [ <internal:Reflection> public method getReflectionConstant ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $name ]
+ }
+ }
+
Method [ <internal:Reflection> public method getInterfaces ] {
- Parameters [0] {
diff --git a/ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt b/ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt
index 4eda22a3f9..c1f9d99f2b 100644
--- a/ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt
+++ b/ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt
@@ -9,7 +9,7 @@ var_dump($ext->getClasses());
?>
==DONE==
--EXPECT--
-array(14) {
+array(15) {
["ReflectionException"]=>
object(ReflectionClass)#2 (1) {
["name"]=>
@@ -70,13 +70,18 @@ array(14) {
["name"]=>
string(18) "ReflectionProperty"
}
- ["ReflectionExtension"]=>
+ ["ReflectionClassConstant"]=>
object(ReflectionClass)#14 (1) {
["name"]=>
+ string(23) "ReflectionClassConstant"
+ }
+ ["ReflectionExtension"]=>
+ object(ReflectionClass)#15 (1) {
+ ["name"]=>
string(19) "ReflectionExtension"
}
["ReflectionZendExtension"]=>
- object(ReflectionClass)#15 (1) {
+ object(ReflectionClass)#16 (1) {
["name"]=>
string(23) "ReflectionZendExtension"
}
diff --git a/ext/reflection/tests/ReflectionGenerator_basic.phpt b/ext/reflection/tests/ReflectionGenerator_basic.phpt
index 528d2d9ca2..6f35b6c244 100644
--- a/ext/reflection/tests/ReflectionGenerator_basic.phpt
+++ b/ext/reflection/tests/ReflectionGenerator_basic.phpt
@@ -39,7 +39,11 @@ object(Generator)#2 (0) {
}
array(1) {
[0]=>
- array(2) {
+ array(4) {
+ ["file"]=>
+ string(%d) "%s"
+ ["line"]=>
+ int(%d)
["function"]=>
string(3) "foo"
["args"]=>
diff --git a/ext/reflection/tests/ReflectionGenerator_getTrace.phpt b/ext/reflection/tests/ReflectionGenerator_getTrace.phpt
new file mode 100644
index 0000000000..05a46009e8
--- /dev/null
+++ b/ext/reflection/tests/ReflectionGenerator_getTrace.phpt
@@ -0,0 +1,53 @@
+--TEST--
+ReflectionGenerator::getTrace() over multiple Generators
+--FILE--
+<?php
+
+function foo() {
+ yield 1;
+ yield 2;
+}
+
+function bar()
+{
+ yield from foo();
+}
+
+function baz()
+{
+ yield from bar();
+}
+
+$gen = baz();
+$gen->valid();
+
+var_dump((new ReflectionGenerator($gen))->getTrace());
+
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ array(4) {
+ ["file"]=>
+ string(%d) "%s"
+ ["line"]=>
+ int(%d)
+ ["function"]=>
+ string(3) "foo"
+ ["args"]=>
+ array(0) {
+ }
+ }
+ [1]=>
+ array(4) {
+ ["file"]=>
+ string(%d) "%s"
+ ["line"]=>
+ int(%d)
+ ["function"]=>
+ string(3) "bar"
+ ["args"]=>
+ array(0) {
+ }
+ }
+}
diff --git a/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt b/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt
index 9c0098d506..a227e1a213 100644
--- a/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt
+++ b/ext/reflection/tests/ReflectionGenerator_in_Generator.phpt
@@ -46,7 +46,11 @@ object(ReflectionFunction)#4 (1) {
NULL
array(1) {
[0]=>
- array(2) {
+ array(4) {
+ ["file"]=>
+ string(%d) "%s"
+ ["line"]=>
+ int(%d)
["function"]=>
string(9) "{closure}"
["args"]=>
diff --git a/ext/reflection/tests/ReflectionMethod_defaultArg.phpt b/ext/reflection/tests/ReflectionMethod_defaultArg.phpt
new file mode 100644
index 0000000000..1c04cade5f
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_defaultArg.phpt
@@ -0,0 +1,44 @@
+--TEST--
+ReflectionMethod and RECV_INIT (bug #70957 and #70958)
+--FILE--
+<?php
+Abstract class F {
+ private function bar($a = self::class) {}
+}
+
+Trait T
+{
+ private function bar($a = self::class) {}
+}
+
+
+class B {
+ use T;
+}
+
+echo new \ReflectionMethod('F', 'bar');
+echo new \ReflectionMethod('T', 'bar');
+echo new \ReflectionMethod('B', 'bar');
+?>
+--EXPECTF--
+Method [ <user> private method bar ] {
+ @@ %s
+
+ - Parameters [1] {
+ Parameter #0 [ <optional> $a = 'F' ]
+ }
+}
+Method [ <user> private method bar ] {
+ @@ %s
+
+ - Parameters [1] {
+ Parameter #0 [ <optional> $a = 'T' ]
+ }
+}
+Method [ <user> private method bar ] {
+ @@ %s
+
+ - Parameters [1] {
+ Parameter #0 [ <optional> $a = 'B' ]
+ }
+}
diff --git a/ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt b/ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt
new file mode 100644
index 0000000000..4719571124
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getDocComment_property_list.phpt
@@ -0,0 +1,41 @@
+--TEST--
+ReflectionMethod::getDocComment()
+--INI--
+opcache.save_comments=1
+--FILE--
+<?php
+
+class X {
+ /**
+ * doc 1
+ */
+ // Some comment
+ public
+ $x = "x",
+ $y = 'y',
+ /** doc 2 */
+ $z = 'z'
+ ;
+}
+
+$reflection = new ReflectionProperty('\X', 'x');
+echo 'X::x', PHP_EOL;
+var_dump($reflection->getDocComment());
+
+$reflection = new ReflectionProperty('\X', 'y');
+echo 'X::y', PHP_EOL;
+var_dump($reflection->getDocComment());
+
+$reflection = new ReflectionProperty('\X', 'z');
+echo 'X::z', PHP_EOL;
+var_dump($reflection->getDocComment());
+?>
+--EXPECTF--
+X::x
+string(24) "/**
+ * doc 1
+ */"
+X::y
+bool(false)
+X::z
+string(12) "/** doc 2 */"
diff --git a/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt b/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt
new file mode 100644
index 0000000000..c57a529d7b
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt
@@ -0,0 +1,29 @@
+--TEST--
+public ReflectionMethod ReflectionMethod::getPrototype ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--FILE--
+<?php
+class Hello {
+ public function sayHelloTo($name) {
+ return 'Hello ' . $name;
+ }
+}
+
+class HelloWorld extends Hello {
+ public function sayHelloTo($name) {
+ return 'Hello world: ' . $name;
+ }
+}
+
+$reflectionMethod = new ReflectionMethod('HelloWorld', 'sayHelloTo');
+var_dump($reflectionMethod->getPrototype());
+
+?>
+--EXPECT--
+object(ReflectionMethod)#2 (2) {
+ ["name"]=>
+ string(10) "sayHelloTo"
+ ["class"]=>
+ string(5) "Hello"
+}
diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
index c2152e9f87..c9bf0b0f25 100644
--- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
+++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt
@@ -15,7 +15,7 @@ class AnotherClass {
}
$instance = new TestClass();
-$instanceWithNoProperties = new AnotherClass();
+$invalidInstance = new AnotherClass();
$propInfo = new ReflectionProperty('TestClass', 'pub2');
echo "Too few args:\n";
@@ -45,9 +45,9 @@ catch(Exception $exc) {
echo $exc->getMessage();
}
-echo "\n\nInstance without property:\n";
+echo "\n\nInvalid instance:\n";
$propInfo = new ReflectionProperty('TestClass', 'pub2');
-var_dump($propInfo->getValue($instanceWithNoProperties));
+var_dump($propInfo->getValue($invalidInstance));
?>
--EXPECTF--
@@ -77,5 +77,10 @@ string(15) "static property"
Protected property:
Cannot access non-public member TestClass::prot
-Instance without property:
-NULL
+Invalid instance:
+
+Fatal error: Uncaught ReflectionException: Given object is not an instance of the class this property was declared in in %s:47
+Stack trace:
+#0 %s(47): ReflectionProperty->getValue(Object(AnotherClass))
+#1 {main}
+ thrown in %s on line 47
diff --git a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
index 1e829b3a6c..cc184c1920 100644
--- a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
+++ b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt
@@ -132,7 +132,7 @@ string(44) "Cannot access non-public member B::protected"
string(50) "Cannot access non-public member B::protectedStatic"
string(42) "Cannot access non-public member A::private"
string(1) "a"
-string(1) "b"
+string(1) "f"
string(1) "c"
string(1) "e"
string(1) "f"
diff --git a/ext/reflection/tests/ReflectionType_possible_types.phpt b/ext/reflection/tests/ReflectionType_possible_types.phpt
new file mode 100644
index 0000000000..81e08550f2
--- /dev/null
+++ b/ext/reflection/tests/ReflectionType_possible_types.phpt
@@ -0,0 +1,31 @@
+--TEST--
+ReflectionType possible types
+--FILE--
+<?php
+
+$functions = [
+ function(): void {},
+ function(): int {},
+ function(): float {},
+ function(): string {},
+ function(): bool {},
+ function(): array {},
+ function(): callable {},
+ function(): StdClass {}
+];
+
+foreach ($functions as $function) {
+ $reflectionFunc = new ReflectionFunction($function);
+ $returnType = $reflectionFunc->getReturnType();
+ var_dump($returnType->__toString());
+}
+?>
+--EXPECTF--
+string(4) "void"
+string(3) "int"
+string(5) "float"
+string(6) "string"
+string(4) "bool"
+string(5) "array"
+string(8) "callable"
+string(8) "StdClass"
diff --git a/ext/reflection/tests/bug29986.phpt b/ext/reflection/tests/bug29986.phpt
index 4c4d629f39..f5aa62a00b 100644
--- a/ext/reflection/tests/bug29986.phpt
+++ b/ext/reflection/tests/bug29986.phpt
@@ -20,11 +20,11 @@ Class [ <user> class just_constants ] {
@@ %s %d-%d
- Constants [5] {
- Constant [ boolean BOOLEAN_CONSTANT ] { 1 }
- Constant [ null NULL_CONSTANT ] { }
- Constant [ string STRING_CONSTANT ] { This is a string }
- Constant [ integer INTEGER_CONSTANT ] { 1000 }
- Constant [ float FLOAT_CONSTANT ] { 3.14159265 }
+ Constant [ public boolean BOOLEAN_CONSTANT ] { 1 }
+ Constant [ public null NULL_CONSTANT ] { }
+ Constant [ public string STRING_CONSTANT ] { This is a string }
+ Constant [ public integer INTEGER_CONSTANT ] { 1000 }
+ Constant [ public float FLOAT_CONSTANT ] { 3.14159265 }
}
- Static properties [0] {
diff --git a/ext/reflection/tests/bug45765.phpt b/ext/reflection/tests/bug45765.phpt
index b0c1be2c4c..7963a03eea 100644
--- a/ext/reflection/tests/bug45765.phpt
+++ b/ext/reflection/tests/bug45765.phpt
@@ -31,7 +31,7 @@ Object of class [ <user> class foo extends foo2 ] {
@@ %s 7-21
- Constants [1] {
- Constant [ string BAR ] { foo's bar }
+ Constant [ public string BAR ] { foo's bar }
}
- Static properties [0] {
diff --git a/ext/reflection/tests/bug70674.phpt b/ext/reflection/tests/bug70674.phpt
new file mode 100644
index 0000000000..82cfc53f1e
--- /dev/null
+++ b/ext/reflection/tests/bug70674.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
+--FILE--
+<?php
+var_dump(((new ReflectionFunction("strlen"))->getClosure())("hello"));
+?>
+--EXPECT--
+int(5)
diff --git a/ext/reflection/tests/bug70960.phpt b/ext/reflection/tests/bug70960.phpt
new file mode 100644
index 0000000000..30885cd1fa
--- /dev/null
+++ b/ext/reflection/tests/bug70960.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters)
+--FILE--
+<?php
+
+$ref = new ReflectionFunction('array_unique');
+var_dump(count($ref->getParameters()));
+?>
+--EXPECT--
+int(2)
diff --git a/ext/reflection/tests/bug70982.phpt b/ext/reflection/tests/bug70982.phpt
new file mode 100644
index 0000000000..d530846f64
--- /dev/null
+++ b/ext/reflection/tests/bug70982.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70982 (setStaticPropertyValue behaviors inconsistently with 5.6)
+--FILE--
+<?php
+class Foo {
+ static $abc;
+ function __construct()
+ {
+ var_dump(self::$abc);
+ }
+}
+
+class Bar extends Foo {
+
+}
+
+$rf = new ReflectionClass('Bar');
+$rf->setStaticPropertyValue('abc', 'hi');
+$foo = $rf->newInstance();
+?>
+--EXPECT--
+string(2) "hi"
diff --git a/ext/reflection/tests/bug71018.phpt b/ext/reflection/tests/bug71018.phpt
new file mode 100644
index 0000000000..00baa31d3c
--- /dev/null
+++ b/ext/reflection/tests/bug71018.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #71018 (ReflectionProperty::setValue() behavior changed)
+--FILE--
+<?php
+class T1 {
+ public static $data;
+
+ public static function getDataBySelf()
+ {
+ return self::$data;
+ }
+
+ public static function getDataByStatic()
+ {
+ return static::$data;
+ }
+}
+
+class T2 extends T1 {}
+
+$Prop1 = new ReflectionProperty(T1::class, 'data');
+$Prop2 = new ReflectionProperty(T2::class, 'data');
+
+// #1
+// prints: hello, hello in PHP5, but world, hello in PHP7 - not OK
+$Prop1->setValue(\T1::class, "world");
+$Prop2->setValue(\T2::class, 'hello');
+var_dump("T2::self = " . T2::getDataBySelf());
+var_dump("T2::static = " . T2::getDataByStatic());
+
+// #2
+// prints: hello, hello in both PHP5 and PHP7 - OK
+T1::$data = "world";
+T2::$data = 'hello';
+
+var_dump("T2::self = " . T2::getDataBySelf());
+var_dump("T2::static = " . T2::getDataByStatic());
+?>
+--EXPECT--
+string(16) "T2::self = hello"
+string(18) "T2::static = hello"
+string(16) "T2::self = hello"
+string(18) "T2::static = hello"
diff --git a/ext/reflection/tests/bug71767.phpt b/ext/reflection/tests/bug71767.phpt
new file mode 100644
index 0000000000..8c4059abf4
--- /dev/null
+++ b/ext/reflection/tests/bug71767.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Bug #71767 (ReflectionMethod::getDocComment returns the wrong comment)
+--FILE--
+<?php
+
+/** Correct docblock */
+function foo(
+ /** wrong docblock */
+ $arg
+) {
+}
+
+class Foo {
+ /** Correct docblock */
+ public function bar(
+ /** wrong docblock */
+ $arg
+ ) {
+
+ }
+}
+
+/** Correct docblock */
+$func = function(
+ /** wrong docblock */
+ $arg
+) {
+};
+
+$reflectionFunction = new ReflectionFunction('foo');
+$reflectionClass = new ReflectionClass(Foo::class);
+$reflectionClosure = new ReflectionFunction($func);
+
+echo $reflectionFunction->getDocComment() . PHP_EOL;
+echo $reflectionClass->getMethod('bar')->getDocComment() . PHP_EOL;
+echo $reflectionClosure->getDocComment() . PHP_EOL;
+
+echo "Done\n";
+?>
+--EXPECTF--
+/** Correct docblock */
+/** Correct docblock */
+/** Correct docblock */
+Done
diff --git a/ext/reflection/tests/bug72174.phpt b/ext/reflection/tests/bug72174.phpt
new file mode 100644
index 0000000000..94416d6153
--- /dev/null
+++ b/ext/reflection/tests/bug72174.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #72174: ReflectionProperty#getValue() causes __isset call
+--FILE--
+<?php
+
+class Foo
+{
+ private $bar;
+
+ public function __construct()
+ {
+ unset($this->bar);
+ }
+
+ public function __isset($name)
+ {
+ var_dump(__METHOD__);
+ return true;
+ }
+
+ public function __get($name)
+ {
+ var_dump(__METHOD__);
+ return $name;
+ }
+}
+
+$instance = new Foo();
+$reflectionBar = (new ReflectionProperty(Foo::class, 'bar'));
+$reflectionBar->setAccessible(true);
+var_dump($reflectionBar->getValue($instance));
+
+?>
+--EXPECT--
+string(10) "Foo::__get"
+string(3) "bar"
diff --git a/ext/reflection/reflectionclass_for_traits.phpt b/ext/reflection/tests/reflectionclass_for_traits.phpt
index 526310a8b9..526310a8b9 100644
--- a/ext/reflection/reflectionclass_for_traits.phpt
+++ b/ext/reflection/tests/reflectionclass_for_traits.phpt
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index f5256206ff..b380cfe86b 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -443,7 +443,7 @@ PS_CLOSE_FUNC(files)
efree(data->basedir);
efree(data);
- *mod_data = NULL;
+ PS_SET_MOD_DATA(NULL);
return SUCCESS;
}
@@ -519,6 +519,7 @@ PS_READ_FUNC(files)
return FAILURE;
}
+ ZSTR_VAL(*val)[ZSTR_LEN(*val)] = '\0';
return SUCCESS;
}
diff --git a/ext/session/mod_files.h b/ext/session/mod_files.h
index e0a706ff31..1bc82664f7 100644
--- a/ext/session/mod_files.h
+++ b/ext/session/mod_files.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/session/mod_files.sh b/ext/session/mod_files.sh
index 75ac6a2fd7..39b7292920 100644
--- a/ext/session/mod_files.sh
+++ b/ext/session/mod_files.sh
@@ -4,7 +4,7 @@ if [[ "$2" = "" ]] || [[ "$3" = "" ]]; then
echo "Usage: $0 BASE_DIRECTORY DEPTH HASH_BITS"
echo "BASE_DIRECTORY will be created if it doesn't exist"
echo "DEPTH must be an integer number >0"
- echo "HASH_BITS(session.hash_bits_per_charactor) should be one of 4, 5, or 6"
+ echo "HASH_BITS(session.hash_bits_per_character) should be one of 4, 5, or 6"
exit 1
fi
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index 63aaf3c6f7..3f69897556 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <fcntl.h>
+#include "php_stdint.h"
#include "php_session.h"
#include "mod_mm.h"
#include "SAPI.h"
@@ -39,14 +40,11 @@
#define PS_MM_FILE "session_mm_"
-/* For php_uint32 */
-#include "ext/standard/basic_functions.h"
-
/* This list holds all data associated with one session. */
typedef struct ps_sd {
struct ps_sd *next;
- php_uint32 hv; /* hash value of key */
+ uint32_t hv; /* hash value of key */
time_t ctime; /* time of last change */
void *data;
size_t datalen; /* amount of valid data */
@@ -57,8 +55,8 @@ typedef struct ps_sd {
typedef struct {
MM *mm;
ps_sd **hash;
- php_uint32 hash_max;
- php_uint32 hash_cnt;
+ uint32_t hash_max;
+ uint32_t hash_cnt;
pid_t owner;
} ps_mm;
@@ -70,9 +68,9 @@ static ps_mm *ps_mm_instance = NULL;
# define ps_mm_debug(a)
#endif
-static inline php_uint32 ps_sd_hash(const char *data, int len)
+static inline uint32_t ps_sd_hash(const char *data, int len)
{
- php_uint32 h;
+ uint32_t h;
const char *e = data + len;
for (h = 2166136261U; data < e; ) {
@@ -85,7 +83,7 @@ static inline php_uint32 ps_sd_hash(const char *data, int len)
static void hash_split(ps_mm *data)
{
- php_uint32 nmax;
+ uint32_t nmax;
ps_sd **nhash;
ps_sd **ohash, **ehash;
ps_sd *ps, *next;
@@ -114,7 +112,7 @@ static void hash_split(ps_mm *data)
static ps_sd *ps_sd_new(ps_mm *data, const char *key)
{
- php_uint32 hv, slot;
+ uint32_t hv, slot;
ps_sd *sd;
int keylen;
@@ -155,7 +153,7 @@ static ps_sd *ps_sd_new(ps_mm *data, const char *key)
static void ps_sd_destroy(ps_mm *data, ps_sd *sd)
{
- php_uint32 slot;
+ uint32_t slot;
slot = ps_sd_hash(sd->key, strlen(sd->key)) & data->hash_max;
@@ -180,7 +178,7 @@ static void ps_sd_destroy(ps_mm *data, ps_sd *sd)
static ps_sd *ps_sd_lookup(ps_mm *data, const char *key, int rw)
{
- php_uint32 hv, slot;
+ uint32_t hv, slot;
ps_sd *ret, *prev;
hv = ps_sd_hash(key, strlen(key));
diff --git a/ext/session/mod_mm.h b/ext/session/mod_mm.h
index 77cada2db0..034cefd643 100644
--- a/ext/session/mod_mm.h
+++ b/ext/session/mod_mm.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 1f3a4e5e93..6ac5a8cfef 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -86,7 +86,16 @@ PS_OPEN_FUNC(user)
ZVAL_STRING(&args[0], (char*)save_path);
ZVAL_STRING(&args[1], (char*)session_name);
- ps_call_handler(&PSF(open), 2, args, &retval);
+ zend_try {
+ ps_call_handler(&PSF(open), 2, args, &retval);
+ } zend_catch {
+ PS(session_status) = php_session_none;
+ if (!Z_ISUNDEF(retval)) {
+ zval_ptr_dtor(&retval);
+ }
+ zend_bailout();
+ } zend_end_try();
+
PS(mod_user_implemented) = 1;
FINISH;
diff --git a/ext/session/mod_user.h b/ext/session/mod_user.h
index 592b223c60..c55fb95b0d 100644
--- a/ext/session/mod_user.h
+++ b/ext/session/mod_user.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c
index 82aea14854..a774d4bf9c 100644
--- a/ext/session/mod_user_class.c
+++ b/ext/session/mod_user_class.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,6 +22,10 @@
#include "php_session.h"
#define PS_SANITY_CHECK \
+ if (PS(session_status) != php_session_active) { \
+ php_error_docref(NULL, E_WARNING, "Session is not active"); \
+ RETURN_FALSE; \
+ } \
if (PS(default_mod) == NULL) { \
php_error_docref(NULL, E_CORE_ERROR, "Cannot call default session handler"); \
RETURN_FALSE; \
@@ -40,6 +44,7 @@ PHP_METHOD(SessionHandler, open)
{
char *save_path = NULL, *session_name = NULL;
size_t save_path_len, session_name_len;
+ int ret;
PS_SANITY_CHECK;
@@ -48,7 +53,15 @@ PHP_METHOD(SessionHandler, open)
}
PS(mod_user_is_open) = 1;
- RETVAL_BOOL(SUCCESS == PS(default_mod)->s_open(&PS(mod_data), save_path, session_name));
+
+ zend_try {
+ ret = PS(default_mod)->s_open(&PS(mod_data), save_path, session_name);
+ } zend_catch {
+ PS(session_status) = php_session_none;
+ zend_bailout();
+ } zend_end_try();
+
+ RETVAL_BOOL(SUCCESS == ret);
}
/* }}} */
@@ -56,6 +69,8 @@ PHP_METHOD(SessionHandler, open)
Wraps the old close handler */
PHP_METHOD(SessionHandler, close)
{
+ int ret;
+
PS_SANITY_CHECK_IS_OPEN;
// don't return on failure, since not closing the default handler
@@ -63,7 +78,15 @@ PHP_METHOD(SessionHandler, close)
zend_parse_parameters_none();
PS(mod_user_is_open) = 0;
- RETVAL_BOOL(SUCCESS == PS(default_mod)->s_close(&PS(mod_data)));
+
+ zend_try {
+ ret = PS(default_mod)->s_close(&PS(mod_data));
+ } zend_catch {
+ PS(session_status) = php_session_none;
+ zend_bailout();
+ } zend_end_try();
+
+ RETVAL_BOOL(SUCCESS == ret);
}
/* }}} */
@@ -81,8 +104,7 @@ PHP_METHOD(SessionHandler, read)
}
if (PS(default_mod)->s_read(&PS(mod_data), key, &val, PS(gc_maxlifetime)) == FAILURE) {
- RETVAL_FALSE;
- return;
+ RETURN_FALSE;
}
RETURN_STR(val);
diff --git a/ext/session/php_session.h b/ext/session/php_session.h
index 58f6ea85cd..a3b4de82f0 100644
--- a/ext/session/php_session.h
+++ b/ext/session/php_session.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -220,7 +220,7 @@ extern zend_module_entry session_module_entry;
#ifdef ZTS
#define PS(v) ZEND_TSRMG(ps_globals_id, php_ps_globals *, v)
#ifdef COMPILE_DL_SESSION
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#else
#define PS(v) (ps_globals.v)
diff --git a/ext/session/session.c b/ext/session/session.c
index 7baec3255d..e3723a34c6 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -65,6 +65,7 @@ PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps)
static int php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
static int (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra);
+static void php_session_track_init(void);
/* SessionHandler class */
zend_class_entry *php_session_class_entry;
@@ -97,11 +98,13 @@ zend_class_entry *php_session_update_timestamp_iface_entry;
#define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies))
static void php_session_send_cookie(void);
+static void php_session_abort(void);
/* Dispatched by RINIT and by php_session_destroy */
static inline void php_rinit_session_globals(void) /* {{{ */
{
/* Do NOT init PS(mod_user_names) here! */
+ /* TODO: These could be moved to MINIT and removed. These should be initialized by php_rshutdown_session_globals() always when execution is finished. */
PS(id) = NULL;
PS(session_status) = php_session_none;
PS(mod_data) = NULL;
@@ -129,10 +132,15 @@ static inline void php_rshutdown_session_globals(void) /* {{{ */
zend_string_release(PS(id));
PS(id) = NULL;
}
+
if (PS(session_vars)) {
zend_string_release(PS(session_vars));
PS(session_vars) = NULL;
}
+
+ /* User save handlers may end up directly here by misuse, bugs in user script, etc. */
+ /* Set session status to prevent error while restoring save handler INI value. */
+ PS(session_status) = php_session_none;
}
/* }}} */
@@ -236,6 +244,7 @@ static int php_session_decode(zend_string *data) /* {{{ */
}
if (PS(serializer)->decode(ZSTR_VAL(data), ZSTR_LEN(data)) == FAILURE) {
php_session_destroy();
+ php_session_track_init();
php_error_docref(NULL, E_WARNING, "Failed to decode session object. Session has been destroyed");
return FAILURE;
}
@@ -476,11 +485,30 @@ PHPAPI int php_session_valid_key(const char *key) /* {{{ */
}
/* }}} */
+
+static void php_session_gc(void) /* {{{ */
+{
+ int nrand;
+
+ /* GC must be done before reading session data. */
+ if ((PS(mod_data) || PS(mod_user_implemented)) && PS(gc_probability) > 0) {
+ int nrdels = -1;
+
+ nrand = (int) ((float) PS(gc_divisor) * php_combined_lcg());
+ if (nrand < PS(gc_probability)) {
+ PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &nrdels);
+ }
+ }
+} /* }}} */
+
static void php_session_initialize(void) /* {{{ */
{
zend_string *val = NULL;
+ PS(session_status) = php_session_active;
+
if (!PS(mod)) {
+ PS(session_status) = php_session_disabled;
php_error_docref(NULL, E_ERROR, "No storage module chosen - failed to initialize session");
return;
}
@@ -489,14 +517,19 @@ static void php_session_initialize(void) /* {{{ */
if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE
/* || PS(mod_data) == NULL */ /* FIXME: open must set valid PS(mod_data) with success */
) {
+ php_session_abort();
php_error_docref(NULL, E_ERROR, "Failed to initialize storage module: %s (path: %s)", PS(mod)->s_name, PS(save_path));
return;
}
/* If there is no ID, use session module to create one */
- if (!PS(id)) {
+ if (!PS(id) || !ZSTR_VAL(PS(id))[0]) {
+ if (PS(id)) {
+ zend_string_release(PS(id));
+ }
PS(id) = PS(mod)->s_create_sid(&PS(mod_data));
if (!PS(id)) {
+ php_session_abort();
zend_throw_error(zend_ce_error, "Failed to create session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path));
return;
}
@@ -518,17 +551,20 @@ static void php_session_initialize(void) /* {{{ */
}
php_session_reset_id();
- PS(session_status) = php_session_active;
/* Read data */
php_session_track_init();
if (PS(mod)->s_read(&PS(mod_data), PS(id), &val, PS(gc_maxlifetime)) == FAILURE) {
+ php_session_abort();
/* Some broken save handler implementation returns FAILURE for non-existent session ID */
/* It's better to raise error for this, but disabled error for better compatibility */
- /*
- php_error_docref(NULL, E_NOTICE, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path));
- */
+ php_error_docref(NULL, E_WARNING, "Failed to read session data: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ return;
}
+
+ /* GC must be done after read */
+ php_session_gc();
+
if (PS(session_vars)) {
zend_string_release(PS(session_vars));
PS(session_vars) = NULL;
@@ -571,11 +607,16 @@ static void php_session_save_current_state(int write) /* {{{ */
}
if ((ret == FAILURE) && !EG(exception)) {
- php_error_docref(NULL, E_WARNING, "Failed to write session data (%s). Please "
- "verify that the current setting of session.save_path "
- "is correct (%s)",
- PS(mod)->s_name,
- PS(save_path));
+ if (!PS(mod_user_implemented)) {
+ php_error_docref(NULL, E_WARNING, "Failed to write session data (%s). Please "
+ "verify that the current setting of session.save_path "
+ "is correct (%s)",
+ PS(mod)->s_name,
+ PS(save_path));
+ } else {
+ php_error_docref(NULL, E_WARNING, "Failed to write session data using user "
+ "defined save handler. (session.save_path: %s)", PS(save_path));
+ }
}
}
}
@@ -586,6 +627,22 @@ static void php_session_save_current_state(int write) /* {{{ */
}
/* }}} */
+static void php_session_normalize_vars() /* {{{ */
+{
+ PS_ENCODE_VARS;
+
+ IF_SESSION_VARS() {
+ PS_ENCODE_LOOP(
+ if (Z_TYPE_P(struc) == IS_PTR) {
+ zval *zv = (zval *)Z_PTR_P(struc);
+ ZVAL_COPY_VALUE(struc, zv);
+ ZVAL_UNDEF(zv);
+ }
+ );
+ }
+}
+/* }}} */
+
/* *************************
* INI Settings/Handlers *
************************* */
@@ -917,7 +974,6 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
{
const char *p;
const char *endptr = val + vallen;
- zval current;
int has_value;
int namelen;
zend_string *name;
@@ -940,25 +996,32 @@ PS_SERIALIZER_DECODE_FUNC(php_binary) /* {{{ */
p += namelen + 1;
if ((tmp = zend_hash_find(&EG(symbol_table), name))) {
- if ((Z_TYPE_P(tmp) == IS_ARRAY && Z_ARRVAL_P(tmp) == &EG(symbol_table)) || tmp == &PS(http_session_vars)) {
- efree(name);
+ if ((Z_TYPE_P(tmp) == IS_ARRAY &&
+ Z_ARRVAL_P(tmp) == &EG(symbol_table)) || tmp == &PS(http_session_vars)) {
+ zend_string_release(name);
continue;
}
}
if (has_value) {
- ZVAL_UNDEF(&current);
- if (php_var_unserialize(&current, (const unsigned char **) &p, (const unsigned char *) endptr, &var_hash)) {
- zval *zv = php_set_session_var(name, &current, &var_hash );
- var_replace(&var_hash, &current, zv);
+ zval *current, rv;
+ current = var_tmp_var(&var_hash);
+ if (php_var_unserialize(current, (const unsigned char **) &p, (const unsigned char *) endptr, &var_hash)) {
+ ZVAL_PTR(&rv, current);
+ php_set_session_var(name, &rv, &var_hash );
} else {
- zval_ptr_dtor(&current);
+ zend_string_release(name);
+ php_session_normalize_vars();
+ PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
+ return FAILURE;
}
+ } else {
+ PS_ADD_VARL(name);
}
- PS_ADD_VARL(name);
zend_string_release(name);
}
+ php_session_normalize_vars();
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
return SUCCESS;
@@ -1003,10 +1066,9 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
{
const char *p, *q;
const char *endptr = val + vallen;
- zval current;
- int has_value;
ptrdiff_t namelen;
zend_string *name;
+ int has_value, retval = SUCCESS;
php_unserialize_data_t var_hash;
PHP_VAR_UNSERIALIZE_INIT(var_hash);
@@ -1031,31 +1093,37 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
q++;
if ((tmp = zend_hash_find(&EG(symbol_table), name))) {
- if ((Z_TYPE_P(tmp) == IS_ARRAY && Z_ARRVAL_P(tmp) == &EG(symbol_table)) || tmp == &PS(http_session_vars)) {
+ if ((Z_TYPE_P(tmp) == IS_ARRAY &&
+ Z_ARRVAL_P(tmp) == &EG(symbol_table)) || tmp == &PS(http_session_vars)) {
goto skip;
}
}
if (has_value) {
- ZVAL_UNDEF(&current);
- if (php_var_unserialize(&current, (const unsigned char **) &q, (const unsigned char *) endptr, &var_hash)) {
- zval *zv = php_set_session_var(name, &current, &var_hash);
- var_replace(&var_hash, &current, zv);
+ zval *current, rv;
+ current = var_tmp_var(&var_hash);
+ if (php_var_unserialize(current, (const unsigned char **)&q, (const unsigned char *)endptr, &var_hash)) {
+ ZVAL_PTR(&rv, current);
+ php_set_session_var(name, &rv, &var_hash);
} else {
- zval_ptr_dtor(&current);
+ zend_string_release(name);
+ retval = FAILURE;
+ goto break_outer_loop;
}
+ } else {
+ PS_ADD_VARL(name);
}
- PS_ADD_VARL(name);
skip:
zend_string_release(name);
p = q;
}
break_outer_loop:
+ php_session_normalize_vars();
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
- return SUCCESS;
+ return retval;
}
/* }}} */
@@ -1070,7 +1138,7 @@ static ps_serializer ps_serializers[MAX_SERIALIZERS + 1] = {
PHPAPI int php_session_register_serializer(const char *name, zend_string *(*encode)(PS_SERIALIZER_ENCODE_ARGS), int (*decode)(PS_SERIALIZER_DECODE_ARGS)) /* {{{ */
{
- int ret = -1;
+ int ret = FAILURE;
int i;
for (i = 0; i < MAX_SERIALIZERS; i++) {
@@ -1079,7 +1147,7 @@ PHPAPI int php_session_register_serializer(const char *name, zend_string *(*enco
ps_serializers[i].encode = encode;
ps_serializers[i].decode = decode;
ps_serializers[i + 1].name = NULL;
- ret = 0;
+ ret = SUCCESS;
break;
}
}
@@ -1101,13 +1169,13 @@ static ps_module *ps_modules[MAX_MODULES + 1] = {
PHPAPI int php_session_register_module(ps_module *ptr) /* {{{ */
{
- int ret = -1;
+ int ret = FAILURE;
int i;
for (i = 0; i < MAX_MODULES; i++) {
if (!ps_modules[i]) {
ps_modules[i] = ptr;
- ret = 0;
+ ret = SUCCESS;
break;
}
}
@@ -1256,11 +1324,13 @@ static int php_session_cache_limiter(void) /* {{{ */
php_session_cache_limiter_t *lim;
if (PS(cache_limiter)[0] == '\0') return 0;
+ if (PS(session_status) != php_session_active) return -1;
if (SG(headers_sent)) {
const char *output_start_filename = php_output_get_start_filename();
int output_start_lineno = php_output_get_start_lineno();
+ php_session_abort();
if (output_start_filename) {
php_error_docref(NULL, E_WARNING, "Cannot send session cache limiter - headers already sent (output started at %s:%d)", output_start_filename, output_start_lineno);
} else {
@@ -1450,7 +1520,7 @@ static void ppid2sid(zval *ppid) {
PHPAPI void php_session_reset_id(void) /* {{{ */
{
int module_number = PS(module_number);
- zval *sid;
+ zval *sid, *data, *ppid;
if (!PS(id)) {
php_error_docref(NULL, E_WARNING, "Cannot set session ID - session ID is not initialized");
@@ -1490,9 +1560,20 @@ PHPAPI void php_session_reset_id(void) /* {{{ */
}
}
- if (APPLY_TRANS_SID) {
- /* php_url_scanner_reset_vars(); */
- php_url_scanner_add_var(PS(session_name), strlen(PS(session_name)), ZSTR_VAL(PS(id)), ZSTR_LEN(PS(id)), 1);
+ /* Apply trans sid if sid cookie is not set */
+ if (APPLY_TRANS_SID
+ && (data = zend_hash_str_find(&EG(symbol_table), "_COOKIE", sizeof("_COOKIE") - 1))) {
+ ZVAL_DEREF(data);
+ if (Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), strlen(PS(session_name))))) {
+ ZVAL_DEREF(ppid);
+ } else {
+ /* FIXME: Resetting vars are required when
+ session is stop/start/regenerated. However,
+ php_url_scanner_reset_vars() resets all vars
+ including other URL rewrites set by elsewhere. */
+ /* php_url_scanner_reset_vars(); */
+ php_url_scanner_add_var(PS(session_name), strlen(PS(session_name)), ZSTR_VAL(PS(id)), ZSTR_LEN(PS(id)), 1);
+ }
}
}
/* }}} */
@@ -1502,7 +1583,6 @@ PHPAPI void php_session_start(void) /* {{{ */
zval *ppid;
zval *data;
char *p, *value;
- int nrand;
size_t lensess;
switch (PS(session_status)) {
@@ -1575,6 +1655,7 @@ PHPAPI void php_session_start(void) /* {{{ */
* '<session-name>=<session-id>' to allow URLs of the form
* http://yoursite/<session-name>=<session-id>/script.php */
if (PS(define_sid) && !PS(id) &&
+ zend_is_auto_global_str("_SERVER", sizeof("_SERVER") - 1) == SUCCESS &&
(data = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "REQUEST_URI", sizeof("REQUEST_URI") - 1)) &&
Z_TYPE_P(data) == IS_STRING &&
(p = strstr(Z_STRVAL_P(data), PS(session_name))) &&
@@ -1611,28 +1692,14 @@ PHPAPI void php_session_start(void) /* {{{ */
php_session_initialize();
php_session_cache_limiter();
-
- if ((PS(mod_data) || PS(mod_user_implemented)) && PS(gc_probability) > 0) {
- int nrdels = -1;
-
- nrand = (int) ((float) PS(gc_divisor) * php_combined_lcg());
- if (nrand < PS(gc_probability)) {
- PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &nrdels);
-#ifdef SESSION_DEBUG
- if (nrdels != -1) {
- php_error_docref(NULL, E_NOTICE, "purged %d expired session objects", nrdels);
- }
-#endif
- }
- }
}
/* }}} */
static void php_session_flush(int write) /* {{{ */
{
if (PS(session_status) == php_session_active) {
- PS(session_status) = php_session_none;
php_session_save_current_state(write);
+ PS(session_status) = php_session_none;
}
}
/* }}} */
@@ -1640,10 +1707,10 @@ static void php_session_flush(int write) /* {{{ */
static void php_session_abort(void) /* {{{ */
{
if (PS(session_status) == php_session_active) {
- PS(session_status) = php_session_none;
if (PS(mod_data) || PS(mod_user_implemented)) {
PS(mod)->s_close(&PS(mod_data));
}
+ PS(session_status) = php_session_none;
}
}
/* }}} */
@@ -2012,47 +2079,103 @@ static PHP_FUNCTION(session_id)
static PHP_FUNCTION(session_regenerate_id)
{
zend_bool del_ses = 0;
- zend_string *data = NULL;
+ zend_string *data;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &del_ses) == FAILURE) {
return;
}
+ if (PS(session_status) != php_session_active) {
+ php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - session is not active");
+ RETURN_FALSE;
+ }
+
if (SG(headers_sent) && PS(use_cookies)) {
php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - headers already sent");
RETURN_FALSE;
}
- if (PS(session_status) != php_session_active) {
- php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - session is not active");
- RETURN_FALSE;
+ /* Process old session data */
+ if (del_ses) {
+ if (PS(mod)->s_destroy(&PS(mod_data), PS(id)) == FAILURE) {
+ PS(mod)->s_close(&PS(mod_data));
+ PS(session_status) = php_session_none;
+ php_error_docref(NULL, E_WARNING, "Session object destruction failed. ID: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ RETURN_FALSE;
+ }
+ } else {
+ int ret;
+ data = php_session_encode();
+ if (data) {
+ ret = PS(mod)->s_write(&PS(mod_data), PS(id), data, PS(gc_maxlifetime));
+ zend_string_release(data);
+ } else {
+ ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime));
+ }
+ if (ret == FAILURE) {
+ PS(mod)->s_close(&PS(mod_data));
+ PS(session_status) = php_session_none;
+ php_error_docref(NULL, E_WARNING, "Session write failed. ID: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ RETURN_FALSE;
+ }
}
+ PS(mod)->s_close(&PS(mod_data));
- /* Keep current session data */
- data = php_session_encode();
+ /* New session data */
+ if (PS(session_vars)) {
+ zend_string_release(PS(session_vars));
+ PS(session_vars) = NULL;
+ }
+ zend_string_release(PS(id));
+ PS(id) = NULL;
- if (del_ses && PS(mod)->s_destroy(&PS(mod_data), PS(id)) == FAILURE) {
- php_error_docref(NULL, E_WARNING, "Session object destruction failed");
+ if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session_name)) == FAILURE) {
+ PS(session_status) = php_session_none;
+ php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to open session: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ RETURN_FALSE;
}
- php_rshutdown_session_globals();
- php_rinit_session_globals();
- php_session_initialize();
- /* Restore session data */
- if (data) {
- if (PS(session_vars)) {
- zend_string_release(PS(session_vars));
- PS(session_vars) = NULL;
+ PS(id) = PS(mod)->s_create_sid(&PS(mod_data));
+ if (!PS(id)) {
+ PS(session_status) = php_session_none;
+ php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create new session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ RETURN_FALSE;
+ }
+ if (PS(use_strict_mode) && PS(mod)->s_validate_sid &&
+ PS(mod)->s_validate_sid(&PS(mod_data), PS(id)) == FAILURE) {
+ zend_string_release(PS(id));
+ PS(id) = PS(mod)->s_create_sid(&PS(mod_data));
+ if (!PS(id)) {
+ PS(mod)->s_close(&PS(mod_data));
+ PS(session_status) = php_session_none;
+ php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create session ID by collision: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ RETURN_FALSE;
}
- php_session_decode(data);
+ }
+ /* Read is required to make new session data at this point. */
+ if (PS(mod)->s_read(&PS(mod_data), PS(id), &data, PS(gc_maxlifetime)) == FAILURE) {
+ PS(mod)->s_close(&PS(mod_data));
+ PS(session_status) = php_session_none;
+ php_error_docref(NULL, E_RECOVERABLE_ERROR, "Failed to create(read) session ID: %s (path: %s)", PS(mod)->s_name, PS(save_path));
+ RETURN_FALSE;
+ }
+ if (data) {
zend_string_release(data);
}
+
+ if (PS(use_cookies)) {
+ PS(send_cookie) = 1;
+ }
+ php_session_reset_id();
+
RETURN_TRUE;
}
/* }}} */
/* {{{ proto void session_create_id([string prefix])
Generate new session ID. Intended for user save handlers. */
+#if 0
+/* This is not used yet */
static PHP_FUNCTION(session_create_id)
{
zend_string *prefix = NULL, *new_id;
@@ -2090,6 +2213,7 @@ static PHP_FUNCTION(session_create_id)
RETVAL_NEW_STR(id.s);
smart_str_free(&id);
}
+#endif
/* }}} */
/* {{{ proto string session_cache_limiter([string new_cache_limiter])
@@ -2170,8 +2294,7 @@ static PHP_FUNCTION(session_decode)
}
if (php_session_decode(str) == FAILURE) {
- /* FIXME: session_decode() should return FALSE */
- /* RETURN_FALSE; */
+ RETURN_FALSE;
}
RETURN_TRUE;
}
@@ -2203,11 +2326,6 @@ static PHP_FUNCTION(session_start)
RETURN_FALSE;
}
- if (PS(id) && !(ZSTR_LEN(PS(id)))) {
- php_error_docref(NULL, E_WARNING, "Cannot start session with empty session ID");
- RETURN_FALSE;
- }
-
/* set options */
if (options) {
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(options), num_idx, str_idx, value) {
@@ -2869,7 +2987,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
if (name_len == progress->sname_len && memcmp(data->name, PS(session_name), name_len) == 0) {
zval_dtor(&progress->sid);
ZVAL_STRINGL(&progress->sid, (*data->value), value_len);
- } else if (memcmp(data->name, PS(rfc1867_name), name_len + 1) == 0) {
+ } else if (name_len == strlen(PS(rfc1867_name)) && memcmp(data->name, PS(rfc1867_name), name_len + 1) == 0) {
smart_str_free(&progress->key);
smart_str_appends(&progress->key, PS(rfc1867_prefix));
smart_str_appendl(&progress->key, *data->value, value_len);
@@ -3026,7 +3144,7 @@ zend_module_entry session_module_entry = {
#ifdef COMPILE_DL_SESSION
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(session)
#endif
diff --git a/ext/session/tests/016.phpt b/ext/session/tests/016.phpt
index 82a85d2705..f23605eb47 100644
--- a/ext/session/tests/016.phpt
+++ b/ext/session/tests/016.phpt
@@ -22,5 +22,5 @@ session_write_close();
print "I live\n";
?>
--EXPECTF--
-Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (123;:/really%scompletely:::/invalid;;,23123;213) in %s on line %d
+Warning: session_start(): Failed to read session data: files (path: 123;:/really%scompletely:::/invalid;;,23123;213) in %s on line %d
I live
diff --git a/ext/session/tests/bug55688.phpt b/ext/session/tests/bug55688.phpt
index 8db48384af..b073dc3c5c 100644
--- a/ext/session/tests/bug55688.phpt
+++ b/ext/session/tests/bug55688.phpt
@@ -12,4 +12,4 @@ $x = new SessionHandler;
$x->gc(1);
?>
--EXPECTF--
-Warning: SessionHandler::gc(): Parent session handler is not open in %s on line %d
+Warning: SessionHandler::gc(): Session is not active in %s on line %d
diff --git a/ext/session/tests/bug60634.phpt b/ext/session/tests/bug60634.phpt
index 86dcb11526..b2f5076287 100644
--- a/ext/session/tests/bug60634.phpt
+++ b/ext/session/tests/bug60634.phpt
@@ -39,8 +39,17 @@ session_start();
session_write_close();
echo "um, hi\n";
+/*
+FIXME: Since session module try to write/close session data in
+RSHUTDOWN, write() is executed twices. This is caused by undefined
+function error and zend_bailout(). Current session module codes
+depends on this behavior. These codes should be modified to remove
+multiple write().
+*/
+
?>
--EXPECTF--
write: goodbye cruel world
+write: goodbye cruel world
close: goodbye cruel world
diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt
index d0733f5a5a..fa76ff522a 100644
--- a/ext/session/tests/bug60634_error_1.phpt
+++ b/ext/session/tests/bug60634_error_1.phpt
@@ -41,6 +41,11 @@ session_start();
session_write_close();
echo "um, hi\n";
+/*
+FIXME: Something wrong. It should try to close after error, otherwise session
+may keep "open" state.
+*/
+
?>
--EXPECTF--
write: goodbye cruel world
@@ -51,3 +56,4 @@ Stack trace:
#1 %s(%d): session_write_close()
#2 {main}
thrown in %s on line %d
+
diff --git a/ext/session/tests/bug61728.phpt b/ext/session/tests/bug61728.phpt
index 3f8dbeb58a..2780d7b7e2 100644
--- a/ext/session/tests/bug61728.phpt
+++ b/ext/session/tests/bug61728.phpt
@@ -8,32 +8,34 @@ function output_html($ext) {
return strlen($ext);
}
-function open ($save_path, $session_name) {
+function open ($save_path, $session_name) {
return true;
-}
+}
-function close() {
+function close() {
return true;
-}
+}
-function read ($id) {
-}
+function read ($id) {
+ return '';
+}
-function write ($id, $sess_data) {
+function write ($id, $sess_data) {
ob_start("output_html");
echo "laruence";
ob_end_flush();
return true;
-}
+}
-function destroy ($id) {
-}
+function destroy ($id) {
+ return true;
+}
-function gc ($maxlifetime) {
- return true;
-}
+function gc ($maxlifetime) {
+ return true;
+}
-session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
+session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
session_start();
--EXPECTF--
8
diff --git a/ext/session/tests/bug67694.phpt b/ext/session/tests/bug67694.phpt
index bf7089f2c2..a82a9fcbaf 100644
--- a/ext/session/tests/bug67694.phpt
+++ b/ext/session/tests/bug67694.phpt
@@ -11,7 +11,7 @@ date.timezone = UTC
<?php include('skipif.inc'); ?>
--FILE--
<?php
-
+ob_start();
$data = date('r');
session_start();
diff --git a/ext/session/tests/bug67972.phpt b/ext/session/tests/bug67972.phpt
index 63ed3a95b8..92c3044ac5 100644
--- a/ext/session/tests/bug67972.phpt
+++ b/ext/session/tests/bug67972.phpt
@@ -7,4 +7,5 @@ Bug #67972: SessionHandler Invalid memory read create_sid()
(new SessionHandler)->create_sid();
--EXPECTF--
-Fatal error: SessionHandler::create_sid(): Cannot call default session handler in %s on line %d
+Warning: SessionHandler::create_sid(): Session is not active in %s on line %d
+
diff --git a/ext/session/tests/bug68063.phpt b/ext/session/tests/bug68063.phpt
index d3da470d06..ec3a70d156 100644
--- a/ext/session/tests/bug68063.phpt
+++ b/ext/session/tests/bug68063.phpt
@@ -3,18 +3,22 @@ Bug #68063 (Empty session IDs do still start sessions)
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
+session.use_strict_mode=0
+session.hash_function=1
+session.hash_bits_per_character=4
--FILE--
<?php
+// Empty session ID may happen by browser bugs
+
// Could also be set with a cookie like "PHPSESSID=; path=/"
session_id('');
-// Will still start the session and return true
+// Start the session with empty string should result in new session ID
var_dump(session_start());
-// Returns an empty string
+// Returns newly created session ID
var_dump(session_id());
?>
--EXPECTF--
-Warning: session_start(): Cannot start session with empty session ID in %s on line %d
-bool(false)
-string(0) ""
+bool(true)
+string(40) "%s"
diff --git a/ext/session/tests/bug69111.phpt b/ext/session/tests/bug69111.phpt
new file mode 100644
index 0000000000..c6d10c74a0
--- /dev/null
+++ b/ext/session/tests/bug69111.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #69111 Crash in SessionHandler::read()
+--XFAIL--
+It is still a leak
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+$sh = new SessionHandler;
+session_set_save_handler($sh);
+
+$savePath = ini_get('session.save_path');
+$sessionName = ini_get('session.name');
+
+// session_start(); // Uncommenting this makes it not crash when reading the session (see below), but it will not return any data.
+
+$sh->open($savePath, $sessionName);
+$sh->write("foo", "bar");
+var_dump($sh->read(@$id));
+?>
+--EXPECTF--
+bool(false)
diff --git a/ext/session/tests/bug70013.phpt b/ext/session/tests/bug70013.phpt
new file mode 100644
index 0000000000..739e562a27
--- /dev/null
+++ b/ext/session/tests/bug70013.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #70013 (Reference to $_SESSION is lost after a call to session_regenerate_id())
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+--FILE--
+<?php
+ob_start();
+session_start();
+
+$session = &$_SESSION;
+
+$session['test'] = 1;
+session_regenerate_id(false);
+$session['test'] = 2;
+
+var_dump($session['test'] === $_SESSION['test']);
+
+$session['test'] = 3;
+session_regenerate_id(true);
+$session['test'] = 4;
+
+var_dump($session['test'] === $_SESSION['test']);
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/session/tests/bug70133.phpt b/ext/session/tests/bug70133.phpt
new file mode 100644
index 0000000000..3e019e483b
--- /dev/null
+++ b/ext/session/tests/bug70133.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #70133 (Extended SessionHandler::read is ignoring $session_id when calling parent)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+session.save_path=
+session.use_strict_mode=0
+--FILE--
+<?php
+
+class CustomReadHandler extends \SessionHandler {
+
+ public function read($session_id) {
+ return parent::read('mycustomsession');
+ }
+}
+
+ob_start();
+
+session_set_save_handler(new CustomReadHandler(), true);
+
+session_id('mycustomsession');
+session_start();
+$_SESSION['foo'] = 'hoge';
+var_dump(session_id());
+session_commit();
+
+session_id('otherid');
+session_start();
+var_dump($_SESSION);
+var_dump(session_id());
+
+?>
+--EXPECT--
+string(15) "mycustomsession"
+array(1) {
+ ["foo"]=>
+ string(4) "hoge"
+}
+string(7) "otherid"
diff --git a/ext/session/tests/bug70876.phpt b/ext/session/tests/bug70876.phpt
new file mode 100644
index 0000000000..33e0323b9f
--- /dev/null
+++ b/ext/session/tests/bug70876.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70876 Segmentation fault when regenerating session id with strict mode
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+html_errors=0
+session.save_handler=files
+--FILE--
+<?php
+ini_set('session.use_strict_mode', true);
+session_start();
+session_regenerate_id();
+
+echo "ok";
+?>
+--EXPECT--
+ok \ No newline at end of file
diff --git a/ext/session/tests/bug71162.phpt b/ext/session/tests/bug71162.phpt
new file mode 100644
index 0000000000..fe38ea2999
--- /dev/null
+++ b/ext/session/tests/bug71162.phpt
@@ -0,0 +1,79 @@
+--TEST--
+updateTimestamp never called when session data is empty
+--INI--
+session.use_strict_mode=0
+--XFAIL--
+Current session module is designed to write empty session always. In addition,
+current session module only supports SessionHandlerInterface only from PHP 7.0.
+--FILE--
+<?php
+class MySessionHandler implements SessionUpdateTimestampHandlerInterface
+{
+ public function open($path, $sessname) {
+ return TRUE;
+ }
+
+ public function close() {
+ return TRUE;
+ }
+
+ public function read($sessid) {
+ return '';
+ }
+
+ public function write($sessid, $sessdata) {
+ echo __FUNCTION__, PHP_EOL;
+ return TRUE;
+ }
+
+ public function destroy($sessid) {
+ return TRUE;
+ }
+
+ public function gc($maxlifetime) {
+ return TRUE;
+ }
+
+ public function create_sid() {
+ return sha1(random_bytes(32));
+ }
+
+ public function validateId($sid) {
+ return TRUE;
+ }
+
+ public function updateTimestamp($sessid, $sessdata) {
+ echo __FUNCTION__, PHP_EOL;
+ return TRUE;
+ }
+}
+
+ob_start();
+$handler = new MySessionHandler();
+session_set_save_handler($handler);
+
+session_id(sha1(''));
+var_dump(session_id());
+var_dump(session_start(['lazy_write'=>1]));
+session_commit();
+
+session_id(sha1(''));
+var_dump(session_id());
+var_dump(session_start(['lazy_write'=>1]));
+session_commit();
+
+session_id(sha1(''));
+var_dump(session_id());
+var_dump(session_start(['lazy_write'=>0]));
+session_commit();
+?>
+--EXPECT--
+string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
+bool(true)
+write
+string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
+bool(true)
+updateTimestamp
+string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709"
+bool(true)
+write
diff --git a/ext/session/tests/bug71186.phpt b/ext/session/tests/bug71186.phpt
new file mode 100644
index 0000000000..5eeba6035f
--- /dev/null
+++ b/ext/session/tests/bug71186.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #71186 session.hash_function - algorithm changes
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.hash_function=sha512
+session.save_handler=files
+--FILE--
+<?php
+ob_start();
+ini_set('session.use_strict_mode', 1);
+
+session_start();
+$orig = session_id();
+session_regenerate_id();
+$new = session_id();
+var_dump(strlen($orig),strlen($new));
+session_commit();
+
+ini_set('session.hash_function','sha1');
+session_id('invalid');
+session_start();
+$orig = session_id();
+session_regenerate_id();
+$new = session_id();
+var_dump(strlen($orig),strlen($new));
+?>
+--EXPECT--
+int(128)
+int(128)
+int(40)
+int(40)
diff --git a/ext/session/tests/bug71603.phpt b/ext/session/tests/bug71603.phpt
new file mode 100644
index 0000000000..588b1fecfb
--- /dev/null
+++ b/ext/session/tests/bug71603.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71683 Null pointer dereference in zend_hash_str_find_bucket
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+session.auto_start=1
+session.use_only_cookies=0
+--FILE--
+<?php
+ob_start();
+echo "ok\n";
+?>
+--EXPECTF--
+ok
+
diff --git a/ext/session/tests/bug71972.phpt b/ext/session/tests/bug71972.phpt
new file mode 100644
index 0000000000..e4c5c6b6d3
--- /dev/null
+++ b/ext/session/tests/bug71972.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71972 (Cyclic references causing session_start(): Failed to decode session object)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+--FILE--
+<?php
+ob_start();
+session_start();
+
+$_SESSION['boogie'] = 1;
+
+$_SESSION['obj1'] = new stdClass();
+for ( $x=2; $x < 20; $x++) {
+ cyclic_ref($x);
+}
+
+function cyclic_ref($num) {
+ $_SESSION['obj'.$num] = new stdClass();
+ $_SESSION['obj'.$num]->test = new stdClass();//NOTE: No bug if try commenting out this too.
+ $_SESSION['obj'.$num]->obj1 = $_SESSION['obj1'];
+}
+
+var_dump(session_decode(session_encode()) == $_SESSION);
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/session/tests/bug71974.phpt b/ext/session/tests/bug71974.phpt
new file mode 100644
index 0000000000..b692bce2c5
--- /dev/null
+++ b/ext/session/tests/bug71974.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71974 Trans sid will always be send, even if cookies are available
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=files
+session.auto_start=0
+session.use_cookies=1
+session.use_only_cookies=0
+session.use_trans_sid=1
+session.use_strict_mode=0
+--COOKIE--
+PHPSESSID=1234567890123456789012345678901234567890
+--FILE--
+<?php
+ob_start();
+session_start()
+?>
+<a href="some.php">abc</a>
+--EXPECTF--
+<a href="some.php">abc</a>
+
+
diff --git a/ext/session/tests/rfc1867_sid_invalid.phpt b/ext/session/tests/rfc1867_sid_invalid.phpt
index 4dd8f1f979..a9114e3e1d 100644
--- a/ext/session/tests/rfc1867_sid_invalid.phpt
+++ b/ext/session/tests/rfc1867_sid_invalid.phpt
@@ -47,13 +47,13 @@ session_destroy();
--EXPECTF--
Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0
-Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0
+Warning: Unknown: Failed to read session data: files (path: ) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0
-Warning: Unknown: The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0
+Warning: Unknown: Failed to read session data: files (path: ) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
string(%d) "%s"
diff --git a/ext/session/tests/session_basic3.phpt b/ext/session/tests/session_basic3.phpt
index 49c22032bd..3cc90a8eef 100644
--- a/ext/session/tests/session_basic3.phpt
+++ b/ext/session/tests/session_basic3.phpt
@@ -106,14 +106,39 @@ session_start();
// Should add session ID to relative URL only for SECURITY
echo '
<a href="/">test</a>
+<a href="/path">test</a>
+<a href="/path/">test</a>
+<a href="/path/?foo=var">test</a>
+<a href="../">test</a>
+<a href="../path">test</a>
+<a href="../path/">test</a>
+<a href="../path/?foo=var">test</a>
+
<a href="/#bar">test</a>
+<a href="/path/#bar">test</a>
+<a href="/path/?foo=var#bar">test</a>
+<a href="../#bar">test</a>
+<a href="../path/#bar">test</a>
+<a href="../path/?foo=var#bar">test</a>
+
<a href="/?foo">test</a>
<a href="/?foo#bar">test</a>
<a href="/?foo=var">test</a>
<a href="/?foo=var#bar">test</a>
+<a href="../?foo">test</a>
+<a href="../?foo#bar">test</a>
+<a href="../?foo=var">test</a>
+<a href="../?foo=var#bar">test</a>
+
<a href="file.php">test</a>
<a href="file.php?foo">test</a>
<a href="file.php?foo=var">test</a>
+<a href="file.php?foo=var#bar">test</a>
+<a href="../file.php">test</a>
+<a href="../file.php?foo">test</a>
+<a href="../file.php?foo=var">test</a>
+<a href="../file.php?foo=var#bar">test</a>
+
<a href="http://php.net">test</a>
<a href="http://php.net/">test</a>
<a href="http://php.net/#bar">test</a>
@@ -131,6 +156,7 @@ echo '
<a href="http://php.net/some/path/file.php?foo">test</a>
<a href="http://php.net/some/path/file.php?foo=var">test</a>
<a href="http://php.net/some/path/file.php?foo=var#bar">test</a>
+
<a href="https://php.net">test</a>
<a href="https://php.net/">test</a>
<a href="https://php.net/?foo=var#bar">test</a>
@@ -145,6 +171,7 @@ echo '
<a href="https://php.net:8443/file.php?foo=var#bar">test</a>
<a href="https://php.net:8443/some/path/file.php">test</a>
<a href="https://php.net:8443/some/path/file.php?foo=var#bar">test</a>
+
<a href="//php.net">test</a>
<a href="//php.net/">test</a>
<a href="//php.net/#bar">test</a>
@@ -162,10 +189,35 @@ echo '
<a href="//php.net/some/path/file.php?foo">test</a>
<a href="//php.net/some/path/file.php?foo=var">test</a>
<a href="//php.net/some/path/file.php?foo=var#bar">test</a>
+
<form action="script.php" method="post">
<input type="text" name="test1"></input>
<input type="text" name="test2" />
</form>
+<form action="../script.php" method="post">
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="/path/script.php" method="post">
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="../path/script.php" method="post">
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="http://php.net/script.php" method="post">
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="https://php.net/script.php" method="post">
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="//php.net/script.php" method="post">
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
';
var_dump(session_commit());
@@ -189,6 +241,31 @@ ob_end_flush();
<a href="file.php?PHPSESSID=testid">test</a>
<a href="file.php?foo&PHPSESSID=testid">test</a>
<a href="file.php?foo=var&PHPSESSID=testid">test</a>
+<a href="/?PHPSESSID=testid">test</a>
+<a href="/path?PHPSESSID=testid">test</a>
+<a href="/path/?PHPSESSID=testid">test</a>
+<a href="/path/?foo=var&PHPSESSID=testid">test</a>
+<a href="../?PHPSESSID=testid">test</a>
+<a href="../path?PHPSESSID=testid">test</a>
+<a href="../path/?PHPSESSID=testid">test</a>
+<a href="../path/?foo=var&PHPSESSID=testid">test</a>
+
+<a href="/?PHPSESSID=testid#bar">test</a>
+<a href="/path/?PHPSESSID=testid#bar">test</a>
+<a href="/path/?foo=var&PHPSESSID=testid#bar">test</a>
+<a href="../?PHPSESSID=testid#bar">test</a>
+<a href="../path/?PHPSESSID=testid#bar">test</a>
+<a href="../path/?foo=var&PHPSESSID=testid#bar">test</a>
+
+<a href="/?foo">test</a>
+<a href="/?foo#bar">test</a>
+<a href="/?foo=var">test</a>
+<a href="/?foo=var#bar">test</a>
+<a href="../?foo">test</a>
+<a href="../?foo#bar">test</a>
+<a href="../?foo=var">test</a>
+<a href="../?foo=var#bar">test</a>
+
<a href="http://php.net">test</a>
<a href="http://php.net/">test</a>
<a href="http://php.net/#bar">test</a>
@@ -206,6 +283,7 @@ ob_end_flush();
<a href="http://php.net/some/path/file.php?foo">test</a>
<a href="http://php.net/some/path/file.php?foo=var">test</a>
<a href="http://php.net/some/path/file.php?foo=var#bar">test</a>
+
<a href="https://php.net">test</a>
<a href="https://php.net/">test</a>
<a href="https://php.net/?foo=var#bar">test</a>
@@ -220,6 +298,7 @@ ob_end_flush();
<a href="https://php.net:8443/file.php?foo=var#bar">test</a>
<a href="https://php.net:8443/some/path/file.php">test</a>
<a href="https://php.net:8443/some/path/file.php?foo=var#bar">test</a>
+
<a href="//php.net">test</a>
<a href="//php.net/">test</a>
<a href="//php.net/#bar">test</a>
@@ -237,10 +316,35 @@ ob_end_flush();
<a href="//php.net/some/path/file.php?foo">test</a>
<a href="//php.net/some/path/file.php?foo=var">test</a>
<a href="//php.net/some/path/file.php?foo=var#bar">test</a>
+
<form action="script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
<input type="text" name="test1"></input>
<input type="text" name="test2" />
</form>
+<form action="../script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="/path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="../path/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="http://php.net/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="https://php.net/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
+<form action="//php.net/script.php" method="post"><input type="hidden" name="PHPSESSID" value="testid" /><input type="hidden" name="PHPSESSID" value="testid" />
+ <input type="text" name="test1"></input>
+ <input type="text" name="test2" />
+</form>
NULL
*** Cleanup ***
bool(true)
diff --git a/ext/session/tests/session_decode_error2.phpt b/ext/session/tests/session_decode_error2.phpt
index 4160f87855..37841deed8 100644
--- a/ext/session/tests/session_decode_error2.phpt
+++ b/ext/session/tests/session_decode_error2.phpt
@@ -18,6 +18,7 @@ $data = "foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;";
var_dump(session_start());
for($index = 0; $index < strlen($data); $index++) {
+ if(session_status() != PHP_SESSION_ACTIVE) { session_start(); }
echo "\n-- Iteration $index --\n";
$encoded = substr($data, 0, $index);
var_dump(session_decode($encoded));
@@ -53,213 +54,213 @@ array(0) {
}
-- Iteration 4 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 5 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 6 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 7 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 8 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 9 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 10 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 11 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 12 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 13 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 14 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 15 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 16 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 17 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 18 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 19 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 20 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 21 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 22 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 23 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 24 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 25 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 26 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 27 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 28 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 29 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 30 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 31 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 32 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 33 --
-bool(true)
-array(1) {
- ["foo"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 34 --
@@ -333,67 +334,31 @@ array(1) {
}
-- Iteration 39 --
-bool(true)
-array(2) {
- ["foo"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 40 --
-bool(true)
-array(2) {
- ["foo"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 41 --
-bool(true)
-array(2) {
- ["foo"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 42 --
-bool(true)
-array(2) {
- ["foo"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 43 --
@@ -512,104 +477,33 @@ array(2) {
}
-- Iteration 48 --
-bool(true)
-array(3) {
- ["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["blah"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 49 --
-bool(true)
-array(3) {
- ["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["blah"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 50 --
-bool(true)
-array(3) {
- ["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["blah"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-- Iteration 51 --
-bool(true)
-array(3) {
- ["foo"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["guff"]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["blah"]=>
- NULL
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s%esession_decode_error2.php on line %d
+bool(false)
+array(0) {
}
-bool(true)
-Done
+Warning: session_destroy(): Trying to destroy uninitialized session in %s%esession_decode_error2.php on line %d
+bool(false)
+Done
diff --git a/ext/session/tests/session_regenerate_id_cookie.phpt b/ext/session/tests/session_regenerate_id_cookie.phpt
new file mode 100644
index 0000000000..d366d36e8d
--- /dev/null
+++ b/ext/session/tests/session_regenerate_id_cookie.phpt
@@ -0,0 +1,85 @@
+--TEST--
+Test session_regenerate_id() function : basic functionality
+--SKIPIF--
+<?php
+
+include('skipif.inc');
+
+require __DIR__.'/../../../sapi/cgi/tests/include.inc';
+
+get_cgi_path() or die('skip no cgi');
+
+?>
+--FILE--
+<?php
+
+/*
+ * Prototype : bool session_regenerate_id([bool $delete_old_session])
+ * Description : Update the current session id with a newly generated one
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_regenerate_id() : basic functionality for cookie ***\n";
+
+require __DIR__.'/../../../sapi/cgi/tests/include.inc';
+
+$php = get_cgi_path();
+reset_env_vars();
+
+$file = dirname(__FILE__)."/session_regenerate_id_cookie.test.php";
+
+file_put_contents($file, '<?php
+ob_start();
+
+function find_cookie_header() {
+ $headers = headers_list();
+ $target = "Set-Cookie: PHPSESSID=";
+ foreach ($headers as $h) {
+ if (strstr($h, $target) !== FALSE) {
+ echo $h."\n";
+ return TRUE;
+ }
+ }
+ var_dump($headers);
+ return FALSE;
+}
+
+var_dump(session_start());
+var_dump(find_cookie_header());
+$id = session_id();
+var_dump(session_regenerate_id());
+var_dump(find_cookie_header());
+var_dump($id !== session_id());
+var_dump(session_id());
+var_dump(session_destroy());
+
+ob_end_flush();
+?>');
+
+var_dump(`$php -n -d session.name=PHPSESSID $file`);
+
+unlink($file);
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing session_regenerate_id() : basic functionality for cookie ***
+string(%d) "X-Powered-By: PHP/7.%s
+Expires: %s
+Cache-Control: no-store, no-cache, must-revalidate
+Pragma: no-cache
+Set-Cookie: PHPSESSID=%s; path=/
+Content-type: text/html; charset=UTF-8
+
+bool(true)
+Set-Cookie: PHPSESSID=%s; path=/
+bool(true)
+bool(true)
+Set-Cookie: PHPSESSID=%s; path=/
+bool(true)
+bool(true)
+string(32) "%s"
+bool(true)
+"
+Done
+
diff --git a/ext/session/tests/session_save_path_variation2.phpt b/ext/session/tests/session_save_path_variation2.phpt
index 4cf44b75a4..60675aec3c 100644
--- a/ext/session/tests/session_save_path_variation2.phpt
+++ b/ext/session/tests/session_save_path_variation2.phpt
@@ -33,8 +33,12 @@ ob_end_flush();
string(5) "/blah"
Warning: session_start(): open(%sblah%e%s, O_RDWR) failed: No such file or directory (2) in %s on line %d
-bool(true)
+
+Warning: session_start(): Failed to read session data: files (path: %sblah) in %s on line %d
+bool(false)
string(5) "/blah"
-bool(true)
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
string(5) "/blah"
Done
diff --git a/ext/session/tests/session_save_path_variation3.phpt b/ext/session/tests/session_save_path_variation3.phpt
index b064f30183..1d290d95b3 100644
--- a/ext/session/tests/session_save_path_variation3.phpt
+++ b/ext/session/tests/session_save_path_variation3.phpt
@@ -33,8 +33,12 @@ ob_end_flush();
string(5) "/blah"
Warning: session_start(): open(%s, O_RDWR) failed: No such file or directory (2) in %s on line %d
-bool(true)
+
+Warning: session_start(): Failed to read session data: files (path: %sblah) in %s on line %d
+bool(false)
string(5) "/blah"
-bool(true)
+
+Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
+bool(false)
string(5) "/blah"
Done
diff --git a/ext/session/tests/session_set_save_handler_class_002.phpt b/ext/session/tests/session_set_save_handler_class_002.phpt
index b75a7e6390..880bc33425 100644
--- a/ext/session/tests/session_set_save_handler_class_002.phpt
+++ b/ext/session/tests/session_set_save_handler_class_002.phpt
@@ -34,7 +34,7 @@ class MySession2 extends SessionHandler {
}
public function read($id) {
- return @file_get_contents($this->path . $id);
+ return (string)@file_get_contents($this->path . $id);
}
public function write($id, $data) {
diff --git a/ext/session/tests/session_set_save_handler_class_005.phpt b/ext/session/tests/session_set_save_handler_class_005.phpt
index 5be735306a..1b8c1ce645 100644
--- a/ext/session/tests/session_set_save_handler_class_005.phpt
+++ b/ext/session/tests/session_set_save_handler_class_005.phpt
@@ -33,7 +33,7 @@ class MySession6 extends SessionHandler {
$handler = new MySession6;
session_set_save_handler($handler);
-session_start();
+var_dump(session_start());
var_dump(session_id(), ini_get('session.save_handler'), $_SESSION);
@@ -45,13 +45,12 @@ session_unset();
*** Testing session_set_save_handler() : incomplete implementation ***
Warning: SessionHandler::read(): Parent session handler is not open in %ssession_set_save_handler_class_005.php on line %d
+
+Warning: SessionHandler::close(): Parent session handler is not open in %ssession_set_save_handler_class_005.php on line %d
+
+Warning: session_start(): Failed to read session data: user (%s) in %ssession_set_save_handler_class_005.php on line %d
+bool(false)
string(%d) "%s"
string(4) "user"
array(0) {
}
-
-Warning: SessionHandler::write(): Parent session handler is not open in %ssession_set_save_handler_class_005.php on line %d
-
-Warning: session_write_close(): Failed to write session data %s in %ssession_set_save_handler_class_005.php on line %d
-
-Warning: SessionHandler::close(): Parent session handler is not open in %ssession_set_save_handler_class_005.php on line %d
diff --git a/ext/session/tests/session_set_save_handler_class_012.phpt b/ext/session/tests/session_set_save_handler_class_012.phpt
index 91e751bdfc..0ce03f865e 100644
--- a/ext/session/tests/session_set_save_handler_class_012.phpt
+++ b/ext/session/tests/session_set_save_handler_class_012.phpt
@@ -38,7 +38,7 @@ class MySession extends SessionHandler {
$oldHandler = ini_get('session.save_handler');
$handler = new MySession;
session_set_save_handler($handler);
-session_start();
+var_dump(session_start());
var_dump(session_id(), $oldHandler, ini_get('session.save_handler'), $handler->i, $_SESSION);
@@ -50,15 +50,14 @@ Warning: SessionHandler::open() expects exactly 2 parameters, 0 given in %s on l
Read %s
Warning: SessionHandler::read(): Parent session handler is not open in %s on line %d
+
+Warning: SessionHandler::close(): Parent session handler is not open in %s on line %d
+
+Warning: session_start(): Failed to read session data: user (%s) in %s on line %d
+bool(false)
string(%d) "%s"
string(5) "files"
string(4) "user"
int(2)
array(0) {
}
-
-Warning: SessionHandler::write(): Parent session handler is not open in Unknown on line 0
-
-Warning: session_write_close(): Failed to write session data %s in %s on line %d
-
-Warning: SessionHandler::close(): Parent session handler is not open in Unknown on line 0
diff --git a/ext/session/tests/session_set_save_handler_class_016.phpt b/ext/session/tests/session_set_save_handler_class_016.phpt
index 521bd86f31..4095813c9d 100644
--- a/ext/session/tests/session_set_save_handler_class_016.phpt
+++ b/ext/session/tests/session_set_save_handler_class_016.phpt
@@ -10,10 +10,10 @@ session.name=PHPSESSID
ob_start();
-/*
+/*
* Prototype : bool session_set_save_handler(SessionHandlerInterface $handler [, bool $register_shutdown_function = true])
* Description : Sets user-level session storage functions
- * Source code : ext/session/session.c
+ * Source code : ext/session/session.c
*/
echo "*** Testing session_set_save_handler() function: class with create_sid ***\n";
@@ -34,7 +34,7 @@ class MySession2 extends SessionHandler {
}
public function read($id) {
- return @file_get_contents($this->path . $id);
+ return (string)@file_get_contents($this->path . $id);
}
public function write($id, $data) {
diff --git a/ext/session/tests/session_set_save_handler_class_017.phpt b/ext/session/tests/session_set_save_handler_class_017.phpt
index 6f42d7809a..b8e7d7a7ad 100644
--- a/ext/session/tests/session_set_save_handler_class_017.phpt
+++ b/ext/session/tests/session_set_save_handler_class_017.phpt
@@ -34,7 +34,7 @@ class MySession2 extends SessionHandler {
}
public function read($id) {
- return @file_get_contents($this->path . $id);
+ return (string)@file_get_contents($this->path . $id);
}
public function write($id, $data) {
diff --git a/ext/session/tests/session_set_save_handler_error4.phpt b/ext/session/tests/session_set_save_handler_error4.phpt
index be3429b084..4267195ee1 100644
--- a/ext/session/tests/session_set_save_handler_error4.phpt
+++ b/ext/session/tests/session_set_save_handler_error4.phpt
@@ -24,7 +24,7 @@ session_set_save_handler("callback", "callback", "callback", "echo", "callback",
session_set_save_handler("callback", "callback", "callback", "callback", "echo", "callback");
session_set_save_handler("callback", "callback", "callback", "callback", "callback", "echo");
session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
-session_start();
+var_dump(session_start());
ob_end_flush();
?>
--EXPECTF--
@@ -39,3 +39,6 @@ Warning: session_set_save_handler(): Argument 4 is not a valid callback in %s on
Warning: session_set_save_handler(): Argument 5 is not a valid callback in %s on line %d
Warning: session_set_save_handler(): Argument 6 is not a valid callback in %s on line %d
+
+Warning: session_start(): Failed to read session data: user (%s) in %s on line %d
+bool(false)
diff --git a/ext/session/tests/session_set_save_handler_iface_001.phpt b/ext/session/tests/session_set_save_handler_iface_001.phpt
index 03ee42865c..6943d59cbe 100644
--- a/ext/session/tests/session_set_save_handler_iface_001.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_001.phpt
@@ -34,7 +34,7 @@ class MySession2 implements SessionHandlerInterface {
}
public function read($id) {
- return @file_get_contents($this->path . $id);
+ return (string)@file_get_contents($this->path . $id);
}
public function write($id, $data) {
diff --git a/ext/session/tests/session_set_save_handler_iface_002.phpt b/ext/session/tests/session_set_save_handler_iface_002.phpt
index 40c9ac6825..204d88c785 100644
--- a/ext/session/tests/session_set_save_handler_iface_002.phpt
+++ b/ext/session/tests/session_set_save_handler_iface_002.phpt
@@ -43,7 +43,7 @@ class MySession2 implements MySessionHandlerInterface {
}
public function read($id) {
- return @file_get_contents($this->path . $id);
+ return (string)@file_get_contents($this->path . $id);
}
public function write($id, $data) {
diff --git a/ext/session/tests/session_set_save_handler_variation4.phpt b/ext/session/tests/session_set_save_handler_variation4.phpt
index 56b8a67f2a..a711fdea59 100644
--- a/ext/session/tests/session_set_save_handler_variation4.phpt
+++ b/ext/session/tests/session_set_save_handler_variation4.phpt
@@ -80,7 +80,7 @@ array(3) {
}
Destroy [%s,%s]
-Warning: unlink(%s): No such file or directory in %s on line %d
+Warning: unlink(%s): No such file or directory in %s on line %s
Close [%s,PHPSESSID]
bool(true)
diff --git a/ext/session/tests/session_set_save_handler_variation5.phpt b/ext/session/tests/session_set_save_handler_variation5.phpt
index 4e67365b45..6ad600e4d1 100644
--- a/ext/session/tests/session_set_save_handler_variation5.phpt
+++ b/ext/session/tests/session_set_save_handler_variation5.phpt
@@ -94,6 +94,6 @@ GC [0]
bool(true)
Destroy [%s,PHPT-%d]
-Warning: unlink(%ssession_test_PHPT-%s): No such file or directory in %ssave_handler.inc on line %d
+Warning: unlink(%s): No such file or directory in %s on line %d
Close [%s,PHPSESSID]
bool(true)
diff --git a/ext/session/tests/sessionhandler_open_001.phpt b/ext/session/tests/sessionhandler_open_001.phpt
index 6ade9e00a5..e6e913a6a5 100644
--- a/ext/session/tests/sessionhandler_open_001.phpt
+++ b/ext/session/tests/sessionhandler_open_001.phpt
@@ -16,4 +16,11 @@ print "Done!\n";
?>
--EXPECTF--
+Warning: SessionHandler::open(): Session is not active in %s on line 5
+
+Warning: SessionHandler::open(): Session is not active in %s on line 6
+
+Warning: SessionHandler::open(): Session is not active in %s on line 7
+
+Warning: SessionHandler::open(): Session is not active in %s on line 8
Done!
diff --git a/ext/shmop/php_shmop.h b/ext/shmop/php_shmop.h
index 805f3a380c..b5cfd3b3c2 100644
--- a/ext/shmop/php_shmop.h
+++ b/ext/shmop/php_shmop.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -38,7 +38,7 @@ PHP_FUNCTION(shmop_write);
PHP_FUNCTION(shmop_delete);
#ifdef PHP_WIN32
-typedef int key_t;
+# include "win32/ipc.h"
#endif
struct php_shmop
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index cf2084a743..d647790aa0 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -203,6 +203,7 @@ PHP_FUNCTION(shmop_open)
}
if (shmctl(shmop->shmid, IPC_STAT, &shm)) {
+ /* please do not add coverage here: the segment would be leaked and impossible to delete via php */
php_error_docref(NULL, E_WARNING, "unable to get shared memory segment information '%s'", strerror(errno));
goto err;
}
diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt
new file mode 100644
index 0000000000..3206f90776
--- /dev/null
+++ b/ext/shmop/tests/002.phpt
@@ -0,0 +1,115 @@
+--TEST--
+shmop extension error messages
+--CREDITS--
+edgarsandi - <edgar.r.sandi@gmail.com>
+--SKIPIF--
+<?php
+ if( substr(PHP_OS, 0, 3) == "WIN") {
+ die('skip not for Windows');
+ }
+ if (!extension_loaded("shmop")) {
+ die("skip shmop() extension not available");
+ }
+?>
+--FILE--
+<?php
+ $hex_shm_id = function(){
+ return mt_rand(1338, 9999);
+ };
+
+echo PHP_EOL, '## shmop_open function tests ##';
+ // warning outputs: 4 parameters expected
+ var_dump($shm_id = shmop_open());
+
+ // warning outputs: invalid flag when the flags length != 1
+ var_dump(shmop_open($hex_shm_id(), '', 0644, 1024));
+
+ // warning outputs: invalid access mode
+ var_dump(shmop_open($hex_shm_id(), 'b', 0644, 1024));
+
+ // warning outputs: unable to attach or create shared memory segment
+ var_dump(shmop_open(null, 'a', 0644, 1024));
+
+ // warning outputs: Shared memory segment size must be greater than zero
+ var_dump(shmop_open($hex_shm_id(), "c", 0666, 0));
+
+echo PHP_EOL, '## shmop_read function tests ##';
+ // warning outputs: 3 parameters expected
+ var_dump(shmop_read());
+
+ // warning outputs: start is out of range
+ $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024);
+ var_dump(shmop_read($shm_id, -10, 0));
+ shmop_delete($shm_id);
+
+ // warning outputs: count is out of range
+ $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024);
+ var_dump(shmop_read($shm_id, 0, -10));
+ shmop_delete($shm_id);
+
+echo PHP_EOL, '## shmop_write function tests ##';
+ // warning outputs: 3 parameters expected
+ var_dump(shmop_write());
+
+ // warning outputs: offset out of range
+ $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024);
+ var_dump(shmop_write($shm_id, 'text to try write', -10));
+ shmop_delete($shm_id);
+
+echo PHP_EOL, '## shmop_size function tests ##';
+ // warning outputs: 1 parameter expected
+ var_dump(shmop_size());
+
+echo PHP_EOL, '## shmop_delete function tests ##';
+ // warning outputs: 1 parameter expected
+ var_dump(shmop_delete());
+
+echo PHP_EOL, '## shmop_close function tests ##';
+ // warning outputs: 1 parameter expected
+ var_dump(shmop_close());
+?>
+--EXPECTF--
+## shmop_open function tests ##
+Warning: shmop_open() expects exactly 4 parameters, 0 given in %s on line %d
+NULL
+
+Warning: shmop_open(): is not a valid flag in %s on line %d
+bool(false)
+
+Warning: shmop_open(): invalid access mode in %s on line %d
+bool(false)
+
+Warning: shmop_open(): unable to attach or create shared memory segment 'Invalid argument' in %s on line %d
+bool(false)
+
+Warning: shmop_open(): Shared memory segment size must be greater than zero in %s on line %d
+bool(false)
+
+## shmop_read function tests ##
+Warning: shmop_read() expects exactly 3 parameters, 0 given in %s on line %d
+NULL
+
+Warning: shmop_read(): start is out of range in %s on line %d
+bool(false)
+
+Warning: shmop_read(): count is out of range in %s on line %d
+bool(false)
+
+## shmop_write function tests ##
+Warning: shmop_write() expects exactly 3 parameters, 0 given in %s on line %d
+NULL
+
+Warning: shmop_write(): offset out of range in %s on line %d
+bool(false)
+
+## shmop_size function tests ##
+Warning: shmop_size() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+## shmop_delete function tests ##
+Warning: shmop_delete() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+## shmop_close function tests ##
+Warning: shmop_close() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h
index 1dec6796de..ea29f1399c 100644
--- a/ext/simplexml/php_simplexml.h
+++ b/ext/simplexml/php_simplexml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -45,9 +45,6 @@ extern zend_module_entry simplexml_module_entry;
PHP_MINIT_FUNCTION(simplexml);
PHP_MSHUTDOWN_FUNCTION(simplexml);
-#ifdef HAVE_SPL
-PHP_RINIT_FUNCTION(simplexml);
-#endif
PHP_MINFO_FUNCTION(simplexml);
typedef enum {
diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h
index 5fa156c850..8e09cb829a 100644
--- a/ext/simplexml/php_simplexml_exports.h
+++ b/ext/simplexml/php_simplexml_exports.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index c047d7e235..d848fcac16 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -64,7 +64,7 @@ static void php_sxe_iterator_rewind(zend_object_iterator *iter);
/* {{{ _node_as_zval()
*/
-static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, char *name, const char *nsprefix, int isprefix)
+static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, char *name, const xmlChar *nsprefix, int isprefix)
{
php_sxe_object *subnode;
@@ -76,7 +76,7 @@ static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE
subnode->iter.name = (xmlChar*)estrdup(name);
}
if (nsprefix && *nsprefix) {
- subnode->iter.nsprefix = (xmlChar*)estrdup(nsprefix);
+ subnode->iter.nsprefix = (xmlChar*)estrdup((char*)nsprefix);
subnode->iter.isprefix = isprefix;
}
@@ -978,7 +978,7 @@ static inline zend_string *sxe_xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr li
/* {{{ _get_base_node_value()
*/
-static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval *value, char *nsprefix, int isprefix)
+static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval *value, xmlChar *nsprefix, int isprefix)
{
php_sxe_object *subnode;
xmlChar *contents;
@@ -994,7 +994,7 @@ static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval
subnode->document = sxe_ref->document;
subnode->document->refcount++;
if (nsprefix && *nsprefix) {
- subnode->iter.nsprefix = (xmlChar*)estrdup(nsprefix);
+ subnode->iter.nsprefix = (xmlChar*)estrdup((char *)nsprefix);
subnode->iter.isprefix = isprefix;
}
php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL);
@@ -1186,7 +1186,7 @@ static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */
node = NULL;
} else if (sxe->iter.type != SXE_ITER_CHILD) {
- if ( sxe->iter.type == SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
+ if ( sxe->iter.type == SXE_ITER_NONE || !node->children || !node->parent || !node->next || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
node = node->children;
} else {
ZVAL_COPY_VALUE(&iter_data, &sxe->iter.data);
@@ -2206,7 +2206,12 @@ PHP_FUNCTION(simplexml_load_file)
return;
}
- docp = xmlReadFile(filename, NULL, options);
+ if (ZEND_LONG_EXCEEDS_INT(options)) {
+ php_error_docref(NULL, E_WARNING, "Invalid options");
+ RETURN_FALSE;
+ }
+
+ docp = xmlReadFile(filename, NULL, (int)options);
if (!docp) {
RETURN_FALSE;
@@ -2247,7 +2252,20 @@ PHP_FUNCTION(simplexml_load_string)
return;
}
- docp = xmlReadMemory(data, data_len, NULL, NULL, options);
+ if (ZEND_SIZE_T_INT_OVFL(data_len)) {
+ php_error_docref(NULL, E_WARNING, "Data is too long");
+ RETURN_FALSE;
+ }
+ if (ZEND_SIZE_T_INT_OVFL(ns_len)) {
+ php_error_docref(NULL, E_WARNING, "Namespace is too long");
+ RETURN_FALSE;
+ }
+ if (ZEND_LONG_EXCEEDS_INT(options)) {
+ php_error_docref(NULL, E_WARNING, "Invalid options");
+ RETURN_FALSE;
+ }
+
+ docp = xmlReadMemory(data, (int)data_len, NULL, NULL, (int)options);
if (!docp) {
RETURN_FALSE;
@@ -2284,7 +2302,20 @@ SXE_METHOD(__construct)
return;
}
- docp = is_url ? xmlReadFile(data, NULL, options) : xmlReadMemory(data, data_len, NULL, NULL, options);
+ if (ZEND_SIZE_T_INT_OVFL(data_len)) {
+ php_error_docref(NULL, E_WARNING, "Data is too long");
+ RETURN_FALSE;
+ }
+ if (ZEND_SIZE_T_INT_OVFL(ns_len)) {
+ php_error_docref(NULL, E_WARNING, "Namespace is too long");
+ RETURN_FALSE;
+ }
+ if (ZEND_LONG_EXCEEDS_INT(options)) {
+ php_error_docref(NULL, E_WARNING, "Invalid options");
+ RETURN_FALSE;
+ }
+
+ docp = is_url ? xmlReadFile(data, NULL, (int)options) : xmlReadMemory(data, (int)data_len, NULL, NULL, (int)options);
if (!docp) {
((php_libxml_node_object *)sxe)->document = NULL;
diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c
index fc3f28d6d3..49a72a81e6 100644
--- a/ext/simplexml/sxe.c
+++ b/ext/simplexml/sxe.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/simplexml/sxe.h b/ext/simplexml/sxe.h
index 78967313d1..7c64ef9082 100644
--- a/ext/simplexml/sxe.h
+++ b/ext/simplexml/sxe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt
index d4d709753f..75cf5720d5 100644
--- a/ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt
+++ b/ext/simplexml/tests/SimpleXMLElement_xpath_4.phpt
@@ -8,15 +8,10 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
--FILE--
<?php
$xml = simplexml_load_string("XXXXXXX^",$x,0x6000000000000001);
-var_dump($xml->xpath("BBBB"));
+var_dump($xml);
?>
--EXPECTF--
Notice: Undefined variable: x in %s on line %d
-Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in %s on line %d
-
-Warning: simplexml_load_string(): XXXXXXX^ in %s on line %d
-
-Warning: simplexml_load_string(): ^ in %s on line %d
+Warning: simplexml_load_string(): Invalid options in %s on line %d
bool(false)
-
diff --git a/ext/simplexml/tests/bug66084_1.phpt b/ext/simplexml/tests/bug66084_1.phpt
index 80e91df7c6..85ab10ee59 100644
--- a/ext/simplexml/tests/bug66084_1.phpt
+++ b/ext/simplexml/tests/bug66084_1.phpt
@@ -5,12 +5,14 @@ Bug #66084 simplexml_load_string() mangles empty node name, json variant
<?php if (!extension_loaded("json")) print "skip json not available"; ?>
--FILE--
<?php
+echo json_encode(simplexml_load_string('<a><b/><c><x/></c></a>')->c), "\n";
echo json_encode(simplexml_load_string('<a><b/><c><x/></c></a>')), "\n";
echo json_encode(simplexml_load_string('<a><b/><d/><c><x/></c></a>')), "\n";
echo json_encode(simplexml_load_string('<a><b/><c><d/><x/></c></a>')), "\n";
echo json_encode(simplexml_load_string('<a><b/><c><d><x/></d></c></a>')), "\n";
?>
--EXPECT--
+{"x":{}}
{"b":{},"c":{"x":{}}}
{"b":{},"d":{},"c":{"x":{}}}
{"b":{},"c":{"d":{},"x":{}}}
diff --git a/ext/skeleton/create_stubs b/ext/skeleton/create_stubs
index 1163908110..a3f3d196b3 100755
--- a/ext/skeleton/create_stubs
+++ b/ext/skeleton/create_stubs
@@ -195,7 +195,7 @@ END {
if (maxargs[i]>0) {
fetchargs = "\tif (zend_parse_parameters("
ints = ints "\tint argc = ZEND_NUM_ARGS();\n"
- fetchargs = fetchargs "argc TSRMLS_CC, " specs[i]
+ fetchargs = fetchargs "argc, " specs[i]
} else {
fetchargs = fetchargs "\tif (zend_parse_parameters_none() == FAILURE) {\n\t\treturn;\n\t}"
xmlparams = xmlparams " <void/>\n"
diff --git a/ext/skeleton/php_skeleton.h b/ext/skeleton/php_skeleton.h
index d79ca491a7..1514563a70 100644
--- a/ext/skeleton/php_skeleton.h
+++ b/ext/skeleton/php_skeleton.h
@@ -34,14 +34,10 @@ ZEND_END_MODULE_GLOBALS(extname)
You are encouraged to rename these macros something shorter, see
examples in any other php module directory.
*/
+#define EXTNAME_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(extname, v)
-#ifdef ZTS
-#define EXTNAME_G(v) ZEND_TSRMG(extname_globals_id, zend_extname_globals *, v)
-#ifdef COMPILE_DL_EXTNAME
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define EXTNAME_G(v) (extname_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_EXTNAME)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif /* PHP_EXTNAME_H */
diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c
index 9531d1985e..50f3271e20 100644
--- a/ext/skeleton/skeleton.c
+++ b/ext/skeleton/skeleton.c
@@ -153,7 +153,7 @@ zend_module_entry extname_module_entry = {
#ifdef COMPILE_DL_EXTNAME
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(extname)
#endif
diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h
index fdd36cb160..e789407b88 100644
--- a/ext/snmp/php_snmp.h
+++ b/ext/snmp/php_snmp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 92b7732e67..38d82db670 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,10 +33,7 @@
#include "php_snmp.h"
#include "zend_exceptions.h"
-
-#if HAVE_SPL
#include "ext/spl/spl_exceptions.h"
-#endif
#if HAVE_SNMP
@@ -338,7 +335,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_snmp_void, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_setSecurity, 0, 0, 8)
- ZEND_ARG_INFO(0, session)
ZEND_ARG_INFO(0, sec_level)
ZEND_ARG_INFO(0, auth_protocol)
ZEND_ARG_INFO(0, auth_passphrase)
@@ -346,7 +342,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_setSecurity, 0, 0, 8)
ZEND_ARG_INFO(0, priv_passphrase)
ZEND_ARG_INFO(0, contextName)
ZEND_ARG_INFO(0, contextEngineID)
- ZEND_ARG_INFO(0, )
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_get, 0, 0, 1)
@@ -532,7 +527,7 @@ static void php_snmp_error(zval *object, const char *docref, int type, const cha
}
if (object && (snmp_object->exceptions_enabled & type)) {
- zend_throw_exception_ex(php_snmp_exception_ce, type, snmp_object->snmp_errstr);
+ zend_throw_exception_ex(php_snmp_exception_ce, type, "%s", snmp_object->snmp_errstr);
} else {
va_start(args, format);
php_verror(docref, "", E_WARNING, format, args);
@@ -2305,16 +2300,16 @@ static void free_php_snmp_properties(zval *el) /* {{{ */
/* {{{ php_snmp_class_methods[] */
static zend_function_entry php_snmp_class_methods[] = {
- PHP_ME(snmp, __construct, arginfo_snmp_create, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, close, arginfo_snmp_void, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, setSecurity, arginfo_snmp_setSecurity, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, __construct, arginfo_snmp_create, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, close, arginfo_snmp_void, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, setSecurity, arginfo_snmp_setSecurity, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, get, arginfo_snmp_get, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, getnext, arginfo_snmp_get, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, walk, arginfo_snmp_walk, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, set, arginfo_snmp_set, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, getErrno, arginfo_snmp_void, ZEND_ACC_PUBLIC)
- PHP_ME(snmp, getError, arginfo_snmp_void, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, get, arginfo_snmp_get, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, getnext, arginfo_snmp_get, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, walk, arginfo_snmp_walk, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, set, arginfo_snmp_set, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, getErrno, arginfo_snmp_void, ZEND_ACC_PUBLIC)
+ PHP_ME(snmp, getError, arginfo_snmp_void, ZEND_ACC_PUBLIC)
PHP_FE_END
};
@@ -2416,11 +2411,7 @@ PHP_MINIT_FUNCTION(snmp)
/* Register SNMPException class */
INIT_CLASS_ENTRY(cex, "SNMPException", NULL);
-#ifdef HAVE_SPL
php_snmp_exception_ce = zend_register_internal_class_ex(&cex, spl_ce_RuntimeException);
-#else
- php_snmp_exception_ce = zend_register_internal_class_ex(&cex, zend_ce_exception);
-#endif
return SUCCESS;
}
@@ -2452,14 +2443,10 @@ PHP_MINFO_FUNCTION(snmp)
/* {{{ snmp_module_deps[]
*/
-#if ZEND_MODULE_API_NO >= 20050922
static const zend_module_dep snmp_module_deps[] = {
-#ifdef HAVE_SPL
ZEND_MOD_REQUIRED("spl")
-#endif
ZEND_MOD_END
};
-#endif
/* }}} */
/* {{{ snmp_module_entry
diff --git a/ext/snmp/tests/reflection.phpt b/ext/snmp/tests/reflection.phpt
new file mode 100644
index 0000000000..8e2b92f2e8
--- /dev/null
+++ b/ext/snmp/tests/reflection.phpt
@@ -0,0 +1,102 @@
+--TEST--
+Test SNMP Reflection
+--SKIPIF--
+<?php if (!extension_loaded('snmp')) die ("skip no snmp extension"); ?>
+--FILE--
+<?php
+
+/* ALL PHP_ME user callable methods of SNMP class should appear here */
+
+reflection::export(new reflectionmethod('snmp', '__construct'));
+reflection::export(new reflectionmethod('snmp', 'close'));
+reflection::export(new reflectionmethod('snmp', 'setSecurity'));
+reflection::export(new reflectionmethod('snmp', 'get'));
+reflection::export(new reflectionmethod('snmp', 'getnext'));
+reflection::export(new reflectionmethod('snmp', 'walk'));
+reflection::export(new reflectionmethod('snmp', 'set'));
+reflection::export(new reflectionmethod('snmp', 'getErrno'));
+reflection::export(new reflectionmethod('snmp', 'getError'));
+
+
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Method [ <internal:snmp, ctor> public method __construct ] {
+
+ - Parameters [5] {
+ Parameter #0 [ <required> $version ]
+ Parameter #1 [ <required> $host ]
+ Parameter #2 [ <required> $community ]
+ Parameter #3 [ <optional> $timeout ]
+ Parameter #4 [ <optional> $retries ]
+ }
+}
+
+Method [ <internal:snmp> public method close ] {
+
+ - Parameters [0] {
+ }
+}
+
+Method [ <internal:snmp> public method setSecurity ] {
+
+ - Parameters [7] {
+ Parameter #0 [ <required> $sec_level ]
+ Parameter #1 [ <required> $auth_protocol ]
+ Parameter #2 [ <required> $auth_passphrase ]
+ Parameter #3 [ <required> $priv_protocol ]
+ Parameter #4 [ <required> $priv_passphrase ]
+ Parameter #5 [ <required> $contextName ]
+ Parameter #6 [ <required> $contextEngineID ]
+ }
+}
+
+Method [ <internal:snmp> public method get ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $object_id ]
+ Parameter #1 [ <optional> $use_orignames ]
+ }
+}
+
+Method [ <internal:snmp> public method getnext ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $object_id ]
+ Parameter #1 [ <optional> $use_orignames ]
+ }
+}
+
+Method [ <internal:snmp> public method walk ] {
+
+ - Parameters [4] {
+ Parameter #0 [ <required> $object_id ]
+ Parameter #1 [ <required> $suffix_keys ]
+ Parameter #2 [ <required> $max_repetitions ]
+ Parameter #3 [ <required> $non_repeaters ]
+ }
+}
+
+Method [ <internal:snmp> public method set ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> $object_id ]
+ Parameter #1 [ <required> $type ]
+ Parameter #2 [ <required> $value ]
+ }
+}
+
+Method [ <internal:snmp> public method getErrno ] {
+
+ - Parameters [0] {
+ }
+}
+
+Method [ <internal:snmp> public method getError ] {
+
+ - Parameters [0] {
+ }
+}
+
+===DONE===
diff --git a/ext/snmp/tests/wrong_hostname.phpt b/ext/snmp/tests/wrong_hostname.phpt
index 53c6b22cb0..23424764b8 100644
--- a/ext/snmp/tests/wrong_hostname.phpt
+++ b/ext/snmp/tests/wrong_hostname.phpt
@@ -18,5 +18,5 @@ var_dump(snmpget('192.168..6.1', 'community', '.1.3.6.1.2.1.1.1.0', $timeout, $r
?>
--EXPECTF--
-Warning: snmpget(): php_network_getaddresses:%snot known in %s on line %d
+Warning: snmpget(): php_network_getaddresses:%s in %s on line %d
bool(false)
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 5d8bf95623..803a5cd596 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1164,13 +1164,8 @@ static xmlNodePtr to_xml_null(encodeTypePtr type, zval *data, int style, xmlNode
static void set_zval_property(zval* object, char* name, zval* val)
{
- zend_class_entry *old_scope;
-
- old_scope = EG(scope);
- EG(scope) = Z_OBJCE_P(object);
- add_property_zval(object, name, val);
+ zend_update_property(Z_OBJCE_P(object), object, name, strlen(name), val);
if (Z_REFCOUNTED_P(val)) Z_DELREF_P(val);
- EG(scope) = old_scope;
}
static zval* get_zval_property(zval* object, char* name, zval *rv)
@@ -1181,15 +1176,15 @@ static zval* get_zval_property(zval* object, char* name, zval *rv)
zend_class_entry *old_scope;
ZVAL_STRING(&member, name);
- old_scope = EG(scope);
- EG(scope) = Z_OBJCE_P(object);
+ old_scope = EG(fake_scope);
+ EG(fake_scope) = Z_OBJCE_P(object);
data = Z_OBJ_HT_P(object)->read_property(object, &member, BP_VAR_IS, NULL, rv);
if (data == &EG(uninitialized_zval)) {
/* Hack for bug #32455 */
zend_property_info *property_info;
property_info = zend_get_property_info(Z_OBJCE_P(object), Z_STR(member), 1);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
if (property_info != ZEND_WRONG_PROPERTY_INFO && property_info &&
zend_hash_exists(Z_OBJPROP_P(object), property_info->name)) {
zval_ptr_dtor(&member);
@@ -1199,7 +1194,7 @@ static zval* get_zval_property(zval* object, char* name, zval *rv)
return NULL;
}
zval_ptr_dtor(&member);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
return data;
} else if (Z_TYPE_P(object) == IS_ARRAY) {
zval *data_ptr;
@@ -1218,10 +1213,10 @@ static void unset_zval_property(zval* object, char* name)
zend_class_entry *old_scope;
ZVAL_STRING(&member, name);
- old_scope = EG(scope);
- EG(scope) = Z_OBJCE_P(object);
+ old_scope = EG(fake_scope);
+ EG(fake_scope) = Z_OBJCE_P(object);
Z_OBJ_HT_P(object)->unset_property(object, &member, NULL);
- EG(scope) = old_scope;
+ EG(fake_scope) = old_scope;
zval_ptr_dtor(&member);
} else if (Z_TYPE_P(object) == IS_ARRAY) {
zend_hash_str_del(Z_ARRVAL_P(object), name, strlen(name));
@@ -2188,9 +2183,8 @@ static void add_xml_array_elements(xmlNodePtr xmlParam,
static inline int array_num_elements(HashTable* ht)
{
if (ht->nNumUsed &&
- Z_TYPE(ht->arData[ht->nNumUsed-1].val) != IS_UNUSED &&
+ Z_TYPE(ht->arData[ht->nNumUsed-1].val) != IS_UNDEF &&
ht->arData[ht->nNumUsed-1].key == NULL) {
-
return ht->arData[ht->nNumUsed-1].h - 1;
}
return 0;
@@ -3015,7 +3009,11 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
xmlFreeNode(dummy);
} ZEND_HASH_FOREACH_END();
smart_str_0(&list);
- xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(list.s)), ZSTR_LEN(list.s));
+ if (list.s) {
+ xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(list.s)), ZSTR_LEN(list.s));
+ } else {
+ xmlNodeSetContentLen(ret, BAD_CAST(""), 0);
+ }
smart_str_free(&list);
} else {
zval tmp;
@@ -3055,7 +3053,11 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
start = next;
}
smart_str_0(&list);
- xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(list.s)), ZSTR_LEN(list.s));
+ if (list.s) {
+ xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(list.s)), ZSTR_LEN(list.s));
+ } else {
+ xmlNodeSetContentLen(ret, BAD_CAST(""), 0);
+ }
smart_str_free(&list);
efree(str);
if (data == &tmp) {zval_dtor(&tmp);}
@@ -3502,9 +3504,10 @@ static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type)
i = 0;
different = FALSE;
cur_type = prev_type = 0;
- ht = HASH_OF(array);
+ ht = Z_ARRVAL_P(array);
ZEND_HASH_FOREACH_VAL_IND(ht, tmp) {
+ ZVAL_DEREF(tmp);
if (Z_TYPE_P(tmp) == IS_OBJECT &&
Z_OBJCE_P(tmp) == soap_var_class_entry) {
zval *ztype;
diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h
index 85c9f93880..03a8bd0c30 100644
--- a/ext/soap/php_encoding.h
+++ b/ext/soap/php_encoding.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 3b42a6bf06..7c9183613c 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
#include "ext/standard/php_rand.h"
static char *get_http_header_value(char *headers, char *type);
-static int get_http_body(php_stream *socketd, int close, char *headers, char **response, int *out_size);
+static zend_string *get_http_body(php_stream *socketd, int close, char *headers);
static zend_string *get_http_headers(php_stream *socketd);
#define smart_str_append_const(str, const) \
@@ -326,25 +326,25 @@ static int in_domain(const char *host, const char *domain)
}
}
-int make_http_soap_request(zval *this_ptr,
- char *buf,
- int buf_size,
- char *location,
- char *soapaction,
- int soap_version,
- zval *return_value)
+int make_http_soap_request(zval *this_ptr,
+ zend_string *buf,
+ char *location,
+ char *soapaction,
+ int soap_version,
+ zval *return_value)
{
- char *request;
+ zend_string *request;
smart_str soap_headers = {0};
smart_str soap_headers_z = {0};
- int request_size, err;
+ int err;
php_url *phpurl = NULL;
php_stream *stream;
zval *trace, *tmp;
int use_proxy = 0;
int use_ssl;
- char *http_body, *content_type, *http_version, *cookie_itt;
- int http_body_size, http_close;
+ zend_string *http_body;
+ char *content_type, *http_version, *cookie_itt;
+ int http_close;
zend_string *http_headers;
char *connection;
int http_1_1;
@@ -363,8 +363,7 @@ int make_http_soap_request(zval *this_ptr,
return FALSE;
}
- request = buf;
- request_size = buf_size;
+ request = buf;
/* Compress request */
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "compression", sizeof("compression")-1)) != NULL && Z_TYPE_P(tmp) == IS_LONG) {
int level = Z_LVAL_P(tmp) & 0x0f;
@@ -381,7 +380,7 @@ int make_http_soap_request(zval *this_ptr,
zval params[3];
int n;
- ZVAL_STRINGL(&params[0], buf, buf_size);
+ ZVAL_STR_COPY(&params[0], buf);
ZVAL_LONG(&params[1], level);
if (kind == SOAP_COMPRESSION_DEFLATE) {
n = 2;
@@ -397,13 +396,13 @@ int make_http_soap_request(zval *this_ptr,
Z_TYPE(retval) == IS_STRING) {
zval_ptr_dtor(&params[0]);
zval_ptr_dtor(&func);
-// TODO: free retval ???
- request = Z_STRVAL(retval);
- request_size = Z_STRLEN(retval);
+ request = Z_STR(retval);
} else {
zval_ptr_dtor(&params[0]);
zval_ptr_dtor(&func);
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
smart_str_free(&soap_headers_z);
return FALSE;
}
@@ -439,7 +438,9 @@ int make_http_soap_request(zval *this_ptr,
try_again:
if (phpurl == NULL || phpurl->host == NULL) {
if (phpurl != NULL) {php_url_free(phpurl);}
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
add_soap_fault(this_ptr, "HTTP", "Unable to parse URL", NULL, NULL);
smart_str_free(&soap_headers_z);
return FALSE;
@@ -450,7 +451,9 @@ try_again:
use_ssl = 1;
} else if (phpurl->scheme == NULL || strcmp(phpurl->scheme, "http") != 0) {
php_url_free(phpurl);
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
add_soap_fault(this_ptr, "HTTP", "Unknown protocol. Only http and https are allowed.", NULL, NULL);
smart_str_free(&soap_headers_z);
return FALSE;
@@ -460,7 +463,9 @@ try_again:
PG(allow_url_fopen) = 1;
if (use_ssl && php_stream_locate_url_wrapper("https://", NULL, STREAM_LOCATE_WRAPPERS_ONLY) == NULL) {
php_url_free(phpurl);
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
add_soap_fault(this_ptr, "HTTP", "SSL support is not available in this build", NULL, NULL);
PG(allow_url_fopen) = old_allow_url_fopen;
smart_str_free(&soap_headers_z);
@@ -507,10 +512,13 @@ try_again:
if (stream) {
php_stream_auto_cleanup(stream);
add_property_resource(this_ptr, "httpsocket", stream->res);
+ GC_REFCOUNT(stream->res)++;
add_property_long(this_ptr, "_use_proxy", use_proxy);
} else {
php_url_free(phpurl);
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
add_soap_fault(this_ptr, "HTTP", "Could not connect to host", NULL, NULL);
PG(allow_url_fopen) = old_allow_url_fopen;
smart_str_free(&soap_headers_z);
@@ -524,6 +532,7 @@ try_again:
zend_resource *ret = zend_register_resource(phpurl, le_url);
add_property_resource(this_ptr, "httpurl", ret);
+ GC_REFCOUNT(ret)++;
/*zend_list_addref(ret);*/
if (context &&
@@ -618,7 +627,7 @@ try_again:
}
}
smart_str_append_const(&soap_headers,"Content-Length: ");
- smart_str_append_long(&soap_headers, request_size);
+ smart_str_append_long(&soap_headers, request->len);
smart_str_append_const(&soap_headers, "\r\n");
/* HTTP Authentication */
@@ -691,16 +700,6 @@ try_again:
PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->query, strlen(phpurl->query));
}
- /* TODO: Support for qop="auth-int" */
-/*
- if (zend_hash_find(Z_ARRVAL_PP(digest), "qop", sizeof("qop"), (void **)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING &&
- Z_STRLEN_PP(tmp) == sizeof("auth-int")-1 &&
- stricmp(Z_STRVAL_PP(tmp), "auth-int") == 0) {
- PHP_MD5Update(&md5ctx, ":", 1);
- PHP_MD5Update(&md5ctx, HEntity, HASHHEXLEN);
- }
-*/
PHP_MD5Final(hash, &md5ctx);
make_digest(HA2, hash);
@@ -813,18 +812,21 @@ try_again:
zend_hash_internal_pointer_reset(Z_ARRVAL_P(cookies));
smart_str_append_const(&soap_headers, "Cookie: ");
for (i = 0; i < n; i++) {
+ zend_ulong numindx;
+ int res = zend_hash_get_current_key(Z_ARRVAL_P(cookies), &key, &numindx);
data = zend_hash_get_current_data(Z_ARRVAL_P(cookies));
- zend_hash_get_current_key_ex(Z_ARRVAL_P(cookies), &key, NULL, NULL);
-
- if (Z_TYPE_P(data) == IS_ARRAY) {
+
+ if (res == HASH_KEY_IS_STRING && Z_TYPE_P(data) == IS_ARRAY) {
zval *value;
if ((value = zend_hash_index_find(Z_ARRVAL_P(data), 0)) != NULL &&
Z_TYPE_P(value) == IS_STRING) {
zval *tmp;
if (((tmp = zend_hash_index_find(Z_ARRVAL_P(data), 1)) == NULL ||
+ Z_TYPE_P(tmp) != IS_STRING ||
strncmp(phpurl->path?phpurl->path:"/",Z_STRVAL_P(tmp),Z_STRLEN_P(tmp)) == 0) &&
((tmp = zend_hash_index_find(Z_ARRVAL_P(data), 2)) == NULL ||
+ Z_TYPE_P(tmp) != IS_STRING ||
in_domain(phpurl->host,Z_STRVAL_P(tmp))) &&
(use_ssl || (tmp = zend_hash_index_find(Z_ARRVAL_P(data), 3)) == NULL)) {
smart_str_append(&soap_headers, key);
@@ -848,12 +850,14 @@ try_again:
(Z_TYPE_P(trace) == IS_TRUE || (Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) != 0))) {
add_property_stringl(this_ptr, "__last_request_headers", ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s));
}
- smart_str_appendl(&soap_headers, request, request_size);
+ smart_str_appendl(&soap_headers, request->val, request->len);
smart_str_0(&soap_headers);
err = php_stream_write(stream, ZSTR_VAL(soap_headers.s), ZSTR_LEN(soap_headers.s));
if (err != ZSTR_LEN(soap_headers.s)) {
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
php_stream_close(stream);
zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpurl", sizeof("httpurl")-1);
zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket")-1);
@@ -880,7 +884,9 @@ try_again:
do {
http_headers = get_http_headers(stream);
if (!http_headers) {
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
php_stream_close(stream);
zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket")-1);
zend_hash_str_del(Z_OBJPROP_P(this_ptr), "_use_proxy", sizeof("_use_proxy")-1);
@@ -1050,8 +1056,12 @@ try_again:
}
}
- if (!get_http_body(stream, http_close, ZSTR_VAL(http_headers), &http_body, &http_body_size)) {
- if (request != buf) {efree(request);}
+
+ http_body = get_http_body(stream, http_close, ZSTR_VAL(http_headers));
+ if (!http_body) {
+ if (request != buf) {
+ zend_string_release(request);
+ }
php_stream_close(stream);
zend_string_release(http_headers);
zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket")-1);
@@ -1064,7 +1074,9 @@ try_again:
return FALSE;
}
- if (request != buf) {efree(request);}
+ if (request != buf) {
+ zend_string_release(request);
+ }
if (http_close) {
php_stream_close(stream);
@@ -1082,7 +1094,7 @@ try_again:
if (new_url != NULL) {
zend_string_release(http_headers);
- efree(http_body);
+ zend_string_release(http_body);
efree(loc);
if (new_url->scheme == NULL && new_url->path != NULL) {
new_url->scheme = phpurl->scheme ? estrdup(phpurl->scheme) : NULL;
@@ -1190,7 +1202,7 @@ try_again:
efree(auth);
zend_string_release(http_headers);
- efree(http_body);
+ zend_string_release(http_body);
goto try_again;
}
@@ -1240,15 +1252,15 @@ try_again:
strcmp(content_encoding,"x-gzip") == 0) &&
zend_hash_str_exists(EG(function_table), "gzinflate", sizeof("gzinflate")-1)) {
ZVAL_STRING(&func, "gzinflate");
- ZVAL_STRINGL(&params[0], http_body+10, http_body_size-10);
+ ZVAL_STRINGL(&params[0], http_body->val+10, http_body->len-10);
} else if (strcmp(content_encoding,"deflate") == 0 &&
zend_hash_str_exists(EG(function_table), "gzuncompress", sizeof("gzuncompress")-1)) {
ZVAL_STRING(&func, "gzuncompress");
- ZVAL_STRINGL(&params[0], http_body, http_body_size);
+ ZVAL_STR_COPY(&params[0], http_body);
} else {
efree(content_encoding);
zend_string_release(http_headers);
- efree(http_body);
+ zend_string_release(http_body);
if (http_msg) {
efree(http_msg);
}
@@ -1259,14 +1271,14 @@ try_again:
Z_TYPE(retval) == IS_STRING) {
zval_ptr_dtor(&params[0]);
zval_ptr_dtor(&func);
- efree(http_body);
+ zend_string_release(http_body);
ZVAL_COPY_VALUE(return_value, &retval);
} else {
zval_ptr_dtor(&params[0]);
zval_ptr_dtor(&func);
efree(content_encoding);
zend_string_release(http_headers);
- efree(http_body);
+ zend_string_release(http_body);
add_soap_fault(this_ptr, "HTTP", "Can't uncompress compressed response", NULL, NULL);
if (http_msg) {
efree(http_msg);
@@ -1275,11 +1287,7 @@ try_again:
}
efree(content_encoding);
} else {
- // TODO: avoid reallocation ???
- //???*buffer = http_body;
- //???*buffer_len = http_body_size;
- ZVAL_STRINGL(return_value, http_body, http_body_size);
- efree(http_body);
+ ZVAL_STR(return_value, http_body);
}
zend_string_release(http_headers);
@@ -1356,9 +1364,10 @@ static char *get_http_header_value(char *headers, char *type)
return NULL;
}
-static int get_http_body(php_stream *stream, int close, char *headers, char **response, int *out_size)
+static zend_string* get_http_body(php_stream *stream, int close, char *headers)
{
- char *header, *http_buf = NULL;
+ zend_string *http_buf = NULL;
+ char *header;
int header_close = close, header_chunked = 0, header_length = 0, http_buf_size = 0;
if (!close) {
@@ -1379,11 +1388,7 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r
efree(header);
if (!header_length && !header_chunked) {
/* Empty response */
- http_buf = emalloc(1);
- http_buf[0] = '\0';
- (*response) = http_buf;
- (*out_size) = 0;
- return TRUE;
+ return ZSTR_EMPTY_ALLOC();
}
}
@@ -1401,13 +1406,20 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r
int len_size = 0;
if (http_buf_size + buf_size + 1 < 0) {
- efree(http_buf);
- return FALSE;
+ if (http_buf) {
+ zend_string_release(http_buf);
+ }
+ return NULL;
+ }
+
+ if (http_buf) {
+ http_buf = zend_string_realloc(http_buf, http_buf_size + buf_size, 0);
+ } else {
+ http_buf = zend_string_alloc(buf_size, 0);
}
- http_buf = erealloc(http_buf, http_buf_size + buf_size + 1);
while (len_size < buf_size) {
- int len_read = php_stream_read(stream, http_buf + http_buf_size, buf_size - len_size);
+ int len_read = php_stream_read(stream, http_buf->val + http_buf_size, buf_size - len_size);
if (len_read <= 0) {
/* Error or EOF */
done = TRUE;
@@ -1425,17 +1437,17 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r
if (ch != '\n') {
/* Somthing wrong in chunked encoding */
if (http_buf) {
- efree(http_buf);
+ zend_string_release(http_buf);
}
- return FALSE;
+ return NULL;
}
}
} else {
/* Somthing wrong in chunked encoding */
if (http_buf) {
- efree(http_buf);
+ zend_string_release(http_buf);
}
- return FALSE;
+ return NULL;
}
if (buf_size == 0) {
done = TRUE;
@@ -1456,16 +1468,16 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r
}
if (http_buf == NULL) {
- http_buf = emalloc(1);
+ return ZSTR_EMPTY_ALLOC();
}
} else if (header_length) {
if (header_length < 0 || header_length >= INT_MAX) {
- return FALSE;
+ return NULL;
}
- http_buf = safe_emalloc(1, header_length, 1);
+ http_buf = zend_string_alloc(header_length, 0);
while (http_buf_size < header_length) {
- int len_read = php_stream_read(stream, http_buf + http_buf_size, header_length - http_buf_size);
+ int len_read = php_stream_read(stream, http_buf->val + http_buf_size, header_length - http_buf_size);
if (len_read <= 0) {
break;
}
@@ -1474,20 +1486,23 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r
} else if (header_close) {
do {
int len_read;
- http_buf = erealloc(http_buf, http_buf_size + 4096 + 1);
- len_read = php_stream_read(stream, http_buf + http_buf_size, 4096);
+ if (http_buf) {
+ http_buf = zend_string_realloc(http_buf, http_buf_size + 4096, 0);
+ } else {
+ http_buf = zend_string_alloc(4096, 0);
+ }
+ len_read = php_stream_read(stream, http_buf->val + http_buf_size, 4096);
if (len_read > 0) {
http_buf_size += len_read;
}
} while(!php_stream_eof(stream));
} else {
- return FALSE;
+ return NULL;
}
- http_buf[http_buf_size] = '\0';
- (*response) = http_buf;
- (*out_size) = http_buf_size;
- return TRUE;
+ http_buf->val[http_buf_size] = '\0';
+ http_buf->len = http_buf_size;
+ return http_buf;
}
static zend_string *get_http_headers(php_stream *stream)
diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h
index a92c7c4e21..34799385b5 100644
--- a/ext/soap/php_http.h
+++ b/ext/soap/php_http.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,13 +22,12 @@
#ifndef PHP_HTTP_H
#define PHP_HTTP_H
-int make_http_soap_request(zval *this_ptr,
- char *request,
- int request_size,
- char *location,
- char *soapaction,
- int soap_version,
- zval *response);
+int make_http_soap_request(zval *this_ptr,
+ zend_string *request,
+ char *location,
+ char *soapaction,
+ int soap_version,
+ zval *response);
int proxy_authentication(zval* this_ptr, smart_str* soap_headers);
int basic_authentication(zval* this_ptr, smart_str* soap_headers);
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c
index 5fd8cc9ae4..81a8d18b29 100644
--- a/ext/soap/php_packet_soap.c
+++ b/ext/soap/php_packet_soap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -385,7 +385,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
} else {
zend_refcounted *garbage = Z_COUNTED_P(return_value);
ZVAL_COPY(return_value, tmp);
- _zval_dtor_func(garbage ZEND_FILE_LINE_CC);
+ zval_dtor_func(garbage);
}
}
}
diff --git a/ext/soap/php_packet_soap.h b/ext/soap/php_packet_soap.h
index f638e5ad2d..2d38d7141c 100644
--- a/ext/soap/php_packet_soap.h
+++ b/ext/soap/php_packet_soap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 4e69ecd198..f417a1e0c9 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -457,14 +457,13 @@ static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypeP
memset(newType, 0, sizeof(sdlType));
{
- smart_str anonymous = {0};
+ char buf[MAX_LENGTH_OF_LONG + 1];
+ char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types));
+ char *str = emalloc(sizeof("anonymous") + buf + sizeof(buf) - 1 - res);
- smart_str_appendl(&anonymous, "anonymous", sizeof("anonymous")-1);
- smart_str_append_long(&anonymous, zend_hash_num_elements(sdl->types));
- smart_str_0(&anonymous);
- // TODO: avoid reallocation ???
- newType->name = estrndup(ZSTR_VAL(anonymous.s), ZSTR_LEN(anonymous.s));
- smart_str_free(&anonymous);
+ memcpy(str, "anonymous", sizeof("anonymous")-1);
+ memcpy(str + sizeof("anonymous")-1, res, buf + sizeof(buf) - res);
+ newType->name = str;
}
newType->namens = estrdup((char*)tns->children->content);
@@ -555,14 +554,13 @@ static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTyp
memset(newType, 0, sizeof(sdlType));
{
- smart_str anonymous = {0};
-
- smart_str_appendl(&anonymous, "anonymous", sizeof("anonymous")-1);
- smart_str_append_long(&anonymous, zend_hash_num_elements(sdl->types));
- smart_str_0(&anonymous);
- // TODO: avoid reallocation ???
- newType->name = estrndup(ZSTR_VAL(anonymous.s), ZSTR_LEN(anonymous.s));
- smart_str_free(&anonymous);
+ char buf[MAX_LENGTH_OF_LONG + 1];
+ char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types));
+ char *str = emalloc(sizeof("anonymous") + buf + sizeof(buf) - 1 - res);
+
+ memcpy(str, "anonymous", sizeof("anonymous")-1);
+ memcpy(str + sizeof("anonymous")-1, res, buf + sizeof(buf) - res);
+ newType->name = str;
}
newType->namens = estrdup((char*)tns->children->content);
@@ -1928,14 +1926,13 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
dummy_type = emalloc(sizeof(sdlType));
memset(dummy_type, 0, sizeof(sdlType));
{
- smart_str anonymous = {0};
-
- smart_str_appendl(&anonymous, "anonymous", sizeof("anonymous")-1);
- smart_str_append_long(&anonymous, zend_hash_num_elements(sdl->types));
- smart_str_0(&anonymous);
- // TODO: avoid reallocation ???
- dummy_type->name = estrndup(ZSTR_VAL(anonymous.s), ZSTR_LEN(anonymous.s));
- smart_str_free(&anonymous);
+ char buf[MAX_LENGTH_OF_LONG + 1];
+ char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types));
+ char *str = emalloc(sizeof("anonymous") + buf + sizeof(buf) - 1 - res);
+
+ memcpy(str, "anonymous", sizeof("anonymous")-1);
+ memcpy(str + sizeof("anonymous")-1, res, buf + sizeof(buf) - res);
+ dummy_type->name = str;
}
dummy_type->namens = estrdup((char*)tns->children->content);
schema_simpleType(sdl, tns, trav, dummy_type);
diff --git a/ext/soap/php_schema.h b/ext/soap/php_schema.h
index 32ed55c3bd..4dd59c59d8 100644
--- a/ext/soap/php_schema.h
+++ b/ext/soap/php_schema.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 14d690f533..fdbd6d19af 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -112,7 +112,7 @@ encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type)
{
encodePtr enc = NULL;
char *nscat;
- int ns_len = strlen(ns);
+ int ns_len = ns ? strlen(ns) : 0;
int type_len = strlen(type);
int len = ns_len + type_len + 1;
@@ -296,7 +296,7 @@ void sdl_set_uri_credentials(sdlCtx *ctx, char *uri)
memcpy(Z_STRVAL(new_header) + (s - Z_STRVAL_P(header)), rest, Z_STRLEN_P(header) - (rest - Z_STRVAL_P(header)) + 1);
ZVAL_COPY(&ctx->old_header, header);
php_stream_context_set_option(ctx->context, "http", "header", &new_header);
- zval_dtor(&new_header);
+ zval_ptr_dtor(&new_header);
}
}
}
@@ -1149,7 +1149,9 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
zend_hash_init(ctx.sdl->bindings, 0, NULL, delete_binding, 0);
}
- zend_hash_str_add_ptr(ctx.sdl->bindings, tmpbinding->name, strlen(tmpbinding->name), tmpbinding);
+ if (!zend_hash_str_add_ptr(ctx.sdl->bindings, tmpbinding->name, strlen(tmpbinding->name), tmpbinding)) {
+ zend_hash_next_index_insert_ptr(ctx.sdl->bindings, tmpbinding);
+ }
trav= trav->next;
}
diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h
index 3140e48ada..f905b508cd 100644
--- a/ext/soap/php_sdl.h
+++ b/ext/soap/php_sdl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index ea3b54ce4d..5736f1043a 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -189,14 +189,10 @@ extern zend_module_entry soap_module_entry;
#define phpext_soap_ptr soap_module_ptr
ZEND_EXTERN_MODULE_GLOBALS(soap)
+#define SOAP_GLOBAL(v) ZEND_MODULE_GLOBALS_ACCESSOR(soap, v)
-#ifdef ZTS
-# define SOAP_GLOBAL(v) ZEND_TSRMG(soap_globals_id, zend_soap_globals *, v)
-# ifdef COMPILE_DL_SOAP
-ZEND_TSRMLS_CACHE_EXTERN();
-# endif
-#else
-# define SOAP_GLOBAL(v) (soap_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_SOAP)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
extern zend_class_entry* soap_var_class_entry;
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 35d2e4e8b0..9f2836a65d 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h
index e1ada2ca20..20c1e7be51 100644
--- a/ext/soap/php_xml.h
+++ b/ext/soap/php_xml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 0216de39f2..c842ce5119 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -467,7 +467,7 @@ zend_module_entry soap_module_entry = {
#ifdef COMPILE_DL_SOAP
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(soap)
#endif
@@ -953,9 +953,7 @@ PHP_METHOD(SoapFault, __toString)
line = zend_read_property(soap_fault_class_entry, this_ptr, "line", sizeof("line")-1, 1, &rv4);
fci.size = sizeof(fci);
- fci.function_table = &Z_OBJCE_P(getThis())->function_table;
ZVAL_STRINGL(&fci.function_name, "gettraceasstring", sizeof("gettraceasstring")-1);
- fci.symbol_table = NULL;
fci.object = Z_OBJ(EX(This));
fci.retval = &trace;
fci.param_count = 0;
@@ -1505,7 +1503,7 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi
add_soap_fault_ex(&exception_object, this_ptr, "Server", "Internal Error", NULL, NULL);
}
soap_server_fault_ex(function, &exception_object, NULL);
- }
+ }
}
/* }}} */
@@ -1539,6 +1537,11 @@ PHP_METHOD(SoapServer, handle)
return;
}
+ if (ZEND_NUM_ARGS() > 0 && ZEND_SIZE_T_INT_OVFL(arg_len)) {
+ soap_server_fault("Server", "Input string is too long", NULL, NULL, NULL);
+ return;
+ }
+
if (SG(request_info).request_method &&
strcmp(SG(request_info).request_method, "GET") == 0 &&
SG(request_info).query_string &&
@@ -2130,7 +2133,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const
_old_http_response_code = SG(sapi_headers).http_response_code;
_old_http_status_line = SG(sapi_headers).http_status_line;
- if (!SOAP_GLOBAL(use_soap_error_handler) || !EG(objects_store).object_buckets) {
+ if (!PG(modules_activated) || !SOAP_GLOBAL(use_soap_error_handler) || !EG(objects_store).object_buckets) {
call_old_error_handler(error_num, error_filename, error_lineno, format, args);
return;
}
@@ -2919,8 +2922,10 @@ PHP_METHOD(SoapClient, __call)
free_soap_headers = 1;
}
ZEND_HASH_FOREACH_VAL(default_headers, tmp) {
- Z_ADDREF_P(tmp);
- zend_hash_next_index_insert(soap_headers, tmp);
+ if(Z_TYPE_P(tmp) == IS_OBJECT) {
+ Z_ADDREF_P(tmp);
+ zend_hash_next_index_insert(soap_headers, tmp);
+ }
} ZEND_HASH_FOREACH_END();
} else {
soap_headers = Z_ARRVAL_P(tmp);
@@ -2934,6 +2939,7 @@ PHP_METHOD(SoapClient, __call)
real_args = safe_emalloc(sizeof(zval), arg_count, 0);
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(args), param) {
/*zval_add_ref(param);*/
+ ZVAL_DEREF(param);
ZVAL_COPY_VALUE(&real_args[i], param);
i++;
} ZEND_HASH_FOREACH_END();
@@ -3090,14 +3096,15 @@ PHP_METHOD(SoapClient, __getLastResponseHeaders)
SoapClient::__doRequest() */
PHP_METHOD(SoapClient, __doRequest)
{
- char *buf, *location, *action;
- size_t buf_size, location_size, action_size;
- zend_long version;
- zend_long one_way = 0;
- zval *this_ptr = getThis();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "sssl|l",
- &buf, &buf_size,
+ zend_string *buf;
+ char *location, *action;
+ size_t location_size, action_size;
+ zend_long version;
+ zend_long one_way = 0;
+ zval *this_ptr = getThis();
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|l",
+ &buf,
&location, &location_size,
&action, &action_size,
&version, &one_way) == FAILURE) {
@@ -3107,10 +3114,10 @@ PHP_METHOD(SoapClient, __doRequest)
one_way = 0;
}
if (one_way) {
- if (make_http_soap_request(this_ptr, buf, buf_size, location, action, version, NULL)) {
+ if (make_http_soap_request(this_ptr, buf, location, action, version, NULL)) {
RETURN_EMPTY_STRING();
}
- } else if (make_http_soap_request(this_ptr, buf, buf_size, location, action, version,
+ } else if (make_http_soap_request(this_ptr, buf, location, action, version,
return_value)) {
return;
}
@@ -4327,9 +4334,14 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
zval* header;
ZEND_HASH_FOREACH_VAL(soap_headers, header) {
- HashTable *ht = Z_OBJPROP_P(header);
+ HashTable *ht;
zval *name, *ns, *tmp;
+ if (Z_TYPE_P(header) != IS_OBJECT) {
+ continue;
+ }
+
+ ht = Z_OBJPROP_P(header);
if ((name = zend_hash_str_find(ht, "name", sizeof("name")-1)) != NULL &&
Z_TYPE_P(name) == IS_STRING &&
(ns = zend_hash_str_find(ht, "namespace", sizeof("namespace")-1)) != NULL &&
@@ -4789,7 +4801,9 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
enc = enc->details.sdl_type->encode;
}
if (enc) {
- smart_str_appendl(buf, ZSTR_VAL(spaces.s), ZSTR_LEN(spaces.s));
+ if (spaces.s) {
+ smart_str_appendl(buf, ZSTR_VAL(spaces.s), ZSTR_LEN(spaces.s));
+ }
smart_str_appendc(buf, ' ');
smart_str_appendl(buf, type->encode->details.type_str, strlen(type->encode->details.type_str));
smart_str_appendl(buf, " _;\n", 4);
@@ -4802,7 +4816,9 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
sdlAttributePtr attr;
ZEND_HASH_FOREACH_PTR(type->attributes, attr) {
- smart_str_appendl(buf, ZSTR_VAL(spaces.s), ZSTR_LEN(spaces.s));
+ if (spaces.s) {
+ smart_str_appendl(buf, ZSTR_VAL(spaces.s), ZSTR_LEN(spaces.s));
+ }
smart_str_appendc(buf, ' ');
if (attr->encode && attr->encode->details.type_str) {
smart_str_appends(buf, attr->encode->details.type_str);
diff --git a/ext/soap/tests/bug70211.phpt b/ext/soap/tests/bug70211.phpt
new file mode 100644
index 0000000000..8346b35ab7
--- /dev/null
+++ b/ext/soap/tests/bug70211.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #70211 (php 7 ZEND_HASH_IF_FULL_DO_RESIZE use after free)
+--FILE--
+<?php
+
+$addr = 0x4141414141414141;
+
+function ptr2str($ptr)
+{
+ $out = "";
+ for ($i=0; $i<8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+ return $out;
+}
+
+$sf = new SoapFault('1', 'string', 'detail', 'header','line', str_repeat("A",232).ptr2str($addr));
+$ob = unserialize("a:3:{i:0;".serialize($sf).'i:1;r:12;i:2;r:10;}');
+
+var_dump($ob[1]);
+?>
+--EXPECT--
+string(6) "detail"
diff --git a/ext/soap/tests/bug70388.phpt b/ext/soap/tests/bug70388.phpt
new file mode 100644
index 0000000000..49a8efc0ff
--- /dev/null
+++ b/ext/soap/tests/bug70388.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70388 (SOAP serialize_function_call() type confusion / RCE)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$dummy = unserialize('O:10:"SoapClient":3:{s:3:"uri";s:1:"X";s:8:"location";s:22:"http://localhost/a.xml";s:17:"__default_headers";a:1:{i:1;s:1337:"'.str_repeat("X", 1337).'";}}');
+try {
+ var_dump($dummy->notexisting());
+} catch(Exception $e) {
+ var_dump($e->getMessage());
+ var_dump(get_class($e));
+}
+?>
+--EXPECTF--
+string(%d) "%s"
+string(9) "SoapFault" \ No newline at end of file
diff --git a/ext/soap/tests/bug70875.phpt b/ext/soap/tests/bug70875.phpt
new file mode 100644
index 0000000000..6f10462bfc
--- /dev/null
+++ b/ext/soap/tests/bug70875.phpt
@@ -0,0 +1,50 @@
+--TEST--
+SOAP Bug #70875 - Segmentation fault if wsdl has no targetNamespace attribute
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--INI--
+soap.wsdl_cache_enabled=0
+--FILE--
+<?php
+
+class bug70875 extends SOAPClient
+{
+ public function __doRequest($request, $location, $action, $version, $one_way = 0)
+ {
+ die("no SIGSEGV");
+ }
+}
+
+$c = new bug70875(__DIR__.'/bug70875.wsdl', [
+ 'trace' => 1,
+ 'classmap' => [
+ 'TestService' => 'TestService',
+ 'TestServiceRQ' => 'TestServiceRQ',
+ 'RqHeader' => 'RqHeader',
+ ],
+]);
+
+
+class TestService
+{
+ public $TestServiceRQ;
+}
+
+class TestServiceRQ
+{
+ public $RqHeader;
+}
+
+class RqHeader
+{
+}
+
+$r = new TestService();
+$r->TestServiceRQ = new TestServiceRQ();
+$r->TestServiceRQ->RqHeader = new RqHeader();
+
+$c->testService($r);
+
+?>
+--EXPECT--
+no SIGSEGV
diff --git a/ext/soap/tests/bug70875.wsdl b/ext/soap/tests/bug70875.wsdl
new file mode 100644
index 0000000000..f874b9ae6c
--- /dev/null
+++ b/ext/soap/tests/bug70875.wsdl
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions name="BookingService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
+ xmlns:wsa10="http://www.w3.org/2005/08/addressing"
+ xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <xs:schema elementFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="TestService">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="TestServiceRQ" type="TestServiceRQ"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="TestServiceRQ">
+ <xs:complexContent mixed="false">
+ <xs:extension base="BaseRequest"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="BaseRequest">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="RqHeader" type="RequestHeader"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="RequestHeader">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="AvesAutoLogin" type="AutoLogin"/>
+ </xs:sequence>
+ <xs:attribute name="HostID" type="xs:string"/>
+ <xs:attribute name="Xtoken" type="xs:string"/>
+ <xs:attribute name="Interface" type="xs:string"/>
+ <xs:attribute name="UserName" type="xs:string"/>
+ </xs:complexType>
+ <xs:complexType name="AutoLogin">
+ <xs:attribute name="VatCode" type="xs:string"/>
+ <xs:attribute name="ZipCode" type="xs:string"/>
+ <xs:attribute name="HashCode" type="xs:string"/>
+ </xs:complexType>
+ <xs:element name="TestServiceResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="TestServiceRS" type="TestServiceRS"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="TestServiceRS">
+ <xs:complexContent mixed="false">
+ <xs:extension base="BaseResponse"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="BaseResponse">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="RsStatus" type="ResponseStatus"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ResponseStatus">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="ErrorCode" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="ErrorDescription" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="Warnings" type="ResponseWarning"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="InternalLog" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="ProviderLogs" type="ArrayOfProviderLog"/>
+ </xs:sequence>
+ <xs:attribute name="Status" type="ResponseStatusType" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="ResponseWarning">
+ <xs:attribute name="WarnType" type="ResponseWarningTypes" use="required"/>
+ <xs:attribute name="Description" type="xs:string"/>
+ </xs:complexType>
+ <xs:simpleType name="ResponseWarningTypes">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Unknown"/>
+ <xs:enumeration value="DataNotFound"/>
+ <xs:enumeration value="InactiveAgency"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ArrayOfProviderLog">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="ProviderLog" nillable="true"
+ type="ProviderLog"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ProviderLog">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="OtaReqContent">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element minOccurs="0" maxOccurs="1" name="OtaResContent">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:any/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="ProviderCode" type="xs:string"/>
+ <xs:attribute name="RequestTime" type="xs:string"/>
+ <xs:attribute name="PostRequestTime" type="xs:string"/>
+ <xs:attribute name="ResponseCount" type="xs:string"/>
+ <xs:attribute name="ResponseMessage" type="xs:string"/>
+ </xs:complexType>
+ <xs:simpleType name="ResponseStatusType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="OK"/>
+ <xs:enumeration value="ERROR"/>
+ <xs:enumeration value="WARNING"/>
+ <xs:enumeration value="TIMEOUT"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="IBookingService_TestService_InputMessage">
+ <wsdl:part name="parameters" element="TestService"/>
+ </wsdl:message>
+ <wsdl:message name="IBookingService_TestService_OutputMessage">
+ <wsdl:part name="parameters" element="TestServiceResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="IBookingService">
+ <wsdl:operation name="TestService">
+ <wsdl:input wsaw:Action="urn:IBookingService/TestService"
+ message="IBookingService_TestService_InputMessage"/>
+ <wsdl:output wsaw:Action="urn:IBookingService/TestServiceResponse"
+ message="IBookingService_TestService_OutputMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="interop_booking_v2" type="IBookingService">
+ <wsdl:operation name="TestService">
+ <soap:operation soapAction="urn:IBookingService/TestService" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="BookingService">
+ <wsdl:port name="interop_booking_v2" binding="interop_booking_v2">
+ <soap:address location="http://localhost/foobar/soap"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/ext/soap/tests/bug71610.phpt b/ext/soap/tests/bug71610.phpt
new file mode 100644
index 0000000000..4f1c7162ff
--- /dev/null
+++ b/ext/soap/tests/bug71610.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SOAP Bug #71610 - Type Confusion Vulnerability - SOAP / make_http_soap_request()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$exploit = unserialize('O:10:"SoapClient":3:{s:3:"uri";s:1:"a";s:8:"location";s:19:"http://testuri.org/";s:8:"_cookies";a:1:{s:8:"manhluat";a:3:{i:0;s:0:"";i:1;N;i:2;N;}}}}');
+try {
+$exploit->blahblah();
+} catch(SoapFault $e) {
+ echo $e->getMessage()."\n";
+}
+?>
+--EXPECT--
+looks like we got no XML document
diff --git a/ext/soap/tests/bugs/bug44811.phpt b/ext/soap/tests/bugs/bug44811.phpt
index 8cfc4a76cd..1c7605f610 100644
--- a/ext/soap/tests/bugs/bug44811.phpt
+++ b/ext/soap/tests/bugs/bug44811.phpt
@@ -2,6 +2,7 @@
Bug #44811 (Improve error messages when creating new SoapClient which contains invalid data)
--SKIPIF--
<?php require_once 'skipif.inc'; ?>
+<?php if (getenv("SKIP_ONLINE_TESTS")) die("skip online test"); ?>
--INI--
soap.wsdl_cache_enabled=0
--FILE--
diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c
index c8acaf6995..f2621f65d0 100644
--- a/ext/sockets/conversions.c
+++ b/ext/sockets/conversions.c
@@ -1446,8 +1446,8 @@ void *from_zval_run_conversions(const zval *container,
zend_llist **allocations /* out */,
struct err_s *err /* in/out */)
{
- ser_context ctx = {{0}};
- char *structure = NULL;
+ ser_context ctx;
+ char *structure;
*allocations = NULL;
@@ -1455,6 +1455,7 @@ void *from_zval_run_conversions(const zval *container,
return NULL;
}
+ memset(&ctx, 0, sizeof(ctx));
zend_hash_init(&ctx.params, 8, NULL, NULL, 0);
zend_llist_init(&ctx.keys, sizeof(const char *), NULL, 0);
zend_llist_init(&ctx.allocations, sizeof(void *), &free_from_zval_allocation, 0);
@@ -1488,13 +1489,14 @@ zval *to_zval_run_conversions(const char *structure,
const struct key_value *key_value_pairs,
struct err_s *err, zval *zv)
{
- res_context ctx = {{0}, {0}};
+ res_context ctx;
const struct key_value *kv;
if (err->has_error) {
return NULL;
}
+ memset(&ctx, 0, sizeof(ctx));
zend_llist_init(&ctx.keys, sizeof(const char *), NULL, 0);
zend_llist_add_element(&ctx.keys, &top_name);
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index 8d84ccc642..6d37bfb1dd 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -171,7 +171,7 @@ static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval *
mcast_req_fun = &php_mcast_leave;
mcast_req_fun:
convert_to_array_ex(arg4);
- opt_ht = HASH_OF(arg4);
+ opt_ht = Z_ARRVAL_P(arg4);
if (php_get_address_from_array(opt_ht, "group", php_sock, &group,
&glen) == FAILURE) {
@@ -207,7 +207,7 @@ mcast_req_fun:
mcast_sreq_fun = &php_mcast_leave_source;
mcast_sreq_fun:
convert_to_array_ex(arg4);
- opt_ht = HASH_OF(arg4);
+ opt_ht = Z_ARRVAL_P(arg4);
if (php_get_address_from_array(opt_ht, "group", php_sock, &group,
&glen) == FAILURE) {
diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h
index 49ae5dff27..29ef05567a 100644
--- a/ext/sockets/multicast.h
+++ b/ext/sockets/multicast.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 2e90e120a4..ce5cdaf313 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -92,13 +92,8 @@ ZEND_BEGIN_MODULE_GLOBALS(sockets)
char *strerror_buf;
ZEND_END_MODULE_GLOBALS(sockets)
-#ifdef ZTS
-#define SOCKETS_G(v) ZEND_TSRMG(sockets_globals_id, zend_sockets_globals *, v)
-#else
-#define SOCKETS_G(v) (sockets_globals.v)
-#endif
-
-ZEND_EXTERN_MODULE_GLOBALS(sockets);
+ZEND_EXTERN_MODULE_GLOBALS(sockets)
+#define SOCKETS_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(sockets, v)
enum sockopt_return {
SOCKOPT_ERROR,
diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c
index cccaf4c407..7471ad143a 100644
--- a/ext/sockets/sendrecvmsg.c
+++ b/ext/sockets/sendrecvmsg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c
index 73a0085720..1ce109ee8c 100644
--- a/ext/sockets/sockaddr_conv.c
+++ b/ext/sockets/sockaddr_conv.c
@@ -90,7 +90,7 @@ int php_set_inet_addr(struct sockaddr_in *sin, char *string, php_socket *php_soc
if (inet_aton(string, &tmp)) {
sin->sin_addr.s_addr = tmp.s_addr;
} else {
- if (strlen(string) > MAXFQDNLEN || ! (host_entry = gethostbyname(string))) {
+ if (strlen(string) > MAXFQDNLEN || ! (host_entry = php_network_gethostbyname(string))) {
/* Note: < -10000 indicates a host lookup error */
#ifdef PHP_WIN32
PHP_SOCKET_ERROR(php_sock, "Host lookup failed", WSAGetLastError());
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index e1caa19fc5..63674c50d7 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -251,6 +251,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_import_stream, 0, 0, 1)
ZEND_ARG_INFO(0, stream)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_export_stream, 0, 0, 1)
+ ZEND_ARG_INFO(0, socket)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_sendmsg, 0, 0, 3)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_INFO(0, msghdr)
@@ -305,6 +309,7 @@ PHP_FUNCTION(socket_shutdown);
PHP_FUNCTION(socket_last_error);
PHP_FUNCTION(socket_clear_error);
PHP_FUNCTION(socket_import_stream);
+PHP_FUNCTION(socket_export_stream);
/* {{{ sockets_functions[]
*/
@@ -339,6 +344,7 @@ const zend_function_entry sockets_functions[] = {
PHP_FE(socket_last_error, arginfo_socket_last_error)
PHP_FE(socket_clear_error, arginfo_socket_clear_error)
PHP_FE(socket_import_stream, arginfo_socket_import_stream)
+ PHP_FE(socket_export_stream, arginfo_socket_export_stream)
PHP_FE(socket_sendmsg, arginfo_socket_sendmsg)
PHP_FE(socket_recvmsg, arginfo_socket_recvmsg)
PHP_FE(socket_cmsg_space, arginfo_socket_cmsg_space)
@@ -371,7 +377,7 @@ zend_module_entry sockets_module_entry = {
#ifdef COMPILE_DL_SOCKETS
#ifdef ZTS
- ZEND_TSRMLS_CACHE_DEFINE();
+ ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(sockets)
#endif
@@ -425,9 +431,9 @@ static int php_open_listen_sock(php_socket **php_sock, int port, int backlog) /*
*php_sock = sock;
#ifndef PHP_WIN32
- if ((hp = gethostbyname("0.0.0.0")) == NULL) {
+ if ((hp = php_network_gethostbyname("0.0.0.0")) == NULL) {
#else
- if ((hp = gethostbyname("localhost")) == NULL) {
+ if ((hp = php_network_gethostbyname("localhost")) == NULL) {
#endif
efree(sock);
return 0;
@@ -716,6 +722,10 @@ static PHP_MINIT_FUNCTION(sockets)
REGISTER_LONG_CONSTANT("IPV6_MULTICAST_LOOP", IPV6_MULTICAST_LOOP, CONST_CS | CONST_PERSISTENT);
#endif
+#ifdef IPV6_V6ONLY
+ REGISTER_LONG_CONSTANT("IPV6_V6ONLY", IPV6_V6ONLY, CONST_CS | CONST_PERSISTENT);
+#endif
+
#ifndef WIN32
# include "unix_socket_constants.h"
#else
@@ -2035,7 +2045,7 @@ PHP_FUNCTION(socket_set_option)
const char l_linger_key[] = "l_linger";
convert_to_array_ex(arg4);
- opt_ht = HASH_OF(arg4);
+ opt_ht = Z_ARRVAL_P(arg4);
if ((l_onoff = zend_hash_str_find(opt_ht, l_onoff_key, sizeof(l_onoff_key) - 1)) == NULL) {
php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", l_onoff_key);
@@ -2063,7 +2073,7 @@ PHP_FUNCTION(socket_set_option)
const char usec_key[] = "usec";
convert_to_array_ex(arg4);
- opt_ht = HASH_OF(arg4);
+ opt_ht = Z_ARRVAL_P(arg4);
if ((sec = zend_hash_str_find(opt_ht, sec_key, sizeof(sec_key) - 1)) == NULL) {
php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", sec_key);
@@ -2303,7 +2313,7 @@ error:
return NULL;
}
-/* {{{ proto void socket_import_stream(resource stream)
+/* {{{ proto resource socket_import_stream(resource stream)
Imports a stream that encapsulates a socket into a socket extension resource. */
PHP_FUNCTION(socket_import_stream)
{
@@ -2339,8 +2349,7 @@ PHP_FUNCTION(socket_import_stream)
#endif
/* hold a zval reference to the stream (holding a php_stream* directly could
- * also be done, but this might be slightly better if in the future we want
- * to provide a socket_export_stream) */
+ * also be done, but this makes socket_export_stream a bit simpler) */
ZVAL_COPY(&retsock->zstream, zstream);
php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER,
@@ -2350,6 +2359,103 @@ PHP_FUNCTION(socket_import_stream)
}
/* }}} */
+/* {{{ proto resource socket_export_stream(resource socket)
+ Exports a socket extension resource into a stream that encapsulates a socket. */
+PHP_FUNCTION(socket_export_stream)
+{
+ zval *zsocket;
+ php_socket *socket;
+ php_stream *stream = NULL;
+ php_netstream_data_t *stream_data;
+ char *protocol = NULL;
+ size_t protocollen = 0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zsocket) == FAILURE) {
+ return;
+ }
+ if ((socket = (php_socket *) zend_fetch_resource(Z_RES_P(zsocket), le_socket_name, le_socket)) == NULL) {
+ RETURN_FALSE;
+ }
+
+ /* Either we already exported a stream or the socket came from an import,
+ * just return the existing stream */
+ if (!Z_ISUNDEF(socket->zstream)) {
+ RETURN_ZVAL(&socket->zstream, 1, 0);
+ }
+
+ /* Determine if socket is using a protocol with one of the default registered
+ * socket stream wrappers */
+ if (socket->type == PF_INET
+#if HAVE_IPV6
+ || socket->type == PF_INET6
+#endif
+ ) {
+ int protoid;
+ socklen_t protoidlen = sizeof(protoid);
+
+ getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &protoid, &protoidlen);
+
+ if (protoid == SOCK_STREAM) {
+ /* SO_PROTOCOL is not (yet?) supported on OS X, so lets assume it's TCP there */
+#ifdef SO_PROTOCOL
+ protoidlen = sizeof(protoid);
+ getsockopt(socket->bsd_socket, SOL_SOCKET, SO_PROTOCOL, (char *) &protoid, &protoidlen);
+ if (protoid == IPPROTO_TCP)
+#endif
+ {
+ protocol = "tcp";
+ protocollen = 3;
+ }
+ } else if (protoid == SOCK_DGRAM) {
+ protocol = "udp";
+ protocollen = 3;
+ }
+#ifdef PF_UNIX
+ } else if (socket->type == PF_UNIX) {
+ int type;
+ socklen_t typelen = sizeof(type);
+
+ getsockopt(socket->bsd_socket, SOL_SOCKET, SO_TYPE, (char *) &type, &typelen);
+
+ if (type == SOCK_STREAM) {
+ protocol = "unix";
+ protocollen = 4;
+ } else if (type == SOCK_DGRAM) {
+ protocol = "udg";
+ protocollen = 3;
+ }
+#endif
+ }
+
+ /* Try to get a stream with the registered sockops for the protocol in use
+ * We don't want streams to actually *do* anything though, so don't give it
+ * anything apart from the protocol */
+ if (protocol != NULL) {
+ stream = php_stream_xport_create(protocol, protocollen, 0, 0, NULL, NULL, NULL, NULL, NULL);
+ }
+
+ /* Fall back to creating a generic socket stream */
+ if (stream == NULL) {
+ stream = php_stream_sock_open_from_socket(socket->bsd_socket, 0);
+
+ if (stream == NULL) {
+ php_error_docref(NULL, E_WARNING, "failed to create stream");
+ RETURN_FALSE;
+ }
+ }
+
+ stream_data = (php_netstream_data_t *) stream->abstract;
+ stream_data->socket = socket->bsd_socket;
+ stream_data->is_blocked = socket->blocking;
+ stream_data->timeout.tv_sec = FG(default_socket_timeout);
+ stream_data->timeout.tv_usec = 0;
+
+ php_stream_to_zval(stream, &socket->zstream);
+
+ RETURN_ZVAL(&socket->zstream, 1, 0);
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/ext/sockets/tests/socket_clear_error-win32.phpt b/ext/sockets/tests/socket_clear_error-win32.phpt
new file mode 100644
index 0000000000..3a0b1ea162
--- /dev/null
+++ b/ext/sockets/tests/socket_clear_error-win32.phpt
@@ -0,0 +1,32 @@
+--TEST--
+void socket_clear_error ([ resource $socket ] ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, "127.0.0.1", 21248);
+var_dump(socket_last_error($socket));
+socket_clear_error($socket);
+var_dump(socket_last_error($socket));
+?>
+--CLEAN--
+<?php
+socket_close($socket);
+unset($socket);
+unset($socketConn);
+?>
+--EXPECTF--
+Warning: socket_connect(): unable to connect [%d]: No connection could be made because the target machine actively refused it.
+ in %s on line %d
+int(%d)
+int(%d)
diff --git a/ext/sockets/tests/socket_clear_error.phpt b/ext/sockets/tests/socket_clear_error.phpt
new file mode 100644
index 0000000000..273f7a0ca8
--- /dev/null
+++ b/ext/sockets/tests/socket_clear_error.phpt
@@ -0,0 +1,31 @@
+--TEST--
+void socket_clear_error ([ resource $socket ] ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, "127.0.0.1", 21248);
+var_dump(socket_last_error($socket));
+socket_clear_error($socket);
+var_dump(socket_last_error($socket));
+?>
+--CLEAN--
+<?php
+socket_close($socket);
+unset($socket);
+unset($socketConn);
+?>
+--EXPECTF--
+Warning: socket_connect(): unable to connect [%d]: Connection refused in %s on line %d
+int(%d)
+int(%d)
diff --git a/ext/sockets/tests/socket_cmsg_rights.phpt b/ext/sockets/tests/socket_cmsg_rights.phpt
index 8c1734a568..081ad9a6ac 100644
--- a/ext/sockets/tests/socket_cmsg_rights.phpt
+++ b/ext/sockets/tests/socket_cmsg_rights.phpt
@@ -49,7 +49,7 @@ checktimeout($s, 500);
$data = [
"name" => [],
"buffer_size" => 2000,
- "controllen" => socket_cmsg_space(SOL_SOCKET, SCM_RIGHTS, 3)
+ "controllen" => socket_cmsg_space(SOL_SOCKET, SCM_RIGHTS, 4)
];
var_dump($data);
if (!socket_recvmsg($s, $data, 0)) die("recvmsg");
@@ -68,7 +68,7 @@ array(3) {
["buffer_size"]=>
int(2000)
["controllen"]=>
- int(32)
+ int(%d)
}
Array
(
diff --git a/ext/sockets/tests/socket_export_stream-1.phpt b/ext/sockets/tests/socket_export_stream-1.phpt
new file mode 100644
index 0000000000..498e0a277c
--- /dev/null
+++ b/ext/sockets/tests/socket_export_stream-1.phpt
@@ -0,0 +1,27 @@
+--TEST--
+socket_export_stream: Basic test
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+
+--FILE--
+<?php
+
+$domain = (strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? AF_INET : AF_UNIX);
+socket_create_pair($domain, SOCK_STREAM, 0, $s);
+
+$s0 = reset($s);
+$s1 = next($s);
+
+$stream = socket_export_stream($s0);
+var_dump($stream);
+
+socket_write($s1, "test message");
+socket_close($s1);
+
+var_dump(stream_get_contents($stream));
+--EXPECTF--
+resource(%d) of type (stream)
+string(12) "test message"
diff --git a/ext/sockets/tests/socket_export_stream-2.phpt b/ext/sockets/tests/socket_export_stream-2.phpt
new file mode 100644
index 0000000000..98528420fa
--- /dev/null
+++ b/ext/sockets/tests/socket_export_stream-2.phpt
@@ -0,0 +1,48 @@
+--TEST--
+socket_export_stream: Bad arguments
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+
+--FILE--
+<?php
+
+var_dump(socket_export_stream());
+var_dump(socket_export_stream(1, 2));
+var_dump(socket_export_stream(1));
+var_dump(socket_export_stream(new stdclass));
+var_dump(socket_export_stream(fopen(__FILE__, "rb")));
+var_dump(socket_export_stream(stream_socket_server("udp://127.0.0.1:58392", $errno, $errstr, STREAM_SERVER_BIND)));
+$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+var_dump($s);
+socket_close($s);
+var_dump(socket_export_stream($s));
+
+
+echo "Done.";
+--EXPECTF--
+Warning: socket_export_stream() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: socket_export_stream() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: socket_export_stream() expects parameter 1 to be resource, integer given in %s on line %d
+NULL
+
+Warning: socket_export_stream() expects parameter 1 to be resource, object given in %s on line %d
+NULL
+
+Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d
+bool(false)
+
+Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d
+bool(false)
+resource(%d) of type (Socket)
+
+Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d
+bool(false)
+Done.
+
diff --git a/ext/sockets/tests/socket_export_stream-3.phpt b/ext/sockets/tests/socket_export_stream-3.phpt
new file mode 100644
index 0000000000..b13bb34739
--- /dev/null
+++ b/ext/sockets/tests/socket_export_stream-3.phpt
@@ -0,0 +1,47 @@
+--TEST--
+socket_export_stream: Test with multicasting
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+$br = socket_bind($s, '0.0.0.0', 58381);
+if ($br === false)
+ die("SKIP IPv4/port 58381 not available");
+$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
+ "group" => '224.0.0.23',
+ "interface" => "lo",
+));
+if ($so === false)
+ die("SKIP joining group 224.0.0.23 on interface lo failed");
+--FILE--
+<?php
+
+$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock, '0.0.0.0', 58381);
+$stream = socket_export_stream($sock);
+var_dump($stream);
+$so = socket_set_option($sock, IPPROTO_IP, MCAST_JOIN_GROUP, array(
+ "group" => '224.0.0.23',
+ "interface" => "lo",
+));
+var_dump($so);
+
+$sendsock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+var_dump($sendsock);
+$br = socket_bind($sendsock, '127.0.0.1');
+$so = socket_sendto($sendsock, $m = "my message", strlen($m), 0, "224.0.0.23", 58381);
+var_dump($so);
+
+stream_set_blocking($stream, 0);
+var_dump(fread($stream, strlen($m)));
+echo "Done.\n";
+--EXPECTF--
+resource(%d) of type (stream)
+bool(true)
+resource(%d) of type (Socket)
+int(10)
+string(10) "my message"
+Done.
+
diff --git a/ext/sockets/tests/socket_export_stream-4-win.phpt b/ext/sockets/tests/socket_export_stream-4-win.phpt
new file mode 100644
index 0000000000..e38db7bd08
--- /dev/null
+++ b/ext/sockets/tests/socket_export_stream-4-win.phpt
@@ -0,0 +1,108 @@
+--TEST--
+socket_export_stream: effects of closing
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die("skip Not Valid for Linux");
+}
+
+--FILE--
+<?php
+
+function test($stream, $sock) {
+ if ($stream !== null) {
+ echo "stream_set_blocking ";
+ print_r(stream_set_blocking($stream, 0));
+ echo "\n";
+ }
+ if ($sock !== null) {
+ echo "socket_set_block ";
+ print_r(socket_set_block($sock));
+ echo "\n";
+ echo "socket_get_option ";
+ print_r(socket_get_option($sock, SOL_SOCKET, SO_TYPE));
+ echo "\n";
+ }
+ echo "\n";
+}
+
+echo "normal\n";
+$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock0, '0.0.0.0', 58380);
+$stream0 = socket_export_stream($sock0);
+test($stream0, $sock0);
+
+echo "\nunset stream\n";
+$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock1, '0.0.0.0', 58381);
+$stream1 = socket_export_stream($sock1);
+unset($stream1);
+test(null, $sock1);
+
+echo "\nunset socket\n";
+$sock2 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock2, '0.0.0.0', 58382);
+$stream2 = socket_export_stream($sock2);
+unset($sock2);
+test($stream2, null);
+
+echo "\nclose stream\n";
+$sock3 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock3, '0.0.0.0', 58383);
+$stream3 = socket_export_stream($sock3);
+fclose($stream3);
+test($stream3, $sock3);
+
+echo "\nclose socket\n";
+$sock4 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock4, '0.0.0.0', 58484);
+$stream4 = socket_export_stream($sock4);
+socket_close($sock4);
+test($stream4, $sock4);
+
+echo "Done.\n";
+--EXPECTF--
+normal
+stream_set_blocking 1
+socket_set_block 1
+socket_get_option 2
+
+
+unset stream
+socket_set_block 1
+socket_get_option 2
+
+
+unset socket
+stream_set_blocking 1
+
+
+close stream
+stream_set_blocking
+Warning: stream_set_blocking(): supplied resource is not a valid stream resource in %s on line %d
+
+socket_set_block
+Warning: socket_set_block(): unable to set blocking mode [%d]: An operation was attempted on something that is not a socket.
+ in %s on line %d
+
+socket_get_option
+Warning: socket_get_option(): unable to retrieve socket option [%d]: An operation was attempted on something that is not a socket.
+ in %s on line %d
+
+
+
+close socket
+stream_set_blocking
+Warning: stream_set_blocking(): supplied resource is not a valid stream resource in %s on line %d
+
+socket_set_block
+Warning: socket_set_block(): supplied resource is not a valid Socket resource in %s on line %d
+
+socket_get_option
+Warning: socket_get_option(): supplied resource is not a valid Socket resource in %s on line %d
+
+
+Done.
diff --git a/ext/sockets/tests/socket_export_stream-4.phpt b/ext/sockets/tests/socket_export_stream-4.phpt
new file mode 100644
index 0000000000..ff329ec795
--- /dev/null
+++ b/ext/sockets/tests/socket_export_stream-4.phpt
@@ -0,0 +1,105 @@
+--TEST--
+socket_export_stream: effects of closing
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die("skip Not Valid for Windows");
+}
+--FILE--
+<?php
+
+function test($stream, $sock) {
+ if ($stream !== null) {
+ echo "stream_set_blocking ";
+ print_r(stream_set_blocking($stream, 0));
+ echo "\n";
+ }
+ if ($sock !== null) {
+ echo "socket_set_block ";
+ print_r(socket_set_block($sock));
+ echo "\n";
+ echo "socket_get_option ";
+ print_r(socket_get_option($sock, SOL_SOCKET, SO_TYPE));
+ echo "\n";
+ }
+ echo "\n";
+}
+
+echo "normal\n";
+$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock0, '0.0.0.0', 58380);
+$stream0 = socket_export_stream($sock0);
+test($stream0, $sock0);
+
+echo "\nunset stream\n";
+$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock1, '0.0.0.0', 58381);
+$stream1 = socket_export_stream($sock1);
+unset($stream1);
+test(null, $sock1);
+
+echo "\nunset socket\n";
+$sock2 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock2, '0.0.0.0', 58382);
+$stream2 = socket_export_stream($sock2);
+unset($sock2);
+test($stream2, null);
+
+echo "\nclose stream\n";
+$sock3 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock3, '0.0.0.0', 58383);
+$stream3 = socket_export_stream($sock3);
+fclose($stream3);
+test($stream3, $sock3);
+
+echo "\nclose socket\n";
+$sock4 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock4, '0.0.0.0', 58484);
+$stream4 = socket_export_stream($sock4);
+socket_close($sock4);
+test($stream4, $sock4);
+
+echo "Done.\n";
+--EXPECTF--
+normal
+stream_set_blocking 1
+socket_set_block 1
+socket_get_option 2
+
+
+unset stream
+socket_set_block 1
+socket_get_option 2
+
+
+unset socket
+stream_set_blocking 1
+
+
+close stream
+stream_set_blocking
+Warning: stream_set_blocking(): supplied resource is not a valid stream resource in %s on line %d
+
+socket_set_block
+Warning: socket_set_block(): unable to set blocking mode [%d]: %s in %s on line %d
+
+socket_get_option
+Warning: socket_get_option(): unable to retrieve socket option [%d]: %s in %s on line %d
+
+
+
+close socket
+stream_set_blocking
+Warning: stream_set_blocking(): supplied resource is not a valid stream resource in %s on line %d
+
+socket_set_block
+Warning: socket_set_block(): supplied resource is not a valid Socket resource in %s on line %d
+
+socket_get_option
+Warning: socket_get_option(): supplied resource is not a valid Socket resource in %s on line %d
+
+
+Done.
diff --git a/ext/sockets/tests/socket_export_stream-5.phpt b/ext/sockets/tests/socket_export_stream-5.phpt
new file mode 100644
index 0000000000..732b2072d0
--- /dev/null
+++ b/ext/sockets/tests/socket_export_stream-5.phpt
@@ -0,0 +1,25 @@
+--TEST--
+socket_export_stream: effects of leaked handles
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if (!function_exists('leak_variable'))
+ die('SKIP only for debug builds');
+--FILE--
+<?php
+
+$sock0 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock0, '0.0.0.0', 58380);
+$stream0 = socket_export_stream($sock0);
+leak_variable($stream0, true);
+
+$sock1 = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+socket_bind($sock1, '0.0.0.0', 58381);
+$stream1 = socket_export_stream($sock1);
+leak_variable($sock1, true);
+
+echo "Done.\n";
+--EXPECT--
+Done.
diff --git a/ext/sockets/tests/socket_getopt.phpt b/ext/sockets/tests/socket_getopt.phpt
new file mode 100644
index 0000000000..12c0aeb888
--- /dev/null
+++ b/ext/sockets/tests/socket_getopt.phpt
@@ -0,0 +1,73 @@
+--TEST--
+mixed socket_getopt( resource $socket , int $level , int $optname ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('skip sockets extension not available.');
+}
+?>
+--FILE--
+<?php
+$domain = AF_INET;
+$level = IPPROTO_IP;
+$s = socket_create($domain, SOCK_DGRAM, SOL_UDP) or die("err");
+
+echo "Setting IP_MULTICAST_TTL\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_TTL, 9);
+var_dump($r);
+$r = socket_getopt($s, $level, IP_MULTICAST_TTL);
+var_dump($r);
+echo "\n";
+
+echo "Setting IP_MULTICAST_LOOP\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_LOOP, 0);
+var_dump($r);
+$r = socket_getopt($s, $level, IP_MULTICAST_LOOP);
+var_dump($r);
+$r = socket_set_option($s, $level, IP_MULTICAST_LOOP, 1);
+var_dump($r);
+$r = socket_getopt($s, $level, IP_MULTICAST_LOOP);
+var_dump($r);
+echo "\n";
+
+echo "Setting IP_MULTICAST_IF\n";
+echo "interface 0:\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_IF, 0);
+var_dump($r);
+$r = socket_getopt($s, $level, IP_MULTICAST_IF);
+var_dump($r);
+echo "interface 1:\n";
+$r = socket_set_option($s, $level, IP_MULTICAST_IF, 1);
+var_dump($r);
+$r = socket_getopt($s, $level, IP_MULTICAST_IF);
+var_dump($r);
+echo "\n";
+?>
+--CLEAN--
+<?php
+unset($domain);
+unset($level);
+socket_close($s);
+unset($s);
+unset($r");
+?>
+--EXPECT--
+Setting IP_MULTICAST_TTL
+bool(true)
+int(9)
+
+Setting IP_MULTICAST_LOOP
+bool(true)
+int(0)
+bool(true)
+int(1)
+
+Setting IP_MULTICAST_IF
+interface 0:
+bool(true)
+int(0)
+interface 1:
+bool(true)
+int(1)
diff --git a/ext/sockets/tests/socket_send.phpt b/ext/sockets/tests/socket_send.phpt
new file mode 100644
index 0000000000..ceeb397979
--- /dev/null
+++ b/ext/sockets/tests/socket_send.phpt
@@ -0,0 +1,53 @@
+--TEST--
+int socket_send ( resource $socket , string $buf , int $len , int $flags );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip not for windows');
+}
+?>
+--FILE--
+<?php
+$port = 80;
+$host = "yahoo.com";
+$stringSocket = "send_socket_to_connected_socket";
+$stringSocketLenght = strlen($stringSocket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+
+if(socket_send($socket, $stringSocket, $stringSocketLenght, MSG_OOB)===$stringSocketLenght){
+ print("okey\n");
+}
+
+if(socket_send($socket, $stringSocket, $stringSocketLenght, MSG_EOR)===$stringSocketLenght){
+ print("okey\n");
+}
+
+if(socket_send($socket, $stringSocket, $stringSocketLenght, MSG_EOF)===$stringSocketLenght){
+ print("okey\n");
+}
+
+if(socket_send($socket, $stringSocket, $stringSocketLenght, MSG_DONTROUTE)===$stringSocketLenght){
+ print("okey\n");
+}
+?>
+<?php
+socket_close($socket);
+unset($port);
+unset($host);
+unset($stringSocket);
+unset($stringSocketLenght);
+unset($socket);
+unset($socketConn);
+?>
+--EXPECTF--
+okey
+okey
+okey
+okey
diff --git a/ext/sockets/tests/socket_send_win32.phpt b/ext/sockets/tests/socket_send_win32.phpt
new file mode 100644
index 0000000000..04a985c781
--- /dev/null
+++ b/ext/sockets/tests/socket_send_win32.phpt
@@ -0,0 +1,43 @@
+--TEST--
+int socket_send ( resource $socket , string $buf , int $len , int $flags );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+$port = 80;
+$host = "yahoo.com";
+$stringSocket = "send_socket_to_connected_socket";
+$stringSocketLenght = strlen($stringSocket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+
+if(socket_send($socket, $stringSocket, $stringSocketLenght, MSG_OOB)===$stringSocketLenght){
+ print("okey\n");
+}
+
+if(socket_send($socket, $stringSocket, $stringSocketLenght, MSG_DONTROUTE)===$stringSocketLenght){
+ print("okey\n");
+}
+?>
+<?php
+socket_close($socket);
+unset($port);
+unset($host);
+unset($stringSocket);
+unset($stringSocketLenght);
+unset($socket);
+unset($socketConn);
+?>
+--EXPECTF--
+okey
+okey
diff --git a/ext/sockets/tests/socket_shutdown-win32.phpt b/ext/sockets/tests/socket_shutdown-win32.phpt
new file mode 100644
index 0000000000..6280e61044
--- /dev/null
+++ b/ext/sockets/tests/socket_shutdown-win32.phpt
@@ -0,0 +1,59 @@
+--TEST--
+bool socket_shutdown ( resource $socket [, int $how = 2 ] ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+$host = "yahoo.com";
+$port = 80;
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,0));
+socket_close($socket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,1));
+socket_close($socket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,2));
+socket_close($socket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+var_dump(socket_shutdown($socket,0));
+
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,-1));
+socket_close($socket);
+?>
+--CLEAN--
+<?php
+unset($host);
+unset($port);
+unset($socket);
+unset($socketConn);
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+
+Warning: socket_shutdown(): unable to shutdown socket [%d]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
+ in %s on line %d
+bool(false)
+
+Warning: socket_shutdown(): unable to shutdown socket [%d]: An invalid argument was supplied.
+ in %s on line %d
+bool(false)
diff --git a/ext/sockets/tests/socket_shutdown.phpt b/ext/sockets/tests/socket_shutdown.phpt
new file mode 100644
index 0000000000..77cbc8f32c
--- /dev/null
+++ b/ext/sockets/tests/socket_shutdown.phpt
@@ -0,0 +1,57 @@
+--TEST--
+bool socket_shutdown ( resource $socket [, int $how = 2 ] ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('sockets')) {
+ die('SKIP sockets extension not available.');
+}
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip not for windows');
+}
+?>
+--FILE--
+<?php
+$host = "yahoo.com";
+$port = 80;
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,0));
+socket_close($socket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,1));
+socket_close($socket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,2));
+socket_close($socket);
+
+$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+var_dump(socket_shutdown($socket,0));
+
+$socketConn = socket_connect($socket, $host, $port);
+var_dump(socket_shutdown($socket,-1));
+socket_close($socket);
+?>
+--CLEAN--
+<?php
+unset($host);
+unset($port);
+unset($socket);
+unset($socketConn);
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(true)
+
+Warning: socket_shutdown(): unable to shutdown socket [%d]: Transport endpoint is not connected in %s on line %d
+bool(false)
+
+Warning: socket_shutdown(): unable to shutdown socket [%d]: Invalid argument in %s on line %d
+bool(false)
diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h
index e88c5b330e..b8f48fdaa8 100644
--- a/ext/sockets/unix_socket_constants.h
+++ b/ext/sockets/unix_socket_constants.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h
index 7060d8b457..302ffeff54 100644
--- a/ext/sockets/win32_socket_constants.h
+++ b/ext/sockets/win32_socket_constants.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sockets/windows_common.h b/ext/sockets/windows_common.h
index 04cc1f0825..4e98d96be0 100644
--- a/ext/sockets/windows_common.h
+++ b/ext/sockets/windows_common.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/config.m4 b/ext/spl/config.m4
index 869e542ef4..2f77946ce5 100755
--- a/ext/spl/config.m4
+++ b/ext/spl/config.m4
@@ -1,26 +1,6 @@
dnl $Id$
dnl config.m4 for extension SPL
- AC_MSG_CHECKING(whether zend_object_value is packed)
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
- AC_TRY_RUN([
-#include "Zend/zend_types.h"
-int main(int argc, char **argv) {
- return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
-}
- ], [
- ac_result=1
- AC_MSG_RESULT(yes)
- ],[
- ac_result=0
- AC_MSG_RESULT(no)
- ], [
- ac_result=0
- AC_MSG_RESULT(no)
- ])
- CPPFLAGS=$old_CPPFLAGS
- AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h])
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index 7cb6661033..87fb2ae37b 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -307,7 +307,7 @@ static int spl_autoload(zend_string *class_name, zend_string *lc_name, const cha
Default implementation for __autoload() */
PHP_FUNCTION(spl_autoload)
{
- int found = 0, pos_len, pos1_len;
+ int pos_len, pos1_len;
char *pos, *pos1;
zend_string *class_name, *lc_name, *file_exts = SPL_G(autoload_extensions);
@@ -333,32 +333,12 @@ PHP_FUNCTION(spl_autoload)
pos1_len = pos_len;
}
if (spl_autoload(class_name, lc_name, pos, pos1_len)) {
- found = 1;
break; /* loaded */
}
pos = pos1 ? pos1 + 1 : NULL;
pos_len = pos1? pos_len - pos1_len - 1 : 0;
}
zend_string_free(lc_name);
-
- if (!found && !SPL_G(autoload_running)) {
- /* For internal errors, we generate E_ERROR, for direct calls an exception is thrown.
- * The "scope" is determined by an opcode, if it is ZEND_FETCH_CLASS we know function was called indirectly by
- * the Zend engine.
- */
- zend_execute_data *ex = EX(prev_execute_data);
-
- while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
- ex = ex->prev_execute_data;
- }
- if (ex &&
- ex->opline->opcode != ZEND_FETCH_CLASS &&
- ex->opline->opcode != ZEND_NEW) {
- zend_throw_exception_ex(spl_ce_LogicException, 0, "Class %s could not be loaded", ZSTR_VAL(class_name));
- } else {
- zend_throw_error(zend_ce_error, "Class %s could not be loaded", ZSTR_VAL(class_name));
- }
- }
} /* }}} */
/* {{{ proto string spl_autoload_extensions([string file_extensions])
@@ -417,11 +397,15 @@ PHP_FUNCTION(spl_autoload_call)
}
if (SPL_G(autoload_functions)) {
+ HashPosition pos;
+ zend_ulong num_idx;
int l_autoload_running = SPL_G(autoload_running);
SPL_G(autoload_running) = 1;
lc_name = zend_string_alloc(Z_STRLEN_P(class_name), 0);
zend_str_tolower_copy(ZSTR_VAL(lc_name), Z_STRVAL_P(class_name), Z_STRLEN_P(class_name));
- ZEND_HASH_FOREACH_STR_KEY_PTR(SPL_G(autoload_functions), func_name, alfi) {
+ zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &pos);
+ while (zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &num_idx, &pos) == HASH_KEY_IS_STRING) {
+ alfi = zend_hash_get_current_data_ptr_ex(SPL_G(autoload_functions), &pos);
zend_call_method(Z_ISUNDEF(alfi->obj)? NULL : &alfi->obj, alfi->ce, &alfi->func_ptr, ZSTR_VAL(func_name), ZSTR_LEN(func_name), retval, 1, class_name, NULL);
zend_exception_save();
if (retval) {
@@ -431,7 +415,8 @@ PHP_FUNCTION(spl_autoload_call)
if (zend_hash_exists(EG(class_table), lc_name)) {
break;
}
- } ZEND_HASH_FOREACH_END();
+ zend_hash_move_forward_ex(SPL_G(autoload_functions), &pos);
+ }
zend_exception_restore();
zend_string_free(lc_name);
SPL_G(autoload_running) = l_autoload_running;
@@ -654,10 +639,14 @@ PHP_FUNCTION(spl_autoload_unregister)
if (SPL_G(autoload_functions)) {
if (ZSTR_LEN(lc_name) == sizeof("spl_autoload_call") - 1 && !strcmp(ZSTR_VAL(lc_name), "spl_autoload_call")) {
/* remove all */
- zend_hash_destroy(SPL_G(autoload_functions));
- FREE_HASHTABLE(SPL_G(autoload_functions));
- SPL_G(autoload_functions) = NULL;
- EG(autoload_func) = NULL;
+ if (!SPL_G(autoload_running)) {
+ zend_hash_destroy(SPL_G(autoload_functions));
+ FREE_HASHTABLE(SPL_G(autoload_functions));
+ SPL_G(autoload_functions) = NULL;
+ EG(autoload_func) = NULL;
+ } else {
+ zend_hash_clean(SPL_G(autoload_functions));
+ }
success = SUCCESS;
} else {
/* remove specific */
@@ -768,7 +757,7 @@ PHPAPI zend_string *php_spl_object_hash(zval *obj) /* {{{*/
}
hash_handle = SPL_G(hash_mask_handle)^(intptr_t)Z_OBJ_HANDLE_P(obj);
- hash_handlers = SPL_G(hash_mask_handlers)^(intptr_t)Z_OBJ_HT_P(obj);
+ hash_handlers = SPL_G(hash_mask_handlers);
return strpprintf(32, "%016lx%016lx", hash_handle, hash_handlers);
}
diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h
index 015ada4ac2..b936cfe45b 100644
--- a/ext/spl/php_spl.h
+++ b/ext/spl/php_spl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -68,13 +68,8 @@ ZEND_BEGIN_MODULE_GLOBALS(spl)
int autoload_running;
ZEND_END_MODULE_GLOBALS(spl)
-#ifdef ZTS
-# define SPL_G(v) ZEND_TSRMG(spl_globals_id, zend_spl_globals *, v)
-extern int spl_globals_id;
-#else
-# define SPL_G(v) (spl_globals.v)
-extern zend_spl_globals spl_globals;
-#endif
+ZEND_EXTERN_MODULE_GLOBALS(spl)
+#define SPL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(spl, v)
PHP_FUNCTION(spl_classes);
PHP_FUNCTION(class_parents);
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 2835876e33..60cbac5726 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -82,21 +82,44 @@ static inline spl_array_object *spl_array_from_obj(zend_object *obj) /* {{{ */ {
#define Z_SPLARRAY_P(zv) spl_array_from_obj(Z_OBJ_P((zv)))
-static inline HashTable *spl_array_get_hash_table(spl_array_object* intern, int check_std_props) { /* {{{ */
- if (intern->ar_flags & SPL_ARRAY_IS_SELF
- || (check_std_props && (intern->ar_flags & SPL_ARRAY_STD_PROP_LIST))
- ) {
+static inline HashTable **spl_array_get_hash_table_ptr(spl_array_object* intern) { /* {{{ */
+ //??? TODO: Delay duplication for arrays; only duplicate for write operations
+ if (intern->ar_flags & SPL_ARRAY_IS_SELF) {
if (!intern->std.properties) {
rebuild_object_properties(&intern->std);
}
- return intern->std.properties;
+ return &intern->std.properties;
} else if (intern->ar_flags & SPL_ARRAY_USE_OTHER) {
spl_array_object *other = Z_SPLARRAY_P(&intern->array);
- return spl_array_get_hash_table(other, check_std_props);
+ return spl_array_get_hash_table_ptr(other);
+ } else if (Z_TYPE(intern->array) == IS_ARRAY) {
+ return &Z_ARRVAL(intern->array);
} else {
- return HASH_OF(&intern->array);
+ zend_object *obj = Z_OBJ(intern->array);
+ if (!obj->properties) {
+ rebuild_object_properties(obj);
+ } else if (GC_REFCOUNT(obj->properties) > 1) {
+ if (EXPECTED(!(GC_FLAGS(obj->properties) & IS_ARRAY_IMMUTABLE))) {
+ GC_REFCOUNT(obj->properties)--;
+ }
+ obj->properties = zend_array_dup(obj->properties);
+ }
+ return &obj->properties;
}
-} /* }}} */
+}
+/* }}} */
+
+static inline HashTable *spl_array_get_hash_table(spl_array_object* intern) { /* {{{ */
+ return *spl_array_get_hash_table_ptr(intern);
+}
+/* }}} */
+
+static inline void spl_array_replace_hash_table(spl_array_object* intern, HashTable *ht) { /* {{{ */
+ HashTable **ht_ptr = spl_array_get_hash_table_ptr(intern);
+ zend_array_destroy(*ht_ptr);
+ *ht_ptr = ht;
+}
+/* }}} */
static inline zend_bool spl_array_is_object(spl_array_object *intern) /* {{{ */
{
@@ -130,6 +153,10 @@ static zend_always_inline uint32_t *spl_array_get_pos_ptr(HashTable *ht, spl_arr
static void spl_array_object_free_storage(zend_object *object)
{
spl_array_object *intern = spl_array_from_obj(object);
+
+ if (intern->ht_iter != (uint32_t) -1) {
+ zend_hash_iterator_del(intern->ht_iter);
+ }
zend_object_std_dtor(&intern->std);
@@ -163,10 +190,12 @@ static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zval *
if (other->ar_flags & SPL_ARRAY_IS_SELF) {
ZVAL_UNDEF(&intern->array);
} else if (Z_OBJ_HT_P(orig) == &spl_handler_ArrayObject) {
- ZVAL_ARR(&intern->array, zend_array_dup(HASH_OF(&other->array)));
+ ZVAL_ARR(&intern->array,
+ zend_array_dup(spl_array_get_hash_table(other)));
} else {
ZEND_ASSERT(Z_OBJ_HT_P(orig) == &spl_handler_ArrayIterator);
- ZVAL_COPY(&intern->array, &other->array);
+ ZVAL_COPY(&intern->array, orig);
+ intern->ar_flags |= SPL_ARRAY_USE_OTHER;
}
} else {
ZVAL_COPY(&intern->array, orig);
@@ -259,23 +288,23 @@ static zend_object *spl_array_object_clone(zval *zobject)
}
/* }}} */
-static zval *spl_array_get_dimension_ptr(int check_inherited, zval *object, zval *offset, int type) /* {{{ */
+static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object *intern, zval *offset, int type) /* {{{ */
{
zval *retval;
zend_long index;
zend_string *offset_key;
- spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *ht = spl_array_get_hash_table(intern, 0);
+ HashTable *ht = spl_array_get_hash_table(intern);
if (!offset || Z_ISUNDEF_P(offset)) {
return &EG(uninitialized_zval);
}
- if ((type == BP_VAR_W || type == BP_VAR_RW) && (ht->u.v.nApplyCount > 0)) {
+ if ((type == BP_VAR_W || type == BP_VAR_RW) && intern->nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return &EG(error_zval);;
+ return &EG(error_zval);
}
+try_again:
switch (Z_TYPE_P(offset)) {
case IS_NULL:
offset_key = ZSTR_EMPTY_ALLOC();
@@ -355,6 +384,9 @@ num_index:
}
}
return retval;
+ case IS_REFERENCE:
+ ZVAL_DEREF(offset);
+ goto try_again;
default:
zend_error(E_WARNING, "Illegal offset type");
return (type == BP_VAR_W || type == BP_VAR_RW) ?
@@ -362,12 +394,21 @@ num_index:
}
} /* }}} */
+static int spl_array_has_dimension(zval *object, zval *offset, int check_empty);
+
static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval *offset, int type, zval *rv) /* {{{ */
{
+ spl_array_object *intern = Z_SPLARRAY_P(object);
zval *ret;
- if (check_inherited) {
- spl_array_object *intern = Z_SPLARRAY_P(object);
+ if (check_inherited &&
+ (intern->fptr_offset_get || (type == BP_VAR_IS && intern->fptr_offset_has))) {
+ if (type == BP_VAR_IS) {
+ if (!spl_array_has_dimension(object, offset, 0)) {
+ return &EG(uninitialized_zval);
+ }
+ }
+
if (intern->fptr_offset_get) {
zval tmp;
if (!offset) {
@@ -385,13 +426,12 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval
return &EG(uninitialized_zval);
}
}
- ret = spl_array_get_dimension_ptr(check_inherited, object, offset, type);
- //!!! FIXME?
- // ZVAL_COPY(result, ret);
+
+ ret = spl_array_get_dimension_ptr(check_inherited, intern, offset, type);
/* When in a write context,
* ZE has to be fooled into thinking this is in a reference set
- * by separating (if necessary) and returning as an is_ref=1 zval (even if refcount == 1)
+ * by separating (if necessary) and returning as IS_REFERENCE (with refcount == 1)
*/
if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) &&
@@ -428,29 +468,25 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval
return;
}
- if (!offset) {
- ht = spl_array_get_hash_table(intern, 0);
- if (ht->u.v.nApplyCount > 0) {
- zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return;
- }
- if (Z_REFCOUNTED_P(value)) {
- Z_ADDREF_P(value);
- }
- zend_hash_next_index_insert(ht, value);
+ if (intern->nApplyCount > 0) {
+ zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
if (Z_REFCOUNTED_P(value)) {
Z_ADDREF_P(value);
}
+
+ if (!offset) {
+ ht = spl_array_get_hash_table(intern);
+ zend_hash_next_index_insert(ht, value);
+ return;
+ }
+
+try_again:
switch (Z_TYPE_P(offset)) {
case IS_STRING:
- ht = spl_array_get_hash_table(intern, 0);
- if (ht->u.v.nApplyCount > 0) {
- zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return;
- }
+ ht = spl_array_get_hash_table(intern);
zend_symtable_update_ind(ht, Z_STR_P(offset), value);
return;
case IS_DOUBLE:
@@ -468,23 +504,19 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval
case IS_LONG:
index = Z_LVAL_P(offset);
num_index:
- ht = spl_array_get_hash_table(intern, 0);
- if (ht->u.v.nApplyCount > 0) {
- zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return;
- }
+ ht = spl_array_get_hash_table(intern);
zend_hash_index_update(ht, index, value);
return;
case IS_NULL:
- ht = spl_array_get_hash_table(intern, 0);
- if (ht->u.v.nApplyCount > 0) {
- zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return;
- }
+ ht = spl_array_get_hash_table(intern);
zend_hash_next_index_insert(ht, value);
return;
+ case IS_REFERENCE:
+ ZVAL_DEREF(offset);
+ goto try_again;
default:
zend_error(E_WARNING, "Illegal offset type");
+ zval_ptr_dtor(value);
return;
}
} /* }}} */
@@ -507,13 +539,15 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval
return;
}
- switch(Z_TYPE_P(offset)) {
+ if (intern->nApplyCount > 0) {
+ zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
+ return;
+ }
+
+try_again:
+ switch (Z_TYPE_P(offset)) {
case IS_STRING:
- ht = spl_array_get_hash_table(intern, 0);
- if (ht->u.v.nApplyCount > 0) {
- zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return;
- }
+ ht = spl_array_get_hash_table(intern);
if (ht == &EG(symbol_table)) {
if (zend_delete_global_variable(Z_STR_P(offset))) {
zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset));
@@ -529,6 +563,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval
} else {
zval_ptr_dtor(data);
ZVAL_UNDEF(data);
+ ht->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND;
zend_hash_move_forward_ex(ht, spl_array_get_pos_ptr(ht, intern));
if (spl_array_is_object(intern)) {
spl_array_skip_protected(intern, ht);
@@ -557,15 +592,14 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval
case IS_LONG:
index = Z_LVAL_P(offset);
num_index:
- ht = spl_array_get_hash_table(intern, 0);
- if (ht->u.v.nApplyCount > 0) {
- zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
- return;
- }
+ ht = spl_array_get_hash_table(intern);
if (zend_hash_index_del(ht, index) == FAILURE) {
zend_error(E_NOTICE,"Undefined offset: %pd", index);
}
break;
+ case IS_REFERENCE:
+ ZVAL_DEREF(offset);
+ goto try_again;
default:
zend_error(E_WARNING, "Illegal offset type");
return;
@@ -584,11 +618,6 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
zval rv, *value = NULL, *tmp;
if (check_inherited && intern->fptr_offset_has) {
-//??? zval offset_tmp;
-//??? ZVAL_COPY_VALUE(&offset_tmp, offset);
-//??? SEPARATE_ARG_IF_REF(&offset_tmp);
-//??? zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_has, "offsetExists", &rv, &offset_tmp);
-//??? zval_ptr_dtor(&offset_tmp);
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_has, "offsetExists", &rv, offset);
zval_ptr_dtor(offset);
@@ -607,9 +636,10 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
}
if (!value) {
- HashTable *ht = spl_array_get_hash_table(intern, 0);
+ HashTable *ht = spl_array_get_hash_table(intern);
- switch(Z_TYPE_P(offset)) {
+try_again:
+ switch (Z_TYPE_P(offset)) {
case IS_STRING:
if ((tmp = zend_symtable_find(ht, Z_STR_P(offset))) != NULL) {
if (check_empty == 2) {
@@ -643,7 +673,9 @@ num_index:
return 0;
}
break;
-
+ case IS_REFERENCE:
+ ZVAL_DEREF(offset);
+ goto try_again;
default:
zend_error(E_WARNING, "Illegal offset type");
return 0;
@@ -730,7 +762,7 @@ SPL_METHOD(Array, offsetSet)
void spl_array_iterator_append(zval *object, zval *append_value) /* {{{ */
{
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (!aht) {
php_error_docref(NULL, E_NOTICE, "Array was modified outside object and is no longer an array");
@@ -778,22 +810,21 @@ SPL_METHOD(Array, getArrayCopy)
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
- RETURN_ARR(zend_array_dup(spl_array_get_hash_table(intern, 0)));
+ RETURN_ARR(zend_array_dup(spl_array_get_hash_table(intern)));
} /* }}} */
static HashTable *spl_array_get_properties(zval *object) /* {{{ */
{
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *result;
- if (intern->nApplyCount > 1) {
- php_error_docref(NULL, E_ERROR, "Nesting level too deep - recursive dependency?");
+ if (intern->ar_flags & SPL_ARRAY_STD_PROP_LIST) {
+ if (!intern->std.properties) {
+ rebuild_object_properties(&intern->std);
+ }
+ return intern->std.properties;
}
- intern->nApplyCount++;
- result = spl_array_get_hash_table(intern, 1);
- intern->nApplyCount--;
- return result;
+ return spl_array_get_hash_table(intern);
} /* }}} */
static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */
@@ -870,11 +901,9 @@ static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type
if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0
&& !std_object_handlers.has_property(object, member, 2, NULL)) {
- return spl_array_get_dimension_ptr(1, object, member, type);
+ return spl_array_get_dimension_ptr(1, intern, member, type);
}
- //!!! FIXME
- //return std_object_handlers.get_property_ptr_ptr(object, member, type, key);
- return NULL;
+ return std_object_handlers.get_property_ptr_ptr(object, member, type, cache_slot);
} /* }}} */
static int spl_array_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */
@@ -910,8 +939,8 @@ static int spl_array_compare_objects(zval *o1, zval *o2) /* {{{ */
intern1 = Z_SPLARRAY_P(o1);
intern2 = Z_SPLARRAY_P(o2);
- ht1 = spl_array_get_hash_table(intern1, 0);
- ht2 = spl_array_get_hash_table(intern2, 0);
+ ht1 = spl_array_get_hash_table(intern1);
+ ht2 = spl_array_get_hash_table(intern2);
result = zend_compare_symbol_tables(ht1, ht2);
/* if we just compared std.properties, don't do it again */
@@ -966,7 +995,7 @@ static int spl_array_next_ex(spl_array_object *intern, HashTable *aht) /* {{{ */
static int spl_array_next(spl_array_object *intern) /* {{{ */
{
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
return spl_array_next_ex(intern, aht);
@@ -982,7 +1011,7 @@ static void spl_array_it_dtor(zend_object_iterator *iter) /* {{{ */
static int spl_array_it_valid(zend_object_iterator *iter) /* {{{ */
{
spl_array_object *object = Z_SPLARRAY_P(&iter->data);
- HashTable *aht = spl_array_get_hash_table(object, 0);
+ HashTable *aht = spl_array_get_hash_table(object);
if (object->ar_flags & SPL_ARRAY_OVERLOADED_VALID) {
return zend_user_it_valid(iter);
@@ -999,7 +1028,7 @@ static int spl_array_it_valid(zend_object_iterator *iter) /* {{{ */
static zval *spl_array_it_get_current_data(zend_object_iterator *iter) /* {{{ */
{
spl_array_object *object = Z_SPLARRAY_P(&iter->data);
- HashTable *aht = spl_array_get_hash_table(object, 0);
+ HashTable *aht = spl_array_get_hash_table(object);
if (object->ar_flags & SPL_ARRAY_OVERLOADED_CURRENT) {
return zend_user_it_get_current_data(iter);
@@ -1016,7 +1045,7 @@ static zval *spl_array_it_get_current_data(zend_object_iterator *iter) /* {{{ */
static void spl_array_it_get_current_key(zend_object_iterator *iter, zval *key) /* {{{ */
{
spl_array_object *object = Z_SPLARRAY_P(&iter->data);
- HashTable *aht = spl_array_get_hash_table(object, 0);
+ HashTable *aht = spl_array_get_hash_table(object);
if (object->ar_flags & SPL_ARRAY_OVERLOADED_KEY) {
zend_user_it_get_current_key(iter, key);
@@ -1033,7 +1062,7 @@ static void spl_array_it_get_current_key(zend_object_iterator *iter, zval *key)
static void spl_array_it_move_forward(zend_object_iterator *iter) /* {{{ */
{
spl_array_object *object = Z_SPLARRAY_P(&iter->data);
- HashTable *aht = spl_array_get_hash_table(object, 0);
+ HashTable *aht = spl_array_get_hash_table(object);
if (object->ar_flags & SPL_ARRAY_OVERLOADED_NEXT) {
zend_user_it_move_forward(iter);
@@ -1051,7 +1080,7 @@ static void spl_array_it_move_forward(zend_object_iterator *iter) /* {{{ */
static void spl_array_rewind(spl_array_object *intern) /* {{{ */
{
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (!aht) {
php_error_docref(NULL, E_NOTICE, "ArrayIterator::rewind(): Array was modified outside object and is no longer an array");
@@ -1087,13 +1116,13 @@ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *ar
return;
}
- zval_ptr_dtor(&intern->array);
-
if (Z_TYPE_P(array) == IS_ARRAY) {
//??? TODO: try to avoid array duplication
+ zval_ptr_dtor(&intern->array);
ZVAL_DUP(&intern->array, array);
} else {
if (Z_OBJ_HT_P(array) == &spl_handler_ArrayObject || Z_OBJ_HT_P(array) == &spl_handler_ArrayIterator) {
+ zval_ptr_dtor(&intern->array);
if (just_array) {
spl_array_object *other = Z_SPLARRAY_P(array);
ar_flags = other->ar_flags & ~SPL_ARRAY_INT_MASK;
@@ -1107,11 +1136,14 @@ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *ar
}
} else {
zend_object_get_properties_t handler = Z_OBJ_HANDLER_P(array, get_properties);
- ZVAL_COPY(&intern->array, array);
- if (handler != std_object_handlers.get_properties
- || !spl_array_get_hash_table(intern, 0)) {
- zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_P(array)->name, intern->std.ce->name);
+ if (handler != std_object_handlers.get_properties) {
+ zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0,
+ "Overloaded object of type %s is not compatible with %s",
+ ZSTR_VAL(Z_OBJCE_P(array)->name), ZSTR_VAL(intern->std.ce->name));
+ return;
}
+ zval_ptr_dtor(&intern->array);
+ ZVAL_COPY(&intern->array, array);
}
}
@@ -1153,8 +1185,8 @@ zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object,
}
/* }}} */
-/* {{{ proto void ArrayObject::__construct(array|object ar = array() [, int flags = 0 [, string iterator_class = "ArrayIterator"]])
- proto void ArrayIterator::__construct(array|object ar = array() [, int flags = 0])
+/* {{{ proto void ArrayObject::__construct([array|object ar = array() [, int flags = 0 [, string iterator_class = "ArrayIterator"]]])
+ proto void ArrayIterator::__construct([array|object ar = array() [, int flags = 0]])
Constructs a new array iterator from a path. */
SPL_METHOD(Array, __construct)
{
@@ -1264,7 +1296,12 @@ SPL_METHOD(Array, exchangeArray)
return;
}
- RETVAL_ARR(zend_array_dup(spl_array_get_hash_table(intern, 0)));
+ if (intern->nApplyCount > 0) {
+ zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
+ return;
+ }
+
+ RETVAL_ARR(zend_array_dup(spl_array_get_hash_table(intern)));
spl_array_set_array(object, intern, array, 0L, 1);
}
/* }}} */
@@ -1275,7 +1312,7 @@ SPL_METHOD(Array, getIterator)
{
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -1312,7 +1349,7 @@ SPL_METHOD(Array, seek)
zend_long opos, position;
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
int result;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &position) == FAILURE) {
@@ -1341,7 +1378,7 @@ SPL_METHOD(Array, seek)
int static spl_array_object_count_elements_helper(spl_array_object *intern, zend_long *count) /* {{{ */
{
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
HashPosition pos, *pos_ptr;
if (!aht) {
@@ -1406,23 +1443,19 @@ SPL_METHOD(Array, count)
static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fname_len, int use_arg) /* {{{ */
{
spl_array_object *intern = Z_SPLARRAY_P(getThis());
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
zval function_name, params[2], *arg = NULL;
- uint32_t old_refcount;
ZVAL_STRINGL(&function_name, fname, fname_len);
- /* A tricky way to pass "aht" by reference, reset refcount */
- //??? It may be not safe, if user comparison handler accesses "aht"
- old_refcount = GC_REFCOUNT(aht);
- GC_REFCOUNT(aht) = 1;
ZVAL_NEW_EMPTY_REF(&params[0]);
ZVAL_ARR(Z_REFVAL(params[0]), aht);
+ GC_REFCOUNT(aht)++;
if (!use_arg) {
- aht->u.v.nApplyCount++;
+ intern->nApplyCount++;
call_user_function_ex(EG(function_table), NULL, &function_name, return_value, 1, params, 1, NULL);
- aht->u.v.nApplyCount--;
+ intern->nApplyCount--;
} else if (use_arg == SPL_ARRAY_METHOD_MAY_USER_ARG) {
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "|z", &arg) == FAILURE) {
zend_throw_exception(spl_ce_BadMethodCallException, "Function expects one argument at most", 0);
@@ -1431,25 +1464,31 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam
if (arg) {
ZVAL_COPY_VALUE(&params[1], arg);
}
- aht->u.v.nApplyCount++;
+ intern->nApplyCount++;
call_user_function_ex(EG(function_table), NULL, &function_name, return_value, arg ? 2 : 1, params, 1, NULL);
- aht->u.v.nApplyCount--;
+ intern->nApplyCount--;
} else {
if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z", &arg) == FAILURE) {
zend_throw_exception(spl_ce_BadMethodCallException, "Function expects exactly one argument", 0);
goto exit;
}
ZVAL_COPY_VALUE(&params[1], arg);
- aht->u.v.nApplyCount++;
+ intern->nApplyCount++;
call_user_function_ex(EG(function_table), NULL, &function_name, return_value, 2, params, 1, NULL);
- aht->u.v.nApplyCount--;
+ intern->nApplyCount--;
}
exit:
- /* A tricky way to pass "aht" by reference, copy back and cleanup */
- GC_REFCOUNT(aht) = old_refcount;
- efree(Z_REF(params[0]));
- zend_string_free(Z_STR(function_name));
+ {
+ HashTable *new_ht = Z_ARRVAL_P(Z_REFVAL(params[0]));
+ if (aht != new_ht) {
+ spl_array_replace_hash_table(intern, new_ht);
+ } else {
+ GC_REFCOUNT(aht)--;
+ }
+ efree(Z_REF(params[0]));
+ zend_string_free(Z_STR(function_name));
+ }
} /* }}} */
#define SPL_ARRAY_METHOD(cname, fname, use_arg) \
@@ -1495,7 +1534,7 @@ SPL_METHOD(Array, current)
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
zval *entry;
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -1533,7 +1572,7 @@ SPL_METHOD(Array, key)
void spl_array_iterator_key(zval *object, zval *return_value) /* {{{ */
{
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (spl_array_object_verify_pos(intern, aht) == FAILURE) {
return;
@@ -1549,7 +1588,7 @@ SPL_METHOD(Array, next)
{
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -1569,7 +1608,7 @@ SPL_METHOD(Array, valid)
{
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -1589,7 +1628,7 @@ SPL_METHOD(Array, hasChildren)
{
zval *object = getThis(), *entry;
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -1613,7 +1652,7 @@ SPL_METHOD(Array, getChildren)
{
zval *object = getThis(), *entry, flags;
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -1649,7 +1688,7 @@ SPL_METHOD(Array, serialize)
{
zval *object = getThis();
spl_array_object *intern = Z_SPLARRAY_P(object);
- HashTable *aht = spl_array_get_hash_table(intern, 0);
+ HashTable *aht = spl_array_get_hash_table(intern);
zval members, flags;
php_serialize_data_t var_hash;
smart_str buf = {0};
@@ -1669,7 +1708,6 @@ SPL_METHOD(Array, serialize)
/* storage */
smart_str_appendl(&buf, "x:", 2);
- //!!! php_var_serialize need to be modified
php_var_serialize(&buf, &flags, &var_hash);
if (!(intern->ar_flags & SPL_ARRAY_IS_SELF)) {
@@ -1683,12 +1721,10 @@ SPL_METHOD(Array, serialize)
rebuild_object_properties(&intern->std);
}
- ZVAL_ARR(&members, zend_array_dup(intern->std.properties));
+ ZVAL_ARR(&members, intern->std.properties);
php_var_serialize(&buf, &members, &var_hash); /* finishes the string */
- zval_ptr_dtor(&members);
-
/* done */
PHP_VAR_SERIALIZE_DESTROY(var_hash);
@@ -1710,8 +1746,7 @@ SPL_METHOD(Array, unserialize)
size_t buf_len;
const unsigned char *p, *s;
php_unserialize_data_t var_hash;
- zval members, zflags;
- HashTable *aht;
+ zval *members, *zflags;
zend_long flags;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &buf, &buf_len) == FAILURE) {
@@ -1722,8 +1757,7 @@ SPL_METHOD(Array, unserialize)
return;
}
- aht = spl_array_get_hash_table(intern, 0);
- if (aht->u.v.nApplyCount > 0) {
+ if (intern->nApplyCount > 0) {
zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited");
return;
}
@@ -1737,14 +1771,15 @@ SPL_METHOD(Array, unserialize)
}
++p;
- if (!php_var_unserialize(&zflags, &p, s + buf_len, &var_hash) || Z_TYPE(zflags) != IS_LONG) {
+ zflags = var_tmp_var(&var_hash);
+ if (!php_var_unserialize(zflags, &p, s + buf_len, &var_hash) || Z_TYPE_P(zflags) != IS_LONG) {
goto outexcept;
}
--p; /* for ';' */
- flags = Z_LVAL(zflags);
+ flags = Z_LVAL_P(zflags);
/* flags needs to be verified and we also need to verify whether the next
- * thing we get is ';'. After that we require an 'm' or somethign else
+ * thing we get is ';'. After that we require an 'm' or something else
* where 'm' stands for members and anything else should be an array. If
* neither 'a' or 'm' follows we have an error. */
@@ -1760,9 +1795,11 @@ SPL_METHOD(Array, unserialize)
intern->ar_flags &= ~SPL_ARRAY_CLONE_MASK;
intern->ar_flags |= flags & SPL_ARRAY_CLONE_MASK;
zval_ptr_dtor(&intern->array);
+ ZVAL_UNDEF(&intern->array);
if (!php_var_unserialize(&intern->array, &p, s + buf_len, &var_hash)) {
goto outexcept;
}
+ var_push_dtor(&var_hash, &intern->array);
}
if (*p != ';') {
goto outexcept;
@@ -1775,18 +1812,15 @@ SPL_METHOD(Array, unserialize)
}
++p;
- ZVAL_UNDEF(&members);
- if (!php_var_unserialize(&members, &p, s + buf_len, &var_hash) || Z_TYPE(members) != IS_ARRAY) {
- zval_ptr_dtor(&members);
+ members = var_tmp_var(&var_hash);
+ if (!php_var_unserialize(members, &p, s + buf_len, &var_hash) || Z_TYPE_P(members) != IS_ARRAY) {
goto outexcept;
}
/* copy members */
- object_properties_load(&intern->std, Z_ARRVAL(members));
- zval_ptr_dtor(&members);
+ object_properties_load(&intern->std, Z_ARRVAL_P(members));
/* done reading $serialized */
-
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
return;
@@ -1797,9 +1831,11 @@ outexcept:
} /* }}} */
-/* {{{ arginfo and function tbale */
-ZEND_BEGIN_ARG_INFO(arginfo_array___construct, 0)
+/* {{{ arginfo and function table */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array___construct, 0, 0, 0)
ZEND_ARG_INFO(0, array)
+ ZEND_ARG_INFO(0, ar_flags)
+ ZEND_ARG_INFO(0, iterator_class)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetGet, 0, 0, 1)
diff --git a/ext/spl/spl_array.h b/ext/spl/spl_array.h
index eabc0cb819..5de3c963cc 100644
--- a/ext/spl/spl_array.h
+++ b/ext/spl/spl_array.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 88026efaf8..f448912aeb 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -122,10 +122,6 @@ static void spl_filesystem_object_free_storage(zend_object *object) /* {{{ */
spl_filesystem_file_free_line(intern);
break;
}
-
- if (intern->it) {
- //????zend_iterator_dtor(&intern->it->intern);
- }
} /* }}} */
/* {{{ spl_ce_dir_object_new */
@@ -319,7 +315,7 @@ static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_inclu
} /* }}} */
/* {{{ spl_filesystem_object_clone */
-/* Local zend_object_value creation (on stack)
+/* Local zend_object creation (on stack)
Load the 'other' object
Create a new empty object (See spl_filesystem_object_new_ex)
Open the directory
@@ -838,7 +834,8 @@ SPL_METHOD(DirectoryIterator, seek)
zval_ptr_dtor(&retval);
}
if (!valid) {
- break;
+ zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0, "Seek position %ld is out of range", pos);
+ return;
}
zend_call_method_with_0_params(&EX(This), Z_OBJCE(EX(This)), &intern->u.dir.func_next, "next", NULL);
}
@@ -940,7 +937,6 @@ SPL_METHOD(SplFileInfo, getExtension)
p = zend_memrchr(ZSTR_VAL(ret), '.', ZSTR_LEN(ret));
if (p) {
- assert(p > ZSTR_VAL(ret));
idx = (int)(p - ZSTR_VAL(ret));
RETVAL_STRINGL(ZSTR_VAL(ret) + idx + 1, ZSTR_LEN(ret) - idx - 1);
zend_string_release(ret);
@@ -1647,8 +1643,7 @@ static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter)
zval_ptr_dtor(object);
}
/* Otherwise we were called from the owning object free storage handler as
- * it sets
- * iterator->intern.data to NULL.
+ * it sets iterator->intern.data to IS_UNDEF.
* We don't even need to destroy iterator->current as we didn't add a
* reference to it in move_forward or get_iterator */
}
@@ -2080,13 +2075,11 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
ZVAL_UNDEF(&retval);
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
fci.object = NULL;
fci.retval = &retval;
fci.param_count = num_args;
fci.params = params;
fci.no_separation = 1;
- fci.symbol_table = NULL;
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
fcic.initialized = 1;
@@ -2889,7 +2882,7 @@ SPL_METHOD(SplFileObject, fwrite)
if (ZEND_NUM_ARGS() > 1) {
if (length >= 0) {
- str_len = MAX(0, MIN((size_t)length, str_len));
+ str_len = MIN((size_t)length, str_len);
} else {
/* Negative length given, nothing to write */
str_len = 0;
diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h
index dca463d6f0..2f7a323ea6 100644
--- a/ext/spl/spl_directory.h
+++ b/ext/spl/spl_directory.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -101,7 +101,6 @@ struct _spl_filesystem_object {
char escape;
} file;
} u;
- spl_filesystem_iterator *it;
zend_object std;
};
@@ -114,10 +113,12 @@ static inline spl_filesystem_object *spl_filesystem_from_obj(zend_object *obj) /
static inline spl_filesystem_iterator* spl_filesystem_object_to_iterator(spl_filesystem_object *obj)
{
- obj->it = ecalloc(1, sizeof(spl_filesystem_iterator));
- obj->it->object = (void *)obj;
- zend_iterator_init(&obj->it->intern);
- return obj->it;
+ spl_filesystem_iterator *it;
+
+ it = ecalloc(1, sizeof(spl_filesystem_iterator));
+ it->object = (void *)obj;
+ zend_iterator_init(&it->intern);
+ return it;
}
static inline spl_filesystem_object* spl_filesystem_iterator_to_object(spl_filesystem_iterator *it)
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index a0d6bf887e..1675c7eaf3 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -156,7 +156,7 @@ static void spl_ptr_llist_destroy(spl_ptr_llist *llist) /* {{{ */
while (current) {
next = current->next;
- if(current && dtor) {
+ if (dtor) {
dtor(current);
}
SPL_LLIST_DELREF(current);
@@ -830,7 +830,6 @@ SPL_METHOD(SplDoublyLinkedList, offsetSet)
index = spl_offset_convert_to_long(zindex);
if (index < 0 || index >= intern->llist->count) {
- zval_ptr_dtor(value);
zend_throw_exception(spl_ce_OutOfRangeException, "Offset invalid or out of range", 0);
return;
}
@@ -1178,7 +1177,7 @@ SPL_METHOD(SplDoublyLinkedList, serialize)
SPL_METHOD(SplDoublyLinkedList, unserialize)
{
spl_dllist_object *intern = Z_SPLDLLIST_P(getThis());
- zval flags, elem;
+ zval *flags, *elem;
char *buf;
size_t buf_len;
const unsigned char *p, *s;
@@ -1196,27 +1195,23 @@ SPL_METHOD(SplDoublyLinkedList, unserialize)
PHP_VAR_UNSERIALIZE_INIT(var_hash);
/* flags */
- if (!php_var_unserialize(&flags, &p, s + buf_len, &var_hash)) {
+ flags = var_tmp_var(&var_hash);
+ if (!php_var_unserialize(flags, &p, s + buf_len, &var_hash) || Z_TYPE_P(flags) != IS_LONG) {
goto error;
}
- if (Z_TYPE(flags) != IS_LONG) {
- zval_ptr_dtor(&flags);
- goto error;
- }
-
- intern->flags = (int)Z_LVAL(flags);
- zval_ptr_dtor(&flags);
+ intern->flags = (int)Z_LVAL_P(flags);
/* elements */
while(*p == ':') {
++p;
- if (!php_var_unserialize(&elem, &p, s + buf_len, &var_hash)) {
+ elem = var_tmp_var(&var_hash);
+ if (!php_var_unserialize(elem, &p, s + buf_len, &var_hash)) {
goto error;
}
+ var_push_dtor(&var_hash, elem);
- spl_ptr_llist_push(intern->llist, &elem);
- zval_ptr_dtor(&elem);
+ spl_ptr_llist_push(intern->llist, elem);
}
if (*p != '\0') {
diff --git a/ext/spl/spl_dllist.h b/ext/spl/spl_dllist.h
index 22395aaf3f..6aff0bef19 100644
--- a/ext/spl/spl_dllist.h
+++ b/ext/spl/spl_dllist.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c
index f9105d005b..7df2ff036e 100644
--- a/ext/spl/spl_engine.c
+++ b/ext/spl/spl_engine.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -35,8 +35,6 @@
PHPAPI void spl_instantiate(zend_class_entry *pce, zval *object)
{
object_init_ex(object, pce);
- Z_SET_REFCOUNT_P(object, 1);
- // !!!PZ_SET_ISREF_P(object); /* check if this can be hold always */
}
/* }}} */
@@ -44,6 +42,7 @@ PHPAPI zend_long spl_offset_convert_to_long(zval *offset) /* {{{ */
{
zend_ulong idx;
+try_again:
switch (Z_TYPE_P(offset)) {
case IS_STRING:
if (ZEND_HANDLE_NUMERIC(Z_STR_P(offset), idx)) {
@@ -58,6 +57,9 @@ PHPAPI zend_long spl_offset_convert_to_long(zval *offset) /* {{{ */
return 0;
case IS_TRUE:
return 1;
+ case IS_REFERENCE:
+ offset = Z_REFVAL_P(offset);
+ goto try_again;
case IS_RESOURCE:
return Z_RES_HANDLE_P(offset);
}
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h
index 6d7900be27..b683c16d94 100644
--- a/ext/spl/spl_engine.h
+++ b/ext/spl/spl_engine.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -62,10 +62,8 @@ static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, in
spl_instantiate(pce, retval);
fci.size = sizeof(zend_fcall_info);
- fci.function_table = &pce->function_table;
ZVAL_STR(&fci.function_name, func->common.function_name);
fci.object = Z_OBJ_P(retval);
- fci.symbol_table = NULL;
fci.retval = &dummy;
fci.param_count = argc;
fci.params = argv;
@@ -73,7 +71,7 @@ static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, in
fcc.initialized = 1;
fcc.function_handler = func;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = pce;
fcc.object = Z_OBJ_P(retval);
diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c
index b9bf06609a..a5f15a54a2 100644
--- a/ext/spl/spl_exceptions.c
+++ b/ext/spl/spl_exceptions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_exceptions.h b/ext/spl/spl_exceptions.h
index e41d079677..3f0da34196 100644
--- a/ext/spl/spl_exceptions.h
+++ b/ext/spl/spl_exceptions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 255412d89c..e04abf77ea 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -410,11 +410,11 @@ static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_o
static void spl_fixedarray_object_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */
{
spl_fixedarray_object *intern;
+ zval tmp;
intern = Z_SPLFIXEDARRAY_P(object);
if (intern->fptr_offset_set) {
- zval tmp;
if (!offset) {
ZVAL_NULL(&tmp);
offset = &tmp;
diff --git a/ext/spl/spl_fixedarray.h b/ext/spl/spl_fixedarray.h
index c130142d44..0ea8b5c4f8 100644
--- a/ext/spl/spl_fixedarray.h
+++ b/ext/spl/spl_fixedarray.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index 5f0d5f4e85..4b5a4cc9e7 100644
--- a/ext/spl/spl_functions.c
+++ b/ext/spl/spl_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h
index 47e3d95d4c..0611cab2b8 100644
--- a/ext/spl/spl_functions.h
+++ b/ext/spl/spl_functions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index ad520f948a..2e014a1863 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -378,13 +378,7 @@ static zend_object *spl_heap_object_new_ex(zend_class_entry *class_type, zval *o
intern->ce_get_iterator = other->ce_get_iterator;
if (clone_orig) {
- int i;
intern->heap = spl_ptr_heap_clone(other->heap);
- for (i = 0; i < intern->heap->count; ++i) {
- if (Z_REFCOUNTED(intern->heap->elements[i])) {
- Z_ADDREF(intern->heap->elements[i]);
- }
- }
} else {
intern->heap = other->heap;
}
diff --git a/ext/spl/spl_heap.h b/ext/spl/spl_heap.h
index 5127369b5e..99bf19f278 100644
--- a/ext/spl/spl_heap.h
+++ b/ext/spl/spl_heap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 0f99923492..2f711ca2a6 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -390,9 +390,11 @@ next_step:
}
}
}
- zend_iterator_dtor(iterator);
- zval_ptr_dtor(&object->iterators[object->level].zobject);
- object->level--;
+ if (object->level > 0) {
+ zend_iterator_dtor(iterator);
+ zval_ptr_dtor(&object->iterators[object->level].zobject);
+ object->level--;
+ }
} else {
return; /* done completeley */
}
@@ -1986,7 +1988,6 @@ SPL_METHOD(CallbackFilterIterator, accept)
zend_fcall_info *fci = &intern->u.cbfilter->fci;
zend_fcall_info_cache *fcc = &intern->u.cbfilter->fcc;
zval params[3];
- zval result;
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -2000,19 +2001,22 @@ SPL_METHOD(CallbackFilterIterator, accept)
ZVAL_COPY_VALUE(&params[1], &intern->current.key);
ZVAL_COPY_VALUE(&params[2], &intern->inner.zobject);
- fci->retval = &result;
+ fci->retval = return_value;
fci->param_count = 3;
fci->params = params;
fci->no_separation = 0;
- if (zend_call_function(fci, fcc) != SUCCESS || Z_TYPE(result) == IS_UNDEF) {
+ if (zend_call_function(fci, fcc) != SUCCESS || Z_ISUNDEF_P(return_value)) {
RETURN_FALSE;
}
+
if (EG(exception)) {
- return;
+ RETURN_NULL();
}
- RETURN_ZVAL(&result, 1, 1);
+ /* zend_call_function may change args to IS_REF */
+ ZVAL_COPY_VALUE(&intern->current.data, &params[0]);
+ ZVAL_COPY_VALUE(&intern->current.key, &params[1]);
}
/* }}} */
@@ -2047,16 +2051,17 @@ SPL_METHOD(RegexIterator, accept)
{
case REGIT_MODE_MAX: /* won't happen but makes compiler happy */
case REGIT_MODE_MATCH:
+#ifdef PCRE_EXTRA_MARK
+ if (intern->u.regex.pce->extra) {
+ intern->u.regex.pce->extra->flags &= ~PCRE_EXTRA_MARK;
+ }
+#endif
count = pcre_exec(intern->u.regex.pce->re, intern->u.regex.pce->extra, ZSTR_VAL(subject), ZSTR_LEN(subject), 0, 0, NULL, 0);
RETVAL_BOOL(count >= 0);
break;
case REGIT_MODE_ALL_MATCHES:
case REGIT_MODE_GET_MATCH:
-//??? if (!use_copy) {
-//??? subject = estrndup(subject, subject_len);
-//??? use_copy = 1;
-//??? }
zval_ptr_dtor(&intern->current.data);
ZVAL_UNDEF(&intern->current.data);
php_pcre_match_impl(intern->u.regex.pce, ZSTR_VAL(subject), ZSTR_LEN(subject), &zcount,
@@ -2065,10 +2070,6 @@ SPL_METHOD(RegexIterator, accept)
break;
case REGIT_MODE_SPLIT:
-//??? if (!use_copy) {
-//??? subject = estrndup(subject, subject_len);
-//??? use_copy = 1;
-//??? }
zval_ptr_dtor(&intern->current.data);
ZVAL_UNDEF(&intern->current.data);
php_pcre_split_impl(intern->u.regex.pce, ZSTR_VAL(subject), ZSTR_LEN(subject), &intern->current.data, -1, intern->u.regex.preg_flags);
@@ -2314,10 +2315,7 @@ static void spl_dual_it_free_storage(zend_object *_object)
}
if (object->dit_type == DIT_CachingIterator || object->dit_type == DIT_RecursiveCachingIterator) {
- if (Z_TYPE(object->u.caching.zcache) != IS_UNDEF) {
- zval_ptr_dtor(&object->u.caching.zcache);
- //ZVAL_UNDEF(&object->u.caching.zcache);
- }
+ zval_ptr_dtor(&object->u.caching.zcache);
}
#if HAVE_PCRE || HAVE_BUNDLED_PCRE
@@ -2641,7 +2639,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern)
ZVAL_DEREF(data);
Z_TRY_ADDREF_P(data);
- array_set_zval_key(HASH_OF(&intern->u.caching.zcache), key, data);
+ array_set_zval_key(Z_ARRVAL(intern->u.caching.zcache), key, data);
zval_ptr_dtor(data);
}
/* Recursion ? */
@@ -2706,7 +2704,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern)
static inline void spl_caching_it_rewind(spl_dual_it_object *intern)
{
spl_dual_it_rewind(intern);
- zend_hash_clean(HASH_OF(&intern->u.caching.zcache));
+ zend_hash_clean(Z_ARRVAL(intern->u.caching.zcache));
spl_caching_it_next(intern);
}
@@ -2827,7 +2825,7 @@ SPL_METHOD(CachingIterator, offsetSet)
if (Z_REFCOUNTED_P(value)) {
Z_ADDREF_P(value);
}
- zend_symtable_update(HASH_OF(&intern->u.caching.zcache), key, value);
+ zend_symtable_update(Z_ARRVAL(intern->u.caching.zcache), key, value);
}
/* }}} */
@@ -2850,7 +2848,7 @@ SPL_METHOD(CachingIterator, offsetGet)
return;
}
- if ((value = zend_symtable_find(HASH_OF(&intern->u.caching.zcache), key)) == NULL) {
+ if ((value = zend_symtable_find(Z_ARRVAL(intern->u.caching.zcache), key)) == NULL) {
zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(key));
return;
}
@@ -2878,7 +2876,7 @@ SPL_METHOD(CachingIterator, offsetUnset)
return;
}
- zend_symtable_del(HASH_OF(&intern->u.caching.zcache), key);
+ zend_symtable_del(Z_ARRVAL(intern->u.caching.zcache), key);
}
/* }}} */
@@ -2900,7 +2898,7 @@ SPL_METHOD(CachingIterator, offsetExists)
return;
}
- RETURN_BOOL(zend_symtable_exists(HASH_OF(&intern->u.caching.zcache), key));
+ RETURN_BOOL(zend_symtable_exists(Z_ARRVAL(intern->u.caching.zcache), key));
}
/* }}} */
@@ -2909,7 +2907,6 @@ SPL_METHOD(CachingIterator, offsetExists)
SPL_METHOD(CachingIterator, getCache)
{
spl_dual_it_object *intern;
- zval *value;
if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -2922,9 +2919,7 @@ SPL_METHOD(CachingIterator, getCache)
return;
}
- value = &intern->u.caching.zcache;
- ZVAL_DEREF(value);
- ZVAL_COPY(return_value, value);
+ ZVAL_COPY(return_value, &intern->u.caching.zcache);
}
/* }}} */
@@ -2971,7 +2966,7 @@ SPL_METHOD(CachingIterator, setFlags)
}
if ((flags & CIT_FULL_CACHE) != 0 && (intern->u.caching.flags & CIT_FULL_CACHE) == 0) {
/* clear on (re)enable */
- zend_hash_clean(HASH_OF(&intern->u.caching.zcache));
+ zend_hash_clean(Z_ARRVAL(intern->u.caching.zcache));
}
intern->u.caching.flags = (intern->u.caching.flags & ~CIT_PUBLIC) | (flags & CIT_PUBLIC);
}
@@ -2994,7 +2989,7 @@ SPL_METHOD(CachingIterator, count)
return;
}
- RETURN_LONG(zend_hash_num_elements(HASH_OF(&intern->u.caching.zcache)));
+ RETURN_LONG(zend_hash_num_elements(Z_ARRVAL(intern->u.caching.zcache)));
}
/* }}} */
diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h
index 7f43af72c8..f128015111 100644
--- a/ext/spl/spl_iterators.h
+++ b/ext/spl/spl_iterators.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 5ad1c5d12f..223e252e63 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -90,7 +90,7 @@ typedef struct _spl_SplObjectStorage { /* {{{ */
zend_object std;
} spl_SplObjectStorage; /* }}} */
-/* {{{ storage is an assoc aray of [zend_object_value]=>[zval *obj, zval *inf] */
+/* {{{ storage is an assoc aray of [zend_object*]=>[zval *obj, zval *inf] */
typedef struct _spl_SplObjectStorageElement {
zval obj;
zval inf;
@@ -117,70 +117,34 @@ void spl_SplObjectStorage_free_storage(zend_object *object) /* {{{ */
} /* }}} */
-static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zval *this, zval *obj) {
+static int spl_object_storage_get_hash(zend_hash_key *key, spl_SplObjectStorage *intern, zval *this, zval *obj) {
if (intern->fptr_get_hash) {
zval rv;
zend_call_method_with_1_params(this, intern->std.ce, &intern->fptr_get_hash, "getHash", &rv, obj);
if (!Z_ISUNDEF(rv)) {
if (Z_TYPE(rv) == IS_STRING) {
- return Z_STR(rv);
+ key->key = Z_STR(rv);
+ return SUCCESS;
} else {
zend_throw_exception(spl_ce_RuntimeException, "Hash needs to be a string", 0);
zval_ptr_dtor(&rv);
- return NULL;
+ return FAILURE;
}
} else {
- return NULL;
+ return FAILURE;
}
} else {
- zend_string *hash = zend_string_alloc(sizeof(zend_object*), 0);
- memcpy(ZSTR_VAL(hash), (void*)&Z_OBJ_P(obj), sizeof(zend_object*));
- ZSTR_VAL(hash)[ZSTR_LEN(hash)] = '\0';
- return hash;
- /* !!! FIXME
- int hash_len = sizeof(zend_object_value);
-
-#if HAVE_PACKED_OBJECT_VALUE
-
- if (hash_len_ptr) {
- *hash_len_ptr = hash_len;
- }
-
- return (char*)&Z_OBJVAL_P(obj);
-#else
- char *hash = emalloc(hash_len + 1);
-
- zend_object_value zvalue;
- memset(&zvalue, 0, sizeof(zend_object_value));
- zvalue.handle = Z_OBJ_HANDLE_P(obj);
- zvalue.handlers = Z_OBJ_HT_P(obj);
-
- memcpy(hash, (char *)&zvalue, hash_len);
- hash[hash_len] = 0;
-
- if (hash_len_ptr) {
- *hash_len_ptr = hash_len;
- }
-
- return hash;
-#endif
-*/
- return NULL;
+ key->key = NULL;
+ key->h = Z_OBJ_HANDLE_P(obj);
+ return SUCCESS;
}
}
-static void spl_object_storage_free_hash(spl_SplObjectStorage *intern, zend_string *hash) {
- zend_string_release(hash);
-/*
- if (intern->fptr_get_hash) {
- } else {
-#if HAVE_PACKED_OBJECT_VALUE
-#else
- efree(hash);
-#endif
+static void spl_object_storage_free_hash(spl_SplObjectStorage *intern, zend_hash_key *key) {
+ if (key->key) {
+ zend_string_release(key->key);
}
-*/
}
static void spl_object_storage_dtor(zval *element) /* {{{ */
@@ -191,21 +155,24 @@ static void spl_object_storage_dtor(zval *element) /* {{{ */
efree(el);
} /* }}} */
-spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, zend_string *hash) /* {{{ */
+static spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, zend_hash_key *key) /* {{{ */
{
- return (spl_SplObjectStorageElement*)zend_hash_find_ptr(&intern->storage, hash);
+ if (key->key) {
+ return zend_hash_find_ptr(&intern->storage, key->key);
+ } else {
+ return zend_hash_index_find_ptr(&intern->storage, key->h);
+ }
} /* }}} */
spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zval *this, zval *obj, zval *inf) /* {{{ */
{
spl_SplObjectStorageElement *pelement, element;
- zend_string *hash = spl_object_storage_get_hash(intern, this, obj);
-
- if (!hash) {
+ zend_hash_key key;
+ if (spl_object_storage_get_hash(&key, intern, this, obj) == FAILURE) {
return NULL;
}
- pelement = spl_object_storage_get(intern, hash);
+ pelement = spl_object_storage_get(intern, &key);
if (pelement) {
zval_ptr_dtor(&pelement->inf);
@@ -214,7 +181,7 @@ spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *int
} else {
ZVAL_NULL(&pelement->inf);
}
- spl_object_storage_free_hash(intern, hash);
+ spl_object_storage_free_hash(intern, &key);
return pelement;
}
@@ -224,20 +191,28 @@ spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *int
} else {
ZVAL_NULL(&element.inf);
}
- pelement = zend_hash_update_mem(&intern->storage, hash, &element, sizeof(spl_SplObjectStorageElement));
- spl_object_storage_free_hash(intern, hash);
+ if (key.key) {
+ pelement = zend_hash_update_mem(&intern->storage, key.key, &element, sizeof(spl_SplObjectStorageElement));
+ } else {
+ pelement = zend_hash_index_update_mem(&intern->storage, key.h, &element, sizeof(spl_SplObjectStorageElement));
+ }
+ spl_object_storage_free_hash(intern, &key);
return pelement;
} /* }}} */
-int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *obj) /* {{{ */
+static int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, zval *obj) /* {{{ */
{
int ret = FAILURE;
- zend_string *hash = spl_object_storage_get_hash(intern, this, obj);
- if (!hash) {
+ zend_hash_key key;
+ if (spl_object_storage_get_hash(&key, intern, this, obj) == FAILURE) {
return ret;
}
- ret = zend_hash_del(&intern->storage, hash);
- spl_object_storage_free_hash(intern, hash);
+ if (key.key) {
+ ret = zend_hash_del(&intern->storage, key.key);
+ } else {
+ ret = zend_hash_index_del(&intern->storage, key.h);
+ }
+ spl_object_storage_free_hash(intern, &key);
return ret;
} /* }}}*/
@@ -268,11 +243,6 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval
intern->std.handlers = &spl_handler_SplObjectStorage;
- if (orig) {
- spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig);
- spl_object_storage_addall(intern, orig, other);
- }
-
while (parent) {
if (parent == spl_ce_SplObjectStorage) {
if (class_type != spl_ce_SplObjectStorage) {
@@ -287,6 +257,11 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval
parent = parent->parent;
}
+ if (orig) {
+ spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig);
+ spl_object_storage_addall(intern, orig, other);
+ }
+
return &intern->std;
}
/* }}} */
@@ -407,13 +382,17 @@ static zend_object *spl_SplObjectStorage_new(zend_class_entry *class_type)
int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *this, zval *obj) /* {{{ */
{
int found;
- zend_string *hash = spl_object_storage_get_hash(intern, this, obj);
- if (!hash) {
+ zend_hash_key key;
+ if (spl_object_storage_get_hash(&key, intern, this, obj) == FAILURE) {
return 0;
}
- found = zend_hash_exists(&intern->storage, hash);
- spl_object_storage_free_hash(intern, hash);
+ if (key.key) {
+ found = zend_hash_exists(&intern->storage, key.key);
+ } else {
+ found = zend_hash_index_exists(&intern->storage, key.h);
+ }
+ spl_object_storage_free_hash(intern, &key);
return found;
} /* }}} */
@@ -468,19 +447,18 @@ SPL_METHOD(SplObjectStorage, offsetGet)
zval *obj;
spl_SplObjectStorageElement *element;
spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis());
- zend_string *hash;
+ zend_hash_key key;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
return;
}
- hash = spl_object_storage_get_hash(intern, getThis(), obj);
- if (!hash) {
+ if (spl_object_storage_get_hash(&key, intern, getThis(), obj) == FAILURE) {
return;
}
- element = spl_object_storage_get(intern, hash);
- spl_object_storage_free_hash(intern, hash);
+ element = spl_object_storage_get(intern, &key);
+ spl_object_storage_free_hash(intern, &key);
if (!element) {
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Object not found");
@@ -780,7 +758,8 @@ SPL_METHOD(SplObjectStorage, unserialize)
size_t buf_len;
const unsigned char *p, *s;
php_unserialize_data_t var_hash;
- zval entry, pmembers, pcount, inf;
+ zval entry, inf;
+ zval *pcount, *pmembers;
spl_SplObjectStorageElement *element;
zend_long count;
@@ -801,20 +780,17 @@ SPL_METHOD(SplObjectStorage, unserialize)
}
++p;
- if (!php_var_unserialize(&pcount, &p, s + buf_len, &var_hash)) {
- goto outexcept;
- }
- if (Z_TYPE(pcount) != IS_LONG) {
- zval_ptr_dtor(&pcount);
+ pcount = var_tmp_var(&var_hash);
+ if (!php_var_unserialize(pcount, &p, s + buf_len, &var_hash) || Z_TYPE_P(pcount) != IS_LONG) {
goto outexcept;
}
--p; /* for ';' */
- count = Z_LVAL(pcount);
+ count = Z_LVAL_P(pcount);
while (count-- > 0) {
spl_SplObjectStorageElement *pelement;
- zend_string *hash;
+ zend_hash_key key;
if (*p != ';') {
goto outexcept;
@@ -823,7 +799,7 @@ SPL_METHOD(SplObjectStorage, unserialize)
if(*p != 'O' && *p != 'C' && *p != 'r') {
goto outexcept;
}
- /* sore reference to allow cross-references between different elements */
+ /* store reference to allow cross-references between different elements */
if (!php_var_unserialize(&entry, &p, s + buf_len, &var_hash)) {
goto outexcept;
}
@@ -837,16 +813,17 @@ SPL_METHOD(SplObjectStorage, unserialize)
zval_ptr_dtor(&entry);
goto outexcept;
}
+ } else {
+ ZVAL_UNDEF(&inf);
}
- hash = spl_object_storage_get_hash(intern, getThis(), &entry);
- if (!hash) {
+ if (spl_object_storage_get_hash(&key, intern, getThis(), &entry) == FAILURE) {
zval_ptr_dtor(&entry);
zval_ptr_dtor(&inf);
goto outexcept;
}
- pelement = spl_object_storage_get(intern, hash);
- spl_object_storage_free_hash(intern, hash);
+ pelement = spl_object_storage_get(intern, &key);
+ spl_object_storage_free_hash(intern, &key);
if (pelement) {
if (!Z_ISUNDEF(pelement->inf)) {
var_push_dtor(&var_hash, &pelement->inf);
@@ -855,11 +832,13 @@ SPL_METHOD(SplObjectStorage, unserialize)
var_push_dtor(&var_hash, &pelement->obj);
}
}
- element = spl_object_storage_attach(intern, getThis(), &entry, &inf);
+ element = spl_object_storage_attach(intern, getThis(), &entry, Z_ISUNDEF(inf)?NULL:&inf);
var_replace(&var_hash, &entry, &element->obj);
var_replace(&var_hash, &inf, &element->inf);
zval_ptr_dtor(&entry);
+ ZVAL_UNDEF(&entry);
zval_ptr_dtor(&inf);
+ ZVAL_UNDEF(&inf);
}
if (*p != ';') {
@@ -873,18 +852,13 @@ SPL_METHOD(SplObjectStorage, unserialize)
}
++p;
- ZVAL_UNDEF(&pmembers);
- if (!php_var_unserialize(&pmembers, &p, s + buf_len, &var_hash) || Z_TYPE(pmembers) != IS_ARRAY) {
- zval_ptr_dtor(&pmembers);
+ pmembers = var_tmp_var(&var_hash);
+ if (!php_var_unserialize(pmembers, &p, s + buf_len, &var_hash) || Z_TYPE_P(pmembers) != IS_ARRAY) {
goto outexcept;
}
/* copy members */
- if (!intern->std.properties) {
- rebuild_object_properties(&intern->std);
- }
- zend_hash_copy(intern->std.properties, Z_ARRVAL(pmembers), (copy_ctor_func_t) zval_add_ref);
- zval_ptr_dtor(&pmembers);
+ object_properties_load(&intern->std, Z_ARRVAL_P(pmembers));
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
return;
@@ -1182,7 +1156,7 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_
add_index_zval(return_value, Z_LVAL(element->inf), &retval);
break;
case IS_STRING:
- zend_hash_update(Z_ARRVAL_P(return_value), Z_STR(element->inf), &retval);
+ zend_symtable_update(Z_ARRVAL_P(return_value), Z_STR(element->inf), &retval);
break;
default:
zval_ptr_dtor(&retval);
diff --git a/ext/spl/spl_observer.h b/ext/spl/spl_observer.h
index 888b216af0..c5c705b2b7 100644
--- a/ext/spl/spl_observer.h
+++ b/ext/spl/spl_observer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/spl/tests/ArrayObject_clone_other_std_props.phpt b/ext/spl/tests/ArrayObject_clone_other_std_props.phpt
new file mode 100644
index 0000000000..688954c3d7
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_clone_other_std_props.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Clone ArrayObject using other with STD_PROP_LIST
+--FILE--
+<?php
+
+$a = new ArrayObject([1, 2, 3], ArrayObject::STD_PROP_LIST);
+$b = new ArrayObject($a);
+$c = clone $b;
+var_dump($c);
+
+?>
+--EXPECT--
+object(ArrayObject)#3 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
diff --git a/ext/spl/tests/ArrayObject_dump_during_sort.phpt b/ext/spl/tests/ArrayObject_dump_during_sort.phpt
new file mode 100644
index 0000000000..0fb128b655
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_dump_during_sort.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Dumping an ArrayObject while it is being sorted
+--FILE--
+<?php
+
+$ao = new ArrayObject([1, 2, 3]);
+$i = 0;
+$ao->uasort(function($a, $b) use ($ao, &$i) {
+ if ($i++ == 0) {
+ var_dump($ao);
+ }
+ return $a <=> $b;
+});
+
+?>
+--EXPECT--
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
diff --git a/ext/spl/tests/ArrayObject_exchange_array_during_sorting.phpt b/ext/spl/tests/ArrayObject_exchange_array_during_sorting.phpt
new file mode 100644
index 0000000000..225d42c1ed
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_exchange_array_during_sorting.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Can't use exchangeArray() while ArrayObject is being sorted
+--FILE--
+<?php
+
+$ao = new ArrayObject([1, 2, 3]);
+$i = 0;
+$ao->uasort(function($a, $b) use ($ao, &$i) {
+ if ($i++ == 0) {
+ $ao->exchangeArray([4, 5, 6]);
+ var_dump($ao);
+ }
+ return $a <=> $b;
+});
+
+?>
+--EXPECTF--
+Warning: Modification of ArrayObject during sorting is prohibited in %s on line %d
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
diff --git a/ext/spl/tests/ArrayObject_illegal_offset_leak.phpt b/ext/spl/tests/ArrayObject_illegal_offset_leak.phpt
new file mode 100644
index 0000000000..42c649db9f
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_illegal_offset_leak.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Assignments to illegal ArrayObject offsets shouldn't leak
+--FILE--
+<?php
+
+$ao = new ArrayObject([1, 2, 3]);
+$ao[[]] = new stdClass;
+
+?>
+--EXPECTF--
+Warning: Illegal offset type in %s on line %d
diff --git a/ext/spl/tests/ArrayObject_modify_shared_object_properties.phpt b/ext/spl/tests/ArrayObject_modify_shared_object_properties.phpt
new file mode 100644
index 0000000000..24c247cabd
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_modify_shared_object_properties.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Modifications to ArrayObjects should not affect shared properties tables
+--FILE--
+<?php
+
+$obj = (object)['a' => 1, 'b' => 2];
+$ao = new ArrayObject($obj);
+$arr = (array) $obj;
+$ao['a'] = 42;
+var_dump($arr);
+
+?>
+--EXPECT--
+array(2) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+}
diff --git a/ext/spl/tests/ArrayObject_overloaded_object_incompatible.phpt b/ext/spl/tests/ArrayObject_overloaded_object_incompatible.phpt
new file mode 100644
index 0000000000..8c1121b8d0
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_overloaded_object_incompatible.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Objects with overloaded get_properties are incompatible with ArrayObject
+--FILE--
+<?php
+
+$ao = new ArrayObject([1, 2, 3]);
+try {
+ $ao->exchangeArray(new SplFixedArray);
+} catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+var_dump($ao);
+
+?>
+--EXPECT--
+Overloaded object of type SplFixedArray is not compatible with ArrayObject
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+}
diff --git a/ext/spl/tests/ArrayObject_sort_different_backing_storage.phpt b/ext/spl/tests/ArrayObject_sort_different_backing_storage.phpt
new file mode 100644
index 0000000000..0b9bbd6330
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_sort_different_backing_storage.phpt
@@ -0,0 +1,72 @@
+--TEST--
+Test sorting of various ArrayObject backing storage
+--FILE--
+<?php
+
+$obj = (object)['a' => 2, 'b' => 1];
+$ao = new ArrayObject($obj);
+$ao->uasort(function($a, $b) { return $a <=> $b; });
+var_dump($ao);
+
+$ao2 = new ArrayObject($ao);
+$ao2->uasort(function($a, $b) { return $b <=> $a; });
+var_dump($ao2);
+
+$ao3 = new ArrayObject();
+$ao3->exchangeArray($ao3);
+$ao3->a = 2;
+$ao3->b = 1;
+$ao3->uasort(function($a, $b) { return $a <=> $b; });
+var_dump($ao3);
+
+$ao4 = new ArrayObject([]);
+$ao4->uasort(function($a, $b) { return $a <=> $b; });
+var_dump($ao4);
+
+$ao5 = new ArrayObject(['a' => 2, 'b' => 1]);
+$ao5->uasort(function($a, $b) { return $a <=> $b; });
+var_dump($ao5);
+
+?>
+--EXPECT--
+object(ArrayObject)#2 (1) {
+ ["storage":"ArrayObject":private]=>
+ object(stdClass)#1 (2) {
+ ["b"]=>
+ int(1)
+ ["a"]=>
+ int(2)
+ }
+}
+object(ArrayObject)#3 (1) {
+ ["storage":"ArrayObject":private]=>
+ object(ArrayObject)#2 (1) {
+ ["storage":"ArrayObject":private]=>
+ object(stdClass)#1 (2) {
+ ["a"]=>
+ int(2)
+ ["b"]=>
+ int(1)
+ }
+ }
+}
+object(ArrayObject)#4 (2) {
+ ["b"]=>
+ int(1)
+ ["a"]=>
+ int(2)
+}
+object(ArrayObject)#5 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(0) {
+ }
+}
+object(ArrayObject)#6 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(2) {
+ ["b"]=>
+ int(1)
+ ["a"]=>
+ int(2)
+ }
+}
diff --git a/ext/spl/tests/ArrayObject_std_props_no_recursion.phpt b/ext/spl/tests/ArrayObject_std_props_no_recursion.phpt
new file mode 100644
index 0000000000..193e972530
--- /dev/null
+++ b/ext/spl/tests/ArrayObject_std_props_no_recursion.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Don't recurse into USE_OTHER when checking for STD_PROP_LIST
+--FILE--
+<?php
+
+$a = new ArrayObject([1, 2, 3], ArrayObject::STD_PROP_LIST);
+$a->prop = 'a';
+$b = new ArrayObject($a, 0);
+$b->prop = 'b';
+var_dump((array) $b);
+$c = new ArrayObject($a);
+$c->prop = 'c';
+var_dump((array) $c);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(1) {
+ ["prop"]=>
+ string(1) "c"
+}
diff --git a/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt b/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt
index 8f0676de3b..a5678eab40 100644
--- a/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt
+++ b/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt
@@ -44,5 +44,5 @@ object(SplObjectStorage)#2 (1) {
}
}
}
-Error at offset 79 of 78 bytes
+Error at offset 78 of 78 bytes
DONE
diff --git a/ext/spl/tests/arrayObject___construct_basic7.phpt b/ext/spl/tests/arrayObject___construct_basic7.phpt
new file mode 100644
index 0000000000..2474b38ce6
--- /dev/null
+++ b/ext/spl/tests/arrayObject___construct_basic7.phpt
@@ -0,0 +1,34 @@
+--TEST--
+SPL: ArrayObject::__construct: Using object with shared properties
+--FILE--
+<?php
+$y = 2;
+$x = 1;
+$a = array($y, $x);
+$o = (object)$a;
+$ao = new ArrayObject($o);
+$ao->asort();
+var_dump($a, $o, $ao);
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(1)
+}
+object(stdClass)#1 (2) {
+ [1]=>
+ int(1)
+ [0]=>
+ int(2)
+}
+object(ArrayObject)#2 (1) {
+ ["storage":"ArrayObject":private]=>
+ object(stdClass)#1 (2) {
+ [1]=>
+ int(1)
+ [0]=>
+ int(2)
+ }
+}
diff --git a/ext/spl/tests/bug38325.phpt b/ext/spl/tests/bug38325.phpt
index 376a6e8053..1911fc8eaf 100644
--- a/ext/spl/tests/bug38325.phpt
+++ b/ext/spl/tests/bug38325.phpt
@@ -6,8 +6,7 @@ spl_autoload_register();
new ThisClassDoesNotExistEverFoo();
?>
--EXPECTF--
-Fatal error: Uncaught Error: Class ThisClassDoesNotExistEverFoo could not be loaded in %s:%d
+Fatal error: Uncaught Error: Class 'ThisClassDoesNotExistEverFoo' not found in %s:%d
Stack trace:
-#0 %s(%d): spl_autoload('ThisClassDoesNo...')
-#1 {main}
- thrown in %s on line %d
+#0 {main}
+ thrown in %s on line 3
diff --git a/ext/spl/tests/bug52339.phpt b/ext/spl/tests/bug52339.phpt
new file mode 100644
index 0000000000..2e24898fa9
--- /dev/null
+++ b/ext/spl/tests/bug52339.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #52339: SPL autoloader breaks class_exists()
+--FILE--
+<?php
+var_dump(class_exists('asdfasdf'));
+spl_autoload_register();
+var_dump(class_exists('asdfasdf'));
+?>
+--EXPECT--
+bool(false)
+bool(false)
diff --git a/ext/spl/tests/bug62059.phpt b/ext/spl/tests/bug62059.phpt
new file mode 100644
index 0000000000..241dc5a8c1
--- /dev/null
+++ b/ext/spl/tests/bug62059.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Bug #62059: ArrayObject and isset are not friends
+--FILE--
+<?php
+
+class MyArrayObject1 extends ArrayObject {
+ public function offsetGet($name) {
+ echo "offsetGet($name)\n";
+ return parent::offsetGet($name);
+ }
+ public function offsetExists($name) {
+ echo "offsetExists($name)\n";
+ return parent::offsetExists($name);
+ }
+}
+class MyArrayObject2 extends ArrayObject {
+ public function offsetGet($name) {
+ echo "offsetGet($name)\n";
+ return parent::offsetGet($name);
+ }
+}
+class MyArrayObject3 extends ArrayObject {
+ public function offsetExists($name) {
+ echo "offsetExists($name)\n";
+ return parent::offsetExists($name);
+ }
+}
+
+$arr = [1 => [1 => 42]];
+$ao = new ArrayObject($arr);
+var_dump(isset($ao[0][1]));
+var_dump(isset($ao[1][0]));
+var_dump(isset($ao[1][1]));
+$ao = new MyArrayObject1($arr);
+var_dump(isset($ao[0][1]));
+var_dump(isset($ao[1][0]));
+var_dump(isset($ao[1][1]));
+$ao = new MyArrayObject2($arr);
+var_dump(isset($ao[0][1]));
+var_dump(isset($ao[1][0]));
+var_dump(isset($ao[1][1]));
+$ao = new MyArrayObject3($arr);
+var_dump(isset($ao[0][1]));
+var_dump(isset($ao[1][0]));
+var_dump(isset($ao[1][1]));
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(true)
+offsetExists(0)
+bool(false)
+offsetExists(1)
+offsetGet(1)
+bool(false)
+offsetExists(1)
+offsetGet(1)
+bool(true)
+bool(false)
+offsetGet(1)
+bool(false)
+offsetGet(1)
+bool(true)
+offsetExists(0)
+bool(false)
+offsetExists(1)
+bool(false)
+offsetExists(1)
+bool(true)
diff --git a/ext/spl/tests/bug67582.phpt b/ext/spl/tests/bug67582.phpt
new file mode 100644
index 0000000000..b22f615034
--- /dev/null
+++ b/ext/spl/tests/bug67582.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #67582: Cloned SplObjectStorage with overwritten getHash fails offsetExists()
+--FILE--
+<?php
+
+class MyObjectStorage extends SplObjectStorage {
+ // Overwrite getHash() with just some (working) test-method
+ public function getHash($object) { return get_class($object); }
+}
+
+class TestObject {}
+
+$list = new MyObjectStorage();
+$list->attach(new TestObject());
+
+foreach($list as $x) var_dump($list->offsetExists($x));
+
+$list2 = clone $list;
+foreach($list2 as $x) var_dump($list2->offsetExists($x));
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
diff --git a/ext/spl/tests/bug69970.phpt b/ext/spl/tests/bug69970.phpt
new file mode 100644
index 0000000000..a488037b8c
--- /dev/null
+++ b/ext/spl/tests/bug69970.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Bug #69970 (Use-after-free vulnerability in spl_recursive_it_move_forward_ex())
+--FILE--
+<?php
+
+$count = 10;
+
+class RecursiveArrayIteratorIterator extends RecursiveIteratorIterator {
+ function rewind() {
+ echo "dummy\n";
+ }
+ function endChildren() {
+ global $count;
+ echo $this->getDepth();
+ if (--$count > 0) {
+ // Trigger use-after-free
+ parent::rewind();
+ }
+ }
+}
+$arr = array("a", array("ba", array("bba", "bbb")));
+$obj = new RecursiveArrayIterator($arr);
+$rit = new RecursiveArrayIteratorIterator($obj);
+
+foreach ($rit as $k => $v) {
+ echo ($rit->getDepth()) . "$k=>$v\n";
+}
+?>
+--EXPECT--
+dummy
+00=>a
+00=>a
+10=>ba
+20=>bba
+21=>bbb
+21010=>ba
+20=>bba
+21=>bbb
+21010=>ba
+20=>bba
+21=>bbb
+21010=>ba
+20=>bba
+21=>bbb
+21
diff --git a/ext/spl/tests/bug70053.phpt b/ext/spl/tests/bug70053.phpt
new file mode 100644
index 0000000000..2cab083c37
--- /dev/null
+++ b/ext/spl/tests/bug70053.phpt
@@ -0,0 +1,21 @@
+--TEST--
+SPL: ArrayObject
+--FILE--
+<?php
+
+echo "-- Two empty iterators attached with infos that are different but same array key --\n";
+$mit = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC);
+$mit ->attachIterator(new EmptyIterator(), "2");
+$mit ->attachIterator(new EmptyIterator(), 2);
+var_dump($mit->countIterators());
+$mit->rewind();
+var_dump($mit->current());
+
+?>
+--EXPECT--
+-- Two empty iterators attached with infos that are different but same array key --
+int(2)
+array(1) {
+ [2]=>
+ NULL
+}
diff --git a/ext/spl/tests/bug70068.phpt b/ext/spl/tests/bug70068.phpt
new file mode 100644
index 0000000000..92a38dfbd6
--- /dev/null
+++ b/ext/spl/tests/bug70068.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
+--FILE--
+<?php
+$a = unserialize('a:3:{i:0;C:11:"ArrayObject":20:{x:i:0;r:3;;m:a:0:{};}i:1;d:11;i:2;S:31:"AAAAAAAABBBBCCCC\01\00\00\00\04\00\00\00\00\00\00\00\00\00\00";}');
+?>
+OK
+--EXPECT--
+OK \ No newline at end of file
diff --git a/ext/spl/tests/bug70155.phpt b/ext/spl/tests/bug70155.phpt
new file mode 100644
index 0000000000..1730a1a587
--- /dev/null
+++ b/ext/spl/tests/bug70155.phpt
@@ -0,0 +1,50 @@
+--TEST--
+SPL: Bug #70155 Use After Free Vulnerability in unserialize() with SPLArrayObject
+--FILE--
+<?php
+$inner = 'x:i:0;O:12:"DateInterval":1:{s:1:"y";i:3;};m:a:1:{i:0;R:2;}';
+$exploit = 'C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}';
+$data = unserialize($exploit);
+
+var_dump($data);
+?>
+===DONE===
+--EXPECTF--
+object(ArrayObject)#1 (2) {
+ [0]=>
+ int(0)
+ ["storage":"ArrayObject":private]=>
+ object(DateInterval)#2 (15) {
+ ["y"]=>
+ int(3)
+ ["m"]=>
+ int(-1)
+ ["d"]=>
+ int(-1)
+ ["h"]=>
+ int(-1)
+ ["i"]=>
+ int(-1)
+ ["s"]=>
+ int(-1)
+ ["weekday"]=>
+ int(-1)
+ ["weekday_behavior"]=>
+ int(-1)
+ ["first_last_day_of"]=>
+ int(-1)
+ ["invert"]=>
+ int(0)
+ ["days"]=>
+ int(-1)
+ ["special_type"]=>
+ int(0)
+ ["special_amount"]=>
+ int(-1)
+ ["have_weekday_relative"]=>
+ int(0)
+ ["have_special_relative"]=>
+ int(0)
+ }
+}
+===DONE===
diff --git a/ext/spl/tests/bug70166.phpt b/ext/spl/tests/bug70166.phpt
new file mode 100644
index 0000000000..51a35965a5
--- /dev/null
+++ b/ext/spl/tests/bug70166.phpt
@@ -0,0 +1,29 @@
+--TEST--
+SPL: Bug #70166 Use After Free Vulnerability in unserialize() with SPLArrayObject
+--FILE--
+<?php
+$inner = 'x:i:1;a:0:{};m:a:0:{}';
+$exploit = 'a:2:{i:0;C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}i:1;R:5;}';
+
+$data = unserialize($exploit);
+
+for($i = 0; $i < 5; $i++) {
+ $v[$i] = 'hi'.$i;
+}
+
+var_dump($data);
+?>
+===DONE===
+--EXPECTF--
+array(2) {
+ [0]=>
+ object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ array(0) {
+ }
+ }
+ [1]=>
+ array(0) {
+ }
+}
+===DONE===
diff --git a/ext/spl/tests/bug70168.phpt b/ext/spl/tests/bug70168.phpt
new file mode 100644
index 0000000000..e1f7e9f820
--- /dev/null
+++ b/ext/spl/tests/bug70168.phpt
@@ -0,0 +1,36 @@
+--TEST--
+SPL: Bug #70168 Use After Free Vulnerability in unserialize() with SplObjectStorage
+--FILE--
+<?php
+$inner = 'x:i:1;O:8:"stdClass":0:{};m:a:0:{}';
+$exploit = 'a:2:{i:0;C:16:"SplObjectStorage":'.strlen($inner).':{'.$inner.'}i:1;R:3;}';
+
+$data = unserialize($exploit);
+
+for($i = 0; $i < 5; $i++) {
+ $v[$i] = 'hi'.$i;
+}
+
+var_dump($data);
+?>
+===DONE===
+--EXPECTF--
+array(2) {
+ [0]=>
+ object(SplObjectStorage)#%d (1) {
+ ["storage":"SplObjectStorage":private]=>
+ array(1) {
+ ["%s"]=>
+ array(2) {
+ ["obj"]=>
+ object(stdClass)#2 (0) {
+ }
+ ["inf"]=>
+ NULL
+ }
+ }
+ }
+ [1]=>
+ int(1)
+}
+===DONE===
diff --git a/ext/spl/tests/bug70169.phpt b/ext/spl/tests/bug70169.phpt
new file mode 100644
index 0000000000..9d814be5fa
--- /dev/null
+++ b/ext/spl/tests/bug70169.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SPL: Bug #70169 Use After Free Vulnerability in unserialize() with SplDoublyLinkedList
+--FILE--
+<?php
+$inner = 'i:1;';
+$exploit = 'a:2:{i:0;C:19:"SplDoublyLinkedList":'.strlen($inner).':{'.$inner.'}i:1;R:3;}';
+
+$data = unserialize($exploit);
+
+for($i = 0; $i < 5; $i++) {
+ $v[$i] = 'hi'.$i;
+}
+
+var_dump($data);
+?>
+===DONE===
+--EXPECTF--
+array(2) {
+ [0]=>
+ object(SplDoublyLinkedList)#%d (2) {
+ ["flags":"SplDoublyLinkedList":private]=>
+ int(1)
+ ["dllist":"SplDoublyLinkedList":private]=>
+ array(0) {
+ }
+ }
+ [1]=>
+ int(1)
+}
+===DONE===
diff --git a/ext/spl/tests/bug70303.phpt b/ext/spl/tests/bug70303.phpt
new file mode 100644
index 0000000000..059c370058
--- /dev/null
+++ b/ext/spl/tests/bug70303.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #70303 (Incorrect constructor reflection for ArrayObject)
+--FILE--
+<?php
+$f = new ReflectionClass('ArrayObject');
+$c = $f->getConstructor();
+$params = $c->getParameters();
+$param = $params[0];
+var_dump($param->isOptional());
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/spl/tests/bug70365.phpt b/ext/spl/tests/bug70365.phpt
new file mode 100644
index 0000000000..c18110e3ca
--- /dev/null
+++ b/ext/spl/tests/bug70365.phpt
@@ -0,0 +1,50 @@
+--TEST--
+SPL: Bug #70365 use-after-free vulnerability in unserialize() with SplObjectStorage
+--FILE--
+<?php
+class obj {
+ var $ryat;
+ function __wakeup() {
+ $this->ryat = 1;
+ }
+}
+
+$fakezval = ptr2str(1122334455);
+$fakezval .= ptr2str(0);
+$fakezval .= "\x00\x00\x00\x00";
+$fakezval .= "\x01";
+$fakezval .= "\x00";
+$fakezval .= "\x00\x00";
+
+$inner = 'x:i:1;O:8:"stdClass":0:{},i:1;;m:a:0:{}';
+$exploit = 'a:5:{i:0;i:1;i:1;C:16:"SplObjectStorage":'.strlen($inner).':{'.$inner.'}i:2;O:3:"obj":1:{s:4:"ryat";R:3;}i:3;R:6;i:4;s:'.strlen($fakezval).':"'.$fakezval.'";}';
+
+$data = unserialize($exploit);
+
+var_dump($data);
+
+function ptr2str($ptr)
+{
+ $out = '';
+ for ($i = 0; $i < 8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+ return $out;
+}
+--EXPECTF--
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ object(obj)#%d (1) {
+ ["ryat"]=>
+ &int(1)
+ }
+ [3]=>
+ int(1)
+ [4]=>
+ string(24) "%s"
+}
diff --git a/ext/spl/tests/bug70366.phpt b/ext/spl/tests/bug70366.phpt
new file mode 100644
index 0000000000..c9aa584ae2
--- /dev/null
+++ b/ext/spl/tests/bug70366.phpt
@@ -0,0 +1,54 @@
+--TEST--
+SPL: Bug #70366 use-after-free vulnerability in unserialize() with SplDoublyLinkedList
+--FILE--
+<?php
+class obj {
+ var $ryat;
+ function __wakeup() {
+ $this->ryat = 1;
+ }
+}
+
+$fakezval = ptr2str(1122334455);
+$fakezval .= ptr2str(0);
+$fakezval .= "\x00\x00\x00\x00";
+$fakezval .= "\x01";
+$fakezval .= "\x00";
+$fakezval .= "\x00\x00";
+
+$inner = 'i:1234;:i:1;';
+$exploit = 'a:5:{i:0;i:1;i:1;C:19:"SplDoublyLinkedList":'.strlen($inner).':{'.$inner.'}i:2;O:3:"obj":1:{s:4:"ryat";R:3;}i:3;a:1:{i:0;R:5;}i:4;s:'.strlen($fakezval).':"'.$fakezval.'";}';
+
+$data = unserialize($exploit);
+
+var_dump($data);
+
+function ptr2str($ptr)
+{
+ $out = '';
+ for ($i = 0; $i < 8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+ return $out;
+}
+?>
+--EXPECTF--
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ &int(1)
+ [2]=>
+ object(obj)#%d (1) {
+ ["ryat"]=>
+ &int(1)
+ }
+ [3]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ [4]=>
+ string(24) "%s"
+} \ No newline at end of file
diff --git a/ext/spl/tests/bug70561.phpt b/ext/spl/tests/bug70561.phpt
new file mode 100644
index 0000000000..c6c229ad89
--- /dev/null
+++ b/ext/spl/tests/bug70561.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #70561 (DirectoryIterator::seek should throw OutOfBoundsException)
+--FILE--
+<?php
+$di = new DirectoryIterator(__DIR__ . '/..');
+
+$cnt = 0;
+$di->rewind();
+while ($di->valid()) {
+ $cnt++;
+ $di->next();
+}
+
+try {
+ $di->seek($cnt+1);
+} catch (OutOfBoundsException $ex) {
+ echo $ex->getMessage() . PHP_EOL;
+}
+echo "Is valid? " . (int) $di->valid() . PHP_EOL;
+?>
+--EXPECTF--
+Seek position %d is out of range
+Is valid? 0
diff --git a/ext/spl/tests/bug70573.phpt b/ext/spl/tests/bug70573.phpt
new file mode 100644
index 0000000000..b93e48876d
--- /dev/null
+++ b/ext/spl/tests/bug70573.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70573 (Cloning SplPriorityQueue leads to memory leaks)
+--FILE--
+<?php
+$q1 = new SplPriorityQueue();
+$a = 1;
+$q1->insert([$a], 1);
+$q1->insert([$a], 2);
+$q2 = clone $q1;
+echo "ok\n";
+?>
+--EXPECT--
+ok
+
+
diff --git a/ext/spl/tests/bug70730.phpt b/ext/spl/tests/bug70730.phpt
new file mode 100644
index 0000000000..5710c9586d
--- /dev/null
+++ b/ext/spl/tests/bug70730.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Bug #70730 (Incorrect ArrayObject serialization if unset is called in serialize())
+--FILE--
+<?php
+class A extends \ArrayObject
+{
+ protected $foo;
+
+ public function __construct()
+ {
+ $this->foo = 'bar';
+ }
+
+ public function serialize()
+ {
+ unset($this->foo);
+ $result = parent::serialize();
+ $this->foo = 'bar';
+ return $result;
+ }
+}
+
+$a = new A();
+$a->append('item1');
+$a->append('item2');
+$a->append('item3');
+$b = new A();
+$b->unserialize($a->serialize());
+var_dump($b);
+?>
+--EXPECTF--
+object(A)#%d (2) {
+ ["foo":protected]=>
+ string(3) "bar"
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ string(5) "item1"
+ [1]=>
+ string(5) "item2"
+ [2]=>
+ string(5) "item3"
+ }
+}
diff --git a/ext/spl/tests/bug70852.phpt b/ext/spl/tests/bug70852.phpt
new file mode 100644
index 0000000000..2b23ce4e09
--- /dev/null
+++ b/ext/spl/tests/bug70852.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #70852 Segfault getting NULL offset of an ArrayObject
+--FILE--
+<?php
+$y = new ArrayObject();
+
+var_dump($y[NULL]);
+var_dump($y[NULL]++);
+?>
+===DONE===
+--EXPECTF--
+Notice: Undefined index: in %s on line %d
+NULL
+
+Notice: Undefined index: in %s on line %d
+NULL
+===DONE===
diff --git a/ext/spl/tests/bug70853.phpt b/ext/spl/tests/bug70853.phpt
new file mode 100644
index 0000000000..99530ece40
--- /dev/null
+++ b/ext/spl/tests/bug70853.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #70853 (SplFixedArray throws exception when using ref variable as index)
+--FILE--
+<?php
+
+$list = new SplFixedArray(10);
+$ndx = 1;
+$ndx2 =& $ndx;
+$list[$ndx] = 123; // This throws an exception;
+$list[$ndx2] = 123; // as does this, to.
+echo 'ok';
+
+?>
+--EXPECT--
+ok
diff --git a/ext/spl/tests/bug70868.phpt b/ext/spl/tests/bug70868.phpt
new file mode 100644
index 0000000000..d3dd76354a
--- /dev/null
+++ b/ext/spl/tests/bug70868.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #70868, with PCRE JIT
+--INI--
+pcre.jit=1
+--SKIPIF--
+<?php if (!extension_loaded("pcre")) die("skip"); ?>
+--FILE--
+<?php
+
+namespace X;
+
+$iterator =
+ new \RegexIterator(
+ new \ArrayIterator(['A.phpt', 'B.phpt', 'C.phpt']),
+ '/\.phpt$/'
+ )
+;
+
+foreach ($iterator as $foo) {
+ var_dump($foo);
+ preg_replace('/\.phpt$/', '', '');
+}
+
+echo "Done", PHP_EOL;
+
+?>
+--EXPECTF--
+
+string(6) "A.phpt"
+string(6) "B.phpt"
+string(6) "C.phpt"
+Done
diff --git a/ext/spl/tests/bug70959.phpt b/ext/spl/tests/bug70959.phpt
new file mode 100644
index 0000000000..3fd500736d
--- /dev/null
+++ b/ext/spl/tests/bug70959.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #70959 (ArrayObject unserialize does not restore protected fields)
+--FILE--
+<?php
+class testObject extends ArrayObject {
+ protected $test;
+
+ public function getTest() {
+ return $this->test;
+ }
+
+ public function setTest($test) {
+ $this->test = $test;
+ }
+}
+
+$obj = new testObject();
+$obj->setTest('test');
+var_dump($obj->getTest());
+$obj2 = unserialize(serialize($obj));
+var_dump($obj2->getTest());
+--EXPECTF--
+string(4) "test"
+string(4) "test"
diff --git a/ext/spl/tests/bug71028.phpt b/ext/spl/tests/bug71028.phpt
new file mode 100644
index 0000000000..b8f0cc962f
--- /dev/null
+++ b/ext/spl/tests/bug71028.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #71028 (Undefined index with ArrayIterator)
+--FILE--
+<?php
+function cast(&$a) {
+ $a = (int)$a;
+}
+
+$a = new ArrayIterator;
+$a[-1] = 123;
+
+$b = "-1";
+cast($b);
+
+var_dump(isset($a[$b]));
+$a[$b] = "okey";
+var_dump($a[$b]);
+unset($a[$b]);
+var_dump(isset($a[$b]));
+?>
+--EXPECT--
+bool(true)
+string(4) "okey"
+bool(false)
diff --git a/ext/spl/tests/bug71153.phpt b/ext/spl/tests/bug71153.phpt
new file mode 100644
index 0000000000..bdd940cbee
--- /dev/null
+++ b/ext/spl/tests/bug71153.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71153: Performance Degradation in ArrayIterator with large arrays
+--FILE--
+<?php
+
+$n = 200000;
+
+for ($i = 0; $i < $n; ++$i) {
+ foreach (new ArrayIterator([]) as $v) {}
+}
+
+echo "done\n";
+
+?>
+--EXPECT--
+done
diff --git a/ext/spl/tests/bug71202.phpt b/ext/spl/tests/bug71202.phpt
new file mode 100644
index 0000000000..d26d7e1f35
--- /dev/null
+++ b/ext/spl/tests/bug71202.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #71202 (Autoload function registered by another not activated immediately)
+--FILE--
+<?php
+
+function inner_autoload ($name){
+ if ($name == 'A') {
+ class A {
+ function __construct(){
+ echo "okey, ";
+ }
+ }
+ } else {
+ class B {
+ function __construct() {
+ die("error");
+ }
+ }
+ }
+}
+
+spl_autoload_register(function ($name) {
+ if ($name == 'A') {
+ spl_autoload_register("inner_autoload");
+ } else {
+ spl_autoload_unregister("inner_autoload");
+ }
+});
+
+$c = new A();
+try {
+ $c = new B();
+} catch (Error $e) {
+ echo "done";
+}
+?>
+--EXPECT--
+okey, done
diff --git a/ext/spl/tests/bug71204.phpt b/ext/spl/tests/bug71204.phpt
new file mode 100644
index 0000000000..64fa13bfb1
--- /dev/null
+++ b/ext/spl/tests/bug71204.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #71204 (segfault if clean spl_autoload_funcs while autoloading )
+--FILE--
+<?php
+
+spl_autoload_register(function ($name) {
+ spl_autoload_unregister("spl_autoload_call");
+});
+
+spl_autoload_register(function ($name) {
+});
+
+new A();
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Class 'A' not found in %sbug71204.php:%d
+Stack trace:
+#0 {main}
+ thrown in %sbug71204.php on line %d
diff --git a/ext/spl/tests/bug71617.phpt b/ext/spl/tests/bug71617.phpt
new file mode 100644
index 0000000000..412f83f541
--- /dev/null
+++ b/ext/spl/tests/bug71617.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #71617: private properties lost when unserializing ArrayObject
+--FILE--
+<?php
+
+class Test extends ArrayObject
+{
+
+ private $name = null;
+
+ public function __construct(array $input)
+ {
+ parent::__construct($input, ArrayObject::ARRAY_AS_PROPS);
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ return $this;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+}
+
+$test = new Test(['a' => 'a', 'b' => 'b']);
+$test->setName('ok');
+
+$ser = serialize($test);
+$unSer = unserialize($ser);
+
+var_dump($unSer->getName());
+var_dump($unSer);
+
+?>
+--EXPECT--
+string(2) "ok"
+object(Test)#2 (2) {
+ ["name":"Test":private]=>
+ string(2) "ok"
+ ["storage":"ArrayObject":private]=>
+ array(2) {
+ ["a"]=>
+ string(1) "a"
+ ["b"]=>
+ string(1) "b"
+ }
+}
diff --git a/ext/spl/tests/bug71735.phpt b/ext/spl/tests/bug71735.phpt
new file mode 100644
index 0000000000..92568028c4
--- /dev/null
+++ b/ext/spl/tests/bug71735.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #71735 (Double-free in SplDoublyLinkedList::offsetSet)
+--FILE--
+<?php
+try {
+$var_1=new SplStack();
+$var_1->offsetSet(100,new DateTime('2000-01-01'));
+} catch(OutOfRangeException $e) {
+ print $e->getMessage()."\n";
+}
+?>
+===DONE===
+--EXPECT--
+Offset invalid or out of range
+===DONE=== \ No newline at end of file
diff --git a/ext/spl/tests/bug71838.phpt b/ext/spl/tests/bug71838.phpt
new file mode 100644
index 0000000000..44fc761ceb
--- /dev/null
+++ b/ext/spl/tests/bug71838.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #71839: Deserializing serialized SPLObjectStorage-Object can't access properties in PHP
+--FILE--
+<?php
+
+class A extends SplObjectStorage {
+ protected $a = null;
+
+ public function __construct() {
+ $this->a = '123';
+ }
+
+ public function getA() {
+ return $this->a;
+ }
+}
+
+$serialized = serialize(new A());
+$obj = unserialize($serialized);
+var_dump($obj->getA());
+
+?>
+--EXPECT--
+string(3) "123"
diff --git a/ext/spl/tests/bug72051.phpt b/ext/spl/tests/bug72051.phpt
new file mode 100644
index 0000000000..1dfc056d7e
--- /dev/null
+++ b/ext/spl/tests/bug72051.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #72051 (The reference in CallbackFilterIterator doesn't work as expected)
+--FILE--
+<?php
+
+$data = [
+ [1,2]
+];
+
+$callbackTest = new CallbackFilterIterator(new ArrayIterator($data), function (&$current) {
+ $current['message'] = 'Test message';
+ return true;
+});
+
+$callbackTest->rewind();
+$data = $callbackTest->current();
+$callbackTest->next();
+print_r($data);
+?>
+--EXPECT--
+Array
+(
+ [0] => 1
+ [1] => 2
+ [message] => Test message
+)
diff --git a/ext/spl/tests/dit_006.phpt b/ext/spl/tests/dit_006.phpt
index 9edbb9f157..ed1ceffc05 100644
--- a/ext/spl/tests/dit_006.phpt
+++ b/ext/spl/tests/dit_006.phpt
@@ -30,11 +30,12 @@ while ($di->valid()) {
echo "Without seek we get $o\n";
-$p = 0;
-$di->seek($o+1);
-while ($di->valid()) {
- $p++;
- $di->next();
+try {
+ $p = 0;
+ $di->seek($o+1);
+ $p = 1;
+} catch (\OutOfBoundsException $ex) {
+ echo $ex->getMessage() . PHP_EOL;
}
var_dump($n !== $m, $m === $o, $p === 0);
@@ -44,6 +45,7 @@ var_dump($n !== $m, $m === $o, $p === 0);
With seek(2) we get %d
With seek(0) we get %d
Without seek we get %d
+Seek position %d is out of range
bool(true)
bool(true)
bool(true)
diff --git a/ext/spl/tests/iterator_036.phpt b/ext/spl/tests/iterator_036.phpt
index 9a9e66b3b3..0f668db53f 100644
--- a/ext/spl/tests/iterator_036.phpt
+++ b/ext/spl/tests/iterator_036.phpt
@@ -19,4 +19,4 @@ test(new CachingIterator($ar, 0));
===DONE===
--EXPECTF--
-Fatal error: Method CachingIterator::__toString() must not throw an exception in %siterator_036.php on line %d
+Fatal error: Method CachingIterator::__toString() must not throw an exception, caught BadMethodCallException: CachingIterator does not fetch string value (see CachingIterator::__construct) in %siterator_036.php on line %d
diff --git a/ext/spl/tests/spl_autoload_001.phpt b/ext/spl/tests/spl_autoload_001.phpt
index ff9d1e97d9..fc5f6ed4f7 100644
--- a/ext/spl/tests/spl_autoload_001.phpt
+++ b/ext/spl/tests/spl_autoload_001.phpt
@@ -9,38 +9,25 @@ echo "===EMPTY===\n";
var_dump(spl_autoload_extensions());
-try
-{
- spl_autoload("TestClass");
-}
-catch(Exception $e)
-{
- echo 'Exception: ' . $e->getMessage() . "\n";
+spl_autoload("TestClass");
+if (!class_exists("TestClass")) {
+ echo "Class TestClass could not be loaded\n";
}
$test_exts = array(NULL, "1", ".inc,,.php.inc", "");
-foreach($test_exts as $exts)
-{
+foreach($test_exts as $exts) {
echo "===($exts)===\n";
- try
- {
- spl_autoload("TestClass", $exts);
- }
- catch(Exception $e)
- {
- echo 'Exception: ' . $e->getMessage() . "\n";
- }
+ spl_autoload("TestClass", $exts);
+ if (!class_exists("TestClass")) {
+ echo "Class TestClass could not be loaded\n";
+ }
}
-try
-{
- spl_autoload_extensions(".inc,.php.inc");
- spl_autoload("TestClass");
-}
-catch(Exception $e)
-{
- echo 'Exception: ' . $e->getMessage() . "\n";
+spl_autoload_extensions(".inc,.php.inc");
+spl_autoload("TestClass");
+if (!class_exists("TestClass")) {
+ echo "Class TestClass could not be loaded\n";
}
function TestFunc1($classname)
@@ -57,15 +44,8 @@ echo "===SPL_AUTOLOAD()===\n";
spl_autoload_register();
-try
-{
- var_dump(spl_autoload_extensions(".inc"));
- var_dump(class_exists("TestClass", true));
-}
-catch(Exception $e)
-{
- echo 'Exception: ' . $e->getMessage() . "\n";
-}
+var_dump(spl_autoload_extensions(".inc"));
+var_dump(class_exists("TestClass", true));
echo "===REGISTER===\n";
@@ -75,14 +55,7 @@ spl_autoload_register("TestFunc2");
spl_autoload_register("TestFunc2"); /* 2nd call ignored */
spl_autoload_extensions(".inc,.class.inc"); /* we do not have spl_autoload_registered yet */
-try
-{
- var_dump(class_exists("TestClass", true));
-}
-catch(Exception $e)
-{
- echo 'Exception: ' . $e->getMessage() . "\n";
-}
+var_dump(class_exists("TestClass", true));
echo "===LOAD===\n";
@@ -107,21 +80,21 @@ catch(Exception $e)
===EMPTY===
string(9) ".inc,.php"
%stestclass.inc
-Exception: Class TestClass could not be loaded
+Class TestClass could not be loaded
===()===
-Exception: Class TestClass could not be loaded
+Class TestClass could not be loaded
===(1)===
-Exception: Class TestClass could not be loaded
+Class TestClass could not be loaded
===(.inc,,.php.inc)===
%stestclass
%stestclass.php.inc
-Exception: Class TestClass could not be loaded
+Class TestClass could not be loaded
===()===
-Exception: Class TestClass could not be loaded
-Exception: Class TestClass could not be loaded
+Class TestClass could not be loaded
+Class TestClass could not be loaded
===SPL_AUTOLOAD()===
string(4) ".inc"
-Exception: Class TestClass could not be loaded
+bool(false)
===REGISTER===
TestFunc1(TestClass)
TestFunc2(TestClass)
diff --git a/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt b/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt
new file mode 100644
index 0000000000..7b2be18900
--- /dev/null
+++ b/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt
@@ -0,0 +1,13 @@
+--TEST--
+SPL: Spl File Info test getExtension with leading dot
+--FILE--
+<?php
+$file = __DIR__ . '/.test';
+touch($file);
+$fileInfo = new SplFileInfo($file);
+
+var_dump($fileInfo->getExtension());
+unlink($file);
+?>
+--EXPECT--
+string(4) "test"
diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c
index dff4538dd3..0ae407dd83 100644
--- a/ext/sqlite3/libsqlite/sqlite3.c
+++ b/ext/sqlite3/libsqlite/sqlite3.c
@@ -1,6 +1,6 @@
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.8.10.2. By combining all the individual C code files into this
+** version 3.9.2. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
@@ -158,6 +158,13 @@
# define _LARGEFILE_SOURCE 1
#endif
+/* What version of GCC is being used. 0 means GCC is not being used */
+#ifdef __GNUC__
+# define GCC_VERSION (__GNUC__*1000000+__GNUC_MINOR__*1000+__GNUC_PATCHLEVEL__)
+#else
+# define GCC_VERSION 0
+#endif
+
/* Needed for various definitions... */
#if defined(__GNUC__) && !defined(_GNU_SOURCE)
# define _GNU_SOURCE
@@ -230,7 +237,7 @@
**
** The official C-language API documentation for SQLite is derived
** from comments in this file. This file is the authoritative source
-** on how SQLite interfaces are suppose to operate.
+** on how SQLite interfaces are supposed to operate.
**
** The name of this file under configuration management is "sqlite.h.in".
** The makefile makes some minor changes to this file (such as inserting
@@ -318,9 +325,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.8.10.2"
-#define SQLITE_VERSION_NUMBER 3008010
-#define SQLITE_SOURCE_ID "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4"
+#define SQLITE_VERSION "3.9.2"
+#define SQLITE_VERSION_NUMBER 3009002
+#define SQLITE_SOURCE_ID "2015-11-02 18:31:45 bda77dda9697c463c3d0704014d51627fceee328"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -331,7 +338,7 @@ extern "C" {
** but are associated with the library instead of the header file. ^(Cautious
** programmers might include assert() statements in their application to
** verify that values returned by these interfaces match the macros in
-** the header, and thus insure that the application is
+** the header, and thus ensure that the application is
** compiled with matching library and header files.
**
** <blockquote><pre>
@@ -581,7 +588,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
** Restrictions:
**
** <ul>
-** <li> The application must insure that the 1st parameter to sqlite3_exec()
+** <li> The application must ensure that the 1st parameter to sqlite3_exec()
** is a valid and open [database connection].
** <li> The application must not close the [database connection] specified by
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
@@ -684,6 +691,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
#define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8))
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
+#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
@@ -1170,6 +1178,14 @@ struct sqlite3_io_methods {
** circumstances in order to fix a problem with priority inversion.
** Applications should <em>not</em> use this file-control.
**
+** <li>[[SQLITE_FCNTL_ZIPVFS]]
+** The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other
+** VFS should return SQLITE_NOTFOUND for this opcode.
+**
+** <li>[[SQLITE_FCNTL_RBU]]
+** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by
+** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for
+** this opcode.
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -1195,6 +1211,8 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_COMMIT_PHASETWO 22
#define SQLITE_FCNTL_WIN32_SET_HANDLE 23
#define SQLITE_FCNTL_WAL_BLOCK 24
+#define SQLITE_FCNTL_ZIPVFS 25
+#define SQLITE_FCNTL_RBU 26
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -1563,9 +1581,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
** applications and so this routine is usually not necessary. It is
** provided to support rare applications with unusual needs.
**
-** The sqlite3_config() interface is not threadsafe. The application
-** must insure that no other SQLite interfaces are invoked by other
-** threads while sqlite3_config() is running. Furthermore, sqlite3_config()
+** <b>The sqlite3_config() interface is not threadsafe. The application
+** must ensure that no other SQLite interfaces are invoked by other
+** threads while sqlite3_config() is running.</b>
+**
+** The sqlite3_config() interface
** may only be invoked prior to library initialization using
** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
@@ -3570,7 +3590,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
**
** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the
** [prepared statement] S has been stepped at least once using
-** [sqlite3_step(S)] but has not run to completion and/or has not
+** [sqlite3_step(S)] but has neither run to completion (returned
+** [SQLITE_DONE] from [sqlite3_step(S)]) nor
** been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S)
** interface returns false if S is a NULL pointer. If S is not a
** NULL pointer and is not a pointer to a valid [prepared statement]
@@ -3597,7 +3618,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
** Some interfaces require a protected sqlite3_value. Other interfaces
** will accept either a protected or an unprotected sqlite3_value.
** Every interface that accepts sqlite3_value arguments specifies
-** whether or not it requires a protected sqlite3_value.
+** whether or not it requires a protected sqlite3_value. The
+** [sqlite3_value_dup()] interface can be used to construct a new
+** protected sqlite3_value from an unprotected sqlite3_value.
**
** The terms "protected" and "unprotected" refer to whether or not
** a mutex is held. An internal mutex is held for a protected
@@ -3757,6 +3780,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char
void(*)(void*), unsigned char encoding);
SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
+SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
/*
** CAPI3REF: Number Of SQL Parameters
@@ -3820,7 +3844,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*,
**
** See also: [sqlite3_bind_blob|sqlite3_bind()],
** [sqlite3_bind_parameter_count()], and
-** [sqlite3_bind_parameter_index()].
+** [sqlite3_bind_parameter_name()].
*/
SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
@@ -4100,8 +4124,6 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** KEYWORDS: {column access functions}
** METHOD: sqlite3_stmt
**
-** These routines form the "result set" interface.
-**
** ^These routines return information about a single column of the current
** result row of a query. ^In every case the first argument is a pointer
** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
@@ -4161,13 +4183,14 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** even empty strings, are always zero-terminated. ^The return
** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
**
-** ^The object returned by [sqlite3_column_value()] is an
-** [unprotected sqlite3_value] object. An unprotected sqlite3_value object
-** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
+** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an
+** [unprotected sqlite3_value] object. In a multithreaded environment,
+** an unprotected sqlite3_value object may only be used safely with
+** [sqlite3_bind_value()] and [sqlite3_result_value()].
** If the [unprotected sqlite3_value] object returned by
** [sqlite3_column_value()] is used in any other way, including calls
** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
-** or [sqlite3_value_bytes()], then the behavior is undefined.
+** or [sqlite3_value_bytes()], the behavior is not threadsafe.
**
** These routines attempt to convert the value where appropriate. ^For
** example, if the internal representation is FLOAT and a text result
@@ -4198,12 +4221,6 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** </table>
** </blockquote>)^
**
-** The table above makes reference to standard C library functions atoi()
-** and atof(). SQLite does not really use these functions. It has its
-** own equivalent internal routines. The atoi() and atof() names are
-** used in the table for brevity and because they are familiar to most
-** C programmers.
-**
** Note that when type conversions occur, pointers returned by prior
** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
** sqlite3_column_text16() may be invalidated.
@@ -4228,7 +4245,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** of conversion are done in place when it is possible, but sometimes they
** are not possible and in those cases prior pointers are invalidated.
**
-** The safest and easiest to remember policy is to invoke these routines
+** The safest policy is to invoke these routines
** in one of the following ways:
**
** <ul>
@@ -4248,7 +4265,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** ^The pointers returned are valid until a type conversion occurs as
** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
** [sqlite3_finalize()] is called. ^The memory space used to hold strings
-** and BLOBs is freed automatically. Do <b>not</b> pass the pointers returned
+** and BLOBs is freed automatically. Do <em>not</em> pass the pointers returned
** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
** [sqlite3_free()].
**
@@ -4498,12 +4515,12 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi
#endif
/*
-** CAPI3REF: Obtaining SQL Function Parameter Values
+** CAPI3REF: Obtaining SQL Values
** METHOD: sqlite3_value
**
** The C-language implementation of SQL functions and aggregates uses
** this set of interface routines to access the parameter values on
-** the function or aggregate.
+** the function or aggregate.
**
** The xFunc (for scalar functions) or xStep (for aggregates) parameters
** to [sqlite3_create_function()] and [sqlite3_create_function16()]
@@ -4557,6 +4574,39 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
/*
+** CAPI3REF: Finding The Subtype Of SQL Values
+** METHOD: sqlite3_value
+**
+** The sqlite3_value_subtype(V) function returns the subtype for
+** an [application-defined SQL function] argument V. The subtype
+** information can be used to pass a limited amount of context from
+** one SQL function to another. Use the [sqlite3_result_subtype()]
+** routine to set the subtype for the return value of an SQL function.
+**
+** SQLite makes no use of subtype itself. It merely passes the subtype
+** from the result of one [application-defined SQL function] into the
+** input of another.
+*/
+SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
+
+/*
+** CAPI3REF: Copy And Free SQL Values
+** METHOD: sqlite3_value
+**
+** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
+** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
+** is a [protected sqlite3_value] object even if the input is not.
+** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
+** memory allocation fails.
+**
+** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
+** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
+** then sqlite3_value_free(V) is a harmless no-op.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
+SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
+
+/*
** CAPI3REF: Obtain Aggregate Function Context
** METHOD: sqlite3_context
**
@@ -4719,9 +4769,9 @@ typedef void (*sqlite3_destructor_type)(void*);
** to by the second parameter and which is N bytes long where N is the
** third parameter.
**
-** ^The sqlite3_result_zeroblob() interfaces set the result of
-** the application-defined function to be a BLOB containing all zero
-** bytes and N bytes in size, where N is the value of the 2nd parameter.
+** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N)
+** interfaces set the result of the application-defined function to be
+** a BLOB containing all zero bytes and N bytes in size.
**
** ^The sqlite3_result_double() interface sets the result from
** an application-defined function to be a floating point value specified
@@ -4803,7 +4853,7 @@ typedef void (*sqlite3_destructor_type)(void*);
** from [sqlite3_malloc()] before it returns.
**
** ^The sqlite3_result_value() interface sets the result of
-** the application-defined function to be a copy the
+** the application-defined function to be a copy of the
** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The
** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
** so that the [sqlite3_value] specified in the parameter may change or
@@ -4836,6 +4886,22 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const v
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
+SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
+
+
+/*
+** CAPI3REF: Setting The Subtype Of An SQL Function
+** METHOD: sqlite3_context
+**
+** The sqlite3_result_subtype(C,T) function causes the subtype of
+** the result from the [application-defined SQL function] with
+** [sqlite3_context] C to be the value T. Only the lower 8 bits
+** of the subtype T are preserved in current versions of SQLite;
+** higher order bits are discarded.
+** The number of subtype bytes preserved by SQLite might increase
+** in future releases of SQLite.
+*/
+SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
/*
** CAPI3REF: Define New Collating Sequences
@@ -5782,13 +5848,31 @@ struct sqlite3_module {
** ^The estimatedRows value is an estimate of the number of rows that
** will be returned by the strategy.
**
+** The xBestIndex method may optionally populate the idxFlags field with a
+** mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
+** SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
+** assumes that the strategy may visit at most one row.
+**
+** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
+** SQLite also assumes that if a call to the xUpdate() method is made as
+** part of the same statement to delete or update a virtual table row and the
+** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
+** any database changes. In other words, if the xUpdate() returns
+** SQLITE_CONSTRAINT, the database contents must be exactly as they were
+** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
+** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
+** the xUpdate method are automatically rolled back by SQLite.
+**
** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
** structure for SQLite version 3.8.2. If a virtual table extension is
** used with an SQLite version earlier than 3.8.2, the results of attempting
** to read or write the estimatedRows field are undefined (but are likely
** to included crashing the application). The estimatedRows field should
** therefore only be used if [sqlite3_libversion_number()] returns a
-** value greater than or equal to 3008002.
+** value greater than or equal to 3008002. Similarly, the idxFlags field
+** was added for version 3.9.0. It may therefore only be used if
+** sqlite3_libversion_number() returns a value greater than or equal to
+** 3009000.
*/
struct sqlite3_index_info {
/* Inputs */
@@ -5816,9 +5900,16 @@ struct sqlite3_index_info {
double estimatedCost; /* Estimated cost of using this index */
/* Fields below are only available in SQLite 3.8.2 and later */
sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
+ /* Fields below are only available in SQLite 3.9.0 and later */
+ int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
};
/*
+** CAPI3REF: Virtual Table Scan Flags
+*/
+#define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
+
+/*
** CAPI3REF: Virtual Table Constraint Operator Codes
**
** These macros defined the allowed values for the
@@ -6079,7 +6170,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
**
** ^This function sets the database handle error code and message.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
+SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
/*
** CAPI3REF: Close A BLOB Handle
@@ -6275,6 +6366,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
** <li> SQLITE_MUTEX_STATIC_APP1
** <li> SQLITE_MUTEX_STATIC_APP2
** <li> SQLITE_MUTEX_STATIC_APP3
+** <li> SQLITE_MUTEX_STATIC_VFS1
+** <li> SQLITE_MUTEX_STATIC_VFS2
+** <li> SQLITE_MUTEX_STATIC_VFS3
** </ul>
**
** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
@@ -6476,6 +6570,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
#define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
#define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
#define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
+#define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
+#define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
+#define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
/*
** CAPI3REF: Retrieve the mutex for a database connection
@@ -7889,7 +7986,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
**
** See also: [sqlite3_stmt_scanstatus_reset()]
*/
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_stmt_scanstatus(
+SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
@@ -7905,7 +8002,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_stmt_scanstatus(
** This API is only available if the library is built with pre-processor
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
*/
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
+SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
/*
@@ -8020,6 +8117,8 @@ struct sqlite3_rtree_query_info {
int eParentWithin; /* Visibility of parent node */
int eWithin; /* OUT: Visiblity */
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
+ /* The following fields are only available in 3.8.11 and later */
+ sqlite3_value **apSqlParam; /* Original SQL values of parameters */
};
/*
@@ -8036,6 +8135,526 @@ struct sqlite3_rtree_query_info {
#endif /* ifndef _SQLITE3RTREE_H_ */
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** Interfaces to extend FTS5. Using the interfaces defined in this file,
+** FTS5 may be extended with:
+**
+** * custom tokenizers, and
+** * custom auxiliary functions.
+*/
+
+
+#ifndef _FTS5_H
+#define _FTS5_H
+
+
+#if 0
+extern "C" {
+#endif
+
+/*************************************************************************
+** CUSTOM AUXILIARY FUNCTIONS
+**
+** Virtual table implementations may overload SQL functions by implementing
+** the sqlite3_module.xFindFunction() method.
+*/
+
+typedef struct Fts5ExtensionApi Fts5ExtensionApi;
+typedef struct Fts5Context Fts5Context;
+typedef struct Fts5PhraseIter Fts5PhraseIter;
+
+typedef void (*fts5_extension_function)(
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
+ sqlite3_context *pCtx, /* Context for returning result/error */
+ int nVal, /* Number of values in apVal[] array */
+ sqlite3_value **apVal /* Array of trailing arguments */
+);
+
+struct Fts5PhraseIter {
+ const unsigned char *a;
+ const unsigned char *b;
+};
+
+/*
+** EXTENSION API FUNCTIONS
+**
+** xUserData(pFts):
+** Return a copy of the context pointer the extension function was
+** registered with.
+**
+** xColumnTotalSize(pFts, iCol, pnToken):
+** If parameter iCol is less than zero, set output variable *pnToken
+** to the total number of tokens in the FTS5 table. Or, if iCol is
+** non-negative but less than the number of columns in the table, return
+** the total number of tokens in column iCol, considering all rows in
+** the FTS5 table.
+**
+** If parameter iCol is greater than or equal to the number of columns
+** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.
+** an OOM condition or IO error), an appropriate SQLite error code is
+** returned.
+**
+** xColumnCount(pFts):
+** Return the number of columns in the table.
+**
+** xColumnSize(pFts, iCol, pnToken):
+** If parameter iCol is less than zero, set output variable *pnToken
+** to the total number of tokens in the current row. Or, if iCol is
+** non-negative but less than the number of columns in the table, set
+** *pnToken to the number of tokens in column iCol of the current row.
+**
+** If parameter iCol is greater than or equal to the number of columns
+** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.
+** an OOM condition or IO error), an appropriate SQLite error code is
+** returned.
+**
+** xColumnText:
+** This function attempts to retrieve the text of column iCol of the
+** current document. If successful, (*pz) is set to point to a buffer
+** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
+** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
+** if an error occurs, an SQLite error code is returned and the final values
+** of (*pz) and (*pn) are undefined.
+**
+** xPhraseCount:
+** Returns the number of phrases in the current query expression.
+**
+** xPhraseSize:
+** Returns the number of tokens in phrase iPhrase of the query. Phrases
+** are numbered starting from zero.
+**
+** xInstCount:
+** Set *pnInst to the total number of occurrences of all phrases within
+** the query within the current row. Return SQLITE_OK if successful, or
+** an error code (i.e. SQLITE_NOMEM) if an error occurs.
+**
+** xInst:
+** Query for the details of phrase match iIdx within the current row.
+** Phrase matches are numbered starting from zero, so the iIdx argument
+** should be greater than or equal to zero and smaller than the value
+** output by xInstCount().
+**
+** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM)
+** if an error occurs.
+**
+** xRowid:
+** Returns the rowid of the current row.
+**
+** xTokenize:
+** Tokenize text using the tokenizer belonging to the FTS5 table.
+**
+** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback):
+** This API function is used to query the FTS table for phrase iPhrase
+** of the current query. Specifically, a query equivalent to:
+**
+** ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid
+**
+** with $p set to a phrase equivalent to the phrase iPhrase of the
+** current query is executed. For each row visited, the callback function
+** passed as the fourth argument is invoked. The context and API objects
+** passed to the callback function may be used to access the properties of
+** each matched row. Invoking Api.xUserData() returns a copy of the pointer
+** passed as the third argument to pUserData.
+**
+** If the callback function returns any value other than SQLITE_OK, the
+** query is abandoned and the xQueryPhrase function returns immediately.
+** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.
+** Otherwise, the error code is propagated upwards.
+**
+** If the query runs to completion without incident, SQLITE_OK is returned.
+** Or, if some error occurs before the query completes or is aborted by
+** the callback, an SQLite error code is returned.
+**
+**
+** xSetAuxdata(pFts5, pAux, xDelete)
+**
+** Save the pointer passed as the second argument as the extension functions
+** "auxiliary data". The pointer may then be retrieved by the current or any
+** future invocation of the same fts5 extension function made as part of
+** of the same MATCH query using the xGetAuxdata() API.
+**
+** Each extension function is allocated a single auxiliary data slot for
+** each FTS query (MATCH expression). If the extension function is invoked
+** more than once for a single FTS query, then all invocations share a
+** single auxiliary data context.
+**
+** If there is already an auxiliary data pointer when this function is
+** invoked, then it is replaced by the new pointer. If an xDelete callback
+** was specified along with the original pointer, it is invoked at this
+** point.
+**
+** The xDelete callback, if one is specified, is also invoked on the
+** auxiliary data pointer after the FTS5 query has finished.
+**
+** If an error (e.g. an OOM condition) occurs within this function, an
+** the auxiliary data is set to NULL and an error code returned. If the
+** xDelete parameter was not NULL, it is invoked on the auxiliary data
+** pointer before returning.
+**
+**
+** xGetAuxdata(pFts5, bClear)
+**
+** Returns the current auxiliary data pointer for the fts5 extension
+** function. See the xSetAuxdata() method for details.
+**
+** If the bClear argument is non-zero, then the auxiliary data is cleared
+** (set to NULL) before this function returns. In this case the xDelete,
+** if any, is not invoked.
+**
+**
+** xRowCount(pFts5, pnRow)
+**
+** This function is used to retrieve the total number of rows in the table.
+** In other words, the same value that would be returned by:
+**
+** SELECT count(*) FROM ftstable;
+**
+** xPhraseFirst()
+** This function is used, along with type Fts5PhraseIter and the xPhraseNext
+** method, to iterate through all instances of a single query phrase within
+** the current row. This is the same information as is accessible via the
+** xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient
+** to use, this API may be faster under some circumstances. To iterate
+** through instances of phrase iPhrase, use the following code:
+**
+** Fts5PhraseIter iter;
+** int iCol, iOff;
+** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);
+** iOff>=0;
+** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)
+** ){
+** // An instance of phrase iPhrase at offset iOff of column iCol
+** }
+**
+** The Fts5PhraseIter structure is defined above. Applications should not
+** modify this structure directly - it should only be used as shown above
+** with the xPhraseFirst() and xPhraseNext() API methods.
+**
+** xPhraseNext()
+** See xPhraseFirst above.
+*/
+struct Fts5ExtensionApi {
+ int iVersion; /* Currently always set to 1 */
+
+ void *(*xUserData)(Fts5Context*);
+
+ int (*xColumnCount)(Fts5Context*);
+ int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
+ int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);
+
+ int (*xTokenize)(Fts5Context*,
+ const char *pText, int nText, /* Text to tokenize */
+ void *pCtx, /* Context passed to xToken() */
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
+ );
+
+ int (*xPhraseCount)(Fts5Context*);
+ int (*xPhraseSize)(Fts5Context*, int iPhrase);
+
+ int (*xInstCount)(Fts5Context*, int *pnInst);
+ int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);
+
+ sqlite3_int64 (*xRowid)(Fts5Context*);
+ int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);
+ int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);
+
+ int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,
+ int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)
+ );
+ int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
+ void *(*xGetAuxdata)(Fts5Context*, int bClear);
+
+ void (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
+ void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
+};
+
+/*
+** CUSTOM AUXILIARY FUNCTIONS
+*************************************************************************/
+
+/*************************************************************************
+** CUSTOM TOKENIZERS
+**
+** Applications may also register custom tokenizer types. A tokenizer
+** is registered by providing fts5 with a populated instance of the
+** following structure. All structure methods must be defined, setting
+** any member of the fts5_tokenizer struct to NULL leads to undefined
+** behaviour. The structure methods are expected to function as follows:
+**
+** xCreate:
+** This function is used to allocate and inititalize a tokenizer instance.
+** A tokenizer instance is required to actually tokenize text.
+**
+** The first argument passed to this function is a copy of the (void*)
+** pointer provided by the application when the fts5_tokenizer object
+** was registered with FTS5 (the third argument to xCreateTokenizer()).
+** The second and third arguments are an array of nul-terminated strings
+** containing the tokenizer arguments, if any, specified following the
+** tokenizer name as part of the CREATE VIRTUAL TABLE statement used
+** to create the FTS5 table.
+**
+** The final argument is an output variable. If successful, (*ppOut)
+** should be set to point to the new tokenizer handle and SQLITE_OK
+** returned. If an error occurs, some value other than SQLITE_OK should
+** be returned. In this case, fts5 assumes that the final value of *ppOut
+** is undefined.
+**
+** xDelete:
+** This function is invoked to delete a tokenizer handle previously
+** allocated using xCreate(). Fts5 guarantees that this function will
+** be invoked exactly once for each successful call to xCreate().
+**
+** xTokenize:
+** This function is expected to tokenize the nText byte string indicated
+** by argument pText. pText may or may not be nul-terminated. The first
+** argument passed to this function is a pointer to an Fts5Tokenizer object
+** returned by an earlier call to xCreate().
+**
+** The second argument indicates the reason that FTS5 is requesting
+** tokenization of the supplied text. This is always one of the following
+** four values:
+**
+** <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into
+** or removed from the FTS table. The tokenizer is being invoked to
+** determine the set of tokens to add to (or delete from) the
+** FTS index.
+**
+** <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed
+** against the FTS index. The tokenizer is being called to tokenize
+** a bareword or quoted string specified as part of the query.
+**
+** <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as
+** FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is
+** followed by a "*" character, indicating that the last token
+** returned by the tokenizer will be treated as a token prefix.
+**
+** <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to
+** satisfy an fts5_api.xTokenize() request made by an auxiliary
+** function. Or an fts5_api.xColumnSize() request made by the same
+** on a columnsize=0 database.
+** </ul>
+**
+** For each token in the input string, the supplied callback xToken() must
+** be invoked. The first argument to it should be a copy of the pointer
+** passed as the second argument to xTokenize(). The third and fourth
+** arguments are a pointer to a buffer containing the token text, and the
+** size of the token in bytes. The 4th and 5th arguments are the byte offsets
+** of the first byte of and first byte immediately following the text from
+** which the token is derived within the input.
+**
+** The second argument passed to the xToken() callback ("tflags") should
+** normally be set to 0. The exception is if the tokenizer supports
+** synonyms. In this case see the discussion below for details.
+**
+** FTS5 assumes the xToken() callback is invoked for each token in the
+** order that they occur within the input text.
+**
+** If an xToken() callback returns any value other than SQLITE_OK, then
+** the tokenization should be abandoned and the xTokenize() method should
+** immediately return a copy of the xToken() return value. Or, if the
+** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,
+** if an error occurs with the xTokenize() implementation itself, it
+** may abandon the tokenization and return any error code other than
+** SQLITE_OK or SQLITE_DONE.
+**
+** SYNONYM SUPPORT
+**
+** Custom tokenizers may also support synonyms. Consider a case in which a
+** user wishes to query for a phrase such as "first place". Using the
+** built-in tokenizers, the FTS5 query 'first + place' will match instances
+** of "first place" within the document set, but not alternative forms
+** such as "1st place". In some applications, it would be better to match
+** all instances of "first place" or "1st place" regardless of which form
+** the user specified in the MATCH query text.
+**
+** There are several ways to approach this in FTS5:
+**
+** <ol><li> By mapping all synonyms to a single token. In this case, the
+** In the above example, this means that the tokenizer returns the
+** same token for inputs "first" and "1st". Say that token is in
+** fact "first", so that when the user inserts the document "I won
+** 1st place" entries are added to the index for tokens "i", "won",
+** "first" and "place". If the user then queries for '1st + place',
+** the tokenizer substitutes "first" for "1st" and the query works
+** as expected.
+**
+** <li> By adding multiple synonyms for a single term to the FTS index.
+** In this case, when tokenizing query text, the tokenizer may
+** provide multiple synonyms for a single term within the document.
+** FTS5 then queries the index for each synonym individually. For
+** example, faced with the query:
+**
+** <codeblock>
+** ... MATCH 'first place'</codeblock>
+**
+** the tokenizer offers both "1st" and "first" as synonyms for the
+** first token in the MATCH query and FTS5 effectively runs a query
+** similar to:
+**
+** <codeblock>
+** ... MATCH '(first OR 1st) place'</codeblock>
+**
+** except that, for the purposes of auxiliary functions, the query
+** still appears to contain just two phrases - "(first OR 1st)"
+** being treated as a single phrase.
+**
+** <li> By adding multiple synonyms for a single term to the FTS index.
+** Using this method, when tokenizing document text, the tokenizer
+** provides multiple synonyms for each token. So that when a
+** document such as "I won first place" is tokenized, entries are
+** added to the FTS index for "i", "won", "first", "1st" and
+** "place".
+**
+** This way, even if the tokenizer does not provide synonyms
+** when tokenizing query text (it should not - to do would be
+** inefficient), it doesn't matter if the user queries for
+** 'first + place' or '1st + place', as there are entires in the
+** FTS index corresponding to both forms of the first token.
+** </ol>
+**
+** Whether it is parsing document or query text, any call to xToken that
+** specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit
+** is considered to supply a synonym for the previous token. For example,
+** when parsing the document "I won first place", a tokenizer that supports
+** synonyms would call xToken() 5 times, as follows:
+**
+** <codeblock>
+** xToken(pCtx, 0, "i", 1, 0, 1);
+** xToken(pCtx, 0, "won", 3, 2, 5);
+** xToken(pCtx, 0, "first", 5, 6, 11);
+** xToken(pCtx, FTS5_TOKEN_COLOCATED, "1st", 3, 6, 11);
+** xToken(pCtx, 0, "place", 5, 12, 17);
+**</codeblock>
+**
+** It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time
+** xToken() is called. Multiple synonyms may be specified for a single token
+** by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence.
+** There is no limit to the number of synonyms that may be provided for a
+** single token.
+**
+** In many cases, method (1) above is the best approach. It does not add
+** extra data to the FTS index or require FTS5 to query for multiple terms,
+** so it is efficient in terms of disk space and query speed. However, it
+** does not support prefix queries very well. If, as suggested above, the
+** token "first" is subsituted for "1st" by the tokenizer, then the query:
+**
+** <codeblock>
+** ... MATCH '1s*'</codeblock>
+**
+** will not match documents that contain the token "1st" (as the tokenizer
+** will probably not map "1s" to any prefix of "first").
+**
+** For full prefix support, method (3) may be preferred. In this case,
+** because the index contains entries for both "first" and "1st", prefix
+** queries such as 'fi*' or '1s*' will match correctly. However, because
+** extra entries are added to the FTS index, this method uses more space
+** within the database.
+**
+** Method (2) offers a midpoint between (1) and (3). Using this method,
+** a query such as '1s*' will match documents that contain the literal
+** token "1st", but not "first" (assuming the tokenizer is not able to
+** provide synonyms for prefixes). However, a non-prefix query like '1st'
+** will match against "1st" and "first". This method does not require
+** extra disk space, as no extra entries are added to the FTS index.
+** On the other hand, it may require more CPU cycles to run MATCH queries,
+** as separate queries of the FTS index are required for each synonym.
+**
+** When using methods (2) or (3), it is important that the tokenizer only
+** provide synonyms when tokenizing document text (method (2)) or query
+** text (method (3)), not both. Doing so will not cause any errors, but is
+** inefficient.
+*/
+typedef struct Fts5Tokenizer Fts5Tokenizer;
+typedef struct fts5_tokenizer fts5_tokenizer;
+struct fts5_tokenizer {
+ int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
+ void (*xDelete)(Fts5Tokenizer*);
+ int (*xTokenize)(Fts5Tokenizer*,
+ void *pCtx,
+ int flags, /* Mask of FTS5_TOKENIZE_* flags */
+ const char *pText, int nText,
+ int (*xToken)(
+ void *pCtx, /* Copy of 2nd argument to xTokenize() */
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
+ const char *pToken, /* Pointer to buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStart, /* Byte offset of token within input text */
+ int iEnd /* Byte offset of end of token within input text */
+ )
+ );
+};
+
+/* Flags that may be passed as the third argument to xTokenize() */
+#define FTS5_TOKENIZE_QUERY 0x0001
+#define FTS5_TOKENIZE_PREFIX 0x0002
+#define FTS5_TOKENIZE_DOCUMENT 0x0004
+#define FTS5_TOKENIZE_AUX 0x0008
+
+/* Flags that may be passed by the tokenizer implementation back to FTS5
+** as the third argument to the supplied xToken callback. */
+#define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
+
+/*
+** END OF CUSTOM TOKENIZERS
+*************************************************************************/
+
+/*************************************************************************
+** FTS5 EXTENSION REGISTRATION API
+*/
+typedef struct fts5_api fts5_api;
+struct fts5_api {
+ int iVersion; /* Currently always set to 2 */
+
+ /* Create a new tokenizer */
+ int (*xCreateTokenizer)(
+ fts5_api *pApi,
+ const char *zName,
+ void *pContext,
+ fts5_tokenizer *pTokenizer,
+ void (*xDestroy)(void*)
+ );
+
+ /* Find an existing tokenizer */
+ int (*xFindTokenizer)(
+ fts5_api *pApi,
+ const char *zName,
+ void **ppContext,
+ fts5_tokenizer *pTokenizer
+ );
+
+ /* Create a new auxiliary function */
+ int (*xCreateFunction)(
+ fts5_api *pApi,
+ const char *zName,
+ void *pContext,
+ fts5_extension_function xFunction,
+ void (*xDestroy)(void*)
+ );
+};
+
+/*
+** END OF REGISTRATION API
+*************************************************************************/
+
+#if 0
+} /* end of the 'extern "C"' block */
+#endif
+
+#endif /* _FTS5_H */
+
+
/************** End of sqlite3.h *********************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -8326,6 +8945,24 @@ struct sqlite3_rtree_query_info {
#endif
/*
+** Make sure that the compiler intrinsics we desire are enabled when
+** compiling with an appropriate version of MSVC unless prevented by
+** the SQLITE_DISABLE_INTRINSIC define.
+*/
+#if !defined(SQLITE_DISABLE_INTRINSIC)
+# if defined(_MSC_VER) && _MSC_VER>=1300
+# if !defined(_WIN32_WCE)
+# include <intrin.h>
+# pragma intrinsic(_byteswap_ushort)
+# pragma intrinsic(_byteswap_ulong)
+# pragma intrinsic(_ReadWriteBarrier)
+# else
+# include <cmnintrin.h>
+# endif
+# endif
+#endif
+
+/*
** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
** 0 means mutexes are permanently disable and the library is never
** threadsafe. 1 means the library is serialized which is the highest
@@ -8902,6 +9539,16 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
# define SQLITE_MAX_WORKER_THREADS SQLITE_DEFAULT_WORKER_THREADS
#endif
+/*
+** The default initial allocation for the pagecache when using separate
+** pagecaches for each database connection. A positive number is the
+** number of pages. A negative number N translations means that a buffer
+** of -1024*N bytes is allocated and used for as many pages as it will hold.
+*/
+#ifndef SQLITE_DEFAULT_PCACHE_INITSZ
+# define SQLITE_DEFAULT_PCACHE_INITSZ 100
+#endif
+
/*
** GCC does not define the offsetof() macro so we'll have to do it
@@ -9137,7 +9784,9 @@ SQLITE_PRIVATE const int sqlite3one;
# if defined(__linux__) \
|| defined(_WIN32) \
|| (defined(__APPLE__) && defined(__MACH__)) \
- || defined(__sun)
+ || defined(__sun) \
+ || defined(__FreeBSD__) \
+ || defined(__DragonFly__)
# define SQLITE_MAX_MMAP_SIZE 0x7fff0000 /* 2147418112 */
# else
# define SQLITE_MAX_MMAP_SIZE 0
@@ -9527,7 +10176,7 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
);
SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*);
SQLITE_PRIVATE int sqlite3BtreeCursorRestore(BtCursor*, int*);
-SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*);
+SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*, int);
SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey,
const void *pData, int nData,
int nZero, int bias, int seekResult);
@@ -9667,13 +10316,14 @@ struct VdbeOp {
int p1; /* First operand */
int p2; /* Second parameter (often the jump destination) */
int p3; /* The third parameter */
- union { /* fourth parameter */
+ union p4union { /* fourth parameter */
int i; /* Integer value if p4type==P4_INT32 */
void *p; /* Generic pointer */
char *z; /* Pointer to data for string (char array) types */
i64 *pI64; /* Used when p4type is P4_INT64 */
double *pReal; /* Used when p4type is P4_REAL */
FuncDef *pFunc; /* Used when p4type is P4_FUNCDEF */
+ sqlite3_context *pCtx; /* Used when p4type is P4_FUNCCTX */
CollSeq *pColl; /* Used when p4type is P4_COLLSEQ */
Mem *pMem; /* Used when p4type is P4_MEM */
VTable *pVtab; /* Used when p4type is P4_VTAB */
@@ -9740,6 +10390,7 @@ typedef struct VdbeOpList VdbeOpList;
#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
#define P4_SUBPROGRAM (-18) /* P4 is a pointer to a SubProgram structure */
#define P4_ADVANCE (-19) /* P4 is a pointer to BtreeNext() or BtreePrev() */
+#define P4_FUNCCTX (-20) /* P4 is a pointer to an sqlite3_context object */
/* Error message codes for OP_Halt */
#define P5_ConstraintNotNull 1
@@ -9782,42 +10433,42 @@ typedef struct VdbeOpList VdbeOpList;
/************** Begin file opcodes.h *****************************************/
/* Automatically generated. Do not edit */
/* See the mkopcodeh.awk script for details */
-#define OP_Function 1 /* synopsis: r[P3]=func(r[P2@P5]) */
-#define OP_Savepoint 2
-#define OP_AutoCommit 3
-#define OP_Transaction 4
-#define OP_SorterNext 5
-#define OP_PrevIfOpen 6
-#define OP_NextIfOpen 7
-#define OP_Prev 8
-#define OP_Next 9
-#define OP_AggStep 10 /* synopsis: accum=r[P3] step(r[P2@P5]) */
-#define OP_Checkpoint 11
-#define OP_JournalMode 12
-#define OP_Vacuum 13
-#define OP_VFilter 14 /* synopsis: iplan=r[P3] zplan='P4' */
-#define OP_VUpdate 15 /* synopsis: data=r[P3@P2] */
-#define OP_Goto 16
-#define OP_Gosub 17
-#define OP_Return 18
+#define OP_Savepoint 1
+#define OP_AutoCommit 2
+#define OP_Transaction 3
+#define OP_SorterNext 4
+#define OP_PrevIfOpen 5
+#define OP_NextIfOpen 6
+#define OP_Prev 7
+#define OP_Next 8
+#define OP_Checkpoint 9
+#define OP_JournalMode 10
+#define OP_Vacuum 11
+#define OP_VFilter 12 /* synopsis: iplan=r[P3] zplan='P4' */
+#define OP_VUpdate 13 /* synopsis: data=r[P3@P2] */
+#define OP_Goto 14
+#define OP_Gosub 15
+#define OP_Return 16
+#define OP_InitCoroutine 17
+#define OP_EndCoroutine 18
#define OP_Not 19 /* same as TK_NOT, synopsis: r[P2]= !r[P1] */
-#define OP_InitCoroutine 20
-#define OP_EndCoroutine 21
-#define OP_Yield 22
-#define OP_HaltIfNull 23 /* synopsis: if r[P3]=null halt */
-#define OP_Halt 24
-#define OP_Integer 25 /* synopsis: r[P2]=P1 */
-#define OP_Int64 26 /* synopsis: r[P2]=P4 */
-#define OP_String 27 /* synopsis: r[P2]='P4' (len=P1) */
-#define OP_Null 28 /* synopsis: r[P2..P3]=NULL */
-#define OP_SoftNull 29 /* synopsis: r[P1]=NULL */
-#define OP_Blob 30 /* synopsis: r[P2]=P4 (len=P1) */
-#define OP_Variable 31 /* synopsis: r[P2]=parameter(P1,P4) */
-#define OP_Move 32 /* synopsis: r[P2@P3]=r[P1@P3] */
-#define OP_Copy 33 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */
-#define OP_SCopy 34 /* synopsis: r[P2]=r[P1] */
-#define OP_ResultRow 35 /* synopsis: output=r[P1@P2] */
-#define OP_CollSeq 36
+#define OP_Yield 20
+#define OP_HaltIfNull 21 /* synopsis: if r[P3]=null halt */
+#define OP_Halt 22
+#define OP_Integer 23 /* synopsis: r[P2]=P1 */
+#define OP_Int64 24 /* synopsis: r[P2]=P4 */
+#define OP_String 25 /* synopsis: r[P2]='P4' (len=P1) */
+#define OP_Null 26 /* synopsis: r[P2..P3]=NULL */
+#define OP_SoftNull 27 /* synopsis: r[P1]=NULL */
+#define OP_Blob 28 /* synopsis: r[P2]=P4 (len=P1) */
+#define OP_Variable 29 /* synopsis: r[P2]=parameter(P1,P4) */
+#define OP_Move 30 /* synopsis: r[P2@P3]=r[P1@P3] */
+#define OP_Copy 31 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */
+#define OP_SCopy 32 /* synopsis: r[P2]=r[P1] */
+#define OP_ResultRow 33 /* synopsis: output=r[P1@P2] */
+#define OP_CollSeq 34
+#define OP_Function0 35 /* synopsis: r[P3]=func(r[P2@P5]) */
+#define OP_Function 36 /* synopsis: r[P3]=func(r[P2@P5]) */
#define OP_AddImm 37 /* synopsis: r[P1]=r[P1]+P2 */
#define OP_MustBeInt 38
#define OP_RealAffinity 39
@@ -9843,20 +10494,20 @@ typedef struct VdbeOpList VdbeOpList;
#define OP_SequenceTest 59 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
#define OP_OpenPseudo 60 /* synopsis: P3 columns in r[P2] */
#define OP_Close 61
-#define OP_SeekLT 62 /* synopsis: key=r[P3@P4] */
-#define OP_SeekLE 63 /* synopsis: key=r[P3@P4] */
-#define OP_SeekGE 64 /* synopsis: key=r[P3@P4] */
-#define OP_SeekGT 65 /* synopsis: key=r[P3@P4] */
-#define OP_Seek 66 /* synopsis: intkey=r[P2] */
-#define OP_NoConflict 67 /* synopsis: key=r[P3@P4] */
-#define OP_NotFound 68 /* synopsis: key=r[P3@P4] */
-#define OP_Found 69 /* synopsis: key=r[P3@P4] */
-#define OP_NotExists 70 /* synopsis: intkey=r[P3] */
+#define OP_ColumnsUsed 62
+#define OP_SeekLT 63 /* synopsis: key=r[P3@P4] */
+#define OP_SeekLE 64 /* synopsis: key=r[P3@P4] */
+#define OP_SeekGE 65 /* synopsis: key=r[P3@P4] */
+#define OP_SeekGT 66 /* synopsis: key=r[P3@P4] */
+#define OP_Seek 67 /* synopsis: intkey=r[P2] */
+#define OP_NoConflict 68 /* synopsis: key=r[P3@P4] */
+#define OP_NotFound 69 /* synopsis: key=r[P3@P4] */
+#define OP_Found 70 /* synopsis: key=r[P3@P4] */
#define OP_Or 71 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */
#define OP_And 72 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */
-#define OP_Sequence 73 /* synopsis: r[P2]=cursor[P1].ctr++ */
-#define OP_NewRowid 74 /* synopsis: r[P2]=rowid */
-#define OP_Insert 75 /* synopsis: intkey=r[P3] data=r[P2] */
+#define OP_NotExists 73 /* synopsis: intkey=r[P3] */
+#define OP_Sequence 74 /* synopsis: r[P2]=cursor[P1].ctr++ */
+#define OP_NewRowid 75 /* synopsis: r[P2]=rowid */
#define OP_IsNull 76 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
#define OP_NotNull 77 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
#define OP_Ne 78 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
@@ -9865,7 +10516,7 @@ typedef struct VdbeOpList VdbeOpList;
#define OP_Le 81 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
#define OP_Lt 82 /* same as TK_LT, synopsis: if r[P1]<r[P3] goto P2 */
#define OP_Ge 83 /* same as TK_GE, synopsis: if r[P1]>=r[P3] goto P2 */
-#define OP_InsertInt 84 /* synopsis: intkey=P3 data=r[P2] */
+#define OP_Insert 84 /* synopsis: intkey=r[P3] data=r[P2] */
#define OP_BitAnd 85 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
#define OP_BitOr 86 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
#define OP_ShiftLeft 87 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
@@ -9876,69 +10527,72 @@ typedef struct VdbeOpList VdbeOpList;
#define OP_Divide 92 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
#define OP_Remainder 93 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
#define OP_Concat 94 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
-#define OP_Delete 95
+#define OP_InsertInt 95 /* synopsis: intkey=P3 data=r[P2] */
#define OP_BitNot 96 /* same as TK_BITNOT, synopsis: r[P1]= ~r[P1] */
#define OP_String8 97 /* same as TK_STRING, synopsis: r[P2]='P4' */
-#define OP_ResetCount 98
-#define OP_SorterCompare 99 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
-#define OP_SorterData 100 /* synopsis: r[P2]=data */
-#define OP_RowKey 101 /* synopsis: r[P2]=key */
-#define OP_RowData 102 /* synopsis: r[P2]=data */
-#define OP_Rowid 103 /* synopsis: r[P2]=rowid */
-#define OP_NullRow 104
-#define OP_Last 105
-#define OP_SorterSort 106
-#define OP_Sort 107
-#define OP_Rewind 108
-#define OP_SorterInsert 109
-#define OP_IdxInsert 110 /* synopsis: key=r[P2] */
-#define OP_IdxDelete 111 /* synopsis: key=r[P2@P3] */
-#define OP_IdxRowid 112 /* synopsis: r[P2]=rowid */
-#define OP_IdxLE 113 /* synopsis: key=r[P3@P4] */
-#define OP_IdxGT 114 /* synopsis: key=r[P3@P4] */
-#define OP_IdxLT 115 /* synopsis: key=r[P3@P4] */
-#define OP_IdxGE 116 /* synopsis: key=r[P3@P4] */
-#define OP_Destroy 117
-#define OP_Clear 118
-#define OP_ResetSorter 119
-#define OP_CreateIndex 120 /* synopsis: r[P2]=root iDb=P1 */
-#define OP_CreateTable 121 /* synopsis: r[P2]=root iDb=P1 */
-#define OP_ParseSchema 122
-#define OP_LoadAnalysis 123
-#define OP_DropTable 124
-#define OP_DropIndex 125
-#define OP_DropTrigger 126
-#define OP_IntegrityCk 127
-#define OP_RowSetAdd 128 /* synopsis: rowset(P1)=r[P2] */
-#define OP_RowSetRead 129 /* synopsis: r[P3]=rowset(P1) */
-#define OP_RowSetTest 130 /* synopsis: if r[P3] in rowset(P1) goto P2 */
-#define OP_Program 131
-#define OP_Param 132
+#define OP_Delete 98
+#define OP_ResetCount 99
+#define OP_SorterCompare 100 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
+#define OP_SorterData 101 /* synopsis: r[P2]=data */
+#define OP_RowKey 102 /* synopsis: r[P2]=key */
+#define OP_RowData 103 /* synopsis: r[P2]=data */
+#define OP_Rowid 104 /* synopsis: r[P2]=rowid */
+#define OP_NullRow 105
+#define OP_Last 106
+#define OP_SorterSort 107
+#define OP_Sort 108
+#define OP_Rewind 109
+#define OP_SorterInsert 110
+#define OP_IdxInsert 111 /* synopsis: key=r[P2] */
+#define OP_IdxDelete 112 /* synopsis: key=r[P2@P3] */
+#define OP_IdxRowid 113 /* synopsis: r[P2]=rowid */
+#define OP_IdxLE 114 /* synopsis: key=r[P3@P4] */
+#define OP_IdxGT 115 /* synopsis: key=r[P3@P4] */
+#define OP_IdxLT 116 /* synopsis: key=r[P3@P4] */
+#define OP_IdxGE 117 /* synopsis: key=r[P3@P4] */
+#define OP_Destroy 118
+#define OP_Clear 119
+#define OP_ResetSorter 120
+#define OP_CreateIndex 121 /* synopsis: r[P2]=root iDb=P1 */
+#define OP_CreateTable 122 /* synopsis: r[P2]=root iDb=P1 */
+#define OP_ParseSchema 123
+#define OP_LoadAnalysis 124
+#define OP_DropTable 125
+#define OP_DropIndex 126
+#define OP_DropTrigger 127
+#define OP_IntegrityCk 128
+#define OP_RowSetAdd 129 /* synopsis: rowset(P1)=r[P2] */
+#define OP_RowSetRead 130 /* synopsis: r[P3]=rowset(P1) */
+#define OP_RowSetTest 131 /* synopsis: if r[P3] in rowset(P1) goto P2 */
+#define OP_Program 132
#define OP_Real 133 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
-#define OP_FkCounter 134 /* synopsis: fkctr[P1]+=P2 */
-#define OP_FkIfZero 135 /* synopsis: if fkctr[P1]==0 goto P2 */
-#define OP_MemMax 136 /* synopsis: r[P1]=max(r[P1],r[P2]) */
-#define OP_IfPos 137 /* synopsis: if r[P1]>0 goto P2 */
-#define OP_IfNeg 138 /* synopsis: r[P1]+=P3, if r[P1]<0 goto P2 */
-#define OP_IfNotZero 139 /* synopsis: if r[P1]!=0 then r[P1]+=P3, goto P2 */
-#define OP_DecrJumpZero 140 /* synopsis: if (--r[P1])==0 goto P2 */
-#define OP_JumpZeroIncr 141 /* synopsis: if (r[P1]++)==0 ) goto P2 */
-#define OP_AggFinal 142 /* synopsis: accum=r[P1] N=P2 */
-#define OP_IncrVacuum 143
-#define OP_Expire 144
-#define OP_TableLock 145 /* synopsis: iDb=P1 root=P2 write=P3 */
-#define OP_VBegin 146
-#define OP_VCreate 147
-#define OP_VDestroy 148
-#define OP_VOpen 149
-#define OP_VColumn 150 /* synopsis: r[P3]=vcolumn(P2) */
-#define OP_VNext 151
-#define OP_VRename 152
-#define OP_Pagecount 153
-#define OP_MaxPgcnt 154
-#define OP_Init 155 /* synopsis: Start at P2 */
-#define OP_Noop 156
-#define OP_Explain 157
+#define OP_Param 134
+#define OP_FkCounter 135 /* synopsis: fkctr[P1]+=P2 */
+#define OP_FkIfZero 136 /* synopsis: if fkctr[P1]==0 goto P2 */
+#define OP_MemMax 137 /* synopsis: r[P1]=max(r[P1],r[P2]) */
+#define OP_IfPos 138 /* synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
+#define OP_SetIfNotPos 139 /* synopsis: if r[P1]<=0 then r[P2]=P3 */
+#define OP_IfNotZero 140 /* synopsis: if r[P1]!=0 then r[P1]-=P3, goto P2 */
+#define OP_DecrJumpZero 141 /* synopsis: if (--r[P1])==0 goto P2 */
+#define OP_JumpZeroIncr 142 /* synopsis: if (r[P1]++)==0 ) goto P2 */
+#define OP_AggStep0 143 /* synopsis: accum=r[P3] step(r[P2@P5]) */
+#define OP_AggStep 144 /* synopsis: accum=r[P3] step(r[P2@P5]) */
+#define OP_AggFinal 145 /* synopsis: accum=r[P1] N=P2 */
+#define OP_IncrVacuum 146
+#define OP_Expire 147
+#define OP_TableLock 148 /* synopsis: iDb=P1 root=P2 write=P3 */
+#define OP_VBegin 149
+#define OP_VCreate 150
+#define OP_VDestroy 151
+#define OP_VOpen 152
+#define OP_VColumn 153 /* synopsis: r[P3]=vcolumn(P2) */
+#define OP_VNext 154
+#define OP_VRename 155
+#define OP_Pagecount 156
+#define OP_MaxPgcnt 157
+#define OP_Init 158 /* synopsis: Start at P2 */
+#define OP_Noop 159
+#define OP_Explain 160
/* Properties such as "out2" or "jump" that are specified in
@@ -9952,26 +10606,27 @@ typedef struct VdbeOpList VdbeOpList;
#define OPFLG_OUT2 0x0010 /* out2: P2 is an output */
#define OPFLG_OUT3 0x0020 /* out3: P3 is an output */
#define OPFLG_INITIALIZER {\
-/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,\
-/* 8 */ 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00,\
-/* 16 */ 0x01, 0x01, 0x02, 0x12, 0x01, 0x02, 0x03, 0x08,\
-/* 24 */ 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10,\
-/* 32 */ 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x03, 0x02,\
+/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,\
+/* 8 */ 0x01, 0x00, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01,\
+/* 16 */ 0x02, 0x01, 0x02, 0x12, 0x03, 0x08, 0x00, 0x10,\
+/* 24 */ 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00,\
+/* 32 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x02,\
/* 40 */ 0x02, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x00,\
/* 48 */ 0x00, 0x00, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00,\
-/* 56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09,\
-/* 64 */ 0x09, 0x09, 0x04, 0x09, 0x09, 0x09, 0x09, 0x26,\
-/* 72 */ 0x26, 0x10, 0x10, 0x00, 0x03, 0x03, 0x0b, 0x0b,\
+/* 56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,\
+/* 64 */ 0x09, 0x09, 0x09, 0x04, 0x09, 0x09, 0x09, 0x26,\
+/* 72 */ 0x26, 0x09, 0x10, 0x10, 0x03, 0x03, 0x0b, 0x0b,\
/* 80 */ 0x0b, 0x0b, 0x0b, 0x0b, 0x00, 0x26, 0x26, 0x26,\
/* 88 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x00,\
-/* 96 */ 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\
-/* 104 */ 0x00, 0x01, 0x01, 0x01, 0x01, 0x04, 0x04, 0x00,\
-/* 112 */ 0x10, 0x01, 0x01, 0x01, 0x01, 0x10, 0x00, 0x00,\
-/* 120 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 128 */ 0x06, 0x23, 0x0b, 0x01, 0x10, 0x10, 0x00, 0x01,\
-/* 136 */ 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x01,\
-/* 144 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,\
-/* 152 */ 0x00, 0x10, 0x10, 0x01, 0x00, 0x00,}
+/* 96 */ 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 104 */ 0x10, 0x00, 0x01, 0x01, 0x01, 0x01, 0x04, 0x04,\
+/* 112 */ 0x00, 0x10, 0x01, 0x01, 0x01, 0x01, 0x10, 0x00,\
+/* 120 */ 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 128 */ 0x00, 0x06, 0x23, 0x0b, 0x01, 0x10, 0x10, 0x00,\
+/* 136 */ 0x01, 0x04, 0x03, 0x06, 0x03, 0x03, 0x03, 0x00,\
+/* 144 */ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 152 */ 0x00, 0x00, 0x01, 0x00, 0x10, 0x10, 0x01, 0x00,\
+/* 160 */ 0x00,}
/************** End of opcodes.h *********************************************/
/************** Continuing where we left off in vdbe.h ***********************/
@@ -9984,11 +10639,16 @@ SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(Parse*);
SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe*,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe*,int,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe*,int,int,int);
+SQLITE_PRIVATE int sqlite3VdbeGoto(Vdbe*,int);
+SQLITE_PRIVATE int sqlite3VdbeLoadString(Vdbe*,int,const char*);
+SQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe*,int,const char*,...);
SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(Vdbe*,int,int,int,int,const u8*,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int);
SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno);
SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*);
+SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, u32 addr, u8);
SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
@@ -10232,6 +10892,9 @@ SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
/* Functions used to configure a Pager object. */
SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *);
SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);
+#ifdef SQLITE_HAS_CODEC
+SQLITE_PRIVATE void sqlite3PagerAlignReserve(Pager*,Pager*);
+#endif
SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int);
SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int);
SQLITE_PRIVATE void sqlite3PagerSetMmapLimit(Pager *, sqlite3_int64);
@@ -10287,7 +10950,9 @@ SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager);
/* Functions used to query pager state and configuration. */
SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*);
SQLITE_PRIVATE u32 sqlite3PagerDataVersion(Pager*);
-SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*);
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*);
+#endif
SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*);
SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*, int);
SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager*);
@@ -10378,14 +11043,14 @@ struct PgHdr {
};
/* Bit values for PgHdr.flags */
-#define PGHDR_DIRTY 0x002 /* Page has changed */
-#define PGHDR_NEED_SYNC 0x004 /* Fsync the rollback journal before
- ** writing this page to the database */
-#define PGHDR_NEED_READ 0x008 /* Content is unread */
-#define PGHDR_REUSE_UNLIKELY 0x010 /* A hint that reuse is unlikely */
-#define PGHDR_DONT_WRITE 0x020 /* Do not write content to disk */
-
-#define PGHDR_MMAP 0x040 /* This is an mmap page object */
+#define PGHDR_CLEAN 0x001 /* Page not on the PCache.pDirty list */
+#define PGHDR_DIRTY 0x002 /* Page is on the PCache.pDirty list */
+#define PGHDR_WRITEABLE 0x004 /* Journaled and ready to modify */
+#define PGHDR_NEED_SYNC 0x008 /* Fsync the rollback journal before
+ ** writing this page to the database */
+#define PGHDR_NEED_READ 0x010 /* Content is unread */
+#define PGHDR_DONT_WRITE 0x020 /* Do not write content to disk */
+#define PGHDR_MMAP 0x040 /* This is an mmap page object */
/* Initialize and shutdown the page cache subsystem */
SQLITE_PRIVATE int sqlite3PcacheInitialize(void);
@@ -11169,6 +11834,7 @@ struct sqlite3 {
#define SQLITE_QueryOnly 0x02000000 /* Disable database changes */
#define SQLITE_VdbeEQP 0x04000000 /* Debug EXPLAIN QUERY PLAN */
#define SQLITE_Vacuum 0x08000000 /* Currently in a VACUUM */
+#define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
/*
@@ -11263,18 +11929,20 @@ struct FuncDestructor {
** values must correspond to OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG. There
** are assert() statements in the code to verify this.
*/
-#define SQLITE_FUNC_ENCMASK 0x003 /* SQLITE_UTF8, SQLITE_UTF16BE or UTF16LE */
-#define SQLITE_FUNC_LIKE 0x004 /* Candidate for the LIKE optimization */
-#define SQLITE_FUNC_CASE 0x008 /* Case-sensitive LIKE-type function */
-#define SQLITE_FUNC_EPHEM 0x010 /* Ephemeral. Delete with VDBE */
-#define SQLITE_FUNC_NEEDCOLL 0x020 /* sqlite3GetFuncCollSeq() might be called */
-#define SQLITE_FUNC_LENGTH 0x040 /* Built-in length() function */
-#define SQLITE_FUNC_TYPEOF 0x080 /* Built-in typeof() function */
-#define SQLITE_FUNC_COUNT 0x100 /* Built-in count(*) aggregate */
-#define SQLITE_FUNC_COALESCE 0x200 /* Built-in coalesce() or ifnull() */
-#define SQLITE_FUNC_UNLIKELY 0x400 /* Built-in unlikely() function */
-#define SQLITE_FUNC_CONSTANT 0x800 /* Constant inputs give a constant output */
-#define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
+#define SQLITE_FUNC_ENCMASK 0x0003 /* SQLITE_UTF8, SQLITE_UTF16BE or UTF16LE */
+#define SQLITE_FUNC_LIKE 0x0004 /* Candidate for the LIKE optimization */
+#define SQLITE_FUNC_CASE 0x0008 /* Case-sensitive LIKE-type function */
+#define SQLITE_FUNC_EPHEM 0x0010 /* Ephemeral. Delete with VDBE */
+#define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/
+#define SQLITE_FUNC_LENGTH 0x0040 /* Built-in length() function */
+#define SQLITE_FUNC_TYPEOF 0x0080 /* Built-in typeof() function */
+#define SQLITE_FUNC_COUNT 0x0100 /* Built-in count(*) aggregate */
+#define SQLITE_FUNC_COALESCE 0x0200 /* Built-in coalesce() or ifnull() */
+#define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */
+#define SQLITE_FUNC_CONSTANT 0x0800 /* Constant inputs give a constant output */
+#define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
+#define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
+ ** single query - might change over time */
/*
** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
@@ -11290,6 +11958,12 @@ struct FuncDestructor {
** VFUNCTION(zName, nArg, iArg, bNC, xFunc)
** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag.
**
+** DFUNCTION(zName, nArg, iArg, bNC, xFunc)
+** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag and
+** adds the SQLITE_FUNC_SLOCHNG flag. Used for date & time functions
+** and functions like sqlite_version() that can change, but not during
+** a single query.
+**
** AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)
** Used to create an aggregate function definition implemented by
** the C functions xStep and xFinal. The first four parameters
@@ -11310,11 +11984,14 @@ struct FuncDestructor {
#define VFUNCTION(zName, nArg, iArg, bNC, xFunc) \
{nArg, SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
+#define DFUNCTION(zName, nArg, iArg, bNC, xFunc) \
+ {nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
+ SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
#define FUNCTION2(zName, nArg, iArg, bNC, xFunc, extraFlags) \
{nArg,SQLITE_FUNC_CONSTANT|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL)|extraFlags,\
SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
- {nArg, SQLITE_FUNC_CONSTANT|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
+ {nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
pArg, 0, xFunc, 0, 0, #zName, 0, 0}
#define LIKEFUNC(zName, nArg, arg, flags) \
{nArg, SQLITE_FUNC_CONSTANT|SQLITE_UTF8|flags, \
@@ -11358,6 +12035,7 @@ struct Module {
const char *zName; /* Name passed to create_module() */
void *pAux; /* pAux passed to create_module() */
void (*xDestroy)(void *); /* Module destructor function */
+ Table *pEpoTab; /* Eponymous table for this module */
};
/*
@@ -11403,6 +12081,7 @@ struct CollSeq {
*/
#define SQLITE_SO_ASC 0 /* Sort in ascending order */
#define SQLITE_SO_DESC 1 /* Sort in ascending order */
+#define SQLITE_SO_UNDEFINED -1 /* No sort order specified */
/*
** Column affinity types.
@@ -11416,9 +12095,9 @@ struct CollSeq {
** used as the P4 operand, they will be more readable.
**
** Note also that the numeric types are grouped together so that testing
-** for a numeric type is a single comparison. And the NONE type is first.
+** for a numeric type is a single comparison. And the BLOB type is first.
*/
-#define SQLITE_AFF_NONE 'A'
+#define SQLITE_AFF_BLOB 'A'
#define SQLITE_AFF_TEXT 'B'
#define SQLITE_AFF_NUMERIC 'C'
#define SQLITE_AFF_INTEGER 'D'
@@ -11509,9 +12188,8 @@ struct Table {
Select *pSelect; /* NULL for tables. Points to definition if a view. */
FKey *pFKey; /* Linked list of all foreign keys in this table */
char *zColAff; /* String defining the affinity of each column */
-#ifndef SQLITE_OMIT_CHECK
ExprList *pCheck; /* All CHECK constraints */
-#endif
+ /* ... also used as column name list in a VIEW */
int tnum; /* Root BTree page for this table */
i16 iPKey; /* If not negative, use aCol[iPKey] as the rowid */
i16 nCol; /* Number of columns in this table */
@@ -11528,7 +12206,7 @@ struct Table {
#endif
#ifndef SQLITE_OMIT_VIRTUALTABLE
int nModuleArg; /* Number of arguments to the module */
- char **azModuleArg; /* Text of all module args. [0] is module name */
+ char **azModuleArg; /* 0: module 1: schema 2: vtab name 3...: args */
VTable *pVTable; /* List of VTable objects. */
#endif
Trigger *pTrigger; /* List of triggers stored in pSchema */
@@ -11550,8 +12228,9 @@ struct Table {
#define TF_HasPrimaryKey 0x04 /* Table has a primary key */
#define TF_Autoincrement 0x08 /* Integer primary key is autoincrement */
#define TF_Virtual 0x10 /* Is a virtual table */
-#define TF_WithoutRowid 0x20 /* No rowid used. PRIMARY KEY is the key */
-#define TF_OOOHidden 0x40 /* Out-of-Order hidden columns */
+#define TF_WithoutRowid 0x20 /* No rowid. PRIMARY KEY is the key */
+#define TF_NoVisibleRowid 0x40 /* No user-visible "rowid" column */
+#define TF_OOOHidden 0x80 /* Out-of-Order hidden columns */
/*
@@ -11569,6 +12248,7 @@ struct Table {
/* Does the table have a rowid */
#define HasRowid(X) (((X)->tabFlags & TF_WithoutRowid)==0)
+#define VisibleRowid(X) (((X)->tabFlags & TF_NoVisibleRowid)==0)
/*
** Each foreign key constraint is an instance of the following structure.
@@ -11727,6 +12407,14 @@ struct UnpackedRecord {
** and the value of Index.onError indicate the which conflict resolution
** algorithm to employ whenever an attempt is made to insert a non-unique
** element.
+**
+** While parsing a CREATE TABLE or CREATE INDEX statement in order to
+** generate VDBE code (as opposed to parsing one read from an sqlite_master
+** table as part of parsing an existing database schema), transient instances
+** of this structure may be created. In this case the Index.tnum variable is
+** used to store the address of a VDBE instruction, not a database page
+** number (it cannot - the database page is not allocated until the VDBE
+** program is executed). See convertToWithoutRowidTable() for details.
*/
struct Index {
char *zName; /* Name of this index */
@@ -11739,6 +12427,7 @@ struct Index {
u8 *aSortOrder; /* for each column: True==DESC, False==ASC */
char **azColl; /* Array of collation sequence names for index */
Expr *pPartIdxWhere; /* WHERE clause for partial indices */
+ ExprList *aColExpr; /* Column expressions */
int tnum; /* DB Page containing root of this index */
LogEst szIdxRow; /* Estimated average row size in bytes */
u16 nKeyCol; /* Number of columns forming the key */
@@ -11773,6 +12462,12 @@ struct Index {
/* Return true if index X is a UNIQUE index */
#define IsUniqueIndex(X) ((X)->onError!=OE_None)
+/* The Index.aiColumn[] values are normally positive integer. But
+** there are some negative values that have special meaning:
+*/
+#define XN_ROWID (-1) /* Indexed column is the rowid */
+#define XN_EXPR (-2) /* Indexed column is an expression */
+
/*
** Each sample stored in the sqlite_stat3 table is represented in memory
** using a structure of this type. See documentation at the top of the
@@ -11988,9 +12683,10 @@ struct Expr {
#define EP_MemToken 0x010000 /* Need to sqlite3DbFree() Expr.zToken */
#define EP_NoReduce 0x020000 /* Cannot EXPRDUP_REDUCE this Expr */
#define EP_Unlikely 0x040000 /* unlikely() or likelihood() function */
-#define EP_ConstFunc 0x080000 /* Node is a SQLITE_FUNC_CONSTANT function */
+#define EP_ConstFunc 0x080000 /* A SQLITE_FUNC_CONSTANT or _SLOCHNG function */
#define EP_CanBeNull 0x100000 /* Can be null despite NOT NULL constraint */
#define EP_Subquery 0x200000 /* Tree contains a TK_SELECT operator */
+#define EP_Alias 0x400000 /* Is an alias for a result set column */
/*
** Combinations of two or more EP_* flags
@@ -12153,11 +12849,15 @@ struct SrcList {
int addrFillSub; /* Address of subroutine to manifest a subquery */
int regReturn; /* Register holding return address of addrFillSub */
int regResult; /* Registers holding results of a co-routine */
- u8 jointype; /* Type of join between this able and the previous */
- unsigned notIndexed :1; /* True if there is a NOT INDEXED clause */
- unsigned isCorrelated :1; /* True if sub-query is correlated */
- unsigned viaCoroutine :1; /* Implemented as a co-routine */
- unsigned isRecursive :1; /* True for recursive reference in WITH */
+ struct {
+ u8 jointype; /* Type of join between this able and the previous */
+ unsigned notIndexed :1; /* True if there is a NOT INDEXED clause */
+ unsigned isIndexedBy :1; /* True if there is an INDEXED BY clause */
+ unsigned isTabFunc :1; /* True if table-valued-function syntax */
+ unsigned isCorrelated :1; /* True if sub-query is correlated */
+ unsigned viaCoroutine :1; /* Implemented as a co-routine */
+ unsigned isRecursive :1; /* True for recursive reference in WITH */
+ } fg;
#ifndef SQLITE_OMIT_EXPLAIN
u8 iSelectId; /* If pSelect!=0, the id of the sub-select in EQP */
#endif
@@ -12165,8 +12865,11 @@ struct SrcList {
Expr *pOn; /* The ON clause of a join */
IdList *pUsing; /* The USING clause of a join */
Bitmask colUsed; /* Bit N (1<<N) set if column N of pTab is used */
- char *zIndex; /* Identifier from "INDEXED BY <zIndex>" clause */
- Index *pIndex; /* Index structure corresponding to zIndex, if any */
+ union {
+ char *zIndexedBy; /* Identifier from "INDEXED BY <zIndex>" clause */
+ ExprList *pFuncArg; /* Arguments to table-valued-function */
+ } u1;
+ Index *pIBIndex; /* Index structure corresponding to u1.zIndexedBy */
} a[1]; /* One entry for each identifier on the list */
};
@@ -12200,6 +12903,7 @@ struct SrcList {
#define WHERE_WANT_DISTINCT 0x0400 /* All output needs to be distinct */
#define WHERE_SORTBYGROUP 0x0800 /* Support sqlite3WhereIsSorted() */
#define WHERE_REOPEN_IDX 0x1000 /* Try to use OP_ReopenIdx */
+#define WHERE_ONEPASS_MULTIROW 0x2000 /* ONEPASS is ok with multiple rows */
/* Allowed return values from sqlite3WhereIsDistinct()
*/
@@ -12252,6 +12956,7 @@ struct NameContext {
#define NC_IsCheck 0x0004 /* True if resolving names in a CHECK constraint */
#define NC_InAggFunc 0x0008 /* True if analyzing arguments to an agg func */
#define NC_PartIdx 0x0010 /* True if resolving a partial index WHERE */
+#define NC_IdxExpr 0x0020 /* True if resolving columns of CREATE INDEX */
#define NC_MinMaxAgg 0x1000 /* min/max aggregates seen. See note above */
/*
@@ -12301,19 +13006,20 @@ struct Select {
** "Select Flag".
*/
#define SF_Distinct 0x0001 /* Output should be DISTINCT */
-#define SF_Resolved 0x0002 /* Identifiers have been resolved */
-#define SF_Aggregate 0x0004 /* Contains aggregate functions */
-#define SF_UsesEphemeral 0x0008 /* Uses the OpenEphemeral opcode */
-#define SF_Expanded 0x0010 /* sqlite3SelectExpand() called on this */
-#define SF_HasTypeInfo 0x0020 /* FROM subqueries have Table metadata */
-#define SF_Compound 0x0040 /* Part of a compound query */
-#define SF_Values 0x0080 /* Synthesized from VALUES clause */
-#define SF_MultiValue 0x0100 /* Single VALUES term with multiple rows */
-#define SF_NestedFrom 0x0200 /* Part of a parenthesized FROM clause */
-#define SF_MaybeConvert 0x0400 /* Need convertCompoundSelectToSubquery() */
-#define SF_Recursive 0x0800 /* The recursive part of a recursive CTE */
+#define SF_All 0x0002 /* Includes the ALL keyword */
+#define SF_Resolved 0x0004 /* Identifiers have been resolved */
+#define SF_Aggregate 0x0008 /* Contains aggregate functions */
+#define SF_UsesEphemeral 0x0010 /* Uses the OpenEphemeral opcode */
+#define SF_Expanded 0x0020 /* sqlite3SelectExpand() called on this */
+#define SF_HasTypeInfo 0x0040 /* FROM subqueries have Table metadata */
+#define SF_Compound 0x0080 /* Part of a compound query */
+#define SF_Values 0x0100 /* Synthesized from VALUES clause */
+#define SF_MultiValue 0x0200 /* Single VALUES term with multiple rows */
+#define SF_NestedFrom 0x0400 /* Part of a parenthesized FROM clause */
+#define SF_MaybeConvert 0x0800 /* Need convertCompoundSelectToSubquery() */
#define SF_MinMaxAgg 0x1000 /* Aggregate containing min() or max() */
-#define SF_Converted 0x2000 /* By convertCompoundSelectToSubquery() */
+#define SF_Recursive 0x2000 /* The recursive part of a recursive CTE */
+#define SF_Converted 0x4000 /* By convertCompoundSelectToSubquery() */
/*
@@ -12520,7 +13226,7 @@ struct Parse {
int nOpAlloc; /* Number of slots allocated for Vdbe.aOp[] */
int iFixedOp; /* Never back out opcodes iFixedOp-1 or earlier */
int ckBase; /* Base register of data during check constraints */
- int iPartIdxTab; /* Table corresponding to a partial index */
+ int iSelfTab; /* Table of an index whose exprs are being coded */
int iCacheLevel; /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
int iCacheCnt; /* Counter used to generate aColCache[].lru values */
int nLabel; /* Number of labels used */
@@ -12555,7 +13261,6 @@ struct Parse {
Parse *pToplevel; /* Parse structure for main program (or NULL) */
Table *pTriggerTab; /* Table triggers are being coded for */
int addrCrTab; /* Address of OP_CreateTable opcode on CREATE TABLE */
- int addrSkipPK; /* Address of instruction to skip PRIMARY KEY index */
u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
u32 oldmask; /* Mask of old.* columns referenced */
u32 newmask; /* Mask of new.* columns referenced */
@@ -12891,7 +13596,7 @@ struct With {
char *zName; /* Name of this CTE */
ExprList *pCols; /* List of explicit column names, or NULL */
Select *pSelect; /* The definition of this CTE */
- const char *zErr; /* Error message for circular references */
+ const char *zCteErr; /* Error message for circular references */
} a[1];
};
@@ -12971,7 +13676,9 @@ SQLITE_PRIVATE int sqlite3CantopenError(int);
# define sqlite3Isxdigit(x) isxdigit((unsigned char)(x))
# define sqlite3Tolower(x) tolower((unsigned char)(x))
#endif
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
SQLITE_PRIVATE int sqlite3IsIdChar(u8);
+#endif
/*
** Internal function prototypes
@@ -12999,7 +13706,9 @@ SQLITE_PRIVATE void sqlite3ScratchFree(void*);
SQLITE_PRIVATE void *sqlite3PageMalloc(int);
SQLITE_PRIVATE void sqlite3PageFree(void*);
SQLITE_PRIVATE void sqlite3MemSetDefault(void);
+#ifndef SQLITE_OMIT_BUILTIN_TEST
SQLITE_PRIVATE void sqlite3BenignMallocHooks(void (*)(void), void (*)(void));
+#endif
SQLITE_PRIVATE int sqlite3HeapNearlyFull(void);
/*
@@ -13035,6 +13744,11 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int);
SQLITE_PRIVATE int sqlite3MutexInit(void);
SQLITE_PRIVATE int sqlite3MutexEnd(void);
#endif
+#if !defined(SQLITE_MUTEX_OMIT) && !defined(SQLITE_MUTEX_NOOP)
+SQLITE_PRIVATE void sqlite3MemoryBarrier(void);
+#else
+# define sqlite3MemoryBarrier()
+#endif
SQLITE_PRIVATE sqlite3_int64 sqlite3StatusValue(int);
SQLITE_PRIVATE void sqlite3StatusUp(int, int);
@@ -13067,7 +13781,6 @@ SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, u32, const char*, va_list);
SQLITE_PRIVATE void sqlite3XPrintf(StrAccum*, u32, const char*, ...);
SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
-SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)
SQLITE_PRIVATE void sqlite3DebugPrintf(const char*, ...);
#endif
@@ -13076,17 +13789,13 @@ SQLITE_PRIVATE void *sqlite3TestTextToPtr(const char*);
#endif
#if defined(SQLITE_DEBUG)
-SQLITE_PRIVATE TreeView *sqlite3TreeViewPush(TreeView*,u8);
-SQLITE_PRIVATE void sqlite3TreeViewPop(TreeView*);
-SQLITE_PRIVATE void sqlite3TreeViewLine(TreeView*, const char*, ...);
-SQLITE_PRIVATE void sqlite3TreeViewItem(TreeView*, const char*, u8);
SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView*, const Expr*, u8);
SQLITE_PRIVATE void sqlite3TreeViewExprList(TreeView*, const ExprList*, u8, const char*);
SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView*, const Select*, u8);
#endif
-SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
+SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*);
SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...);
SQLITE_PRIVATE int sqlite3Dequote(char*);
SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int);
@@ -13106,6 +13815,7 @@ SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse*,ExprList*, Token*);
SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*);
SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);
+SQLITE_PRIVATE void sqlite3ExprListSetSortOrder(ExprList*,int);
SQLITE_PRIVATE void sqlite3ExprListSetName(Parse*,ExprList*,Token*,int);
SQLITE_PRIVATE void sqlite3ExprListSetSpan(Parse*,ExprList*,ExprSpan*);
SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);
@@ -13118,6 +13828,8 @@ SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3*,int);
SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3*);
SQLITE_PRIVATE void sqlite3BeginParse(Parse*,int);
SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
+SQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3*,Table*);
+SQLITE_PRIVATE int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**);
SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*);
SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *, int);
SQLITE_PRIVATE Index *sqlite3PrimaryKeyIndex(Table*);
@@ -13144,11 +13856,14 @@ SQLITE_PRIVATE int sqlite3FaultSim(int);
SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);
SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);
+SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec*, u32);
SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
SQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec*);
SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
+#ifndef SQLITE_OMIT_BUILTIN_TEST
SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int,int*);
+#endif
SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);
SQLITE_PRIVATE void sqlite3RowSetClear(RowSet*);
@@ -13156,7 +13871,7 @@ SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet*, i64);
SQLITE_PRIVATE int sqlite3RowSetTest(RowSet*, int iBatch, i64);
SQLITE_PRIVATE int sqlite3RowSetNext(RowSet*, i64*);
-SQLITE_PRIVATE void sqlite3CreateView(Parse*,Token*,Token*,Token*,Select*,int,int);
+SQLITE_PRIVATE void sqlite3CreateView(Parse*,Token*,Token*,Token*,ExprList*,Select*,int,int);
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse*,Table*);
@@ -13186,6 +13901,7 @@ SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*)
SQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(Parse*, SrcList*, Token*, Token*,
Token*, Select*, Expr*, IdList*);
SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *, SrcList *, Token *);
+SQLITE_PRIVATE void sqlite3SrcListFuncArgs(Parse*, SrcList*, ExprList*);
SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *, struct SrcList_item *);
SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList*);
SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse*, SrcList*);
@@ -13216,6 +13932,10 @@ SQLITE_PRIVATE int sqlite3WhereIsSorted(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereOkOnePass(WhereInfo*, int*);
+#define ONEPASS_OFF 0 /* Use of ONEPASS not allowed */
+#define ONEPASS_SINGLE 1 /* ONEPASS valid for a single row update */
+#define ONEPASS_MULTI 2 /* ONEPASS is valid for multiple rows */
+SQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(Parse*, Index*, int, int, int);
SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, u8);
SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int);
SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int);
@@ -13231,11 +13951,13 @@ SQLITE_PRIVATE void sqlite3ExprCodeAtInit(Parse*, Expr*, int, u8);
SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);
SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);
SQLITE_PRIVATE void sqlite3ExprCodeAndCache(Parse*, Expr*, int);
-SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, u8);
+SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int, u8);
#define SQLITE_ECEL_DUP 0x01 /* Deep, not shallow copies */
#define SQLITE_ECEL_FACTOR 0x02 /* Factor out constant terms */
+#define SQLITE_ECEL_REF 0x04 /* Use ExprList.u.x.iOrderByCol */
SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse*, Expr*, int, int);
SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse*, Expr*, int, int);
+SQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse*, Expr*, int, int);
SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*);
SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,int isView,struct SrcList_item *);
@@ -13252,8 +13974,10 @@ SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);
SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr*, SrcList*);
SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*);
+#ifndef SQLITE_OMIT_BUILTIN_TEST
SQLITE_PRIVATE void sqlite3PrngSaveState(void);
SQLITE_PRIVATE void sqlite3PrngRestoreState(void);
+#endif
SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*,int);
SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse*, int);
SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb);
@@ -13271,8 +13995,9 @@ SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr*, int*);
SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);
SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
SQLITE_PRIVATE int sqlite3IsRowid(const char*);
-SQLITE_PRIVATE void sqlite3GenerateRowDelete(Parse*,Table*,Trigger*,int,int,int,i16,u8,u8,u8);
-SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int, int*);
+SQLITE_PRIVATE void sqlite3GenerateRowDelete(
+ Parse*,Table*,Trigger*,int,int,int,i16,u8,u8,u8,int);
+SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int, int*, int);
SQLITE_PRIVATE int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int, int*,Index*,int);
SQLITE_PRIVATE void sqlite3ResolvePartIdxLabel(Parse*,int);
SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(Parse*,Table*,int*,int,int,int,int,
@@ -13330,6 +14055,7 @@ SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3*, Trigger*);
SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
SQLITE_PRIVATE u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Table*,int);
# define sqlite3ParseToplevel(p) ((p)->pToplevel ? (p)->pToplevel : (p))
+# define sqlite3IsToplevel(p) ((p)->pToplevel==0)
#else
# define sqlite3TriggersExist(B,C,D,E,F) 0
# define sqlite3DeleteTrigger(A,B)
@@ -13339,6 +14065,7 @@ SQLITE_PRIVATE u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Tab
# define sqlite3CodeRowTriggerDirect(A,B,C,D,E,F)
# define sqlite3TriggerList(X, Y) 0
# define sqlite3ParseToplevel(p) p
+# define sqlite3IsToplevel(p) 1
# define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0
#endif
@@ -13402,7 +14129,7 @@ SQLITE_PRIVATE int sqlite3VarintLen(u64 v);
#define putVarint sqlite3PutVarint
-SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *, Index *);
+SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3*, Index*);
SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe*, Table*, int);
SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2);
SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
@@ -13471,8 +14198,10 @@ SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
+SQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p);
SQLITE_PRIVATE int sqlite3MatchSpanName(const char*, const char*, const char*, const char*);
SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);
+SQLITE_PRIVATE int sqlite3ResolveExprListNames(NameContext*, ExprList*);
SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
SQLITE_PRIVATE void sqlite3ResolveSelfReference(Parse*,Table*,int,Expr*,ExprList*);
SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
@@ -13581,6 +14310,8 @@ SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe*, sqlite3_vtab*);
SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
# define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)
#endif
+SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse*,Module*);
+SQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3*,Module*);
SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse*,Table*);
SQLITE_PRIVATE void sqlite3VtabBeginParse(Parse*, Token*, Token*, Token*, int);
SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse*, Token*);
@@ -13783,6 +14514,10 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(SQLiteThread**,void*(*)(void*),void*);
SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread*, void**);
#endif
+#if defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)
+SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3*);
+#endif
+
#endif /* _SQLITEINT_H_ */
/************** End of sqliteInt.h *******************************************/
@@ -13801,6 +14536,7 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread*, void**);
**
** This file contains definitions of global variables and constants.
*/
+/* #include "sqliteInt.h" */
/* An array to map all upper-case characters into their corresponding
** lower-case character.
@@ -13974,7 +14710,7 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
0, /* nScratch */
(void*)0, /* pPage */
0, /* szPage */
- 0, /* nPage */
+ SQLITE_DEFAULT_PCACHE_INITSZ, /* nPage */
0, /* mxParserStack */
0, /* sharedCacheEnabled */
SQLITE_SORTER_PMASZ, /* szPma */
@@ -14040,6 +14776,7 @@ SQLITE_PRIVATE const Token sqlite3IntTokens[] = {
SQLITE_PRIVATE int sqlite3PendingByte = 0x40000000;
#endif
+/* #include "opcodes.h" */
/*
** Properties of opcodes. The OPFLG_INITIALIZER macro is
** created by mkopcodeh.awk during compilation. Data is obtained
@@ -14068,6 +14805,7 @@ SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+/* #include "sqliteInt.h" */
/*
** An array of names of all compile-time options. This array should
@@ -14147,12 +14885,18 @@ static const char * const azCompileOpt[] = {
#if SQLITE_ENABLE_FTS4
"ENABLE_FTS4",
#endif
+#if SQLITE_ENABLE_FTS5
+ "ENABLE_FTS5",
+#endif
#if SQLITE_ENABLE_ICU
"ENABLE_ICU",
#endif
#if SQLITE_ENABLE_IOTRACE
"ENABLE_IOTRACE",
#endif
+#if SQLITE_ENABLE_JSON1
+ "ENABLE_JSON1",
+#endif
#if SQLITE_ENABLE_LOAD_EXTENSION
"ENABLE_LOAD_EXTENSION",
#endif
@@ -14497,6 +15241,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N){
** This module implements the sqlite3_status() interface and related
** functionality.
*/
+/* #include "sqliteInt.h" */
/************** Include vdbeInt.h in the middle of status.c ******************/
/************** Begin file vdbeInt.h *****************************************/
/*
@@ -14584,6 +15329,9 @@ struct VdbeCursor {
i64 seqCount; /* Sequence counter */
i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */
VdbeSorter *pSorter; /* Sorter object for OP_SorterOpen cursors */
+#ifdef SQLITE_ENABLE_COLUMN_USED_MASK
+ u64 maskUsed; /* Mask of columns used by this cursor */
+#endif
/* Cached information about the header for the data record that the
** cursor is currently pointing to. Only valid if cacheStatus matches
@@ -14673,6 +15421,7 @@ struct Mem {
} u;
u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
u8 enc; /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */
+ u8 eSubtype; /* Subtype for this value */
int n; /* Number of characters in string value, excluding '\0' */
char *z; /* String or BLOB value */
/* ShallowCopy only needs to copy the information above */
@@ -14687,6 +15436,12 @@ struct Mem {
#endif
};
+/*
+** Size of struct Mem not including the Mem.zMalloc member or anything that
+** follows.
+*/
+#define MEMCELLSIZE offsetof(Mem,zMalloc)
+
/* One or more of the following flags are set to indicate the validOK
** representations of the value stored in the Mem struct.
**
@@ -14771,14 +15526,16 @@ struct AuxData {
** (Mem) which are only defined there.
*/
struct sqlite3_context {
- Mem *pOut; /* The return value is stored here */
- FuncDef *pFunc; /* Pointer to function information */
- Mem *pMem; /* Memory cell used to store aggregate context */
- Vdbe *pVdbe; /* The VM that owns this context */
- int iOp; /* Instruction number of OP_Function */
- int isError; /* Error code returned by the function. */
- u8 skipFlag; /* Skip accumulator loading if true */
- u8 fErrorOrAux; /* isError!=0 or pVdbe->pAuxData modified */
+ Mem *pOut; /* The return value is stored here */
+ FuncDef *pFunc; /* Pointer to function information */
+ Mem *pMem; /* Memory cell used to store aggregate context */
+ Vdbe *pVdbe; /* The VM that owns this context */
+ int iOp; /* Instruction number of OP_Function */
+ int isError; /* Error code returned by the function. */
+ u8 skipFlag; /* Skip accumulator loading if true */
+ u8 fErrorOrAux; /* isError!=0 or pVdbe->pAuxData modified */
+ u8 argc; /* Number of arguments */
+ sqlite3_value *argv[1]; /* Argument set */
};
/*
@@ -14892,6 +15649,7 @@ struct Vdbe {
/*
** Function prototypes
*/
+SQLITE_PRIVATE void sqlite3VdbeError(Vdbe*, const char *, ...);
SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *, VdbeCursor*);
void sqliteVdbePopStack(Vdbe*,int);
SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor*);
@@ -15368,6 +16126,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
** Willmann-Bell, Inc
** Richmond, Virginia (USA)
*/
+/* #include "sqliteInt.h" */
/* #include <stdlib.h> */
/* #include <assert.h> */
#include <time.h>
@@ -15679,7 +16438,7 @@ static void computeYMD(DateTime *p){
A = Z + 1 + A - (A/4);
B = A + 1524;
C = (int)((B - 122.1)/365.25);
- D = (36525*C)/100;
+ D = (36525*(C&32767))/100;
E = (int)((B-D)/30.6001);
X1 = (int)(30.6001*E);
p->D = B - D - X1;
@@ -16439,14 +17198,14 @@ static void currentTimeFunc(
SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){
static SQLITE_WSD FuncDef aDateTimeFuncs[] = {
#ifndef SQLITE_OMIT_DATETIME_FUNCS
- FUNCTION(julianday, -1, 0, 0, juliandayFunc ),
- FUNCTION(date, -1, 0, 0, dateFunc ),
- FUNCTION(time, -1, 0, 0, timeFunc ),
- FUNCTION(datetime, -1, 0, 0, datetimeFunc ),
- FUNCTION(strftime, -1, 0, 0, strftimeFunc ),
- FUNCTION(current_time, 0, 0, 0, ctimeFunc ),
- FUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
- FUNCTION(current_date, 0, 0, 0, cdateFunc ),
+ DFUNCTION(julianday, -1, 0, 0, juliandayFunc ),
+ DFUNCTION(date, -1, 0, 0, dateFunc ),
+ DFUNCTION(time, -1, 0, 0, timeFunc ),
+ DFUNCTION(datetime, -1, 0, 0, datetimeFunc ),
+ DFUNCTION(strftime, -1, 0, 0, strftimeFunc ),
+ DFUNCTION(current_time, 0, 0, 0, ctimeFunc ),
+ DFUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
+ DFUNCTION(current_date, 0, 0, 0, cdateFunc ),
#else
STR_FUNCTION(current_time, 0, "%H:%M:%S", 0, currentTimeFunc),
STR_FUNCTION(current_date, 0, "%Y-%m-%d", 0, currentTimeFunc),
@@ -16480,6 +17239,7 @@ SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){
** architectures.
*/
#define _SQLITE_OS_C_ 1
+/* #include "sqliteInt.h" */
#undef _SQLITE_OS_C_
/*
@@ -16886,6 +17646,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
** during a hash table resize is a benign fault.
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_BUILTIN_TEST
@@ -16967,6 +17728,7 @@ SQLITE_PRIVATE void sqlite3EndBenignMalloc(void){
** are merely placeholders. Real drivers must be substituted using
** sqlite3_config() before SQLite will operate.
*/
+/* #include "sqliteInt.h" */
/*
** This version of the memory allocator is the default. It is
@@ -17053,6 +17815,7 @@ SQLITE_PRIVATE void sqlite3MemSetDefault(void){
** be necessary when compiling for Delphi,
** for example.
*/
+/* #include "sqliteInt.h" */
/*
** This version of the memory allocator is the default. It is
@@ -17328,6 +18091,7 @@ SQLITE_PRIVATE void sqlite3MemSetDefault(void){
** This file contains implementations of the low-level memory allocation
** routines specified in the sqlite3_mem_methods object.
*/
+/* #include "sqliteInt.h" */
/*
** This version of the memory allocator is used only if the
@@ -17862,6 +18626,7 @@ SQLITE_PRIVATE int sqlite3MemdebugMallocCount(){
** This version of the memory allocation subsystem is included
** in the build only if SQLITE_ENABLE_MEMSYS3 is defined.
*/
+/* #include "sqliteInt.h" */
/*
** This version of the memory allocator is only built into the library
@@ -18576,6 +19341,7 @@ SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void){
** The sqlite3_status() logic tracks the maximum values of n and M so
** that an application can, at any time, verify this constraint.
*/
+/* #include "sqliteInt.h" */
/*
** This version of the memory allocator is used only when
@@ -19119,6 +19885,7 @@ SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void){
**
** This file contains code that is common across all mutex implementations.
*/
+/* #include "sqliteInt.h" */
#if defined(SQLITE_DEBUG) && !defined(SQLITE_MUTEX_OMIT)
/*
@@ -19127,7 +19894,7 @@ SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void){
** allocate a mutex while the system is uninitialized.
*/
static SQLITE_WSD int mutexIsInit = 0;
-#endif /* SQLITE_DEBUG */
+#endif /* SQLITE_DEBUG && !defined(SQLITE_MUTEX_OMIT) */
#ifndef SQLITE_MUTEX_OMIT
@@ -19150,11 +19917,18 @@ SQLITE_PRIVATE int sqlite3MutexInit(void){
}else{
pFrom = sqlite3NoopMutex();
}
- memcpy(pTo, pFrom, offsetof(sqlite3_mutex_methods, xMutexAlloc));
- memcpy(&pTo->xMutexFree, &pFrom->xMutexFree,
- sizeof(*pTo) - offsetof(sqlite3_mutex_methods, xMutexFree));
+ pTo->xMutexInit = pFrom->xMutexInit;
+ pTo->xMutexEnd = pFrom->xMutexEnd;
+ pTo->xMutexFree = pFrom->xMutexFree;
+ pTo->xMutexEnter = pFrom->xMutexEnter;
+ pTo->xMutexTry = pFrom->xMutexTry;
+ pTo->xMutexLeave = pFrom->xMutexLeave;
+ pTo->xMutexHeld = pFrom->xMutexHeld;
+ pTo->xMutexNotheld = pFrom->xMutexNotheld;
+ sqlite3MemoryBarrier();
pTo->xMutexAlloc = pFrom->xMutexAlloc;
}
+ assert( sqlite3GlobalConfig.mutex.xMutexInit );
rc = sqlite3GlobalConfig.mutex.xMutexInit();
#ifdef SQLITE_DEBUG
@@ -19189,6 +19963,7 @@ SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){
if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
#endif
+ assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
}
@@ -19197,6 +19972,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){
return 0;
}
assert( GLOBAL(int, mutexIsInit) );
+ assert( sqlite3GlobalConfig.mutex.xMutexAlloc );
return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
}
@@ -19205,6 +19981,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){
*/
SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
if( p ){
+ assert( sqlite3GlobalConfig.mutex.xMutexFree );
sqlite3GlobalConfig.mutex.xMutexFree(p);
}
}
@@ -19215,6 +19992,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
*/
SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
if( p ){
+ assert( sqlite3GlobalConfig.mutex.xMutexEnter );
sqlite3GlobalConfig.mutex.xMutexEnter(p);
}
}
@@ -19226,6 +20004,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
int rc = SQLITE_OK;
if( p ){
+ assert( sqlite3GlobalConfig.mutex.xMutexTry );
return sqlite3GlobalConfig.mutex.xMutexTry(p);
}
return rc;
@@ -19239,6 +20018,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
*/
SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
if( p ){
+ assert( sqlite3GlobalConfig.mutex.xMutexLeave );
sqlite3GlobalConfig.mutex.xMutexLeave(p);
}
}
@@ -19249,9 +20029,11 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
** intended for use inside assert() statements.
*/
SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){
+ assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
}
SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
+ assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
}
#endif
@@ -19287,6 +20069,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
** that does error checking on mutexes to make sure they are being
** called correctly.
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_MUTEX_OMIT
@@ -19368,7 +20151,7 @@ static int debugMutexEnd(void){ return SQLITE_OK; }
** that means that a mutex could not be allocated.
*/
static sqlite3_mutex *debugMutexAlloc(int id){
- static sqlite3_debug_mutex aStatic[SQLITE_MUTEX_STATIC_APP3 - 1];
+ static sqlite3_debug_mutex aStatic[SQLITE_MUTEX_STATIC_VFS3 - 1];
sqlite3_debug_mutex *pNew = 0;
switch( id ){
case SQLITE_MUTEX_FAST:
@@ -19490,6 +20273,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
*************************************************************************
** This file contains the C functions that implement mutexes for pthreads
*/
+/* #include "sqliteInt.h" */
/*
** The code in this file is only used if we are compiling threadsafe
@@ -19559,6 +20343,19 @@ static int pthreadMutexNotheld(sqlite3_mutex *p){
#endif
/*
+** Try to provide a memory barrier operation, needed for initialization
+** and also for the implementation of xShmBarrier in the VFS in cases
+** where SQLite is compiled without mutexes.
+*/
+SQLITE_PRIVATE void sqlite3MemoryBarrier(void){
+#if defined(SQLITE_MEMORY_BARRIER)
+ SQLITE_MEMORY_BARRIER;
+#elif defined(__GNUC__) && GCC_VERSION>=4001000
+ __sync_synchronize();
+#endif
+}
+
+/*
** Initialize and deinitialize the mutex subsystem.
*/
static int pthreadMutexInit(void){ return SQLITE_OK; }
@@ -19583,6 +20380,9 @@ static int pthreadMutexEnd(void){ return SQLITE_OK; }
** <li> SQLITE_MUTEX_STATIC_APP1
** <li> SQLITE_MUTEX_STATIC_APP2
** <li> SQLITE_MUTEX_STATIC_APP3
+** <li> SQLITE_MUTEX_STATIC_VFS1
+** <li> SQLITE_MUTEX_STATIC_VFS2
+** <li> SQLITE_MUTEX_STATIC_VFS3
** </ul>
**
** The first two constants cause sqlite3_mutex_alloc() to create
@@ -19619,6 +20419,9 @@ static sqlite3_mutex *pthreadMutexAlloc(int iType){
SQLITE3_MUTEX_INITIALIZER,
SQLITE3_MUTEX_INITIALIZER,
SQLITE3_MUTEX_INITIALIZER,
+ SQLITE3_MUTEX_INITIALIZER,
+ SQLITE3_MUTEX_INITIALIZER,
+ SQLITE3_MUTEX_INITIALIZER,
SQLITE3_MUTEX_INITIALIZER
};
sqlite3_mutex *p;
@@ -19858,6 +20661,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
*************************************************************************
** This file contains the C functions that implement mutexes for Win32.
*/
+/* #include "sqliteInt.h" */
#if SQLITE_OS_WIN
/*
@@ -20214,6 +21018,24 @@ static int winMutexNotheld(sqlite3_mutex *p){
#endif
/*
+** Try to provide a memory barrier operation, needed for initialization
+** and also for the xShmBarrier method of the VFS in cases when SQLite is
+** compiled without mutexes (SQLITE_THREADSAFE=0).
+*/
+SQLITE_PRIVATE void sqlite3MemoryBarrier(void){
+#if defined(SQLITE_MEMORY_BARRIER)
+ SQLITE_MEMORY_BARRIER;
+#elif defined(__GNUC__)
+ __sync_synchronize();
+#elif !defined(SQLITE_DISABLE_INTRINSIC) && \
+ defined(_MSC_VER) && _MSC_VER>=1300
+ _ReadWriteBarrier();
+#elif defined(MemoryBarrier)
+ MemoryBarrier();
+#endif
+}
+
+/*
** Initialize and deinitialize the mutex subsystem.
*/
static sqlite3_mutex winMutex_staticMutexes[] = {
@@ -20225,6 +21047,9 @@ static sqlite3_mutex winMutex_staticMutexes[] = {
SQLITE3_MUTEX_INITIALIZER,
SQLITE3_MUTEX_INITIALIZER,
SQLITE3_MUTEX_INITIALIZER,
+ SQLITE3_MUTEX_INITIALIZER,
+ SQLITE3_MUTEX_INITIALIZER,
+ SQLITE3_MUTEX_INITIALIZER,
SQLITE3_MUTEX_INITIALIZER
};
@@ -20296,6 +21121,9 @@ static int winMutexEnd(void){
** <li> SQLITE_MUTEX_STATIC_APP1
** <li> SQLITE_MUTEX_STATIC_APP2
** <li> SQLITE_MUTEX_STATIC_APP3
+** <li> SQLITE_MUTEX_STATIC_VFS1
+** <li> SQLITE_MUTEX_STATIC_VFS2
+** <li> SQLITE_MUTEX_STATIC_VFS3
** </ul>
**
** The first two constants cause sqlite3_mutex_alloc() to create
@@ -20527,6 +21355,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
**
** Memory allocation functions used throughout sqlite.
*/
+/* #include "sqliteInt.h" */
/* #include <stdarg.h> */
/*
@@ -20559,16 +21388,7 @@ typedef struct ScratchFreeslot {
*/
static SQLITE_WSD struct Mem0Global {
sqlite3_mutex *mutex; /* Mutex to serialize access */
-
- /*
- ** The alarm callback and its arguments. The mem0.mutex lock will
- ** be held while the callback is running. Recursive calls into
- ** the memory subsystem are allowed, but no new callbacks will be
- ** issued.
- */
- sqlite3_int64 alarmThreshold;
- void (*alarmCallback)(void*, sqlite3_int64,int);
- void *alarmArg;
+ sqlite3_int64 alarmThreshold; /* The soft heap limit */
/*
** Pointers to the end of sqlite3GlobalConfig.pScratch memory
@@ -20585,7 +21405,7 @@ static SQLITE_WSD struct Mem0Global {
** sqlite3_soft_heap_limit() setting.
*/
int nearlyFull;
-} mem0 = { 0, 0, 0, 0, 0, 0, 0, 0 };
+} mem0 = { 0, 0, 0, 0, 0, 0 };
#define mem0 GLOBAL(struct Mem0Global, mem0)
@@ -20596,50 +21416,21 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MallocMutex(void){
return mem0.mutex;
}
-/*
-** This routine runs when the memory allocator sees that the
-** total memory allocation is about to exceed the soft heap
-** limit.
-*/
-static void softHeapLimitEnforcer(
- void *NotUsed,
- sqlite3_int64 NotUsed2,
- int allocSize
-){
- UNUSED_PARAMETER2(NotUsed, NotUsed2);
- sqlite3_release_memory(allocSize);
-}
-
-/*
-** Change the alarm callback
-*/
-static int sqlite3MemoryAlarm(
- void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
- void *pArg,
- sqlite3_int64 iThreshold
-){
- sqlite3_int64 nUsed;
- sqlite3_mutex_enter(mem0.mutex);
- mem0.alarmCallback = xCallback;
- mem0.alarmArg = pArg;
- mem0.alarmThreshold = iThreshold;
- nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
- mem0.nearlyFull = (iThreshold>0 && iThreshold<=nUsed);
- sqlite3_mutex_leave(mem0.mutex);
- return SQLITE_OK;
-}
-
#ifndef SQLITE_OMIT_DEPRECATED
/*
-** Deprecated external interface. Internal/core SQLite code
-** should call sqlite3MemoryAlarm.
+** Deprecated external interface. It used to set an alarm callback
+** that was invoked when memory usage grew too large. Now it is a
+** no-op.
*/
SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
void *pArg,
sqlite3_int64 iThreshold
){
- return sqlite3MemoryAlarm(xCallback, pArg, iThreshold);
+ (void)xCallback;
+ (void)pArg;
+ (void)iThreshold;
+ return SQLITE_OK;
}
#endif
@@ -20650,19 +21441,21 @@ SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){
sqlite3_int64 priorLimit;
sqlite3_int64 excess;
+ sqlite3_int64 nUsed;
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
if( rc ) return -1;
#endif
sqlite3_mutex_enter(mem0.mutex);
priorLimit = mem0.alarmThreshold;
- sqlite3_mutex_leave(mem0.mutex);
- if( n<0 ) return priorLimit;
- if( n>0 ){
- sqlite3MemoryAlarm(softHeapLimitEnforcer, 0, n);
- }else{
- sqlite3MemoryAlarm(0, 0, 0);
+ if( n<0 ){
+ sqlite3_mutex_leave(mem0.mutex);
+ return priorLimit;
}
+ mem0.alarmThreshold = n;
+ nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
+ mem0.nearlyFull = (n>0 && n<=nUsed);
+ sqlite3_mutex_leave(mem0.mutex);
excess = sqlite3_memory_used() - n;
if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
return priorLimit;
@@ -20707,10 +21500,9 @@ SQLITE_PRIVATE int sqlite3MallocInit(void){
sqlite3GlobalConfig.nScratch = 0;
}
if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512
- || sqlite3GlobalConfig.nPage<1 ){
+ || sqlite3GlobalConfig.nPage<=0 ){
sqlite3GlobalConfig.pPage = 0;
sqlite3GlobalConfig.szPage = 0;
- sqlite3GlobalConfig.nPage = 0;
}
rc = sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);
if( rc!=SQLITE_OK ) memset(&mem0, 0, sizeof(mem0));
@@ -20740,10 +21532,8 @@ SQLITE_PRIVATE void sqlite3MallocEnd(void){
** Return the amount of memory currently checked out.
*/
SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
- int n, mx;
- sqlite3_int64 res;
- sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0);
- res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */
+ sqlite3_int64 res, mx;
+ sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
return res;
}
@@ -20753,30 +21543,19 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
** or since the most recent reset.
*/
SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){
- int n, mx;
- sqlite3_int64 res;
- sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag);
- res = (sqlite3_int64)mx; /* Work around bug in Borland C. Ticket #3216 */
- return res;
+ sqlite3_int64 res, mx;
+ sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
+ return mx;
}
/*
** Trigger the alarm
*/
static void sqlite3MallocAlarm(int nByte){
- void (*xCallback)(void*,sqlite3_int64,int);
- sqlite3_int64 nowUsed;
- void *pArg;
- if( mem0.alarmCallback==0 ) return;
- xCallback = mem0.alarmCallback;
- nowUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
- pArg = mem0.alarmArg;
- mem0.alarmCallback = 0;
+ if( mem0.alarmThreshold<=0 ) return;
sqlite3_mutex_leave(mem0.mutex);
- xCallback(pArg, nowUsed, nByte);
+ sqlite3_release_memory(nByte);
sqlite3_mutex_enter(mem0.mutex);
- mem0.alarmCallback = xCallback;
- mem0.alarmArg = pArg;
}
/*
@@ -20789,7 +21568,7 @@ static int mallocWithAlarm(int n, void **pp){
assert( sqlite3_mutex_held(mem0.mutex) );
nFull = sqlite3GlobalConfig.m.xRoundup(n);
sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, n);
- if( mem0.alarmCallback!=0 ){
+ if( mem0.alarmThreshold>0 ){
sqlite3_int64 nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
if( nUsed >= mem0.alarmThreshold - nFull ){
mem0.nearlyFull = 1;
@@ -20800,7 +21579,7 @@ static int mallocWithAlarm(int n, void **pp){
}
p = sqlite3GlobalConfig.m.xMalloc(nFull);
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
- if( p==0 && mem0.alarmCallback ){
+ if( p==0 && mem0.alarmThreshold>0 ){
sqlite3MallocAlarm(nFull);
p = sqlite3GlobalConfig.m.xMalloc(nFull);
}
@@ -20975,19 +21754,20 @@ SQLITE_PRIVATE int sqlite3MallocSize(void *p){
return sqlite3GlobalConfig.m.xSize(p);
}
SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
- if( db==0 ){
- assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
- assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
- return sqlite3MallocSize(p);
- }else{
- assert( sqlite3_mutex_held(db->mutex) );
- if( isLookaside(db, p) ){
- return db->lookaside.sz;
+ if( db==0 || !isLookaside(db,p) ){
+#if SQLITE_DEBUG
+ if( db==0 ){
+ assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
+ assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
}else{
assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
- return sqlite3GlobalConfig.m.xSize(p);
}
+#endif
+ return sqlite3GlobalConfig.m.xSize(p);
+ }else{
+ assert( sqlite3_mutex_held(db->mutex) );
+ return db->lookaside.sz;
}
}
SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
@@ -21088,7 +21868,7 @@ SQLITE_PRIVATE void *sqlite3Realloc(void *pOld, u64 nBytes){
sqlite3MallocAlarm(nDiff);
}
pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
- if( pNew==0 && mem0.alarmCallback ){
+ if( pNew==0 && mem0.alarmThreshold>0 ){
sqlite3MallocAlarm((int)nBytes);
pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
}
@@ -21289,19 +22069,11 @@ SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
}
/*
-** Create a string from the zFromat argument and the va_list that follows.
-** Store the string in memory obtained from sqliteMalloc() and make *pz
-** point to that string.
+** Free any prior content in *pz and replace it with a copy of zNew.
*/
-SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
- va_list ap;
- char *z;
-
- va_start(ap, zFormat);
- z = sqlite3VMPrintf(db, zFormat, ap);
- va_end(ap);
+SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zNew){
sqlite3DbFree(db, *pz);
- *pz = z;
+ *pz = sqlite3DbStrDup(db, zNew);
}
/*
@@ -21322,17 +22094,16 @@ static SQLITE_NOINLINE int apiOomError(sqlite3 *db){
** function. However, if a malloc() failure has occurred since the previous
** invocation SQLITE_NOMEM is returned instead.
**
-** If the first argument, db, is not NULL and a malloc() error has occurred,
-** then the connection error-code (the value returned by sqlite3_errcode())
-** is set to SQLITE_NOMEM.
+** If an OOM as occurred, then the connection error-code (the value
+** returned by sqlite3_errcode()) is set to SQLITE_NOMEM.
*/
SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
- /* If the db handle is not NULL, then we must hold the connection handle
- ** mutex here. Otherwise the read (and possible write) of db->mallocFailed
+ /* If the db handle must hold the connection handle mutex here.
+ ** Otherwise the read (and possible write) of db->mallocFailed
** is unsafe, as is the call to sqlite3Error().
*/
- assert( !db || sqlite3_mutex_held(db->mutex) );
- if( db==0 ) return rc & 0xff;
+ assert( db!=0 );
+ assert( sqlite3_mutex_held(db->mutex) );
if( db->mallocFailed || rc==SQLITE_IOERR_NOMEM ){
return apiOomError(db);
}
@@ -21343,18 +22114,16 @@ SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
/************** Begin file printf.c ******************************************/
/*
** The "printf" code that follows dates from the 1980's. It is in
-** the public domain. The original comments are included here for
-** completeness. They are very out-of-date but might be useful as
-** an historical reference. Most of the "enhancements" have been backed
-** out so that the functionality is now the same as standard printf().
+** the public domain.
**
**************************************************************************
**
** This file contains code for a set of "printf"-like routines. These
** routines format strings much like the printf() from the standard C
** library, though the implementation here has enhancements to support
-** SQLlite.
+** SQLite.
*/
+/* #include "sqliteInt.h" */
/*
** Conversion types fall into various categories as defined by the
@@ -21813,21 +22582,16 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
if( realvalue>0.0 ){
LONGDOUBLE_TYPE scale = 1.0;
while( realvalue>=1e100*scale && exp<=350 ){ scale *= 1e100;exp+=100;}
- while( realvalue>=1e64*scale && exp<=350 ){ scale *= 1e64; exp+=64; }
- while( realvalue>=1e8*scale && exp<=350 ){ scale *= 1e8; exp+=8; }
+ while( realvalue>=1e10*scale && exp<=350 ){ scale *= 1e10; exp+=10; }
while( realvalue>=10.0*scale && exp<=350 ){ scale *= 10.0; exp++; }
realvalue /= scale;
while( realvalue<1e-8 ){ realvalue *= 1e8; exp-=8; }
while( realvalue<1.0 ){ realvalue *= 10.0; exp--; }
if( exp>350 ){
- if( prefix=='-' ){
- bufpt = "-Inf";
- }else if( prefix=='+' ){
- bufpt = "+Inf";
- }else{
- bufpt = "Inf";
- }
- length = sqlite3Strlen30(bufpt);
+ bufpt = buf;
+ buf[0] = prefix;
+ memcpy(buf+(prefix!=0),"Inf",4);
+ length = 3+(prefix!=0);
break;
}
}
@@ -21976,12 +22740,13 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
case etDYNSTRING:
if( bArgList ){
bufpt = getTextArg(pArgList);
+ xtype = etSTRING;
}else{
bufpt = va_arg(ap,char*);
}
if( bufpt==0 ){
bufpt = "";
- }else if( xtype==etDYNSTRING && !bArgList ){
+ }else if( xtype==etDYNSTRING ){
zExtra = bufpt;
}
if( precision>=0 ){
@@ -21990,9 +22755,9 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
length = sqlite3Strlen30(bufpt);
}
break;
- case etSQLESCAPE:
- case etSQLESCAPE2:
- case etSQLESCAPE3: {
+ case etSQLESCAPE: /* Escape ' characters */
+ case etSQLESCAPE2: /* Escape ' and enclose in '...' */
+ case etSQLESCAPE3: { /* Escape " characters */
int i, j, k, n, isnull;
int needQuote;
char ch;
@@ -22011,7 +22776,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
if( ch==q ) n++;
}
needQuote = !isnull && xtype==etSQLESCAPE2;
- n += i + 1 + needQuote*2;
+ n += i + 3;
if( n>etBUFSIZE ){
bufpt = zExtra = sqlite3Malloc( n );
if( bufpt==0 ){
@@ -22274,24 +23039,6 @@ SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
}
/*
-** Like sqlite3MPrintf(), but call sqlite3DbFree() on zStr after formatting
-** the string and before returning. This routine is intended to be used
-** to modify an existing string. For example:
-**
-** x = sqlite3MPrintf(db, x, "prefix %s suffix", x);
-**
-*/
-SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
- va_list ap;
- char *z;
- va_start(ap, zFormat);
- z = sqlite3VMPrintf(db, zFormat, ap);
- va_end(ap);
- sqlite3DbFree(db, zStr);
- return z;
-}
-
-/*
** Print into memory obtained from sqlite3_malloc(). Omit the internal
** %-conversion extensions.
*/
@@ -22375,6 +23122,11 @@ SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zF
** sqlite3_log() must render into a static buffer. It cannot dynamically
** allocate memory because it might be called while the memory allocator
** mutex is held.
+**
+** sqlite3VXPrintf() might ask for *temporary* memory allocations for
+** certain format characters (%q) or for very large precisions or widths.
+** Care must be taken that any sqlite3_log() calls that occur while the
+** memory mutex is held do not use these mechanisms.
*/
static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){
StrAccum acc; /* String accumulator */
@@ -22418,22 +23170,47 @@ SQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){
}
#endif
-#ifdef SQLITE_DEBUG
-/*************************************************************************
-** Routines for implementing the "TreeView" display of hierarchical
-** data structures for debugging.
+
+/*
+** variable-argument wrapper around sqlite3VXPrintf(). The bFlags argument
+** can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats.
+*/
+SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, u32 bFlags, const char *zFormat, ...){
+ va_list ap;
+ va_start(ap,zFormat);
+ sqlite3VXPrintf(p, bFlags, zFormat, ap);
+ va_end(ap);
+}
+
+/************** End of printf.c **********************************************/
+/************** Begin file treeview.c ****************************************/
+/*
+** 2015-06-08
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
**
-** The main entry points (coded elsewhere) are:
-** sqlite3TreeViewExpr(0, pExpr, 0);
-** sqlite3TreeViewExprList(0, pList, 0, 0);
-** sqlite3TreeViewSelect(0, pSelect, 0);
-** Insert calls to those routines while debugging in order to display
-** a diagram of Expr, ExprList, and Select objects.
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
**
+*************************************************************************
+**
+** This file contains C code to implement the TreeView debugging routines.
+** These routines print a parse tree to standard output for debugging and
+** analysis.
+**
+** The interfaces in this file is only available when compiling
+** with SQLITE_DEBUG.
*/
-/* Add a new subitem to the tree. The moreToFollow flag indicates that this
-** is not the last item in the tree. */
-SQLITE_PRIVATE TreeView *sqlite3TreeViewPush(TreeView *p, u8 moreToFollow){
+/* #include "sqliteInt.h" */
+#ifdef SQLITE_DEBUG
+
+/*
+** Add a new subitem to the tree. The moreToFollow flag indicates that this
+** is not the last item in the tree.
+*/
+static TreeView *sqlite3TreeViewPush(TreeView *p, u8 moreToFollow){
if( p==0 ){
p = sqlite3_malloc64( sizeof(*p) );
if( p==0 ) return 0;
@@ -22445,15 +23222,21 @@ SQLITE_PRIVATE TreeView *sqlite3TreeViewPush(TreeView *p, u8 moreToFollow){
if( p->iLevel<sizeof(p->bLine) ) p->bLine[p->iLevel] = moreToFollow;
return p;
}
-/* Finished with one layer of the tree */
-SQLITE_PRIVATE void sqlite3TreeViewPop(TreeView *p){
+
+/*
+** Finished with one layer of the tree
+*/
+static void sqlite3TreeViewPop(TreeView *p){
if( p==0 ) return;
p->iLevel--;
if( p->iLevel<0 ) sqlite3_free(p);
}
-/* Generate a single line of output for the tree, with a prefix that contains
-** all the appropriate tree lines */
-SQLITE_PRIVATE void sqlite3TreeViewLine(TreeView *p, const char *zFormat, ...){
+
+/*
+** Generate a single line of output for the tree, with a prefix that contains
+** all the appropriate tree lines
+*/
+static void sqlite3TreeViewLine(TreeView *p, const char *zFormat, ...){
va_list ap;
int i;
StrAccum acc;
@@ -22473,24 +23256,378 @@ SQLITE_PRIVATE void sqlite3TreeViewLine(TreeView *p, const char *zFormat, ...){
fprintf(stdout,"%s", zBuf);
fflush(stdout);
}
-/* Shorthand for starting a new tree item that consists of a single label */
-SQLITE_PRIVATE void sqlite3TreeViewItem(TreeView *p, const char *zLabel, u8 moreToFollow){
- p = sqlite3TreeViewPush(p, moreToFollow);
+
+/*
+** Shorthand for starting a new tree item that consists of a single label
+*/
+static void sqlite3TreeViewItem(TreeView *p, const char *zLabel,u8 moreFollows){
+ p = sqlite3TreeViewPush(p, moreFollows);
sqlite3TreeViewLine(p, "%s", zLabel);
}
-#endif /* SQLITE_DEBUG */
+
/*
-** variable-argument wrapper around sqlite3VXPrintf().
+** Generate a human-readable description of a the Select object.
*/
-SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, u32 bFlags, const char *zFormat, ...){
- va_list ap;
- va_start(ap,zFormat);
- sqlite3VXPrintf(p, bFlags, zFormat, ap);
- va_end(ap);
+SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 moreToFollow){
+ int n = 0;
+ int cnt = 0;
+ pView = sqlite3TreeViewPush(pView, moreToFollow);
+ do{
+ sqlite3TreeViewLine(pView, "SELECT%s%s (0x%p) selFlags=0x%x",
+ ((p->selFlags & SF_Distinct) ? " DISTINCT" : ""),
+ ((p->selFlags & SF_Aggregate) ? " agg_flag" : ""), p, p->selFlags
+ );
+ if( cnt++ ) sqlite3TreeViewPop(pView);
+ if( p->pPrior ){
+ n = 1000;
+ }else{
+ n = 0;
+ if( p->pSrc && p->pSrc->nSrc ) n++;
+ if( p->pWhere ) n++;
+ if( p->pGroupBy ) n++;
+ if( p->pHaving ) n++;
+ if( p->pOrderBy ) n++;
+ if( p->pLimit ) n++;
+ if( p->pOffset ) n++;
+ }
+ sqlite3TreeViewExprList(pView, p->pEList, (n--)>0, "result-set");
+ if( p->pSrc && p->pSrc->nSrc ){
+ int i;
+ pView = sqlite3TreeViewPush(pView, (n--)>0);
+ sqlite3TreeViewLine(pView, "FROM");
+ for(i=0; i<p->pSrc->nSrc; i++){
+ struct SrcList_item *pItem = &p->pSrc->a[i];
+ StrAccum x;
+ char zLine[100];
+ sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
+ sqlite3XPrintf(&x, 0, "{%d,*}", pItem->iCursor);
+ if( pItem->zDatabase ){
+ sqlite3XPrintf(&x, 0, " %s.%s", pItem->zDatabase, pItem->zName);
+ }else if( pItem->zName ){
+ sqlite3XPrintf(&x, 0, " %s", pItem->zName);
+ }
+ if( pItem->pTab ){
+ sqlite3XPrintf(&x, 0, " tabname=%Q", pItem->pTab->zName);
+ }
+ if( pItem->zAlias ){
+ sqlite3XPrintf(&x, 0, " (AS %s)", pItem->zAlias);
+ }
+ if( pItem->fg.jointype & JT_LEFT ){
+ sqlite3XPrintf(&x, 0, " LEFT-JOIN");
+ }
+ sqlite3StrAccumFinish(&x);
+ sqlite3TreeViewItem(pView, zLine, i<p->pSrc->nSrc-1);
+ if( pItem->pSelect ){
+ sqlite3TreeViewSelect(pView, pItem->pSelect, 0);
+ }
+ if( pItem->fg.isTabFunc ){
+ sqlite3TreeViewExprList(pView, pItem->u1.pFuncArg, 0, "func-args:");
+ }
+ sqlite3TreeViewPop(pView);
+ }
+ sqlite3TreeViewPop(pView);
+ }
+ if( p->pWhere ){
+ sqlite3TreeViewItem(pView, "WHERE", (n--)>0);
+ sqlite3TreeViewExpr(pView, p->pWhere, 0);
+ sqlite3TreeViewPop(pView);
+ }
+ if( p->pGroupBy ){
+ sqlite3TreeViewExprList(pView, p->pGroupBy, (n--)>0, "GROUPBY");
+ }
+ if( p->pHaving ){
+ sqlite3TreeViewItem(pView, "HAVING", (n--)>0);
+ sqlite3TreeViewExpr(pView, p->pHaving, 0);
+ sqlite3TreeViewPop(pView);
+ }
+ if( p->pOrderBy ){
+ sqlite3TreeViewExprList(pView, p->pOrderBy, (n--)>0, "ORDERBY");
+ }
+ if( p->pLimit ){
+ sqlite3TreeViewItem(pView, "LIMIT", (n--)>0);
+ sqlite3TreeViewExpr(pView, p->pLimit, 0);
+ sqlite3TreeViewPop(pView);
+ }
+ if( p->pOffset ){
+ sqlite3TreeViewItem(pView, "OFFSET", (n--)>0);
+ sqlite3TreeViewExpr(pView, p->pOffset, 0);
+ sqlite3TreeViewPop(pView);
+ }
+ if( p->pPrior ){
+ const char *zOp = "UNION";
+ switch( p->op ){
+ case TK_ALL: zOp = "UNION ALL"; break;
+ case TK_INTERSECT: zOp = "INTERSECT"; break;
+ case TK_EXCEPT: zOp = "EXCEPT"; break;
+ }
+ sqlite3TreeViewItem(pView, zOp, 1);
+ }
+ p = p->pPrior;
+ }while( p!=0 );
+ sqlite3TreeViewPop(pView);
}
-/************** End of printf.c **********************************************/
+/*
+** Generate a human-readable explanation of an expression tree.
+*/
+SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
+ const char *zBinOp = 0; /* Binary operator */
+ const char *zUniOp = 0; /* Unary operator */
+ char zFlgs[30];
+ pView = sqlite3TreeViewPush(pView, moreToFollow);
+ if( pExpr==0 ){
+ sqlite3TreeViewLine(pView, "nil");
+ sqlite3TreeViewPop(pView);
+ return;
+ }
+ if( pExpr->flags ){
+ sqlite3_snprintf(sizeof(zFlgs),zFlgs," flags=0x%x",pExpr->flags);
+ }else{
+ zFlgs[0] = 0;
+ }
+ switch( pExpr->op ){
+ case TK_AGG_COLUMN: {
+ sqlite3TreeViewLine(pView, "AGG{%d:%d}%s",
+ pExpr->iTable, pExpr->iColumn, zFlgs);
+ break;
+ }
+ case TK_COLUMN: {
+ if( pExpr->iTable<0 ){
+ /* This only happens when coding check constraints */
+ sqlite3TreeViewLine(pView, "COLUMN(%d)%s", pExpr->iColumn, zFlgs);
+ }else{
+ sqlite3TreeViewLine(pView, "{%d:%d}%s",
+ pExpr->iTable, pExpr->iColumn, zFlgs);
+ }
+ break;
+ }
+ case TK_INTEGER: {
+ if( pExpr->flags & EP_IntValue ){
+ sqlite3TreeViewLine(pView, "%d", pExpr->u.iValue);
+ }else{
+ sqlite3TreeViewLine(pView, "%s", pExpr->u.zToken);
+ }
+ break;
+ }
+#ifndef SQLITE_OMIT_FLOATING_POINT
+ case TK_FLOAT: {
+ sqlite3TreeViewLine(pView,"%s", pExpr->u.zToken);
+ break;
+ }
+#endif
+ case TK_STRING: {
+ sqlite3TreeViewLine(pView,"%Q", pExpr->u.zToken);
+ break;
+ }
+ case TK_NULL: {
+ sqlite3TreeViewLine(pView,"NULL");
+ break;
+ }
+#ifndef SQLITE_OMIT_BLOB_LITERAL
+ case TK_BLOB: {
+ sqlite3TreeViewLine(pView,"%s", pExpr->u.zToken);
+ break;
+ }
+#endif
+ case TK_VARIABLE: {
+ sqlite3TreeViewLine(pView,"VARIABLE(%s,%d)",
+ pExpr->u.zToken, pExpr->iColumn);
+ break;
+ }
+ case TK_REGISTER: {
+ sqlite3TreeViewLine(pView,"REGISTER(%d)", pExpr->iTable);
+ break;
+ }
+ case TK_ID: {
+ sqlite3TreeViewLine(pView,"ID \"%w\"", pExpr->u.zToken);
+ break;
+ }
+#ifndef SQLITE_OMIT_CAST
+ case TK_CAST: {
+ /* Expressions of the form: CAST(pLeft AS token) */
+ sqlite3TreeViewLine(pView,"CAST %Q", pExpr->u.zToken);
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
+ break;
+ }
+#endif /* SQLITE_OMIT_CAST */
+ case TK_LT: zBinOp = "LT"; break;
+ case TK_LE: zBinOp = "LE"; break;
+ case TK_GT: zBinOp = "GT"; break;
+ case TK_GE: zBinOp = "GE"; break;
+ case TK_NE: zBinOp = "NE"; break;
+ case TK_EQ: zBinOp = "EQ"; break;
+ case TK_IS: zBinOp = "IS"; break;
+ case TK_ISNOT: zBinOp = "ISNOT"; break;
+ case TK_AND: zBinOp = "AND"; break;
+ case TK_OR: zBinOp = "OR"; break;
+ case TK_PLUS: zBinOp = "ADD"; break;
+ case TK_STAR: zBinOp = "MUL"; break;
+ case TK_MINUS: zBinOp = "SUB"; break;
+ case TK_REM: zBinOp = "REM"; break;
+ case TK_BITAND: zBinOp = "BITAND"; break;
+ case TK_BITOR: zBinOp = "BITOR"; break;
+ case TK_SLASH: zBinOp = "DIV"; break;
+ case TK_LSHIFT: zBinOp = "LSHIFT"; break;
+ case TK_RSHIFT: zBinOp = "RSHIFT"; break;
+ case TK_CONCAT: zBinOp = "CONCAT"; break;
+ case TK_DOT: zBinOp = "DOT"; break;
+
+ case TK_UMINUS: zUniOp = "UMINUS"; break;
+ case TK_UPLUS: zUniOp = "UPLUS"; break;
+ case TK_BITNOT: zUniOp = "BITNOT"; break;
+ case TK_NOT: zUniOp = "NOT"; break;
+ case TK_ISNULL: zUniOp = "ISNULL"; break;
+ case TK_NOTNULL: zUniOp = "NOTNULL"; break;
+
+ case TK_COLLATE: {
+ sqlite3TreeViewLine(pView, "COLLATE %Q", pExpr->u.zToken);
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
+ break;
+ }
+
+ case TK_AGG_FUNCTION:
+ case TK_FUNCTION: {
+ ExprList *pFarg; /* List of function arguments */
+ if( ExprHasProperty(pExpr, EP_TokenOnly) ){
+ pFarg = 0;
+ }else{
+ pFarg = pExpr->x.pList;
+ }
+ if( pExpr->op==TK_AGG_FUNCTION ){
+ sqlite3TreeViewLine(pView, "AGG_FUNCTION%d %Q",
+ pExpr->op2, pExpr->u.zToken);
+ }else{
+ sqlite3TreeViewLine(pView, "FUNCTION %Q", pExpr->u.zToken);
+ }
+ if( pFarg ){
+ sqlite3TreeViewExprList(pView, pFarg, 0, 0);
+ }
+ break;
+ }
+#ifndef SQLITE_OMIT_SUBQUERY
+ case TK_EXISTS: {
+ sqlite3TreeViewLine(pView, "EXISTS-expr");
+ sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
+ break;
+ }
+ case TK_SELECT: {
+ sqlite3TreeViewLine(pView, "SELECT-expr");
+ sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
+ break;
+ }
+ case TK_IN: {
+ sqlite3TreeViewLine(pView, "IN");
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
+ if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+ sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
+ }else{
+ sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, 0);
+ }
+ break;
+ }
+#endif /* SQLITE_OMIT_SUBQUERY */
+
+ /*
+ ** x BETWEEN y AND z
+ **
+ ** This is equivalent to
+ **
+ ** x>=y AND x<=z
+ **
+ ** X is stored in pExpr->pLeft.
+ ** Y is stored in pExpr->pList->a[0].pExpr.
+ ** Z is stored in pExpr->pList->a[1].pExpr.
+ */
+ case TK_BETWEEN: {
+ Expr *pX = pExpr->pLeft;
+ Expr *pY = pExpr->x.pList->a[0].pExpr;
+ Expr *pZ = pExpr->x.pList->a[1].pExpr;
+ sqlite3TreeViewLine(pView, "BETWEEN");
+ sqlite3TreeViewExpr(pView, pX, 1);
+ sqlite3TreeViewExpr(pView, pY, 1);
+ sqlite3TreeViewExpr(pView, pZ, 0);
+ break;
+ }
+ case TK_TRIGGER: {
+ /* If the opcode is TK_TRIGGER, then the expression is a reference
+ ** to a column in the new.* or old.* pseudo-tables available to
+ ** trigger programs. In this case Expr.iTable is set to 1 for the
+ ** new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn
+ ** is set to the column of the pseudo-table to read, or to -1 to
+ ** read the rowid field.
+ */
+ sqlite3TreeViewLine(pView, "%s(%d)",
+ pExpr->iTable ? "NEW" : "OLD", pExpr->iColumn);
+ break;
+ }
+ case TK_CASE: {
+ sqlite3TreeViewLine(pView, "CASE");
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
+ sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, 0);
+ break;
+ }
+#ifndef SQLITE_OMIT_TRIGGER
+ case TK_RAISE: {
+ const char *zType = "unk";
+ switch( pExpr->affinity ){
+ case OE_Rollback: zType = "rollback"; break;
+ case OE_Abort: zType = "abort"; break;
+ case OE_Fail: zType = "fail"; break;
+ case OE_Ignore: zType = "ignore"; break;
+ }
+ sqlite3TreeViewLine(pView, "RAISE %s(%Q)", zType, pExpr->u.zToken);
+ break;
+ }
+#endif
+ default: {
+ sqlite3TreeViewLine(pView, "op=%d", pExpr->op);
+ break;
+ }
+ }
+ if( zBinOp ){
+ sqlite3TreeViewLine(pView, "%s%s", zBinOp, zFlgs);
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
+ sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
+ }else if( zUniOp ){
+ sqlite3TreeViewLine(pView, "%s%s", zUniOp, zFlgs);
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
+ }
+ sqlite3TreeViewPop(pView);
+}
+
+/*
+** Generate a human-readable explanation of an expression list.
+*/
+SQLITE_PRIVATE void sqlite3TreeViewExprList(
+ TreeView *pView,
+ const ExprList *pList,
+ u8 moreToFollow,
+ const char *zLabel
+){
+ int i;
+ pView = sqlite3TreeViewPush(pView, moreToFollow);
+ if( zLabel==0 || zLabel[0]==0 ) zLabel = "LIST";
+ if( pList==0 ){
+ sqlite3TreeViewLine(pView, "%s (empty)", zLabel);
+ }else{
+ sqlite3TreeViewLine(pView, "%s", zLabel);
+ for(i=0; i<pList->nExpr; i++){
+ int j = pList->a[i].u.x.iOrderByCol;
+ if( j ){
+ sqlite3TreeViewPush(pView, 0);
+ sqlite3TreeViewLine(pView, "iOrderByCol=%d", j);
+ }
+ sqlite3TreeViewExpr(pView, pList->a[i].pExpr, i<pList->nExpr-1);
+ if( j ) sqlite3TreeViewPop(pView);
+ }
+ }
+ sqlite3TreeViewPop(pView);
+}
+
+#endif /* SQLITE_DEBUG */
+
+/************** End of treeview.c ********************************************/
/************** Begin file random.c ******************************************/
/*
** 2001 September 15
@@ -22509,6 +23646,7 @@ SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, u32 bFlags, const char *zFormat,
** Random numbers are used by some of the database backends in order
** to generate random integer keys for tables or random filenames.
*/
+/* #include "sqliteInt.h" */
/* All threads share a single random number generator.
@@ -22655,7 +23793,9 @@ SQLITE_PRIVATE void sqlite3PrngRestoreState(void){
** of multiple cores can do so, while also allowing applications to stay
** single-threaded if desired.
*/
+/* #include "sqliteInt.h" */
#if SQLITE_OS_WIN
+/* # include "os_win.h" */
#endif
#if SQLITE_MAX_WORKER_THREADS>0
@@ -22695,6 +23835,10 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(
memset(p, 0, sizeof(*p));
p->xTask = xTask;
p->pIn = pIn;
+ /* If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a
+ ** function that returns SQLITE_ERROR when passed the argument 200, that
+ ** forces worker threads to run sequentially and deterministically
+ ** for testing purposes. */
if( sqlite3FaultSim(200) ){
rc = 1;
}else{
@@ -22779,7 +23923,12 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(
*ppThread = 0;
p = sqlite3Malloc(sizeof(*p));
if( p==0 ) return SQLITE_NOMEM;
- if( sqlite3GlobalConfig.bCoreMutex==0 ){
+ /* If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a
+ ** function that returns SQLITE_ERROR when passed the argument 200, that
+ ** forces worker threads to run sequentially and deterministically
+ ** (via the sqlite3FaultSim() term of the conditional) for testing
+ ** purposes. */
+ if( sqlite3GlobalConfig.bCoreMutex==0 || sqlite3FaultSim(200) ){
memset(p, 0, sizeof(*p));
}else{
p->xTask = xTask;
@@ -22807,7 +23956,7 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
assert( ppOut!=0 );
if( NEVER(p==0) ) return SQLITE_NOMEM;
if( p->xTask==0 ){
- assert( p->id==GetCurrentThreadId() );
+ /* assert( p->id==GetCurrentThreadId() ); */
rc = WAIT_OBJECT_0;
assert( p->tid==0 );
}else{
@@ -22929,7 +24078,9 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
** 0xfe 0xff big-endian utf-16 follows
**
*/
+/* #include "sqliteInt.h" */
/* #include <assert.h> */
+/* #include "vdbeInt.h" */
#ifndef SQLITE_AMALGAMATION
/*
@@ -23442,6 +24593,7 @@ SQLITE_PRIVATE void sqlite3UtfSelfTest(void){
** strings, and stuff like that.
**
*/
+/* #include "sqliteInt.h" */
/* #include <stdarg.h> */
#if HAVE_ISNAN || SQLITE_HAVE_ISNAN
# include <math.h>
@@ -23531,10 +24683,8 @@ SQLITE_PRIVATE int sqlite3IsNaN(double x){
** than 1GiB) the value returned might be less than the true string length.
*/
SQLITE_PRIVATE int sqlite3Strlen30(const char *z){
- const char *z2 = z;
if( z==0 ) return 0;
- while( *z2 ){ z2++; }
- return 0x3fffffff & (int)(z2 - z);
+ return 0x3fffffff & (int)strlen(z);
}
/*
@@ -24493,11 +25643,8 @@ SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
** 64-bit integer.
*/
SQLITE_PRIVATE int sqlite3VarintLen(u64 v){
- int i = 0;
- do{
- i++;
- v >>= 7;
- }while( v!=0 && ALWAYS(i<9) );
+ int i;
+ for(i=1; (v >>= 7)!=0; i++){ assert( i<9 ); }
return i;
}
@@ -24506,14 +25653,40 @@ SQLITE_PRIVATE int sqlite3VarintLen(u64 v){
** Read or write a four-byte big-endian integer value.
*/
SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
+#if SQLITE_BYTEORDER==4321
+ u32 x;
+ memcpy(&x,p,4);
+ return x;
+#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
+ && defined(__GNUC__) && GCC_VERSION>=4003000
+ u32 x;
+ memcpy(&x,p,4);
+ return __builtin_bswap32(x);
+#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
+ && defined(_MSC_VER) && _MSC_VER>=1300
+ u32 x;
+ memcpy(&x,p,4);
+ return _byteswap_ulong(x);
+#else
testcase( p[0]&0x80 );
return ((unsigned)p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];
+#endif
}
SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
+#if SQLITE_BYTEORDER==4321
+ memcpy(p,&v,4);
+#elif SQLITE_BYTEORDER==1234 && defined(__GNUC__) && GCC_VERSION>=4003000
+ u32 x = __builtin_bswap32(v);
+ memcpy(p,&x,4);
+#elif SQLITE_BYTEORDER==1234 && defined(_MSC_VER) && _MSC_VER>=1300
+ u32 x = _byteswap_ulong(v);
+ memcpy(p,&x,4);
+#else
p[0] = (u8)(v>>24);
p[1] = (u8)(v>>16);
p[2] = (u8)(v>>8);
p[3] = (u8)v;
+#endif
}
@@ -24816,6 +25989,7 @@ SQLITE_PRIVATE u64 sqlite3LogEstToInt(LogEst x){
** This is the implementation of generic hash-tables
** used in SQLite.
*/
+/* #include "sqliteInt.h" */
/* #include <assert.h> */
/* Turn bulk memory into a hash table object by initializing the
@@ -25081,42 +26255,42 @@ SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, void *data){
#endif
SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
static const char *const azName[] = { "?",
- /* 1 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
- /* 2 */ "Savepoint" OpHelp(""),
- /* 3 */ "AutoCommit" OpHelp(""),
- /* 4 */ "Transaction" OpHelp(""),
- /* 5 */ "SorterNext" OpHelp(""),
- /* 6 */ "PrevIfOpen" OpHelp(""),
- /* 7 */ "NextIfOpen" OpHelp(""),
- /* 8 */ "Prev" OpHelp(""),
- /* 9 */ "Next" OpHelp(""),
- /* 10 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
- /* 11 */ "Checkpoint" OpHelp(""),
- /* 12 */ "JournalMode" OpHelp(""),
- /* 13 */ "Vacuum" OpHelp(""),
- /* 14 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
- /* 15 */ "VUpdate" OpHelp("data=r[P3@P2]"),
- /* 16 */ "Goto" OpHelp(""),
- /* 17 */ "Gosub" OpHelp(""),
- /* 18 */ "Return" OpHelp(""),
+ /* 1 */ "Savepoint" OpHelp(""),
+ /* 2 */ "AutoCommit" OpHelp(""),
+ /* 3 */ "Transaction" OpHelp(""),
+ /* 4 */ "SorterNext" OpHelp(""),
+ /* 5 */ "PrevIfOpen" OpHelp(""),
+ /* 6 */ "NextIfOpen" OpHelp(""),
+ /* 7 */ "Prev" OpHelp(""),
+ /* 8 */ "Next" OpHelp(""),
+ /* 9 */ "Checkpoint" OpHelp(""),
+ /* 10 */ "JournalMode" OpHelp(""),
+ /* 11 */ "Vacuum" OpHelp(""),
+ /* 12 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
+ /* 13 */ "VUpdate" OpHelp("data=r[P3@P2]"),
+ /* 14 */ "Goto" OpHelp(""),
+ /* 15 */ "Gosub" OpHelp(""),
+ /* 16 */ "Return" OpHelp(""),
+ /* 17 */ "InitCoroutine" OpHelp(""),
+ /* 18 */ "EndCoroutine" OpHelp(""),
/* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
- /* 20 */ "InitCoroutine" OpHelp(""),
- /* 21 */ "EndCoroutine" OpHelp(""),
- /* 22 */ "Yield" OpHelp(""),
- /* 23 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
- /* 24 */ "Halt" OpHelp(""),
- /* 25 */ "Integer" OpHelp("r[P2]=P1"),
- /* 26 */ "Int64" OpHelp("r[P2]=P4"),
- /* 27 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
- /* 28 */ "Null" OpHelp("r[P2..P3]=NULL"),
- /* 29 */ "SoftNull" OpHelp("r[P1]=NULL"),
- /* 30 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
- /* 31 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
- /* 32 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
- /* 33 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
- /* 34 */ "SCopy" OpHelp("r[P2]=r[P1]"),
- /* 35 */ "ResultRow" OpHelp("output=r[P1@P2]"),
- /* 36 */ "CollSeq" OpHelp(""),
+ /* 20 */ "Yield" OpHelp(""),
+ /* 21 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
+ /* 22 */ "Halt" OpHelp(""),
+ /* 23 */ "Integer" OpHelp("r[P2]=P1"),
+ /* 24 */ "Int64" OpHelp("r[P2]=P4"),
+ /* 25 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
+ /* 26 */ "Null" OpHelp("r[P2..P3]=NULL"),
+ /* 27 */ "SoftNull" OpHelp("r[P1]=NULL"),
+ /* 28 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
+ /* 29 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
+ /* 30 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
+ /* 31 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
+ /* 32 */ "SCopy" OpHelp("r[P2]=r[P1]"),
+ /* 33 */ "ResultRow" OpHelp("output=r[P1@P2]"),
+ /* 34 */ "CollSeq" OpHelp(""),
+ /* 35 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
+ /* 36 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
/* 37 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
/* 38 */ "MustBeInt" OpHelp(""),
/* 39 */ "RealAffinity" OpHelp(""),
@@ -25142,20 +26316,20 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
/* 59 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
/* 60 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
/* 61 */ "Close" OpHelp(""),
- /* 62 */ "SeekLT" OpHelp("key=r[P3@P4]"),
- /* 63 */ "SeekLE" OpHelp("key=r[P3@P4]"),
- /* 64 */ "SeekGE" OpHelp("key=r[P3@P4]"),
- /* 65 */ "SeekGT" OpHelp("key=r[P3@P4]"),
- /* 66 */ "Seek" OpHelp("intkey=r[P2]"),
- /* 67 */ "NoConflict" OpHelp("key=r[P3@P4]"),
- /* 68 */ "NotFound" OpHelp("key=r[P3@P4]"),
- /* 69 */ "Found" OpHelp("key=r[P3@P4]"),
- /* 70 */ "NotExists" OpHelp("intkey=r[P3]"),
+ /* 62 */ "ColumnsUsed" OpHelp(""),
+ /* 63 */ "SeekLT" OpHelp("key=r[P3@P4]"),
+ /* 64 */ "SeekLE" OpHelp("key=r[P3@P4]"),
+ /* 65 */ "SeekGE" OpHelp("key=r[P3@P4]"),
+ /* 66 */ "SeekGT" OpHelp("key=r[P3@P4]"),
+ /* 67 */ "Seek" OpHelp("intkey=r[P2]"),
+ /* 68 */ "NoConflict" OpHelp("key=r[P3@P4]"),
+ /* 69 */ "NotFound" OpHelp("key=r[P3@P4]"),
+ /* 70 */ "Found" OpHelp("key=r[P3@P4]"),
/* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
/* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
- /* 73 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
- /* 74 */ "NewRowid" OpHelp("r[P2]=rowid"),
- /* 75 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
+ /* 73 */ "NotExists" OpHelp("intkey=r[P3]"),
+ /* 74 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
+ /* 75 */ "NewRowid" OpHelp("r[P2]=rowid"),
/* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
/* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
/* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
@@ -25164,7 +26338,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
/* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
/* 82 */ "Lt" OpHelp("if r[P1]<r[P3] goto P2"),
/* 83 */ "Ge" OpHelp("if r[P1]>=r[P3] goto P2"),
- /* 84 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
+ /* 84 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
/* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
/* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
/* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<<r[P1]"),
@@ -25175,69 +26349,72 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
/* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
/* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
/* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
- /* 95 */ "Delete" OpHelp(""),
+ /* 95 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
/* 96 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
/* 97 */ "String8" OpHelp("r[P2]='P4'"),
- /* 98 */ "ResetCount" OpHelp(""),
- /* 99 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
- /* 100 */ "SorterData" OpHelp("r[P2]=data"),
- /* 101 */ "RowKey" OpHelp("r[P2]=key"),
- /* 102 */ "RowData" OpHelp("r[P2]=data"),
- /* 103 */ "Rowid" OpHelp("r[P2]=rowid"),
- /* 104 */ "NullRow" OpHelp(""),
- /* 105 */ "Last" OpHelp(""),
- /* 106 */ "SorterSort" OpHelp(""),
- /* 107 */ "Sort" OpHelp(""),
- /* 108 */ "Rewind" OpHelp(""),
- /* 109 */ "SorterInsert" OpHelp(""),
- /* 110 */ "IdxInsert" OpHelp("key=r[P2]"),
- /* 111 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
- /* 112 */ "IdxRowid" OpHelp("r[P2]=rowid"),
- /* 113 */ "IdxLE" OpHelp("key=r[P3@P4]"),
- /* 114 */ "IdxGT" OpHelp("key=r[P3@P4]"),
- /* 115 */ "IdxLT" OpHelp("key=r[P3@P4]"),
- /* 116 */ "IdxGE" OpHelp("key=r[P3@P4]"),
- /* 117 */ "Destroy" OpHelp(""),
- /* 118 */ "Clear" OpHelp(""),
- /* 119 */ "ResetSorter" OpHelp(""),
- /* 120 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
- /* 121 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
- /* 122 */ "ParseSchema" OpHelp(""),
- /* 123 */ "LoadAnalysis" OpHelp(""),
- /* 124 */ "DropTable" OpHelp(""),
- /* 125 */ "DropIndex" OpHelp(""),
- /* 126 */ "DropTrigger" OpHelp(""),
- /* 127 */ "IntegrityCk" OpHelp(""),
- /* 128 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
- /* 129 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
- /* 130 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
- /* 131 */ "Program" OpHelp(""),
- /* 132 */ "Param" OpHelp(""),
+ /* 98 */ "Delete" OpHelp(""),
+ /* 99 */ "ResetCount" OpHelp(""),
+ /* 100 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
+ /* 101 */ "SorterData" OpHelp("r[P2]=data"),
+ /* 102 */ "RowKey" OpHelp("r[P2]=key"),
+ /* 103 */ "RowData" OpHelp("r[P2]=data"),
+ /* 104 */ "Rowid" OpHelp("r[P2]=rowid"),
+ /* 105 */ "NullRow" OpHelp(""),
+ /* 106 */ "Last" OpHelp(""),
+ /* 107 */ "SorterSort" OpHelp(""),
+ /* 108 */ "Sort" OpHelp(""),
+ /* 109 */ "Rewind" OpHelp(""),
+ /* 110 */ "SorterInsert" OpHelp(""),
+ /* 111 */ "IdxInsert" OpHelp("key=r[P2]"),
+ /* 112 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
+ /* 113 */ "IdxRowid" OpHelp("r[P2]=rowid"),
+ /* 114 */ "IdxLE" OpHelp("key=r[P3@P4]"),
+ /* 115 */ "IdxGT" OpHelp("key=r[P3@P4]"),
+ /* 116 */ "IdxLT" OpHelp("key=r[P3@P4]"),
+ /* 117 */ "IdxGE" OpHelp("key=r[P3@P4]"),
+ /* 118 */ "Destroy" OpHelp(""),
+ /* 119 */ "Clear" OpHelp(""),
+ /* 120 */ "ResetSorter" OpHelp(""),
+ /* 121 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
+ /* 122 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
+ /* 123 */ "ParseSchema" OpHelp(""),
+ /* 124 */ "LoadAnalysis" OpHelp(""),
+ /* 125 */ "DropTable" OpHelp(""),
+ /* 126 */ "DropIndex" OpHelp(""),
+ /* 127 */ "DropTrigger" OpHelp(""),
+ /* 128 */ "IntegrityCk" OpHelp(""),
+ /* 129 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
+ /* 130 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
+ /* 131 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
+ /* 132 */ "Program" OpHelp(""),
/* 133 */ "Real" OpHelp("r[P2]=P4"),
- /* 134 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
- /* 135 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
- /* 136 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
- /* 137 */ "IfPos" OpHelp("if r[P1]>0 goto P2"),
- /* 138 */ "IfNeg" OpHelp("r[P1]+=P3, if r[P1]<0 goto P2"),
- /* 139 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]+=P3, goto P2"),
- /* 140 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
- /* 141 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
- /* 142 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
- /* 143 */ "IncrVacuum" OpHelp(""),
- /* 144 */ "Expire" OpHelp(""),
- /* 145 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
- /* 146 */ "VBegin" OpHelp(""),
- /* 147 */ "VCreate" OpHelp(""),
- /* 148 */ "VDestroy" OpHelp(""),
- /* 149 */ "VOpen" OpHelp(""),
- /* 150 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
- /* 151 */ "VNext" OpHelp(""),
- /* 152 */ "VRename" OpHelp(""),
- /* 153 */ "Pagecount" OpHelp(""),
- /* 154 */ "MaxPgcnt" OpHelp(""),
- /* 155 */ "Init" OpHelp("Start at P2"),
- /* 156 */ "Noop" OpHelp(""),
- /* 157 */ "Explain" OpHelp(""),
+ /* 134 */ "Param" OpHelp(""),
+ /* 135 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
+ /* 136 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
+ /* 137 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
+ /* 138 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
+ /* 139 */ "SetIfNotPos" OpHelp("if r[P1]<=0 then r[P2]=P3"),
+ /* 140 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"),
+ /* 141 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
+ /* 142 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
+ /* 143 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
+ /* 144 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
+ /* 145 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
+ /* 146 */ "IncrVacuum" OpHelp(""),
+ /* 147 */ "Expire" OpHelp(""),
+ /* 148 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
+ /* 149 */ "VBegin" OpHelp(""),
+ /* 150 */ "VCreate" OpHelp(""),
+ /* 151 */ "VDestroy" OpHelp(""),
+ /* 152 */ "VOpen" OpHelp(""),
+ /* 153 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
+ /* 154 */ "VNext" OpHelp(""),
+ /* 155 */ "VRename" OpHelp(""),
+ /* 156 */ "Pagecount" OpHelp(""),
+ /* 157 */ "MaxPgcnt" OpHelp(""),
+ /* 158 */ "Init" OpHelp("Start at P2"),
+ /* 159 */ "Noop" OpHelp(""),
+ /* 160 */ "Explain" OpHelp(""),
};
return azName[i];
}
@@ -25290,6 +26467,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
** * Definitions of sqlite3_vfs objects for all locking methods
** plus implementations of sqlite3_os_init() and sqlite3_os_end().
*/
+/* #include "sqliteInt.h" */
#if SQLITE_OS_UNIX /* This file is used on unix only */
/*
@@ -26073,14 +27251,14 @@ static int robust_open(const char *z, int f, mode_t m){
** unixEnterLeave()
*/
static void unixEnterMutex(void){
- sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+ sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1));
}
static void unixLeaveMutex(void){
- sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+ sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1));
}
#ifdef SQLITE_DEBUG
static int unixMutexHeld(void) {
- return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+ return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1));
}
#endif
@@ -28590,7 +29768,6 @@ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
TIMER_START;
assert( cnt==(cnt&0x1ffff) );
assert( id->h>2 );
- cnt &= 0x1ffff;
do{
#if defined(USE_PREAD)
got = osPread(id->h, pBuf, cnt, offset);
@@ -28657,7 +29834,7 @@ static int unixRead(
#endif
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this read request as possible by transferring
+ /* Deal with as much of this read request as possible by transfering
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -28792,7 +29969,7 @@ static int unixWrite(
#endif
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this write request as possible by transferring
+ /* Deal with as much of this write request as possible by transfering
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -28807,8 +29984,8 @@ static int unixWrite(
}
}
#endif
-
- while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
+
+ while( (wrote = seekAndWrite(pFile, offset, pBuf, amt))<amt && wrote>0 ){
amt -= wrote;
offset += wrote;
pBuf = &((char*)pBuf)[wrote];
@@ -28816,7 +29993,7 @@ static int unixWrite(
SimulateIOError(( wrote=(-1), amt=1 ));
SimulateDiskfullError(( wrote=0, amt=1 ));
- if( amt>0 ){
+ if( amt>wrote ){
if( wrote<0 && pFile->lastErrno!=ENOSPC ){
/* lastErrno set by seekAndWrite */
return SQLITE_IOERR_WRITE;
@@ -30105,7 +31282,8 @@ static void unixShmBarrier(
sqlite3_file *fd /* Database file holding the shared memory */
){
UNUSED_PARAMETER(fd);
- unixEnterMutex();
+ sqlite3MemoryBarrier(); /* compiler-defined memory barrier */
+ unixEnterMutex(); /* Also mutex, for redundancy */
unixLeaveMutex();
}
@@ -33024,6 +34202,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
**
** This file contains code that is specific to Windows.
*/
+/* #include "sqliteInt.h" */
#if SQLITE_OS_WIN /* This file is used for Windows only */
/*
@@ -33232,6 +34411,7 @@ SQLITE_API int sqlite3_open_file_count = 0;
/*
** Include the header file for the Windows VFS.
*/
+/* #include "os_win.h" */
/*
** Compiling and using WAL mode requires several APIs that are only
@@ -35733,7 +36913,7 @@ static int winRead(
pFile->h, pBuf, amt, offset, pFile->locktype));
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this read request as possible by transferring
+ /* Deal with as much of this read request as possible by transfering
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -35811,7 +36991,7 @@ static int winWrite(
pFile->h, pBuf, amt, offset, pFile->locktype));
#if SQLITE_MAX_MMAP_SIZE>0
- /* Deal with as much of this write request as possible by transferring
+ /* Deal with as much of this write request as possible by transfering
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
if( offset+amt <= pFile->mmapSize ){
@@ -36223,6 +37403,12 @@ static int winLock(sqlite3_file *id, int locktype){
return SQLITE_OK;
}
+ /* Do not allow any kind of write-lock on a read-only database
+ */
+ if( (pFile->ctrlFlags & WINFILE_RDONLY)!=0 && locktype>=RESERVED_LOCK ){
+ return SQLITE_IOERR_LOCK;
+ }
+
/* Make sure the locking sequence is correct
*/
assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
@@ -36592,14 +37778,14 @@ static SYSTEM_INFO winSysInfo;
** winShmLeaveMutex()
*/
static void winShmEnterMutex(void){
- sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+ sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1));
}
static void winShmLeaveMutex(void){
- sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+ sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1));
}
#ifndef NDEBUG
static int winShmMutexHeld(void) {
- return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+ return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_VFS1));
}
#endif
@@ -37052,8 +38238,8 @@ static void winShmBarrier(
sqlite3_file *fd /* Database holding the shared memory */
){
UNUSED_PARAMETER(fd);
- /* MemoryBarrier(); // does not work -- do not know why not */
- winShmEnterMutex();
+ sqlite3MemoryBarrier(); /* compiler-defined memory barrier */
+ winShmEnterMutex(); /* Also mutex, for redundancy */
winShmLeaveMutex();
}
@@ -38619,14 +39805,14 @@ static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
UUID id;
memset(&id, 0, sizeof(UUID));
osUuidCreate(&id);
- memcpy(zBuf, &id, sizeof(UUID));
+ memcpy(&zBuf[n], &id, sizeof(UUID));
n += sizeof(UUID);
}
if( sizeof(UUID)<=nBuf-n ){
UUID id;
memset(&id, 0, sizeof(UUID));
osUuidCreateSequential(&id);
- memcpy(zBuf, &id, sizeof(UUID));
+ memcpy(&zBuf[n], &id, sizeof(UUID));
n += sizeof(UUID);
}
#endif
@@ -38879,6 +40065,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
** start of a transaction, and is thus usually less than a few thousand,
** but can be as large as 2 billion for a really big database.
*/
+/* #include "sqliteInt.h" */
/* Size of the Bitvec structure in bytes. */
#define BITVEC_SZ 512
@@ -38970,10 +40157,10 @@ SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){
** If p is NULL (if the bitmap has not been created) or if
** i is out of range, then return false.
*/
-SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
- if( p==0 ) return 0;
- if( i>p->iSize || i==0 ) return 0;
+SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
+ assert( p!=0 );
i--;
+ if( i>=p->iSize ) return 0;
while( p->iDivisor ){
u32 bin = i/p->iDivisor;
i = i%p->iDivisor;
@@ -38993,6 +40180,9 @@ SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
return 0;
}
}
+SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
+ return p!=0 && sqlite3BitvecTestNotNull(p,i);
+}
/*
** Set the i-th bit. Return 0 on success and an error code if
@@ -39265,6 +40455,7 @@ bitvec_end:
*************************************************************************
** This file implements that page cache.
*/
+/* #include "sqliteInt.h" */
/*
** A complete page cache is an instance of this structure.
@@ -39272,7 +40463,7 @@ bitvec_end:
struct PCache {
PgHdr *pDirty, *pDirtyTail; /* List of dirty pages in LRU order */
PgHdr *pSynced; /* Last synced page in dirty page list */
- int nRef; /* Number of referenced pages */
+ int nRefSum; /* Sum of ref counts over all pages */
int szCache; /* Configured cache size */
int szPage; /* Size of every page in this cache */
int szExtra; /* Size of extra space for each page */
@@ -39281,7 +40472,6 @@ struct PCache {
int (*xStress)(void*,PgHdr*); /* Call to try make a page clean */
void *pStress; /* Argument to xStress */
sqlite3_pcache *pCache; /* Pluggable cache module */
- PgHdr *pPage1; /* Reference to page 1 */
};
/********************************** Linked List Management ********************/
@@ -39359,9 +40549,6 @@ static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
*/
static void pcacheUnpin(PgHdr *p){
if( p->pCache->bPurgeable ){
- if( p->pgno==1 ){
- p->pCache->pPage1 = 0;
- }
sqlite3GlobalConfig.pcache2.xUnpin(p->pCache->pCache, p->pPage, 0);
}
}
@@ -39441,7 +40628,7 @@ SQLITE_PRIVATE int sqlite3PcacheOpen(
** are no outstanding page references when this function is called.
*/
SQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
- assert( pCache->nRef==0 && pCache->pDirty==0 );
+ assert( pCache->nRefSum==0 && pCache->pDirty==0 );
if( pCache->szPage ){
sqlite3_pcache *pNew;
pNew = sqlite3GlobalConfig.pcache2.xCreate(
@@ -39454,7 +40641,6 @@ SQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);
}
pCache->pCache = pNew;
- pCache->pPage1 = 0;
pCache->szPage = szPage;
}
return SQLITE_OK;
@@ -39579,13 +40765,14 @@ static SQLITE_NOINLINE PgHdr *pcacheFetchFinishWithInit(
assert( pPage!=0 );
pPgHdr = (PgHdr*)pPage->pExtra;
assert( pPgHdr->pPage==0 );
- memset(pPgHdr, 0, sizeof(PgHdr));
+ memset(pPgHdr, 0, sizeof(PgHdr));
pPgHdr->pPage = pPage;
pPgHdr->pData = pPage->pBuf;
pPgHdr->pExtra = (void *)&pPgHdr[1];
memset(pPgHdr->pExtra, 0, pCache->szExtra);
pPgHdr->pCache = pCache;
pPgHdr->pgno = pgno;
+ pPgHdr->flags = PGHDR_CLEAN;
return sqlite3PcacheFetchFinish(pCache,pgno,pPage);
}
@@ -39602,19 +40789,14 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheFetchFinish(
){
PgHdr *pPgHdr;
- if( pPage==0 ) return 0;
+ assert( pPage!=0 );
pPgHdr = (PgHdr *)pPage->pExtra;
if( !pPgHdr->pPage ){
return pcacheFetchFinishWithInit(pCache, pgno, pPage);
}
- if( 0==pPgHdr->nRef ){
- pCache->nRef++;
- }
+ pCache->nRefSum++;
pPgHdr->nRef++;
- if( pgno==1 ){
- pCache->pPage1 = pPgHdr;
- }
return pPgHdr;
}
@@ -39624,10 +40806,9 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheFetchFinish(
*/
SQLITE_PRIVATE void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
assert( p->nRef>0 );
- p->nRef--;
- if( p->nRef==0 ){
- p->pCache->nRef--;
- if( (p->flags&PGHDR_DIRTY)==0 ){
+ p->pCache->nRefSum--;
+ if( (--p->nRef)==0 ){
+ if( p->flags&PGHDR_CLEAN ){
pcacheUnpin(p);
}else if( p->pDirtyPrev!=0 ){
/* Move the page to the head of the dirty list. */
@@ -39642,6 +40823,7 @@ SQLITE_PRIVATE void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr *p){
assert(p->nRef>0);
p->nRef++;
+ p->pCache->nRefSum++;
}
/*
@@ -39654,10 +40836,7 @@ SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
if( p->flags&PGHDR_DIRTY ){
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
}
- p->pCache->nRef--;
- if( p->pgno==1 ){
- p->pCache->pPage1 = 0;
- }
+ p->pCache->nRefSum--;
sqlite3GlobalConfig.pcache2.xUnpin(p->pCache->pCache, p->pPage, 1);
}
@@ -39666,11 +40845,14 @@ SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
** make it so.
*/
SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
- p->flags &= ~PGHDR_DONT_WRITE;
assert( p->nRef>0 );
- if( 0==(p->flags & PGHDR_DIRTY) ){
- p->flags |= PGHDR_DIRTY;
- pcacheManageDirtyList(p, PCACHE_DIRTYLIST_ADD);
+ if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){
+ p->flags &= ~PGHDR_DONT_WRITE;
+ if( p->flags & PGHDR_CLEAN ){
+ p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);
+ assert( (p->flags & (PGHDR_DIRTY|PGHDR_CLEAN))==PGHDR_DIRTY );
+ pcacheManageDirtyList(p, PCACHE_DIRTYLIST_ADD);
+ }
}
}
@@ -39680,8 +40862,10 @@ SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
*/
SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
if( (p->flags & PGHDR_DIRTY) ){
+ assert( (p->flags & PGHDR_CLEAN)==0 );
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
- p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC);
+ p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC|PGHDR_WRITEABLE);
+ p->flags |= PGHDR_CLEAN;
if( p->nRef==0 ){
pcacheUnpin(p);
}
@@ -39748,9 +40932,14 @@ SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
sqlite3PcacheMakeClean(p);
}
}
- if( pgno==0 && pCache->pPage1 ){
- memset(pCache->pPage1->pData, 0, pCache->szPage);
- pgno = 1;
+ if( pgno==0 && pCache->nRefSum ){
+ sqlite3_pcache_page *pPage1;
+ pPage1 = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache,1,0);
+ if( ALWAYS(pPage1) ){ /* Page 1 is always available in cache, because
+ ** pCache->nRefSum>0 */
+ memset(pPage1->pBuf, 0, pCache->szPage);
+ pgno = 1;
+ }
}
sqlite3GlobalConfig.pcache2.xTruncate(pCache->pCache, pgno+1);
}
@@ -39853,10 +41042,13 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){
}
/*
-** Return the total number of referenced pages held by the cache.
+** Return the total number of references to all pages held by the cache.
+**
+** This is not the total number of pages referenced, but the sum of the
+** reference count for all pages.
*/
SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache *pCache){
- return pCache->nRef;
+ return pCache->nRefSum;
}
/*
@@ -39941,14 +41133,96 @@ SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHd
** of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features.
** If the default page cache implementation is overridden, then neither of
** these two features are available.
+**
+** A Page cache line looks like this:
+**
+** -------------------------------------------------------------
+** | database page content | PgHdr1 | MemPage | PgHdr |
+** -------------------------------------------------------------
+**
+** The database page content is up front (so that buffer overreads tend to
+** flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions). MemPage
+** is the extension added by the btree.c module containing information such
+** as the database page number and how that database page is used. PgHdr
+** is added by the pcache.c layer and contains information used to keep track
+** of which pages are "dirty". PgHdr1 is an extension added by this
+** module (pcache1.c). The PgHdr1 header is a subclass of sqlite3_pcache_page.
+** PgHdr1 contains information needed to look up a page by its page number.
+** The superclass sqlite3_pcache_page.pBuf points to the start of the
+** database page content and sqlite3_pcache_page.pExtra points to PgHdr.
+**
+** The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at
+** runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size). The
+** sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this
+** size can vary according to architecture, compile-time options, and
+** SQLite library version number.
+**
+** If SQLITE_PCACHE_SEPARATE_HEADER is defined, then the extension is obtained
+** using a separate memory allocation from the database page content. This
+** seeks to overcome the "clownshoe" problem (also called "internal
+** fragmentation" in academic literature) of allocating a few bytes more
+** than a power of two with the memory allocator rounding up to the next
+** power of two, and leaving the rounded-up space unused.
+**
+** This module tracks pointers to PgHdr1 objects. Only pcache.c communicates
+** with this module. Information is passed back and forth as PgHdr1 pointers.
+**
+** The pcache.c and pager.c modules deal pointers to PgHdr objects.
+** The btree.c module deals with pointers to MemPage objects.
+**
+** SOURCE OF PAGE CACHE MEMORY:
+**
+** Memory for a page might come from any of three sources:
+**
+** (1) The general-purpose memory allocator - sqlite3Malloc()
+** (2) Global page-cache memory provided using sqlite3_config() with
+** SQLITE_CONFIG_PAGECACHE.
+** (3) PCache-local bulk allocation.
+**
+** The third case is a chunk of heap memory (defaulting to 100 pages worth)
+** that is allocated when the page cache is created. The size of the local
+** bulk allocation can be adjusted using
+**
+** sqlite3_config(SQLITE_CONFIG_PAGECACHE, 0, 0, N).
+**
+** If N is positive, then N pages worth of memory are allocated using a single
+** sqlite3Malloc() call and that memory is used for the first N pages allocated.
+** Or if N is negative, then -1024*N bytes of memory are allocated and used
+** for as many pages as can be accomodated.
+**
+** Only one of (2) or (3) can be used. Once the memory available to (2) or
+** (3) is exhausted, subsequent allocations fail over to the general-purpose
+** memory allocator (1).
+**
+** Earlier versions of SQLite used only methods (1) and (2). But experiments
+** show that method (3) with N==100 provides about a 5% performance boost for
+** common workloads.
*/
-
+/* #include "sqliteInt.h" */
typedef struct PCache1 PCache1;
typedef struct PgHdr1 PgHdr1;
typedef struct PgFreeslot PgFreeslot;
typedef struct PGroup PGroup;
+/*
+** Each cache entry is represented by an instance of the following
+** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of
+** PgHdr1.pCache->szPage bytes is allocated directly before this structure
+** in memory.
+*/
+struct PgHdr1 {
+ sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */
+ unsigned int iKey; /* Key value (page number) */
+ u8 isPinned; /* Page in use, not on the LRU list */
+ u8 isBulkLocal; /* This page from bulk local storage */
+ u8 isAnchor; /* This is the PGroup.lru element */
+ PgHdr1 *pNext; /* Next in hash table chain */
+ PCache1 *pCache; /* Cache that currently owns this page */
+ PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
+ PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
+};
+
/* Each page cache (or PCache) belongs to a PGroup. A PGroup is a set
** of one or more PCaches that are able to recycle each other's unpinned
** pages when they are under memory pressure. A PGroup is an instance of
@@ -39977,7 +41251,7 @@ struct PGroup {
unsigned int nMinPage; /* Sum of nMin for purgeable caches */
unsigned int mxPinned; /* nMaxpage + 10 - nMinPage */
unsigned int nCurrentPage; /* Number of purgeable pages allocated */
- PgHdr1 *pLruHead, *pLruTail; /* LRU list of unpinned pages */
+ PgHdr1 lru; /* The beginning and end of the LRU list */
};
/* Each page cache is an instance of the following object. Every
@@ -39995,8 +41269,9 @@ struct PCache1 {
** The PGroup mutex must be held when accessing nMax.
*/
PGroup *pGroup; /* PGroup this cache belongs to */
- int szPage; /* Size of allocated pages in bytes */
- int szExtra; /* Size of extra space in bytes */
+ int szPage; /* Size of database content section */
+ int szExtra; /* sizeof(MemPage)+sizeof(PgHdr) */
+ int szAlloc; /* Total size of one pcache line */
int bPurgeable; /* True if cache is purgeable */
unsigned int nMin; /* Minimum number of pages reserved */
unsigned int nMax; /* Configured "cache_size" value */
@@ -40010,27 +41285,13 @@ struct PCache1 {
unsigned int nPage; /* Total number of pages in apHash */
unsigned int nHash; /* Number of slots in apHash[] */
PgHdr1 **apHash; /* Hash table for fast lookup by key */
+ PgHdr1 *pFree; /* List of unused pcache-local pages */
+ void *pBulk; /* Bulk memory used by pcache-local */
};
/*
-** Each cache entry is represented by an instance of the following
-** structure. Unless SQLITE_PCACHE_SEPARATE_HEADER is defined, a buffer of
-** PgHdr1.pCache->szPage bytes is allocated directly before this structure
-** in memory.
-*/
-struct PgHdr1 {
- sqlite3_pcache_page page;
- unsigned int iKey; /* Key value (page number) */
- u8 isPinned; /* Page in use, not on the LRU list */
- PgHdr1 *pNext; /* Next in hash table chain */
- PCache1 *pCache; /* Cache that currently owns this page */
- PgHdr1 *pLruNext; /* Next in LRU list of unpinned pages */
- PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
-};
-
-/*
-** Free slots in the allocator used to divide up the buffer provided using
-** the SQLITE_CONFIG_PAGECACHE mechanism.
+** Free slots in the allocator used to divide up the global page cache
+** buffer provided using the SQLITE_CONFIG_PAGECACHE mechanism.
*/
struct PgFreeslot {
PgFreeslot *pNext; /* Next free slot */
@@ -40048,10 +41309,12 @@ static SQLITE_WSD struct PCacheGlobal {
** The nFreeSlot and pFree values do require mutex protection.
*/
int isInit; /* True if initialized */
+ int separateCache; /* Use a new PGroup for each PCache */
+ int nInitPage; /* Initial bulk allocation size */
int szSlot; /* Size of each free slot */
int nSlot; /* The number of pcache slots */
int nReserve; /* Try to keep nFreeSlot above this */
- void *pStart, *pEnd; /* Bounds of pagecache malloc range */
+ void *pStart, *pEnd; /* Bounds of global page cache memory */
/* Above requires no mutex. Use mutex below for variable that follow. */
sqlite3_mutex *mutex; /* Mutex for accessing the following: */
PgFreeslot *pFree; /* Free page blocks */
@@ -40073,12 +41336,20 @@ static SQLITE_WSD struct PCacheGlobal {
/*
** Macros to enter and leave the PCache LRU mutex.
*/
-#define pcache1EnterMutex(X) sqlite3_mutex_enter((X)->mutex)
-#define pcache1LeaveMutex(X) sqlite3_mutex_leave((X)->mutex)
+#if !defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
+# define pcache1EnterMutex(X) assert((X)->mutex==0)
+# define pcache1LeaveMutex(X) assert((X)->mutex==0)
+# define PCACHE1_MIGHT_USE_GROUP_MUTEX 0
+#else
+# define pcache1EnterMutex(X) sqlite3_mutex_enter((X)->mutex)
+# define pcache1LeaveMutex(X) sqlite3_mutex_leave((X)->mutex)
+# define PCACHE1_MIGHT_USE_GROUP_MUTEX 1
+#endif
/******************************************************************************/
/******** Page Allocation/SQLITE_CONFIG_PCACHE Related Functions **************/
+
/*
** This function is called during initialization if a static buffer is
** supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE
@@ -40091,6 +41362,7 @@ static SQLITE_WSD struct PCacheGlobal {
SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
if( pcache1.isInit ){
PgFreeslot *p;
+ if( pBuf==0 ) sz = n = 0;
sz = ROUNDDOWN8(sz);
pcache1.szSlot = sz;
pcache1.nSlot = pcache1.nFreeSlot = n;
@@ -40109,6 +41381,44 @@ SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
}
/*
+** Try to initialize the pCache->pFree and pCache->pBulk fields. Return
+** true if pCache->pFree ends up containing one or more free pages.
+*/
+static int pcache1InitBulk(PCache1 *pCache){
+ i64 szBulk;
+ char *zBulk;
+ if( pcache1.nInitPage==0 ) return 0;
+ /* Do not bother with a bulk allocation if the cache size very small */
+ if( pCache->nMax<3 ) return 0;
+ sqlite3BeginBenignMalloc();
+ if( pcache1.nInitPage>0 ){
+ szBulk = pCache->szAlloc * (i64)pcache1.nInitPage;
+ }else{
+ szBulk = -1024 * (i64)pcache1.nInitPage;
+ }
+ if( szBulk > pCache->szAlloc*(i64)pCache->nMax ){
+ szBulk = pCache->szAlloc*pCache->nMax;
+ }
+ zBulk = pCache->pBulk = sqlite3Malloc( szBulk );
+ sqlite3EndBenignMalloc();
+ if( zBulk ){
+ int nBulk = sqlite3MallocSize(zBulk)/pCache->szAlloc;
+ int i;
+ for(i=0; i<nBulk; i++){
+ PgHdr1 *pX = (PgHdr1*)&zBulk[pCache->szPage];
+ pX->page.pBuf = zBulk;
+ pX->page.pExtra = &pX[1];
+ pX->isBulkLocal = 1;
+ pX->isAnchor = 0;
+ pX->pNext = pCache->pFree;
+ pCache->pFree = pX;
+ zBulk += pCache->szAlloc;
+ }
+ }
+ return pCache->pFree!=0;
+}
+
+/*
** Malloc function used within this file to allocate space from the buffer
** configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no
** such buffer exists or there is no space left in it, this function falls
@@ -40155,9 +41465,9 @@ static void *pcache1Alloc(int nByte){
/*
** Free an allocated buffer obtained from pcache1Alloc().
*/
-static int pcache1Free(void *p){
+static void pcache1Free(void *p){
int nFreed = 0;
- if( p==0 ) return 0;
+ if( p==0 ) return;
if( p>=pcache1.pStart && p<pcache1.pEnd ){
PgFreeslot *pSlot;
sqlite3_mutex_enter(pcache1.mutex);
@@ -40172,15 +41482,14 @@ static int pcache1Free(void *p){
}else{
assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
- nFreed = sqlite3MallocSize(p);
#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
+ nFreed = sqlite3MallocSize(p);
sqlite3_mutex_enter(pcache1.mutex);
sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);
sqlite3_mutex_leave(pcache1.mutex);
#endif
sqlite3_free(p);
}
- return nFreed;
}
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
@@ -40204,58 +41513,72 @@ static int pcache1MemSize(void *p){
/*
** Allocate a new page object initially associated with cache pCache.
*/
-static PgHdr1 *pcache1AllocPage(PCache1 *pCache){
+static PgHdr1 *pcache1AllocPage(PCache1 *pCache, int benignMalloc){
PgHdr1 *p = 0;
void *pPg;
- /* The group mutex must be released before pcache1Alloc() is called. This
- ** is because it may call sqlite3_release_memory(), which assumes that
- ** this mutex is not held. */
assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
- pcache1LeaveMutex(pCache->pGroup);
+ if( pCache->pFree || (pCache->nPage==0 && pcache1InitBulk(pCache)) ){
+ p = pCache->pFree;
+ pCache->pFree = p->pNext;
+ p->pNext = 0;
+ }else{
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+ /* The group mutex must be released before pcache1Alloc() is called. This
+ ** is because it might call sqlite3_release_memory(), which assumes that
+ ** this mutex is not held. */
+ assert( pcache1.separateCache==0 );
+ assert( pCache->pGroup==&pcache1.grp );
+ pcache1LeaveMutex(pCache->pGroup);
+#endif
+ if( benignMalloc ){ sqlite3BeginBenignMalloc(); }
#ifdef SQLITE_PCACHE_SEPARATE_HEADER
- pPg = pcache1Alloc(pCache->szPage);
- p = sqlite3Malloc(sizeof(PgHdr1) + pCache->szExtra);
- if( !pPg || !p ){
- pcache1Free(pPg);
- sqlite3_free(p);
- pPg = 0;
- }
+ pPg = pcache1Alloc(pCache->szPage);
+ p = sqlite3Malloc(sizeof(PgHdr1) + pCache->szExtra);
+ if( !pPg || !p ){
+ pcache1Free(pPg);
+ sqlite3_free(p);
+ pPg = 0;
+ }
#else
- pPg = pcache1Alloc(ROUND8(sizeof(PgHdr1)) + pCache->szPage + pCache->szExtra);
- p = (PgHdr1 *)&((u8 *)pPg)[pCache->szPage];
+ pPg = pcache1Alloc(pCache->szAlloc);
+ p = (PgHdr1 *)&((u8 *)pPg)[pCache->szPage];
#endif
- pcache1EnterMutex(pCache->pGroup);
-
- if( pPg ){
+ if( benignMalloc ){ sqlite3EndBenignMalloc(); }
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+ pcache1EnterMutex(pCache->pGroup);
+#endif
+ if( pPg==0 ) return 0;
p->page.pBuf = pPg;
p->page.pExtra = &p[1];
- if( pCache->bPurgeable ){
- pCache->pGroup->nCurrentPage++;
- }
- return p;
+ p->isBulkLocal = 0;
+ p->isAnchor = 0;
}
- return 0;
+ if( pCache->bPurgeable ){
+ pCache->pGroup->nCurrentPage++;
+ }
+ return p;
}
/*
** Free a page object allocated by pcache1AllocPage().
-**
-** The pointer is allowed to be NULL, which is prudent. But it turns out
-** that the current implementation happens to never call this routine
-** with a NULL pointer, so we mark the NULL test with ALWAYS().
*/
static void pcache1FreePage(PgHdr1 *p){
- if( ALWAYS(p) ){
- PCache1 *pCache = p->pCache;
- assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
+ PCache1 *pCache;
+ assert( p!=0 );
+ pCache = p->pCache;
+ assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
+ if( p->isBulkLocal ){
+ p->pNext = pCache->pFree;
+ pCache->pFree = p;
+ }else{
pcache1Free(p->page.pBuf);
#ifdef SQLITE_PCACHE_SEPARATE_HEADER
sqlite3_free(p);
#endif
- if( pCache->bPurgeable ){
- pCache->pGroup->nCurrentPage--;
- }
+ }
+ if( pCache->bPurgeable ){
+ pCache->pGroup->nCurrentPage--;
}
}
@@ -40350,41 +41673,35 @@ static void pcache1ResizeHash(PCache1 *p){
**
** The PGroup mutex must be held when this function is called.
*/
-static void pcache1PinPage(PgHdr1 *pPage){
+static PgHdr1 *pcache1PinPage(PgHdr1 *pPage){
PCache1 *pCache;
- PGroup *pGroup;
assert( pPage!=0 );
assert( pPage->isPinned==0 );
pCache = pPage->pCache;
- pGroup = pCache->pGroup;
- assert( pPage->pLruNext || pPage==pGroup->pLruTail );
- assert( pPage->pLruPrev || pPage==pGroup->pLruHead );
- assert( sqlite3_mutex_held(pGroup->mutex) );
- if( pPage->pLruPrev ){
- pPage->pLruPrev->pLruNext = pPage->pLruNext;
- }else{
- pGroup->pLruHead = pPage->pLruNext;
- }
- if( pPage->pLruNext ){
- pPage->pLruNext->pLruPrev = pPage->pLruPrev;
- }else{
- pGroup->pLruTail = pPage->pLruPrev;
- }
+ assert( pPage->pLruNext );
+ assert( pPage->pLruPrev );
+ assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
+ pPage->pLruPrev->pLruNext = pPage->pLruNext;
+ pPage->pLruNext->pLruPrev = pPage->pLruPrev;
pPage->pLruNext = 0;
pPage->pLruPrev = 0;
pPage->isPinned = 1;
+ assert( pPage->isAnchor==0 );
+ assert( pCache->pGroup->lru.isAnchor==1 );
pCache->nRecyclable--;
+ return pPage;
}
/*
** Remove the page supplied as an argument from the hash table
** (PCache1.apHash structure) that it is currently stored in.
+** Also free the page if freePage is true.
**
** The PGroup mutex must be held when this function is called.
*/
-static void pcache1RemoveFromHash(PgHdr1 *pPage){
+static void pcache1RemoveFromHash(PgHdr1 *pPage, int freeFlag){
unsigned int h;
PCache1 *pCache = pPage->pCache;
PgHdr1 **pp;
@@ -40395,21 +41712,28 @@ static void pcache1RemoveFromHash(PgHdr1 *pPage){
*pp = (*pp)->pNext;
pCache->nPage--;
+ if( freeFlag ) pcache1FreePage(pPage);
}
/*
** If there are currently more than nMaxPage pages allocated, try
** to recycle pages to reduce the number allocated to nMaxPage.
*/
-static void pcache1EnforceMaxPage(PGroup *pGroup){
+static void pcache1EnforceMaxPage(PCache1 *pCache){
+ PGroup *pGroup = pCache->pGroup;
+ PgHdr1 *p;
assert( sqlite3_mutex_held(pGroup->mutex) );
- while( pGroup->nCurrentPage>pGroup->nMaxPage && pGroup->pLruTail ){
- PgHdr1 *p = pGroup->pLruTail;
+ while( pGroup->nCurrentPage>pGroup->nMaxPage
+ && (p=pGroup->lru.pLruPrev)->isAnchor==0
+ ){
assert( p->pCache->pGroup==pGroup );
assert( p->isPinned==0 );
pcache1PinPage(p);
- pcache1RemoveFromHash(p);
- pcache1FreePage(p);
+ pcache1RemoveFromHash(p, 1);
+ }
+ if( pCache->nPage==0 && pCache->pBulk ){
+ sqlite3_free(pCache->pBulk);
+ pCache->pBulk = pCache->pFree = 0;
}
}
@@ -40455,10 +41779,45 @@ static int pcache1Init(void *NotUsed){
UNUSED_PARAMETER(NotUsed);
assert( pcache1.isInit==0 );
memset(&pcache1, 0, sizeof(pcache1));
+
+
+ /*
+ ** The pcache1.separateCache variable is true if each PCache has its own
+ ** private PGroup (mode-1). pcache1.separateCache is false if the single
+ ** PGroup in pcache1.grp is used for all page caches (mode-2).
+ **
+ ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
+ **
+ ** * Use a unified cache in single-threaded applications that have
+ ** configured a start-time buffer for use as page-cache memory using
+ ** sqlite3_config(SQLITE_CONFIG_PAGECACHE, pBuf, sz, N) with non-NULL
+ ** pBuf argument.
+ **
+ ** * Otherwise use separate caches (mode-1)
+ */
+#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
+ pcache1.separateCache = 0;
+#elif SQLITE_THREADSAFE
+ pcache1.separateCache = sqlite3GlobalConfig.pPage==0
+ || sqlite3GlobalConfig.bCoreMutex>0;
+#else
+ pcache1.separateCache = sqlite3GlobalConfig.pPage==0;
+#endif
+
+#if SQLITE_THREADSAFE
if( sqlite3GlobalConfig.bCoreMutex ){
pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM);
}
+#endif
+ if( pcache1.separateCache
+ && sqlite3GlobalConfig.nPage!=0
+ && sqlite3GlobalConfig.pPage==0
+ ){
+ pcache1.nInitPage = sqlite3GlobalConfig.nPage;
+ }else{
+ pcache1.nInitPage = 0;
+ }
pcache1.grp.mxPinned = 10;
pcache1.isInit = 1;
return SQLITE_OK;
@@ -40488,39 +41847,26 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
PGroup *pGroup; /* The group the new page cache will belong to */
int sz; /* Bytes of memory required to allocate the new cache */
- /*
- ** The separateCache variable is true if each PCache has its own private
- ** PGroup. In other words, separateCache is true for mode (1) where no
- ** mutexing is required.
- **
- ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
- **
- ** * Always use a unified cache in single-threaded applications
- **
- ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
- ** use separate caches (mode-1)
- */
-#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
- const int separateCache = 0;
-#else
- int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
-#endif
-
assert( (szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536 );
assert( szExtra < 300 );
- sz = sizeof(PCache1) + sizeof(PGroup)*separateCache;
+ sz = sizeof(PCache1) + sizeof(PGroup)*pcache1.separateCache;
pCache = (PCache1 *)sqlite3MallocZero(sz);
if( pCache ){
- if( separateCache ){
+ if( pcache1.separateCache ){
pGroup = (PGroup*)&pCache[1];
pGroup->mxPinned = 10;
}else{
pGroup = &pcache1.grp;
}
+ if( pGroup->lru.isAnchor==0 ){
+ pGroup->lru.isAnchor = 1;
+ pGroup->lru.pLruPrev = pGroup->lru.pLruNext = &pGroup->lru;
+ }
pCache->pGroup = pGroup;
pCache->szPage = szPage;
pCache->szExtra = szExtra;
+ pCache->szAlloc = szPage + szExtra + ROUND8(sizeof(PgHdr1));
pCache->bPurgeable = (bPurgeable ? 1 : 0);
pcache1EnterMutex(pGroup);
pcache1ResizeHash(pCache);
@@ -40552,7 +41898,7 @@ static void pcache1Cachesize(sqlite3_pcache *p, int nMax){
pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
pCache->nMax = nMax;
pCache->n90pct = pCache->nMax*9/10;
- pcache1EnforceMaxPage(pGroup);
+ pcache1EnforceMaxPage(pCache);
pcache1LeaveMutex(pGroup);
}
}
@@ -40570,7 +41916,7 @@ static void pcache1Shrink(sqlite3_pcache *p){
pcache1EnterMutex(pGroup);
savedMaxPage = pGroup->nMaxPage;
pGroup->nMaxPage = 0;
- pcache1EnforceMaxPage(pGroup);
+ pcache1EnforceMaxPage(pCache);
pGroup->nMaxPage = savedMaxPage;
pcache1LeaveMutex(pGroup);
}
@@ -40623,26 +41969,17 @@ static SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(
assert( pCache->nHash>0 && pCache->apHash );
/* Step 4. Try to recycle a page. */
- if( pCache->bPurgeable && pGroup->pLruTail && (
- (pCache->nPage+1>=pCache->nMax)
- || pGroup->nCurrentPage>=pGroup->nMaxPage
- || pcache1UnderMemoryPressure(pCache)
- )){
+ if( pCache->bPurgeable
+ && !pGroup->lru.pLruPrev->isAnchor
+ && ((pCache->nPage+1>=pCache->nMax) || pcache1UnderMemoryPressure(pCache))
+ ){
PCache1 *pOther;
- pPage = pGroup->pLruTail;
+ pPage = pGroup->lru.pLruPrev;
assert( pPage->isPinned==0 );
- pcache1RemoveFromHash(pPage);
+ pcache1RemoveFromHash(pPage, 0);
pcache1PinPage(pPage);
pOther = pPage->pCache;
-
- /* We want to verify that szPage and szExtra are the same for pOther
- ** and pCache. Assert that we can verify this by comparing sums. */
- assert( (pCache->szPage & (pCache->szPage-1))==0 && pCache->szPage>=512 );
- assert( pCache->szExtra<512 );
- assert( (pOther->szPage & (pOther->szPage-1))==0 && pOther->szPage>=512 );
- assert( pOther->szExtra<512 );
-
- if( pOther->szPage+pOther->szExtra != pCache->szPage+pCache->szExtra ){
+ if( pOther->szAlloc != pCache->szAlloc ){
pcache1FreePage(pPage);
pPage = 0;
}else{
@@ -40654,9 +41991,7 @@ static SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(
** attempt to allocate a new one.
*/
if( !pPage ){
- if( createFlag==1 ) sqlite3BeginBenignMalloc();
- pPage = pcache1AllocPage(pCache);
- if( createFlag==1 ) sqlite3EndBenignMalloc();
+ pPage = pcache1AllocPage(pCache, createFlag==1);
}
if( pPage ){
@@ -40730,8 +42065,13 @@ static SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(
** proceed to step 5.
**
** 5. Otherwise, allocate and return a new page buffer.
+**
+** There are two versions of this routine. pcache1FetchWithMutex() is
+** the general case. pcache1FetchNoMutex() is a faster implementation for
+** the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper
+** invokes the appropriate routine.
*/
-static sqlite3_pcache_page *pcache1Fetch(
+static PgHdr1 *pcache1FetchNoMutex(
sqlite3_pcache *p,
unsigned int iKey,
int createFlag
@@ -40739,28 +42079,66 @@ static sqlite3_pcache_page *pcache1Fetch(
PCache1 *pCache = (PCache1 *)p;
PgHdr1 *pPage = 0;
- assert( offsetof(PgHdr1,page)==0 );
- assert( pCache->bPurgeable || createFlag!=1 );
- assert( pCache->bPurgeable || pCache->nMin==0 );
- assert( pCache->bPurgeable==0 || pCache->nMin==10 );
- assert( pCache->nMin==0 || pCache->bPurgeable );
- assert( pCache->nHash>0 );
- pcache1EnterMutex(pCache->pGroup);
-
/* Step 1: Search the hash table for an existing entry. */
pPage = pCache->apHash[iKey % pCache->nHash];
while( pPage && pPage->iKey!=iKey ){ pPage = pPage->pNext; }
- /* Step 2: Abort if no existing page is found and createFlag is 0 */
+ /* Step 2: If the page was found in the hash table, then return it.
+ ** If the page was not in the hash table and createFlag is 0, abort.
+ ** Otherwise (page not in hash and createFlag!=0) continue with
+ ** subsequent steps to try to create the page. */
if( pPage ){
- if( !pPage->isPinned ) pcache1PinPage(pPage);
+ if( !pPage->isPinned ){
+ return pcache1PinPage(pPage);
+ }else{
+ return pPage;
+ }
}else if( createFlag ){
/* Steps 3, 4, and 5 implemented by this subroutine */
- pPage = pcache1FetchStage2(pCache, iKey, createFlag);
+ return pcache1FetchStage2(pCache, iKey, createFlag);
+ }else{
+ return 0;
}
+}
+#if PCACHE1_MIGHT_USE_GROUP_MUTEX
+static PgHdr1 *pcache1FetchWithMutex(
+ sqlite3_pcache *p,
+ unsigned int iKey,
+ int createFlag
+){
+ PCache1 *pCache = (PCache1 *)p;
+ PgHdr1 *pPage;
+
+ pcache1EnterMutex(pCache->pGroup);
+ pPage = pcache1FetchNoMutex(p, iKey, createFlag);
assert( pPage==0 || pCache->iMaxKey>=iKey );
pcache1LeaveMutex(pCache->pGroup);
- return (sqlite3_pcache_page*)pPage;
+ return pPage;
+}
+#endif
+static sqlite3_pcache_page *pcache1Fetch(
+ sqlite3_pcache *p,
+ unsigned int iKey,
+ int createFlag
+){
+#if PCACHE1_MIGHT_USE_GROUP_MUTEX || defined(SQLITE_DEBUG)
+ PCache1 *pCache = (PCache1 *)p;
+#endif
+
+ assert( offsetof(PgHdr1,page)==0 );
+ assert( pCache->bPurgeable || createFlag!=1 );
+ assert( pCache->bPurgeable || pCache->nMin==0 );
+ assert( pCache->bPurgeable==0 || pCache->nMin==10 );
+ assert( pCache->nMin==0 || pCache->bPurgeable );
+ assert( pCache->nHash>0 );
+#if PCACHE1_MIGHT_USE_GROUP_MUTEX
+ if( pCache->pGroup->mutex ){
+ return (sqlite3_pcache_page*)pcache1FetchWithMutex(p, iKey, createFlag);
+ }else
+#endif
+ {
+ return (sqlite3_pcache_page*)pcache1FetchNoMutex(p, iKey, createFlag);
+ }
}
@@ -40785,22 +42163,16 @@ static void pcache1Unpin(
** part of the PGroup LRU list.
*/
assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
- assert( pGroup->pLruHead!=pPage && pGroup->pLruTail!=pPage );
assert( pPage->isPinned==1 );
if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
- pcache1RemoveFromHash(pPage);
- pcache1FreePage(pPage);
+ pcache1RemoveFromHash(pPage, 1);
}else{
/* Add the page to the PGroup LRU list. */
- if( pGroup->pLruHead ){
- pGroup->pLruHead->pLruPrev = pPage;
- pPage->pLruNext = pGroup->pLruHead;
- pGroup->pLruHead = pPage;
- }else{
- pGroup->pLruTail = pPage;
- pGroup->pLruHead = pPage;
- }
+ PgHdr1 **ppFirst = &pGroup->lru.pLruNext;
+ pPage->pLruPrev = &pGroup->lru;
+ (pPage->pLruNext = *ppFirst)->pLruPrev = pPage;
+ *ppFirst = pPage;
pCache->nRecyclable++;
pPage->isPinned = 0;
}
@@ -40877,8 +42249,9 @@ static void pcache1Destroy(sqlite3_pcache *p){
assert( pGroup->nMinPage >= pCache->nMin );
pGroup->nMinPage -= pCache->nMin;
pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
- pcache1EnforceMaxPage(pGroup);
+ pcache1EnforceMaxPage(pCache);
pcache1LeaveMutex(pGroup);
+ sqlite3_free(pCache->pBulk);
sqlite3_free(pCache->apHash);
sqlite3_free(pCache);
}
@@ -40934,18 +42307,20 @@ SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){
int nFree = 0;
assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
assert( sqlite3_mutex_notheld(pcache1.mutex) );
- if( pcache1.pStart==0 ){
+ if( sqlite3GlobalConfig.nPage==0 ){
PgHdr1 *p;
pcache1EnterMutex(&pcache1.grp);
- while( (nReq<0 || nFree<nReq) && ((p=pcache1.grp.pLruTail)!=0) ){
+ while( (nReq<0 || nFree<nReq)
+ && (p=pcache1.grp.lru.pLruPrev)!=0
+ && p->isAnchor==0
+ ){
nFree += pcache1MemSize(p->page.pBuf);
#ifdef SQLITE_PCACHE_SEPARATE_HEADER
nFree += sqlite3MemSize(p);
#endif
assert( p->isPinned==0 );
pcache1PinPage(p);
- pcache1RemoveFromHash(p);
- pcache1FreePage(p);
+ pcache1RemoveFromHash(p, 1);
}
pcache1LeaveMutex(&pcache1.grp);
}
@@ -40966,7 +42341,7 @@ SQLITE_PRIVATE void sqlite3PcacheStats(
){
PgHdr1 *p;
int nRecyclable = 0;
- for(p=pcache1.grp.pLruHead; p; p=p->pLruNext){
+ for(p=pcache1.grp.lru.pLruNext; p && !p->isAnchor; p=p->pLruNext){
assert( p->isPinned==0 );
nRecyclable++;
}
@@ -41041,6 +42416,7 @@ SQLITE_PRIVATE void sqlite3PcacheStats(
** There is an added cost of O(N) when switching between TEST and
** SMALLEST primitives.
*/
+/* #include "sqliteInt.h" */
/*
@@ -41510,6 +42886,7 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64
** another is writing.
*/
#ifndef SQLITE_OMIT_DISKIO
+/* #include "sqliteInt.h" */
/************** Include wal.h in the middle of pager.c ***********************/
/************** Begin file wal.h *********************************************/
/*
@@ -41531,6 +42908,7 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64
#ifndef _WAL_H_
#define _WAL_H_
+/* #include "sqliteInt.h" */
/* Additional values that can be added to the sync_flags argument of
** sqlite3WalFrames():
@@ -42086,9 +43464,9 @@ struct PagerSavepoint {
/*
** Bits of the Pager.doNotSpill flag. See further description below.
*/
-#define SPILLFLAG_OFF 0x01 /* Never spill cache. Set via pragma */
-#define SPILLFLAG_ROLLBACK 0x02 /* Current rolling back, so do not spill */
-#define SPILLFLAG_NOSYNC 0x04 /* Spill is ok, but do not sync */
+#define SPILLFLAG_OFF 0x01 /* Never spill cache. Set via pragma */
+#define SPILLFLAG_ROLLBACK 0x02 /* Current rolling back, so do not spill */
+#define SPILLFLAG_NOSYNC 0x04 /* Spill is ok, but do not sync */
/*
** An open page cache is an instance of struct Pager. A description of
@@ -42170,11 +43548,11 @@ struct PagerSavepoint {
** while it is being traversed by code in pager_playback(). The SPILLFLAG_OFF
** case is a user preference.
**
-** If the SPILLFLAG_NOSYNC bit is set, writing to the database from pagerStress()
-** is permitted, but syncing the journal file is not. This flag is set
-** by sqlite3PagerWrite() when the file-system sector-size is larger than
-** the database page-size in order to prevent a journal sync from happening
-** in between the journalling of two pages on the same sector.
+** If the SPILLFLAG_NOSYNC bit is set, writing to the database from
+** pagerStress() is permitted, but syncing the journal file is not.
+** This flag is set by sqlite3PagerWrite() when the file-system sector-size
+** is larger than the database page-size in order to prevent a journal sync
+** from happening in between the journalling of two pages on the same sector.
**
** subjInMemory
**
@@ -42277,7 +43655,7 @@ struct Pager {
u8 doNotSpill; /* Do not spill the cache when non-zero */
u8 subjInMemory; /* True to use in-memory sub-journals */
u8 bUseFetch; /* True to use xFetch() */
- u8 hasBeenUsed; /* True if any content previously read from this pager*/
+ u8 hasHeldSharedLock; /* True if a shared lock has ever been held */
Pgno dbSize; /* Number of pages in the database */
Pgno dbOrigSize; /* dbSize before the current transaction */
Pgno dbFileSize; /* Number of pages in the database file */
@@ -42438,7 +43816,7 @@ static const unsigned char aJournalMagic[] = {
**
** if( pPager->jfd->pMethods ){ ...
*/
-#define isOpen(pFd) ((pFd)->pMethods)
+#define isOpen(pFd) ((pFd)->pMethods!=0)
/*
** Return true if this pager uses a write-ahead log instead of the usual
@@ -42661,19 +44039,21 @@ static int subjRequiresPage(PgHdr *pPg){
int i;
for(i=0; i<pPager->nSavepoint; i++){
p = &pPager->aSavepoint[i];
- if( p->nOrig>=pgno && 0==sqlite3BitvecTest(p->pInSavepoint, pgno) ){
+ if( p->nOrig>=pgno && 0==sqlite3BitvecTestNotNull(p->pInSavepoint, pgno) ){
return 1;
}
}
return 0;
}
+#ifdef SQLITE_DEBUG
/*
** Return true if the page is already in the journal file.
*/
static int pageInJournal(Pager *pPager, PgHdr *pPg){
return sqlite3BitvecTest(pPager->pInJournal, pPg->pgno);
}
+#endif
/*
** Read a 32-bit integer from the given file descriptor. Store the integer
@@ -43285,7 +44665,8 @@ static int writeMasterJournal(Pager *pPager, const char *zMaster){
|| (0 != (rc = sqlite3OsWrite(pPager->jfd, zMaster, nMaster, iHdrOff+4)))
|| (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster, nMaster)))
|| (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster+4, cksum)))
- || (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8, iHdrOff+4+nMaster+8)))
+ || (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8,
+ iHdrOff+4+nMaster+8)))
){
return rc;
}
@@ -43743,6 +45124,20 @@ static void pagerReportSize(Pager *pPager){
# define pagerReportSize(X) /* No-op if we do not support a codec */
#endif
+#ifdef SQLITE_HAS_CODEC
+/*
+** Make sure the number of reserved bits is the same in the destination
+** pager as it is in the source. This comes up when a VACUUM changes the
+** number of reserved bits to the "optimal" amount.
+*/
+SQLITE_PRIVATE void sqlite3PagerAlignReserve(Pager *pDest, Pager *pSrc){
+ if( pDest->nReserve!=pSrc->nReserve ){
+ pDest->nReserve = pSrc->nReserve;
+ pagerReportSize(pDest);
+ }
+}
+#endif
+
/*
** Read a single page from either the journal file (if isMainJrnl==1) or
** from the sub-journal (if isMainJrnl==0) and playback that page.
@@ -43845,7 +45240,7 @@ static int pager_playback_one_page(
}
}
- /* If this page has already been played by before during the current
+ /* If this page has already been played back before during the current
** rollback, then don't bother to play it back again.
*/
if( pDone && (rc = sqlite3BitvecSet(pDone, pgno))!=SQLITE_OK ){
@@ -44779,11 +46174,10 @@ static int pagerPagecount(Pager *pPager, Pgno *pnPage){
assert( pPager->eLock>=SHARED_LOCK );
nPage = sqlite3WalDbsize(pPager->pWal);
- /* If the database size was not available from the WAL sub-system,
- ** determine it based on the size of the database file. If the size
- ** of the database file is not an integer multiple of the page-size,
- ** round down to the nearest page. Except, any file larger than 0
- ** bytes in size is considered to contain at least one page.
+ /* If the number of pages in the database is not available from the
+ ** WAL sub-system, determine the page counte based on the size of
+ ** the database file. If the size of the database file is not an
+ ** integer multiple of the page-size, round up the result.
*/
if( nPage==0 ){
i64 n = 0; /* Size of db file in bytes */
@@ -45948,8 +47342,6 @@ static int openSubJournal(Pager *pPager){
/*
** Append a record of the current state of page pPg to the sub-journal.
-** It is the callers responsibility to use subjRequiresPage() to check
-** that it is really required before calling this function.
**
** If successful, set the bit corresponding to pPg->pgno in the bitvecs
** for all open savepoints before returning.
@@ -45996,6 +47388,13 @@ static int subjournalPage(PgHdr *pPg){
}
return rc;
}
+static int subjournalPageIfRequired(PgHdr *pPg){
+ if( subjRequiresPage(pPg) ){
+ return subjournalPage(pPg);
+ }else{
+ return SQLITE_OK;
+ }
+}
/*
** This function is called by the pcache layer when it has reached some
@@ -46053,9 +47452,7 @@ static int pagerStress(void *p, PgHdr *pPg){
pPg->pDirty = 0;
if( pagerUseWal(pPager) ){
/* Write a single frame for this page to the log. */
- if( subjRequiresPage(pPg) ){
- rc = subjournalPage(pPg);
- }
+ rc = subjournalPageIfRequired(pPg);
if( rc==SQLITE_OK ){
rc = pagerWalFrames(pPager, pPg, 0, 0);
}
@@ -46068,39 +47465,6 @@ static int pagerStress(void *p, PgHdr *pPg){
rc = syncJournal(pPager, 1);
}
- /* If the page number of this page is larger than the current size of
- ** the database image, it may need to be written to the sub-journal.
- ** This is because the call to pager_write_pagelist() below will not
- ** actually write data to the file in this case.
- **
- ** Consider the following sequence of events:
- **
- ** BEGIN;
- ** <journal page X>
- ** <modify page X>
- ** SAVEPOINT sp;
- ** <shrink database file to Y pages>
- ** pagerStress(page X)
- ** ROLLBACK TO sp;
- **
- ** If (X>Y), then when pagerStress is called page X will not be written
- ** out to the database file, but will be dropped from the cache. Then,
- ** following the "ROLLBACK TO sp" statement, reading page X will read
- ** data from the database file. This will be the copy of page X as it
- ** was when the transaction started, not as it was when "SAVEPOINT sp"
- ** was executed.
- **
- ** The solution is to write the current data for page X into the
- ** sub-journal file now (if it is not already there), so that it will
- ** be restored to its current value when the "ROLLBACK TO sp" is
- ** executed.
- */
- if( NEVER(
- rc==SQLITE_OK && pPg->pgno>pPager->dbSize && subjRequiresPage(pPg)
- ) ){
- rc = subjournalPage(pPg);
- }
-
/* Write the contents of the page out to the database file. */
if( rc==SQLITE_OK ){
assert( (pPg->flags&PGHDR_NEED_SYNC)==0 );
@@ -46356,7 +47720,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
act_like_temp_file:
tempFile = 1;
pPager->eState = PAGER_READER; /* Pretend we already have a lock */
- pPager->eLock = EXCLUSIVE_LOCK; /* Pretend we are in EXCLUSIVE locking mode */
+ pPager->eLock = EXCLUSIVE_LOCK; /* Pretend we are in EXCLUSIVE mode */
pPager->noLock = 1; /* Do no locking */
readOnly = (vfsFlags&SQLITE_OPEN_READONLY);
}
@@ -46375,7 +47739,7 @@ act_like_temp_file:
assert( nExtra<1000 );
nExtra = ROUND8(nExtra);
rc = sqlite3PcacheOpen(szPageDflt, nExtra, !memDb,
- !memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
+ !memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
}
/* If an error occurred above, free the Pager structure and close the file.
@@ -46755,14 +48119,14 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
);
}
- if( !pPager->tempFile && pPager->hasBeenUsed ){
+ if( !pPager->tempFile && pPager->hasHeldSharedLock ){
/* The shared-lock has just been acquired then check to
** see if the database has been modified. If the database has changed,
- ** flush the cache. The pPager->hasBeenUsed flag prevents this from
+ ** flush the cache. The hasHeldSharedLock flag prevents this from
** occurring on the very first access to a file, in order to save a
** single unnecessary sqlite3OsRead() call at the start-up.
**
- ** Database changes is detected by looking at 15 bytes beginning
+ ** Database changes are detected by looking at 15 bytes beginning
** at offset 24 into the file. The first 4 of these 16 bytes are
** a 32-bit counter that is incremented with each change. The
** other bytes change randomly with each file change when
@@ -46828,6 +48192,7 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
assert( pPager->eState==PAGER_OPEN );
}else{
pPager->eState = PAGER_READER;
+ pPager->hasHeldSharedLock = 1;
}
return rc;
}
@@ -46911,21 +48276,25 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
** page 1 if there is no write-transaction open or the ACQUIRE_READONLY
** flag was specified by the caller. And so long as the db is not a
** temporary or in-memory database. */
- const int bMmapOk = (pgno!=1 && USEFETCH(pPager)
+ const int bMmapOk = (pgno>1 && USEFETCH(pPager)
&& (pPager->eState==PAGER_READER || (flags & PAGER_GET_READONLY))
#ifdef SQLITE_HAS_CODEC
&& pPager->xCodec==0
#endif
);
+ /* Optimization note: Adding the "pgno<=1" term before "pgno==0" here
+ ** allows the compiler optimizer to reuse the results of the "pgno>1"
+ ** test in the previous statement, and avoid testing pgno==0 in the
+ ** common case where pgno is large. */
+ if( pgno<=1 && pgno==0 ){
+ return SQLITE_CORRUPT_BKPT;
+ }
assert( pPager->eState>=PAGER_READER );
assert( assert_pager_state(pPager) );
assert( noContent==0 || bMmapOk==0 );
- if( pgno==0 ){
- return SQLITE_CORRUPT_BKPT;
- }
- pPager->hasBeenUsed = 1;
+ assert( pPager->hasHeldSharedLock==1 );
/* If the pager is in the error state, return an error immediately.
** Otherwise, request the page from the PCache layer. */
@@ -46970,9 +48339,14 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
if( pBase==0 ){
rc = sqlite3PcacheFetchStress(pPager->pPCache, pgno, &pBase);
if( rc!=SQLITE_OK ) goto pager_acquire_err;
+ if( pBase==0 ){
+ pPg = *ppPage = 0;
+ rc = SQLITE_NOMEM;
+ goto pager_acquire_err;
+ }
}
pPg = *ppPage = sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pBase);
- if( pPg==0 ) rc = SQLITE_NOMEM;
+ assert( pPg!=0 );
}
}
@@ -46983,10 +48357,11 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
pPg = 0;
goto pager_acquire_err;
}
- assert( (*ppPage)->pgno==pgno );
- assert( (*ppPage)->pPager==pPager || (*ppPage)->pPager==0 );
+ assert( pPg==(*ppPage) );
+ assert( pPg->pgno==pgno );
+ assert( pPg->pPager==pPager || pPg->pPager==0 );
- if( (*ppPage)->pPager && !noContent ){
+ if( pPg->pPager && !noContent ){
/* In this case the pcache already contains an initialized copy of
** the page. Return without further ado. */
assert( pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager) );
@@ -46997,7 +48372,6 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
/* The pager cache has created a new page. Its content needs to
** be initialized. */
- pPg = *ppPage;
pPg->pPager = pPager;
/* The maximum page number is 2^31. Return SQLITE_CORRUPT if a page
@@ -47075,7 +48449,8 @@ SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
assert( pgno!=0 );
assert( pPager->pPCache!=0 );
pPage = sqlite3PcacheFetch(pPager->pPCache, pgno, 0);
- assert( pPage==0 || pPager->hasBeenUsed );
+ assert( pPage==0 || pPager->hasHeldSharedLock );
+ if( pPage==0 ) return 0;
return sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pPage);
}
@@ -47280,6 +48655,59 @@ SQLITE_PRIVATE int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory
}
/*
+** Write page pPg onto the end of the rollback journal.
+*/
+static SQLITE_NOINLINE int pagerAddPageToRollbackJournal(PgHdr *pPg){
+ Pager *pPager = pPg->pPager;
+ int rc;
+ u32 cksum;
+ char *pData2;
+ i64 iOff = pPager->journalOff;
+
+ /* We should never write to the journal file the page that
+ ** contains the database locks. The following assert verifies
+ ** that we do not. */
+ assert( pPg->pgno!=PAGER_MJ_PGNO(pPager) );
+
+ assert( pPager->journalHdr<=pPager->journalOff );
+ CODEC2(pPager, pPg->pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
+ cksum = pager_cksum(pPager, (u8*)pData2);
+
+ /* Even if an IO or diskfull error occurs while journalling the
+ ** page in the block above, set the need-sync flag for the page.
+ ** Otherwise, when the transaction is rolled back, the logic in
+ ** playback_one_page() will think that the page needs to be restored
+ ** in the database file. And if an IO error occurs while doing so,
+ ** then corruption may follow.
+ */
+ pPg->flags |= PGHDR_NEED_SYNC;
+
+ rc = write32bits(pPager->jfd, iOff, pPg->pgno);
+ if( rc!=SQLITE_OK ) return rc;
+ rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
+ if( rc!=SQLITE_OK ) return rc;
+ rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
+ if( rc!=SQLITE_OK ) return rc;
+
+ IOTRACE(("JOUT %p %d %lld %d\n", pPager, pPg->pgno,
+ pPager->journalOff, pPager->pageSize));
+ PAGER_INCR(sqlite3_pager_writej_count);
+ PAGERTRACE(("JOURNAL %d page %d needSync=%d hash(%08x)\n",
+ PAGERID(pPager), pPg->pgno,
+ ((pPg->flags&PGHDR_NEED_SYNC)?1:0), pager_pagehash(pPg)));
+
+ pPager->journalOff += 8 + pPager->pageSize;
+ pPager->nRec++;
+ assert( pPager->pInJournal!=0 );
+ rc = sqlite3BitvecSet(pPager->pInJournal, pPg->pgno);
+ testcase( rc==SQLITE_NOMEM );
+ assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
+ rc |= addToSavepointBitvecs(pPager, pPg->pgno);
+ assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
+ return rc;
+}
+
+/*
** Mark a single data page as writeable. The page is written into the
** main journal or sub-journal as required. If the page is written into
** one of the journals, the corresponding bit is set in the
@@ -47289,7 +48717,6 @@ SQLITE_PRIVATE int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory
static int pager_write(PgHdr *pPg){
Pager *pPager = pPg->pPager;
int rc = SQLITE_OK;
- int inJournal;
/* This routine is not called unless a write-transaction has already
** been started. The journal file may or may not be open at this point.
@@ -47302,7 +48729,6 @@ static int pager_write(PgHdr *pPg){
assert( assert_pager_state(pPager) );
assert( pPager->errCode==0 );
assert( pPager->readOnly==0 );
-
CHECK_PAGE(pPg);
/* The journal file needs to be opened. Higher level routines have already
@@ -47321,91 +48747,48 @@ static int pager_write(PgHdr *pPg){
assert( pPager->eState>=PAGER_WRITER_CACHEMOD );
assert( assert_pager_state(pPager) );
- /* Mark the page as dirty. If the page has already been written
- ** to the journal then we can return right away.
- */
+ /* Mark the page that is about to be modified as dirty. */
sqlite3PcacheMakeDirty(pPg);
- inJournal = pageInJournal(pPager, pPg);
- if( inJournal && (pPager->nSavepoint==0 || !subjRequiresPage(pPg)) ){
- assert( !pagerUseWal(pPager) );
- }else{
-
- /* The transaction journal now exists and we have a RESERVED or an
- ** EXCLUSIVE lock on the main database file. Write the current page to
- ** the transaction journal if it is not there already.
- */
- if( !inJournal && !pagerUseWal(pPager) ){
- assert( pagerUseWal(pPager)==0 );
- if( pPg->pgno<=pPager->dbOrigSize && isOpen(pPager->jfd) ){
- u32 cksum;
- char *pData2;
- i64 iOff = pPager->journalOff;
-
- /* We should never write to the journal file the page that
- ** contains the database locks. The following assert verifies
- ** that we do not. */
- assert( pPg->pgno!=PAGER_MJ_PGNO(pPager) );
-
- assert( pPager->journalHdr<=pPager->journalOff );
- CODEC2(pPager, pPg->pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
- cksum = pager_cksum(pPager, (u8*)pData2);
-
- /* Even if an IO or diskfull error occurs while journalling the
- ** page in the block above, set the need-sync flag for the page.
- ** Otherwise, when the transaction is rolled back, the logic in
- ** playback_one_page() will think that the page needs to be restored
- ** in the database file. And if an IO error occurs while doing so,
- ** then corruption may follow.
- */
- pPg->flags |= PGHDR_NEED_SYNC;
- rc = write32bits(pPager->jfd, iOff, pPg->pgno);
- if( rc!=SQLITE_OK ) return rc;
- rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
- if( rc!=SQLITE_OK ) return rc;
- rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
- if( rc!=SQLITE_OK ) return rc;
-
- IOTRACE(("JOUT %p %d %lld %d\n", pPager, pPg->pgno,
- pPager->journalOff, pPager->pageSize));
- PAGER_INCR(sqlite3_pager_writej_count);
- PAGERTRACE(("JOURNAL %d page %d needSync=%d hash(%08x)\n",
- PAGERID(pPager), pPg->pgno,
- ((pPg->flags&PGHDR_NEED_SYNC)?1:0), pager_pagehash(pPg)));
-
- pPager->journalOff += 8 + pPager->pageSize;
- pPager->nRec++;
- assert( pPager->pInJournal!=0 );
- rc = sqlite3BitvecSet(pPager->pInJournal, pPg->pgno);
- testcase( rc==SQLITE_NOMEM );
- assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
- rc |= addToSavepointBitvecs(pPager, pPg->pgno);
- if( rc!=SQLITE_OK ){
- assert( rc==SQLITE_NOMEM );
- return rc;
- }
- }else{
- if( pPager->eState!=PAGER_WRITER_DBMOD ){
- pPg->flags |= PGHDR_NEED_SYNC;
- }
- PAGERTRACE(("APPEND %d page %d needSync=%d\n",
- PAGERID(pPager), pPg->pgno,
- ((pPg->flags&PGHDR_NEED_SYNC)?1:0)));
+ /* If a rollback journal is in use, them make sure the page that is about
+ ** to change is in the rollback journal, or if the page is a new page off
+ ** then end of the file, make sure it is marked as PGHDR_NEED_SYNC.
+ */
+ assert( (pPager->pInJournal!=0) == isOpen(pPager->jfd) );
+ if( pPager->pInJournal!=0
+ && sqlite3BitvecTestNotNull(pPager->pInJournal, pPg->pgno)==0
+ ){
+ assert( pagerUseWal(pPager)==0 );
+ if( pPg->pgno<=pPager->dbOrigSize ){
+ rc = pagerAddPageToRollbackJournal(pPg);
+ if( rc!=SQLITE_OK ){
+ return rc;
}
- }
-
- /* If the statement journal is open and the page is not in it,
- ** then write the current page to the statement journal. Note that
- ** the statement journal format differs from the standard journal format
- ** in that it omits the checksums and the header.
- */
- if( pPager->nSavepoint>0 && subjRequiresPage(pPg) ){
- rc = subjournalPage(pPg);
+ }else{
+ if( pPager->eState!=PAGER_WRITER_DBMOD ){
+ pPg->flags |= PGHDR_NEED_SYNC;
+ }
+ PAGERTRACE(("APPEND %d page %d needSync=%d\n",
+ PAGERID(pPager), pPg->pgno,
+ ((pPg->flags&PGHDR_NEED_SYNC)?1:0)));
}
}
- /* Update the database size and return.
+ /* The PGHDR_DIRTY bit is set above when the page was added to the dirty-list
+ ** and before writing the page into the rollback journal. Wait until now,
+ ** after the page has been successfully journalled, before setting the
+ ** PGHDR_WRITEABLE bit that indicates that the page can be safely modified.
+ */
+ pPg->flags |= PGHDR_WRITEABLE;
+
+ /* If the statement journal is open and the page is not in it,
+ ** then write the page into the statement journal.
*/
+ if( pPager->nSavepoint>0 ){
+ rc = subjournalPageIfRequired(pPg);
+ }
+
+ /* Update the database size and return. */
if( pPager->dbSize<pPg->pgno ){
pPager->dbSize = pPg->pgno;
}
@@ -47420,17 +48803,17 @@ static int pager_write(PgHdr *pPg){
** a write.
**
** Usually, the sector size is less than or equal to the page size, in which
-** case pages can be individually written. This routine only runs in the exceptional
-** case where the page size is smaller than the sector size.
+** case pages can be individually written. This routine only runs in the
+** exceptional case where the page size is smaller than the sector size.
*/
static SQLITE_NOINLINE int pagerWriteLargeSector(PgHdr *pPg){
- int rc = SQLITE_OK; /* Return code */
- Pgno nPageCount; /* Total number of pages in database file */
- Pgno pg1; /* First page of the sector pPg is located on. */
- int nPage = 0; /* Number of pages starting at pg1 to journal */
- int ii; /* Loop counter */
- int needSync = 0; /* True if any page has PGHDR_NEED_SYNC */
- Pager *pPager = pPg->pPager; /* The pager that owns pPg */
+ int rc = SQLITE_OK; /* Return code */
+ Pgno nPageCount; /* Total number of pages in database file */
+ Pgno pg1; /* First page of the sector pPg is located on. */
+ int nPage = 0; /* Number of pages starting at pg1 to journal */
+ int ii; /* Loop counter */
+ int needSync = 0; /* True if any page has PGHDR_NEED_SYNC */
+ Pager *pPager = pPg->pPager; /* The pager that owns pPg */
Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);
/* Set the doNotSpill NOSYNC bit to 1. This is because we cannot allow
@@ -47518,11 +48901,15 @@ static SQLITE_NOINLINE int pagerWriteLargeSector(PgHdr *pPg){
** as appropriate. Otherwise, SQLITE_OK.
*/
SQLITE_PRIVATE int sqlite3PagerWrite(PgHdr *pPg){
+ Pager *pPager = pPg->pPager;
assert( (pPg->flags & PGHDR_MMAP)==0 );
- assert( pPg->pPager->eState>=PAGER_WRITER_LOCKED );
- assert( pPg->pPager->eState!=PAGER_ERROR );
- assert( assert_pager_state(pPg->pPager) );
- if( pPg->pPager->sectorSize > (u32)pPg->pPager->pageSize ){
+ assert( pPager->eState>=PAGER_WRITER_LOCKED );
+ assert( pPager->eState!=PAGER_ERROR );
+ assert( assert_pager_state(pPager) );
+ if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
+ if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);
+ return SQLITE_OK;
+ }else if( pPager->sectorSize > (u32)pPager->pageSize ){
return pagerWriteLargeSector(pPg);
}else{
return pager_write(pPg);
@@ -47536,7 +48923,7 @@ SQLITE_PRIVATE int sqlite3PagerWrite(PgHdr *pPg){
*/
#ifndef NDEBUG
SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage *pPg){
- return pPg->flags&PGHDR_DIRTY;
+ return pPg->flags & PGHDR_WRITEABLE;
}
#endif
@@ -47560,6 +48947,7 @@ SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){
PAGERTRACE(("DONT_WRITE page %d of %d\n", pPg->pgno, PAGERID(pPager)));
IOTRACE(("CLEAN %p %d\n", pPager, pPg->pgno))
pPg->flags |= PGHDR_DONT_WRITE;
+ pPg->flags &= ~PGHDR_WRITEABLE;
pager_set_pagehash(pPg);
}
}
@@ -48026,12 +49414,14 @@ SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager *pPager){
return pPager->readOnly;
}
+#ifdef SQLITE_DEBUG
/*
-** Return the number of references to the pager.
+** Return the sum of the reference counts for all pages held by pPager.
*/
SQLITE_PRIVATE int sqlite3PagerRefcount(Pager *pPager){
return sqlite3PcacheRefCount(pPager->pPCache);
}
+#endif
/*
** Return the approximate number of bytes of memory currently
@@ -48114,54 +49504,62 @@ SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager *pPager){
** occurs while opening the sub-journal file, then an IO error code is
** returned. Otherwise, SQLITE_OK.
*/
-SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
+static SQLITE_NOINLINE int pagerOpenSavepoint(Pager *pPager, int nSavepoint){
int rc = SQLITE_OK; /* Return code */
int nCurrent = pPager->nSavepoint; /* Current number of savepoints */
+ int ii; /* Iterator variable */
+ PagerSavepoint *aNew; /* New Pager.aSavepoint array */
assert( pPager->eState>=PAGER_WRITER_LOCKED );
assert( assert_pager_state(pPager) );
+ assert( nSavepoint>nCurrent && pPager->useJournal );
- if( nSavepoint>nCurrent && pPager->useJournal ){
- int ii; /* Iterator variable */
- PagerSavepoint *aNew; /* New Pager.aSavepoint array */
+ /* Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM
+ ** if the allocation fails. Otherwise, zero the new portion in case a
+ ** malloc failure occurs while populating it in the for(...) loop below.
+ */
+ aNew = (PagerSavepoint *)sqlite3Realloc(
+ pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint
+ );
+ if( !aNew ){
+ return SQLITE_NOMEM;
+ }
+ memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));
+ pPager->aSavepoint = aNew;
- /* Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM
- ** if the allocation fails. Otherwise, zero the new portion in case a
- ** malloc failure occurs while populating it in the for(...) loop below.
- */
- aNew = (PagerSavepoint *)sqlite3Realloc(
- pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint
- );
- if( !aNew ){
+ /* Populate the PagerSavepoint structures just allocated. */
+ for(ii=nCurrent; ii<nSavepoint; ii++){
+ aNew[ii].nOrig = pPager->dbSize;
+ if( isOpen(pPager->jfd) && pPager->journalOff>0 ){
+ aNew[ii].iOffset = pPager->journalOff;
+ }else{
+ aNew[ii].iOffset = JOURNAL_HDR_SZ(pPager);
+ }
+ aNew[ii].iSubRec = pPager->nSubRec;
+ aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager->dbSize);
+ if( !aNew[ii].pInSavepoint ){
return SQLITE_NOMEM;
}
- memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));
- pPager->aSavepoint = aNew;
-
- /* Populate the PagerSavepoint structures just allocated. */
- for(ii=nCurrent; ii<nSavepoint; ii++){
- aNew[ii].nOrig = pPager->dbSize;
- if( isOpen(pPager->jfd) && pPager->journalOff>0 ){
- aNew[ii].iOffset = pPager->journalOff;
- }else{
- aNew[ii].iOffset = JOURNAL_HDR_SZ(pPager);
- }
- aNew[ii].iSubRec = pPager->nSubRec;
- aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager->dbSize);
- if( !aNew[ii].pInSavepoint ){
- return SQLITE_NOMEM;
- }
- if( pagerUseWal(pPager) ){
- sqlite3WalSavepoint(pPager->pWal, aNew[ii].aWalData);
- }
- pPager->nSavepoint = ii+1;
+ if( pagerUseWal(pPager) ){
+ sqlite3WalSavepoint(pPager->pWal, aNew[ii].aWalData);
}
- assert( pPager->nSavepoint==nSavepoint );
- assertTruncateConstraint(pPager);
+ pPager->nSavepoint = ii+1;
}
-
+ assert( pPager->nSavepoint==nSavepoint );
+ assertTruncateConstraint(pPager);
return rc;
}
+SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
+ assert( pPager->eState>=PAGER_WRITER_LOCKED );
+ assert( assert_pager_state(pPager) );
+
+ if( nSavepoint>pPager->nSavepoint && pPager->useJournal ){
+ return pagerOpenSavepoint(pPager, nSavepoint);
+ }else{
+ return SQLITE_OK;
+ }
+}
+
/*
** This function is called to rollback or release (commit) a savepoint.
@@ -48392,9 +49790,8 @@ SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, i
** one or more savepoint bitvecs. This is the reason this function
** may return SQLITE_NOMEM.
*/
- if( pPg->flags&PGHDR_DIRTY
- && subjRequiresPage(pPg)
- && SQLITE_OK!=(rc = subjournalPage(pPg))
+ if( (pPg->flags & PGHDR_DIRTY)!=0
+ && SQLITE_OK!=(rc = subjournalPageIfRequired(pPg))
){
return rc;
}
@@ -49145,6 +50542,7 @@ SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){
*/
#ifndef SQLITE_OMIT_WAL
+/* #include "wal.h" */
/*
** Trace output macros
@@ -49330,6 +50728,7 @@ struct Wal {
u8 syncHeader; /* Fsync the WAL header if true */
u8 padToSectorBoundary; /* Pad transactions out to the next sector */
WalIndexHdr hdr; /* Wal-index header for current transaction */
+ u32 minFrame; /* Ignore wal frames before this one */
const char *zWalName; /* Name of WAL file */
u32 nCkpt; /* Checkpoint sequence counter in the wal-header */
#ifdef SQLITE_DEBUG
@@ -49550,9 +50949,9 @@ static void walIndexWriteHdr(Wal *pWal){
pWal->hdr.isInit = 1;
pWal->hdr.iVersion = WALINDEX_MAX_VERSION;
walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);
- memcpy((void *)&aHdr[1], (void *)&pWal->hdr, sizeof(WalIndexHdr));
+ memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
walShmBarrier(pWal);
- memcpy((void *)&aHdr[0], (void *)&pWal->hdr, sizeof(WalIndexHdr));
+ memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
}
/*
@@ -49854,13 +51253,13 @@ static void walCleanupHash(Wal *pWal){
** via the hash table even after the cleanup.
*/
if( iLimit ){
- int i; /* Loop counter */
+ int j; /* Loop counter */
int iKey; /* Hash key */
- for(i=1; i<=iLimit; i++){
- for(iKey=walHash(aPgno[i]); aHash[iKey]; iKey=walNextHash(iKey)){
- if( aHash[iKey]==i ) break;
+ for(j=1; j<=iLimit; j++){
+ for(iKey=walHash(aPgno[j]); aHash[iKey]; iKey=walNextHash(iKey)){
+ if( aHash[iKey]==j ) break;
}
- assert( aHash[iKey]==i );
+ assert( aHash[iKey]==j );
}
}
#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */
@@ -50362,7 +51761,7 @@ static void walMergesort(
int nMerge = 0; /* Number of elements in list aMerge */
ht_slot *aMerge = 0; /* List to be merged */
int iList; /* Index into input list */
- int iSub = 0; /* Index into aSub array */
+ u32 iSub = 0; /* Index into aSub array */
struct Sublist aSub[13]; /* Array of sub-lists */
memset(aSub, 0, sizeof(aSub));
@@ -50373,7 +51772,9 @@ static void walMergesort(
nMerge = 1;
aMerge = &aList[iList];
for(iSub=0; iList & (1<<iSub); iSub++){
- struct Sublist *p = &aSub[iSub];
+ struct Sublist *p;
+ assert( iSub<ArraySize(aSub) );
+ p = &aSub[iSub];
assert( p->aList && p->nList<=(1<<iSub) );
assert( p->aList==&aList[iList&~((2<<iSub)-1)] );
walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);
@@ -50384,7 +51785,9 @@ static void walMergesort(
for(iSub++; iSub<ArraySize(aSub); iSub++){
if( nList & (1<<iSub) ){
- struct Sublist *p = &aSub[iSub];
+ struct Sublist *p;
+ assert( iSub<ArraySize(aSub) );
+ p = &aSub[iSub];
assert( p->nList<=(1<<iSub) );
assert( p->aList==&aList[nList&~((2<<iSub)-1)] );
walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);
@@ -51194,12 +52597,27 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
** pWal->hdr.mxFrame risks reading a corrupted snapshot. So, retry
** instead.
**
- ** This does not guarantee that the copy of the wal-index header is up to
- ** date before proceeding. That would not be possible without somehow
- ** blocking writers. It only guarantees that a dangerous checkpoint or
- ** log-wrap (either of which would require an exclusive lock on
- ** WAL_READ_LOCK(mxI)) has not occurred since the snapshot was valid.
+ ** Before checking that the live wal-index header has not changed
+ ** since it was read, set Wal.minFrame to the first frame in the wal
+ ** file that has not yet been checkpointed. This client will not need
+ ** to read any frames earlier than minFrame from the wal file - they
+ ** can be safely read directly from the database file.
+ **
+ ** Because a ShmBarrier() call is made between taking the copy of
+ ** nBackfill and checking that the wal-header in shared-memory still
+ ** matches the one cached in pWal->hdr, it is guaranteed that the
+ ** checkpointer that set nBackfill was not working with a wal-index
+ ** header newer than that cached in pWal->hdr. If it were, that could
+ ** cause a problem. The checkpointer could omit to checkpoint
+ ** a version of page X that lies before pWal->minFrame (call that version
+ ** A) on the basis that there is a newer version (version B) of the same
+ ** page later in the wal file. But if version B happens to like past
+ ** frame pWal->hdr.mxFrame - then the client would incorrectly assume
+ ** that it can read version A from the database file. However, since
+ ** we can guarantee that the checkpointer that set nBackfill could not
+ ** see any pages past pWal->hdr.mxFrame, this problem does not come up.
*/
+ pWal->minFrame = pInfo->nBackfill+1;
walShmBarrier(pWal);
if( pInfo->aReadMark[mxI]!=mxReadMark
|| memcmp((void *)walIndexHdr(pWal), &pWal->hdr, sizeof(WalIndexHdr))
@@ -51270,6 +52688,7 @@ SQLITE_PRIVATE int sqlite3WalFindFrame(
u32 iRead = 0; /* If !=0, WAL frame to return data from */
u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */
int iHash; /* Used to loop through N hash tables */
+ int iMinHash;
/* This routine is only be called from within a read transaction. */
assert( pWal->readLock>=0 || pWal->lockError );
@@ -51310,7 +52729,8 @@ SQLITE_PRIVATE int sqlite3WalFindFrame(
** This condition filters out entries that were added to the hash
** table after the current read-transaction had started.
*/
- for(iHash=walFramePage(iLast); iHash>=0 && iRead==0; iHash--){
+ iMinHash = walFramePage(pWal->minFrame);
+ for(iHash=walFramePage(iLast); iHash>=iMinHash && iRead==0; iHash--){
volatile ht_slot *aHash; /* Pointer to hash table */
volatile u32 *aPgno; /* Pointer to array of page numbers */
u32 iZero; /* Frame number corresponding to aPgno[0] */
@@ -51325,7 +52745,7 @@ SQLITE_PRIVATE int sqlite3WalFindFrame(
nCollide = HASHTABLE_NSLOT;
for(iKey=walHash(pgno); aHash[iKey]; iKey=walNextHash(iKey)){
u32 iFrame = aHash[iKey] + iZero;
- if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
+ if( iFrame<=iLast && iFrame>=pWal->minFrame && aPgno[aHash[iKey]]==pgno ){
assert( iFrame>iRead || CORRUPT_DB );
iRead = iFrame;
}
@@ -51342,7 +52762,8 @@ SQLITE_PRIVATE int sqlite3WalFindFrame(
{
u32 iRead2 = 0;
u32 iTest;
- for(iTest=iLast; iTest>0; iTest--){
+ assert( pWal->minFrame>0 );
+ for(iTest=iLast; iTest>=pWal->minFrame; iTest--){
if( walFramePgno(pWal, iTest)==pgno ){
iRead2 = iTest;
break;
@@ -52295,6 +53716,7 @@ SQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal){
** 4 Number of leaf pointers on this page
** * zero or more pages numbers of leaves
*/
+/* #include "sqliteInt.h" */
/* The following value is the maximum cell size assuming a maximum page
@@ -52312,6 +53734,7 @@ SQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal){
/* Forward declarations */
typedef struct MemPage MemPage;
typedef struct BtLock BtLock;
+typedef struct CellInfo CellInfo;
/*
** This is a magic string that appears at the beginning of every
@@ -52375,7 +53798,10 @@ struct MemPage {
u8 *aData; /* Pointer to disk image of the page data */
u8 *aDataEnd; /* One byte past the end of usable data */
u8 *aCellIdx; /* The cell index area */
+ u8 *aDataOfst; /* Same as aData for leaves. aData+4 for interior */
DbPage *pDbPage; /* Pager page handle */
+ u16 (*xCellSize)(MemPage*,u8*); /* cellSizePtr method */
+ void (*xParseCell)(MemPage*,u8*,CellInfo*); /* btreeParseCell method */
Pgno pgno; /* Page number for this page */
};
@@ -52431,6 +53857,7 @@ struct Btree {
u8 inTrans; /* TRANS_NONE, TRANS_READ or TRANS_WRITE */
u8 sharable; /* True if we can share pBt with another db */
u8 locked; /* True if db currently has pBt locked */
+ u8 hasIncrblobCur; /* True if there are one or more Incrblob cursors */
int wantToLock; /* Number of nested calls to sqlite3BtreeEnter() */
int nBackup; /* Number of backup operations reading this btree */
u32 iDataVersion; /* Combines with pBt->pPager->iDataVersion */
@@ -52541,7 +53968,6 @@ struct BtShared {
** about a cell. The parseCellPtr() function fills in this structure
** based on information extract from the raw disk page.
*/
-typedef struct CellInfo CellInfo;
struct CellInfo {
i64 nKey; /* The key for INTKEY tables, or nPayload otherwise */
u8 *pPayload; /* Pointer to the start of payload */
@@ -52584,8 +54010,7 @@ struct CellInfo {
struct BtCursor {
Btree *pBtree; /* The Btree to which this cursor belongs */
BtShared *pBt; /* The BtShared this cursor points to */
- BtCursor *pNext, *pPrev; /* Forms a linked list of all cursors */
- struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
+ BtCursor *pNext; /* Forms a linked list of all cursors */
Pgno *aOverflow; /* Cache of overflow page locations */
CellInfo info; /* A parse of the cell we are pointing at */
i64 nKey; /* Size of pKey, or last integer key */
@@ -52595,9 +54020,16 @@ struct BtCursor {
int skipNext; /* Prev() is noop if negative. Next() is noop if positive.
** Error code if eState==CURSOR_FAULT */
u8 curFlags; /* zero or more BTCF_* flags defined below */
+ u8 curPagerFlags; /* Flags to send to sqlite3PagerAcquire() */
u8 eState; /* One of the CURSOR_XXX constants (see below) */
- u8 hints; /* As configured by CursorSetHints() */
- i16 iPage; /* Index of current page in apPage */
+ u8 hints; /* As configured by CursorSetHints() */
+ /* All fields above are zeroed when the cursor is allocated. See
+ ** sqlite3BtreeCursorZero(). Fields that follow must be manually
+ ** initialized. */
+ i8 iPage; /* Index of current page in apPage */
+ u8 curIntKey; /* Value of apPage[0]->intKey */
+ struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
+ void *padding1; /* Make object size a multiple of 16 */
u16 aiIdx[BTCURSOR_MAX_DEPTH]; /* Current index in apPage[i] */
MemPage *apPage[BTCURSOR_MAX_DEPTH]; /* Pages from root to current page */
};
@@ -52610,6 +54042,7 @@ struct BtCursor {
#define BTCF_ValidOvfl 0x04 /* True if aOverflow is valid */
#define BTCF_AtLast 0x08 /* Cursor is pointing ot the last entry */
#define BTCF_Incrblob 0x10 /* True if an incremental I/O handle */
+#define BTCF_Multiple 0x20 /* Maybe another cursor on the same btree */
/*
** Potential values for BtCursor.eState.
@@ -52752,6 +54185,7 @@ struct IntegrityCk {
const char *zPfx; /* Error message prefix */
int v1, v2; /* Values for up to two %d fields in zPfx */
StrAccum errMsg; /* Accumulate the error message text here */
+ u32 *heap; /* Min-heap used for analyzing cell coverage */
};
/*
@@ -52762,6 +54196,23 @@ struct IntegrityCk {
#define get4byte sqlite3Get4byte
#define put4byte sqlite3Put4byte
+/*
+** get2byteAligned(), unlike get2byte(), requires that its argument point to a
+** two-byte aligned address. get2bytea() is only used for accessing the
+** cell addresses in a btree header.
+*/
+#if SQLITE_BYTEORDER==4321
+# define get2byteAligned(x) (*(u16*)(x))
+#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
+ && GCC_VERSION>=4008000
+# define get2byteAligned(x) __builtin_bswap16(*(u16*)(x))
+#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
+ && defined(_MSC_VER) && _MSC_VER>=1300
+# define get2byteAligned(x) _byteswap_ushort(*(u16*)(x))
+#else
+# define get2byteAligned(x) ((x)[0]<<8 | (x)[1])
+#endif
+
/************** End of btreeInt.h ********************************************/
/************** Continuing where we left off in btmutex.c ********************/
#ifndef SQLITE_OMIT_SHARED_CACHE
@@ -53065,6 +54516,7 @@ SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
** See the header comment on "btreeInt.h" for additional information.
** Including a description of file format and an overview of operation.
*/
+/* #include "btreeInt.h" */
/*
** The header string that appears at the beginning of every
@@ -53541,13 +54993,15 @@ static void invalidateIncrblobCursors(
int isClearTable /* True if all rows are being deleted */
){
BtCursor *p;
- BtShared *pBt = pBtree->pBt;
+ if( pBtree->hasIncrblobCur==0 ) return;
assert( sqlite3BtreeHoldsMutex(pBtree) );
- for(p=pBt->pCursor; p; p=p->pNext){
- if( (p->curFlags & BTCF_Incrblob)!=0
- && (isClearTable || p->info.nKey==iRow)
- ){
- p->eState = CURSOR_INVALID;
+ pBtree->hasIncrblobCur = 0;
+ for(p=pBtree->pBt->pCursor; p; p=p->pNext){
+ if( (p->curFlags & BTCF_Incrblob)!=0 ){
+ pBtree->hasIncrblobCur = 1;
+ if( isClearTable || p->info.nKey==iRow ){
+ p->eState = CURSOR_INVALID;
+ }
}
}
}
@@ -53640,26 +55094,25 @@ static void btreeReleaseAllCursorPages(BtCursor *pCur){
pCur->iPage = -1;
}
-
/*
-** Save the current cursor position in the variables BtCursor.nKey
-** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.
+** The cursor passed as the only argument must point to a valid entry
+** when this function is called (i.e. have eState==CURSOR_VALID). This
+** function saves the current cursor key in variables pCur->nKey and
+** pCur->pKey. SQLITE_OK is returned if successful or an SQLite error
+** code otherwise.
**
-** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
-** prior to calling this routine.
+** If the cursor is open on an intkey table, then the integer key
+** (the rowid) is stored in pCur->nKey and pCur->pKey is left set to
+** NULL. If the cursor is open on a non-intkey table, then pCur->pKey is
+** set to point to a malloced buffer pCur->nKey bytes in size containing
+** the key.
*/
-static int saveCursorPosition(BtCursor *pCur){
+static int saveCursorKey(BtCursor *pCur){
int rc;
-
- assert( CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState );
+ assert( CURSOR_VALID==pCur->eState );
assert( 0==pCur->pKey );
assert( cursorHoldsMutex(pCur) );
- if( pCur->eState==CURSOR_SKIPNEXT ){
- pCur->eState = CURSOR_VALID;
- }else{
- pCur->skipNext = 0;
- }
rc = sqlite3BtreeKeySize(pCur, &pCur->nKey);
assert( rc==SQLITE_OK ); /* KeySize() cannot fail */
@@ -53667,9 +55120,8 @@ static int saveCursorPosition(BtCursor *pCur){
** stores the integer key in pCur->nKey. In this case this value is
** all that is required. Otherwise, if pCur is not open on an intKey
** table, then malloc space for and store the pCur->nKey bytes of key
- ** data.
- */
- if( 0==pCur->apPage[0]->intKey ){
+ ** data. */
+ if( 0==pCur->curIntKey ){
void *pKey = sqlite3Malloc( pCur->nKey );
if( pKey ){
rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey);
@@ -53682,14 +55134,37 @@ static int saveCursorPosition(BtCursor *pCur){
rc = SQLITE_NOMEM;
}
}
- assert( !pCur->apPage[0]->intKey || !pCur->pKey );
+ assert( !pCur->curIntKey || !pCur->pKey );
+ return rc;
+}
+/*
+** Save the current cursor position in the variables BtCursor.nKey
+** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.
+**
+** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
+** prior to calling this routine.
+*/
+static int saveCursorPosition(BtCursor *pCur){
+ int rc;
+
+ assert( CURSOR_VALID==pCur->eState || CURSOR_SKIPNEXT==pCur->eState );
+ assert( 0==pCur->pKey );
+ assert( cursorHoldsMutex(pCur) );
+
+ if( pCur->eState==CURSOR_SKIPNEXT ){
+ pCur->eState = CURSOR_VALID;
+ }else{
+ pCur->skipNext = 0;
+ }
+
+ rc = saveCursorKey(pCur);
if( rc==SQLITE_OK ){
btreeReleaseAllCursorPages(pCur);
pCur->eState = CURSOR_REQUIRESEEK;
}
- invalidateOverflowCache(pCur);
+ pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl|BTCF_AtLast);
return rc;
}
@@ -53704,6 +55179,15 @@ static int SQLITE_NOINLINE saveCursorsOnList(BtCursor*,Pgno,BtCursor*);
** routine is called just before cursor pExcept is used to modify the
** table, for example in BtreeDelete() or BtreeInsert().
**
+** If there are two or more cursors on the same btree, then all such
+** cursors should have their BTCF_Multiple flag set. The btreeCursor()
+** routine enforces that rule. This routine only needs to be called in
+** the uncommon case when pExpect has the BTCF_Multiple flag set.
+**
+** If pExpect!=NULL and if no other cursors are found on the same root-page,
+** then the BTCF_Multiple flag on pExpect is cleared, to avoid another
+** pointless call to this routine.
+**
** Implementation note: This routine merely checks to see if any cursors
** need to be saved. It calls out to saveCursorsOnList() in the (unusual)
** event that cursors are in need to being saved.
@@ -53715,7 +55199,9 @@ static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
for(p=pBt->pCursor; p; p=p->pNext){
if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) ) break;
}
- return p ? saveCursorsOnList(p, iRoot, pExcept) : SQLITE_OK;
+ if( p ) return saveCursorsOnList(p, iRoot, pExcept);
+ if( pExcept ) pExcept->curFlags &= ~BTCF_Multiple;
+ return SQLITE_OK;
}
/* This helper routine to saveAllCursors does the actual work of saving
@@ -54003,39 +55489,88 @@ static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
** the page, 1 means the second cell, and so forth) return a pointer
** to the cell content.
**
+** findCellPastPtr() does the same except it skips past the initial
+** 4-byte child pointer found on interior pages, if there is one.
+**
** This routine works only for pages that do not contain overflow cells.
*/
#define findCell(P,I) \
- ((P)->aData + ((P)->maskPage & get2byte(&(P)->aCellIdx[2*(I)])))
-#define findCellv2(D,M,O,I) (D+(M&get2byte(D+(O+2*(I)))))
+ ((P)->aData + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))
+#define findCellPastPtr(P,I) \
+ ((P)->aDataOfst + ((P)->maskPage & get2byteAligned(&(P)->aCellIdx[2*(I)])))
/*
-** This a more complex version of findCell() that works for
-** pages that do contain overflow cells.
+** This is common tail processing for btreeParseCellPtr() and
+** btreeParseCellPtrIndex() for the case when the cell does not fit entirely
+** on a single B-tree page. Make necessary adjustments to the CellInfo
+** structure.
*/
-static u8 *findOverflowCell(MemPage *pPage, int iCell){
- int i;
- assert( sqlite3_mutex_held(pPage->pBt->mutex) );
- for(i=pPage->nOverflow-1; i>=0; i--){
- int k;
- k = pPage->aiOvfl[i];
- if( k<=iCell ){
- if( k==iCell ){
- return pPage->apOvfl[i];
- }
- iCell--;
- }
+static SQLITE_NOINLINE void btreeParseCellAdjustSizeForOverflow(
+ MemPage *pPage, /* Page containing the cell */
+ u8 *pCell, /* Pointer to the cell text. */
+ CellInfo *pInfo /* Fill in this structure */
+){
+ /* If the payload will not fit completely on the local page, we have
+ ** to decide how much to store locally and how much to spill onto
+ ** overflow pages. The strategy is to minimize the amount of unused
+ ** space on overflow pages while keeping the amount of local storage
+ ** in between minLocal and maxLocal.
+ **
+ ** Warning: changing the way overflow payload is distributed in any
+ ** way will result in an incompatible file format.
+ */
+ int minLocal; /* Minimum amount of payload held locally */
+ int maxLocal; /* Maximum amount of payload held locally */
+ int surplus; /* Overflow payload available for local storage */
+
+ minLocal = pPage->minLocal;
+ maxLocal = pPage->maxLocal;
+ surplus = minLocal + (pInfo->nPayload - minLocal)%(pPage->pBt->usableSize-4);
+ testcase( surplus==maxLocal );
+ testcase( surplus==maxLocal+1 );
+ if( surplus <= maxLocal ){
+ pInfo->nLocal = (u16)surplus;
+ }else{
+ pInfo->nLocal = (u16)minLocal;
}
- return findCell(pPage, iCell);
+ pInfo->iOverflow = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell);
+ pInfo->nSize = pInfo->iOverflow + 4;
}
/*
-** Parse a cell content block and fill in the CellInfo structure. There
-** are two versions of this function. btreeParseCell() takes a
-** cell index as the second argument and btreeParseCellPtr()
-** takes a pointer to the body of the cell as its second argument.
+** The following routines are implementations of the MemPage.xParseCell()
+** method.
+**
+** Parse a cell content block and fill in the CellInfo structure.
+**
+** btreeParseCellPtr() => table btree leaf nodes
+** btreeParseCellNoPayload() => table btree internal nodes
+** btreeParseCellPtrIndex() => index btree nodes
+**
+** There is also a wrapper function btreeParseCell() that works for
+** all MemPage types and that references the cell by index rather than
+** by pointer.
*/
+static void btreeParseCellPtrNoPayload(
+ MemPage *pPage, /* Page containing the cell */
+ u8 *pCell, /* Pointer to the cell text. */
+ CellInfo *pInfo /* Fill in this structure */
+){
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( pPage->leaf==0 );
+ assert( pPage->noPayload );
+ assert( pPage->childPtrSize==4 );
+#ifndef SQLITE_DEBUG
+ UNUSED_PARAMETER(pPage);
+#endif
+ pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
+ pInfo->nPayload = 0;
+ pInfo->nLocal = 0;
+ pInfo->iOverflow = 0;
+ pInfo->pPayload = 0;
+ return;
+}
static void btreeParseCellPtr(
MemPage *pPage, /* Page containing the cell */
u8 *pCell, /* Pointer to the cell text. */
@@ -54043,26 +55578,93 @@ static void btreeParseCellPtr(
){
u8 *pIter; /* For scanning through pCell */
u32 nPayload; /* Number of bytes of cell payload */
+ u64 iKey; /* Extracted Key value */
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 || pPage->leaf==1 );
- if( pPage->intKeyLeaf ){
- assert( pPage->childPtrSize==0 );
- pIter = pCell + getVarint32(pCell, nPayload);
- pIter += getVarint(pIter, (u64*)&pInfo->nKey);
- }else if( pPage->noPayload ){
- assert( pPage->childPtrSize==4 );
- pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
- pInfo->nPayload = 0;
- pInfo->nLocal = 0;
+ assert( pPage->intKeyLeaf || pPage->noPayload );
+ assert( pPage->noPayload==0 );
+ assert( pPage->intKeyLeaf );
+ assert( pPage->childPtrSize==0 );
+ pIter = pCell;
+
+ /* The next block of code is equivalent to:
+ **
+ ** pIter += getVarint32(pIter, nPayload);
+ **
+ ** The code is inlined to avoid a function call.
+ */
+ nPayload = *pIter;
+ if( nPayload>=0x80 ){
+ u8 *pEnd = &pIter[8];
+ nPayload &= 0x7f;
+ do{
+ nPayload = (nPayload<<7) | (*++pIter & 0x7f);
+ }while( (*pIter)>=0x80 && pIter<pEnd );
+ }
+ pIter++;
+
+ /* The next block of code is equivalent to:
+ **
+ ** pIter += getVarint(pIter, (u64*)&pInfo->nKey);
+ **
+ ** The code is inlined to avoid a function call.
+ */
+ iKey = *pIter;
+ if( iKey>=0x80 ){
+ u8 *pEnd = &pIter[7];
+ iKey &= 0x7f;
+ while(1){
+ iKey = (iKey<<7) | (*++pIter & 0x7f);
+ if( (*pIter)<0x80 ) break;
+ if( pIter>=pEnd ){
+ iKey = (iKey<<8) | *++pIter;
+ break;
+ }
+ }
+ }
+ pIter++;
+
+ pInfo->nKey = *(i64*)&iKey;
+ pInfo->nPayload = nPayload;
+ pInfo->pPayload = pIter;
+ testcase( nPayload==pPage->maxLocal );
+ testcase( nPayload==pPage->maxLocal+1 );
+ if( nPayload<=pPage->maxLocal ){
+ /* This is the (easy) common case where the entire payload fits
+ ** on the local page. No overflow is required.
+ */
+ pInfo->nSize = nPayload + (u16)(pIter - pCell);
+ if( pInfo->nSize<4 ) pInfo->nSize = 4;
+ pInfo->nLocal = (u16)nPayload;
pInfo->iOverflow = 0;
- pInfo->pPayload = 0;
- return;
}else{
- pIter = pCell + pPage->childPtrSize;
- pIter += getVarint32(pIter, nPayload);
- pInfo->nKey = nPayload;
+ btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
}
+}
+static void btreeParseCellPtrIndex(
+ MemPage *pPage, /* Page containing the cell */
+ u8 *pCell, /* Pointer to the cell text. */
+ CellInfo *pInfo /* Fill in this structure */
+){
+ u8 *pIter; /* For scanning through pCell */
+ u32 nPayload; /* Number of bytes of cell payload */
+
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+ assert( pPage->leaf==0 || pPage->leaf==1 );
+ assert( pPage->intKeyLeaf==0 );
+ assert( pPage->noPayload==0 );
+ pIter = pCell + pPage->childPtrSize;
+ nPayload = *pIter;
+ if( nPayload>=0x80 ){
+ u8 *pEnd = &pIter[8];
+ nPayload &= 0x7f;
+ do{
+ nPayload = (nPayload<<7) | (*++pIter & 0x7f);
+ }while( *(pIter)>=0x80 && pIter<pEnd );
+ }
+ pIter++;
+ pInfo->nKey = nPayload;
pInfo->nPayload = nPayload;
pInfo->pPayload = pIter;
testcase( nPayload==pPage->maxLocal );
@@ -54076,31 +55678,7 @@ static void btreeParseCellPtr(
pInfo->nLocal = (u16)nPayload;
pInfo->iOverflow = 0;
}else{
- /* If the payload will not fit completely on the local page, we have
- ** to decide how much to store locally and how much to spill onto
- ** overflow pages. The strategy is to minimize the amount of unused
- ** space on overflow pages while keeping the amount of local storage
- ** in between minLocal and maxLocal.
- **
- ** Warning: changing the way overflow payload is distributed in any
- ** way will result in an incompatible file format.
- */
- int minLocal; /* Minimum amount of payload held locally */
- int maxLocal; /* Maximum amount of payload held locally */
- int surplus; /* Overflow payload available for local storage */
-
- minLocal = pPage->minLocal;
- maxLocal = pPage->maxLocal;
- surplus = minLocal + (nPayload - minLocal)%(pPage->pBt->usableSize - 4);
- testcase( surplus==maxLocal );
- testcase( surplus==maxLocal+1 );
- if( surplus <= maxLocal ){
- pInfo->nLocal = (u16)surplus;
- }else{
- pInfo->nLocal = (u16)minLocal;
- }
- pInfo->iOverflow = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell);
- pInfo->nSize = pInfo->iOverflow + 4;
+ btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
}
}
static void btreeParseCell(
@@ -54108,14 +55686,20 @@ static void btreeParseCell(
int iCell, /* The cell index. First cell is 0 */
CellInfo *pInfo /* Fill in this structure */
){
- btreeParseCellPtr(pPage, findCell(pPage, iCell), pInfo);
+ pPage->xParseCell(pPage, findCell(pPage, iCell), pInfo);
}
/*
+** The following routines are implementations of the MemPage.xCellSize
+** method.
+**
** Compute the total number of bytes that a Cell needs in the cell
** data area of the btree-page. The return number includes the cell
** data header and the local payload, but not any overflow page or
** the space used by the cell pointer.
+**
+** cellSizePtrNoPayload() => table internal nodes
+** cellSizePtr() => all index nodes & table leaf nodes
*/
static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
u8 *pIter = pCell + pPage->childPtrSize; /* For looping over bytes of pCell */
@@ -54128,18 +55712,13 @@ static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
** this function verifies that this invariant is not violated. */
CellInfo debuginfo;
- btreeParseCellPtr(pPage, pCell, &debuginfo);
+ pPage->xParseCell(pPage, pCell, &debuginfo);
#endif
- if( pPage->noPayload ){
- pEnd = &pIter[9];
- while( (*pIter++)&0x80 && pIter<pEnd );
- assert( pPage->childPtrSize==4 );
- return (u16)(pIter - pCell);
- }
+ assert( pPage->noPayload==0 );
nSize = *pIter;
if( nSize>=0x80 ){
- pEnd = &pIter[9];
+ pEnd = &pIter[8];
nSize &= 0x7f;
do{
nSize = (nSize<<7) | (*++pIter & 0x7f);
@@ -54171,12 +55750,34 @@ static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
assert( nSize==debuginfo.nSize || CORRUPT_DB );
return (u16)nSize;
}
+static u16 cellSizePtrNoPayload(MemPage *pPage, u8 *pCell){
+ u8 *pIter = pCell + 4; /* For looping over bytes of pCell */
+ u8 *pEnd; /* End mark for a varint */
+
+#ifdef SQLITE_DEBUG
+ /* The value returned by this function should always be the same as
+ ** the (CellInfo.nSize) value found by doing a full parse of the
+ ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
+ ** this function verifies that this invariant is not violated. */
+ CellInfo debuginfo;
+ pPage->xParseCell(pPage, pCell, &debuginfo);
+#else
+ UNUSED_PARAMETER(pPage);
+#endif
+
+ assert( pPage->childPtrSize==4 );
+ pEnd = pIter + 9;
+ while( (*pIter++)&0x80 && pIter<pEnd );
+ assert( debuginfo.nSize==(u16)(pIter - pCell) || CORRUPT_DB );
+ return (u16)(pIter - pCell);
+}
+
#ifdef SQLITE_DEBUG
/* This variation on cellSizePtr() is used inside of assert() statements
** only. */
static u16 cellSize(MemPage *pPage, int iCell){
- return cellSizePtr(pPage, findCell(pPage, iCell));
+ return pPage->xCellSize(pPage, findCell(pPage, iCell));
}
#endif
@@ -54190,7 +55791,7 @@ static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
CellInfo info;
if( *pRC ) return;
assert( pCell!=0 );
- btreeParseCellPtr(pPage, pCell, &info);
+ pPage->xParseCell(pPage, pCell, &info);
if( info.iOverflow ){
Pgno ovfl = get4byte(&pCell[info.iOverflow]);
ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC);
@@ -54247,26 +55848,18 @@ static int defragmentPage(MemPage *pPage){
pc = get2byte(pAddr);
testcase( pc==iCellFirst );
testcase( pc==iCellLast );
-#if !defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
/* These conditions have already been verified in btreeInitPage()
- ** if SQLITE_ENABLE_OVERSIZE_CELL_CHECK is defined
+ ** if PRAGMA cell_size_check=ON.
*/
if( pc<iCellFirst || pc>iCellLast ){
return SQLITE_CORRUPT_BKPT;
}
-#endif
assert( pc>=iCellFirst && pc<=iCellLast );
- size = cellSizePtr(pPage, &src[pc]);
+ size = pPage->xCellSize(pPage, &src[pc]);
cbrk -= size;
-#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
- if( cbrk<iCellFirst ){
- return SQLITE_CORRUPT_BKPT;
- }
-#else
if( cbrk<iCellFirst || pc+size>usableSize ){
return SQLITE_CORRUPT_BKPT;
}
-#endif
assert( cbrk+size<=usableSize && cbrk>=iCellFirst );
testcase( cbrk+size==usableSize );
testcase( pc+size==usableSize );
@@ -54304,18 +55897,20 @@ static int defragmentPage(MemPage *pPage){
** This function may detect corruption within pPg. If corruption is
** detected then *pRc is set to SQLITE_CORRUPT and NULL is returned.
**
-** If a slot of at least nByte bytes is found but cannot be used because
-** there are already at least 60 fragmented bytes on the page, return NULL.
-** In this case, if pbDefrag parameter is not NULL, set *pbDefrag to true.
+** Slots on the free list that are between 1 and 3 bytes larger than nByte
+** will be ignored if adding the extra space to the fragmentation count
+** causes the fragmentation count to exceed 60.
*/
-static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc, int *pbDefrag){
+static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
const int hdr = pPg->hdrOffset;
u8 * const aData = pPg->aData;
- int iAddr;
- int pc;
+ int iAddr = hdr + 1;
+ int pc = get2byte(&aData[iAddr]);
+ int x;
int usableSize = pPg->pBt->usableSize;
- for(iAddr=hdr+1; (pc = get2byte(&aData[iAddr]))>0; iAddr=pc){
+ assert( pc>0 );
+ do{
int size; /* Size of the free slot */
/* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
** increasing offset. */
@@ -54327,24 +55922,21 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc, int *pbDefrag){
** freeblock form a big-endian integer which is the size of the freeblock
** in bytes, including the 4-byte header. */
size = get2byte(&aData[pc+2]);
- if( size>=nByte ){
- int x = size - nByte;
+ if( (x = size - nByte)>=0 ){
testcase( x==4 );
testcase( x==3 );
- if( x<4 ){
+ if( pc < pPg->cellOffset+2*pPg->nCell || size+pc > usableSize ){
+ *pRc = SQLITE_CORRUPT_BKPT;
+ return 0;
+ }else if( x<4 ){
/* EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total
** number of bytes in fragments may not exceed 60. */
- if( aData[hdr+7]>=60 ){
- if( pbDefrag ) *pbDefrag = 1;
- return 0;
- }
+ if( aData[hdr+7]>57 ) return 0;
+
/* Remove the slot from the free-list. Update the number of
** fragmented bytes within the page. */
memcpy(&aData[iAddr], &aData[pc], 2);
aData[hdr+7] += (u8)x;
- }else if( size+pc > usableSize ){
- *pRc = SQLITE_CORRUPT_BKPT;
- return 0;
}else{
/* The slot remains on the free-list. Reduce its size to account
** for the portion used by the new allocation. */
@@ -54352,7 +55944,9 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc, int *pbDefrag){
}
return &aData[pc + x];
}
- }
+ iAddr = pc;
+ pc = get2byte(&aData[pc]);
+ }while( pc );
return 0;
}
@@ -54393,8 +55987,15 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
** then the cell content offset of an empty page wants to be 65536.
** However, that integer is too large to be stored in a 2-byte unsigned
** integer, so a value of 0 is used in its place. */
- top = get2byteNotZero(&data[hdr+5]);
- if( gap>top ) return SQLITE_CORRUPT_BKPT;
+ top = get2byte(&data[hdr+5]);
+ assert( top<=(int)pPage->pBt->usableSize ); /* Prevent by getAndInitPage() */
+ if( gap>top ){
+ if( top==0 && pPage->pBt->usableSize==65536 ){
+ top = 65536;
+ }else{
+ return SQLITE_CORRUPT_BKPT;
+ }
+ }
/* If there is enough space between gap and top for one more cell pointer
** array entry offset, and if the freelist is not empty, then search the
@@ -54403,15 +56004,14 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
testcase( gap+2==top );
testcase( gap+1==top );
testcase( gap==top );
- if( gap+2<=top && (data[hdr+1] || data[hdr+2]) ){
- int bDefrag = 0;
- u8 *pSpace = pageFindSlot(pPage, nByte, &rc, &bDefrag);
- if( rc ) return rc;
- if( bDefrag ) goto defragment_page;
+ if( (data[hdr+2] || data[hdr+1]) && gap+2<=top ){
+ u8 *pSpace = pageFindSlot(pPage, nByte, &rc);
if( pSpace ){
assert( pSpace>=data && (pSpace - data)<65536 );
*pIdx = (int)(pSpace - data);
return SQLITE_OK;
+ }else if( rc ){
+ return rc;
}
}
@@ -54420,7 +56020,6 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
*/
testcase( gap+2+nByte==top );
if( gap+2+nByte>top ){
- defragment_page:
assert( pPage->nCell>0 || CORRUPT_DB );
rc = defragmentPage(pPage);
if( rc ) return rc;
@@ -54467,7 +56066,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
assert( pPage->pBt!=0 );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
- assert( iStart>=pPage->hdrOffset+6+pPage->childPtrSize );
+ assert( CORRUPT_DB || iStart>=pPage->hdrOffset+6+pPage->childPtrSize );
assert( CORRUPT_DB || iEnd <= pPage->pBt->usableSize );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( iSize>=4 ); /* Minimum cell size is 4 */
@@ -54496,7 +56095,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
/* At this point:
** iFreeBlk: First freeblock after iStart, or zero if none
- ** iPtr: The address of a pointer iFreeBlk
+ ** iPtr: The address of a pointer to iFreeBlk
**
** Check to see if iFreeBlk should be coalesced onto the end of iStart.
*/
@@ -54504,6 +56103,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
nFrag = iFreeBlk - iEnd;
if( iEnd>iFreeBlk ) return SQLITE_CORRUPT_BKPT;
iEnd = iFreeBlk + get2byte(&data[iFreeBlk+2]);
+ if( iEnd > pPage->pBt->usableSize ) return SQLITE_CORRUPT_BKPT;
iSize = iEnd - iStart;
iFreeBlk = get2byte(&data[iFreeBlk]);
}
@@ -54561,6 +56161,7 @@ static int decodeFlags(MemPage *pPage, int flagByte){
pPage->leaf = (u8)(flagByte>>3); assert( PTF_LEAF == 1<<3 );
flagByte &= ~PTF_LEAF;
pPage->childPtrSize = 4-4*pPage->leaf;
+ pPage->xCellSize = cellSizePtr;
pBt = pPage->pBt;
if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
/* EVIDENCE-OF: R-03640-13415 A value of 5 means the page is an interior
@@ -54570,8 +56171,16 @@ static int decodeFlags(MemPage *pPage, int flagByte){
** table b-tree page. */
assert( (PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF)==13 );
pPage->intKey = 1;
- pPage->intKeyLeaf = pPage->leaf;
- pPage->noPayload = !pPage->leaf;
+ if( pPage->leaf ){
+ pPage->intKeyLeaf = 1;
+ pPage->noPayload = 0;
+ pPage->xParseCell = btreeParseCellPtr;
+ }else{
+ pPage->intKeyLeaf = 0;
+ pPage->noPayload = 1;
+ pPage->xCellSize = cellSizePtrNoPayload;
+ pPage->xParseCell = btreeParseCellPtrNoPayload;
+ }
pPage->maxLocal = pBt->maxLeaf;
pPage->minLocal = pBt->minLeaf;
}else if( flagByte==PTF_ZERODATA ){
@@ -54584,6 +56193,7 @@ static int decodeFlags(MemPage *pPage, int flagByte){
pPage->intKey = 0;
pPage->intKeyLeaf = 0;
pPage->noPayload = 0;
+ pPage->xParseCell = btreeParseCellPtrIndex;
pPage->maxLocal = pBt->maxLocal;
pPage->minLocal = pBt->minLocal;
}else{
@@ -54607,6 +56217,7 @@ static int decodeFlags(MemPage *pPage, int flagByte){
static int btreeInitPage(MemPage *pPage){
assert( pPage->pBt!=0 );
+ assert( pPage->pBt->db!=0 );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
@@ -54638,6 +56249,7 @@ static int btreeInitPage(MemPage *pPage){
pPage->cellOffset = cellOffset = hdr + 8 + pPage->childPtrSize;
pPage->aDataEnd = &data[usableSize];
pPage->aCellIdx = &data[cellOffset];
+ pPage->aDataOfst = &data[pPage->childPtrSize];
/* EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates
** the start of the cell content area. A zero value for this integer is
** interpreted as 65536. */
@@ -54665,20 +56277,19 @@ static int btreeInitPage(MemPage *pPage){
*/
iCellFirst = cellOffset + 2*pPage->nCell;
iCellLast = usableSize - 4;
-#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
- {
+ if( pBt->db->flags & SQLITE_CellSizeCk ){
int i; /* Index into the cell pointer array */
int sz; /* Size of a cell */
if( !pPage->leaf ) iCellLast--;
for(i=0; i<pPage->nCell; i++){
- pc = get2byte(&data[cellOffset+i*2]);
+ pc = get2byteAligned(&data[cellOffset+i*2]);
testcase( pc==iCellFirst );
testcase( pc==iCellLast );
if( pc<iCellFirst || pc>iCellLast ){
return SQLITE_CORRUPT_BKPT;
}
- sz = cellSizePtr(pPage, &data[pc]);
+ sz = pPage->xCellSize(pPage, &data[pc]);
testcase( pc+sz==usableSize );
if( pc+sz>usableSize ){
return SQLITE_CORRUPT_BKPT;
@@ -54686,7 +56297,6 @@ static int btreeInitPage(MemPage *pPage){
}
if( !pPage->leaf ) iCellLast++;
}
-#endif
/* Compute the total free space on the page
** EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the
@@ -54759,6 +56369,7 @@ static void zeroPage(MemPage *pPage, int flags){
pPage->cellOffset = first;
pPage->aDataEnd = &data[pBt->usableSize];
pPage->aCellIdx = &data[first];
+ pPage->aDataOfst = &data[pPage->childPtrSize];
pPage->nOverflow = 0;
assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
pPage->maskPage = (u16)(pBt->pageSize - 1);
@@ -54777,16 +56388,16 @@ static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
pPage->pDbPage = pDbPage;
pPage->pBt = pBt;
pPage->pgno = pgno;
- pPage->hdrOffset = pPage->pgno==1 ? 100 : 0;
+ pPage->hdrOffset = pgno==1 ? 100 : 0;
return pPage;
}
/*
** Get a page from the pager. Initialize the MemPage.pBt and
-** MemPage.aData elements if needed.
+** MemPage.aData elements if needed. See also: btreeGetUnusedPage().
**
-** If the noContent flag is set, it means that we do not care about
-** the content of the page at this time. So do not go to the disk
+** If the PAGER_GET_NOCONTENT flag is set, it means that we do not care
+** about the content of the page at this time. So do not go to the disk
** to fetch the content. Just fill in the content with zeros for now.
** If in the future we call sqlite3PagerWrite() on this page, that
** means we have started to be concerned about content and the disk
@@ -54838,35 +56449,62 @@ SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree *p){
}
/*
-** Get a page from the pager and initialize it. This routine is just a
-** convenience wrapper around separate calls to btreeGetPage() and
-** btreeInitPage().
+** Get a page from the pager and initialize it.
+**
+** If pCur!=0 then the page is being fetched as part of a moveToChild()
+** call. Do additional sanity checking on the page in this case.
+** And if the fetch fails, this routine must decrement pCur->iPage.
**
-** If an error occurs, then the value *ppPage is set to is undefined. It
+** The page is fetched as read-write unless pCur is not NULL and is
+** a read-only cursor.
+**
+** If an error occurs, then *ppPage is undefined. It
** may remain unchanged, or it may be set to an invalid value.
*/
static int getAndInitPage(
BtShared *pBt, /* The database file */
Pgno pgno, /* Number of the page to get */
MemPage **ppPage, /* Write the page pointer here */
- int bReadonly /* PAGER_GET_READONLY or 0 */
+ BtCursor *pCur, /* Cursor to receive the page, or NULL */
+ int bReadOnly /* True for a read-only page */
){
int rc;
+ DbPage *pDbPage;
assert( sqlite3_mutex_held(pBt->mutex) );
- assert( bReadonly==PAGER_GET_READONLY || bReadonly==0 );
+ assert( pCur==0 || ppPage==&pCur->apPage[pCur->iPage] );
+ assert( pCur==0 || bReadOnly==pCur->curPagerFlags );
+ assert( pCur==0 || pCur->iPage>0 );
if( pgno>btreePagecount(pBt) ){
rc = SQLITE_CORRUPT_BKPT;
- }else{
- rc = btreeGetPage(pBt, pgno, ppPage, bReadonly);
- if( rc==SQLITE_OK && (*ppPage)->isInit==0 ){
- rc = btreeInitPage(*ppPage);
- if( rc!=SQLITE_OK ){
- releasePage(*ppPage);
- }
+ goto getAndInitPage_error;
+ }
+ rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);
+ if( rc ){
+ goto getAndInitPage_error;
+ }
+ *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
+ if( (*ppPage)->isInit==0 ){
+ rc = btreeInitPage(*ppPage);
+ if( rc!=SQLITE_OK ){
+ releasePage(*ppPage);
+ goto getAndInitPage_error;
}
}
+ /* If obtaining a child page for a cursor, we must verify that the page is
+ ** compatible with the root page. */
+ if( pCur
+ && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey)
+ ){
+ rc = SQLITE_CORRUPT_BKPT;
+ releasePage(*ppPage);
+ goto getAndInitPage_error;
+ }
+ return SQLITE_OK;
+
+getAndInitPage_error:
+ if( pCur ) pCur->iPage--;
testcase( pgno==0 );
assert( pgno!=0 || rc==SQLITE_CORRUPT );
return rc;
@@ -54876,18 +56514,49 @@ static int getAndInitPage(
** Release a MemPage. This should be called once for each prior
** call to btreeGetPage.
*/
+static void releasePageNotNull(MemPage *pPage){
+ assert( pPage->aData );
+ assert( pPage->pBt );
+ assert( pPage->pDbPage!=0 );
+ assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
+ assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+ sqlite3PagerUnrefNotNull(pPage->pDbPage);
+}
static void releasePage(MemPage *pPage){
- if( pPage ){
- assert( pPage->aData );
- assert( pPage->pBt );
- assert( pPage->pDbPage!=0 );
- assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
- assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
- assert( sqlite3_mutex_held(pPage->pBt->mutex) );
- sqlite3PagerUnrefNotNull(pPage->pDbPage);
+ if( pPage ) releasePageNotNull(pPage);
+}
+
+/*
+** Get an unused page.
+**
+** This works just like btreeGetPage() with the addition:
+**
+** * If the page is already in use for some other purpose, immediately
+** release it and return an SQLITE_CURRUPT error.
+** * Make sure the isInit flag is clear
+*/
+static int btreeGetUnusedPage(
+ BtShared *pBt, /* The btree */
+ Pgno pgno, /* Number of the page to fetch */
+ MemPage **ppPage, /* Return the page in this parameter */
+ int flags /* PAGER_GET_NOCONTENT or PAGER_GET_READONLY */
+){
+ int rc = btreeGetPage(pBt, pgno, ppPage, flags);
+ if( rc==SQLITE_OK ){
+ if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
+ releasePage(*ppPage);
+ *ppPage = 0;
+ return SQLITE_CORRUPT_BKPT;
+ }
+ (*ppPage)->isInit = 0;
+ }else{
+ *ppPage = 0;
}
+ return rc;
}
+
/*
** During a rollback, when the pager reloads information into the cache
** so that the cache is restored to its original state at the start of
@@ -55830,7 +57499,7 @@ static void unlockBtreeIfUnused(BtShared *pBt){
assert( pPage1->aData );
assert( sqlite3PagerRefcount(pBt->pPager)==1 );
pBt->pPage1 = 0;
- releasePage(pPage1);
+ releasePageNotNull(pPage1);
}
}
@@ -56135,15 +57804,17 @@ static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
u8 isInitOrig = pPage->isInit;
int i;
int nCell;
+ int rc;
- btreeInitPage(pPage);
+ rc = btreeInitPage(pPage);
+ if( rc ) return rc;
nCell = pPage->nCell;
for(i=0; i<nCell; i++){
u8 *pCell = findCell(pPage, i);
if( eType==PTRMAP_OVERFLOW1 ){
CellInfo info;
- btreeParseCellPtr(pPage, pCell, &info);
+ pPage->xParseCell(pPage, pCell, &info);
if( info.iOverflow
&& pCell+info.iOverflow+3<=pPage->aData+pPage->maskPage
&& iFrom==get4byte(&pCell[info.iOverflow])
@@ -56442,7 +58113,7 @@ SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *p){
static int autoVacuumCommit(BtShared *pBt){
int rc = SQLITE_OK;
Pager *pPager = pBt->pPager;
- VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager) );
+ VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager); )
assert( sqlite3_mutex_held(pBt->mutex) );
invalidateAllOverflowCache(pBt);
@@ -56884,6 +58555,7 @@ static int btreeCursor(
BtCursor *pCur /* Space for new cursor */
){
BtShared *pBt = p->pBt; /* Shared b-tree handle */
+ BtCursor *pX; /* Looping over other all cursors */
assert( sqlite3BtreeHoldsMutex(p) );
assert( wrFlag==0 || wrFlag==1 );
@@ -56899,10 +58571,8 @@ static int btreeCursor(
assert( p->inTrans>TRANS_NONE );
assert( wrFlag==0 || p->inTrans==TRANS_WRITE );
assert( pBt->pPage1 && pBt->pPage1->aData );
+ assert( wrFlag==0 || (pBt->btsFlags & BTS_READ_ONLY)==0 );
- if( NEVER(wrFlag && (pBt->btsFlags & BTS_READ_ONLY)!=0) ){
- return SQLITE_READONLY;
- }
if( wrFlag ){
allocateTempSpace(pBt);
if( pBt->pTmpSpace==0 ) return SQLITE_NOMEM;
@@ -56921,10 +58591,16 @@ static int btreeCursor(
pCur->pBt = pBt;
assert( wrFlag==0 || wrFlag==BTCF_WriteFlag );
pCur->curFlags = wrFlag;
- pCur->pNext = pBt->pCursor;
- if( pCur->pNext ){
- pCur->pNext->pPrev = pCur;
+ pCur->curPagerFlags = wrFlag ? 0 : PAGER_GET_READONLY;
+ /* If there are two or more cursors on the same btree, then all such
+ ** cursors *must* have the BTCF_Multiple flag set. */
+ for(pX=pBt->pCursor; pX; pX=pX->pNext){
+ if( pX->pgnoRoot==(Pgno)iTable ){
+ pX->curFlags |= BTCF_Multiple;
+ pCur->curFlags |= BTCF_Multiple;
+ }
}
+ pCur->pNext = pBt->pCursor;
pBt->pCursor = pCur;
pCur->eState = CURSOR_INVALID;
return SQLITE_OK;
@@ -56937,9 +58613,13 @@ SQLITE_PRIVATE int sqlite3BtreeCursor(
BtCursor *pCur /* Write new cursor here */
){
int rc;
- sqlite3BtreeEnter(p);
- rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
- sqlite3BtreeLeave(p);
+ if( iTable<1 ){
+ rc = SQLITE_CORRUPT_BKPT;
+ }else{
+ sqlite3BtreeEnter(p);
+ rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
+ sqlite3BtreeLeave(p);
+ }
return rc;
}
@@ -56978,13 +58658,18 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
BtShared *pBt = pCur->pBt;
sqlite3BtreeEnter(pBtree);
sqlite3BtreeClearCursor(pCur);
- if( pCur->pPrev ){
- pCur->pPrev->pNext = pCur->pNext;
- }else{
+ assert( pBt->pCursor!=0 );
+ if( pBt->pCursor==pCur ){
pBt->pCursor = pCur->pNext;
- }
- if( pCur->pNext ){
- pCur->pNext->pPrev = pCur->pPrev;
+ }else{
+ BtCursor *pPrev = pBt->pCursor;
+ do{
+ if( pPrev->pNext==pCur ){
+ pPrev->pNext = pCur->pNext;
+ break;
+ }
+ pPrev = pPrev->pNext;
+ }while( ALWAYS(pPrev) );
}
for(i=0; i<=pCur->iPage; i++){
releasePage(pCur->apPage[i]);
@@ -57004,13 +58689,6 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
**
** BtCursor.info is a cache of the information in the current cell.
** Using this cache reduces the number of calls to btreeParseCell().
-**
-** 2007-06-25: There is a bug in some versions of MSVC that cause the
-** compiler to crash when getCellInfo() is implemented as a macro.
-** But there is a measureable speed advantage to using the macro on gcc
-** (when less compiler optimizations like -Os or -O0 are used and the
-** compiler is not doing aggressive inlining.) So we use a real function
-** for MSVC and a macro for everything else. Ticket #2457.
*/
#ifndef NDEBUG
static void assertCellInfo(BtCursor *pCur){
@@ -57023,28 +58701,15 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
#else
#define assertCellInfo(x)
#endif
-#ifdef _MSC_VER
- /* Use a real function in MSVC to work around bugs in that compiler. */
- static void getCellInfo(BtCursor *pCur){
- if( pCur->info.nSize==0 ){
- int iPage = pCur->iPage;
- btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info);
- pCur->curFlags |= BTCF_ValidNKey;
- }else{
- assertCellInfo(pCur);
- }
- }
-#else /* if not _MSC_VER */
- /* Use a macro in all other compilers so that the function is inlined */
-#define getCellInfo(pCur) \
- if( pCur->info.nSize==0 ){ \
- int iPage = pCur->iPage; \
- btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info); \
- pCur->curFlags |= BTCF_ValidNKey; \
- }else{ \
- assertCellInfo(pCur); \
+static SQLITE_NOINLINE void getCellInfo(BtCursor *pCur){
+ if( pCur->info.nSize==0 ){
+ int iPage = pCur->iPage;
+ pCur->curFlags |= BTCF_ValidNKey;
+ btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info);
+ }else{
+ assertCellInfo(pCur);
}
-#endif /* _MSC_VER */
+}
#ifndef NDEBUG /* The next routine used only within assert() statements */
/*
@@ -57550,9 +59215,6 @@ SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor *pCur, u32 *pAmt){
** vice-versa).
*/
static int moveToChild(BtCursor *pCur, u32 newPgno){
- int rc;
- int i = pCur->iPage;
- MemPage *pNewPage;
BtShared *pBt = pCur->pBt;
assert( cursorHoldsMutex(pCur) );
@@ -57562,19 +59224,12 @@ static int moveToChild(BtCursor *pCur, u32 newPgno){
if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
return SQLITE_CORRUPT_BKPT;
}
- rc = getAndInitPage(pBt, newPgno, &pNewPage,
- (pCur->curFlags & BTCF_WriteFlag)==0 ? PAGER_GET_READONLY : 0);
- if( rc ) return rc;
- pCur->apPage[i+1] = pNewPage;
- pCur->aiIdx[i+1] = 0;
- pCur->iPage++;
-
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
- if( pNewPage->nCell<1 || pNewPage->intKey!=pCur->apPage[i]->intKey ){
- return SQLITE_CORRUPT_BKPT;
- }
- return SQLITE_OK;
+ pCur->iPage++;
+ pCur->aiIdx[pCur->iPage] = 0;
+ return getAndInitPage(pBt, newPgno, &pCur->apPage[pCur->iPage],
+ pCur, pCur->curPagerFlags);
}
#if SQLITE_DEBUG
@@ -57618,11 +59273,9 @@ static void moveToParent(BtCursor *pCur){
pCur->apPage[pCur->iPage]->pgno
);
testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
-
- releasePage(pCur->apPage[pCur->iPage]);
- pCur->iPage--;
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
+ releasePageNotNull(pCur->apPage[pCur->iPage--]);
}
/*
@@ -57663,18 +59316,23 @@ static int moveToRoot(BtCursor *pCur){
}
if( pCur->iPage>=0 ){
- while( pCur->iPage ) releasePage(pCur->apPage[pCur->iPage--]);
+ while( pCur->iPage ){
+ assert( pCur->apPage[pCur->iPage]!=0 );
+ releasePageNotNull(pCur->apPage[pCur->iPage--]);
+ }
}else if( pCur->pgnoRoot==0 ){
pCur->eState = CURSOR_INVALID;
return SQLITE_OK;
}else{
+ assert( pCur->iPage==(-1) );
rc = getAndInitPage(pCur->pBtree->pBt, pCur->pgnoRoot, &pCur->apPage[0],
- (pCur->curFlags & BTCF_WriteFlag)==0 ? PAGER_GET_READONLY : 0);
+ 0, pCur->curPagerFlags);
if( rc!=SQLITE_OK ){
pCur->eState = CURSOR_INVALID;
return rc;
}
pCur->iPage = 0;
+ pCur->curIntKey = pCur->apPage[0]->intKey;
}
pRoot = pCur->apPage[0];
assert( pRoot->pgno==pCur->pgnoRoot );
@@ -57877,7 +59535,7 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
/* If the cursor is already positioned at the point we are trying
** to move to, then just return without doing any work */
if( pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0
- && pCur->apPage[0]->intKey
+ && pCur->curIntKey
){
if( pCur->info.nKey==intKey ){
*pRes = 0;
@@ -57912,7 +59570,8 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
return SQLITE_OK;
}
- assert( pCur->apPage[0]->intKey || pIdxKey );
+ assert( pCur->apPage[0]->intKey==pCur->curIntKey );
+ assert( pCur->curIntKey || pIdxKey );
for(;;){
int lwr, upr, idx, c;
Pgno chldPg;
@@ -57935,7 +59594,7 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
if( xRecordCompare==0 ){
for(;;){
i64 nCellKey;
- pCell = findCell(pPage, idx) + pPage->childPtrSize;
+ pCell = findCellPastPtr(pPage, idx);
if( pPage->intKeyLeaf ){
while( 0x80 <= *(pCell++) ){
if( pCell>=pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT;
@@ -57967,8 +59626,8 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
}
}else{
for(;;){
- int nCell;
- pCell = findCell(pPage, idx) + pPage->childPtrSize;
+ int nCell; /* Size of the pCell cell in bytes */
+ pCell = findCellPastPtr(pPage, idx);
/* The maximum supported page-size is 65536 bytes. This means that
** the maximum number of record bytes stored on an index B-Tree
@@ -57996,12 +59655,25 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
/* The record flows over onto one or more overflow pages. In
** this case the whole cell needs to be parsed, a buffer allocated
** and accessPayload() used to retrieve the record into the
- ** buffer before VdbeRecordCompare() can be called. */
+ ** buffer before VdbeRecordCompare() can be called.
+ **
+ ** If the record is corrupt, the xRecordCompare routine may read
+ ** up to two varints past the end of the buffer. An extra 18
+ ** bytes of padding is allocated at the end of the buffer in
+ ** case this happens. */
void *pCellKey;
u8 * const pCellBody = pCell - pPage->childPtrSize;
- btreeParseCellPtr(pPage, pCellBody, &pCur->info);
+ pPage->xParseCell(pPage, pCellBody, &pCur->info);
nCell = (int)pCur->info.nKey;
- pCellKey = sqlite3Malloc( nCell );
+ testcase( nCell<0 ); /* True if key size is 2^32 or more */
+ testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
+ testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
+ testcase( nCell==2 ); /* Minimum legal index key size */
+ if( nCell<2 ){
+ rc = SQLITE_CORRUPT_BKPT;
+ goto moveto_finish;
+ }
+ pCellKey = sqlite3Malloc( nCell+18 );
if( pCellKey==0 ){
rc = SQLITE_NOMEM;
goto moveto_finish;
@@ -58294,8 +59966,7 @@ SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
** sqlite3PagerUnref() on the new page when it is done.
**
** SQLITE_OK is returned on success. Any other return value indicates
-** an error. *ppPage and *pPgno are undefined in the event of an error.
-** Do not invoke sqlite3PagerUnref() on *ppPage if an error is returned.
+** an error. *ppPage is set to NULL in the event of an error.
**
** If the "nearby" parameter is not 0, then an effort is made to
** locate a page close to the page number "nearby". This can be used in an
@@ -58338,6 +60009,7 @@ static int allocateBtreePage(
/* There are pages on the freelist. Reuse one of those pages. */
Pgno iTrunk;
u8 searchList = 0; /* If the free-list must be searched for 'nearby' */
+ u32 nSearch = 0; /* Count of the number of search attempts */
/* If eMode==BTALLOC_EXACT and a query of the pointer-map
** shows that the page 'nearby' is somewhere on the free-list, then
@@ -58386,10 +60058,10 @@ static int allocateBtreePage(
iTrunk = get4byte(&pPage1->aData[32]);
}
testcase( iTrunk==mxPage );
- if( iTrunk>mxPage ){
+ if( iTrunk>mxPage || nSearch++ > n ){
rc = SQLITE_CORRUPT_BKPT;
}else{
- rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
+ rc = btreeGetUnusedPage(pBt, iTrunk, &pTrunk, 0);
}
if( rc ){
pTrunk = 0;
@@ -58454,7 +60126,7 @@ static int allocateBtreePage(
goto end_allocate_page;
}
testcase( iNewTrunk==mxPage );
- rc = btreeGetPage(pBt, iNewTrunk, &pNewTrunk, 0);
+ rc = btreeGetUnusedPage(pBt, iNewTrunk, &pNewTrunk, 0);
if( rc!=SQLITE_OK ){
goto end_allocate_page;
}
@@ -58534,11 +60206,12 @@ static int allocateBtreePage(
}
put4byte(&aData[4], k-1);
noContent = !btreeGetHasContent(pBt, *pPgno)? PAGER_GET_NOCONTENT : 0;
- rc = btreeGetPage(pBt, *pPgno, ppPage, noContent);
+ rc = btreeGetUnusedPage(pBt, *pPgno, ppPage, noContent);
if( rc==SQLITE_OK ){
rc = sqlite3PagerWrite((*ppPage)->pDbPage);
if( rc!=SQLITE_OK ){
releasePage(*ppPage);
+ *ppPage = 0;
}
}
searchList = 0;
@@ -58582,7 +60255,7 @@ static int allocateBtreePage(
MemPage *pPg = 0;
TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", pBt->nPage));
assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) );
- rc = btreeGetPage(pBt, pBt->nPage, &pPg, bNoContent);
+ rc = btreeGetUnusedPage(pBt, pBt->nPage, &pPg, bNoContent);
if( rc==SQLITE_OK ){
rc = sqlite3PagerWrite(pPg->pDbPage);
releasePage(pPg);
@@ -58596,11 +60269,12 @@ static int allocateBtreePage(
*pPgno = pBt->nPage;
assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
- rc = btreeGetPage(pBt, *pPgno, ppPage, bNoContent);
+ rc = btreeGetUnusedPage(pBt, *pPgno, ppPage, bNoContent);
if( rc ) return rc;
rc = sqlite3PagerWrite((*ppPage)->pDbPage);
if( rc!=SQLITE_OK ){
releasePage(*ppPage);
+ *ppPage = 0;
}
TRACE(("ALLOCATE: %d from end of file\n", *pPgno));
}
@@ -58610,17 +60284,8 @@ static int allocateBtreePage(
end_allocate_page:
releasePage(pTrunk);
releasePage(pPrevTrunk);
- if( rc==SQLITE_OK ){
- if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
- releasePage(*ppPage);
- *ppPage = 0;
- return SQLITE_CORRUPT_BKPT;
- }
- (*ppPage)->isInit = 0;
- }else{
- *ppPage = 0;
- }
- assert( rc!=SQLITE_OK || sqlite3PagerIswriteable((*ppPage)->pDbPage) );
+ assert( rc!=SQLITE_OK || sqlite3PagerPageRefcount((*ppPage)->pDbPage)<=1 );
+ assert( rc!=SQLITE_OK || (*ppPage)->isInit==0 );
return rc;
}
@@ -58645,9 +60310,10 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
int nFree; /* Initial number of pages on free-list */
assert( sqlite3_mutex_held(pBt->mutex) );
- assert( iPage>1 );
+ assert( CORRUPT_DB || iPage>1 );
assert( !pMemPage || pMemPage->pgno==iPage );
+ if( iPage<2 ) return SQLITE_CORRUPT_BKPT;
if( pMemPage ){
pPage = pMemPage;
sqlite3PagerRef(pPage->pDbPage);
@@ -58787,7 +60453,7 @@ static int clearCell(
u32 ovflPageSize;
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
- btreeParseCellPtr(pPage, pCell, &info);
+ pPage->xParseCell(pPage, pCell, &info);
*pnSize = info.nSize;
if( info.iOverflow==0 ){
return SQLITE_OK; /* No overflow pages. Return without doing anything */
@@ -58799,7 +60465,9 @@ static int clearCell(
assert( pBt->usableSize > 4 );
ovflPageSize = pBt->usableSize - 4;
nOvfl = (info.nPayload - info.nLocal + ovflPageSize - 1)/ovflPageSize;
- assert( ovflPgno==0 || nOvfl>0 );
+ assert( nOvfl>0 ||
+ (CORRUPT_DB && (info.nPayload + ovflPageSize)<ovflPageSize)
+ );
while( nOvfl-- ){
Pgno iNext = 0;
MemPage *pOvfl = 0;
@@ -58897,9 +60565,7 @@ static int fillInCell(
nSrc = nData;
nData = 0;
}else{
- if( NEVER(nKey>0x7fffffff || pKey==0) ){
- return SQLITE_CORRUPT_BKPT;
- }
+ assert( nKey<=0x7fffffff && pKey!=0 );
nPayload = (int)nKey;
pSrc = pKey;
nSrc = (int)nKey;
@@ -58939,7 +60605,7 @@ static int fillInCell(
#if SQLITE_DEBUG
{
CellInfo info;
- btreeParseCellPtr(pPage, pCell, &info);
+ pPage->xParseCell(pPage, pCell, &info);
assert( nHeader=(int)(info.pPayload - pCell) );
assert( info.nKey==nKey );
assert( *pnSize == info.nSize );
@@ -59054,7 +60720,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
if( *pRC ) return;
assert( idx>=0 && idx<pPage->nCell );
- assert( sz==cellSize(pPage, idx) );
+ assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
data = pPage->aData;
@@ -59109,10 +60775,8 @@ static void insertCell(
){
int idx = 0; /* Where to write new cell content in data[] */
int j; /* Loop counter */
- int end; /* First byte past the last cell pointer in data[] */
- int ins; /* Index in data[] where new cell pointer is inserted */
- int cellOffset; /* Address of first cell pointer in data[] */
u8 *data; /* The content of the whole page */
+ u8 *pIns; /* The point in pPage->aCellIdx[] where no cell inserted */
if( *pRC ) return;
@@ -59127,7 +60791,7 @@ static void insertCell(
** wanted to be less than 4 but got rounded up to 4 on the leaf, then size
** might be less than 8 (leaf-size + pointer) on the interior node. Hence
** the term after the || in the following assert(). */
- assert( sz==cellSizePtr(pPage, pCell) || (sz==8 && iChild>0) );
+ assert( sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0) );
if( pPage->nOverflow || sz+2>pPage->nFree ){
if( pTemp ){
memcpy(pTemp, pCell, sz);
@@ -59140,6 +60804,14 @@ static void insertCell(
assert( j<(int)(sizeof(pPage->apOvfl)/sizeof(pPage->apOvfl[0])) );
pPage->apOvfl[j] = pCell;
pPage->aiOvfl[j] = (u16)i;
+
+ /* When multiple overflows occur, they are always sequential and in
+ ** sorted order. This invariants arise because multiple overflows can
+ ** only occur when inserting divider cells into the parent page during
+ ** balancing, and the dividers are adjacent and sorted.
+ */
+ assert( j==0 || pPage->aiOvfl[j-1]<(u16)i ); /* Overflows in sorted order */
+ assert( j==0 || i==pPage->aiOvfl[j-1]+1 ); /* Overflows are sequential */
}else{
int rc = sqlite3PagerWrite(pPage->pDbPage);
if( rc!=SQLITE_OK ){
@@ -59148,24 +60820,26 @@ static void insertCell(
}
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
data = pPage->aData;
- cellOffset = pPage->cellOffset;
- end = cellOffset + 2*pPage->nCell;
- ins = cellOffset + 2*i;
+ assert( &data[pPage->cellOffset]==pPage->aCellIdx );
rc = allocateSpace(pPage, sz, &idx);
if( rc ){ *pRC = rc; return; }
- /* The allocateSpace() routine guarantees the following two properties
- ** if it returns success */
- assert( idx >= end+2 );
+ /* The allocateSpace() routine guarantees the following properties
+ ** if it returns successfully */
+ assert( idx >= 0 );
+ assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
assert( idx+sz <= (int)pPage->pBt->usableSize );
- pPage->nCell++;
pPage->nFree -= (u16)(2 + sz);
memcpy(&data[idx], pCell, sz);
if( iChild ){
put4byte(&data[idx], iChild);
}
- memmove(&data[ins+2], &data[ins], end-ins);
- put2byte(&data[ins], idx);
- put2byte(&data[pPage->hdrOffset+3], pPage->nCell);
+ pIns = pPage->aCellIdx + i*2;
+ memmove(pIns+2, pIns, 2*(pPage->nCell - i));
+ put2byte(pIns, idx);
+ pPage->nCell++;
+ /* increment the cell count */
+ if( (++data[pPage->hdrOffset+4])==0 ) data[pPage->hdrOffset+3]++;
+ assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell );
#ifndef SQLITE_OMIT_AUTOVACUUM
if( pPage->pBt->autoVacuum ){
/* The cell may contain a pointer to an overflow page. If so, write
@@ -59178,6 +60852,52 @@ static void insertCell(
}
/*
+** A CellArray object contains a cache of pointers and sizes for a
+** consecutive sequence of cells that might be held multiple pages.
+*/
+typedef struct CellArray CellArray;
+struct CellArray {
+ int nCell; /* Number of cells in apCell[] */
+ MemPage *pRef; /* Reference page */
+ u8 **apCell; /* All cells begin balanced */
+ u16 *szCell; /* Local size of all cells in apCell[] */
+};
+
+/*
+** Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been
+** computed.
+*/
+static void populateCellCache(CellArray *p, int idx, int N){
+ assert( idx>=0 && idx+N<=p->nCell );
+ while( N>0 ){
+ assert( p->apCell[idx]!=0 );
+ if( p->szCell[idx]==0 ){
+ p->szCell[idx] = p->pRef->xCellSize(p->pRef, p->apCell[idx]);
+ }else{
+ assert( CORRUPT_DB ||
+ p->szCell[idx]==p->pRef->xCellSize(p->pRef, p->apCell[idx]) );
+ }
+ idx++;
+ N--;
+ }
+}
+
+/*
+** Return the size of the Nth element of the cell array
+*/
+static SQLITE_NOINLINE u16 computeCellSize(CellArray *p, int N){
+ assert( N>=0 && N<p->nCell );
+ assert( p->szCell[N]==0 );
+ p->szCell[N] = p->pRef->xCellSize(p->pRef, p->apCell[N]);
+ return p->szCell[N];
+}
+static u16 cachedCellSize(CellArray *p, int N){
+ assert( N>=0 && N<p->nCell );
+ if( p->szCell[N] ) return p->szCell[N];
+ return computeCellSize(p, N);
+}
+
+/*
** Array apCell[] contains pointers to nCell b-tree page cells. The
** szCell[] array contains the size in bytes of each cell. This function
** replaces the current contents of page pPg with the contents of the cell
@@ -59190,7 +60910,7 @@ static void insertCell(
** The MemPage.nFree field is invalidated by this function. It is the
** responsibility of the caller to set it correctly.
*/
-static void rebuildPage(
+static int rebuildPage(
MemPage *pPg, /* Edit this page */
int nCell, /* Final number of cells on page */
u8 **apCell, /* Array of cells */
@@ -59215,10 +60935,12 @@ static void rebuildPage(
pCell = &pTmp[pCell - aData];
}
pData -= szCell[i];
- memcpy(pData, pCell, szCell[i]);
put2byte(pCellptr, (pData - aData));
pCellptr += 2;
- assert( szCell[i]==cellSizePtr(pPg, pCell) );
+ if( pData < pCellptr ) return SQLITE_CORRUPT_BKPT;
+ memcpy(pData, pCell, szCell[i]);
+ assert( szCell[i]==pPg->xCellSize(pPg, pCell) || CORRUPT_DB );
+ testcase( szCell[i]!=pPg->xCellSize(pPg,pCell) );
}
/* The pPg->nFree field is now set incorrectly. The caller will fix it. */
@@ -59229,6 +60951,7 @@ static void rebuildPage(
put2byte(&aData[hdr+3], pPg->nCell);
put2byte(&aData[hdr+5], pData - aData);
aData[hdr+7] = 0x00;
+ return SQLITE_OK;
}
/*
@@ -59261,25 +60984,31 @@ static int pageInsertArray(
u8 *pBegin, /* End of cell-pointer array */
u8 **ppData, /* IN/OUT: Page content -area pointer */
u8 *pCellptr, /* Pointer to cell-pointer area */
+ int iFirst, /* Index of first cell to add */
int nCell, /* Number of cells to add to pPg */
- u8 **apCell, /* Array of cells */
- u16 *szCell /* Array of cell sizes */
+ CellArray *pCArray /* Array of cells */
){
int i;
u8 *aData = pPg->aData;
u8 *pData = *ppData;
- const int bFreelist = aData[1] || aData[2];
+ int iEnd = iFirst + nCell;
assert( CORRUPT_DB || pPg->hdrOffset==0 ); /* Never called on page 1 */
- for(i=0; i<nCell; i++){
- int sz = szCell[i];
- int rc;
+ for(i=iFirst; i<iEnd; i++){
+ int sz, rc;
u8 *pSlot;
- if( bFreelist==0 || (pSlot = pageFindSlot(pPg, sz, &rc, 0))==0 ){
+ sz = cachedCellSize(pCArray, i);
+ if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
pData -= sz;
if( pData<pBegin ) return 1;
pSlot = pData;
}
- memcpy(pSlot, apCell[i], sz);
+ /* pSlot and pCArray->apCell[i] will never overlap on a well-formed
+ ** database. But they might for a corrupt database. Hence use memmove()
+ ** since memcpy() sends SIGABORT with overlapping buffers on OpenBSD */
+ assert( (pSlot+sz)<=pCArray->apCell[i]
+ || pSlot>=(pCArray->apCell[i]+sz)
+ || CORRUPT_DB );
+ memmove(pSlot, pCArray->apCell[i], sz);
put2byte(pCellptr, (pSlot - aData));
pCellptr += 2;
}
@@ -59298,22 +61027,27 @@ static int pageInsertArray(
*/
static int pageFreeArray(
MemPage *pPg, /* Page to edit */
+ int iFirst, /* First cell to delete */
int nCell, /* Cells to delete */
- u8 **apCell, /* Array of cells */
- u16 *szCell /* Array of cell sizes */
+ CellArray *pCArray /* Array of cells */
){
u8 * const aData = pPg->aData;
u8 * const pEnd = &aData[pPg->pBt->usableSize];
u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];
int nRet = 0;
int i;
+ int iEnd = iFirst + nCell;
u8 *pFree = 0;
int szFree = 0;
- for(i=0; i<nCell; i++){
- u8 *pCell = apCell[i];
+ for(i=iFirst; i<iEnd; i++){
+ u8 *pCell = pCArray->apCell[i];
if( pCell>=pStart && pCell<pEnd ){
- int sz = szCell[i];
+ int sz;
+ /* No need to use cachedCellSize() here. The sizes of all cells that
+ ** are to be freed have already been computing while deciding which
+ ** cells need freeing */
+ sz = pCArray->szCell[i]; assert( sz>0 );
if( pFree!=(pCell + sz) ){
if( pFree ){
assert( pFree>aData && (pFree - aData)<65536 );
@@ -59348,13 +61082,12 @@ static int pageFreeArray(
** The pPg->nFree field is invalid when this function returns. It is the
** responsibility of the caller to set it correctly.
*/
-static void editPage(
+static int editPage(
MemPage *pPg, /* Edit this page */
int iOld, /* Index of first cell currently on page */
int iNew, /* Index of new first cell on page */
int nNew, /* Final number of cells on page */
- u8 **apCell, /* Array of cells */
- u16 *szCell /* Array of cell sizes */
+ CellArray *pCArray /* Array of cells and sizes */
){
u8 * const aData = pPg->aData;
const int hdr = pPg->hdrOffset;
@@ -59373,16 +61106,12 @@ static void editPage(
/* Remove cells from the start and end of the page */
if( iOld<iNew ){
- int nShift = pageFreeArray(
- pPg, iNew-iOld, &apCell[iOld], &szCell[iOld]
- );
+ int nShift = pageFreeArray(pPg, iOld, iNew-iOld, pCArray);
memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
nCell -= nShift;
}
if( iNewEnd < iOldEnd ){
- nCell -= pageFreeArray(
- pPg, iOldEnd-iNewEnd, &apCell[iNewEnd], &szCell[iNewEnd]
- );
+ nCell -= pageFreeArray(pPg, iNewEnd, iOldEnd - iNewEnd, pCArray);
}
pData = &aData[get2byteNotZero(&aData[hdr+5])];
@@ -59396,7 +61125,7 @@ static void editPage(
memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
if( pageInsertArray(
pPg, pBegin, &pData, pCellptr,
- nAdd, &apCell[iNew], &szCell[iNew]
+ iNew, nAdd, pCArray
) ) goto editpage_fail;
nCell += nAdd;
}
@@ -59410,7 +61139,7 @@ static void editPage(
nCell++;
if( pageInsertArray(
pPg, pBegin, &pData, pCellptr,
- 1, &apCell[iCell + iNew], &szCell[iCell + iNew]
+ iCell+iNew, 1, pCArray
) ) goto editpage_fail;
}
}
@@ -59419,7 +61148,7 @@ static void editPage(
pCellptr = &pPg->aCellIdx[nCell*2];
if( pageInsertArray(
pPg, pBegin, &pData, pCellptr,
- nNew-nCell, &apCell[iNew+nCell], &szCell[iNew+nCell]
+ iNew+nCell, nNew-nCell, pCArray
) ) goto editpage_fail;
pPg->nCell = nNew;
@@ -59430,19 +61159,21 @@ static void editPage(
#ifdef SQLITE_DEBUG
for(i=0; i<nNew && !CORRUPT_DB; i++){
- u8 *pCell = apCell[i+iNew];
- int iOff = get2byte(&pPg->aCellIdx[i*2]);
+ u8 *pCell = pCArray->apCell[i+iNew];
+ int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);
if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
pCell = &pTmp[pCell - aData];
}
- assert( 0==memcmp(pCell, &aData[iOff], szCell[i+iNew]) );
+ assert( 0==memcmp(pCell, &aData[iOff],
+ pCArray->pRef->xCellSize(pCArray->pRef, pCArray->apCell[i+iNew])) );
}
#endif
- return;
+ return SQLITE_OK;
editpage_fail:
/* Unable to edit this page. Rebuild it from scratch instead. */
- rebuildPage(pPg, nNew, &apCell[iNew], &szCell[iNew]);
+ populateCellCache(pCArray, iNew, nNew);
+ return rebuildPage(pPg, nNew, &pCArray->apCell[iNew], &pCArray->szCell[iNew]);
}
/*
@@ -59508,13 +61239,14 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
u8 *pOut = &pSpace[4];
u8 *pCell = pPage->apOvfl[0];
- u16 szCell = cellSizePtr(pPage, pCell);
+ u16 szCell = pPage->xCellSize(pPage, pCell);
u8 *pStop;
assert( sqlite3PagerIswriteable(pNew->pDbPage) );
assert( pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
zeroPage(pNew, PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF);
- rebuildPage(pNew, 1, &pCell, &szCell);
+ rc = rebuildPage(pNew, 1, &pCell, &szCell);
+ if( NEVER(rc) ) return rc;
pNew->nFree = pBt->usableSize - pNew->cellOffset - 2 - szCell;
/* If this is an auto-vacuum database, update the pointer map
@@ -59587,7 +61319,7 @@ static int ptrmapCheckPages(MemPage **apPage, int nPage){
u8 *z;
z = findCell(pPage, j);
- btreeParseCellPtr(pPage, z, &info);
+ pPage->xParseCell(pPage, z, &info);
if( info.iOverflow ){
Pgno ovfl = get4byte(&z[info.iOverflow]);
ptrmapGet(pBt, ovfl, &e, &n);
@@ -59718,7 +61450,6 @@ static int balance_nonroot(
int bBulk /* True if this call is part of a bulk load */
){
BtShared *pBt; /* The whole database */
- int nCell = 0; /* Number of cells in apCell[] */
int nMaxCells = 0; /* Allocated size of apCell, szCell, aFrom. */
int nNew = 0; /* Number of pages in apNew[] */
int nOld; /* Number of pages in apOld[] */
@@ -59729,7 +61460,6 @@ static int balance_nonroot(
int leafData; /* True if pPage is a leaf of a LEAFDATA tree */
int usableSpace; /* Bytes in pPage beyond the header */
int pageFlags; /* Value of pPage->aData[0] */
- int subtotal; /* Subtotal of bytes in cells on one page */
int iSpace1 = 0; /* First unused byte of aSpace1[] */
int iOvflSpace = 0; /* First unused byte of aOvflSpace[] */
int szScratch; /* Size of scratch memory requested */
@@ -59737,19 +61467,20 @@ static int balance_nonroot(
MemPage *apNew[NB+2]; /* pPage and up to NB siblings after balancing */
u8 *pRight; /* Location in parent of right-sibling pointer */
u8 *apDiv[NB-1]; /* Divider cells in pParent */
- int cntNew[NB+2]; /* Index in aCell[] of cell after i-th page */
- int cntOld[NB+2]; /* Old index in aCell[] after i-th page */
+ int cntNew[NB+2]; /* Index in b.paCell[] of cell after i-th page */
+ int cntOld[NB+2]; /* Old index in b.apCell[] */
int szNew[NB+2]; /* Combined size of cells placed on i-th page */
- u8 **apCell = 0; /* All cells begin balanced */
- u16 *szCell; /* Local size of all cells in apCell[] */
u8 *aSpace1; /* Space for copies of dividers cells */
Pgno pgno; /* Temp var to store a page number in */
u8 abDone[NB+2]; /* True after i'th new page is populated */
Pgno aPgno[NB+2]; /* Page numbers of new pages before shuffling */
Pgno aPgOrder[NB+2]; /* Copy of aPgno[] used for sorting pages */
u16 aPgFlags[NB+2]; /* flags field of new pages before shuffling */
+ CellArray b; /* Parsed information on cells being balanced */
memset(abDone, 0, sizeof(abDone));
+ b.nCell = 0;
+ b.apCell = 0;
pBt = pParent->pBt;
assert( sqlite3_mutex_held(pBt->mutex) );
assert( sqlite3PagerIswriteable(pParent->pDbPage) );
@@ -59803,7 +61534,7 @@ static int balance_nonroot(
}
pgno = get4byte(pRight);
while( 1 ){
- rc = getAndInitPage(pBt, pgno, &apOld[i], 0);
+ rc = getAndInitPage(pBt, pgno, &apOld[i], 0, 0);
if( rc ){
memset(apOld, 0, (i+1)*sizeof(MemPage*));
goto balance_cleanup;
@@ -59814,12 +61545,12 @@ static int balance_nonroot(
if( i+nxDiv==pParent->aiOvfl[0] && pParent->nOverflow ){
apDiv[i] = pParent->apOvfl[0];
pgno = get4byte(apDiv[i]);
- szNew[i] = cellSizePtr(pParent, apDiv[i]);
+ szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
pParent->nOverflow = 0;
}else{
apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
pgno = get4byte(apDiv[i]);
- szNew[i] = cellSizePtr(pParent, apDiv[i]);
+ szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
/* Drop the cell from the parent page. apDiv[i] still points to
** the cell within the parent, even though it has been dropped.
@@ -59858,130 +61589,201 @@ static int balance_nonroot(
** Allocate space for memory structures
*/
szScratch =
- nMaxCells*sizeof(u8*) /* apCell */
- + nMaxCells*sizeof(u16) /* szCell */
+ nMaxCells*sizeof(u8*) /* b.apCell */
+ + nMaxCells*sizeof(u16) /* b.szCell */
+ pBt->pageSize; /* aSpace1 */
/* EVIDENCE-OF: R-28375-38319 SQLite will never request a scratch buffer
** that is more than 6 times the database page size. */
assert( szScratch<=6*(int)pBt->pageSize );
- apCell = sqlite3ScratchMalloc( szScratch );
- if( apCell==0 ){
+ b.apCell = sqlite3ScratchMalloc( szScratch );
+ if( b.apCell==0 ){
rc = SQLITE_NOMEM;
goto balance_cleanup;
}
- szCell = (u16*)&apCell[nMaxCells];
- aSpace1 = (u8*)&szCell[nMaxCells];
+ b.szCell = (u16*)&b.apCell[nMaxCells];
+ aSpace1 = (u8*)&b.szCell[nMaxCells];
assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );
/*
** Load pointers to all cells on sibling pages and the divider cells
- ** into the local apCell[] array. Make copies of the divider cells
+ ** into the local b.apCell[] array. Make copies of the divider cells
** into space obtained from aSpace1[]. The divider cells have already
** been removed from pParent.
**
** If the siblings are on leaf pages, then the child pointers of the
** divider cells are stripped from the cells before they are copied
- ** into aSpace1[]. In this way, all cells in apCell[] are without
+ ** into aSpace1[]. In this way, all cells in b.apCell[] are without
** child pointers. If siblings are not leaves, then all cell in
- ** apCell[] include child pointers. Either way, all cells in apCell[]
+ ** b.apCell[] include child pointers. Either way, all cells in b.apCell[]
** are alike.
**
** leafCorrection: 4 if pPage is a leaf. 0 if pPage is not a leaf.
** leafData: 1 if pPage holds key+data and pParent holds only keys.
*/
- leafCorrection = apOld[0]->leaf*4;
- leafData = apOld[0]->intKeyLeaf;
+ b.pRef = apOld[0];
+ leafCorrection = b.pRef->leaf*4;
+ leafData = b.pRef->intKeyLeaf;
for(i=0; i<nOld; i++){
- int limit;
MemPage *pOld = apOld[i];
+ int limit = pOld->nCell;
+ u8 *aData = pOld->aData;
+ u16 maskPage = pOld->maskPage;
+ u8 *piCell = aData + pOld->cellOffset;
+ u8 *piEnd;
+
+ /* Verify that all sibling pages are of the same "type" (table-leaf,
+ ** table-interior, index-leaf, or index-interior).
+ */
+ if( pOld->aData[0]!=apOld[0]->aData[0] ){
+ rc = SQLITE_CORRUPT_BKPT;
+ goto balance_cleanup;
+ }
- limit = pOld->nCell+pOld->nOverflow;
+ /* Load b.apCell[] with pointers to all cells in pOld. If pOld
+ ** constains overflow cells, include them in the b.apCell[] array
+ ** in the correct spot.
+ **
+ ** Note that when there are multiple overflow cells, it is always the
+ ** case that they are sequential and adjacent. This invariant arises
+ ** because multiple overflows can only occurs when inserting divider
+ ** cells into a parent on a prior balance, and divider cells are always
+ ** adjacent and are inserted in order. There is an assert() tagged
+ ** with "NOTE 1" in the overflow cell insertion loop to prove this
+ ** invariant.
+ **
+ ** This must be done in advance. Once the balance starts, the cell
+ ** offset section of the btree page will be overwritten and we will no
+ ** long be able to find the cells if a pointer to each cell is not saved
+ ** first.
+ */
+ memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit);
if( pOld->nOverflow>0 ){
+ memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow);
+ limit = pOld->aiOvfl[0];
for(j=0; j<limit; j++){
- assert( nCell<nMaxCells );
- apCell[nCell] = findOverflowCell(pOld, j);
- szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
- nCell++;
+ b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
+ piCell += 2;
+ b.nCell++;
}
- }else{
- u8 *aData = pOld->aData;
- u16 maskPage = pOld->maskPage;
- u16 cellOffset = pOld->cellOffset;
- for(j=0; j<limit; j++){
- assert( nCell<nMaxCells );
- apCell[nCell] = findCellv2(aData, maskPage, cellOffset, j);
- szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
- nCell++;
+ for(k=0; k<pOld->nOverflow; k++){
+ assert( k==0 || pOld->aiOvfl[k-1]+1==pOld->aiOvfl[k] );/* NOTE 1 */
+ b.apCell[b.nCell] = pOld->apOvfl[k];
+ b.nCell++;
}
- }
- cntOld[i] = nCell;
+ }
+ piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
+ while( piCell<piEnd ){
+ assert( b.nCell<nMaxCells );
+ b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
+ piCell += 2;
+ b.nCell++;
+ }
+
+ cntOld[i] = b.nCell;
if( i<nOld-1 && !leafData){
u16 sz = (u16)szNew[i];
u8 *pTemp;
- assert( nCell<nMaxCells );
- szCell[nCell] = sz;
+ assert( b.nCell<nMaxCells );
+ b.szCell[b.nCell] = sz;
pTemp = &aSpace1[iSpace1];
iSpace1 += sz;
assert( sz<=pBt->maxLocal+23 );
assert( iSpace1 <= (int)pBt->pageSize );
memcpy(pTemp, apDiv[i], sz);
- apCell[nCell] = pTemp+leafCorrection;
+ b.apCell[b.nCell] = pTemp+leafCorrection;
assert( leafCorrection==0 || leafCorrection==4 );
- szCell[nCell] = szCell[nCell] - leafCorrection;
+ b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
if( !pOld->leaf ){
assert( leafCorrection==0 );
assert( pOld->hdrOffset==0 );
/* The right pointer of the child page pOld becomes the left
** pointer of the divider cell */
- memcpy(apCell[nCell], &pOld->aData[8], 4);
+ memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
}else{
assert( leafCorrection==4 );
- if( szCell[nCell]<4 ){
+ while( b.szCell[b.nCell]<4 ){
/* Do not allow any cells smaller than 4 bytes. If a smaller cell
** does exist, pad it with 0x00 bytes. */
- assert( szCell[nCell]==3 );
- assert( apCell[nCell]==&aSpace1[iSpace1-3] );
+ assert( b.szCell[b.nCell]==3 || CORRUPT_DB );
+ assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
aSpace1[iSpace1++] = 0x00;
- szCell[nCell] = 4;
+ b.szCell[b.nCell]++;
}
}
- nCell++;
+ b.nCell++;
}
}
/*
- ** Figure out the number of pages needed to hold all nCell cells.
+ ** Figure out the number of pages needed to hold all b.nCell cells.
** Store this number in "k". Also compute szNew[] which is the total
** size of all cells on the i-th page and cntNew[] which is the index
- ** in apCell[] of the cell that divides page i from page i+1.
- ** cntNew[k] should equal nCell.
+ ** in b.apCell[] of the cell that divides page i from page i+1.
+ ** cntNew[k] should equal b.nCell.
**
** Values computed by this block:
**
** k: The total number of sibling pages
** szNew[i]: Spaced used on the i-th sibling page.
- ** cntNew[i]: Index in apCell[] and szCell[] for the first cell to
+ ** cntNew[i]: Index in b.apCell[] and b.szCell[] for the first cell to
** the right of the i-th sibling page.
** usableSpace: Number of bytes of space available on each sibling.
**
*/
usableSpace = pBt->usableSize - 12 + leafCorrection;
- for(subtotal=k=i=0; i<nCell; i++){
- assert( i<nMaxCells );
- subtotal += szCell[i] + 2;
- if( subtotal > usableSpace ){
- szNew[k] = subtotal - szCell[i] - 2;
- cntNew[k] = i;
- if( leafData ){ i--; }
- subtotal = 0;
- k++;
- if( k>NB+1 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }
- }
- }
- szNew[k] = subtotal;
- cntNew[k] = nCell;
- k++;
+ for(i=0; i<nOld; i++){
+ MemPage *p = apOld[i];
+ szNew[i] = usableSpace - p->nFree;
+ if( szNew[i]<0 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }
+ for(j=0; j<p->nOverflow; j++){
+ szNew[i] += 2 + p->xCellSize(p, p->apOvfl[j]);
+ }
+ cntNew[i] = cntOld[i];
+ }
+ k = nOld;
+ for(i=0; i<k; i++){
+ int sz;
+ while( szNew[i]>usableSpace ){
+ if( i+1>=k ){
+ k = i+2;
+ if( k>NB+2 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }
+ szNew[k-1] = 0;
+ cntNew[k-1] = b.nCell;
+ }
+ sz = 2 + cachedCellSize(&b, cntNew[i]-1);
+ szNew[i] -= sz;
+ if( !leafData ){
+ if( cntNew[i]<b.nCell ){
+ sz = 2 + cachedCellSize(&b, cntNew[i]);
+ }else{
+ sz = 0;
+ }
+ }
+ szNew[i+1] += sz;
+ cntNew[i]--;
+ }
+ while( cntNew[i]<b.nCell ){
+ sz = 2 + cachedCellSize(&b, cntNew[i]);
+ if( szNew[i]+sz>usableSpace ) break;
+ szNew[i] += sz;
+ cntNew[i]++;
+ if( !leafData ){
+ if( cntNew[i]<b.nCell ){
+ sz = 2 + cachedCellSize(&b, cntNew[i]);
+ }else{
+ sz = 0;
+ }
+ }
+ szNew[i+1] -= sz;
+ }
+ if( cntNew[i]>=b.nCell ){
+ k = i+1;
+ }else if( cntNew[i] <= (i>0 ? cntNew[i-1] : 0) ){
+ rc = SQLITE_CORRUPT_BKPT;
+ goto balance_cleanup;
+ }
+ }
/*
** The packing computed by the previous block is biased toward the siblings
@@ -60002,19 +61804,27 @@ static int balance_nonroot(
r = cntNew[i-1] - 1;
d = r + 1 - leafData;
- assert( d<nMaxCells );
- assert( r<nMaxCells );
- while( szRight==0
- || (!bBulk && szRight+szCell[d]+2<=szLeft-(szCell[r]+2))
- ){
- szRight += szCell[d] + 2;
- szLeft -= szCell[r] + 2;
- cntNew[i-1]--;
- r = cntNew[i-1] - 1;
- d = r + 1 - leafData;
- }
+ (void)cachedCellSize(&b, d);
+ do{
+ assert( d<nMaxCells );
+ assert( r<nMaxCells );
+ (void)cachedCellSize(&b, r);
+ if( szRight!=0
+ && (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+2)) ){
+ break;
+ }
+ szRight += b.szCell[d] + 2;
+ szLeft -= b.szCell[r] + 2;
+ cntNew[i-1] = r;
+ r--;
+ d--;
+ }while( r>=0 );
szNew[i] = szRight;
szNew[i-1] = szLeft;
+ if( cntNew[i-1] <= (i>1 ? cntNew[i-2] : 0) ){
+ rc = SQLITE_CORRUPT_BKPT;
+ goto balance_cleanup;
+ }
}
/* Sanity check: For a non-corrupt database file one of the follwing
@@ -60034,10 +61844,6 @@ static int balance_nonroot(
/*
** Allocate k new pages. Reuse old pages where possible.
*/
- if( apOld[0]->pgno<=1 ){
- rc = SQLITE_CORRUPT_BKPT;
- goto balance_cleanup;
- }
pageFlags = apOld[0]->aData[0];
for(i=0; i<k; i++){
MemPage *pNew;
@@ -60054,7 +61860,7 @@ static int balance_nonroot(
zeroPage(pNew, pageFlags);
apNew[i] = pNew;
nNew++;
- cntOld[i] = nCell;
+ cntOld[i] = b.nCell;
/* Set the pointer-map entry for the new sibling page. */
if( ISAUTOVACUUM ){
@@ -60159,8 +61965,8 @@ static int balance_nonroot(
int iNew = 0;
int iOld = 0;
- for(i=0; i<nCell; i++){
- u8 *pCell = apCell[i];
+ for(i=0; i<b.nCell; i++){
+ u8 *pCell = b.apCell[i];
if( i==cntOldNext ){
MemPage *pOld = (++iOld)<nNew ? apNew[iOld] : apOld[iOld];
cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
@@ -60185,9 +61991,10 @@ static int balance_nonroot(
if( !leafCorrection ){
ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
}
- if( szCell[i]>pNew->minLocal ){
+ if( cachedCellSize(&b,i)>pNew->minLocal ){
ptrmapPutOvflPtr(pNew, pCell, &rc);
}
+ if( rc ) goto balance_cleanup;
}
}
}
@@ -60201,20 +62008,21 @@ static int balance_nonroot(
j = cntNew[i];
assert( j<nMaxCells );
- pCell = apCell[j];
- sz = szCell[j] + leafCorrection;
+ assert( b.apCell[j]!=0 );
+ pCell = b.apCell[j];
+ sz = b.szCell[j] + leafCorrection;
pTemp = &aOvflSpace[iOvflSpace];
if( !pNew->leaf ){
memcpy(&pNew->aData[8], pCell, 4);
}else if( leafData ){
/* If the tree is a leaf-data tree, and the siblings are leaves,
- ** then there is no divider cell in apCell[]. Instead, the divider
+ ** then there is no divider cell in b.apCell[]. Instead, the divider
** cell consists of the integer key for the right-most cell of
** the sibling-page assembled above only.
*/
CellInfo info;
j--;
- btreeParseCellPtr(pNew, apCell[j], &info);
+ pNew->xParseCell(pNew, b.apCell[j], &info);
pCell = pTemp;
sz = 4 + putVarint(&pCell[4], info.nKey);
pTemp = 0;
@@ -60231,9 +62039,9 @@ static int balance_nonroot(
** cells are at least 4 bytes. It only happens in b-trees used
** to evaluate "IN (SELECT ...)" and similar clauses.
*/
- if( szCell[j]==4 ){
+ if( b.szCell[j]==4 ){
assert(leafCorrection==4);
- sz = cellSizePtr(pParent, pCell);
+ sz = pParent->xCellSize(pParent, pCell);
}
}
iOvflSpace += sz;
@@ -60289,12 +62097,13 @@ static int balance_nonroot(
iNew = iOld = 0;
nNewCell = cntNew[0];
}else{
- iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : nCell;
+ iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;
iNew = cntNew[iPg-1] + !leafData;
nNewCell = cntNew[iPg] - iNew;
}
- editPage(apNew[iPg], iOld, iNew, nNewCell, apCell, szCell);
+ rc = editPage(apNew[iPg], iOld, iNew, nNewCell, &b);
+ if( rc ) goto balance_cleanup;
abDone[iPg]++;
apNew[iPg]->nFree = usableSpace-szNew[iPg];
assert( apNew[iPg]->nOverflow==0 );
@@ -60324,7 +62133,7 @@ static int balance_nonroot(
** by smaller than the child due to the database header, and so all the
** free space needs to be up front.
*/
- assert( nNew==1 );
+ assert( nNew==1 || CORRUPT_DB );
rc = defragmentPage(apNew[0]);
testcase( rc!=SQLITE_OK );
assert( apNew[0]->nFree ==
@@ -60345,7 +62154,7 @@ static int balance_nonroot(
assert( pParent->isInit );
TRACE(("BALANCE: finished: old=%d new=%d cells=%d\n",
- nOld, nNew, nCell));
+ nOld, nNew, b.nCell));
/* Free any old pages that were not reused as new pages.
*/
@@ -60368,7 +62177,7 @@ static int balance_nonroot(
** Cleanup before returning.
*/
balance_cleanup:
- sqlite3ScratchFree(apCell);
+ sqlite3ScratchFree(b.apCell);
for(i=0; i<nOld; i++){
releasePage(apOld[i]);
}
@@ -60643,24 +62452,28 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
** doing any work. To avoid thwarting these optimizations, it is important
** not to clear the cursor here.
*/
- rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
- if( rc ) return rc;
+ if( pCur->curFlags & BTCF_Multiple ){
+ rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
+ if( rc ) return rc;
+ }
if( pCur->pKeyInfo==0 ){
+ assert( pKey==0 );
/* If this is an insert into a table b-tree, invalidate any incrblob
** cursors open on the row being replaced */
invalidateIncrblobCursors(p, nKey, 0);
/* If the cursor is currently on the last row and we are appending a
- ** new row onto the end, set the "loc" to avoid an unnecessary btreeMoveto()
- ** call */
+ ** new row onto the end, set the "loc" to avoid an unnecessary
+ ** btreeMoveto() call */
if( (pCur->curFlags&BTCF_ValidNKey)!=0 && nKey>0
&& pCur->info.nKey==nKey-1 ){
- loc = -1;
+ loc = -1;
+ }else if( loc==0 ){
+ rc = sqlite3BtreeMovetoUnpacked(pCur, 0, nKey, appendBias, &loc);
+ if( rc ) return rc;
}
- }
-
- if( !loc ){
+ }else if( loc==0 ){
rc = btreeMoveto(pCur, pKey, nKey, appendBias, &loc);
if( rc ) return rc;
}
@@ -60678,7 +62491,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
assert( newCell!=0 );
rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, &szNew);
if( rc ) goto end_insert;
- assert( szNew==cellSizePtr(pPage, newCell) );
+ assert( szNew==pPage->xCellSize(pPage, newCell) );
assert( szNew <= MX_CELL_SIZE(pBt) );
idx = pCur->aiIdx[pCur->iPage];
if( loc==0 ){
@@ -60743,10 +62556,15 @@ end_insert:
}
/*
-** Delete the entry that the cursor is pointing to. The cursor
-** is left pointing at an arbitrary location.
+** Delete the entry that the cursor is pointing to.
+**
+** If the second parameter is zero, then the cursor is left pointing at an
+** arbitrary location after the delete. If it is non-zero, then the cursor
+** is left in a state such that the next call to BtreeNext() or BtreePrev()
+** moves it to the same row as it would if the call to BtreeDelete() had
+** been omitted.
*/
-SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
+SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
Btree *p = pCur->pBtree;
BtShared *pBt = p->pBt;
int rc; /* Return code */
@@ -60755,6 +62573,7 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
int iCellIdx; /* Index of cell to delete */
int iCellDepth; /* Depth of node containing pCell */
u16 szCell; /* Size of the cell being deleted */
+ int bSkipnext = 0; /* Leaf cursor in SKIPNEXT state */
assert( cursorHoldsMutex(pCur) );
assert( pBt->inTransaction==TRANS_WRITE );
@@ -60762,12 +62581,8 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
assert( pCur->curFlags & BTCF_WriteFlag );
assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
assert( !hasReadConflicts(p, pCur->pgnoRoot) );
-
- if( NEVER(pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell)
- || NEVER(pCur->eState!=CURSOR_VALID)
- ){
- return SQLITE_ERROR; /* Something has gone awry. */
- }
+ assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
+ assert( pCur->eState==CURSOR_VALID );
iCellDepth = pCur->iPage;
iCellIdx = pCur->aiIdx[iCellDepth];
@@ -60788,12 +62603,11 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
}
/* Save the positions of any other cursors open on this table before
- ** making any modifications. Make the page containing the entry to be
- ** deleted writable. Then free any overflow pages associated with the
- ** entry and finally remove the cell itself from within the page.
- */
- rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
- if( rc ) return rc;
+ ** making any modifications. */
+ if( pCur->curFlags & BTCF_Multiple ){
+ rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
+ if( rc ) return rc;
+ }
/* If this is a delete operation to remove a row from a table b-tree,
** invalidate any incrblob cursors open on the row being deleted. */
@@ -60801,6 +62615,31 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
invalidateIncrblobCursors(p, pCur->info.nKey, 0);
}
+ /* If the bPreserve flag is set to true, then the cursor position must
+ ** be preserved following this delete operation. If the current delete
+ ** will cause a b-tree rebalance, then this is done by saving the cursor
+ ** key and leaving the cursor in CURSOR_REQUIRESEEK state before
+ ** returning.
+ **
+ ** Or, if the current delete will not cause a rebalance, then the cursor
+ ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately
+ ** before or after the deleted entry. In this case set bSkipnext to true. */
+ if( bPreserve ){
+ if( !pPage->leaf
+ || (pPage->nFree+cellSizePtr(pPage,pCell)+2)>(int)(pBt->usableSize*2/3)
+ ){
+ /* A b-tree rebalance will be required after deleting this entry.
+ ** Save the cursor key. */
+ rc = saveCursorKey(pCur);
+ if( rc ) return rc;
+ }else{
+ bSkipnext = 1;
+ }
+ }
+
+ /* Make the page containing the entry to be deleted writable. Then free any
+ ** overflow pages associated with the entry and finally remove the cell
+ ** itself from within the page. */
rc = sqlite3PagerWrite(pPage->pDbPage);
if( rc ) return rc;
rc = clearCell(pPage, pCell, &szCell);
@@ -60819,7 +62658,8 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
unsigned char *pTmp;
pCell = findCell(pLeaf, pLeaf->nCell-1);
- nCell = cellSizePtr(pLeaf, pCell);
+ if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
+ nCell = pLeaf->xCellSize(pLeaf, pCell);
assert( MX_CELL_SIZE(pBt) >= nCell );
pTmp = pBt->pTmpSpace;
assert( pTmp!=0 );
@@ -60853,7 +62693,23 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
}
if( rc==SQLITE_OK ){
- moveToRoot(pCur);
+ if( bSkipnext ){
+ assert( bPreserve && pCur->iPage==iCellDepth );
+ assert( pPage==pCur->apPage[pCur->iPage] );
+ assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
+ pCur->eState = CURSOR_SKIPNEXT;
+ if( iCellIdx>=pPage->nCell ){
+ pCur->skipNext = -1;
+ pCur->aiIdx[iCellDepth] = pPage->nCell-1;
+ }else{
+ pCur->skipNext = 1;
+ }
+ }else{
+ rc = moveToRoot(pCur);
+ if( bPreserve ){
+ pCur->eState = CURSOR_REQUIRESEEK;
+ }
+ }
}
return rc;
}
@@ -60911,7 +62767,8 @@ static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
pgnoRoot==PENDING_BYTE_PAGE(pBt) ){
pgnoRoot++;
}
- assert( pgnoRoot>=3 );
+ assert( pgnoRoot>=3 || CORRUPT_DB );
+ testcase( pgnoRoot<3 );
/* Allocate a page. The page that currently resides at pgnoRoot will
** be moved to the allocated page (unless the allocated page happens
@@ -61040,7 +62897,7 @@ static int clearDatabasePage(
if( pgno>btreePagecount(pBt) ){
return SQLITE_CORRUPT_BKPT;
}
- rc = getAndInitPage(pBt, pgno, &pPage, 0);
+ rc = getAndInitPage(pBt, pgno, &pPage, 0, 0);
if( rc ) return rc;
if( pPage->bBusy ){
rc = SQLITE_CORRUPT_BKPT;
@@ -61061,7 +62918,8 @@ static int clearDatabasePage(
rc = clearDatabasePage(pBt, get4byte(&pPage->aData[hdr+8]), 1, pnChange);
if( rc ) goto cleardatabasepage_out;
}else if( pnChange ){
- assert( pPage->intKey );
+ assert( pPage->intKey || CORRUPT_DB );
+ testcase( !pPage->intKey );
*pnChange += pPage->nCell;
}
if( freePageFlag ){
@@ -61416,7 +63274,6 @@ static void checkAppendMsg(
...
){
va_list ap;
- char zBuf[200];
if( !pCheck->mxErr ) return;
pCheck->mxErr--;
pCheck->nErr++;
@@ -61425,8 +63282,7 @@ static void checkAppendMsg(
sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1);
}
if( pCheck->zPfx ){
- sqlite3_snprintf(sizeof(zBuf), zBuf, pCheck->zPfx, pCheck->v1, pCheck->v2);
- sqlite3StrAccumAppendAll(&pCheck->errMsg, zBuf);
+ sqlite3XPrintf(&pCheck->errMsg, 0, pCheck->zPfx, pCheck->v1, pCheck->v2);
}
sqlite3VXPrintf(&pCheck->errMsg, 1, zFormat, ap);
va_end(ap);
@@ -61575,6 +63431,10 @@ static void checkList(
#endif
iPage = get4byte(pOvflData);
sqlite3PagerUnref(pOvflPage);
+
+ if( isFreeList && N<(iPage!=0) ){
+ checkAppendMsg(pCheck, "free-page count in header is too small");
+ }
}
}
#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
@@ -61640,35 +63500,42 @@ static int btreeHeapPull(u32 *aHeap, u32 *pOut){
**
** 1. Make sure that cells and freeblocks do not overlap
** but combine to completely cover the page.
-** NO 2. Make sure cell keys are in order.
-** NO 3. Make sure no key is less than or equal to zLowerBound.
-** NO 4. Make sure no key is greater than or equal to zUpperBound.
-** 5. Check the integrity of overflow pages.
-** 6. Recursively call checkTreePage on all children.
-** 7. Verify that the depth of all children is the same.
-** 8. Make sure this page is at least 33% full or else it is
-** the root of the tree.
+** 2. Make sure integer cell keys are in order.
+** 3. Check the integrity of overflow pages.
+** 4. Recursively call checkTreePage on all children.
+** 5. Verify that the depth of all children is the same.
*/
static int checkTreePage(
IntegrityCk *pCheck, /* Context for the sanity check */
int iPage, /* Page number of the page to check */
- i64 *pnParentMinKey,
- i64 *pnParentMaxKey
+ i64 *piMinKey, /* Write minimum integer primary key here */
+ i64 maxKey /* Error if integer primary key greater than this */
){
- MemPage *pPage;
- int i, rc, depth, d2, pgno, cnt;
- int hdr, cellStart;
- int nCell;
- u8 *data;
- BtShared *pBt;
- int usableSize;
- u32 *heap = 0;
- u32 x, prev = 0;
- i64 nMinKey = 0;
- i64 nMaxKey = 0;
+ MemPage *pPage = 0; /* The page being analyzed */
+ int i; /* Loop counter */
+ int rc; /* Result code from subroutine call */
+ int depth = -1, d2; /* Depth of a subtree */
+ int pgno; /* Page number */
+ int nFrag; /* Number of fragmented bytes on the page */
+ int hdr; /* Offset to the page header */
+ int cellStart; /* Offset to the start of the cell pointer array */
+ int nCell; /* Number of cells */
+ int doCoverageCheck = 1; /* True if cell coverage checking should be done */
+ int keyCanBeEqual = 1; /* True if IPK can be equal to maxKey
+ ** False if IPK must be strictly less than maxKey */
+ u8 *data; /* Page content */
+ u8 *pCell; /* Cell content */
+ u8 *pCellIdx; /* Next element of the cell pointer array */
+ BtShared *pBt; /* The BtShared object that owns pPage */
+ u32 pc; /* Address of a cell */
+ u32 usableSize; /* Usable size of the page */
+ u32 contentOffset; /* Offset to the start of the cell content area */
+ u32 *heap = 0; /* Min-heap used for checking cell coverage */
+ u32 x, prev = 0; /* Next and previous entry on the min-heap */
const char *saved_zPfx = pCheck->zPfx;
int saved_v1 = pCheck->v1;
int saved_v2 = pCheck->v2;
+ u8 savedIsInit = 0;
/* Check that the page exists
*/
@@ -61681,54 +63548,95 @@ static int checkTreePage(
if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
checkAppendMsg(pCheck,
"unable to get the page. error code=%d", rc);
- depth = -1;
goto end_of_check;
}
/* Clear MemPage.isInit to make sure the corruption detection code in
** btreeInitPage() is executed. */
+ savedIsInit = pPage->isInit;
pPage->isInit = 0;
if( (rc = btreeInitPage(pPage))!=0 ){
assert( rc==SQLITE_CORRUPT ); /* The only possible error from InitPage */
checkAppendMsg(pCheck,
"btreeInitPage() returns error code %d", rc);
- releasePage(pPage);
- depth = -1;
goto end_of_check;
}
+ data = pPage->aData;
+ hdr = pPage->hdrOffset;
- /* Check out all the cells.
- */
- depth = 0;
- for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
- u8 *pCell;
- u32 sz;
+ /* Set up for cell analysis */
+ pCheck->zPfx = "On tree page %d cell %d: ";
+ contentOffset = get2byteNotZero(&data[hdr+5]);
+ assert( contentOffset<=usableSize ); /* Enforced by btreeInitPage() */
+
+ /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
+ ** number of cells on the page. */
+ nCell = get2byte(&data[hdr+3]);
+ assert( pPage->nCell==nCell );
+
+ /* EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page
+ ** immediately follows the b-tree page header. */
+ cellStart = hdr + 12 - 4*pPage->leaf;
+ assert( pPage->aCellIdx==&data[cellStart] );
+ pCellIdx = &data[cellStart + 2*(nCell-1)];
+
+ if( !pPage->leaf ){
+ /* Analyze the right-child page of internal pages */
+ pgno = get4byte(&data[hdr+8]);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+ if( pBt->autoVacuum ){
+ pCheck->zPfx = "On page %d at right child: ";
+ checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
+ }
+#endif
+ depth = checkTreePage(pCheck, pgno, &maxKey, maxKey);
+ keyCanBeEqual = 0;
+ }else{
+ /* For leaf pages, the coverage check will occur in the same loop
+ ** as the other cell checks, so initialize the heap. */
+ heap = pCheck->heap;
+ heap[0] = 0;
+ }
+
+ /* EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte
+ ** integer offsets to the cell contents. */
+ for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
CellInfo info;
- /* Check payload overflow pages
- */
- pCheck->zPfx = "On tree page %d cell %d: ";
- pCheck->v1 = iPage;
+ /* Check cell size */
pCheck->v2 = i;
- pCell = findCell(pPage,i);
- btreeParseCellPtr(pPage, pCell, &info);
- sz = info.nPayload;
- /* For intKey pages, check that the keys are in order.
- */
+ assert( pCellIdx==&data[cellStart + i*2] );
+ pc = get2byteAligned(pCellIdx);
+ pCellIdx -= 2;
+ if( pc<contentOffset || pc>usableSize-4 ){
+ checkAppendMsg(pCheck, "Offset %d out of range %d..%d",
+ pc, contentOffset, usableSize-4);
+ doCoverageCheck = 0;
+ continue;
+ }
+ pCell = &data[pc];
+ pPage->xParseCell(pPage, pCell, &info);
+ if( pc+info.nSize>usableSize ){
+ checkAppendMsg(pCheck, "Extends off end of page");
+ doCoverageCheck = 0;
+ continue;
+ }
+
+ /* Check for integer primary key out of range */
if( pPage->intKey ){
- if( i==0 ){
- nMinKey = nMaxKey = info.nKey;
- }else if( info.nKey <= nMaxKey ){
- checkAppendMsg(pCheck,
- "Rowid %lld out of order (previous was %lld)", info.nKey, nMaxKey);
+ if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){
+ checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
}
- nMaxKey = info.nKey;
+ maxKey = info.nKey;
}
- if( (sz>info.nLocal)
- && (&pCell[info.iOverflow]<=&pPage->aData[pBt->usableSize])
- ){
- int nPage = (sz - info.nLocal + usableSize - 5)/(usableSize - 4);
- Pgno pgnoOvfl = get4byte(&pCell[info.iOverflow]);
+
+ /* Check the content overflow list */
+ if( info.nPayload>info.nLocal ){
+ int nPage; /* Number of pages on the overflow chain */
+ Pgno pgnoOvfl; /* First page of the overflow chain */
+ assert( pc + info.iOverflow <= usableSize );
+ nPage = (info.nPayload - info.nLocal + usableSize - 5)/(usableSize - 4);
+ pgnoOvfl = get4byte(&pCell[info.iOverflow]);
#ifndef SQLITE_OMIT_AUTOVACUUM
if( pBt->autoVacuum ){
checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage);
@@ -61737,118 +63645,57 @@ static int checkTreePage(
checkList(pCheck, 0, pgnoOvfl, nPage);
}
- /* Check sanity of left child page.
- */
if( !pPage->leaf ){
+ /* Check sanity of left child page for internal pages */
pgno = get4byte(pCell);
#ifndef SQLITE_OMIT_AUTOVACUUM
if( pBt->autoVacuum ){
checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
}
#endif
- d2 = checkTreePage(pCheck, pgno, &nMinKey, i==0?NULL:&nMaxKey);
- if( i>0 && d2!=depth ){
+ d2 = checkTreePage(pCheck, pgno, &maxKey, maxKey);
+ keyCanBeEqual = 0;
+ if( d2!=depth ){
checkAppendMsg(pCheck, "Child page depth differs");
+ depth = d2;
}
- depth = d2;
- }
- }
-
- if( !pPage->leaf ){
- pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
- pCheck->zPfx = "On page %d at right child: ";
- pCheck->v1 = iPage;
-#ifndef SQLITE_OMIT_AUTOVACUUM
- if( pBt->autoVacuum ){
- checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage);
- }
-#endif
- checkTreePage(pCheck, pgno, NULL, !pPage->nCell?NULL:&nMaxKey);
- }
-
- /* For intKey leaf pages, check that the min/max keys are in order
- ** with any left/parent/right pages.
- */
- pCheck->zPfx = "Page %d: ";
- pCheck->v1 = iPage;
- if( pPage->leaf && pPage->intKey ){
- /* if we are a left child page */
- if( pnParentMinKey ){
- /* if we are the left most child page */
- if( !pnParentMaxKey ){
- if( nMaxKey > *pnParentMinKey ){
- checkAppendMsg(pCheck,
- "Rowid %lld out of order (max larger than parent min of %lld)",
- nMaxKey, *pnParentMinKey);
- }
- }else{
- if( nMinKey <= *pnParentMinKey ){
- checkAppendMsg(pCheck,
- "Rowid %lld out of order (min less than parent min of %lld)",
- nMinKey, *pnParentMinKey);
- }
- if( nMaxKey > *pnParentMaxKey ){
- checkAppendMsg(pCheck,
- "Rowid %lld out of order (max larger than parent max of %lld)",
- nMaxKey, *pnParentMaxKey);
- }
- *pnParentMinKey = nMaxKey;
- }
- /* else if we're a right child page */
- } else if( pnParentMaxKey ){
- if( nMinKey <= *pnParentMaxKey ){
- checkAppendMsg(pCheck,
- "Rowid %lld out of order (min less than parent max of %lld)",
- nMinKey, *pnParentMaxKey);
- }
+ }else{
+ /* Populate the coverage-checking heap for leaf pages */
+ btreeHeapInsert(heap, (pc<<16)|(pc+info.nSize-1));
}
}
+ *piMinKey = maxKey;
/* Check for complete coverage of the page
*/
- data = pPage->aData;
- hdr = pPage->hdrOffset;
- heap = (u32*)sqlite3PageMalloc( pBt->pageSize );
pCheck->zPfx = 0;
- if( heap==0 ){
- pCheck->mallocFailed = 1;
- }else{
- int contentOffset = get2byteNotZero(&data[hdr+5]);
- assert( contentOffset<=usableSize ); /* Enforced by btreeInitPage() */
- heap[0] = 0;
- btreeHeapInsert(heap, contentOffset-1);
- /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
- ** number of cells on the page. */
- nCell = get2byte(&data[hdr+3]);
- /* EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page
- ** immediately follows the b-tree page header. */
- cellStart = hdr + 12 - 4*pPage->leaf;
- /* EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte
- ** integer offsets to the cell contents. */
- for(i=0; i<nCell; i++){
- int pc = get2byte(&data[cellStart+i*2]);
- u32 size = 65536;
- if( pc<=usableSize-4 ){
- size = cellSizePtr(pPage, &data[pc]);
- }
- if( (int)(pc+size-1)>=usableSize ){
- pCheck->zPfx = 0;
- checkAppendMsg(pCheck,
- "Corruption detected in cell %d on page %d",i,iPage);
- }else{
+ if( doCoverageCheck && pCheck->mxErr>0 ){
+ /* For leaf pages, the min-heap has already been initialized and the
+ ** cells have already been inserted. But for internal pages, that has
+ ** not yet been done, so do it now */
+ if( !pPage->leaf ){
+ heap = pCheck->heap;
+ heap[0] = 0;
+ for(i=nCell-1; i>=0; i--){
+ u32 size;
+ pc = get2byteAligned(&data[cellStart+i*2]);
+ size = pPage->xCellSize(pPage, &data[pc]);
btreeHeapInsert(heap, (pc<<16)|(pc+size-1));
}
}
- /* EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header
+ /* Add the freeblocks to the min-heap
+ **
+ ** EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header
** is the offset of the first freeblock, or zero if there are no
- ** freeblocks on the page. */
+ ** freeblocks on the page.
+ */
i = get2byte(&data[hdr+1]);
while( i>0 ){
int size, j;
- assert( i<=usableSize-4 ); /* Enforced by btreeInitPage() */
+ assert( (u32)i<=usableSize-4 ); /* Enforced by btreeInitPage() */
size = get2byte(&data[i+2]);
- assert( i+size<=usableSize ); /* Enforced by btreeInitPage() */
- btreeHeapInsert(heap, (i<<16)|(i+size-1));
+ assert( (u32)(i+size)<=usableSize ); /* Enforced by btreeInitPage() */
+ btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
/* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
** big-endian integer which is the offset in the b-tree page of the next
** freeblock in the chain, or zero if the freeblock is the last on the
@@ -61857,39 +63704,50 @@ static int checkTreePage(
/* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
** increasing offset. */
assert( j==0 || j>i+size ); /* Enforced by btreeInitPage() */
- assert( j<=usableSize-4 ); /* Enforced by btreeInitPage() */
+ assert( (u32)j<=usableSize-4 ); /* Enforced by btreeInitPage() */
i = j;
}
- cnt = 0;
- assert( heap[0]>0 );
- assert( (heap[1]>>16)==0 );
- btreeHeapPull(heap,&prev);
+ /* Analyze the min-heap looking for overlap between cells and/or
+ ** freeblocks, and counting the number of untracked bytes in nFrag.
+ **
+ ** Each min-heap entry is of the form: (start_address<<16)|end_address.
+ ** There is an implied first entry the covers the page header, the cell
+ ** pointer index, and the gap between the cell pointer index and the start
+ ** of cell content.
+ **
+ ** The loop below pulls entries from the min-heap in order and compares
+ ** the start_address against the previous end_address. If there is an
+ ** overlap, that means bytes are used multiple times. If there is a gap,
+ ** that gap is added to the fragmentation count.
+ */
+ nFrag = 0;
+ prev = contentOffset - 1; /* Implied first min-heap entry */
while( btreeHeapPull(heap,&x) ){
- if( (prev&0xffff)+1>(x>>16) ){
+ if( (prev&0xffff)>=(x>>16) ){
checkAppendMsg(pCheck,
"Multiple uses for byte %u of page %d", x>>16, iPage);
break;
}else{
- cnt += (x>>16) - (prev&0xffff) - 1;
+ nFrag += (x>>16) - (prev&0xffff) - 1;
prev = x;
}
}
- cnt += usableSize - (prev&0xffff) - 1;
+ nFrag += usableSize - (prev&0xffff) - 1;
/* EVIDENCE-OF: R-43263-13491 The total number of bytes in all fragments
** is stored in the fifth field of the b-tree page header.
** EVIDENCE-OF: R-07161-27322 The one-byte integer at offset 7 gives the
** number of fragmented free bytes within the cell content area.
*/
- if( heap[0]==0 && cnt!=data[hdr+7] ){
+ if( heap[0]==0 && nFrag!=data[hdr+7] ){
checkAppendMsg(pCheck,
"Fragmentation of %d bytes reported as %d on page %d",
- cnt, data[hdr+7], iPage);
+ nFrag, data[hdr+7], iPage);
}
}
- sqlite3PageFree(heap);
- releasePage(pPage);
end_of_check:
+ if( !doCoverageCheck ) pPage->isInit = savedIsInit;
+ releasePage(pPage);
pCheck->zPfx = saved_zPfx;
pCheck->v1 = saved_v1;
pCheck->v2 = saved_v2;
@@ -61919,14 +63777,15 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
int *pnErr /* Write number of errors seen to this variable */
){
Pgno i;
- int nRef;
IntegrityCk sCheck;
BtShared *pBt = p->pBt;
+ int savedDbFlags = pBt->db->flags;
char zErr[100];
+ VVA_ONLY( int nRef );
sqlite3BtreeEnter(p);
assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE );
- nRef = sqlite3PagerRefcount(pBt->pPager);
+ assert( (nRef = sqlite3PagerRefcount(pBt->pPager))>=0 );
sCheck.pBt = pBt;
sCheck.pPager = pBt->pPager;
sCheck.nPage = btreePagecount(sCheck.pBt);
@@ -61936,21 +63795,26 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
sCheck.zPfx = 0;
sCheck.v1 = 0;
sCheck.v2 = 0;
- *pnErr = 0;
+ sCheck.aPgRef = 0;
+ sCheck.heap = 0;
+ sqlite3StrAccumInit(&sCheck.errMsg, 0, zErr, sizeof(zErr), SQLITE_MAX_LENGTH);
if( sCheck.nPage==0 ){
- sqlite3BtreeLeave(p);
- return 0;
+ goto integrity_ck_cleanup;
}
sCheck.aPgRef = sqlite3MallocZero((sCheck.nPage / 8)+ 1);
if( !sCheck.aPgRef ){
- *pnErr = 1;
- sqlite3BtreeLeave(p);
- return 0;
+ sCheck.mallocFailed = 1;
+ goto integrity_ck_cleanup;
}
+ sCheck.heap = (u32*)sqlite3PageMalloc( pBt->pageSize );
+ if( sCheck.heap==0 ){
+ sCheck.mallocFailed = 1;
+ goto integrity_ck_cleanup;
+ }
+
i = PENDING_BYTE_PAGE(pBt);
if( i<=sCheck.nPage ) setPageReferenced(&sCheck, i);
- sqlite3StrAccumInit(&sCheck.errMsg, 0, zErr, sizeof(zErr), SQLITE_MAX_LENGTH);
/* Check the integrity of the freelist
*/
@@ -61961,17 +63825,19 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
/* Check all the tables.
*/
+ testcase( pBt->db->flags & SQLITE_CellSizeCk );
+ pBt->db->flags &= ~SQLITE_CellSizeCk;
for(i=0; (int)i<nRoot && sCheck.mxErr; i++){
+ i64 notUsed;
if( aRoot[i]==0 ) continue;
#ifndef SQLITE_OMIT_AUTOVACUUM
if( pBt->autoVacuum && aRoot[i]>1 ){
checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0);
}
#endif
- sCheck.zPfx = "List of tree roots: ";
- checkTreePage(&sCheck, aRoot[i], NULL, NULL);
- sCheck.zPfx = 0;
+ checkTreePage(&sCheck, aRoot[i], &notUsed, LARGEST_INT64);
}
+ pBt->db->flags = savedDbFlags;
/* Make sure every page in the file is referenced
*/
@@ -61995,28 +63861,20 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
#endif
}
- /* Make sure this analysis did not leave any unref() pages.
- ** This is an internal consistency check; an integrity check
- ** of the integrity check.
- */
- if( NEVER(nRef != sqlite3PagerRefcount(pBt->pPager)) ){
- checkAppendMsg(&sCheck,
- "Outstanding page count goes from %d to %d during this analysis",
- nRef, sqlite3PagerRefcount(pBt->pPager)
- );
- }
-
/* Clean up and report errors.
*/
- sqlite3BtreeLeave(p);
+integrity_ck_cleanup:
+ sqlite3PageFree(sCheck.heap);
sqlite3_free(sCheck.aPgRef);
if( sCheck.mallocFailed ){
sqlite3StrAccumReset(&sCheck.errMsg);
- *pnErr = sCheck.nErr+1;
- return 0;
+ sCheck.nErr++;
}
*pnErr = sCheck.nErr;
if( sCheck.nErr==0 ) sqlite3StrAccumReset(&sCheck.errMsg);
+ /* Make sure this analysis did not leave any unref() pages. */
+ assert( nRef==sqlite3PagerRefcount(pBt->pPager) );
+ sqlite3BtreeLeave(p);
return sqlite3StrAccumFinish(&sCheck.errMsg);
}
#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
@@ -62227,6 +64085,7 @@ SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void
*/
SQLITE_PRIVATE void sqlite3BtreeIncrblobCursor(BtCursor *pCur){
pCur->curFlags |= BTCF_Incrblob;
+ pCur->pBtree->hasIncrblobCur = 1;
}
#endif
@@ -62312,6 +64171,8 @@ SQLITE_PRIVATE int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage));
** This file contains the implementation of the sqlite3_backup_XXX()
** API functions and the related features.
*/
+/* #include "sqliteInt.h" */
+/* #include "btreeInt.h" */
/*
** Structure allocated for each backup operation.
@@ -62983,9 +64844,13 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){
** corresponding to the source database is held when this function is
** called.
*/
-SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
- sqlite3_backup *p; /* Iterator variable */
- for(p=pBackup; p; p=p->pNext){
+static SQLITE_NOINLINE void backupUpdate(
+ sqlite3_backup *p,
+ Pgno iPage,
+ const u8 *aData
+){
+ assert( p!=0 );
+ do{
assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
if( !isFatalError(p->rc) && iPage<p->iNext ){
/* The backup process p has already copied page iPage. But now it
@@ -63002,7 +64867,10 @@ SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, con
p->rc = rc;
}
}
- }
+ }while( (p = p->pNext)!=0 );
+}
+SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
+ if( pBackup ) backupUpdate(pBackup, iPage, aData);
}
/*
@@ -63060,6 +64928,10 @@ SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
b.pDest = pTo;
b.iNext = 1;
+#ifdef SQLITE_HAS_CODEC
+ sqlite3PagerAlignReserve(sqlite3BtreePager(pTo), sqlite3BtreePager(pFrom));
+#endif
+
/* 0x7FFFFFFF is the hard limit for the number of pages in a database
** file. By passing this as the number of pages to copy to
** sqlite3_backup_step(), we can guarantee that the copy finishes
@@ -63103,6 +64975,8 @@ copy_finished:
** only within the VDBE. Interface routines refer to a Mem using the
** name sqlite_value
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
#ifdef SQLITE_DEBUG
/*
@@ -63674,7 +65548,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
SQLITE_PRIVATE void sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){
if( pMem->flags & MEM_Null ) return;
switch( aff ){
- case SQLITE_AFF_NONE: { /* Really a cast to BLOB */
+ case SQLITE_AFF_BLOB: { /* Really a cast to BLOB */
if( (pMem->flags & MEM_Blob)==0 ){
sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
@@ -63856,10 +65730,6 @@ SQLITE_PRIVATE void sqlite3VdbeMemAboutToChange(Vdbe *pVdbe, Mem *pMem){
}
#endif /* SQLITE_DEBUG */
-/*
-** Size of struct Mem not including the Mem.zMalloc member.
-*/
-#define MEMCELLSIZE offsetof(Mem,zMalloc)
/*
** Make an shallow copy of pFrom into pTo. Prior contents of
@@ -63867,10 +65737,15 @@ SQLITE_PRIVATE void sqlite3VdbeMemAboutToChange(Vdbe *pVdbe, Mem *pMem){
** pFrom->z is used, then pTo->z points to the same thing as pFrom->z
** and flags gets srcType (either MEM_Ephem or MEM_Static).
*/
+static SQLITE_NOINLINE void vdbeClrCopy(Mem *pTo, const Mem *pFrom, int eType){
+ vdbeMemClearExternAndSetNull(pTo);
+ assert( !VdbeMemDynamic(pTo) );
+ sqlite3VdbeMemShallowCopy(pTo, pFrom, eType);
+}
SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
assert( (pFrom->flags & MEM_RowSet)==0 );
assert( pTo->db==pFrom->db );
- if( VdbeMemDynamic(pTo) ) vdbeMemClearExternAndSetNull(pTo);
+ if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
memcpy(pTo, pFrom, MEMCELLSIZE);
if( (pFrom->flags&MEM_Static)==0 ){
pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
@@ -63886,7 +65761,10 @@ SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int sr
SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
int rc = SQLITE_OK;
- assert( pTo->db==pFrom->db );
+ /* The pFrom==0 case in the following assert() is when an sqlite3_value
+ ** from sqlite3_value_dup() is used as the argument
+ ** to sqlite3_result_value(). */
+ assert( pTo->db==pFrom->db || pFrom->db==0 );
assert( (pFrom->flags & MEM_RowSet)==0 );
if( VdbeMemDynamic(pTo) ) vdbeMemClearExternAndSetNull(pTo);
memcpy(pTo, pFrom, MEMCELLSIZE);
@@ -64033,6 +65911,32 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
** If this routine fails for any reason (malloc returns NULL or unable
** to read from the disk) then the pMem is left in an inconsistent state.
*/
+static SQLITE_NOINLINE int vdbeMemFromBtreeResize(
+ BtCursor *pCur, /* Cursor pointing at record to retrieve. */
+ u32 offset, /* Offset from the start of data to return bytes from. */
+ u32 amt, /* Number of bytes to return. */
+ int key, /* If true, retrieve from the btree key, not data. */
+ Mem *pMem /* OUT: Return data in this Mem structure. */
+){
+ int rc;
+ pMem->flags = MEM_Null;
+ if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+2)) ){
+ if( key ){
+ rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
+ }else{
+ rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
+ }
+ if( rc==SQLITE_OK ){
+ pMem->z[amt] = 0;
+ pMem->z[amt+1] = 0;
+ pMem->flags = MEM_Blob|MEM_Term;
+ pMem->n = (int)amt;
+ }else{
+ sqlite3VdbeMemRelease(pMem);
+ }
+ }
+ return rc;
+}
SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
BtCursor *pCur, /* Cursor pointing at record to retrieve. */
u32 offset, /* Offset from the start of data to return bytes from. */
@@ -64062,22 +65966,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
pMem->flags = MEM_Blob|MEM_Ephem;
pMem->n = (int)amt;
}else{
- pMem->flags = MEM_Null;
- if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+2)) ){
- if( key ){
- rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
- }else{
- rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
- }
- if( rc==SQLITE_OK ){
- pMem->z[amt] = 0;
- pMem->z[amt+1] = 0;
- pMem->flags = MEM_Blob|MEM_Term;
- pMem->n = (int)amt;
- }else{
- sqlite3VdbeMemRelease(pMem);
- }
- }
+ rc = vdbeMemFromBtreeResize(pCur, offset, amt, key, pMem);
}
return rc;
@@ -64226,7 +66115,7 @@ static sqlite3_value *valueNew(sqlite3 *db, struct ValueNewStat4Ctx *p){
** to be a scalar SQL function. If
**
** * all function arguments are SQL literals,
-** * the SQLITE_FUNC_CONSTANT function flag is set, and
+** * one of the SQLITE_FUNC_CONSTANT or _SLOCHNG function flags is set, and
** * the SQLITE_FUNC_NEEDCOLL function flag is not set,
**
** then this routine attempts to invoke the SQL function. Assuming no
@@ -64267,7 +66156,7 @@ static int valueFromFunction(
nName = sqlite3Strlen30(p->u.zToken);
pFunc = sqlite3FindFunction(db, p->u.zToken, nName, nVal, enc, 0);
assert( pFunc );
- if( (pFunc->funcFlags & SQLITE_FUNC_CONSTANT)==0
+ if( (pFunc->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG))==0
|| (pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL)
){
return SQLITE_OK;
@@ -64398,7 +66287,7 @@ static int valueFromExpr(
if( zVal==0 ) goto no_mem;
sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC);
}
- if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_NONE ){
+ if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_BLOB ){
sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8);
}else{
sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
@@ -64765,19 +66654,28 @@ SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value *v){
}
/*
-** Return the number of bytes in the sqlite3_value object assuming
-** that it uses the encoding "enc"
+** The sqlite3ValueBytes() routine returns the number of bytes in the
+** sqlite3_value object assuming that it uses the encoding "enc".
+** The valueBytes() routine is a helper function.
*/
+static SQLITE_NOINLINE int valueBytes(sqlite3_value *pVal, u8 enc){
+ return valueToText(pVal, enc)!=0 ? pVal->n : 0;
+}
SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
Mem *p = (Mem*)pVal;
- if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){
+ assert( (p->flags & MEM_Null)==0 || (p->flags & (MEM_Str|MEM_Blob))==0 );
+ if( (p->flags & MEM_Str)!=0 && pVal->enc==enc ){
+ return p->n;
+ }
+ if( (p->flags & MEM_Blob)!=0 ){
if( p->flags & MEM_Zero ){
return p->n + p->u.nZero;
}else{
return p->n;
}
}
- return 0;
+ if( p->flags & MEM_Null ) return 0;
+ return valueBytes(pVal, enc);
}
/************** End of vdbemem.c *********************************************/
@@ -64796,6 +66694,8 @@ SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
** This file contains code used for creating, destroying, and populating
** a VDBE (or an "sqlite3_stmt" as it is known to the outside world.)
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
/*
** Create a new virtual database engine.
@@ -64821,6 +66721,17 @@ SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(Parse *pParse){
}
/*
+** Change the error string stored in Vdbe.zErrMsg
+*/
+SQLITE_PRIVATE void sqlite3VdbeError(Vdbe *p, const char *zFormat, ...){
+ va_list ap;
+ sqlite3DbFree(p->db, p->zErrMsg);
+ va_start(ap, zFormat);
+ p->zErrMsg = sqlite3VMPrintf(p->db, zFormat, ap);
+ va_end(ap);
+}
+
+/*
** Remember the SQL string for a prepared statement.
*/
SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepareV2){
@@ -64839,7 +66750,7 @@ SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepa
*/
SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
Vdbe *p = (Vdbe *)pStmt;
- return (p && p->isPrepareV2) ? p->zSql : 0;
+ return p ? p->zSql : 0;
}
/*
@@ -64986,6 +66897,44 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){
return sqlite3VdbeAddOp3(p, op, p1, p2, 0);
}
+/* Generate code for an unconditional jump to instruction iDest
+*/
+SQLITE_PRIVATE int sqlite3VdbeGoto(Vdbe *p, int iDest){
+ return sqlite3VdbeAddOp3(p, OP_Goto, 0, iDest, 0);
+}
+
+/* Generate code to cause the string zStr to be loaded into
+** register iDest
+*/
+SQLITE_PRIVATE int sqlite3VdbeLoadString(Vdbe *p, int iDest, const char *zStr){
+ return sqlite3VdbeAddOp4(p, OP_String8, 0, iDest, 0, zStr, 0);
+}
+
+/*
+** Generate code that initializes multiple registers to string or integer
+** constants. The registers begin with iDest and increase consecutively.
+** One register is initialized for each characgter in zTypes[]. For each
+** "s" character in zTypes[], the register is a string if the argument is
+** not NULL, or OP_Null if the value is a null pointer. For each "i" character
+** in zTypes[], the register is initialized to an integer.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe *p, int iDest, const char *zTypes, ...){
+ va_list ap;
+ int i;
+ char c;
+ va_start(ap, zTypes);
+ for(i=0; (c = zTypes[i])!=0; i++){
+ if( c=='s' ){
+ const char *z = va_arg(ap, const char*);
+ int addr = sqlite3VdbeAddOp2(p, z==0 ? OP_Null : OP_String8, 0, iDest++);
+ if( z ) sqlite3VdbeChangeP4(p, addr, z, 0);
+ }else{
+ assert( c=='i' );
+ sqlite3VdbeAddOp2(p, OP_Integer, va_arg(ap, int), iDest++);
+ }
+ }
+ va_end(ap);
+}
/*
** Add an opcode that includes the p4 value as a pointer.
@@ -65005,6 +66954,24 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp4(
}
/*
+** Add an opcode that includes the p4 value with a P4_INT64 or
+** P4_REAL type.
+*/
+SQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(
+ Vdbe *p, /* Add the opcode to this VM */
+ int op, /* The new opcode */
+ int p1, /* The P1 operand */
+ int p2, /* The P2 operand */
+ int p3, /* The P3 operand */
+ const u8 *zP4, /* The P4 operand */
+ int p4type /* P4 operand type */
+){
+ char *p4copy = sqlite3DbMallocRaw(sqlite3VdbeDb(p), 8);
+ if( p4copy ) memcpy(p4copy, zP4, 8);
+ return sqlite3VdbeAddOp4(p, op, p1, p2, p3, p4copy, p4type);
+}
+
+/*
** Add an OP_ParseSchema opcode. This routine is broken out from
** sqlite3VdbeAddOp4() since it needs to also needs to mark all btrees
** as having been used.
@@ -65073,7 +67040,8 @@ SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe *v, int x){
int j = -1-x;
assert( v->magic==VDBE_MAGIC_INIT );
assert( j<p->nLabel );
- if( ALWAYS(j>=0) && p->aLabel ){
+ assert( j>=0 );
+ if( p->aLabel ){
p->aLabel[j] = v->nOp;
}
p->iFixedOp = v->nOp - 1;
@@ -65168,6 +67136,7 @@ static Op *opIterNext(VdbeOpIter *p){
** * OP_VUpdate
** * OP_VRename
** * OP_FkCounter with P2==0 (immediate foreign key constraint)
+** * OP_CreateTable and OP_InitCoroutine (for CREATE TABLE AS SELECT ...)
**
** Then check that the value of Parse.mayAbort is true if an
** ABORT may be thrown, or false otherwise. Return true if it does
@@ -65179,6 +67148,8 @@ static Op *opIterNext(VdbeOpIter *p){
SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
int hasAbort = 0;
int hasFkCounter = 0;
+ int hasCreateTable = 0;
+ int hasInitCoroutine = 0;
Op *pOp;
VdbeOpIter sIter;
memset(&sIter, 0, sizeof(sIter));
@@ -65193,6 +67164,8 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
hasAbort = 1;
break;
}
+ if( opcode==OP_CreateTable ) hasCreateTable = 1;
+ if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;
#ifndef SQLITE_OMIT_FOREIGN_KEY
if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
hasFkCounter = 1;
@@ -65206,22 +67179,27 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
** through all opcodes and hasAbort may be set incorrectly. Return
** true for this case to prevent the assert() in the callers frame
** from failing. */
- return ( v->db->mallocFailed || hasAbort==mayAbort || hasFkCounter );
+ return ( v->db->mallocFailed || hasAbort==mayAbort || hasFkCounter
+ || (hasCreateTable && hasInitCoroutine) );
}
#endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
/*
-** Loop through the program looking for P2 values that are negative
-** on jump instructions. Each such value is a label. Resolve the
-** label by setting the P2 value to its correct non-zero value.
+** This routine is called after all opcodes have been inserted. It loops
+** through all the opcodes and fixes up some details.
**
-** This routine is called once after all opcodes have been inserted.
+** (1) For each jump instruction with a negative P2 value (a label)
+** resolve the P2 value to an actual address.
**
-** Variable *pMaxFuncArgs is set to the maximum value of any P2 argument
-** to an OP_Function, OP_AggStep or OP_VFilter opcode. This is used by
-** sqlite3VdbeMakeReady() to size the Vdbe.apArg[] array.
+** (2) Compute the maximum number of arguments used by any SQL function
+** and store that value in *pMaxFuncArgs.
**
-** The Op.opflags field is set on all opcodes.
+** (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately
+** indicate what the prepared statement actually does.
+**
+** (4) Initialize the p4.xAdvance pointer on opcodes that use it.
+**
+** (5) Reclaim the memory allocated for storing labels.
*/
static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
int i;
@@ -65237,11 +67215,6 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
/* NOTE: Be sure to update mkopcodeh.awk when adding or removing
** cases from this switch! */
switch( opcode ){
- case OP_Function:
- case OP_AggStep: {
- if( pOp->p5>nMaxArgs ) nMaxArgs = pOp->p5;
- break;
- }
case OP_Transaction: {
if( pOp->p2!=0 ) p->readOnly = 0;
/* fall thru */
@@ -65339,46 +67312,44 @@ SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe *p, int *pnOp, int *pnMaxArg)
** address of the first operation added.
*/
SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp, int iLineno){
- int addr;
+ int addr, i;
+ VdbeOp *pOut;
+ assert( nOp>0 );
assert( p->magic==VDBE_MAGIC_INIT );
if( p->nOp + nOp > p->pParse->nOpAlloc && growOpArray(p, nOp) ){
return 0;
}
addr = p->nOp;
- if( ALWAYS(nOp>0) ){
- int i;
- VdbeOpList const *pIn = aOp;
- for(i=0; i<nOp; i++, pIn++){
- int p2 = pIn->p2;
- VdbeOp *pOut = &p->aOp[i+addr];
- pOut->opcode = pIn->opcode;
- pOut->p1 = pIn->p1;
- if( p2<0 ){
- assert( sqlite3OpcodeProperty[pOut->opcode] & OPFLG_JUMP );
- pOut->p2 = addr + ADDR(p2);
- }else{
- pOut->p2 = p2;
- }
- pOut->p3 = pIn->p3;
- pOut->p4type = P4_NOTUSED;
- pOut->p4.p = 0;
- pOut->p5 = 0;
+ pOut = &p->aOp[addr];
+ for(i=0; i<nOp; i++, aOp++, pOut++){
+ int p2 = aOp->p2;
+ pOut->opcode = aOp->opcode;
+ pOut->p1 = aOp->p1;
+ if( p2<0 ){
+ assert( sqlite3OpcodeProperty[pOut->opcode] & OPFLG_JUMP );
+ pOut->p2 = addr + ADDR(p2);
+ }else{
+ pOut->p2 = p2;
+ }
+ pOut->p3 = aOp->p3;
+ pOut->p4type = P4_NOTUSED;
+ pOut->p4.p = 0;
+ pOut->p5 = 0;
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
- pOut->zComment = 0;
+ pOut->zComment = 0;
#endif
#ifdef SQLITE_VDBE_COVERAGE
- pOut->iSrcLine = iLineno+i;
+ pOut->iSrcLine = iLineno+i;
#else
- (void)iLineno;
+ (void)iLineno;
#endif
#ifdef SQLITE_DEBUG
- if( p->db->flags & SQLITE_VdbeAddopTrace ){
- sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]);
- }
-#endif
+ if( p->db->flags & SQLITE_VdbeAddopTrace ){
+ sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]);
}
- p->nOp += nOp;
+#endif
}
+ p->nOp += nOp;
return addr;
}
@@ -65411,49 +67382,23 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus(
/*
-** Change the value of the P1 operand for a specific instruction.
-** This routine is useful when a large program is loaded from a
-** static array using sqlite3VdbeAddOpList but we want to make a
-** few minor changes to the program.
+** Change the value of the opcode, or P1, P2, P3, or P5 operands
+** for a specific instruction.
*/
+SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe *p, u32 addr, u8 iNewOpcode){
+ sqlite3VdbeGetOp(p,addr)->opcode = iNewOpcode;
+}
SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe *p, u32 addr, int val){
- assert( p!=0 );
- if( ((u32)p->nOp)>addr ){
- p->aOp[addr].p1 = val;
- }
+ sqlite3VdbeGetOp(p,addr)->p1 = val;
}
-
-/*
-** Change the value of the P2 operand for a specific instruction.
-** This routine is useful for setting a jump destination.
-*/
SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, u32 addr, int val){
- assert( p!=0 );
- if( ((u32)p->nOp)>addr ){
- p->aOp[addr].p2 = val;
- }
+ sqlite3VdbeGetOp(p,addr)->p2 = val;
}
-
-/*
-** Change the value of the P3 operand for a specific instruction.
-*/
SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe *p, u32 addr, int val){
- assert( p!=0 );
- if( ((u32)p->nOp)>addr ){
- p->aOp[addr].p3 = val;
- }
+ sqlite3VdbeGetOp(p,addr)->p3 = val;
}
-
-/*
-** Change the value of the P5 operand for the most recently
-** added operation.
-*/
-SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 val){
- assert( p!=0 );
- if( p->aOp ){
- assert( p->nOp>0 );
- p->aOp[p->nOp-1].p5 = val;
- }
+SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 p5){
+ sqlite3VdbeGetOp(p,-1)->p5 = p5;
}
/*
@@ -65461,8 +67406,8 @@ SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 val){
** the address of the next instruction to be coded.
*/
SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){
- sqlite3VdbeChangeP2(p, addr, p->nOp);
p->pParse->iFixedOp = p->nOp - 1;
+ sqlite3VdbeChangeP2(p, addr, p->nOp);
}
@@ -65485,6 +67430,10 @@ static void freeP4(sqlite3 *db, int p4type, void *p4){
if( p4 ){
assert( db );
switch( p4type ){
+ case P4_FUNCCTX: {
+ freeEphemeralFunction(db, ((sqlite3_context*)p4)->pFunc);
+ /* Fall through into the next case */
+ }
case P4_REAL:
case P4_INT64:
case P4_DYNAMIC:
@@ -65843,8 +67792,9 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
zColl = "B";
n = 1;
}
- if( i+n>nTemp-6 ){
+ if( i+n>nTemp-7 ){
memcpy(&zTemp[i],",...",4);
+ i += 4;
break;
}
zTemp[i++] = ',';
@@ -65869,6 +67819,13 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
break;
}
+#ifdef SQLITE_DEBUG
+ case P4_FUNCCTX: {
+ FuncDef *pDef = pOp->p4.pCtx->pFunc;
+ sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
+ break;
+ }
+#endif
case P4_INT64: {
sqlite3_snprintf(nTemp, zTemp, "%lld", *pOp->p4.pI64);
break;
@@ -65989,12 +67946,11 @@ SQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe *p){
/*
** Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter().
*/
-SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe *p){
+static SQLITE_NOINLINE void vdbeLeave(Vdbe *p){
int i;
sqlite3 *db;
Db *aDb;
int nDb;
- if( DbMaskAllZero(p->lockMask) ) return; /* The common case */
db = p->db;
aDb = db->aDb;
nDb = db->nDb;
@@ -66004,6 +67960,10 @@ SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe *p){
}
}
}
+SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe *p){
+ if( DbMaskAllZero(p->lockMask) ) return; /* The common case */
+ vdbeLeave(p);
+}
#endif
#if defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
@@ -66176,7 +68136,7 @@ SQLITE_PRIVATE int sqlite3VdbeList(
}else if( db->u1.isInterrupted ){
p->rc = SQLITE_INTERRUPT;
rc = SQLITE_ERROR;
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(p->rc));
+ sqlite3VdbeError(p, sqlite3ErrStr(p->rc));
}else{
char *zP4;
Op *pOp;
@@ -67079,7 +69039,7 @@ SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *p, int deferred){
){
p->rc = SQLITE_CONSTRAINT_FOREIGNKEY;
p->errorAction = OE_Abort;
- sqlite3SetString(&p->zErrMsg, db, "FOREIGN KEY constraint failed");
+ sqlite3VdbeError(p, "FOREIGN KEY constraint failed");
return SQLITE_ERROR;
}
return SQLITE_OK;
@@ -67701,14 +69661,20 @@ SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
}
/*
+** The sizes for serial types less than 12
+*/
+static const u8 sqlite3SmallTypeSizes[] = {
+ 0, 1, 2, 3, 4, 6, 8, 8, 0, 0, 0, 0
+};
+
+/*
** Return the length of the data corresponding to the supplied serial-type.
*/
SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){
if( serial_type>=12 ){
return (serial_type-12)/2;
}else{
- static const u8 aSize[] = { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0, 0, 0 };
- return aSize[serial_type];
+ return sqlite3SmallTypeSizes[serial_type];
}
}
@@ -67792,7 +69758,7 @@ SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, Mem *pMem, u32 serial_type){
}else{
v = pMem->u.i;
}
- len = i = sqlite3VdbeSerialTypeLen(serial_type);
+ len = i = sqlite3SmallTypeSizes[serial_type];
assert( i>0 );
do{
buf[--i] = (u8)(v&0xFF);
@@ -68077,6 +70043,7 @@ static int vdbeRecordCompareDebug(
/* mem1.u.i = 0; // not needed, here to silence compiler warning */
idx1 = getVarint32(aKey1, szHdr1);
+ if( szHdr1>98307 ) return SQLITE_CORRUPT;
d1 = szHdr1;
assert( pKeyInfo->nField+pKeyInfo->nXField>=pPKey2->nField || CORRUPT_DB );
assert( pKeyInfo->aSortOrder!=0 );
@@ -68422,7 +70389,7 @@ SQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip(
if( pRhs->flags & MEM_Int ){
serial_type = aKey1[idx1];
testcase( serial_type==12 );
- if( serial_type>=12 ){
+ if( serial_type>=10 ){
rc = +1;
}else if( serial_type==0 ){
rc = -1;
@@ -68448,7 +70415,11 @@ SQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip(
/* RHS is real */
else if( pRhs->flags & MEM_Real ){
serial_type = aKey1[idx1];
- if( serial_type>=12 ){
+ if( serial_type>=10 ){
+ /* Serial types 12 or greater are strings and blobs (greater than
+ ** numbers). Types 10 and 11 are currently "reserved for future
+ ** use", so it doesn't really matter what the results of comparing
+ ** them to numberic values are. */
rc = +1;
}else if( serial_type==0 ){
rc = -1;
@@ -68817,7 +70788,7 @@ SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
if( unlikely(typeRowid<1 || typeRowid>9 || typeRowid==7) ){
goto idx_rowid_corruption;
}
- lenRowid = sqlite3VdbeSerialTypeLen(typeRowid);
+ lenRowid = sqlite3SmallTypeSizes[typeRowid];
testcase( (u32)m.n==szHdr+lenRowid );
if( unlikely((u32)m.n<szHdr+lenRowid) ){
goto idx_rowid_corruption;
@@ -68990,6 +70961,8 @@ SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
** This file contains code use to implement APIs that are part of the
** VDBE.
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
#ifndef SQLITE_OMIT_DEPRECATED
/*
@@ -69028,6 +71001,31 @@ static int vdbeSafetyNotNull(Vdbe *p){
}
}
+#ifndef SQLITE_OMIT_TRACE
+/*
+** Invoke the profile callback. This routine is only called if we already
+** know that the profile callback is defined and needs to be invoked.
+*/
+static SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){
+ sqlite3_int64 iNow;
+ assert( p->startTime>0 );
+ assert( db->xProfile!=0 );
+ assert( db->init.busy==0 );
+ assert( p->zSql!=0 );
+ sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
+ db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000);
+ p->startTime = 0;
+}
+/*
+** The checkProfileCallback(DB,P) macro checks to see if a profile callback
+** is needed, and it invokes the callback if it is needed.
+*/
+# define checkProfileCallback(DB,P) \
+ if( ((P)->startTime)>0 ){ invokeProfileCallback(DB,P); }
+#else
+# define checkProfileCallback(DB,P) /*no-op*/
+#endif
+
/*
** The following routine destroys a virtual machine that is created by
** the sqlite3_compile() routine. The integer returned is an SQLITE_
@@ -69048,6 +71046,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt){
sqlite3 *db = v->db;
if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
sqlite3_mutex_enter(db->mutex);
+ checkProfileCallback(db, v);
rc = sqlite3VdbeFinalize(v);
rc = sqlite3ApiExit(db, rc);
sqlite3LeaveMutexAndCloseZombie(db);
@@ -69069,12 +71068,14 @@ SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt){
rc = SQLITE_OK;
}else{
Vdbe *v = (Vdbe*)pStmt;
- sqlite3_mutex_enter(v->db->mutex);
+ sqlite3 *db = v->db;
+ sqlite3_mutex_enter(db->mutex);
+ checkProfileCallback(db, v);
rc = sqlite3VdbeReset(v);
sqlite3VdbeRewind(v);
- assert( (rc & (v->db->errMask))==rc );
- rc = sqlite3ApiExit(v->db, rc);
- sqlite3_mutex_leave(v->db->mutex);
+ assert( (rc & (db->errMask))==rc );
+ rc = sqlite3ApiExit(db, rc);
+ sqlite3_mutex_leave(db->mutex);
}
return rc;
}
@@ -69109,7 +71110,10 @@ SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt *pStmt){
SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
Mem *p = (Mem*)pVal;
if( p->flags & (MEM_Blob|MEM_Str) ){
- sqlite3VdbeMemExpandBlob(p);
+ if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){
+ assert( p->flags==MEM_Null && p->z==0 );
+ return 0;
+ }
p->flags |= MEM_Blob;
return p->n ? p->z : 0;
}else{
@@ -69131,6 +71135,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){
SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){
return sqlite3VdbeIntValue((Mem*)pVal);
}
+SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value *pVal){
+ return ((Mem*)pVal)->eSubtype;
+}
SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){
return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
}
@@ -69187,6 +71194,36 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){
return aType[pVal->flags&MEM_AffMask];
}
+/* Make a copy of an sqlite3_value object
+*/
+SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value *pOrig){
+ sqlite3_value *pNew;
+ if( pOrig==0 ) return 0;
+ pNew = sqlite3_malloc( sizeof(*pNew) );
+ if( pNew==0 ) return 0;
+ memset(pNew, 0, sizeof(*pNew));
+ memcpy(pNew, pOrig, MEMCELLSIZE);
+ pNew->flags &= ~MEM_Dyn;
+ pNew->db = 0;
+ if( pNew->flags&(MEM_Str|MEM_Blob) ){
+ pNew->flags &= ~(MEM_Static|MEM_Dyn);
+ pNew->flags |= MEM_Ephem;
+ if( sqlite3VdbeMemMakeWriteable(pNew)!=SQLITE_OK ){
+ sqlite3ValueFree(pNew);
+ pNew = 0;
+ }
+ }
+ return pNew;
+}
+
+/* Destroy an sqlite3_value object previously obtained from
+** sqlite3_value_dup().
+*/
+SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value *pOld){
+ sqlite3ValueFree(pOld);
+}
+
+
/**************************** sqlite3_result_ *******************************
** The following routines are used by user-defined functions to specify
** the function result.
@@ -69279,6 +71316,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context *pCtx){
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetNull(pCtx->pOut);
}
+SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context *pCtx, unsigned int eSubtype){
+ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
+ pCtx->pOut->eSubtype = eSubtype & 0xff;
+}
SQLITE_API void SQLITE_STDCALL sqlite3_result_text(
sqlite3_context *pCtx,
const char *z,
@@ -69341,6 +71382,15 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context *pCtx, in
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n);
}
+SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
+ Mem *pOut = pCtx->pOut;
+ assert( sqlite3_mutex_held(pOut->db->mutex) );
+ if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){
+ return SQLITE_TOOBIG;
+ }
+ sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n);
+ return SQLITE_OK;
+}
SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
pCtx->isError = errCode;
pCtx->fErrorOrAux = 1;
@@ -69395,6 +71445,7 @@ static int doWalCallbacks(sqlite3 *db){
return rc;
}
+
/*
** Execute the statement pStmt, either until a row of data is ready, the
** statement is completely executed or an error occurs.
@@ -69463,8 +71514,10 @@ static int sqlite3Step(Vdbe *p){
);
#ifndef SQLITE_OMIT_TRACE
- if( db->xProfile && !db->init.busy ){
+ if( db->xProfile && !db->init.busy && p->zSql ){
sqlite3OsCurrentTimeInt64(db->pVfs, &p->startTime);
+ }else{
+ assert( p->startTime==0 );
}
#endif
@@ -69488,13 +71541,8 @@ static int sqlite3Step(Vdbe *p){
}
#ifndef SQLITE_OMIT_TRACE
- /* Invoke the profile callback if there is one
- */
- if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){
- sqlite3_int64 iNow;
- sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
- db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000);
- }
+ /* If the statement completed successfully, invoke the profile callback */
+ if( rc!=SQLITE_ROW ) checkProfileCallback(db, p);
#endif
if( rc==SQLITE_DONE ){
@@ -69518,7 +71566,7 @@ end_of_step:
** were called on statement p.
*/
assert( rc==SQLITE_ROW || rc==SQLITE_DONE || rc==SQLITE_ERROR
- || rc==SQLITE_BUSY || rc==SQLITE_MISUSE
+ || (rc&0xff)==SQLITE_BUSY || rc==SQLITE_MISUSE
);
assert( (p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE) || p->rc==p->rcApp );
if( p->isPrepareV2 && rc!=SQLITE_ROW && rc!=SQLITE_DONE ){
@@ -69603,7 +71651,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context *p){
** application defined function.
*/
SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context *p){
- assert( p && p->pFunc );
+ assert( p && p->pOut );
return p->pOut->db;
}
@@ -69812,18 +71860,19 @@ static const Mem *columnNullValue(void){
#endif
= {
/* .u = */ {0},
- /* .flags = */ MEM_Null,
- /* .enc = */ 0,
- /* .n = */ 0,
- /* .z = */ 0,
- /* .zMalloc = */ 0,
- /* .szMalloc = */ 0,
- /* .iPadding1 = */ 0,
- /* .db = */ 0,
- /* .xDel = */ 0,
+ /* .flags = */ (u16)MEM_Null,
+ /* .enc = */ (u8)0,
+ /* .eSubtype = */ (u8)0,
+ /* .n = */ (int)0,
+ /* .z = */ (char*)0,
+ /* .zMalloc = */ (char*)0,
+ /* .szMalloc = */ (int)0,
+ /* .uTemp = */ (u32)0,
+ /* .db = */ (sqlite3*)0,
+ /* .xDel = */ (void(*)(void*))0,
#ifdef SQLITE_DEBUG
- /* .pScopyFrom = */ 0,
- /* .pFiller = */ 0,
+ /* .pScopyFrom = */ (Mem*)0,
+ /* .pFiller = */ (void*)0,
#endif
};
return &nullMem;
@@ -70322,6 +72371,20 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i,
}
return rc;
}
+SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){
+ int rc;
+ Vdbe *p = (Vdbe *)pStmt;
+ sqlite3_mutex_enter(p->db->mutex);
+ if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){
+ rc = SQLITE_TOOBIG;
+ }else{
+ assert( (n & 0x7FFFFFFF)==n );
+ rc = sqlite3_bind_zeroblob(pStmt, i, n);
+ }
+ rc = sqlite3ApiExit(p->db, rc);
+ sqlite3_mutex_leave(p->db->mutex);
+ return rc;
+}
/*
** Return the number of wildcards that can be potentially bound to.
@@ -70571,6 +72634,8 @@ SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt *pStmt
**
** The Vdbe parse-tree explainer is also found here.
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
#ifndef SQLITE_OMIT_TRACE
@@ -70763,6 +72828,8 @@ SQLITE_PRIVATE char *sqlite3VdbeExpandSql(
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
/*
** Invoke this macro on memory cells just prior to changing the
@@ -71013,7 +73080,7 @@ static void applyNumericAffinity(Mem *pRec, int bTryForInt){
** SQLITE_AFF_TEXT:
** Convert pRec to a text representation.
**
-** SQLITE_AFF_NONE:
+** SQLITE_AFF_BLOB:
** No-op. pRec is unchanged.
*/
static void applyAffinity(
@@ -71403,7 +73470,7 @@ SQLITE_PRIVATE int sqlite3VdbeExec(
** sqlite3_column_text16() failed. */
goto no_mem;
}
- assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY );
+ assert( p->rc==SQLITE_OK || (p->rc&0xff)==SQLITE_BUSY );
assert( p->bIsReader || p->readOnly!=0 );
p->rc = SQLITE_OK;
p->iCurrentTime = 0;
@@ -71414,13 +73481,9 @@ SQLITE_PRIVATE int sqlite3VdbeExec(
sqlite3VdbeIOTraceSql(p);
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
if( db->xProgress ){
+ u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
assert( 0 < db->nProgressOps );
- nProgressLimit = (unsigned)p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
- if( nProgressLimit==0 ){
- nProgressLimit = db->nProgressOps;
- }else{
- nProgressLimit %= (unsigned)db->nProgressOps;
- }
+ nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps);
}
#endif
#ifdef SQLITE_DEBUG
@@ -71800,12 +73863,11 @@ case OP_Halt: {
assert( zType!=0 || pOp->p4.z!=0 );
zLogFmt = "abort at %d in [%s]: %s";
if( zType && pOp->p4.z ){
- sqlite3SetString(&p->zErrMsg, db, "%s constraint failed: %s",
- zType, pOp->p4.z);
+ sqlite3VdbeError(p, "%s constraint failed: %s", zType, pOp->p4.z);
}else if( pOp->p4.z ){
- sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
+ sqlite3VdbeError(p, "%s", pOp->p4.z);
}else{
- sqlite3SetString(&p->zErrMsg, db, "%s constraint failed", zType);
+ sqlite3VdbeError(p, "%s constraint failed", zType);
}
sqlite3_log(pOp->p1, zLogFmt, pcx, p->zSql, p->zErrMsg);
}
@@ -72383,10 +74445,10 @@ case OP_CollSeq: {
break;
}
-/* Opcode: Function P1 P2 P3 P4 P5
+/* Opcode: Function0 P1 P2 P3 P4 P5
** Synopsis: r[P3]=func(r[P2@P5])
**
-** Invoke a user function (P4 is a pointer to a Function structure that
+** Invoke a user function (P4 is a pointer to a FuncDef object that
** defines the function) with P5 arguments taken from register P2 and
** successors. The result of the function is stored in register P3.
** Register P3 must not be one of the function inputs.
@@ -72398,59 +74460,100 @@ case OP_CollSeq: {
** sqlite3_set_auxdata() API may be safely retained until the next
** invocation of this opcode.
**
-** See also: AggStep and AggFinal
+** See also: Function, AggStep, AggFinal
*/
-case OP_Function: {
- int i;
- Mem *pArg;
- sqlite3_context ctx;
- sqlite3_value **apVal;
+/* Opcode: Function P1 P2 P3 P4 P5
+** Synopsis: r[P3]=func(r[P2@P5])
+**
+** Invoke a user function (P4 is a pointer to an sqlite3_context object that
+** contains a pointer to the function to be run) with P5 arguments taken
+** from register P2 and successors. The result of the function is stored
+** in register P3. Register P3 must not be one of the function inputs.
+**
+** P1 is a 32-bit bitmask indicating whether or not each argument to the
+** function was determined to be constant at compile time. If the first
+** argument was constant then bit 0 of P1 is set. This is used to determine
+** whether meta data associated with a user function argument using the
+** sqlite3_set_auxdata() API may be safely retained until the next
+** invocation of this opcode.
+**
+** SQL functions are initially coded as OP_Function0 with P4 pointing
+** to a FuncDef object. But on first evaluation, the P4 operand is
+** automatically converted into an sqlite3_context object and the operation
+** changed to this OP_Function opcode. In this way, the initialization of
+** the sqlite3_context object occurs only once, rather than once for each
+** evaluation of the function.
+**
+** See also: Function0, AggStep, AggFinal
+*/
+case OP_Function0: {
int n;
+ sqlite3_context *pCtx;
+ assert( pOp->p4type==P4_FUNCDEF );
n = pOp->p5;
- apVal = p->apArg;
- assert( apVal || n==0 );
assert( pOp->p3>0 && pOp->p3<=(p->nMem-p->nCursor) );
- ctx.pOut = &aMem[pOp->p3];
- memAboutToChange(p, ctx.pOut);
-
assert( n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem-p->nCursor)+1) );
assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n );
- pArg = &aMem[pOp->p2];
- for(i=0; i<n; i++, pArg++){
- assert( memIsValid(pArg) );
- apVal[i] = pArg;
- Deephemeralize(pArg);
- REGISTER_TRACE(pOp->p2+i, pArg);
+ pCtx = sqlite3DbMallocRaw(db, sizeof(*pCtx) + (n-1)*sizeof(sqlite3_value*));
+ if( pCtx==0 ) goto no_mem;
+ pCtx->pOut = 0;
+ pCtx->pFunc = pOp->p4.pFunc;
+ pCtx->iOp = (int)(pOp - aOp);
+ pCtx->pVdbe = p;
+ pCtx->argc = n;
+ pOp->p4type = P4_FUNCCTX;
+ pOp->p4.pCtx = pCtx;
+ pOp->opcode = OP_Function;
+ /* Fall through into OP_Function */
+}
+case OP_Function: {
+ int i;
+ sqlite3_context *pCtx;
+
+ assert( pOp->p4type==P4_FUNCCTX );
+ pCtx = pOp->p4.pCtx;
+
+ /* If this function is inside of a trigger, the register array in aMem[]
+ ** might change from one evaluation to the next. The next block of code
+ ** checks to see if the register array has changed, and if so it
+ ** reinitializes the relavant parts of the sqlite3_context object */
+ pOut = &aMem[pOp->p3];
+ if( pCtx->pOut != pOut ){
+ pCtx->pOut = pOut;
+ for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];
}
- assert( pOp->p4type==P4_FUNCDEF );
- ctx.pFunc = pOp->p4.pFunc;
- ctx.iOp = (int)(pOp - aOp);
- ctx.pVdbe = p;
- MemSetTypeFlag(ctx.pOut, MEM_Null);
- ctx.fErrorOrAux = 0;
+ memAboutToChange(p, pCtx->pOut);
+#ifdef SQLITE_DEBUG
+ for(i=0; i<pCtx->argc; i++){
+ assert( memIsValid(pCtx->argv[i]) );
+ REGISTER_TRACE(pOp->p2+i, pCtx->argv[i]);
+ }
+#endif
+ MemSetTypeFlag(pCtx->pOut, MEM_Null);
+ pCtx->fErrorOrAux = 0;
db->lastRowid = lastRowid;
- (*ctx.pFunc->xFunc)(&ctx, n, apVal); /* IMP: R-24505-23230 */
+ (*pCtx->pFunc->xFunc)(pCtx, pCtx->argc, pCtx->argv); /* IMP: R-24505-23230 */
lastRowid = db->lastRowid; /* Remember rowid changes made by xFunc */
/* If the function returned an error, throw an exception */
- if( ctx.fErrorOrAux ){
- if( ctx.isError ){
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(ctx.pOut));
- rc = ctx.isError;
+ if( pCtx->fErrorOrAux ){
+ if( pCtx->isError ){
+ sqlite3VdbeError(p, "%s", sqlite3_value_text(pCtx->pOut));
+ rc = pCtx->isError;
}
- sqlite3VdbeDeleteAuxData(p, (int)(pOp - aOp), pOp->p1);
+ sqlite3VdbeDeleteAuxData(p, pCtx->iOp, pOp->p1);
}
/* Copy the result of the function into register P3 */
- sqlite3VdbeChangeEncoding(ctx.pOut, encoding);
- if( sqlite3VdbeMemTooBig(ctx.pOut) ){
- goto too_big;
+ if( pOut->flags & (MEM_Str|MEM_Blob) ){
+ sqlite3VdbeChangeEncoding(pCtx->pOut, encoding);
+ if( sqlite3VdbeMemTooBig(pCtx->pOut) ) goto too_big;
}
- REGISTER_TRACE(pOp->p3, ctx.pOut);
- UPDATE_MAX_BLOBSIZE(ctx.pOut);
+ REGISTER_TRACE(pOp->p3, pCtx->pOut);
+ UPDATE_MAX_BLOBSIZE(pCtx->pOut);
break;
}
@@ -72613,9 +74716,9 @@ case OP_RealAffinity: { /* in1 */
** A NULL value is not changed by this routine. It remains NULL.
*/
case OP_Cast: { /* in1 */
- assert( pOp->p2>=SQLITE_AFF_NONE && pOp->p2<=SQLITE_AFF_REAL );
+ assert( pOp->p2>=SQLITE_AFF_BLOB && pOp->p2<=SQLITE_AFF_REAL );
testcase( pOp->p2==SQLITE_AFF_TEXT );
- testcase( pOp->p2==SQLITE_AFF_NONE );
+ testcase( pOp->p2==SQLITE_AFF_BLOB );
testcase( pOp->p2==SQLITE_AFF_NUMERIC );
testcase( pOp->p2==SQLITE_AFF_INTEGER );
testcase( pOp->p2==SQLITE_AFF_REAL );
@@ -73426,7 +75529,7 @@ case OP_Affinity: {
** The mapping from character to affinity is given by the SQLITE_AFF_
** macros defined in sqliteInt.h.
**
-** If P4 is NULL then all index fields have the affinity NONE.
+** If P4 is NULL then all index fields have the affinity BLOB.
*/
case OP_MakeRecord: {
u8 *zNewRecord; /* A buffer to hold the data for the new record */
@@ -73498,7 +75601,7 @@ case OP_MakeRecord: {
len = sqlite3VdbeSerialTypeLen(serial_type);
if( pRec->flags & MEM_Zero ){
if( nData ){
- sqlite3VdbeMemExpandBlob(pRec);
+ if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
}else{
nZero += pRec->u.nZero;
len -= pRec->u.nZero;
@@ -73624,8 +75727,7 @@ case OP_Savepoint: {
/* A new savepoint cannot be created if there are active write
** statements (i.e. open read/write incremental blob handles).
*/
- sqlite3SetString(&p->zErrMsg, db, "cannot open savepoint - "
- "SQL statements in progress");
+ sqlite3VdbeError(p, "cannot open savepoint - SQL statements in progress");
rc = SQLITE_BUSY;
}else{
nName = sqlite3Strlen30(zName);
@@ -73676,15 +75778,14 @@ case OP_Savepoint: {
iSavepoint++;
}
if( !pSavepoint ){
- sqlite3SetString(&p->zErrMsg, db, "no such savepoint: %s", zName);
+ sqlite3VdbeError(p, "no such savepoint: %s", zName);
rc = SQLITE_ERROR;
}else if( db->nVdbeWrite>0 && p1==SAVEPOINT_RELEASE ){
/* It is not possible to release (commit) a savepoint if there are
** active write statements.
*/
- sqlite3SetString(&p->zErrMsg, db,
- "cannot release savepoint - SQL statements in progress"
- );
+ sqlite3VdbeError(p, "cannot release savepoint - "
+ "SQL statements in progress");
rc = SQLITE_BUSY;
}else{
@@ -73790,23 +75891,12 @@ case OP_AutoCommit: {
assert( db->nVdbeActive>0 ); /* At least this one VM is active */
assert( p->bIsReader );
-#if 0
- if( turnOnAC && iRollback && db->nVdbeActive>1 ){
- /* If this instruction implements a ROLLBACK and other VMs are
- ** still running, and a transaction is active, return an error indicating
- ** that the other VMs must complete first.
- */
- sqlite3SetString(&p->zErrMsg, db, "cannot rollback transaction - "
- "SQL statements in progress");
- rc = SQLITE_BUSY;
- }else
-#endif
if( turnOnAC && !iRollback && db->nVdbeWrite>0 ){
/* If this instruction implements a COMMIT and other VMs are writing
** return an error indicating that the other VMs must complete first.
*/
- sqlite3SetString(&p->zErrMsg, db, "cannot commit transaction - "
- "SQL statements in progress");
+ sqlite3VdbeError(p, "cannot commit transaction - "
+ "SQL statements in progress");
rc = SQLITE_BUSY;
}else if( desiredAutoCommit!=db->autoCommit ){
if( iRollback ){
@@ -73817,12 +75907,12 @@ case OP_AutoCommit: {
goto vdbe_return;
}else{
db->autoCommit = (u8)desiredAutoCommit;
- if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
- p->pc = (int)(pOp - aOp);
- db->autoCommit = (u8)(1-desiredAutoCommit);
- p->rc = rc = SQLITE_BUSY;
- goto vdbe_return;
- }
+ }
+ if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
+ p->pc = (int)(pOp - aOp);
+ db->autoCommit = (u8)(1-desiredAutoCommit);
+ p->rc = rc = SQLITE_BUSY;
+ goto vdbe_return;
}
assert( db->nStatement==0 );
sqlite3CloseSavepoints(db);
@@ -73833,7 +75923,7 @@ case OP_AutoCommit: {
}
goto vdbe_return;
}else{
- sqlite3SetString(&p->zErrMsg, db,
+ sqlite3VdbeError(p,
(!desiredAutoCommit)?"cannot start a transaction within a transaction":(
(iRollback)?"cannot rollback - no transaction is active":
"cannot commit - no transaction is active"));
@@ -73894,9 +75984,11 @@ case OP_Transaction: {
if( pBt ){
rc = sqlite3BtreeBeginTrans(pBt, pOp->p2);
- if( rc==SQLITE_BUSY ){
+ testcase( rc==SQLITE_BUSY_SNAPSHOT );
+ testcase( rc==SQLITE_BUSY_RECOVERY );
+ if( (rc&0xff)==SQLITE_BUSY ){
p->pc = (int)(pOp - aOp);
- p->rc = rc = SQLITE_BUSY;
+ p->rc = rc;
goto vdbe_return;
}
if( rc!=SQLITE_OK ){
@@ -74357,6 +76449,26 @@ case OP_Close: {
break;
}
+#ifdef SQLITE_ENABLE_COLUMN_USED_MASK
+/* Opcode: ColumnsUsed P1 * * P4 *
+**
+** This opcode (which only exists if SQLite was compiled with
+** SQLITE_ENABLE_COLUMN_USED_MASK) identifies which columns of the
+** table or index for cursor P1 are used. P4 is a 64-bit integer
+** (P4_INT64) in which the first 63 bits are one for each of the
+** first 63 columns of the table or index that are actually used
+** by the cursor. The high-order bit is set if any column after
+** the 64th is used.
+*/
+case OP_ColumnsUsed: {
+ VdbeCursor *pC;
+ pC = p->apCsr[pOp->p1];
+ assert( pC->pCursor );
+ pC->maskUsed = *(u64*)pOp->p4.pI64;
+ break;
+}
+#endif
+
/* Opcode: SeekGE P1 P2 P3 P4 *
** Synopsis: key=r[P3@P4]
**
@@ -74755,9 +76867,10 @@ case OP_Found: { /* jump, in3 */
**
** P1 is the index of a cursor open on an SQL table btree (with integer
** keys). P3 is an integer rowid. If P1 does not contain a record with
-** rowid P3 then jump immediately to P2. If P1 does contain a record
-** with rowid P3 then leave the cursor pointing at that record and fall
-** through to the next instruction.
+** rowid P3 then jump immediately to P2. Or, if P2 is 0, raise an
+** SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then
+** leave the cursor pointing at that record and fall through to the next
+** instruction.
**
** The OP_NotFound opcode performs the same operation on index btrees
** (with arbitrary multi-value keys).
@@ -74789,13 +76902,21 @@ case OP_NotExists: { /* jump, in3 */
res = 0;
iKey = pIn3->u.i;
rc = sqlite3BtreeMovetoUnpacked(pCrsr, 0, iKey, 0, &res);
+ assert( rc==SQLITE_OK || res==0 );
pC->movetoTarget = iKey; /* Used by OP_Delete */
pC->nullRow = 0;
pC->cacheStatus = CACHE_STALE;
pC->deferredMoveto = 0;
VdbeBranchTaken(res!=0,2);
pC->seekResult = res;
- if( res!=0 ) goto jump_to_p2;
+ if( res!=0 ){
+ assert( rc==SQLITE_OK );
+ if( pOp->p2==0 ){
+ rc = SQLITE_CORRUPT_BKPT;
+ }else{
+ goto jump_to_p2;
+ }
+ }
break;
}
@@ -74845,9 +76966,8 @@ case OP_NewRowid: { /* out2 */
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
pC = p->apCsr[pOp->p1];
assert( pC!=0 );
- if( NEVER(pC->pCursor==0) ){
- /* The zero initialization above is all that is needed */
- }else{
+ assert( pC->pCursor!=0 );
+ {
/* The next rowid or record number (different terms for the same
** thing) is obtained in a two-step algorithm.
**
@@ -75062,14 +77182,15 @@ case OP_InsertInt: {
break;
}
-/* Opcode: Delete P1 P2 * P4 *
+/* Opcode: Delete P1 P2 * P4 P5
**
** Delete the record at which the P1 cursor is currently pointing.
**
-** The cursor will be left pointing at either the next or the previous
-** record in the table. If it is left pointing at the next record, then
-** the next Next instruction will be a no-op. Hence it is OK to delete
-** a record from within a Next loop.
+** If the P5 parameter is non-zero, the cursor will be left pointing at
+** either the next or the previous record in the table. If it is left
+** pointing at the next record, then the next Next instruction will be a
+** no-op. As a result, in this case it is OK to delete a record from within a
+** Next loop. If P5 is zero, then the cursor is left in an undefined state.
**
** If the OPFLAG_NCHANGE flag of P2 is set, then the row change count is
** incremented (otherwise not).
@@ -75084,6 +77205,7 @@ case OP_InsertInt: {
*/
case OP_Delete: {
VdbeCursor *pC;
+ u8 hasUpdateCallback;
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
pC = p->apCsr[pOp->p1];
@@ -75091,22 +77213,27 @@ case OP_Delete: {
assert( pC->pCursor!=0 ); /* Only valid for real tables, no pseudotables */
assert( pC->deferredMoveto==0 );
+ hasUpdateCallback = db->xUpdateCallback && pOp->p4.z && pC->isTable;
+ if( pOp->p5 && hasUpdateCallback ){
+ sqlite3BtreeKeySize(pC->pCursor, &pC->movetoTarget);
+ }
+
#ifdef SQLITE_DEBUG
/* The seek operation that positioned the cursor prior to OP_Delete will
** have also set the pC->movetoTarget field to the rowid of the row that
** is being deleted */
- if( pOp->p4.z && pC->isTable ){
+ if( pOp->p4.z && pC->isTable && pOp->p5==0 ){
i64 iKey = 0;
sqlite3BtreeKeySize(pC->pCursor, &iKey);
assert( pC->movetoTarget==iKey );
}
#endif
- rc = sqlite3BtreeDelete(pC->pCursor);
+ rc = sqlite3BtreeDelete(pC->pCursor, pOp->p5);
pC->cacheStatus = CACHE_STALE;
/* Invoke the update-hook if required. */
- if( rc==SQLITE_OK && db->xUpdateCallback && pOp->p4.z && pC->isTable ){
+ if( rc==SQLITE_OK && hasUpdateCallback ){
db->xUpdateCallback(db->pUpdateArg, SQLITE_DELETE,
db->aDb[pC->iDb].zName, pOp->p4.z, pC->movetoTarget);
assert( pC->iDb>=0 );
@@ -75586,7 +77713,6 @@ next_tail:
case OP_SorterInsert: /* in2 */
case OP_IdxInsert: { /* in2 */
VdbeCursor *pC;
- BtCursor *pCrsr;
int nKey;
const char *zKey;
@@ -75596,18 +77722,17 @@ case OP_IdxInsert: { /* in2 */
assert( isSorter(pC)==(pOp->opcode==OP_SorterInsert) );
pIn2 = &aMem[pOp->p2];
assert( pIn2->flags & MEM_Blob );
- pCrsr = pC->pCursor;
if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;
- assert( pCrsr!=0 );
+ assert( pC->pCursor!=0 );
assert( pC->isTable==0 );
rc = ExpandBlob(pIn2);
if( rc==SQLITE_OK ){
- if( isSorter(pC) ){
+ if( pOp->opcode==OP_SorterInsert ){
rc = sqlite3VdbeSorterWrite(pC, pIn2);
}else{
nKey = pIn2->n;
zKey = pIn2->z;
- rc = sqlite3BtreeInsert(pCrsr, zKey, nKey, "", 0, 0, pOp->p3,
+ rc = sqlite3BtreeInsert(pC->pCursor, zKey, nKey, "", 0, 0, pOp->p3,
((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
);
assert( pC->deferredMoveto==0 );
@@ -75647,7 +77772,7 @@ case OP_IdxDelete: {
#endif
rc = sqlite3BtreeMovetoUnpacked(pCrsr, &r, 0, 0, &res);
if( rc==SQLITE_OK && res==0 ){
- rc = sqlite3BtreeDelete(pCrsr);
+ rc = sqlite3BtreeDelete(pCrsr, 0);
}
assert( pC->deferredMoveto==0 );
pC->cacheStatus = CACHE_STALE;
@@ -76266,7 +78391,7 @@ case OP_Program: { /* jump */
if( p->nFrame>=db->aLimit[SQLITE_LIMIT_TRIGGER_DEPTH] ){
rc = SQLITE_ERROR;
- sqlite3SetString(&p->zErrMsg, db, "too many levels of trigger recursion");
+ sqlite3VdbeError(p, "too many levels of trigger recursion");
break;
}
@@ -76445,12 +78570,12 @@ case OP_MemMax: { /* in2 */
}
#endif /* SQLITE_OMIT_AUTOINCREMENT */
-/* Opcode: IfPos P1 P2 * * *
-** Synopsis: if r[P1]>0 goto P2
+/* Opcode: IfPos P1 P2 P3 * *
+** Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2
**
** Register P1 must contain an integer.
-** If the value of register P1 is 1 or greater, jump to P2 and
-** add the literal value P3 to register P1.
+** If the value of register P1 is 1 or greater, subtract P3 from the
+** value in P1 and jump to P2.
**
** If the initial value of register P1 is less than 1, then the
** value is unchanged and control passes through to the next instruction.
@@ -76459,38 +78584,44 @@ case OP_IfPos: { /* jump, in1 */
pIn1 = &aMem[pOp->p1];
assert( pIn1->flags&MEM_Int );
VdbeBranchTaken( pIn1->u.i>0, 2);
- if( pIn1->u.i>0 ) goto jump_to_p2;
+ if( pIn1->u.i>0 ){
+ pIn1->u.i -= pOp->p3;
+ goto jump_to_p2;
+ }
break;
}
-/* Opcode: IfNeg P1 P2 P3 * *
-** Synopsis: r[P1]+=P3, if r[P1]<0 goto P2
+/* Opcode: SetIfNotPos P1 P2 P3 * *
+** Synopsis: if r[P1]<=0 then r[P2]=P3
**
-** Register P1 must contain an integer. Add literal P3 to the value in
-** register P1 then if the value of register P1 is less than zero, jump to P2.
+** Register P1 must contain an integer.
+** If the value of register P1 is not positive (if it is less than 1) then
+** set the value of register P2 to be the integer P3.
*/
-case OP_IfNeg: { /* jump, in1 */
+case OP_SetIfNotPos: { /* in1, in2 */
pIn1 = &aMem[pOp->p1];
assert( pIn1->flags&MEM_Int );
- pIn1->u.i += pOp->p3;
- VdbeBranchTaken(pIn1->u.i<0, 2);
- if( pIn1->u.i<0 ) goto jump_to_p2;
+ if( pIn1->u.i<=0 ){
+ pOut = out2Prerelease(p, pOp);
+ pOut->u.i = pOp->p3;
+ }
break;
}
/* Opcode: IfNotZero P1 P2 P3 * *
-** Synopsis: if r[P1]!=0 then r[P1]+=P3, goto P2
+** Synopsis: if r[P1]!=0 then r[P1]-=P3, goto P2
**
** Register P1 must contain an integer. If the content of register P1 is
-** initially nonzero, then add P3 to P1 and jump to P2. If register P1 is
-** initially zero, leave it unchanged and fall through.
+** initially nonzero, then subtract P3 from the value in register P1 and
+** jump to P2. If register P1 is initially zero, leave it unchanged
+** and fall through.
*/
case OP_IfNotZero: { /* jump, in1 */
pIn1 = &aMem[pOp->p1];
assert( pIn1->flags&MEM_Int );
VdbeBranchTaken(pIn1->u.i<0, 2);
if( pIn1->u.i ){
- pIn1->u.i += pOp->p3;
+ pIn1->u.i -= pOp->p3;
goto jump_to_p2;
}
break;
@@ -76527,57 +78658,101 @@ case OP_JumpZeroIncr: { /* jump, in1 */
break;
}
-/* Opcode: AggStep * P2 P3 P4 P5
+/* Opcode: AggStep0 * P2 P3 P4 P5
** Synopsis: accum=r[P3] step(r[P2@P5])
**
** Execute the step function for an aggregate. The
** function has P5 arguments. P4 is a pointer to the FuncDef
-** structure that specifies the function. Use register
-** P3 as the accumulator.
+** structure that specifies the function. Register P3 is the
+** accumulator.
**
** The P5 arguments are taken from register P2 and its
** successors.
*/
-case OP_AggStep: {
+/* Opcode: AggStep * P2 P3 P4 P5
+** Synopsis: accum=r[P3] step(r[P2@P5])
+**
+** Execute the step function for an aggregate. The
+** function has P5 arguments. P4 is a pointer to an sqlite3_context
+** object that is used to run the function. Register P3 is
+** as the accumulator.
+**
+** The P5 arguments are taken from register P2 and its
+** successors.
+**
+** This opcode is initially coded as OP_AggStep0. On first evaluation,
+** the FuncDef stored in P4 is converted into an sqlite3_context and
+** the opcode is changed. In this way, the initialization of the
+** sqlite3_context only happens once, instead of on each call to the
+** step function.
+*/
+case OP_AggStep0: {
int n;
+ sqlite3_context *pCtx;
+
+ assert( pOp->p4type==P4_FUNCDEF );
+ n = pOp->p5;
+ assert( pOp->p3>0 && pOp->p3<=(p->nMem-p->nCursor) );
+ assert( n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem-p->nCursor)+1) );
+ assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n );
+ pCtx = sqlite3DbMallocRaw(db, sizeof(*pCtx) + (n-1)*sizeof(sqlite3_value*));
+ if( pCtx==0 ) goto no_mem;
+ pCtx->pMem = 0;
+ pCtx->pFunc = pOp->p4.pFunc;
+ pCtx->iOp = (int)(pOp - aOp);
+ pCtx->pVdbe = p;
+ pCtx->argc = n;
+ pOp->p4type = P4_FUNCCTX;
+ pOp->p4.pCtx = pCtx;
+ pOp->opcode = OP_AggStep;
+ /* Fall through into OP_AggStep */
+}
+case OP_AggStep: {
int i;
+ sqlite3_context *pCtx;
Mem *pMem;
- Mem *pRec;
Mem t;
- sqlite3_context ctx;
- sqlite3_value **apVal;
- n = pOp->p5;
- assert( n>=0 );
- pRec = &aMem[pOp->p2];
- apVal = p->apArg;
- assert( apVal || n==0 );
- for(i=0; i<n; i++, pRec++){
- assert( memIsValid(pRec) );
- apVal[i] = pRec;
- memAboutToChange(p, pRec);
+ assert( pOp->p4type==P4_FUNCCTX );
+ pCtx = pOp->p4.pCtx;
+ pMem = &aMem[pOp->p3];
+
+ /* If this function is inside of a trigger, the register array in aMem[]
+ ** might change from one evaluation to the next. The next block of code
+ ** checks to see if the register array has changed, and if so it
+ ** reinitializes the relavant parts of the sqlite3_context object */
+ if( pCtx->pMem != pMem ){
+ pCtx->pMem = pMem;
+ for(i=pCtx->argc-1; i>=0; i--) pCtx->argv[i] = &aMem[pOp->p2+i];
}
- ctx.pFunc = pOp->p4.pFunc;
- assert( pOp->p3>0 && pOp->p3<=(p->nMem-p->nCursor) );
- ctx.pMem = pMem = &aMem[pOp->p3];
+
+#ifdef SQLITE_DEBUG
+ for(i=0; i<pCtx->argc; i++){
+ assert( memIsValid(pCtx->argv[i]) );
+ REGISTER_TRACE(pOp->p2+i, pCtx->argv[i]);
+ }
+#endif
+
pMem->n++;
sqlite3VdbeMemInit(&t, db, MEM_Null);
- ctx.pOut = &t;
- ctx.isError = 0;
- ctx.pVdbe = p;
- ctx.iOp = (int)(pOp - aOp);
- ctx.skipFlag = 0;
- (ctx.pFunc->xStep)(&ctx, n, apVal); /* IMP: R-24505-23230 */
- if( ctx.isError ){
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&t));
- rc = ctx.isError;
+ pCtx->pOut = &t;
+ pCtx->fErrorOrAux = 0;
+ pCtx->skipFlag = 0;
+ (pCtx->pFunc->xStep)(pCtx,pCtx->argc,pCtx->argv); /* IMP: R-24505-23230 */
+ if( pCtx->fErrorOrAux ){
+ if( pCtx->isError ){
+ sqlite3VdbeError(p, "%s", sqlite3_value_text(&t));
+ rc = pCtx->isError;
+ }
+ sqlite3VdbeMemRelease(&t);
+ }else{
+ assert( t.flags==MEM_Null );
}
- if( ctx.skipFlag ){
+ if( pCtx->skipFlag ){
assert( pOp[-1].opcode==OP_CollSeq );
i = pOp[-1].p1;
if( i ) sqlite3VdbeMemSetInt64(&aMem[i], 1);
}
- sqlite3VdbeMemRelease(&t);
break;
}
@@ -76601,7 +78776,7 @@ case OP_AggFinal: {
assert( (pMem->flags & ~(MEM_Null|MEM_Agg))==0 );
rc = sqlite3VdbeMemFinalize(pMem, pOp->p4.pFunc);
if( rc ){
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(pMem));
+ sqlite3VdbeError(p, "%s", sqlite3_value_text(pMem));
}
sqlite3VdbeChangeEncoding(pMem, encoding);
UPDATE_MAX_BLOBSIZE(pMem);
@@ -76706,7 +78881,7 @@ case OP_JournalMode: { /* out2 */
){
if( !db->autoCommit || db->nVdbeRead>1 ){
rc = SQLITE_ERROR;
- sqlite3SetString(&p->zErrMsg, db,
+ sqlite3VdbeError(p,
"cannot change %s wal mode from within a transaction",
(eNew==PAGER_JOURNALMODE_WAL ? "into" : "out of")
);
@@ -76837,7 +79012,7 @@ case OP_TableLock: {
rc = sqlite3BtreeLockTable(db->aDb[p1].pBt, pOp->p2, isWriteLock);
if( (rc&0xFF)==SQLITE_LOCKED ){
const char *z = pOp->p4.z;
- sqlite3SetString(&p->zErrMsg, db, "database table is locked: %s", z);
+ sqlite3VdbeError(p, "database table is locked: %s", z);
}
}
break;
@@ -77385,7 +79560,7 @@ vdbe_return:
** is encountered.
*/
too_big:
- sqlite3SetString(&p->zErrMsg, db, "string or blob too big");
+ sqlite3VdbeError(p, "string or blob too big");
rc = SQLITE_TOOBIG;
goto vdbe_error_halt;
@@ -77393,7 +79568,7 @@ too_big:
*/
no_mem:
db->mallocFailed = 1;
- sqlite3SetString(&p->zErrMsg, db, "out of memory");
+ sqlite3VdbeError(p, "out of memory");
rc = SQLITE_NOMEM;
goto vdbe_error_halt;
@@ -77404,7 +79579,7 @@ abort_due_to_error:
assert( p->zErrMsg==0 );
if( db->mallocFailed ) rc = SQLITE_NOMEM;
if( rc!=SQLITE_IOERR_NOMEM ){
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(rc));
+ sqlite3VdbeError(p, "%s", sqlite3ErrStr(rc));
}
goto vdbe_error_halt;
@@ -77415,7 +79590,7 @@ abort_due_to_interrupt:
assert( db->u1.isInterrupted );
rc = SQLITE_INTERRUPT;
p->rc = rc;
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(rc));
+ sqlite3VdbeError(p, "%s", sqlite3ErrStr(rc));
goto vdbe_error_halt;
}
@@ -77437,6 +79612,8 @@ abort_due_to_interrupt:
** This file contains code used to implement incremental BLOB I/O.
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
#ifndef SQLITE_OMIT_INCRBLOB
@@ -77669,7 +79846,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
int j;
for(j=0; j<pIdx->nKeyCol; j++){
- if( pIdx->aiColumn[j]==iCol ){
+ /* FIXME: Be smarter about indexes that use expressions */
+ if( pIdx->aiColumn[j]==iCol || pIdx->aiColumn[j]==XN_EXPR ){
zFault = "indexed";
}
}
@@ -78035,6 +80213,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_i
** thread to merge the output of each of the others to a single PMA for
** the main thread to read from.
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
/*
** If SQLITE_DEBUG_SORTER_THREADS is defined, this module outputs various
@@ -80651,6 +82831,7 @@ SQLITE_PRIVATE int sqlite3VdbeSorterCompare(
** 2) The sqlite3JournalCreate() function is called.
*/
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+/* #include "sqliteInt.h" */
/*
@@ -80898,6 +83079,7 @@ SQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *pVfs){
** The in-memory rollback journal is used to journal transactions for
** ":memory:" databases and when the journal_mode=MEMORY pragma is used.
*/
+/* #include "sqliteInt.h" */
/* Forward references to internal structures */
typedef struct MemJournal MemJournal;
@@ -81153,6 +83335,7 @@ SQLITE_PRIVATE int sqlite3MemJournalSize(void){
** This file contains routines used for walking the parser tree for
** an SQL statement.
*/
+/* #include "sqliteInt.h" */
/* #include <stdlib.h> */
/* #include <string.h> */
@@ -81245,6 +83428,11 @@ SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){
if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){
return WRC_Abort;
}
+ if( pItem->fg.isTabFunc
+ && sqlite3WalkExprList(pWalker, pItem->u1.pFuncArg)
+ ){
+ return WRC_Abort;
+ }
}
}
return WRC_Continue;
@@ -81311,6 +83499,7 @@ SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){
** resolve all identifiers by associating them with a particular
** table and column.
*/
+/* #include "sqliteInt.h" */
/* #include <stdlib.h> */
/* #include <string.h> */
@@ -81341,30 +83530,6 @@ static void incrAggFunctionDepth(Expr *pExpr, int N){
** Turn the pExpr expression into an alias for the iCol-th column of the
** result set in pEList.
**
-** If the result set column is a simple column reference, then this routine
-** makes an exact copy. But for any other kind of expression, this
-** routine make a copy of the result set column as the argument to the
-** TK_AS operator. The TK_AS operator causes the expression to be
-** evaluated just once and then reused for each alias.
-**
-** The reason for suppressing the TK_AS term when the expression is a simple
-** column reference is so that the column reference will be recognized as
-** usable by indices within the WHERE clause processing logic.
-**
-** The TK_AS operator is inhibited if zType[0]=='G'. This means
-** that in a GROUP BY clause, the expression is evaluated twice. Hence:
-**
-** SELECT random()%5 AS x, count(*) FROM tab GROUP BY x
-**
-** Is equivalent to:
-**
-** SELECT random()%5 AS x, count(*) FROM tab GROUP BY random()%5
-**
-** The result of random()%5 in the GROUP BY clause is probably different
-** from the result in the result-set. On the other hand Standard SQL does
-** not allow the GROUP BY clause to contain references to result-set columns.
-** So this should never come up in well-formed queries.
-**
** If the reference is followed by a COLLATE operator, then make sure
** the COLLATE operator is preserved. For example:
**
@@ -81398,19 +83563,11 @@ static void resolveAlias(
db = pParse->db;
pDup = sqlite3ExprDup(db, pOrig, 0);
if( pDup==0 ) return;
- if( pOrig->op!=TK_COLUMN && zType[0]!='G' ){
- incrAggFunctionDepth(pDup, nSubquery);
- pDup = sqlite3PExpr(pParse, TK_AS, pDup, 0, 0);
- if( pDup==0 ) return;
- ExprSetProperty(pDup, EP_Skip);
- if( pEList->a[iCol].u.x.iAlias==0 ){
- pEList->a[iCol].u.x.iAlias = (u16)(++pParse->nAlias);
- }
- pDup->iTable = pEList->a[iCol].u.x.iAlias;
- }
+ if( zType[0]!='G' ) incrAggFunctionDepth(pDup, nSubquery);
if( pExpr->op==TK_COLLATE ){
pDup = sqlite3ExprAddCollateString(pParse, pDup, pExpr->u.zToken);
}
+ ExprSetProperty(pDup, EP_Alias);
/* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
** prevents ExprDelete() from deleting the Expr structure itself,
@@ -81602,7 +83759,7 @@ static int lookupName(
** USING clause, then skip this match.
*/
if( cnt==1 ){
- if( pItem->jointype & JT_NATURAL ) continue;
+ if( pItem->fg.jointype & JT_NATURAL ) continue;
if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
}
cnt++;
@@ -81617,8 +83774,8 @@ static int lookupName(
pExpr->iTable = pMatch->iCursor;
pExpr->pTab = pMatch->pTab;
/* RIGHT JOIN not (yet) supported */
- assert( (pMatch->jointype & JT_RIGHT)==0 );
- if( (pMatch->jointype & JT_LEFT)!=0 ){
+ assert( (pMatch->fg.jointype & JT_RIGHT)==0 );
+ if( (pMatch->fg.jointype & JT_LEFT)!=0 ){
ExprSetProperty(pExpr, EP_CanBeNull);
}
pSchema = pExpr->pTab->pSchema;
@@ -81654,7 +83811,7 @@ static int lookupName(
break;
}
}
- if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) && HasRowid(pTab) ){
+ if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) && VisibleRowid(pTab) ){
/* IMP: R-51414-32910 */
/* IMP: R-44911-55124 */
iCol = -1;
@@ -81683,8 +83840,13 @@ static int lookupName(
/*
** Perhaps the name is a reference to the ROWID
*/
- if( cnt==0 && cntTab==1 && pMatch && sqlite3IsRowid(zCol)
- && HasRowid(pMatch->pTab) ){
+ if( cnt==0
+ && cntTab==1
+ && pMatch
+ && (pNC->ncFlags & NC_IdxExpr)==0
+ && sqlite3IsRowid(zCol)
+ && VisibleRowid(pMatch->pTab)
+ ){
cnt = 1;
pExpr->iColumn = -1; /* IMP: R-44911-55124 */
pExpr->affinity = SQLITE_AFF_INTEGER;
@@ -81703,9 +83865,9 @@ static int lookupName(
** resolved by the time the WHERE clause is resolved.
**
** The ability to use an output result-set column in the WHERE, GROUP BY,
- ** or HAVING clauses, or as part of a larger expression in the ORDRE BY
+ ** or HAVING clauses, or as part of a larger expression in the ORDER BY
** clause is not standard SQL. This is a (goofy) SQLite extension, that
- ** is supported for backwards compatibility only. TO DO: Issue a warning
+ ** is supported for backwards compatibility only. Hence, we issue a warning
** on sqlite3_log() whenever the capability is used.
*/
if( (pEList = pNC->pEList)!=0
@@ -81802,7 +83964,7 @@ static int lookupName(
lookupname_end:
if( cnt==1 ){
assert( pNC!=0 );
- if( pExpr->op!=TK_AS ){
+ if( !ExprHasProperty(pExpr, EP_Alias) ){
sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
}
/* Increment the nRef value on all name contexts from TopNC up to
@@ -81843,36 +84005,25 @@ SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSr
}
/*
-** Report an error that an expression is not valid for a partial index WHERE
-** clause.
+** Report an error that an expression is not valid for some set of
+** pNC->ncFlags values determined by validMask.
*/
-static void notValidPartIdxWhere(
+static void notValid(
Parse *pParse, /* Leave error message here */
NameContext *pNC, /* The name context */
- const char *zMsg /* Type of error */
+ const char *zMsg, /* Type of error */
+ int validMask /* Set of contexts for which prohibited */
){
- if( (pNC->ncFlags & NC_PartIdx)!=0 ){
- sqlite3ErrorMsg(pParse, "%s prohibited in partial index WHERE clauses",
- zMsg);
- }
-}
-
+ assert( (validMask&~(NC_IsCheck|NC_PartIdx|NC_IdxExpr))==0 );
+ if( (pNC->ncFlags & validMask)!=0 ){
+ const char *zIn = "partial index WHERE clauses";
+ if( pNC->ncFlags & NC_IdxExpr ) zIn = "index expressions";
#ifndef SQLITE_OMIT_CHECK
-/*
-** Report an error that an expression is not valid for a CHECK constraint.
-*/
-static void notValidCheckConstraint(
- Parse *pParse, /* Leave error message here */
- NameContext *pNC, /* The name context */
- const char *zMsg /* Type of error */
-){
- if( (pNC->ncFlags & NC_IsCheck)!=0 ){
- sqlite3ErrorMsg(pParse,"%s prohibited in CHECK constraints", zMsg);
+ else if( pNC->ncFlags & NC_IsCheck ) zIn = "CHECK constraints";
+#endif
+ sqlite3ErrorMsg(pParse, "%s prohibited in %s", zMsg, zIn);
}
}
-#else
-# define notValidCheckConstraint(P,N,M)
-#endif
/*
** Expression p should encode a floating point value between 1.0 and 0.0.
@@ -81957,6 +84108,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
Expr *pRight;
/* if( pSrcList==0 ) break; */
+ notValid(pParse, pNC, "the \".\" operator", NC_IdxExpr);
+ /*notValid(pParse, pNC, "the \".\" operator", NC_PartIdx|NC_IsCheck, 1);*/
pRight = pExpr->pRight;
if( pRight->op==TK_ID ){
zDb = 0;
@@ -81986,7 +84139,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
u8 enc = ENC(pParse->db); /* The database encoding */
assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
- notValidPartIdxWhere(pParse, pNC, "functions");
+ notValid(pParse, pNC, "functions", NC_PartIdx);
zId = pExpr->u.zToken;
nId = sqlite3Strlen30(zId);
pDef = sqlite3FindFunction(pParse->db, zId, nId, n, enc, 0);
@@ -82034,9 +84187,18 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
return WRC_Prune;
}
#endif
- if( pDef->funcFlags & SQLITE_FUNC_CONSTANT ){
+ if( pDef->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) ){
+ /* For the purposes of the EP_ConstFunc flag, date and time
+ ** functions and other functions that change slowly are considered
+ ** constant because they are constant for the duration of one query */
ExprSetProperty(pExpr,EP_ConstFunc);
}
+ if( (pDef->funcFlags & SQLITE_FUNC_CONSTANT)==0 ){
+ /* Date/time functions that use 'now', and other functions like
+ ** sqlite_version() that might change over time cannot be used
+ ** in an index. */
+ notValid(pParse, pNC, "non-deterministic functions", NC_IdxExpr);
+ }
}
if( is_agg && (pNC->ncFlags & NC_AllowAgg)==0 ){
sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
@@ -82082,8 +84244,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
testcase( pExpr->op==TK_IN );
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
int nRef = pNC->nRef;
- notValidCheckConstraint(pParse, pNC, "subqueries");
- notValidPartIdxWhere(pParse, pNC, "subqueries");
+ notValid(pParse, pNC, "subqueries", NC_IsCheck|NC_PartIdx|NC_IdxExpr);
sqlite3WalkSelect(pWalker, pExpr->x.pSelect);
assert( pNC->nRef>=nRef );
if( nRef!=pNC->nRef ){
@@ -82093,8 +84254,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
break;
}
case TK_VARIABLE: {
- notValidCheckConstraint(pParse, pNC, "parameters");
- notValidPartIdxWhere(pParse, pNC, "parameters");
+ notValid(pParse, pNC, "parameters", NC_IsCheck|NC_PartIdx|NC_IdxExpr);
break;
}
}
@@ -82438,7 +84598,6 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
int isCompound; /* True if p is a compound select */
int nCompound; /* Number of compound terms processed so far */
Parse *pParse; /* Parsing context */
- ExprList *pEList; /* Result set expression list */
int i; /* Loop counter */
ExprList *pGroupBy; /* The GROUP BY clause */
Select *pLeftmost; /* Left-most of SELECT of a compound */
@@ -82511,7 +84670,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
** parent contexts. After resolving references to expressions in
** pItem->pSelect, check if this value has changed. If so, then
** SELECT statement pItem->pSelect must be correlated. Set the
- ** pItem->isCorrelated flag if this is the case. */
+ ** pItem->fg.isCorrelated flag if this is the case. */
for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef += pNC->nRef;
if( pItem->zName ) pParse->zAuthContext = pItem->zName;
@@ -82520,8 +84679,8 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
if( pParse->nErr || db->mallocFailed ) return WRC_Abort;
for(pNC=pOuterNC; pNC; pNC=pNC->pNext) nRef -= pNC->nRef;
- assert( pItem->isCorrelated==0 && nRef<=0 );
- pItem->isCorrelated = (nRef!=0);
+ assert( pItem->fg.isCorrelated==0 && nRef<=0 );
+ pItem->fg.isCorrelated = (nRef!=0);
}
}
@@ -82533,14 +84692,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
sNC.pNext = pOuterNC;
/* Resolve names in the result set. */
- pEList = p->pEList;
- assert( pEList!=0 );
- for(i=0; i<pEList->nExpr; i++){
- Expr *pX = pEList->a[i].pExpr;
- if( sqlite3ResolveExprNames(&sNC, pX) ){
- return WRC_Abort;
- }
- }
+ if( sqlite3ResolveExprListNames(&sNC, p->pEList) ) return WRC_Abort;
/* If there are no aggregate functions in the result-set, and no GROUP BY
** expression, do not allow aggregates in any of the other expressions.
@@ -82573,6 +84725,16 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort;
if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort;
+ /* Resolve names in table-valued-function arguments */
+ for(i=0; i<p->pSrc->nSrc; i++){
+ struct SrcList_item *pItem = &p->pSrc->a[i];
+ if( pItem->fg.isTabFunc
+ && sqlite3ResolveExprListNames(&sNC, pItem->u1.pFuncArg)
+ ){
+ return WRC_Abort;
+ }
+ }
+
/* The ORDER BY and GROUP BY clauses may not refer to terms in
** outer queries
*/
@@ -82627,6 +84789,13 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
}
}
+ /* If this is part of a compound SELECT, check that it has the right
+ ** number of expressions in the select list. */
+ if( p->pNext && p->pEList->nExpr!=p->pNext->pEList->nExpr ){
+ sqlite3SelectWrongNumTermsError(pParse, p->pNext);
+ return WRC_Abort;
+ }
+
/* Advance to the next term of the compound
*/
p = p->pPrior;
@@ -82729,6 +84898,22 @@ SQLITE_PRIVATE int sqlite3ResolveExprNames(
return ExprHasProperty(pExpr, EP_Error);
}
+/*
+** Resolve all names for all expression in an expression list. This is
+** just like sqlite3ResolveExprNames() except that it works for an expression
+** list rather than a single expression.
+*/
+SQLITE_PRIVATE int sqlite3ResolveExprListNames(
+ NameContext *pNC, /* Namespace to resolve expressions in. */
+ ExprList *pList /* The expression list to be analyzed. */
+){
+ int i;
+ assert( pList!=0 );
+ for(i=0; i<pList->nExpr; i++){
+ if( sqlite3ResolveExprNames(pNC, pList->a[i].pExpr) ) return WRC_Abort;
+ }
+ return WRC_Continue;
+}
/*
** Resolve all names in all expressions of a SELECT and in all
@@ -82772,15 +84957,14 @@ SQLITE_PRIVATE void sqlite3ResolveSelectNames(
SQLITE_PRIVATE void sqlite3ResolveSelfReference(
Parse *pParse, /* Parsing context */
Table *pTab, /* The table being referenced */
- int type, /* NC_IsCheck or NC_PartIdx */
+ int type, /* NC_IsCheck or NC_PartIdx or NC_IdxExpr */
Expr *pExpr, /* Expression to resolve. May be NULL. */
ExprList *pList /* Expression list to resolve. May be NUL. */
){
SrcList sSrc; /* Fake SrcList for pParse->pNewTable */
NameContext sNC; /* Name context for pParse->pNewTable */
- int i; /* Loop counter */
- assert( type==NC_IsCheck || type==NC_PartIdx );
+ assert( type==NC_IsCheck || type==NC_PartIdx || type==NC_IdxExpr );
memset(&sNC, 0, sizeof(sNC));
memset(&sSrc, 0, sizeof(sSrc));
sSrc.nSrc = 1;
@@ -82791,13 +84975,7 @@ SQLITE_PRIVATE void sqlite3ResolveSelfReference(
sNC.pSrcList = &sSrc;
sNC.ncFlags = type;
if( sqlite3ResolveExprNames(&sNC, pExpr) ) return;
- if( pList ){
- for(i=0; i<pList->nExpr; i++){
- if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
- return;
- }
- }
- }
+ if( pList ) sqlite3ResolveExprListNames(&sNC, pList);
}
/************** End of resolve.c *********************************************/
@@ -82816,6 +84994,7 @@ SQLITE_PRIVATE void sqlite3ResolveSelfReference(
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
*/
+/* #include "sqliteInt.h" */
/*
** Return the 'affinity' of the expression pExpr if any.
@@ -82894,7 +85073,7 @@ SQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(Parse *pParse, Expr *pExpr, con
}
/*
-** Skip over any TK_COLLATE or TK_AS operators and any unlikely()
+** Skip over any TK_COLLATE operators and any unlikely()
** or likelihood() function at the root of an expression.
*/
SQLITE_PRIVATE Expr *sqlite3ExprSkipCollate(Expr *pExpr){
@@ -82905,7 +85084,7 @@ SQLITE_PRIVATE Expr *sqlite3ExprSkipCollate(Expr *pExpr){
assert( pExpr->op==TK_FUNCTION );
pExpr = pExpr->x.pList->a[0].pExpr;
}else{
- assert( pExpr->op==TK_COLLATE || pExpr->op==TK_AS );
+ assert( pExpr->op==TK_COLLATE );
pExpr = pExpr->pLeft;
}
}
@@ -82994,13 +85173,13 @@ SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2){
if( sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2) ){
return SQLITE_AFF_NUMERIC;
}else{
- return SQLITE_AFF_NONE;
+ return SQLITE_AFF_BLOB;
}
}else if( !aff1 && !aff2 ){
/* Neither side of the comparison is a column. Compare the
** results directly.
*/
- return SQLITE_AFF_NONE;
+ return SQLITE_AFF_BLOB;
}else{
/* One side is a column, the other is not. Use the columns affinity. */
assert( aff1==0 || aff2==0 );
@@ -83024,7 +85203,7 @@ static char comparisonAffinity(Expr *pExpr){
}else if( ExprHasProperty(pExpr, EP_xIsSelect) ){
aff = sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr, aff);
}else if( !aff ){
- aff = SQLITE_AFF_NONE;
+ aff = SQLITE_AFF_BLOB;
}
return aff;
}
@@ -83038,7 +85217,7 @@ static char comparisonAffinity(Expr *pExpr){
SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity){
char aff = comparisonAffinity(pExpr);
switch( aff ){
- case SQLITE_AFF_NONE:
+ case SQLITE_AFF_BLOB:
return 1;
case SQLITE_AFF_TEXT:
return idx_affinity==SQLITE_AFF_TEXT;
@@ -83236,7 +85415,7 @@ SQLITE_PRIVATE void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p){
** is responsible for making sure the node eventually gets freed.
**
** If dequote is true, then the token (if it exists) is dequoted.
-** If dequote is false, no dequoting is performance. The deQuote
+** If dequote is false, no dequoting is performed. The deQuote
** parameter is ignored if pToken is NULL or if the token does not
** appear to be quoted. If the quotes were of the form "..." (double-quotes)
** then the EP_DblQuoted flag is set on the expression node.
@@ -83837,16 +86016,18 @@ SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
- pNewItem->jointype = pOldItem->jointype;
+ pNewItem->fg = pOldItem->fg;
pNewItem->iCursor = pOldItem->iCursor;
pNewItem->addrFillSub = pOldItem->addrFillSub;
pNewItem->regReturn = pOldItem->regReturn;
- pNewItem->isCorrelated = pOldItem->isCorrelated;
- pNewItem->viaCoroutine = pOldItem->viaCoroutine;
- pNewItem->isRecursive = pOldItem->isRecursive;
- pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex);
- pNewItem->notIndexed = pOldItem->notIndexed;
- pNewItem->pIndex = pOldItem->pIndex;
+ if( pNewItem->fg.isIndexedBy ){
+ pNewItem->u1.zIndexedBy = sqlite3DbStrDup(db, pOldItem->u1.zIndexedBy);
+ }
+ pNewItem->pIBIndex = pOldItem->pIBIndex;
+ if( pNewItem->fg.isTabFunc ){
+ pNewItem->u1.pFuncArg =
+ sqlite3ExprListDup(db, pOldItem->u1.pFuncArg, flags);
+ }
pTab = pNewItem->pTab = pOldItem->pTab;
if( pTab ){
pTab->nRef++;
@@ -83962,6 +86143,20 @@ no_mem:
}
/*
+** Set the sort order for the last element on the given ExprList.
+*/
+SQLITE_PRIVATE void sqlite3ExprListSetSortOrder(ExprList *p, int iSortOrder){
+ if( p==0 ) return;
+ assert( SQLITE_SO_UNDEFINED<0 && SQLITE_SO_ASC>=0 && SQLITE_SO_DESC>0 );
+ assert( p->nExpr>0 );
+ if( iSortOrder<0 ){
+ assert( p->a[p->nExpr-1].sortOrder==SQLITE_SO_ASC );
+ return;
+ }
+ p->a[p->nExpr-1].sortOrder = (u8)iSortOrder;
+}
+
+/*
** Set the ExprList.a[].zName element of the most recently added item
** on the expression list.
**
@@ -84071,7 +86266,7 @@ SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList *pList){
**
** sqlite3ExprIsConstant() pWalker->eCode==1
** sqlite3ExprIsConstantNotJoin() pWalker->eCode==2
-** sqlite3ExprRefOneTableOnly() pWalker->eCode==3
+** sqlite3ExprIsTableConstant() pWalker->eCode==3
** sqlite3ExprIsConstantOrFunction() pWalker->eCode==4 or 5
**
** In all cases, the callbacks set Walker.eCode=0 and abort if the expression
@@ -84179,7 +86374,7 @@ SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr *p){
}
/*
-** Walk an expression tree. Return non-zero if the expression constant
+** Walk an expression tree. Return non-zero if the expression is constant
** for any single row of the table with cursor iCur. In other words, the
** expression must not refer to any non-deterministic function nor any
** table other than iCur.
@@ -84285,7 +86480,7 @@ SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr *p){
*/
SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr *p, char aff){
u8 op;
- if( aff==SQLITE_AFF_NONE ) return 1;
+ if( aff==SQLITE_AFF_BLOB ) return 1;
while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
op = p->op;
if( op==TK_REGISTER ) op = p->op2;
@@ -84382,13 +86577,13 @@ SQLITE_PRIVATE int sqlite3CodeOnce(Parse *pParse){
** to be set to NULL if iCur contains one or more NULL values.
*/
static void sqlite3SetHasNullFlag(Vdbe *v, int iCur, int regHasNull){
- int j1;
+ int addr1;
sqlite3VdbeAddOp2(v, OP_Integer, 0, regHasNull);
- j1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
+ addr1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
sqlite3VdbeAddOp3(v, OP_Column, iCur, 0, regHasNull);
sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
VdbeComment((v, "first_entry_in(%d)", iCur));
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
}
@@ -84736,7 +86931,7 @@ SQLITE_PRIVATE int sqlite3CodeSubselect(
int r1, r2, r3;
if( !affinity ){
- affinity = SQLITE_AFF_NONE;
+ affinity = SQLITE_AFF_BLOB;
}
if( pKeyInfo ){
assert( sqlite3KeyInfoIsWriteable(pKeyInfo) );
@@ -84932,7 +87127,7 @@ static void sqlite3ExprCodeIN(
}
if( regCkNull ){
sqlite3VdbeAddOp2(v, OP_IsNull, regCkNull, destIfNull); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfFalse);
+ sqlite3VdbeGoto(v, destIfFalse);
}
sqlite3VdbeResolveLabel(v, labelOk);
sqlite3ReleaseTempReg(pParse, regCkNull);
@@ -84950,7 +87145,7 @@ static void sqlite3ExprCodeIN(
int addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, r1); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_Rewind, pExpr->iTable, destIfFalse);
VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfNull);
+ sqlite3VdbeGoto(v, destIfNull);
sqlite3VdbeJumpHere(v, addr1);
}
}
@@ -84988,7 +87183,7 @@ static void sqlite3ExprCodeIN(
** the presence of a NULL on the RHS makes a difference in the
** outcome.
*/
- int j1;
+ int addr1;
/* First check to see if the LHS is contained in the RHS. If so,
** then the answer is TRUE the presence of NULLs in the RHS does
@@ -84996,12 +87191,12 @@ static void sqlite3ExprCodeIN(
** answer is NULL if the RHS contains NULLs and the answer is
** FALSE if the RHS is NULL-free.
*/
- j1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
+ addr1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_IsNull, rRhsHasNull, destIfNull);
VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfFalse);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeGoto(v, destIfFalse);
+ sqlite3VdbeJumpHere(v, addr1);
}
}
}
@@ -85011,17 +87206,6 @@ static void sqlite3ExprCodeIN(
}
#endif /* SQLITE_OMIT_SUBQUERY */
-/*
-** Duplicate an 8-byte value
-*/
-static char *dup8bytes(Vdbe *v, const char *in){
- char *out = sqlite3DbMallocRaw(sqlite3VdbeDb(v), 8);
- if( out ){
- memcpy(out, in, 8);
- }
- return out;
-}
-
#ifndef SQLITE_OMIT_FLOATING_POINT
/*
** Generate an instruction that will put the floating point
@@ -85034,12 +87218,10 @@ static char *dup8bytes(Vdbe *v, const char *in){
static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
if( ALWAYS(z!=0) ){
double value;
- char *zV;
sqlite3AtoF(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */
if( negateFlag ) value = -value;
- zV = dup8bytes(v, (char*)&value);
- sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
+ sqlite3VdbeAddOp4Dup8(v, OP_Real, 0, iMem, 0, (u8*)&value, P4_REAL);
}
}
#endif
@@ -85065,10 +87247,8 @@ static void codeInteger(Parse *pParse, Expr *pExpr, int negFlag, int iMem){
assert( z!=0 );
c = sqlite3DecOrHexToI64(z, &value);
if( c==0 || (c==2 && negFlag) ){
- char *zV;
if( negFlag ){ value = c==2 ? SMALLEST_INT64 : -value; }
- zV = dup8bytes(v, (char*)&value);
- sqlite3VdbeAddOp4(v, OP_Int64, 0, iMem, 0, zV, P4_INT64);
+ sqlite3VdbeAddOp4Dup8(v, OP_Int64, 0, iMem, 0, (u8*)&value, P4_INT64);
}else{
#ifdef SQLITE_OMIT_FLOATING_POINT
sqlite3ErrorMsg(pParse, "oversized integer: %s%s", negFlag ? "-" : "", z);
@@ -85234,6 +87414,28 @@ static void sqlite3ExprCachePinRegister(Parse *pParse, int iReg){
}
}
+/* Generate code that will load into register regOut a value that is
+** appropriate for the iIdxCol-th column of index pIdx.
+*/
+SQLITE_PRIVATE void sqlite3ExprCodeLoadIndexColumn(
+ Parse *pParse, /* The parsing context */
+ Index *pIdx, /* The index whose column is to be loaded */
+ int iTabCur, /* Cursor pointing to a table row */
+ int iIdxCol, /* The column of the index to be loaded */
+ int regOut /* Store the index column value in this register */
+){
+ i16 iTabCol = pIdx->aiColumn[iIdxCol];
+ if( iTabCol==XN_EXPR ){
+ assert( pIdx->aColExpr );
+ assert( pIdx->aColExpr->nExpr>iIdxCol );
+ pParse->iSelfTab = iTabCur;
+ sqlite3ExprCode(pParse, pIdx->aColExpr->a[iIdxCol].pExpr, regOut);
+ }else{
+ sqlite3ExprCodeGetColumnOfTable(pParse->pVdbe, pIdx->pTable, iTabCur,
+ iTabCol, regOut);
+ }
+}
+
/*
** Generate code to extract the value of the iCol-th column of a table.
*/
@@ -85419,8 +87621,9 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
inReg = pExpr->iColumn + pParse->ckBase;
break;
}else{
- /* Deleting from a partial index */
- iTab = pParse->iPartIdxTab;
+ /* Coding an expression that is part of an index where column names
+ ** in the index refer to the table to which the index belongs */
+ iTab = pParse->iSelfTab;
}
}
inReg = sqlite3ExprCodeGetColumn(pParse, pExpr->pTab,
@@ -85441,7 +87644,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
#endif
case TK_STRING: {
assert( !ExprHasProperty(pExpr, EP_IntValue) );
- sqlite3VdbeAddOp4(v, OP_String8, 0, target, 0, pExpr->u.zToken, 0);
+ sqlite3VdbeLoadString(v, target, pExpr->u.zToken);
break;
}
case TK_NULL: {
@@ -85480,10 +87683,6 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
inReg = pExpr->iTable;
break;
}
- case TK_AS: {
- inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
- break;
- }
#ifndef SQLITE_OMIT_CAST
case TK_CAST: {
/* Expressions of the form: CAST(pLeft AS token) */
@@ -85673,7 +87872,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
*/
if( pDef->funcFlags & SQLITE_FUNC_UNLIKELY ){
assert( nFarg>=1 );
- sqlite3ExprCode(pParse, pFarg->a[0].pExpr, target);
+ inReg = sqlite3ExprCodeTarget(pParse, pFarg->a[0].pExpr, target);
break;
}
@@ -85714,7 +87913,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
}
sqlite3ExprCachePush(pParse); /* Ticket 2ea2425d34be */
- sqlite3ExprCodeExprList(pParse, pFarg, r1,
+ sqlite3ExprCodeExprList(pParse, pFarg, r1, 0,
SQLITE_ECEL_DUP|SQLITE_ECEL_FACTOR);
sqlite3ExprCachePop(pParse); /* Ticket 2ea2425d34be */
}else{
@@ -85743,7 +87942,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
if( !pColl ) pColl = db->pDfltColl;
sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);
}
- sqlite3VdbeAddOp4(v, OP_Function, constMask, r1, target,
+ sqlite3VdbeAddOp4(v, OP_Function0, constMask, r1, target,
(char*)pDef, P4_FUNCDEF);
sqlite3VdbeChangeP5(v, (u8)nFarg);
if( nFarg && constMask==0 ){
@@ -85938,7 +88137,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target)
sqlite3ExprIfFalse(pParse, pTest, nextCase, SQLITE_JUMPIFNULL);
testcase( aListelem[i+1].pExpr->op==TK_COLUMN );
sqlite3ExprCode(pParse, aListelem[i+1].pExpr, target);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, endLabel);
+ sqlite3VdbeGoto(v, endLabel);
sqlite3ExprCachePop(pParse);
sqlite3VdbeResolveLabel(v, nextCase);
}
@@ -86114,268 +88313,6 @@ SQLITE_PRIVATE void sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr, int targ
exprToRegister(pExpr, iMem);
}
-#ifdef SQLITE_DEBUG
-/*
-** Generate a human-readable explanation of an expression tree.
-*/
-SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
- const char *zBinOp = 0; /* Binary operator */
- const char *zUniOp = 0; /* Unary operator */
- pView = sqlite3TreeViewPush(pView, moreToFollow);
- if( pExpr==0 ){
- sqlite3TreeViewLine(pView, "nil");
- sqlite3TreeViewPop(pView);
- return;
- }
- switch( pExpr->op ){
- case TK_AGG_COLUMN: {
- sqlite3TreeViewLine(pView, "AGG{%d:%d}",
- pExpr->iTable, pExpr->iColumn);
- break;
- }
- case TK_COLUMN: {
- if( pExpr->iTable<0 ){
- /* This only happens when coding check constraints */
- sqlite3TreeViewLine(pView, "COLUMN(%d)", pExpr->iColumn);
- }else{
- sqlite3TreeViewLine(pView, "{%d:%d}",
- pExpr->iTable, pExpr->iColumn);
- }
- break;
- }
- case TK_INTEGER: {
- if( pExpr->flags & EP_IntValue ){
- sqlite3TreeViewLine(pView, "%d", pExpr->u.iValue);
- }else{
- sqlite3TreeViewLine(pView, "%s", pExpr->u.zToken);
- }
- break;
- }
-#ifndef SQLITE_OMIT_FLOATING_POINT
- case TK_FLOAT: {
- sqlite3TreeViewLine(pView,"%s", pExpr->u.zToken);
- break;
- }
-#endif
- case TK_STRING: {
- sqlite3TreeViewLine(pView,"%Q", pExpr->u.zToken);
- break;
- }
- case TK_NULL: {
- sqlite3TreeViewLine(pView,"NULL");
- break;
- }
-#ifndef SQLITE_OMIT_BLOB_LITERAL
- case TK_BLOB: {
- sqlite3TreeViewLine(pView,"%s", pExpr->u.zToken);
- break;
- }
-#endif
- case TK_VARIABLE: {
- sqlite3TreeViewLine(pView,"VARIABLE(%s,%d)",
- pExpr->u.zToken, pExpr->iColumn);
- break;
- }
- case TK_REGISTER: {
- sqlite3TreeViewLine(pView,"REGISTER(%d)", pExpr->iTable);
- break;
- }
- case TK_AS: {
- sqlite3TreeViewLine(pView,"AS %Q", pExpr->u.zToken);
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
- break;
- }
- case TK_ID: {
- sqlite3TreeViewLine(pView,"ID \"%w\"", pExpr->u.zToken);
- break;
- }
-#ifndef SQLITE_OMIT_CAST
- case TK_CAST: {
- /* Expressions of the form: CAST(pLeft AS token) */
- sqlite3TreeViewLine(pView,"CAST %Q", pExpr->u.zToken);
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
- break;
- }
-#endif /* SQLITE_OMIT_CAST */
- case TK_LT: zBinOp = "LT"; break;
- case TK_LE: zBinOp = "LE"; break;
- case TK_GT: zBinOp = "GT"; break;
- case TK_GE: zBinOp = "GE"; break;
- case TK_NE: zBinOp = "NE"; break;
- case TK_EQ: zBinOp = "EQ"; break;
- case TK_IS: zBinOp = "IS"; break;
- case TK_ISNOT: zBinOp = "ISNOT"; break;
- case TK_AND: zBinOp = "AND"; break;
- case TK_OR: zBinOp = "OR"; break;
- case TK_PLUS: zBinOp = "ADD"; break;
- case TK_STAR: zBinOp = "MUL"; break;
- case TK_MINUS: zBinOp = "SUB"; break;
- case TK_REM: zBinOp = "REM"; break;
- case TK_BITAND: zBinOp = "BITAND"; break;
- case TK_BITOR: zBinOp = "BITOR"; break;
- case TK_SLASH: zBinOp = "DIV"; break;
- case TK_LSHIFT: zBinOp = "LSHIFT"; break;
- case TK_RSHIFT: zBinOp = "RSHIFT"; break;
- case TK_CONCAT: zBinOp = "CONCAT"; break;
- case TK_DOT: zBinOp = "DOT"; break;
-
- case TK_UMINUS: zUniOp = "UMINUS"; break;
- case TK_UPLUS: zUniOp = "UPLUS"; break;
- case TK_BITNOT: zUniOp = "BITNOT"; break;
- case TK_NOT: zUniOp = "NOT"; break;
- case TK_ISNULL: zUniOp = "ISNULL"; break;
- case TK_NOTNULL: zUniOp = "NOTNULL"; break;
-
- case TK_COLLATE: {
- sqlite3TreeViewLine(pView, "COLLATE %Q", pExpr->u.zToken);
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
- break;
- }
-
- case TK_AGG_FUNCTION:
- case TK_FUNCTION: {
- ExprList *pFarg; /* List of function arguments */
- if( ExprHasProperty(pExpr, EP_TokenOnly) ){
- pFarg = 0;
- }else{
- pFarg = pExpr->x.pList;
- }
- if( pExpr->op==TK_AGG_FUNCTION ){
- sqlite3TreeViewLine(pView, "AGG_FUNCTION%d %Q",
- pExpr->op2, pExpr->u.zToken);
- }else{
- sqlite3TreeViewLine(pView, "FUNCTION %Q", pExpr->u.zToken);
- }
- if( pFarg ){
- sqlite3TreeViewExprList(pView, pFarg, 0, 0);
- }
- break;
- }
-#ifndef SQLITE_OMIT_SUBQUERY
- case TK_EXISTS: {
- sqlite3TreeViewLine(pView, "EXISTS-expr");
- sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
- break;
- }
- case TK_SELECT: {
- sqlite3TreeViewLine(pView, "SELECT-expr");
- sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
- break;
- }
- case TK_IN: {
- sqlite3TreeViewLine(pView, "IN");
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
- if( ExprHasProperty(pExpr, EP_xIsSelect) ){
- sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
- }else{
- sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, 0);
- }
- break;
- }
-#endif /* SQLITE_OMIT_SUBQUERY */
-
- /*
- ** x BETWEEN y AND z
- **
- ** This is equivalent to
- **
- ** x>=y AND x<=z
- **
- ** X is stored in pExpr->pLeft.
- ** Y is stored in pExpr->pList->a[0].pExpr.
- ** Z is stored in pExpr->pList->a[1].pExpr.
- */
- case TK_BETWEEN: {
- Expr *pX = pExpr->pLeft;
- Expr *pY = pExpr->x.pList->a[0].pExpr;
- Expr *pZ = pExpr->x.pList->a[1].pExpr;
- sqlite3TreeViewLine(pView, "BETWEEN");
- sqlite3TreeViewExpr(pView, pX, 1);
- sqlite3TreeViewExpr(pView, pY, 1);
- sqlite3TreeViewExpr(pView, pZ, 0);
- break;
- }
- case TK_TRIGGER: {
- /* If the opcode is TK_TRIGGER, then the expression is a reference
- ** to a column in the new.* or old.* pseudo-tables available to
- ** trigger programs. In this case Expr.iTable is set to 1 for the
- ** new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn
- ** is set to the column of the pseudo-table to read, or to -1 to
- ** read the rowid field.
- */
- sqlite3TreeViewLine(pView, "%s(%d)",
- pExpr->iTable ? "NEW" : "OLD", pExpr->iColumn);
- break;
- }
- case TK_CASE: {
- sqlite3TreeViewLine(pView, "CASE");
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
- sqlite3TreeViewExprList(pView, pExpr->x.pList, 0, 0);
- break;
- }
-#ifndef SQLITE_OMIT_TRIGGER
- case TK_RAISE: {
- const char *zType = "unk";
- switch( pExpr->affinity ){
- case OE_Rollback: zType = "rollback"; break;
- case OE_Abort: zType = "abort"; break;
- case OE_Fail: zType = "fail"; break;
- case OE_Ignore: zType = "ignore"; break;
- }
- sqlite3TreeViewLine(pView, "RAISE %s(%Q)", zType, pExpr->u.zToken);
- break;
- }
-#endif
- default: {
- sqlite3TreeViewLine(pView, "op=%d", pExpr->op);
- break;
- }
- }
- if( zBinOp ){
- sqlite3TreeViewLine(pView, "%s", zBinOp);
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
- sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
- }else if( zUniOp ){
- sqlite3TreeViewLine(pView, "%s", zUniOp);
- sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
- }
- sqlite3TreeViewPop(pView);
-}
-#endif /* SQLITE_DEBUG */
-
-#ifdef SQLITE_DEBUG
-/*
-** Generate a human-readable explanation of an expression list.
-*/
-SQLITE_PRIVATE void sqlite3TreeViewExprList(
- TreeView *pView,
- const ExprList *pList,
- u8 moreToFollow,
- const char *zLabel
-){
- int i;
- pView = sqlite3TreeViewPush(pView, moreToFollow);
- if( zLabel==0 || zLabel[0]==0 ) zLabel = "LIST";
- if( pList==0 ){
- sqlite3TreeViewLine(pView, "%s (empty)", zLabel);
- }else{
- sqlite3TreeViewLine(pView, "%s", zLabel);
- for(i=0; i<pList->nExpr; i++){
- sqlite3TreeViewExpr(pView, pList->a[i].pExpr, i<pList->nExpr-1);
-#if 0
- if( pList->a[i].zName ){
- sqlite3ExplainPrintf(pOut, " AS %s", pList->a[i].zName);
- }
- if( pList->a[i].bSpanIsTab ){
- sqlite3ExplainPrintf(pOut, " (%s)", pList->a[i].zSpan);
- }
-#endif
- }
- }
- sqlite3TreeViewPop(pView);
-}
-#endif /* SQLITE_DEBUG */
-
/*
** Generate code that pushes the value of every element of the given
** expression list into a sequence of registers beginning at target.
@@ -86392,11 +88329,13 @@ SQLITE_PRIVATE int sqlite3ExprCodeExprList(
Parse *pParse, /* Parsing context */
ExprList *pList, /* The expression list to be coded */
int target, /* Where to write results */
+ int srcReg, /* Source registers if SQLITE_ECEL_REF */
u8 flags /* SQLITE_ECEL_* flags */
){
struct ExprList_item *pItem;
- int i, n;
+ int i, j, n;
u8 copyOp = (flags & SQLITE_ECEL_DUP) ? OP_Copy : OP_SCopy;
+ Vdbe *v = pParse->pVdbe;
assert( pList!=0 );
assert( target>0 );
assert( pParse->pVdbe!=0 ); /* Never gets this far otherwise */
@@ -86404,13 +88343,14 @@ SQLITE_PRIVATE int sqlite3ExprCodeExprList(
if( !ConstFactorOk(pParse) ) flags &= ~SQLITE_ECEL_FACTOR;
for(pItem=pList->a, i=0; i<n; i++, pItem++){
Expr *pExpr = pItem->pExpr;
- if( (flags & SQLITE_ECEL_FACTOR)!=0 && sqlite3ExprIsConstant(pExpr) ){
+ if( (flags & SQLITE_ECEL_REF)!=0 && (j = pList->a[i].u.x.iOrderByCol)>0 ){
+ sqlite3VdbeAddOp2(v, copyOp, j+srcReg-1, target+i);
+ }else if( (flags & SQLITE_ECEL_FACTOR)!=0 && sqlite3ExprIsConstant(pExpr) ){
sqlite3ExprCodeAtInit(pParse, pExpr, target+i, 0);
}else{
int inReg = sqlite3ExprCodeTarget(pParse, pExpr, target+i);
if( inReg!=target+i ){
VdbeOp *pOp;
- Vdbe *v = pParse->pVdbe;
if( copyOp==OP_Copy
&& (pOp=sqlite3VdbeGetOp(v, -1))->opcode==OP_Copy
&& pOp->p1+pOp->p3+1==inReg
@@ -86587,14 +88527,14 @@ SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int
int destIfFalse = sqlite3VdbeMakeLabel(v);
int destIfNull = jumpIfNull ? dest : destIfFalse;
sqlite3ExprCodeIN(pParse, pExpr, destIfFalse, destIfNull);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, dest);
+ sqlite3VdbeGoto(v, dest);
sqlite3VdbeResolveLabel(v, destIfFalse);
break;
}
#endif
default: {
if( exprAlwaysTrue(pExpr) ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, dest);
+ sqlite3VdbeGoto(v, dest);
}else if( exprAlwaysFalse(pExpr) ){
/* No-op */
}else{
@@ -86750,7 +88690,7 @@ SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int
#endif
default: {
if( exprAlwaysFalse(pExpr) ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, dest);
+ sqlite3VdbeGoto(v, dest);
}else if( exprAlwaysTrue(pExpr) ){
/* no-op */
}else{
@@ -86768,6 +88708,21 @@ SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int
}
/*
+** Like sqlite3ExprIfFalse() except that a copy is made of pExpr before
+** code generation, and that copy is deleted after code generation. This
+** ensures that the original pExpr is unchanged.
+*/
+SQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse *pParse, Expr *pExpr, int dest,int jumpIfNull){
+ sqlite3 *db = pParse->db;
+ Expr *pCopy = sqlite3ExprDup(db, pExpr, 0);
+ if( db->mallocFailed==0 ){
+ sqlite3ExprIfFalse(pParse, pCopy, dest, jumpIfNull);
+ }
+ sqlite3ExprDelete(db, pCopy);
+}
+
+
+/*
** Do a deep comparison of two expression trees. Return 0 if the two
** expressions are completely identical. Return 1 if they differ only
** by a COLLATE operator at the top level. Return 2 if there are differences
@@ -86811,7 +88766,9 @@ SQLITE_PRIVATE int sqlite3ExprCompare(Expr *pA, Expr *pB, int iTab){
return 2;
}
if( pA->op!=TK_COLUMN && ALWAYS(pA->op!=TK_AGG_COLUMN) && pA->u.zToken ){
- if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
+ if( pA->op==TK_FUNCTION ){
+ if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;
+ }else if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
return pA->op==TK_COLLATE ? 1 : 2;
}
}
@@ -87240,6 +89197,7 @@ SQLITE_PRIVATE void sqlite3ClearTempRegCache(Parse *pParse){
** This file contains C code routines that used to generate VDBE code
** that implements the ALTER TABLE command.
*/
+/* #include "sqliteInt.h" */
/*
** The code in this file only exists if we are not omitting the
@@ -87718,7 +89676,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameTable(
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( pVTab ){
int i = ++pParse->nMem;
- sqlite3VdbeAddOp4(v, OP_String8, 0, i, 0, zName, 0);
+ sqlite3VdbeLoadString(v, i, zName);
sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
sqlite3MayAbort(pParse);
}
@@ -87829,14 +89787,14 @@ SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse *pParse, int iDb, int minForm
if( ALWAYS(v) ){
int r1 = sqlite3GetTempReg(pParse);
int r2 = sqlite3GetTempReg(pParse);
- int j1;
+ int addr1;
sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
sqlite3VdbeUsesBtree(v, iDb);
sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
- j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
+ addr1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
sqlite3VdbeChangeP5(v, SQLITE_NOTNULL); VdbeCoverage(v);
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
sqlite3ReleaseTempReg(pParse, r1);
sqlite3ReleaseTempReg(pParse, r2);
}
@@ -87919,7 +89877,7 @@ SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
if( pDflt ){
sqlite3_value *pVal = 0;
int rc;
- rc = sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_NONE, &pVal);
+ rc = sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_BLOB, &pVal);
assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
if( rc!=SQLITE_OK ){
db->mallocFailed = 1;
@@ -88202,6 +90160,7 @@ exit_begin_add_column:
** integer in the equivalent columns in sqlite_stat4.
*/
#ifndef SQLITE_OMIT_ANALYZE
+/* #include "sqliteInt.h" */
#if defined(SQLITE_ENABLE_STAT4)
# define IsStat4 1
@@ -89004,7 +90963,7 @@ static void callStatGet(Vdbe *v, int regStat4, int iParam, int regOut){
#else
UNUSED_PARAMETER( iParam );
#endif
- sqlite3VdbeAddOp3(v, OP_Function, 0, regStat4, regOut);
+ sqlite3VdbeAddOp3(v, OP_Function0, 0, regStat4, regOut);
sqlite3VdbeChangeP4(v, -1, (char*)&statGetFuncdef, P4_FUNCDEF);
sqlite3VdbeChangeP5(v, 1 + IsStat34);
}
@@ -89075,7 +91034,7 @@ static void analyzeOneTable(
iIdxCur = iTab++;
pParse->nTab = MAX(pParse->nTab, iTab);
sqlite3OpenTable(pParse, iTabCur, iDb, pTab, OP_OpenRead);
- sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
+ sqlite3VdbeLoadString(v, regTabname, pTab->zName);
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
int nCol; /* Number of columns in pIdx. "N" */
@@ -89097,7 +91056,7 @@ static void analyzeOneTable(
}
/* Populate the register containing the index name. */
- sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, zIdxName, 0);
+ sqlite3VdbeLoadString(v, regIdxname, zIdxName);
VdbeComment((v, "Analysis for %s.%s", pTab->zName, zIdxName));
/*
@@ -89159,7 +91118,7 @@ static void analyzeOneTable(
#endif
sqlite3VdbeAddOp2(v, OP_Integer, nCol, regStat4+1);
sqlite3VdbeAddOp2(v, OP_Integer, pIdx->nKeyCol, regStat4+2);
- sqlite3VdbeAddOp3(v, OP_Function, 0, regStat4+1, regStat4);
+ sqlite3VdbeAddOp3(v, OP_Function0, 0, regStat4+1, regStat4);
sqlite3VdbeChangeP4(v, -1, (char*)&statInitFuncdef, P4_FUNCDEF);
sqlite3VdbeChangeP5(v, 2+IsStat34);
@@ -89211,7 +91170,7 @@ static void analyzeOneTable(
VdbeCoverage(v);
}
sqlite3VdbeAddOp2(v, OP_Integer, nColTest, regChng);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, endDistinctTest);
+ sqlite3VdbeGoto(v, endDistinctTest);
/*
@@ -89247,6 +91206,7 @@ static void analyzeOneTable(
regKey = sqlite3GetTempRange(pParse, pPk->nKeyCol);
for(j=0; j<pPk->nKeyCol; j++){
k = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[j]);
+ assert( k>=0 && k<pTab->nCol );
sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, regKey+j);
VdbeComment((v, "%s", pTab->aCol[pPk->aiColumn[j]].zName));
}
@@ -89255,7 +91215,7 @@ static void analyzeOneTable(
}
#endif
assert( regChng==(regStat4+1) );
- sqlite3VdbeAddOp3(v, OP_Function, 1, regStat4, regTemp);
+ sqlite3VdbeAddOp3(v, OP_Function0, 1, regStat4, regTemp);
sqlite3VdbeChangeP4(v, -1, (char*)&statPushFuncdef, P4_FUNCDEF);
sqlite3VdbeChangeP5(v, 2+IsStat34);
sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, addrNextRow); VdbeCoverage(v);
@@ -89296,12 +91256,10 @@ static void analyzeOneTable(
** be taken */
VdbeCoverageNeverTaken(v);
#ifdef SQLITE_ENABLE_STAT3
- sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,
- pIdx->aiColumn[0], regSample);
+ sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iTabCur, 0, regSample);
#else
for(i=0; i<nCol; i++){
- i16 iCol = pIdx->aiColumn[i];
- sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur, iCol, regCol+i);
+ sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iTabCur, i, regCol+i);
}
sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol, regSample);
#endif
@@ -89967,6 +91925,7 @@ SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_ATTACH
/*
@@ -90314,7 +92273,7 @@ static void codeAttach(
assert( v || db->mallocFailed );
if( v ){
- sqlite3VdbeAddOp3(v, OP_Function, 0, regArgs+3-pFunc->nArg, regArgs+3);
+ sqlite3VdbeAddOp3(v, OP_Function0, 0, regArgs+3-pFunc->nArg, regArgs+3);
assert( pFunc->nArg==-1 || (pFunc->nArg&0xff)==pFunc->nArg );
sqlite3VdbeChangeP5(v, (u8)(pFunc->nArg));
sqlite3VdbeChangeP4(v, -1, (char *)pFunc, P4_FUNCDEF);
@@ -90556,6 +92515,7 @@ SQLITE_PRIVATE int sqlite3FixTriggerStep(
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
*/
+/* #include "sqliteInt.h" */
/*
** All of the code in this file may be omitted by defining a single
@@ -90826,6 +92786,7 @@ SQLITE_PRIVATE void sqlite3AuthContextPop(AuthContext *pContext){
** COMMIT
** ROLLBACK
*/
+/* #include "sqliteInt.h" */
/*
** This routine is called when a new SQL statement is beginning to
@@ -90995,6 +92956,8 @@ SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){
db->aDb[iDb].pSchema->iGeneration /* P4 */
);
if( db->init.busy==0 ) sqlite3VdbeChangeP5(v, 1);
+ VdbeComment((v,
+ "usesStmtJournal=%d", pParse->mayAbort && pParse->isMultiWrite));
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
for(i=0; i<pParse->nVtabLock; i++){
@@ -91024,7 +92987,7 @@ SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){
}
/* Finally, jump back to the beginning of the executable code. */
- sqlite3VdbeAddOp2(v, OP_Goto, 0, 1);
+ sqlite3VdbeGoto(v, 1);
}
}
@@ -91159,6 +93122,17 @@ SQLITE_PRIVATE Table *sqlite3LocateTable(
p = sqlite3FindTable(pParse->db, zName, zDbase);
if( p==0 ){
const char *zMsg = isView ? "no such view" : "no such table";
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ if( sqlite3FindDbName(pParse->db, zDbase)<1 ){
+ /* If zName is the not the name of a table in the schema created using
+ ** CREATE, then check to see if it is the name of an virtual table that
+ ** can be an eponymous virtual table. */
+ Module *pMod = (Module*)sqlite3HashFind(&pParse->db->aModule, zName);
+ if( pMod && sqlite3VtabEponymousTableInit(pParse, pMod) ){
+ return pMod->pEpoTab;
+ }
+ }
+#endif
if( zDbase ){
sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
}else{
@@ -91166,7 +93140,7 @@ SQLITE_PRIVATE Table *sqlite3LocateTable(
}
pParse->checkSchema = 1;
}
-#if SQLITE_USER_AUTHENICATION
+#if SQLITE_USER_AUTHENTICATION
else if( pParse->db->auth.authLevel<UAUTH_User ){
sqlite3ErrorMsg(pParse, "user not authenticated");
p = 0;
@@ -91237,6 +93211,7 @@ static void freeIndex(sqlite3 *db, Index *p){
sqlite3DeleteIndexSamples(db, p);
#endif
sqlite3ExprDelete(db, p->pPartIdxWhere);
+ sqlite3ExprListDelete(db, p->aColExpr);
sqlite3DbFree(db, p->zColAff);
if( p->isResized ) sqlite3DbFree(db, p->azColl);
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
@@ -91363,7 +93338,7 @@ SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){
** Delete memory allocated for the column names of a table or view (the
** Table.aCol[] array).
*/
-static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
+SQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3 *db, Table *pTable){
int i;
Column *pCol;
assert( pTable!=0 );
@@ -91430,13 +93405,11 @@ SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
/* Delete the Table structure itself.
*/
- sqliteDeleteColumnNames(db, pTable);
+ sqlite3DeleteColumnNames(db, pTable);
sqlite3DbFree(db, pTable->zName);
sqlite3DbFree(db, pTable->zColAff);
sqlite3SelectDelete(db, pTable->pSelect);
-#ifndef SQLITE_OMIT_CHECK
sqlite3ExprListDelete(db, pTable->pCheck);
-#endif
#ifndef SQLITE_OMIT_VIRTUALTABLE
sqlite3VtabClear(db, pTable);
#endif
@@ -91776,10 +93749,12 @@ SQLITE_PRIVATE void sqlite3StartTable(
** now.
*/
if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
- int j1;
+ int addr1;
int fileFormat;
int reg1, reg2, reg3;
- sqlite3BeginWriteOperation(pParse, 0, iDb);
+ /* nullRow[] is an OP_Record encoding of a row containing 5 NULLs */
+ static const char nullRow[] = { 6, 0, 0, 0, 0, 0 };
+ sqlite3BeginWriteOperation(pParse, 1, iDb);
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( isVirtual ){
@@ -91795,14 +93770,14 @@ SQLITE_PRIVATE void sqlite3StartTable(
reg3 = ++pParse->nMem;
sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
sqlite3VdbeUsesBtree(v, iDb);
- j1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
+ addr1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
1 : SQLITE_MAX_FILE_FORMAT;
sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
/* This just creates a place-holder record in the sqlite_master table.
** The record created does not contain anything yet. It will be replaced
@@ -91823,7 +93798,7 @@ SQLITE_PRIVATE void sqlite3StartTable(
}
sqlite3OpenMasterTable(pParse, iDb);
sqlite3VdbeAddOp2(v, OP_NewRowid, 0, reg1);
- sqlite3VdbeAddOp2(v, OP_Null, 0, reg3);
+ sqlite3VdbeAddOp4(v, OP_Blob, 6, reg3, 0, nullRow, P4_STATIC);
sqlite3VdbeAddOp3(v, OP_Insert, 0, reg3, reg1);
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
sqlite3VdbeAddOp0(v, OP_Close);
@@ -91895,10 +93870,10 @@ SQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token *pName){
pCol->zName = z;
/* If there is no type specified, columns have the default affinity
- ** 'NONE'. If there is a type specified, then sqlite3AddColumnType() will
+ ** 'BLOB'. If there is a type specified, then sqlite3AddColumnType() will
** be called next to set pCol->affinity correctly.
*/
- pCol->affinity = SQLITE_AFF_NONE;
+ pCol->affinity = SQLITE_AFF_BLOB;
pCol->szEst = 1;
p->nCol++;
}
@@ -91933,7 +93908,7 @@ SQLITE_PRIVATE void sqlite3AddNotNull(Parse *pParse, int onError){
** 'CHAR' | SQLITE_AFF_TEXT
** 'CLOB' | SQLITE_AFF_TEXT
** 'TEXT' | SQLITE_AFF_TEXT
-** 'BLOB' | SQLITE_AFF_NONE
+** 'BLOB' | SQLITE_AFF_BLOB
** 'REAL' | SQLITE_AFF_REAL
** 'FLOA' | SQLITE_AFF_REAL
** 'DOUB' | SQLITE_AFF_REAL
@@ -91959,7 +93934,7 @@ SQLITE_PRIVATE char sqlite3AffinityType(const char *zIn, u8 *pszEst){
aff = SQLITE_AFF_TEXT;
}else if( h==(('b'<<24)+('l'<<16)+('o'<<8)+'b') /* BLOB */
&& (aff==SQLITE_AFF_NUMERIC || aff==SQLITE_AFF_REAL) ){
- aff = SQLITE_AFF_NONE;
+ aff = SQLITE_AFF_BLOB;
if( zIn[0]=='(' ) zChar = zIn;
#ifndef SQLITE_OMIT_FLOATING_POINT
}else if( h==(('r'<<24)+('e'<<16)+('a'<<8)+'l') /* REAL */
@@ -92061,6 +94036,30 @@ SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse *pParse, ExprSpan *pSpan){
}
/*
+** Backwards Compatibility Hack:
+**
+** Historical versions of SQLite accepted strings as column names in
+** indexes and PRIMARY KEY constraints and in UNIQUE constraints. Example:
+**
+** CREATE TABLE xyz(a,b,c,d,e,PRIMARY KEY('a'),UNIQUE('b','c' COLLATE trim)
+** CREATE INDEX abc ON xyz('c','d' DESC,'e' COLLATE nocase DESC);
+**
+** This is goofy. But to preserve backwards compatibility we continue to
+** accept it. This routine does the necessary conversion. It converts
+** the expression given in its argument from a TK_STRING into a TK_ID
+** if the expression is just a TK_STRING with an optional COLLATE clause.
+** If the epxression is anything other than TK_STRING, the expression is
+** unchanged.
+*/
+static void sqlite3StringToId(Expr *p){
+ if( p->op==TK_STRING ){
+ p->op = TK_ID;
+ }else if( p->op==TK_COLLATE && p->pLeft->op==TK_STRING ){
+ p->pLeft->op = TK_ID;
+ }
+}
+
+/*
** Designate the PRIMARY KEY for the table. pList is a list of names
** of columns that form the primary key. If pList is NULL, then the
** most recently added column of the table is the primary key.
@@ -92104,18 +94103,24 @@ SQLITE_PRIVATE void sqlite3AddPrimaryKey(
}else{
nTerm = pList->nExpr;
for(i=0; i<nTerm; i++){
- for(iCol=0; iCol<pTab->nCol; iCol++){
- if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
- pTab->aCol[iCol].colFlags |= COLFLAG_PRIMKEY;
- zType = pTab->aCol[iCol].zType;
- break;
+ Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[i].pExpr);
+ assert( pCExpr!=0 );
+ sqlite3StringToId(pCExpr);
+ if( pCExpr->op==TK_ID ){
+ const char *zCName = pCExpr->u.zToken;
+ for(iCol=0; iCol<pTab->nCol; iCol++){
+ if( sqlite3StrICmp(zCName, pTab->aCol[iCol].zName)==0 ){
+ pTab->aCol[iCol].colFlags |= COLFLAG_PRIMKEY;
+ zType = pTab->aCol[iCol].zType;
+ break;
+ }
}
}
}
}
if( nTerm==1
&& zType && sqlite3StrICmp(zType, "INTEGER")==0
- && sortOrder==SQLITE_SO_ASC
+ && sortOrder!=SQLITE_SO_DESC
){
pTab->iPKey = iCol;
pTab->keyConf = (u8)onError;
@@ -92128,14 +94133,11 @@ SQLITE_PRIVATE void sqlite3AddPrimaryKey(
"INTEGER PRIMARY KEY");
#endif
}else{
- Vdbe *v = pParse->pVdbe;
Index *p;
- if( v ) pParse->addrSkipPK = sqlite3VdbeAddOp0(v, OP_Noop);
p = sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0,
0, sortOrder, 0);
if( p ){
p->idxType = SQLITE_IDXTYPE_PRIMARYKEY;
- if( v ) sqlite3VdbeJumpHere(v, pParse->addrSkipPK);
}
pList = 0;
}
@@ -92354,7 +94356,7 @@ static char *createTableStmt(sqlite3 *db, Table *p){
zStmt[k++] = '(';
for(pCol=p->aCol, i=0; i<p->nCol; i++, pCol++){
static const char * const azType[] = {
- /* SQLITE_AFF_NONE */ "",
+ /* SQLITE_AFF_BLOB */ "",
/* SQLITE_AFF_TEXT */ " TEXT",
/* SQLITE_AFF_NUMERIC */ " NUM",
/* SQLITE_AFF_INTEGER */ " INT",
@@ -92367,17 +94369,17 @@ static char *createTableStmt(sqlite3 *db, Table *p){
k += sqlite3Strlen30(&zStmt[k]);
zSep = zSep2;
identPut(zStmt, &k, pCol->zName);
- assert( pCol->affinity-SQLITE_AFF_NONE >= 0 );
- assert( pCol->affinity-SQLITE_AFF_NONE < ArraySize(azType) );
- testcase( pCol->affinity==SQLITE_AFF_NONE );
+ assert( pCol->affinity-SQLITE_AFF_BLOB >= 0 );
+ assert( pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType) );
+ testcase( pCol->affinity==SQLITE_AFF_BLOB );
testcase( pCol->affinity==SQLITE_AFF_TEXT );
testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
testcase( pCol->affinity==SQLITE_AFF_INTEGER );
testcase( pCol->affinity==SQLITE_AFF_REAL );
- zType = azType[pCol->affinity - SQLITE_AFF_NONE];
+ zType = azType[pCol->affinity - SQLITE_AFF_BLOB];
len = sqlite3Strlen30(zType);
- assert( pCol->affinity==SQLITE_AFF_NONE
+ assert( pCol->affinity==SQLITE_AFF_BLOB
|| pCol->affinity==sqlite3AffinityType(zType, 0) );
memcpy(&zStmt[k], zType, len);
k += len;
@@ -92485,15 +94487,7 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
*/
if( pParse->addrCrTab ){
assert( v );
- sqlite3VdbeGetOp(v, pParse->addrCrTab)->opcode = OP_CreateIndex;
- }
-
- /* Bypass the creation of the PRIMARY KEY btree and the sqlite_master
- ** table entry.
- */
- if( pParse->addrSkipPK ){
- assert( v );
- sqlite3VdbeGetOp(v, pParse->addrSkipPK)->opcode = OP_Goto;
+ sqlite3VdbeChangeOpcode(v, pParse->addrCrTab, OP_CreateIndex);
}
/* Locate the PRIMARY KEY index. Or, if this table was originally
@@ -92501,10 +94495,12 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
*/
if( pTab->iPKey>=0 ){
ExprList *pList;
- pList = sqlite3ExprListAppend(pParse, 0, 0);
+ Token ipkToken;
+ ipkToken.z = pTab->aCol[pTab->iPKey].zName;
+ ipkToken.n = sqlite3Strlen30(ipkToken.z);
+ pList = sqlite3ExprListAppend(pParse, 0,
+ sqlite3ExprAlloc(db, TK_ID, &ipkToken, 0));
if( pList==0 ) return;
- pList->a[0].zName = sqlite3DbStrDup(pParse->db,
- pTab->aCol[pTab->iPKey].zName);
pList->a[0].sortOrder = pParse->iPkSortOrder;
assert( pParse->pNewTable==pTab );
pPk = sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0);
@@ -92513,6 +94509,16 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
pTab->iPKey = -1;
}else{
pPk = sqlite3PrimaryKeyIndex(pTab);
+
+ /* Bypass the creation of the PRIMARY KEY btree and the sqlite_master
+ ** table entry. This is only required if currently generating VDBE
+ ** code for a CREATE TABLE (not when parsing one as part of reading
+ ** a database schema). */
+ if( v ){
+ assert( db->init.busy==0 );
+ sqlite3VdbeChangeOpcode(v, pPk->tnum, OP_Goto);
+ }
+
/*
** Remove all redundant columns from the PRIMARY KEY. For example, change
** "PRIMARY KEY(a,b,a,b,c,b,c,d)" into just "PRIMARY KEY(a,b,c,d)". Later
@@ -92620,9 +94626,10 @@ SQLITE_PRIVATE void sqlite3EndTable(
int iDb; /* Database in which the table lives */
Index *pIdx; /* An implied index of the table */
- if( (pEnd==0 && pSelect==0) || db->mallocFailed ){
+ if( pEnd==0 && pSelect==0 ){
return;
}
+ assert( !db->mallocFailed );
p = pParse->pNewTable;
if( p==0 ) return;
@@ -92648,7 +94655,7 @@ SQLITE_PRIVATE void sqlite3EndTable(
if( (p->tabFlags & TF_HasPrimaryKey)==0 ){
sqlite3ErrorMsg(pParse, "PRIMARY KEY missing on table %s", p->zName);
}else{
- p->tabFlags |= TF_WithoutRowid;
+ p->tabFlags |= TF_WithoutRowid | TF_NoVisibleRowid;
convertToWithoutRowidTable(pParse, p);
}
}
@@ -92716,26 +94723,46 @@ SQLITE_PRIVATE void sqlite3EndTable(
** be redundant.
*/
if( pSelect ){
- SelectDest dest;
- Table *pSelTab;
-
+ SelectDest dest; /* Where the SELECT should store results */
+ int regYield; /* Register holding co-routine entry-point */
+ int addrTop; /* Top of the co-routine */
+ int regRec; /* A record to be insert into the new table */
+ int regRowid; /* Rowid of the next row to insert */
+ int addrInsLoop; /* Top of the loop for inserting rows */
+ Table *pSelTab; /* A table that describes the SELECT results */
+
+ regYield = ++pParse->nMem;
+ regRec = ++pParse->nMem;
+ regRowid = ++pParse->nMem;
assert(pParse->nTab==1);
+ sqlite3MayAbort(pParse);
sqlite3VdbeAddOp3(v, OP_OpenWrite, 1, pParse->regRoot, iDb);
sqlite3VdbeChangeP5(v, OPFLAG_P2ISREG);
pParse->nTab = 2;
- sqlite3SelectDestInit(&dest, SRT_Table, 1);
+ addrTop = sqlite3VdbeCurrentAddr(v) + 1;
+ sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop);
+ sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield);
sqlite3Select(pParse, pSelect, &dest);
+ sqlite3VdbeAddOp1(v, OP_EndCoroutine, regYield);
+ sqlite3VdbeJumpHere(v, addrTop - 1);
+ if( pParse->nErr ) return;
+ pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect);
+ if( pSelTab==0 ) return;
+ assert( p->aCol==0 );
+ p->nCol = pSelTab->nCol;
+ p->aCol = pSelTab->aCol;
+ pSelTab->nCol = 0;
+ pSelTab->aCol = 0;
+ sqlite3DeleteTable(db, pSelTab);
+ addrInsLoop = sqlite3VdbeAddOp1(v, OP_Yield, dest.iSDParm);
+ VdbeCoverage(v);
+ sqlite3VdbeAddOp3(v, OP_MakeRecord, dest.iSdst, dest.nSdst, regRec);
+ sqlite3TableAffinity(v, p, 0);
+ sqlite3VdbeAddOp2(v, OP_NewRowid, 1, regRowid);
+ sqlite3VdbeAddOp3(v, OP_Insert, 1, regRec, regRowid);
+ sqlite3VdbeGoto(v, addrInsLoop);
+ sqlite3VdbeJumpHere(v, addrInsLoop);
sqlite3VdbeAddOp1(v, OP_Close, 1);
- if( pParse->nErr==0 ){
- pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect);
- if( pSelTab==0 ) return;
- assert( p->aCol==0 );
- p->nCol = pSelTab->nCol;
- p->aCol = pSelTab->aCol;
- pSelTab->nCol = 0;
- pSelTab->aCol = 0;
- sqlite3DeleteTable(db, pSelTab);
- }
}
/* Compute the complete text of the CREATE statement */
@@ -92830,6 +94857,7 @@ SQLITE_PRIVATE void sqlite3CreateView(
Token *pBegin, /* The CREATE token that begins the statement */
Token *pName1, /* The token that holds the name of the view */
Token *pName2, /* The token that holds the name of the view */
+ ExprList *pCNames, /* Optional list of view column names */
Select *pSelect, /* A SELECT statement that will become the new view */
int isTemp, /* TRUE for a TEMPORARY view */
int noErr /* Suppress error messages if VIEW already exists */
@@ -92845,22 +94873,15 @@ SQLITE_PRIVATE void sqlite3CreateView(
if( pParse->nVar>0 ){
sqlite3ErrorMsg(pParse, "parameters are not allowed in views");
- sqlite3SelectDelete(db, pSelect);
- return;
+ goto create_view_fail;
}
sqlite3StartTable(pParse, pName1, pName2, isTemp, 1, 0, noErr);
p = pParse->pNewTable;
- if( p==0 || pParse->nErr ){
- sqlite3SelectDelete(db, pSelect);
- return;
- }
+ if( p==0 || pParse->nErr ) goto create_view_fail;
sqlite3TwoPartName(pParse, pName1, pName2, &pName);
iDb = sqlite3SchemaToIndex(db, p->pSchema);
sqlite3FixInit(&sFix, pParse, iDb, "view", pName);
- if( sqlite3FixSelect(&sFix, pSelect) ){
- sqlite3SelectDelete(db, pSelect);
- return;
- }
+ if( sqlite3FixSelect(&sFix, pSelect) ) goto create_view_fail;
/* Make a copy of the entire SELECT statement that defines the view.
** This will force all the Expr.token.z values to be dynamically
@@ -92868,30 +94889,31 @@ SQLITE_PRIVATE void sqlite3CreateView(
** they will persist after the current sqlite3_exec() call returns.
*/
p->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
- sqlite3SelectDelete(db, pSelect);
- if( db->mallocFailed ){
- return;
- }
- if( !db->init.busy ){
- sqlite3ViewGetColumnNames(pParse, p);
- }
+ p->pCheck = sqlite3ExprListDup(db, pCNames, EXPRDUP_REDUCE);
+ if( db->mallocFailed ) goto create_view_fail;
/* Locate the end of the CREATE VIEW statement. Make sEnd point to
** the end.
*/
sEnd = pParse->sLastToken;
- if( ALWAYS(sEnd.z[0]!=0) && sEnd.z[0]!=';' ){
+ assert( sEnd.z[0]!=0 );
+ if( sEnd.z[0]!=';' ){
sEnd.z += sEnd.n;
}
sEnd.n = 0;
n = (int)(sEnd.z - pBegin->z);
+ assert( n>0 );
z = pBegin->z;
- while( ALWAYS(n>0) && sqlite3Isspace(z[n-1]) ){ n--; }
+ while( sqlite3Isspace(z[n-1]) ){ n--; }
sEnd.z = &z[n-1];
sEnd.n = 1;
/* Use sqlite3EndTable() to add the view to the SQLITE_MASTER table */
sqlite3EndTable(pParse, 0, &sEnd, 0, 0);
+
+create_view_fail:
+ sqlite3SelectDelete(db, pSelect);
+ sqlite3ExprListDelete(db, pCNames);
return;
}
#endif /* SQLITE_OMIT_VIEW */
@@ -92909,6 +94931,7 @@ SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
int n; /* Temporarily holds the number of cursors assigned */
sqlite3 *db = pParse->db; /* Database connection for malloc errors */
sqlite3_xauth xAuth; /* Saved xAuth pointer */
+ u8 bEnabledLA; /* Saved db->lookaside.bEnabled state */
assert( pTable );
@@ -92954,40 +94977,46 @@ SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
** statement that defines the view.
*/
assert( pTable->pSelect );
- pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
- if( pSel ){
- u8 enableLookaside = db->lookaside.bEnabled;
- n = pParse->nTab;
- sqlite3SrcListAssignCursors(pParse, pSel->pSrc);
- pTable->nCol = -1;
+ bEnabledLA = db->lookaside.bEnabled;
+ if( pTable->pCheck ){
db->lookaside.bEnabled = 0;
+ sqlite3ColumnsFromExprList(pParse, pTable->pCheck,
+ &pTable->nCol, &pTable->aCol);
+ }else{
+ pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
+ if( pSel ){
+ n = pParse->nTab;
+ sqlite3SrcListAssignCursors(pParse, pSel->pSrc);
+ pTable->nCol = -1;
+ db->lookaside.bEnabled = 0;
#ifndef SQLITE_OMIT_AUTHORIZATION
- xAuth = db->xAuth;
- db->xAuth = 0;
- pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
- db->xAuth = xAuth;
+ xAuth = db->xAuth;
+ db->xAuth = 0;
+ pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
+ db->xAuth = xAuth;
#else
- pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
+ pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
#endif
- db->lookaside.bEnabled = enableLookaside;
- pParse->nTab = n;
- if( pSelTab ){
- assert( pTable->aCol==0 );
- pTable->nCol = pSelTab->nCol;
- pTable->aCol = pSelTab->aCol;
- pSelTab->nCol = 0;
- pSelTab->aCol = 0;
- sqlite3DeleteTable(db, pSelTab);
- assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) );
- pTable->pSchema->schemaFlags |= DB_UnresetViews;
- }else{
- pTable->nCol = 0;
+ pParse->nTab = n;
+ if( pSelTab ){
+ assert( pTable->aCol==0 );
+ pTable->nCol = pSelTab->nCol;
+ pTable->aCol = pSelTab->aCol;
+ pSelTab->nCol = 0;
+ pSelTab->aCol = 0;
+ sqlite3DeleteTable(db, pSelTab);
+ assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) );
+ }else{
+ pTable->nCol = 0;
+ nErr++;
+ }
+ sqlite3SelectDelete(db, pSel);
+ } else {
nErr++;
}
- sqlite3SelectDelete(db, pSel);
- } else {
- nErr++;
}
+ db->lookaside.bEnabled = bEnabledLA;
+ pTable->pSchema->schemaFlags |= DB_UnresetViews;
#endif /* SQLITE_OMIT_VIEW */
return nErr;
}
@@ -93004,7 +95033,7 @@ static void sqliteViewResetAll(sqlite3 *db, int idx){
for(i=sqliteHashFirst(&db->aDb[idx].pSchema->tblHash); i;i=sqliteHashNext(i)){
Table *pTab = sqliteHashData(i);
if( pTab->pSelect ){
- sqliteDeleteColumnNames(db, pTab);
+ sqlite3DeleteColumnNames(db, pTab);
pTab->aCol = 0;
pTab->nCol = 0;
}
@@ -93559,7 +95588,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
assert( pKey!=0 || db->mallocFailed || pParse->nErr );
if( IsUniqueIndex(pIndex) && pKey!=0 ){
int j2 = sqlite3VdbeCurrentAddr(v) + 3;
- sqlite3VdbeAddOp2(v, OP_Goto, 0, j2);
+ sqlite3VdbeGoto(v, j2);
addr2 = sqlite3VdbeCurrentAddr(v);
sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,
pIndex->nKeyCol); VdbeCoverage(v);
@@ -93656,7 +95685,6 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
int iDb; /* Index of the database that is being written */
Token *pName = 0; /* Unqualified name of the index to create */
struct ExprList_item *pListItem; /* For looping over pList */
- const Column *pTabCol; /* A column in the table */
int nExtra = 0; /* Space allocated for zExtra[] */
int nExtraCol; /* Number of extra columns needed */
char *zExtra = 0; /* Extra space after the Index object */
@@ -93811,11 +95839,16 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
** So create a fake list to simulate this.
*/
if( pList==0 ){
- pList = sqlite3ExprListAppend(pParse, 0, 0);
+ Token prevCol;
+ prevCol.z = pTab->aCol[pTab->nCol-1].zName;
+ prevCol.n = sqlite3Strlen30(prevCol.z);
+ pList = sqlite3ExprListAppend(pParse, 0,
+ sqlite3ExprAlloc(db, TK_ID, &prevCol, 0));
if( pList==0 ) goto exit_create_index;
- pList->a[0].zName = sqlite3DbStrDup(pParse->db,
- pTab->aCol[pTab->nCol-1].zName);
- pList->a[0].sortOrder = (u8)sortOrder;
+ assert( pList->nExpr==1 );
+ sqlite3ExprListSetSortOrder(pList, sortOrder);
+ }else{
+ sqlite3ExprListCheckLength(pParse, pList, "index");
}
/* Figure out how many bytes of space are required to store explicitly
@@ -93823,8 +95856,8 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
*/
for(i=0; i<pList->nExpr; i++){
Expr *pExpr = pList->a[i].pExpr;
- if( pExpr ){
- assert( pExpr->op==TK_COLLATE );
+ assert( pExpr!=0 );
+ if( pExpr->op==TK_COLLATE ){
nExtra += (1 + sqlite3Strlen30(pExpr->u.zToken));
}
}
@@ -93865,35 +95898,54 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
sortOrderMask = 0; /* Ignore DESC */
}
- /* Scan the names of the columns of the table to be indexed and
- ** load the column indices into the Index structure. Report an error
- ** if any column is not found.
+ /* Analyze the list of expressions that form the terms of the index and
+ ** report any errors. In the common case where the expression is exactly
+ ** a table column, store that column in aiColumn[]. For general expressions,
+ ** populate pIndex->aColExpr and store XN_EXPR (-2) in aiColumn[].
**
- ** TODO: Add a test to make sure that the same column is not named
- ** more than once within the same index. Only the first instance of
- ** the column will ever be used by the optimizer. Note that using the
- ** same column more than once cannot be an error because that would
- ** break backwards compatibility - it needs to be a warning.
+ ** TODO: Issue a warning if two or more columns of the index are identical.
+ ** TODO: Issue a warning if the table primary key is used as part of the
+ ** index key.
*/
for(i=0, pListItem=pList->a; i<pList->nExpr; i++, pListItem++){
- const char *zColName = pListItem->zName;
- int requestedSortOrder;
+ Expr *pCExpr; /* The i-th index expression */
+ int requestedSortOrder; /* ASC or DESC on the i-th expression */
char *zColl; /* Collation sequence name */
- for(j=0, pTabCol=pTab->aCol; j<pTab->nCol; j++, pTabCol++){
- if( sqlite3StrICmp(zColName, pTabCol->zName)==0 ) break;
- }
- if( j>=pTab->nCol ){
- sqlite3ErrorMsg(pParse, "table %s has no column named %s",
- pTab->zName, zColName);
- pParse->checkSchema = 1;
- goto exit_create_index;
+ sqlite3StringToId(pListItem->pExpr);
+ sqlite3ResolveSelfReference(pParse, pTab, NC_IdxExpr, pListItem->pExpr, 0);
+ if( pParse->nErr ) goto exit_create_index;
+ pCExpr = sqlite3ExprSkipCollate(pListItem->pExpr);
+ if( pCExpr->op!=TK_COLUMN ){
+ if( pTab==pParse->pNewTable ){
+ sqlite3ErrorMsg(pParse, "expressions prohibited in PRIMARY KEY and "
+ "UNIQUE constraints");
+ goto exit_create_index;
+ }
+ if( pIndex->aColExpr==0 ){
+ ExprList *pCopy = sqlite3ExprListDup(db, pList, 0);
+ pIndex->aColExpr = pCopy;
+ if( !db->mallocFailed ){
+ assert( pCopy!=0 );
+ pListItem = &pCopy->a[i];
+ }
+ }
+ j = XN_EXPR;
+ pIndex->aiColumn[i] = XN_EXPR;
+ pIndex->uniqNotNull = 0;
+ }else{
+ j = pCExpr->iColumn;
+ assert( j<=0x7fff );
+ if( j<0 ){
+ j = pTab->iPKey;
+ }else if( pTab->aCol[j].notNull==0 ){
+ pIndex->uniqNotNull = 0;
+ }
+ pIndex->aiColumn[i] = (i16)j;
}
- assert( j<=0x7fff );
- pIndex->aiColumn[i] = (i16)j;
- if( pListItem->pExpr ){
+ zColl = 0;
+ if( pListItem->pExpr->op==TK_COLLATE ){
int nColl;
- assert( pListItem->pExpr->op==TK_COLLATE );
zColl = pListItem->pExpr->u.zToken;
nColl = sqlite3Strlen30(zColl) + 1;
assert( nExtra>=nColl );
@@ -93901,21 +95953,26 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
zColl = zExtra;
zExtra += nColl;
nExtra -= nColl;
- }else{
+ }else if( j>=0 ){
zColl = pTab->aCol[j].zColl;
- if( !zColl ) zColl = "BINARY";
}
+ if( !zColl ) zColl = "BINARY";
if( !db->init.busy && !sqlite3LocateCollSeq(pParse, zColl) ){
goto exit_create_index;
}
pIndex->azColl[i] = zColl;
requestedSortOrder = pListItem->sortOrder & sortOrderMask;
pIndex->aSortOrder[i] = (u8)requestedSortOrder;
- if( pTab->aCol[j].notNull==0 ) pIndex->uniqNotNull = 0;
}
+
+ /* Append the table key to the end of the index. For WITHOUT ROWID
+ ** tables (when pPk!=0) this will be the declared PRIMARY KEY. For
+ ** normal tables (when pPk==0) this will be the rowid.
+ */
if( pPk ){
for(j=0; j<pPk->nKeyCol; j++){
int x = pPk->aiColumn[j];
+ assert( x>=0 );
if( hasColumn(pIndex->aiColumn, pIndex->nKeyCol, x) ){
pIndex->nColumn--;
}else{
@@ -93927,7 +95984,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
}
assert( i==pIndex->nColumn );
}else{
- pIndex->aiColumn[i] = -1;
+ pIndex->aiColumn[i] = XN_ROWID;
pIndex->azColl[i] = "BINARY";
}
sqlite3DefaultRowEst(pIndex);
@@ -93966,6 +96023,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
for(k=0; k<pIdx->nKeyCol; k++){
const char *z1;
const char *z2;
+ assert( pIdx->aiColumn[k]>=0 );
if( pIdx->aiColumn[k]!=pIndex->aiColumn[k] ) break;
z1 = pIdx->azColl[k];
z2 = pIndex->azColl[k];
@@ -93997,6 +96055,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
/* Link the new Index structure to its table and to the other
** in-memory database structures.
*/
+ assert( pParse->nErr==0 );
if( db->init.busy ){
Index *p;
assert( sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );
@@ -94026,7 +96085,7 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
** has just been created, it contains no data and the index initialization
** step can be skipped.
*/
- else if( pParse->nErr==0 && (HasRowid(pTab) || pTblName!=0) ){
+ else if( HasRowid(pTab) || pTblName!=0 ){
Vdbe *v;
char *zStmt;
int iMem = ++pParse->nMem;
@@ -94034,10 +96093,15 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
v = sqlite3GetVdbe(pParse);
if( v==0 ) goto exit_create_index;
-
- /* Create the rootpage for the index
- */
sqlite3BeginWriteOperation(pParse, 1, iDb);
+
+ /* Create the rootpage for the index using CreateIndex. But before
+ ** doing so, code a Noop instruction and store its address in
+ ** Index.tnum. This is required in case this index is actually a
+ ** PRIMARY KEY and the table is actually a WITHOUT ROWID table. In
+ ** that case the convertToWithoutRowidTable() routine will replace
+ ** the Noop with a Goto to jump over the VDBE code generated below. */
+ pIndex->tnum = sqlite3VdbeAddOp0(v, OP_Noop);
sqlite3VdbeAddOp2(v, OP_CreateIndex, iDb, iMem);
/* Gather the complete text of the CREATE INDEX statement into
@@ -94077,6 +96141,8 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName));
sqlite3VdbeAddOp1(v, OP_Expire, 0);
}
+
+ sqlite3VdbeJumpHere(v, pIndex->tnum);
}
/* When adding an index to the list of indices for a table, make
@@ -94479,7 +96545,8 @@ SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
sqlite3DbFree(db, pItem->zDatabase);
sqlite3DbFree(db, pItem->zName);
sqlite3DbFree(db, pItem->zAlias);
- sqlite3DbFree(db, pItem->zIndex);
+ if( pItem->fg.isIndexedBy ) sqlite3DbFree(db, pItem->u1.zIndexedBy);
+ if( pItem->fg.isTabFunc ) sqlite3ExprListDelete(db, pItem->u1.pFuncArg);
sqlite3DeleteTable(db, pItem->pTab);
sqlite3SelectDelete(db, pItem->pSelect);
sqlite3ExprDelete(db, pItem->pOn);
@@ -94552,18 +96619,38 @@ SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *pParse, SrcList *p, Token *pI
assert( pIndexedBy!=0 );
if( p && ALWAYS(p->nSrc>0) ){
struct SrcList_item *pItem = &p->a[p->nSrc-1];
- assert( pItem->notIndexed==0 && pItem->zIndex==0 );
+ assert( pItem->fg.notIndexed==0 );
+ assert( pItem->fg.isIndexedBy==0 );
+ assert( pItem->fg.isTabFunc==0 );
if( pIndexedBy->n==1 && !pIndexedBy->z ){
/* A "NOT INDEXED" clause was supplied. See parse.y
** construct "indexed_opt" for details. */
- pItem->notIndexed = 1;
+ pItem->fg.notIndexed = 1;
}else{
- pItem->zIndex = sqlite3NameFromToken(pParse->db, pIndexedBy);
+ pItem->u1.zIndexedBy = sqlite3NameFromToken(pParse->db, pIndexedBy);
+ pItem->fg.isIndexedBy = (pItem->u1.zIndexedBy!=0);
}
}
}
/*
+** Add the list of function arguments to the SrcList entry for a
+** table-valued-function.
+*/
+SQLITE_PRIVATE void sqlite3SrcListFuncArgs(Parse *pParse, SrcList *p, ExprList *pList){
+ if( p && pList ){
+ struct SrcList_item *pItem = &p->a[p->nSrc-1];
+ assert( pItem->fg.notIndexed==0 );
+ assert( pItem->fg.isIndexedBy==0 );
+ assert( pItem->fg.isTabFunc==0 );
+ pItem->u1.pFuncArg = pList;
+ pItem->fg.isTabFunc = 1;
+ }else{
+ sqlite3ExprListDelete(pParse->db, pList);
+ }
+}
+
+/*
** When building up a FROM clause in the parser, the join operator
** is initially attached to the left operand. But the code generator
** expects the join operator to be on the right operand. This routine
@@ -94582,9 +96669,9 @@ SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList *p){
if( p ){
int i;
for(i=p->nSrc-1; i>0; i--){
- p->a[i].jointype = p->a[i-1].jointype;
+ p->a[i].fg.jointype = p->a[i-1].fg.jointype;
}
- p->a[0].jointype = 0;
+ p->a[0].fg.jointype = 0;
}
}
@@ -94828,12 +96915,16 @@ SQLITE_PRIVATE void sqlite3UniqueConstraint(
Table *pTab = pIdx->pTable;
sqlite3StrAccumInit(&errMsg, pParse->db, 0, 0, 200);
- for(j=0; j<pIdx->nKeyCol; j++){
- char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
- if( j ) sqlite3StrAccumAppend(&errMsg, ", ", 2);
- sqlite3StrAccumAppendAll(&errMsg, pTab->zName);
- sqlite3StrAccumAppend(&errMsg, ".", 1);
- sqlite3StrAccumAppendAll(&errMsg, zCol);
+ if( pIdx->aColExpr ){
+ sqlite3XPrintf(&errMsg, 0, "index '%q'", pIdx->zName);
+ }else{
+ for(j=0; j<pIdx->nKeyCol; j++){
+ char *zCol;
+ assert( pIdx->aiColumn[j]>=0 );
+ zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
+ if( j ) sqlite3StrAccumAppend(&errMsg, ", ", 2);
+ sqlite3XPrintf(&errMsg, 0, "%s.%s", pTab->zName, zCol);
+ }
}
zErr = sqlite3StrAccumFinish(&errMsg);
sqlite3HaltConstraint(pParse,
@@ -95078,7 +97169,7 @@ SQLITE_PRIVATE With *sqlite3WithAdd(
pNew->a[pNew->nCte].pSelect = pQuery;
pNew->a[pNew->nCte].pCols = pArglist;
pNew->a[pNew->nCte].zName = zName;
- pNew->a[pNew->nCte].zErr = 0;
+ pNew->a[pNew->nCte].zCteErr = 0;
pNew->nCte++;
}
@@ -95120,6 +97211,7 @@ SQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){
** of user defined functions and collation sequences.
*/
+/* #include "sqliteInt.h" */
/*
** Invoke the 'collation needed' callback to request a collation sequence
@@ -95597,6 +97689,7 @@ SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
*/
+/* #include "sqliteInt.h" */
/*
** While a SrcList can in general represent multiple tables and subqueries
@@ -95819,7 +97912,7 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
int iDb; /* Database number */
int memCnt = -1; /* Memory cell used for change counting */
int rcauth; /* Value returned by authorization callback */
- int okOnePass; /* True for one-pass algorithm without the FIFO */
+ int eOnePass; /* ONEPASS_OFF or _SINGLE or _MULTI */
int aiCurOnePass[2]; /* The write cursors opened by WHERE_ONEPASS */
u8 *aToOpen = 0; /* Open cursor iTabCur+j if aToOpen[j] is true */
Index *pPk; /* The PRIMARY KEY index on the table */
@@ -95831,12 +97924,12 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
int iRowSet = 0; /* Register for rowset of rows to delete */
int addrBypass = 0; /* Address of jump over the delete logic */
int addrLoop = 0; /* Top of the delete loop */
- int addrDelete = 0; /* Jump directly to the delete logic */
int addrEphOpen = 0; /* Instruction to open the Ephemeral table */
#ifndef SQLITE_OMIT_TRIGGER
int isView; /* True if attempting to delete from a view */
Trigger *pTrigger; /* List of table triggers, if required */
+ int bComplex; /* True if there are either triggers or FKs */
#endif
memset(&sContext, 0, sizeof(sContext));
@@ -95860,9 +97953,11 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
#ifndef SQLITE_OMIT_TRIGGER
pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
isView = pTab->pSelect!=0;
+ bComplex = pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0);
#else
# define pTrigger 0
# define isView 0
+# define bComplex 0
#endif
#ifdef SQLITE_OMIT_VIEW
# undef isView
@@ -95943,8 +98038,10 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
** It is easier just to erase the whole table. Prior to version 3.6.5,
** this optimization caused the row change count (the value returned by
** API function sqlite3_count_changes) to be set incorrectly. */
- if( rcauth==SQLITE_OK && pWhere==0 && !pTrigger && !IsVirtual(pTab)
- && 0==sqlite3FkRequired(pParse, pTab, 0, 0)
+ if( rcauth==SQLITE_OK
+ && pWhere==0
+ && !bComplex
+ && !IsVirtual(pTab)
){
assert( !isView );
sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
@@ -95959,6 +98056,8 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
}else
#endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */
{
+ u16 wcf = WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK;
+ wcf |= (bComplex ? 0 : WHERE_ONEPASS_MULTIROW);
if( HasRowid(pTab) ){
/* For a rowid table, initialize the RowSet to an empty set */
pPk = 0;
@@ -95979,13 +98078,18 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
}
/* Construct a query to find the rowid or primary key for every row
- ** to be deleted, based on the WHERE clause.
+ ** to be deleted, based on the WHERE clause. Set variable eOnePass
+ ** to indicate the strategy used to implement this delete:
+ **
+ ** ONEPASS_OFF: Two-pass approach - use a FIFO for rowids/PK values.
+ ** ONEPASS_SINGLE: One-pass approach - at most one row deleted.
+ ** ONEPASS_MULTI: One-pass approach - any number of rows may be deleted.
*/
- pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, 0,
- WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK,
- iTabCur+1);
+ pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, 0, wcf, iTabCur+1);
if( pWInfo==0 ) goto delete_from_cleanup;
- okOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);
+ eOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);
+ assert( IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI );
+ assert( IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF );
/* Keep track of the number of rows to be deleted */
if( db->flags & SQLITE_CountRows ){
@@ -95995,6 +98099,7 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
/* Extract the rowid or primary key for the current row */
if( pPk ){
for(i=0; i<nPk; i++){
+ assert( pPk->aiColumn[i]>=0 );
sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,
pPk->aiColumn[i], iPk+i);
}
@@ -96005,11 +98110,10 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
if( iKey>pParse->nMem ) pParse->nMem = iKey;
}
- if( okOnePass ){
- /* For ONEPASS, no need to store the rowid/primary-key. There is only
+ if( eOnePass!=ONEPASS_OFF ){
+ /* For ONEPASS, no need to store the rowid/primary-key. There is only
** one, so just keep it in its register(s) and fall through to the
- ** delete code.
- */
+ ** delete code. */
nKey = nPk; /* OP_Found will use an unpacked key */
aToOpen = sqlite3DbMallocRaw(db, nIdx+2);
if( aToOpen==0 ){
@@ -96021,27 +98125,27 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
if( aiCurOnePass[0]>=0 ) aToOpen[aiCurOnePass[0]-iTabCur] = 0;
if( aiCurOnePass[1]>=0 ) aToOpen[aiCurOnePass[1]-iTabCur] = 0;
if( addrEphOpen ) sqlite3VdbeChangeToNoop(v, addrEphOpen);
- addrDelete = sqlite3VdbeAddOp0(v, OP_Goto); /* Jump to DELETE logic */
- }else if( pPk ){
- /* Construct a composite key for the row to be deleted and remember it */
- iKey = ++pParse->nMem;
- nKey = 0; /* Zero tells OP_Found to use a composite key */
- sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, iKey,
- sqlite3IndexAffinityStr(v, pPk), nPk);
- sqlite3VdbeAddOp2(v, OP_IdxInsert, iEphCur, iKey);
}else{
- /* Get the rowid of the row to be deleted and remember it in the RowSet */
- nKey = 1; /* OP_Seek always uses a single rowid */
- sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, iKey);
+ if( pPk ){
+ /* Add the PK key for this row to the temporary table */
+ iKey = ++pParse->nMem;
+ nKey = 0; /* Zero tells OP_Found to use a composite key */
+ sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, iKey,
+ sqlite3IndexAffinityStr(pParse->db, pPk), nPk);
+ sqlite3VdbeAddOp2(v, OP_IdxInsert, iEphCur, iKey);
+ }else{
+ /* Add the rowid of the row to be deleted to the RowSet */
+ nKey = 1; /* OP_Seek always uses a single rowid */
+ sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, iKey);
+ }
}
- /* End of the WHERE loop */
- sqlite3WhereEnd(pWInfo);
- if( okOnePass ){
- /* Bypass the delete logic below if the WHERE loop found zero rows */
+ /* If this DELETE cannot use the ONEPASS strategy, this is the
+ ** end of the WHERE loop */
+ if( eOnePass!=ONEPASS_OFF ){
addrBypass = sqlite3VdbeMakeLabel(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrBypass);
- sqlite3VdbeJumpHere(v, addrDelete);
+ }else{
+ sqlite3WhereEnd(pWInfo);
}
/* Unless this is a view, open cursors for the table we are
@@ -96050,21 +98154,24 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
** triggers.
*/
if( !isView ){
+ int iAddrOnce = 0;
+ if( eOnePass==ONEPASS_MULTI ){
+ iAddrOnce = sqlite3CodeOnce(pParse); VdbeCoverage(v);
+ }
testcase( IsVirtual(pTab) );
sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, iTabCur, aToOpen,
&iDataCur, &iIdxCur);
assert( pPk || IsVirtual(pTab) || iDataCur==iTabCur );
assert( pPk || IsVirtual(pTab) || iIdxCur==iDataCur+1 );
+ if( eOnePass==ONEPASS_MULTI ) sqlite3VdbeJumpHere(v, iAddrOnce);
}
/* Set up a loop over the rowids/primary-keys that were found in the
** where-clause loop above.
*/
- if( okOnePass ){
- /* Just one row. Hence the top-of-loop is a no-op */
+ if( eOnePass!=ONEPASS_OFF ){
assert( nKey==nPk ); /* OP_Found will use an unpacked key */
- assert( !IsVirtual(pTab) );
- if( aToOpen[iDataCur-iTabCur] ){
+ if( !IsVirtual(pTab) && aToOpen[iDataCur-iTabCur] ){
assert( pPk!=0 || pTab->pSelect!=0 );
sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);
VdbeCoverage(v);
@@ -96086,23 +98193,32 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(
sqlite3VtabMakeWritable(pParse, pTab);
sqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iKey, pVTab, P4_VTAB);
sqlite3VdbeChangeP5(v, OE_Abort);
+ assert( eOnePass==ONEPASS_OFF || eOnePass==ONEPASS_SINGLE );
sqlite3MayAbort(pParse);
+ if( eOnePass==ONEPASS_SINGLE && sqlite3IsToplevel(pParse) ){
+ pParse->isMultiWrite = 0;
+ }
}else
#endif
{
int count = (pParse->nested==0); /* True to count changes */
+ int iIdxNoSeek = -1;
+ if( bComplex==0 && aiCurOnePass[1]!=iDataCur ){
+ iIdxNoSeek = aiCurOnePass[1];
+ }
sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
- iKey, nKey, count, OE_Default, okOnePass);
+ iKey, nKey, count, OE_Default, eOnePass, iIdxNoSeek);
}
/* End of the loop over all rowids/primary-keys. */
- if( okOnePass ){
+ if( eOnePass!=ONEPASS_OFF ){
sqlite3VdbeResolveLabel(v, addrBypass);
+ sqlite3WhereEnd(pWInfo);
}else if( pPk ){
sqlite3VdbeAddOp2(v, OP_Next, iEphCur, addrLoop+1); VdbeCoverage(v);
sqlite3VdbeJumpHere(v, addrLoop);
}else{
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrLoop);
+ sqlite3VdbeGoto(v, addrLoop);
sqlite3VdbeJumpHere(v, addrLoop);
}
@@ -96169,6 +98285,25 @@ delete_from_cleanup:
** sequence of nPk memory cells starting at iPk. If nPk==0 that means
** that a search record formed from OP_MakeRecord is contained in the
** single memory location iPk.
+**
+** eMode:
+** Parameter eMode may be passed either ONEPASS_OFF (0), ONEPASS_SINGLE, or
+** ONEPASS_MULTI. If eMode is not ONEPASS_OFF, then the cursor
+** iDataCur already points to the row to delete. If eMode is ONEPASS_OFF
+** then this function must seek iDataCur to the entry identified by iPk
+** and nPk before reading from it.
+**
+** If eMode is ONEPASS_MULTI, then this call is being made as part
+** of a ONEPASS delete that affects multiple rows. In this case, if
+** iIdxNoSeek is a valid cursor number (>=0), then its position should
+** be preserved following the delete operation. Or, if iIdxNoSeek is not
+** a valid cursor number, the position of iDataCur should be preserved
+** instead.
+**
+** iIdxNoSeek:
+** If iIdxNoSeek is a valid cursor number (>=0), then it identifies an
+** index cursor (from within array of cursors starting at iIdxCur) that
+** already points to the index entry to be deleted.
*/
SQLITE_PRIVATE void sqlite3GenerateRowDelete(
Parse *pParse, /* Parsing context */
@@ -96180,7 +98315,8 @@ SQLITE_PRIVATE void sqlite3GenerateRowDelete(
i16 nPk, /* Number of PRIMARY KEY memory cells */
u8 count, /* If non-zero, increment the row change counter */
u8 onconf, /* Default ON CONFLICT policy for triggers */
- u8 bNoSeek /* iDataCur is already pointing to the row to delete */
+ u8 eMode, /* ONEPASS_OFF, _SINGLE, or _MULTI. See above */
+ int iIdxNoSeek /* Cursor number of cursor that does not need seeking */
){
Vdbe *v = pParse->pVdbe; /* Vdbe */
int iOld = 0; /* First register in OLD.* array */
@@ -96197,7 +98333,7 @@ SQLITE_PRIVATE void sqlite3GenerateRowDelete(
** not attempt to delete it or fire any DELETE triggers. */
iLabel = sqlite3VdbeMakeLabel(v);
opSeek = HasRowid(pTab) ? OP_NotExists : OP_NotFound;
- if( !bNoSeek ){
+ if( eMode==ONEPASS_OFF ){
sqlite3VdbeAddOp4Int(v, opSeek, iDataCur, iLabel, iPk, nPk);
VdbeCoverageIf(v, opSeek==OP_NotExists);
VdbeCoverageIf(v, opSeek==OP_NotFound);
@@ -96257,11 +98393,15 @@ SQLITE_PRIVATE void sqlite3GenerateRowDelete(
** a view (in which case the only effect of the DELETE statement is to
** fire the INSTEAD OF triggers). */
if( pTab->pSelect==0 ){
- sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, 0);
+ sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,iIdxNoSeek);
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, (count?OPFLAG_NCHANGE:0));
if( count ){
sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
}
+ if( iIdxNoSeek>=0 ){
+ sqlite3VdbeAddOp1(v, OP_Delete, iIdxNoSeek);
+ }
+ sqlite3VdbeChangeP5(v, eMode==ONEPASS_MULTI);
}
/* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
@@ -96304,7 +98444,8 @@ SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
Table *pTab, /* Table containing the row to be deleted */
int iDataCur, /* Cursor of table holding data. */
int iIdxCur, /* First index cursor */
- int *aRegIdx /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
+ int *aRegIdx, /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
+ int iIdxNoSeek /* Do not delete from this cursor */
){
int i; /* Index loop counter */
int r1 = -1; /* Register holding an index key */
@@ -96320,11 +98461,12 @@ SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
assert( iIdxCur+i!=iDataCur || pPk==pIdx );
if( aRegIdx!=0 && aRegIdx[i]==0 ) continue;
if( pIdx==pPk ) continue;
+ if( iIdxCur+i==iIdxNoSeek ) continue;
VdbeModuleComment((v, "GenRowIdxDel for %s", pIdx->zName));
r1 = sqlite3GenerateIndexKey(pParse, pIdx, iDataCur, 0, 1,
- &iPartIdxLabel, pPrior, r1);
+ &iPartIdxLabel, pPrior, r1);
sqlite3VdbeAddOp3(v, OP_IdxDelete, iIdxCur+i, r1,
- pIdx->uniqNotNull ? pIdx->nKeyCol : pIdx->nColumn);
+ pIdx->uniqNotNull ? pIdx->nKeyCol : pIdx->nColumn);
sqlite3ResolvePartIdxLabel(pParse, iPartIdxLabel);
pPrior = pIdx;
}
@@ -96373,17 +98515,16 @@ SQLITE_PRIVATE int sqlite3GenerateIndexKey(
){
Vdbe *v = pParse->pVdbe;
int j;
- Table *pTab = pIdx->pTable;
int regBase;
int nCol;
if( piPartIdxLabel ){
if( pIdx->pPartIdxWhere ){
*piPartIdxLabel = sqlite3VdbeMakeLabel(v);
- pParse->iPartIdxTab = iDataCur;
+ pParse->iSelfTab = iDataCur;
sqlite3ExprCachePush(pParse);
- sqlite3ExprIfFalse(pParse, pIdx->pPartIdxWhere, *piPartIdxLabel,
- SQLITE_JUMPIFNULL);
+ sqlite3ExprIfFalseDup(pParse, pIdx->pPartIdxWhere, *piPartIdxLabel,
+ SQLITE_JUMPIFNULL);
}else{
*piPartIdxLabel = 0;
}
@@ -96392,9 +98533,14 @@ SQLITE_PRIVATE int sqlite3GenerateIndexKey(
regBase = sqlite3GetTempRange(pParse, nCol);
if( pPrior && (regBase!=regPrior || pPrior->pPartIdxWhere) ) pPrior = 0;
for(j=0; j<nCol; j++){
- if( pPrior && pPrior->aiColumn[j]==pIdx->aiColumn[j] ) continue;
- sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, pIdx->aiColumn[j],
- regBase+j);
+ if( pPrior
+ && pPrior->aiColumn[j]==pIdx->aiColumn[j]
+ && pPrior->aiColumn[j]!=XN_EXPR
+ ){
+ /* This column was already computed by the previous index */
+ continue;
+ }
+ sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iDataCur, j, regBase+j);
/* If the column affinity is REAL but the number is an integer, then it
** might be stored in the table as an integer (using a compact
** representation) then converted to REAL by an OP_RealAffinity opcode.
@@ -96439,8 +98585,10 @@ SQLITE_PRIVATE void sqlite3ResolvePartIdxLabel(Parse *pParse, int iLabel){
** functions of SQLite. (Some function, and in particular the date and
** time functions, are implemented separately.)
*/
+/* #include "sqliteInt.h" */
/* #include <stdlib.h> */
/* #include <assert.h> */
+/* #include "vdbeInt.h" */
/*
** Return the collating function associated with a function.
@@ -96999,17 +99147,15 @@ struct compareInfo {
/*
** For LIKE and GLOB matching on EBCDIC machines, assume that every
-** character is exactly one byte in size. Also, all characters are
-** able to participate in upper-case-to-lower-case mappings in EBCDIC
-** whereas only characters less than 0x80 do in ASCII.
+** character is exactly one byte in size. Also, provde the Utf8Read()
+** macro for fast reading of the next character in the common case where
+** the next character is ASCII.
*/
#if defined(SQLITE_EBCDIC)
# define sqlite3Utf8Read(A) (*((*A)++))
-# define GlobUpperToLower(A) A = sqlite3UpperToLower[A]
-# define GlobUpperToLowerAscii(A) A = sqlite3UpperToLower[A]
+# define Utf8Read(A) (*(A++))
#else
-# define GlobUpperToLower(A) if( A<=0x7f ){ A = sqlite3UpperToLower[A]; }
-# define GlobUpperToLowerAscii(A) A = sqlite3UpperToLower[A]
+# define Utf8Read(A) (A[0]<0x80?*(A++):sqlite3Utf8Read(&A))
#endif
static const struct compareInfo globInfo = { '*', '?', '[', 0 };
@@ -97051,7 +99197,7 @@ static const struct compareInfo likeInfoAlt = { '%', '_', 0, 0 };
** Ec Where E is the "esc" character and c is any other
** character, including '%', '_', and esc, match exactly c.
**
-** The comments through this routine usually assume glob matching.
+** The comments within this routine usually assume glob matching.
**
** This routine is usually quick, but can be N**2 in the worst case.
*/
@@ -97075,13 +99221,12 @@ static int patternCompare(
*/
matchOther = esc ? esc : pInfo->matchSet;
- while( (c = sqlite3Utf8Read(&zPattern))!=0 ){
+ while( (c = Utf8Read(zPattern))!=0 ){
if( c==matchAll ){ /* Match "*" */
/* Skip over multiple "*" characters in the pattern. If there
** are also "?" characters, skip those as well, but consume a
** single character of the input string for each "?" skipped */
- while( (c=sqlite3Utf8Read(&zPattern)) == matchAll
- || c == matchOne ){
+ while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){
if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
return 0;
}
@@ -97126,7 +99271,7 @@ static int patternCompare(
if( patternCompare(zPattern,zString,pInfo,esc) ) return 1;
}
}else{
- while( (c2 = sqlite3Utf8Read(&zString))!=0 ){
+ while( (c2 = Utf8Read(zString))!=0 ){
if( c2!=c ) continue;
if( patternCompare(zPattern,zString,pInfo,esc) ) return 1;
}
@@ -97172,7 +99317,7 @@ static int patternCompare(
continue;
}
}
- c2 = sqlite3Utf8Read(&zString);
+ c2 = Utf8Read(zString);
if( c==c2 ) continue;
if( noCase && c<0x80 && c2<0x80 && sqlite3Tolower(c)==sqlite3Tolower(c2) ){
continue;
@@ -97549,16 +99694,14 @@ static void zeroblobFunc(
sqlite3_value **argv
){
i64 n;
- sqlite3 *db = sqlite3_context_db_handle(context);
+ int rc;
assert( argc==1 );
UNUSED_PARAMETER(argc);
n = sqlite3_value_int64(argv[0]);
- testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
- testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
- if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
- sqlite3_result_error_toobig(context);
- }else{
- sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */
+ if( n<0 ) n = 0;
+ rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */
+ if( rc ){
+ sqlite3_result_error_code(context, rc);
}
}
@@ -98166,15 +100309,15 @@ SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void){
VFUNCTION(random, 0, 0, 0, randomFunc ),
VFUNCTION(randomblob, 1, 0, 0, randomBlob ),
FUNCTION(nullif, 2, 0, 1, nullifFunc ),
- FUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
- FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
+ DFUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
+ DFUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
FUNCTION(sqlite_log, 2, 0, 0, errlogFunc ),
#if SQLITE_USER_AUTHENTICATION
FUNCTION(sqlite_crypt, 2, 0, 0, sqlite3CryptFunc ),
#endif
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
- FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc ),
- FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ),
+ DFUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc ),
+ DFUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ),
#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
FUNCTION(quote, 1, 0, 0, quoteFunc ),
VFUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid),
@@ -98186,8 +100329,8 @@ SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void){
FUNCTION(soundex, 1, 0, 0, soundexFunc ),
#endif
#ifndef SQLITE_OMIT_LOAD_EXTENSION
- FUNCTION(load_extension, 1, 0, 0, loadExt ),
- FUNCTION(load_extension, 2, 0, 0, loadExt ),
+ VFUNCTION(load_extension, 1, 0, 0, loadExt ),
+ VFUNCTION(load_extension, 2, 0, 0, loadExt ),
#endif
AGGREGATE(sum, 1, 0, 0, sumStep, sumFinalize ),
AGGREGATE(total, 1, 0, 0, sumStep, totalFinalize ),
@@ -98239,6 +100382,7 @@ SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void){
** This file contains code used by the compiler to add foreign key
** support to compiled SQL statements.
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_FOREIGN_KEY
#ifndef SQLITE_OMIT_TRIGGER
@@ -98479,6 +100623,8 @@ SQLITE_PRIVATE int sqlite3FkLocateIndex(
char *zDfltColl; /* Def. collation for column */
char *zIdxCol; /* Name of indexed column */
+ if( iCol<0 ) break; /* No foreign keys against expression indexes */
+
/* If the index uses a collation sequence that is different from
** the default collation sequence for the column, this index is
** unusable. Bail out early in this case. */
@@ -98601,7 +100747,7 @@ static void fkLookupParent(
sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regTemp); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
+ sqlite3VdbeGoto(v, iOk);
sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
sqlite3VdbeJumpHere(v, iMustBeInt);
sqlite3ReleaseTempReg(pParse, regTemp);
@@ -98631,6 +100777,7 @@ static void fkLookupParent(
for(i=0; i<nCol; i++){
int iChild = aiCol[i]+1+regData;
int iParent = pIdx->aiColumn[i]+1+regData;
+ assert( pIdx->aiColumn[i]>=0 );
assert( aiCol[i]!=pTab->iPKey );
if( pIdx->aiColumn[i]==pTab->iPKey ){
/* The parent key is a composite key that includes the IPK column */
@@ -98639,11 +100786,11 @@ static void fkLookupParent(
sqlite3VdbeAddOp3(v, OP_Ne, iChild, iJump, iParent); VdbeCoverage(v);
sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
}
- sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
+ sqlite3VdbeGoto(v, iOk);
}
sqlite3VdbeAddOp4(v, OP_MakeRecord, regTemp, nCol, regRec,
- sqlite3IndexAffinityStr(v,pIdx), nCol);
+ sqlite3IndexAffinityStr(pParse->db,pIdx), nCol);
sqlite3VdbeAddOp4Int(v, OP_Found, iCur, iOk, regRec, 0); VdbeCoverage(v);
sqlite3ReleaseTempReg(pParse, regRec);
@@ -98839,6 +100986,7 @@ static void fkScanChildren(
assert( pIdx!=0 );
for(i=0; i<pPk->nKeyCol; i++){
i16 iCol = pIdx->aiColumn[i];
+ assert( iCol>=0 );
pLeft = exprTableRegister(pParse, pTab, regData, iCol);
pRight = exprTableColumn(db, pTab, pSrc->a[0].iCursor, iCol);
pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight, 0);
@@ -99158,6 +101306,7 @@ SQLITE_PRIVATE void sqlite3FkCheck(
if( aiCol[i]==pTab->iPKey ){
aiCol[i] = -1;
}
+ assert( pIdx==0 || pIdx->aiColumn[i]>=0 );
#ifndef SQLITE_OMIT_AUTHORIZATION
/* Request permission to read the parent key columns. If the
** authorization callback returns SQLITE_IGNORE, behave as if any
@@ -99289,7 +101438,10 @@ SQLITE_PRIVATE u32 sqlite3FkOldmask(
Index *pIdx = 0;
sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0);
if( pIdx ){
- for(i=0; i<pIdx->nKeyCol; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
+ for(i=0; i<pIdx->nKeyCol; i++){
+ assert( pIdx->aiColumn[i]>=0 );
+ mask |= COLUMN_MASK(pIdx->aiColumn[i]);
+ }
}
}
}
@@ -99412,6 +101564,7 @@ static Trigger *fkActionTrigger(
iFromCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;
assert( iFromCol>=0 );
assert( pIdx!=0 || (pTab->iPKey>=0 && pTab->iPKey<pTab->nCol) );
+ assert( pIdx==0 || pIdx->aiColumn[i]>=0 );
tToCol.z = pTab->aCol[pIdx ? pIdx->aiColumn[i] : pTab->iPKey].zName;
tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
@@ -99643,6 +101796,7 @@ SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
*/
+/* #include "sqliteInt.h" */
/*
** Generate code that will
@@ -99672,7 +101826,7 @@ SQLITE_PRIVATE void sqlite3OpenTable(
}else{
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
assert( pPk!=0 );
- assert( pPk->tnum=pTab->tnum );
+ assert( pPk->tnum==pTab->tnum );
sqlite3VdbeAddOp3(v, opcode, iCur, pPk->tnum, iDb);
sqlite3VdbeSetP4KeyInfo(pParse, pPk);
VdbeComment((v, "%s", pTab->zName));
@@ -99686,7 +101840,7 @@ SQLITE_PRIVATE void sqlite3OpenTable(
**
** Character Column affinity
** ------------------------------
-** 'A' NONE
+** 'A' BLOB
** 'B' TEXT
** 'C' NUMERIC
** 'D' INTEGER
@@ -99699,7 +101853,7 @@ SQLITE_PRIVATE void sqlite3OpenTable(
** is managed along with the rest of the Index structure. It will be
** released when sqlite3DeleteIndex() is called.
*/
-SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
+SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){
if( !pIdx->zColAff ){
/* The first time a column affinity string for a particular index is
** required, it is allocated and populated here. It is then stored as
@@ -99711,7 +101865,6 @@ SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
*/
int n;
Table *pTab = pIdx->pTable;
- sqlite3 *db = sqlite3VdbeDb(v);
pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1);
if( !pIdx->zColAff ){
db->mallocFailed = 1;
@@ -99719,7 +101872,18 @@ SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
}
for(n=0; n<pIdx->nColumn; n++){
i16 x = pIdx->aiColumn[n];
- pIdx->zColAff[n] = x<0 ? SQLITE_AFF_INTEGER : pTab->aCol[x].affinity;
+ if( x>=0 ){
+ pIdx->zColAff[n] = pTab->aCol[x].affinity;
+ }else if( x==XN_ROWID ){
+ pIdx->zColAff[n] = SQLITE_AFF_INTEGER;
+ }else{
+ char aff;
+ assert( x==XN_EXPR );
+ assert( pIdx->aColExpr!=0 );
+ aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr);
+ if( aff==0 ) aff = SQLITE_AFF_BLOB;
+ pIdx->zColAff[n] = aff;
+ }
}
pIdx->zColAff[n] = 0;
}
@@ -99729,9 +101893,9 @@ SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
/*
** Compute the affinity string for table pTab, if it has not already been
-** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities.
+** computed. As an optimization, omit trailing SQLITE_AFF_BLOB affinities.
**
-** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values) and
+** If the affinity exists (if it is no entirely SQLITE_AFF_BLOB values) and
** if iReg>0 then code an OP_Affinity opcode that will set the affinities
** for register iReg and following. Or if affinities exists and iReg==0,
** then just set the P4 operand of the previous opcode (which should be
@@ -99741,7 +101905,7 @@ SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
**
** Character Column affinity
** ------------------------------
-** 'A' NONE
+** 'A' BLOB
** 'B' TEXT
** 'C' NUMERIC
** 'D' INTEGER
@@ -99763,7 +101927,7 @@ SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){
}
do{
zColAff[i--] = 0;
- }while( i>=0 && zColAff[i]==SQLITE_AFF_NONE );
+ }while( i>=0 && zColAff[i]==SQLITE_AFF_BLOB );
pTab->zColAff = zColAff;
}
i = sqlite3Strlen30(zColAff);
@@ -99880,7 +102044,7 @@ SQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){
/* This routine is never called during trigger-generation. It is
** only called from the top-level */
assert( pParse->pTriggerTab==0 );
- assert( pParse==sqlite3ParseToplevel(pParse) );
+ assert( sqlite3IsToplevel(pParse) );
assert( v ); /* We failed long ago if this is not so */
for(p = pParse->pAinc; p; p = p->pNext){
@@ -99890,14 +102054,14 @@ SQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
sqlite3VdbeAddOp3(v, OP_Null, 0, memId, memId+1);
addr = sqlite3VdbeCurrentAddr(v);
- sqlite3VdbeAddOp4(v, OP_String8, 0, memId-1, 0, p->pTab->zName, 0);
+ sqlite3VdbeLoadString(v, memId-1, p->pTab->zName);
sqlite3VdbeAddOp2(v, OP_Rewind, 0, addr+9); VdbeCoverage(v);
sqlite3VdbeAddOp3(v, OP_Column, 0, 0, memId);
sqlite3VdbeAddOp3(v, OP_Ne, memId-1, addr+7, memId); VdbeCoverage(v);
sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
sqlite3VdbeAddOp2(v, OP_Rowid, 0, memId+1);
sqlite3VdbeAddOp3(v, OP_Column, 0, 1, memId);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addr+9);
+ sqlite3VdbeGoto(v, addr+9);
sqlite3VdbeAddOp2(v, OP_Next, 0, addr+2); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_Integer, 0, memId);
sqlite3VdbeAddOp0(v, OP_Close);
@@ -99933,16 +102097,16 @@ SQLITE_PRIVATE void sqlite3AutoincrementEnd(Parse *pParse){
assert( v );
for(p = pParse->pAinc; p; p = p->pNext){
Db *pDb = &db->aDb[p->iDb];
- int j1;
+ int addr1;
int iRec;
int memId = p->regCtr;
iRec = sqlite3GetTempReg(pParse);
assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
@@ -100321,7 +102485,7 @@ SQLITE_PRIVATE void sqlite3Insert(
sqlite3VdbeAddOp3(v, OP_MakeRecord, regFromSelect, nColumn, regRec);
sqlite3VdbeAddOp2(v, OP_NewRowid, srcTab, regTempRowid);
sqlite3VdbeAddOp3(v, OP_Insert, srcTab, regRec, regTempRowid);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrL);
+ sqlite3VdbeGoto(v, addrL);
sqlite3VdbeJumpHere(v, addrL);
sqlite3ReleaseTempReg(pParse, regRec);
sqlite3ReleaseTempReg(pParse, regTempRowid);
@@ -100335,11 +102499,13 @@ SQLITE_PRIVATE void sqlite3Insert(
sNC.pParse = pParse;
srcTab = -1;
assert( useTempTable==0 );
- nColumn = pList ? pList->nExpr : 0;
- for(i=0; i<nColumn; i++){
- if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
+ if( pList ){
+ nColumn = pList->nExpr;
+ if( sqlite3ResolveExprListNames(&sNC, pList) ){
goto insert_cleanup;
}
+ }else{
+ nColumn = 0;
}
}
@@ -100432,7 +102598,7 @@ SQLITE_PRIVATE void sqlite3Insert(
if( ipkColumn<0 ){
sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
}else{
- int j1;
+ int addr1;
assert( !withoutRowid );
if( useTempTable ){
sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regCols);
@@ -100440,9 +102606,9 @@ SQLITE_PRIVATE void sqlite3Insert(
assert( pSelect==0 ); /* Otherwise useTempTable is true */
sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regCols);
}
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols); VdbeCoverage(v);
}
@@ -100516,14 +102682,14 @@ SQLITE_PRIVATE void sqlite3Insert(
** to generate a unique primary key value.
*/
if( !appendFlag ){
- int j1;
+ int addr1;
if( !IsVirtual(pTab) ){
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
}else{
- j1 = sqlite3VdbeCurrentAddr(v);
- sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, j1+2); VdbeCoverage(v);
+ addr1 = sqlite3VdbeCurrentAddr(v);
+ sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, addr1+2); VdbeCoverage(v);
}
sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid); VdbeCoverage(v);
}
@@ -100620,7 +102786,7 @@ SQLITE_PRIVATE void sqlite3Insert(
sqlite3VdbeJumpHere(v, addrInsTop);
sqlite3VdbeAddOp1(v, OP_Close, srcTab);
}else if( pSelect ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrCont);
+ sqlite3VdbeGoto(v, addrCont);
sqlite3VdbeJumpHere(v, addrInsTop);
}
@@ -100777,7 +102943,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
int ix; /* Index loop counter */
int nCol; /* Number of columns */
int onError; /* Conflict resolution strategy */
- int j1; /* Address of jump instruction */
+ int addr1; /* Address of jump instruction */
int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
int nPkField; /* Number of fields in PRIMARY KEY. 1 for ROWID tables */
int ipkTop = 0; /* Top of the rowid change constraint check */
@@ -100848,9 +103014,10 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
}
default: {
assert( onError==OE_Replace );
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i); VdbeCoverage(v);
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i);
+ VdbeCoverage(v);
sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
break;
}
}
@@ -100867,7 +103034,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
int allOk = sqlite3VdbeMakeLabel(v);
sqlite3ExprIfTrue(pParse, pCheck->a[i].pExpr, allOk, SQLITE_JUMPIFNULL);
if( onError==OE_Ignore ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
+ sqlite3VdbeGoto(v, ignoreDest);
}else{
char *zName = pCheck->a[i].zName;
if( zName==0 ) zName = pTab->zName;
@@ -100965,17 +103132,20 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
if( pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0) ){
sqlite3MultiWrite(pParse);
sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
- regNewData, 1, 0, OE_Replace, 1);
- }else if( pTab->pIndex ){
- sqlite3MultiWrite(pParse);
- sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, 0);
+ regNewData, 1, 0, OE_Replace,
+ ONEPASS_SINGLE, -1);
+ }else{
+ if( pTab->pIndex ){
+ sqlite3MultiWrite(pParse);
+ sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,-1);
+ }
}
seenReplace = 1;
break;
}
case OE_Ignore: {
/*assert( seenReplace==0 );*/
- sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
+ sqlite3VdbeGoto(v, ignoreDest);
break;
}
}
@@ -101011,8 +103181,8 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
if( pIdx->pPartIdxWhere ){
sqlite3VdbeAddOp2(v, OP_Null, 0, aRegIdx[ix]);
pParse->ckBase = regNewData+1;
- sqlite3ExprIfFalse(pParse, pIdx->pPartIdxWhere, addrUniqueOk,
- SQLITE_JUMPIFNULL);
+ sqlite3ExprIfFalseDup(pParse, pIdx->pPartIdxWhere, addrUniqueOk,
+ SQLITE_JUMPIFNULL);
pParse->ckBase = 0;
}
@@ -101023,15 +103193,22 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
for(i=0; i<pIdx->nColumn; i++){
int iField = pIdx->aiColumn[i];
int x;
- if( iField<0 || iField==pTab->iPKey ){
- if( regRowid==regIdx+i ) continue; /* ROWID already in regIdx+i */
- x = regNewData;
- regRowid = pIdx->pPartIdxWhere ? -1 : regIdx+i;
+ if( iField==XN_EXPR ){
+ pParse->ckBase = regNewData+1;
+ sqlite3ExprCode(pParse, pIdx->aColExpr->a[i].pExpr, regIdx+i);
+ pParse->ckBase = 0;
+ VdbeComment((v, "%s column %d", pIdx->zName, i));
}else{
- x = iField + regNewData + 1;
+ if( iField==XN_ROWID || iField==pTab->iPKey ){
+ if( regRowid==regIdx+i ) continue; /* ROWID already in regIdx+i */
+ x = regNewData;
+ regRowid = pIdx->pPartIdxWhere ? -1 : regIdx+i;
+ }else{
+ x = iField + regNewData + 1;
+ }
+ sqlite3VdbeAddOp2(v, OP_SCopy, x, regIdx+i);
+ VdbeComment((v, "%s", iField<0 ? "rowid" : pTab->aCol[iField].zName));
}
- sqlite3VdbeAddOp2(v, OP_SCopy, x, regIdx+i);
- VdbeComment((v, "%s", iField<0 ? "rowid" : pTab->aCol[iField].zName));
}
sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn, aRegIdx[ix]);
VdbeComment((v, "for %s", pIdx->zName));
@@ -101081,6 +103258,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
** store it in registers regR..regR+nPk-1 */
if( pIdx!=pPk ){
for(i=0; i<pPk->nKeyCol; i++){
+ assert( pPk->aiColumn[i]>=0 );
x = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[i]);
sqlite3VdbeAddOp3(v, OP_Column, iThisCur, x, regR+i);
VdbeComment((v, "%s.%s", pTab->zName,
@@ -101102,6 +103280,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
for(i=0; i<pPk->nKeyCol; i++){
char *p4 = (char*)sqlite3LocateCollSeq(pParse, pPk->azColl[i]);
x = pPk->aiColumn[i];
+ assert( x>=0 );
if( i==(pPk->nKeyCol-1) ){
addrJump = addrUniqueOk;
op = OP_Eq;
@@ -101128,7 +103307,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
break;
}
case OE_Ignore: {
- sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
+ sqlite3VdbeGoto(v, ignoreDest);
break;
}
default: {
@@ -101139,7 +103318,8 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
}
sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
- regR, nPkField, 0, OE_Replace, pIdx==pPk);
+ regR, nPkField, 0, OE_Replace,
+ (pIdx==pPk ? ONEPASS_SINGLE : ONEPASS_OFF), -1);
seenReplace = 1;
break;
}
@@ -101149,7 +103329,7 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);
}
if( ipkTop ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, ipkTop+1);
+ sqlite3VdbeGoto(v, ipkTop+1);
sqlite3VdbeJumpHere(v, ipkBottom);
}
@@ -101352,6 +103532,13 @@ static int xferCompatibleIndex(Index *pDest, Index *pSrc){
if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
return 0; /* Different columns indexed */
}
+ if( pSrc->aiColumn[i]==XN_EXPR ){
+ assert( pSrc->aColExpr!=0 && pDest->aColExpr!=0 );
+ if( sqlite3ExprCompare(pSrc->aColExpr->a[i].pExpr,
+ pDest->aColExpr->a[i].pExpr, -1)!=0 ){
+ return 0; /* Different expressions in the index */
+ }
+ }
if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
return 0; /* Different sort orders */
}
@@ -101595,7 +103782,7 @@ static int xferOptimization(
** (3) onError is something other than OE_Abort and OE_Rollback.
*/
addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iDest, 0); VdbeCoverage(v);
- emptyDestTest = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
+ emptyDestTest = sqlite3VdbeAddOp0(v, OP_Goto);
sqlite3VdbeJumpHere(v, addr1);
}
if( HasRowid(pSrc) ){
@@ -101626,7 +103813,7 @@ static int xferOptimization(
sqlite3TableLock(pParse, iDbSrc, pSrc->tnum, 0, pSrc->zName);
}
for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
- u8 useSeekResult = 0;
+ u8 idxInsFlags = 0;
for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){
if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
}
@@ -101661,12 +103848,15 @@ static int xferOptimization(
if( sqlite3_stricmp("BINARY", zColl) ) break;
}
if( i==pSrcIdx->nColumn ){
- useSeekResult = OPFLAG_USESEEKRESULT;
+ idxInsFlags = OPFLAG_USESEEKRESULT;
sqlite3VdbeAddOp3(v, OP_Last, iDest, 0, -1);
}
}
+ if( !HasRowid(pSrc) && pDestIdx->idxType==2 ){
+ idxInsFlags |= OPFLAG_NCHANGE;
+ }
sqlite3VdbeAddOp3(v, OP_IdxInsert, iDest, regData, 1);
- sqlite3VdbeChangeP5(v, useSeekResult);
+ sqlite3VdbeChangeP5(v, idxInsFlags);
sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v);
sqlite3VdbeJumpHere(v, addr1);
sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
@@ -101705,6 +103895,7 @@ static int xferOptimization(
** accessed by users of the library.
*/
+/* #include "sqliteInt.h" */
/*
** Execute SQL code. Return one of the SQLITE_ success/failure
@@ -101873,6 +104064,7 @@ exec_out:
*/
#ifndef _SQLITE3EXT_H_
#define _SQLITE3EXT_H_
+/* #include "sqlite3.h" */
typedef struct sqlite3_api_routines sqlite3_api_routines;
@@ -102122,6 +104314,14 @@ struct sqlite3_api_routines {
void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
void(*)(void*), unsigned char);
int (*strglob)(const char*,const char*);
+ /* Version 3.8.11 and later */
+ sqlite3_value *(*value_dup)(const sqlite3_value*);
+ void (*value_free)(sqlite3_value*);
+ int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
+ int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
+ /* Version 3.9.0 and later */
+ unsigned int (*value_subtype)(sqlite3_value*);
+ void (*result_subtype)(sqlite3_context*,unsigned int);
};
/*
@@ -102135,7 +104335,7 @@ struct sqlite3_api_routines {
** the API. So the redefinition macros are only valid if the
** SQLITE_CORE macros is undefined.
*/
-#ifndef SQLITE_CORE
+#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
@@ -102262,6 +104462,7 @@ struct sqlite3_api_routines {
#define sqlite3_value_text16le sqlite3_api->value_text16le
#define sqlite3_value_type sqlite3_api->value_type
#define sqlite3_vmprintf sqlite3_api->vmprintf
+#define sqlite3_vsnprintf sqlite3_api->vsnprintf
#define sqlite3_overload_function sqlite3_api->overload_function
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
@@ -102352,9 +104553,17 @@ struct sqlite3_api_routines {
#define sqlite3_result_blob64 sqlite3_api->result_blob64
#define sqlite3_result_text64 sqlite3_api->result_text64
#define sqlite3_strglob sqlite3_api->strglob
-#endif /* SQLITE_CORE */
-
-#ifndef SQLITE_CORE
+/* Version 3.8.11 and later */
+#define sqlite3_value_dup sqlite3_api->value_dup
+#define sqlite3_value_free sqlite3_api->value_free
+#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
+#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
+/* Version 3.9.0 and later */
+#define sqlite3_value_subtype sqlite3_api->value_subtype
+#define sqlite3_result_subtype sqlite3_api->result_subtype
+#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
+
+#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
/* This case when the file really is being compiled as a loadable
** extension */
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
@@ -102373,6 +104582,7 @@ struct sqlite3_api_routines {
/************** End of sqlite3ext.h ******************************************/
/************** Continuing where we left off in loadext.c ********************/
+/* #include "sqliteInt.h" */
/* #include <string.h> */
#ifndef SQLITE_OMIT_LOAD_EXTENSION
@@ -102757,7 +104967,15 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite3_reset_auto_extension,
sqlite3_result_blob64,
sqlite3_result_text64,
- sqlite3_strglob
+ sqlite3_strglob,
+ /* Version 3.8.11 and later */
+ (sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup,
+ sqlite3_value_free,
+ sqlite3_result_zeroblob64,
+ sqlite3_bind_zeroblob64,
+ /* Version 3.9.0 and later */
+ sqlite3_value_subtype,
+ sqlite3_result_subtype
};
/*
@@ -102962,7 +105180,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
** dummy pointer.
*/
#ifdef SQLITE_OMIT_LOAD_EXTENSION
-static const sqlite3_api_routines sqlite3Apis = { 0 };
+static const sqlite3_api_routines sqlite3Apis;
#endif
@@ -103139,6 +105357,7 @@ SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
*************************************************************************
** This file contains code used to implement the PRAGMA command.
*/
+/* #include "sqliteInt.h" */
#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
# if defined(__APPLE__)
@@ -103245,7 +105464,7 @@ static const struct sPragmaNames {
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
{ /* zName: */ "cache_size",
/* ePragTyp: */ PragTyp_CACHE_SIZE,
- /* ePragFlag: */ PragFlag_NeedSchema,
+ /* ePragFlag: */ 0,
/* iArg: */ 0 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
@@ -103258,6 +105477,10 @@ static const struct sPragmaNames {
/* ePragTyp: */ PragTyp_CASE_SENSITIVE_LIKE,
/* ePragFlag: */ 0,
/* iArg: */ 0 },
+ { /* zName: */ "cell_size_check",
+ /* ePragTyp: */ PragTyp_FLAG,
+ /* ePragFlag: */ 0,
+ /* iArg: */ SQLITE_CellSizeCk },
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
{ /* zName: */ "checkpoint_fullfsync",
/* ePragTyp: */ PragTyp_FLAG,
@@ -103615,7 +105838,7 @@ static const struct sPragmaNames {
/* iArg: */ SQLITE_WriteSchema|SQLITE_RecoveryMode },
#endif
};
-/* Number of pragmas: 59 on by default, 72 total. */
+/* Number of pragmas: 60 on by default, 73 total. */
/************** End of pragma.h **********************************************/
/************** Continuing where we left off in pragma.c *********************/
@@ -103750,19 +105973,45 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){
#endif /* SQLITE_PAGER_PRAGMAS */
/*
+** Set the names of the first N columns to the values in azCol[]
+*/
+static void setAllColumnNames(
+ Vdbe *v, /* The query under construction */
+ int N, /* Number of columns */
+ const char **azCol /* Names of columns */
+){
+ int i;
+ sqlite3VdbeSetNumCols(v, N);
+ for(i=0; i<N; i++){
+ sqlite3VdbeSetColName(v, i, COLNAME_NAME, azCol[i], SQLITE_STATIC);
+ }
+}
+static void setOneColumnName(Vdbe *v, const char *z){
+ setAllColumnNames(v, 1, &z);
+}
+
+/*
** Generate code to return a single integer value.
*/
-static void returnSingleInt(Parse *pParse, const char *zLabel, i64 value){
- Vdbe *v = sqlite3GetVdbe(pParse);
- int nMem = ++pParse->nMem;
- i64 *pI64 = sqlite3DbMallocRaw(pParse->db, sizeof(value));
- if( pI64 ){
- memcpy(pI64, &value, sizeof(value));
+static void returnSingleInt(Vdbe *v, const char *zLabel, i64 value){
+ sqlite3VdbeAddOp4Dup8(v, OP_Int64, 0, 1, 0, (const u8*)&value, P4_INT64);
+ setOneColumnName(v, zLabel);
+ sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+}
+
+/*
+** Generate code to return a single text value.
+*/
+static void returnSingleText(
+ Vdbe *v, /* Prepared statement under construction */
+ const char *zLabel, /* Name of the result column */
+ const char *zValue /* Value to be returned */
+){
+ if( zValue ){
+ sqlite3VdbeLoadString(v, 1, (const char*)zValue);
+ setOneColumnName(v, zLabel);
+ sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
}
- sqlite3VdbeAddOp4(v, OP_Int64, 0, nMem, 0, (char*)pI64, P4_INT64);
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLabel, SQLITE_STATIC);
- sqlite3VdbeAddOp2(v, OP_ResultRow, nMem, 1);
}
@@ -103926,14 +106175,8 @@ SQLITE_PRIVATE void sqlite3Pragma(
db->busyHandler.nBusy = 0;
rc = sqlite3_file_control(db, zDb, SQLITE_FCNTL_PRAGMA, (void*)aFcntl);
if( rc==SQLITE_OK ){
- if( aFcntl[0] ){
- int nMem = ++pParse->nMem;
- sqlite3VdbeAddOp4(v, OP_String8, 0, nMem, 0, aFcntl[0], 0);
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "result", SQLITE_STATIC);
- sqlite3VdbeAddOp2(v, OP_ResultRow, nMem, 1);
- sqlite3_free(aFcntl[0]);
- }
+ returnSingleText(v, "result", aFcntl[0]);
+ sqlite3_free(aFcntl[0]);
goto pragma_out;
}
if( rc!=SQLITE_NOTFOUND ){
@@ -104003,8 +106246,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
int addr;
sqlite3VdbeUsesBtree(v, iDb);
if( !zRight ){
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cache_size", SQLITE_STATIC);
+ setOneColumnName(v, "cache_size");
pParse->nMem += 2;
addr = sqlite3VdbeAddOpList(v, ArraySize(getCacheSize), getCacheSize,iLn);
sqlite3VdbeChangeP1(v, addr, iDb);
@@ -104038,7 +106280,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
assert( pBt!=0 );
if( !zRight ){
int size = ALWAYS(pBt) ? sqlite3BtreeGetPageSize(pBt) : 0;
- returnSingleInt(pParse, "page_size", size);
+ returnSingleInt(v, "page_size", size);
}else{
/* Malloc may fail when setting the page-size, as there is an internal
** buffer that the pager module resizes using sqlite3_realloc().
@@ -104073,7 +106315,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
}
}
b = sqlite3BtreeSecureDelete(pBt, b);
- returnSingleInt(pParse, "secure_delete", b);
+ returnSingleInt(v, "secure_delete", b);
break;
}
@@ -104152,10 +106394,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
if( eMode==PAGER_LOCKINGMODE_EXCLUSIVE ){
zRet = "exclusive";
}
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "locking_mode", SQLITE_STATIC);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zRet, 0);
- sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+ returnSingleText(v, "locking_mode", zRet);
break;
}
@@ -104168,9 +106407,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
int eMode; /* One of the PAGER_JOURNALMODE_XXX symbols */
int ii; /* Loop counter */
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "journal_mode", SQLITE_STATIC);
-
+ setOneColumnName(v, "journal_mode");
if( zRight==0 ){
/* If there is no "=MODE" part of the pragma, do a query for the
** current mode */
@@ -104216,7 +106453,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
if( iLimit<-1 ) iLimit = -1;
}
iLimit = sqlite3PagerJournalSizeLimit(pPager, iLimit);
- returnSingleInt(pParse, "journal_size_limit", iLimit);
+ returnSingleInt(v, "journal_size_limit", iLimit);
break;
}
@@ -104234,7 +106471,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
Btree *pBt = pDb->pBt;
assert( pBt!=0 );
if( !zRight ){
- returnSingleInt(pParse, "auto_vacuum", sqlite3BtreeGetAutoVacuum(pBt));
+ returnSingleInt(v, "auto_vacuum", sqlite3BtreeGetAutoVacuum(pBt));
}else{
int eAuto = getAutoVacuum(zRight);
assert( eAuto>=0 && eAuto<=2 );
@@ -104311,11 +106548,13 @@ SQLITE_PRIVATE void sqlite3Pragma(
case PragTyp_CACHE_SIZE: {
assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
if( !zRight ){
- returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size);
+ if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+ returnSingleInt(v, "cache_size", pDb->pSchema->cache_size);
}else{
int size = sqlite3Atoi(zRight);
pDb->pSchema->cache_size = size;
sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
+ if( sqlite3ReadSchema(pParse) ) goto pragma_out;
}
break;
}
@@ -104356,7 +106595,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
rc = SQLITE_OK;
#endif
if( rc==SQLITE_OK ){
- returnSingleInt(pParse, "mmap_size", sz);
+ returnSingleInt(v, "mmap_size", sz);
}else if( rc!=SQLITE_NOTFOUND ){
pParse->nErr++;
pParse->rc = rc;
@@ -104377,7 +106616,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
*/
case PragTyp_TEMP_STORE: {
if( !zRight ){
- returnSingleInt(pParse, "temp_store", db->temp_store);
+ returnSingleInt(v, "temp_store", db->temp_store);
}else{
changeTempStorage(pParse, zRight);
}
@@ -104396,13 +106635,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
*/
case PragTyp_TEMP_STORE_DIRECTORY: {
if( !zRight ){
- if( sqlite3_temp_directory ){
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME,
- "temp_store_directory", SQLITE_STATIC);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, sqlite3_temp_directory, 0);
- sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
- }
+ returnSingleText(v, "temp_store_directory", sqlite3_temp_directory);
}else{
#ifndef SQLITE_OMIT_WSD
if( zRight[0] ){
@@ -104446,13 +106679,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
*/
case PragTyp_DATA_STORE_DIRECTORY: {
if( !zRight ){
- if( sqlite3_data_directory ){
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME,
- "data_store_directory", SQLITE_STATIC);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, sqlite3_data_directory, 0);
- sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
- }
+ returnSingleText(v, "data_store_directory", sqlite3_data_directory);
}else{
#ifndef SQLITE_OMIT_WSD
if( zRight[0] ){
@@ -104491,14 +106718,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
sqlite3_file *pFile = sqlite3PagerFile(pPager);
sqlite3OsFileControlHint(pFile, SQLITE_GET_LOCKPROXYFILE,
&proxy_file_path);
-
- if( proxy_file_path ){
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME,
- "lock_proxy_file", SQLITE_STATIC);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, proxy_file_path, 0);
- sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
- }
+ returnSingleText(v, "lock_proxy_file", proxy_file_path);
}else{
Pager *pPager = sqlite3BtreePager(pDb->pBt);
sqlite3_file *pFile = sqlite3PagerFile(pPager);
@@ -104530,7 +106750,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
*/
case PragTyp_SYNCHRONOUS: {
if( !zRight ){
- returnSingleInt(pParse, "synchronous", pDb->safety_level-1);
+ returnSingleInt(v, "synchronous", pDb->safety_level-1);
}else{
if( !db->autoCommit ){
sqlite3ErrorMsg(pParse,
@@ -104549,7 +106769,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
#ifndef SQLITE_OMIT_FLAG_PRAGMAS
case PragTyp_FLAG: {
if( zRight==0 ){
- returnSingleInt(pParse, pPragma->zName, (db->flags & pPragma->iArg)!=0 );
+ returnSingleInt(v, pPragma->zName, (db->flags & pPragma->iArg)!=0 );
}else{
int mask = pPragma->iArg; /* Mask of bits to set or clear. */
if( db->autoCommit==0 ){
@@ -104599,35 +106819,22 @@ SQLITE_PRIVATE void sqlite3Pragma(
Table *pTab;
pTab = sqlite3FindTable(db, zRight, zDb);
if( pTab ){
+ static const char *azCol[] = {
+ "cid", "name", "type", "notnull", "dflt_value", "pk"
+ };
int i, k;
int nHidden = 0;
Column *pCol;
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
- sqlite3VdbeSetNumCols(v, 6);
pParse->nMem = 6;
sqlite3CodeVerifySchema(pParse, iDb);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "notnull", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "dflt_value", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "pk", SQLITE_STATIC);
+ setAllColumnNames(v, 6, azCol); assert( 6==ArraySize(azCol) );
sqlite3ViewGetColumnNames(pParse, pTab);
for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
if( IsHiddenColumn(pCol) ){
nHidden++;
continue;
}
- sqlite3VdbeAddOp2(v, OP_Integer, i-nHidden, 1);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pCol->zName, 0);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
- pCol->zType ? pCol->zType : "", 0);
- sqlite3VdbeAddOp2(v, OP_Integer, (pCol->notNull ? 1 : 0), 4);
- if( pCol->zDflt ){
- sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
- }else{
- sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
- }
if( (pCol->colFlags & COLFLAG_PRIMKEY)==0 ){
k = 0;
}else if( pPk==0 ){
@@ -104635,7 +106842,13 @@ SQLITE_PRIVATE void sqlite3Pragma(
}else{
for(k=1; k<=pTab->nCol && pPk->aiColumn[k-1]!=i; k++){}
}
- sqlite3VdbeAddOp2(v, OP_Integer, k, 6);
+ sqlite3VdbeMultiLoad(v, 1, "issisi",
+ i-nHidden,
+ pCol->zName,
+ pCol->zType ? pCol->zType : "",
+ pCol->notNull ? 1 : 0,
+ pCol->zDflt,
+ k);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
}
}
@@ -104643,31 +106856,26 @@ SQLITE_PRIVATE void sqlite3Pragma(
break;
case PragTyp_STATS: {
+ static const char *azCol[] = { "table", "index", "width", "height" };
Index *pIdx;
HashElem *i;
v = sqlite3GetVdbe(pParse);
- sqlite3VdbeSetNumCols(v, 4);
pParse->nMem = 4;
sqlite3CodeVerifySchema(pParse, iDb);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "table", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "index", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "width", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "height", SQLITE_STATIC);
+ setAllColumnNames(v, 4, azCol); assert( 4==ArraySize(azCol) );
for(i=sqliteHashFirst(&pDb->pSchema->tblHash); i; i=sqliteHashNext(i)){
Table *pTab = sqliteHashData(i);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, pTab->zName, 0);
- sqlite3VdbeAddOp2(v, OP_Null, 0, 2);
- sqlite3VdbeAddOp2(v, OP_Integer,
- (int)sqlite3LogEstToInt(pTab->szTabRow), 3);
- sqlite3VdbeAddOp2(v, OP_Integer,
- (int)sqlite3LogEstToInt(pTab->nRowLogEst), 4);
+ sqlite3VdbeMultiLoad(v, 1, "ssii",
+ pTab->zName,
+ 0,
+ (int)sqlite3LogEstToInt(pTab->szTabRow),
+ (int)sqlite3LogEstToInt(pTab->nRowLogEst));
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 4);
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
- sqlite3VdbeAddOp2(v, OP_Integer,
- (int)sqlite3LogEstToInt(pIdx->szIdxRow), 3);
- sqlite3VdbeAddOp2(v, OP_Integer,
- (int)sqlite3LogEstToInt(pIdx->aiRowLogEst[0]), 4);
+ sqlite3VdbeMultiLoad(v, 2, "sii",
+ pIdx->zName,
+ (int)sqlite3LogEstToInt(pIdx->szIdxRow),
+ (int)sqlite3LogEstToInt(pIdx->aiRowLogEst[0]));
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 4);
}
}
@@ -104679,6 +106887,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
Table *pTab;
pIdx = sqlite3FindIndex(db, zRight, zDb);
if( pIdx ){
+ static const char *azCol[] = {
+ "seqno", "cid", "name", "desc", "coll", "key"
+ };
int i;
int mx;
if( pPragma->iArg ){
@@ -104691,29 +106902,18 @@ SQLITE_PRIVATE void sqlite3Pragma(
pParse->nMem = 3;
}
pTab = pIdx->pTable;
- sqlite3VdbeSetNumCols(v, pParse->nMem);
sqlite3CodeVerifySchema(pParse, iDb);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seqno", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "cid", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "name", SQLITE_STATIC);
- if( pPragma->iArg ){
- sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "desc", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "coll", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "key", SQLITE_STATIC);
- }
+ assert( pParse->nMem<=ArraySize(azCol) );
+ setAllColumnNames(v, pParse->nMem, azCol);
for(i=0; i<mx; i++){
i16 cnum = pIdx->aiColumn[i];
- sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
- sqlite3VdbeAddOp2(v, OP_Integer, cnum, 2);
- if( cnum<0 ){
- sqlite3VdbeAddOp2(v, OP_Null, 0, 3);
- }else{
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pTab->aCol[cnum].zName, 0);
- }
+ sqlite3VdbeMultiLoad(v, 1, "iis", i, cnum,
+ cnum<0 ? 0 : pTab->aCol[cnum].zName);
if( pPragma->iArg ){
- sqlite3VdbeAddOp2(v, OP_Integer, pIdx->aSortOrder[i], 4);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, pIdx->azColl[i], 0);
- sqlite3VdbeAddOp2(v, OP_Integer, i<pIdx->nKeyCol, 6);
+ sqlite3VdbeMultiLoad(v, 4, "isi",
+ pIdx->aSortOrder[i],
+ pIdx->azColl[i],
+ i<pIdx->nKeyCol);
}
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, pParse->nMem);
}
@@ -104727,22 +106927,21 @@ SQLITE_PRIVATE void sqlite3Pragma(
int i;
pTab = sqlite3FindTable(db, zRight, zDb);
if( pTab ){
+ static const char *azCol[] = {
+ "seq", "name", "unique", "origin", "partial"
+ };
v = sqlite3GetVdbe(pParse);
- sqlite3VdbeSetNumCols(v, 5);
pParse->nMem = 5;
sqlite3CodeVerifySchema(pParse, iDb);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "unique", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "origin", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "partial", SQLITE_STATIC);
+ setAllColumnNames(v, 5, azCol); assert( 5==ArraySize(azCol) );
for(pIdx=pTab->pIndex, i=0; pIdx; pIdx=pIdx->pNext, i++){
const char *azOrigin[] = { "c", "u", "pk" };
- sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
- sqlite3VdbeAddOp2(v, OP_Integer, IsUniqueIndex(pIdx), 3);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 4, 0, azOrigin[pIdx->idxType], 0);
- sqlite3VdbeAddOp2(v, OP_Integer, pIdx->pPartIdxWhere!=0, 5);
+ sqlite3VdbeMultiLoad(v, 1, "isisi",
+ i,
+ pIdx->zName,
+ IsUniqueIndex(pIdx),
+ azOrigin[pIdx->idxType],
+ pIdx->pPartIdxWhere!=0);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 5);
}
}
@@ -104750,35 +106949,31 @@ SQLITE_PRIVATE void sqlite3Pragma(
break;
case PragTyp_DATABASE_LIST: {
+ static const char *azCol[] = { "seq", "name", "file" };
int i;
- sqlite3VdbeSetNumCols(v, 3);
pParse->nMem = 3;
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "file", SQLITE_STATIC);
+ setAllColumnNames(v, 3, azCol); assert( 3==ArraySize(azCol) );
for(i=0; i<db->nDb; i++){
if( db->aDb[i].pBt==0 ) continue;
assert( db->aDb[i].zName!=0 );
- sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, db->aDb[i].zName, 0);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
- sqlite3BtreeGetFilename(db->aDb[i].pBt), 0);
+ sqlite3VdbeMultiLoad(v, 1, "iss",
+ i,
+ db->aDb[i].zName,
+ sqlite3BtreeGetFilename(db->aDb[i].pBt));
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
}
}
break;
case PragTyp_COLLATION_LIST: {
+ static const char *azCol[] = { "seq", "name" };
int i = 0;
HashElem *p;
- sqlite3VdbeSetNumCols(v, 2);
pParse->nMem = 2;
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
+ setAllColumnNames(v, 2, azCol); assert( 2==ArraySize(azCol) );
for(p=sqliteHashFirst(&db->aCollSeq); p; p=sqliteHashNext(p)){
CollSeq *pColl = (CollSeq *)sqliteHashData(p);
- sqlite3VdbeAddOp2(v, OP_Integer, i++, 1);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pColl->zName, 0);
+ sqlite3VdbeMultiLoad(v, 1, "is", i++, pColl->zName);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
}
}
@@ -104794,33 +106989,26 @@ SQLITE_PRIVATE void sqlite3Pragma(
v = sqlite3GetVdbe(pParse);
pFK = pTab->pFKey;
if( pFK ){
+ static const char *azCol[] = {
+ "id", "seq", "table", "from", "to", "on_update", "on_delete",
+ "match"
+ };
int i = 0;
- sqlite3VdbeSetNumCols(v, 8);
pParse->nMem = 8;
sqlite3CodeVerifySchema(pParse, iDb);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "id", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "seq", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "table", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "from", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "to", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "on_update", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 6, COLNAME_NAME, "on_delete", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 7, COLNAME_NAME, "match", SQLITE_STATIC);
+ setAllColumnNames(v, 8, azCol); assert( 8==ArraySize(azCol) );
while(pFK){
int j;
for(j=0; j<pFK->nCol; j++){
- char *zCol = pFK->aCol[j].zCol;
- char *zOnDelete = (char *)actionName(pFK->aAction[0]);
- char *zOnUpdate = (char *)actionName(pFK->aAction[1]);
- sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
- sqlite3VdbeAddOp2(v, OP_Integer, j, 2);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pFK->zTo, 0);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 4, 0,
- pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
- sqlite3VdbeAddOp4(v, zCol ? OP_String8 : OP_Null, 0, 5, 0, zCol, 0);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 6, 0, zOnUpdate, 0);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 7, 0, zOnDelete, 0);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 8, 0, "NONE", 0);
+ sqlite3VdbeMultiLoad(v, 1, "iissssss",
+ i,
+ j,
+ pFK->zTo,
+ pTab->aCol[pFK->aCol[j].iFrom].zName,
+ pFK->aCol[j].zCol,
+ actionName(pFK->aAction[1]), /* ON UPDATE */
+ actionName(pFK->aAction[0]), /* ON DELETE */
+ "NONE");
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 8);
}
++i;
@@ -104849,17 +107037,14 @@ SQLITE_PRIVATE void sqlite3Pragma(
int addrTop; /* Top of a loop checking foreign keys */
int addrOk; /* Jump here if the key is OK */
int *aiCols; /* child to parent column mapping */
+ static const char *azCol[] = { "table", "rowid", "parent", "fkid" };
regResult = pParse->nMem+1;
pParse->nMem += 4;
regKey = ++pParse->nMem;
regRow = ++pParse->nMem;
v = sqlite3GetVdbe(pParse);
- sqlite3VdbeSetNumCols(v, 4);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "table", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "rowid", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "parent", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "fkid", SQLITE_STATIC);
+ setAllColumnNames(v, 4, azCol); assert( 4==ArraySize(azCol) );
sqlite3CodeVerifySchema(pParse, iDb);
k = sqliteHashFirst(&db->aDb[iDb].pSchema->tblHash);
while( k ){
@@ -104874,8 +107059,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
if( pTab->nCol+regRow>pParse->nMem ) pParse->nMem = pTab->nCol + regRow;
sqlite3OpenTable(pParse, 0, iDb, pTab, OP_OpenRead);
- sqlite3VdbeAddOp4(v, OP_String8, 0, regResult, 0, pTab->zName,
- P4_TRANSIENT);
+ sqlite3VdbeLoadString(v, regResult, pTab->zName);
for(i=1, pFK=pTab->pFKey; pFK; i++, pFK=pFK->pNextFrom){
pParent = sqlite3FindTable(db, pFK->zTo, zDb);
if( pParent==0 ) continue;
@@ -104920,7 +107104,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
sqlite3VdbeAddOp2(v, OP_Rowid, 0, regRow);
}
sqlite3VdbeAddOp3(v, OP_NotExists, i, 0, regRow); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrOk);
+ sqlite3VdbeGoto(v, addrOk);
sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
}else{
for(j=0; j<pFK->nCol; j++){
@@ -104930,15 +107114,13 @@ SQLITE_PRIVATE void sqlite3Pragma(
}
if( pParent ){
sqlite3VdbeAddOp4(v, OP_MakeRecord, regRow, pFK->nCol, regKey,
- sqlite3IndexAffinityStr(v,pIdx), pFK->nCol);
+ sqlite3IndexAffinityStr(db,pIdx), pFK->nCol);
sqlite3VdbeAddOp4Int(v, OP_Found, i, addrOk, regKey, 0);
VdbeCoverage(v);
}
}
sqlite3VdbeAddOp2(v, OP_Rowid, 0, regResult+1);
- sqlite3VdbeAddOp4(v, OP_String8, 0, regResult+2, 0,
- pFK->zTo, P4_TRANSIENT);
- sqlite3VdbeAddOp2(v, OP_Integer, i-1, regResult+3);
+ sqlite3VdbeMultiLoad(v, regResult+2, "si", pFK->zTo, i-1);
sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, 4);
sqlite3VdbeResolveLabel(v, addrOk);
sqlite3DbFree(db, aiCols);
@@ -104992,8 +107174,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
*/
static const int iLn = VDBE_OFFSET_LINENO(2);
static const VdbeOpList endCode[] = {
- { OP_IfNeg, 1, 0, 0}, /* 0 */
- { OP_String8, 0, 3, 0}, /* 1 */
+ { OP_AddImm, 1, 0, 0}, /* 0 */
+ { OP_If, 1, 0, 0}, /* 1 */
+ { OP_String8, 0, 3, 0}, /* 2 */
{ OP_ResultRow, 3, 1, 0},
};
@@ -105014,8 +107197,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
/* Initialize the VDBE program */
pParse->nMem = 6;
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "integrity_check", SQLITE_STATIC);
+ setOneColumnName(v, "integrity_check");
/* Set the maximum error count */
mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
@@ -105137,13 +107319,11 @@ SQLITE_PRIVATE void sqlite3Pragma(
jmp2 = sqlite3VdbeAddOp4Int(v, OP_Found, iIdxCur+j, ckUniq, r1,
pIdx->nColumn); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1); /* Decrement error limit */
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, "row ", P4_STATIC);
+ sqlite3VdbeLoadString(v, 3, "row ");
sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 4, 0,
- " missing from index ", P4_STATIC);
+ sqlite3VdbeLoadString(v, 4, " missing from index ");
sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 3);
- jmp5 = sqlite3VdbeAddOp4(v, OP_String8, 0, 4, 0,
- pIdx->zName, P4_TRANSIENT);
+ jmp5 = sqlite3VdbeLoadString(v, 4, pIdx->zName);
sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 3);
sqlite3VdbeAddOp2(v, OP_ResultRow, 3, 1);
jmp4 = sqlite3VdbeAddOp1(v, OP_IfPos, 1); VdbeCoverage(v);
@@ -105158,20 +107338,19 @@ SQLITE_PRIVATE void sqlite3Pragma(
int kk;
for(kk=0; kk<pIdx->nKeyCol; kk++){
int iCol = pIdx->aiColumn[kk];
- assert( iCol>=0 && iCol<pTab->nCol );
- if( pTab->aCol[iCol].notNull ) continue;
+ assert( iCol!=XN_ROWID && iCol<pTab->nCol );
+ if( iCol>=0 && pTab->aCol[iCol].notNull ) continue;
sqlite3VdbeAddOp2(v, OP_IsNull, r1+kk, uniqOk);
VdbeCoverage(v);
}
jmp6 = sqlite3VdbeAddOp1(v, OP_Next, iIdxCur+j); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, uniqOk);
+ sqlite3VdbeGoto(v, uniqOk);
sqlite3VdbeJumpHere(v, jmp6);
sqlite3VdbeAddOp4Int(v, OP_IdxGT, iIdxCur+j, uniqOk, r1,
pIdx->nKeyCol); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1); /* Decrement error limit */
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
- "non-unique entry in index ", P4_STATIC);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, jmp5);
+ sqlite3VdbeLoadString(v, 3, "non-unique entry in index ");
+ sqlite3VdbeGoto(v, jmp5);
sqlite3VdbeResolveLabel(v, uniqOk);
}
sqlite3VdbeJumpHere(v, jmp4);
@@ -105180,8 +107359,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
sqlite3VdbeAddOp2(v, OP_Next, iDataCur, loopTop); VdbeCoverage(v);
sqlite3VdbeJumpHere(v, loopTop-1);
#ifndef SQLITE_OMIT_BTREECOUNT
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0,
- "wrong # of entries in index ", P4_STATIC);
+ sqlite3VdbeLoadString(v, 2, "wrong # of entries in index ");
for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
if( pPk==pIdx ) continue;
addr = sqlite3VdbeCurrentAddr(v);
@@ -105191,7 +107369,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
sqlite3VdbeAddOp3(v, OP_Eq, 8+j, addr+8, 3); VdbeCoverage(v);
sqlite3VdbeChangeP5(v, SQLITE_NOTNULL);
sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1);
- sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pIdx->zName, P4_TRANSIENT);
+ sqlite3VdbeLoadString(v, 3, pIdx->zName);
sqlite3VdbeAddOp3(v, OP_Concat, 3, 2, 7);
sqlite3VdbeAddOp2(v, OP_ResultRow, 7, 1);
}
@@ -105199,9 +107377,9 @@ SQLITE_PRIVATE void sqlite3Pragma(
}
}
addr = sqlite3VdbeAddOpList(v, ArraySize(endCode), endCode, iLn);
- sqlite3VdbeChangeP3(v, addr, -mxErr);
- sqlite3VdbeJumpHere(v, addr);
- sqlite3VdbeChangeP4(v, addr+1, "ok", P4_STATIC);
+ sqlite3VdbeChangeP2(v, addr, -mxErr);
+ sqlite3VdbeJumpHere(v, addr+1);
+ sqlite3VdbeChangeP4(v, addr+2, "ok", P4_STATIC);
}
break;
#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
@@ -105247,14 +107425,10 @@ SQLITE_PRIVATE void sqlite3Pragma(
const struct EncName *pEnc;
if( !zRight ){ /* "PRAGMA encoding" */
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
- sqlite3VdbeSetNumCols(v, 1);
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "encoding", SQLITE_STATIC);
- sqlite3VdbeAddOp2(v, OP_String8, 0, 1);
assert( encnames[SQLITE_UTF8].enc==SQLITE_UTF8 );
assert( encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE );
assert( encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE );
- sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
- sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+ returnSingleText(v, "encoding", encnames[ENC(pParse->db)].zName);
}else{ /* "PRAGMA encoding = XXX" */
/* Only change the value of sqlite.enc if the database handle is not
** initialized. If the main database exists, the new sqlite.enc value
@@ -105355,11 +107529,10 @@ SQLITE_PRIVATE void sqlite3Pragma(
case PragTyp_COMPILE_OPTIONS: {
int i = 0;
const char *zOpt;
- sqlite3VdbeSetNumCols(v, 1);
pParse->nMem = 1;
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "compile_option", SQLITE_STATIC);
+ setOneColumnName(v, "compile_option");
while( (zOpt = sqlite3_compileoption_get(i++))!=0 ){
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zOpt, 0);
+ sqlite3VdbeLoadString(v, 1, zOpt);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
}
}
@@ -105373,6 +107546,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
** Checkpoint the database.
*/
case PragTyp_WAL_CHECKPOINT: {
+ static const char *azCol[] = { "busy", "log", "checkpointed" };
int iBt = (pId2->z?iDb:SQLITE_MAX_ATTACHED);
int eMode = SQLITE_CHECKPOINT_PASSIVE;
if( zRight ){
@@ -105384,12 +107558,8 @@ SQLITE_PRIVATE void sqlite3Pragma(
eMode = SQLITE_CHECKPOINT_TRUNCATE;
}
}
- sqlite3VdbeSetNumCols(v, 3);
+ setAllColumnNames(v, 3, azCol); assert( 3==ArraySize(azCol) );
pParse->nMem = 3;
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "busy", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "log", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "checkpointed", SQLITE_STATIC);
-
sqlite3VdbeAddOp3(v, OP_Checkpoint, iBt, eMode, 1);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
}
@@ -105407,7 +107577,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
if( zRight ){
sqlite3_wal_autocheckpoint(db, sqlite3Atoi(zRight));
}
- returnSingleInt(pParse, "wal_autocheckpoint",
+ returnSingleInt(v, "wal_autocheckpoint",
db->xWalCallback==sqlite3WalDefaultHook ?
SQLITE_PTR_TO_INT(db->pWalArg) : 0);
}
@@ -105440,7 +107610,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
if( zRight ){
sqlite3_busy_timeout(db, sqlite3Atoi(zRight));
}
- returnSingleInt(pParse, "timeout", db->busyTimeout);
+ returnSingleInt(v, "timeout", db->busyTimeout);
break;
}
@@ -105460,7 +107630,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
if( zRight && sqlite3DecOrHexToI64(zRight, &N)==SQLITE_OK ){
sqlite3_soft_heap_limit64(N);
}
- returnSingleInt(pParse, "soft_heap_limit", sqlite3_soft_heap_limit64(-1));
+ returnSingleInt(v, "soft_heap_limit", sqlite3_soft_heap_limit64(-1));
break;
}
@@ -105479,7 +107649,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
){
sqlite3_limit(db, SQLITE_LIMIT_WORKER_THREADS, (int)(N&0x7fffffff));
}
- returnSingleInt(pParse, "threads",
+ returnSingleInt(v, "threads",
sqlite3_limit(db, SQLITE_LIMIT_WORKER_THREADS, -1));
break;
}
@@ -105492,17 +107662,15 @@ SQLITE_PRIVATE void sqlite3Pragma(
static const char *const azLockName[] = {
"unlocked", "shared", "reserved", "pending", "exclusive"
};
+ static const char *azCol[] = { "database", "status" };
int i;
- sqlite3VdbeSetNumCols(v, 2);
+ setAllColumnNames(v, 2, azCol); assert( 2==ArraySize(azCol) );
pParse->nMem = 2;
- sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "database", SQLITE_STATIC);
- sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "status", SQLITE_STATIC);
for(i=0; i<db->nDb; i++){
Btree *pBt;
const char *zState = "unknown";
int j;
if( db->aDb[i].zName==0 ) continue;
- sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, db->aDb[i].zName, P4_STATIC);
pBt = db->aDb[i].pBt;
if( pBt==0 || sqlite3BtreePager(pBt)==0 ){
zState = "closed";
@@ -105510,7 +107678,7 @@ SQLITE_PRIVATE void sqlite3Pragma(
SQLITE_FCNTL_LOCKSTATE, &j)==SQLITE_OK ){
zState = azLockName[j];
}
- sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, zState, P4_STATIC);
+ sqlite3VdbeMultiLoad(v, 1, "ss", db->aDb[i].zName, zState);
sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
}
break;
@@ -105586,6 +107754,7 @@ pragma_out:
** interface, and routines that contribute to loading the database schema
** from disk.
*/
+/* #include "sqliteInt.h" */
/*
** Fill the InitData structure with an error message that indicates
@@ -105598,13 +107767,13 @@ static void corruptSchema(
){
sqlite3 *db = pData->db;
if( !db->mallocFailed && (db->flags & SQLITE_RecoveryMode)==0 ){
+ char *z;
if( zObj==0 ) zObj = "?";
- sqlite3SetString(pData->pzErrMsg, db,
- "malformed database schema (%s)", zObj);
- if( zExtra ){
- *pData->pzErrMsg = sqlite3MAppendf(db, *pData->pzErrMsg,
- "%s - %s", *pData->pzErrMsg, zExtra);
- }
+ z = sqlite3_mprintf("malformed database schema (%s)", zObj);
+ if( z && zExtra ) z = sqlite3_mprintf("%z - %s", z, zExtra);
+ sqlite3DbFree(db, *pData->pzErrMsg);
+ *pData->pzErrMsg = z;
+ if( z==0 ) db->mallocFailed = 1;
}
pData->rc = db->mallocFailed ? SQLITE_NOMEM : SQLITE_CORRUPT_BKPT;
}
@@ -105796,7 +107965,7 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
if( !sqlite3BtreeIsInReadTrans(pDb->pBt) ){
rc = sqlite3BtreeBeginTrans(pDb->pBt, 0);
if( rc!=SQLITE_OK ){
- sqlite3SetString(pzErrMsg, db, "%s", sqlite3ErrStr(rc));
+ sqlite3SetString(pzErrMsg, db, sqlite3ErrStr(rc));
goto initone_error_out;
}
openedTransaction = 1;
@@ -106480,6 +108649,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
*/
+/* #include "sqliteInt.h" */
/*
** Trace output macros
@@ -106488,7 +108658,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
/***/ int sqlite3SelectTrace = 0;
# define SELECTTRACE(K,P,S,X) \
if(sqlite3SelectTrace&(K)) \
- sqlite3DebugPrintf("%*s%s.%p: ",(P)->nSelectIndent*2-2,"",(S)->zSelName,(S)),\
+ sqlite3DebugPrintf("%*s%s.%p: ",(P)->nSelectIndent*2-2,"",\
+ (S)->zSelName,(S)),\
sqlite3DebugPrintf X
#else
# define SELECTTRACE(K,P,S,X)
@@ -106832,6 +109003,12 @@ static void setJoinExpr(Expr *p, int iTable){
assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );
ExprSetVVAProperty(p, EP_NoReduce);
p->iRightJoinTable = (i16)iTable;
+ if( p->op==TK_FUNCTION && p->x.pList ){
+ int i;
+ for(i=0; i<p->x.pList->nExpr; i++){
+ setJoinExpr(p->x.pList->a[i].pExpr, iTable);
+ }
+ }
setJoinExpr(p->pLeft, iTable);
p = p->pRight;
}
@@ -106866,12 +109043,12 @@ static int sqliteProcessJoin(Parse *pParse, Select *p){
int isOuter;
if( NEVER(pLeftTab==0 || pRightTab==0) ) continue;
- isOuter = (pRight->jointype & JT_OUTER)!=0;
+ isOuter = (pRight->fg.jointype & JT_OUTER)!=0;
/* When the NATURAL keyword is present, add WHERE clause terms for
** every column that the two tables have in common.
*/
- if( pRight->jointype & JT_NATURAL ){
+ if( pRight->fg.jointype & JT_NATURAL ){
if( pRight->pOn || pRight->pUsing ){
sqlite3ErrorMsg(pParse, "a NATURAL join may not have "
"an ON or USING clause", 0);
@@ -106956,6 +109133,7 @@ static void pushOntoSorter(
SortCtx *pSort, /* Information about the ORDER BY clause */
Select *pSelect, /* The whole SELECT statement */
int regData, /* First register holding data to be sorted */
+ int regOrigData, /* First register holding data before packing */
int nData, /* Number of elements in the data array */
int nPrefixReg /* No. of reg prior to regData available for use */
){
@@ -106969,6 +109147,7 @@ static void pushOntoSorter(
int op; /* Opcode to add sorter record to sorter */
assert( bSeq==0 || bSeq==1 );
+ assert( nData==1 || regData==regOrigData );
if( nPrefixReg ){
assert( nPrefixReg==nExpr+bSeq );
regBase = regData - nExpr - bSeq;
@@ -106976,7 +109155,8 @@ static void pushOntoSorter(
regBase = pParse->nMem + 1;
pParse->nMem += nBase;
}
- sqlite3ExprCodeExprList(pParse, pSort->pOrderBy, regBase, SQLITE_ECEL_DUP);
+ sqlite3ExprCodeExprList(pParse, pSort->pOrderBy, regBase, regOrigData,
+ SQLITE_ECEL_DUP|SQLITE_ECEL_REF);
if( bSeq ){
sqlite3VdbeAddOp2(v, OP_Sequence, pSort->iECursor, regBase+nExpr);
}
@@ -107036,7 +109216,7 @@ static void pushOntoSorter(
}else{
iLimit = pSelect->iLimit;
}
- addr = sqlite3VdbeAddOp3(v, OP_IfNotZero, iLimit, 0, -1); VdbeCoverage(v);
+ addr = sqlite3VdbeAddOp3(v, OP_IfNotZero, iLimit, 0, 1); VdbeCoverage(v);
sqlite3VdbeAddOp1(v, OP_Last, pSort->iECursor);
sqlite3VdbeAddOp1(v, OP_Delete, pSort->iECursor);
sqlite3VdbeJumpHere(v, addr);
@@ -107052,11 +109232,8 @@ static void codeOffset(
int iContinue /* Jump here to skip the current record */
){
if( iOffset>0 ){
- int addr;
- addr = sqlite3VdbeAddOp3(v, OP_IfNeg, iOffset, 0, -1); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, iContinue);
- VdbeComment((v, "skip OFFSET records"));
- sqlite3VdbeJumpHere(v, addr);
+ sqlite3VdbeAddOp3(v, OP_IfPos, iOffset, iContinue, 1); VdbeCoverage(v);
+ VdbeComment((v, "OFFSET"));
}
}
@@ -107180,8 +109357,13 @@ static void selectInnerLoop(
/* If the destination is an EXISTS(...) expression, the actual
** values returned by the SELECT are not required.
*/
- sqlite3ExprCodeExprList(pParse, pEList, regResult,
- (eDest==SRT_Output||eDest==SRT_Coroutine)?SQLITE_ECEL_DUP:0);
+ u8 ecelFlags;
+ if( eDest==SRT_Mem || eDest==SRT_Output || eDest==SRT_Coroutine ){
+ ecelFlags = SQLITE_ECEL_DUP;
+ }else{
+ ecelFlags = 0;
+ }
+ sqlite3ExprCodeExprList(pParse, pEList, regResult, 0, ecelFlags);
}
/* If the DISTINCT keyword was present on the SELECT statement
@@ -107236,7 +109418,8 @@ static void selectInnerLoop(
default: {
assert( pDistinct->eTnctType==WHERE_DISTINCT_UNORDERED );
- codeDistinct(pParse, pDistinct->tabTnct, iContinue, nResultCol, regResult);
+ codeDistinct(pParse, pDistinct->tabTnct, iContinue, nResultCol,
+ regResult);
break;
}
}
@@ -107278,6 +109461,8 @@ static void selectInnerLoop(
int r1 = sqlite3GetTempRange(pParse, nPrefixReg+1);
testcase( eDest==SRT_Table );
testcase( eDest==SRT_EphemTab );
+ testcase( eDest==SRT_Fifo );
+ testcase( eDest==SRT_DistFifo );
sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg);
#ifndef SQLITE_OMIT_CTE
if( eDest==SRT_DistFifo ){
@@ -107287,13 +109472,14 @@ static void selectInnerLoop(
** current row to the index and proceed with writing it to the
** output table as well. */
int addr = sqlite3VdbeCurrentAddr(v) + 4;
- sqlite3VdbeAddOp4Int(v, OP_Found, iParm+1, addr, r1, 0); VdbeCoverage(v);
+ sqlite3VdbeAddOp4Int(v, OP_Found, iParm+1, addr, r1, 0);
+ VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm+1, r1);
assert( pSort==0 );
}
#endif
if( pSort ){
- pushOntoSorter(pParse, pSort, p, r1+nPrefixReg, 1, nPrefixReg);
+ pushOntoSorter(pParse, pSort, p, r1+nPrefixReg,regResult,1,nPrefixReg);
}else{
int r2 = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, r2);
@@ -107319,7 +109505,7 @@ static void selectInnerLoop(
** ORDER BY in this case since the order of entries in the set
** does not matter. But there might be a LIMIT clause, in which
** case the order does matter */
- pushOntoSorter(pParse, pSort, p, regResult, 1, nPrefixReg);
+ pushOntoSorter(pParse, pSort, p, regResult, regResult, 1, nPrefixReg);
}else{
int r1 = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp4(v, OP_MakeRecord, regResult,1,r1, &pDest->affSdst, 1);
@@ -107345,7 +109531,7 @@ static void selectInnerLoop(
case SRT_Mem: {
assert( nResultCol==1 );
if( pSort ){
- pushOntoSorter(pParse, pSort, p, regResult, 1, nPrefixReg);
+ pushOntoSorter(pParse, pSort, p, regResult, regResult, 1, nPrefixReg);
}else{
assert( regResult==iParm );
/* The LIMIT clause will jump out of the loop for us */
@@ -107359,7 +109545,8 @@ static void selectInnerLoop(
testcase( eDest==SRT_Coroutine );
testcase( eDest==SRT_Output );
if( pSort ){
- pushOntoSorter(pParse, pSort, p, regResult, nResultCol, nPrefixReg);
+ pushOntoSorter(pParse, pSort, p, regResult, regResult, nResultCol,
+ nPrefixReg);
}else if( eDest==SRT_Coroutine ){
sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);
}else{
@@ -107533,7 +109720,6 @@ static KeyInfo *keyInfoFromExprList(
return pInfo;
}
-#ifndef SQLITE_OMIT_COMPOUND_SELECT
/*
** Name of the connection operator, used for error messages.
*/
@@ -107547,7 +109733,6 @@ static const char *selectOpName(int id){
}
return z;
}
-#endif /* SQLITE_OMIT_COMPOUND_SELECT */
#ifndef SQLITE_OMIT_EXPLAIN
/*
@@ -107655,7 +109840,7 @@ static void generateSortTail(
if( pSort->labelBkOut ){
sqlite3VdbeAddOp2(v, OP_Gosub, pSort->regReturn, pSort->labelBkOut);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrBreak);
+ sqlite3VdbeGoto(v, addrBreak);
sqlite3VdbeResolveLabel(v, pSort->labelBkOut);
}
iTab = pSort->iECursor;
@@ -107693,10 +109878,7 @@ static void generateSortTail(
VdbeComment((v, "%s", aOutEx[i].zName ? aOutEx[i].zName : aOutEx[i].zSpan));
}
switch( eDest ){
- case SRT_Table:
case SRT_EphemTab: {
- testcase( eDest==SRT_Table );
- testcase( eDest==SRT_EphemTab );
sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, regRowid);
sqlite3VdbeAddOp3(v, OP_Insert, iParm, regRow, regRowid);
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
@@ -107773,28 +109955,27 @@ static void generateSortTail(
*/
#ifdef SQLITE_ENABLE_COLUMN_METADATA
# define columnType(A,B,C,D,E,F) columnTypeImpl(A,B,C,D,E,F)
+#else /* if !defined(SQLITE_ENABLE_COLUMN_METADATA) */
+# define columnType(A,B,C,D,E,F) columnTypeImpl(A,B,F)
+#endif
static const char *columnTypeImpl(
NameContext *pNC,
Expr *pExpr,
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
const char **pzOrigDb,
const char **pzOrigTab,
const char **pzOrigCol,
+#endif
u8 *pEstWidth
){
- char const *zOrigDb = 0;
- char const *zOrigTab = 0;
- char const *zOrigCol = 0;
-#else /* if !defined(SQLITE_ENABLE_COLUMN_METADATA) */
-# define columnType(A,B,C,D,E,F) columnTypeImpl(A,B,F)
-static const char *columnTypeImpl(
- NameContext *pNC,
- Expr *pExpr,
- u8 *pEstWidth
-){
-#endif /* !defined(SQLITE_ENABLE_COLUMN_METADATA) */
char const *zType = 0;
int j;
u8 estWidth = 1;
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
+ char const *zOrigDb = 0;
+ char const *zOrigTab = 0;
+ char const *zOrigCol = 0;
+#endif
if( NEVER(pExpr==0) || pNC->pSrcList==0 ) return 0;
switch( pExpr->op ){
@@ -107847,10 +110028,13 @@ static const char *columnTypeImpl(
** of the SELECT statement. Return the declaration type and origin
** data for the result-set column of the sub-select.
*/
- if( iCol>=0 && iCol<pS->pEList->nExpr ){
+ if( iCol>=0 && ALWAYS(iCol<pS->pEList->nExpr) ){
/* If iCol is less than zero, then the expression requests the
** rowid of the sub-select or view. This expression is legal (see
** test case misc2.2.2) - it always evaluates to NULL.
+ **
+ ** The ALWAYS() is because iCol>=pS->pEList->nExpr will have been
+ ** caught already by name resolution.
*/
NameContext sNC;
Expr *p = pS->pEList->a[iCol].pExpr;
@@ -108041,7 +110225,7 @@ static void generateColumnNames(
** Return SQLITE_OK on success. If a memory allocation error occurs,
** store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM.
*/
-static int selectColumnsFromExprList(
+SQLITE_PRIVATE int sqlite3ColumnsFromExprList(
Parse *pParse, /* Parsing context */
ExprList *pEList, /* Expr list from which to derive column names */
i16 *pnCol, /* Write the number of columns here */
@@ -108168,11 +110352,12 @@ static void selectAddColumnTypeAndCollation(
for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
p = a[i].pExpr;
if( pCol->zType==0 ){
- pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p,0,0,0, &pCol->szEst));
+ pCol->zType = sqlite3DbStrDup(db,
+ columnType(&sNC, p,0,0,0, &pCol->szEst));
}
szAll += pCol->szEst;
pCol->affinity = sqlite3ExprAffinity(p);
- if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_NONE;
+ if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_BLOB;
pColl = sqlite3ExprCollSeq(pParse, p);
if( pColl && pCol->zColl==0 ){
pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
@@ -108207,7 +110392,7 @@ SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect){
pTab->nRef = 1;
pTab->zName = 0;
pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );
- selectColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
+ sqlite3ColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
selectAddColumnTypeAndCollation(pParse, pTab, pSelect);
pTab->iPKey = -1;
if( db->mallocFailed ){
@@ -108264,7 +110449,7 @@ static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){
Vdbe *v = 0;
int iLimit = 0;
int iOffset;
- int addr1, n;
+ int n;
if( p->iLimit ) return;
/*
@@ -108283,7 +110468,7 @@ static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){
sqlite3VdbeAddOp2(v, OP_Integer, n, iLimit);
VdbeComment((v, "LIMIT counter"));
if( n==0 ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, iBreak);
+ sqlite3VdbeGoto(v, iBreak);
}else if( n>=0 && p->nSelectRow>(u64)n ){
p->nSelectRow = n;
}
@@ -108299,14 +110484,10 @@ static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){
sqlite3ExprCode(pParse, p->pOffset, iOffset);
sqlite3VdbeAddOp1(v, OP_MustBeInt, iOffset); VdbeCoverage(v);
VdbeComment((v, "OFFSET counter"));
- addr1 = sqlite3VdbeAddOp1(v, OP_IfPos, iOffset); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Integer, 0, iOffset);
- sqlite3VdbeJumpHere(v, addr1);
+ sqlite3VdbeAddOp3(v, OP_SetIfNotPos, iOffset, iOffset, 0);
sqlite3VdbeAddOp3(v, OP_Add, iLimit, iOffset, iOffset+1);
VdbeComment((v, "LIMIT+OFFSET"));
- addr1 = sqlite3VdbeAddOp1(v, OP_IfPos, iLimit); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Integer, -1, iOffset+1);
- sqlite3VdbeJumpHere(v, addr1);
+ sqlite3VdbeAddOp3(v, OP_SetIfNotPos, iLimit, iOffset+1, -1);
}
}
}
@@ -108328,7 +110509,10 @@ static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){
pRet = 0;
}
assert( iCol>=0 );
- if( pRet==0 && iCol<p->pEList->nExpr ){
+ /* iCol must be less than p->pEList->nExpr. Otherwise an error would
+ ** have been thrown during name resolution and we would not have gotten
+ ** this far */
+ if( pRet==0 && ALWAYS(iCol<p->pEList->nExpr) ){
pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
}
return pRet;
@@ -108383,7 +110567,7 @@ static KeyInfo *multiSelectOrderByKeyInfo(Parse *pParse, Select *p, int nExtra){
**
**
** There is exactly one reference to the recursive-table in the FROM clause
-** of recursive-query, marked with the SrcList->a[].isRecursive flag.
+** of recursive-query, marked with the SrcList->a[].fg.isRecursive flag.
**
** The setup-query runs once to generate an initial set of rows that go
** into a Queue table. Rows are extracted from the Queue table one by
@@ -108448,7 +110632,7 @@ static void generateWithRecursiveQuery(
/* Locate the cursor number of the Current table */
for(i=0; ALWAYS(i<pSrc->nSrc); i++){
- if( pSrc->a[i].isRecursive ){
+ if( pSrc->a[i].fg.isRecursive ){
iCurrent = pSrc->a[i].iCursor;
break;
}
@@ -108518,13 +110702,17 @@ static void generateWithRecursiveQuery(
/* Execute the recursive SELECT taking the single row in Current as
** the value for the recursive-table. Store the results in the Queue.
*/
- p->pPrior = 0;
- sqlite3Select(pParse, p, &destQueue);
- assert( p->pPrior==0 );
- p->pPrior = pSetup;
+ if( p->selFlags & SF_Aggregate ){
+ sqlite3ErrorMsg(pParse, "recursive aggregate queries not supported");
+ }else{
+ p->pPrior = 0;
+ sqlite3Select(pParse, p, &destQueue);
+ assert( p->pPrior==0 );
+ p->pPrior = pSetup;
+ }
/* Keep running the loop until the Queue is empty */
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrTop);
+ sqlite3VdbeGoto(v, addrTop);
sqlite3VdbeResolveLabel(v, addrBreak);
end_of_recursive_query:
@@ -108544,19 +110732,6 @@ static int multiSelectOrderBy(
);
/*
-** Error message for when two or more terms of a compound select have different
-** size result sets.
-*/
-static void selectWrongNumTermsError(Parse *pParse, Select *p){
- if( p->selFlags & SF_Values ){
- sqlite3ErrorMsg(pParse, "all VALUES must have the same number of terms");
- }else{
- sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
- " do not have the same number of result columns", selectOpName(p->op));
- }
-}
-
-/*
** Handle the special case of a compound-select that originates from a
** VALUES clause. By handling this as a special case, we avoid deep
** recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT
@@ -108573,7 +110748,6 @@ static int multiSelectValues(
SelectDest *pDest /* What to do with query results */
){
Select *pPrior;
- int nExpr = p->pEList->nExpr;
int nRow = 1;
int rc = 0;
assert( p->selFlags & SF_MultiValue );
@@ -108582,10 +110756,7 @@ static int multiSelectValues(
assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) );
assert( p->pLimit==0 );
assert( p->pOffset==0 );
- if( p->pEList->nExpr!=nExpr ){
- selectWrongNumTermsError(pParse, p);
- return 1;
- }
+ assert( p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr );
if( p->pPrior==0 ) break;
assert( p->pPrior->pNext==p );
p = p->pPrior;
@@ -108694,11 +110865,7 @@ static int multiSelect(
** in their result sets.
*/
assert( p->pEList && pPrior->pEList );
- if( p->pEList->nExpr!=pPrior->pEList->nExpr ){
- selectWrongNumTermsError(pParse, p);
- rc = 1;
- goto multi_select_end;
- }
+ assert( p->pEList->nExpr==pPrior->pEList->nExpr );
#ifndef SQLITE_OMIT_CTE
if( p->selFlags & SF_Recursive ){
@@ -108736,6 +110903,11 @@ static int multiSelect(
if( p->iLimit ){
addr = sqlite3VdbeAddOp1(v, OP_IfNot, p->iLimit); VdbeCoverage(v);
VdbeComment((v, "Jump ahead if LIMIT reached"));
+ if( p->iOffset ){
+ sqlite3VdbeAddOp3(v, OP_SetIfNotPos, p->iOffset, p->iOffset, 0);
+ sqlite3VdbeAddOp3(v, OP_Add, p->iLimit, p->iOffset, p->iOffset+1);
+ sqlite3VdbeAddOp3(v, OP_SetIfNotPos, p->iLimit, p->iOffset+1, -1);
+ }
}
explainSetInteger(iSub2, pParse->iNextSelectId);
rc = sqlite3Select(pParse, p, &dest);
@@ -108991,6 +111163,19 @@ multi_select_end:
#endif /* SQLITE_OMIT_COMPOUND_SELECT */
/*
+** Error message for when two or more terms of a compound select have different
+** size result sets.
+*/
+SQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p){
+ if( p->selFlags & SF_Values ){
+ sqlite3ErrorMsg(pParse, "all VALUES must have the same number of terms");
+ }else{
+ sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
+ " do not have the same number of result columns", selectOpName(p->op));
+ }
+}
+
+/*
** Code an output subroutine for a coroutine implementation of a
** SELECT statment.
**
@@ -109030,12 +111215,12 @@ static int generateOutputSubroutine(
/* Suppress duplicates for UNION, EXCEPT, and INTERSECT
*/
if( regPrev ){
- int j1, j2;
- j1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
- j2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
+ int addr1, addr2;
+ addr1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
+ addr2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
(char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
- sqlite3VdbeAddOp3(v, OP_Jump, j2+2, iContinue, j2+2); VdbeCoverage(v);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeAddOp3(v, OP_Jump, addr2+2, iContinue, addr2+2); VdbeCoverage(v);
+ sqlite3VdbeJumpHere(v, addr1);
sqlite3VdbeAddOp3(v, OP_Copy, pIn->iSdst, regPrev+1, pIn->nSdst-1);
sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
}
@@ -109045,15 +111230,14 @@ static int generateOutputSubroutine(
*/
codeOffset(v, p->iOffset, iContinue);
+ assert( pDest->eDest!=SRT_Exists );
+ assert( pDest->eDest!=SRT_Table );
switch( pDest->eDest ){
/* Store the result as data using a unique key.
*/
- case SRT_Table:
case SRT_EphemTab: {
int r1 = sqlite3GetTempReg(pParse);
int r2 = sqlite3GetTempReg(pParse);
- testcase( pDest->eDest==SRT_Table );
- testcase( pDest->eDest==SRT_EphemTab );
sqlite3VdbeAddOp3(v, OP_MakeRecord, pIn->iSdst, pIn->nSdst, r1);
sqlite3VdbeAddOp2(v, OP_NewRowid, pDest->iSDParm, r2);
sqlite3VdbeAddOp3(v, OP_Insert, pDest->iSDParm, r1, r2);
@@ -109081,16 +111265,6 @@ static int generateOutputSubroutine(
break;
}
-#if 0 /* Never occurs on an ORDER BY query */
- /* If any row exist in the result set, record that fact and abort.
- */
- case SRT_Exists: {
- sqlite3VdbeAddOp2(v, OP_Integer, 1, pDest->iSDParm);
- /* The LIMIT clause will terminate the loop for us */
- break;
- }
-#endif
-
/* If this is a scalar select that is part of an expression, then
** store the results in the appropriate memory cell and break out
** of the scan loop.
@@ -109263,7 +111437,7 @@ static int multiSelectOrderBy(
int savedOffset; /* Saved value of p->iOffset */
int labelCmpr; /* Label for the start of the merge algorithm */
int labelEnd; /* Label for the end of the overall SELECT stmt */
- int j1; /* Jump instructions that get retargetted */
+ int addr1; /* Jump instructions that get retargetted */
int op; /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
KeyInfo *pKeyMerge; /* Comparison information for merging rows */
@@ -109328,9 +111502,7 @@ static int multiSelectOrderBy(
struct ExprList_item *pItem;
for(i=0, pItem=pOrderBy->a; i<nOrderBy; i++, pItem++){
assert( pItem->u.x.iOrderByCol>0 );
- /* assert( pItem->u.x.iOrderByCol<=p->pEList->nExpr ) is also true
- ** but only for well-formed SELECT statements. */
- testcase( pItem->u.x.iOrderByCol > p->pEList->nExpr );
+ assert( pItem->u.x.iOrderByCol<=p->pEList->nExpr );
aPermute[i] = pItem->u.x.iOrderByCol - 1;
}
pKeyMerge = multiSelectOrderByKeyInfo(pParse, p, 1);
@@ -109401,19 +111573,19 @@ static int multiSelectOrderBy(
** left of the compound operator - the "A" select.
*/
addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;
- j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
+ addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
VdbeComment((v, "left SELECT"));
pPrior->iLimit = regLimitA;
explainSetInteger(iSub1, pParse->iNextSelectId);
sqlite3Select(pParse, pPrior, &destA);
sqlite3VdbeAddOp1(v, OP_EndCoroutine, regAddrA);
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
/* Generate a coroutine to evaluate the SELECT statement on
** the right - the "B" select
*/
addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;
- j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
+ addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
VdbeComment((v, "right SELECT"));
savedLimit = p->iLimit;
savedOffset = p->iOffset;
@@ -109454,7 +111626,7 @@ static int multiSelectOrderBy(
addrEofA = sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
addrEofA_noB = sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, labelEnd);
VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEofA);
+ sqlite3VdbeGoto(v, addrEofA);
p->nSelectRow += pPrior->nSelectRow;
}
@@ -109468,7 +111640,7 @@ static int multiSelectOrderBy(
VdbeNoopComment((v, "eof-B subroutine"));
addrEofB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, labelEnd); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEofB);
+ sqlite3VdbeGoto(v, addrEofB);
}
/* Generate code to handle the case of A<B
@@ -109476,7 +111648,7 @@ static int multiSelectOrderBy(
VdbeNoopComment((v, "A-lt-B subroutine"));
addrAltB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
+ sqlite3VdbeGoto(v, labelCmpr);
/* Generate code to handle the case of A==B
*/
@@ -109489,7 +111661,7 @@ static int multiSelectOrderBy(
VdbeNoopComment((v, "A-eq-B subroutine"));
addrAeqB =
sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
+ sqlite3VdbeGoto(v, labelCmpr);
}
/* Generate code to handle the case of A>B
@@ -109500,11 +111672,11 @@ static int multiSelectOrderBy(
sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
}
sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
+ sqlite3VdbeGoto(v, labelCmpr);
/* This code runs once to initialize everything.
*/
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
@@ -109547,7 +111719,7 @@ static int multiSelectOrderBy(
#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
/* Forward Declarations */
static void substExprList(sqlite3*, ExprList*, int, ExprList*);
-static void substSelect(sqlite3*, Select *, int, ExprList *);
+static void substSelect(sqlite3*, Select *, int, ExprList*, int);
/*
** Scan through the expression pExpr. Replace every reference to
@@ -109584,7 +111756,7 @@ static Expr *substExpr(
pExpr->pLeft = substExpr(db, pExpr->pLeft, iTable, pEList);
pExpr->pRight = substExpr(db, pExpr->pRight, iTable, pEList);
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
- substSelect(db, pExpr->x.pSelect, iTable, pEList);
+ substSelect(db, pExpr->x.pSelect, iTable, pEList, 1);
}else{
substExprList(db, pExpr->x.pList, iTable, pEList);
}
@@ -109607,25 +111779,28 @@ static void substSelect(
sqlite3 *db, /* Report malloc errors here */
Select *p, /* SELECT statement in which to make substitutions */
int iTable, /* Table to be replaced */
- ExprList *pEList /* Substitute values */
+ ExprList *pEList, /* Substitute values */
+ int doPrior /* Do substitutes on p->pPrior too */
){
SrcList *pSrc;
struct SrcList_item *pItem;
int i;
if( !p ) return;
- substExprList(db, p->pEList, iTable, pEList);
- substExprList(db, p->pGroupBy, iTable, pEList);
- substExprList(db, p->pOrderBy, iTable, pEList);
- p->pHaving = substExpr(db, p->pHaving, iTable, pEList);
- p->pWhere = substExpr(db, p->pWhere, iTable, pEList);
- substSelect(db, p->pPrior, iTable, pEList);
- pSrc = p->pSrc;
- assert( pSrc ); /* Even for (SELECT 1) we have: pSrc!=0 but pSrc->nSrc==0 */
- if( ALWAYS(pSrc) ){
+ do{
+ substExprList(db, p->pEList, iTable, pEList);
+ substExprList(db, p->pGroupBy, iTable, pEList);
+ substExprList(db, p->pOrderBy, iTable, pEList);
+ p->pHaving = substExpr(db, p->pHaving, iTable, pEList);
+ p->pWhere = substExpr(db, p->pWhere, iTable, pEList);
+ pSrc = p->pSrc;
+ assert( pSrc!=0 );
for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
- substSelect(db, pItem->pSelect, iTable, pEList);
+ substSelect(db, pItem->pSelect, iTable, pEList, 1);
+ if( pItem->fg.isTabFunc ){
+ substExprList(db, pItem->u1.pFuncArg, iTable, pEList);
+ }
}
- }
+ }while( doPrior && (p = p->pPrior)!=0 );
}
#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
@@ -109689,8 +111864,8 @@ static void substSelect(
**
** (**) Restriction (10) was removed from the code on 2005-02-05 but we
** accidently carried the comment forward until 2014-09-15. Original
-** text: "The subquery does not use aggregates or the outer query does not
-** use LIMIT."
+** text: "The subquery does not use aggregates or the outer query
+** does not use LIMIT."
**
** (11) The subquery and the outer query do not both have ORDER BY clauses.
**
@@ -109777,7 +111952,7 @@ static int flattenSubquery(
int subqueryIsAgg /* True if the subquery uses aggregate functions */
){
const char *zSavedAuthContext = pParse->zAuthContext;
- Select *pParent;
+ Select *pParent; /* Current UNION ALL term of the other query */
Select *pSub; /* The inner query or "subquery" */
Select *pSub1; /* Pointer to the rightmost select in sub-query */
SrcList *pSrc; /* The FROM clause of the outer query */
@@ -109880,7 +112055,7 @@ static int flattenSubquery(
** is fraught with danger. Best to avoid the whole thing. If the
** subquery is the right term of a LEFT JOIN, then do not flatten.
*/
- if( (pSubitem->jointype & JT_OUTER)!=0 ){
+ if( (pSubitem->fg.jointype & JT_OUTER)!=0 ){
return 0;
}
@@ -109900,10 +112075,10 @@ static int flattenSubquery(
testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
assert( pSub->pSrc!=0 );
+ assert( pSub->pEList->nExpr==pSub1->pEList->nExpr );
if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
|| (pSub1->pPrior && pSub1->op!=TK_ALL)
|| pSub1->pSrc->nSrc<1
- || pSub->pEList->nExpr!=pSub1->pEList->nExpr
){
return 0;
}
@@ -110051,7 +112226,7 @@ static int flattenSubquery(
if( pSrc ){
assert( pParent==p ); /* First time through the loop */
- jointype = pSubitem->jointype;
+ jointype = pSubitem->fg.jointype;
}else{
assert( pParent!=p ); /* 2nd and subsequent times through the loop */
pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
@@ -110072,9 +112247,9 @@ static int flattenSubquery(
**
** The outer query has 3 slots in its FROM clause. One slot of the
** outer query (the middle slot) is used by the subquery. The next
- ** block of code will expand the out query to 4 slots. The middle
- ** slot is expanded to two slots in order to make space for the
- ** two elements in the FROM clause of the subquery.
+ ** block of code will expand the outer query FROM clause to 4 slots.
+ ** The middle slot is expanded to two slots in order to make space
+ ** for the two elements in the FROM clause of the subquery.
*/
if( nSubSrc>1 ){
pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
@@ -110091,7 +112266,7 @@ static int flattenSubquery(
pSrc->a[i+iFrom] = pSubSrc->a[i];
memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i]));
}
- pSrc->a[iFrom].jointype = jointype;
+ pSrc->a[iFrom].fg.jointype = jointype;
/* Now begin substituting subquery result set expressions for
** references to the iParent in the outer query.
@@ -110113,17 +112288,12 @@ static int flattenSubquery(
pList->a[i].zName = zName;
}
}
- substExprList(db, pParent->pEList, iParent, pSub->pEList);
- if( isAgg ){
- substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
- pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
- }
if( pSub->pOrderBy ){
/* At this point, any non-zero iOrderByCol values indicate that the
** ORDER BY column expression is identical to the iOrderByCol'th
** expression returned by SELECT statement pSub. Since these values
** do not necessarily correspond to columns in SELECT statement pParent,
- ** zero them before transferring the ORDER BY clause.
+ ** zero them before transfering the ORDER BY clause.
**
** Not doing this may cause an error if a subsequent call to this
** function attempts to flatten a compound sub-query into pParent
@@ -110137,27 +112307,20 @@ static int flattenSubquery(
assert( pSub->pPrior==0 );
pParent->pOrderBy = pOrderBy;
pSub->pOrderBy = 0;
- }else if( pParent->pOrderBy ){
- substExprList(db, pParent->pOrderBy, iParent, pSub->pEList);
- }
- if( pSub->pWhere ){
- pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
- }else{
- pWhere = 0;
}
+ pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
if( subqueryIsAgg ){
assert( pParent->pHaving==0 );
pParent->pHaving = pParent->pWhere;
pParent->pWhere = pWhere;
- pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving,
sqlite3ExprDup(db, pSub->pHaving, 0));
assert( pParent->pGroupBy==0 );
pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
}else{
- pParent->pWhere = substExpr(db, pParent->pWhere, iParent, pSub->pEList);
pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
}
+ substSelect(db, pParent, iParent, pSub->pEList, 0);
/* The flattened query is distinct if either the inner or the
** outer query is distinct.
@@ -110183,7 +112346,7 @@ static int flattenSubquery(
#if SELECTTRACE_ENABLED
if( sqlite3SelectTrace & 0x100 ){
- sqlite3DebugPrintf("After flattening:\n");
+ SELECTTRACE(0x100,pParse,p,("After flattening:\n"));
sqlite3TreeViewSelect(0, p, 0);
}
#endif
@@ -110192,6 +112355,77 @@ static int flattenSubquery(
}
#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
+
+
+#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
+/*
+** Make copies of relevant WHERE clause terms of the outer query into
+** the WHERE clause of subquery. Example:
+**
+** SELECT * FROM (SELECT a AS x, c-d AS y FROM t1) WHERE x=5 AND y=10;
+**
+** Transformed into:
+**
+** SELECT * FROM (SELECT a AS x, c-d AS y FROM t1 WHERE a=5 AND c-d=10)
+** WHERE x=5 AND y=10;
+**
+** The hope is that the terms added to the inner query will make it more
+** efficient.
+**
+** Do not attempt this optimization if:
+**
+** (1) The inner query is an aggregate. (In that case, we'd really want
+** to copy the outer WHERE-clause terms onto the HAVING clause of the
+** inner query. But they probably won't help there so do not bother.)
+**
+** (2) The inner query is the recursive part of a common table expression.
+**
+** (3) The inner query has a LIMIT clause (since the changes to the WHERE
+** close would change the meaning of the LIMIT).
+**
+** (4) The inner query is the right operand of a LEFT JOIN. (The caller
+** enforces this restriction since this routine does not have enough
+** information to know.)
+**
+** (5) The WHERE clause expression originates in the ON or USING clause
+** of a LEFT JOIN.
+**
+** Return 0 if no changes are made and non-zero if one or more WHERE clause
+** terms are duplicated into the subquery.
+*/
+static int pushDownWhereTerms(
+ sqlite3 *db, /* The database connection (for malloc()) */
+ Select *pSubq, /* The subquery whose WHERE clause is to be augmented */
+ Expr *pWhere, /* The WHERE clause of the outer query */
+ int iCursor /* Cursor number of the subquery */
+){
+ Expr *pNew;
+ int nChng = 0;
+ if( pWhere==0 ) return 0;
+ if( (pSubq->selFlags & (SF_Aggregate|SF_Recursive))!=0 ){
+ return 0; /* restrictions (1) and (2) */
+ }
+ if( pSubq->pLimit!=0 ){
+ return 0; /* restriction (3) */
+ }
+ while( pWhere->op==TK_AND ){
+ nChng += pushDownWhereTerms(db, pSubq, pWhere->pRight, iCursor);
+ pWhere = pWhere->pLeft;
+ }
+ if( ExprHasProperty(pWhere,EP_FromJoin) ) return 0; /* restriction 5 */
+ if( sqlite3ExprIsTableConstant(pWhere, iCursor) ){
+ nChng++;
+ while( pSubq ){
+ pNew = sqlite3ExprDup(db, pWhere, 0);
+ pNew = substExpr(db, pNew, iCursor, pSubq->pEList);
+ pSubq->pWhere = sqlite3ExprAnd(db, pSubq->pWhere, pNew);
+ pSubq = pSubq->pPrior;
+ }
+ }
+ return nChng;
+}
+#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
+
/*
** Based on the contents of the AggInfo structure indicated by the first
** argument, this function checks if the following are true:
@@ -110275,20 +112509,20 @@ static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
** pFrom->pIndex and return SQLITE_OK.
*/
SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pFrom){
- if( pFrom->pTab && pFrom->zIndex ){
+ if( pFrom->pTab && pFrom->fg.isIndexedBy ){
Table *pTab = pFrom->pTab;
- char *zIndex = pFrom->zIndex;
+ char *zIndexedBy = pFrom->u1.zIndexedBy;
Index *pIdx;
for(pIdx=pTab->pIndex;
- pIdx && sqlite3StrICmp(pIdx->zName, zIndex);
+ pIdx && sqlite3StrICmp(pIdx->zName, zIndexedBy);
pIdx=pIdx->pNext
);
if( !pIdx ){
- sqlite3ErrorMsg(pParse, "no such index: %s", zIndex, 0);
+ sqlite3ErrorMsg(pParse, "no such index: %s", zIndexedBy, 0);
pParse->checkSchema = 1;
return SQLITE_ERROR;
}
- pFrom->pIndex = pIdx;
+ pFrom->pIBIndex = pIdx;
}
return SQLITE_OK;
}
@@ -110449,12 +112683,12 @@ static int withExpand(
int bMayRecursive; /* True if compound joined by UNION [ALL] */
With *pSavedWith; /* Initial value of pParse->pWith */
- /* If pCte->zErr is non-NULL at this point, then this is an illegal
+ /* If pCte->zCteErr is non-NULL at this point, then this is an illegal
** recursive reference to CTE pCte. Leave an error in pParse and return
- ** early. If pCte->zErr is NULL, then this is not a recursive reference.
+ ** early. If pCte->zCteErr is NULL, then this is not a recursive reference.
** In this case, proceed. */
- if( pCte->zErr ){
- sqlite3ErrorMsg(pParse, pCte->zErr, pCte->zName);
+ if( pCte->zCteErr ){
+ sqlite3ErrorMsg(pParse, pCte->zCteErr, pCte->zName);
return SQLITE_ERROR;
}
@@ -110465,7 +112699,7 @@ static int withExpand(
pTab->zName = sqlite3DbStrDup(db, pCte->zName);
pTab->iPKey = -1;
pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );
- pTab->tabFlags |= TF_Ephemeral;
+ pTab->tabFlags |= TF_Ephemeral | TF_NoVisibleRowid;
pFrom->pSelect = sqlite3SelectDup(db, pCte->pSelect, 0);
if( db->mallocFailed ) return SQLITE_NOMEM;
assert( pFrom->pSelect );
@@ -110483,7 +112717,7 @@ static int withExpand(
&& 0==sqlite3StrICmp(pItem->zName, pCte->zName)
){
pItem->pTab = pTab;
- pItem->isRecursive = 1;
+ pItem->fg.isRecursive = 1;
pTab->nRef++;
pSel->selFlags |= SF_Recursive;
}
@@ -110499,7 +112733,7 @@ static int withExpand(
}
assert( pTab->nRef==1 || ((pSel->selFlags&SF_Recursive) && pTab->nRef==2 ));
- pCte->zErr = "circular reference: %s";
+ pCte->zCteErr = "circular reference: %s";
pSavedWith = pParse->pWith;
pParse->pWith = pWith;
sqlite3WalkSelect(pWalker, bMayRecursive ? pSel->pPrior : pSel);
@@ -110517,16 +112751,16 @@ static int withExpand(
pEList = pCte->pCols;
}
- selectColumnsFromExprList(pParse, pEList, &pTab->nCol, &pTab->aCol);
+ sqlite3ColumnsFromExprList(pParse, pEList, &pTab->nCol, &pTab->aCol);
if( bMayRecursive ){
if( pSel->selFlags & SF_Recursive ){
- pCte->zErr = "multiple recursive references: %s";
+ pCte->zCteErr = "multiple recursive references: %s";
}else{
- pCte->zErr = "recursive reference in a subquery: %s";
+ pCte->zCteErr = "recursive reference in a subquery: %s";
}
sqlite3WalkSelect(pWalker, pSel);
}
- pCte->zErr = 0;
+ pCte->zCteErr = 0;
pParse->pWith = pSavedWith;
}
@@ -110613,17 +112847,9 @@ static int selectExpander(Walker *pWalker, Select *p){
*/
for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
Table *pTab;
- assert( pFrom->isRecursive==0 || pFrom->pTab );
- if( pFrom->isRecursive ) continue;
- if( pFrom->pTab!=0 ){
- /* This statement has already been prepared. There is no need
- ** to go further. */
- assert( i==0 );
-#ifndef SQLITE_OMIT_CTE
- selectPopWith(pWalker, p);
-#endif
- return WRC_Prune;
- }
+ assert( pFrom->fg.isRecursive==0 || pFrom->pTab!=0 );
+ if( pFrom->fg.isRecursive ) continue;
+ assert( pFrom->pTab==0 );
#ifndef SQLITE_OMIT_CTE
if( withExpand(pWalker, pFrom) ) return WRC_Abort;
if( pFrom->pTab ) {} else
@@ -110640,7 +112866,7 @@ static int selectExpander(Walker *pWalker, Select *p){
pTab->nRef = 1;
pTab->zName = sqlite3MPrintf(db, "sqlite_sq_%p", (void*)pTab);
while( pSel->pPrior ){ pSel = pSel->pPrior; }
- selectColumnsFromExprList(pParse, pSel->pEList, &pTab->nCol, &pTab->aCol);
+ sqlite3ColumnsFromExprList(pParse, pSel->pEList,&pTab->nCol,&pTab->aCol);
pTab->iPKey = -1;
pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );
pTab->tabFlags |= TF_Ephemeral;
@@ -110659,12 +112885,19 @@ static int selectExpander(Walker *pWalker, Select *p){
pTab->nRef++;
#if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
if( pTab->pSelect || IsVirtual(pTab) ){
- /* We reach here if the named table is a really a view */
+ i16 nCol;
if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
assert( pFrom->pSelect==0 );
+ if( pFrom->fg.isTabFunc && !IsVirtual(pTab) ){
+ sqlite3ErrorMsg(pParse, "'%s' is not a function", pTab->zName);
+ return WRC_Abort;
+ }
pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
sqlite3SelectSetName(pFrom->pSelect, pTab->zName);
+ nCol = pTab->nCol;
+ pTab->nCol = -1;
sqlite3WalkSelect(pWalker, pFrom->pSelect);
+ pTab->nCol = nCol;
}
#endif
}
@@ -110710,13 +112943,6 @@ static int selectExpander(Walker *pWalker, Select *p){
int longNames = (flags & SQLITE_FullColNames)!=0
&& (flags & SQLITE_ShortColNames)==0;
- /* When processing FROM-clause subqueries, it is always the case
- ** that full_column_names=OFF and short_column_names=ON. The
- ** sqlite3ResultSetOfSelect() routine makes it so. */
- assert( (p->selFlags & SF_NestedFrom)==0
- || ((flags & SQLITE_FullColNames)==0 &&
- (flags & SQLITE_ShortColNames)!=0) );
-
for(k=0; k<pEList->nExpr; k++){
pE = a[k].pExpr;
pRight = pE->pRight;
@@ -110784,7 +113010,7 @@ static int selectExpander(Walker *pWalker, Select *p){
tableSeen = 1;
if( i>0 && zTName==0 ){
- if( (pFrom->jointype & JT_NATURAL)!=0
+ if( (pFrom->fg.jointype & JT_NATURAL)!=0
&& tableAndColumnIndex(pTabList, i, zName, 0, 0)
){
/* In a NATURAL join, omit the join columns from the
@@ -110919,19 +113145,19 @@ static void selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){
struct SrcList_item *pFrom;
assert( p->selFlags & SF_Resolved );
- if( (p->selFlags & SF_HasTypeInfo)==0 ){
- p->selFlags |= SF_HasTypeInfo;
- pParse = pWalker->pParse;
- pTabList = p->pSrc;
- for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
- Table *pTab = pFrom->pTab;
- if( ALWAYS(pTab!=0) && (pTab->tabFlags & TF_Ephemeral)!=0 ){
- /* A sub-query in the FROM clause of a SELECT */
- Select *pSel = pFrom->pSelect;
- if( pSel ){
- while( pSel->pPrior ) pSel = pSel->pPrior;
- selectAddColumnTypeAndCollation(pParse, pTab, pSel);
- }
+ assert( (p->selFlags & SF_HasTypeInfo)==0 );
+ p->selFlags |= SF_HasTypeInfo;
+ pParse = pWalker->pParse;
+ pTabList = p->pSrc;
+ for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
+ Table *pTab = pFrom->pTab;
+ assert( pTab!=0 );
+ if( (pTab->tabFlags & TF_Ephemeral)!=0 ){
+ /* A sub-query in the FROM clause of a SELECT */
+ Select *pSel = pFrom->pSelect;
+ if( pSel ){
+ while( pSel->pPrior ) pSel = pSel->pPrior;
+ selectAddColumnTypeAndCollation(pParse, pTab, pSel);
}
}
}
@@ -111070,7 +113296,7 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
if( pList ){
nArg = pList->nExpr;
regAgg = sqlite3GetTempRange(pParse, nArg);
- sqlite3ExprCodeExprList(pParse, pList, regAgg, SQLITE_ECEL_DUP);
+ sqlite3ExprCodeExprList(pParse, pList, regAgg, 0, SQLITE_ECEL_DUP);
}else{
nArg = 0;
regAgg = 0;
@@ -111095,7 +113321,7 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
if( regHit==0 && pAggInfo->nAccumulator ) regHit = ++pParse->nMem;
sqlite3VdbeAddOp4(v, OP_CollSeq, regHit, 0, 0, (char *)pColl, P4_COLLSEQ);
}
- sqlite3VdbeAddOp4(v, OP_AggStep, 0, regAgg, pF->iMem,
+ sqlite3VdbeAddOp4(v, OP_AggStep0, 0, regAgg, pF->iMem,
(void*)pF->pFunc, P4_FUNCDEF);
sqlite3VdbeChangeP5(v, (u8)nArg);
sqlite3ExprCacheAffinityChange(pParse, regAgg, nArg);
@@ -111178,7 +113404,7 @@ SQLITE_PRIVATE int sqlite3Select(
WhereInfo *pWInfo; /* Return from sqlite3WhereBegin() */
Vdbe *v; /* The virtual machine under construction */
int isAgg; /* True for select lists like "count(*)" */
- ExprList *pEList; /* List of columns to extract. */
+ ExprList *pEList = 0; /* List of columns to extract. */
SrcList *pTabList; /* List of tables to select from */
Expr *pWhere; /* The WHERE clause. May be NULL */
ExprList *pGroupBy; /* The GROUP BY clause. May be NULL */
@@ -111228,12 +113454,11 @@ SQLITE_PRIVATE int sqlite3Select(
memset(&sSort, 0, sizeof(sSort));
sSort.pOrderBy = p->pOrderBy;
pTabList = p->pSrc;
- pEList = p->pEList;
if( pParse->nErr || db->mallocFailed ){
goto select_end;
}
+ assert( p->pEList!=0 );
isAgg = (p->selFlags & SF_Aggregate)!=0;
- assert( pEList!=0 );
#if SELECTTRACE_ENABLED
if( sqlite3SelectTrace & 0x100 ){
SELECTTRACE(0x100,pParse,p, ("after name resolution:\n"));
@@ -111242,29 +113467,77 @@ SQLITE_PRIVATE int sqlite3Select(
#endif
- /* Begin generating code.
- */
- v = sqlite3GetVdbe(pParse);
- if( v==0 ) goto select_end;
-
/* If writing to memory or generating a set
** only a single column may be output.
*/
#ifndef SQLITE_OMIT_SUBQUERY
- if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){
+ if( checkForMultiColumnSelectError(pParse, pDest, p->pEList->nExpr) ){
goto select_end;
}
#endif
- /* Generate code for all sub-queries in the FROM clause
+ /* Try to flatten subqueries in the FROM clause up into the main query
*/
#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
for(i=0; !p->pPrior && i<pTabList->nSrc; i++){
struct SrcList_item *pItem = &pTabList->a[i];
- SelectDest dest;
Select *pSub = pItem->pSelect;
int isAggSub;
+ Table *pTab = pItem->pTab;
+ if( pSub==0 ) continue;
+
+ /* Catch mismatch in the declared columns of a view and the number of
+ ** columns in the SELECT on the RHS */
+ if( pTab->nCol!=pSub->pEList->nExpr ){
+ sqlite3ErrorMsg(pParse, "expected %d columns for '%s' but got %d",
+ pTab->nCol, pTab->zName, pSub->pEList->nExpr);
+ goto select_end;
+ }
+
+ isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
+ if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
+ /* This subquery can be absorbed into its parent. */
+ if( isAggSub ){
+ isAgg = 1;
+ p->selFlags |= SF_Aggregate;
+ }
+ i = -1;
+ }
+ pTabList = p->pSrc;
+ if( db->mallocFailed ) goto select_end;
+ if( !IgnorableOrderby(pDest) ){
+ sSort.pOrderBy = p->pOrderBy;
+ }
+ }
+#endif
+ /* Get a pointer the VDBE under construction, allocating a new VDBE if one
+ ** does not already exist */
+ v = sqlite3GetVdbe(pParse);
+ if( v==0 ) goto select_end;
+
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+ /* Handle compound SELECT statements using the separate multiSelect()
+ ** procedure.
+ */
+ if( p->pPrior ){
+ rc = multiSelect(pParse, p, pDest);
+ explainSetInteger(pParse->iSelectId, iRestoreSelectId);
+#if SELECTTRACE_ENABLED
+ SELECTTRACE(1,pParse,p,("end compound-select processing\n"));
+ pParse->nSelectIndent--;
+#endif
+ return rc;
+ }
+#endif
+
+ /* Generate code for all sub-queries in the FROM clause
+ */
+#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
+ for(i=0; i<pTabList->nSrc; i++){
+ struct SrcList_item *pItem = &pTabList->a[i];
+ SelectDest dest;
+ Select *pSub = pItem->pSelect;
if( pSub==0 ) continue;
/* Sometimes the code for a subquery will be generated more than
@@ -111274,7 +113547,7 @@ SQLITE_PRIVATE int sqlite3Select(
** is sufficient, though the subroutine to manifest the view does need
** to be invoked again. */
if( pItem->addrFillSub ){
- if( pItem->viaCoroutine==0 ){
+ if( pItem->fg.viaCoroutine==0 ){
sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub);
}
continue;
@@ -111289,16 +113562,25 @@ SQLITE_PRIVATE int sqlite3Select(
*/
pParse->nHeight += sqlite3SelectExprHeight(p);
- isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
- if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
- /* This subquery can be absorbed into its parent. */
- if( isAggSub ){
- isAgg = 1;
- p->selFlags |= SF_Aggregate;
+ /* Make copies of constant WHERE-clause terms in the outer query down
+ ** inside the subquery. This can help the subquery to run more efficiently.
+ */
+ if( (pItem->fg.jointype & JT_OUTER)==0
+ && pushDownWhereTerms(db, pSub, p->pWhere, pItem->iCursor)
+ ){
+#if SELECTTRACE_ENABLED
+ if( sqlite3SelectTrace & 0x100 ){
+ SELECTTRACE(0x100,pParse,p,("After WHERE-clause push-down:\n"));
+ sqlite3TreeViewSelect(0, p, 0);
}
- i = -1;
- }else if( pTabList->nSrc==1
- && OptimizationEnabled(db, SQLITE_SubqCoroutine)
+#endif
+ }
+
+ /* Generate code to implement the subquery
+ */
+ if( pTabList->nSrc==1
+ && (p->selFlags & SF_All)==0
+ && OptimizationEnabled(db, SQLITE_SubqCoroutine)
){
/* Implement a co-routine that will return a single row of the result
** set on each invocation.
@@ -111312,7 +113594,7 @@ SQLITE_PRIVATE int sqlite3Select(
explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
sqlite3Select(pParse, pSub, &dest);
pItem->pTab->nRowLogEst = sqlite3LogEst(pSub->nSelectRow);
- pItem->viaCoroutine = 1;
+ pItem->fg.viaCoroutine = 1;
pItem->regResult = dest.iSdst;
sqlite3VdbeAddOp1(v, OP_EndCoroutine, pItem->regReturn);
sqlite3VdbeJumpHere(v, addrTop-1);
@@ -111330,7 +113612,7 @@ SQLITE_PRIVATE int sqlite3Select(
pItem->regReturn = ++pParse->nMem;
topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn);
pItem->addrFillSub = topAddr+1;
- if( pItem->isCorrelated==0 ){
+ if( pItem->fg.isCorrelated==0 ){
/* If the subquery is not correlated and if we are not inside of
** a trigger, then we only need to compute the value of the subquery
** once. */
@@ -111349,33 +113631,23 @@ SQLITE_PRIVATE int sqlite3Select(
sqlite3VdbeChangeP1(v, topAddr, retAddr);
sqlite3ClearTempRegCache(pParse);
}
- if( /*pParse->nErr ||*/ db->mallocFailed ){
- goto select_end;
- }
+ if( db->mallocFailed ) goto select_end;
pParse->nHeight -= sqlite3SelectExprHeight(p);
- pTabList = p->pSrc;
- if( !IgnorableOrderby(pDest) ){
- sSort.pOrderBy = p->pOrderBy;
- }
}
- pEList = p->pEList;
#endif
+
+ /* Various elements of the SELECT copied into local variables for
+ ** convenience */
+ pEList = p->pEList;
pWhere = p->pWhere;
pGroupBy = p->pGroupBy;
pHaving = p->pHaving;
sDistinct.isTnct = (p->selFlags & SF_Distinct)!=0;
-#ifndef SQLITE_OMIT_COMPOUND_SELECT
- /* If there is are a sequence of queries, do the earlier ones first.
- */
- if( p->pPrior ){
- rc = multiSelect(pParse, p, pDest);
- explainSetInteger(pParse->iSelectId, iRestoreSelectId);
#if SELECTTRACE_ENABLED
- SELECTTRACE(1,pParse,p,("end compound-select processing\n"));
- pParse->nSelectIndent--;
-#endif
- return rc;
+ if( sqlite3SelectTrace & 0x400 ){
+ SELECTTRACE(0x400,pParse,p,("After all FROM-clause analysis:\n"));
+ sqlite3TreeViewSelect(0, p, 0);
}
#endif
@@ -111395,23 +113667,23 @@ SQLITE_PRIVATE int sqlite3Select(
** BY and DISTINCT, and an index or separate temp-table for the other.
*/
if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct
- && sqlite3ExprListCompare(sSort.pOrderBy, p->pEList, -1)==0
+ && sqlite3ExprListCompare(sSort.pOrderBy, pEList, -1)==0
){
p->selFlags &= ~SF_Distinct;
- p->pGroupBy = sqlite3ExprListDup(db, p->pEList, 0);
- pGroupBy = p->pGroupBy;
+ pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0);
/* Notice that even thought SF_Distinct has been cleared from p->selFlags,
** the sDistinct.isTnct is still set. Hence, isTnct represents the
** original setting of the SF_Distinct flag, not the current setting */
assert( sDistinct.isTnct );
}
- /* If there is an ORDER BY clause, then this sorting
- ** index might end up being unused if the data can be
- ** extracted in pre-sorted order. If that is the case, then the
- ** OP_OpenEphemeral instruction will be changed to an OP_Noop once
- ** we figure out that the sorting index is not needed. The addrSortIndex
- ** variable is used to facilitate that change.
+ /* If there is an ORDER BY clause, then create an ephemeral index to
+ ** do the sorting. But this sorting ephemeral index might end up
+ ** being unused if the data can be extracted in pre-sorted order.
+ ** If that is the case, then the OP_OpenEphemeral instruction will be
+ ** changed to an OP_Noop once we figure out that the sorting index is
+ ** not needed. The sSort.addrSortIndex variable is used to facilitate
+ ** that change.
*/
if( sSort.pOrderBy ){
KeyInfo *pKeyInfo;
@@ -111438,18 +113710,18 @@ SQLITE_PRIVATE int sqlite3Select(
p->nSelectRow = LARGEST_INT64;
computeLimitRegisters(pParse, p, iEnd);
if( p->iLimit==0 && sSort.addrSortIndex>=0 ){
- sqlite3VdbeGetOp(v, sSort.addrSortIndex)->opcode = OP_SorterOpen;
+ sqlite3VdbeChangeOpcode(v, sSort.addrSortIndex, OP_SorterOpen);
sSort.sortFlags |= SORTFLAG_UseSorter;
}
- /* Open a virtual index to use for the distinct set.
+ /* Open an ephemeral index to use for the distinct set.
*/
if( p->selFlags & SF_Distinct ){
sDistinct.tabTnct = pParse->nTab++;
sDistinct.addrTnct = sqlite3VdbeAddOp4(v, OP_OpenEphemeral,
- sDistinct.tabTnct, 0, 0,
- (char*)keyInfoFromExprList(pParse, p->pEList,0,0),
- P4_KEYINFO);
+ sDistinct.tabTnct, 0, 0,
+ (char*)keyInfoFromExprList(pParse, p->pEList,0,0),
+ P4_KEYINFO);
sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
sDistinct.eTnctType = WHERE_DISTINCT_UNORDERED;
}else{
@@ -111527,11 +113799,10 @@ SQLITE_PRIVATE int sqlite3Select(
p->nSelectRow = 1;
}
-
/* If there is both a GROUP BY and an ORDER BY clause and they are
** identical, then it may be possible to disable the ORDER BY clause
** on the grounds that the GROUP BY will cause elements to come out
- ** in the correct order. It also may not - the GROUP BY may use a
+ ** in the correct order. It also may not - the GROUP BY might use a
** database index that causes rows to be grouped together as required
** but not actually sorted. Either way, record the fact that the
** ORDER BY and GROUP BY clauses are the same by setting the orderByGrp
@@ -111574,7 +113845,7 @@ SQLITE_PRIVATE int sqlite3Select(
*/
if( pGroupBy ){
KeyInfo *pKeyInfo; /* Keying information for the group by clause */
- int j1; /* A-vs-B comparision jump */
+ int addr1; /* A-vs-B comparision jump */
int addrOutputRow; /* Start of subroutine that outputs a result row */
int regOutputRow; /* Return address register for output subroutine */
int addrSetAbort; /* Set the abort flag and return */
@@ -111655,7 +113926,7 @@ SQLITE_PRIVATE int sqlite3Select(
}
regBase = sqlite3GetTempRange(pParse, nCol);
sqlite3ExprCacheClear(pParse);
- sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0);
+ sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0, 0);
j = nGroupBy;
for(i=0; i<sAggInfo.nColumn; i++){
struct AggInfo_col *pCol = &sAggInfo.aCol[i];
@@ -111709,7 +113980,8 @@ SQLITE_PRIVATE int sqlite3Select(
addrTopOfLoop = sqlite3VdbeCurrentAddr(v);
sqlite3ExprCacheClear(pParse);
if( groupBySort ){
- sqlite3VdbeAddOp3(v, OP_SorterData, sAggInfo.sortingIdx, sortOut,sortPTab);
+ sqlite3VdbeAddOp3(v, OP_SorterData, sAggInfo.sortingIdx,
+ sortOut, sortPTab);
}
for(j=0; j<pGroupBy->nExpr; j++){
if( groupBySort ){
@@ -111721,8 +113993,8 @@ SQLITE_PRIVATE int sqlite3Select(
}
sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
(char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
- j1 = sqlite3VdbeCurrentAddr(v);
- sqlite3VdbeAddOp3(v, OP_Jump, j1+1, 0, j1+1); VdbeCoverage(v);
+ addr1 = sqlite3VdbeCurrentAddr(v);
+ sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v);
/* Generate code that runs whenever the GROUP BY changes.
** Changes in the GROUP BY are detected by the previous code
@@ -111744,7 +114016,7 @@ SQLITE_PRIVATE int sqlite3Select(
/* Update the aggregate accumulators based on the content of
** the current row
*/
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
updateAccumulator(pParse, &sAggInfo);
sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
VdbeComment((v, "indicate data in accumulator"));
@@ -111766,7 +114038,7 @@ SQLITE_PRIVATE int sqlite3Select(
/* Jump over the subroutines
*/
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEnd);
+ sqlite3VdbeGoto(v, addrEnd);
/* Generate a subroutine that outputs a single row of the result
** set. This subroutine first looks at the iUseFlag. If iUseFlag
@@ -111781,7 +114053,8 @@ SQLITE_PRIVATE int sqlite3Select(
sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
sqlite3VdbeResolveLabel(v, addrOutputRow);
addrOutputRow = sqlite3VdbeCurrentAddr(v);
- sqlite3VdbeAddOp2(v, OP_IfPos, iUseFlag, addrOutputRow+2); VdbeCoverage(v);
+ sqlite3VdbeAddOp2(v, OP_IfPos, iUseFlag, addrOutputRow+2);
+ VdbeCoverage(v);
VdbeComment((v, "Groupby result generator entry point"));
sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
finalizeAggFunctions(pParse, &sAggInfo);
@@ -111919,7 +114192,7 @@ SQLITE_PRIVATE int sqlite3Select(
updateAccumulator(pParse, &sAggInfo);
assert( pMinMax==0 || pMinMax->nExpr==1 );
if( sqlite3WhereIsOrdered(pWInfo)>0 ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3WhereBreakLabel(pWInfo));
+ sqlite3VdbeGoto(v, sqlite3WhereBreakLabel(pWInfo));
VdbeComment((v, "%s() by index",
(flag==WHERE_ORDERBY_MIN?"min":"max")));
}
@@ -111945,7 +114218,8 @@ SQLITE_PRIVATE int sqlite3Select(
** and send them to the callback one by one.
*/
if( sSort.pOrderBy ){
- explainTempTable(pParse, sSort.nOBSat>0 ? "RIGHT PART OF ORDER BY":"ORDER BY");
+ explainTempTable(pParse,
+ sSort.nOBSat>0 ? "RIGHT PART OF ORDER BY":"ORDER BY");
generateSortTail(pParse, p, &sSort, pEList->nExpr, pDest);
}
@@ -111978,100 +114252,6 @@ select_end:
return rc;
}
-#ifdef SQLITE_DEBUG
-/*
-** Generate a human-readable description of a the Select object.
-*/
-SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 moreToFollow){
- int n = 0;
- pView = sqlite3TreeViewPush(pView, moreToFollow);
- sqlite3TreeViewLine(pView, "SELECT%s%s (0x%p)",
- ((p->selFlags & SF_Distinct) ? " DISTINCT" : ""),
- ((p->selFlags & SF_Aggregate) ? " agg_flag" : ""), p
- );
- if( p->pSrc && p->pSrc->nSrc ) n++;
- if( p->pWhere ) n++;
- if( p->pGroupBy ) n++;
- if( p->pHaving ) n++;
- if( p->pOrderBy ) n++;
- if( p->pLimit ) n++;
- if( p->pOffset ) n++;
- if( p->pPrior ) n++;
- sqlite3TreeViewExprList(pView, p->pEList, (n--)>0, "result-set");
- if( p->pSrc && p->pSrc->nSrc ){
- int i;
- pView = sqlite3TreeViewPush(pView, (n--)>0);
- sqlite3TreeViewLine(pView, "FROM");
- for(i=0; i<p->pSrc->nSrc; i++){
- struct SrcList_item *pItem = &p->pSrc->a[i];
- StrAccum x;
- char zLine[100];
- sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
- sqlite3XPrintf(&x, 0, "{%d,*}", pItem->iCursor);
- if( pItem->zDatabase ){
- sqlite3XPrintf(&x, 0, " %s.%s", pItem->zDatabase, pItem->zName);
- }else if( pItem->zName ){
- sqlite3XPrintf(&x, 0, " %s", pItem->zName);
- }
- if( pItem->pTab ){
- sqlite3XPrintf(&x, 0, " tabname=%Q", pItem->pTab->zName);
- }
- if( pItem->zAlias ){
- sqlite3XPrintf(&x, 0, " (AS %s)", pItem->zAlias);
- }
- if( pItem->jointype & JT_LEFT ){
- sqlite3XPrintf(&x, 0, " LEFT-JOIN");
- }
- sqlite3StrAccumFinish(&x);
- sqlite3TreeViewItem(pView, zLine, i<p->pSrc->nSrc-1);
- if( pItem->pSelect ){
- sqlite3TreeViewSelect(pView, pItem->pSelect, 0);
- }
- sqlite3TreeViewPop(pView);
- }
- sqlite3TreeViewPop(pView);
- }
- if( p->pWhere ){
- sqlite3TreeViewItem(pView, "WHERE", (n--)>0);
- sqlite3TreeViewExpr(pView, p->pWhere, 0);
- sqlite3TreeViewPop(pView);
- }
- if( p->pGroupBy ){
- sqlite3TreeViewExprList(pView, p->pGroupBy, (n--)>0, "GROUPBY");
- }
- if( p->pHaving ){
- sqlite3TreeViewItem(pView, "HAVING", (n--)>0);
- sqlite3TreeViewExpr(pView, p->pHaving, 0);
- sqlite3TreeViewPop(pView);
- }
- if( p->pOrderBy ){
- sqlite3TreeViewExprList(pView, p->pOrderBy, (n--)>0, "ORDERBY");
- }
- if( p->pLimit ){
- sqlite3TreeViewItem(pView, "LIMIT", (n--)>0);
- sqlite3TreeViewExpr(pView, p->pLimit, 0);
- sqlite3TreeViewPop(pView);
- }
- if( p->pOffset ){
- sqlite3TreeViewItem(pView, "OFFSET", (n--)>0);
- sqlite3TreeViewExpr(pView, p->pOffset, 0);
- sqlite3TreeViewPop(pView);
- }
- if( p->pPrior ){
- const char *zOp = "UNION";
- switch( p->op ){
- case TK_ALL: zOp = "UNION ALL"; break;
- case TK_INTERSECT: zOp = "INTERSECT"; break;
- case TK_EXCEPT: zOp = "EXCEPT"; break;
- }
- sqlite3TreeViewItem(pView, zOp, (n--)>0);
- sqlite3TreeViewSelect(pView, p->pPrior, 0);
- sqlite3TreeViewPop(pView);
- }
- sqlite3TreeViewPop(pView);
-}
-#endif /* SQLITE_DEBUG */
-
/************** End of select.c **********************************************/
/************** Begin file table.c *******************************************/
/*
@@ -112092,6 +114272,7 @@ SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 m
** These routines are in a separate files so that they will not be linked
** if they are not used.
*/
+/* #include "sqliteInt.h" */
/* #include <stdlib.h> */
/* #include <string.h> */
@@ -112288,6 +114469,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_free_table(
*************************************************************************
** This file contains the implementation for TRIGGERs
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_TRIGGER
/*
@@ -113411,6 +115593,7 @@ SQLITE_PRIVATE u32 sqlite3TriggerColmask(
** This file contains C code routines that are called by the parser
** to handle UPDATE statements.
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_VIRTUALTABLE
/* Forward declaration */
@@ -113532,9 +115715,9 @@ SQLITE_PRIVATE void sqlite3Update(
/* Register Allocations */
int regRowCount = 0; /* A count of rows changed */
- int regOldRowid; /* The old rowid */
- int regNewRowid; /* The new rowid */
- int regNew; /* Content of the NEW.* table in triggers */
+ int regOldRowid = 0; /* The old rowid */
+ int regNewRowid = 0; /* The new rowid */
+ int regNew = 0; /* Content of the NEW.* table in triggers */
int regOld = 0; /* Content of OLD.* table in triggers */
int regRowSet = 0; /* Rowset of rows to be updated */
int regKey = 0; /* composite PRIMARY KEY value */
@@ -113670,7 +115853,9 @@ SQLITE_PRIVATE void sqlite3Update(
/* There is one entry in the aRegIdx[] array for each index on the table
** being updated. Fill in aRegIdx[] with a register number that will hold
- ** the key for accessing each index.
+ ** the key for accessing each index.
+ **
+ ** FIXME: Be smarter about omitting indexes that use expressions.
*/
for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
int reg;
@@ -113679,7 +115864,8 @@ SQLITE_PRIVATE void sqlite3Update(
}else{
reg = 0;
for(i=0; i<pIdx->nKeyCol; i++){
- if( aXRef[pIdx->aiColumn[i]]>=0 ){
+ i16 iIdxCol = pIdx->aiColumn[i];
+ if( iIdxCol<0 || aXRef[iIdxCol]>=0 ){
reg = ++pParse->nMem;
break;
}
@@ -113695,29 +115881,20 @@ SQLITE_PRIVATE void sqlite3Update(
if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
sqlite3BeginWriteOperation(pParse, 1, iDb);
-#ifndef SQLITE_OMIT_VIRTUALTABLE
- /* Virtual tables must be handled separately */
- if( IsVirtual(pTab) ){
- updateVirtualTable(pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef,
- pWhere, onError);
- pWhere = 0;
- pTabList = 0;
- goto update_cleanup;
- }
-#endif
-
/* Allocate required registers. */
- regRowSet = ++pParse->nMem;
- regOldRowid = regNewRowid = ++pParse->nMem;
- if( chngPk || pTrigger || hasFK ){
- regOld = pParse->nMem + 1;
+ if( !IsVirtual(pTab) ){
+ regRowSet = ++pParse->nMem;
+ regOldRowid = regNewRowid = ++pParse->nMem;
+ if( chngPk || pTrigger || hasFK ){
+ regOld = pParse->nMem + 1;
+ pParse->nMem += pTab->nCol;
+ }
+ if( chngKey || pTrigger || hasFK ){
+ regNewRowid = ++pParse->nMem;
+ }
+ regNew = pParse->nMem + 1;
pParse->nMem += pTab->nCol;
}
- if( chngKey || pTrigger || hasFK ){
- regNewRowid = ++pParse->nMem;
- }
- regNew = pParse->nMem + 1;
- pParse->nMem += pTab->nCol;
/* Start the view context. */
if( isView ){
@@ -113740,6 +115917,15 @@ SQLITE_PRIVATE void sqlite3Update(
goto update_cleanup;
}
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ /* Virtual tables must be handled separately */
+ if( IsVirtual(pTab) ){
+ updateVirtualTable(pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef,
+ pWhere, onError);
+ goto update_cleanup;
+ }
+#endif
+
/* Begin the database scan
*/
if( HasRowid(pTab) ){
@@ -113779,6 +115965,7 @@ SQLITE_PRIVATE void sqlite3Update(
if( pWInfo==0 ) goto update_cleanup;
okOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);
for(i=0; i<nPk; i++){
+ assert( pPk->aiColumn[i]>=0 );
sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, pPk->aiColumn[i],
iPk+i);
}
@@ -113788,7 +115975,7 @@ SQLITE_PRIVATE void sqlite3Update(
regKey = iPk;
}else{
sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, regKey,
- sqlite3IndexAffinityStr(v, pPk), nPk);
+ sqlite3IndexAffinityStr(db, pPk), nPk);
sqlite3VdbeAddOp2(v, OP_IdxInsert, iEph, regKey);
}
sqlite3WhereEnd(pWInfo);
@@ -113901,7 +116088,6 @@ SQLITE_PRIVATE void sqlite3Update(
newmask = sqlite3TriggerColmask(
pParse, pTrigger, pChanges, 1, TRIGGER_BEFORE, pTab, onError
);
- /*sqlite3VdbeAddOp3(v, OP_Null, 0, regNew, regNew+pTab->nCol-1);*/
for(i=0; i<pTab->nCol; i++){
if( i==pTab->iPKey ){
sqlite3VdbeAddOp2(v, OP_Null, 0, regNew+i);
@@ -113959,7 +116145,7 @@ SQLITE_PRIVATE void sqlite3Update(
}
if( !isView ){
- int j1 = 0; /* Address of jump instruction */
+ int addr1 = 0; /* Address of jump instruction */
int bReplace = 0; /* True if REPLACE conflict resolution might happen */
/* Do constraint checks. */
@@ -113975,20 +116161,20 @@ SQLITE_PRIVATE void sqlite3Update(
/* Delete the index entries associated with the current record. */
if( bReplace || chngKey ){
if( pPk ){
- j1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
+ addr1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
}else{
- j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
+ addr1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
}
VdbeCoverageNeverTaken(v);
}
- sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx);
+ sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx, -1);
/* If changing the record number, delete the old record. */
if( hasFK || chngKey || pPk!=0 ){
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);
}
if( bReplace || chngKey ){
- sqlite3VdbeJumpHere(v, j1);
+ sqlite3VdbeJumpHere(v, addr1);
}
if( hasFK ){
@@ -114025,7 +116211,7 @@ SQLITE_PRIVATE void sqlite3Update(
sqlite3VdbeResolveLabel(v, labelContinue);
sqlite3VdbeAddOp2(v, OP_Next, iEph, addrTop); VdbeCoverage(v);
}else{
- sqlite3VdbeAddOp2(v, OP_Goto, 0, labelContinue);
+ sqlite3VdbeGoto(v, labelContinue);
}
sqlite3VdbeResolveLabel(v, labelBreak);
@@ -114079,21 +116265,23 @@ update_cleanup:
/*
** Generate code for an UPDATE of a virtual table.
**
-** The strategy is that we create an ephemeral table that contains
+** There are two possible strategies - the default and the special
+** "onepass" strategy. Onepass is only used if the virtual table
+** implementation indicates that pWhere may match at most one row.
+**
+** The default strategy is to create an ephemeral table that contains
** for each row to be changed:
**
** (A) The original rowid of that row.
-** (B) The revised rowid for the row. (note1)
+** (B) The revised rowid for the row.
** (C) The content of every column in the row.
**
-** Then we loop over this ephemeral table and for each row in
-** the ephemeral table call VUpdate.
-**
-** When finished, drop the ephemeral table.
+** Then loop through the contents of this ephemeral table executing a
+** VUpdate for each row. When finished, drop the ephemeral table.
**
-** (note1) Actually, if we know in advance that (A) is always the same
-** as (B) we only store (A), then duplicate (A) when pulling
-** it out of the ephemeral table before calling VUpdate.
+** The "onepass" strategy does not use an ephemeral table. Instead, it
+** stores the same values (A, B and C above) in a register array and
+** makes a single invocation of VUpdate.
*/
static void updateVirtualTable(
Parse *pParse, /* The parsing context */
@@ -114106,68 +116294,96 @@ static void updateVirtualTable(
int onError /* ON CONFLICT strategy */
){
Vdbe *v = pParse->pVdbe; /* Virtual machine under construction */
- ExprList *pEList = 0; /* The result set of the SELECT statement */
- Select *pSelect = 0; /* The SELECT statement */
- Expr *pExpr; /* Temporary expression */
int ephemTab; /* Table holding the result of the SELECT */
int i; /* Loop counter */
- int addr; /* Address of top of loop */
- int iReg; /* First register in set passed to OP_VUpdate */
sqlite3 *db = pParse->db; /* Database connection */
const char *pVTab = (const char*)sqlite3GetVTable(db, pTab);
- SelectDest dest;
-
- /* Construct the SELECT statement that will find the new values for
- ** all updated rows.
- */
- pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ID, "_rowid_"));
+ WhereInfo *pWInfo;
+ int nArg = 2 + pTab->nCol; /* Number of arguments to VUpdate */
+ int regArg; /* First register in VUpdate arg array */
+ int regRec; /* Register in which to assemble record */
+ int regRowid; /* Register for ephem table rowid */
+ int iCsr = pSrc->a[0].iCursor; /* Cursor used for virtual table scan */
+ int aDummy[2]; /* Unused arg for sqlite3WhereOkOnePass() */
+ int bOnePass; /* True to use onepass strategy */
+ int addr; /* Address of OP_OpenEphemeral */
+
+ /* Allocate nArg registers to martial the arguments to VUpdate. Then
+ ** create and open the ephemeral table in which the records created from
+ ** these arguments will be temporarily stored. */
+ assert( v );
+ ephemTab = pParse->nTab++;
+ addr= sqlite3VdbeAddOp2(v, OP_OpenEphemeral, ephemTab, nArg);
+ regArg = pParse->nMem + 1;
+ pParse->nMem += nArg;
+ regRec = ++pParse->nMem;
+ regRowid = ++pParse->nMem;
+
+ /* Start scanning the virtual table */
+ pWInfo = sqlite3WhereBegin(pParse, pSrc, pWhere, 0,0,WHERE_ONEPASS_DESIRED,0);
+ if( pWInfo==0 ) return;
+
+ /* Populate the argument registers. */
+ sqlite3VdbeAddOp2(v, OP_Rowid, iCsr, regArg);
if( pRowid ){
- pEList = sqlite3ExprListAppend(pParse, pEList,
- sqlite3ExprDup(db, pRowid, 0));
+ sqlite3ExprCode(pParse, pRowid, regArg+1);
+ }else{
+ sqlite3VdbeAddOp2(v, OP_Rowid, iCsr, regArg+1);
}
- assert( pTab->iPKey<0 );
for(i=0; i<pTab->nCol; i++){
if( aXRef[i]>=0 ){
- pExpr = sqlite3ExprDup(db, pChanges->a[aXRef[i]].pExpr, 0);
+ sqlite3ExprCode(pParse, pChanges->a[aXRef[i]].pExpr, regArg+2+i);
}else{
- pExpr = sqlite3Expr(db, TK_ID, pTab->aCol[i].zName);
+ sqlite3VdbeAddOp3(v, OP_VColumn, iCsr, i, regArg+2+i);
}
- pEList = sqlite3ExprListAppend(pParse, pEList, pExpr);
}
- pSelect = sqlite3SelectNew(pParse, pEList, pSrc, pWhere, 0, 0, 0, 0, 0, 0);
-
- /* Create the ephemeral table into which the update results will
- ** be stored.
- */
- assert( v );
- ephemTab = pParse->nTab++;
- sqlite3VdbeAddOp2(v, OP_OpenEphemeral, ephemTab, pTab->nCol+1+(pRowid!=0));
- sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
- /* fill the ephemeral table
- */
- sqlite3SelectDestInit(&dest, SRT_Table, ephemTab);
- sqlite3Select(pParse, pSelect, &dest);
+ bOnePass = sqlite3WhereOkOnePass(pWInfo, aDummy);
- /* Generate code to scan the ephemeral table and call VUpdate. */
- iReg = ++pParse->nMem;
- pParse->nMem += pTab->nCol+1;
- addr = sqlite3VdbeAddOp2(v, OP_Rewind, ephemTab, 0); VdbeCoverage(v);
- sqlite3VdbeAddOp3(v, OP_Column, ephemTab, 0, iReg);
- sqlite3VdbeAddOp3(v, OP_Column, ephemTab, (pRowid?1:0), iReg+1);
- for(i=0; i<pTab->nCol; i++){
- sqlite3VdbeAddOp3(v, OP_Column, ephemTab, i+1+(pRowid!=0), iReg+2+i);
+ if( bOnePass ){
+ /* If using the onepass strategy, no-op out the OP_OpenEphemeral coded
+ ** above. Also, if this is a top-level parse (not a trigger), clear the
+ ** multi-write flag so that the VM does not open a statement journal */
+ sqlite3VdbeChangeToNoop(v, addr);
+ if( sqlite3IsToplevel(pParse) ){
+ pParse->isMultiWrite = 0;
+ }
+ }else{
+ /* Create a record from the argument register contents and insert it into
+ ** the ephemeral table. */
+ sqlite3VdbeAddOp3(v, OP_MakeRecord, regArg, nArg, regRec);
+ sqlite3VdbeAddOp2(v, OP_NewRowid, ephemTab, regRowid);
+ sqlite3VdbeAddOp3(v, OP_Insert, ephemTab, regRec, regRowid);
+ }
+
+
+ if( bOnePass==0 ){
+ /* End the virtual table scan */
+ sqlite3WhereEnd(pWInfo);
+
+ /* Begin scannning through the ephemeral table. */
+ addr = sqlite3VdbeAddOp1(v, OP_Rewind, ephemTab); VdbeCoverage(v);
+
+ /* Extract arguments from the current row of the ephemeral table and
+ ** invoke the VUpdate method. */
+ for(i=0; i<nArg; i++){
+ sqlite3VdbeAddOp3(v, OP_Column, ephemTab, i, regArg+i);
+ }
}
sqlite3VtabMakeWritable(pParse, pTab);
- sqlite3VdbeAddOp4(v, OP_VUpdate, 0, pTab->nCol+2, iReg, pVTab, P4_VTAB);
+ sqlite3VdbeAddOp4(v, OP_VUpdate, 0, nArg, regArg, pVTab, P4_VTAB);
sqlite3VdbeChangeP5(v, onError==OE_Default ? OE_Abort : onError);
sqlite3MayAbort(pParse);
- sqlite3VdbeAddOp2(v, OP_Next, ephemTab, addr+1); VdbeCoverage(v);
- sqlite3VdbeJumpHere(v, addr);
- sqlite3VdbeAddOp2(v, OP_Close, ephemTab, 0);
- /* Cleanup */
- sqlite3SelectDelete(db, pSelect);
+ /* End of the ephemeral table scan. Or, if using the onepass strategy,
+ ** jump to here if the scan visited zero rows. */
+ if( bOnePass==0 ){
+ sqlite3VdbeAddOp2(v, OP_Next, ephemTab, addr+1); VdbeCoverage(v);
+ sqlite3VdbeJumpHere(v, addr);
+ sqlite3VdbeAddOp2(v, OP_Close, ephemTab, 0);
+ }else{
+ sqlite3WhereEnd(pWInfo);
+ }
}
#endif /* SQLITE_OMIT_VIRTUALTABLE */
@@ -114189,6 +116405,8 @@ static void updateVirtualTable(
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
*/
+/* #include "sqliteInt.h" */
+/* #include "vdbeInt.h" */
#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
/*
@@ -114561,6 +116779,7 @@ end_of_vacuum:
** This file contains code used to help implement virtual tables.
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* #include "sqliteInt.h" */
/*
** Before a virtual table xCreate() or xConnect() method is invoked, the
@@ -114606,6 +116825,7 @@ static int createModule(
pMod->pModule = pModule;
pMod->pAux = pAux;
pMod->xDestroy = xDestroy;
+ pMod->pEpoTab = 0;
pDel = (Module *)sqlite3HashInsert(&db->aModule,zCopy,(void*)pMod);
assert( pDel==0 || pDel==pMod );
if( pDel ){
@@ -114833,23 +117053,17 @@ SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){
** deleted.
*/
static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
- int i = pTable->nModuleArg++;
- int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
+ int nBytes = sizeof(char *)*(2+pTable->nModuleArg);
char **azModuleArg;
azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
if( azModuleArg==0 ){
- int j;
- for(j=0; j<i; j++){
- sqlite3DbFree(db, pTable->azModuleArg[j]);
- }
sqlite3DbFree(db, zArg);
- sqlite3DbFree(db, pTable->azModuleArg);
- pTable->nModuleArg = 0;
}else{
+ int i = pTable->nModuleArg++;
azModuleArg[i] = zArg;
azModuleArg[i+1] = 0;
+ pTable->azModuleArg = azModuleArg;
}
- pTable->azModuleArg = azModuleArg;
}
/*
@@ -114976,7 +117190,7 @@ SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere);
iReg = ++pParse->nMem;
- sqlite3VdbeAddOp4(v, OP_String8, 0, iReg, 0, pTab->zName, 0);
+ sqlite3VdbeLoadString(v, iReg, pTab->zName);
sqlite3VdbeAddOp2(v, OP_VCreate, iDb, iReg);
}
@@ -115252,7 +117466,7 @@ SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab,
** invoke it now. If the module has not been registered, return an
** error. Otherwise, do nothing.
*/
- if( !pMod ){
+ if( pMod==0 || pMod->pModule->xCreate==0 || pMod->pModule->xDestroy==0 ){
*pzErr = sqlite3MPrintf(db, "no such module: %s", zMod);
rc = SQLITE_ERROR;
}else{
@@ -115354,6 +117568,7 @@ SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab
pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
VTable *p;
+ int (*xDestroy)(sqlite3_vtab *);
for(p=pTab->pVTable; p; p=p->pNext){
assert( p->pVtab );
if( p->pVtab->nRef>0 ){
@@ -115361,7 +117576,9 @@ SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab
}
}
p = vtabDisconnectAll(db, pTab);
- rc = p->pMod->pModule->xDestroy(p->pVtab);
+ xDestroy = p->pMod->pModule->xDestroy;
+ assert( xDestroy!=0 ); /* Checked before the virtual table is created */
+ rc = xDestroy(p->pVtab);
/* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */
if( rc==SQLITE_OK ){
assert( pTab->pVTable==p && p->pNext==0 );
@@ -115385,8 +117602,10 @@ SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab
static void callFinaliser(sqlite3 *db, int offset){
int i;
if( db->aVTrans ){
+ VTable **aVTrans = db->aVTrans;
+ db->aVTrans = 0;
for(i=0; i<db->nVTrans; i++){
- VTable *pVTab = db->aVTrans[i];
+ VTable *pVTab = aVTrans[i];
sqlite3_vtab *p = pVTab->pVtab;
if( p ){
int (*x)(sqlite3_vtab *);
@@ -115396,9 +117615,8 @@ static void callFinaliser(sqlite3 *db, int offset){
pVTab->iSavepoint = 0;
sqlite3VtabUnlock(pVTab);
}
- sqlite3DbFree(db, db->aVTrans);
+ sqlite3DbFree(db, aVTrans);
db->nVTrans = 0;
- db->aVTrans = 0;
}
}
@@ -115486,7 +117704,9 @@ SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
if( rc==SQLITE_OK ){
rc = pModule->xBegin(pVTab->pVtab);
if( rc==SQLITE_OK ){
+ int iSvpt = db->nStatement + db->nSavepoint;
addToVTrans(db, pVTab);
+ if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1);
}
}
}
@@ -115640,6 +117860,67 @@ SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){
}
/*
+** Check to see if virtual tale module pMod can be have an eponymous
+** virtual table instance. If it can, create one if one does not already
+** exist. Return non-zero if the eponymous virtual table instance exists
+** when this routine returns, and return zero if it does not exist.
+**
+** An eponymous virtual table instance is one that is named after its
+** module, and more importantly, does not require a CREATE VIRTUAL TABLE
+** statement in order to come into existance. Eponymous virtual table
+** instances always exist. They cannot be DROP-ed.
+**
+** Any virtual table module for which xConnect and xCreate are the same
+** method can have an eponymous virtual table instance.
+*/
+SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse *pParse, Module *pMod){
+ const sqlite3_module *pModule = pMod->pModule;
+ Table *pTab;
+ char *zErr = 0;
+ int nName;
+ int rc;
+ sqlite3 *db = pParse->db;
+ if( pMod->pEpoTab ) return 1;
+ if( pModule->xCreate!=0 && pModule->xCreate!=pModule->xConnect ) return 0;
+ nName = sqlite3Strlen30(pMod->zName) + 1;
+ pTab = sqlite3DbMallocZero(db, sizeof(Table) + nName);
+ if( pTab==0 ) return 0;
+ pMod->pEpoTab = pTab;
+ pTab->zName = (char*)&pTab[1];
+ memcpy(pTab->zName, pMod->zName, nName);
+ pTab->nRef = 1;
+ pTab->pSchema = db->aDb[0].pSchema;
+ pTab->tabFlags |= TF_Virtual;
+ pTab->nModuleArg = 0;
+ pTab->iPKey = -1;
+ addModuleArgument(db, pTab, sqlite3DbStrDup(db, pTab->zName));
+ addModuleArgument(db, pTab, 0);
+ addModuleArgument(db, pTab, sqlite3DbStrDup(db, pTab->zName));
+ rc = vtabCallConstructor(db, pTab, pMod, pModule->xConnect, &zErr);
+ if( rc ){
+ sqlite3ErrorMsg(pParse, "%s", zErr);
+ sqlite3DbFree(db, zErr);
+ sqlite3VtabEponymousTableClear(db, pMod);
+ return 0;
+ }
+ return 1;
+}
+
+/*
+** Erase the eponymous virtual table instance associated with
+** virtual table module pMod, if it exists.
+*/
+SQLITE_PRIVATE void sqlite3VtabEponymousTableClear(sqlite3 *db, Module *pMod){
+ Table *pTab = pMod->pEpoTab;
+ if( pTab!=0 ){
+ sqlite3DeleteColumnNames(db, pTab);
+ sqlite3VtabClear(db, pTab);
+ sqlite3DbFree(db, pTab);
+ pMod->pEpoTab = 0;
+ }
+}
+
+/*
** Return the ON CONFLICT resolution mode in effect for the virtual
** table update operation currently in progress.
**
@@ -115698,9 +117979,9 @@ SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
#endif /* SQLITE_OMIT_VIRTUALTABLE */
/************** End of vtab.c ************************************************/
-/************** Begin file where.c *******************************************/
+/************** Begin file wherecode.c ***************************************/
/*
-** 2001 September 15
+** 2015-06-06
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
@@ -115711,13 +117992,15 @@ SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
**
*************************************************************************
** This module contains C code that generates VDBE code used to process
-** the WHERE clause of SQL statements. This module is responsible for
-** generating the code that loops through a table looking for applicable
-** rows. Indices are selected and used to speed the search when doing
-** so is applicable. Because this module is responsible for selecting
-** indices, you might also think of this module as the "query optimizer".
+** the WHERE clause of SQL statements.
+**
+** This file was split off from where.c on 2015-06-06 in order to reduce the
+** size of where.c and make it easier to edit. This file contains the routines
+** that actually generate the bulk of the WHERE loop code. The original where.c
+** file retains the code that does query planning and analysis.
*/
-/************** Include whereInt.h in the middle of where.c ******************/
+/* #include "sqliteInt.h" */
+/************** Include whereInt.h in the middle of wherecode.c **************/
/************** Begin file whereInt.h ****************************************/
/*
** 2013-11-12
@@ -115740,7 +118023,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3 *db, int op, ...){
** Trace output macros
*/
#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
-/***/ int sqlite3WhereTrace = 0;
+/***/ int sqlite3WhereTrace;
#endif
#if defined(SQLITE_DEBUG) \
&& (defined(SQLITE_TEST) || defined(SQLITE_ENABLE_WHERETRACE))
@@ -115882,10 +118165,6 @@ struct WhereOrSet {
WhereOrCost a[N_OR_COST]; /* Set of best costs */
};
-
-/* Forward declaration of methods */
-static int whereLoopResize(sqlite3*, WhereLoop*, int);
-
/*
** Each instance of this object holds a sequence of WhereLoop objects
** that implement some or all of a query plan.
@@ -116001,6 +118280,7 @@ struct WhereTerm {
#define TERM_LIKEOPT 0x100 /* Virtual terms from the LIKE optimization */
#define TERM_LIKECOND 0x200 /* Conditionally this LIKE operator term */
#define TERM_LIKE 0x400 /* The original LIKE operator */
+#define TERM_IS 0x800 /* Term.pExpr is an IS operator */
/*
** An instance of the WhereScan object is used as an iterator for locating
@@ -116010,12 +118290,14 @@ struct WhereScan {
WhereClause *pOrigWC; /* Original, innermost WhereClause */
WhereClause *pWC; /* WhereClause currently being scanned */
char *zCollName; /* Required collating sequence, if not NULL */
+ Expr *pIdxExpr; /* Search for this index expression */
char idxaff; /* Must match this affinity, if zCollName!=NULL */
unsigned char nEquiv; /* Number of entries in aEquiv[] */
unsigned char iEquiv; /* Next unused slot in aEquiv[] */
u32 opMask; /* Acceptable operators */
int k; /* Resume scanning at this->pWC->a[this->k] */
- int aEquiv[22]; /* Cursor,Column pairs for equivalence classes */
+ int aiCur[11]; /* Cursors in the equivalence class */
+ i16 aiColumn[11]; /* Corresponding column number in the eq-class */
};
/*
@@ -116093,6 +118375,11 @@ struct WhereMaskSet {
};
/*
+** Initialize a WhereMaskSet object
+*/
+#define initMaskSet(P) (P)->n=0
+
+/*
** This object is a convenience wrapper holding all information needed
** to construct WhereLoop objects for a particular query.
*/
@@ -116129,7 +118416,7 @@ struct WhereInfo {
u16 wctrlFlags; /* Flags originally passed to sqlite3WhereBegin() */
i8 nOBSat; /* Number of ORDER BY terms satisfied by indices */
u8 sorted; /* True if really sorted (not just grouped) */
- u8 okOnePass; /* Ok to use one-pass algorithm for UPDATE/DELETE */
+ u8 eOnePass; /* ONEPASS_OFF, or _SINGLE, or _MULTI */
u8 untestedTerms; /* Not all WHERE terms resolved by outer loop */
u8 eDistinct; /* One of the WHERE_DISTINCT_* values below */
u8 nLevel; /* Number of nested loop */
@@ -116144,26 +118431,84 @@ struct WhereInfo {
};
/*
+** Private interfaces - callable only by other where.c routines.
+**
+** where.c:
+*/
+SQLITE_PRIVATE Bitmask sqlite3WhereGetMask(WhereMaskSet*,int);
+SQLITE_PRIVATE WhereTerm *sqlite3WhereFindTerm(
+ WhereClause *pWC, /* The WHERE clause to be searched */
+ int iCur, /* Cursor number of LHS */
+ int iColumn, /* Column number of LHS */
+ Bitmask notReady, /* RHS must not overlap with this mask */
+ u32 op, /* Mask of WO_xx values describing operator */
+ Index *pIdx /* Must be compatible with this index, if not NULL */
+);
+
+/* wherecode.c: */
+#ifndef SQLITE_OMIT_EXPLAIN
+SQLITE_PRIVATE int sqlite3WhereExplainOneScan(
+ Parse *pParse, /* Parse context */
+ SrcList *pTabList, /* Table list this loop refers to */
+ WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */
+ int iLevel, /* Value for "level" column of output */
+ int iFrom, /* Value for "from" column of output */
+ u16 wctrlFlags /* Flags passed to sqlite3WhereBegin() */
+);
+#else
+# define sqlite3WhereExplainOneScan(u,v,w,x,y,z) 0
+#endif /* SQLITE_OMIT_EXPLAIN */
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+SQLITE_PRIVATE void sqlite3WhereAddScanStatus(
+ Vdbe *v, /* Vdbe to add scanstatus entry to */
+ SrcList *pSrclist, /* FROM clause pLvl reads data from */
+ WhereLevel *pLvl, /* Level to add scanstatus() entry for */
+ int addrExplain /* Address of OP_Explain (or 0) */
+);
+#else
+# define sqlite3WhereAddScanStatus(a, b, c, d) ((void)d)
+#endif
+SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart(
+ WhereInfo *pWInfo, /* Complete information about the WHERE clause */
+ int iLevel, /* Which level of pWInfo->a[] should be coded */
+ Bitmask notReady /* Which tables are currently available */
+);
+
+/* whereexpr.c: */
+SQLITE_PRIVATE void sqlite3WhereClauseInit(WhereClause*,WhereInfo*);
+SQLITE_PRIVATE void sqlite3WhereClauseClear(WhereClause*);
+SQLITE_PRIVATE void sqlite3WhereSplit(WhereClause*,Expr*,u8);
+SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet*, Expr*);
+SQLITE_PRIVATE Bitmask sqlite3WhereExprListUsage(WhereMaskSet*, ExprList*);
+SQLITE_PRIVATE void sqlite3WhereExprAnalyze(SrcList*, WhereClause*);
+SQLITE_PRIVATE void sqlite3WhereTabFuncArgs(Parse*, struct SrcList_item*, WhereClause*);
+
+
+
+
+
+/*
** Bitmasks for the operators on WhereTerm objects. These are all
** operators that are of interest to the query planner. An
** OR-ed combination of these values can be used when searching for
** particular WhereTerms within a WhereClause.
*/
-#define WO_IN 0x001
-#define WO_EQ 0x002
+#define WO_IN 0x0001
+#define WO_EQ 0x0002
#define WO_LT (WO_EQ<<(TK_LT-TK_EQ))
#define WO_LE (WO_EQ<<(TK_LE-TK_EQ))
#define WO_GT (WO_EQ<<(TK_GT-TK_EQ))
#define WO_GE (WO_EQ<<(TK_GE-TK_EQ))
-#define WO_MATCH 0x040
-#define WO_ISNULL 0x080
-#define WO_OR 0x100 /* Two or more OR-connected terms */
-#define WO_AND 0x200 /* Two or more AND-connected terms */
-#define WO_EQUIV 0x400 /* Of the form A==B, both columns */
-#define WO_NOOP 0x800 /* This term does not restrict search space */
+#define WO_MATCH 0x0040
+#define WO_IS 0x0080
+#define WO_ISNULL 0x0100
+#define WO_OR 0x0200 /* Two or more OR-connected terms */
+#define WO_AND 0x0400 /* Two or more AND-connected terms */
+#define WO_EQUIV 0x0800 /* Of the form A==B, both columns */
+#define WO_NOOP 0x1000 /* This term does not restrict search space */
-#define WO_ALL 0xfff /* Mask of all possible WO_* values */
-#define WO_SINGLE 0x0ff /* Mask of all non-compound WO_* values */
+#define WO_ALL 0x1fff /* Mask of all possible WO_* values */
+#define WO_SINGLE 0x01ff /* Mask of all non-compound WO_* values */
/*
** These are definitions of bits in the WhereLoop.wsFlags field.
@@ -116191,138 +118536,1532 @@ struct WhereInfo {
#define WHERE_PARTIALIDX 0x00020000 /* The automatic index is partial */
/************** End of whereInt.h ********************************************/
-/************** Continuing where we left off in where.c **********************/
+/************** Continuing where we left off in wherecode.c ******************/
+#ifndef SQLITE_OMIT_EXPLAIN
/*
-** Return the estimated number of output rows from a WHERE clause
+** This routine is a helper for explainIndexRange() below
+**
+** pStr holds the text of an expression that we are building up one term
+** at a time. This routine adds a new term to the end of the expression.
+** Terms are separated by AND so add the "AND" text for second and subsequent
+** terms only.
*/
-SQLITE_PRIVATE u64 sqlite3WhereOutputRowCount(WhereInfo *pWInfo){
- return sqlite3LogEstToInt(pWInfo->nRowOut);
+static void explainAppendTerm(
+ StrAccum *pStr, /* The text expression being built */
+ int iTerm, /* Index of this term. First is zero */
+ const char *zColumn, /* Name of the column */
+ const char *zOp /* Name of the operator */
+){
+ if( iTerm ) sqlite3StrAccumAppend(pStr, " AND ", 5);
+ sqlite3StrAccumAppendAll(pStr, zColumn);
+ sqlite3StrAccumAppend(pStr, zOp, 1);
+ sqlite3StrAccumAppend(pStr, "?", 1);
}
/*
-** Return one of the WHERE_DISTINCT_xxxxx values to indicate how this
-** WHERE clause returns outputs for DISTINCT processing.
+** Return the name of the i-th column of the pIdx index.
*/
-SQLITE_PRIVATE int sqlite3WhereIsDistinct(WhereInfo *pWInfo){
- return pWInfo->eDistinct;
+static const char *explainIndexColumnName(Index *pIdx, int i){
+ i = pIdx->aiColumn[i];
+ if( i==XN_EXPR ) return "<expr>";
+ if( i==XN_ROWID ) return "rowid";
+ return pIdx->pTable->aCol[i].zName;
}
/*
-** Return TRUE if the WHERE clause returns rows in ORDER BY order.
-** Return FALSE if the output needs to be sorted.
+** Argument pLevel describes a strategy for scanning table pTab. This
+** function appends text to pStr that describes the subset of table
+** rows scanned by the strategy in the form of an SQL expression.
+**
+** For example, if the query:
+**
+** SELECT * FROM t1 WHERE a=1 AND b>2;
+**
+** is run and there is an index on (a, b), then this function returns a
+** string similar to:
+**
+** "a=? AND b>?"
*/
-SQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo *pWInfo){
- return pWInfo->nOBSat;
+static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop){
+ Index *pIndex = pLoop->u.btree.pIndex;
+ u16 nEq = pLoop->u.btree.nEq;
+ u16 nSkip = pLoop->nSkip;
+ int i, j;
+
+ if( nEq==0 && (pLoop->wsFlags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ) return;
+ sqlite3StrAccumAppend(pStr, " (", 2);
+ for(i=0; i<nEq; i++){
+ const char *z = explainIndexColumnName(pIndex, i);
+ if( i ) sqlite3StrAccumAppend(pStr, " AND ", 5);
+ sqlite3XPrintf(pStr, 0, i>=nSkip ? "%s=?" : "ANY(%s)", z);
+ }
+
+ j = i;
+ if( pLoop->wsFlags&WHERE_BTM_LIMIT ){
+ const char *z = explainIndexColumnName(pIndex, i);
+ explainAppendTerm(pStr, i++, z, ">");
+ }
+ if( pLoop->wsFlags&WHERE_TOP_LIMIT ){
+ const char *z = explainIndexColumnName(pIndex, j);
+ explainAppendTerm(pStr, i, z, "<");
+ }
+ sqlite3StrAccumAppend(pStr, ")", 1);
}
/*
-** Return the VDBE address or label to jump to in order to continue
-** immediately with the next row of a WHERE clause.
+** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
+** command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was
+** defined at compile-time. If it is not a no-op, a single OP_Explain opcode
+** is added to the output to describe the table scan strategy in pLevel.
+**
+** If an OP_Explain opcode is added to the VM, its address is returned.
+** Otherwise, if no OP_Explain is coded, zero is returned.
*/
-SQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo *pWInfo){
- assert( pWInfo->iContinue!=0 );
- return pWInfo->iContinue;
+SQLITE_PRIVATE int sqlite3WhereExplainOneScan(
+ Parse *pParse, /* Parse context */
+ SrcList *pTabList, /* Table list this loop refers to */
+ WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */
+ int iLevel, /* Value for "level" column of output */
+ int iFrom, /* Value for "from" column of output */
+ u16 wctrlFlags /* Flags passed to sqlite3WhereBegin() */
+){
+ int ret = 0;
+#if !defined(SQLITE_DEBUG) && !defined(SQLITE_ENABLE_STMT_SCANSTATUS)
+ if( pParse->explain==2 )
+#endif
+ {
+ struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];
+ Vdbe *v = pParse->pVdbe; /* VM being constructed */
+ sqlite3 *db = pParse->db; /* Database handle */
+ int iId = pParse->iSelectId; /* Select id (left-most output column) */
+ int isSearch; /* True for a SEARCH. False for SCAN. */
+ WhereLoop *pLoop; /* The controlling WhereLoop object */
+ u32 flags; /* Flags that describe this loop */
+ char *zMsg; /* Text to add to EQP output */
+ StrAccum str; /* EQP output string */
+ char zBuf[100]; /* Initial space for EQP output string */
+
+ pLoop = pLevel->pWLoop;
+ flags = pLoop->wsFlags;
+ if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_ONETABLE_ONLY) ) return 0;
+
+ isSearch = (flags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0
+ || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
+ || (wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX));
+
+ sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
+ sqlite3StrAccumAppendAll(&str, isSearch ? "SEARCH" : "SCAN");
+ if( pItem->pSelect ){
+ sqlite3XPrintf(&str, 0, " SUBQUERY %d", pItem->iSelectId);
+ }else{
+ sqlite3XPrintf(&str, 0, " TABLE %s", pItem->zName);
+ }
+
+ if( pItem->zAlias ){
+ sqlite3XPrintf(&str, 0, " AS %s", pItem->zAlias);
+ }
+ if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
+ const char *zFmt = 0;
+ Index *pIdx;
+
+ assert( pLoop->u.btree.pIndex!=0 );
+ pIdx = pLoop->u.btree.pIndex;
+ assert( !(flags&WHERE_AUTO_INDEX) || (flags&WHERE_IDX_ONLY) );
+ if( !HasRowid(pItem->pTab) && IsPrimaryKeyIndex(pIdx) ){
+ if( isSearch ){
+ zFmt = "PRIMARY KEY";
+ }
+ }else if( flags & WHERE_PARTIALIDX ){
+ zFmt = "AUTOMATIC PARTIAL COVERING INDEX";
+ }else if( flags & WHERE_AUTO_INDEX ){
+ zFmt = "AUTOMATIC COVERING INDEX";
+ }else if( flags & WHERE_IDX_ONLY ){
+ zFmt = "COVERING INDEX %s";
+ }else{
+ zFmt = "INDEX %s";
+ }
+ if( zFmt ){
+ sqlite3StrAccumAppend(&str, " USING ", 7);
+ sqlite3XPrintf(&str, 0, zFmt, pIdx->zName);
+ explainIndexRange(&str, pLoop);
+ }
+ }else if( (flags & WHERE_IPK)!=0 && (flags & WHERE_CONSTRAINT)!=0 ){
+ const char *zRangeOp;
+ if( flags&(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) ){
+ zRangeOp = "=";
+ }else if( (flags&WHERE_BOTH_LIMIT)==WHERE_BOTH_LIMIT ){
+ zRangeOp = ">? AND rowid<";
+ }else if( flags&WHERE_BTM_LIMIT ){
+ zRangeOp = ">";
+ }else{
+ assert( flags&WHERE_TOP_LIMIT);
+ zRangeOp = "<";
+ }
+ sqlite3XPrintf(&str, 0, " USING INTEGER PRIMARY KEY (rowid%s?)",zRangeOp);
+ }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ else if( (flags & WHERE_VIRTUALTABLE)!=0 ){
+ sqlite3XPrintf(&str, 0, " VIRTUAL TABLE INDEX %d:%s",
+ pLoop->u.vtab.idxNum, pLoop->u.vtab.idxStr);
+ }
+#endif
+#ifdef SQLITE_EXPLAIN_ESTIMATED_ROWS
+ if( pLoop->nOut>=10 ){
+ sqlite3XPrintf(&str, 0, " (~%llu rows)", sqlite3LogEstToInt(pLoop->nOut));
+ }else{
+ sqlite3StrAccumAppend(&str, " (~1 row)", 9);
+ }
+#endif
+ zMsg = sqlite3StrAccumFinish(&str);
+ ret = sqlite3VdbeAddOp4(v, OP_Explain, iId, iLevel, iFrom, zMsg,P4_DYNAMIC);
+ }
+ return ret;
}
+#endif /* SQLITE_OMIT_EXPLAIN */
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
/*
-** Return the VDBE address or label to jump to in order to break
-** out of a WHERE loop.
+** Configure the VM passed as the first argument with an
+** sqlite3_stmt_scanstatus() entry corresponding to the scan used to
+** implement level pLvl. Argument pSrclist is a pointer to the FROM
+** clause that the scan reads data from.
+**
+** If argument addrExplain is not 0, it must be the address of an
+** OP_Explain instruction that describes the same loop.
*/
-SQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo *pWInfo){
- return pWInfo->iBreak;
+SQLITE_PRIVATE void sqlite3WhereAddScanStatus(
+ Vdbe *v, /* Vdbe to add scanstatus entry to */
+ SrcList *pSrclist, /* FROM clause pLvl reads data from */
+ WhereLevel *pLvl, /* Level to add scanstatus() entry for */
+ int addrExplain /* Address of OP_Explain (or 0) */
+){
+ const char *zObj = 0;
+ WhereLoop *pLoop = pLvl->pWLoop;
+ if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 && pLoop->u.btree.pIndex!=0 ){
+ zObj = pLoop->u.btree.pIndex->zName;
+ }else{
+ zObj = pSrclist->a[pLvl->iFrom].zName;
+ }
+ sqlite3VdbeScanStatus(
+ v, addrExplain, pLvl->addrBody, pLvl->addrVisit, pLoop->nOut, zObj
+ );
}
+#endif
+
/*
-** Return TRUE if an UPDATE or DELETE statement can operate directly on
-** the rowids returned by a WHERE clause. Return FALSE if doing an
-** UPDATE or DELETE might change subsequent WHERE clause results.
+** Disable a term in the WHERE clause. Except, do not disable the term
+** if it controls a LEFT OUTER JOIN and it did not originate in the ON
+** or USING clause of that join.
**
-** If the ONEPASS optimization is used (if this routine returns true)
-** then also write the indices of open cursors used by ONEPASS
-** into aiCur[0] and aiCur[1]. iaCur[0] gets the cursor of the data
-** table and iaCur[1] gets the cursor used by an auxiliary index.
-** Either value may be -1, indicating that cursor is not used.
-** Any cursors returned will have been opened for writing.
+** Consider the term t2.z='ok' in the following queries:
**
-** aiCur[0] and aiCur[1] both get -1 if the where-clause logic is
-** unable to use the ONEPASS optimization.
+** (1) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'
+** (2) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'
+** (3) SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'
+**
+** The t2.z='ok' is disabled in the in (2) because it originates
+** in the ON clause. The term is disabled in (3) because it is not part
+** of a LEFT OUTER JOIN. In (1), the term is not disabled.
+**
+** Disabling a term causes that term to not be tested in the inner loop
+** of the join. Disabling is an optimization. When terms are satisfied
+** by indices, we disable them to prevent redundant tests in the inner
+** loop. We would get the correct results if nothing were ever disabled,
+** but joins might run a little slower. The trick is to disable as much
+** as we can without disabling too much. If we disabled in (1), we'd get
+** the wrong answer. See ticket #813.
+**
+** If all the children of a term are disabled, then that term is also
+** automatically disabled. In this way, terms get disabled if derived
+** virtual terms are tested first. For example:
+**
+** x GLOB 'abc*' AND x>='abc' AND x<'acd'
+** \___________/ \______/ \_____/
+** parent child1 child2
+**
+** Only the parent term was in the original WHERE clause. The child1
+** and child2 terms were added by the LIKE optimization. If both of
+** the virtual child terms are valid, then testing of the parent can be
+** skipped.
+**
+** Usually the parent term is marked as TERM_CODED. But if the parent
+** term was originally TERM_LIKE, then the parent gets TERM_LIKECOND instead.
+** The TERM_LIKECOND marking indicates that the term should be coded inside
+** a conditional such that is only evaluated on the second pass of a
+** LIKE-optimization loop, when scanning BLOBs instead of strings.
*/
-SQLITE_PRIVATE int sqlite3WhereOkOnePass(WhereInfo *pWInfo, int *aiCur){
- memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2);
- return pWInfo->okOnePass;
+static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){
+ int nLoop = 0;
+ while( pTerm
+ && (pTerm->wtFlags & TERM_CODED)==0
+ && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_FromJoin))
+ && (pLevel->notReady & pTerm->prereqAll)==0
+ ){
+ if( nLoop && (pTerm->wtFlags & TERM_LIKE)!=0 ){
+ pTerm->wtFlags |= TERM_LIKECOND;
+ }else{
+ pTerm->wtFlags |= TERM_CODED;
+ }
+ if( pTerm->iParent<0 ) break;
+ pTerm = &pTerm->pWC->a[pTerm->iParent];
+ pTerm->nChild--;
+ if( pTerm->nChild!=0 ) break;
+ nLoop++;
+ }
}
/*
-** Move the content of pSrc into pDest
+** Code an OP_Affinity opcode to apply the column affinity string zAff
+** to the n registers starting at base.
+**
+** As an optimization, SQLITE_AFF_BLOB entries (which are no-ops) at the
+** beginning and end of zAff are ignored. If all entries in zAff are
+** SQLITE_AFF_BLOB, then no code gets generated.
+**
+** This routine makes its own copy of zAff so that the caller is free
+** to modify zAff after this routine returns.
*/
-static void whereOrMove(WhereOrSet *pDest, WhereOrSet *pSrc){
- pDest->n = pSrc->n;
- memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));
+static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
+ Vdbe *v = pParse->pVdbe;
+ if( zAff==0 ){
+ assert( pParse->db->mallocFailed );
+ return;
+ }
+ assert( v!=0 );
+
+ /* Adjust base and n to skip over SQLITE_AFF_BLOB entries at the beginning
+ ** and end of the affinity string.
+ */
+ while( n>0 && zAff[0]==SQLITE_AFF_BLOB ){
+ n--;
+ base++;
+ zAff++;
+ }
+ while( n>1 && zAff[n-1]==SQLITE_AFF_BLOB ){
+ n--;
+ }
+
+ /* Code the OP_Affinity opcode if there is anything left to do. */
+ if( n>0 ){
+ sqlite3VdbeAddOp2(v, OP_Affinity, base, n);
+ sqlite3VdbeChangeP4(v, -1, zAff, n);
+ sqlite3ExprCacheAffinityChange(pParse, base, n);
+ }
}
+
/*
-** Try to insert a new prerequisite/cost entry into the WhereOrSet pSet.
+** Generate code for a single equality term of the WHERE clause. An equality
+** term can be either X=expr or X IN (...). pTerm is the term to be
+** coded.
**
-** The new entry might overwrite an existing entry, or it might be
-** appended, or it might be discarded. Do whatever is the right thing
-** so that pSet keeps the N_OR_COST best entries seen so far.
+** The current value for the constraint is left in register iReg.
+**
+** For a constraint of the form X=expr, the expression is evaluated and its
+** result is left on the stack. For constraints of the form X IN (...)
+** this routine sets up a loop that will iterate over all values of X.
*/
-static int whereOrInsert(
- WhereOrSet *pSet, /* The WhereOrSet to be updated */
- Bitmask prereq, /* Prerequisites of the new entry */
- LogEst rRun, /* Run-cost of the new entry */
- LogEst nOut /* Number of outputs for the new entry */
+static int codeEqualityTerm(
+ Parse *pParse, /* The parsing context */
+ WhereTerm *pTerm, /* The term of the WHERE clause to be coded */
+ WhereLevel *pLevel, /* The level of the FROM clause we are working on */
+ int iEq, /* Index of the equality term within this level */
+ int bRev, /* True for reverse-order IN operations */
+ int iTarget /* Attempt to leave results in this register */
){
- u16 i;
- WhereOrCost *p;
- for(i=pSet->n, p=pSet->a; i>0; i--, p++){
- if( rRun<=p->rRun && (prereq & p->prereq)==prereq ){
- goto whereOrInsert_done;
+ Expr *pX = pTerm->pExpr;
+ Vdbe *v = pParse->pVdbe;
+ int iReg; /* Register holding results */
+
+ assert( iTarget>0 );
+ if( pX->op==TK_EQ || pX->op==TK_IS ){
+ iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
+ }else if( pX->op==TK_ISNULL ){
+ iReg = iTarget;
+ sqlite3VdbeAddOp2(v, OP_Null, 0, iReg);
+#ifndef SQLITE_OMIT_SUBQUERY
+ }else{
+ int eType;
+ int iTab;
+ struct InLoop *pIn;
+ WhereLoop *pLoop = pLevel->pWLoop;
+
+ if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0
+ && pLoop->u.btree.pIndex!=0
+ && pLoop->u.btree.pIndex->aSortOrder[iEq]
+ ){
+ testcase( iEq==0 );
+ testcase( bRev );
+ bRev = !bRev;
}
- if( p->rRun<=rRun && (p->prereq & prereq)==p->prereq ){
- return 0;
+ assert( pX->op==TK_IN );
+ iReg = iTarget;
+ eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0);
+ if( eType==IN_INDEX_INDEX_DESC ){
+ testcase( bRev );
+ bRev = !bRev;
+ }
+ iTab = pX->iTable;
+ sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
+ VdbeCoverageIf(v, bRev);
+ VdbeCoverageIf(v, !bRev);
+ assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );
+ pLoop->wsFlags |= WHERE_IN_ABLE;
+ if( pLevel->u.in.nIn==0 ){
+ pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
+ }
+ pLevel->u.in.nIn++;
+ pLevel->u.in.aInLoop =
+ sqlite3DbReallocOrFree(pParse->db, pLevel->u.in.aInLoop,
+ sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
+ pIn = pLevel->u.in.aInLoop;
+ if( pIn ){
+ pIn += pLevel->u.in.nIn - 1;
+ pIn->iCur = iTab;
+ if( eType==IN_INDEX_ROWID ){
+ pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iReg);
+ }else{
+ pIn->addrInTop = sqlite3VdbeAddOp3(v, OP_Column, iTab, 0, iReg);
+ }
+ pIn->eEndLoopOp = bRev ? OP_PrevIfOpen : OP_NextIfOpen;
+ sqlite3VdbeAddOp1(v, OP_IsNull, iReg); VdbeCoverage(v);
+ }else{
+ pLevel->u.in.nIn = 0;
}
+#endif
}
- if( pSet->n<N_OR_COST ){
- p = &pSet->a[pSet->n++];
- p->nOut = nOut;
- }else{
- p = pSet->a;
- for(i=1; i<pSet->n; i++){
- if( p->rRun>pSet->a[i].rRun ) p = pSet->a + i;
+ disableTerm(pLevel, pTerm);
+ return iReg;
+}
+
+/*
+** Generate code that will evaluate all == and IN constraints for an
+** index scan.
+**
+** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).
+** Suppose the WHERE clause is this: a==5 AND b IN (1,2,3) AND c>5 AND c<10
+** The index has as many as three equality constraints, but in this
+** example, the third "c" value is an inequality. So only two
+** constraints are coded. This routine will generate code to evaluate
+** a==5 and b IN (1,2,3). The current values for a and b will be stored
+** in consecutive registers and the index of the first register is returned.
+**
+** In the example above nEq==2. But this subroutine works for any value
+** of nEq including 0. If nEq==0, this routine is nearly a no-op.
+** The only thing it does is allocate the pLevel->iMem memory cell and
+** compute the affinity string.
+**
+** The nExtraReg parameter is 0 or 1. It is 0 if all WHERE clause constraints
+** are == or IN and are covered by the nEq. nExtraReg is 1 if there is
+** an inequality constraint (such as the "c>=5 AND c<10" in the example) that
+** occurs after the nEq quality constraints.
+**
+** This routine allocates a range of nEq+nExtraReg memory cells and returns
+** the index of the first memory cell in that range. The code that
+** calls this routine will use that memory range to store keys for
+** start and termination conditions of the loop.
+** key value of the loop. If one or more IN operators appear, then
+** this routine allocates an additional nEq memory cells for internal
+** use.
+**
+** Before returning, *pzAff is set to point to a buffer containing a
+** copy of the column affinity string of the index allocated using
+** sqlite3DbMalloc(). Except, entries in the copy of the string associated
+** with equality constraints that use BLOB or NONE affinity are set to
+** SQLITE_AFF_BLOB. This is to deal with SQL such as the following:
+**
+** CREATE TABLE t1(a TEXT PRIMARY KEY, b);
+** SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;
+**
+** In the example above, the index on t1(a) has TEXT affinity. But since
+** the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,
+** no conversion should be attempted before using a t2.b value as part of
+** a key to search the index. Hence the first byte in the returned affinity
+** string in this example would be set to SQLITE_AFF_BLOB.
+*/
+static int codeAllEqualityTerms(
+ Parse *pParse, /* Parsing context */
+ WhereLevel *pLevel, /* Which nested loop of the FROM we are coding */
+ int bRev, /* Reverse the order of IN operators */
+ int nExtraReg, /* Number of extra registers to allocate */
+ char **pzAff /* OUT: Set to point to affinity string */
+){
+ u16 nEq; /* The number of == or IN constraints to code */
+ u16 nSkip; /* Number of left-most columns to skip */
+ Vdbe *v = pParse->pVdbe; /* The vm under construction */
+ Index *pIdx; /* The index being used for this loop */
+ WhereTerm *pTerm; /* A single constraint term */
+ WhereLoop *pLoop; /* The WhereLoop object */
+ int j; /* Loop counter */
+ int regBase; /* Base register */
+ int nReg; /* Number of registers to allocate */
+ char *zAff; /* Affinity string to return */
+
+ /* This module is only called on query plans that use an index. */
+ pLoop = pLevel->pWLoop;
+ assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 );
+ nEq = pLoop->u.btree.nEq;
+ nSkip = pLoop->nSkip;
+ pIdx = pLoop->u.btree.pIndex;
+ assert( pIdx!=0 );
+
+ /* Figure out how many memory cells we will need then allocate them.
+ */
+ regBase = pParse->nMem + 1;
+ nReg = pLoop->u.btree.nEq + nExtraReg;
+ pParse->nMem += nReg;
+
+ zAff = sqlite3DbStrDup(pParse->db,sqlite3IndexAffinityStr(pParse->db,pIdx));
+ if( !zAff ){
+ pParse->db->mallocFailed = 1;
+ }
+
+ if( nSkip ){
+ int iIdxCur = pLevel->iIdxCur;
+ sqlite3VdbeAddOp1(v, (bRev?OP_Last:OP_Rewind), iIdxCur);
+ VdbeCoverageIf(v, bRev==0);
+ VdbeCoverageIf(v, bRev!=0);
+ VdbeComment((v, "begin skip-scan on %s", pIdx->zName));
+ j = sqlite3VdbeAddOp0(v, OP_Goto);
+ pLevel->addrSkip = sqlite3VdbeAddOp4Int(v, (bRev?OP_SeekLT:OP_SeekGT),
+ iIdxCur, 0, regBase, nSkip);
+ VdbeCoverageIf(v, bRev==0);
+ VdbeCoverageIf(v, bRev!=0);
+ sqlite3VdbeJumpHere(v, j);
+ for(j=0; j<nSkip; j++){
+ sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, j, regBase+j);
+ testcase( pIdx->aiColumn[j]==XN_EXPR );
+ VdbeComment((v, "%s", explainIndexColumnName(pIdx, j)));
+ }
+ }
+
+ /* Evaluate the equality constraints
+ */
+ assert( zAff==0 || (int)strlen(zAff)>=nEq );
+ for(j=nSkip; j<nEq; j++){
+ int r1;
+ pTerm = pLoop->aLTerm[j];
+ assert( pTerm!=0 );
+ /* The following testcase is true for indices with redundant columns.
+ ** Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; */
+ testcase( (pTerm->wtFlags & TERM_CODED)!=0 );
+ testcase( pTerm->wtFlags & TERM_VIRTUAL );
+ r1 = codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, regBase+j);
+ if( r1!=regBase+j ){
+ if( nReg==1 ){
+ sqlite3ReleaseTempReg(pParse, regBase);
+ regBase = r1;
+ }else{
+ sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
+ }
+ }
+ testcase( pTerm->eOperator & WO_ISNULL );
+ testcase( pTerm->eOperator & WO_IN );
+ if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
+ Expr *pRight = pTerm->pExpr->pRight;
+ if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
+ sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
+ VdbeCoverage(v);
+ }
+ if( zAff ){
+ if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
+ zAff[j] = SQLITE_AFF_BLOB;
+ }
+ if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
+ zAff[j] = SQLITE_AFF_BLOB;
+ }
+ }
}
- if( p->rRun<=rRun ) return 0;
}
-whereOrInsert_done:
- p->prereq = prereq;
- p->rRun = rRun;
- if( p->nOut>nOut ) p->nOut = nOut;
- return 1;
+ *pzAff = zAff;
+ return regBase;
}
/*
-** Initialize a preallocated WhereClause structure.
+** If the most recently coded instruction is a constant range contraint
+** that originated from the LIKE optimization, then change the P3 to be
+** pLoop->iLikeRepCntr and set P5.
+**
+** The LIKE optimization trys to evaluate "x LIKE 'abc%'" as a range
+** expression: "x>='ABC' AND x<'abd'". But this requires that the range
+** scan loop run twice, once for strings and a second time for BLOBs.
+** The OP_String opcodes on the second pass convert the upper and lower
+** bound string contants to blobs. This routine makes the necessary changes
+** to the OP_String opcodes for that to happen.
*/
-static void whereClauseInit(
- WhereClause *pWC, /* The WhereClause to be initialized */
- WhereInfo *pWInfo /* The WHERE processing context */
+static void whereLikeOptimizationStringFixup(
+ Vdbe *v, /* prepared statement under construction */
+ WhereLevel *pLevel, /* The loop that contains the LIKE operator */
+ WhereTerm *pTerm /* The upper or lower bound just coded */
){
- pWC->pWInfo = pWInfo;
- pWC->pOuter = 0;
- pWC->nTerm = 0;
- pWC->nSlot = ArraySize(pWC->aStatic);
- pWC->a = pWC->aStatic;
+ if( pTerm->wtFlags & TERM_LIKEOPT ){
+ VdbeOp *pOp;
+ assert( pLevel->iLikeRepCntr>0 );
+ pOp = sqlite3VdbeGetOp(v, -1);
+ assert( pOp!=0 );
+ assert( pOp->opcode==OP_String8
+ || pTerm->pWC->pWInfo->pParse->db->mallocFailed );
+ pOp->p3 = pLevel->iLikeRepCntr;
+ pOp->p5 = 1;
+ }
}
-/* Forward reference */
-static void whereClauseClear(WhereClause*);
+
+/*
+** Generate code for the start of the iLevel-th loop in the WHERE clause
+** implementation described by pWInfo.
+*/
+SQLITE_PRIVATE Bitmask sqlite3WhereCodeOneLoopStart(
+ WhereInfo *pWInfo, /* Complete information about the WHERE clause */
+ int iLevel, /* Which level of pWInfo->a[] should be coded */
+ Bitmask notReady /* Which tables are currently available */
+){
+ int j, k; /* Loop counters */
+ int iCur; /* The VDBE cursor for the table */
+ int addrNxt; /* Where to jump to continue with the next IN case */
+ int omitTable; /* True if we use the index only */
+ int bRev; /* True if we need to scan in reverse order */
+ WhereLevel *pLevel; /* The where level to be coded */
+ WhereLoop *pLoop; /* The WhereLoop object being coded */
+ WhereClause *pWC; /* Decomposition of the entire WHERE clause */
+ WhereTerm *pTerm; /* A WHERE clause term */
+ Parse *pParse; /* Parsing context */
+ sqlite3 *db; /* Database connection */
+ Vdbe *v; /* The prepared stmt under constructions */
+ struct SrcList_item *pTabItem; /* FROM clause term being coded */
+ int addrBrk; /* Jump here to break out of the loop */
+ int addrCont; /* Jump here to continue with next cycle */
+ int iRowidReg = 0; /* Rowid is stored in this register, if not zero */
+ int iReleaseReg = 0; /* Temp register to free before returning */
+
+ pParse = pWInfo->pParse;
+ v = pParse->pVdbe;
+ pWC = &pWInfo->sWC;
+ db = pParse->db;
+ pLevel = &pWInfo->a[iLevel];
+ pLoop = pLevel->pWLoop;
+ pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];
+ iCur = pTabItem->iCursor;
+ pLevel->notReady = notReady & ~sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur);
+ bRev = (pWInfo->revMask>>iLevel)&1;
+ omitTable = (pLoop->wsFlags & WHERE_IDX_ONLY)!=0
+ && (pWInfo->wctrlFlags & WHERE_FORCE_TABLE)==0;
+ VdbeModuleComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName));
+
+ /* Create labels for the "break" and "continue" instructions
+ ** for the current loop. Jump to addrBrk to break out of a loop.
+ ** Jump to cont to go immediately to the next iteration of the
+ ** loop.
+ **
+ ** When there is an IN operator, we also have a "addrNxt" label that
+ ** means to continue with the next IN value combination. When
+ ** there are no IN operators in the constraints, the "addrNxt" label
+ ** is the same as "addrBrk".
+ */
+ addrBrk = pLevel->addrBrk = pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
+ addrCont = pLevel->addrCont = sqlite3VdbeMakeLabel(v);
+
+ /* If this is the right table of a LEFT OUTER JOIN, allocate and
+ ** initialize a memory cell that records if this table matches any
+ ** row of the left table of the join.
+ */
+ if( pLevel->iFrom>0 && (pTabItem[0].fg.jointype & JT_LEFT)!=0 ){
+ pLevel->iLeftJoin = ++pParse->nMem;
+ sqlite3VdbeAddOp2(v, OP_Integer, 0, pLevel->iLeftJoin);
+ VdbeComment((v, "init LEFT JOIN no-match flag"));
+ }
+
+ /* Special case of a FROM clause subquery implemented as a co-routine */
+ if( pTabItem->fg.viaCoroutine ){
+ int regYield = pTabItem->regReturn;
+ sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pTabItem->addrFillSub);
+ pLevel->p2 = sqlite3VdbeAddOp2(v, OP_Yield, regYield, addrBrk);
+ VdbeCoverage(v);
+ VdbeComment((v, "next row of \"%s\"", pTabItem->pTab->zName));
+ pLevel->op = OP_Goto;
+ }else
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 ){
+ /* Case 1: The table is a virtual-table. Use the VFilter and VNext
+ ** to access the data.
+ */
+ int iReg; /* P3 Value for OP_VFilter */
+ int addrNotFound;
+ int nConstraint = pLoop->nLTerm;
+
+ sqlite3ExprCachePush(pParse);
+ iReg = sqlite3GetTempRange(pParse, nConstraint+2);
+ addrNotFound = pLevel->addrBrk;
+ for(j=0; j<nConstraint; j++){
+ int iTarget = iReg+j+2;
+ pTerm = pLoop->aLTerm[j];
+ if( pTerm==0 ) continue;
+ if( pTerm->eOperator & WO_IN ){
+ codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, iTarget);
+ addrNotFound = pLevel->addrNxt;
+ }else{
+ sqlite3ExprCode(pParse, pTerm->pExpr->pRight, iTarget);
+ }
+ }
+ sqlite3VdbeAddOp2(v, OP_Integer, pLoop->u.vtab.idxNum, iReg);
+ sqlite3VdbeAddOp2(v, OP_Integer, nConstraint, iReg+1);
+ sqlite3VdbeAddOp4(v, OP_VFilter, iCur, addrNotFound, iReg,
+ pLoop->u.vtab.idxStr,
+ pLoop->u.vtab.needFree ? P4_MPRINTF : P4_STATIC);
+ VdbeCoverage(v);
+ pLoop->u.vtab.needFree = 0;
+ for(j=0; j<nConstraint && j<16; j++){
+ if( (pLoop->u.vtab.omitMask>>j)&1 ){
+ disableTerm(pLevel, pLoop->aLTerm[j]);
+ }
+ }
+ pLevel->p1 = iCur;
+ pLevel->op = pWInfo->eOnePass ? OP_Noop : OP_VNext;
+ pLevel->p2 = sqlite3VdbeCurrentAddr(v);
+ sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
+ sqlite3ExprCachePop(pParse);
+ }else
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+ if( (pLoop->wsFlags & WHERE_IPK)!=0
+ && (pLoop->wsFlags & (WHERE_COLUMN_IN|WHERE_COLUMN_EQ))!=0
+ ){
+ /* Case 2: We can directly reference a single row using an
+ ** equality comparison against the ROWID field. Or
+ ** we reference multiple rows using a "rowid IN (...)"
+ ** construct.
+ */
+ assert( pLoop->u.btree.nEq==1 );
+ pTerm = pLoop->aLTerm[0];
+ assert( pTerm!=0 );
+ assert( pTerm->pExpr!=0 );
+ assert( omitTable==0 );
+ testcase( pTerm->wtFlags & TERM_VIRTUAL );
+ iReleaseReg = ++pParse->nMem;
+ iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);
+ if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg);
+ addrNxt = pLevel->addrNxt;
+ sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt); VdbeCoverage(v);
+ sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addrNxt, iRowidReg);
+ VdbeCoverage(v);
+ sqlite3ExprCacheAffinityChange(pParse, iRowidReg, 1);
+ sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
+ VdbeComment((v, "pk"));
+ pLevel->op = OP_Noop;
+ }else if( (pLoop->wsFlags & WHERE_IPK)!=0
+ && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
+ ){
+ /* Case 3: We have an inequality comparison against the ROWID field.
+ */
+ int testOp = OP_Noop;
+ int start;
+ int memEndValue = 0;
+ WhereTerm *pStart, *pEnd;
+
+ assert( omitTable==0 );
+ j = 0;
+ pStart = pEnd = 0;
+ if( pLoop->wsFlags & WHERE_BTM_LIMIT ) pStart = pLoop->aLTerm[j++];
+ if( pLoop->wsFlags & WHERE_TOP_LIMIT ) pEnd = pLoop->aLTerm[j++];
+ assert( pStart!=0 || pEnd!=0 );
+ if( bRev ){
+ pTerm = pStart;
+ pStart = pEnd;
+ pEnd = pTerm;
+ }
+ if( pStart ){
+ Expr *pX; /* The expression that defines the start bound */
+ int r1, rTemp; /* Registers for holding the start boundary */
+
+ /* The following constant maps TK_xx codes into corresponding
+ ** seek opcodes. It depends on a particular ordering of TK_xx
+ */
+ const u8 aMoveOp[] = {
+ /* TK_GT */ OP_SeekGT,
+ /* TK_LE */ OP_SeekLE,
+ /* TK_LT */ OP_SeekLT,
+ /* TK_GE */ OP_SeekGE
+ };
+ assert( TK_LE==TK_GT+1 ); /* Make sure the ordering.. */
+ assert( TK_LT==TK_GT+2 ); /* ... of the TK_xx values... */
+ assert( TK_GE==TK_GT+3 ); /* ... is correcct. */
+
+ assert( (pStart->wtFlags & TERM_VNULL)==0 );
+ testcase( pStart->wtFlags & TERM_VIRTUAL );
+ pX = pStart->pExpr;
+ assert( pX!=0 );
+ testcase( pStart->leftCursor!=iCur ); /* transitive constraints */
+ r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
+ sqlite3VdbeAddOp3(v, aMoveOp[pX->op-TK_GT], iCur, addrBrk, r1);
+ VdbeComment((v, "pk"));
+ VdbeCoverageIf(v, pX->op==TK_GT);
+ VdbeCoverageIf(v, pX->op==TK_LE);
+ VdbeCoverageIf(v, pX->op==TK_LT);
+ VdbeCoverageIf(v, pX->op==TK_GE);
+ sqlite3ExprCacheAffinityChange(pParse, r1, 1);
+ sqlite3ReleaseTempReg(pParse, rTemp);
+ disableTerm(pLevel, pStart);
+ }else{
+ sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iCur, addrBrk);
+ VdbeCoverageIf(v, bRev==0);
+ VdbeCoverageIf(v, bRev!=0);
+ }
+ if( pEnd ){
+ Expr *pX;
+ pX = pEnd->pExpr;
+ assert( pX!=0 );
+ assert( (pEnd->wtFlags & TERM_VNULL)==0 );
+ testcase( pEnd->leftCursor!=iCur ); /* Transitive constraints */
+ testcase( pEnd->wtFlags & TERM_VIRTUAL );
+ memEndValue = ++pParse->nMem;
+ sqlite3ExprCode(pParse, pX->pRight, memEndValue);
+ if( pX->op==TK_LT || pX->op==TK_GT ){
+ testOp = bRev ? OP_Le : OP_Ge;
+ }else{
+ testOp = bRev ? OP_Lt : OP_Gt;
+ }
+ disableTerm(pLevel, pEnd);
+ }
+ start = sqlite3VdbeCurrentAddr(v);
+ pLevel->op = bRev ? OP_Prev : OP_Next;
+ pLevel->p1 = iCur;
+ pLevel->p2 = start;
+ assert( pLevel->p5==0 );
+ if( testOp!=OP_Noop ){
+ iRowidReg = ++pParse->nMem;
+ sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);
+ sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
+ sqlite3VdbeAddOp3(v, testOp, memEndValue, addrBrk, iRowidReg);
+ VdbeCoverageIf(v, testOp==OP_Le);
+ VdbeCoverageIf(v, testOp==OP_Lt);
+ VdbeCoverageIf(v, testOp==OP_Ge);
+ VdbeCoverageIf(v, testOp==OP_Gt);
+ sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL);
+ }
+ }else if( pLoop->wsFlags & WHERE_INDEXED ){
+ /* Case 4: A scan using an index.
+ **
+ ** The WHERE clause may contain zero or more equality
+ ** terms ("==" or "IN" operators) that refer to the N
+ ** left-most columns of the index. It may also contain
+ ** inequality constraints (>, <, >= or <=) on the indexed
+ ** column that immediately follows the N equalities. Only
+ ** the right-most column can be an inequality - the rest must
+ ** use the "==" and "IN" operators. For example, if the
+ ** index is on (x,y,z), then the following clauses are all
+ ** optimized:
+ **
+ ** x=5
+ ** x=5 AND y=10
+ ** x=5 AND y<10
+ ** x=5 AND y>5 AND y<10
+ ** x=5 AND y=5 AND z<=10
+ **
+ ** The z<10 term of the following cannot be used, only
+ ** the x=5 term:
+ **
+ ** x=5 AND z<10
+ **
+ ** N may be zero if there are inequality constraints.
+ ** If there are no inequality constraints, then N is at
+ ** least one.
+ **
+ ** This case is also used when there are no WHERE clause
+ ** constraints but an index is selected anyway, in order
+ ** to force the output order to conform to an ORDER BY.
+ */
+ static const u8 aStartOp[] = {
+ 0,
+ 0,
+ OP_Rewind, /* 2: (!start_constraints && startEq && !bRev) */
+ OP_Last, /* 3: (!start_constraints && startEq && bRev) */
+ OP_SeekGT, /* 4: (start_constraints && !startEq && !bRev) */
+ OP_SeekLT, /* 5: (start_constraints && !startEq && bRev) */
+ OP_SeekGE, /* 6: (start_constraints && startEq && !bRev) */
+ OP_SeekLE /* 7: (start_constraints && startEq && bRev) */
+ };
+ static const u8 aEndOp[] = {
+ OP_IdxGE, /* 0: (end_constraints && !bRev && !endEq) */
+ OP_IdxGT, /* 1: (end_constraints && !bRev && endEq) */
+ OP_IdxLE, /* 2: (end_constraints && bRev && !endEq) */
+ OP_IdxLT, /* 3: (end_constraints && bRev && endEq) */
+ };
+ u16 nEq = pLoop->u.btree.nEq; /* Number of == or IN terms */
+ int regBase; /* Base register holding constraint values */
+ WhereTerm *pRangeStart = 0; /* Inequality constraint at range start */
+ WhereTerm *pRangeEnd = 0; /* Inequality constraint at range end */
+ int startEq; /* True if range start uses ==, >= or <= */
+ int endEq; /* True if range end uses ==, >= or <= */
+ int start_constraints; /* Start of range is constrained */
+ int nConstraint; /* Number of constraint terms */
+ Index *pIdx; /* The index we will be using */
+ int iIdxCur; /* The VDBE cursor for the index */
+ int nExtraReg = 0; /* Number of extra registers needed */
+ int op; /* Instruction opcode */
+ char *zStartAff; /* Affinity for start of range constraint */
+ char cEndAff = 0; /* Affinity for end of range constraint */
+ u8 bSeekPastNull = 0; /* True to seek past initial nulls */
+ u8 bStopAtNull = 0; /* Add condition to terminate at NULLs */
+
+ pIdx = pLoop->u.btree.pIndex;
+ iIdxCur = pLevel->iIdxCur;
+ assert( nEq>=pLoop->nSkip );
+
+ /* If this loop satisfies a sort order (pOrderBy) request that
+ ** was passed to this function to implement a "SELECT min(x) ..."
+ ** query, then the caller will only allow the loop to run for
+ ** a single iteration. This means that the first row returned
+ ** should not have a NULL value stored in 'x'. If column 'x' is
+ ** the first one after the nEq equality constraints in the index,
+ ** this requires some special handling.
+ */
+ assert( pWInfo->pOrderBy==0
+ || pWInfo->pOrderBy->nExpr==1
+ || (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)==0 );
+ if( (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)!=0
+ && pWInfo->nOBSat>0
+ && (pIdx->nKeyCol>nEq)
+ ){
+ assert( pLoop->nSkip==0 );
+ bSeekPastNull = 1;
+ nExtraReg = 1;
+ }
+
+ /* Find any inequality constraint terms for the start and end
+ ** of the range.
+ */
+ j = nEq;
+ if( pLoop->wsFlags & WHERE_BTM_LIMIT ){
+ pRangeStart = pLoop->aLTerm[j++];
+ nExtraReg = 1;
+ /* Like optimization range constraints always occur in pairs */
+ assert( (pRangeStart->wtFlags & TERM_LIKEOPT)==0 ||
+ (pLoop->wsFlags & WHERE_TOP_LIMIT)!=0 );
+ }
+ if( pLoop->wsFlags & WHERE_TOP_LIMIT ){
+ pRangeEnd = pLoop->aLTerm[j++];
+ nExtraReg = 1;
+ if( (pRangeEnd->wtFlags & TERM_LIKEOPT)!=0 ){
+ assert( pRangeStart!=0 ); /* LIKE opt constraints */
+ assert( pRangeStart->wtFlags & TERM_LIKEOPT ); /* occur in pairs */
+ pLevel->iLikeRepCntr = ++pParse->nMem;
+ testcase( bRev );
+ testcase( pIdx->aSortOrder[nEq]==SQLITE_SO_DESC );
+ sqlite3VdbeAddOp2(v, OP_Integer,
+ bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC),
+ pLevel->iLikeRepCntr);
+ VdbeComment((v, "LIKE loop counter"));
+ pLevel->addrLikeRep = sqlite3VdbeCurrentAddr(v);
+ }
+ if( pRangeStart==0
+ && (j = pIdx->aiColumn[nEq])>=0
+ && pIdx->pTable->aCol[j].notNull==0
+ ){
+ bSeekPastNull = 1;
+ }
+ }
+ assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
+
+ /* Generate code to evaluate all constraint terms using == or IN
+ ** and store the values of those terms in an array of registers
+ ** starting at regBase.
+ */
+ regBase = codeAllEqualityTerms(pParse,pLevel,bRev,nExtraReg,&zStartAff);
+ assert( zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq );
+ if( zStartAff ) cEndAff = zStartAff[nEq];
+ addrNxt = pLevel->addrNxt;
+
+ /* If we are doing a reverse order scan on an ascending index, or
+ ** a forward order scan on a descending index, interchange the
+ ** start and end terms (pRangeStart and pRangeEnd).
+ */
+ if( (nEq<pIdx->nKeyCol && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC))
+ || (bRev && pIdx->nKeyCol==nEq)
+ ){
+ SWAP(WhereTerm *, pRangeEnd, pRangeStart);
+ SWAP(u8, bSeekPastNull, bStopAtNull);
+ }
+
+ testcase( pRangeStart && (pRangeStart->eOperator & WO_LE)!=0 );
+ testcase( pRangeStart && (pRangeStart->eOperator & WO_GE)!=0 );
+ testcase( pRangeEnd && (pRangeEnd->eOperator & WO_LE)!=0 );
+ testcase( pRangeEnd && (pRangeEnd->eOperator & WO_GE)!=0 );
+ startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);
+ endEq = !pRangeEnd || pRangeEnd->eOperator & (WO_LE|WO_GE);
+ start_constraints = pRangeStart || nEq>0;
+
+ /* Seek the index cursor to the start of the range. */
+ nConstraint = nEq;
+ if( pRangeStart ){
+ Expr *pRight = pRangeStart->pExpr->pRight;
+ sqlite3ExprCode(pParse, pRight, regBase+nEq);
+ whereLikeOptimizationStringFixup(v, pLevel, pRangeStart);
+ if( (pRangeStart->wtFlags & TERM_VNULL)==0
+ && sqlite3ExprCanBeNull(pRight)
+ ){
+ sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
+ VdbeCoverage(v);
+ }
+ if( zStartAff ){
+ if( sqlite3CompareAffinity(pRight, zStartAff[nEq])==SQLITE_AFF_BLOB){
+ /* Since the comparison is to be performed with no conversions
+ ** applied to the operands, set the affinity to apply to pRight to
+ ** SQLITE_AFF_BLOB. */
+ zStartAff[nEq] = SQLITE_AFF_BLOB;
+ }
+ if( sqlite3ExprNeedsNoAffinityChange(pRight, zStartAff[nEq]) ){
+ zStartAff[nEq] = SQLITE_AFF_BLOB;
+ }
+ }
+ nConstraint++;
+ testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
+ }else if( bSeekPastNull ){
+ sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
+ nConstraint++;
+ startEq = 0;
+ start_constraints = 1;
+ }
+ codeApplyAffinity(pParse, regBase, nConstraint - bSeekPastNull, zStartAff);
+ op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev];
+ assert( op!=0 );
+ sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);
+ VdbeCoverage(v);
+ VdbeCoverageIf(v, op==OP_Rewind); testcase( op==OP_Rewind );
+ VdbeCoverageIf(v, op==OP_Last); testcase( op==OP_Last );
+ VdbeCoverageIf(v, op==OP_SeekGT); testcase( op==OP_SeekGT );
+ VdbeCoverageIf(v, op==OP_SeekGE); testcase( op==OP_SeekGE );
+ VdbeCoverageIf(v, op==OP_SeekLE); testcase( op==OP_SeekLE );
+ VdbeCoverageIf(v, op==OP_SeekLT); testcase( op==OP_SeekLT );
+
+ /* Load the value for the inequality constraint at the end of the
+ ** range (if any).
+ */
+ nConstraint = nEq;
+ if( pRangeEnd ){
+ Expr *pRight = pRangeEnd->pExpr->pRight;
+ sqlite3ExprCacheRemove(pParse, regBase+nEq, 1);
+ sqlite3ExprCode(pParse, pRight, regBase+nEq);
+ whereLikeOptimizationStringFixup(v, pLevel, pRangeEnd);
+ if( (pRangeEnd->wtFlags & TERM_VNULL)==0
+ && sqlite3ExprCanBeNull(pRight)
+ ){
+ sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
+ VdbeCoverage(v);
+ }
+ if( sqlite3CompareAffinity(pRight, cEndAff)!=SQLITE_AFF_BLOB
+ && !sqlite3ExprNeedsNoAffinityChange(pRight, cEndAff)
+ ){
+ codeApplyAffinity(pParse, regBase+nEq, 1, &cEndAff);
+ }
+ nConstraint++;
+ testcase( pRangeEnd->wtFlags & TERM_VIRTUAL );
+ }else if( bStopAtNull ){
+ sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
+ endEq = 0;
+ nConstraint++;
+ }
+ sqlite3DbFree(db, zStartAff);
+
+ /* Top of the loop body */
+ pLevel->p2 = sqlite3VdbeCurrentAddr(v);
+
+ /* Check if the index cursor is past the end of the range. */
+ if( nConstraint ){
+ op = aEndOp[bRev*2 + endEq];
+ sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);
+ testcase( op==OP_IdxGT ); VdbeCoverageIf(v, op==OP_IdxGT );
+ testcase( op==OP_IdxGE ); VdbeCoverageIf(v, op==OP_IdxGE );
+ testcase( op==OP_IdxLT ); VdbeCoverageIf(v, op==OP_IdxLT );
+ testcase( op==OP_IdxLE ); VdbeCoverageIf(v, op==OP_IdxLE );
+ }
+
+ /* Seek the table cursor, if required */
+ disableTerm(pLevel, pRangeStart);
+ disableTerm(pLevel, pRangeEnd);
+ if( omitTable ){
+ /* pIdx is a covering index. No need to access the main table. */
+ }else if( HasRowid(pIdx->pTable) ){
+ iRowidReg = ++pParse->nMem;
+ sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, iRowidReg);
+ sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
+ if( pWInfo->eOnePass!=ONEPASS_OFF ){
+ sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, iRowidReg);
+ VdbeCoverage(v);
+ }else{
+ sqlite3VdbeAddOp2(v, OP_Seek, iCur, iRowidReg); /* Deferred seek */
+ }
+ }else if( iCur!=iIdxCur ){
+ Index *pPk = sqlite3PrimaryKeyIndex(pIdx->pTable);
+ iRowidReg = sqlite3GetTempRange(pParse, pPk->nKeyCol);
+ for(j=0; j<pPk->nKeyCol; j++){
+ k = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[j]);
+ sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, iRowidReg+j);
+ }
+ sqlite3VdbeAddOp4Int(v, OP_NotFound, iCur, addrCont,
+ iRowidReg, pPk->nKeyCol); VdbeCoverage(v);
+ }
+
+ /* Record the instruction used to terminate the loop. Disable
+ ** WHERE clause terms made redundant by the index range scan.
+ */
+ if( pLoop->wsFlags & WHERE_ONEROW ){
+ pLevel->op = OP_Noop;
+ }else if( bRev ){
+ pLevel->op = OP_Prev;
+ }else{
+ pLevel->op = OP_Next;
+ }
+ pLevel->p1 = iIdxCur;
+ pLevel->p3 = (pLoop->wsFlags&WHERE_UNQ_WANTED)!=0 ? 1:0;
+ if( (pLoop->wsFlags & WHERE_CONSTRAINT)==0 ){
+ pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
+ }else{
+ assert( pLevel->p5==0 );
+ }
+ }else
+
+#ifndef SQLITE_OMIT_OR_OPTIMIZATION
+ if( pLoop->wsFlags & WHERE_MULTI_OR ){
+ /* Case 5: Two or more separately indexed terms connected by OR
+ **
+ ** Example:
+ **
+ ** CREATE TABLE t1(a,b,c,d);
+ ** CREATE INDEX i1 ON t1(a);
+ ** CREATE INDEX i2 ON t1(b);
+ ** CREATE INDEX i3 ON t1(c);
+ **
+ ** SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13)
+ **
+ ** In the example, there are three indexed terms connected by OR.
+ ** The top of the loop looks like this:
+ **
+ ** Null 1 # Zero the rowset in reg 1
+ **
+ ** Then, for each indexed term, the following. The arguments to
+ ** RowSetTest are such that the rowid of the current row is inserted
+ ** into the RowSet. If it is already present, control skips the
+ ** Gosub opcode and jumps straight to the code generated by WhereEnd().
+ **
+ ** sqlite3WhereBegin(<term>)
+ ** RowSetTest # Insert rowid into rowset
+ ** Gosub 2 A
+ ** sqlite3WhereEnd()
+ **
+ ** Following the above, code to terminate the loop. Label A, the target
+ ** of the Gosub above, jumps to the instruction right after the Goto.
+ **
+ ** Null 1 # Zero the rowset in reg 1
+ ** Goto B # The loop is finished.
+ **
+ ** A: <loop body> # Return data, whatever.
+ **
+ ** Return 2 # Jump back to the Gosub
+ **
+ ** B: <after the loop>
+ **
+ ** Added 2014-05-26: If the table is a WITHOUT ROWID table, then
+ ** use an ephemeral index instead of a RowSet to record the primary
+ ** keys of the rows we have already seen.
+ **
+ */
+ WhereClause *pOrWc; /* The OR-clause broken out into subterms */
+ SrcList *pOrTab; /* Shortened table list or OR-clause generation */
+ Index *pCov = 0; /* Potential covering index (or NULL) */
+ int iCovCur = pParse->nTab++; /* Cursor used for index scans (if any) */
+
+ int regReturn = ++pParse->nMem; /* Register used with OP_Gosub */
+ int regRowset = 0; /* Register for RowSet object */
+ int regRowid = 0; /* Register holding rowid */
+ int iLoopBody = sqlite3VdbeMakeLabel(v); /* Start of loop body */
+ int iRetInit; /* Address of regReturn init */
+ int untestedTerms = 0; /* Some terms not completely tested */
+ int ii; /* Loop counter */
+ u16 wctrlFlags; /* Flags for sub-WHERE clause */
+ Expr *pAndExpr = 0; /* An ".. AND (...)" expression */
+ Table *pTab = pTabItem->pTab;
+
+ pTerm = pLoop->aLTerm[0];
+ assert( pTerm!=0 );
+ assert( pTerm->eOperator & WO_OR );
+ assert( (pTerm->wtFlags & TERM_ORINFO)!=0 );
+ pOrWc = &pTerm->u.pOrInfo->wc;
+ pLevel->op = OP_Return;
+ pLevel->p1 = regReturn;
+
+ /* Set up a new SrcList in pOrTab containing the table being scanned
+ ** by this loop in the a[0] slot and all notReady tables in a[1..] slots.
+ ** This becomes the SrcList in the recursive call to sqlite3WhereBegin().
+ */
+ if( pWInfo->nLevel>1 ){
+ int nNotReady; /* The number of notReady tables */
+ struct SrcList_item *origSrc; /* Original list of tables */
+ nNotReady = pWInfo->nLevel - iLevel - 1;
+ pOrTab = sqlite3StackAllocRaw(db,
+ sizeof(*pOrTab)+ nNotReady*sizeof(pOrTab->a[0]));
+ if( pOrTab==0 ) return notReady;
+ pOrTab->nAlloc = (u8)(nNotReady + 1);
+ pOrTab->nSrc = pOrTab->nAlloc;
+ memcpy(pOrTab->a, pTabItem, sizeof(*pTabItem));
+ origSrc = pWInfo->pTabList->a;
+ for(k=1; k<=nNotReady; k++){
+ memcpy(&pOrTab->a[k], &origSrc[pLevel[k].iFrom], sizeof(pOrTab->a[k]));
+ }
+ }else{
+ pOrTab = pWInfo->pTabList;
+ }
+
+ /* Initialize the rowset register to contain NULL. An SQL NULL is
+ ** equivalent to an empty rowset. Or, create an ephemeral index
+ ** capable of holding primary keys in the case of a WITHOUT ROWID.
+ **
+ ** Also initialize regReturn to contain the address of the instruction
+ ** immediately following the OP_Return at the bottom of the loop. This
+ ** is required in a few obscure LEFT JOIN cases where control jumps
+ ** over the top of the loop into the body of it. In this case the
+ ** correct response for the end-of-loop code (the OP_Return) is to
+ ** fall through to the next instruction, just as an OP_Next does if
+ ** called on an uninitialized cursor.
+ */
+ if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
+ if( HasRowid(pTab) ){
+ regRowset = ++pParse->nMem;
+ sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset);
+ }else{
+ Index *pPk = sqlite3PrimaryKeyIndex(pTab);
+ regRowset = pParse->nTab++;
+ sqlite3VdbeAddOp2(v, OP_OpenEphemeral, regRowset, pPk->nKeyCol);
+ sqlite3VdbeSetP4KeyInfo(pParse, pPk);
+ }
+ regRowid = ++pParse->nMem;
+ }
+ iRetInit = sqlite3VdbeAddOp2(v, OP_Integer, 0, regReturn);
+
+ /* If the original WHERE clause is z of the form: (x1 OR x2 OR ...) AND y
+ ** Then for every term xN, evaluate as the subexpression: xN AND z
+ ** That way, terms in y that are factored into the disjunction will
+ ** be picked up by the recursive calls to sqlite3WhereBegin() below.
+ **
+ ** Actually, each subexpression is converted to "xN AND w" where w is
+ ** the "interesting" terms of z - terms that did not originate in the
+ ** ON or USING clause of a LEFT JOIN, and terms that are usable as
+ ** indices.
+ **
+ ** This optimization also only applies if the (x1 OR x2 OR ...) term
+ ** is not contained in the ON clause of a LEFT JOIN.
+ ** See ticket http://www.sqlite.org/src/info/f2369304e4
+ */
+ if( pWC->nTerm>1 ){
+ int iTerm;
+ for(iTerm=0; iTerm<pWC->nTerm; iTerm++){
+ Expr *pExpr = pWC->a[iTerm].pExpr;
+ if( &pWC->a[iTerm] == pTerm ) continue;
+ if( ExprHasProperty(pExpr, EP_FromJoin) ) continue;
+ if( (pWC->a[iTerm].wtFlags & TERM_VIRTUAL)!=0 ) continue;
+ if( (pWC->a[iTerm].eOperator & WO_ALL)==0 ) continue;
+ testcase( pWC->a[iTerm].wtFlags & TERM_ORINFO );
+ pExpr = sqlite3ExprDup(db, pExpr, 0);
+ pAndExpr = sqlite3ExprAnd(db, pAndExpr, pExpr);
+ }
+ if( pAndExpr ){
+ pAndExpr = sqlite3PExpr(pParse, TK_AND, 0, pAndExpr, 0);
+ }
+ }
+
+ /* Run a separate WHERE clause for each term of the OR clause. After
+ ** eliminating duplicates from other WHERE clauses, the action for each
+ ** sub-WHERE clause is to to invoke the main loop body as a subroutine.
+ */
+ wctrlFlags = WHERE_OMIT_OPEN_CLOSE
+ | WHERE_FORCE_TABLE
+ | WHERE_ONETABLE_ONLY
+ | WHERE_NO_AUTOINDEX;
+ for(ii=0; ii<pOrWc->nTerm; ii++){
+ WhereTerm *pOrTerm = &pOrWc->a[ii];
+ if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
+ WhereInfo *pSubWInfo; /* Info for single OR-term scan */
+ Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */
+ int jmp1 = 0; /* Address of jump operation */
+ if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
+ pAndExpr->pLeft = pOrExpr;
+ pOrExpr = pAndExpr;
+ }
+ /* Loop through table entries that match term pOrTerm. */
+ WHERETRACE(0xffff, ("Subplan for OR-clause:\n"));
+ pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0,
+ wctrlFlags, iCovCur);
+ assert( pSubWInfo || pParse->nErr || db->mallocFailed );
+ if( pSubWInfo ){
+ WhereLoop *pSubLoop;
+ int addrExplain = sqlite3WhereExplainOneScan(
+ pParse, pOrTab, &pSubWInfo->a[0], iLevel, pLevel->iFrom, 0
+ );
+ sqlite3WhereAddScanStatus(v, pOrTab, &pSubWInfo->a[0], addrExplain);
+
+ /* This is the sub-WHERE clause body. First skip over
+ ** duplicate rows from prior sub-WHERE clauses, and record the
+ ** rowid (or PRIMARY KEY) for the current row so that the same
+ ** row will be skipped in subsequent sub-WHERE clauses.
+ */
+ if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
+ int r;
+ int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
+ if( HasRowid(pTab) ){
+ r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
+ jmp1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0,
+ r,iSet);
+ VdbeCoverage(v);
+ }else{
+ Index *pPk = sqlite3PrimaryKeyIndex(pTab);
+ int nPk = pPk->nKeyCol;
+ int iPk;
+
+ /* Read the PK into an array of temp registers. */
+ r = sqlite3GetTempRange(pParse, nPk);
+ for(iPk=0; iPk<nPk; iPk++){
+ int iCol = pPk->aiColumn[iPk];
+ int rx;
+ rx = sqlite3ExprCodeGetColumn(pParse, pTab, iCol, iCur,r+iPk,0);
+ if( rx!=r+iPk ){
+ sqlite3VdbeAddOp2(v, OP_SCopy, rx, r+iPk);
+ }
+ }
+
+ /* Check if the temp table already contains this key. If so,
+ ** the row has already been included in the result set and
+ ** can be ignored (by jumping past the Gosub below). Otherwise,
+ ** insert the key into the temp table and proceed with processing
+ ** the row.
+ **
+ ** Use some of the same optimizations as OP_RowSetTest: If iSet
+ ** is zero, assume that the key cannot already be present in
+ ** the temp table. And if iSet is -1, assume that there is no
+ ** need to insert the key into the temp table, as it will never
+ ** be tested for. */
+ if( iSet ){
+ jmp1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
+ VdbeCoverage(v);
+ }
+ if( iSet>=0 ){
+ sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);
+ sqlite3VdbeAddOp3(v, OP_IdxInsert, regRowset, regRowid, 0);
+ if( iSet ) sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
+ }
+
+ /* Release the array of temp registers */
+ sqlite3ReleaseTempRange(pParse, r, nPk);
+ }
+ }
+
+ /* Invoke the main loop body as a subroutine */
+ sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
+
+ /* Jump here (skipping the main loop body subroutine) if the
+ ** current sub-WHERE row is a duplicate from prior sub-WHEREs. */
+ if( jmp1 ) sqlite3VdbeJumpHere(v, jmp1);
+
+ /* The pSubWInfo->untestedTerms flag means that this OR term
+ ** contained one or more AND term from a notReady table. The
+ ** terms from the notReady table could not be tested and will
+ ** need to be tested later.
+ */
+ if( pSubWInfo->untestedTerms ) untestedTerms = 1;
+
+ /* If all of the OR-connected terms are optimized using the same
+ ** index, and the index is opened using the same cursor number
+ ** by each call to sqlite3WhereBegin() made by this loop, it may
+ ** be possible to use that index as a covering index.
+ **
+ ** If the call to sqlite3WhereBegin() above resulted in a scan that
+ ** uses an index, and this is either the first OR-connected term
+ ** processed or the index is the same as that used by all previous
+ ** terms, set pCov to the candidate covering index. Otherwise, set
+ ** pCov to NULL to indicate that no candidate covering index will
+ ** be available.
+ */
+ pSubLoop = pSubWInfo->a[0].pWLoop;
+ assert( (pSubLoop->wsFlags & WHERE_AUTO_INDEX)==0 );
+ if( (pSubLoop->wsFlags & WHERE_INDEXED)!=0
+ && (ii==0 || pSubLoop->u.btree.pIndex==pCov)
+ && (HasRowid(pTab) || !IsPrimaryKeyIndex(pSubLoop->u.btree.pIndex))
+ ){
+ assert( pSubWInfo->a[0].iIdxCur==iCovCur );
+ pCov = pSubLoop->u.btree.pIndex;
+ wctrlFlags |= WHERE_REOPEN_IDX;
+ }else{
+ pCov = 0;
+ }
+
+ /* Finish the loop through table entries that match term pOrTerm. */
+ sqlite3WhereEnd(pSubWInfo);
+ }
+ }
+ }
+ pLevel->u.pCovidx = pCov;
+ if( pCov ) pLevel->iIdxCur = iCovCur;
+ if( pAndExpr ){
+ pAndExpr->pLeft = 0;
+ sqlite3ExprDelete(db, pAndExpr);
+ }
+ sqlite3VdbeChangeP1(v, iRetInit, sqlite3VdbeCurrentAddr(v));
+ sqlite3VdbeGoto(v, pLevel->addrBrk);
+ sqlite3VdbeResolveLabel(v, iLoopBody);
+
+ if( pWInfo->nLevel>1 ) sqlite3StackFree(db, pOrTab);
+ if( !untestedTerms ) disableTerm(pLevel, pTerm);
+ }else
+#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
+
+ {
+ /* Case 6: There is no usable index. We must do a complete
+ ** scan of the entire table.
+ */
+ static const u8 aStep[] = { OP_Next, OP_Prev };
+ static const u8 aStart[] = { OP_Rewind, OP_Last };
+ assert( bRev==0 || bRev==1 );
+ if( pTabItem->fg.isRecursive ){
+ /* Tables marked isRecursive have only a single row that is stored in
+ ** a pseudo-cursor. No need to Rewind or Next such cursors. */
+ pLevel->op = OP_Noop;
+ }else{
+ pLevel->op = aStep[bRev];
+ pLevel->p1 = iCur;
+ pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk);
+ VdbeCoverageIf(v, bRev==0);
+ VdbeCoverageIf(v, bRev!=0);
+ pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
+ }
+ }
+
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+ pLevel->addrVisit = sqlite3VdbeCurrentAddr(v);
+#endif
+
+ /* Insert code to test every subexpression that can be completely
+ ** computed using the current set of tables.
+ */
+ for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
+ Expr *pE;
+ int skipLikeAddr = 0;
+ testcase( pTerm->wtFlags & TERM_VIRTUAL );
+ testcase( pTerm->wtFlags & TERM_CODED );
+ if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
+ if( (pTerm->prereqAll & pLevel->notReady)!=0 ){
+ testcase( pWInfo->untestedTerms==0
+ && (pWInfo->wctrlFlags & WHERE_ONETABLE_ONLY)!=0 );
+ pWInfo->untestedTerms = 1;
+ continue;
+ }
+ pE = pTerm->pExpr;
+ assert( pE!=0 );
+ if( pLevel->iLeftJoin && !ExprHasProperty(pE, EP_FromJoin) ){
+ continue;
+ }
+ if( pTerm->wtFlags & TERM_LIKECOND ){
+ assert( pLevel->iLikeRepCntr>0 );
+ skipLikeAddr = sqlite3VdbeAddOp1(v, OP_IfNot, pLevel->iLikeRepCntr);
+ VdbeCoverage(v);
+ }
+ sqlite3ExprIfFalse(pParse, pE, addrCont, SQLITE_JUMPIFNULL);
+ if( skipLikeAddr ) sqlite3VdbeJumpHere(v, skipLikeAddr);
+ pTerm->wtFlags |= TERM_CODED;
+ }
+
+ /* Insert code to test for implied constraints based on transitivity
+ ** of the "==" operator.
+ **
+ ** Example: If the WHERE clause contains "t1.a=t2.b" and "t2.b=123"
+ ** and we are coding the t1 loop and the t2 loop has not yet coded,
+ ** then we cannot use the "t1.a=t2.b" constraint, but we can code
+ ** the implied "t1.a=123" constraint.
+ */
+ for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
+ Expr *pE, *pEAlt;
+ WhereTerm *pAlt;
+ if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
+ if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) continue;
+ if( (pTerm->eOperator & WO_EQUIV)==0 ) continue;
+ if( pTerm->leftCursor!=iCur ) continue;
+ if( pLevel->iLeftJoin ) continue;
+ pE = pTerm->pExpr;
+ assert( !ExprHasProperty(pE, EP_FromJoin) );
+ assert( (pTerm->prereqRight & pLevel->notReady)!=0 );
+ pAlt = sqlite3WhereFindTerm(pWC, iCur, pTerm->u.leftColumn, notReady,
+ WO_EQ|WO_IN|WO_IS, 0);
+ if( pAlt==0 ) continue;
+ if( pAlt->wtFlags & (TERM_CODED) ) continue;
+ testcase( pAlt->eOperator & WO_EQ );
+ testcase( pAlt->eOperator & WO_IS );
+ testcase( pAlt->eOperator & WO_IN );
+ VdbeModuleComment((v, "begin transitive constraint"));
+ pEAlt = sqlite3StackAllocRaw(db, sizeof(*pEAlt));
+ if( pEAlt ){
+ *pEAlt = *pAlt->pExpr;
+ pEAlt->pLeft = pE->pLeft;
+ sqlite3ExprIfFalse(pParse, pEAlt, addrCont, SQLITE_JUMPIFNULL);
+ sqlite3StackFree(db, pEAlt);
+ }
+ }
+
+ /* For a LEFT OUTER JOIN, generate code that will record the fact that
+ ** at least one row of the right table has matched the left table.
+ */
+ if( pLevel->iLeftJoin ){
+ pLevel->addrFirst = sqlite3VdbeCurrentAddr(v);
+ sqlite3VdbeAddOp2(v, OP_Integer, 1, pLevel->iLeftJoin);
+ VdbeComment((v, "record LEFT JOIN hit"));
+ sqlite3ExprCacheClear(pParse);
+ for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
+ testcase( pTerm->wtFlags & TERM_VIRTUAL );
+ testcase( pTerm->wtFlags & TERM_CODED );
+ if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
+ if( (pTerm->prereqAll & pLevel->notReady)!=0 ){
+ assert( pWInfo->untestedTerms );
+ continue;
+ }
+ assert( pTerm->pExpr );
+ sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL);
+ pTerm->wtFlags |= TERM_CODED;
+ }
+ }
+
+ return pLevel->notReady;
+}
+
+/************** End of wherecode.c *******************************************/
+/************** Begin file whereexpr.c ***************************************/
+/*
+** 2015-06-08
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This module contains C code that generates VDBE code used to process
+** the WHERE clause of SQL statements.
+**
+** This file was originally part of where.c but was split out to improve
+** readability and editabiliity. This file contains utility routines for
+** analyzing Expr objects in the WHERE clause.
+*/
+/* #include "sqliteInt.h" */
+/* #include "whereInt.h" */
+
+/* Forward declarations */
+static void exprAnalyze(SrcList*, WhereClause*, int);
/*
** Deallocate all memory associated with a WhereOrInfo object.
*/
static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
- whereClauseClear(&p->wc);
+ sqlite3WhereClauseClear(&p->wc);
sqlite3DbFree(db, p);
}
@@ -116330,34 +120069,11 @@ static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
** Deallocate all memory associated with a WhereAndInfo object.
*/
static void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){
- whereClauseClear(&p->wc);
+ sqlite3WhereClauseClear(&p->wc);
sqlite3DbFree(db, p);
}
/*
-** Deallocate a WhereClause structure. The WhereClause structure
-** itself is not freed. This routine is the inverse of whereClauseInit().
-*/
-static void whereClauseClear(WhereClause *pWC){
- int i;
- WhereTerm *a;
- sqlite3 *db = pWC->pWInfo->pParse->db;
- for(i=pWC->nTerm-1, a=pWC->a; i>=0; i--, a++){
- if( a->wtFlags & TERM_DYNAMIC ){
- sqlite3ExprDelete(db, a->pExpr);
- }
- if( a->wtFlags & TERM_ORINFO ){
- whereOrInfoDelete(db, a->u.pOrInfo);
- }else if( a->wtFlags & TERM_ANDINFO ){
- whereAndInfoDelete(db, a->u.pAndInfo);
- }
- }
- if( pWC->a!=pWC->aStatic ){
- sqlite3DbFree(db, pWC->a);
- }
-}
-
-/*
** Add a single new WhereTerm entry to the WhereClause object pWC.
** The new WhereTerm object is constructed from Expr p and with wtFlags.
** The index in pWC->a[] of the new WhereTerm is returned on success.
@@ -116412,122 +120128,6 @@ static int whereClauseInsert(WhereClause *pWC, Expr *p, u16 wtFlags){
}
/*
-** This routine identifies subexpressions in the WHERE clause where
-** each subexpression is separated by the AND operator or some other
-** operator specified in the op parameter. The WhereClause structure
-** is filled with pointers to subexpressions. For example:
-**
-** WHERE a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)
-** \________/ \_______________/ \________________/
-** slot[0] slot[1] slot[2]
-**
-** The original WHERE clause in pExpr is unaltered. All this routine
-** does is make slot[] entries point to substructure within pExpr.
-**
-** In the previous sentence and in the diagram, "slot[]" refers to
-** the WhereClause.a[] array. The slot[] array grows as needed to contain
-** all terms of the WHERE clause.
-*/
-static void whereSplit(WhereClause *pWC, Expr *pExpr, u8 op){
- Expr *pE2 = sqlite3ExprSkipCollate(pExpr);
- pWC->op = op;
- if( pE2==0 ) return;
- if( pE2->op!=op ){
- whereClauseInsert(pWC, pExpr, 0);
- }else{
- whereSplit(pWC, pE2->pLeft, op);
- whereSplit(pWC, pE2->pRight, op);
- }
-}
-
-/*
-** Initialize a WhereMaskSet object
-*/
-#define initMaskSet(P) (P)->n=0
-
-/*
-** Return the bitmask for the given cursor number. Return 0 if
-** iCursor is not in the set.
-*/
-static Bitmask getMask(WhereMaskSet *pMaskSet, int iCursor){
- int i;
- assert( pMaskSet->n<=(int)sizeof(Bitmask)*8 );
- for(i=0; i<pMaskSet->n; i++){
- if( pMaskSet->ix[i]==iCursor ){
- return MASKBIT(i);
- }
- }
- return 0;
-}
-
-/*
-** Create a new mask for cursor iCursor.
-**
-** There is one cursor per table in the FROM clause. The number of
-** tables in the FROM clause is limited by a test early in the
-** sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[]
-** array will never overflow.
-*/
-static void createMask(WhereMaskSet *pMaskSet, int iCursor){
- assert( pMaskSet->n < ArraySize(pMaskSet->ix) );
- pMaskSet->ix[pMaskSet->n++] = iCursor;
-}
-
-/*
-** These routines walk (recursively) an expression tree and generate
-** a bitmask indicating which tables are used in that expression
-** tree.
-*/
-static Bitmask exprListTableUsage(WhereMaskSet*, ExprList*);
-static Bitmask exprSelectTableUsage(WhereMaskSet*, Select*);
-static Bitmask exprTableUsage(WhereMaskSet *pMaskSet, Expr *p){
- Bitmask mask = 0;
- if( p==0 ) return 0;
- if( p->op==TK_COLUMN ){
- mask = getMask(pMaskSet, p->iTable);
- return mask;
- }
- mask = exprTableUsage(pMaskSet, p->pRight);
- mask |= exprTableUsage(pMaskSet, p->pLeft);
- if( ExprHasProperty(p, EP_xIsSelect) ){
- mask |= exprSelectTableUsage(pMaskSet, p->x.pSelect);
- }else{
- mask |= exprListTableUsage(pMaskSet, p->x.pList);
- }
- return mask;
-}
-static Bitmask exprListTableUsage(WhereMaskSet *pMaskSet, ExprList *pList){
- int i;
- Bitmask mask = 0;
- if( pList ){
- for(i=0; i<pList->nExpr; i++){
- mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
- }
- }
- return mask;
-}
-static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
- Bitmask mask = 0;
- while( pS ){
- SrcList *pSrc = pS->pSrc;
- mask |= exprListTableUsage(pMaskSet, pS->pEList);
- mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
- mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
- mask |= exprTableUsage(pMaskSet, pS->pWhere);
- mask |= exprTableUsage(pMaskSet, pS->pHaving);
- if( ALWAYS(pSrc!=0) ){
- int i;
- for(i=0; i<pSrc->nSrc; i++){
- mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect);
- mask |= exprTableUsage(pMaskSet, pSrc->a[i].pOn);
- }
- }
- pS = pS->pPrior;
- }
- return mask;
-}
-
-/*
** Return TRUE if the given operator is one of the operators that is
** allowed for an indexable WHERE clause term. The allowed operators are
** "=", "<", ">", "<=", ">=", "IN", and "IS NULL"
@@ -116537,7 +120137,7 @@ static int allowedOp(int op){
assert( TK_LT>TK_EQ && TK_LT<TK_GE );
assert( TK_LE>TK_EQ && TK_LE<TK_GE );
assert( TK_GE==TK_EQ+4 );
- return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL;
+ return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL || op==TK_IS;
}
/*
@@ -116590,6 +120190,8 @@ static u16 operatorMask(int op){
c = WO_IN;
}else if( op==TK_ISNULL ){
c = WO_ISNULL;
+ }else if( op==TK_IS ){
+ c = WO_IS;
}else{
assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
c = (u16)(WO_EQ<<(op-TK_EQ));
@@ -116601,199 +120203,10 @@ static u16 operatorMask(int op){
assert( op!=TK_LE || c==WO_LE );
assert( op!=TK_GT || c==WO_GT );
assert( op!=TK_GE || c==WO_GE );
+ assert( op!=TK_IS || c==WO_IS );
return c;
}
-/*
-** Advance to the next WhereTerm that matches according to the criteria
-** established when the pScan object was initialized by whereScanInit().
-** Return NULL if there are no more matching WhereTerms.
-*/
-static WhereTerm *whereScanNext(WhereScan *pScan){
- int iCur; /* The cursor on the LHS of the term */
- int iColumn; /* The column on the LHS of the term. -1 for IPK */
- Expr *pX; /* An expression being tested */
- WhereClause *pWC; /* Shorthand for pScan->pWC */
- WhereTerm *pTerm; /* The term being tested */
- int k = pScan->k; /* Where to start scanning */
-
- while( pScan->iEquiv<=pScan->nEquiv ){
- iCur = pScan->aEquiv[pScan->iEquiv-2];
- iColumn = pScan->aEquiv[pScan->iEquiv-1];
- while( (pWC = pScan->pWC)!=0 ){
- for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
- if( pTerm->leftCursor==iCur
- && pTerm->u.leftColumn==iColumn
- && (pScan->iEquiv<=2 || !ExprHasProperty(pTerm->pExpr, EP_FromJoin))
- ){
- if( (pTerm->eOperator & WO_EQUIV)!=0
- && pScan->nEquiv<ArraySize(pScan->aEquiv)
- ){
- int j;
- pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight);
- assert( pX->op==TK_COLUMN );
- for(j=0; j<pScan->nEquiv; j+=2){
- if( pScan->aEquiv[j]==pX->iTable
- && pScan->aEquiv[j+1]==pX->iColumn ){
- break;
- }
- }
- if( j==pScan->nEquiv ){
- pScan->aEquiv[j] = pX->iTable;
- pScan->aEquiv[j+1] = pX->iColumn;
- pScan->nEquiv += 2;
- }
- }
- if( (pTerm->eOperator & pScan->opMask)!=0 ){
- /* Verify the affinity and collating sequence match */
- if( pScan->zCollName && (pTerm->eOperator & WO_ISNULL)==0 ){
- CollSeq *pColl;
- Parse *pParse = pWC->pWInfo->pParse;
- pX = pTerm->pExpr;
- if( !sqlite3IndexAffinityOk(pX, pScan->idxaff) ){
- continue;
- }
- assert(pX->pLeft);
- pColl = sqlite3BinaryCompareCollSeq(pParse,
- pX->pLeft, pX->pRight);
- if( pColl==0 ) pColl = pParse->db->pDfltColl;
- if( sqlite3StrICmp(pColl->zName, pScan->zCollName) ){
- continue;
- }
- }
- if( (pTerm->eOperator & WO_EQ)!=0
- && (pX = pTerm->pExpr->pRight)->op==TK_COLUMN
- && pX->iTable==pScan->aEquiv[0]
- && pX->iColumn==pScan->aEquiv[1]
- ){
- continue;
- }
- pScan->k = k+1;
- return pTerm;
- }
- }
- }
- pScan->pWC = pScan->pWC->pOuter;
- k = 0;
- }
- pScan->pWC = pScan->pOrigWC;
- k = 0;
- pScan->iEquiv += 2;
- }
- return 0;
-}
-
-/*
-** Initialize a WHERE clause scanner object. Return a pointer to the
-** first match. Return NULL if there are no matches.
-**
-** The scanner will be searching the WHERE clause pWC. It will look
-** for terms of the form "X <op> <expr>" where X is column iColumn of table
-** iCur. The <op> must be one of the operators described by opMask.
-**
-** If the search is for X and the WHERE clause contains terms of the
-** form X=Y then this routine might also return terms of the form
-** "Y <op> <expr>". The number of levels of transitivity is limited,
-** but is enough to handle most commonly occurring SQL statements.
-**
-** If X is not the INTEGER PRIMARY KEY then X must be compatible with
-** index pIdx.
-*/
-static WhereTerm *whereScanInit(
- WhereScan *pScan, /* The WhereScan object being initialized */
- WhereClause *pWC, /* The WHERE clause to be scanned */
- int iCur, /* Cursor to scan for */
- int iColumn, /* Column to scan for */
- u32 opMask, /* Operator(s) to scan for */
- Index *pIdx /* Must be compatible with this index */
-){
- int j;
-
- /* memset(pScan, 0, sizeof(*pScan)); */
- pScan->pOrigWC = pWC;
- pScan->pWC = pWC;
- if( pIdx && iColumn>=0 ){
- pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
- for(j=0; pIdx->aiColumn[j]!=iColumn; j++){
- if( NEVER(j>pIdx->nColumn) ) return 0;
- }
- pScan->zCollName = pIdx->azColl[j];
- }else{
- pScan->idxaff = 0;
- pScan->zCollName = 0;
- }
- pScan->opMask = opMask;
- pScan->k = 0;
- pScan->aEquiv[0] = iCur;
- pScan->aEquiv[1] = iColumn;
- pScan->nEquiv = 2;
- pScan->iEquiv = 2;
- return whereScanNext(pScan);
-}
-
-/*
-** Search for a term in the WHERE clause that is of the form "X <op> <expr>"
-** where X is a reference to the iColumn of table iCur and <op> is one of
-** the WO_xx operator codes specified by the op parameter.
-** Return a pointer to the term. Return 0 if not found.
-**
-** The term returned might by Y=<expr> if there is another constraint in
-** the WHERE clause that specifies that X=Y. Any such constraints will be
-** identified by the WO_EQUIV bit in the pTerm->eOperator field. The
-** aEquiv[] array holds X and all its equivalents, with each SQL variable
-** taking up two slots in aEquiv[]. The first slot is for the cursor number
-** and the second is for the column number. There are 22 slots in aEquiv[]
-** so that means we can look for X plus up to 10 other equivalent values.
-** Hence a search for X will return <expr> if X=A1 and A1=A2 and A2=A3
-** and ... and A9=A10 and A10=<expr>.
-**
-** If there are multiple terms in the WHERE clause of the form "X <op> <expr>"
-** then try for the one with no dependencies on <expr> - in other words where
-** <expr> is a constant expression of some kind. Only return entries of
-** the form "X <op> Y" where Y is a column in another table if no terms of
-** the form "X <op> <const-expr>" exist. If no terms with a constant RHS
-** exist, try to return a term that does not use WO_EQUIV.
-*/
-static WhereTerm *findTerm(
- WhereClause *pWC, /* The WHERE clause to be searched */
- int iCur, /* Cursor number of LHS */
- int iColumn, /* Column number of LHS */
- Bitmask notReady, /* RHS must not overlap with this mask */
- u32 op, /* Mask of WO_xx values describing operator */
- Index *pIdx /* Must be compatible with this index, if not NULL */
-){
- WhereTerm *pResult = 0;
- WhereTerm *p;
- WhereScan scan;
-
- p = whereScanInit(&scan, pWC, iCur, iColumn, op, pIdx);
- while( p ){
- if( (p->prereqRight & notReady)==0 ){
- if( p->prereqRight==0 && (p->eOperator&WO_EQ)!=0 ){
- return p;
- }
- if( pResult==0 ) pResult = p;
- }
- p = whereScanNext(&scan);
- }
- return pResult;
-}
-
-/* Forward reference */
-static void exprAnalyze(SrcList*, WhereClause*, int);
-
-/*
-** Call exprAnalyze on all terms in a WHERE clause.
-*/
-static void exprAnalyzeAll(
- SrcList *pTabList, /* the FROM clause */
- WhereClause *pWC /* the WHERE clause to be analyzed */
-){
- int i;
- for(i=pWC->nTerm-1; i>=0; i--){
- exprAnalyze(pTabList, pWC, i);
- }
-}
#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION
/*
@@ -116804,7 +120217,7 @@ static void exprAnalyzeAll(
** In order for the operator to be optimizible, the RHS must be a string
** literal that does not begin with a wildcard. The LHS must be a column
** that may only be NULL, a string, or a BLOB, never a number. (This means
-** that virtual tables cannot participate in the LIKE optimization.) If the
+** that virtual tables cannot participate in the LIKE optimization.) The
** collating sequence for the column on the LHS must be appropriate for
** the operator.
*/
@@ -116848,7 +120261,7 @@ static int isLikeOrGlob(
if( op==TK_VARIABLE ){
Vdbe *pReprepare = pParse->pReprepare;
int iCol = pRight->iColumn;
- pVal = sqlite3VdbeGetBoundValue(pReprepare, iCol, SQLITE_AFF_NONE);
+ pVal = sqlite3VdbeGetBoundValue(pReprepare, iCol, SQLITE_AFF_BLOB);
if( pVal && sqlite3_value_type(pVal)==SQLITE_TEXT ){
z = (char *)sqlite3_value_text(pVal);
}
@@ -117059,7 +120472,7 @@ static void whereCombineDisjuncts(
**
** CASE 2:
**
-** If there are exactly two disjuncts one side has x>A and the other side
+** If there are exactly two disjuncts and one side has x>A and the other side
** has x=A (for the same x and A) then add a new virtual conjunct term to the
** WHERE clause of the form "x>=A". Example:
**
@@ -117088,22 +120501,22 @@ static void whereCombineDisjuncts(
** is decided elsewhere. This analysis only looks at whether subterms
** appropriate for indexing exist.
**
-** All examples A through E above satisfy case 2. But if a term
+** All examples A through E above satisfy case 3. But if a term
** also satisfies case 1 (such as B) we know that the optimizer will
-** always prefer case 1, so in that case we pretend that case 2 is not
+** always prefer case 1, so in that case we pretend that case 3 is not
** satisfied.
**
** It might be the case that multiple tables are indexable. For example,
** (E) above is indexable on tables P, Q, and R.
**
-** Terms that satisfy case 2 are candidates for lookup by using
+** Terms that satisfy case 3 are candidates for lookup by using
** separate indices to find rowids for each subterm and composing
** the union of all rowids using a RowSet object. This is similar
** to "bitmap indices" in other database engines.
**
** OTHERWISE:
**
-** If neither case 1 nor case 2 apply, then leave the eOperator set to
+** If none of cases 1, 2, or 3 apply, then leave the eOperator set to
** zero. This term is not useful for search.
*/
static void exprAnalyzeOrTerm(
@@ -117134,14 +120547,14 @@ static void exprAnalyzeOrTerm(
if( pOrInfo==0 ) return;
pTerm->wtFlags |= TERM_ORINFO;
pOrWc = &pOrInfo->wc;
- whereClauseInit(pOrWc, pWInfo);
- whereSplit(pOrWc, pExpr, TK_OR);
- exprAnalyzeAll(pSrc, pOrWc);
+ sqlite3WhereClauseInit(pOrWc, pWInfo);
+ sqlite3WhereSplit(pOrWc, pExpr, TK_OR);
+ sqlite3WhereExprAnalyze(pSrc, pOrWc);
if( db->mallocFailed ) return;
assert( pOrWc->nTerm>=2 );
/*
- ** Compute the set of tables that might satisfy cases 1 or 2.
+ ** Compute the set of tables that might satisfy cases 1 or 3.
*/
indexable = ~(Bitmask)0;
chngToIN = ~(Bitmask)0;
@@ -117160,16 +120573,16 @@ static void exprAnalyzeOrTerm(
pOrTerm->wtFlags |= TERM_ANDINFO;
pOrTerm->eOperator = WO_AND;
pAndWC = &pAndInfo->wc;
- whereClauseInit(pAndWC, pWC->pWInfo);
- whereSplit(pAndWC, pOrTerm->pExpr, TK_AND);
- exprAnalyzeAll(pSrc, pAndWC);
+ sqlite3WhereClauseInit(pAndWC, pWC->pWInfo);
+ sqlite3WhereSplit(pAndWC, pOrTerm->pExpr, TK_AND);
+ sqlite3WhereExprAnalyze(pSrc, pAndWC);
pAndWC->pOuter = pWC;
testcase( db->mallocFailed );
if( !db->mallocFailed ){
for(j=0, pAndTerm=pAndWC->a; j<pAndWC->nTerm; j++, pAndTerm++){
assert( pAndTerm->pExpr );
if( allowedOp(pAndTerm->pExpr->op) ){
- b |= getMask(&pWInfo->sMaskSet, pAndTerm->leftCursor);
+ b |= sqlite3WhereGetMask(&pWInfo->sMaskSet, pAndTerm->leftCursor);
}
}
}
@@ -117180,10 +120593,10 @@ static void exprAnalyzeOrTerm(
** corresponding TERM_VIRTUAL term */
}else{
Bitmask b;
- b = getMask(&pWInfo->sMaskSet, pOrTerm->leftCursor);
+ b = sqlite3WhereGetMask(&pWInfo->sMaskSet, pOrTerm->leftCursor);
if( pOrTerm->wtFlags & TERM_VIRTUAL ){
WhereTerm *pOther = &pOrWc->a[pOrTerm->iParent];
- b |= getMask(&pWInfo->sMaskSet, pOther->leftCursor);
+ b |= sqlite3WhereGetMask(&pWInfo->sMaskSet, pOther->leftCursor);
}
indexable &= b;
if( (pOrTerm->eOperator & WO_EQ)==0 ){
@@ -117259,7 +120672,8 @@ static void exprAnalyzeOrTerm(
assert( j==1 );
continue;
}
- if( (chngToIN & getMask(&pWInfo->sMaskSet, pOrTerm->leftCursor))==0 ){
+ if( (chngToIN & sqlite3WhereGetMask(&pWInfo->sMaskSet,
+ pOrTerm->leftCursor))==0 ){
/* This term must be of the form t1.a==t2.b where t2 is in the
** chngToIN set but t1 is not. This term will be either preceded
** or follwed by an inverted copy (t2.b==t1.a). Skip this term
@@ -117278,7 +120692,7 @@ static void exprAnalyzeOrTerm(
** on the second iteration */
assert( j==1 );
assert( IsPowerOfTwo(chngToIN) );
- assert( chngToIN==getMask(&pWInfo->sMaskSet, iCursor) );
+ assert( chngToIN==sqlite3WhereGetMask(&pWInfo->sMaskSet, iCursor) );
break;
}
testcase( j==1 );
@@ -117351,6 +120765,117 @@ static void exprAnalyzeOrTerm(
#endif /* !SQLITE_OMIT_OR_OPTIMIZATION && !SQLITE_OMIT_SUBQUERY */
/*
+** We already know that pExpr is a binary operator where both operands are
+** column references. This routine checks to see if pExpr is an equivalence
+** relation:
+** 1. The SQLITE_Transitive optimization must be enabled
+** 2. Must be either an == or an IS operator
+** 3. Not originating in the ON clause of an OUTER JOIN
+** 4. The affinities of A and B must be compatible
+** 5a. Both operands use the same collating sequence OR
+** 5b. The overall collating sequence is BINARY
+** If this routine returns TRUE, that means that the RHS can be substituted
+** for the LHS anyplace else in the WHERE clause where the LHS column occurs.
+** This is an optimization. No harm comes from returning 0. But if 1 is
+** returned when it should not be, then incorrect answers might result.
+*/
+static int termIsEquivalence(Parse *pParse, Expr *pExpr){
+ char aff1, aff2;
+ CollSeq *pColl;
+ const char *zColl1, *zColl2;
+ if( !OptimizationEnabled(pParse->db, SQLITE_Transitive) ) return 0;
+ if( pExpr->op!=TK_EQ && pExpr->op!=TK_IS ) return 0;
+ if( ExprHasProperty(pExpr, EP_FromJoin) ) return 0;
+ aff1 = sqlite3ExprAffinity(pExpr->pLeft);
+ aff2 = sqlite3ExprAffinity(pExpr->pRight);
+ if( aff1!=aff2
+ && (!sqlite3IsNumericAffinity(aff1) || !sqlite3IsNumericAffinity(aff2))
+ ){
+ return 0;
+ }
+ pColl = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight);
+ if( pColl==0 || sqlite3StrICmp(pColl->zName, "BINARY")==0 ) return 1;
+ pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
+ /* Since pLeft and pRight are both a column references, their collating
+ ** sequence should always be defined. */
+ zColl1 = ALWAYS(pColl) ? pColl->zName : 0;
+ pColl = sqlite3ExprCollSeq(pParse, pExpr->pRight);
+ zColl2 = ALWAYS(pColl) ? pColl->zName : 0;
+ return sqlite3StrICmp(zColl1, zColl2)==0;
+}
+
+/*
+** Recursively walk the expressions of a SELECT statement and generate
+** a bitmask indicating which tables are used in that expression
+** tree.
+*/
+static Bitmask exprSelectUsage(WhereMaskSet *pMaskSet, Select *pS){
+ Bitmask mask = 0;
+ while( pS ){
+ SrcList *pSrc = pS->pSrc;
+ mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pEList);
+ mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pGroupBy);
+ mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pOrderBy);
+ mask |= sqlite3WhereExprUsage(pMaskSet, pS->pWhere);
+ mask |= sqlite3WhereExprUsage(pMaskSet, pS->pHaving);
+ if( ALWAYS(pSrc!=0) ){
+ int i;
+ for(i=0; i<pSrc->nSrc; i++){
+ mask |= exprSelectUsage(pMaskSet, pSrc->a[i].pSelect);
+ mask |= sqlite3WhereExprUsage(pMaskSet, pSrc->a[i].pOn);
+ }
+ }
+ pS = pS->pPrior;
+ }
+ return mask;
+}
+
+/*
+** Expression pExpr is one operand of a comparison operator that might
+** be useful for indexing. This routine checks to see if pExpr appears
+** in any index. Return TRUE (1) if pExpr is an indexed term and return
+** FALSE (0) if not. If TRUE is returned, also set *piCur to the cursor
+** number of the table that is indexed and *piColumn to the column number
+** of the column that is indexed, or -2 if an expression is being indexed.
+**
+** If pExpr is a TK_COLUMN column reference, then this routine always returns
+** true even if that particular column is not indexed, because the column
+** might be added to an automatic index later.
+*/
+static int exprMightBeIndexed(
+ SrcList *pFrom, /* The FROM clause */
+ Bitmask mPrereq, /* Bitmask of FROM clause terms referenced by pExpr */
+ Expr *pExpr, /* An operand of a comparison operator */
+ int *piCur, /* Write the referenced table cursor number here */
+ int *piColumn /* Write the referenced table column number here */
+){
+ Index *pIdx;
+ int i;
+ int iCur;
+ if( pExpr->op==TK_COLUMN ){
+ *piCur = pExpr->iTable;
+ *piColumn = pExpr->iColumn;
+ return 1;
+ }
+ if( mPrereq==0 ) return 0; /* No table references */
+ if( (mPrereq&(mPrereq-1))!=0 ) return 0; /* Refs more than one table */
+ for(i=0; mPrereq>1; i++, mPrereq>>=1){}
+ iCur = pFrom->a[i].iCursor;
+ for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+ if( pIdx->aColExpr==0 ) continue;
+ for(i=0; i<pIdx->nKeyCol; i++){
+ if( pIdx->aiColumn[i]!=(-2) ) continue;
+ if( sqlite3ExprCompare(pExpr, pIdx->aColExpr->a[i].pExpr, iCur)==0 ){
+ *piCur = iCur;
+ *piColumn = -2;
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
+
+/*
** The input to this routine is an WhereTerm structure with only the
** "pExpr" field filled in. The job of this routine is to analyze the
** subexpression and populate all the other fields of the WhereTerm
@@ -117394,23 +120919,23 @@ static void exprAnalyze(
pMaskSet = &pWInfo->sMaskSet;
pExpr = pTerm->pExpr;
assert( pExpr->op!=TK_AS && pExpr->op!=TK_COLLATE );
- prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
+ prereqLeft = sqlite3WhereExprUsage(pMaskSet, pExpr->pLeft);
op = pExpr->op;
if( op==TK_IN ){
assert( pExpr->pRight==0 );
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
- pTerm->prereqRight = exprSelectTableUsage(pMaskSet, pExpr->x.pSelect);
+ pTerm->prereqRight = exprSelectUsage(pMaskSet, pExpr->x.pSelect);
}else{
- pTerm->prereqRight = exprListTableUsage(pMaskSet, pExpr->x.pList);
+ pTerm->prereqRight = sqlite3WhereExprListUsage(pMaskSet, pExpr->x.pList);
}
}else if( op==TK_ISNULL ){
pTerm->prereqRight = 0;
}else{
- pTerm->prereqRight = exprTableUsage(pMaskSet, pExpr->pRight);
+ pTerm->prereqRight = sqlite3WhereExprUsage(pMaskSet, pExpr->pRight);
}
- prereqAll = exprTableUsage(pMaskSet, pExpr);
+ prereqAll = sqlite3WhereExprUsage(pMaskSet, pExpr);
if( ExprHasProperty(pExpr, EP_FromJoin) ){
- Bitmask x = getMask(pMaskSet, pExpr->iRightJoinTable);
+ Bitmask x = sqlite3WhereGetMask(pMaskSet, pExpr->iRightJoinTable);
prereqAll |= x;
extraRight = x-1; /* ON clause terms may not be used with an index
** on left table of a LEFT JOIN. Ticket #3015 */
@@ -117420,15 +120945,19 @@ static void exprAnalyze(
pTerm->iParent = -1;
pTerm->eOperator = 0;
if( allowedOp(op) ){
+ int iCur, iColumn;
Expr *pLeft = sqlite3ExprSkipCollate(pExpr->pLeft);
Expr *pRight = sqlite3ExprSkipCollate(pExpr->pRight);
u16 opMask = (pTerm->prereqRight & prereqLeft)==0 ? WO_ALL : WO_EQUIV;
- if( pLeft->op==TK_COLUMN ){
- pTerm->leftCursor = pLeft->iTable;
- pTerm->u.leftColumn = pLeft->iColumn;
+ if( exprMightBeIndexed(pSrc, prereqLeft, pLeft, &iCur, &iColumn) ){
+ pTerm->leftCursor = iCur;
+ pTerm->u.leftColumn = iColumn;
pTerm->eOperator = operatorMask(op) & opMask;
}
- if( pRight && pRight->op==TK_COLUMN ){
+ if( op==TK_IS ) pTerm->wtFlags |= TERM_IS;
+ if( pRight
+ && exprMightBeIndexed(pSrc, pTerm->prereqRight, pRight, &iCur, &iColumn)
+ ){
WhereTerm *pNew;
Expr *pDup;
u16 eExtraOp = 0; /* Extra bits for pNew->eOperator */
@@ -117443,12 +120972,11 @@ static void exprAnalyze(
if( idxNew==0 ) return;
pNew = &pWC->a[idxNew];
markTermAsChild(pWC, idxNew, idxTerm);
+ if( op==TK_IS ) pNew->wtFlags |= TERM_IS;
pTerm = &pWC->a[idxTerm];
pTerm->wtFlags |= TERM_COPIED;
- if( pExpr->op==TK_EQ
- && !ExprHasProperty(pExpr, EP_FromJoin)
- && OptimizationEnabled(db, SQLITE_Transitive)
- ){
+
+ if( termIsEquivalence(pParse, pDup) ){
pTerm->eOperator |= WO_EQUIV;
eExtraOp = WO_EQUIV;
}
@@ -117457,9 +120985,8 @@ static void exprAnalyze(
pNew = pTerm;
}
exprCommute(pParse, pDup);
- pLeft = sqlite3ExprSkipCollate(pDup->pLeft);
- pNew->leftCursor = pLeft->iTable;
- pNew->u.leftColumn = pLeft->iColumn;
+ pNew->leftCursor = iCur;
+ pNew->u.leftColumn = iColumn;
testcase( (prereqLeft | extraRight) != prereqLeft );
pNew->prereqRight = prereqLeft | extraRight;
pNew->prereqAll = prereqAll;
@@ -117615,8 +121142,8 @@ static void exprAnalyze(
pRight = pExpr->x.pList->a[0].pExpr;
pLeft = pExpr->x.pList->a[1].pExpr;
- prereqExpr = exprTableUsage(pMaskSet, pRight);
- prereqColumn = exprTableUsage(pMaskSet, pLeft);
+ prereqExpr = sqlite3WhereExprUsage(pMaskSet, pRight);
+ prereqColumn = sqlite3WhereExprUsage(pMaskSet, pLeft);
if( (prereqExpr & prereqColumn)==0 ){
Expr *pNewExpr;
pNewExpr = sqlite3PExpr(pParse, TK_MATCH,
@@ -117642,10 +121169,7 @@ static void exprAnalyze(
** as "x>NULL" if x is not an INTEGER PRIMARY KEY. So construct a
** virtual term of that form.
**
- ** Note that the virtual term must be tagged with TERM_VNULL. This
- ** TERM_VNULL tag will suppress the not-null check at the beginning
- ** of the loop. Without the TERM_VNULL flag, the not-null check at
- ** the start of the loop will prevent any results from being returned.
+ ** Note that the virtual term must be tagged with TERM_VNULL.
*/
if( pExpr->op==TK_NOTNULL
&& pExpr->pLeft->op==TK_COLUMN
@@ -117683,6 +121207,530 @@ static void exprAnalyze(
pTerm->prereqRight |= extraRight;
}
+/***************************************************************************
+** Routines with file scope above. Interface to the rest of the where.c
+** subsystem follows.
+***************************************************************************/
+
+/*
+** This routine identifies subexpressions in the WHERE clause where
+** each subexpression is separated by the AND operator or some other
+** operator specified in the op parameter. The WhereClause structure
+** is filled with pointers to subexpressions. For example:
+**
+** WHERE a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)
+** \________/ \_______________/ \________________/
+** slot[0] slot[1] slot[2]
+**
+** The original WHERE clause in pExpr is unaltered. All this routine
+** does is make slot[] entries point to substructure within pExpr.
+**
+** In the previous sentence and in the diagram, "slot[]" refers to
+** the WhereClause.a[] array. The slot[] array grows as needed to contain
+** all terms of the WHERE clause.
+*/
+SQLITE_PRIVATE void sqlite3WhereSplit(WhereClause *pWC, Expr *pExpr, u8 op){
+ Expr *pE2 = sqlite3ExprSkipCollate(pExpr);
+ pWC->op = op;
+ if( pE2==0 ) return;
+ if( pE2->op!=op ){
+ whereClauseInsert(pWC, pExpr, 0);
+ }else{
+ sqlite3WhereSplit(pWC, pE2->pLeft, op);
+ sqlite3WhereSplit(pWC, pE2->pRight, op);
+ }
+}
+
+/*
+** Initialize a preallocated WhereClause structure.
+*/
+SQLITE_PRIVATE void sqlite3WhereClauseInit(
+ WhereClause *pWC, /* The WhereClause to be initialized */
+ WhereInfo *pWInfo /* The WHERE processing context */
+){
+ pWC->pWInfo = pWInfo;
+ pWC->pOuter = 0;
+ pWC->nTerm = 0;
+ pWC->nSlot = ArraySize(pWC->aStatic);
+ pWC->a = pWC->aStatic;
+}
+
+/*
+** Deallocate a WhereClause structure. The WhereClause structure
+** itself is not freed. This routine is the inverse of sqlite3WhereClauseInit().
+*/
+SQLITE_PRIVATE void sqlite3WhereClauseClear(WhereClause *pWC){
+ int i;
+ WhereTerm *a;
+ sqlite3 *db = pWC->pWInfo->pParse->db;
+ for(i=pWC->nTerm-1, a=pWC->a; i>=0; i--, a++){
+ if( a->wtFlags & TERM_DYNAMIC ){
+ sqlite3ExprDelete(db, a->pExpr);
+ }
+ if( a->wtFlags & TERM_ORINFO ){
+ whereOrInfoDelete(db, a->u.pOrInfo);
+ }else if( a->wtFlags & TERM_ANDINFO ){
+ whereAndInfoDelete(db, a->u.pAndInfo);
+ }
+ }
+ if( pWC->a!=pWC->aStatic ){
+ sqlite3DbFree(db, pWC->a);
+ }
+}
+
+
+/*
+** These routines walk (recursively) an expression tree and generate
+** a bitmask indicating which tables are used in that expression
+** tree.
+*/
+SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){
+ Bitmask mask = 0;
+ if( p==0 ) return 0;
+ if( p->op==TK_COLUMN ){
+ mask = sqlite3WhereGetMask(pMaskSet, p->iTable);
+ return mask;
+ }
+ mask = sqlite3WhereExprUsage(pMaskSet, p->pRight);
+ mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft);
+ if( ExprHasProperty(p, EP_xIsSelect) ){
+ mask |= exprSelectUsage(pMaskSet, p->x.pSelect);
+ }else{
+ mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList);
+ }
+ return mask;
+}
+SQLITE_PRIVATE Bitmask sqlite3WhereExprListUsage(WhereMaskSet *pMaskSet, ExprList *pList){
+ int i;
+ Bitmask mask = 0;
+ if( pList ){
+ for(i=0; i<pList->nExpr; i++){
+ mask |= sqlite3WhereExprUsage(pMaskSet, pList->a[i].pExpr);
+ }
+ }
+ return mask;
+}
+
+
+/*
+** Call exprAnalyze on all terms in a WHERE clause.
+**
+** Note that exprAnalyze() might add new virtual terms onto the
+** end of the WHERE clause. We do not want to analyze these new
+** virtual terms, so start analyzing at the end and work forward
+** so that the added virtual terms are never processed.
+*/
+SQLITE_PRIVATE void sqlite3WhereExprAnalyze(
+ SrcList *pTabList, /* the FROM clause */
+ WhereClause *pWC /* the WHERE clause to be analyzed */
+){
+ int i;
+ for(i=pWC->nTerm-1; i>=0; i--){
+ exprAnalyze(pTabList, pWC, i);
+ }
+}
+
+/*
+** For table-valued-functions, transform the function arguments into
+** new WHERE clause terms.
+**
+** Each function argument translates into an equality constraint against
+** a HIDDEN column in the table.
+*/
+SQLITE_PRIVATE void sqlite3WhereTabFuncArgs(
+ Parse *pParse, /* Parsing context */
+ struct SrcList_item *pItem, /* The FROM clause term to process */
+ WhereClause *pWC /* Xfer function arguments to here */
+){
+ Table *pTab;
+ int j, k;
+ ExprList *pArgs;
+ Expr *pColRef;
+ Expr *pTerm;
+ if( pItem->fg.isTabFunc==0 ) return;
+ pTab = pItem->pTab;
+ assert( pTab!=0 );
+ pArgs = pItem->u1.pFuncArg;
+ assert( pArgs!=0 );
+ for(j=k=0; j<pArgs->nExpr; j++){
+ while( k<pTab->nCol && (pTab->aCol[k].colFlags & COLFLAG_HIDDEN)==0 ){ k++; }
+ if( k>=pTab->nCol ){
+ sqlite3ErrorMsg(pParse, "too many arguments on %s() - max %d",
+ pTab->zName, j);
+ return;
+ }
+ pColRef = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
+ if( pColRef==0 ) return;
+ pColRef->iTable = pItem->iCursor;
+ pColRef->iColumn = k++;
+ pColRef->pTab = pTab;
+ pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef,
+ sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0);
+ whereClauseInsert(pWC, pTerm, TERM_DYNAMIC);
+ }
+}
+
+/************** End of whereexpr.c *******************************************/
+/************** Begin file where.c *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This module contains C code that generates VDBE code used to process
+** the WHERE clause of SQL statements. This module is responsible for
+** generating the code that loops through a table looking for applicable
+** rows. Indices are selected and used to speed the search when doing
+** so is applicable. Because this module is responsible for selecting
+** indices, you might also think of this module as the "query optimizer".
+*/
+/* #include "sqliteInt.h" */
+/* #include "whereInt.h" */
+
+/* Forward declaration of methods */
+static int whereLoopResize(sqlite3*, WhereLoop*, int);
+
+/* Test variable that can be set to enable WHERE tracing */
+#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
+/***/ int sqlite3WhereTrace = 0;
+#endif
+
+
+/*
+** Return the estimated number of output rows from a WHERE clause
+*/
+SQLITE_PRIVATE u64 sqlite3WhereOutputRowCount(WhereInfo *pWInfo){
+ return sqlite3LogEstToInt(pWInfo->nRowOut);
+}
+
+/*
+** Return one of the WHERE_DISTINCT_xxxxx values to indicate how this
+** WHERE clause returns outputs for DISTINCT processing.
+*/
+SQLITE_PRIVATE int sqlite3WhereIsDistinct(WhereInfo *pWInfo){
+ return pWInfo->eDistinct;
+}
+
+/*
+** Return TRUE if the WHERE clause returns rows in ORDER BY order.
+** Return FALSE if the output needs to be sorted.
+*/
+SQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo *pWInfo){
+ return pWInfo->nOBSat;
+}
+
+/*
+** Return the VDBE address or label to jump to in order to continue
+** immediately with the next row of a WHERE clause.
+*/
+SQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo *pWInfo){
+ assert( pWInfo->iContinue!=0 );
+ return pWInfo->iContinue;
+}
+
+/*
+** Return the VDBE address or label to jump to in order to break
+** out of a WHERE loop.
+*/
+SQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo *pWInfo){
+ return pWInfo->iBreak;
+}
+
+/*
+** Return ONEPASS_OFF (0) if an UPDATE or DELETE statement is unable to
+** operate directly on the rowis returned by a WHERE clause. Return
+** ONEPASS_SINGLE (1) if the statement can operation directly because only
+** a single row is to be changed. Return ONEPASS_MULTI (2) if the one-pass
+** optimization can be used on multiple
+**
+** If the ONEPASS optimization is used (if this routine returns true)
+** then also write the indices of open cursors used by ONEPASS
+** into aiCur[0] and aiCur[1]. iaCur[0] gets the cursor of the data
+** table and iaCur[1] gets the cursor used by an auxiliary index.
+** Either value may be -1, indicating that cursor is not used.
+** Any cursors returned will have been opened for writing.
+**
+** aiCur[0] and aiCur[1] both get -1 if the where-clause logic is
+** unable to use the ONEPASS optimization.
+*/
+SQLITE_PRIVATE int sqlite3WhereOkOnePass(WhereInfo *pWInfo, int *aiCur){
+ memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2);
+#ifdef WHERETRACE_ENABLED
+ if( sqlite3WhereTrace && pWInfo->eOnePass!=ONEPASS_OFF ){
+ sqlite3DebugPrintf("%s cursors: %d %d\n",
+ pWInfo->eOnePass==ONEPASS_SINGLE ? "ONEPASS_SINGLE" : "ONEPASS_MULTI",
+ aiCur[0], aiCur[1]);
+ }
+#endif
+ return pWInfo->eOnePass;
+}
+
+/*
+** Move the content of pSrc into pDest
+*/
+static void whereOrMove(WhereOrSet *pDest, WhereOrSet *pSrc){
+ pDest->n = pSrc->n;
+ memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));
+}
+
+/*
+** Try to insert a new prerequisite/cost entry into the WhereOrSet pSet.
+**
+** The new entry might overwrite an existing entry, or it might be
+** appended, or it might be discarded. Do whatever is the right thing
+** so that pSet keeps the N_OR_COST best entries seen so far.
+*/
+static int whereOrInsert(
+ WhereOrSet *pSet, /* The WhereOrSet to be updated */
+ Bitmask prereq, /* Prerequisites of the new entry */
+ LogEst rRun, /* Run-cost of the new entry */
+ LogEst nOut /* Number of outputs for the new entry */
+){
+ u16 i;
+ WhereOrCost *p;
+ for(i=pSet->n, p=pSet->a; i>0; i--, p++){
+ if( rRun<=p->rRun && (prereq & p->prereq)==prereq ){
+ goto whereOrInsert_done;
+ }
+ if( p->rRun<=rRun && (p->prereq & prereq)==p->prereq ){
+ return 0;
+ }
+ }
+ if( pSet->n<N_OR_COST ){
+ p = &pSet->a[pSet->n++];
+ p->nOut = nOut;
+ }else{
+ p = pSet->a;
+ for(i=1; i<pSet->n; i++){
+ if( p->rRun>pSet->a[i].rRun ) p = pSet->a + i;
+ }
+ if( p->rRun<=rRun ) return 0;
+ }
+whereOrInsert_done:
+ p->prereq = prereq;
+ p->rRun = rRun;
+ if( p->nOut>nOut ) p->nOut = nOut;
+ return 1;
+}
+
+/*
+** Return the bitmask for the given cursor number. Return 0 if
+** iCursor is not in the set.
+*/
+SQLITE_PRIVATE Bitmask sqlite3WhereGetMask(WhereMaskSet *pMaskSet, int iCursor){
+ int i;
+ assert( pMaskSet->n<=(int)sizeof(Bitmask)*8 );
+ for(i=0; i<pMaskSet->n; i++){
+ if( pMaskSet->ix[i]==iCursor ){
+ return MASKBIT(i);
+ }
+ }
+ return 0;
+}
+
+/*
+** Create a new mask for cursor iCursor.
+**
+** There is one cursor per table in the FROM clause. The number of
+** tables in the FROM clause is limited by a test early in the
+** sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[]
+** array will never overflow.
+*/
+static void createMask(WhereMaskSet *pMaskSet, int iCursor){
+ assert( pMaskSet->n < ArraySize(pMaskSet->ix) );
+ pMaskSet->ix[pMaskSet->n++] = iCursor;
+}
+
+/*
+** Advance to the next WhereTerm that matches according to the criteria
+** established when the pScan object was initialized by whereScanInit().
+** Return NULL if there are no more matching WhereTerms.
+*/
+static WhereTerm *whereScanNext(WhereScan *pScan){
+ int iCur; /* The cursor on the LHS of the term */
+ i16 iColumn; /* The column on the LHS of the term. -1 for IPK */
+ Expr *pX; /* An expression being tested */
+ WhereClause *pWC; /* Shorthand for pScan->pWC */
+ WhereTerm *pTerm; /* The term being tested */
+ int k = pScan->k; /* Where to start scanning */
+
+ while( pScan->iEquiv<=pScan->nEquiv ){
+ iCur = pScan->aiCur[pScan->iEquiv-1];
+ iColumn = pScan->aiColumn[pScan->iEquiv-1];
+ if( iColumn==XN_EXPR && pScan->pIdxExpr==0 ) return 0;
+ while( (pWC = pScan->pWC)!=0 ){
+ for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
+ if( pTerm->leftCursor==iCur
+ && pTerm->u.leftColumn==iColumn
+ && (iColumn!=XN_EXPR
+ || sqlite3ExprCompare(pTerm->pExpr->pLeft,pScan->pIdxExpr,iCur)==0)
+ && (pScan->iEquiv<=1 || !ExprHasProperty(pTerm->pExpr, EP_FromJoin))
+ ){
+ if( (pTerm->eOperator & WO_EQUIV)!=0
+ && pScan->nEquiv<ArraySize(pScan->aiCur)
+ && (pX = sqlite3ExprSkipCollate(pTerm->pExpr->pRight))->op==TK_COLUMN
+ ){
+ int j;
+ for(j=0; j<pScan->nEquiv; j++){
+ if( pScan->aiCur[j]==pX->iTable
+ && pScan->aiColumn[j]==pX->iColumn ){
+ break;
+ }
+ }
+ if( j==pScan->nEquiv ){
+ pScan->aiCur[j] = pX->iTable;
+ pScan->aiColumn[j] = pX->iColumn;
+ pScan->nEquiv++;
+ }
+ }
+ if( (pTerm->eOperator & pScan->opMask)!=0 ){
+ /* Verify the affinity and collating sequence match */
+ if( pScan->zCollName && (pTerm->eOperator & WO_ISNULL)==0 ){
+ CollSeq *pColl;
+ Parse *pParse = pWC->pWInfo->pParse;
+ pX = pTerm->pExpr;
+ if( !sqlite3IndexAffinityOk(pX, pScan->idxaff) ){
+ continue;
+ }
+ assert(pX->pLeft);
+ pColl = sqlite3BinaryCompareCollSeq(pParse,
+ pX->pLeft, pX->pRight);
+ if( pColl==0 ) pColl = pParse->db->pDfltColl;
+ if( sqlite3StrICmp(pColl->zName, pScan->zCollName) ){
+ continue;
+ }
+ }
+ if( (pTerm->eOperator & (WO_EQ|WO_IS))!=0
+ && (pX = pTerm->pExpr->pRight)->op==TK_COLUMN
+ && pX->iTable==pScan->aiCur[0]
+ && pX->iColumn==pScan->aiColumn[0]
+ ){
+ testcase( pTerm->eOperator & WO_IS );
+ continue;
+ }
+ pScan->k = k+1;
+ return pTerm;
+ }
+ }
+ }
+ pScan->pWC = pScan->pWC->pOuter;
+ k = 0;
+ }
+ pScan->pWC = pScan->pOrigWC;
+ k = 0;
+ pScan->iEquiv++;
+ }
+ return 0;
+}
+
+/*
+** Initialize a WHERE clause scanner object. Return a pointer to the
+** first match. Return NULL if there are no matches.
+**
+** The scanner will be searching the WHERE clause pWC. It will look
+** for terms of the form "X <op> <expr>" where X is column iColumn of table
+** iCur. The <op> must be one of the operators described by opMask.
+**
+** If the search is for X and the WHERE clause contains terms of the
+** form X=Y then this routine might also return terms of the form
+** "Y <op> <expr>". The number of levels of transitivity is limited,
+** but is enough to handle most commonly occurring SQL statements.
+**
+** If X is not the INTEGER PRIMARY KEY then X must be compatible with
+** index pIdx.
+*/
+static WhereTerm *whereScanInit(
+ WhereScan *pScan, /* The WhereScan object being initialized */
+ WhereClause *pWC, /* The WHERE clause to be scanned */
+ int iCur, /* Cursor to scan for */
+ int iColumn, /* Column to scan for */
+ u32 opMask, /* Operator(s) to scan for */
+ Index *pIdx /* Must be compatible with this index */
+){
+ int j = 0;
+
+ /* memset(pScan, 0, sizeof(*pScan)); */
+ pScan->pOrigWC = pWC;
+ pScan->pWC = pWC;
+ pScan->pIdxExpr = 0;
+ if( pIdx ){
+ j = iColumn;
+ iColumn = pIdx->aiColumn[j];
+ if( iColumn==XN_EXPR ) pScan->pIdxExpr = pIdx->aColExpr->a[j].pExpr;
+ }
+ if( pIdx && iColumn>=0 ){
+ pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
+ pScan->zCollName = pIdx->azColl[j];
+ }else{
+ pScan->idxaff = 0;
+ pScan->zCollName = 0;
+ }
+ pScan->opMask = opMask;
+ pScan->k = 0;
+ pScan->aiCur[0] = iCur;
+ pScan->aiColumn[0] = iColumn;
+ pScan->nEquiv = 1;
+ pScan->iEquiv = 1;
+ return whereScanNext(pScan);
+}
+
+/*
+** Search for a term in the WHERE clause that is of the form "X <op> <expr>"
+** where X is a reference to the iColumn of table iCur and <op> is one of
+** the WO_xx operator codes specified by the op parameter.
+** Return a pointer to the term. Return 0 if not found.
+**
+** If pIdx!=0 then search for terms matching the iColumn-th column of pIdx
+** rather than the iColumn-th column of table iCur.
+**
+** The term returned might by Y=<expr> if there is another constraint in
+** the WHERE clause that specifies that X=Y. Any such constraints will be
+** identified by the WO_EQUIV bit in the pTerm->eOperator field. The
+** aiCur[]/iaColumn[] arrays hold X and all its equivalents. There are 11
+** slots in aiCur[]/aiColumn[] so that means we can look for X plus up to 10
+** other equivalent values. Hence a search for X will return <expr> if X=A1
+** and A1=A2 and A2=A3 and ... and A9=A10 and A10=<expr>.
+**
+** If there are multiple terms in the WHERE clause of the form "X <op> <expr>"
+** then try for the one with no dependencies on <expr> - in other words where
+** <expr> is a constant expression of some kind. Only return entries of
+** the form "X <op> Y" where Y is a column in another table if no terms of
+** the form "X <op> <const-expr>" exist. If no terms with a constant RHS
+** exist, try to return a term that does not use WO_EQUIV.
+*/
+SQLITE_PRIVATE WhereTerm *sqlite3WhereFindTerm(
+ WhereClause *pWC, /* The WHERE clause to be searched */
+ int iCur, /* Cursor number of LHS */
+ int iColumn, /* Column number of LHS */
+ Bitmask notReady, /* RHS must not overlap with this mask */
+ u32 op, /* Mask of WO_xx values describing operator */
+ Index *pIdx /* Must be compatible with this index, if not NULL */
+){
+ WhereTerm *pResult = 0;
+ WhereTerm *p;
+ WhereScan scan;
+
+ p = whereScanInit(&scan, pWC, iCur, iColumn, op, pIdx);
+ op &= WO_EQ|WO_IS;
+ while( p ){
+ if( (p->prereqRight & notReady)==0 ){
+ if( p->prereqRight==0 && (p->eOperator&op)!=0 ){
+ testcase( p->eOperator & WO_IS );
+ return p;
+ }
+ if( pResult==0 ) pResult = p;
+ }
+ p = whereScanNext(&scan);
+ }
+ return pResult;
+}
+
/*
** This function searches pList for an entry that matches the iCol-th column
** of index pIdx.
@@ -117717,11 +121765,30 @@ static int findIndexCol(
}
/*
+** Return TRUE if the iCol-th column of index pIdx is NOT NULL
+*/
+static int indexColumnNotNull(Index *pIdx, int iCol){
+ int j;
+ assert( pIdx!=0 );
+ assert( iCol>=0 && iCol<pIdx->nColumn );
+ j = pIdx->aiColumn[iCol];
+ if( j>=0 ){
+ return pIdx->pTable->aCol[j].notNull;
+ }else if( j==(-1) ){
+ return 1;
+ }else{
+ assert( j==(-2) );
+ return 0; /* Assume an indexed expression can always yield a NULL */
+
+ }
+}
+
+/*
** Return true if the DISTINCT expression-list passed as the third argument
** is redundant.
**
-** A DISTINCT list is redundant if the database contains some subset of
-** columns that are unique and non-null.
+** A DISTINCT list is redundant if any subset of the columns in the
+** DISTINCT list are collectively unique and individually non-null.
*/
static int isDistinctRedundant(
Parse *pParse, /* Parsing context */
@@ -117766,12 +121833,9 @@ static int isDistinctRedundant(
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
if( !IsUniqueIndex(pIdx) ) continue;
for(i=0; i<pIdx->nKeyCol; i++){
- i16 iCol = pIdx->aiColumn[i];
- if( 0==findTerm(pWC, iBase, iCol, ~(Bitmask)0, WO_EQ, pIdx) ){
- int iIdxCol = findIndexCol(pParse, pDistinct, iBase, pIdx, i);
- if( iIdxCol<0 || pTab->aCol[iCol].notNull==0 ){
- break;
- }
+ if( 0==sqlite3WhereFindTerm(pWC, iBase, i, ~(Bitmask)0, WO_EQ, pIdx) ){
+ if( findIndexCol(pParse, pDistinct, iBase, pIdx, i)<0 ) break;
+ if( indexColumnNotNull(pIdx, i)==0 ) break;
}
}
if( i==pIdx->nKeyCol ){
@@ -117792,6 +121856,49 @@ static LogEst estLog(LogEst N){
}
/*
+** Convert OP_Column opcodes to OP_Copy in previously generated code.
+**
+** This routine runs over generated VDBE code and translates OP_Column
+** opcodes into OP_Copy when the table is being accessed via co-routine
+** instead of via table lookup.
+**
+** If the bIncrRowid parameter is 0, then any OP_Rowid instructions on
+** cursor iTabCur are transformed into OP_Null. Or, if bIncrRowid is non-zero,
+** then each OP_Rowid is transformed into an instruction to increment the
+** value stored in its output register.
+*/
+static void translateColumnToCopy(
+ Vdbe *v, /* The VDBE containing code to translate */
+ int iStart, /* Translate from this opcode to the end */
+ int iTabCur, /* OP_Column/OP_Rowid references to this table */
+ int iRegister, /* The first column is in this register */
+ int bIncrRowid /* If non-zero, transform OP_rowid to OP_AddImm(1) */
+){
+ VdbeOp *pOp = sqlite3VdbeGetOp(v, iStart);
+ int iEnd = sqlite3VdbeCurrentAddr(v);
+ for(; iStart<iEnd; iStart++, pOp++){
+ if( pOp->p1!=iTabCur ) continue;
+ if( pOp->opcode==OP_Column ){
+ pOp->opcode = OP_Copy;
+ pOp->p1 = pOp->p2 + iRegister;
+ pOp->p2 = pOp->p3;
+ pOp->p3 = 0;
+ }else if( pOp->opcode==OP_Rowid ){
+ if( bIncrRowid ){
+ /* Increment the value stored in the P2 operand of the OP_Rowid. */
+ pOp->opcode = OP_AddImm;
+ pOp->p1 = pOp->p2;
+ pOp->p2 = 1;
+ }else{
+ pOp->opcode = OP_Null;
+ pOp->p1 = 0;
+ pOp->p3 = 0;
+ }
+ }
+ }
+}
+
+/*
** Two routines for printing the content of an sqlite3_index_info
** structure. Used for testing and debugging only. If neither
** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines
@@ -117849,11 +121956,12 @@ static int termCanDriveIndex(
){
char aff;
if( pTerm->leftCursor!=pSrc->iCursor ) return 0;
- if( (pTerm->eOperator & WO_EQ)==0 ) return 0;
+ if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) return 0;
if( (pTerm->prereqRight & notReady)!=0 ) return 0;
if( pTerm->u.leftColumn<0 ) return 0;
aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;
if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0;
+ testcase( pTerm->pExpr->op==TK_IS );
return 1;
}
#endif
@@ -117892,6 +122000,9 @@ static void constructAutomaticIndex(
u8 sentWarning = 0; /* True if a warnning has been issued */
Expr *pPartial = 0; /* Partial Index Expression */
int iContinue = 0; /* Jump here to skip excluded rows */
+ struct SrcList_item *pTabItem; /* FROM clause term being indexed */
+ int addrCounter; /* Address where integer counter is initialized */
+ int regBase; /* Array of registers where record is assembled */
/* Generate code to skip over the creation and initialization of the
** transient index on 2nd and subsequent iterations of the loop. */
@@ -118005,7 +122116,7 @@ static void constructAutomaticIndex(
}
}
assert( n==nKeyCol );
- pIdx->aiColumn[n] = -1;
+ pIdx->aiColumn[n] = XN_ROWID;
pIdx->azColl[n] = "BINARY";
/* Create the automatic index */
@@ -118017,18 +122128,37 @@ static void constructAutomaticIndex(
/* Fill the automatic index with content */
sqlite3ExprCachePush(pParse);
- addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur); VdbeCoverage(v);
+ pTabItem = &pWC->pWInfo->pTabList->a[pLevel->iFrom];
+ if( pTabItem->fg.viaCoroutine ){
+ int regYield = pTabItem->regReturn;
+ addrCounter = sqlite3VdbeAddOp2(v, OP_Integer, 0, 0);
+ sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pTabItem->addrFillSub);
+ addrTop = sqlite3VdbeAddOp1(v, OP_Yield, regYield);
+ VdbeCoverage(v);
+ VdbeComment((v, "next row of \"%s\"", pTabItem->pTab->zName));
+ }else{
+ addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur); VdbeCoverage(v);
+ }
if( pPartial ){
iContinue = sqlite3VdbeMakeLabel(v);
sqlite3ExprIfFalse(pParse, pPartial, iContinue, SQLITE_JUMPIFNULL);
pLoop->wsFlags |= WHERE_PARTIALIDX;
}
regRecord = sqlite3GetTempReg(pParse);
- sqlite3GenerateIndexKey(pParse, pIdx, pLevel->iTabCur, regRecord, 0, 0, 0, 0);
+ regBase = sqlite3GenerateIndexKey(
+ pParse, pIdx, pLevel->iTabCur, regRecord, 0, 0, 0, 0
+ );
sqlite3VdbeAddOp2(v, OP_IdxInsert, pLevel->iIdxCur, regRecord);
sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
if( pPartial ) sqlite3VdbeResolveLabel(v, iContinue);
- sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1); VdbeCoverage(v);
+ if( pTabItem->fg.viaCoroutine ){
+ sqlite3VdbeChangeP2(v, addrCounter, regBase+n);
+ translateColumnToCopy(v, addrTop, pLevel->iTabCur, pTabItem->regResult, 1);
+ sqlite3VdbeGoto(v, addrTop);
+ pTabItem->fg.viaCoroutine = 0;
+ }else{
+ sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1); VdbeCoverage(v);
+ }
sqlite3VdbeChangeP5(v, SQLITE_STMTSTATUS_AUTOINDEX);
sqlite3VdbeJumpHere(v, addrTop);
sqlite3ReleaseTempReg(pParse, regRecord);
@@ -118051,6 +122181,7 @@ end_auto_index_create:
static sqlite3_index_info *allocateIndexInfo(
Parse *pParse,
WhereClause *pWC,
+ Bitmask mUnusable, /* Ignore terms with these prereqs */
struct SrcList_item *pSrc,
ExprList *pOrderBy
){
@@ -118067,12 +122198,15 @@ static sqlite3_index_info *allocateIndexInfo(
** to this virtual table */
for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
if( pTerm->leftCursor != pSrc->iCursor ) continue;
+ if( pTerm->prereqRight & mUnusable ) continue;
assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );
testcase( pTerm->eOperator & WO_IN );
testcase( pTerm->eOperator & WO_ISNULL );
+ testcase( pTerm->eOperator & WO_IS );
testcase( pTerm->eOperator & WO_ALL );
- if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV))==0 ) continue;
+ if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
if( pTerm->wtFlags & TERM_VNULL ) continue;
+ assert( pTerm->u.leftColumn>=(-1) );
nTerm++;
}
@@ -118120,12 +122254,15 @@ static sqlite3_index_info *allocateIndexInfo(
for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
u8 op;
if( pTerm->leftCursor != pSrc->iCursor ) continue;
+ if( pTerm->prereqRight & mUnusable ) continue;
assert( IsPowerOfTwo(pTerm->eOperator & ~WO_EQUIV) );
testcase( pTerm->eOperator & WO_IN );
+ testcase( pTerm->eOperator & WO_IS );
testcase( pTerm->eOperator & WO_ISNULL );
testcase( pTerm->eOperator & WO_ALL );
- if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV))==0 ) continue;
+ if( (pTerm->eOperator & ~(WO_ISNULL|WO_EQUIV|WO_IS))==0 ) continue;
if( pTerm->wtFlags & TERM_VNULL ) continue;
+ assert( pTerm->u.leftColumn>=(-1) );
pIdxCons[j].iColumn = pTerm->u.leftColumn;
pIdxCons[j].iTermOffset = i;
op = (u8)pTerm->eOperator & WO_ALL;
@@ -118416,6 +122553,21 @@ static LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){
return nRet;
}
+
+#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
+/*
+** Return the affinity for a single column of an index.
+*/
+static char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCol){
+ assert( iCol>=0 && iCol<pIdx->nColumn );
+ if( !pIdx->zColAff ){
+ if( sqlite3IndexAffinityStr(db, pIdx)==0 ) return SQLITE_AFF_BLOB;
+ }
+ return pIdx->zColAff[iCol];
+}
+#endif
+
+
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
/*
** This function is called to estimate the number of rows visited by a
@@ -118465,8 +122617,7 @@ static int whereRangeSkipScanEst(
int nLower = -1;
int nUpper = p->nSample+1;
int rc = SQLITE_OK;
- int iCol = p->aiColumn[nEq];
- u8 aff = iCol>=0 ? p->pTable->aCol[iCol].affinity : SQLITE_AFF_INTEGER;
+ u8 aff = sqlite3IndexColumnAffinity(db, p, nEq);
CollSeq *pColl;
sqlite3_value *p1 = 0; /* Value extracted from pLower */
@@ -118614,11 +122765,8 @@ static int whereRangeScanEst(
testcase( pRec->nField!=pBuilder->nRecValid );
pRec->nField = pBuilder->nRecValid;
}
- if( nEq==p->nKeyCol ){
- aff = SQLITE_AFF_INTEGER;
- }else{
- aff = p->pTable->aCol[p->aiColumn[nEq]].affinity;
- }
+ aff = sqlite3IndexColumnAffinity(pParse->db, p, nEq);
+ assert( nEq!=p->nKeyCol || aff==SQLITE_AFF_INTEGER );
/* Determine iLower and iUpper using ($P) only. */
if( nEq==0 ){
iLower = 0;
@@ -118776,7 +122924,7 @@ static int whereEqualScanEst(
return SQLITE_OK;
}
- aff = p->pTable->aCol[p->aiColumn[nEq-1]].affinity;
+ aff = sqlite3IndexColumnAffinity(pParse->db, p, nEq-1);
rc = sqlite3Stat4ProbeSetValue(pParse, p, &pRec, pExpr, aff, nEq-1, &bOk);
pBuilder->pRec = pRec;
if( rc!=SQLITE_OK ) return rc;
@@ -118840,1484 +122988,6 @@ static int whereInScanEst(
}
#endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */
-/*
-** Disable a term in the WHERE clause. Except, do not disable the term
-** if it controls a LEFT OUTER JOIN and it did not originate in the ON
-** or USING clause of that join.
-**
-** Consider the term t2.z='ok' in the following queries:
-**
-** (1) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'
-** (2) SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'
-** (3) SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'
-**
-** The t2.z='ok' is disabled in the in (2) because it originates
-** in the ON clause. The term is disabled in (3) because it is not part
-** of a LEFT OUTER JOIN. In (1), the term is not disabled.
-**
-** Disabling a term causes that term to not be tested in the inner loop
-** of the join. Disabling is an optimization. When terms are satisfied
-** by indices, we disable them to prevent redundant tests in the inner
-** loop. We would get the correct results if nothing were ever disabled,
-** but joins might run a little slower. The trick is to disable as much
-** as we can without disabling too much. If we disabled in (1), we'd get
-** the wrong answer. See ticket #813.
-**
-** If all the children of a term are disabled, then that term is also
-** automatically disabled. In this way, terms get disabled if derived
-** virtual terms are tested first. For example:
-**
-** x GLOB 'abc*' AND x>='abc' AND x<'acd'
-** \___________/ \______/ \_____/
-** parent child1 child2
-**
-** Only the parent term was in the original WHERE clause. The child1
-** and child2 terms were added by the LIKE optimization. If both of
-** the virtual child terms are valid, then testing of the parent can be
-** skipped.
-**
-** Usually the parent term is marked as TERM_CODED. But if the parent
-** term was originally TERM_LIKE, then the parent gets TERM_LIKECOND instead.
-** The TERM_LIKECOND marking indicates that the term should be coded inside
-** a conditional such that is only evaluated on the second pass of a
-** LIKE-optimization loop, when scanning BLOBs instead of strings.
-*/
-static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){
- int nLoop = 0;
- while( pTerm
- && (pTerm->wtFlags & TERM_CODED)==0
- && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_FromJoin))
- && (pLevel->notReady & pTerm->prereqAll)==0
- ){
- if( nLoop && (pTerm->wtFlags & TERM_LIKE)!=0 ){
- pTerm->wtFlags |= TERM_LIKECOND;
- }else{
- pTerm->wtFlags |= TERM_CODED;
- }
- if( pTerm->iParent<0 ) break;
- pTerm = &pTerm->pWC->a[pTerm->iParent];
- pTerm->nChild--;
- if( pTerm->nChild!=0 ) break;
- nLoop++;
- }
-}
-
-/*
-** Code an OP_Affinity opcode to apply the column affinity string zAff
-** to the n registers starting at base.
-**
-** As an optimization, SQLITE_AFF_NONE entries (which are no-ops) at the
-** beginning and end of zAff are ignored. If all entries in zAff are
-** SQLITE_AFF_NONE, then no code gets generated.
-**
-** This routine makes its own copy of zAff so that the caller is free
-** to modify zAff after this routine returns.
-*/
-static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
- Vdbe *v = pParse->pVdbe;
- if( zAff==0 ){
- assert( pParse->db->mallocFailed );
- return;
- }
- assert( v!=0 );
-
- /* Adjust base and n to skip over SQLITE_AFF_NONE entries at the beginning
- ** and end of the affinity string.
- */
- while( n>0 && zAff[0]==SQLITE_AFF_NONE ){
- n--;
- base++;
- zAff++;
- }
- while( n>1 && zAff[n-1]==SQLITE_AFF_NONE ){
- n--;
- }
-
- /* Code the OP_Affinity opcode if there is anything left to do. */
- if( n>0 ){
- sqlite3VdbeAddOp2(v, OP_Affinity, base, n);
- sqlite3VdbeChangeP4(v, -1, zAff, n);
- sqlite3ExprCacheAffinityChange(pParse, base, n);
- }
-}
-
-
-/*
-** Generate code for a single equality term of the WHERE clause. An equality
-** term can be either X=expr or X IN (...). pTerm is the term to be
-** coded.
-**
-** The current value for the constraint is left in register iReg.
-**
-** For a constraint of the form X=expr, the expression is evaluated and its
-** result is left on the stack. For constraints of the form X IN (...)
-** this routine sets up a loop that will iterate over all values of X.
-*/
-static int codeEqualityTerm(
- Parse *pParse, /* The parsing context */
- WhereTerm *pTerm, /* The term of the WHERE clause to be coded */
- WhereLevel *pLevel, /* The level of the FROM clause we are working on */
- int iEq, /* Index of the equality term within this level */
- int bRev, /* True for reverse-order IN operations */
- int iTarget /* Attempt to leave results in this register */
-){
- Expr *pX = pTerm->pExpr;
- Vdbe *v = pParse->pVdbe;
- int iReg; /* Register holding results */
-
- assert( iTarget>0 );
- if( pX->op==TK_EQ ){
- iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
- }else if( pX->op==TK_ISNULL ){
- iReg = iTarget;
- sqlite3VdbeAddOp2(v, OP_Null, 0, iReg);
-#ifndef SQLITE_OMIT_SUBQUERY
- }else{
- int eType;
- int iTab;
- struct InLoop *pIn;
- WhereLoop *pLoop = pLevel->pWLoop;
-
- if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0
- && pLoop->u.btree.pIndex!=0
- && pLoop->u.btree.pIndex->aSortOrder[iEq]
- ){
- testcase( iEq==0 );
- testcase( bRev );
- bRev = !bRev;
- }
- assert( pX->op==TK_IN );
- iReg = iTarget;
- eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0);
- if( eType==IN_INDEX_INDEX_DESC ){
- testcase( bRev );
- bRev = !bRev;
- }
- iTab = pX->iTable;
- sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iTab, 0);
- VdbeCoverageIf(v, bRev);
- VdbeCoverageIf(v, !bRev);
- assert( (pLoop->wsFlags & WHERE_MULTI_OR)==0 );
- pLoop->wsFlags |= WHERE_IN_ABLE;
- if( pLevel->u.in.nIn==0 ){
- pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
- }
- pLevel->u.in.nIn++;
- pLevel->u.in.aInLoop =
- sqlite3DbReallocOrFree(pParse->db, pLevel->u.in.aInLoop,
- sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
- pIn = pLevel->u.in.aInLoop;
- if( pIn ){
- pIn += pLevel->u.in.nIn - 1;
- pIn->iCur = iTab;
- if( eType==IN_INDEX_ROWID ){
- pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iReg);
- }else{
- pIn->addrInTop = sqlite3VdbeAddOp3(v, OP_Column, iTab, 0, iReg);
- }
- pIn->eEndLoopOp = bRev ? OP_PrevIfOpen : OP_NextIfOpen;
- sqlite3VdbeAddOp1(v, OP_IsNull, iReg); VdbeCoverage(v);
- }else{
- pLevel->u.in.nIn = 0;
- }
-#endif
- }
- disableTerm(pLevel, pTerm);
- return iReg;
-}
-
-/*
-** Generate code that will evaluate all == and IN constraints for an
-** index scan.
-**
-** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).
-** Suppose the WHERE clause is this: a==5 AND b IN (1,2,3) AND c>5 AND c<10
-** The index has as many as three equality constraints, but in this
-** example, the third "c" value is an inequality. So only two
-** constraints are coded. This routine will generate code to evaluate
-** a==5 and b IN (1,2,3). The current values for a and b will be stored
-** in consecutive registers and the index of the first register is returned.
-**
-** In the example above nEq==2. But this subroutine works for any value
-** of nEq including 0. If nEq==0, this routine is nearly a no-op.
-** The only thing it does is allocate the pLevel->iMem memory cell and
-** compute the affinity string.
-**
-** The nExtraReg parameter is 0 or 1. It is 0 if all WHERE clause constraints
-** are == or IN and are covered by the nEq. nExtraReg is 1 if there is
-** an inequality constraint (such as the "c>=5 AND c<10" in the example) that
-** occurs after the nEq quality constraints.
-**
-** This routine allocates a range of nEq+nExtraReg memory cells and returns
-** the index of the first memory cell in that range. The code that
-** calls this routine will use that memory range to store keys for
-** start and termination conditions of the loop.
-** key value of the loop. If one or more IN operators appear, then
-** this routine allocates an additional nEq memory cells for internal
-** use.
-**
-** Before returning, *pzAff is set to point to a buffer containing a
-** copy of the column affinity string of the index allocated using
-** sqlite3DbMalloc(). Except, entries in the copy of the string associated
-** with equality constraints that use NONE affinity are set to
-** SQLITE_AFF_NONE. This is to deal with SQL such as the following:
-**
-** CREATE TABLE t1(a TEXT PRIMARY KEY, b);
-** SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;
-**
-** In the example above, the index on t1(a) has TEXT affinity. But since
-** the right hand side of the equality constraint (t2.b) has NONE affinity,
-** no conversion should be attempted before using a t2.b value as part of
-** a key to search the index. Hence the first byte in the returned affinity
-** string in this example would be set to SQLITE_AFF_NONE.
-*/
-static int codeAllEqualityTerms(
- Parse *pParse, /* Parsing context */
- WhereLevel *pLevel, /* Which nested loop of the FROM we are coding */
- int bRev, /* Reverse the order of IN operators */
- int nExtraReg, /* Number of extra registers to allocate */
- char **pzAff /* OUT: Set to point to affinity string */
-){
- u16 nEq; /* The number of == or IN constraints to code */
- u16 nSkip; /* Number of left-most columns to skip */
- Vdbe *v = pParse->pVdbe; /* The vm under construction */
- Index *pIdx; /* The index being used for this loop */
- WhereTerm *pTerm; /* A single constraint term */
- WhereLoop *pLoop; /* The WhereLoop object */
- int j; /* Loop counter */
- int regBase; /* Base register */
- int nReg; /* Number of registers to allocate */
- char *zAff; /* Affinity string to return */
-
- /* This module is only called on query plans that use an index. */
- pLoop = pLevel->pWLoop;
- assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 );
- nEq = pLoop->u.btree.nEq;
- nSkip = pLoop->nSkip;
- pIdx = pLoop->u.btree.pIndex;
- assert( pIdx!=0 );
-
- /* Figure out how many memory cells we will need then allocate them.
- */
- regBase = pParse->nMem + 1;
- nReg = pLoop->u.btree.nEq + nExtraReg;
- pParse->nMem += nReg;
-
- zAff = sqlite3DbStrDup(pParse->db, sqlite3IndexAffinityStr(v, pIdx));
- if( !zAff ){
- pParse->db->mallocFailed = 1;
- }
-
- if( nSkip ){
- int iIdxCur = pLevel->iIdxCur;
- sqlite3VdbeAddOp1(v, (bRev?OP_Last:OP_Rewind), iIdxCur);
- VdbeCoverageIf(v, bRev==0);
- VdbeCoverageIf(v, bRev!=0);
- VdbeComment((v, "begin skip-scan on %s", pIdx->zName));
- j = sqlite3VdbeAddOp0(v, OP_Goto);
- pLevel->addrSkip = sqlite3VdbeAddOp4Int(v, (bRev?OP_SeekLT:OP_SeekGT),
- iIdxCur, 0, regBase, nSkip);
- VdbeCoverageIf(v, bRev==0);
- VdbeCoverageIf(v, bRev!=0);
- sqlite3VdbeJumpHere(v, j);
- for(j=0; j<nSkip; j++){
- sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, j, regBase+j);
- assert( pIdx->aiColumn[j]>=0 );
- VdbeComment((v, "%s", pIdx->pTable->aCol[pIdx->aiColumn[j]].zName));
- }
- }
-
- /* Evaluate the equality constraints
- */
- assert( zAff==0 || (int)strlen(zAff)>=nEq );
- for(j=nSkip; j<nEq; j++){
- int r1;
- pTerm = pLoop->aLTerm[j];
- assert( pTerm!=0 );
- /* The following testcase is true for indices with redundant columns.
- ** Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; */
- testcase( (pTerm->wtFlags & TERM_CODED)!=0 );
- testcase( pTerm->wtFlags & TERM_VIRTUAL );
- r1 = codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, regBase+j);
- if( r1!=regBase+j ){
- if( nReg==1 ){
- sqlite3ReleaseTempReg(pParse, regBase);
- regBase = r1;
- }else{
- sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
- }
- }
- testcase( pTerm->eOperator & WO_ISNULL );
- testcase( pTerm->eOperator & WO_IN );
- if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
- Expr *pRight = pTerm->pExpr->pRight;
- if( sqlite3ExprCanBeNull(pRight) ){
- sqlite3VdbeAddOp2(v, OP_IsNull, regBase+j, pLevel->addrBrk);
- VdbeCoverage(v);
- }
- if( zAff ){
- if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_NONE ){
- zAff[j] = SQLITE_AFF_NONE;
- }
- if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
- zAff[j] = SQLITE_AFF_NONE;
- }
- }
- }
- }
- *pzAff = zAff;
- return regBase;
-}
-
-#ifndef SQLITE_OMIT_EXPLAIN
-/*
-** This routine is a helper for explainIndexRange() below
-**
-** pStr holds the text of an expression that we are building up one term
-** at a time. This routine adds a new term to the end of the expression.
-** Terms are separated by AND so add the "AND" text for second and subsequent
-** terms only.
-*/
-static void explainAppendTerm(
- StrAccum *pStr, /* The text expression being built */
- int iTerm, /* Index of this term. First is zero */
- const char *zColumn, /* Name of the column */
- const char *zOp /* Name of the operator */
-){
- if( iTerm ) sqlite3StrAccumAppend(pStr, " AND ", 5);
- sqlite3StrAccumAppendAll(pStr, zColumn);
- sqlite3StrAccumAppend(pStr, zOp, 1);
- sqlite3StrAccumAppend(pStr, "?", 1);
-}
-
-/*
-** Argument pLevel describes a strategy for scanning table pTab. This
-** function appends text to pStr that describes the subset of table
-** rows scanned by the strategy in the form of an SQL expression.
-**
-** For example, if the query:
-**
-** SELECT * FROM t1 WHERE a=1 AND b>2;
-**
-** is run and there is an index on (a, b), then this function returns a
-** string similar to:
-**
-** "a=? AND b>?"
-*/
-static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop, Table *pTab){
- Index *pIndex = pLoop->u.btree.pIndex;
- u16 nEq = pLoop->u.btree.nEq;
- u16 nSkip = pLoop->nSkip;
- int i, j;
- Column *aCol = pTab->aCol;
- i16 *aiColumn = pIndex->aiColumn;
-
- if( nEq==0 && (pLoop->wsFlags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ) return;
- sqlite3StrAccumAppend(pStr, " (", 2);
- for(i=0; i<nEq; i++){
- char *z = aiColumn[i] < 0 ? "rowid" : aCol[aiColumn[i]].zName;
- if( i>=nSkip ){
- explainAppendTerm(pStr, i, z, "=");
- }else{
- if( i ) sqlite3StrAccumAppend(pStr, " AND ", 5);
- sqlite3XPrintf(pStr, 0, "ANY(%s)", z);
- }
- }
-
- j = i;
- if( pLoop->wsFlags&WHERE_BTM_LIMIT ){
- char *z = aiColumn[j] < 0 ? "rowid" : aCol[aiColumn[j]].zName;
- explainAppendTerm(pStr, i++, z, ">");
- }
- if( pLoop->wsFlags&WHERE_TOP_LIMIT ){
- char *z = aiColumn[j] < 0 ? "rowid" : aCol[aiColumn[j]].zName;
- explainAppendTerm(pStr, i, z, "<");
- }
- sqlite3StrAccumAppend(pStr, ")", 1);
-}
-
-/*
-** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
-** command, or if either SQLITE_DEBUG or SQLITE_ENABLE_STMT_SCANSTATUS was
-** defined at compile-time. If it is not a no-op, a single OP_Explain opcode
-** is added to the output to describe the table scan strategy in pLevel.
-**
-** If an OP_Explain opcode is added to the VM, its address is returned.
-** Otherwise, if no OP_Explain is coded, zero is returned.
-*/
-static int explainOneScan(
- Parse *pParse, /* Parse context */
- SrcList *pTabList, /* Table list this loop refers to */
- WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */
- int iLevel, /* Value for "level" column of output */
- int iFrom, /* Value for "from" column of output */
- u16 wctrlFlags /* Flags passed to sqlite3WhereBegin() */
-){
- int ret = 0;
-#if !defined(SQLITE_DEBUG) && !defined(SQLITE_ENABLE_STMT_SCANSTATUS)
- if( pParse->explain==2 )
-#endif
- {
- struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];
- Vdbe *v = pParse->pVdbe; /* VM being constructed */
- sqlite3 *db = pParse->db; /* Database handle */
- int iId = pParse->iSelectId; /* Select id (left-most output column) */
- int isSearch; /* True for a SEARCH. False for SCAN. */
- WhereLoop *pLoop; /* The controlling WhereLoop object */
- u32 flags; /* Flags that describe this loop */
- char *zMsg; /* Text to add to EQP output */
- StrAccum str; /* EQP output string */
- char zBuf[100]; /* Initial space for EQP output string */
-
- pLoop = pLevel->pWLoop;
- flags = pLoop->wsFlags;
- if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_ONETABLE_ONLY) ) return 0;
-
- isSearch = (flags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0
- || ((flags&WHERE_VIRTUALTABLE)==0 && (pLoop->u.btree.nEq>0))
- || (wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX));
-
- sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
- sqlite3StrAccumAppendAll(&str, isSearch ? "SEARCH" : "SCAN");
- if( pItem->pSelect ){
- sqlite3XPrintf(&str, 0, " SUBQUERY %d", pItem->iSelectId);
- }else{
- sqlite3XPrintf(&str, 0, " TABLE %s", pItem->zName);
- }
-
- if( pItem->zAlias ){
- sqlite3XPrintf(&str, 0, " AS %s", pItem->zAlias);
- }
- if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
- const char *zFmt = 0;
- Index *pIdx;
-
- assert( pLoop->u.btree.pIndex!=0 );
- pIdx = pLoop->u.btree.pIndex;
- assert( !(flags&WHERE_AUTO_INDEX) || (flags&WHERE_IDX_ONLY) );
- if( !HasRowid(pItem->pTab) && IsPrimaryKeyIndex(pIdx) ){
- if( isSearch ){
- zFmt = "PRIMARY KEY";
- }
- }else if( flags & WHERE_PARTIALIDX ){
- zFmt = "AUTOMATIC PARTIAL COVERING INDEX";
- }else if( flags & WHERE_AUTO_INDEX ){
- zFmt = "AUTOMATIC COVERING INDEX";
- }else if( flags & WHERE_IDX_ONLY ){
- zFmt = "COVERING INDEX %s";
- }else{
- zFmt = "INDEX %s";
- }
- if( zFmt ){
- sqlite3StrAccumAppend(&str, " USING ", 7);
- sqlite3XPrintf(&str, 0, zFmt, pIdx->zName);
- explainIndexRange(&str, pLoop, pItem->pTab);
- }
- }else if( (flags & WHERE_IPK)!=0 && (flags & WHERE_CONSTRAINT)!=0 ){
- const char *zRange;
- if( flags&(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) ){
- zRange = "(rowid=?)";
- }else if( (flags&WHERE_BOTH_LIMIT)==WHERE_BOTH_LIMIT ){
- zRange = "(rowid>? AND rowid<?)";
- }else if( flags&WHERE_BTM_LIMIT ){
- zRange = "(rowid>?)";
- }else{
- assert( flags&WHERE_TOP_LIMIT);
- zRange = "(rowid<?)";
- }
- sqlite3StrAccumAppendAll(&str, " USING INTEGER PRIMARY KEY ");
- sqlite3StrAccumAppendAll(&str, zRange);
- }
-#ifndef SQLITE_OMIT_VIRTUALTABLE
- else if( (flags & WHERE_VIRTUALTABLE)!=0 ){
- sqlite3XPrintf(&str, 0, " VIRTUAL TABLE INDEX %d:%s",
- pLoop->u.vtab.idxNum, pLoop->u.vtab.idxStr);
- }
-#endif
-#ifdef SQLITE_EXPLAIN_ESTIMATED_ROWS
- if( pLoop->nOut>=10 ){
- sqlite3XPrintf(&str, 0, " (~%llu rows)", sqlite3LogEstToInt(pLoop->nOut));
- }else{
- sqlite3StrAccumAppend(&str, " (~1 row)", 9);
- }
-#endif
- zMsg = sqlite3StrAccumFinish(&str);
- ret = sqlite3VdbeAddOp4(v, OP_Explain, iId, iLevel, iFrom, zMsg,P4_DYNAMIC);
- }
- return ret;
-}
-#else
-# define explainOneScan(u,v,w,x,y,z) 0
-#endif /* SQLITE_OMIT_EXPLAIN */
-
-#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
-/*
-** Configure the VM passed as the first argument with an
-** sqlite3_stmt_scanstatus() entry corresponding to the scan used to
-** implement level pLvl. Argument pSrclist is a pointer to the FROM
-** clause that the scan reads data from.
-**
-** If argument addrExplain is not 0, it must be the address of an
-** OP_Explain instruction that describes the same loop.
-*/
-static void addScanStatus(
- Vdbe *v, /* Vdbe to add scanstatus entry to */
- SrcList *pSrclist, /* FROM clause pLvl reads data from */
- WhereLevel *pLvl, /* Level to add scanstatus() entry for */
- int addrExplain /* Address of OP_Explain (or 0) */
-){
- const char *zObj = 0;
- WhereLoop *pLoop = pLvl->pWLoop;
- if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==0 && pLoop->u.btree.pIndex!=0 ){
- zObj = pLoop->u.btree.pIndex->zName;
- }else{
- zObj = pSrclist->a[pLvl->iFrom].zName;
- }
- sqlite3VdbeScanStatus(
- v, addrExplain, pLvl->addrBody, pLvl->addrVisit, pLoop->nOut, zObj
- );
-}
-#else
-# define addScanStatus(a, b, c, d) ((void)d)
-#endif
-
-/*
-** If the most recently coded instruction is a constant range contraint
-** that originated from the LIKE optimization, then change the P3 to be
-** pLoop->iLikeRepCntr and set P5.
-**
-** The LIKE optimization trys to evaluate "x LIKE 'abc%'" as a range
-** expression: "x>='ABC' AND x<'abd'". But this requires that the range
-** scan loop run twice, once for strings and a second time for BLOBs.
-** The OP_String opcodes on the second pass convert the upper and lower
-** bound string contants to blobs. This routine makes the necessary changes
-** to the OP_String opcodes for that to happen.
-*/
-static void whereLikeOptimizationStringFixup(
- Vdbe *v, /* prepared statement under construction */
- WhereLevel *pLevel, /* The loop that contains the LIKE operator */
- WhereTerm *pTerm /* The upper or lower bound just coded */
-){
- if( pTerm->wtFlags & TERM_LIKEOPT ){
- VdbeOp *pOp;
- assert( pLevel->iLikeRepCntr>0 );
- pOp = sqlite3VdbeGetOp(v, -1);
- assert( pOp!=0 );
- assert( pOp->opcode==OP_String8
- || pTerm->pWC->pWInfo->pParse->db->mallocFailed );
- pOp->p3 = pLevel->iLikeRepCntr;
- pOp->p5 = 1;
- }
-}
-
-/*
-** Generate code for the start of the iLevel-th loop in the WHERE clause
-** implementation described by pWInfo.
-*/
-static Bitmask codeOneLoopStart(
- WhereInfo *pWInfo, /* Complete information about the WHERE clause */
- int iLevel, /* Which level of pWInfo->a[] should be coded */
- Bitmask notReady /* Which tables are currently available */
-){
- int j, k; /* Loop counters */
- int iCur; /* The VDBE cursor for the table */
- int addrNxt; /* Where to jump to continue with the next IN case */
- int omitTable; /* True if we use the index only */
- int bRev; /* True if we need to scan in reverse order */
- WhereLevel *pLevel; /* The where level to be coded */
- WhereLoop *pLoop; /* The WhereLoop object being coded */
- WhereClause *pWC; /* Decomposition of the entire WHERE clause */
- WhereTerm *pTerm; /* A WHERE clause term */
- Parse *pParse; /* Parsing context */
- sqlite3 *db; /* Database connection */
- Vdbe *v; /* The prepared stmt under constructions */
- struct SrcList_item *pTabItem; /* FROM clause term being coded */
- int addrBrk; /* Jump here to break out of the loop */
- int addrCont; /* Jump here to continue with next cycle */
- int iRowidReg = 0; /* Rowid is stored in this register, if not zero */
- int iReleaseReg = 0; /* Temp register to free before returning */
-
- pParse = pWInfo->pParse;
- v = pParse->pVdbe;
- pWC = &pWInfo->sWC;
- db = pParse->db;
- pLevel = &pWInfo->a[iLevel];
- pLoop = pLevel->pWLoop;
- pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];
- iCur = pTabItem->iCursor;
- pLevel->notReady = notReady & ~getMask(&pWInfo->sMaskSet, iCur);
- bRev = (pWInfo->revMask>>iLevel)&1;
- omitTable = (pLoop->wsFlags & WHERE_IDX_ONLY)!=0
- && (pWInfo->wctrlFlags & WHERE_FORCE_TABLE)==0;
- VdbeModuleComment((v, "Begin WHERE-loop%d: %s",iLevel,pTabItem->pTab->zName));
-
- /* Create labels for the "break" and "continue" instructions
- ** for the current loop. Jump to addrBrk to break out of a loop.
- ** Jump to cont to go immediately to the next iteration of the
- ** loop.
- **
- ** When there is an IN operator, we also have a "addrNxt" label that
- ** means to continue with the next IN value combination. When
- ** there are no IN operators in the constraints, the "addrNxt" label
- ** is the same as "addrBrk".
- */
- addrBrk = pLevel->addrBrk = pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
- addrCont = pLevel->addrCont = sqlite3VdbeMakeLabel(v);
-
- /* If this is the right table of a LEFT OUTER JOIN, allocate and
- ** initialize a memory cell that records if this table matches any
- ** row of the left table of the join.
- */
- if( pLevel->iFrom>0 && (pTabItem[0].jointype & JT_LEFT)!=0 ){
- pLevel->iLeftJoin = ++pParse->nMem;
- sqlite3VdbeAddOp2(v, OP_Integer, 0, pLevel->iLeftJoin);
- VdbeComment((v, "init LEFT JOIN no-match flag"));
- }
-
- /* Special case of a FROM clause subquery implemented as a co-routine */
- if( pTabItem->viaCoroutine ){
- int regYield = pTabItem->regReturn;
- sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pTabItem->addrFillSub);
- pLevel->p2 = sqlite3VdbeAddOp2(v, OP_Yield, regYield, addrBrk);
- VdbeCoverage(v);
- VdbeComment((v, "next row of \"%s\"", pTabItem->pTab->zName));
- pLevel->op = OP_Goto;
- }else
-
-#ifndef SQLITE_OMIT_VIRTUALTABLE
- if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 ){
- /* Case 1: The table is a virtual-table. Use the VFilter and VNext
- ** to access the data.
- */
- int iReg; /* P3 Value for OP_VFilter */
- int addrNotFound;
- int nConstraint = pLoop->nLTerm;
-
- sqlite3ExprCachePush(pParse);
- iReg = sqlite3GetTempRange(pParse, nConstraint+2);
- addrNotFound = pLevel->addrBrk;
- for(j=0; j<nConstraint; j++){
- int iTarget = iReg+j+2;
- pTerm = pLoop->aLTerm[j];
- if( pTerm==0 ) continue;
- if( pTerm->eOperator & WO_IN ){
- codeEqualityTerm(pParse, pTerm, pLevel, j, bRev, iTarget);
- addrNotFound = pLevel->addrNxt;
- }else{
- sqlite3ExprCode(pParse, pTerm->pExpr->pRight, iTarget);
- }
- }
- sqlite3VdbeAddOp2(v, OP_Integer, pLoop->u.vtab.idxNum, iReg);
- sqlite3VdbeAddOp2(v, OP_Integer, nConstraint, iReg+1);
- sqlite3VdbeAddOp4(v, OP_VFilter, iCur, addrNotFound, iReg,
- pLoop->u.vtab.idxStr,
- pLoop->u.vtab.needFree ? P4_MPRINTF : P4_STATIC);
- VdbeCoverage(v);
- pLoop->u.vtab.needFree = 0;
- for(j=0; j<nConstraint && j<16; j++){
- if( (pLoop->u.vtab.omitMask>>j)&1 ){
- disableTerm(pLevel, pLoop->aLTerm[j]);
- }
- }
- pLevel->op = OP_VNext;
- pLevel->p1 = iCur;
- pLevel->p2 = sqlite3VdbeCurrentAddr(v);
- sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
- sqlite3ExprCachePop(pParse);
- }else
-#endif /* SQLITE_OMIT_VIRTUALTABLE */
-
- if( (pLoop->wsFlags & WHERE_IPK)!=0
- && (pLoop->wsFlags & (WHERE_COLUMN_IN|WHERE_COLUMN_EQ))!=0
- ){
- /* Case 2: We can directly reference a single row using an
- ** equality comparison against the ROWID field. Or
- ** we reference multiple rows using a "rowid IN (...)"
- ** construct.
- */
- assert( pLoop->u.btree.nEq==1 );
- pTerm = pLoop->aLTerm[0];
- assert( pTerm!=0 );
- assert( pTerm->pExpr!=0 );
- assert( omitTable==0 );
- testcase( pTerm->wtFlags & TERM_VIRTUAL );
- iReleaseReg = ++pParse->nMem;
- iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);
- if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg);
- addrNxt = pLevel->addrNxt;
- sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt); VdbeCoverage(v);
- sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addrNxt, iRowidReg);
- VdbeCoverage(v);
- sqlite3ExprCacheAffinityChange(pParse, iRowidReg, 1);
- sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
- VdbeComment((v, "pk"));
- pLevel->op = OP_Noop;
- }else if( (pLoop->wsFlags & WHERE_IPK)!=0
- && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
- ){
- /* Case 3: We have an inequality comparison against the ROWID field.
- */
- int testOp = OP_Noop;
- int start;
- int memEndValue = 0;
- WhereTerm *pStart, *pEnd;
-
- assert( omitTable==0 );
- j = 0;
- pStart = pEnd = 0;
- if( pLoop->wsFlags & WHERE_BTM_LIMIT ) pStart = pLoop->aLTerm[j++];
- if( pLoop->wsFlags & WHERE_TOP_LIMIT ) pEnd = pLoop->aLTerm[j++];
- assert( pStart!=0 || pEnd!=0 );
- if( bRev ){
- pTerm = pStart;
- pStart = pEnd;
- pEnd = pTerm;
- }
- if( pStart ){
- Expr *pX; /* The expression that defines the start bound */
- int r1, rTemp; /* Registers for holding the start boundary */
-
- /* The following constant maps TK_xx codes into corresponding
- ** seek opcodes. It depends on a particular ordering of TK_xx
- */
- const u8 aMoveOp[] = {
- /* TK_GT */ OP_SeekGT,
- /* TK_LE */ OP_SeekLE,
- /* TK_LT */ OP_SeekLT,
- /* TK_GE */ OP_SeekGE
- };
- assert( TK_LE==TK_GT+1 ); /* Make sure the ordering.. */
- assert( TK_LT==TK_GT+2 ); /* ... of the TK_xx values... */
- assert( TK_GE==TK_GT+3 ); /* ... is correcct. */
-
- assert( (pStart->wtFlags & TERM_VNULL)==0 );
- testcase( pStart->wtFlags & TERM_VIRTUAL );
- pX = pStart->pExpr;
- assert( pX!=0 );
- testcase( pStart->leftCursor!=iCur ); /* transitive constraints */
- r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
- sqlite3VdbeAddOp3(v, aMoveOp[pX->op-TK_GT], iCur, addrBrk, r1);
- VdbeComment((v, "pk"));
- VdbeCoverageIf(v, pX->op==TK_GT);
- VdbeCoverageIf(v, pX->op==TK_LE);
- VdbeCoverageIf(v, pX->op==TK_LT);
- VdbeCoverageIf(v, pX->op==TK_GE);
- sqlite3ExprCacheAffinityChange(pParse, r1, 1);
- sqlite3ReleaseTempReg(pParse, rTemp);
- disableTerm(pLevel, pStart);
- }else{
- sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iCur, addrBrk);
- VdbeCoverageIf(v, bRev==0);
- VdbeCoverageIf(v, bRev!=0);
- }
- if( pEnd ){
- Expr *pX;
- pX = pEnd->pExpr;
- assert( pX!=0 );
- assert( (pEnd->wtFlags & TERM_VNULL)==0 );
- testcase( pEnd->leftCursor!=iCur ); /* Transitive constraints */
- testcase( pEnd->wtFlags & TERM_VIRTUAL );
- memEndValue = ++pParse->nMem;
- sqlite3ExprCode(pParse, pX->pRight, memEndValue);
- if( pX->op==TK_LT || pX->op==TK_GT ){
- testOp = bRev ? OP_Le : OP_Ge;
- }else{
- testOp = bRev ? OP_Lt : OP_Gt;
- }
- disableTerm(pLevel, pEnd);
- }
- start = sqlite3VdbeCurrentAddr(v);
- pLevel->op = bRev ? OP_Prev : OP_Next;
- pLevel->p1 = iCur;
- pLevel->p2 = start;
- assert( pLevel->p5==0 );
- if( testOp!=OP_Noop ){
- iRowidReg = ++pParse->nMem;
- sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);
- sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
- sqlite3VdbeAddOp3(v, testOp, memEndValue, addrBrk, iRowidReg);
- VdbeCoverageIf(v, testOp==OP_Le);
- VdbeCoverageIf(v, testOp==OP_Lt);
- VdbeCoverageIf(v, testOp==OP_Ge);
- VdbeCoverageIf(v, testOp==OP_Gt);
- sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL);
- }
- }else if( pLoop->wsFlags & WHERE_INDEXED ){
- /* Case 4: A scan using an index.
- **
- ** The WHERE clause may contain zero or more equality
- ** terms ("==" or "IN" operators) that refer to the N
- ** left-most columns of the index. It may also contain
- ** inequality constraints (>, <, >= or <=) on the indexed
- ** column that immediately follows the N equalities. Only
- ** the right-most column can be an inequality - the rest must
- ** use the "==" and "IN" operators. For example, if the
- ** index is on (x,y,z), then the following clauses are all
- ** optimized:
- **
- ** x=5
- ** x=5 AND y=10
- ** x=5 AND y<10
- ** x=5 AND y>5 AND y<10
- ** x=5 AND y=5 AND z<=10
- **
- ** The z<10 term of the following cannot be used, only
- ** the x=5 term:
- **
- ** x=5 AND z<10
- **
- ** N may be zero if there are inequality constraints.
- ** If there are no inequality constraints, then N is at
- ** least one.
- **
- ** This case is also used when there are no WHERE clause
- ** constraints but an index is selected anyway, in order
- ** to force the output order to conform to an ORDER BY.
- */
- static const u8 aStartOp[] = {
- 0,
- 0,
- OP_Rewind, /* 2: (!start_constraints && startEq && !bRev) */
- OP_Last, /* 3: (!start_constraints && startEq && bRev) */
- OP_SeekGT, /* 4: (start_constraints && !startEq && !bRev) */
- OP_SeekLT, /* 5: (start_constraints && !startEq && bRev) */
- OP_SeekGE, /* 6: (start_constraints && startEq && !bRev) */
- OP_SeekLE /* 7: (start_constraints && startEq && bRev) */
- };
- static const u8 aEndOp[] = {
- OP_IdxGE, /* 0: (end_constraints && !bRev && !endEq) */
- OP_IdxGT, /* 1: (end_constraints && !bRev && endEq) */
- OP_IdxLE, /* 2: (end_constraints && bRev && !endEq) */
- OP_IdxLT, /* 3: (end_constraints && bRev && endEq) */
- };
- u16 nEq = pLoop->u.btree.nEq; /* Number of == or IN terms */
- int regBase; /* Base register holding constraint values */
- WhereTerm *pRangeStart = 0; /* Inequality constraint at range start */
- WhereTerm *pRangeEnd = 0; /* Inequality constraint at range end */
- int startEq; /* True if range start uses ==, >= or <= */
- int endEq; /* True if range end uses ==, >= or <= */
- int start_constraints; /* Start of range is constrained */
- int nConstraint; /* Number of constraint terms */
- Index *pIdx; /* The index we will be using */
- int iIdxCur; /* The VDBE cursor for the index */
- int nExtraReg = 0; /* Number of extra registers needed */
- int op; /* Instruction opcode */
- char *zStartAff; /* Affinity for start of range constraint */
- char cEndAff = 0; /* Affinity for end of range constraint */
- u8 bSeekPastNull = 0; /* True to seek past initial nulls */
- u8 bStopAtNull = 0; /* Add condition to terminate at NULLs */
-
- pIdx = pLoop->u.btree.pIndex;
- iIdxCur = pLevel->iIdxCur;
- assert( nEq>=pLoop->nSkip );
-
- /* If this loop satisfies a sort order (pOrderBy) request that
- ** was passed to this function to implement a "SELECT min(x) ..."
- ** query, then the caller will only allow the loop to run for
- ** a single iteration. This means that the first row returned
- ** should not have a NULL value stored in 'x'. If column 'x' is
- ** the first one after the nEq equality constraints in the index,
- ** this requires some special handling.
- */
- assert( pWInfo->pOrderBy==0
- || pWInfo->pOrderBy->nExpr==1
- || (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)==0 );
- if( (pWInfo->wctrlFlags&WHERE_ORDERBY_MIN)!=0
- && pWInfo->nOBSat>0
- && (pIdx->nKeyCol>nEq)
- ){
- assert( pLoop->nSkip==0 );
- bSeekPastNull = 1;
- nExtraReg = 1;
- }
-
- /* Find any inequality constraint terms for the start and end
- ** of the range.
- */
- j = nEq;
- if( pLoop->wsFlags & WHERE_BTM_LIMIT ){
- pRangeStart = pLoop->aLTerm[j++];
- nExtraReg = 1;
- /* Like optimization range constraints always occur in pairs */
- assert( (pRangeStart->wtFlags & TERM_LIKEOPT)==0 ||
- (pLoop->wsFlags & WHERE_TOP_LIMIT)!=0 );
- }
- if( pLoop->wsFlags & WHERE_TOP_LIMIT ){
- pRangeEnd = pLoop->aLTerm[j++];
- nExtraReg = 1;
- if( (pRangeEnd->wtFlags & TERM_LIKEOPT)!=0 ){
- assert( pRangeStart!=0 ); /* LIKE opt constraints */
- assert( pRangeStart->wtFlags & TERM_LIKEOPT ); /* occur in pairs */
- pLevel->iLikeRepCntr = ++pParse->nMem;
- testcase( bRev );
- testcase( pIdx->aSortOrder[nEq]==SQLITE_SO_DESC );
- sqlite3VdbeAddOp2(v, OP_Integer,
- bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC),
- pLevel->iLikeRepCntr);
- VdbeComment((v, "LIKE loop counter"));
- pLevel->addrLikeRep = sqlite3VdbeCurrentAddr(v);
- }
- if( pRangeStart==0
- && (j = pIdx->aiColumn[nEq])>=0
- && pIdx->pTable->aCol[j].notNull==0
- ){
- bSeekPastNull = 1;
- }
- }
- assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
-
- /* Generate code to evaluate all constraint terms using == or IN
- ** and store the values of those terms in an array of registers
- ** starting at regBase.
- */
- regBase = codeAllEqualityTerms(pParse,pLevel,bRev,nExtraReg,&zStartAff);
- assert( zStartAff==0 || sqlite3Strlen30(zStartAff)>=nEq );
- if( zStartAff ) cEndAff = zStartAff[nEq];
- addrNxt = pLevel->addrNxt;
-
- /* If we are doing a reverse order scan on an ascending index, or
- ** a forward order scan on a descending index, interchange the
- ** start and end terms (pRangeStart and pRangeEnd).
- */
- if( (nEq<pIdx->nKeyCol && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC))
- || (bRev && pIdx->nKeyCol==nEq)
- ){
- SWAP(WhereTerm *, pRangeEnd, pRangeStart);
- SWAP(u8, bSeekPastNull, bStopAtNull);
- }
-
- testcase( pRangeStart && (pRangeStart->eOperator & WO_LE)!=0 );
- testcase( pRangeStart && (pRangeStart->eOperator & WO_GE)!=0 );
- testcase( pRangeEnd && (pRangeEnd->eOperator & WO_LE)!=0 );
- testcase( pRangeEnd && (pRangeEnd->eOperator & WO_GE)!=0 );
- startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);
- endEq = !pRangeEnd || pRangeEnd->eOperator & (WO_LE|WO_GE);
- start_constraints = pRangeStart || nEq>0;
-
- /* Seek the index cursor to the start of the range. */
- nConstraint = nEq;
- if( pRangeStart ){
- Expr *pRight = pRangeStart->pExpr->pRight;
- sqlite3ExprCode(pParse, pRight, regBase+nEq);
- whereLikeOptimizationStringFixup(v, pLevel, pRangeStart);
- if( (pRangeStart->wtFlags & TERM_VNULL)==0
- && sqlite3ExprCanBeNull(pRight)
- ){
- sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
- VdbeCoverage(v);
- }
- if( zStartAff ){
- if( sqlite3CompareAffinity(pRight, zStartAff[nEq])==SQLITE_AFF_NONE){
- /* Since the comparison is to be performed with no conversions
- ** applied to the operands, set the affinity to apply to pRight to
- ** SQLITE_AFF_NONE. */
- zStartAff[nEq] = SQLITE_AFF_NONE;
- }
- if( sqlite3ExprNeedsNoAffinityChange(pRight, zStartAff[nEq]) ){
- zStartAff[nEq] = SQLITE_AFF_NONE;
- }
- }
- nConstraint++;
- testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
- }else if( bSeekPastNull ){
- sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
- nConstraint++;
- startEq = 0;
- start_constraints = 1;
- }
- codeApplyAffinity(pParse, regBase, nConstraint - bSeekPastNull, zStartAff);
- op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev];
- assert( op!=0 );
- sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);
- VdbeCoverage(v);
- VdbeCoverageIf(v, op==OP_Rewind); testcase( op==OP_Rewind );
- VdbeCoverageIf(v, op==OP_Last); testcase( op==OP_Last );
- VdbeCoverageIf(v, op==OP_SeekGT); testcase( op==OP_SeekGT );
- VdbeCoverageIf(v, op==OP_SeekGE); testcase( op==OP_SeekGE );
- VdbeCoverageIf(v, op==OP_SeekLE); testcase( op==OP_SeekLE );
- VdbeCoverageIf(v, op==OP_SeekLT); testcase( op==OP_SeekLT );
-
- /* Load the value for the inequality constraint at the end of the
- ** range (if any).
- */
- nConstraint = nEq;
- if( pRangeEnd ){
- Expr *pRight = pRangeEnd->pExpr->pRight;
- sqlite3ExprCacheRemove(pParse, regBase+nEq, 1);
- sqlite3ExprCode(pParse, pRight, regBase+nEq);
- whereLikeOptimizationStringFixup(v, pLevel, pRangeEnd);
- if( (pRangeEnd->wtFlags & TERM_VNULL)==0
- && sqlite3ExprCanBeNull(pRight)
- ){
- sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
- VdbeCoverage(v);
- }
- if( sqlite3CompareAffinity(pRight, cEndAff)!=SQLITE_AFF_NONE
- && !sqlite3ExprNeedsNoAffinityChange(pRight, cEndAff)
- ){
- codeApplyAffinity(pParse, regBase+nEq, 1, &cEndAff);
- }
- nConstraint++;
- testcase( pRangeEnd->wtFlags & TERM_VIRTUAL );
- }else if( bStopAtNull ){
- sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
- endEq = 0;
- nConstraint++;
- }
- sqlite3DbFree(db, zStartAff);
-
- /* Top of the loop body */
- pLevel->p2 = sqlite3VdbeCurrentAddr(v);
-
- /* Check if the index cursor is past the end of the range. */
- if( nConstraint ){
- op = aEndOp[bRev*2 + endEq];
- sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);
- testcase( op==OP_IdxGT ); VdbeCoverageIf(v, op==OP_IdxGT );
- testcase( op==OP_IdxGE ); VdbeCoverageIf(v, op==OP_IdxGE );
- testcase( op==OP_IdxLT ); VdbeCoverageIf(v, op==OP_IdxLT );
- testcase( op==OP_IdxLE ); VdbeCoverageIf(v, op==OP_IdxLE );
- }
-
- /* Seek the table cursor, if required */
- disableTerm(pLevel, pRangeStart);
- disableTerm(pLevel, pRangeEnd);
- if( omitTable ){
- /* pIdx is a covering index. No need to access the main table. */
- }else if( HasRowid(pIdx->pTable) ){
- iRowidReg = ++pParse->nMem;
- sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, iRowidReg);
- sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
- sqlite3VdbeAddOp2(v, OP_Seek, iCur, iRowidReg); /* Deferred seek */
- }else if( iCur!=iIdxCur ){
- Index *pPk = sqlite3PrimaryKeyIndex(pIdx->pTable);
- iRowidReg = sqlite3GetTempRange(pParse, pPk->nKeyCol);
- for(j=0; j<pPk->nKeyCol; j++){
- k = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[j]);
- sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, iRowidReg+j);
- }
- sqlite3VdbeAddOp4Int(v, OP_NotFound, iCur, addrCont,
- iRowidReg, pPk->nKeyCol); VdbeCoverage(v);
- }
-
- /* Record the instruction used to terminate the loop. Disable
- ** WHERE clause terms made redundant by the index range scan.
- */
- if( pLoop->wsFlags & WHERE_ONEROW ){
- pLevel->op = OP_Noop;
- }else if( bRev ){
- pLevel->op = OP_Prev;
- }else{
- pLevel->op = OP_Next;
- }
- pLevel->p1 = iIdxCur;
- pLevel->p3 = (pLoop->wsFlags&WHERE_UNQ_WANTED)!=0 ? 1:0;
- if( (pLoop->wsFlags & WHERE_CONSTRAINT)==0 ){
- pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
- }else{
- assert( pLevel->p5==0 );
- }
- }else
-
-#ifndef SQLITE_OMIT_OR_OPTIMIZATION
- if( pLoop->wsFlags & WHERE_MULTI_OR ){
- /* Case 5: Two or more separately indexed terms connected by OR
- **
- ** Example:
- **
- ** CREATE TABLE t1(a,b,c,d);
- ** CREATE INDEX i1 ON t1(a);
- ** CREATE INDEX i2 ON t1(b);
- ** CREATE INDEX i3 ON t1(c);
- **
- ** SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13)
- **
- ** In the example, there are three indexed terms connected by OR.
- ** The top of the loop looks like this:
- **
- ** Null 1 # Zero the rowset in reg 1
- **
- ** Then, for each indexed term, the following. The arguments to
- ** RowSetTest are such that the rowid of the current row is inserted
- ** into the RowSet. If it is already present, control skips the
- ** Gosub opcode and jumps straight to the code generated by WhereEnd().
- **
- ** sqlite3WhereBegin(<term>)
- ** RowSetTest # Insert rowid into rowset
- ** Gosub 2 A
- ** sqlite3WhereEnd()
- **
- ** Following the above, code to terminate the loop. Label A, the target
- ** of the Gosub above, jumps to the instruction right after the Goto.
- **
- ** Null 1 # Zero the rowset in reg 1
- ** Goto B # The loop is finished.
- **
- ** A: <loop body> # Return data, whatever.
- **
- ** Return 2 # Jump back to the Gosub
- **
- ** B: <after the loop>
- **
- ** Added 2014-05-26: If the table is a WITHOUT ROWID table, then
- ** use an ephemeral index instead of a RowSet to record the primary
- ** keys of the rows we have already seen.
- **
- */
- WhereClause *pOrWc; /* The OR-clause broken out into subterms */
- SrcList *pOrTab; /* Shortened table list or OR-clause generation */
- Index *pCov = 0; /* Potential covering index (or NULL) */
- int iCovCur = pParse->nTab++; /* Cursor used for index scans (if any) */
-
- int regReturn = ++pParse->nMem; /* Register used with OP_Gosub */
- int regRowset = 0; /* Register for RowSet object */
- int regRowid = 0; /* Register holding rowid */
- int iLoopBody = sqlite3VdbeMakeLabel(v); /* Start of loop body */
- int iRetInit; /* Address of regReturn init */
- int untestedTerms = 0; /* Some terms not completely tested */
- int ii; /* Loop counter */
- u16 wctrlFlags; /* Flags for sub-WHERE clause */
- Expr *pAndExpr = 0; /* An ".. AND (...)" expression */
- Table *pTab = pTabItem->pTab;
-
- pTerm = pLoop->aLTerm[0];
- assert( pTerm!=0 );
- assert( pTerm->eOperator & WO_OR );
- assert( (pTerm->wtFlags & TERM_ORINFO)!=0 );
- pOrWc = &pTerm->u.pOrInfo->wc;
- pLevel->op = OP_Return;
- pLevel->p1 = regReturn;
-
- /* Set up a new SrcList in pOrTab containing the table being scanned
- ** by this loop in the a[0] slot and all notReady tables in a[1..] slots.
- ** This becomes the SrcList in the recursive call to sqlite3WhereBegin().
- */
- if( pWInfo->nLevel>1 ){
- int nNotReady; /* The number of notReady tables */
- struct SrcList_item *origSrc; /* Original list of tables */
- nNotReady = pWInfo->nLevel - iLevel - 1;
- pOrTab = sqlite3StackAllocRaw(db,
- sizeof(*pOrTab)+ nNotReady*sizeof(pOrTab->a[0]));
- if( pOrTab==0 ) return notReady;
- pOrTab->nAlloc = (u8)(nNotReady + 1);
- pOrTab->nSrc = pOrTab->nAlloc;
- memcpy(pOrTab->a, pTabItem, sizeof(*pTabItem));
- origSrc = pWInfo->pTabList->a;
- for(k=1; k<=nNotReady; k++){
- memcpy(&pOrTab->a[k], &origSrc[pLevel[k].iFrom], sizeof(pOrTab->a[k]));
- }
- }else{
- pOrTab = pWInfo->pTabList;
- }
-
- /* Initialize the rowset register to contain NULL. An SQL NULL is
- ** equivalent to an empty rowset. Or, create an ephemeral index
- ** capable of holding primary keys in the case of a WITHOUT ROWID.
- **
- ** Also initialize regReturn to contain the address of the instruction
- ** immediately following the OP_Return at the bottom of the loop. This
- ** is required in a few obscure LEFT JOIN cases where control jumps
- ** over the top of the loop into the body of it. In this case the
- ** correct response for the end-of-loop code (the OP_Return) is to
- ** fall through to the next instruction, just as an OP_Next does if
- ** called on an uninitialized cursor.
- */
- if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
- if( HasRowid(pTab) ){
- regRowset = ++pParse->nMem;
- sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset);
- }else{
- Index *pPk = sqlite3PrimaryKeyIndex(pTab);
- regRowset = pParse->nTab++;
- sqlite3VdbeAddOp2(v, OP_OpenEphemeral, regRowset, pPk->nKeyCol);
- sqlite3VdbeSetP4KeyInfo(pParse, pPk);
- }
- regRowid = ++pParse->nMem;
- }
- iRetInit = sqlite3VdbeAddOp2(v, OP_Integer, 0, regReturn);
-
- /* If the original WHERE clause is z of the form: (x1 OR x2 OR ...) AND y
- ** Then for every term xN, evaluate as the subexpression: xN AND z
- ** That way, terms in y that are factored into the disjunction will
- ** be picked up by the recursive calls to sqlite3WhereBegin() below.
- **
- ** Actually, each subexpression is converted to "xN AND w" where w is
- ** the "interesting" terms of z - terms that did not originate in the
- ** ON or USING clause of a LEFT JOIN, and terms that are usable as
- ** indices.
- **
- ** This optimization also only applies if the (x1 OR x2 OR ...) term
- ** is not contained in the ON clause of a LEFT JOIN.
- ** See ticket http://www.sqlite.org/src/info/f2369304e4
- */
- if( pWC->nTerm>1 ){
- int iTerm;
- for(iTerm=0; iTerm<pWC->nTerm; iTerm++){
- Expr *pExpr = pWC->a[iTerm].pExpr;
- if( &pWC->a[iTerm] == pTerm ) continue;
- if( ExprHasProperty(pExpr, EP_FromJoin) ) continue;
- if( (pWC->a[iTerm].wtFlags & TERM_VIRTUAL)!=0 ) continue;
- if( (pWC->a[iTerm].eOperator & WO_ALL)==0 ) continue;
- testcase( pWC->a[iTerm].wtFlags & TERM_ORINFO );
- pExpr = sqlite3ExprDup(db, pExpr, 0);
- pAndExpr = sqlite3ExprAnd(db, pAndExpr, pExpr);
- }
- if( pAndExpr ){
- pAndExpr = sqlite3PExpr(pParse, TK_AND, 0, pAndExpr, 0);
- }
- }
-
- /* Run a separate WHERE clause for each term of the OR clause. After
- ** eliminating duplicates from other WHERE clauses, the action for each
- ** sub-WHERE clause is to to invoke the main loop body as a subroutine.
- */
- wctrlFlags = WHERE_OMIT_OPEN_CLOSE
- | WHERE_FORCE_TABLE
- | WHERE_ONETABLE_ONLY
- | WHERE_NO_AUTOINDEX;
- for(ii=0; ii<pOrWc->nTerm; ii++){
- WhereTerm *pOrTerm = &pOrWc->a[ii];
- if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
- WhereInfo *pSubWInfo; /* Info for single OR-term scan */
- Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */
- int j1 = 0; /* Address of jump operation */
- if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
- pAndExpr->pLeft = pOrExpr;
- pOrExpr = pAndExpr;
- }
- /* Loop through table entries that match term pOrTerm. */
- WHERETRACE(0xffff, ("Subplan for OR-clause:\n"));
- pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0,
- wctrlFlags, iCovCur);
- assert( pSubWInfo || pParse->nErr || db->mallocFailed );
- if( pSubWInfo ){
- WhereLoop *pSubLoop;
- int addrExplain = explainOneScan(
- pParse, pOrTab, &pSubWInfo->a[0], iLevel, pLevel->iFrom, 0
- );
- addScanStatus(v, pOrTab, &pSubWInfo->a[0], addrExplain);
-
- /* This is the sub-WHERE clause body. First skip over
- ** duplicate rows from prior sub-WHERE clauses, and record the
- ** rowid (or PRIMARY KEY) for the current row so that the same
- ** row will be skipped in subsequent sub-WHERE clauses.
- */
- if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
- int r;
- int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
- if( HasRowid(pTab) ){
- r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
- j1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0, r,iSet);
- VdbeCoverage(v);
- }else{
- Index *pPk = sqlite3PrimaryKeyIndex(pTab);
- int nPk = pPk->nKeyCol;
- int iPk;
-
- /* Read the PK into an array of temp registers. */
- r = sqlite3GetTempRange(pParse, nPk);
- for(iPk=0; iPk<nPk; iPk++){
- int iCol = pPk->aiColumn[iPk];
- sqlite3ExprCodeGetColumn(pParse, pTab, iCol, iCur, r+iPk, 0);
- }
-
- /* Check if the temp table already contains this key. If so,
- ** the row has already been included in the result set and
- ** can be ignored (by jumping past the Gosub below). Otherwise,
- ** insert the key into the temp table and proceed with processing
- ** the row.
- **
- ** Use some of the same optimizations as OP_RowSetTest: If iSet
- ** is zero, assume that the key cannot already be present in
- ** the temp table. And if iSet is -1, assume that there is no
- ** need to insert the key into the temp table, as it will never
- ** be tested for. */
- if( iSet ){
- j1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
- VdbeCoverage(v);
- }
- if( iSet>=0 ){
- sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);
- sqlite3VdbeAddOp3(v, OP_IdxInsert, regRowset, regRowid, 0);
- if( iSet ) sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
- }
-
- /* Release the array of temp registers */
- sqlite3ReleaseTempRange(pParse, r, nPk);
- }
- }
-
- /* Invoke the main loop body as a subroutine */
- sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
-
- /* Jump here (skipping the main loop body subroutine) if the
- ** current sub-WHERE row is a duplicate from prior sub-WHEREs. */
- if( j1 ) sqlite3VdbeJumpHere(v, j1);
-
- /* The pSubWInfo->untestedTerms flag means that this OR term
- ** contained one or more AND term from a notReady table. The
- ** terms from the notReady table could not be tested and will
- ** need to be tested later.
- */
- if( pSubWInfo->untestedTerms ) untestedTerms = 1;
-
- /* If all of the OR-connected terms are optimized using the same
- ** index, and the index is opened using the same cursor number
- ** by each call to sqlite3WhereBegin() made by this loop, it may
- ** be possible to use that index as a covering index.
- **
- ** If the call to sqlite3WhereBegin() above resulted in a scan that
- ** uses an index, and this is either the first OR-connected term
- ** processed or the index is the same as that used by all previous
- ** terms, set pCov to the candidate covering index. Otherwise, set
- ** pCov to NULL to indicate that no candidate covering index will
- ** be available.
- */
- pSubLoop = pSubWInfo->a[0].pWLoop;
- assert( (pSubLoop->wsFlags & WHERE_AUTO_INDEX)==0 );
- if( (pSubLoop->wsFlags & WHERE_INDEXED)!=0
- && (ii==0 || pSubLoop->u.btree.pIndex==pCov)
- && (HasRowid(pTab) || !IsPrimaryKeyIndex(pSubLoop->u.btree.pIndex))
- ){
- assert( pSubWInfo->a[0].iIdxCur==iCovCur );
- pCov = pSubLoop->u.btree.pIndex;
- wctrlFlags |= WHERE_REOPEN_IDX;
- }else{
- pCov = 0;
- }
-
- /* Finish the loop through table entries that match term pOrTerm. */
- sqlite3WhereEnd(pSubWInfo);
- }
- }
- }
- pLevel->u.pCovidx = pCov;
- if( pCov ) pLevel->iIdxCur = iCovCur;
- if( pAndExpr ){
- pAndExpr->pLeft = 0;
- sqlite3ExprDelete(db, pAndExpr);
- }
- sqlite3VdbeChangeP1(v, iRetInit, sqlite3VdbeCurrentAddr(v));
- sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrBrk);
- sqlite3VdbeResolveLabel(v, iLoopBody);
-
- if( pWInfo->nLevel>1 ) sqlite3StackFree(db, pOrTab);
- if( !untestedTerms ) disableTerm(pLevel, pTerm);
- }else
-#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
-
- {
- /* Case 6: There is no usable index. We must do a complete
- ** scan of the entire table.
- */
- static const u8 aStep[] = { OP_Next, OP_Prev };
- static const u8 aStart[] = { OP_Rewind, OP_Last };
- assert( bRev==0 || bRev==1 );
- if( pTabItem->isRecursive ){
- /* Tables marked isRecursive have only a single row that is stored in
- ** a pseudo-cursor. No need to Rewind or Next such cursors. */
- pLevel->op = OP_Noop;
- }else{
- pLevel->op = aStep[bRev];
- pLevel->p1 = iCur;
- pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk);
- VdbeCoverageIf(v, bRev==0);
- VdbeCoverageIf(v, bRev!=0);
- pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
- }
- }
-
-#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
- pLevel->addrVisit = sqlite3VdbeCurrentAddr(v);
-#endif
-
- /* Insert code to test every subexpression that can be completely
- ** computed using the current set of tables.
- */
- for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
- Expr *pE;
- int skipLikeAddr = 0;
- testcase( pTerm->wtFlags & TERM_VIRTUAL );
- testcase( pTerm->wtFlags & TERM_CODED );
- if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
- if( (pTerm->prereqAll & pLevel->notReady)!=0 ){
- testcase( pWInfo->untestedTerms==0
- && (pWInfo->wctrlFlags & WHERE_ONETABLE_ONLY)!=0 );
- pWInfo->untestedTerms = 1;
- continue;
- }
- pE = pTerm->pExpr;
- assert( pE!=0 );
- if( pLevel->iLeftJoin && !ExprHasProperty(pE, EP_FromJoin) ){
- continue;
- }
- if( pTerm->wtFlags & TERM_LIKECOND ){
- assert( pLevel->iLikeRepCntr>0 );
- skipLikeAddr = sqlite3VdbeAddOp1(v, OP_IfNot, pLevel->iLikeRepCntr);
- VdbeCoverage(v);
- }
- sqlite3ExprIfFalse(pParse, pE, addrCont, SQLITE_JUMPIFNULL);
- if( skipLikeAddr ) sqlite3VdbeJumpHere(v, skipLikeAddr);
- pTerm->wtFlags |= TERM_CODED;
- }
-
- /* Insert code to test for implied constraints based on transitivity
- ** of the "==" operator.
- **
- ** Example: If the WHERE clause contains "t1.a=t2.b" and "t2.b=123"
- ** and we are coding the t1 loop and the t2 loop has not yet coded,
- ** then we cannot use the "t1.a=t2.b" constraint, but we can code
- ** the implied "t1.a=123" constraint.
- */
- for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
- Expr *pE, *pEAlt;
- WhereTerm *pAlt;
- if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
- if( pTerm->eOperator!=(WO_EQUIV|WO_EQ) ) continue;
- if( pTerm->leftCursor!=iCur ) continue;
- if( pLevel->iLeftJoin ) continue;
- pE = pTerm->pExpr;
- assert( !ExprHasProperty(pE, EP_FromJoin) );
- assert( (pTerm->prereqRight & pLevel->notReady)!=0 );
- pAlt = findTerm(pWC, iCur, pTerm->u.leftColumn, notReady, WO_EQ|WO_IN, 0);
- if( pAlt==0 ) continue;
- if( pAlt->wtFlags & (TERM_CODED) ) continue;
- testcase( pAlt->eOperator & WO_EQ );
- testcase( pAlt->eOperator & WO_IN );
- VdbeModuleComment((v, "begin transitive constraint"));
- pEAlt = sqlite3StackAllocRaw(db, sizeof(*pEAlt));
- if( pEAlt ){
- *pEAlt = *pAlt->pExpr;
- pEAlt->pLeft = pE->pLeft;
- sqlite3ExprIfFalse(pParse, pEAlt, addrCont, SQLITE_JUMPIFNULL);
- sqlite3StackFree(db, pEAlt);
- }
- }
-
- /* For a LEFT OUTER JOIN, generate code that will record the fact that
- ** at least one row of the right table has matched the left table.
- */
- if( pLevel->iLeftJoin ){
- pLevel->addrFirst = sqlite3VdbeCurrentAddr(v);
- sqlite3VdbeAddOp2(v, OP_Integer, 1, pLevel->iLeftJoin);
- VdbeComment((v, "record LEFT JOIN hit"));
- sqlite3ExprCacheClear(pParse);
- for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
- testcase( pTerm->wtFlags & TERM_VIRTUAL );
- testcase( pTerm->wtFlags & TERM_CODED );
- if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
- if( (pTerm->prereqAll & pLevel->notReady)!=0 ){
- assert( pWInfo->untestedTerms );
- continue;
- }
- assert( pTerm->pExpr );
- sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL);
- pTerm->wtFlags |= TERM_CODED;
- }
- }
-
- return pLevel->notReady;
-}
#ifdef WHERETRACE_ENABLED
/*
@@ -120332,9 +123002,10 @@ static void whereTermPrint(WhereTerm *pTerm, int iTerm){
if( pTerm->wtFlags & TERM_VIRTUAL ) zType[0] = 'V';
if( pTerm->eOperator & WO_EQUIV ) zType[1] = 'E';
if( ExprHasProperty(pTerm->pExpr, EP_FromJoin) ) zType[2] = 'L';
- sqlite3DebugPrintf("TERM-%-3d %p %s cursor=%-3d prob=%-3d op=0x%03x\n",
- iTerm, pTerm, zType, pTerm->leftCursor, pTerm->truthProb,
- pTerm->eOperator);
+ sqlite3DebugPrintf(
+ "TERM-%-3d %p %s cursor=%-3d prob=%-3d op=0x%03x wtFlags=0x%04x\n",
+ iTerm, pTerm, zType, pTerm->leftCursor, pTerm->truthProb,
+ pTerm->eOperator, pTerm->wtFlags);
sqlite3TreeViewExpr(0, pTerm->pExpr, 0);
}
}
@@ -120483,7 +123154,7 @@ static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
sqlite3DbFree(db, pLevel->u.in.aInLoop);
}
}
- whereClauseClear(&pWInfo->sWC);
+ sqlite3WhereClauseClear(&pWInfo->sWC);
while( pWInfo->pLoops ){
WhereLoop *p = pWInfo->pLoops;
pWInfo->pLoops = p->pNextLoop;
@@ -120680,18 +123351,20 @@ static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
** and prereqs.
*/
if( pBuilder->pOrSet!=0 ){
+ if( pTemplate->nLTerm ){
#if WHERETRACE_ENABLED
- u16 n = pBuilder->pOrSet->n;
- int x =
+ u16 n = pBuilder->pOrSet->n;
+ int x =
#endif
- whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,
+ whereOrInsert(pBuilder->pOrSet, pTemplate->prereq, pTemplate->rRun,
pTemplate->nOut);
#if WHERETRACE_ENABLED /* 0x8 */
- if( sqlite3WhereTrace & 0x8 ){
- sqlite3DebugPrintf(x?" or-%d: ":" or-X: ", n);
- whereLoopPrint(pTemplate, pBuilder->pWC);
- }
+ if( sqlite3WhereTrace & 0x8 ){
+ sqlite3DebugPrintf(x?" or-%d: ":" or-X: ", n);
+ whereLoopPrint(pTemplate, pBuilder->pWC);
+ }
#endif
+ }
return SQLITE_OK;
}
@@ -120824,8 +123497,9 @@ static void whereLoopOutputAdjust(
/* In the absence of explicit truth probabilities, use heuristics to
** guess a reasonable truth probability. */
pLoop->nOut--;
- if( pTerm->eOperator&WO_EQ ){
+ if( pTerm->eOperator&(WO_EQ|WO_IS) ){
Expr *pRight = pTerm->pExpr->pRight;
+ testcase( pTerm->pExpr->op==TK_IS );
if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
k = 10;
}else{
@@ -120880,7 +123554,6 @@ static int whereLoopAddBtreeIndex(
u16 saved_nSkip; /* Original value of pNew->nSkip */
u32 saved_wsFlags; /* Original value of pNew->wsFlags */
LogEst saved_nOut; /* Original value of pNew->nOut */
- int iCol; /* Index of the column in the table */
int rc = SQLITE_OK; /* Return code */
LogEst rSize; /* Number of rows in the table */
LogEst rLogSize; /* Logarithm of table size */
@@ -120893,24 +123566,23 @@ static int whereLoopAddBtreeIndex(
assert( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 );
if( pNew->wsFlags & WHERE_BTM_LIMIT ){
opMask = WO_LT|WO_LE;
- }else if( pProbe->tnum<=0 || (pSrc->jointype & JT_LEFT)!=0 ){
+ }else if( /*pProbe->tnum<=0 ||*/ (pSrc->fg.jointype & JT_LEFT)!=0 ){
opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE;
}else{
- opMask = WO_EQ|WO_IN|WO_ISNULL|WO_GT|WO_GE|WO_LT|WO_LE;
+ opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE|WO_ISNULL|WO_IS;
}
if( pProbe->bUnordered ) opMask &= ~(WO_GT|WO_GE|WO_LT|WO_LE);
assert( pNew->u.btree.nEq<pProbe->nColumn );
- iCol = pProbe->aiColumn[pNew->u.btree.nEq];
- pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, iCol,
- opMask, pProbe);
saved_nEq = pNew->u.btree.nEq;
saved_nSkip = pNew->nSkip;
saved_nLTerm = pNew->nLTerm;
saved_wsFlags = pNew->wsFlags;
saved_prereq = pNew->prereq;
saved_nOut = pNew->nOut;
+ pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, saved_nEq,
+ opMask, pProbe);
pNew->rSetup = 0;
rSize = pProbe->aiRowLogEst[0];
rLogSize = estLog(rSize);
@@ -120923,7 +123595,7 @@ static int whereLoopAddBtreeIndex(
int nRecValid = pBuilder->nRecValid;
#endif
if( (eOp==WO_ISNULL || (pTerm->wtFlags&TERM_VNULL)!=0)
- && (iCol<0 || pSrc->pTab->aCol[iCol].notNull)
+ && indexColumnNotNull(pProbe, saved_nEq)
){
continue; /* ignore IS [NOT] NULL constraints on NOT NULL columns */
}
@@ -120959,9 +123631,13 @@ static int whereLoopAddBtreeIndex(
assert( nIn>0 ); /* RHS always has 2 or more terms... The parser
** changes "x IN (?)" into "x=?". */
- }else if( eOp & (WO_EQ) ){
+ }else if( eOp & (WO_EQ|WO_IS) ){
+ int iCol = pProbe->aiColumn[saved_nEq];
pNew->wsFlags |= WHERE_COLUMN_EQ;
- if( iCol<0 || (nInMul==0 && pNew->u.btree.nEq==pProbe->nKeyCol-1) ){
+ assert( saved_nEq==pNew->u.btree.nEq );
+ if( iCol==XN_ROWID
+ || (iCol>0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1)
+ ){
if( iCol>=0 && pProbe->uniqNotNull==0 ){
pNew->wsFlags |= WHERE_UNQ_WANTED;
}else{
@@ -121009,10 +123685,10 @@ static int whereLoopAddBtreeIndex(
whereRangeScanEst(pParse, pBuilder, pBtm, pTop, pNew);
}else{
int nEq = ++pNew->u.btree.nEq;
- assert( eOp & (WO_ISNULL|WO_EQ|WO_IN) );
+ assert( eOp & (WO_ISNULL|WO_EQ|WO_IN|WO_IS) );
assert( pNew->nOut==saved_nOut );
- if( pTerm->truthProb<=0 && iCol>=0 ){
+ if( pTerm->truthProb<=0 && pProbe->aiColumn[saved_nEq]>=0 ){
assert( (eOp & WO_IN) || nIn==0 );
testcase( eOp & WO_IN );
pNew->nOut += pTerm->truthProb;
@@ -121026,8 +123702,9 @@ static int whereLoopAddBtreeIndex(
&& ((eOp & WO_IN)==0 || !ExprHasProperty(pTerm->pExpr, EP_xIsSelect))
){
Expr *pExpr = pTerm->pExpr;
- if( (eOp & (WO_EQ|WO_ISNULL))!=0 ){
+ if( (eOp & (WO_EQ|WO_ISNULL|WO_IS))!=0 ){
testcase( eOp & WO_EQ );
+ testcase( eOp & WO_IS );
testcase( eOp & WO_ISNULL );
rc = whereEqualScanEst(pParse, pBuilder, pExpr->pRight, &nOut);
}else{
@@ -121146,18 +123823,25 @@ static int indexMightHelpWithOrderBy(
int iCursor
){
ExprList *pOB;
+ ExprList *aColExpr;
int ii, jj;
if( pIndex->bUnordered ) return 0;
if( (pOB = pBuilder->pWInfo->pOrderBy)==0 ) return 0;
for(ii=0; ii<pOB->nExpr; ii++){
Expr *pExpr = sqlite3ExprSkipCollate(pOB->a[ii].pExpr);
- if( pExpr->op!=TK_COLUMN ) return 0;
- if( pExpr->iTable==iCursor ){
+ if( pExpr->op==TK_COLUMN && pExpr->iTable==iCursor ){
if( pExpr->iColumn<0 ) return 1;
for(jj=0; jj<pIndex->nKeyCol; jj++){
if( pExpr->iColumn==pIndex->aiColumn[jj] ) return 1;
}
+ }else if( (aColExpr = pIndex->aColExpr)!=0 ){
+ for(jj=0; jj<pIndex->nKeyCol; jj++){
+ if( pIndex->aiColumn[jj]!=XN_EXPR ) continue;
+ if( sqlite3ExprCompare(pExpr,aColExpr->a[jj].pExpr,iCursor)==0 ){
+ return 1;
+ }
+ }
}
}
return 0;
@@ -121187,6 +123871,10 @@ static Bitmask columnsInIndex(Index *pIdx){
static int whereUsablePartialIndex(int iTab, WhereClause *pWC, Expr *pWhere){
int i;
WhereTerm *pTerm;
+ while( pWhere->op==TK_AND ){
+ if( !whereUsablePartialIndex(iTab,pWC,pWhere->pLeft) ) return 0;
+ pWhere = pWhere->pRight;
+ }
for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
Expr *pExpr = pTerm->pExpr;
if( sqlite3ExprImpliesExpr(pExpr, pWhere, iTab)
@@ -121262,9 +123950,9 @@ static int whereLoopAddBtree(
pWC = pBuilder->pWC;
assert( !IsVirtual(pSrc->pTab) );
- if( pSrc->pIndex ){
+ if( pSrc->pIBIndex ){
/* An INDEXED BY clause specifies a particular index to use */
- pProbe = pSrc->pIndex;
+ pProbe = pSrc->pIBIndex;
}else if( !HasRowid(pTab) ){
pProbe = pTab->pIndex;
}else{
@@ -121284,7 +123972,7 @@ static int whereLoopAddBtree(
aiRowEstPk[0] = pTab->nRowLogEst;
aiRowEstPk[1] = 0;
pFirst = pSrc->pTab->pIndex;
- if( pSrc->notIndexed==0 ){
+ if( pSrc->fg.notIndexed==0 ){
/* The real indices of the table are only considered if the
** NOT INDEXED qualifier is omitted from the FROM clause */
sPk.pNext = pFirst;
@@ -121296,15 +123984,14 @@ static int whereLoopAddBtree(
#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
/* Automatic indexes */
- if( !pBuilder->pOrSet
+ if( !pBuilder->pOrSet /* Not part of an OR optimization */
&& (pWInfo->wctrlFlags & WHERE_NO_AUTOINDEX)==0
&& (pWInfo->pParse->db->flags & SQLITE_AutoIndex)!=0
- && pSrc->pIndex==0
- && !pSrc->viaCoroutine
- && !pSrc->notIndexed
- && HasRowid(pTab)
- && !pSrc->isCorrelated
- && !pSrc->isRecursive
+ && pSrc->pIBIndex==0 /* Has no INDEXED BY clause */
+ && !pSrc->fg.notIndexed /* Has no NOT INDEXED clause */
+ && HasRowid(pTab) /* Not WITHOUT ROWID table. (FIXME: Why not?) */
+ && !pSrc->fg.isCorrelated /* Not a correlated subquery */
+ && !pSrc->fg.isRecursive /* Not a recursive common table expression. */
){
/* Generate auto-index WhereLoops */
WhereTerm *pTerm;
@@ -121425,7 +124112,7 @@ static int whereLoopAddBtree(
/* If there was an INDEXED BY clause, then only that one index is
** considered. */
- if( pSrc->pIndex ) break;
+ if( pSrc->pIBIndex ) break;
}
return rc;
}
@@ -121434,10 +124121,32 @@ static int whereLoopAddBtree(
/*
** Add all WhereLoop objects for a table of the join identified by
** pBuilder->pNew->iTab. That table is guaranteed to be a virtual table.
+**
+** If there are no LEFT or CROSS JOIN joins in the query, both mExtra and
+** mUnusable are set to 0. Otherwise, mExtra is a mask of all FROM clause
+** entries that occur before the virtual table in the FROM clause and are
+** separated from it by at least one LEFT or CROSS JOIN. Similarly, the
+** mUnusable mask contains all FROM clause entries that occur after the
+** virtual table and are separated from it by at least one LEFT or
+** CROSS JOIN.
+**
+** For example, if the query were:
+**
+** ... FROM t1, t2 LEFT JOIN t3, t4, vt CROSS JOIN t5, t6;
+**
+** then mExtra corresponds to (t1, t2) and mUnusable to (t5, t6).
+**
+** All the tables in mExtra must be scanned before the current virtual
+** table. So any terms for which all prerequisites are satisfied by
+** mExtra may be specified as "usable" in all calls to xBestIndex.
+** Conversely, all tables in mUnusable must be scanned after the current
+** virtual table, so any terms for which the prerequisites overlap with
+** mUnusable should always be configured as "not-usable" for xBestIndex.
*/
static int whereLoopAddVirtual(
WhereLoopBuilder *pBuilder, /* WHERE clause information */
- Bitmask mExtra
+ Bitmask mExtra, /* Tables that must be scanned before this one */
+ Bitmask mUnusable /* Tables that must be scanned after this one */
){
WhereInfo *pWInfo; /* WHERE analysis context */
Parse *pParse; /* The parsing context */
@@ -121458,6 +124167,7 @@ static int whereLoopAddVirtual(
WhereLoop *pNew;
int rc = SQLITE_OK;
+ assert( (mExtra & mUnusable)==0 );
pWInfo = pBuilder->pWInfo;
pParse = pWInfo->pParse;
db = pParse->db;
@@ -121466,7 +124176,7 @@ static int whereLoopAddVirtual(
pSrc = &pWInfo->pTabList->a[pNew->iTab];
pTab = pSrc->pTab;
assert( IsVirtual(pTab) );
- pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pBuilder->pOrderBy);
+ pIdxInfo = allocateIndexInfo(pParse, pWC, mUnusable, pSrc,pBuilder->pOrderBy);
if( pIdxInfo==0 ) return SQLITE_NOMEM;
pNew->prereq = 0;
pNew->rSetup = 0;
@@ -121496,7 +124206,7 @@ static int whereLoopAddVirtual(
if( (pTerm->eOperator & WO_IN)!=0 ){
seenIn = 1;
}
- if( pTerm->prereqRight!=0 ){
+ if( (pTerm->prereqRight & ~mExtra)!=0 ){
seenVar = 1;
}else if( (pTerm->eOperator & WO_IN)==0 ){
pIdxCons->usable = 1;
@@ -121504,7 +124214,7 @@ static int whereLoopAddVirtual(
break;
case 1: /* Constants with IN operators */
assert( seenIn );
- pIdxCons->usable = (pTerm->prereqRight==0);
+ pIdxCons->usable = (pTerm->prereqRight & ~mExtra)==0;
break;
case 2: /* Variables without IN */
assert( seenVar );
@@ -121524,6 +124234,7 @@ static int whereLoopAddVirtual(
pIdxInfo->orderByConsumed = 0;
pIdxInfo->estimatedCost = SQLITE_BIG_DBL / (double)2;
pIdxInfo->estimatedRows = 25;
+ pIdxInfo->idxFlags = 0;
rc = vtabBestIndex(pParse, pTab, pIdxInfo);
if( rc ) goto whereLoopAddVtab_exit;
pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
@@ -121569,6 +124280,7 @@ static int whereLoopAddVirtual(
** (2) Multiple outputs from a single IN value will not merge
** together. */
pIdxInfo->orderByConsumed = 0;
+ pIdxInfo->idxFlags &= ~SQLITE_INDEX_SCAN_UNIQUE;
}
}
}
@@ -121584,6 +124296,14 @@ static int whereLoopAddVirtual(
pNew->rSetup = 0;
pNew->rRun = sqlite3LogEstFromDouble(pIdxInfo->estimatedCost);
pNew->nOut = sqlite3LogEst(pIdxInfo->estimatedRows);
+
+ /* Set the WHERE_ONEROW flag if the xBestIndex() method indicated
+ ** that the scan will visit at most one row. Clear it otherwise. */
+ if( pIdxInfo->idxFlags & SQLITE_INDEX_SCAN_UNIQUE ){
+ pNew->wsFlags |= WHERE_ONEROW;
+ }else{
+ pNew->wsFlags &= ~WHERE_ONEROW;
+ }
whereLoopInsert(pBuilder, pNew);
if( pNew->u.vtab.needFree ){
sqlite3_free(pNew->u.vtab.idxStr);
@@ -121603,7 +124323,11 @@ whereLoopAddVtab_exit:
** Add WhereLoop entries to handle OR terms. This works for either
** btrees or virtual tables.
*/
-static int whereLoopAddOr(WhereLoopBuilder *pBuilder, Bitmask mExtra){
+static int whereLoopAddOr(
+ WhereLoopBuilder *pBuilder,
+ Bitmask mExtra,
+ Bitmask mUnusable
+){
WhereInfo *pWInfo = pBuilder->pWInfo;
WhereClause *pWC;
WhereLoop *pNew;
@@ -121662,14 +124386,14 @@ static int whereLoopAddOr(WhereLoopBuilder *pBuilder, Bitmask mExtra){
#endif
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( IsVirtual(pItem->pTab) ){
- rc = whereLoopAddVirtual(&sSubBuild, mExtra);
+ rc = whereLoopAddVirtual(&sSubBuild, mExtra, mUnusable);
}else
#endif
{
rc = whereLoopAddBtree(&sSubBuild, mExtra);
}
if( rc==SQLITE_OK ){
- rc = whereLoopAddOr(&sSubBuild, mExtra);
+ rc = whereLoopAddOr(&sSubBuild, mExtra, mUnusable);
}
assert( rc==SQLITE_OK || sCur.n==0 );
if( sCur.n==0 ){
@@ -121731,33 +124455,43 @@ static int whereLoopAddAll(WhereLoopBuilder *pBuilder){
int iTab;
SrcList *pTabList = pWInfo->pTabList;
struct SrcList_item *pItem;
+ struct SrcList_item *pEnd = &pTabList->a[pWInfo->nLevel];
sqlite3 *db = pWInfo->pParse->db;
- int nTabList = pWInfo->nLevel;
int rc = SQLITE_OK;
- u8 priorJoinType = 0;
WhereLoop *pNew;
+ u8 priorJointype = 0;
/* Loop over the tables in the join, from left to right */
pNew = pBuilder->pNew;
whereLoopInit(pNew);
- for(iTab=0, pItem=pTabList->a; iTab<nTabList; iTab++, pItem++){
+ for(iTab=0, pItem=pTabList->a; pItem<pEnd; iTab++, pItem++){
+ Bitmask mUnusable = 0;
pNew->iTab = iTab;
- pNew->maskSelf = getMask(&pWInfo->sMaskSet, pItem->iCursor);
- if( ((pItem->jointype|priorJoinType) & (JT_LEFT|JT_CROSS))!=0 ){
+ pNew->maskSelf = sqlite3WhereGetMask(&pWInfo->sMaskSet, pItem->iCursor);
+ if( ((pItem->fg.jointype|priorJointype) & (JT_LEFT|JT_CROSS))!=0 ){
+ /* This condition is true when pItem is the FROM clause term on the
+ ** right-hand-side of a LEFT or CROSS JOIN. */
mExtra = mPrior;
}
- priorJoinType = pItem->jointype;
+ priorJointype = pItem->fg.jointype;
if( IsVirtual(pItem->pTab) ){
- rc = whereLoopAddVirtual(pBuilder, mExtra);
+ struct SrcList_item *p;
+ for(p=&pItem[1]; p<pEnd; p++){
+ if( mUnusable || (p->fg.jointype & (JT_LEFT|JT_CROSS)) ){
+ mUnusable |= sqlite3WhereGetMask(&pWInfo->sMaskSet, p->iCursor);
+ }
+ }
+ rc = whereLoopAddVirtual(pBuilder, mExtra, mUnusable);
}else{
rc = whereLoopAddBtree(pBuilder, mExtra);
}
if( rc==SQLITE_OK ){
- rc = whereLoopAddOr(pBuilder, mExtra);
+ rc = whereLoopAddOr(pBuilder, mExtra, mUnusable);
}
mPrior |= pNew->maskSelf;
if( rc || db->mallocFailed ) break;
}
+
whereLoopClear(db, pNew);
return rc;
}
@@ -121863,10 +124597,10 @@ static i8 wherePathSatisfiesOrderBy(
pOBExpr = sqlite3ExprSkipCollate(pOrderBy->a[i].pExpr);
if( pOBExpr->op!=TK_COLUMN ) continue;
if( pOBExpr->iTable!=iCur ) continue;
- pTerm = findTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
- ~ready, WO_EQ|WO_ISNULL, 0);
+ pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
+ ~ready, WO_EQ|WO_ISNULL|WO_IS, 0);
if( pTerm==0 ) continue;
- if( (pTerm->eOperator&WO_EQ)!=0 && pOBExpr->iColumn>=0 ){
+ if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
const char *z1, *z2;
pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
if( !pColl ) pColl = db->pDfltColl;
@@ -121875,6 +124609,7 @@ static i8 wherePathSatisfiesOrderBy(
if( !pColl ) pColl = db->pDfltColl;
z2 = pColl->zName;
if( sqlite3StrICmp(z1, z2)!=0 ) continue;
+ testcase( pTerm->pExpr->op==TK_IS );
}
obSat |= MASKBIT(i);
}
@@ -121890,7 +124625,8 @@ static i8 wherePathSatisfiesOrderBy(
nKeyCol = pIndex->nKeyCol;
nColumn = pIndex->nColumn;
assert( nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable) );
- assert( pIndex->aiColumn[nColumn-1]==(-1) || !HasRowid(pIndex->pTable));
+ assert( pIndex->aiColumn[nColumn-1]==XN_ROWID
+ || !HasRowid(pIndex->pTable));
isOrderDistinct = IsUniqueIndex(pIndex);
}
@@ -121905,7 +124641,7 @@ static i8 wherePathSatisfiesOrderBy(
/* Skip over == and IS NULL terms */
if( j<pLoop->u.btree.nEq
&& pLoop->nSkip==0
- && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL))!=0
+ && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL|WO_IS))!=0
){
if( i & WO_ISNULL ){
testcase( isOrderDistinct );
@@ -121922,7 +124658,7 @@ static i8 wherePathSatisfiesOrderBy(
revIdx = pIndex->aSortOrder[j];
if( iColumn==pIndex->pTable->iPKey ) iColumn = -1;
}else{
- iColumn = -1;
+ iColumn = XN_ROWID;
revIdx = 0;
}
@@ -121948,9 +124684,15 @@ static i8 wherePathSatisfiesOrderBy(
testcase( wctrlFlags & WHERE_GROUPBY );
testcase( wctrlFlags & WHERE_DISTINCTBY );
if( (wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY))==0 ) bOnce = 0;
- if( pOBExpr->op!=TK_COLUMN ) continue;
- if( pOBExpr->iTable!=iCur ) continue;
- if( pOBExpr->iColumn!=iColumn ) continue;
+ if( iColumn>=(-1) ){
+ if( pOBExpr->op!=TK_COLUMN ) continue;
+ if( pOBExpr->iTable!=iCur ) continue;
+ if( pOBExpr->iColumn!=iColumn ) continue;
+ }else{
+ if( sqlite3ExprCompare(pOBExpr,pIndex->aColExpr->a[j].pExpr,iCur) ){
+ continue;
+ }
+ }
if( iColumn>=0 ){
pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
if( !pColl ) pColl = db->pDfltColl;
@@ -121999,7 +124741,7 @@ static i8 wherePathSatisfiesOrderBy(
Bitmask mTerm;
if( MASKBIT(i) & obSat ) continue;
p = pOrderBy->a[i].pExpr;
- mTerm = exprTableUsage(&pWInfo->sMaskSet,p);
+ mTerm = sqlite3WhereExprUsage(&pWInfo->sMaskSet,p);
if( mTerm==0 && !sqlite3ExprIsConstant(p) ) continue;
if( (mTerm&~orderDistinctMask)==0 ){
obSat |= MASKBIT(i);
@@ -122472,14 +125214,15 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){
pItem = pWInfo->pTabList->a;
pTab = pItem->pTab;
if( IsVirtual(pTab) ) return 0;
- if( pItem->zIndex ) return 0;
+ if( pItem->fg.isIndexedBy ) return 0;
iCur = pItem->iCursor;
pWC = &pWInfo->sWC;
pLoop = pBuilder->pNew;
pLoop->wsFlags = 0;
pLoop->nSkip = 0;
- pTerm = findTerm(pWC, iCur, -1, 0, WO_EQ, 0);
+ pTerm = sqlite3WhereFindTerm(pWC, iCur, -1, 0, WO_EQ|WO_IS, 0);
if( pTerm ){
+ testcase( pTerm->eOperator & WO_IS );
pLoop->wsFlags = WHERE_COLUMN_EQ|WHERE_IPK|WHERE_ONEROW;
pLoop->aLTerm[0] = pTerm;
pLoop->nLTerm = 1;
@@ -122488,14 +125231,17 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){
pLoop->rRun = 33; /* 33==sqlite3LogEst(10) */
}else{
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+ int opMask;
assert( pLoop->aLTermSpace==pLoop->aLTerm );
if( !IsUniqueIndex(pIdx)
|| pIdx->pPartIdxWhere!=0
|| pIdx->nKeyCol>ArraySize(pLoop->aLTermSpace)
) continue;
+ opMask = pIdx->uniqNotNull ? (WO_EQ|WO_IS) : WO_EQ;
for(j=0; j<pIdx->nKeyCol; j++){
- pTerm = findTerm(pWC, iCur, pIdx->aiColumn[j], 0, WO_EQ, pIdx);
+ pTerm = sqlite3WhereFindTerm(pWC, iCur, j, 0, opMask, pIdx);
if( pTerm==0 ) break;
+ testcase( pTerm->eOperator & WO_IS );
pLoop->aLTerm[j] = pTerm;
}
if( j!=pIdx->nKeyCol ) continue;
@@ -122514,7 +125260,7 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){
if( pLoop->wsFlags ){
pLoop->nOut = (LogEst)1;
pWInfo->a[0].pWLoop = pLoop;
- pLoop->maskSelf = getMask(&pWInfo->sMaskSet, iCur);
+ pLoop->maskSelf = sqlite3WhereGetMask(&pWInfo->sMaskSet, iCur);
pWInfo->a[0].iTabCur = iCur;
pWInfo->nRowOut = 1;
if( pWInfo->pOrderBy ) pWInfo->nOBSat = pWInfo->pOrderBy->nExpr;
@@ -122639,6 +125385,10 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
sqlite3 *db; /* Database connection */
int rc; /* Return code */
+ assert( (wctrlFlags & WHERE_ONEPASS_MULTIROW)==0 || (
+ (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0
+ && (wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0
+ ));
/* Variable initialization */
db = pParse->db;
@@ -122694,6 +125444,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
pWInfo->iBreak = pWInfo->iContinue = sqlite3VdbeMakeLabel(v);
pWInfo->wctrlFlags = wctrlFlags;
pWInfo->savedNQueryLoop = pParse->nQueryLoop;
+ assert( pWInfo->eOnePass==ONEPASS_OFF ); /* ONEPASS defaults to OFF */
pMaskSet = &pWInfo->sMaskSet;
sWLB.pWInfo = pWInfo;
sWLB.pWC = &pWInfo->sWC;
@@ -122708,8 +125459,8 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
** subexpression is separated by an AND operator.
*/
initMaskSet(pMaskSet);
- whereClauseInit(&pWInfo->sWC, pWInfo);
- whereSplit(&pWInfo->sWC, pWhere, TK_AND);
+ sqlite3WhereClauseInit(&pWInfo->sWC, pWInfo);
+ sqlite3WhereSplit(&pWInfo->sWC, pWhere, TK_AND);
/* Special case: a WHERE clause that is constant. Evaluate the
** expression and either jump over all of the code or fall thru.
@@ -122733,14 +125484,12 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
/* Assign a bit from the bitmask to every term in the FROM clause.
**
- ** When assigning bitmask values to FROM clause cursors, it must be
- ** the case that if X is the bitmask for the N-th FROM clause term then
- ** the bitmask for all FROM clause terms to the left of the N-th term
- ** is (X-1). An expression from the ON clause of a LEFT JOIN can use
- ** its Expr.iRightJoinTable value to find the bitmask of the right table
- ** of the join. Subtracting one from the right table bitmask gives a
- ** bitmask for all tables to the left of the join. Knowing the bitmask
- ** for all tables to the left of a left join is important. Ticket #3015.
+ ** The N-th term of the FROM clause is assigned a bitmask of 1<<N.
+ **
+ ** The rule of the previous sentence ensures thta if X is the bitmask for
+ ** a table T, then X-1 is the bitmask for all other tables to the left of T.
+ ** Knowing the bitmask for all tables to the left of a left join is
+ ** important. Ticket #3015.
**
** Note that bitmasks are created for all pTabList->nSrc tables in
** pTabList, not just the first nTabList tables. nTabList is normally
@@ -122749,27 +125498,18 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
*/
for(ii=0; ii<pTabList->nSrc; ii++){
createMask(pMaskSet, pTabList->a[ii].iCursor);
+ sqlite3WhereTabFuncArgs(pParse, &pTabList->a[ii], &pWInfo->sWC);
}
-#ifndef NDEBUG
- {
- Bitmask toTheLeft = 0;
- for(ii=0; ii<pTabList->nSrc; ii++){
- Bitmask m = getMask(pMaskSet, pTabList->a[ii].iCursor);
- assert( (m-1)==toTheLeft );
- toTheLeft |= m;
- }
+#ifdef SQLITE_DEBUG
+ for(ii=0; ii<pTabList->nSrc; ii++){
+ Bitmask m = sqlite3WhereGetMask(pMaskSet, pTabList->a[ii].iCursor);
+ assert( m==MASKBIT(ii) );
}
#endif
- /* Analyze all of the subexpressions. Note that exprAnalyze() might
- ** add new virtual terms onto the end of the WHERE clause. We do not
- ** want to analyze these virtual terms, so start analyzing at the end
- ** and work forward so that the added virtual terms are never processed.
- */
- exprAnalyzeAll(pTabList, &pWInfo->sWC);
- if( db->mallocFailed ){
- goto whereBeginError;
- }
+ /* Analyze all of the subexpressions. */
+ sqlite3WhereExprAnalyze(pTabList, &pWInfo->sWC);
+ if( db->mallocFailed ) goto whereBeginError;
if( wctrlFlags & WHERE_WANT_DISTINCT ){
if( isDistinctRedundant(pParse, pTabList, &pWInfo->sWC, pResultSet) ){
@@ -122783,10 +125523,10 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
}
/* Construct the WhereLoop objects */
- WHERETRACE(0xffff,("*** Optimizer Start ***\n"));
+ WHERETRACE(0xffff,("*** Optimizer Start *** (wctrlFlags: 0x%x)\n",
+ wctrlFlags));
#if defined(WHERETRACE_ENABLED)
- /* Display all terms of the WHERE clause */
- if( sqlite3WhereTrace & 0x100 ){
+ if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */
int i;
for(i=0; i<sWLB.pWC->nTerm; i++){
whereTermPrint(&sWLB.pWC->a[i], i);
@@ -122798,13 +125538,12 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
rc = whereLoopAddAll(&sWLB);
if( rc ) goto whereBeginError;
- /* Display all of the WhereLoop objects if wheretrace is enabled */
-#ifdef WHERETRACE_ENABLED /* !=0 */
- if( sqlite3WhereTrace ){
+#ifdef WHERETRACE_ENABLED
+ if( sqlite3WhereTrace ){ /* Display all of the WhereLoop objects */
WhereLoop *p;
int i;
- static char zLabel[] = "0123456789abcdefghijklmnopqrstuvwyxz"
- "ABCDEFGHIJKLMNOPQRSTUVWYXZ";
+ static const char zLabel[] = "0123456789abcdefghijklmnopqrstuvwyxz"
+ "ABCDEFGHIJKLMNOPQRSTUVWYXZ";
for(p=pWInfo->pLoops, i=0; p; p=p->pNextLoop, i++){
p->cId = zLabel[i%sizeof(zLabel)];
whereLoopPrint(p, sWLB.pWC);
@@ -122825,7 +125564,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
if( pParse->nErr || NEVER(db->mallocFailed) ){
goto whereBeginError;
}
-#ifdef WHERETRACE_ENABLED /* !=0 */
+#ifdef WHERETRACE_ENABLED
if( sqlite3WhereTrace ){
sqlite3DebugPrintf("---- Solution nRow=%d", pWInfo->nRowOut);
if( pWInfo->nOBSat>0 ){
@@ -122856,12 +125595,14 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
&& pResultSet!=0
&& OptimizationEnabled(db, SQLITE_OmitNoopJoin)
){
- Bitmask tabUsed = exprListTableUsage(pMaskSet, pResultSet);
- if( sWLB.pOrderBy ) tabUsed |= exprListTableUsage(pMaskSet, sWLB.pOrderBy);
+ Bitmask tabUsed = sqlite3WhereExprListUsage(pMaskSet, pResultSet);
+ if( sWLB.pOrderBy ){
+ tabUsed |= sqlite3WhereExprListUsage(pMaskSet, sWLB.pOrderBy);
+ }
while( pWInfo->nLevel>=2 ){
WhereTerm *pTerm, *pEnd;
pLoop = pWInfo->a[pWInfo->nLevel-1].pWLoop;
- if( (pWInfo->pTabList->a[pLoop->iTab].jointype & JT_LEFT)==0 ) break;
+ if( (pWInfo->pTabList->a[pLoop->iTab].fg.jointype & JT_LEFT)==0 ) break;
if( (wctrlFlags & WHERE_WANT_DISTINCT)==0
&& (pLoop->wsFlags & WHERE_ONEROW)==0
){
@@ -122888,21 +125629,25 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
/* If the caller is an UPDATE or DELETE statement that is requesting
** to use a one-pass algorithm, determine if this is appropriate.
** The one-pass algorithm only works if the WHERE clause constrains
- ** the statement to update a single row.
+ ** the statement to update or delete a single row.
*/
assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 );
- if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0
- && (pWInfo->a[0].pWLoop->wsFlags & WHERE_ONEROW)!=0 ){
- pWInfo->okOnePass = 1;
- if( HasRowid(pTabList->a[0].pTab) ){
- pWInfo->a[0].pWLoop->wsFlags &= ~WHERE_IDX_ONLY;
+ if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 ){
+ int wsFlags = pWInfo->a[0].pWLoop->wsFlags;
+ int bOnerow = (wsFlags & WHERE_ONEROW)!=0;
+ if( bOnerow || ( (wctrlFlags & WHERE_ONEPASS_MULTIROW)
+ && 0==(wsFlags & WHERE_VIRTUALTABLE)
+ )){
+ pWInfo->eOnePass = bOnerow ? ONEPASS_SINGLE : ONEPASS_MULTI;
+ if( HasRowid(pTabList->a[0].pTab) ){
+ pWInfo->a[0].pWLoop->wsFlags &= ~WHERE_IDX_ONLY;
+ }
}
}
/* Open all tables in the pTabList and any indices selected for
** searching those tables.
*/
- notReady = ~(Bitmask)0;
for(ii=0, pLevel=pWInfo->a; ii<nTabList; ii++, pLevel++){
Table *pTab; /* Table to open */
int iDb; /* Index of database containing table/index */
@@ -122927,15 +125672,15 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
if( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
&& (wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0 ){
int op = OP_OpenRead;
- if( pWInfo->okOnePass ){
+ if( pWInfo->eOnePass!=ONEPASS_OFF ){
op = OP_OpenWrite;
pWInfo->aiCurOnePass[0] = pTabItem->iCursor;
};
sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, op);
assert( pTabItem->iCursor==pLevel->iTabCur );
- testcase( !pWInfo->okOnePass && pTab->nCol==BMS-1 );
- testcase( !pWInfo->okOnePass && pTab->nCol==BMS );
- if( !pWInfo->okOnePass && pTab->nCol<BMS && HasRowid(pTab) ){
+ testcase( pWInfo->eOnePass==ONEPASS_OFF && pTab->nCol==BMS-1 );
+ testcase( pWInfo->eOnePass==ONEPASS_OFF && pTab->nCol==BMS );
+ if( pWInfo->eOnePass==ONEPASS_OFF && pTab->nCol<BMS && HasRowid(pTab) ){
Bitmask b = pTabItem->colUsed;
int n = 0;
for(; b; b=b>>1, n++){}
@@ -122943,6 +125688,10 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
SQLITE_INT_TO_PTR(n), P4_INT32);
assert( n<=pTab->nCol );
}
+#ifdef SQLITE_ENABLE_COLUMN_USED_MASK
+ sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed, pTabItem->iCursor, 0, 0,
+ (const u8*)&pTabItem->colUsed, P4_INT64);
+#endif
}else{
sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
}
@@ -122959,7 +125708,7 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
** WITHOUT ROWID table. No need for a separate index */
iIndexCur = pLevel->iTabCur;
op = 0;
- }else if( pWInfo->okOnePass ){
+ }else if( pWInfo->eOnePass!=ONEPASS_OFF ){
Index *pJ = pTabItem->pTab->pIndex;
iIndexCur = iIdxCur;
assert( wctrlFlags & WHERE_ONEPASS_DESIRED );
@@ -122988,10 +125737,24 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
sqlite3VdbeChangeP5(v, OPFLAG_SEEKEQ); /* Hint to COMDB2 */
}
VdbeComment((v, "%s", pIx->zName));
+#ifdef SQLITE_ENABLE_COLUMN_USED_MASK
+ {
+ u64 colUsed = 0;
+ int ii, jj;
+ for(ii=0; ii<pIx->nColumn; ii++){
+ jj = pIx->aiColumn[ii];
+ if( jj<0 ) continue;
+ if( jj>63 ) jj = 63;
+ if( (pTabItem->colUsed & MASKBIT(jj))==0 ) continue;
+ colUsed |= ((u64)1)<<(ii<63 ? ii : 63);
+ }
+ sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed, iIndexCur, 0, 0,
+ (u8*)&colUsed, P4_INT64);
+ }
+#endif /* SQLITE_ENABLE_COLUMN_USED_MASK */
}
}
if( iDb>=0 ) sqlite3CodeVerifySchema(pParse, iDb);
- notReady &= ~getMask(&pWInfo->sMaskSet, pTabItem->iCursor);
}
pWInfo->iTop = sqlite3VdbeCurrentAddr(v);
if( db->mallocFailed ) goto whereBeginError;
@@ -123013,14 +125776,14 @@ SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
if( db->mallocFailed ) goto whereBeginError;
}
#endif
- addrExplain = explainOneScan(
+ addrExplain = sqlite3WhereExplainOneScan(
pParse, pTabList, pLevel, ii, pLevel->iFrom, wctrlFlags
);
pLevel->addrBody = sqlite3VdbeCurrentAddr(v);
- notReady = codeOneLoopStart(pWInfo, ii, notReady);
+ notReady = sqlite3WhereCodeOneLoopStart(pWInfo, ii, notReady);
pWInfo->iContinue = pLevel->addrCont;
if( (wsFlags&WHERE_MULTI_OR)==0 && (wctrlFlags&WHERE_ONETABLE_ONLY)==0 ){
- addScanStatus(v, pTabList, pLevel, addrExplain);
+ sqlite3WhereAddScanStatus(v, pTabList, pLevel, addrExplain);
}
}
@@ -123082,7 +125845,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
}
sqlite3VdbeResolveLabel(v, pLevel->addrBrk);
if( pLevel->addrSkip ){
- sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrSkip);
+ sqlite3VdbeGoto(v, pLevel->addrSkip);
VdbeComment((v, "next skip-scan on %s", pLoop->u.btree.pIndex->zName));
sqlite3VdbeJumpHere(v, pLevel->addrSkip);
sqlite3VdbeJumpHere(v, pLevel->addrSkip-2);
@@ -123110,7 +125873,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
if( pLevel->op==OP_Return ){
sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
}else{
- sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrFirst);
+ sqlite3VdbeGoto(v, pLevel->addrFirst);
}
sqlite3VdbeJumpHere(v, addr);
}
@@ -123134,26 +125897,12 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
pLoop = pLevel->pWLoop;
/* For a co-routine, change all OP_Column references to the table of
- ** the co-routine into OP_SCopy of result contained in a register.
+ ** the co-routine into OP_Copy of result contained in a register.
** OP_Rowid becomes OP_Null.
*/
- if( pTabItem->viaCoroutine && !db->mallocFailed ){
- last = sqlite3VdbeCurrentAddr(v);
- k = pLevel->addrBody;
- pOp = sqlite3VdbeGetOp(v, k);
- for(; k<last; k++, pOp++){
- if( pOp->p1!=pLevel->iTabCur ) continue;
- if( pOp->opcode==OP_Column ){
- pOp->opcode = OP_Copy;
- pOp->p1 = pOp->p2 + pTabItem->regResult;
- pOp->p2 = pOp->p3;
- pOp->p3 = 0;
- }else if( pOp->opcode==OP_Rowid ){
- pOp->opcode = OP_Null;
- pOp->p1 = 0;
- pOp->p3 = 0;
- }
- }
+ if( pTabItem->fg.viaCoroutine && !db->mallocFailed ){
+ translateColumnToCopy(v, pLevel->addrBody, pLevel->iTabCur,
+ pTabItem->regResult, 0);
continue;
}
@@ -123167,7 +125916,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
&& (pWInfo->wctrlFlags & WHERE_OMIT_OPEN_CLOSE)==0
){
int ws = pLoop->wsFlags;
- if( !pWInfo->okOnePass && (ws & WHERE_IDX_ONLY)==0 ){
+ if( pWInfo->eOnePass==ONEPASS_OFF && (ws & WHERE_IDX_ONLY)==0 ){
sqlite3VdbeAddOp1(v, OP_Close, pTabItem->iCursor);
}
if( (ws & WHERE_INDEXED)!=0
@@ -123194,7 +125943,10 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
}else if( pLoop->wsFlags & WHERE_MULTI_OR ){
pIdx = pLevel->u.pCovidx;
}
- if( pIdx && !db->mallocFailed ){
+ if( pIdx
+ && (pWInfo->eOnePass==ONEPASS_OFF || !HasRowid(pIdx->pTable))
+ && !db->mallocFailed
+ ){
last = sqlite3VdbeCurrentAddr(v);
k = pLevel->addrBody;
pOp = sqlite3VdbeGetOp(v, k);
@@ -123206,6 +125958,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
if( !HasRowid(pTab) ){
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
x = pPk->aiColumn[x];
+ assert( x>=0 );
}
x = sqlite3ColumnOfIndex(pIdx, x);
if( x>=0 ){
@@ -123243,6 +125996,7 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
** in the input grammar file. */
/* #include <stdio.h> */
+/* #include "sqliteInt.h" */
/*
** Disable all error recovery processing in the parser push-down
@@ -123384,6 +126138,29 @@ struct AttachKey { int type; Token key; };
pOut->zStart = pPreOp->z;
pOut->zEnd = pOperand->zEnd;
}
+
+ /* Add a single new term to an ExprList that is used to store a
+ ** list of identifiers. Report an error if the ID list contains
+ ** a COLLATE clause or an ASC or DESC keyword, except ignore the
+ ** error while parsing a legacy schema.
+ */
+ static ExprList *parserAddExprIdListTerm(
+ Parse *pParse,
+ ExprList *pPrior,
+ Token *pIdToken,
+ int hasCollate,
+ int sortOrder
+ ){
+ ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0);
+ if( (hasCollate || sortOrder!=SQLITE_SO_UNDEFINED)
+ && pParse->db->init.busy==0
+ ){
+ sqlite3ErrorMsg(pParse, "syntax error after column name \"%.*s\"",
+ pIdToken->n, pIdToken->z);
+ }
+ sqlite3ExprListSetName(pParse, p, pIdToken, 1);
+ return p;
+ }
/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
@@ -123428,10 +126205,17 @@ struct AttachKey { int type; Token key; };
** sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument
** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
** sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser
-** YYNSTATE the combined number of states.
-** YYNRULE the number of rules in the grammar
** YYERRORSYMBOL is the code number of the error symbol. If not
** defined, then do no error processing.
+** YYNSTATE the combined number of states.
+** YYNRULE the number of rules in the grammar
+** YY_MAX_SHIFT Maximum value for shift actions
+** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
+** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
+** YY_MIN_REDUCE Maximum value for reduce actions
+** YY_ERROR_ACTION The yy_action[] code for syntax error
+** YY_ACCEPT_ACTION The yy_action[] code for accept
+** YY_NO_ACTION The yy_action[] code for no-op
*/
#define YYCODETYPE unsigned char
#define YYNOCODE 254
@@ -123464,12 +126248,17 @@ typedef union {
#define sqlite3ParserARG_PDECL ,Parse *pParse
#define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
#define sqlite3ParserARG_STORE yypParser->pParse = pParse
-#define YYNSTATE 642
-#define YYNRULE 327
#define YYFALLBACK 1
-#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
-#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
-#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
+#define YYNSTATE 436
+#define YYNRULE 328
+#define YY_MAX_SHIFT 435
+#define YY_MIN_SHIFTREDUCE 649
+#define YY_MAX_SHIFTREDUCE 976
+#define YY_MIN_REDUCE 977
+#define YY_MAX_REDUCE 1304
+#define YY_ERROR_ACTION 1305
+#define YY_ACCEPT_ACTION 1306
+#define YY_NO_ACTION 1307
/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
@@ -123496,16 +126285,20 @@ static const YYMINORTYPE yyzerominor = { 0 };
** Suppose the action integer is N. Then the action is determined as
** follows
**
-** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
+** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead
** token onto the stack and goto state N.
**
-** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
+** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
+** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE.
**
-** N == YYNSTATE+YYNRULE A syntax error has occurred.
+** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
+** and YY_MAX_REDUCE
+
+** N == YY_ERROR_ACTION A syntax error has occurred.
**
-** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
+** N == YY_ACCEPT_ACTION The parser accepts its input.
**
-** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
+** N == YY_NO_ACTION No such action. Denotes unused
** slots in the yy_action[] table.
**
** The action table is constructed as a single large table named yy_action[].
@@ -123535,463 +126328,446 @@ static const YYMINORTYPE yyzerominor = { 0 };
** shifting non-terminals after a reduce.
** yy_default[] Default action for each state.
*/
-#define YY_ACTTAB_COUNT (1497)
+#define YY_ACTTAB_COUNT (1501)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 306, 212, 432, 955, 639, 191, 955, 295, 559, 88,
- /* 10 */ 88, 88, 88, 81, 86, 86, 86, 86, 85, 85,
- /* 20 */ 84, 84, 84, 83, 330, 185, 184, 183, 635, 635,
- /* 30 */ 292, 606, 606, 88, 88, 88, 88, 683, 86, 86,
- /* 40 */ 86, 86, 85, 85, 84, 84, 84, 83, 330, 16,
- /* 50 */ 436, 597, 89, 90, 80, 600, 599, 601, 601, 87,
- /* 60 */ 87, 88, 88, 88, 88, 684, 86, 86, 86, 86,
- /* 70 */ 85, 85, 84, 84, 84, 83, 330, 306, 559, 84,
- /* 80 */ 84, 84, 83, 330, 65, 86, 86, 86, 86, 85,
- /* 90 */ 85, 84, 84, 84, 83, 330, 635, 635, 634, 633,
- /* 100 */ 182, 682, 550, 379, 376, 375, 17, 322, 606, 606,
- /* 110 */ 371, 198, 479, 91, 374, 82, 79, 165, 85, 85,
- /* 120 */ 84, 84, 84, 83, 330, 598, 635, 635, 107, 89,
- /* 130 */ 90, 80, 600, 599, 601, 601, 87, 87, 88, 88,
- /* 140 */ 88, 88, 186, 86, 86, 86, 86, 85, 85, 84,
- /* 150 */ 84, 84, 83, 330, 306, 594, 594, 142, 328, 327,
- /* 160 */ 484, 249, 344, 238, 635, 635, 634, 633, 585, 448,
- /* 170 */ 526, 525, 229, 388, 1, 394, 450, 584, 449, 635,
- /* 180 */ 635, 635, 635, 319, 395, 606, 606, 199, 157, 273,
- /* 190 */ 382, 268, 381, 187, 635, 635, 634, 633, 311, 555,
- /* 200 */ 266, 593, 593, 266, 347, 588, 89, 90, 80, 600,
- /* 210 */ 599, 601, 601, 87, 87, 88, 88, 88, 88, 478,
- /* 220 */ 86, 86, 86, 86, 85, 85, 84, 84, 84, 83,
- /* 230 */ 330, 306, 272, 536, 634, 633, 146, 610, 197, 310,
- /* 240 */ 575, 182, 482, 271, 379, 376, 375, 506, 21, 634,
- /* 250 */ 633, 634, 633, 635, 635, 374, 611, 574, 548, 440,
- /* 260 */ 111, 563, 606, 606, 634, 633, 324, 479, 608, 608,
- /* 270 */ 608, 300, 435, 573, 119, 407, 210, 162, 562, 883,
- /* 280 */ 592, 592, 306, 89, 90, 80, 600, 599, 601, 601,
- /* 290 */ 87, 87, 88, 88, 88, 88, 506, 86, 86, 86,
- /* 300 */ 86, 85, 85, 84, 84, 84, 83, 330, 620, 111,
- /* 310 */ 635, 635, 361, 606, 606, 358, 249, 349, 248, 433,
- /* 320 */ 243, 479, 586, 634, 633, 195, 611, 93, 119, 221,
- /* 330 */ 575, 497, 534, 534, 89, 90, 80, 600, 599, 601,
- /* 340 */ 601, 87, 87, 88, 88, 88, 88, 574, 86, 86,
- /* 350 */ 86, 86, 85, 85, 84, 84, 84, 83, 330, 306,
- /* 360 */ 77, 429, 638, 573, 589, 530, 240, 230, 242, 105,
- /* 370 */ 249, 349, 248, 515, 588, 208, 460, 529, 564, 173,
- /* 380 */ 634, 633, 970, 144, 430, 2, 424, 228, 380, 557,
- /* 390 */ 606, 606, 190, 153, 159, 158, 514, 51, 632, 631,
- /* 400 */ 630, 71, 536, 432, 954, 196, 610, 954, 614, 45,
- /* 410 */ 18, 89, 90, 80, 600, 599, 601, 601, 87, 87,
- /* 420 */ 88, 88, 88, 88, 261, 86, 86, 86, 86, 85,
- /* 430 */ 85, 84, 84, 84, 83, 330, 306, 608, 608, 608,
- /* 440 */ 542, 424, 402, 385, 241, 506, 451, 320, 211, 543,
- /* 450 */ 164, 436, 386, 293, 451, 587, 108, 496, 111, 334,
- /* 460 */ 391, 591, 424, 614, 27, 452, 453, 606, 606, 72,
- /* 470 */ 257, 70, 259, 452, 339, 342, 564, 582, 68, 415,
- /* 480 */ 469, 328, 327, 62, 614, 45, 110, 393, 89, 90,
- /* 490 */ 80, 600, 599, 601, 601, 87, 87, 88, 88, 88,
- /* 500 */ 88, 152, 86, 86, 86, 86, 85, 85, 84, 84,
- /* 510 */ 84, 83, 330, 306, 110, 499, 520, 538, 402, 389,
- /* 520 */ 424, 110, 566, 500, 593, 593, 454, 82, 79, 165,
- /* 530 */ 424, 591, 384, 564, 340, 615, 188, 162, 424, 350,
- /* 540 */ 616, 424, 614, 44, 606, 606, 445, 582, 300, 434,
- /* 550 */ 151, 19, 614, 9, 568, 580, 348, 615, 469, 567,
- /* 560 */ 614, 26, 616, 614, 45, 89, 90, 80, 600, 599,
- /* 570 */ 601, 601, 87, 87, 88, 88, 88, 88, 411, 86,
- /* 580 */ 86, 86, 86, 85, 85, 84, 84, 84, 83, 330,
- /* 590 */ 306, 579, 110, 578, 521, 282, 433, 398, 400, 255,
- /* 600 */ 486, 82, 79, 165, 487, 164, 82, 79, 165, 488,
- /* 610 */ 488, 364, 387, 424, 544, 544, 509, 350, 362, 155,
- /* 620 */ 191, 606, 606, 559, 642, 640, 333, 82, 79, 165,
- /* 630 */ 305, 564, 507, 312, 357, 614, 45, 329, 596, 595,
- /* 640 */ 194, 337, 89, 90, 80, 600, 599, 601, 601, 87,
- /* 650 */ 87, 88, 88, 88, 88, 424, 86, 86, 86, 86,
- /* 660 */ 85, 85, 84, 84, 84, 83, 330, 306, 20, 323,
- /* 670 */ 150, 263, 211, 543, 421, 596, 595, 614, 22, 424,
- /* 680 */ 193, 424, 284, 424, 391, 424, 509, 424, 577, 424,
- /* 690 */ 186, 335, 424, 559, 424, 313, 120, 546, 606, 606,
- /* 700 */ 67, 614, 47, 614, 50, 614, 48, 614, 100, 614,
- /* 710 */ 99, 614, 101, 576, 614, 102, 614, 109, 326, 89,
- /* 720 */ 90, 80, 600, 599, 601, 601, 87, 87, 88, 88,
- /* 730 */ 88, 88, 424, 86, 86, 86, 86, 85, 85, 84,
- /* 740 */ 84, 84, 83, 330, 306, 424, 311, 424, 585, 54,
- /* 750 */ 424, 516, 517, 590, 614, 112, 424, 584, 424, 572,
- /* 760 */ 424, 195, 424, 571, 424, 67, 424, 614, 94, 614,
- /* 770 */ 98, 424, 614, 97, 264, 606, 606, 195, 614, 46,
- /* 780 */ 614, 96, 614, 30, 614, 49, 614, 115, 614, 114,
- /* 790 */ 418, 229, 388, 614, 113, 306, 89, 90, 80, 600,
- /* 800 */ 599, 601, 601, 87, 87, 88, 88, 88, 88, 424,
- /* 810 */ 86, 86, 86, 86, 85, 85, 84, 84, 84, 83,
- /* 820 */ 330, 119, 424, 590, 110, 372, 606, 606, 195, 53,
- /* 830 */ 250, 614, 29, 195, 472, 438, 729, 190, 302, 498,
- /* 840 */ 14, 523, 641, 2, 614, 43, 306, 89, 90, 80,
- /* 850 */ 600, 599, 601, 601, 87, 87, 88, 88, 88, 88,
- /* 860 */ 424, 86, 86, 86, 86, 85, 85, 84, 84, 84,
- /* 870 */ 83, 330, 424, 613, 964, 964, 354, 606, 606, 420,
- /* 880 */ 312, 64, 614, 42, 391, 355, 283, 437, 301, 255,
- /* 890 */ 414, 410, 495, 492, 614, 28, 471, 306, 89, 90,
- /* 900 */ 80, 600, 599, 601, 601, 87, 87, 88, 88, 88,
- /* 910 */ 88, 424, 86, 86, 86, 86, 85, 85, 84, 84,
- /* 920 */ 84, 83, 330, 424, 110, 110, 110, 110, 606, 606,
- /* 930 */ 110, 254, 13, 614, 41, 532, 531, 283, 481, 531,
- /* 940 */ 457, 284, 119, 561, 356, 614, 40, 284, 306, 89,
- /* 950 */ 78, 80, 600, 599, 601, 601, 87, 87, 88, 88,
- /* 960 */ 88, 88, 424, 86, 86, 86, 86, 85, 85, 84,
- /* 970 */ 84, 84, 83, 330, 110, 424, 341, 220, 555, 606,
- /* 980 */ 606, 351, 555, 318, 614, 95, 413, 255, 83, 330,
- /* 990 */ 284, 284, 255, 640, 333, 356, 255, 614, 39, 306,
- /* 1000 */ 356, 90, 80, 600, 599, 601, 601, 87, 87, 88,
- /* 1010 */ 88, 88, 88, 424, 86, 86, 86, 86, 85, 85,
- /* 1020 */ 84, 84, 84, 83, 330, 424, 317, 316, 141, 465,
- /* 1030 */ 606, 606, 219, 619, 463, 614, 10, 417, 462, 255,
- /* 1040 */ 189, 510, 553, 351, 207, 363, 161, 614, 38, 315,
- /* 1050 */ 218, 255, 255, 80, 600, 599, 601, 601, 87, 87,
- /* 1060 */ 88, 88, 88, 88, 424, 86, 86, 86, 86, 85,
- /* 1070 */ 85, 84, 84, 84, 83, 330, 76, 419, 255, 3,
- /* 1080 */ 878, 461, 424, 247, 331, 331, 614, 37, 217, 76,
- /* 1090 */ 419, 390, 3, 216, 215, 422, 4, 331, 331, 424,
- /* 1100 */ 547, 12, 424, 545, 614, 36, 424, 541, 422, 424,
- /* 1110 */ 540, 424, 214, 424, 408, 424, 539, 403, 605, 605,
- /* 1120 */ 237, 614, 25, 119, 614, 24, 588, 408, 614, 45,
- /* 1130 */ 118, 614, 35, 614, 34, 614, 33, 614, 23, 588,
- /* 1140 */ 60, 223, 603, 602, 513, 378, 73, 74, 140, 139,
- /* 1150 */ 424, 110, 265, 75, 426, 425, 59, 424, 610, 73,
- /* 1160 */ 74, 549, 402, 404, 424, 373, 75, 426, 425, 604,
- /* 1170 */ 138, 610, 614, 11, 392, 76, 419, 181, 3, 614,
- /* 1180 */ 32, 271, 369, 331, 331, 493, 614, 31, 149, 608,
- /* 1190 */ 608, 608, 607, 15, 422, 365, 614, 8, 137, 489,
- /* 1200 */ 136, 190, 608, 608, 608, 607, 15, 485, 176, 135,
- /* 1210 */ 7, 252, 477, 408, 174, 133, 175, 474, 57, 56,
- /* 1220 */ 132, 130, 119, 76, 419, 588, 3, 468, 245, 464,
- /* 1230 */ 171, 331, 331, 125, 123, 456, 447, 122, 446, 104,
- /* 1240 */ 336, 231, 422, 166, 154, 73, 74, 332, 116, 431,
- /* 1250 */ 121, 309, 75, 426, 425, 222, 106, 610, 308, 637,
- /* 1260 */ 204, 408, 629, 627, 628, 6, 200, 428, 427, 290,
- /* 1270 */ 203, 622, 201, 588, 62, 63, 289, 66, 419, 399,
- /* 1280 */ 3, 401, 288, 92, 143, 331, 331, 287, 608, 608,
- /* 1290 */ 608, 607, 15, 73, 74, 227, 422, 325, 69, 416,
- /* 1300 */ 75, 426, 425, 612, 412, 610, 192, 61, 569, 209,
- /* 1310 */ 396, 226, 278, 225, 383, 408, 527, 558, 276, 533,
- /* 1320 */ 552, 528, 321, 523, 370, 508, 180, 588, 494, 179,
- /* 1330 */ 366, 117, 253, 269, 522, 503, 608, 608, 608, 607,
- /* 1340 */ 15, 551, 502, 58, 274, 524, 178, 73, 74, 304,
- /* 1350 */ 501, 368, 303, 206, 75, 426, 425, 491, 360, 610,
- /* 1360 */ 213, 177, 483, 131, 345, 298, 297, 296, 202, 294,
- /* 1370 */ 480, 490, 466, 134, 172, 129, 444, 346, 470, 128,
- /* 1380 */ 314, 459, 103, 127, 126, 148, 124, 167, 443, 235,
- /* 1390 */ 608, 608, 608, 607, 15, 442, 439, 623, 234, 299,
- /* 1400 */ 145, 583, 291, 377, 581, 160, 119, 156, 270, 636,
- /* 1410 */ 971, 169, 279, 626, 520, 625, 473, 624, 170, 621,
- /* 1420 */ 618, 119, 168, 55, 409, 423, 537, 609, 286, 285,
- /* 1430 */ 405, 570, 560, 556, 5, 52, 458, 554, 147, 267,
- /* 1440 */ 519, 504, 518, 406, 262, 239, 260, 512, 343, 511,
- /* 1450 */ 258, 353, 565, 256, 224, 251, 359, 277, 275, 476,
- /* 1460 */ 475, 246, 352, 244, 467, 455, 236, 233, 232, 307,
- /* 1470 */ 441, 281, 205, 163, 397, 280, 535, 505, 330, 617,
- /* 1480 */ 971, 971, 971, 971, 367, 971, 971, 971, 971, 971,
- /* 1490 */ 971, 971, 971, 971, 971, 971, 338,
+ /* 0 */ 311, 1306, 145, 651, 2, 192, 652, 338, 780, 92,
+ /* 10 */ 92, 92, 92, 85, 90, 90, 90, 90, 89, 89,
+ /* 20 */ 88, 88, 88, 87, 335, 88, 88, 88, 87, 335,
+ /* 30 */ 327, 856, 856, 92, 92, 92, 92, 776, 90, 90,
+ /* 40 */ 90, 90, 89, 89, 88, 88, 88, 87, 335, 86,
+ /* 50 */ 83, 166, 93, 94, 84, 868, 871, 860, 860, 91,
+ /* 60 */ 91, 92, 92, 92, 92, 335, 90, 90, 90, 90,
+ /* 70 */ 89, 89, 88, 88, 88, 87, 335, 311, 780, 90,
+ /* 80 */ 90, 90, 90, 89, 89, 88, 88, 88, 87, 335,
+ /* 90 */ 123, 808, 689, 689, 689, 689, 112, 230, 430, 257,
+ /* 100 */ 809, 698, 430, 86, 83, 166, 324, 55, 856, 856,
+ /* 110 */ 201, 158, 276, 387, 271, 386, 188, 689, 689, 828,
+ /* 120 */ 833, 49, 944, 269, 833, 49, 123, 87, 335, 93,
+ /* 130 */ 94, 84, 868, 871, 860, 860, 91, 91, 92, 92,
+ /* 140 */ 92, 92, 342, 90, 90, 90, 90, 89, 89, 88,
+ /* 150 */ 88, 88, 87, 335, 311, 328, 333, 332, 701, 408,
+ /* 160 */ 394, 69, 690, 691, 690, 691, 715, 910, 251, 354,
+ /* 170 */ 250, 698, 704, 430, 908, 430, 909, 89, 89, 88,
+ /* 180 */ 88, 88, 87, 335, 391, 856, 856, 690, 691, 183,
+ /* 190 */ 95, 340, 384, 381, 380, 833, 31, 833, 49, 912,
+ /* 200 */ 912, 333, 332, 379, 123, 311, 93, 94, 84, 868,
+ /* 210 */ 871, 860, 860, 91, 91, 92, 92, 92, 92, 114,
+ /* 220 */ 90, 90, 90, 90, 89, 89, 88, 88, 88, 87,
+ /* 230 */ 335, 430, 408, 399, 435, 657, 856, 856, 346, 57,
+ /* 240 */ 232, 828, 109, 20, 912, 912, 231, 393, 937, 760,
+ /* 250 */ 97, 751, 752, 833, 49, 708, 708, 93, 94, 84,
+ /* 260 */ 868, 871, 860, 860, 91, 91, 92, 92, 92, 92,
+ /* 270 */ 707, 90, 90, 90, 90, 89, 89, 88, 88, 88,
+ /* 280 */ 87, 335, 311, 114, 22, 706, 688, 58, 408, 390,
+ /* 290 */ 251, 349, 240, 749, 752, 689, 689, 847, 685, 115,
+ /* 300 */ 21, 231, 393, 689, 689, 697, 183, 355, 430, 384,
+ /* 310 */ 381, 380, 192, 856, 856, 780, 123, 160, 159, 223,
+ /* 320 */ 379, 738, 25, 315, 362, 841, 143, 689, 689, 835,
+ /* 330 */ 833, 48, 339, 937, 93, 94, 84, 868, 871, 860,
+ /* 340 */ 860, 91, 91, 92, 92, 92, 92, 914, 90, 90,
+ /* 350 */ 90, 90, 89, 89, 88, 88, 88, 87, 335, 311,
+ /* 360 */ 840, 840, 840, 266, 430, 690, 691, 778, 114, 1300,
+ /* 370 */ 1300, 430, 1, 690, 691, 697, 688, 689, 689, 689,
+ /* 380 */ 689, 689, 689, 287, 298, 780, 833, 10, 686, 115,
+ /* 390 */ 856, 856, 355, 833, 10, 828, 366, 690, 691, 363,
+ /* 400 */ 321, 76, 123, 74, 23, 737, 807, 323, 356, 353,
+ /* 410 */ 847, 93, 94, 84, 868, 871, 860, 860, 91, 91,
+ /* 420 */ 92, 92, 92, 92, 940, 90, 90, 90, 90, 89,
+ /* 430 */ 89, 88, 88, 88, 87, 335, 311, 806, 841, 429,
+ /* 440 */ 713, 941, 835, 430, 251, 354, 250, 690, 691, 690,
+ /* 450 */ 691, 690, 691, 86, 83, 166, 24, 942, 151, 753,
+ /* 460 */ 285, 907, 403, 907, 164, 833, 10, 856, 856, 965,
+ /* 470 */ 306, 754, 679, 840, 840, 840, 795, 216, 794, 222,
+ /* 480 */ 906, 344, 906, 904, 86, 83, 166, 286, 93, 94,
+ /* 490 */ 84, 868, 871, 860, 860, 91, 91, 92, 92, 92,
+ /* 500 */ 92, 430, 90, 90, 90, 90, 89, 89, 88, 88,
+ /* 510 */ 88, 87, 335, 311, 430, 724, 352, 705, 427, 699,
+ /* 520 */ 700, 376, 210, 833, 49, 793, 397, 857, 857, 940,
+ /* 530 */ 213, 762, 727, 334, 699, 700, 833, 10, 86, 83,
+ /* 540 */ 166, 345, 396, 902, 856, 856, 941, 385, 833, 9,
+ /* 550 */ 406, 869, 872, 187, 890, 728, 347, 398, 404, 977,
+ /* 560 */ 652, 338, 942, 954, 413, 93, 94, 84, 868, 871,
+ /* 570 */ 860, 860, 91, 91, 92, 92, 92, 92, 861, 90,
+ /* 580 */ 90, 90, 90, 89, 89, 88, 88, 88, 87, 335,
+ /* 590 */ 311, 1219, 114, 430, 834, 430, 5, 165, 192, 688,
+ /* 600 */ 832, 780, 430, 723, 430, 234, 325, 189, 163, 316,
+ /* 610 */ 356, 955, 115, 235, 269, 833, 35, 833, 36, 747,
+ /* 620 */ 720, 856, 856, 793, 833, 12, 833, 27, 745, 174,
+ /* 630 */ 968, 1290, 968, 1291, 1290, 310, 1291, 693, 317, 245,
+ /* 640 */ 264, 311, 93, 94, 84, 868, 871, 860, 860, 91,
+ /* 650 */ 91, 92, 92, 92, 92, 832, 90, 90, 90, 90,
+ /* 660 */ 89, 89, 88, 88, 88, 87, 335, 430, 320, 213,
+ /* 670 */ 762, 780, 856, 856, 920, 920, 369, 257, 966, 220,
+ /* 680 */ 966, 396, 663, 664, 665, 242, 259, 244, 262, 833,
+ /* 690 */ 37, 650, 2, 93, 94, 84, 868, 871, 860, 860,
+ /* 700 */ 91, 91, 92, 92, 92, 92, 430, 90, 90, 90,
+ /* 710 */ 90, 89, 89, 88, 88, 88, 87, 335, 311, 430,
+ /* 720 */ 239, 430, 917, 368, 430, 238, 916, 793, 833, 38,
+ /* 730 */ 430, 825, 430, 66, 430, 392, 430, 766, 766, 430,
+ /* 740 */ 367, 833, 39, 833, 28, 430, 833, 29, 68, 856,
+ /* 750 */ 856, 900, 833, 40, 833, 41, 833, 42, 833, 11,
+ /* 760 */ 72, 833, 43, 243, 305, 970, 114, 833, 99, 961,
+ /* 770 */ 93, 94, 84, 868, 871, 860, 860, 91, 91, 92,
+ /* 780 */ 92, 92, 92, 430, 90, 90, 90, 90, 89, 89,
+ /* 790 */ 88, 88, 88, 87, 335, 311, 430, 361, 430, 165,
+ /* 800 */ 147, 430, 186, 185, 184, 833, 44, 430, 289, 430,
+ /* 810 */ 246, 430, 971, 430, 212, 163, 430, 357, 833, 45,
+ /* 820 */ 833, 32, 932, 833, 46, 793, 856, 856, 718, 833,
+ /* 830 */ 47, 833, 33, 833, 117, 833, 118, 75, 833, 119,
+ /* 840 */ 288, 305, 967, 214, 935, 322, 311, 93, 94, 84,
+ /* 850 */ 868, 871, 860, 860, 91, 91, 92, 92, 92, 92,
+ /* 860 */ 430, 90, 90, 90, 90, 89, 89, 88, 88, 88,
+ /* 870 */ 87, 335, 430, 832, 426, 317, 288, 856, 856, 114,
+ /* 880 */ 763, 257, 833, 53, 930, 219, 364, 257, 257, 971,
+ /* 890 */ 361, 396, 257, 257, 833, 34, 257, 311, 93, 94,
+ /* 900 */ 84, 868, 871, 860, 860, 91, 91, 92, 92, 92,
+ /* 910 */ 92, 430, 90, 90, 90, 90, 89, 89, 88, 88,
+ /* 920 */ 88, 87, 335, 430, 217, 318, 124, 253, 856, 856,
+ /* 930 */ 218, 943, 257, 833, 100, 898, 759, 774, 361, 755,
+ /* 940 */ 423, 329, 758, 1017, 289, 833, 50, 682, 311, 93,
+ /* 950 */ 82, 84, 868, 871, 860, 860, 91, 91, 92, 92,
+ /* 960 */ 92, 92, 430, 90, 90, 90, 90, 89, 89, 88,
+ /* 970 */ 88, 88, 87, 335, 430, 256, 419, 114, 249, 856,
+ /* 980 */ 856, 331, 114, 400, 833, 101, 359, 187, 1064, 726,
+ /* 990 */ 725, 739, 401, 416, 420, 360, 833, 102, 424, 311,
+ /* 1000 */ 258, 94, 84, 868, 871, 860, 860, 91, 91, 92,
+ /* 1010 */ 92, 92, 92, 430, 90, 90, 90, 90, 89, 89,
+ /* 1020 */ 88, 88, 88, 87, 335, 430, 221, 261, 114, 114,
+ /* 1030 */ 856, 856, 808, 114, 156, 833, 98, 772, 733, 734,
+ /* 1040 */ 275, 809, 771, 316, 263, 265, 960, 833, 116, 307,
+ /* 1050 */ 741, 274, 722, 84, 868, 871, 860, 860, 91, 91,
+ /* 1060 */ 92, 92, 92, 92, 430, 90, 90, 90, 90, 89,
+ /* 1070 */ 89, 88, 88, 88, 87, 335, 80, 425, 830, 3,
+ /* 1080 */ 1214, 191, 430, 721, 336, 336, 833, 113, 252, 80,
+ /* 1090 */ 425, 68, 3, 913, 913, 428, 270, 336, 336, 430,
+ /* 1100 */ 377, 784, 430, 197, 833, 106, 430, 716, 428, 430,
+ /* 1110 */ 267, 430, 897, 68, 414, 430, 769, 409, 430, 71,
+ /* 1120 */ 430, 833, 105, 123, 833, 103, 847, 414, 833, 49,
+ /* 1130 */ 843, 833, 104, 833, 52, 800, 123, 833, 54, 847,
+ /* 1140 */ 833, 51, 833, 26, 831, 802, 77, 78, 191, 389,
+ /* 1150 */ 430, 372, 114, 79, 432, 431, 911, 911, 835, 77,
+ /* 1160 */ 78, 779, 893, 408, 410, 197, 79, 432, 431, 791,
+ /* 1170 */ 226, 835, 833, 30, 772, 80, 425, 716, 3, 771,
+ /* 1180 */ 411, 412, 897, 336, 336, 290, 291, 839, 703, 840,
+ /* 1190 */ 840, 840, 842, 19, 428, 695, 684, 672, 111, 671,
+ /* 1200 */ 843, 673, 840, 840, 840, 842, 19, 207, 661, 278,
+ /* 1210 */ 148, 304, 280, 414, 282, 6, 822, 348, 248, 241,
+ /* 1220 */ 358, 934, 720, 80, 425, 847, 3, 161, 382, 273,
+ /* 1230 */ 284, 336, 336, 415, 296, 958, 895, 894, 157, 674,
+ /* 1240 */ 107, 194, 428, 948, 135, 77, 78, 777, 953, 951,
+ /* 1250 */ 56, 319, 79, 432, 431, 121, 66, 835, 59, 128,
+ /* 1260 */ 146, 414, 350, 130, 351, 819, 131, 132, 133, 375,
+ /* 1270 */ 173, 149, 138, 847, 936, 365, 178, 70, 425, 827,
+ /* 1280 */ 3, 889, 62, 371, 915, 336, 336, 792, 840, 840,
+ /* 1290 */ 840, 842, 19, 77, 78, 208, 428, 144, 179, 373,
+ /* 1300 */ 79, 432, 431, 255, 180, 835, 260, 675, 181, 308,
+ /* 1310 */ 388, 744, 326, 743, 742, 414, 731, 718, 712, 402,
+ /* 1320 */ 309, 711, 788, 65, 277, 272, 789, 847, 730, 710,
+ /* 1330 */ 709, 279, 193, 787, 281, 876, 840, 840, 840, 842,
+ /* 1340 */ 19, 786, 283, 73, 418, 330, 422, 77, 78, 227,
+ /* 1350 */ 96, 407, 67, 405, 79, 432, 431, 292, 228, 835,
+ /* 1360 */ 215, 202, 229, 293, 767, 303, 302, 301, 204, 299,
+ /* 1370 */ 294, 295, 676, 7, 681, 433, 669, 206, 110, 224,
+ /* 1380 */ 203, 205, 434, 667, 666, 658, 120, 168, 656, 237,
+ /* 1390 */ 840, 840, 840, 842, 19, 337, 155, 233, 236, 341,
+ /* 1400 */ 167, 905, 108, 313, 903, 826, 314, 125, 126, 127,
+ /* 1410 */ 129, 170, 247, 756, 172, 928, 134, 136, 171, 60,
+ /* 1420 */ 61, 123, 169, 137, 175, 933, 176, 927, 8, 13,
+ /* 1430 */ 177, 254, 191, 918, 139, 370, 924, 140, 678, 150,
+ /* 1440 */ 374, 274, 182, 378, 141, 122, 63, 14, 383, 729,
+ /* 1450 */ 268, 15, 64, 225, 846, 845, 874, 16, 765, 770,
+ /* 1460 */ 4, 162, 209, 395, 211, 142, 878, 796, 801, 312,
+ /* 1470 */ 190, 71, 68, 875, 873, 939, 199, 938, 17, 195,
+ /* 1480 */ 18, 196, 417, 975, 152, 653, 976, 198, 153, 421,
+ /* 1490 */ 877, 154, 200, 844, 696, 81, 343, 297, 1019, 1018,
+ /* 1500 */ 300,
};
static const YYCODETYPE yy_lookahead[] = {
- /* 0 */ 19, 22, 22, 23, 1, 24, 26, 15, 27, 80,
+ /* 0 */ 19, 144, 145, 146, 147, 24, 1, 2, 27, 80,
/* 10 */ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- /* 20 */ 91, 92, 93, 94, 95, 108, 109, 110, 27, 28,
- /* 30 */ 23, 50, 51, 80, 81, 82, 83, 122, 85, 86,
- /* 40 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 22,
- /* 50 */ 70, 23, 71, 72, 73, 74, 75, 76, 77, 78,
- /* 60 */ 79, 80, 81, 82, 83, 122, 85, 86, 87, 88,
- /* 70 */ 89, 90, 91, 92, 93, 94, 95, 19, 97, 91,
- /* 80 */ 92, 93, 94, 95, 26, 85, 86, 87, 88, 89,
- /* 90 */ 90, 91, 92, 93, 94, 95, 27, 28, 97, 98,
- /* 100 */ 99, 122, 211, 102, 103, 104, 79, 19, 50, 51,
- /* 110 */ 19, 122, 59, 55, 113, 224, 225, 226, 89, 90,
- /* 120 */ 91, 92, 93, 94, 95, 23, 27, 28, 26, 71,
+ /* 20 */ 91, 92, 93, 94, 95, 91, 92, 93, 94, 95,
+ /* 30 */ 19, 50, 51, 80, 81, 82, 83, 212, 85, 86,
+ /* 40 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 224,
+ /* 50 */ 225, 226, 71, 72, 73, 74, 75, 76, 77, 78,
+ /* 60 */ 79, 80, 81, 82, 83, 95, 85, 86, 87, 88,
+ /* 70 */ 89, 90, 91, 92, 93, 94, 95, 19, 97, 85,
+ /* 80 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ /* 90 */ 66, 33, 27, 28, 27, 28, 22, 201, 152, 152,
+ /* 100 */ 42, 27, 152, 224, 225, 226, 95, 211, 50, 51,
+ /* 110 */ 99, 100, 101, 102, 103, 104, 105, 27, 28, 59,
+ /* 120 */ 174, 175, 243, 112, 174, 175, 66, 94, 95, 71,
/* 130 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- /* 140 */ 82, 83, 51, 85, 86, 87, 88, 89, 90, 91,
- /* 150 */ 92, 93, 94, 95, 19, 132, 133, 58, 89, 90,
- /* 160 */ 21, 108, 109, 110, 27, 28, 97, 98, 33, 100,
- /* 170 */ 7, 8, 119, 120, 22, 19, 107, 42, 109, 27,
- /* 180 */ 28, 27, 28, 95, 28, 50, 51, 99, 100, 101,
- /* 190 */ 102, 103, 104, 105, 27, 28, 97, 98, 107, 152,
- /* 200 */ 112, 132, 133, 112, 65, 69, 71, 72, 73, 74,
- /* 210 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 11,
+ /* 140 */ 82, 83, 195, 85, 86, 87, 88, 89, 90, 91,
+ /* 150 */ 92, 93, 94, 95, 19, 209, 89, 90, 173, 209,
+ /* 160 */ 210, 26, 97, 98, 97, 98, 181, 100, 108, 109,
+ /* 170 */ 110, 97, 174, 152, 107, 152, 109, 89, 90, 91,
+ /* 180 */ 92, 93, 94, 95, 163, 50, 51, 97, 98, 99,
+ /* 190 */ 55, 244, 102, 103, 104, 174, 175, 174, 175, 132,
+ /* 200 */ 133, 89, 90, 113, 66, 19, 71, 72, 73, 74,
+ /* 210 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 198,
/* 220 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- /* 230 */ 95, 19, 101, 97, 97, 98, 24, 101, 122, 157,
- /* 240 */ 12, 99, 103, 112, 102, 103, 104, 152, 22, 97,
- /* 250 */ 98, 97, 98, 27, 28, 113, 27, 29, 91, 164,
- /* 260 */ 165, 124, 50, 51, 97, 98, 219, 59, 132, 133,
- /* 270 */ 134, 22, 23, 45, 66, 47, 212, 213, 124, 140,
- /* 280 */ 132, 133, 19, 71, 72, 73, 74, 75, 76, 77,
- /* 290 */ 78, 79, 80, 81, 82, 83, 152, 85, 86, 87,
- /* 300 */ 88, 89, 90, 91, 92, 93, 94, 95, 164, 165,
- /* 310 */ 27, 28, 230, 50, 51, 233, 108, 109, 110, 70,
- /* 320 */ 16, 59, 23, 97, 98, 26, 97, 22, 66, 185,
- /* 330 */ 12, 187, 27, 28, 71, 72, 73, 74, 75, 76,
- /* 340 */ 77, 78, 79, 80, 81, 82, 83, 29, 85, 86,
+ /* 230 */ 95, 152, 209, 210, 148, 149, 50, 51, 100, 53,
+ /* 240 */ 154, 59, 156, 22, 132, 133, 119, 120, 163, 163,
+ /* 250 */ 22, 192, 193, 174, 175, 27, 28, 71, 72, 73,
+ /* 260 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ /* 270 */ 174, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ /* 280 */ 94, 95, 19, 198, 198, 174, 152, 24, 209, 210,
+ /* 290 */ 108, 109, 110, 192, 193, 27, 28, 69, 164, 165,
+ /* 300 */ 79, 119, 120, 27, 28, 27, 99, 222, 152, 102,
+ /* 310 */ 103, 104, 24, 50, 51, 27, 66, 89, 90, 185,
+ /* 320 */ 113, 187, 22, 157, 239, 97, 58, 27, 28, 101,
+ /* 330 */ 174, 175, 246, 163, 71, 72, 73, 74, 75, 76,
+ /* 340 */ 77, 78, 79, 80, 81, 82, 83, 11, 85, 86,
/* 350 */ 87, 88, 89, 90, 91, 92, 93, 94, 95, 19,
- /* 360 */ 22, 148, 149, 45, 23, 47, 62, 154, 64, 156,
- /* 370 */ 108, 109, 110, 37, 69, 23, 163, 59, 26, 26,
- /* 380 */ 97, 98, 144, 145, 146, 147, 152, 200, 52, 23,
- /* 390 */ 50, 51, 26, 22, 89, 90, 60, 210, 7, 8,
- /* 400 */ 9, 138, 97, 22, 23, 26, 101, 26, 174, 175,
- /* 410 */ 197, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- /* 420 */ 80, 81, 82, 83, 16, 85, 86, 87, 88, 89,
- /* 430 */ 90, 91, 92, 93, 94, 95, 19, 132, 133, 134,
- /* 440 */ 23, 152, 208, 209, 140, 152, 152, 111, 195, 196,
- /* 450 */ 98, 70, 163, 160, 152, 23, 22, 164, 165, 246,
- /* 460 */ 207, 27, 152, 174, 175, 171, 172, 50, 51, 137,
- /* 470 */ 62, 139, 64, 171, 172, 222, 124, 27, 138, 24,
- /* 480 */ 163, 89, 90, 130, 174, 175, 197, 163, 71, 72,
+ /* 360 */ 132, 133, 134, 23, 152, 97, 98, 91, 198, 119,
+ /* 370 */ 120, 152, 22, 97, 98, 97, 152, 27, 28, 27,
+ /* 380 */ 28, 27, 28, 227, 160, 97, 174, 175, 164, 165,
+ /* 390 */ 50, 51, 222, 174, 175, 59, 230, 97, 98, 233,
+ /* 400 */ 188, 137, 66, 139, 234, 187, 177, 188, 152, 239,
+ /* 410 */ 69, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ /* 420 */ 80, 81, 82, 83, 12, 85, 86, 87, 88, 89,
+ /* 430 */ 90, 91, 92, 93, 94, 95, 19, 177, 97, 152,
+ /* 440 */ 23, 29, 101, 152, 108, 109, 110, 97, 98, 97,
+ /* 450 */ 98, 97, 98, 224, 225, 226, 22, 45, 24, 47,
+ /* 460 */ 152, 152, 152, 152, 152, 174, 175, 50, 51, 249,
+ /* 470 */ 250, 59, 21, 132, 133, 134, 124, 221, 124, 188,
+ /* 480 */ 171, 172, 171, 172, 224, 225, 226, 152, 71, 72,
/* 490 */ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- /* 500 */ 83, 22, 85, 86, 87, 88, 89, 90, 91, 92,
- /* 510 */ 93, 94, 95, 19, 197, 181, 182, 23, 208, 209,
- /* 520 */ 152, 197, 26, 189, 132, 133, 232, 224, 225, 226,
- /* 530 */ 152, 97, 91, 26, 232, 116, 212, 213, 152, 222,
- /* 540 */ 121, 152, 174, 175, 50, 51, 243, 97, 22, 23,
- /* 550 */ 22, 234, 174, 175, 177, 23, 239, 116, 163, 177,
- /* 560 */ 174, 175, 121, 174, 175, 71, 72, 73, 74, 75,
- /* 570 */ 76, 77, 78, 79, 80, 81, 82, 83, 24, 85,
+ /* 500 */ 83, 152, 85, 86, 87, 88, 89, 90, 91, 92,
+ /* 510 */ 93, 94, 95, 19, 152, 183, 65, 23, 170, 171,
+ /* 520 */ 172, 19, 23, 174, 175, 26, 152, 50, 51, 12,
+ /* 530 */ 196, 197, 37, 170, 171, 172, 174, 175, 224, 225,
+ /* 540 */ 226, 232, 208, 232, 50, 51, 29, 52, 174, 175,
+ /* 550 */ 188, 74, 75, 51, 103, 60, 222, 163, 209, 0,
+ /* 560 */ 1, 2, 45, 152, 47, 71, 72, 73, 74, 75,
+ /* 570 */ 76, 77, 78, 79, 80, 81, 82, 83, 101, 85,
/* 580 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- /* 590 */ 19, 23, 197, 11, 23, 227, 70, 208, 220, 152,
- /* 600 */ 31, 224, 225, 226, 35, 98, 224, 225, 226, 108,
- /* 610 */ 109, 110, 115, 152, 117, 118, 27, 222, 49, 123,
- /* 620 */ 24, 50, 51, 27, 0, 1, 2, 224, 225, 226,
- /* 630 */ 166, 124, 168, 169, 239, 174, 175, 170, 171, 172,
- /* 640 */ 22, 194, 71, 72, 73, 74, 75, 76, 77, 78,
+ /* 590 */ 19, 140, 198, 152, 23, 152, 22, 98, 24, 152,
+ /* 600 */ 152, 27, 152, 183, 152, 152, 111, 213, 214, 107,
+ /* 610 */ 152, 164, 165, 152, 112, 174, 175, 174, 175, 181,
+ /* 620 */ 182, 50, 51, 124, 174, 175, 174, 175, 190, 26,
+ /* 630 */ 22, 23, 22, 23, 26, 166, 26, 168, 169, 16,
+ /* 640 */ 16, 19, 71, 72, 73, 74, 75, 76, 77, 78,
/* 650 */ 79, 80, 81, 82, 83, 152, 85, 86, 87, 88,
- /* 660 */ 89, 90, 91, 92, 93, 94, 95, 19, 22, 208,
- /* 670 */ 24, 23, 195, 196, 170, 171, 172, 174, 175, 152,
- /* 680 */ 26, 152, 152, 152, 207, 152, 97, 152, 23, 152,
- /* 690 */ 51, 244, 152, 97, 152, 247, 248, 23, 50, 51,
- /* 700 */ 26, 174, 175, 174, 175, 174, 175, 174, 175, 174,
- /* 710 */ 175, 174, 175, 23, 174, 175, 174, 175, 188, 71,
- /* 720 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- /* 730 */ 82, 83, 152, 85, 86, 87, 88, 89, 90, 91,
- /* 740 */ 92, 93, 94, 95, 19, 152, 107, 152, 33, 24,
- /* 750 */ 152, 100, 101, 27, 174, 175, 152, 42, 152, 23,
- /* 760 */ 152, 26, 152, 23, 152, 26, 152, 174, 175, 174,
- /* 770 */ 175, 152, 174, 175, 23, 50, 51, 26, 174, 175,
- /* 780 */ 174, 175, 174, 175, 174, 175, 174, 175, 174, 175,
- /* 790 */ 163, 119, 120, 174, 175, 19, 71, 72, 73, 74,
- /* 800 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 152,
- /* 810 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- /* 820 */ 95, 66, 152, 97, 197, 23, 50, 51, 26, 53,
- /* 830 */ 23, 174, 175, 26, 23, 23, 23, 26, 26, 26,
- /* 840 */ 36, 106, 146, 147, 174, 175, 19, 71, 72, 73,
+ /* 660 */ 89, 90, 91, 92, 93, 94, 95, 152, 220, 196,
+ /* 670 */ 197, 97, 50, 51, 108, 109, 110, 152, 70, 221,
+ /* 680 */ 70, 208, 7, 8, 9, 62, 62, 64, 64, 174,
+ /* 690 */ 175, 146, 147, 71, 72, 73, 74, 75, 76, 77,
+ /* 700 */ 78, 79, 80, 81, 82, 83, 152, 85, 86, 87,
+ /* 710 */ 88, 89, 90, 91, 92, 93, 94, 95, 19, 152,
+ /* 720 */ 195, 152, 31, 220, 152, 152, 35, 26, 174, 175,
+ /* 730 */ 152, 163, 152, 130, 152, 115, 152, 117, 118, 152,
+ /* 740 */ 49, 174, 175, 174, 175, 152, 174, 175, 26, 50,
+ /* 750 */ 51, 152, 174, 175, 174, 175, 174, 175, 174, 175,
+ /* 760 */ 138, 174, 175, 140, 22, 23, 198, 174, 175, 152,
+ /* 770 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ /* 780 */ 81, 82, 83, 152, 85, 86, 87, 88, 89, 90,
+ /* 790 */ 91, 92, 93, 94, 95, 19, 152, 152, 152, 98,
+ /* 800 */ 24, 152, 108, 109, 110, 174, 175, 152, 152, 152,
+ /* 810 */ 152, 152, 70, 152, 213, 214, 152, 152, 174, 175,
+ /* 820 */ 174, 175, 152, 174, 175, 124, 50, 51, 106, 174,
+ /* 830 */ 175, 174, 175, 174, 175, 174, 175, 138, 174, 175,
+ /* 840 */ 152, 22, 23, 22, 163, 189, 19, 71, 72, 73,
/* 850 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
/* 860 */ 152, 85, 86, 87, 88, 89, 90, 91, 92, 93,
- /* 870 */ 94, 95, 152, 196, 119, 120, 19, 50, 51, 168,
- /* 880 */ 169, 26, 174, 175, 207, 28, 152, 249, 250, 152,
- /* 890 */ 163, 163, 163, 163, 174, 175, 163, 19, 71, 72,
+ /* 870 */ 94, 95, 152, 152, 168, 169, 152, 50, 51, 198,
+ /* 880 */ 197, 152, 174, 175, 152, 240, 152, 152, 152, 70,
+ /* 890 */ 152, 208, 152, 152, 174, 175, 152, 19, 71, 72,
/* 900 */ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
/* 910 */ 83, 152, 85, 86, 87, 88, 89, 90, 91, 92,
- /* 920 */ 93, 94, 95, 152, 197, 197, 197, 197, 50, 51,
- /* 930 */ 197, 194, 36, 174, 175, 191, 192, 152, 191, 192,
- /* 940 */ 163, 152, 66, 124, 152, 174, 175, 152, 19, 71,
+ /* 920 */ 93, 94, 95, 152, 195, 247, 248, 152, 50, 51,
+ /* 930 */ 195, 195, 152, 174, 175, 195, 195, 26, 152, 195,
+ /* 940 */ 252, 220, 163, 122, 152, 174, 175, 163, 19, 71,
/* 950 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
/* 960 */ 82, 83, 152, 85, 86, 87, 88, 89, 90, 91,
- /* 970 */ 92, 93, 94, 95, 197, 152, 100, 188, 152, 50,
- /* 980 */ 51, 152, 152, 188, 174, 175, 252, 152, 94, 95,
- /* 990 */ 152, 152, 152, 1, 2, 152, 152, 174, 175, 19,
+ /* 970 */ 92, 93, 94, 95, 152, 195, 252, 198, 240, 50,
+ /* 980 */ 51, 189, 198, 19, 174, 175, 19, 51, 23, 100,
+ /* 990 */ 101, 26, 28, 163, 163, 28, 174, 175, 163, 19,
/* 1000 */ 152, 72, 73, 74, 75, 76, 77, 78, 79, 80,
/* 1010 */ 81, 82, 83, 152, 85, 86, 87, 88, 89, 90,
- /* 1020 */ 91, 92, 93, 94, 95, 152, 188, 188, 22, 194,
- /* 1030 */ 50, 51, 240, 173, 194, 174, 175, 252, 194, 152,
- /* 1040 */ 36, 181, 28, 152, 23, 219, 122, 174, 175, 219,
- /* 1050 */ 221, 152, 152, 73, 74, 75, 76, 77, 78, 79,
+ /* 1020 */ 91, 92, 93, 94, 95, 152, 240, 152, 198, 198,
+ /* 1030 */ 50, 51, 33, 198, 123, 174, 175, 116, 7, 8,
+ /* 1040 */ 101, 42, 121, 107, 152, 152, 23, 174, 175, 26,
+ /* 1050 */ 152, 112, 183, 73, 74, 75, 76, 77, 78, 79,
/* 1060 */ 80, 81, 82, 83, 152, 85, 86, 87, 88, 89,
- /* 1070 */ 90, 91, 92, 93, 94, 95, 19, 20, 152, 22,
- /* 1080 */ 23, 194, 152, 240, 27, 28, 174, 175, 240, 19,
- /* 1090 */ 20, 26, 22, 194, 194, 38, 22, 27, 28, 152,
- /* 1100 */ 23, 22, 152, 116, 174, 175, 152, 23, 38, 152,
- /* 1110 */ 23, 152, 221, 152, 57, 152, 23, 163, 50, 51,
- /* 1120 */ 194, 174, 175, 66, 174, 175, 69, 57, 174, 175,
- /* 1130 */ 40, 174, 175, 174, 175, 174, 175, 174, 175, 69,
- /* 1140 */ 22, 53, 74, 75, 30, 53, 89, 90, 22, 22,
- /* 1150 */ 152, 197, 23, 96, 97, 98, 22, 152, 101, 89,
- /* 1160 */ 90, 91, 208, 209, 152, 53, 96, 97, 98, 101,
- /* 1170 */ 22, 101, 174, 175, 152, 19, 20, 105, 22, 174,
- /* 1180 */ 175, 112, 19, 27, 28, 20, 174, 175, 24, 132,
- /* 1190 */ 133, 134, 135, 136, 38, 44, 174, 175, 107, 61,
- /* 1200 */ 54, 26, 132, 133, 134, 135, 136, 54, 107, 22,
- /* 1210 */ 5, 140, 1, 57, 36, 111, 122, 28, 79, 79,
- /* 1220 */ 131, 123, 66, 19, 20, 69, 22, 1, 16, 20,
- /* 1230 */ 125, 27, 28, 123, 111, 120, 23, 131, 23, 16,
- /* 1240 */ 68, 142, 38, 15, 22, 89, 90, 3, 167, 4,
- /* 1250 */ 248, 251, 96, 97, 98, 180, 180, 101, 251, 151,
- /* 1260 */ 6, 57, 151, 13, 151, 26, 25, 151, 161, 202,
- /* 1270 */ 153, 162, 153, 69, 130, 128, 203, 19, 20, 127,
- /* 1280 */ 22, 126, 204, 129, 22, 27, 28, 205, 132, 133,
- /* 1290 */ 134, 135, 136, 89, 90, 231, 38, 95, 137, 179,
- /* 1300 */ 96, 97, 98, 206, 179, 101, 122, 107, 159, 159,
- /* 1310 */ 125, 231, 216, 228, 107, 57, 184, 217, 216, 176,
- /* 1320 */ 217, 176, 48, 106, 18, 184, 158, 69, 159, 158,
- /* 1330 */ 46, 71, 237, 176, 176, 176, 132, 133, 134, 135,
- /* 1340 */ 136, 217, 176, 137, 216, 178, 158, 89, 90, 179,
- /* 1350 */ 176, 159, 179, 159, 96, 97, 98, 159, 159, 101,
- /* 1360 */ 5, 158, 202, 22, 18, 10, 11, 12, 13, 14,
- /* 1370 */ 190, 238, 17, 190, 158, 193, 41, 159, 202, 193,
- /* 1380 */ 159, 202, 245, 193, 193, 223, 190, 32, 159, 34,
- /* 1390 */ 132, 133, 134, 135, 136, 159, 39, 155, 43, 150,
- /* 1400 */ 223, 177, 201, 178, 177, 186, 66, 199, 177, 152,
- /* 1410 */ 253, 56, 215, 152, 182, 152, 202, 152, 63, 152,
- /* 1420 */ 152, 66, 67, 242, 229, 152, 174, 152, 152, 152,
- /* 1430 */ 152, 152, 152, 152, 199, 242, 202, 152, 198, 152,
- /* 1440 */ 152, 152, 183, 192, 152, 215, 152, 183, 215, 183,
- /* 1450 */ 152, 241, 214, 152, 211, 152, 152, 211, 211, 152,
- /* 1460 */ 152, 241, 152, 152, 152, 152, 152, 152, 152, 114,
- /* 1470 */ 152, 152, 235, 152, 152, 152, 174, 187, 95, 174,
- /* 1480 */ 253, 253, 253, 253, 236, 253, 253, 253, 253, 253,
- /* 1490 */ 253, 253, 253, 253, 253, 253, 141,
+ /* 1070 */ 90, 91, 92, 93, 94, 95, 19, 20, 23, 22,
+ /* 1080 */ 23, 26, 152, 152, 27, 28, 174, 175, 23, 19,
+ /* 1090 */ 20, 26, 22, 132, 133, 38, 152, 27, 28, 152,
+ /* 1100 */ 23, 215, 152, 26, 174, 175, 152, 27, 38, 152,
+ /* 1110 */ 23, 152, 27, 26, 57, 152, 23, 163, 152, 26,
+ /* 1120 */ 152, 174, 175, 66, 174, 175, 69, 57, 174, 175,
+ /* 1130 */ 27, 174, 175, 174, 175, 152, 66, 174, 175, 69,
+ /* 1140 */ 174, 175, 174, 175, 152, 23, 89, 90, 26, 91,
+ /* 1150 */ 152, 236, 198, 96, 97, 98, 132, 133, 101, 89,
+ /* 1160 */ 90, 152, 23, 209, 210, 26, 96, 97, 98, 152,
+ /* 1170 */ 212, 101, 174, 175, 116, 19, 20, 97, 22, 121,
+ /* 1180 */ 152, 193, 97, 27, 28, 152, 152, 152, 152, 132,
+ /* 1190 */ 133, 134, 135, 136, 38, 23, 152, 152, 26, 152,
+ /* 1200 */ 97, 152, 132, 133, 134, 135, 136, 235, 152, 212,
+ /* 1210 */ 199, 150, 212, 57, 212, 200, 203, 216, 241, 216,
+ /* 1220 */ 241, 203, 182, 19, 20, 69, 22, 186, 178, 177,
+ /* 1230 */ 216, 27, 28, 229, 202, 39, 177, 177, 200, 155,
+ /* 1240 */ 245, 122, 38, 41, 22, 89, 90, 91, 159, 159,
+ /* 1250 */ 242, 159, 96, 97, 98, 71, 130, 101, 242, 191,
+ /* 1260 */ 223, 57, 18, 194, 159, 203, 194, 194, 194, 18,
+ /* 1270 */ 158, 223, 191, 69, 203, 159, 158, 19, 20, 191,
+ /* 1280 */ 22, 203, 137, 46, 238, 27, 28, 159, 132, 133,
+ /* 1290 */ 134, 135, 136, 89, 90, 159, 38, 22, 158, 179,
+ /* 1300 */ 96, 97, 98, 237, 158, 101, 159, 159, 158, 179,
+ /* 1310 */ 107, 176, 48, 176, 176, 57, 184, 106, 176, 125,
+ /* 1320 */ 179, 178, 218, 107, 217, 176, 218, 69, 184, 176,
+ /* 1330 */ 176, 217, 159, 218, 217, 159, 132, 133, 134, 135,
+ /* 1340 */ 136, 218, 217, 137, 179, 95, 179, 89, 90, 228,
+ /* 1350 */ 129, 126, 128, 127, 96, 97, 98, 206, 231, 101,
+ /* 1360 */ 5, 25, 231, 205, 207, 10, 11, 12, 13, 14,
+ /* 1370 */ 204, 203, 17, 26, 162, 161, 13, 6, 180, 180,
+ /* 1380 */ 153, 153, 151, 151, 151, 151, 167, 32, 4, 34,
+ /* 1390 */ 132, 133, 134, 135, 136, 3, 22, 142, 43, 68,
+ /* 1400 */ 15, 23, 16, 251, 23, 120, 251, 248, 131, 111,
+ /* 1410 */ 123, 56, 16, 20, 125, 1, 123, 131, 63, 79,
+ /* 1420 */ 79, 66, 67, 111, 36, 28, 122, 1, 5, 22,
+ /* 1430 */ 107, 140, 26, 54, 54, 44, 61, 107, 20, 24,
+ /* 1440 */ 19, 112, 105, 53, 22, 40, 22, 22, 53, 30,
+ /* 1450 */ 23, 22, 22, 53, 23, 23, 23, 22, 116, 23,
+ /* 1460 */ 22, 122, 23, 26, 23, 22, 11, 124, 28, 114,
+ /* 1470 */ 36, 26, 26, 23, 23, 23, 122, 23, 36, 26,
+ /* 1480 */ 36, 22, 24, 23, 22, 1, 23, 26, 22, 24,
+ /* 1490 */ 23, 22, 122, 23, 23, 22, 141, 23, 122, 122,
+ /* 1500 */ 15,
};
-#define YY_SHIFT_USE_DFLT (-86)
-#define YY_SHIFT_COUNT (429)
-#define YY_SHIFT_MIN (-85)
-#define YY_SHIFT_MAX (1383)
+#define YY_SHIFT_USE_DFLT (-72)
+#define YY_SHIFT_COUNT (435)
+#define YY_SHIFT_MIN (-71)
+#define YY_SHIFT_MAX (1485)
static const short yy_shift_ofst[] = {
- /* 0 */ 992, 1057, 1355, 1156, 1204, 1204, 1, 262, -19, 135,
- /* 10 */ 135, 776, 1204, 1204, 1204, 1204, 69, 69, 53, 208,
- /* 20 */ 283, 755, 58, 725, 648, 571, 494, 417, 340, 263,
- /* 30 */ 212, 827, 827, 827, 827, 827, 827, 827, 827, 827,
- /* 40 */ 827, 827, 827, 827, 827, 827, 878, 827, 929, 980,
- /* 50 */ 980, 1070, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
+ /* 0 */ 5, 1057, 1355, 1070, 1204, 1204, 1204, 90, 60, -19,
+ /* 10 */ 58, 58, 186, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
+ /* 20 */ 67, 67, 182, 336, 65, 250, 135, 263, 340, 417,
+ /* 30 */ 494, 571, 622, 699, 776, 827, 827, 827, 827, 827,
+ /* 40 */ 827, 827, 827, 827, 827, 827, 827, 827, 827, 827,
+ /* 50 */ 878, 827, 929, 980, 980, 1156, 1204, 1204, 1204, 1204,
/* 60 */ 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
/* 70 */ 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
- /* 80 */ 1258, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204,
- /* 90 */ 1204, 1204, 1204, 1204, -71, -47, -47, -47, -47, -47,
- /* 100 */ 0, 29, -12, 283, 283, 139, 91, 392, 392, 894,
- /* 110 */ 672, 726, 1383, -86, -86, -86, 88, 318, 318, 99,
- /* 120 */ 381, -20, 283, 283, 283, 283, 283, 283, 283, 283,
- /* 130 */ 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- /* 140 */ 283, 283, 283, 283, 624, 876, 726, 672, 1340, 1340,
- /* 150 */ 1340, 1340, 1340, 1340, -86, -86, -86, 305, 136, 136,
- /* 160 */ 142, 167, 226, 154, 137, 152, 283, 283, 283, 283,
- /* 170 */ 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- /* 180 */ 283, 283, 283, 336, 336, 336, 283, 283, 352, 283,
- /* 190 */ 283, 283, 283, 283, 228, 283, 283, 283, 283, 283,
- /* 200 */ 283, 283, 283, 283, 283, 501, 569, 596, 596, 596,
- /* 210 */ 507, 497, 441, 391, 353, 156, 156, 857, 353, 857,
- /* 220 */ 735, 813, 639, 715, 156, 332, 715, 715, 496, 419,
- /* 230 */ 646, 1357, 1184, 1184, 1335, 1335, 1184, 1341, 1260, 1144,
- /* 240 */ 1346, 1346, 1346, 1346, 1184, 1306, 1144, 1341, 1260, 1260,
- /* 250 */ 1144, 1184, 1306, 1206, 1284, 1184, 1184, 1306, 1184, 1306,
- /* 260 */ 1184, 1306, 1262, 1207, 1207, 1207, 1274, 1262, 1207, 1217,
- /* 270 */ 1207, 1274, 1207, 1207, 1185, 1200, 1185, 1200, 1185, 1200,
- /* 280 */ 1184, 1184, 1161, 1262, 1202, 1202, 1262, 1154, 1155, 1147,
- /* 290 */ 1152, 1144, 1241, 1239, 1250, 1250, 1254, 1254, 1254, 1254,
- /* 300 */ -86, -86, -86, -86, -86, -86, 1068, 304, 526, 249,
- /* 310 */ 408, -83, 434, 812, 27, 811, 807, 802, 751, 589,
- /* 320 */ 651, 163, 131, 674, 366, 450, 299, 148, 23, 102,
- /* 330 */ 229, -21, 1245, 1244, 1222, 1099, 1228, 1172, 1223, 1215,
- /* 340 */ 1213, 1115, 1106, 1123, 1110, 1209, 1105, 1212, 1226, 1098,
- /* 350 */ 1089, 1140, 1139, 1104, 1189, 1178, 1094, 1211, 1205, 1187,
- /* 360 */ 1101, 1071, 1153, 1175, 1146, 1138, 1151, 1091, 1164, 1165,
- /* 370 */ 1163, 1069, 1072, 1148, 1112, 1134, 1127, 1129, 1126, 1092,
- /* 380 */ 1114, 1118, 1088, 1090, 1093, 1087, 1084, 987, 1079, 1077,
- /* 390 */ 1074, 1065, 924, 1021, 1014, 1004, 1006, 819, 739, 896,
- /* 400 */ 855, 804, 739, 740, 736, 690, 654, 665, 618, 582,
- /* 410 */ 568, 528, 554, 379, 532, 479, 455, 379, 432, 371,
- /* 420 */ 341, 28, 338, 116, -11, -57, -85, 7, -8, 3,
+ /* 80 */ 1204, 1204, 1204, 1204, 1258, 1204, 1204, 1204, 1204, 1204,
+ /* 90 */ 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, -71, -47,
+ /* 100 */ -47, -47, -47, -47, -6, 88, -66, 65, 65, 451,
+ /* 110 */ 502, 112, 112, 33, 127, 278, -30, -72, -72, -72,
+ /* 120 */ 11, 412, 412, 268, 608, 610, 65, 65, 65, 65,
+ /* 130 */ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ /* 140 */ 65, 65, 65, 65, 65, 559, 138, 278, 127, 24,
+ /* 150 */ 24, 24, 24, 24, 24, -72, -72, -72, 228, 341,
+ /* 160 */ 341, 207, 276, 300, 352, 354, 350, 65, 65, 65,
+ /* 170 */ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ /* 180 */ 65, 65, 65, 65, 495, 495, 495, 65, 65, 499,
+ /* 190 */ 65, 65, 65, 574, 65, 65, 517, 65, 65, 65,
+ /* 200 */ 65, 65, 65, 65, 65, 65, 65, 566, 691, 288,
+ /* 210 */ 288, 288, 701, 620, 1058, 675, 603, 964, 964, 967,
+ /* 220 */ 603, 967, 722, 965, 936, 999, 964, 264, 999, 999,
+ /* 230 */ 911, 921, 434, 1196, 1119, 1119, 1202, 1202, 1119, 1222,
+ /* 240 */ 1184, 1126, 1244, 1244, 1244, 1244, 1119, 1251, 1126, 1222,
+ /* 250 */ 1184, 1184, 1126, 1119, 1251, 1145, 1237, 1119, 1119, 1251,
+ /* 260 */ 1275, 1119, 1251, 1119, 1251, 1275, 1203, 1203, 1203, 1264,
+ /* 270 */ 1275, 1203, 1211, 1203, 1264, 1203, 1203, 1194, 1216, 1194,
+ /* 280 */ 1216, 1194, 1216, 1194, 1216, 1119, 1119, 1206, 1275, 1250,
+ /* 290 */ 1250, 1275, 1221, 1225, 1224, 1226, 1126, 1336, 1347, 1363,
+ /* 300 */ 1363, 1371, 1371, 1371, 1371, -72, -72, -72, -72, -72,
+ /* 310 */ -72, 477, 623, 742, 819, 624, 694, 74, 1023, 221,
+ /* 320 */ 1055, 1065, 1077, 1087, 1080, 889, 1031, 939, 1093, 1122,
+ /* 330 */ 1085, 1139, 961, 1024, 1172, 1103, 821, 1384, 1392, 1374,
+ /* 340 */ 1255, 1385, 1331, 1386, 1378, 1381, 1285, 1277, 1298, 1287,
+ /* 350 */ 1393, 1289, 1396, 1414, 1293, 1286, 1340, 1341, 1312, 1397,
+ /* 360 */ 1388, 1304, 1426, 1423, 1407, 1323, 1291, 1379, 1406, 1380,
+ /* 370 */ 1375, 1391, 1330, 1415, 1418, 1421, 1329, 1337, 1422, 1390,
+ /* 380 */ 1424, 1425, 1427, 1429, 1395, 1419, 1430, 1400, 1405, 1431,
+ /* 390 */ 1432, 1433, 1342, 1435, 1436, 1438, 1437, 1339, 1439, 1441,
+ /* 400 */ 1440, 1434, 1443, 1343, 1445, 1442, 1446, 1444, 1445, 1450,
+ /* 410 */ 1451, 1452, 1453, 1454, 1459, 1455, 1460, 1462, 1458, 1461,
+ /* 420 */ 1463, 1466, 1465, 1461, 1467, 1469, 1470, 1471, 1473, 1354,
+ /* 430 */ 1370, 1376, 1377, 1474, 1485, 1484,
};
-#define YY_REDUCE_USE_DFLT (-110)
-#define YY_REDUCE_COUNT (305)
-#define YY_REDUCE_MIN (-109)
-#define YY_REDUCE_MAX (1323)
+#define YY_REDUCE_USE_DFLT (-176)
+#define YY_REDUCE_COUNT (310)
+#define YY_REDUCE_MIN (-175)
+#define YY_REDUCE_MAX (1234)
static const short yy_reduce_ofst[] = {
- /* 0 */ 238, 954, 213, 289, 310, 234, 144, 317, -109, 382,
- /* 10 */ 377, 303, 461, 389, 378, 368, 302, 294, 253, 395,
- /* 20 */ 293, 324, 403, 403, 403, 403, 403, 403, 403, 403,
- /* 30 */ 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- /* 40 */ 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- /* 50 */ 403, 1022, 1012, 1005, 998, 963, 961, 959, 957, 950,
- /* 60 */ 947, 930, 912, 873, 861, 823, 810, 771, 759, 720,
- /* 70 */ 708, 670, 657, 619, 614, 612, 610, 608, 606, 604,
- /* 80 */ 598, 595, 593, 580, 542, 540, 537, 535, 533, 531,
- /* 90 */ 529, 527, 503, 386, 403, 403, 403, 403, 403, 403,
- /* 100 */ 403, 403, 403, 95, 447, 82, 334, 504, 467, 403,
- /* 110 */ 477, 464, 403, 403, 403, 403, 860, 747, 744, 785,
- /* 120 */ 638, 638, 926, 891, 900, 899, 887, 844, 840, 835,
- /* 130 */ 848, 830, 843, 829, 792, 839, 826, 737, 838, 795,
- /* 140 */ 789, 47, 734, 530, 696, 777, 711, 677, 733, 730,
- /* 150 */ 729, 728, 727, 627, 448, 64, 187, 1305, 1302, 1252,
- /* 160 */ 1290, 1273, 1323, 1322, 1321, 1319, 1318, 1316, 1315, 1314,
- /* 170 */ 1313, 1312, 1311, 1310, 1308, 1307, 1304, 1303, 1301, 1298,
- /* 180 */ 1294, 1292, 1289, 1266, 1264, 1259, 1288, 1287, 1238, 1285,
- /* 190 */ 1281, 1280, 1279, 1278, 1251, 1277, 1276, 1275, 1273, 1268,
- /* 200 */ 1267, 1265, 1263, 1261, 1257, 1248, 1237, 1247, 1246, 1243,
- /* 210 */ 1238, 1240, 1235, 1249, 1234, 1233, 1230, 1220, 1214, 1210,
- /* 220 */ 1225, 1219, 1232, 1231, 1197, 1195, 1227, 1224, 1201, 1208,
- /* 230 */ 1242, 1137, 1236, 1229, 1193, 1181, 1221, 1177, 1196, 1179,
- /* 240 */ 1191, 1190, 1186, 1182, 1218, 1216, 1176, 1162, 1183, 1180,
- /* 250 */ 1160, 1199, 1203, 1133, 1095, 1198, 1194, 1188, 1192, 1171,
- /* 260 */ 1169, 1168, 1173, 1174, 1166, 1159, 1141, 1170, 1158, 1167,
- /* 270 */ 1157, 1132, 1145, 1143, 1124, 1128, 1103, 1102, 1100, 1096,
- /* 280 */ 1150, 1149, 1085, 1125, 1080, 1064, 1120, 1097, 1082, 1078,
- /* 290 */ 1073, 1067, 1109, 1107, 1119, 1117, 1116, 1113, 1111, 1108,
- /* 300 */ 1007, 1000, 1002, 1076, 1075, 1081,
+ /* 0 */ -143, 954, 86, 21, -50, 23, 79, 134, 170, -175,
+ /* 10 */ 229, 260, -121, 212, 219, 291, -54, 349, 362, 156,
+ /* 20 */ 309, 311, 334, 85, 224, 394, 314, 314, 314, 314,
+ /* 30 */ 314, 314, 314, 314, 314, 314, 314, 314, 314, 314,
+ /* 40 */ 314, 314, 314, 314, 314, 314, 314, 314, 314, 314,
+ /* 50 */ 314, 314, 314, 314, 314, 374, 441, 443, 450, 452,
+ /* 60 */ 515, 554, 567, 569, 572, 578, 580, 582, 584, 587,
+ /* 70 */ 593, 631, 644, 646, 649, 655, 657, 659, 661, 664,
+ /* 80 */ 708, 720, 759, 771, 810, 822, 861, 873, 912, 930,
+ /* 90 */ 947, 950, 957, 959, 963, 966, 968, 998, 314, 314,
+ /* 100 */ 314, 314, 314, 314, 314, 314, 314, 447, -53, 166,
+ /* 110 */ 438, 348, 363, 314, 473, 469, 314, 314, 314, 314,
+ /* 120 */ -15, 59, 101, 688, 220, 220, 525, 256, 729, 735,
+ /* 130 */ 736, 740, 741, 744, 645, 448, 738, 458, 786, 503,
+ /* 140 */ 780, 656, 721, 724, 792, 545, 568, 706, 683, 681,
+ /* 150 */ 779, 784, 830, 831, 835, 678, 601, -104, -2, 96,
+ /* 160 */ 111, 218, 287, 308, 310, 312, 335, 411, 453, 461,
+ /* 170 */ 573, 599, 617, 658, 665, 670, 732, 734, 775, 848,
+ /* 180 */ 875, 892, 893, 898, 332, 420, 869, 931, 944, 886,
+ /* 190 */ 983, 992, 1009, 958, 1017, 1028, 988, 1033, 1034, 1035,
+ /* 200 */ 287, 1036, 1044, 1045, 1047, 1049, 1056, 915, 972, 997,
+ /* 210 */ 1000, 1002, 886, 1011, 1015, 1061, 1013, 1001, 1003, 977,
+ /* 220 */ 1018, 979, 1050, 1041, 1040, 1052, 1014, 1004, 1059, 1060,
+ /* 230 */ 1032, 1038, 1084, 995, 1089, 1090, 1008, 1016, 1092, 1037,
+ /* 240 */ 1068, 1062, 1069, 1072, 1073, 1074, 1105, 1112, 1071, 1048,
+ /* 250 */ 1081, 1088, 1078, 1116, 1118, 1046, 1066, 1128, 1136, 1140,
+ /* 260 */ 1120, 1147, 1146, 1148, 1150, 1130, 1135, 1137, 1138, 1132,
+ /* 270 */ 1141, 1142, 1143, 1149, 1144, 1153, 1154, 1104, 1107, 1108,
+ /* 280 */ 1114, 1115, 1117, 1123, 1125, 1173, 1176, 1121, 1165, 1127,
+ /* 290 */ 1131, 1167, 1157, 1151, 1158, 1166, 1168, 1212, 1214, 1227,
+ /* 300 */ 1228, 1231, 1232, 1233, 1234, 1152, 1155, 1159, 1198, 1199,
+ /* 310 */ 1219,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 647, 964, 964, 964, 878, 878, 969, 964, 774, 802,
- /* 10 */ 802, 938, 969, 969, 969, 876, 969, 969, 969, 964,
- /* 20 */ 969, 778, 808, 969, 969, 969, 969, 969, 969, 969,
- /* 30 */ 969, 937, 939, 816, 815, 918, 789, 813, 806, 810,
- /* 40 */ 879, 872, 873, 871, 875, 880, 969, 809, 841, 856,
- /* 50 */ 840, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 60 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 70 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 80 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 90 */ 969, 969, 969, 969, 850, 855, 862, 854, 851, 843,
- /* 100 */ 842, 844, 845, 969, 969, 673, 739, 969, 969, 846,
- /* 110 */ 969, 685, 847, 859, 858, 857, 680, 969, 969, 969,
- /* 120 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 130 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 140 */ 969, 969, 969, 969, 647, 964, 969, 969, 964, 964,
- /* 150 */ 964, 964, 964, 964, 956, 778, 768, 969, 969, 969,
- /* 160 */ 969, 969, 969, 969, 969, 969, 969, 944, 942, 969,
- /* 170 */ 891, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 180 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 190 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 200 */ 969, 969, 969, 969, 653, 969, 911, 774, 774, 774,
- /* 210 */ 776, 754, 766, 655, 812, 791, 791, 923, 812, 923,
- /* 220 */ 710, 733, 707, 802, 791, 874, 802, 802, 775, 766,
- /* 230 */ 969, 949, 782, 782, 941, 941, 782, 821, 743, 812,
- /* 240 */ 750, 750, 750, 750, 782, 670, 812, 821, 743, 743,
- /* 250 */ 812, 782, 670, 917, 915, 782, 782, 670, 782, 670,
- /* 260 */ 782, 670, 884, 741, 741, 741, 725, 884, 741, 710,
- /* 270 */ 741, 725, 741, 741, 795, 790, 795, 790, 795, 790,
- /* 280 */ 782, 782, 969, 884, 888, 888, 884, 807, 796, 805,
- /* 290 */ 803, 812, 676, 728, 663, 663, 652, 652, 652, 652,
- /* 300 */ 961, 961, 956, 712, 712, 695, 969, 969, 969, 969,
- /* 310 */ 969, 969, 687, 969, 893, 969, 969, 969, 969, 969,
- /* 320 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 330 */ 969, 828, 969, 648, 951, 969, 969, 948, 969, 969,
- /* 340 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 350 */ 969, 969, 969, 969, 969, 969, 921, 969, 969, 969,
- /* 360 */ 969, 969, 969, 914, 913, 969, 969, 969, 969, 969,
- /* 370 */ 969, 969, 969, 969, 969, 969, 969, 969, 969, 969,
- /* 380 */ 969, 969, 969, 969, 969, 969, 969, 757, 969, 969,
- /* 390 */ 969, 761, 969, 969, 969, 969, 969, 969, 804, 969,
- /* 400 */ 797, 969, 877, 969, 969, 969, 969, 969, 969, 969,
- /* 410 */ 969, 969, 969, 966, 969, 969, 969, 965, 969, 969,
- /* 420 */ 969, 969, 969, 830, 969, 829, 833, 969, 661, 969,
- /* 430 */ 644, 649, 960, 963, 962, 959, 958, 957, 952, 950,
- /* 440 */ 947, 946, 945, 943, 940, 936, 897, 895, 902, 901,
- /* 450 */ 900, 899, 898, 896, 894, 892, 818, 817, 814, 811,
- /* 460 */ 753, 935, 890, 752, 749, 748, 669, 953, 920, 929,
- /* 470 */ 928, 927, 822, 926, 925, 924, 922, 919, 906, 820,
- /* 480 */ 819, 744, 882, 881, 672, 910, 909, 908, 912, 916,
- /* 490 */ 907, 784, 751, 671, 668, 675, 679, 731, 732, 740,
- /* 500 */ 738, 737, 736, 735, 734, 730, 681, 686, 724, 709,
- /* 510 */ 708, 717, 716, 722, 721, 720, 719, 718, 715, 714,
- /* 520 */ 713, 706, 705, 711, 704, 727, 726, 723, 703, 747,
- /* 530 */ 746, 745, 742, 702, 701, 700, 833, 699, 698, 838,
- /* 540 */ 837, 866, 826, 755, 759, 758, 762, 763, 771, 770,
- /* 550 */ 769, 780, 781, 793, 792, 824, 823, 794, 779, 773,
- /* 560 */ 772, 788, 787, 786, 785, 777, 767, 799, 798, 868,
- /* 570 */ 783, 867, 865, 934, 933, 932, 931, 930, 870, 967,
- /* 580 */ 968, 887, 889, 886, 801, 800, 885, 869, 839, 836,
- /* 590 */ 690, 691, 905, 904, 903, 693, 692, 689, 688, 863,
- /* 600 */ 860, 852, 864, 861, 853, 849, 848, 834, 832, 831,
- /* 610 */ 827, 835, 760, 756, 825, 765, 764, 697, 696, 694,
- /* 620 */ 678, 677, 674, 667, 665, 664, 666, 662, 660, 659,
- /* 630 */ 658, 657, 656, 684, 683, 682, 654, 651, 650, 646,
- /* 640 */ 645, 643,
+ /* 0 */ 982, 1300, 1300, 1300, 1214, 1214, 1214, 1305, 1300, 1109,
+ /* 10 */ 1138, 1138, 1274, 1305, 1305, 1305, 1305, 1305, 1305, 1212,
+ /* 20 */ 1305, 1305, 1305, 1300, 1305, 1113, 1144, 1305, 1305, 1305,
+ /* 30 */ 1305, 1305, 1305, 1305, 1305, 1273, 1275, 1152, 1151, 1254,
+ /* 40 */ 1125, 1149, 1142, 1146, 1215, 1208, 1209, 1207, 1211, 1216,
+ /* 50 */ 1305, 1145, 1177, 1192, 1176, 1305, 1305, 1305, 1305, 1305,
+ /* 60 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 70 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 80 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 90 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1186, 1191,
+ /* 100 */ 1198, 1190, 1187, 1179, 1178, 1180, 1181, 1305, 1305, 1008,
+ /* 110 */ 1074, 1305, 1305, 1182, 1305, 1020, 1183, 1195, 1194, 1193,
+ /* 120 */ 1015, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 130 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 140 */ 1305, 1305, 1305, 1305, 1305, 982, 1300, 1305, 1305, 1300,
+ /* 150 */ 1300, 1300, 1300, 1300, 1300, 1292, 1113, 1103, 1305, 1305,
+ /* 160 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1280, 1278,
+ /* 170 */ 1305, 1227, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 180 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 190 */ 1305, 1305, 1305, 1109, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 200 */ 1305, 1305, 1305, 1305, 1305, 1305, 988, 1305, 1247, 1109,
+ /* 210 */ 1109, 1109, 1111, 1089, 1101, 990, 1148, 1127, 1127, 1259,
+ /* 220 */ 1148, 1259, 1045, 1068, 1042, 1138, 1127, 1210, 1138, 1138,
+ /* 230 */ 1110, 1101, 1305, 1285, 1118, 1118, 1277, 1277, 1118, 1157,
+ /* 240 */ 1078, 1148, 1085, 1085, 1085, 1085, 1118, 1005, 1148, 1157,
+ /* 250 */ 1078, 1078, 1148, 1118, 1005, 1253, 1251, 1118, 1118, 1005,
+ /* 260 */ 1220, 1118, 1005, 1118, 1005, 1220, 1076, 1076, 1076, 1060,
+ /* 270 */ 1220, 1076, 1045, 1076, 1060, 1076, 1076, 1131, 1126, 1131,
+ /* 280 */ 1126, 1131, 1126, 1131, 1126, 1118, 1118, 1305, 1220, 1224,
+ /* 290 */ 1224, 1220, 1143, 1132, 1141, 1139, 1148, 1011, 1063, 998,
+ /* 300 */ 998, 987, 987, 987, 987, 1297, 1297, 1292, 1047, 1047,
+ /* 310 */ 1030, 1305, 1305, 1305, 1305, 1305, 1305, 1022, 1305, 1229,
+ /* 320 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 330 */ 1305, 1305, 1305, 1305, 1305, 1305, 1164, 1305, 983, 1287,
+ /* 340 */ 1305, 1305, 1284, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 350 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 360 */ 1305, 1257, 1305, 1305, 1305, 1305, 1305, 1305, 1250, 1249,
+ /* 370 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 380 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
+ /* 390 */ 1305, 1305, 1092, 1305, 1305, 1305, 1096, 1305, 1305, 1305,
+ /* 400 */ 1305, 1305, 1305, 1305, 1140, 1305, 1133, 1305, 1213, 1305,
+ /* 410 */ 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1302,
+ /* 420 */ 1305, 1305, 1305, 1301, 1305, 1305, 1305, 1305, 1305, 1166,
+ /* 430 */ 1305, 1165, 1169, 1305, 996, 1305,
};
/* The next table maps tokens into fallback tokens. If a construct
@@ -124090,9 +126866,13 @@ static const YYCODETYPE yyFallback[] = {
** + The semantic value stored at this level of the stack. This is
** the information used by the action routines in the grammar.
** It is sometimes called the "minor" token.
+**
+** After the "shift" half of a SHIFTREDUCE action, the stateno field
+** actually contains the reduce action for the second half of the
+** SHIFTREDUCE.
*/
struct yyStackEntry {
- YYACTIONTYPE stateno; /* The state-number */
+ YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */
YYCODETYPE major; /* The major token value. This is the code
** number for the token at this stack level */
YYMINORTYPE minor; /* The user-supplied minor token value. This
@@ -124198,18 +126978,18 @@ static const char *const yyTokenName[] = {
"column", "columnid", "type", "carglist",
"typetoken", "typename", "signed", "plus_num",
"minus_num", "ccons", "term", "expr",
- "onconf", "sortorder", "autoinc", "idxlist_opt",
+ "onconf", "sortorder", "autoinc", "eidlist_opt",
"refargs", "defer_subclause", "refarg", "refact",
"init_deferred_pred_opt", "conslist", "tconscomma", "tcons",
- "idxlist", "defer_subclause_opt", "orconf", "resolvetype",
- "raisetype", "ifexists", "fullname", "selectnowith",
- "oneselect", "with", "multiselect_op", "distinct",
- "selcollist", "from", "where_opt", "groupby_opt",
- "having_opt", "orderby_opt", "limit_opt", "values",
- "nexprlist", "exprlist", "sclp", "as",
- "seltablist", "stl_prefix", "joinop", "indexed_opt",
- "on_opt", "using_opt", "joinop2", "idlist",
- "sortlist", "setlist", "insert_cmd", "inscollist_opt",
+ "sortlist", "eidlist", "defer_subclause_opt", "orconf",
+ "resolvetype", "raisetype", "ifexists", "fullname",
+ "selectnowith", "oneselect", "with", "multiselect_op",
+ "distinct", "selcollist", "from", "where_opt",
+ "groupby_opt", "having_opt", "orderby_opt", "limit_opt",
+ "values", "nexprlist", "exprlist", "sclp",
+ "as", "seltablist", "stl_prefix", "joinop",
+ "indexed_opt", "on_opt", "using_opt", "joinop2",
+ "idlist", "setlist", "insert_cmd", "idlist_opt",
"likeop", "between_op", "in_op", "case_operand",
"case_exprlist", "case_else", "uniqueflag", "collate",
"nmnum", "trigger_decl", "trigger_cmd_list", "trigger_time",
@@ -124290,7 +127070,7 @@ static const char *const yyRuleName[] = {
/* 62 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
/* 63 */ "ccons ::= UNIQUE onconf",
/* 64 */ "ccons ::= CHECK LP expr RP",
- /* 65 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
+ /* 65 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
/* 66 */ "ccons ::= defer_subclause",
/* 67 */ "ccons ::= COLLATE ID|STRING",
/* 68 */ "autoinc ::=",
@@ -124318,10 +127098,10 @@ static const char *const yyRuleName[] = {
/* 90 */ "tconscomma ::= COMMA",
/* 91 */ "tconscomma ::=",
/* 92 */ "tcons ::= CONSTRAINT nm",
- /* 93 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
- /* 94 */ "tcons ::= UNIQUE LP idxlist RP onconf",
+ /* 93 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
+ /* 94 */ "tcons ::= UNIQUE LP sortlist RP onconf",
/* 95 */ "tcons ::= CHECK LP expr RP onconf",
- /* 96 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
+ /* 96 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
/* 97 */ "defer_subclause_opt ::=",
/* 98 */ "defer_subclause_opt ::= defer_subclause",
/* 99 */ "onconf ::=",
@@ -124334,7 +127114,7 @@ static const char *const yyRuleName[] = {
/* 106 */ "cmd ::= DROP TABLE ifexists fullname",
/* 107 */ "ifexists ::= IF EXISTS",
/* 108 */ "ifexists ::=",
- /* 109 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select",
+ /* 109 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
/* 110 */ "cmd ::= DROP VIEW ifexists fullname",
/* 111 */ "cmd ::= select",
/* 112 */ "select ::= with selectnowith",
@@ -124363,195 +127143,196 @@ static const char *const yyRuleName[] = {
/* 135 */ "stl_prefix ::= seltablist joinop",
/* 136 */ "stl_prefix ::=",
/* 137 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
- /* 138 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
- /* 139 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
- /* 140 */ "dbnm ::=",
- /* 141 */ "dbnm ::= DOT nm",
- /* 142 */ "fullname ::= nm dbnm",
- /* 143 */ "joinop ::= COMMA|JOIN",
- /* 144 */ "joinop ::= JOIN_KW JOIN",
- /* 145 */ "joinop ::= JOIN_KW nm JOIN",
- /* 146 */ "joinop ::= JOIN_KW nm nm JOIN",
- /* 147 */ "on_opt ::= ON expr",
- /* 148 */ "on_opt ::=",
- /* 149 */ "indexed_opt ::=",
- /* 150 */ "indexed_opt ::= INDEXED BY nm",
- /* 151 */ "indexed_opt ::= NOT INDEXED",
- /* 152 */ "using_opt ::= USING LP idlist RP",
- /* 153 */ "using_opt ::=",
- /* 154 */ "orderby_opt ::=",
- /* 155 */ "orderby_opt ::= ORDER BY sortlist",
- /* 156 */ "sortlist ::= sortlist COMMA expr sortorder",
- /* 157 */ "sortlist ::= expr sortorder",
- /* 158 */ "sortorder ::= ASC",
- /* 159 */ "sortorder ::= DESC",
- /* 160 */ "sortorder ::=",
- /* 161 */ "groupby_opt ::=",
- /* 162 */ "groupby_opt ::= GROUP BY nexprlist",
- /* 163 */ "having_opt ::=",
- /* 164 */ "having_opt ::= HAVING expr",
- /* 165 */ "limit_opt ::=",
- /* 166 */ "limit_opt ::= LIMIT expr",
- /* 167 */ "limit_opt ::= LIMIT expr OFFSET expr",
- /* 168 */ "limit_opt ::= LIMIT expr COMMA expr",
- /* 169 */ "cmd ::= with DELETE FROM fullname indexed_opt where_opt",
- /* 170 */ "where_opt ::=",
- /* 171 */ "where_opt ::= WHERE expr",
- /* 172 */ "cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt",
- /* 173 */ "setlist ::= setlist COMMA nm EQ expr",
- /* 174 */ "setlist ::= nm EQ expr",
- /* 175 */ "cmd ::= with insert_cmd INTO fullname inscollist_opt select",
- /* 176 */ "cmd ::= with insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
- /* 177 */ "insert_cmd ::= INSERT orconf",
- /* 178 */ "insert_cmd ::= REPLACE",
- /* 179 */ "inscollist_opt ::=",
- /* 180 */ "inscollist_opt ::= LP idlist RP",
- /* 181 */ "idlist ::= idlist COMMA nm",
- /* 182 */ "idlist ::= nm",
- /* 183 */ "expr ::= term",
- /* 184 */ "expr ::= LP expr RP",
- /* 185 */ "term ::= NULL",
- /* 186 */ "expr ::= ID|INDEXED",
- /* 187 */ "expr ::= JOIN_KW",
- /* 188 */ "expr ::= nm DOT nm",
- /* 189 */ "expr ::= nm DOT nm DOT nm",
- /* 190 */ "term ::= INTEGER|FLOAT|BLOB",
- /* 191 */ "term ::= STRING",
- /* 192 */ "expr ::= VARIABLE",
- /* 193 */ "expr ::= expr COLLATE ID|STRING",
- /* 194 */ "expr ::= CAST LP expr AS typetoken RP",
- /* 195 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
- /* 196 */ "expr ::= ID|INDEXED LP STAR RP",
- /* 197 */ "term ::= CTIME_KW",
- /* 198 */ "expr ::= expr AND expr",
- /* 199 */ "expr ::= expr OR expr",
- /* 200 */ "expr ::= expr LT|GT|GE|LE expr",
- /* 201 */ "expr ::= expr EQ|NE expr",
- /* 202 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
- /* 203 */ "expr ::= expr PLUS|MINUS expr",
- /* 204 */ "expr ::= expr STAR|SLASH|REM expr",
- /* 205 */ "expr ::= expr CONCAT expr",
- /* 206 */ "likeop ::= LIKE_KW|MATCH",
- /* 207 */ "likeop ::= NOT LIKE_KW|MATCH",
- /* 208 */ "expr ::= expr likeop expr",
- /* 209 */ "expr ::= expr likeop expr ESCAPE expr",
- /* 210 */ "expr ::= expr ISNULL|NOTNULL",
- /* 211 */ "expr ::= expr NOT NULL",
- /* 212 */ "expr ::= expr IS expr",
- /* 213 */ "expr ::= expr IS NOT expr",
- /* 214 */ "expr ::= NOT expr",
- /* 215 */ "expr ::= BITNOT expr",
- /* 216 */ "expr ::= MINUS expr",
- /* 217 */ "expr ::= PLUS expr",
- /* 218 */ "between_op ::= BETWEEN",
- /* 219 */ "between_op ::= NOT BETWEEN",
- /* 220 */ "expr ::= expr between_op expr AND expr",
- /* 221 */ "in_op ::= IN",
- /* 222 */ "in_op ::= NOT IN",
- /* 223 */ "expr ::= expr in_op LP exprlist RP",
- /* 224 */ "expr ::= LP select RP",
- /* 225 */ "expr ::= expr in_op LP select RP",
- /* 226 */ "expr ::= expr in_op nm dbnm",
- /* 227 */ "expr ::= EXISTS LP select RP",
- /* 228 */ "expr ::= CASE case_operand case_exprlist case_else END",
- /* 229 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
- /* 230 */ "case_exprlist ::= WHEN expr THEN expr",
- /* 231 */ "case_else ::= ELSE expr",
- /* 232 */ "case_else ::=",
- /* 233 */ "case_operand ::= expr",
- /* 234 */ "case_operand ::=",
- /* 235 */ "exprlist ::= nexprlist",
- /* 236 */ "exprlist ::=",
- /* 237 */ "nexprlist ::= nexprlist COMMA expr",
- /* 238 */ "nexprlist ::= expr",
- /* 239 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP where_opt",
- /* 240 */ "uniqueflag ::= UNIQUE",
- /* 241 */ "uniqueflag ::=",
- /* 242 */ "idxlist_opt ::=",
- /* 243 */ "idxlist_opt ::= LP idxlist RP",
- /* 244 */ "idxlist ::= idxlist COMMA nm collate sortorder",
- /* 245 */ "idxlist ::= nm collate sortorder",
- /* 246 */ "collate ::=",
- /* 247 */ "collate ::= COLLATE ID|STRING",
- /* 248 */ "cmd ::= DROP INDEX ifexists fullname",
- /* 249 */ "cmd ::= VACUUM",
- /* 250 */ "cmd ::= VACUUM nm",
- /* 251 */ "cmd ::= PRAGMA nm dbnm",
- /* 252 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
- /* 253 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
- /* 254 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
- /* 255 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
- /* 256 */ "nmnum ::= plus_num",
- /* 257 */ "nmnum ::= nm",
- /* 258 */ "nmnum ::= ON",
- /* 259 */ "nmnum ::= DELETE",
- /* 260 */ "nmnum ::= DEFAULT",
- /* 261 */ "plus_num ::= PLUS INTEGER|FLOAT",
- /* 262 */ "plus_num ::= INTEGER|FLOAT",
- /* 263 */ "minus_num ::= MINUS INTEGER|FLOAT",
- /* 264 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
- /* 265 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
- /* 266 */ "trigger_time ::= BEFORE",
- /* 267 */ "trigger_time ::= AFTER",
- /* 268 */ "trigger_time ::= INSTEAD OF",
- /* 269 */ "trigger_time ::=",
- /* 270 */ "trigger_event ::= DELETE|INSERT",
- /* 271 */ "trigger_event ::= UPDATE",
- /* 272 */ "trigger_event ::= UPDATE OF idlist",
- /* 273 */ "foreach_clause ::=",
- /* 274 */ "foreach_clause ::= FOR EACH ROW",
- /* 275 */ "when_clause ::=",
- /* 276 */ "when_clause ::= WHEN expr",
- /* 277 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
- /* 278 */ "trigger_cmd_list ::= trigger_cmd SEMI",
- /* 279 */ "trnm ::= nm",
- /* 280 */ "trnm ::= nm DOT nm",
- /* 281 */ "tridxby ::=",
- /* 282 */ "tridxby ::= INDEXED BY nm",
- /* 283 */ "tridxby ::= NOT INDEXED",
- /* 284 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt",
- /* 285 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select",
- /* 286 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt",
- /* 287 */ "trigger_cmd ::= select",
- /* 288 */ "expr ::= RAISE LP IGNORE RP",
- /* 289 */ "expr ::= RAISE LP raisetype COMMA nm RP",
- /* 290 */ "raisetype ::= ROLLBACK",
- /* 291 */ "raisetype ::= ABORT",
- /* 292 */ "raisetype ::= FAIL",
- /* 293 */ "cmd ::= DROP TRIGGER ifexists fullname",
- /* 294 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
- /* 295 */ "cmd ::= DETACH database_kw_opt expr",
- /* 296 */ "key_opt ::=",
- /* 297 */ "key_opt ::= KEY expr",
- /* 298 */ "database_kw_opt ::= DATABASE",
- /* 299 */ "database_kw_opt ::=",
- /* 300 */ "cmd ::= REINDEX",
- /* 301 */ "cmd ::= REINDEX nm dbnm",
- /* 302 */ "cmd ::= ANALYZE",
- /* 303 */ "cmd ::= ANALYZE nm dbnm",
- /* 304 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
- /* 305 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
- /* 306 */ "add_column_fullname ::= fullname",
- /* 307 */ "kwcolumn_opt ::=",
- /* 308 */ "kwcolumn_opt ::= COLUMNKW",
- /* 309 */ "cmd ::= create_vtab",
- /* 310 */ "cmd ::= create_vtab LP vtabarglist RP",
- /* 311 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
- /* 312 */ "vtabarglist ::= vtabarg",
- /* 313 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
- /* 314 */ "vtabarg ::=",
- /* 315 */ "vtabarg ::= vtabarg vtabargtoken",
- /* 316 */ "vtabargtoken ::= ANY",
- /* 317 */ "vtabargtoken ::= lp anylist RP",
- /* 318 */ "lp ::= LP",
- /* 319 */ "anylist ::=",
- /* 320 */ "anylist ::= anylist LP anylist RP",
- /* 321 */ "anylist ::= anylist ANY",
- /* 322 */ "with ::=",
- /* 323 */ "with ::= WITH wqlist",
- /* 324 */ "with ::= WITH RECURSIVE wqlist",
- /* 325 */ "wqlist ::= nm idxlist_opt AS LP select RP",
- /* 326 */ "wqlist ::= wqlist COMMA nm idxlist_opt AS LP select RP",
+ /* 138 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
+ /* 139 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
+ /* 140 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
+ /* 141 */ "dbnm ::=",
+ /* 142 */ "dbnm ::= DOT nm",
+ /* 143 */ "fullname ::= nm dbnm",
+ /* 144 */ "joinop ::= COMMA|JOIN",
+ /* 145 */ "joinop ::= JOIN_KW JOIN",
+ /* 146 */ "joinop ::= JOIN_KW nm JOIN",
+ /* 147 */ "joinop ::= JOIN_KW nm nm JOIN",
+ /* 148 */ "on_opt ::= ON expr",
+ /* 149 */ "on_opt ::=",
+ /* 150 */ "indexed_opt ::=",
+ /* 151 */ "indexed_opt ::= INDEXED BY nm",
+ /* 152 */ "indexed_opt ::= NOT INDEXED",
+ /* 153 */ "using_opt ::= USING LP idlist RP",
+ /* 154 */ "using_opt ::=",
+ /* 155 */ "orderby_opt ::=",
+ /* 156 */ "orderby_opt ::= ORDER BY sortlist",
+ /* 157 */ "sortlist ::= sortlist COMMA expr sortorder",
+ /* 158 */ "sortlist ::= expr sortorder",
+ /* 159 */ "sortorder ::= ASC",
+ /* 160 */ "sortorder ::= DESC",
+ /* 161 */ "sortorder ::=",
+ /* 162 */ "groupby_opt ::=",
+ /* 163 */ "groupby_opt ::= GROUP BY nexprlist",
+ /* 164 */ "having_opt ::=",
+ /* 165 */ "having_opt ::= HAVING expr",
+ /* 166 */ "limit_opt ::=",
+ /* 167 */ "limit_opt ::= LIMIT expr",
+ /* 168 */ "limit_opt ::= LIMIT expr OFFSET expr",
+ /* 169 */ "limit_opt ::= LIMIT expr COMMA expr",
+ /* 170 */ "cmd ::= with DELETE FROM fullname indexed_opt where_opt",
+ /* 171 */ "where_opt ::=",
+ /* 172 */ "where_opt ::= WHERE expr",
+ /* 173 */ "cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt",
+ /* 174 */ "setlist ::= setlist COMMA nm EQ expr",
+ /* 175 */ "setlist ::= nm EQ expr",
+ /* 176 */ "cmd ::= with insert_cmd INTO fullname idlist_opt select",
+ /* 177 */ "cmd ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES",
+ /* 178 */ "insert_cmd ::= INSERT orconf",
+ /* 179 */ "insert_cmd ::= REPLACE",
+ /* 180 */ "idlist_opt ::=",
+ /* 181 */ "idlist_opt ::= LP idlist RP",
+ /* 182 */ "idlist ::= idlist COMMA nm",
+ /* 183 */ "idlist ::= nm",
+ /* 184 */ "expr ::= term",
+ /* 185 */ "expr ::= LP expr RP",
+ /* 186 */ "term ::= NULL",
+ /* 187 */ "expr ::= ID|INDEXED",
+ /* 188 */ "expr ::= JOIN_KW",
+ /* 189 */ "expr ::= nm DOT nm",
+ /* 190 */ "expr ::= nm DOT nm DOT nm",
+ /* 191 */ "term ::= INTEGER|FLOAT|BLOB",
+ /* 192 */ "term ::= STRING",
+ /* 193 */ "expr ::= VARIABLE",
+ /* 194 */ "expr ::= expr COLLATE ID|STRING",
+ /* 195 */ "expr ::= CAST LP expr AS typetoken RP",
+ /* 196 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
+ /* 197 */ "expr ::= ID|INDEXED LP STAR RP",
+ /* 198 */ "term ::= CTIME_KW",
+ /* 199 */ "expr ::= expr AND expr",
+ /* 200 */ "expr ::= expr OR expr",
+ /* 201 */ "expr ::= expr LT|GT|GE|LE expr",
+ /* 202 */ "expr ::= expr EQ|NE expr",
+ /* 203 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
+ /* 204 */ "expr ::= expr PLUS|MINUS expr",
+ /* 205 */ "expr ::= expr STAR|SLASH|REM expr",
+ /* 206 */ "expr ::= expr CONCAT expr",
+ /* 207 */ "likeop ::= LIKE_KW|MATCH",
+ /* 208 */ "likeop ::= NOT LIKE_KW|MATCH",
+ /* 209 */ "expr ::= expr likeop expr",
+ /* 210 */ "expr ::= expr likeop expr ESCAPE expr",
+ /* 211 */ "expr ::= expr ISNULL|NOTNULL",
+ /* 212 */ "expr ::= expr NOT NULL",
+ /* 213 */ "expr ::= expr IS expr",
+ /* 214 */ "expr ::= expr IS NOT expr",
+ /* 215 */ "expr ::= NOT expr",
+ /* 216 */ "expr ::= BITNOT expr",
+ /* 217 */ "expr ::= MINUS expr",
+ /* 218 */ "expr ::= PLUS expr",
+ /* 219 */ "between_op ::= BETWEEN",
+ /* 220 */ "between_op ::= NOT BETWEEN",
+ /* 221 */ "expr ::= expr between_op expr AND expr",
+ /* 222 */ "in_op ::= IN",
+ /* 223 */ "in_op ::= NOT IN",
+ /* 224 */ "expr ::= expr in_op LP exprlist RP",
+ /* 225 */ "expr ::= LP select RP",
+ /* 226 */ "expr ::= expr in_op LP select RP",
+ /* 227 */ "expr ::= expr in_op nm dbnm",
+ /* 228 */ "expr ::= EXISTS LP select RP",
+ /* 229 */ "expr ::= CASE case_operand case_exprlist case_else END",
+ /* 230 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
+ /* 231 */ "case_exprlist ::= WHEN expr THEN expr",
+ /* 232 */ "case_else ::= ELSE expr",
+ /* 233 */ "case_else ::=",
+ /* 234 */ "case_operand ::= expr",
+ /* 235 */ "case_operand ::=",
+ /* 236 */ "exprlist ::= nexprlist",
+ /* 237 */ "exprlist ::=",
+ /* 238 */ "nexprlist ::= nexprlist COMMA expr",
+ /* 239 */ "nexprlist ::= expr",
+ /* 240 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
+ /* 241 */ "uniqueflag ::= UNIQUE",
+ /* 242 */ "uniqueflag ::=",
+ /* 243 */ "eidlist_opt ::=",
+ /* 244 */ "eidlist_opt ::= LP eidlist RP",
+ /* 245 */ "eidlist ::= eidlist COMMA nm collate sortorder",
+ /* 246 */ "eidlist ::= nm collate sortorder",
+ /* 247 */ "collate ::=",
+ /* 248 */ "collate ::= COLLATE ID|STRING",
+ /* 249 */ "cmd ::= DROP INDEX ifexists fullname",
+ /* 250 */ "cmd ::= VACUUM",
+ /* 251 */ "cmd ::= VACUUM nm",
+ /* 252 */ "cmd ::= PRAGMA nm dbnm",
+ /* 253 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
+ /* 254 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
+ /* 255 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
+ /* 256 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
+ /* 257 */ "nmnum ::= plus_num",
+ /* 258 */ "nmnum ::= nm",
+ /* 259 */ "nmnum ::= ON",
+ /* 260 */ "nmnum ::= DELETE",
+ /* 261 */ "nmnum ::= DEFAULT",
+ /* 262 */ "plus_num ::= PLUS INTEGER|FLOAT",
+ /* 263 */ "plus_num ::= INTEGER|FLOAT",
+ /* 264 */ "minus_num ::= MINUS INTEGER|FLOAT",
+ /* 265 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
+ /* 266 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
+ /* 267 */ "trigger_time ::= BEFORE",
+ /* 268 */ "trigger_time ::= AFTER",
+ /* 269 */ "trigger_time ::= INSTEAD OF",
+ /* 270 */ "trigger_time ::=",
+ /* 271 */ "trigger_event ::= DELETE|INSERT",
+ /* 272 */ "trigger_event ::= UPDATE",
+ /* 273 */ "trigger_event ::= UPDATE OF idlist",
+ /* 274 */ "foreach_clause ::=",
+ /* 275 */ "foreach_clause ::= FOR EACH ROW",
+ /* 276 */ "when_clause ::=",
+ /* 277 */ "when_clause ::= WHEN expr",
+ /* 278 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
+ /* 279 */ "trigger_cmd_list ::= trigger_cmd SEMI",
+ /* 280 */ "trnm ::= nm",
+ /* 281 */ "trnm ::= nm DOT nm",
+ /* 282 */ "tridxby ::=",
+ /* 283 */ "tridxby ::= INDEXED BY nm",
+ /* 284 */ "tridxby ::= NOT INDEXED",
+ /* 285 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt",
+ /* 286 */ "trigger_cmd ::= insert_cmd INTO trnm idlist_opt select",
+ /* 287 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt",
+ /* 288 */ "trigger_cmd ::= select",
+ /* 289 */ "expr ::= RAISE LP IGNORE RP",
+ /* 290 */ "expr ::= RAISE LP raisetype COMMA nm RP",
+ /* 291 */ "raisetype ::= ROLLBACK",
+ /* 292 */ "raisetype ::= ABORT",
+ /* 293 */ "raisetype ::= FAIL",
+ /* 294 */ "cmd ::= DROP TRIGGER ifexists fullname",
+ /* 295 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
+ /* 296 */ "cmd ::= DETACH database_kw_opt expr",
+ /* 297 */ "key_opt ::=",
+ /* 298 */ "key_opt ::= KEY expr",
+ /* 299 */ "database_kw_opt ::= DATABASE",
+ /* 300 */ "database_kw_opt ::=",
+ /* 301 */ "cmd ::= REINDEX",
+ /* 302 */ "cmd ::= REINDEX nm dbnm",
+ /* 303 */ "cmd ::= ANALYZE",
+ /* 304 */ "cmd ::= ANALYZE nm dbnm",
+ /* 305 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
+ /* 306 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
+ /* 307 */ "add_column_fullname ::= fullname",
+ /* 308 */ "kwcolumn_opt ::=",
+ /* 309 */ "kwcolumn_opt ::= COLUMNKW",
+ /* 310 */ "cmd ::= create_vtab",
+ /* 311 */ "cmd ::= create_vtab LP vtabarglist RP",
+ /* 312 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
+ /* 313 */ "vtabarglist ::= vtabarg",
+ /* 314 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
+ /* 315 */ "vtabarg ::=",
+ /* 316 */ "vtabarg ::= vtabarg vtabargtoken",
+ /* 317 */ "vtabargtoken ::= ANY",
+ /* 318 */ "vtabargtoken ::= lp anylist RP",
+ /* 319 */ "lp ::= LP",
+ /* 320 */ "anylist ::=",
+ /* 321 */ "anylist ::= anylist LP anylist RP",
+ /* 322 */ "anylist ::= anylist ANY",
+ /* 323 */ "with ::=",
+ /* 324 */ "with ::= WITH wqlist",
+ /* 325 */ "with ::= WITH RECURSIVE wqlist",
+ /* 326 */ "wqlist ::= nm eidlist_opt AS LP select RP",
+ /* 327 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
};
#endif /* NDEBUG */
@@ -124631,9 +127412,9 @@ static void yy_destructor(
** inside the C code.
*/
case 163: /* select */
- case 195: /* selectnowith */
- case 196: /* oneselect */
- case 207: /* values */
+ case 196: /* selectnowith */
+ case 197: /* oneselect */
+ case 208: /* values */
{
sqlite3SelectDelete(pParse->db, (yypminor->yy3));
}
@@ -124644,38 +127425,38 @@ sqlite3SelectDelete(pParse->db, (yypminor->yy3));
sqlite3ExprDelete(pParse->db, (yypminor->yy346).pExpr);
}
break;
- case 179: /* idxlist_opt */
- case 188: /* idxlist */
- case 200: /* selcollist */
- case 203: /* groupby_opt */
- case 205: /* orderby_opt */
- case 208: /* nexprlist */
- case 209: /* exprlist */
- case 210: /* sclp */
- case 220: /* sortlist */
+ case 179: /* eidlist_opt */
+ case 188: /* sortlist */
+ case 189: /* eidlist */
+ case 201: /* selcollist */
+ case 204: /* groupby_opt */
+ case 206: /* orderby_opt */
+ case 209: /* nexprlist */
+ case 210: /* exprlist */
+ case 211: /* sclp */
case 221: /* setlist */
case 228: /* case_exprlist */
{
sqlite3ExprListDelete(pParse->db, (yypminor->yy14));
}
break;
- case 194: /* fullname */
- case 201: /* from */
- case 212: /* seltablist */
- case 213: /* stl_prefix */
+ case 195: /* fullname */
+ case 202: /* from */
+ case 213: /* seltablist */
+ case 214: /* stl_prefix */
{
sqlite3SrcListDelete(pParse->db, (yypminor->yy65));
}
break;
- case 197: /* with */
+ case 198: /* with */
case 252: /* wqlist */
{
sqlite3WithDelete(pParse->db, (yypminor->yy59));
}
break;
- case 202: /* where_opt */
- case 204: /* having_opt */
- case 216: /* on_opt */
+ case 203: /* where_opt */
+ case 205: /* having_opt */
+ case 217: /* on_opt */
case 227: /* case_operand */
case 229: /* case_else */
case 238: /* when_clause */
@@ -124684,9 +127465,9 @@ sqlite3WithDelete(pParse->db, (yypminor->yy59));
sqlite3ExprDelete(pParse->db, (yypminor->yy132));
}
break;
- case 217: /* using_opt */
- case 219: /* idlist */
- case 223: /* inscollist_opt */
+ case 218: /* using_opt */
+ case 220: /* idlist */
+ case 223: /* idlist_opt */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy408));
}
@@ -124720,7 +127501,7 @@ static int yy_pop_parser_stack(yyParser *pParser){
/* There is no mechanism by which the parser stack can be popped below
** empty in SQLite. */
- if( NEVER(pParser->yyidx<0) ) return 0;
+ assert( pParser->yyidx>=0 );
#ifndef NDEBUG
if( yyTraceFILE && pParser->yyidx>=0 ){
fprintf(yyTraceFILE,"%sPopping %s\n",
@@ -124786,10 +127567,10 @@ static int yy_find_shift_action(
int i;
int stateno = pParser->yystack[pParser->yyidx].stateno;
- if( stateno>YY_SHIFT_COUNT
- || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
- return yy_default[stateno];
- }
+ if( stateno>=YY_MIN_REDUCE ) return stateno;
+ assert( stateno <= YY_SHIFT_COUNT );
+ i = yy_shift_ofst[stateno];
+ if( i==YY_SHIFT_USE_DFLT ) return yy_default[stateno];
assert( iLookAhead!=YYNOCODE );
i += iLookAhead;
if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
@@ -124892,7 +127673,29 @@ static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
}
/*
-** Perform a shift action.
+** Print tracing information for a SHIFT action
+*/
+#ifndef NDEBUG
+static void yyTraceShift(yyParser *yypParser, int yyNewState){
+ if( yyTraceFILE ){
+ int i;
+ if( yyNewState<YYNSTATE ){
+ fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
+ fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
+ for(i=1; i<=yypParser->yyidx; i++)
+ fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
+ fprintf(yyTraceFILE,"\n");
+ }else{
+ fprintf(yyTraceFILE,"%sShift *\n",yyTracePrompt);
+ }
+ }
+}
+#else
+# define yyTraceShift(X,Y)
+#endif
+
+/*
+** Perform a shift action. Return the number of errors.
*/
static void yy_shift(
yyParser *yypParser, /* The parser to be shifted */
@@ -124925,16 +127728,7 @@ static void yy_shift(
yytos->stateno = (YYACTIONTYPE)yyNewState;
yytos->major = (YYCODETYPE)yyMajor;
yytos->minor = *yypMinor;
-#ifndef NDEBUG
- if( yyTraceFILE && yypParser->yyidx>0 ){
- int i;
- fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
- fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
- for(i=1; i<=yypParser->yyidx; i++)
- fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
- fprintf(yyTraceFILE,"\n");
- }
-#endif
+ yyTraceShift(yypParser, yyNewState);
}
/* The following table contains information about every rule that
@@ -125041,81 +127835,82 @@ static const struct {
{ 187, 5 },
{ 187, 5 },
{ 187, 10 },
- { 189, 0 },
- { 189, 1 },
+ { 190, 0 },
+ { 190, 1 },
{ 176, 0 },
{ 176, 3 },
- { 190, 0 },
- { 190, 2 },
- { 191, 1 },
- { 191, 1 },
- { 191, 1 },
+ { 191, 0 },
+ { 191, 2 },
+ { 192, 1 },
+ { 192, 1 },
+ { 192, 1 },
{ 149, 4 },
- { 193, 2 },
- { 193, 0 },
- { 149, 8 },
+ { 194, 2 },
+ { 194, 0 },
+ { 149, 9 },
{ 149, 4 },
{ 149, 1 },
{ 163, 2 },
- { 195, 1 },
- { 195, 3 },
- { 198, 1 },
- { 198, 2 },
- { 198, 1 },
- { 196, 9 },
{ 196, 1 },
- { 207, 4 },
- { 207, 5 },
+ { 196, 3 },
{ 199, 1 },
+ { 199, 2 },
{ 199, 1 },
- { 199, 0 },
- { 210, 2 },
- { 210, 0 },
- { 200, 3 },
- { 200, 2 },
- { 200, 4 },
+ { 197, 9 },
+ { 197, 1 },
+ { 208, 4 },
+ { 208, 5 },
+ { 200, 1 },
+ { 200, 1 },
+ { 200, 0 },
{ 211, 2 },
- { 211, 1 },
{ 211, 0 },
- { 201, 0 },
+ { 201, 3 },
{ 201, 2 },
- { 213, 2 },
- { 213, 0 },
- { 212, 7 },
- { 212, 7 },
- { 212, 7 },
+ { 201, 4 },
+ { 212, 2 },
+ { 212, 1 },
+ { 212, 0 },
+ { 202, 0 },
+ { 202, 2 },
+ { 214, 2 },
+ { 214, 0 },
+ { 213, 7 },
+ { 213, 9 },
+ { 213, 7 },
+ { 213, 7 },
{ 159, 0 },
{ 159, 2 },
- { 194, 2 },
- { 214, 1 },
- { 214, 2 },
- { 214, 3 },
- { 214, 4 },
- { 216, 2 },
- { 216, 0 },
- { 215, 0 },
- { 215, 3 },
+ { 195, 2 },
+ { 215, 1 },
{ 215, 2 },
- { 217, 4 },
+ { 215, 3 },
+ { 215, 4 },
+ { 217, 2 },
{ 217, 0 },
- { 205, 0 },
- { 205, 3 },
- { 220, 4 },
- { 220, 2 },
+ { 216, 0 },
+ { 216, 3 },
+ { 216, 2 },
+ { 218, 4 },
+ { 218, 0 },
+ { 206, 0 },
+ { 206, 3 },
+ { 188, 4 },
+ { 188, 2 },
{ 177, 1 },
{ 177, 1 },
{ 177, 0 },
- { 203, 0 },
- { 203, 3 },
{ 204, 0 },
- { 204, 2 },
- { 206, 0 },
- { 206, 2 },
- { 206, 4 },
- { 206, 4 },
+ { 204, 3 },
+ { 205, 0 },
+ { 205, 2 },
+ { 207, 0 },
+ { 207, 2 },
+ { 207, 4 },
+ { 207, 4 },
{ 149, 6 },
- { 202, 0 },
- { 202, 2 },
+ { 203, 0 },
+ { 203, 2 },
{ 149, 8 },
{ 221, 5 },
{ 221, 3 },
@@ -125125,8 +127920,8 @@ static const struct {
{ 222, 1 },
{ 223, 0 },
{ 223, 3 },
- { 219, 3 },
- { 219, 1 },
+ { 220, 3 },
+ { 220, 1 },
{ 175, 1 },
{ 175, 3 },
{ 174, 1 },
@@ -125179,17 +127974,17 @@ static const struct {
{ 229, 0 },
{ 227, 1 },
{ 227, 0 },
+ { 210, 1 },
+ { 210, 0 },
+ { 209, 3 },
{ 209, 1 },
- { 209, 0 },
- { 208, 3 },
- { 208, 1 },
{ 149, 12 },
{ 230, 1 },
{ 230, 0 },
{ 179, 0 },
{ 179, 3 },
- { 188, 5 },
- { 188, 3 },
+ { 189, 5 },
+ { 189, 3 },
{ 231, 0 },
{ 231, 2 },
{ 149, 4 },
@@ -125234,9 +128029,9 @@ static const struct {
{ 239, 1 },
{ 175, 4 },
{ 175, 6 },
- { 192, 1 },
- { 192, 1 },
- { 192, 1 },
+ { 193, 1 },
+ { 193, 1 },
+ { 193, 1 },
{ 149, 4 },
{ 149, 6 },
{ 149, 3 },
@@ -125266,9 +128061,9 @@ static const struct {
{ 251, 0 },
{ 251, 4 },
{ 251, 2 },
- { 197, 0 },
- { 197, 2 },
- { 197, 3 },
+ { 198, 0 },
+ { 198, 2 },
+ { 198, 3 },
{ 252, 6 },
{ 252, 8 },
};
@@ -125293,8 +128088,9 @@ static void yy_reduce(
#ifndef NDEBUG
if( yyTraceFILE && yyruleno>=0
&& yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
- fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
- yyRuleName[yyruleno]);
+ yysize = yyRuleInfo[yyruleno].nrhs;
+ fprintf(yyTraceFILE, "%sReduce [%s] -> state %d.\n", yyTracePrompt,
+ yyRuleName[yyruleno], yymsp[-yysize].stateno);
}
#endif /* NDEBUG */
@@ -125391,8 +128187,9 @@ static void yy_reduce(
case 85: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==85);
case 97: /* defer_subclause_opt ::= */ yytestcase(yyruleno==97);
case 108: /* ifexists ::= */ yytestcase(yyruleno==108);
- case 218: /* between_op ::= BETWEEN */ yytestcase(yyruleno==218);
- case 221: /* in_op ::= IN */ yytestcase(yyruleno==221);
+ case 219: /* between_op ::= BETWEEN */ yytestcase(yyruleno==219);
+ case 222: /* in_op ::= IN */ yytestcase(yyruleno==222);
+ case 247: /* collate ::= */ yytestcase(yyruleno==247);
{yygotominor.yy328 = 0;}
break;
case 29: /* ifnotexists ::= IF NOT EXISTS */
@@ -125400,8 +128197,9 @@ static void yy_reduce(
case 69: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==69);
case 84: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==84);
case 107: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==107);
- case 219: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==219);
- case 222: /* in_op ::= NOT IN */ yytestcase(yyruleno==222);
+ case 220: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==220);
+ case 223: /* in_op ::= NOT IN */ yytestcase(yyruleno==223);
+ case 248: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==248);
{yygotominor.yy328 = 1;}
break;
case 32: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
@@ -125421,7 +128219,7 @@ static void yy_reduce(
case 35: /* table_options ::= WITHOUT nm */
{
if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
- yygotominor.yy186 = TF_WithoutRowid;
+ yygotominor.yy186 = TF_WithoutRowid | TF_NoVisibleRowid;
}else{
yygotominor.yy186 = 0;
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
@@ -125448,18 +128246,17 @@ static void yy_reduce(
case 48: /* typename ::= ID|STRING */ yytestcase(yyruleno==48);
case 130: /* as ::= AS nm */ yytestcase(yyruleno==130);
case 131: /* as ::= ID|STRING */ yytestcase(yyruleno==131);
- case 141: /* dbnm ::= DOT nm */ yytestcase(yyruleno==141);
- case 150: /* indexed_opt ::= INDEXED BY nm */ yytestcase(yyruleno==150);
- case 247: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==247);
- case 256: /* nmnum ::= plus_num */ yytestcase(yyruleno==256);
- case 257: /* nmnum ::= nm */ yytestcase(yyruleno==257);
- case 258: /* nmnum ::= ON */ yytestcase(yyruleno==258);
- case 259: /* nmnum ::= DELETE */ yytestcase(yyruleno==259);
- case 260: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==260);
- case 261: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==261);
- case 262: /* plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==262);
- case 263: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==263);
- case 279: /* trnm ::= nm */ yytestcase(yyruleno==279);
+ case 142: /* dbnm ::= DOT nm */ yytestcase(yyruleno==142);
+ case 151: /* indexed_opt ::= INDEXED BY nm */ yytestcase(yyruleno==151);
+ case 257: /* nmnum ::= plus_num */ yytestcase(yyruleno==257);
+ case 258: /* nmnum ::= nm */ yytestcase(yyruleno==258);
+ case 259: /* nmnum ::= ON */ yytestcase(yyruleno==259);
+ case 260: /* nmnum ::= DELETE */ yytestcase(yyruleno==260);
+ case 261: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==261);
+ case 262: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==262);
+ case 263: /* plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==263);
+ case 264: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==264);
+ case 280: /* trnm ::= nm */ yytestcase(yyruleno==280);
{yygotominor.yy0 = yymsp[0].minor.yy0;}
break;
case 44: /* type ::= typetoken */
@@ -125519,7 +128316,7 @@ static void yy_reduce(
case 64: /* ccons ::= CHECK LP expr RP */
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy346.pExpr);}
break;
- case 65: /* ccons ::= REFERENCES nm idxlist_opt refargs */
+ case 65: /* ccons ::= REFERENCES nm eidlist_opt refargs */
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy14,yymsp[0].minor.yy328);}
break;
case 66: /* ccons ::= defer_subclause */
@@ -125574,16 +128371,16 @@ static void yy_reduce(
case 90: /* tconscomma ::= COMMA */
{pParse->constraintName.n = 0;}
break;
- case 93: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
+ case 93: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy14,yymsp[0].minor.yy328,yymsp[-2].minor.yy328,0);}
break;
- case 94: /* tcons ::= UNIQUE LP idxlist RP onconf */
+ case 94: /* tcons ::= UNIQUE LP sortlist RP onconf */
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy14,yymsp[0].minor.yy328,0,0,0,0);}
break;
case 95: /* tcons ::= CHECK LP expr RP onconf */
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy346.pExpr);}
break;
- case 96: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
+ case 96: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
{
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy328);
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy328);
@@ -125609,9 +128406,9 @@ static void yy_reduce(
sqlite3DropTable(pParse, yymsp[0].minor.yy65, 0, yymsp[-1].minor.yy328);
}
break;
- case 109: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
+ case 109: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
{
- sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy3, yymsp[-6].minor.yy328, yymsp[-4].minor.yy328);
+ sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[0].minor.yy3, yymsp[-7].minor.yy328, yymsp[-5].minor.yy328);
}
break;
case 110: /* cmd ::= DROP VIEW ifexists fullname */
@@ -125645,6 +128442,7 @@ static void yy_reduce(
case 114: /* selectnowith ::= selectnowith multiselect_op oneselect */
{
Select *pRhs = yymsp[0].minor.yy3;
+ Select *pLhs = yymsp[-2].minor.yy3;
if( pRhs && pRhs->pPrior ){
SrcList *pFrom;
Token x;
@@ -125655,11 +128453,12 @@ static void yy_reduce(
}
if( pRhs ){
pRhs->op = (u8)yymsp[-1].minor.yy328;
- pRhs->pPrior = yymsp[-2].minor.yy3;
+ pRhs->pPrior = pLhs;
+ if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
pRhs->selFlags &= ~SF_MultiValue;
if( yymsp[-1].minor.yy328!=TK_ALL ) pParse->hasCompound = 1;
}else{
- sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy3);
+ sqlite3SelectDelete(pParse->db, pLhs);
}
yygotominor.yy3 = pRhs;
}
@@ -125720,18 +128519,20 @@ static void yy_reduce(
{yygotominor.yy381 = SF_Distinct;}
break;
case 123: /* distinct ::= ALL */
- case 124: /* distinct ::= */ yytestcase(yyruleno==124);
+{yygotominor.yy381 = SF_All;}
+ break;
+ case 124: /* distinct ::= */
{yygotominor.yy381 = 0;}
break;
case 125: /* sclp ::= selcollist COMMA */
- case 243: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==243);
+ case 244: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==244);
{yygotominor.yy14 = yymsp[-1].minor.yy14;}
break;
case 126: /* sclp ::= */
- case 154: /* orderby_opt ::= */ yytestcase(yyruleno==154);
- case 161: /* groupby_opt ::= */ yytestcase(yyruleno==161);
- case 236: /* exprlist ::= */ yytestcase(yyruleno==236);
- case 242: /* idxlist_opt ::= */ yytestcase(yyruleno==242);
+ case 155: /* orderby_opt ::= */ yytestcase(yyruleno==155);
+ case 162: /* groupby_opt ::= */ yytestcase(yyruleno==162);
+ case 237: /* exprlist ::= */ yytestcase(yyruleno==237);
+ case 243: /* eidlist_opt ::= */ yytestcase(yyruleno==243);
{yygotominor.yy14 = 0;}
break;
case 127: /* selcollist ::= sclp expr as */
@@ -125770,7 +128571,7 @@ static void yy_reduce(
case 135: /* stl_prefix ::= seltablist joinop */
{
yygotominor.yy65 = yymsp[-1].minor.yy65;
- if( ALWAYS(yygotominor.yy65 && yygotominor.yy65->nSrc>0) ) yygotominor.yy65->a[yygotominor.yy65->nSrc-1].jointype = (u8)yymsp[0].minor.yy328;
+ if( ALWAYS(yygotominor.yy65 && yygotominor.yy65->nSrc>0) ) yygotominor.yy65->a[yygotominor.yy65->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy328;
}
break;
case 136: /* stl_prefix ::= */
@@ -125782,12 +128583,18 @@ static void yy_reduce(
sqlite3SrcListIndexedBy(pParse, yygotominor.yy65, &yymsp[-2].minor.yy0);
}
break;
- case 138: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
+ case 138: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
+{
+ yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy65,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy132,yymsp[0].minor.yy408);
+ sqlite3SrcListFuncArgs(pParse, yygotominor.yy65, yymsp[-4].minor.yy14);
+}
+ break;
+ case 139: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
{
yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy65,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy3,yymsp[-1].minor.yy132,yymsp[0].minor.yy408);
}
break;
- case 139: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
+ case 140: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
{
if( yymsp[-6].minor.yy65==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy132==0 && yymsp[0].minor.yy408==0 ){
yygotominor.yy65 = yymsp[-4].minor.yy65;
@@ -125811,94 +128618,96 @@ static void yy_reduce(
}
}
break;
- case 140: /* dbnm ::= */
- case 149: /* indexed_opt ::= */ yytestcase(yyruleno==149);
+ case 141: /* dbnm ::= */
+ case 150: /* indexed_opt ::= */ yytestcase(yyruleno==150);
{yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
break;
- case 142: /* fullname ::= nm dbnm */
+ case 143: /* fullname ::= nm dbnm */
{yygotominor.yy65 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
break;
- case 143: /* joinop ::= COMMA|JOIN */
+ case 144: /* joinop ::= COMMA|JOIN */
{ yygotominor.yy328 = JT_INNER; }
break;
- case 144: /* joinop ::= JOIN_KW JOIN */
+ case 145: /* joinop ::= JOIN_KW JOIN */
{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
break;
- case 145: /* joinop ::= JOIN_KW nm JOIN */
+ case 146: /* joinop ::= JOIN_KW nm JOIN */
{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
break;
- case 146: /* joinop ::= JOIN_KW nm nm JOIN */
+ case 147: /* joinop ::= JOIN_KW nm nm JOIN */
{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
break;
- case 147: /* on_opt ::= ON expr */
- case 164: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==164);
- case 171: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==171);
- case 231: /* case_else ::= ELSE expr */ yytestcase(yyruleno==231);
- case 233: /* case_operand ::= expr */ yytestcase(yyruleno==233);
+ case 148: /* on_opt ::= ON expr */
+ case 165: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==165);
+ case 172: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==172);
+ case 232: /* case_else ::= ELSE expr */ yytestcase(yyruleno==232);
+ case 234: /* case_operand ::= expr */ yytestcase(yyruleno==234);
{yygotominor.yy132 = yymsp[0].minor.yy346.pExpr;}
break;
- case 148: /* on_opt ::= */
- case 163: /* having_opt ::= */ yytestcase(yyruleno==163);
- case 170: /* where_opt ::= */ yytestcase(yyruleno==170);
- case 232: /* case_else ::= */ yytestcase(yyruleno==232);
- case 234: /* case_operand ::= */ yytestcase(yyruleno==234);
+ case 149: /* on_opt ::= */
+ case 164: /* having_opt ::= */ yytestcase(yyruleno==164);
+ case 171: /* where_opt ::= */ yytestcase(yyruleno==171);
+ case 233: /* case_else ::= */ yytestcase(yyruleno==233);
+ case 235: /* case_operand ::= */ yytestcase(yyruleno==235);
{yygotominor.yy132 = 0;}
break;
- case 151: /* indexed_opt ::= NOT INDEXED */
+ case 152: /* indexed_opt ::= NOT INDEXED */
{yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
break;
- case 152: /* using_opt ::= USING LP idlist RP */
- case 180: /* inscollist_opt ::= LP idlist RP */ yytestcase(yyruleno==180);
+ case 153: /* using_opt ::= USING LP idlist RP */
+ case 181: /* idlist_opt ::= LP idlist RP */ yytestcase(yyruleno==181);
{yygotominor.yy408 = yymsp[-1].minor.yy408;}
break;
- case 153: /* using_opt ::= */
- case 179: /* inscollist_opt ::= */ yytestcase(yyruleno==179);
+ case 154: /* using_opt ::= */
+ case 180: /* idlist_opt ::= */ yytestcase(yyruleno==180);
{yygotominor.yy408 = 0;}
break;
- case 155: /* orderby_opt ::= ORDER BY sortlist */
- case 162: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==162);
- case 235: /* exprlist ::= nexprlist */ yytestcase(yyruleno==235);
+ case 156: /* orderby_opt ::= ORDER BY sortlist */
+ case 163: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==163);
+ case 236: /* exprlist ::= nexprlist */ yytestcase(yyruleno==236);
{yygotominor.yy14 = yymsp[0].minor.yy14;}
break;
- case 156: /* sortlist ::= sortlist COMMA expr sortorder */
+ case 157: /* sortlist ::= sortlist COMMA expr sortorder */
{
yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy14,yymsp[-1].minor.yy346.pExpr);
- if( yygotominor.yy14 ) yygotominor.yy14->a[yygotominor.yy14->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy328;
+ sqlite3ExprListSetSortOrder(yygotominor.yy14,yymsp[0].minor.yy328);
}
break;
- case 157: /* sortlist ::= expr sortorder */
+ case 158: /* sortlist ::= expr sortorder */
{
yygotominor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy346.pExpr);
- if( yygotominor.yy14 && ALWAYS(yygotominor.yy14->a) ) yygotominor.yy14->a[0].sortOrder = (u8)yymsp[0].minor.yy328;
+ sqlite3ExprListSetSortOrder(yygotominor.yy14,yymsp[0].minor.yy328);
}
break;
- case 158: /* sortorder ::= ASC */
- case 160: /* sortorder ::= */ yytestcase(yyruleno==160);
+ case 159: /* sortorder ::= ASC */
{yygotominor.yy328 = SQLITE_SO_ASC;}
break;
- case 159: /* sortorder ::= DESC */
+ case 160: /* sortorder ::= DESC */
{yygotominor.yy328 = SQLITE_SO_DESC;}
break;
- case 165: /* limit_opt ::= */
+ case 161: /* sortorder ::= */
+{yygotominor.yy328 = SQLITE_SO_UNDEFINED;}
+ break;
+ case 166: /* limit_opt ::= */
{yygotominor.yy476.pLimit = 0; yygotominor.yy476.pOffset = 0;}
break;
- case 166: /* limit_opt ::= LIMIT expr */
+ case 167: /* limit_opt ::= LIMIT expr */
{yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr; yygotominor.yy476.pOffset = 0;}
break;
- case 167: /* limit_opt ::= LIMIT expr OFFSET expr */
+ case 168: /* limit_opt ::= LIMIT expr OFFSET expr */
{yygotominor.yy476.pLimit = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pOffset = yymsp[0].minor.yy346.pExpr;}
break;
- case 168: /* limit_opt ::= LIMIT expr COMMA expr */
+ case 169: /* limit_opt ::= LIMIT expr COMMA expr */
{yygotominor.yy476.pOffset = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr;}
break;
- case 169: /* cmd ::= with DELETE FROM fullname indexed_opt where_opt */
+ case 170: /* cmd ::= with DELETE FROM fullname indexed_opt where_opt */
{
sqlite3WithPush(pParse, yymsp[-5].minor.yy59, 1);
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy65, &yymsp[-1].minor.yy0);
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy65,yymsp[0].minor.yy132);
}
break;
- case 172: /* cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt */
+ case 173: /* cmd ::= with UPDATE orconf fullname indexed_opt SET setlist where_opt */
{
sqlite3WithPush(pParse, yymsp[-7].minor.yy59, 1);
sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy65, &yymsp[-3].minor.yy0);
@@ -125906,58 +128715,58 @@ static void yy_reduce(
sqlite3Update(pParse,yymsp[-4].minor.yy65,yymsp[-1].minor.yy14,yymsp[0].minor.yy132,yymsp[-5].minor.yy186);
}
break;
- case 173: /* setlist ::= setlist COMMA nm EQ expr */
+ case 174: /* setlist ::= setlist COMMA nm EQ expr */
{
yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy346.pExpr);
sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[-2].minor.yy0, 1);
}
break;
- case 174: /* setlist ::= nm EQ expr */
+ case 175: /* setlist ::= nm EQ expr */
{
yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy346.pExpr);
sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[-2].minor.yy0, 1);
}
break;
- case 175: /* cmd ::= with insert_cmd INTO fullname inscollist_opt select */
+ case 176: /* cmd ::= with insert_cmd INTO fullname idlist_opt select */
{
sqlite3WithPush(pParse, yymsp[-5].minor.yy59, 1);
sqlite3Insert(pParse, yymsp[-2].minor.yy65, yymsp[0].minor.yy3, yymsp[-1].minor.yy408, yymsp[-4].minor.yy186);
}
break;
- case 176: /* cmd ::= with insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
+ case 177: /* cmd ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES */
{
sqlite3WithPush(pParse, yymsp[-6].minor.yy59, 1);
sqlite3Insert(pParse, yymsp[-3].minor.yy65, 0, yymsp[-2].minor.yy408, yymsp[-5].minor.yy186);
}
break;
- case 177: /* insert_cmd ::= INSERT orconf */
+ case 178: /* insert_cmd ::= INSERT orconf */
{yygotominor.yy186 = yymsp[0].minor.yy186;}
break;
- case 178: /* insert_cmd ::= REPLACE */
+ case 179: /* insert_cmd ::= REPLACE */
{yygotominor.yy186 = OE_Replace;}
break;
- case 181: /* idlist ::= idlist COMMA nm */
+ case 182: /* idlist ::= idlist COMMA nm */
{yygotominor.yy408 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy408,&yymsp[0].minor.yy0);}
break;
- case 182: /* idlist ::= nm */
+ case 183: /* idlist ::= nm */
{yygotominor.yy408 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
break;
- case 183: /* expr ::= term */
+ case 184: /* expr ::= term */
{yygotominor.yy346 = yymsp[0].minor.yy346;}
break;
- case 184: /* expr ::= LP expr RP */
+ case 185: /* expr ::= LP expr RP */
{yygotominor.yy346.pExpr = yymsp[-1].minor.yy346.pExpr; spanSet(&yygotominor.yy346,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);}
break;
- case 185: /* term ::= NULL */
- case 190: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==190);
- case 191: /* term ::= STRING */ yytestcase(yyruleno==191);
+ case 186: /* term ::= NULL */
+ case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191);
+ case 192: /* term ::= STRING */ yytestcase(yyruleno==192);
{spanExpr(&yygotominor.yy346, pParse, yymsp[0].major, &yymsp[0].minor.yy0);}
break;
- case 186: /* expr ::= ID|INDEXED */
- case 187: /* expr ::= JOIN_KW */ yytestcase(yyruleno==187);
+ case 187: /* expr ::= ID|INDEXED */
+ case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188);
{spanExpr(&yygotominor.yy346, pParse, TK_ID, &yymsp[0].minor.yy0);}
break;
- case 188: /* expr ::= nm DOT nm */
+ case 189: /* expr ::= nm DOT nm */
{
Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
@@ -125965,7 +128774,7 @@ static void yy_reduce(
spanSet(&yygotominor.yy346,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
}
break;
- case 189: /* expr ::= nm DOT nm DOT nm */
+ case 190: /* expr ::= nm DOT nm DOT nm */
{
Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
@@ -125975,7 +128784,7 @@ static void yy_reduce(
spanSet(&yygotominor.yy346,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
}
break;
- case 192: /* expr ::= VARIABLE */
+ case 193: /* expr ::= VARIABLE */
{
if( yymsp[0].minor.yy0.n>=2 && yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1]) ){
/* When doing a nested parse, one can include terms in an expression
@@ -125995,60 +128804,60 @@ static void yy_reduce(
spanSet(&yygotominor.yy346, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
}
break;
- case 193: /* expr ::= expr COLLATE ID|STRING */
+ case 194: /* expr ::= expr COLLATE ID|STRING */
{
yygotominor.yy346.pExpr = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy346.pExpr, &yymsp[0].minor.yy0, 1);
yygotominor.yy346.zStart = yymsp[-2].minor.yy346.zStart;
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 194: /* expr ::= CAST LP expr AS typetoken RP */
+ case 195: /* expr ::= CAST LP expr AS typetoken RP */
{
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy346.pExpr, 0, &yymsp[-1].minor.yy0);
spanSet(&yygotominor.yy346,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
}
break;
- case 195: /* expr ::= ID|INDEXED LP distinct exprlist RP */
+ case 196: /* expr ::= ID|INDEXED LP distinct exprlist RP */
{
if( yymsp[-1].minor.yy14 && yymsp[-1].minor.yy14->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
}
yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, &yymsp[-4].minor.yy0);
spanSet(&yygotominor.yy346,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
- if( yymsp[-2].minor.yy381 && yygotominor.yy346.pExpr ){
+ if( yymsp[-2].minor.yy381==SF_Distinct && yygotominor.yy346.pExpr ){
yygotominor.yy346.pExpr->flags |= EP_Distinct;
}
}
break;
- case 196: /* expr ::= ID|INDEXED LP STAR RP */
+ case 197: /* expr ::= ID|INDEXED LP STAR RP */
{
yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
spanSet(&yygotominor.yy346,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
}
break;
- case 197: /* term ::= CTIME_KW */
+ case 198: /* term ::= CTIME_KW */
{
yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0);
spanSet(&yygotominor.yy346, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
}
break;
- case 198: /* expr ::= expr AND expr */
- case 199: /* expr ::= expr OR expr */ yytestcase(yyruleno==199);
- case 200: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==200);
- case 201: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==201);
- case 202: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==202);
- case 203: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==203);
- case 204: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==204);
- case 205: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==205);
+ case 199: /* expr ::= expr AND expr */
+ case 200: /* expr ::= expr OR expr */ yytestcase(yyruleno==200);
+ case 201: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==201);
+ case 202: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==202);
+ case 203: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==203);
+ case 204: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==204);
+ case 205: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==205);
+ case 206: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==206);
{spanBinaryExpr(&yygotominor.yy346,pParse,yymsp[-1].major,&yymsp[-2].minor.yy346,&yymsp[0].minor.yy346);}
break;
- case 206: /* likeop ::= LIKE_KW|MATCH */
+ case 207: /* likeop ::= LIKE_KW|MATCH */
{yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.bNot = 0;}
break;
- case 207: /* likeop ::= NOT LIKE_KW|MATCH */
+ case 208: /* likeop ::= NOT LIKE_KW|MATCH */
{yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.bNot = 1;}
break;
- case 208: /* expr ::= expr likeop expr */
+ case 209: /* expr ::= expr likeop expr */
{
ExprList *pList;
pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy346.pExpr);
@@ -126060,7 +128869,7 @@ static void yy_reduce(
if( yygotominor.yy346.pExpr ) yygotominor.yy346.pExpr->flags |= EP_InfixFunc;
}
break;
- case 209: /* expr ::= expr likeop expr ESCAPE expr */
+ case 210: /* expr ::= expr likeop expr ESCAPE expr */
{
ExprList *pList;
pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
@@ -126073,35 +128882,35 @@ static void yy_reduce(
if( yygotominor.yy346.pExpr ) yygotominor.yy346.pExpr->flags |= EP_InfixFunc;
}
break;
- case 210: /* expr ::= expr ISNULL|NOTNULL */
+ case 211: /* expr ::= expr ISNULL|NOTNULL */
{spanUnaryPostfix(&yygotominor.yy346,pParse,yymsp[0].major,&yymsp[-1].minor.yy346,&yymsp[0].minor.yy0);}
break;
- case 211: /* expr ::= expr NOT NULL */
+ case 212: /* expr ::= expr NOT NULL */
{spanUnaryPostfix(&yygotominor.yy346,pParse,TK_NOTNULL,&yymsp[-2].minor.yy346,&yymsp[0].minor.yy0);}
break;
- case 212: /* expr ::= expr IS expr */
+ case 213: /* expr ::= expr IS expr */
{
spanBinaryExpr(&yygotominor.yy346,pParse,TK_IS,&yymsp[-2].minor.yy346,&yymsp[0].minor.yy346);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy346.pExpr, yygotominor.yy346.pExpr, TK_ISNULL);
}
break;
- case 213: /* expr ::= expr IS NOT expr */
+ case 214: /* expr ::= expr IS NOT expr */
{
spanBinaryExpr(&yygotominor.yy346,pParse,TK_ISNOT,&yymsp[-3].minor.yy346,&yymsp[0].minor.yy346);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy346.pExpr, yygotominor.yy346.pExpr, TK_NOTNULL);
}
break;
- case 214: /* expr ::= NOT expr */
- case 215: /* expr ::= BITNOT expr */ yytestcase(yyruleno==215);
+ case 215: /* expr ::= NOT expr */
+ case 216: /* expr ::= BITNOT expr */ yytestcase(yyruleno==216);
{spanUnaryPrefix(&yygotominor.yy346,pParse,yymsp[-1].major,&yymsp[0].minor.yy346,&yymsp[-1].minor.yy0);}
break;
- case 216: /* expr ::= MINUS expr */
+ case 217: /* expr ::= MINUS expr */
{spanUnaryPrefix(&yygotominor.yy346,pParse,TK_UMINUS,&yymsp[0].minor.yy346,&yymsp[-1].minor.yy0);}
break;
- case 217: /* expr ::= PLUS expr */
+ case 218: /* expr ::= PLUS expr */
{spanUnaryPrefix(&yygotominor.yy346,pParse,TK_UPLUS,&yymsp[0].minor.yy346,&yymsp[-1].minor.yy0);}
break;
- case 220: /* expr ::= expr between_op expr AND expr */
+ case 221: /* expr ::= expr between_op expr AND expr */
{
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
@@ -126116,7 +128925,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = yymsp[0].minor.yy346.zEnd;
}
break;
- case 223: /* expr ::= expr in_op LP exprlist RP */
+ case 224: /* expr ::= expr in_op LP exprlist RP */
{
if( yymsp[-1].minor.yy14==0 ){
/* Expressions of the form
@@ -126170,7 +128979,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 224: /* expr ::= LP select RP */
+ case 225: /* expr ::= LP select RP */
{
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
if( yygotominor.yy346.pExpr ){
@@ -126184,7 +128993,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 225: /* expr ::= expr in_op LP select RP */
+ case 226: /* expr ::= expr in_op LP select RP */
{
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0);
if( yygotominor.yy346.pExpr ){
@@ -126199,7 +129008,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 226: /* expr ::= expr in_op nm dbnm */
+ case 227: /* expr ::= expr in_op nm dbnm */
{
SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy346.pExpr, 0, 0);
@@ -126215,7 +129024,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n];
}
break;
- case 227: /* expr ::= EXISTS LP select RP */
+ case 228: /* expr ::= EXISTS LP select RP */
{
Expr *p = yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
if( p ){
@@ -126229,7 +129038,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 228: /* expr ::= CASE case_operand case_exprlist case_else END */
+ case 229: /* expr ::= CASE case_operand case_exprlist case_else END */
{
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy132, 0, 0);
if( yygotominor.yy346.pExpr ){
@@ -126243,82 +129052,71 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 229: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
+ case 230: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
{
yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, yymsp[-2].minor.yy346.pExpr);
yygotominor.yy14 = sqlite3ExprListAppend(pParse,yygotominor.yy14, yymsp[0].minor.yy346.pExpr);
}
break;
- case 230: /* case_exprlist ::= WHEN expr THEN expr */
+ case 231: /* case_exprlist ::= WHEN expr THEN expr */
{
yygotominor.yy14 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
yygotominor.yy14 = sqlite3ExprListAppend(pParse,yygotominor.yy14, yymsp[0].minor.yy346.pExpr);
}
break;
- case 237: /* nexprlist ::= nexprlist COMMA expr */
+ case 238: /* nexprlist ::= nexprlist COMMA expr */
{yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy14,yymsp[0].minor.yy346.pExpr);}
break;
- case 238: /* nexprlist ::= expr */
+ case 239: /* nexprlist ::= expr */
{yygotominor.yy14 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy346.pExpr);}
break;
- case 239: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP where_opt */
+ case 240: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
{
sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
sqlite3SrcListAppend(pParse->db,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy14, yymsp[-10].minor.yy328,
&yymsp[-11].minor.yy0, yymsp[0].minor.yy132, SQLITE_SO_ASC, yymsp[-8].minor.yy328);
}
break;
- case 240: /* uniqueflag ::= UNIQUE */
- case 291: /* raisetype ::= ABORT */ yytestcase(yyruleno==291);
+ case 241: /* uniqueflag ::= UNIQUE */
+ case 292: /* raisetype ::= ABORT */ yytestcase(yyruleno==292);
{yygotominor.yy328 = OE_Abort;}
break;
- case 241: /* uniqueflag ::= */
+ case 242: /* uniqueflag ::= */
{yygotominor.yy328 = OE_None;}
break;
- case 244: /* idxlist ::= idxlist COMMA nm collate sortorder */
+ case 245: /* eidlist ::= eidlist COMMA nm collate sortorder */
{
- Expr *p = sqlite3ExprAddCollateToken(pParse, 0, &yymsp[-1].minor.yy0, 1);
- yygotominor.yy14 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy14, p);
- sqlite3ExprListSetName(pParse,yygotominor.yy14,&yymsp[-2].minor.yy0,1);
- sqlite3ExprListCheckLength(pParse, yygotominor.yy14, "index");
- if( yygotominor.yy14 ) yygotominor.yy14->a[yygotominor.yy14->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy328;
+ yygotominor.yy14 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy14, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy328, yymsp[0].minor.yy328);
}
break;
- case 245: /* idxlist ::= nm collate sortorder */
+ case 246: /* eidlist ::= nm collate sortorder */
{
- Expr *p = sqlite3ExprAddCollateToken(pParse, 0, &yymsp[-1].minor.yy0, 1);
- yygotominor.yy14 = sqlite3ExprListAppend(pParse,0, p);
- sqlite3ExprListSetName(pParse, yygotominor.yy14, &yymsp[-2].minor.yy0, 1);
- sqlite3ExprListCheckLength(pParse, yygotominor.yy14, "index");
- if( yygotominor.yy14 ) yygotominor.yy14->a[yygotominor.yy14->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy328;
+ yygotominor.yy14 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy328, yymsp[0].minor.yy328);
}
break;
- case 246: /* collate ::= */
-{yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
- break;
- case 248: /* cmd ::= DROP INDEX ifexists fullname */
+ case 249: /* cmd ::= DROP INDEX ifexists fullname */
{sqlite3DropIndex(pParse, yymsp[0].minor.yy65, yymsp[-1].minor.yy328);}
break;
- case 249: /* cmd ::= VACUUM */
- case 250: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==250);
+ case 250: /* cmd ::= VACUUM */
+ case 251: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==251);
{sqlite3Vacuum(pParse);}
break;
- case 251: /* cmd ::= PRAGMA nm dbnm */
+ case 252: /* cmd ::= PRAGMA nm dbnm */
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
break;
- case 252: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
+ case 253: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
break;
- case 253: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
+ case 254: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
break;
- case 254: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
+ case 255: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
break;
- case 255: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
+ case 256: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
break;
- case 264: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
+ case 265: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
{
Token all;
all.z = yymsp[-3].minor.yy0.z;
@@ -126326,38 +129124,38 @@ static void yy_reduce(
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy473, &all);
}
break;
- case 265: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
+ case 266: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
{
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy328, yymsp[-4].minor.yy378.a, yymsp[-4].minor.yy378.b, yymsp[-2].minor.yy65, yymsp[0].minor.yy132, yymsp[-10].minor.yy328, yymsp[-8].minor.yy328);
yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
}
break;
- case 266: /* trigger_time ::= BEFORE */
- case 269: /* trigger_time ::= */ yytestcase(yyruleno==269);
+ case 267: /* trigger_time ::= BEFORE */
+ case 270: /* trigger_time ::= */ yytestcase(yyruleno==270);
{ yygotominor.yy328 = TK_BEFORE; }
break;
- case 267: /* trigger_time ::= AFTER */
+ case 268: /* trigger_time ::= AFTER */
{ yygotominor.yy328 = TK_AFTER; }
break;
- case 268: /* trigger_time ::= INSTEAD OF */
+ case 269: /* trigger_time ::= INSTEAD OF */
{ yygotominor.yy328 = TK_INSTEAD;}
break;
- case 270: /* trigger_event ::= DELETE|INSERT */
- case 271: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==271);
+ case 271: /* trigger_event ::= DELETE|INSERT */
+ case 272: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==272);
{yygotominor.yy378.a = yymsp[0].major; yygotominor.yy378.b = 0;}
break;
- case 272: /* trigger_event ::= UPDATE OF idlist */
+ case 273: /* trigger_event ::= UPDATE OF idlist */
{yygotominor.yy378.a = TK_UPDATE; yygotominor.yy378.b = yymsp[0].minor.yy408;}
break;
- case 275: /* when_clause ::= */
- case 296: /* key_opt ::= */ yytestcase(yyruleno==296);
+ case 276: /* when_clause ::= */
+ case 297: /* key_opt ::= */ yytestcase(yyruleno==297);
{ yygotominor.yy132 = 0; }
break;
- case 276: /* when_clause ::= WHEN expr */
- case 297: /* key_opt ::= KEY expr */ yytestcase(yyruleno==297);
+ case 277: /* when_clause ::= WHEN expr */
+ case 298: /* key_opt ::= KEY expr */ yytestcase(yyruleno==298);
{ yygotominor.yy132 = yymsp[0].minor.yy346.pExpr; }
break;
- case 277: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
+ case 278: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
{
assert( yymsp[-2].minor.yy473!=0 );
yymsp[-2].minor.yy473->pLast->pNext = yymsp[-1].minor.yy473;
@@ -126365,14 +129163,14 @@ static void yy_reduce(
yygotominor.yy473 = yymsp[-2].minor.yy473;
}
break;
- case 278: /* trigger_cmd_list ::= trigger_cmd SEMI */
+ case 279: /* trigger_cmd_list ::= trigger_cmd SEMI */
{
assert( yymsp[-1].minor.yy473!=0 );
yymsp[-1].minor.yy473->pLast = yymsp[-1].minor.yy473;
yygotominor.yy473 = yymsp[-1].minor.yy473;
}
break;
- case 280: /* trnm ::= nm DOT nm */
+ case 281: /* trnm ::= nm DOT nm */
{
yygotominor.yy0 = yymsp[0].minor.yy0;
sqlite3ErrorMsg(pParse,
@@ -126380,33 +129178,33 @@ static void yy_reduce(
"statements within triggers");
}
break;
- case 282: /* tridxby ::= INDEXED BY nm */
+ case 283: /* tridxby ::= INDEXED BY nm */
{
sqlite3ErrorMsg(pParse,
"the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
"within triggers");
}
break;
- case 283: /* tridxby ::= NOT INDEXED */
+ case 284: /* tridxby ::= NOT INDEXED */
{
sqlite3ErrorMsg(pParse,
"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
"within triggers");
}
break;
- case 284: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
+ case 285: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
{ yygotominor.yy473 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy14, yymsp[0].minor.yy132, yymsp[-5].minor.yy186); }
break;
- case 285: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
+ case 286: /* trigger_cmd ::= insert_cmd INTO trnm idlist_opt select */
{yygotominor.yy473 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy408, yymsp[0].minor.yy3, yymsp[-4].minor.yy186);}
break;
- case 286: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
+ case 287: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
{yygotominor.yy473 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy132);}
break;
- case 287: /* trigger_cmd ::= select */
+ case 288: /* trigger_cmd ::= select */
{yygotominor.yy473 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy3); }
break;
- case 288: /* expr ::= RAISE LP IGNORE RP */
+ case 289: /* expr ::= RAISE LP IGNORE RP */
{
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0);
if( yygotominor.yy346.pExpr ){
@@ -126416,7 +129214,7 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 289: /* expr ::= RAISE LP raisetype COMMA nm RP */
+ case 290: /* expr ::= RAISE LP raisetype COMMA nm RP */
{
yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0);
if( yygotominor.yy346.pExpr ) {
@@ -126426,87 +129224,87 @@ static void yy_reduce(
yygotominor.yy346.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
}
break;
- case 290: /* raisetype ::= ROLLBACK */
+ case 291: /* raisetype ::= ROLLBACK */
{yygotominor.yy328 = OE_Rollback;}
break;
- case 292: /* raisetype ::= FAIL */
+ case 293: /* raisetype ::= FAIL */
{yygotominor.yy328 = OE_Fail;}
break;
- case 293: /* cmd ::= DROP TRIGGER ifexists fullname */
+ case 294: /* cmd ::= DROP TRIGGER ifexists fullname */
{
sqlite3DropTrigger(pParse,yymsp[0].minor.yy65,yymsp[-1].minor.yy328);
}
break;
- case 294: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
+ case 295: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
{
sqlite3Attach(pParse, yymsp[-3].minor.yy346.pExpr, yymsp[-1].minor.yy346.pExpr, yymsp[0].minor.yy132);
}
break;
- case 295: /* cmd ::= DETACH database_kw_opt expr */
+ case 296: /* cmd ::= DETACH database_kw_opt expr */
{
sqlite3Detach(pParse, yymsp[0].minor.yy346.pExpr);
}
break;
- case 300: /* cmd ::= REINDEX */
+ case 301: /* cmd ::= REINDEX */
{sqlite3Reindex(pParse, 0, 0);}
break;
- case 301: /* cmd ::= REINDEX nm dbnm */
+ case 302: /* cmd ::= REINDEX nm dbnm */
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
break;
- case 302: /* cmd ::= ANALYZE */
+ case 303: /* cmd ::= ANALYZE */
{sqlite3Analyze(pParse, 0, 0);}
break;
- case 303: /* cmd ::= ANALYZE nm dbnm */
+ case 304: /* cmd ::= ANALYZE nm dbnm */
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
break;
- case 304: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
+ case 305: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
{
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy65,&yymsp[0].minor.yy0);
}
break;
- case 305: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
+ case 306: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
{
sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
}
break;
- case 306: /* add_column_fullname ::= fullname */
+ case 307: /* add_column_fullname ::= fullname */
{
pParse->db->lookaside.bEnabled = 0;
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy65);
}
break;
- case 309: /* cmd ::= create_vtab */
+ case 310: /* cmd ::= create_vtab */
{sqlite3VtabFinishParse(pParse,0);}
break;
- case 310: /* cmd ::= create_vtab LP vtabarglist RP */
+ case 311: /* cmd ::= create_vtab LP vtabarglist RP */
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
break;
- case 311: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
+ case 312: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
{
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy328);
}
break;
- case 314: /* vtabarg ::= */
+ case 315: /* vtabarg ::= */
{sqlite3VtabArgInit(pParse);}
break;
- case 316: /* vtabargtoken ::= ANY */
- case 317: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==317);
- case 318: /* lp ::= LP */ yytestcase(yyruleno==318);
+ case 317: /* vtabargtoken ::= ANY */
+ case 318: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==318);
+ case 319: /* lp ::= LP */ yytestcase(yyruleno==319);
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
break;
- case 322: /* with ::= */
+ case 323: /* with ::= */
{yygotominor.yy59 = 0;}
break;
- case 323: /* with ::= WITH wqlist */
- case 324: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==324);
+ case 324: /* with ::= WITH wqlist */
+ case 325: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==325);
{ yygotominor.yy59 = yymsp[0].minor.yy59; }
break;
- case 325: /* wqlist ::= nm idxlist_opt AS LP select RP */
+ case 326: /* wqlist ::= nm eidlist_opt AS LP select RP */
{
yygotominor.yy59 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy14, yymsp[-1].minor.yy3);
}
break;
- case 326: /* wqlist ::= wqlist COMMA nm idxlist_opt AS LP select RP */
+ case 327: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
{
yygotominor.yy59 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy59, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy14, yymsp[-1].minor.yy3);
}
@@ -126534,19 +129332,19 @@ static void yy_reduce(
/* (88) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==88);
/* (89) conslist ::= tcons */ yytestcase(yyruleno==89);
/* (91) tconscomma ::= */ yytestcase(yyruleno==91);
- /* (273) foreach_clause ::= */ yytestcase(yyruleno==273);
- /* (274) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==274);
- /* (281) tridxby ::= */ yytestcase(yyruleno==281);
- /* (298) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==298);
- /* (299) database_kw_opt ::= */ yytestcase(yyruleno==299);
- /* (307) kwcolumn_opt ::= */ yytestcase(yyruleno==307);
- /* (308) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==308);
- /* (312) vtabarglist ::= vtabarg */ yytestcase(yyruleno==312);
- /* (313) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==313);
- /* (315) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==315);
- /* (319) anylist ::= */ yytestcase(yyruleno==319);
- /* (320) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==320);
- /* (321) anylist ::= anylist ANY */ yytestcase(yyruleno==321);
+ /* (274) foreach_clause ::= */ yytestcase(yyruleno==274);
+ /* (275) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==275);
+ /* (282) tridxby ::= */ yytestcase(yyruleno==282);
+ /* (299) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==299);
+ /* (300) database_kw_opt ::= */ yytestcase(yyruleno==300);
+ /* (308) kwcolumn_opt ::= */ yytestcase(yyruleno==308);
+ /* (309) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==309);
+ /* (313) vtabarglist ::= vtabarg */ yytestcase(yyruleno==313);
+ /* (314) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==314);
+ /* (316) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==316);
+ /* (320) anylist ::= */ yytestcase(yyruleno==320);
+ /* (321) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==321);
+ /* (322) anylist ::= anylist ANY */ yytestcase(yyruleno==322);
break;
};
assert( yyruleno>=0 && yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
@@ -126554,9 +129352,9 @@ static void yy_reduce(
yysize = yyRuleInfo[yyruleno].nrhs;
yypParser->yyidx -= yysize;
yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
- if( yyact < YYNSTATE ){
-#ifdef NDEBUG
- /* If we are not debugging and the reduce action popped at least
+ if( yyact <= YY_MAX_SHIFTREDUCE ){
+ if( yyact>YY_MAX_SHIFT ) yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
+ /* If the reduce action popped at least
** one element off the stack, then we can push the new element back
** onto the stack here, and skip the stack overflow test in yy_shift().
** That gives a significant speed improvement. */
@@ -126566,13 +129364,12 @@ static void yy_reduce(
yymsp->stateno = (YYACTIONTYPE)yyact;
yymsp->major = (YYCODETYPE)yygoto;
yymsp->minor = yygotominor;
- }else
-#endif
- {
+ yyTraceShift(yypParser, yyact);
+ }else{
yy_shift(yypParser,yyact,yygoto,&yygotominor);
}
}else{
- assert( yyact == YYNSTATE + YYNRULE + 1 );
+ assert( yyact == YY_ACCEPT_ACTION );
yy_accept(yypParser);
}
}
@@ -126697,12 +129494,13 @@ SQLITE_PRIVATE void sqlite3Parser(
do{
yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
- if( yyact<YYNSTATE ){
+ if( yyact <= YY_MAX_SHIFTREDUCE ){
+ if( yyact > YY_MAX_SHIFT ) yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
yy_shift(yypParser,yyact,yymajor,&yyminorunion);
yypParser->yyerrcnt--;
yymajor = YYNOCODE;
- }else if( yyact < YYNSTATE + YYNRULE ){
- yy_reduce(yypParser,yyact-YYNSTATE);
+ }else if( yyact <= YY_MAX_REDUCE ){
+ yy_reduce(yypParser,yyact-YY_MIN_REDUCE);
}else{
assert( yyact == YY_ERROR_ACTION );
#ifdef YYERRORSYMBOL
@@ -126752,7 +129550,7 @@ SQLITE_PRIVATE void sqlite3Parser(
yymx != YYERRORSYMBOL &&
(yyact = yy_find_reduce_action(
yypParser->yystack[yypParser->yyidx].stateno,
- YYERRORSYMBOL)) >= YYNSTATE
+ YYERRORSYMBOL)) >= YY_MIN_REDUCE
){
yy_pop_parser_stack(yypParser);
}
@@ -126802,6 +129600,11 @@ SQLITE_PRIVATE void sqlite3Parser(
#endif
}
}while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ fprintf(yyTraceFILE,"%sReturn\n",yyTracePrompt);
+ }
+#endif
return;
}
@@ -126824,6 +129627,7 @@ SQLITE_PRIVATE void sqlite3Parser(
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
*/
+/* #include "sqliteInt.h" */
/* #include <stdlib.h> */
/*
@@ -127188,7 +129992,11 @@ SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[] = {
};
#define IdChar(C) (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
#endif
+
+/* Make the IdChar function accessible from ctime.c */
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
SQLITE_PRIVATE int sqlite3IsIdChar(u8 c){ return IdChar(c); }
+#endif
/*
@@ -127485,6 +130293,7 @@ SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzEr
pParse->zTail = zSql;
i = 0;
assert( pzErrMsg!=0 );
+ /* sqlite3ParserTrace(stdout, "parser: "); */
pEngine = sqlite3ParserAlloc(sqlite3Malloc);
if( pEngine==0 ){
db->mallocFailed = 1;
@@ -127536,7 +130345,8 @@ SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzEr
}
abort_parse:
assert( nErr==0 );
- if( zSql[i]==0 && pParse->rc==SQLITE_OK && db->mallocFailed==0 ){
+ if( pParse->rc==SQLITE_OK && db->mallocFailed==0 ){
+ assert( zSql[i]==0 );
if( lastTokenParsed!=TK_SEMI ){
sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
pParse->zTail = &zSql[i];
@@ -127558,7 +130368,7 @@ abort_parse:
pParse->rc = SQLITE_NOMEM;
}
if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
- sqlite3SetString(&pParse->zErrMsg, db, "%s", sqlite3ErrStr(pParse->rc));
+ pParse->zErrMsg = sqlite3MPrintf(db, "%s", sqlite3ErrStr(pParse->rc));
}
assert( pzErrMsg!=0 );
if( pParse->zErrMsg ){
@@ -127628,6 +130438,7 @@ abort_parse:
** separating it out, the code will be automatically omitted from
** static links that do not use it.
*/
+/* #include "sqliteInt.h" */
#ifndef SQLITE_OMIT_COMPLETE
/*
@@ -127895,7 +130706,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
rc = SQLITE_NOMEM;
}
sqlite3ValueFree(pVal);
- return sqlite3ApiExit(0, rc);
+ return rc & 0xff;
}
#endif /* SQLITE_OMIT_UTF16 */
#endif /* SQLITE_OMIT_COMPLETE */
@@ -127918,6 +130729,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
*/
+/* #include "sqliteInt.h" */
#ifdef SQLITE_ENABLE_FTS3
/************** Include fts3.h in the middle of main.c ***********************/
@@ -127937,6 +130749,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *zSql){
** This header file is used by programs that want to link against the
** FTS3 library. All it does is declare the sqlite3Fts3Init() interface.
*/
+/* #include "sqlite3.h" */
#if 0
extern "C" {
@@ -127969,6 +130782,7 @@ SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);
** This header file is used by programs that want to link against the
** RTREE library. All it does is declare the sqlite3RtreeInit() interface.
*/
+/* #include "sqlite3.h" */
#if 0
extern "C" {
@@ -128001,6 +130815,7 @@ SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);
** This header file is used by programs that want to link against the
** ICU extension. All it does is declare the sqlite3IcuInit() interface.
*/
+/* #include "sqlite3.h" */
#if 0
extern "C" {
@@ -128016,6 +130831,12 @@ SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);
/************** End of sqliteicu.h *******************************************/
/************** Continuing where we left off in main.c ***********************/
#endif
+#ifdef SQLITE_ENABLE_JSON1
+SQLITE_PRIVATE int sqlite3Json1Init(sqlite3*);
+#endif
+#ifdef SQLITE_ENABLE_FTS5
+SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3*);
+#endif
#ifndef SQLITE_AMALGAMATION
/* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant
@@ -128633,6 +131454,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_config(int op, ...){
** the lookaside memory.
*/
static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
+#ifndef SQLITE_OMIT_LOOKASIDE
void *pStart;
if( db->lookaside.nOut ){
return SQLITE_BUSY;
@@ -128683,6 +131505,7 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
db->lookaside.bEnabled = 0;
db->lookaside.bMalloced = 0;
}
+#endif /* SQLITE_OMIT_LOOKASIDE */
return SQLITE_OK;
}
@@ -128921,17 +131744,23 @@ static void functionDestroy(sqlite3 *db, FuncDef *p){
static void disconnectAllVtab(sqlite3 *db){
#ifndef SQLITE_OMIT_VIRTUALTABLE
int i;
+ HashElem *p;
sqlite3BtreeEnterAll(db);
for(i=0; i<db->nDb; i++){
Schema *pSchema = db->aDb[i].pSchema;
if( db->aDb[i].pSchema ){
- HashElem *p;
for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){
Table *pTab = (Table *)sqliteHashData(p);
if( IsVirtual(pTab) ) sqlite3VtabDisconnect(db, pTab);
}
}
}
+ for(p=sqliteHashFirst(&db->aModule); p; p=sqliteHashNext(p)){
+ Module *pMod = (Module *)sqliteHashData(p);
+ if( pMod->pEpoTab ){
+ sqlite3VtabDisconnect(db, pMod->pEpoTab);
+ }
+ }
sqlite3VtabUnlockList(db);
sqlite3BtreeLeaveAll(db);
#else
@@ -129109,6 +131938,7 @@ SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){
if( pMod->xDestroy ){
pMod->xDestroy(pMod->pAux);
}
+ sqlite3VtabEponymousTableClear(db, pMod);
sqlite3DbFree(db, pMod);
}
sqlite3HashClear(&db->aModule);
@@ -130073,9 +132903,11 @@ SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
return ( db->temp_store!=1 );
#endif
#if SQLITE_TEMP_STORE==3
+ UNUSED_PARAMETER(db);
return 1;
#endif
#if SQLITE_TEMP_STORE<1 || SQLITE_TEMP_STORE>3
+ UNUSED_PARAMETER(db);
return 0;
#endif
}
@@ -130750,6 +133582,9 @@ static int openDatabase(
#if defined(SQLITE_REVERSE_UNORDERED_SELECTS)
| SQLITE_ReverseOrder
#endif
+#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
+ | SQLITE_CellSizeCk
+#endif
;
sqlite3HashInit(&db->aCollSeq);
#ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -130849,12 +133684,18 @@ static int openDatabase(
}
#endif
-#ifdef SQLITE_ENABLE_FTS3
+#ifdef SQLITE_ENABLE_FTS3 /* automatically defined by SQLITE_ENABLE_FTS4 */
if( !db->mallocFailed && rc==SQLITE_OK ){
rc = sqlite3Fts3Init(db);
}
#endif
+#ifdef SQLITE_ENABLE_FTS5
+ if( !db->mallocFailed && rc==SQLITE_OK ){
+ rc = sqlite3Fts5Init(db);
+ }
+#endif
+
#ifdef SQLITE_ENABLE_ICU
if( !db->mallocFailed && rc==SQLITE_OK ){
rc = sqlite3IcuInit(db);
@@ -130869,8 +133710,13 @@ static int openDatabase(
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
if( !db->mallocFailed && rc==SQLITE_OK){
- int sqlite3_dbstat_register(sqlite3*);
- rc = sqlite3_dbstat_register(db);
+ rc = sqlite3DbstatRegister(db);
+ }
+#endif
+
+#ifdef SQLITE_ENABLE_JSON1
+ if( !db->mallocFailed && rc==SQLITE_OK){
+ rc = sqlite3Json1Init(db);
}
#endif
@@ -130915,7 +133761,7 @@ opendb_out:
sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0);
}
#endif
- return sqlite3ApiExit(0, rc);
+ return rc & 0xff;
}
/*
@@ -130973,7 +133819,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_open16(
}
sqlite3ValueFree(pVal);
- return sqlite3ApiExit(0, rc);
+ return rc & 0xff;
}
#endif /* SQLITE_OMIT_UTF16 */
@@ -131345,7 +134191,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3 *db, const char *zDbN
*/
SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...){
int rc = 0;
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifdef SQLITE_OMIT_BUILTIN_TEST
+ UNUSED_PARAMETER(op);
+#else
va_list ap;
va_start(ap, op);
switch( op ){
@@ -131787,6 +134635,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbNa
** This file contains the implementation of the sqlite3_unlock_notify()
** API method and its associated functionality.
*/
+/* #include "sqliteInt.h" */
+/* #include "btreeInt.h" */
/* Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. */
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
@@ -132430,9 +135280,11 @@ SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){
/* If not building as part of the core, include sqlite3ext.h. */
#ifndef SQLITE_CORE
+/* # include "sqlite3ext.h" */
SQLITE_EXTENSION_INIT3
#endif
+/* #include "sqlite3.h" */
/************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
/************** Begin file fts3_tokenizer.h **********************************/
/*
@@ -132461,6 +135313,7 @@ SQLITE_EXTENSION_INIT3
** If tokenizers are to be allowed to call sqlite3_*() functions, then
** we will need a way to register the API consistently.
*/
+/* #include "sqlite3.h" */
/*
** Structures used by the tokenizer interface. When a new tokenizer
@@ -132874,6 +135727,8 @@ typedef struct Fts3DeferredToken Fts3DeferredToken;
typedef struct Fts3SegReader Fts3SegReader;
typedef struct Fts3MultiSegReader Fts3MultiSegReader;
+typedef struct MatchinfoBuffer MatchinfoBuffer;
+
/*
** A connection to a fulltext index is an instance of the following
** structure. The xCreate and xConnect methods create an instance
@@ -132939,6 +135794,7 @@ struct Fts3Table {
int nPendingData; /* Current bytes of pending data */
sqlite_int64 iPrevDocid; /* Docid of most recently inserted document */
int iPrevLangid; /* Langid of recently inserted document */
+ int bPrevDelete; /* True if last operation was a delete */
#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)
/* State variables used for validating that the transaction control
@@ -132983,9 +135839,7 @@ struct Fts3Cursor {
i64 iMinDocid; /* Minimum docid to return */
i64 iMaxDocid; /* Maximum docid to return */
int isMatchinfoNeeded; /* True when aMatchinfo[] needs filling in */
- u32 *aMatchinfo; /* Information about most recent match */
- int nMatchinfo; /* Number of elements in aMatchinfo[] */
- char *zMatchinfo; /* Matchinfo specification */
+ MatchinfoBuffer *pMIBuffer; /* Buffer for matchinfo data */
};
#define FTS3_EVAL_FILTER 0
@@ -133105,7 +135959,9 @@ struct Fts3Expr {
u8 bStart; /* True if iDocid is valid */
u8 bDeferred; /* True if this expression is entirely deferred */
- u32 *aMI;
+ /* The following are used by the fts3_snippet.c module. */
+ int iPhrase; /* Index of this phrase in matchinfo() results */
+ u32 *aMI; /* See above */
};
/*
@@ -133226,6 +136082,7 @@ SQLITE_PRIVATE void sqlite3Fts3DoclistPrev(int,char*,int,char**,sqlite3_int64*,i
SQLITE_PRIVATE int sqlite3Fts3EvalPhraseStats(Fts3Cursor *, Fts3Expr *, u32 *);
SQLITE_PRIVATE int sqlite3Fts3FirstFilter(sqlite3_int64, char *, int, char *);
SQLITE_PRIVATE void sqlite3Fts3CreateStatTable(int*, Fts3Table*);
+SQLITE_PRIVATE int sqlite3Fts3EvalTestDeferred(Fts3Cursor *pCsr, int *pRc);
/* fts3_tokenizer.c */
SQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *, int *);
@@ -133241,6 +136098,7 @@ SQLITE_PRIVATE void sqlite3Fts3Snippet(sqlite3_context *, Fts3Cursor *, const ch
const char *, const char *, int, int
);
SQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *, Fts3Cursor *, const char *);
+SQLITE_PRIVATE void sqlite3Fts3MIBufferFree(MatchinfoBuffer *p);
/* fts3_expr.c */
SQLITE_PRIVATE int sqlite3Fts3ExprParse(sqlite3_tokenizer *, int,
@@ -133297,7 +136155,9 @@ SQLITE_PRIVATE int sqlite3FtsUnicodeIsdiacritic(int);
/* #include <string.h> */
/* #include <stdarg.h> */
+/* #include "fts3.h" */
#ifndef SQLITE_CORE
+/* # include "sqlite3ext.h" */
SQLITE_EXTENSION_INIT1
#endif
@@ -134510,6 +137370,19 @@ static void fts3SetEstimatedRows(sqlite3_index_info *pIdxInfo, i64 nRow){
#endif
}
+/*
+** Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this
+** extension is currently being used by a version of SQLite too old to
+** support index-info flags. In that case this function is a no-op.
+*/
+static void fts3SetUniqueFlag(sqlite3_index_info *pIdxInfo){
+#if SQLITE_VERSION_NUMBER>=3008012
+ if( sqlite3_libversion_number()>=3008012 ){
+ pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
+ }
+#endif
+}
+
/*
** Implementation of the xBestIndex method for FTS3 tables. There
** are three possible strategies, in order of preference:
@@ -134600,6 +137473,9 @@ static int fts3BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
}
}
+ /* If using a docid=? or rowid=? strategy, set the UNIQUE flag. */
+ if( pInfo->idxNum==FTS3_DOCID_SEARCH ) fts3SetUniqueFlag(pInfo);
+
iIdx = 1;
if( iCons>=0 ){
pInfo->aConstraintUsage[iCons].argvIndex = iIdx++;
@@ -134668,7 +137544,7 @@ static int fts3CloseMethod(sqlite3_vtab_cursor *pCursor){
sqlite3Fts3ExprFree(pCsr->pExpr);
sqlite3Fts3FreeDeferredTokens(pCsr);
sqlite3_free(pCsr->aDoclist);
- sqlite3_free(pCsr->aMatchinfo);
+ sqlite3Fts3MIBufferFree(pCsr->pMIBuffer);
assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
sqlite3_free(pCsr);
return SQLITE_OK;
@@ -136169,7 +139045,7 @@ static int fts3FilterMethod(
/* In case the cursor has been used before, clear it now. */
sqlite3_finalize(pCsr->pStmt);
sqlite3_free(pCsr->aDoclist);
- sqlite3_free(pCsr->aMatchinfo);
+ sqlite3Fts3MIBufferFree(pCsr->pMIBuffer);
sqlite3Fts3ExprFree(pCsr->pExpr);
memset(&pCursor[1], 0, sizeof(Fts3Cursor)-sizeof(sqlite3_vtab_cursor));
@@ -137224,7 +140100,6 @@ static int fts3EvalPhraseStart(Fts3Cursor *pCsr, int bOptOk, Fts3Phrase *p){
int bIncrOk = (bOptOk
&& pCsr->bDesc==pTab->bDescIdx
&& p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
- && p->nToken<=MAX_INCR_PHRASE_TOKENS && p->nToken>0
#ifdef SQLITE_TEST
&& pTab->bNoIncrDoclist==0
#endif
@@ -137344,6 +140219,7 @@ SQLITE_PRIVATE void sqlite3Fts3DoclistNext(
p += sqlite3Fts3GetVarint(p, piDocid);
}else{
fts3PoslistCopy(0, &p);
+ while( p<&aDoclist[nDoclist] && *p==0 ) p++;
if( p>=&aDoclist[nDoclist] ){
*pbEof = 1;
}else{
@@ -138067,7 +140943,7 @@ static int fts3EvalNearTrim(
** 2. NEAR is treated as AND. If the expression is "x NEAR y", it is
** advanced to point to the next row that matches "x AND y".
**
-** See fts3EvalTestDeferredAndNear() for details on testing if a row is
+** See sqlite3Fts3EvalTestDeferred() for details on testing if a row is
** really a match, taking into account deferred tokens and NEAR operators.
*/
static void fts3EvalNextRow(
@@ -138287,7 +141163,7 @@ static int fts3EvalNearTest(Fts3Expr *pExpr, int *pRc){
}
/*
-** This function is a helper function for fts3EvalTestDeferredAndNear().
+** This function is a helper function for sqlite3Fts3EvalTestDeferred().
** Assuming no error occurs or has occurred, It returns non-zero if the
** expression passed as the second argument matches the row that pCsr
** currently points to, or zero if it does not.
@@ -138408,7 +141284,7 @@ static int fts3EvalTestExpr(
** Or, if no error occurs and it seems the current row does match the FTS
** query, return 0.
*/
-static int fts3EvalTestDeferredAndNear(Fts3Cursor *pCsr, int *pRc){
+SQLITE_PRIVATE int sqlite3Fts3EvalTestDeferred(Fts3Cursor *pCsr, int *pRc){
int rc = *pRc;
int bMiss = 0;
if( rc==SQLITE_OK ){
@@ -138455,7 +141331,7 @@ static int fts3EvalNext(Fts3Cursor *pCsr){
pCsr->isRequireSeek = 1;
pCsr->isMatchinfoNeeded = 1;
pCsr->iPrevId = pExpr->iDocid;
- }while( pCsr->isEof==0 && fts3EvalTestDeferredAndNear(pCsr, &rc) );
+ }while( pCsr->isEof==0 && sqlite3Fts3EvalTestDeferred(pCsr, &rc) );
}
/* Check if the cursor is past the end of the docid range specified
@@ -138616,7 +141492,7 @@ static int fts3EvalGatherStats(
pCsr->iPrevId = pRoot->iDocid;
}while( pCsr->isEof==0
&& pRoot->eType==FTSQUERY_NEAR
- && fts3EvalTestDeferredAndNear(pCsr, &rc)
+ && sqlite3Fts3EvalTestDeferred(pCsr, &rc)
);
if( rc==SQLITE_OK && pCsr->isEof==0 ){
@@ -138641,7 +141517,6 @@ static int fts3EvalGatherStats(
fts3EvalNextRow(pCsr, pRoot, &rc);
assert( pRoot->bEof==0 );
}while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );
- fts3EvalTestDeferredAndNear(pCsr, &rc);
}
}
return rc;
@@ -138751,10 +141626,10 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(
int rc = SQLITE_OK;
int bDescDoclist = pTab->bDescIdx; /* For DOCID_CMP macro */
int bOr = 0;
- u8 bEof = 0;
u8 bTreeEof = 0;
Fts3Expr *p; /* Used to iterate from pExpr to root */
Fts3Expr *pNear; /* Most senior NEAR ancestor (or pExpr) */
+ int bMatch;
/* Check if this phrase descends from an OR expression node. If not,
** return NULL. Otherwise, the entry that corresponds to docid
@@ -138788,31 +141663,47 @@ SQLITE_PRIVATE int sqlite3Fts3EvalPhrasePoslist(
}
if( rc!=SQLITE_OK ) return rc;
- pIter = pPhrase->pOrPoslist;
- iDocid = pPhrase->iOrDocid;
- if( pCsr->bDesc==bDescDoclist ){
- bEof = !pPhrase->doclist.nAll ||
- (pIter >= (pPhrase->doclist.aAll + pPhrase->doclist.nAll));
- while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
- sqlite3Fts3DoclistNext(
- bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll,
- &pIter, &iDocid, &bEof
- );
- }
- }else{
- bEof = !pPhrase->doclist.nAll || (pIter && pIter<=pPhrase->doclist.aAll);
- while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
- int dummy;
- sqlite3Fts3DoclistPrev(
- bDescDoclist, pPhrase->doclist.aAll, pPhrase->doclist.nAll,
- &pIter, &iDocid, &dummy, &bEof
- );
+ bMatch = 1;
+ for(p=pNear; p; p=p->pLeft){
+ u8 bEof = 0;
+ Fts3Expr *pTest = p;
+ Fts3Phrase *pPh;
+ assert( pTest->eType==FTSQUERY_NEAR || pTest->eType==FTSQUERY_PHRASE );
+ if( pTest->eType==FTSQUERY_NEAR ) pTest = pTest->pRight;
+ assert( pTest->eType==FTSQUERY_PHRASE );
+ pPh = pTest->pPhrase;
+
+ pIter = pPh->pOrPoslist;
+ iDocid = pPh->iOrDocid;
+ if( pCsr->bDesc==bDescDoclist ){
+ bEof = !pPh->doclist.nAll ||
+ (pIter >= (pPh->doclist.aAll + pPh->doclist.nAll));
+ while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)<0 ) && bEof==0 ){
+ sqlite3Fts3DoclistNext(
+ bDescDoclist, pPh->doclist.aAll, pPh->doclist.nAll,
+ &pIter, &iDocid, &bEof
+ );
+ }
+ }else{
+ bEof = !pPh->doclist.nAll || (pIter && pIter<=pPh->doclist.aAll);
+ while( (pIter==0 || DOCID_CMP(iDocid, pCsr->iPrevId)>0 ) && bEof==0 ){
+ int dummy;
+ sqlite3Fts3DoclistPrev(
+ bDescDoclist, pPh->doclist.aAll, pPh->doclist.nAll,
+ &pIter, &iDocid, &dummy, &bEof
+ );
+ }
}
+ pPh->pOrPoslist = pIter;
+ pPh->iOrDocid = iDocid;
+ if( bEof || iDocid!=pCsr->iPrevId ) bMatch = 0;
}
- pPhrase->pOrPoslist = pIter;
- pPhrase->iOrDocid = iDocid;
- if( bEof || iDocid!=pCsr->iPrevId ) pIter = 0;
+ if( bMatch ){
+ pIter = pPhrase->pOrPoslist;
+ }else{
+ pIter = 0;
+ }
}
if( pIter==0 ) return SQLITE_OK;
@@ -138900,6 +141791,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_fts3_init(
******************************************************************************
**
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <string.h> */
@@ -139456,6 +142348,7 @@ SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db){
** syntax is relatively simple, the whole tokenizer/parser system is
** hand-coded.
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/*
@@ -140233,125 +143126,151 @@ static int fts3ExprBalance(Fts3Expr **pp, int nMaxDepth){
rc = SQLITE_ERROR;
}
- if( rc==SQLITE_OK && (eType==FTSQUERY_AND || eType==FTSQUERY_OR) ){
- Fts3Expr **apLeaf;
- apLeaf = (Fts3Expr **)sqlite3_malloc(sizeof(Fts3Expr *) * nMaxDepth);
- if( 0==apLeaf ){
- rc = SQLITE_NOMEM;
- }else{
- memset(apLeaf, 0, sizeof(Fts3Expr *) * nMaxDepth);
- }
-
- if( rc==SQLITE_OK ){
- int i;
- Fts3Expr *p;
-
- /* Set $p to point to the left-most leaf in the tree of eType nodes. */
- for(p=pRoot; p->eType==eType; p=p->pLeft){
- assert( p->pParent==0 || p->pParent->pLeft==p );
- assert( p->pLeft && p->pRight );
+ if( rc==SQLITE_OK ){
+ if( (eType==FTSQUERY_AND || eType==FTSQUERY_OR) ){
+ Fts3Expr **apLeaf;
+ apLeaf = (Fts3Expr **)sqlite3_malloc(sizeof(Fts3Expr *) * nMaxDepth);
+ if( 0==apLeaf ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(apLeaf, 0, sizeof(Fts3Expr *) * nMaxDepth);
}
- /* This loop runs once for each leaf in the tree of eType nodes. */
- while( 1 ){
- int iLvl;
- Fts3Expr *pParent = p->pParent; /* Current parent of p */
+ if( rc==SQLITE_OK ){
+ int i;
+ Fts3Expr *p;
- assert( pParent==0 || pParent->pLeft==p );
- p->pParent = 0;
- if( pParent ){
- pParent->pLeft = 0;
- }else{
- pRoot = 0;
+ /* Set $p to point to the left-most leaf in the tree of eType nodes. */
+ for(p=pRoot; p->eType==eType; p=p->pLeft){
+ assert( p->pParent==0 || p->pParent->pLeft==p );
+ assert( p->pLeft && p->pRight );
}
- rc = fts3ExprBalance(&p, nMaxDepth-1);
- if( rc!=SQLITE_OK ) break;
- for(iLvl=0; p && iLvl<nMaxDepth; iLvl++){
- if( apLeaf[iLvl]==0 ){
- apLeaf[iLvl] = p;
- p = 0;
+ /* This loop runs once for each leaf in the tree of eType nodes. */
+ while( 1 ){
+ int iLvl;
+ Fts3Expr *pParent = p->pParent; /* Current parent of p */
+
+ assert( pParent==0 || pParent->pLeft==p );
+ p->pParent = 0;
+ if( pParent ){
+ pParent->pLeft = 0;
}else{
- assert( pFree );
- pFree->pLeft = apLeaf[iLvl];
- pFree->pRight = p;
- pFree->pLeft->pParent = pFree;
- pFree->pRight->pParent = pFree;
-
- p = pFree;
- pFree = pFree->pParent;
- p->pParent = 0;
- apLeaf[iLvl] = 0;
+ pRoot = 0;
}
- }
- if( p ){
- sqlite3Fts3ExprFree(p);
- rc = SQLITE_TOOBIG;
- break;
- }
-
- /* If that was the last leaf node, break out of the loop */
- if( pParent==0 ) break;
-
- /* Set $p to point to the next leaf in the tree of eType nodes */
- for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
-
- /* Remove pParent from the original tree. */
- assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );
- pParent->pRight->pParent = pParent->pParent;
- if( pParent->pParent ){
- pParent->pParent->pLeft = pParent->pRight;
- }else{
- assert( pParent==pRoot );
- pRoot = pParent->pRight;
- }
-
- /* Link pParent into the free node list. It will be used as an
- ** internal node of the new tree. */
- pParent->pParent = pFree;
- pFree = pParent;
- }
+ rc = fts3ExprBalance(&p, nMaxDepth-1);
+ if( rc!=SQLITE_OK ) break;
- if( rc==SQLITE_OK ){
- p = 0;
- for(i=0; i<nMaxDepth; i++){
- if( apLeaf[i] ){
- if( p==0 ){
- p = apLeaf[i];
- p->pParent = 0;
+ for(iLvl=0; p && iLvl<nMaxDepth; iLvl++){
+ if( apLeaf[iLvl]==0 ){
+ apLeaf[iLvl] = p;
+ p = 0;
}else{
- assert( pFree!=0 );
+ assert( pFree );
+ pFree->pLeft = apLeaf[iLvl];
pFree->pRight = p;
- pFree->pLeft = apLeaf[i];
pFree->pLeft->pParent = pFree;
pFree->pRight->pParent = pFree;
p = pFree;
pFree = pFree->pParent;
p->pParent = 0;
+ apLeaf[iLvl] = 0;
}
}
+ if( p ){
+ sqlite3Fts3ExprFree(p);
+ rc = SQLITE_TOOBIG;
+ break;
+ }
+
+ /* If that was the last leaf node, break out of the loop */
+ if( pParent==0 ) break;
+
+ /* Set $p to point to the next leaf in the tree of eType nodes */
+ for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
+
+ /* Remove pParent from the original tree. */
+ assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );
+ pParent->pRight->pParent = pParent->pParent;
+ if( pParent->pParent ){
+ pParent->pParent->pLeft = pParent->pRight;
+ }else{
+ assert( pParent==pRoot );
+ pRoot = pParent->pRight;
+ }
+
+ /* Link pParent into the free node list. It will be used as an
+ ** internal node of the new tree. */
+ pParent->pParent = pFree;
+ pFree = pParent;
}
- pRoot = p;
- }else{
- /* An error occurred. Delete the contents of the apLeaf[] array
- ** and pFree list. Everything else is cleaned up by the call to
- ** sqlite3Fts3ExprFree(pRoot) below. */
- Fts3Expr *pDel;
- for(i=0; i<nMaxDepth; i++){
- sqlite3Fts3ExprFree(apLeaf[i]);
- }
- while( (pDel=pFree)!=0 ){
- pFree = pDel->pParent;
- sqlite3_free(pDel);
+
+ if( rc==SQLITE_OK ){
+ p = 0;
+ for(i=0; i<nMaxDepth; i++){
+ if( apLeaf[i] ){
+ if( p==0 ){
+ p = apLeaf[i];
+ p->pParent = 0;
+ }else{
+ assert( pFree!=0 );
+ pFree->pRight = p;
+ pFree->pLeft = apLeaf[i];
+ pFree->pLeft->pParent = pFree;
+ pFree->pRight->pParent = pFree;
+
+ p = pFree;
+ pFree = pFree->pParent;
+ p->pParent = 0;
+ }
+ }
+ }
+ pRoot = p;
+ }else{
+ /* An error occurred. Delete the contents of the apLeaf[] array
+ ** and pFree list. Everything else is cleaned up by the call to
+ ** sqlite3Fts3ExprFree(pRoot) below. */
+ Fts3Expr *pDel;
+ for(i=0; i<nMaxDepth; i++){
+ sqlite3Fts3ExprFree(apLeaf[i]);
+ }
+ while( (pDel=pFree)!=0 ){
+ pFree = pDel->pParent;
+ sqlite3_free(pDel);
+ }
}
+
+ assert( pFree==0 );
+ sqlite3_free( apLeaf );
}
+ }else if( eType==FTSQUERY_NOT ){
+ Fts3Expr *pLeft = pRoot->pLeft;
+ Fts3Expr *pRight = pRoot->pRight;
- assert( pFree==0 );
- sqlite3_free( apLeaf );
+ pRoot->pLeft = 0;
+ pRoot->pRight = 0;
+ pLeft->pParent = 0;
+ pRight->pParent = 0;
+
+ rc = fts3ExprBalance(&pLeft, nMaxDepth-1);
+ if( rc==SQLITE_OK ){
+ rc = fts3ExprBalance(&pRight, nMaxDepth-1);
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3Fts3ExprFree(pRight);
+ sqlite3Fts3ExprFree(pLeft);
+ }else{
+ assert( pLeft && pRight );
+ pRoot->pLeft = pLeft;
+ pLeft->pParent = pRoot;
+ pRoot->pRight = pRight;
+ pRight->pParent = pRoot;
+ }
}
}
-
+
if( rc!=SQLITE_OK ){
sqlite3Fts3ExprFree(pRoot);
pRoot = 0;
@@ -140749,12 +143668,14 @@ SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
** * The FTS3 module is being built into the core of
** SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
/* #include <stdlib.h> */
/* #include <string.h> */
+/* #include "fts3_hash.h" */
/*
** Malloc and Free functions
@@ -141132,6 +144053,7 @@ SQLITE_PRIVATE void *sqlite3Fts3HashInsert(
** * The FTS3 module is being built into the core of
** SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
@@ -141139,6 +144061,7 @@ SQLITE_PRIVATE void *sqlite3Fts3HashInsert(
/* #include <stdio.h> */
/* #include <string.h> */
+/* #include "fts3_tokenizer.h" */
/*
** Class derived from sqlite3_tokenizer
@@ -141796,6 +144719,7 @@ SQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(
** * The FTS3 module is being built into the core of
** SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
@@ -142291,6 +145215,7 @@ SQLITE_PRIVATE int sqlite3Fts3InitHashTable(
** * The FTS3 module is being built into the core of
** SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
@@ -142298,6 +145223,7 @@ SQLITE_PRIVATE int sqlite3Fts3InitHashTable(
/* #include <stdio.h> */
/* #include <string.h> */
+/* #include "fts3_tokenizer.h" */
typedef struct simple_tokenizer {
sqlite3_tokenizer base;
@@ -142542,6 +145468,7 @@ SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(
** pos: Token offset of token within input.
**
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <string.h> */
@@ -142977,6 +145904,7 @@ SQLITE_PRIVATE int sqlite3Fts3InitTok(sqlite3 *db, Fts3Hash *pHash){
** code in fts3.c.
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <string.h> */
@@ -143819,10 +146747,12 @@ static int fts3PendingTermsAdd(
*/
static int fts3PendingTermsDocid(
Fts3Table *p, /* Full-text table handle */
+ int bDelete, /* True if this op is a delete */
int iLangid, /* Language id of row being written */
sqlite_int64 iDocid /* Docid of row being written */
){
assert( iLangid>=0 );
+ assert( bDelete==1 || bDelete==0 );
/* TODO(shess) Explore whether partially flushing the buffer on
** forced-flush would provide better performance. I suspect that if
@@ -143830,7 +146760,8 @@ static int fts3PendingTermsDocid(
** buffer was half empty, that would let the less frequent terms
** generate longer doclists.
*/
- if( iDocid<=p->iPrevDocid
+ if( iDocid<p->iPrevDocid
+ || (iDocid==p->iPrevDocid && p->bPrevDelete==0)
|| p->iPrevLangid!=iLangid
|| p->nPendingData>p->nMaxPendingData
){
@@ -143839,6 +146770,7 @@ static int fts3PendingTermsDocid(
}
p->iPrevDocid = iDocid;
p->iPrevLangid = iLangid;
+ p->bPrevDelete = bDelete;
return SQLITE_OK;
}
@@ -144028,7 +146960,8 @@ static void fts3DeleteTerms(
if( SQLITE_ROW==sqlite3_step(pSelect) ){
int i;
int iLangid = langidFromSelect(p, pSelect);
- rc = fts3PendingTermsDocid(p, iLangid, sqlite3_column_int64(pSelect, 0));
+ i64 iDocid = sqlite3_column_int64(pSelect, 0);
+ rc = fts3PendingTermsDocid(p, 1, iLangid, iDocid);
for(i=1; rc==SQLITE_OK && i<=p->nColumn; i++){
int iCol = i-1;
if( p->abNotindexed[iCol]==0 ){
@@ -144276,14 +147209,19 @@ static int fts3SegReaderNext(
if( fts3SegReaderIsPending(pReader) ){
Fts3HashElem *pElem = *(pReader->ppNextElem);
- if( pElem==0 ){
- pReader->aNode = 0;
- }else{
+ sqlite3_free(pReader->aNode);
+ pReader->aNode = 0;
+ if( pElem ){
+ char *aCopy;
PendingList *pList = (PendingList *)fts3HashData(pElem);
+ int nCopy = pList->nData+1;
pReader->zTerm = (char *)fts3HashKey(pElem);
pReader->nTerm = fts3HashKeysize(pElem);
- pReader->nNode = pReader->nDoclist = pList->nData + 1;
- pReader->aNode = pReader->aDoclist = pList->aData;
+ aCopy = (char*)sqlite3_malloc(nCopy);
+ if( !aCopy ) return SQLITE_NOMEM;
+ memcpy(aCopy, pList->aData, nCopy);
+ pReader->nNode = pReader->nDoclist = nCopy;
+ pReader->aNode = pReader->aDoclist = aCopy;
pReader->ppNextElem++;
assert( pReader->aNode );
}
@@ -144523,12 +147461,14 @@ SQLITE_PRIVATE int sqlite3Fts3MsrOvfl(
** second argument.
*/
SQLITE_PRIVATE void sqlite3Fts3SegReaderFree(Fts3SegReader *pReader){
- if( pReader && !fts3SegReaderIsPending(pReader) ){
- sqlite3_free(pReader->zTerm);
+ if( pReader ){
+ if( !fts3SegReaderIsPending(pReader) ){
+ sqlite3_free(pReader->zTerm);
+ }
if( !fts3SegReaderIsRootOnly(pReader) ){
sqlite3_free(pReader->aNode);
- sqlite3_blob_close(pReader->pBlob);
}
+ sqlite3_blob_close(pReader->pBlob);
}
sqlite3_free(pReader);
}
@@ -146471,7 +149411,7 @@ static int fts3DoRebuild(Fts3Table *p){
while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){
int iCol;
int iLangid = langidFromSelect(p, pStmt);
- rc = fts3PendingTermsDocid(p, iLangid, sqlite3_column_int64(pStmt, 0));
+ rc = fts3PendingTermsDocid(p, 0, iLangid, sqlite3_column_int64(pStmt, 0));
memset(aSz, 0, sizeof(aSz[0]) * (p->nColumn+1));
for(iCol=0; rc==SQLITE_OK && iCol<p->nColumn; iCol++){
if( p->abNotindexed[iCol]==0 ){
@@ -148576,7 +151516,7 @@ SQLITE_PRIVATE int sqlite3Fts3UpdateMethod(
}
}
if( rc==SQLITE_OK && (!isRemove || *pRowid!=p->iPrevDocid ) ){
- rc = fts3PendingTermsDocid(p, iLangid, *pRowid);
+ rc = fts3PendingTermsDocid(p, 0, iLangid, *pRowid);
}
if( rc==SQLITE_OK ){
assert( p->iPrevDocid==*pRowid );
@@ -148637,6 +151577,7 @@ SQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *p){
******************************************************************************
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <string.h> */
@@ -148653,6 +151594,7 @@ SQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *p){
#define FTS3_MATCHINFO_LCS 's' /* nCol values */
#define FTS3_MATCHINFO_HITS 'x' /* 3*nCol*nPhrase values */
#define FTS3_MATCHINFO_LHITS 'y' /* nCol*nPhrase values */
+#define FTS3_MATCHINFO_LHITS_BM 'b' /* nCol*nPhrase values */
/*
** The default value for the second argument to matchinfo().
@@ -148714,9 +151656,22 @@ struct MatchInfo {
int nCol; /* Number of columns in table */
int nPhrase; /* Number of matchable phrases in query */
sqlite3_int64 nDoc; /* Number of docs in database */
+ char flag;
u32 *aMatchinfo; /* Pre-allocated buffer */
};
+/*
+** An instance of this structure is used to manage a pair of buffers, each
+** (nElem * sizeof(u32)) bytes in size. See the MatchinfoBuffer code below
+** for details.
+*/
+struct MatchinfoBuffer {
+ u8 aRef[3];
+ int nElem;
+ int bGlobal; /* Set if global data is loaded */
+ char *zMatchinfo;
+ u32 aMatchinfo[1];
+};
/*
@@ -148732,6 +151687,97 @@ struct StrBuffer {
};
+/*************************************************************************
+** Start of MatchinfoBuffer code.
+*/
+
+/*
+** Allocate a two-slot MatchinfoBuffer object.
+*/
+static MatchinfoBuffer *fts3MIBufferNew(int nElem, const char *zMatchinfo){
+ MatchinfoBuffer *pRet;
+ int nByte = sizeof(u32) * (2*nElem + 1) + sizeof(MatchinfoBuffer);
+ int nStr = (int)strlen(zMatchinfo);
+
+ pRet = sqlite3_malloc(nByte + nStr+1);
+ if( pRet ){
+ memset(pRet, 0, nByte);
+ pRet->aMatchinfo[0] = (u8*)(&pRet->aMatchinfo[1]) - (u8*)pRet;
+ pRet->aMatchinfo[1+nElem] = pRet->aMatchinfo[0] + sizeof(u32)*(nElem+1);
+ pRet->nElem = nElem;
+ pRet->zMatchinfo = ((char*)pRet) + nByte;
+ memcpy(pRet->zMatchinfo, zMatchinfo, nStr+1);
+ pRet->aRef[0] = 1;
+ }
+
+ return pRet;
+}
+
+static void fts3MIBufferFree(void *p){
+ MatchinfoBuffer *pBuf = (MatchinfoBuffer*)((u8*)p - ((u32*)p)[-1]);
+
+ assert( (u32*)p==&pBuf->aMatchinfo[1]
+ || (u32*)p==&pBuf->aMatchinfo[pBuf->nElem+2]
+ );
+ if( (u32*)p==&pBuf->aMatchinfo[1] ){
+ pBuf->aRef[1] = 0;
+ }else{
+ pBuf->aRef[2] = 0;
+ }
+
+ if( pBuf->aRef[0]==0 && pBuf->aRef[1]==0 && pBuf->aRef[2]==0 ){
+ sqlite3_free(pBuf);
+ }
+}
+
+static void (*fts3MIBufferAlloc(MatchinfoBuffer *p, u32 **paOut))(void*){
+ void (*xRet)(void*) = 0;
+ u32 *aOut = 0;
+
+ if( p->aRef[1]==0 ){
+ p->aRef[1] = 1;
+ aOut = &p->aMatchinfo[1];
+ xRet = fts3MIBufferFree;
+ }
+ else if( p->aRef[2]==0 ){
+ p->aRef[2] = 1;
+ aOut = &p->aMatchinfo[p->nElem+2];
+ xRet = fts3MIBufferFree;
+ }else{
+ aOut = (u32*)sqlite3_malloc(p->nElem * sizeof(u32));
+ if( aOut ){
+ xRet = sqlite3_free;
+ if( p->bGlobal ) memcpy(aOut, &p->aMatchinfo[1], p->nElem*sizeof(u32));
+ }
+ }
+
+ *paOut = aOut;
+ return xRet;
+}
+
+static void fts3MIBufferSetGlobal(MatchinfoBuffer *p){
+ p->bGlobal = 1;
+ memcpy(&p->aMatchinfo[2+p->nElem], &p->aMatchinfo[1], p->nElem*sizeof(u32));
+}
+
+/*
+** Free a MatchinfoBuffer object allocated using fts3MIBufferNew()
+*/
+SQLITE_PRIVATE void sqlite3Fts3MIBufferFree(MatchinfoBuffer *p){
+ if( p ){
+ assert( p->aRef[0]==1 );
+ p->aRef[0] = 0;
+ if( p->aRef[0]==0 && p->aRef[1]==0 && p->aRef[2]==0 ){
+ sqlite3_free(p);
+ }
+ }
+}
+
+/*
+** End of MatchinfoBuffer code.
+*************************************************************************/
+
+
/*
** This function is used to help iterate through a position-list. A position
** list is a list of unique integers, sorted from smallest to largest. Each
@@ -148768,7 +151814,7 @@ static int fts3ExprIterate2(
void *pCtx /* Second argument to pass to callback */
){
int rc; /* Return code */
- int eType = pExpr->eType; /* Type of expression node pExpr */
+ int eType = pExpr->eType; /* Type of expression node pExpr */
if( eType!=FTSQUERY_PHRASE ){
assert( pExpr->pLeft && pExpr->pRight );
@@ -148802,6 +151848,7 @@ static int fts3ExprIterate(
return fts3ExprIterate2(pExpr, &iPhrase, x, pCtx);
}
+
/*
** This is an fts3ExprIterate() callback used while loading the doclists
** for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also
@@ -148846,8 +151893,7 @@ static int fts3ExprLoadDoclists(
static int fts3ExprPhraseCountCb(Fts3Expr *pExpr, int iPhrase, void *ctx){
(*(int *)ctx)++;
- UNUSED_PARAMETER(pExpr);
- UNUSED_PARAMETER(iPhrase);
+ pExpr->iPhrase = iPhrase;
return SQLITE_OK;
}
static int fts3ExprPhraseCount(Fts3Expr *pExpr){
@@ -149068,7 +152114,7 @@ static int fts3BestSnippet(
sIter.nSnippet = nSnippet;
sIter.nPhrase = nList;
sIter.iCurrent = -1;
- rc = fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sIter);
+ rc = fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void*)&sIter);
if( rc==SQLITE_OK ){
/* Set the *pmSeen output variable. */
@@ -149370,6 +152416,60 @@ static int fts3ColumnlistCount(char **ppCollist){
}
/*
+** This function gathers 'y' or 'b' data for a single phrase.
+*/
+static void fts3ExprLHits(
+ Fts3Expr *pExpr, /* Phrase expression node */
+ MatchInfo *p /* Matchinfo context */
+){
+ Fts3Table *pTab = (Fts3Table *)p->pCursor->base.pVtab;
+ int iStart;
+ Fts3Phrase *pPhrase = pExpr->pPhrase;
+ char *pIter = pPhrase->doclist.pList;
+ int iCol = 0;
+
+ assert( p->flag==FTS3_MATCHINFO_LHITS_BM || p->flag==FTS3_MATCHINFO_LHITS );
+ if( p->flag==FTS3_MATCHINFO_LHITS ){
+ iStart = pExpr->iPhrase * p->nCol;
+ }else{
+ iStart = pExpr->iPhrase * ((p->nCol + 31) / 32);
+ }
+
+ while( 1 ){
+ int nHit = fts3ColumnlistCount(&pIter);
+ if( (pPhrase->iColumn>=pTab->nColumn || pPhrase->iColumn==iCol) ){
+ if( p->flag==FTS3_MATCHINFO_LHITS ){
+ p->aMatchinfo[iStart + iCol] = (u32)nHit;
+ }else if( nHit ){
+ p->aMatchinfo[iStart + (iCol+1)/32] |= (1 << (iCol&0x1F));
+ }
+ }
+ assert( *pIter==0x00 || *pIter==0x01 );
+ if( *pIter!=0x01 ) break;
+ pIter++;
+ pIter += fts3GetVarint32(pIter, &iCol);
+ }
+}
+
+/*
+** Gather the results for matchinfo directives 'y' and 'b'.
+*/
+static void fts3ExprLHitGather(
+ Fts3Expr *pExpr,
+ MatchInfo *p
+){
+ assert( (pExpr->pLeft==0)==(pExpr->pRight==0) );
+ if( pExpr->bEof==0 && pExpr->iDocid==p->pCursor->iPrevId ){
+ if( pExpr->pLeft ){
+ fts3ExprLHitGather(pExpr->pLeft, p);
+ fts3ExprLHitGather(pExpr->pRight, p);
+ }else{
+ fts3ExprLHits(pExpr, p);
+ }
+ }
+}
+
+/*
** fts3ExprIterate() callback used to collect the "global" matchinfo stats
** for a single query.
**
@@ -149435,51 +152535,6 @@ static int fts3ExprLocalHitsCb(
return rc;
}
-/*
-** fts3ExprIterate() callback used to gather information for the matchinfo
-** directive 'y'.
-*/
-static int fts3ExprLHitsCb(
- Fts3Expr *pExpr, /* Phrase expression node */
- int iPhrase, /* Phrase number */
- void *pCtx /* Pointer to MatchInfo structure */
-){
- MatchInfo *p = (MatchInfo *)pCtx;
- Fts3Table *pTab = (Fts3Table *)p->pCursor->base.pVtab;
- int rc = SQLITE_OK;
- int iStart = iPhrase * p->nCol;
- Fts3Expr *pEof; /* Ancestor node already at EOF */
-
- /* This must be a phrase */
- assert( pExpr->pPhrase );
-
- /* Initialize all output integers to zero. */
- memset(&p->aMatchinfo[iStart], 0, sizeof(u32) * p->nCol);
-
- /* Check if this or any parent node is at EOF. If so, then all output
- ** values are zero. */
- for(pEof=pExpr; pEof && pEof->bEof==0; pEof=pEof->pParent);
-
- if( pEof==0 && pExpr->iDocid==p->pCursor->iPrevId ){
- Fts3Phrase *pPhrase = pExpr->pPhrase;
- char *pIter = pPhrase->doclist.pList;
- int iCol = 0;
-
- while( 1 ){
- int nHit = fts3ColumnlistCount(&pIter);
- if( (pPhrase->iColumn>=pTab->nColumn || pPhrase->iColumn==iCol) ){
- p->aMatchinfo[iStart + iCol] = (u32)nHit;
- }
- assert( *pIter==0x00 || *pIter==0x01 );
- if( *pIter!=0x01 ) break;
- pIter++;
- pIter += fts3GetVarint32(pIter, &iCol);
- }
- }
-
- return rc;
-}
-
static int fts3MatchinfoCheck(
Fts3Table *pTab,
char cArg,
@@ -149493,6 +152548,7 @@ static int fts3MatchinfoCheck(
|| (cArg==FTS3_MATCHINFO_LCS)
|| (cArg==FTS3_MATCHINFO_HITS)
|| (cArg==FTS3_MATCHINFO_LHITS)
+ || (cArg==FTS3_MATCHINFO_LHITS_BM)
){
return SQLITE_OK;
}
@@ -149520,6 +152576,10 @@ static int fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
nVal = pInfo->nCol * pInfo->nPhrase;
break;
+ case FTS3_MATCHINFO_LHITS_BM:
+ nVal = pInfo->nPhrase * ((pInfo->nCol + 31) / 32);
+ break;
+
default:
assert( cArg==FTS3_MATCHINFO_HITS );
nVal = pInfo->nCol * pInfo->nPhrase * 3;
@@ -149714,7 +152774,7 @@ static int fts3MatchinfoValues(
sqlite3_stmt *pSelect = 0;
for(i=0; rc==SQLITE_OK && zArg[i]; i++){
-
+ pInfo->flag = zArg[i];
switch( zArg[i] ){
case FTS3_MATCHINFO_NPHRASE:
if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nPhrase;
@@ -149774,9 +152834,13 @@ static int fts3MatchinfoValues(
}
break;
- case FTS3_MATCHINFO_LHITS:
- (void)fts3ExprIterate(pCsr->pExpr, fts3ExprLHitsCb, (void*)pInfo);
+ case FTS3_MATCHINFO_LHITS_BM:
+ case FTS3_MATCHINFO_LHITS: {
+ int nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
+ memset(pInfo->aMatchinfo, 0, nZero);
+ fts3ExprLHitGather(pCsr->pExpr, pInfo);
break;
+ }
default: {
Fts3Expr *pExpr;
@@ -149790,6 +152854,7 @@ static int fts3MatchinfoValues(
if( rc!=SQLITE_OK ) break;
}
rc = fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo);
+ sqlite3Fts3EvalTestDeferred(pCsr, &rc);
if( rc!=SQLITE_OK ) break;
}
(void)fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo);
@@ -149809,7 +152874,8 @@ static int fts3MatchinfoValues(
** Populate pCsr->aMatchinfo[] with data for the current row. The
** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32).
*/
-static int fts3GetMatchinfo(
+static void fts3GetMatchinfo(
+ sqlite3_context *pCtx, /* Return results here */
Fts3Cursor *pCsr, /* FTS3 Cursor object */
const char *zArg /* Second argument to matchinfo() function */
){
@@ -149818,6 +152884,9 @@ static int fts3GetMatchinfo(
int rc = SQLITE_OK;
int bGlobal = 0; /* Collect 'global' stats as well as local */
+ u32 *aOut = 0;
+ void (*xDestroyOut)(void*) = 0;
+
memset(&sInfo, 0, sizeof(MatchInfo));
sInfo.pCursor = pCsr;
sInfo.nCol = pTab->nColumn;
@@ -149825,21 +152894,18 @@ static int fts3GetMatchinfo(
/* If there is cached matchinfo() data, but the format string for the
** cache does not match the format string for this request, discard
** the cached data. */
- if( pCsr->zMatchinfo && strcmp(pCsr->zMatchinfo, zArg) ){
- assert( pCsr->aMatchinfo );
- sqlite3_free(pCsr->aMatchinfo);
- pCsr->zMatchinfo = 0;
- pCsr->aMatchinfo = 0;
+ if( pCsr->pMIBuffer && strcmp(pCsr->pMIBuffer->zMatchinfo, zArg) ){
+ sqlite3Fts3MIBufferFree(pCsr->pMIBuffer);
+ pCsr->pMIBuffer = 0;
}
- /* If Fts3Cursor.aMatchinfo[] is NULL, then this is the first time the
+ /* If Fts3Cursor.pMIBuffer is NULL, then this is the first time the
** matchinfo function has been called for this query. In this case
** allocate the array used to accumulate the matchinfo data and
** initialize those elements that are constant for every row.
*/
- if( pCsr->aMatchinfo==0 ){
+ if( pCsr->pMIBuffer==0 ){
int nMatchinfo = 0; /* Number of u32 elements in match-info */
- int nArg; /* Bytes in zArg */
int i; /* Used to iterate through zArg */
/* Determine the number of phrases in the query */
@@ -149848,30 +152914,46 @@ static int fts3GetMatchinfo(
/* Determine the number of integers in the buffer returned by this call. */
for(i=0; zArg[i]; i++){
+ char *zErr = 0;
+ if( fts3MatchinfoCheck(pTab, zArg[i], &zErr) ){
+ sqlite3_result_error(pCtx, zErr, -1);
+ sqlite3_free(zErr);
+ return;
+ }
nMatchinfo += fts3MatchinfoSize(&sInfo, zArg[i]);
}
/* Allocate space for Fts3Cursor.aMatchinfo[] and Fts3Cursor.zMatchinfo. */
- nArg = (int)strlen(zArg);
- pCsr->aMatchinfo = (u32 *)sqlite3_malloc(sizeof(u32)*nMatchinfo + nArg + 1);
- if( !pCsr->aMatchinfo ) return SQLITE_NOMEM;
-
- pCsr->zMatchinfo = (char *)&pCsr->aMatchinfo[nMatchinfo];
- pCsr->nMatchinfo = nMatchinfo;
- memcpy(pCsr->zMatchinfo, zArg, nArg+1);
- memset(pCsr->aMatchinfo, 0, sizeof(u32)*nMatchinfo);
+ pCsr->pMIBuffer = fts3MIBufferNew(nMatchinfo, zArg);
+ if( !pCsr->pMIBuffer ) rc = SQLITE_NOMEM;
+
pCsr->isMatchinfoNeeded = 1;
bGlobal = 1;
}
- sInfo.aMatchinfo = pCsr->aMatchinfo;
- sInfo.nPhrase = pCsr->nPhrase;
- if( pCsr->isMatchinfoNeeded ){
+ if( rc==SQLITE_OK ){
+ xDestroyOut = fts3MIBufferAlloc(pCsr->pMIBuffer, &aOut);
+ if( xDestroyOut==0 ){
+ rc = SQLITE_NOMEM;
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ sInfo.aMatchinfo = aOut;
+ sInfo.nPhrase = pCsr->nPhrase;
rc = fts3MatchinfoValues(pCsr, bGlobal, &sInfo, zArg);
- pCsr->isMatchinfoNeeded = 0;
+ if( bGlobal ){
+ fts3MIBufferSetGlobal(pCsr->pMIBuffer);
+ }
}
- return rc;
+ if( rc!=SQLITE_OK ){
+ sqlite3_result_error_code(pCtx, rc);
+ if( xDestroyOut ) xDestroyOut(aOut);
+ }else{
+ int n = pCsr->pMIBuffer->nElem * sizeof(u32);
+ sqlite3_result_blob(pCtx, aOut, n, xDestroyOut);
+ }
}
/*
@@ -150077,7 +153159,7 @@ SQLITE_PRIVATE void sqlite3Fts3Offsets(
*/
sCtx.iCol = iCol;
sCtx.iTerm = 0;
- (void)fts3ExprIterate(pCsr->pExpr, fts3ExprTermOffsetInit, (void *)&sCtx);
+ (void)fts3ExprIterate(pCsr->pExpr, fts3ExprTermOffsetInit, (void*)&sCtx);
/* Retreive the text stored in column iCol. If an SQL NULL is stored
** in column iCol, jump immediately to the next iteration of the loop.
@@ -150169,19 +153251,9 @@ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(
const char *zArg /* Second arg to matchinfo() function */
){
Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
- int rc;
- int i;
const char *zFormat;
if( zArg ){
- for(i=0; zArg[i]; i++){
- char *zErr = 0;
- if( fts3MatchinfoCheck(pTab, zArg[i], &zErr) ){
- sqlite3_result_error(pContext, zErr, -1);
- sqlite3_free(zErr);
- return;
- }
- }
zFormat = zArg;
}else{
zFormat = FTS3_MATCHINFO_DEFAULT;
@@ -150190,17 +153262,10 @@ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(
if( !pCsr->pExpr ){
sqlite3_result_blob(pContext, "", 0, SQLITE_STATIC);
return;
- }
-
- /* Retrieve matchinfo() data. */
- rc = fts3GetMatchinfo(pCsr, zFormat);
- sqlite3Fts3SegmentsClose(pTab);
-
- if( rc!=SQLITE_OK ){
- sqlite3_result_error_code(pContext, rc);
}else{
- int n = pCsr->nMatchinfo * sizeof(u32);
- sqlite3_result_blob(pContext, pCsr->aMatchinfo, n, SQLITE_TRANSIENT);
+ /* Retrieve matchinfo() data. */
+ fts3GetMatchinfo(pContext, pCsr, zFormat);
+ sqlite3Fts3SegmentsClose(pTab);
}
}
@@ -150225,6 +153290,7 @@ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(
#ifndef SQLITE_DISABLE_FTS3_UNICODE
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
/* #include <assert.h> */
@@ -150232,6 +153298,7 @@ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(
/* #include <stdio.h> */
/* #include <string.h> */
+/* #include "fts3_tokenizer.h" */
/*
** The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied
@@ -151027,8 +154094,10 @@ SQLITE_PRIVATE int sqlite3FtsUnicodeFold(int c, int bRemoveDiacritic){
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
#ifndef SQLITE_CORE
+/* #include "sqlite3ext.h" */
SQLITE_EXTENSION_INIT1
#else
+/* #include "sqlite3.h" */
#endif
/* #include <string.h> */
@@ -151321,6 +154390,7 @@ struct RtreeMatchArg {
u32 magic; /* Always RTREE_GEOMETRY_MAGIC */
RtreeGeomCallback cb; /* Info about the callback functions */
int nParam; /* Number of parameters to the SQL function */
+ sqlite3_value **apSqlParam; /* Original SQL parameter values */
RtreeDValue aParam[1]; /* Values for parameters to the SQL function */
};
@@ -152452,9 +155522,7 @@ static int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){
/* Check that the blob is roughly the right size. */
nBlob = sqlite3_value_bytes(pValue);
- if( nBlob<(int)sizeof(RtreeMatchArg)
- || ((nBlob-sizeof(RtreeMatchArg))%sizeof(RtreeDValue))!=0
- ){
+ if( nBlob<(int)sizeof(RtreeMatchArg) ){
return SQLITE_ERROR;
}
@@ -152465,6 +155533,7 @@ static int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){
memcpy(pBlob, sqlite3_value_blob(pValue), nBlob);
nExpected = (int)(sizeof(RtreeMatchArg) +
+ pBlob->nParam*sizeof(sqlite3_value*) +
(pBlob->nParam-1)*sizeof(RtreeDValue));
if( pBlob->magic!=RTREE_GEOMETRY_MAGIC || nBlob!=nExpected ){
sqlite3_free(pInfo);
@@ -152473,6 +155542,7 @@ static int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){
pInfo->pContext = pBlob->cb.pContext;
pInfo->nParam = pBlob->nParam;
pInfo->aParam = pBlob->aParam;
+ pInfo->apSqlParam = pBlob->apSqlParam;
if( pBlob->cb.xGeom ){
pCons->u.xGeom = pBlob->cb.xGeom;
@@ -152511,7 +155581,7 @@ static int rtreeFilter(
if( idxNum==1 ){
/* Special case - lookup by rowid. */
RtreeNode *pLeaf; /* Leaf on which the required cell resides */
- RtreeSearchPoint *p; /* Search point for the leaf */
+ RtreeSearchPoint *p; /* Search point for the the leaf */
i64 iRowid = sqlite3_value_int64(argv[0]);
i64 iNode = 0;
rc = findLeafNode(pRtree, iRowid, &pLeaf, &iNode);
@@ -152639,17 +155709,30 @@ static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
Rtree *pRtree = (Rtree*)tab;
int rc = SQLITE_OK;
int ii;
+ int bMatch = 0; /* True if there exists a MATCH constraint */
i64 nRow; /* Estimated rows returned by this scan */
int iIdx = 0;
char zIdxStr[RTREE_MAX_DIMENSIONS*8+1];
memset(zIdxStr, 0, sizeof(zIdxStr));
+ /* Check if there exists a MATCH constraint - even an unusable one. If there
+ ** is, do not consider the lookup-by-rowid plan as using such a plan would
+ ** require the VDBE to evaluate the MATCH constraint, which is not currently
+ ** possible. */
+ for(ii=0; ii<pIdxInfo->nConstraint; ii++){
+ if( pIdxInfo->aConstraint[ii].op==SQLITE_INDEX_CONSTRAINT_MATCH ){
+ bMatch = 1;
+ }
+ }
+
assert( pIdxInfo->idxStr==0 );
for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){
struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
- if( p->usable && p->iColumn==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ ){
+ if( bMatch==0 && p->usable
+ && p->iColumn==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ
+ ){
/* We have an equality constraint on the rowid. Use strategy 1. */
int jj;
for(jj=0; jj<ii; jj++){
@@ -154343,6 +157426,18 @@ static void rtreeFreeCallback(void *p){
}
/*
+** This routine frees the BLOB that is returned by geomCallback().
+*/
+static void rtreeMatchArgFree(void *pArg){
+ int i;
+ RtreeMatchArg *p = (RtreeMatchArg*)pArg;
+ for(i=0; i<p->nParam; i++){
+ sqlite3_value_free(p->apSqlParam[i]);
+ }
+ sqlite3_free(p);
+}
+
+/*
** Each call to sqlite3_rtree_geometry_callback() or
** sqlite3_rtree_query_callback() creates an ordinary SQLite
** scalar function that is implemented by this routine.
@@ -154360,8 +157455,10 @@ static void geomCallback(sqlite3_context *ctx, int nArg, sqlite3_value **aArg){
RtreeGeomCallback *pGeomCtx = (RtreeGeomCallback *)sqlite3_user_data(ctx);
RtreeMatchArg *pBlob;
int nBlob;
+ int memErr = 0;
- nBlob = sizeof(RtreeMatchArg) + (nArg-1)*sizeof(RtreeDValue);
+ nBlob = sizeof(RtreeMatchArg) + (nArg-1)*sizeof(RtreeDValue)
+ + nArg*sizeof(sqlite3_value*);
pBlob = (RtreeMatchArg *)sqlite3_malloc(nBlob);
if( !pBlob ){
sqlite3_result_error_nomem(ctx);
@@ -154369,15 +157466,23 @@ static void geomCallback(sqlite3_context *ctx, int nArg, sqlite3_value **aArg){
int i;
pBlob->magic = RTREE_GEOMETRY_MAGIC;
pBlob->cb = pGeomCtx[0];
+ pBlob->apSqlParam = (sqlite3_value**)&pBlob->aParam[nArg];
pBlob->nParam = nArg;
for(i=0; i<nArg; i++){
+ pBlob->apSqlParam[i] = sqlite3_value_dup(aArg[i]);
+ if( pBlob->apSqlParam[i]==0 ) memErr = 1;
#ifdef SQLITE_RTREE_INT_ONLY
pBlob->aParam[i] = sqlite3_value_int64(aArg[i]);
#else
pBlob->aParam[i] = sqlite3_value_double(aArg[i]);
#endif
}
- sqlite3_result_blob(ctx, pBlob, nBlob, sqlite3_free);
+ if( memErr ){
+ sqlite3_result_error_nomem(ctx);
+ rtreeMatchArgFree(pBlob);
+ }else{
+ sqlite3_result_blob(ctx, pBlob, nBlob, rtreeMatchArgFree);
+ }
}
}
@@ -154488,8 +157593,10 @@ SQLITE_API int SQLITE_STDCALL sqlite3_rtree_init(
/* #include <assert.h> */
#ifndef SQLITE_CORE
+/* #include "sqlite3ext.h" */
SQLITE_EXTENSION_INIT1
#else
+/* #include "sqlite3.h" */
#endif
/*
@@ -154530,7 +157637,6 @@ static int icuLikeCompare(
/* Read (and consume) the next character from the input pattern. */
UChar32 uPattern;
U8_NEXT_UNSAFE(zPattern, iPattern, uPattern);
- assert(uPattern!=0);
/* There are now 4 possibilities:
**
@@ -154869,6 +157975,7 @@ static void icuLoadCollation(
int rc; /* Return code from sqlite3_create_collation_x() */
assert(nArg==2);
+ (void)nArg; /* Unused parameter */
zLocale = (const char *)sqlite3_value_text(apArg[0]);
zName = (const char *)sqlite3_value_text(apArg[1]);
@@ -154965,11 +158072,13 @@ SQLITE_API int SQLITE_STDCALL sqlite3_icu_init(
*************************************************************************
** This file implements a tokenizer for fts3 based on the ICU library.
*/
+/* #include "fts3Int.h" */
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
#ifdef SQLITE_ENABLE_ICU
/* #include <assert.h> */
/* #include <string.h> */
+/* #include "fts3_tokenizer.h" */
#include <unicode/ubrk.h>
/* #include <unicode/ucol.h> */
@@ -155192,12 +158301,13 @@ static int icuNext(
** The set of routines that implement the simple tokenizer
*/
static const sqlite3_tokenizer_module icuTokenizerModule = {
- 0, /* iVersion */
- icuCreate, /* xCreate */
- icuDestroy, /* xCreate */
- icuOpen, /* xOpen */
- icuClose, /* xClose */
- icuNext, /* xNext */
+ 0, /* iVersion */
+ icuCreate, /* xCreate */
+ icuDestroy, /* xCreate */
+ icuOpen, /* xOpen */
+ icuClose, /* xClose */
+ icuNext, /* xNext */
+ 0, /* xLanguageid */
};
/*
@@ -155213,6 +158323,4530 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
/************** End of fts3_icu.c ********************************************/
+/************** Begin file sqlite3rbu.c **************************************/
+/*
+** 2014 August 30
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+**
+** OVERVIEW
+**
+** The RBU extension requires that the RBU update be packaged as an
+** SQLite database. The tables it expects to find are described in
+** sqlite3rbu.h. Essentially, for each table xyz in the target database
+** that the user wishes to write to, a corresponding data_xyz table is
+** created in the RBU database and populated with one row for each row to
+** update, insert or delete from the target table.
+**
+** The update proceeds in three stages:
+**
+** 1) The database is updated. The modified database pages are written
+** to a *-oal file. A *-oal file is just like a *-wal file, except
+** that it is named "<database>-oal" instead of "<database>-wal".
+** Because regular SQLite clients do not look for file named
+** "<database>-oal", they go on using the original database in
+** rollback mode while the *-oal file is being generated.
+**
+** During this stage RBU does not update the database by writing
+** directly to the target tables. Instead it creates "imposter"
+** tables using the SQLITE_TESTCTRL_IMPOSTER interface that it uses
+** to update each b-tree individually. All updates required by each
+** b-tree are completed before moving on to the next, and all
+** updates are done in sorted key order.
+**
+** 2) The "<database>-oal" file is moved to the equivalent "<database>-wal"
+** location using a call to rename(2). Before doing this the RBU
+** module takes an EXCLUSIVE lock on the database file, ensuring
+** that there are no other active readers.
+**
+** Once the EXCLUSIVE lock is released, any other database readers
+** detect the new *-wal file and read the database in wal mode. At
+** this point they see the new version of the database - including
+** the updates made as part of the RBU update.
+**
+** 3) The new *-wal file is checkpointed. This proceeds in the same way
+** as a regular database checkpoint, except that a single frame is
+** checkpointed each time sqlite3rbu_step() is called. If the RBU
+** handle is closed before the entire *-wal file is checkpointed,
+** the checkpoint progress is saved in the RBU database and the
+** checkpoint can be resumed by another RBU client at some point in
+** the future.
+**
+** POTENTIAL PROBLEMS
+**
+** The rename() call might not be portable. And RBU is not currently
+** syncing the directory after renaming the file.
+**
+** When state is saved, any commit to the *-oal file and the commit to
+** the RBU update database are not atomic. So if the power fails at the
+** wrong moment they might get out of sync. As the main database will be
+** committed before the RBU update database this will likely either just
+** pass unnoticed, or result in SQLITE_CONSTRAINT errors (due to UNIQUE
+** constraint violations).
+**
+** If some client does modify the target database mid RBU update, or some
+** other error occurs, the RBU extension will keep throwing errors. It's
+** not really clear how to get out of this state. The system could just
+** by delete the RBU update database and *-oal file and have the device
+** download the update again and start over.
+**
+** At present, for an UPDATE, both the new.* and old.* records are
+** collected in the rbu_xyz table. And for both UPDATEs and DELETEs all
+** fields are collected. This means we're probably writing a lot more
+** data to disk when saving the state of an ongoing update to the RBU
+** update database than is strictly necessary.
+**
+*/
+
+/* #include <assert.h> */
+/* #include <string.h> */
+/* #include <stdio.h> */
+
+/* #include "sqlite3.h" */
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU)
+/************** Include sqlite3rbu.h in the middle of sqlite3rbu.c ***********/
+/************** Begin file sqlite3rbu.h **************************************/
+/*
+** 2014 August 30
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains the public interface for the RBU extension.
+*/
+
+/*
+** SUMMARY
+**
+** Writing a transaction containing a large number of operations on
+** b-tree indexes that are collectively larger than the available cache
+** memory can be very inefficient.
+**
+** The problem is that in order to update a b-tree, the leaf page (at least)
+** containing the entry being inserted or deleted must be modified. If the
+** working set of leaves is larger than the available cache memory, then a
+** single leaf that is modified more than once as part of the transaction
+** may be loaded from or written to the persistent media multiple times.
+** Additionally, because the index updates are likely to be applied in
+** random order, access to pages within the database is also likely to be in
+** random order, which is itself quite inefficient.
+**
+** One way to improve the situation is to sort the operations on each index
+** by index key before applying them to the b-tree. This leads to an IO
+** pattern that resembles a single linear scan through the index b-tree,
+** and all but guarantees each modified leaf page is loaded and stored
+** exactly once. SQLite uses this trick to improve the performance of
+** CREATE INDEX commands. This extension allows it to be used to improve
+** the performance of large transactions on existing databases.
+**
+** Additionally, this extension allows the work involved in writing the
+** large transaction to be broken down into sub-transactions performed
+** sequentially by separate processes. This is useful if the system cannot
+** guarantee that a single update process will run for long enough to apply
+** the entire update, for example because the update is being applied on a
+** mobile device that is frequently rebooted. Even after the writer process
+** has committed one or more sub-transactions, other database clients continue
+** to read from the original database snapshot. In other words, partially
+** applied transactions are not visible to other clients.
+**
+** "RBU" stands for "Resumable Bulk Update". As in a large database update
+** transmitted via a wireless network to a mobile device. A transaction
+** applied using this extension is hence refered to as an "RBU update".
+**
+**
+** LIMITATIONS
+**
+** An "RBU update" transaction is subject to the following limitations:
+**
+** * The transaction must consist of INSERT, UPDATE and DELETE operations
+** only.
+**
+** * INSERT statements may not use any default values.
+**
+** * UPDATE and DELETE statements must identify their target rows by
+** non-NULL PRIMARY KEY values. Rows with NULL values stored in PRIMARY
+** KEY fields may not be updated or deleted. If the table being written
+** has no PRIMARY KEY, affected rows must be identified by rowid.
+**
+** * UPDATE statements may not modify PRIMARY KEY columns.
+**
+** * No triggers will be fired.
+**
+** * No foreign key violations are detected or reported.
+**
+** * CHECK constraints are not enforced.
+**
+** * No constraint handling mode except for "OR ROLLBACK" is supported.
+**
+**
+** PREPARATION
+**
+** An "RBU update" is stored as a separate SQLite database. A database
+** containing an RBU update is an "RBU database". For each table in the
+** target database to be updated, the RBU database should contain a table
+** named "data_<target name>" containing the same set of columns as the
+** target table, and one more - "rbu_control". The data_% table should
+** have no PRIMARY KEY or UNIQUE constraints, but each column should have
+** the same type as the corresponding column in the target database.
+** The "rbu_control" column should have no type at all. For example, if
+** the target database contains:
+**
+** CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c UNIQUE);
+**
+** Then the RBU database should contain:
+**
+** CREATE TABLE data_t1(a INTEGER, b TEXT, c, rbu_control);
+**
+** The order of the columns in the data_% table does not matter.
+**
+** Instead of a regular table, the RBU database may also contain virtual
+** tables or view named using the data_<target> naming scheme.
+**
+** Instead of the plain data_<target> naming scheme, RBU database tables
+** may also be named data<integer>_<target>, where <integer> is any sequence
+** of zero or more numeric characters (0-9). This can be significant because
+** tables within the RBU database are always processed in order sorted by
+** name. By judicious selection of the the <integer> portion of the names
+** of the RBU tables the user can therefore control the order in which they
+** are processed. This can be useful, for example, to ensure that "external
+** content" FTS4 tables are updated before their underlying content tables.
+**
+** If the target database table is a virtual table or a table that has no
+** PRIMARY KEY declaration, the data_% table must also contain a column
+** named "rbu_rowid". This column is mapped to the tables implicit primary
+** key column - "rowid". Virtual tables for which the "rowid" column does
+** not function like a primary key value cannot be updated using RBU. For
+** example, if the target db contains either of the following:
+**
+** CREATE VIRTUAL TABLE x1 USING fts3(a, b);
+** CREATE TABLE x1(a, b)
+**
+** then the RBU database should contain:
+**
+** CREATE TABLE data_x1(a, b, rbu_rowid, rbu_control);
+**
+** All non-hidden columns (i.e. all columns matched by "SELECT *") of the
+** target table must be present in the input table. For virtual tables,
+** hidden columns are optional - they are updated by RBU if present in
+** the input table, or not otherwise. For example, to write to an fts4
+** table with a hidden languageid column such as:
+**
+** CREATE VIRTUAL TABLE ft1 USING fts4(a, b, languageid='langid');
+**
+** Either of the following input table schemas may be used:
+**
+** CREATE TABLE data_ft1(a, b, langid, rbu_rowid, rbu_control);
+** CREATE TABLE data_ft1(a, b, rbu_rowid, rbu_control);
+**
+** For each row to INSERT into the target database as part of the RBU
+** update, the corresponding data_% table should contain a single record
+** with the "rbu_control" column set to contain integer value 0. The
+** other columns should be set to the values that make up the new record
+** to insert.
+**
+** If the target database table has an INTEGER PRIMARY KEY, it is not
+** possible to insert a NULL value into the IPK column. Attempting to
+** do so results in an SQLITE_MISMATCH error.
+**
+** For each row to DELETE from the target database as part of the RBU
+** update, the corresponding data_% table should contain a single record
+** with the "rbu_control" column set to contain integer value 1. The
+** real primary key values of the row to delete should be stored in the
+** corresponding columns of the data_% table. The values stored in the
+** other columns are not used.
+**
+** For each row to UPDATE from the target database as part of the RBU
+** update, the corresponding data_% table should contain a single record
+** with the "rbu_control" column set to contain a value of type text.
+** The real primary key values identifying the row to update should be
+** stored in the corresponding columns of the data_% table row, as should
+** the new values of all columns being update. The text value in the
+** "rbu_control" column must contain the same number of characters as
+** there are columns in the target database table, and must consist entirely
+** of 'x' and '.' characters (or in some special cases 'd' - see below). For
+** each column that is being updated, the corresponding character is set to
+** 'x'. For those that remain as they are, the corresponding character of the
+** rbu_control value should be set to '.'. For example, given the tables
+** above, the update statement:
+**
+** UPDATE t1 SET c = 'usa' WHERE a = 4;
+**
+** is represented by the data_t1 row created by:
+**
+** INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x');
+**
+** Instead of an 'x' character, characters of the rbu_control value specified
+** for UPDATEs may also be set to 'd'. In this case, instead of updating the
+** target table with the value stored in the corresponding data_% column, the
+** user-defined SQL function "rbu_delta()" is invoked and the result stored in
+** the target table column. rbu_delta() is invoked with two arguments - the
+** original value currently stored in the target table column and the
+** value specified in the data_xxx table.
+**
+** For example, this row:
+**
+** INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d');
+**
+** is similar to an UPDATE statement such as:
+**
+** UPDATE t1 SET c = rbu_delta(c, 'usa') WHERE a = 4;
+**
+** Finally, if an 'f' character appears in place of a 'd' or 's' in an
+** ota_control string, the contents of the data_xxx table column is assumed
+** to be a "fossil delta" - a patch to be applied to a blob value in the
+** format used by the fossil source-code management system. In this case
+** the existing value within the target database table must be of type BLOB.
+** It is replaced by the result of applying the specified fossil delta to
+** itself.
+**
+** If the target database table is a virtual table or a table with no PRIMARY
+** KEY, the rbu_control value should not include a character corresponding
+** to the rbu_rowid value. For example, this:
+**
+** INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control)
+** VALUES(NULL, 'usa', 12, '.x');
+**
+** causes a result similar to:
+**
+** UPDATE ft1 SET b = 'usa' WHERE rowid = 12;
+**
+** The data_xxx tables themselves should have no PRIMARY KEY declarations.
+** However, RBU is more efficient if reading the rows in from each data_xxx
+** table in "rowid" order is roughly the same as reading them sorted by
+** the PRIMARY KEY of the corresponding target database table. In other
+** words, rows should be sorted using the destination table PRIMARY KEY
+** fields before they are inserted into the data_xxx tables.
+**
+** USAGE
+**
+** The API declared below allows an application to apply an RBU update
+** stored on disk to an existing target database. Essentially, the
+** application:
+**
+** 1) Opens an RBU handle using the sqlite3rbu_open() function.
+**
+** 2) Registers any required virtual table modules with the database
+** handle returned by sqlite3rbu_db(). Also, if required, register
+** the rbu_delta() implementation.
+**
+** 3) Calls the sqlite3rbu_step() function one or more times on
+** the new handle. Each call to sqlite3rbu_step() performs a single
+** b-tree operation, so thousands of calls may be required to apply
+** a complete update.
+**
+** 4) Calls sqlite3rbu_close() to close the RBU update handle. If
+** sqlite3rbu_step() has been called enough times to completely
+** apply the update to the target database, then the RBU database
+** is marked as fully applied. Otherwise, the state of the RBU
+** update application is saved in the RBU database for later
+** resumption.
+**
+** See comments below for more detail on APIs.
+**
+** If an update is only partially applied to the target database by the
+** time sqlite3rbu_close() is called, various state information is saved
+** within the RBU database. This allows subsequent processes to automatically
+** resume the RBU update from where it left off.
+**
+** To remove all RBU extension state information, returning an RBU database
+** to its original contents, it is sufficient to drop all tables that begin
+** with the prefix "rbu_"
+**
+** DATABASE LOCKING
+**
+** An RBU update may not be applied to a database in WAL mode. Attempting
+** to do so is an error (SQLITE_ERROR).
+**
+** While an RBU handle is open, a SHARED lock may be held on the target
+** database file. This means it is possible for other clients to read the
+** database, but not to write it.
+**
+** If an RBU update is started and then suspended before it is completed,
+** then an external client writes to the database, then attempting to resume
+** the suspended RBU update is also an error (SQLITE_BUSY).
+*/
+
+#ifndef _SQLITE3RBU_H
+#define _SQLITE3RBU_H
+
+/* #include "sqlite3.h" ** Required for error code definitions ** */
+
+#if 0
+extern "C" {
+#endif
+
+typedef struct sqlite3rbu sqlite3rbu;
+
+/*
+** Open an RBU handle.
+**
+** Argument zTarget is the path to the target database. Argument zRbu is
+** the path to the RBU database. Each call to this function must be matched
+** by a call to sqlite3rbu_close(). When opening the databases, RBU passes
+** the SQLITE_CONFIG_URI flag to sqlite3_open_v2(). So if either zTarget
+** or zRbu begin with "file:", it will be interpreted as an SQLite
+** database URI, not a regular file name.
+**
+** If the zState argument is passed a NULL value, the RBU extension stores
+** the current state of the update (how many rows have been updated, which
+** indexes are yet to be updated etc.) within the RBU database itself. This
+** can be convenient, as it means that the RBU application does not need to
+** organize removing a separate state file after the update is concluded.
+** Or, if zState is non-NULL, it must be a path to a database file in which
+** the RBU extension can store the state of the update.
+**
+** When resuming an RBU update, the zState argument must be passed the same
+** value as when the RBU update was started.
+**
+** Once the RBU update is finished, the RBU extension does not
+** automatically remove any zState database file, even if it created it.
+**
+** By default, RBU uses the default VFS to access the files on disk. To
+** use a VFS other than the default, an SQLite "file:" URI containing a
+** "vfs=..." option may be passed as the zTarget option.
+**
+** IMPORTANT NOTE FOR ZIPVFS USERS: The RBU extension works with all of
+** SQLite's built-in VFSs, including the multiplexor VFS. However it does
+** not work out of the box with zipvfs. Refer to the comment describing
+** the zipvfs_create_vfs() API below for details on using RBU with zipvfs.
+*/
+SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
+ const char *zTarget,
+ const char *zRbu,
+ const char *zState
+);
+
+/*
+** Internally, each RBU connection uses a separate SQLite database
+** connection to access the target and rbu update databases. This
+** API allows the application direct access to these database handles.
+**
+** The first argument passed to this function must be a valid, open, RBU
+** handle. The second argument should be passed zero to access the target
+** database handle, or non-zero to access the rbu update database handle.
+** Accessing the underlying database handles may be useful in the
+** following scenarios:
+**
+** * If any target tables are virtual tables, it may be necessary to
+** call sqlite3_create_module() on the target database handle to
+** register the required virtual table implementations.
+**
+** * If the data_xxx tables in the RBU source database are virtual
+** tables, the application may need to call sqlite3_create_module() on
+** the rbu update db handle to any required virtual table
+** implementations.
+**
+** * If the application uses the "rbu_delta()" feature described above,
+** it must use sqlite3_create_function() or similar to register the
+** rbu_delta() implementation with the target database handle.
+**
+** If an error has occurred, either while opening or stepping the RBU object,
+** this function may return NULL. The error code and message may be collected
+** when sqlite3rbu_close() is called.
+*/
+SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu*, int bRbu);
+
+/*
+** Do some work towards applying the RBU update to the target db.
+**
+** Return SQLITE_DONE if the update has been completely applied, or
+** SQLITE_OK if no error occurs but there remains work to do to apply
+** the RBU update. If an error does occur, some other error code is
+** returned.
+**
+** Once a call to sqlite3rbu_step() has returned a value other than
+** SQLITE_OK, all subsequent calls on the same RBU handle are no-ops
+** that immediately return the same value.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *pRbu);
+
+/*
+** Force RBU to save its state to disk.
+**
+** If a power failure or application crash occurs during an update, following
+** system recovery RBU may resume the update from the point at which the state
+** was last saved. In other words, from the most recent successful call to
+** sqlite3rbu_close() or this function.
+**
+** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *pRbu);
+
+/*
+** Close an RBU handle.
+**
+** If the RBU update has been completely applied, mark the RBU database
+** as fully applied. Otherwise, assuming no error has occurred, save the
+** current state of the RBU update appliation to the RBU database.
+**
+** If an error has already occurred as part of an sqlite3rbu_step()
+** or sqlite3rbu_open() call, or if one occurs within this function, an
+** SQLite error code is returned. Additionally, *pzErrmsg may be set to
+** point to a buffer containing a utf-8 formatted English language error
+** message. It is the responsibility of the caller to eventually free any
+** such buffer using sqlite3_free().
+**
+** Otherwise, if no error occurs, this function returns SQLITE_OK if the
+** update has been partially applied, or SQLITE_DONE if it has been
+** completely applied.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *pRbu, char **pzErrmsg);
+
+/*
+** Return the total number of key-value operations (inserts, deletes or
+** updates) that have been performed on the target database since the
+** current RBU update was started.
+*/
+SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu);
+
+/*
+** Create an RBU VFS named zName that accesses the underlying file-system
+** via existing VFS zParent. Or, if the zParent parameter is passed NULL,
+** then the new RBU VFS uses the default system VFS to access the file-system.
+** The new object is registered as a non-default VFS with SQLite before
+** returning.
+**
+** Part of the RBU implementation uses a custom VFS object. Usually, this
+** object is created and deleted automatically by RBU.
+**
+** The exception is for applications that also use zipvfs. In this case,
+** the custom VFS must be explicitly created by the user before the RBU
+** handle is opened. The RBU VFS should be installed so that the zipvfs
+** VFS uses the RBU VFS, which in turn uses any other VFS layers in use
+** (for example multiplexor) to access the file-system. For example,
+** to assemble an RBU enabled VFS stack that uses both zipvfs and
+** multiplexor (error checking omitted):
+**
+** // Create a VFS named "multiplex" (not the default).
+** sqlite3_multiplex_initialize(0, 0);
+**
+** // Create an rbu VFS named "rbu" that uses multiplexor. If the
+** // second argument were replaced with NULL, the "rbu" VFS would
+** // access the file-system via the system default VFS, bypassing the
+** // multiplexor.
+** sqlite3rbu_create_vfs("rbu", "multiplex");
+**
+** // Create a zipvfs VFS named "zipvfs" that uses rbu.
+** zipvfs_create_vfs_v3("zipvfs", "rbu", 0, xCompressorAlgorithmDetector);
+**
+** // Make zipvfs the default VFS.
+** sqlite3_vfs_register(sqlite3_vfs_find("zipvfs"), 1);
+**
+** Because the default VFS created above includes a RBU functionality, it
+** may be used by RBU clients. Attempting to use RBU with a zipvfs VFS stack
+** that does not include the RBU layer results in an error.
+**
+** The overhead of adding the "rbu" VFS to the system is negligible for
+** non-RBU users. There is no harm in an application accessing the
+** file-system via "rbu" all the time, even if it only uses RBU functionality
+** occasionally.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent);
+
+/*
+** Deregister and destroy an RBU vfs created by an earlier call to
+** sqlite3rbu_create_vfs().
+**
+** VFS objects are not reference counted. If a VFS object is destroyed
+** before all database handles that use it have been closed, the results
+** are undefined.
+*/
+SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName);
+
+#if 0
+} /* end of the 'extern "C"' block */
+#endif
+
+#endif /* _SQLITE3RBU_H */
+
+/************** End of sqlite3rbu.h ******************************************/
+/************** Continuing where we left off in sqlite3rbu.c *****************/
+
+#if defined(_WIN32_WCE)
+/* #include "windows.h" */
+#endif
+
+/* Maximum number of prepared UPDATE statements held by this module */
+#define SQLITE_RBU_UPDATE_CACHESIZE 16
+
+/*
+** Swap two objects of type TYPE.
+*/
+#if !defined(SQLITE_AMALGAMATION)
+# define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}
+#endif
+
+/*
+** The rbu_state table is used to save the state of a partially applied
+** update so that it can be resumed later. The table consists of integer
+** keys mapped to values as follows:
+**
+** RBU_STATE_STAGE:
+** May be set to integer values 1, 2, 4 or 5. As follows:
+** 1: the *-rbu file is currently under construction.
+** 2: the *-rbu file has been constructed, but not yet moved
+** to the *-wal path.
+** 4: the checkpoint is underway.
+** 5: the rbu update has been checkpointed.
+**
+** RBU_STATE_TBL:
+** Only valid if STAGE==1. The target database name of the table
+** currently being written.
+**
+** RBU_STATE_IDX:
+** Only valid if STAGE==1. The target database name of the index
+** currently being written, or NULL if the main table is currently being
+** updated.
+**
+** RBU_STATE_ROW:
+** Only valid if STAGE==1. Number of rows already processed for the current
+** table/index.
+**
+** RBU_STATE_PROGRESS:
+** Trbul number of sqlite3rbu_step() calls made so far as part of this
+** rbu update.
+**
+** RBU_STATE_CKPT:
+** Valid if STAGE==4. The 64-bit checksum associated with the wal-index
+** header created by recovering the *-wal file. This is used to detect
+** cases when another client appends frames to the *-wal file in the
+** middle of an incremental checkpoint (an incremental checkpoint cannot
+** be continued if this happens).
+**
+** RBU_STATE_COOKIE:
+** Valid if STAGE==1. The current change-counter cookie value in the
+** target db file.
+**
+** RBU_STATE_OALSZ:
+** Valid if STAGE==1. The size in bytes of the *-oal file.
+*/
+#define RBU_STATE_STAGE 1
+#define RBU_STATE_TBL 2
+#define RBU_STATE_IDX 3
+#define RBU_STATE_ROW 4
+#define RBU_STATE_PROGRESS 5
+#define RBU_STATE_CKPT 6
+#define RBU_STATE_COOKIE 7
+#define RBU_STATE_OALSZ 8
+
+#define RBU_STAGE_OAL 1
+#define RBU_STAGE_MOVE 2
+#define RBU_STAGE_CAPTURE 3
+#define RBU_STAGE_CKPT 4
+#define RBU_STAGE_DONE 5
+
+
+#define RBU_CREATE_STATE \
+ "CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)"
+
+typedef struct RbuFrame RbuFrame;
+typedef struct RbuObjIter RbuObjIter;
+typedef struct RbuState RbuState;
+typedef struct rbu_vfs rbu_vfs;
+typedef struct rbu_file rbu_file;
+typedef struct RbuUpdateStmt RbuUpdateStmt;
+
+#if !defined(SQLITE_AMALGAMATION)
+typedef unsigned int u32;
+typedef unsigned char u8;
+typedef sqlite3_int64 i64;
+#endif
+
+/*
+** These values must match the values defined in wal.c for the equivalent
+** locks. These are not magic numbers as they are part of the SQLite file
+** format.
+*/
+#define WAL_LOCK_WRITE 0
+#define WAL_LOCK_CKPT 1
+#define WAL_LOCK_READ0 3
+
+/*
+** A structure to store values read from the rbu_state table in memory.
+*/
+struct RbuState {
+ int eStage;
+ char *zTbl;
+ char *zIdx;
+ i64 iWalCksum;
+ int nRow;
+ i64 nProgress;
+ u32 iCookie;
+ i64 iOalSz;
+};
+
+struct RbuUpdateStmt {
+ char *zMask; /* Copy of update mask used with pUpdate */
+ sqlite3_stmt *pUpdate; /* Last update statement (or NULL) */
+ RbuUpdateStmt *pNext;
+};
+
+/*
+** An iterator of this type is used to iterate through all objects in
+** the target database that require updating. For each such table, the
+** iterator visits, in order:
+**
+** * the table itself,
+** * each index of the table (zero or more points to visit), and
+** * a special "cleanup table" state.
+**
+** abIndexed:
+** If the table has no indexes on it, abIndexed is set to NULL. Otherwise,
+** it points to an array of flags nTblCol elements in size. The flag is
+** set for each column that is either a part of the PK or a part of an
+** index. Or clear otherwise.
+**
+*/
+struct RbuObjIter {
+ sqlite3_stmt *pTblIter; /* Iterate through tables */
+ sqlite3_stmt *pIdxIter; /* Index iterator */
+ int nTblCol; /* Size of azTblCol[] array */
+ char **azTblCol; /* Array of unquoted target column names */
+ char **azTblType; /* Array of target column types */
+ int *aiSrcOrder; /* src table col -> target table col */
+ u8 *abTblPk; /* Array of flags, set on target PK columns */
+ u8 *abNotNull; /* Array of flags, set on NOT NULL columns */
+ u8 *abIndexed; /* Array of flags, set on indexed & PK cols */
+ int eType; /* Table type - an RBU_PK_XXX value */
+
+ /* Output variables. zTbl==0 implies EOF. */
+ int bCleanup; /* True in "cleanup" state */
+ const char *zTbl; /* Name of target db table */
+ const char *zDataTbl; /* Name of rbu db table (or null) */
+ const char *zIdx; /* Name of target db index (or null) */
+ int iTnum; /* Root page of current object */
+ int iPkTnum; /* If eType==EXTERNAL, root of PK index */
+ int bUnique; /* Current index is unique */
+
+ /* Statements created by rbuObjIterPrepareAll() */
+ int nCol; /* Number of columns in current object */
+ sqlite3_stmt *pSelect; /* Source data */
+ sqlite3_stmt *pInsert; /* Statement for INSERT operations */
+ sqlite3_stmt *pDelete; /* Statement for DELETE ops */
+ sqlite3_stmt *pTmpInsert; /* Insert into rbu_tmp_$zDataTbl */
+
+ /* Last UPDATE used (for PK b-tree updates only), or NULL. */
+ RbuUpdateStmt *pRbuUpdate;
+};
+
+/*
+** Values for RbuObjIter.eType
+**
+** 0: Table does not exist (error)
+** 1: Table has an implicit rowid.
+** 2: Table has an explicit IPK column.
+** 3: Table has an external PK index.
+** 4: Table is WITHOUT ROWID.
+** 5: Table is a virtual table.
+*/
+#define RBU_PK_NOTABLE 0
+#define RBU_PK_NONE 1
+#define RBU_PK_IPK 2
+#define RBU_PK_EXTERNAL 3
+#define RBU_PK_WITHOUT_ROWID 4
+#define RBU_PK_VTAB 5
+
+
+/*
+** Within the RBU_STAGE_OAL stage, each call to sqlite3rbu_step() performs
+** one of the following operations.
+*/
+#define RBU_INSERT 1 /* Insert on a main table b-tree */
+#define RBU_DELETE 2 /* Delete a row from a main table b-tree */
+#define RBU_IDX_DELETE 3 /* Delete a row from an aux. index b-tree */
+#define RBU_IDX_INSERT 4 /* Insert on an aux. index b-tree */
+#define RBU_UPDATE 5 /* Update a row in a main table b-tree */
+
+
+/*
+** A single step of an incremental checkpoint - frame iWalFrame of the wal
+** file should be copied to page iDbPage of the database file.
+*/
+struct RbuFrame {
+ u32 iDbPage;
+ u32 iWalFrame;
+};
+
+/*
+** RBU handle.
+*/
+struct sqlite3rbu {
+ int eStage; /* Value of RBU_STATE_STAGE field */
+ sqlite3 *dbMain; /* target database handle */
+ sqlite3 *dbRbu; /* rbu database handle */
+ char *zTarget; /* Path to target db */
+ char *zRbu; /* Path to rbu db */
+ char *zState; /* Path to state db (or NULL if zRbu) */
+ char zStateDb[5]; /* Db name for state ("stat" or "main") */
+ int rc; /* Value returned by last rbu_step() call */
+ char *zErrmsg; /* Error message if rc!=SQLITE_OK */
+ int nStep; /* Rows processed for current object */
+ int nProgress; /* Rows processed for all objects */
+ RbuObjIter objiter; /* Iterator for skipping through tbl/idx */
+ const char *zVfsName; /* Name of automatically created rbu vfs */
+ rbu_file *pTargetFd; /* File handle open on target db */
+ i64 iOalSz;
+
+ /* The following state variables are used as part of the incremental
+ ** checkpoint stage (eStage==RBU_STAGE_CKPT). See comments surrounding
+ ** function rbuSetupCheckpoint() for details. */
+ u32 iMaxFrame; /* Largest iWalFrame value in aFrame[] */
+ u32 mLock;
+ int nFrame; /* Entries in aFrame[] array */
+ int nFrameAlloc; /* Allocated size of aFrame[] array */
+ RbuFrame *aFrame;
+ int pgsz;
+ u8 *aBuf;
+ i64 iWalCksum;
+};
+
+/*
+** An rbu VFS is implemented using an instance of this structure.
+*/
+struct rbu_vfs {
+ sqlite3_vfs base; /* rbu VFS shim methods */
+ sqlite3_vfs *pRealVfs; /* Underlying VFS */
+ sqlite3_mutex *mutex; /* Mutex to protect pMain */
+ rbu_file *pMain; /* Linked list of main db files */
+};
+
+/*
+** Each file opened by an rbu VFS is represented by an instance of
+** the following structure.
+*/
+struct rbu_file {
+ sqlite3_file base; /* sqlite3_file methods */
+ sqlite3_file *pReal; /* Underlying file handle */
+ rbu_vfs *pRbuVfs; /* Pointer to the rbu_vfs object */
+ sqlite3rbu *pRbu; /* Pointer to rbu object (rbu target only) */
+
+ int openFlags; /* Flags this file was opened with */
+ u32 iCookie; /* Cookie value for main db files */
+ u8 iWriteVer; /* "write-version" value for main db files */
+
+ int nShm; /* Number of entries in apShm[] array */
+ char **apShm; /* Array of mmap'd *-shm regions */
+ char *zDel; /* Delete this when closing file */
+
+ const char *zWal; /* Wal filename for this main db file */
+ rbu_file *pWalFd; /* Wal file descriptor for this main db */
+ rbu_file *pMainNext; /* Next MAIN_DB file */
+};
+
+
+/*************************************************************************
+** The following three functions, found below:
+**
+** rbuDeltaGetInt()
+** rbuDeltaChecksum()
+** rbuDeltaApply()
+**
+** are lifted from the fossil source code (http://fossil-scm.org). They
+** are used to implement the scalar SQL function rbu_fossil_delta().
+*/
+
+/*
+** Read bytes from *pz and convert them into a positive integer. When
+** finished, leave *pz pointing to the first character past the end of
+** the integer. The *pLen parameter holds the length of the string
+** in *pz and is decremented once for each character in the integer.
+*/
+static unsigned int rbuDeltaGetInt(const char **pz, int *pLen){
+ static const signed char zValue[] = {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, 36,
+ -1, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, -1, -1, 63, -1,
+ };
+ unsigned int v = 0;
+ int c;
+ unsigned char *z = (unsigned char*)*pz;
+ unsigned char *zStart = z;
+ while( (c = zValue[0x7f&*(z++)])>=0 ){
+ v = (v<<6) + c;
+ }
+ z--;
+ *pLen -= z - zStart;
+ *pz = (char*)z;
+ return v;
+}
+
+/*
+** Compute a 32-bit checksum on the N-byte buffer. Return the result.
+*/
+static unsigned int rbuDeltaChecksum(const char *zIn, size_t N){
+ const unsigned char *z = (const unsigned char *)zIn;
+ unsigned sum0 = 0;
+ unsigned sum1 = 0;
+ unsigned sum2 = 0;
+ unsigned sum3 = 0;
+ while(N >= 16){
+ sum0 += ((unsigned)z[0] + z[4] + z[8] + z[12]);
+ sum1 += ((unsigned)z[1] + z[5] + z[9] + z[13]);
+ sum2 += ((unsigned)z[2] + z[6] + z[10]+ z[14]);
+ sum3 += ((unsigned)z[3] + z[7] + z[11]+ z[15]);
+ z += 16;
+ N -= 16;
+ }
+ while(N >= 4){
+ sum0 += z[0];
+ sum1 += z[1];
+ sum2 += z[2];
+ sum3 += z[3];
+ z += 4;
+ N -= 4;
+ }
+ sum3 += (sum2 << 8) + (sum1 << 16) + (sum0 << 24);
+ switch(N){
+ case 3: sum3 += (z[2] << 8);
+ case 2: sum3 += (z[1] << 16);
+ case 1: sum3 += (z[0] << 24);
+ default: ;
+ }
+ return sum3;
+}
+
+/*
+** Apply a delta.
+**
+** The output buffer should be big enough to hold the whole output
+** file and a NUL terminator at the end. The delta_output_size()
+** routine will determine this size for you.
+**
+** The delta string should be null-terminated. But the delta string
+** may contain embedded NUL characters (if the input and output are
+** binary files) so we also have to pass in the length of the delta in
+** the lenDelta parameter.
+**
+** This function returns the size of the output file in bytes (excluding
+** the final NUL terminator character). Except, if the delta string is
+** malformed or intended for use with a source file other than zSrc,
+** then this routine returns -1.
+**
+** Refer to the delta_create() documentation above for a description
+** of the delta file format.
+*/
+static int rbuDeltaApply(
+ const char *zSrc, /* The source or pattern file */
+ int lenSrc, /* Length of the source file */
+ const char *zDelta, /* Delta to apply to the pattern */
+ int lenDelta, /* Length of the delta */
+ char *zOut /* Write the output into this preallocated buffer */
+){
+ unsigned int limit;
+ unsigned int total = 0;
+#ifndef FOSSIL_OMIT_DELTA_CKSUM_TEST
+ char *zOrigOut = zOut;
+#endif
+
+ limit = rbuDeltaGetInt(&zDelta, &lenDelta);
+ if( *zDelta!='\n' ){
+ /* ERROR: size integer not terminated by "\n" */
+ return -1;
+ }
+ zDelta++; lenDelta--;
+ while( *zDelta && lenDelta>0 ){
+ unsigned int cnt, ofst;
+ cnt = rbuDeltaGetInt(&zDelta, &lenDelta);
+ switch( zDelta[0] ){
+ case '@': {
+ zDelta++; lenDelta--;
+ ofst = rbuDeltaGetInt(&zDelta, &lenDelta);
+ if( lenDelta>0 && zDelta[0]!=',' ){
+ /* ERROR: copy command not terminated by ',' */
+ return -1;
+ }
+ zDelta++; lenDelta--;
+ total += cnt;
+ if( total>limit ){
+ /* ERROR: copy exceeds output file size */
+ return -1;
+ }
+ if( (int)(ofst+cnt) > lenSrc ){
+ /* ERROR: copy extends past end of input */
+ return -1;
+ }
+ memcpy(zOut, &zSrc[ofst], cnt);
+ zOut += cnt;
+ break;
+ }
+ case ':': {
+ zDelta++; lenDelta--;
+ total += cnt;
+ if( total>limit ){
+ /* ERROR: insert command gives an output larger than predicted */
+ return -1;
+ }
+ if( (int)cnt>lenDelta ){
+ /* ERROR: insert count exceeds size of delta */
+ return -1;
+ }
+ memcpy(zOut, zDelta, cnt);
+ zOut += cnt;
+ zDelta += cnt;
+ lenDelta -= cnt;
+ break;
+ }
+ case ';': {
+ zDelta++; lenDelta--;
+ zOut[0] = 0;
+#ifndef FOSSIL_OMIT_DELTA_CKSUM_TEST
+ if( cnt!=rbuDeltaChecksum(zOrigOut, total) ){
+ /* ERROR: bad checksum */
+ return -1;
+ }
+#endif
+ if( total!=limit ){
+ /* ERROR: generated size does not match predicted size */
+ return -1;
+ }
+ return total;
+ }
+ default: {
+ /* ERROR: unknown delta operator */
+ return -1;
+ }
+ }
+ }
+ /* ERROR: unterminated delta */
+ return -1;
+}
+
+static int rbuDeltaOutputSize(const char *zDelta, int lenDelta){
+ int size;
+ size = rbuDeltaGetInt(&zDelta, &lenDelta);
+ if( *zDelta!='\n' ){
+ /* ERROR: size integer not terminated by "\n" */
+ return -1;
+ }
+ return size;
+}
+
+/*
+** End of code taken from fossil.
+*************************************************************************/
+
+/*
+** Implementation of SQL scalar function rbu_fossil_delta().
+**
+** This function applies a fossil delta patch to a blob. Exactly two
+** arguments must be passed to this function. The first is the blob to
+** patch and the second the patch to apply. If no error occurs, this
+** function returns the patched blob.
+*/
+static void rbuFossilDeltaFunc(
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+){
+ const char *aDelta;
+ int nDelta;
+ const char *aOrig;
+ int nOrig;
+
+ int nOut;
+ int nOut2;
+ char *aOut;
+
+ assert( argc==2 );
+
+ nOrig = sqlite3_value_bytes(argv[0]);
+ aOrig = (const char*)sqlite3_value_blob(argv[0]);
+ nDelta = sqlite3_value_bytes(argv[1]);
+ aDelta = (const char*)sqlite3_value_blob(argv[1]);
+
+ /* Figure out the size of the output */
+ nOut = rbuDeltaOutputSize(aDelta, nDelta);
+ if( nOut<0 ){
+ sqlite3_result_error(context, "corrupt fossil delta", -1);
+ return;
+ }
+
+ aOut = sqlite3_malloc(nOut+1);
+ if( aOut==0 ){
+ sqlite3_result_error_nomem(context);
+ }else{
+ nOut2 = rbuDeltaApply(aOrig, nOrig, aDelta, nDelta, aOut);
+ if( nOut2!=nOut ){
+ sqlite3_result_error(context, "corrupt fossil delta", -1);
+ }else{
+ sqlite3_result_blob(context, aOut, nOut, sqlite3_free);
+ }
+ }
+}
+
+
+/*
+** Prepare the SQL statement in buffer zSql against database handle db.
+** If successful, set *ppStmt to point to the new statement and return
+** SQLITE_OK.
+**
+** Otherwise, if an error does occur, set *ppStmt to NULL and return
+** an SQLite error code. Additionally, set output variable *pzErrmsg to
+** point to a buffer containing an error message. It is the responsibility
+** of the caller to (eventually) free this buffer using sqlite3_free().
+*/
+static int prepareAndCollectError(
+ sqlite3 *db,
+ sqlite3_stmt **ppStmt,
+ char **pzErrmsg,
+ const char *zSql
+){
+ int rc = sqlite3_prepare_v2(db, zSql, -1, ppStmt, 0);
+ if( rc!=SQLITE_OK ){
+ *pzErrmsg = sqlite3_mprintf("%s", sqlite3_errmsg(db));
+ *ppStmt = 0;
+ }
+ return rc;
+}
+
+/*
+** Reset the SQL statement passed as the first argument. Return a copy
+** of the value returned by sqlite3_reset().
+**
+** If an error has occurred, then set *pzErrmsg to point to a buffer
+** containing an error message. It is the responsibility of the caller
+** to eventually free this buffer using sqlite3_free().
+*/
+static int resetAndCollectError(sqlite3_stmt *pStmt, char **pzErrmsg){
+ int rc = sqlite3_reset(pStmt);
+ if( rc!=SQLITE_OK ){
+ *pzErrmsg = sqlite3_mprintf("%s", sqlite3_errmsg(sqlite3_db_handle(pStmt)));
+ }
+ return rc;
+}
+
+/*
+** Unless it is NULL, argument zSql points to a buffer allocated using
+** sqlite3_malloc containing an SQL statement. This function prepares the SQL
+** statement against database db and frees the buffer. If statement
+** compilation is successful, *ppStmt is set to point to the new statement
+** handle and SQLITE_OK is returned.
+**
+** Otherwise, if an error occurs, *ppStmt is set to NULL and an error code
+** returned. In this case, *pzErrmsg may also be set to point to an error
+** message. It is the responsibility of the caller to free this error message
+** buffer using sqlite3_free().
+**
+** If argument zSql is NULL, this function assumes that an OOM has occurred.
+** In this case SQLITE_NOMEM is returned and *ppStmt set to NULL.
+*/
+static int prepareFreeAndCollectError(
+ sqlite3 *db,
+ sqlite3_stmt **ppStmt,
+ char **pzErrmsg,
+ char *zSql
+){
+ int rc;
+ assert( *pzErrmsg==0 );
+ if( zSql==0 ){
+ rc = SQLITE_NOMEM;
+ *ppStmt = 0;
+ }else{
+ rc = prepareAndCollectError(db, ppStmt, pzErrmsg, zSql);
+ sqlite3_free(zSql);
+ }
+ return rc;
+}
+
+/*
+** Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated
+** by an earlier call to rbuObjIterCacheTableInfo().
+*/
+static void rbuObjIterFreeCols(RbuObjIter *pIter){
+ int i;
+ for(i=0; i<pIter->nTblCol; i++){
+ sqlite3_free(pIter->azTblCol[i]);
+ sqlite3_free(pIter->azTblType[i]);
+ }
+ sqlite3_free(pIter->azTblCol);
+ pIter->azTblCol = 0;
+ pIter->azTblType = 0;
+ pIter->aiSrcOrder = 0;
+ pIter->abTblPk = 0;
+ pIter->abNotNull = 0;
+ pIter->nTblCol = 0;
+ pIter->eType = 0; /* Invalid value */
+}
+
+/*
+** Finalize all statements and free all allocations that are specific to
+** the current object (table/index pair).
+*/
+static void rbuObjIterClearStatements(RbuObjIter *pIter){
+ RbuUpdateStmt *pUp;
+
+ sqlite3_finalize(pIter->pSelect);
+ sqlite3_finalize(pIter->pInsert);
+ sqlite3_finalize(pIter->pDelete);
+ sqlite3_finalize(pIter->pTmpInsert);
+ pUp = pIter->pRbuUpdate;
+ while( pUp ){
+ RbuUpdateStmt *pTmp = pUp->pNext;
+ sqlite3_finalize(pUp->pUpdate);
+ sqlite3_free(pUp);
+ pUp = pTmp;
+ }
+
+ pIter->pSelect = 0;
+ pIter->pInsert = 0;
+ pIter->pDelete = 0;
+ pIter->pRbuUpdate = 0;
+ pIter->pTmpInsert = 0;
+ pIter->nCol = 0;
+}
+
+/*
+** Clean up any resources allocated as part of the iterator object passed
+** as the only argument.
+*/
+static void rbuObjIterFinalize(RbuObjIter *pIter){
+ rbuObjIterClearStatements(pIter);
+ sqlite3_finalize(pIter->pTblIter);
+ sqlite3_finalize(pIter->pIdxIter);
+ rbuObjIterFreeCols(pIter);
+ memset(pIter, 0, sizeof(RbuObjIter));
+}
+
+/*
+** Advance the iterator to the next position.
+**
+** If no error occurs, SQLITE_OK is returned and the iterator is left
+** pointing to the next entry. Otherwise, an error code and message is
+** left in the RBU handle passed as the first argument. A copy of the
+** error code is returned.
+*/
+static int rbuObjIterNext(sqlite3rbu *p, RbuObjIter *pIter){
+ int rc = p->rc;
+ if( rc==SQLITE_OK ){
+
+ /* Free any SQLite statements used while processing the previous object */
+ rbuObjIterClearStatements(pIter);
+ if( pIter->zIdx==0 ){
+ rc = sqlite3_exec(p->dbMain,
+ "DROP TRIGGER IF EXISTS temp.rbu_insert_tr;"
+ "DROP TRIGGER IF EXISTS temp.rbu_update1_tr;"
+ "DROP TRIGGER IF EXISTS temp.rbu_update2_tr;"
+ "DROP TRIGGER IF EXISTS temp.rbu_delete_tr;"
+ , 0, 0, &p->zErrmsg
+ );
+ }
+
+ if( rc==SQLITE_OK ){
+ if( pIter->bCleanup ){
+ rbuObjIterFreeCols(pIter);
+ pIter->bCleanup = 0;
+ rc = sqlite3_step(pIter->pTblIter);
+ if( rc!=SQLITE_ROW ){
+ rc = resetAndCollectError(pIter->pTblIter, &p->zErrmsg);
+ pIter->zTbl = 0;
+ }else{
+ pIter->zTbl = (const char*)sqlite3_column_text(pIter->pTblIter, 0);
+ pIter->zDataTbl = (const char*)sqlite3_column_text(pIter->pTblIter,1);
+ rc = (pIter->zDataTbl && pIter->zTbl) ? SQLITE_OK : SQLITE_NOMEM;
+ }
+ }else{
+ if( pIter->zIdx==0 ){
+ sqlite3_stmt *pIdx = pIter->pIdxIter;
+ rc = sqlite3_bind_text(pIdx, 1, pIter->zTbl, -1, SQLITE_STATIC);
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_step(pIter->pIdxIter);
+ if( rc!=SQLITE_ROW ){
+ rc = resetAndCollectError(pIter->pIdxIter, &p->zErrmsg);
+ pIter->bCleanup = 1;
+ pIter->zIdx = 0;
+ }else{
+ pIter->zIdx = (const char*)sqlite3_column_text(pIter->pIdxIter, 0);
+ pIter->iTnum = sqlite3_column_int(pIter->pIdxIter, 1);
+ pIter->bUnique = sqlite3_column_int(pIter->pIdxIter, 2);
+ rc = pIter->zIdx ? SQLITE_OK : SQLITE_NOMEM;
+ }
+ }
+ }
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ rbuObjIterFinalize(pIter);
+ p->rc = rc;
+ }
+ return rc;
+}
+
+
+/*
+** The implementation of the rbu_target_name() SQL function. This function
+** accepts one argument - the name of a table in the RBU database. If the
+** table name matches the pattern:
+**
+** data[0-9]_<name>
+**
+** where <name> is any sequence of 1 or more characters, <name> is returned.
+** Otherwise, if the only argument does not match the above pattern, an SQL
+** NULL is returned.
+**
+** "data_t1" -> "t1"
+** "data0123_t2" -> "t2"
+** "dataAB_t3" -> NULL
+*/
+static void rbuTargetNameFunc(
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+){
+ const char *zIn;
+ assert( argc==1 );
+
+ zIn = (const char*)sqlite3_value_text(argv[0]);
+ if( zIn && strlen(zIn)>4 && memcmp("data", zIn, 4)==0 ){
+ int i;
+ for(i=4; zIn[i]>='0' && zIn[i]<='9'; i++);
+ if( zIn[i]=='_' && zIn[i+1] ){
+ sqlite3_result_text(context, &zIn[i+1], -1, SQLITE_STATIC);
+ }
+ }
+}
+
+/*
+** Initialize the iterator structure passed as the second argument.
+**
+** If no error occurs, SQLITE_OK is returned and the iterator is left
+** pointing to the first entry. Otherwise, an error code and message is
+** left in the RBU handle passed as the first argument. A copy of the
+** error code is returned.
+*/
+static int rbuObjIterFirst(sqlite3rbu *p, RbuObjIter *pIter){
+ int rc;
+ memset(pIter, 0, sizeof(RbuObjIter));
+
+ rc = prepareAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg,
+ "SELECT rbu_target_name(name) AS target, name FROM sqlite_master "
+ "WHERE type IN ('table', 'view') AND target IS NOT NULL "
+ "ORDER BY name"
+ );
+
+ if( rc==SQLITE_OK ){
+ rc = prepareAndCollectError(p->dbMain, &pIter->pIdxIter, &p->zErrmsg,
+ "SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' "
+ " FROM main.sqlite_master "
+ " WHERE type='index' AND tbl_name = ?"
+ );
+ }
+
+ pIter->bCleanup = 1;
+ p->rc = rc;
+ return rbuObjIterNext(p, pIter);
+}
+
+/*
+** This is a wrapper around "sqlite3_mprintf(zFmt, ...)". If an OOM occurs,
+** an error code is stored in the RBU handle passed as the first argument.
+**
+** If an error has already occurred (p->rc is already set to something other
+** than SQLITE_OK), then this function returns NULL without modifying the
+** stored error code. In this case it still calls sqlite3_free() on any
+** printf() parameters associated with %z conversions.
+*/
+static char *rbuMPrintf(sqlite3rbu *p, const char *zFmt, ...){
+ char *zSql = 0;
+ va_list ap;
+ va_start(ap, zFmt);
+ zSql = sqlite3_vmprintf(zFmt, ap);
+ if( p->rc==SQLITE_OK ){
+ if( zSql==0 ) p->rc = SQLITE_NOMEM;
+ }else{
+ sqlite3_free(zSql);
+ zSql = 0;
+ }
+ va_end(ap);
+ return zSql;
+}
+
+/*
+** Argument zFmt is a sqlite3_mprintf() style format string. The trailing
+** arguments are the usual subsitution values. This function performs
+** the printf() style substitutions and executes the result as an SQL
+** statement on the RBU handles database.
+**
+** If an error occurs, an error code and error message is stored in the
+** RBU handle. If an error has already occurred when this function is
+** called, it is a no-op.
+*/
+static int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){
+ va_list ap;
+ char *zSql;
+ va_start(ap, zFmt);
+ zSql = sqlite3_vmprintf(zFmt, ap);
+ if( p->rc==SQLITE_OK ){
+ if( zSql==0 ){
+ p->rc = SQLITE_NOMEM;
+ }else{
+ p->rc = sqlite3_exec(db, zSql, 0, 0, &p->zErrmsg);
+ }
+ }
+ sqlite3_free(zSql);
+ va_end(ap);
+ return p->rc;
+}
+
+/*
+** Attempt to allocate and return a pointer to a zeroed block of nByte
+** bytes.
+**
+** If an error (i.e. an OOM condition) occurs, return NULL and leave an
+** error code in the rbu handle passed as the first argument. Or, if an
+** error has already occurred when this function is called, return NULL
+** immediately without attempting the allocation or modifying the stored
+** error code.
+*/
+static void *rbuMalloc(sqlite3rbu *p, int nByte){
+ void *pRet = 0;
+ if( p->rc==SQLITE_OK ){
+ assert( nByte>0 );
+ pRet = sqlite3_malloc(nByte);
+ if( pRet==0 ){
+ p->rc = SQLITE_NOMEM;
+ }else{
+ memset(pRet, 0, nByte);
+ }
+ }
+ return pRet;
+}
+
+
+/*
+** Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that
+** there is room for at least nCol elements. If an OOM occurs, store an
+** error code in the RBU handle passed as the first argument.
+*/
+static void rbuAllocateIterArrays(sqlite3rbu *p, RbuObjIter *pIter, int nCol){
+ int nByte = (2*sizeof(char*) + sizeof(int) + 3*sizeof(u8)) * nCol;
+ char **azNew;
+
+ azNew = (char**)rbuMalloc(p, nByte);
+ if( azNew ){
+ pIter->azTblCol = azNew;
+ pIter->azTblType = &azNew[nCol];
+ pIter->aiSrcOrder = (int*)&pIter->azTblType[nCol];
+ pIter->abTblPk = (u8*)&pIter->aiSrcOrder[nCol];
+ pIter->abNotNull = (u8*)&pIter->abTblPk[nCol];
+ pIter->abIndexed = (u8*)&pIter->abNotNull[nCol];
+ }
+}
+
+/*
+** The first argument must be a nul-terminated string. This function
+** returns a copy of the string in memory obtained from sqlite3_malloc().
+** It is the responsibility of the caller to eventually free this memory
+** using sqlite3_free().
+**
+** If an OOM condition is encountered when attempting to allocate memory,
+** output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise,
+** if the allocation succeeds, (*pRc) is left unchanged.
+*/
+static char *rbuStrndup(const char *zStr, int *pRc){
+ char *zRet = 0;
+
+ assert( *pRc==SQLITE_OK );
+ if( zStr ){
+ int nCopy = strlen(zStr) + 1;
+ zRet = (char*)sqlite3_malloc(nCopy);
+ if( zRet ){
+ memcpy(zRet, zStr, nCopy);
+ }else{
+ *pRc = SQLITE_NOMEM;
+ }
+ }
+
+ return zRet;
+}
+
+/*
+** Finalize the statement passed as the second argument.
+**
+** If the sqlite3_finalize() call indicates that an error occurs, and the
+** rbu handle error code is not already set, set the error code and error
+** message accordingly.
+*/
+static void rbuFinalize(sqlite3rbu *p, sqlite3_stmt *pStmt){
+ sqlite3 *db = sqlite3_db_handle(pStmt);
+ int rc = sqlite3_finalize(pStmt);
+ if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){
+ p->rc = rc;
+ p->zErrmsg = sqlite3_mprintf("%s", sqlite3_errmsg(db));
+ }
+}
+
+/* Determine the type of a table.
+**
+** peType is of type (int*), a pointer to an output parameter of type
+** (int). This call sets the output parameter as follows, depending
+** on the type of the table specified by parameters dbName and zTbl.
+**
+** RBU_PK_NOTABLE: No such table.
+** RBU_PK_NONE: Table has an implicit rowid.
+** RBU_PK_IPK: Table has an explicit IPK column.
+** RBU_PK_EXTERNAL: Table has an external PK index.
+** RBU_PK_WITHOUT_ROWID: Table is WITHOUT ROWID.
+** RBU_PK_VTAB: Table is a virtual table.
+**
+** Argument *piPk is also of type (int*), and also points to an output
+** parameter. Unless the table has an external primary key index
+** (i.e. unless *peType is set to 3), then *piPk is set to zero. Or,
+** if the table does have an external primary key index, then *piPk
+** is set to the root page number of the primary key index before
+** returning.
+**
+** ALGORITHM:
+**
+** if( no entry exists in sqlite_master ){
+** return RBU_PK_NOTABLE
+** }else if( sql for the entry starts with "CREATE VIRTUAL" ){
+** return RBU_PK_VTAB
+** }else if( "PRAGMA index_list()" for the table contains a "pk" index ){
+** if( the index that is the pk exists in sqlite_master ){
+** *piPK = rootpage of that index.
+** return RBU_PK_EXTERNAL
+** }else{
+** return RBU_PK_WITHOUT_ROWID
+** }
+** }else if( "PRAGMA table_info()" lists one or more "pk" columns ){
+** return RBU_PK_IPK
+** }else{
+** return RBU_PK_NONE
+** }
+*/
+static void rbuTableType(
+ sqlite3rbu *p,
+ const char *zTab,
+ int *peType,
+ int *piTnum,
+ int *piPk
+){
+ /*
+ ** 0) SELECT count(*) FROM sqlite_master where name=%Q AND IsVirtual(%Q)
+ ** 1) PRAGMA index_list = ?
+ ** 2) SELECT count(*) FROM sqlite_master where name=%Q
+ ** 3) PRAGMA table_info = ?
+ */
+ sqlite3_stmt *aStmt[4] = {0, 0, 0, 0};
+
+ *peType = RBU_PK_NOTABLE;
+ *piPk = 0;
+
+ assert( p->rc==SQLITE_OK );
+ p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[0], &p->zErrmsg,
+ sqlite3_mprintf(
+ "SELECT (sql LIKE 'create virtual%%'), rootpage"
+ " FROM sqlite_master"
+ " WHERE name=%Q", zTab
+ ));
+ if( p->rc!=SQLITE_OK || sqlite3_step(aStmt[0])!=SQLITE_ROW ){
+ /* Either an error, or no such table. */
+ goto rbuTableType_end;
+ }
+ if( sqlite3_column_int(aStmt[0], 0) ){
+ *peType = RBU_PK_VTAB; /* virtual table */
+ goto rbuTableType_end;
+ }
+ *piTnum = sqlite3_column_int(aStmt[0], 1);
+
+ p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[1], &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA index_list=%Q",zTab)
+ );
+ if( p->rc ) goto rbuTableType_end;
+ while( sqlite3_step(aStmt[1])==SQLITE_ROW ){
+ const u8 *zOrig = sqlite3_column_text(aStmt[1], 3);
+ const u8 *zIdx = sqlite3_column_text(aStmt[1], 1);
+ if( zOrig && zIdx && zOrig[0]=='p' ){
+ p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[2], &p->zErrmsg,
+ sqlite3_mprintf(
+ "SELECT rootpage FROM sqlite_master WHERE name = %Q", zIdx
+ ));
+ if( p->rc==SQLITE_OK ){
+ if( sqlite3_step(aStmt[2])==SQLITE_ROW ){
+ *piPk = sqlite3_column_int(aStmt[2], 0);
+ *peType = RBU_PK_EXTERNAL;
+ }else{
+ *peType = RBU_PK_WITHOUT_ROWID;
+ }
+ }
+ goto rbuTableType_end;
+ }
+ }
+
+ p->rc = prepareFreeAndCollectError(p->dbMain, &aStmt[3], &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA table_info=%Q",zTab)
+ );
+ if( p->rc==SQLITE_OK ){
+ while( sqlite3_step(aStmt[3])==SQLITE_ROW ){
+ if( sqlite3_column_int(aStmt[3],5)>0 ){
+ *peType = RBU_PK_IPK; /* explicit IPK column */
+ goto rbuTableType_end;
+ }
+ }
+ *peType = RBU_PK_NONE;
+ }
+
+rbuTableType_end: {
+ unsigned int i;
+ for(i=0; i<sizeof(aStmt)/sizeof(aStmt[0]); i++){
+ rbuFinalize(p, aStmt[i]);
+ }
+ }
+}
+
+/*
+** This is a helper function for rbuObjIterCacheTableInfo(). It populates
+** the pIter->abIndexed[] array.
+*/
+static void rbuObjIterCacheIndexedCols(sqlite3rbu *p, RbuObjIter *pIter){
+ sqlite3_stmt *pList = 0;
+ int bIndex = 0;
+
+ if( p->rc==SQLITE_OK ){
+ memcpy(pIter->abIndexed, pIter->abTblPk, sizeof(u8)*pIter->nTblCol);
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pList, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA main.index_list = %Q", pIter->zTbl)
+ );
+ }
+
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pList) ){
+ const char *zIdx = (const char*)sqlite3_column_text(pList, 1);
+ sqlite3_stmt *pXInfo = 0;
+ if( zIdx==0 ) break;
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA main.index_xinfo = %Q", zIdx)
+ );
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){
+ int iCid = sqlite3_column_int(pXInfo, 1);
+ if( iCid>=0 ) pIter->abIndexed[iCid] = 1;
+ }
+ rbuFinalize(p, pXInfo);
+ bIndex = 1;
+ }
+
+ rbuFinalize(p, pList);
+ if( bIndex==0 ) pIter->abIndexed = 0;
+}
+
+
+/*
+** If they are not already populated, populate the pIter->azTblCol[],
+** pIter->abTblPk[], pIter->nTblCol and pIter->bRowid variables according to
+** the table (not index) that the iterator currently points to.
+**
+** Return SQLITE_OK if successful, or an SQLite error code otherwise. If
+** an error does occur, an error code and error message are also left in
+** the RBU handle.
+*/
+static int rbuObjIterCacheTableInfo(sqlite3rbu *p, RbuObjIter *pIter){
+ if( pIter->azTblCol==0 ){
+ sqlite3_stmt *pStmt = 0;
+ int nCol = 0;
+ int i; /* for() loop iterator variable */
+ int bRbuRowid = 0; /* If input table has column "rbu_rowid" */
+ int iOrder = 0;
+ int iTnum = 0;
+
+ /* Figure out the type of table this step will deal with. */
+ assert( pIter->eType==0 );
+ rbuTableType(p, pIter->zTbl, &pIter->eType, &iTnum, &pIter->iPkTnum);
+ if( p->rc==SQLITE_OK && pIter->eType==RBU_PK_NOTABLE ){
+ p->rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf("no such table: %s", pIter->zTbl);
+ }
+ if( p->rc ) return p->rc;
+ if( pIter->zIdx==0 ) pIter->iTnum = iTnum;
+
+ assert( pIter->eType==RBU_PK_NONE || pIter->eType==RBU_PK_IPK
+ || pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_WITHOUT_ROWID
+ || pIter->eType==RBU_PK_VTAB
+ );
+
+ /* Populate the azTblCol[] and nTblCol variables based on the columns
+ ** of the input table. Ignore any input table columns that begin with
+ ** "rbu_". */
+ p->rc = prepareFreeAndCollectError(p->dbRbu, &pStmt, &p->zErrmsg,
+ sqlite3_mprintf("SELECT * FROM '%q'", pIter->zDataTbl)
+ );
+ if( p->rc==SQLITE_OK ){
+ nCol = sqlite3_column_count(pStmt);
+ rbuAllocateIterArrays(p, pIter, nCol);
+ }
+ for(i=0; p->rc==SQLITE_OK && i<nCol; i++){
+ const char *zName = (const char*)sqlite3_column_name(pStmt, i);
+ if( sqlite3_strnicmp("rbu_", zName, 4) ){
+ char *zCopy = rbuStrndup(zName, &p->rc);
+ pIter->aiSrcOrder[pIter->nTblCol] = pIter->nTblCol;
+ pIter->azTblCol[pIter->nTblCol++] = zCopy;
+ }
+ else if( 0==sqlite3_stricmp("rbu_rowid", zName) ){
+ bRbuRowid = 1;
+ }
+ }
+ sqlite3_finalize(pStmt);
+ pStmt = 0;
+
+ if( p->rc==SQLITE_OK
+ && bRbuRowid!=(pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE)
+ ){
+ p->rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf(
+ "table %q %s rbu_rowid column", pIter->zDataTbl,
+ (bRbuRowid ? "may not have" : "requires")
+ );
+ }
+
+ /* Check that all non-HIDDEN columns in the destination table are also
+ ** present in the input table. Populate the abTblPk[], azTblType[] and
+ ** aiTblOrder[] arrays at the same time. */
+ if( p->rc==SQLITE_OK ){
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pStmt, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA table_info(%Q)", pIter->zTbl)
+ );
+ }
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){
+ const char *zName = (const char*)sqlite3_column_text(pStmt, 1);
+ if( zName==0 ) break; /* An OOM - finalize() below returns S_NOMEM */
+ for(i=iOrder; i<pIter->nTblCol; i++){
+ if( 0==strcmp(zName, pIter->azTblCol[i]) ) break;
+ }
+ if( i==pIter->nTblCol ){
+ p->rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf("column missing from %q: %s",
+ pIter->zDataTbl, zName
+ );
+ }else{
+ int iPk = sqlite3_column_int(pStmt, 5);
+ int bNotNull = sqlite3_column_int(pStmt, 3);
+ const char *zType = (const char*)sqlite3_column_text(pStmt, 2);
+
+ if( i!=iOrder ){
+ SWAP(int, pIter->aiSrcOrder[i], pIter->aiSrcOrder[iOrder]);
+ SWAP(char*, pIter->azTblCol[i], pIter->azTblCol[iOrder]);
+ }
+
+ pIter->azTblType[iOrder] = rbuStrndup(zType, &p->rc);
+ pIter->abTblPk[iOrder] = (iPk!=0);
+ pIter->abNotNull[iOrder] = (u8)bNotNull || (iPk!=0);
+ iOrder++;
+ }
+ }
+
+ rbuFinalize(p, pStmt);
+ rbuObjIterCacheIndexedCols(p, pIter);
+ assert( pIter->eType!=RBU_PK_VTAB || pIter->abIndexed==0 );
+ }
+
+ return p->rc;
+}
+
+/*
+** This function constructs and returns a pointer to a nul-terminated
+** string containing some SQL clause or list based on one or more of the
+** column names currently stored in the pIter->azTblCol[] array.
+*/
+static char *rbuObjIterGetCollist(
+ sqlite3rbu *p, /* RBU object */
+ RbuObjIter *pIter /* Object iterator for column names */
+){
+ char *zList = 0;
+ const char *zSep = "";
+ int i;
+ for(i=0; i<pIter->nTblCol; i++){
+ const char *z = pIter->azTblCol[i];
+ zList = rbuMPrintf(p, "%z%s\"%w\"", zList, zSep, z);
+ zSep = ", ";
+ }
+ return zList;
+}
+
+/*
+** This function is used to create a SELECT list (the list of SQL
+** expressions that follows a SELECT keyword) for a SELECT statement
+** used to read from an data_xxx or rbu_tmp_xxx table while updating the
+** index object currently indicated by the iterator object passed as the
+** second argument. A "PRAGMA index_xinfo = <idxname>" statement is used
+** to obtain the required information.
+**
+** If the index is of the following form:
+**
+** CREATE INDEX i1 ON t1(c, b COLLATE nocase);
+**
+** and "t1" is a table with an explicit INTEGER PRIMARY KEY column
+** "ipk", the returned string is:
+**
+** "`c` COLLATE 'BINARY', `b` COLLATE 'NOCASE', `ipk` COLLATE 'BINARY'"
+**
+** As well as the returned string, three other malloc'd strings are
+** returned via output parameters. As follows:
+**
+** pzImposterCols: ...
+** pzImposterPk: ...
+** pzWhere: ...
+*/
+static char *rbuObjIterGetIndexCols(
+ sqlite3rbu *p, /* RBU object */
+ RbuObjIter *pIter, /* Object iterator for column names */
+ char **pzImposterCols, /* OUT: Columns for imposter table */
+ char **pzImposterPk, /* OUT: Imposter PK clause */
+ char **pzWhere, /* OUT: WHERE clause */
+ int *pnBind /* OUT: Trbul number of columns */
+){
+ int rc = p->rc; /* Error code */
+ int rc2; /* sqlite3_finalize() return code */
+ char *zRet = 0; /* String to return */
+ char *zImpCols = 0; /* String to return via *pzImposterCols */
+ char *zImpPK = 0; /* String to return via *pzImposterPK */
+ char *zWhere = 0; /* String to return via *pzWhere */
+ int nBind = 0; /* Value to return via *pnBind */
+ const char *zCom = ""; /* Set to ", " later on */
+ const char *zAnd = ""; /* Set to " AND " later on */
+ sqlite3_stmt *pXInfo = 0; /* PRAGMA index_xinfo = ? */
+
+ if( rc==SQLITE_OK ){
+ assert( p->zErrmsg==0 );
+ rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA main.index_xinfo = %Q", pIter->zIdx)
+ );
+ }
+
+ while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){
+ int iCid = sqlite3_column_int(pXInfo, 1);
+ int bDesc = sqlite3_column_int(pXInfo, 3);
+ const char *zCollate = (const char*)sqlite3_column_text(pXInfo, 4);
+ const char *zCol;
+ const char *zType;
+
+ if( iCid<0 ){
+ /* An integer primary key. If the table has an explicit IPK, use
+ ** its name. Otherwise, use "rbu_rowid". */
+ if( pIter->eType==RBU_PK_IPK ){
+ int i;
+ for(i=0; pIter->abTblPk[i]==0; i++);
+ assert( i<pIter->nTblCol );
+ zCol = pIter->azTblCol[i];
+ }else{
+ zCol = "rbu_rowid";
+ }
+ zType = "INTEGER";
+ }else{
+ zCol = pIter->azTblCol[iCid];
+ zType = pIter->azTblType[iCid];
+ }
+
+ zRet = sqlite3_mprintf("%z%s\"%w\" COLLATE %Q", zRet, zCom, zCol, zCollate);
+ if( pIter->bUnique==0 || sqlite3_column_int(pXInfo, 5) ){
+ const char *zOrder = (bDesc ? " DESC" : "");
+ zImpPK = sqlite3_mprintf("%z%s\"rbu_imp_%d%w\"%s",
+ zImpPK, zCom, nBind, zCol, zOrder
+ );
+ }
+ zImpCols = sqlite3_mprintf("%z%s\"rbu_imp_%d%w\" %s COLLATE %Q",
+ zImpCols, zCom, nBind, zCol, zType, zCollate
+ );
+ zWhere = sqlite3_mprintf(
+ "%z%s\"rbu_imp_%d%w\" IS ?", zWhere, zAnd, nBind, zCol
+ );
+ if( zRet==0 || zImpPK==0 || zImpCols==0 || zWhere==0 ) rc = SQLITE_NOMEM;
+ zCom = ", ";
+ zAnd = " AND ";
+ nBind++;
+ }
+
+ rc2 = sqlite3_finalize(pXInfo);
+ if( rc==SQLITE_OK ) rc = rc2;
+
+ if( rc!=SQLITE_OK ){
+ sqlite3_free(zRet);
+ sqlite3_free(zImpCols);
+ sqlite3_free(zImpPK);
+ sqlite3_free(zWhere);
+ zRet = 0;
+ zImpCols = 0;
+ zImpPK = 0;
+ zWhere = 0;
+ p->rc = rc;
+ }
+
+ *pzImposterCols = zImpCols;
+ *pzImposterPk = zImpPK;
+ *pzWhere = zWhere;
+ *pnBind = nBind;
+ return zRet;
+}
+
+/*
+** Assuming the current table columns are "a", "b" and "c", and the zObj
+** paramter is passed "old", return a string of the form:
+**
+** "old.a, old.b, old.b"
+**
+** With the column names escaped.
+**
+** For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append
+** the text ", old._rowid_" to the returned value.
+*/
+static char *rbuObjIterGetOldlist(
+ sqlite3rbu *p,
+ RbuObjIter *pIter,
+ const char *zObj
+){
+ char *zList = 0;
+ if( p->rc==SQLITE_OK && pIter->abIndexed ){
+ const char *zS = "";
+ int i;
+ for(i=0; i<pIter->nTblCol; i++){
+ if( pIter->abIndexed[i] ){
+ const char *zCol = pIter->azTblCol[i];
+ zList = sqlite3_mprintf("%z%s%s.\"%w\"", zList, zS, zObj, zCol);
+ }else{
+ zList = sqlite3_mprintf("%z%sNULL", zList, zS);
+ }
+ zS = ", ";
+ if( zList==0 ){
+ p->rc = SQLITE_NOMEM;
+ break;
+ }
+ }
+
+ /* For a table with implicit rowids, append "old._rowid_" to the list. */
+ if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){
+ zList = rbuMPrintf(p, "%z, %s._rowid_", zList, zObj);
+ }
+ }
+ return zList;
+}
+
+/*
+** Return an expression that can be used in a WHERE clause to match the
+** primary key of the current table. For example, if the table is:
+**
+** CREATE TABLE t1(a, b, c, PRIMARY KEY(b, c));
+**
+** Return the string:
+**
+** "b = ?1 AND c = ?2"
+*/
+static char *rbuObjIterGetWhere(
+ sqlite3rbu *p,
+ RbuObjIter *pIter
+){
+ char *zList = 0;
+ if( pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE ){
+ zList = rbuMPrintf(p, "_rowid_ = ?%d", pIter->nTblCol+1);
+ }else if( pIter->eType==RBU_PK_EXTERNAL ){
+ const char *zSep = "";
+ int i;
+ for(i=0; i<pIter->nTblCol; i++){
+ if( pIter->abTblPk[i] ){
+ zList = rbuMPrintf(p, "%z%sc%d=?%d", zList, zSep, i, i+1);
+ zSep = " AND ";
+ }
+ }
+ zList = rbuMPrintf(p,
+ "_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)", zList
+ );
+
+ }else{
+ const char *zSep = "";
+ int i;
+ for(i=0; i<pIter->nTblCol; i++){
+ if( pIter->abTblPk[i] ){
+ const char *zCol = pIter->azTblCol[i];
+ zList = rbuMPrintf(p, "%z%s\"%w\"=?%d", zList, zSep, zCol, i+1);
+ zSep = " AND ";
+ }
+ }
+ }
+ return zList;
+}
+
+/*
+** The SELECT statement iterating through the keys for the current object
+** (p->objiter.pSelect) currently points to a valid row. However, there
+** is something wrong with the rbu_control value in the rbu_control value
+** stored in the (p->nCol+1)'th column. Set the error code and error message
+** of the RBU handle to something reflecting this.
+*/
+static void rbuBadControlError(sqlite3rbu *p){
+ p->rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf("invalid rbu_control value");
+}
+
+
+/*
+** Return a nul-terminated string containing the comma separated list of
+** assignments that should be included following the "SET" keyword of
+** an UPDATE statement used to update the table object that the iterator
+** passed as the second argument currently points to if the rbu_control
+** column of the data_xxx table entry is set to zMask.
+**
+** The memory for the returned string is obtained from sqlite3_malloc().
+** It is the responsibility of the caller to eventually free it using
+** sqlite3_free().
+**
+** If an OOM error is encountered when allocating space for the new
+** string, an error code is left in the rbu handle passed as the first
+** argument and NULL is returned. Or, if an error has already occurred
+** when this function is called, NULL is returned immediately, without
+** attempting the allocation or modifying the stored error code.
+*/
+static char *rbuObjIterGetSetlist(
+ sqlite3rbu *p,
+ RbuObjIter *pIter,
+ const char *zMask
+){
+ char *zList = 0;
+ if( p->rc==SQLITE_OK ){
+ int i;
+
+ if( (int)strlen(zMask)!=pIter->nTblCol ){
+ rbuBadControlError(p);
+ }else{
+ const char *zSep = "";
+ for(i=0; i<pIter->nTblCol; i++){
+ char c = zMask[pIter->aiSrcOrder[i]];
+ if( c=='x' ){
+ zList = rbuMPrintf(p, "%z%s\"%w\"=?%d",
+ zList, zSep, pIter->azTblCol[i], i+1
+ );
+ zSep = ", ";
+ }
+ else if( c=='d' ){
+ zList = rbuMPrintf(p, "%z%s\"%w\"=rbu_delta(\"%w\", ?%d)",
+ zList, zSep, pIter->azTblCol[i], pIter->azTblCol[i], i+1
+ );
+ zSep = ", ";
+ }
+ else if( c=='f' ){
+ zList = rbuMPrintf(p, "%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)",
+ zList, zSep, pIter->azTblCol[i], pIter->azTblCol[i], i+1
+ );
+ zSep = ", ";
+ }
+ }
+ }
+ }
+ return zList;
+}
+
+/*
+** Return a nul-terminated string consisting of nByte comma separated
+** "?" expressions. For example, if nByte is 3, return a pointer to
+** a buffer containing the string "?,?,?".
+**
+** The memory for the returned string is obtained from sqlite3_malloc().
+** It is the responsibility of the caller to eventually free it using
+** sqlite3_free().
+**
+** If an OOM error is encountered when allocating space for the new
+** string, an error code is left in the rbu handle passed as the first
+** argument and NULL is returned. Or, if an error has already occurred
+** when this function is called, NULL is returned immediately, without
+** attempting the allocation or modifying the stored error code.
+*/
+static char *rbuObjIterGetBindlist(sqlite3rbu *p, int nBind){
+ char *zRet = 0;
+ int nByte = nBind*2 + 1;
+
+ zRet = (char*)rbuMalloc(p, nByte);
+ if( zRet ){
+ int i;
+ for(i=0; i<nBind; i++){
+ zRet[i*2] = '?';
+ zRet[i*2+1] = (i+1==nBind) ? '\0' : ',';
+ }
+ }
+ return zRet;
+}
+
+/*
+** The iterator currently points to a table (not index) of type
+** RBU_PK_WITHOUT_ROWID. This function creates the PRIMARY KEY
+** declaration for the corresponding imposter table. For example,
+** if the iterator points to a table created as:
+**
+** CREATE TABLE t1(a, b, c, PRIMARY KEY(b, a DESC)) WITHOUT ROWID
+**
+** this function returns:
+**
+** PRIMARY KEY("b", "a" DESC)
+*/
+static char *rbuWithoutRowidPK(sqlite3rbu *p, RbuObjIter *pIter){
+ char *z = 0;
+ assert( pIter->zIdx==0 );
+ if( p->rc==SQLITE_OK ){
+ const char *zSep = "PRIMARY KEY(";
+ sqlite3_stmt *pXList = 0; /* PRAGMA index_list = (pIter->zTbl) */
+ sqlite3_stmt *pXInfo = 0; /* PRAGMA index_xinfo = <pk-index> */
+
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pXList, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA main.index_list = %Q", pIter->zTbl)
+ );
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXList) ){
+ const char *zOrig = (const char*)sqlite3_column_text(pXList,3);
+ if( zOrig && strcmp(zOrig, "pk")==0 ){
+ const char *zIdx = (const char*)sqlite3_column_text(pXList,1);
+ if( zIdx ){
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA main.index_xinfo = %Q", zIdx)
+ );
+ }
+ break;
+ }
+ }
+ rbuFinalize(p, pXList);
+
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){
+ if( sqlite3_column_int(pXInfo, 5) ){
+ /* int iCid = sqlite3_column_int(pXInfo, 0); */
+ const char *zCol = (const char*)sqlite3_column_text(pXInfo, 2);
+ const char *zDesc = sqlite3_column_int(pXInfo, 3) ? " DESC" : "";
+ z = rbuMPrintf(p, "%z%s\"%w\"%s", z, zSep, zCol, zDesc);
+ zSep = ", ";
+ }
+ }
+ z = rbuMPrintf(p, "%z)", z);
+ rbuFinalize(p, pXInfo);
+ }
+ return z;
+}
+
+/*
+** This function creates the second imposter table used when writing to
+** a table b-tree where the table has an external primary key. If the
+** iterator passed as the second argument does not currently point to
+** a table (not index) with an external primary key, this function is a
+** no-op.
+**
+** Assuming the iterator does point to a table with an external PK, this
+** function creates a WITHOUT ROWID imposter table named "rbu_imposter2"
+** used to access that PK index. For example, if the target table is
+** declared as follows:
+**
+** CREATE TABLE t1(a, b TEXT, c REAL, PRIMARY KEY(b, c));
+**
+** then the imposter table schema is:
+**
+** CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID;
+**
+*/
+static void rbuCreateImposterTable2(sqlite3rbu *p, RbuObjIter *pIter){
+ if( p->rc==SQLITE_OK && pIter->eType==RBU_PK_EXTERNAL ){
+ int tnum = pIter->iPkTnum; /* Root page of PK index */
+ sqlite3_stmt *pQuery = 0; /* SELECT name ... WHERE rootpage = $tnum */
+ const char *zIdx = 0; /* Name of PK index */
+ sqlite3_stmt *pXInfo = 0; /* PRAGMA main.index_xinfo = $zIdx */
+ const char *zComma = "";
+ char *zCols = 0; /* Used to build up list of table cols */
+ char *zPk = 0; /* Used to build up table PK declaration */
+
+ /* Figure out the name of the primary key index for the current table.
+ ** This is needed for the argument to "PRAGMA index_xinfo". Set
+ ** zIdx to point to a nul-terminated string containing this name. */
+ p->rc = prepareAndCollectError(p->dbMain, &pQuery, &p->zErrmsg,
+ "SELECT name FROM sqlite_master WHERE rootpage = ?"
+ );
+ if( p->rc==SQLITE_OK ){
+ sqlite3_bind_int(pQuery, 1, tnum);
+ if( SQLITE_ROW==sqlite3_step(pQuery) ){
+ zIdx = (const char*)sqlite3_column_text(pQuery, 0);
+ }
+ }
+ if( zIdx ){
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pXInfo, &p->zErrmsg,
+ sqlite3_mprintf("PRAGMA main.index_xinfo = %Q", zIdx)
+ );
+ }
+ rbuFinalize(p, pQuery);
+
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXInfo) ){
+ int bKey = sqlite3_column_int(pXInfo, 5);
+ if( bKey ){
+ int iCid = sqlite3_column_int(pXInfo, 1);
+ int bDesc = sqlite3_column_int(pXInfo, 3);
+ const char *zCollate = (const char*)sqlite3_column_text(pXInfo, 4);
+ zCols = rbuMPrintf(p, "%z%sc%d %s COLLATE %s", zCols, zComma,
+ iCid, pIter->azTblType[iCid], zCollate
+ );
+ zPk = rbuMPrintf(p, "%z%sc%d%s", zPk, zComma, iCid, bDesc?" DESC":"");
+ zComma = ", ";
+ }
+ }
+ zCols = rbuMPrintf(p, "%z, id INTEGER", zCols);
+ rbuFinalize(p, pXInfo);
+
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 1, tnum);
+ rbuMPrintfExec(p, p->dbMain,
+ "CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID",
+ zCols, zPk
+ );
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 0, 0);
+ }
+}
+
+/*
+** If an error has already occurred when this function is called, it
+** immediately returns zero (without doing any work). Or, if an error
+** occurs during the execution of this function, it sets the error code
+** in the sqlite3rbu object indicated by the first argument and returns
+** zero.
+**
+** The iterator passed as the second argument is guaranteed to point to
+** a table (not an index) when this function is called. This function
+** attempts to create any imposter table required to write to the main
+** table b-tree of the table before returning. Non-zero is returned if
+** an imposter table are created, or zero otherwise.
+**
+** An imposter table is required in all cases except RBU_PK_VTAB. Only
+** virtual tables are written to directly. The imposter table has the
+** same schema as the actual target table (less any UNIQUE constraints).
+** More precisely, the "same schema" means the same columns, types,
+** collation sequences. For tables that do not have an external PRIMARY
+** KEY, it also means the same PRIMARY KEY declaration.
+*/
+static void rbuCreateImposterTable(sqlite3rbu *p, RbuObjIter *pIter){
+ if( p->rc==SQLITE_OK && pIter->eType!=RBU_PK_VTAB ){
+ int tnum = pIter->iTnum;
+ const char *zComma = "";
+ char *zSql = 0;
+ int iCol;
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 0, 1);
+
+ for(iCol=0; p->rc==SQLITE_OK && iCol<pIter->nTblCol; iCol++){
+ const char *zPk = "";
+ const char *zCol = pIter->azTblCol[iCol];
+ const char *zColl = 0;
+
+ p->rc = sqlite3_table_column_metadata(
+ p->dbMain, "main", pIter->zTbl, zCol, 0, &zColl, 0, 0, 0
+ );
+
+ if( pIter->eType==RBU_PK_IPK && pIter->abTblPk[iCol] ){
+ /* If the target table column is an "INTEGER PRIMARY KEY", add
+ ** "PRIMARY KEY" to the imposter table column declaration. */
+ zPk = "PRIMARY KEY ";
+ }
+ zSql = rbuMPrintf(p, "%z%s\"%w\" %s %sCOLLATE %s%s",
+ zSql, zComma, zCol, pIter->azTblType[iCol], zPk, zColl,
+ (pIter->abNotNull[iCol] ? " NOT NULL" : "")
+ );
+ zComma = ", ";
+ }
+
+ if( pIter->eType==RBU_PK_WITHOUT_ROWID ){
+ char *zPk = rbuWithoutRowidPK(p, pIter);
+ if( zPk ){
+ zSql = rbuMPrintf(p, "%z, %z", zSql, zPk);
+ }
+ }
+
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 1, tnum);
+ rbuMPrintfExec(p, p->dbMain, "CREATE TABLE \"rbu_imp_%w\"(%z)%s",
+ pIter->zTbl, zSql,
+ (pIter->eType==RBU_PK_WITHOUT_ROWID ? " WITHOUT ROWID" : "")
+ );
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 0, 0);
+ }
+}
+
+/*
+** Prepare a statement used to insert rows into the "rbu_tmp_xxx" table.
+** Specifically a statement of the form:
+**
+** INSERT INTO rbu_tmp_xxx VALUES(?, ?, ? ...);
+**
+** The number of bound variables is equal to the number of columns in
+** the target table, plus one (for the rbu_control column), plus one more
+** (for the rbu_rowid column) if the target table is an implicit IPK or
+** virtual table.
+*/
+static void rbuObjIterPrepareTmpInsert(
+ sqlite3rbu *p,
+ RbuObjIter *pIter,
+ const char *zCollist,
+ const char *zRbuRowid
+){
+ int bRbuRowid = (pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE);
+ char *zBind = rbuObjIterGetBindlist(p, pIter->nTblCol + 1 + bRbuRowid);
+ if( zBind ){
+ assert( pIter->pTmpInsert==0 );
+ p->rc = prepareFreeAndCollectError(
+ p->dbRbu, &pIter->pTmpInsert, &p->zErrmsg, sqlite3_mprintf(
+ "INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)",
+ p->zStateDb, pIter->zDataTbl, zCollist, zRbuRowid, zBind
+ ));
+ }
+}
+
+static void rbuTmpInsertFunc(
+ sqlite3_context *pCtx,
+ int nVal,
+ sqlite3_value **apVal
+){
+ sqlite3rbu *p = sqlite3_user_data(pCtx);
+ int rc = SQLITE_OK;
+ int i;
+
+ for(i=0; rc==SQLITE_OK && i<nVal; i++){
+ rc = sqlite3_bind_value(p->objiter.pTmpInsert, i+1, apVal[i]);
+ }
+ if( rc==SQLITE_OK ){
+ sqlite3_step(p->objiter.pTmpInsert);
+ rc = sqlite3_reset(p->objiter.pTmpInsert);
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3_result_error_code(pCtx, rc);
+ }
+}
+
+/*
+** Ensure that the SQLite statement handles required to update the
+** target database object currently indicated by the iterator passed
+** as the second argument are available.
+*/
+static int rbuObjIterPrepareAll(
+ sqlite3rbu *p,
+ RbuObjIter *pIter,
+ int nOffset /* Add "LIMIT -1 OFFSET $nOffset" to SELECT */
+){
+ assert( pIter->bCleanup==0 );
+ if( pIter->pSelect==0 && rbuObjIterCacheTableInfo(p, pIter)==SQLITE_OK ){
+ const int tnum = pIter->iTnum;
+ char *zCollist = 0; /* List of indexed columns */
+ char **pz = &p->zErrmsg;
+ const char *zIdx = pIter->zIdx;
+ char *zLimit = 0;
+
+ if( nOffset ){
+ zLimit = sqlite3_mprintf(" LIMIT -1 OFFSET %d", nOffset);
+ if( !zLimit ) p->rc = SQLITE_NOMEM;
+ }
+
+ if( zIdx ){
+ const char *zTbl = pIter->zTbl;
+ char *zImposterCols = 0; /* Columns for imposter table */
+ char *zImposterPK = 0; /* Primary key declaration for imposter */
+ char *zWhere = 0; /* WHERE clause on PK columns */
+ char *zBind = 0;
+ int nBind = 0;
+
+ assert( pIter->eType!=RBU_PK_VTAB );
+ zCollist = rbuObjIterGetIndexCols(
+ p, pIter, &zImposterCols, &zImposterPK, &zWhere, &nBind
+ );
+ zBind = rbuObjIterGetBindlist(p, nBind);
+
+ /* Create the imposter table used to write to this index. */
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 0, 1);
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 1,tnum);
+ rbuMPrintfExec(p, p->dbMain,
+ "CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID",
+ zTbl, zImposterCols, zImposterPK
+ );
+ sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->dbMain, "main", 0, 0);
+
+ /* Create the statement to insert index entries */
+ pIter->nCol = nBind;
+ if( p->rc==SQLITE_OK ){
+ p->rc = prepareFreeAndCollectError(
+ p->dbMain, &pIter->pInsert, &p->zErrmsg,
+ sqlite3_mprintf("INSERT INTO \"rbu_imp_%w\" VALUES(%s)", zTbl, zBind)
+ );
+ }
+
+ /* And to delete index entries */
+ if( p->rc==SQLITE_OK ){
+ p->rc = prepareFreeAndCollectError(
+ p->dbMain, &pIter->pDelete, &p->zErrmsg,
+ sqlite3_mprintf("DELETE FROM \"rbu_imp_%w\" WHERE %s", zTbl, zWhere)
+ );
+ }
+
+ /* Create the SELECT statement to read keys in sorted order */
+ if( p->rc==SQLITE_OK ){
+ char *zSql;
+ if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){
+ zSql = sqlite3_mprintf(
+ "SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' ORDER BY %s%s",
+ zCollist, p->zStateDb, pIter->zDataTbl,
+ zCollist, zLimit
+ );
+ }else{
+ zSql = sqlite3_mprintf(
+ "SELECT %s, rbu_control FROM '%q' "
+ "WHERE typeof(rbu_control)='integer' AND rbu_control!=1 "
+ "UNION ALL "
+ "SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' "
+ "ORDER BY %s%s",
+ zCollist, pIter->zDataTbl,
+ zCollist, p->zStateDb, pIter->zDataTbl,
+ zCollist, zLimit
+ );
+ }
+ p->rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pSelect, pz, zSql);
+ }
+
+ sqlite3_free(zImposterCols);
+ sqlite3_free(zImposterPK);
+ sqlite3_free(zWhere);
+ sqlite3_free(zBind);
+ }else{
+ int bRbuRowid = (pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE);
+ const char *zTbl = pIter->zTbl; /* Table this step applies to */
+ const char *zWrite; /* Imposter table name */
+
+ char *zBindings = rbuObjIterGetBindlist(p, pIter->nTblCol + bRbuRowid);
+ char *zWhere = rbuObjIterGetWhere(p, pIter);
+ char *zOldlist = rbuObjIterGetOldlist(p, pIter, "old");
+ char *zNewlist = rbuObjIterGetOldlist(p, pIter, "new");
+
+ zCollist = rbuObjIterGetCollist(p, pIter);
+ pIter->nCol = pIter->nTblCol;
+
+ /* Create the imposter table or tables (if required). */
+ rbuCreateImposterTable(p, pIter);
+ rbuCreateImposterTable2(p, pIter);
+ zWrite = (pIter->eType==RBU_PK_VTAB ? "" : "rbu_imp_");
+
+ /* Create the INSERT statement to write to the target PK b-tree */
+ if( p->rc==SQLITE_OK ){
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pIter->pInsert, pz,
+ sqlite3_mprintf(
+ "INSERT INTO \"%s%w\"(%s%s) VALUES(%s)",
+ zWrite, zTbl, zCollist, (bRbuRowid ? ", _rowid_" : ""), zBindings
+ )
+ );
+ }
+
+ /* Create the DELETE statement to write to the target PK b-tree */
+ if( p->rc==SQLITE_OK ){
+ p->rc = prepareFreeAndCollectError(p->dbMain, &pIter->pDelete, pz,
+ sqlite3_mprintf(
+ "DELETE FROM \"%s%w\" WHERE %s", zWrite, zTbl, zWhere
+ )
+ );
+ }
+
+ if( pIter->abIndexed ){
+ const char *zRbuRowid = "";
+ if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){
+ zRbuRowid = ", rbu_rowid";
+ }
+
+ /* Create the rbu_tmp_xxx table and the triggers to populate it. */
+ rbuMPrintfExec(p, p->dbRbu,
+ "CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS "
+ "SELECT *%s FROM '%q' WHERE 0;"
+ , p->zStateDb, pIter->zDataTbl
+ , (pIter->eType==RBU_PK_EXTERNAL ? ", 0 AS rbu_rowid" : "")
+ , pIter->zDataTbl
+ );
+
+ rbuMPrintfExec(p, p->dbMain,
+ "CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" "
+ "BEGIN "
+ " SELECT rbu_tmp_insert(2, %s);"
+ "END;"
+
+ "CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" "
+ "BEGIN "
+ " SELECT rbu_tmp_insert(2, %s);"
+ "END;"
+
+ "CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" "
+ "BEGIN "
+ " SELECT rbu_tmp_insert(3, %s);"
+ "END;",
+ zWrite, zTbl, zOldlist,
+ zWrite, zTbl, zOldlist,
+ zWrite, zTbl, zNewlist
+ );
+
+ if( pIter->eType==RBU_PK_EXTERNAL || pIter->eType==RBU_PK_NONE ){
+ rbuMPrintfExec(p, p->dbMain,
+ "CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" "
+ "BEGIN "
+ " SELECT rbu_tmp_insert(0, %s);"
+ "END;",
+ zWrite, zTbl, zNewlist
+ );
+ }
+
+ rbuObjIterPrepareTmpInsert(p, pIter, zCollist, zRbuRowid);
+ }
+
+ /* Create the SELECT statement to read keys from data_xxx */
+ if( p->rc==SQLITE_OK ){
+ p->rc = prepareFreeAndCollectError(p->dbRbu, &pIter->pSelect, pz,
+ sqlite3_mprintf(
+ "SELECT %s, rbu_control%s FROM '%q'%s",
+ zCollist, (bRbuRowid ? ", rbu_rowid" : ""),
+ pIter->zDataTbl, zLimit
+ )
+ );
+ }
+
+ sqlite3_free(zWhere);
+ sqlite3_free(zOldlist);
+ sqlite3_free(zNewlist);
+ sqlite3_free(zBindings);
+ }
+ sqlite3_free(zCollist);
+ sqlite3_free(zLimit);
+ }
+
+ return p->rc;
+}
+
+/*
+** Set output variable *ppStmt to point to an UPDATE statement that may
+** be used to update the imposter table for the main table b-tree of the
+** table object that pIter currently points to, assuming that the
+** rbu_control column of the data_xyz table contains zMask.
+**
+** If the zMask string does not specify any columns to update, then this
+** is not an error. Output variable *ppStmt is set to NULL in this case.
+*/
+static int rbuGetUpdateStmt(
+ sqlite3rbu *p, /* RBU handle */
+ RbuObjIter *pIter, /* Object iterator */
+ const char *zMask, /* rbu_control value ('x.x.') */
+ sqlite3_stmt **ppStmt /* OUT: UPDATE statement handle */
+){
+ RbuUpdateStmt **pp;
+ RbuUpdateStmt *pUp = 0;
+ int nUp = 0;
+
+ /* In case an error occurs */
+ *ppStmt = 0;
+
+ /* Search for an existing statement. If one is found, shift it to the front
+ ** of the LRU queue and return immediately. Otherwise, leave nUp pointing
+ ** to the number of statements currently in the cache and pUp to the
+ ** last object in the list. */
+ for(pp=&pIter->pRbuUpdate; *pp; pp=&((*pp)->pNext)){
+ pUp = *pp;
+ if( strcmp(pUp->zMask, zMask)==0 ){
+ *pp = pUp->pNext;
+ pUp->pNext = pIter->pRbuUpdate;
+ pIter->pRbuUpdate = pUp;
+ *ppStmt = pUp->pUpdate;
+ return SQLITE_OK;
+ }
+ nUp++;
+ }
+ assert( pUp==0 || pUp->pNext==0 );
+
+ if( nUp>=SQLITE_RBU_UPDATE_CACHESIZE ){
+ for(pp=&pIter->pRbuUpdate; *pp!=pUp; pp=&((*pp)->pNext));
+ *pp = 0;
+ sqlite3_finalize(pUp->pUpdate);
+ pUp->pUpdate = 0;
+ }else{
+ pUp = (RbuUpdateStmt*)rbuMalloc(p, sizeof(RbuUpdateStmt)+pIter->nTblCol+1);
+ }
+
+ if( pUp ){
+ char *zWhere = rbuObjIterGetWhere(p, pIter);
+ char *zSet = rbuObjIterGetSetlist(p, pIter, zMask);
+ char *zUpdate = 0;
+
+ pUp->zMask = (char*)&pUp[1];
+ memcpy(pUp->zMask, zMask, pIter->nTblCol);
+ pUp->pNext = pIter->pRbuUpdate;
+ pIter->pRbuUpdate = pUp;
+
+ if( zSet ){
+ const char *zPrefix = "";
+
+ if( pIter->eType!=RBU_PK_VTAB ) zPrefix = "rbu_imp_";
+ zUpdate = sqlite3_mprintf("UPDATE \"%s%w\" SET %s WHERE %s",
+ zPrefix, pIter->zTbl, zSet, zWhere
+ );
+ p->rc = prepareFreeAndCollectError(
+ p->dbMain, &pUp->pUpdate, &p->zErrmsg, zUpdate
+ );
+ *ppStmt = pUp->pUpdate;
+ }
+ sqlite3_free(zWhere);
+ sqlite3_free(zSet);
+ }
+
+ return p->rc;
+}
+
+static sqlite3 *rbuOpenDbhandle(sqlite3rbu *p, const char *zName){
+ sqlite3 *db = 0;
+ if( p->rc==SQLITE_OK ){
+ const int flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_URI;
+ p->rc = sqlite3_open_v2(zName, &db, flags, p->zVfsName);
+ if( p->rc ){
+ p->zErrmsg = sqlite3_mprintf("%s", sqlite3_errmsg(db));
+ sqlite3_close(db);
+ db = 0;
+ }
+ }
+ return db;
+}
+
+/*
+** Open the database handle and attach the RBU database as "rbu". If an
+** error occurs, leave an error code and message in the RBU handle.
+*/
+static void rbuOpenDatabase(sqlite3rbu *p){
+ assert( p->rc==SQLITE_OK );
+ assert( p->dbMain==0 && p->dbRbu==0 );
+
+ p->eStage = 0;
+ p->dbMain = rbuOpenDbhandle(p, p->zTarget);
+ p->dbRbu = rbuOpenDbhandle(p, p->zRbu);
+
+ /* If using separate RBU and state databases, attach the state database to
+ ** the RBU db handle now. */
+ if( p->zState ){
+ rbuMPrintfExec(p, p->dbRbu, "ATTACH %Q AS stat", p->zState);
+ memcpy(p->zStateDb, "stat", 4);
+ }else{
+ memcpy(p->zStateDb, "main", 4);
+ }
+
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_create_function(p->dbMain,
+ "rbu_tmp_insert", -1, SQLITE_UTF8, (void*)p, rbuTmpInsertFunc, 0, 0
+ );
+ }
+
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_create_function(p->dbMain,
+ "rbu_fossil_delta", 2, SQLITE_UTF8, 0, rbuFossilDeltaFunc, 0, 0
+ );
+ }
+
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_create_function(p->dbRbu,
+ "rbu_target_name", 1, SQLITE_UTF8, (void*)p, rbuTargetNameFunc, 0, 0
+ );
+ }
+
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_file_control(p->dbMain, "main", SQLITE_FCNTL_RBU, (void*)p);
+ }
+ rbuMPrintfExec(p, p->dbMain, "SELECT * FROM sqlite_master");
+
+ /* Mark the database file just opened as an RBU target database. If
+ ** this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use.
+ ** This is an error. */
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_file_control(p->dbMain, "main", SQLITE_FCNTL_RBU, (void*)p);
+ }
+
+ if( p->rc==SQLITE_NOTFOUND ){
+ p->rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf("rbu vfs not found");
+ }
+}
+
+/*
+** This routine is a copy of the sqlite3FileSuffix3() routine from the core.
+** It is a no-op unless SQLITE_ENABLE_8_3_NAMES is defined.
+**
+** If SQLITE_ENABLE_8_3_NAMES is set at compile-time and if the database
+** filename in zBaseFilename is a URI with the "8_3_names=1" parameter and
+** if filename in z[] has a suffix (a.k.a. "extension") that is longer than
+** three characters, then shorten the suffix on z[] to be the last three
+** characters of the original suffix.
+**
+** If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always
+** do the suffix shortening regardless of URI parameter.
+**
+** Examples:
+**
+** test.db-journal => test.nal
+** test.db-wal => test.wal
+** test.db-shm => test.shm
+** test.db-mj7f3319fa => test.9fa
+*/
+static void rbuFileSuffix3(const char *zBase, char *z){
+#ifdef SQLITE_ENABLE_8_3_NAMES
+#if SQLITE_ENABLE_8_3_NAMES<2
+ if( sqlite3_uri_boolean(zBase, "8_3_names", 0) )
+#endif
+ {
+ int i, sz;
+ sz = sqlite3Strlen30(z);
+ for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
+ if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4);
+ }
+#endif
+}
+
+/*
+** Return the current wal-index header checksum for the target database
+** as a 64-bit integer.
+**
+** The checksum is store in the first page of xShmMap memory as an 8-byte
+** blob starting at byte offset 40.
+*/
+static i64 rbuShmChecksum(sqlite3rbu *p){
+ i64 iRet = 0;
+ if( p->rc==SQLITE_OK ){
+ sqlite3_file *pDb = p->pTargetFd->pReal;
+ u32 volatile *ptr;
+ p->rc = pDb->pMethods->xShmMap(pDb, 0, 32*1024, 0, (void volatile**)&ptr);
+ if( p->rc==SQLITE_OK ){
+ iRet = ((i64)ptr[10] << 32) + ptr[11];
+ }
+ }
+ return iRet;
+}
+
+/*
+** This function is called as part of initializing or reinitializing an
+** incremental checkpoint.
+**
+** It populates the sqlite3rbu.aFrame[] array with the set of
+** (wal frame -> db page) copy operations required to checkpoint the
+** current wal file, and obtains the set of shm locks required to safely
+** perform the copy operations directly on the file-system.
+**
+** If argument pState is not NULL, then the incremental checkpoint is
+** being resumed. In this case, if the checksum of the wal-index-header
+** following recovery is not the same as the checksum saved in the RbuState
+** object, then the rbu handle is set to DONE state. This occurs if some
+** other client appends a transaction to the wal file in the middle of
+** an incremental checkpoint.
+*/
+static void rbuSetupCheckpoint(sqlite3rbu *p, RbuState *pState){
+
+ /* If pState is NULL, then the wal file may not have been opened and
+ ** recovered. Running a read-statement here to ensure that doing so
+ ** does not interfere with the "capture" process below. */
+ if( pState==0 ){
+ p->eStage = 0;
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_exec(p->dbMain, "SELECT * FROM sqlite_master", 0, 0, 0);
+ }
+ }
+
+ /* Assuming no error has occurred, run a "restart" checkpoint with the
+ ** sqlite3rbu.eStage variable set to CAPTURE. This turns on the following
+ ** special behaviour in the rbu VFS:
+ **
+ ** * If the exclusive shm WRITER or READ0 lock cannot be obtained,
+ ** the checkpoint fails with SQLITE_BUSY (normally SQLite would
+ ** proceed with running a passive checkpoint instead of failing).
+ **
+ ** * Attempts to read from the *-wal file or write to the database file
+ ** do not perform any IO. Instead, the frame/page combinations that
+ ** would be read/written are recorded in the sqlite3rbu.aFrame[]
+ ** array.
+ **
+ ** * Calls to xShmLock(UNLOCK) to release the exclusive shm WRITER,
+ ** READ0 and CHECKPOINT locks taken as part of the checkpoint are
+ ** no-ops. These locks will not be released until the connection
+ ** is closed.
+ **
+ ** * Attempting to xSync() the database file causes an SQLITE_INTERNAL
+ ** error.
+ **
+ ** As a result, unless an error (i.e. OOM or SQLITE_BUSY) occurs, the
+ ** checkpoint below fails with SQLITE_INTERNAL, and leaves the aFrame[]
+ ** array populated with a set of (frame -> page) mappings. Because the
+ ** WRITER, CHECKPOINT and READ0 locks are still held, it is safe to copy
+ ** data from the wal file into the database file according to the
+ ** contents of aFrame[].
+ */
+ if( p->rc==SQLITE_OK ){
+ int rc2;
+ p->eStage = RBU_STAGE_CAPTURE;
+ rc2 = sqlite3_exec(p->dbMain, "PRAGMA main.wal_checkpoint=restart", 0, 0,0);
+ if( rc2!=SQLITE_INTERNAL ) p->rc = rc2;
+ }
+
+ if( p->rc==SQLITE_OK ){
+ p->eStage = RBU_STAGE_CKPT;
+ p->nStep = (pState ? pState->nRow : 0);
+ p->aBuf = rbuMalloc(p, p->pgsz);
+ p->iWalCksum = rbuShmChecksum(p);
+ }
+
+ if( p->rc==SQLITE_OK && pState && pState->iWalCksum!=p->iWalCksum ){
+ p->rc = SQLITE_DONE;
+ p->eStage = RBU_STAGE_DONE;
+ }
+}
+
+/*
+** Called when iAmt bytes are read from offset iOff of the wal file while
+** the rbu object is in capture mode. Record the frame number of the frame
+** being read in the aFrame[] array.
+*/
+static int rbuCaptureWalRead(sqlite3rbu *pRbu, i64 iOff, int iAmt){
+ const u32 mReq = (1<<WAL_LOCK_WRITE)|(1<<WAL_LOCK_CKPT)|(1<<WAL_LOCK_READ0);
+ u32 iFrame;
+
+ if( pRbu->mLock!=mReq ){
+ pRbu->rc = SQLITE_BUSY;
+ return SQLITE_INTERNAL;
+ }
+
+ pRbu->pgsz = iAmt;
+ if( pRbu->nFrame==pRbu->nFrameAlloc ){
+ int nNew = (pRbu->nFrameAlloc ? pRbu->nFrameAlloc : 64) * 2;
+ RbuFrame *aNew;
+ aNew = (RbuFrame*)sqlite3_realloc(pRbu->aFrame, nNew * sizeof(RbuFrame));
+ if( aNew==0 ) return SQLITE_NOMEM;
+ pRbu->aFrame = aNew;
+ pRbu->nFrameAlloc = nNew;
+ }
+
+ iFrame = (u32)((iOff-32) / (i64)(iAmt+24)) + 1;
+ if( pRbu->iMaxFrame<iFrame ) pRbu->iMaxFrame = iFrame;
+ pRbu->aFrame[pRbu->nFrame].iWalFrame = iFrame;
+ pRbu->aFrame[pRbu->nFrame].iDbPage = 0;
+ pRbu->nFrame++;
+ return SQLITE_OK;
+}
+
+/*
+** Called when a page of data is written to offset iOff of the database
+** file while the rbu handle is in capture mode. Record the page number
+** of the page being written in the aFrame[] array.
+*/
+static int rbuCaptureDbWrite(sqlite3rbu *pRbu, i64 iOff){
+ pRbu->aFrame[pRbu->nFrame-1].iDbPage = (u32)(iOff / pRbu->pgsz) + 1;
+ return SQLITE_OK;
+}
+
+/*
+** This is called as part of an incremental checkpoint operation. Copy
+** a single frame of data from the wal file into the database file, as
+** indicated by the RbuFrame object.
+*/
+static void rbuCheckpointFrame(sqlite3rbu *p, RbuFrame *pFrame){
+ sqlite3_file *pWal = p->pTargetFd->pWalFd->pReal;
+ sqlite3_file *pDb = p->pTargetFd->pReal;
+ i64 iOff;
+
+ assert( p->rc==SQLITE_OK );
+ iOff = (i64)(pFrame->iWalFrame-1) * (p->pgsz + 24) + 32 + 24;
+ p->rc = pWal->pMethods->xRead(pWal, p->aBuf, p->pgsz, iOff);
+ if( p->rc ) return;
+
+ iOff = (i64)(pFrame->iDbPage-1) * p->pgsz;
+ p->rc = pDb->pMethods->xWrite(pDb, p->aBuf, p->pgsz, iOff);
+}
+
+
+/*
+** Take an EXCLUSIVE lock on the database file.
+*/
+static void rbuLockDatabase(sqlite3rbu *p){
+ sqlite3_file *pReal = p->pTargetFd->pReal;
+ assert( p->rc==SQLITE_OK );
+ p->rc = pReal->pMethods->xLock(pReal, SQLITE_LOCK_SHARED);
+ if( p->rc==SQLITE_OK ){
+ p->rc = pReal->pMethods->xLock(pReal, SQLITE_LOCK_EXCLUSIVE);
+ }
+}
+
+#if defined(_WIN32_WCE)
+static LPWSTR rbuWinUtf8ToUnicode(const char *zFilename){
+ int nChar;
+ LPWSTR zWideFilename;
+
+ nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
+ if( nChar==0 ){
+ return 0;
+ }
+ zWideFilename = sqlite3_malloc( nChar*sizeof(zWideFilename[0]) );
+ if( zWideFilename==0 ){
+ return 0;
+ }
+ memset(zWideFilename, 0, nChar*sizeof(zWideFilename[0]));
+ nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename,
+ nChar);
+ if( nChar==0 ){
+ sqlite3_free(zWideFilename);
+ zWideFilename = 0;
+ }
+ return zWideFilename;
+}
+#endif
+
+/*
+** The RBU handle is currently in RBU_STAGE_OAL state, with a SHARED lock
+** on the database file. This proc moves the *-oal file to the *-wal path,
+** then reopens the database file (this time in vanilla, non-oal, WAL mode).
+** If an error occurs, leave an error code and error message in the rbu
+** handle.
+*/
+static void rbuMoveOalFile(sqlite3rbu *p){
+ const char *zBase = sqlite3_db_filename(p->dbMain, "main");
+
+ char *zWal = sqlite3_mprintf("%s-wal", zBase);
+ char *zOal = sqlite3_mprintf("%s-oal", zBase);
+
+ assert( p->eStage==RBU_STAGE_MOVE );
+ assert( p->rc==SQLITE_OK && p->zErrmsg==0 );
+ if( zWal==0 || zOal==0 ){
+ p->rc = SQLITE_NOMEM;
+ }else{
+ /* Move the *-oal file to *-wal. At this point connection p->db is
+ ** holding a SHARED lock on the target database file (because it is
+ ** in WAL mode). So no other connection may be writing the db.
+ **
+ ** In order to ensure that there are no database readers, an EXCLUSIVE
+ ** lock is obtained here before the *-oal is moved to *-wal.
+ */
+ rbuLockDatabase(p);
+ if( p->rc==SQLITE_OK ){
+ rbuFileSuffix3(zBase, zWal);
+ rbuFileSuffix3(zBase, zOal);
+
+ /* Re-open the databases. */
+ rbuObjIterFinalize(&p->objiter);
+ sqlite3_close(p->dbMain);
+ sqlite3_close(p->dbRbu);
+ p->dbMain = 0;
+ p->dbRbu = 0;
+
+#if defined(_WIN32_WCE)
+ {
+ LPWSTR zWideOal;
+ LPWSTR zWideWal;
+
+ zWideOal = rbuWinUtf8ToUnicode(zOal);
+ if( zWideOal ){
+ zWideWal = rbuWinUtf8ToUnicode(zWal);
+ if( zWideWal ){
+ if( MoveFileW(zWideOal, zWideWal) ){
+ p->rc = SQLITE_OK;
+ }else{
+ p->rc = SQLITE_IOERR;
+ }
+ sqlite3_free(zWideWal);
+ }else{
+ p->rc = SQLITE_IOERR_NOMEM;
+ }
+ sqlite3_free(zWideOal);
+ }else{
+ p->rc = SQLITE_IOERR_NOMEM;
+ }
+ }
+#else
+ p->rc = rename(zOal, zWal) ? SQLITE_IOERR : SQLITE_OK;
+#endif
+
+ if( p->rc==SQLITE_OK ){
+ rbuOpenDatabase(p);
+ rbuSetupCheckpoint(p, 0);
+ }
+ }
+ }
+
+ sqlite3_free(zWal);
+ sqlite3_free(zOal);
+}
+
+/*
+** The SELECT statement iterating through the keys for the current object
+** (p->objiter.pSelect) currently points to a valid row. This function
+** determines the type of operation requested by this row and returns
+** one of the following values to indicate the result:
+**
+** * RBU_INSERT
+** * RBU_DELETE
+** * RBU_IDX_DELETE
+** * RBU_UPDATE
+**
+** If RBU_UPDATE is returned, then output variable *pzMask is set to
+** point to the text value indicating the columns to update.
+**
+** If the rbu_control field contains an invalid value, an error code and
+** message are left in the RBU handle and zero returned.
+*/
+static int rbuStepType(sqlite3rbu *p, const char **pzMask){
+ int iCol = p->objiter.nCol; /* Index of rbu_control column */
+ int res = 0; /* Return value */
+
+ switch( sqlite3_column_type(p->objiter.pSelect, iCol) ){
+ case SQLITE_INTEGER: {
+ int iVal = sqlite3_column_int(p->objiter.pSelect, iCol);
+ if( iVal==0 ){
+ res = RBU_INSERT;
+ }else if( iVal==1 ){
+ res = RBU_DELETE;
+ }else if( iVal==2 ){
+ res = RBU_IDX_DELETE;
+ }else if( iVal==3 ){
+ res = RBU_IDX_INSERT;
+ }
+ break;
+ }
+
+ case SQLITE_TEXT: {
+ const unsigned char *z = sqlite3_column_text(p->objiter.pSelect, iCol);
+ if( z==0 ){
+ p->rc = SQLITE_NOMEM;
+ }else{
+ *pzMask = (const char*)z;
+ }
+ res = RBU_UPDATE;
+
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ if( res==0 ){
+ rbuBadControlError(p);
+ }
+ return res;
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** Assert that column iCol of statement pStmt is named zName.
+*/
+static void assertColumnName(sqlite3_stmt *pStmt, int iCol, const char *zName){
+ const char *zCol = sqlite3_column_name(pStmt, iCol);
+ assert( 0==sqlite3_stricmp(zName, zCol) );
+}
+#else
+# define assertColumnName(x,y,z)
+#endif
+
+/*
+** This function does the work for an sqlite3rbu_step() call.
+**
+** The object-iterator (p->objiter) currently points to a valid object,
+** and the input cursor (p->objiter.pSelect) currently points to a valid
+** input row. Perform whatever processing is required and return.
+**
+** If no error occurs, SQLITE_OK is returned. Otherwise, an error code
+** and message is left in the RBU handle and a copy of the error code
+** returned.
+*/
+static int rbuStep(sqlite3rbu *p){
+ RbuObjIter *pIter = &p->objiter;
+ const char *zMask = 0;
+ int i;
+ int eType = rbuStepType(p, &zMask);
+
+ if( eType ){
+ assert( eType!=RBU_UPDATE || pIter->zIdx==0 );
+
+ if( pIter->zIdx==0 && eType==RBU_IDX_DELETE ){
+ rbuBadControlError(p);
+ }
+ else if(
+ eType==RBU_INSERT
+ || eType==RBU_DELETE
+ || eType==RBU_IDX_DELETE
+ || eType==RBU_IDX_INSERT
+ ){
+ sqlite3_value *pVal;
+ sqlite3_stmt *pWriter;
+
+ assert( eType!=RBU_UPDATE );
+ assert( eType!=RBU_DELETE || pIter->zIdx==0 );
+
+ if( eType==RBU_IDX_DELETE || eType==RBU_DELETE ){
+ pWriter = pIter->pDelete;
+ }else{
+ pWriter = pIter->pInsert;
+ }
+
+ for(i=0; i<pIter->nCol; i++){
+ /* If this is an INSERT into a table b-tree and the table has an
+ ** explicit INTEGER PRIMARY KEY, check that this is not an attempt
+ ** to write a NULL into the IPK column. That is not permitted. */
+ if( eType==RBU_INSERT
+ && pIter->zIdx==0 && pIter->eType==RBU_PK_IPK && pIter->abTblPk[i]
+ && sqlite3_column_type(pIter->pSelect, i)==SQLITE_NULL
+ ){
+ p->rc = SQLITE_MISMATCH;
+ p->zErrmsg = sqlite3_mprintf("datatype mismatch");
+ goto step_out;
+ }
+
+ if( eType==RBU_DELETE && pIter->abTblPk[i]==0 ){
+ continue;
+ }
+
+ pVal = sqlite3_column_value(pIter->pSelect, i);
+ p->rc = sqlite3_bind_value(pWriter, i+1, pVal);
+ if( p->rc ) goto step_out;
+ }
+ if( pIter->zIdx==0
+ && (pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE)
+ ){
+ /* For a virtual table, or a table with no primary key, the
+ ** SELECT statement is:
+ **
+ ** SELECT <cols>, rbu_control, rbu_rowid FROM ....
+ **
+ ** Hence column_value(pIter->nCol+1).
+ */
+ assertColumnName(pIter->pSelect, pIter->nCol+1, "rbu_rowid");
+ pVal = sqlite3_column_value(pIter->pSelect, pIter->nCol+1);
+ p->rc = sqlite3_bind_value(pWriter, pIter->nCol+1, pVal);
+ }
+ if( p->rc==SQLITE_OK ){
+ sqlite3_step(pWriter);
+ p->rc = resetAndCollectError(pWriter, &p->zErrmsg);
+ }
+ }else{
+ sqlite3_value *pVal;
+ sqlite3_stmt *pUpdate = 0;
+ assert( eType==RBU_UPDATE );
+ rbuGetUpdateStmt(p, pIter, zMask, &pUpdate);
+ if( pUpdate ){
+ for(i=0; p->rc==SQLITE_OK && i<pIter->nCol; i++){
+ char c = zMask[pIter->aiSrcOrder[i]];
+ pVal = sqlite3_column_value(pIter->pSelect, i);
+ if( pIter->abTblPk[i] || c!='.' ){
+ p->rc = sqlite3_bind_value(pUpdate, i+1, pVal);
+ }
+ }
+ if( p->rc==SQLITE_OK
+ && (pIter->eType==RBU_PK_VTAB || pIter->eType==RBU_PK_NONE)
+ ){
+ /* Bind the rbu_rowid value to column _rowid_ */
+ assertColumnName(pIter->pSelect, pIter->nCol+1, "rbu_rowid");
+ pVal = sqlite3_column_value(pIter->pSelect, pIter->nCol+1);
+ p->rc = sqlite3_bind_value(pUpdate, pIter->nCol+1, pVal);
+ }
+ if( p->rc==SQLITE_OK ){
+ sqlite3_step(pUpdate);
+ p->rc = resetAndCollectError(pUpdate, &p->zErrmsg);
+ }
+ }
+ }
+ }
+
+ step_out:
+ return p->rc;
+}
+
+/*
+** Increment the schema cookie of the main database opened by p->dbMain.
+*/
+static void rbuIncrSchemaCookie(sqlite3rbu *p){
+ if( p->rc==SQLITE_OK ){
+ int iCookie = 1000000;
+ sqlite3_stmt *pStmt;
+
+ p->rc = prepareAndCollectError(p->dbMain, &pStmt, &p->zErrmsg,
+ "PRAGMA schema_version"
+ );
+ if( p->rc==SQLITE_OK ){
+ /* Coverage: it may be that this sqlite3_step() cannot fail. There
+ ** is already a transaction open, so the prepared statement cannot
+ ** throw an SQLITE_SCHEMA exception. The only database page the
+ ** statement reads is page 1, which is guaranteed to be in the cache.
+ ** And no memory allocations are required. */
+ if( SQLITE_ROW==sqlite3_step(pStmt) ){
+ iCookie = sqlite3_column_int(pStmt, 0);
+ }
+ rbuFinalize(p, pStmt);
+ }
+ if( p->rc==SQLITE_OK ){
+ rbuMPrintfExec(p, p->dbMain, "PRAGMA schema_version = %d", iCookie+1);
+ }
+ }
+}
+
+/*
+** Update the contents of the rbu_state table within the rbu database. The
+** value stored in the RBU_STATE_STAGE column is eStage. All other values
+** are determined by inspecting the rbu handle passed as the first argument.
+*/
+static void rbuSaveState(sqlite3rbu *p, int eStage){
+ if( p->rc==SQLITE_OK || p->rc==SQLITE_DONE ){
+ sqlite3_stmt *pInsert = 0;
+ int rc;
+
+ assert( p->zErrmsg==0 );
+ rc = prepareFreeAndCollectError(p->dbRbu, &pInsert, &p->zErrmsg,
+ sqlite3_mprintf(
+ "INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES "
+ "(%d, %d), "
+ "(%d, %Q), "
+ "(%d, %Q), "
+ "(%d, %d), "
+ "(%d, %d), "
+ "(%d, %lld), "
+ "(%d, %lld), "
+ "(%d, %lld) ",
+ p->zStateDb,
+ RBU_STATE_STAGE, eStage,
+ RBU_STATE_TBL, p->objiter.zTbl,
+ RBU_STATE_IDX, p->objiter.zIdx,
+ RBU_STATE_ROW, p->nStep,
+ RBU_STATE_PROGRESS, p->nProgress,
+ RBU_STATE_CKPT, p->iWalCksum,
+ RBU_STATE_COOKIE, (i64)p->pTargetFd->iCookie,
+ RBU_STATE_OALSZ, p->iOalSz
+ )
+ );
+ assert( pInsert==0 || rc==SQLITE_OK );
+
+ if( rc==SQLITE_OK ){
+ sqlite3_step(pInsert);
+ rc = sqlite3_finalize(pInsert);
+ }
+ if( rc!=SQLITE_OK ) p->rc = rc;
+ }
+}
+
+
+/*
+** Step the RBU object.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_step(sqlite3rbu *p){
+ if( p ){
+ switch( p->eStage ){
+ case RBU_STAGE_OAL: {
+ RbuObjIter *pIter = &p->objiter;
+ while( p->rc==SQLITE_OK && pIter->zTbl ){
+
+ if( pIter->bCleanup ){
+ /* Clean up the rbu_tmp_xxx table for the previous table. It
+ ** cannot be dropped as there are currently active SQL statements.
+ ** But the contents can be deleted. */
+ if( pIter->abIndexed ){
+ rbuMPrintfExec(p, p->dbRbu,
+ "DELETE FROM %s.'rbu_tmp_%q'", p->zStateDb, pIter->zDataTbl
+ );
+ }
+ }else{
+ rbuObjIterPrepareAll(p, pIter, 0);
+
+ /* Advance to the next row to process. */
+ if( p->rc==SQLITE_OK ){
+ int rc = sqlite3_step(pIter->pSelect);
+ if( rc==SQLITE_ROW ){
+ p->nProgress++;
+ p->nStep++;
+ return rbuStep(p);
+ }
+ p->rc = sqlite3_reset(pIter->pSelect);
+ p->nStep = 0;
+ }
+ }
+
+ rbuObjIterNext(p, pIter);
+ }
+
+ if( p->rc==SQLITE_OK ){
+ assert( pIter->zTbl==0 );
+ rbuSaveState(p, RBU_STAGE_MOVE);
+ rbuIncrSchemaCookie(p);
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_exec(p->dbMain, "COMMIT", 0, 0, &p->zErrmsg);
+ }
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_exec(p->dbRbu, "COMMIT", 0, 0, &p->zErrmsg);
+ }
+ p->eStage = RBU_STAGE_MOVE;
+ }
+ break;
+ }
+
+ case RBU_STAGE_MOVE: {
+ if( p->rc==SQLITE_OK ){
+ rbuMoveOalFile(p);
+ p->nProgress++;
+ }
+ break;
+ }
+
+ case RBU_STAGE_CKPT: {
+ if( p->rc==SQLITE_OK ){
+ if( p->nStep>=p->nFrame ){
+ sqlite3_file *pDb = p->pTargetFd->pReal;
+
+ /* Sync the db file */
+ p->rc = pDb->pMethods->xSync(pDb, SQLITE_SYNC_NORMAL);
+
+ /* Update nBackfill */
+ if( p->rc==SQLITE_OK ){
+ void volatile *ptr;
+ p->rc = pDb->pMethods->xShmMap(pDb, 0, 32*1024, 0, &ptr);
+ if( p->rc==SQLITE_OK ){
+ ((u32 volatile*)ptr)[24] = p->iMaxFrame;
+ }
+ }
+
+ if( p->rc==SQLITE_OK ){
+ p->eStage = RBU_STAGE_DONE;
+ p->rc = SQLITE_DONE;
+ }
+ }else{
+ RbuFrame *pFrame = &p->aFrame[p->nStep];
+ rbuCheckpointFrame(p, pFrame);
+ p->nStep++;
+ }
+ p->nProgress++;
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+ return p->rc;
+ }else{
+ return SQLITE_NOMEM;
+ }
+}
+
+/*
+** Free an RbuState object allocated by rbuLoadState().
+*/
+static void rbuFreeState(RbuState *p){
+ if( p ){
+ sqlite3_free(p->zTbl);
+ sqlite3_free(p->zIdx);
+ sqlite3_free(p);
+ }
+}
+
+/*
+** Allocate an RbuState object and load the contents of the rbu_state
+** table into it. Return a pointer to the new object. It is the
+** responsibility of the caller to eventually free the object using
+** sqlite3_free().
+**
+** If an error occurs, leave an error code and message in the rbu handle
+** and return NULL.
+*/
+static RbuState *rbuLoadState(sqlite3rbu *p){
+ RbuState *pRet = 0;
+ sqlite3_stmt *pStmt = 0;
+ int rc;
+ int rc2;
+
+ pRet = (RbuState*)rbuMalloc(p, sizeof(RbuState));
+ if( pRet==0 ) return 0;
+
+ rc = prepareFreeAndCollectError(p->dbRbu, &pStmt, &p->zErrmsg,
+ sqlite3_mprintf("SELECT k, v FROM %s.rbu_state", p->zStateDb)
+ );
+ while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){
+ switch( sqlite3_column_int(pStmt, 0) ){
+ case RBU_STATE_STAGE:
+ pRet->eStage = sqlite3_column_int(pStmt, 1);
+ if( pRet->eStage!=RBU_STAGE_OAL
+ && pRet->eStage!=RBU_STAGE_MOVE
+ && pRet->eStage!=RBU_STAGE_CKPT
+ ){
+ p->rc = SQLITE_CORRUPT;
+ }
+ break;
+
+ case RBU_STATE_TBL:
+ pRet->zTbl = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);
+ break;
+
+ case RBU_STATE_IDX:
+ pRet->zIdx = rbuStrndup((char*)sqlite3_column_text(pStmt, 1), &rc);
+ break;
+
+ case RBU_STATE_ROW:
+ pRet->nRow = sqlite3_column_int(pStmt, 1);
+ break;
+
+ case RBU_STATE_PROGRESS:
+ pRet->nProgress = sqlite3_column_int64(pStmt, 1);
+ break;
+
+ case RBU_STATE_CKPT:
+ pRet->iWalCksum = sqlite3_column_int64(pStmt, 1);
+ break;
+
+ case RBU_STATE_COOKIE:
+ pRet->iCookie = (u32)sqlite3_column_int64(pStmt, 1);
+ break;
+
+ case RBU_STATE_OALSZ:
+ pRet->iOalSz = (u32)sqlite3_column_int64(pStmt, 1);
+ break;
+
+ default:
+ rc = SQLITE_CORRUPT;
+ break;
+ }
+ }
+ rc2 = sqlite3_finalize(pStmt);
+ if( rc==SQLITE_OK ) rc = rc2;
+
+ p->rc = rc;
+ return pRet;
+}
+
+/*
+** Compare strings z1 and z2, returning 0 if they are identical, or non-zero
+** otherwise. Either or both argument may be NULL. Two NULL values are
+** considered equal, and NULL is considered distinct from all other values.
+*/
+static int rbuStrCompare(const char *z1, const char *z2){
+ if( z1==0 && z2==0 ) return 0;
+ if( z1==0 || z2==0 ) return 1;
+ return (sqlite3_stricmp(z1, z2)!=0);
+}
+
+/*
+** This function is called as part of sqlite3rbu_open() when initializing
+** an rbu handle in OAL stage. If the rbu update has not started (i.e.
+** the rbu_state table was empty) it is a no-op. Otherwise, it arranges
+** things so that the next call to sqlite3rbu_step() continues on from
+** where the previous rbu handle left off.
+**
+** If an error occurs, an error code and error message are left in the
+** rbu handle passed as the first argument.
+*/
+static void rbuSetupOal(sqlite3rbu *p, RbuState *pState){
+ assert( p->rc==SQLITE_OK );
+ if( pState->zTbl ){
+ RbuObjIter *pIter = &p->objiter;
+ int rc = SQLITE_OK;
+
+ while( rc==SQLITE_OK && pIter->zTbl && (pIter->bCleanup
+ || rbuStrCompare(pIter->zIdx, pState->zIdx)
+ || rbuStrCompare(pIter->zTbl, pState->zTbl)
+ )){
+ rc = rbuObjIterNext(p, pIter);
+ }
+
+ if( rc==SQLITE_OK && !pIter->zTbl ){
+ rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf("rbu_state mismatch error");
+ }
+
+ if( rc==SQLITE_OK ){
+ p->nStep = pState->nRow;
+ rc = rbuObjIterPrepareAll(p, &p->objiter, p->nStep);
+ }
+
+ p->rc = rc;
+ }
+}
+
+/*
+** If there is a "*-oal" file in the file-system corresponding to the
+** target database in the file-system, delete it. If an error occurs,
+** leave an error code and error message in the rbu handle.
+*/
+static void rbuDeleteOalFile(sqlite3rbu *p){
+ char *zOal = rbuMPrintf(p, "%s-oal", p->zTarget);
+ if( zOal ){
+ sqlite3_vfs *pVfs = sqlite3_vfs_find(0);
+ assert( pVfs && p->rc==SQLITE_OK && p->zErrmsg==0 );
+ pVfs->xDelete(pVfs, zOal, 0);
+ sqlite3_free(zOal);
+ }
+}
+
+/*
+** Allocate a private rbu VFS for the rbu handle passed as the only
+** argument. This VFS will be used unless the call to sqlite3rbu_open()
+** specified a URI with a vfs=? option in place of a target database
+** file name.
+*/
+static void rbuCreateVfs(sqlite3rbu *p){
+ int rnd;
+ char zRnd[64];
+
+ assert( p->rc==SQLITE_OK );
+ sqlite3_randomness(sizeof(int), (void*)&rnd);
+ sqlite3_snprintf(sizeof(zRnd), zRnd, "rbu_vfs_%d", rnd);
+ p->rc = sqlite3rbu_create_vfs(zRnd, 0);
+ if( p->rc==SQLITE_OK ){
+ sqlite3_vfs *pVfs = sqlite3_vfs_find(zRnd);
+ assert( pVfs );
+ p->zVfsName = pVfs->zName;
+ }
+}
+
+/*
+** Destroy the private VFS created for the rbu handle passed as the only
+** argument by an earlier call to rbuCreateVfs().
+*/
+static void rbuDeleteVfs(sqlite3rbu *p){
+ if( p->zVfsName ){
+ sqlite3rbu_destroy_vfs(p->zVfsName);
+ p->zVfsName = 0;
+ }
+}
+
+/*
+** Open and return a new RBU handle.
+*/
+SQLITE_API sqlite3rbu *SQLITE_STDCALL sqlite3rbu_open(
+ const char *zTarget,
+ const char *zRbu,
+ const char *zState
+){
+ sqlite3rbu *p;
+ int nTarget = strlen(zTarget);
+ int nRbu = strlen(zRbu);
+ int nState = zState ? strlen(zState) : 0;
+
+ p = (sqlite3rbu*)sqlite3_malloc(sizeof(sqlite3rbu)+nTarget+1+nRbu+1+nState+1);
+ if( p ){
+ RbuState *pState = 0;
+
+ /* Create the custom VFS. */
+ memset(p, 0, sizeof(sqlite3rbu));
+ rbuCreateVfs(p);
+
+ /* Open the target database */
+ if( p->rc==SQLITE_OK ){
+ p->zTarget = (char*)&p[1];
+ memcpy(p->zTarget, zTarget, nTarget+1);
+ p->zRbu = &p->zTarget[nTarget+1];
+ memcpy(p->zRbu, zRbu, nRbu+1);
+ if( zState ){
+ p->zState = &p->zRbu[nRbu+1];
+ memcpy(p->zState, zState, nState+1);
+ }
+ rbuOpenDatabase(p);
+ }
+
+ /* If it has not already been created, create the rbu_state table */
+ rbuMPrintfExec(p, p->dbRbu, RBU_CREATE_STATE, p->zStateDb);
+
+ if( p->rc==SQLITE_OK ){
+ pState = rbuLoadState(p);
+ assert( pState || p->rc!=SQLITE_OK );
+ if( p->rc==SQLITE_OK ){
+
+ if( pState->eStage==0 ){
+ rbuDeleteOalFile(p);
+ p->eStage = RBU_STAGE_OAL;
+ }else{
+ p->eStage = pState->eStage;
+ }
+ p->nProgress = pState->nProgress;
+ p->iOalSz = pState->iOalSz;
+ }
+ }
+ assert( p->rc!=SQLITE_OK || p->eStage!=0 );
+
+ if( p->rc==SQLITE_OK && p->pTargetFd->pWalFd ){
+ if( p->eStage==RBU_STAGE_OAL ){
+ p->rc = SQLITE_ERROR;
+ p->zErrmsg = sqlite3_mprintf("cannot update wal mode database");
+ }else if( p->eStage==RBU_STAGE_MOVE ){
+ p->eStage = RBU_STAGE_CKPT;
+ p->nStep = 0;
+ }
+ }
+
+ if( p->rc==SQLITE_OK
+ && (p->eStage==RBU_STAGE_OAL || p->eStage==RBU_STAGE_MOVE)
+ && pState->eStage!=0 && p->pTargetFd->iCookie!=pState->iCookie
+ ){
+ /* At this point (pTargetFd->iCookie) contains the value of the
+ ** change-counter cookie (the thing that gets incremented when a
+ ** transaction is committed in rollback mode) currently stored on
+ ** page 1 of the database file. */
+ p->rc = SQLITE_BUSY;
+ p->zErrmsg = sqlite3_mprintf("database modified during rbu update");
+ }
+
+ if( p->rc==SQLITE_OK ){
+ if( p->eStage==RBU_STAGE_OAL ){
+ sqlite3 *db = p->dbMain;
+
+ /* Open transactions both databases. The *-oal file is opened or
+ ** created at this point. */
+ p->rc = sqlite3_exec(db, "BEGIN IMMEDIATE", 0, 0, &p->zErrmsg);
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3_exec(p->dbRbu, "BEGIN IMMEDIATE", 0, 0, &p->zErrmsg);
+ }
+
+ /* Check if the main database is a zipvfs db. If it is, set the upper
+ ** level pager to use "journal_mode=off". This prevents it from
+ ** generating a large journal using a temp file. */
+ if( p->rc==SQLITE_OK ){
+ int frc = sqlite3_file_control(db, "main", SQLITE_FCNTL_ZIPVFS, 0);
+ if( frc==SQLITE_OK ){
+ p->rc = sqlite3_exec(db, "PRAGMA journal_mode=off",0,0,&p->zErrmsg);
+ }
+ }
+
+ /* Point the object iterator at the first object */
+ if( p->rc==SQLITE_OK ){
+ p->rc = rbuObjIterFirst(p, &p->objiter);
+ }
+
+ /* If the RBU database contains no data_xxx tables, declare the RBU
+ ** update finished. */
+ if( p->rc==SQLITE_OK && p->objiter.zTbl==0 ){
+ p->rc = SQLITE_DONE;
+ }
+
+ if( p->rc==SQLITE_OK ){
+ rbuSetupOal(p, pState);
+ }
+
+ }else if( p->eStage==RBU_STAGE_MOVE ){
+ /* no-op */
+ }else if( p->eStage==RBU_STAGE_CKPT ){
+ rbuSetupCheckpoint(p, pState);
+ }else if( p->eStage==RBU_STAGE_DONE ){
+ p->rc = SQLITE_DONE;
+ }else{
+ p->rc = SQLITE_CORRUPT;
+ }
+ }
+
+ rbuFreeState(pState);
+ }
+
+ return p;
+}
+
+
+/*
+** Return the database handle used by pRbu.
+*/
+SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3rbu_db(sqlite3rbu *pRbu, int bRbu){
+ sqlite3 *db = 0;
+ if( pRbu ){
+ db = (bRbu ? pRbu->dbRbu : pRbu->dbMain);
+ }
+ return db;
+}
+
+
+/*
+** If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT,
+** then edit any error message string so as to remove all occurrences of
+** the pattern "rbu_imp_[0-9]*".
+*/
+static void rbuEditErrmsg(sqlite3rbu *p){
+ if( p->rc==SQLITE_CONSTRAINT && p->zErrmsg ){
+ int i;
+ int nErrmsg = strlen(p->zErrmsg);
+ for(i=0; i<(nErrmsg-8); i++){
+ if( memcmp(&p->zErrmsg[i], "rbu_imp_", 8)==0 ){
+ int nDel = 8;
+ while( p->zErrmsg[i+nDel]>='0' && p->zErrmsg[i+nDel]<='9' ) nDel++;
+ memmove(&p->zErrmsg[i], &p->zErrmsg[i+nDel], nErrmsg + 1 - i - nDel);
+ nErrmsg -= nDel;
+ }
+ }
+ }
+}
+
+/*
+** Close the RBU handle.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_close(sqlite3rbu *p, char **pzErrmsg){
+ int rc;
+ if( p ){
+
+ /* Commit the transaction to the *-oal file. */
+ if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
+ p->rc = sqlite3_exec(p->dbMain, "COMMIT", 0, 0, &p->zErrmsg);
+ }
+
+ rbuSaveState(p, p->eStage);
+
+ if( p->rc==SQLITE_OK && p->eStage==RBU_STAGE_OAL ){
+ p->rc = sqlite3_exec(p->dbRbu, "COMMIT", 0, 0, &p->zErrmsg);
+ }
+
+ /* Close any open statement handles. */
+ rbuObjIterFinalize(&p->objiter);
+
+ /* Close the open database handle and VFS object. */
+ sqlite3_close(p->dbMain);
+ sqlite3_close(p->dbRbu);
+ rbuDeleteVfs(p);
+ sqlite3_free(p->aBuf);
+ sqlite3_free(p->aFrame);
+
+ rbuEditErrmsg(p);
+ rc = p->rc;
+ *pzErrmsg = p->zErrmsg;
+ sqlite3_free(p);
+ }else{
+ rc = SQLITE_NOMEM;
+ *pzErrmsg = 0;
+ }
+ return rc;
+}
+
+/*
+** Return the total number of key-value operations (inserts, deletes or
+** updates) that have been performed on the target database since the
+** current RBU update was started.
+*/
+SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3rbu_progress(sqlite3rbu *pRbu){
+ return pRbu->nProgress;
+}
+
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_savestate(sqlite3rbu *p){
+ int rc = p->rc;
+
+ if( rc==SQLITE_DONE ) return SQLITE_OK;
+
+ assert( p->eStage>=RBU_STAGE_OAL && p->eStage<=RBU_STAGE_DONE );
+ if( p->eStage==RBU_STAGE_OAL ){
+ assert( rc!=SQLITE_DONE );
+ if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbMain, "COMMIT", 0, 0, 0);
+ }
+
+ p->rc = rc;
+ rbuSaveState(p, p->eStage);
+ rc = p->rc;
+
+ if( p->eStage==RBU_STAGE_OAL ){
+ assert( rc!=SQLITE_DONE );
+ if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbRbu, "COMMIT", 0, 0, 0);
+ if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbRbu, "BEGIN IMMEDIATE", 0, 0, 0);
+ if( rc==SQLITE_OK ) rc = sqlite3_exec(p->dbMain, "BEGIN IMMEDIATE", 0, 0,0);
+ }
+
+ p->rc = rc;
+ return rc;
+}
+
+/**************************************************************************
+** Beginning of RBU VFS shim methods. The VFS shim modifies the behaviour
+** of a standard VFS in the following ways:
+**
+** 1. Whenever the first page of a main database file is read or
+** written, the value of the change-counter cookie is stored in
+** rbu_file.iCookie. Similarly, the value of the "write-version"
+** database header field is stored in rbu_file.iWriteVer. This ensures
+** that the values are always trustworthy within an open transaction.
+**
+** 2. Whenever an SQLITE_OPEN_WAL file is opened, the (rbu_file.pWalFd)
+** member variable of the associated database file descriptor is set
+** to point to the new file. A mutex protected linked list of all main
+** db fds opened using a particular RBU VFS is maintained at
+** rbu_vfs.pMain to facilitate this.
+**
+** 3. Using a new file-control "SQLITE_FCNTL_RBU", a main db rbu_file
+** object can be marked as the target database of an RBU update. This
+** turns on the following extra special behaviour:
+**
+** 3a. If xAccess() is called to check if there exists a *-wal file
+** associated with an RBU target database currently in RBU_STAGE_OAL
+** stage (preparing the *-oal file), the following special handling
+** applies:
+**
+** * if the *-wal file does exist, return SQLITE_CANTOPEN. An RBU
+** target database may not be in wal mode already.
+**
+** * if the *-wal file does not exist, set the output parameter to
+** non-zero (to tell SQLite that it does exist) anyway.
+**
+** Then, when xOpen() is called to open the *-wal file associated with
+** the RBU target in RBU_STAGE_OAL stage, instead of opening the *-wal
+** file, the rbu vfs opens the corresponding *-oal file instead.
+**
+** 3b. The *-shm pages returned by xShmMap() for a target db file in
+** RBU_STAGE_OAL mode are actually stored in heap memory. This is to
+** avoid creating a *-shm file on disk. Additionally, xShmLock() calls
+** are no-ops on target database files in RBU_STAGE_OAL mode. This is
+** because assert() statements in some VFS implementations fail if
+** xShmLock() is called before xShmMap().
+**
+** 3c. If an EXCLUSIVE lock is attempted on a target database file in any
+** mode except RBU_STAGE_DONE (all work completed and checkpointed), it
+** fails with an SQLITE_BUSY error. This is to stop RBU connections
+** from automatically checkpointing a *-wal (or *-oal) file from within
+** sqlite3_close().
+**
+** 3d. In RBU_STAGE_CAPTURE mode, all xRead() calls on the wal file, and
+** all xWrite() calls on the target database file perform no IO.
+** Instead the frame and page numbers that would be read and written
+** are recorded. Additionally, successful attempts to obtain exclusive
+** xShmLock() WRITER, CHECKPOINTER and READ0 locks on the target
+** database file are recorded. xShmLock() calls to unlock the same
+** locks are no-ops (so that once obtained, these locks are never
+** relinquished). Finally, calls to xSync() on the target database
+** file fail with SQLITE_INTERNAL errors.
+*/
+
+static void rbuUnlockShm(rbu_file *p){
+ if( p->pRbu ){
+ int (*xShmLock)(sqlite3_file*,int,int,int) = p->pReal->pMethods->xShmLock;
+ int i;
+ for(i=0; i<SQLITE_SHM_NLOCK;i++){
+ if( (1<<i) & p->pRbu->mLock ){
+ xShmLock(p->pReal, i, 1, SQLITE_SHM_UNLOCK|SQLITE_SHM_EXCLUSIVE);
+ }
+ }
+ p->pRbu->mLock = 0;
+ }
+}
+
+/*
+** Close an rbu file.
+*/
+static int rbuVfsClose(sqlite3_file *pFile){
+ rbu_file *p = (rbu_file*)pFile;
+ int rc;
+ int i;
+
+ /* Free the contents of the apShm[] array. And the array itself. */
+ for(i=0; i<p->nShm; i++){
+ sqlite3_free(p->apShm[i]);
+ }
+ sqlite3_free(p->apShm);
+ p->apShm = 0;
+ sqlite3_free(p->zDel);
+
+ if( p->openFlags & SQLITE_OPEN_MAIN_DB ){
+ rbu_file **pp;
+ sqlite3_mutex_enter(p->pRbuVfs->mutex);
+ for(pp=&p->pRbuVfs->pMain; *pp!=p; pp=&((*pp)->pMainNext));
+ *pp = p->pMainNext;
+ sqlite3_mutex_leave(p->pRbuVfs->mutex);
+ rbuUnlockShm(p);
+ p->pReal->pMethods->xShmUnmap(p->pReal, 0);
+ }
+
+ /* Close the underlying file handle */
+ rc = p->pReal->pMethods->xClose(p->pReal);
+ return rc;
+}
+
+
+/*
+** Read and return an unsigned 32-bit big-endian integer from the buffer
+** passed as the only argument.
+*/
+static u32 rbuGetU32(u8 *aBuf){
+ return ((u32)aBuf[0] << 24)
+ + ((u32)aBuf[1] << 16)
+ + ((u32)aBuf[2] << 8)
+ + ((u32)aBuf[3]);
+}
+
+/*
+** Read data from an rbuVfs-file.
+*/
+static int rbuVfsRead(
+ sqlite3_file *pFile,
+ void *zBuf,
+ int iAmt,
+ sqlite_int64 iOfst
+){
+ rbu_file *p = (rbu_file*)pFile;
+ sqlite3rbu *pRbu = p->pRbu;
+ int rc;
+
+ if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){
+ assert( p->openFlags & SQLITE_OPEN_WAL );
+ rc = rbuCaptureWalRead(p->pRbu, iOfst, iAmt);
+ }else{
+ if( pRbu && pRbu->eStage==RBU_STAGE_OAL
+ && (p->openFlags & SQLITE_OPEN_WAL)
+ && iOfst>=pRbu->iOalSz
+ ){
+ rc = SQLITE_OK;
+ memset(zBuf, 0, iAmt);
+ }else{
+ rc = p->pReal->pMethods->xRead(p->pReal, zBuf, iAmt, iOfst);
+ }
+ if( rc==SQLITE_OK && iOfst==0 && (p->openFlags & SQLITE_OPEN_MAIN_DB) ){
+ /* These look like magic numbers. But they are stable, as they are part
+ ** of the definition of the SQLite file format, which may not change. */
+ u8 *pBuf = (u8*)zBuf;
+ p->iCookie = rbuGetU32(&pBuf[24]);
+ p->iWriteVer = pBuf[19];
+ }
+ }
+ return rc;
+}
+
+/*
+** Write data to an rbuVfs-file.
+*/
+static int rbuVfsWrite(
+ sqlite3_file *pFile,
+ const void *zBuf,
+ int iAmt,
+ sqlite_int64 iOfst
+){
+ rbu_file *p = (rbu_file*)pFile;
+ sqlite3rbu *pRbu = p->pRbu;
+ int rc;
+
+ if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){
+ assert( p->openFlags & SQLITE_OPEN_MAIN_DB );
+ rc = rbuCaptureDbWrite(p->pRbu, iOfst);
+ }else{
+ if( pRbu && pRbu->eStage==RBU_STAGE_OAL
+ && (p->openFlags & SQLITE_OPEN_WAL)
+ && iOfst>=pRbu->iOalSz
+ ){
+ pRbu->iOalSz = iAmt + iOfst;
+ }
+ rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst);
+ if( rc==SQLITE_OK && iOfst==0 && (p->openFlags & SQLITE_OPEN_MAIN_DB) ){
+ /* These look like magic numbers. But they are stable, as they are part
+ ** of the definition of the SQLite file format, which may not change. */
+ u8 *pBuf = (u8*)zBuf;
+ p->iCookie = rbuGetU32(&pBuf[24]);
+ p->iWriteVer = pBuf[19];
+ }
+ }
+ return rc;
+}
+
+/*
+** Truncate an rbuVfs-file.
+*/
+static int rbuVfsTruncate(sqlite3_file *pFile, sqlite_int64 size){
+ rbu_file *p = (rbu_file*)pFile;
+ return p->pReal->pMethods->xTruncate(p->pReal, size);
+}
+
+/*
+** Sync an rbuVfs-file.
+*/
+static int rbuVfsSync(sqlite3_file *pFile, int flags){
+ rbu_file *p = (rbu_file *)pFile;
+ if( p->pRbu && p->pRbu->eStage==RBU_STAGE_CAPTURE ){
+ if( p->openFlags & SQLITE_OPEN_MAIN_DB ){
+ return SQLITE_INTERNAL;
+ }
+ return SQLITE_OK;
+ }
+ return p->pReal->pMethods->xSync(p->pReal, flags);
+}
+
+/*
+** Return the current file-size of an rbuVfs-file.
+*/
+static int rbuVfsFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
+ rbu_file *p = (rbu_file *)pFile;
+ return p->pReal->pMethods->xFileSize(p->pReal, pSize);
+}
+
+/*
+** Lock an rbuVfs-file.
+*/
+static int rbuVfsLock(sqlite3_file *pFile, int eLock){
+ rbu_file *p = (rbu_file*)pFile;
+ sqlite3rbu *pRbu = p->pRbu;
+ int rc = SQLITE_OK;
+
+ assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
+ if( pRbu && eLock==SQLITE_LOCK_EXCLUSIVE && pRbu->eStage!=RBU_STAGE_DONE ){
+ /* Do not allow EXCLUSIVE locks. Preventing SQLite from taking this
+ ** prevents it from checkpointing the database from sqlite3_close(). */
+ rc = SQLITE_BUSY;
+ }else{
+ rc = p->pReal->pMethods->xLock(p->pReal, eLock);
+ }
+
+ return rc;
+}
+
+/*
+** Unlock an rbuVfs-file.
+*/
+static int rbuVfsUnlock(sqlite3_file *pFile, int eLock){
+ rbu_file *p = (rbu_file *)pFile;
+ return p->pReal->pMethods->xUnlock(p->pReal, eLock);
+}
+
+/*
+** Check if another file-handle holds a RESERVED lock on an rbuVfs-file.
+*/
+static int rbuVfsCheckReservedLock(sqlite3_file *pFile, int *pResOut){
+ rbu_file *p = (rbu_file *)pFile;
+ return p->pReal->pMethods->xCheckReservedLock(p->pReal, pResOut);
+}
+
+/*
+** File control method. For custom operations on an rbuVfs-file.
+*/
+static int rbuVfsFileControl(sqlite3_file *pFile, int op, void *pArg){
+ rbu_file *p = (rbu_file *)pFile;
+ int (*xControl)(sqlite3_file*,int,void*) = p->pReal->pMethods->xFileControl;
+ int rc;
+
+ assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB)
+ || p->openFlags & (SQLITE_OPEN_TRANSIENT_DB|SQLITE_OPEN_TEMP_JOURNAL)
+ );
+ if( op==SQLITE_FCNTL_RBU ){
+ sqlite3rbu *pRbu = (sqlite3rbu*)pArg;
+
+ /* First try to find another RBU vfs lower down in the vfs stack. If
+ ** one is found, this vfs will operate in pass-through mode. The lower
+ ** level vfs will do the special RBU handling. */
+ rc = xControl(p->pReal, op, pArg);
+
+ if( rc==SQLITE_NOTFOUND ){
+ /* Now search for a zipvfs instance lower down in the VFS stack. If
+ ** one is found, this is an error. */
+ void *dummy = 0;
+ rc = xControl(p->pReal, SQLITE_FCNTL_ZIPVFS, &dummy);
+ if( rc==SQLITE_OK ){
+ rc = SQLITE_ERROR;
+ pRbu->zErrmsg = sqlite3_mprintf("rbu/zipvfs setup error");
+ }else if( rc==SQLITE_NOTFOUND ){
+ pRbu->pTargetFd = p;
+ p->pRbu = pRbu;
+ if( p->pWalFd ) p->pWalFd->pRbu = pRbu;
+ rc = SQLITE_OK;
+ }
+ }
+ return rc;
+ }
+
+ rc = xControl(p->pReal, op, pArg);
+ if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){
+ rbu_vfs *pRbuVfs = p->pRbuVfs;
+ char *zIn = *(char**)pArg;
+ char *zOut = sqlite3_mprintf("rbu(%s)/%z", pRbuVfs->base.zName, zIn);
+ *(char**)pArg = zOut;
+ if( zOut==0 ) rc = SQLITE_NOMEM;
+ }
+
+ return rc;
+}
+
+/*
+** Return the sector-size in bytes for an rbuVfs-file.
+*/
+static int rbuVfsSectorSize(sqlite3_file *pFile){
+ rbu_file *p = (rbu_file *)pFile;
+ return p->pReal->pMethods->xSectorSize(p->pReal);
+}
+
+/*
+** Return the device characteristic flags supported by an rbuVfs-file.
+*/
+static int rbuVfsDeviceCharacteristics(sqlite3_file *pFile){
+ rbu_file *p = (rbu_file *)pFile;
+ return p->pReal->pMethods->xDeviceCharacteristics(p->pReal);
+}
+
+/*
+** Take or release a shared-memory lock.
+*/
+static int rbuVfsShmLock(sqlite3_file *pFile, int ofst, int n, int flags){
+ rbu_file *p = (rbu_file*)pFile;
+ sqlite3rbu *pRbu = p->pRbu;
+ int rc = SQLITE_OK;
+
+#ifdef SQLITE_AMALGAMATION
+ assert( WAL_CKPT_LOCK==1 );
+#endif
+
+ assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
+ if( pRbu && (pRbu->eStage==RBU_STAGE_OAL || pRbu->eStage==RBU_STAGE_MOVE) ){
+ /* Magic number 1 is the WAL_CKPT_LOCK lock. Preventing SQLite from
+ ** taking this lock also prevents any checkpoints from occurring.
+ ** todo: really, it's not clear why this might occur, as
+ ** wal_autocheckpoint ought to be turned off. */
+ if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;
+ }else{
+ int bCapture = 0;
+ if( n==1 && (flags & SQLITE_SHM_EXCLUSIVE)
+ && pRbu && pRbu->eStage==RBU_STAGE_CAPTURE
+ && (ofst==WAL_LOCK_WRITE || ofst==WAL_LOCK_CKPT || ofst==WAL_LOCK_READ0)
+ ){
+ bCapture = 1;
+ }
+
+ if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){
+ rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
+ if( bCapture && rc==SQLITE_OK ){
+ pRbu->mLock |= (1 << ofst);
+ }
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Obtain a pointer to a mapping of a single 32KiB page of the *-shm file.
+*/
+static int rbuVfsShmMap(
+ sqlite3_file *pFile,
+ int iRegion,
+ int szRegion,
+ int isWrite,
+ void volatile **pp
+){
+ rbu_file *p = (rbu_file*)pFile;
+ int rc = SQLITE_OK;
+ int eStage = (p->pRbu ? p->pRbu->eStage : 0);
+
+ /* If not in RBU_STAGE_OAL, allow this call to pass through. Or, if this
+ ** rbu is in the RBU_STAGE_OAL state, use heap memory for *-shm space
+ ** instead of a file on disk. */
+ assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
+ if( eStage==RBU_STAGE_OAL || eStage==RBU_STAGE_MOVE ){
+ if( iRegion<=p->nShm ){
+ int nByte = (iRegion+1) * sizeof(char*);
+ char **apNew = (char**)sqlite3_realloc(p->apShm, nByte);
+ if( apNew==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(&apNew[p->nShm], 0, sizeof(char*) * (1 + iRegion - p->nShm));
+ p->apShm = apNew;
+ p->nShm = iRegion+1;
+ }
+ }
+
+ if( rc==SQLITE_OK && p->apShm[iRegion]==0 ){
+ char *pNew = (char*)sqlite3_malloc(szRegion);
+ if( pNew==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(pNew, 0, szRegion);
+ p->apShm[iRegion] = pNew;
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ *pp = p->apShm[iRegion];
+ }else{
+ *pp = 0;
+ }
+ }else{
+ assert( p->apShm==0 );
+ rc = p->pReal->pMethods->xShmMap(p->pReal, iRegion, szRegion, isWrite, pp);
+ }
+
+ return rc;
+}
+
+/*
+** Memory barrier.
+*/
+static void rbuVfsShmBarrier(sqlite3_file *pFile){
+ rbu_file *p = (rbu_file *)pFile;
+ p->pReal->pMethods->xShmBarrier(p->pReal);
+}
+
+/*
+** The xShmUnmap method.
+*/
+static int rbuVfsShmUnmap(sqlite3_file *pFile, int delFlag){
+ rbu_file *p = (rbu_file*)pFile;
+ int rc = SQLITE_OK;
+ int eStage = (p->pRbu ? p->pRbu->eStage : 0);
+
+ assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
+ if( eStage==RBU_STAGE_OAL || eStage==RBU_STAGE_MOVE ){
+ /* no-op */
+ }else{
+ /* Release the checkpointer and writer locks */
+ rbuUnlockShm(p);
+ rc = p->pReal->pMethods->xShmUnmap(p->pReal, delFlag);
+ }
+ return rc;
+}
+
+/*
+** Given that zWal points to a buffer containing a wal file name passed to
+** either the xOpen() or xAccess() VFS method, return a pointer to the
+** file-handle opened by the same database connection on the corresponding
+** database file.
+*/
+static rbu_file *rbuFindMaindb(rbu_vfs *pRbuVfs, const char *zWal){
+ rbu_file *pDb;
+ sqlite3_mutex_enter(pRbuVfs->mutex);
+ for(pDb=pRbuVfs->pMain; pDb && pDb->zWal!=zWal; pDb=pDb->pMainNext);
+ sqlite3_mutex_leave(pRbuVfs->mutex);
+ return pDb;
+}
+
+/*
+** Open an rbu file handle.
+*/
+static int rbuVfsOpen(
+ sqlite3_vfs *pVfs,
+ const char *zName,
+ sqlite3_file *pFile,
+ int flags,
+ int *pOutFlags
+){
+ static sqlite3_io_methods rbuvfs_io_methods = {
+ 2, /* iVersion */
+ rbuVfsClose, /* xClose */
+ rbuVfsRead, /* xRead */
+ rbuVfsWrite, /* xWrite */
+ rbuVfsTruncate, /* xTruncate */
+ rbuVfsSync, /* xSync */
+ rbuVfsFileSize, /* xFileSize */
+ rbuVfsLock, /* xLock */
+ rbuVfsUnlock, /* xUnlock */
+ rbuVfsCheckReservedLock, /* xCheckReservedLock */
+ rbuVfsFileControl, /* xFileControl */
+ rbuVfsSectorSize, /* xSectorSize */
+ rbuVfsDeviceCharacteristics, /* xDeviceCharacteristics */
+ rbuVfsShmMap, /* xShmMap */
+ rbuVfsShmLock, /* xShmLock */
+ rbuVfsShmBarrier, /* xShmBarrier */
+ rbuVfsShmUnmap, /* xShmUnmap */
+ 0, 0 /* xFetch, xUnfetch */
+ };
+ rbu_vfs *pRbuVfs = (rbu_vfs*)pVfs;
+ sqlite3_vfs *pRealVfs = pRbuVfs->pRealVfs;
+ rbu_file *pFd = (rbu_file *)pFile;
+ int rc = SQLITE_OK;
+ const char *zOpen = zName;
+
+ memset(pFd, 0, sizeof(rbu_file));
+ pFd->pReal = (sqlite3_file*)&pFd[1];
+ pFd->pRbuVfs = pRbuVfs;
+ pFd->openFlags = flags;
+ if( zName ){
+ if( flags & SQLITE_OPEN_MAIN_DB ){
+ /* A main database has just been opened. The following block sets
+ ** (pFd->zWal) to point to a buffer owned by SQLite that contains
+ ** the name of the *-wal file this db connection will use. SQLite
+ ** happens to pass a pointer to this buffer when using xAccess()
+ ** or xOpen() to operate on the *-wal file. */
+ int n = strlen(zName);
+ const char *z = &zName[n];
+ if( flags & SQLITE_OPEN_URI ){
+ int odd = 0;
+ while( 1 ){
+ if( z[0]==0 ){
+ odd = 1 - odd;
+ if( odd && z[1]==0 ) break;
+ }
+ z++;
+ }
+ z += 2;
+ }else{
+ while( *z==0 ) z++;
+ }
+ z += (n + 8 + 1);
+ pFd->zWal = z;
+ }
+ else if( flags & SQLITE_OPEN_WAL ){
+ rbu_file *pDb = rbuFindMaindb(pRbuVfs, zName);
+ if( pDb ){
+ if( pDb->pRbu && pDb->pRbu->eStage==RBU_STAGE_OAL ){
+ /* This call is to open a *-wal file. Intead, open the *-oal. This
+ ** code ensures that the string passed to xOpen() is terminated by a
+ ** pair of '\0' bytes in case the VFS attempts to extract a URI
+ ** parameter from it. */
+ int nCopy = strlen(zName);
+ char *zCopy = sqlite3_malloc(nCopy+2);
+ if( zCopy ){
+ memcpy(zCopy, zName, nCopy);
+ zCopy[nCopy-3] = 'o';
+ zCopy[nCopy] = '\0';
+ zCopy[nCopy+1] = '\0';
+ zOpen = (const char*)(pFd->zDel = zCopy);
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+ pFd->pRbu = pDb->pRbu;
+ }
+ pDb->pWalFd = pFd;
+ }
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = pRealVfs->xOpen(pRealVfs, zOpen, pFd->pReal, flags, pOutFlags);
+ }
+ if( pFd->pReal->pMethods ){
+ /* The xOpen() operation has succeeded. Set the sqlite3_file.pMethods
+ ** pointer and, if the file is a main database file, link it into the
+ ** mutex protected linked list of all such files. */
+ pFile->pMethods = &rbuvfs_io_methods;
+ if( flags & SQLITE_OPEN_MAIN_DB ){
+ sqlite3_mutex_enter(pRbuVfs->mutex);
+ pFd->pMainNext = pRbuVfs->pMain;
+ pRbuVfs->pMain = pFd;
+ sqlite3_mutex_leave(pRbuVfs->mutex);
+ }
+ }else{
+ sqlite3_free(pFd->zDel);
+ }
+
+ return rc;
+}
+
+/*
+** Delete the file located at zPath.
+*/
+static int rbuVfsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xDelete(pRealVfs, zPath, dirSync);
+}
+
+/*
+** Test for access permissions. Return true if the requested permission
+** is available, or false otherwise.
+*/
+static int rbuVfsAccess(
+ sqlite3_vfs *pVfs,
+ const char *zPath,
+ int flags,
+ int *pResOut
+){
+ rbu_vfs *pRbuVfs = (rbu_vfs*)pVfs;
+ sqlite3_vfs *pRealVfs = pRbuVfs->pRealVfs;
+ int rc;
+
+ rc = pRealVfs->xAccess(pRealVfs, zPath, flags, pResOut);
+
+ /* If this call is to check if a *-wal file associated with an RBU target
+ ** database connection exists, and the RBU update is in RBU_STAGE_OAL,
+ ** the following special handling is activated:
+ **
+ ** a) if the *-wal file does exist, return SQLITE_CANTOPEN. This
+ ** ensures that the RBU extension never tries to update a database
+ ** in wal mode, even if the first page of the database file has
+ ** been damaged.
+ **
+ ** b) if the *-wal file does not exist, claim that it does anyway,
+ ** causing SQLite to call xOpen() to open it. This call will also
+ ** be intercepted (see the rbuVfsOpen() function) and the *-oal
+ ** file opened instead.
+ */
+ if( rc==SQLITE_OK && flags==SQLITE_ACCESS_EXISTS ){
+ rbu_file *pDb = rbuFindMaindb(pRbuVfs, zPath);
+ if( pDb && pDb->pRbu && pDb->pRbu->eStage==RBU_STAGE_OAL ){
+ if( *pResOut ){
+ rc = SQLITE_CANTOPEN;
+ }else{
+ *pResOut = 1;
+ }
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Populate buffer zOut with the full canonical pathname corresponding
+** to the pathname in zPath. zOut is guaranteed to point to a buffer
+** of at least (DEVSYM_MAX_PATHNAME+1) bytes.
+*/
+static int rbuVfsFullPathname(
+ sqlite3_vfs *pVfs,
+ const char *zPath,
+ int nOut,
+ char *zOut
+){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xFullPathname(pRealVfs, zPath, nOut, zOut);
+}
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+/*
+** Open the dynamic library located at zPath and return a handle.
+*/
+static void *rbuVfsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xDlOpen(pRealVfs, zPath);
+}
+
+/*
+** Populate the buffer zErrMsg (size nByte bytes) with a human readable
+** utf-8 string describing the most recent error encountered associated
+** with dynamic libraries.
+*/
+static void rbuVfsDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ pRealVfs->xDlError(pRealVfs, nByte, zErrMsg);
+}
+
+/*
+** Return a pointer to the symbol zSymbol in the dynamic library pHandle.
+*/
+static void (*rbuVfsDlSym(
+ sqlite3_vfs *pVfs,
+ void *pArg,
+ const char *zSym
+))(void){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xDlSym(pRealVfs, pArg, zSym);
+}
+
+/*
+** Close the dynamic library handle pHandle.
+*/
+static void rbuVfsDlClose(sqlite3_vfs *pVfs, void *pHandle){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ pRealVfs->xDlClose(pRealVfs, pHandle);
+}
+#endif /* SQLITE_OMIT_LOAD_EXTENSION */
+
+/*
+** Populate the buffer pointed to by zBufOut with nByte bytes of
+** random data.
+*/
+static int rbuVfsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xRandomness(pRealVfs, nByte, zBufOut);
+}
+
+/*
+** Sleep for nMicro microseconds. Return the number of microseconds
+** actually slept.
+*/
+static int rbuVfsSleep(sqlite3_vfs *pVfs, int nMicro){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xSleep(pRealVfs, nMicro);
+}
+
+/*
+** Return the current time as a Julian Day number in *pTimeOut.
+*/
+static int rbuVfsCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){
+ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs;
+ return pRealVfs->xCurrentTime(pRealVfs, pTimeOut);
+}
+
+/*
+** No-op.
+*/
+static int rbuVfsGetLastError(sqlite3_vfs *pVfs, int a, char *b){
+ return 0;
+}
+
+/*
+** Deregister and destroy an RBU vfs created by an earlier call to
+** sqlite3rbu_create_vfs().
+*/
+SQLITE_API void SQLITE_STDCALL sqlite3rbu_destroy_vfs(const char *zName){
+ sqlite3_vfs *pVfs = sqlite3_vfs_find(zName);
+ if( pVfs && pVfs->xOpen==rbuVfsOpen ){
+ sqlite3_mutex_free(((rbu_vfs*)pVfs)->mutex);
+ sqlite3_vfs_unregister(pVfs);
+ sqlite3_free(pVfs);
+ }
+}
+
+/*
+** Create an RBU VFS named zName that accesses the underlying file-system
+** via existing VFS zParent. The new object is registered as a non-default
+** VFS with SQLite before returning.
+*/
+SQLITE_API int SQLITE_STDCALL sqlite3rbu_create_vfs(const char *zName, const char *zParent){
+
+ /* Template for VFS */
+ static sqlite3_vfs vfs_template = {
+ 1, /* iVersion */
+ 0, /* szOsFile */
+ 0, /* mxPathname */
+ 0, /* pNext */
+ 0, /* zName */
+ 0, /* pAppData */
+ rbuVfsOpen, /* xOpen */
+ rbuVfsDelete, /* xDelete */
+ rbuVfsAccess, /* xAccess */
+ rbuVfsFullPathname, /* xFullPathname */
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+ rbuVfsDlOpen, /* xDlOpen */
+ rbuVfsDlError, /* xDlError */
+ rbuVfsDlSym, /* xDlSym */
+ rbuVfsDlClose, /* xDlClose */
+#else
+ 0, 0, 0, 0,
+#endif
+
+ rbuVfsRandomness, /* xRandomness */
+ rbuVfsSleep, /* xSleep */
+ rbuVfsCurrentTime, /* xCurrentTime */
+ rbuVfsGetLastError, /* xGetLastError */
+ 0, /* xCurrentTimeInt64 (version 2) */
+ 0, 0, 0 /* Unimplemented version 3 methods */
+ };
+
+ rbu_vfs *pNew = 0; /* Newly allocated VFS */
+ int nName;
+ int rc = SQLITE_OK;
+
+ int nByte;
+ nName = strlen(zName);
+ nByte = sizeof(rbu_vfs) + nName + 1;
+ pNew = (rbu_vfs*)sqlite3_malloc(nByte);
+ if( pNew==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ sqlite3_vfs *pParent; /* Parent VFS */
+ memset(pNew, 0, nByte);
+ pParent = sqlite3_vfs_find(zParent);
+ if( pParent==0 ){
+ rc = SQLITE_NOTFOUND;
+ }else{
+ char *zSpace;
+ memcpy(&pNew->base, &vfs_template, sizeof(sqlite3_vfs));
+ pNew->base.mxPathname = pParent->mxPathname;
+ pNew->base.szOsFile = sizeof(rbu_file) + pParent->szOsFile;
+ pNew->pRealVfs = pParent;
+ pNew->base.zName = (const char*)(zSpace = (char*)&pNew[1]);
+ memcpy(zSpace, zName, nName);
+
+ /* Allocate the mutex and register the new VFS (not as the default) */
+ pNew->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_RECURSIVE);
+ if( pNew->mutex==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ rc = sqlite3_vfs_register(&pNew->base, 0);
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3_mutex_free(pNew->mutex);
+ sqlite3_free(pNew);
+ }
+ }
+
+ return rc;
+}
+
+
+/**************************************************************************/
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) */
+
+/************** End of sqlite3rbu.c ******************************************/
/************** Begin file dbstat.c ******************************************/
/*
** 2010 July 12
@@ -155232,8 +162866,12 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
** information from an SQLite database in order to implement the
** "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script
** for an example implementation.
+**
+** Additional information is available on the "dbstat.html" page of the
+** official SQLite documentation.
*/
+/* #include "sqliteInt.h" ** Requires access to internal data structures ** */
#if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \
&& !defined(SQLITE_OMIT_VIRTUALTABLE)
@@ -155279,7 +162917,8 @@ SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
" unused INTEGER, /* Bytes of unused space on this page */" \
" mx_payload INTEGER, /* Largest payload size of all cells */" \
" pgoffset INTEGER, /* Offset of page in file */" \
- " pgsize INTEGER /* Size of the page */" \
+ " pgsize INTEGER, /* Size of the page */" \
+ " schema TEXT HIDDEN /* Database schema being analyzed */" \
");"
@@ -155317,6 +162956,7 @@ struct StatCursor {
sqlite3_vtab_cursor base;
sqlite3_stmt *pStmt; /* Iterates through set of root pages */
int isEof; /* After pStmt has returned SQLITE_DONE */
+ int iDb; /* Schema used for this query */
StatPage aPage[32];
int iPage; /* Current entry in aPage[] */
@@ -155394,9 +163034,32 @@ static int statDisconnect(sqlite3_vtab *pVtab){
/*
** There is no "best-index". This virtual table always does a linear
-** scan of the binary VFS log file.
+** scan. However, a schema=? constraint should cause this table to
+** operate on a different database schema, so check for it.
+**
+** idxNum is normally 0, but will be 1 if a schema=? constraint exists.
*/
static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
+ int i;
+
+ pIdxInfo->estimatedCost = 1.0e6; /* Initial cost estimate */
+
+ /* Look for a valid schema=? constraint. If found, change the idxNum to
+ ** 1 and request the value of that constraint be sent to xFilter. And
+ ** lower the cost estimate to encourage the constrained version to be
+ ** used.
+ */
+ for(i=0; i<pIdxInfo->nConstraint; i++){
+ if( pIdxInfo->aConstraint[i].usable==0 ) continue;
+ if( pIdxInfo->aConstraint[i].op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
+ if( pIdxInfo->aConstraint[i].iColumn!=10 ) continue;
+ pIdxInfo->idxNum = 1;
+ pIdxInfo->estimatedCost = 1.0;
+ pIdxInfo->aConstraintUsage[i].argvIndex = 1;
+ pIdxInfo->aConstraintUsage[i].omit = 1;
+ break;
+ }
+
/* Records are always returned in ascending order of (name, path).
** If this will satisfy the client, set the orderByConsumed flag so that
@@ -155416,7 +163079,6 @@ static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
pIdxInfo->orderByConsumed = 1;
}
- pIdxInfo->estimatedCost = 10.0;
return SQLITE_OK;
}
@@ -155426,36 +163088,18 @@ static int statBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
static int statOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
StatTable *pTab = (StatTable *)pVTab;
StatCursor *pCsr;
- int rc;
pCsr = (StatCursor *)sqlite3_malloc64(sizeof(StatCursor));
if( pCsr==0 ){
- rc = SQLITE_NOMEM;
+ return SQLITE_NOMEM;
}else{
- char *zSql;
memset(pCsr, 0, sizeof(StatCursor));
pCsr->base.pVtab = pVTab;
-
- zSql = sqlite3_mprintf(
- "SELECT 'sqlite_master' AS name, 1 AS rootpage, 'table' AS type"
- " UNION ALL "
- "SELECT name, rootpage, type"
- " FROM \"%w\".sqlite_master WHERE rootpage!=0"
- " ORDER BY name", pTab->db->aDb[pTab->iDb].zName);
- if( zSql==0 ){
- rc = SQLITE_NOMEM;
- }else{
- rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pStmt, 0);
- sqlite3_free(zSql);
- }
- if( rc!=SQLITE_OK ){
- sqlite3_free(pCsr);
- pCsr = 0;
- }
+ pCsr->iDb = pTab->iDb;
}
*ppCursor = (sqlite3_vtab_cursor *)pCsr;
- return rc;
+ return SQLITE_OK;
}
static void statClearPage(StatPage *p){
@@ -155480,6 +163124,7 @@ static void statResetCsr(StatCursor *pCsr){
pCsr->iPage = 0;
sqlite3_free(pCsr->zPath);
pCsr->zPath = 0;
+ pCsr->isEof = 0;
}
/*
@@ -155642,7 +163287,7 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
char *z;
StatCursor *pCsr = (StatCursor *)pCursor;
StatTable *pTab = (StatTable *)pCursor->pVtab;
- Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;
+ Btree *pBt = pTab->db->aDb[pCsr->iDb].pBt;
Pager *pPager = sqlite3BtreePager(pBt);
sqlite3_free(pCsr->zPath);
@@ -155780,9 +163425,43 @@ static int statFilter(
int argc, sqlite3_value **argv
){
StatCursor *pCsr = (StatCursor *)pCursor;
+ StatTable *pTab = (StatTable*)(pCursor->pVtab);
+ char *zSql;
+ int rc = SQLITE_OK;
+ char *zMaster;
+ if( idxNum==1 ){
+ const char *zDbase = (const char*)sqlite3_value_text(argv[0]);
+ pCsr->iDb = sqlite3FindDbName(pTab->db, zDbase);
+ if( pCsr->iDb<0 ){
+ sqlite3_free(pCursor->pVtab->zErrMsg);
+ pCursor->pVtab->zErrMsg = sqlite3_mprintf("no such schema: %s", zDbase);
+ return pCursor->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;
+ }
+ }else{
+ pCsr->iDb = pTab->iDb;
+ }
statResetCsr(pCsr);
- return statNext(pCursor);
+ sqlite3_finalize(pCsr->pStmt);
+ pCsr->pStmt = 0;
+ zMaster = pCsr->iDb==1 ? "sqlite_temp_master" : "sqlite_master";
+ zSql = sqlite3_mprintf(
+ "SELECT 'sqlite_master' AS name, 1 AS rootpage, 'table' AS type"
+ " UNION ALL "
+ "SELECT name, rootpage, type"
+ " FROM \"%w\".%s WHERE rootpage!=0"
+ " ORDER BY name", pTab->db->aDb[pCsr->iDb].zName, zMaster);
+ if( zSql==0 ){
+ return SQLITE_NOMEM;
+ }else{
+ rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pStmt, 0);
+ sqlite3_free(zSql);
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = statNext(pCursor);
+ }
+ return rc;
}
static int statColumn(
@@ -155819,10 +163498,15 @@ static int statColumn(
case 8: /* pgoffset */
sqlite3_result_int64(ctx, pCsr->iOffset);
break;
- default: /* pgsize */
- assert( i==9 );
+ case 9: /* pgsize */
sqlite3_result_int(ctx, pCsr->szPage);
break;
+ default: { /* schema */
+ sqlite3 *db = sqlite3_context_db_handle(ctx);
+ int iDb = pCsr->iDb;
+ sqlite3_result_text(ctx, db->aDb[iDb].zName, -1, SQLITE_STATIC);
+ break;
+ }
}
return SQLITE_OK;
}
@@ -155836,7 +163520,7 @@ static int statRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){
/*
** Invoke this routine to register the "dbstat" virtual table module
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_dbstat_register(sqlite3 *db){
+SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){
static sqlite3_module dbstat_module = {
0, /* iVersion */
statConnect, /* xCreate */
@@ -155861,6 +163545,20707 @@ SQLITE_API int SQLITE_STDCALL sqlite3_dbstat_register(sqlite3 *db){
};
return sqlite3_create_module(db, "dbstat", &dbstat_module, 0);
}
+#elif defined(SQLITE_ENABLE_DBSTAT_VTAB)
+SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3 *db){ return SQLITE_OK; }
#endif /* SQLITE_ENABLE_DBSTAT_VTAB */
/************** End of dbstat.c **********************************************/
+/************** Begin file json1.c *******************************************/
+/*
+** 2015-08-12
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This SQLite extension implements JSON functions. The interface is
+** modeled after MySQL JSON functions:
+**
+** https://dev.mysql.com/doc/refman/5.7/en/json.html
+**
+** For the time being, all JSON is stored as pure text. (We might add
+** a JSONB type in the future which stores a binary encoding of JSON in
+** a BLOB, but there is no support for JSONB in the current implementation.
+** This implementation parses JSON text at 250 MB/s, so it is hard to see
+** how JSONB might improve on that.)
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1)
+#if !defined(_SQLITEINT_H_)
+/* #include "sqlite3ext.h" */
+#endif
+SQLITE_EXTENSION_INIT1
+/* #include <assert.h> */
+/* #include <string.h> */
+/* #include <stdlib.h> */
+/* #include <stdarg.h> */
+
+#define UNUSED_PARAM(X) (void)(X)
+
+#ifndef LARGEST_INT64
+# define LARGEST_INT64 (0xffffffff|(((sqlite3_int64)0x7fffffff)<<32))
+# define SMALLEST_INT64 (((sqlite3_int64)-1) - LARGEST_INT64)
+#endif
+
+/*
+** Versions of isspace(), isalnum() and isdigit() to which it is safe
+** to pass signed char values.
+*/
+#ifdef sqlite3Isdigit
+ /* Use the SQLite core versions if this routine is part of the
+ ** SQLite amalgamation */
+# define safe_isdigit(x) sqlite3Isdigit(x)
+# define safe_isalnum(x) sqlite3Isalnum(x)
+#else
+ /* Use the standard library for separate compilation */
+#include <ctype.h> /* amalgamator: keep */
+# define safe_isdigit(x) isdigit((unsigned char)(x))
+# define safe_isalnum(x) isalnum((unsigned char)(x))
+#endif
+
+/*
+** Growing our own isspace() routine this way is twice as fast as
+** the library isspace() function, resulting in a 7% overall performance
+** increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os).
+*/
+static const char jsonIsSpace[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+#define safe_isspace(x) (jsonIsSpace[(unsigned char)x])
+
+#ifndef SQLITE_AMALGAMATION
+ /* Unsigned integer types. These are already defined in the sqliteInt.h,
+ ** but the definitions need to be repeated for separate compilation. */
+ typedef sqlite3_uint64 u64;
+ typedef unsigned int u32;
+ typedef unsigned char u8;
+#endif
+
+/* Objects */
+typedef struct JsonString JsonString;
+typedef struct JsonNode JsonNode;
+typedef struct JsonParse JsonParse;
+
+/* An instance of this object represents a JSON string
+** under construction. Really, this is a generic string accumulator
+** that can be and is used to create strings other than JSON.
+*/
+struct JsonString {
+ sqlite3_context *pCtx; /* Function context - put error messages here */
+ char *zBuf; /* Append JSON content here */
+ u64 nAlloc; /* Bytes of storage available in zBuf[] */
+ u64 nUsed; /* Bytes of zBuf[] currently used */
+ u8 bStatic; /* True if zBuf is static space */
+ u8 bErr; /* True if an error has been encountered */
+ char zSpace[100]; /* Initial static space */
+};
+
+/* JSON type values
+*/
+#define JSON_NULL 0
+#define JSON_TRUE 1
+#define JSON_FALSE 2
+#define JSON_INT 3
+#define JSON_REAL 4
+#define JSON_STRING 5
+#define JSON_ARRAY 6
+#define JSON_OBJECT 7
+
+/* The "subtype" set for JSON values */
+#define JSON_SUBTYPE 74 /* Ascii for "J" */
+
+/*
+** Names of the various JSON types:
+*/
+static const char * const jsonType[] = {
+ "null", "true", "false", "integer", "real", "text", "array", "object"
+};
+
+/* Bit values for the JsonNode.jnFlag field
+*/
+#define JNODE_RAW 0x01 /* Content is raw, not JSON encoded */
+#define JNODE_ESCAPE 0x02 /* Content is text with \ escapes */
+#define JNODE_REMOVE 0x04 /* Do not output */
+#define JNODE_REPLACE 0x08 /* Replace with JsonNode.iVal */
+#define JNODE_APPEND 0x10 /* More ARRAY/OBJECT entries at u.iAppend */
+#define JNODE_LABEL 0x20 /* Is a label of an object */
+
+
+/* A single node of parsed JSON
+*/
+struct JsonNode {
+ u8 eType; /* One of the JSON_ type values */
+ u8 jnFlags; /* JNODE flags */
+ u8 iVal; /* Replacement value when JNODE_REPLACE */
+ u32 n; /* Bytes of content, or number of sub-nodes */
+ union {
+ const char *zJContent; /* Content for INT, REAL, and STRING */
+ u32 iAppend; /* More terms for ARRAY and OBJECT */
+ u32 iKey; /* Key for ARRAY objects in json_tree() */
+ } u;
+};
+
+/* A completely parsed JSON string
+*/
+struct JsonParse {
+ u32 nNode; /* Number of slots of aNode[] used */
+ u32 nAlloc; /* Number of slots of aNode[] allocated */
+ JsonNode *aNode; /* Array of nodes containing the parse */
+ const char *zJson; /* Original JSON string */
+ u32 *aUp; /* Index of parent of each node */
+ u8 oom; /* Set to true if out of memory */
+ u8 nErr; /* Number of errors seen */
+};
+
+/**************************************************************************
+** Utility routines for dealing with JsonString objects
+**************************************************************************/
+
+/* Set the JsonString object to an empty string
+*/
+static void jsonZero(JsonString *p){
+ p->zBuf = p->zSpace;
+ p->nAlloc = sizeof(p->zSpace);
+ p->nUsed = 0;
+ p->bStatic = 1;
+}
+
+/* Initialize the JsonString object
+*/
+static void jsonInit(JsonString *p, sqlite3_context *pCtx){
+ p->pCtx = pCtx;
+ p->bErr = 0;
+ jsonZero(p);
+}
+
+
+/* Free all allocated memory and reset the JsonString object back to its
+** initial state.
+*/
+static void jsonReset(JsonString *p){
+ if( !p->bStatic ) sqlite3_free(p->zBuf);
+ jsonZero(p);
+}
+
+
+/* Report an out-of-memory (OOM) condition
+*/
+static void jsonOom(JsonString *p){
+ p->bErr = 1;
+ sqlite3_result_error_nomem(p->pCtx);
+ jsonReset(p);
+}
+
+/* Enlarge pJson->zBuf so that it can hold at least N more bytes.
+** Return zero on success. Return non-zero on an OOM error
+*/
+static int jsonGrow(JsonString *p, u32 N){
+ u64 nTotal = N<p->nAlloc ? p->nAlloc*2 : p->nAlloc+N+10;
+ char *zNew;
+ if( p->bStatic ){
+ if( p->bErr ) return 1;
+ zNew = sqlite3_malloc64(nTotal);
+ if( zNew==0 ){
+ jsonOom(p);
+ return SQLITE_NOMEM;
+ }
+ memcpy(zNew, p->zBuf, (size_t)p->nUsed);
+ p->zBuf = zNew;
+ p->bStatic = 0;
+ }else{
+ zNew = sqlite3_realloc64(p->zBuf, nTotal);
+ if( zNew==0 ){
+ jsonOom(p);
+ return SQLITE_NOMEM;
+ }
+ p->zBuf = zNew;
+ }
+ p->nAlloc = nTotal;
+ return SQLITE_OK;
+}
+
+/* Append N bytes from zIn onto the end of the JsonString string.
+*/
+static void jsonAppendRaw(JsonString *p, const char *zIn, u32 N){
+ if( (N+p->nUsed >= p->nAlloc) && jsonGrow(p,N)!=0 ) return;
+ memcpy(p->zBuf+p->nUsed, zIn, N);
+ p->nUsed += N;
+}
+
+/* Append formatted text (not to exceed N bytes) to the JsonString.
+*/
+static void jsonPrintf(int N, JsonString *p, const char *zFormat, ...){
+ va_list ap;
+ if( (p->nUsed + N >= p->nAlloc) && jsonGrow(p, N) ) return;
+ va_start(ap, zFormat);
+ sqlite3_vsnprintf(N, p->zBuf+p->nUsed, zFormat, ap);
+ va_end(ap);
+ p->nUsed += (int)strlen(p->zBuf+p->nUsed);
+}
+
+/* Append a single character
+*/
+static void jsonAppendChar(JsonString *p, char c){
+ if( p->nUsed>=p->nAlloc && jsonGrow(p,1)!=0 ) return;
+ p->zBuf[p->nUsed++] = c;
+}
+
+/* Append a comma separator to the output buffer, if the previous
+** character is not '[' or '{'.
+*/
+static void jsonAppendSeparator(JsonString *p){
+ char c;
+ if( p->nUsed==0 ) return;
+ c = p->zBuf[p->nUsed-1];
+ if( c!='[' && c!='{' ) jsonAppendChar(p, ',');
+}
+
+/* Append the N-byte string in zIn to the end of the JsonString string
+** under construction. Enclose the string in "..." and escape
+** any double-quotes or backslash characters contained within the
+** string.
+*/
+static void jsonAppendString(JsonString *p, const char *zIn, u32 N){
+ u32 i;
+ if( (N+p->nUsed+2 >= p->nAlloc) && jsonGrow(p,N+2)!=0 ) return;
+ p->zBuf[p->nUsed++] = '"';
+ for(i=0; i<N; i++){
+ char c = zIn[i];
+ if( c=='"' || c=='\\' ){
+ if( (p->nUsed+N+3-i > p->nAlloc) && jsonGrow(p,N+3-i)!=0 ) return;
+ p->zBuf[p->nUsed++] = '\\';
+ }
+ p->zBuf[p->nUsed++] = c;
+ }
+ p->zBuf[p->nUsed++] = '"';
+ assert( p->nUsed<p->nAlloc );
+}
+
+/*
+** Append a function parameter value to the JSON string under
+** construction.
+*/
+static void jsonAppendValue(
+ JsonString *p, /* Append to this JSON string */
+ sqlite3_value *pValue /* Value to append */
+){
+ switch( sqlite3_value_type(pValue) ){
+ case SQLITE_NULL: {
+ jsonAppendRaw(p, "null", 4);
+ break;
+ }
+ case SQLITE_INTEGER:
+ case SQLITE_FLOAT: {
+ const char *z = (const char*)sqlite3_value_text(pValue);
+ u32 n = (u32)sqlite3_value_bytes(pValue);
+ jsonAppendRaw(p, z, n);
+ break;
+ }
+ case SQLITE_TEXT: {
+ const char *z = (const char*)sqlite3_value_text(pValue);
+ u32 n = (u32)sqlite3_value_bytes(pValue);
+ if( sqlite3_value_subtype(pValue)==JSON_SUBTYPE ){
+ jsonAppendRaw(p, z, n);
+ }else{
+ jsonAppendString(p, z, n);
+ }
+ break;
+ }
+ default: {
+ if( p->bErr==0 ){
+ sqlite3_result_error(p->pCtx, "JSON cannot hold BLOB values", -1);
+ p->bErr = 1;
+ jsonReset(p);
+ }
+ break;
+ }
+ }
+}
+
+
+/* Make the JSON in p the result of the SQL function.
+*/
+static void jsonResult(JsonString *p){
+ if( p->bErr==0 ){
+ sqlite3_result_text64(p->pCtx, p->zBuf, p->nUsed,
+ p->bStatic ? SQLITE_TRANSIENT : sqlite3_free,
+ SQLITE_UTF8);
+ jsonZero(p);
+ }
+ assert( p->bStatic );
+}
+
+/**************************************************************************
+** Utility routines for dealing with JsonNode and JsonParse objects
+**************************************************************************/
+
+/*
+** Return the number of consecutive JsonNode slots need to represent
+** the parsed JSON at pNode. The minimum answer is 1. For ARRAY and
+** OBJECT types, the number might be larger.
+**
+** Appended elements are not counted. The value returned is the number
+** by which the JsonNode counter should increment in order to go to the
+** next peer value.
+*/
+static u32 jsonNodeSize(JsonNode *pNode){
+ return pNode->eType>=JSON_ARRAY ? pNode->n+1 : 1;
+}
+
+/*
+** Reclaim all memory allocated by a JsonParse object. But do not
+** delete the JsonParse object itself.
+*/
+static void jsonParseReset(JsonParse *pParse){
+ sqlite3_free(pParse->aNode);
+ pParse->aNode = 0;
+ pParse->nNode = 0;
+ pParse->nAlloc = 0;
+ sqlite3_free(pParse->aUp);
+ pParse->aUp = 0;
+}
+
+/*
+** Convert the JsonNode pNode into a pure JSON string and
+** append to pOut. Subsubstructure is also included. Return
+** the number of JsonNode objects that are encoded.
+*/
+static void jsonRenderNode(
+ JsonNode *pNode, /* The node to render */
+ JsonString *pOut, /* Write JSON here */
+ sqlite3_value **aReplace /* Replacement values */
+){
+ switch( pNode->eType ){
+ default: {
+ assert( pNode->eType==JSON_NULL );
+ jsonAppendRaw(pOut, "null", 4);
+ break;
+ }
+ case JSON_TRUE: {
+ jsonAppendRaw(pOut, "true", 4);
+ break;
+ }
+ case JSON_FALSE: {
+ jsonAppendRaw(pOut, "false", 5);
+ break;
+ }
+ case JSON_STRING: {
+ if( pNode->jnFlags & JNODE_RAW ){
+ jsonAppendString(pOut, pNode->u.zJContent, pNode->n);
+ break;
+ }
+ /* Fall through into the next case */
+ }
+ case JSON_REAL:
+ case JSON_INT: {
+ jsonAppendRaw(pOut, pNode->u.zJContent, pNode->n);
+ break;
+ }
+ case JSON_ARRAY: {
+ u32 j = 1;
+ jsonAppendChar(pOut, '[');
+ for(;;){
+ while( j<=pNode->n ){
+ if( pNode[j].jnFlags & (JNODE_REMOVE|JNODE_REPLACE) ){
+ if( pNode[j].jnFlags & JNODE_REPLACE ){
+ jsonAppendSeparator(pOut);
+ jsonAppendValue(pOut, aReplace[pNode[j].iVal]);
+ }
+ }else{
+ jsonAppendSeparator(pOut);
+ jsonRenderNode(&pNode[j], pOut, aReplace);
+ }
+ j += jsonNodeSize(&pNode[j]);
+ }
+ if( (pNode->jnFlags & JNODE_APPEND)==0 ) break;
+ pNode = &pNode[pNode->u.iAppend];
+ j = 1;
+ }
+ jsonAppendChar(pOut, ']');
+ break;
+ }
+ case JSON_OBJECT: {
+ u32 j = 1;
+ jsonAppendChar(pOut, '{');
+ for(;;){
+ while( j<=pNode->n ){
+ if( (pNode[j+1].jnFlags & JNODE_REMOVE)==0 ){
+ jsonAppendSeparator(pOut);
+ jsonRenderNode(&pNode[j], pOut, aReplace);
+ jsonAppendChar(pOut, ':');
+ if( pNode[j+1].jnFlags & JNODE_REPLACE ){
+ jsonAppendValue(pOut, aReplace[pNode[j+1].iVal]);
+ }else{
+ jsonRenderNode(&pNode[j+1], pOut, aReplace);
+ }
+ }
+ j += 1 + jsonNodeSize(&pNode[j+1]);
+ }
+ if( (pNode->jnFlags & JNODE_APPEND)==0 ) break;
+ pNode = &pNode[pNode->u.iAppend];
+ j = 1;
+ }
+ jsonAppendChar(pOut, '}');
+ break;
+ }
+ }
+}
+
+/*
+** Return a JsonNode and all its descendents as a JSON string.
+*/
+static void jsonReturnJson(
+ JsonNode *pNode, /* Node to return */
+ sqlite3_context *pCtx, /* Return value for this function */
+ sqlite3_value **aReplace /* Array of replacement values */
+){
+ JsonString s;
+ jsonInit(&s, pCtx);
+ jsonRenderNode(pNode, &s, aReplace);
+ jsonResult(&s);
+ sqlite3_result_subtype(pCtx, JSON_SUBTYPE);
+}
+
+/*
+** Make the JsonNode the return value of the function.
+*/
+static void jsonReturn(
+ JsonNode *pNode, /* Node to return */
+ sqlite3_context *pCtx, /* Return value for this function */
+ sqlite3_value **aReplace /* Array of replacement values */
+){
+ switch( pNode->eType ){
+ default: {
+ assert( pNode->eType==JSON_NULL );
+ sqlite3_result_null(pCtx);
+ break;
+ }
+ case JSON_TRUE: {
+ sqlite3_result_int(pCtx, 1);
+ break;
+ }
+ case JSON_FALSE: {
+ sqlite3_result_int(pCtx, 0);
+ break;
+ }
+ case JSON_INT: {
+ sqlite3_int64 i = 0;
+ const char *z = pNode->u.zJContent;
+ if( z[0]=='-' ){ z++; }
+ while( z[0]>='0' && z[0]<='9' ){
+ unsigned v = *(z++) - '0';
+ if( i>=LARGEST_INT64/10 ){
+ if( i>LARGEST_INT64/10 ) goto int_as_real;
+ if( z[0]>='0' && z[0]<='9' ) goto int_as_real;
+ if( v==9 ) goto int_as_real;
+ if( v==8 ){
+ if( pNode->u.zJContent[0]=='-' ){
+ sqlite3_result_int64(pCtx, SMALLEST_INT64);
+ goto int_done;
+ }else{
+ goto int_as_real;
+ }
+ }
+ }
+ i = i*10 + v;
+ }
+ if( pNode->u.zJContent[0]=='-' ){ i = -i; }
+ sqlite3_result_int64(pCtx, i);
+ int_done:
+ break;
+ int_as_real: /* fall through to real */;
+ }
+ case JSON_REAL: {
+ double r;
+#ifdef SQLITE_AMALGAMATION
+ const char *z = pNode->u.zJContent;
+ sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);
+#else
+ r = strtod(pNode->u.zJContent, 0);
+#endif
+ sqlite3_result_double(pCtx, r);
+ break;
+ }
+ case JSON_STRING: {
+#if 0 /* Never happens because JNODE_RAW is only set by json_set(),
+ ** json_insert() and json_replace() and those routines do not
+ ** call jsonReturn() */
+ if( pNode->jnFlags & JNODE_RAW ){
+ sqlite3_result_text(pCtx, pNode->u.zJContent, pNode->n,
+ SQLITE_TRANSIENT);
+ }else
+#endif
+ assert( (pNode->jnFlags & JNODE_RAW)==0 );
+ if( (pNode->jnFlags & JNODE_ESCAPE)==0 ){
+ /* JSON formatted without any backslash-escapes */
+ sqlite3_result_text(pCtx, pNode->u.zJContent+1, pNode->n-2,
+ SQLITE_TRANSIENT);
+ }else{
+ /* Translate JSON formatted string into raw text */
+ u32 i;
+ u32 n = pNode->n;
+ const char *z = pNode->u.zJContent;
+ char *zOut;
+ u32 j;
+ zOut = sqlite3_malloc( n+1 );
+ if( zOut==0 ){
+ sqlite3_result_error_nomem(pCtx);
+ break;
+ }
+ for(i=1, j=0; i<n-1; i++){
+ char c = z[i];
+ if( c!='\\' ){
+ zOut[j++] = c;
+ }else{
+ c = z[++i];
+ if( c=='u' ){
+ u32 v = 0, k;
+ for(k=0; k<4 && i<n-2; i++, k++){
+ c = z[i+1];
+ if( c>='0' && c<='9' ) v = v*16 + c - '0';
+ else if( c>='A' && c<='F' ) v = v*16 + c - 'A' + 10;
+ else if( c>='a' && c<='f' ) v = v*16 + c - 'a' + 10;
+ else break;
+ }
+ if( v==0 ) break;
+ if( v<=0x7f ){
+ zOut[j++] = (char)v;
+ }else if( v<=0x7ff ){
+ zOut[j++] = (char)(0xc0 | (v>>6));
+ zOut[j++] = 0x80 | (v&0x3f);
+ }else{
+ zOut[j++] = (char)(0xe0 | (v>>12));
+ zOut[j++] = 0x80 | ((v>>6)&0x3f);
+ zOut[j++] = 0x80 | (v&0x3f);
+ }
+ }else{
+ if( c=='b' ){
+ c = '\b';
+ }else if( c=='f' ){
+ c = '\f';
+ }else if( c=='n' ){
+ c = '\n';
+ }else if( c=='r' ){
+ c = '\r';
+ }else if( c=='t' ){
+ c = '\t';
+ }
+ zOut[j++] = c;
+ }
+ }
+ }
+ zOut[j] = 0;
+ sqlite3_result_text(pCtx, zOut, j, sqlite3_free);
+ }
+ break;
+ }
+ case JSON_ARRAY:
+ case JSON_OBJECT: {
+ jsonReturnJson(pNode, pCtx, aReplace);
+ break;
+ }
+ }
+}
+
+/* Forward reference */
+static int jsonParseAddNode(JsonParse*,u32,u32,const char*);
+
+/*
+** A macro to hint to the compiler that a function should not be
+** inlined.
+*/
+#if defined(__GNUC__)
+# define JSON_NOINLINE __attribute__((noinline))
+#elif defined(_MSC_VER) && _MSC_VER>=1310
+# define JSON_NOINLINE __declspec(noinline)
+#else
+# define JSON_NOINLINE
+#endif
+
+
+static JSON_NOINLINE int jsonParseAddNodeExpand(
+ JsonParse *pParse, /* Append the node to this object */
+ u32 eType, /* Node type */
+ u32 n, /* Content size or sub-node count */
+ const char *zContent /* Content */
+){
+ u32 nNew;
+ JsonNode *pNew;
+ assert( pParse->nNode>=pParse->nAlloc );
+ if( pParse->oom ) return -1;
+ nNew = pParse->nAlloc*2 + 10;
+ pNew = sqlite3_realloc(pParse->aNode, sizeof(JsonNode)*nNew);
+ if( pNew==0 ){
+ pParse->oom = 1;
+ return -1;
+ }
+ pParse->nAlloc = nNew;
+ pParse->aNode = pNew;
+ assert( pParse->nNode<pParse->nAlloc );
+ return jsonParseAddNode(pParse, eType, n, zContent);
+}
+
+/*
+** Create a new JsonNode instance based on the arguments and append that
+** instance to the JsonParse. Return the index in pParse->aNode[] of the
+** new node, or -1 if a memory allocation fails.
+*/
+static int jsonParseAddNode(
+ JsonParse *pParse, /* Append the node to this object */
+ u32 eType, /* Node type */
+ u32 n, /* Content size or sub-node count */
+ const char *zContent /* Content */
+){
+ JsonNode *p;
+ if( pParse->nNode>=pParse->nAlloc ){
+ return jsonParseAddNodeExpand(pParse, eType, n, zContent);
+ }
+ p = &pParse->aNode[pParse->nNode];
+ p->eType = (u8)eType;
+ p->jnFlags = 0;
+ p->iVal = 0;
+ p->n = n;
+ p->u.zJContent = zContent;
+ return pParse->nNode++;
+}
+
+/*
+** Parse a single JSON value which begins at pParse->zJson[i]. Return the
+** index of the first character past the end of the value parsed.
+**
+** Return negative for a syntax error. Special cases: return -2 if the
+** first non-whitespace character is '}' and return -3 if the first
+** non-whitespace character is ']'.
+*/
+static int jsonParseValue(JsonParse *pParse, u32 i){
+ char c;
+ u32 j;
+ int iThis;
+ int x;
+ JsonNode *pNode;
+ while( safe_isspace(pParse->zJson[i]) ){ i++; }
+ if( (c = pParse->zJson[i])=='{' ){
+ /* Parse object */
+ iThis = jsonParseAddNode(pParse, JSON_OBJECT, 0, 0);
+ if( iThis<0 ) return -1;
+ for(j=i+1;;j++){
+ while( safe_isspace(pParse->zJson[j]) ){ j++; }
+ x = jsonParseValue(pParse, j);
+ if( x<0 ){
+ if( x==(-2) && pParse->nNode==(u32)iThis+1 ) return j+1;
+ return -1;
+ }
+ if( pParse->oom ) return -1;
+ pNode = &pParse->aNode[pParse->nNode-1];
+ if( pNode->eType!=JSON_STRING ) return -1;
+ pNode->jnFlags |= JNODE_LABEL;
+ j = x;
+ while( safe_isspace(pParse->zJson[j]) ){ j++; }
+ if( pParse->zJson[j]!=':' ) return -1;
+ j++;
+ x = jsonParseValue(pParse, j);
+ if( x<0 ) return -1;
+ j = x;
+ while( safe_isspace(pParse->zJson[j]) ){ j++; }
+ c = pParse->zJson[j];
+ if( c==',' ) continue;
+ if( c!='}' ) return -1;
+ break;
+ }
+ pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
+ return j+1;
+ }else if( c=='[' ){
+ /* Parse array */
+ iThis = jsonParseAddNode(pParse, JSON_ARRAY, 0, 0);
+ if( iThis<0 ) return -1;
+ for(j=i+1;;j++){
+ while( safe_isspace(pParse->zJson[j]) ){ j++; }
+ x = jsonParseValue(pParse, j);
+ if( x<0 ){
+ if( x==(-3) && pParse->nNode==(u32)iThis+1 ) return j+1;
+ return -1;
+ }
+ j = x;
+ while( safe_isspace(pParse->zJson[j]) ){ j++; }
+ c = pParse->zJson[j];
+ if( c==',' ) continue;
+ if( c!=']' ) return -1;
+ break;
+ }
+ pParse->aNode[iThis].n = pParse->nNode - (u32)iThis - 1;
+ return j+1;
+ }else if( c=='"' ){
+ /* Parse string */
+ u8 jnFlags = 0;
+ j = i+1;
+ for(;;){
+ c = pParse->zJson[j];
+ if( c==0 ) return -1;
+ if( c=='\\' ){
+ c = pParse->zJson[++j];
+ if( c==0 ) return -1;
+ jnFlags = JNODE_ESCAPE;
+ }else if( c=='"' ){
+ break;
+ }
+ j++;
+ }
+ jsonParseAddNode(pParse, JSON_STRING, j+1-i, &pParse->zJson[i]);
+ if( !pParse->oom ) pParse->aNode[pParse->nNode-1].jnFlags = jnFlags;
+ return j+1;
+ }else if( c=='n'
+ && strncmp(pParse->zJson+i,"null",4)==0
+ && !safe_isalnum(pParse->zJson[i+4]) ){
+ jsonParseAddNode(pParse, JSON_NULL, 0, 0);
+ return i+4;
+ }else if( c=='t'
+ && strncmp(pParse->zJson+i,"true",4)==0
+ && !safe_isalnum(pParse->zJson[i+4]) ){
+ jsonParseAddNode(pParse, JSON_TRUE, 0, 0);
+ return i+4;
+ }else if( c=='f'
+ && strncmp(pParse->zJson+i,"false",5)==0
+ && !safe_isalnum(pParse->zJson[i+5]) ){
+ jsonParseAddNode(pParse, JSON_FALSE, 0, 0);
+ return i+5;
+ }else if( c=='-' || (c>='0' && c<='9') ){
+ /* Parse number */
+ u8 seenDP = 0;
+ u8 seenE = 0;
+ j = i+1;
+ for(;; j++){
+ c = pParse->zJson[j];
+ if( c>='0' && c<='9' ) continue;
+ if( c=='.' ){
+ if( pParse->zJson[j-1]=='-' ) return -1;
+ if( seenDP ) return -1;
+ seenDP = 1;
+ continue;
+ }
+ if( c=='e' || c=='E' ){
+ if( pParse->zJson[j-1]<'0' ) return -1;
+ if( seenE ) return -1;
+ seenDP = seenE = 1;
+ c = pParse->zJson[j+1];
+ if( c=='+' || c=='-' ){
+ j++;
+ c = pParse->zJson[j+1];
+ }
+ if( c<'0' || c>'9' ) return -1;
+ continue;
+ }
+ break;
+ }
+ if( pParse->zJson[j-1]<'0' ) return -1;
+ jsonParseAddNode(pParse, seenDP ? JSON_REAL : JSON_INT,
+ j - i, &pParse->zJson[i]);
+ return j;
+ }else if( c=='}' ){
+ return -2; /* End of {...} */
+ }else if( c==']' ){
+ return -3; /* End of [...] */
+ }else if( c==0 ){
+ return 0; /* End of file */
+ }else{
+ return -1; /* Syntax error */
+ }
+}
+
+/*
+** Parse a complete JSON string. Return 0 on success or non-zero if there
+** are any errors. If an error occurs, free all memory associated with
+** pParse.
+**
+** pParse is uninitialized when this routine is called.
+*/
+static int jsonParse(
+ JsonParse *pParse, /* Initialize and fill this JsonParse object */
+ sqlite3_context *pCtx, /* Report errors here */
+ const char *zJson /* Input JSON text to be parsed */
+){
+ int i;
+ memset(pParse, 0, sizeof(*pParse));
+ if( zJson==0 ) return 1;
+ pParse->zJson = zJson;
+ i = jsonParseValue(pParse, 0);
+ if( pParse->oom ) i = -1;
+ if( i>0 ){
+ while( safe_isspace(zJson[i]) ) i++;
+ if( zJson[i] ) i = -1;
+ }
+ if( i<=0 ){
+ if( pCtx!=0 ){
+ if( pParse->oom ){
+ sqlite3_result_error_nomem(pCtx);
+ }else{
+ sqlite3_result_error(pCtx, "malformed JSON", -1);
+ }
+ }
+ jsonParseReset(pParse);
+ return 1;
+ }
+ return 0;
+}
+
+/* Mark node i of pParse as being a child of iParent. Call recursively
+** to fill in all the descendants of node i.
+*/
+static void jsonParseFillInParentage(JsonParse *pParse, u32 i, u32 iParent){
+ JsonNode *pNode = &pParse->aNode[i];
+ u32 j;
+ pParse->aUp[i] = iParent;
+ switch( pNode->eType ){
+ case JSON_ARRAY: {
+ for(j=1; j<=pNode->n; j += jsonNodeSize(pNode+j)){
+ jsonParseFillInParentage(pParse, i+j, i);
+ }
+ break;
+ }
+ case JSON_OBJECT: {
+ for(j=1; j<=pNode->n; j += jsonNodeSize(pNode+j+1)+1){
+ pParse->aUp[i+j] = i;
+ jsonParseFillInParentage(pParse, i+j+1, i);
+ }
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+}
+
+/*
+** Compute the parentage of all nodes in a completed parse.
+*/
+static int jsonParseFindParents(JsonParse *pParse){
+ u32 *aUp;
+ assert( pParse->aUp==0 );
+ aUp = pParse->aUp = sqlite3_malloc( sizeof(u32)*pParse->nNode );
+ if( aUp==0 ){
+ pParse->oom = 1;
+ return SQLITE_NOMEM;
+ }
+ jsonParseFillInParentage(pParse, 0, 0);
+ return SQLITE_OK;
+}
+
+/*
+** Compare the OBJECT label at pNode against zKey,nKey. Return true on
+** a match.
+*/
+static int jsonLabelCompare(JsonNode *pNode, const char *zKey, u32 nKey){
+ if( pNode->jnFlags & JNODE_RAW ){
+ if( pNode->n!=nKey ) return 0;
+ return strncmp(pNode->u.zJContent, zKey, nKey)==0;
+ }else{
+ if( pNode->n!=nKey+2 ) return 0;
+ return strncmp(pNode->u.zJContent+1, zKey, nKey)==0;
+ }
+}
+
+/* forward declaration */
+static JsonNode *jsonLookupAppend(JsonParse*,const char*,int*,const char**);
+
+/*
+** Search along zPath to find the node specified. Return a pointer
+** to that node, or NULL if zPath is malformed or if there is no such
+** node.
+**
+** If pApnd!=0, then try to append new nodes to complete zPath if it is
+** possible to do so and if no existing node corresponds to zPath. If
+** new nodes are appended *pApnd is set to 1.
+*/
+static JsonNode *jsonLookupStep(
+ JsonParse *pParse, /* The JSON to search */
+ u32 iRoot, /* Begin the search at this node */
+ const char *zPath, /* The path to search */
+ int *pApnd, /* Append nodes to complete path if not NULL */
+ const char **pzErr /* Make *pzErr point to any syntax error in zPath */
+){
+ u32 i, j, nKey;
+ const char *zKey;
+ JsonNode *pRoot = &pParse->aNode[iRoot];
+ if( zPath[0]==0 ) return pRoot;
+ if( zPath[0]=='.' ){
+ if( pRoot->eType!=JSON_OBJECT ) return 0;
+ zPath++;
+ if( zPath[0]=='"' ){
+ zKey = zPath + 1;
+ for(i=1; zPath[i] && zPath[i]!='"'; i++){}
+ nKey = i-1;
+ if( zPath[i] ){
+ i++;
+ }else{
+ *pzErr = zPath;
+ return 0;
+ }
+ }else{
+ zKey = zPath;
+ for(i=0; zPath[i] && zPath[i]!='.' && zPath[i]!='['; i++){}
+ nKey = i;
+ }
+ if( nKey==0 ){
+ *pzErr = zPath;
+ return 0;
+ }
+ j = 1;
+ for(;;){
+ while( j<=pRoot->n ){
+ if( jsonLabelCompare(pRoot+j, zKey, nKey) ){
+ return jsonLookupStep(pParse, iRoot+j+1, &zPath[i], pApnd, pzErr);
+ }
+ j++;
+ j += jsonNodeSize(&pRoot[j]);
+ }
+ if( (pRoot->jnFlags & JNODE_APPEND)==0 ) break;
+ iRoot += pRoot->u.iAppend;
+ pRoot = &pParse->aNode[iRoot];
+ j = 1;
+ }
+ if( pApnd ){
+ u32 iStart, iLabel;
+ JsonNode *pNode;
+ iStart = jsonParseAddNode(pParse, JSON_OBJECT, 2, 0);
+ iLabel = jsonParseAddNode(pParse, JSON_STRING, i, zPath);
+ zPath += i;
+ pNode = jsonLookupAppend(pParse, zPath, pApnd, pzErr);
+ if( pParse->oom ) return 0;
+ if( pNode ){
+ pRoot = &pParse->aNode[iRoot];
+ pRoot->u.iAppend = iStart - iRoot;
+ pRoot->jnFlags |= JNODE_APPEND;
+ pParse->aNode[iLabel].jnFlags |= JNODE_RAW;
+ }
+ return pNode;
+ }
+ }else if( zPath[0]=='[' && safe_isdigit(zPath[1]) ){
+ if( pRoot->eType!=JSON_ARRAY ) return 0;
+ i = 0;
+ j = 1;
+ while( safe_isdigit(zPath[j]) ){
+ i = i*10 + zPath[j] - '0';
+ j++;
+ }
+ if( zPath[j]!=']' ){
+ *pzErr = zPath;
+ return 0;
+ }
+ zPath += j + 1;
+ j = 1;
+ for(;;){
+ while( j<=pRoot->n && (i>0 || (pRoot[j].jnFlags & JNODE_REMOVE)!=0) ){
+ if( (pRoot[j].jnFlags & JNODE_REMOVE)==0 ) i--;
+ j += jsonNodeSize(&pRoot[j]);
+ }
+ if( (pRoot->jnFlags & JNODE_APPEND)==0 ) break;
+ iRoot += pRoot->u.iAppend;
+ pRoot = &pParse->aNode[iRoot];
+ j = 1;
+ }
+ if( j<=pRoot->n ){
+ return jsonLookupStep(pParse, iRoot+j, zPath, pApnd, pzErr);
+ }
+ if( i==0 && pApnd ){
+ u32 iStart;
+ JsonNode *pNode;
+ iStart = jsonParseAddNode(pParse, JSON_ARRAY, 1, 0);
+ pNode = jsonLookupAppend(pParse, zPath, pApnd, pzErr);
+ if( pParse->oom ) return 0;
+ if( pNode ){
+ pRoot = &pParse->aNode[iRoot];
+ pRoot->u.iAppend = iStart - iRoot;
+ pRoot->jnFlags |= JNODE_APPEND;
+ }
+ return pNode;
+ }
+ }else{
+ *pzErr = zPath;
+ }
+ return 0;
+}
+
+/*
+** Append content to pParse that will complete zPath. Return a pointer
+** to the inserted node, or return NULL if the append fails.
+*/
+static JsonNode *jsonLookupAppend(
+ JsonParse *pParse, /* Append content to the JSON parse */
+ const char *zPath, /* Description of content to append */
+ int *pApnd, /* Set this flag to 1 */
+ const char **pzErr /* Make this point to any syntax error */
+){
+ *pApnd = 1;
+ if( zPath[0]==0 ){
+ jsonParseAddNode(pParse, JSON_NULL, 0, 0);
+ return pParse->oom ? 0 : &pParse->aNode[pParse->nNode-1];
+ }
+ if( zPath[0]=='.' ){
+ jsonParseAddNode(pParse, JSON_OBJECT, 0, 0);
+ }else if( strncmp(zPath,"[0]",3)==0 ){
+ jsonParseAddNode(pParse, JSON_ARRAY, 0, 0);
+ }else{
+ return 0;
+ }
+ if( pParse->oom ) return 0;
+ return jsonLookupStep(pParse, pParse->nNode-1, zPath, pApnd, pzErr);
+}
+
+/*
+** Return the text of a syntax error message on a JSON path. Space is
+** obtained from sqlite3_malloc().
+*/
+static char *jsonPathSyntaxError(const char *zErr){
+ return sqlite3_mprintf("JSON path error near '%q'", zErr);
+}
+
+/*
+** Do a node lookup using zPath. Return a pointer to the node on success.
+** Return NULL if not found or if there is an error.
+**
+** On an error, write an error message into pCtx and increment the
+** pParse->nErr counter.
+**
+** If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if
+** nodes are appended.
+*/
+static JsonNode *jsonLookup(
+ JsonParse *pParse, /* The JSON to search */
+ const char *zPath, /* The path to search */
+ int *pApnd, /* Append nodes to complete path if not NULL */
+ sqlite3_context *pCtx /* Report errors here, if not NULL */
+){
+ const char *zErr = 0;
+ JsonNode *pNode = 0;
+ char *zMsg;
+
+ if( zPath==0 ) return 0;
+ if( zPath[0]!='$' ){
+ zErr = zPath;
+ goto lookup_err;
+ }
+ zPath++;
+ pNode = jsonLookupStep(pParse, 0, zPath, pApnd, &zErr);
+ if( zErr==0 ) return pNode;
+
+lookup_err:
+ pParse->nErr++;
+ assert( zErr!=0 && pCtx!=0 );
+ zMsg = jsonPathSyntaxError(zErr);
+ if( zMsg ){
+ sqlite3_result_error(pCtx, zMsg, -1);
+ sqlite3_free(zMsg);
+ }else{
+ sqlite3_result_error_nomem(pCtx);
+ }
+ return 0;
+}
+
+
+/*
+** Report the wrong number of arguments for json_insert(), json_replace()
+** or json_set().
+*/
+static void jsonWrongNumArgs(
+ sqlite3_context *pCtx,
+ const char *zFuncName
+){
+ char *zMsg = sqlite3_mprintf("json_%s() needs an odd number of arguments",
+ zFuncName);
+ sqlite3_result_error(pCtx, zMsg, -1);
+ sqlite3_free(zMsg);
+}
+
+
+/****************************************************************************
+** SQL functions used for testing and debugging
+****************************************************************************/
+
+#ifdef SQLITE_DEBUG
+/*
+** The json_parse(JSON) function returns a string which describes
+** a parse of the JSON provided. Or it returns NULL if JSON is not
+** well-formed.
+*/
+static void jsonParseFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonString s; /* Output string - not real JSON */
+ JsonParse x; /* The parse */
+ u32 i;
+
+ assert( argc==1 );
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ jsonParseFindParents(&x);
+ jsonInit(&s, ctx);
+ for(i=0; i<x.nNode; i++){
+ const char *zType;
+ if( x.aNode[i].jnFlags & JNODE_LABEL ){
+ assert( x.aNode[i].eType==JSON_STRING );
+ zType = "label";
+ }else{
+ zType = jsonType[x.aNode[i].eType];
+ }
+ jsonPrintf(100, &s,"node %3u: %7s n=%-4d up=%-4d",
+ i, zType, x.aNode[i].n, x.aUp[i]);
+ if( x.aNode[i].u.zJContent!=0 ){
+ jsonAppendRaw(&s, " ", 1);
+ jsonAppendRaw(&s, x.aNode[i].u.zJContent, x.aNode[i].n);
+ }
+ jsonAppendRaw(&s, "\n", 1);
+ }
+ jsonParseReset(&x);
+ jsonResult(&s);
+}
+
+/*
+** The json_test1(JSON) function return true (1) if the input is JSON
+** text generated by another json function. It returns (0) if the input
+** is not known to be JSON.
+*/
+static void jsonTest1Func(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ UNUSED_PARAM(argc);
+ sqlite3_result_int(ctx, sqlite3_value_subtype(argv[0])==JSON_SUBTYPE);
+}
+#endif /* SQLITE_DEBUG */
+
+/****************************************************************************
+** SQL function implementations
+****************************************************************************/
+
+/*
+** Implementation of the json_array(VALUE,...) function. Return a JSON
+** array that contains all values given in arguments. Or if any argument
+** is a BLOB, throw an error.
+*/
+static void jsonArrayFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ int i;
+ JsonString jx;
+
+ jsonInit(&jx, ctx);
+ jsonAppendChar(&jx, '[');
+ for(i=0; i<argc; i++){
+ jsonAppendSeparator(&jx);
+ jsonAppendValue(&jx, argv[i]);
+ }
+ jsonAppendChar(&jx, ']');
+ jsonResult(&jx);
+ sqlite3_result_subtype(ctx, JSON_SUBTYPE);
+}
+
+
+/*
+** json_array_length(JSON)
+** json_array_length(JSON, PATH)
+**
+** Return the number of elements in the top-level JSON array.
+** Return 0 if the input is not a well-formed JSON array.
+*/
+static void jsonArrayLengthFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ sqlite3_int64 n = 0;
+ u32 i;
+ JsonNode *pNode;
+
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ assert( x.nNode );
+ if( argc==2 ){
+ const char *zPath = (const char*)sqlite3_value_text(argv[1]);
+ pNode = jsonLookup(&x, zPath, 0, ctx);
+ }else{
+ pNode = x.aNode;
+ }
+ if( pNode==0 ){
+ x.nErr = 1;
+ }else if( pNode->eType==JSON_ARRAY ){
+ assert( (pNode->jnFlags & JNODE_APPEND)==0 );
+ for(i=1; i<=pNode->n; n++){
+ i += jsonNodeSize(&pNode[i]);
+ }
+ }
+ if( x.nErr==0 ) sqlite3_result_int64(ctx, n);
+ jsonParseReset(&x);
+}
+
+/*
+** json_extract(JSON, PATH, ...)
+**
+** Return the element described by PATH. Return NULL if there is no
+** PATH element. If there are multiple PATHs, then return a JSON array
+** with the result from each path. Throw an error if the JSON or any PATH
+** is malformed.
+*/
+static void jsonExtractFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ JsonNode *pNode;
+ const char *zPath;
+ JsonString jx;
+ int i;
+
+ if( argc<2 ) return;
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ jsonInit(&jx, ctx);
+ jsonAppendChar(&jx, '[');
+ for(i=1; i<argc; i++){
+ zPath = (const char*)sqlite3_value_text(argv[i]);
+ pNode = jsonLookup(&x, zPath, 0, ctx);
+ if( x.nErr ) break;
+ if( argc>2 ){
+ jsonAppendSeparator(&jx);
+ if( pNode ){
+ jsonRenderNode(pNode, &jx, 0);
+ }else{
+ jsonAppendRaw(&jx, "null", 4);
+ }
+ }else if( pNode ){
+ jsonReturn(pNode, ctx, 0);
+ }
+ }
+ if( argc>2 && i==argc ){
+ jsonAppendChar(&jx, ']');
+ jsonResult(&jx);
+ sqlite3_result_subtype(ctx, JSON_SUBTYPE);
+ }
+ jsonReset(&jx);
+ jsonParseReset(&x);
+}
+
+/*
+** Implementation of the json_object(NAME,VALUE,...) function. Return a JSON
+** object that contains all name/value given in arguments. Or if any name
+** is not a string or if any value is a BLOB, throw an error.
+*/
+static void jsonObjectFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ int i;
+ JsonString jx;
+ const char *z;
+ u32 n;
+
+ if( argc&1 ){
+ sqlite3_result_error(ctx, "json_object() requires an even number "
+ "of arguments", -1);
+ return;
+ }
+ jsonInit(&jx, ctx);
+ jsonAppendChar(&jx, '{');
+ for(i=0; i<argc; i+=2){
+ if( sqlite3_value_type(argv[i])!=SQLITE_TEXT ){
+ sqlite3_result_error(ctx, "json_object() labels must be TEXT", -1);
+ jsonReset(&jx);
+ return;
+ }
+ jsonAppendSeparator(&jx);
+ z = (const char*)sqlite3_value_text(argv[i]);
+ n = (u32)sqlite3_value_bytes(argv[i]);
+ jsonAppendString(&jx, z, n);
+ jsonAppendChar(&jx, ':');
+ jsonAppendValue(&jx, argv[i+1]);
+ }
+ jsonAppendChar(&jx, '}');
+ jsonResult(&jx);
+ sqlite3_result_subtype(ctx, JSON_SUBTYPE);
+}
+
+
+/*
+** json_remove(JSON, PATH, ...)
+**
+** Remove the named elements from JSON and return the result. malformed
+** JSON or PATH arguments result in an error.
+*/
+static void jsonRemoveFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ JsonNode *pNode;
+ const char *zPath;
+ u32 i;
+
+ if( argc<1 ) return;
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ assert( x.nNode );
+ for(i=1; i<(u32)argc; i++){
+ zPath = (const char*)sqlite3_value_text(argv[i]);
+ if( zPath==0 ) goto remove_done;
+ pNode = jsonLookup(&x, zPath, 0, ctx);
+ if( x.nErr ) goto remove_done;
+ if( pNode ) pNode->jnFlags |= JNODE_REMOVE;
+ }
+ if( (x.aNode[0].jnFlags & JNODE_REMOVE)==0 ){
+ jsonReturnJson(x.aNode, ctx, 0);
+ }
+remove_done:
+ jsonParseReset(&x);
+}
+
+/*
+** json_replace(JSON, PATH, VALUE, ...)
+**
+** Replace the value at PATH with VALUE. If PATH does not already exist,
+** this routine is a no-op. If JSON or PATH is malformed, throw an error.
+*/
+static void jsonReplaceFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ JsonNode *pNode;
+ const char *zPath;
+ u32 i;
+
+ if( argc<1 ) return;
+ if( (argc&1)==0 ) {
+ jsonWrongNumArgs(ctx, "replace");
+ return;
+ }
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ assert( x.nNode );
+ for(i=1; i<(u32)argc; i+=2){
+ zPath = (const char*)sqlite3_value_text(argv[i]);
+ pNode = jsonLookup(&x, zPath, 0, ctx);
+ if( x.nErr ) goto replace_err;
+ if( pNode ){
+ pNode->jnFlags |= (u8)JNODE_REPLACE;
+ pNode->iVal = (u8)(i+1);
+ }
+ }
+ if( x.aNode[0].jnFlags & JNODE_REPLACE ){
+ sqlite3_result_value(ctx, argv[x.aNode[0].iVal]);
+ }else{
+ jsonReturnJson(x.aNode, ctx, argv);
+ }
+replace_err:
+ jsonParseReset(&x);
+}
+
+/*
+** json_set(JSON, PATH, VALUE, ...)
+**
+** Set the value at PATH to VALUE. Create the PATH if it does not already
+** exist. Overwrite existing values that do exist.
+** If JSON or PATH is malformed, throw an error.
+**
+** json_insert(JSON, PATH, VALUE, ...)
+**
+** Create PATH and initialize it to VALUE. If PATH already exists, this
+** routine is a no-op. If JSON or PATH is malformed, throw an error.
+*/
+static void jsonSetFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ JsonNode *pNode;
+ const char *zPath;
+ u32 i;
+ int bApnd;
+ int bIsSet = *(int*)sqlite3_user_data(ctx);
+
+ if( argc<1 ) return;
+ if( (argc&1)==0 ) {
+ jsonWrongNumArgs(ctx, bIsSet ? "set" : "insert");
+ return;
+ }
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ assert( x.nNode );
+ for(i=1; i<(u32)argc; i+=2){
+ zPath = (const char*)sqlite3_value_text(argv[i]);
+ bApnd = 0;
+ pNode = jsonLookup(&x, zPath, &bApnd, ctx);
+ if( x.oom ){
+ sqlite3_result_error_nomem(ctx);
+ goto jsonSetDone;
+ }else if( x.nErr ){
+ goto jsonSetDone;
+ }else if( pNode && (bApnd || bIsSet) ){
+ pNode->jnFlags |= (u8)JNODE_REPLACE;
+ pNode->iVal = (u8)(i+1);
+ }
+ }
+ if( x.aNode[0].jnFlags & JNODE_REPLACE ){
+ sqlite3_result_value(ctx, argv[x.aNode[0].iVal]);
+ }else{
+ jsonReturnJson(x.aNode, ctx, argv);
+ }
+jsonSetDone:
+ jsonParseReset(&x);
+}
+
+/*
+** json_type(JSON)
+** json_type(JSON, PATH)
+**
+** Return the top-level "type" of a JSON string. Throw an error if
+** either the JSON or PATH inputs are not well-formed.
+*/
+static void jsonTypeFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ const char *zPath;
+ JsonNode *pNode;
+
+ if( jsonParse(&x, ctx, (const char*)sqlite3_value_text(argv[0])) ) return;
+ assert( x.nNode );
+ if( argc==2 ){
+ zPath = (const char*)sqlite3_value_text(argv[1]);
+ pNode = jsonLookup(&x, zPath, 0, ctx);
+ }else{
+ pNode = x.aNode;
+ }
+ if( pNode ){
+ sqlite3_result_text(ctx, jsonType[pNode->eType], -1, SQLITE_STATIC);
+ }
+ jsonParseReset(&x);
+}
+
+/*
+** json_valid(JSON)
+**
+** Return 1 if JSON is a well-formed JSON string according to RFC-7159.
+** Return 0 otherwise.
+*/
+static void jsonValidFunc(
+ sqlite3_context *ctx,
+ int argc,
+ sqlite3_value **argv
+){
+ JsonParse x; /* The parse */
+ int rc = 0;
+
+ UNUSED_PARAM(argc);
+ if( jsonParse(&x, 0, (const char*)sqlite3_value_text(argv[0]))==0 ){
+ rc = 1;
+ }
+ jsonParseReset(&x);
+ sqlite3_result_int(ctx, rc);
+}
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/****************************************************************************
+** The json_each virtual table
+****************************************************************************/
+typedef struct JsonEachCursor JsonEachCursor;
+struct JsonEachCursor {
+ sqlite3_vtab_cursor base; /* Base class - must be first */
+ u32 iRowid; /* The rowid */
+ u32 iBegin; /* The first node of the scan */
+ u32 i; /* Index in sParse.aNode[] of current row */
+ u32 iEnd; /* EOF when i equals or exceeds this value */
+ u8 eType; /* Type of top-level element */
+ u8 bRecursive; /* True for json_tree(). False for json_each() */
+ char *zJson; /* Input JSON */
+ char *zRoot; /* Path by which to filter zJson */
+ JsonParse sParse; /* Parse of the input JSON */
+};
+
+/* Constructor for the json_each virtual table */
+static int jsonEachConnect(
+ sqlite3 *db,
+ void *pAux,
+ int argc, const char *const*argv,
+ sqlite3_vtab **ppVtab,
+ char **pzErr
+){
+ sqlite3_vtab *pNew;
+ int rc;
+
+/* Column numbers */
+#define JEACH_KEY 0
+#define JEACH_VALUE 1
+#define JEACH_TYPE 2
+#define JEACH_ATOM 3
+#define JEACH_ID 4
+#define JEACH_PARENT 5
+#define JEACH_FULLKEY 6
+#define JEACH_PATH 7
+#define JEACH_JSON 8
+#define JEACH_ROOT 9
+
+ UNUSED_PARAM(pzErr);
+ UNUSED_PARAM(argv);
+ UNUSED_PARAM(argc);
+ UNUSED_PARAM(pAux);
+ rc = sqlite3_declare_vtab(db,
+ "CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,"
+ "json HIDDEN,root HIDDEN)");
+ if( rc==SQLITE_OK ){
+ pNew = *ppVtab = sqlite3_malloc( sizeof(*pNew) );
+ if( pNew==0 ) return SQLITE_NOMEM;
+ memset(pNew, 0, sizeof(*pNew));
+ }
+ return rc;
+}
+
+/* destructor for json_each virtual table */
+static int jsonEachDisconnect(sqlite3_vtab *pVtab){
+ sqlite3_free(pVtab);
+ return SQLITE_OK;
+}
+
+/* constructor for a JsonEachCursor object for json_each(). */
+static int jsonEachOpenEach(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
+ JsonEachCursor *pCur;
+
+ UNUSED_PARAM(p);
+ pCur = sqlite3_malloc( sizeof(*pCur) );
+ if( pCur==0 ) return SQLITE_NOMEM;
+ memset(pCur, 0, sizeof(*pCur));
+ *ppCursor = &pCur->base;
+ return SQLITE_OK;
+}
+
+/* constructor for a JsonEachCursor object for json_tree(). */
+static int jsonEachOpenTree(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
+ int rc = jsonEachOpenEach(p, ppCursor);
+ if( rc==SQLITE_OK ){
+ JsonEachCursor *pCur = (JsonEachCursor*)*ppCursor;
+ pCur->bRecursive = 1;
+ }
+ return rc;
+}
+
+/* Reset a JsonEachCursor back to its original state. Free any memory
+** held. */
+static void jsonEachCursorReset(JsonEachCursor *p){
+ sqlite3_free(p->zJson);
+ sqlite3_free(p->zRoot);
+ jsonParseReset(&p->sParse);
+ p->iRowid = 0;
+ p->i = 0;
+ p->iEnd = 0;
+ p->eType = 0;
+ p->zJson = 0;
+ p->zRoot = 0;
+}
+
+/* Destructor for a jsonEachCursor object */
+static int jsonEachClose(sqlite3_vtab_cursor *cur){
+ JsonEachCursor *p = (JsonEachCursor*)cur;
+ jsonEachCursorReset(p);
+ sqlite3_free(cur);
+ return SQLITE_OK;
+}
+
+/* Return TRUE if the jsonEachCursor object has been advanced off the end
+** of the JSON object */
+static int jsonEachEof(sqlite3_vtab_cursor *cur){
+ JsonEachCursor *p = (JsonEachCursor*)cur;
+ return p->i >= p->iEnd;
+}
+
+/* Advance the cursor to the next element for json_tree() */
+static int jsonEachNext(sqlite3_vtab_cursor *cur){
+ JsonEachCursor *p = (JsonEachCursor*)cur;
+ if( p->bRecursive ){
+ if( p->sParse.aNode[p->i].jnFlags & JNODE_LABEL ) p->i++;
+ p->i++;
+ p->iRowid++;
+ if( p->i<p->iEnd ){
+ u32 iUp = p->sParse.aUp[p->i];
+ JsonNode *pUp = &p->sParse.aNode[iUp];
+ p->eType = pUp->eType;
+ if( pUp->eType==JSON_ARRAY ){
+ if( iUp==p->i-1 ){
+ pUp->u.iKey = 0;
+ }else{
+ pUp->u.iKey++;
+ }
+ }
+ }
+ }else{
+ switch( p->eType ){
+ case JSON_ARRAY: {
+ p->i += jsonNodeSize(&p->sParse.aNode[p->i]);
+ p->iRowid++;
+ break;
+ }
+ case JSON_OBJECT: {
+ p->i += 1 + jsonNodeSize(&p->sParse.aNode[p->i+1]);
+ p->iRowid++;
+ break;
+ }
+ default: {
+ p->i = p->iEnd;
+ break;
+ }
+ }
+ }
+ return SQLITE_OK;
+}
+
+/* Append the name of the path for element i to pStr
+*/
+static void jsonEachComputePath(
+ JsonEachCursor *p, /* The cursor */
+ JsonString *pStr, /* Write the path here */
+ u32 i /* Path to this element */
+){
+ JsonNode *pNode, *pUp;
+ u32 iUp;
+ if( i==0 ){
+ jsonAppendChar(pStr, '$');
+ return;
+ }
+ iUp = p->sParse.aUp[i];
+ jsonEachComputePath(p, pStr, iUp);
+ pNode = &p->sParse.aNode[i];
+ pUp = &p->sParse.aNode[iUp];
+ if( pUp->eType==JSON_ARRAY ){
+ jsonPrintf(30, pStr, "[%d]", pUp->u.iKey);
+ }else{
+ assert( pUp->eType==JSON_OBJECT );
+ if( (pNode->jnFlags & JNODE_LABEL)==0 ) pNode--;
+ assert( pNode->eType==JSON_STRING );
+ assert( pNode->jnFlags & JNODE_LABEL );
+ jsonPrintf(pNode->n+1, pStr, ".%.*s", pNode->n-2, pNode->u.zJContent+1);
+ }
+}
+
+/* Return the value of a column */
+static int jsonEachColumn(
+ sqlite3_vtab_cursor *cur, /* The cursor */
+ sqlite3_context *ctx, /* First argument to sqlite3_result_...() */
+ int i /* Which column to return */
+){
+ JsonEachCursor *p = (JsonEachCursor*)cur;
+ JsonNode *pThis = &p->sParse.aNode[p->i];
+ switch( i ){
+ case JEACH_KEY: {
+ if( p->i==0 ) break;
+ if( p->eType==JSON_OBJECT ){
+ jsonReturn(pThis, ctx, 0);
+ }else if( p->eType==JSON_ARRAY ){
+ u32 iKey;
+ if( p->bRecursive ){
+ if( p->iRowid==0 ) break;
+ iKey = p->sParse.aNode[p->sParse.aUp[p->i]].u.iKey;
+ }else{
+ iKey = p->iRowid;
+ }
+ sqlite3_result_int64(ctx, (sqlite3_int64)iKey);
+ }
+ break;
+ }
+ case JEACH_VALUE: {
+ if( pThis->jnFlags & JNODE_LABEL ) pThis++;
+ jsonReturn(pThis, ctx, 0);
+ break;
+ }
+ case JEACH_TYPE: {
+ if( pThis->jnFlags & JNODE_LABEL ) pThis++;
+ sqlite3_result_text(ctx, jsonType[pThis->eType], -1, SQLITE_STATIC);
+ break;
+ }
+ case JEACH_ATOM: {
+ if( pThis->jnFlags & JNODE_LABEL ) pThis++;
+ if( pThis->eType>=JSON_ARRAY ) break;
+ jsonReturn(pThis, ctx, 0);
+ break;
+ }
+ case JEACH_ID: {
+ sqlite3_result_int64(ctx,
+ (sqlite3_int64)p->i + ((pThis->jnFlags & JNODE_LABEL)!=0));
+ break;
+ }
+ case JEACH_PARENT: {
+ if( p->i>p->iBegin && p->bRecursive ){
+ sqlite3_result_int64(ctx, (sqlite3_int64)p->sParse.aUp[p->i]);
+ }
+ break;
+ }
+ case JEACH_FULLKEY: {
+ JsonString x;
+ jsonInit(&x, ctx);
+ if( p->bRecursive ){
+ jsonEachComputePath(p, &x, p->i);
+ }else{
+ if( p->zRoot ){
+ jsonAppendRaw(&x, p->zRoot, (int)strlen(p->zRoot));
+ }else{
+ jsonAppendChar(&x, '$');
+ }
+ if( p->eType==JSON_ARRAY ){
+ jsonPrintf(30, &x, "[%d]", p->iRowid);
+ }else{
+ jsonPrintf(pThis->n, &x, ".%.*s", pThis->n-2, pThis->u.zJContent+1);
+ }
+ }
+ jsonResult(&x);
+ break;
+ }
+ case JEACH_PATH: {
+ if( p->bRecursive ){
+ JsonString x;
+ jsonInit(&x, ctx);
+ jsonEachComputePath(p, &x, p->sParse.aUp[p->i]);
+ jsonResult(&x);
+ break;
+ }
+ /* For json_each() path and root are the same so fall through
+ ** into the root case */
+ }
+ case JEACH_ROOT: {
+ const char *zRoot = p->zRoot;
+ if( zRoot==0 ) zRoot = "$";
+ sqlite3_result_text(ctx, zRoot, -1, SQLITE_STATIC);
+ break;
+ }
+ case JEACH_JSON: {
+ assert( i==JEACH_JSON );
+ sqlite3_result_text(ctx, p->sParse.zJson, -1, SQLITE_STATIC);
+ break;
+ }
+ }
+ return SQLITE_OK;
+}
+
+/* Return the current rowid value */
+static int jsonEachRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
+ JsonEachCursor *p = (JsonEachCursor*)cur;
+ *pRowid = p->iRowid;
+ return SQLITE_OK;
+}
+
+/* The query strategy is to look for an equality constraint on the json
+** column. Without such a constraint, the table cannot operate. idxNum is
+** 1 if the constraint is found, 3 if the constraint and zRoot are found,
+** and 0 otherwise.
+*/
+static int jsonEachBestIndex(
+ sqlite3_vtab *tab,
+ sqlite3_index_info *pIdxInfo
+){
+ int i;
+ int jsonIdx = -1;
+ int rootIdx = -1;
+ const struct sqlite3_index_constraint *pConstraint;
+
+ UNUSED_PARAM(tab);
+ pConstraint = pIdxInfo->aConstraint;
+ for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
+ if( pConstraint->usable==0 ) continue;
+ if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
+ switch( pConstraint->iColumn ){
+ case JEACH_JSON: jsonIdx = i; break;
+ case JEACH_ROOT: rootIdx = i; break;
+ default: /* no-op */ break;
+ }
+ }
+ if( jsonIdx<0 ){
+ pIdxInfo->idxNum = 0;
+ pIdxInfo->estimatedCost = 1e99;
+ }else{
+ pIdxInfo->estimatedCost = 1.0;
+ pIdxInfo->aConstraintUsage[jsonIdx].argvIndex = 1;
+ pIdxInfo->aConstraintUsage[jsonIdx].omit = 1;
+ if( rootIdx<0 ){
+ pIdxInfo->idxNum = 1;
+ }else{
+ pIdxInfo->aConstraintUsage[rootIdx].argvIndex = 2;
+ pIdxInfo->aConstraintUsage[rootIdx].omit = 1;
+ pIdxInfo->idxNum = 3;
+ }
+ }
+ return SQLITE_OK;
+}
+
+/* Start a search on a new JSON string */
+static int jsonEachFilter(
+ sqlite3_vtab_cursor *cur,
+ int idxNum, const char *idxStr,
+ int argc, sqlite3_value **argv
+){
+ JsonEachCursor *p = (JsonEachCursor*)cur;
+ const char *z;
+ const char *zRoot = 0;
+ sqlite3_int64 n;
+
+ UNUSED_PARAM(idxStr);
+ UNUSED_PARAM(argc);
+ jsonEachCursorReset(p);
+ if( idxNum==0 ) return SQLITE_OK;
+ z = (const char*)sqlite3_value_text(argv[0]);
+ if( z==0 ) return SQLITE_OK;
+ n = sqlite3_value_bytes(argv[0]);
+ p->zJson = sqlite3_malloc64( n+1 );
+ if( p->zJson==0 ) return SQLITE_NOMEM;
+ memcpy(p->zJson, z, (size_t)n+1);
+ if( jsonParse(&p->sParse, 0, p->zJson) ){
+ int rc = SQLITE_NOMEM;
+ if( p->sParse.oom==0 ){
+ sqlite3_free(cur->pVtab->zErrMsg);
+ cur->pVtab->zErrMsg = sqlite3_mprintf("malformed JSON");
+ if( cur->pVtab->zErrMsg ) rc = SQLITE_ERROR;
+ }
+ jsonEachCursorReset(p);
+ return rc;
+ }else if( p->bRecursive && jsonParseFindParents(&p->sParse) ){
+ jsonEachCursorReset(p);
+ return SQLITE_NOMEM;
+ }else{
+ JsonNode *pNode = 0;
+ if( idxNum==3 ){
+ const char *zErr = 0;
+ zRoot = (const char*)sqlite3_value_text(argv[1]);
+ if( zRoot==0 ) return SQLITE_OK;
+ n = sqlite3_value_bytes(argv[1]);
+ p->zRoot = sqlite3_malloc64( n+1 );
+ if( p->zRoot==0 ) return SQLITE_NOMEM;
+ memcpy(p->zRoot, zRoot, (size_t)n+1);
+ if( zRoot[0]!='$' ){
+ zErr = zRoot;
+ }else{
+ pNode = jsonLookupStep(&p->sParse, 0, p->zRoot+1, 0, &zErr);
+ }
+ if( zErr ){
+ sqlite3_free(cur->pVtab->zErrMsg);
+ cur->pVtab->zErrMsg = jsonPathSyntaxError(zErr);
+ jsonEachCursorReset(p);
+ return cur->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;
+ }else if( pNode==0 ){
+ return SQLITE_OK;
+ }
+ }else{
+ pNode = p->sParse.aNode;
+ }
+ p->iBegin = p->i = (int)(pNode - p->sParse.aNode);
+ p->eType = pNode->eType;
+ if( p->eType>=JSON_ARRAY ){
+ pNode->u.iKey = 0;
+ p->iEnd = p->i + pNode->n + 1;
+ if( p->bRecursive ){
+ p->eType = p->sParse.aNode[p->sParse.aUp[p->i]].eType;
+ if( p->i>0 && (p->sParse.aNode[p->i-1].jnFlags & JNODE_LABEL)!=0 ){
+ p->i--;
+ }
+ }else{
+ p->i++;
+ }
+ }else{
+ p->iEnd = p->i+1;
+ }
+ }
+ return SQLITE_OK;
+}
+
+/* The methods of the json_each virtual table */
+static sqlite3_module jsonEachModule = {
+ 0, /* iVersion */
+ 0, /* xCreate */
+ jsonEachConnect, /* xConnect */
+ jsonEachBestIndex, /* xBestIndex */
+ jsonEachDisconnect, /* xDisconnect */
+ 0, /* xDestroy */
+ jsonEachOpenEach, /* xOpen - open a cursor */
+ jsonEachClose, /* xClose - close a cursor */
+ jsonEachFilter, /* xFilter - configure scan constraints */
+ jsonEachNext, /* xNext - advance a cursor */
+ jsonEachEof, /* xEof - check for end of scan */
+ jsonEachColumn, /* xColumn - read data */
+ jsonEachRowid, /* xRowid - read data */
+ 0, /* xUpdate */
+ 0, /* xBegin */
+ 0, /* xSync */
+ 0, /* xCommit */
+ 0, /* xRollback */
+ 0, /* xFindMethod */
+ 0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0 /* xRollbackTo */
+};
+
+/* The methods of the json_tree virtual table. */
+static sqlite3_module jsonTreeModule = {
+ 0, /* iVersion */
+ 0, /* xCreate */
+ jsonEachConnect, /* xConnect */
+ jsonEachBestIndex, /* xBestIndex */
+ jsonEachDisconnect, /* xDisconnect */
+ 0, /* xDestroy */
+ jsonEachOpenTree, /* xOpen - open a cursor */
+ jsonEachClose, /* xClose - close a cursor */
+ jsonEachFilter, /* xFilter - configure scan constraints */
+ jsonEachNext, /* xNext - advance a cursor */
+ jsonEachEof, /* xEof - check for end of scan */
+ jsonEachColumn, /* xColumn - read data */
+ jsonEachRowid, /* xRowid - read data */
+ 0, /* xUpdate */
+ 0, /* xBegin */
+ 0, /* xSync */
+ 0, /* xCommit */
+ 0, /* xRollback */
+ 0, /* xFindMethod */
+ 0, /* xRename */
+ 0, /* xSavepoint */
+ 0, /* xRelease */
+ 0 /* xRollbackTo */
+};
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+/****************************************************************************
+** The following routines are the only publically visible identifiers in this
+** file. Call the following routines in order to register the various SQL
+** functions and the virtual table implemented by this file.
+****************************************************************************/
+
+SQLITE_PRIVATE int sqlite3Json1Init(sqlite3 *db){
+ int rc = SQLITE_OK;
+ unsigned int i;
+ static const struct {
+ const char *zName;
+ int nArg;
+ int flag;
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
+ } aFunc[] = {
+ { "json", 1, 0, jsonRemoveFunc },
+ { "json_array", -1, 0, jsonArrayFunc },
+ { "json_array_length", 1, 0, jsonArrayLengthFunc },
+ { "json_array_length", 2, 0, jsonArrayLengthFunc },
+ { "json_extract", -1, 0, jsonExtractFunc },
+ { "json_insert", -1, 0, jsonSetFunc },
+ { "json_object", -1, 0, jsonObjectFunc },
+ { "json_remove", -1, 0, jsonRemoveFunc },
+ { "json_replace", -1, 0, jsonReplaceFunc },
+ { "json_set", -1, 1, jsonSetFunc },
+ { "json_type", 1, 0, jsonTypeFunc },
+ { "json_type", 2, 0, jsonTypeFunc },
+ { "json_valid", 1, 0, jsonValidFunc },
+
+#if SQLITE_DEBUG
+ /* DEBUG and TESTING functions */
+ { "json_parse", 1, 0, jsonParseFunc },
+ { "json_test1", 1, 0, jsonTest1Func },
+#endif
+ };
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ static const struct {
+ const char *zName;
+ sqlite3_module *pModule;
+ } aMod[] = {
+ { "json_each", &jsonEachModule },
+ { "json_tree", &jsonTreeModule },
+ };
+#endif
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+ rc = sqlite3_create_function(db, aFunc[i].zName, aFunc[i].nArg,
+ SQLITE_UTF8 | SQLITE_DETERMINISTIC,
+ (void*)&aFunc[i].flag,
+ aFunc[i].xFunc, 0, 0);
+ }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+ for(i=0; i<sizeof(aMod)/sizeof(aMod[0]) && rc==SQLITE_OK; i++){
+ rc = sqlite3_create_module(db, aMod[i].zName, aMod[i].pModule, 0);
+ }
+#endif
+ return rc;
+}
+
+
+#ifndef SQLITE_CORE
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+SQLITE_API int SQLITE_STDCALL sqlite3_json_init(
+ sqlite3 *db,
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+ return sqlite3Json1Init(db);
+}
+#endif
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1) */
+
+/************** End of json1.c ***********************************************/
+/************** Begin file fts5.c ********************************************/
+
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5)
+
+#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
+# define NDEBUG 1
+#endif
+#if defined(NDEBUG) && defined(SQLITE_DEBUG)
+# undef NDEBUG
+#endif
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** Interfaces to extend FTS5. Using the interfaces defined in this file,
+** FTS5 may be extended with:
+**
+** * custom tokenizers, and
+** * custom auxiliary functions.
+*/
+
+
+#ifndef _FTS5_H
+#define _FTS5_H
+
+/* #include "sqlite3.h" */
+
+#if 0
+extern "C" {
+#endif
+
+/*************************************************************************
+** CUSTOM AUXILIARY FUNCTIONS
+**
+** Virtual table implementations may overload SQL functions by implementing
+** the sqlite3_module.xFindFunction() method.
+*/
+
+typedef struct Fts5ExtensionApi Fts5ExtensionApi;
+typedef struct Fts5Context Fts5Context;
+typedef struct Fts5PhraseIter Fts5PhraseIter;
+
+typedef void (*fts5_extension_function)(
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
+ sqlite3_context *pCtx, /* Context for returning result/error */
+ int nVal, /* Number of values in apVal[] array */
+ sqlite3_value **apVal /* Array of trailing arguments */
+);
+
+struct Fts5PhraseIter {
+ const unsigned char *a;
+ const unsigned char *b;
+};
+
+/*
+** EXTENSION API FUNCTIONS
+**
+** xUserData(pFts):
+** Return a copy of the context pointer the extension function was
+** registered with.
+**
+** xColumnTotalSize(pFts, iCol, pnToken):
+** If parameter iCol is less than zero, set output variable *pnToken
+** to the total number of tokens in the FTS5 table. Or, if iCol is
+** non-negative but less than the number of columns in the table, return
+** the total number of tokens in column iCol, considering all rows in
+** the FTS5 table.
+**
+** If parameter iCol is greater than or equal to the number of columns
+** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.
+** an OOM condition or IO error), an appropriate SQLite error code is
+** returned.
+**
+** xColumnCount(pFts):
+** Return the number of columns in the table.
+**
+** xColumnSize(pFts, iCol, pnToken):
+** If parameter iCol is less than zero, set output variable *pnToken
+** to the total number of tokens in the current row. Or, if iCol is
+** non-negative but less than the number of columns in the table, set
+** *pnToken to the number of tokens in column iCol of the current row.
+**
+** If parameter iCol is greater than or equal to the number of columns
+** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.
+** an OOM condition or IO error), an appropriate SQLite error code is
+** returned.
+**
+** xColumnText:
+** This function attempts to retrieve the text of column iCol of the
+** current document. If successful, (*pz) is set to point to a buffer
+** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
+** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
+** if an error occurs, an SQLite error code is returned and the final values
+** of (*pz) and (*pn) are undefined.
+**
+** xPhraseCount:
+** Returns the number of phrases in the current query expression.
+**
+** xPhraseSize:
+** Returns the number of tokens in phrase iPhrase of the query. Phrases
+** are numbered starting from zero.
+**
+** xInstCount:
+** Set *pnInst to the total number of occurrences of all phrases within
+** the query within the current row. Return SQLITE_OK if successful, or
+** an error code (i.e. SQLITE_NOMEM) if an error occurs.
+**
+** xInst:
+** Query for the details of phrase match iIdx within the current row.
+** Phrase matches are numbered starting from zero, so the iIdx argument
+** should be greater than or equal to zero and smaller than the value
+** output by xInstCount().
+**
+** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM)
+** if an error occurs.
+**
+** xRowid:
+** Returns the rowid of the current row.
+**
+** xTokenize:
+** Tokenize text using the tokenizer belonging to the FTS5 table.
+**
+** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback):
+** This API function is used to query the FTS table for phrase iPhrase
+** of the current query. Specifically, a query equivalent to:
+**
+** ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid
+**
+** with $p set to a phrase equivalent to the phrase iPhrase of the
+** current query is executed. For each row visited, the callback function
+** passed as the fourth argument is invoked. The context and API objects
+** passed to the callback function may be used to access the properties of
+** each matched row. Invoking Api.xUserData() returns a copy of the pointer
+** passed as the third argument to pUserData.
+**
+** If the callback function returns any value other than SQLITE_OK, the
+** query is abandoned and the xQueryPhrase function returns immediately.
+** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.
+** Otherwise, the error code is propagated upwards.
+**
+** If the query runs to completion without incident, SQLITE_OK is returned.
+** Or, if some error occurs before the query completes or is aborted by
+** the callback, an SQLite error code is returned.
+**
+**
+** xSetAuxdata(pFts5, pAux, xDelete)
+**
+** Save the pointer passed as the second argument as the extension functions
+** "auxiliary data". The pointer may then be retrieved by the current or any
+** future invocation of the same fts5 extension function made as part of
+** of the same MATCH query using the xGetAuxdata() API.
+**
+** Each extension function is allocated a single auxiliary data slot for
+** each FTS query (MATCH expression). If the extension function is invoked
+** more than once for a single FTS query, then all invocations share a
+** single auxiliary data context.
+**
+** If there is already an auxiliary data pointer when this function is
+** invoked, then it is replaced by the new pointer. If an xDelete callback
+** was specified along with the original pointer, it is invoked at this
+** point.
+**
+** The xDelete callback, if one is specified, is also invoked on the
+** auxiliary data pointer after the FTS5 query has finished.
+**
+** If an error (e.g. an OOM condition) occurs within this function, an
+** the auxiliary data is set to NULL and an error code returned. If the
+** xDelete parameter was not NULL, it is invoked on the auxiliary data
+** pointer before returning.
+**
+**
+** xGetAuxdata(pFts5, bClear)
+**
+** Returns the current auxiliary data pointer for the fts5 extension
+** function. See the xSetAuxdata() method for details.
+**
+** If the bClear argument is non-zero, then the auxiliary data is cleared
+** (set to NULL) before this function returns. In this case the xDelete,
+** if any, is not invoked.
+**
+**
+** xRowCount(pFts5, pnRow)
+**
+** This function is used to retrieve the total number of rows in the table.
+** In other words, the same value that would be returned by:
+**
+** SELECT count(*) FROM ftstable;
+**
+** xPhraseFirst()
+** This function is used, along with type Fts5PhraseIter and the xPhraseNext
+** method, to iterate through all instances of a single query phrase within
+** the current row. This is the same information as is accessible via the
+** xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient
+** to use, this API may be faster under some circumstances. To iterate
+** through instances of phrase iPhrase, use the following code:
+**
+** Fts5PhraseIter iter;
+** int iCol, iOff;
+** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);
+** iOff>=0;
+** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)
+** ){
+** // An instance of phrase iPhrase at offset iOff of column iCol
+** }
+**
+** The Fts5PhraseIter structure is defined above. Applications should not
+** modify this structure directly - it should only be used as shown above
+** with the xPhraseFirst() and xPhraseNext() API methods.
+**
+** xPhraseNext()
+** See xPhraseFirst above.
+*/
+struct Fts5ExtensionApi {
+ int iVersion; /* Currently always set to 1 */
+
+ void *(*xUserData)(Fts5Context*);
+
+ int (*xColumnCount)(Fts5Context*);
+ int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
+ int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);
+
+ int (*xTokenize)(Fts5Context*,
+ const char *pText, int nText, /* Text to tokenize */
+ void *pCtx, /* Context passed to xToken() */
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
+ );
+
+ int (*xPhraseCount)(Fts5Context*);
+ int (*xPhraseSize)(Fts5Context*, int iPhrase);
+
+ int (*xInstCount)(Fts5Context*, int *pnInst);
+ int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);
+
+ sqlite3_int64 (*xRowid)(Fts5Context*);
+ int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);
+ int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);
+
+ int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,
+ int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)
+ );
+ int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
+ void *(*xGetAuxdata)(Fts5Context*, int bClear);
+
+ void (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
+ void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
+};
+
+/*
+** CUSTOM AUXILIARY FUNCTIONS
+*************************************************************************/
+
+/*************************************************************************
+** CUSTOM TOKENIZERS
+**
+** Applications may also register custom tokenizer types. A tokenizer
+** is registered by providing fts5 with a populated instance of the
+** following structure. All structure methods must be defined, setting
+** any member of the fts5_tokenizer struct to NULL leads to undefined
+** behaviour. The structure methods are expected to function as follows:
+**
+** xCreate:
+** This function is used to allocate and inititalize a tokenizer instance.
+** A tokenizer instance is required to actually tokenize text.
+**
+** The first argument passed to this function is a copy of the (void*)
+** pointer provided by the application when the fts5_tokenizer object
+** was registered with FTS5 (the third argument to xCreateTokenizer()).
+** The second and third arguments are an array of nul-terminated strings
+** containing the tokenizer arguments, if any, specified following the
+** tokenizer name as part of the CREATE VIRTUAL TABLE statement used
+** to create the FTS5 table.
+**
+** The final argument is an output variable. If successful, (*ppOut)
+** should be set to point to the new tokenizer handle and SQLITE_OK
+** returned. If an error occurs, some value other than SQLITE_OK should
+** be returned. In this case, fts5 assumes that the final value of *ppOut
+** is undefined.
+**
+** xDelete:
+** This function is invoked to delete a tokenizer handle previously
+** allocated using xCreate(). Fts5 guarantees that this function will
+** be invoked exactly once for each successful call to xCreate().
+**
+** xTokenize:
+** This function is expected to tokenize the nText byte string indicated
+** by argument pText. pText may or may not be nul-terminated. The first
+** argument passed to this function is a pointer to an Fts5Tokenizer object
+** returned by an earlier call to xCreate().
+**
+** The second argument indicates the reason that FTS5 is requesting
+** tokenization of the supplied text. This is always one of the following
+** four values:
+**
+** <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into
+** or removed from the FTS table. The tokenizer is being invoked to
+** determine the set of tokens to add to (or delete from) the
+** FTS index.
+**
+** <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed
+** against the FTS index. The tokenizer is being called to tokenize
+** a bareword or quoted string specified as part of the query.
+**
+** <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as
+** FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is
+** followed by a "*" character, indicating that the last token
+** returned by the tokenizer will be treated as a token prefix.
+**
+** <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to
+** satisfy an fts5_api.xTokenize() request made by an auxiliary
+** function. Or an fts5_api.xColumnSize() request made by the same
+** on a columnsize=0 database.
+** </ul>
+**
+** For each token in the input string, the supplied callback xToken() must
+** be invoked. The first argument to it should be a copy of the pointer
+** passed as the second argument to xTokenize(). The third and fourth
+** arguments are a pointer to a buffer containing the token text, and the
+** size of the token in bytes. The 4th and 5th arguments are the byte offsets
+** of the first byte of and first byte immediately following the text from
+** which the token is derived within the input.
+**
+** The second argument passed to the xToken() callback ("tflags") should
+** normally be set to 0. The exception is if the tokenizer supports
+** synonyms. In this case see the discussion below for details.
+**
+** FTS5 assumes the xToken() callback is invoked for each token in the
+** order that they occur within the input text.
+**
+** If an xToken() callback returns any value other than SQLITE_OK, then
+** the tokenization should be abandoned and the xTokenize() method should
+** immediately return a copy of the xToken() return value. Or, if the
+** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,
+** if an error occurs with the xTokenize() implementation itself, it
+** may abandon the tokenization and return any error code other than
+** SQLITE_OK or SQLITE_DONE.
+**
+** SYNONYM SUPPORT
+**
+** Custom tokenizers may also support synonyms. Consider a case in which a
+** user wishes to query for a phrase such as "first place". Using the
+** built-in tokenizers, the FTS5 query 'first + place' will match instances
+** of "first place" within the document set, but not alternative forms
+** such as "1st place". In some applications, it would be better to match
+** all instances of "first place" or "1st place" regardless of which form
+** the user specified in the MATCH query text.
+**
+** There are several ways to approach this in FTS5:
+**
+** <ol><li> By mapping all synonyms to a single token. In this case, the
+** In the above example, this means that the tokenizer returns the
+** same token for inputs "first" and "1st". Say that token is in
+** fact "first", so that when the user inserts the document "I won
+** 1st place" entries are added to the index for tokens "i", "won",
+** "first" and "place". If the user then queries for '1st + place',
+** the tokenizer substitutes "first" for "1st" and the query works
+** as expected.
+**
+** <li> By adding multiple synonyms for a single term to the FTS index.
+** In this case, when tokenizing query text, the tokenizer may
+** provide multiple synonyms for a single term within the document.
+** FTS5 then queries the index for each synonym individually. For
+** example, faced with the query:
+**
+** <codeblock>
+** ... MATCH 'first place'</codeblock>
+**
+** the tokenizer offers both "1st" and "first" as synonyms for the
+** first token in the MATCH query and FTS5 effectively runs a query
+** similar to:
+**
+** <codeblock>
+** ... MATCH '(first OR 1st) place'</codeblock>
+**
+** except that, for the purposes of auxiliary functions, the query
+** still appears to contain just two phrases - "(first OR 1st)"
+** being treated as a single phrase.
+**
+** <li> By adding multiple synonyms for a single term to the FTS index.
+** Using this method, when tokenizing document text, the tokenizer
+** provides multiple synonyms for each token. So that when a
+** document such as "I won first place" is tokenized, entries are
+** added to the FTS index for "i", "won", "first", "1st" and
+** "place".
+**
+** This way, even if the tokenizer does not provide synonyms
+** when tokenizing query text (it should not - to do would be
+** inefficient), it doesn't matter if the user queries for
+** 'first + place' or '1st + place', as there are entires in the
+** FTS index corresponding to both forms of the first token.
+** </ol>
+**
+** Whether it is parsing document or query text, any call to xToken that
+** specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit
+** is considered to supply a synonym for the previous token. For example,
+** when parsing the document "I won first place", a tokenizer that supports
+** synonyms would call xToken() 5 times, as follows:
+**
+** <codeblock>
+** xToken(pCtx, 0, "i", 1, 0, 1);
+** xToken(pCtx, 0, "won", 3, 2, 5);
+** xToken(pCtx, 0, "first", 5, 6, 11);
+** xToken(pCtx, FTS5_TOKEN_COLOCATED, "1st", 3, 6, 11);
+** xToken(pCtx, 0, "place", 5, 12, 17);
+**</codeblock>
+**
+** It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time
+** xToken() is called. Multiple synonyms may be specified for a single token
+** by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence.
+** There is no limit to the number of synonyms that may be provided for a
+** single token.
+**
+** In many cases, method (1) above is the best approach. It does not add
+** extra data to the FTS index or require FTS5 to query for multiple terms,
+** so it is efficient in terms of disk space and query speed. However, it
+** does not support prefix queries very well. If, as suggested above, the
+** token "first" is subsituted for "1st" by the tokenizer, then the query:
+**
+** <codeblock>
+** ... MATCH '1s*'</codeblock>
+**
+** will not match documents that contain the token "1st" (as the tokenizer
+** will probably not map "1s" to any prefix of "first").
+**
+** For full prefix support, method (3) may be preferred. In this case,
+** because the index contains entries for both "first" and "1st", prefix
+** queries such as 'fi*' or '1s*' will match correctly. However, because
+** extra entries are added to the FTS index, this method uses more space
+** within the database.
+**
+** Method (2) offers a midpoint between (1) and (3). Using this method,
+** a query such as '1s*' will match documents that contain the literal
+** token "1st", but not "first" (assuming the tokenizer is not able to
+** provide synonyms for prefixes). However, a non-prefix query like '1st'
+** will match against "1st" and "first". This method does not require
+** extra disk space, as no extra entries are added to the FTS index.
+** On the other hand, it may require more CPU cycles to run MATCH queries,
+** as separate queries of the FTS index are required for each synonym.
+**
+** When using methods (2) or (3), it is important that the tokenizer only
+** provide synonyms when tokenizing document text (method (2)) or query
+** text (method (3)), not both. Doing so will not cause any errors, but is
+** inefficient.
+*/
+typedef struct Fts5Tokenizer Fts5Tokenizer;
+typedef struct fts5_tokenizer fts5_tokenizer;
+struct fts5_tokenizer {
+ int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
+ void (*xDelete)(Fts5Tokenizer*);
+ int (*xTokenize)(Fts5Tokenizer*,
+ void *pCtx,
+ int flags, /* Mask of FTS5_TOKENIZE_* flags */
+ const char *pText, int nText,
+ int (*xToken)(
+ void *pCtx, /* Copy of 2nd argument to xTokenize() */
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
+ const char *pToken, /* Pointer to buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStart, /* Byte offset of token within input text */
+ int iEnd /* Byte offset of end of token within input text */
+ )
+ );
+};
+
+/* Flags that may be passed as the third argument to xTokenize() */
+#define FTS5_TOKENIZE_QUERY 0x0001
+#define FTS5_TOKENIZE_PREFIX 0x0002
+#define FTS5_TOKENIZE_DOCUMENT 0x0004
+#define FTS5_TOKENIZE_AUX 0x0008
+
+/* Flags that may be passed by the tokenizer implementation back to FTS5
+** as the third argument to the supplied xToken callback. */
+#define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
+
+/*
+** END OF CUSTOM TOKENIZERS
+*************************************************************************/
+
+/*************************************************************************
+** FTS5 EXTENSION REGISTRATION API
+*/
+typedef struct fts5_api fts5_api;
+struct fts5_api {
+ int iVersion; /* Currently always set to 2 */
+
+ /* Create a new tokenizer */
+ int (*xCreateTokenizer)(
+ fts5_api *pApi,
+ const char *zName,
+ void *pContext,
+ fts5_tokenizer *pTokenizer,
+ void (*xDestroy)(void*)
+ );
+
+ /* Find an existing tokenizer */
+ int (*xFindTokenizer)(
+ fts5_api *pApi,
+ const char *zName,
+ void **ppContext,
+ fts5_tokenizer *pTokenizer
+ );
+
+ /* Create a new auxiliary function */
+ int (*xCreateFunction)(
+ fts5_api *pApi,
+ const char *zName,
+ void *pContext,
+ fts5_extension_function xFunction,
+ void (*xDestroy)(void*)
+ );
+};
+
+/*
+** END OF REGISTRATION API
+*************************************************************************/
+
+#if 0
+} /* end of the 'extern "C"' block */
+#endif
+
+#endif /* _FTS5_H */
+
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+*/
+#ifndef _FTS5INT_H
+#define _FTS5INT_H
+
+/* #include "sqlite3ext.h" */
+SQLITE_EXTENSION_INIT1
+
+/* #include <string.h> */
+/* #include <assert.h> */
+
+#ifndef SQLITE_AMALGAMATION
+
+typedef unsigned char u8;
+typedef unsigned int u32;
+typedef unsigned short u16;
+typedef sqlite3_int64 i64;
+typedef sqlite3_uint64 u64;
+
+#define ArraySize(x) (sizeof(x) / sizeof(x[0]))
+
+#define testcase(x)
+#define ALWAYS(x) 1
+#define NEVER(x) 0
+
+#define MIN(x,y) (((x) < (y)) ? (x) : (y))
+#define MAX(x,y) (((x) > (y)) ? (x) : (y))
+
+/*
+** Constants for the largest and smallest possible 64-bit signed integers.
+*/
+# define LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32))
+# define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)
+
+#endif
+
+
+/*
+** Maximum number of prefix indexes on single FTS5 table. This must be
+** less than 32. If it is set to anything large than that, an #error
+** directive in fts5_index.c will cause the build to fail.
+*/
+#define FTS5_MAX_PREFIX_INDEXES 31
+
+#define FTS5_DEFAULT_NEARDIST 10
+#define FTS5_DEFAULT_RANK "bm25"
+
+/* Name of rank and rowid columns */
+#define FTS5_RANK_NAME "rank"
+#define FTS5_ROWID_NAME "rowid"
+
+#ifdef SQLITE_DEBUG
+# define FTS5_CORRUPT sqlite3Fts5Corrupt()
+static int sqlite3Fts5Corrupt(void);
+#else
+# define FTS5_CORRUPT SQLITE_CORRUPT_VTAB
+#endif
+
+/*
+** The assert_nc() macro is similar to the assert() macro, except that it
+** is used for assert() conditions that are true only if it can be
+** guranteed that the database is not corrupt.
+*/
+#ifdef SQLITE_DEBUG
+SQLITE_API extern int sqlite3_fts5_may_be_corrupt;
+# define assert_nc(x) assert(sqlite3_fts5_may_be_corrupt || (x))
+#else
+# define assert_nc(x) assert(x)
+#endif
+
+typedef struct Fts5Global Fts5Global;
+typedef struct Fts5Colset Fts5Colset;
+
+/* If a NEAR() clump or phrase may only match a specific set of columns,
+** then an object of the following type is used to record the set of columns.
+** Each entry in the aiCol[] array is a column that may be matched.
+**
+** This object is used by fts5_expr.c and fts5_index.c.
+*/
+struct Fts5Colset {
+ int nCol;
+ int aiCol[1];
+};
+
+
+
+/**************************************************************************
+** Interface to code in fts5_config.c. fts5_config.c contains contains code
+** to parse the arguments passed to the CREATE VIRTUAL TABLE statement.
+*/
+
+typedef struct Fts5Config Fts5Config;
+
+/*
+** An instance of the following structure encodes all information that can
+** be gleaned from the CREATE VIRTUAL TABLE statement.
+**
+** And all information loaded from the %_config table.
+**
+** nAutomerge:
+** The minimum number of segments that an auto-merge operation should
+** attempt to merge together. A value of 1 sets the object to use the
+** compile time default. Zero disables auto-merge altogether.
+**
+** zContent:
+**
+** zContentRowid:
+** The value of the content_rowid= option, if one was specified. Or
+** the string "rowid" otherwise. This text is not quoted - if it is
+** used as part of an SQL statement it needs to be quoted appropriately.
+**
+** zContentExprlist:
+**
+** pzErrmsg:
+** This exists in order to allow the fts5_index.c module to return a
+** decent error message if it encounters a file-format version it does
+** not understand.
+**
+** bColumnsize:
+** True if the %_docsize table is created.
+**
+** bPrefixIndex:
+** This is only used for debugging. If set to false, any prefix indexes
+** are ignored. This value is configured using:
+**
+** INSERT INTO tbl(tbl, rank) VALUES('prefix-index', $bPrefixIndex);
+**
+*/
+struct Fts5Config {
+ sqlite3 *db; /* Database handle */
+ char *zDb; /* Database holding FTS index (e.g. "main") */
+ char *zName; /* Name of FTS index */
+ int nCol; /* Number of columns */
+ char **azCol; /* Column names */
+ u8 *abUnindexed; /* True for unindexed columns */
+ int nPrefix; /* Number of prefix indexes */
+ int *aPrefix; /* Sizes in bytes of nPrefix prefix indexes */
+ int eContent; /* An FTS5_CONTENT value */
+ char *zContent; /* content table */
+ char *zContentRowid; /* "content_rowid=" option value */
+ int bColumnsize; /* "columnsize=" option value (dflt==1) */
+ char *zContentExprlist;
+ Fts5Tokenizer *pTok;
+ fts5_tokenizer *pTokApi;
+
+ /* Values loaded from the %_config table */
+ int iCookie; /* Incremented when %_config is modified */
+ int pgsz; /* Approximate page size used in %_data */
+ int nAutomerge; /* 'automerge' setting */
+ int nCrisisMerge; /* Maximum allowed segments per level */
+ char *zRank; /* Name of rank function */
+ char *zRankArgs; /* Arguments to rank function */
+
+ /* If non-NULL, points to sqlite3_vtab.base.zErrmsg. Often NULL. */
+ char **pzErrmsg;
+
+#ifdef SQLITE_DEBUG
+ int bPrefixIndex; /* True to use prefix-indexes */
+#endif
+};
+
+/* Current expected value of %_config table 'version' field */
+#define FTS5_CURRENT_VERSION 4
+
+#define FTS5_CONTENT_NORMAL 0
+#define FTS5_CONTENT_NONE 1
+#define FTS5_CONTENT_EXTERNAL 2
+
+
+
+
+static int sqlite3Fts5ConfigParse(
+ Fts5Global*, sqlite3*, int, const char **, Fts5Config**, char**
+);
+static void sqlite3Fts5ConfigFree(Fts5Config*);
+
+static int sqlite3Fts5ConfigDeclareVtab(Fts5Config *pConfig);
+
+static int sqlite3Fts5Tokenize(
+ Fts5Config *pConfig, /* FTS5 Configuration object */
+ int flags, /* FTS5_TOKENIZE_* flags */
+ const char *pText, int nText, /* Text to tokenize */
+ void *pCtx, /* Context passed to xToken() */
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
+);
+
+static void sqlite3Fts5Dequote(char *z);
+
+/* Load the contents of the %_config table */
+static int sqlite3Fts5ConfigLoad(Fts5Config*, int);
+
+/* Set the value of a single config attribute */
+static int sqlite3Fts5ConfigSetValue(Fts5Config*, const char*, sqlite3_value*, int*);
+
+static int sqlite3Fts5ConfigParseRank(const char*, char**, char**);
+
+/*
+** End of interface to code in fts5_config.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_buffer.c.
+*/
+
+/*
+** Buffer object for the incremental building of string data.
+*/
+typedef struct Fts5Buffer Fts5Buffer;
+struct Fts5Buffer {
+ u8 *p;
+ int n;
+ int nSpace;
+};
+
+static int sqlite3Fts5BufferGrow(int*, Fts5Buffer*, int);
+static void sqlite3Fts5BufferAppendVarint(int*, Fts5Buffer*, i64);
+static void sqlite3Fts5BufferAppendBlob(int*, Fts5Buffer*, int, const u8*);
+static void sqlite3Fts5BufferAppendString(int *, Fts5Buffer*, const char*);
+static void sqlite3Fts5BufferFree(Fts5Buffer*);
+static void sqlite3Fts5BufferZero(Fts5Buffer*);
+static void sqlite3Fts5BufferSet(int*, Fts5Buffer*, int, const u8*);
+static void sqlite3Fts5BufferAppendPrintf(int *, Fts5Buffer*, char *zFmt, ...);
+static void sqlite3Fts5BufferAppend32(int*, Fts5Buffer*, int);
+
+static char *sqlite3Fts5Mprintf(int *pRc, const char *zFmt, ...);
+
+#define fts5BufferZero(x) sqlite3Fts5BufferZero(x)
+#define fts5BufferGrow(a,b,c) sqlite3Fts5BufferGrow(a,b,c)
+#define fts5BufferAppendVarint(a,b,c) sqlite3Fts5BufferAppendVarint(a,b,c)
+#define fts5BufferFree(a) sqlite3Fts5BufferFree(a)
+#define fts5BufferAppendBlob(a,b,c,d) sqlite3Fts5BufferAppendBlob(a,b,c,d)
+#define fts5BufferSet(a,b,c,d) sqlite3Fts5BufferSet(a,b,c,d)
+#define fts5BufferAppend32(a,b,c) sqlite3Fts5BufferAppend32(a,b,c)
+
+/* Write and decode big-endian 32-bit integer values */
+static void sqlite3Fts5Put32(u8*, int);
+static int sqlite3Fts5Get32(const u8*);
+
+#define FTS5_POS2COLUMN(iPos) (int)(iPos >> 32)
+#define FTS5_POS2OFFSET(iPos) (int)(iPos & 0xFFFFFFFF)
+
+typedef struct Fts5PoslistReader Fts5PoslistReader;
+struct Fts5PoslistReader {
+ /* Variables used only by sqlite3Fts5PoslistIterXXX() functions. */
+ const u8 *a; /* Position list to iterate through */
+ int n; /* Size of buffer at a[] in bytes */
+ int i; /* Current offset in a[] */
+
+ u8 bFlag; /* For client use (any custom purpose) */
+
+ /* Output variables */
+ u8 bEof; /* Set to true at EOF */
+ i64 iPos; /* (iCol<<32) + iPos */
+};
+static int sqlite3Fts5PoslistReaderInit(
+ const u8 *a, int n, /* Poslist buffer to iterate through */
+ Fts5PoslistReader *pIter /* Iterator object to initialize */
+);
+static int sqlite3Fts5PoslistReaderNext(Fts5PoslistReader*);
+
+typedef struct Fts5PoslistWriter Fts5PoslistWriter;
+struct Fts5PoslistWriter {
+ i64 iPrev;
+};
+static int sqlite3Fts5PoslistWriterAppend(Fts5Buffer*, Fts5PoslistWriter*, i64);
+
+static int sqlite3Fts5PoslistNext64(
+ const u8 *a, int n, /* Buffer containing poslist */
+ int *pi, /* IN/OUT: Offset within a[] */
+ i64 *piOff /* IN/OUT: Current offset */
+);
+
+/* Malloc utility */
+static void *sqlite3Fts5MallocZero(int *pRc, int nByte);
+static char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn);
+
+/* Character set tests (like isspace(), isalpha() etc.) */
+static int sqlite3Fts5IsBareword(char t);
+
+/*
+** End of interface to code in fts5_buffer.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_index.c. fts5_index.c contains contains code
+** to access the data stored in the %_data table.
+*/
+
+typedef struct Fts5Index Fts5Index;
+typedef struct Fts5IndexIter Fts5IndexIter;
+
+/*
+** Values used as part of the flags argument passed to IndexQuery().
+*/
+#define FTS5INDEX_QUERY_PREFIX 0x0001 /* Prefix query */
+#define FTS5INDEX_QUERY_DESC 0x0002 /* Docs in descending rowid order */
+#define FTS5INDEX_QUERY_TEST_NOIDX 0x0004 /* Do not use prefix index */
+#define FTS5INDEX_QUERY_SCAN 0x0008 /* Scan query (fts5vocab) */
+
+/*
+** Create/destroy an Fts5Index object.
+*/
+static int sqlite3Fts5IndexOpen(Fts5Config *pConfig, int bCreate, Fts5Index**, char**);
+static int sqlite3Fts5IndexClose(Fts5Index *p);
+
+/*
+** for(
+** sqlite3Fts5IndexQuery(p, "token", 5, 0, 0, &pIter);
+** 0==sqlite3Fts5IterEof(pIter);
+** sqlite3Fts5IterNext(pIter)
+** ){
+** i64 iRowid = sqlite3Fts5IterRowid(pIter);
+** }
+*/
+
+/*
+** Open a new iterator to iterate though all rowids that match the
+** specified token or token prefix.
+*/
+static int sqlite3Fts5IndexQuery(
+ Fts5Index *p, /* FTS index to query */
+ const char *pToken, int nToken, /* Token (or prefix) to query for */
+ int flags, /* Mask of FTS5INDEX_QUERY_X flags */
+ Fts5Colset *pColset, /* Match these columns only */
+ Fts5IndexIter **ppIter /* OUT: New iterator object */
+);
+
+/*
+** The various operations on open token or token prefix iterators opened
+** using sqlite3Fts5IndexQuery().
+*/
+static int sqlite3Fts5IterEof(Fts5IndexIter*);
+static int sqlite3Fts5IterNext(Fts5IndexIter*);
+static int sqlite3Fts5IterNextFrom(Fts5IndexIter*, i64 iMatch);
+static i64 sqlite3Fts5IterRowid(Fts5IndexIter*);
+static int sqlite3Fts5IterPoslist(Fts5IndexIter*,Fts5Colset*, const u8**, int*, i64*);
+static int sqlite3Fts5IterPoslistBuffer(Fts5IndexIter *pIter, Fts5Buffer *pBuf);
+
+/*
+** Close an iterator opened by sqlite3Fts5IndexQuery().
+*/
+static void sqlite3Fts5IterClose(Fts5IndexIter*);
+
+/*
+** This interface is used by the fts5vocab module.
+*/
+static const char *sqlite3Fts5IterTerm(Fts5IndexIter*, int*);
+static int sqlite3Fts5IterNextScan(Fts5IndexIter*);
+
+
+/*
+** Insert or remove data to or from the index. Each time a document is
+** added to or removed from the index, this function is called one or more
+** times.
+**
+** For an insert, it must be called once for each token in the new document.
+** If the operation is a delete, it must be called (at least) once for each
+** unique token in the document with an iCol value less than zero. The iPos
+** argument is ignored for a delete.
+*/
+static int sqlite3Fts5IndexWrite(
+ Fts5Index *p, /* Index to write to */
+ int iCol, /* Column token appears in (-ve -> delete) */
+ int iPos, /* Position of token within column */
+ const char *pToken, int nToken /* Token to add or remove to or from index */
+);
+
+/*
+** Indicate that subsequent calls to sqlite3Fts5IndexWrite() pertain to
+** document iDocid.
+*/
+static int sqlite3Fts5IndexBeginWrite(
+ Fts5Index *p, /* Index to write to */
+ int bDelete, /* True if current operation is a delete */
+ i64 iDocid /* Docid to add or remove data from */
+);
+
+/*
+** Flush any data stored in the in-memory hash tables to the database.
+** If the bCommit flag is true, also close any open blob handles.
+*/
+static int sqlite3Fts5IndexSync(Fts5Index *p, int bCommit);
+
+/*
+** Discard any data stored in the in-memory hash tables. Do not write it
+** to the database. Additionally, assume that the contents of the %_data
+** table may have changed on disk. So any in-memory caches of %_data
+** records must be invalidated.
+*/
+static int sqlite3Fts5IndexRollback(Fts5Index *p);
+
+/*
+** Get or set the "averages" values.
+*/
+static int sqlite3Fts5IndexGetAverages(Fts5Index *p, i64 *pnRow, i64 *anSize);
+static int sqlite3Fts5IndexSetAverages(Fts5Index *p, const u8*, int);
+
+/*
+** Functions called by the storage module as part of integrity-check.
+*/
+static u64 sqlite3Fts5IndexCksum(Fts5Config*,i64,int,int,const char*,int);
+static int sqlite3Fts5IndexIntegrityCheck(Fts5Index*, u64 cksum);
+
+/*
+** Called during virtual module initialization to register UDF
+** fts5_decode() with SQLite
+*/
+static int sqlite3Fts5IndexInit(sqlite3*);
+
+static int sqlite3Fts5IndexSetCookie(Fts5Index*, int);
+
+/*
+** Return the total number of entries read from the %_data table by
+** this connection since it was created.
+*/
+static int sqlite3Fts5IndexReads(Fts5Index *p);
+
+static int sqlite3Fts5IndexReinit(Fts5Index *p);
+static int sqlite3Fts5IndexOptimize(Fts5Index *p);
+static int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge);
+
+static int sqlite3Fts5IndexLoadConfig(Fts5Index *p);
+
+/*
+** End of interface to code in fts5_index.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_varint.c.
+*/
+static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v);
+static int sqlite3Fts5GetVarintLen(u32 iVal);
+static u8 sqlite3Fts5GetVarint(const unsigned char*, u64*);
+static int sqlite3Fts5PutVarint(unsigned char *p, u64 v);
+
+#define fts5GetVarint32(a,b) sqlite3Fts5GetVarint32(a,(u32*)&b)
+#define fts5GetVarint sqlite3Fts5GetVarint
+
+#define fts5FastGetVarint32(a, iOff, nVal) { \
+ nVal = (a)[iOff++]; \
+ if( nVal & 0x80 ){ \
+ iOff--; \
+ iOff += fts5GetVarint32(&(a)[iOff], nVal); \
+ } \
+}
+
+
+/*
+** End of interface to code in fts5_varint.c.
+**************************************************************************/
+
+
+/**************************************************************************
+** Interface to code in fts5.c.
+*/
+
+static int sqlite3Fts5GetTokenizer(
+ Fts5Global*,
+ const char **azArg,
+ int nArg,
+ Fts5Tokenizer**,
+ fts5_tokenizer**,
+ char **pzErr
+);
+
+static Fts5Index *sqlite3Fts5IndexFromCsrid(Fts5Global*, i64, int*);
+
+/*
+** End of interface to code in fts5.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_hash.c.
+*/
+typedef struct Fts5Hash Fts5Hash;
+
+/*
+** Create a hash table, free a hash table.
+*/
+static int sqlite3Fts5HashNew(Fts5Hash**, int *pnSize);
+static void sqlite3Fts5HashFree(Fts5Hash*);
+
+static int sqlite3Fts5HashWrite(
+ Fts5Hash*,
+ i64 iRowid, /* Rowid for this entry */
+ int iCol, /* Column token appears in (-ve -> delete) */
+ int iPos, /* Position of token within column */
+ char bByte,
+ const char *pToken, int nToken /* Token to add or remove to or from index */
+);
+
+/*
+** Empty (but do not delete) a hash table.
+*/
+static void sqlite3Fts5HashClear(Fts5Hash*);
+
+static int sqlite3Fts5HashQuery(
+ Fts5Hash*, /* Hash table to query */
+ const char *pTerm, int nTerm, /* Query term */
+ const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */
+ int *pnDoclist /* OUT: Size of doclist in bytes */
+);
+
+static int sqlite3Fts5HashScanInit(
+ Fts5Hash*, /* Hash table to query */
+ const char *pTerm, int nTerm /* Query prefix */
+);
+static void sqlite3Fts5HashScanNext(Fts5Hash*);
+static int sqlite3Fts5HashScanEof(Fts5Hash*);
+static void sqlite3Fts5HashScanEntry(Fts5Hash *,
+ const char **pzTerm, /* OUT: term (nul-terminated) */
+ const u8 **ppDoclist, /* OUT: pointer to doclist */
+ int *pnDoclist /* OUT: size of doclist in bytes */
+);
+
+
+/*
+** End of interface to code in fts5_hash.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_storage.c. fts5_storage.c contains contains
+** code to access the data stored in the %_content and %_docsize tables.
+*/
+
+#define FTS5_STMT_SCAN_ASC 0 /* SELECT rowid, * FROM ... ORDER BY 1 ASC */
+#define FTS5_STMT_SCAN_DESC 1 /* SELECT rowid, * FROM ... ORDER BY 1 DESC */
+#define FTS5_STMT_LOOKUP 2 /* SELECT rowid, * FROM ... WHERE rowid=? */
+
+typedef struct Fts5Storage Fts5Storage;
+
+static int sqlite3Fts5StorageOpen(Fts5Config*, Fts5Index*, int, Fts5Storage**, char**);
+static int sqlite3Fts5StorageClose(Fts5Storage *p);
+static int sqlite3Fts5StorageRename(Fts5Storage*, const char *zName);
+
+static int sqlite3Fts5DropAll(Fts5Config*);
+static int sqlite3Fts5CreateTable(Fts5Config*, const char*, const char*, int, char **);
+
+static int sqlite3Fts5StorageDelete(Fts5Storage *p, i64);
+static int sqlite3Fts5StorageContentInsert(Fts5Storage *p, sqlite3_value**, i64*);
+static int sqlite3Fts5StorageIndexInsert(Fts5Storage *p, sqlite3_value**, i64);
+
+static int sqlite3Fts5StorageIntegrity(Fts5Storage *p);
+
+static int sqlite3Fts5StorageStmt(Fts5Storage *p, int eStmt, sqlite3_stmt**, char**);
+static void sqlite3Fts5StorageStmtRelease(Fts5Storage *p, int eStmt, sqlite3_stmt*);
+
+static int sqlite3Fts5StorageDocsize(Fts5Storage *p, i64 iRowid, int *aCol);
+static int sqlite3Fts5StorageSize(Fts5Storage *p, int iCol, i64 *pnAvg);
+static int sqlite3Fts5StorageRowCount(Fts5Storage *p, i64 *pnRow);
+
+static int sqlite3Fts5StorageSync(Fts5Storage *p, int bCommit);
+static int sqlite3Fts5StorageRollback(Fts5Storage *p);
+
+static int sqlite3Fts5StorageConfigValue(
+ Fts5Storage *p, const char*, sqlite3_value*, int
+);
+
+static int sqlite3Fts5StorageSpecialDelete(Fts5Storage *p, i64 iDel, sqlite3_value**);
+
+static int sqlite3Fts5StorageDeleteAll(Fts5Storage *p);
+static int sqlite3Fts5StorageRebuild(Fts5Storage *p);
+static int sqlite3Fts5StorageOptimize(Fts5Storage *p);
+static int sqlite3Fts5StorageMerge(Fts5Storage *p, int nMerge);
+
+/*
+** End of interface to code in fts5_storage.c.
+**************************************************************************/
+
+
+/**************************************************************************
+** Interface to code in fts5_expr.c.
+*/
+typedef struct Fts5Expr Fts5Expr;
+typedef struct Fts5ExprNode Fts5ExprNode;
+typedef struct Fts5Parse Fts5Parse;
+typedef struct Fts5Token Fts5Token;
+typedef struct Fts5ExprPhrase Fts5ExprPhrase;
+typedef struct Fts5ExprNearset Fts5ExprNearset;
+
+struct Fts5Token {
+ const char *p; /* Token text (not NULL terminated) */
+ int n; /* Size of buffer p in bytes */
+};
+
+/* Parse a MATCH expression. */
+static int sqlite3Fts5ExprNew(
+ Fts5Config *pConfig,
+ const char *zExpr,
+ Fts5Expr **ppNew,
+ char **pzErr
+);
+
+/*
+** for(rc = sqlite3Fts5ExprFirst(pExpr, pIdx, bDesc);
+** rc==SQLITE_OK && 0==sqlite3Fts5ExprEof(pExpr);
+** rc = sqlite3Fts5ExprNext(pExpr)
+** ){
+** // The document with rowid iRowid matches the expression!
+** i64 iRowid = sqlite3Fts5ExprRowid(pExpr);
+** }
+*/
+static int sqlite3Fts5ExprFirst(Fts5Expr*, Fts5Index *pIdx, i64 iMin, int bDesc);
+static int sqlite3Fts5ExprNext(Fts5Expr*, i64 iMax);
+static int sqlite3Fts5ExprEof(Fts5Expr*);
+static i64 sqlite3Fts5ExprRowid(Fts5Expr*);
+
+static void sqlite3Fts5ExprFree(Fts5Expr*);
+
+/* Called during startup to register a UDF with SQLite */
+static int sqlite3Fts5ExprInit(Fts5Global*, sqlite3*);
+
+static int sqlite3Fts5ExprPhraseCount(Fts5Expr*);
+static int sqlite3Fts5ExprPhraseSize(Fts5Expr*, int iPhrase);
+static int sqlite3Fts5ExprPoslist(Fts5Expr*, int, const u8 **);
+
+static int sqlite3Fts5ExprClonePhrase(Fts5Config*, Fts5Expr*, int, Fts5Expr**);
+
+/*******************************************
+** The fts5_expr.c API above this point is used by the other hand-written
+** C code in this module. The interfaces below this point are called by
+** the parser code in fts5parse.y. */
+
+static void sqlite3Fts5ParseError(Fts5Parse *pParse, const char *zFmt, ...);
+
+static Fts5ExprNode *sqlite3Fts5ParseNode(
+ Fts5Parse *pParse,
+ int eType,
+ Fts5ExprNode *pLeft,
+ Fts5ExprNode *pRight,
+ Fts5ExprNearset *pNear
+);
+
+static Fts5ExprPhrase *sqlite3Fts5ParseTerm(
+ Fts5Parse *pParse,
+ Fts5ExprPhrase *pPhrase,
+ Fts5Token *pToken,
+ int bPrefix
+);
+
+static Fts5ExprNearset *sqlite3Fts5ParseNearset(
+ Fts5Parse*,
+ Fts5ExprNearset*,
+ Fts5ExprPhrase*
+);
+
+static Fts5Colset *sqlite3Fts5ParseColset(
+ Fts5Parse*,
+ Fts5Colset*,
+ Fts5Token *
+);
+
+static void sqlite3Fts5ParsePhraseFree(Fts5ExprPhrase*);
+static void sqlite3Fts5ParseNearsetFree(Fts5ExprNearset*);
+static void sqlite3Fts5ParseNodeFree(Fts5ExprNode*);
+
+static void sqlite3Fts5ParseSetDistance(Fts5Parse*, Fts5ExprNearset*, Fts5Token*);
+static void sqlite3Fts5ParseSetColset(Fts5Parse*, Fts5ExprNearset*, Fts5Colset*);
+static void sqlite3Fts5ParseFinished(Fts5Parse *pParse, Fts5ExprNode *p);
+static void sqlite3Fts5ParseNear(Fts5Parse *pParse, Fts5Token*);
+
+/*
+** End of interface to code in fts5_expr.c.
+**************************************************************************/
+
+
+
+/**************************************************************************
+** Interface to code in fts5_aux.c.
+*/
+
+static int sqlite3Fts5AuxInit(fts5_api*);
+/*
+** End of interface to code in fts5_aux.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_tokenizer.c.
+*/
+
+static int sqlite3Fts5TokenizerInit(fts5_api*);
+/*
+** End of interface to code in fts5_tokenizer.c.
+**************************************************************************/
+
+/**************************************************************************
+** Interface to code in fts5_vocab.c.
+*/
+
+static int sqlite3Fts5VocabInit(Fts5Global*, sqlite3*);
+
+/*
+** End of interface to code in fts5_vocab.c.
+**************************************************************************/
+
+
+/**************************************************************************
+** Interface to automatically generated code in fts5_unicode2.c.
+*/
+static int sqlite3Fts5UnicodeIsalnum(int c);
+static int sqlite3Fts5UnicodeIsdiacritic(int c);
+static int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic);
+/*
+** End of interface to code in fts5_unicode2.c.
+**************************************************************************/
+
+#endif
+
+#define FTS5_OR 1
+#define FTS5_AND 2
+#define FTS5_NOT 3
+#define FTS5_TERM 4
+#define FTS5_COLON 5
+#define FTS5_LP 6
+#define FTS5_RP 7
+#define FTS5_LCP 8
+#define FTS5_RCP 9
+#define FTS5_STRING 10
+#define FTS5_COMMA 11
+#define FTS5_PLUS 12
+#define FTS5_STAR 13
+
+/* Driver template for the LEMON parser generator.
+** The author disclaims copyright to this source code.
+**
+** This version of "lempar.c" is modified, slightly, for use by SQLite.
+** The only modifications are the addition of a couple of NEVER()
+** macros to disable tests that are needed in the case of a general
+** LALR(1) grammar but which are always false in the
+** specific grammar used by SQLite.
+*/
+/* First off, code is included that follows the "include" declaration
+** in the input grammar file. */
+/* #include <stdio.h> */
+
+
+/*
+** Disable all error recovery processing in the parser push-down
+** automaton.
+*/
+#define fts5YYNOERRORRECOVERY 1
+
+/*
+** Make fts5yytestcase() the same as testcase()
+*/
+#define fts5yytestcase(X) testcase(X)
+
+/* Next is all token values, in a form suitable for use by makeheaders.
+** This section will be null unless lemon is run with the -m switch.
+*/
+/*
+** These constants (all generated automatically by the parser generator)
+** specify the various kinds of tokens (terminals) that the parser
+** understands.
+**
+** Each symbol here is a terminal symbol in the grammar.
+*/
+/* Make sure the INTERFACE macro is defined.
+*/
+#ifndef INTERFACE
+# define INTERFACE 1
+#endif
+/* The next thing included is series of defines which control
+** various aspects of the generated parser.
+** fts5YYCODETYPE is the data type used for storing terminal
+** and nonterminal numbers. "unsigned char" is
+** used if there are fewer than 250 terminals
+** and nonterminals. "int" is used otherwise.
+** fts5YYNOCODE is a number of type fts5YYCODETYPE which corresponds
+** to no legal terminal or nonterminal number. This
+** number is used to fill in empty slots of the hash
+** table.
+** fts5YYFALLBACK If defined, this indicates that one or more tokens
+** have fall-back values which should be used if the
+** original value of the token will not parse.
+** fts5YYACTIONTYPE is the data type used for storing terminal
+** and nonterminal numbers. "unsigned char" is
+** used if there are fewer than 250 rules and
+** states combined. "int" is used otherwise.
+** sqlite3Fts5ParserFTS5TOKENTYPE is the data type used for minor tokens given
+** directly to the parser from the tokenizer.
+** fts5YYMINORTYPE is the data type used for all minor tokens.
+** This is typically a union of many types, one of
+** which is sqlite3Fts5ParserFTS5TOKENTYPE. The entry in the union
+** for base tokens is called "fts5yy0".
+** fts5YYSTACKDEPTH is the maximum depth of the parser's stack. If
+** zero the stack is dynamically sized using realloc()
+** sqlite3Fts5ParserARG_SDECL A static variable declaration for the %extra_argument
+** sqlite3Fts5ParserARG_PDECL A parameter declaration for the %extra_argument
+** sqlite3Fts5ParserARG_STORE Code to store %extra_argument into fts5yypParser
+** sqlite3Fts5ParserARG_FETCH Code to extract %extra_argument from fts5yypParser
+** fts5YYERRORSYMBOL is the code number of the error symbol. If not
+** defined, then do no error processing.
+** fts5YYNSTATE the combined number of states.
+** fts5YYNRULE the number of rules in the grammar
+** fts5YY_MAX_SHIFT Maximum value for shift actions
+** fts5YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
+** fts5YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
+** fts5YY_MIN_REDUCE Maximum value for reduce actions
+** fts5YY_ERROR_ACTION The fts5yy_action[] code for syntax error
+** fts5YY_ACCEPT_ACTION The fts5yy_action[] code for accept
+** fts5YY_NO_ACTION The fts5yy_action[] code for no-op
+*/
+#define fts5YYCODETYPE unsigned char
+#define fts5YYNOCODE 27
+#define fts5YYACTIONTYPE unsigned char
+#define sqlite3Fts5ParserFTS5TOKENTYPE Fts5Token
+typedef union {
+ int fts5yyinit;
+ sqlite3Fts5ParserFTS5TOKENTYPE fts5yy0;
+ Fts5Colset* fts5yy3;
+ Fts5ExprPhrase* fts5yy11;
+ Fts5ExprNode* fts5yy18;
+ int fts5yy20;
+ Fts5ExprNearset* fts5yy26;
+} fts5YYMINORTYPE;
+#ifndef fts5YYSTACKDEPTH
+#define fts5YYSTACKDEPTH 100
+#endif
+#define sqlite3Fts5ParserARG_SDECL Fts5Parse *pParse;
+#define sqlite3Fts5ParserARG_PDECL ,Fts5Parse *pParse
+#define sqlite3Fts5ParserARG_FETCH Fts5Parse *pParse = fts5yypParser->pParse
+#define sqlite3Fts5ParserARG_STORE fts5yypParser->pParse = pParse
+#define fts5YYNSTATE 26
+#define fts5YYNRULE 24
+#define fts5YY_MAX_SHIFT 25
+#define fts5YY_MIN_SHIFTREDUCE 40
+#define fts5YY_MAX_SHIFTREDUCE 63
+#define fts5YY_MIN_REDUCE 64
+#define fts5YY_MAX_REDUCE 87
+#define fts5YY_ERROR_ACTION 88
+#define fts5YY_ACCEPT_ACTION 89
+#define fts5YY_NO_ACTION 90
+
+/* The fts5yyzerominor constant is used to initialize instances of
+** fts5YYMINORTYPE objects to zero. */
+static const fts5YYMINORTYPE fts5yyzerominor = { 0 };
+
+/* Define the fts5yytestcase() macro to be a no-op if is not already defined
+** otherwise.
+**
+** Applications can choose to define fts5yytestcase() in the %include section
+** to a macro that can assist in verifying code coverage. For production
+** code the fts5yytestcase() macro should be turned off. But it is useful
+** for testing.
+*/
+#ifndef fts5yytestcase
+# define fts5yytestcase(X)
+#endif
+
+
+/* Next are the tables used to determine what action to take based on the
+** current state and lookahead token. These tables are used to implement
+** functions that take a state number and lookahead value and return an
+** action integer.
+**
+** Suppose the action integer is N. Then the action is determined as
+** follows
+**
+** 0 <= N <= fts5YY_MAX_SHIFT Shift N. That is, push the lookahead
+** token onto the stack and goto state N.
+**
+** N between fts5YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
+** and fts5YY_MAX_SHIFTREDUCE reduce by rule N-fts5YY_MIN_SHIFTREDUCE.
+**
+** N between fts5YY_MIN_REDUCE Reduce by rule N-fts5YY_MIN_REDUCE
+** and fts5YY_MAX_REDUCE
+
+** N == fts5YY_ERROR_ACTION A syntax error has occurred.
+**
+** N == fts5YY_ACCEPT_ACTION The parser accepts its input.
+**
+** N == fts5YY_NO_ACTION No such action. Denotes unused
+** slots in the fts5yy_action[] table.
+**
+** The action table is constructed as a single large table named fts5yy_action[].
+** Given state S and lookahead X, the action is computed as
+**
+** fts5yy_action[ fts5yy_shift_ofst[S] + X ]
+**
+** If the index value fts5yy_shift_ofst[S]+X is out of range or if the value
+** fts5yy_lookahead[fts5yy_shift_ofst[S]+X] is not equal to X or if fts5yy_shift_ofst[S]
+** is equal to fts5YY_SHIFT_USE_DFLT, it means that the action is not in the table
+** and that fts5yy_default[S] should be used instead.
+**
+** The formula above is for computing the action when the lookahead is
+** a terminal symbol. If the lookahead is a non-terminal (as occurs after
+** a reduce action) then the fts5yy_reduce_ofst[] array is used in place of
+** the fts5yy_shift_ofst[] array and fts5YY_REDUCE_USE_DFLT is used in place of
+** fts5YY_SHIFT_USE_DFLT.
+**
+** The following are the tables generated in this section:
+**
+** fts5yy_action[] A single table containing all actions.
+** fts5yy_lookahead[] A table containing the lookahead for each entry in
+** fts5yy_action. Used to detect hash collisions.
+** fts5yy_shift_ofst[] For each state, the offset into fts5yy_action for
+** shifting terminals.
+** fts5yy_reduce_ofst[] For each state, the offset into fts5yy_action for
+** shifting non-terminals after a reduce.
+** fts5yy_default[] Default action for each state.
+*/
+#define fts5YY_ACTTAB_COUNT (78)
+static const fts5YYACTIONTYPE fts5yy_action[] = {
+ /* 0 */ 89, 15, 46, 5, 48, 24, 12, 19, 23, 14,
+ /* 10 */ 46, 5, 48, 24, 20, 21, 23, 43, 46, 5,
+ /* 20 */ 48, 24, 6, 18, 23, 17, 46, 5, 48, 24,
+ /* 30 */ 75, 7, 23, 25, 46, 5, 48, 24, 62, 47,
+ /* 40 */ 23, 48, 24, 7, 11, 23, 9, 3, 4, 2,
+ /* 50 */ 62, 50, 52, 44, 64, 3, 4, 2, 49, 4,
+ /* 60 */ 2, 1, 23, 11, 16, 9, 12, 2, 10, 61,
+ /* 70 */ 53, 59, 62, 60, 22, 13, 55, 8,
+};
+static const fts5YYCODETYPE fts5yy_lookahead[] = {
+ /* 0 */ 15, 16, 17, 18, 19, 20, 10, 11, 23, 16,
+ /* 10 */ 17, 18, 19, 20, 23, 24, 23, 16, 17, 18,
+ /* 20 */ 19, 20, 22, 23, 23, 16, 17, 18, 19, 20,
+ /* 30 */ 5, 6, 23, 16, 17, 18, 19, 20, 13, 17,
+ /* 40 */ 23, 19, 20, 6, 8, 23, 10, 1, 2, 3,
+ /* 50 */ 13, 9, 10, 7, 0, 1, 2, 3, 19, 2,
+ /* 60 */ 3, 6, 23, 8, 21, 10, 10, 3, 10, 25,
+ /* 70 */ 10, 10, 13, 25, 12, 10, 7, 5,
+};
+#define fts5YY_SHIFT_USE_DFLT (-5)
+#define fts5YY_SHIFT_COUNT (25)
+#define fts5YY_SHIFT_MIN (-4)
+#define fts5YY_SHIFT_MAX (72)
+static const signed char fts5yy_shift_ofst[] = {
+ /* 0 */ 55, 55, 55, 55, 55, 36, -4, 56, 58, 25,
+ /* 10 */ 37, 60, 59, 59, 46, 54, 42, 57, 62, 61,
+ /* 20 */ 62, 69, 65, 62, 72, 64,
+};
+#define fts5YY_REDUCE_USE_DFLT (-16)
+#define fts5YY_REDUCE_COUNT (13)
+#define fts5YY_REDUCE_MIN (-15)
+#define fts5YY_REDUCE_MAX (48)
+static const signed char fts5yy_reduce_ofst[] = {
+ /* 0 */ -15, -7, 1, 9, 17, 22, -9, 0, 39, 44,
+ /* 10 */ 44, 43, 44, 48,
+};
+static const fts5YYACTIONTYPE fts5yy_default[] = {
+ /* 0 */ 88, 88, 88, 88, 88, 69, 82, 88, 88, 87,
+ /* 10 */ 87, 88, 87, 87, 88, 88, 88, 66, 80, 88,
+ /* 20 */ 81, 88, 88, 78, 88, 65,
+};
+
+/* The next table maps tokens into fallback tokens. If a construct
+** like the following:
+**
+** %fallback ID X Y Z.
+**
+** appears in the grammar, then ID becomes a fallback token for X, Y,
+** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
+** but it does not parse, the type of the token is changed to ID and
+** the parse is retried before an error is thrown.
+*/
+#ifdef fts5YYFALLBACK
+static const fts5YYCODETYPE fts5yyFallback[] = {
+};
+#endif /* fts5YYFALLBACK */
+
+/* The following structure represents a single element of the
+** parser's stack. Information stored includes:
+**
+** + The state number for the parser at this level of the stack.
+**
+** + The value of the token stored at this level of the stack.
+** (In other words, the "major" token.)
+**
+** + The semantic value stored at this level of the stack. This is
+** the information used by the action routines in the grammar.
+** It is sometimes called the "minor" token.
+**
+** After the "shift" half of a SHIFTREDUCE action, the stateno field
+** actually contains the reduce action for the second half of the
+** SHIFTREDUCE.
+*/
+struct fts5yyStackEntry {
+ fts5YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */
+ fts5YYCODETYPE major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ fts5YYMINORTYPE minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+typedef struct fts5yyStackEntry fts5yyStackEntry;
+
+/* The state of the parser is completely contained in an instance of
+** the following structure */
+struct fts5yyParser {
+ int fts5yyidx; /* Index of top element in stack */
+#ifdef fts5YYTRACKMAXSTACKDEPTH
+ int fts5yyidxMax; /* Maximum value of fts5yyidx */
+#endif
+ int fts5yyerrcnt; /* Shifts left before out of the error */
+ sqlite3Fts5ParserARG_SDECL /* A place to hold %extra_argument */
+#if fts5YYSTACKDEPTH<=0
+ int fts5yystksz; /* Current side of the stack */
+ fts5yyStackEntry *fts5yystack; /* The parser's stack */
+#else
+ fts5yyStackEntry fts5yystack[fts5YYSTACKDEPTH]; /* The parser's stack */
+#endif
+};
+typedef struct fts5yyParser fts5yyParser;
+
+#ifndef NDEBUG
+/* #include <stdio.h> */
+static FILE *fts5yyTraceFILE = 0;
+static char *fts5yyTracePrompt = 0;
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/*
+** Turn parser tracing on by giving a stream to which to write the trace
+** and a prompt to preface each trace message. Tracing is turned off
+** by making either argument NULL
+**
+** Inputs:
+** <ul>
+** <li> A FILE* to which trace output should be written.
+** If NULL, then tracing is turned off.
+** <li> A prefix string written at the beginning of every
+** line of trace output. If NULL, then tracing is
+** turned off.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+static void sqlite3Fts5ParserTrace(FILE *TraceFILE, char *zTracePrompt){
+ fts5yyTraceFILE = TraceFILE;
+ fts5yyTracePrompt = zTracePrompt;
+ if( fts5yyTraceFILE==0 ) fts5yyTracePrompt = 0;
+ else if( fts5yyTracePrompt==0 ) fts5yyTraceFILE = 0;
+}
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing shifts, the names of all terminals and nonterminals
+** are required. The following table supplies these names */
+static const char *const fts5yyTokenName[] = {
+ "$", "OR", "AND", "NOT",
+ "TERM", "COLON", "LP", "RP",
+ "LCP", "RCP", "STRING", "COMMA",
+ "PLUS", "STAR", "error", "input",
+ "expr", "cnearset", "exprlist", "nearset",
+ "colset", "colsetlist", "nearphrases", "phrase",
+ "neardist_opt", "star_opt",
+};
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing reduce actions, the names of all rules are required.
+*/
+static const char *const fts5yyRuleName[] = {
+ /* 0 */ "input ::= expr",
+ /* 1 */ "expr ::= expr AND expr",
+ /* 2 */ "expr ::= expr OR expr",
+ /* 3 */ "expr ::= expr NOT expr",
+ /* 4 */ "expr ::= LP expr RP",
+ /* 5 */ "expr ::= exprlist",
+ /* 6 */ "exprlist ::= cnearset",
+ /* 7 */ "exprlist ::= exprlist cnearset",
+ /* 8 */ "cnearset ::= nearset",
+ /* 9 */ "cnearset ::= colset COLON nearset",
+ /* 10 */ "colset ::= LCP colsetlist RCP",
+ /* 11 */ "colset ::= STRING",
+ /* 12 */ "colsetlist ::= colsetlist STRING",
+ /* 13 */ "colsetlist ::= STRING",
+ /* 14 */ "nearset ::= phrase",
+ /* 15 */ "nearset ::= STRING LP nearphrases neardist_opt RP",
+ /* 16 */ "nearphrases ::= phrase",
+ /* 17 */ "nearphrases ::= nearphrases phrase",
+ /* 18 */ "neardist_opt ::=",
+ /* 19 */ "neardist_opt ::= COMMA STRING",
+ /* 20 */ "phrase ::= phrase PLUS STRING star_opt",
+ /* 21 */ "phrase ::= STRING star_opt",
+ /* 22 */ "star_opt ::= STAR",
+ /* 23 */ "star_opt ::=",
+};
+#endif /* NDEBUG */
+
+
+#if fts5YYSTACKDEPTH<=0
+/*
+** Try to increase the size of the parser stack.
+*/
+static void fts5yyGrowStack(fts5yyParser *p){
+ int newSize;
+ fts5yyStackEntry *pNew;
+
+ newSize = p->fts5yystksz*2 + 100;
+ pNew = realloc(p->fts5yystack, newSize*sizeof(pNew[0]));
+ if( pNew ){
+ p->fts5yystack = pNew;
+ p->fts5yystksz = newSize;
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sStack grows to %d entries!\n",
+ fts5yyTracePrompt, p->fts5yystksz);
+ }
+#endif
+ }
+}
+#endif
+
+/*
+** This function allocates a new parser.
+** The only argument is a pointer to a function which works like
+** malloc.
+**
+** Inputs:
+** A pointer to the function used to allocate memory.
+**
+** Outputs:
+** A pointer to a parser. This pointer is used in subsequent calls
+** to sqlite3Fts5Parser and sqlite3Fts5ParserFree.
+*/
+static void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64)){
+ fts5yyParser *pParser;
+ pParser = (fts5yyParser*)(*mallocProc)( (u64)sizeof(fts5yyParser) );
+ if( pParser ){
+ pParser->fts5yyidx = -1;
+#ifdef fts5YYTRACKMAXSTACKDEPTH
+ pParser->fts5yyidxMax = 0;
+#endif
+#if fts5YYSTACKDEPTH<=0
+ pParser->fts5yystack = NULL;
+ pParser->fts5yystksz = 0;
+ fts5yyGrowStack(pParser);
+#endif
+ }
+ return pParser;
+}
+
+/* The following function deletes the value associated with a
+** symbol. The symbol can be either a terminal or nonterminal.
+** "fts5yymajor" is the symbol code, and "fts5yypminor" is a pointer to
+** the value.
+*/
+static void fts5yy_destructor(
+ fts5yyParser *fts5yypParser, /* The parser */
+ fts5YYCODETYPE fts5yymajor, /* Type code for object to destroy */
+ fts5YYMINORTYPE *fts5yypminor /* The object to be destroyed */
+){
+ sqlite3Fts5ParserARG_FETCH;
+ switch( fts5yymajor ){
+ /* Here is inserted the actions which take place when a
+ ** terminal or non-terminal is destroyed. This can happen
+ ** when the symbol is popped from the stack during a
+ ** reduce or during error processing or when a parser is
+ ** being destroyed before it is finished parsing.
+ **
+ ** Note: during a reduce, the only symbols destroyed are those
+ ** which appear on the RHS of the rule, but which are not used
+ ** inside the C code.
+ */
+ case 15: /* input */
+{
+ (void)pParse;
+}
+ break;
+ case 16: /* expr */
+ case 17: /* cnearset */
+ case 18: /* exprlist */
+{
+ sqlite3Fts5ParseNodeFree((fts5yypminor->fts5yy18));
+}
+ break;
+ case 19: /* nearset */
+ case 22: /* nearphrases */
+{
+ sqlite3Fts5ParseNearsetFree((fts5yypminor->fts5yy26));
+}
+ break;
+ case 20: /* colset */
+ case 21: /* colsetlist */
+{
+ sqlite3_free((fts5yypminor->fts5yy3));
+}
+ break;
+ case 23: /* phrase */
+{
+ sqlite3Fts5ParsePhraseFree((fts5yypminor->fts5yy11));
+}
+ break;
+ default: break; /* If no destructor action specified: do nothing */
+ }
+}
+
+/*
+** Pop the parser's stack once.
+**
+** If there is a destructor routine associated with the token which
+** is popped from the stack, then call it.
+**
+** Return the major token number for the symbol popped.
+*/
+static int fts5yy_pop_parser_stack(fts5yyParser *pParser){
+ fts5YYCODETYPE fts5yymajor;
+ fts5yyStackEntry *fts5yytos = &pParser->fts5yystack[pParser->fts5yyidx];
+
+ /* There is no mechanism by which the parser stack can be popped below
+ ** empty in SQLite. */
+ assert( pParser->fts5yyidx>=0 );
+#ifndef NDEBUG
+ if( fts5yyTraceFILE && pParser->fts5yyidx>=0 ){
+ fprintf(fts5yyTraceFILE,"%sPopping %s\n",
+ fts5yyTracePrompt,
+ fts5yyTokenName[fts5yytos->major]);
+ }
+#endif
+ fts5yymajor = fts5yytos->major;
+ fts5yy_destructor(pParser, fts5yymajor, &fts5yytos->minor);
+ pParser->fts5yyidx--;
+ return fts5yymajor;
+}
+
+/*
+** Deallocate and destroy a parser. Destructors are all called for
+** all stack elements before shutting the parser down.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser. This should be a pointer
+** obtained from sqlite3Fts5ParserAlloc.
+** <li> A pointer to a function used to reclaim memory obtained
+** from malloc.
+** </ul>
+*/
+static void sqlite3Fts5ParserFree(
+ void *p, /* The parser to be deleted */
+ void (*freeProc)(void*) /* Function used to reclaim memory */
+){
+ fts5yyParser *pParser = (fts5yyParser*)p;
+ /* In SQLite, we never try to destroy a parser that was not successfully
+ ** created in the first place. */
+ if( NEVER(pParser==0) ) return;
+ while( pParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(pParser);
+#if fts5YYSTACKDEPTH<=0
+ free(pParser->fts5yystack);
+#endif
+ (*freeProc)((void*)pParser);
+}
+
+/*
+** Return the peak depth of the stack for a parser.
+*/
+#ifdef fts5YYTRACKMAXSTACKDEPTH
+static int sqlite3Fts5ParserStackPeak(void *p){
+ fts5yyParser *pParser = (fts5yyParser*)p;
+ return pParser->fts5yyidxMax;
+}
+#endif
+
+/*
+** Find the appropriate action for a parser given the terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is fts5YYNOCODE, then check to see if the action is
+** independent of the look-ahead. If it is, return the action, otherwise
+** return fts5YY_NO_ACTION.
+*/
+static int fts5yy_find_shift_action(
+ fts5yyParser *pParser, /* The parser */
+ fts5YYCODETYPE iLookAhead /* The look-ahead token */
+){
+ int i;
+ int stateno = pParser->fts5yystack[pParser->fts5yyidx].stateno;
+
+ if( stateno>=fts5YY_MIN_REDUCE ) return stateno;
+ assert( stateno <= fts5YY_SHIFT_COUNT );
+ i = fts5yy_shift_ofst[stateno];
+ if( i==fts5YY_SHIFT_USE_DFLT ) return fts5yy_default[stateno];
+ assert( iLookAhead!=fts5YYNOCODE );
+ i += iLookAhead;
+ if( i<0 || i>=fts5YY_ACTTAB_COUNT || fts5yy_lookahead[i]!=iLookAhead ){
+ if( iLookAhead>0 ){
+#ifdef fts5YYFALLBACK
+ fts5YYCODETYPE iFallback; /* Fallback token */
+ if( iLookAhead<sizeof(fts5yyFallback)/sizeof(fts5yyFallback[0])
+ && (iFallback = fts5yyFallback[iLookAhead])!=0 ){
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE, "%sFALLBACK %s => %s\n",
+ fts5yyTracePrompt, fts5yyTokenName[iLookAhead], fts5yyTokenName[iFallback]);
+ }
+#endif
+ return fts5yy_find_shift_action(pParser, iFallback);
+ }
+#endif
+#ifdef fts5YYWILDCARD
+ {
+ int j = i - iLookAhead + fts5YYWILDCARD;
+ if(
+#if fts5YY_SHIFT_MIN+fts5YYWILDCARD<0
+ j>=0 &&
+#endif
+#if fts5YY_SHIFT_MAX+fts5YYWILDCARD>=fts5YY_ACTTAB_COUNT
+ j<fts5YY_ACTTAB_COUNT &&
+#endif
+ fts5yy_lookahead[j]==fts5YYWILDCARD
+ ){
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE, "%sWILDCARD %s => %s\n",
+ fts5yyTracePrompt, fts5yyTokenName[iLookAhead], fts5yyTokenName[fts5YYWILDCARD]);
+ }
+#endif /* NDEBUG */
+ return fts5yy_action[j];
+ }
+ }
+#endif /* fts5YYWILDCARD */
+ }
+ return fts5yy_default[stateno];
+ }else{
+ return fts5yy_action[i];
+ }
+}
+
+/*
+** Find the appropriate action for a parser given the non-terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is fts5YYNOCODE, then check to see if the action is
+** independent of the look-ahead. If it is, return the action, otherwise
+** return fts5YY_NO_ACTION.
+*/
+static int fts5yy_find_reduce_action(
+ int stateno, /* Current state number */
+ fts5YYCODETYPE iLookAhead /* The look-ahead token */
+){
+ int i;
+#ifdef fts5YYERRORSYMBOL
+ if( stateno>fts5YY_REDUCE_COUNT ){
+ return fts5yy_default[stateno];
+ }
+#else
+ assert( stateno<=fts5YY_REDUCE_COUNT );
+#endif
+ i = fts5yy_reduce_ofst[stateno];
+ assert( i!=fts5YY_REDUCE_USE_DFLT );
+ assert( iLookAhead!=fts5YYNOCODE );
+ i += iLookAhead;
+#ifdef fts5YYERRORSYMBOL
+ if( i<0 || i>=fts5YY_ACTTAB_COUNT || fts5yy_lookahead[i]!=iLookAhead ){
+ return fts5yy_default[stateno];
+ }
+#else
+ assert( i>=0 && i<fts5YY_ACTTAB_COUNT );
+ assert( fts5yy_lookahead[i]==iLookAhead );
+#endif
+ return fts5yy_action[i];
+}
+
+/*
+** The following routine is called if the stack overflows.
+*/
+static void fts5yyStackOverflow(fts5yyParser *fts5yypParser, fts5YYMINORTYPE *fts5yypMinor){
+ sqlite3Fts5ParserARG_FETCH;
+ fts5yypParser->fts5yyidx--;
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sStack Overflow!\n",fts5yyTracePrompt);
+ }
+#endif
+ while( fts5yypParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(fts5yypParser);
+ /* Here code is inserted which will execute if the parser
+ ** stack every overflows */
+
+ assert( 0 );
+ sqlite3Fts5ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
+}
+
+/*
+** Print tracing information for a SHIFT action
+*/
+#ifndef NDEBUG
+static void fts5yyTraceShift(fts5yyParser *fts5yypParser, int fts5yyNewState){
+ if( fts5yyTraceFILE ){
+ int i;
+ if( fts5yyNewState<fts5YYNSTATE ){
+ fprintf(fts5yyTraceFILE,"%sShift %d\n",fts5yyTracePrompt,fts5yyNewState);
+ fprintf(fts5yyTraceFILE,"%sStack:",fts5yyTracePrompt);
+ for(i=1; i<=fts5yypParser->fts5yyidx; i++)
+ fprintf(fts5yyTraceFILE," %s",fts5yyTokenName[fts5yypParser->fts5yystack[i].major]);
+ fprintf(fts5yyTraceFILE,"\n");
+ }else{
+ fprintf(fts5yyTraceFILE,"%sShift *\n",fts5yyTracePrompt);
+ }
+ }
+}
+#else
+# define fts5yyTraceShift(X,Y)
+#endif
+
+/*
+** Perform a shift action. Return the number of errors.
+*/
+static void fts5yy_shift(
+ fts5yyParser *fts5yypParser, /* The parser to be shifted */
+ int fts5yyNewState, /* The new state to shift in */
+ int fts5yyMajor, /* The major token to shift in */
+ fts5YYMINORTYPE *fts5yypMinor /* Pointer to the minor token to shift in */
+){
+ fts5yyStackEntry *fts5yytos;
+ fts5yypParser->fts5yyidx++;
+#ifdef fts5YYTRACKMAXSTACKDEPTH
+ if( fts5yypParser->fts5yyidx>fts5yypParser->fts5yyidxMax ){
+ fts5yypParser->fts5yyidxMax = fts5yypParser->fts5yyidx;
+ }
+#endif
+#if fts5YYSTACKDEPTH>0
+ if( fts5yypParser->fts5yyidx>=fts5YYSTACKDEPTH ){
+ fts5yyStackOverflow(fts5yypParser, fts5yypMinor);
+ return;
+ }
+#else
+ if( fts5yypParser->fts5yyidx>=fts5yypParser->fts5yystksz ){
+ fts5yyGrowStack(fts5yypParser);
+ if( fts5yypParser->fts5yyidx>=fts5yypParser->fts5yystksz ){
+ fts5yyStackOverflow(fts5yypParser, fts5yypMinor);
+ return;
+ }
+ }
+#endif
+ fts5yytos = &fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx];
+ fts5yytos->stateno = (fts5YYACTIONTYPE)fts5yyNewState;
+ fts5yytos->major = (fts5YYCODETYPE)fts5yyMajor;
+ fts5yytos->minor = *fts5yypMinor;
+ fts5yyTraceShift(fts5yypParser, fts5yyNewState);
+}
+
+/* The following table contains information about every rule that
+** is used during the reduce.
+*/
+static const struct {
+ fts5YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
+ unsigned char nrhs; /* Number of right-hand side symbols in the rule */
+} fts5yyRuleInfo[] = {
+ { 15, 1 },
+ { 16, 3 },
+ { 16, 3 },
+ { 16, 3 },
+ { 16, 3 },
+ { 16, 1 },
+ { 18, 1 },
+ { 18, 2 },
+ { 17, 1 },
+ { 17, 3 },
+ { 20, 3 },
+ { 20, 1 },
+ { 21, 2 },
+ { 21, 1 },
+ { 19, 1 },
+ { 19, 5 },
+ { 22, 1 },
+ { 22, 2 },
+ { 24, 0 },
+ { 24, 2 },
+ { 23, 4 },
+ { 23, 2 },
+ { 25, 1 },
+ { 25, 0 },
+};
+
+static void fts5yy_accept(fts5yyParser*); /* Forward Declaration */
+
+/*
+** Perform a reduce action and the shift that must immediately
+** follow the reduce.
+*/
+static void fts5yy_reduce(
+ fts5yyParser *fts5yypParser, /* The parser */
+ int fts5yyruleno /* Number of the rule by which to reduce */
+){
+ int fts5yygoto; /* The next state */
+ int fts5yyact; /* The next action */
+ fts5YYMINORTYPE fts5yygotominor; /* The LHS of the rule reduced */
+ fts5yyStackEntry *fts5yymsp; /* The top of the parser's stack */
+ int fts5yysize; /* Amount to pop the stack */
+ sqlite3Fts5ParserARG_FETCH;
+ fts5yymsp = &fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx];
+#ifndef NDEBUG
+ if( fts5yyTraceFILE && fts5yyruleno>=0
+ && fts5yyruleno<(int)(sizeof(fts5yyRuleName)/sizeof(fts5yyRuleName[0])) ){
+ fts5yysize = fts5yyRuleInfo[fts5yyruleno].nrhs;
+ fprintf(fts5yyTraceFILE, "%sReduce [%s] -> state %d.\n", fts5yyTracePrompt,
+ fts5yyRuleName[fts5yyruleno], fts5yymsp[-fts5yysize].stateno);
+ }
+#endif /* NDEBUG */
+
+ /* Silence complaints from purify about fts5yygotominor being uninitialized
+ ** in some cases when it is copied into the stack after the following
+ ** switch. fts5yygotominor is uninitialized when a rule reduces that does
+ ** not set the value of its left-hand side nonterminal. Leaving the
+ ** value of the nonterminal uninitialized is utterly harmless as long
+ ** as the value is never used. So really the only thing this code
+ ** accomplishes is to quieten purify.
+ **
+ ** 2007-01-16: The wireshark project (www.wireshark.org) reports that
+ ** without this code, their parser segfaults. I'm not sure what there
+ ** parser is doing to make this happen. This is the second bug report
+ ** from wireshark this week. Clearly they are stressing Lemon in ways
+ ** that it has not been previously stressed... (SQLite ticket #2172)
+ */
+ /*memset(&fts5yygotominor, 0, sizeof(fts5yygotominor));*/
+ fts5yygotominor = fts5yyzerominor;
+
+
+ switch( fts5yyruleno ){
+ /* Beginning here are the reduction cases. A typical example
+ ** follows:
+ ** case 0:
+ ** #line <lineno> <grammarfile>
+ ** { ... } // User supplied code
+ ** #line <lineno> <thisfile>
+ ** break;
+ */
+ case 0: /* input ::= expr */
+{ sqlite3Fts5ParseFinished(pParse, fts5yymsp[0].minor.fts5yy18); }
+ break;
+ case 1: /* expr ::= expr AND expr */
+{
+ fts5yygotominor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-2].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
+}
+ break;
+ case 2: /* expr ::= expr OR expr */
+{
+ fts5yygotominor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_OR, fts5yymsp[-2].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
+}
+ break;
+ case 3: /* expr ::= expr NOT expr */
+{
+ fts5yygotominor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_NOT, fts5yymsp[-2].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
+}
+ break;
+ case 4: /* expr ::= LP expr RP */
+{fts5yygotominor.fts5yy18 = fts5yymsp[-1].minor.fts5yy18;}
+ break;
+ case 5: /* expr ::= exprlist */
+ case 6: /* exprlist ::= cnearset */ fts5yytestcase(fts5yyruleno==6);
+{fts5yygotominor.fts5yy18 = fts5yymsp[0].minor.fts5yy18;}
+ break;
+ case 7: /* exprlist ::= exprlist cnearset */
+{
+ fts5yygotominor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_AND, fts5yymsp[-1].minor.fts5yy18, fts5yymsp[0].minor.fts5yy18, 0);
+}
+ break;
+ case 8: /* cnearset ::= nearset */
+{
+ fts5yygotominor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy26);
+}
+ break;
+ case 9: /* cnearset ::= colset COLON nearset */
+{
+ sqlite3Fts5ParseSetColset(pParse, fts5yymsp[0].minor.fts5yy26, fts5yymsp[-2].minor.fts5yy3);
+ fts5yygotominor.fts5yy18 = sqlite3Fts5ParseNode(pParse, FTS5_STRING, 0, 0, fts5yymsp[0].minor.fts5yy26);
+}
+ break;
+ case 10: /* colset ::= LCP colsetlist RCP */
+{ fts5yygotominor.fts5yy3 = fts5yymsp[-1].minor.fts5yy3; }
+ break;
+ case 11: /* colset ::= STRING */
+{
+ fts5yygotominor.fts5yy3 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
+}
+ break;
+ case 12: /* colsetlist ::= colsetlist STRING */
+{
+ fts5yygotominor.fts5yy3 = sqlite3Fts5ParseColset(pParse, fts5yymsp[-1].minor.fts5yy3, &fts5yymsp[0].minor.fts5yy0); }
+ break;
+ case 13: /* colsetlist ::= STRING */
+{
+ fts5yygotominor.fts5yy3 = sqlite3Fts5ParseColset(pParse, 0, &fts5yymsp[0].minor.fts5yy0);
+}
+ break;
+ case 14: /* nearset ::= phrase */
+{ fts5yygotominor.fts5yy26 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy11); }
+ break;
+ case 15: /* nearset ::= STRING LP nearphrases neardist_opt RP */
+{
+ sqlite3Fts5ParseNear(pParse, &fts5yymsp[-4].minor.fts5yy0);
+ sqlite3Fts5ParseSetDistance(pParse, fts5yymsp[-2].minor.fts5yy26, &fts5yymsp[-1].minor.fts5yy0);
+ fts5yygotominor.fts5yy26 = fts5yymsp[-2].minor.fts5yy26;
+}
+ break;
+ case 16: /* nearphrases ::= phrase */
+{
+ fts5yygotominor.fts5yy26 = sqlite3Fts5ParseNearset(pParse, 0, fts5yymsp[0].minor.fts5yy11);
+}
+ break;
+ case 17: /* nearphrases ::= nearphrases phrase */
+{
+ fts5yygotominor.fts5yy26 = sqlite3Fts5ParseNearset(pParse, fts5yymsp[-1].minor.fts5yy26, fts5yymsp[0].minor.fts5yy11);
+}
+ break;
+ case 18: /* neardist_opt ::= */
+{ fts5yygotominor.fts5yy0.p = 0; fts5yygotominor.fts5yy0.n = 0; }
+ break;
+ case 19: /* neardist_opt ::= COMMA STRING */
+{ fts5yygotominor.fts5yy0 = fts5yymsp[0].minor.fts5yy0; }
+ break;
+ case 20: /* phrase ::= phrase PLUS STRING star_opt */
+{
+ fts5yygotominor.fts5yy11 = sqlite3Fts5ParseTerm(pParse, fts5yymsp[-3].minor.fts5yy11, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy20);
+}
+ break;
+ case 21: /* phrase ::= STRING star_opt */
+{
+ fts5yygotominor.fts5yy11 = sqlite3Fts5ParseTerm(pParse, 0, &fts5yymsp[-1].minor.fts5yy0, fts5yymsp[0].minor.fts5yy20);
+}
+ break;
+ case 22: /* star_opt ::= STAR */
+{ fts5yygotominor.fts5yy20 = 1; }
+ break;
+ case 23: /* star_opt ::= */
+{ fts5yygotominor.fts5yy20 = 0; }
+ break;
+ default:
+ break;
+ };
+ assert( fts5yyruleno>=0 && fts5yyruleno<sizeof(fts5yyRuleInfo)/sizeof(fts5yyRuleInfo[0]) );
+ fts5yygoto = fts5yyRuleInfo[fts5yyruleno].lhs;
+ fts5yysize = fts5yyRuleInfo[fts5yyruleno].nrhs;
+ fts5yypParser->fts5yyidx -= fts5yysize;
+ fts5yyact = fts5yy_find_reduce_action(fts5yymsp[-fts5yysize].stateno,(fts5YYCODETYPE)fts5yygoto);
+ if( fts5yyact <= fts5YY_MAX_SHIFTREDUCE ){
+ if( fts5yyact>fts5YY_MAX_SHIFT ) fts5yyact += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE;
+ /* If the reduce action popped at least
+ ** one element off the stack, then we can push the new element back
+ ** onto the stack here, and skip the stack overflow test in fts5yy_shift().
+ ** That gives a significant speed improvement. */
+ if( fts5yysize ){
+ fts5yypParser->fts5yyidx++;
+ fts5yymsp -= fts5yysize-1;
+ fts5yymsp->stateno = (fts5YYACTIONTYPE)fts5yyact;
+ fts5yymsp->major = (fts5YYCODETYPE)fts5yygoto;
+ fts5yymsp->minor = fts5yygotominor;
+ fts5yyTraceShift(fts5yypParser, fts5yyact);
+ }else{
+ fts5yy_shift(fts5yypParser,fts5yyact,fts5yygoto,&fts5yygotominor);
+ }
+ }else{
+ assert( fts5yyact == fts5YY_ACCEPT_ACTION );
+ fts5yy_accept(fts5yypParser);
+ }
+}
+
+/*
+** The following code executes when the parse fails
+*/
+#ifndef fts5YYNOERRORRECOVERY
+static void fts5yy_parse_failed(
+ fts5yyParser *fts5yypParser /* The parser */
+){
+ sqlite3Fts5ParserARG_FETCH;
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sFail!\n",fts5yyTracePrompt);
+ }
+#endif
+ while( fts5yypParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(fts5yypParser);
+ /* Here code is inserted which will be executed whenever the
+ ** parser fails */
+ sqlite3Fts5ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+#endif /* fts5YYNOERRORRECOVERY */
+
+/*
+** The following code executes when a syntax error first occurs.
+*/
+static void fts5yy_syntax_error(
+ fts5yyParser *fts5yypParser, /* The parser */
+ int fts5yymajor, /* The major type of the error token */
+ fts5YYMINORTYPE fts5yyminor /* The minor type of the error token */
+){
+ sqlite3Fts5ParserARG_FETCH;
+#define FTS5TOKEN (fts5yyminor.fts5yy0)
+
+ sqlite3Fts5ParseError(
+ pParse, "fts5: syntax error near \"%.*s\"",FTS5TOKEN.n,FTS5TOKEN.p
+ );
+ sqlite3Fts5ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/*
+** The following is executed when the parser accepts
+*/
+static void fts5yy_accept(
+ fts5yyParser *fts5yypParser /* The parser */
+){
+ sqlite3Fts5ParserARG_FETCH;
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sAccept!\n",fts5yyTracePrompt);
+ }
+#endif
+ while( fts5yypParser->fts5yyidx>=0 ) fts5yy_pop_parser_stack(fts5yypParser);
+ /* Here code is inserted which will be executed whenever the
+ ** parser accepts */
+ sqlite3Fts5ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/* The main parser program.
+** The first argument is a pointer to a structure obtained from
+** "sqlite3Fts5ParserAlloc" which describes the current state of the parser.
+** The second argument is the major token number. The third is
+** the minor token. The fourth optional argument is whatever the
+** user wants (and specified in the grammar) and is available for
+** use by the action routines.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser (an opaque structure.)
+** <li> The major token number.
+** <li> The minor token number.
+** <li> An option argument of a grammar-specified type.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+static void sqlite3Fts5Parser(
+ void *fts5yyp, /* The parser */
+ int fts5yymajor, /* The major token code number */
+ sqlite3Fts5ParserFTS5TOKENTYPE fts5yyminor /* The value for the token */
+ sqlite3Fts5ParserARG_PDECL /* Optional %extra_argument parameter */
+){
+ fts5YYMINORTYPE fts5yyminorunion;
+ int fts5yyact; /* The parser action. */
+#if !defined(fts5YYERRORSYMBOL) && !defined(fts5YYNOERRORRECOVERY)
+ int fts5yyendofinput; /* True if we are at the end of input */
+#endif
+#ifdef fts5YYERRORSYMBOL
+ int fts5yyerrorhit = 0; /* True if fts5yymajor has invoked an error */
+#endif
+ fts5yyParser *fts5yypParser; /* The parser */
+
+ /* (re)initialize the parser, if necessary */
+ fts5yypParser = (fts5yyParser*)fts5yyp;
+ if( fts5yypParser->fts5yyidx<0 ){
+#if fts5YYSTACKDEPTH<=0
+ if( fts5yypParser->fts5yystksz <=0 ){
+ /*memset(&fts5yyminorunion, 0, sizeof(fts5yyminorunion));*/
+ fts5yyminorunion = fts5yyzerominor;
+ fts5yyStackOverflow(fts5yypParser, &fts5yyminorunion);
+ return;
+ }
+#endif
+ fts5yypParser->fts5yyidx = 0;
+ fts5yypParser->fts5yyerrcnt = -1;
+ fts5yypParser->fts5yystack[0].stateno = 0;
+ fts5yypParser->fts5yystack[0].major = 0;
+ }
+ fts5yyminorunion.fts5yy0 = fts5yyminor;
+#if !defined(fts5YYERRORSYMBOL) && !defined(fts5YYNOERRORRECOVERY)
+ fts5yyendofinput = (fts5yymajor==0);
+#endif
+ sqlite3Fts5ParserARG_STORE;
+
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sInput %s\n",fts5yyTracePrompt,fts5yyTokenName[fts5yymajor]);
+ }
+#endif
+
+ do{
+ fts5yyact = fts5yy_find_shift_action(fts5yypParser,(fts5YYCODETYPE)fts5yymajor);
+ if( fts5yyact <= fts5YY_MAX_SHIFTREDUCE ){
+ if( fts5yyact > fts5YY_MAX_SHIFT ) fts5yyact += fts5YY_MIN_REDUCE - fts5YY_MIN_SHIFTREDUCE;
+ fts5yy_shift(fts5yypParser,fts5yyact,fts5yymajor,&fts5yyminorunion);
+ fts5yypParser->fts5yyerrcnt--;
+ fts5yymajor = fts5YYNOCODE;
+ }else if( fts5yyact <= fts5YY_MAX_REDUCE ){
+ fts5yy_reduce(fts5yypParser,fts5yyact-fts5YY_MIN_REDUCE);
+ }else{
+ assert( fts5yyact == fts5YY_ERROR_ACTION );
+#ifdef fts5YYERRORSYMBOL
+ int fts5yymx;
+#endif
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sSyntax Error!\n",fts5yyTracePrompt);
+ }
+#endif
+#ifdef fts5YYERRORSYMBOL
+ /* A syntax error has occurred.
+ ** The response to an error depends upon whether or not the
+ ** grammar defines an error token "ERROR".
+ **
+ ** This is what we do if the grammar does define ERROR:
+ **
+ ** * Call the %syntax_error function.
+ **
+ ** * Begin popping the stack until we enter a state where
+ ** it is legal to shift the error symbol, then shift
+ ** the error symbol.
+ **
+ ** * Set the error count to three.
+ **
+ ** * Begin accepting and shifting new tokens. No new error
+ ** processing will occur until three tokens have been
+ ** shifted successfully.
+ **
+ */
+ if( fts5yypParser->fts5yyerrcnt<0 ){
+ fts5yy_syntax_error(fts5yypParser,fts5yymajor,fts5yyminorunion);
+ }
+ fts5yymx = fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx].major;
+ if( fts5yymx==fts5YYERRORSYMBOL || fts5yyerrorhit ){
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sDiscard input token %s\n",
+ fts5yyTracePrompt,fts5yyTokenName[fts5yymajor]);
+ }
+#endif
+ fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
+ fts5yymajor = fts5YYNOCODE;
+ }else{
+ while(
+ fts5yypParser->fts5yyidx >= 0 &&
+ fts5yymx != fts5YYERRORSYMBOL &&
+ (fts5yyact = fts5yy_find_reduce_action(
+ fts5yypParser->fts5yystack[fts5yypParser->fts5yyidx].stateno,
+ fts5YYERRORSYMBOL)) >= fts5YY_MIN_REDUCE
+ ){
+ fts5yy_pop_parser_stack(fts5yypParser);
+ }
+ if( fts5yypParser->fts5yyidx < 0 || fts5yymajor==0 ){
+ fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
+ fts5yy_parse_failed(fts5yypParser);
+ fts5yymajor = fts5YYNOCODE;
+ }else if( fts5yymx!=fts5YYERRORSYMBOL ){
+ fts5YYMINORTYPE u2;
+ u2.fts5YYERRSYMDT = 0;
+ fts5yy_shift(fts5yypParser,fts5yyact,fts5YYERRORSYMBOL,&u2);
+ }
+ }
+ fts5yypParser->fts5yyerrcnt = 3;
+ fts5yyerrorhit = 1;
+#elif defined(fts5YYNOERRORRECOVERY)
+ /* If the fts5YYNOERRORRECOVERY macro is defined, then do not attempt to
+ ** do any kind of error recovery. Instead, simply invoke the syntax
+ ** error routine and continue going as if nothing had happened.
+ **
+ ** Applications can set this macro (for example inside %include) if
+ ** they intend to abandon the parse upon the first syntax error seen.
+ */
+ fts5yy_syntax_error(fts5yypParser,fts5yymajor,fts5yyminorunion);
+ fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
+ fts5yymajor = fts5YYNOCODE;
+
+#else /* fts5YYERRORSYMBOL is not defined */
+ /* This is what we do if the grammar does not define ERROR:
+ **
+ ** * Report an error message, and throw away the input token.
+ **
+ ** * If the input token is $, then fail the parse.
+ **
+ ** As before, subsequent error messages are suppressed until
+ ** three input tokens have been successfully shifted.
+ */
+ if( fts5yypParser->fts5yyerrcnt<=0 ){
+ fts5yy_syntax_error(fts5yypParser,fts5yymajor,fts5yyminorunion);
+ }
+ fts5yypParser->fts5yyerrcnt = 3;
+ fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
+ if( fts5yyendofinput ){
+ fts5yy_parse_failed(fts5yypParser);
+ }
+ fts5yymajor = fts5YYNOCODE;
+#endif
+ }
+ }while( fts5yymajor!=fts5YYNOCODE && fts5yypParser->fts5yyidx>=0 );
+#ifndef NDEBUG
+ if( fts5yyTraceFILE ){
+ fprintf(fts5yyTraceFILE,"%sReturn\n",fts5yyTracePrompt);
+ }
+#endif
+ return;
+}
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+*/
+
+
+#include <math.h> /* amalgamator: keep */
+
+/*
+** Object used to iterate through all "coalesced phrase instances" in
+** a single column of the current row. If the phrase instances in the
+** column being considered do not overlap, this object simply iterates
+** through them. Or, if they do overlap (share one or more tokens in
+** common), each set of overlapping instances is treated as a single
+** match. See documentation for the highlight() auxiliary function for
+** details.
+**
+** Usage is:
+**
+** for(rc = fts5CInstIterNext(pApi, pFts, iCol, &iter);
+** (rc==SQLITE_OK && 0==fts5CInstIterEof(&iter);
+** rc = fts5CInstIterNext(&iter)
+** ){
+** printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd);
+** }
+**
+*/
+typedef struct CInstIter CInstIter;
+struct CInstIter {
+ const Fts5ExtensionApi *pApi; /* API offered by current FTS version */
+ Fts5Context *pFts; /* First arg to pass to pApi functions */
+ int iCol; /* Column to search */
+ int iInst; /* Next phrase instance index */
+ int nInst; /* Total number of phrase instances */
+
+ /* Output variables */
+ int iStart; /* First token in coalesced phrase instance */
+ int iEnd; /* Last token in coalesced phrase instance */
+};
+
+/*
+** Advance the iterator to the next coalesced phrase instance. Return
+** an SQLite error code if an error occurs, or SQLITE_OK otherwise.
+*/
+static int fts5CInstIterNext(CInstIter *pIter){
+ int rc = SQLITE_OK;
+ pIter->iStart = -1;
+ pIter->iEnd = -1;
+
+ while( rc==SQLITE_OK && pIter->iInst<pIter->nInst ){
+ int ip; int ic; int io;
+ rc = pIter->pApi->xInst(pIter->pFts, pIter->iInst, &ip, &ic, &io);
+ if( rc==SQLITE_OK ){
+ if( ic==pIter->iCol ){
+ int iEnd = io - 1 + pIter->pApi->xPhraseSize(pIter->pFts, ip);
+ if( pIter->iStart<0 ){
+ pIter->iStart = io;
+ pIter->iEnd = iEnd;
+ }else if( io<=pIter->iEnd ){
+ if( iEnd>pIter->iEnd ) pIter->iEnd = iEnd;
+ }else{
+ break;
+ }
+ }
+ pIter->iInst++;
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Initialize the iterator object indicated by the final parameter to
+** iterate through coalesced phrase instances in column iCol.
+*/
+static int fts5CInstIterInit(
+ const Fts5ExtensionApi *pApi,
+ Fts5Context *pFts,
+ int iCol,
+ CInstIter *pIter
+){
+ int rc;
+
+ memset(pIter, 0, sizeof(CInstIter));
+ pIter->pApi = pApi;
+ pIter->pFts = pFts;
+ pIter->iCol = iCol;
+ rc = pApi->xInstCount(pFts, &pIter->nInst);
+
+ if( rc==SQLITE_OK ){
+ rc = fts5CInstIterNext(pIter);
+ }
+
+ return rc;
+}
+
+
+
+/*************************************************************************
+** Start of highlight() implementation.
+*/
+typedef struct HighlightContext HighlightContext;
+struct HighlightContext {
+ CInstIter iter; /* Coalesced Instance Iterator */
+ int iPos; /* Current token offset in zIn[] */
+ int iRangeStart; /* First token to include */
+ int iRangeEnd; /* If non-zero, last token to include */
+ const char *zOpen; /* Opening highlight */
+ const char *zClose; /* Closing highlight */
+ const char *zIn; /* Input text */
+ int nIn; /* Size of input text in bytes */
+ int iOff; /* Current offset within zIn[] */
+ char *zOut; /* Output value */
+};
+
+/*
+** Append text to the HighlightContext output string - p->zOut. Argument
+** z points to a buffer containing n bytes of text to append. If n is
+** negative, everything up until the first '\0' is appended to the output.
+**
+** If *pRc is set to any value other than SQLITE_OK when this function is
+** called, it is a no-op. If an error (i.e. an OOM condition) is encountered,
+** *pRc is set to an error code before returning.
+*/
+static void fts5HighlightAppend(
+ int *pRc,
+ HighlightContext *p,
+ const char *z, int n
+){
+ if( *pRc==SQLITE_OK ){
+ if( n<0 ) n = strlen(z);
+ p->zOut = sqlite3_mprintf("%z%.*s", p->zOut, n, z);
+ if( p->zOut==0 ) *pRc = SQLITE_NOMEM;
+ }
+}
+
+/*
+** Tokenizer callback used by implementation of highlight() function.
+*/
+static int fts5HighlightCb(
+ void *pContext, /* Pointer to HighlightContext object */
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
+ const char *pToken, /* Buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStartOff, /* Start offset of token */
+ int iEndOff /* End offset of token */
+){
+ HighlightContext *p = (HighlightContext*)pContext;
+ int rc = SQLITE_OK;
+ int iPos;
+
+ if( tflags & FTS5_TOKEN_COLOCATED ) return SQLITE_OK;
+ iPos = p->iPos++;
+
+ if( p->iRangeEnd>0 ){
+ if( iPos<p->iRangeStart || iPos>p->iRangeEnd ) return SQLITE_OK;
+ if( p->iRangeStart && iPos==p->iRangeStart ) p->iOff = iStartOff;
+ }
+
+ if( iPos==p->iter.iStart ){
+ fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iStartOff - p->iOff);
+ fts5HighlightAppend(&rc, p, p->zOpen, -1);
+ p->iOff = iStartOff;
+ }
+
+ if( iPos==p->iter.iEnd ){
+ if( p->iRangeEnd && p->iter.iStart<p->iRangeStart ){
+ fts5HighlightAppend(&rc, p, p->zOpen, -1);
+ }
+ fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
+ fts5HighlightAppend(&rc, p, p->zClose, -1);
+ p->iOff = iEndOff;
+ if( rc==SQLITE_OK ){
+ rc = fts5CInstIterNext(&p->iter);
+ }
+ }
+
+ if( p->iRangeEnd>0 && iPos==p->iRangeEnd ){
+ fts5HighlightAppend(&rc, p, &p->zIn[p->iOff], iEndOff - p->iOff);
+ p->iOff = iEndOff;
+ if( iPos<p->iter.iEnd ){
+ fts5HighlightAppend(&rc, p, p->zClose, -1);
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Implementation of highlight() function.
+*/
+static void fts5HighlightFunction(
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
+ sqlite3_context *pCtx, /* Context for returning result/error */
+ int nVal, /* Number of values in apVal[] array */
+ sqlite3_value **apVal /* Array of trailing arguments */
+){
+ HighlightContext ctx;
+ int rc;
+ int iCol;
+
+ if( nVal!=3 ){
+ const char *zErr = "wrong number of arguments to function highlight()";
+ sqlite3_result_error(pCtx, zErr, -1);
+ return;
+ }
+
+ iCol = sqlite3_value_int(apVal[0]);
+ memset(&ctx, 0, sizeof(HighlightContext));
+ ctx.zOpen = (const char*)sqlite3_value_text(apVal[1]);
+ ctx.zClose = (const char*)sqlite3_value_text(apVal[2]);
+ rc = pApi->xColumnText(pFts, iCol, &ctx.zIn, &ctx.nIn);
+
+ if( ctx.zIn ){
+ if( rc==SQLITE_OK ){
+ rc = fts5CInstIterInit(pApi, pFts, iCol, &ctx.iter);
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = pApi->xTokenize(pFts, ctx.zIn, ctx.nIn, (void*)&ctx,fts5HighlightCb);
+ }
+ fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);
+
+ if( rc==SQLITE_OK ){
+ sqlite3_result_text(pCtx, (const char*)ctx.zOut, -1, SQLITE_TRANSIENT);
+ }
+ sqlite3_free(ctx.zOut);
+ }
+ if( rc!=SQLITE_OK ){
+ sqlite3_result_error_code(pCtx, rc);
+ }
+}
+/*
+** End of highlight() implementation.
+**************************************************************************/
+
+/*
+** Implementation of snippet() function.
+*/
+static void fts5SnippetFunction(
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
+ sqlite3_context *pCtx, /* Context for returning result/error */
+ int nVal, /* Number of values in apVal[] array */
+ sqlite3_value **apVal /* Array of trailing arguments */
+){
+ HighlightContext ctx;
+ int rc = SQLITE_OK; /* Return code */
+ int iCol; /* 1st argument to snippet() */
+ const char *zEllips; /* 4th argument to snippet() */
+ int nToken; /* 5th argument to snippet() */
+ int nInst = 0; /* Number of instance matches this row */
+ int i; /* Used to iterate through instances */
+ int nPhrase; /* Number of phrases in query */
+ unsigned char *aSeen; /* Array of "seen instance" flags */
+ int iBestCol; /* Column containing best snippet */
+ int iBestStart = 0; /* First token of best snippet */
+ int iBestLast; /* Last token of best snippet */
+ int nBestScore = 0; /* Score of best snippet */
+ int nColSize = 0; /* Total size of iBestCol in tokens */
+
+ if( nVal!=5 ){
+ const char *zErr = "wrong number of arguments to function snippet()";
+ sqlite3_result_error(pCtx, zErr, -1);
+ return;
+ }
+
+ memset(&ctx, 0, sizeof(HighlightContext));
+ iCol = sqlite3_value_int(apVal[0]);
+ ctx.zOpen = (const char*)sqlite3_value_text(apVal[1]);
+ ctx.zClose = (const char*)sqlite3_value_text(apVal[2]);
+ zEllips = (const char*)sqlite3_value_text(apVal[3]);
+ nToken = sqlite3_value_int(apVal[4]);
+ iBestLast = nToken-1;
+
+ iBestCol = (iCol>=0 ? iCol : 0);
+ nPhrase = pApi->xPhraseCount(pFts);
+ aSeen = sqlite3_malloc(nPhrase);
+ if( aSeen==0 ){
+ rc = SQLITE_NOMEM;
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = pApi->xInstCount(pFts, &nInst);
+ }
+ for(i=0; rc==SQLITE_OK && i<nInst; i++){
+ int ip, iSnippetCol, iStart;
+ memset(aSeen, 0, nPhrase);
+ rc = pApi->xInst(pFts, i, &ip, &iSnippetCol, &iStart);
+ if( rc==SQLITE_OK && (iCol<0 || iSnippetCol==iCol) ){
+ int nScore = 1000;
+ int iLast = iStart - 1 + pApi->xPhraseSize(pFts, ip);
+ int j;
+ aSeen[ip] = 1;
+
+ for(j=i+1; rc==SQLITE_OK && j<nInst; j++){
+ int ic; int io; int iFinal;
+ rc = pApi->xInst(pFts, j, &ip, &ic, &io);
+ iFinal = io + pApi->xPhraseSize(pFts, ip) - 1;
+ if( rc==SQLITE_OK && ic==iSnippetCol && iLast<iStart+nToken ){
+ nScore += aSeen[ip] ? 1000 : 1;
+ aSeen[ip] = 1;
+ if( iFinal>iLast ) iLast = iFinal;
+ }
+ }
+
+ if( rc==SQLITE_OK && nScore>nBestScore ){
+ iBestCol = iSnippetCol;
+ iBestStart = iStart;
+ iBestLast = iLast;
+ nBestScore = nScore;
+ }
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = pApi->xColumnSize(pFts, iBestCol, &nColSize);
+ }
+ if( rc==SQLITE_OK ){
+ rc = pApi->xColumnText(pFts, iBestCol, &ctx.zIn, &ctx.nIn);
+ }
+ if( ctx.zIn ){
+ if( rc==SQLITE_OK ){
+ rc = fts5CInstIterInit(pApi, pFts, iBestCol, &ctx.iter);
+ }
+
+ if( (iBestStart+nToken-1)>iBestLast ){
+ iBestStart -= (iBestStart+nToken-1-iBestLast) / 2;
+ }
+ if( iBestStart+nToken>nColSize ){
+ iBestStart = nColSize - nToken;
+ }
+ if( iBestStart<0 ) iBestStart = 0;
+
+ ctx.iRangeStart = iBestStart;
+ ctx.iRangeEnd = iBestStart + nToken - 1;
+
+ if( iBestStart>0 ){
+ fts5HighlightAppend(&rc, &ctx, zEllips, -1);
+ }
+ if( rc==SQLITE_OK ){
+ rc = pApi->xTokenize(pFts, ctx.zIn, ctx.nIn, (void*)&ctx,fts5HighlightCb);
+ }
+ if( ctx.iRangeEnd>=(nColSize-1) ){
+ fts5HighlightAppend(&rc, &ctx, &ctx.zIn[ctx.iOff], ctx.nIn - ctx.iOff);
+ }else{
+ fts5HighlightAppend(&rc, &ctx, zEllips, -1);
+ }
+
+ if( rc==SQLITE_OK ){
+ sqlite3_result_text(pCtx, (const char*)ctx.zOut, -1, SQLITE_TRANSIENT);
+ }else{
+ sqlite3_result_error_code(pCtx, rc);
+ }
+ sqlite3_free(ctx.zOut);
+ }
+ sqlite3_free(aSeen);
+}
+
+/************************************************************************/
+
+/*
+** The first time the bm25() function is called for a query, an instance
+** of the following structure is allocated and populated.
+*/
+typedef struct Fts5Bm25Data Fts5Bm25Data;
+struct Fts5Bm25Data {
+ int nPhrase; /* Number of phrases in query */
+ double avgdl; /* Average number of tokens in each row */
+ double *aIDF; /* IDF for each phrase */
+ double *aFreq; /* Array used to calculate phrase freq. */
+};
+
+/*
+** Callback used by fts5Bm25GetData() to count the number of rows in the
+** table matched by each individual phrase within the query.
+*/
+static int fts5CountCb(
+ const Fts5ExtensionApi *pApi,
+ Fts5Context *pFts,
+ void *pUserData /* Pointer to sqlite3_int64 variable */
+){
+ sqlite3_int64 *pn = (sqlite3_int64*)pUserData;
+ (*pn)++;
+ return SQLITE_OK;
+}
+
+/*
+** Set *ppData to point to the Fts5Bm25Data object for the current query.
+** If the object has not already been allocated, allocate and populate it
+** now.
+*/
+static int fts5Bm25GetData(
+ const Fts5ExtensionApi *pApi,
+ Fts5Context *pFts,
+ Fts5Bm25Data **ppData /* OUT: bm25-data object for this query */
+){
+ int rc = SQLITE_OK; /* Return code */
+ Fts5Bm25Data *p; /* Object to return */
+
+ p = pApi->xGetAuxdata(pFts, 0);
+ if( p==0 ){
+ int nPhrase; /* Number of phrases in query */
+ sqlite3_int64 nRow = 0; /* Number of rows in table */
+ sqlite3_int64 nToken = 0; /* Number of tokens in table */
+ int nByte; /* Bytes of space to allocate */
+ int i;
+
+ /* Allocate the Fts5Bm25Data object */
+ nPhrase = pApi->xPhraseCount(pFts);
+ nByte = sizeof(Fts5Bm25Data) + nPhrase*2*sizeof(double);
+ p = (Fts5Bm25Data*)sqlite3_malloc(nByte);
+ if( p==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(p, 0, nByte);
+ p->nPhrase = nPhrase;
+ p->aIDF = (double*)&p[1];
+ p->aFreq = &p->aIDF[nPhrase];
+ }
+
+ /* Calculate the average document length for this FTS5 table */
+ if( rc==SQLITE_OK ) rc = pApi->xRowCount(pFts, &nRow);
+ if( rc==SQLITE_OK ) rc = pApi->xColumnTotalSize(pFts, -1, &nToken);
+ if( rc==SQLITE_OK ) p->avgdl = (double)nToken / (double)nRow;
+
+ /* Calculate an IDF for each phrase in the query */
+ for(i=0; rc==SQLITE_OK && i<nPhrase; i++){
+ sqlite3_int64 nHit = 0;
+ rc = pApi->xQueryPhrase(pFts, i, (void*)&nHit, fts5CountCb);
+ if( rc==SQLITE_OK ){
+ /* Calculate the IDF (Inverse Document Frequency) for phrase i.
+ ** This is done using the standard BM25 formula as found on wikipedia:
+ **
+ ** IDF = log( (N - nHit + 0.5) / (nHit + 0.5) )
+ **
+ ** where "N" is the total number of documents in the set and nHit
+ ** is the number that contain at least one instance of the phrase
+ ** under consideration.
+ **
+ ** The problem with this is that if (N < 2*nHit), the IDF is
+ ** negative. Which is undesirable. So the mimimum allowable IDF is
+ ** (1e-6) - roughly the same as a term that appears in just over
+ ** half of set of 5,000,000 documents. */
+ double idf = log( (nRow - nHit + 0.5) / (nHit + 0.5) );
+ if( idf<=0.0 ) idf = 1e-6;
+ p->aIDF[i] = idf;
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3_free(p);
+ }else{
+ rc = pApi->xSetAuxdata(pFts, p, sqlite3_free);
+ }
+ if( rc!=SQLITE_OK ) p = 0;
+ }
+ *ppData = p;
+ return rc;
+}
+
+/*
+** Implementation of bm25() function.
+*/
+static void fts5Bm25Function(
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
+ sqlite3_context *pCtx, /* Context for returning result/error */
+ int nVal, /* Number of values in apVal[] array */
+ sqlite3_value **apVal /* Array of trailing arguments */
+){
+ const double k1 = 1.2; /* Constant "k1" from BM25 formula */
+ const double b = 0.75; /* Constant "b" from BM25 formula */
+ int rc = SQLITE_OK; /* Error code */
+ double score = 0.0; /* SQL function return value */
+ Fts5Bm25Data *pData; /* Values allocated/calculated once only */
+ int i; /* Iterator variable */
+ int nInst = 0; /* Value returned by xInstCount() */
+ double D = 0.0; /* Total number of tokens in row */
+ double *aFreq = 0; /* Array of phrase freq. for current row */
+
+ /* Calculate the phrase frequency (symbol "f(qi,D)" in the documentation)
+ ** for each phrase in the query for the current row. */
+ rc = fts5Bm25GetData(pApi, pFts, &pData);
+ if( rc==SQLITE_OK ){
+ aFreq = pData->aFreq;
+ memset(aFreq, 0, sizeof(double) * pData->nPhrase);
+ rc = pApi->xInstCount(pFts, &nInst);
+ }
+ for(i=0; rc==SQLITE_OK && i<nInst; i++){
+ int ip; int ic; int io;
+ rc = pApi->xInst(pFts, i, &ip, &ic, &io);
+ if( rc==SQLITE_OK ){
+ double w = (nVal > ic) ? sqlite3_value_double(apVal[ic]) : 1.0;
+ aFreq[ip] += w;
+ }
+ }
+
+ /* Figure out the total size of the current row in tokens. */
+ if( rc==SQLITE_OK ){
+ int nTok;
+ rc = pApi->xColumnSize(pFts, -1, &nTok);
+ D = (double)nTok;
+ }
+
+ /* Determine the BM25 score for the current row. */
+ for(i=0; rc==SQLITE_OK && i<pData->nPhrase; i++){
+ score += pData->aIDF[i] * (
+ ( aFreq[i] * (k1 + 1.0) ) /
+ ( aFreq[i] + k1 * (1 - b + b * D / pData->avgdl) )
+ );
+ }
+
+ /* If no error has occurred, return the calculated score. Otherwise,
+ ** throw an SQL exception. */
+ if( rc==SQLITE_OK ){
+ sqlite3_result_double(pCtx, -1.0 * score);
+ }else{
+ sqlite3_result_error_code(pCtx, rc);
+ }
+}
+
+static int sqlite3Fts5AuxInit(fts5_api *pApi){
+ struct Builtin {
+ const char *zFunc; /* Function name (nul-terminated) */
+ void *pUserData; /* User-data pointer */
+ fts5_extension_function xFunc;/* Callback function */
+ void (*xDestroy)(void*); /* Destructor function */
+ } aBuiltin [] = {
+ { "snippet", 0, fts5SnippetFunction, 0 },
+ { "highlight", 0, fts5HighlightFunction, 0 },
+ { "bm25", 0, fts5Bm25Function, 0 },
+ };
+ int rc = SQLITE_OK; /* Return code */
+ int i; /* To iterate through builtin functions */
+
+ for(i=0; rc==SQLITE_OK && i<sizeof(aBuiltin)/sizeof(aBuiltin[0]); i++){
+ rc = pApi->xCreateFunction(pApi,
+ aBuiltin[i].zFunc,
+ aBuiltin[i].pUserData,
+ aBuiltin[i].xFunc,
+ aBuiltin[i].xDestroy
+ );
+ }
+
+ return rc;
+}
+
+
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+*/
+
+
+
+
+static int sqlite3Fts5BufferGrow(int *pRc, Fts5Buffer *pBuf, int nByte){
+
+ if( (pBuf->n + nByte) > pBuf->nSpace ){
+ u8 *pNew;
+ int nNew = pBuf->nSpace ? pBuf->nSpace*2 : 64;
+
+ /* A no-op if an error has already occurred */
+ if( *pRc ) return 1;
+
+ while( nNew<(pBuf->n + nByte) ){
+ nNew = nNew * 2;
+ }
+ pNew = sqlite3_realloc(pBuf->p, nNew);
+ if( pNew==0 ){
+ *pRc = SQLITE_NOMEM;
+ return 1;
+ }else{
+ pBuf->nSpace = nNew;
+ pBuf->p = pNew;
+ }
+ }
+ return 0;
+}
+
+/*
+** Encode value iVal as an SQLite varint and append it to the buffer object
+** pBuf. If an OOM error occurs, set the error code in p.
+*/
+static void sqlite3Fts5BufferAppendVarint(int *pRc, Fts5Buffer *pBuf, i64 iVal){
+ if( sqlite3Fts5BufferGrow(pRc, pBuf, 9) ) return;
+ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iVal);
+}
+
+static void sqlite3Fts5Put32(u8 *aBuf, int iVal){
+ aBuf[0] = (iVal>>24) & 0x00FF;
+ aBuf[1] = (iVal>>16) & 0x00FF;
+ aBuf[2] = (iVal>> 8) & 0x00FF;
+ aBuf[3] = (iVal>> 0) & 0x00FF;
+}
+
+static int sqlite3Fts5Get32(const u8 *aBuf){
+ return (aBuf[0] << 24) + (aBuf[1] << 16) + (aBuf[2] << 8) + aBuf[3];
+}
+
+static void sqlite3Fts5BufferAppend32(int *pRc, Fts5Buffer *pBuf, int iVal){
+ if( sqlite3Fts5BufferGrow(pRc, pBuf, 4) ) return;
+ sqlite3Fts5Put32(&pBuf->p[pBuf->n], iVal);
+ pBuf->n += 4;
+}
+
+/*
+** Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set
+** the error code in p. If an error has already occurred when this function
+** is called, it is a no-op.
+*/
+static void sqlite3Fts5BufferAppendBlob(
+ int *pRc,
+ Fts5Buffer *pBuf,
+ int nData,
+ const u8 *pData
+){
+ assert( *pRc || nData>=0 );
+ if( sqlite3Fts5BufferGrow(pRc, pBuf, nData) ) return;
+ memcpy(&pBuf->p[pBuf->n], pData, nData);
+ pBuf->n += nData;
+}
+
+/*
+** Append the nul-terminated string zStr to the buffer pBuf. This function
+** ensures that the byte following the buffer data is set to 0x00, even
+** though this byte is not included in the pBuf->n count.
+*/
+static void sqlite3Fts5BufferAppendString(
+ int *pRc,
+ Fts5Buffer *pBuf,
+ const char *zStr
+){
+ int nStr = strlen(zStr);
+ sqlite3Fts5BufferAppendBlob(pRc, pBuf, nStr+1, (const u8*)zStr);
+ pBuf->n--;
+}
+
+/*
+** Argument zFmt is a printf() style format string. This function performs
+** the printf() style processing, then appends the results to buffer pBuf.
+**
+** Like sqlite3Fts5BufferAppendString(), this function ensures that the byte
+** following the buffer data is set to 0x00, even though this byte is not
+** included in the pBuf->n count.
+*/
+static void sqlite3Fts5BufferAppendPrintf(
+ int *pRc,
+ Fts5Buffer *pBuf,
+ char *zFmt, ...
+){
+ if( *pRc==SQLITE_OK ){
+ char *zTmp;
+ va_list ap;
+ va_start(ap, zFmt);
+ zTmp = sqlite3_vmprintf(zFmt, ap);
+ va_end(ap);
+
+ if( zTmp==0 ){
+ *pRc = SQLITE_NOMEM;
+ }else{
+ sqlite3Fts5BufferAppendString(pRc, pBuf, zTmp);
+ sqlite3_free(zTmp);
+ }
+ }
+}
+
+static char *sqlite3Fts5Mprintf(int *pRc, const char *zFmt, ...){
+ char *zRet = 0;
+ if( *pRc==SQLITE_OK ){
+ va_list ap;
+ va_start(ap, zFmt);
+ zRet = sqlite3_vmprintf(zFmt, ap);
+ va_end(ap);
+ if( zRet==0 ){
+ *pRc = SQLITE_NOMEM;
+ }
+ }
+ return zRet;
+}
+
+
+/*
+** Free any buffer allocated by pBuf. Zero the structure before returning.
+*/
+static void sqlite3Fts5BufferFree(Fts5Buffer *pBuf){
+ sqlite3_free(pBuf->p);
+ memset(pBuf, 0, sizeof(Fts5Buffer));
+}
+
+/*
+** Zero the contents of the buffer object. But do not free the associated
+** memory allocation.
+*/
+static void sqlite3Fts5BufferZero(Fts5Buffer *pBuf){
+ pBuf->n = 0;
+}
+
+/*
+** Set the buffer to contain nData/pData. If an OOM error occurs, leave an
+** the error code in p. If an error has already occurred when this function
+** is called, it is a no-op.
+*/
+static void sqlite3Fts5BufferSet(
+ int *pRc,
+ Fts5Buffer *pBuf,
+ int nData,
+ const u8 *pData
+){
+ pBuf->n = 0;
+ sqlite3Fts5BufferAppendBlob(pRc, pBuf, nData, pData);
+}
+
+static int sqlite3Fts5PoslistNext64(
+ const u8 *a, int n, /* Buffer containing poslist */
+ int *pi, /* IN/OUT: Offset within a[] */
+ i64 *piOff /* IN/OUT: Current offset */
+){
+ int i = *pi;
+ if( i>=n ){
+ /* EOF */
+ *piOff = -1;
+ return 1;
+ }else{
+ i64 iOff = *piOff;
+ int iVal;
+ fts5FastGetVarint32(a, i, iVal);
+ if( iVal==1 ){
+ fts5FastGetVarint32(a, i, iVal);
+ iOff = ((i64)iVal) << 32;
+ fts5FastGetVarint32(a, i, iVal);
+ }
+ *piOff = iOff + (iVal-2);
+ *pi = i;
+ return 0;
+ }
+}
+
+
+/*
+** Advance the iterator object passed as the only argument. Return true
+** if the iterator reaches EOF, or false otherwise.
+*/
+static int sqlite3Fts5PoslistReaderNext(Fts5PoslistReader *pIter){
+ if( sqlite3Fts5PoslistNext64(pIter->a, pIter->n, &pIter->i, &pIter->iPos) ){
+ pIter->bEof = 1;
+ }
+ return pIter->bEof;
+}
+
+static int sqlite3Fts5PoslistReaderInit(
+ const u8 *a, int n, /* Poslist buffer to iterate through */
+ Fts5PoslistReader *pIter /* Iterator object to initialize */
+){
+ memset(pIter, 0, sizeof(*pIter));
+ pIter->a = a;
+ pIter->n = n;
+ sqlite3Fts5PoslistReaderNext(pIter);
+ return pIter->bEof;
+}
+
+static int sqlite3Fts5PoslistWriterAppend(
+ Fts5Buffer *pBuf,
+ Fts5PoslistWriter *pWriter,
+ i64 iPos
+){
+ static const i64 colmask = ((i64)(0x7FFFFFFF)) << 32;
+ int rc = SQLITE_OK;
+ if( 0==sqlite3Fts5BufferGrow(&rc, pBuf, 5+5+5) ){
+ if( (iPos & colmask) != (pWriter->iPrev & colmask) ){
+ pBuf->p[pBuf->n++] = 1;
+ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], (iPos>>32));
+ pWriter->iPrev = (iPos & colmask);
+ }
+ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], (iPos-pWriter->iPrev)+2);
+ pWriter->iPrev = iPos;
+ }
+ return rc;
+}
+
+static void *sqlite3Fts5MallocZero(int *pRc, int nByte){
+ void *pRet = 0;
+ if( *pRc==SQLITE_OK ){
+ pRet = sqlite3_malloc(nByte);
+ if( pRet==0 && nByte>0 ){
+ *pRc = SQLITE_NOMEM;
+ }else{
+ memset(pRet, 0, nByte);
+ }
+ }
+ return pRet;
+}
+
+/*
+** Return a nul-terminated copy of the string indicated by pIn. If nIn
+** is non-negative, then it is the length of the string in bytes. Otherwise,
+** the length of the string is determined using strlen().
+**
+** It is the responsibility of the caller to eventually free the returned
+** buffer using sqlite3_free(). If an OOM error occurs, NULL is returned.
+*/
+static char *sqlite3Fts5Strndup(int *pRc, const char *pIn, int nIn){
+ char *zRet = 0;
+ if( *pRc==SQLITE_OK ){
+ if( nIn<0 ){
+ nIn = strlen(pIn);
+ }
+ zRet = (char*)sqlite3_malloc(nIn+1);
+ if( zRet ){
+ memcpy(zRet, pIn, nIn);
+ zRet[nIn] = '\0';
+ }else{
+ *pRc = SQLITE_NOMEM;
+ }
+ }
+ return zRet;
+}
+
+
+/*
+** Return true if character 't' may be part of an FTS5 bareword, or false
+** otherwise. Characters that may be part of barewords:
+**
+** * All non-ASCII characters,
+** * The 52 upper and lower case ASCII characters, and
+** * The 10 integer ASCII characters.
+** * The underscore character "_" (0x5F).
+** * The unicode "subsitute" character (0x1A).
+*/
+static int sqlite3Fts5IsBareword(char t){
+ u8 aBareword[128] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 .. 0x0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* 0x10 .. 0x1F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 .. 0x2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 0x30 .. 0x3F */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40 .. 0x4F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 0x50 .. 0x5F */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60 .. 0x6F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 /* 0x70 .. 0x7F */
+ };
+
+ return (t & 0x80) || aBareword[(int)t];
+}
+
+
+
+/*
+** 2014 Jun 09
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This is an SQLite module implementing full-text search.
+*/
+
+
+
+
+#define FTS5_DEFAULT_PAGE_SIZE 4050
+#define FTS5_DEFAULT_AUTOMERGE 4
+#define FTS5_DEFAULT_CRISISMERGE 16
+
+/* Maximum allowed page size */
+#define FTS5_MAX_PAGE_SIZE (128*1024)
+
+static int fts5_iswhitespace(char x){
+ return (x==' ');
+}
+
+static int fts5_isopenquote(char x){
+ return (x=='"' || x=='\'' || x=='[' || x=='`');
+}
+
+/*
+** Argument pIn points to a character that is part of a nul-terminated
+** string. Return a pointer to the first character following *pIn in
+** the string that is not a white-space character.
+*/
+static const char *fts5ConfigSkipWhitespace(const char *pIn){
+ const char *p = pIn;
+ if( p ){
+ while( fts5_iswhitespace(*p) ){ p++; }
+ }
+ return p;
+}
+
+/*
+** Argument pIn points to a character that is part of a nul-terminated
+** string. Return a pointer to the first character following *pIn in
+** the string that is not a "bareword" character.
+*/
+static const char *fts5ConfigSkipBareword(const char *pIn){
+ const char *p = pIn;
+ while ( sqlite3Fts5IsBareword(*p) ) p++;
+ if( p==pIn ) p = 0;
+ return p;
+}
+
+static int fts5_isdigit(char a){
+ return (a>='0' && a<='9');
+}
+
+
+
+static const char *fts5ConfigSkipLiteral(const char *pIn){
+ const char *p = pIn;
+ switch( *p ){
+ case 'n': case 'N':
+ if( sqlite3_strnicmp("null", p, 4)==0 ){
+ p = &p[4];
+ }else{
+ p = 0;
+ }
+ break;
+
+ case 'x': case 'X':
+ p++;
+ if( *p=='\'' ){
+ p++;
+ while( (*p>='a' && *p<='f')
+ || (*p>='A' && *p<='F')
+ || (*p>='0' && *p<='9')
+ ){
+ p++;
+ }
+ if( *p=='\'' && 0==((p-pIn)%2) ){
+ p++;
+ }else{
+ p = 0;
+ }
+ }else{
+ p = 0;
+ }
+ break;
+
+ case '\'':
+ p++;
+ while( p ){
+ if( *p=='\'' ){
+ p++;
+ if( *p!='\'' ) break;
+ }
+ p++;
+ if( *p==0 ) p = 0;
+ }
+ break;
+
+ default:
+ /* maybe a number */
+ if( *p=='+' || *p=='-' ) p++;
+ while( fts5_isdigit(*p) ) p++;
+
+ /* At this point, if the literal was an integer, the parse is
+ ** finished. Or, if it is a floating point value, it may continue
+ ** with either a decimal point or an 'E' character. */
+ if( *p=='.' && fts5_isdigit(p[1]) ){
+ p += 2;
+ while( fts5_isdigit(*p) ) p++;
+ }
+ if( p==pIn ) p = 0;
+
+ break;
+ }
+
+ return p;
+}
+
+/*
+** The first character of the string pointed to by argument z is guaranteed
+** to be an open-quote character (see function fts5_isopenquote()).
+**
+** This function searches for the corresponding close-quote character within
+** the string and, if found, dequotes the string in place and adds a new
+** nul-terminator byte.
+**
+** If the close-quote is found, the value returned is the byte offset of
+** the character immediately following it. Or, if the close-quote is not
+** found, -1 is returned. If -1 is returned, the buffer is left in an
+** undefined state.
+*/
+static int fts5Dequote(char *z){
+ char q;
+ int iIn = 1;
+ int iOut = 0;
+ q = z[0];
+
+ /* Set stack variable q to the close-quote character */
+ assert( q=='[' || q=='\'' || q=='"' || q=='`' );
+ if( q=='[' ) q = ']';
+
+ while( ALWAYS(z[iIn]) ){
+ if( z[iIn]==q ){
+ if( z[iIn+1]!=q ){
+ /* Character iIn was the close quote. */
+ iIn++;
+ break;
+ }else{
+ /* Character iIn and iIn+1 form an escaped quote character. Skip
+ ** the input cursor past both and copy a single quote character
+ ** to the output buffer. */
+ iIn += 2;
+ z[iOut++] = q;
+ }
+ }else{
+ z[iOut++] = z[iIn++];
+ }
+ }
+
+ z[iOut] = '\0';
+ return iIn;
+}
+
+/*
+** Convert an SQL-style quoted string into a normal string by removing
+** the quote characters. The conversion is done in-place. If the
+** input does not begin with a quote character, then this routine
+** is a no-op.
+**
+** Examples:
+**
+** "abc" becomes abc
+** 'xyz' becomes xyz
+** [pqr] becomes pqr
+** `mno` becomes mno
+*/
+static void sqlite3Fts5Dequote(char *z){
+ char quote; /* Quote character (if any ) */
+
+ assert( 0==fts5_iswhitespace(z[0]) );
+ quote = z[0];
+ if( quote=='[' || quote=='\'' || quote=='"' || quote=='`' ){
+ fts5Dequote(z);
+ }
+}
+
+/*
+** Parse a "special" CREATE VIRTUAL TABLE directive and update
+** configuration object pConfig as appropriate.
+**
+** If successful, object pConfig is updated and SQLITE_OK returned. If
+** an error occurs, an SQLite error code is returned and an error message
+** may be left in *pzErr. It is the responsibility of the caller to
+** eventually free any such error message using sqlite3_free().
+*/
+static int fts5ConfigParseSpecial(
+ Fts5Global *pGlobal,
+ Fts5Config *pConfig, /* Configuration object to update */
+ const char *zCmd, /* Special command to parse */
+ const char *zArg, /* Argument to parse */
+ char **pzErr /* OUT: Error message */
+){
+ int rc = SQLITE_OK;
+ int nCmd = strlen(zCmd);
+ if( sqlite3_strnicmp("prefix", zCmd, nCmd)==0 ){
+ const int nByte = sizeof(int) * FTS5_MAX_PREFIX_INDEXES;
+ const char *p;
+ if( pConfig->aPrefix ){
+ *pzErr = sqlite3_mprintf("multiple prefix=... directives");
+ rc = SQLITE_ERROR;
+ }else{
+ pConfig->aPrefix = sqlite3Fts5MallocZero(&rc, nByte);
+ }
+ p = zArg;
+ while( rc==SQLITE_OK && p[0] ){
+ int nPre = 0;
+ while( p[0]==' ' ) p++;
+ while( p[0]>='0' && p[0]<='9' && nPre<1000 ){
+ nPre = nPre*10 + (p[0] - '0');
+ p++;
+ }
+ while( p[0]==' ' ) p++;
+ if( p[0]==',' ){
+ p++;
+ }else if( p[0] ){
+ *pzErr = sqlite3_mprintf("malformed prefix=... directive");
+ rc = SQLITE_ERROR;
+ }
+ if( rc==SQLITE_OK && (nPre==0 || nPre>=1000) ){
+ *pzErr = sqlite3_mprintf("prefix length out of range: %d", nPre);
+ rc = SQLITE_ERROR;
+ }
+ pConfig->aPrefix[pConfig->nPrefix] = nPre;
+ pConfig->nPrefix++;
+ }
+ return rc;
+ }
+
+ if( sqlite3_strnicmp("tokenize", zCmd, nCmd)==0 ){
+ const char *p = (const char*)zArg;
+ int nArg = strlen(zArg) + 1;
+ char **azArg = sqlite3Fts5MallocZero(&rc, sizeof(char*) * nArg);
+ char *pDel = sqlite3Fts5MallocZero(&rc, nArg * 2);
+ char *pSpace = pDel;
+
+ if( azArg && pSpace ){
+ if( pConfig->pTok ){
+ *pzErr = sqlite3_mprintf("multiple tokenize=... directives");
+ rc = SQLITE_ERROR;
+ }else{
+ for(nArg=0; p && *p; nArg++){
+ const char *p2 = fts5ConfigSkipWhitespace(p);
+ if( *p2=='\'' ){
+ p = fts5ConfigSkipLiteral(p2);
+ }else{
+ p = fts5ConfigSkipBareword(p2);
+ }
+ if( p ){
+ memcpy(pSpace, p2, p-p2);
+ azArg[nArg] = pSpace;
+ sqlite3Fts5Dequote(pSpace);
+ pSpace += (p - p2) + 1;
+ p = fts5ConfigSkipWhitespace(p);
+ }
+ }
+ if( p==0 ){
+ *pzErr = sqlite3_mprintf("parse error in tokenize directive");
+ rc = SQLITE_ERROR;
+ }else{
+ rc = sqlite3Fts5GetTokenizer(pGlobal,
+ (const char**)azArg, nArg, &pConfig->pTok, &pConfig->pTokApi,
+ pzErr
+ );
+ }
+ }
+ }
+
+ sqlite3_free(azArg);
+ sqlite3_free(pDel);
+ return rc;
+ }
+
+ if( sqlite3_strnicmp("content", zCmd, nCmd)==0 ){
+ if( pConfig->eContent!=FTS5_CONTENT_NORMAL ){
+ *pzErr = sqlite3_mprintf("multiple content=... directives");
+ rc = SQLITE_ERROR;
+ }else{
+ if( zArg[0] ){
+ pConfig->eContent = FTS5_CONTENT_EXTERNAL;
+ pConfig->zContent = sqlite3Fts5Mprintf(&rc, "%Q.%Q", pConfig->zDb,zArg);
+ }else{
+ pConfig->eContent = FTS5_CONTENT_NONE;
+ }
+ }
+ return rc;
+ }
+
+ if( sqlite3_strnicmp("content_rowid", zCmd, nCmd)==0 ){
+ if( pConfig->zContentRowid ){
+ *pzErr = sqlite3_mprintf("multiple content_rowid=... directives");
+ rc = SQLITE_ERROR;
+ }else{
+ pConfig->zContentRowid = sqlite3Fts5Strndup(&rc, zArg, -1);
+ }
+ return rc;
+ }
+
+ if( sqlite3_strnicmp("columnsize", zCmd, nCmd)==0 ){
+ if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1]!='\0' ){
+ *pzErr = sqlite3_mprintf("malformed columnsize=... directive");
+ rc = SQLITE_ERROR;
+ }else{
+ pConfig->bColumnsize = (zArg[0]=='1');
+ }
+ return rc;
+ }
+
+ *pzErr = sqlite3_mprintf("unrecognized option: \"%.*s\"", nCmd, zCmd);
+ return SQLITE_ERROR;
+}
+
+/*
+** Allocate an instance of the default tokenizer ("simple") at
+** Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error
+** code if an error occurs.
+*/
+static int fts5ConfigDefaultTokenizer(Fts5Global *pGlobal, Fts5Config *pConfig){
+ assert( pConfig->pTok==0 && pConfig->pTokApi==0 );
+ return sqlite3Fts5GetTokenizer(
+ pGlobal, 0, 0, &pConfig->pTok, &pConfig->pTokApi, 0
+ );
+}
+
+/*
+** Gobble up the first bareword or quoted word from the input buffer zIn.
+** Return a pointer to the character immediately following the last in
+** the gobbled word if successful, or a NULL pointer otherwise (failed
+** to find close-quote character).
+**
+** Before returning, set pzOut to point to a new buffer containing a
+** nul-terminated, dequoted copy of the gobbled word. If the word was
+** quoted, *pbQuoted is also set to 1 before returning.
+**
+** If *pRc is other than SQLITE_OK when this function is called, it is
+** a no-op (NULL is returned). Otherwise, if an OOM occurs within this
+** function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not*
+** set if a parse error (failed to find close quote) occurs.
+*/
+static const char *fts5ConfigGobbleWord(
+ int *pRc, /* IN/OUT: Error code */
+ const char *zIn, /* Buffer to gobble string/bareword from */
+ char **pzOut, /* OUT: malloc'd buffer containing str/bw */
+ int *pbQuoted /* OUT: Set to true if dequoting required */
+){
+ const char *zRet = 0;
+
+ int nIn = strlen(zIn);
+ char *zOut = sqlite3_malloc(nIn+1);
+
+ assert( *pRc==SQLITE_OK );
+ *pbQuoted = 0;
+ *pzOut = 0;
+
+ if( zOut==0 ){
+ *pRc = SQLITE_NOMEM;
+ }else{
+ memcpy(zOut, zIn, nIn+1);
+ if( fts5_isopenquote(zOut[0]) ){
+ int ii = fts5Dequote(zOut);
+ zRet = &zIn[ii];
+ *pbQuoted = 1;
+ }else{
+ zRet = fts5ConfigSkipBareword(zIn);
+ zOut[zRet-zIn] = '\0';
+ }
+ }
+
+ if( zRet==0 ){
+ sqlite3_free(zOut);
+ }else{
+ *pzOut = zOut;
+ }
+
+ return zRet;
+}
+
+static int fts5ConfigParseColumn(
+ Fts5Config *p,
+ char *zCol,
+ char *zArg,
+ char **pzErr
+){
+ int rc = SQLITE_OK;
+ if( 0==sqlite3_stricmp(zCol, FTS5_RANK_NAME)
+ || 0==sqlite3_stricmp(zCol, FTS5_ROWID_NAME)
+ ){
+ *pzErr = sqlite3_mprintf("reserved fts5 column name: %s", zCol);
+ rc = SQLITE_ERROR;
+ }else if( zArg ){
+ if( 0==sqlite3_stricmp(zArg, "unindexed") ){
+ p->abUnindexed[p->nCol] = 1;
+ }else{
+ *pzErr = sqlite3_mprintf("unrecognized column option: %s", zArg);
+ rc = SQLITE_ERROR;
+ }
+ }
+
+ p->azCol[p->nCol++] = zCol;
+ return rc;
+}
+
+/*
+** Populate the Fts5Config.zContentExprlist string.
+*/
+static int fts5ConfigMakeExprlist(Fts5Config *p){
+ int i;
+ int rc = SQLITE_OK;
+ Fts5Buffer buf = {0, 0, 0};
+
+ sqlite3Fts5BufferAppendPrintf(&rc, &buf, "T.%Q", p->zContentRowid);
+ if( p->eContent!=FTS5_CONTENT_NONE ){
+ for(i=0; i<p->nCol; i++){
+ if( p->eContent==FTS5_CONTENT_EXTERNAL ){
+ sqlite3Fts5BufferAppendPrintf(&rc, &buf, ", T.%Q", p->azCol[i]);
+ }else{
+ sqlite3Fts5BufferAppendPrintf(&rc, &buf, ", T.c%d", i);
+ }
+ }
+ }
+
+ assert( p->zContentExprlist==0 );
+ p->zContentExprlist = (char*)buf.p;
+ return rc;
+}
+
+/*
+** Arguments nArg/azArg contain the string arguments passed to the xCreate
+** or xConnect method of the virtual table. This function attempts to
+** allocate an instance of Fts5Config containing the results of parsing
+** those arguments.
+**
+** If successful, SQLITE_OK is returned and *ppOut is set to point to the
+** new Fts5Config object. If an error occurs, an SQLite error code is
+** returned, *ppOut is set to NULL and an error message may be left in
+** *pzErr. It is the responsibility of the caller to eventually free any
+** such error message using sqlite3_free().
+*/
+static int sqlite3Fts5ConfigParse(
+ Fts5Global *pGlobal,
+ sqlite3 *db,
+ int nArg, /* Number of arguments */
+ const char **azArg, /* Array of nArg CREATE VIRTUAL TABLE args */
+ Fts5Config **ppOut, /* OUT: Results of parse */
+ char **pzErr /* OUT: Error message */
+){
+ int rc = SQLITE_OK; /* Return code */
+ Fts5Config *pRet; /* New object to return */
+ int i;
+ int nByte;
+
+ *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config));
+ if( pRet==0 ) return SQLITE_NOMEM;
+ memset(pRet, 0, sizeof(Fts5Config));
+ pRet->db = db;
+ pRet->iCookie = -1;
+
+ nByte = nArg * (sizeof(char*) + sizeof(u8));
+ pRet->azCol = (char**)sqlite3Fts5MallocZero(&rc, nByte);
+ pRet->abUnindexed = (u8*)&pRet->azCol[nArg];
+ pRet->zDb = sqlite3Fts5Strndup(&rc, azArg[1], -1);
+ pRet->zName = sqlite3Fts5Strndup(&rc, azArg[2], -1);
+ pRet->bColumnsize = 1;
+#ifdef SQLITE_DEBUG
+ pRet->bPrefixIndex = 1;
+#endif
+ if( rc==SQLITE_OK && sqlite3_stricmp(pRet->zName, FTS5_RANK_NAME)==0 ){
+ *pzErr = sqlite3_mprintf("reserved fts5 table name: %s", pRet->zName);
+ rc = SQLITE_ERROR;
+ }
+
+ for(i=3; rc==SQLITE_OK && i<nArg; i++){
+ const char *zOrig = azArg[i];
+ const char *z;
+ char *zOne = 0;
+ char *zTwo = 0;
+ int bOption = 0;
+ int bMustBeCol = 0;
+
+ z = fts5ConfigGobbleWord(&rc, zOrig, &zOne, &bMustBeCol);
+ z = fts5ConfigSkipWhitespace(z);
+ if( z && *z=='=' ){
+ bOption = 1;
+ z++;
+ if( bMustBeCol ) z = 0;
+ }
+ z = fts5ConfigSkipWhitespace(z);
+ if( z && z[0] ){
+ int bDummy;
+ z = fts5ConfigGobbleWord(&rc, z, &zTwo, &bDummy);
+ if( z && z[0] ) z = 0;
+ }
+
+ if( rc==SQLITE_OK ){
+ if( z==0 ){
+ *pzErr = sqlite3_mprintf("parse error in \"%s\"", zOrig);
+ rc = SQLITE_ERROR;
+ }else{
+ if( bOption ){
+ rc = fts5ConfigParseSpecial(pGlobal, pRet, zOne, zTwo?zTwo:"", pzErr);
+ }else{
+ rc = fts5ConfigParseColumn(pRet, zOne, zTwo, pzErr);
+ zOne = 0;
+ }
+ }
+ }
+
+ sqlite3_free(zOne);
+ sqlite3_free(zTwo);
+ }
+
+ /* If a tokenizer= option was successfully parsed, the tokenizer has
+ ** already been allocated. Otherwise, allocate an instance of the default
+ ** tokenizer (unicode61) now. */
+ if( rc==SQLITE_OK && pRet->pTok==0 ){
+ rc = fts5ConfigDefaultTokenizer(pGlobal, pRet);
+ }
+
+ /* If no zContent option was specified, fill in the default values. */
+ if( rc==SQLITE_OK && pRet->zContent==0 ){
+ const char *zTail = 0;
+ assert( pRet->eContent==FTS5_CONTENT_NORMAL
+ || pRet->eContent==FTS5_CONTENT_NONE
+ );
+ if( pRet->eContent==FTS5_CONTENT_NORMAL ){
+ zTail = "content";
+ }else if( pRet->bColumnsize ){
+ zTail = "docsize";
+ }
+
+ if( zTail ){
+ pRet->zContent = sqlite3Fts5Mprintf(
+ &rc, "%Q.'%q_%s'", pRet->zDb, pRet->zName, zTail
+ );
+ }
+ }
+
+ if( rc==SQLITE_OK && pRet->zContentRowid==0 ){
+ pRet->zContentRowid = sqlite3Fts5Strndup(&rc, "rowid", -1);
+ }
+
+ /* Formulate the zContentExprlist text */
+ if( rc==SQLITE_OK ){
+ rc = fts5ConfigMakeExprlist(pRet);
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3Fts5ConfigFree(pRet);
+ *ppOut = 0;
+ }
+ return rc;
+}
+
+/*
+** Free the configuration object passed as the only argument.
+*/
+static void sqlite3Fts5ConfigFree(Fts5Config *pConfig){
+ if( pConfig ){
+ int i;
+ if( pConfig->pTok ){
+ pConfig->pTokApi->xDelete(pConfig->pTok);
+ }
+ sqlite3_free(pConfig->zDb);
+ sqlite3_free(pConfig->zName);
+ for(i=0; i<pConfig->nCol; i++){
+ sqlite3_free(pConfig->azCol[i]);
+ }
+ sqlite3_free(pConfig->azCol);
+ sqlite3_free(pConfig->aPrefix);
+ sqlite3_free(pConfig->zRank);
+ sqlite3_free(pConfig->zRankArgs);
+ sqlite3_free(pConfig->zContent);
+ sqlite3_free(pConfig->zContentRowid);
+ sqlite3_free(pConfig->zContentExprlist);
+ sqlite3_free(pConfig);
+ }
+}
+
+/*
+** Call sqlite3_declare_vtab() based on the contents of the configuration
+** object passed as the only argument. Return SQLITE_OK if successful, or
+** an SQLite error code if an error occurs.
+*/
+static int sqlite3Fts5ConfigDeclareVtab(Fts5Config *pConfig){
+ int i;
+ int rc = SQLITE_OK;
+ char *zSql;
+
+ zSql = sqlite3Fts5Mprintf(&rc, "CREATE TABLE x(");
+ for(i=0; zSql && i<pConfig->nCol; i++){
+ const char *zSep = (i==0?"":", ");
+ zSql = sqlite3Fts5Mprintf(&rc, "%z%s%Q", zSql, zSep, pConfig->azCol[i]);
+ }
+ zSql = sqlite3Fts5Mprintf(&rc, "%z, %Q HIDDEN, %s HIDDEN)",
+ zSql, pConfig->zName, FTS5_RANK_NAME
+ );
+
+ assert( zSql || rc==SQLITE_NOMEM );
+ if( zSql ){
+ rc = sqlite3_declare_vtab(pConfig->db, zSql);
+ sqlite3_free(zSql);
+ }
+
+ return rc;
+}
+
+/*
+** Tokenize the text passed via the second and third arguments.
+**
+** The callback is invoked once for each token in the input text. The
+** arguments passed to it are, in order:
+**
+** void *pCtx // Copy of 4th argument to sqlite3Fts5Tokenize()
+** const char *pToken // Pointer to buffer containing token
+** int nToken // Size of token in bytes
+** int iStart // Byte offset of start of token within input text
+** int iEnd // Byte offset of end of token within input text
+** int iPos // Position of token in input (first token is 0)
+**
+** If the callback returns a non-zero value the tokenization is abandoned
+** and no further callbacks are issued.
+**
+** This function returns SQLITE_OK if successful or an SQLite error code
+** if an error occurs. If the tokenization was abandoned early because
+** the callback returned SQLITE_DONE, this is not an error and this function
+** still returns SQLITE_OK. Or, if the tokenization was abandoned early
+** because the callback returned another non-zero value, it is assumed
+** to be an SQLite error code and returned to the caller.
+*/
+static int sqlite3Fts5Tokenize(
+ Fts5Config *pConfig, /* FTS5 Configuration object */
+ int flags, /* FTS5_TOKENIZE_* flags */
+ const char *pText, int nText, /* Text to tokenize */
+ void *pCtx, /* Context passed to xToken() */
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
+){
+ if( pText==0 ) return SQLITE_OK;
+ return pConfig->pTokApi->xTokenize(
+ pConfig->pTok, pCtx, flags, pText, nText, xToken
+ );
+}
+
+/*
+** Argument pIn points to the first character in what is expected to be
+** a comma-separated list of SQL literals followed by a ')' character.
+** If it actually is this, return a pointer to the ')'. Otherwise, return
+** NULL to indicate a parse error.
+*/
+static const char *fts5ConfigSkipArgs(const char *pIn){
+ const char *p = pIn;
+
+ while( 1 ){
+ p = fts5ConfigSkipWhitespace(p);
+ p = fts5ConfigSkipLiteral(p);
+ p = fts5ConfigSkipWhitespace(p);
+ if( p==0 || *p==')' ) break;
+ if( *p!=',' ){
+ p = 0;
+ break;
+ }
+ p++;
+ }
+
+ return p;
+}
+
+/*
+** Parameter zIn contains a rank() function specification. The format of
+** this is:
+**
+** + Bareword (function name)
+** + Open parenthesis - "("
+** + Zero or more SQL literals in a comma separated list
+** + Close parenthesis - ")"
+*/
+static int sqlite3Fts5ConfigParseRank(
+ const char *zIn, /* Input string */
+ char **pzRank, /* OUT: Rank function name */
+ char **pzRankArgs /* OUT: Rank function arguments */
+){
+ const char *p = zIn;
+ const char *pRank;
+ char *zRank = 0;
+ char *zRankArgs = 0;
+ int rc = SQLITE_OK;
+
+ *pzRank = 0;
+ *pzRankArgs = 0;
+
+ p = fts5ConfigSkipWhitespace(p);
+ pRank = p;
+ p = fts5ConfigSkipBareword(p);
+
+ if( p ){
+ zRank = sqlite3Fts5MallocZero(&rc, 1 + p - pRank);
+ if( zRank ) memcpy(zRank, pRank, p-pRank);
+ }else{
+ rc = SQLITE_ERROR;
+ }
+
+ if( rc==SQLITE_OK ){
+ p = fts5ConfigSkipWhitespace(p);
+ if( *p!='(' ) rc = SQLITE_ERROR;
+ p++;
+ }
+ if( rc==SQLITE_OK ){
+ const char *pArgs;
+ p = fts5ConfigSkipWhitespace(p);
+ pArgs = p;
+ if( *p!=')' ){
+ p = fts5ConfigSkipArgs(p);
+ if( p==0 ){
+ rc = SQLITE_ERROR;
+ }else{
+ zRankArgs = sqlite3Fts5MallocZero(&rc, 1 + p - pArgs);
+ if( zRankArgs ) memcpy(zRankArgs, pArgs, p-pArgs);
+ }
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3_free(zRank);
+ assert( zRankArgs==0 );
+ }else{
+ *pzRank = zRank;
+ *pzRankArgs = zRankArgs;
+ }
+ return rc;
+}
+
+static int sqlite3Fts5ConfigSetValue(
+ Fts5Config *pConfig,
+ const char *zKey,
+ sqlite3_value *pVal,
+ int *pbBadkey
+){
+ int rc = SQLITE_OK;
+
+ if( 0==sqlite3_stricmp(zKey, "pgsz") ){
+ int pgsz = 0;
+ if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){
+ pgsz = sqlite3_value_int(pVal);
+ }
+ if( pgsz<=0 || pgsz>FTS5_MAX_PAGE_SIZE ){
+ *pbBadkey = 1;
+ }else{
+ pConfig->pgsz = pgsz;
+ }
+ }
+
+ else if( 0==sqlite3_stricmp(zKey, "automerge") ){
+ int nAutomerge = -1;
+ if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){
+ nAutomerge = sqlite3_value_int(pVal);
+ }
+ if( nAutomerge<0 || nAutomerge>64 ){
+ *pbBadkey = 1;
+ }else{
+ if( nAutomerge==1 ) nAutomerge = FTS5_DEFAULT_AUTOMERGE;
+ pConfig->nAutomerge = nAutomerge;
+ }
+ }
+
+ else if( 0==sqlite3_stricmp(zKey, "crisismerge") ){
+ int nCrisisMerge = -1;
+ if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){
+ nCrisisMerge = sqlite3_value_int(pVal);
+ }
+ if( nCrisisMerge<0 ){
+ *pbBadkey = 1;
+ }else{
+ if( nCrisisMerge<=1 ) nCrisisMerge = FTS5_DEFAULT_CRISISMERGE;
+ pConfig->nCrisisMerge = nCrisisMerge;
+ }
+ }
+
+ else if( 0==sqlite3_stricmp(zKey, "rank") ){
+ const char *zIn = (const char*)sqlite3_value_text(pVal);
+ char *zRank;
+ char *zRankArgs;
+ rc = sqlite3Fts5ConfigParseRank(zIn, &zRank, &zRankArgs);
+ if( rc==SQLITE_OK ){
+ sqlite3_free(pConfig->zRank);
+ sqlite3_free(pConfig->zRankArgs);
+ pConfig->zRank = zRank;
+ pConfig->zRankArgs = zRankArgs;
+ }else if( rc==SQLITE_ERROR ){
+ rc = SQLITE_OK;
+ *pbBadkey = 1;
+ }
+ }else{
+ *pbBadkey = 1;
+ }
+ return rc;
+}
+
+/*
+** Load the contents of the %_config table into memory.
+*/
+static int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){
+ const char *zSelect = "SELECT k, v FROM %Q.'%q_config'";
+ char *zSql;
+ sqlite3_stmt *p = 0;
+ int rc = SQLITE_OK;
+ int iVersion = 0;
+
+ /* Set default values */
+ pConfig->pgsz = FTS5_DEFAULT_PAGE_SIZE;
+ pConfig->nAutomerge = FTS5_DEFAULT_AUTOMERGE;
+ pConfig->nCrisisMerge = FTS5_DEFAULT_CRISISMERGE;
+
+ zSql = sqlite3Fts5Mprintf(&rc, zSelect, pConfig->zDb, pConfig->zName);
+ if( zSql ){
+ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &p, 0);
+ sqlite3_free(zSql);
+ }
+
+ assert( rc==SQLITE_OK || p==0 );
+ if( rc==SQLITE_OK ){
+ while( SQLITE_ROW==sqlite3_step(p) ){
+ const char *zK = (const char*)sqlite3_column_text(p, 0);
+ sqlite3_value *pVal = sqlite3_column_value(p, 1);
+ if( 0==sqlite3_stricmp(zK, "version") ){
+ iVersion = sqlite3_value_int(pVal);
+ }else{
+ int bDummy = 0;
+ sqlite3Fts5ConfigSetValue(pConfig, zK, pVal, &bDummy);
+ }
+ }
+ rc = sqlite3_finalize(p);
+ }
+
+ if( rc==SQLITE_OK && iVersion!=FTS5_CURRENT_VERSION ){
+ rc = SQLITE_ERROR;
+ if( pConfig->pzErrmsg ){
+ assert( 0==*pConfig->pzErrmsg );
+ *pConfig->pzErrmsg = sqlite3_mprintf(
+ "invalid fts5 file format (found %d, expected %d) - run 'rebuild'",
+ iVersion, FTS5_CURRENT_VERSION
+ );
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ pConfig->iCookie = iCookie;
+ }
+ return rc;
+}
+
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+*/
+
+
+
+
+/*
+** All token types in the generated fts5parse.h file are greater than 0.
+*/
+#define FTS5_EOF 0
+
+#define FTS5_LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32))
+
+typedef struct Fts5ExprTerm Fts5ExprTerm;
+
+/*
+** Functions generated by lemon from fts5parse.y.
+*/
+static void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64));
+static void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*));
+static void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*);
+#ifndef NDEBUG
+/* #include <stdio.h> */
+static void sqlite3Fts5ParserTrace(FILE*, char*);
+#endif
+
+
+struct Fts5Expr {
+ Fts5Index *pIndex;
+ Fts5ExprNode *pRoot;
+ int bDesc; /* Iterate in descending rowid order */
+ int nPhrase; /* Number of phrases in expression */
+ Fts5ExprPhrase **apExprPhrase; /* Pointers to phrase objects */
+};
+
+/*
+** eType:
+** Expression node type. Always one of:
+**
+** FTS5_AND (nChild, apChild valid)
+** FTS5_OR (nChild, apChild valid)
+** FTS5_NOT (nChild, apChild valid)
+** FTS5_STRING (pNear valid)
+** FTS5_TERM (pNear valid)
+*/
+struct Fts5ExprNode {
+ int eType; /* Node type */
+ int bEof; /* True at EOF */
+ int bNomatch; /* True if entry is not a match */
+
+ i64 iRowid; /* Current rowid */
+ Fts5ExprNearset *pNear; /* For FTS5_STRING - cluster of phrases */
+
+ /* Child nodes. For a NOT node, this array always contains 2 entries. For
+ ** AND or OR nodes, it contains 2 or more entries. */
+ int nChild; /* Number of child nodes */
+ Fts5ExprNode *apChild[1]; /* Array of child nodes */
+};
+
+#define Fts5NodeIsString(p) ((p)->eType==FTS5_TERM || (p)->eType==FTS5_STRING)
+
+/*
+** An instance of the following structure represents a single search term
+** or term prefix.
+*/
+struct Fts5ExprTerm {
+ int bPrefix; /* True for a prefix term */
+ char *zTerm; /* nul-terminated term */
+ Fts5IndexIter *pIter; /* Iterator for this term */
+ Fts5ExprTerm *pSynonym; /* Pointer to first in list of synonyms */
+};
+
+/*
+** A phrase. One or more terms that must appear in a contiguous sequence
+** within a document for it to match.
+*/
+struct Fts5ExprPhrase {
+ Fts5ExprNode *pNode; /* FTS5_STRING node this phrase is part of */
+ Fts5Buffer poslist; /* Current position list */
+ int nTerm; /* Number of entries in aTerm[] */
+ Fts5ExprTerm aTerm[1]; /* Terms that make up this phrase */
+};
+
+/*
+** One or more phrases that must appear within a certain token distance of
+** each other within each matching document.
+*/
+struct Fts5ExprNearset {
+ int nNear; /* NEAR parameter */
+ Fts5Colset *pColset; /* Columns to search (NULL -> all columns) */
+ int nPhrase; /* Number of entries in aPhrase[] array */
+ Fts5ExprPhrase *apPhrase[1]; /* Array of phrase pointers */
+};
+
+
+/*
+** Parse context.
+*/
+struct Fts5Parse {
+ Fts5Config *pConfig;
+ char *zErr;
+ int rc;
+ int nPhrase; /* Size of apPhrase array */
+ Fts5ExprPhrase **apPhrase; /* Array of all phrases */
+ Fts5ExprNode *pExpr; /* Result of a successful parse */
+};
+
+static void sqlite3Fts5ParseError(Fts5Parse *pParse, const char *zFmt, ...){
+ va_list ap;
+ va_start(ap, zFmt);
+ if( pParse->rc==SQLITE_OK ){
+ pParse->zErr = sqlite3_vmprintf(zFmt, ap);
+ pParse->rc = SQLITE_ERROR;
+ }
+ va_end(ap);
+}
+
+static int fts5ExprIsspace(char t){
+ return t==' ' || t=='\t' || t=='\n' || t=='\r';
+}
+
+/*
+** Read the first token from the nul-terminated string at *pz.
+*/
+static int fts5ExprGetToken(
+ Fts5Parse *pParse,
+ const char **pz, /* IN/OUT: Pointer into buffer */
+ Fts5Token *pToken
+){
+ const char *z = *pz;
+ int tok;
+
+ /* Skip past any whitespace */
+ while( fts5ExprIsspace(*z) ) z++;
+
+ pToken->p = z;
+ pToken->n = 1;
+ switch( *z ){
+ case '(': tok = FTS5_LP; break;
+ case ')': tok = FTS5_RP; break;
+ case '{': tok = FTS5_LCP; break;
+ case '}': tok = FTS5_RCP; break;
+ case ':': tok = FTS5_COLON; break;
+ case ',': tok = FTS5_COMMA; break;
+ case '+': tok = FTS5_PLUS; break;
+ case '*': tok = FTS5_STAR; break;
+ case '\0': tok = FTS5_EOF; break;
+
+ case '"': {
+ const char *z2;
+ tok = FTS5_STRING;
+
+ for(z2=&z[1]; 1; z2++){
+ if( z2[0]=='"' ){
+ z2++;
+ if( z2[0]!='"' ) break;
+ }
+ if( z2[0]=='\0' ){
+ sqlite3Fts5ParseError(pParse, "unterminated string");
+ return FTS5_EOF;
+ }
+ }
+ pToken->n = (z2 - z);
+ break;
+ }
+
+ default: {
+ const char *z2;
+ if( sqlite3Fts5IsBareword(z[0])==0 ){
+ sqlite3Fts5ParseError(pParse, "fts5: syntax error near \"%.1s\"", z);
+ return FTS5_EOF;
+ }
+ tok = FTS5_STRING;
+ for(z2=&z[1]; sqlite3Fts5IsBareword(*z2); z2++);
+ pToken->n = (z2 - z);
+ if( pToken->n==2 && memcmp(pToken->p, "OR", 2)==0 ) tok = FTS5_OR;
+ if( pToken->n==3 && memcmp(pToken->p, "NOT", 3)==0 ) tok = FTS5_NOT;
+ if( pToken->n==3 && memcmp(pToken->p, "AND", 3)==0 ) tok = FTS5_AND;
+ break;
+ }
+ }
+
+ *pz = &pToken->p[pToken->n];
+ return tok;
+}
+
+static void *fts5ParseAlloc(u64 t){ return sqlite3_malloc((int)t); }
+static void fts5ParseFree(void *p){ sqlite3_free(p); }
+
+static int sqlite3Fts5ExprNew(
+ Fts5Config *pConfig, /* FTS5 Configuration */
+ const char *zExpr, /* Expression text */
+ Fts5Expr **ppNew,
+ char **pzErr
+){
+ Fts5Parse sParse;
+ Fts5Token token;
+ const char *z = zExpr;
+ int t; /* Next token type */
+ void *pEngine;
+ Fts5Expr *pNew;
+
+ *ppNew = 0;
+ *pzErr = 0;
+ memset(&sParse, 0, sizeof(sParse));
+ pEngine = sqlite3Fts5ParserAlloc(fts5ParseAlloc);
+ if( pEngine==0 ){ return SQLITE_NOMEM; }
+ sParse.pConfig = pConfig;
+
+ do {
+ t = fts5ExprGetToken(&sParse, &z, &token);
+ sqlite3Fts5Parser(pEngine, t, token, &sParse);
+ }while( sParse.rc==SQLITE_OK && t!=FTS5_EOF );
+ sqlite3Fts5ParserFree(pEngine, fts5ParseFree);
+
+ assert( sParse.rc!=SQLITE_OK || sParse.zErr==0 );
+ if( sParse.rc==SQLITE_OK ){
+ *ppNew = pNew = sqlite3_malloc(sizeof(Fts5Expr));
+ if( pNew==0 ){
+ sParse.rc = SQLITE_NOMEM;
+ sqlite3Fts5ParseNodeFree(sParse.pExpr);
+ }else{
+ pNew->pRoot = sParse.pExpr;
+ pNew->pIndex = 0;
+ pNew->apExprPhrase = sParse.apPhrase;
+ pNew->nPhrase = sParse.nPhrase;
+ sParse.apPhrase = 0;
+ }
+ }
+
+ sqlite3_free(sParse.apPhrase);
+ *pzErr = sParse.zErr;
+ return sParse.rc;
+}
+
+/*
+** Free the expression node object passed as the only argument.
+*/
+static void sqlite3Fts5ParseNodeFree(Fts5ExprNode *p){
+ if( p ){
+ int i;
+ for(i=0; i<p->nChild; i++){
+ sqlite3Fts5ParseNodeFree(p->apChild[i]);
+ }
+ sqlite3Fts5ParseNearsetFree(p->pNear);
+ sqlite3_free(p);
+ }
+}
+
+/*
+** Free the expression object passed as the only argument.
+*/
+static void sqlite3Fts5ExprFree(Fts5Expr *p){
+ if( p ){
+ sqlite3Fts5ParseNodeFree(p->pRoot);
+ sqlite3_free(p->apExprPhrase);
+ sqlite3_free(p);
+ }
+}
+
+/*
+** Argument pTerm must be a synonym iterator. Return the current rowid
+** that it points to.
+*/
+static i64 fts5ExprSynonymRowid(Fts5ExprTerm *pTerm, int bDesc, int *pbEof){
+ i64 iRet = 0;
+ int bRetValid = 0;
+ Fts5ExprTerm *p;
+
+ assert( pTerm->pSynonym );
+ assert( bDesc==0 || bDesc==1 );
+ for(p=pTerm; p; p=p->pSynonym){
+ if( 0==sqlite3Fts5IterEof(p->pIter) ){
+ i64 iRowid = sqlite3Fts5IterRowid(p->pIter);
+ if( bRetValid==0 || (bDesc!=(iRowid<iRet)) ){
+ iRet = iRowid;
+ bRetValid = 1;
+ }
+ }
+ }
+
+ if( pbEof && bRetValid==0 ) *pbEof = 1;
+ return iRet;
+}
+
+/*
+** Argument pTerm must be a synonym iterator.
+*/
+static int fts5ExprSynonymPoslist(
+ Fts5ExprTerm *pTerm,
+ Fts5Colset *pColset,
+ i64 iRowid,
+ int *pbDel, /* OUT: Caller should sqlite3_free(*pa) */
+ u8 **pa, int *pn
+){
+ Fts5PoslistReader aStatic[4];
+ Fts5PoslistReader *aIter = aStatic;
+ int nIter = 0;
+ int nAlloc = 4;
+ int rc = SQLITE_OK;
+ Fts5ExprTerm *p;
+
+ assert( pTerm->pSynonym );
+ for(p=pTerm; p; p=p->pSynonym){
+ Fts5IndexIter *pIter = p->pIter;
+ if( sqlite3Fts5IterEof(pIter)==0 && sqlite3Fts5IterRowid(pIter)==iRowid ){
+ const u8 *a;
+ int n;
+ i64 dummy;
+ rc = sqlite3Fts5IterPoslist(pIter, pColset, &a, &n, &dummy);
+ if( rc!=SQLITE_OK ) goto synonym_poslist_out;
+ if( nIter==nAlloc ){
+ int nByte = sizeof(Fts5PoslistReader) * nAlloc * 2;
+ Fts5PoslistReader *aNew = (Fts5PoslistReader*)sqlite3_malloc(nByte);
+ if( aNew==0 ){
+ rc = SQLITE_NOMEM;
+ goto synonym_poslist_out;
+ }
+ memcpy(aNew, aIter, sizeof(Fts5PoslistReader) * nIter);
+ nAlloc = nAlloc*2;
+ if( aIter!=aStatic ) sqlite3_free(aIter);
+ aIter = aNew;
+ }
+ sqlite3Fts5PoslistReaderInit(a, n, &aIter[nIter]);
+ assert( aIter[nIter].bEof==0 );
+ nIter++;
+ }
+ }
+
+ assert( *pbDel==0 );
+ if( nIter==1 ){
+ *pa = (u8*)aIter[0].a;
+ *pn = aIter[0].n;
+ }else{
+ Fts5PoslistWriter writer = {0};
+ Fts5Buffer buf = {0,0,0};
+ i64 iPrev = -1;
+ while( 1 ){
+ int i;
+ i64 iMin = FTS5_LARGEST_INT64;
+ for(i=0; i<nIter; i++){
+ if( aIter[i].bEof==0 ){
+ if( aIter[i].iPos==iPrev ){
+ if( sqlite3Fts5PoslistReaderNext(&aIter[i]) ) continue;
+ }
+ if( aIter[i].iPos<iMin ){
+ iMin = aIter[i].iPos;
+ }
+ }
+ }
+ if( iMin==FTS5_LARGEST_INT64 || rc!=SQLITE_OK ) break;
+ rc = sqlite3Fts5PoslistWriterAppend(&buf, &writer, iMin);
+ iPrev = iMin;
+ }
+ if( rc ){
+ sqlite3_free(buf.p);
+ }else{
+ *pa = buf.p;
+ *pn = buf.n;
+ *pbDel = 1;
+ }
+ }
+
+ synonym_poslist_out:
+ if( aIter!=aStatic ) sqlite3_free(aIter);
+ return rc;
+}
+
+
+/*
+** All individual term iterators in pPhrase are guaranteed to be valid and
+** pointing to the same rowid when this function is called. This function
+** checks if the current rowid really is a match, and if so populates
+** the pPhrase->poslist buffer accordingly. Output parameter *pbMatch
+** is set to true if this is really a match, or false otherwise.
+**
+** SQLITE_OK is returned if an error occurs, or an SQLite error code
+** otherwise. It is not considered an error code if the current rowid is
+** not a match.
+*/
+static int fts5ExprPhraseIsMatch(
+ Fts5ExprNode *pNode, /* Node pPhrase belongs to */
+ Fts5Colset *pColset, /* Restrict matches to these columns */
+ Fts5ExprPhrase *pPhrase, /* Phrase object to initialize */
+ int *pbMatch /* OUT: Set to true if really a match */
+){
+ Fts5PoslistWriter writer = {0};
+ Fts5PoslistReader aStatic[4];
+ Fts5PoslistReader *aIter = aStatic;
+ int i;
+ int rc = SQLITE_OK;
+
+ fts5BufferZero(&pPhrase->poslist);
+
+ /* If the aStatic[] array is not large enough, allocate a large array
+ ** using sqlite3_malloc(). This approach could be improved upon. */
+ if( pPhrase->nTerm>(sizeof(aStatic) / sizeof(aStatic[0])) ){
+ int nByte = sizeof(Fts5PoslistReader) * pPhrase->nTerm;
+ aIter = (Fts5PoslistReader*)sqlite3_malloc(nByte);
+ if( !aIter ) return SQLITE_NOMEM;
+ }
+ memset(aIter, 0, sizeof(Fts5PoslistReader) * pPhrase->nTerm);
+
+ /* Initialize a term iterator for each term in the phrase */
+ for(i=0; i<pPhrase->nTerm; i++){
+ Fts5ExprTerm *pTerm = &pPhrase->aTerm[i];
+ i64 dummy;
+ int n = 0;
+ int bFlag = 0;
+ const u8 *a = 0;
+ if( pTerm->pSynonym ){
+ rc = fts5ExprSynonymPoslist(
+ pTerm, pColset, pNode->iRowid, &bFlag, (u8**)&a, &n
+ );
+ }else{
+ rc = sqlite3Fts5IterPoslist(pTerm->pIter, pColset, &a, &n, &dummy);
+ }
+ if( rc!=SQLITE_OK ) goto ismatch_out;
+ sqlite3Fts5PoslistReaderInit(a, n, &aIter[i]);
+ aIter[i].bFlag = bFlag;
+ if( aIter[i].bEof ) goto ismatch_out;
+ }
+
+ while( 1 ){
+ int bMatch;
+ i64 iPos = aIter[0].iPos;
+ do {
+ bMatch = 1;
+ for(i=0; i<pPhrase->nTerm; i++){
+ Fts5PoslistReader *pPos = &aIter[i];
+ i64 iAdj = iPos + i;
+ if( pPos->iPos!=iAdj ){
+ bMatch = 0;
+ while( pPos->iPos<iAdj ){
+ if( sqlite3Fts5PoslistReaderNext(pPos) ) goto ismatch_out;
+ }
+ if( pPos->iPos>iAdj ) iPos = pPos->iPos-i;
+ }
+ }
+ }while( bMatch==0 );
+
+ /* Append position iPos to the output */
+ rc = sqlite3Fts5PoslistWriterAppend(&pPhrase->poslist, &writer, iPos);
+ if( rc!=SQLITE_OK ) goto ismatch_out;
+
+ for(i=0; i<pPhrase->nTerm; i++){
+ if( sqlite3Fts5PoslistReaderNext(&aIter[i]) ) goto ismatch_out;
+ }
+ }
+
+ ismatch_out:
+ *pbMatch = (pPhrase->poslist.n>0);
+ for(i=0; i<pPhrase->nTerm; i++){
+ if( aIter[i].bFlag ) sqlite3_free((u8*)aIter[i].a);
+ }
+ if( aIter!=aStatic ) sqlite3_free(aIter);
+ return rc;
+}
+
+typedef struct Fts5LookaheadReader Fts5LookaheadReader;
+struct Fts5LookaheadReader {
+ const u8 *a; /* Buffer containing position list */
+ int n; /* Size of buffer a[] in bytes */
+ int i; /* Current offset in position list */
+ i64 iPos; /* Current position */
+ i64 iLookahead; /* Next position */
+};
+
+#define FTS5_LOOKAHEAD_EOF (((i64)1) << 62)
+
+static int fts5LookaheadReaderNext(Fts5LookaheadReader *p){
+ p->iPos = p->iLookahead;
+ if( sqlite3Fts5PoslistNext64(p->a, p->n, &p->i, &p->iLookahead) ){
+ p->iLookahead = FTS5_LOOKAHEAD_EOF;
+ }
+ return (p->iPos==FTS5_LOOKAHEAD_EOF);
+}
+
+static int fts5LookaheadReaderInit(
+ const u8 *a, int n, /* Buffer to read position list from */
+ Fts5LookaheadReader *p /* Iterator object to initialize */
+){
+ memset(p, 0, sizeof(Fts5LookaheadReader));
+ p->a = a;
+ p->n = n;
+ fts5LookaheadReaderNext(p);
+ return fts5LookaheadReaderNext(p);
+}
+
+#if 0
+static int fts5LookaheadReaderEof(Fts5LookaheadReader *p){
+ return (p->iPos==FTS5_LOOKAHEAD_EOF);
+}
+#endif
+
+typedef struct Fts5NearTrimmer Fts5NearTrimmer;
+struct Fts5NearTrimmer {
+ Fts5LookaheadReader reader; /* Input iterator */
+ Fts5PoslistWriter writer; /* Writer context */
+ Fts5Buffer *pOut; /* Output poslist */
+};
+
+/*
+** The near-set object passed as the first argument contains more than
+** one phrase. All phrases currently point to the same row. The
+** Fts5ExprPhrase.poslist buffers are populated accordingly. This function
+** tests if the current row contains instances of each phrase sufficiently
+** close together to meet the NEAR constraint. Non-zero is returned if it
+** does, or zero otherwise.
+**
+** If in/out parameter (*pRc) is set to other than SQLITE_OK when this
+** function is called, it is a no-op. Or, if an error (e.g. SQLITE_NOMEM)
+** occurs within this function (*pRc) is set accordingly before returning.
+** The return value is undefined in both these cases.
+**
+** If no error occurs and non-zero (a match) is returned, the position-list
+** of each phrase object is edited to contain only those entries that
+** meet the constraint before returning.
+*/
+static int fts5ExprNearIsMatch(int *pRc, Fts5ExprNearset *pNear){
+ Fts5NearTrimmer aStatic[4];
+ Fts5NearTrimmer *a = aStatic;
+ Fts5ExprPhrase **apPhrase = pNear->apPhrase;
+
+ int i;
+ int rc = *pRc;
+ int bMatch;
+
+ assert( pNear->nPhrase>1 );
+
+ /* If the aStatic[] array is not large enough, allocate a large array
+ ** using sqlite3_malloc(). This approach could be improved upon. */
+ if( pNear->nPhrase>(sizeof(aStatic) / sizeof(aStatic[0])) ){
+ int nByte = sizeof(Fts5NearTrimmer) * pNear->nPhrase;
+ a = (Fts5NearTrimmer*)sqlite3Fts5MallocZero(&rc, nByte);
+ }else{
+ memset(aStatic, 0, sizeof(aStatic));
+ }
+ if( rc!=SQLITE_OK ){
+ *pRc = rc;
+ return 0;
+ }
+
+ /* Initialize a lookahead iterator for each phrase. After passing the
+ ** buffer and buffer size to the lookaside-reader init function, zero
+ ** the phrase poslist buffer. The new poslist for the phrase (containing
+ ** the same entries as the original with some entries removed on account
+ ** of the NEAR constraint) is written over the original even as it is
+ ** being read. This is safe as the entries for the new poslist are a
+ ** subset of the old, so it is not possible for data yet to be read to
+ ** be overwritten. */
+ for(i=0; i<pNear->nPhrase; i++){
+ Fts5Buffer *pPoslist = &apPhrase[i]->poslist;
+ fts5LookaheadReaderInit(pPoslist->p, pPoslist->n, &a[i].reader);
+ pPoslist->n = 0;
+ a[i].pOut = pPoslist;
+ }
+
+ while( 1 ){
+ int iAdv;
+ i64 iMin;
+ i64 iMax;
+
+ /* This block advances the phrase iterators until they point to a set of
+ ** entries that together comprise a match. */
+ iMax = a[0].reader.iPos;
+ do {
+ bMatch = 1;
+ for(i=0; i<pNear->nPhrase; i++){
+ Fts5LookaheadReader *pPos = &a[i].reader;
+ iMin = iMax - pNear->apPhrase[i]->nTerm - pNear->nNear;
+ if( pPos->iPos<iMin || pPos->iPos>iMax ){
+ bMatch = 0;
+ while( pPos->iPos<iMin ){
+ if( fts5LookaheadReaderNext(pPos) ) goto ismatch_out;
+ }
+ if( pPos->iPos>iMax ) iMax = pPos->iPos;
+ }
+ }
+ }while( bMatch==0 );
+
+ /* Add an entry to each output position list */
+ for(i=0; i<pNear->nPhrase; i++){
+ i64 iPos = a[i].reader.iPos;
+ Fts5PoslistWriter *pWriter = &a[i].writer;
+ if( a[i].pOut->n==0 || iPos!=pWriter->iPrev ){
+ sqlite3Fts5PoslistWriterAppend(a[i].pOut, pWriter, iPos);
+ }
+ }
+
+ iAdv = 0;
+ iMin = a[0].reader.iLookahead;
+ for(i=0; i<pNear->nPhrase; i++){
+ if( a[i].reader.iLookahead < iMin ){
+ iMin = a[i].reader.iLookahead;
+ iAdv = i;
+ }
+ }
+ if( fts5LookaheadReaderNext(&a[iAdv].reader) ) goto ismatch_out;
+ }
+
+ ismatch_out: {
+ int bRet = a[0].pOut->n>0;
+ *pRc = rc;
+ if( a!=aStatic ) sqlite3_free(a);
+ return bRet;
+ }
+}
+
+/*
+** Advance the first term iterator in the first phrase of pNear. Set output
+** variable *pbEof to true if it reaches EOF or if an error occurs.
+**
+** Return SQLITE_OK if successful, or an SQLite error code if an error
+** occurs.
+*/
+static int fts5ExprNearAdvanceFirst(
+ Fts5Expr *pExpr, /* Expression pPhrase belongs to */
+ Fts5ExprNode *pNode, /* FTS5_STRING or FTS5_TERM node */
+ int bFromValid,
+ i64 iFrom
+){
+ Fts5ExprTerm *pTerm = &pNode->pNear->apPhrase[0]->aTerm[0];
+ int rc = SQLITE_OK;
+
+ if( pTerm->pSynonym ){
+ int bEof = 1;
+ Fts5ExprTerm *p;
+
+ /* Find the firstest rowid any synonym points to. */
+ i64 iRowid = fts5ExprSynonymRowid(pTerm, pExpr->bDesc, 0);
+
+ /* Advance each iterator that currently points to iRowid. Or, if iFrom
+ ** is valid - each iterator that points to a rowid before iFrom. */
+ for(p=pTerm; p; p=p->pSynonym){
+ if( sqlite3Fts5IterEof(p->pIter)==0 ){
+ i64 ii = sqlite3Fts5IterRowid(p->pIter);
+ if( ii==iRowid
+ || (bFromValid && ii!=iFrom && (ii>iFrom)==pExpr->bDesc)
+ ){
+ if( bFromValid ){
+ rc = sqlite3Fts5IterNextFrom(p->pIter, iFrom);
+ }else{
+ rc = sqlite3Fts5IterNext(p->pIter);
+ }
+ if( rc!=SQLITE_OK ) break;
+ if( sqlite3Fts5IterEof(p->pIter)==0 ){
+ bEof = 0;
+ }
+ }else{
+ bEof = 0;
+ }
+ }
+ }
+
+ /* Set the EOF flag if either all synonym iterators are at EOF or an
+ ** error has occurred. */
+ pNode->bEof = (rc || bEof);
+ }else{
+ Fts5IndexIter *pIter = pTerm->pIter;
+
+ assert( Fts5NodeIsString(pNode) );
+ if( bFromValid ){
+ rc = sqlite3Fts5IterNextFrom(pIter, iFrom);
+ }else{
+ rc = sqlite3Fts5IterNext(pIter);
+ }
+
+ pNode->bEof = (rc || sqlite3Fts5IterEof(pIter));
+ }
+
+ return rc;
+}
+
+/*
+** Advance iterator pIter until it points to a value equal to or laster
+** than the initial value of *piLast. If this means the iterator points
+** to a value laster than *piLast, update *piLast to the new lastest value.
+**
+** If the iterator reaches EOF, set *pbEof to true before returning. If
+** an error occurs, set *pRc to an error code. If either *pbEof or *pRc
+** are set, return a non-zero value. Otherwise, return zero.
+*/
+static int fts5ExprAdvanceto(
+ Fts5IndexIter *pIter, /* Iterator to advance */
+ int bDesc, /* True if iterator is "rowid DESC" */
+ i64 *piLast, /* IN/OUT: Lastest rowid seen so far */
+ int *pRc, /* OUT: Error code */
+ int *pbEof /* OUT: Set to true if EOF */
+){
+ i64 iLast = *piLast;
+ i64 iRowid;
+
+ iRowid = sqlite3Fts5IterRowid(pIter);
+ if( (bDesc==0 && iLast>iRowid) || (bDesc && iLast<iRowid) ){
+ int rc = sqlite3Fts5IterNextFrom(pIter, iLast);
+ if( rc || sqlite3Fts5IterEof(pIter) ){
+ *pRc = rc;
+ *pbEof = 1;
+ return 1;
+ }
+ iRowid = sqlite3Fts5IterRowid(pIter);
+ assert( (bDesc==0 && iRowid>=iLast) || (bDesc==1 && iRowid<=iLast) );
+ }
+ *piLast = iRowid;
+
+ return 0;
+}
+
+static int fts5ExprSynonymAdvanceto(
+ Fts5ExprTerm *pTerm, /* Term iterator to advance */
+ int bDesc, /* True if iterator is "rowid DESC" */
+ i64 *piLast, /* IN/OUT: Lastest rowid seen so far */
+ int *pRc /* OUT: Error code */
+){
+ int rc = SQLITE_OK;
+ i64 iLast = *piLast;
+ Fts5ExprTerm *p;
+ int bEof = 0;
+
+ for(p=pTerm; rc==SQLITE_OK && p; p=p->pSynonym){
+ if( sqlite3Fts5IterEof(p->pIter)==0 ){
+ i64 iRowid = sqlite3Fts5IterRowid(p->pIter);
+ if( (bDesc==0 && iLast>iRowid) || (bDesc && iLast<iRowid) ){
+ rc = sqlite3Fts5IterNextFrom(p->pIter, iLast);
+ }
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ *pRc = rc;
+ bEof = 1;
+ }else{
+ *piLast = fts5ExprSynonymRowid(pTerm, bDesc, &bEof);
+ }
+ return bEof;
+}
+
+
+static int fts5ExprNearTest(
+ int *pRc,
+ Fts5Expr *pExpr, /* Expression that pNear is a part of */
+ Fts5ExprNode *pNode /* The "NEAR" node (FTS5_STRING) */
+){
+ Fts5ExprNearset *pNear = pNode->pNear;
+ int rc = *pRc;
+ int i;
+
+ /* Check that each phrase in the nearset matches the current row.
+ ** Populate the pPhrase->poslist buffers at the same time. If any
+ ** phrase is not a match, break out of the loop early. */
+ for(i=0; rc==SQLITE_OK && i<pNear->nPhrase; i++){
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];
+ if( pPhrase->nTerm>1 || pPhrase->aTerm[0].pSynonym || pNear->pColset ){
+ int bMatch = 0;
+ rc = fts5ExprPhraseIsMatch(pNode, pNear->pColset, pPhrase, &bMatch);
+ if( bMatch==0 ) break;
+ }else{
+ rc = sqlite3Fts5IterPoslistBuffer(
+ pPhrase->aTerm[0].pIter, &pPhrase->poslist
+ );
+ }
+ }
+
+ *pRc = rc;
+ if( i==pNear->nPhrase && (i==1 || fts5ExprNearIsMatch(pRc, pNear)) ){
+ return 1;
+ }
+
+ return 0;
+}
+
+static int fts5ExprTokenTest(
+ Fts5Expr *pExpr, /* Expression that pNear is a part of */
+ Fts5ExprNode *pNode /* The "NEAR" node (FTS5_TERM) */
+){
+ /* As this "NEAR" object is actually a single phrase that consists
+ ** of a single term only, grab pointers into the poslist managed by the
+ ** fts5_index.c iterator object. This is much faster than synthesizing
+ ** a new poslist the way we have to for more complicated phrase or NEAR
+ ** expressions. */
+ Fts5ExprNearset *pNear = pNode->pNear;
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[0];
+ Fts5IndexIter *pIter = pPhrase->aTerm[0].pIter;
+ Fts5Colset *pColset = pNear->pColset;
+ int rc;
+
+ assert( pNode->eType==FTS5_TERM );
+ assert( pNear->nPhrase==1 && pPhrase->nTerm==1 );
+ assert( pPhrase->aTerm[0].pSynonym==0 );
+
+ rc = sqlite3Fts5IterPoslist(pIter, pColset,
+ (const u8**)&pPhrase->poslist.p, &pPhrase->poslist.n, &pNode->iRowid
+ );
+ pNode->bNomatch = (pPhrase->poslist.n==0);
+ return rc;
+}
+
+/*
+** All individual term iterators in pNear are guaranteed to be valid when
+** this function is called. This function checks if all term iterators
+** point to the same rowid, and if not, advances them until they do.
+** If an EOF is reached before this happens, *pbEof is set to true before
+** returning.
+**
+** SQLITE_OK is returned if an error occurs, or an SQLite error code
+** otherwise. It is not considered an error code if an iterator reaches
+** EOF.
+*/
+static int fts5ExprNearNextMatch(
+ Fts5Expr *pExpr, /* Expression pPhrase belongs to */
+ Fts5ExprNode *pNode
+){
+ Fts5ExprNearset *pNear = pNode->pNear;
+ Fts5ExprPhrase *pLeft = pNear->apPhrase[0];
+ int rc = SQLITE_OK;
+ i64 iLast; /* Lastest rowid any iterator points to */
+ int i, j; /* Phrase and token index, respectively */
+ int bMatch; /* True if all terms are at the same rowid */
+ const int bDesc = pExpr->bDesc;
+
+ /* Check that this node should not be FTS5_TERM */
+ assert( pNear->nPhrase>1
+ || pNear->apPhrase[0]->nTerm>1
+ || pNear->apPhrase[0]->aTerm[0].pSynonym
+ );
+
+ /* Initialize iLast, the "lastest" rowid any iterator points to. If the
+ ** iterator skips through rowids in the default ascending order, this means
+ ** the maximum rowid. Or, if the iterator is "ORDER BY rowid DESC", then it
+ ** means the minimum rowid. */
+ if( pLeft->aTerm[0].pSynonym ){
+ iLast = fts5ExprSynonymRowid(&pLeft->aTerm[0], bDesc, 0);
+ }else{
+ iLast = sqlite3Fts5IterRowid(pLeft->aTerm[0].pIter);
+ }
+
+ do {
+ bMatch = 1;
+ for(i=0; i<pNear->nPhrase; i++){
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];
+ for(j=0; j<pPhrase->nTerm; j++){
+ Fts5ExprTerm *pTerm = &pPhrase->aTerm[j];
+ if( pTerm->pSynonym ){
+ i64 iRowid = fts5ExprSynonymRowid(pTerm, bDesc, 0);
+ if( iRowid==iLast ) continue;
+ bMatch = 0;
+ if( fts5ExprSynonymAdvanceto(pTerm, bDesc, &iLast, &rc) ){
+ pNode->bEof = 1;
+ return rc;
+ }
+ }else{
+ Fts5IndexIter *pIter = pPhrase->aTerm[j].pIter;
+ i64 iRowid = sqlite3Fts5IterRowid(pIter);
+ if( iRowid==iLast ) continue;
+ bMatch = 0;
+ if( fts5ExprAdvanceto(pIter, bDesc, &iLast, &rc, &pNode->bEof) ){
+ return rc;
+ }
+ }
+ }
+ }
+ }while( bMatch==0 );
+
+ pNode->iRowid = iLast;
+ pNode->bNomatch = (0==fts5ExprNearTest(&rc, pExpr, pNode));
+
+ return rc;
+}
+
+/*
+** Initialize all term iterators in the pNear object. If any term is found
+** to match no documents at all, return immediately without initializing any
+** further iterators.
+*/
+static int fts5ExprNearInitAll(
+ Fts5Expr *pExpr,
+ Fts5ExprNode *pNode
+){
+ Fts5ExprNearset *pNear = pNode->pNear;
+ int i, j;
+ int rc = SQLITE_OK;
+
+ for(i=0; rc==SQLITE_OK && i<pNear->nPhrase; i++){
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];
+ for(j=0; j<pPhrase->nTerm; j++){
+ Fts5ExprTerm *pTerm = &pPhrase->aTerm[j];
+ Fts5ExprTerm *p;
+ int bEof = 1;
+
+ for(p=pTerm; p && rc==SQLITE_OK; p=p->pSynonym){
+ if( p->pIter ){
+ sqlite3Fts5IterClose(p->pIter);
+ p->pIter = 0;
+ }
+ rc = sqlite3Fts5IndexQuery(
+ pExpr->pIndex, p->zTerm, strlen(p->zTerm),
+ (pTerm->bPrefix ? FTS5INDEX_QUERY_PREFIX : 0) |
+ (pExpr->bDesc ? FTS5INDEX_QUERY_DESC : 0),
+ pNear->pColset,
+ &p->pIter
+ );
+ assert( rc==SQLITE_OK || p->pIter==0 );
+ if( p->pIter && 0==sqlite3Fts5IterEof(p->pIter) ){
+ bEof = 0;
+ }
+ }
+
+ if( bEof ){
+ pNode->bEof = 1;
+ return rc;
+ }
+ }
+ }
+
+ return rc;
+}
+
+/* fts5ExprNodeNext() calls fts5ExprNodeNextMatch(). And vice-versa. */
+static int fts5ExprNodeNextMatch(Fts5Expr*, Fts5ExprNode*);
+
+
+/*
+** If pExpr is an ASC iterator, this function returns a value with the
+** same sign as:
+**
+** (iLhs - iRhs)
+**
+** Otherwise, if this is a DESC iterator, the opposite is returned:
+**
+** (iRhs - iLhs)
+*/
+static int fts5RowidCmp(
+ Fts5Expr *pExpr,
+ i64 iLhs,
+ i64 iRhs
+){
+ assert( pExpr->bDesc==0 || pExpr->bDesc==1 );
+ if( pExpr->bDesc==0 ){
+ if( iLhs<iRhs ) return -1;
+ return (iLhs > iRhs);
+ }else{
+ if( iLhs>iRhs ) return -1;
+ return (iLhs < iRhs);
+ }
+}
+
+static void fts5ExprSetEof(Fts5ExprNode *pNode){
+ int i;
+ pNode->bEof = 1;
+ for(i=0; i<pNode->nChild; i++){
+ fts5ExprSetEof(pNode->apChild[i]);
+ }
+}
+
+static void fts5ExprNodeZeroPoslist(Fts5ExprNode *pNode){
+ if( pNode->eType==FTS5_STRING || pNode->eType==FTS5_TERM ){
+ Fts5ExprNearset *pNear = pNode->pNear;
+ int i;
+ for(i=0; i<pNear->nPhrase; i++){
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];
+ pPhrase->poslist.n = 0;
+ }
+ }else{
+ int i;
+ for(i=0; i<pNode->nChild; i++){
+ fts5ExprNodeZeroPoslist(pNode->apChild[i]);
+ }
+ }
+}
+
+
+static int fts5ExprNodeNext(Fts5Expr*, Fts5ExprNode*, int, i64);
+
+/*
+** Argument pNode is an FTS5_AND node.
+*/
+static int fts5ExprAndNextRowid(
+ Fts5Expr *pExpr, /* Expression pPhrase belongs to */
+ Fts5ExprNode *pAnd /* FTS5_AND node to advance */
+){
+ int iChild;
+ i64 iLast = pAnd->iRowid;
+ int rc = SQLITE_OK;
+ int bMatch;
+
+ assert( pAnd->bEof==0 );
+ do {
+ pAnd->bNomatch = 0;
+ bMatch = 1;
+ for(iChild=0; iChild<pAnd->nChild; iChild++){
+ Fts5ExprNode *pChild = pAnd->apChild[iChild];
+ if( 0 && pChild->eType==FTS5_STRING ){
+ /* TODO */
+ }else{
+ int cmp = fts5RowidCmp(pExpr, iLast, pChild->iRowid);
+ if( cmp>0 ){
+ /* Advance pChild until it points to iLast or laster */
+ rc = fts5ExprNodeNext(pExpr, pChild, 1, iLast);
+ if( rc!=SQLITE_OK ) return rc;
+ }
+ }
+
+ /* If the child node is now at EOF, so is the parent AND node. Otherwise,
+ ** the child node is guaranteed to have advanced at least as far as
+ ** rowid iLast. So if it is not at exactly iLast, pChild->iRowid is the
+ ** new lastest rowid seen so far. */
+ assert( pChild->bEof || fts5RowidCmp(pExpr, iLast, pChild->iRowid)<=0 );
+ if( pChild->bEof ){
+ fts5ExprSetEof(pAnd);
+ bMatch = 1;
+ break;
+ }else if( iLast!=pChild->iRowid ){
+ bMatch = 0;
+ iLast = pChild->iRowid;
+ }
+
+ if( pChild->bNomatch ){
+ pAnd->bNomatch = 1;
+ }
+ }
+ }while( bMatch==0 );
+
+ if( pAnd->bNomatch && pAnd!=pExpr->pRoot ){
+ fts5ExprNodeZeroPoslist(pAnd);
+ }
+ pAnd->iRowid = iLast;
+ return SQLITE_OK;
+}
+
+
+/*
+** Compare the values currently indicated by the two nodes as follows:
+**
+** res = (*p1) - (*p2)
+**
+** Nodes that point to values that come later in the iteration order are
+** considered to be larger. Nodes at EOF are the largest of all.
+**
+** This means that if the iteration order is ASC, then numerically larger
+** rowids are considered larger. Or if it is the default DESC, numerically
+** smaller rowids are larger.
+*/
+static int fts5NodeCompare(
+ Fts5Expr *pExpr,
+ Fts5ExprNode *p1,
+ Fts5ExprNode *p2
+){
+ if( p2->bEof ) return -1;
+ if( p1->bEof ) return +1;
+ return fts5RowidCmp(pExpr, p1->iRowid, p2->iRowid);
+}
+
+/*
+** Advance node iterator pNode, part of expression pExpr. If argument
+** bFromValid is zero, then pNode is advanced exactly once. Or, if argument
+** bFromValid is non-zero, then pNode is advanced until it is at or past
+** rowid value iFrom. Whether "past" means "less than" or "greater than"
+** depends on whether this is an ASC or DESC iterator.
+*/
+static int fts5ExprNodeNext(
+ Fts5Expr *pExpr,
+ Fts5ExprNode *pNode,
+ int bFromValid,
+ i64 iFrom
+){
+ int rc = SQLITE_OK;
+
+ if( pNode->bEof==0 ){
+ switch( pNode->eType ){
+ case FTS5_STRING: {
+ rc = fts5ExprNearAdvanceFirst(pExpr, pNode, bFromValid, iFrom);
+ break;
+ };
+
+ case FTS5_TERM: {
+ Fts5IndexIter *pIter = pNode->pNear->apPhrase[0]->aTerm[0].pIter;
+ if( bFromValid ){
+ rc = sqlite3Fts5IterNextFrom(pIter, iFrom);
+ }else{
+ rc = sqlite3Fts5IterNext(pIter);
+ }
+ if( rc==SQLITE_OK && sqlite3Fts5IterEof(pIter)==0 ){
+ assert( rc==SQLITE_OK );
+ rc = fts5ExprTokenTest(pExpr, pNode);
+ }else{
+ pNode->bEof = 1;
+ }
+ return rc;
+ };
+
+ case FTS5_AND: {
+ Fts5ExprNode *pLeft = pNode->apChild[0];
+ rc = fts5ExprNodeNext(pExpr, pLeft, bFromValid, iFrom);
+ break;
+ }
+
+ case FTS5_OR: {
+ int i;
+ i64 iLast = pNode->iRowid;
+
+ for(i=0; rc==SQLITE_OK && i<pNode->nChild; i++){
+ Fts5ExprNode *p1 = pNode->apChild[i];
+ assert( p1->bEof || fts5RowidCmp(pExpr, p1->iRowid, iLast)>=0 );
+ if( p1->bEof==0 ){
+ if( (p1->iRowid==iLast)
+ || (bFromValid && fts5RowidCmp(pExpr, p1->iRowid, iFrom)<0)
+ ){
+ rc = fts5ExprNodeNext(pExpr, p1, bFromValid, iFrom);
+ }
+ }
+ }
+
+ break;
+ }
+
+ default: assert( pNode->eType==FTS5_NOT ); {
+ assert( pNode->nChild==2 );
+ rc = fts5ExprNodeNext(pExpr, pNode->apChild[0], bFromValid, iFrom);
+ break;
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = fts5ExprNodeNextMatch(pExpr, pNode);
+ }
+ }
+
+ /* Assert that if bFromValid was true, either:
+ **
+ ** a) an error occurred, or
+ ** b) the node is now at EOF, or
+ ** c) the node is now at or past rowid iFrom.
+ */
+ assert( bFromValid==0
+ || rc!=SQLITE_OK /* a */
+ || pNode->bEof /* b */
+ || pNode->iRowid==iFrom || pExpr->bDesc==(pNode->iRowid<iFrom) /* c */
+ );
+
+ return rc;
+}
+
+
+/*
+** If pNode currently points to a match, this function returns SQLITE_OK
+** without modifying it. Otherwise, pNode is advanced until it does point
+** to a match or EOF is reached.
+*/
+static int fts5ExprNodeNextMatch(
+ Fts5Expr *pExpr, /* Expression of which pNode is a part */
+ Fts5ExprNode *pNode /* Expression node to test */
+){
+ int rc = SQLITE_OK;
+ if( pNode->bEof==0 ){
+ switch( pNode->eType ){
+
+ case FTS5_STRING: {
+ /* Advance the iterators until they all point to the same rowid */
+ rc = fts5ExprNearNextMatch(pExpr, pNode);
+ break;
+ }
+
+ case FTS5_TERM: {
+ rc = fts5ExprTokenTest(pExpr, pNode);
+ break;
+ }
+
+ case FTS5_AND: {
+ rc = fts5ExprAndNextRowid(pExpr, pNode);
+ break;
+ }
+
+ case FTS5_OR: {
+ Fts5ExprNode *pNext = pNode->apChild[0];
+ int i;
+
+ for(i=1; i<pNode->nChild; i++){
+ Fts5ExprNode *pChild = pNode->apChild[i];
+ int cmp = fts5NodeCompare(pExpr, pNext, pChild);
+ if( cmp>0 || (cmp==0 && pChild->bNomatch==0) ){
+ pNext = pChild;
+ }
+ }
+ pNode->iRowid = pNext->iRowid;
+ pNode->bEof = pNext->bEof;
+ pNode->bNomatch = pNext->bNomatch;
+ break;
+ }
+
+ default: assert( pNode->eType==FTS5_NOT ); {
+ Fts5ExprNode *p1 = pNode->apChild[0];
+ Fts5ExprNode *p2 = pNode->apChild[1];
+ assert( pNode->nChild==2 );
+
+ while( rc==SQLITE_OK && p1->bEof==0 ){
+ int cmp = fts5NodeCompare(pExpr, p1, p2);
+ if( cmp>0 ){
+ rc = fts5ExprNodeNext(pExpr, p2, 1, p1->iRowid);
+ cmp = fts5NodeCompare(pExpr, p1, p2);
+ }
+ assert( rc!=SQLITE_OK || cmp<=0 );
+ if( cmp || p2->bNomatch ) break;
+ rc = fts5ExprNodeNext(pExpr, p1, 0, 0);
+ }
+ pNode->bEof = p1->bEof;
+ pNode->iRowid = p1->iRowid;
+ break;
+ }
+ }
+ }
+ return rc;
+}
+
+
+/*
+** Set node pNode, which is part of expression pExpr, to point to the first
+** match. If there are no matches, set the Node.bEof flag to indicate EOF.
+**
+** Return an SQLite error code if an error occurs, or SQLITE_OK otherwise.
+** It is not an error if there are no matches.
+*/
+static int fts5ExprNodeFirst(Fts5Expr *pExpr, Fts5ExprNode *pNode){
+ int rc = SQLITE_OK;
+ pNode->bEof = 0;
+
+ if( Fts5NodeIsString(pNode) ){
+ /* Initialize all term iterators in the NEAR object. */
+ rc = fts5ExprNearInitAll(pExpr, pNode);
+ }else{
+ int i;
+ for(i=0; i<pNode->nChild && rc==SQLITE_OK; i++){
+ rc = fts5ExprNodeFirst(pExpr, pNode->apChild[i]);
+ }
+ pNode->iRowid = pNode->apChild[0]->iRowid;
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = fts5ExprNodeNextMatch(pExpr, pNode);
+ }
+ return rc;
+}
+
+
+/*
+** Begin iterating through the set of documents in index pIdx matched by
+** the MATCH expression passed as the first argument. If the "bDesc"
+** parameter is passed a non-zero value, iteration is in descending rowid
+** order. Or, if it is zero, in ascending order.
+**
+** If iterating in ascending rowid order (bDesc==0), the first document
+** visited is that with the smallest rowid that is larger than or equal
+** to parameter iFirst. Or, if iterating in ascending order (bDesc==1),
+** then the first document visited must have a rowid smaller than or
+** equal to iFirst.
+**
+** Return SQLITE_OK if successful, or an SQLite error code otherwise. It
+** is not considered an error if the query does not match any documents.
+*/
+static int sqlite3Fts5ExprFirst(Fts5Expr *p, Fts5Index *pIdx, i64 iFirst, int bDesc){
+ Fts5ExprNode *pRoot = p->pRoot;
+ int rc = SQLITE_OK;
+ if( pRoot ){
+ p->pIndex = pIdx;
+ p->bDesc = bDesc;
+ rc = fts5ExprNodeFirst(p, pRoot);
+
+ /* If not at EOF but the current rowid occurs earlier than iFirst in
+ ** the iteration order, move to document iFirst or later. */
+ if( pRoot->bEof==0 && fts5RowidCmp(p, pRoot->iRowid, iFirst)<0 ){
+ rc = fts5ExprNodeNext(p, pRoot, 1, iFirst);
+ }
+
+ /* If the iterator is not at a real match, skip forward until it is. */
+ while( pRoot->bNomatch && rc==SQLITE_OK && pRoot->bEof==0 ){
+ rc = fts5ExprNodeNext(p, pRoot, 0, 0);
+ }
+ }
+ return rc;
+}
+
+/*
+** Move to the next document
+**
+** Return SQLITE_OK if successful, or an SQLite error code otherwise. It
+** is not considered an error if the query does not match any documents.
+*/
+static int sqlite3Fts5ExprNext(Fts5Expr *p, i64 iLast){
+ int rc;
+ Fts5ExprNode *pRoot = p->pRoot;
+ do {
+ rc = fts5ExprNodeNext(p, pRoot, 0, 0);
+ }while( pRoot->bNomatch && pRoot->bEof==0 && rc==SQLITE_OK );
+ if( fts5RowidCmp(p, pRoot->iRowid, iLast)>0 ){
+ pRoot->bEof = 1;
+ }
+ return rc;
+}
+
+static int sqlite3Fts5ExprEof(Fts5Expr *p){
+ return (p->pRoot==0 || p->pRoot->bEof);
+}
+
+static i64 sqlite3Fts5ExprRowid(Fts5Expr *p){
+ return p->pRoot->iRowid;
+}
+
+static int fts5ParseStringFromToken(Fts5Token *pToken, char **pz){
+ int rc = SQLITE_OK;
+ *pz = sqlite3Fts5Strndup(&rc, pToken->p, pToken->n);
+ return rc;
+}
+
+/*
+** Free the phrase object passed as the only argument.
+*/
+static void fts5ExprPhraseFree(Fts5ExprPhrase *pPhrase){
+ if( pPhrase ){
+ int i;
+ for(i=0; i<pPhrase->nTerm; i++){
+ Fts5ExprTerm *pSyn;
+ Fts5ExprTerm *pNext;
+ Fts5ExprTerm *pTerm = &pPhrase->aTerm[i];
+ sqlite3_free(pTerm->zTerm);
+ sqlite3Fts5IterClose(pTerm->pIter);
+
+ for(pSyn=pTerm->pSynonym; pSyn; pSyn=pNext){
+ pNext = pSyn->pSynonym;
+ sqlite3Fts5IterClose(pSyn->pIter);
+ sqlite3_free(pSyn);
+ }
+ }
+ if( pPhrase->poslist.nSpace>0 ) fts5BufferFree(&pPhrase->poslist);
+ sqlite3_free(pPhrase);
+ }
+}
+
+/*
+** If argument pNear is NULL, then a new Fts5ExprNearset object is allocated
+** and populated with pPhrase. Or, if pNear is not NULL, phrase pPhrase is
+** appended to it and the results returned.
+**
+** If an OOM error occurs, both the pNear and pPhrase objects are freed and
+** NULL returned.
+*/
+static Fts5ExprNearset *sqlite3Fts5ParseNearset(
+ Fts5Parse *pParse, /* Parse context */
+ Fts5ExprNearset *pNear, /* Existing nearset, or NULL */
+ Fts5ExprPhrase *pPhrase /* Recently parsed phrase */
+){
+ const int SZALLOC = 8;
+ Fts5ExprNearset *pRet = 0;
+
+ if( pParse->rc==SQLITE_OK ){
+ if( pPhrase==0 ){
+ return pNear;
+ }
+ if( pNear==0 ){
+ int nByte = sizeof(Fts5ExprNearset) + SZALLOC * sizeof(Fts5ExprPhrase*);
+ pRet = sqlite3_malloc(nByte);
+ if( pRet==0 ){
+ pParse->rc = SQLITE_NOMEM;
+ }else{
+ memset(pRet, 0, nByte);
+ }
+ }else if( (pNear->nPhrase % SZALLOC)==0 ){
+ int nNew = pNear->nPhrase + SZALLOC;
+ int nByte = sizeof(Fts5ExprNearset) + nNew * sizeof(Fts5ExprPhrase*);
+
+ pRet = (Fts5ExprNearset*)sqlite3_realloc(pNear, nByte);
+ if( pRet==0 ){
+ pParse->rc = SQLITE_NOMEM;
+ }
+ }else{
+ pRet = pNear;
+ }
+ }
+
+ if( pRet==0 ){
+ assert( pParse->rc!=SQLITE_OK );
+ sqlite3Fts5ParseNearsetFree(pNear);
+ sqlite3Fts5ParsePhraseFree(pPhrase);
+ }else{
+ pRet->apPhrase[pRet->nPhrase++] = pPhrase;
+ }
+ return pRet;
+}
+
+typedef struct TokenCtx TokenCtx;
+struct TokenCtx {
+ Fts5ExprPhrase *pPhrase;
+ int rc;
+};
+
+/*
+** Callback for tokenizing terms used by ParseTerm().
+*/
+static int fts5ParseTokenize(
+ void *pContext, /* Pointer to Fts5InsertCtx object */
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
+ const char *pToken, /* Buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iUnused1, /* Start offset of token */
+ int iUnused2 /* End offset of token */
+){
+ int rc = SQLITE_OK;
+ const int SZALLOC = 8;
+ TokenCtx *pCtx = (TokenCtx*)pContext;
+ Fts5ExprPhrase *pPhrase = pCtx->pPhrase;
+
+ /* If an error has already occurred, this is a no-op */
+ if( pCtx->rc!=SQLITE_OK ) return pCtx->rc;
+
+ assert( pPhrase==0 || pPhrase->nTerm>0 );
+ if( pPhrase && (tflags & FTS5_TOKEN_COLOCATED) ){
+ Fts5ExprTerm *pSyn;
+ int nByte = sizeof(Fts5ExprTerm) + nToken+1;
+ pSyn = (Fts5ExprTerm*)sqlite3_malloc(nByte);
+ if( pSyn==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(pSyn, 0, nByte);
+ pSyn->zTerm = (char*)&pSyn[1];
+ memcpy(pSyn->zTerm, pToken, nToken);
+ pSyn->pSynonym = pPhrase->aTerm[pPhrase->nTerm-1].pSynonym;
+ pPhrase->aTerm[pPhrase->nTerm-1].pSynonym = pSyn;
+ }
+ }else{
+ Fts5ExprTerm *pTerm;
+ if( pPhrase==0 || (pPhrase->nTerm % SZALLOC)==0 ){
+ Fts5ExprPhrase *pNew;
+ int nNew = SZALLOC + (pPhrase ? pPhrase->nTerm : 0);
+
+ pNew = (Fts5ExprPhrase*)sqlite3_realloc(pPhrase,
+ sizeof(Fts5ExprPhrase) + sizeof(Fts5ExprTerm) * nNew
+ );
+ if( pNew==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ if( pPhrase==0 ) memset(pNew, 0, sizeof(Fts5ExprPhrase));
+ pCtx->pPhrase = pPhrase = pNew;
+ pNew->nTerm = nNew - SZALLOC;
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ pTerm = &pPhrase->aTerm[pPhrase->nTerm++];
+ memset(pTerm, 0, sizeof(Fts5ExprTerm));
+ pTerm->zTerm = sqlite3Fts5Strndup(&rc, pToken, nToken);
+ }
+ }
+
+ pCtx->rc = rc;
+ return rc;
+}
+
+
+/*
+** Free the phrase object passed as the only argument.
+*/
+static void sqlite3Fts5ParsePhraseFree(Fts5ExprPhrase *pPhrase){
+ fts5ExprPhraseFree(pPhrase);
+}
+
+/*
+** Free the phrase object passed as the second argument.
+*/
+static void sqlite3Fts5ParseNearsetFree(Fts5ExprNearset *pNear){
+ if( pNear ){
+ int i;
+ for(i=0; i<pNear->nPhrase; i++){
+ fts5ExprPhraseFree(pNear->apPhrase[i]);
+ }
+ sqlite3_free(pNear->pColset);
+ sqlite3_free(pNear);
+ }
+}
+
+static void sqlite3Fts5ParseFinished(Fts5Parse *pParse, Fts5ExprNode *p){
+ assert( pParse->pExpr==0 );
+ pParse->pExpr = p;
+}
+
+/*
+** This function is called by the parser to process a string token. The
+** string may or may not be quoted. In any case it is tokenized and a
+** phrase object consisting of all tokens returned.
+*/
+static Fts5ExprPhrase *sqlite3Fts5ParseTerm(
+ Fts5Parse *pParse, /* Parse context */
+ Fts5ExprPhrase *pAppend, /* Phrase to append to */
+ Fts5Token *pToken, /* String to tokenize */
+ int bPrefix /* True if there is a trailing "*" */
+){
+ Fts5Config *pConfig = pParse->pConfig;
+ TokenCtx sCtx; /* Context object passed to callback */
+ int rc; /* Tokenize return code */
+ char *z = 0;
+
+ memset(&sCtx, 0, sizeof(TokenCtx));
+ sCtx.pPhrase = pAppend;
+
+ rc = fts5ParseStringFromToken(pToken, &z);
+ if( rc==SQLITE_OK ){
+ int flags = FTS5_TOKENIZE_QUERY | (bPrefix ? FTS5_TOKENIZE_QUERY : 0);
+ int n;
+ sqlite3Fts5Dequote(z);
+ n = strlen(z);
+ rc = sqlite3Fts5Tokenize(pConfig, flags, z, n, &sCtx, fts5ParseTokenize);
+ }
+ sqlite3_free(z);
+ if( rc || (rc = sCtx.rc) ){
+ pParse->rc = rc;
+ fts5ExprPhraseFree(sCtx.pPhrase);
+ sCtx.pPhrase = 0;
+ }else if( sCtx.pPhrase ){
+
+ if( pAppend==0 ){
+ if( (pParse->nPhrase % 8)==0 ){
+ int nByte = sizeof(Fts5ExprPhrase*) * (pParse->nPhrase + 8);
+ Fts5ExprPhrase **apNew;
+ apNew = (Fts5ExprPhrase**)sqlite3_realloc(pParse->apPhrase, nByte);
+ if( apNew==0 ){
+ pParse->rc = SQLITE_NOMEM;
+ fts5ExprPhraseFree(sCtx.pPhrase);
+ return 0;
+ }
+ pParse->apPhrase = apNew;
+ }
+ pParse->nPhrase++;
+ }
+
+ pParse->apPhrase[pParse->nPhrase-1] = sCtx.pPhrase;
+ assert( sCtx.pPhrase->nTerm>0 );
+ sCtx.pPhrase->aTerm[sCtx.pPhrase->nTerm-1].bPrefix = bPrefix;
+ }
+
+ return sCtx.pPhrase;
+}
+
+/*
+** Create a new FTS5 expression by cloning phrase iPhrase of the
+** expression passed as the second argument.
+*/
+static int sqlite3Fts5ExprClonePhrase(
+ Fts5Config *pConfig,
+ Fts5Expr *pExpr,
+ int iPhrase,
+ Fts5Expr **ppNew
+){
+ int rc = SQLITE_OK; /* Return code */
+ Fts5ExprPhrase *pOrig; /* The phrase extracted from pExpr */
+ int i; /* Used to iterate through phrase terms */
+
+ Fts5Expr *pNew = 0; /* Expression to return via *ppNew */
+
+ TokenCtx sCtx = {0,0}; /* Context object for fts5ParseTokenize */
+
+
+ pOrig = pExpr->apExprPhrase[iPhrase];
+
+ pNew = (Fts5Expr*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Expr));
+ if( rc==SQLITE_OK ){
+ pNew->apExprPhrase = (Fts5ExprPhrase**)sqlite3Fts5MallocZero(&rc,
+ sizeof(Fts5ExprPhrase*));
+ }
+ if( rc==SQLITE_OK ){
+ pNew->pRoot = (Fts5ExprNode*)sqlite3Fts5MallocZero(&rc,
+ sizeof(Fts5ExprNode));
+ }
+ if( rc==SQLITE_OK ){
+ pNew->pRoot->pNear = (Fts5ExprNearset*)sqlite3Fts5MallocZero(&rc,
+ sizeof(Fts5ExprNearset) + sizeof(Fts5ExprPhrase*));
+ }
+
+ for(i=0; rc==SQLITE_OK && i<pOrig->nTerm; i++){
+ int tflags = 0;
+ Fts5ExprTerm *p;
+ for(p=&pOrig->aTerm[i]; p && rc==SQLITE_OK; p=p->pSynonym){
+ const char *zTerm = p->zTerm;
+ rc = fts5ParseTokenize((void*)&sCtx, tflags, zTerm, strlen(zTerm), 0, 0);
+ tflags = FTS5_TOKEN_COLOCATED;
+ }
+ if( rc==SQLITE_OK ){
+ sCtx.pPhrase->aTerm[i].bPrefix = pOrig->aTerm[i].bPrefix;
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ /* All the allocations succeeded. Put the expression object together. */
+ pNew->pIndex = pExpr->pIndex;
+ pNew->nPhrase = 1;
+ pNew->apExprPhrase[0] = sCtx.pPhrase;
+ pNew->pRoot->pNear->apPhrase[0] = sCtx.pPhrase;
+ pNew->pRoot->pNear->nPhrase = 1;
+ sCtx.pPhrase->pNode = pNew->pRoot;
+
+ if( pOrig->nTerm==1 && pOrig->aTerm[0].pSynonym==0 ){
+ pNew->pRoot->eType = FTS5_TERM;
+ }else{
+ pNew->pRoot->eType = FTS5_STRING;
+ }
+ }else{
+ sqlite3Fts5ExprFree(pNew);
+ fts5ExprPhraseFree(sCtx.pPhrase);
+ pNew = 0;
+ }
+
+ *ppNew = pNew;
+ return rc;
+}
+
+
+/*
+** Token pTok has appeared in a MATCH expression where the NEAR operator
+** is expected. If token pTok does not contain "NEAR", store an error
+** in the pParse object.
+*/
+static void sqlite3Fts5ParseNear(Fts5Parse *pParse, Fts5Token *pTok){
+ if( pTok->n!=4 || memcmp("NEAR", pTok->p, 4) ){
+ sqlite3Fts5ParseError(
+ pParse, "fts5: syntax error near \"%.*s\"", pTok->n, pTok->p
+ );
+ }
+}
+
+static void sqlite3Fts5ParseSetDistance(
+ Fts5Parse *pParse,
+ Fts5ExprNearset *pNear,
+ Fts5Token *p
+){
+ int nNear = 0;
+ int i;
+ if( p->n ){
+ for(i=0; i<p->n; i++){
+ char c = (char)p->p[i];
+ if( c<'0' || c>'9' ){
+ sqlite3Fts5ParseError(
+ pParse, "expected integer, got \"%.*s\"", p->n, p->p
+ );
+ return;
+ }
+ nNear = nNear * 10 + (p->p[i] - '0');
+ }
+ }else{
+ nNear = FTS5_DEFAULT_NEARDIST;
+ }
+ pNear->nNear = nNear;
+}
+
+/*
+** The second argument passed to this function may be NULL, or it may be
+** an existing Fts5Colset object. This function returns a pointer to
+** a new colset object containing the contents of (p) with new value column
+** number iCol appended.
+**
+** If an OOM error occurs, store an error code in pParse and return NULL.
+** The old colset object (if any) is not freed in this case.
+*/
+static Fts5Colset *fts5ParseColset(
+ Fts5Parse *pParse, /* Store SQLITE_NOMEM here if required */
+ Fts5Colset *p, /* Existing colset object */
+ int iCol /* New column to add to colset object */
+){
+ int nCol = p ? p->nCol : 0; /* Num. columns already in colset object */
+ Fts5Colset *pNew; /* New colset object to return */
+
+ assert( pParse->rc==SQLITE_OK );
+ assert( iCol>=0 && iCol<pParse->pConfig->nCol );
+
+ pNew = sqlite3_realloc(p, sizeof(Fts5Colset) + sizeof(int)*nCol);
+ if( pNew==0 ){
+ pParse->rc = SQLITE_NOMEM;
+ }else{
+ int *aiCol = pNew->aiCol;
+ int i, j;
+ for(i=0; i<nCol; i++){
+ if( aiCol[i]==iCol ) return pNew;
+ if( aiCol[i]>iCol ) break;
+ }
+ for(j=nCol; j>i; j--){
+ aiCol[j] = aiCol[j-1];
+ }
+ aiCol[i] = iCol;
+ pNew->nCol = nCol+1;
+
+#ifndef NDEBUG
+ /* Check that the array is in order and contains no duplicate entries. */
+ for(i=1; i<pNew->nCol; i++) assert( pNew->aiCol[i]>pNew->aiCol[i-1] );
+#endif
+ }
+
+ return pNew;
+}
+
+static Fts5Colset *sqlite3Fts5ParseColset(
+ Fts5Parse *pParse, /* Store SQLITE_NOMEM here if required */
+ Fts5Colset *pColset, /* Existing colset object */
+ Fts5Token *p
+){
+ Fts5Colset *pRet = 0;
+ int iCol;
+ char *z; /* Dequoted copy of token p */
+
+ z = sqlite3Fts5Strndup(&pParse->rc, p->p, p->n);
+ if( pParse->rc==SQLITE_OK ){
+ Fts5Config *pConfig = pParse->pConfig;
+ sqlite3Fts5Dequote(z);
+ for(iCol=0; iCol<pConfig->nCol; iCol++){
+ if( 0==sqlite3_stricmp(pConfig->azCol[iCol], z) ) break;
+ }
+ if( iCol==pConfig->nCol ){
+ sqlite3Fts5ParseError(pParse, "no such column: %s", z);
+ }else{
+ pRet = fts5ParseColset(pParse, pColset, iCol);
+ }
+ sqlite3_free(z);
+ }
+
+ if( pRet==0 ){
+ assert( pParse->rc!=SQLITE_OK );
+ sqlite3_free(pColset);
+ }
+
+ return pRet;
+}
+
+static void sqlite3Fts5ParseSetColset(
+ Fts5Parse *pParse,
+ Fts5ExprNearset *pNear,
+ Fts5Colset *pColset
+){
+ if( pNear ){
+ pNear->pColset = pColset;
+ }else{
+ sqlite3_free(pColset);
+ }
+}
+
+static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){
+ if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){
+ int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;
+ memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);
+ p->nChild += pSub->nChild;
+ sqlite3_free(pSub);
+ }else{
+ p->apChild[p->nChild++] = pSub;
+ }
+}
+
+/*
+** Allocate and return a new expression object. If anything goes wrong (i.e.
+** OOM error), leave an error code in pParse and return NULL.
+*/
+static Fts5ExprNode *sqlite3Fts5ParseNode(
+ Fts5Parse *pParse, /* Parse context */
+ int eType, /* FTS5_STRING, AND, OR or NOT */
+ Fts5ExprNode *pLeft, /* Left hand child expression */
+ Fts5ExprNode *pRight, /* Right hand child expression */
+ Fts5ExprNearset *pNear /* For STRING expressions, the near cluster */
+){
+ Fts5ExprNode *pRet = 0;
+
+ if( pParse->rc==SQLITE_OK ){
+ int nChild = 0; /* Number of children of returned node */
+ int nByte; /* Bytes of space to allocate for this node */
+
+ assert( (eType!=FTS5_STRING && !pNear)
+ || (eType==FTS5_STRING && !pLeft && !pRight)
+ );
+ if( eType==FTS5_STRING && pNear==0 ) return 0;
+ if( eType!=FTS5_STRING && pLeft==0 ) return pRight;
+ if( eType!=FTS5_STRING && pRight==0 ) return pLeft;
+
+ if( eType==FTS5_NOT ){
+ nChild = 2;
+ }else if( eType==FTS5_AND || eType==FTS5_OR ){
+ nChild = 2;
+ if( pLeft->eType==eType ) nChild += pLeft->nChild-1;
+ if( pRight->eType==eType ) nChild += pRight->nChild-1;
+ }
+
+ nByte = sizeof(Fts5ExprNode) + sizeof(Fts5ExprNode*)*(nChild-1);
+ pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte);
+
+ if( pRet ){
+ pRet->eType = eType;
+ pRet->pNear = pNear;
+ if( eType==FTS5_STRING ){
+ int iPhrase;
+ for(iPhrase=0; iPhrase<pNear->nPhrase; iPhrase++){
+ pNear->apPhrase[iPhrase]->pNode = pRet;
+ }
+ if( pNear->nPhrase==1
+ && pNear->apPhrase[0]->nTerm==1
+ && pNear->apPhrase[0]->aTerm[0].pSynonym==0
+ ){
+ pRet->eType = FTS5_TERM;
+ }
+ }else{
+ fts5ExprAddChildren(pRet, pLeft);
+ fts5ExprAddChildren(pRet, pRight);
+ }
+ }
+ }
+
+ if( pRet==0 ){
+ assert( pParse->rc!=SQLITE_OK );
+ sqlite3Fts5ParseNodeFree(pLeft);
+ sqlite3Fts5ParseNodeFree(pRight);
+ sqlite3Fts5ParseNearsetFree(pNear);
+ }
+ return pRet;
+}
+
+static char *fts5ExprTermPrint(Fts5ExprTerm *pTerm){
+ int nByte = 0;
+ Fts5ExprTerm *p;
+ char *zQuoted;
+
+ /* Determine the maximum amount of space required. */
+ for(p=pTerm; p; p=p->pSynonym){
+ nByte += strlen(pTerm->zTerm) * 2 + 3 + 2;
+ }
+ zQuoted = sqlite3_malloc(nByte);
+
+ if( zQuoted ){
+ int i = 0;
+ for(p=pTerm; p; p=p->pSynonym){
+ char *zIn = p->zTerm;
+ zQuoted[i++] = '"';
+ while( *zIn ){
+ if( *zIn=='"' ) zQuoted[i++] = '"';
+ zQuoted[i++] = *zIn++;
+ }
+ zQuoted[i++] = '"';
+ if( p->pSynonym ) zQuoted[i++] = '|';
+ }
+ if( pTerm->bPrefix ){
+ zQuoted[i++] = ' ';
+ zQuoted[i++] = '*';
+ }
+ zQuoted[i++] = '\0';
+ }
+ return zQuoted;
+}
+
+static char *fts5PrintfAppend(char *zApp, const char *zFmt, ...){
+ char *zNew;
+ va_list ap;
+ va_start(ap, zFmt);
+ zNew = sqlite3_vmprintf(zFmt, ap);
+ va_end(ap);
+ if( zApp && zNew ){
+ char *zNew2 = sqlite3_mprintf("%s%s", zApp, zNew);
+ sqlite3_free(zNew);
+ zNew = zNew2;
+ }
+ sqlite3_free(zApp);
+ return zNew;
+}
+
+/*
+** Compose a tcl-readable representation of expression pExpr. Return a
+** pointer to a buffer containing that representation. It is the
+** responsibility of the caller to at some point free the buffer using
+** sqlite3_free().
+*/
+static char *fts5ExprPrintTcl(
+ Fts5Config *pConfig,
+ const char *zNearsetCmd,
+ Fts5ExprNode *pExpr
+){
+ char *zRet = 0;
+ if( pExpr->eType==FTS5_STRING || pExpr->eType==FTS5_TERM ){
+ Fts5ExprNearset *pNear = pExpr->pNear;
+ int i;
+ int iTerm;
+
+ zRet = fts5PrintfAppend(zRet, "%s ", zNearsetCmd);
+ if( zRet==0 ) return 0;
+ if( pNear->pColset ){
+ int *aiCol = pNear->pColset->aiCol;
+ int nCol = pNear->pColset->nCol;
+ if( nCol==1 ){
+ zRet = fts5PrintfAppend(zRet, "-col %d ", aiCol[0]);
+ }else{
+ zRet = fts5PrintfAppend(zRet, "-col {%d", aiCol[0]);
+ for(i=1; i<pNear->pColset->nCol; i++){
+ zRet = fts5PrintfAppend(zRet, " %d", aiCol[i]);
+ }
+ zRet = fts5PrintfAppend(zRet, "} ");
+ }
+ if( zRet==0 ) return 0;
+ }
+
+ if( pNear->nPhrase>1 ){
+ zRet = fts5PrintfAppend(zRet, "-near %d ", pNear->nNear);
+ if( zRet==0 ) return 0;
+ }
+
+ zRet = fts5PrintfAppend(zRet, "--");
+ if( zRet==0 ) return 0;
+
+ for(i=0; i<pNear->nPhrase; i++){
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];
+
+ zRet = fts5PrintfAppend(zRet, " {");
+ for(iTerm=0; zRet && iTerm<pPhrase->nTerm; iTerm++){
+ char *zTerm = pPhrase->aTerm[iTerm].zTerm;
+ zRet = fts5PrintfAppend(zRet, "%s%s", iTerm==0?"":" ", zTerm);
+ }
+
+ if( zRet ) zRet = fts5PrintfAppend(zRet, "}");
+ if( zRet==0 ) return 0;
+ }
+
+ }else{
+ char const *zOp = 0;
+ int i;
+ switch( pExpr->eType ){
+ case FTS5_AND: zOp = "AND"; break;
+ case FTS5_NOT: zOp = "NOT"; break;
+ default:
+ assert( pExpr->eType==FTS5_OR );
+ zOp = "OR";
+ break;
+ }
+
+ zRet = sqlite3_mprintf("%s", zOp);
+ for(i=0; zRet && i<pExpr->nChild; i++){
+ char *z = fts5ExprPrintTcl(pConfig, zNearsetCmd, pExpr->apChild[i]);
+ if( !z ){
+ sqlite3_free(zRet);
+ zRet = 0;
+ }else{
+ zRet = fts5PrintfAppend(zRet, " [%z]", z);
+ }
+ }
+ }
+
+ return zRet;
+}
+
+static char *fts5ExprPrint(Fts5Config *pConfig, Fts5ExprNode *pExpr){
+ char *zRet = 0;
+ if( pExpr->eType==FTS5_STRING || pExpr->eType==FTS5_TERM ){
+ Fts5ExprNearset *pNear = pExpr->pNear;
+ int i;
+ int iTerm;
+
+ if( pNear->pColset ){
+ int iCol = pNear->pColset->aiCol[0];
+ zRet = fts5PrintfAppend(zRet, "%s : ", pConfig->azCol[iCol]);
+ if( zRet==0 ) return 0;
+ }
+
+ if( pNear->nPhrase>1 ){
+ zRet = fts5PrintfAppend(zRet, "NEAR(");
+ if( zRet==0 ) return 0;
+ }
+
+ for(i=0; i<pNear->nPhrase; i++){
+ Fts5ExprPhrase *pPhrase = pNear->apPhrase[i];
+ if( i!=0 ){
+ zRet = fts5PrintfAppend(zRet, " ");
+ if( zRet==0 ) return 0;
+ }
+ for(iTerm=0; iTerm<pPhrase->nTerm; iTerm++){
+ char *zTerm = fts5ExprTermPrint(&pPhrase->aTerm[iTerm]);
+ if( zTerm ){
+ zRet = fts5PrintfAppend(zRet, "%s%s", iTerm==0?"":" + ", zTerm);
+ sqlite3_free(zTerm);
+ }
+ if( zTerm==0 || zRet==0 ){
+ sqlite3_free(zRet);
+ return 0;
+ }
+ }
+ }
+
+ if( pNear->nPhrase>1 ){
+ zRet = fts5PrintfAppend(zRet, ", %d)", pNear->nNear);
+ if( zRet==0 ) return 0;
+ }
+
+ }else{
+ char const *zOp = 0;
+ int i;
+
+ switch( pExpr->eType ){
+ case FTS5_AND: zOp = " AND "; break;
+ case FTS5_NOT: zOp = " NOT "; break;
+ default:
+ assert( pExpr->eType==FTS5_OR );
+ zOp = " OR ";
+ break;
+ }
+
+ for(i=0; i<pExpr->nChild; i++){
+ char *z = fts5ExprPrint(pConfig, pExpr->apChild[i]);
+ if( z==0 ){
+ sqlite3_free(zRet);
+ zRet = 0;
+ }else{
+ int e = pExpr->apChild[i]->eType;
+ int b = (e!=FTS5_STRING && e!=FTS5_TERM);
+ zRet = fts5PrintfAppend(zRet, "%s%s%z%s",
+ (i==0 ? "" : zOp),
+ (b?"(":""), z, (b?")":"")
+ );
+ }
+ if( zRet==0 ) break;
+ }
+ }
+
+ return zRet;
+}
+
+/*
+** The implementation of user-defined scalar functions fts5_expr() (bTcl==0)
+** and fts5_expr_tcl() (bTcl!=0).
+*/
+static void fts5ExprFunction(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal, /* Function arguments */
+ int bTcl
+){
+ Fts5Global *pGlobal = (Fts5Global*)sqlite3_user_data(pCtx);
+ sqlite3 *db = sqlite3_context_db_handle(pCtx);
+ const char *zExpr = 0;
+ char *zErr = 0;
+ Fts5Expr *pExpr = 0;
+ int rc;
+ int i;
+
+ const char **azConfig; /* Array of arguments for Fts5Config */
+ const char *zNearsetCmd = "nearset";
+ int nConfig; /* Size of azConfig[] */
+ Fts5Config *pConfig = 0;
+ int iArg = 1;
+
+ if( nArg<1 ){
+ zErr = sqlite3_mprintf("wrong number of arguments to function %s",
+ bTcl ? "fts5_expr_tcl" : "fts5_expr"
+ );
+ sqlite3_result_error(pCtx, zErr, -1);
+ sqlite3_free(zErr);
+ return;
+ }
+
+ if( bTcl && nArg>1 ){
+ zNearsetCmd = (const char*)sqlite3_value_text(apVal[1]);
+ iArg = 2;
+ }
+
+ nConfig = 3 + (nArg-iArg);
+ azConfig = (const char**)sqlite3_malloc(sizeof(char*) * nConfig);
+ if( azConfig==0 ){
+ sqlite3_result_error_nomem(pCtx);
+ return;
+ }
+ azConfig[0] = 0;
+ azConfig[1] = "main";
+ azConfig[2] = "tbl";
+ for(i=3; iArg<nArg; iArg++){
+ azConfig[i++] = (const char*)sqlite3_value_text(apVal[iArg]);
+ }
+
+ zExpr = (const char*)sqlite3_value_text(apVal[0]);
+
+ rc = sqlite3Fts5ConfigParse(pGlobal, db, nConfig, azConfig, &pConfig, &zErr);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5ExprNew(pConfig, zExpr, &pExpr, &zErr);
+ }
+ if( rc==SQLITE_OK ){
+ char *zText;
+ if( pExpr->pRoot==0 ){
+ zText = sqlite3_mprintf("");
+ }else if( bTcl ){
+ zText = fts5ExprPrintTcl(pConfig, zNearsetCmd, pExpr->pRoot);
+ }else{
+ zText = fts5ExprPrint(pConfig, pExpr->pRoot);
+ }
+ if( zText==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ sqlite3_result_text(pCtx, zText, -1, SQLITE_TRANSIENT);
+ sqlite3_free(zText);
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ if( zErr ){
+ sqlite3_result_error(pCtx, zErr, -1);
+ sqlite3_free(zErr);
+ }else{
+ sqlite3_result_error_code(pCtx, rc);
+ }
+ }
+ sqlite3_free((void *)azConfig);
+ sqlite3Fts5ConfigFree(pConfig);
+ sqlite3Fts5ExprFree(pExpr);
+}
+
+static void fts5ExprFunctionHr(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal /* Function arguments */
+){
+ fts5ExprFunction(pCtx, nArg, apVal, 0);
+}
+static void fts5ExprFunctionTcl(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal /* Function arguments */
+){
+ fts5ExprFunction(pCtx, nArg, apVal, 1);
+}
+
+/*
+** The implementation of an SQLite user-defined-function that accepts a
+** single integer as an argument. If the integer is an alpha-numeric
+** unicode code point, 1 is returned. Otherwise 0.
+*/
+static void fts5ExprIsAlnum(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal /* Function arguments */
+){
+ int iCode;
+ if( nArg!=1 ){
+ sqlite3_result_error(pCtx,
+ "wrong number of arguments to function fts5_isalnum", -1
+ );
+ return;
+ }
+ iCode = sqlite3_value_int(apVal[0]);
+ sqlite3_result_int(pCtx, sqlite3Fts5UnicodeIsalnum(iCode));
+}
+
+static void fts5ExprFold(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal /* Function arguments */
+){
+ if( nArg!=1 && nArg!=2 ){
+ sqlite3_result_error(pCtx,
+ "wrong number of arguments to function fts5_fold", -1
+ );
+ }else{
+ int iCode;
+ int bRemoveDiacritics = 0;
+ iCode = sqlite3_value_int(apVal[0]);
+ if( nArg==2 ) bRemoveDiacritics = sqlite3_value_int(apVal[1]);
+ sqlite3_result_int(pCtx, sqlite3Fts5UnicodeFold(iCode, bRemoveDiacritics));
+ }
+}
+
+/*
+** This is called during initialization to register the fts5_expr() scalar
+** UDF with the SQLite handle passed as the only argument.
+*/
+static int sqlite3Fts5ExprInit(Fts5Global *pGlobal, sqlite3 *db){
+ struct Fts5ExprFunc {
+ const char *z;
+ void (*x)(sqlite3_context*,int,sqlite3_value**);
+ } aFunc[] = {
+ { "fts5_expr", fts5ExprFunctionHr },
+ { "fts5_expr_tcl", fts5ExprFunctionTcl },
+ { "fts5_isalnum", fts5ExprIsAlnum },
+ { "fts5_fold", fts5ExprFold },
+ };
+ int i;
+ int rc = SQLITE_OK;
+ void *pCtx = (void*)pGlobal;
+
+ for(i=0; rc==SQLITE_OK && i<(sizeof(aFunc) / sizeof(aFunc[0])); i++){
+ struct Fts5ExprFunc *p = &aFunc[i];
+ rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0);
+ }
+
+ /* Avoid a warning indicating that sqlite3Fts5ParserTrace() is unused */
+#ifndef NDEBUG
+ (void)sqlite3Fts5ParserTrace;
+#endif
+
+ return rc;
+}
+
+/*
+** Return the number of phrases in expression pExpr.
+*/
+static int sqlite3Fts5ExprPhraseCount(Fts5Expr *pExpr){
+ return (pExpr ? pExpr->nPhrase : 0);
+}
+
+/*
+** Return the number of terms in the iPhrase'th phrase in pExpr.
+*/
+static int sqlite3Fts5ExprPhraseSize(Fts5Expr *pExpr, int iPhrase){
+ if( iPhrase<0 || iPhrase>=pExpr->nPhrase ) return 0;
+ return pExpr->apExprPhrase[iPhrase]->nTerm;
+}
+
+/*
+** This function is used to access the current position list for phrase
+** iPhrase.
+*/
+static int sqlite3Fts5ExprPoslist(Fts5Expr *pExpr, int iPhrase, const u8 **pa){
+ int nRet;
+ Fts5ExprPhrase *pPhrase = pExpr->apExprPhrase[iPhrase];
+ Fts5ExprNode *pNode = pPhrase->pNode;
+ if( pNode->bEof==0 && pNode->iRowid==pExpr->pRoot->iRowid ){
+ *pa = pPhrase->poslist.p;
+ nRet = pPhrase->poslist.n;
+ }else{
+ *pa = 0;
+ nRet = 0;
+ }
+ return nRet;
+}
+
+/*
+** 2014 August 11
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+*/
+
+
+
+
+typedef struct Fts5HashEntry Fts5HashEntry;
+
+/*
+** This file contains the implementation of an in-memory hash table used
+** to accumuluate "term -> doclist" content before it is flused to a level-0
+** segment.
+*/
+
+
+struct Fts5Hash {
+ int *pnByte; /* Pointer to bytes counter */
+ int nEntry; /* Number of entries currently in hash */
+ int nSlot; /* Size of aSlot[] array */
+ Fts5HashEntry *pScan; /* Current ordered scan item */
+ Fts5HashEntry **aSlot; /* Array of hash slots */
+};
+
+/*
+** Each entry in the hash table is represented by an object of the
+** following type. Each object, its key (zKey[]) and its current data
+** are stored in a single memory allocation. The position list data
+** immediately follows the key data in memory.
+**
+** The data that follows the key is in a similar, but not identical format
+** to the doclist data stored in the database. It is:
+**
+** * Rowid, as a varint
+** * Position list, without 0x00 terminator.
+** * Size of previous position list and rowid, as a 4 byte
+** big-endian integer.
+**
+** iRowidOff:
+** Offset of last rowid written to data area. Relative to first byte of
+** structure.
+**
+** nData:
+** Bytes of data written since iRowidOff.
+*/
+struct Fts5HashEntry {
+ Fts5HashEntry *pHashNext; /* Next hash entry with same hash-key */
+ Fts5HashEntry *pScanNext; /* Next entry in sorted order */
+
+ int nAlloc; /* Total size of allocation */
+ int iSzPoslist; /* Offset of space for 4-byte poslist size */
+ int nData; /* Total bytes of data (incl. structure) */
+ u8 bDel; /* Set delete-flag @ iSzPoslist */
+
+ int iCol; /* Column of last value written */
+ int iPos; /* Position of last value written */
+ i64 iRowid; /* Rowid of last value written */
+ char zKey[8]; /* Nul-terminated entry key */
+};
+
+/*
+** Size of Fts5HashEntry without the zKey[] array.
+*/
+#define FTS5_HASHENTRYSIZE (sizeof(Fts5HashEntry)-8)
+
+
+
+/*
+** Allocate a new hash table.
+*/
+static int sqlite3Fts5HashNew(Fts5Hash **ppNew, int *pnByte){
+ int rc = SQLITE_OK;
+ Fts5Hash *pNew;
+
+ *ppNew = pNew = (Fts5Hash*)sqlite3_malloc(sizeof(Fts5Hash));
+ if( pNew==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ int nByte;
+ memset(pNew, 0, sizeof(Fts5Hash));
+ pNew->pnByte = pnByte;
+
+ pNew->nSlot = 1024;
+ nByte = sizeof(Fts5HashEntry*) * pNew->nSlot;
+ pNew->aSlot = (Fts5HashEntry**)sqlite3_malloc(nByte);
+ if( pNew->aSlot==0 ){
+ sqlite3_free(pNew);
+ *ppNew = 0;
+ rc = SQLITE_NOMEM;
+ }else{
+ memset(pNew->aSlot, 0, nByte);
+ }
+ }
+ return rc;
+}
+
+/*
+** Free a hash table object.
+*/
+static void sqlite3Fts5HashFree(Fts5Hash *pHash){
+ if( pHash ){
+ sqlite3Fts5HashClear(pHash);
+ sqlite3_free(pHash->aSlot);
+ sqlite3_free(pHash);
+ }
+}
+
+/*
+** Empty (but do not delete) a hash table.
+*/
+static void sqlite3Fts5HashClear(Fts5Hash *pHash){
+ int i;
+ for(i=0; i<pHash->nSlot; i++){
+ Fts5HashEntry *pNext;
+ Fts5HashEntry *pSlot;
+ for(pSlot=pHash->aSlot[i]; pSlot; pSlot=pNext){
+ pNext = pSlot->pHashNext;
+ sqlite3_free(pSlot);
+ }
+ }
+ memset(pHash->aSlot, 0, pHash->nSlot * sizeof(Fts5HashEntry*));
+ pHash->nEntry = 0;
+}
+
+static unsigned int fts5HashKey(int nSlot, const u8 *p, int n){
+ int i;
+ unsigned int h = 13;
+ for(i=n-1; i>=0; i--){
+ h = (h << 3) ^ h ^ p[i];
+ }
+ return (h % nSlot);
+}
+
+static unsigned int fts5HashKey2(int nSlot, u8 b, const u8 *p, int n){
+ int i;
+ unsigned int h = 13;
+ for(i=n-1; i>=0; i--){
+ h = (h << 3) ^ h ^ p[i];
+ }
+ h = (h << 3) ^ h ^ b;
+ return (h % nSlot);
+}
+
+/*
+** Resize the hash table by doubling the number of slots.
+*/
+static int fts5HashResize(Fts5Hash *pHash){
+ int nNew = pHash->nSlot*2;
+ int i;
+ Fts5HashEntry **apNew;
+ Fts5HashEntry **apOld = pHash->aSlot;
+
+ apNew = (Fts5HashEntry**)sqlite3_malloc(nNew*sizeof(Fts5HashEntry*));
+ if( !apNew ) return SQLITE_NOMEM;
+ memset(apNew, 0, nNew*sizeof(Fts5HashEntry*));
+
+ for(i=0; i<pHash->nSlot; i++){
+ while( apOld[i] ){
+ int iHash;
+ Fts5HashEntry *p = apOld[i];
+ apOld[i] = p->pHashNext;
+ iHash = fts5HashKey(nNew, (u8*)p->zKey, strlen(p->zKey));
+ p->pHashNext = apNew[iHash];
+ apNew[iHash] = p;
+ }
+ }
+
+ sqlite3_free(apOld);
+ pHash->nSlot = nNew;
+ pHash->aSlot = apNew;
+ return SQLITE_OK;
+}
+
+static void fts5HashAddPoslistSize(Fts5HashEntry *p){
+ if( p->iSzPoslist ){
+ u8 *pPtr = (u8*)p;
+ int nSz = (p->nData - p->iSzPoslist - 1); /* Size in bytes */
+ int nPos = nSz*2 + p->bDel; /* Value of nPos field */
+
+ assert( p->bDel==0 || p->bDel==1 );
+ if( nPos<=127 ){
+ pPtr[p->iSzPoslist] = nPos;
+ }else{
+ int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
+ memmove(&pPtr[p->iSzPoslist + nByte], &pPtr[p->iSzPoslist + 1], nSz);
+ sqlite3Fts5PutVarint(&pPtr[p->iSzPoslist], nPos);
+ p->nData += (nByte-1);
+ }
+ p->bDel = 0;
+ p->iSzPoslist = 0;
+ }
+}
+
+static int sqlite3Fts5HashWrite(
+ Fts5Hash *pHash,
+ i64 iRowid, /* Rowid for this entry */
+ int iCol, /* Column token appears in (-ve -> delete) */
+ int iPos, /* Position of token within column */
+ char bByte, /* First byte of token */
+ const char *pToken, int nToken /* Token to add or remove to or from index */
+){
+ unsigned int iHash;
+ Fts5HashEntry *p;
+ u8 *pPtr;
+ int nIncr = 0; /* Amount to increment (*pHash->pnByte) by */
+
+ /* Attempt to locate an existing hash entry */
+ iHash = fts5HashKey2(pHash->nSlot, (u8)bByte, (const u8*)pToken, nToken);
+ for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){
+ if( p->zKey[0]==bByte
+ && memcmp(&p->zKey[1], pToken, nToken)==0
+ && p->zKey[nToken+1]==0
+ ){
+ break;
+ }
+ }
+
+ /* If an existing hash entry cannot be found, create a new one. */
+ if( p==0 ){
+ int nByte = FTS5_HASHENTRYSIZE + (nToken+1) + 1 + 64;
+ if( nByte<128 ) nByte = 128;
+
+ if( (pHash->nEntry*2)>=pHash->nSlot ){
+ int rc = fts5HashResize(pHash);
+ if( rc!=SQLITE_OK ) return rc;
+ iHash = fts5HashKey2(pHash->nSlot, (u8)bByte, (const u8*)pToken, nToken);
+ }
+
+ p = (Fts5HashEntry*)sqlite3_malloc(nByte);
+ if( !p ) return SQLITE_NOMEM;
+ memset(p, 0, FTS5_HASHENTRYSIZE);
+ p->nAlloc = nByte;
+ p->zKey[0] = bByte;
+ memcpy(&p->zKey[1], pToken, nToken);
+ assert( iHash==fts5HashKey(pHash->nSlot, (u8*)p->zKey, nToken+1) );
+ p->zKey[nToken+1] = '\0';
+ p->nData = nToken+1 + 1 + FTS5_HASHENTRYSIZE;
+ p->nData += sqlite3Fts5PutVarint(&((u8*)p)[p->nData], iRowid);
+ p->iSzPoslist = p->nData;
+ p->nData += 1;
+ p->iRowid = iRowid;
+ p->pHashNext = pHash->aSlot[iHash];
+ pHash->aSlot[iHash] = p;
+ pHash->nEntry++;
+ nIncr += p->nData;
+ }
+
+ /* Check there is enough space to append a new entry. Worst case scenario
+ ** is:
+ **
+ ** + 9 bytes for a new rowid,
+ ** + 4 byte reserved for the "poslist size" varint.
+ ** + 1 byte for a "new column" byte,
+ ** + 3 bytes for a new column number (16-bit max) as a varint,
+ ** + 5 bytes for the new position offset (32-bit max).
+ */
+ if( (p->nAlloc - p->nData) < (9 + 4 + 1 + 3 + 5) ){
+ int nNew = p->nAlloc * 2;
+ Fts5HashEntry *pNew;
+ Fts5HashEntry **pp;
+ pNew = (Fts5HashEntry*)sqlite3_realloc(p, nNew);
+ if( pNew==0 ) return SQLITE_NOMEM;
+ pNew->nAlloc = nNew;
+ for(pp=&pHash->aSlot[iHash]; *pp!=p; pp=&(*pp)->pHashNext);
+ *pp = pNew;
+ p = pNew;
+ }
+ pPtr = (u8*)p;
+ nIncr -= p->nData;
+
+ /* If this is a new rowid, append the 4-byte size field for the previous
+ ** entry, and the new rowid for this entry. */
+ if( iRowid!=p->iRowid ){
+ fts5HashAddPoslistSize(p);
+ p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iRowid - p->iRowid);
+ p->iSzPoslist = p->nData;
+ p->nData += 1;
+ p->iCol = 0;
+ p->iPos = 0;
+ p->iRowid = iRowid;
+ }
+
+ if( iCol>=0 ){
+ /* Append a new column value, if necessary */
+ assert( iCol>=p->iCol );
+ if( iCol!=p->iCol ){
+ pPtr[p->nData++] = 0x01;
+ p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iCol);
+ p->iCol = iCol;
+ p->iPos = 0;
+ }
+
+ /* Append the new position offset */
+ p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iPos - p->iPos + 2);
+ p->iPos = iPos;
+ }else{
+ /* This is a delete. Set the delete flag. */
+ p->bDel = 1;
+ }
+ nIncr += p->nData;
+
+ *pHash->pnByte += nIncr;
+ return SQLITE_OK;
+}
+
+
+/*
+** Arguments pLeft and pRight point to linked-lists of hash-entry objects,
+** each sorted in key order. This function merges the two lists into a
+** single list and returns a pointer to its first element.
+*/
+static Fts5HashEntry *fts5HashEntryMerge(
+ Fts5HashEntry *pLeft,
+ Fts5HashEntry *pRight
+){
+ Fts5HashEntry *p1 = pLeft;
+ Fts5HashEntry *p2 = pRight;
+ Fts5HashEntry *pRet = 0;
+ Fts5HashEntry **ppOut = &pRet;
+
+ while( p1 || p2 ){
+ if( p1==0 ){
+ *ppOut = p2;
+ p2 = 0;
+ }else if( p2==0 ){
+ *ppOut = p1;
+ p1 = 0;
+ }else{
+ int i = 0;
+ while( p1->zKey[i]==p2->zKey[i] ) i++;
+
+ if( ((u8)p1->zKey[i])>((u8)p2->zKey[i]) ){
+ /* p2 is smaller */
+ *ppOut = p2;
+ ppOut = &p2->pScanNext;
+ p2 = p2->pScanNext;
+ }else{
+ /* p1 is smaller */
+ *ppOut = p1;
+ ppOut = &p1->pScanNext;
+ p1 = p1->pScanNext;
+ }
+ *ppOut = 0;
+ }
+ }
+
+ return pRet;
+}
+
+/*
+** Extract all tokens from hash table iHash and link them into a list
+** in sorted order. The hash table is cleared before returning. It is
+** the responsibility of the caller to free the elements of the returned
+** list.
+*/
+static int fts5HashEntrySort(
+ Fts5Hash *pHash,
+ const char *pTerm, int nTerm, /* Query prefix, if any */
+ Fts5HashEntry **ppSorted
+){
+ const int nMergeSlot = 32;
+ Fts5HashEntry **ap;
+ Fts5HashEntry *pList;
+ int iSlot;
+ int i;
+
+ *ppSorted = 0;
+ ap = sqlite3_malloc(sizeof(Fts5HashEntry*) * nMergeSlot);
+ if( !ap ) return SQLITE_NOMEM;
+ memset(ap, 0, sizeof(Fts5HashEntry*) * nMergeSlot);
+
+ for(iSlot=0; iSlot<pHash->nSlot; iSlot++){
+ Fts5HashEntry *pIter;
+ for(pIter=pHash->aSlot[iSlot]; pIter; pIter=pIter->pHashNext){
+ if( pTerm==0 || 0==memcmp(pIter->zKey, pTerm, nTerm) ){
+ Fts5HashEntry *pEntry = pIter;
+ pEntry->pScanNext = 0;
+ for(i=0; ap[i]; i++){
+ pEntry = fts5HashEntryMerge(pEntry, ap[i]);
+ ap[i] = 0;
+ }
+ ap[i] = pEntry;
+ }
+ }
+ }
+
+ pList = 0;
+ for(i=0; i<nMergeSlot; i++){
+ pList = fts5HashEntryMerge(pList, ap[i]);
+ }
+
+ pHash->nEntry = 0;
+ sqlite3_free(ap);
+ *ppSorted = pList;
+ return SQLITE_OK;
+}
+
+/*
+** Query the hash table for a doclist associated with term pTerm/nTerm.
+*/
+static int sqlite3Fts5HashQuery(
+ Fts5Hash *pHash, /* Hash table to query */
+ const char *pTerm, int nTerm, /* Query term */
+ const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */
+ int *pnDoclist /* OUT: Size of doclist in bytes */
+){
+ unsigned int iHash = fts5HashKey(pHash->nSlot, (const u8*)pTerm, nTerm);
+ Fts5HashEntry *p;
+
+ for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){
+ if( memcmp(p->zKey, pTerm, nTerm)==0 && p->zKey[nTerm]==0 ) break;
+ }
+
+ if( p ){
+ fts5HashAddPoslistSize(p);
+ *ppDoclist = (const u8*)&p->zKey[nTerm+1];
+ *pnDoclist = p->nData - (FTS5_HASHENTRYSIZE + nTerm + 1);
+ }else{
+ *ppDoclist = 0;
+ *pnDoclist = 0;
+ }
+
+ return SQLITE_OK;
+}
+
+static int sqlite3Fts5HashScanInit(
+ Fts5Hash *p, /* Hash table to query */
+ const char *pTerm, int nTerm /* Query prefix */
+){
+ return fts5HashEntrySort(p, pTerm, nTerm, &p->pScan);
+}
+
+static void sqlite3Fts5HashScanNext(Fts5Hash *p){
+ assert( !sqlite3Fts5HashScanEof(p) );
+ p->pScan = p->pScan->pScanNext;
+}
+
+static int sqlite3Fts5HashScanEof(Fts5Hash *p){
+ return (p->pScan==0);
+}
+
+static void sqlite3Fts5HashScanEntry(
+ Fts5Hash *pHash,
+ const char **pzTerm, /* OUT: term (nul-terminated) */
+ const u8 **ppDoclist, /* OUT: pointer to doclist */
+ int *pnDoclist /* OUT: size of doclist in bytes */
+){
+ Fts5HashEntry *p;
+ if( (p = pHash->pScan) ){
+ int nTerm = strlen(p->zKey);
+ fts5HashAddPoslistSize(p);
+ *pzTerm = p->zKey;
+ *ppDoclist = (const u8*)&p->zKey[nTerm+1];
+ *pnDoclist = p->nData - (FTS5_HASHENTRYSIZE + nTerm + 1);
+ }else{
+ *pzTerm = 0;
+ *ppDoclist = 0;
+ *pnDoclist = 0;
+ }
+}
+
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** Low level access to the FTS index stored in the database file. The
+** routines in this file file implement all read and write access to the
+** %_data table. Other parts of the system access this functionality via
+** the interface defined in fts5Int.h.
+*/
+
+
+
+/*
+** Overview:
+**
+** The %_data table contains all the FTS indexes for an FTS5 virtual table.
+** As well as the main term index, there may be up to 31 prefix indexes.
+** The format is similar to FTS3/4, except that:
+**
+** * all segment b-tree leaf data is stored in fixed size page records
+** (e.g. 1000 bytes). A single doclist may span multiple pages. Care is
+** taken to ensure it is possible to iterate in either direction through
+** the entries in a doclist, or to seek to a specific entry within a
+** doclist, without loading it into memory.
+**
+** * large doclists that span many pages have associated "doclist index"
+** records that contain a copy of the first rowid on each page spanned by
+** the doclist. This is used to speed up seek operations, and merges of
+** large doclists with very small doclists.
+**
+** * extra fields in the "structure record" record the state of ongoing
+** incremental merge operations.
+**
+*/
+
+
+#define FTS5_OPT_WORK_UNIT 1000 /* Number of leaf pages per optimize step */
+#define FTS5_WORK_UNIT 64 /* Number of leaf pages in unit of work */
+
+#define FTS5_MIN_DLIDX_SIZE 4 /* Add dlidx if this many empty pages */
+
+#define FTS5_MAIN_PREFIX '0'
+
+#if FTS5_MAX_PREFIX_INDEXES > 31
+# error "FTS5_MAX_PREFIX_INDEXES is too large"
+#endif
+
+/*
+** Details:
+**
+** The %_data table managed by this module,
+**
+** CREATE TABLE %_data(id INTEGER PRIMARY KEY, block BLOB);
+**
+** , contains the following 5 types of records. See the comments surrounding
+** the FTS5_*_ROWID macros below for a description of how %_data rowids are
+** assigned to each fo them.
+**
+** 1. Structure Records:
+**
+** The set of segments that make up an index - the index structure - are
+** recorded in a single record within the %_data table. The record consists
+** of a single 32-bit configuration cookie value followed by a list of
+** SQLite varints. If the FTS table features more than one index (because
+** there are one or more prefix indexes), it is guaranteed that all share
+** the same cookie value.
+**
+** Immediately following the configuration cookie, the record begins with
+** three varints:
+**
+** + number of levels,
+** + total number of segments on all levels,
+** + value of write counter.
+**
+** Then, for each level from 0 to nMax:
+**
+** + number of input segments in ongoing merge.
+** + total number of segments in level.
+** + for each segment from oldest to newest:
+** + segment id (always > 0)
+** + first leaf page number (often 1, always greater than 0)
+** + final leaf page number
+**
+** 2. The Averages Record:
+**
+** A single record within the %_data table. The data is a list of varints.
+** The first value is the number of rows in the index. Then, for each column
+** from left to right, the total number of tokens in the column for all
+** rows of the table.
+**
+** 3. Segment leaves:
+**
+** TERM/DOCLIST FORMAT:
+**
+** Most of each segment leaf is taken up by term/doclist data. The
+** general format of term/doclist, starting with the first term
+** on the leaf page, is:
+**
+** varint : size of first term
+** blob: first term data
+** doclist: first doclist
+** zero-or-more {
+** varint: number of bytes in common with previous term
+** varint: number of bytes of new term data (nNew)
+** blob: nNew bytes of new term data
+** doclist: next doclist
+** }
+**
+** doclist format:
+**
+** varint: first rowid
+** poslist: first poslist
+** zero-or-more {
+** varint: rowid delta (always > 0)
+** poslist: next poslist
+** }
+**
+** poslist format:
+**
+** varint: size of poslist in bytes multiplied by 2, not including
+** this field. Plus 1 if this entry carries the "delete" flag.
+** collist: collist for column 0
+** zero-or-more {
+** 0x01 byte
+** varint: column number (I)
+** collist: collist for column I
+** }
+**
+** collist format:
+**
+** varint: first offset + 2
+** zero-or-more {
+** varint: offset delta + 2
+** }
+**
+** PAGE FORMAT
+**
+** Each leaf page begins with a 4-byte header containing 2 16-bit
+** unsigned integer fields in big-endian format. They are:
+**
+** * The byte offset of the first rowid on the page, if it exists
+** and occurs before the first term (otherwise 0).
+**
+** * The byte offset of the start of the page footer. If the page
+** footer is 0 bytes in size, then this field is the same as the
+** size of the leaf page in bytes.
+**
+** The page footer consists of a single varint for each term located
+** on the page. Each varint is the byte offset of the current term
+** within the page, delta-compressed against the previous value. In
+** other words, the first varint in the footer is the byte offset of
+** the first term, the second is the byte offset of the second less that
+** of the first, and so on.
+**
+** The term/doclist format described above is accurate if the entire
+** term/doclist data fits on a single leaf page. If this is not the case,
+** the format is changed in two ways:
+**
+** + if the first rowid on a page occurs before the first term, it
+** is stored as a literal value:
+**
+** varint: first rowid
+**
+** + the first term on each page is stored in the same way as the
+** very first term of the segment:
+**
+** varint : size of first term
+** blob: first term data
+**
+** 5. Segment doclist indexes:
+**
+** Doclist indexes are themselves b-trees, however they usually consist of
+** a single leaf record only. The format of each doclist index leaf page
+** is:
+**
+** * Flags byte. Bits are:
+** 0x01: Clear if leaf is also the root page, otherwise set.
+**
+** * Page number of fts index leaf page. As a varint.
+**
+** * First rowid on page indicated by previous field. As a varint.
+**
+** * A list of varints, one for each subsequent termless page. A
+** positive delta if the termless page contains at least one rowid,
+** or an 0x00 byte otherwise.
+**
+** Internal doclist index nodes are:
+**
+** * Flags byte. Bits are:
+** 0x01: Clear for root page, otherwise set.
+**
+** * Page number of first child page. As a varint.
+**
+** * Copy of first rowid on page indicated by previous field. As a varint.
+**
+** * A list of delta-encoded varints - the first rowid on each subsequent
+** child page.
+**
+*/
+
+/*
+** Rowids for the averages and structure records in the %_data table.
+*/
+#define FTS5_AVERAGES_ROWID 1 /* Rowid used for the averages record */
+#define FTS5_STRUCTURE_ROWID 10 /* The structure record */
+
+/*
+** Macros determining the rowids used by segment leaves and dlidx leaves
+** and nodes. All nodes and leaves are stored in the %_data table with large
+** positive rowids.
+**
+** Each segment has a unique non-zero 16-bit id.
+**
+** The rowid for each segment leaf is found by passing the segment id and
+** the leaf page number to the FTS5_SEGMENT_ROWID macro. Leaves are numbered
+** sequentially starting from 1.
+*/
+#define FTS5_DATA_ID_B 16 /* Max seg id number 65535 */
+#define FTS5_DATA_DLI_B 1 /* Doclist-index flag (1 bit) */
+#define FTS5_DATA_HEIGHT_B 5 /* Max dlidx tree height of 32 */
+#define FTS5_DATA_PAGE_B 31 /* Max page number of 2147483648 */
+
+#define fts5_dri(segid, dlidx, height, pgno) ( \
+ ((i64)(segid) << (FTS5_DATA_PAGE_B+FTS5_DATA_HEIGHT_B+FTS5_DATA_DLI_B)) + \
+ ((i64)(dlidx) << (FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B)) + \
+ ((i64)(height) << (FTS5_DATA_PAGE_B)) + \
+ ((i64)(pgno)) \
+)
+
+#define FTS5_SEGMENT_ROWID(segid, pgno) fts5_dri(segid, 0, 0, pgno)
+#define FTS5_DLIDX_ROWID(segid, height, pgno) fts5_dri(segid, 1, height, pgno)
+
+/*
+** Maximum segments permitted in a single index
+*/
+#define FTS5_MAX_SEGMENT 2000
+
+#ifdef SQLITE_DEBUG
+static int sqlite3Fts5Corrupt() { return SQLITE_CORRUPT_VTAB; }
+#endif
+
+
+/*
+** Each time a blob is read from the %_data table, it is padded with this
+** many zero bytes. This makes it easier to decode the various record formats
+** without overreading if the records are corrupt.
+*/
+#define FTS5_DATA_ZERO_PADDING 8
+#define FTS5_DATA_PADDING 20
+
+typedef struct Fts5Data Fts5Data;
+typedef struct Fts5DlidxIter Fts5DlidxIter;
+typedef struct Fts5DlidxLvl Fts5DlidxLvl;
+typedef struct Fts5DlidxWriter Fts5DlidxWriter;
+typedef struct Fts5PageWriter Fts5PageWriter;
+typedef struct Fts5SegIter Fts5SegIter;
+typedef struct Fts5DoclistIter Fts5DoclistIter;
+typedef struct Fts5SegWriter Fts5SegWriter;
+typedef struct Fts5Structure Fts5Structure;
+typedef struct Fts5StructureLevel Fts5StructureLevel;
+typedef struct Fts5StructureSegment Fts5StructureSegment;
+
+struct Fts5Data {
+ u8 *p; /* Pointer to buffer containing record */
+ int nn; /* Size of record in bytes */
+ int szLeaf; /* Size of leaf without page-index */
+};
+
+/*
+** One object per %_data table.
+*/
+struct Fts5Index {
+ Fts5Config *pConfig; /* Virtual table configuration */
+ char *zDataTbl; /* Name of %_data table */
+ int nWorkUnit; /* Leaf pages in a "unit" of work */
+
+ /*
+ ** Variables related to the accumulation of tokens and doclists within the
+ ** in-memory hash tables before they are flushed to disk.
+ */
+ Fts5Hash *pHash; /* Hash table for in-memory data */
+ int nMaxPendingData; /* Max pending data before flush to disk */
+ int nPendingData; /* Current bytes of pending data */
+ i64 iWriteRowid; /* Rowid for current doc being written */
+ int bDelete; /* Current write is a delete */
+
+ /* Error state. */
+ int rc; /* Current error code */
+
+ /* State used by the fts5DataXXX() functions. */
+ sqlite3_blob *pReader; /* RO incr-blob open on %_data table */
+ sqlite3_stmt *pWriter; /* "INSERT ... %_data VALUES(?,?)" */
+ sqlite3_stmt *pDeleter; /* "DELETE FROM %_data ... id>=? AND id<=?" */
+ sqlite3_stmt *pIdxWriter; /* "INSERT ... %_idx VALUES(?,?,?,?)" */
+ sqlite3_stmt *pIdxDeleter; /* "DELETE FROM %_idx WHERE segid=? */
+ sqlite3_stmt *pIdxSelect;
+ int nRead; /* Total number of blocks read */
+};
+
+struct Fts5DoclistIter {
+ u8 *aEof; /* Pointer to 1 byte past end of doclist */
+
+ /* Output variables. aPoslist==0 at EOF */
+ i64 iRowid;
+ u8 *aPoslist;
+ int nPoslist;
+ int nSize;
+};
+
+/*
+** The contents of the "structure" record for each index are represented
+** using an Fts5Structure record in memory. Which uses instances of the
+** other Fts5StructureXXX types as components.
+*/
+struct Fts5StructureSegment {
+ int iSegid; /* Segment id */
+ int pgnoFirst; /* First leaf page number in segment */
+ int pgnoLast; /* Last leaf page number in segment */
+};
+struct Fts5StructureLevel {
+ int nMerge; /* Number of segments in incr-merge */
+ int nSeg; /* Total number of segments on level */
+ Fts5StructureSegment *aSeg; /* Array of segments. aSeg[0] is oldest. */
+};
+struct Fts5Structure {
+ int nRef; /* Object reference count */
+ u64 nWriteCounter; /* Total leaves written to level 0 */
+ int nSegment; /* Total segments in this structure */
+ int nLevel; /* Number of levels in this index */
+ Fts5StructureLevel aLevel[1]; /* Array of nLevel level objects */
+};
+
+/*
+** An object of type Fts5SegWriter is used to write to segments.
+*/
+struct Fts5PageWriter {
+ int pgno; /* Page number for this page */
+ int iPrevPgidx; /* Previous value written into pgidx */
+ Fts5Buffer buf; /* Buffer containing leaf data */
+ Fts5Buffer pgidx; /* Buffer containing page-index */
+ Fts5Buffer term; /* Buffer containing previous term on page */
+};
+struct Fts5DlidxWriter {
+ int pgno; /* Page number for this page */
+ int bPrevValid; /* True if iPrev is valid */
+ i64 iPrev; /* Previous rowid value written to page */
+ Fts5Buffer buf; /* Buffer containing page data */
+};
+struct Fts5SegWriter {
+ int iSegid; /* Segid to write to */
+ Fts5PageWriter writer; /* PageWriter object */
+ i64 iPrevRowid; /* Previous rowid written to current leaf */
+ u8 bFirstRowidInDoclist; /* True if next rowid is first in doclist */
+ u8 bFirstRowidInPage; /* True if next rowid is first in page */
+ /* TODO1: Can use (writer.pgidx.n==0) instead of bFirstTermInPage */
+ u8 bFirstTermInPage; /* True if next term will be first in leaf */
+ int nLeafWritten; /* Number of leaf pages written */
+ int nEmpty; /* Number of contiguous term-less nodes */
+
+ int nDlidx; /* Allocated size of aDlidx[] array */
+ Fts5DlidxWriter *aDlidx; /* Array of Fts5DlidxWriter objects */
+
+ /* Values to insert into the %_idx table */
+ Fts5Buffer btterm; /* Next term to insert into %_idx table */
+ int iBtPage; /* Page number corresponding to btterm */
+};
+
+/*
+** Object for iterating through the merged results of one or more segments,
+** visiting each term/rowid pair in the merged data.
+**
+** nSeg is always a power of two greater than or equal to the number of
+** segments that this object is merging data from. Both the aSeg[] and
+** aFirst[] arrays are sized at nSeg entries. The aSeg[] array is padded
+** with zeroed objects - these are handled as if they were iterators opened
+** on empty segments.
+**
+** The results of comparing segments aSeg[N] and aSeg[N+1], where N is an
+** even number, is stored in aFirst[(nSeg+N)/2]. The "result" of the
+** comparison in this context is the index of the iterator that currently
+** points to the smaller term/rowid combination. Iterators at EOF are
+** considered to be greater than all other iterators.
+**
+** aFirst[1] contains the index in aSeg[] of the iterator that points to
+** the smallest key overall. aFirst[0] is unused.
+*/
+
+typedef struct Fts5CResult Fts5CResult;
+struct Fts5CResult {
+ u16 iFirst; /* aSeg[] index of firstest iterator */
+ u8 bTermEq; /* True if the terms are equal */
+};
+
+/*
+** Object for iterating through a single segment, visiting each term/rowid
+** pair in the segment.
+**
+** pSeg:
+** The segment to iterate through.
+**
+** iLeafPgno:
+** Current leaf page number within segment.
+**
+** iLeafOffset:
+** Byte offset within the current leaf that is the first byte of the
+** position list data (one byte passed the position-list size field).
+** rowid field of the current entry. Usually this is the size field of the
+** position list data. The exception is if the rowid for the current entry
+** is the last thing on the leaf page.
+**
+** pLeaf:
+** Buffer containing current leaf page data. Set to NULL at EOF.
+**
+** iTermLeafPgno, iTermLeafOffset:
+** Leaf page number containing the last term read from the segment. And
+** the offset immediately following the term data.
+**
+** flags:
+** Mask of FTS5_SEGITER_XXX values. Interpreted as follows:
+**
+** FTS5_SEGITER_ONETERM:
+** If set, set the iterator to point to EOF after the current doclist
+** has been exhausted. Do not proceed to the next term in the segment.
+**
+** FTS5_SEGITER_REVERSE:
+** This flag is only ever set if FTS5_SEGITER_ONETERM is also set. If
+** it is set, iterate through rowid in descending order instead of the
+** default ascending order.
+**
+** iRowidOffset/nRowidOffset/aRowidOffset:
+** These are used if the FTS5_SEGITER_REVERSE flag is set.
+**
+** For each rowid on the page corresponding to the current term, the
+** corresponding aRowidOffset[] entry is set to the byte offset of the
+** start of the "position-list-size" field within the page.
+**
+** iTermIdx:
+** Index of current term on iTermLeafPgno.
+*/
+struct Fts5SegIter {
+ Fts5StructureSegment *pSeg; /* Segment to iterate through */
+ int flags; /* Mask of configuration flags */
+ int iLeafPgno; /* Current leaf page number */
+ Fts5Data *pLeaf; /* Current leaf data */
+ Fts5Data *pNextLeaf; /* Leaf page (iLeafPgno+1) */
+ int iLeafOffset; /* Byte offset within current leaf */
+
+ /* The page and offset from which the current term was read. The offset
+ ** is the offset of the first rowid in the current doclist. */
+ int iTermLeafPgno;
+ int iTermLeafOffset;
+
+ int iPgidxOff; /* Next offset in pgidx */
+ int iEndofDoclist;
+
+ /* The following are only used if the FTS5_SEGITER_REVERSE flag is set. */
+ int iRowidOffset; /* Current entry in aRowidOffset[] */
+ int nRowidOffset; /* Allocated size of aRowidOffset[] array */
+ int *aRowidOffset; /* Array of offset to rowid fields */
+
+ Fts5DlidxIter *pDlidx; /* If there is a doclist-index */
+
+ /* Variables populated based on current entry. */
+ Fts5Buffer term; /* Current term */
+ i64 iRowid; /* Current rowid */
+ int nPos; /* Number of bytes in current position list */
+ int bDel; /* True if the delete flag is set */
+};
+
+/*
+** Argument is a pointer to an Fts5Data structure that contains a
+** leaf page.
+*/
+#define ASSERT_SZLEAF_OK(x) assert( \
+ (x)->szLeaf==(x)->nn || (x)->szLeaf==fts5GetU16(&(x)->p[2]) \
+)
+
+#define FTS5_SEGITER_ONETERM 0x01
+#define FTS5_SEGITER_REVERSE 0x02
+
+
+/*
+** Argument is a pointer to an Fts5Data structure that contains a leaf
+** page. This macro evaluates to true if the leaf contains no terms, or
+** false if it contains at least one term.
+*/
+#define fts5LeafIsTermless(x) ((x)->szLeaf >= (x)->nn)
+
+#define fts5LeafTermOff(x, i) (fts5GetU16(&(x)->p[(x)->szLeaf + (i)*2]))
+
+#define fts5LeafFirstRowidOff(x) (fts5GetU16((x)->p))
+
+/*
+** poslist:
+** Used by sqlite3Fts5IterPoslist() when the poslist needs to be buffered.
+** There is no way to tell if this is populated or not.
+*/
+struct Fts5IndexIter {
+ Fts5Index *pIndex; /* Index that owns this iterator */
+ Fts5Structure *pStruct; /* Database structure for this iterator */
+ Fts5Buffer poslist; /* Buffer containing current poslist */
+
+ int nSeg; /* Size of aSeg[] array */
+ int bRev; /* True to iterate in reverse order */
+ u8 bSkipEmpty; /* True to skip deleted entries */
+ u8 bEof; /* True at EOF */
+ u8 bFiltered; /* True if column-filter already applied */
+
+ i64 iSwitchRowid; /* Firstest rowid of other than aFirst[1] */
+ Fts5CResult *aFirst; /* Current merge state (see above) */
+ Fts5SegIter aSeg[1]; /* Array of segment iterators */
+};
+
+
+/*
+** An instance of the following type is used to iterate through the contents
+** of a doclist-index record.
+**
+** pData:
+** Record containing the doclist-index data.
+**
+** bEof:
+** Set to true once iterator has reached EOF.
+**
+** iOff:
+** Set to the current offset within record pData.
+*/
+struct Fts5DlidxLvl {
+ Fts5Data *pData; /* Data for current page of this level */
+ int iOff; /* Current offset into pData */
+ int bEof; /* At EOF already */
+ int iFirstOff; /* Used by reverse iterators */
+
+ /* Output variables */
+ int iLeafPgno; /* Page number of current leaf page */
+ i64 iRowid; /* First rowid on leaf iLeafPgno */
+};
+struct Fts5DlidxIter {
+ int nLvl;
+ int iSegid;
+ Fts5DlidxLvl aLvl[1];
+};
+
+static void fts5PutU16(u8 *aOut, u16 iVal){
+ aOut[0] = (iVal>>8);
+ aOut[1] = (iVal&0xFF);
+}
+
+static u16 fts5GetU16(const u8 *aIn){
+ return ((u16)aIn[0] << 8) + aIn[1];
+}
+
+/*
+** Allocate and return a buffer at least nByte bytes in size.
+**
+** If an OOM error is encountered, return NULL and set the error code in
+** the Fts5Index handle passed as the first argument.
+*/
+static void *fts5IdxMalloc(Fts5Index *p, int nByte){
+ return sqlite3Fts5MallocZero(&p->rc, nByte);
+}
+
+/*
+** Compare the contents of the pLeft buffer with the pRight/nRight blob.
+**
+** Return -ve if pLeft is smaller than pRight, 0 if they are equal or
+** +ve if pRight is smaller than pLeft. In other words:
+**
+** res = *pLeft - *pRight
+*/
+#ifdef SQLITE_DEBUG
+static int fts5BufferCompareBlob(
+ Fts5Buffer *pLeft, /* Left hand side of comparison */
+ const u8 *pRight, int nRight /* Right hand side of comparison */
+){
+ int nCmp = MIN(pLeft->n, nRight);
+ int res = memcmp(pLeft->p, pRight, nCmp);
+ return (res==0 ? (pLeft->n - nRight) : res);
+}
+#endif
+
+/*
+** Compare the contents of the two buffers using memcmp(). If one buffer
+** is a prefix of the other, it is considered the lesser.
+**
+** Return -ve if pLeft is smaller than pRight, 0 if they are equal or
+** +ve if pRight is smaller than pLeft. In other words:
+**
+** res = *pLeft - *pRight
+*/
+static int fts5BufferCompare(Fts5Buffer *pLeft, Fts5Buffer *pRight){
+ int nCmp = MIN(pLeft->n, pRight->n);
+ int res = memcmp(pLeft->p, pRight->p, nCmp);
+ return (res==0 ? (pLeft->n - pRight->n) : res);
+}
+
+#ifdef SQLITE_DEBUG
+static int fts5BlobCompare(
+ const u8 *pLeft, int nLeft,
+ const u8 *pRight, int nRight
+){
+ int nCmp = MIN(nLeft, nRight);
+ int res = memcmp(pLeft, pRight, nCmp);
+ return (res==0 ? (nLeft - nRight) : res);
+}
+#endif
+
+static int fts5LeafFirstTermOff(Fts5Data *pLeaf){
+ int ret;
+ fts5GetVarint32(&pLeaf->p[pLeaf->szLeaf], ret);
+ return ret;
+}
+
+/*
+** Close the read-only blob handle, if it is open.
+*/
+static void fts5CloseReader(Fts5Index *p){
+ if( p->pReader ){
+ sqlite3_blob *pReader = p->pReader;
+ p->pReader = 0;
+ sqlite3_blob_close(pReader);
+ }
+}
+
+
+/*
+** Retrieve a record from the %_data table.
+**
+** If an error occurs, NULL is returned and an error left in the
+** Fts5Index object.
+*/
+static Fts5Data *fts5DataRead(Fts5Index *p, i64 iRowid){
+ Fts5Data *pRet = 0;
+ if( p->rc==SQLITE_OK ){
+ int rc = SQLITE_OK;
+
+ if( p->pReader ){
+ /* This call may return SQLITE_ABORT if there has been a savepoint
+ ** rollback since it was last used. In this case a new blob handle
+ ** is required. */
+ sqlite3_blob *pBlob = p->pReader;
+ p->pReader = 0;
+ rc = sqlite3_blob_reopen(pBlob, iRowid);
+ assert( p->pReader==0 );
+ p->pReader = pBlob;
+ if( rc!=SQLITE_OK ){
+ fts5CloseReader(p);
+ }
+ if( rc==SQLITE_ABORT ) rc = SQLITE_OK;
+ }
+
+ /* If the blob handle is not open at this point, open it and seek
+ ** to the requested entry. */
+ if( p->pReader==0 && rc==SQLITE_OK ){
+ Fts5Config *pConfig = p->pConfig;
+ rc = sqlite3_blob_open(pConfig->db,
+ pConfig->zDb, p->zDataTbl, "block", iRowid, 0, &p->pReader
+ );
+ }
+
+ /* If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls
+ ** above returned SQLITE_ERROR, return SQLITE_CORRUPT_VTAB instead.
+ ** All the reasons those functions might return SQLITE_ERROR - missing
+ ** table, missing row, non-blob/text in block column - indicate
+ ** backing store corruption. */
+ if( rc==SQLITE_ERROR ) rc = FTS5_CORRUPT;
+
+ if( rc==SQLITE_OK ){
+ u8 *aOut = 0; /* Read blob data into this buffer */
+ int nByte = sqlite3_blob_bytes(p->pReader);
+ int nAlloc = sizeof(Fts5Data) + nByte + FTS5_DATA_PADDING;
+ pRet = (Fts5Data*)sqlite3_malloc(nAlloc);
+ if( pRet ){
+ pRet->nn = nByte;
+ aOut = pRet->p = (u8*)&pRet[1];
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_blob_read(p->pReader, aOut, nByte, 0);
+ }
+ if( rc!=SQLITE_OK ){
+ sqlite3_free(pRet);
+ pRet = 0;
+ }else{
+ /* TODO1: Fix this */
+ pRet->szLeaf = fts5GetU16(&pRet->p[2]);
+ }
+ }
+ p->rc = rc;
+ p->nRead++;
+ }
+
+ assert( (pRet==0)==(p->rc!=SQLITE_OK) );
+ return pRet;
+}
+
+/*
+** Release a reference to data record returned by an earlier call to
+** fts5DataRead().
+*/
+static void fts5DataRelease(Fts5Data *pData){
+ sqlite3_free(pData);
+}
+
+static int fts5IndexPrepareStmt(
+ Fts5Index *p,
+ sqlite3_stmt **ppStmt,
+ char *zSql
+){
+ if( p->rc==SQLITE_OK ){
+ if( zSql ){
+ p->rc = sqlite3_prepare_v2(p->pConfig->db, zSql, -1, ppStmt, 0);
+ }else{
+ p->rc = SQLITE_NOMEM;
+ }
+ }
+ sqlite3_free(zSql);
+ return p->rc;
+}
+
+
+/*
+** INSERT OR REPLACE a record into the %_data table.
+*/
+static void fts5DataWrite(Fts5Index *p, i64 iRowid, const u8 *pData, int nData){
+ if( p->rc!=SQLITE_OK ) return;
+
+ if( p->pWriter==0 ){
+ Fts5Config *pConfig = p->pConfig;
+ fts5IndexPrepareStmt(p, &p->pWriter, sqlite3_mprintf(
+ "REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)",
+ pConfig->zDb, pConfig->zName
+ ));
+ if( p->rc ) return;
+ }
+
+ sqlite3_bind_int64(p->pWriter, 1, iRowid);
+ sqlite3_bind_blob(p->pWriter, 2, pData, nData, SQLITE_STATIC);
+ sqlite3_step(p->pWriter);
+ p->rc = sqlite3_reset(p->pWriter);
+}
+
+/*
+** Execute the following SQL:
+**
+** DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast
+*/
+static void fts5DataDelete(Fts5Index *p, i64 iFirst, i64 iLast){
+ if( p->rc!=SQLITE_OK ) return;
+
+ if( p->pDeleter==0 ){
+ int rc;
+ Fts5Config *pConfig = p->pConfig;
+ char *zSql = sqlite3_mprintf(
+ "DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?",
+ pConfig->zDb, pConfig->zName
+ );
+ if( zSql==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &p->pDeleter, 0);
+ sqlite3_free(zSql);
+ }
+ if( rc!=SQLITE_OK ){
+ p->rc = rc;
+ return;
+ }
+ }
+
+ sqlite3_bind_int64(p->pDeleter, 1, iFirst);
+ sqlite3_bind_int64(p->pDeleter, 2, iLast);
+ sqlite3_step(p->pDeleter);
+ p->rc = sqlite3_reset(p->pDeleter);
+}
+
+/*
+** Remove all records associated with segment iSegid.
+*/
+static void fts5DataRemoveSegment(Fts5Index *p, int iSegid){
+ i64 iFirst = FTS5_SEGMENT_ROWID(iSegid, 0);
+ i64 iLast = FTS5_SEGMENT_ROWID(iSegid+1, 0)-1;
+ fts5DataDelete(p, iFirst, iLast);
+ if( p->pIdxDeleter==0 ){
+ Fts5Config *pConfig = p->pConfig;
+ fts5IndexPrepareStmt(p, &p->pIdxDeleter, sqlite3_mprintf(
+ "DELETE FROM '%q'.'%q_idx' WHERE segid=?",
+ pConfig->zDb, pConfig->zName
+ ));
+ }
+ if( p->rc==SQLITE_OK ){
+ sqlite3_bind_int(p->pIdxDeleter, 1, iSegid);
+ sqlite3_step(p->pIdxDeleter);
+ p->rc = sqlite3_reset(p->pIdxDeleter);
+ }
+}
+
+/*
+** Release a reference to an Fts5Structure object returned by an earlier
+** call to fts5StructureRead() or fts5StructureDecode().
+*/
+static void fts5StructureRelease(Fts5Structure *pStruct){
+ if( pStruct && 0>=(--pStruct->nRef) ){
+ int i;
+ assert( pStruct->nRef==0 );
+ for(i=0; i<pStruct->nLevel; i++){
+ sqlite3_free(pStruct->aLevel[i].aSeg);
+ }
+ sqlite3_free(pStruct);
+ }
+}
+
+static void fts5StructureRef(Fts5Structure *pStruct){
+ pStruct->nRef++;
+}
+
+/*
+** Deserialize and return the structure record currently stored in serialized
+** form within buffer pData/nData.
+**
+** The Fts5Structure.aLevel[] and each Fts5StructureLevel.aSeg[] array
+** are over-allocated by one slot. This allows the structure contents
+** to be more easily edited.
+**
+** If an error occurs, *ppOut is set to NULL and an SQLite error code
+** returned. Otherwise, *ppOut is set to point to the new object and
+** SQLITE_OK returned.
+*/
+static int fts5StructureDecode(
+ const u8 *pData, /* Buffer containing serialized structure */
+ int nData, /* Size of buffer pData in bytes */
+ int *piCookie, /* Configuration cookie value */
+ Fts5Structure **ppOut /* OUT: Deserialized object */
+){
+ int rc = SQLITE_OK;
+ int i = 0;
+ int iLvl;
+ int nLevel = 0;
+ int nSegment = 0;
+ int nByte; /* Bytes of space to allocate at pRet */
+ Fts5Structure *pRet = 0; /* Structure object to return */
+
+ /* Grab the cookie value */
+ if( piCookie ) *piCookie = sqlite3Fts5Get32(pData);
+ i = 4;
+
+ /* Read the total number of levels and segments from the start of the
+ ** structure record. */
+ i += fts5GetVarint32(&pData[i], nLevel);
+ i += fts5GetVarint32(&pData[i], nSegment);
+ nByte = (
+ sizeof(Fts5Structure) + /* Main structure */
+ sizeof(Fts5StructureLevel) * (nLevel-1) /* aLevel[] array */
+ );
+ pRet = (Fts5Structure*)sqlite3Fts5MallocZero(&rc, nByte);
+
+ if( pRet ){
+ pRet->nRef = 1;
+ pRet->nLevel = nLevel;
+ pRet->nSegment = nSegment;
+ i += sqlite3Fts5GetVarint(&pData[i], &pRet->nWriteCounter);
+
+ for(iLvl=0; rc==SQLITE_OK && iLvl<nLevel; iLvl++){
+ Fts5StructureLevel *pLvl = &pRet->aLevel[iLvl];
+ int nTotal;
+ int iSeg;
+
+ i += fts5GetVarint32(&pData[i], pLvl->nMerge);
+ i += fts5GetVarint32(&pData[i], nTotal);
+ assert( nTotal>=pLvl->nMerge );
+ pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&rc,
+ nTotal * sizeof(Fts5StructureSegment)
+ );
+
+ if( rc==SQLITE_OK ){
+ pLvl->nSeg = nTotal;
+ for(iSeg=0; iSeg<nTotal; iSeg++){
+ i += fts5GetVarint32(&pData[i], pLvl->aSeg[iSeg].iSegid);
+ i += fts5GetVarint32(&pData[i], pLvl->aSeg[iSeg].pgnoFirst);
+ i += fts5GetVarint32(&pData[i], pLvl->aSeg[iSeg].pgnoLast);
+ }
+ }else{
+ fts5StructureRelease(pRet);
+ pRet = 0;
+ }
+ }
+ }
+
+ *ppOut = pRet;
+ return rc;
+}
+
+/*
+**
+*/
+static void fts5StructureAddLevel(int *pRc, Fts5Structure **ppStruct){
+ if( *pRc==SQLITE_OK ){
+ Fts5Structure *pStruct = *ppStruct;
+ int nLevel = pStruct->nLevel;
+ int nByte = (
+ sizeof(Fts5Structure) + /* Main structure */
+ sizeof(Fts5StructureLevel) * (nLevel+1) /* aLevel[] array */
+ );
+
+ pStruct = sqlite3_realloc(pStruct, nByte);
+ if( pStruct ){
+ memset(&pStruct->aLevel[nLevel], 0, sizeof(Fts5StructureLevel));
+ pStruct->nLevel++;
+ *ppStruct = pStruct;
+ }else{
+ *pRc = SQLITE_NOMEM;
+ }
+ }
+}
+
+/*
+** Extend level iLvl so that there is room for at least nExtra more
+** segments.
+*/
+static void fts5StructureExtendLevel(
+ int *pRc,
+ Fts5Structure *pStruct,
+ int iLvl,
+ int nExtra,
+ int bInsert
+){
+ if( *pRc==SQLITE_OK ){
+ Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];
+ Fts5StructureSegment *aNew;
+ int nByte;
+
+ nByte = (pLvl->nSeg + nExtra) * sizeof(Fts5StructureSegment);
+ aNew = sqlite3_realloc(pLvl->aSeg, nByte);
+ if( aNew ){
+ if( bInsert==0 ){
+ memset(&aNew[pLvl->nSeg], 0, sizeof(Fts5StructureSegment) * nExtra);
+ }else{
+ int nMove = pLvl->nSeg * sizeof(Fts5StructureSegment);
+ memmove(&aNew[nExtra], aNew, nMove);
+ memset(aNew, 0, sizeof(Fts5StructureSegment) * nExtra);
+ }
+ pLvl->aSeg = aNew;
+ }else{
+ *pRc = SQLITE_NOMEM;
+ }
+ }
+}
+
+/*
+** Read, deserialize and return the structure record.
+**
+** The Fts5Structure.aLevel[] and each Fts5StructureLevel.aSeg[] array
+** are over-allocated as described for function fts5StructureDecode()
+** above.
+**
+** If an error occurs, NULL is returned and an error code left in the
+** Fts5Index handle. If an error has already occurred when this function
+** is called, it is a no-op.
+*/
+static Fts5Structure *fts5StructureRead(Fts5Index *p){
+ Fts5Config *pConfig = p->pConfig;
+ Fts5Structure *pRet = 0; /* Object to return */
+ int iCookie; /* Configuration cookie */
+ Fts5Data *pData;
+
+ pData = fts5DataRead(p, FTS5_STRUCTURE_ROWID);
+ if( p->rc ) return 0;
+ /* TODO: Do we need this if the leaf-index is appended? Probably... */
+ memset(&pData->p[pData->nn], 0, FTS5_DATA_PADDING);
+ p->rc = fts5StructureDecode(pData->p, pData->nn, &iCookie, &pRet);
+ if( p->rc==SQLITE_OK && pConfig->iCookie!=iCookie ){
+ p->rc = sqlite3Fts5ConfigLoad(pConfig, iCookie);
+ }
+
+ fts5DataRelease(pData);
+ if( p->rc!=SQLITE_OK ){
+ fts5StructureRelease(pRet);
+ pRet = 0;
+ }
+ return pRet;
+}
+
+/*
+** Return the total number of segments in index structure pStruct. This
+** function is only ever used as part of assert() conditions.
+*/
+#ifdef SQLITE_DEBUG
+static int fts5StructureCountSegments(Fts5Structure *pStruct){
+ int nSegment = 0; /* Total number of segments */
+ if( pStruct ){
+ int iLvl; /* Used to iterate through levels */
+ for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){
+ nSegment += pStruct->aLevel[iLvl].nSeg;
+ }
+ }
+
+ return nSegment;
+}
+#endif
+
+/*
+** Serialize and store the "structure" record.
+**
+** If an error occurs, leave an error code in the Fts5Index object. If an
+** error has already occurred, this function is a no-op.
+*/
+static void fts5StructureWrite(Fts5Index *p, Fts5Structure *pStruct){
+ if( p->rc==SQLITE_OK ){
+ Fts5Buffer buf; /* Buffer to serialize record into */
+ int iLvl; /* Used to iterate through levels */
+ int iCookie; /* Cookie value to store */
+
+ assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) );
+ memset(&buf, 0, sizeof(Fts5Buffer));
+
+ /* Append the current configuration cookie */
+ iCookie = p->pConfig->iCookie;
+ if( iCookie<0 ) iCookie = 0;
+ fts5BufferAppend32(&p->rc, &buf, iCookie);
+
+ fts5BufferAppendVarint(&p->rc, &buf, pStruct->nLevel);
+ fts5BufferAppendVarint(&p->rc, &buf, pStruct->nSegment);
+ fts5BufferAppendVarint(&p->rc, &buf, (i64)pStruct->nWriteCounter);
+
+ for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){
+ int iSeg; /* Used to iterate through segments */
+ Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];
+ fts5BufferAppendVarint(&p->rc, &buf, pLvl->nMerge);
+ fts5BufferAppendVarint(&p->rc, &buf, pLvl->nSeg);
+ assert( pLvl->nMerge<=pLvl->nSeg );
+
+ for(iSeg=0; iSeg<pLvl->nSeg; iSeg++){
+ fts5BufferAppendVarint(&p->rc, &buf, pLvl->aSeg[iSeg].iSegid);
+ fts5BufferAppendVarint(&p->rc, &buf, pLvl->aSeg[iSeg].pgnoFirst);
+ fts5BufferAppendVarint(&p->rc, &buf, pLvl->aSeg[iSeg].pgnoLast);
+ }
+ }
+
+ fts5DataWrite(p, FTS5_STRUCTURE_ROWID, buf.p, buf.n);
+ fts5BufferFree(&buf);
+ }
+}
+
+#if 0
+static void fts5DebugStructure(int*,Fts5Buffer*,Fts5Structure*);
+static void fts5PrintStructure(const char *zCaption, Fts5Structure *pStruct){
+ int rc = SQLITE_OK;
+ Fts5Buffer buf;
+ memset(&buf, 0, sizeof(buf));
+ fts5DebugStructure(&rc, &buf, pStruct);
+ fprintf(stdout, "%s: %s\n", zCaption, buf.p);
+ fflush(stdout);
+ fts5BufferFree(&buf);
+}
+#else
+# define fts5PrintStructure(x,y)
+#endif
+
+static int fts5SegmentSize(Fts5StructureSegment *pSeg){
+ return 1 + pSeg->pgnoLast - pSeg->pgnoFirst;
+}
+
+/*
+** Return a copy of index structure pStruct. Except, promote as many
+** segments as possible to level iPromote. If an OOM occurs, NULL is
+** returned.
+*/
+static void fts5StructurePromoteTo(
+ Fts5Index *p,
+ int iPromote,
+ int szPromote,
+ Fts5Structure *pStruct
+){
+ int il, is;
+ Fts5StructureLevel *pOut = &pStruct->aLevel[iPromote];
+
+ if( pOut->nMerge==0 ){
+ for(il=iPromote+1; il<pStruct->nLevel; il++){
+ Fts5StructureLevel *pLvl = &pStruct->aLevel[il];
+ if( pLvl->nMerge ) return;
+ for(is=pLvl->nSeg-1; is>=0; is--){
+ int sz = fts5SegmentSize(&pLvl->aSeg[is]);
+ if( sz>szPromote ) return;
+ fts5StructureExtendLevel(&p->rc, pStruct, iPromote, 1, 1);
+ if( p->rc ) return;
+ memcpy(pOut->aSeg, &pLvl->aSeg[is], sizeof(Fts5StructureSegment));
+ pOut->nSeg++;
+ pLvl->nSeg--;
+ }
+ }
+ }
+}
+
+/*
+** A new segment has just been written to level iLvl of index structure
+** pStruct. This function determines if any segments should be promoted
+** as a result. Segments are promoted in two scenarios:
+**
+** a) If the segment just written is smaller than one or more segments
+** within the previous populated level, it is promoted to the previous
+** populated level.
+**
+** b) If the segment just written is larger than the newest segment on
+** the next populated level, then that segment, and any other adjacent
+** segments that are also smaller than the one just written, are
+** promoted.
+**
+** If one or more segments are promoted, the structure object is updated
+** to reflect this.
+*/
+static void fts5StructurePromote(
+ Fts5Index *p, /* FTS5 backend object */
+ int iLvl, /* Index level just updated */
+ Fts5Structure *pStruct /* Index structure */
+){
+ if( p->rc==SQLITE_OK ){
+ int iTst;
+ int iPromote = -1;
+ int szPromote = 0; /* Promote anything this size or smaller */
+ Fts5StructureSegment *pSeg; /* Segment just written */
+ int szSeg; /* Size of segment just written */
+ int nSeg = pStruct->aLevel[iLvl].nSeg;
+
+ if( nSeg==0 ) return;
+ pSeg = &pStruct->aLevel[iLvl].aSeg[pStruct->aLevel[iLvl].nSeg-1];
+ szSeg = (1 + pSeg->pgnoLast - pSeg->pgnoFirst);
+
+ /* Check for condition (a) */
+ for(iTst=iLvl-1; iTst>=0 && pStruct->aLevel[iTst].nSeg==0; iTst--);
+ if( iTst>=0 ){
+ int i;
+ int szMax = 0;
+ Fts5StructureLevel *pTst = &pStruct->aLevel[iTst];
+ assert( pTst->nMerge==0 );
+ for(i=0; i<pTst->nSeg; i++){
+ int sz = pTst->aSeg[i].pgnoLast - pTst->aSeg[i].pgnoFirst + 1;
+ if( sz>szMax ) szMax = sz;
+ }
+ if( szMax>=szSeg ){
+ /* Condition (a) is true. Promote the newest segment on level
+ ** iLvl to level iTst. */
+ iPromote = iTst;
+ szPromote = szMax;
+ }
+ }
+
+ /* If condition (a) is not met, assume (b) is true. StructurePromoteTo()
+ ** is a no-op if it is not. */
+ if( iPromote<0 ){
+ iPromote = iLvl;
+ szPromote = szSeg;
+ }
+ fts5StructurePromoteTo(p, iPromote, szPromote, pStruct);
+ }
+}
+
+
+/*
+** Advance the iterator passed as the only argument. If the end of the
+** doclist-index page is reached, return non-zero.
+*/
+static int fts5DlidxLvlNext(Fts5DlidxLvl *pLvl){
+ Fts5Data *pData = pLvl->pData;
+
+ if( pLvl->iOff==0 ){
+ assert( pLvl->bEof==0 );
+ pLvl->iOff = 1;
+ pLvl->iOff += fts5GetVarint32(&pData->p[1], pLvl->iLeafPgno);
+ pLvl->iOff += fts5GetVarint(&pData->p[pLvl->iOff], (u64*)&pLvl->iRowid);
+ pLvl->iFirstOff = pLvl->iOff;
+ }else{
+ int iOff;
+ for(iOff=pLvl->iOff; iOff<pData->nn; iOff++){
+ if( pData->p[iOff] ) break;
+ }
+
+ if( iOff<pData->nn ){
+ i64 iVal;
+ pLvl->iLeafPgno += (iOff - pLvl->iOff) + 1;
+ iOff += fts5GetVarint(&pData->p[iOff], (u64*)&iVal);
+ pLvl->iRowid += iVal;
+ pLvl->iOff = iOff;
+ }else{
+ pLvl->bEof = 1;
+ }
+ }
+
+ return pLvl->bEof;
+}
+
+/*
+** Advance the iterator passed as the only argument.
+*/
+static int fts5DlidxIterNextR(Fts5Index *p, Fts5DlidxIter *pIter, int iLvl){
+ Fts5DlidxLvl *pLvl = &pIter->aLvl[iLvl];
+
+ assert( iLvl<pIter->nLvl );
+ if( fts5DlidxLvlNext(pLvl) ){
+ if( (iLvl+1) < pIter->nLvl ){
+ fts5DlidxIterNextR(p, pIter, iLvl+1);
+ if( pLvl[1].bEof==0 ){
+ fts5DataRelease(pLvl->pData);
+ memset(pLvl, 0, sizeof(Fts5DlidxLvl));
+ pLvl->pData = fts5DataRead(p,
+ FTS5_DLIDX_ROWID(pIter->iSegid, iLvl, pLvl[1].iLeafPgno)
+ );
+ if( pLvl->pData ) fts5DlidxLvlNext(pLvl);
+ }
+ }
+ }
+
+ return pIter->aLvl[0].bEof;
+}
+static int fts5DlidxIterNext(Fts5Index *p, Fts5DlidxIter *pIter){
+ return fts5DlidxIterNextR(p, pIter, 0);
+}
+
+/*
+** The iterator passed as the first argument has the following fields set
+** as follows. This function sets up the rest of the iterator so that it
+** points to the first rowid in the doclist-index.
+**
+** pData:
+** pointer to doclist-index record,
+**
+** When this function is called pIter->iLeafPgno is the page number the
+** doclist is associated with (the one featuring the term).
+*/
+static int fts5DlidxIterFirst(Fts5DlidxIter *pIter){
+ int i;
+ for(i=0; i<pIter->nLvl; i++){
+ fts5DlidxLvlNext(&pIter->aLvl[i]);
+ }
+ return pIter->aLvl[0].bEof;
+}
+
+
+static int fts5DlidxIterEof(Fts5Index *p, Fts5DlidxIter *pIter){
+ return p->rc!=SQLITE_OK || pIter->aLvl[0].bEof;
+}
+
+static void fts5DlidxIterLast(Fts5Index *p, Fts5DlidxIter *pIter){
+ int i;
+
+ /* Advance each level to the last entry on the last page */
+ for(i=pIter->nLvl-1; p->rc==SQLITE_OK && i>=0; i--){
+ Fts5DlidxLvl *pLvl = &pIter->aLvl[i];
+ while( fts5DlidxLvlNext(pLvl)==0 );
+ pLvl->bEof = 0;
+
+ if( i>0 ){
+ Fts5DlidxLvl *pChild = &pLvl[-1];
+ fts5DataRelease(pChild->pData);
+ memset(pChild, 0, sizeof(Fts5DlidxLvl));
+ pChild->pData = fts5DataRead(p,
+ FTS5_DLIDX_ROWID(pIter->iSegid, i-1, pLvl->iLeafPgno)
+ );
+ }
+ }
+}
+
+/*
+** Move the iterator passed as the only argument to the previous entry.
+*/
+static int fts5DlidxLvlPrev(Fts5DlidxLvl *pLvl){
+ int iOff = pLvl->iOff;
+
+ assert( pLvl->bEof==0 );
+ if( iOff<=pLvl->iFirstOff ){
+ pLvl->bEof = 1;
+ }else{
+ u8 *a = pLvl->pData->p;
+ i64 iVal;
+ int iLimit;
+ int ii;
+ int nZero = 0;
+
+ /* Currently iOff points to the first byte of a varint. This block
+ ** decrements iOff until it points to the first byte of the previous
+ ** varint. Taking care not to read any memory locations that occur
+ ** before the buffer in memory. */
+ iLimit = (iOff>9 ? iOff-9 : 0);
+ for(iOff--; iOff>iLimit; iOff--){
+ if( (a[iOff-1] & 0x80)==0 ) break;
+ }
+
+ fts5GetVarint(&a[iOff], (u64*)&iVal);
+ pLvl->iRowid -= iVal;
+ pLvl->iLeafPgno--;
+
+ /* Skip backwards past any 0x00 varints. */
+ for(ii=iOff-1; ii>=pLvl->iFirstOff && a[ii]==0x00; ii--){
+ nZero++;
+ }
+ if( ii>=pLvl->iFirstOff && (a[ii] & 0x80) ){
+ /* The byte immediately before the last 0x00 byte has the 0x80 bit
+ ** set. So the last 0x00 is only a varint 0 if there are 8 more 0x80
+ ** bytes before a[ii]. */
+ int bZero = 0; /* True if last 0x00 counts */
+ if( (ii-8)>=pLvl->iFirstOff ){
+ int j;
+ for(j=1; j<=8 && (a[ii-j] & 0x80); j++);
+ bZero = (j>8);
+ }
+ if( bZero==0 ) nZero--;
+ }
+ pLvl->iLeafPgno -= nZero;
+ pLvl->iOff = iOff - nZero;
+ }
+
+ return pLvl->bEof;
+}
+
+static int fts5DlidxIterPrevR(Fts5Index *p, Fts5DlidxIter *pIter, int iLvl){
+ Fts5DlidxLvl *pLvl = &pIter->aLvl[iLvl];
+
+ assert( iLvl<pIter->nLvl );
+ if( fts5DlidxLvlPrev(pLvl) ){
+ if( (iLvl+1) < pIter->nLvl ){
+ fts5DlidxIterPrevR(p, pIter, iLvl+1);
+ if( pLvl[1].bEof==0 ){
+ fts5DataRelease(pLvl->pData);
+ memset(pLvl, 0, sizeof(Fts5DlidxLvl));
+ pLvl->pData = fts5DataRead(p,
+ FTS5_DLIDX_ROWID(pIter->iSegid, iLvl, pLvl[1].iLeafPgno)
+ );
+ if( pLvl->pData ){
+ while( fts5DlidxLvlNext(pLvl)==0 );
+ pLvl->bEof = 0;
+ }
+ }
+ }
+ }
+
+ return pIter->aLvl[0].bEof;
+}
+static int fts5DlidxIterPrev(Fts5Index *p, Fts5DlidxIter *pIter){
+ return fts5DlidxIterPrevR(p, pIter, 0);
+}
+
+/*
+** Free a doclist-index iterator object allocated by fts5DlidxIterInit().
+*/
+static void fts5DlidxIterFree(Fts5DlidxIter *pIter){
+ if( pIter ){
+ int i;
+ for(i=0; i<pIter->nLvl; i++){
+ fts5DataRelease(pIter->aLvl[i].pData);
+ }
+ sqlite3_free(pIter);
+ }
+}
+
+static Fts5DlidxIter *fts5DlidxIterInit(
+ Fts5Index *p, /* Fts5 Backend to iterate within */
+ int bRev, /* True for ORDER BY ASC */
+ int iSegid, /* Segment id */
+ int iLeafPg /* Leaf page number to load dlidx for */
+){
+ Fts5DlidxIter *pIter = 0;
+ int i;
+ int bDone = 0;
+
+ for(i=0; p->rc==SQLITE_OK && bDone==0; i++){
+ int nByte = sizeof(Fts5DlidxIter) + i * sizeof(Fts5DlidxLvl);
+ Fts5DlidxIter *pNew;
+
+ pNew = (Fts5DlidxIter*)sqlite3_realloc(pIter, nByte);
+ if( pNew==0 ){
+ p->rc = SQLITE_NOMEM;
+ }else{
+ i64 iRowid = FTS5_DLIDX_ROWID(iSegid, i, iLeafPg);
+ Fts5DlidxLvl *pLvl = &pNew->aLvl[i];
+ pIter = pNew;
+ memset(pLvl, 0, sizeof(Fts5DlidxLvl));
+ pLvl->pData = fts5DataRead(p, iRowid);
+ if( pLvl->pData && (pLvl->pData->p[0] & 0x0001)==0 ){
+ bDone = 1;
+ }
+ pIter->nLvl = i+1;
+ }
+ }
+
+ if( p->rc==SQLITE_OK ){
+ pIter->iSegid = iSegid;
+ if( bRev==0 ){
+ fts5DlidxIterFirst(pIter);
+ }else{
+ fts5DlidxIterLast(p, pIter);
+ }
+ }
+
+ if( p->rc!=SQLITE_OK ){
+ fts5DlidxIterFree(pIter);
+ pIter = 0;
+ }
+
+ return pIter;
+}
+
+static i64 fts5DlidxIterRowid(Fts5DlidxIter *pIter){
+ return pIter->aLvl[0].iRowid;
+}
+static int fts5DlidxIterPgno(Fts5DlidxIter *pIter){
+ return pIter->aLvl[0].iLeafPgno;
+}
+
+/*
+** Load the next leaf page into the segment iterator.
+*/
+static void fts5SegIterNextPage(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5SegIter *pIter /* Iterator to advance to next page */
+){
+ Fts5Data *pLeaf;
+ Fts5StructureSegment *pSeg = pIter->pSeg;
+ fts5DataRelease(pIter->pLeaf);
+ pIter->iLeafPgno++;
+ if( pIter->pNextLeaf ){
+ pIter->pLeaf = pIter->pNextLeaf;
+ pIter->pNextLeaf = 0;
+ }else if( pIter->iLeafPgno<=pSeg->pgnoLast ){
+ pIter->pLeaf = fts5DataRead(p,
+ FTS5_SEGMENT_ROWID(pSeg->iSegid, pIter->iLeafPgno)
+ );
+ }else{
+ pIter->pLeaf = 0;
+ }
+ pLeaf = pIter->pLeaf;
+
+ if( pLeaf ){
+ pIter->iPgidxOff = pLeaf->szLeaf;
+ if( fts5LeafIsTermless(pLeaf) ){
+ pIter->iEndofDoclist = pLeaf->nn+1;
+ }else{
+ pIter->iPgidxOff += fts5GetVarint32(&pLeaf->p[pIter->iPgidxOff],
+ pIter->iEndofDoclist
+ );
+ }
+ }
+}
+
+/*
+** Argument p points to a buffer containing a varint to be interpreted as a
+** position list size field. Read the varint and return the number of bytes
+** read. Before returning, set *pnSz to the number of bytes in the position
+** list, and *pbDel to true if the delete flag is set, or false otherwise.
+*/
+static int fts5GetPoslistSize(const u8 *p, int *pnSz, int *pbDel){
+ int nSz;
+ int n = 0;
+ fts5FastGetVarint32(p, n, nSz);
+ assert_nc( nSz>=0 );
+ *pnSz = nSz/2;
+ *pbDel = nSz & 0x0001;
+ return n;
+}
+
+/*
+** Fts5SegIter.iLeafOffset currently points to the first byte of a
+** position-list size field. Read the value of the field and store it
+** in the following variables:
+**
+** Fts5SegIter.nPos
+** Fts5SegIter.bDel
+**
+** Leave Fts5SegIter.iLeafOffset pointing to the first byte of the
+** position list content (if any).
+*/
+static void fts5SegIterLoadNPos(Fts5Index *p, Fts5SegIter *pIter){
+ if( p->rc==SQLITE_OK ){
+ int iOff = pIter->iLeafOffset; /* Offset to read at */
+ int nSz;
+ ASSERT_SZLEAF_OK(pIter->pLeaf);
+ fts5FastGetVarint32(pIter->pLeaf->p, iOff, nSz);
+ pIter->bDel = (nSz & 0x0001);
+ pIter->nPos = nSz>>1;
+ pIter->iLeafOffset = iOff;
+ }
+}
+
+static void fts5SegIterLoadRowid(Fts5Index *p, Fts5SegIter *pIter){
+ u8 *a = pIter->pLeaf->p; /* Buffer to read data from */
+ int iOff = pIter->iLeafOffset;
+
+ ASSERT_SZLEAF_OK(pIter->pLeaf);
+ if( iOff>=pIter->pLeaf->szLeaf ){
+ fts5SegIterNextPage(p, pIter);
+ if( pIter->pLeaf==0 ){
+ if( p->rc==SQLITE_OK ) p->rc = FTS5_CORRUPT;
+ return;
+ }
+ iOff = 4;
+ a = pIter->pLeaf->p;
+ }
+ iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);
+ pIter->iLeafOffset = iOff;
+}
+
+/*
+** Fts5SegIter.iLeafOffset currently points to the first byte of the
+** "nSuffix" field of a term. Function parameter nKeep contains the value
+** of the "nPrefix" field (if there was one - it is passed 0 if this is
+** the first term in the segment).
+**
+** This function populates:
+**
+** Fts5SegIter.term
+** Fts5SegIter.rowid
+**
+** accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of
+** the first position list. The position list belonging to document
+** (Fts5SegIter.iRowid).
+*/
+static void fts5SegIterLoadTerm(Fts5Index *p, Fts5SegIter *pIter, int nKeep){
+ u8 *a = pIter->pLeaf->p; /* Buffer to read data from */
+ int iOff = pIter->iLeafOffset; /* Offset to read at */
+ int nNew; /* Bytes of new data */
+
+ iOff += fts5GetVarint32(&a[iOff], nNew);
+ pIter->term.n = nKeep;
+ fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
+ iOff += nNew;
+ pIter->iTermLeafOffset = iOff;
+ pIter->iTermLeafPgno = pIter->iLeafPgno;
+ pIter->iLeafOffset = iOff;
+
+ if( pIter->iPgidxOff>=pIter->pLeaf->nn ){
+ pIter->iEndofDoclist = pIter->pLeaf->nn+1;
+ }else{
+ int nExtra;
+ pIter->iPgidxOff += fts5GetVarint32(&a[pIter->iPgidxOff], nExtra);
+ pIter->iEndofDoclist += nExtra;
+ }
+
+ fts5SegIterLoadRowid(p, pIter);
+}
+
+/*
+** Initialize the iterator object pIter to iterate through the entries in
+** segment pSeg. The iterator is left pointing to the first entry when
+** this function returns.
+**
+** If an error occurs, Fts5Index.rc is set to an appropriate error code. If
+** an error has already occurred when this function is called, it is a no-op.
+*/
+static void fts5SegIterInit(
+ Fts5Index *p, /* FTS index object */
+ Fts5StructureSegment *pSeg, /* Description of segment */
+ Fts5SegIter *pIter /* Object to populate */
+){
+ if( pSeg->pgnoFirst==0 ){
+ /* This happens if the segment is being used as an input to an incremental
+ ** merge and all data has already been "trimmed". See function
+ ** fts5TrimSegments() for details. In this case leave the iterator empty.
+ ** The caller will see the (pIter->pLeaf==0) and assume the iterator is
+ ** at EOF already. */
+ assert( pIter->pLeaf==0 );
+ return;
+ }
+
+ if( p->rc==SQLITE_OK ){
+ memset(pIter, 0, sizeof(*pIter));
+ pIter->pSeg = pSeg;
+ pIter->iLeafPgno = pSeg->pgnoFirst-1;
+ fts5SegIterNextPage(p, pIter);
+ }
+
+ if( p->rc==SQLITE_OK ){
+ pIter->iLeafOffset = 4;
+ assert_nc( pIter->pLeaf->nn>4 );
+ assert( fts5LeafFirstTermOff(pIter->pLeaf)==4 );
+ pIter->iPgidxOff = pIter->pLeaf->szLeaf+1;
+ fts5SegIterLoadTerm(p, pIter, 0);
+ fts5SegIterLoadNPos(p, pIter);
+ }
+}
+
+/*
+** This function is only ever called on iterators created by calls to
+** Fts5IndexQuery() with the FTS5INDEX_QUERY_DESC flag set.
+**
+** The iterator is in an unusual state when this function is called: the
+** Fts5SegIter.iLeafOffset variable is set to the offset of the start of
+** the position-list size field for the first relevant rowid on the page.
+** Fts5SegIter.rowid is set, but nPos and bDel are not.
+**
+** This function advances the iterator so that it points to the last
+** relevant rowid on the page and, if necessary, initializes the
+** aRowidOffset[] and iRowidOffset variables. At this point the iterator
+** is in its regular state - Fts5SegIter.iLeafOffset points to the first
+** byte of the position list content associated with said rowid.
+*/
+static void fts5SegIterReverseInitPage(Fts5Index *p, Fts5SegIter *pIter){
+ int n = pIter->pLeaf->szLeaf;
+ int i = pIter->iLeafOffset;
+ u8 *a = pIter->pLeaf->p;
+ int iRowidOffset = 0;
+
+ if( n>pIter->iEndofDoclist ){
+ n = pIter->iEndofDoclist;
+ }
+
+ ASSERT_SZLEAF_OK(pIter->pLeaf);
+ while( 1 ){
+ i64 iDelta = 0;
+ int nPos;
+ int bDummy;
+
+ i += fts5GetPoslistSize(&a[i], &nPos, &bDummy);
+ i += nPos;
+ if( i>=n ) break;
+ i += fts5GetVarint(&a[i], (u64*)&iDelta);
+ pIter->iRowid += iDelta;
+
+ if( iRowidOffset>=pIter->nRowidOffset ){
+ int nNew = pIter->nRowidOffset + 8;
+ int *aNew = (int*)sqlite3_realloc(pIter->aRowidOffset, nNew*sizeof(int));
+ if( aNew==0 ){
+ p->rc = SQLITE_NOMEM;
+ break;
+ }
+ pIter->aRowidOffset = aNew;
+ pIter->nRowidOffset = nNew;
+ }
+
+ pIter->aRowidOffset[iRowidOffset++] = pIter->iLeafOffset;
+ pIter->iLeafOffset = i;
+ }
+ pIter->iRowidOffset = iRowidOffset;
+ fts5SegIterLoadNPos(p, pIter);
+}
+
+/*
+**
+*/
+static void fts5SegIterReverseNewPage(Fts5Index *p, Fts5SegIter *pIter){
+ assert( pIter->flags & FTS5_SEGITER_REVERSE );
+ assert( pIter->flags & FTS5_SEGITER_ONETERM );
+
+ fts5DataRelease(pIter->pLeaf);
+ pIter->pLeaf = 0;
+ while( p->rc==SQLITE_OK && pIter->iLeafPgno>pIter->iTermLeafPgno ){
+ Fts5Data *pNew;
+ pIter->iLeafPgno--;
+ pNew = fts5DataRead(p, FTS5_SEGMENT_ROWID(
+ pIter->pSeg->iSegid, pIter->iLeafPgno
+ ));
+ if( pNew ){
+ /* iTermLeafOffset may be equal to szLeaf if the term is the last
+ ** thing on the page - i.e. the first rowid is on the following page.
+ ** In this case leaf pIter->pLeaf==0, this iterator is at EOF. */
+ if( pIter->iLeafPgno==pIter->iTermLeafPgno
+ && pIter->iTermLeafOffset<pNew->szLeaf
+ ){
+ pIter->pLeaf = pNew;
+ pIter->iLeafOffset = pIter->iTermLeafOffset;
+ }else{
+ int iRowidOff;
+ iRowidOff = fts5LeafFirstRowidOff(pNew);
+ if( iRowidOff ){
+ pIter->pLeaf = pNew;
+ pIter->iLeafOffset = iRowidOff;
+ }
+ }
+
+ if( pIter->pLeaf ){
+ u8 *a = &pIter->pLeaf->p[pIter->iLeafOffset];
+ pIter->iLeafOffset += fts5GetVarint(a, (u64*)&pIter->iRowid);
+ break;
+ }else{
+ fts5DataRelease(pNew);
+ }
+ }
+ }
+
+ if( pIter->pLeaf ){
+ pIter->iEndofDoclist = pIter->pLeaf->nn+1;
+ fts5SegIterReverseInitPage(p, pIter);
+ }
+}
+
+/*
+** Return true if the iterator passed as the second argument currently
+** points to a delete marker. A delete marker is an entry with a 0 byte
+** position-list.
+*/
+static int fts5MultiIterIsEmpty(Fts5Index *p, Fts5IndexIter *pIter){
+ Fts5SegIter *pSeg = &pIter->aSeg[pIter->aFirst[1].iFirst];
+ return (p->rc==SQLITE_OK && pSeg->pLeaf && pSeg->nPos==0);
+}
+
+/*
+** Advance iterator pIter to the next entry.
+**
+** If an error occurs, Fts5Index.rc is set to an appropriate error code. It
+** is not considered an error if the iterator reaches EOF. If an error has
+** already occurred when this function is called, it is a no-op.
+*/
+static void fts5SegIterNext(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5SegIter *pIter, /* Iterator to advance */
+ int *pbNewTerm /* OUT: Set for new term */
+){
+ assert( pbNewTerm==0 || *pbNewTerm==0 );
+ if( p->rc==SQLITE_OK ){
+ if( pIter->flags & FTS5_SEGITER_REVERSE ){
+ assert( pIter->pNextLeaf==0 );
+ if( pIter->iRowidOffset>0 ){
+ u8 *a = pIter->pLeaf->p;
+ int iOff;
+ int nPos;
+ int bDummy;
+ i64 iDelta;
+
+ pIter->iRowidOffset--;
+ pIter->iLeafOffset = iOff = pIter->aRowidOffset[pIter->iRowidOffset];
+ iOff += fts5GetPoslistSize(&a[iOff], &nPos, &bDummy);
+ iOff += nPos;
+ fts5GetVarint(&a[iOff], (u64*)&iDelta);
+ pIter->iRowid -= iDelta;
+ fts5SegIterLoadNPos(p, pIter);
+ }else{
+ fts5SegIterReverseNewPage(p, pIter);
+ }
+ }else{
+ Fts5Data *pLeaf = pIter->pLeaf;
+ int iOff;
+ int bNewTerm = 0;
+ int nKeep = 0;
+
+ /* Search for the end of the position list within the current page. */
+ u8 *a = pLeaf->p;
+ int n = pLeaf->szLeaf;
+
+ ASSERT_SZLEAF_OK(pLeaf);
+ iOff = pIter->iLeafOffset + pIter->nPos;
+
+ if( iOff<n ){
+ /* The next entry is on the current page. */
+ assert_nc( iOff<=pIter->iEndofDoclist );
+ if( iOff>=pIter->iEndofDoclist ){
+ bNewTerm = 1;
+ if( iOff!=fts5LeafFirstTermOff(pLeaf) ){
+ iOff += fts5GetVarint32(&a[iOff], nKeep);
+ }
+ }else{
+ u64 iDelta;
+ iOff += sqlite3Fts5GetVarint(&a[iOff], &iDelta);
+ pIter->iRowid += iDelta;
+ assert_nc( iDelta>0 );
+ }
+ pIter->iLeafOffset = iOff;
+
+ }else if( pIter->pSeg==0 ){
+ const u8 *pList = 0;
+ const char *zTerm = 0;
+ int nList = 0;
+ if( 0==(pIter->flags & FTS5_SEGITER_ONETERM) ){
+ sqlite3Fts5HashScanNext(p->pHash);
+ sqlite3Fts5HashScanEntry(p->pHash, &zTerm, &pList, &nList);
+ }
+ if( pList==0 ){
+ fts5DataRelease(pIter->pLeaf);
+ pIter->pLeaf = 0;
+ }else{
+ pIter->pLeaf->p = (u8*)pList;
+ pIter->pLeaf->nn = nList;
+ pIter->pLeaf->szLeaf = nList;
+ pIter->iEndofDoclist = nList+1;
+ sqlite3Fts5BufferSet(&p->rc, &pIter->term, strlen(zTerm), (u8*)zTerm);
+ pIter->iLeafOffset = fts5GetVarint(pList, (u64*)&pIter->iRowid);
+ if( pbNewTerm ) *pbNewTerm = 1;
+ }
+ }else{
+ iOff = 0;
+ /* Next entry is not on the current page */
+ while( iOff==0 ){
+ fts5SegIterNextPage(p, pIter);
+ pLeaf = pIter->pLeaf;
+ if( pLeaf==0 ) break;
+ ASSERT_SZLEAF_OK(pLeaf);
+ if( (iOff = fts5LeafFirstRowidOff(pLeaf)) && iOff<pLeaf->szLeaf ){
+ iOff += sqlite3Fts5GetVarint(&pLeaf->p[iOff], (u64*)&pIter->iRowid);
+ pIter->iLeafOffset = iOff;
+
+ if( pLeaf->nn>pLeaf->szLeaf ){
+ pIter->iPgidxOff = pLeaf->szLeaf + fts5GetVarint32(
+ &pLeaf->p[pLeaf->szLeaf], pIter->iEndofDoclist
+ );
+ }
+
+ }
+ else if( pLeaf->nn>pLeaf->szLeaf ){
+ pIter->iPgidxOff = pLeaf->szLeaf + fts5GetVarint32(
+ &pLeaf->p[pLeaf->szLeaf], iOff
+ );
+ pIter->iLeafOffset = iOff;
+ pIter->iEndofDoclist = iOff;
+ bNewTerm = 1;
+ }
+ if( iOff>=pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ return;
+ }
+ }
+ }
+
+ /* Check if the iterator is now at EOF. If so, return early. */
+ if( pIter->pLeaf ){
+ if( bNewTerm ){
+ if( pIter->flags & FTS5_SEGITER_ONETERM ){
+ fts5DataRelease(pIter->pLeaf);
+ pIter->pLeaf = 0;
+ }else{
+ fts5SegIterLoadTerm(p, pIter, nKeep);
+ fts5SegIterLoadNPos(p, pIter);
+ if( pbNewTerm ) *pbNewTerm = 1;
+ }
+ }else{
+ fts5SegIterLoadNPos(p, pIter);
+ }
+ }
+ }
+ }
+}
+
+#define SWAPVAL(T, a, b) { T tmp; tmp=a; a=b; b=tmp; }
+
+/*
+** Iterator pIter currently points to the first rowid in a doclist. This
+** function sets the iterator up so that iterates in reverse order through
+** the doclist.
+*/
+static void fts5SegIterReverse(Fts5Index *p, Fts5SegIter *pIter){
+ Fts5DlidxIter *pDlidx = pIter->pDlidx;
+ Fts5Data *pLast = 0;
+ int pgnoLast = 0;
+
+ if( pDlidx ){
+ int iSegid = pIter->pSeg->iSegid;
+ pgnoLast = fts5DlidxIterPgno(pDlidx);
+ pLast = fts5DataRead(p, FTS5_SEGMENT_ROWID(iSegid, pgnoLast));
+ }else{
+ Fts5Data *pLeaf = pIter->pLeaf; /* Current leaf data */
+
+ /* Currently, Fts5SegIter.iLeafOffset points to the first byte of
+ ** position-list content for the current rowid. Back it up so that it
+ ** points to the start of the position-list size field. */
+ pIter->iLeafOffset -= sqlite3Fts5GetVarintLen(pIter->nPos*2+pIter->bDel);
+
+ /* If this condition is true then the largest rowid for the current
+ ** term may not be stored on the current page. So search forward to
+ ** see where said rowid really is. */
+ if( pIter->iEndofDoclist>=pLeaf->szLeaf ){
+ int pgno;
+ Fts5StructureSegment *pSeg = pIter->pSeg;
+
+ /* The last rowid in the doclist may not be on the current page. Search
+ ** forward to find the page containing the last rowid. */
+ for(pgno=pIter->iLeafPgno+1; !p->rc && pgno<=pSeg->pgnoLast; pgno++){
+ i64 iAbs = FTS5_SEGMENT_ROWID(pSeg->iSegid, pgno);
+ Fts5Data *pNew = fts5DataRead(p, iAbs);
+ if( pNew ){
+ int iRowid, bTermless;
+ iRowid = fts5LeafFirstRowidOff(pNew);
+ bTermless = fts5LeafIsTermless(pNew);
+ if( iRowid ){
+ SWAPVAL(Fts5Data*, pNew, pLast);
+ pgnoLast = pgno;
+ }
+ fts5DataRelease(pNew);
+ if( bTermless==0 ) break;
+ }
+ }
+ }
+ }
+
+ /* If pLast is NULL at this point, then the last rowid for this doclist
+ ** lies on the page currently indicated by the iterator. In this case
+ ** pIter->iLeafOffset is already set to point to the position-list size
+ ** field associated with the first relevant rowid on the page.
+ **
+ ** Or, if pLast is non-NULL, then it is the page that contains the last
+ ** rowid. In this case configure the iterator so that it points to the
+ ** first rowid on this page.
+ */
+ if( pLast ){
+ int iOff;
+ fts5DataRelease(pIter->pLeaf);
+ pIter->pLeaf = pLast;
+ pIter->iLeafPgno = pgnoLast;
+ iOff = fts5LeafFirstRowidOff(pLast);
+ iOff += fts5GetVarint(&pLast->p[iOff], (u64*)&pIter->iRowid);
+ pIter->iLeafOffset = iOff;
+
+ if( fts5LeafIsTermless(pLast) ){
+ pIter->iEndofDoclist = pLast->nn+1;
+ }else{
+ pIter->iEndofDoclist = fts5LeafFirstTermOff(pLast);
+ }
+
+ }
+
+ fts5SegIterReverseInitPage(p, pIter);
+}
+
+/*
+** Iterator pIter currently points to the first rowid of a doclist.
+** There is a doclist-index associated with the final term on the current
+** page. If the current term is the last term on the page, load the
+** doclist-index from disk and initialize an iterator at (pIter->pDlidx).
+*/
+static void fts5SegIterLoadDlidx(Fts5Index *p, Fts5SegIter *pIter){
+ int iSeg = pIter->pSeg->iSegid;
+ int bRev = (pIter->flags & FTS5_SEGITER_REVERSE);
+ Fts5Data *pLeaf = pIter->pLeaf; /* Current leaf data */
+
+ assert( pIter->flags & FTS5_SEGITER_ONETERM );
+ assert( pIter->pDlidx==0 );
+
+ /* Check if the current doclist ends on this page. If it does, return
+ ** early without loading the doclist-index (as it belongs to a different
+ ** term. */
+ if( pIter->iTermLeafPgno==pIter->iLeafPgno
+ && pIter->iEndofDoclist<pLeaf->szLeaf
+ ){
+ return;
+ }
+
+ pIter->pDlidx = fts5DlidxIterInit(p, bRev, iSeg, pIter->iTermLeafPgno);
+}
+
+#define fts5IndexSkipVarint(a, iOff) { \
+ int iEnd = iOff+9; \
+ while( (a[iOff++] & 0x80) && iOff<iEnd ); \
+}
+
+/*
+** The iterator object passed as the second argument currently contains
+** no valid values except for the Fts5SegIter.pLeaf member variable. This
+** function searches the leaf page for a term matching (pTerm/nTerm).
+**
+** If the specified term is found on the page, then the iterator is left
+** pointing to it. If argument bGe is zero and the term is not found,
+** the iterator is left pointing at EOF.
+**
+** If bGe is non-zero and the specified term is not found, then the
+** iterator is left pointing to the smallest term in the segment that
+** is larger than the specified term, even if this term is not on the
+** current page.
+*/
+static void fts5LeafSeek(
+ Fts5Index *p, /* Leave any error code here */
+ int bGe, /* True for a >= search */
+ Fts5SegIter *pIter, /* Iterator to seek */
+ const u8 *pTerm, int nTerm /* Term to search for */
+){
+ int iOff;
+ const u8 *a = pIter->pLeaf->p;
+ int szLeaf = pIter->pLeaf->szLeaf;
+ int n = pIter->pLeaf->nn;
+
+ int nMatch = 0;
+ int nKeep = 0;
+ int nNew = 0;
+ int iTermOff;
+ int iPgidx; /* Current offset in pgidx */
+ int bEndOfPage = 0;
+
+ assert( p->rc==SQLITE_OK );
+
+ iPgidx = szLeaf;
+ iPgidx += fts5GetVarint32(&a[iPgidx], iTermOff);
+ iOff = iTermOff;
+
+ while( 1 ){
+
+ /* Figure out how many new bytes are in this term */
+ fts5FastGetVarint32(a, iOff, nNew);
+ if( nKeep<nMatch ){
+ goto search_failed;
+ }
+
+ assert( nKeep>=nMatch );
+ if( nKeep==nMatch ){
+ int nCmp;
+ int i;
+ nCmp = MIN(nNew, nTerm-nMatch);
+ for(i=0; i<nCmp; i++){
+ if( a[iOff+i]!=pTerm[nMatch+i] ) break;
+ }
+ nMatch += i;
+
+ if( nTerm==nMatch ){
+ if( i==nNew ){
+ goto search_success;
+ }else{
+ goto search_failed;
+ }
+ }else if( i<nNew && a[iOff+i]>pTerm[nMatch] ){
+ goto search_failed;
+ }
+ }
+
+ if( iPgidx>=n ){
+ bEndOfPage = 1;
+ break;
+ }
+
+ iPgidx += fts5GetVarint32(&a[iPgidx], nKeep);
+ iTermOff += nKeep;
+ iOff = iTermOff;
+
+ /* Read the nKeep field of the next term. */
+ fts5FastGetVarint32(a, iOff, nKeep);
+ }
+
+ search_failed:
+ if( bGe==0 ){
+ fts5DataRelease(pIter->pLeaf);
+ pIter->pLeaf = 0;
+ return;
+ }else if( bEndOfPage ){
+ do {
+ fts5SegIterNextPage(p, pIter);
+ if( pIter->pLeaf==0 ) return;
+ a = pIter->pLeaf->p;
+ if( fts5LeafIsTermless(pIter->pLeaf)==0 ){
+ fts5GetVarint32(&pIter->pLeaf->p[pIter->pLeaf->szLeaf], iOff);
+ if( iOff<4 || iOff>=pIter->pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ nKeep = 0;
+ iOff += fts5GetVarint32(&a[iOff], nNew);
+ break;
+ }
+ }
+ }while( 1 );
+ }
+
+ search_success:
+
+ pIter->iLeafOffset = iOff + nNew;
+ pIter->iTermLeafOffset = pIter->iLeafOffset;
+ pIter->iTermLeafPgno = pIter->iLeafPgno;
+
+ fts5BufferSet(&p->rc, &pIter->term, nKeep, pTerm);
+ fts5BufferAppendBlob(&p->rc, &pIter->term, nNew, &a[iOff]);
+
+ if( iPgidx>=n ){
+ pIter->iEndofDoclist = pIter->pLeaf->nn+1;
+ }else{
+ int nExtra;
+ iPgidx += fts5GetVarint32(&a[iPgidx], nExtra);
+ pIter->iEndofDoclist = iTermOff + nExtra;
+ }
+ pIter->iPgidxOff = iPgidx;
+
+ fts5SegIterLoadRowid(p, pIter);
+ fts5SegIterLoadNPos(p, pIter);
+}
+
+/*
+** Initialize the object pIter to point to term pTerm/nTerm within segment
+** pSeg. If there is no such term in the index, the iterator is set to EOF.
+**
+** If an error occurs, Fts5Index.rc is set to an appropriate error code. If
+** an error has already occurred when this function is called, it is a no-op.
+*/
+static void fts5SegIterSeekInit(
+ Fts5Index *p, /* FTS5 backend */
+ Fts5Buffer *pBuf, /* Buffer to use for loading pages */
+ const u8 *pTerm, int nTerm, /* Term to seek to */
+ int flags, /* Mask of FTS5INDEX_XXX flags */
+ Fts5StructureSegment *pSeg, /* Description of segment */
+ Fts5SegIter *pIter /* Object to populate */
+){
+ int iPg = 1;
+ int bGe = (flags & FTS5INDEX_QUERY_SCAN);
+ int bDlidx = 0; /* True if there is a doclist-index */
+
+ static int nCall = 0;
+ nCall++;
+
+ assert( bGe==0 || (flags & FTS5INDEX_QUERY_DESC)==0 );
+ assert( pTerm && nTerm );
+ memset(pIter, 0, sizeof(*pIter));
+ pIter->pSeg = pSeg;
+
+ /* This block sets stack variable iPg to the leaf page number that may
+ ** contain term (pTerm/nTerm), if it is present in the segment. */
+ if( p->pIdxSelect==0 ){
+ Fts5Config *pConfig = p->pConfig;
+ fts5IndexPrepareStmt(p, &p->pIdxSelect, sqlite3_mprintf(
+ "SELECT pgno FROM '%q'.'%q_idx' WHERE "
+ "segid=? AND term<=? ORDER BY term DESC LIMIT 1",
+ pConfig->zDb, pConfig->zName
+ ));
+ }
+ if( p->rc ) return;
+ sqlite3_bind_int(p->pIdxSelect, 1, pSeg->iSegid);
+ sqlite3_bind_blob(p->pIdxSelect, 2, pTerm, nTerm, SQLITE_STATIC);
+ if( SQLITE_ROW==sqlite3_step(p->pIdxSelect) ){
+ i64 val = sqlite3_column_int(p->pIdxSelect, 0);
+ iPg = (int)(val>>1);
+ bDlidx = (val & 0x0001);
+ }
+ p->rc = sqlite3_reset(p->pIdxSelect);
+
+ if( iPg<pSeg->pgnoFirst ){
+ iPg = pSeg->pgnoFirst;
+ bDlidx = 0;
+ }
+
+ pIter->iLeafPgno = iPg - 1;
+ fts5SegIterNextPage(p, pIter);
+
+ if( pIter->pLeaf ){
+ fts5LeafSeek(p, bGe, pIter, pTerm, nTerm);
+ }
+
+ if( p->rc==SQLITE_OK && bGe==0 ){
+ pIter->flags |= FTS5_SEGITER_ONETERM;
+ if( pIter->pLeaf ){
+ if( flags & FTS5INDEX_QUERY_DESC ){
+ pIter->flags |= FTS5_SEGITER_REVERSE;
+ }
+ if( bDlidx ){
+ fts5SegIterLoadDlidx(p, pIter);
+ }
+ if( flags & FTS5INDEX_QUERY_DESC ){
+ fts5SegIterReverse(p, pIter);
+ }
+ }
+ }
+
+ /* Either:
+ **
+ ** 1) an error has occurred, or
+ ** 2) the iterator points to EOF, or
+ ** 3) the iterator points to an entry with term (pTerm/nTerm), or
+ ** 4) the FTS5INDEX_QUERY_SCAN flag was set and the iterator points
+ ** to an entry with a term greater than or equal to (pTerm/nTerm).
+ */
+ assert( p->rc!=SQLITE_OK /* 1 */
+ || pIter->pLeaf==0 /* 2 */
+ || fts5BufferCompareBlob(&pIter->term, pTerm, nTerm)==0 /* 3 */
+ || (bGe && fts5BufferCompareBlob(&pIter->term, pTerm, nTerm)>0) /* 4 */
+ );
+}
+
+/*
+** Initialize the object pIter to point to term pTerm/nTerm within the
+** in-memory hash table. If there is no such term in the hash-table, the
+** iterator is set to EOF.
+**
+** If an error occurs, Fts5Index.rc is set to an appropriate error code. If
+** an error has already occurred when this function is called, it is a no-op.
+*/
+static void fts5SegIterHashInit(
+ Fts5Index *p, /* FTS5 backend */
+ const u8 *pTerm, int nTerm, /* Term to seek to */
+ int flags, /* Mask of FTS5INDEX_XXX flags */
+ Fts5SegIter *pIter /* Object to populate */
+){
+ const u8 *pList = 0;
+ int nList = 0;
+ const u8 *z = 0;
+ int n = 0;
+
+ assert( p->pHash );
+ assert( p->rc==SQLITE_OK );
+
+ if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){
+ p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);
+ sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &pList, &nList);
+ n = (z ? strlen((const char*)z) : 0);
+ }else{
+ pIter->flags |= FTS5_SEGITER_ONETERM;
+ sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList);
+ z = pTerm;
+ n = nTerm;
+ }
+
+ if( pList ){
+ Fts5Data *pLeaf;
+ sqlite3Fts5BufferSet(&p->rc, &pIter->term, n, z);
+ pLeaf = fts5IdxMalloc(p, sizeof(Fts5Data));
+ if( pLeaf==0 ) return;
+ pLeaf->p = (u8*)pList;
+ pLeaf->nn = pLeaf->szLeaf = nList;
+ pIter->pLeaf = pLeaf;
+ pIter->iLeafOffset = fts5GetVarint(pLeaf->p, (u64*)&pIter->iRowid);
+ pIter->iEndofDoclist = pLeaf->nn+1;
+
+ if( flags & FTS5INDEX_QUERY_DESC ){
+ pIter->flags |= FTS5_SEGITER_REVERSE;
+ fts5SegIterReverseInitPage(p, pIter);
+ }else{
+ fts5SegIterLoadNPos(p, pIter);
+ }
+ }
+}
+
+/*
+** Zero the iterator passed as the only argument.
+*/
+static void fts5SegIterClear(Fts5SegIter *pIter){
+ fts5BufferFree(&pIter->term);
+ fts5DataRelease(pIter->pLeaf);
+ fts5DataRelease(pIter->pNextLeaf);
+ fts5DlidxIterFree(pIter->pDlidx);
+ sqlite3_free(pIter->aRowidOffset);
+ memset(pIter, 0, sizeof(Fts5SegIter));
+}
+
+#ifdef SQLITE_DEBUG
+
+/*
+** This function is used as part of the big assert() procedure implemented by
+** fts5AssertMultiIterSetup(). It ensures that the result currently stored
+** in *pRes is the correct result of comparing the current positions of the
+** two iterators.
+*/
+static void fts5AssertComparisonResult(
+ Fts5IndexIter *pIter,
+ Fts5SegIter *p1,
+ Fts5SegIter *p2,
+ Fts5CResult *pRes
+){
+ int i1 = p1 - pIter->aSeg;
+ int i2 = p2 - pIter->aSeg;
+
+ if( p1->pLeaf || p2->pLeaf ){
+ if( p1->pLeaf==0 ){
+ assert( pRes->iFirst==i2 );
+ }else if( p2->pLeaf==0 ){
+ assert( pRes->iFirst==i1 );
+ }else{
+ int nMin = MIN(p1->term.n, p2->term.n);
+ int res = memcmp(p1->term.p, p2->term.p, nMin);
+ if( res==0 ) res = p1->term.n - p2->term.n;
+
+ if( res==0 ){
+ assert( pRes->bTermEq==1 );
+ assert( p1->iRowid!=p2->iRowid );
+ res = ((p1->iRowid > p2->iRowid)==pIter->bRev) ? -1 : 1;
+ }else{
+ assert( pRes->bTermEq==0 );
+ }
+
+ if( res<0 ){
+ assert( pRes->iFirst==i1 );
+ }else{
+ assert( pRes->iFirst==i2 );
+ }
+ }
+ }
+}
+
+/*
+** This function is a no-op unless SQLITE_DEBUG is defined when this module
+** is compiled. In that case, this function is essentially an assert()
+** statement used to verify that the contents of the pIter->aFirst[] array
+** are correct.
+*/
+static void fts5AssertMultiIterSetup(Fts5Index *p, Fts5IndexIter *pIter){
+ if( p->rc==SQLITE_OK ){
+ Fts5SegIter *pFirst = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ int i;
+
+ assert( (pFirst->pLeaf==0)==pIter->bEof );
+
+ /* Check that pIter->iSwitchRowid is set correctly. */
+ for(i=0; i<pIter->nSeg; i++){
+ Fts5SegIter *p1 = &pIter->aSeg[i];
+ assert( p1==pFirst
+ || p1->pLeaf==0
+ || fts5BufferCompare(&pFirst->term, &p1->term)
+ || p1->iRowid==pIter->iSwitchRowid
+ || (p1->iRowid<pIter->iSwitchRowid)==pIter->bRev
+ );
+ }
+
+ for(i=0; i<pIter->nSeg; i+=2){
+ Fts5SegIter *p1 = &pIter->aSeg[i];
+ Fts5SegIter *p2 = &pIter->aSeg[i+1];
+ Fts5CResult *pRes = &pIter->aFirst[(pIter->nSeg + i) / 2];
+ fts5AssertComparisonResult(pIter, p1, p2, pRes);
+ }
+
+ for(i=1; i<(pIter->nSeg / 2); i+=2){
+ Fts5SegIter *p1 = &pIter->aSeg[ pIter->aFirst[i*2].iFirst ];
+ Fts5SegIter *p2 = &pIter->aSeg[ pIter->aFirst[i*2+1].iFirst ];
+ Fts5CResult *pRes = &pIter->aFirst[i];
+ fts5AssertComparisonResult(pIter, p1, p2, pRes);
+ }
+ }
+}
+#else
+# define fts5AssertMultiIterSetup(x,y)
+#endif
+
+/*
+** Do the comparison necessary to populate pIter->aFirst[iOut].
+**
+** If the returned value is non-zero, then it is the index of an entry
+** in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing
+** to a key that is a duplicate of another, higher priority,
+** segment-iterator in the pSeg->aSeg[] array.
+*/
+static int fts5MultiIterDoCompare(Fts5IndexIter *pIter, int iOut){
+ int i1; /* Index of left-hand Fts5SegIter */
+ int i2; /* Index of right-hand Fts5SegIter */
+ int iRes;
+ Fts5SegIter *p1; /* Left-hand Fts5SegIter */
+ Fts5SegIter *p2; /* Right-hand Fts5SegIter */
+ Fts5CResult *pRes = &pIter->aFirst[iOut];
+
+ assert( iOut<pIter->nSeg && iOut>0 );
+ assert( pIter->bRev==0 || pIter->bRev==1 );
+
+ if( iOut>=(pIter->nSeg/2) ){
+ i1 = (iOut - pIter->nSeg/2) * 2;
+ i2 = i1 + 1;
+ }else{
+ i1 = pIter->aFirst[iOut*2].iFirst;
+ i2 = pIter->aFirst[iOut*2+1].iFirst;
+ }
+ p1 = &pIter->aSeg[i1];
+ p2 = &pIter->aSeg[i2];
+
+ pRes->bTermEq = 0;
+ if( p1->pLeaf==0 ){ /* If p1 is at EOF */
+ iRes = i2;
+ }else if( p2->pLeaf==0 ){ /* If p2 is at EOF */
+ iRes = i1;
+ }else{
+ int res = fts5BufferCompare(&p1->term, &p2->term);
+ if( res==0 ){
+ assert( i2>i1 );
+ assert( i2!=0 );
+ pRes->bTermEq = 1;
+ if( p1->iRowid==p2->iRowid ){
+ p1->bDel = p2->bDel;
+ return i2;
+ }
+ res = ((p1->iRowid > p2->iRowid)==pIter->bRev) ? -1 : +1;
+ }
+ assert( res!=0 );
+ if( res<0 ){
+ iRes = i1;
+ }else{
+ iRes = i2;
+ }
+ }
+
+ pRes->iFirst = iRes;
+ return 0;
+}
+
+/*
+** Move the seg-iter so that it points to the first rowid on page iLeafPgno.
+** It is an error if leaf iLeafPgno does not exist or contains no rowids.
+*/
+static void fts5SegIterGotoPage(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5SegIter *pIter, /* Iterator to advance */
+ int iLeafPgno
+){
+ assert( iLeafPgno>pIter->iLeafPgno );
+
+ if( iLeafPgno>pIter->pSeg->pgnoLast ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ fts5DataRelease(pIter->pNextLeaf);
+ pIter->pNextLeaf = 0;
+ pIter->iLeafPgno = iLeafPgno-1;
+ fts5SegIterNextPage(p, pIter);
+ assert( p->rc!=SQLITE_OK || pIter->iLeafPgno==iLeafPgno );
+
+ if( p->rc==SQLITE_OK ){
+ int iOff;
+ u8 *a = pIter->pLeaf->p;
+ int n = pIter->pLeaf->szLeaf;
+
+ iOff = fts5LeafFirstRowidOff(pIter->pLeaf);
+ if( iOff<4 || iOff>=n ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ iOff += fts5GetVarint(&a[iOff], (u64*)&pIter->iRowid);
+ pIter->iLeafOffset = iOff;
+ fts5SegIterLoadNPos(p, pIter);
+ }
+ }
+ }
+}
+
+/*
+** Advance the iterator passed as the second argument until it is at or
+** past rowid iFrom. Regardless of the value of iFrom, the iterator is
+** always advanced at least once.
+*/
+static void fts5SegIterNextFrom(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5SegIter *pIter, /* Iterator to advance */
+ i64 iMatch /* Advance iterator at least this far */
+){
+ int bRev = (pIter->flags & FTS5_SEGITER_REVERSE);
+ Fts5DlidxIter *pDlidx = pIter->pDlidx;
+ int iLeafPgno = pIter->iLeafPgno;
+ int bMove = 1;
+
+ assert( pIter->flags & FTS5_SEGITER_ONETERM );
+ assert( pIter->pDlidx );
+ assert( pIter->pLeaf );
+
+ if( bRev==0 ){
+ while( !fts5DlidxIterEof(p, pDlidx) && iMatch>fts5DlidxIterRowid(pDlidx) ){
+ iLeafPgno = fts5DlidxIterPgno(pDlidx);
+ fts5DlidxIterNext(p, pDlidx);
+ }
+ assert_nc( iLeafPgno>=pIter->iLeafPgno || p->rc );
+ if( iLeafPgno>pIter->iLeafPgno ){
+ fts5SegIterGotoPage(p, pIter, iLeafPgno);
+ bMove = 0;
+ }
+ }else{
+ assert( pIter->pNextLeaf==0 );
+ assert( iMatch<pIter->iRowid );
+ while( !fts5DlidxIterEof(p, pDlidx) && iMatch<fts5DlidxIterRowid(pDlidx) ){
+ fts5DlidxIterPrev(p, pDlidx);
+ }
+ iLeafPgno = fts5DlidxIterPgno(pDlidx);
+
+ assert( fts5DlidxIterEof(p, pDlidx) || iLeafPgno<=pIter->iLeafPgno );
+
+ if( iLeafPgno<pIter->iLeafPgno ){
+ pIter->iLeafPgno = iLeafPgno+1;
+ fts5SegIterReverseNewPage(p, pIter);
+ bMove = 0;
+ }
+ }
+
+ do{
+ if( bMove ) fts5SegIterNext(p, pIter, 0);
+ if( pIter->pLeaf==0 ) break;
+ if( bRev==0 && pIter->iRowid>=iMatch ) break;
+ if( bRev!=0 && pIter->iRowid<=iMatch ) break;
+ bMove = 1;
+ }while( p->rc==SQLITE_OK );
+}
+
+
+/*
+** Free the iterator object passed as the second argument.
+*/
+static void fts5MultiIterFree(Fts5Index *p, Fts5IndexIter *pIter){
+ if( pIter ){
+ int i;
+ for(i=0; i<pIter->nSeg; i++){
+ fts5SegIterClear(&pIter->aSeg[i]);
+ }
+ fts5StructureRelease(pIter->pStruct);
+ fts5BufferFree(&pIter->poslist);
+ sqlite3_free(pIter);
+ }
+}
+
+static void fts5MultiIterAdvanced(
+ Fts5Index *p, /* FTS5 backend to iterate within */
+ Fts5IndexIter *pIter, /* Iterator to update aFirst[] array for */
+ int iChanged, /* Index of sub-iterator just advanced */
+ int iMinset /* Minimum entry in aFirst[] to set */
+){
+ int i;
+ for(i=(pIter->nSeg+iChanged)/2; i>=iMinset && p->rc==SQLITE_OK; i=i/2){
+ int iEq;
+ if( (iEq = fts5MultiIterDoCompare(pIter, i)) ){
+ fts5SegIterNext(p, &pIter->aSeg[iEq], 0);
+ i = pIter->nSeg + iEq;
+ }
+ }
+}
+
+/*
+** Sub-iterator iChanged of iterator pIter has just been advanced. It still
+** points to the same term though - just a different rowid. This function
+** attempts to update the contents of the pIter->aFirst[] accordingly.
+** If it does so successfully, 0 is returned. Otherwise 1.
+**
+** If non-zero is returned, the caller should call fts5MultiIterAdvanced()
+** on the iterator instead. That function does the same as this one, except
+** that it deals with more complicated cases as well.
+*/
+static int fts5MultiIterAdvanceRowid(
+ Fts5Index *p, /* FTS5 backend to iterate within */
+ Fts5IndexIter *pIter, /* Iterator to update aFirst[] array for */
+ int iChanged /* Index of sub-iterator just advanced */
+){
+ Fts5SegIter *pNew = &pIter->aSeg[iChanged];
+
+ if( pNew->iRowid==pIter->iSwitchRowid
+ || (pNew->iRowid<pIter->iSwitchRowid)==pIter->bRev
+ ){
+ int i;
+ Fts5SegIter *pOther = &pIter->aSeg[iChanged ^ 0x0001];
+ pIter->iSwitchRowid = pIter->bRev ? SMALLEST_INT64 : LARGEST_INT64;
+ for(i=(pIter->nSeg+iChanged)/2; 1; i=i/2){
+ Fts5CResult *pRes = &pIter->aFirst[i];
+
+ assert( pNew->pLeaf );
+ assert( pRes->bTermEq==0 || pOther->pLeaf );
+
+ if( pRes->bTermEq ){
+ if( pNew->iRowid==pOther->iRowid ){
+ return 1;
+ }else if( (pOther->iRowid>pNew->iRowid)==pIter->bRev ){
+ pIter->iSwitchRowid = pOther->iRowid;
+ pNew = pOther;
+ }else if( (pOther->iRowid>pIter->iSwitchRowid)==pIter->bRev ){
+ pIter->iSwitchRowid = pOther->iRowid;
+ }
+ }
+ pRes->iFirst = (pNew - pIter->aSeg);
+ if( i==1 ) break;
+
+ pOther = &pIter->aSeg[ pIter->aFirst[i ^ 0x0001].iFirst ];
+ }
+ }
+
+ return 0;
+}
+
+/*
+** Set the pIter->bEof variable based on the state of the sub-iterators.
+*/
+static void fts5MultiIterSetEof(Fts5IndexIter *pIter){
+ Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ pIter->bEof = pSeg->pLeaf==0;
+ pIter->iSwitchRowid = pSeg->iRowid;
+}
+
+/*
+** Move the iterator to the next entry.
+**
+** If an error occurs, an error code is left in Fts5Index.rc. It is not
+** considered an error if the iterator reaches EOF, or if it is already at
+** EOF when this function is called.
+*/
+static void fts5MultiIterNext(
+ Fts5Index *p,
+ Fts5IndexIter *pIter,
+ int bFrom, /* True if argument iFrom is valid */
+ i64 iFrom /* Advance at least as far as this */
+){
+ if( p->rc==SQLITE_OK ){
+ int bUseFrom = bFrom;
+ do {
+ int iFirst = pIter->aFirst[1].iFirst;
+ int bNewTerm = 0;
+ Fts5SegIter *pSeg = &pIter->aSeg[iFirst];
+ assert( p->rc==SQLITE_OK );
+ if( bUseFrom && pSeg->pDlidx ){
+ fts5SegIterNextFrom(p, pSeg, iFrom);
+ }else{
+ fts5SegIterNext(p, pSeg, &bNewTerm);
+ }
+
+ if( pSeg->pLeaf==0 || bNewTerm
+ || fts5MultiIterAdvanceRowid(p, pIter, iFirst)
+ ){
+ fts5MultiIterAdvanced(p, pIter, iFirst, 1);
+ fts5MultiIterSetEof(pIter);
+ }
+ fts5AssertMultiIterSetup(p, pIter);
+
+ bUseFrom = 0;
+ }while( pIter->bSkipEmpty && fts5MultiIterIsEmpty(p, pIter) );
+ }
+}
+
+static Fts5IndexIter *fts5MultiIterAlloc(
+ Fts5Index *p, /* FTS5 backend to iterate within */
+ int nSeg
+){
+ Fts5IndexIter *pNew;
+ int nSlot; /* Power of two >= nSeg */
+
+ for(nSlot=2; nSlot<nSeg; nSlot=nSlot*2);
+ pNew = fts5IdxMalloc(p,
+ sizeof(Fts5IndexIter) + /* pNew */
+ sizeof(Fts5SegIter) * (nSlot-1) + /* pNew->aSeg[] */
+ sizeof(Fts5CResult) * nSlot /* pNew->aFirst[] */
+ );
+ if( pNew ){
+ pNew->nSeg = nSlot;
+ pNew->aFirst = (Fts5CResult*)&pNew->aSeg[nSlot];
+ pNew->pIndex = p;
+ }
+ return pNew;
+}
+
+/*
+** Allocate a new Fts5IndexIter object.
+**
+** The new object will be used to iterate through data in structure pStruct.
+** If iLevel is -ve, then all data in all segments is merged. Or, if iLevel
+** is zero or greater, data from the first nSegment segments on level iLevel
+** is merged.
+**
+** The iterator initially points to the first term/rowid entry in the
+** iterated data.
+*/
+static void fts5MultiIterNew(
+ Fts5Index *p, /* FTS5 backend to iterate within */
+ Fts5Structure *pStruct, /* Structure of specific index */
+ int bSkipEmpty, /* True to ignore delete-keys */
+ int flags, /* FTS5INDEX_QUERY_XXX flags */
+ const u8 *pTerm, int nTerm, /* Term to seek to (or NULL/0) */
+ int iLevel, /* Level to iterate (-1 for all) */
+ int nSegment, /* Number of segments to merge (iLevel>=0) */
+ Fts5IndexIter **ppOut /* New object */
+){
+ int nSeg = 0; /* Number of segment-iters in use */
+ int iIter = 0; /* */
+ int iSeg; /* Used to iterate through segments */
+ Fts5Buffer buf = {0,0,0}; /* Buffer used by fts5SegIterSeekInit() */
+ Fts5StructureLevel *pLvl;
+ Fts5IndexIter *pNew;
+
+ assert( (pTerm==0 && nTerm==0) || iLevel<0 );
+
+ /* Allocate space for the new multi-seg-iterator. */
+ if( p->rc==SQLITE_OK ){
+ if( iLevel<0 ){
+ assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) );
+ nSeg = pStruct->nSegment;
+ nSeg += (p->pHash ? 1 : 0);
+ }else{
+ nSeg = MIN(pStruct->aLevel[iLevel].nSeg, nSegment);
+ }
+ }
+ *ppOut = pNew = fts5MultiIterAlloc(p, nSeg);
+ if( pNew==0 ) return;
+ pNew->bRev = (0!=(flags & FTS5INDEX_QUERY_DESC));
+ pNew->bSkipEmpty = bSkipEmpty;
+ pNew->pStruct = pStruct;
+ fts5StructureRef(pStruct);
+
+ /* Initialize each of the component segment iterators. */
+ if( iLevel<0 ){
+ Fts5StructureLevel *pEnd = &pStruct->aLevel[pStruct->nLevel];
+ if( p->pHash ){
+ /* Add a segment iterator for the current contents of the hash table. */
+ Fts5SegIter *pIter = &pNew->aSeg[iIter++];
+ fts5SegIterHashInit(p, pTerm, nTerm, flags, pIter);
+ }
+ for(pLvl=&pStruct->aLevel[0]; pLvl<pEnd; pLvl++){
+ for(iSeg=pLvl->nSeg-1; iSeg>=0; iSeg--){
+ Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg];
+ Fts5SegIter *pIter = &pNew->aSeg[iIter++];
+ if( pTerm==0 ){
+ fts5SegIterInit(p, pSeg, pIter);
+ }else{
+ fts5SegIterSeekInit(p, &buf, pTerm, nTerm, flags, pSeg, pIter);
+ }
+ }
+ }
+ }else{
+ pLvl = &pStruct->aLevel[iLevel];
+ for(iSeg=nSeg-1; iSeg>=0; iSeg--){
+ fts5SegIterInit(p, &pLvl->aSeg[iSeg], &pNew->aSeg[iIter++]);
+ }
+ }
+ assert( iIter==nSeg );
+
+ /* If the above was successful, each component iterators now points
+ ** to the first entry in its segment. In this case initialize the
+ ** aFirst[] array. Or, if an error has occurred, free the iterator
+ ** object and set the output variable to NULL. */
+ if( p->rc==SQLITE_OK ){
+ for(iIter=pNew->nSeg-1; iIter>0; iIter--){
+ int iEq;
+ if( (iEq = fts5MultiIterDoCompare(pNew, iIter)) ){
+ fts5SegIterNext(p, &pNew->aSeg[iEq], 0);
+ fts5MultiIterAdvanced(p, pNew, iEq, iIter);
+ }
+ }
+ fts5MultiIterSetEof(pNew);
+ fts5AssertMultiIterSetup(p, pNew);
+
+ if( pNew->bSkipEmpty && fts5MultiIterIsEmpty(p, pNew) ){
+ fts5MultiIterNext(p, pNew, 0, 0);
+ }
+ }else{
+ fts5MultiIterFree(p, pNew);
+ *ppOut = 0;
+ }
+ fts5BufferFree(&buf);
+}
+
+/*
+** Create an Fts5IndexIter that iterates through the doclist provided
+** as the second argument.
+*/
+static void fts5MultiIterNew2(
+ Fts5Index *p, /* FTS5 backend to iterate within */
+ Fts5Data *pData, /* Doclist to iterate through */
+ int bDesc, /* True for descending rowid order */
+ Fts5IndexIter **ppOut /* New object */
+){
+ Fts5IndexIter *pNew;
+ pNew = fts5MultiIterAlloc(p, 2);
+ if( pNew ){
+ Fts5SegIter *pIter = &pNew->aSeg[1];
+
+ pNew->bFiltered = 1;
+ pIter->flags = FTS5_SEGITER_ONETERM;
+ if( pData->szLeaf>0 ){
+ pIter->pLeaf = pData;
+ pIter->iLeafOffset = fts5GetVarint(pData->p, (u64*)&pIter->iRowid);
+ pIter->iEndofDoclist = pData->nn;
+ pNew->aFirst[1].iFirst = 1;
+ if( bDesc ){
+ pNew->bRev = 1;
+ pIter->flags |= FTS5_SEGITER_REVERSE;
+ fts5SegIterReverseInitPage(p, pIter);
+ }else{
+ fts5SegIterLoadNPos(p, pIter);
+ }
+ pData = 0;
+ }else{
+ pNew->bEof = 1;
+ }
+
+ *ppOut = pNew;
+ }
+
+ fts5DataRelease(pData);
+}
+
+/*
+** Return true if the iterator is at EOF or if an error has occurred.
+** False otherwise.
+*/
+static int fts5MultiIterEof(Fts5Index *p, Fts5IndexIter *pIter){
+ assert( p->rc
+ || (pIter->aSeg[ pIter->aFirst[1].iFirst ].pLeaf==0)==pIter->bEof
+ );
+ return (p->rc || pIter->bEof);
+}
+
+/*
+** Return the rowid of the entry that the iterator currently points
+** to. If the iterator points to EOF when this function is called the
+** results are undefined.
+*/
+static i64 fts5MultiIterRowid(Fts5IndexIter *pIter){
+ assert( pIter->aSeg[ pIter->aFirst[1].iFirst ].pLeaf );
+ return pIter->aSeg[ pIter->aFirst[1].iFirst ].iRowid;
+}
+
+/*
+** Move the iterator to the next entry at or following iMatch.
+*/
+static void fts5MultiIterNextFrom(
+ Fts5Index *p,
+ Fts5IndexIter *pIter,
+ i64 iMatch
+){
+ while( 1 ){
+ i64 iRowid;
+ fts5MultiIterNext(p, pIter, 1, iMatch);
+ if( fts5MultiIterEof(p, pIter) ) break;
+ iRowid = fts5MultiIterRowid(pIter);
+ if( pIter->bRev==0 && iRowid>=iMatch ) break;
+ if( pIter->bRev!=0 && iRowid<=iMatch ) break;
+ }
+}
+
+/*
+** Return a pointer to a buffer containing the term associated with the
+** entry that the iterator currently points to.
+*/
+static const u8 *fts5MultiIterTerm(Fts5IndexIter *pIter, int *pn){
+ Fts5SegIter *p = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ *pn = p->term.n;
+ return p->term.p;
+}
+
+static void fts5ChunkIterate(
+ Fts5Index *p, /* Index object */
+ Fts5SegIter *pSeg, /* Poslist of this iterator */
+ void *pCtx, /* Context pointer for xChunk callback */
+ void (*xChunk)(Fts5Index*, void*, const u8*, int)
+){
+ int nRem = pSeg->nPos; /* Number of bytes still to come */
+ Fts5Data *pData = 0;
+ u8 *pChunk = &pSeg->pLeaf->p[pSeg->iLeafOffset];
+ int nChunk = MIN(nRem, pSeg->pLeaf->szLeaf - pSeg->iLeafOffset);
+ int pgno = pSeg->iLeafPgno;
+ int pgnoSave = 0;
+
+ if( (pSeg->flags & FTS5_SEGITER_REVERSE)==0 ){
+ pgnoSave = pgno+1;
+ }
+
+ while( 1 ){
+ xChunk(p, pCtx, pChunk, nChunk);
+ nRem -= nChunk;
+ fts5DataRelease(pData);
+ if( nRem<=0 ){
+ break;
+ }else{
+ pgno++;
+ pData = fts5DataRead(p, FTS5_SEGMENT_ROWID(pSeg->pSeg->iSegid, pgno));
+ if( pData==0 ) break;
+ pChunk = &pData->p[4];
+ nChunk = MIN(nRem, pData->szLeaf - 4);
+ if( pgno==pgnoSave ){
+ assert( pSeg->pNextLeaf==0 );
+ pSeg->pNextLeaf = pData;
+ pData = 0;
+ }
+ }
+ }
+}
+
+
+
+/*
+** Allocate a new segment-id for the structure pStruct. The new segment
+** id must be between 1 and 65335 inclusive, and must not be used by
+** any currently existing segment. If a free segment id cannot be found,
+** SQLITE_FULL is returned.
+**
+** If an error has already occurred, this function is a no-op. 0 is
+** returned in this case.
+*/
+static int fts5AllocateSegid(Fts5Index *p, Fts5Structure *pStruct){
+ int iSegid = 0;
+
+ if( p->rc==SQLITE_OK ){
+ if( pStruct->nSegment>=FTS5_MAX_SEGMENT ){
+ p->rc = SQLITE_FULL;
+ }else{
+ while( iSegid==0 ){
+ int iLvl, iSeg;
+ sqlite3_randomness(sizeof(u32), (void*)&iSegid);
+ iSegid = iSegid & ((1 << FTS5_DATA_ID_B)-1);
+ for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){
+ for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){
+ if( iSegid==pStruct->aLevel[iLvl].aSeg[iSeg].iSegid ){
+ iSegid = 0;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return iSegid;
+}
+
+/*
+** Discard all data currently cached in the hash-tables.
+*/
+static void fts5IndexDiscardData(Fts5Index *p){
+ assert( p->pHash || p->nPendingData==0 );
+ if( p->pHash ){
+ sqlite3Fts5HashClear(p->pHash);
+ p->nPendingData = 0;
+ }
+}
+
+/*
+** Return the size of the prefix, in bytes, that buffer (nNew/pNew) shares
+** with buffer (nOld/pOld).
+*/
+static int fts5PrefixCompress(
+ int nOld, const u8 *pOld,
+ int nNew, const u8 *pNew
+){
+ int i;
+ assert( fts5BlobCompare(pOld, nOld, pNew, nNew)<0 );
+ for(i=0; i<nOld; i++){
+ if( pOld[i]!=pNew[i] ) break;
+ }
+ return i;
+}
+
+static void fts5WriteDlidxClear(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ int bFlush /* If true, write dlidx to disk */
+){
+ int i;
+ assert( bFlush==0 || (pWriter->nDlidx>0 && pWriter->aDlidx[0].buf.n>0) );
+ for(i=0; i<pWriter->nDlidx; i++){
+ Fts5DlidxWriter *pDlidx = &pWriter->aDlidx[i];
+ if( pDlidx->buf.n==0 ) break;
+ if( bFlush ){
+ assert( pDlidx->pgno!=0 );
+ fts5DataWrite(p,
+ FTS5_DLIDX_ROWID(pWriter->iSegid, i, pDlidx->pgno),
+ pDlidx->buf.p, pDlidx->buf.n
+ );
+ }
+ sqlite3Fts5BufferZero(&pDlidx->buf);
+ pDlidx->bPrevValid = 0;
+ }
+}
+
+/*
+** Grow the pWriter->aDlidx[] array to at least nLvl elements in size.
+** Any new array elements are zeroed before returning.
+*/
+static int fts5WriteDlidxGrow(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ int nLvl
+){
+ if( p->rc==SQLITE_OK && nLvl>=pWriter->nDlidx ){
+ Fts5DlidxWriter *aDlidx = (Fts5DlidxWriter*)sqlite3_realloc(
+ pWriter->aDlidx, sizeof(Fts5DlidxWriter) * nLvl
+ );
+ if( aDlidx==0 ){
+ p->rc = SQLITE_NOMEM;
+ }else{
+ int nByte = sizeof(Fts5DlidxWriter) * (nLvl - pWriter->nDlidx);
+ memset(&aDlidx[pWriter->nDlidx], 0, nByte);
+ pWriter->aDlidx = aDlidx;
+ pWriter->nDlidx = nLvl;
+ }
+ }
+ return p->rc;
+}
+
+/*
+** If the current doclist-index accumulating in pWriter->aDlidx[] is large
+** enough, flush it to disk and return 1. Otherwise discard it and return
+** zero.
+*/
+static int fts5WriteFlushDlidx(Fts5Index *p, Fts5SegWriter *pWriter){
+ int bFlag = 0;
+
+ /* If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written
+ ** to the database, also write the doclist-index to disk. */
+ if( pWriter->aDlidx[0].buf.n>0 && pWriter->nEmpty>=FTS5_MIN_DLIDX_SIZE ){
+ bFlag = 1;
+ }
+ fts5WriteDlidxClear(p, pWriter, bFlag);
+ pWriter->nEmpty = 0;
+ return bFlag;
+}
+
+/*
+** This function is called whenever processing of the doclist for the
+** last term on leaf page (pWriter->iBtPage) is completed.
+**
+** The doclist-index for that term is currently stored in-memory within the
+** Fts5SegWriter.aDlidx[] array. If it is large enough, this function
+** writes it out to disk. Or, if it is too small to bother with, discards
+** it.
+**
+** Fts5SegWriter.btterm currently contains the first term on page iBtPage.
+*/
+static void fts5WriteFlushBtree(Fts5Index *p, Fts5SegWriter *pWriter){
+ int bFlag;
+
+ assert( pWriter->iBtPage || pWriter->nEmpty==0 );
+ if( pWriter->iBtPage==0 ) return;
+ bFlag = fts5WriteFlushDlidx(p, pWriter);
+
+ if( p->rc==SQLITE_OK ){
+ const char *z = (pWriter->btterm.n>0?(const char*)pWriter->btterm.p:"");
+ /* The following was already done in fts5WriteInit(): */
+ /* sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid); */
+ sqlite3_bind_blob(p->pIdxWriter, 2, z, pWriter->btterm.n, SQLITE_STATIC);
+ sqlite3_bind_int64(p->pIdxWriter, 3, bFlag + ((i64)pWriter->iBtPage<<1));
+ sqlite3_step(p->pIdxWriter);
+ p->rc = sqlite3_reset(p->pIdxWriter);
+ }
+ pWriter->iBtPage = 0;
+}
+
+/*
+** This is called once for each leaf page except the first that contains
+** at least one term. Argument (nTerm/pTerm) is the split-key - a term that
+** is larger than all terms written to earlier leaves, and equal to or
+** smaller than the first term on the new leaf.
+**
+** If an error occurs, an error code is left in Fts5Index.rc. If an error
+** has already occurred when this function is called, it is a no-op.
+*/
+static void fts5WriteBtreeTerm(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5SegWriter *pWriter, /* Writer object */
+ int nTerm, const u8 *pTerm /* First term on new page */
+){
+ fts5WriteFlushBtree(p, pWriter);
+ fts5BufferSet(&p->rc, &pWriter->btterm, nTerm, pTerm);
+ pWriter->iBtPage = pWriter->writer.pgno;
+}
+
+/*
+** This function is called when flushing a leaf page that contains no
+** terms at all to disk.
+*/
+static void fts5WriteBtreeNoTerm(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5SegWriter *pWriter /* Writer object */
+){
+ /* If there were no rowids on the leaf page either and the doclist-index
+ ** has already been started, append an 0x00 byte to it. */
+ if( pWriter->bFirstRowidInPage && pWriter->aDlidx[0].buf.n>0 ){
+ Fts5DlidxWriter *pDlidx = &pWriter->aDlidx[0];
+ assert( pDlidx->bPrevValid );
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, 0);
+ }
+
+ /* Increment the "number of sequential leaves without a term" counter. */
+ pWriter->nEmpty++;
+}
+
+static i64 fts5DlidxExtractFirstRowid(Fts5Buffer *pBuf){
+ i64 iRowid;
+ int iOff;
+
+ iOff = 1 + fts5GetVarint(&pBuf->p[1], (u64*)&iRowid);
+ fts5GetVarint(&pBuf->p[iOff], (u64*)&iRowid);
+ return iRowid;
+}
+
+/*
+** Rowid iRowid has just been appended to the current leaf page. It is the
+** first on the page. This function appends an appropriate entry to the current
+** doclist-index.
+*/
+static void fts5WriteDlidxAppend(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ i64 iRowid
+){
+ int i;
+ int bDone = 0;
+
+ for(i=0; p->rc==SQLITE_OK && bDone==0; i++){
+ i64 iVal;
+ Fts5DlidxWriter *pDlidx = &pWriter->aDlidx[i];
+
+ if( pDlidx->buf.n>=p->pConfig->pgsz ){
+ /* The current doclist-index page is full. Write it to disk and push
+ ** a copy of iRowid (which will become the first rowid on the next
+ ** doclist-index leaf page) up into the next level of the b-tree
+ ** hierarchy. If the node being flushed is currently the root node,
+ ** also push its first rowid upwards. */
+ pDlidx->buf.p[0] = 0x01; /* Not the root node */
+ fts5DataWrite(p,
+ FTS5_DLIDX_ROWID(pWriter->iSegid, i, pDlidx->pgno),
+ pDlidx->buf.p, pDlidx->buf.n
+ );
+ fts5WriteDlidxGrow(p, pWriter, i+2);
+ pDlidx = &pWriter->aDlidx[i];
+ if( p->rc==SQLITE_OK && pDlidx[1].buf.n==0 ){
+ i64 iFirst = fts5DlidxExtractFirstRowid(&pDlidx->buf);
+
+ /* This was the root node. Push its first rowid up to the new root. */
+ pDlidx[1].pgno = pDlidx->pgno;
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx[1].buf, 0);
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx[1].buf, pDlidx->pgno);
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx[1].buf, iFirst);
+ pDlidx[1].bPrevValid = 1;
+ pDlidx[1].iPrev = iFirst;
+ }
+
+ sqlite3Fts5BufferZero(&pDlidx->buf);
+ pDlidx->bPrevValid = 0;
+ pDlidx->pgno++;
+ }else{
+ bDone = 1;
+ }
+
+ if( pDlidx->bPrevValid ){
+ iVal = iRowid - pDlidx->iPrev;
+ }else{
+ i64 iPgno = (i==0 ? pWriter->writer.pgno : pDlidx[-1].pgno);
+ assert( pDlidx->buf.n==0 );
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, !bDone);
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, iPgno);
+ iVal = iRowid;
+ }
+
+ sqlite3Fts5BufferAppendVarint(&p->rc, &pDlidx->buf, iVal);
+ pDlidx->bPrevValid = 1;
+ pDlidx->iPrev = iRowid;
+ }
+}
+
+static void fts5WriteFlushLeaf(Fts5Index *p, Fts5SegWriter *pWriter){
+ static const u8 zero[] = { 0x00, 0x00, 0x00, 0x00 };
+ Fts5PageWriter *pPage = &pWriter->writer;
+ i64 iRowid;
+
+ assert( (pPage->pgidx.n==0)==(pWriter->bFirstTermInPage) );
+
+ /* Set the szLeaf header field. */
+ assert( 0==fts5GetU16(&pPage->buf.p[2]) );
+ fts5PutU16(&pPage->buf.p[2], pPage->buf.n);
+
+ if( pWriter->bFirstTermInPage ){
+ /* No term was written to this page. */
+ assert( pPage->pgidx.n==0 );
+ fts5WriteBtreeNoTerm(p, pWriter);
+ }else{
+ /* Append the pgidx to the page buffer. Set the szLeaf header field. */
+ fts5BufferAppendBlob(&p->rc, &pPage->buf, pPage->pgidx.n, pPage->pgidx.p);
+ }
+
+ /* Write the page out to disk */
+ iRowid = FTS5_SEGMENT_ROWID(pWriter->iSegid, pPage->pgno);
+ fts5DataWrite(p, iRowid, pPage->buf.p, pPage->buf.n);
+
+ /* Initialize the next page. */
+ fts5BufferZero(&pPage->buf);
+ fts5BufferZero(&pPage->pgidx);
+ fts5BufferAppendBlob(&p->rc, &pPage->buf, 4, zero);
+ pPage->iPrevPgidx = 0;
+ pPage->pgno++;
+
+ /* Increase the leaves written counter */
+ pWriter->nLeafWritten++;
+
+ /* The new leaf holds no terms or rowids */
+ pWriter->bFirstTermInPage = 1;
+ pWriter->bFirstRowidInPage = 1;
+}
+
+/*
+** Append term pTerm/nTerm to the segment being written by the writer passed
+** as the second argument.
+**
+** If an error occurs, set the Fts5Index.rc error code. If an error has
+** already occurred, this function is a no-op.
+*/
+static void fts5WriteAppendTerm(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ int nTerm, const u8 *pTerm
+){
+ int nPrefix; /* Bytes of prefix compression for term */
+ Fts5PageWriter *pPage = &pWriter->writer;
+ Fts5Buffer *pPgidx = &pWriter->writer.pgidx;
+
+ assert( p->rc==SQLITE_OK );
+ assert( pPage->buf.n>=4 );
+ assert( pPage->buf.n>4 || pWriter->bFirstTermInPage );
+
+ /* If the current leaf page is full, flush it to disk. */
+ if( (pPage->buf.n + pPgidx->n + nTerm + 2)>=p->pConfig->pgsz ){
+ if( pPage->buf.n>4 ){
+ fts5WriteFlushLeaf(p, pWriter);
+ }
+ fts5BufferGrow(&p->rc, &pPage->buf, nTerm+FTS5_DATA_PADDING);
+ }
+
+ /* TODO1: Updating pgidx here. */
+ pPgidx->n += sqlite3Fts5PutVarint(
+ &pPgidx->p[pPgidx->n], pPage->buf.n - pPage->iPrevPgidx
+ );
+ pPage->iPrevPgidx = pPage->buf.n;
+#if 0
+ fts5PutU16(&pPgidx->p[pPgidx->n], pPage->buf.n);
+ pPgidx->n += 2;
+#endif
+
+ if( pWriter->bFirstTermInPage ){
+ nPrefix = 0;
+ if( pPage->pgno!=1 ){
+ /* This is the first term on a leaf that is not the leftmost leaf in
+ ** the segment b-tree. In this case it is necessary to add a term to
+ ** the b-tree hierarchy that is (a) larger than the largest term
+ ** already written to the segment and (b) smaller than or equal to
+ ** this term. In other words, a prefix of (pTerm/nTerm) that is one
+ ** byte longer than the longest prefix (pTerm/nTerm) shares with the
+ ** previous term.
+ **
+ ** Usually, the previous term is available in pPage->term. The exception
+ ** is if this is the first term written in an incremental-merge step.
+ ** In this case the previous term is not available, so just write a
+ ** copy of (pTerm/nTerm) into the parent node. This is slightly
+ ** inefficient, but still correct. */
+ int n = nTerm;
+ if( pPage->term.n ){
+ n = 1 + fts5PrefixCompress(pPage->term.n, pPage->term.p, nTerm, pTerm);
+ }
+ fts5WriteBtreeTerm(p, pWriter, n, pTerm);
+ pPage = &pWriter->writer;
+ }
+ }else{
+ nPrefix = fts5PrefixCompress(pPage->term.n, pPage->term.p, nTerm, pTerm);
+ fts5BufferAppendVarint(&p->rc, &pPage->buf, nPrefix);
+ }
+
+ /* Append the number of bytes of new data, then the term data itself
+ ** to the page. */
+ fts5BufferAppendVarint(&p->rc, &pPage->buf, nTerm - nPrefix);
+ fts5BufferAppendBlob(&p->rc, &pPage->buf, nTerm - nPrefix, &pTerm[nPrefix]);
+
+ /* Update the Fts5PageWriter.term field. */
+ fts5BufferSet(&p->rc, &pPage->term, nTerm, pTerm);
+ pWriter->bFirstTermInPage = 0;
+
+ pWriter->bFirstRowidInPage = 0;
+ pWriter->bFirstRowidInDoclist = 1;
+
+ assert( p->rc || (pWriter->nDlidx>0 && pWriter->aDlidx[0].buf.n==0) );
+ pWriter->aDlidx[0].pgno = pPage->pgno;
+}
+
+/*
+** Append a rowid and position-list size field to the writers output.
+*/
+static void fts5WriteAppendRowid(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ i64 iRowid,
+ int nPos
+){
+ if( p->rc==SQLITE_OK ){
+ Fts5PageWriter *pPage = &pWriter->writer;
+
+ if( (pPage->buf.n + pPage->pgidx.n)>=p->pConfig->pgsz ){
+ fts5WriteFlushLeaf(p, pWriter);
+ }
+
+ /* If this is to be the first rowid written to the page, set the
+ ** rowid-pointer in the page-header. Also append a value to the dlidx
+ ** buffer, in case a doclist-index is required. */
+ if( pWriter->bFirstRowidInPage ){
+ fts5PutU16(pPage->buf.p, pPage->buf.n);
+ fts5WriteDlidxAppend(p, pWriter, iRowid);
+ }
+
+ /* Write the rowid. */
+ if( pWriter->bFirstRowidInDoclist || pWriter->bFirstRowidInPage ){
+ fts5BufferAppendVarint(&p->rc, &pPage->buf, iRowid);
+ }else{
+ assert( p->rc || iRowid>pWriter->iPrevRowid );
+ fts5BufferAppendVarint(&p->rc, &pPage->buf, iRowid - pWriter->iPrevRowid);
+ }
+ pWriter->iPrevRowid = iRowid;
+ pWriter->bFirstRowidInDoclist = 0;
+ pWriter->bFirstRowidInPage = 0;
+
+ fts5BufferAppendVarint(&p->rc, &pPage->buf, nPos);
+ }
+}
+
+static void fts5WriteAppendPoslistData(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ const u8 *aData,
+ int nData
+){
+ Fts5PageWriter *pPage = &pWriter->writer;
+ const u8 *a = aData;
+ int n = nData;
+
+ assert( p->pConfig->pgsz>0 );
+ while( p->rc==SQLITE_OK
+ && (pPage->buf.n + pPage->pgidx.n + n)>=p->pConfig->pgsz
+ ){
+ int nReq = p->pConfig->pgsz - pPage->buf.n - pPage->pgidx.n;
+ int nCopy = 0;
+ while( nCopy<nReq ){
+ i64 dummy;
+ nCopy += fts5GetVarint(&a[nCopy], (u64*)&dummy);
+ }
+ fts5BufferAppendBlob(&p->rc, &pPage->buf, nCopy, a);
+ a += nCopy;
+ n -= nCopy;
+ fts5WriteFlushLeaf(p, pWriter);
+ }
+ if( n>0 ){
+ fts5BufferAppendBlob(&p->rc, &pPage->buf, n, a);
+ }
+}
+
+/*
+** Flush any data cached by the writer object to the database. Free any
+** allocations associated with the writer.
+*/
+static void fts5WriteFinish(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter, /* Writer object */
+ int *pnLeaf /* OUT: Number of leaf pages in b-tree */
+){
+ int i;
+ Fts5PageWriter *pLeaf = &pWriter->writer;
+ if( p->rc==SQLITE_OK ){
+ assert( pLeaf->pgno>=1 );
+ if( pLeaf->buf.n>4 ){
+ fts5WriteFlushLeaf(p, pWriter);
+ }
+ *pnLeaf = pLeaf->pgno-1;
+ fts5WriteFlushBtree(p, pWriter);
+ }
+ fts5BufferFree(&pLeaf->term);
+ fts5BufferFree(&pLeaf->buf);
+ fts5BufferFree(&pLeaf->pgidx);
+ fts5BufferFree(&pWriter->btterm);
+
+ for(i=0; i<pWriter->nDlidx; i++){
+ sqlite3Fts5BufferFree(&pWriter->aDlidx[i].buf);
+ }
+ sqlite3_free(pWriter->aDlidx);
+}
+
+static void fts5WriteInit(
+ Fts5Index *p,
+ Fts5SegWriter *pWriter,
+ int iSegid
+){
+ const int nBuffer = p->pConfig->pgsz + FTS5_DATA_PADDING;
+
+ memset(pWriter, 0, sizeof(Fts5SegWriter));
+ pWriter->iSegid = iSegid;
+
+ fts5WriteDlidxGrow(p, pWriter, 1);
+ pWriter->writer.pgno = 1;
+ pWriter->bFirstTermInPage = 1;
+ pWriter->iBtPage = 1;
+
+ /* Grow the two buffers to pgsz + padding bytes in size. */
+ fts5BufferGrow(&p->rc, &pWriter->writer.pgidx, nBuffer);
+ fts5BufferGrow(&p->rc, &pWriter->writer.buf, nBuffer);
+
+ if( p->pIdxWriter==0 ){
+ Fts5Config *pConfig = p->pConfig;
+ fts5IndexPrepareStmt(p, &p->pIdxWriter, sqlite3_mprintf(
+ "INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)",
+ pConfig->zDb, pConfig->zName
+ ));
+ }
+
+ if( p->rc==SQLITE_OK ){
+ /* Initialize the 4-byte leaf-page header to 0x00. */
+ memset(pWriter->writer.buf.p, 0, 4);
+ pWriter->writer.buf.n = 4;
+
+ /* Bind the current output segment id to the index-writer. This is an
+ ** optimization over binding the same value over and over as rows are
+ ** inserted into %_idx by the current writer. */
+ sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid);
+ }
+}
+
+/*
+** Iterator pIter was used to iterate through the input segments of on an
+** incremental merge operation. This function is called if the incremental
+** merge step has finished but the input has not been completely exhausted.
+*/
+static void fts5TrimSegments(Fts5Index *p, Fts5IndexIter *pIter){
+ int i;
+ Fts5Buffer buf;
+ memset(&buf, 0, sizeof(Fts5Buffer));
+ for(i=0; i<pIter->nSeg; i++){
+ Fts5SegIter *pSeg = &pIter->aSeg[i];
+ if( pSeg->pSeg==0 ){
+ /* no-op */
+ }else if( pSeg->pLeaf==0 ){
+ /* All keys from this input segment have been transfered to the output.
+ ** Set both the first and last page-numbers to 0 to indicate that the
+ ** segment is now empty. */
+ pSeg->pSeg->pgnoLast = 0;
+ pSeg->pSeg->pgnoFirst = 0;
+ }else{
+ int iOff = pSeg->iTermLeafOffset; /* Offset on new first leaf page */
+ i64 iLeafRowid;
+ Fts5Data *pData;
+ int iId = pSeg->pSeg->iSegid;
+ u8 aHdr[4] = {0x00, 0x00, 0x00, 0x00};
+
+ iLeafRowid = FTS5_SEGMENT_ROWID(iId, pSeg->iTermLeafPgno);
+ pData = fts5DataRead(p, iLeafRowid);
+ if( pData ){
+ fts5BufferZero(&buf);
+ fts5BufferGrow(&p->rc, &buf, pData->nn);
+ fts5BufferAppendBlob(&p->rc, &buf, sizeof(aHdr), aHdr);
+ fts5BufferAppendVarint(&p->rc, &buf, pSeg->term.n);
+ fts5BufferAppendBlob(&p->rc, &buf, pSeg->term.n, pSeg->term.p);
+ fts5BufferAppendBlob(&p->rc, &buf, pData->szLeaf-iOff, &pData->p[iOff]);
+ if( p->rc==SQLITE_OK ){
+ /* Set the szLeaf field */
+ fts5PutU16(&buf.p[2], buf.n);
+ }
+
+ /* Set up the new page-index array */
+ fts5BufferAppendVarint(&p->rc, &buf, 4);
+ if( pSeg->iLeafPgno==pSeg->iTermLeafPgno
+ && pSeg->iEndofDoclist<pData->szLeaf
+ ){
+ int nDiff = pData->szLeaf - pSeg->iEndofDoclist;
+ fts5BufferAppendVarint(&p->rc, &buf, buf.n - 1 - nDiff - 4);
+ fts5BufferAppendBlob(&p->rc, &buf,
+ pData->nn - pSeg->iPgidxOff, &pData->p[pSeg->iPgidxOff]
+ );
+ }
+
+ fts5DataRelease(pData);
+ pSeg->pSeg->pgnoFirst = pSeg->iTermLeafPgno;
+ fts5DataDelete(p, FTS5_SEGMENT_ROWID(iId, 1), iLeafRowid);
+ fts5DataWrite(p, iLeafRowid, buf.p, buf.n);
+ }
+ }
+ }
+ fts5BufferFree(&buf);
+}
+
+static void fts5MergeChunkCallback(
+ Fts5Index *p,
+ void *pCtx,
+ const u8 *pChunk, int nChunk
+){
+ Fts5SegWriter *pWriter = (Fts5SegWriter*)pCtx;
+ fts5WriteAppendPoslistData(p, pWriter, pChunk, nChunk);
+}
+
+/*
+**
+*/
+static void fts5IndexMergeLevel(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5Structure **ppStruct, /* IN/OUT: Stucture of index */
+ int iLvl, /* Level to read input from */
+ int *pnRem /* Write up to this many output leaves */
+){
+ Fts5Structure *pStruct = *ppStruct;
+ Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];
+ Fts5StructureLevel *pLvlOut;
+ Fts5IndexIter *pIter = 0; /* Iterator to read input data */
+ int nRem = pnRem ? *pnRem : 0; /* Output leaf pages left to write */
+ int nInput; /* Number of input segments */
+ Fts5SegWriter writer; /* Writer object */
+ Fts5StructureSegment *pSeg; /* Output segment */
+ Fts5Buffer term;
+ int bOldest; /* True if the output segment is the oldest */
+
+ assert( iLvl<pStruct->nLevel );
+ assert( pLvl->nMerge<=pLvl->nSeg );
+
+ memset(&writer, 0, sizeof(Fts5SegWriter));
+ memset(&term, 0, sizeof(Fts5Buffer));
+ if( pLvl->nMerge ){
+ pLvlOut = &pStruct->aLevel[iLvl+1];
+ assert( pLvlOut->nSeg>0 );
+ nInput = pLvl->nMerge;
+ pSeg = &pLvlOut->aSeg[pLvlOut->nSeg-1];
+
+ fts5WriteInit(p, &writer, pSeg->iSegid);
+ writer.writer.pgno = pSeg->pgnoLast+1;
+ writer.iBtPage = 0;
+ }else{
+ int iSegid = fts5AllocateSegid(p, pStruct);
+
+ /* Extend the Fts5Structure object as required to ensure the output
+ ** segment exists. */
+ if( iLvl==pStruct->nLevel-1 ){
+ fts5StructureAddLevel(&p->rc, ppStruct);
+ pStruct = *ppStruct;
+ }
+ fts5StructureExtendLevel(&p->rc, pStruct, iLvl+1, 1, 0);
+ if( p->rc ) return;
+ pLvl = &pStruct->aLevel[iLvl];
+ pLvlOut = &pStruct->aLevel[iLvl+1];
+
+ fts5WriteInit(p, &writer, iSegid);
+
+ /* Add the new segment to the output level */
+ pSeg = &pLvlOut->aSeg[pLvlOut->nSeg];
+ pLvlOut->nSeg++;
+ pSeg->pgnoFirst = 1;
+ pSeg->iSegid = iSegid;
+ pStruct->nSegment++;
+
+ /* Read input from all segments in the input level */
+ nInput = pLvl->nSeg;
+ }
+ bOldest = (pLvlOut->nSeg==1 && pStruct->nLevel==iLvl+2);
+
+ assert( iLvl>=0 );
+ for(fts5MultiIterNew(p, pStruct, 0, 0, 0, 0, iLvl, nInput, &pIter);
+ fts5MultiIterEof(p, pIter)==0;
+ fts5MultiIterNext(p, pIter, 0, 0)
+ ){
+ Fts5SegIter *pSegIter = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ int nPos; /* position-list size field value */
+ int nTerm;
+ const u8 *pTerm;
+
+ /* Check for key annihilation. */
+ if( pSegIter->nPos==0 && (bOldest || pSegIter->bDel==0) ) continue;
+
+ pTerm = fts5MultiIterTerm(pIter, &nTerm);
+ if( nTerm!=term.n || memcmp(pTerm, term.p, nTerm) ){
+ if( pnRem && writer.nLeafWritten>nRem ){
+ break;
+ }
+
+ /* This is a new term. Append a term to the output segment. */
+ fts5WriteAppendTerm(p, &writer, nTerm, pTerm);
+ fts5BufferSet(&p->rc, &term, nTerm, pTerm);
+ }
+
+ /* Append the rowid to the output */
+ /* WRITEPOSLISTSIZE */
+ nPos = pSegIter->nPos*2 + pSegIter->bDel;
+ fts5WriteAppendRowid(p, &writer, fts5MultiIterRowid(pIter), nPos);
+
+ /* Append the position-list data to the output */
+ fts5ChunkIterate(p, pSegIter, (void*)&writer, fts5MergeChunkCallback);
+ }
+
+ /* Flush the last leaf page to disk. Set the output segment b-tree height
+ ** and last leaf page number at the same time. */
+ fts5WriteFinish(p, &writer, &pSeg->pgnoLast);
+
+ if( fts5MultiIterEof(p, pIter) ){
+ int i;
+
+ /* Remove the redundant segments from the %_data table */
+ for(i=0; i<nInput; i++){
+ fts5DataRemoveSegment(p, pLvl->aSeg[i].iSegid);
+ }
+
+ /* Remove the redundant segments from the input level */
+ if( pLvl->nSeg!=nInput ){
+ int nMove = (pLvl->nSeg - nInput) * sizeof(Fts5StructureSegment);
+ memmove(pLvl->aSeg, &pLvl->aSeg[nInput], nMove);
+ }
+ pStruct->nSegment -= nInput;
+ pLvl->nSeg -= nInput;
+ pLvl->nMerge = 0;
+ if( pSeg->pgnoLast==0 ){
+ pLvlOut->nSeg--;
+ pStruct->nSegment--;
+ }
+ }else{
+ assert( pSeg->pgnoLast>0 );
+ fts5TrimSegments(p, pIter);
+ pLvl->nMerge = nInput;
+ }
+
+ fts5MultiIterFree(p, pIter);
+ fts5BufferFree(&term);
+ if( pnRem ) *pnRem -= writer.nLeafWritten;
+}
+
+/*
+** Do up to nPg pages of automerge work on the index.
+*/
+static void fts5IndexMerge(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5Structure **ppStruct, /* IN/OUT: Current structure of index */
+ int nPg /* Pages of work to do */
+){
+ int nRem = nPg;
+ Fts5Structure *pStruct = *ppStruct;
+ while( nRem>0 && p->rc==SQLITE_OK ){
+ int iLvl; /* To iterate through levels */
+ int iBestLvl = 0; /* Level offering the most input segments */
+ int nBest = 0; /* Number of input segments on best level */
+
+ /* Set iBestLvl to the level to read input segments from. */
+ assert( pStruct->nLevel>0 );
+ for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){
+ Fts5StructureLevel *pLvl = &pStruct->aLevel[iLvl];
+ if( pLvl->nMerge ){
+ if( pLvl->nMerge>nBest ){
+ iBestLvl = iLvl;
+ nBest = pLvl->nMerge;
+ }
+ break;
+ }
+ if( pLvl->nSeg>nBest ){
+ nBest = pLvl->nSeg;
+ iBestLvl = iLvl;
+ }
+ }
+
+ /* If nBest is still 0, then the index must be empty. */
+#ifdef SQLITE_DEBUG
+ for(iLvl=0; nBest==0 && iLvl<pStruct->nLevel; iLvl++){
+ assert( pStruct->aLevel[iLvl].nSeg==0 );
+ }
+#endif
+
+ if( nBest<p->pConfig->nAutomerge
+ && pStruct->aLevel[iBestLvl].nMerge==0
+ ){
+ break;
+ }
+ fts5IndexMergeLevel(p, &pStruct, iBestLvl, &nRem);
+ if( p->rc==SQLITE_OK && pStruct->aLevel[iBestLvl].nMerge==0 ){
+ fts5StructurePromote(p, iBestLvl+1, pStruct);
+ }
+ }
+ *ppStruct = pStruct;
+}
+
+/*
+** A total of nLeaf leaf pages of data has just been flushed to a level-0
+** segment. This function updates the write-counter accordingly and, if
+** necessary, performs incremental merge work.
+**
+** If an error occurs, set the Fts5Index.rc error code. If an error has
+** already occurred, this function is a no-op.
+*/
+static void fts5IndexAutomerge(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5Structure **ppStruct, /* IN/OUT: Current structure of index */
+ int nLeaf /* Number of output leaves just written */
+){
+ if( p->rc==SQLITE_OK && p->pConfig->nAutomerge>0 ){
+ Fts5Structure *pStruct = *ppStruct;
+ u64 nWrite; /* Initial value of write-counter */
+ int nWork; /* Number of work-quanta to perform */
+ int nRem; /* Number of leaf pages left to write */
+
+ /* Update the write-counter. While doing so, set nWork. */
+ nWrite = pStruct->nWriteCounter;
+ nWork = (int)(((nWrite + nLeaf) / p->nWorkUnit) - (nWrite / p->nWorkUnit));
+ pStruct->nWriteCounter += nLeaf;
+ nRem = (int)(p->nWorkUnit * nWork * pStruct->nLevel);
+
+ fts5IndexMerge(p, ppStruct, nRem);
+ }
+}
+
+static void fts5IndexCrisismerge(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5Structure **ppStruct /* IN/OUT: Current structure of index */
+){
+ const int nCrisis = p->pConfig->nCrisisMerge;
+ Fts5Structure *pStruct = *ppStruct;
+ int iLvl = 0;
+
+ assert( p->rc!=SQLITE_OK || pStruct->nLevel>0 );
+ while( p->rc==SQLITE_OK && pStruct->aLevel[iLvl].nSeg>=nCrisis ){
+ fts5IndexMergeLevel(p, &pStruct, iLvl, 0);
+ assert( p->rc!=SQLITE_OK || pStruct->nLevel>(iLvl+1) );
+ fts5StructurePromote(p, iLvl+1, pStruct);
+ iLvl++;
+ }
+ *ppStruct = pStruct;
+}
+
+static int fts5IndexReturn(Fts5Index *p){
+ int rc = p->rc;
+ p->rc = SQLITE_OK;
+ return rc;
+}
+
+typedef struct Fts5FlushCtx Fts5FlushCtx;
+struct Fts5FlushCtx {
+ Fts5Index *pIdx;
+ Fts5SegWriter writer;
+};
+
+/*
+** Buffer aBuf[] contains a list of varints, all small enough to fit
+** in a 32-bit integer. Return the size of the largest prefix of this
+** list nMax bytes or less in size.
+*/
+static int fts5PoslistPrefix(const u8 *aBuf, int nMax){
+ int ret;
+ u32 dummy;
+ ret = fts5GetVarint32(aBuf, dummy);
+ if( ret<nMax ){
+ while( 1 ){
+ int i = fts5GetVarint32(&aBuf[ret], dummy);
+ if( (ret + i) > nMax ) break;
+ ret += i;
+ }
+ }
+ return ret;
+}
+
+#define fts5BufferSafeAppendBlob(pBuf, pBlob, nBlob) { \
+ assert( (pBuf)->nSpace>=((pBuf)->n+nBlob) ); \
+ memcpy(&(pBuf)->p[(pBuf)->n], pBlob, nBlob); \
+ (pBuf)->n += nBlob; \
+}
+
+#define fts5BufferSafeAppendVarint(pBuf, iVal) { \
+ (pBuf)->n += sqlite3Fts5PutVarint(&(pBuf)->p[(pBuf)->n], (iVal)); \
+ assert( (pBuf)->nSpace>=(pBuf)->n ); \
+}
+
+/*
+** Flush the contents of in-memory hash table iHash to a new level-0
+** segment on disk. Also update the corresponding structure record.
+**
+** If an error occurs, set the Fts5Index.rc error code. If an error has
+** already occurred, this function is a no-op.
+*/
+static void fts5FlushOneHash(Fts5Index *p){
+ Fts5Hash *pHash = p->pHash;
+ Fts5Structure *pStruct;
+ int iSegid;
+ int pgnoLast = 0; /* Last leaf page number in segment */
+
+ /* Obtain a reference to the index structure and allocate a new segment-id
+ ** for the new level-0 segment. */
+ pStruct = fts5StructureRead(p);
+ iSegid = fts5AllocateSegid(p, pStruct);
+
+ if( iSegid ){
+ const int pgsz = p->pConfig->pgsz;
+
+ Fts5StructureSegment *pSeg; /* New segment within pStruct */
+ Fts5Buffer *pBuf; /* Buffer in which to assemble leaf page */
+ Fts5Buffer *pPgidx; /* Buffer in which to assemble pgidx */
+
+ Fts5SegWriter writer;
+ fts5WriteInit(p, &writer, iSegid);
+
+ pBuf = &writer.writer.buf;
+ pPgidx = &writer.writer.pgidx;
+
+ /* fts5WriteInit() should have initialized the buffers to (most likely)
+ ** the maximum space required. */
+ assert( p->rc || pBuf->nSpace>=(pgsz + FTS5_DATA_PADDING) );
+ assert( p->rc || pPgidx->nSpace>=(pgsz + FTS5_DATA_PADDING) );
+
+ /* Begin scanning through hash table entries. This loop runs once for each
+ ** term/doclist currently stored within the hash table. */
+ if( p->rc==SQLITE_OK ){
+ p->rc = sqlite3Fts5HashScanInit(pHash, 0, 0);
+ }
+ while( p->rc==SQLITE_OK && 0==sqlite3Fts5HashScanEof(pHash) ){
+ const char *zTerm; /* Buffer containing term */
+ const u8 *pDoclist; /* Pointer to doclist for this term */
+ int nDoclist; /* Size of doclist in bytes */
+
+ /* Write the term for this entry to disk. */
+ sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist);
+ fts5WriteAppendTerm(p, &writer, strlen(zTerm), (const u8*)zTerm);
+
+ assert( writer.bFirstRowidInPage==0 );
+ if( pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1) ){
+ /* The entire doclist will fit on the current leaf. */
+ fts5BufferSafeAppendBlob(pBuf, pDoclist, nDoclist);
+ }else{
+ i64 iRowid = 0;
+ i64 iDelta = 0;
+ int iOff = 0;
+
+ /* The entire doclist will not fit on this leaf. The following
+ ** loop iterates through the poslists that make up the current
+ ** doclist. */
+ while( p->rc==SQLITE_OK && iOff<nDoclist ){
+ int nPos;
+ int nCopy;
+ int bDummy;
+ iOff += fts5GetVarint(&pDoclist[iOff], (u64*)&iDelta);
+ nCopy = fts5GetPoslistSize(&pDoclist[iOff], &nPos, &bDummy);
+ nCopy += nPos;
+ iRowid += iDelta;
+
+ if( writer.bFirstRowidInPage ){
+ fts5PutU16(&pBuf->p[0], pBuf->n); /* first rowid on page */
+ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iRowid);
+ writer.bFirstRowidInPage = 0;
+ fts5WriteDlidxAppend(p, &writer, iRowid);
+ }else{
+ pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], iDelta);
+ }
+ assert( pBuf->n<=pBuf->nSpace );
+
+ if( (pBuf->n + pPgidx->n + nCopy) <= pgsz ){
+ /* The entire poslist will fit on the current leaf. So copy
+ ** it in one go. */
+ fts5BufferSafeAppendBlob(pBuf, &pDoclist[iOff], nCopy);
+ }else{
+ /* The entire poslist will not fit on this leaf. So it needs
+ ** to be broken into sections. The only qualification being
+ ** that each varint must be stored contiguously. */
+ const u8 *pPoslist = &pDoclist[iOff];
+ int iPos = 0;
+ while( p->rc==SQLITE_OK ){
+ int nSpace = pgsz - pBuf->n - pPgidx->n;
+ int n = 0;
+ if( (nCopy - iPos)<=nSpace ){
+ n = nCopy - iPos;
+ }else{
+ n = fts5PoslistPrefix(&pPoslist[iPos], nSpace);
+ }
+ assert( n>0 );
+ fts5BufferSafeAppendBlob(pBuf, &pPoslist[iPos], n);
+ iPos += n;
+ if( (pBuf->n + pPgidx->n)>=pgsz ){
+ fts5WriteFlushLeaf(p, &writer);
+ }
+ if( iPos>=nCopy ) break;
+ }
+ }
+ iOff += nCopy;
+ }
+ }
+
+ /* TODO2: Doclist terminator written here. */
+ /* pBuf->p[pBuf->n++] = '\0'; */
+ assert( pBuf->n<=pBuf->nSpace );
+ sqlite3Fts5HashScanNext(pHash);
+ }
+ sqlite3Fts5HashClear(pHash);
+ fts5WriteFinish(p, &writer, &pgnoLast);
+
+ /* Update the Fts5Structure. It is written back to the database by the
+ ** fts5StructureRelease() call below. */
+ if( pStruct->nLevel==0 ){
+ fts5StructureAddLevel(&p->rc, &pStruct);
+ }
+ fts5StructureExtendLevel(&p->rc, pStruct, 0, 1, 0);
+ if( p->rc==SQLITE_OK ){
+ pSeg = &pStruct->aLevel[0].aSeg[ pStruct->aLevel[0].nSeg++ ];
+ pSeg->iSegid = iSegid;
+ pSeg->pgnoFirst = 1;
+ pSeg->pgnoLast = pgnoLast;
+ pStruct->nSegment++;
+ }
+ fts5StructurePromote(p, 0, pStruct);
+ }
+
+ fts5IndexAutomerge(p, &pStruct, pgnoLast);
+ fts5IndexCrisismerge(p, &pStruct);
+ fts5StructureWrite(p, pStruct);
+ fts5StructureRelease(pStruct);
+}
+
+/*
+** Flush any data stored in the in-memory hash tables to the database.
+*/
+static void fts5IndexFlush(Fts5Index *p){
+ /* Unless it is empty, flush the hash table to disk */
+ if( p->nPendingData ){
+ assert( p->pHash );
+ p->nPendingData = 0;
+ fts5FlushOneHash(p);
+ }
+}
+
+
+static int sqlite3Fts5IndexOptimize(Fts5Index *p){
+ Fts5Structure *pStruct;
+ Fts5Structure *pNew = 0;
+ int nSeg = 0;
+
+ assert( p->rc==SQLITE_OK );
+ fts5IndexFlush(p);
+ pStruct = fts5StructureRead(p);
+
+ if( pStruct ){
+ assert( pStruct->nSegment==fts5StructureCountSegments(pStruct) );
+ nSeg = pStruct->nSegment;
+ if( nSeg>1 ){
+ int nByte = sizeof(Fts5Structure);
+ nByte += (pStruct->nLevel+1) * sizeof(Fts5StructureLevel);
+ pNew = (Fts5Structure*)sqlite3Fts5MallocZero(&p->rc, nByte);
+ }
+ }
+ if( pNew ){
+ Fts5StructureLevel *pLvl;
+ int nByte = nSeg * sizeof(Fts5StructureSegment);
+ pNew->nLevel = pStruct->nLevel+1;
+ pNew->nRef = 1;
+ pNew->nWriteCounter = pStruct->nWriteCounter;
+ pLvl = &pNew->aLevel[pStruct->nLevel];
+ pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&p->rc, nByte);
+ if( pLvl->aSeg ){
+ int iLvl, iSeg;
+ int iSegOut = 0;
+ for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){
+ for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){
+ pLvl->aSeg[iSegOut] = pStruct->aLevel[iLvl].aSeg[iSeg];
+ iSegOut++;
+ }
+ }
+ pNew->nSegment = pLvl->nSeg = nSeg;
+ }else{
+ sqlite3_free(pNew);
+ pNew = 0;
+ }
+ }
+
+ if( pNew ){
+ int iLvl = pNew->nLevel-1;
+ while( p->rc==SQLITE_OK && pNew->aLevel[iLvl].nSeg>0 ){
+ int nRem = FTS5_OPT_WORK_UNIT;
+ fts5IndexMergeLevel(p, &pNew, iLvl, &nRem);
+ }
+
+ fts5StructureWrite(p, pNew);
+ fts5StructureRelease(pNew);
+ }
+
+ fts5StructureRelease(pStruct);
+ return fts5IndexReturn(p);
+}
+
+static int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge){
+ Fts5Structure *pStruct;
+
+ pStruct = fts5StructureRead(p);
+ if( pStruct && pStruct->nLevel ){
+ fts5IndexMerge(p, &pStruct, nMerge);
+ fts5StructureWrite(p, pStruct);
+ }
+ fts5StructureRelease(pStruct);
+
+ return fts5IndexReturn(p);
+}
+
+static void fts5PoslistCallback(
+ Fts5Index *p,
+ void *pContext,
+ const u8 *pChunk, int nChunk
+){
+ assert_nc( nChunk>=0 );
+ if( nChunk>0 ){
+ fts5BufferSafeAppendBlob((Fts5Buffer*)pContext, pChunk, nChunk);
+ }
+}
+
+typedef struct PoslistCallbackCtx PoslistCallbackCtx;
+struct PoslistCallbackCtx {
+ Fts5Buffer *pBuf; /* Append to this buffer */
+ Fts5Colset *pColset; /* Restrict matches to this column */
+ int eState; /* See above */
+};
+
+/*
+** TODO: Make this more efficient!
+*/
+static int fts5IndexColsetTest(Fts5Colset *pColset, int iCol){
+ int i;
+ for(i=0; i<pColset->nCol; i++){
+ if( pColset->aiCol[i]==iCol ) return 1;
+ }
+ return 0;
+}
+
+static void fts5PoslistFilterCallback(
+ Fts5Index *p,
+ void *pContext,
+ const u8 *pChunk, int nChunk
+){
+ PoslistCallbackCtx *pCtx = (PoslistCallbackCtx*)pContext;
+ assert_nc( nChunk>=0 );
+ if( nChunk>0 ){
+ /* Search through to find the first varint with value 1. This is the
+ ** start of the next columns hits. */
+ int i = 0;
+ int iStart = 0;
+
+ if( pCtx->eState==2 ){
+ int iCol;
+ fts5FastGetVarint32(pChunk, i, iCol);
+ if( fts5IndexColsetTest(pCtx->pColset, iCol) ){
+ pCtx->eState = 1;
+ fts5BufferSafeAppendVarint(pCtx->pBuf, 1);
+ }else{
+ pCtx->eState = 0;
+ }
+ }
+
+ do {
+ while( i<nChunk && pChunk[i]!=0x01 ){
+ while( pChunk[i] & 0x80 ) i++;
+ i++;
+ }
+ if( pCtx->eState ){
+ fts5BufferSafeAppendBlob(pCtx->pBuf, &pChunk[iStart], i-iStart);
+ }
+ if( i<nChunk ){
+ int iCol;
+ iStart = i;
+ i++;
+ if( i>=nChunk ){
+ pCtx->eState = 2;
+ }else{
+ fts5FastGetVarint32(pChunk, i, iCol);
+ pCtx->eState = fts5IndexColsetTest(pCtx->pColset, iCol);
+ if( pCtx->eState ){
+ fts5BufferSafeAppendBlob(pCtx->pBuf, &pChunk[iStart], i-iStart);
+ iStart = i;
+ }
+ }
+ }
+ }while( i<nChunk );
+ }
+}
+
+/*
+** Iterator pIter currently points to a valid entry (not EOF). This
+** function appends the position list data for the current entry to
+** buffer pBuf. It does not make a copy of the position-list size
+** field.
+*/
+static void fts5SegiterPoslist(
+ Fts5Index *p,
+ Fts5SegIter *pSeg,
+ Fts5Colset *pColset,
+ Fts5Buffer *pBuf
+){
+ if( 0==fts5BufferGrow(&p->rc, pBuf, pSeg->nPos) ){
+ if( pColset==0 ){
+ fts5ChunkIterate(p, pSeg, (void*)pBuf, fts5PoslistCallback);
+ }else{
+ PoslistCallbackCtx sCtx;
+ sCtx.pBuf = pBuf;
+ sCtx.pColset = pColset;
+ sCtx.eState = pColset ? fts5IndexColsetTest(pColset, 0) : 1;
+ assert( sCtx.eState==0 || sCtx.eState==1 );
+ fts5ChunkIterate(p, pSeg, (void*)&sCtx, fts5PoslistFilterCallback);
+ }
+ }
+}
+
+/*
+** IN/OUT parameter (*pa) points to a position list n bytes in size. If
+** the position list contains entries for column iCol, then (*pa) is set
+** to point to the sub-position-list for that column and the number of
+** bytes in it returned. Or, if the argument position list does not
+** contain any entries for column iCol, return 0.
+*/
+static int fts5IndexExtractCol(
+ const u8 **pa, /* IN/OUT: Pointer to poslist */
+ int n, /* IN: Size of poslist in bytes */
+ int iCol /* Column to extract from poslist */
+){
+ int iCurrent = 0; /* Anything before the first 0x01 is col 0 */
+ const u8 *p = *pa;
+ const u8 *pEnd = &p[n]; /* One byte past end of position list */
+ u8 prev = 0;
+
+ while( iCol!=iCurrent ){
+ /* Advance pointer p until it points to pEnd or an 0x01 byte that is
+ ** not part of a varint */
+ while( (prev & 0x80) || *p!=0x01 ){
+ prev = *p++;
+ if( p==pEnd ) return 0;
+ }
+ *pa = p++;
+ p += fts5GetVarint32(p, iCurrent);
+ }
+
+ /* Advance pointer p until it points to pEnd or an 0x01 byte that is
+ ** not part of a varint */
+ assert( (prev & 0x80)==0 );
+ while( p<pEnd && ((prev & 0x80) || *p!=0x01) ){
+ prev = *p++;
+ }
+ return p - (*pa);
+}
+
+
+/*
+** Iterator pMulti currently points to a valid entry (not EOF). This
+** function appends the following to buffer pBuf:
+**
+** * The varint iDelta, and
+** * the position list that currently points to, including the size field.
+**
+** If argument pColset is NULL, then the position list is filtered according
+** to pColset before being appended to the buffer. If this means there are
+** no entries in the position list, nothing is appended to the buffer (not
+** even iDelta).
+**
+** If an error occurs, an error code is left in p->rc.
+*/
+static int fts5AppendPoslist(
+ Fts5Index *p,
+ i64 iDelta,
+ Fts5IndexIter *pMulti,
+ Fts5Colset *pColset,
+ Fts5Buffer *pBuf
+){
+ if( p->rc==SQLITE_OK ){
+ Fts5SegIter *pSeg = &pMulti->aSeg[ pMulti->aFirst[1].iFirst ];
+ assert( fts5MultiIterEof(p, pMulti)==0 );
+ assert( pSeg->nPos>0 );
+ if( 0==fts5BufferGrow(&p->rc, pBuf, pSeg->nPos+9+9) ){
+ int iSv1;
+ int iSv2;
+ int iData;
+
+ /* Append iDelta */
+ iSv1 = pBuf->n;
+ fts5BufferSafeAppendVarint(pBuf, iDelta);
+
+ /* WRITEPOSLISTSIZE */
+ iSv2 = pBuf->n;
+ fts5BufferSafeAppendVarint(pBuf, pSeg->nPos*2);
+ iData = pBuf->n;
+
+ if( pSeg->iLeafOffset+pSeg->nPos<=pSeg->pLeaf->szLeaf
+ && (pColset==0 || pColset->nCol==1)
+ ){
+ const u8 *pPos = &pSeg->pLeaf->p[pSeg->iLeafOffset];
+ int nPos;
+ if( pColset ){
+ nPos = fts5IndexExtractCol(&pPos, pSeg->nPos, pColset->aiCol[0]);
+ }else{
+ nPos = pSeg->nPos;
+ }
+ fts5BufferSafeAppendBlob(pBuf, pPos, nPos);
+ }else{
+ fts5SegiterPoslist(p, pSeg, pColset, pBuf);
+ }
+
+ if( pColset ){
+ int nActual = pBuf->n - iData;
+ if( nActual!=pSeg->nPos ){
+ if( nActual==0 ){
+ pBuf->n = iSv1;
+ return 1;
+ }else{
+ int nReq = sqlite3Fts5GetVarintLen((u32)(nActual*2));
+ while( iSv2<(iData-nReq) ){ pBuf->p[iSv2++] = 0x80; }
+ sqlite3Fts5PutVarint(&pBuf->p[iSv2], nActual*2);
+ }
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+static void fts5DoclistIterNext(Fts5DoclistIter *pIter){
+ u8 *p = pIter->aPoslist + pIter->nSize + pIter->nPoslist;
+
+ assert( pIter->aPoslist );
+ if( p>=pIter->aEof ){
+ pIter->aPoslist = 0;
+ }else{
+ i64 iDelta;
+
+ p += fts5GetVarint(p, (u64*)&iDelta);
+ pIter->iRowid += iDelta;
+
+ /* Read position list size */
+ if( p[0] & 0x80 ){
+ int nPos;
+ pIter->nSize = fts5GetVarint32(p, nPos);
+ pIter->nPoslist = (nPos>>1);
+ }else{
+ pIter->nPoslist = ((int)(p[0])) >> 1;
+ pIter->nSize = 1;
+ }
+
+ pIter->aPoslist = p;
+ }
+}
+
+static void fts5DoclistIterInit(
+ Fts5Buffer *pBuf,
+ Fts5DoclistIter *pIter
+){
+ memset(pIter, 0, sizeof(*pIter));
+ pIter->aPoslist = pBuf->p;
+ pIter->aEof = &pBuf->p[pBuf->n];
+ fts5DoclistIterNext(pIter);
+}
+
+#if 0
+/*
+** Append a doclist to buffer pBuf.
+**
+** This function assumes that space within the buffer has already been
+** allocated.
+*/
+static void fts5MergeAppendDocid(
+ Fts5Buffer *pBuf, /* Buffer to write to */
+ i64 *piLastRowid, /* IN/OUT: Previous rowid written (if any) */
+ i64 iRowid /* Rowid to append */
+){
+ assert( pBuf->n!=0 || (*piLastRowid)==0 );
+ fts5BufferSafeAppendVarint(pBuf, iRowid - *piLastRowid);
+ *piLastRowid = iRowid;
+}
+#endif
+
+#define fts5MergeAppendDocid(pBuf, iLastRowid, iRowid) { \
+ assert( (pBuf)->n!=0 || (iLastRowid)==0 ); \
+ fts5BufferSafeAppendVarint((pBuf), (iRowid) - (iLastRowid)); \
+ (iLastRowid) = (iRowid); \
+}
+
+/*
+** Buffers p1 and p2 contain doclists. This function merges the content
+** of the two doclists together and sets buffer p1 to the result before
+** returning.
+**
+** If an error occurs, an error code is left in p->rc. If an error has
+** already occurred, this function is a no-op.
+*/
+static void fts5MergePrefixLists(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5Buffer *p1, /* First list to merge */
+ Fts5Buffer *p2 /* Second list to merge */
+){
+ if( p2->n ){
+ i64 iLastRowid = 0;
+ Fts5DoclistIter i1;
+ Fts5DoclistIter i2;
+ Fts5Buffer out;
+ Fts5Buffer tmp;
+ memset(&out, 0, sizeof(out));
+ memset(&tmp, 0, sizeof(tmp));
+
+ sqlite3Fts5BufferGrow(&p->rc, &out, p1->n + p2->n);
+ fts5DoclistIterInit(p1, &i1);
+ fts5DoclistIterInit(p2, &i2);
+ while( p->rc==SQLITE_OK && (i1.aPoslist!=0 || i2.aPoslist!=0) ){
+ if( i2.aPoslist==0 || (i1.aPoslist && i1.iRowid<i2.iRowid) ){
+ /* Copy entry from i1 */
+ fts5MergeAppendDocid(&out, iLastRowid, i1.iRowid);
+ fts5BufferSafeAppendBlob(&out, i1.aPoslist, i1.nPoslist+i1.nSize);
+ fts5DoclistIterNext(&i1);
+ }
+ else if( i1.aPoslist==0 || i2.iRowid!=i1.iRowid ){
+ /* Copy entry from i2 */
+ fts5MergeAppendDocid(&out, iLastRowid, i2.iRowid);
+ fts5BufferSafeAppendBlob(&out, i2.aPoslist, i2.nPoslist+i2.nSize);
+ fts5DoclistIterNext(&i2);
+ }
+ else{
+ i64 iPos1 = 0;
+ i64 iPos2 = 0;
+ int iOff1 = 0;
+ int iOff2 = 0;
+ u8 *a1 = &i1.aPoslist[i1.nSize];
+ u8 *a2 = &i2.aPoslist[i2.nSize];
+
+ Fts5PoslistWriter writer;
+ memset(&writer, 0, sizeof(writer));
+
+ /* Merge the two position lists. */
+ fts5MergeAppendDocid(&out, iLastRowid, i2.iRowid);
+ fts5BufferZero(&tmp);
+
+ sqlite3Fts5PoslistNext64(a1, i1.nPoslist, &iOff1, &iPos1);
+ sqlite3Fts5PoslistNext64(a2, i2.nPoslist, &iOff2, &iPos2);
+
+ while( p->rc==SQLITE_OK && (iPos1>=0 || iPos2>=0) ){
+ i64 iNew;
+ if( iPos2<0 || (iPos1>=0 && iPos1<iPos2) ){
+ iNew = iPos1;
+ sqlite3Fts5PoslistNext64(a1, i1.nPoslist, &iOff1, &iPos1);
+ }else{
+ iNew = iPos2;
+ sqlite3Fts5PoslistNext64(a2, i2.nPoslist, &iOff2, &iPos2);
+ if( iPos1==iPos2 ){
+ sqlite3Fts5PoslistNext64(a1, i1.nPoslist, &iOff1,&iPos1);
+ }
+ }
+ p->rc = sqlite3Fts5PoslistWriterAppend(&tmp, &writer, iNew);
+ }
+
+ /* WRITEPOSLISTSIZE */
+ fts5BufferSafeAppendVarint(&out, tmp.n * 2);
+ fts5BufferSafeAppendBlob(&out, tmp.p, tmp.n);
+ fts5DoclistIterNext(&i1);
+ fts5DoclistIterNext(&i2);
+ }
+ }
+
+ fts5BufferSet(&p->rc, p1, out.n, out.p);
+ fts5BufferFree(&tmp);
+ fts5BufferFree(&out);
+ }
+}
+
+static void fts5BufferSwap(Fts5Buffer *p1, Fts5Buffer *p2){
+ Fts5Buffer tmp = *p1;
+ *p1 = *p2;
+ *p2 = tmp;
+}
+
+static void fts5SetupPrefixIter(
+ Fts5Index *p, /* Index to read from */
+ int bDesc, /* True for "ORDER BY rowid DESC" */
+ const u8 *pToken, /* Buffer containing prefix to match */
+ int nToken, /* Size of buffer pToken in bytes */
+ Fts5Colset *pColset, /* Restrict matches to these columns */
+ Fts5IndexIter **ppIter /* OUT: New iterator */
+){
+ Fts5Structure *pStruct;
+ Fts5Buffer *aBuf;
+ const int nBuf = 32;
+
+ aBuf = (Fts5Buffer*)fts5IdxMalloc(p, sizeof(Fts5Buffer)*nBuf);
+ pStruct = fts5StructureRead(p);
+
+ if( aBuf && pStruct ){
+ const int flags = FTS5INDEX_QUERY_SCAN;
+ int i;
+ i64 iLastRowid = 0;
+ Fts5IndexIter *p1 = 0; /* Iterator used to gather data from index */
+ Fts5Data *pData;
+ Fts5Buffer doclist;
+
+ memset(&doclist, 0, sizeof(doclist));
+ for(fts5MultiIterNew(p, pStruct, 1, flags, pToken, nToken, -1, 0, &p1);
+ fts5MultiIterEof(p, p1)==0;
+ fts5MultiIterNext(p, p1, 0, 0)
+ ){
+ i64 iRowid = fts5MultiIterRowid(p1);
+ int nTerm;
+ const u8 *pTerm = fts5MultiIterTerm(p1, &nTerm);
+ assert_nc( memcmp(pToken, pTerm, MIN(nToken, nTerm))<=0 );
+ if( nTerm<nToken || memcmp(pToken, pTerm, nToken) ) break;
+
+ if( doclist.n>0 && iRowid<=iLastRowid ){
+ for(i=0; p->rc==SQLITE_OK && doclist.n; i++){
+ assert( i<nBuf );
+ if( aBuf[i].n==0 ){
+ fts5BufferSwap(&doclist, &aBuf[i]);
+ fts5BufferZero(&doclist);
+ }else{
+ fts5MergePrefixLists(p, &doclist, &aBuf[i]);
+ fts5BufferZero(&aBuf[i]);
+ }
+ }
+ iLastRowid = 0;
+ }
+
+ if( !fts5AppendPoslist(p, iRowid-iLastRowid, p1, pColset, &doclist) ){
+ iLastRowid = iRowid;
+ }
+ }
+
+ for(i=0; i<nBuf; i++){
+ if( p->rc==SQLITE_OK ){
+ fts5MergePrefixLists(p, &doclist, &aBuf[i]);
+ }
+ fts5BufferFree(&aBuf[i]);
+ }
+ fts5MultiIterFree(p, p1);
+
+ pData = fts5IdxMalloc(p, sizeof(Fts5Data) + doclist.n);
+ if( pData ){
+ pData->p = (u8*)&pData[1];
+ pData->nn = pData->szLeaf = doclist.n;
+ memcpy(pData->p, doclist.p, doclist.n);
+ fts5MultiIterNew2(p, pData, bDesc, ppIter);
+ }
+ fts5BufferFree(&doclist);
+ }
+
+ fts5StructureRelease(pStruct);
+ sqlite3_free(aBuf);
+}
+
+
+/*
+** Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain
+** to the document with rowid iRowid.
+*/
+static int sqlite3Fts5IndexBeginWrite(Fts5Index *p, int bDelete, i64 iRowid){
+ assert( p->rc==SQLITE_OK );
+
+ /* Allocate the hash table if it has not already been allocated */
+ if( p->pHash==0 ){
+ p->rc = sqlite3Fts5HashNew(&p->pHash, &p->nPendingData);
+ }
+
+ /* Flush the hash table to disk if required */
+ if( iRowid<p->iWriteRowid
+ || (iRowid==p->iWriteRowid && p->bDelete==0)
+ || (p->nPendingData > p->nMaxPendingData)
+ ){
+ fts5IndexFlush(p);
+ }
+
+ p->iWriteRowid = iRowid;
+ p->bDelete = bDelete;
+ return fts5IndexReturn(p);
+}
+
+/*
+** Commit data to disk.
+*/
+static int sqlite3Fts5IndexSync(Fts5Index *p, int bCommit){
+ assert( p->rc==SQLITE_OK );
+ fts5IndexFlush(p);
+ if( bCommit ) fts5CloseReader(p);
+ return fts5IndexReturn(p);
+}
+
+/*
+** Discard any data stored in the in-memory hash tables. Do not write it
+** to the database. Additionally, assume that the contents of the %_data
+** table may have changed on disk. So any in-memory caches of %_data
+** records must be invalidated.
+*/
+static int sqlite3Fts5IndexRollback(Fts5Index *p){
+ fts5CloseReader(p);
+ fts5IndexDiscardData(p);
+ assert( p->rc==SQLITE_OK );
+ return SQLITE_OK;
+}
+
+/*
+** The %_data table is completely empty when this function is called. This
+** function populates it with the initial structure objects for each index,
+** and the initial version of the "averages" record (a zero-byte blob).
+*/
+static int sqlite3Fts5IndexReinit(Fts5Index *p){
+ Fts5Structure s;
+ memset(&s, 0, sizeof(Fts5Structure));
+ fts5DataWrite(p, FTS5_AVERAGES_ROWID, (const u8*)"", 0);
+ fts5StructureWrite(p, &s);
+ return fts5IndexReturn(p);
+}
+
+/*
+** Open a new Fts5Index handle. If the bCreate argument is true, create
+** and initialize the underlying %_data table.
+**
+** If successful, set *pp to point to the new object and return SQLITE_OK.
+** Otherwise, set *pp to NULL and return an SQLite error code.
+*/
+static int sqlite3Fts5IndexOpen(
+ Fts5Config *pConfig,
+ int bCreate,
+ Fts5Index **pp,
+ char **pzErr
+){
+ int rc = SQLITE_OK;
+ Fts5Index *p; /* New object */
+
+ *pp = p = (Fts5Index*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Index));
+ if( rc==SQLITE_OK ){
+ p->pConfig = pConfig;
+ p->nWorkUnit = FTS5_WORK_UNIT;
+ p->nMaxPendingData = 1024*1024;
+ p->zDataTbl = sqlite3Fts5Mprintf(&rc, "%s_data", pConfig->zName);
+ if( p->zDataTbl && bCreate ){
+ rc = sqlite3Fts5CreateTable(
+ pConfig, "data", "id INTEGER PRIMARY KEY, block BLOB", 0, pzErr
+ );
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5CreateTable(pConfig, "idx",
+ "segid, term, pgno, PRIMARY KEY(segid, term)",
+ 1, pzErr
+ );
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5IndexReinit(p);
+ }
+ }
+ }
+
+ assert( rc!=SQLITE_OK || p->rc==SQLITE_OK );
+ if( rc ){
+ sqlite3Fts5IndexClose(p);
+ *pp = 0;
+ }
+ return rc;
+}
+
+/*
+** Close a handle opened by an earlier call to sqlite3Fts5IndexOpen().
+*/
+static int sqlite3Fts5IndexClose(Fts5Index *p){
+ int rc = SQLITE_OK;
+ if( p ){
+ assert( p->pReader==0 );
+ sqlite3_finalize(p->pWriter);
+ sqlite3_finalize(p->pDeleter);
+ sqlite3_finalize(p->pIdxWriter);
+ sqlite3_finalize(p->pIdxDeleter);
+ sqlite3_finalize(p->pIdxSelect);
+ sqlite3Fts5HashFree(p->pHash);
+ sqlite3_free(p->zDataTbl);
+ sqlite3_free(p);
+ }
+ return rc;
+}
+
+/*
+** Argument p points to a buffer containing utf-8 text that is n bytes in
+** size. Return the number of bytes in the nChar character prefix of the
+** buffer, or 0 if there are less than nChar characters in total.
+*/
+static int fts5IndexCharlenToBytelen(const char *p, int nByte, int nChar){
+ int n = 0;
+ int i;
+ for(i=0; i<nChar; i++){
+ if( n>=nByte ) return 0; /* Input contains fewer than nChar chars */
+ if( (unsigned char)p[n++]>=0xc0 ){
+ while( (p[n] & 0xc0)==0x80 ) n++;
+ }
+ }
+ return n;
+}
+
+/*
+** pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of
+** unicode characters in the string.
+*/
+static int fts5IndexCharlen(const char *pIn, int nIn){
+ int nChar = 0;
+ int i = 0;
+ while( i<nIn ){
+ if( (unsigned char)pIn[i++]>=0xc0 ){
+ while( i<nIn && (pIn[i] & 0xc0)==0x80 ) i++;
+ }
+ nChar++;
+ }
+ return nChar;
+}
+
+/*
+** Insert or remove data to or from the index. Each time a document is
+** added to or removed from the index, this function is called one or more
+** times.
+**
+** For an insert, it must be called once for each token in the new document.
+** If the operation is a delete, it must be called (at least) once for each
+** unique token in the document with an iCol value less than zero. The iPos
+** argument is ignored for a delete.
+*/
+static int sqlite3Fts5IndexWrite(
+ Fts5Index *p, /* Index to write to */
+ int iCol, /* Column token appears in (-ve -> delete) */
+ int iPos, /* Position of token within column */
+ const char *pToken, int nToken /* Token to add or remove to or from index */
+){
+ int i; /* Used to iterate through indexes */
+ int rc = SQLITE_OK; /* Return code */
+ Fts5Config *pConfig = p->pConfig;
+
+ assert( p->rc==SQLITE_OK );
+ assert( (iCol<0)==p->bDelete );
+
+ /* Add the entry to the main terms index. */
+ rc = sqlite3Fts5HashWrite(
+ p->pHash, p->iWriteRowid, iCol, iPos, FTS5_MAIN_PREFIX, pToken, nToken
+ );
+
+ for(i=0; i<pConfig->nPrefix && rc==SQLITE_OK; i++){
+ int nByte = fts5IndexCharlenToBytelen(pToken, nToken, pConfig->aPrefix[i]);
+ if( nByte ){
+ rc = sqlite3Fts5HashWrite(p->pHash,
+ p->iWriteRowid, iCol, iPos, FTS5_MAIN_PREFIX+i+1, pToken, nByte
+ );
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Open a new iterator to iterate though all rowid that match the
+** specified token or token prefix.
+*/
+static int sqlite3Fts5IndexQuery(
+ Fts5Index *p, /* FTS index to query */
+ const char *pToken, int nToken, /* Token (or prefix) to query for */
+ int flags, /* Mask of FTS5INDEX_QUERY_X flags */
+ Fts5Colset *pColset, /* Match these columns only */
+ Fts5IndexIter **ppIter /* OUT: New iterator object */
+){
+ Fts5Config *pConfig = p->pConfig;
+ Fts5IndexIter *pRet = 0;
+ int iIdx = 0;
+ Fts5Buffer buf = {0, 0, 0};
+
+ /* If the QUERY_SCAN flag is set, all other flags must be clear. */
+ assert( (flags & FTS5INDEX_QUERY_SCAN)==0
+ || (flags & FTS5INDEX_QUERY_SCAN)==FTS5INDEX_QUERY_SCAN
+ );
+
+ if( sqlite3Fts5BufferGrow(&p->rc, &buf, nToken+1)==0 ){
+ memcpy(&buf.p[1], pToken, nToken);
+
+#ifdef SQLITE_DEBUG
+ /* If the QUERY_TEST_NOIDX flag was specified, then this must be a
+ ** prefix-query. Instead of using a prefix-index (if one exists),
+ ** evaluate the prefix query using the main FTS index. This is used
+ ** for internal sanity checking by the integrity-check in debug
+ ** mode only. */
+ if( pConfig->bPrefixIndex==0 || (flags & FTS5INDEX_QUERY_TEST_NOIDX) ){
+ assert( flags & FTS5INDEX_QUERY_PREFIX );
+ iIdx = 1+pConfig->nPrefix;
+ }else
+#endif
+ if( flags & FTS5INDEX_QUERY_PREFIX ){
+ int nChar = fts5IndexCharlen(pToken, nToken);
+ for(iIdx=1; iIdx<=pConfig->nPrefix; iIdx++){
+ if( pConfig->aPrefix[iIdx-1]==nChar ) break;
+ }
+ }
+
+ if( iIdx<=pConfig->nPrefix ){
+ Fts5Structure *pStruct = fts5StructureRead(p);
+ buf.p[0] = FTS5_MAIN_PREFIX + iIdx;
+ if( pStruct ){
+ fts5MultiIterNew(p, pStruct, 1, flags, buf.p, nToken+1, -1, 0, &pRet);
+ fts5StructureRelease(pStruct);
+ }
+ }else{
+ int bDesc = (flags & FTS5INDEX_QUERY_DESC)!=0;
+ buf.p[0] = FTS5_MAIN_PREFIX;
+ fts5SetupPrefixIter(p, bDesc, buf.p, nToken+1, pColset, &pRet);
+ }
+
+ if( p->rc ){
+ sqlite3Fts5IterClose(pRet);
+ pRet = 0;
+ fts5CloseReader(p);
+ }
+ *ppIter = pRet;
+ sqlite3Fts5BufferFree(&buf);
+ }
+ return fts5IndexReturn(p);
+}
+
+/*
+** Return true if the iterator passed as the only argument is at EOF.
+*/
+static int sqlite3Fts5IterEof(Fts5IndexIter *pIter){
+ assert( pIter->pIndex->rc==SQLITE_OK );
+ return pIter->bEof;
+}
+
+/*
+** Move to the next matching rowid.
+*/
+static int sqlite3Fts5IterNext(Fts5IndexIter *pIter){
+ assert( pIter->pIndex->rc==SQLITE_OK );
+ fts5MultiIterNext(pIter->pIndex, pIter, 0, 0);
+ return fts5IndexReturn(pIter->pIndex);
+}
+
+/*
+** Move to the next matching term/rowid. Used by the fts5vocab module.
+*/
+static int sqlite3Fts5IterNextScan(Fts5IndexIter *pIter){
+ Fts5Index *p = pIter->pIndex;
+
+ assert( pIter->pIndex->rc==SQLITE_OK );
+
+ fts5MultiIterNext(p, pIter, 0, 0);
+ if( p->rc==SQLITE_OK ){
+ Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ if( pSeg->pLeaf && pSeg->term.p[0]!=FTS5_MAIN_PREFIX ){
+ fts5DataRelease(pSeg->pLeaf);
+ pSeg->pLeaf = 0;
+ pIter->bEof = 1;
+ }
+ }
+
+ return fts5IndexReturn(pIter->pIndex);
+}
+
+/*
+** Move to the next matching rowid that occurs at or after iMatch. The
+** definition of "at or after" depends on whether this iterator iterates
+** in ascending or descending rowid order.
+*/
+static int sqlite3Fts5IterNextFrom(Fts5IndexIter *pIter, i64 iMatch){
+ fts5MultiIterNextFrom(pIter->pIndex, pIter, iMatch);
+ return fts5IndexReturn(pIter->pIndex);
+}
+
+/*
+** Return the current rowid.
+*/
+static i64 sqlite3Fts5IterRowid(Fts5IndexIter *pIter){
+ return fts5MultiIterRowid(pIter);
+}
+
+/*
+** Return the current term.
+*/
+static const char *sqlite3Fts5IterTerm(Fts5IndexIter *pIter, int *pn){
+ int n;
+ const char *z = (const char*)fts5MultiIterTerm(pIter, &n);
+ *pn = n-1;
+ return &z[1];
+}
+
+
+static int fts5IndexExtractColset (
+ Fts5Colset *pColset, /* Colset to filter on */
+ const u8 *pPos, int nPos, /* Position list */
+ Fts5Buffer *pBuf /* Output buffer */
+){
+ int rc = SQLITE_OK;
+ int i;
+
+ fts5BufferZero(pBuf);
+ for(i=0; i<pColset->nCol; i++){
+ const u8 *pSub = pPos;
+ int nSub = fts5IndexExtractCol(&pSub, nPos, pColset->aiCol[i]);
+ if( nSub ){
+ fts5BufferAppendBlob(&rc, pBuf, nSub, pSub);
+ }
+ }
+ return rc;
+}
+
+
+/*
+** Return a pointer to a buffer containing a copy of the position list for
+** the current entry. Output variable *pn is set to the size of the buffer
+** in bytes before returning.
+**
+** The returned position list does not include the "number of bytes" varint
+** field that starts the position list on disk.
+*/
+static int sqlite3Fts5IterPoslist(
+ Fts5IndexIter *pIter,
+ Fts5Colset *pColset, /* Column filter (or NULL) */
+ const u8 **pp, /* OUT: Pointer to position-list data */
+ int *pn, /* OUT: Size of position-list in bytes */
+ i64 *piRowid /* OUT: Current rowid */
+){
+ Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ assert( pIter->pIndex->rc==SQLITE_OK );
+ *piRowid = pSeg->iRowid;
+ if( pSeg->iLeafOffset+pSeg->nPos<=pSeg->pLeaf->szLeaf ){
+ u8 *pPos = &pSeg->pLeaf->p[pSeg->iLeafOffset];
+ if( pColset==0 || pIter->bFiltered ){
+ *pn = pSeg->nPos;
+ *pp = pPos;
+ }else if( pColset->nCol==1 ){
+ *pp = pPos;
+ *pn = fts5IndexExtractCol(pp, pSeg->nPos, pColset->aiCol[0]);
+ }else{
+ fts5BufferZero(&pIter->poslist);
+ fts5IndexExtractColset(pColset, pPos, pSeg->nPos, &pIter->poslist);
+ *pp = pIter->poslist.p;
+ *pn = pIter->poslist.n;
+ }
+ }else{
+ fts5BufferZero(&pIter->poslist);
+ fts5SegiterPoslist(pIter->pIndex, pSeg, pColset, &pIter->poslist);
+ *pp = pIter->poslist.p;
+ *pn = pIter->poslist.n;
+ }
+ return fts5IndexReturn(pIter->pIndex);
+}
+
+/*
+** This function is similar to sqlite3Fts5IterPoslist(), except that it
+** copies the position list into the buffer supplied as the second
+** argument.
+*/
+static int sqlite3Fts5IterPoslistBuffer(Fts5IndexIter *pIter, Fts5Buffer *pBuf){
+ Fts5Index *p = pIter->pIndex;
+ Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ];
+ assert( p->rc==SQLITE_OK );
+ fts5BufferZero(pBuf);
+ fts5SegiterPoslist(p, pSeg, 0, pBuf);
+ return fts5IndexReturn(p);
+}
+
+/*
+** Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery().
+*/
+static void sqlite3Fts5IterClose(Fts5IndexIter *pIter){
+ if( pIter ){
+ Fts5Index *pIndex = pIter->pIndex;
+ fts5MultiIterFree(pIter->pIndex, pIter);
+ fts5CloseReader(pIndex);
+ }
+}
+
+/*
+** Read and decode the "averages" record from the database.
+**
+** Parameter anSize must point to an array of size nCol, where nCol is
+** the number of user defined columns in the FTS table.
+*/
+static int sqlite3Fts5IndexGetAverages(Fts5Index *p, i64 *pnRow, i64 *anSize){
+ int nCol = p->pConfig->nCol;
+ Fts5Data *pData;
+
+ *pnRow = 0;
+ memset(anSize, 0, sizeof(i64) * nCol);
+ pData = fts5DataRead(p, FTS5_AVERAGES_ROWID);
+ if( p->rc==SQLITE_OK && pData->nn ){
+ int i = 0;
+ int iCol;
+ i += fts5GetVarint(&pData->p[i], (u64*)pnRow);
+ for(iCol=0; i<pData->nn && iCol<nCol; iCol++){
+ i += fts5GetVarint(&pData->p[i], (u64*)&anSize[iCol]);
+ }
+ }
+
+ fts5DataRelease(pData);
+ return fts5IndexReturn(p);
+}
+
+/*
+** Replace the current "averages" record with the contents of the buffer
+** supplied as the second argument.
+*/
+static int sqlite3Fts5IndexSetAverages(Fts5Index *p, const u8 *pData, int nData){
+ assert( p->rc==SQLITE_OK );
+ fts5DataWrite(p, FTS5_AVERAGES_ROWID, pData, nData);
+ return fts5IndexReturn(p);
+}
+
+/*
+** Return the total number of blocks this module has read from the %_data
+** table since it was created.
+*/
+static int sqlite3Fts5IndexReads(Fts5Index *p){
+ return p->nRead;
+}
+
+/*
+** Set the 32-bit cookie value stored at the start of all structure
+** records to the value passed as the second argument.
+**
+** Return SQLITE_OK if successful, or an SQLite error code if an error
+** occurs.
+*/
+static int sqlite3Fts5IndexSetCookie(Fts5Index *p, int iNew){
+ int rc; /* Return code */
+ Fts5Config *pConfig = p->pConfig; /* Configuration object */
+ u8 aCookie[4]; /* Binary representation of iNew */
+ sqlite3_blob *pBlob = 0;
+
+ assert( p->rc==SQLITE_OK );
+ sqlite3Fts5Put32(aCookie, iNew);
+
+ rc = sqlite3_blob_open(pConfig->db, pConfig->zDb, p->zDataTbl,
+ "block", FTS5_STRUCTURE_ROWID, 1, &pBlob
+ );
+ if( rc==SQLITE_OK ){
+ sqlite3_blob_write(pBlob, aCookie, 4, 0);
+ rc = sqlite3_blob_close(pBlob);
+ }
+
+ return rc;
+}
+
+static int sqlite3Fts5IndexLoadConfig(Fts5Index *p){
+ Fts5Structure *pStruct;
+ pStruct = fts5StructureRead(p);
+ fts5StructureRelease(pStruct);
+ return fts5IndexReturn(p);
+}
+
+
+/*************************************************************************
+**************************************************************************
+** Below this point is the implementation of the integrity-check
+** functionality.
+*/
+
+/*
+** Return a simple checksum value based on the arguments.
+*/
+static u64 fts5IndexEntryCksum(
+ i64 iRowid,
+ int iCol,
+ int iPos,
+ int iIdx,
+ const char *pTerm,
+ int nTerm
+){
+ int i;
+ u64 ret = iRowid;
+ ret += (ret<<3) + iCol;
+ ret += (ret<<3) + iPos;
+ if( iIdx>=0 ) ret += (ret<<3) + (FTS5_MAIN_PREFIX + iIdx);
+ for(i=0; i<nTerm; i++) ret += (ret<<3) + pTerm[i];
+ return ret;
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** This function is purely an internal test. It does not contribute to
+** FTS functionality, or even the integrity-check, in any way.
+**
+** Instead, it tests that the same set of pgno/rowid combinations are
+** visited regardless of whether the doclist-index identified by parameters
+** iSegid/iLeaf is iterated in forwards or reverse order.
+*/
+static void fts5TestDlidxReverse(
+ Fts5Index *p,
+ int iSegid, /* Segment id to load from */
+ int iLeaf /* Load doclist-index for this leaf */
+){
+ Fts5DlidxIter *pDlidx = 0;
+ u64 cksum1 = 13;
+ u64 cksum2 = 13;
+
+ for(pDlidx=fts5DlidxIterInit(p, 0, iSegid, iLeaf);
+ fts5DlidxIterEof(p, pDlidx)==0;
+ fts5DlidxIterNext(p, pDlidx)
+ ){
+ i64 iRowid = fts5DlidxIterRowid(pDlidx);
+ int pgno = fts5DlidxIterPgno(pDlidx);
+ assert( pgno>iLeaf );
+ cksum1 += iRowid + ((i64)pgno<<32);
+ }
+ fts5DlidxIterFree(pDlidx);
+ pDlidx = 0;
+
+ for(pDlidx=fts5DlidxIterInit(p, 1, iSegid, iLeaf);
+ fts5DlidxIterEof(p, pDlidx)==0;
+ fts5DlidxIterPrev(p, pDlidx)
+ ){
+ i64 iRowid = fts5DlidxIterRowid(pDlidx);
+ int pgno = fts5DlidxIterPgno(pDlidx);
+ assert( fts5DlidxIterPgno(pDlidx)>iLeaf );
+ cksum2 += iRowid + ((i64)pgno<<32);
+ }
+ fts5DlidxIterFree(pDlidx);
+ pDlidx = 0;
+
+ if( p->rc==SQLITE_OK && cksum1!=cksum2 ) p->rc = FTS5_CORRUPT;
+}
+
+static int fts5QueryCksum(
+ Fts5Index *p, /* Fts5 index object */
+ int iIdx,
+ const char *z, /* Index key to query for */
+ int n, /* Size of index key in bytes */
+ int flags, /* Flags for Fts5IndexQuery */
+ u64 *pCksum /* IN/OUT: Checksum value */
+){
+ u64 cksum = *pCksum;
+ Fts5IndexIter *pIdxIter = 0;
+ int rc = sqlite3Fts5IndexQuery(p, z, n, flags, 0, &pIdxIter);
+
+ while( rc==SQLITE_OK && 0==sqlite3Fts5IterEof(pIdxIter) ){
+ i64 dummy;
+ const u8 *pPos;
+ int nPos;
+ i64 rowid = sqlite3Fts5IterRowid(pIdxIter);
+ rc = sqlite3Fts5IterPoslist(pIdxIter, 0, &pPos, &nPos, &dummy);
+ if( rc==SQLITE_OK ){
+ Fts5PoslistReader sReader;
+ for(sqlite3Fts5PoslistReaderInit(pPos, nPos, &sReader);
+ sReader.bEof==0;
+ sqlite3Fts5PoslistReaderNext(&sReader)
+ ){
+ int iCol = FTS5_POS2COLUMN(sReader.iPos);
+ int iOff = FTS5_POS2OFFSET(sReader.iPos);
+ cksum ^= fts5IndexEntryCksum(rowid, iCol, iOff, iIdx, z, n);
+ }
+ rc = sqlite3Fts5IterNext(pIdxIter);
+ }
+ }
+ sqlite3Fts5IterClose(pIdxIter);
+
+ *pCksum = cksum;
+ return rc;
+}
+
+
+/*
+** This function is also purely an internal test. It does not contribute to
+** FTS functionality, or even the integrity-check, in any way.
+*/
+static void fts5TestTerm(
+ Fts5Index *p,
+ Fts5Buffer *pPrev, /* Previous term */
+ const char *z, int n, /* Possibly new term to test */
+ u64 expected,
+ u64 *pCksum
+){
+ int rc = p->rc;
+ if( pPrev->n==0 ){
+ fts5BufferSet(&rc, pPrev, n, (const u8*)z);
+ }else
+ if( rc==SQLITE_OK && (pPrev->n!=n || memcmp(pPrev->p, z, n)) ){
+ u64 cksum3 = *pCksum;
+ const char *zTerm = (const char*)&pPrev->p[1]; /* term sans prefix-byte */
+ int nTerm = pPrev->n-1; /* Size of zTerm in bytes */
+ int iIdx = (pPrev->p[0] - FTS5_MAIN_PREFIX);
+ int flags = (iIdx==0 ? 0 : FTS5INDEX_QUERY_PREFIX);
+ u64 ck1 = 0;
+ u64 ck2 = 0;
+
+ /* Check that the results returned for ASC and DESC queries are
+ ** the same. If not, call this corruption. */
+ rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, flags, &ck1);
+ if( rc==SQLITE_OK ){
+ int f = flags|FTS5INDEX_QUERY_DESC;
+ rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, f, &ck2);
+ }
+ if( rc==SQLITE_OK && ck1!=ck2 ) rc = FTS5_CORRUPT;
+
+ /* If this is a prefix query, check that the results returned if the
+ ** the index is disabled are the same. In both ASC and DESC order.
+ **
+ ** This check may only be performed if the hash table is empty. This
+ ** is because the hash table only supports a single scan query at
+ ** a time, and the multi-iter loop from which this function is called
+ ** is already performing such a scan. */
+ if( p->nPendingData==0 ){
+ if( iIdx>0 && rc==SQLITE_OK ){
+ int f = flags|FTS5INDEX_QUERY_TEST_NOIDX;
+ ck2 = 0;
+ rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, f, &ck2);
+ if( rc==SQLITE_OK && ck1!=ck2 ) rc = FTS5_CORRUPT;
+ }
+ if( iIdx>0 && rc==SQLITE_OK ){
+ int f = flags|FTS5INDEX_QUERY_TEST_NOIDX|FTS5INDEX_QUERY_DESC;
+ ck2 = 0;
+ rc = fts5QueryCksum(p, iIdx, zTerm, nTerm, f, &ck2);
+ if( rc==SQLITE_OK && ck1!=ck2 ) rc = FTS5_CORRUPT;
+ }
+ }
+
+ cksum3 ^= ck1;
+ fts5BufferSet(&rc, pPrev, n, (const u8*)z);
+
+ if( rc==SQLITE_OK && cksum3!=expected ){
+ rc = FTS5_CORRUPT;
+ }
+ *pCksum = cksum3;
+ }
+ p->rc = rc;
+}
+
+#else
+# define fts5TestDlidxReverse(x,y,z)
+# define fts5TestTerm(u,v,w,x,y,z)
+#endif
+
+/*
+** Check that:
+**
+** 1) All leaves of pSeg between iFirst and iLast (inclusive) exist and
+** contain zero terms.
+** 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and
+** contain zero rowids.
+*/
+static void fts5IndexIntegrityCheckEmpty(
+ Fts5Index *p,
+ Fts5StructureSegment *pSeg, /* Segment to check internal consistency */
+ int iFirst,
+ int iNoRowid,
+ int iLast
+){
+ int i;
+
+ /* Now check that the iter.nEmpty leaves following the current leaf
+ ** (a) exist and (b) contain no terms. */
+ for(i=iFirst; p->rc==SQLITE_OK && i<=iLast; i++){
+ Fts5Data *pLeaf = fts5DataRead(p, FTS5_SEGMENT_ROWID(pSeg->iSegid, i));
+ if( pLeaf ){
+ if( !fts5LeafIsTermless(pLeaf) ) p->rc = FTS5_CORRUPT;
+ if( i>=iNoRowid && 0!=fts5LeafFirstRowidOff(pLeaf) ) p->rc = FTS5_CORRUPT;
+ }
+ fts5DataRelease(pLeaf);
+ }
+}
+
+static void fts5IntegrityCheckPgidx(Fts5Index *p, Fts5Data *pLeaf){
+ int iTermOff = 0;
+ int ii;
+
+ Fts5Buffer buf1 = {0,0,0};
+ Fts5Buffer buf2 = {0,0,0};
+
+ ii = pLeaf->szLeaf;
+ while( ii<pLeaf->nn && p->rc==SQLITE_OK ){
+ int res;
+ int iOff;
+ int nIncr;
+
+ ii += fts5GetVarint32(&pLeaf->p[ii], nIncr);
+ iTermOff += nIncr;
+ iOff = iTermOff;
+
+ if( iOff>=pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ }else if( iTermOff==nIncr ){
+ int nByte;
+ iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
+ if( (iOff+nByte)>pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ fts5BufferSet(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
+ }
+ }else{
+ int nKeep, nByte;
+ iOff += fts5GetVarint32(&pLeaf->p[iOff], nKeep);
+ iOff += fts5GetVarint32(&pLeaf->p[iOff], nByte);
+ if( nKeep>buf1.n || (iOff+nByte)>pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ buf1.n = nKeep;
+ fts5BufferAppendBlob(&p->rc, &buf1, nByte, &pLeaf->p[iOff]);
+ }
+
+ if( p->rc==SQLITE_OK ){
+ res = fts5BufferCompare(&buf1, &buf2);
+ if( res<=0 ) p->rc = FTS5_CORRUPT;
+ }
+ }
+ fts5BufferSet(&p->rc, &buf2, buf1.n, buf1.p);
+ }
+
+ fts5BufferFree(&buf1);
+ fts5BufferFree(&buf2);
+}
+
+static void fts5IndexIntegrityCheckSegment(
+ Fts5Index *p, /* FTS5 backend object */
+ Fts5StructureSegment *pSeg /* Segment to check internal consistency */
+){
+ Fts5Config *pConfig = p->pConfig;
+ sqlite3_stmt *pStmt = 0;
+ int rc2;
+ int iIdxPrevLeaf = pSeg->pgnoFirst-1;
+ int iDlidxPrevLeaf = pSeg->pgnoLast;
+
+ if( pSeg->pgnoFirst==0 ) return;
+
+ fts5IndexPrepareStmt(p, &pStmt, sqlite3_mprintf(
+ "SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d",
+ pConfig->zDb, pConfig->zName, pSeg->iSegid
+ ));
+
+ /* Iterate through the b-tree hierarchy. */
+ while( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pStmt) ){
+ i64 iRow; /* Rowid for this leaf */
+ Fts5Data *pLeaf; /* Data for this leaf */
+
+ int nIdxTerm = sqlite3_column_bytes(pStmt, 1);
+ const char *zIdxTerm = (const char*)sqlite3_column_text(pStmt, 1);
+ int iIdxLeaf = sqlite3_column_int(pStmt, 2);
+ int bIdxDlidx = sqlite3_column_int(pStmt, 3);
+
+ /* If the leaf in question has already been trimmed from the segment,
+ ** ignore this b-tree entry. Otherwise, load it into memory. */
+ if( iIdxLeaf<pSeg->pgnoFirst ) continue;
+ iRow = FTS5_SEGMENT_ROWID(pSeg->iSegid, iIdxLeaf);
+ pLeaf = fts5DataRead(p, iRow);
+ if( pLeaf==0 ) break;
+
+ /* Check that the leaf contains at least one term, and that it is equal
+ ** to or larger than the split-key in zIdxTerm. Also check that if there
+ ** is also a rowid pointer within the leaf page header, it points to a
+ ** location before the term. */
+ if( pLeaf->nn<=pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ int iOff; /* Offset of first term on leaf */
+ int iRowidOff; /* Offset of first rowid on leaf */
+ int nTerm; /* Size of term on leaf in bytes */
+ int res; /* Comparison of term and split-key */
+
+ iOff = fts5LeafFirstTermOff(pLeaf);
+ iRowidOff = fts5LeafFirstRowidOff(pLeaf);
+ if( iRowidOff>=iOff ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ iOff += fts5GetVarint32(&pLeaf->p[iOff], nTerm);
+ res = memcmp(&pLeaf->p[iOff], zIdxTerm, MIN(nTerm, nIdxTerm));
+ if( res==0 ) res = nTerm - nIdxTerm;
+ if( res<0 ) p->rc = FTS5_CORRUPT;
+ }
+
+ fts5IntegrityCheckPgidx(p, pLeaf);
+ }
+ fts5DataRelease(pLeaf);
+ if( p->rc ) break;
+
+
+ /* Now check that the iter.nEmpty leaves following the current leaf
+ ** (a) exist and (b) contain no terms. */
+ fts5IndexIntegrityCheckEmpty(
+ p, pSeg, iIdxPrevLeaf+1, iDlidxPrevLeaf+1, iIdxLeaf-1
+ );
+ if( p->rc ) break;
+
+ /* If there is a doclist-index, check that it looks right. */
+ if( bIdxDlidx ){
+ Fts5DlidxIter *pDlidx = 0; /* For iterating through doclist index */
+ int iPrevLeaf = iIdxLeaf;
+ int iSegid = pSeg->iSegid;
+ int iPg = 0;
+ i64 iKey;
+
+ for(pDlidx=fts5DlidxIterInit(p, 0, iSegid, iIdxLeaf);
+ fts5DlidxIterEof(p, pDlidx)==0;
+ fts5DlidxIterNext(p, pDlidx)
+ ){
+
+ /* Check any rowid-less pages that occur before the current leaf. */
+ for(iPg=iPrevLeaf+1; iPg<fts5DlidxIterPgno(pDlidx); iPg++){
+ iKey = FTS5_SEGMENT_ROWID(iSegid, iPg);
+ pLeaf = fts5DataRead(p, iKey);
+ if( pLeaf ){
+ if( fts5LeafFirstRowidOff(pLeaf)!=0 ) p->rc = FTS5_CORRUPT;
+ fts5DataRelease(pLeaf);
+ }
+ }
+ iPrevLeaf = fts5DlidxIterPgno(pDlidx);
+
+ /* Check that the leaf page indicated by the iterator really does
+ ** contain the rowid suggested by the same. */
+ iKey = FTS5_SEGMENT_ROWID(iSegid, iPrevLeaf);
+ pLeaf = fts5DataRead(p, iKey);
+ if( pLeaf ){
+ i64 iRowid;
+ int iRowidOff = fts5LeafFirstRowidOff(pLeaf);
+ ASSERT_SZLEAF_OK(pLeaf);
+ if( iRowidOff>=pLeaf->szLeaf ){
+ p->rc = FTS5_CORRUPT;
+ }else{
+ fts5GetVarint(&pLeaf->p[iRowidOff], (u64*)&iRowid);
+ if( iRowid!=fts5DlidxIterRowid(pDlidx) ) p->rc = FTS5_CORRUPT;
+ }
+ fts5DataRelease(pLeaf);
+ }
+ }
+
+ iDlidxPrevLeaf = iPg;
+ fts5DlidxIterFree(pDlidx);
+ fts5TestDlidxReverse(p, iSegid, iIdxLeaf);
+ }else{
+ iDlidxPrevLeaf = pSeg->pgnoLast;
+ /* TODO: Check there is no doclist index */
+ }
+
+ iIdxPrevLeaf = iIdxLeaf;
+ }
+
+ rc2 = sqlite3_finalize(pStmt);
+ if( p->rc==SQLITE_OK ) p->rc = rc2;
+
+ /* Page iter.iLeaf must now be the rightmost leaf-page in the segment */
+#if 0
+ if( p->rc==SQLITE_OK && iter.iLeaf!=pSeg->pgnoLast ){
+ p->rc = FTS5_CORRUPT;
+ }
+#endif
+}
+
+
+/*
+** Run internal checks to ensure that the FTS index (a) is internally
+** consistent and (b) contains entries for which the XOR of the checksums
+** as calculated by fts5IndexEntryCksum() is cksum.
+**
+** Return SQLITE_CORRUPT if any of the internal checks fail, or if the
+** checksum does not match. Return SQLITE_OK if all checks pass without
+** error, or some other SQLite error code if another error (e.g. OOM)
+** occurs.
+*/
+static int sqlite3Fts5IndexIntegrityCheck(Fts5Index *p, u64 cksum){
+ u64 cksum2 = 0; /* Checksum based on contents of indexes */
+ Fts5Buffer poslist = {0,0,0}; /* Buffer used to hold a poslist */
+ Fts5IndexIter *pIter; /* Used to iterate through entire index */
+ Fts5Structure *pStruct; /* Index structure */
+
+ /* Used by extra internal tests only run if NDEBUG is not defined */
+ u64 cksum3 = 0; /* Checksum based on contents of indexes */
+ Fts5Buffer term = {0,0,0}; /* Buffer used to hold most recent term */
+
+ /* Load the FTS index structure */
+ pStruct = fts5StructureRead(p);
+
+ /* Check that the internal nodes of each segment match the leaves */
+ if( pStruct ){
+ int iLvl, iSeg;
+ for(iLvl=0; iLvl<pStruct->nLevel; iLvl++){
+ for(iSeg=0; iSeg<pStruct->aLevel[iLvl].nSeg; iSeg++){
+ Fts5StructureSegment *pSeg = &pStruct->aLevel[iLvl].aSeg[iSeg];
+ fts5IndexIntegrityCheckSegment(p, pSeg);
+ }
+ }
+ }
+
+ /* The cksum argument passed to this function is a checksum calculated
+ ** based on all expected entries in the FTS index (including prefix index
+ ** entries). This block checks that a checksum calculated based on the
+ ** actual contents of FTS index is identical.
+ **
+ ** Two versions of the same checksum are calculated. The first (stack
+ ** variable cksum2) based on entries extracted from the full-text index
+ ** while doing a linear scan of each individual index in turn.
+ **
+ ** As each term visited by the linear scans, a separate query for the
+ ** same term is performed. cksum3 is calculated based on the entries
+ ** extracted by these queries.
+ */
+ for(fts5MultiIterNew(p, pStruct, 0, 0, 0, 0, -1, 0, &pIter);
+ fts5MultiIterEof(p, pIter)==0;
+ fts5MultiIterNext(p, pIter, 0, 0)
+ ){
+ int n; /* Size of term in bytes */
+ i64 iPos = 0; /* Position read from poslist */
+ int iOff = 0; /* Offset within poslist */
+ i64 iRowid = fts5MultiIterRowid(pIter);
+ char *z = (char*)fts5MultiIterTerm(pIter, &n);
+
+ /* If this is a new term, query for it. Update cksum3 with the results. */
+ fts5TestTerm(p, &term, z, n, cksum2, &cksum3);
+
+ poslist.n = 0;
+ fts5SegiterPoslist(p, &pIter->aSeg[pIter->aFirst[1].iFirst] , 0, &poslist);
+ while( 0==sqlite3Fts5PoslistNext64(poslist.p, poslist.n, &iOff, &iPos) ){
+ int iCol = FTS5_POS2COLUMN(iPos);
+ int iTokOff = FTS5_POS2OFFSET(iPos);
+ cksum2 ^= fts5IndexEntryCksum(iRowid, iCol, iTokOff, -1, z, n);
+ }
+ }
+ fts5TestTerm(p, &term, 0, 0, cksum2, &cksum3);
+
+ fts5MultiIterFree(p, pIter);
+ if( p->rc==SQLITE_OK && cksum!=cksum2 ) p->rc = FTS5_CORRUPT;
+
+ fts5StructureRelease(pStruct);
+ fts5BufferFree(&term);
+ fts5BufferFree(&poslist);
+ return fts5IndexReturn(p);
+}
+
+
+/*
+** Calculate and return a checksum that is the XOR of the index entry
+** checksum of all entries that would be generated by the token specified
+** by the final 5 arguments.
+*/
+static u64 sqlite3Fts5IndexCksum(
+ Fts5Config *pConfig, /* Configuration object */
+ i64 iRowid, /* Document term appears in */
+ int iCol, /* Column term appears in */
+ int iPos, /* Position term appears in */
+ const char *pTerm, int nTerm /* Term at iPos */
+){
+ u64 ret = 0; /* Return value */
+ int iIdx; /* For iterating through indexes */
+
+ ret = fts5IndexEntryCksum(iRowid, iCol, iPos, 0, pTerm, nTerm);
+
+ for(iIdx=0; iIdx<pConfig->nPrefix; iIdx++){
+ int nByte = fts5IndexCharlenToBytelen(pTerm, nTerm, pConfig->aPrefix[iIdx]);
+ if( nByte ){
+ ret ^= fts5IndexEntryCksum(iRowid, iCol, iPos, iIdx+1, pTerm, nByte);
+ }
+ }
+
+ return ret;
+}
+
+/*************************************************************************
+**************************************************************************
+** Below this point is the implementation of the fts5_decode() scalar
+** function only.
+*/
+
+/*
+** Decode a segment-data rowid from the %_data table. This function is
+** the opposite of macro FTS5_SEGMENT_ROWID().
+*/
+static void fts5DecodeRowid(
+ i64 iRowid, /* Rowid from %_data table */
+ int *piSegid, /* OUT: Segment id */
+ int *pbDlidx, /* OUT: Dlidx flag */
+ int *piHeight, /* OUT: Height */
+ int *piPgno /* OUT: Page number */
+){
+ *piPgno = (int)(iRowid & (((i64)1 << FTS5_DATA_PAGE_B) - 1));
+ iRowid >>= FTS5_DATA_PAGE_B;
+
+ *piHeight = (int)(iRowid & (((i64)1 << FTS5_DATA_HEIGHT_B) - 1));
+ iRowid >>= FTS5_DATA_HEIGHT_B;
+
+ *pbDlidx = (int)(iRowid & 0x0001);
+ iRowid >>= FTS5_DATA_DLI_B;
+
+ *piSegid = (int)(iRowid & (((i64)1 << FTS5_DATA_ID_B) - 1));
+}
+
+static void fts5DebugRowid(int *pRc, Fts5Buffer *pBuf, i64 iKey){
+ int iSegid, iHeight, iPgno, bDlidx; /* Rowid compenents */
+ fts5DecodeRowid(iKey, &iSegid, &bDlidx, &iHeight, &iPgno);
+
+ if( iSegid==0 ){
+ if( iKey==FTS5_AVERAGES_ROWID ){
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "{averages} ");
+ }else{
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "{structure}");
+ }
+ }
+ else{
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "{%ssegid=%d h=%d pgno=%d}",
+ bDlidx ? "dlidx " : "", iSegid, iHeight, iPgno
+ );
+ }
+}
+
+static void fts5DebugStructure(
+ int *pRc, /* IN/OUT: error code */
+ Fts5Buffer *pBuf,
+ Fts5Structure *p
+){
+ int iLvl, iSeg; /* Iterate through levels, segments */
+
+ for(iLvl=0; iLvl<p->nLevel; iLvl++){
+ Fts5StructureLevel *pLvl = &p->aLevel[iLvl];
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf,
+ " {lvl=%d nMerge=%d nSeg=%d", iLvl, pLvl->nMerge, pLvl->nSeg
+ );
+ for(iSeg=0; iSeg<pLvl->nSeg; iSeg++){
+ Fts5StructureSegment *pSeg = &pLvl->aSeg[iSeg];
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " {id=%d leaves=%d..%d}",
+ pSeg->iSegid, pSeg->pgnoFirst, pSeg->pgnoLast
+ );
+ }
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "}");
+ }
+}
+
+/*
+** This is part of the fts5_decode() debugging aid.
+**
+** Arguments pBlob/nBlob contain a serialized Fts5Structure object. This
+** function appends a human-readable representation of the same object
+** to the buffer passed as the second argument.
+*/
+static void fts5DecodeStructure(
+ int *pRc, /* IN/OUT: error code */
+ Fts5Buffer *pBuf,
+ const u8 *pBlob, int nBlob
+){
+ int rc; /* Return code */
+ Fts5Structure *p = 0; /* Decoded structure object */
+
+ rc = fts5StructureDecode(pBlob, nBlob, 0, &p);
+ if( rc!=SQLITE_OK ){
+ *pRc = rc;
+ return;
+ }
+
+ fts5DebugStructure(pRc, pBuf, p);
+ fts5StructureRelease(p);
+}
+
+/*
+** This is part of the fts5_decode() debugging aid.
+**
+** Arguments pBlob/nBlob contain an "averages" record. This function
+** appends a human-readable representation of record to the buffer passed
+** as the second argument.
+*/
+static void fts5DecodeAverages(
+ int *pRc, /* IN/OUT: error code */
+ Fts5Buffer *pBuf,
+ const u8 *pBlob, int nBlob
+){
+ int i = 0;
+ const char *zSpace = "";
+
+ while( i<nBlob ){
+ u64 iVal;
+ i += sqlite3Fts5GetVarint(&pBlob[i], &iVal);
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, "%s%d", zSpace, (int)iVal);
+ zSpace = " ";
+ }
+}
+
+/*
+** Buffer (a/n) is assumed to contain a list of serialized varints. Read
+** each varint and append its string representation to buffer pBuf. Return
+** after either the input buffer is exhausted or a 0 value is read.
+**
+** The return value is the number of bytes read from the input buffer.
+*/
+static int fts5DecodePoslist(int *pRc, Fts5Buffer *pBuf, const u8 *a, int n){
+ int iOff = 0;
+ while( iOff<n ){
+ int iVal;
+ iOff += fts5GetVarint32(&a[iOff], iVal);
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " %d", iVal);
+ }
+ return iOff;
+}
+
+/*
+** The start of buffer (a/n) contains the start of a doclist. The doclist
+** may or may not finish within the buffer. This function appends a text
+** representation of the part of the doclist that is present to buffer
+** pBuf.
+**
+** The return value is the number of bytes read from the input buffer.
+*/
+static int fts5DecodeDoclist(int *pRc, Fts5Buffer *pBuf, const u8 *a, int n){
+ i64 iDocid = 0;
+ int iOff = 0;
+
+ if( n>0 ){
+ iOff = sqlite3Fts5GetVarint(a, (u64*)&iDocid);
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " id=%lld", iDocid);
+ }
+ while( iOff<n ){
+ int nPos;
+ int bDummy;
+ iOff += fts5GetPoslistSize(&a[iOff], &nPos, &bDummy);
+ iOff += fts5DecodePoslist(pRc, pBuf, &a[iOff], MIN(n-iOff, nPos));
+ if( iOff<n ){
+ i64 iDelta;
+ iOff += sqlite3Fts5GetVarint(&a[iOff], (u64*)&iDelta);
+ iDocid += iDelta;
+ sqlite3Fts5BufferAppendPrintf(pRc, pBuf, " id=%lld", iDocid);
+ }
+ }
+
+ return iOff;
+}
+
+/*
+** The implementation of user-defined scalar function fts5_decode().
+*/
+static void fts5DecodeFunction(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args (always 2) */
+ sqlite3_value **apVal /* Function arguments */
+){
+ i64 iRowid; /* Rowid for record being decoded */
+ int iSegid,iHeight,iPgno,bDlidx;/* Rowid components */
+ const u8 *aBlob; int n; /* Record to decode */
+ u8 *a = 0;
+ Fts5Buffer s; /* Build up text to return here */
+ int rc = SQLITE_OK; /* Return code */
+ int nSpace = 0;
+
+ assert( nArg==2 );
+ memset(&s, 0, sizeof(Fts5Buffer));
+ iRowid = sqlite3_value_int64(apVal[0]);
+
+ /* Make a copy of the second argument (a blob) in aBlob[]. The aBlob[]
+ ** copy is followed by FTS5_DATA_ZERO_PADDING 0x00 bytes, which prevents
+ ** buffer overreads even if the record is corrupt. */
+ n = sqlite3_value_bytes(apVal[1]);
+ aBlob = sqlite3_value_blob(apVal[1]);
+ nSpace = n + FTS5_DATA_ZERO_PADDING;
+ a = (u8*)sqlite3Fts5MallocZero(&rc, nSpace);
+ if( a==0 ) goto decode_out;
+ memcpy(a, aBlob, n);
+
+
+ fts5DecodeRowid(iRowid, &iSegid, &bDlidx, &iHeight, &iPgno);
+
+ fts5DebugRowid(&rc, &s, iRowid);
+ if( bDlidx ){
+ Fts5Data dlidx;
+ Fts5DlidxLvl lvl;
+
+ dlidx.p = a;
+ dlidx.nn = n;
+
+ memset(&lvl, 0, sizeof(Fts5DlidxLvl));
+ lvl.pData = &dlidx;
+ lvl.iLeafPgno = iPgno;
+
+ for(fts5DlidxLvlNext(&lvl); lvl.bEof==0; fts5DlidxLvlNext(&lvl)){
+ sqlite3Fts5BufferAppendPrintf(&rc, &s,
+ " %d(%lld)", lvl.iLeafPgno, lvl.iRowid
+ );
+ }
+ }else if( iSegid==0 ){
+ if( iRowid==FTS5_AVERAGES_ROWID ){
+ fts5DecodeAverages(&rc, &s, a, n);
+ }else{
+ fts5DecodeStructure(&rc, &s, a, n);
+ }
+ }else{
+ Fts5Buffer term; /* Current term read from page */
+ int szLeaf; /* Offset of pgidx in a[] */
+ int iPgidxOff;
+ int iPgidxPrev = 0; /* Previous value read from pgidx */
+ int iTermOff = 0;
+ int iRowidOff = 0;
+ int iOff;
+ int nDoclist;
+
+ memset(&term, 0, sizeof(Fts5Buffer));
+
+ if( n<4 ){
+ sqlite3Fts5BufferSet(&rc, &s, 7, (const u8*)"corrupt");
+ goto decode_out;
+ }else{
+ iRowidOff = fts5GetU16(&a[0]);
+ iPgidxOff = szLeaf = fts5GetU16(&a[2]);
+ if( iPgidxOff<n ){
+ fts5GetVarint32(&a[iPgidxOff], iTermOff);
+ }
+ }
+
+ /* Decode the position list tail at the start of the page */
+ if( iRowidOff!=0 ){
+ iOff = iRowidOff;
+ }else if( iTermOff!=0 ){
+ iOff = iTermOff;
+ }else{
+ iOff = szLeaf;
+ }
+ fts5DecodePoslist(&rc, &s, &a[4], iOff-4);
+
+ /* Decode any more doclist data that appears on the page before the
+ ** first term. */
+ nDoclist = (iTermOff ? iTermOff : szLeaf) - iOff;
+ fts5DecodeDoclist(&rc, &s, &a[iOff], nDoclist);
+
+ while( iPgidxOff<n ){
+ int bFirst = (iPgidxOff==szLeaf); /* True for first term on page */
+ int nByte; /* Bytes of data */
+ int iEnd;
+
+ iPgidxOff += fts5GetVarint32(&a[iPgidxOff], nByte);
+ iPgidxPrev += nByte;
+ iOff = iPgidxPrev;
+
+ if( iPgidxOff<n ){
+ fts5GetVarint32(&a[iPgidxOff], nByte);
+ iEnd = iPgidxPrev + nByte;
+ }else{
+ iEnd = szLeaf;
+ }
+
+ if( bFirst==0 ){
+ iOff += fts5GetVarint32(&a[iOff], nByte);
+ term.n = nByte;
+ }
+ iOff += fts5GetVarint32(&a[iOff], nByte);
+ fts5BufferAppendBlob(&rc, &term, nByte, &a[iOff]);
+ iOff += nByte;
+
+ sqlite3Fts5BufferAppendPrintf(
+ &rc, &s, " term=%.*s", term.n, (const char*)term.p
+ );
+ iOff += fts5DecodeDoclist(&rc, &s, &a[iOff], iEnd-iOff);
+ }
+
+ fts5BufferFree(&term);
+ }
+
+ decode_out:
+ sqlite3_free(a);
+ if( rc==SQLITE_OK ){
+ sqlite3_result_text(pCtx, (const char*)s.p, s.n, SQLITE_TRANSIENT);
+ }else{
+ sqlite3_result_error_code(pCtx, rc);
+ }
+ fts5BufferFree(&s);
+}
+
+/*
+** The implementation of user-defined scalar function fts5_rowid().
+*/
+static void fts5RowidFunction(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args (always 2) */
+ sqlite3_value **apVal /* Function arguments */
+){
+ const char *zArg;
+ if( nArg==0 ){
+ sqlite3_result_error(pCtx, "should be: fts5_rowid(subject, ....)", -1);
+ }else{
+ zArg = (const char*)sqlite3_value_text(apVal[0]);
+ if( 0==sqlite3_stricmp(zArg, "segment") ){
+ i64 iRowid;
+ int segid, pgno;
+ if( nArg!=3 ){
+ sqlite3_result_error(pCtx,
+ "should be: fts5_rowid('segment', segid, pgno))", -1
+ );
+ }else{
+ segid = sqlite3_value_int(apVal[1]);
+ pgno = sqlite3_value_int(apVal[2]);
+ iRowid = FTS5_SEGMENT_ROWID(segid, pgno);
+ sqlite3_result_int64(pCtx, iRowid);
+ }
+ }else{
+ sqlite3_result_error(pCtx,
+ "first arg to fts5_rowid() must be 'segment'" , -1
+ );
+ }
+ }
+}
+
+/*
+** This is called as part of registering the FTS5 module with database
+** connection db. It registers several user-defined scalar functions useful
+** with FTS5.
+**
+** If successful, SQLITE_OK is returned. If an error occurs, some other
+** SQLite error code is returned instead.
+*/
+static int sqlite3Fts5IndexInit(sqlite3 *db){
+ int rc = sqlite3_create_function(
+ db, "fts5_decode", 2, SQLITE_UTF8, 0, fts5DecodeFunction, 0, 0
+ );
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_create_function(
+ db, "fts5_rowid", -1, SQLITE_UTF8, 0, fts5RowidFunction, 0, 0
+ );
+ }
+ return rc;
+}
+
+
+/*
+** 2014 Jun 09
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This is an SQLite module implementing full-text search.
+*/
+
+
+
+/*
+** This variable is set to false when running tests for which the on disk
+** structures should not be corrupt. Otherwise, true. If it is false, extra
+** assert() conditions in the fts5 code are activated - conditions that are
+** only true if it is guaranteed that the fts5 database is not corrupt.
+*/
+SQLITE_API int sqlite3_fts5_may_be_corrupt = 1;
+
+
+typedef struct Fts5Auxdata Fts5Auxdata;
+typedef struct Fts5Auxiliary Fts5Auxiliary;
+typedef struct Fts5Cursor Fts5Cursor;
+typedef struct Fts5Sorter Fts5Sorter;
+typedef struct Fts5Table Fts5Table;
+typedef struct Fts5TokenizerModule Fts5TokenizerModule;
+
+/*
+** NOTES ON TRANSACTIONS:
+**
+** SQLite invokes the following virtual table methods as transactions are
+** opened and closed by the user:
+**
+** xBegin(): Start of a new transaction.
+** xSync(): Initial part of two-phase commit.
+** xCommit(): Final part of two-phase commit.
+** xRollback(): Rollback the transaction.
+**
+** Anything that is required as part of a commit that may fail is performed
+** in the xSync() callback. Current versions of SQLite ignore any errors
+** returned by xCommit().
+**
+** And as sub-transactions are opened/closed:
+**
+** xSavepoint(int S): Open savepoint S.
+** xRelease(int S): Commit and close savepoint S.
+** xRollbackTo(int S): Rollback to start of savepoint S.
+**
+** During a write-transaction the fts5_index.c module may cache some data
+** in-memory. It is flushed to disk whenever xSync(), xRelease() or
+** xSavepoint() is called. And discarded whenever xRollback() or xRollbackTo()
+** is called.
+**
+** Additionally, if SQLITE_DEBUG is defined, an instance of the following
+** structure is used to record the current transaction state. This information
+** is not required, but it is used in the assert() statements executed by
+** function fts5CheckTransactionState() (see below).
+*/
+struct Fts5TransactionState {
+ int eState; /* 0==closed, 1==open, 2==synced */
+ int iSavepoint; /* Number of open savepoints (0 -> none) */
+};
+
+/*
+** A single object of this type is allocated when the FTS5 module is
+** registered with a database handle. It is used to store pointers to
+** all registered FTS5 extensions - tokenizers and auxiliary functions.
+*/
+struct Fts5Global {
+ fts5_api api; /* User visible part of object (see fts5.h) */
+ sqlite3 *db; /* Associated database connection */
+ i64 iNextId; /* Used to allocate unique cursor ids */
+ Fts5Auxiliary *pAux; /* First in list of all aux. functions */
+ Fts5TokenizerModule *pTok; /* First in list of all tokenizer modules */
+ Fts5TokenizerModule *pDfltTok; /* Default tokenizer module */
+ Fts5Cursor *pCsr; /* First in list of all open cursors */
+};
+
+/*
+** Each auxiliary function registered with the FTS5 module is represented
+** by an object of the following type. All such objects are stored as part
+** of the Fts5Global.pAux list.
+*/
+struct Fts5Auxiliary {
+ Fts5Global *pGlobal; /* Global context for this function */
+ char *zFunc; /* Function name (nul-terminated) */
+ void *pUserData; /* User-data pointer */
+ fts5_extension_function xFunc; /* Callback function */
+ void (*xDestroy)(void*); /* Destructor function */
+ Fts5Auxiliary *pNext; /* Next registered auxiliary function */
+};
+
+/*
+** Each tokenizer module registered with the FTS5 module is represented
+** by an object of the following type. All such objects are stored as part
+** of the Fts5Global.pTok list.
+*/
+struct Fts5TokenizerModule {
+ char *zName; /* Name of tokenizer */
+ void *pUserData; /* User pointer passed to xCreate() */
+ fts5_tokenizer x; /* Tokenizer functions */
+ void (*xDestroy)(void*); /* Destructor function */
+ Fts5TokenizerModule *pNext; /* Next registered tokenizer module */
+};
+
+/*
+** Virtual-table object.
+*/
+struct Fts5Table {
+ sqlite3_vtab base; /* Base class used by SQLite core */
+ Fts5Config *pConfig; /* Virtual table configuration */
+ Fts5Index *pIndex; /* Full-text index */
+ Fts5Storage *pStorage; /* Document store */
+ Fts5Global *pGlobal; /* Global (connection wide) data */
+ Fts5Cursor *pSortCsr; /* Sort data from this cursor */
+#ifdef SQLITE_DEBUG
+ struct Fts5TransactionState ts;
+#endif
+};
+
+struct Fts5MatchPhrase {
+ Fts5Buffer *pPoslist; /* Pointer to current poslist */
+ int nTerm; /* Size of phrase in terms */
+};
+
+/*
+** pStmt:
+** SELECT rowid, <fts> FROM <fts> ORDER BY +rank;
+**
+** aIdx[]:
+** There is one entry in the aIdx[] array for each phrase in the query,
+** the value of which is the offset within aPoslist[] following the last
+** byte of the position list for the corresponding phrase.
+*/
+struct Fts5Sorter {
+ sqlite3_stmt *pStmt;
+ i64 iRowid; /* Current rowid */
+ const u8 *aPoslist; /* Position lists for current row */
+ int nIdx; /* Number of entries in aIdx[] */
+ int aIdx[1]; /* Offsets into aPoslist for current row */
+};
+
+
+/*
+** Virtual-table cursor object.
+**
+** iSpecial:
+** If this is a 'special' query (refer to function fts5SpecialMatch()),
+** then this variable contains the result of the query.
+**
+** iFirstRowid, iLastRowid:
+** These variables are only used for FTS5_PLAN_MATCH cursors. Assuming the
+** cursor iterates in ascending order of rowids, iFirstRowid is the lower
+** limit of rowids to return, and iLastRowid the upper. In other words, the
+** WHERE clause in the user's query might have been:
+**
+** <tbl> MATCH <expr> AND rowid BETWEEN $iFirstRowid AND $iLastRowid
+**
+** If the cursor iterates in descending order of rowid, iFirstRowid
+** is the upper limit (i.e. the "first" rowid visited) and iLastRowid
+** the lower.
+*/
+struct Fts5Cursor {
+ sqlite3_vtab_cursor base; /* Base class used by SQLite core */
+ Fts5Cursor *pNext; /* Next cursor in Fts5Cursor.pCsr list */
+ int *aColumnSize; /* Values for xColumnSize() */
+ i64 iCsrId; /* Cursor id */
+
+ /* Zero from this point onwards on cursor reset */
+ int ePlan; /* FTS5_PLAN_XXX value */
+ int bDesc; /* True for "ORDER BY rowid DESC" queries */
+ i64 iFirstRowid; /* Return no rowids earlier than this */
+ i64 iLastRowid; /* Return no rowids later than this */
+ sqlite3_stmt *pStmt; /* Statement used to read %_content */
+ Fts5Expr *pExpr; /* Expression for MATCH queries */
+ Fts5Sorter *pSorter; /* Sorter for "ORDER BY rank" queries */
+ int csrflags; /* Mask of cursor flags (see below) */
+ i64 iSpecial; /* Result of special query */
+
+ /* "rank" function. Populated on demand from vtab.xColumn(). */
+ char *zRank; /* Custom rank function */
+ char *zRankArgs; /* Custom rank function args */
+ Fts5Auxiliary *pRank; /* Rank callback (or NULL) */
+ int nRankArg; /* Number of trailing arguments for rank() */
+ sqlite3_value **apRankArg; /* Array of trailing arguments */
+ sqlite3_stmt *pRankArgStmt; /* Origin of objects in apRankArg[] */
+
+ /* Auxiliary data storage */
+ Fts5Auxiliary *pAux; /* Currently executing extension function */
+ Fts5Auxdata *pAuxdata; /* First in linked list of saved aux-data */
+
+ /* Cache used by auxiliary functions xInst() and xInstCount() */
+ Fts5PoslistReader *aInstIter; /* One for each phrase */
+ int nInstAlloc; /* Size of aInst[] array (entries / 3) */
+ int nInstCount; /* Number of phrase instances */
+ int *aInst; /* 3 integers per phrase instance */
+};
+
+/*
+** Bits that make up the "idxNum" parameter passed indirectly by
+** xBestIndex() to xFilter().
+*/
+#define FTS5_BI_MATCH 0x0001 /* <tbl> MATCH ? */
+#define FTS5_BI_RANK 0x0002 /* rank MATCH ? */
+#define FTS5_BI_ROWID_EQ 0x0004 /* rowid == ? */
+#define FTS5_BI_ROWID_LE 0x0008 /* rowid <= ? */
+#define FTS5_BI_ROWID_GE 0x0010 /* rowid >= ? */
+
+#define FTS5_BI_ORDER_RANK 0x0020
+#define FTS5_BI_ORDER_ROWID 0x0040
+#define FTS5_BI_ORDER_DESC 0x0080
+
+/*
+** Values for Fts5Cursor.csrflags
+*/
+#define FTS5CSR_REQUIRE_CONTENT 0x01
+#define FTS5CSR_REQUIRE_DOCSIZE 0x02
+#define FTS5CSR_REQUIRE_INST 0x04
+#define FTS5CSR_EOF 0x08
+#define FTS5CSR_FREE_ZRANK 0x10
+#define FTS5CSR_REQUIRE_RESEEK 0x20
+
+#define BitFlagAllTest(x,y) (((x) & (y))==(y))
+#define BitFlagTest(x,y) (((x) & (y))!=0)
+
+
+/*
+** Macros to Set(), Clear() and Test() cursor flags.
+*/
+#define CsrFlagSet(pCsr, flag) ((pCsr)->csrflags |= (flag))
+#define CsrFlagClear(pCsr, flag) ((pCsr)->csrflags &= ~(flag))
+#define CsrFlagTest(pCsr, flag) ((pCsr)->csrflags & (flag))
+
+struct Fts5Auxdata {
+ Fts5Auxiliary *pAux; /* Extension to which this belongs */
+ void *pPtr; /* Pointer value */
+ void(*xDelete)(void*); /* Destructor */
+ Fts5Auxdata *pNext; /* Next object in linked list */
+};
+
+#ifdef SQLITE_DEBUG
+#define FTS5_BEGIN 1
+#define FTS5_SYNC 2
+#define FTS5_COMMIT 3
+#define FTS5_ROLLBACK 4
+#define FTS5_SAVEPOINT 5
+#define FTS5_RELEASE 6
+#define FTS5_ROLLBACKTO 7
+static void fts5CheckTransactionState(Fts5Table *p, int op, int iSavepoint){
+ switch( op ){
+ case FTS5_BEGIN:
+ assert( p->ts.eState==0 );
+ p->ts.eState = 1;
+ p->ts.iSavepoint = -1;
+ break;
+
+ case FTS5_SYNC:
+ assert( p->ts.eState==1 );
+ p->ts.eState = 2;
+ break;
+
+ case FTS5_COMMIT:
+ assert( p->ts.eState==2 );
+ p->ts.eState = 0;
+ break;
+
+ case FTS5_ROLLBACK:
+ assert( p->ts.eState==1 || p->ts.eState==2 || p->ts.eState==0 );
+ p->ts.eState = 0;
+ break;
+
+ case FTS5_SAVEPOINT:
+ assert( p->ts.eState==1 );
+ assert( iSavepoint>=0 );
+ assert( iSavepoint>p->ts.iSavepoint );
+ p->ts.iSavepoint = iSavepoint;
+ break;
+
+ case FTS5_RELEASE:
+ assert( p->ts.eState==1 );
+ assert( iSavepoint>=0 );
+ assert( iSavepoint<=p->ts.iSavepoint );
+ p->ts.iSavepoint = iSavepoint-1;
+ break;
+
+ case FTS5_ROLLBACKTO:
+ assert( p->ts.eState==1 );
+ assert( iSavepoint>=0 );
+ assert( iSavepoint<=p->ts.iSavepoint );
+ p->ts.iSavepoint = iSavepoint;
+ break;
+ }
+}
+#else
+# define fts5CheckTransactionState(x,y,z)
+#endif
+
+/*
+** Return true if pTab is a contentless table.
+*/
+static int fts5IsContentless(Fts5Table *pTab){
+ return pTab->pConfig->eContent==FTS5_CONTENT_NONE;
+}
+
+/*
+** Delete a virtual table handle allocated by fts5InitVtab().
+*/
+static void fts5FreeVtab(Fts5Table *pTab){
+ if( pTab ){
+ sqlite3Fts5IndexClose(pTab->pIndex);
+ sqlite3Fts5StorageClose(pTab->pStorage);
+ sqlite3Fts5ConfigFree(pTab->pConfig);
+ sqlite3_free(pTab);
+ }
+}
+
+/*
+** The xDisconnect() virtual table method.
+*/
+static int fts5DisconnectMethod(sqlite3_vtab *pVtab){
+ fts5FreeVtab((Fts5Table*)pVtab);
+ return SQLITE_OK;
+}
+
+/*
+** The xDestroy() virtual table method.
+*/
+static int fts5DestroyMethod(sqlite3_vtab *pVtab){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ int rc = sqlite3Fts5DropAll(pTab->pConfig);
+ if( rc==SQLITE_OK ){
+ fts5FreeVtab((Fts5Table*)pVtab);
+ }
+ return rc;
+}
+
+/*
+** This function is the implementation of both the xConnect and xCreate
+** methods of the FTS3 virtual table.
+**
+** The argv[] array contains the following:
+**
+** argv[0] -> module name ("fts5")
+** argv[1] -> database name
+** argv[2] -> table name
+** argv[...] -> "column name" and other module argument fields.
+*/
+static int fts5InitVtab(
+ int bCreate, /* True for xCreate, false for xConnect */
+ sqlite3 *db, /* The SQLite database connection */
+ void *pAux, /* Hash table containing tokenizers */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVTab, /* Write the resulting vtab structure here */
+ char **pzErr /* Write any error message here */
+){
+ Fts5Global *pGlobal = (Fts5Global*)pAux;
+ const char **azConfig = (const char**)argv;
+ int rc = SQLITE_OK; /* Return code */
+ Fts5Config *pConfig = 0; /* Results of parsing argc/argv */
+ Fts5Table *pTab = 0; /* New virtual table object */
+
+ /* Allocate the new vtab object and parse the configuration */
+ pTab = (Fts5Table*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Table));
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5ConfigParse(pGlobal, db, argc, azConfig, &pConfig, pzErr);
+ assert( (rc==SQLITE_OK && *pzErr==0) || pConfig==0 );
+ }
+ if( rc==SQLITE_OK ){
+ pTab->pConfig = pConfig;
+ pTab->pGlobal = pGlobal;
+ }
+
+ /* Open the index sub-system */
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5IndexOpen(pConfig, bCreate, &pTab->pIndex, pzErr);
+ }
+
+ /* Open the storage sub-system */
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageOpen(
+ pConfig, pTab->pIndex, bCreate, &pTab->pStorage, pzErr
+ );
+ }
+
+ /* Call sqlite3_declare_vtab() */
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5ConfigDeclareVtab(pConfig);
+ }
+
+ if( rc!=SQLITE_OK ){
+ fts5FreeVtab(pTab);
+ pTab = 0;
+ }else if( bCreate ){
+ fts5CheckTransactionState(pTab, FTS5_BEGIN, 0);
+ }
+ *ppVTab = (sqlite3_vtab*)pTab;
+ return rc;
+}
+
+/*
+** The xConnect() and xCreate() methods for the virtual table. All the
+** work is done in function fts5InitVtab().
+*/
+static int fts5ConnectMethod(
+ sqlite3 *db, /* Database connection */
+ void *pAux, /* Pointer to tokenizer hash table */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVtab, /* OUT: New sqlite3_vtab object */
+ char **pzErr /* OUT: sqlite3_malloc'd error message */
+){
+ return fts5InitVtab(0, db, pAux, argc, argv, ppVtab, pzErr);
+}
+static int fts5CreateMethod(
+ sqlite3 *db, /* Database connection */
+ void *pAux, /* Pointer to tokenizer hash table */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVtab, /* OUT: New sqlite3_vtab object */
+ char **pzErr /* OUT: sqlite3_malloc'd error message */
+){
+ return fts5InitVtab(1, db, pAux, argc, argv, ppVtab, pzErr);
+}
+
+/*
+** The different query plans.
+*/
+#define FTS5_PLAN_MATCH 1 /* (<tbl> MATCH ?) */
+#define FTS5_PLAN_SOURCE 2 /* A source cursor for SORTED_MATCH */
+#define FTS5_PLAN_SPECIAL 3 /* An internal query */
+#define FTS5_PLAN_SORTED_MATCH 4 /* (<tbl> MATCH ? ORDER BY rank) */
+#define FTS5_PLAN_SCAN 5 /* No usable constraint */
+#define FTS5_PLAN_ROWID 6 /* (rowid = ?) */
+
+/*
+** Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this
+** extension is currently being used by a version of SQLite too old to
+** support index-info flags. In that case this function is a no-op.
+*/
+static void fts5SetUniqueFlag(sqlite3_index_info *pIdxInfo){
+#if SQLITE_VERSION_NUMBER>=3008012
+ if( sqlite3_libversion_number()>=3008012 ){
+ pIdxInfo->idxFlags |= SQLITE_INDEX_SCAN_UNIQUE;
+ }
+#endif
+}
+
+/*
+** Implementation of the xBestIndex method for FTS5 tables. Within the
+** WHERE constraint, it searches for the following:
+**
+** 1. A MATCH constraint against the special column.
+** 2. A MATCH constraint against the "rank" column.
+** 3. An == constraint against the rowid column.
+** 4. A < or <= constraint against the rowid column.
+** 5. A > or >= constraint against the rowid column.
+**
+** Within the ORDER BY, either:
+**
+** 5. ORDER BY rank [ASC|DESC]
+** 6. ORDER BY rowid [ASC|DESC]
+**
+** Costs are assigned as follows:
+**
+** a) If an unusable MATCH operator is present in the WHERE clause, the
+** cost is unconditionally set to 1e50 (a really big number).
+**
+** a) If a MATCH operator is present, the cost depends on the other
+** constraints also present. As follows:
+**
+** * No other constraints: cost=1000.0
+** * One rowid range constraint: cost=750.0
+** * Both rowid range constraints: cost=500.0
+** * An == rowid constraint: cost=100.0
+**
+** b) Otherwise, if there is no MATCH:
+**
+** * No other constraints: cost=1000000.0
+** * One rowid range constraint: cost=750000.0
+** * Both rowid range constraints: cost=250000.0
+** * An == rowid constraint: cost=10.0
+**
+** Costs are not modified by the ORDER BY clause.
+*/
+static int fts5BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
+ Fts5Table *pTab = (Fts5Table*)pVTab;
+ Fts5Config *pConfig = pTab->pConfig;
+ int idxFlags = 0; /* Parameter passed through to xFilter() */
+ int bHasMatch;
+ int iNext;
+ int i;
+
+ struct Constraint {
+ int op; /* Mask against sqlite3_index_constraint.op */
+ int fts5op; /* FTS5 mask for idxFlags */
+ int iCol; /* 0==rowid, 1==tbl, 2==rank */
+ int omit; /* True to omit this if found */
+ int iConsIndex; /* Index in pInfo->aConstraint[] */
+ } aConstraint[] = {
+ {SQLITE_INDEX_CONSTRAINT_MATCH|SQLITE_INDEX_CONSTRAINT_EQ,
+ FTS5_BI_MATCH, 1, 1, -1},
+ {SQLITE_INDEX_CONSTRAINT_MATCH|SQLITE_INDEX_CONSTRAINT_EQ,
+ FTS5_BI_RANK, 2, 1, -1},
+ {SQLITE_INDEX_CONSTRAINT_EQ, FTS5_BI_ROWID_EQ, 0, 0, -1},
+ {SQLITE_INDEX_CONSTRAINT_LT|SQLITE_INDEX_CONSTRAINT_LE,
+ FTS5_BI_ROWID_LE, 0, 0, -1},
+ {SQLITE_INDEX_CONSTRAINT_GT|SQLITE_INDEX_CONSTRAINT_GE,
+ FTS5_BI_ROWID_GE, 0, 0, -1},
+ };
+
+ int aColMap[3];
+ aColMap[0] = -1;
+ aColMap[1] = pConfig->nCol;
+ aColMap[2] = pConfig->nCol+1;
+
+ /* Set idxFlags flags for all WHERE clause terms that will be used. */
+ for(i=0; i<pInfo->nConstraint; i++){
+ struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
+ int j;
+ for(j=0; j<sizeof(aConstraint)/sizeof(aConstraint[0]); j++){
+ struct Constraint *pC = &aConstraint[j];
+ if( p->iColumn==aColMap[pC->iCol] && p->op & pC->op ){
+ if( p->usable ){
+ pC->iConsIndex = i;
+ idxFlags |= pC->fts5op;
+ }else if( j==0 ){
+ /* As there exists an unusable MATCH constraint this is an
+ ** unusable plan. Set a prohibitively high cost. */
+ pInfo->estimatedCost = 1e50;
+ return SQLITE_OK;
+ }
+ }
+ }
+ }
+
+ /* Set idxFlags flags for the ORDER BY clause */
+ if( pInfo->nOrderBy==1 ){
+ int iSort = pInfo->aOrderBy[0].iColumn;
+ if( iSort==(pConfig->nCol+1) && BitFlagTest(idxFlags, FTS5_BI_MATCH) ){
+ idxFlags |= FTS5_BI_ORDER_RANK;
+ }else if( iSort==-1 ){
+ idxFlags |= FTS5_BI_ORDER_ROWID;
+ }
+ if( BitFlagTest(idxFlags, FTS5_BI_ORDER_RANK|FTS5_BI_ORDER_ROWID) ){
+ pInfo->orderByConsumed = 1;
+ if( pInfo->aOrderBy[0].desc ){
+ idxFlags |= FTS5_BI_ORDER_DESC;
+ }
+ }
+ }
+
+ /* Calculate the estimated cost based on the flags set in idxFlags. */
+ bHasMatch = BitFlagTest(idxFlags, FTS5_BI_MATCH);
+ if( BitFlagTest(idxFlags, FTS5_BI_ROWID_EQ) ){
+ pInfo->estimatedCost = bHasMatch ? 100.0 : 10.0;
+ if( bHasMatch==0 ) fts5SetUniqueFlag(pInfo);
+ }else if( BitFlagAllTest(idxFlags, FTS5_BI_ROWID_LE|FTS5_BI_ROWID_GE) ){
+ pInfo->estimatedCost = bHasMatch ? 500.0 : 250000.0;
+ }else if( BitFlagTest(idxFlags, FTS5_BI_ROWID_LE|FTS5_BI_ROWID_GE) ){
+ pInfo->estimatedCost = bHasMatch ? 750.0 : 750000.0;
+ }else{
+ pInfo->estimatedCost = bHasMatch ? 1000.0 : 1000000.0;
+ }
+
+ /* Assign argvIndex values to each constraint in use. */
+ iNext = 1;
+ for(i=0; i<sizeof(aConstraint)/sizeof(aConstraint[0]); i++){
+ struct Constraint *pC = &aConstraint[i];
+ if( pC->iConsIndex>=0 ){
+ pInfo->aConstraintUsage[pC->iConsIndex].argvIndex = iNext++;
+ pInfo->aConstraintUsage[pC->iConsIndex].omit = pC->omit;
+ }
+ }
+
+ pInfo->idxNum = idxFlags;
+ return SQLITE_OK;
+}
+
+/*
+** Implementation of xOpen method.
+*/
+static int fts5OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
+ Fts5Table *pTab = (Fts5Table*)pVTab;
+ Fts5Config *pConfig = pTab->pConfig;
+ Fts5Cursor *pCsr; /* New cursor object */
+ int nByte; /* Bytes of space to allocate */
+ int rc = SQLITE_OK; /* Return code */
+
+ nByte = sizeof(Fts5Cursor) + pConfig->nCol * sizeof(int);
+ pCsr = (Fts5Cursor*)sqlite3_malloc(nByte);
+ if( pCsr ){
+ Fts5Global *pGlobal = pTab->pGlobal;
+ memset(pCsr, 0, nByte);
+ pCsr->aColumnSize = (int*)&pCsr[1];
+ pCsr->pNext = pGlobal->pCsr;
+ pGlobal->pCsr = pCsr;
+ pCsr->iCsrId = ++pGlobal->iNextId;
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+ *ppCsr = (sqlite3_vtab_cursor*)pCsr;
+ return rc;
+}
+
+static int fts5StmtType(Fts5Cursor *pCsr){
+ if( pCsr->ePlan==FTS5_PLAN_SCAN ){
+ return (pCsr->bDesc) ? FTS5_STMT_SCAN_DESC : FTS5_STMT_SCAN_ASC;
+ }
+ return FTS5_STMT_LOOKUP;
+}
+
+/*
+** This function is called after the cursor passed as the only argument
+** is moved to point at a different row. It clears all cached data
+** specific to the previous row stored by the cursor object.
+*/
+static void fts5CsrNewrow(Fts5Cursor *pCsr){
+ CsrFlagSet(pCsr,
+ FTS5CSR_REQUIRE_CONTENT
+ | FTS5CSR_REQUIRE_DOCSIZE
+ | FTS5CSR_REQUIRE_INST
+ );
+}
+
+static void fts5FreeCursorComponents(Fts5Cursor *pCsr){
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ Fts5Auxdata *pData;
+ Fts5Auxdata *pNext;
+
+ sqlite3_free(pCsr->aInstIter);
+ sqlite3_free(pCsr->aInst);
+ if( pCsr->pStmt ){
+ int eStmt = fts5StmtType(pCsr);
+ sqlite3Fts5StorageStmtRelease(pTab->pStorage, eStmt, pCsr->pStmt);
+ }
+ if( pCsr->pSorter ){
+ Fts5Sorter *pSorter = pCsr->pSorter;
+ sqlite3_finalize(pSorter->pStmt);
+ sqlite3_free(pSorter);
+ }
+
+ if( pCsr->ePlan!=FTS5_PLAN_SOURCE ){
+ sqlite3Fts5ExprFree(pCsr->pExpr);
+ }
+
+ for(pData=pCsr->pAuxdata; pData; pData=pNext){
+ pNext = pData->pNext;
+ if( pData->xDelete ) pData->xDelete(pData->pPtr);
+ sqlite3_free(pData);
+ }
+
+ sqlite3_finalize(pCsr->pRankArgStmt);
+ sqlite3_free(pCsr->apRankArg);
+
+ if( CsrFlagTest(pCsr, FTS5CSR_FREE_ZRANK) ){
+ sqlite3_free(pCsr->zRank);
+ sqlite3_free(pCsr->zRankArgs);
+ }
+
+ memset(&pCsr->ePlan, 0, sizeof(Fts5Cursor) - ((u8*)&pCsr->ePlan - (u8*)pCsr));
+}
+
+
+/*
+** Close the cursor. For additional information see the documentation
+** on the xClose method of the virtual table interface.
+*/
+static int fts5CloseMethod(sqlite3_vtab_cursor *pCursor){
+ if( pCursor ){
+ Fts5Table *pTab = (Fts5Table*)(pCursor->pVtab);
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
+ Fts5Cursor **pp;
+
+ fts5FreeCursorComponents(pCsr);
+ /* Remove the cursor from the Fts5Global.pCsr list */
+ for(pp=&pTab->pGlobal->pCsr; (*pp)!=pCsr; pp=&(*pp)->pNext);
+ *pp = pCsr->pNext;
+
+ sqlite3_free(pCsr);
+ }
+ return SQLITE_OK;
+}
+
+static int fts5SorterNext(Fts5Cursor *pCsr){
+ Fts5Sorter *pSorter = pCsr->pSorter;
+ int rc;
+
+ rc = sqlite3_step(pSorter->pStmt);
+ if( rc==SQLITE_DONE ){
+ rc = SQLITE_OK;
+ CsrFlagSet(pCsr, FTS5CSR_EOF);
+ }else if( rc==SQLITE_ROW ){
+ const u8 *a;
+ const u8 *aBlob;
+ int nBlob;
+ int i;
+ int iOff = 0;
+ rc = SQLITE_OK;
+
+ pSorter->iRowid = sqlite3_column_int64(pSorter->pStmt, 0);
+ nBlob = sqlite3_column_bytes(pSorter->pStmt, 1);
+ aBlob = a = sqlite3_column_blob(pSorter->pStmt, 1);
+
+ for(i=0; i<(pSorter->nIdx-1); i++){
+ int iVal;
+ a += fts5GetVarint32(a, iVal);
+ iOff += iVal;
+ pSorter->aIdx[i] = iOff;
+ }
+ pSorter->aIdx[i] = &aBlob[nBlob] - a;
+
+ pSorter->aPoslist = a;
+ fts5CsrNewrow(pCsr);
+ }
+
+ return rc;
+}
+
+
+/*
+** Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors
+** open on table pTab.
+*/
+static void fts5TripCursors(Fts5Table *pTab){
+ Fts5Cursor *pCsr;
+ for(pCsr=pTab->pGlobal->pCsr; pCsr; pCsr=pCsr->pNext){
+ if( pCsr->ePlan==FTS5_PLAN_MATCH
+ && pCsr->base.pVtab==(sqlite3_vtab*)pTab
+ ){
+ CsrFlagSet(pCsr, FTS5CSR_REQUIRE_RESEEK);
+ }
+ }
+}
+
+/*
+** If the REQUIRE_RESEEK flag is set on the cursor passed as the first
+** argument, close and reopen all Fts5IndexIter iterators that the cursor
+** is using. Then attempt to move the cursor to a rowid equal to or laster
+** (in the cursors sort order - ASC or DESC) than the current rowid.
+**
+** If the new rowid is not equal to the old, set output parameter *pbSkip
+** to 1 before returning. Otherwise, leave it unchanged.
+**
+** Return SQLITE_OK if successful or if no reseek was required, or an
+** error code if an error occurred.
+*/
+static int fts5CursorReseek(Fts5Cursor *pCsr, int *pbSkip){
+ int rc = SQLITE_OK;
+ assert( *pbSkip==0 );
+ if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_RESEEK) ){
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ int bDesc = pCsr->bDesc;
+ i64 iRowid = sqlite3Fts5ExprRowid(pCsr->pExpr);
+
+ rc = sqlite3Fts5ExprFirst(pCsr->pExpr, pTab->pIndex, iRowid, bDesc);
+ if( rc==SQLITE_OK && iRowid!=sqlite3Fts5ExprRowid(pCsr->pExpr) ){
+ *pbSkip = 1;
+ }
+
+ CsrFlagClear(pCsr, FTS5CSR_REQUIRE_RESEEK);
+ fts5CsrNewrow(pCsr);
+ if( sqlite3Fts5ExprEof(pCsr->pExpr) ){
+ CsrFlagSet(pCsr, FTS5CSR_EOF);
+ }
+ }
+ return rc;
+}
+
+
+/*
+** Advance the cursor to the next row in the table that matches the
+** search criteria.
+**
+** Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned
+** even if we reach end-of-file. The fts5EofMethod() will be called
+** subsequently to determine whether or not an EOF was hit.
+*/
+static int fts5NextMethod(sqlite3_vtab_cursor *pCursor){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
+ int rc = SQLITE_OK;
+
+ assert( (pCsr->ePlan<3)==
+ (pCsr->ePlan==FTS5_PLAN_MATCH || pCsr->ePlan==FTS5_PLAN_SOURCE)
+ );
+
+ if( pCsr->ePlan<3 ){
+ int bSkip = 0;
+ if( (rc = fts5CursorReseek(pCsr, &bSkip)) || bSkip ) return rc;
+ rc = sqlite3Fts5ExprNext(pCsr->pExpr, pCsr->iLastRowid);
+ if( sqlite3Fts5ExprEof(pCsr->pExpr) ){
+ CsrFlagSet(pCsr, FTS5CSR_EOF);
+ }
+ fts5CsrNewrow(pCsr);
+ }else{
+ switch( pCsr->ePlan ){
+ case FTS5_PLAN_SPECIAL: {
+ CsrFlagSet(pCsr, FTS5CSR_EOF);
+ break;
+ }
+
+ case FTS5_PLAN_SORTED_MATCH: {
+ rc = fts5SorterNext(pCsr);
+ break;
+ }
+
+ default:
+ rc = sqlite3_step(pCsr->pStmt);
+ if( rc!=SQLITE_ROW ){
+ CsrFlagSet(pCsr, FTS5CSR_EOF);
+ rc = sqlite3_reset(pCsr->pStmt);
+ }else{
+ rc = SQLITE_OK;
+ }
+ break;
+ }
+ }
+
+ return rc;
+}
+
+static int fts5CursorFirstSorted(Fts5Table *pTab, Fts5Cursor *pCsr, int bDesc){
+ Fts5Config *pConfig = pTab->pConfig;
+ Fts5Sorter *pSorter;
+ int nPhrase;
+ int nByte;
+ int rc = SQLITE_OK;
+ char *zSql;
+ const char *zRank = pCsr->zRank;
+ const char *zRankArgs = pCsr->zRankArgs;
+
+ nPhrase = sqlite3Fts5ExprPhraseCount(pCsr->pExpr);
+ nByte = sizeof(Fts5Sorter) + sizeof(int) * (nPhrase-1);
+ pSorter = (Fts5Sorter*)sqlite3_malloc(nByte);
+ if( pSorter==0 ) return SQLITE_NOMEM;
+ memset(pSorter, 0, nByte);
+ pSorter->nIdx = nPhrase;
+
+ /* TODO: It would be better to have some system for reusing statement
+ ** handles here, rather than preparing a new one for each query. But that
+ ** is not possible as SQLite reference counts the virtual table objects.
+ ** And since the statement required here reads from this very virtual
+ ** table, saving it creates a circular reference.
+ **
+ ** If SQLite a built-in statement cache, this wouldn't be a problem. */
+ zSql = sqlite3Fts5Mprintf(&rc,
+ "SELECT rowid, rank FROM %Q.%Q ORDER BY %s(%s%s%s) %s",
+ pConfig->zDb, pConfig->zName, zRank, pConfig->zName,
+ (zRankArgs ? ", " : ""),
+ (zRankArgs ? zRankArgs : ""),
+ bDesc ? "DESC" : "ASC"
+ );
+ if( zSql ){
+ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &pSorter->pStmt, 0);
+ sqlite3_free(zSql);
+ }
+
+ pCsr->pSorter = pSorter;
+ if( rc==SQLITE_OK ){
+ assert( pTab->pSortCsr==0 );
+ pTab->pSortCsr = pCsr;
+ rc = fts5SorterNext(pCsr);
+ pTab->pSortCsr = 0;
+ }
+
+ if( rc!=SQLITE_OK ){
+ sqlite3_finalize(pSorter->pStmt);
+ sqlite3_free(pSorter);
+ pCsr->pSorter = 0;
+ }
+
+ return rc;
+}
+
+static int fts5CursorFirst(Fts5Table *pTab, Fts5Cursor *pCsr, int bDesc){
+ int rc;
+ Fts5Expr *pExpr = pCsr->pExpr;
+ rc = sqlite3Fts5ExprFirst(pExpr, pTab->pIndex, pCsr->iFirstRowid, bDesc);
+ if( sqlite3Fts5ExprEof(pExpr) ){
+ CsrFlagSet(pCsr, FTS5CSR_EOF);
+ }
+ fts5CsrNewrow(pCsr);
+ return rc;
+}
+
+/*
+** Process a "special" query. A special query is identified as one with a
+** MATCH expression that begins with a '*' character. The remainder of
+** the text passed to the MATCH operator are used as the special query
+** parameters.
+*/
+static int fts5SpecialMatch(
+ Fts5Table *pTab,
+ Fts5Cursor *pCsr,
+ const char *zQuery
+){
+ int rc = SQLITE_OK; /* Return code */
+ const char *z = zQuery; /* Special query text */
+ int n; /* Number of bytes in text at z */
+
+ while( z[0]==' ' ) z++;
+ for(n=0; z[n] && z[n]!=' '; n++);
+
+ assert( pTab->base.zErrMsg==0 );
+ pCsr->ePlan = FTS5_PLAN_SPECIAL;
+
+ if( 0==sqlite3_strnicmp("reads", z, n) ){
+ pCsr->iSpecial = sqlite3Fts5IndexReads(pTab->pIndex);
+ }
+ else if( 0==sqlite3_strnicmp("id", z, n) ){
+ pCsr->iSpecial = pCsr->iCsrId;
+ }
+ else{
+ /* An unrecognized directive. Return an error message. */
+ pTab->base.zErrMsg = sqlite3_mprintf("unknown special query: %.*s", n, z);
+ rc = SQLITE_ERROR;
+ }
+
+ return rc;
+}
+
+/*
+** Search for an auxiliary function named zName that can be used with table
+** pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary
+** structure. Otherwise, if no such function exists, return NULL.
+*/
+static Fts5Auxiliary *fts5FindAuxiliary(Fts5Table *pTab, const char *zName){
+ Fts5Auxiliary *pAux;
+
+ for(pAux=pTab->pGlobal->pAux; pAux; pAux=pAux->pNext){
+ if( sqlite3_stricmp(zName, pAux->zFunc)==0 ) return pAux;
+ }
+
+ /* No function of the specified name was found. Return 0. */
+ return 0;
+}
+
+
+static int fts5FindRankFunction(Fts5Cursor *pCsr){
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ Fts5Config *pConfig = pTab->pConfig;
+ int rc = SQLITE_OK;
+ Fts5Auxiliary *pAux = 0;
+ const char *zRank = pCsr->zRank;
+ const char *zRankArgs = pCsr->zRankArgs;
+
+ if( zRankArgs ){
+ char *zSql = sqlite3Fts5Mprintf(&rc, "SELECT %s", zRankArgs);
+ if( zSql ){
+ sqlite3_stmt *pStmt = 0;
+ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &pStmt, 0);
+ sqlite3_free(zSql);
+ assert( rc==SQLITE_OK || pCsr->pRankArgStmt==0 );
+ if( rc==SQLITE_OK ){
+ if( SQLITE_ROW==sqlite3_step(pStmt) ){
+ int nByte;
+ pCsr->nRankArg = sqlite3_column_count(pStmt);
+ nByte = sizeof(sqlite3_value*)*pCsr->nRankArg;
+ pCsr->apRankArg = (sqlite3_value**)sqlite3Fts5MallocZero(&rc, nByte);
+ if( rc==SQLITE_OK ){
+ int i;
+ for(i=0; i<pCsr->nRankArg; i++){
+ pCsr->apRankArg[i] = sqlite3_column_value(pStmt, i);
+ }
+ }
+ pCsr->pRankArgStmt = pStmt;
+ }else{
+ rc = sqlite3_finalize(pStmt);
+ assert( rc!=SQLITE_OK );
+ }
+ }
+ }
+ }
+
+ if( rc==SQLITE_OK ){
+ pAux = fts5FindAuxiliary(pTab, zRank);
+ if( pAux==0 ){
+ assert( pTab->base.zErrMsg==0 );
+ pTab->base.zErrMsg = sqlite3_mprintf("no such function: %s", zRank);
+ rc = SQLITE_ERROR;
+ }
+ }
+
+ pCsr->pRank = pAux;
+ return rc;
+}
+
+
+static int fts5CursorParseRank(
+ Fts5Config *pConfig,
+ Fts5Cursor *pCsr,
+ sqlite3_value *pRank
+){
+ int rc = SQLITE_OK;
+ if( pRank ){
+ const char *z = (const char*)sqlite3_value_text(pRank);
+ char *zRank = 0;
+ char *zRankArgs = 0;
+
+ if( z==0 ){
+ if( sqlite3_value_type(pRank)==SQLITE_NULL ) rc = SQLITE_ERROR;
+ }else{
+ rc = sqlite3Fts5ConfigParseRank(z, &zRank, &zRankArgs);
+ }
+ if( rc==SQLITE_OK ){
+ pCsr->zRank = zRank;
+ pCsr->zRankArgs = zRankArgs;
+ CsrFlagSet(pCsr, FTS5CSR_FREE_ZRANK);
+ }else if( rc==SQLITE_ERROR ){
+ pCsr->base.pVtab->zErrMsg = sqlite3_mprintf(
+ "parse error in rank function: %s", z
+ );
+ }
+ }else{
+ if( pConfig->zRank ){
+ pCsr->zRank = (char*)pConfig->zRank;
+ pCsr->zRankArgs = (char*)pConfig->zRankArgs;
+ }else{
+ pCsr->zRank = (char*)FTS5_DEFAULT_RANK;
+ pCsr->zRankArgs = 0;
+ }
+ }
+ return rc;
+}
+
+static i64 fts5GetRowidLimit(sqlite3_value *pVal, i64 iDefault){
+ if( pVal ){
+ int eType = sqlite3_value_numeric_type(pVal);
+ if( eType==SQLITE_INTEGER ){
+ return sqlite3_value_int64(pVal);
+ }
+ }
+ return iDefault;
+}
+
+/*
+** This is the xFilter interface for the virtual table. See
+** the virtual table xFilter method documentation for additional
+** information.
+**
+** There are three possible query strategies:
+**
+** 1. Full-text search using a MATCH operator.
+** 2. A by-rowid lookup.
+** 3. A full-table scan.
+*/
+static int fts5FilterMethod(
+ sqlite3_vtab_cursor *pCursor, /* The cursor used for this query */
+ int idxNum, /* Strategy index */
+ const char *idxStr, /* Unused */
+ int nVal, /* Number of elements in apVal */
+ sqlite3_value **apVal /* Arguments for the indexing scheme */
+){
+ Fts5Table *pTab = (Fts5Table*)(pCursor->pVtab);
+ Fts5Config *pConfig = pTab->pConfig;
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
+ int rc = SQLITE_OK; /* Error code */
+ int iVal = 0; /* Counter for apVal[] */
+ int bDesc; /* True if ORDER BY [rank|rowid] DESC */
+ int bOrderByRank; /* True if ORDER BY rank */
+ sqlite3_value *pMatch = 0; /* <tbl> MATCH ? expression (or NULL) */
+ sqlite3_value *pRank = 0; /* rank MATCH ? expression (or NULL) */
+ sqlite3_value *pRowidEq = 0; /* rowid = ? expression (or NULL) */
+ sqlite3_value *pRowidLe = 0; /* rowid <= ? expression (or NULL) */
+ sqlite3_value *pRowidGe = 0; /* rowid >= ? expression (or NULL) */
+ char **pzErrmsg = pConfig->pzErrmsg;
+
+ if( pCsr->ePlan ){
+ fts5FreeCursorComponents(pCsr);
+ memset(&pCsr->ePlan, 0, sizeof(Fts5Cursor) - ((u8*)&pCsr->ePlan-(u8*)pCsr));
+ }
+
+ assert( pCsr->pStmt==0 );
+ assert( pCsr->pExpr==0 );
+ assert( pCsr->csrflags==0 );
+ assert( pCsr->pRank==0 );
+ assert( pCsr->zRank==0 );
+ assert( pCsr->zRankArgs==0 );
+
+ assert( pzErrmsg==0 || pzErrmsg==&pTab->base.zErrMsg );
+ pConfig->pzErrmsg = &pTab->base.zErrMsg;
+
+ /* Decode the arguments passed through to this function.
+ **
+ ** Note: The following set of if(...) statements must be in the same
+ ** order as the corresponding entries in the struct at the top of
+ ** fts5BestIndexMethod(). */
+ if( BitFlagTest(idxNum, FTS5_BI_MATCH) ) pMatch = apVal[iVal++];
+ if( BitFlagTest(idxNum, FTS5_BI_RANK) ) pRank = apVal[iVal++];
+ if( BitFlagTest(idxNum, FTS5_BI_ROWID_EQ) ) pRowidEq = apVal[iVal++];
+ if( BitFlagTest(idxNum, FTS5_BI_ROWID_LE) ) pRowidLe = apVal[iVal++];
+ if( BitFlagTest(idxNum, FTS5_BI_ROWID_GE) ) pRowidGe = apVal[iVal++];
+ assert( iVal==nVal );
+ bOrderByRank = ((idxNum & FTS5_BI_ORDER_RANK) ? 1 : 0);
+ pCsr->bDesc = bDesc = ((idxNum & FTS5_BI_ORDER_DESC) ? 1 : 0);
+
+ /* Set the cursor upper and lower rowid limits. Only some strategies
+ ** actually use them. This is ok, as the xBestIndex() method leaves the
+ ** sqlite3_index_constraint.omit flag clear for range constraints
+ ** on the rowid field. */
+ if( pRowidEq ){
+ pRowidLe = pRowidGe = pRowidEq;
+ }
+ if( bDesc ){
+ pCsr->iFirstRowid = fts5GetRowidLimit(pRowidLe, LARGEST_INT64);
+ pCsr->iLastRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);
+ }else{
+ pCsr->iLastRowid = fts5GetRowidLimit(pRowidLe, LARGEST_INT64);
+ pCsr->iFirstRowid = fts5GetRowidLimit(pRowidGe, SMALLEST_INT64);
+ }
+
+ if( pTab->pSortCsr ){
+ /* If pSortCsr is non-NULL, then this call is being made as part of
+ ** processing for a "... MATCH <expr> ORDER BY rank" query (ePlan is
+ ** set to FTS5_PLAN_SORTED_MATCH). pSortCsr is the cursor that will
+ ** return results to the user for this query. The current cursor
+ ** (pCursor) is used to execute the query issued by function
+ ** fts5CursorFirstSorted() above. */
+ assert( pRowidEq==0 && pRowidLe==0 && pRowidGe==0 && pRank==0 );
+ assert( nVal==0 && pMatch==0 && bOrderByRank==0 && bDesc==0 );
+ assert( pCsr->iLastRowid==LARGEST_INT64 );
+ assert( pCsr->iFirstRowid==SMALLEST_INT64 );
+ pCsr->ePlan = FTS5_PLAN_SOURCE;
+ pCsr->pExpr = pTab->pSortCsr->pExpr;
+ rc = fts5CursorFirst(pTab, pCsr, bDesc);
+ }else if( pMatch ){
+ const char *zExpr = (const char*)sqlite3_value_text(apVal[0]);
+ if( zExpr==0 ) zExpr = "";
+
+ rc = fts5CursorParseRank(pConfig, pCsr, pRank);
+ if( rc==SQLITE_OK ){
+ if( zExpr[0]=='*' ){
+ /* The user has issued a query of the form "MATCH '*...'". This
+ ** indicates that the MATCH expression is not a full text query,
+ ** but a request for an internal parameter. */
+ rc = fts5SpecialMatch(pTab, pCsr, &zExpr[1]);
+ }else{
+ char **pzErr = &pTab->base.zErrMsg;
+ rc = sqlite3Fts5ExprNew(pConfig, zExpr, &pCsr->pExpr, pzErr);
+ if( rc==SQLITE_OK ){
+ if( bOrderByRank ){
+ pCsr->ePlan = FTS5_PLAN_SORTED_MATCH;
+ rc = fts5CursorFirstSorted(pTab, pCsr, bDesc);
+ }else{
+ pCsr->ePlan = FTS5_PLAN_MATCH;
+ rc = fts5CursorFirst(pTab, pCsr, bDesc);
+ }
+ }
+ }
+ }
+ }else if( pConfig->zContent==0 ){
+ *pConfig->pzErrmsg = sqlite3_mprintf(
+ "%s: table does not support scanning", pConfig->zName
+ );
+ rc = SQLITE_ERROR;
+ }else{
+ /* This is either a full-table scan (ePlan==FTS5_PLAN_SCAN) or a lookup
+ ** by rowid (ePlan==FTS5_PLAN_ROWID). */
+ pCsr->ePlan = (pRowidEq ? FTS5_PLAN_ROWID : FTS5_PLAN_SCAN);
+ rc = sqlite3Fts5StorageStmt(
+ pTab->pStorage, fts5StmtType(pCsr), &pCsr->pStmt, &pTab->base.zErrMsg
+ );
+ if( rc==SQLITE_OK ){
+ if( pCsr->ePlan==FTS5_PLAN_ROWID ){
+ sqlite3_bind_value(pCsr->pStmt, 1, apVal[0]);
+ }else{
+ sqlite3_bind_int64(pCsr->pStmt, 1, pCsr->iFirstRowid);
+ sqlite3_bind_int64(pCsr->pStmt, 2, pCsr->iLastRowid);
+ }
+ rc = fts5NextMethod(pCursor);
+ }
+ }
+
+ pConfig->pzErrmsg = pzErrmsg;
+ return rc;
+}
+
+/*
+** This is the xEof method of the virtual table. SQLite calls this
+** routine to find out if it has reached the end of a result set.
+*/
+static int fts5EofMethod(sqlite3_vtab_cursor *pCursor){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
+ return (CsrFlagTest(pCsr, FTS5CSR_EOF) ? 1 : 0);
+}
+
+/*
+** Return the rowid that the cursor currently points to.
+*/
+static i64 fts5CursorRowid(Fts5Cursor *pCsr){
+ assert( pCsr->ePlan==FTS5_PLAN_MATCH
+ || pCsr->ePlan==FTS5_PLAN_SORTED_MATCH
+ || pCsr->ePlan==FTS5_PLAN_SOURCE
+ );
+ if( pCsr->pSorter ){
+ return pCsr->pSorter->iRowid;
+ }else{
+ return sqlite3Fts5ExprRowid(pCsr->pExpr);
+ }
+}
+
+/*
+** This is the xRowid method. The SQLite core calls this routine to
+** retrieve the rowid for the current row of the result set. fts5
+** exposes %_content.rowid as the rowid for the virtual table. The
+** rowid should be written to *pRowid.
+*/
+static int fts5RowidMethod(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
+ int ePlan = pCsr->ePlan;
+
+ assert( CsrFlagTest(pCsr, FTS5CSR_EOF)==0 );
+ switch( ePlan ){
+ case FTS5_PLAN_SPECIAL:
+ *pRowid = 0;
+ break;
+
+ case FTS5_PLAN_SOURCE:
+ case FTS5_PLAN_MATCH:
+ case FTS5_PLAN_SORTED_MATCH:
+ *pRowid = fts5CursorRowid(pCsr);
+ break;
+
+ default:
+ *pRowid = sqlite3_column_int64(pCsr->pStmt, 0);
+ break;
+ }
+
+ return SQLITE_OK;
+}
+
+/*
+** If the cursor requires seeking (bSeekRequired flag is set), seek it.
+** Return SQLITE_OK if no error occurs, or an SQLite error code otherwise.
+**
+** If argument bErrormsg is true and an error occurs, an error message may
+** be left in sqlite3_vtab.zErrMsg.
+*/
+static int fts5SeekCursor(Fts5Cursor *pCsr, int bErrormsg){
+ int rc = SQLITE_OK;
+
+ /* If the cursor does not yet have a statement handle, obtain one now. */
+ if( pCsr->pStmt==0 ){
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ int eStmt = fts5StmtType(pCsr);
+ rc = sqlite3Fts5StorageStmt(
+ pTab->pStorage, eStmt, &pCsr->pStmt, (bErrormsg?&pTab->base.zErrMsg:0)
+ );
+ assert( rc!=SQLITE_OK || pTab->base.zErrMsg==0 );
+ assert( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_CONTENT) );
+ }
+
+ if( rc==SQLITE_OK && CsrFlagTest(pCsr, FTS5CSR_REQUIRE_CONTENT) ){
+ assert( pCsr->pExpr );
+ sqlite3_reset(pCsr->pStmt);
+ sqlite3_bind_int64(pCsr->pStmt, 1, fts5CursorRowid(pCsr));
+ rc = sqlite3_step(pCsr->pStmt);
+ if( rc==SQLITE_ROW ){
+ rc = SQLITE_OK;
+ CsrFlagClear(pCsr, FTS5CSR_REQUIRE_CONTENT);
+ }else{
+ rc = sqlite3_reset(pCsr->pStmt);
+ if( rc==SQLITE_OK ){
+ rc = FTS5_CORRUPT;
+ }
+ }
+ }
+ return rc;
+}
+
+static void fts5SetVtabError(Fts5Table *p, const char *zFormat, ...){
+ va_list ap; /* ... printf arguments */
+ va_start(ap, zFormat);
+ assert( p->base.zErrMsg==0 );
+ p->base.zErrMsg = sqlite3_vmprintf(zFormat, ap);
+ va_end(ap);
+}
+
+/*
+** This function is called to handle an FTS INSERT command. In other words,
+** an INSERT statement of the form:
+**
+** INSERT INTO fts(fts) VALUES($pCmd)
+** INSERT INTO fts(fts, rank) VALUES($pCmd, $pVal)
+**
+** Argument pVal is the value assigned to column "fts" by the INSERT
+** statement. This function returns SQLITE_OK if successful, or an SQLite
+** error code if an error occurs.
+**
+** The commands implemented by this function are documented in the "Special
+** INSERT Directives" section of the documentation. It should be updated if
+** more commands are added to this function.
+*/
+static int fts5SpecialInsert(
+ Fts5Table *pTab, /* Fts5 table object */
+ const char *zCmd, /* Text inserted into table-name column */
+ sqlite3_value *pVal /* Value inserted into rank column */
+){
+ Fts5Config *pConfig = pTab->pConfig;
+ int rc = SQLITE_OK;
+ int bError = 0;
+
+ if( 0==sqlite3_stricmp("delete-all", zCmd) ){
+ if( pConfig->eContent==FTS5_CONTENT_NORMAL ){
+ fts5SetVtabError(pTab,
+ "'delete-all' may only be used with a "
+ "contentless or external content fts5 table"
+ );
+ rc = SQLITE_ERROR;
+ }else{
+ rc = sqlite3Fts5StorageDeleteAll(pTab->pStorage);
+ }
+ }else if( 0==sqlite3_stricmp("rebuild", zCmd) ){
+ if( pConfig->eContent==FTS5_CONTENT_NONE ){
+ fts5SetVtabError(pTab,
+ "'rebuild' may not be used with a contentless fts5 table"
+ );
+ rc = SQLITE_ERROR;
+ }else{
+ rc = sqlite3Fts5StorageRebuild(pTab->pStorage);
+ }
+ }else if( 0==sqlite3_stricmp("optimize", zCmd) ){
+ rc = sqlite3Fts5StorageOptimize(pTab->pStorage);
+ }else if( 0==sqlite3_stricmp("merge", zCmd) ){
+ int nMerge = sqlite3_value_int(pVal);
+ rc = sqlite3Fts5StorageMerge(pTab->pStorage, nMerge);
+ }else if( 0==sqlite3_stricmp("integrity-check", zCmd) ){
+ rc = sqlite3Fts5StorageIntegrity(pTab->pStorage);
+#ifdef SQLITE_DEBUG
+ }else if( 0==sqlite3_stricmp("prefix-index", zCmd) ){
+ pConfig->bPrefixIndex = sqlite3_value_int(pVal);
+#endif
+ }else{
+ rc = sqlite3Fts5IndexLoadConfig(pTab->pIndex);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5ConfigSetValue(pTab->pConfig, zCmd, pVal, &bError);
+ }
+ if( rc==SQLITE_OK ){
+ if( bError ){
+ rc = SQLITE_ERROR;
+ }else{
+ rc = sqlite3Fts5StorageConfigValue(pTab->pStorage, zCmd, pVal, 0);
+ }
+ }
+ }
+ return rc;
+}
+
+static int fts5SpecialDelete(
+ Fts5Table *pTab,
+ sqlite3_value **apVal,
+ sqlite3_int64 *piRowid
+){
+ int rc = SQLITE_OK;
+ int eType1 = sqlite3_value_type(apVal[1]);
+ if( eType1==SQLITE_INTEGER ){
+ sqlite3_int64 iDel = sqlite3_value_int64(apVal[1]);
+ rc = sqlite3Fts5StorageSpecialDelete(pTab->pStorage, iDel, &apVal[2]);
+ }
+ return rc;
+}
+
+static void fts5StorageInsert(
+ int *pRc,
+ Fts5Table *pTab,
+ sqlite3_value **apVal,
+ i64 *piRowid
+){
+ int rc = *pRc;
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageContentInsert(pTab->pStorage, apVal, piRowid);
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageIndexInsert(pTab->pStorage, apVal, *piRowid);
+ }
+ *pRc = rc;
+}
+
+/*
+** This function is the implementation of the xUpdate callback used by
+** FTS3 virtual tables. It is invoked by SQLite each time a row is to be
+** inserted, updated or deleted.
+**
+** A delete specifies a single argument - the rowid of the row to remove.
+**
+** Update and insert operations pass:
+**
+** 1. The "old" rowid, or NULL.
+** 2. The "new" rowid.
+** 3. Values for each of the nCol matchable columns.
+** 4. Values for the two hidden columns (<tablename> and "rank").
+*/
+static int fts5UpdateMethod(
+ sqlite3_vtab *pVtab, /* Virtual table handle */
+ int nArg, /* Size of argument array */
+ sqlite3_value **apVal, /* Array of arguments */
+ sqlite_int64 *pRowid /* OUT: The affected (or effected) rowid */
+){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ Fts5Config *pConfig = pTab->pConfig;
+ int eType0; /* value_type() of apVal[0] */
+ int rc = SQLITE_OK; /* Return code */
+
+ /* A transaction must be open when this is called. */
+ assert( pTab->ts.eState==1 );
+
+ assert( pVtab->zErrMsg==0 );
+ assert( nArg==1 || nArg==(2+pConfig->nCol+2) );
+ assert( nArg==1
+ || sqlite3_value_type(apVal[1])==SQLITE_INTEGER
+ || sqlite3_value_type(apVal[1])==SQLITE_NULL
+ );
+ assert( pTab->pConfig->pzErrmsg==0 );
+ pTab->pConfig->pzErrmsg = &pTab->base.zErrMsg;
+
+ /* Put any active cursors into REQUIRE_SEEK state. */
+ fts5TripCursors(pTab);
+
+ eType0 = sqlite3_value_type(apVal[0]);
+ if( eType0==SQLITE_NULL
+ && sqlite3_value_type(apVal[2+pConfig->nCol])!=SQLITE_NULL
+ ){
+ /* A "special" INSERT op. These are handled separately. */
+ const char *z = (const char*)sqlite3_value_text(apVal[2+pConfig->nCol]);
+ if( pConfig->eContent!=FTS5_CONTENT_NORMAL
+ && 0==sqlite3_stricmp("delete", z)
+ ){
+ rc = fts5SpecialDelete(pTab, apVal, pRowid);
+ }else{
+ rc = fts5SpecialInsert(pTab, z, apVal[2 + pConfig->nCol + 1]);
+ }
+ }else{
+ /* A regular INSERT, UPDATE or DELETE statement. The trick here is that
+ ** any conflict on the rowid value must be detected before any
+ ** modifications are made to the database file. There are 4 cases:
+ **
+ ** 1) DELETE
+ ** 2) UPDATE (rowid not modified)
+ ** 3) UPDATE (rowid modified)
+ ** 4) INSERT
+ **
+ ** Cases 3 and 4 may violate the rowid constraint.
+ */
+ int eConflict = sqlite3_vtab_on_conflict(pConfig->db);
+
+ assert( eType0==SQLITE_INTEGER || eType0==SQLITE_NULL );
+ assert( nArg!=1 || eType0==SQLITE_INTEGER );
+
+ /* Filter out attempts to run UPDATE or DELETE on contentless tables.
+ ** This is not suported. */
+ if( eType0==SQLITE_INTEGER && fts5IsContentless(pTab) ){
+ pTab->base.zErrMsg = sqlite3_mprintf(
+ "cannot %s contentless fts5 table: %s",
+ (nArg>1 ? "UPDATE" : "DELETE from"), pConfig->zName
+ );
+ rc = SQLITE_ERROR;
+ }
+
+ /* Case 1: DELETE */
+ else if( nArg==1 ){
+ i64 iDel = sqlite3_value_int64(apVal[0]); /* Rowid to delete */
+ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iDel);
+ }
+
+ /* Case 2: INSERT */
+ else if( eType0!=SQLITE_INTEGER ){
+ /* If this is a REPLACE, first remove the current entry (if any) */
+ if( eConflict==SQLITE_REPLACE
+ && sqlite3_value_type(apVal[1])==SQLITE_INTEGER
+ ){
+ i64 iNew = sqlite3_value_int64(apVal[1]); /* Rowid to delete */
+ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iNew);
+ }
+ fts5StorageInsert(&rc, pTab, apVal, pRowid);
+ }
+
+ /* Case 2: UPDATE */
+ else{
+ i64 iOld = sqlite3_value_int64(apVal[0]); /* Old rowid */
+ i64 iNew = sqlite3_value_int64(apVal[1]); /* New rowid */
+ if( iOld!=iNew ){
+ if( eConflict==SQLITE_REPLACE ){
+ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iOld);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iNew);
+ }
+ fts5StorageInsert(&rc, pTab, apVal, pRowid);
+ }else{
+ rc = sqlite3Fts5StorageContentInsert(pTab->pStorage, apVal, pRowid);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iOld);
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageIndexInsert(pTab->pStorage, apVal, *pRowid);
+ }
+ }
+ }else{
+ rc = sqlite3Fts5StorageDelete(pTab->pStorage, iOld);
+ fts5StorageInsert(&rc, pTab, apVal, pRowid);
+ }
+ }
+ }
+
+ pTab->pConfig->pzErrmsg = 0;
+ return rc;
+}
+
+/*
+** Implementation of xSync() method.
+*/
+static int fts5SyncMethod(sqlite3_vtab *pVtab){
+ int rc;
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ fts5CheckTransactionState(pTab, FTS5_SYNC, 0);
+ pTab->pConfig->pzErrmsg = &pTab->base.zErrMsg;
+ fts5TripCursors(pTab);
+ rc = sqlite3Fts5StorageSync(pTab->pStorage, 1);
+ pTab->pConfig->pzErrmsg = 0;
+ return rc;
+}
+
+/*
+** Implementation of xBegin() method.
+*/
+static int fts5BeginMethod(sqlite3_vtab *pVtab){
+ fts5CheckTransactionState((Fts5Table*)pVtab, FTS5_BEGIN, 0);
+ return SQLITE_OK;
+}
+
+/*
+** Implementation of xCommit() method. This is a no-op. The contents of
+** the pending-terms hash-table have already been flushed into the database
+** by fts5SyncMethod().
+*/
+static int fts5CommitMethod(sqlite3_vtab *pVtab){
+ fts5CheckTransactionState((Fts5Table*)pVtab, FTS5_COMMIT, 0);
+ return SQLITE_OK;
+}
+
+/*
+** Implementation of xRollback(). Discard the contents of the pending-terms
+** hash-table. Any changes made to the database are reverted by SQLite.
+*/
+static int fts5RollbackMethod(sqlite3_vtab *pVtab){
+ int rc;
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ fts5CheckTransactionState(pTab, FTS5_ROLLBACK, 0);
+ rc = sqlite3Fts5StorageRollback(pTab->pStorage);
+ return rc;
+}
+
+static void *fts5ApiUserData(Fts5Context *pCtx){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ return pCsr->pAux->pUserData;
+}
+
+static int fts5ApiColumnCount(Fts5Context *pCtx){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ return ((Fts5Table*)(pCsr->base.pVtab))->pConfig->nCol;
+}
+
+static int fts5ApiColumnTotalSize(
+ Fts5Context *pCtx,
+ int iCol,
+ sqlite3_int64 *pnToken
+){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ return sqlite3Fts5StorageSize(pTab->pStorage, iCol, pnToken);
+}
+
+static int fts5ApiRowCount(Fts5Context *pCtx, i64 *pnRow){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ return sqlite3Fts5StorageRowCount(pTab->pStorage, pnRow);
+}
+
+static int fts5ApiTokenize(
+ Fts5Context *pCtx,
+ const char *pText, int nText,
+ void *pUserData,
+ int (*xToken)(void*, int, const char*, int, int, int)
+){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ return sqlite3Fts5Tokenize(
+ pTab->pConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken
+ );
+}
+
+static int fts5ApiPhraseCount(Fts5Context *pCtx){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ return sqlite3Fts5ExprPhraseCount(pCsr->pExpr);
+}
+
+static int fts5ApiPhraseSize(Fts5Context *pCtx, int iPhrase){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ return sqlite3Fts5ExprPhraseSize(pCsr->pExpr, iPhrase);
+}
+
+static int fts5CsrPoslist(Fts5Cursor *pCsr, int iPhrase, const u8 **pa){
+ int n;
+ if( pCsr->pSorter ){
+ Fts5Sorter *pSorter = pCsr->pSorter;
+ int i1 = (iPhrase==0 ? 0 : pSorter->aIdx[iPhrase-1]);
+ n = pSorter->aIdx[iPhrase] - i1;
+ *pa = &pSorter->aPoslist[i1];
+ }else{
+ n = sqlite3Fts5ExprPoslist(pCsr->pExpr, iPhrase, pa);
+ }
+ return n;
+}
+
+/*
+** Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated
+** correctly for the current view. Return SQLITE_OK if successful, or an
+** SQLite error code otherwise.
+*/
+static int fts5CacheInstArray(Fts5Cursor *pCsr){
+ int rc = SQLITE_OK;
+ Fts5PoslistReader *aIter; /* One iterator for each phrase */
+ int nIter; /* Number of iterators/phrases */
+
+ nIter = sqlite3Fts5ExprPhraseCount(pCsr->pExpr);
+ if( pCsr->aInstIter==0 ){
+ int nByte = sizeof(Fts5PoslistReader) * nIter;
+ pCsr->aInstIter = (Fts5PoslistReader*)sqlite3Fts5MallocZero(&rc, nByte);
+ }
+ aIter = pCsr->aInstIter;
+
+ if( aIter ){
+ int nInst = 0; /* Number instances seen so far */
+ int i;
+
+ /* Initialize all iterators */
+ for(i=0; i<nIter; i++){
+ const u8 *a;
+ int n = fts5CsrPoslist(pCsr, i, &a);
+ sqlite3Fts5PoslistReaderInit(a, n, &aIter[i]);
+ }
+
+ while( 1 ){
+ int *aInst;
+ int iBest = -1;
+ for(i=0; i<nIter; i++){
+ if( (aIter[i].bEof==0)
+ && (iBest<0 || aIter[i].iPos<aIter[iBest].iPos)
+ ){
+ iBest = i;
+ }
+ }
+ if( iBest<0 ) break;
+
+ nInst++;
+ if( nInst>=pCsr->nInstAlloc ){
+ pCsr->nInstAlloc = pCsr->nInstAlloc ? pCsr->nInstAlloc*2 : 32;
+ aInst = (int*)sqlite3_realloc(
+ pCsr->aInst, pCsr->nInstAlloc*sizeof(int)*3
+ );
+ if( aInst ){
+ pCsr->aInst = aInst;
+ }else{
+ rc = SQLITE_NOMEM;
+ break;
+ }
+ }
+
+ aInst = &pCsr->aInst[3 * (nInst-1)];
+ aInst[0] = iBest;
+ aInst[1] = FTS5_POS2COLUMN(aIter[iBest].iPos);
+ aInst[2] = FTS5_POS2OFFSET(aIter[iBest].iPos);
+ sqlite3Fts5PoslistReaderNext(&aIter[iBest]);
+ }
+
+ pCsr->nInstCount = nInst;
+ CsrFlagClear(pCsr, FTS5CSR_REQUIRE_INST);
+ }
+ return rc;
+}
+
+static int fts5ApiInstCount(Fts5Context *pCtx, int *pnInst){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ int rc = SQLITE_OK;
+ if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_INST)==0
+ || SQLITE_OK==(rc = fts5CacheInstArray(pCsr)) ){
+ *pnInst = pCsr->nInstCount;
+ }
+ return rc;
+}
+
+static int fts5ApiInst(
+ Fts5Context *pCtx,
+ int iIdx,
+ int *piPhrase,
+ int *piCol,
+ int *piOff
+){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ int rc = SQLITE_OK;
+ if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_INST)==0
+ || SQLITE_OK==(rc = fts5CacheInstArray(pCsr))
+ ){
+ if( iIdx<0 || iIdx>=pCsr->nInstCount ){
+ rc = SQLITE_RANGE;
+ }else{
+ *piPhrase = pCsr->aInst[iIdx*3];
+ *piCol = pCsr->aInst[iIdx*3 + 1];
+ *piOff = pCsr->aInst[iIdx*3 + 2];
+ }
+ }
+ return rc;
+}
+
+static sqlite3_int64 fts5ApiRowid(Fts5Context *pCtx){
+ return fts5CursorRowid((Fts5Cursor*)pCtx);
+}
+
+static int fts5ApiColumnText(
+ Fts5Context *pCtx,
+ int iCol,
+ const char **pz,
+ int *pn
+){
+ int rc = SQLITE_OK;
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ if( fts5IsContentless((Fts5Table*)(pCsr->base.pVtab)) ){
+ *pz = 0;
+ *pn = 0;
+ }else{
+ rc = fts5SeekCursor(pCsr, 0);
+ if( rc==SQLITE_OK ){
+ *pz = (const char*)sqlite3_column_text(pCsr->pStmt, iCol+1);
+ *pn = sqlite3_column_bytes(pCsr->pStmt, iCol+1);
+ }
+ }
+ return rc;
+}
+
+static int fts5ColumnSizeCb(
+ void *pContext, /* Pointer to int */
+ int tflags,
+ const char *pToken, /* Buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStart, /* Start offset of token */
+ int iEnd /* End offset of token */
+){
+ int *pCnt = (int*)pContext;
+ if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){
+ (*pCnt)++;
+ }
+ return SQLITE_OK;
+}
+
+static int fts5ApiColumnSize(Fts5Context *pCtx, int iCol, int *pnToken){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ Fts5Config *pConfig = pTab->pConfig;
+ int rc = SQLITE_OK;
+
+ if( CsrFlagTest(pCsr, FTS5CSR_REQUIRE_DOCSIZE) ){
+ if( pConfig->bColumnsize ){
+ i64 iRowid = fts5CursorRowid(pCsr);
+ rc = sqlite3Fts5StorageDocsize(pTab->pStorage, iRowid, pCsr->aColumnSize);
+ }else if( pConfig->zContent==0 ){
+ int i;
+ for(i=0; i<pConfig->nCol; i++){
+ if( pConfig->abUnindexed[i]==0 ){
+ pCsr->aColumnSize[i] = -1;
+ }
+ }
+ }else{
+ int i;
+ for(i=0; rc==SQLITE_OK && i<pConfig->nCol; i++){
+ if( pConfig->abUnindexed[i]==0 ){
+ const char *z; int n;
+ void *p = (void*)(&pCsr->aColumnSize[i]);
+ pCsr->aColumnSize[i] = 0;
+ rc = fts5ApiColumnText(pCtx, i, &z, &n);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5Tokenize(
+ pConfig, FTS5_TOKENIZE_AUX, z, n, p, fts5ColumnSizeCb
+ );
+ }
+ }
+ }
+ }
+ CsrFlagClear(pCsr, FTS5CSR_REQUIRE_DOCSIZE);
+ }
+ if( iCol<0 ){
+ int i;
+ *pnToken = 0;
+ for(i=0; i<pConfig->nCol; i++){
+ *pnToken += pCsr->aColumnSize[i];
+ }
+ }else if( iCol<pConfig->nCol ){
+ *pnToken = pCsr->aColumnSize[iCol];
+ }else{
+ *pnToken = 0;
+ rc = SQLITE_RANGE;
+ }
+ return rc;
+}
+
+/*
+** Implementation of the xSetAuxdata() method.
+*/
+static int fts5ApiSetAuxdata(
+ Fts5Context *pCtx, /* Fts5 context */
+ void *pPtr, /* Pointer to save as auxdata */
+ void(*xDelete)(void*) /* Destructor for pPtr (or NULL) */
+){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Auxdata *pData;
+
+ /* Search through the cursors list of Fts5Auxdata objects for one that
+ ** corresponds to the currently executing auxiliary function. */
+ for(pData=pCsr->pAuxdata; pData; pData=pData->pNext){
+ if( pData->pAux==pCsr->pAux ) break;
+ }
+
+ if( pData ){
+ if( pData->xDelete ){
+ pData->xDelete(pData->pPtr);
+ }
+ }else{
+ int rc = SQLITE_OK;
+ pData = (Fts5Auxdata*)sqlite3Fts5MallocZero(&rc, sizeof(Fts5Auxdata));
+ if( pData==0 ){
+ if( xDelete ) xDelete(pPtr);
+ return rc;
+ }
+ pData->pAux = pCsr->pAux;
+ pData->pNext = pCsr->pAuxdata;
+ pCsr->pAuxdata = pData;
+ }
+
+ pData->xDelete = xDelete;
+ pData->pPtr = pPtr;
+ return SQLITE_OK;
+}
+
+static void *fts5ApiGetAuxdata(Fts5Context *pCtx, int bClear){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Auxdata *pData;
+ void *pRet = 0;
+
+ for(pData=pCsr->pAuxdata; pData; pData=pData->pNext){
+ if( pData->pAux==pCsr->pAux ) break;
+ }
+
+ if( pData ){
+ pRet = pData->pPtr;
+ if( bClear ){
+ pData->pPtr = 0;
+ pData->xDelete = 0;
+ }
+ }
+
+ return pRet;
+}
+
+static void fts5ApiPhraseNext(
+ Fts5Context *pCtx,
+ Fts5PhraseIter *pIter,
+ int *piCol, int *piOff
+){
+ if( pIter->a>=pIter->b ){
+ *piCol = -1;
+ *piOff = -1;
+ }else{
+ int iVal;
+ pIter->a += fts5GetVarint32(pIter->a, iVal);
+ if( iVal==1 ){
+ pIter->a += fts5GetVarint32(pIter->a, iVal);
+ *piCol = iVal;
+ *piOff = 0;
+ pIter->a += fts5GetVarint32(pIter->a, iVal);
+ }
+ *piOff += (iVal-2);
+ }
+}
+
+static void fts5ApiPhraseFirst(
+ Fts5Context *pCtx,
+ int iPhrase,
+ Fts5PhraseIter *pIter,
+ int *piCol, int *piOff
+){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ int n = fts5CsrPoslist(pCsr, iPhrase, &pIter->a);
+ pIter->b = &pIter->a[n];
+ *piCol = 0;
+ *piOff = 0;
+ fts5ApiPhraseNext(pCtx, pIter, piCol, piOff);
+}
+
+static int fts5ApiQueryPhrase(Fts5Context*, int, void*,
+ int(*)(const Fts5ExtensionApi*, Fts5Context*, void*)
+);
+
+static const Fts5ExtensionApi sFts5Api = {
+ 2, /* iVersion */
+ fts5ApiUserData,
+ fts5ApiColumnCount,
+ fts5ApiRowCount,
+ fts5ApiColumnTotalSize,
+ fts5ApiTokenize,
+ fts5ApiPhraseCount,
+ fts5ApiPhraseSize,
+ fts5ApiInstCount,
+ fts5ApiInst,
+ fts5ApiRowid,
+ fts5ApiColumnText,
+ fts5ApiColumnSize,
+ fts5ApiQueryPhrase,
+ fts5ApiSetAuxdata,
+ fts5ApiGetAuxdata,
+ fts5ApiPhraseFirst,
+ fts5ApiPhraseNext,
+};
+
+
+/*
+** Implementation of API function xQueryPhrase().
+*/
+static int fts5ApiQueryPhrase(
+ Fts5Context *pCtx,
+ int iPhrase,
+ void *pUserData,
+ int(*xCallback)(const Fts5ExtensionApi*, Fts5Context*, void*)
+){
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
+ Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
+ int rc;
+ Fts5Cursor *pNew = 0;
+
+ rc = fts5OpenMethod(pCsr->base.pVtab, (sqlite3_vtab_cursor**)&pNew);
+ if( rc==SQLITE_OK ){
+ Fts5Config *pConf = pTab->pConfig;
+ pNew->ePlan = FTS5_PLAN_MATCH;
+ pNew->iFirstRowid = SMALLEST_INT64;
+ pNew->iLastRowid = LARGEST_INT64;
+ pNew->base.pVtab = (sqlite3_vtab*)pTab;
+ rc = sqlite3Fts5ExprClonePhrase(pConf, pCsr->pExpr, iPhrase, &pNew->pExpr);
+ }
+
+ if( rc==SQLITE_OK ){
+ for(rc = fts5CursorFirst(pTab, pNew, 0);
+ rc==SQLITE_OK && CsrFlagTest(pNew, FTS5CSR_EOF)==0;
+ rc = fts5NextMethod((sqlite3_vtab_cursor*)pNew)
+ ){
+ rc = xCallback(&sFts5Api, (Fts5Context*)pNew, pUserData);
+ if( rc!=SQLITE_OK ){
+ if( rc==SQLITE_DONE ) rc = SQLITE_OK;
+ break;
+ }
+ }
+ }
+
+ fts5CloseMethod((sqlite3_vtab_cursor*)pNew);
+ return rc;
+}
+
+static void fts5ApiInvoke(
+ Fts5Auxiliary *pAux,
+ Fts5Cursor *pCsr,
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+){
+ assert( pCsr->pAux==0 );
+ pCsr->pAux = pAux;
+ pAux->xFunc(&sFts5Api, (Fts5Context*)pCsr, context, argc, argv);
+ pCsr->pAux = 0;
+}
+
+static Fts5Cursor *fts5CursorFromCsrid(Fts5Global *pGlobal, i64 iCsrId){
+ Fts5Cursor *pCsr;
+ for(pCsr=pGlobal->pCsr; pCsr; pCsr=pCsr->pNext){
+ if( pCsr->iCsrId==iCsrId ) break;
+ }
+ return pCsr;
+}
+
+static void fts5ApiCallback(
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+){
+
+ Fts5Auxiliary *pAux;
+ Fts5Cursor *pCsr;
+ i64 iCsrId;
+
+ assert( argc>=1 );
+ pAux = (Fts5Auxiliary*)sqlite3_user_data(context);
+ iCsrId = sqlite3_value_int64(argv[0]);
+
+ pCsr = fts5CursorFromCsrid(pAux->pGlobal, iCsrId);
+ if( pCsr==0 ){
+ char *zErr = sqlite3_mprintf("no such cursor: %lld", iCsrId);
+ sqlite3_result_error(context, zErr, -1);
+ sqlite3_free(zErr);
+ }else{
+ fts5ApiInvoke(pAux, pCsr, context, argc-1, &argv[1]);
+ }
+}
+
+
+/*
+** Given cursor id iId, return a pointer to the corresponding Fts5Index
+** object. Or NULL If the cursor id does not exist.
+**
+** If successful, set *pnCol to the number of indexed columns in the
+** table before returning.
+*/
+static Fts5Index *sqlite3Fts5IndexFromCsrid(
+ Fts5Global *pGlobal,
+ i64 iCsrId,
+ int *pnCol
+){
+ Fts5Cursor *pCsr;
+ Fts5Table *pTab;
+
+ pCsr = fts5CursorFromCsrid(pGlobal, iCsrId);
+ pTab = (Fts5Table*)pCsr->base.pVtab;
+ *pnCol = pTab->pConfig->nCol;
+
+ return pTab->pIndex;
+}
+
+/*
+** Return a "position-list blob" corresponding to the current position of
+** cursor pCsr via sqlite3_result_blob(). A position-list blob contains
+** the current position-list for each phrase in the query associated with
+** cursor pCsr.
+**
+** A position-list blob begins with (nPhrase-1) varints, where nPhrase is
+** the number of phrases in the query. Following the varints are the
+** concatenated position lists for each phrase, in order.
+**
+** The first varint (if it exists) contains the size of the position list
+** for phrase 0. The second (same disclaimer) contains the size of position
+** list 1. And so on. There is no size field for the final position list,
+** as it can be derived from the total size of the blob.
+*/
+static int fts5PoslistBlob(sqlite3_context *pCtx, Fts5Cursor *pCsr){
+ int i;
+ int rc = SQLITE_OK;
+ int nPhrase = sqlite3Fts5ExprPhraseCount(pCsr->pExpr);
+ Fts5Buffer val;
+
+ memset(&val, 0, sizeof(Fts5Buffer));
+
+ /* Append the varints */
+ for(i=0; i<(nPhrase-1); i++){
+ const u8 *dummy;
+ int nByte = sqlite3Fts5ExprPoslist(pCsr->pExpr, i, &dummy);
+ sqlite3Fts5BufferAppendVarint(&rc, &val, nByte);
+ }
+
+ /* Append the position lists */
+ for(i=0; i<nPhrase; i++){
+ const u8 *pPoslist;
+ int nPoslist;
+ nPoslist = sqlite3Fts5ExprPoslist(pCsr->pExpr, i, &pPoslist);
+ sqlite3Fts5BufferAppendBlob(&rc, &val, nPoslist, pPoslist);
+ }
+
+ sqlite3_result_blob(pCtx, val.p, val.n, sqlite3_free);
+ return rc;
+}
+
+/*
+** This is the xColumn method, called by SQLite to request a value from
+** the row that the supplied cursor currently points to.
+*/
+static int fts5ColumnMethod(
+ sqlite3_vtab_cursor *pCursor, /* Cursor to retrieve value from */
+ sqlite3_context *pCtx, /* Context for sqlite3_result_xxx() calls */
+ int iCol /* Index of column to read value from */
+){
+ Fts5Table *pTab = (Fts5Table*)(pCursor->pVtab);
+ Fts5Config *pConfig = pTab->pConfig;
+ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
+ int rc = SQLITE_OK;
+
+ assert( CsrFlagTest(pCsr, FTS5CSR_EOF)==0 );
+
+ if( pCsr->ePlan==FTS5_PLAN_SPECIAL ){
+ if( iCol==pConfig->nCol ){
+ sqlite3_result_int64(pCtx, pCsr->iSpecial);
+ }
+ }else
+
+ if( iCol==pConfig->nCol ){
+ /* User is requesting the value of the special column with the same name
+ ** as the table. Return the cursor integer id number. This value is only
+ ** useful in that it may be passed as the first argument to an FTS5
+ ** auxiliary function. */
+ sqlite3_result_int64(pCtx, pCsr->iCsrId);
+ }else if( iCol==pConfig->nCol+1 ){
+
+ /* The value of the "rank" column. */
+ if( pCsr->ePlan==FTS5_PLAN_SOURCE ){
+ fts5PoslistBlob(pCtx, pCsr);
+ }else if(
+ pCsr->ePlan==FTS5_PLAN_MATCH
+ || pCsr->ePlan==FTS5_PLAN_SORTED_MATCH
+ ){
+ if( pCsr->pRank || SQLITE_OK==(rc = fts5FindRankFunction(pCsr)) ){
+ fts5ApiInvoke(pCsr->pRank, pCsr, pCtx, pCsr->nRankArg, pCsr->apRankArg);
+ }
+ }
+ }else if( !fts5IsContentless(pTab) ){
+ rc = fts5SeekCursor(pCsr, 1);
+ if( rc==SQLITE_OK ){
+ sqlite3_result_value(pCtx, sqlite3_column_value(pCsr->pStmt, iCol+1));
+ }
+ }
+ return rc;
+}
+
+
+/*
+** This routine implements the xFindFunction method for the FTS3
+** virtual table.
+*/
+static int fts5FindFunctionMethod(
+ sqlite3_vtab *pVtab, /* Virtual table handle */
+ int nArg, /* Number of SQL function arguments */
+ const char *zName, /* Name of SQL function */
+ void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), /* OUT: Result */
+ void **ppArg /* OUT: User data for *pxFunc */
+){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ Fts5Auxiliary *pAux;
+
+ pAux = fts5FindAuxiliary(pTab, zName);
+ if( pAux ){
+ *pxFunc = fts5ApiCallback;
+ *ppArg = (void*)pAux;
+ return 1;
+ }
+
+ /* No function of the specified name was found. Return 0. */
+ return 0;
+}
+
+/*
+** Implementation of FTS5 xRename method. Rename an fts5 table.
+*/
+static int fts5RenameMethod(
+ sqlite3_vtab *pVtab, /* Virtual table handle */
+ const char *zName /* New name of table */
+){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ return sqlite3Fts5StorageRename(pTab->pStorage, zName);
+}
+
+/*
+** The xSavepoint() method.
+**
+** Flush the contents of the pending-terms table to disk.
+*/
+static int fts5SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ fts5CheckTransactionState(pTab, FTS5_SAVEPOINT, iSavepoint);
+ fts5TripCursors(pTab);
+ return sqlite3Fts5StorageSync(pTab->pStorage, 0);
+}
+
+/*
+** The xRelease() method.
+**
+** This is a no-op.
+*/
+static int fts5ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ fts5CheckTransactionState(pTab, FTS5_RELEASE, iSavepoint);
+ fts5TripCursors(pTab);
+ return sqlite3Fts5StorageSync(pTab->pStorage, 0);
+}
+
+/*
+** The xRollbackTo() method.
+**
+** Discard the contents of the pending terms table.
+*/
+static int fts5RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
+ Fts5Table *pTab = (Fts5Table*)pVtab;
+ fts5CheckTransactionState(pTab, FTS5_ROLLBACKTO, iSavepoint);
+ fts5TripCursors(pTab);
+ return sqlite3Fts5StorageRollback(pTab->pStorage);
+}
+
+/*
+** Register a new auxiliary function with global context pGlobal.
+*/
+static int fts5CreateAux(
+ fts5_api *pApi, /* Global context (one per db handle) */
+ const char *zName, /* Name of new function */
+ void *pUserData, /* User data for aux. function */
+ fts5_extension_function xFunc, /* Aux. function implementation */
+ void(*xDestroy)(void*) /* Destructor for pUserData */
+){
+ Fts5Global *pGlobal = (Fts5Global*)pApi;
+ int rc = sqlite3_overload_function(pGlobal->db, zName, -1);
+ if( rc==SQLITE_OK ){
+ Fts5Auxiliary *pAux;
+ int nName; /* Size of zName in bytes, including \0 */
+ int nByte; /* Bytes of space to allocate */
+
+ nName = (int)strlen(zName) + 1;
+ nByte = sizeof(Fts5Auxiliary) + nName;
+ pAux = (Fts5Auxiliary*)sqlite3_malloc(nByte);
+ if( pAux ){
+ memset(pAux, 0, nByte);
+ pAux->zFunc = (char*)&pAux[1];
+ memcpy(pAux->zFunc, zName, nName);
+ pAux->pGlobal = pGlobal;
+ pAux->pUserData = pUserData;
+ pAux->xFunc = xFunc;
+ pAux->xDestroy = xDestroy;
+ pAux->pNext = pGlobal->pAux;
+ pGlobal->pAux = pAux;
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Register a new tokenizer. This is the implementation of the
+** fts5_api.xCreateTokenizer() method.
+*/
+static int fts5CreateTokenizer(
+ fts5_api *pApi, /* Global context (one per db handle) */
+ const char *zName, /* Name of new function */
+ void *pUserData, /* User data for aux. function */
+ fts5_tokenizer *pTokenizer, /* Tokenizer implementation */
+ void(*xDestroy)(void*) /* Destructor for pUserData */
+){
+ Fts5Global *pGlobal = (Fts5Global*)pApi;
+ Fts5TokenizerModule *pNew;
+ int nName; /* Size of zName and its \0 terminator */
+ int nByte; /* Bytes of space to allocate */
+ int rc = SQLITE_OK;
+
+ nName = (int)strlen(zName) + 1;
+ nByte = sizeof(Fts5TokenizerModule) + nName;
+ pNew = (Fts5TokenizerModule*)sqlite3_malloc(nByte);
+ if( pNew ){
+ memset(pNew, 0, nByte);
+ pNew->zName = (char*)&pNew[1];
+ memcpy(pNew->zName, zName, nName);
+ pNew->pUserData = pUserData;
+ pNew->x = *pTokenizer;
+ pNew->xDestroy = xDestroy;
+ pNew->pNext = pGlobal->pTok;
+ pGlobal->pTok = pNew;
+ if( pNew->pNext==0 ){
+ pGlobal->pDfltTok = pNew;
+ }
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+
+ return rc;
+}
+
+static Fts5TokenizerModule *fts5LocateTokenizer(
+ Fts5Global *pGlobal,
+ const char *zName
+){
+ Fts5TokenizerModule *pMod = 0;
+
+ if( zName==0 ){
+ pMod = pGlobal->pDfltTok;
+ }else{
+ for(pMod=pGlobal->pTok; pMod; pMod=pMod->pNext){
+ if( sqlite3_stricmp(zName, pMod->zName)==0 ) break;
+ }
+ }
+
+ return pMod;
+}
+
+/*
+** Find a tokenizer. This is the implementation of the
+** fts5_api.xFindTokenizer() method.
+*/
+static int fts5FindTokenizer(
+ fts5_api *pApi, /* Global context (one per db handle) */
+ const char *zName, /* Name of new function */
+ void **ppUserData,
+ fts5_tokenizer *pTokenizer /* Populate this object */
+){
+ int rc = SQLITE_OK;
+ Fts5TokenizerModule *pMod;
+
+ pMod = fts5LocateTokenizer((Fts5Global*)pApi, zName);
+ if( pMod ){
+ *pTokenizer = pMod->x;
+ *ppUserData = pMod->pUserData;
+ }else{
+ memset(pTokenizer, 0, sizeof(fts5_tokenizer));
+ rc = SQLITE_ERROR;
+ }
+
+ return rc;
+}
+
+static int sqlite3Fts5GetTokenizer(
+ Fts5Global *pGlobal,
+ const char **azArg,
+ int nArg,
+ Fts5Tokenizer **ppTok,
+ fts5_tokenizer **ppTokApi,
+ char **pzErr
+){
+ Fts5TokenizerModule *pMod;
+ int rc = SQLITE_OK;
+
+ pMod = fts5LocateTokenizer(pGlobal, nArg==0 ? 0 : azArg[0]);
+ if( pMod==0 ){
+ assert( nArg>0 );
+ rc = SQLITE_ERROR;
+ *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]);
+ }else{
+ rc = pMod->x.xCreate(pMod->pUserData, &azArg[1], (nArg?nArg-1:0), ppTok);
+ *ppTokApi = &pMod->x;
+ if( rc!=SQLITE_OK && pzErr ){
+ *pzErr = sqlite3_mprintf("error in tokenizer constructor");
+ }
+ }
+
+ if( rc!=SQLITE_OK ){
+ *ppTokApi = 0;
+ *ppTok = 0;
+ }
+
+ return rc;
+}
+
+static void fts5ModuleDestroy(void *pCtx){
+ Fts5TokenizerModule *pTok, *pNextTok;
+ Fts5Auxiliary *pAux, *pNextAux;
+ Fts5Global *pGlobal = (Fts5Global*)pCtx;
+
+ for(pAux=pGlobal->pAux; pAux; pAux=pNextAux){
+ pNextAux = pAux->pNext;
+ if( pAux->xDestroy ) pAux->xDestroy(pAux->pUserData);
+ sqlite3_free(pAux);
+ }
+
+ for(pTok=pGlobal->pTok; pTok; pTok=pNextTok){
+ pNextTok = pTok->pNext;
+ if( pTok->xDestroy ) pTok->xDestroy(pTok->pUserData);
+ sqlite3_free(pTok);
+ }
+
+ sqlite3_free(pGlobal);
+}
+
+static void fts5Fts5Func(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal /* Function arguments */
+){
+ Fts5Global *pGlobal = (Fts5Global*)sqlite3_user_data(pCtx);
+ char buf[8];
+ assert( nArg==0 );
+ assert( sizeof(buf)>=sizeof(pGlobal) );
+ memcpy(buf, (void*)&pGlobal, sizeof(pGlobal));
+ sqlite3_result_blob(pCtx, buf, sizeof(pGlobal), SQLITE_TRANSIENT);
+}
+
+/*
+** Implementation of fts5_source_id() function.
+*/
+static void fts5SourceIdFunc(
+ sqlite3_context *pCtx, /* Function call context */
+ int nArg, /* Number of args */
+ sqlite3_value **apVal /* Function arguments */
+){
+ assert( nArg==0 );
+ sqlite3_result_text(pCtx, "fts5: 2015-11-02 18:31:45 bda77dda9697c463c3d0704014d51627fceee328", -1, SQLITE_TRANSIENT);
+}
+
+static int fts5Init(sqlite3 *db){
+ static const sqlite3_module fts5Mod = {
+ /* iVersion */ 2,
+ /* xCreate */ fts5CreateMethod,
+ /* xConnect */ fts5ConnectMethod,
+ /* xBestIndex */ fts5BestIndexMethod,
+ /* xDisconnect */ fts5DisconnectMethod,
+ /* xDestroy */ fts5DestroyMethod,
+ /* xOpen */ fts5OpenMethod,
+ /* xClose */ fts5CloseMethod,
+ /* xFilter */ fts5FilterMethod,
+ /* xNext */ fts5NextMethod,
+ /* xEof */ fts5EofMethod,
+ /* xColumn */ fts5ColumnMethod,
+ /* xRowid */ fts5RowidMethod,
+ /* xUpdate */ fts5UpdateMethod,
+ /* xBegin */ fts5BeginMethod,
+ /* xSync */ fts5SyncMethod,
+ /* xCommit */ fts5CommitMethod,
+ /* xRollback */ fts5RollbackMethod,
+ /* xFindFunction */ fts5FindFunctionMethod,
+ /* xRename */ fts5RenameMethod,
+ /* xSavepoint */ fts5SavepointMethod,
+ /* xRelease */ fts5ReleaseMethod,
+ /* xRollbackTo */ fts5RollbackToMethod,
+ };
+
+ int rc;
+ Fts5Global *pGlobal = 0;
+
+ pGlobal = (Fts5Global*)sqlite3_malloc(sizeof(Fts5Global));
+ if( pGlobal==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ void *p = (void*)pGlobal;
+ memset(pGlobal, 0, sizeof(Fts5Global));
+ pGlobal->db = db;
+ pGlobal->api.iVersion = 2;
+ pGlobal->api.xCreateFunction = fts5CreateAux;
+ pGlobal->api.xCreateTokenizer = fts5CreateTokenizer;
+ pGlobal->api.xFindTokenizer = fts5FindTokenizer;
+ rc = sqlite3_create_module_v2(db, "fts5", &fts5Mod, p, fts5ModuleDestroy);
+ if( rc==SQLITE_OK ) rc = sqlite3Fts5IndexInit(db);
+ if( rc==SQLITE_OK ) rc = sqlite3Fts5ExprInit(pGlobal, db);
+ if( rc==SQLITE_OK ) rc = sqlite3Fts5AuxInit(&pGlobal->api);
+ if( rc==SQLITE_OK ) rc = sqlite3Fts5TokenizerInit(&pGlobal->api);
+ if( rc==SQLITE_OK ) rc = sqlite3Fts5VocabInit(pGlobal, db);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_create_function(
+ db, "fts5", 0, SQLITE_UTF8, p, fts5Fts5Func, 0, 0
+ );
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3_create_function(
+ db, "fts5_source_id", 0, SQLITE_UTF8, p, fts5SourceIdFunc, 0, 0
+ );
+ }
+ }
+ return rc;
+}
+
+/*
+** The following functions are used to register the module with SQLite. If
+** this module is being built as part of the SQLite core (SQLITE_CORE is
+** defined), then sqlite3_open() will call sqlite3Fts5Init() directly.
+**
+** Or, if this module is being built as a loadable extension,
+** sqlite3Fts5Init() is omitted and the two standard entry points
+** sqlite3_fts_init() and sqlite3_fts5_init() defined instead.
+*/
+#ifndef SQLITE_CORE
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+SQLITE_API int SQLITE_STDCALL sqlite3_fts_init(
+ sqlite3 *db,
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+ return fts5Init(db);
+}
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+SQLITE_API int SQLITE_STDCALL sqlite3_fts5_init(
+ sqlite3 *db,
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+ return fts5Init(db);
+}
+#else
+SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
+ return fts5Init(db);
+}
+#endif
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+*/
+
+
+
+
+struct Fts5Storage {
+ Fts5Config *pConfig;
+ Fts5Index *pIndex;
+ int bTotalsValid; /* True if nTotalRow/aTotalSize[] are valid */
+ i64 nTotalRow; /* Total number of rows in FTS table */
+ i64 *aTotalSize; /* Total sizes of each column */
+ sqlite3_stmt *aStmt[11];
+};
+
+
+#if FTS5_STMT_SCAN_ASC!=0
+# error "FTS5_STMT_SCAN_ASC mismatch"
+#endif
+#if FTS5_STMT_SCAN_DESC!=1
+# error "FTS5_STMT_SCAN_DESC mismatch"
+#endif
+#if FTS5_STMT_LOOKUP!=2
+# error "FTS5_STMT_LOOKUP mismatch"
+#endif
+
+#define FTS5_STMT_INSERT_CONTENT 3
+#define FTS5_STMT_REPLACE_CONTENT 4
+#define FTS5_STMT_DELETE_CONTENT 5
+#define FTS5_STMT_REPLACE_DOCSIZE 6
+#define FTS5_STMT_DELETE_DOCSIZE 7
+#define FTS5_STMT_LOOKUP_DOCSIZE 8
+#define FTS5_STMT_REPLACE_CONFIG 9
+#define FTS5_STMT_SCAN 10
+
+/*
+** Prepare the two insert statements - Fts5Storage.pInsertContent and
+** Fts5Storage.pInsertDocsize - if they have not already been prepared.
+** Return SQLITE_OK if successful, or an SQLite error code if an error
+** occurs.
+*/
+static int fts5StorageGetStmt(
+ Fts5Storage *p, /* Storage handle */
+ int eStmt, /* FTS5_STMT_XXX constant */
+ sqlite3_stmt **ppStmt, /* OUT: Prepared statement handle */
+ char **pzErrMsg /* OUT: Error message (if any) */
+){
+ int rc = SQLITE_OK;
+
+ /* If there is no %_docsize table, there should be no requests for
+ ** statements to operate on it. */
+ assert( p->pConfig->bColumnsize || (
+ eStmt!=FTS5_STMT_REPLACE_DOCSIZE
+ && eStmt!=FTS5_STMT_DELETE_DOCSIZE
+ && eStmt!=FTS5_STMT_LOOKUP_DOCSIZE
+ ));
+
+ assert( eStmt>=0 && eStmt<ArraySize(p->aStmt) );
+ if( p->aStmt[eStmt]==0 ){
+ const char *azStmt[] = {
+ "SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC",
+ "SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC",
+ "SELECT %s FROM %s T WHERE T.%Q=?", /* LOOKUP */
+
+ "INSERT INTO %Q.'%q_content' VALUES(%s)", /* INSERT_CONTENT */
+ "REPLACE INTO %Q.'%q_content' VALUES(%s)", /* REPLACE_CONTENT */
+ "DELETE FROM %Q.'%q_content' WHERE id=?", /* DELETE_CONTENT */
+ "REPLACE INTO %Q.'%q_docsize' VALUES(?,?)", /* REPLACE_DOCSIZE */
+ "DELETE FROM %Q.'%q_docsize' WHERE id=?", /* DELETE_DOCSIZE */
+
+ "SELECT sz FROM %Q.'%q_docsize' WHERE id=?", /* LOOKUP_DOCSIZE */
+
+ "REPLACE INTO %Q.'%q_config' VALUES(?,?)", /* REPLACE_CONFIG */
+ "SELECT %s FROM %s AS T", /* SCAN */
+ };
+ Fts5Config *pC = p->pConfig;
+ char *zSql = 0;
+
+ switch( eStmt ){
+ case FTS5_STMT_SCAN:
+ zSql = sqlite3_mprintf(azStmt[eStmt],
+ pC->zContentExprlist, pC->zContent
+ );
+ break;
+
+ case FTS5_STMT_SCAN_ASC:
+ case FTS5_STMT_SCAN_DESC:
+ zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContentExprlist,
+ pC->zContent, pC->zContentRowid, pC->zContentRowid,
+ pC->zContentRowid
+ );
+ break;
+
+ case FTS5_STMT_LOOKUP:
+ zSql = sqlite3_mprintf(azStmt[eStmt],
+ pC->zContentExprlist, pC->zContent, pC->zContentRowid
+ );
+ break;
+
+ case FTS5_STMT_INSERT_CONTENT:
+ case FTS5_STMT_REPLACE_CONTENT: {
+ int nCol = pC->nCol + 1;
+ char *zBind;
+ int i;
+
+ zBind = sqlite3_malloc(1 + nCol*2);
+ if( zBind ){
+ for(i=0; i<nCol; i++){
+ zBind[i*2] = '?';
+ zBind[i*2 + 1] = ',';
+ }
+ zBind[i*2-1] = '\0';
+ zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName, zBind);
+ sqlite3_free(zBind);
+ }
+ break;
+ }
+
+ default:
+ zSql = sqlite3_mprintf(azStmt[eStmt], pC->zDb, pC->zName);
+ break;
+ }
+
+ if( zSql==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ rc = sqlite3_prepare_v2(pC->db, zSql, -1, &p->aStmt[eStmt], 0);
+ sqlite3_free(zSql);
+ if( rc!=SQLITE_OK && pzErrMsg ){
+ *pzErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pC->db));
+ }
+ }
+ }
+
+ *ppStmt = p->aStmt[eStmt];
+ return rc;
+}
+
+
+static int fts5ExecPrintf(
+ sqlite3 *db,
+ char **pzErr,
+ const char *zFormat,
+ ...
+){
+ int rc;
+ va_list ap; /* ... printf arguments */
+ char *zSql;
+
+ va_start(ap, zFormat);
+ zSql = sqlite3_vmprintf(zFormat, ap);
+
+ if( zSql==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ rc = sqlite3_exec(db, zSql, 0, 0, pzErr);
+ sqlite3_free(zSql);
+ }
+
+ va_end(ap);
+ return rc;
+}
+
+/*
+** Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error
+** code otherwise.
+*/
+static int sqlite3Fts5DropAll(Fts5Config *pConfig){
+ int rc = fts5ExecPrintf(pConfig->db, 0,
+ "DROP TABLE IF EXISTS %Q.'%q_data';"
+ "DROP TABLE IF EXISTS %Q.'%q_idx';"
+ "DROP TABLE IF EXISTS %Q.'%q_config';",
+ pConfig->zDb, pConfig->zName,
+ pConfig->zDb, pConfig->zName,
+ pConfig->zDb, pConfig->zName
+ );
+ if( rc==SQLITE_OK && pConfig->bColumnsize ){
+ rc = fts5ExecPrintf(pConfig->db, 0,
+ "DROP TABLE IF EXISTS %Q.'%q_docsize';",
+ pConfig->zDb, pConfig->zName
+ );
+ }
+ if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){
+ rc = fts5ExecPrintf(pConfig->db, 0,
+ "DROP TABLE IF EXISTS %Q.'%q_content';",
+ pConfig->zDb, pConfig->zName
+ );
+ }
+ return rc;
+}
+
+static void fts5StorageRenameOne(
+ Fts5Config *pConfig, /* Current FTS5 configuration */
+ int *pRc, /* IN/OUT: Error code */
+ const char *zTail, /* Tail of table name e.g. "data", "config" */
+ const char *zName /* New name of FTS5 table */
+){
+ if( *pRc==SQLITE_OK ){
+ *pRc = fts5ExecPrintf(pConfig->db, 0,
+ "ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';",
+ pConfig->zDb, pConfig->zName, zTail, zName, zTail
+ );
+ }
+}
+
+static int sqlite3Fts5StorageRename(Fts5Storage *pStorage, const char *zName){
+ Fts5Config *pConfig = pStorage->pConfig;
+ int rc = sqlite3Fts5StorageSync(pStorage, 1);
+
+ fts5StorageRenameOne(pConfig, &rc, "data", zName);
+ fts5StorageRenameOne(pConfig, &rc, "idx", zName);
+ fts5StorageRenameOne(pConfig, &rc, "config", zName);
+ if( pConfig->bColumnsize ){
+ fts5StorageRenameOne(pConfig, &rc, "docsize", zName);
+ }
+ if( pConfig->eContent==FTS5_CONTENT_NORMAL ){
+ fts5StorageRenameOne(pConfig, &rc, "content", zName);
+ }
+ return rc;
+}
+
+/*
+** Create the shadow table named zPost, with definition zDefn. Return
+** SQLITE_OK if successful, or an SQLite error code otherwise.
+*/
+static int sqlite3Fts5CreateTable(
+ Fts5Config *pConfig, /* FTS5 configuration */
+ const char *zPost, /* Shadow table to create (e.g. "content") */
+ const char *zDefn, /* Columns etc. for shadow table */
+ int bWithout, /* True for without rowid */
+ char **pzErr /* OUT: Error message */
+){
+ int rc;
+ char *zErr = 0;
+
+ rc = fts5ExecPrintf(pConfig->db, &zErr, "CREATE TABLE %Q.'%q_%q'(%s)%s",
+ pConfig->zDb, pConfig->zName, zPost, zDefn, bWithout?" WITHOUT ROWID":""
+ );
+ if( zErr ){
+ *pzErr = sqlite3_mprintf(
+ "fts5: error creating shadow table %q_%s: %s",
+ pConfig->zName, zPost, zErr
+ );
+ sqlite3_free(zErr);
+ }
+
+ return rc;
+}
+
+/*
+** Open a new Fts5Index handle. If the bCreate argument is true, create
+** and initialize the underlying tables
+**
+** If successful, set *pp to point to the new object and return SQLITE_OK.
+** Otherwise, set *pp to NULL and return an SQLite error code.
+*/
+static int sqlite3Fts5StorageOpen(
+ Fts5Config *pConfig,
+ Fts5Index *pIndex,
+ int bCreate,
+ Fts5Storage **pp,
+ char **pzErr /* OUT: Error message */
+){
+ int rc = SQLITE_OK;
+ Fts5Storage *p; /* New object */
+ int nByte; /* Bytes of space to allocate */
+
+ nByte = sizeof(Fts5Storage) /* Fts5Storage object */
+ + pConfig->nCol * sizeof(i64); /* Fts5Storage.aTotalSize[] */
+ *pp = p = (Fts5Storage*)sqlite3_malloc(nByte);
+ if( !p ) return SQLITE_NOMEM;
+
+ memset(p, 0, nByte);
+ p->aTotalSize = (i64*)&p[1];
+ p->pConfig = pConfig;
+ p->pIndex = pIndex;
+
+ if( bCreate ){
+ if( pConfig->eContent==FTS5_CONTENT_NORMAL ){
+ int nDefn = 32 + pConfig->nCol*10;
+ char *zDefn = sqlite3_malloc(32 + pConfig->nCol * 10);
+ if( zDefn==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ int i;
+ int iOff;
+ sqlite3_snprintf(nDefn, zDefn, "id INTEGER PRIMARY KEY");
+ iOff = strlen(zDefn);
+ for(i=0; i<pConfig->nCol; i++){
+ sqlite3_snprintf(nDefn-iOff, &zDefn[iOff], ", c%d", i);
+ iOff += strlen(&zDefn[iOff]);
+ }
+ rc = sqlite3Fts5CreateTable(pConfig, "content", zDefn, 0, pzErr);
+ }
+ sqlite3_free(zDefn);
+ }
+
+ if( rc==SQLITE_OK && pConfig->bColumnsize ){
+ rc = sqlite3Fts5CreateTable(
+ pConfig, "docsize", "id INTEGER PRIMARY KEY, sz BLOB", 0, pzErr
+ );
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5CreateTable(
+ pConfig, "config", "k PRIMARY KEY, v", 1, pzErr
+ );
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageConfigValue(p, "version", 0, FTS5_CURRENT_VERSION);
+ }
+ }
+
+ if( rc ){
+ sqlite3Fts5StorageClose(p);
+ *pp = 0;
+ }
+ return rc;
+}
+
+/*
+** Close a handle opened by an earlier call to sqlite3Fts5StorageOpen().
+*/
+static int sqlite3Fts5StorageClose(Fts5Storage *p){
+ int rc = SQLITE_OK;
+ if( p ){
+ int i;
+
+ /* Finalize all SQL statements */
+ for(i=0; i<ArraySize(p->aStmt); i++){
+ sqlite3_finalize(p->aStmt[i]);
+ }
+
+ sqlite3_free(p);
+ }
+ return rc;
+}
+
+typedef struct Fts5InsertCtx Fts5InsertCtx;
+struct Fts5InsertCtx {
+ Fts5Storage *pStorage;
+ int iCol;
+ int szCol; /* Size of column value in tokens */
+};
+
+/*
+** Tokenization callback used when inserting tokens into the FTS index.
+*/
+static int fts5StorageInsertCallback(
+ void *pContext, /* Pointer to Fts5InsertCtx object */
+ int tflags,
+ const char *pToken, /* Buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStart, /* Start offset of token */
+ int iEnd /* End offset of token */
+){
+ Fts5InsertCtx *pCtx = (Fts5InsertCtx*)pContext;
+ Fts5Index *pIdx = pCtx->pStorage->pIndex;
+ if( (tflags & FTS5_TOKEN_COLOCATED)==0 || pCtx->szCol==0 ){
+ pCtx->szCol++;
+ }
+ return sqlite3Fts5IndexWrite(pIdx, pCtx->iCol, pCtx->szCol-1, pToken, nToken);
+}
+
+/*
+** If a row with rowid iDel is present in the %_content table, add the
+** delete-markers to the FTS index necessary to delete it. Do not actually
+** remove the %_content row at this time though.
+*/
+static int fts5StorageDeleteFromIndex(Fts5Storage *p, i64 iDel){
+ Fts5Config *pConfig = p->pConfig;
+ sqlite3_stmt *pSeek; /* SELECT to read row iDel from %_data */
+ int rc; /* Return code */
+
+ rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP, &pSeek, 0);
+ if( rc==SQLITE_OK ){
+ int rc2;
+ sqlite3_bind_int64(pSeek, 1, iDel);
+ if( sqlite3_step(pSeek)==SQLITE_ROW ){
+ int iCol;
+ Fts5InsertCtx ctx;
+ ctx.pStorage = p;
+ ctx.iCol = -1;
+ rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 1, iDel);
+ for(iCol=1; rc==SQLITE_OK && iCol<=pConfig->nCol; iCol++){
+ if( pConfig->abUnindexed[iCol-1] ) continue;
+ ctx.szCol = 0;
+ rc = sqlite3Fts5Tokenize(pConfig,
+ FTS5_TOKENIZE_DOCUMENT,
+ (const char*)sqlite3_column_text(pSeek, iCol),
+ sqlite3_column_bytes(pSeek, iCol),
+ (void*)&ctx,
+ fts5StorageInsertCallback
+ );
+ p->aTotalSize[iCol-1] -= (i64)ctx.szCol;
+ }
+ p->nTotalRow--;
+ }
+ rc2 = sqlite3_reset(pSeek);
+ if( rc==SQLITE_OK ) rc = rc2;
+ }
+
+ return rc;
+}
+
+
+/*
+** Insert a record into the %_docsize table. Specifically, do:
+**
+** INSERT OR REPLACE INTO %_docsize(id, sz) VALUES(iRowid, pBuf);
+**
+** If there is no %_docsize table (as happens if the columnsize=0 option
+** is specified when the FTS5 table is created), this function is a no-op.
+*/
+static int fts5StorageInsertDocsize(
+ Fts5Storage *p, /* Storage module to write to */
+ i64 iRowid, /* id value */
+ Fts5Buffer *pBuf /* sz value */
+){
+ int rc = SQLITE_OK;
+ if( p->pConfig->bColumnsize ){
+ sqlite3_stmt *pReplace = 0;
+ rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_DOCSIZE, &pReplace, 0);
+ if( rc==SQLITE_OK ){
+ sqlite3_bind_int64(pReplace, 1, iRowid);
+ sqlite3_bind_blob(pReplace, 2, pBuf->p, pBuf->n, SQLITE_STATIC);
+ sqlite3_step(pReplace);
+ rc = sqlite3_reset(pReplace);
+ }
+ }
+ return rc;
+}
+
+/*
+** Load the contents of the "averages" record from disk into the
+** p->nTotalRow and p->aTotalSize[] variables. If successful, and if
+** argument bCache is true, set the p->bTotalsValid flag to indicate
+** that the contents of aTotalSize[] and nTotalRow are valid until
+** further notice.
+**
+** Return SQLITE_OK if successful, or an SQLite error code if an error
+** occurs.
+*/
+static int fts5StorageLoadTotals(Fts5Storage *p, int bCache){
+ int rc = SQLITE_OK;
+ if( p->bTotalsValid==0 ){
+ rc = sqlite3Fts5IndexGetAverages(p->pIndex, &p->nTotalRow, p->aTotalSize);
+ p->bTotalsValid = bCache;
+ }
+ return rc;
+}
+
+/*
+** Store the current contents of the p->nTotalRow and p->aTotalSize[]
+** variables in the "averages" record on disk.
+**
+** Return SQLITE_OK if successful, or an SQLite error code if an error
+** occurs.
+*/
+static int fts5StorageSaveTotals(Fts5Storage *p){
+ int nCol = p->pConfig->nCol;
+ int i;
+ Fts5Buffer buf;
+ int rc = SQLITE_OK;
+ memset(&buf, 0, sizeof(buf));
+
+ sqlite3Fts5BufferAppendVarint(&rc, &buf, p->nTotalRow);
+ for(i=0; i<nCol; i++){
+ sqlite3Fts5BufferAppendVarint(&rc, &buf, p->aTotalSize[i]);
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5IndexSetAverages(p->pIndex, buf.p, buf.n);
+ }
+ sqlite3_free(buf.p);
+
+ return rc;
+}
+
+/*
+** Remove a row from the FTS table.
+*/
+static int sqlite3Fts5StorageDelete(Fts5Storage *p, i64 iDel){
+ Fts5Config *pConfig = p->pConfig;
+ int rc;
+ sqlite3_stmt *pDel = 0;
+
+ rc = fts5StorageLoadTotals(p, 1);
+
+ /* Delete the index records */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageDeleteFromIndex(p, iDel);
+ }
+
+ /* Delete the %_docsize record */
+ if( rc==SQLITE_OK && pConfig->bColumnsize ){
+ rc = fts5StorageGetStmt(p, FTS5_STMT_DELETE_DOCSIZE, &pDel, 0);
+ if( rc==SQLITE_OK ){
+ sqlite3_bind_int64(pDel, 1, iDel);
+ sqlite3_step(pDel);
+ rc = sqlite3_reset(pDel);
+ }
+ }
+
+ /* Delete the %_content record */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageGetStmt(p, FTS5_STMT_DELETE_CONTENT, &pDel, 0);
+ }
+ if( rc==SQLITE_OK ){
+ sqlite3_bind_int64(pDel, 1, iDel);
+ sqlite3_step(pDel);
+ rc = sqlite3_reset(pDel);
+ }
+
+ /* Write the averages record */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageSaveTotals(p);
+ }
+
+ return rc;
+}
+
+static int sqlite3Fts5StorageSpecialDelete(
+ Fts5Storage *p,
+ i64 iDel,
+ sqlite3_value **apVal
+){
+ Fts5Config *pConfig = p->pConfig;
+ int rc;
+ sqlite3_stmt *pDel = 0;
+
+ assert( pConfig->eContent!=FTS5_CONTENT_NORMAL );
+ rc = fts5StorageLoadTotals(p, 1);
+
+ /* Delete the index records */
+ if( rc==SQLITE_OK ){
+ int iCol;
+ Fts5InsertCtx ctx;
+ ctx.pStorage = p;
+ ctx.iCol = -1;
+
+ rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 1, iDel);
+ for(iCol=0; rc==SQLITE_OK && iCol<pConfig->nCol; iCol++){
+ if( pConfig->abUnindexed[iCol] ) continue;
+ ctx.szCol = 0;
+ rc = sqlite3Fts5Tokenize(pConfig,
+ FTS5_TOKENIZE_DOCUMENT,
+ (const char*)sqlite3_value_text(apVal[iCol]),
+ sqlite3_value_bytes(apVal[iCol]),
+ (void*)&ctx,
+ fts5StorageInsertCallback
+ );
+ p->aTotalSize[iCol] -= (i64)ctx.szCol;
+ }
+ p->nTotalRow--;
+ }
+
+ /* Delete the %_docsize record */
+ if( pConfig->bColumnsize ){
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageGetStmt(p, FTS5_STMT_DELETE_DOCSIZE, &pDel, 0);
+ }
+ if( rc==SQLITE_OK ){
+ sqlite3_bind_int64(pDel, 1, iDel);
+ sqlite3_step(pDel);
+ rc = sqlite3_reset(pDel);
+ }
+ }
+
+ /* Write the averages record */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageSaveTotals(p);
+ }
+
+ return rc;
+}
+
+/*
+** Delete all entries in the FTS5 index.
+*/
+static int sqlite3Fts5StorageDeleteAll(Fts5Storage *p){
+ Fts5Config *pConfig = p->pConfig;
+ int rc;
+
+ /* Delete the contents of the %_data and %_docsize tables. */
+ rc = fts5ExecPrintf(pConfig->db, 0,
+ "DELETE FROM %Q.'%q_data';"
+ "DELETE FROM %Q.'%q_idx';",
+ pConfig->zDb, pConfig->zName,
+ pConfig->zDb, pConfig->zName
+ );
+ if( rc==SQLITE_OK && pConfig->bColumnsize ){
+ rc = fts5ExecPrintf(pConfig->db, 0,
+ "DELETE FROM %Q.'%q_docsize';",
+ pConfig->zDb, pConfig->zName
+ );
+ }
+
+ /* Reinitialize the %_data table. This call creates the initial structure
+ ** and averages records. */
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5IndexReinit(p->pIndex);
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5StorageConfigValue(p, "version", 0, FTS5_CURRENT_VERSION);
+ }
+ return rc;
+}
+
+static int sqlite3Fts5StorageRebuild(Fts5Storage *p){
+ Fts5Buffer buf = {0,0,0};
+ Fts5Config *pConfig = p->pConfig;
+ sqlite3_stmt *pScan = 0;
+ Fts5InsertCtx ctx;
+ int rc;
+
+ memset(&ctx, 0, sizeof(Fts5InsertCtx));
+ ctx.pStorage = p;
+ rc = sqlite3Fts5StorageDeleteAll(p);
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageLoadTotals(p, 1);
+ }
+
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageGetStmt(p, FTS5_STMT_SCAN, &pScan, 0);
+ }
+
+ while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pScan) ){
+ i64 iRowid = sqlite3_column_int64(pScan, 0);
+
+ sqlite3Fts5BufferZero(&buf);
+ rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 0, iRowid);
+ for(ctx.iCol=0; rc==SQLITE_OK && ctx.iCol<pConfig->nCol; ctx.iCol++){
+ ctx.szCol = 0;
+ if( pConfig->abUnindexed[ctx.iCol]==0 ){
+ rc = sqlite3Fts5Tokenize(pConfig,
+ FTS5_TOKENIZE_DOCUMENT,
+ (const char*)sqlite3_column_text(pScan, ctx.iCol+1),
+ sqlite3_column_bytes(pScan, ctx.iCol+1),
+ (void*)&ctx,
+ fts5StorageInsertCallback
+ );
+ }
+ sqlite3Fts5BufferAppendVarint(&rc, &buf, ctx.szCol);
+ p->aTotalSize[ctx.iCol] += (i64)ctx.szCol;
+ }
+ p->nTotalRow++;
+
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageInsertDocsize(p, iRowid, &buf);
+ }
+ }
+ sqlite3_free(buf.p);
+
+ /* Write the averages record */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageSaveTotals(p);
+ }
+ return rc;
+}
+
+static int sqlite3Fts5StorageOptimize(Fts5Storage *p){
+ return sqlite3Fts5IndexOptimize(p->pIndex);
+}
+
+static int sqlite3Fts5StorageMerge(Fts5Storage *p, int nMerge){
+ return sqlite3Fts5IndexMerge(p->pIndex, nMerge);
+}
+
+/*
+** Allocate a new rowid. This is used for "external content" tables when
+** a NULL value is inserted into the rowid column. The new rowid is allocated
+** by inserting a dummy row into the %_docsize table. The dummy will be
+** overwritten later.
+**
+** If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In
+** this case the user is required to provide a rowid explicitly.
+*/
+static int fts5StorageNewRowid(Fts5Storage *p, i64 *piRowid){
+ int rc = SQLITE_MISMATCH;
+ if( p->pConfig->bColumnsize ){
+ sqlite3_stmt *pReplace = 0;
+ rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_DOCSIZE, &pReplace, 0);
+ if( rc==SQLITE_OK ){
+ sqlite3_bind_null(pReplace, 1);
+ sqlite3_bind_null(pReplace, 2);
+ sqlite3_step(pReplace);
+ rc = sqlite3_reset(pReplace);
+ }
+ if( rc==SQLITE_OK ){
+ *piRowid = sqlite3_last_insert_rowid(p->pConfig->db);
+ }
+ }
+ return rc;
+}
+
+/*
+** Insert a new row into the FTS content table.
+*/
+static int sqlite3Fts5StorageContentInsert(
+ Fts5Storage *p,
+ sqlite3_value **apVal,
+ i64 *piRowid
+){
+ Fts5Config *pConfig = p->pConfig;
+ int rc = SQLITE_OK;
+
+ /* Insert the new row into the %_content table. */
+ if( pConfig->eContent!=FTS5_CONTENT_NORMAL ){
+ if( sqlite3_value_type(apVal[1])==SQLITE_INTEGER ){
+ *piRowid = sqlite3_value_int64(apVal[1]);
+ }else{
+ rc = fts5StorageNewRowid(p, piRowid);
+ }
+ }else{
+ sqlite3_stmt *pInsert = 0; /* Statement to write %_content table */
+ int i; /* Counter variable */
+#if 0
+ if( eConflict==SQLITE_REPLACE ){
+ eStmt = FTS5_STMT_REPLACE_CONTENT;
+ rc = fts5StorageDeleteFromIndex(p, sqlite3_value_int64(apVal[1]));
+ }else{
+ eStmt = FTS5_STMT_INSERT_CONTENT;
+ }
+#endif
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageGetStmt(p, FTS5_STMT_INSERT_CONTENT, &pInsert, 0);
+ }
+ for(i=1; rc==SQLITE_OK && i<=pConfig->nCol+1; i++){
+ rc = sqlite3_bind_value(pInsert, i, apVal[i]);
+ }
+ if( rc==SQLITE_OK ){
+ sqlite3_step(pInsert);
+ rc = sqlite3_reset(pInsert);
+ }
+ *piRowid = sqlite3_last_insert_rowid(pConfig->db);
+ }
+
+ return rc;
+}
+
+/*
+** Insert new entries into the FTS index and %_docsize table.
+*/
+static int sqlite3Fts5StorageIndexInsert(
+ Fts5Storage *p,
+ sqlite3_value **apVal,
+ i64 iRowid
+){
+ Fts5Config *pConfig = p->pConfig;
+ int rc = SQLITE_OK; /* Return code */
+ Fts5InsertCtx ctx; /* Tokenization callback context object */
+ Fts5Buffer buf; /* Buffer used to build up %_docsize blob */
+
+ memset(&buf, 0, sizeof(Fts5Buffer));
+ ctx.pStorage = p;
+ rc = fts5StorageLoadTotals(p, 1);
+
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5IndexBeginWrite(p->pIndex, 0, iRowid);
+ }
+ for(ctx.iCol=0; rc==SQLITE_OK && ctx.iCol<pConfig->nCol; ctx.iCol++){
+ ctx.szCol = 0;
+ if( pConfig->abUnindexed[ctx.iCol]==0 ){
+ rc = sqlite3Fts5Tokenize(pConfig,
+ FTS5_TOKENIZE_DOCUMENT,
+ (const char*)sqlite3_value_text(apVal[ctx.iCol+2]),
+ sqlite3_value_bytes(apVal[ctx.iCol+2]),
+ (void*)&ctx,
+ fts5StorageInsertCallback
+ );
+ }
+ sqlite3Fts5BufferAppendVarint(&rc, &buf, ctx.szCol);
+ p->aTotalSize[ctx.iCol] += (i64)ctx.szCol;
+ }
+ p->nTotalRow++;
+
+ /* Write the %_docsize record */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageInsertDocsize(p, iRowid, &buf);
+ }
+ sqlite3_free(buf.p);
+
+ /* Write the averages record */
+ if( rc==SQLITE_OK ){
+ rc = fts5StorageSaveTotals(p);
+ }
+
+ return rc;
+}
+
+static int fts5StorageCount(Fts5Storage *p, const char *zSuffix, i64 *pnRow){
+ Fts5Config *pConfig = p->pConfig;
+ char *zSql;
+ int rc;
+
+ zSql = sqlite3_mprintf("SELECT count(*) FROM %Q.'%q_%s'",
+ pConfig->zDb, pConfig->zName, zSuffix
+ );
+ if( zSql==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ sqlite3_stmt *pCnt = 0;
+ rc = sqlite3_prepare_v2(pConfig->db, zSql, -1, &pCnt, 0);
+ if( rc==SQLITE_OK ){
+ if( SQLITE_ROW==sqlite3_step(pCnt) ){
+ *pnRow = sqlite3_column_int64(pCnt, 0);
+ }
+ rc = sqlite3_finalize(pCnt);
+ }
+ }
+
+ sqlite3_free(zSql);
+ return rc;
+}
+
+/*
+** Context object used by sqlite3Fts5StorageIntegrity().
+*/
+typedef struct Fts5IntegrityCtx Fts5IntegrityCtx;
+struct Fts5IntegrityCtx {
+ i64 iRowid;
+ int iCol;
+ int szCol;
+ u64 cksum;
+ Fts5Config *pConfig;
+};
+
+/*
+** Tokenization callback used by integrity check.
+*/
+static int fts5StorageIntegrityCallback(
+ void *pContext, /* Pointer to Fts5InsertCtx object */
+ int tflags,
+ const char *pToken, /* Buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStart, /* Start offset of token */
+ int iEnd /* End offset of token */
+){
+ Fts5IntegrityCtx *pCtx = (Fts5IntegrityCtx*)pContext;
+ if( (tflags & FTS5_TOKEN_COLOCATED)==0 || pCtx->szCol==0 ){
+ pCtx->szCol++;
+ }
+ pCtx->cksum ^= sqlite3Fts5IndexCksum(
+ pCtx->pConfig, pCtx->iRowid, pCtx->iCol, pCtx->szCol-1, pToken, nToken
+ );
+ return SQLITE_OK;
+}
+
+/*
+** Check that the contents of the FTS index match that of the %_content
+** table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return
+** some other SQLite error code if an error occurs while attempting to
+** determine this.
+*/
+static int sqlite3Fts5StorageIntegrity(Fts5Storage *p){
+ Fts5Config *pConfig = p->pConfig;
+ int rc; /* Return code */
+ int *aColSize; /* Array of size pConfig->nCol */
+ i64 *aTotalSize; /* Array of size pConfig->nCol */
+ Fts5IntegrityCtx ctx;
+ sqlite3_stmt *pScan;
+
+ memset(&ctx, 0, sizeof(Fts5IntegrityCtx));
+ ctx.pConfig = p->pConfig;
+ aTotalSize = (i64*)sqlite3_malloc(pConfig->nCol * (sizeof(int)+sizeof(i64)));
+ if( !aTotalSize ) return SQLITE_NOMEM;
+ aColSize = (int*)&aTotalSize[pConfig->nCol];
+ memset(aTotalSize, 0, sizeof(i64) * pConfig->nCol);
+
+ /* Generate the expected index checksum based on the contents of the
+ ** %_content table. This block stores the checksum in ctx.cksum. */
+ rc = fts5StorageGetStmt(p, FTS5_STMT_SCAN, &pScan, 0);
+ if( rc==SQLITE_OK ){
+ int rc2;
+ while( SQLITE_ROW==sqlite3_step(pScan) ){
+ int i;
+ ctx.iRowid = sqlite3_column_int64(pScan, 0);
+ ctx.szCol = 0;
+ if( pConfig->bColumnsize ){
+ rc = sqlite3Fts5StorageDocsize(p, ctx.iRowid, aColSize);
+ }
+ for(i=0; rc==SQLITE_OK && i<pConfig->nCol; i++){
+ if( pConfig->abUnindexed[i] ) continue;
+ ctx.iCol = i;
+ ctx.szCol = 0;
+ rc = sqlite3Fts5Tokenize(pConfig,
+ FTS5_TOKENIZE_DOCUMENT,
+ (const char*)sqlite3_column_text(pScan, i+1),
+ sqlite3_column_bytes(pScan, i+1),
+ (void*)&ctx,
+ fts5StorageIntegrityCallback
+ );
+ if( pConfig->bColumnsize && ctx.szCol!=aColSize[i] ){
+ rc = FTS5_CORRUPT;
+ }
+ aTotalSize[i] += ctx.szCol;
+ }
+ if( rc!=SQLITE_OK ) break;
+ }
+ rc2 = sqlite3_reset(pScan);
+ if( rc==SQLITE_OK ) rc = rc2;
+ }
+
+ /* Test that the "totals" (sometimes called "averages") record looks Ok */
+ if( rc==SQLITE_OK ){
+ int i;
+ rc = fts5StorageLoadTotals(p, 0);
+ for(i=0; rc==SQLITE_OK && i<pConfig->nCol; i++){
+ if( p->aTotalSize[i]!=aTotalSize[i] ) rc = FTS5_CORRUPT;
+ }
+ }
+
+ /* Check that the %_docsize and %_content tables contain the expected
+ ** number of rows. */
+ if( rc==SQLITE_OK && pConfig->eContent==FTS5_CONTENT_NORMAL ){
+ i64 nRow;
+ rc = fts5StorageCount(p, "content", &nRow);
+ if( rc==SQLITE_OK && nRow!=p->nTotalRow ) rc = FTS5_CORRUPT;
+ }
+ if( rc==SQLITE_OK && pConfig->bColumnsize ){
+ i64 nRow;
+ rc = fts5StorageCount(p, "docsize", &nRow);
+ if( rc==SQLITE_OK && nRow!=p->nTotalRow ) rc = FTS5_CORRUPT;
+ }
+
+ /* Pass the expected checksum down to the FTS index module. It will
+ ** verify, amongst other things, that it matches the checksum generated by
+ ** inspecting the index itself. */
+ if( rc==SQLITE_OK ){
+ rc = sqlite3Fts5IndexIntegrityCheck(p->pIndex, ctx.cksum);
+ }
+
+ sqlite3_free(aTotalSize);
+ return rc;
+}
+
+/*
+** Obtain an SQLite statement handle that may be used to read data from the
+** %_content table.
+*/
+static int sqlite3Fts5StorageStmt(
+ Fts5Storage *p,
+ int eStmt,
+ sqlite3_stmt **pp,
+ char **pzErrMsg
+){
+ int rc;
+ assert( eStmt==FTS5_STMT_SCAN_ASC
+ || eStmt==FTS5_STMT_SCAN_DESC
+ || eStmt==FTS5_STMT_LOOKUP
+ );
+ rc = fts5StorageGetStmt(p, eStmt, pp, pzErrMsg);
+ if( rc==SQLITE_OK ){
+ assert( p->aStmt[eStmt]==*pp );
+ p->aStmt[eStmt] = 0;
+ }
+ return rc;
+}
+
+/*
+** Release an SQLite statement handle obtained via an earlier call to
+** sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function
+** must match that passed to the sqlite3Fts5StorageStmt() call.
+*/
+static void sqlite3Fts5StorageStmtRelease(
+ Fts5Storage *p,
+ int eStmt,
+ sqlite3_stmt *pStmt
+){
+ assert( eStmt==FTS5_STMT_SCAN_ASC
+ || eStmt==FTS5_STMT_SCAN_DESC
+ || eStmt==FTS5_STMT_LOOKUP
+ );
+ if( p->aStmt[eStmt]==0 ){
+ sqlite3_reset(pStmt);
+ p->aStmt[eStmt] = pStmt;
+ }else{
+ sqlite3_finalize(pStmt);
+ }
+}
+
+static int fts5StorageDecodeSizeArray(
+ int *aCol, int nCol, /* Array to populate */
+ const u8 *aBlob, int nBlob /* Record to read varints from */
+){
+ int i;
+ int iOff = 0;
+ for(i=0; i<nCol; i++){
+ if( iOff>=nBlob ) return 1;
+ iOff += fts5GetVarint32(&aBlob[iOff], aCol[i]);
+ }
+ return (iOff!=nBlob);
+}
+
+/*
+** Argument aCol points to an array of integers containing one entry for
+** each table column. This function reads the %_docsize record for the
+** specified rowid and populates aCol[] with the results.
+**
+** An SQLite error code is returned if an error occurs, or SQLITE_OK
+** otherwise.
+*/
+static int sqlite3Fts5StorageDocsize(Fts5Storage *p, i64 iRowid, int *aCol){
+ int nCol = p->pConfig->nCol; /* Number of user columns in table */
+ sqlite3_stmt *pLookup = 0; /* Statement to query %_docsize */
+ int rc; /* Return Code */
+
+ assert( p->pConfig->bColumnsize );
+ rc = fts5StorageGetStmt(p, FTS5_STMT_LOOKUP_DOCSIZE, &pLookup, 0);
+ if( rc==SQLITE_OK ){
+ int bCorrupt = 1;
+ sqlite3_bind_int64(pLookup, 1, iRowid);
+ if( SQLITE_ROW==sqlite3_step(pLookup) ){
+ const u8 *aBlob = sqlite3_column_blob(pLookup, 0);
+ int nBlob = sqlite3_column_bytes(pLookup, 0);
+ if( 0==fts5StorageDecodeSizeArray(aCol, nCol, aBlob, nBlob) ){
+ bCorrupt = 0;
+ }
+ }
+ rc = sqlite3_reset(pLookup);
+ if( bCorrupt && rc==SQLITE_OK ){
+ rc = FTS5_CORRUPT;
+ }
+ }
+
+ return rc;
+}
+
+static int sqlite3Fts5StorageSize(Fts5Storage *p, int iCol, i64 *pnToken){
+ int rc = fts5StorageLoadTotals(p, 0);
+ if( rc==SQLITE_OK ){
+ *pnToken = 0;
+ if( iCol<0 ){
+ int i;
+ for(i=0; i<p->pConfig->nCol; i++){
+ *pnToken += p->aTotalSize[i];
+ }
+ }else if( iCol<p->pConfig->nCol ){
+ *pnToken = p->aTotalSize[iCol];
+ }else{
+ rc = SQLITE_RANGE;
+ }
+ }
+ return rc;
+}
+
+static int sqlite3Fts5StorageRowCount(Fts5Storage *p, i64 *pnRow){
+ int rc = fts5StorageLoadTotals(p, 0);
+ if( rc==SQLITE_OK ){
+ *pnRow = p->nTotalRow;
+ }
+ return rc;
+}
+
+/*
+** Flush any data currently held in-memory to disk.
+*/
+static int sqlite3Fts5StorageSync(Fts5Storage *p, int bCommit){
+ if( bCommit && p->bTotalsValid ){
+ int rc = fts5StorageSaveTotals(p);
+ p->bTotalsValid = 0;
+ if( rc!=SQLITE_OK ) return rc;
+ }
+ return sqlite3Fts5IndexSync(p->pIndex, bCommit);
+}
+
+static int sqlite3Fts5StorageRollback(Fts5Storage *p){
+ p->bTotalsValid = 0;
+ return sqlite3Fts5IndexRollback(p->pIndex);
+}
+
+static int sqlite3Fts5StorageConfigValue(
+ Fts5Storage *p,
+ const char *z,
+ sqlite3_value *pVal,
+ int iVal
+){
+ sqlite3_stmt *pReplace = 0;
+ int rc = fts5StorageGetStmt(p, FTS5_STMT_REPLACE_CONFIG, &pReplace, 0);
+ if( rc==SQLITE_OK ){
+ sqlite3_bind_text(pReplace, 1, z, -1, SQLITE_STATIC);
+ if( pVal ){
+ sqlite3_bind_value(pReplace, 2, pVal);
+ }else{
+ sqlite3_bind_int(pReplace, 2, iVal);
+ }
+ sqlite3_step(pReplace);
+ rc = sqlite3_reset(pReplace);
+ }
+ if( rc==SQLITE_OK && pVal ){
+ int iNew = p->pConfig->iCookie + 1;
+ rc = sqlite3Fts5IndexSetCookie(p->pIndex, iNew);
+ if( rc==SQLITE_OK ){
+ p->pConfig->iCookie = iNew;
+ }
+ }
+ return rc;
+}
+
+
+
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+*/
+
+
+
+/**************************************************************************
+** Start of ascii tokenizer implementation.
+*/
+
+/*
+** For tokenizers with no "unicode" modifier, the set of token characters
+** is the same as the set of ASCII range alphanumeric characters.
+*/
+static unsigned char aAsciiTokenChar[128] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00..0x0F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10..0x1F */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20..0x2F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 0x30..0x3F */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40..0x4F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 0x50..0x5F */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60..0x6F */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 0x70..0x7F */
+};
+
+typedef struct AsciiTokenizer AsciiTokenizer;
+struct AsciiTokenizer {
+ unsigned char aTokenChar[128];
+};
+
+static void fts5AsciiAddExceptions(
+ AsciiTokenizer *p,
+ const char *zArg,
+ int bTokenChars
+){
+ int i;
+ for(i=0; zArg[i]; i++){
+ if( (zArg[i] & 0x80)==0 ){
+ p->aTokenChar[(int)zArg[i]] = (unsigned char)bTokenChars;
+ }
+ }
+}
+
+/*
+** Delete a "ascii" tokenizer.
+*/
+static void fts5AsciiDelete(Fts5Tokenizer *p){
+ sqlite3_free(p);
+}
+
+/*
+** Create an "ascii" tokenizer.
+*/
+static int fts5AsciiCreate(
+ void *pCtx,
+ const char **azArg, int nArg,
+ Fts5Tokenizer **ppOut
+){
+ int rc = SQLITE_OK;
+ AsciiTokenizer *p = 0;
+ if( nArg%2 ){
+ rc = SQLITE_ERROR;
+ }else{
+ p = sqlite3_malloc(sizeof(AsciiTokenizer));
+ if( p==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ int i;
+ memset(p, 0, sizeof(AsciiTokenizer));
+ memcpy(p->aTokenChar, aAsciiTokenChar, sizeof(aAsciiTokenChar));
+ for(i=0; rc==SQLITE_OK && i<nArg; i+=2){
+ const char *zArg = azArg[i+1];
+ if( 0==sqlite3_stricmp(azArg[i], "tokenchars") ){
+ fts5AsciiAddExceptions(p, zArg, 1);
+ }else
+ if( 0==sqlite3_stricmp(azArg[i], "separators") ){
+ fts5AsciiAddExceptions(p, zArg, 0);
+ }else{
+ rc = SQLITE_ERROR;
+ }
+ }
+ if( rc!=SQLITE_OK ){
+ fts5AsciiDelete((Fts5Tokenizer*)p);
+ p = 0;
+ }
+ }
+ }
+
+ *ppOut = (Fts5Tokenizer*)p;
+ return rc;
+}
+
+
+static void asciiFold(char *aOut, const char *aIn, int nByte){
+ int i;
+ for(i=0; i<nByte; i++){
+ char c = aIn[i];
+ if( c>='A' && c<='Z' ) c += 32;
+ aOut[i] = c;
+ }
+}
+
+/*
+** Tokenize some text using the ascii tokenizer.
+*/
+static int fts5AsciiTokenize(
+ Fts5Tokenizer *pTokenizer,
+ void *pCtx,
+ int flags,
+ const char *pText, int nText,
+ int (*xToken)(void*, int, const char*, int nToken, int iStart, int iEnd)
+){
+ AsciiTokenizer *p = (AsciiTokenizer*)pTokenizer;
+ int rc = SQLITE_OK;
+ int ie;
+ int is = 0;
+
+ char aFold[64];
+ int nFold = sizeof(aFold);
+ char *pFold = aFold;
+ unsigned char *a = p->aTokenChar;
+
+ while( is<nText && rc==SQLITE_OK ){
+ int nByte;
+
+ /* Skip any leading divider characters. */
+ while( is<nText && ((pText[is]&0x80)==0 && a[(int)pText[is]]==0) ){
+ is++;
+ }
+ if( is==nText ) break;
+
+ /* Count the token characters */
+ ie = is+1;
+ while( ie<nText && ((pText[ie]&0x80) || a[(int)pText[ie]] ) ){
+ ie++;
+ }
+
+ /* Fold to lower case */
+ nByte = ie-is;
+ if( nByte>nFold ){
+ if( pFold!=aFold ) sqlite3_free(pFold);
+ pFold = sqlite3_malloc(nByte*2);
+ if( pFold==0 ){
+ rc = SQLITE_NOMEM;
+ break;
+ }
+ nFold = nByte*2;
+ }
+ asciiFold(pFold, &pText[is], nByte);
+
+ /* Invoke the token callback */
+ rc = xToken(pCtx, 0, pFold, nByte, is, ie);
+ is = ie+1;
+ }
+
+ if( pFold!=aFold ) sqlite3_free(pFold);
+ if( rc==SQLITE_DONE ) rc = SQLITE_OK;
+ return rc;
+}
+
+/**************************************************************************
+** Start of unicode61 tokenizer implementation.
+*/
+
+
+/*
+** The following two macros - READ_UTF8 and WRITE_UTF8 - have been copied
+** from the sqlite3 source file utf.c. If this file is compiled as part
+** of the amalgamation, they are not required.
+*/
+#ifndef SQLITE_AMALGAMATION
+
+static const unsigned char sqlite3Utf8Trans1[] = {
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,
+};
+
+#define READ_UTF8(zIn, zTerm, c) \
+ c = *(zIn++); \
+ if( c>=0xc0 ){ \
+ c = sqlite3Utf8Trans1[c-0xc0]; \
+ while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){ \
+ c = (c<<6) + (0x3f & *(zIn++)); \
+ } \
+ if( c<0x80 \
+ || (c&0xFFFFF800)==0xD800 \
+ || (c&0xFFFFFFFE)==0xFFFE ){ c = 0xFFFD; } \
+ }
+
+
+#define WRITE_UTF8(zOut, c) { \
+ if( c<0x00080 ){ \
+ *zOut++ = (unsigned char)(c&0xFF); \
+ } \
+ else if( c<0x00800 ){ \
+ *zOut++ = 0xC0 + (unsigned char)((c>>6)&0x1F); \
+ *zOut++ = 0x80 + (unsigned char)(c & 0x3F); \
+ } \
+ else if( c<0x10000 ){ \
+ *zOut++ = 0xE0 + (unsigned char)((c>>12)&0x0F); \
+ *zOut++ = 0x80 + (unsigned char)((c>>6) & 0x3F); \
+ *zOut++ = 0x80 + (unsigned char)(c & 0x3F); \
+ }else{ \
+ *zOut++ = 0xF0 + (unsigned char)((c>>18) & 0x07); \
+ *zOut++ = 0x80 + (unsigned char)((c>>12) & 0x3F); \
+ *zOut++ = 0x80 + (unsigned char)((c>>6) & 0x3F); \
+ *zOut++ = 0x80 + (unsigned char)(c & 0x3F); \
+ } \
+}
+
+#endif /* ifndef SQLITE_AMALGAMATION */
+
+typedef struct Unicode61Tokenizer Unicode61Tokenizer;
+struct Unicode61Tokenizer {
+ unsigned char aTokenChar[128]; /* ASCII range token characters */
+ char *aFold; /* Buffer to fold text into */
+ int nFold; /* Size of aFold[] in bytes */
+ int bRemoveDiacritic; /* True if remove_diacritics=1 is set */
+ int nException;
+ int *aiException;
+};
+
+static int fts5UnicodeAddExceptions(
+ Unicode61Tokenizer *p, /* Tokenizer object */
+ const char *z, /* Characters to treat as exceptions */
+ int bTokenChars /* 1 for 'tokenchars', 0 for 'separators' */
+){
+ int rc = SQLITE_OK;
+ int n = strlen(z);
+ int *aNew;
+
+ if( n>0 ){
+ aNew = (int*)sqlite3_realloc(p->aiException, (n+p->nException)*sizeof(int));
+ if( aNew ){
+ int nNew = p->nException;
+ const unsigned char *zCsr = (const unsigned char*)z;
+ const unsigned char *zTerm = (const unsigned char*)&z[n];
+ while( zCsr<zTerm ){
+ int iCode;
+ int bToken;
+ READ_UTF8(zCsr, zTerm, iCode);
+ if( iCode<128 ){
+ p->aTokenChar[iCode] = bTokenChars;
+ }else{
+ bToken = sqlite3Fts5UnicodeIsalnum(iCode);
+ assert( (bToken==0 || bToken==1) );
+ assert( (bTokenChars==0 || bTokenChars==1) );
+ if( bToken!=bTokenChars && sqlite3Fts5UnicodeIsdiacritic(iCode)==0 ){
+ int i;
+ for(i=0; i<nNew; i++){
+ if( aNew[i]>iCode ) break;
+ }
+ memmove(&aNew[i+1], &aNew[i], (nNew-i)*sizeof(int));
+ aNew[i] = iCode;
+ nNew++;
+ }
+ }
+ }
+ p->aiException = aNew;
+ p->nException = nNew;
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+ }
+
+ return rc;
+}
+
+/*
+** Return true if the p->aiException[] array contains the value iCode.
+*/
+static int fts5UnicodeIsException(Unicode61Tokenizer *p, int iCode){
+ if( p->nException>0 ){
+ int *a = p->aiException;
+ int iLo = 0;
+ int iHi = p->nException-1;
+
+ while( iHi>=iLo ){
+ int iTest = (iHi + iLo) / 2;
+ if( iCode==a[iTest] ){
+ return 1;
+ }else if( iCode>a[iTest] ){
+ iLo = iTest+1;
+ }else{
+ iHi = iTest-1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*
+** Delete a "unicode61" tokenizer.
+*/
+static void fts5UnicodeDelete(Fts5Tokenizer *pTok){
+ if( pTok ){
+ Unicode61Tokenizer *p = (Unicode61Tokenizer*)pTok;
+ sqlite3_free(p->aiException);
+ sqlite3_free(p->aFold);
+ sqlite3_free(p);
+ }
+ return;
+}
+
+/*
+** Create a "unicode61" tokenizer.
+*/
+static int fts5UnicodeCreate(
+ void *pCtx,
+ const char **azArg, int nArg,
+ Fts5Tokenizer **ppOut
+){
+ int rc = SQLITE_OK; /* Return code */
+ Unicode61Tokenizer *p = 0; /* New tokenizer object */
+
+ if( nArg%2 ){
+ rc = SQLITE_ERROR;
+ }else{
+ p = (Unicode61Tokenizer*)sqlite3_malloc(sizeof(Unicode61Tokenizer));
+ if( p ){
+ int i;
+ memset(p, 0, sizeof(Unicode61Tokenizer));
+ memcpy(p->aTokenChar, aAsciiTokenChar, sizeof(aAsciiTokenChar));
+ p->bRemoveDiacritic = 1;
+ p->nFold = 64;
+ p->aFold = sqlite3_malloc(p->nFold * sizeof(char));
+ if( p->aFold==0 ){
+ rc = SQLITE_NOMEM;
+ }
+ for(i=0; rc==SQLITE_OK && i<nArg; i+=2){
+ const char *zArg = azArg[i+1];
+ if( 0==sqlite3_stricmp(azArg[i], "remove_diacritics") ){
+ if( (zArg[0]!='0' && zArg[0]!='1') || zArg[1] ){
+ rc = SQLITE_ERROR;
+ }
+ p->bRemoveDiacritic = (zArg[0]=='1');
+ }else
+ if( 0==sqlite3_stricmp(azArg[i], "tokenchars") ){
+ rc = fts5UnicodeAddExceptions(p, zArg, 1);
+ }else
+ if( 0==sqlite3_stricmp(azArg[i], "separators") ){
+ rc = fts5UnicodeAddExceptions(p, zArg, 0);
+ }else{
+ rc = SQLITE_ERROR;
+ }
+ }
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+ if( rc!=SQLITE_OK ){
+ fts5UnicodeDelete((Fts5Tokenizer*)p);
+ p = 0;
+ }
+ *ppOut = (Fts5Tokenizer*)p;
+ }
+ return rc;
+}
+
+/*
+** Return true if, for the purposes of tokenizing with the tokenizer
+** passed as the first argument, codepoint iCode is considered a token
+** character (not a separator).
+*/
+static int fts5UnicodeIsAlnum(Unicode61Tokenizer *p, int iCode){
+ assert( (sqlite3Fts5UnicodeIsalnum(iCode) & 0xFFFFFFFE)==0 );
+ return sqlite3Fts5UnicodeIsalnum(iCode) ^ fts5UnicodeIsException(p, iCode);
+}
+
+static int fts5UnicodeTokenize(
+ Fts5Tokenizer *pTokenizer,
+ void *pCtx,
+ int flags,
+ const char *pText, int nText,
+ int (*xToken)(void*, int, const char*, int nToken, int iStart, int iEnd)
+){
+ Unicode61Tokenizer *p = (Unicode61Tokenizer*)pTokenizer;
+ int rc = SQLITE_OK;
+ unsigned char *a = p->aTokenChar;
+
+ unsigned char *zTerm = (unsigned char*)&pText[nText];
+ unsigned char *zCsr = (unsigned char *)pText;
+
+ /* Output buffer */
+ char *aFold = p->aFold;
+ int nFold = p->nFold;
+ const char *pEnd = &aFold[nFold-6];
+
+ /* Each iteration of this loop gobbles up a contiguous run of separators,
+ ** then the next token. */
+ while( rc==SQLITE_OK ){
+ int iCode; /* non-ASCII codepoint read from input */
+ char *zOut = aFold;
+ int is;
+ int ie;
+
+ /* Skip any separator characters. */
+ while( 1 ){
+ if( zCsr>=zTerm ) goto tokenize_done;
+ if( *zCsr & 0x80 ) {
+ /* A character outside of the ascii range. Skip past it if it is
+ ** a separator character. Or break out of the loop if it is not. */
+ is = zCsr - (unsigned char*)pText;
+ READ_UTF8(zCsr, zTerm, iCode);
+ if( fts5UnicodeIsAlnum(p, iCode) ){
+ goto non_ascii_tokenchar;
+ }
+ }else{
+ if( a[*zCsr] ){
+ is = zCsr - (unsigned char*)pText;
+ goto ascii_tokenchar;
+ }
+ zCsr++;
+ }
+ }
+
+ /* Run through the tokenchars. Fold them into the output buffer along
+ ** the way. */
+ while( zCsr<zTerm ){
+
+ /* Grow the output buffer so that there is sufficient space to fit the
+ ** largest possible utf-8 character. */
+ if( zOut>pEnd ){
+ aFold = sqlite3_malloc(nFold*2);
+ if( aFold==0 ){
+ rc = SQLITE_NOMEM;
+ goto tokenize_done;
+ }
+ zOut = &aFold[zOut - p->aFold];
+ memcpy(aFold, p->aFold, nFold);
+ sqlite3_free(p->aFold);
+ p->aFold = aFold;
+ p->nFold = nFold = nFold*2;
+ pEnd = &aFold[nFold-6];
+ }
+
+ if( *zCsr & 0x80 ){
+ /* An non-ascii-range character. Fold it into the output buffer if
+ ** it is a token character, or break out of the loop if it is not. */
+ READ_UTF8(zCsr, zTerm, iCode);
+ if( fts5UnicodeIsAlnum(p,iCode)||sqlite3Fts5UnicodeIsdiacritic(iCode) ){
+ non_ascii_tokenchar:
+ iCode = sqlite3Fts5UnicodeFold(iCode, p->bRemoveDiacritic);
+ if( iCode ) WRITE_UTF8(zOut, iCode);
+ }else{
+ break;
+ }
+ }else if( a[*zCsr]==0 ){
+ /* An ascii-range separator character. End of token. */
+ break;
+ }else{
+ ascii_tokenchar:
+ if( *zCsr>='A' && *zCsr<='Z' ){
+ *zOut++ = *zCsr + 32;
+ }else{
+ *zOut++ = *zCsr;
+ }
+ zCsr++;
+ }
+ ie = zCsr - (unsigned char*)pText;
+ }
+
+ /* Invoke the token callback */
+ rc = xToken(pCtx, 0, aFold, zOut-aFold, is, ie);
+ }
+
+ tokenize_done:
+ if( rc==SQLITE_DONE ) rc = SQLITE_OK;
+ return rc;
+}
+
+/**************************************************************************
+** Start of porter stemmer implementation.
+*/
+
+/* Any tokens larger than this (in bytes) are passed through without
+** stemming. */
+#define FTS5_PORTER_MAX_TOKEN 64
+
+typedef struct PorterTokenizer PorterTokenizer;
+struct PorterTokenizer {
+ fts5_tokenizer tokenizer; /* Parent tokenizer module */
+ Fts5Tokenizer *pTokenizer; /* Parent tokenizer instance */
+ char aBuf[FTS5_PORTER_MAX_TOKEN + 64];
+};
+
+/*
+** Delete a "porter" tokenizer.
+*/
+static void fts5PorterDelete(Fts5Tokenizer *pTok){
+ if( pTok ){
+ PorterTokenizer *p = (PorterTokenizer*)pTok;
+ if( p->pTokenizer ){
+ p->tokenizer.xDelete(p->pTokenizer);
+ }
+ sqlite3_free(p);
+ }
+}
+
+/*
+** Create a "porter" tokenizer.
+*/
+static int fts5PorterCreate(
+ void *pCtx,
+ const char **azArg, int nArg,
+ Fts5Tokenizer **ppOut
+){
+ fts5_api *pApi = (fts5_api*)pCtx;
+ int rc = SQLITE_OK;
+ PorterTokenizer *pRet;
+ void *pUserdata = 0;
+ const char *zBase = "unicode61";
+
+ if( nArg>0 ){
+ zBase = azArg[0];
+ }
+
+ pRet = (PorterTokenizer*)sqlite3_malloc(sizeof(PorterTokenizer));
+ if( pRet ){
+ memset(pRet, 0, sizeof(PorterTokenizer));
+ rc = pApi->xFindTokenizer(pApi, zBase, &pUserdata, &pRet->tokenizer);
+ }else{
+ rc = SQLITE_NOMEM;
+ }
+ if( rc==SQLITE_OK ){
+ int nArg2 = (nArg>0 ? nArg-1 : 0);
+ const char **azArg2 = (nArg2 ? &azArg[1] : 0);
+ rc = pRet->tokenizer.xCreate(pUserdata, azArg2, nArg2, &pRet->pTokenizer);
+ }
+
+ if( rc!=SQLITE_OK ){
+ fts5PorterDelete((Fts5Tokenizer*)pRet);
+ pRet = 0;
+ }
+ *ppOut = (Fts5Tokenizer*)pRet;
+ return rc;
+}
+
+typedef struct PorterContext PorterContext;
+struct PorterContext {
+ void *pCtx;
+ int (*xToken)(void*, int, const char*, int, int, int);
+ char *aBuf;
+};
+
+typedef struct PorterRule PorterRule;
+struct PorterRule {
+ const char *zSuffix;
+ int nSuffix;
+ int (*xCond)(char *zStem, int nStem);
+ const char *zOutput;
+ int nOutput;
+};
+
+#if 0
+static int fts5PorterApply(char *aBuf, int *pnBuf, PorterRule *aRule){
+ int ret = -1;
+ int nBuf = *pnBuf;
+ PorterRule *p;
+
+ for(p=aRule; p->zSuffix; p++){
+ assert( strlen(p->zSuffix)==p->nSuffix );
+ assert( strlen(p->zOutput)==p->nOutput );
+ if( nBuf<p->nSuffix ) continue;
+ if( 0==memcmp(&aBuf[nBuf - p->nSuffix], p->zSuffix, p->nSuffix) ) break;
+ }
+
+ if( p->zSuffix ){
+ int nStem = nBuf - p->nSuffix;
+ if( p->xCond==0 || p->xCond(aBuf, nStem) ){
+ memcpy(&aBuf[nStem], p->zOutput, p->nOutput);
+ *pnBuf = nStem + p->nOutput;
+ ret = p - aRule;
+ }
+ }
+
+ return ret;
+}
+#endif
+
+static int fts5PorterIsVowel(char c, int bYIsVowel){
+ return (
+ c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || (bYIsVowel && c=='y')
+ );
+}
+
+static int fts5PorterGobbleVC(char *zStem, int nStem, int bPrevCons){
+ int i;
+ int bCons = bPrevCons;
+
+ /* Scan for a vowel */
+ for(i=0; i<nStem; i++){
+ if( 0==(bCons = !fts5PorterIsVowel(zStem[i], bCons)) ) break;
+ }
+
+ /* Scan for a consonent */
+ for(i++; i<nStem; i++){
+ if( (bCons = !fts5PorterIsVowel(zStem[i], bCons)) ) return i+1;
+ }
+ return 0;
+}
+
+/* porter rule condition: (m > 0) */
+static int fts5Porter_MGt0(char *zStem, int nStem){
+ return !!fts5PorterGobbleVC(zStem, nStem, 0);
+}
+
+/* porter rule condition: (m > 1) */
+static int fts5Porter_MGt1(char *zStem, int nStem){
+ int n;
+ n = fts5PorterGobbleVC(zStem, nStem, 0);
+ if( n && fts5PorterGobbleVC(&zStem[n], nStem-n, 1) ){
+ return 1;
+ }
+ return 0;
+}
+
+/* porter rule condition: (m = 1) */
+static int fts5Porter_MEq1(char *zStem, int nStem){
+ int n;
+ n = fts5PorterGobbleVC(zStem, nStem, 0);
+ if( n && 0==fts5PorterGobbleVC(&zStem[n], nStem-n, 1) ){
+ return 1;
+ }
+ return 0;
+}
+
+/* porter rule condition: (*o) */
+static int fts5Porter_Ostar(char *zStem, int nStem){
+ if( zStem[nStem-1]=='w' || zStem[nStem-1]=='x' || zStem[nStem-1]=='y' ){
+ return 0;
+ }else{
+ int i;
+ int mask = 0;
+ int bCons = 0;
+ for(i=0; i<nStem; i++){
+ bCons = !fts5PorterIsVowel(zStem[i], bCons);
+ assert( bCons==0 || bCons==1 );
+ mask = (mask << 1) + bCons;
+ }
+ return ((mask & 0x0007)==0x0005);
+ }
+}
+
+/* porter rule condition: (m > 1 and (*S or *T)) */
+static int fts5Porter_MGt1_and_S_or_T(char *zStem, int nStem){
+ assert( nStem>0 );
+ return (zStem[nStem-1]=='s' || zStem[nStem-1]=='t')
+ && fts5Porter_MGt1(zStem, nStem);
+}
+
+/* porter rule condition: (*v*) */
+static int fts5Porter_Vowel(char *zStem, int nStem){
+ int i;
+ for(i=0; i<nStem; i++){
+ if( fts5PorterIsVowel(zStem[i], i>0) ){
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+/**************************************************************************
+***************************************************************************
+** GENERATED CODE STARTS HERE (mkportersteps.tcl)
+*/
+
+static int fts5PorterStep4(char *aBuf, int *pnBuf){
+ int ret = 0;
+ int nBuf = *pnBuf;
+ switch( aBuf[nBuf-2] ){
+
+ case 'a':
+ if( nBuf>2 && 0==memcmp("al", &aBuf[nBuf-2], 2) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-2) ){
+ *pnBuf = nBuf - 2;
+ }
+ }
+ break;
+
+ case 'c':
+ if( nBuf>4 && 0==memcmp("ance", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-4) ){
+ *pnBuf = nBuf - 4;
+ }
+ }else if( nBuf>4 && 0==memcmp("ence", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-4) ){
+ *pnBuf = nBuf - 4;
+ }
+ }
+ break;
+
+ case 'e':
+ if( nBuf>2 && 0==memcmp("er", &aBuf[nBuf-2], 2) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-2) ){
+ *pnBuf = nBuf - 2;
+ }
+ }
+ break;
+
+ case 'i':
+ if( nBuf>2 && 0==memcmp("ic", &aBuf[nBuf-2], 2) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-2) ){
+ *pnBuf = nBuf - 2;
+ }
+ }
+ break;
+
+ case 'l':
+ if( nBuf>4 && 0==memcmp("able", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-4) ){
+ *pnBuf = nBuf - 4;
+ }
+ }else if( nBuf>4 && 0==memcmp("ible", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-4) ){
+ *pnBuf = nBuf - 4;
+ }
+ }
+ break;
+
+ case 'n':
+ if( nBuf>3 && 0==memcmp("ant", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }else if( nBuf>5 && 0==memcmp("ement", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-5) ){
+ *pnBuf = nBuf - 5;
+ }
+ }else if( nBuf>4 && 0==memcmp("ment", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-4) ){
+ *pnBuf = nBuf - 4;
+ }
+ }else if( nBuf>3 && 0==memcmp("ent", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ case 'o':
+ if( nBuf>3 && 0==memcmp("ion", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1_and_S_or_T(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }else if( nBuf>2 && 0==memcmp("ou", &aBuf[nBuf-2], 2) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-2) ){
+ *pnBuf = nBuf - 2;
+ }
+ }
+ break;
+
+ case 's':
+ if( nBuf>3 && 0==memcmp("ism", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ case 't':
+ if( nBuf>3 && 0==memcmp("ate", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }else if( nBuf>3 && 0==memcmp("iti", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ case 'u':
+ if( nBuf>3 && 0==memcmp("ous", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ case 'v':
+ if( nBuf>3 && 0==memcmp("ive", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ case 'z':
+ if( nBuf>3 && 0==memcmp("ize", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt1(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ }
+ return ret;
+}
+
+
+static int fts5PorterStep1B2(char *aBuf, int *pnBuf){
+ int ret = 0;
+ int nBuf = *pnBuf;
+ switch( aBuf[nBuf-2] ){
+
+ case 'a':
+ if( nBuf>2 && 0==memcmp("at", &aBuf[nBuf-2], 2) ){
+ memcpy(&aBuf[nBuf-2], "ate", 3);
+ *pnBuf = nBuf - 2 + 3;
+ ret = 1;
+ }
+ break;
+
+ case 'b':
+ if( nBuf>2 && 0==memcmp("bl", &aBuf[nBuf-2], 2) ){
+ memcpy(&aBuf[nBuf-2], "ble", 3);
+ *pnBuf = nBuf - 2 + 3;
+ ret = 1;
+ }
+ break;
+
+ case 'i':
+ if( nBuf>2 && 0==memcmp("iz", &aBuf[nBuf-2], 2) ){
+ memcpy(&aBuf[nBuf-2], "ize", 3);
+ *pnBuf = nBuf - 2 + 3;
+ ret = 1;
+ }
+ break;
+
+ }
+ return ret;
+}
+
+
+static int fts5PorterStep2(char *aBuf, int *pnBuf){
+ int ret = 0;
+ int nBuf = *pnBuf;
+ switch( aBuf[nBuf-2] ){
+
+ case 'a':
+ if( nBuf>7 && 0==memcmp("ational", &aBuf[nBuf-7], 7) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-7) ){
+ memcpy(&aBuf[nBuf-7], "ate", 3);
+ *pnBuf = nBuf - 7 + 3;
+ }
+ }else if( nBuf>6 && 0==memcmp("tional", &aBuf[nBuf-6], 6) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-6) ){
+ memcpy(&aBuf[nBuf-6], "tion", 4);
+ *pnBuf = nBuf - 6 + 4;
+ }
+ }
+ break;
+
+ case 'c':
+ if( nBuf>4 && 0==memcmp("enci", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "ence", 4);
+ *pnBuf = nBuf - 4 + 4;
+ }
+ }else if( nBuf>4 && 0==memcmp("anci", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "ance", 4);
+ *pnBuf = nBuf - 4 + 4;
+ }
+ }
+ break;
+
+ case 'e':
+ if( nBuf>4 && 0==memcmp("izer", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "ize", 3);
+ *pnBuf = nBuf - 4 + 3;
+ }
+ }
+ break;
+
+ case 'g':
+ if( nBuf>4 && 0==memcmp("logi", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "log", 3);
+ *pnBuf = nBuf - 4 + 3;
+ }
+ }
+ break;
+
+ case 'l':
+ if( nBuf>3 && 0==memcmp("bli", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-3) ){
+ memcpy(&aBuf[nBuf-3], "ble", 3);
+ *pnBuf = nBuf - 3 + 3;
+ }
+ }else if( nBuf>4 && 0==memcmp("alli", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "al", 2);
+ *pnBuf = nBuf - 4 + 2;
+ }
+ }else if( nBuf>5 && 0==memcmp("entli", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "ent", 3);
+ *pnBuf = nBuf - 5 + 3;
+ }
+ }else if( nBuf>3 && 0==memcmp("eli", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-3) ){
+ memcpy(&aBuf[nBuf-3], "e", 1);
+ *pnBuf = nBuf - 3 + 1;
+ }
+ }else if( nBuf>5 && 0==memcmp("ousli", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "ous", 3);
+ *pnBuf = nBuf - 5 + 3;
+ }
+ }
+ break;
+
+ case 'o':
+ if( nBuf>7 && 0==memcmp("ization", &aBuf[nBuf-7], 7) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-7) ){
+ memcpy(&aBuf[nBuf-7], "ize", 3);
+ *pnBuf = nBuf - 7 + 3;
+ }
+ }else if( nBuf>5 && 0==memcmp("ation", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "ate", 3);
+ *pnBuf = nBuf - 5 + 3;
+ }
+ }else if( nBuf>4 && 0==memcmp("ator", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "ate", 3);
+ *pnBuf = nBuf - 4 + 3;
+ }
+ }
+ break;
+
+ case 's':
+ if( nBuf>5 && 0==memcmp("alism", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "al", 2);
+ *pnBuf = nBuf - 5 + 2;
+ }
+ }else if( nBuf>7 && 0==memcmp("iveness", &aBuf[nBuf-7], 7) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-7) ){
+ memcpy(&aBuf[nBuf-7], "ive", 3);
+ *pnBuf = nBuf - 7 + 3;
+ }
+ }else if( nBuf>7 && 0==memcmp("fulness", &aBuf[nBuf-7], 7) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-7) ){
+ memcpy(&aBuf[nBuf-7], "ful", 3);
+ *pnBuf = nBuf - 7 + 3;
+ }
+ }else if( nBuf>7 && 0==memcmp("ousness", &aBuf[nBuf-7], 7) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-7) ){
+ memcpy(&aBuf[nBuf-7], "ous", 3);
+ *pnBuf = nBuf - 7 + 3;
+ }
+ }
+ break;
+
+ case 't':
+ if( nBuf>5 && 0==memcmp("aliti", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "al", 2);
+ *pnBuf = nBuf - 5 + 2;
+ }
+ }else if( nBuf>5 && 0==memcmp("iviti", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "ive", 3);
+ *pnBuf = nBuf - 5 + 3;
+ }
+ }else if( nBuf>6 && 0==memcmp("biliti", &aBuf[nBuf-6], 6) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-6) ){
+ memcpy(&aBuf[nBuf-6], "ble", 3);
+ *pnBuf = nBuf - 6 + 3;
+ }
+ }
+ break;
+
+ }
+ return ret;
+}
+
+
+static int fts5PorterStep3(char *aBuf, int *pnBuf){
+ int ret = 0;
+ int nBuf = *pnBuf;
+ switch( aBuf[nBuf-2] ){
+
+ case 'a':
+ if( nBuf>4 && 0==memcmp("ical", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ memcpy(&aBuf[nBuf-4], "ic", 2);
+ *pnBuf = nBuf - 4 + 2;
+ }
+ }
+ break;
+
+ case 's':
+ if( nBuf>4 && 0==memcmp("ness", &aBuf[nBuf-4], 4) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-4) ){
+ *pnBuf = nBuf - 4;
+ }
+ }
+ break;
+
+ case 't':
+ if( nBuf>5 && 0==memcmp("icate", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "ic", 2);
+ *pnBuf = nBuf - 5 + 2;
+ }
+ }else if( nBuf>5 && 0==memcmp("iciti", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "ic", 2);
+ *pnBuf = nBuf - 5 + 2;
+ }
+ }
+ break;
+
+ case 'u':
+ if( nBuf>3 && 0==memcmp("ful", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ }
+ }
+ break;
+
+ case 'v':
+ if( nBuf>5 && 0==memcmp("ative", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ *pnBuf = nBuf - 5;
+ }
+ }
+ break;
+
+ case 'z':
+ if( nBuf>5 && 0==memcmp("alize", &aBuf[nBuf-5], 5) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-5) ){
+ memcpy(&aBuf[nBuf-5], "al", 2);
+ *pnBuf = nBuf - 5 + 2;
+ }
+ }
+ break;
+
+ }
+ return ret;
+}
+
+
+static int fts5PorterStep1B(char *aBuf, int *pnBuf){
+ int ret = 0;
+ int nBuf = *pnBuf;
+ switch( aBuf[nBuf-2] ){
+
+ case 'e':
+ if( nBuf>3 && 0==memcmp("eed", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_MGt0(aBuf, nBuf-3) ){
+ memcpy(&aBuf[nBuf-3], "ee", 2);
+ *pnBuf = nBuf - 3 + 2;
+ }
+ }else if( nBuf>2 && 0==memcmp("ed", &aBuf[nBuf-2], 2) ){
+ if( fts5Porter_Vowel(aBuf, nBuf-2) ){
+ *pnBuf = nBuf - 2;
+ ret = 1;
+ }
+ }
+ break;
+
+ case 'n':
+ if( nBuf>3 && 0==memcmp("ing", &aBuf[nBuf-3], 3) ){
+ if( fts5Porter_Vowel(aBuf, nBuf-3) ){
+ *pnBuf = nBuf - 3;
+ ret = 1;
+ }
+ }
+ break;
+
+ }
+ return ret;
+}
+
+/*
+** GENERATED CODE ENDS HERE (mkportersteps.tcl)
+***************************************************************************
+**************************************************************************/
+
+static void fts5PorterStep1A(char *aBuf, int *pnBuf){
+ int nBuf = *pnBuf;
+ if( aBuf[nBuf-1]=='s' ){
+ if( aBuf[nBuf-2]=='e' ){
+ if( (nBuf>4 && aBuf[nBuf-4]=='s' && aBuf[nBuf-3]=='s')
+ || (nBuf>3 && aBuf[nBuf-3]=='i' )
+ ){
+ *pnBuf = nBuf-2;
+ }else{
+ *pnBuf = nBuf-1;
+ }
+ }
+ else if( aBuf[nBuf-2]!='s' ){
+ *pnBuf = nBuf-1;
+ }
+ }
+}
+
+static int fts5PorterCb(
+ void *pCtx,
+ int tflags,
+ const char *pToken,
+ int nToken,
+ int iStart,
+ int iEnd
+){
+ PorterContext *p = (PorterContext*)pCtx;
+
+ char *aBuf;
+ int nBuf;
+
+ if( nToken>FTS5_PORTER_MAX_TOKEN || nToken<3 ) goto pass_through;
+ aBuf = p->aBuf;
+ nBuf = nToken;
+ memcpy(aBuf, pToken, nBuf);
+
+ /* Step 1. */
+ fts5PorterStep1A(aBuf, &nBuf);
+ if( fts5PorterStep1B(aBuf, &nBuf) ){
+ if( fts5PorterStep1B2(aBuf, &nBuf)==0 ){
+ char c = aBuf[nBuf-1];
+ if( fts5PorterIsVowel(c, 0)==0
+ && c!='l' && c!='s' && c!='z' && c==aBuf[nBuf-2]
+ ){
+ nBuf--;
+ }else if( fts5Porter_MEq1(aBuf, nBuf) && fts5Porter_Ostar(aBuf, nBuf) ){
+ aBuf[nBuf++] = 'e';
+ }
+ }
+ }
+
+ /* Step 1C. */
+ if( aBuf[nBuf-1]=='y' && fts5Porter_Vowel(aBuf, nBuf-1) ){
+ aBuf[nBuf-1] = 'i';
+ }
+
+ /* Steps 2 through 4. */
+ fts5PorterStep2(aBuf, &nBuf);
+ fts5PorterStep3(aBuf, &nBuf);
+ fts5PorterStep4(aBuf, &nBuf);
+
+ /* Step 5a. */
+ assert( nBuf>0 );
+ if( aBuf[nBuf-1]=='e' ){
+ if( fts5Porter_MGt1(aBuf, nBuf-1)
+ || (fts5Porter_MEq1(aBuf, nBuf-1) && !fts5Porter_Ostar(aBuf, nBuf-1))
+ ){
+ nBuf--;
+ }
+ }
+
+ /* Step 5b. */
+ if( nBuf>1 && aBuf[nBuf-1]=='l'
+ && aBuf[nBuf-2]=='l' && fts5Porter_MGt1(aBuf, nBuf-1)
+ ){
+ nBuf--;
+ }
+
+ return p->xToken(p->pCtx, tflags, aBuf, nBuf, iStart, iEnd);
+
+ pass_through:
+ return p->xToken(p->pCtx, tflags, pToken, nToken, iStart, iEnd);
+}
+
+/*
+** Tokenize using the porter tokenizer.
+*/
+static int fts5PorterTokenize(
+ Fts5Tokenizer *pTokenizer,
+ void *pCtx,
+ int flags,
+ const char *pText, int nText,
+ int (*xToken)(void*, int, const char*, int nToken, int iStart, int iEnd)
+){
+ PorterTokenizer *p = (PorterTokenizer*)pTokenizer;
+ PorterContext sCtx;
+ sCtx.xToken = xToken;
+ sCtx.pCtx = pCtx;
+ sCtx.aBuf = p->aBuf;
+ return p->tokenizer.xTokenize(
+ p->pTokenizer, (void*)&sCtx, flags, pText, nText, fts5PorterCb
+ );
+}
+
+/*
+** Register all built-in tokenizers with FTS5.
+*/
+static int sqlite3Fts5TokenizerInit(fts5_api *pApi){
+ struct BuiltinTokenizer {
+ const char *zName;
+ fts5_tokenizer x;
+ } aBuiltin[] = {
+ { "unicode61", {fts5UnicodeCreate, fts5UnicodeDelete, fts5UnicodeTokenize}},
+ { "ascii", {fts5AsciiCreate, fts5AsciiDelete, fts5AsciiTokenize }},
+ { "porter", {fts5PorterCreate, fts5PorterDelete, fts5PorterTokenize }},
+ };
+
+ int rc = SQLITE_OK; /* Return code */
+ int i; /* To iterate through builtin functions */
+
+ for(i=0; rc==SQLITE_OK && i<sizeof(aBuiltin)/sizeof(aBuiltin[0]); i++){
+ rc = pApi->xCreateTokenizer(pApi,
+ aBuiltin[i].zName,
+ (void*)pApi,
+ &aBuiltin[i].x,
+ 0
+ );
+ }
+
+ return rc;
+}
+
+
+
+/*
+** 2012 May 25
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+*/
+
+/*
+** DO NOT EDIT THIS MACHINE GENERATED FILE.
+*/
+
+
+/* #include <assert.h> */
+
+/*
+** Return true if the argument corresponds to a unicode codepoint
+** classified as either a letter or a number. Otherwise false.
+**
+** The results are undefined if the value passed to this function
+** is less than zero.
+*/
+static int sqlite3Fts5UnicodeIsalnum(int c){
+ /* Each unsigned integer in the following array corresponds to a contiguous
+ ** range of unicode codepoints that are not either letters or numbers (i.e.
+ ** codepoints for which this function should return 0).
+ **
+ ** The most significant 22 bits in each 32-bit value contain the first
+ ** codepoint in the range. The least significant 10 bits are used to store
+ ** the size of the range (always at least 1). In other words, the value
+ ** ((C<<22) + N) represents a range of N codepoints starting with codepoint
+ ** C. It is not possible to represent a range larger than 1023 codepoints
+ ** using this format.
+ */
+ static const unsigned int aEntry[] = {
+ 0x00000030, 0x0000E807, 0x00016C06, 0x0001EC2F, 0x0002AC07,
+ 0x0002D001, 0x0002D803, 0x0002EC01, 0x0002FC01, 0x00035C01,
+ 0x0003DC01, 0x000B0804, 0x000B480E, 0x000B9407, 0x000BB401,
+ 0x000BBC81, 0x000DD401, 0x000DF801, 0x000E1002, 0x000E1C01,
+ 0x000FD801, 0x00120808, 0x00156806, 0x00162402, 0x00163C01,
+ 0x00164437, 0x0017CC02, 0x00180005, 0x00181816, 0x00187802,
+ 0x00192C15, 0x0019A804, 0x0019C001, 0x001B5001, 0x001B580F,
+ 0x001B9C07, 0x001BF402, 0x001C000E, 0x001C3C01, 0x001C4401,
+ 0x001CC01B, 0x001E980B, 0x001FAC09, 0x001FD804, 0x00205804,
+ 0x00206C09, 0x00209403, 0x0020A405, 0x0020C00F, 0x00216403,
+ 0x00217801, 0x0023901B, 0x00240004, 0x0024E803, 0x0024F812,
+ 0x00254407, 0x00258804, 0x0025C001, 0x00260403, 0x0026F001,
+ 0x0026F807, 0x00271C02, 0x00272C03, 0x00275C01, 0x00278802,
+ 0x0027C802, 0x0027E802, 0x00280403, 0x0028F001, 0x0028F805,
+ 0x00291C02, 0x00292C03, 0x00294401, 0x0029C002, 0x0029D401,
+ 0x002A0403, 0x002AF001, 0x002AF808, 0x002B1C03, 0x002B2C03,
+ 0x002B8802, 0x002BC002, 0x002C0403, 0x002CF001, 0x002CF807,
+ 0x002D1C02, 0x002D2C03, 0x002D5802, 0x002D8802, 0x002DC001,
+ 0x002E0801, 0x002EF805, 0x002F1803, 0x002F2804, 0x002F5C01,
+ 0x002FCC08, 0x00300403, 0x0030F807, 0x00311803, 0x00312804,
+ 0x00315402, 0x00318802, 0x0031FC01, 0x00320802, 0x0032F001,
+ 0x0032F807, 0x00331803, 0x00332804, 0x00335402, 0x00338802,
+ 0x00340802, 0x0034F807, 0x00351803, 0x00352804, 0x00355C01,
+ 0x00358802, 0x0035E401, 0x00360802, 0x00372801, 0x00373C06,
+ 0x00375801, 0x00376008, 0x0037C803, 0x0038C401, 0x0038D007,
+ 0x0038FC01, 0x00391C09, 0x00396802, 0x003AC401, 0x003AD006,
+ 0x003AEC02, 0x003B2006, 0x003C041F, 0x003CD00C, 0x003DC417,
+ 0x003E340B, 0x003E6424, 0x003EF80F, 0x003F380D, 0x0040AC14,
+ 0x00412806, 0x00415804, 0x00417803, 0x00418803, 0x00419C07,
+ 0x0041C404, 0x0042080C, 0x00423C01, 0x00426806, 0x0043EC01,
+ 0x004D740C, 0x004E400A, 0x00500001, 0x0059B402, 0x005A0001,
+ 0x005A6C02, 0x005BAC03, 0x005C4803, 0x005CC805, 0x005D4802,
+ 0x005DC802, 0x005ED023, 0x005F6004, 0x005F7401, 0x0060000F,
+ 0x0062A401, 0x0064800C, 0x0064C00C, 0x00650001, 0x00651002,
+ 0x0066C011, 0x00672002, 0x00677822, 0x00685C05, 0x00687802,
+ 0x0069540A, 0x0069801D, 0x0069FC01, 0x006A8007, 0x006AA006,
+ 0x006C0005, 0x006CD011, 0x006D6823, 0x006E0003, 0x006E840D,
+ 0x006F980E, 0x006FF004, 0x00709014, 0x0070EC05, 0x0071F802,
+ 0x00730008, 0x00734019, 0x0073B401, 0x0073C803, 0x00770027,
+ 0x0077F004, 0x007EF401, 0x007EFC03, 0x007F3403, 0x007F7403,
+ 0x007FB403, 0x007FF402, 0x00800065, 0x0081A806, 0x0081E805,
+ 0x00822805, 0x0082801A, 0x00834021, 0x00840002, 0x00840C04,
+ 0x00842002, 0x00845001, 0x00845803, 0x00847806, 0x00849401,
+ 0x00849C01, 0x0084A401, 0x0084B801, 0x0084E802, 0x00850005,
+ 0x00852804, 0x00853C01, 0x00864264, 0x00900027, 0x0091000B,
+ 0x0092704E, 0x00940200, 0x009C0475, 0x009E53B9, 0x00AD400A,
+ 0x00B39406, 0x00B3BC03, 0x00B3E404, 0x00B3F802, 0x00B5C001,
+ 0x00B5FC01, 0x00B7804F, 0x00B8C00C, 0x00BA001A, 0x00BA6C59,
+ 0x00BC00D6, 0x00BFC00C, 0x00C00005, 0x00C02019, 0x00C0A807,
+ 0x00C0D802, 0x00C0F403, 0x00C26404, 0x00C28001, 0x00C3EC01,
+ 0x00C64002, 0x00C6580A, 0x00C70024, 0x00C8001F, 0x00C8A81E,
+ 0x00C94001, 0x00C98020, 0x00CA2827, 0x00CB003F, 0x00CC0100,
+ 0x01370040, 0x02924037, 0x0293F802, 0x02983403, 0x0299BC10,
+ 0x029A7C01, 0x029BC008, 0x029C0017, 0x029C8002, 0x029E2402,
+ 0x02A00801, 0x02A01801, 0x02A02C01, 0x02A08C09, 0x02A0D804,
+ 0x02A1D004, 0x02A20002, 0x02A2D011, 0x02A33802, 0x02A38012,
+ 0x02A3E003, 0x02A4980A, 0x02A51C0D, 0x02A57C01, 0x02A60004,
+ 0x02A6CC1B, 0x02A77802, 0x02A8A40E, 0x02A90C01, 0x02A93002,
+ 0x02A97004, 0x02A9DC03, 0x02A9EC01, 0x02AAC001, 0x02AAC803,
+ 0x02AADC02, 0x02AAF802, 0x02AB0401, 0x02AB7802, 0x02ABAC07,
+ 0x02ABD402, 0x02AF8C0B, 0x03600001, 0x036DFC02, 0x036FFC02,
+ 0x037FFC01, 0x03EC7801, 0x03ECA401, 0x03EEC810, 0x03F4F802,
+ 0x03F7F002, 0x03F8001A, 0x03F88007, 0x03F8C023, 0x03F95013,
+ 0x03F9A004, 0x03FBFC01, 0x03FC040F, 0x03FC6807, 0x03FCEC06,
+ 0x03FD6C0B, 0x03FF8007, 0x03FFA007, 0x03FFE405, 0x04040003,
+ 0x0404DC09, 0x0405E411, 0x0406400C, 0x0407402E, 0x040E7C01,
+ 0x040F4001, 0x04215C01, 0x04247C01, 0x0424FC01, 0x04280403,
+ 0x04281402, 0x04283004, 0x0428E003, 0x0428FC01, 0x04294009,
+ 0x0429FC01, 0x042CE407, 0x04400003, 0x0440E016, 0x04420003,
+ 0x0442C012, 0x04440003, 0x04449C0E, 0x04450004, 0x04460003,
+ 0x0446CC0E, 0x04471404, 0x045AAC0D, 0x0491C004, 0x05BD442E,
+ 0x05BE3C04, 0x074000F6, 0x07440027, 0x0744A4B5, 0x07480046,
+ 0x074C0057, 0x075B0401, 0x075B6C01, 0x075BEC01, 0x075C5401,
+ 0x075CD401, 0x075D3C01, 0x075DBC01, 0x075E2401, 0x075EA401,
+ 0x075F0C01, 0x07BBC002, 0x07C0002C, 0x07C0C064, 0x07C2800F,
+ 0x07C2C40E, 0x07C3040F, 0x07C3440F, 0x07C4401F, 0x07C4C03C,
+ 0x07C5C02B, 0x07C7981D, 0x07C8402B, 0x07C90009, 0x07C94002,
+ 0x07CC0021, 0x07CCC006, 0x07CCDC46, 0x07CE0014, 0x07CE8025,
+ 0x07CF1805, 0x07CF8011, 0x07D0003F, 0x07D10001, 0x07D108B6,
+ 0x07D3E404, 0x07D4003E, 0x07D50004, 0x07D54018, 0x07D7EC46,
+ 0x07D9140B, 0x07DA0046, 0x07DC0074, 0x38000401, 0x38008060,
+ 0x380400F0,
+ };
+ static const unsigned int aAscii[4] = {
+ 0xFFFFFFFF, 0xFC00FFFF, 0xF8000001, 0xF8000001,
+ };
+
+ if( c<128 ){
+ return ( (aAscii[c >> 5] & (1 << (c & 0x001F)))==0 );
+ }else if( c<(1<<22) ){
+ unsigned int key = (((unsigned int)c)<<10) | 0x000003FF;
+ int iRes = 0;
+ int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;
+ int iLo = 0;
+ while( iHi>=iLo ){
+ int iTest = (iHi + iLo) / 2;
+ if( key >= aEntry[iTest] ){
+ iRes = iTest;
+ iLo = iTest+1;
+ }else{
+ iHi = iTest-1;
+ }
+ }
+ assert( aEntry[0]<key );
+ assert( key>=aEntry[iRes] );
+ return (((unsigned int)c) >= ((aEntry[iRes]>>10) + (aEntry[iRes]&0x3FF)));
+ }
+ return 1;
+}
+
+
+/*
+** If the argument is a codepoint corresponding to a lowercase letter
+** in the ASCII range with a diacritic added, return the codepoint
+** of the ASCII letter only. For example, if passed 235 - "LATIN
+** SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER
+** E"). The resuls of passing a codepoint that corresponds to an
+** uppercase letter are undefined.
+*/
+static int fts5_remove_diacritic(int c){
+ unsigned short aDia[] = {
+ 0, 1797, 1848, 1859, 1891, 1928, 1940, 1995,
+ 2024, 2040, 2060, 2110, 2168, 2206, 2264, 2286,
+ 2344, 2383, 2472, 2488, 2516, 2596, 2668, 2732,
+ 2782, 2842, 2894, 2954, 2984, 3000, 3028, 3336,
+ 3456, 3696, 3712, 3728, 3744, 3896, 3912, 3928,
+ 3968, 4008, 4040, 4106, 4138, 4170, 4202, 4234,
+ 4266, 4296, 4312, 4344, 4408, 4424, 4472, 4504,
+ 6148, 6198, 6264, 6280, 6360, 6429, 6505, 6529,
+ 61448, 61468, 61534, 61592, 61642, 61688, 61704, 61726,
+ 61784, 61800, 61836, 61880, 61914, 61948, 61998, 62122,
+ 62154, 62200, 62218, 62302, 62364, 62442, 62478, 62536,
+ 62554, 62584, 62604, 62640, 62648, 62656, 62664, 62730,
+ 62924, 63050, 63082, 63274, 63390,
+ };
+ char aChar[] = {
+ '\0', 'a', 'c', 'e', 'i', 'n', 'o', 'u', 'y', 'y', 'a', 'c',
+ 'd', 'e', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r',
+ 's', 't', 'u', 'u', 'w', 'y', 'z', 'o', 'u', 'a', 'i', 'o',
+ 'u', 'g', 'k', 'o', 'j', 'g', 'n', 'a', 'e', 'i', 'o', 'r',
+ 'u', 's', 't', 'h', 'a', 'e', 'o', 'y', '\0', '\0', '\0', '\0',
+ '\0', '\0', '\0', '\0', 'a', 'b', 'd', 'd', 'e', 'f', 'g', 'h',
+ 'h', 'i', 'k', 'l', 'l', 'm', 'n', 'p', 'r', 'r', 's', 't',
+ 'u', 'v', 'w', 'w', 'x', 'y', 'z', 'h', 't', 'w', 'y', 'a',
+ 'e', 'i', 'o', 'u', 'y',
+ };
+
+ unsigned int key = (((unsigned int)c)<<3) | 0x00000007;
+ int iRes = 0;
+ int iHi = sizeof(aDia)/sizeof(aDia[0]) - 1;
+ int iLo = 0;
+ while( iHi>=iLo ){
+ int iTest = (iHi + iLo) / 2;
+ if( key >= aDia[iTest] ){
+ iRes = iTest;
+ iLo = iTest+1;
+ }else{
+ iHi = iTest-1;
+ }
+ }
+ assert( key>=aDia[iRes] );
+ return ((c > (aDia[iRes]>>3) + (aDia[iRes]&0x07)) ? c : (int)aChar[iRes]);
+}
+
+
+/*
+** Return true if the argument interpreted as a unicode codepoint
+** is a diacritical modifier character.
+*/
+static int sqlite3Fts5UnicodeIsdiacritic(int c){
+ unsigned int mask0 = 0x08029FDF;
+ unsigned int mask1 = 0x000361F8;
+ if( c<768 || c>817 ) return 0;
+ return (c < 768+32) ?
+ (mask0 & (1 << (c-768))) :
+ (mask1 & (1 << (c-768-32)));
+}
+
+
+/*
+** Interpret the argument as a unicode codepoint. If the codepoint
+** is an upper case character that has a lower case equivalent,
+** return the codepoint corresponding to the lower case version.
+** Otherwise, return a copy of the argument.
+**
+** The results are undefined if the value passed to this function
+** is less than zero.
+*/
+static int sqlite3Fts5UnicodeFold(int c, int bRemoveDiacritic){
+ /* Each entry in the following array defines a rule for folding a range
+ ** of codepoints to lower case. The rule applies to a range of nRange
+ ** codepoints starting at codepoint iCode.
+ **
+ ** If the least significant bit in flags is clear, then the rule applies
+ ** to all nRange codepoints (i.e. all nRange codepoints are upper case and
+ ** need to be folded). Or, if it is set, then the rule only applies to
+ ** every second codepoint in the range, starting with codepoint C.
+ **
+ ** The 7 most significant bits in flags are an index into the aiOff[]
+ ** array. If a specific codepoint C does require folding, then its lower
+ ** case equivalent is ((C + aiOff[flags>>1]) & 0xFFFF).
+ **
+ ** The contents of this array are generated by parsing the CaseFolding.txt
+ ** file distributed as part of the "Unicode Character Database". See
+ ** http://www.unicode.org for details.
+ */
+ static const struct TableEntry {
+ unsigned short iCode;
+ unsigned char flags;
+ unsigned char nRange;
+ } aEntry[] = {
+ {65, 14, 26}, {181, 64, 1}, {192, 14, 23},
+ {216, 14, 7}, {256, 1, 48}, {306, 1, 6},
+ {313, 1, 16}, {330, 1, 46}, {376, 116, 1},
+ {377, 1, 6}, {383, 104, 1}, {385, 50, 1},
+ {386, 1, 4}, {390, 44, 1}, {391, 0, 1},
+ {393, 42, 2}, {395, 0, 1}, {398, 32, 1},
+ {399, 38, 1}, {400, 40, 1}, {401, 0, 1},
+ {403, 42, 1}, {404, 46, 1}, {406, 52, 1},
+ {407, 48, 1}, {408, 0, 1}, {412, 52, 1},
+ {413, 54, 1}, {415, 56, 1}, {416, 1, 6},
+ {422, 60, 1}, {423, 0, 1}, {425, 60, 1},
+ {428, 0, 1}, {430, 60, 1}, {431, 0, 1},
+ {433, 58, 2}, {435, 1, 4}, {439, 62, 1},
+ {440, 0, 1}, {444, 0, 1}, {452, 2, 1},
+ {453, 0, 1}, {455, 2, 1}, {456, 0, 1},
+ {458, 2, 1}, {459, 1, 18}, {478, 1, 18},
+ {497, 2, 1}, {498, 1, 4}, {502, 122, 1},
+ {503, 134, 1}, {504, 1, 40}, {544, 110, 1},
+ {546, 1, 18}, {570, 70, 1}, {571, 0, 1},
+ {573, 108, 1}, {574, 68, 1}, {577, 0, 1},
+ {579, 106, 1}, {580, 28, 1}, {581, 30, 1},
+ {582, 1, 10}, {837, 36, 1}, {880, 1, 4},
+ {886, 0, 1}, {902, 18, 1}, {904, 16, 3},
+ {908, 26, 1}, {910, 24, 2}, {913, 14, 17},
+ {931, 14, 9}, {962, 0, 1}, {975, 4, 1},
+ {976, 140, 1}, {977, 142, 1}, {981, 146, 1},
+ {982, 144, 1}, {984, 1, 24}, {1008, 136, 1},
+ {1009, 138, 1}, {1012, 130, 1}, {1013, 128, 1},
+ {1015, 0, 1}, {1017, 152, 1}, {1018, 0, 1},
+ {1021, 110, 3}, {1024, 34, 16}, {1040, 14, 32},
+ {1120, 1, 34}, {1162, 1, 54}, {1216, 6, 1},
+ {1217, 1, 14}, {1232, 1, 88}, {1329, 22, 38},
+ {4256, 66, 38}, {4295, 66, 1}, {4301, 66, 1},
+ {7680, 1, 150}, {7835, 132, 1}, {7838, 96, 1},
+ {7840, 1, 96}, {7944, 150, 8}, {7960, 150, 6},
+ {7976, 150, 8}, {7992, 150, 8}, {8008, 150, 6},
+ {8025, 151, 8}, {8040, 150, 8}, {8072, 150, 8},
+ {8088, 150, 8}, {8104, 150, 8}, {8120, 150, 2},
+ {8122, 126, 2}, {8124, 148, 1}, {8126, 100, 1},
+ {8136, 124, 4}, {8140, 148, 1}, {8152, 150, 2},
+ {8154, 120, 2}, {8168, 150, 2}, {8170, 118, 2},
+ {8172, 152, 1}, {8184, 112, 2}, {8186, 114, 2},
+ {8188, 148, 1}, {8486, 98, 1}, {8490, 92, 1},
+ {8491, 94, 1}, {8498, 12, 1}, {8544, 8, 16},
+ {8579, 0, 1}, {9398, 10, 26}, {11264, 22, 47},
+ {11360, 0, 1}, {11362, 88, 1}, {11363, 102, 1},
+ {11364, 90, 1}, {11367, 1, 6}, {11373, 84, 1},
+ {11374, 86, 1}, {11375, 80, 1}, {11376, 82, 1},
+ {11378, 0, 1}, {11381, 0, 1}, {11390, 78, 2},
+ {11392, 1, 100}, {11499, 1, 4}, {11506, 0, 1},
+ {42560, 1, 46}, {42624, 1, 24}, {42786, 1, 14},
+ {42802, 1, 62}, {42873, 1, 4}, {42877, 76, 1},
+ {42878, 1, 10}, {42891, 0, 1}, {42893, 74, 1},
+ {42896, 1, 4}, {42912, 1, 10}, {42922, 72, 1},
+ {65313, 14, 26},
+ };
+ static const unsigned short aiOff[] = {
+ 1, 2, 8, 15, 16, 26, 28, 32,
+ 37, 38, 40, 48, 63, 64, 69, 71,
+ 79, 80, 116, 202, 203, 205, 206, 207,
+ 209, 210, 211, 213, 214, 217, 218, 219,
+ 775, 7264, 10792, 10795, 23228, 23256, 30204, 54721,
+ 54753, 54754, 54756, 54787, 54793, 54809, 57153, 57274,
+ 57921, 58019, 58363, 61722, 65268, 65341, 65373, 65406,
+ 65408, 65410, 65415, 65424, 65436, 65439, 65450, 65462,
+ 65472, 65476, 65478, 65480, 65482, 65488, 65506, 65511,
+ 65514, 65521, 65527, 65528, 65529,
+ };
+
+ int ret = c;
+
+ assert( sizeof(unsigned short)==2 && sizeof(unsigned char)==1 );
+
+ if( c<128 ){
+ if( c>='A' && c<='Z' ) ret = c + ('a' - 'A');
+ }else if( c<65536 ){
+ const struct TableEntry *p;
+ int iHi = sizeof(aEntry)/sizeof(aEntry[0]) - 1;
+ int iLo = 0;
+ int iRes = -1;
+
+ assert( c>aEntry[0].iCode );
+ while( iHi>=iLo ){
+ int iTest = (iHi + iLo) / 2;
+ int cmp = (c - aEntry[iTest].iCode);
+ if( cmp>=0 ){
+ iRes = iTest;
+ iLo = iTest+1;
+ }else{
+ iHi = iTest-1;
+ }
+ }
+
+ assert( iRes>=0 && c>=aEntry[iRes].iCode );
+ p = &aEntry[iRes];
+ if( c<(p->iCode + p->nRange) && 0==(0x01 & p->flags & (p->iCode ^ c)) ){
+ ret = (c + (aiOff[p->flags>>1])) & 0x0000FFFF;
+ assert( ret>0 );
+ }
+
+ if( bRemoveDiacritic ) ret = fts5_remove_diacritic(ret);
+ }
+
+ else if( c>=66560 && c<66600 ){
+ ret = c + 40;
+ }
+
+ return ret;
+}
+
+/*
+** 2015 May 30
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** Routines for varint serialization and deserialization.
+*/
+
+
+
+/*
+** This is a copy of the sqlite3GetVarint32() routine from the SQLite core.
+** Except, this version does handle the single byte case that the core
+** version depends on being handled before its function is called.
+*/
+static int sqlite3Fts5GetVarint32(const unsigned char *p, u32 *v){
+ u32 a,b;
+
+ /* The 1-byte case. Overwhelmingly the most common. */
+ a = *p;
+ /* a: p0 (unmasked) */
+ if (!(a&0x80))
+ {
+ /* Values between 0 and 127 */
+ *v = a;
+ return 1;
+ }
+
+ /* The 2-byte case */
+ p++;
+ b = *p;
+ /* b: p1 (unmasked) */
+ if (!(b&0x80))
+ {
+ /* Values between 128 and 16383 */
+ a &= 0x7f;
+ a = a<<7;
+ *v = a | b;
+ return 2;
+ }
+
+ /* The 3-byte case */
+ p++;
+ a = a<<14;
+ a |= *p;
+ /* a: p0<<14 | p2 (unmasked) */
+ if (!(a&0x80))
+ {
+ /* Values between 16384 and 2097151 */
+ a &= (0x7f<<14)|(0x7f);
+ b &= 0x7f;
+ b = b<<7;
+ *v = a | b;
+ return 3;
+ }
+
+ /* A 32-bit varint is used to store size information in btrees.
+ ** Objects are rarely larger than 2MiB limit of a 3-byte varint.
+ ** A 3-byte varint is sufficient, for example, to record the size
+ ** of a 1048569-byte BLOB or string.
+ **
+ ** We only unroll the first 1-, 2-, and 3- byte cases. The very
+ ** rare larger cases can be handled by the slower 64-bit varint
+ ** routine.
+ */
+ {
+ u64 v64;
+ u8 n;
+ p -= 2;
+ n = sqlite3Fts5GetVarint(p, &v64);
+ *v = (u32)v64;
+ assert( n>3 && n<=9 );
+ return n;
+ }
+}
+
+
+/*
+** Bitmasks used by sqlite3GetVarint(). These precomputed constants
+** are defined here rather than simply putting the constant expressions
+** inline in order to work around bugs in the RVT compiler.
+**
+** SLOT_2_0 A mask for (0x7f<<14) | 0x7f
+**
+** SLOT_4_2_0 A mask for (0x7f<<28) | SLOT_2_0
+*/
+#define SLOT_2_0 0x001fc07f
+#define SLOT_4_2_0 0xf01fc07f
+
+/*
+** Read a 64-bit variable-length integer from memory starting at p[0].
+** Return the number of bytes read. The value is stored in *v.
+*/
+static u8 sqlite3Fts5GetVarint(const unsigned char *p, u64 *v){
+ u32 a,b,s;
+
+ a = *p;
+ /* a: p0 (unmasked) */
+ if (!(a&0x80))
+ {
+ *v = a;
+ return 1;
+ }
+
+ p++;
+ b = *p;
+ /* b: p1 (unmasked) */
+ if (!(b&0x80))
+ {
+ a &= 0x7f;
+ a = a<<7;
+ a |= b;
+ *v = a;
+ return 2;
+ }
+
+ /* Verify that constants are precomputed correctly */
+ assert( SLOT_2_0 == ((0x7f<<14) | (0x7f)) );
+ assert( SLOT_4_2_0 == ((0xfU<<28) | (0x7f<<14) | (0x7f)) );
+
+ p++;
+ a = a<<14;
+ a |= *p;
+ /* a: p0<<14 | p2 (unmasked) */
+ if (!(a&0x80))
+ {
+ a &= SLOT_2_0;
+ b &= 0x7f;
+ b = b<<7;
+ a |= b;
+ *v = a;
+ return 3;
+ }
+
+ /* CSE1 from below */
+ a &= SLOT_2_0;
+ p++;
+ b = b<<14;
+ b |= *p;
+ /* b: p1<<14 | p3 (unmasked) */
+ if (!(b&0x80))
+ {
+ b &= SLOT_2_0;
+ /* moved CSE1 up */
+ /* a &= (0x7f<<14)|(0x7f); */
+ a = a<<7;
+ a |= b;
+ *v = a;
+ return 4;
+ }
+
+ /* a: p0<<14 | p2 (masked) */
+ /* b: p1<<14 | p3 (unmasked) */
+ /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
+ /* moved CSE1 up */
+ /* a &= (0x7f<<14)|(0x7f); */
+ b &= SLOT_2_0;
+ s = a;
+ /* s: p0<<14 | p2 (masked) */
+
+ p++;
+ a = a<<14;
+ a |= *p;
+ /* a: p0<<28 | p2<<14 | p4 (unmasked) */
+ if (!(a&0x80))
+ {
+ /* we can skip these cause they were (effectively) done above in calc'ing s */
+ /* a &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
+ /* b &= (0x7f<<14)|(0x7f); */
+ b = b<<7;
+ a |= b;
+ s = s>>18;
+ *v = ((u64)s)<<32 | a;
+ return 5;
+ }
+
+ /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
+ s = s<<7;
+ s |= b;
+ /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
+
+ p++;
+ b = b<<14;
+ b |= *p;
+ /* b: p1<<28 | p3<<14 | p5 (unmasked) */
+ if (!(b&0x80))
+ {
+ /* we can skip this cause it was (effectively) done above in calc'ing s */
+ /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
+ a &= SLOT_2_0;
+ a = a<<7;
+ a |= b;
+ s = s>>18;
+ *v = ((u64)s)<<32 | a;
+ return 6;
+ }
+
+ p++;
+ a = a<<14;
+ a |= *p;
+ /* a: p2<<28 | p4<<14 | p6 (unmasked) */
+ if (!(a&0x80))
+ {
+ a &= SLOT_4_2_0;
+ b &= SLOT_2_0;
+ b = b<<7;
+ a |= b;
+ s = s>>11;
+ *v = ((u64)s)<<32 | a;
+ return 7;
+ }
+
+ /* CSE2 from below */
+ a &= SLOT_2_0;
+ p++;
+ b = b<<14;
+ b |= *p;
+ /* b: p3<<28 | p5<<14 | p7 (unmasked) */
+ if (!(b&0x80))
+ {
+ b &= SLOT_4_2_0;
+ /* moved CSE2 up */
+ /* a &= (0x7f<<14)|(0x7f); */
+ a = a<<7;
+ a |= b;
+ s = s>>4;
+ *v = ((u64)s)<<32 | a;
+ return 8;
+ }
+
+ p++;
+ a = a<<15;
+ a |= *p;
+ /* a: p4<<29 | p6<<15 | p8 (unmasked) */
+
+ /* moved CSE2 up */
+ /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */
+ b &= SLOT_2_0;
+ b = b<<8;
+ a |= b;
+
+ s = s<<4;
+ b = p[-4];
+ b &= 0x7f;
+ b = b>>3;
+ s |= b;
+
+ *v = ((u64)s)<<32 | a;
+
+ return 9;
+}
+
+/*
+** The variable-length integer encoding is as follows:
+**
+** KEY:
+** A = 0xxxxxxx 7 bits of data and one flag bit
+** B = 1xxxxxxx 7 bits of data and one flag bit
+** C = xxxxxxxx 8 bits of data
+**
+** 7 bits - A
+** 14 bits - BA
+** 21 bits - BBA
+** 28 bits - BBBA
+** 35 bits - BBBBA
+** 42 bits - BBBBBA
+** 49 bits - BBBBBBA
+** 56 bits - BBBBBBBA
+** 64 bits - BBBBBBBBC
+*/
+
+#ifdef SQLITE_NOINLINE
+# define FTS5_NOINLINE SQLITE_NOINLINE
+#else
+# define FTS5_NOINLINE
+#endif
+
+/*
+** Write a 64-bit variable-length integer to memory starting at p[0].
+** The length of data write will be between 1 and 9 bytes. The number
+** of bytes written is returned.
+**
+** A variable-length integer consists of the lower 7 bits of each byte
+** for all bytes that have the 8th bit set and one byte with the 8th
+** bit clear. Except, if we get to the 9th byte, it stores the full
+** 8 bits and is the last byte.
+*/
+static int FTS5_NOINLINE fts5PutVarint64(unsigned char *p, u64 v){
+ int i, j, n;
+ u8 buf[10];
+ if( v & (((u64)0xff000000)<<32) ){
+ p[8] = (u8)v;
+ v >>= 8;
+ for(i=7; i>=0; i--){
+ p[i] = (u8)((v & 0x7f) | 0x80);
+ v >>= 7;
+ }
+ return 9;
+ }
+ n = 0;
+ do{
+ buf[n++] = (u8)((v & 0x7f) | 0x80);
+ v >>= 7;
+ }while( v!=0 );
+ buf[0] &= 0x7f;
+ assert( n<=9 );
+ for(i=0, j=n-1; j>=0; j--, i++){
+ p[i] = buf[j];
+ }
+ return n;
+}
+
+static int sqlite3Fts5PutVarint(unsigned char *p, u64 v){
+ if( v<=0x7f ){
+ p[0] = v&0x7f;
+ return 1;
+ }
+ if( v<=0x3fff ){
+ p[0] = ((v>>7)&0x7f)|0x80;
+ p[1] = v&0x7f;
+ return 2;
+ }
+ return fts5PutVarint64(p,v);
+}
+
+
+static int sqlite3Fts5GetVarintLen(u32 iVal){
+ if( iVal<(1 << 7 ) ) return 1;
+ if( iVal<(1 << 14) ) return 2;
+ if( iVal<(1 << 21) ) return 3;
+ if( iVal<(1 << 28) ) return 4;
+ return 5;
+}
+
+
+/*
+** 2015 May 08
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This is an SQLite virtual table module implementing direct access to an
+** existing FTS5 index. The module may create several different types of
+** tables:
+**
+** col:
+** CREATE TABLE vocab(term, col, doc, cnt, PRIMARY KEY(term, col));
+**
+** One row for each term/column combination. The value of $doc is set to
+** the number of fts5 rows that contain at least one instance of term
+** $term within column $col. Field $cnt is set to the total number of
+** instances of term $term in column $col (in any row of the fts5 table).
+**
+** row:
+** CREATE TABLE vocab(term, doc, cnt, PRIMARY KEY(term));
+**
+** One row for each term in the database. The value of $doc is set to
+** the number of fts5 rows that contain at least one instance of term
+** $term. Field $cnt is set to the total number of instances of term
+** $term in the database.
+*/
+
+
+
+
+typedef struct Fts5VocabTable Fts5VocabTable;
+typedef struct Fts5VocabCursor Fts5VocabCursor;
+
+struct Fts5VocabTable {
+ sqlite3_vtab base;
+ char *zFts5Tbl; /* Name of fts5 table */
+ char *zFts5Db; /* Db containing fts5 table */
+ sqlite3 *db; /* Database handle */
+ Fts5Global *pGlobal; /* FTS5 global object for this database */
+ int eType; /* FTS5_VOCAB_COL or ROW */
+};
+
+struct Fts5VocabCursor {
+ sqlite3_vtab_cursor base;
+ sqlite3_stmt *pStmt; /* Statement holding lock on pIndex */
+ Fts5Index *pIndex; /* Associated FTS5 index */
+
+ int bEof; /* True if this cursor is at EOF */
+ Fts5IndexIter *pIter; /* Term/rowid iterator object */
+
+ /* These are used by 'col' tables only */
+ int nCol;
+ int iCol;
+ i64 *aCnt;
+ i64 *aDoc;
+
+ /* Output values */
+ i64 rowid; /* This table's current rowid value */
+ Fts5Buffer term; /* Current value of 'term' column */
+ i64 aVal[3]; /* Up to three columns left of 'term' */
+};
+
+#define FTS5_VOCAB_COL 0
+#define FTS5_VOCAB_ROW 1
+
+#define FTS5_VOCAB_COL_SCHEMA "term, col, doc, cnt"
+#define FTS5_VOCAB_ROW_SCHEMA "term, doc, cnt"
+
+/*
+** Translate a string containing an fts5vocab table type to an
+** FTS5_VOCAB_XXX constant. If successful, set *peType to the output
+** value and return SQLITE_OK. Otherwise, set *pzErr to an error message
+** and return SQLITE_ERROR.
+*/
+static int fts5VocabTableType(const char *zType, char **pzErr, int *peType){
+ int rc = SQLITE_OK;
+ char *zCopy = sqlite3Fts5Strndup(&rc, zType, -1);
+ if( rc==SQLITE_OK ){
+ sqlite3Fts5Dequote(zCopy);
+ if( sqlite3_stricmp(zCopy, "col")==0 ){
+ *peType = FTS5_VOCAB_COL;
+ }else
+
+ if( sqlite3_stricmp(zCopy, "row")==0 ){
+ *peType = FTS5_VOCAB_ROW;
+ }else
+ {
+ *pzErr = sqlite3_mprintf("fts5vocab: unknown table type: %Q", zCopy);
+ rc = SQLITE_ERROR;
+ }
+ sqlite3_free(zCopy);
+ }
+
+ return rc;
+}
+
+
+/*
+** The xDisconnect() virtual table method.
+*/
+static int fts5VocabDisconnectMethod(sqlite3_vtab *pVtab){
+ Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;
+ sqlite3_free(pTab);
+ return SQLITE_OK;
+}
+
+/*
+** The xDestroy() virtual table method.
+*/
+static int fts5VocabDestroyMethod(sqlite3_vtab *pVtab){
+ Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;
+ sqlite3_free(pTab);
+ return SQLITE_OK;
+}
+
+/*
+** This function is the implementation of both the xConnect and xCreate
+** methods of the FTS3 virtual table.
+**
+** The argv[] array contains the following:
+**
+** argv[0] -> module name ("fts5vocab")
+** argv[1] -> database name
+** argv[2] -> table name
+**
+** then:
+**
+** argv[3] -> name of fts5 table
+** argv[4] -> type of fts5vocab table
+**
+** or, for tables in the TEMP schema only.
+**
+** argv[3] -> name of fts5 tables database
+** argv[4] -> name of fts5 table
+** argv[5] -> type of fts5vocab table
+*/
+static int fts5VocabInitVtab(
+ sqlite3 *db, /* The SQLite database connection */
+ void *pAux, /* Pointer to Fts5Global object */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVTab, /* Write the resulting vtab structure here */
+ char **pzErr /* Write any error message here */
+){
+ const char *azSchema[] = {
+ "CREATE TABlE vocab(" FTS5_VOCAB_COL_SCHEMA ")",
+ "CREATE TABlE vocab(" FTS5_VOCAB_ROW_SCHEMA ")"
+ };
+
+ Fts5VocabTable *pRet = 0;
+ int rc = SQLITE_OK; /* Return code */
+ int bDb;
+
+ bDb = (argc==6 && strlen(argv[1])==4 && memcmp("temp", argv[1], 4)==0);
+
+ if( argc!=5 && bDb==0 ){
+ *pzErr = sqlite3_mprintf("wrong number of vtable arguments");
+ rc = SQLITE_ERROR;
+ }else{
+ int nByte; /* Bytes of space to allocate */
+ const char *zDb = bDb ? argv[3] : argv[1];
+ const char *zTab = bDb ? argv[4] : argv[3];
+ const char *zType = bDb ? argv[5] : argv[4];
+ int nDb = strlen(zDb)+1;
+ int nTab = strlen(zTab)+1;
+ int eType;
+
+ rc = fts5VocabTableType(zType, pzErr, &eType);
+ if( rc==SQLITE_OK ){
+ assert( eType>=0 && eType<sizeof(azSchema)/sizeof(azSchema[0]) );
+ rc = sqlite3_declare_vtab(db, azSchema[eType]);
+ }
+
+ nByte = sizeof(Fts5VocabTable) + nDb + nTab;
+ pRet = sqlite3Fts5MallocZero(&rc, nByte);
+ if( pRet ){
+ pRet->pGlobal = (Fts5Global*)pAux;
+ pRet->eType = eType;
+ pRet->db = db;
+ pRet->zFts5Tbl = (char*)&pRet[1];
+ pRet->zFts5Db = &pRet->zFts5Tbl[nTab];
+ memcpy(pRet->zFts5Tbl, zTab, nTab);
+ memcpy(pRet->zFts5Db, zDb, nDb);
+ sqlite3Fts5Dequote(pRet->zFts5Tbl);
+ sqlite3Fts5Dequote(pRet->zFts5Db);
+ }
+ }
+
+ *ppVTab = (sqlite3_vtab*)pRet;
+ return rc;
+}
+
+
+/*
+** The xConnect() and xCreate() methods for the virtual table. All the
+** work is done in function fts5VocabInitVtab().
+*/
+static int fts5VocabConnectMethod(
+ sqlite3 *db, /* Database connection */
+ void *pAux, /* Pointer to tokenizer hash table */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVtab, /* OUT: New sqlite3_vtab object */
+ char **pzErr /* OUT: sqlite3_malloc'd error message */
+){
+ return fts5VocabInitVtab(db, pAux, argc, argv, ppVtab, pzErr);
+}
+static int fts5VocabCreateMethod(
+ sqlite3 *db, /* Database connection */
+ void *pAux, /* Pointer to tokenizer hash table */
+ int argc, /* Number of elements in argv array */
+ const char * const *argv, /* xCreate/xConnect argument array */
+ sqlite3_vtab **ppVtab, /* OUT: New sqlite3_vtab object */
+ char **pzErr /* OUT: sqlite3_malloc'd error message */
+){
+ return fts5VocabInitVtab(db, pAux, argc, argv, ppVtab, pzErr);
+}
+
+/*
+** Implementation of the xBestIndex method.
+*/
+static int fts5VocabBestIndexMethod(
+ sqlite3_vtab *pVTab,
+ sqlite3_index_info *pInfo
+){
+ return SQLITE_OK;
+}
+
+/*
+** Implementation of xOpen method.
+*/
+static int fts5VocabOpenMethod(
+ sqlite3_vtab *pVTab,
+ sqlite3_vtab_cursor **ppCsr
+){
+ Fts5VocabTable *pTab = (Fts5VocabTable*)pVTab;
+ Fts5Index *pIndex = 0;
+ int nCol = 0;
+ Fts5VocabCursor *pCsr = 0;
+ int rc = SQLITE_OK;
+ sqlite3_stmt *pStmt = 0;
+ char *zSql = 0;
+ int nByte;
+
+ zSql = sqlite3Fts5Mprintf(&rc,
+ "SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'",
+ pTab->zFts5Tbl, pTab->zFts5Db, pTab->zFts5Tbl, pTab->zFts5Tbl
+ );
+ if( zSql ){
+ rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pStmt, 0);
+ }
+ sqlite3_free(zSql);
+ assert( rc==SQLITE_OK || pStmt==0 );
+ if( rc==SQLITE_ERROR ) rc = SQLITE_OK;
+
+ if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){
+ i64 iId = sqlite3_column_int64(pStmt, 0);
+ pIndex = sqlite3Fts5IndexFromCsrid(pTab->pGlobal, iId, &nCol);
+ }
+
+ if( rc==SQLITE_OK && pIndex==0 ){
+ rc = sqlite3_finalize(pStmt);
+ pStmt = 0;
+ if( rc==SQLITE_OK ){
+ pVTab->zErrMsg = sqlite3_mprintf(
+ "no such fts5 table: %s.%s", pTab->zFts5Db, pTab->zFts5Tbl
+ );
+ rc = SQLITE_ERROR;
+ }
+ }
+
+ nByte = nCol * sizeof(i64) * 2 + sizeof(Fts5VocabCursor);
+ pCsr = (Fts5VocabCursor*)sqlite3Fts5MallocZero(&rc, nByte);
+ if( pCsr ){
+ pCsr->pIndex = pIndex;
+ pCsr->pStmt = pStmt;
+ pCsr->nCol = nCol;
+ pCsr->aCnt = (i64*)&pCsr[1];
+ pCsr->aDoc = &pCsr->aCnt[nCol];
+ }else{
+ sqlite3_finalize(pStmt);
+ }
+
+ *ppCsr = (sqlite3_vtab_cursor*)pCsr;
+ return rc;
+}
+
+static void fts5VocabResetCursor(Fts5VocabCursor *pCsr){
+ pCsr->rowid = 0;
+ sqlite3Fts5IterClose(pCsr->pIter);
+ pCsr->pIter = 0;
+}
+
+/*
+** Close the cursor. For additional information see the documentation
+** on the xClose method of the virtual table interface.
+*/
+static int fts5VocabCloseMethod(sqlite3_vtab_cursor *pCursor){
+ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;
+ fts5VocabResetCursor(pCsr);
+ sqlite3Fts5BufferFree(&pCsr->term);
+ sqlite3_finalize(pCsr->pStmt);
+ sqlite3_free(pCsr);
+ return SQLITE_OK;
+}
+
+
+/*
+** Advance the cursor to the next row in the table.
+*/
+static int fts5VocabNextMethod(sqlite3_vtab_cursor *pCursor){
+ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;
+ Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;
+ int rc = SQLITE_OK;
+
+ pCsr->rowid++;
+
+ if( pTab->eType==FTS5_VOCAB_COL ){
+ for(pCsr->iCol++; pCsr->iCol<pCsr->nCol; pCsr->iCol++){
+ if( pCsr->aCnt[pCsr->iCol] ) break;
+ }
+ }
+
+ if( pTab->eType==FTS5_VOCAB_ROW || pCsr->iCol>=pCsr->nCol ){
+ if( sqlite3Fts5IterEof(pCsr->pIter) ){
+ pCsr->bEof = 1;
+ }else{
+ const char *zTerm;
+ int nTerm;
+
+ zTerm = sqlite3Fts5IterTerm(pCsr->pIter, &nTerm);
+ sqlite3Fts5BufferSet(&rc, &pCsr->term, nTerm, (const u8*)zTerm);
+ memset(pCsr->aVal, 0, sizeof(pCsr->aVal));
+ memset(pCsr->aCnt, 0, pCsr->nCol * sizeof(i64));
+ memset(pCsr->aDoc, 0, pCsr->nCol * sizeof(i64));
+ pCsr->iCol = 0;
+
+ assert( pTab->eType==FTS5_VOCAB_COL || pTab->eType==FTS5_VOCAB_ROW );
+ while( rc==SQLITE_OK ){
+ i64 dummy;
+ const u8 *pPos; int nPos; /* Position list */
+ i64 iPos = 0; /* 64-bit position read from poslist */
+ int iOff = 0; /* Current offset within position list */
+
+ rc = sqlite3Fts5IterPoslist(pCsr->pIter, 0, &pPos, &nPos, &dummy);
+ if( rc==SQLITE_OK ){
+ if( pTab->eType==FTS5_VOCAB_ROW ){
+ while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){
+ pCsr->aVal[1]++;
+ }
+ pCsr->aVal[0]++;
+ }else{
+ int iCol = -1;
+ while( 0==sqlite3Fts5PoslistNext64(pPos, nPos, &iOff, &iPos) ){
+ int ii = FTS5_POS2COLUMN(iPos);
+ pCsr->aCnt[ii]++;
+ if( iCol!=ii ){
+ pCsr->aDoc[ii]++;
+ iCol = ii;
+ }
+ }
+ }
+ rc = sqlite3Fts5IterNextScan(pCsr->pIter);
+ }
+ if( rc==SQLITE_OK ){
+ zTerm = sqlite3Fts5IterTerm(pCsr->pIter, &nTerm);
+ if( nTerm!=pCsr->term.n || memcmp(zTerm, pCsr->term.p, nTerm) ) break;
+ if( sqlite3Fts5IterEof(pCsr->pIter) ) break;
+ }
+ }
+ }
+ }
+
+ if( pCsr->bEof==0 && pTab->eType==FTS5_VOCAB_COL ){
+ while( pCsr->aCnt[pCsr->iCol]==0 ) pCsr->iCol++;
+ pCsr->aVal[0] = pCsr->iCol;
+ pCsr->aVal[1] = pCsr->aDoc[pCsr->iCol];
+ pCsr->aVal[2] = pCsr->aCnt[pCsr->iCol];
+ }
+ return rc;
+}
+
+/*
+** This is the xFilter implementation for the virtual table.
+*/
+static int fts5VocabFilterMethod(
+ sqlite3_vtab_cursor *pCursor, /* The cursor used for this query */
+ int idxNum, /* Strategy index */
+ const char *idxStr, /* Unused */
+ int nVal, /* Number of elements in apVal */
+ sqlite3_value **apVal /* Arguments for the indexing scheme */
+){
+ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;
+ int rc;
+ const int flags = FTS5INDEX_QUERY_SCAN;
+
+ fts5VocabResetCursor(pCsr);
+ rc = sqlite3Fts5IndexQuery(pCsr->pIndex, 0, 0, flags, 0, &pCsr->pIter);
+ if( rc==SQLITE_OK ){
+ rc = fts5VocabNextMethod(pCursor);
+ }
+
+ return rc;
+}
+
+/*
+** This is the xEof method of the virtual table. SQLite calls this
+** routine to find out if it has reached the end of a result set.
+*/
+static int fts5VocabEofMethod(sqlite3_vtab_cursor *pCursor){
+ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;
+ return pCsr->bEof;
+}
+
+static int fts5VocabColumnMethod(
+ sqlite3_vtab_cursor *pCursor, /* Cursor to retrieve value from */
+ sqlite3_context *pCtx, /* Context for sqlite3_result_xxx() calls */
+ int iCol /* Index of column to read value from */
+){
+ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;
+ switch( iCol ){
+ case 0: /* term */
+ sqlite3_result_text(
+ pCtx, (const char*)pCsr->term.p, pCsr->term.n, SQLITE_TRANSIENT
+ );
+ break;
+
+ default:
+ assert( iCol<4 && iCol>0 );
+ sqlite3_result_int64(pCtx, pCsr->aVal[iCol-1]);
+ break;
+ }
+ return SQLITE_OK;
+}
+
+/*
+** This is the xRowid method. The SQLite core calls this routine to
+** retrieve the rowid for the current row of the result set. The
+** rowid should be written to *pRowid.
+*/
+static int fts5VocabRowidMethod(
+ sqlite3_vtab_cursor *pCursor,
+ sqlite_int64 *pRowid
+){
+ Fts5VocabCursor *pCsr = (Fts5VocabCursor*)pCursor;
+ *pRowid = pCsr->rowid;
+ return SQLITE_OK;
+}
+
+static int sqlite3Fts5VocabInit(Fts5Global *pGlobal, sqlite3 *db){
+ static const sqlite3_module fts5Vocab = {
+ /* iVersion */ 2,
+ /* xCreate */ fts5VocabCreateMethod,
+ /* xConnect */ fts5VocabConnectMethod,
+ /* xBestIndex */ fts5VocabBestIndexMethod,
+ /* xDisconnect */ fts5VocabDisconnectMethod,
+ /* xDestroy */ fts5VocabDestroyMethod,
+ /* xOpen */ fts5VocabOpenMethod,
+ /* xClose */ fts5VocabCloseMethod,
+ /* xFilter */ fts5VocabFilterMethod,
+ /* xNext */ fts5VocabNextMethod,
+ /* xEof */ fts5VocabEofMethod,
+ /* xColumn */ fts5VocabColumnMethod,
+ /* xRowid */ fts5VocabRowidMethod,
+ /* xUpdate */ 0,
+ /* xBegin */ 0,
+ /* xSync */ 0,
+ /* xCommit */ 0,
+ /* xRollback */ 0,
+ /* xFindFunction */ 0,
+ /* xRename */ 0,
+ /* xSavepoint */ 0,
+ /* xRelease */ 0,
+ /* xRollbackTo */ 0,
+ };
+ void *p = (void*)pGlobal;
+
+ return sqlite3_create_module_v2(db, "fts5vocab", &fts5Vocab, p, 0);
+}
+
+
+
+
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */
+
+/************** End of fts5.c ************************************************/
diff --git a/ext/sqlite3/libsqlite/sqlite3.h b/ext/sqlite3/libsqlite/sqlite3.h
index d43b63c107..7cca0accfa 100644
--- a/ext/sqlite3/libsqlite/sqlite3.h
+++ b/ext/sqlite3/libsqlite/sqlite3.h
@@ -23,7 +23,7 @@
**
** The official C-language API documentation for SQLite is derived
** from comments in this file. This file is the authoritative source
-** on how SQLite interfaces are suppose to operate.
+** on how SQLite interfaces are supposed to operate.
**
** The name of this file under configuration management is "sqlite.h.in".
** The makefile makes some minor changes to this file (such as inserting
@@ -111,9 +111,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.8.10.2"
-#define SQLITE_VERSION_NUMBER 3008010
-#define SQLITE_SOURCE_ID "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4"
+#define SQLITE_VERSION "3.9.2"
+#define SQLITE_VERSION_NUMBER 3009002
+#define SQLITE_SOURCE_ID "2015-11-02 18:31:45 bda77dda9697c463c3d0704014d51627fceee328"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -124,7 +124,7 @@ extern "C" {
** but are associated with the library instead of the header file. ^(Cautious
** programmers might include assert() statements in their application to
** verify that values returned by these interfaces match the macros in
-** the header, and thus insure that the application is
+** the header, and thus ensure that the application is
** compiled with matching library and header files.
**
** <blockquote><pre>
@@ -374,7 +374,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
** Restrictions:
**
** <ul>
-** <li> The application must insure that the 1st parameter to sqlite3_exec()
+** <li> The application must ensure that the 1st parameter to sqlite3_exec()
** is a valid and open [database connection].
** <li> The application must not close the [database connection] specified by
** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
@@ -477,6 +477,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8))
#define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8))
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
+#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
@@ -963,6 +964,14 @@ struct sqlite3_io_methods {
** circumstances in order to fix a problem with priority inversion.
** Applications should <em>not</em> use this file-control.
**
+** <li>[[SQLITE_FCNTL_ZIPVFS]]
+** The [SQLITE_FCNTL_ZIPVFS] opcode is implemented by zipvfs only. All other
+** VFS should return SQLITE_NOTFOUND for this opcode.
+**
+** <li>[[SQLITE_FCNTL_RBU]]
+** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by
+** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for
+** this opcode.
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -988,6 +997,8 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_COMMIT_PHASETWO 22
#define SQLITE_FCNTL_WIN32_SET_HANDLE 23
#define SQLITE_FCNTL_WAL_BLOCK 24
+#define SQLITE_FCNTL_ZIPVFS 25
+#define SQLITE_FCNTL_RBU 26
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -1356,9 +1367,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
** applications and so this routine is usually not necessary. It is
** provided to support rare applications with unusual needs.
**
-** The sqlite3_config() interface is not threadsafe. The application
-** must insure that no other SQLite interfaces are invoked by other
-** threads while sqlite3_config() is running. Furthermore, sqlite3_config()
+** <b>The sqlite3_config() interface is not threadsafe. The application
+** must ensure that no other SQLite interfaces are invoked by other
+** threads while sqlite3_config() is running.</b>
+**
+** The sqlite3_config() interface
** may only be invoked prior to library initialization using
** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
@@ -3363,7 +3376,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
**
** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the
** [prepared statement] S has been stepped at least once using
-** [sqlite3_step(S)] but has not run to completion and/or has not
+** [sqlite3_step(S)] but has neither run to completion (returned
+** [SQLITE_DONE] from [sqlite3_step(S)]) nor
** been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S)
** interface returns false if S is a NULL pointer. If S is not a
** NULL pointer and is not a pointer to a valid [prepared statement]
@@ -3390,7 +3404,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
** Some interfaces require a protected sqlite3_value. Other interfaces
** will accept either a protected or an unprotected sqlite3_value.
** Every interface that accepts sqlite3_value arguments specifies
-** whether or not it requires a protected sqlite3_value.
+** whether or not it requires a protected sqlite3_value. The
+** [sqlite3_value_dup()] interface can be used to construct a new
+** protected sqlite3_value from an unprotected sqlite3_value.
**
** The terms "protected" and "unprotected" refer to whether or not
** a mutex is held. An internal mutex is held for a protected
@@ -3550,6 +3566,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char
void(*)(void*), unsigned char encoding);
SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
+SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
/*
** CAPI3REF: Number Of SQL Parameters
@@ -3613,7 +3630,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*,
**
** See also: [sqlite3_bind_blob|sqlite3_bind()],
** [sqlite3_bind_parameter_count()], and
-** [sqlite3_bind_parameter_index()].
+** [sqlite3_bind_parameter_name()].
*/
SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
@@ -3893,8 +3910,6 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** KEYWORDS: {column access functions}
** METHOD: sqlite3_stmt
**
-** These routines form the "result set" interface.
-**
** ^These routines return information about a single column of the current
** result row of a query. ^In every case the first argument is a pointer
** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
@@ -3954,13 +3969,14 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** even empty strings, are always zero-terminated. ^The return
** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
**
-** ^The object returned by [sqlite3_column_value()] is an
-** [unprotected sqlite3_value] object. An unprotected sqlite3_value object
-** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
+** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an
+** [unprotected sqlite3_value] object. In a multithreaded environment,
+** an unprotected sqlite3_value object may only be used safely with
+** [sqlite3_bind_value()] and [sqlite3_result_value()].
** If the [unprotected sqlite3_value] object returned by
** [sqlite3_column_value()] is used in any other way, including calls
** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
-** or [sqlite3_value_bytes()], then the behavior is undefined.
+** or [sqlite3_value_bytes()], the behavior is not threadsafe.
**
** These routines attempt to convert the value where appropriate. ^For
** example, if the internal representation is FLOAT and a text result
@@ -3991,12 +4007,6 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** </table>
** </blockquote>)^
**
-** The table above makes reference to standard C library functions atoi()
-** and atof(). SQLite does not really use these functions. It has its
-** own equivalent internal routines. The atoi() and atof() names are
-** used in the table for brevity and because they are familiar to most
-** C programmers.
-**
** Note that when type conversions occur, pointers returned by prior
** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
** sqlite3_column_text16() may be invalidated.
@@ -4021,7 +4031,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** of conversion are done in place when it is possible, but sometimes they
** are not possible and in those cases prior pointers are invalidated.
**
-** The safest and easiest to remember policy is to invoke these routines
+** The safest policy is to invoke these routines
** in one of the following ways:
**
** <ul>
@@ -4041,7 +4051,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** ^The pointers returned are valid until a type conversion occurs as
** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
** [sqlite3_finalize()] is called. ^The memory space used to hold strings
-** and BLOBs is freed automatically. Do <b>not</b> pass the pointers returned
+** and BLOBs is freed automatically. Do <em>not</em> pass the pointers returned
** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
** [sqlite3_free()].
**
@@ -4291,12 +4301,12 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi
#endif
/*
-** CAPI3REF: Obtaining SQL Function Parameter Values
+** CAPI3REF: Obtaining SQL Values
** METHOD: sqlite3_value
**
** The C-language implementation of SQL functions and aggregates uses
** this set of interface routines to access the parameter values on
-** the function or aggregate.
+** the function or aggregate.
**
** The xFunc (for scalar functions) or xStep (for aggregates) parameters
** to [sqlite3_create_function()] and [sqlite3_create_function16()]
@@ -4350,6 +4360,39 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
/*
+** CAPI3REF: Finding The Subtype Of SQL Values
+** METHOD: sqlite3_value
+**
+** The sqlite3_value_subtype(V) function returns the subtype for
+** an [application-defined SQL function] argument V. The subtype
+** information can be used to pass a limited amount of context from
+** one SQL function to another. Use the [sqlite3_result_subtype()]
+** routine to set the subtype for the return value of an SQL function.
+**
+** SQLite makes no use of subtype itself. It merely passes the subtype
+** from the result of one [application-defined SQL function] into the
+** input of another.
+*/
+SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
+
+/*
+** CAPI3REF: Copy And Free SQL Values
+** METHOD: sqlite3_value
+**
+** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
+** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
+** is a [protected sqlite3_value] object even if the input is not.
+** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
+** memory allocation fails.
+**
+** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object
+** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
+** then sqlite3_value_free(V) is a harmless no-op.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
+SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
+
+/*
** CAPI3REF: Obtain Aggregate Function Context
** METHOD: sqlite3_context
**
@@ -4512,9 +4555,9 @@ typedef void (*sqlite3_destructor_type)(void*);
** to by the second parameter and which is N bytes long where N is the
** third parameter.
**
-** ^The sqlite3_result_zeroblob() interfaces set the result of
-** the application-defined function to be a BLOB containing all zero
-** bytes and N bytes in size, where N is the value of the 2nd parameter.
+** ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N)
+** interfaces set the result of the application-defined function to be
+** a BLOB containing all zero bytes and N bytes in size.
**
** ^The sqlite3_result_double() interface sets the result from
** an application-defined function to be a floating point value specified
@@ -4596,7 +4639,7 @@ typedef void (*sqlite3_destructor_type)(void*);
** from [sqlite3_malloc()] before it returns.
**
** ^The sqlite3_result_value() interface sets the result of
-** the application-defined function to be a copy the
+** the application-defined function to be a copy of the
** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The
** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
** so that the [sqlite3_value] specified in the parameter may change or
@@ -4629,6 +4672,22 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const v
SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
+SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
+
+
+/*
+** CAPI3REF: Setting The Subtype Of An SQL Function
+** METHOD: sqlite3_context
+**
+** The sqlite3_result_subtype(C,T) function causes the subtype of
+** the result from the [application-defined SQL function] with
+** [sqlite3_context] C to be the value T. Only the lower 8 bits
+** of the subtype T are preserved in current versions of SQLite;
+** higher order bits are discarded.
+** The number of subtype bytes preserved by SQLite might increase
+** in future releases of SQLite.
+*/
+SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
/*
** CAPI3REF: Define New Collating Sequences
@@ -5575,13 +5634,31 @@ struct sqlite3_module {
** ^The estimatedRows value is an estimate of the number of rows that
** will be returned by the strategy.
**
+** The xBestIndex method may optionally populate the idxFlags field with a
+** mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
+** SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
+** assumes that the strategy may visit at most one row.
+**
+** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
+** SQLite also assumes that if a call to the xUpdate() method is made as
+** part of the same statement to delete or update a virtual table row and the
+** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback
+** any database changes. In other words, if the xUpdate() returns
+** SQLITE_CONSTRAINT, the database contents must be exactly as they were
+** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not
+** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by
+** the xUpdate method are automatically rolled back by SQLite.
+**
** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
** structure for SQLite version 3.8.2. If a virtual table extension is
** used with an SQLite version earlier than 3.8.2, the results of attempting
** to read or write the estimatedRows field are undefined (but are likely
** to included crashing the application). The estimatedRows field should
** therefore only be used if [sqlite3_libversion_number()] returns a
-** value greater than or equal to 3008002.
+** value greater than or equal to 3008002. Similarly, the idxFlags field
+** was added for version 3.9.0. It may therefore only be used if
+** sqlite3_libversion_number() returns a value greater than or equal to
+** 3009000.
*/
struct sqlite3_index_info {
/* Inputs */
@@ -5609,9 +5686,16 @@ struct sqlite3_index_info {
double estimatedCost; /* Estimated cost of using this index */
/* Fields below are only available in SQLite 3.8.2 and later */
sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
+ /* Fields below are only available in SQLite 3.9.0 and later */
+ int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
};
/*
+** CAPI3REF: Virtual Table Scan Flags
+*/
+#define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
+
+/*
** CAPI3REF: Virtual Table Constraint Operator Codes
**
** These macros defined the allowed values for the
@@ -5872,7 +5956,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
**
** ^This function sets the database handle error code and message.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
+SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
/*
** CAPI3REF: Close A BLOB Handle
@@ -6068,6 +6152,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
** <li> SQLITE_MUTEX_STATIC_APP1
** <li> SQLITE_MUTEX_STATIC_APP2
** <li> SQLITE_MUTEX_STATIC_APP3
+** <li> SQLITE_MUTEX_STATIC_VFS1
+** <li> SQLITE_MUTEX_STATIC_VFS2
+** <li> SQLITE_MUTEX_STATIC_VFS3
** </ul>
**
** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
@@ -6269,6 +6356,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
#define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
#define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
#define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
+#define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
+#define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
+#define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
/*
** CAPI3REF: Retrieve the mutex for a database connection
@@ -7682,7 +7772,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
**
** See also: [sqlite3_stmt_scanstatus_reset()]
*/
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_stmt_scanstatus(
+SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
@@ -7698,7 +7788,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_stmt_scanstatus(
** This API is only available if the library is built with pre-processor
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
*/
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
+SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
/*
@@ -7813,6 +7903,8 @@ struct sqlite3_rtree_query_info {
int eParentWithin; /* Visibility of parent node */
int eWithin; /* OUT: Visiblity */
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
+ /* The following fields are only available in 3.8.11 and later */
+ sqlite3_value **apSqlParam; /* Original SQL values of parameters */
};
/*
@@ -7829,3 +7921,523 @@ struct sqlite3_rtree_query_info {
#endif /* ifndef _SQLITE3RTREE_H_ */
+/*
+** 2014 May 31
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** Interfaces to extend FTS5. Using the interfaces defined in this file,
+** FTS5 may be extended with:
+**
+** * custom tokenizers, and
+** * custom auxiliary functions.
+*/
+
+
+#ifndef _FTS5_H
+#define _FTS5_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*************************************************************************
+** CUSTOM AUXILIARY FUNCTIONS
+**
+** Virtual table implementations may overload SQL functions by implementing
+** the sqlite3_module.xFindFunction() method.
+*/
+
+typedef struct Fts5ExtensionApi Fts5ExtensionApi;
+typedef struct Fts5Context Fts5Context;
+typedef struct Fts5PhraseIter Fts5PhraseIter;
+
+typedef void (*fts5_extension_function)(
+ const Fts5ExtensionApi *pApi, /* API offered by current FTS version */
+ Fts5Context *pFts, /* First arg to pass to pApi functions */
+ sqlite3_context *pCtx, /* Context for returning result/error */
+ int nVal, /* Number of values in apVal[] array */
+ sqlite3_value **apVal /* Array of trailing arguments */
+);
+
+struct Fts5PhraseIter {
+ const unsigned char *a;
+ const unsigned char *b;
+};
+
+/*
+** EXTENSION API FUNCTIONS
+**
+** xUserData(pFts):
+** Return a copy of the context pointer the extension function was
+** registered with.
+**
+** xColumnTotalSize(pFts, iCol, pnToken):
+** If parameter iCol is less than zero, set output variable *pnToken
+** to the total number of tokens in the FTS5 table. Or, if iCol is
+** non-negative but less than the number of columns in the table, return
+** the total number of tokens in column iCol, considering all rows in
+** the FTS5 table.
+**
+** If parameter iCol is greater than or equal to the number of columns
+** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.
+** an OOM condition or IO error), an appropriate SQLite error code is
+** returned.
+**
+** xColumnCount(pFts):
+** Return the number of columns in the table.
+**
+** xColumnSize(pFts, iCol, pnToken):
+** If parameter iCol is less than zero, set output variable *pnToken
+** to the total number of tokens in the current row. Or, if iCol is
+** non-negative but less than the number of columns in the table, set
+** *pnToken to the number of tokens in column iCol of the current row.
+**
+** If parameter iCol is greater than or equal to the number of columns
+** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g.
+** an OOM condition or IO error), an appropriate SQLite error code is
+** returned.
+**
+** xColumnText:
+** This function attempts to retrieve the text of column iCol of the
+** current document. If successful, (*pz) is set to point to a buffer
+** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
+** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
+** if an error occurs, an SQLite error code is returned and the final values
+** of (*pz) and (*pn) are undefined.
+**
+** xPhraseCount:
+** Returns the number of phrases in the current query expression.
+**
+** xPhraseSize:
+** Returns the number of tokens in phrase iPhrase of the query. Phrases
+** are numbered starting from zero.
+**
+** xInstCount:
+** Set *pnInst to the total number of occurrences of all phrases within
+** the query within the current row. Return SQLITE_OK if successful, or
+** an error code (i.e. SQLITE_NOMEM) if an error occurs.
+**
+** xInst:
+** Query for the details of phrase match iIdx within the current row.
+** Phrase matches are numbered starting from zero, so the iIdx argument
+** should be greater than or equal to zero and smaller than the value
+** output by xInstCount().
+**
+** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM)
+** if an error occurs.
+**
+** xRowid:
+** Returns the rowid of the current row.
+**
+** xTokenize:
+** Tokenize text using the tokenizer belonging to the FTS5 table.
+**
+** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback):
+** This API function is used to query the FTS table for phrase iPhrase
+** of the current query. Specifically, a query equivalent to:
+**
+** ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid
+**
+** with $p set to a phrase equivalent to the phrase iPhrase of the
+** current query is executed. For each row visited, the callback function
+** passed as the fourth argument is invoked. The context and API objects
+** passed to the callback function may be used to access the properties of
+** each matched row. Invoking Api.xUserData() returns a copy of the pointer
+** passed as the third argument to pUserData.
+**
+** If the callback function returns any value other than SQLITE_OK, the
+** query is abandoned and the xQueryPhrase function returns immediately.
+** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.
+** Otherwise, the error code is propagated upwards.
+**
+** If the query runs to completion without incident, SQLITE_OK is returned.
+** Or, if some error occurs before the query completes or is aborted by
+** the callback, an SQLite error code is returned.
+**
+**
+** xSetAuxdata(pFts5, pAux, xDelete)
+**
+** Save the pointer passed as the second argument as the extension functions
+** "auxiliary data". The pointer may then be retrieved by the current or any
+** future invocation of the same fts5 extension function made as part of
+** of the same MATCH query using the xGetAuxdata() API.
+**
+** Each extension function is allocated a single auxiliary data slot for
+** each FTS query (MATCH expression). If the extension function is invoked
+** more than once for a single FTS query, then all invocations share a
+** single auxiliary data context.
+**
+** If there is already an auxiliary data pointer when this function is
+** invoked, then it is replaced by the new pointer. If an xDelete callback
+** was specified along with the original pointer, it is invoked at this
+** point.
+**
+** The xDelete callback, if one is specified, is also invoked on the
+** auxiliary data pointer after the FTS5 query has finished.
+**
+** If an error (e.g. an OOM condition) occurs within this function, an
+** the auxiliary data is set to NULL and an error code returned. If the
+** xDelete parameter was not NULL, it is invoked on the auxiliary data
+** pointer before returning.
+**
+**
+** xGetAuxdata(pFts5, bClear)
+**
+** Returns the current auxiliary data pointer for the fts5 extension
+** function. See the xSetAuxdata() method for details.
+**
+** If the bClear argument is non-zero, then the auxiliary data is cleared
+** (set to NULL) before this function returns. In this case the xDelete,
+** if any, is not invoked.
+**
+**
+** xRowCount(pFts5, pnRow)
+**
+** This function is used to retrieve the total number of rows in the table.
+** In other words, the same value that would be returned by:
+**
+** SELECT count(*) FROM ftstable;
+**
+** xPhraseFirst()
+** This function is used, along with type Fts5PhraseIter and the xPhraseNext
+** method, to iterate through all instances of a single query phrase within
+** the current row. This is the same information as is accessible via the
+** xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient
+** to use, this API may be faster under some circumstances. To iterate
+** through instances of phrase iPhrase, use the following code:
+**
+** Fts5PhraseIter iter;
+** int iCol, iOff;
+** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);
+** iOff>=0;
+** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)
+** ){
+** // An instance of phrase iPhrase at offset iOff of column iCol
+** }
+**
+** The Fts5PhraseIter structure is defined above. Applications should not
+** modify this structure directly - it should only be used as shown above
+** with the xPhraseFirst() and xPhraseNext() API methods.
+**
+** xPhraseNext()
+** See xPhraseFirst above.
+*/
+struct Fts5ExtensionApi {
+ int iVersion; /* Currently always set to 1 */
+
+ void *(*xUserData)(Fts5Context*);
+
+ int (*xColumnCount)(Fts5Context*);
+ int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow);
+ int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken);
+
+ int (*xTokenize)(Fts5Context*,
+ const char *pText, int nText, /* Text to tokenize */
+ void *pCtx, /* Context passed to xToken() */
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
+ );
+
+ int (*xPhraseCount)(Fts5Context*);
+ int (*xPhraseSize)(Fts5Context*, int iPhrase);
+
+ int (*xInstCount)(Fts5Context*, int *pnInst);
+ int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff);
+
+ sqlite3_int64 (*xRowid)(Fts5Context*);
+ int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn);
+ int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken);
+
+ int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData,
+ int(*)(const Fts5ExtensionApi*,Fts5Context*,void*)
+ );
+ int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
+ void *(*xGetAuxdata)(Fts5Context*, int bClear);
+
+ void (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
+ void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
+};
+
+/*
+** CUSTOM AUXILIARY FUNCTIONS
+*************************************************************************/
+
+/*************************************************************************
+** CUSTOM TOKENIZERS
+**
+** Applications may also register custom tokenizer types. A tokenizer
+** is registered by providing fts5 with a populated instance of the
+** following structure. All structure methods must be defined, setting
+** any member of the fts5_tokenizer struct to NULL leads to undefined
+** behaviour. The structure methods are expected to function as follows:
+**
+** xCreate:
+** This function is used to allocate and inititalize a tokenizer instance.
+** A tokenizer instance is required to actually tokenize text.
+**
+** The first argument passed to this function is a copy of the (void*)
+** pointer provided by the application when the fts5_tokenizer object
+** was registered with FTS5 (the third argument to xCreateTokenizer()).
+** The second and third arguments are an array of nul-terminated strings
+** containing the tokenizer arguments, if any, specified following the
+** tokenizer name as part of the CREATE VIRTUAL TABLE statement used
+** to create the FTS5 table.
+**
+** The final argument is an output variable. If successful, (*ppOut)
+** should be set to point to the new tokenizer handle and SQLITE_OK
+** returned. If an error occurs, some value other than SQLITE_OK should
+** be returned. In this case, fts5 assumes that the final value of *ppOut
+** is undefined.
+**
+** xDelete:
+** This function is invoked to delete a tokenizer handle previously
+** allocated using xCreate(). Fts5 guarantees that this function will
+** be invoked exactly once for each successful call to xCreate().
+**
+** xTokenize:
+** This function is expected to tokenize the nText byte string indicated
+** by argument pText. pText may or may not be nul-terminated. The first
+** argument passed to this function is a pointer to an Fts5Tokenizer object
+** returned by an earlier call to xCreate().
+**
+** The second argument indicates the reason that FTS5 is requesting
+** tokenization of the supplied text. This is always one of the following
+** four values:
+**
+** <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into
+** or removed from the FTS table. The tokenizer is being invoked to
+** determine the set of tokens to add to (or delete from) the
+** FTS index.
+**
+** <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed
+** against the FTS index. The tokenizer is being called to tokenize
+** a bareword or quoted string specified as part of the query.
+**
+** <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as
+** FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is
+** followed by a "*" character, indicating that the last token
+** returned by the tokenizer will be treated as a token prefix.
+**
+** <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to
+** satisfy an fts5_api.xTokenize() request made by an auxiliary
+** function. Or an fts5_api.xColumnSize() request made by the same
+** on a columnsize=0 database.
+** </ul>
+**
+** For each token in the input string, the supplied callback xToken() must
+** be invoked. The first argument to it should be a copy of the pointer
+** passed as the second argument to xTokenize(). The third and fourth
+** arguments are a pointer to a buffer containing the token text, and the
+** size of the token in bytes. The 4th and 5th arguments are the byte offsets
+** of the first byte of and first byte immediately following the text from
+** which the token is derived within the input.
+**
+** The second argument passed to the xToken() callback ("tflags") should
+** normally be set to 0. The exception is if the tokenizer supports
+** synonyms. In this case see the discussion below for details.
+**
+** FTS5 assumes the xToken() callback is invoked for each token in the
+** order that they occur within the input text.
+**
+** If an xToken() callback returns any value other than SQLITE_OK, then
+** the tokenization should be abandoned and the xTokenize() method should
+** immediately return a copy of the xToken() return value. Or, if the
+** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,
+** if an error occurs with the xTokenize() implementation itself, it
+** may abandon the tokenization and return any error code other than
+** SQLITE_OK or SQLITE_DONE.
+**
+** SYNONYM SUPPORT
+**
+** Custom tokenizers may also support synonyms. Consider a case in which a
+** user wishes to query for a phrase such as "first place". Using the
+** built-in tokenizers, the FTS5 query 'first + place' will match instances
+** of "first place" within the document set, but not alternative forms
+** such as "1st place". In some applications, it would be better to match
+** all instances of "first place" or "1st place" regardless of which form
+** the user specified in the MATCH query text.
+**
+** There are several ways to approach this in FTS5:
+**
+** <ol><li> By mapping all synonyms to a single token. In this case, the
+** In the above example, this means that the tokenizer returns the
+** same token for inputs "first" and "1st". Say that token is in
+** fact "first", so that when the user inserts the document "I won
+** 1st place" entries are added to the index for tokens "i", "won",
+** "first" and "place". If the user then queries for '1st + place',
+** the tokenizer substitutes "first" for "1st" and the query works
+** as expected.
+**
+** <li> By adding multiple synonyms for a single term to the FTS index.
+** In this case, when tokenizing query text, the tokenizer may
+** provide multiple synonyms for a single term within the document.
+** FTS5 then queries the index for each synonym individually. For
+** example, faced with the query:
+**
+** <codeblock>
+** ... MATCH 'first place'</codeblock>
+**
+** the tokenizer offers both "1st" and "first" as synonyms for the
+** first token in the MATCH query and FTS5 effectively runs a query
+** similar to:
+**
+** <codeblock>
+** ... MATCH '(first OR 1st) place'</codeblock>
+**
+** except that, for the purposes of auxiliary functions, the query
+** still appears to contain just two phrases - "(first OR 1st)"
+** being treated as a single phrase.
+**
+** <li> By adding multiple synonyms for a single term to the FTS index.
+** Using this method, when tokenizing document text, the tokenizer
+** provides multiple synonyms for each token. So that when a
+** document such as "I won first place" is tokenized, entries are
+** added to the FTS index for "i", "won", "first", "1st" and
+** "place".
+**
+** This way, even if the tokenizer does not provide synonyms
+** when tokenizing query text (it should not - to do would be
+** inefficient), it doesn't matter if the user queries for
+** 'first + place' or '1st + place', as there are entires in the
+** FTS index corresponding to both forms of the first token.
+** </ol>
+**
+** Whether it is parsing document or query text, any call to xToken that
+** specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit
+** is considered to supply a synonym for the previous token. For example,
+** when parsing the document "I won first place", a tokenizer that supports
+** synonyms would call xToken() 5 times, as follows:
+**
+** <codeblock>
+** xToken(pCtx, 0, "i", 1, 0, 1);
+** xToken(pCtx, 0, "won", 3, 2, 5);
+** xToken(pCtx, 0, "first", 5, 6, 11);
+** xToken(pCtx, FTS5_TOKEN_COLOCATED, "1st", 3, 6, 11);
+** xToken(pCtx, 0, "place", 5, 12, 17);
+**</codeblock>
+**
+** It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time
+** xToken() is called. Multiple synonyms may be specified for a single token
+** by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence.
+** There is no limit to the number of synonyms that may be provided for a
+** single token.
+**
+** In many cases, method (1) above is the best approach. It does not add
+** extra data to the FTS index or require FTS5 to query for multiple terms,
+** so it is efficient in terms of disk space and query speed. However, it
+** does not support prefix queries very well. If, as suggested above, the
+** token "first" is subsituted for "1st" by the tokenizer, then the query:
+**
+** <codeblock>
+** ... MATCH '1s*'</codeblock>
+**
+** will not match documents that contain the token "1st" (as the tokenizer
+** will probably not map "1s" to any prefix of "first").
+**
+** For full prefix support, method (3) may be preferred. In this case,
+** because the index contains entries for both "first" and "1st", prefix
+** queries such as 'fi*' or '1s*' will match correctly. However, because
+** extra entries are added to the FTS index, this method uses more space
+** within the database.
+**
+** Method (2) offers a midpoint between (1) and (3). Using this method,
+** a query such as '1s*' will match documents that contain the literal
+** token "1st", but not "first" (assuming the tokenizer is not able to
+** provide synonyms for prefixes). However, a non-prefix query like '1st'
+** will match against "1st" and "first". This method does not require
+** extra disk space, as no extra entries are added to the FTS index.
+** On the other hand, it may require more CPU cycles to run MATCH queries,
+** as separate queries of the FTS index are required for each synonym.
+**
+** When using methods (2) or (3), it is important that the tokenizer only
+** provide synonyms when tokenizing document text (method (2)) or query
+** text (method (3)), not both. Doing so will not cause any errors, but is
+** inefficient.
+*/
+typedef struct Fts5Tokenizer Fts5Tokenizer;
+typedef struct fts5_tokenizer fts5_tokenizer;
+struct fts5_tokenizer {
+ int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
+ void (*xDelete)(Fts5Tokenizer*);
+ int (*xTokenize)(Fts5Tokenizer*,
+ void *pCtx,
+ int flags, /* Mask of FTS5_TOKENIZE_* flags */
+ const char *pText, int nText,
+ int (*xToken)(
+ void *pCtx, /* Copy of 2nd argument to xTokenize() */
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
+ const char *pToken, /* Pointer to buffer containing token */
+ int nToken, /* Size of token in bytes */
+ int iStart, /* Byte offset of token within input text */
+ int iEnd /* Byte offset of end of token within input text */
+ )
+ );
+};
+
+/* Flags that may be passed as the third argument to xTokenize() */
+#define FTS5_TOKENIZE_QUERY 0x0001
+#define FTS5_TOKENIZE_PREFIX 0x0002
+#define FTS5_TOKENIZE_DOCUMENT 0x0004
+#define FTS5_TOKENIZE_AUX 0x0008
+
+/* Flags that may be passed by the tokenizer implementation back to FTS5
+** as the third argument to the supplied xToken callback. */
+#define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */
+
+/*
+** END OF CUSTOM TOKENIZERS
+*************************************************************************/
+
+/*************************************************************************
+** FTS5 EXTENSION REGISTRATION API
+*/
+typedef struct fts5_api fts5_api;
+struct fts5_api {
+ int iVersion; /* Currently always set to 2 */
+
+ /* Create a new tokenizer */
+ int (*xCreateTokenizer)(
+ fts5_api *pApi,
+ const char *zName,
+ void *pContext,
+ fts5_tokenizer *pTokenizer,
+ void (*xDestroy)(void*)
+ );
+
+ /* Find an existing tokenizer */
+ int (*xFindTokenizer)(
+ fts5_api *pApi,
+ const char *zName,
+ void **ppContext,
+ fts5_tokenizer *pTokenizer
+ );
+
+ /* Create a new auxiliary function */
+ int (*xCreateFunction)(
+ fts5_api *pApi,
+ const char *zName,
+ void *pContext,
+ fts5_extension_function xFunction,
+ void (*xDestroy)(void*)
+ );
+};
+
+/*
+** END OF REGISTRATION API
+*************************************************************************/
+
+#ifdef __cplusplus
+} /* end of the 'extern "C"' block */
+#endif
+
+#endif /* _FTS5_H */
+
+
diff --git a/ext/sqlite3/libsqlite/sqlite3ext.h b/ext/sqlite3/libsqlite/sqlite3ext.h
index f9a066592d..017ea308b1 100644
--- a/ext/sqlite3/libsqlite/sqlite3ext.h
+++ b/ext/sqlite3/libsqlite/sqlite3ext.h
@@ -267,6 +267,14 @@ struct sqlite3_api_routines {
void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
void(*)(void*), unsigned char);
int (*strglob)(const char*,const char*);
+ /* Version 3.8.11 and later */
+ sqlite3_value *(*value_dup)(const sqlite3_value*);
+ void (*value_free)(sqlite3_value*);
+ int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
+ int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
+ /* Version 3.9.0 and later */
+ unsigned int (*value_subtype)(sqlite3_value*);
+ void (*result_subtype)(sqlite3_context*,unsigned int);
};
/*
@@ -280,7 +288,7 @@ struct sqlite3_api_routines {
** the API. So the redefinition macros are only valid if the
** SQLITE_CORE macros is undefined.
*/
-#ifndef SQLITE_CORE
+#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
@@ -407,6 +415,7 @@ struct sqlite3_api_routines {
#define sqlite3_value_text16le sqlite3_api->value_text16le
#define sqlite3_value_type sqlite3_api->value_type
#define sqlite3_vmprintf sqlite3_api->vmprintf
+#define sqlite3_vsnprintf sqlite3_api->vsnprintf
#define sqlite3_overload_function sqlite3_api->overload_function
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
@@ -497,9 +506,17 @@ struct sqlite3_api_routines {
#define sqlite3_result_blob64 sqlite3_api->result_blob64
#define sqlite3_result_text64 sqlite3_api->result_text64
#define sqlite3_strglob sqlite3_api->strglob
-#endif /* SQLITE_CORE */
+/* Version 3.8.11 and later */
+#define sqlite3_value_dup sqlite3_api->value_dup
+#define sqlite3_value_free sqlite3_api->value_free
+#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
+#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
+/* Version 3.9.0 and later */
+#define sqlite3_value_subtype sqlite3_api->value_subtype
+#define sqlite3_result_subtype sqlite3_api->result_subtype
+#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
-#ifndef SQLITE_CORE
+#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
/* This case when the file really is being compiled as a loadable
** extension */
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
diff --git a/ext/sqlite3/php_sqlite3.h b/ext/sqlite3/php_sqlite3.h
index 42752b47db..c93a18d17c 100644
--- a/ext/sqlite3/php_sqlite3.h
+++ b/ext/sqlite3/php_sqlite3.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@ ZEND_END_MODULE_GLOBALS(sqlite3)
#ifdef ZTS
# define SQLITE3G(v) TSRMG(sqlite3_globals_id, zend_sqlite3_globals *, v)
# ifdef COMPILE_DL_SQLITE3
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
# endif
#else
# define SQLITE3G(v) (sqlite3_globals.v)
diff --git a/ext/sqlite3/php_sqlite3_structs.h b/ext/sqlite3/php_sqlite3_structs.h
index 690e33517d..bb5ac66d1b 100644
--- a/ext/sqlite3/php_sqlite3_structs.h
+++ b/ext/sqlite3/php_sqlite3_structs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index eacd66399e..d7f7722959 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -117,20 +117,13 @@ PHP_METHOD(sqlite3, open)
if (strlen(filename) != filename_len) {
return;
}
- if (memcmp(filename, ":memory:", sizeof(":memory:")) != 0) {
+ if (filename_len != sizeof(":memory:")-1 ||
+ memcmp(filename, ":memory:", sizeof(":memory:")-1) != 0) {
if (!(fullpath = expand_filepath(filename, NULL))) {
zend_throw_exception(zend_ce_exception, "Unable to expand filepath", 0);
return;
}
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
- zend_throw_exception_ex(zend_ce_exception, 0, "safe_mode prohibits opening %s", fullpath);
- efree(fullpath);
- return;
- }
-#endif
-
if (php_check_open_basedir(fullpath)) {
zend_throw_exception_ex(zend_ce_exception, 0, "open_basedir prohibits opening %s", fullpath);
efree(fullpath);
@@ -163,11 +156,7 @@ PHP_METHOD(sqlite3, open)
db_obj->initialised = 1;
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
-#else
if (PG(open_basedir) && *PG(open_basedir)) {
-#endif
sqlite3_set_authorizer(db_obj->db, php_sqlite3_authorizer, NULL);
}
@@ -281,7 +270,11 @@ PHP_METHOD(sqlite3, lastErrorCode)
return;
}
- RETURN_LONG(sqlite3_errcode(db_obj->db));
+ if (db_obj->initialised) {
+ RETURN_LONG(sqlite3_errcode(db_obj->db));
+ } else {
+ RETURN_LONG(0);
+ }
}
/* }}} */
@@ -299,7 +292,11 @@ PHP_METHOD(sqlite3, lastErrorMsg)
return;
}
- RETVAL_STRING((char *)sqlite3_errmsg(db_obj->db));
+ if (db_obj->initialised) {
+ RETURN_STRING((char *)sqlite3_errmsg(db_obj->db));
+ } else {
+ RETURN_EMPTY_STRING();
+ }
}
/* }}} */
@@ -686,9 +683,7 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
fake_argc = argc + is_agg;
fc->fci.size = sizeof(fc->fci);
- fc->fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
- fc->fci.symbol_table = NULL;
fc->fci.object = NULL;
fc->fci.retval = &retval;
fc->fci.param_count = fake_argc;
@@ -706,7 +701,7 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
if (Z_ISUNDEF(agg_context->zval_context)) {
ZVAL_NULL(&agg_context->zval_context);
}
- ZVAL_COPY_VALUE(&zargs[0], &agg_context->zval_context);
+ ZVAL_DUP(&zargs[0], &agg_context->zval_context);
ZVAL_LONG(&zargs[1], agg_context->row_count);
}
@@ -742,6 +737,10 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
php_error_docref(NULL, E_WARNING, "An error occurred while invoking the callback");
}
+ if (is_agg) {
+ zval_ptr_dtor(&zargs[0]);
+ }
+
/* clean up the params */
if (fake_argc) {
for (i = is_agg; i < argc + is_agg; i++) {
@@ -840,11 +839,8 @@ static int php_sqlite3_callback_compare(void *coll, int a_len, const void *a, in
zval retval;
int ret;
- ZVAL_UNDEF(&retval);
collation->fci.fci.size = (sizeof(collation->fci.fci));
- collation->fci.fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&collation->fci.fci.function_name, &collation->cmp_func);
- collation->fci.fci.symbol_table = NULL;
collation->fci.fci.object = NULL;
collation->fci.fci.retval = &retval;
collation->fci.fci.param_count = 2;
@@ -860,6 +856,8 @@ static int php_sqlite3_callback_compare(void *coll, int a_len, const void *a, in
if ((ret = zend_call_function(&collation->fci.fci, &collation->fci.fcc)) == FAILURE) {
php_error_docref(NULL, E_WARNING, "An error occurred while invoking the compare callback");
}
+ } else {
+ ZVAL_UNDEF(&retval);
}
zval_ptr_dtor(&zargs[0]);
@@ -873,7 +871,7 @@ static int php_sqlite3_callback_compare(void *coll, int a_len, const void *a, in
// (the result of a comparison, i.e. most likely -1, 0, or 1)
//I suppose we could accept any scalar return type, though.
php_error_docref(NULL, E_WARNING, "An error occurred while invoking the compare callback (invalid return type). Collation behaviour is undefined.");
- }else{
+ } else {
ret = Z_LVAL(retval);
}
@@ -1392,6 +1390,26 @@ static int register_bound_parameter_to_sqlite(struct php_sqlite3_bound_param *pa
}
/* }}} */
+/* {{{ Best try to map between PHP and SQLite. Default is still text. */
+#define PHP_SQLITE3_SET_TYPE(z, p) \
+ switch (Z_TYPE_P(z)) { \
+ default: \
+ (p).type = SQLITE_TEXT; \
+ break; \
+ case IS_LONG: \
+ case IS_TRUE: \
+ case IS_FALSE: \
+ (p).type = SQLITE_INTEGER; \
+ break; \
+ case IS_DOUBLE: \
+ (p).type = SQLITE_FLOAT; \
+ break; \
+ case IS_NULL: \
+ (p).type = SQLITE_NULL; \
+ break; \
+ }
+/* }}} */
+
/* {{{ proto bool SQLite3Stmt::bindParam(int parameter_number, mixed parameter [, int type])
Bind Parameter to a stmt variable. */
PHP_METHOD(sqlite3stmt, bindParam)
@@ -1416,6 +1434,10 @@ PHP_METHOD(sqlite3stmt, bindParam)
ZVAL_COPY(&param.parameter, parameter);
+ if (ZEND_NUM_ARGS() < 3) {
+ PHP_SQLITE3_SET_TYPE(parameter, param);
+ }
+
if (!register_bound_parameter_to_sqlite(&param, stmt_obj)) {
if (!Z_ISUNDEF(param.parameter)) {
zval_ptr_dtor(&(param.parameter));
@@ -1451,6 +1473,10 @@ PHP_METHOD(sqlite3stmt, bindValue)
ZVAL_COPY(&param.parameter, parameter);
+ if (ZEND_NUM_ARGS() < 3) {
+ PHP_SQLITE3_SET_TYPE(parameter, param);
+ }
+
if (!register_bound_parameter_to_sqlite(&param, stmt_obj)) {
if (!Z_ISUNDEF(param.parameter)) {
zval_ptr_dtor(&(param.parameter));
@@ -1462,6 +1488,8 @@ PHP_METHOD(sqlite3stmt, bindValue)
}
/* }}} */
+#undef PHP_SQLITE3_SET_TYPE
+
/* {{{ proto SQLite3Result SQLite3Stmt::execute()
Executes a prepared statement and returns a result set object. */
PHP_METHOD(sqlite3stmt, execute)
@@ -1514,7 +1542,7 @@ PHP_METHOD(sqlite3stmt, execute)
case SQLITE_BLOB:
{
php_stream *stream = NULL;
- zend_string *buffer;
+ zend_string *buffer = NULL;
if (Z_TYPE_P(parameter) == IS_RESOURCE) {
php_stream_from_zval_no_verify(stream, parameter);
if (stream == NULL) {
@@ -1523,14 +1551,14 @@ PHP_METHOD(sqlite3stmt, execute)
}
buffer = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0);
} else {
- convert_to_string(parameter);
- buffer = Z_STR_P(parameter);
+ buffer = zval_get_string(parameter);
}
- sqlite3_bind_blob(stmt_obj->stmt, param->param_number, ZSTR_VAL(buffer), ZSTR_LEN(buffer), SQLITE_TRANSIENT);
-
- if (stream) {
+ if (buffer) {
+ sqlite3_bind_blob(stmt_obj->stmt, param->param_number, ZSTR_VAL(buffer), ZSTR_LEN(buffer), SQLITE_TRANSIENT);
zend_string_release(buffer);
+ } else {
+ sqlite3_bind_null(stmt_obj->stmt, param->param_number);
}
break;
}
@@ -1812,7 +1840,7 @@ PHP_METHOD(sqlite3result, __construct)
/* }}} */
/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_open, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sqlite3_open, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, flags)
ZEND_ARG_INFO(0, encryption_key)
@@ -1967,13 +1995,6 @@ static int php_sqlite3_authorizer(void *autharg, int access_type, const char *ar
case SQLITE_ATTACH:
{
if (memcmp(arg3, ":memory:", sizeof(":memory:")) && *arg3) {
-
-#if PHP_API_VERSION < 20100412
- if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
- return SQLITE_DENY;
- }
-#endif
-
if (php_check_open_basedir(arg3)) {
return SQLITE_DENY;
}
@@ -2300,7 +2321,7 @@ zend_module_entry sqlite3_module_entry = {
#ifdef COMPILE_DL_SQLITE3
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(sqlite3)
#endif
diff --git a/ext/sqlite3/tests/bug69972.phpt b/ext/sqlite3/tests/bug69972.phpt
new file mode 100644
index 0000000000..539ebd2696
--- /dev/null
+++ b/ext/sqlite3/tests/bug69972.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #69972 (Use-after-free vulnerability in sqlite3SafetyCheckSickOrOk())
+--SKIPIF--
+<?php
+if (!extension_loaded('sqlite3')) die('skip');
+?>
+--FILE--
+<?php
+$db = new SQLite3(':memory:');
+echo "SELECTING from invalid table\n";
+$result = $db->query("SELECT * FROM non_existent_table");
+echo "Closing database\n";
+var_dump($db->close());
+echo "Done\n";
+
+// Trigger the use-after-free
+echo "Error Code: " . $db->lastErrorCode() . "\n";
+echo "Error Msg: " . $db->lastErrorMsg() . "\n";
+?>
+--EXPECTF--
+SELECTING from invalid table
+
+Warning: SQLite3::query(): Unable to prepare statement: 1, no such table: non_existent_table in %sbug69972.php on line %d
+Closing database
+bool(true)
+Done
+Error Code: 0
+Error Msg:
diff --git a/ext/sqlite3/tests/bug71049.phpt b/ext/sqlite3/tests/bug71049.phpt
new file mode 100644
index 0000000000..5c2843f345
--- /dev/null
+++ b/ext/sqlite3/tests/bug71049.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #71049 (SQLite3Stmt::execute() releases bound parameter instead of internal buffer)
+--SKIPIF--
+<?php
+if (!extension_loaded('sqlite3')) die('skip'); ?>
+--FILE--
+<?php
+
+require(__DIR__ . '/new_db.inc');
+
+$db->exec('CREATE TABLE test (age INTEGER, id STRING)');
+
+$stmt = $db->prepare("SELECT * FROM test WHERE id = ? ORDER BY id ASC");
+$foo = "alive" . chr(33);
+$stmt->bindParam(1, $foo, SQLITE3_BLOB);
+$results = $stmt->execute();
+var_dump($foo);
+$db->close();
+?>
+--EXPECT--
+string(6) "alive!"
diff --git a/ext/sqlite3/tests/sqlite3_bind_bug68849.phpt b/ext/sqlite3/tests/sqlite3_bind_bug68849.phpt
new file mode 100644
index 0000000000..321f883a8e
--- /dev/null
+++ b/ext/sqlite3/tests/sqlite3_bind_bug68849.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Bug #68849 bindValue is not using the right data type
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--FILE--
+<?php
+
+$db = new SQLite3(':memory:');
+
+$db->exec("CREATE TABLE test (a INTEGER, b TEXT, c REAL);" .
+ "INSERT INTO test VALUES (1, 'hello', 3.14);" .
+ "INSERT INTO test VALUES (3, 'world', 3.15);" .
+ "INSERT INTO test VALUES (0, '42', 0.42);"
+);
+
+$s = $db->prepare('SELECT * FROM test WHERE (a+2) = ?;');
+$s->bindValue(1, 3);
+$r = $s->execute();
+var_dump($r->fetchArray(SQLITE3_ASSOC));
+
+$s = $db->prepare('SELECT * FROM test WHERE a = ?;');
+$s->bindValue(1, true);
+$r = $s->execute();
+var_dump($r->fetchArray(SQLITE3_ASSOC));
+
+$s = $db->prepare('SELECT * FROM test WHERE a = ?;');
+$s->bindValue(1, false);
+$r = $s->execute();
+var_dump($r->fetchArray(SQLITE3_ASSOC));
+
+$s = $db->prepare('SELECT * FROM test WHERE c = ?;');
+$s->bindValue(1, 3.15);
+$r = $s->execute();
+var_dump($r->fetchArray(SQLITE3_ASSOC));
+
+?>
+==DONE==
+--EXPECTF--
+array(3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ string(5) "hello"
+ ["c"]=>
+ float(3.14)
+}
+array(3) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ string(5) "hello"
+ ["c"]=>
+ float(3.14)
+}
+array(3) {
+ ["a"]=>
+ int(0)
+ ["b"]=>
+ string(2) "42"
+ ["c"]=>
+ float(0.42)
+}
+array(3) {
+ ["a"]=>
+ int(3)
+ ["b"]=>
+ string(5) "world"
+ ["c"]=>
+ float(3.15)
+}
+==DONE==
diff --git a/ext/sqlite3/tests/sqlite3_blob_bind_resource.phpt b/ext/sqlite3/tests/sqlite3_blob_bind_resource.phpt
new file mode 100644
index 0000000000..108956b87b
--- /dev/null
+++ b/ext/sqlite3/tests/sqlite3_blob_bind_resource.phpt
@@ -0,0 +1,39 @@
+--TEST--
+SQLite3::execute() with a resource bound for blob param
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--FILE--
+<?php
+
+require_once(dirname(__FILE__) . '/new_db.inc');
+require_once(dirname(__FILE__) . '/stream_test.inc');
+
+var_dump($db->exec('CREATE TABLE test (id STRING, data BLOB)'));
+$insert_stmt = $db->prepare("INSERT INTO test (id, data) VALUES (1, ?)");
+
+
+class HelloWrapper {
+ public function stream_open() { return true; }
+ public function stream_eof() { return true; }
+ public function stream_read() { return NULL; }
+ public function stream_stat() { return array(); }
+}
+stream_wrapper_register("hello", "HelloWrapper");
+
+$f = fopen("hello://there", "r");
+
+var_dump($insert_stmt->bindParam(1, $f, SQLITE3_BLOB));
+var_dump($insert_stmt->execute());
+
+var_dump($insert_stmt->close());
+fclose($f);
+
+?>
++++DONE+++
+--EXPECTF--
+bool(true)
+bool(true)
+object(SQLite3Result)#%d (%d) {
+}
+bool(true)
++++DONE+++
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 696ad05ff6..cba3b5d46e 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -46,9 +46,7 @@
#include "php_string.h"
#include "php_rand.h"
#include "zend_smart_str.h"
-#ifdef HAVE_SPL
#include "ext/spl/spl_array.h"
-#endif
/* {{{ defines */
#define EXTR_OVERWRITE 0
@@ -81,8 +79,6 @@
#define INTERSECT_COMP_DATA_USER 1
#define INTERSECT_COMP_KEY_INTERNAL 0
#define INTERSECT_COMP_KEY_USER 1
-
-#define DOUBLE_DRIFT_FIX 0.000000000000001
/* }}} */
ZEND_DECLARE_MODULE_GLOBALS(array)
@@ -141,75 +137,561 @@ PHP_MSHUTDOWN_FUNCTION(array) /* {{{ */
}
/* }}} */
-static void php_set_compare_func(zend_long sort_type) /* {{{ */
+static int php_array_key_compare(const void *a, const void *b) /* {{{ */
{
- switch (sort_type & ~PHP_SORT_FLAG_CASE) {
- case PHP_SORT_NUMERIC:
- ARRAYG(compare_func) = numeric_compare_function;
- break;
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+ zend_uchar t;
+ zend_long l1, l2;
+ double d;
- case PHP_SORT_STRING:
- ARRAYG(compare_func) = sort_type & PHP_SORT_FLAG_CASE ? string_case_compare_function : string_compare_function;
- break;
+ if (f->key == NULL) {
+ if (s->key == NULL) {
+ return (zend_long)f->h > (zend_long)s->h ? 1 : -1;
+ } else {
+ l1 = (zend_long)f->h;
+ t = is_numeric_string(s->key->val, s->key->len, &l2, &d, 1);
+ if (t == IS_LONG) {
+ /* pass */
+ } else if (t == IS_DOUBLE) {
+ return ZEND_NORMALIZE_BOOL((double)l1 - d);
+ } else {
+ l2 = 0;
+ }
+ }
+ } else {
+ if (s->key) {
+ return zendi_smart_strcmp(f->key, s->key);
+ } else {
+ l2 = (zend_long)s->h;
+ t = is_numeric_string(f->key->val, f->key->len, &l1, &d, 1);
+ if (t == IS_LONG) {
+ /* pass */
+ } else if (t == IS_DOUBLE) {
+ return ZEND_NORMALIZE_BOOL(d - (double)l2);
+ } else {
+ l1 = 0;
+ }
+ }
+ }
+ return l1 > l2 ? 1 : (l1 < l2 ? -1 : 0);
+}
+/* }}} */
- case PHP_SORT_NATURAL:
- ARRAYG(compare_func) = sort_type & PHP_SORT_FLAG_CASE ? string_natural_case_compare_function : string_natural_compare_function;
- break;
+static int php_array_reverse_key_compare(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare(b, a);
+}
+/* }}} */
+
+static int php_array_key_compare_numeric(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+
+ if (f->key == NULL && s->key == NULL) {
+ return (zend_long)f->h > (zend_long)s->h ? 1 : -1;
+ } else {
+ double d1, d2;
+ if (f->key) {
+ d1 = zend_strtod(f->key->val, NULL);
+ } else {
+ d1 = (double)(zend_long)f->h;
+ }
+ if (s->key) {
+ d2 = zend_strtod(s->key->val, NULL);
+ } else {
+ d2 = (double)(zend_long)s->h;
+ }
+ return ZEND_NORMALIZE_BOOL(d1 - d2);
+ }
+}
+/* }}} */
+
+static int php_array_reverse_key_compare_numeric(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_numeric(b, a);
+}
+/* }}} */
+
+static int php_array_key_compare_string_case(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+ char *s1, *s2;
+ size_t l1, l2;
+ char buf1[MAX_LENGTH_OF_LONG + 1];
+ char buf2[MAX_LENGTH_OF_LONG + 1];
+
+ if (f->key) {
+ s1 = f->key->val;
+ l1 = f->key->len;
+ } else {
+ s1 = zend_print_long_to_buf(buf1 + sizeof(buf1) - 1, f->h);
+ l1 = buf1 + sizeof(buf1) - 1 - s1;
+ }
+ if (s->key) {
+ s2 = s->key->val;
+ l2 = s->key->len;
+ } else {
+ s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
+ l2 = buf2 + sizeof(buf2) - 1 - s1;
+ }
+ return zend_binary_strcasecmp_l(s1, l1, s2, l2);
+}
+/* }}} */
+
+static int php_array_reverse_key_compare_string_case(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string_case(b, a);
+}
+/* }}} */
+
+static int php_array_key_compare_string(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+ char *s1, *s2;
+ size_t l1, l2;
+ char buf1[MAX_LENGTH_OF_LONG + 1];
+ char buf2[MAX_LENGTH_OF_LONG + 1];
+
+ if (f->key) {
+ s1 = f->key->val;
+ l1 = f->key->len;
+ } else {
+ s1 = zend_print_long_to_buf(buf1 + sizeof(buf1) - 1, f->h);
+ l1 = buf1 + sizeof(buf1) - 1 - s1;
+ }
+ if (s->key) {
+ s2 = s->key->val;
+ l2 = s->key->len;
+ } else {
+ s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
+ l2 = buf2 + sizeof(buf2) - 1 - s2;
+ }
+ return zend_binary_strcmp(s1, l1, s2, l2);
+}
+/* }}} */
+
+static int php_array_reverse_key_compare_string(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string(b, a);
+}
+/* }}} */
+
+static int php_array_key_compare_string_natural_general(const void *a, const void *b, int fold_case) /* {{{ */
+{
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+ char *s1, *s2;
+ size_t l1, l2;
+ char buf1[MAX_LENGTH_OF_LONG + 1];
+ char buf2[MAX_LENGTH_OF_LONG + 1];
+
+ if (f->key) {
+ s1 = f->key->val;
+ l1 = f->key->len;
+ } else {
+ s1 = zend_print_long_to_buf(buf1 + sizeof(buf1) - 1, f->h);
+ l1 = buf1 + sizeof(buf1) - 1 - s1;
+ }
+ if (s->key) {
+ s2 = s->key->val;
+ l2 = s->key->len;
+ } else {
+ s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
+ l2 = buf2 + sizeof(buf2) - 1 - s1;
+ }
+ return strnatcmp_ex(s1, l1, s2, l2, fold_case);
+}
+/* }}} */
+
+static int php_array_key_compare_string_natural_case(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string_natural_general(a, b, 1);
+}
+/* }}} */
+
+static int php_array_reverse_key_compare_string_natural_case(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string_natural_general(b, a, 1);
+}
+/* }}} */
+
+static int php_array_key_compare_string_natural(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string_natural_general(a, b, 0);
+}
+/* }}} */
+
+static int php_array_reverse_key_compare_string_natural(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string_natural_general(b, a, 0);
+}
+/* }}} */
#if HAVE_STRCOLL
- case PHP_SORT_LOCALE_STRING:
- ARRAYG(compare_func) = string_locale_compare_function;
- break;
-#endif
+static int php_array_key_compare_string_locale(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+ char *s1, *s2;
+ char buf1[MAX_LENGTH_OF_LONG + 1];
+ char buf2[MAX_LENGTH_OF_LONG + 1];
- case PHP_SORT_REGULAR:
- default:
- ARRAYG(compare_func) = zval_compare_function;
- break;
+ if (f->key) {
+ s1 = f->key->val;
+ } else {
+ s1 = zend_print_long_to_buf(buf1 + sizeof(buf1) - 1, f->h);
}
+ if (s->key) {
+ s2 = s->key->val;
+ } else {
+ s2 = zend_print_long_to_buf(buf2 + sizeof(buf2) - 1, s->h);
+ }
+ return strcoll(s1, s2);
}
/* }}} */
-static int php_array_key_compare(const void *a, const void *b) /* {{{ */
+static int php_array_reverse_key_compare_string_locale(const void *a, const void *b) /* {{{ */
+{
+ return php_array_key_compare_string_locale(b, a);
+}
+/* }}} */
+#endif
+
+/* Numbers are always smaller than strings int this function as it
+ * anyway doesn't make much sense to compare two different data types.
+ * This keeps it consistent and simple.
+ *
+ * This is not correct any more, depends on what compare_func is set to.
+ */
+static int php_array_data_compare(const void *a, const void *b) /* {{{ */
{
Bucket *f;
Bucket *s;
zval result;
- zval first;
- zval second;
+ zval *first;
+ zval *second;
f = (Bucket *) a;
s = (Bucket *) b;
- if (f->key == NULL) {
- ZVAL_LONG(&first, f->h);
- } else {
- ZVAL_STR(&first, f->key);
+ first = &f->val;
+ second = &s->val;
+
+ if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) {
+ first = Z_INDIRECT_P(first);
+ }
+ if (UNEXPECTED(Z_TYPE_P(second) == IS_INDIRECT)) {
+ second = Z_INDIRECT_P(second);
+ }
+ if (compare_function(&result, first, second) == FAILURE) {
+ return 0;
}
- if (s->key == NULL) {
- ZVAL_LONG(&second, s->h);
- } else {
- ZVAL_STR(&second, s->key);
+ ZEND_ASSERT(Z_TYPE(result) == IS_LONG);
+ return Z_LVAL(result);
+}
+/* }}} */
+
+static int php_array_reverse_data_compare(const void *a, const void *b) /* {{{ */
+{
+ return php_array_data_compare(a, b) * -1;
+}
+/* }}} */
+
+static int php_array_data_compare_numeric(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f;
+ Bucket *s;
+ zval *first;
+ zval *second;
+
+ f = (Bucket *) a;
+ s = (Bucket *) b;
+
+ first = &f->val;
+ second = &s->val;
+
+ if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) {
+ first = Z_INDIRECT_P(first);
+ }
+ if (UNEXPECTED(Z_TYPE_P(second) == IS_INDIRECT)) {
+ second = Z_INDIRECT_P(second);
}
- if (ARRAYG(compare_func)(&result, &first, &second) == FAILURE) {
- return 0;
+ return numeric_compare_function(first, second);
+}
+/* }}} */
+
+static int php_array_reverse_data_compare_numeric(const void *a, const void *b) /* {{{ */
+{
+ return php_array_data_compare_numeric(b, a);
+}
+/* }}} */
+
+static int php_array_data_compare_string_case(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f;
+ Bucket *s;
+ zval *first;
+ zval *second;
+
+ f = (Bucket *) a;
+ s = (Bucket *) b;
+
+ first = &f->val;
+ second = &s->val;
+
+ if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) {
+ first = Z_INDIRECT_P(first);
}
+ if (UNEXPECTED(Z_TYPE_P(second) == IS_INDIRECT)) {
+ second = Z_INDIRECT_P(second);
+ }
+
+ return string_case_compare_function(first, second);
+}
+/* }}} */
+
+static int php_array_reverse_data_compare_string_case(const void *a, const void *b) /* {{{ */
+{
+ return php_array_data_compare_string_case(b, a);
+}
+/* }}} */
+
+static int php_array_data_compare_string(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f;
+ Bucket *s;
+ zval *first;
+ zval *second;
+
+ f = (Bucket *) a;
+ s = (Bucket *) b;
+
+ first = &f->val;
+ second = &s->val;
- if (EXPECTED(Z_TYPE(result) == IS_LONG)) {
- return ZEND_NORMALIZE_BOOL(Z_LVAL(result));
- } else if (Z_TYPE(result) == IS_DOUBLE) {
- return ZEND_NORMALIZE_BOOL(Z_DVAL(result));
+ if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) {
+ first = Z_INDIRECT_P(first);
+ }
+ if (UNEXPECTED(Z_TYPE_P(second) == IS_INDIRECT)) {
+ second = Z_INDIRECT_P(second);
}
- return ZEND_NORMALIZE_BOOL(zval_get_long(&result));
+ return string_compare_function(first, second);
}
/* }}} */
-static int php_array_reverse_key_compare(const void *a, const void *b) /* {{{ */
+static int php_array_reverse_data_compare_string(const void *a, const void *b) /* {{{ */
+{
+ return php_array_data_compare_string(b, a);
+}
+/* }}} */
+
+static int php_array_natural_general_compare(const void *a, const void *b, int fold_case) /* {{{ */
+{
+ Bucket *f = (Bucket *) a;
+ Bucket *s = (Bucket *) b;
+ zend_string *str1 = zval_get_string(&f->val);
+ zend_string *str2 = zval_get_string(&s->val);
+
+ int result = strnatcmp_ex(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2), fold_case);
+
+ zend_string_release(str1);
+ zend_string_release(str2);
+ return result;
+}
+/* }}} */
+
+static int php_array_natural_compare(const void *a, const void *b) /* {{{ */
+{
+ return php_array_natural_general_compare(a, b, 0);
+}
+/* }}} */
+
+static int php_array_reverse_natural_compare(const void *a, const void *b) /* {{{ */
+{
+ return php_array_natural_general_compare(b, a, 0);
+}
+/* }}} */
+
+static int php_array_natural_case_compare(const void *a, const void *b) /* {{{ */
+{
+ return php_array_natural_general_compare(a, b, 1);
+}
+/* }}} */
+
+static int php_array_reverse_natural_case_compare(const void *a, const void *b) /* {{{ */
+{
+ return php_array_natural_general_compare(b, a, 1);
+}
+/* }}} */
+
+#if HAVE_STRCOLL
+static int php_array_data_compare_string_locale(const void *a, const void *b) /* {{{ */
+{
+ Bucket *f;
+ Bucket *s;
+ zval *first;
+ zval *second;
+
+ f = (Bucket *) a;
+ s = (Bucket *) b;
+
+ first = &f->val;
+ second = &s->val;
+
+ if (UNEXPECTED(Z_TYPE_P(first) == IS_INDIRECT)) {
+ first = Z_INDIRECT_P(first);
+ }
+ if (UNEXPECTED(Z_TYPE_P(second) == IS_INDIRECT)) {
+ second = Z_INDIRECT_P(second);
+ }
+
+ return string_locale_compare_function(first, second);
+}
+/* }}} */
+
+static int php_array_reverse_data_compare_string_locale(const void *a, const void *b) /* {{{ */
+{
+ return php_array_data_compare_string_locale(b, a);
+}
+/* }}} */
+#endif
+
+static compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse) /* {{{ */
+{
+ switch (sort_type & ~PHP_SORT_FLAG_CASE) {
+ case PHP_SORT_NUMERIC:
+ if (reverse) {
+ return php_array_reverse_key_compare_numeric;
+ } else {
+ return php_array_key_compare_numeric;
+ }
+ break;
+
+ case PHP_SORT_STRING:
+ if (sort_type & PHP_SORT_FLAG_CASE) {
+ if (reverse) {
+ return php_array_reverse_key_compare_string_case;
+ } else {
+ return php_array_key_compare_string_case;
+ }
+ } else {
+ if (reverse) {
+ return php_array_reverse_key_compare_string;
+ } else {
+ return php_array_key_compare_string;
+ }
+ }
+ break;
+
+ case PHP_SORT_NATURAL:
+ if (sort_type & PHP_SORT_FLAG_CASE) {
+ if (reverse) {
+ return php_array_reverse_key_compare_string_natural_case;
+ } else {
+ return php_array_key_compare_string_natural_case;
+ }
+ } else {
+ if (reverse) {
+ return php_array_reverse_key_compare_string_natural;
+ } else {
+ return php_array_key_compare_string_natural;
+ }
+ }
+ break;
+
+#if HAVE_STRCOLL
+ case PHP_SORT_LOCALE_STRING:
+ if (reverse) {
+ return php_array_reverse_key_compare_string_locale;
+ } else {
+ return php_array_key_compare_string_locale;
+ }
+ break;
+#endif
+
+ case PHP_SORT_REGULAR:
+ default:
+ if (reverse) {
+ return php_array_reverse_key_compare;
+ } else {
+ return php_array_key_compare;
+ }
+ break;
+ }
+ return NULL;
+}
+/* }}} */
+
+static compare_func_t php_get_data_compare_func(zend_long sort_type, int reverse) /* {{{ */
{
- return php_array_key_compare(a, b) * -1;
+ switch (sort_type & ~PHP_SORT_FLAG_CASE) {
+ case PHP_SORT_NUMERIC:
+ if (reverse) {
+ return php_array_reverse_data_compare_numeric;
+ } else {
+ return php_array_data_compare_numeric;
+ }
+ break;
+
+ case PHP_SORT_STRING:
+ if (sort_type & PHP_SORT_FLAG_CASE) {
+ if (reverse) {
+ return php_array_reverse_data_compare_string_case;
+ } else {
+ return php_array_data_compare_string_case;
+ }
+ } else {
+ if (reverse) {
+ return php_array_reverse_data_compare_string;
+ } else {
+ return php_array_data_compare_string;
+ }
+ }
+ break;
+
+ case PHP_SORT_NATURAL:
+ if (sort_type & PHP_SORT_FLAG_CASE) {
+ if (reverse) {
+ return php_array_reverse_natural_case_compare;
+ } else {
+ return php_array_natural_case_compare;
+ }
+ } else {
+ if (reverse) {
+ return php_array_reverse_natural_compare;
+ } else {
+ return php_array_natural_compare;
+ }
+ }
+ break;
+
+#if HAVE_STRCOLL
+ case PHP_SORT_LOCALE_STRING:
+ if (reverse) {
+ return php_array_reverse_data_compare_string_locale;
+ } else {
+ return php_array_data_compare_string_locale;
+ }
+ break;
+#endif
+
+ case PHP_SORT_REGULAR:
+ default:
+ if (reverse) {
+ return php_array_reverse_data_compare;
+ } else {
+ return php_array_data_compare;
+ }
+ break;
+ }
+ return NULL;
}
/* }}} */
@@ -219,6 +701,7 @@ PHP_FUNCTION(krsort)
{
zval *array;
zend_long sort_type = PHP_SORT_REGULAR;
+ compare_func_t cmp;
#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
@@ -232,9 +715,9 @@ PHP_FUNCTION(krsort)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
#endif
- php_set_compare_func(sort_type);
+ cmp = php_get_key_compare_func(sort_type, 1);
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_reverse_key_compare, 0) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(array), cmp, 0) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -247,6 +730,7 @@ PHP_FUNCTION(ksort)
{
zval *array;
zend_long sort_type = PHP_SORT_REGULAR;
+ compare_func_t cmp;
#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
@@ -260,9 +744,9 @@ PHP_FUNCTION(ksort)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
#endif
- php_set_compare_func(sort_type);
+ cmp = php_get_key_compare_func(sort_type, 0);
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_key_compare, 0) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(array), cmp, 0) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -280,7 +764,7 @@ PHPAPI zend_long php_count_recursive(zval *array, zend_long mode) /* {{{ */
return 0;
}
- cnt = zend_hash_num_elements(Z_ARRVAL_P(array));
+ cnt = zend_array_count(Z_ARRVAL_P(array));
if (mode == COUNT_RECURSIVE) {
if (ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(array))) {
Z_ARRVAL_P(array)->u.v.nApplyCount++;
@@ -325,7 +809,7 @@ PHP_FUNCTION(count)
RETURN_LONG(0);
break;
case IS_ARRAY:
- cnt = zend_hash_num_elements(Z_ARRVAL_P(array));
+ cnt = zend_array_count(Z_ARRVAL_P(array));
if (mode == COUNT_RECURSIVE) {
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(array), element) {
ZVAL_DEREF(element);
@@ -335,9 +819,7 @@ PHP_FUNCTION(count)
RETURN_LONG(cnt);
break;
case IS_OBJECT: {
-#ifdef HAVE_SPL
zval retval;
-#endif
/* first, we check if the handler is defined */
if (Z_OBJ_HT_P(array)->count_elements) {
RETVAL_LONG(1);
@@ -345,7 +827,6 @@ PHP_FUNCTION(count)
return;
}
}
-#ifdef HAVE_SPL
/* if not and the object implements Countable we call its count() method */
if (instanceof_function(Z_OBJCE_P(array), spl_ce_Countable)) {
zend_call_method_with_0_params(array, NULL, NULL, "count", &retval);
@@ -355,7 +836,6 @@ PHP_FUNCTION(count)
}
return;
}
-#endif
}
default:
RETURN_LONG(1);
@@ -364,79 +844,6 @@ PHP_FUNCTION(count)
}
/* }}} */
-/* Numbers are always smaller than strings int this function as it
- * anyway doesn't make much sense to compare two different data types.
- * This keeps it consistent and simple.
- *
- * This is not correct any more, depends on what compare_func is set to.
- */
-static int php_array_data_compare(const void *a, const void *b) /* {{{ */
-{
- Bucket *f;
- Bucket *s;
- zval result;
- zval *first;
- zval *second;
-
- f = (Bucket *) a;
- s = (Bucket *) b;
-
- first = &f->val;
- second = &s->val;
-
- if (Z_TYPE_P(first) == IS_INDIRECT) {
- first = Z_INDIRECT_P(first);
- }
- if (Z_TYPE_P(second) == IS_INDIRECT) {
- second = Z_INDIRECT_P(second);
- }
- if (ARRAYG(compare_func)(&result, first, second) == FAILURE) {
- return 0;
- }
-
- if (EXPECTED(Z_TYPE(result) == IS_LONG)) {
- return ZEND_NORMALIZE_BOOL(Z_LVAL(result));
- } else if (Z_TYPE(result) == IS_DOUBLE) {
- return ZEND_NORMALIZE_BOOL(Z_DVAL(result));
- }
-
- return ZEND_NORMALIZE_BOOL(zval_get_long(&result));
-}
-/* }}} */
-
-static int php_array_reverse_data_compare(const void *a, const void *b) /* {{{ */
-{
- return php_array_data_compare(a, b) * -1;
-}
-/* }}} */
-
-static int php_array_natural_general_compare(const void *a, const void *b, int fold_case) /* {{{ */
-{
- Bucket *f = (Bucket *) a;
- Bucket *s = (Bucket *) b;
- zend_string *str1 = zval_get_string(&f->val);
- zend_string *str2 = zval_get_string(&s->val);
-
- int result = strnatcmp_ex(ZSTR_VAL(str1), ZSTR_LEN(str1), ZSTR_VAL(str2), ZSTR_LEN(str2), fold_case);
-
- zend_string_release(str1);
- zend_string_release(str2);
- return result;
-}
-/* }}} */
-
-static int php_array_natural_compare(const void *a, const void *b) /* {{{ */
-{
- return php_array_natural_general_compare(a, b, 0);
-}
-/* }}} */
-
-static int php_array_natural_case_compare(const void *a, const void *b) /* {{{ */
-{
- return php_array_natural_general_compare(a, b, 1);
-}
-/* }}} */
-
static void php_natsort(INTERNAL_FUNCTION_PARAMETERS, int fold_case) /* {{{ */
{
zval *array;
@@ -481,14 +888,15 @@ PHP_FUNCTION(asort)
{
zval *array;
zend_long sort_type = PHP_SORT_REGULAR;
+ compare_func_t cmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
RETURN_FALSE;
}
- php_set_compare_func(sort_type);
+ cmp = php_get_data_compare_func(sort_type, 0);
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_data_compare, 0) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(array), cmp, 0) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -501,14 +909,15 @@ PHP_FUNCTION(arsort)
{
zval *array;
zend_long sort_type = PHP_SORT_REGULAR;
+ compare_func_t cmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
RETURN_FALSE;
}
- php_set_compare_func(sort_type);
+ cmp = php_get_data_compare_func(sort_type, 1);
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_reverse_data_compare, 0) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(array), cmp, 0) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -521,14 +930,15 @@ PHP_FUNCTION(sort)
{
zval *array;
zend_long sort_type = PHP_SORT_REGULAR;
+ compare_func_t cmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
RETURN_FALSE;
}
- php_set_compare_func(sort_type);
+ cmp = php_get_data_compare_func(sort_type, 0);
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_data_compare, 1) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(array), cmp, 1) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -541,14 +951,15 @@ PHP_FUNCTION(rsort)
{
zval *array;
zend_long sort_type = PHP_SORT_REGULAR;
+ compare_func_t cmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/|l", &array, &sort_type) == FAILURE) {
RETURN_FALSE;
}
- php_set_compare_func(sort_type);
+ cmp = php_get_data_compare_func(sort_type, 1);
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_reverse_data_compare, 1) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(array), cmp, 1) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -615,48 +1026,44 @@ static int php_array_user_compare(const void *a, const void *b) /* {{{ */
BG(user_compare_fci) = old_user_compare_fci; \
BG(user_compare_fci_cache) = old_user_compare_fci_cache; \
-/* {{{ proto bool usort(array array_arg, string cmp_function)
- Sort an array by values using a user-defined comparison function */
-PHP_FUNCTION(usort)
+static void php_usort(INTERNAL_FUNCTION_PARAMETERS, compare_func_t compare_func, zend_bool renumber) /* {{{ */
{
zval *array;
- zend_refcounted *arr;
- unsigned int refcount;
+ zend_array *arr;
+ zend_bool retval;
PHP_ARRAY_CMP_FUNC_VARS;
PHP_ARRAY_CMP_FUNC_BACKUP();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/f", &array, &BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "af", &array, &BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE) {
PHP_ARRAY_CMP_FUNC_RESTORE();
return;
}
- /* Increase reference counter, so the attempts to modify the array in user
- * comparison function will create a copy of array and won't affect the
- * original array. The fact of modification is detected using refcount
- * comparison. The result of sorting in such case is undefined and the
- * function returns FALSE.
- */
- Z_ADDREF_P(array);
- refcount = Z_REFCOUNT_P(array);
- arr = Z_COUNTED_P(array);
-
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_user_compare, 1) == FAILURE) {
- RETVAL_FALSE;
- } else {
- if (refcount > Z_REFCOUNT_P(array)) {
- php_error_docref(NULL, E_WARNING, "Array was modified by the user comparison function");
- if (--GC_REFCOUNT(arr) <= 0) {
- _zval_dtor_func(arr ZEND_FILE_LINE_CC);
- }
- RETVAL_FALSE;
- } else {
- Z_DELREF_P(array);
- RETVAL_TRUE;
- }
+ arr = Z_ARR_P(array);
+ if (zend_hash_num_elements(arr) == 0) {
+ PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_TRUE;
}
+ /* Copy array, so the in-place modifications will not be visible to the callback function */
+ arr = zend_array_dup(arr);
+
+ retval = zend_hash_sort(arr, compare_func, renumber) != FAILURE;
+
+ zval_ptr_dtor(array);
+ ZVAL_ARR(array, arr);
+
PHP_ARRAY_CMP_FUNC_RESTORE();
+ RETURN_BOOL(retval);
+}
+/* }}} */
+
+/* {{{ proto bool usort(array array_arg, string cmp_function)
+ Sort an array by values using a user-defined comparison function */
+PHP_FUNCTION(usort)
+{
+ php_usort(INTERNAL_FUNCTION_PARAM_PASSTHRU, php_array_user_compare, 1);
}
/* }}} */
@@ -664,44 +1071,7 @@ PHP_FUNCTION(usort)
Sort an array with a user-defined comparison function and maintain index association */
PHP_FUNCTION(uasort)
{
- zval *array;
- zend_refcounted *arr;
- unsigned int refcount;
- PHP_ARRAY_CMP_FUNC_VARS;
-
- PHP_ARRAY_CMP_FUNC_BACKUP();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/f", &array, &BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE) {
- PHP_ARRAY_CMP_FUNC_RESTORE();
- return;
- }
-
- /* Increase reference counter, so the attempts to modify the array in user
- * comparison function will create a copy of array and won't affect the
- * original array. The fact of modification is detected using refcount
- * comparison. The result of sorting in such case is undefined and the
- * function returns FALSE.
- */
- Z_ADDREF_P(array);
- refcount = Z_REFCOUNT_P(array);
- arr = Z_COUNTED_P(array);
-
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_user_compare, 0) == FAILURE) {
- RETVAL_FALSE;
- } else {
- if (refcount > Z_REFCOUNT_P(array)) {
- php_error_docref(NULL, E_WARNING, "Array was modified by the user comparison function");
- if (--GC_REFCOUNT(arr) <= 0) {
- _zval_dtor_func(arr ZEND_FILE_LINE_CC);
- }
- RETVAL_FALSE;
- } else {
- Z_DELREF_P(array);
- RETVAL_TRUE;
- }
- }
-
- PHP_ARRAY_CMP_FUNC_RESTORE();
+ php_usort(INTERNAL_FUNCTION_PARAM_PASSTHRU, php_array_user_compare, 0);
}
/* }}} */
@@ -752,44 +1122,7 @@ static int php_array_user_key_compare(const void *a, const void *b) /* {{{ */
Sort an array by keys using a user-defined comparison function */
PHP_FUNCTION(uksort)
{
- zval *array;
- zend_refcounted *arr;
- unsigned int refcount;
- PHP_ARRAY_CMP_FUNC_VARS;
-
- PHP_ARRAY_CMP_FUNC_BACKUP();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/f", &array, &BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE) {
- PHP_ARRAY_CMP_FUNC_RESTORE();
- return;
- }
-
- /* Increase reference counter, so the attempts to modify the array in user
- * comparison function will create a copy of array and won't affect the
- * original array. The fact of modification is detected using refcount
- * comparison. The result of sorting in such case is undefined and the
- * function returns FALSE.
- */
- Z_ADDREF_P(array);
- refcount = Z_REFCOUNT_P(array);
- arr = Z_COUNTED_P(array);
-
- if (zend_hash_sort(Z_ARRVAL_P(array), php_array_user_key_compare, 0) == FAILURE) {
- RETVAL_FALSE;
- } else {
- if (refcount > Z_REFCOUNT_P(array)) {
- php_error_docref(NULL, E_WARNING, "Array was modified by the user comparison function");
- if (--GC_REFCOUNT(arr) <= 0) {
- _zval_dtor_func(arr ZEND_FILE_LINE_CC);
- }
- RETVAL_FALSE;
- } else {
- Z_DELREF_P(array);
- RETVAL_TRUE;
- }
- }
-
- PHP_ARRAY_CMP_FUNC_RESTORE();
+ php_usort(INTERNAL_FUNCTION_PARAM_PASSTHRU, php_array_user_key_compare, 0);
}
/* }}} */
@@ -990,8 +1323,6 @@ PHP_FUNCTION(min)
return;
}
- php_set_compare_func(PHP_SORT_REGULAR);
-
/* mixed min ( array $values ) */
if (argc == 1) {
zval *result;
@@ -1039,8 +1370,6 @@ PHP_FUNCTION(max)
return;
}
- php_set_compare_func(PHP_SORT_REGULAR);
-
/* mixed max ( array $values ) */
if (argc == 1) {
zval *result;
@@ -1084,7 +1413,6 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive)
*zv;
/* Set up known arguments */
- ZVAL_UNDEF(&retval);
ZVAL_UNDEF(&args[1]);
if (userdata) {
ZVAL_COPY(&args[2], userdata);
@@ -1112,12 +1440,9 @@ static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive)
zend_fcall_info orig_array_walk_fci;
zend_fcall_info_cache orig_array_walk_fci_cache;
- if (Z_ISREF_P(zv)) {
- thash = Z_ARRVAL_P(Z_REFVAL_P(zv));
- } else {
- SEPARATE_ZVAL(zv);
- thash = Z_ARRVAL_P(zv);
- }
+ ZVAL_DEREF(zv);
+ SEPARATE_ARRAY(zv);
+ thash = Z_ARRVAL_P(zv);
if (thash->u.v.nApplyCount > 1) {
php_error_docref(NULL, E_WARNING, "recursion detected");
if (userdata) {
@@ -1433,7 +1758,7 @@ PHPAPI int php_prefix_varname(zval *result, zval *prefix, char *var_name, size_t
Imports variables into symbol table from an array */
PHP_FUNCTION(extract)
{
- zval *var_array, *prefix = NULL;
+ zval *var_array_param, *prefix = NULL;
zend_long extract_type = EXTR_OVERWRITE;
zval *entry;
zend_string *var_name;
@@ -1441,14 +1766,15 @@ PHP_FUNCTION(extract)
int var_exists, count = 0;
int extract_refs = 0;
zend_array *symbol_table;
+ zval var_array;
#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|lz/", &var_array, &extract_type, &prefix) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|lz/", &var_array_param, &extract_type, &prefix) == FAILURE) {
return;
}
#else
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ARRAY(var_array)
+ Z_PARAM_ARRAY(var_array_param)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(extract_type)
Z_PARAM_ZVAL_EX(prefix, 0, 1)
@@ -1457,7 +1783,7 @@ PHP_FUNCTION(extract)
extract_refs = (extract_type & EXTR_REFS);
if (extract_refs) {
- SEPARATE_ZVAL(var_array);
+ SEPARATE_ZVAL(var_array_param);
}
extract_type &= 0xff;
@@ -1479,6 +1805,10 @@ PHP_FUNCTION(extract)
}
}
+ if (zend_forbid_dynamic_call("extract()") == FAILURE) {
+ return;
+ }
+
symbol_table = zend_rebuild_symbol_table();
#if 0
if (!symbol_table) {
@@ -1487,7 +1817,11 @@ PHP_FUNCTION(extract)
}
#endif
- ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(var_array), num_key, var_name, entry) {
+ /* The array might be stored in a local variable that will be overwritten. To avoid losing the
+ * reference in that case we work on a copy. */
+ ZVAL_COPY(&var_array, var_array_param);
+
+ ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL(var_array), num_key, var_name, entry) {
zval final_name;
ZVAL_NULL(&final_name);
@@ -1513,8 +1847,11 @@ PHP_FUNCTION(extract)
if (var_exists && ZSTR_LEN(var_name) == sizeof("GLOBALS")-1 && !strcmp(ZSTR_VAL(var_name), "GLOBALS")) {
break;
}
- if (var_exists && ZSTR_LEN(var_name) == sizeof("this")-1 && !strcmp(ZSTR_VAL(var_name), "this") && EG(scope) && ZSTR_LEN(EG(scope)->name) != 0) {
- break;
+ if (var_exists && ZSTR_LEN(var_name) == sizeof("this")-1 && !strcmp(ZSTR_VAL(var_name), "this")) {
+ zend_class_entry *scope = zend_get_executed_scope();
+ if (scope && ZSTR_LEN(scope->name) != 0) {
+ break;
+ }
}
ZVAL_STR_COPY(&final_name, var_name);
break;
@@ -1555,8 +1892,8 @@ PHP_FUNCTION(extract)
}
if (Z_TYPE(final_name) == IS_STRING && php_valid_var_name(Z_STRVAL(final_name), Z_STRLEN(final_name))) {
+ zval *orig_var;
if (extract_refs) {
- zval *orig_var;
ZVAL_MAKE_REF(entry);
Z_ADDREF_P(entry);
@@ -1571,13 +1908,24 @@ PHP_FUNCTION(extract)
zend_hash_update(symbol_table, Z_STR(final_name), entry);
}
} else {
+ ZVAL_DEREF(entry);
if (Z_REFCOUNTED_P(entry)) Z_ADDREF_P(entry);
- zend_hash_update_ind(symbol_table, Z_STR(final_name), entry);
+ if ((orig_var = zend_hash_find(symbol_table, Z_STR(final_name))) != NULL) {
+ if (Z_TYPE_P(orig_var) == IS_INDIRECT) {
+ orig_var = Z_INDIRECT_P(orig_var);
+ }
+ ZVAL_DEREF(orig_var);
+ zval_ptr_dtor(orig_var);
+ ZVAL_COPY_VALUE(orig_var, entry);
+ } else {
+ zend_hash_update(symbol_table, Z_STR(final_name), entry);
+ }
}
count++;
}
zval_dtor(&final_name);
} ZEND_HASH_FOREACH_END();
+ zval_ptr_dtor(&var_array);
RETURN_LONG(count);
}
@@ -1590,7 +1938,8 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_valu
ZVAL_DEREF(entry);
if (Z_TYPE_P(entry) == IS_STRING) {
if ((value_ptr = zend_hash_find_ind(eg_active_symbol_table, Z_STR_P(entry))) != NULL) {
- ZVAL_DUP(&data, value_ptr);
+ ZVAL_DEREF(value_ptr);
+ ZVAL_COPY(&data, value_ptr);
zend_hash_update(Z_ARRVAL_P(return_value), Z_STR_P(entry), &data);
}
} else if (Z_TYPE_P(entry) == IS_ARRAY) {
@@ -1624,7 +1973,14 @@ PHP_FUNCTION(compact)
return;
}
+ if (zend_forbid_dynamic_call("compact()") == FAILURE) {
+ return;
+ }
+
symbol_table = zend_rebuild_symbol_table();
+ if (UNEXPECTED(symbol_table == NULL)) {
+ return;
+ }
/* compact() is probably most used with a single array of var_names
or multiple string names, rather than a combination of both.
@@ -1648,34 +2004,73 @@ PHP_FUNCTION(array_fill)
zval *val;
zend_long start_key, num;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "llz", &start_key, &num, &val) == FAILURE) {
return;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(3, 3)
+ Z_PARAM_LONG(start_key)
+ Z_PARAM_LONG(num)
+ Z_PARAM_ZVAL(val)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
- if (num < 0) {
- php_error_docref(NULL, E_WARNING, "Number of elements can't be negative");
- RETURN_FALSE;
- }
+ if (EXPECTED(num > 0)) {
+ if (sizeof(num) > 4 && UNEXPECTED(EXPECTED(num > 0x7fffffff))) {
+ php_error_docref(NULL, E_WARNING, "Too many elements");
+ RETURN_FALSE;
+ } else if (UNEXPECTED(start_key > ZEND_LONG_MAX - num + 1)) {
+ php_error_docref(NULL, E_WARNING, "Cannot add element to the array as the next element is already occupied");
+ RETURN_FALSE;
+ } else if (EXPECTED(start_key >= 0) && EXPECTED(start_key < num)) {
+ /* create packed array */
+ Bucket *p;
+ zend_long n;
- /* allocate an array for return */
- array_init_size(return_value, (uint32_t)num);
+ array_init_size(return_value, (uint32_t)(start_key + num));
+ zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
+ Z_ARRVAL_P(return_value)->nNumUsed = start_key + num;
+ Z_ARRVAL_P(return_value)->nNumOfElements = num;
+ Z_ARRVAL_P(return_value)->nInternalPointer = start_key;
+ Z_ARRVAL_P(return_value)->nNextFreeElement = start_key + num;
- if (num == 0) {
- return;
- }
+ if (Z_REFCOUNTED_P(val)) {
+ GC_REFCOUNT(Z_COUNTED_P(val)) += num;
+ }
- num--;
- zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val);
- Z_TRY_ADDREF_P(val);
+ p = Z_ARRVAL_P(return_value)->arData;
+ n = start_key;
- while (num--) {
- if (zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val) != NULL) {
- Z_TRY_ADDREF_P(val);
+ while (start_key--) {
+ ZVAL_UNDEF(&p->val);
+ p++;
+ }
+ while (num--) {
+ ZVAL_COPY_VALUE(&p->val, val);
+ p->h = n++;
+ p->key = NULL;
+ p++;
+ }
} else {
- zval_dtor(return_value);
- php_error_docref(NULL, E_WARNING, "Cannot add element to the array as the next element is already occupied");
- RETURN_FALSE;
+ /* create hash */
+ array_init_size(return_value, (uint32_t)num);
+ zend_hash_real_init(Z_ARRVAL_P(return_value), 0);
+ if (Z_REFCOUNTED_P(val)) {
+ GC_REFCOUNT(Z_COUNTED_P(val)) += num;
+ }
+ zend_hash_index_add_new(Z_ARRVAL_P(return_value), start_key, val);
+ while (--num) {
+ zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), val);
+ start_key++;
+ }
}
+ } else if (EXPECTED(num == 0)) {
+ array_init(return_value);
+ return;
+ } else {
+ php_error_docref(NULL, E_WARNING, "Number of elements can't be negative");
+ RETURN_FALSE;
}
}
/* }}} */
@@ -1707,6 +2102,28 @@ PHP_FUNCTION(array_fill_keys)
}
/* }}} */
+#define RANGE_CHECK_DOUBLE_INIT_ARRAY(start, end) do { \
+ double __calc_size = ((start - end) / step) + 1; \
+ if (__calc_size >= (double)HT_MAX_SIZE) { \
+ php_error_docref(NULL, E_WARNING, "The supplied range exceeds the maximum array size: start=%0.0f end=%0.0f", end, start); \
+ RETURN_FALSE; \
+ } \
+ size = (uint32_t)round(__calc_size); \
+ array_init_size(return_value, size); \
+ zend_hash_real_init(Z_ARRVAL_P(return_value), 1); \
+ } while (0)
+
+#define RANGE_CHECK_LONG_INIT_ARRAY(start, end) do { \
+ zend_ulong __calc_size = (start - end) / lstep; \
+ if (__calc_size >= HT_MAX_SIZE - 1) { \
+ php_error_docref(NULL, E_WARNING, "The supplied range exceeds the maximum array size: start=%pd end=%pd", end, start); \
+ RETURN_FALSE; \
+ } \
+ size = (uint32_t)(__calc_size + 1); \
+ array_init_size(return_value, size); \
+ zend_hash_real_init(Z_ARRVAL_P(return_value), 1); \
+ } while (0)
+
/* {{{ proto array range(mixed low, mixed high[, int step])
Create an array containing the range of integers or characters from low to high (inclusive) */
PHP_FUNCTION(range)
@@ -1803,12 +2220,16 @@ PHP_FUNCTION(range)
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &tmp);
}
} else if (Z_TYPE_P(zlow) == IS_DOUBLE || Z_TYPE_P(zhigh) == IS_DOUBLE || is_step_double) {
- double low, high, value;
- zend_long i;
+ double low, high, element;
+ uint32_t i, size;
double_str:
low = zval_get_double(zlow);
high = zval_get_double(zhigh);
- i = 0;
+
+ if (zend_isinf(high) || zend_isinf(low)) {
+ php_error_docref(NULL, E_WARNING, "Invalid range supplied: start=%0.0f end=%0.0f", low, high);
+ RETURN_FALSE;
+ }
Z_TYPE_INFO(tmp) = IS_DOUBLE;
if (low > high) { /* Negative steps */
@@ -1817,13 +2238,13 @@ double_str:
goto err;
}
- array_init_size(return_value, (uint32_t)(((low - high) / step) + 1));
- zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
+ RANGE_CHECK_DOUBLE_INIT_ARRAY(low, high);
+
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
- for (value = low; value >= (high - DOUBLE_DRIFT_FIX); value = low - (++i * step)) {
- Z_DVAL(tmp) = value;
- ZEND_HASH_FILL_ADD(&tmp);
- }
+ for (i = 0, element = low; i < size && element >= high; ++i, element = low - (i * step)) {
+ Z_DVAL(tmp) = element;
+ ZEND_HASH_FILL_ADD(&tmp);
+ }
} ZEND_HASH_FILL_END();
} else if (high > low) { /* Positive steps */
if (high - low < step || step <= 0) {
@@ -1831,11 +2252,11 @@ double_str:
goto err;
}
- array_init_size(return_value, (uint32_t)(((high - low) / step) + 1));
- zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
+ RANGE_CHECK_DOUBLE_INIT_ARRAY(high, low);
+
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
- for (value = low; value <= (high + DOUBLE_DRIFT_FIX); value = low + (++i * step)) {
- Z_DVAL(tmp) = value;
+ for (i = 0, element = low; i < size && element <= high; ++i, element = low + (i * step)) {
+ Z_DVAL(tmp) = element;
ZEND_HASH_FILL_ADD(&tmp);
}
} ZEND_HASH_FILL_END();
@@ -1845,43 +2266,53 @@ double_str:
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &tmp);
}
} else {
- double low, high;
- zend_long lstep;
+ zend_long low, high;
+ /* lstep is a ulong so that comparisons to it don't overflow, i.e. low - high < lstep */
+ zend_ulong lstep;
+ uint32_t i, size;
long_str:
- low = zval_get_double(zlow);
- high = zval_get_double(zhigh);
- lstep = (zend_long) step;
+ low = zval_get_long(zlow);
+ high = zval_get_long(zhigh);
+
+ if (step <= 0) {
+ err = 1;
+ goto err;
+ }
+
+ lstep = step;
Z_TYPE_INFO(tmp) = IS_LONG;
if (low > high) { /* Negative steps */
- if (low - high < lstep || lstep <= 0) {
+ if (low - high < lstep) {
err = 1;
goto err;
}
- array_init_size(return_value, (uint32_t)(((low - high) / lstep) + 1));
- zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
+
+ RANGE_CHECK_LONG_INIT_ARRAY(low, high);
+
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
- for (; low >= high; low -= lstep) {
- Z_LVAL(tmp) = (zend_long)low;
+ for (i = 0; i < size; ++i) {
+ Z_LVAL(tmp) = low - (i * lstep);
ZEND_HASH_FILL_ADD(&tmp);
}
} ZEND_HASH_FILL_END();
} else if (high > low) { /* Positive steps */
- if (high - low < lstep || lstep <= 0) {
+ if (high - low < lstep) {
err = 1;
goto err;
}
- array_init_size(return_value, (uint32_t)(((high - low) / lstep) + 1));
- zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
+
+ RANGE_CHECK_LONG_INIT_ARRAY(high, low);
+
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
- for (; low <= high; low += lstep) {
- Z_LVAL(tmp) = (zend_long)low;
+ for (i = 0; i < size; ++i) {
+ Z_LVAL(tmp) = low + (i * lstep);
ZEND_HASH_FILL_ADD(&tmp);
}
} ZEND_HASH_FILL_END();
} else {
array_init(return_value);
- Z_LVAL(tmp) = (zend_long)low;
+ Z_LVAL(tmp) = low;
zend_hash_next_index_insert_new(Z_ARRVAL_P(return_value), &tmp);
}
}
@@ -1893,6 +2324,9 @@ err:
}
/* }}} */
+#undef RANGE_CHECK_DOUBLE_INIT_ARRAY
+#undef RANGE_CHECK_LONG_INIT_ARRAY
+
static void php_array_data_shuffle(zval *array) /* {{{ */
{
uint32_t idx, j, n_elems;
@@ -2611,6 +3045,10 @@ PHPAPI int php_array_merge_recursive(HashTable *dest, HashTable *src) /* {{{ */
if (Z_TYPE_P(dest_zval) == IS_NULL) {
convert_to_array_ex(dest_zval);
add_next_index_null(dest_zval);
+ } else if (Z_TYPE_P(dest_zval) == IS_ARRAY) {
+ if (UNEXPECTED(Z_ARRVAL_P(dest_zval)->nNextFreeElement > Z_ARRVAL_P(dest_zval)->nNumUsed)) {
+ Z_ARRVAL_P(dest_zval)->nNextFreeElement = Z_ARRVAL_P(dest_zval)->nNumUsed;
+ }
} else {
convert_to_array_ex(dest_zval);
}
@@ -2661,15 +3099,20 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src) /* {{{ */
zend_string *string_key;
ZEND_HASH_FOREACH_STR_KEY_VAL(src, string_key, src_entry) {
- if (string_key) {
- if (Z_REFCOUNTED_P(src_entry)) {
+ if (Z_REFCOUNTED_P(src_entry)) {
+ if (UNEXPECTED(Z_ISREF_P(src_entry))
+ && UNEXPECTED(Z_REFCOUNT_P(src_entry) == 1)) {
+ ZVAL_UNREF(src_entry);
+ if (Z_REFCOUNTED_P(src_entry)) {
+ Z_ADDREF_P(src_entry);
+ }
+ } else {
Z_ADDREF_P(src_entry);
}
+ }
+ if (string_key) {
zend_hash_update(dest, string_key, src_entry);
} else {
- if (Z_REFCOUNTED_P(src_entry)) {
- Z_ADDREF_P(src_entry);
- }
zend_hash_next_index_insert_new(dest, src_entry);
}
} ZEND_HASH_FOREACH_END();
@@ -2796,15 +3239,19 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
src = Z_ARRVAL_P(arg);
dest = Z_ARRVAL_P(return_value);
ZEND_HASH_FOREACH_KEY_VAL(src, idx, string_key, src_entry) {
- if (string_key) {
- if (Z_REFCOUNTED_P(src_entry)) {
+ if (Z_REFCOUNTED_P(src_entry)) {
+ if (UNEXPECTED(Z_ISREF_P(src_entry) && Z_REFCOUNT_P(src_entry) == 1)) {
+ src_entry = Z_REFVAL_P(src_entry);
+ if (Z_REFCOUNTED_P(src_entry)) {
+ Z_ADDREF_P(src_entry);
+ }
+ } else {
Z_ADDREF_P(src_entry);
}
+ }
+ if (string_key) {
zend_hash_add_new(dest, string_key, src_entry);
} else {
- if (Z_REFCOUNTED_P(src_entry)) {
- Z_ADDREF_P(src_entry);
- }
zend_hash_index_add_new(dest, idx, src_entry);
}
} ZEND_HASH_FOREACH_END();
@@ -2833,15 +3280,19 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
src = Z_ARRVAL_P(arg);
dest = Z_ARRVAL_P(return_value);
ZEND_HASH_FOREACH_STR_KEY_VAL(src, string_key, src_entry) {
- if (string_key) {
- if (Z_REFCOUNTED_P(src_entry)) {
+ if (Z_REFCOUNTED_P(src_entry)) {
+ if (UNEXPECTED(Z_ISREF_P(src_entry) && Z_REFCOUNT_P(src_entry) == 1)) {
+ src_entry = Z_REFVAL_P(src_entry);
+ if (Z_REFCOUNTED_P(src_entry)) {
+ Z_ADDREF_P(src_entry);
+ }
+ } else {
Z_ADDREF_P(src_entry);
}
+ }
+ if (string_key) {
zend_hash_add_new(dest, string_key, src_entry);
} else {
- if (Z_REFCOUNTED_P(src_entry)) {
- Z_ADDREF_P(src_entry);
- }
zend_hash_next_index_insert_new(dest, src_entry);
}
} ZEND_HASH_FOREACH_END();
@@ -2926,6 +3377,7 @@ PHP_FUNCTION(array_keys)
if (strict) {
ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(input), num_idx, str_idx, entry) {
+ ZVAL_DEREF(entry);
if (fast_is_identical_function(search_value, entry)) {
if (str_idx) {
ZVAL_STR_COPY(&new_val, str_idx);
@@ -2949,6 +3401,9 @@ PHP_FUNCTION(array_keys)
}
} else {
array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(input)));
+ if (!zend_hash_num_elements(Z_ARRVAL_P(input))) {
+ return;
+ }
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
/* Go through input array and add keys to the return array */
@@ -2984,6 +3439,11 @@ PHP_FUNCTION(array_values)
/* Initialize return array */
array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(input)));
+
+ if (!zend_hash_num_elements(Z_ARRVAL_P(input))) {
+ return;
+ }
+
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
/* Go through input array and add values to the return array */
@@ -3073,20 +3533,29 @@ static inline zval *array_column_fetch_prop(zval *data, zval *name, zval *rv)
zval *prop = NULL;
if (Z_TYPE_P(data) == IS_OBJECT) {
- zend_string *key = zval_get_string(name);
+ if (!Z_OBJ_HANDLER_P(data, has_property) || !Z_OBJ_HANDLER_P(data, read_property)) {
+ return NULL;
+ }
- if (!Z_OBJ_HANDLER_P(data, has_property) || Z_OBJ_HANDLER_P(data, has_property)(data, name, 1, NULL)) {
- prop = zend_read_property(Z_OBJCE_P(data), data, ZSTR_VAL(key), ZSTR_LEN(key), 1, rv);
+ /* The has_property check is first performed in "exists" mode (which returns true for
+ * properties that are null but exist) and then in "has" mode to handle objects that
+ * implement __isset (which is not called in "exists" mode). */
+ if (Z_OBJ_HANDLER_P(data, has_property)(data, name, 2, NULL)
+ || Z_OBJ_HANDLER_P(data, has_property)(data, name, 0, NULL)) {
+ prop = Z_OBJ_HANDLER_P(data, read_property)(data, name, BP_VAR_R, NULL, rv);
}
- zend_string_release(key);
} else if (Z_TYPE_P(data) == IS_ARRAY) {
if (Z_TYPE_P(name) == IS_STRING) {
- prop = zend_hash_find(Z_ARRVAL_P(data), Z_STR_P(name));
+ prop = zend_symtable_find(Z_ARRVAL_P(data), Z_STR_P(name));
} else if (Z_TYPE_P(name) == IS_LONG) {
prop = zend_hash_index_find(Z_ARRVAL_P(data), Z_LVAL_P(name));
}
}
+ if (prop) {
+ ZVAL_DEREF(prop);
+ }
+
return prop;
}
@@ -3340,19 +3809,22 @@ PHP_FUNCTION(array_unique)
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
zend_long sort_type = PHP_SORT_STRING;
+ compare_func_t cmp;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|l", &array, &sort_type) == FAILURE) {
return;
}
- php_set_compare_func(sort_type);
+ cmp = php_get_data_compare_func(sort_type, 0);
- RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(array)));
if (Z_ARRVAL_P(array)->nNumOfElements <= 1) { /* nothing to do */
+ ZVAL_COPY(return_value, array);
return;
}
+ RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(array)));
+
/* create and sort array with pointers to the target_hash buckets */
arTmp = (struct bucketindex *) pemalloc((Z_ARRVAL_P(array)->nNumOfElements + 1) * sizeof(struct bucketindex), Z_ARRVAL_P(array)->u.flags & HASH_FLAG_PERSISTENT);
if (!arTmp) {
@@ -3369,11 +3841,11 @@ PHP_FUNCTION(array_unique)
}
ZVAL_UNDEF(&arTmp[i].b.val);
zend_sort((void *) arTmp, i, sizeof(struct bucketindex),
- php_array_data_compare, (swap_func_t)array_bucketindex_swap);
+ cmp, (swap_func_t)array_bucketindex_swap);
/* go through the sorted array and delete duplicates from the copy */
lastkept = arTmp;
for (cmpdata = arTmp + 1; Z_TYPE(cmpdata->b.val) != IS_UNDEF; cmpdata++) {
- if (php_array_data_compare(lastkept, cmpdata)) {
+ if (cmp(lastkept, cmpdata)) {
lastkept = cmpdata;
} else {
if (lastkept->i > cmpdata->i) {
@@ -3399,24 +3871,7 @@ PHP_FUNCTION(array_unique)
static int zval_compare(zval *first, zval *second) /* {{{ */
{
- zval result;
-
- if (Z_TYPE_P(first) == IS_INDIRECT) {
- first = Z_INDIRECT_P(first);
- }
- if (Z_TYPE_P(second) == IS_INDIRECT) {
- second = Z_INDIRECT_P(second);
- }
- if (string_compare_function(&result, first, second) == FAILURE) {
- return 0;
- }
-
- if (Z_TYPE(result) == IS_DOUBLE) {
- return ZEND_NORMALIZE_BOOL(Z_DVAL(result));
- }
-
- convert_to_long(&result);
- return ZEND_NORMALIZE_BOOL(Z_LVAL(result));
+ return string_compare_function(first, second);
}
/* }}} */
@@ -3425,13 +3880,6 @@ static int zval_user_compare(zval *a, zval *b) /* {{{ */
zval args[2];
zval retval;
- if (Z_TYPE_P(a) == IS_INDIRECT) {
- a = Z_INDIRECT_P(a);
- }
- if (Z_TYPE_P(b) == IS_INDIRECT) {
- b = Z_INDIRECT_P(b);
- }
-
ZVAL_COPY_VALUE(&args[0], a);
ZVAL_COPY_VALUE(&args[1], b);
@@ -3502,6 +3950,10 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa
p = Z_ARRVAL(args[0])->arData + idx;
val = &p->val;
if (Z_TYPE_P(val) == IS_UNDEF) continue;
+ if (UNEXPECTED(Z_TYPE_P(val) == IS_INDIRECT)) {
+ val = Z_INDIRECT_P(val);
+ if (Z_TYPE_P(val) == IS_UNDEF) continue;
+ }
if (Z_ISREF_P(val) && Z_REFCOUNT_P(val) == 1) {
ZVAL_UNREF(val);
}
@@ -3525,7 +3977,7 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa
} else {
ok = 1;
for (i = 1; i < argc; i++) {
- if ((data = zend_hash_find(Z_ARRVAL(args[i]), p->key)) == NULL ||
+ if ((data = zend_hash_find_ind(Z_ARRVAL(args[i]), p->key)) == NULL ||
(intersect_data_compare_func &&
intersect_data_compare_func(val, data) != 0)
) {
@@ -3563,13 +4015,13 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
int (*intersect_data_compare_func)(const void *, const void *);
if (behavior == INTERSECT_NORMAL) {
- intersect_key_compare_func = php_array_key_compare;
+ intersect_key_compare_func = php_array_key_compare_string;
if (data_compare_type == INTERSECT_COMP_DATA_INTERNAL) {
/* array_intersect() */
req_args = 2;
param_spec = "+";
- intersect_data_compare_func = php_array_data_compare;
+ intersect_data_compare_func = php_array_data_compare_string;
} else if (data_compare_type == INTERSECT_COMP_DATA_USER) {
/* array_uintersect() */
req_args = 3;
@@ -3594,19 +4046,19 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
} else if (behavior & INTERSECT_ASSOC) { /* triggered also when INTERSECT_KEY */
/* INTERSECT_KEY is subset of INTERSECT_ASSOC. When having the former
* no comparison of the data is done (part of INTERSECT_ASSOC) */
- intersect_key_compare_func = php_array_key_compare;
+ intersect_key_compare_func = php_array_key_compare_string;
if (data_compare_type == INTERSECT_COMP_DATA_INTERNAL && key_compare_type == INTERSECT_COMP_KEY_INTERNAL) {
/* array_intersect_assoc() or array_intersect_key() */
req_args = 2;
param_spec = "+";
- intersect_key_compare_func = php_array_key_compare;
- intersect_data_compare_func = php_array_data_compare;
+ intersect_key_compare_func = php_array_key_compare_string;
+ intersect_data_compare_func = php_array_data_compare_string;
} else if (data_compare_type == INTERSECT_COMP_DATA_USER && key_compare_type == INTERSECT_COMP_KEY_INTERNAL) {
/* array_uintersect_assoc() */
req_args = 3;
param_spec = "+f";
- intersect_key_compare_func = php_array_key_compare;
+ intersect_key_compare_func = php_array_key_compare_string;
intersect_data_compare_func = php_array_user_compare;
fci_data = &fci1;
fci_data_cache = &fci1_cache;
@@ -3615,7 +4067,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
req_args = 3;
param_spec = "+f";
intersect_key_compare_func = php_array_user_key_compare;
- intersect_data_compare_func = php_array_data_compare;
+ intersect_data_compare_func = php_array_data_compare_string;
fci_key = &fci1;
fci_key_cache = &fci1_cache;
} else if (data_compare_type == INTERSECT_COMP_DATA_USER && key_compare_type == INTERSECT_COMP_KEY_USER) {
@@ -3652,7 +4104,6 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
/* for each argument, create and sort list with pointers to the hash buckets */
lists = (Bucket **)safe_emalloc(arr_argc, sizeof(Bucket *), 0);
ptrs = (Bucket **)safe_emalloc(arr_argc, sizeof(Bucket *), 0);
- php_set_compare_func(PHP_SORT_STRING);
if (behavior == INTERSECT_NORMAL && data_compare_type == INTERSECT_COMP_DATA_USER) {
BG(user_compare_fci) = *fci_data;
@@ -3922,6 +4373,10 @@ static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_ty
p = Z_ARRVAL(args[0])->arData + idx;
val = &p->val;
if (Z_TYPE_P(val) == IS_UNDEF) continue;
+ if (UNEXPECTED(Z_TYPE_P(val) == IS_INDIRECT)) {
+ val = Z_INDIRECT_P(val);
+ if (Z_TYPE_P(val) == IS_UNDEF) continue;
+ }
if (Z_ISREF_P(val) && Z_REFCOUNT_P(val) == 1) {
ZVAL_UNREF(val);
}
@@ -3945,7 +4400,7 @@ static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_ty
} else {
ok = 1;
for (i = 1; i < argc; i++) {
- if ((data = zend_hash_find(Z_ARRVAL(args[i]), p->key)) != NULL &&
+ if ((data = zend_hash_find_ind(Z_ARRVAL(args[i]), p->key)) != NULL &&
(!diff_data_compare_func ||
diff_data_compare_func(val, data) == 0)
) {
@@ -3983,13 +4438,13 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
int (*diff_data_compare_func)(const void *, const void *);
if (behavior == DIFF_NORMAL) {
- diff_key_compare_func = php_array_key_compare;
+ diff_key_compare_func = php_array_key_compare_string;
if (data_compare_type == DIFF_COMP_DATA_INTERNAL) {
/* array_diff */
req_args = 2;
param_spec = "+";
- diff_data_compare_func = php_array_data_compare;
+ diff_data_compare_func = php_array_data_compare_string;
} else if (data_compare_type == DIFF_COMP_DATA_USER) {
/* array_udiff */
req_args = 3;
@@ -4019,13 +4474,13 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
/* array_diff_assoc() or array_diff_key() */
req_args = 2;
param_spec = "+";
- diff_key_compare_func = php_array_key_compare;
- diff_data_compare_func = php_array_data_compare;
+ diff_key_compare_func = php_array_key_compare_string;
+ diff_data_compare_func = php_array_data_compare_string;
} else if (data_compare_type == DIFF_COMP_DATA_USER && key_compare_type == DIFF_COMP_KEY_INTERNAL) {
/* array_udiff_assoc() */
req_args = 3;
param_spec = "+f";
- diff_key_compare_func = php_array_key_compare;
+ diff_key_compare_func = php_array_key_compare_string;
diff_data_compare_func = php_array_user_compare;
fci_data = &fci1;
fci_data_cache = &fci1_cache;
@@ -4034,7 +4489,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
req_args = 3;
param_spec = "+f";
diff_key_compare_func = php_array_user_key_compare;
- diff_data_compare_func = php_array_data_compare;
+ diff_data_compare_func = php_array_data_compare_string;
fci_key = &fci1;
fci_key_cache = &fci1_cache;
} else if (data_compare_type == DIFF_COMP_DATA_USER && key_compare_type == DIFF_COMP_KEY_USER) {
@@ -4071,7 +4526,6 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
/* for each argument, create and sort list with pointers to the hash buckets */
lists = (Bucket **)safe_emalloc(arr_argc, sizeof(Bucket *), 0);
ptrs = (Bucket **)safe_emalloc(arr_argc, sizeof(Bucket *), 0);
- php_set_compare_func(PHP_SORT_STRING);
if (behavior == DIFF_NORMAL && data_compare_type == DIFF_COMP_DATA_USER) {
BG(user_compare_fci) = *fci_data;
@@ -4366,15 +4820,10 @@ PHPAPI int php_multisort_compare(const void *a, const void *b) /* {{{ */
Bucket *bb = *(Bucket **)b;
int r;
zend_long result;
- zval temp;
r = 0;
do {
-
- php_set_compare_func(ARRAYG(multisort_flags)[MULTISORT_TYPE][r]);
-
- ARRAYG(compare_func)(&temp, &ab[r].val, &bb[r].val);
- result = ARRAYG(multisort_flags)[MULTISORT_ORDER][r] * Z_LVAL(temp);
+ result = ARRAYG(multisort_func)[r](&ab[r], &bb[r]);
if (result != 0) {
return result > 0 ? 1 : -1;
}
@@ -4385,10 +4834,9 @@ PHPAPI int php_multisort_compare(const void *a, const void *b) /* {{{ */
}
/* }}} */
-#define MULTISORT_ABORT \
- for (k = 0; k < MULTISORT_LAST; k++) \
- efree(ARRAYG(multisort_flags)[k]); \
- efree(arrays); \
+#define MULTISORT_ABORT \
+ efree(ARRAYG(multisort_func)); \
+ efree(arrays); \
RETURN_FALSE;
static void array_bucket_p_sawp(void *p, void *q) /* {{{ */ {
@@ -4428,8 +4876,8 @@ PHP_FUNCTION(array_multisort)
arrays = (zval **)ecalloc(argc, sizeof(zval *));
for (i = 0; i < MULTISORT_LAST; i++) {
parse_state[i] = 0;
- ARRAYG(multisort_flags)[i] = (int *)ecalloc(argc, sizeof(int));
}
+ ARRAYG(multisort_func) = (compare_func_t*)ecalloc(argc, sizeof(compare_func_t));
/* Here we go through the input arguments and parse them. Each one can
* be either an array or a sort flag which follows an array. If not
@@ -4445,8 +4893,7 @@ PHP_FUNCTION(array_multisort)
/* We see the next array, so we update the sort flags of
* the previous array and reset the sort flags. */
if (i > 0) {
- ARRAYG(multisort_flags)[MULTISORT_ORDER][num_arrays - 1] = sort_order;
- ARRAYG(multisort_flags)[MULTISORT_TYPE][num_arrays - 1] = sort_type;
+ ARRAYG(multisort_func)[num_arrays - 1] = php_get_data_compare_func(sort_type, sort_order != PHP_SORT_ASC);
sort_order = PHP_SORT_ASC;
sort_type = PHP_SORT_REGULAR;
}
@@ -4463,7 +4910,7 @@ PHP_FUNCTION(array_multisort)
/* flag allowed here */
if (parse_state[MULTISORT_ORDER] == 1) {
/* Save the flag and make sure then next arg is not the current flag. */
- sort_order = Z_LVAL_P(arg) == PHP_SORT_DESC ? -1 : 1;
+ sort_order = Z_LVAL_P(arg) == PHP_SORT_DESC ? PHP_SORT_DESC : PHP_SORT_ASC;
parse_state[MULTISORT_ORDER] = 0;
} else {
php_error_docref(NULL, E_WARNING, "Argument #%d is expected to be an array or sorting flag that has not already been specified", i + 1);
@@ -4501,8 +4948,7 @@ PHP_FUNCTION(array_multisort)
}
}
/* Take care of the last array sort flags. */
- ARRAYG(multisort_flags)[MULTISORT_ORDER][num_arrays - 1] = sort_order;
- ARRAYG(multisort_flags)[MULTISORT_TYPE][num_arrays - 1] = sort_type;
+ ARRAYG(multisort_func)[num_arrays - 1] = php_get_data_compare_func(sort_type, sort_order != PHP_SORT_ASC);
/* Make sure the arrays are of the same size. */
array_size = zend_hash_num_elements(Z_ARRVAL_P(arrays[0]));
@@ -4515,9 +4961,7 @@ PHP_FUNCTION(array_multisort)
/* If all arrays are empty we don't need to do anything. */
if (array_size < 1) {
- for (k = 0; k < MULTISORT_LAST; k++) {
- efree(ARRAYG(multisort_flags)[k]);
- }
+ efree(ARRAYG(multisort_func));
efree(arrays);
RETURN_TRUE;
}
@@ -4578,9 +5022,7 @@ PHP_FUNCTION(array_multisort)
efree(indirect[i]);
}
efree(indirect);
- for (k = 0; k < MULTISORT_LAST; k++) {
- efree(ARRAYG(multisort_flags)[k]);
- }
+ efree(ARRAYG(multisort_func));
efree(arrays);
RETURN_TRUE;
}
@@ -4807,7 +5249,7 @@ PHP_FUNCTION(array_filter)
}
}
- ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_key, string_key, operand) {
+ ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(array), num_key, string_key, operand) {
if (have_callback) {
if (use_type) {
/* Set up the key */
@@ -5041,7 +5483,7 @@ PHP_FUNCTION(array_key_exists)
switch (Z_TYPE_P(key)) {
case IS_STRING:
- if (zend_symtable_exists(array, Z_STR_P(key))) {
+ if (zend_symtable_exists_ind(array, Z_STR_P(key))) {
RETURN_TRUE;
}
RETURN_FALSE;
@@ -5051,7 +5493,7 @@ PHP_FUNCTION(array_key_exists)
}
RETURN_FALSE;
case IS_NULL:
- if (zend_hash_exists(array, ZSTR_EMPTY_ALLOC())) {
+ if (zend_hash_exists_ind(array, ZSTR_EMPTY_ALLOC())) {
RETURN_TRUE;
}
RETURN_FALSE;
@@ -5132,17 +5574,17 @@ PHP_FUNCTION(array_chunk)
Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values */
PHP_FUNCTION(array_combine)
{
- zval *values, *keys;
+ HashTable *values, *keys;
uint32_t pos_values = 0;
zval *entry_keys, *entry_values;
int num_keys, num_values;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "aa", &keys, &values) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "hh", &keys, &values) == FAILURE) {
return;
}
- num_keys = zend_hash_num_elements(Z_ARRVAL_P(keys));
- num_values = zend_hash_num_elements(Z_ARRVAL_P(values));
+ num_keys = zend_hash_num_elements(keys);
+ num_values = zend_hash_num_elements(values);
if (num_keys != num_values) {
php_error_docref(NULL, E_WARNING, "Both parameters should have an equal number of elements");
@@ -5155,12 +5597,12 @@ PHP_FUNCTION(array_combine)
return;
}
- ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(keys), entry_keys) {
+ ZEND_HASH_FOREACH_VAL(keys, entry_keys) {
while (1) {
- if (pos_values >= Z_ARRVAL_P(values)->nNumUsed) {
+ if (pos_values >= values->nNumUsed) {
break;
- } else if (Z_TYPE(Z_ARRVAL_P(values)->arData[pos_values].val) != IS_UNDEF) {
- entry_values = &Z_ARRVAL_P(values)->arData[pos_values].val;
+ } else if (Z_TYPE(values->arData[pos_values].val) != IS_UNDEF) {
+ entry_values = &values->arData[pos_values].val;
if (Z_TYPE_P(entry_keys) == IS_LONG) {
entry_values = zend_hash_index_update(Z_ARRVAL_P(return_value),
Z_LVAL_P(entry_keys), entry_values);
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 162b58ae25..016c90e02e 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,11 +39,7 @@ ZEND_DECLARE_MODULE_GLOBALS(assert)
static zend_class_entry *assertion_error_ce;
-#ifdef ZTS
-#define ASSERTG(v) ZEND_TSRMG(assert_globals_id, zend_assert_globals *, v)
-#else
-#define ASSERTG(v) (assert_globals.v)
-#endif
+#define ASSERTG(v) ZEND_MODULE_GLOBALS_ACCESSOR(assert, v)
#define SAFE_STRING(s) ((s)?(s):"")
@@ -169,6 +165,10 @@ PHP_FUNCTION(assert)
zval retval;
int old_error_reporting = 0; /* shut up gcc! */
+ if (zend_forbid_dynamic_call("assert() with string argument") == FAILURE) {
+ RETURN_FALSE;
+ }
+
myeval = Z_STRVAL_P(assertion);
if (ASSERTG(quiet_eval)) {
@@ -246,7 +246,7 @@ PHP_FUNCTION(assert)
if (!description) {
zend_throw_exception(assertion_error_ce, NULL, E_ERROR);
} else if (Z_TYPE_P(description) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(description), assertion_error_ce)) {
+ instanceof_function(Z_OBJCE_P(description), zend_ce_throwable)) {
Z_ADDREF_P(description);
zend_throw_exception_object(description);
} else {
@@ -275,6 +275,8 @@ PHP_FUNCTION(assert)
if (ASSERTG(bail)) {
zend_bailout();
}
+
+ RETURN_FALSE;
}
/* }}} */
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index c4f66e638a..81f826c9a8 100644
--- a/ext/standard/base64.c
+++ b/ext/standard/base64.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/base64.h b/ext/standard/base64.h
index ddd8e47170..acc357a29f 100644
--- a/ext/standard/base64.h
+++ b/ext/standard/base64.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 1d5e1dd7b2..5fb5246d92 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,6 +23,7 @@
#include "php_streams.h"
#include "php_main.h"
#include "php_globals.h"
+#include "php_variables.h"
#include "php_ini.h"
#include "php_standard.h"
#include "php_math.h"
@@ -451,8 +452,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_array_change_key_case, 0, 0, 1)
ZEND_ARG_INFO(0, case)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_array_unique, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array_unique, 0, 0, 1)
ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
+ ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_intersect_key, 0, 0, 2)
@@ -631,7 +633,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0)
ZEND_ARG_INFO(0, proper_address)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_getenv, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 0)
ZEND_ARG_INFO(0, varname)
ZEND_END_ARG_INFO()
@@ -870,12 +872,10 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ crypt.c */
-#if HAVE_CRYPT
ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, salt)
ZEND_END_ARG_INFO()
-#endif
/* }}} */
/* {{{ cyr_convert.c */
ZEND_BEGIN_ARG_INFO(arginfo_convert_cyr_string, 0)
@@ -1763,7 +1763,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_intdiv, 0)
- ZEND_ARG_INFO(0, numerator)
+ ZEND_ARG_INFO(0, dividend)
ZEND_ARG_INFO(0, divisor)
ZEND_END_ARG_INFO()
/* }}} */
@@ -2213,8 +2213,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_basename, 0, 0, 1)
ZEND_ARG_INFO(0, suffix)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_dirname, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dirname, 0, 0, 1)
ZEND_ARG_INFO(0, path)
+ ZEND_ARG_INFO(0, levels)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_pathinfo, 0, 0, 1)
@@ -2596,6 +2597,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_get_headers, 0, 0, 1)
ZEND_ARG_INFO(0, url)
ZEND_ARG_INFO(0, format)
+ ZEND_ARG_INFO(0, context)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ user_filters.c */
@@ -2653,8 +2655,9 @@ ZEND_BEGIN_ARG_INFO(arginfo_serialize, 0)
ZEND_ARG_INFO(0, var)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_unserialize, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_unserialize, 0, 0, 1)
ZEND_ARG_INFO(0, variable_representation)
+ ZEND_ARG_INFO(0, allowed_classes)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_memory_get_usage, 0, 0, 0)
@@ -3165,10 +3168,8 @@ const zend_function_entry basic_functions[] = { /* {{{ */
/* functions from browscap.c */
PHP_FE(get_browser, arginfo_get_browser)
-#if HAVE_CRYPT
/* functions from crypt.c */
PHP_FE(crypt, arginfo_crypt)
-#endif
/* functions from dir.c */
PHP_FE(opendir, arginfo_opendir)
@@ -3488,8 +3489,8 @@ PHPAPI double php_get_nan(void) /* {{{ */
return HUGE_VAL + -HUGE_VAL;
#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
double val = 0.0;
- ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
- ((php_uint32*)&val)[0] = 0;
+ ((uint32_t*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
+ ((uint32_t*)&val)[0] = 0;
return val;
#elif HAVE_ATOF_ACCEPTS_NAN
return atof("NAN");
@@ -3505,8 +3506,8 @@ PHPAPI double php_get_inf(void) /* {{{ */
return HUGE_VAL;
#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
double val = 0.0;
- ((php_uint32*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
- ((php_uint32*)&val)[0] = 0;
+ ((uint32_t*)&val)[1] = PHP_DOUBLE_INFINITY_HIGH;
+ ((uint32_t*)&val)[0] = 0;
return val;
#elif HAVE_ATOF_ACCEPTS_INF
return atof("INF");
@@ -3638,10 +3639,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
BASIC_MINIT_SUBMODULE(nl_langinfo)
#endif
-#if HAVE_CRYPT
BASIC_MINIT_SUBMODULE(crypt)
-#endif
-
BASIC_MINIT_SUBMODULE(lcg)
BASIC_MINIT_SUBMODULE(dir)
@@ -3654,6 +3652,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
BASIC_MINIT_SUBMODULE(proc_open)
#endif
+ BASIC_MINIT_SUBMODULE(exec)
BASIC_MINIT_SUBMODULE(user_streams)
BASIC_MINIT_SUBMODULE(imagetypes)
@@ -3709,10 +3708,7 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
#if defined(HAVE_LOCALECONV) && defined(ZTS)
BASIC_MSHUTDOWN_SUBMODULE(localeconv)
#endif
-#if HAVE_CRYPT
BASIC_MSHUTDOWN_SUBMODULE(crypt)
-#endif
-
BASIC_MSHUTDOWN_SUBMODULE(random)
zend_hash_destroy(&basic_submodules);
@@ -3838,20 +3834,21 @@ PHP_FUNCTION(constant)
{
zend_string *const_name;
zval *c;
+ zend_class_entry *scope;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &const_name) == FAILURE) {
return;
}
- c = zend_get_constant_ex(const_name, NULL, ZEND_FETCH_CLASS_SILENT);
+ scope = zend_get_executed_scope();
+ c = zend_get_constant_ex(const_name, scope, ZEND_FETCH_CLASS_SILENT);
if (c) {
- ZVAL_COPY_VALUE(return_value, c);
+ ZVAL_DUP(return_value, c);
if (Z_CONSTANT_P(return_value)) {
- if (UNEXPECTED(zval_update_constant_ex(return_value, 1, NULL) != SUCCESS)) {
+ if (UNEXPECTED(zval_update_constant_ex(return_value, scope) != SUCCESS)) {
return;
}
}
- zval_copy_ctor(return_value);
} else {
php_error_docref(NULL, E_WARNING, "Couldn't find constant %s", ZSTR_VAL(const_name));
RETURN_NULL();
@@ -3973,22 +3970,17 @@ PHP_FUNCTION(ip2long)
Converts an (IPv4) Internet network address into a string in Internet standard dotted format */
PHP_FUNCTION(long2ip)
{
- /* "It's a long but it's not, PHP ints are signed */
- char *ip;
- size_t ip_len;
- uint32_t n;
+ zend_ulong ip;
struct in_addr myaddr;
#ifdef HAVE_INET_PTON
char str[40];
#endif
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &ip, &ip_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ip) == FAILURE) {
return;
}
- n = strtoul(ip, NULL, 0);
-
- myaddr.s_addr = htonl(n);
+ myaddr.s_addr = htonl(ip);
#ifdef HAVE_INET_PTON
if (inet_ntop(AF_INET, &myaddr, str, sizeof(str))) {
RETURN_STRING(str);
@@ -4005,17 +3997,24 @@ PHP_FUNCTION(long2ip)
* System Functions *
********************/
-/* {{{ proto string getenv(string varname)
- Get the value of an environment variable */
+/* {{{ proto string getenv([string varname])
+ Get the value of an environment variable or every available environment variable
+ if no varname is present */
PHP_FUNCTION(getenv)
{
- char *ptr, *str;
+ char *ptr, *str = NULL;
size_t str_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &str, &str_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &str, &str_len) == FAILURE) {
RETURN_FALSE;
}
+ if (!str) {
+ array_init(return_value);
+ php_import_environment_variables(return_value);
+ return;
+ }
+
/* SAPI method returns an emalloc()'d string */
ptr = sapi_getenv(str, str_len);
if (ptr) {
@@ -4263,7 +4262,7 @@ PHP_FUNCTION(getopt)
* in order to be on the safe side, even though it is also available
* from the symbol table. */
if ((Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY || zend_is_auto_global_str(ZEND_STRL("_SERVER"))) &&
- ((args = zend_hash_str_find_ind(HASH_OF(&PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv")-1)) != NULL ||
+ ((args = zend_hash_str_find_ind(Z_ARRVAL_P(&PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv")-1)) != NULL ||
(args = zend_hash_str_find_ind(&EG(symbol_table), "argv", sizeof("argv")-1)) != NULL)
) {
int pos = 0;
@@ -4377,23 +4376,23 @@ PHP_FUNCTION(getopt)
if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) {
/* numeric string */
int optname_int = atoi(optname);
- if ((args = zend_hash_index_find(HASH_OF(return_value), optname_int)) != NULL) {
+ if ((args = zend_hash_index_find(Z_ARRVAL_P(return_value), optname_int)) != NULL) {
if (Z_TYPE_P(args) != IS_ARRAY) {
convert_to_array_ex(args);
}
- zend_hash_next_index_insert(HASH_OF(args), &val);
+ zend_hash_next_index_insert(Z_ARRVAL_P(args), &val);
} else {
- zend_hash_index_update(HASH_OF(return_value), optname_int, &val);
+ zend_hash_index_update(Z_ARRVAL_P(return_value), optname_int, &val);
}
} else {
/* other strings */
- if ((args = zend_hash_str_find(HASH_OF(return_value), optname, strlen(optname))) != NULL) {
+ if ((args = zend_hash_str_find(Z_ARRVAL_P(return_value), optname, strlen(optname))) != NULL) {
if (Z_TYPE_P(args) != IS_ARRAY) {
convert_to_array_ex(args);
}
- zend_hash_next_index_insert(HASH_OF(args), &val);
+ zend_hash_next_index_insert(Z_ARRVAL_P(args), &val);
} else {
- zend_hash_str_add(HASH_OF(return_value), optname, strlen(optname), &val);
+ zend_hash_str_add(Z_ARRVAL_P(return_value), optname, strlen(optname), &val);
}
}
@@ -4705,7 +4704,7 @@ PHPAPI int _php_error_log_ex(int opt_err, char *message, size_t message_len, cha
break;
default:
- php_log_err(message);
+ php_log_err_with_severity(message, LOG_NOTICE);
break;
}
return SUCCESS;
@@ -4832,7 +4831,7 @@ PHP_FUNCTION(forward_static_call)
fci.retval = &retval;
called_scope = zend_get_called_scope(execute_data);
- if (called_scope &&
+ if (called_scope && fci_cache.calling_scope &&
instanceof_function(called_scope, fci_cache.calling_scope)) {
fci_cache.called_scope = called_scope;
}
@@ -4860,7 +4859,7 @@ PHP_FUNCTION(forward_static_call_array)
fci.retval = &retval;
called_scope = zend_get_called_scope(execute_data);
- if (called_scope &&
+ if (called_scope && fci_cache.calling_scope &&
instanceof_function(called_scope, fci_cache.calling_scope)) {
fci_cache.called_scope = called_scope;
}
@@ -4966,9 +4965,8 @@ static void user_tick_function_call(user_tick_function_entry *tick_fe) /* {{{ */
}
/* }}} */
-static void run_user_tick_functions(int tick_count) /* {{{ */
+static void run_user_tick_functions(int tick_count, void *arg) /* {{{ */
{
-
zend_llist_apply(BG(user_tick_functions), (llist_apply_func_t) user_tick_function_call);
}
/* }}} */
@@ -5004,7 +5002,6 @@ PHPAPI void php_call_shutdown_functions(void) /* {{{ */
zend_hash_apply(BG(user_shutdown_function_names), user_shutdown_function_call);
}
zend_end_try();
- php_free_shutdown_functions();
}
}
/* }}} */
@@ -5523,8 +5520,8 @@ PHP_FUNCTION(ignore_user_abort)
old_setting = PG(ignore_user_abort);
- if (arg) {
- zend_string *key = zend_string_init("ignore_user_abort", sizeof("ignore_user_abort"), 0);
+ if (ZEND_NUM_ARGS()) {
+ zend_string *key = zend_string_init("ignore_user_abort", sizeof("ignore_user_abort") - 1, 0);
zend_alter_ini_entry_chars(key, arg ? "1" : "0", 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
zend_string_release(key);
}
@@ -5678,7 +5675,7 @@ PHP_FUNCTION(register_tick_function)
zend_llist_init(BG(user_tick_functions),
sizeof(user_tick_function_entry),
(llist_dtor_func_t) user_tick_function_dtor, 0);
- php_add_tick_function(run_user_tick_functions);
+ php_add_tick_function(run_user_tick_functions, NULL);
}
for (i = 0; i < tick_fe.arg_count; i++) {
@@ -5843,11 +5840,11 @@ static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int cal
}
ZVAL_DUP(&element, arg2);
-
- if (arg3 && Z_STRLEN_P(arg3) > 0) {
- zend_symtable_update(Z_ARRVAL_P(find_hash), Z_STR_P(arg3), &element);
- } else {
+ if (!arg3 || (Z_TYPE_P(arg3) == IS_STRING && Z_STRLEN_P(arg3) == 0)) {
add_next_index_zval(find_hash, &element);
+ } else {
+ array_set_zval_key(Z_ARRVAL_P(find_hash), arg3, &element);
+ zval_ptr_dtor(&element);
}
}
break;
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 3b69da043b..e37bca31d6 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -149,20 +149,12 @@ PHPAPI int _php_error_log(int opt_err, char *message, char *opt, char *headers);
PHPAPI int _php_error_log_ex(int opt_err, char *message, size_t message_len, char *opt, char *headers);
PHPAPI int php_prefix_varname(zval *result, zval *prefix, char *var_name, size_t var_name_len, zend_bool add_underscore);
-#if SIZEOF_INT == 4
-/* Most 32-bit and 64-bit systems have 32-bit ints */
-typedef unsigned int php_uint32;
-typedef signed int php_int32;
-#elif SIZEOF_LONG == 4
-/* 16-bit systems? */
-typedef unsigned long php_uint32;
-typedef signed long php_int32;
-#else
-#error Need type which holds 32 bits
-#endif
-
#define MT_N (624)
+/* Deprecated type aliases -- use the standard types instead */
+typedef uint32_t php_uint32;
+typedef int32_t php_int32;
+
typedef struct _php_basic_globals {
HashTable *user_shutdown_function_names;
HashTable putenv_ht;
@@ -193,8 +185,8 @@ typedef struct _php_basic_globals {
php_stream_statbuf ssb, lssb;
/* rand.c */
- php_uint32 state[MT_N+1]; /* state vector + 1 extra to not violate ANSI C */
- php_uint32 *next; /* next random value is computed from here */
+ uint32_t state[MT_N+1]; /* state vector + 1 extra to not violate ANSI C */
+ uint32_t *next; /* next random value is computed from here */
int left; /* can *next++ this many times before reloading */
unsigned int rand_seed; /* Seed for rand(), in ts version */
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 86d1cf5835..f47478a241 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -44,12 +44,7 @@ ZEND_BEGIN_MODULE_GLOBALS(browscap)
ZEND_END_MODULE_GLOBALS(browscap)
ZEND_DECLARE_MODULE_GLOBALS(browscap)
-
-#ifdef ZTS
-#define BROWSCAP_G(v) ZEND_TSRMG(browscap_globals_id, zend_browscap_globals *, v)
-#else
-#define BROWSCAP_G(v) (browscap_globals.v)
-#endif
+#define BROWSCAP_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(browscap, v)
#define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
index c75b141c80..26eb056321 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -69,11 +69,12 @@ AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
#include <crypt.h>
#endif
-main() {
+int main() {
#if HAVE_CRYPT
- exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
+ char *encrypted = crypt("rasmuslerdorf","rl");
+ exit(!encrypted || strcmp(encrypted,"rl.3StKT.4T8M"));
#else
- exit(0);
+ exit(1);
#endif
}],[
ac_cv_crypt_des=yes
@@ -93,11 +94,12 @@ AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[
#include <crypt.h>
#endif
-main() {
+int main() {
#if HAVE_CRYPT
- exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
+ char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
+ exit(!encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc"));
#else
- exit(0);
+ exit(1);
#endif
}],[
ac_cv_crypt_ext_des=yes
@@ -117,20 +119,22 @@ AC_TRY_RUN([
#include <crypt.h>
#endif
-main() {
+int main() {
#if HAVE_CRYPT
- char salt[15], answer[40];
-
- salt[0]='$'; salt[1]='1'; salt[2]='$';
- salt[3]='r'; salt[4]='a'; salt[5]='s';
- salt[6]='m'; salt[7]='u'; salt[8]='s';
- salt[9]='l'; salt[10]='e'; salt[11]='$';
- salt[12]='\0';
- strcpy(answer,salt);
- strcat(answer,"rISCgZzpwk3UhDidwXvin0");
- exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+ char salt[15], answer[40];
+ char *encrypted;
+
+ salt[0]='$'; salt[1]='1'; salt[2]='$';
+ salt[3]='r'; salt[4]='a'; salt[5]='s';
+ salt[6]='m'; salt[7]='u'; salt[8]='s';
+ salt[9]='l'; salt[10]='e'; salt[11]='$';
+ salt[12]='\0';
+ strcpy(answer,salt);
+ strcat(answer,"rISCgZzpwk3UhDidwXvin0");
+ encrypted = crypt("rasmuslerdorf",salt);
+ exit(!encrypted || strcmp(encrypted,answer));
#else
- exit(0);
+ exit(1);
#endif
}],[
ac_cv_crypt_md5=yes
@@ -150,17 +154,19 @@ AC_TRY_RUN([
#include <crypt.h>
#endif
-main() {
+int main() {
#if HAVE_CRYPT
- char salt[30], answer[70];
-
- salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
- strcat(salt,"rasmuslerd............");
- strcpy(answer,salt);
- strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
- exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+ char salt[30], answer[70];
+ char *encrypted;
+
+ salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
+ strcat(salt,"rasmuslerd............");
+ strcpy(answer,salt);
+ strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
+ encrypted = crypt("rasmuslerdorf",salt);
+ exit(!encrypted || strcmp(encrypted,answer));
#else
- exit(0);
+ exit(1);
#endif
}],[
ac_cv_crypt_blowfish=yes
@@ -180,16 +186,18 @@ AC_TRY_RUN([
#include <crypt.h>
#endif
-main() {
+int main() {
#if HAVE_CRYPT
- char salt[21], answer[21+86];
-
- strcpy(salt,"\$6\$rasmuslerdorf\$");
- strcpy(answer, salt);
- strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
- exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+ char salt[21], answer[21+86];
+ char *encrypted;
+
+ strcpy(salt,"\$6\$rasmuslerdorf\$");
+ strcpy(answer, salt);
+ strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
+ encrypted = crypt("rasmuslerdorf",salt);
+ exit(!encrypted || strcmp(encrypted,answer));
#else
- exit(0);
+ exit(1);
#endif
}],[
ac_cv_crypt_sha512=yes
@@ -209,17 +217,18 @@ AC_TRY_RUN([
#include <crypt.h>
#endif
-main() {
+int main() {
#if HAVE_CRYPT
- char salt[21], answer[21+43];
-
- strcpy(salt,"\$5\$rasmuslerdorf\$");
- strcpy(answer, salt);
- strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
- exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
-
+ char salt[21], answer[21+43];
+ char *encrypted;
+
+ strcpy(salt,"\$5\$rasmuslerdorf\$");
+ strcpy(answer, salt);
+ strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
+ encrypted = crypt("rasmuslerdorf",salt);
+ exit(!encrypted || strcmp(encrypted,answer));
#else
- exit(0);
+ exit(1);
#endif
}],[
ac_cv_crypt_sha256=yes
@@ -233,7 +242,7 @@ main() {
dnl
dnl If one of them is missing, use our own implementation, portable code is then possible
dnl
-if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then
+if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no" || test "x$php_crypt_r" = "x0"; then
dnl
dnl Check for __alignof__ support in the compiler
@@ -251,90 +260,29 @@ if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test
AC_DEFINE([HAVE_ALIGNOF], 1, [whether the compiler supports __alignof__])
fi
- dnl
- dnl Check for __attribute__ ((__aligned__)) support in the compiler
- dnl
- AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[
- AC_TRY_COMPILE([
- ],[
- unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
- ],[
- ac_cv_attribute_aligned=yes
- ],[
- ac_cv_attribute_aligned=no
- ])])
- if test "$ac_cv_attribute_aligned" = "yes"; then
- AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))])
- fi
-
-
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
- AC_DEFINE_UNQUOTED(PHP_STD_DES_CRYPT, 1, [Whether the system supports standard DES salt])
- AC_DEFINE_UNQUOTED(PHP_BLOWFISH_CRYPT, 1, [Whether the system supports BlowFish salt])
- AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, 1, [Whether the system supports extended DES salt])
- AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, 1, [Whether the system supports MD5 salt])
- AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, 1, [Whether the system supports SHA512 salt])
- AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, 1, [Whether the system supports SHA256 salt])
PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
else
- if test "$ac_cv_crypt_des" = "yes"; then
- ac_result=1
- ac_crypt_des=1
- else
- ac_result=0
- ac_crypt_des=0
- fi
- AC_DEFINE_UNQUOTED(PHP_STD_DES_CRYPT, $ac_result, [Whether the system supports standard DES salt])
-
- if test "$ac_cv_crypt_blowfish" = "yes"; then
- ac_result=1
- ac_crypt_blowfish=1
- else
- ac_result=0
- ac_crypt_blowfish=0
- fi
- AC_DEFINE_UNQUOTED(PHP_BLOWFISH_CRYPT, $ac_result, [Whether the system supports BlowFish salt])
-
- if test "$ac_cv_crypt_ext_des" = "yes"; then
- ac_result=1
- ac_crypt_edes=1
- else
- ac_result=0
- ac_crypt_edes=0
- fi
- AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, $ac_result, [Whether the system supports extended DES salt])
-
- if test "$ac_cv_crypt_md5" = "yes"; then
- ac_result=1
- ac_crypt_md5=1
- else
- ac_result=0
- ac_crypt_md5=0
- fi
- AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt])
-
- if test "$ac_cv_crypt_sha512" = "yes"; then
- ac_result=1
- ac_crypt_sha512=1
- else
- ac_result=0
- ac_crypt_sha512=0
- fi
- AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
-
- if test "$ac_cv_crypt_sha256" = "yes"; then
- ac_result=1
- ac_crypt_sha256=1
- else
- ac_result=0
- ac_crypt_sha256=0
- fi
- AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt])
-
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des])
fi
+dnl
+dnl Check for __attribute__ ((__aligned__)) support in the compiler
+dnl
+AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[
+AC_TRY_COMPILE([
+],[
+ unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
+],[
+ ac_cv_attribute_aligned=yes
+],[
+ ac_cv_attribute_aligned=no
+])])
+if test "$ac_cv_attribute_aligned" = "yes"; then
+ AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))])
+fi
+
dnl
dnl Check for available functions
dnl
@@ -598,6 +546,11 @@ dnl
AC_CHECK_DECLS([arc4random_buf])
dnl
+dnl Check for getrandom on newer Linux kernels
+dnl
+AC_CHECK_DECLS([getrandom])
+
+dnl
dnl Setup extension sources
dnl
PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c
index f3c6a02129..e6024dcf11 100644
--- a/ext/standard/crc32.c
+++ b/ext/standard/crc32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,8 +28,8 @@ PHP_NAMED_FUNCTION(php_if_crc32)
{
char *p;
size_t nr;
- php_uint32 crcinit = 0;
- register php_uint32 crc;
+ uint32_t crcinit = 0;
+ register uint32_t crc;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &p, &nr) == FAILURE) {
return;
diff --git a/ext/standard/crc32.h b/ext/standard/crc32.h
index b35f8ced1f..259645295d 100644
--- a/ext/standard/crc32.h
+++ b/ext/standard/crc32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/credits.c b/ext/standard/credits.c
index dc40c637b7..25eaa3c63d 100644
--- a/ext/standard/credits.c
+++ b/ext/standard/credits.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/credits.h b/ext/standard/credits.h
index 7bbbdc9973..5b6d84bbb9 100644
--- a/ext/standard/credits.h
+++ b/ext/standard/credits.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/credits_ext.h b/ext/standard/credits_ext.h
index a0f578bda8..68afee6735 100644
--- a/ext/standard/credits_ext.h
+++ b/ext/standard/credits_ext.h
@@ -17,8 +17,8 @@ CREDIT_LINE("COM and .Net", "Wez Furlong");
CREDIT_LINE("ctype", "Hartmut Holzgraefe");
CREDIT_LINE("cURL", "Sterling Hughes");
CREDIT_LINE("Date/Time Support", "Derick Rethans");
-CREDIT_LINE("DB-LIB (MS SQL, Sybase)", "Wez Furlong, Frank M. Kromann");
CREDIT_LINE("DBA", "Sascha Schumann, Marcus Boerger");
+CREDIT_LINE("DB-LIB (MS SQL, Sybase)", "Wez Furlong, Frank M. Kromann");
CREDIT_LINE("DOM", "Christian Stocker, Rob Richards, Marcus Boerger");
CREDIT_LINE("enchant", "Pierre-Alain Joye, Ilia Alshanetsky");
CREDIT_LINE("EXIF", "Rasmus Lerdorf, Marcus Boerger");
@@ -66,17 +66,17 @@ CREDIT_LINE("SNMP", "Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven Law
CREDIT_LINE("SOAP", "Brad Lafountain, Shane Caraveo, Dmitry Stogov");
CREDIT_LINE("Sockets", "Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason Greene");
CREDIT_LINE("SPL", "Marcus Boerger, Etienne Kneuss");
-CREDIT_LINE("SQLite 3.x driver for PDO", "Wez Furlong");
CREDIT_LINE("SQLite3", "Scott MacVicar, Ilia Alshanetsky, Brad Dewar");
+CREDIT_LINE("SQLite 3.x driver for PDO", "Wez Furlong");
CREDIT_LINE("System V Message based IPC", "Wez Furlong");
CREDIT_LINE("System V Semaphores", "Tom May");
CREDIT_LINE("System V Shared Memory", "Christian Cartus");
CREDIT_LINE("tidy", "John Coggeshall, Ilia Alshanetsky");
CREDIT_LINE("tokenizer", "Andrei Zmievski, Johannes Schlueter");
CREDIT_LINE("WDDX", "Andrei Zmievski");
-CREDIT_LINE("XML", "Stig Bakken, Thies C. Arntzen, Sterling Hughes");
CREDIT_LINE("XMLReader", "Rob Richards");
CREDIT_LINE("xmlrpc", "Dan Libby");
+CREDIT_LINE("XML", "Stig Bakken, Thies C. Arntzen, Sterling Hughes");
CREDIT_LINE("XMLWriter", "Rob Richards, Pierre-Alain Joye");
CREDIT_LINE("XSL", "Christian Stocker, Rob Richards");
CREDIT_LINE("Zip", "Pierre-Alain Joye, Remi Collet");
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 74ab291f62..9249d9d96b 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include "php.h"
-#if HAVE_CRYPT
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -59,44 +58,8 @@
#include "php_crypt.h"
#include "php_rand.h"
-/* The capabilities of the crypt() function is determined by the test programs
- * run by configure from aclocal.m4. They will set PHP_STD_DES_CRYPT,
- * PHP_EXT_DES_CRYPT, PHP_MD5_CRYPT and PHP_BLOWFISH_CRYPT as appropriate
- * for the target platform. */
-
-#if PHP_STD_DES_CRYPT
-#define PHP_MAX_SALT_LEN 2
-#endif
-
-#if PHP_EXT_DES_CRYPT
-#undef PHP_MAX_SALT_LEN
-#define PHP_MAX_SALT_LEN 9
-#endif
-
-#if PHP_MD5_CRYPT
-#undef PHP_MAX_SALT_LEN
-#define PHP_MAX_SALT_LEN 12
-#endif
-
-#if PHP_BLOWFISH_CRYPT
-#undef PHP_MAX_SALT_LEN
-#define PHP_MAX_SALT_LEN 60
-#endif
-
-#if PHP_SHA512_CRYPT
-#undef PHP_MAX_SALT_LEN
+/* sha512 crypt has the maximal salt length of 123 characters */
#define PHP_MAX_SALT_LEN 123
-#endif
-
-
-/* If the configure-time checks fail, we provide DES.
- * XXX: This is a hack. Fix the real problem! */
-
-#ifndef PHP_MAX_SALT_LEN
-#define PHP_MAX_SALT_LEN 2
-#undef PHP_STD_DES_CRYPT
-#define PHP_STD_DES_CRYPT 1
-#endif
#define PHP_CRYPT_RAND php_rand()
@@ -109,18 +72,12 @@
PHP_MINIT_FUNCTION(crypt) /* {{{ */
{
REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", PHP_MAX_SALT_LEN, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CRYPT_STD_DES", PHP_STD_DES_CRYPT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CRYPT_EXT_DES", PHP_EXT_DES_CRYPT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CRYPT_MD5", PHP_MD5_CRYPT, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("CRYPT_BLOWFISH", PHP_BLOWFISH_CRYPT, CONST_CS | CONST_PERSISTENT);
-
-#ifdef PHP_SHA256_CRYPT
- REGISTER_LONG_CONSTANT("CRYPT_SHA256", PHP_SHA256_CRYPT, CONST_CS | CONST_PERSISTENT);
-#endif
-
-#ifdef PHP_SHA512_CRYPT
- REGISTER_LONG_CONSTANT("CRYPT_SHA512", PHP_SHA512_CRYPT, CONST_CS | CONST_PERSISTENT);
-#endif
+ REGISTER_LONG_CONSTANT("CRYPT_STD_DES", 1, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("CRYPT_EXT_DES", 1, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("CRYPT_MD5", 1, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("CRYPT_BLOWFISH", 1, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("CRYPT_SHA256", 1, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("CRYPT_SHA512", 1, CONST_CS | CONST_PERSISTENT);
#if PHP_USE_PHP_CRYPT_R
php_init_crypt_r();
@@ -246,6 +203,13 @@ PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const ch
}
#else
+ if (salt[0] != '$' && salt[0] != '_' && (!IS_VALID_SALT_CHARACTER(salt[0]) || !IS_VALID_SALT_CHARACTER(salt[1]))) {
+ if (!quiet) {
+ /* error consistently about invalid DES fallbacks */
+ php_error_docref(NULL, E_DEPRECATED, DES_INVALID_SALT_ERROR);
+ }
+ }
+
# if defined(HAVE_CRYPT_R) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
{
# if defined(CRYPT_R_STRUCT_CRYPT_DATA)
@@ -254,24 +218,23 @@ PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const ch
# elif defined(CRYPT_R_CRYPTD)
CRYPTD buffer;
# else
-# error Data struct used by crypt_r() is unknown. Please report.
+# error Data struct used by crypt_r() is unknown. Please report.
# endif
- if (salt[0] != '$' && salt[0] != '_' && (!IS_VALID_SALT_CHARACTER(salt[0]) || !IS_VALID_SALT_CHARACTER(salt[1]))) {
- if (!quiet) {
- /* error consistently about invalid DES fallbacks */
- php_error_docref(NULL, E_DEPRECATED, DES_INVALID_SALT_ERROR);
- }
- }
crypt_res = crypt_r(password, salt, &buffer);
- if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
- return NULL;
- } else {
- result = zend_string_init(crypt_res, strlen(crypt_res), 0);
- return result;
- }
}
+# elif defined(HAVE_CRYPT)
+ crypt_res = crypt(password, salt);
+# else
+# error No crypt() implementation
# endif
#endif
+
+ if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
+ return NULL;
+ } else {
+ result = zend_string_init(crypt_res, strlen(crypt_res), 0);
+ return result;
+ }
}
/* }}} */
@@ -303,15 +266,10 @@ PHP_FUNCTION(crypt)
/* The automatic salt generation covers standard DES, md5-crypt and Blowfish (simple) */
if (!*salt) {
-#if PHP_MD5_CRYPT
strncpy(salt, "$1$", PHP_MAX_SALT_LEN);
php_to64(&salt[3], PHP_CRYPT_RAND, 4);
php_to64(&salt[7], PHP_CRYPT_RAND, 4);
strncpy(&salt[11], "$", PHP_MAX_SALT_LEN - 11);
-#elif PHP_STD_DES_CRYPT
- php_to64(&salt[0], PHP_CRYPT_RAND, 2);
- salt[2] = '\0';
-#endif
salt_in_len = strlen(salt);
} else {
salt_in_len = MIN(PHP_MAX_SALT_LEN, salt_in_len);
@@ -328,7 +286,6 @@ PHP_FUNCTION(crypt)
RETURN_STR(result);
}
/* }}} */
-#endif
/*
* Local variables:
diff --git a/ext/standard/crypt_freesec.c b/ext/standard/crypt_freesec.c
index b7de5a4c02..dddab62a61 100644
--- a/ext/standard/crypt_freesec.c
+++ b/ext/standard/crypt_freesec.c
@@ -218,7 +218,6 @@ _crypt_extended_init(void)
uint32_t *p, *il, *ir, *fl, *fr;
uint32_t *bits28, *bits24;
u_char inv_key_perm[64];
- u_char u_key_perm[56];
u_char inv_comp_perm[56];
u_char init_perm[64], final_perm[64];
u_char u_sbox[8][64];
@@ -260,7 +259,6 @@ _crypt_extended_init(void)
* compression permutation.
*/
for (i = 0; i < 56; i++) {
- u_key_perm[i] = key_perm[i] - 1;
inv_key_perm[key_perm[i] - 1] = i;
inv_comp_perm[i] = 255;
}
@@ -582,7 +580,7 @@ static int
des_cipher(const char *in, char *out, uint32_t salt, int count,
struct php_crypt_extended_data *data)
{
- uint32_t l_out, r_out, rawl, rawr;
+ uint32_t l_out = 0, r_out = 0, rawl, rawr;
int retval;
setup_salt(salt, data);
@@ -633,7 +631,7 @@ _crypt_extended_r(const char *key, const char *setting,
if (*key)
key++;
}
- if (des_setkey((u_char *) keybuf, data))
+ if (des_setkey((char *) keybuf, data))
return(NULL);
if (*setting == _PASSWORD_EFMT1) {
@@ -662,7 +660,7 @@ _crypt_extended_r(const char *key, const char *setting,
/*
* Encrypt the key with itself.
*/
- if (des_cipher((u_char *) keybuf, (u_char *) keybuf,
+ if (des_cipher((char *) keybuf, (char *) keybuf,
0, 1, data))
return(NULL);
/*
@@ -672,7 +670,7 @@ _crypt_extended_r(const char *key, const char *setting,
while (q - (u_char *) keybuf < sizeof(keybuf) && *key)
*q++ ^= *key++ << 1;
- if (des_setkey((u_char *) keybuf, data))
+ if (des_setkey((char *) keybuf, data))
return(NULL);
}
memcpy(data->output, setting, 9);
diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c
index d79d14510a..38c285942e 100644
--- a/ext/standard/crypt_sha256.c
+++ b/ext/standard/crypt_sha256.c
@@ -596,8 +596,8 @@ char * php_sha256_crypt(const char *key, const char *salt)
password. We can compute an upper bound for the size of the
result in advance and so we can prepare the buffer we pass to
`sha256_crypt_r'. */
- static char *buffer;
- static int buflen;
+ ZEND_TLS char *buffer;
+ ZEND_TLS int buflen = 0;
int needed = (sizeof(sha256_salt_prefix) - 1
+ sizeof(sha256_rounds_prefix) + 9 + 1
+ (int)strlen(salt) + 1 + 43 + 1);
diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c
index df5f3d109e..3cef9a3437 100644
--- a/ext/standard/crypt_sha512.c
+++ b/ext/standard/crypt_sha512.c
@@ -643,8 +643,8 @@ php_sha512_crypt(const char *key, const char *salt) {
password. We can compute an upper bound for the size of the
result in advance and so we can prepare the buffer we pass to
`sha512_crypt_r'. */
- static char *buffer;
- static int buflen;
+ ZEND_TLS char *buffer;
+ ZEND_TLS int buflen = 0;
int needed = (int)(sizeof(sha512_salt_prefix) - 1
+ sizeof(sha512_rounds_prefix) + 9 + 1
+ strlen(salt) + 1 + 86 + 1);
diff --git a/ext/standard/css.c b/ext/standard/css.c
index b805915b5e..0d36bfba95 100644
--- a/ext/standard/css.c
+++ b/ext/standard/css.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -37,7 +37,7 @@ PHPAPI void php_info_print_css(void) /* {{{ */
PUTS(".p {text-align: left;}\n");
PUTS(".e {background-color: #ccf; width: 300px; font-weight: bold;}\n");
PUTS(".h {background-color: #99c; font-weight: bold;}\n");
- PUTS(".v {background-color: #ddd; max-width: 300px; overflow-x: auto;}\n");
+ PUTS(".v {background-color: #ddd; max-width: 300px; overflow-x: auto; word-wrap: break-word;}\n");
PUTS(".v i {color: #999;}\n");
PUTS("img {float: right; border: 0;}\n");
PUTS("hr {width: 934px; background-color: #ccc; border: 0; height: 1px;}\n");
diff --git a/ext/standard/css.h b/ext/standard/css.h
index 03550c25be..95ca665fb0 100644
--- a/ext/standard/css.h
+++ b/ext/standard/css.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c
index 209be271b5..8baef3d06c 100644
--- a/ext/standard/cyr_convert.c
+++ b/ext/standard/cyr_convert.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/cyr_convert.h b/ext/standard/cyr_convert.h
index 64c53c0d8c..812d0d726a 100644
--- a/ext/standard/cyr_convert.h
+++ b/ext/standard/cyr_convert.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 86ac6eba39..3e6d6a2338 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h
index 147520265f..b92f2581b5 100644
--- a/ext/standard/datetime.h
+++ b/ext/standard/datetime.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 463cfa9223..810dc18026 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index cadbc140cc..eae7630fe5 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -71,7 +71,7 @@ PHPAPI PHP_FUNCTION(dl)
}
php_dl(filename, MODULE_TEMPORARY, return_value, 0);
- if (Z_LVAL_P(return_value) == 1) {
+ if (Z_TYPE_P(return_value) == IS_TRUE) {
EG(full_tables_cleanup) = 1;
}
}
@@ -237,7 +237,7 @@ PHP_MINFO_FUNCTION(dl)
PHPAPI void php_dl(char *file, int type, zval *return_value, int start_now)
{
php_error_docref(NULL, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", file);
- RETURN_FALSE;
+ RETVAL_FALSE;
}
PHP_MINFO_FUNCTION(dl)
diff --git a/ext/standard/dl.h b/ext/standard/dl.h
index 73150d32c9..4af9c52b88 100644
--- a/ext/standard/dl.h
+++ b/ext/standard/dl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 52773abfb7..de40649e69 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -251,7 +251,7 @@ PHP_FUNCTION(gethostbynamel)
RETURN_FALSE;
}
- hp = gethostbyname(hostname);
+ hp = php_network_gethostbyname(hostname);
if (hp == NULL || hp->h_addr_list == NULL) {
RETURN_FALSE;
}
@@ -272,7 +272,7 @@ static zend_string *php_gethostbyname(char *name)
struct in_addr in;
char *address;
- hp = gethostbyname(name);
+ hp = php_network_gethostbyname(name);
if (!hp || !*(hp->h_addr_list)) {
return zend_string_init(name, strlen(name), 0);
diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c
index 00908b722f..c9c23415d9 100644
--- a/ext/standard/dns_win32.c
+++ b/ext/standard/dns_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2008-2009 The PHP Group |
+ | Copyright (c) 2008-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -146,6 +146,8 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, int raw,
type = pRec->wType;
ttl = pRec->dwTtl;
+ ZVAL_UNDEF(subarray);
+
if (type_to_fetch != DNS_TYPE_ANY && type != type_to_fetch) {
return;
}
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 55d777cb92..a73d0b4e6e 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -46,10 +46,43 @@
#include <fcntl.h>
#endif
-#if HAVE_NICE && HAVE_UNISTD_H
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+static int cmd_max_len;
+
+/* {{{ PHP_MINIT_FUNCTION(exec) */
+PHP_MINIT_FUNCTION(exec)
+{
+#ifdef _SC_ARG_MAX
+ cmd_max_len = sysconf(_SC_ARG_MAX);
+ if (-1 == cmd_max_len) {
+#ifdef _POSIX_ARG_MAX
+ cmd_max_len = _POSIX_ARG_MAX;
+#else
+ cmd_max_len = 4096;
+#endif
+ }
+#elif defined(ARG_MAX)
+ cmd_max_len = ARG_MAX;
+#elif defined(PHP_WIN32)
+ /* Executed commands will run through cmd.exe. As long as it's the case,
+ it's just the constant limit.*/
+ cmd_max_len = 8192;
+#else
+ /* This is just an arbitrary value for the fallback case. */
+ cmd_max_len = 4096;
+#endif
+
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ php_exec
* If type==0, only last line of output is returned (exec)
* If type==1, all lines will be printed and last lined returned (system)
@@ -116,7 +149,7 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value)
} else if (type == 2) {
/* strip trailing whitespaces */
l = bufl;
- while (l >= 1 && l-- && isspace(((unsigned char *)buf)[l]));
+ while (l-- > 0 && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
@@ -129,7 +162,7 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value)
/* strip trailing whitespaces if we have not done so already */
if ((type == 2 && buf != b) || type != 2) {
l = bufl;
- while (l >= 1 && l-- && isspace(((unsigned char *)buf)[l]));
+ while (l-- > 0 && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
@@ -245,15 +278,21 @@ PHP_FUNCTION(passthru)
*/
PHPAPI zend_string *php_escape_shell_cmd(char *str)
{
- register int x, y, l = (int)strlen(str);
- size_t estimate = (2 * l) + 1;
+ register int x, y;
+ size_t l = strlen(str);
+ uint64_t estimate = (2 * (uint64_t)l) + 1;
zend_string *cmd;
#ifndef PHP_WIN32
char *p = NULL;
#endif
+ /* max command line length - two single quotes - \0 byte length */
+ if (l > cmd_max_len - 2 - 1) {
+ php_error_docref(NULL, E_ERROR, "Command exceeds the allowed length of %d bytes", cmd_max_len);
+ return ZSTR_EMPTY_ALLOC();
+ }
- cmd = zend_string_alloc(2 * l, 0);
+ cmd = zend_string_safe_alloc(2, l, 0, 0);
for (x = 0, y = 0; x < l; x++) {
int mb_len = php_mblen(str + x, (l - x));
@@ -324,6 +363,12 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str)
}
ZSTR_VAL(cmd)[y] = '\0';
+ if (y - 1 > cmd_max_len) {
+ php_error_docref(NULL, E_ERROR, "Escaped command exceeds the allowed length of %d bytes", cmd_max_len);
+ zend_string_release(cmd);
+ return ZSTR_EMPTY_ALLOC();
+ }
+
if ((estimate - y) > 4096) {
/* realloc if the estimate was way overill
* Arbitrary cutoff point of 4096 */
@@ -340,12 +385,18 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str)
*/
PHPAPI zend_string *php_escape_shell_arg(char *str)
{
- int x, y = 0, l = (int)strlen(str);
+ int x, y = 0;
+ size_t l = strlen(str);
zend_string *cmd;
- size_t estimate = (4 * l) + 3;
+ uint64_t estimate = (4 * (uint64_t)l) + 3;
+ /* max command line length - two single quotes - \0 byte length */
+ if (l > cmd_max_len - 2 - 1) {
+ php_error_docref(NULL, E_ERROR, "Argument exceeds the allowed length of %d bytes", cmd_max_len);
+ return ZSTR_EMPTY_ALLOC();
+ }
- cmd = zend_string_alloc(4 * l + 2, 0); /* worst case */
+ cmd = zend_string_safe_alloc(4, l, 2, 0); /* worst case */
#ifdef PHP_WIN32
ZSTR_VAL(cmd)[y++] = '"';
@@ -399,6 +450,12 @@ PHPAPI zend_string *php_escape_shell_arg(char *str)
#endif
ZSTR_VAL(cmd)[y] = '\0';
+ if (y - 1 > cmd_max_len) {
+ php_error_docref(NULL, E_ERROR, "Escaped argument exceeds the allowed length of %d bytes", cmd_max_len);
+ zend_string_release(cmd);
+ return ZSTR_EMPTY_ALLOC();
+ }
+
if ((estimate - y) > 4096) {
/* realloc if the estimate was way overill
* Arbitrary cutoff point of 4096 */
@@ -421,6 +478,10 @@ PHP_FUNCTION(escapeshellcmd)
}
if (command_len) {
+ if (command_len != strlen(command)) {
+ php_error_docref(NULL, E_ERROR, "Input string contains NULL bytes");
+ return;
+ }
RETVAL_STR(php_escape_shell_cmd(command));
} else {
RETVAL_EMPTY_STRING();
@@ -440,6 +501,10 @@ PHP_FUNCTION(escapeshellarg)
}
if (argument) {
+ if (argument_len != strlen(argument)) {
+ php_error_docref(NULL, E_ERROR, "Input string contains NULL bytes");
+ return;
+ }
RETVAL_STR(php_escape_shell_arg(argument));
}
}
diff --git a/ext/standard/exec.h b/ext/standard/exec.h
index acb6c9ae51..b1cbf29c13 100644
--- a/ext/standard/exec.h
+++ b/ext/standard/exec.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,6 +33,7 @@ PHP_FUNCTION(proc_close);
PHP_FUNCTION(proc_terminate);
PHP_FUNCTION(proc_nice);
PHP_MINIT_FUNCTION(proc_open);
+PHP_MINIT_FUNCTION(exec);
PHPAPI zend_string *php_escape_shell_cmd(char *);
PHPAPI zend_string *php_escape_shell_arg(char *);
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 3087144d44..eef1287b0f 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -159,6 +159,11 @@ static void file_globals_ctor(php_file_globals *file_globals_p)
static void file_globals_dtor(php_file_globals *file_globals_p)
{
+#if defined(HAVE_GETHOSTBYNAME_R)
+ if (file_globals_p->tmp_host_buf) {
+ free(file_globals_p->tmp_host_buf);
+ }
+#endif
}
PHP_INI_BEGIN()
@@ -257,19 +262,19 @@ PHP_MINIT_FUNCTION(file)
REGISTER_LONG_CONSTANT("STREAM_IPPROTO_IP", IPPROTO_IP, CONST_CS|CONST_PERSISTENT);
#endif
-#ifdef IPPROTO_TCP
+#if defined(IPPROTO_TCP) || defined(PHP_WIN32)
REGISTER_LONG_CONSTANT("STREAM_IPPROTO_TCP", IPPROTO_TCP, CONST_CS|CONST_PERSISTENT);
#endif
-#ifdef IPPROTO_UDP
+#if defined(IPPROTO_UDP) || defined(PHP_WIN32)
REGISTER_LONG_CONSTANT("STREAM_IPPROTO_UDP", IPPROTO_UDP, CONST_CS|CONST_PERSISTENT);
#endif
-#ifdef IPPROTO_ICMP
+#if defined(IPPROTO_ICMP) || defined(PHP_WIN32)
REGISTER_LONG_CONSTANT("STREAM_IPPROTO_ICMP", IPPROTO_ICMP, CONST_CS|CONST_PERSISTENT);
#endif
-#ifdef IPPROTO_RAW
+#if defined(IPPROTO_RAW) || defined(PHP_WIN32)
REGISTER_LONG_CONSTANT("STREAM_IPPROTO_RAW", IPPROTO_RAW, CONST_CS|CONST_PERSISTENT);
#endif
@@ -518,7 +523,7 @@ PHP_FUNCTION(file_get_contents)
size_t filename_len;
zend_bool use_include_path = 0;
php_stream *stream;
- zend_long offset = -1;
+ zend_long offset = 0;
zend_long maxlen = (ssize_t) PHP_STREAM_COPY_ALL;
zval *zcontext = NULL;
php_stream_context *context = NULL;
@@ -543,7 +548,7 @@ PHP_FUNCTION(file_get_contents)
RETURN_FALSE;
}
- if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) {
+ if (offset != 0 && php_stream_seek(stream, offset, ((offset > 0) ? SEEK_SET : SEEK_END)) < 0) {
php_error_docref(NULL, E_WARNING, "Failed to seek to position " ZEND_LONG_FMT " in the stream", offset);
php_stream_close(stream);
RETURN_FALSE;
@@ -577,7 +582,6 @@ PHP_FUNCTION(file_put_contents)
php_stream_context *context = NULL;
php_stream *srcstream = NULL;
char mode[3] = "wb";
- char ret_ok = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pz/|lr!", &filename, &filename_len, &data, &flags, &zcontext) == FAILURE) {
return;
@@ -622,7 +626,7 @@ PHP_FUNCTION(file_put_contents)
case IS_RESOURCE: {
size_t len;
if (php_stream_copy_to_stream_ex(srcstream, stream, PHP_STREAM_COPY_ALL, &len) != SUCCESS) {
- ret_ok = 0;
+ numbytes = -1;
} else {
if (len > ZEND_LONG_MAX) {
php_error_docref(NULL, E_WARNING, "content truncated from %zu to " ZEND_LONG_FMT " bytes", len, ZEND_LONG_MAX);
@@ -643,7 +647,7 @@ PHP_FUNCTION(file_put_contents)
if (Z_STRLEN_P(data)) {
numbytes = php_stream_write(stream, Z_STRVAL_P(data), Z_STRLEN_P(data));
if (numbytes != Z_STRLEN_P(data)) {
- php_error_docref(NULL, E_WARNING, "Only %pl of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN_P(data));
+ php_error_docref(NULL, E_WARNING, "Only "ZEND_LONG_FMT" of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN_P(data));
numbytes = -1;
}
}
@@ -661,8 +665,8 @@ PHP_FUNCTION(file_put_contents)
bytes_written = php_stream_write(stream, ZSTR_VAL(str), ZSTR_LEN(str));
if (bytes_written != ZSTR_LEN(str)) {
php_error_docref(NULL, E_WARNING, "Failed to write %zd bytes to %s", ZSTR_LEN(str), filename);
- ret_ok = 0;
zend_string_release(str);
+ numbytes = -1;
break;
}
}
@@ -678,7 +682,7 @@ PHP_FUNCTION(file_put_contents)
if (zend_std_cast_object_tostring(data, &out, IS_STRING) == SUCCESS) {
numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRLEN(out));
if (numbytes != Z_STRLEN(out)) {
- php_error_docref(NULL, E_WARNING, "Only %pd of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN(out));
+ php_error_docref(NULL, E_WARNING, "Only "ZEND_LONG_FMT" of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN(out));
numbytes = -1;
}
zval_dtor(&out);
@@ -686,12 +690,12 @@ PHP_FUNCTION(file_put_contents)
}
}
default:
- ret_ok = 0;
+ numbytes = -1;
break;
}
php_stream_close(stream);
- if (!ret_ok) {
+ if (numbytes < 0) {
RETURN_FALSE;
}
@@ -976,9 +980,15 @@ PHPAPI PHP_FUNCTION(feof)
zval *res;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(res)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1002,9 +1012,17 @@ PHPAPI PHP_FUNCTION(fgets)
zend_string *str;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &res, &len) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 2)
+ Z_PARAM_RESOURCE(res)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_LONG(len)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1030,7 +1048,7 @@ PHPAPI PHP_FUNCTION(fgets)
}
/* resize buffer if it's much larger than the result.
* Only needed if the user requested a buffer size. */
- if (line_len < len / 2) {
+ if (line_len < (size_t)len / 2) {
str = zend_string_truncate(str, line_len, 0);
} else {
ZSTR_LEN(str) = line_len;
@@ -1166,9 +1184,18 @@ PHPAPI PHP_FUNCTION(fwrite)
zend_long maxlen = 0;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &res, &input, &inputlen, &maxlen) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 3)
+ Z_PARAM_RESOURCE(res)
+ Z_PARAM_STRING(input, inputlen)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_LONG(maxlen)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
if (ZEND_NUM_ARGS() == 2) {
num_bytes = inputlen;
@@ -1198,9 +1225,15 @@ PHPAPI PHP_FUNCTION(fflush)
int ret;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(res)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1219,9 +1252,15 @@ PHPAPI PHP_FUNCTION(rewind)
zval *res;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(res)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1240,9 +1279,15 @@ PHPAPI PHP_FUNCTION(ftell)
zend_long ret;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &res) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(res)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1262,9 +1307,18 @@ PHPAPI PHP_FUNCTION(fseek)
zend_long offset, whence = SEEK_SET;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|l", &res, &offset, &whence) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 3)
+ Z_PARAM_RESOURCE(res)
+ Z_PARAM_LONG(offset)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_LONG(whence)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
@@ -1567,34 +1621,34 @@ PHP_NAMED_FUNCTION(php_if_fstat)
ZVAL_LONG(&stat_blocks,-1);
#endif
/* Store numeric indexes in proper order */
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_dev);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_ino);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_mode);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_nlink);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_uid);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_gid);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_rdev);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_size);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_atime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_mtime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_ctime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_blksize);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_blocks);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_dev);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ino);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mode);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_nlink);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_uid);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_gid);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_rdev);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_size);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_atime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mtime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ctime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blksize);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blocks);
/* Store string indexes referencing the same zval*/
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks);
}
/* }}} */
@@ -1743,9 +1797,16 @@ PHPAPI PHP_FUNCTION(fread)
zend_long len;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &res, &len) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_RESOURCE(res)
+ Z_PARAM_LONG(len)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
PHP_STREAM_TO_ZVAL(stream, res);
diff --git a/ext/standard/file.h b/ext/standard/file.h
index f84dee3547..a9b96d6b38 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -129,6 +129,11 @@ typedef struct {
HashTable *stream_filters; /* per-request copy of stream_filters_hash */
HashTable *wrapper_errors; /* key: wrapper address; value: linked list of char* */
int pclose_wait;
+#if defined(HAVE_GETHOSTBYNAME_R)
+ struct hostent tmp_host_info;
+ char *tmp_host_buf;
+ size_t tmp_host_buf_len;
+#endif
} php_file_globals;
#ifdef ZTS
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 764b490b9a..f6bd99c474 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1037,35 +1037,35 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
ZVAL_LONG(&stat_blocks,-1);
#endif
/* Store numeric indexes in proper order */
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_dev);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_ino);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_mode);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_nlink);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_uid);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_gid);
-
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_rdev);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_size);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_atime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_mtime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_ctime);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_blksize);
- zend_hash_next_index_insert(HASH_OF(return_value), &stat_blocks);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_dev);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ino);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mode);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_nlink);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_uid);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_gid);
+
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_rdev);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_size);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_atime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_mtime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_ctime);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blksize);
+ zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &stat_blocks);
/* Store string indexes referencing the same zval*/
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize);
- zend_hash_str_update(HASH_OF(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[0], strlen(stat_sb_names[0]), &stat_dev);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[1], strlen(stat_sb_names[1]), &stat_ino);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[2], strlen(stat_sb_names[2]), &stat_mode);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[3], strlen(stat_sb_names[3]), &stat_nlink);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[4], strlen(stat_sb_names[4]), &stat_uid);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[5], strlen(stat_sb_names[5]), &stat_gid);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[6], strlen(stat_sb_names[6]), &stat_rdev);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[7], strlen(stat_sb_names[7]), &stat_size);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[8], strlen(stat_sb_names[8]), &stat_atime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[9], strlen(stat_sb_names[9]), &stat_mtime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[10], strlen(stat_sb_names[10]), &stat_ctime);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[11], strlen(stat_sb_names[11]), &stat_blksize);
+ zend_hash_str_update(Z_ARRVAL_P(return_value), stat_sb_names[12], strlen(stat_sb_names[12]), &stat_blocks);
return;
}
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index 3a1f075040..70f0629c53 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c
index a43fe8130a..c2c795ac8d 100644
--- a/ext/standard/flock_compat.c
+++ b/ext/standard/flock_compat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -127,7 +127,7 @@ PHPAPI int php_flock(int fd, int operation)
{0, 0, 0, 0, NULL};
DWORD err;
- if (hdl < 0) {
+ if (INVALID_HANDLE_VALUE == hdl) {
_set_errno(EBADF);
return -1; /* error in file descriptor */
}
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h
index c175ed0089..2517da8284 100644
--- a/ext/standard/flock_compat.h
+++ b/ext/standard/flock_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index e8bce6fa3f..502de05cb2 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -420,7 +420,6 @@ php_formatted_print(zend_execute_data *execute_data, int use_array, int format_o
z_format = &args[format_offset];
array = &args[1 + format_offset];
if (Z_TYPE_P(array) != IS_ARRAY) {
- SEPARATE_ZVAL(array);
convert_to_array(array);
}
@@ -519,9 +518,6 @@ php_formatted_print(zend_execute_data *execute_data, int use_array, int format_o
efree(newargs);
}
php_error_docref(NULL, E_WARNING, "Width must be greater than zero and less than %d", INT_MAX);
- if (newargs) {
- efree(newargs);
- }
return NULL;
}
adjusting |= ADJ_WIDTH;
@@ -541,9 +537,6 @@ php_formatted_print(zend_execute_data *execute_data, int use_array, int format_o
efree(newargs);
}
php_error_docref(NULL, E_WARNING, "Precision must be greater than zero and less than %d", INT_MAX);
- if (newargs) {
- efree(newargs);
- }
return NULL;
}
adjusting |= ADJ_PRECISION;
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index b6f3483280..675e1154a9 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h
index 442f5454cc..a701e877e4 100644
--- a/ext/standard/fsock.h
+++ b/ext/standard/fsock.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c
index 40e56f1851..02cf61daf6 100644
--- a/ext/standard/ftok.c
+++ b/ext/standard/ftok.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,6 +26,10 @@
#include <sys/ipc.h>
#endif
+#ifdef PHP_WIN32
+#include "win32/ipc.h"
+#endif
+
#if HAVE_FTOK
/* {{{ proto int ftok(string pathname, string proj)
Convert a pathname and a project identifier to a System V IPC key */
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index 3dbafa5907..e59c04fc34 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/head.c b/ext/standard/head.c
index 5a53ae2d50..eac9159ab9 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -120,7 +120,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
cookie = emalloc(len + 100);
- if (value && ZSTR_LEN(value) == 0) {
+ if (value == NULL || ZSTR_LEN(value) == 0) {
/*
* MSIE doesn't delete a cookie when you set it to a null value
* so in order to force cookies to be deleted, even on MSIE, we
@@ -141,7 +141,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
if (!p || *(p + 5) != ' ') {
zend_string_free(dt);
efree(cookie);
- zend_string_free(encoded_value);
+ zend_string_release(encoded_value);
zend_error(E_WARNING, "Expiry date cannot have a year greater than 9999");
return FAILURE;
}
@@ -155,7 +155,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
}
if (encoded_value) {
- zend_string_free(encoded_value);
+ zend_string_release(encoded_value);
}
if (path && ZSTR_LEN(path)) {
diff --git a/ext/standard/head.h b/ext/standard/head.h
index 61fa30ff0b..7219e66f31 100644
--- a/ext/standard/head.h
+++ b/ext/standard/head.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 42f26bf820..ceb4f7c218 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/html.h b/ext/standard/html.h
index 30aeb2bd4c..594b42a421 100644
--- a/ext/standard/html.h
+++ b/ext/standard/html.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/html_tables.h b/ext/standard/html_tables.h
index 378a801f7d..a8d7ddc500 100644
--- a/ext/standard/html_tables.h
+++ b/ext/standard/html_tables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/http.c b/ext/standard/http.c
index 7fd49a843c..528aff3c95 100644
--- a/ext/standard/http.c
+++ b/ext/standard/http.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 90f2e9493d..02b580fa28 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -243,6 +243,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper,
if (!context || (tmpzval = php_stream_context_get_option(context, "ssl", "peer_name")) == NULL) {
ZVAL_STRING(&ssl_proxy_peer_name, resource->host);
php_stream_context_set_option(PHP_STREAM_CONTEXT(stream), "ssl", "peer_name", &ssl_proxy_peer_name);
+ zval_ptr_dtor(&ssl_proxy_peer_name);
}
smart_str_appendl(&header, "CONNECT ", sizeof("CONNECT ")-1);
@@ -579,13 +580,13 @@ finish:
}
}
- /* Send a Connection: close header when using HTTP 1.1 or later to avoid
- * hanging when the server interprets the RFC literally and establishes a
- * keep-alive connection, unless the user specifically requests something
- * else by specifying a Connection header in the context options. */
- if (protocol_version &&
- ((have_header & HTTP_HEADER_CONNECTION) == 0) &&
- (strncmp(protocol_version, "1.0", MIN(protocol_version_len, 3)) > 0)) {
+ /* Send a Connection: close header to avoid hanging when the server
+ * interprets the RFC literally and establishes a keep-alive connection,
+ * unless the user specifically requests something else by specifying a
+ * Connection header in the context options. Send that header even for
+ * HTTP/1.0 to avoid issues when the server respond with a HTTP/1.1
+ * keep-alive response, which is the preferred response type. */
+ if ((have_header & HTTP_HEADER_CONNECTION) == 0) {
php_stream_write_string(stream, "Connection: close\r\n");
}
@@ -613,10 +614,7 @@ finish:
} else {
php_error_docref(NULL, E_WARNING, "Cannot construct User-agent header");
}
-
- if (ua) {
- efree(ua);
- }
+ efree(ua);
}
}
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 0ea3abace2..3e19ccaf48 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -204,7 +204,7 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
unsigned long len=64, szlength;
int factor = 1,maxfactor = 16;
int status = 0;
- char *b, *buf = NULL;
+ unsigned char *b, *buf = NULL;
zend_string *bufz;
b = ecalloc(1, len + 1);
@@ -212,16 +212,21 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
if (php_stream_seek(stream, 5, SEEK_CUR))
return NULL;
- if (php_stream_read(stream, a, sizeof(a)) != sizeof(a))
+ if (php_stream_read(stream, (char *) a, sizeof(a)) != sizeof(a))
return NULL;
if (uncompress(b, &len, a, sizeof(a)) != Z_OK) {
/* failed to decompress the file, will try reading the rest of the file */
- if (php_stream_seek(stream, 8, SEEK_SET))
+ if (php_stream_seek(stream, 8, SEEK_SET)) {
return NULL;
+ }
bufz = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0);
+ if (!bufz) {
+ return NULL;
+ }
+
/*
* zlib::uncompress() wants to know the output data length
* if none was given as a parameter
@@ -232,8 +237,8 @@ static struct gfxinfo *php_handle_swc(php_stream * stream)
do {
szlength = ZSTR_LEN(bufz) * (1<<factor++);
- buf = (char *) erealloc(buf, szlength);
- status = uncompress(buf, &szlength, ZSTR_VAL(bufz), ZSTR_LEN(bufz));
+ buf = erealloc(buf, szlength);
+ status = uncompress(buf, &szlength, (unsigned char *) ZSTR_VAL(bufz), ZSTR_LEN(bufz));
} while ((status==Z_BUF_ERROR)&&(factor<maxfactor));
if (bufz) {
@@ -969,6 +974,10 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check)
return 0;
}
width = (width << 7) | (i & 0x7f);
+ /* maximum valid width for wbmp (although 127 may be a more accurate one) */
+ if (width > 2048) {
+ return 0;
+ }
} while (i & 0x80);
/* get height */
@@ -978,10 +987,13 @@ static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check)
return 0;
}
height = (height << 7) | (i & 0x7f);
+ /* maximum valid heigth for wbmp (although 127 may be a more accurate one) */
+ if (height > 2048) {
+ return 0;
+ }
} while (i & 0x80);
- /* maximum valid sizes for wbmp (although 127x127 may be a more accurate one) */
- if (!height || !width || height > 2048 || width > 2048) {
+ if (!height || !width) {
return 0;
}
@@ -1223,6 +1235,7 @@ PHP_FUNCTION(image_type_to_extension)
PHPAPI int php_getimagetype(php_stream * stream, char *filetype)
{
char tmp[12];
+ int twelve_bytes_read;
if ( !filetype) filetype = tmp;
if((php_stream_read(stream, filetype, 3)) != 3) {
@@ -1273,12 +1286,11 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype)
return IMAGE_FILETYPE_ICO;
}
- if (php_stream_read(stream, filetype+4, 8) != 8) {
- php_error_docref(NULL, E_NOTICE, "Read error!");
- return IMAGE_FILETYPE_UNKNOWN;
- }
+ /* WBMP may be smaller than 12 bytes, so delay error */
+ twelve_bytes_read = (php_stream_read(stream, filetype+4, 8) == 8);
+
/* BYTES READ: 12 */
- if (!memcmp(filetype, php_sig_jp2, 12)) {
+ if (twelve_bytes_read && !memcmp(filetype, php_sig_jp2, 12)) {
return IMAGE_FILETYPE_JP2;
}
@@ -1286,6 +1298,10 @@ PHPAPI int php_getimagetype(php_stream * stream, char *filetype)
if (php_get_wbmp(stream, NULL, 1)) {
return IMAGE_FILETYPE_WBMP;
}
+ if (!twelve_bytes_read) {
+ php_error_docref(NULL, E_NOTICE, "Read error!");
+ return IMAGE_FILETYPE_UNKNOWN;
+ }
if (php_get_xbm(stream, NULL)) {
return IMAGE_FILETYPE_XBM;
}
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index bc2d232ce1..d327602e75 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -54,7 +54,8 @@ static zval *incomplete_class_get_property(zval *object, zval *member, int type,
incomplete_class_message(object, E_NOTICE);
if (type == BP_VAR_W || type == BP_VAR_RW) {
- return &EG(error_zval);
+ ZVAL_ERROR(rv);
+ return rv;
} else {
return &EG(uninitialized_zval);
}
diff --git a/ext/standard/info.c b/ext/standard/info.c
index f2f7cf6d07..c0d8ea91d5 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/info.h b/ext/standard/info.h
index e66bc83a33..453e4f941d 100644
--- a/ext/standard/info.h
+++ b/ext/standard/info.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -52,7 +52,7 @@
#endif /* HAVE_CREDITS_DEFS */
#define PHP_LOGO_DATA_URI "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAABACAYAAAA+j9gsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAD4BJREFUeNrsnXtwXFUdx8/dBGihmE21QCrQDY6oZZykon/gY5qizjgM2KQMfzFAOioOA5KEh+j4R9oZH7zT6MAMKrNphZFSQreKHRgZmspLHSCJ2Co6tBtJk7Zps7tJs5t95F5/33PvWU4293F29ybdlPzaM3df2XPv+Zzf4/zOuWc1tkjl+T0HQ3SQC6SBSlD6WKN4rusGm9F1ps/o5mPriOf8dd0YoNfi0nt4ntB1PT4zYwzQkf3kR9/sW4xtpS0CmE0SyPUFUJXFMIxZcM0jAZ4xrKMudQT7963HBF0n6EaUjkP0vI9K9OEHWqJLkNW1s8mC2WgVTwGAqWTafJzTWTKZmQuZ/k1MpAi2+eys6mpWfVaAPzcILu8EVKoCAaYFtPxrAXo8qyNwzZc7gSgzgN9Hx0Ecn3j8xr4lyHOhNrlpaJIgptM5DjCdzrJ0Jmce6bWFkOpqs0MErA4gXIBuAmY53gFmOPCcdaTXCbq+n16PPLXjewMfGcgEttECeouTpk5MplhyKsPBTiXNYyULtwIW7Cx1vlwuJyDLR9L0mQiVPb27fhA54yBbGttMpc1OWwF1cmKaH2FSF7vAjGezOZZJZ9j0dIZlMhnuRiToMO0c+N4X7oksasgEt9XS2KZCHzoem2Ixq5zpAuDTqTR14FMslZyepeEI4Ogj26n0vLj33uiigExgMWRpt+CGCsEePZqoePM738BPTaJzT7CpU0nu1yXpAXCC3VeRkCW4bfJYFZo6dmJyQTW2tvZc1nb719iyZWc5fmZ6Osu6H3uVzit52oBnMll2YizGxk8muFZLAshb/YKtzQdcaO3Y2CQ7eiy+YNGvLN+4+nJetm3bxhKJxJz316xZw1pbW9kLew+w1944XBEaPj6eYCeOx1gqNe07bK1MwIDbKcOFOR49GuePT5fcfOMX2drPXcQ0zf7y2tvbWVdXF/v1k2+yQ4dPVpQ5P0Um/NjoCX6UBMFZR6k+u7qMYVBYDIEqBW7eXAfPZX19zp2/oaGBHysNMGTFinPZik9fWggbI5Omb13zUDeB3lLsdwaK/YPeyAFU0i8Aw9/2Dwyx4SPjFQEYUlf3MTYw4Jx7CIVCbHR0oqIDNMD+FMG+ZE0dO/tsHlvAWnYS6H4qjfMC+Zld/wg92/tuv2WeeYT87j+H2aFDxysGLuSy+o/z49DQkONnmpqa2MjRyoYsZOXKGnb5Z+vZqlUrxUsAvI9At/oK+elnBpoNw+Dai9TekSMxDrgSh0KrSYshTprc2NhoRf1JtlikqirAVl98AddsSavDBDrsC+QdT7/TSoB344tzOZ39+70RbporVerqasyw1MEnC8iV6I9VTDi0uqbmfPFSq2W+gyUHXuEdb3WR5rab5jnD3i/BNMN8ChNaqsTiKa55KmBWX+Tuj0XQdQVF307nhTH0CPls+O0UPbaT5TQG/8qX68u6LpV67LQ6dNknaYgaYyPDx2TzvYGCsnhRkH8b/rsF2GDj1MCInkvxvRjOuCUlipWD/zrKx7ZOwBF0vfSSM2ShyaqAAOC1Nw+zt9/5YNbrN1zfwIdpfgnqebv/A6pnWAn4qlW1HPgHQ6OeoG3N9RO/+StMdDtmV2LxJPfBpQCGfwTgrVu38jFrKaW2tpZt2LCBdXR0sEgkwhv21u9cxQsyW3ZB1+DgoOM54btU6tu8eTPr6elhy5fr7IZNDey+e76e9/fCLcAllHpdKKinpaUlX8+111xB9VzNrYxqUAY/XVVVJYMOekLu2fFGM8VWYQRYiYkU9bD4vPlHFYnH4/zvkb1CgwACHgMoUpdyw3sFXcXUh4YHaNSHDqaxdL5jwVTXBpeXVY9oF3RcUQ+O09NT7Cayfld+4RJlP42gTIq8w66Qf/X4a6FTSSMMDcaE/NhYecMM+MdyG90OAhodWoAGkTUaSZByO5WdiA4GqwStrrM6k5vFKEXQserr63l7oR5V0NBojKctaSZtbneErOtGmFxwkGewjk0UzpCUlJSIRqMcjN8CkHLDqyRByq0PEGBBhDmdj7rQVujAaLfrrlk7xyW5gUaxpEtOmOQDr0e799NYmDVBi0+OT7FcbsaXxEQk8qprEBQMBm0vVKUBRcNjskFE8W71lSt79uzhda1d6w4ZGTUUp3NWAQ3TvW/fPvbVq+rZH/ceULOcF1/I06CY3QJohCCzNJnYdgEwwvpUKuNbUsLNpO3evZtfSGHp7+/nS2pw3LLFPVWLoA5yHQUtXvXFYjH+vU4F5yOibzsRUL38MTqC3XWh8GCWziMcDjt2BNEZUIfoUOpJkwvziT3S5ua8Jj/4yD5E0yERbPkhKv4RF4mhkN1wCMHN2rWfYZ2dnWz9+vXchNkJzBoaQ8Bxqg91wWo41YdO2dzczD+3bt06Rw0rBG4nOF8oi9M0Jsw9OgLqQ124BifLgeuHyVbN0NXUrODBmDWxgRR0pNrUYqMNgDOZGZbNzvgCuc4j0kX+GPJ2//CcMagQmKkbrm/knwVEp++SIXulM1+nhj9AY207QRDnpsnye24WA59DkuPlV/5j+z5eB2hE0W1tbTyQdNJmDpksRzFp2E9csFJAboRvDvz8gZdJgw2ek55KZphfAv+Inu8UdKnmkEUHQK93EjEZ4Rbkifq8JiactEpYAy9Nli2Gm6CjIZPn1qlKFWizleOG3BIwdKNZ+KRMxr9VHKvr1NKLXo2BhlAVFRPq1qlWW6MBr3NWyY2rTGXO5ySJlN9uDuiGsV7XTVPtl8CHYGizf/9+V5Om0hAwVV4ahuU8qia03HP26kyqFkMOTudDzjs/P/QKBUiBYa5ZNucfZJUkCG/0IhpCxYyqBF3lnLOII8q1GKqdStQ3rTh5MStwXX5O/nE1metGQzPHUH6JatA1OppQ8u1eUbpX44tO4GY5vM5Z9sduFgOfG1GwUOK6VFzaSAmrWCSfzGCuuT/O+bi6QwRdTtqXN2keJ4/ejgkJ5HedRARkbkGe6ARulgMWQ+Wc3cDAWohhoZdcue7ifJ7crfP6Me8dELd0Mv8U2begC2k9SHd3t+NnNm7cqKwRbiYUkykqvlZlmOYVLIq5bHRep46JzotOc9BhuFc0ZHGLph+CJIaXr1FZSIfxsdBiN1+LpALEK2By61Aqs0rwtV7DNBU3BMCYixYTLU6C8bM5hBwum0k1mesBpmPtlj+qXFenFsAgCVLon9DYeIxUnmh05HCdBIkCVRP6ussiepVZJZXIutCHwt2I0YGY2Kiz3AIyeG5aLNooVULQBbHy1/nAK2oEtEanheil+GO3aFg0FnwSilNC4q6OrXzywc0XCy1WMaFu/tgrCBLRuWpHuP+n1zqmRXFN0GAnwKgHeW1E1C/86UDJHFKptATZMPZTafbLXHtN3OPixKRC4ev4GwB2Gy6JxhQNEYul+KoKp79RMaGqKzy9ovzt27c7pidVZtYAGJMYOP7u6bdK1mLI1GQ+/ogSZBahwKuLO2jSZt0odw65xrUhAMNrZskLsGiIXz72F3bTjV+ixvtbWcMQr3NWCbog5VyXAIy63PLrqpJITIqHkcD9P7suSiYbG53wvTLKDbr8WBbjZqIF4F3PD3ItRn1eQd5CBF3lCM5RAIYfVp0/dgZ8SvbJ2/l8MmlvNw+8qJTjm+drWQwaAXO9KMuWncc1GBMXKkGeV/pU5ZxFIsTvzovOCu3HvDnOE7NTu3rLr+PE8fy6+IEX9947YM4n/+LbPT/88R8QqoYAuVSDrZLFKcYso2AcLBIeGDPu6h3M+yqvIE/4Y6w4LdUfi+jcr86L75KvC9+PcbVfd1hCi6U7Innwk1/+Q5rcoetsdyBg3s9aCmivBsNFifGfG9zCJUFiztmpEXAbqhMgr6SLWBPu9R1enRfm1ktrC6cVYWH+/Mqg43x6sYK1edaCex7vkRZHZkF+6P6NkXvvi/TpLNBUaqTtdcsoLtIrVTcem2EHDh7m2uq0ikMINBvafOmazzt+BkGMW9CF70DndPsOaJqb38Y1oXjdCYHOiqwbPofrKid6thMAlnxxPtMy6w4K0ubNhq73U5wd5PtVleCTd+50D2CEafLloqixyv0ufMcOGq64CVaMYN2119gfAdPpuscKOxWgCMDwxfm0pvzBhx9siRLoFt3ca7Ikf+x2yygaYzHdTSi7IT9y8fMJ2Lpdhg+ZCPA2+f05d1A88mBLHzQaoA1dL6ohVLJGi+1uQj8XQMyHIMgaGT6eDxuozMkD294LRaB7CPI27DLHQSskSFRvGa30O/zndF4fF0DMhwa//9//iZ2DcILqN7xBHn1oUweNn7eJ3WO9QHvdMlrMsphKEj8XQPgpuHVVMtGOgF0hC9CGTqbb2kHOzXx73aKiuiymEv2x22ICMYYeWSALBQ7RQ0fkoZIr4DnRtS3ohzf1dNzTG9d0PcwMLahZO8UyKTMm38wteratSVtkplq4oWj0PcfrEinPhYg14H+hvdIwCVs1bvb6O+UBMYFGl90d0LRGLRDgoHEUwYnXDniQStocTVUwfPLaKQGA/RoWOmkvtnsaG8unK+PWMKlH5e+Lznp03N27RdO0TkxmYNZKszYBlyfI3RpjsQkmMOo8ls4Wsx1EKcEVAEvayyNoeRzsO2RI+93PNRLesGYtNpBhL4l/prlgZz5ob0mbtZVFhWC301d0EuQgAHPgS7D9hssTHKyMbRfLptF213NBDRuoaqxNA2yh2VUBDnxJ1M1yRW6gOgt2x64gqXK7ht1yOWyW1+wl7bYXvhUygQXgit4KuVDuBGzSbA2bmmtayNzpRgJOGu7XosHFChZzvrGTiUKt5UMiVsmbmtsCb3+2lZmwm3hFNsA/CiYdKyfhYx3Aws8urp8nsJM72naGCG8zYwZMecjk/WHVVRbsMwU6tBVQsWJS2sNDlrgVTO0RE/vzKQtuN2+/85k5PxlUaL75D3BZwKss+JUqSFRAO/F7Eqlkmj+2gbrgYE8rZFluu+P3pOGsyWCG/Y9/GR8exC+vYfc5flxgzRdDGsDEz/8AJsxwQcBUKPCtmKOMFJO8OKMgF8r3b3sKkAm69TN+2OZCAm5ID/g9XPypwX29ufWgudq0urrKes/8nPkxgy1bdg6z/or/SFc2mzV/xs+6HwySTmdYJp2dpaWKEregYrVfn9/B0xkD2U6+e+sOaHqImTfLrycUOIZM1hJwC3oemPXbi/y5PnsrJ136bUa8pxu69BklmANWwDRkgR1wmwVaglyi3Nz6JLQ+ZG5NxQsgNdAhmIfJN7wxgoWg9fxzPQ+c/g9YAIXgeUKCyipJO4uR/wswAOIwB/5IgxvbAAAAAElFTkSuQmCC"
-#define PHP_EGG_LOGO_DATA_URI "data:image/gif;base64,R0lGODlheQBAAOZ/AB0BAHB0r0xPkMmMdtjXu9CYh2sxAquv1pJsTmUCAKyQaaVnA6lwVYOGvJM1ANvbwYlPMJubzVYCAGgRAJhqLm9BCq99aLetkqpMAKJCAJdvYqtzHZZWAnNsmIUjAHdKNW8bALqST3ABAJpjEVYnA08xU5JLBG1FU8fKtIhcS4d0kYJFBLiQgkABAIQwAd3h0eDm2sXCpdXYxIiKwG05M7CtuH4UAVNGdNPWwJ5dAcB+ZOjv6NrdxqRMAN7ZuH1qeXZYYszQunp9toxRBJ2dz5yHaa6ANoVYHrWgebK54M28jdfbxpGTxpWWyY8tAJqFl6hHANzUr5J+UqOm0Z47AI9eG9LKolo1IEASAkNIjJSczVkUAYyPw1NNTqSdrYNgZ3hMGK9XAa5KAJNKGaGdv3k6BVgZE6BTGmVopNrezIJhNGgeFpJCKFogM9DTvpiQrm1afpiYxZxQClZZmKJSBaNGAWsnItLQscC8p7NaEI47BpdhQGwVFy0bH18LAJmZzCH5BAEAAH8ALAAAAAB5AEAAAAf/gH+Cg4SFhoeIiYIRRERTj48HkgeQU40Rf3FNm5yLEZ+YhnFeTYqmp6ipioyOU5OSSbGys0mTkERaTUxcM729XExMpaCYTTU+NaWqy8yoo3Gtk7SxlGRvT08qPz9f3UBAX0A/KuQNXOfnMw0NQu3t5n+YNQ9RXs33+IOfeFE1B7MHyGTjdoLGGjN+JChcyLChHz981tixQ+MEEDhwOgRoFyAAmo1C3rh5gEdZvpOnHB2Y56ZGkilvfpyws6WFzRYMH+rcOaGnz58+/UwQ2lPiiYxokqLpgIKHlSeXUEolpPLfgRgv8KQw6CdBAoU3cUp4OHanWbNA06aleOIGGjw8/x4gQSOkCZFQU+9FcPWv1hsvBF4g6fpwKNiwDRMvPMu4sdk1F+IqgZNFABoujPDmTemK2pOZWyKnKVK4Z8KwYhXnHLvYsWudSNLQ+5KltoA5Qv7c3axIZSwyKuwstBMkLgKipv2gVpjw9Vm1yNWajv3gAYUtbW7UzoLbLm9DRGAleUIjYQKyCNLwwKEG6OmbzBlLTwtiPlAQ+CdQ5xGiPog1JWwngBCMfKdbZweoUF5ZO8XGwx0QIEcWYqVF9xMILtyHX349bejhh/ghERcPSHjgIYDacdfAJ5t1Np5w551lRwxpLGEFGNG9J5aFaq2wAYge+gQkkBfI9oASZXw4VP+AtaHhHUrhxfIGDa2ZJcEHbvBgI44/6cicWkFWYcSQHE5ApodlxLBEdVasoGRXZjA54G74IPiFYlYisISWN+YoAXxjgbnhBBT0ZyaQQx16JghgBFHdA3dU8eZXEmTX5JPMdPbEGsw15NWnEmjAQ1wQJpCcjjgVxhNQRoRggIb1NafokBMggMMDa95BwZtfgsDkHDMQscxektzZqQSfeoWsskUYecceySrbAgA2MRhtshO0WoYEIng1galDyXpmTwrI8AAPBBBAQYemLXRoAm3Y1oCwqBBLBg2pqdYQC6M+QAAD0f5J4bXRghBCCCssS3CgIPbUrVcX4IruvwG7G6v/QiUIkIUQ9JriSBxt5JvQQoAudMGe/iqQ2HJdUaqYAQeboNBXyi503qz1PfzVGjFInC4CoDaUn8tMzmvKXm/wIYIIEzDdU9AuM3dyXAQM1tByyJJc7UJlGLEBByNrXa1QSlJqEwIEnLsEAVEgIHa1Zo58U8Ybd3wIEW+wYYMHfPftgQ2ABy444HigTIASeizddIw6PV1z1BKUscACOYBwNXxEefjVTWZckLaWBDx7GLXUtlDf6DYFKAAXdg8ShxZxsOGEA7TX7sTtuOeOux6F93uHER444ffwfA8uOAhl5LBB5QnYIILzDzO9oYlDK5uCGwTsuQQOpb5NFKo2aTdH/xOa/bGJFinMXvv66jvQvu28S+wvEnrYjrv77Ot++wqFhrCBCSAI3u36pjsXuGCAfkNC2s4lAxzEYAzG6xDfQGCDpz0kAXzQDhpaxwQtaOB96wuhCGmnh5OtyV9WoID6bjfCEbqgAmBQgxQUoIYKkAALIGwh+xhwh8+thwB4GIP+cHdA3fmNBrUxmiCCMYO/8c2AUDQg3+7nAD1Y8YoXkIHhohAC/OVOh7SjggGwcAUjrIAEN7yhC6gARhGeQQnpekCNcIAD+rURjOIjn/m4oIUTLG1pftjCFu4zqydKEQky0GJ1CJDCvf3NkQSkogNWYAADgEEKBiiDCVZgAgNgqP+NbGSjHhT4uTm6QQE5vGPtylAbjkVgFypQWAKmBYDSoQZrCtFAIlHmgygowQM6+9QfB5dJTnLABENYAAdykIMVlMGTASTeFIXnBAX0sDppSIMM3BAECghQdyS84gipQIUTZGGDfwDGCa5Wy1rS0p3tbOdNUoADLcall1ycwJ/2abMELC0BWzCACUzAzMkpcwQcoMMxDbCFlkXrYR6wQA8/94LtuSEGegPch55oABd0NIDRdEEVkbi6JsyAC21gpzzjyVKWXgEFu6wOPkNwy5IF1Jg5MKgyc8CBZXLgjDWpaQs+cIEoxPEBL3hBA4OABH1m7ZZYiKpUWyBVQYKABNr/CQAvhOBQf4pAJ6wRGE5ustIWZNGe94xCFJCAr5pKIKBlOMIQlpnTyXFgBENg5k9dQIKatNMMNEAAEqxg1AWmAQZL2GYQ9gCod7b0se0MEBp6oQLBCXB4FOxJBSvYpYQgwA27vCc+rRCCD5hBrG8lQRlWMIS5Us6gd6XrT58pyCsUAQlKIGwvCeCD6vAABtrEgRsusIZbQva4tezDbRowgy+Q87nQfa77vjhCJ4whBvVcAsoe4IPu9tIKSkACEsZw1UyWYa50hS1e9brJZ5YBCdxVa3cXeC4YKFW4QUBATZF7XOUKYB3OzYCAB0xgAUe3wASmAhLckN1+ydS7vVXC/wIqUIFiznUIIzBCMimHUMod05mrDQF3e/soXB0Wsfi9QBlq9jaBwROyfagMgKmA4BrbuMBUoAAKGIzWuDy4u0agwAoqvNqecqAKajDA5HiazGNucgWsNcKtSoyrF+xgB4nFQRBQsAf9+S2a1PMQ4CZQwYfE678NCPCN12zjBdezxz5GqhKMgAAwEBkMHEjmCI4wgg0sYAQddjKUh3CEDVghLtrdEwyuHFxu0i/BNM5AdKVbO3LSDnckXccPqFCHTnu6DgMGNZsLfIYY8BjOcYEBEqRAATBU0gAryPMCNkBrP+N1BMoc6KCrQIEi7SkNL1g0lhvIzQuMIdI2FnUGQP/d6Rt/gDszEEIH9NCDalv72tX+tLa3DWoG7PjN2h0VD9QjBSkcwYYGqEAVWjvrWucA0Lh28mqHUIUqKGAJSRU2YokdBDzswQFrbnaoPW1jc86BCe2ggR4GynCGy8EEcpADtieO7TooIAinTvQSYBCDctuQBOmWKwfaTWtAVyGnFAYxvdWAABRc+cr7xq+/HaDsAn9awNyucVb/IIQGlEBRJuooFMtQBhdcUQ9QbnjDHy4HJGCcx4lWtRTUcIU+AMCS6+ZArUsO6MlVGOQkgKEMLwDzRgeh3/+GArc9rfZtt13tOK8DFNhQmxlEINpw8OofFee0n1Rwo5W8KsgreXH/jGd3CaMpQpLRmO5193kDXtvACCjA668N4eNhl2ERkppI/AbhAhAAOIHrQPHSX5vtUDD4JxAuhDbofe+wj33sN1c6P7TcDbiXQRpQUO4roLECZahAax9vBK8hNAdVQOgQKPn7GEoBBdrk5pYVYIdDmcgDRh9oxOVAh+7TYfveD3/45aAdjgmiHR1owetlz/7Zw6cFKbjA2d2QBjyUGwxXgOERKECBIVCA1sW3AYVCAUbQZ3jlTBQGBmBAVGlwdp+HAEFFISBQSURXBkd3gWNgAhmYgQxnTgLABJjwSu1QAgDALe13grH3fmZQBDEQBDJwAWpQQxUGQzBUBZLHa17D/2uUdwRHAAaU9GowpIB4cFFFYAaP9X5YECiD8zyD4zc2YAcaY36L0AAdYXUmmCwoyH4lcyVFgAJFgEaMl3IrMAL1FgL8t3WS11o/CIZYgEZqUAQf4Fjy9H7IkoWyJz6agQntgAbU4k8EQzB/tH4SQC0MgRMfAAFt2IbpBgaERnlqQEMh0CqRRwE5sHzPBIYkcAWl8ydHmC92KHt0wzqFEAFN0A5zgBN/mIrC9EeDaEtjFTljBHL6t39HQGeCFV5IEIn8VwVQdolYAAZGYAC21IoshRjr94nxkgVKNIpcsBFwsCzBpIoPNUvFeBMhcASKGENqoIBgcARqQAEIgAD8h/8AVcCDdvZ1NwQGFIAF7mQTR0g66vdPWPh6WNgGGhMArUMIEdCMQgAHLuCExrNZ7ceJLTVUaOR7QdiNPMhy4RiOu1iOllhJNxRVAIAFQdWJ7uRVgBiNCcAkAcAiiXB3G6ECxyZpk8ZG04VAxIMfVlUfE7AFUZV5e7AHDMAAFnCTLJCTOWkBNbkHEPCTdiaR7EhVQ+mO03JLsiSNXkE3aACSq9CMGwEBUDCVVAkFGHCVVZmVU3lzBQYCZJQCNqkDOjAAZEmWBXCWaHmWAyCWOsCTDIAAKQAGE7kYp0IWwqSUXuEHKYKP5ROSCNcRKQAFYmCVV1mYhjmVhpmYislXYGn/AWwplmWZlgVQlo8pljX5llcQVSAgSbkDkIHzPLJnKXPCDKQoBCMplYqZmqqpmCZwBY3pmGUZmWpplmSpAwzAlpe5B5qIBVQgBoO5lYSZlaJ2kuSkB+YEbflYLxFAhR3xBWcgBqsZnalpAGAZjrc5AJKZnWt5mbfJkzO5m78JnNKplWJQBx+QIk6SnKpQmh0RACmAAdApnfK5AofIcimQAjSJnZJpmxqwBw2JADTplhBgdSQQnlQpn4Q5mBCQIv9FJyeBCdHWER2QAnIQn/KZmnnwAR9wnxrQoRoKlpFpARqQAh9AAynQoXAJljWpiR/AABmglYIZnb6JAQtqGwGA/ylTgQnMCZjPaaEXepUZ+gEacJMpEA5AwKFrWQA8eZ9F2qE3qQE2iYgAcJts8KJZuZq+CQU12iRM4KC8QYo7GgA/sAcx+qMYEAZlkAIsYAE0IA5X0AVF0KFoKaL3+QNv2gU0wAAswAA0AAEf0Ad7oANsQAVZ6aNX6ZtiMAZtYRuX4aUG8glNEKYTegY9YKiqGQYGIKQIoKFf0AU/0KEpYAGTeZ/hqAKe+gUfgAAaYKIWgIhUSqhVGZ+IigFjsKWV0ah9aSCekE6m2Z4d8AUQQAfwGZ1jQKIMsAcc2qEasKEDwABCKqKqOqIpgACOaZt+OpmDGp6I6puKmiK10R2Oqv+rh7B67NCeAfCrM3kGYbCu7LquNokANnmT8moBV8AAa+ma88qTN1kAlgkBGjCZepAB21oHtbqo2zEHaLAi4SquIUmuHfERH9EB3CCOW2cEPXmbY0mWzmqvOnCiZKmTFoAAYymWezAGgcoAhFoHbPABBnuwAWB3jcCw+MAiTBChSqEUErsNnzqvbbmWPmmZNJmxssmvx/oB4AAEbeGt30oXDaAb6imzpEmz5XqzVNsBHUAOKoAN3XCZRWoB2PC124ARAqAx2yEglvGydhEVUPsdoPAHuxChHoEGczC3dFu3c3sbY0u2Zbu3t/ERQnBSaeuUayuzoLAbTcALU6sUdnsSt2Nrt0mxETPABE57Cbmqq4EAADs="
+#define PHP_EGG_LOGO_DATA_URI "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAABACAMAAAAJUSgeAAAC+lBMVEUAAACtsdVsooH18+vP0Mfr5tahp3G3toS4wricto5JTIuoq9BZXJlgY55cXptQUouqp3ZkZ6OanciBk19RakXw69tISotzc0dJS4yfpHB7frOusdZ6fbSprs5qbKfv6djv59T07t/t6NWNkMF7qY6ssIa/5Na9y6K0v8+mvJZ3e7NISow5aEZGdU9Qqpc7b0lRr51QjGg3b1F7frRatqRYimZPhFtHakVRfFU/c085fV9z1sWY2chwx7Q5p5ig28p52clWsp5yzbxnxrRjwK5Gb01fknBXiWBGopNbj2hQh2FKfFNCaUOm381OppFHg2JQgmIyakovZEbD69yU18NQknKJzblku6hQn4lCellSSjZyonxYj29Lflo4ZD7G4dI8saJYnYBpl3E6hGjM6Nq05taB3MyFyLFLiWxDb0i75th80cFfWkRUUD+p5NU3m4eC1cOAg7dbu6o4dVZBYTy53s9nm3xHRjHR4NWL3s9LtaVrrZFPk3tDknhimHNBeFKv4NCa4NDp4s54qINmnnVZlnNNeEva5d2L1cO1xaxucat2t5xYmHpokWZagls2Xj0tTy7e7eGGirs5oJBhkGphimNGdEmTzLmAr41FoIpFl4FCinGWmsWk1L9bgFNabko/Y0NMZD9DOyrT7uHK7uCV3MyL2cnK1sds08JlzLxxvqiMuZZZqJNco4k1k39SbELu7OCh49Ss2sm22MaOj3h7zLl8xKpui11lhVcvWzg7VzZfsJhiqYmhlHyBfGZvZ1MlYkidoI5Cf11We06Okr5laaRCq5s0iXKDmmdRc08mVzqhpc2yu8xxm3M0Mx6dpcPPyrWlxqOktZuMsIZIi2RpdV3c2sunqZqPhmnF09S7xdEweV2AdVjc1by40LiWnKzJwKi3tKRyfXFTwrRnuZ2YwZpwlGgiQimHi69Dua1sr5tUVpTEzLuZwKytuK54faKyqI4qcFdIXDagpbR5govMuJaSnYF9n4CkyblBRz3+/v/DqYZwXD8UFA2nO9FlAAAAKnRSTlMA/v79Iv70aP781IEnRv6VSXBf/Ovbt0rv5NG8r9jMxa+KTc/CjsSj2soo+frGAAAUlUlEQVRYw6zUbWgScRwH8BxBM9uiXkTQw4te9HDZg9mkdY0uVw6LimY641ZyzodhcGhReKws8Y5KjUrGlFIIfOjU+cLJBsN7NfRNGrbpG33hiBwMRnvTm172u0PoRTXWw1fxDoT73Pf+9/tvWDMHxB4cp/2jN26q1Vxr6A5L7d8ukeyCiMrP5pfS6Rmr7ukZs+GgRLK9q2vD/8vGQ1Wcpl0g9w70cPnWuX4sKxICsDhdDYV8qb5pe9xtKxUKgYDDsXv3tq4t/0PeBJVdLubB6NyJSwqayx89z1INUalUCodXxeB6OsZa/f1KC2VugMzTcgRBvMD/a+UDVbzDpRrWvhm5e+KRipu8cjKJVRA+iwvVkMeDd3D5oX4lhrnvhRFEDhFkr7dY3LvtX7rvE8Miq4Zlo29GTl+TXuT0r4dYNMhffHlBXMXhTzrDtfqUKEqRZQewbZqXi93d3Vu7/rKxpFOM0y61rHa1Vhu5O/joPkMMKe1nw3K5YxFgGu+g/ZlM/nwSZS1ZWwNShlTChYAD8fL0ysrOv8C37xKJVqseXpbNzdVGZT10Oh2cemw2OcvlToCNrvs0zRCT50DGYKWjryBRU9TkdNYb5UpA7vUCffjw5q1/9Ngle0SQhRDuYhjtqMwV+hLJ3TMYbBqISWNoejxGtYoG2Q+d+1AMo0ibJhaNRmMam8Zk0mgMdQEvrhyGrL+4hGdLgWWQaYbpENjHU5DLEJIkI2n8Q89NhZGXiXyqD0VRS5bMmuG2bGY+JGk22wTc4e3m7R1d63bDDgQRZE86kstFIsFgUKfTXb9+Jh6Pn/3iMY4rjhwx0owWOqeUtzGQLyfiWbirLB83FY+7SVv0Sb0BF4LivL0+V96enPRSJDcFrs5qtep08AXafT1kHB+4JJWOgwyd4d22oFiWfJpIUBRlsVDCLxzdZnj+TiiOeAV7zfXeuKftQuRf5581IwI70w7409O69Af1gKJXKlXBqDMEl7rNQmcSZDsGgdcNPiicWdy2WDQWM9VL4QBv79y6ZuG2Cyl0NpvgWq0zqVTL10r5fL6xMU6v5/DnA5ceHRscBFnNZCZPJlmUxchsIpGww4pjQoQjzFosBr1fPalXHEWovXnL7wuXHG3X8RXgb0GoC25rDMJxHOF/OHJaNt6jmDg2ODuoUqnVDKE/3q9Ek1jWbYfnDKIlYb89jbIo2BaK1Ag02OUC0g21t/1ygktQGGlnebX5bH7eOuODtq1JLsP5/QRBaGuwmfUOKE5N3Jp9/0Klksm0D/THz6MA/ZDNJkMuqAQazt38sEFg2OsVuZefsF/BpVKg7coXO8FdSvuErpkMQfiv9g4zWthF7167dWFiQnpr9uVb1zDID/XHPyfZJMiYILMW08dP795ZlSwEo7IwXhoI2M6KHOF3lp+W+DvZ9RLTRBSFAVhNTNSoCxcujDu3lFqkFbANQktNWx5teWinLRNrMdbOGB5ppwstqCHDGLRiCL4w6iQyPhYqHTRqpmMJmoAWEaUtBpFqjJtCiEbQwMJz+1CjdzHbL/+595x7B+DsDp/7BvBnBIMJajvktdUXwBgtAvlRoDynPvAoUKCVGY1pufTWzeM33HCe3UgWMII5rwJ6124IDasB2Wn6GdD/wX+O1lwq8B24BPfXaq2Li4vezk5b+U4ZwEV5JvPIo0AgMHw64pAbjYeOXXz+6dYt9a77fW63W6UqLT3oDGPk+PkBkFP08fv3G6DiELvLB5v5L72p98XQ35WGwOCu8mojvCAI/IJVJrsWMA5CZCSfPRs4E4lEtHIFkrc331Kr3UfQkIORUzdQnSCx8HTdgLuxsTHV1rDZIKOCT8J2ngL6b7j3N/yNScMXVnm9jodxYen796U4L5cFHtstRS0teeaRkZGzww6vwwFdrT90tLJEo27WNLbNhRfCsViCC3oSGBamcc+Vmpo+tG4ch9BOWHDIXzalUm/+3U69vVDqLIwq/QZufb9W+3FqKg7y93joTJU0x97a0mIygRywd/v9WpALFFVHK/M1qu2avv4JlqIwkgxxXTMYSfDhRJLD+2uUSmVKxseTnA+aayU4QGeba9sf+APKC5W2Wr1+3RkCY9nlJcg8UWCB1ZKXh+RHdptOa9M6us8U2KuO5jarVfnqvv4FPh7n40BHZygMI0EPMT4PDtmLK0AOiyLP+OCUgQKNvT5d66He7Pz4wCAXAnu9Xr/8KjvKYpiwJCxPSCBvC5LNZrNdC+0kg8wKg6HqaIlGpckvvYHTPhz30TyGJWYoSpwXQiJBxGg6meQ4n7PaycV4KCBDv0NUtt7bhoay8NzrOxcAPrnK29kuM5Kjo6PssiCIxHCKBfjpU7Pd77fpFQqtQ243tFZdys1X7W12V+DBuo7GDmeMwgTIzNO0jwuRYnR1iBBD4aTPiTvp6Pv5+PQkWKjeG1KRh3ZkB9f4HeTCG8hmk1XZH4OMTU0tE8OStGsC2QKPUZtMoXdo5Xa7ZRBkdbO6ry14Xg2vUE+MZePzFBbGa4rpMIaNnRBh7zEoPN4AHR3lGRyVGybKulTkzOhqiq3NwlBPxaCl/AuqNnb9bk8hcqHST5/mab3ttTaZUe7tVhgslsFjuSX5+aobV2brNBlZQLJnoNEpgBwVscTYvDAlMh4YpNPiOP4SUc/QTq8/N9SUuSPgJWu1rrJ64fGlk+ktrZLyx4+/Xr/rkoKbkU1yr7czJTvkCmizomOVJSUlpcWzsyqNWjUwKbDsvEBhsaCqw8djRPQ9QXA03RWd4vG2hsNzxFrnu5SGBvimc5nI3xjUSw44W3AH7ZHr7a2FhRJXmaRHKjXlSeGDNlkOBemsra09pNfpFTBZDlzKLcnNd1fM/tir0QxcSYqj1EycwsavqDt8U2Ro9RhJBCuOVHcJItdw2Bkmx52TKW4jlHsryOlNXot6SeuHPt4j37NHATB4hfDNMZmQbIbTZYU3YUqWwXak5Mrtlbc7+tf4Zmd/BJM8yxJjIoXNnVcrfSLJ30tgE0FlRQMtEMm2w3iIYJz0q0y5V2w515T9a4g4HFBnnVxvhGWXSKUuqTQn/UXLbC50LEbaZbWwZHq93ZKVVcofieiaWIwX2VFKeE+wJPNA3cYRVPiewPLBmuI2X4iYbjvMkBPB6q5U6FMgN4GMIiO4W6eDsGgV2C2tPT0SF5jSsrIyVz3IgRy5NeKQvX0LNpxAQ2FL0YHLlypz99VV3CFIjEWLXODGMJZYc1uFJ0gqsTpEjfcriz2cSDL9QZ7iPfBAeoloJDeln3trFyPdOmABNRgMEkNrocvlKiuT5pTDtwcuxvp6RSTi0OmrkNxug3MA8rFLFyufKPs/kj9//iSJj2GGo6MijNDbbqdAkVyUEKNcMOiLYSLnYQjyNRyzavzFjqycifyrDXuPabMKwwCOsKnxbtQYjfeof5BSC6MUsKUWyii1tynQkkC5altwA1kL2ot06Fi1tGWBwkqVtibzgmUgCmPdxAwUVi8TL0wdYxc0zJEpG845lyzxeb+y6XRnrFm2ZL8+7/nOe853XPlcwKWAISclZRh4MsSVyXi8XINMpvW0VlZWrk1WjivRwUqSpWkkA/b1Cc/NXItxGMfj7m7TlgPTB14Q8NHOxlqONn08PX3y5PfPNZ0te/vDpvkP7Dgp2E2fMPIayLHI3jypVAU5qSspKTc3CRxkloyHgS+hNXgrKzsReWMx3rNwShgvRmSNQuET2LfNv03H8WF0s+yiN4ZMpu6cTYMtR6cH9775HI2mN2dOvoDIv9qRuYYvx5ZFT9gayL98/+2XnXl5eLDQl5AXMsG8gQEGpg+Zm4HTilMyiGZkf48mrFEUDc3Mn0s1N5jNk5OTDbSshwU59fbqrYNbxtYfO/bhoefWz7z6wsmxpvkh+QZEdmw3fUXyPZDX/P7Nn5XePJQak9xMMAYvGAyFBgYGQkZGjroAc1WlxSmgS5XjzcUbM/2a3eGenwt+/Wu+O9VsNmdlZXVwRBxOakNDg1hQK9/69nMzb1MHP3y47IVj6z/+Gi9Hz9QMDb+14eDzkG8lGZG97rQn05kpxiDYGAQN2dgeCUH2Vq7N53JVyuIU0M3NzRnNMTlcNPQlZDMG4A5OKoeDfpoqashxVB9r+nMIKWtMQtPW1dOHTYxcMOzYVPPFTdfF3ZAIee++BbebQVdcVBey0RgKBELL+9uDvChqzeVK09DZ0FUM1GFI7tf0CU17z/6mM5eXM7KEw2ZzOGy01BxH2dj6r4XvyzH4BabqrdV2uVBYY9KNOLY/U/07jr93J6755ey+Ba87Pb0VLDqmAVNslMkAGyk0tqx23ujCWtpGsEs0ZyQ9SXpzsd6qqegvkttNpqGcE5Ans+rqYjJ+OGLsVh9+QK+Am4T8ArSTZyDLn/7A2VfE31Dz4/VxcbcyssudHsVDTaOri2QPRV5eHhhY3t8UikRdLsAqpYpWXSlqjr6q1LdV2BYL+OKffvrpREzuqFOI2Ao2cJG5wYGDrhAnUpzEIPOFckS2V5+zOHUFOBQ+Gkehj5xdcLnd6aQacknm8YKRiJHkEOCBaK7X5erkSqmtYslLVUpl82PNSn2hvkInFGSVl5efMDOypE7ClkgkbHZqKp4xh1xej4Mw6Jgs5AvLfvzV6dQ5+JgAyDcm7o0VG+Xuoo6FyEFPpD0SCYWWmwAHoojsQj8HqlQqpVJszMUodluJ3tJdwMEjXX6iPCvLzJFIOiQKkjmparU4J7s2W5AjyAaNYmPw+fayr4685xyhl2FHHIXei2JDxiPWhUmmRunx7NrVHnj1+7GmSGggwItSS0fmNKn0u2Rp8nhGCp5t1WZ9G0W+JJslEh9+EFkEWS0QCMRicUymxAX8obKDzz9/ZNuIrrugnpFv2btvJ8H0fD1mkLFYsFnBYNP3CYlnAqFQiKfN7exU0dYphYzeiaW1LiOjObnQ+QafIk+i3pBT2b4eDRIzMg0m+bvZ9Tj8InGB0ERHzyPbtqHgw9mMfNe+nb0k02a8siUGjZELCVsSl2Ygo3O6IHdyyU7G0CvHM8eLM5L36N7o6+iADBqyGHKPRMEOY0GrUzFEmG1cHdU7kBm4vewgtqmlPxvj9zhHBCRfc/VtkFFqsBfhoHH//vMHExPnA4EATyvDA+bqRCvBwNacrC+06jeWNjrf0Pnq/pEb2D4bOnl49+7dIvQyDBG6WU52PdEFfHkNIuPm4kxjYYXF2bcij/ZOdAHGSS8ma4PLF9af/zwR5SZZO7qw4OrspNT5+QxsLVQmO7uL2HV1HZJYuSfNDZyeKVuPhmRS2WymkYqzayFTZDqD0Rvdw41W0Jfk3tZWHOdT6LxF8xxsunDmPNVmJhAY0HrcC6BdXsw1RgldkukLLd06wERPTqJ3chrEHNuUTaMBrFCQjA+UXCwYdjiwquxlP77OwHGrHomvqLBcrPYoZBxuceii1wiW1rj/wrXnEzHOQDZ6DAsLO12uvLx8wPmbN5colW0W3YgErg+yhGM2Y07VYb/fpgkv7g5rNCIRZ1LBxl9CxiMWq/XFN/dV1zwc/3BM3rdz1D3RinpjmgFDXl7/Fx4wjKV5KnfQi8iUWcrloo1Kx62YKd8Okn1YwKIGtfpntVpT5bftWVxc7NdoqIUycgMyQ6bHa82l2wrYt/xLTk/Hw53CZF7Hmtly/vxVgBEa9TYaoztdXlenNy+PW7K2RKUstDjDO3bUdXQA7pCw1WLBSJ+6T1Nls1oAV1RowmEOWwIa+zXNM85iP/7y/xsakjHR1ElQbS1lDs588vrr5K7MtNE4MTrq9XrT3NySEq5ys2VRs4NkVFqBJ0k9XESXV9Yqaz9gq7WiPxwOS3wKambi7Ox6h9BuAoxbqSvIE3jCMDJYT62DLJtZAhrLvDM6EAgZta29oJFZpeLGOy3WqR09VGc2XPQNuiHsW/T7KxbxT35rxR5csfh8PoUIcg7mWW76HVfOsP4v95Lcit94oUhZx+LNX4SXzrii2CxlHg/P7cXgqvLjt+F/t2H9KCgvRyRS95E80o/ITkubHzLuk3p6/pH59nOf4vbxynIrDfA01yn/lhfcE7wVmlJzX3o5vkRZ5fdPYe3uqJNIJtkxuWikwt+/aCnR+1HttkI6DyvYqSuy6d4r3rg+AhlmV2s6Bs5DxRmQX7soe9OjvKAxFOWxtLKo29vJVWWknJ6drZqawjyjh5jN6JHDkJ1W6x5LidJvbdvcGF+IZsY08J9zBLUOedn9Dz700KpVq64gU7WfZORSKTYEyK/F7DPu3KARgxc1sDwerYyFkTKbWUVux2T5iRO4lHo3uxbV3oO0+swqNFalHpEVbIUEshrw9me2JCQM3nHH/Q88+OCD9AVo/DPPUCnxuD5ZX/zY7TffBxo4ZIN2165IJBKY4Gl3YXhYKXifggwa+yPkdx5/9kWHztmmr8rEV9JDr8J5OHY0EVNkYdnWwYTBwcHVNO7AN7j/gQce+I+clvadvrCk1HD7nXE33Er40oduuuRsb2+PBKI8GdmsjGa8OE8xobPKQeOWcZNQ16/PPH369GzmLGbCb4OMdkr3CNmP1wurB2PygenpubmW1fRrNbNLrqzndCyY/M2471MlQcYAvrSvl5GPHz8eGp3oYuHPTz2GY2cmExqpKTTJFiVuUTBOk2vzSRRYyjk5775bW/vEW3JEJrnl1CFc0xxtYUZsf76N5F53njT/pcb4xhJVbkymetw2IfPsaifZiDVvYK3DSNk4O5vJlPuS3D1OV3QMjLyaMCqNKR7ORgN7a1PN1gRGnh774dChsVOIfEmmzBO9bi93bSPdOf5LvuW2Xh5koiOQkwxY7ikU+fLM23WfHT8OmcrtJ1mBOYZcC3n7hqchrz7Q0jL3xx8f/XAoJs+tZCbZneftfCU+/rLMmIkfZjyAMSDzcnMJ3kgwZNCY6FjmdsiIjPU2ZasgWSRKFYMmuZoiH5g+enRujvk4cLmcnsdd+8qV5LGBSGRFzsWiwhkfmS+TH4f8F8FU7CmbzdofZod308k3h6q9ofqOBLIRleQ/Tp062jI39zewUaw7BOflzwAAAABJRU5ErkJggg=="
#define ZEND_LOGO_DATA_URI "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAAvCAYAAADKH9ehAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEWJJREFUeNrsXQl0VNUZvjNJSAgEAxHCGsNitSBFxB1l0boUW1pp3VAUrKLWKgUPUlEB13K0Yq1alaXWuh5EadWK1F0s1gJaoaCgQDRKBBJDVhKSzPR+zPfg5vLevCUzmZnwvnP+k8ybN3fevfff73/vBAJTHxc+khL5kr6T1ODk5nAgTRTWloghFVtEg/zfh2PkSvq9pJGSKiX9SdKittbJoD/PSYkrJD0vKeB4IsNNotfuUtHk/CM+IvijpF9KGiDpGEkLJZ3lC7qPeKKTpD9IWiDpUOfWPCi61ZeLvD2VIhTwp9QlTjK5NsIXdB/xxHmSpvD/OucWPSAyQw2+LfeG1SbXVra1Tqb785xUaNdMel0g7Iu5V1zPv6dJqpD0kKR/+ILuI55o8oeg1bFT0kWSOkraQxK+oPvw0TZR3ZY758foyQXf//ZxUFh0Q/GEfNf9gHkaJ6m7pHJJSyTt9tnXhxtBR2EGlnHCMbZMaHuHzX19JZ0u6VRJh0k6hM+BpMjnklZIelPSNhff3V5StkNlEWBMFm+3LcC+BW3GuZP2GvfmiEiCCMUzxZIKRGSt9zeML/fdGAW9JB3O8c6SlMZ+b5f0qaQiF7EpnieXY1auvZfG7zhSUk8RSS428F7M5xfsh1eAV/vxOzoq16sklZBqbdpo5H2qDPRQXoP3Ki0+20FSFyrZUgt+Rt/7KH2vZb8/t/iMG2Sy/0dI6sbvgHGoV8a3xErQb5Q0iTfHCplkzlkW7w+VNF3ST7QJUzFK0pVkDFiw+yV95uC7r5Z0k3CW2ApwIkrJ9B9IelfSh2SIlqC/pDFUZAVk0rQoMhk2GYswx+AtWvMKPtcyEckW37pPwsIHNAuBniDpYhEpBMmJwvibJL0gIlVh39r0C8UlczkXQ/mM6OtEzuf3RfPVAxUY47f5PStcGKPxpOMldbbxiBptPMavJX1PuQ/P/olyz12S7rD4PLyqBTQ8gyXVSOot6VK+dxR53wyl7POjkv7pkpcwpleJSCHP4eQjM0BB/ZuG4Hl9EO8mQx4ZQ0FfL+k+k+t4wNlULpkO24IGnSzpQklzKPDRAMvZ1eXz9uXfH/Pvx5Ie44C5zYQXUgDPj6LEnMCQ3AFkjjupjGF9/kJmxPw1oiquz+6dalXcCRSmYxwK0kDSRI71azb3Y+6GiMi6P/5ey3F3YpExjxdQoG61uX8gBetkh2OWFkUIVGUT1pS9yosZNu1nkl8uZH+mikhxkx1wz7mkB0WkXsKJFw1ZuSWKotY9wjNJS6mUy41JK5P0c2qCnBgIeQWZvEK7Dnf6WUljTT5TS7d0KwezkJShdWIeGeuKKJo7FktUQylcl0i6RtL/HH4OjP+wB0UTLTGHfubRDWyi1g7SaoZQ495z9w7RpaHKqHEfLeklEyWzk+7dl3TTu1KQCpV7+pBB4IWstFFAgvOpJnTL6DoW0xPbw3k/nIYkW+kbmHeXhUEABklazrBDBdzTDfyuBo5DPq1eoUk7ZbSk70l6n3MZjUdCDpQvMF/rezn7/hX7Xs8wsj/7rsrWdQxnZtrwwENUosJkDDZxTjOUkEH1ds6lzJyDZzGScRsonGNcMCIG+WgRKTRQ8Su2p7uRi/mlKjZKekREChS2KIOcTvfqp3RZDlM+cxnfv8Thc75Pt8kqo92VzNTbxBqcQlceivAdByHDIxbvFTMOLovyHAGGK3qc/jJDoDc4hpjABzBm4UAglBFqEAOqt8mB29ss4uJnNCHfSK/tVZMYEfMykt7Bcco1eDLDHCT8gmzzRdLHZL6wRSgzg6GIgVl8Xj2uhPA+oQn53yTdK2mVMC8NzuJ8zaSyM/ApxyzWCFJRvUQ3eQ29BTNFcRgt+FTl2g30zDZZtD/ZRMifE5ES6Y9MxqAHQ7XZikI9nd97j5p1f83GZTPr6Crt2sOcOB1zTYT8HrqjVRZx4wbSAt47SXn/YsZV9zp4zuvJgNGQRaszmoN1rBY6IH4dHiVHcA5dZd2zeIbPv8ZBkghYTQFTx/h1WvSz6c3kM5ewGG8Prvxc5DZWS2u+dypnM5Y3sIJMXmbxfXW0misZN56oxITnWsyl2fg+6+C+zWTefMWr68RwaYF271htHBZqCsKqL28wB/ACjYShrE9nUjfWmEU33A7woqbR4k5UlNk4yoYOzOHvtGs30KO1QgnlZC2VohGOIGn7WEvW0ZdoMeCHfBgdo8X++m3V+s2wEHKzJMblJom92+ne2SHDwT1gknUispPpJLrrVZqwLxTmy5F5jOdVS72F/b6UwlbrcEytrD00+a8l/ZUM82jEZd8peu8uNYS8JxNWqis5IYqQCy1rPUULh8Y7fOYal3zzmPb6aJN7zlf+32bBV9ESclNE85WUX4j4oNbl/fM1b2eoxX3jyXNqiDTP4Xe8Rm9ItfSjvAr6DM0d+o5MXW/CuHO0a7eZTLYT3KF9LktYZ/WdCI+IkoV+lFZ6l3J9OF14HdM0F3MrhXxFjJmqhh5FBera24XqxaCqL0UosK97Z2ku+yJaEqf4D62ByoROcjZuN78Xaa9zTBSzKvxvC+vlrmgWVPU2h4j4FCO5lZ+vNBnpYHHfOOX/PfR83eApTaGM8CLop5l88WSLWAOu4AiNme5owcBO1xhlLGO/eGAFkyYqrtFe5zKzqU7KBE5o/BAIiv7VJSK7qV4GhEF1XtSk0YseWl6lWYI+cXj6pigJLkH3Vk0qfebxe4q0JGOGSDxCWn/Nchk9qJgMfGKS87LDes1IHeVW0LszgaC6sPMYE5lBt4CzRcuy4lVMLKlWfWwcJ+YpxtcGjtOYfzRjTgNIlv0rnpyCveeHNFSJ/jUlonH/3nNYqyOU28qYhHOLbzVPqFc81JQDKxnQ5twLdmjfmQzlxU6eoZ/mma3y8D3VonlhUr6bElhMwJ81RseSxW+jfOYULdYGAw5s4WBtpeU0ijKwxnp/HCfn70piCNlMFEUU8/WpmnZe1Bq80r96m5yMkIwx9nnNHTWFs114q0ArM1HsiUY7j5/rKFIThdrrzR7agHyoy9vd3Ag64uEfKa+xjIKlLqtTUBB7FWgJrQ9joFl1d2cQ2wzHaeDXa6/ztO9Wx+OT+FrzSAKuV12ptOZp+ljnaVawk8uxDpnMZXYCGB3PXqe5sl7QQ5ubhhQR9B4mQpvjIR+gJgrbOxV0rK/rVUyXmyRWdI2a2YLEhVP3BwmN9sJ9BtQpKkxiSDOrUeUhaeQaPevKzKQ3oIVTSGatcynoRl29sIkh440a8pURNoz00Ab4Ts1obxCps1FKl8k5IpKbcmsgu6nz6ETQC+iSqoKKOPmVJBmYnDjHX4EozB9s7TgwykkyYS13URAHpmstYIloOP/HEi6Wx5a4+DwSpH2V18tTyHUPm3iQeS1s09ai4/0ntVgNRQmzHTRulGwaQNnei3FgHqPcMBEJlXrNioAaE8AcupKBd7ElBu1uTxCzg+dmKB4TahiQNX/OxssAb00Uzdeci4S3FYhEQdfkWCrc1cI2K+2EDhsP1OUxZGUnOWTmcgphV0UgZ4jUR1hLlBiuJfqJpb61CXimOrq8RqiEeu6TU3iMwdzYgWhUnWHDDKr0ptLar6USqmOfYYiGMMTUN/KgziGVTo+pNJHBBfF0zVAQc6N2DUL+tcO2Yc1Rk2ss+yBmOko43yCSCljJXAWA7PD4eAt6MBy2yiNACRvVVN05t40pPLYPsT+zlRDpOLG/Jt8OSGKhmnBpivV7q/Y6JkucVgkyWKb52rVZwl0tvNDi+AzRvKjfK1Dnjvpd1FhPEc1LBVsbqENXN35cFaPY2BIVGdlWYZKqgPPj/RythNtpcNycpoOxwAae0bGwhAkAQg01cfiDWDRqZtHhCqFQ5FAtOXKXh/Yh6Ci2N5YMUDW2SHg/N3scn02N++cnMIZCBdwS9gtApRxqDc6OlzWtSrdc8cJGlzP5fzZDri1tQNixISWL/5fSQvcVzfe/wzXfSG8Kuw03pHB/t5KMik+EYJ1EC1d0zCw6fofqRI2ZJwpvyxN4uPs0q/6UR2szyESobxatf3aa7jvfrT0DGPNpYV3H3CI0BYLGllQdy7TX14rUP/zzDHpuRp0EPLnJvH68Qij/RXnyIyku5Ea+5S3NO7s01q77eMY1qqY8T7Qs+4qtq+o2UWhjZO6HuWhjJBlZXWbAHvbFSTAxqMW+RbuG3VfviAP36tshujINh6Tr3kE0BNMl5x8Qq6+mVTdwrMlzpRrGaGPzVpw9NDNFngjoFZZzRCS/FRPXHRZT31X2MgfYTQYX1WE1moaaQJfKEFTs/camkXnUwt9YtNWPiuc67VmRlb0yiRgS/cAe7is0QXuTAm9kikM2DNc5OkeGRaMU8tq0TJHbUCOtezMeRfITiSv1PLLbGE5gb/NOB/1AuR1KlLETDltidyR4XIPasyEnc6eIbRa9kfNifFeXJOAnVJBiKfFCvobcLKccLHWojHJpIPH3iXQlpoNLrdcH44sucvmQOHHjZ9rDrGdbixVmbk/XGy4mtiKuoQDjmQpFJLs6wuSZvqKmL0ky6zOZLry+420UKUaue5ooyeqy9+iopgM989cp1Dcp16bSU1tOJbyFyjedTID5wOk6OAUFFXUDKFRLkmBM3xH7fzIJwPLsxexDMWP2b8g38DqN45ywCuH0VNuv+XmjwOYCjtUakbg6AkGlNoQGBMB5A9g8hh2g7zFE2U4F35FxfHfmwwbxcz3Yl32C/oAwPwDAS6UXdpOhXPZ27Trc9R/SLTla0zzGoXl2QAexnLVZJB/CZMpV7HthfL4lJIrb54u+tdv3/rCiSbw+k88yM9ZxXgKwlHmZycq13iSr0KeMHmUZw6r1VICrLT4D5fy4wq/5DAvfjaWC9oAd9KxwTNUJynUjL+EqpwSTME1zOWMBuIxmZ7p9RCsNq+NmdxW09I1MdNkJeYZNHsIt0qKEO2Z4kvmHadS+Xqv2cqzc93rpuhdl54tg2DISuJljBW3uZjMHrAPqHOYK6zPIM23G2+14Rts4cyLbdxo3Y667UskOo/W/m/PwRhQBwZFkT2vXzDbTtLMZCyfP1155bbfDrpjKZoYH41bO+d97jmEgMPVxFMF0iHESIkiNtDhKuwV058cw0dBZNP+lFsSU/6VWf0E4P/x+IF2eJnokr4uW/2jAKPYjjRb7Cxef70c3qsCl0im1Gj/Uu2eF6sWo0rUiTQq7zS+pYjywnXYwcyOZfI4mKgHj9N2ttHqbRfSlQXhjw5XXy4S7ZbzOovkxVRsphHp8ia3HlyleZS1zHcvoVrdjuNFdEe7edGHzSbpSria/WZ3+cxYV5DCx/4w7FUfyfTW0WO+i7x2YrzKUXZFw/sut+OxJDGkHUxEZPwgCquQcIgxZR9oXekDQk8FF60bqwocupaIoEz6EmaC3C+0Ro6Wgp4eb2tpPJqN+4xXFXQ3TfUfCc5PDNnLZDpLIV1NADKyjZa87mHgmWX57bYdIfIY3pdCGf43xQUXI62kBn3fZxi4SPC8crIjDQ4yzFAaz/XcPJn7xf03VRzIB5Z7qCbBzPQi5jga2E9bCD+ELug8ficEZCk/Cmj8Ro3aLtLxDR1/QffhIHNRTUZCf+S5G7SJBp2b7G31B9+EjcVAFEInZQ2LU7jiN1zf4gu7DR+KwTvkfO9bGx6BNnEQ8XXmN5cT3fEH34SNxwN4A9dgknIEwyWNbeRTwV7WYHBVwFQfbwKb7vOUjiYAiKVT1PczXqCLD/n5UbuLcNxTKoCgExSFNmsFCHI6iJBQFnUbqqbWPHyFceDAOrC/oPpIN+FVaVLrNUa6dLPbvoEQdO4pd1OUylBVkCutsOkqosbNvwcE6qL6g+0hG3MY4ejots1pT3kE4P9QDdfuLKeDfHswD6gu6j2TF2yQcLoqEGurre9EdP1QTfmxJRdn0NlrvD+jmY69Egz+UQvxfgAEALJ4EcRDa/toAAAAASUVORK5CYII="
BEGIN_EXTERN_C()
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 4554be32db..7e5a8987b4 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -38,6 +38,15 @@
#include <sys/stat.h>
+#ifdef PHP_WIN32
+# include "win32/php_stdint.h"
+#else
+# if HAVE_INTTYPES_H
+# include <inttypes.h>
+# elif HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
/* some defines for the different JPEG block types */
#define M_SOF0 0xC0 /* Start Of Frame N */
@@ -196,6 +205,11 @@ PHP_FUNCTION(iptcembed)
RETURN_FALSE;
}
+ if (iptcdata_len >= SIZE_MAX - sizeof(psheader) - 1025) {
+ php_error_docref(NULL, E_WARNING, "IPTC data too large");
+ RETURN_FALSE;
+ }
+
if ((fp = VCWD_FOPEN(jpeg_file, "rb")) == 0) {
php_error_docref(NULL, E_WARNING, "Unable to open %s", jpeg_file);
RETURN_FALSE;
@@ -204,7 +218,7 @@ PHP_FUNCTION(iptcembed)
if (spool < 2) {
zend_fstat(fileno(fp), &sb);
- spoolbuf = zend_string_alloc(iptcdata_len + sizeof(psheader) + sb.st_size + 1024, 0);
+ spoolbuf = zend_string_safe_alloc(1, iptcdata_len + sizeof(psheader) + 1024 + 1, sb.st_size, 0);
poi = (unsigned char*)ZSTR_VAL(spoolbuf);
memset(poi, 0, iptcdata_len + sizeof(psheader) + sb.st_size + 1024 + 1);
}
@@ -238,6 +252,7 @@ PHP_FUNCTION(iptcembed)
case M_APP13:
/* we are going to write a new APP13 marker, so don't output the old one */
php_iptc_skip_variable(fp, 0, 0);
+ fgetc(fp); /* skip already copied 0xFF byte */
php_iptc_read_remaining(fp, spool, poi?&poi:0);
done = 1;
break;
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index e52c2d5465..74b46eadd2 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -54,8 +54,8 @@ static void lcg_seed(void);
PHPAPI double php_combined_lcg(void) /* {{{ */
{
- php_int32 q;
- php_int32 z;
+ int32_t q;
+ int32_t z;
if (!LCG(seeded)) {
lcg_seed();
diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c
index 1daf18d0a4..b6d8f88df6 100644
--- a/ext/standard/levenshtein.c
+++ b/ext/standard/levenshtein.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 7001dd8807..62e7295c70 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/link_win32.c b/ext/standard/link_win32.c
index a5bc913482..56ab4500c4 100644
--- a/ext/standard/link_win32.c
+++ b/ext/standard/link_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 6e83b95fc3..b27e12adc1 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -331,7 +331,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
}
if (hdr && php_mail_detect_multiple_crlf(hdr)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Multiple or malformed newlines found in additional_header");
+ php_error_docref(NULL, E_WARNING, "Multiple or malformed newlines found in additional_header");
MAIL_RET(0);
}
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 9ab457b41d..688ae9f6d1 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -93,18 +93,6 @@ static inline double php_intpow10(int power) {
}
/* }}} */
-/* {{{ php_math_is_finite */
-static inline int php_math_is_finite(double value) {
-#if defined(PHP_WIN32)
- return _finite(value);
-#elif defined(isfinite)
- return isfinite(value);
-#else
- return value == value && (value == 0. || value * 2. != value);
-#endif
-}
-/* }}} */
-
/* {{{ php_round_helper
Actually performs the rounding of a value to integer in a certain mode */
static inline double php_round_helper(double value, int mode) {
@@ -142,10 +130,11 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
double tmp_value;
int precision_places;
- if (!php_math_is_finite(value)) {
+ if (!zend_finite(value)) {
return value;
}
+ places = places < INT_MIN+1 ? INT_MIN+1 : places;
precision_places = 14 - php_intlog10abs(value);
f1 = php_intpow10(abs(places));
@@ -154,8 +143,10 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
the requested places BUT is small enough to make sure a non-zero value
is returned, pre-round the result to the precision */
if (precision_places > places && precision_places - places < 15) {
- f2 = php_intpow10(abs(precision_places));
- if (precision_places >= 0) {
+ int64_t use_precision = precision_places < INT_MIN+1 ? INT_MIN+1 : precision_places;
+
+ f2 = php_intpow10(abs((int)use_precision));
+ if (use_precision >= 0) {
tmp_value = value * f2;
} else {
tmp_value = value / f2;
@@ -163,8 +154,11 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
/* preround the result (tmp_value will always be something * 1e14,
thus never larger than 1e15 here) */
tmp_value = php_round_helper(tmp_value, mode);
+
+ use_precision = places - precision_places;
+ use_precision = use_precision < INT_MIN+1 ? INT_MIN+1 : use_precision;
/* now correctly move the decimal point */
- f2 = php_intpow10(abs(places - precision_places));
+ f2 = php_intpow10(abs((int)use_precision));
/* because places < precision_places */
tmp_value = tmp_value / f2;
} else {
@@ -390,7 +384,15 @@ PHP_FUNCTION(round)
}
if (ZEND_NUM_ARGS() >= 2) {
- places = (int) precision;
+#if SIZEOF_ZEND_LONG > SIZEOF_INT
+ if (precision >= 0) {
+ places = precision > INT_MAX ? INT_MAX : (int)precision;
+ } else {
+ places = precision <= INT_MIN ? INT_MIN+1 : (int)precision;
+ }
+#else
+ places = precision;
+#endif
}
convert_scalar_to_number_ex(value);
@@ -1456,27 +1458,27 @@ PHP_FUNCTION(fmod)
}
/* }}} */
-/* {{{ proto int intdiv(int numerator, int divisor)
- Returns the integer division of the numerator by the divisor */
+/* {{{ proto int intdiv(int dividend, int divisor)
+ Returns the integer quotient of the division of dividend by divisor */
PHP_FUNCTION(intdiv)
{
- zend_long numerator, divisor;
+ zend_long dividend, divisor;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &numerator, &divisor) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &dividend, &divisor) == FAILURE) {
return;
}
if (divisor == 0) {
zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Division by zero");
return;
- } else if (divisor == -1 && numerator == ZEND_LONG_MIN) {
+ } else if (divisor == -1 && dividend == ZEND_LONG_MIN) {
/* Prevent overflow error/crash ... really should not happen:
We don't return a float here as that violates function contract */
zend_throw_exception_ex(zend_ce_arithmetic_error, 0, "Division of PHP_INT_MIN by -1 is not an integer");
return;
}
- RETURN_LONG(numerator / divisor);
+ RETURN_LONG(dividend / divisor);
}
/* }}} */
diff --git a/ext/standard/md5.c b/ext/standard/md5.c
index 1d7d2fba01..825df21c69 100644
--- a/ext/standard/md5.c
+++ b/ext/standard/md5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -169,16 +169,16 @@ PHP_NAMED_FUNCTION(php_if_md5_file)
*/
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
# define SET(n) \
- (*(php_uint32 *)&ptr[(n) * 4])
+ (*(uint32_t *)&ptr[(n) * 4])
# define GET(n) \
SET(n)
#else
# define SET(n) \
(ctx->block[(n)] = \
- (php_uint32)ptr[(n) * 4] | \
- ((php_uint32)ptr[(n) * 4 + 1] << 8) | \
- ((php_uint32)ptr[(n) * 4 + 2] << 16) | \
- ((php_uint32)ptr[(n) * 4 + 3] << 24))
+ (uint32_t)ptr[(n) * 4] | \
+ ((uint32_t)ptr[(n) * 4 + 1] << 8) | \
+ ((uint32_t)ptr[(n) * 4 + 2] << 16) | \
+ ((uint32_t)ptr[(n) * 4 + 3] << 24))
# define GET(n) \
(ctx->block[(n)])
#endif
@@ -190,8 +190,8 @@ PHP_NAMED_FUNCTION(php_if_md5_file)
static const void *body(PHP_MD5_CTX *ctx, const void *data, size_t size)
{
const unsigned char *ptr;
- php_uint32 a, b, c, d;
- php_uint32 saved_a, saved_b, saved_c, saved_d;
+ uint32_t a, b, c, d;
+ uint32_t saved_a, saved_b, saved_c, saved_d;
ptr = data;
@@ -307,8 +307,8 @@ PHPAPI void PHP_MD5Init(PHP_MD5_CTX *ctx)
PHPAPI void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size)
{
- php_uint32 saved_lo;
- php_uint32 used, free;
+ uint32_t saved_lo;
+ uint32_t used, free;
saved_lo = ctx->lo;
if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) {
@@ -342,7 +342,7 @@ PHPAPI void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size)
PHPAPI void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx)
{
- php_uint32 used, free;
+ uint32_t used, free;
used = ctx->lo & 0x3f;
diff --git a/ext/standard/md5.h b/ext/standard/md5.h
index 31ee7af063..5acd83ecbe 100644
--- a/ext/standard/md5.h
+++ b/ext/standard/md5.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,10 +42,10 @@ PHP_NAMED_FUNCTION(php_if_md5_file);
/* MD5 context. */
typedef struct {
- php_uint32 lo, hi;
- php_uint32 a, b, c, d;
+ uint32_t lo, hi;
+ uint32_t a, b, c, d;
unsigned char buffer[64];
- php_uint32 block[16];
+ uint32_t block[16];
} PHP_MD5_CTX;
PHPAPI void PHP_MD5Init(PHP_MD5_CTX *ctx);
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index 2aa5bc87a8..73290e9d70 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 4b391bbb7d..9793dcd701 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/microtime.h b/ext/standard/microtime.h
index 8146c6c86e..86b286e723 100644
--- a/ext/standard/microtime.h
+++ b/ext/standard/microtime.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 4d4b8b31e7..1d353d1743 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -112,32 +112,24 @@ static void php_pack(zval *val, size_t size, int *map, char *output)
PHP_FUNCTION(pack)
{
zval *argv = NULL;
- int num_args, i;
+ int num_args = 0, i;
int currentarg;
char *format;
- int formatlen;
+ size_t formatlen;
char *formatcodes;
int *formatargs;
int formatcount = 0;
int outputpos = 0, outputsize = 0;
zend_string *output;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &argv, &num_args) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s*", &format, &formatlen, &argv, &num_args) == FAILURE) {
return;
}
- if (Z_ISREF(argv[0])) {
- SEPARATE_ZVAL(&argv[0]);
- }
- convert_to_string_ex(&argv[0]);
-
- format = Z_STRVAL(argv[0]);
- formatlen = Z_STRLEN(argv[0]);
-
/* We have a maximum of <formatlen> format codes to deal with */
formatcodes = safe_emalloc(formatlen, sizeof(*formatcodes), 0);
formatargs = safe_emalloc(formatlen, sizeof(*formatargs), 0);
- currentarg = 1;
+ currentarg = 0;
/* Preprocess format into formatcodes and formatargs */
for (i = 0; i < formatlen; formatcount++) {
@@ -187,10 +179,7 @@ PHP_FUNCTION(pack)
}
if (arg < 0) {
- if (Z_ISREF(argv[currentarg])) {
- SEPARATE_ZVAL(&argv[currentarg]);
- }
- convert_to_string_ex(&argv[currentarg]);
+ convert_to_string(&argv[currentarg]);
arg = Z_STRLEN(argv[currentarg]);
if (code == 'Z') {
/* add one because Z is always NUL-terminated:
@@ -334,7 +323,7 @@ PHP_FUNCTION(pack)
output = zend_string_alloc(outputsize, 0);
outputpos = 0;
- currentarg = 1;
+ currentarg = 0;
/* Do actual packing */
for (i = 0; i < formatcount; i++) {
@@ -562,9 +551,10 @@ PHP_FUNCTION(unpack)
zend_string *formatarg, *inputarg;
zend_long formatlen, inputpos, inputlen;
int i;
+ zend_long offset = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &formatarg,
- &inputarg) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|l", &formatarg,
+ &inputarg, &offset) == FAILURE) {
return;
}
@@ -574,6 +564,14 @@ PHP_FUNCTION(unpack)
inputlen = ZSTR_LEN(inputarg);
inputpos = 0;
+
+ if (offset < 0 || offset > inputlen) {
+ php_error_docref(NULL, E_WARNING, "Offset " ZEND_LONG_FMT " is out of input range" , offset);
+ RETURN_FALSE;
+ }
+ input += offset;
+ inputlen -= offset;
+
array_init(return_value);
while (formatlen-- > 0) {
@@ -700,7 +698,7 @@ PHP_FUNCTION(unpack)
}
if (size != 0 && size != -1 && size < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer overflow", type);
+ php_error_docref(NULL, E_WARNING, "Type %c: integer overflow", type);
zval_dtor(return_value);
RETURN_FALSE;
}
@@ -997,7 +995,7 @@ PHP_FUNCTION(unpack)
/* Reached end of input for '*' repeater */
break;
} else {
- php_error_docref(NULL, E_WARNING, "Type %c: not enough input, need %d, have %d", type, size, inputlen - inputpos);
+ php_error_docref(NULL, E_WARNING, "Type %c: not enough input, need %d, have " ZEND_LONG_FMT, type, size, inputlen - inputpos);
zval_dtor(return_value);
RETURN_FALSE;
}
diff --git a/ext/standard/pack.h b/ext/standard/pack.h
index 3955bf1bb2..04c85c9379 100644
--- a/ext/standard/pack.h
+++ b/ext/standard/pack.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index afa674d5c7..85c6b8fdae 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/pageinfo.h b/ext/standard/pageinfo.h
index e8e1761621..da5a287815 100644
--- a/ext/standard/pageinfo.h
+++ b/ext/standard/pageinfo.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 859dbe9d5f..2a5cec3e93 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include "php.h"
-#if HAVE_CRYPT
#include "fcntl.h"
#include "php_password.h"
@@ -30,6 +29,7 @@
#include "base64.h"
#include "zend_interfaces.h"
#include "info.h"
+#include "php_random.h"
#if PHP_WIN32
#include "win32/winutil.h"
@@ -109,8 +109,7 @@ static int php_password_salt_to64(const char *str, const size_t str_len, const s
static int php_password_make_salt(size_t length, char *ret) /* {{{ */
{
- int buffer_valid = 0;
- size_t i, raw_length;
+ size_t raw_length;
char *buffer;
char *result;
@@ -123,37 +122,10 @@ static int php_password_make_salt(size_t length, char *ret) /* {{{ */
buffer = (char *) safe_emalloc(raw_length, 1, 1);
-#if PHP_WIN32
- {
- BYTE *iv_b = (BYTE *) buffer;
- if (php_win32_get_random_bytes(iv_b, raw_length) == SUCCESS) {
- buffer_valid = 1;
- }
- }
-#else
- {
- int fd, n;
- size_t read_bytes = 0;
- fd = open("/dev/urandom", O_RDONLY);
- if (fd >= 0) {
- while (read_bytes < raw_length) {
- n = read(fd, buffer + read_bytes, raw_length - read_bytes);
- if (n < 0) {
- break;
- }
- read_bytes += (size_t) n;
- }
- close(fd);
- }
- if (read_bytes >= raw_length) {
- buffer_valid = 1;
- }
- }
-#endif
- if (!buffer_valid) {
- for (i = 0; i < raw_length; i++) {
- buffer[i] ^= (char) (255.0 * php_rand() / RAND_MAX);
- }
+ if (FAILURE == php_random_bytes_silent(buffer, raw_length)) {
+ php_error_docref(NULL, E_WARNING, "Unable to generate salt");
+ efree(buffer);
+ return FAILURE;
}
result = safe_emalloc(length, 1, 1);
@@ -288,7 +260,7 @@ PHP_FUNCTION(password_verify)
Hash a password */
PHP_FUNCTION(password_hash)
{
- char *hash_format, *hash, *salt, *password;
+ char hash_format[8], *hash, *salt, *password;
zend_long algo = 0;
size_t password_len = 0;
int hash_len;
@@ -316,7 +288,6 @@ PHP_FUNCTION(password_hash)
}
required_salt_len = 22;
- hash_format = emalloc(8);
sprintf(hash_format, "$2y$%02ld$", (long) cost);
hash_format_len = 7;
}
@@ -328,33 +299,25 @@ PHP_FUNCTION(password_hash)
}
if (options && (option_buffer = zend_hash_str_find(options, "salt", sizeof("salt")-1)) != NULL) {
- char *buffer;
- size_t buffer_len = 0;
+ zend_string *buffer;
php_error_docref(NULL, E_DEPRECATED, "Use of the 'salt' option to password_hash is deprecated");
switch (Z_TYPE_P(option_buffer)) {
case IS_STRING:
- buffer = estrndup(Z_STRVAL_P(option_buffer), Z_STRLEN_P(option_buffer));
- buffer_len = Z_STRLEN_P(option_buffer);
+ buffer = zend_string_copy(Z_STR_P(option_buffer));
break;
case IS_LONG:
case IS_DOUBLE:
case IS_OBJECT:
- {
- zend_string *tmp = zval_get_string(option_buffer);
- buffer = estrndup(ZSTR_VAL(tmp), ZSTR_LEN(tmp));
- buffer_len = ZSTR_LEN(tmp);
- zend_string_release(tmp);
+ buffer = zval_get_string(option_buffer);
break;
- }
case IS_FALSE:
case IS_TRUE:
case IS_NULL:
case IS_RESOURCE:
case IS_ARRAY:
default:
- efree(hash_format);
php_error_docref(NULL, E_WARNING, "Non-string salt parameter supplied");
RETURN_NULL();
}
@@ -362,36 +325,31 @@ PHP_FUNCTION(password_hash)
/* XXX all the crypt related APIs work with int for string length.
That should be revised for size_t and then we maybe don't require
the > INT_MAX check. */
- if (buffer_len > INT_MAX) {
- efree(hash_format);
- efree(buffer);
+ if (ZSTR_LEN(buffer) > INT_MAX) {
php_error_docref(NULL, E_WARNING, "Supplied salt is too long");
RETURN_NULL();
- } else if (buffer_len < required_salt_len) {
- efree(hash_format);
- efree(buffer);
- php_error_docref(NULL, E_WARNING, "Provided salt is too short: %zd expecting %zd", buffer_len, required_salt_len);
+ } else if (ZSTR_LEN(buffer) < required_salt_len) {
+ php_error_docref(NULL, E_WARNING, "Provided salt is too short: %zd expecting %zd", ZSTR_LEN(buffer), required_salt_len);
+ zend_string_release(buffer);
RETURN_NULL();
- } else if (php_password_salt_is_alphabet(buffer, buffer_len) == FAILURE) {
+ } else if (php_password_salt_is_alphabet(ZSTR_VAL(buffer), ZSTR_LEN(buffer)) == FAILURE) {
salt = safe_emalloc(required_salt_len, 1, 1);
- if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) == FAILURE) {
- efree(hash_format);
- efree(buffer);
+ if (php_password_salt_to64(ZSTR_VAL(buffer), ZSTR_LEN(buffer), required_salt_len, salt) == FAILURE) {
efree(salt);
- php_error_docref(NULL, E_WARNING, "Provided salt is too short: %zd", buffer_len);
+ php_error_docref(NULL, E_WARNING, "Provided salt is too short: %zd", ZSTR_LEN(buffer));
+ zend_string_release(buffer);
RETURN_NULL();
}
salt_len = required_salt_len;
} else {
salt = safe_emalloc(required_salt_len, 1, 1);
- memcpy(salt, buffer, required_salt_len);
+ memcpy(salt, ZSTR_VAL(buffer), required_salt_len);
salt_len = required_salt_len;
}
- efree(buffer);
+ zend_string_release(buffer);
} else {
salt = safe_emalloc(required_salt_len, 1, 1);
if (php_password_make_salt(required_salt_len, salt) == FAILURE) {
- efree(hash_format);
efree(salt);
RETURN_FALSE;
}
@@ -404,7 +362,6 @@ PHP_FUNCTION(password_hash)
sprintf(hash, "%s%s", hash_format, salt);
hash[hash_format_len + salt_len] = 0;
- efree(hash_format);
efree(salt);
/* This cast is safe, since both values are defined here in code and cannot overflow */
@@ -426,7 +383,6 @@ PHP_FUNCTION(password_hash)
}
/* }}} */
-#endif /* HAVE_CRYPT */
/*
* Local variables:
* tab-width: 4
diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h
index 8176e175bc..302f0ddc67 100644
--- a/ext/standard/php_array.h
+++ b/ext/standard/php_array.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -125,14 +125,9 @@ PHPAPI zend_long php_count_recursive(zval *array, zend_long mode);
#define ARRAY_FILTER_USE_KEY 2
ZEND_BEGIN_MODULE_GLOBALS(array)
- int *multisort_flags[2];
- int (*compare_func)(zval *result, zval *op1, zval *op2);
+ compare_func_t *multisort_func;
ZEND_END_MODULE_GLOBALS(array)
-#ifdef ZTS
-#define ARRAYG(v) ZEND_TSRMG(array_globals_id, zend_array_globals *, v)
-#else
-#define ARRAYG(v) (array_globals.v)
-#endif
+#define ARRAYG(v) ZEND_MODULE_GLOBALS_ACCESSOR(array, v)
#endif /* PHP_ARRAY_H */
diff --git a/ext/standard/php_assert.h b/ext/standard/php_assert.h
index 7cc4813d76..fe6df4051f 100644
--- a/ext/standard/php_assert.h
+++ b/ext/standard/php_assert.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_browscap.h b/ext/standard/php_browscap.h
index 65791430f7..3daef45faf 100644
--- a/ext/standard/php_browscap.h
+++ b/ext/standard/php_browscap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h
index 88368c966f..cff71d867b 100644
--- a/ext/standard/php_crypt.h
+++ b/ext/standard/php_crypt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,11 +25,9 @@
PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet);
PHP_FUNCTION(crypt);
-#if HAVE_CRYPT
PHP_MINIT_FUNCTION(crypt);
PHP_MSHUTDOWN_FUNCTION(crypt);
PHP_RINIT_FUNCTION(crypt);
-#endif
#endif
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c
index 39185a66c3..8b97d4a496 100644
--- a/ext/standard/php_crypt_r.c
+++ b/ext/standard/php_crypt_r.c
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -127,7 +127,7 @@ to64(char *s, int32_t v, int n)
char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
HCRYPTPROV hCryptProv;
HCRYPTHASH ctx, ctx1;
- unsigned int i, pwl, sl;
+ DWORD i, pwl, sl;
const BYTE magic_md5[4] = "$1$";
const DWORD magic_md5_len = 3;
DWORD dwHashLen;
@@ -144,7 +144,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
return NULL;
}
- pwl = (unsigned int) strlen(pw);
+ pwl = (DWORD) strlen(pw);
/* Refine the salt first */
sp = salt;
@@ -160,7 +160,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
}
/* get the length of the true salt */
- sl = ep - sp;
+ sl = (DWORD)(ep - sp);
/* Create an empty hash object. */
if(!CryptCreateHash(hCryptProv, CALG_MD5, 0, 0, &ctx)) {
@@ -318,12 +318,12 @@ _destroyProv:
*/
char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
{
- static char passwd[MD5_HASH_MAX_LEN], *p;
+ ZEND_TLS char passwd[MD5_HASH_MAX_LEN], *p;
const char *sp, *ep;
unsigned char final[16];
unsigned int i, sl, pwl;
PHP_MD5_CTX ctx, ctx1;
- php_uint32 l;
+ uint32_t l;
int pl;
pwl = strlen(pw);
@@ -418,7 +418,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
*p = '\0';
/* Don't leave anything around in vm they could use. */
- memset(final, 0, sizeof(final));
+ ZEND_SECURE_ZERO(final, sizeof(final));
return (passwd);
}
diff --git a/ext/standard/php_crypt_r.h b/ext/standard/php_crypt_r.h
index c473061461..2f7aee7c5d 100644
--- a/ext/standard/php_crypt_r.h
+++ b/ext/standard/php_crypt_r.h
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h
index ada6174e00..b580eef0fb 100644
--- a/ext/standard/php_dir.h
+++ b/ext/standard/php_dir.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h
index 50710e861a..dfd43a40dc 100644
--- a/ext/standard/php_dns.h
+++ b/ext/standard/php_dns.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h
index d7bb4011bc..368957fd5e 100644
--- a/ext/standard/php_ext_syslog.h
+++ b/ext/standard/php_ext_syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h
index 05b46db76b..2e87d96f05 100644
--- a/ext/standard/php_filestat.h
+++ b/ext/standard/php_filestat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index 89b8bed19d..759a4f6a33 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h
index 3773edbc5d..1245e97e5a 100644
--- a/ext/standard/php_fopen_wrappers.h
+++ b/ext/standard/php_fopen_wrappers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_ftok.h b/ext/standard/php_ftok.h
index 6168e6fd85..3eb1a54a42 100644
--- a/ext/standard/php_ftok.h
+++ b/ext/standard/php_ftok.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h
index 17b830d5f6..b31da01d47 100644
--- a/ext/standard/php_http.h
+++ b/ext/standard/php_http.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_image.h b/ext/standard/php_image.h
index 228167c37e..1b58b075eb 100644
--- a/ext/standard/php_image.h
+++ b/ext/standard/php_image.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h
index 3e688cadf0..ab5b3a3fd7 100644
--- a/ext/standard/php_incomplete_class.h
+++ b/ext/standard/php_incomplete_class.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_iptc.h b/ext/standard/php_iptc.h
index 6c35905566..15ad11070f 100644
--- a/ext/standard/php_iptc.h
+++ b/ext/standard/php_iptc.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_lcg.h b/ext/standard/php_lcg.h
index 76e32238e4..2c24756012 100644
--- a/ext/standard/php_lcg.h
+++ b/ext/standard/php_lcg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,8 +24,8 @@
#include "ext/standard/basic_functions.h"
typedef struct {
- php_int32 s1;
- php_int32 s2;
+ int32_t s1;
+ int32_t s2;
int seeded;
} php_lcg_globals;
diff --git a/ext/standard/php_link.h b/ext/standard/php_link.h
index fc9dad0177..dbfa4b0810 100644
--- a/ext/standard/php_link.h
+++ b/ext/standard/php_link.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h
index c6fe660047..514b189681 100644
--- a/ext/standard/php_mail.h
+++ b/ext/standard/php_mail.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h
index 7ceaf80b7c..406fd49dcd 100644
--- a/ext/standard/php_math.h
+++ b/ext/standard/php_math.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_metaphone.h b/ext/standard/php_metaphone.h
index bd642c8d90..76727c2776 100644
--- a/ext/standard/php_metaphone.h
+++ b/ext/standard/php_metaphone.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h
index 1f19f1e646..fdc72b0258 100644
--- a/ext/standard/php_password.h
+++ b/ext/standard/php_password.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h
index 921a605dbb..39ba00eb56 100644
--- a/ext/standard/php_rand.h
+++ b/ext/standard/php_rand.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -55,7 +55,7 @@
PHPAPI void php_srand(zend_long seed);
PHPAPI zend_long php_rand(void);
-PHPAPI void php_mt_srand(php_uint32 seed);
-PHPAPI php_uint32 php_mt_rand(void);
+PHPAPI void php_mt_srand(uint32_t seed);
+PHPAPI uint32_t php_mt_rand(void);
#endif /* PHP_RAND_H */
diff --git a/ext/standard/php_random.h b/ext/standard/php_random.h
index ecf9c7135b..c4034e7d8d 100644
--- a/ext/standard/php_random.h
+++ b/ext/standard/php_random.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,6 +31,11 @@ typedef struct {
int fd;
} php_random_globals;
+#define php_random_bytes_throw(b, s) php_random_bytes((b), (s), 1)
+#define php_random_bytes_silent(b, s) php_random_bytes((b), (s), 0)
+
+PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw);
+
#ifdef ZTS
# define RANDOM_G(v) ZEND_TSRMG(random_globals_id, php_random_globals *, v)
extern PHPAPI int random_globals_id;
diff --git a/ext/standard/php_smart_string.h b/ext/standard/php_smart_string.h
index 15bc974083..58c319a5a5 100644
--- a/ext/standard/php_smart_string.h
+++ b/ext/standard/php_smart_string.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -93,7 +93,7 @@
smart_string_append_unsigned_ex((dest), (val), 0)
#define smart_string_appendc_ex(dest, ch, what) do { \
- register size_t __nl; \
+ size_t __nl; \
smart_string_alloc4((dest), 1, (what), __nl); \
(dest)->len = __nl; \
((unsigned char *) (dest)->c)[(dest)->len - 1] = (ch); \
@@ -109,7 +109,7 @@
} while (0)
#define smart_string_appendl_ex(dest, src, nlen, what) do { \
- register size_t __nl; \
+ size_t __nl; \
smart_string *__dest = (smart_string *) (dest); \
\
smart_string_alloc4(__dest, (nlen), (what), __nl); \
diff --git a/ext/standard/php_smart_string_public.h b/ext/standard/php_smart_string_public.h
index 99d4c6017a..dabc359676 100644
--- a/ext/standard/php_smart_string_public.h
+++ b/ext/standard/php_smart_string_public.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h
index 418350738a..82d8c41d95 100644
--- a/ext/standard/php_standard.h
+++ b/ext/standard/php_standard.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h
index 8390bd79fe..51cf8c9962 100644
--- a/ext/standard/php_string.h
+++ b/ext/standard/php_string.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -161,7 +161,7 @@ PHPAPI char *php_strerror(int errnum);
# define php_mb_reset() memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)))
#else
# define php_mblen(ptr, len) mblen(ptr, len)
-# define php_mb_reset() mblen(NULL, 0)
+# define php_mb_reset() php_ignore_value(mblen(NULL, 0))
#endif
void register_string_constants(INIT_FUNC_ARGS);
diff --git a/ext/standard/php_type.h b/ext/standard/php_type.h
index 7f043aca6d..e9a3155572 100644
--- a/ext/standard/php_type.h
+++ b/ext/standard/php_type.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_uuencode.h b/ext/standard/php_uuencode.h
index 2816d1722b..be90dd262f 100644
--- a/ext/standard/php_uuencode.h
+++ b/ext/standard/php_uuencode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h
index cdf7661bcd..4afefbe95a 100644
--- a/ext/standard/php_var.h
+++ b/ext/standard/php_var.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -117,7 +117,7 @@ do { \
PHPAPI void var_replace(php_unserialize_data_t *var_hash, zval *ozval, zval *nzval);
PHPAPI void var_push_dtor(php_unserialize_data_t *var_hash, zval *val);
-PHPAPI void var_push_dtor_no_addref(php_unserialize_data_t *var_hashx, zval *rval);
+PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx);
PHPAPI void var_destroy(php_unserialize_data_t *var_hash);
#endif /* PHP_VAR_H */
diff --git a/ext/standard/php_versioning.h b/ext/standard/php_versioning.h
index 27f86e8380..cd8b015360 100644
--- a/ext/standard/php_versioning.h
+++ b/ext/standard/php_versioning.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index 447cbbcc6e..700d4e862c 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -101,7 +101,7 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
return env;
}
- target_hash = HASH_OF(environment);
+ target_hash = Z_ARRVAL_P(environment);
if (!target_hash) {
return env;
}
diff --git a/ext/standard/proc_open.h b/ext/standard/proc_open.h
index 52e5c1ed87..e6633a5f0c 100644
--- a/ext/standard/proc_open.h
+++ b/ext/standard/proc_open.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
index df0b5584f8..a55b1e5edc 100644
--- a/ext/standard/quot_print.c
+++ b/ext/standard/quot_print.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/quot_print.h b/ext/standard/quot_print.h
index d5428ee5be..30a45cd448 100644
--- a/ext/standard/quot_print.h
+++ b/ext/standard/quot_print.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index b80318c4b2..50729f2418 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -146,19 +146,19 @@ PHPAPI zend_long php_rand(void)
#define loBits(u) ((u) & 0x7FFFFFFFU) /* mask the highest bit of u */
#define mixBits(u, v) (hiBit(u)|loBits(v)) /* move hi bit of u to hi bit of v */
-#define twist(m,u,v) (m ^ (mixBits(u,v)>>1) ^ ((php_uint32)(-(php_int32)(loBit(u))) & 0x9908b0dfU))
+#define twist(m,u,v) (m ^ (mixBits(u,v)>>1) ^ ((uint32_t)(-(int32_t)(loBit(u))) & 0x9908b0dfU))
/* {{{ php_mt_initialize
*/
-static inline void php_mt_initialize(php_uint32 seed, php_uint32 *state)
+static inline void php_mt_initialize(uint32_t seed, uint32_t *state)
{
/* Initialize generator state with seed
See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier.
In previous versions, most significant bits (MSBs) of the seed affect
only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto. */
- register php_uint32 *s = state;
- register php_uint32 *r = state;
+ register uint32_t *s = state;
+ register uint32_t *r = state;
register int i = 1;
*s++ = seed & 0xffffffffU;
@@ -176,8 +176,8 @@ static inline void php_mt_reload(void)
/* Generate N new values in state
Made clearer and faster by Matthew Bellew (matthew.bellew@home.com) */
- register php_uint32 *state = BG(state);
- register php_uint32 *p = state;
+ register uint32_t *state = BG(state);
+ register uint32_t *p = state;
register int i;
for (i = N - M; i--; ++p)
@@ -192,7 +192,7 @@ static inline void php_mt_reload(void)
/* {{{ php_mt_srand
*/
-PHPAPI void php_mt_srand(php_uint32 seed)
+PHPAPI void php_mt_srand(uint32_t seed)
{
/* Seed the generator with a simple uint32 */
php_mt_initialize(seed, BG(state));
@@ -205,12 +205,12 @@ PHPAPI void php_mt_srand(php_uint32 seed)
/* {{{ php_mt_rand
*/
-PHPAPI php_uint32 php_mt_rand(void)
+PHPAPI uint32_t php_mt_rand(void)
{
/* Pull a 32-bit integer from the generator state
Every other access function simply transforms the numbers extracted here */
- register php_uint32 s1;
+ register uint32_t s1;
if (BG(left) == 0) {
php_mt_reload();
diff --git a/ext/standard/random.c b/ext/standard/random.c
index cc15012c20..c0e1abd2d2 100644
--- a/ext/standard/random.c
+++ b/ext/standard/random.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,11 +24,18 @@
#include <math.h>
#include "php.h"
+#include "zend_exceptions.h"
#include "php_random.h"
#if PHP_WIN32
# include "win32/winutil.h"
#endif
+#ifdef __linux__
+# include <sys/syscall.h>
+#endif
+#if defined(__OpenBSD__) || defined(__NetBSD__)
+# include <sys/param.h>
+#endif
#ifdef ZTS
int random_globals_id;
@@ -74,44 +81,102 @@ PHP_MSHUTDOWN_FUNCTION(random)
/* }}} */
/* {{{ */
-static int php_random_bytes(void *bytes, size_t size)
+
+PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
{
#if PHP_WIN32
/* Defer to CryptGenRandom on Windows */
if (php_win32_get_random_bytes(bytes, size) == FAILURE) {
- php_error_docref(NULL, E_WARNING, "Could not gather sufficient random data");
+ if (should_throw) {
+ zend_throw_exception(zend_ce_exception, "Could not gather sufficient random data", 0);
+ }
return FAILURE;
}
-#elif HAVE_DECL_ARC4RANDOM_BUF
+#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001))
arc4random_buf(bytes, size);
+#elif HAVE_DECL_GETRANDOM
+ /* Linux getrandom(2) syscall */
+ size_t read_bytes = 0;
+ size_t amount_to_read = 0;
+ ssize_t n;
+
+ /* Keep reading until we get enough entropy */
+ do {
+ /* Below, (bytes + read_bytes) is pointer arithmetic.
+
+ bytes read_bytes size
+ | | |
+ [#######=============] (we're going to write over the = region)
+ \\\\\\\\\\\\\
+ amount_to_read
+
+ */
+ amount_to_read = size - read_bytes;
+ n = syscall(SYS_getrandom, bytes + read_bytes, amount_to_read, 0);
+
+ if (n == -1) {
+ if (errno == EINTR || errno == EAGAIN) {
+ /* Try again */
+ continue;
+ }
+ /*
+ If the syscall fails, we are doomed. The loop that calls
+ php_random_bytes should be terminated by the exception instead
+ of proceeding to demand more entropy.
+ */
+ if (should_throw) {
+ zend_throw_exception(zend_ce_exception, "Could not gather sufficient random data", errno);
+ }
+ return FAILURE;
+ }
+
+ read_bytes += (size_t) n;
+ } while (read_bytes < size);
#else
int fd = RANDOM_G(fd);
+ struct stat st;
size_t read_bytes = 0;
+ ssize_t n;
if (fd < 0) {
-#if HAVE_DEV_ARANDOM
- fd = open("/dev/arandom", O_RDONLY);
-#elif HAVE_DEV_URANDOM
+#if HAVE_DEV_URANDOM
fd = open("/dev/urandom", O_RDONLY);
#endif
if (fd < 0) {
- php_error_docref(NULL, E_WARNING, "Cannot open source device");
+ if (should_throw) {
+ zend_throw_exception(zend_ce_exception, "Cannot open source device", 0);
+ }
+ return FAILURE;
+ }
+ /* Does the file exist and is it a character device? */
+ if (fstat(fd, &st) != 0 ||
+# ifdef S_ISNAM
+ !(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode))
+# else
+ !S_ISCHR(st.st_mode)
+# endif
+ ) {
+ close(fd);
+ if (should_throw) {
+ zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
+ }
return FAILURE;
}
-
RANDOM_G(fd) = fd;
}
while (read_bytes < size) {
- ssize_t n = read(fd, bytes + read_bytes, size - read_bytes);
- if (n < 0) {
+ n = read(fd, bytes + read_bytes, size - read_bytes);
+ if (n <= 0) {
break;
}
read_bytes += n;
}
if (read_bytes < size) {
- php_error_docref(NULL, E_WARNING, "Could not gather sufficient random data");
+ if (should_throw) {
+ zend_throw_exception(zend_ce_exception, "Could not gather sufficient random data", 0);
+ }
return FAILURE;
}
#endif
@@ -127,20 +192,20 @@ PHP_FUNCTION(random_bytes)
zend_long size;
zend_string *bytes;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &size) == FAILURE) {
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "l", &size) == FAILURE) {
return;
}
if (size < 1) {
- php_error_docref(NULL, E_WARNING, "Length must be greater than 0");
- RETURN_FALSE;
+ zend_throw_exception(zend_ce_error, "Length must be greater than 0", 0);
+ return;
}
bytes = zend_string_alloc(size, 0);
- if (php_random_bytes(ZSTR_VAL(bytes), size) == FAILURE) {
+ if (php_random_bytes_throw(ZSTR_VAL(bytes), size) == FAILURE) {
zend_string_release(bytes);
- RETURN_FALSE;
+ return;
}
ZSTR_VAL(bytes)[size] = '\0';
@@ -158,19 +223,23 @@ PHP_FUNCTION(random_int)
zend_ulong umax;
zend_ulong result;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &min, &max) == FAILURE) {
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "ll", &min, &max) == FAILURE) {
return;
}
- if (min >= max) {
- php_error_docref(NULL, E_WARNING, "Minimum value must be less than the maximum value");
- RETURN_FALSE;
+ if (min > max) {
+ zend_throw_exception(zend_ce_error, "Minimum value must be less than or equal to the maximum value", 0);
+ return;
+ }
+
+ if (min == max) {
+ RETURN_LONG(min);
}
umax = max - min;
- if (php_random_bytes(&result, sizeof(result)) == FAILURE) {
- RETURN_FALSE;
+ if (php_random_bytes_throw(&result, sizeof(result)) == FAILURE) {
+ return;
}
/* Special case where no modulus is required */
@@ -185,11 +254,11 @@ PHP_FUNCTION(random_int)
if ((umax & (umax - 1)) != 0) {
/* Ceiling under which ZEND_LONG_MAX % max == 0 */
zend_ulong limit = ZEND_ULONG_MAX - (ZEND_ULONG_MAX % umax) - 1;
-
+
/* Discard numbers over the limit to avoid modulo bias */
while (result > limit) {
- if (php_random_bytes(&result, sizeof(result)) == FAILURE) {
- RETURN_FALSE;
+ if (php_random_bytes_throw(&result, sizeof(result)) == FAILURE) {
+ return;
}
}
}
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 2bbf34a7bf..703a125bb4 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/scanf.h b/ext/standard/scanf.h
index 036f5098db..326c3feccc 100644
--- a/ext/standard/scanf.h
+++ b/ext/standard/scanf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c
index db64d5dbc5..c4bed51abc 100644
--- a/ext/standard/sha1.c
+++ b/ext/standard/sha1.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -103,9 +103,9 @@ PHP_FUNCTION(sha1_file)
/* }}} */
-static void SHA1Transform(php_uint32[5], const unsigned char[64]);
-static void SHA1Encode(unsigned char *, php_uint32 *, unsigned int);
-static void SHA1Decode(php_uint32 *, const unsigned char *, unsigned int);
+static void SHA1Transform(uint32_t[5], const unsigned char[64]);
+static void SHA1Encode(unsigned char *, uint32_t *, unsigned int);
+static void SHA1Decode(uint32_t *, const unsigned char *, unsigned int);
static unsigned char PADDING[64] =
{
@@ -133,22 +133,22 @@ static unsigned char PADDING[64] =
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
*/
#define FF(a, b, c, d, e, w) { \
- (e) += F ((b), (c), (d)) + (w) + (php_uint32)(0x5A827999); \
+ (e) += F ((b), (c), (d)) + (w) + (uint32_t)(0x5A827999); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
#define GG(a, b, c, d, e, w) { \
- (e) += G ((b), (c), (d)) + (w) + (php_uint32)(0x6ED9EBA1); \
+ (e) += G ((b), (c), (d)) + (w) + (uint32_t)(0x6ED9EBA1); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
#define HH(a, b, c, d, e, w) { \
- (e) += H ((b), (c), (d)) + (w) + (php_uint32)(0x8F1BBCDC); \
+ (e) += H ((b), (c), (d)) + (w) + (uint32_t)(0x8F1BBCDC); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
#define II(a, b, c, d, e, w) { \
- (e) += I ((b), (c), (d)) + (w) + (php_uint32)(0xCA62C1D6); \
+ (e) += I ((b), (c), (d)) + (w) + (uint32_t)(0xCA62C1D6); \
(e) += ROTATE_LEFT ((a), 5); \
(b) = ROTATE_LEFT((b), 30); \
}
@@ -184,10 +184,10 @@ PHPAPI void PHP_SHA1Update(PHP_SHA1_CTX * context, const unsigned char *input,
index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((php_uint32) inputLen << 3))
- < ((php_uint32) inputLen << 3))
+ if ((context->count[0] += ((uint32_t) inputLen << 3))
+ < ((uint32_t) inputLen << 3))
context->count[1]++;
- context->count[1] += ((php_uint32) inputLen >> 29);
+ context->count[1] += ((uint32_t) inputLen >> 29);
partLen = 64 - index;
@@ -253,11 +253,11 @@ PHPAPI void PHP_SHA1Final(unsigned char digest[20], PHP_SHA1_CTX * context)
* SHA1 basic transformation. Transforms state based on block.
*/
static void SHA1Transform(state, block)
-php_uint32 state[5];
+uint32_t state[5];
const unsigned char block[64];
{
- php_uint32 a = state[0], b = state[1], c = state[2];
- php_uint32 d = state[3], e = state[4], x[16], tmp;
+ uint32_t a = state[0], b = state[1], c = state[2];
+ uint32_t d = state[3], e = state[4], x[16], tmp;
SHA1Decode(x, block, 64);
@@ -361,12 +361,12 @@ const unsigned char block[64];
/* }}} */
/* {{{ SHA1Encode
- Encodes input (php_uint32) into output (unsigned char). Assumes len is
+ Encodes input (uint32_t) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static void SHA1Encode(output, input, len)
unsigned char *output;
-php_uint32 *input;
+uint32_t *input;
unsigned int len;
{
unsigned int i, j;
@@ -381,19 +381,19 @@ unsigned int len;
/* }}} */
/* {{{ SHA1Decode
- Decodes input (unsigned char) into output (php_uint32). Assumes len is
+ Decodes input (unsigned char) into output (uint32_t). Assumes len is
a multiple of 4.
*/
static void SHA1Decode(output, input, len)
-php_uint32 *output;
+uint32_t *output;
const unsigned char *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((php_uint32) input[j + 3]) | (((php_uint32) input[j + 2]) << 8) |
- (((php_uint32) input[j + 1]) << 16) | (((php_uint32) input[j]) << 24);
+ output[i] = ((uint32_t) input[j + 3]) | (((uint32_t) input[j + 2]) << 8) |
+ (((uint32_t) input[j + 1]) << 16) | (((uint32_t) input[j]) << 24);
}
/* }}} */
diff --git a/ext/standard/sha1.h b/ext/standard/sha1.h
index c09ebca501..de338fad38 100644
--- a/ext/standard/sha1.h
+++ b/ext/standard/sha1.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,8 +25,8 @@
/* SHA1 context. */
typedef struct {
- php_uint32 state[5]; /* state (ABCD) */
- php_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ uint32_t state[5]; /* state (ABCD) */
+ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} PHP_SHA1_CTX;
diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c
index 3039c17330..9512e81475 100644
--- a/ext/standard/soundex.c
+++ b/ext/standard/soundex.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index a61dbffdc5..0e5d0ce79e 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -247,9 +247,18 @@ PHP_FUNCTION(stream_socket_accept)
zval *zstream;
zend_string *errstr = NULL;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|dz/", &zstream, &timeout, &zpeername) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 3)
+ Z_PARAM_RESOURCE(zstream)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_DOUBLE(timeout)
+ Z_PARAM_ZVAL_EX(zpeername, 0, 1)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
php_stream_from_zval(stream, zstream);
@@ -297,9 +306,16 @@ PHP_FUNCTION(stream_socket_get_name)
zend_bool want_peer;
zend_string *name = NULL;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &zstream, &want_peer) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_RESOURCE(zstream)
+ Z_PARAM_BOOL(want_peer)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
php_stream_from_zval(stream, zstream);
@@ -474,16 +490,29 @@ PHP_FUNCTION(stream_copy_to_stream)
Retrieves header/meta data from streams/file pointers */
PHP_FUNCTION(stream_get_meta_data)
{
- zval *arg1;
+ zval *zstream;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg1) == FAILURE) {
+#ifndef FAST_ZPP
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
return;
}
- php_stream_from_zval(stream, arg1);
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(zstream)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
+
+ php_stream_from_zval(stream, zstream);
array_init(return_value);
+ if (!php_stream_populate_meta_data(stream, return_value)) {
+ add_assoc_bool(return_value, "timed_out", 0);
+ add_assoc_bool(return_value, "blocked", 1);
+ add_assoc_bool(return_value, "eof", php_stream_eof(stream));
+ }
+
if (!Z_ISUNDEF(stream->wrapperdata)) {
Z_ADDREF_P(&stream->wrapperdata);
add_assoc_zval(return_value, "wrapper_data", &stream->wrapperdata);
@@ -517,12 +546,6 @@ PHP_FUNCTION(stream_get_meta_data)
add_assoc_string(return_value, "uri", stream->orig_path);
}
- if (!php_stream_populate_meta_data(stream, return_value)) {
- add_assoc_bool(return_value, "timed_out", 0);
- add_assoc_bool(return_value, "blocked", 1);
- add_assoc_bool(return_value, "eof", php_stream_eof(stream));
- }
-
}
/* }}} */
@@ -590,6 +613,7 @@ static int stream_array_to_fd_set(zval *stream_array, fd_set *fds, php_socket_t
the higher bits of a SOCKET variable uninitialized on systems with little endian. */
php_socket_t this_fd;
+ ZVAL_DEREF(elem);
php_stream_from_zval_no_verify(stream, elem);
if (stream == NULL) {
continue;
@@ -629,6 +653,7 @@ static int stream_array_from_fd_set(zval *stream_array, fd_set *fds)
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(stream_array), num_ind, key, elem) {
php_socket_t this_fd;
+ ZVAL_DEREF(elem);
php_stream_from_zval_no_verify(stream, elem);
if (stream == NULL) {
continue;
@@ -675,6 +700,7 @@ static int stream_array_emulate_read_fd_set(zval *stream_array)
zend_hash_init(Z_ARRVAL(new_array), zend_hash_num_elements(Z_ARRVAL_P(stream_array)), NULL, ZVAL_PTR_DTOR, 0);
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(stream_array), elem) {
+ ZVAL_DEREF(elem);
php_stream_from_zval_no_verify(stream, elem);
if (stream == NULL) {
continue;
@@ -711,17 +737,29 @@ static int stream_array_emulate_read_fd_set(zval *stream_array)
Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec */
PHP_FUNCTION(stream_select)
{
- zval *r_array, *w_array, *e_array, *sec = NULL;
- struct timeval tv;
- struct timeval *tv_p = NULL;
- fd_set rfds, wfds, efds;
- php_socket_t max_fd = 0;
- int retval, sets = 0;
- zend_long usec = 0;
- int set_count, max_set_count = 0;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/!a/!a/!z!|l", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE)
+ zval *r_array, *w_array, *e_array;
+ struct timeval tv, *tv_p = NULL;
+ fd_set rfds, wfds, efds;
+ php_socket_t max_fd = 0;
+ int retval, sets = 0;
+ zend_long sec, usec = 0;
+ zend_bool secnull;
+ int set_count, max_set_count = 0;
+
+#ifndef FAST_ZPP
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "a/!a/!a/!l!|l", &r_array, &w_array, &e_array, &sec, &secnull, &usec) == FAILURE) {
return;
+ }
+#else
+ ZEND_PARSE_PARAMETERS_START(4, 5)
+ Z_PARAM_ARRAY_EX(r_array, 1, 1)
+ Z_PARAM_ARRAY_EX(w_array, 1, 1)
+ Z_PARAM_ARRAY_EX(e_array, 1, 1)
+ Z_PARAM_LONG_EX(sec, secnull, 1, 0)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_LONG(usec)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
FD_ZERO(&rfds);
FD_ZERO(&wfds);
@@ -756,10 +794,8 @@ PHP_FUNCTION(stream_select)
PHP_SAFE_MAX_FD(max_fd, max_set_count);
/* If seconds is not set to null, build the timeval, else we wait indefinitely */
- if (sec != NULL) {
- convert_to_long_ex(sec);
-
- if (Z_LVAL_P(sec) < 0) {
+ if (!secnull) {
+ if (sec < 0) {
php_error_docref(NULL, E_WARNING, "The seconds parameter must be greater than 0");
RETURN_FALSE;
} else if (usec < 0) {
@@ -767,19 +803,9 @@ PHP_FUNCTION(stream_select)
RETURN_FALSE;
}
-#ifdef PHP_WIN32
- tv.tv_sec = (long)(Z_LVAL_P(sec) + (usec / 1000000));
+ /* Windows, Solaris and BSD do not like microsecond values which are >= 1 sec */
+ tv.tv_sec = (long)(sec + (usec / 1000000));
tv.tv_usec = (long)(usec % 1000000);
-#else
- /* Solaris + BSD do not like microsecond values which are >= 1 sec */
- if (usec > 999999) {
- tv.tv_sec = Z_LVAL_P(sec) + (usec / 1000000);
- tv.tv_usec = usec % 1000000;
- } else {
- tv.tv_sec = Z_LVAL_P(sec);
- tv.tv_usec = usec;
- }
-#endif
tv_p = &tv;
}
@@ -787,7 +813,6 @@ PHP_FUNCTION(stream_select)
* read buffer of any of the streams in the read array, let's pretend
* that we selected, but return only the readable sockets */
if (r_array != NULL) {
-
retval = stream_array_emulate_read_fd_set(r_array);
if (retval > 0) {
if (w_array != NULL) {
@@ -860,14 +885,13 @@ static int parse_context_options(php_stream_context *context, zval *options)
int ret = SUCCESS;
ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(options), wkey, wval) {
+ ZVAL_DEREF(wval);
if (wkey && Z_TYPE_P(wval) == IS_ARRAY) {
-
- ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(wval), okey, oval) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(wval), okey, oval) {
if (okey) {
php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval);
}
} ZEND_HASH_FOREACH_END();
-
} else {
php_error_docref(NULL, E_WARNING, "options should have the form [\"wrappername\"][\"optionname\"] = $value");
}
@@ -941,9 +965,16 @@ PHP_FUNCTION(stream_context_get_options)
zval *zcontext;
php_stream_context *context;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zcontext) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(zcontext)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
+
context = decode_context_param(zcontext);
if (!context) {
php_error_docref(NULL, E_WARNING, "Invalid stream/context parameter");
@@ -958,34 +989,55 @@ PHP_FUNCTION(stream_context_get_options)
Set an option for a wrapper */
PHP_FUNCTION(stream_context_set_option)
{
- zval *options = NULL, *zcontext = NULL, *zvalue = NULL;
+ zval *zcontext = NULL;
php_stream_context *context;
- char *wrappername, *optionname;
- size_t wrapperlen, optionlen;
-
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
- "rssz", &zcontext, &wrappername, &wrapperlen,
- &optionname, &optionlen, &zvalue) == FAILURE) {
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
- "ra", &zcontext, &options) == FAILURE) {
- php_error_docref(NULL, E_WARNING, "called with wrong number or type of parameters; please RTM");
+
+ if (ZEND_NUM_ARGS() == 2) {
+ zval *options;
+
+#ifndef FAST_ZPP
+ if (zend_parse_parameters(, ZEND_NUM_ARGS(), "ra", &zcontext, &options) == FAILURE) {
RETURN_FALSE;
}
- }
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_RESOURCE(zcontext)
+ Z_PARAM_ARRAY(options)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
- /* figure out where the context is coming from exactly */
- context = decode_context_param(zcontext);
- if (!context) {
- php_error_docref(NULL, E_WARNING, "Invalid stream/context parameter");
- RETURN_FALSE;
- }
+ /* figure out where the context is coming from exactly */
+ if (!(context = decode_context_param(zcontext))) {
+ php_error_docref(NULL, E_WARNING, "Invalid stream/context parameter");
+ RETURN_FALSE;
+ }
- if (options) {
- /* handle the array syntax */
- RETVAL_BOOL(parse_context_options(context, options) == SUCCESS);
+ RETURN_BOOL(parse_context_options(context, options) == SUCCESS);
} else {
- php_stream_context_set_option(context, wrappername, optionname, zvalue);
- RETVAL_TRUE;
+ zval *zvalue;
+ char *wrappername, *optionname;
+ size_t wrapperlen, optionlen;
+
+#ifndef FAST_ZPP
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rssz", &zcontext, &wrappername, &wrapperlen, &optionname, &optionlen, &zvalue) == FAILURE) {
+ RETURN_FALSE;
+ }
+#else
+ ZEND_PARSE_PARAMETERS_START(4, 4)
+ Z_PARAM_RESOURCE(zcontext)
+ Z_PARAM_STRING(wrappername, wrapperlen)
+ Z_PARAM_STRING(optionname, optionlen)
+ Z_PARAM_ZVAL(zvalue)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
+
+ /* figure out where the context is coming from exactly */
+ if (!(context = decode_context_param(zcontext))) {
+ php_error_docref(NULL, E_WARNING, "Invalid stream/context parameter");
+ RETURN_FALSE;
+ }
+
+ RETURN_BOOL(php_stream_context_set_option(context, wrappername, optionname, zvalue) == SUCCESS);
}
}
/* }}} */
@@ -997,9 +1049,16 @@ PHP_FUNCTION(stream_context_set_params)
zval *params, *zcontext;
php_stream_context *context;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &zcontext, &params) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_RESOURCE(zcontext)
+ Z_PARAM_ARRAY(params)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
context = decode_context_param(zcontext);
if (!context) {
@@ -1018,9 +1077,15 @@ PHP_FUNCTION(stream_context_get_params)
zval *zcontext;
php_stream_context *context;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zcontext) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_RESOURCE(zcontext)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
context = decode_context_param(zcontext);
if (!context) {
@@ -1268,21 +1333,28 @@ PHP_FUNCTION(stream_get_line)
/* }}} */
-/* {{{ proto bool stream_set_blocking(resource socket, int mode)
+/* {{{ proto bool stream_set_blocking(resource socket, bool mode)
Set blocking/non-blocking mode on a socket or stream */
PHP_FUNCTION(stream_set_blocking)
{
- zval *arg1;
- zend_long block;
+ zval *zstream;
+ zend_bool block;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &arg1, &block) == FAILURE) {
+#ifndef FAST_ZPP
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb", &zstream, &block) == FAILURE) {
return;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_RESOURCE(zstream)
+ Z_PARAM_BOOL(block)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
- php_stream_from_zval(stream, arg1);
+ php_stream_from_zval(stream, zstream);
- if (php_stream_set_option(stream, PHP_STREAM_OPTION_BLOCKING, block ? 1 : 0, NULL) == -1) {
+ if (php_stream_set_option(stream, PHP_STREAM_OPTION_BLOCKING, block, NULL) == -1) {
RETURN_FALSE;
}
@@ -1439,9 +1511,19 @@ PHP_FUNCTION(stream_socket_enable_crypto)
zend_bool enable, cryptokindnull;
int ret;
+#ifdef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rb|l!r", &zstream, &enable, &cryptokind, &cryptokindnull, &zsessstream) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 4)
+ Z_PARAM_RESOURCE(zstream)
+ Z_PARAM_BOOL(enable)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_LONG_EX(cryptokind, cryptokindnull, 1, 0)
+ Z_PARAM_RESOURCE(zsessstream)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
php_stream_from_zval(stream, zstream);
@@ -1566,13 +1648,21 @@ PHP_FUNCTION(stream_socket_shutdown)
zval *zstream;
php_stream *stream;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zstream, &how) == FAILURE) {
RETURN_FALSE;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(2, 2)
+ Z_PARAM_RESOURCE(zstream)
+ Z_PARAM_LONG(how)
+ ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
+#endif
if (how != STREAM_SHUT_RD &&
how != STREAM_SHUT_WR &&
how != STREAM_SHUT_RDWR) {
+ php_error_docref(NULL, E_WARNING, "Second parameter $how needs to be one of STREAM_SHUT_RD, STREAM_SHUT_WR or STREAM_SHUT_RDWR");
RETURN_FALSE;
}
diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h
index 37c6594dd2..45f51c2954 100644
--- a/ext/standard/streamsfuncs.h
+++ b/ext/standard/streamsfuncs.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 3832b31b46..1305e7f920 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -117,8 +117,16 @@ void register_string_constants(INIT_FUNC_ARGS)
int php_tag_find(char *tag, size_t len, const char *set);
+#ifdef PHP_WIN32
+# define SET_ALIGNED(alignment, decl) __declspec(align(alignment)) decl
+#elif HAVE_ATTRIBUTE_ALIGNED
+# define SET_ALIGNED(alignment, decl) decl __attribute__ ((__aligned__ (alignment)))
+#else
+# define SET_ALIGNED(alignment, decl) decl
+#endif
+
/* this is read-only, so it's ok */
-static char hexconvtab[] = "0123456789abcdef";
+SET_ALIGNED(16, static char hexconvtab[]) = "0123456789abcdef";
/* localeconv mutex */
#ifdef ZTS
@@ -155,25 +163,22 @@ static zend_string *php_hex2bin(const unsigned char *old, const size_t oldlen)
for (i = j = 0; i < target_length; i++) {
unsigned char c = old[j++];
+ unsigned char l = c & ~0x20;
+ int is_letter = ((unsigned int) ((l - 'A') ^ (l - 'F' - 1))) >> (8 * sizeof(unsigned int) - 1);
unsigned char d;
- if (c >= '0' && c <= '9') {
- d = (c - '0') << 4;
- } else if (c >= 'a' && c <= 'f') {
- d = (c - 'a' + 10) << 4;
- } else if (c >= 'A' && c <= 'F') {
- d = (c - 'A' + 10) << 4;
+ /* basically (c >= '0' && c <= '9') || (l >= 'A' && l <= 'F') */
+ if (EXPECTED((((c ^ '0') - 10) >> (8 * sizeof(unsigned int) - 1)) | is_letter)) {
+ d = (l - 0x10 - 0x27 * is_letter) << 4;
} else {
zend_string_free(str);
return NULL;
}
c = old[j++];
- if (c >= '0' && c <= '9') {
- d |= c - '0';
- } else if (c >= 'a' && c <= 'f') {
- d |= c - 'a' + 10;
- } else if (c >= 'A' && c <= 'F') {
- d |= c - 'A' + 10;
+ l = c & ~0x20;
+ is_letter = ((unsigned int) ((l - 'A') ^ (l - 'F' - 1))) >> (8 * sizeof(unsigned int) - 1);
+ if (EXPECTED((((c ^ '0') - 10) >> (8 * sizeof(unsigned int) - 1)) | is_letter)) {
+ d |= l - 0x10 - 0x27 * is_letter;
} else {
zend_string_free(str);
return NULL;
@@ -993,12 +998,12 @@ PHP_FUNCTION(wordwrap)
/* Multiple character line break or forced cut */
if (linelength > 0) {
chk = (size_t)(ZSTR_LEN(text)/linelength + 1);
- newtext = zend_string_alloc(chk * breakchar_len + ZSTR_LEN(text), 0);
+ newtext = zend_string_safe_alloc(chk, breakchar_len, ZSTR_LEN(text), 0);
alloced = ZSTR_LEN(text) + chk * breakchar_len + 1;
} else {
chk = ZSTR_LEN(text);
alloced = ZSTR_LEN(text) * (breakchar_len + 1) + 1;
- newtext = zend_string_alloc(ZSTR_LEN(text) * (breakchar_len + 1), 0);
+ newtext = zend_string_safe_alloc(ZSTR_LEN(text), breakchar_len + 1, 0, 0);
}
/* now keep track of the actual new text length */
@@ -1224,24 +1229,24 @@ PHPAPI void php_implode(const zend_string *delim, zval *arr, zval *return_value)
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(arr), tmp) {
if (Z_TYPE_P(tmp) == IS_LONG) {
- double val = Z_LVAL_P(tmp);
+ zend_long val = Z_LVAL_P(tmp);
+
*++strptr = NULL;
((zend_long *) (strings + numelems))[strptr - strings] = Z_LVAL_P(tmp);
- if (val < 0) {
- val = -10 * val;
+ if (val <= 0) {
+ len++;
}
- if (val < 10) {
+ while (val) {
+ val /= 10;
len++;
- } else {
- len += (int) log10(10 * (double) val);
}
} else {
*++strptr = zval_get_string(tmp);
len += ZSTR_LEN(*strptr);
}
} ZEND_HASH_FOREACH_END();
-
- str = zend_string_alloc(len + (numelems - 1) * ZSTR_LEN(delim), 0);
+ /* numelems can not be 0, we checked above */
+ str = zend_string_safe_alloc(numelems - 1, ZSTR_LEN(delim), len, 0);
cptr = ZSTR_VAL(str) + ZSTR_LEN(str);
*cptr = 0;
@@ -1434,7 +1439,7 @@ PHPAPI zend_string *php_string_toupper(zend_string *s)
e = c + ZSTR_LEN(s);
while (c < e) {
- if (!isupper(*c)) {
+ if (islower(*c)) {
register unsigned char *r;
zend_string *res = zend_string_alloc(ZSTR_LEN(s), 0);
@@ -1503,7 +1508,7 @@ PHPAPI zend_string *php_string_tolower(zend_string *s)
e = c + ZSTR_LEN(s);
while (c < e) {
- if (!islower(*c)) {
+ if (isupper(*c)) {
register unsigned char *r;
zend_string *res = zend_string_alloc(ZSTR_LEN(s), 0);
@@ -1648,20 +1653,34 @@ PHPAPI size_t php_dirname(char *path, size_t len)
}
/* }}} */
-/* {{{ proto string dirname(string path)
+/* {{{ proto string dirname(string path[, int levels])
Returns the directory name component of the path */
PHP_FUNCTION(dirname)
{
char *str;
- zend_string *ret;
size_t str_len;
+ zend_string *ret;
+ zend_long levels = 1;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &str, &str_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &str, &str_len, &levels) == FAILURE) {
return;
}
ret = zend_string_init(str, str_len, 0);
- ZSTR_LEN(ret) = zend_dirname(ZSTR_VAL(ret), str_len);
+
+ if (levels == 1) {
+ /* Defaut case */
+ ZSTR_LEN(ret) = zend_dirname(ZSTR_VAL(ret), str_len);
+ } else if (levels < 1) {
+ php_error_docref(NULL, E_WARNING, "Invalid argument, levels must be >= 1");
+ zend_string_free(ret);
+ return;
+ } else {
+ /* Some levels up */
+ do {
+ ZSTR_LEN(ret) = zend_dirname(ZSTR_VAL(ret), str_len = ZSTR_LEN(ret));
+ } while (ZSTR_LEN(ret) < str_len && --levels);
+ }
RETURN_NEW_STR(ret);
}
@@ -1949,6 +1968,9 @@ PHP_FUNCTION(strpos)
ZEND_PARSE_PARAMETERS_END();
#endif
+ if (offset < 0) {
+ offset += (zend_long)ZSTR_LEN(haystack);
+ }
if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
@@ -1999,6 +2021,9 @@ PHP_FUNCTION(stripos)
return;
}
+ if (offset < 0) {
+ offset += (zend_long)ZSTR_LEN(haystack);
+ }
if (offset < 0 || (size_t)offset > ZSTR_LEN(haystack)) {
php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
@@ -2325,7 +2350,7 @@ PHP_FUNCTION(chunk_split)
if ((size_t)chunklen > ZSTR_LEN(str)) {
/* to maintain BC, we must return original string + ending */
- result = zend_string_alloc(endlen + ZSTR_LEN(str), 0);
+ result = zend_string_safe_alloc(ZSTR_LEN(str), 1, endlen, 0);
memcpy(ZSTR_VAL(result), ZSTR_VAL(str), ZSTR_LEN(str));
memcpy(ZSTR_VAL(result) + ZSTR_LEN(str), end, endlen);
ZSTR_VAL(result)[ZSTR_LEN(result)] = '\0';
@@ -2407,10 +2432,6 @@ PHP_FUNCTION(substr)
}
}
- if (f > (zend_long)ZSTR_LEN(str)) {
- RETURN_FALSE;
- }
-
if ((f + l) > (zend_long)ZSTR_LEN(str)) {
l = ZSTR_LEN(str) - f;
}
@@ -2450,6 +2471,7 @@ PHP_FUNCTION(substr_replace)
if (argc > 3) {
if (Z_TYPE_P(len) != IS_ARRAY) {
+ convert_to_long_ex(len);
l = zval_get_long(len);
}
} else {
@@ -2463,12 +2485,12 @@ PHP_FUNCTION(substr_replace)
(argc == 3 && Z_TYPE_P(from) == IS_ARRAY) ||
(argc == 4 && Z_TYPE_P(from) != Z_TYPE_P(len))
) {
- php_error_docref(NULL, E_WARNING, "'from' and 'len' should be of same type - numerical or array ");
+ php_error_docref(NULL, E_WARNING, "'start' and 'length' should be of same type - numerical or array ");
RETURN_STR_COPY(Z_STR_P(str));
}
if (argc == 4 && Z_TYPE_P(from) == IS_ARRAY) {
if (zend_hash_num_elements(Z_ARRVAL_P(from)) != zend_hash_num_elements(Z_ARRVAL_P(len))) {
- php_error_docref(NULL, E_WARNING, "'from' and 'len' should have the same number of elements");
+ php_error_docref(NULL, E_WARNING, "'start' and 'length' should have the same number of elements");
RETURN_STR_COPY(Z_STR_P(str));
}
}
@@ -2476,8 +2498,8 @@ PHP_FUNCTION(substr_replace)
if (Z_TYPE_P(str) != IS_ARRAY) {
if (Z_TYPE_P(from) != IS_ARRAY) {
- size_t repl_len = 0;
-
+ zend_string *repl_str;
+ zend_bool repl_release = 0;
f = Z_LVAL_P(from);
/* if "from" position is negative, count start position from the end
@@ -2518,24 +2540,29 @@ PHP_FUNCTION(substr_replace)
repl_idx++;
}
if (repl_idx < Z_ARRVAL_P(repl)->nNumUsed) {
- convert_to_string_ex(tmp_repl);
- repl_len = Z_STRLEN_P(tmp_repl);
+ repl_str = zval_get_string(tmp_repl);
+ repl_release = 1;
+ } else {
+ repl_str = STR_EMPTY_ALLOC();
}
} else {
- repl_len = Z_STRLEN_P(repl);
+ repl_str = Z_STR_P(repl);
}
- result = zend_string_alloc(Z_STRLEN_P(str) - l + repl_len, 0);
+ result = zend_string_alloc(Z_STRLEN_P(str) - l + ZSTR_LEN(repl_str), 0);
memcpy(ZSTR_VAL(result), Z_STRVAL_P(str), f);
- if (repl_len) {
- memcpy((ZSTR_VAL(result) + f), (Z_TYPE_P(repl) == IS_ARRAY ? Z_STRVAL_P(tmp_repl) : Z_STRVAL_P(repl)), repl_len);
+ if (ZSTR_LEN(repl_str)) {
+ memcpy((ZSTR_VAL(result) + f), ZSTR_VAL(repl_str), ZSTR_LEN(repl_str));
}
- memcpy((ZSTR_VAL(result) + f + repl_len), Z_STRVAL_P(str) + f + l, Z_STRLEN_P(str) - f - l);
+ memcpy((ZSTR_VAL(result) + f + ZSTR_LEN(repl_str)), Z_STRVAL_P(str) + f + l, Z_STRLEN_P(str) - f - l);
ZSTR_VAL(result)[ZSTR_LEN(result)] = '\0';
+ if (repl_release) {
+ zend_string_release(repl_str);
+ }
RETURN_NEW_STR(result);
} else {
- php_error_docref(NULL, E_WARNING, "Functionality of 'from' and 'len' as arrays is not implemented");
+ php_error_docref(NULL, E_WARNING, "Functionality of 'start' and 'length' as arrays is not implemented");
RETURN_STR_COPY(Z_STR_P(str));
}
} else { /* str is array of strings */
@@ -2690,7 +2717,7 @@ PHP_FUNCTION(quotemeta)
RETURN_FALSE;
}
- str = zend_string_alloc(2 * ZSTR_LEN(old), 0);
+ str = zend_string_safe_alloc(2, ZSTR_LEN(old), 0, 0);
for (p = ZSTR_VAL(old), q = ZSTR_VAL(str); p != old_end; p++) {
c = *p;
@@ -2720,7 +2747,8 @@ PHP_FUNCTION(quotemeta)
/* }}} */
/* {{{ proto int ord(string character)
- Returns ASCII value of character */
+ Returns ASCII value of character
+ Warning: This function is special-cased by zend_compile.c and so is bypassed for constant string argument */
PHP_FUNCTION(ord)
{
char *str;
@@ -2741,7 +2769,8 @@ PHP_FUNCTION(ord)
/* }}} */
/* {{{ proto string chr(int ascii)
- Converts ASCII code to a character */
+ Converts ASCII code to a character
+ Warning: This function is special-cased by zend_compile.c and so is bypassed for constant integer argument */
PHP_FUNCTION(chr)
{
zend_long c;
@@ -2835,7 +2864,7 @@ PHP_FUNCTION(lcfirst)
}
/* }}} */
-/* {{{ proto string ucwords(string str)
+/* {{{ proto string ucwords(string str [, string delims])
Uppercase the first character of every word in a string */
PHP_FUNCTION(ucwords)
{
@@ -2966,15 +2995,6 @@ static zend_string *php_strtr_ex(zend_string *str, char *str_from, char *str_to,
}
/* }}} */
-static int php_strtr_key_compare(const void *a, const void *b) /* {{{ */
-{
- Bucket *f = (Bucket *) a;
- Bucket *s = (Bucket *) b;
-
- return f->h > s->h ? -1 : 1;
-}
-/* }}} */
-
/* {{{ php_strtr_array */
static void php_strtr_array(zval *return_value, zend_string *input, HashTable *pats)
{
@@ -2994,7 +3014,7 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p
zend_ulong *num_bitset;
/* we will collect all possible key lengths */
- num_bitset = ecalloc((slen + (sizeof(zend_ulong)-1)) / sizeof(zend_ulong), sizeof(zend_ulong));
+ num_bitset = ecalloc((slen + sizeof(zend_ulong)) / sizeof(zend_ulong), sizeof(zend_ulong));
memset(bitset, 0, sizeof(bitset));
/* check if original array has numeric keys */
@@ -3220,7 +3240,11 @@ static zend_string *php_str_to_str_ex(zend_string *haystack,
/* Needle doesn't occur, shortcircuit the actual replacement. */
goto nothing_todo;
}
- new_str = zend_string_alloc(count * (str_len - needle_len) + ZSTR_LEN(haystack), 0);
+ if (str_len > needle_len) {
+ new_str = zend_string_safe_alloc(count, str_len - needle_len, ZSTR_LEN(haystack), 0);
+ } else {
+ new_str = zend_string_alloc(count * (str_len - needle_len) + ZSTR_LEN(haystack), 0);
+ }
e = s = ZSTR_VAL(new_str);
end = ZSTR_VAL(haystack) + ZSTR_LEN(haystack);
@@ -3297,8 +3321,12 @@ static zend_string *php_str_to_str_i_ex(zend_string *haystack, char *lc_haystack
zend_string_release(lc_needle);
goto nothing_todo;
}
-
- new_str = zend_string_alloc(count * (str_len - ZSTR_LEN(lc_needle)) + ZSTR_LEN(haystack), 0);
+
+ if (str_len > ZSTR_LEN(lc_needle)) {
+ new_str = zend_string_safe_alloc(count, str_len - ZSTR_LEN(lc_needle), ZSTR_LEN(haystack), 0);
+ } else {
+ new_str = zend_string_alloc(count * (str_len - ZSTR_LEN(lc_needle)) + ZSTR_LEN(haystack), 0);
+ }
e = s = ZSTR_VAL(new_str);
end = lc_haystack + ZSTR_LEN(haystack);
@@ -3376,7 +3404,11 @@ PHPAPI zend_string *php_str_to_str(char *haystack, size_t length, char *needle,
new_str = zend_string_init(haystack, length, 0);
return new_str;
} else {
- new_str = zend_string_alloc(count * (str_len - needle_len) + length, 0);
+ if (str_len > needle_len) {
+ new_str = zend_string_safe_alloc(count, str_len - needle_len, length, 0);
+ } else {
+ new_str = zend_string_alloc(count * (str_len - needle_len) + length, 0);
+ }
}
}
@@ -3443,7 +3475,7 @@ PHP_FUNCTION(strtr)
}
if (ac == 2) {
- HashTable *pats = HASH_OF(from);
+ HashTable *pats = Z_ARRVAL_P(from);
if (zend_hash_num_elements(pats) < 1) {
RETURN_STR_COPY(str);
@@ -3804,7 +3836,7 @@ PHPAPI zend_string *php_addcslashes(zend_string *str, int should_free, char *wha
char *end;
char c;
size_t newlen;
- zend_string *new_str = zend_string_alloc(4 * ZSTR_LEN(str), 0);
+ zend_string *new_str = zend_string_safe_alloc(4, ZSTR_LEN(str), 0, 0);
php_charmask((unsigned char *)what, wlength, flags);
@@ -3879,7 +3911,7 @@ PHPAPI zend_string *php_addslashes(zend_string *str, int should_free)
do_escape:
offset = source - (char *)ZSTR_VAL(str);
- new_str = zend_string_alloc(offset + (2 * (ZSTR_LEN(str) - offset)), 0);
+ new_str = zend_string_safe_alloc(2, ZSTR_LEN(str) - offset, offset, 0);
memcpy(ZSTR_VAL(new_str), ZSTR_VAL(str), offset);
target = ZSTR_VAL(new_str) + offset;
@@ -3962,13 +3994,12 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
/* For each entry in the search array, get the entry */
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(search), search_entry) {
/* Make sure we're dealing with strings. */
- ZVAL_DEREF(search_entry);
- SEPARATE_ZVAL_NOREF(search_entry);
- convert_to_string(search_entry);
- if (Z_STRLEN_P(search_entry) == 0) {
+ zend_string *search_str = zval_get_string(search_entry);
+ if (ZSTR_LEN(search_str) == 0) {
if (Z_TYPE_P(replace) == IS_ARRAY) {
replace_idx++;
}
+ zend_string_release(search_str);
continue;
}
@@ -3998,11 +4029,11 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
}
}
- if (Z_STRLEN_P(search_entry) == 1) {
+ if (ZSTR_LEN(search_str) == 1) {
zend_long old_replace_count = replace_count;
tmp_result = php_char_to_str_ex(Z_STR_P(result),
- Z_STRVAL_P(search_entry)[0],
+ ZSTR_VAL(search_str)[0],
replace_value,
replace_len,
case_sensitivity,
@@ -4011,10 +4042,10 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
zend_string_release(lc_subject_str);
lc_subject_str = NULL;
}
- } else if (Z_STRLEN_P(search_entry) > 1) {
+ } else if (ZSTR_LEN(search_str) > 1) {
if (case_sensitivity) {
tmp_result = php_str_to_str_ex(Z_STR_P(result),
- Z_STRVAL_P(search_entry), Z_STRLEN_P(search_entry),
+ ZSTR_VAL(search_str), ZSTR_LEN(search_str),
replace_value, replace_len, &replace_count);
} else {
zend_long old_replace_count = replace_count;
@@ -4023,7 +4054,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
lc_subject_str = php_string_tolower(Z_STR_P(result));
}
tmp_result = php_str_to_str_i_ex(Z_STR_P(result), ZSTR_VAL(lc_subject_str),
- Z_STR_P(search_entry), replace_value, replace_len, &replace_count);
+ search_str, replace_value, replace_len, &replace_count);
if (replace_count != old_replace_count) {
zend_string_release(lc_subject_str);
lc_subject_str = NULL;
@@ -4031,6 +4062,8 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
}
}
+ zend_string_release(search_str);
+
if (replace_entry_str) {
zend_string_release(replace_entry_str);
replace_entry_str = NULL;
@@ -4050,6 +4083,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
zend_string_release(lc_subject_str);
}
} else {
+ ZEND_ASSERT(Z_TYPE_P(search) == IS_STRING);
if (Z_STRLEN_P(search) == 1) {
ZVAL_STR(result,
php_char_to_str_ex(subject_str,
@@ -4064,7 +4098,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zval *s
Z_STRVAL_P(search), Z_STRLEN_P(search),
Z_STRVAL_P(replace), Z_STRLEN_P(replace), &replace_count));
} else {
- lc_subject_str = php_string_tolower(Z_STR_P(subject));
+ lc_subject_str = php_string_tolower(subject_str);
ZVAL_STR(result, php_str_to_str_i_ex(subject_str, ZSTR_VAL(lc_subject_str),
Z_STR_P(search),
Z_STRVAL_P(replace), Z_STRLEN_P(replace), &replace_count));
@@ -4121,6 +4155,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit
/* For each subject entry, convert it to string, then perform replacement
and add the result to the return_value array. */
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(subject), num_key, string_key, subject_entry) {
+ ZVAL_DEREF(subject_entry);
if (Z_TYPE_P(subject_entry) != IS_ARRAY && Z_TYPE_P(subject_entry) != IS_OBJECT) {
count += php_str_replace_in_subject(search, replace, subject_entry, &result, case_sensitivity);
} else {
@@ -4399,7 +4434,7 @@ PHP_FUNCTION(nl2br)
{
size_t repl_len = is_xhtml ? (sizeof("<br />") - 1) : (sizeof("<br>") - 1);
- result = zend_string_alloc(repl_cnt * repl_len + ZSTR_LEN(str), 0);
+ result = zend_string_safe_alloc(repl_cnt, repl_len, ZSTR_LEN(str), 0);
target = ZSTR_VAL(result);
}
@@ -4570,8 +4605,13 @@ PHP_FUNCTION(parse_str)
if (arrayArg == NULL) {
zval tmp;
- zend_array *symbol_table = zend_rebuild_symbol_table();
+ zend_array *symbol_table;
+ if (zend_forbid_dynamic_call("parse_str() with a single argument") == FAILURE) {
+ efree(res);
+ return;
+ }
+ symbol_table = zend_rebuild_symbol_table();
ZVAL_ARR(&tmp, symbol_table);
sapi_module.treat_data(PARSE_STRING, res, &tmp);
} else {
@@ -4686,6 +4726,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const cha
size_t pos, i = 0;
char *allow_free = NULL;
const char *allow_actual;
+ char is_xml = 0;
if (stateptr)
state = *stateptr;
@@ -4781,7 +4822,10 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const cha
switch (state) {
case 1: /* HTML/XML */
lc = '>';
- in_q = state = 0;
+ if (is_xml && *(p -1) == '-') {
+ break;
+ }
+ in_q = state = is_xml = 0;
if (allow) {
if (tp - tbuf >= PHP_TAG_BUF_SIZE) {
pos = tp - tbuf;
@@ -4910,8 +4954,8 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const cha
* state == 2 (PHP). Switch back to HTML.
*/
- if (state == 2 && p > buf+2 && strncasecmp(p-2, "xm", 2) == 0) {
- state = 1;
+ if (state == 2 && p > buf+4 && strncasecmp(p-4, "<?xm", 4) == 0) {
+ state = 1; is_xml=1;
break;
}
@@ -5256,12 +5300,10 @@ PHP_FUNCTION(substr_count)
endp = p + haystack_len;
if (offset < 0) {
- php_error_docref(NULL, E_WARNING, "Offset should be greater than or equal to 0");
- RETURN_FALSE;
+ offset += (zend_long)haystack_len;
}
-
- if ((size_t)offset > haystack_len) {
- php_error_docref(NULL, E_WARNING, "Offset value " ZEND_LONG_FMT " exceeds string length", offset);
+ if ((offset < 0) || ((size_t)offset > haystack_len)) {
+ php_error_docref(NULL, E_WARNING, "Offset not contained in string");
RETURN_FALSE;
}
p += offset;
@@ -5269,11 +5311,10 @@ PHP_FUNCTION(substr_count)
if (ac == 4) {
if (length <= 0) {
- php_error_docref(NULL, E_WARNING, "Length should be greater than 0");
- RETURN_FALSE;
+ length += (haystack_len - offset);
}
- if (length > (haystack_len - offset)) {
- php_error_docref(NULL, E_WARNING, "Length value " ZEND_LONG_FMT " exceeds string length", length);
+ if ((length <= 0) || (length > (haystack_len - offset))) {
+ php_error_docref(NULL, E_WARNING, "Invalid length value");
RETURN_FALSE;
}
endp = p + length;
@@ -5339,7 +5380,7 @@ PHP_FUNCTION(str_pad)
return;
}
- result = zend_string_alloc(ZSTR_LEN(input) + num_pad_chars, 0);
+ result = zend_string_safe_alloc(1, ZSTR_LEN(input), num_pad_chars, 0);
ZSTR_LEN(result) = 0;
/* We need to figure out the left/right padding lengths. */
@@ -5580,7 +5621,7 @@ PHP_FUNCTION(money_format)
}
}
- str = zend_string_alloc(format_len + 1024, 0);
+ str = zend_string_safe_alloc(format_len, 1, 1024, 0);
if ((res_len = strfmon(ZSTR_VAL(str), ZSTR_LEN(str), format, value)) < 0) {
zend_string_free(str);
RETURN_FALSE;
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index fec4ec496b..38605eb03d 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/tests/array/array_column_numeric_string_key.phpt b/ext/standard/tests/array/array_column_numeric_string_key.phpt
new file mode 100644
index 0000000000..aed3c35ea2
--- /dev/null
+++ b/ext/standard/tests/array/array_column_numeric_string_key.phpt
@@ -0,0 +1,23 @@
+--TEST--
+array_column() treats numeric string keys as usual
+--FILE--
+<?php
+
+$array = [[42 => 'a'], [42 => 'b']];
+var_dump(array_column($array, 42));
+var_dump(array_column($array, "42"));
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+}
+array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+}
diff --git a/ext/standard/tests/array/array_column_property_visibility.phpt b/ext/standard/tests/array/array_column_property_visibility.phpt
new file mode 100644
index 0000000000..4639a3c9c5
--- /dev/null
+++ b/ext/standard/tests/array/array_column_property_visibility.phpt
@@ -0,0 +1,27 @@
+--TEST--
+array_column() respects property visibility
+--FILE--
+<?php
+
+class Test {
+ private $prop;
+ public function __construct($value) {
+ $this->prop = $value;
+ }
+ public function __isset($name) {
+ return true;
+ }
+ public function __get($name) {
+ return "__get($this->prop)";
+ }
+}
+
+$arr = [new Test("foobar")];
+var_dump(array_column($arr, "prop"));
+
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ string(13) "__get(foobar)"
+}
diff --git a/ext/standard/tests/array/bug24766.phpt b/ext/standard/tests/array/bug24766.phpt
index 1d688e8689..2b5f8e0830 100644
--- a/ext/standard/tests/array/bug24766.phpt
+++ b/ext/standard/tests/array/bug24766.phpt
@@ -19,27 +19,27 @@ var_dump($b[$i]);
--EXPECTF--
array(2) refcount(%d){
[1]=>
- long(18)
+ int(18)
[2]=>
- long(52)
+ int(52)
}
array(2) refcount(%d){
[1]=>
- long(18)
+ int(18)
[2]=>
- long(52)
+ int(52)
}
array(2) refcount(%d){
[0]=>
- long(1)
+ int(1)
[1]=>
- long(2)
+ int(2)
}
array(2) refcount(%d){
[0]=>
- long(1)
+ int(1)
[1]=>
- long(2)
+ int(2)
}
int(18)
int(18)
diff --git a/ext/standard/tests/array/bug25708.phpt b/ext/standard/tests/array/bug25708.phpt
index 784f111064..ff8b9f4304 100644
--- a/ext/standard/tests/array/bug25708.phpt
+++ b/ext/standard/tests/array/bug25708.phpt
@@ -69,155 +69,155 @@ debug_zval_dump($_a, $_b);
--EXPECTF--
NULL
NULL
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(3)
-long(1)
-long(3)
---
-long(4)
-long(3)
-long(4)
-long(3)
---
-long(3)
-long(3)
-long(3)
---
-long(4)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(3)
+int(1)
+int(3)
+--
+int(4)
+int(3)
+int(4)
+int(3)
+--
+int(3)
+int(3)
+int(3)
+--
+int(4)
string(1) "x" refcount(%d)
-long(4)
+int(4)
string(1) "x" refcount(%d)
-long(3)
+int(3)
--
-long(1)
-long(2)
+int(1)
+int(2)
----a
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(3)
-long(1)
-long(3)
---
-long(4)
-long(3)
-long(4)
-long(3)
---
-long(3)
-long(3)
-long(3)
---
-long(4)
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(3)
+int(1)
+int(3)
+--
+int(4)
+int(3)
+int(4)
+int(3)
+--
+int(3)
+int(3)
+int(3)
+--
+int(4)
string(1) "x" refcount(%d)
-long(4)
+int(4)
string(1) "x" refcount(%d)
-long(3)
+int(3)
--
-long(1)
-long(2)
+int(1)
+int(2)
----ra
NULL
NULL
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(3)
-long(1)
-long(3)
---
-long(4)
-long(3)
-long(4)
-long(3)
---
-long(3)
-long(3)
-long(3)
---
-long(4)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(3)
+int(1)
+int(3)
+--
+int(4)
+int(3)
+int(4)
+int(3)
+--
+int(3)
+int(3)
+int(3)
+--
+int(4)
string(1) "x" refcount(%d)
-long(4)
+int(4)
string(1) "x" refcount(%d)
-long(3)
+int(3)
--
-long(1)
-long(2)
+int(1)
+int(2)
----
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(2)
-long(1)
-long(2)
---
-long(1)
-long(3)
-long(1)
-long(3)
---
-long(4)
-long(3)
-long(4)
-long(3)
---
-long(3)
-long(3)
-long(3)
---
-long(4)
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(2)
+int(1)
+int(2)
+--
+int(1)
+int(3)
+int(1)
+int(3)
+--
+int(4)
+int(3)
+int(4)
+int(3)
+--
+int(3)
+int(3)
+int(3)
+--
+int(4)
string(1) "x" refcount(%d)
-long(4)
+int(4)
string(1) "x" refcount(%d)
-long(3)
+int(3)
--
-long(1)
-long(2)
+int(1)
+int(2)
----r
string(2) "ok" refcount(%d)
string(2) "ok" refcount(%d)
diff --git a/ext/standard/tests/array/bug69674.phpt b/ext/standard/tests/array/bug69674.phpt
new file mode 100644
index 0000000000..0d58b6ae53
--- /dev/null
+++ b/ext/standard/tests/array/bug69674.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #69674 (SIGSEGV array.c:953)
+--FILE--
+<?php
+var_dump(current(array_keys(array())));
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/standard/tests/array/bug70250.phpt b/ext/standard/tests/array/bug70250.phpt
new file mode 100644
index 0000000000..f185999068
--- /dev/null
+++ b/ext/standard/tests/array/bug70250.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70250 (extract() turns array elements to references)
+--FILE--
+<?php
+$array = ['key' => 'value'];
+
+$ref = &$array['key'];
+
+unset($ref);
+
+extract($array);
+
+$key = "bad";
+
+var_dump($array);
+?>
+--EXPECT--
+array(1) {
+ ["key"]=>
+ string(5) "value"
+}
diff --git a/ext/standard/tests/array/bug70668.phpt b/ext/standard/tests/array/bug70668.phpt
new file mode 100644
index 0000000000..b35107a0a6
--- /dev/null
+++ b/ext/standard/tests/array/bug70668.phpt
@@ -0,0 +1,63 @@
+--TEST--
+Bug #70668 (array_keys() doesn't respect references when $strict is true)
+--FILE--
+<?php
+$arr = array(1, "1", "", NULL, 0, false, true, array());
+
+$s = &$arr[0];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[1];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[2];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[3];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[4];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[5];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[6];
+var_dump(array_keys($arr, $s, true));
+
+$s = &$arr[7];
+var_dump(array_keys($arr, $s, true));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ int(0)
+}
+array(1) {
+ [0]=>
+ int(1)
+}
+array(1) {
+ [0]=>
+ int(2)
+}
+array(1) {
+ [0]=>
+ int(3)
+}
+array(1) {
+ [0]=>
+ int(4)
+}
+array(1) {
+ [0]=>
+ int(5)
+}
+array(1) {
+ [0]=>
+ int(6)
+}
+array(1) {
+ [0]=>
+ int(7)
+}
diff --git a/ext/standard/tests/array/bug70808.phpt b/ext/standard/tests/array/bug70808.phpt
new file mode 100644
index 0000000000..8a625386d3
--- /dev/null
+++ b/ext/standard/tests/array/bug70808.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #70808 (array_merge_recursive corrupts memory of unset items)
+--FILE--
+<?php
+
+$arr1 = array("key" => array(0, 1));
+$arr2 = array("key" => array(2));
+
+unset($arr1["key"][1]);
+
+$result = array_merge_recursive($arr1, $arr2);
+print_r($result);
+?>
+--EXPECT--
+Array
+(
+ [key] => Array
+ (
+ [0] => 0
+ [1] => 2
+ )
+
+)
diff --git a/ext/standard/tests/array/bug70910.phpt b/ext/standard/tests/array/bug70910.phpt
new file mode 100644
index 0000000000..c7eb36c490
--- /dev/null
+++ b/ext/standard/tests/array/bug70910.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #70910 (extract() breaks variable references)
+--FILE--
+<?php
+$var = 'original value';
+$ref =& $var;
+
+$hash = ['var' => 'new value'];
+
+extract($hash);
+var_dump($var === $ref);
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/array/bug71220.phpt b/ext/standard/tests/array/bug71220.phpt
new file mode 100644
index 0000000000..28b5c08a8a
--- /dev/null
+++ b/ext/standard/tests/array/bug71220.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #71220 (Null pointer deref (segfault) in compact via ob_start)
+--FILE--
+<?php
+ob_start("compact");
+ob_end_clean();
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/standard/tests/array/bug71334.phpt b/ext/standard/tests/array/bug71334.phpt
new file mode 100644
index 0000000000..7a37d0953a
--- /dev/null
+++ b/ext/standard/tests/array/bug71334.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #71334: Cannot access array keys while uksort()
+--FILE--
+<?php
+
+class myClass
+{
+ private $a = [
+ 'foo-test' => [1],
+ '-' => [2],
+ 'bar-test' => [3]
+ ];
+
+ private function _mySort($x, $y)
+ {
+ if (!isset($this->a[$x])) {
+ throw new Exception('Missing X: "' . $x . '"');
+ }
+
+ if (!isset($this->a[$y])) {
+ throw new Exception('Missing Y: "' . $y . '"');
+ }
+
+ return $x < $y;
+ }
+
+ public function __construct()
+ {
+ uksort($this->a, [$this, '_mySort']);
+ }
+}
+
+new myClass();
+echo "Done";
+
+?>
+--EXPECT--
+Done
diff --git a/ext/standard/tests/array/bug71603.phpt b/ext/standard/tests/array/bug71603.phpt
new file mode 100644
index 0000000000..0c25be660c
--- /dev/null
+++ b/ext/standard/tests/array/bug71603.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #71603 (compact() maintains references in php7)
+--FILE--
+<?php
+$foo = "okey";
+$foo_reference =& $foo;
+
+$array = compact('foo_reference');
+
+$foo = 'changed!';
+
+var_dump($array['foo_reference']);
+
+--EXPECT--
+string(4) "okey"
diff --git a/ext/standard/tests/array/bug71660.phpt b/ext/standard/tests/array/bug71660.phpt
new file mode 100644
index 0000000000..c2d7192378
--- /dev/null
+++ b/ext/standard/tests/array/bug71660.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #71660 (array_column behaves incorrectly after foreach by reference)
+--FILE--
+<?php
+$arr = array('id' => 12345, 'name' => 'sam');
+foreach ($arr as &$v) {
+ $v = $v;
+}
+
+$arr = [$arr];
+
+var_dump(array_column($arr, 'name', 'id'));
+?>
+--EXPECT--
+array(1) {
+ [12345]=>
+ string(3) "sam"
+}
diff --git a/ext/standard/tests/array/bug71837.phpt b/ext/standard/tests/array/bug71837.phpt
new file mode 100644
index 0000000000..686d144c3c
--- /dev/null
+++ b/ext/standard/tests/array/bug71837.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71837 (Wrong arrays behaviour)
+--FILE--
+<?php
+
+$p = array(array());
+array_push($p[0], array(100));
+
+$c = array_merge($p, array());
+$c[0][0] = 200;
+
+print_r($p);
+
+?>
+--EXPECT--
+Array
+(
+ [0] => Array
+ (
+ [0] => Array
+ (
+ [0] => 100
+ )
+
+ )
+
+)
diff --git a/ext/standard/tests/array/bug72031.phpt b/ext/standard/tests/array/bug72031.phpt
new file mode 100644
index 0000000000..541fd3c4ec
--- /dev/null
+++ b/ext/standard/tests/array/bug72031.phpt
@@ -0,0 +1,48 @@
+--TEST--
+Bug #72031: array_column() against an array of objects discards all values matching null
+--FILE--
+<?php
+
+class myObj {
+ public $prop;
+ public function __construct($prop) {
+ $this->prop = $prop;
+ }
+}
+
+$objects = [
+ new myObj(-1),
+ new myObj(0),
+ new myObj(1),
+ new myObj(2),
+ new myObj(null),
+ new myObj(true),
+ new myObj(false),
+ new myObj('abc'),
+ new myObj(''),
+];
+
+var_dump(array_column($objects, 'prop'));
+
+?>
+--EXPECT--
+array(9) {
+ [0]=>
+ int(-1)
+ [1]=>
+ int(0)
+ [2]=>
+ int(1)
+ [3]=>
+ int(2)
+ [4]=>
+ NULL
+ [5]=>
+ bool(true)
+ [6]=>
+ bool(false)
+ [7]=>
+ string(3) "abc"
+ [8]=>
+ string(0) ""
+}
diff --git a/ext/standard/tests/array/bug72116.phpt b/ext/standard/tests/array/bug72116.phpt
new file mode 100644
index 0000000000..7951f69130
--- /dev/null
+++ b/ext/standard/tests/array/bug72116.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #72116 (insertion after array_fill fails)
+--FILE--
+<?php
+
+$x = array_fill(0, 1, '..');
+$x[] = 'a';
+var_dump($x);
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(2) ".."
+ [1]=>
+ string(1) "a"
+}
+
diff --git a/ext/standard/tests/array/bug72369.phpt b/ext/standard/tests/array/bug72369.phpt
new file mode 100644
index 0000000000..63bb5625de
--- /dev/null
+++ b/ext/standard/tests/array/bug72369.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #72369 (array_merge() produces references in PHP7)
+--FILE--
+<?php
+$x = 'xxx';
+$d = ['test' => &$x];
+unset($x);
+$a = ['test' => 'yyy'];
+$a = array_merge($a, $d);
+debug_zval_dump($a);
+?>
+--EXPECTF--
+array(1) refcount(%d){
+ ["test"]=>
+ string(3) "xxx" refcount(%d)
+}
diff --git a/ext/standard/tests/array/count_symbol_table.phpt b/ext/standard/tests/array/count_symbol_table.phpt
new file mode 100644
index 0000000000..b7e0a2e8b1
--- /dev/null
+++ b/ext/standard/tests/array/count_symbol_table.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test count() function : count on symbol table
+--FILE--
+<?php
+
+$c1 = 0;
+$c2 = 0;
+$a = 1;
+$b = 1;
+$c1 = count($GLOBALS);
+unset($a);
+unset($GLOBALS["b"]);
+$c2 = count($GLOBALS);
+
+var_dump($c1 - $c2);
+$c = 1;
+$c1 = count($GLOBALS);
+var_dump($c1 - $c2);
+?>
+--EXPECT--
+int(2)
+int(1)
diff --git a/ext/standard/tests/array/extract_variation1.phpt b/ext/standard/tests/array/extract_variation1.phpt
index d102534a08..0e66c0e091 100644
--- a/ext/standard/tests/array/extract_variation1.phpt
+++ b/ext/standard/tests/array/extract_variation1.phpt
@@ -18,10 +18,10 @@ echo "\nDone";
?>
--EXPECTF--
-long(4)
+int(4)
string(4) "John" refcount(%d)
int(%d)
-long(4)
+int(4)
string(4) "John" refcount(%d)
Done
diff --git a/ext/standard/tests/array/range_bug70239_0.phpt b/ext/standard/tests/array/range_bug70239_0.phpt
new file mode 100644
index 0000000000..edfdd05fbc
--- /dev/null
+++ b/ext/standard/tests/array/range_bug70239_0.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 1
+--FILE--
+<?php
+range(0, pow(2.0, 100000000));
+?>
+===DONE===
+--EXPECTF--
+Warning: range(): Invalid range supplied: start=0 end=inf in %srange_bug70239_0.php on line %d
+===DONE===
diff --git a/ext/standard/tests/array/range_bug70239_1.phpt b/ext/standard/tests/array/range_bug70239_1.phpt
new file mode 100644
index 0000000000..75419cf829
--- /dev/null
+++ b/ext/standard/tests/array/range_bug70239_1.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 2
+--FILE--
+<?php
+range(pow(2.0, 100000000), pow(2.0, 100000000) + 1);
+?>
+===DONE===
+--EXPECTF--
+Warning: range(): Invalid range supplied: start=inf end=inf in %srange_bug70239_1.php on line %d
+===DONE===
diff --git a/ext/standard/tests/array/range_bug70239_2.phpt b/ext/standard/tests/array/range_bug70239_2.phpt
new file mode 100644
index 0000000000..76ed638669
--- /dev/null
+++ b/ext/standard/tests/array/range_bug70239_2.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 3
+--FILE--
+<?php
+var_dump(range(0, PHP_INT_MAX));
+?>
+===DONE===
+--EXPECTF--
+Warning: range(): The supplied range exceeds the maximum array size: start=0 end=%d in %srange_bug70239_2.php on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/range_bug70239_3.phpt b/ext/standard/tests/array/range_bug70239_3.phpt
new file mode 100644
index 0000000000..8402870c82
--- /dev/null
+++ b/ext/standard/tests/array/range_bug70239_3.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 4
+--FILE--
+<?php
+var_dump(range(PHP_INT_MIN, 0));
+?>
+===DONE===
+--EXPECTF--
+Warning: range(): The supplied range exceeds the maximum array size: start=-%d end=0 in %srange_bug70239_3.php on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/array/range_bug71132.phpt b/ext/standard/tests/array/range_bug71132.phpt
new file mode 100644
index 0000000000..5e3bcc8f31
--- /dev/null
+++ b/ext/standard/tests/array/range_bug71132.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #71132 (range function produces 2 segfaults with long integers)
+--FILE--
+<?php
+var_dump(count(range(PHP_INT_MIN + 513, PHP_INT_MIN)));
+var_dump(count(range(PHP_INT_MIN, PHP_INT_MIN + 513)));
+?>
+--EXPECT--
+int(514)
+int(514)
diff --git a/ext/standard/tests/array/range_bug71197.phpt b/ext/standard/tests/array/range_bug71197.phpt
new file mode 100644
index 0000000000..2031ec7c09
--- /dev/null
+++ b/ext/standard/tests/array/range_bug71197.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #71197 (range function produces another 2 segfaults with long integers)
+--FILE--
+<?php
+range(PHP_INT_MIN, PHP_INT_MIN + 513, .01);
+range(PHP_INT_MIN + 513, PHP_INT_MIN, .01);
+?>
+--EXPECT--
diff --git a/ext/standard/tests/array/range_bug72017.phpt b/ext/standard/tests/array/range_bug72017.phpt
new file mode 100644
index 0000000000..b5a56d7f4e
--- /dev/null
+++ b/ext/standard/tests/array/range_bug72017.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #72017 (incorrect truncation due to floating point precision issue)
+--FILE--
+<?php
+var_dump(range(4.5, 4.2, 0.1));
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ float(4.5)
+ [1]=>
+ float(4.4)
+ [2]=>
+ float(4.3)
+ [3]=>
+ float(4.2)
+}
diff --git a/ext/standard/tests/array/unexpected_array_mod_bug.phpt b/ext/standard/tests/array/unexpected_array_mod_bug.phpt
index 58f2249205..2762ebd830 100644
--- a/ext/standard/tests/array/unexpected_array_mod_bug.phpt
+++ b/ext/standard/tests/array/unexpected_array_mod_bug.phpt
@@ -4,7 +4,7 @@ Crash when function parameter modified via reference
<?php
function usercompare($a,$b) {
unset($GLOBALS['my_var'][2]);
- return 0;
+ return $a <=> $b;
}
$my_var = array(1 => "entry_1",
2 => "entry_2",
@@ -12,10 +12,19 @@ $my_var = array(1 => "entry_1",
4 => "entry_4",
5 => "entry_5");
usort($my_var, "usercompare");
+var_dump($my_var);
-echo "Done.\n";
?>
---EXPECTF--
-
-Warning: usort(): Array was modified by the user comparison function in %s on line %d
-Done.
+--EXPECT--
+array(5) {
+ [0]=>
+ string(7) "entry_1"
+ [1]=>
+ string(7) "entry_2"
+ [2]=>
+ string(7) "entry_3"
+ [3]=>
+ string(7) "entry_4"
+ [4]=>
+ string(7) "entry_5"
+}
diff --git a/ext/standard/tests/array/unexpected_array_mod_bug_variation1.phpt b/ext/standard/tests/array/unexpected_array_mod_bug_variation1.phpt
new file mode 100644
index 0000000000..b5a1ee24d5
--- /dev/null
+++ b/ext/standard/tests/array/unexpected_array_mod_bug_variation1.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Crash when function parameter modified via reference while keeping orig refcount
+--FILE--
+<?php
+
+$array = array(
+ 1 => "entry_1",
+ 2 => "entry_2",
+ 3 => "entry_3",
+ 4 => "entry_4",
+ 5 => "entry_5"
+);
+usort($array, function($a, $b) use (&$array, &$ref) {
+ unset($array[2]);
+ $ref = $array;
+ return $a <=> $b;
+});
+var_dump($array);
+
+?>
+--EXPECT--
+array(5) {
+ [0]=>
+ string(7) "entry_1"
+ [1]=>
+ string(7) "entry_2"
+ [2]=>
+ string(7) "entry_3"
+ [3]=>
+ string(7) "entry_4"
+ [4]=>
+ string(7) "entry_5"
+}
diff --git a/ext/standard/tests/assert/assert_basic.phpt b/ext/standard/tests/assert/assert_basic.phpt
index ea58e9f7f3..48b5fb6c6a 100644
--- a/ext/standard/tests/assert/assert_basic.phpt
+++ b/ext/standard/tests/assert/assert_basic.phpt
@@ -23,8 +23,8 @@ var_dump($r2=assert(0));
var_dump($r2=assert(1));
--EXPECTF--
f1 called
-NULL
+bool(false)
bool(true)
f1 called
-NULL
+bool(false)
bool(true)
diff --git a/ext/standard/tests/assert/assert_basic5.phpt b/ext/standard/tests/assert/assert_basic5.phpt
index d67d879262..745f3e7e29 100644
--- a/ext/standard/tests/assert/assert_basic5.phpt
+++ b/ext/standard/tests/assert/assert_basic5.phpt
@@ -27,6 +27,6 @@ int(0)
f1 called
Warning: assert(): assert($sa): "0 != 0" failed in %s on line 10
-NULL
+bool(false)
bool(true)
int(1)
diff --git a/ext/standard/tests/assert/assert_custom_exception.phpt b/ext/standard/tests/assert/assert_custom_exception.phpt
new file mode 100644
index 0000000000..caec222d1a
--- /dev/null
+++ b/ext/standard/tests/assert/assert_custom_exception.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Throwing custom exception object from assert() throws given object
+--INI--
+zend.assertions = 1
+assert.exception = 1
+--FILE--
+<?php
+class CustomException extends Exception {}
+assert(false, new CustomException('Exception message'));
+?>
+--EXPECTF--
+Fatal error: Uncaught CustomException: Exception message in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
diff --git a/ext/standard/tests/assert/assert_return_value.phpt b/ext/standard/tests/assert/assert_return_value.phpt
new file mode 100644
index 0000000000..834f9df1ff
--- /dev/null
+++ b/ext/standard/tests/assert/assert_return_value.phpt
@@ -0,0 +1,15 @@
+--TEST--
+assert() returns boolean on success or failure
+--INI--
+zend.assertions = 1
+assert.exception = 0
+--FILE--
+<?php
+var_dump(assert(true));
+var_dump(assert(false));
+?>
+--EXPECTF--
+bool(true)
+
+Warning: assert(): assert(false) failed in %s on line %d
+bool(false)
diff --git a/ext/standard/tests/assert/assert_variation.phpt b/ext/standard/tests/assert/assert_variation.phpt
index af8c967f8e..8ae84344c6 100644
--- a/ext/standard/tests/assert/assert_variation.phpt
+++ b/ext/standard/tests/assert/assert_variation.phpt
@@ -74,27 +74,27 @@ echo"\n";
Initial values: assert_options(ASSERT_CALLBACK) => [f1]
Initial values: ini.get("assert.callback") => [f1]
f1 called
-NULL
+bool(false)
Change callback function using ini.set and test return value
string(2) "f1"
assert_options(ASSERT_CALLBACK) => [f2]
ini.get("assert.callback") => [f2]
f2 called
-NULL
+bool(false)
Change callback function using assert_options and test return value
string(2) "f2"
assert_options(ASSERT_CALLBACK) => [f3]
ini.get("assert.callback") => [f2]
f3 called
-NULL
+bool(false)
Reset the name of the callback routine to a class method and check that it works
string(2) "f3"
assert_options(ASSERT_CALLBACK) => [c1]
ini.get("assert.callback") => [f2]
-NULL
+bool(false)
Reset callback options to use a class method
string(2) "c1"
@@ -109,7 +109,7 @@ ini.get("assert.callback") => [f2]
Deprecated: Non-static method c1::assert() should not be called statically in %s on line 53
Class assertion failed 53, "0 != 0"
-NULL
+bool(false)
Reset callback options to use an object method
array(2) {
@@ -128,4 +128,4 @@ array(2) {
ini.get("assert.callback") => [f2]
Class assertion failed 61, "0 != 0"
-NULL
+bool(false)
diff --git a/ext/standard/tests/bug71827.phpt b/ext/standard/tests/bug71827.phpt
new file mode 100644
index 0000000000..eedb9fb549
--- /dev/null
+++ b/ext/standard/tests/bug71827.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #71827 (substr_replace bug when length type is string )
+--FILE--
+<?php
+$line = str_repeat(' ',20); $value ='03'; $pos=0; $len='2';
+$line = substr_replace($line,$value,$pos,$len);
+echo "[$line]\n";
+?>
+--EXPECT--
+[03 ]
diff --git a/ext/standard/tests/class_object/bug71442.phpt b/ext/standard/tests/class_object/bug71442.phpt
new file mode 100644
index 0000000000..d6b3d6699b
--- /dev/null
+++ b/ext/standard/tests/class_object/bug71442.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Bug #71442 (forward_static_call crash)
+--FILE--
+<?php
+
+class A
+{
+ const NAME = 'A';
+ public static function test() {
+ $args = func_get_args();
+ echo static::NAME, " ".join(',', $args)." \n";
+ }
+}
+
+class B extends A
+{
+ const NAME = 'B';
+
+ public static function test() {
+ echo self::NAME, "\n";
+ forward_static_call(array('A', 'test'), 'more', 'args');
+ forward_static_call( 'test', 'other', 'args');
+ }
+}
+
+B::test('foo');
+
+function test() {
+ $args = func_get_args();
+ echo "C ".join(',', $args)." \n";
+}
+
+?>
+--EXPECT--
+B
+B more,args
+C other,args
diff --git a/ext/standard/tests/file/bug39673.phpt b/ext/standard/tests/file/bug39673.phpt
index 3836f2103d..00c29b28da 100644
--- a/ext/standard/tests/file/bug39673.phpt
+++ b/ext/standard/tests/file/bug39673.phpt
@@ -22,14 +22,14 @@ $offsets = array(
foreach ($offsets as $offset) {
$r = file_get_contents($filename, false, null, $offset);
- var_dump(strlen($r));
+ if ($r !== false) var_dump(strlen($r));
}
@unlink($filename);
echo "Done\n";
?>
---EXPECTF--
-int(13824)
+--EXPECTF--
+int(1)
int(13824)
int(0)
int(1)
diff --git a/ext/standard/tests/file/bug47517.phpt b/ext/standard/tests/file/bug47517.phpt
new file mode 100644
index 0000000000..97f387c865
--- /dev/null
+++ b/ext/standard/tests/file/bug47517.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #47517 test registry virtualization disabled
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip only for Windows');
+}
+?>
+--FILE--
+<?php
+/* This has to behave same way on both 64- and 32-bits. */
+file_put_contents('C:\Program Files\myfile.txt', 'hello');
+?>
+==DONE==
+--EXPECTF--
+Warning: file_put_contents(C:\Program Files\myfile.txt): failed to open stream: Permission denied in %sbug47517.php on line %d
+==DONE==
diff --git a/ext/standard/tests/file/bug52624.phpt b/ext/standard/tests/file/bug52624.phpt
index ee61eb90e6..c5e7a9cb0e 100644
--- a/ext/standard/tests/file/bug52624.phpt
+++ b/ext/standard/tests/file/bug52624.phpt
@@ -9,4 +9,6 @@ echo tempnam("directory_that_not_exists", "prefix_");
?>
--EXPECTF--
+Notice: tempnam(): file created in the system's temporary directory in %sbug52624.php on line %d
+
Warning: tempnam(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d
diff --git a/ext/standard/tests/file/bug71287.phpt b/ext/standard/tests/file/bug71287.phpt
new file mode 100644
index 0000000000..b7987829b0
--- /dev/null
+++ b/ext/standard/tests/file/bug71287.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #71287 (Error message contains hexadecimal instead of decimal number)
+--FILE--
+<?php
+class Stream {
+ public function stream_open($path, $mode, $options, $opened_path) {
+ return true;
+ }
+
+ public function stream_write($data) {
+ return strlen($data) - 2;
+ }
+}
+
+stream_wrapper_register('test', Stream::class);
+file_put_contents('test://file.txt', 'foobarbaz');
+?>
+--EXPECTF--
+Warning: file_put_contents(): Only 7 of 9 bytes written, possibly out of free disk space in %sbug71287.php on line %d
diff --git a/ext/standard/tests/file/bug72035.phpt b/ext/standard/tests/file/bug72035.phpt
new file mode 100644
index 0000000000..a2abbb7f35
--- /dev/null
+++ b/ext/standard/tests/file/bug72035.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #72035 php-cgi.exe fails to run scripts relative to drive root
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) die('skip windows only test');
+if(php_sapi_name() != "cli") die('skip CLI only test');
+
+$cgi = realpath(dirname(PHP_BINARY)) . DIRECTORY_SEPARATOR . "php-cgi.exe";
+if (!file_exists($cgi)) die('skip CGI binary not found');
+?>
+--FILE--
+<?php
+
+$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()) . ".php";
+$fl = substr($fl, 2);
+
+$cgi = realpath(dirname(PHP_BINARY) . DIRECTORY_SEPARATOR . "php-cgi.exe");
+
+file_put_contents($fl, "<?php echo \"hello\", \"\n\"; ?>");
+
+$cmd = "$cgi -n -C $fl";
+
+/* Need to run CGI with the env reset. */
+$desc = array(0 => array("pipe", "r"));
+$proc = proc_open($cmd, $desc, $pipes, getcwd(), array());
+if (is_resource($proc)) {
+ echo stream_get_contents($pipes[0]);
+
+ proc_close($proc);
+}
+
+unlink($fl);
+?>
+==DONE==
+--EXPECTF--
+X-Powered-By: PHP/%s
+Content-type: text/html; charset=UTF-8
+
+hello
+==DONE==
diff --git a/ext/standard/tests/file/dirname_error.phpt b/ext/standard/tests/file/dirname_error.phpt
index dc7814f7f7..515a3988d5 100644
--- a/ext/standard/tests/file/dirname_error.phpt
+++ b/ext/standard/tests/file/dirname_error.phpt
@@ -20,7 +20,7 @@ var_dump( dirname() );
echo "\n-- Testing dirname() function with more than expected no. of arguments --\n";
$path = 'string_val';
$extra_arg = 10;
-var_dump( dirname($path, $extra_arg) );
+var_dump( dirname($path, 1, $extra_arg) );
?>
===DONE===
@@ -29,12 +29,12 @@ var_dump( dirname($path, $extra_arg) );
-- Testing dirname() function with Zero arguments --
-Warning: dirname() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: dirname() expects at least 1 parameter, 0 given in %s on line %d
NULL
-- Testing dirname() function with more than expected no. of arguments --
-Warning: dirname() expects exactly 1 parameter, 2 given in %s on line %d
+Warning: dirname() expects at most 2 parameters, 3 given in %s on line %d
NULL
===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt
new file mode 100644
index 0000000000..3afc3dc180
--- /dev/null
+++ b/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt
@@ -0,0 +1,236 @@
+--TEST--
+Test file_get_contents() function : usage variation
+--CREDITS--
+Dave Kelsey <d_kelsey@uk.ibm.com>
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32-bit only");
+--FILE--
+<?php
+/* Prototype : string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])
+ * Description: Read the entire file into a string
+ * Source code: ext/standard/file.c
+ * Alias to functions:
+ */
+
+echo "*** Testing file_get_contents() : usage variation ***\n";
+
+// Define error handler
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+ if (error_reporting() != 0) {
+ // report non-silenced errors
+ echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+ }
+}
+set_error_handler('test_error_handler');
+
+// Initialise function arguments not being substituted (if any)
+$filename = 'FileGetContentsVar5.tmp';
+$absFile = dirname(__FILE__).'/'.$filename;
+$h = fopen($absFile,"w");
+fwrite($h, b"contents read");
+fclose($h);
+
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// define some classes
+class classWithToString
+{
+ public function __toString() {
+ return "Class A object";
+ }
+}
+
+class classWithoutToString
+{
+}
+
+// heredoc string
+$heredoc = <<<EOT
+hello world
+EOT;
+
+// add arrays
+$index_array = array (1, 2, 3);
+$assoc_array = array ('one' => 1, 'two' => 2);
+
+//array of values to iterate over
+$inputs = array(
+
+ // int data
+ 'int 0' => 0,
+ 'int 1' => 1,
+ 'int 12345' => 12345,
+ 'int -12345' => -12345,
+ 'int -10' => -10,
+
+ // float data
+ 'float 10.5' => 10.5,
+ 'float -10.5' => -10.5,
+ 'float -22.5' => -22.5,
+ 'float 12.3456789000e10' => 12.3456789000e10,
+ 'float -12.3456789000e10' => -12.3456789000e10,
+ 'float .5' => .5,
+
+ // array data
+ 'empty array' => array(),
+ 'int indexed array' => $index_array,
+ 'associative array' => $assoc_array,
+ 'nested arrays' => array('foo', $index_array, $assoc_array),
+
+ // null data
+ 'uppercase NULL' => NULL,
+ 'lowercase null' => null,
+
+ // boolean data
+ 'lowercase true' => true,
+ 'lowercase false' =>false,
+ 'uppercase TRUE' =>TRUE,
+ 'uppercase FALSE' =>FALSE,
+
+ // empty data
+ 'empty string DQ' => "",
+ 'empty string SQ' => '',
+
+ // string data
+ 'string DQ' => "string",
+ 'string SQ' => 'string',
+ 'mixed case string' => "sTrInG",
+ 'heredoc' => $heredoc,
+
+ // object data
+ 'instance of classWithToString' => new classWithToString(),
+ 'instance of classWithoutToString' => new classWithoutToString(),
+
+ // undefined data
+ 'undefined var' => @$undefined_var,
+
+ // unset data
+ 'unset var' => @$unset_var,
+);
+
+// loop through each element of the array for offset
+
+foreach($inputs as $key =>$value) {
+ echo "\n--$key--\n";
+ var_dump( file_get_contents($absFile, false, null, $value) );
+};
+
+unlink($absFile);
+
+?>
+===DONE===
+--EXPECTF--
+*** Testing file_get_contents() : usage variation ***
+
+--int 0--
+string(%d) "contents read"
+
+--int 1--
+string(%d) "ontents read"
+
+--int 12345--
+string(%d) ""
+
+--int -12345--
+Error: 2 - file_get_contents(): Failed to seek to position -12345 in the stream, %s(%d)
+bool(false)
+
+--int -10--
+string(10) "tents read"
+
+--float 10.5--
+string(3) "ead"
+
+--float -10.5--
+string(10) "tents read"
+
+--float -22.5--
+Error: 2 - file_get_contents(): Failed to seek to position -22 in the stream, %s(%d)
+bool(false)
+
+--float 12.3456789000e10--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, float given, %s(%d)
+NULL
+
+--float -12.3456789000e10--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, float given, %s(%d)
+NULL
+
+--float .5--
+string(%d) "contents read"
+
+--empty array--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, array given, %s(%d)
+NULL
+
+--int indexed array--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, array given, %s(%d)
+NULL
+
+--associative array--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, array given, %s(%d)
+NULL
+
+--nested arrays--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, array given, %s(%d)
+NULL
+
+--uppercase NULL--
+string(%d) "contents read"
+
+--lowercase null--
+string(%d) "contents read"
+
+--lowercase true--
+string(12) "ontents read"
+
+--lowercase false--
+string(%d) "contents read"
+
+--uppercase TRUE--
+string(12) "ontents read"
+
+--uppercase FALSE--
+string(%d) "contents read"
+
+--empty string DQ--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, %unicode_string_optional% given, %s(%d)
+NULL
+
+--empty string SQ--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, %unicode_string_optional% given, %s(%d)
+NULL
+
+--string DQ--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, %unicode_string_optional% given, %s(%d)
+NULL
+
+--string SQ--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, %unicode_string_optional% given, %s(%d)
+NULL
+
+--mixed case string--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, %unicode_string_optional% given, %s(%d)
+NULL
+
+--heredoc--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, %unicode_string_optional% given, %s(%d)
+NULL
+
+--instance of classWithToString--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, object given, %s(%d)
+NULL
+
+--instance of classWithoutToString--
+Error: 2 - file_get_contents() expects parameter 4 to be integer, object given, %s(%d)
+NULL
+
+--undefined var--
+string(%d) "contents read"
+
+--unset var--
+string(%d) "contents read"
+===DONE===
diff --git a/ext/standard/tests/file/file_get_contents_variation5.phpt b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt
index aa13d69eb8..df33059f30 100644
--- a/ext/standard/tests/file/file_get_contents_variation5.phpt
+++ b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt
@@ -63,11 +63,13 @@ $inputs = array(
'int 0' => 0,
'int 1' => 1,
'int 12345' => 12345,
- 'int -12345' => -2345,
+ 'int -12345' => -12345,
+ 'int -10' => -10,
// float data
'float 10.5' => 10.5,
'float -10.5' => -10.5,
+ 'float -22.5' => -22.5,
'float 12.3456789000e10' => 12.3456789000e10,
'float -12.3456789000e10' => -12.3456789000e10,
'float .5' => .5,
@@ -133,19 +135,28 @@ string(%d) "ontents read"
string(%d) ""
--int -12345--
-string(%d) "contents read"
+Error: 2 - file_get_contents(): Failed to seek to position -12345 in the stream, %s(%d)
+bool(false)
+
+--int -10--
+string(10) "tents read"
--float 10.5--
string(3) "ead"
--float -10.5--
-string(%d) "contents read"
+string(10) "tents read"
+
+--float -22.5--
+Error: 2 - file_get_contents(): Failed to seek to position -22 in the stream, %s(%d)
+bool(false)
--float 12.3456789000e10--
string(%d) %s
--float -12.3456789000e10--
-string(%d) %s
+Error: 2 - file_get_contents(): Failed to seek to position -123456789000 in the stream, %s(%d)
+bool(false)
--float .5--
string(%d) "contents read"
diff --git a/ext/standard/tests/file/file_put_contents_variation7-win32.phpt b/ext/standard/tests/file/file_put_contents_variation7-win32.phpt
index d7bfdf9233..e1a94a2043 100644
--- a/ext/standard/tests/file/file_put_contents_variation7-win32.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation7-win32.phpt
@@ -59,10 +59,10 @@ for($i = 0; $i<count($allDirs); $i++) {
$j = $i+1;
$dir = $allDirs[$i];
echo "\n-- Iteration $j --\n";
- $res = file_put_contents($dir."\\".$filename, ($data + $i));
+ $res = file_put_contents($dir."\\".$filename, ($data . $i));
if ($res !== false) {
$in = file_get_contents($absFile);
- if ($in == ($data + $i)) {
+ if ($in == ($data . $i)) {
echo "Data written correctly\n";
}
else {
@@ -127,4 +127,4 @@ No data written
-- Iteration 12 --
Data written correctly
-*** Done *** \ No newline at end of file
+*** Done ***
diff --git a/ext/standard/tests/file/file_put_contents_variation7.phpt b/ext/standard/tests/file/file_put_contents_variation7.phpt
index 5c8e5f3602..b1b2face60 100644
--- a/ext/standard/tests/file/file_put_contents_variation7.phpt
+++ b/ext/standard/tests/file/file_put_contents_variation7.phpt
@@ -51,10 +51,10 @@ for($i = 0; $i<count($allDirs); $i++) {
$j = $i+1;
$dir = $allDirs[$i];
echo "\n-- Iteration $j --\n";
- $res = file_put_contents($dir."/".$filename, ($data + $i));
+ $res = file_put_contents($dir."/".$filename, ($data . $i));
if ($res !== false) {
$in = file_get_contents($absFile);
- if ($in == ($data + $i)) {
+ if ($in == ($data . $i)) {
echo "Data written correctly\n";
}
else {
@@ -116,4 +116,4 @@ Data written correctly
Warning: file_put_contents(BADDIR/FileGetContentsVar7.tmp): failed to open stream: %s in %s on line %d
No data written
-*** Done *** \ No newline at end of file
+*** Done ***
diff --git a/ext/standard/tests/file/filetype_variation2.phpt b/ext/standard/tests/file/filetype_variation2.phpt
index d538e32e6c..125b48c02c 100644
--- a/ext/standard/tests/file/filetype_variation2.phpt
+++ b/ext/standard/tests/file/filetype_variation2.phpt
@@ -7,8 +7,8 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip no /dev on Windows');
}
-if (!file_exists("/dev/console")) {
- die('skip /dev/console not available');
+if (!file_exists("/dev/null")) {
+ die('skip /dev/null not available');
}
?>
--FILE--
@@ -20,7 +20,7 @@ Description: Returns the type of the file. Possible values are fifo, char,
*/
echo "-- Checking for char --\n";
-print( filetype("/dev/console") )."\n";
+print( filetype("/dev/null") )."\n";
?>
===DONE===
--EXPECTF--
diff --git a/ext/standard/tests/file/fscanf.phpt b/ext/standard/tests/file/fscanf.phpt
index c37bdeb20a..003dd53dfa 100644
--- a/ext/standard/tests/file/fscanf.phpt
+++ b/ext/standard/tests/file/fscanf.phpt
@@ -7,7 +7,7 @@ $filename = dirname(__FILE__)."/fscanf.dat";
var_dump(fscanf());
var_dump(fscanf(array()));
-var_dump(fscanf(array(), array(), new stdclass));
+var_dump(fscanf(array(), array()));
file_put_contents($filename, "data");
diff --git a/ext/standard/tests/file/stream_rfc2397_002.phpt b/ext/standard/tests/file/stream_rfc2397_002.phpt
index 980863bb5c..1dce5adf6c 100644
--- a/ext/standard/tests/file/stream_rfc2397_002.phpt
+++ b/ext/standard/tests/file/stream_rfc2397_002.phpt
@@ -34,6 +34,8 @@ foreach($streams as $stream)
<?php exit(0); ?>
--EXPECTF--
array(7) {
+ ["base64"]=>
+ bool(false)
["wrapper_type"]=>
string(7) "RFC2397"
["stream_type"]=>
@@ -46,8 +48,6 @@ array(7) {
bool(true)
["uri"]=>
string(8) "data://,"
- ["base64"]=>
- bool(false)
}
NULL
@@ -55,6 +55,8 @@ Warning: fopen(data://): failed to open stream: rfc2397: no comma in URL in %sst
NULL
NULL
array(7) {
+ ["base64"]=>
+ bool(true)
["wrapper_type"]=>
string(7) "RFC2397"
["stream_type"]=>
@@ -67,8 +69,6 @@ array(7) {
bool(true)
["uri"]=>
string(15) "data://;base64,"
- ["base64"]=>
- bool(true)
}
NULL
@@ -84,6 +84,10 @@ Warning: fopen(data://foo=bar,): failed to open stream: rfc2397: illegal media t
NULL
NULL
array(8) {
+ ["mediatype"]=>
+ string(10) "text/plain"
+ ["base64"]=>
+ bool(false)
["wrapper_type"]=>
string(7) "RFC2397"
["stream_type"]=>
@@ -96,10 +100,6 @@ array(8) {
bool(true)
["uri"]=>
string(18) "data://text/plain,"
- ["mediatype"]=>
- string(10) "text/plain"
- ["base64"]=>
- bool(false)
}
NULL
@@ -107,6 +107,12 @@ Warning: fopen(data://text/plain;foo,): failed to open stream: rfc2397: illegal
NULL
NULL
array(9) {
+ ["mediatype"]=>
+ string(10) "text/plain"
+ ["foo"]=>
+ string(3) "bar"
+ ["base64"]=>
+ bool(false)
["wrapper_type"]=>
string(7) "RFC2397"
["stream_type"]=>
@@ -119,12 +125,6 @@ array(9) {
bool(true)
["uri"]=>
string(26) "data://text/plain;foo=bar,"
- ["mediatype"]=>
- string(10) "text/plain"
- ["foo"]=>
- string(3) "bar"
- ["base64"]=>
- bool(false)
}
string(3) "bar"
@@ -132,6 +132,12 @@ Warning: fopen(data://text/plain;foo=bar;bla,): failed to open stream: rfc2397:
NULL
NULL
array(9) {
+ ["mediatype"]=>
+ string(10) "text/plain"
+ ["foo"]=>
+ string(3) "bar"
+ ["base64"]=>
+ bool(true)
["wrapper_type"]=>
string(7) "RFC2397"
["stream_type"]=>
@@ -144,12 +150,6 @@ array(9) {
bool(true)
["uri"]=>
string(33) "data://text/plain;foo=bar;base64,"
- ["mediatype"]=>
- string(10) "text/plain"
- ["foo"]=>
- string(3) "bar"
- ["base64"]=>
- bool(true)
}
string(3) "bar"
@@ -157,6 +157,14 @@ Warning: fopen(data://text/plain;foo=bar;bar=baz): failed to open stream: rfc239
NULL
NULL
array(10) {
+ ["mediatype"]=>
+ string(10) "text/plain"
+ ["foo"]=>
+ string(3) "bar"
+ ["bar"]=>
+ string(3) "baz"
+ ["base64"]=>
+ bool(false)
["wrapper_type"]=>
string(7) "RFC2397"
["stream_type"]=>
@@ -169,14 +177,6 @@ array(10) {
bool(true)
["uri"]=>
string(34) "data://text/plain;foo=bar;bar=baz,"
- ["mediatype"]=>
- string(10) "text/plain"
- ["foo"]=>
- string(3) "bar"
- ["bar"]=>
- string(3) "baz"
- ["base64"]=>
- bool(false)
}
string(3) "bar"
===DONE===
diff --git a/ext/standard/tests/file/tempnam_variation2-win32.phpt b/ext/standard/tests/file/tempnam_variation2-win32.phpt
index 4224966daf..15d59614ff 100644
--- a/ext/standard/tests/file/tempnam_variation2-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation2-win32.phpt
@@ -121,6 +121,8 @@ File permissions are => 100666
File created in => directory specified
-- Iteration 7 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
@@ -131,11 +133,15 @@ File permissions are => 100666
File created in => directory specified
-- Iteration 9 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
-- Iteration 10 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
@@ -156,8 +162,10 @@ File permissions are => 100666
File created in => directory specified
-- Iteration 14 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
-*** Done *** \ No newline at end of file
+*** Done ***
diff --git a/ext/standard/tests/file/tempnam_variation2.phpt b/ext/standard/tests/file/tempnam_variation2.phpt
index b7e5cdc058..1a2de1885b 100644
--- a/ext/standard/tests/file/tempnam_variation2.phpt
+++ b/ext/standard/tests/file/tempnam_variation2.phpt
@@ -121,6 +121,8 @@ File permissions are => 100600
File created in => directory specified
-- Iteration 7 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2.php on line %d
File name is => %s/tempnam_variation2.tmp%s
File permissions are => 100600
File created in => temp dir
@@ -131,11 +133,15 @@ File permissions are => 100600
File created in => directory specified
-- Iteration 9 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2.php on line %d
File name is => %s/tempnam_variation2.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 10 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2.php on line %d
File name is => %s/tempnam_variation2.tmp%s
File permissions are => 100600
File created in => temp dir
@@ -156,8 +162,10 @@ File permissions are => 100600
File created in => directory specified
-- Iteration 14 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation2.php on line %d
File name is => %s/tempnam_variation2.tmp%s
File permissions are => 100600
File created in => temp dir
-*** Done *** \ No newline at end of file
+*** Done ***
diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt
index df0d88feda..6d5071b5e5 100644
--- a/ext/standard/tests/file/tempnam_variation3-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt
@@ -99,6 +99,8 @@ OK
-- Iteration 4 --
OK
-- Iteration 5 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation3-win32.php on line %d
Failed, not created in the correct directory %s vs %s
0
-- Iteration 6 --
diff --git a/ext/standard/tests/file/tempnam_variation4-0.phpt b/ext/standard/tests/file/tempnam_variation4-0.phpt
new file mode 100644
index 0000000000..e96846ff2c
--- /dev/null
+++ b/ext/standard/tests/file/tempnam_variation4-0.phpt
@@ -0,0 +1,638 @@
+--TEST--
+Test tempnam() function: usage variations - permissions(0000 to 0350) of dir
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not valid for Windows');
+}
+// Skip if being run by root
+$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip cannot be run as root');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype: string tempnam ( string $dir, string $prefix );
+ Description: Create file with unique file name.
+*/
+
+/* Trying to create the file in a dir with permissions from 0000 to 0350,
+ Allowable permissions: files are expected to be created in the input dir
+ Non-allowable permissions: files are expected to be created in '/tmp' dir
+*/
+
+echo "*** Testing tempnam() with dir of permissions from 0000 to 0350 ***\n";
+$file_path = dirname(__FILE__);
+$dir_name = $file_path."/tempnam_variation4";
+$prefix = "tempnamVar4.";
+
+mkdir($dir_name);
+
+for($mode = 0000; $mode <= 0350; $mode++) {
+ chmod($dir_name, $mode);
+ $file_name = tempnam($dir_name, $prefix);
+
+ if(file_exists($file_name) ) {
+ if (dirname($file_name) != $dir_name) {
+ /* Either there's a notice or error */
+ printf("%o\n", $mode);
+
+ if (realpath(dirname($file_name)) != realpath(sys_get_temp_dir())) {
+ echo " created in unexpected dir\n";
+ }
+ }
+ unlink($file_name);
+ }
+ else {
+ print("FAILED: File is not created\n");
+ }
+}
+
+rmdir($dir_name);
+
+echo "*** Done ***\n";
+?>
+--EXPECTF--
+*** Testing tempnam() with dir of permissions from 0000 to 0350 ***
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+0
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+1
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+2
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+3
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+4
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+5
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+6
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+7
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+10
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+11
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+12
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+13
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+14
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+15
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+16
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+17
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+20
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+21
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+22
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+23
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+24
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+25
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+26
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+27
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+30
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+31
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+32
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+33
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+34
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+35
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+36
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+37
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+40
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+41
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+42
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+43
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+44
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+45
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+46
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+47
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+50
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+51
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+52
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+53
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+54
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+55
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+56
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+57
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+60
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+61
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+62
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+63
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+64
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+65
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+66
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+67
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+70
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+71
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+72
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+73
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+74
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+75
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+76
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+77
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+100
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+101
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+102
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+103
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+104
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+105
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+106
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+107
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+110
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+111
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+112
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+113
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+114
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+115
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+116
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+117
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+120
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+121
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+122
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+123
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+124
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+125
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+126
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+127
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+130
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+131
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+132
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+133
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+134
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+135
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+136
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+137
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+140
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+141
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+142
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+143
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+144
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+145
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+146
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+147
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+150
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+151
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+152
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+153
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+154
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+155
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+156
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+157
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+160
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+161
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+162
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+163
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+164
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+165
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+166
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+167
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+170
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+171
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+172
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+173
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+174
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+175
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+176
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+177
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+200
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+201
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+202
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+203
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+204
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+205
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+206
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+207
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+210
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+211
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+212
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+213
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+214
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+215
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+216
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+217
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+220
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+221
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+222
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+223
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+224
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+225
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+226
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+227
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+230
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+231
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+232
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+233
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+234
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+235
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+236
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+237
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+240
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+241
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+242
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+243
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+244
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+245
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+246
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+247
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+250
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+251
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+252
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+253
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+254
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+255
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+256
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+257
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+260
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+261
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+262
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+263
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+264
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+265
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+266
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+267
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+270
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+271
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+272
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+273
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+274
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+275
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+276
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-0.php on line 20
+277
+*** Done ***
diff --git a/ext/standard/tests/file/tempnam_variation4-1.phpt b/ext/standard/tests/file/tempnam_variation4-1.phpt
new file mode 100644
index 0000000000..667d3ecda6
--- /dev/null
+++ b/ext/standard/tests/file/tempnam_variation4-1.phpt
@@ -0,0 +1,638 @@
+--TEST--
+Test tempnam() function: usage variations - permissions(0351 to 0777) of dir
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip Not valid for Windows');
+}
+// Skip if being run by root
+$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip cannot be run as root');
+}
+unlink($filename);
+?>
+--FILE--
+<?php
+/* Prototype: string tempnam ( string $dir, string $prefix );
+ Description: Create file with unique file name.
+*/
+
+/* Trying to create the file in a dir with permissions from 0351 to 0777,
+ Allowable permissions: files are expected to be created in the input dir
+ Non-allowable permissions: files are expected to be created in '/tmp' dir
+*/
+
+echo "*** Testing tempnam() with dir of permissions from 0351 to 0777 ***\n";
+$file_path = dirname(__FILE__);
+$dir_name = $file_path."/tempnam_variation4";
+$prefix = "tempnamVar4.";
+
+mkdir($dir_name);
+
+for($mode = 0351; $mode <= 0777; $mode++) {
+ chmod($dir_name, $mode);
+ $file_name = tempnam($dir_name, $prefix);
+
+ if(file_exists($file_name) ) {
+ if (dirname($file_name) != $dir_name) {
+ /* Either there's a notice or error */
+ printf("%o\n", $mode);
+
+ if (realpath(dirname($file_name)) != realpath(sys_get_temp_dir())) {
+ echo " created in unexpected dir\n";
+ }
+ }
+ unlink($file_name);
+ }
+ else {
+ print("FAILED: File is not created\n");
+ }
+}
+
+rmdir($dir_name);
+
+echo "*** Done ***\n";
+?>
+--EXPECTF--
+*** Testing tempnam() with dir of permissions from 0351 to 0777 ***
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+400
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+401
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+402
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+403
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+404
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+405
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+406
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+407
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+410
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+411
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+412
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+413
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+414
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+415
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+416
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+417
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+420
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+421
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+422
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+423
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+424
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+425
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+426
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+427
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+430
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+431
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+432
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+433
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+434
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+435
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+436
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+437
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+440
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+441
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+442
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+443
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+444
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+445
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+446
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+447
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+450
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+451
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+452
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+453
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+454
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+455
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+456
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+457
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+460
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+461
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+462
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+463
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+464
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+465
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+466
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+467
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+470
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+471
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+472
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+473
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+474
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+475
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+476
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+477
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+500
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+501
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+502
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+503
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+504
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+505
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+506
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+507
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+510
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+511
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+512
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+513
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+514
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+515
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+516
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+517
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+520
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+521
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+522
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+523
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+524
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+525
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+526
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+527
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+530
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+531
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+532
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+533
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+534
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+535
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+536
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+537
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+540
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+541
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+542
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+543
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+544
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+545
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+546
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+547
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+550
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+551
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+552
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+553
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+554
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+555
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+556
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+557
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+560
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+561
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+562
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+563
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+564
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+565
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+566
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+567
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+570
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+571
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+572
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+573
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+574
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+575
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+576
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+577
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+600
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+601
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+602
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+603
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+604
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+605
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+606
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+607
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+610
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+611
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+612
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+613
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+614
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+615
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+616
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+617
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+620
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+621
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+622
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+623
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+624
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+625
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+626
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+627
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+630
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+631
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+632
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+633
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+634
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+635
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+636
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+637
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+640
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+641
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+642
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+643
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+644
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+645
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+646
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+647
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+650
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+651
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+652
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+653
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+654
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+655
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+656
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+657
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+660
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+661
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+662
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+663
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+664
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+665
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+666
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+667
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+670
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+671
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+672
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+673
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+674
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+675
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+676
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation4-1.php on line 20
+677
+*** Done ***
diff --git a/ext/standard/tests/file/tempnam_variation4.phpt b/ext/standard/tests/file/tempnam_variation4.phpt
deleted file mode 100644
index 4ce1c7ec24..0000000000
--- a/ext/standard/tests/file/tempnam_variation4.phpt
+++ /dev/null
@@ -1,1092 +0,0 @@
---TEST--
-Test tempnam() function: usage variations - permissions(0000 to 0777) of dir
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip Not valid for Windows');
-}
-// Skip if being run by root
-$filename = dirname(__FILE__)."/is_readable_root_check.tmp";
-$fp = fopen($filename, 'w');
-fclose($fp);
-if(fileowner($filename) == 0) {
- unlink ($filename);
- die('skip cannot be run as root');
-}
-unlink($filename);
-?>
---FILE--
-<?php
-/* Prototype: string tempnam ( string $dir, string $prefix );
- Description: Create file with unique file name.
-*/
-
-/* Trying to create the file in a dir with permissions from 0000 to 0777,
- Allowable permissions: files are expected to be created in the input dir
- Non-allowable permissions: files are expected to be created in '/tmp' dir
-*/
-
-echo "*** Testing tempnam() with dir of permissions from 0000 to 0777 ***\n";
-$file_path = dirname(__FILE__);
-$dir_name = $file_path."/tempnam_variation4";
-$prefix = "tempnamVar4.";
-
-mkdir($dir_name);
-
-for($mode = 0000; $mode <= 0777; $mode++) {
- echo "-- dir perms ";
- printf("%o", $mode);
- echo " --\n";
- chmod($dir_name, $mode);
- $file_name = tempnam($dir_name, $prefix);
-
- if(file_exists($file_name) ) {
- if (realpath(dirname($file_name)) == realpath(sys_get_temp_dir())) {
- $msg = " created in temp dir ";
- }
- else if (dirname($file_name) == $dir_name) {
- $msg = " created in requested dir";
- }
- else {
- $msg = " created in unexpected dir";
- }
-
- echo $msg."\n";
- unlink($file_name);
- }
- else {
- print("FAILED: File is not created\n");
- }
-}
-
-rmdir($dir_name);
-
-echo "*** Done ***\n";
-?>
---EXPECTF--
-*** Testing tempnam() with dir of permissions from 0000 to 0777 ***
--- dir perms 0 --
- created in temp dir
--- dir perms 1 --
- created in temp dir
--- dir perms 2 --
- created in temp dir
--- dir perms 3 --
- created in temp dir
--- dir perms 4 --
- created in temp dir
--- dir perms 5 --
- created in temp dir
--- dir perms 6 --
- created in temp dir
--- dir perms 7 --
- created in temp dir
--- dir perms 10 --
- created in temp dir
--- dir perms 11 --
- created in temp dir
--- dir perms 12 --
- created in temp dir
--- dir perms 13 --
- created in temp dir
--- dir perms 14 --
- created in temp dir
--- dir perms 15 --
- created in temp dir
--- dir perms 16 --
- created in temp dir
--- dir perms 17 --
- created in temp dir
--- dir perms 20 --
- created in temp dir
--- dir perms 21 --
- created in temp dir
--- dir perms 22 --
- created in temp dir
--- dir perms 23 --
- created in temp dir
--- dir perms 24 --
- created in temp dir
--- dir perms 25 --
- created in temp dir
--- dir perms 26 --
- created in temp dir
--- dir perms 27 --
- created in temp dir
--- dir perms 30 --
- created in temp dir
--- dir perms 31 --
- created in temp dir
--- dir perms 32 --
- created in temp dir
--- dir perms 33 --
- created in temp dir
--- dir perms 34 --
- created in temp dir
--- dir perms 35 --
- created in temp dir
--- dir perms 36 --
- created in temp dir
--- dir perms 37 --
- created in temp dir
--- dir perms 40 --
- created in temp dir
--- dir perms 41 --
- created in temp dir
--- dir perms 42 --
- created in temp dir
--- dir perms 43 --
- created in temp dir
--- dir perms 44 --
- created in temp dir
--- dir perms 45 --
- created in temp dir
--- dir perms 46 --
- created in temp dir
--- dir perms 47 --
- created in temp dir
--- dir perms 50 --
- created in temp dir
--- dir perms 51 --
- created in temp dir
--- dir perms 52 --
- created in temp dir
--- dir perms 53 --
- created in temp dir
--- dir perms 54 --
- created in temp dir
--- dir perms 55 --
- created in temp dir
--- dir perms 56 --
- created in temp dir
--- dir perms 57 --
- created in temp dir
--- dir perms 60 --
- created in temp dir
--- dir perms 61 --
- created in temp dir
--- dir perms 62 --
- created in temp dir
--- dir perms 63 --
- created in temp dir
--- dir perms 64 --
- created in temp dir
--- dir perms 65 --
- created in temp dir
--- dir perms 66 --
- created in temp dir
--- dir perms 67 --
- created in temp dir
--- dir perms 70 --
- created in temp dir
--- dir perms 71 --
- created in temp dir
--- dir perms 72 --
- created in temp dir
--- dir perms 73 --
- created in temp dir
--- dir perms 74 --
- created in temp dir
--- dir perms 75 --
- created in temp dir
--- dir perms 76 --
- created in temp dir
--- dir perms 77 --
- created in temp dir
--- dir perms 100 --
- created in temp dir
--- dir perms 101 --
- created in temp dir
--- dir perms 102 --
- created in temp dir
--- dir perms 103 --
- created in temp dir
--- dir perms 104 --
- created in temp dir
--- dir perms 105 --
- created in temp dir
--- dir perms 106 --
- created in temp dir
--- dir perms 107 --
- created in temp dir
--- dir perms 110 --
- created in temp dir
--- dir perms 111 --
- created in temp dir
--- dir perms 112 --
- created in temp dir
--- dir perms 113 --
- created in temp dir
--- dir perms 114 --
- created in temp dir
--- dir perms 115 --
- created in temp dir
--- dir perms 116 --
- created in temp dir
--- dir perms 117 --
- created in temp dir
--- dir perms 120 --
- created in temp dir
--- dir perms 121 --
- created in temp dir
--- dir perms 122 --
- created in temp dir
--- dir perms 123 --
- created in temp dir
--- dir perms 124 --
- created in temp dir
--- dir perms 125 --
- created in temp dir
--- dir perms 126 --
- created in temp dir
--- dir perms 127 --
- created in temp dir
--- dir perms 130 --
- created in temp dir
--- dir perms 131 --
- created in temp dir
--- dir perms 132 --
- created in temp dir
--- dir perms 133 --
- created in temp dir
--- dir perms 134 --
- created in temp dir
--- dir perms 135 --
- created in temp dir
--- dir perms 136 --
- created in temp dir
--- dir perms 137 --
- created in temp dir
--- dir perms 140 --
- created in temp dir
--- dir perms 141 --
- created in temp dir
--- dir perms 142 --
- created in temp dir
--- dir perms 143 --
- created in temp dir
--- dir perms 144 --
- created in temp dir
--- dir perms 145 --
- created in temp dir
--- dir perms 146 --
- created in temp dir
--- dir perms 147 --
- created in temp dir
--- dir perms 150 --
- created in temp dir
--- dir perms 151 --
- created in temp dir
--- dir perms 152 --
- created in temp dir
--- dir perms 153 --
- created in temp dir
--- dir perms 154 --
- created in temp dir
--- dir perms 155 --
- created in temp dir
--- dir perms 156 --
- created in temp dir
--- dir perms 157 --
- created in temp dir
--- dir perms 160 --
- created in temp dir
--- dir perms 161 --
- created in temp dir
--- dir perms 162 --
- created in temp dir
--- dir perms 163 --
- created in temp dir
--- dir perms 164 --
- created in temp dir
--- dir perms 165 --
- created in temp dir
--- dir perms 166 --
- created in temp dir
--- dir perms 167 --
- created in temp dir
--- dir perms 170 --
- created in temp dir
--- dir perms 171 --
- created in temp dir
--- dir perms 172 --
- created in temp dir
--- dir perms 173 --
- created in temp dir
--- dir perms 174 --
- created in temp dir
--- dir perms 175 --
- created in temp dir
--- dir perms 176 --
- created in temp dir
--- dir perms 177 --
- created in temp dir
--- dir perms 200 --
- created in temp dir
--- dir perms 201 --
- created in temp dir
--- dir perms 202 --
- created in temp dir
--- dir perms 203 --
- created in temp dir
--- dir perms 204 --
- created in temp dir
--- dir perms 205 --
- created in temp dir
--- dir perms 206 --
- created in temp dir
--- dir perms 207 --
- created in temp dir
--- dir perms 210 --
- created in temp dir
--- dir perms 211 --
- created in temp dir
--- dir perms 212 --
- created in temp dir
--- dir perms 213 --
- created in temp dir
--- dir perms 214 --
- created in temp dir
--- dir perms 215 --
- created in temp dir
--- dir perms 216 --
- created in temp dir
--- dir perms 217 --
- created in temp dir
--- dir perms 220 --
- created in temp dir
--- dir perms 221 --
- created in temp dir
--- dir perms 222 --
- created in temp dir
--- dir perms 223 --
- created in temp dir
--- dir perms 224 --
- created in temp dir
--- dir perms 225 --
- created in temp dir
--- dir perms 226 --
- created in temp dir
--- dir perms 227 --
- created in temp dir
--- dir perms 230 --
- created in temp dir
--- dir perms 231 --
- created in temp dir
--- dir perms 232 --
- created in temp dir
--- dir perms 233 --
- created in temp dir
--- dir perms 234 --
- created in temp dir
--- dir perms 235 --
- created in temp dir
--- dir perms 236 --
- created in temp dir
--- dir perms 237 --
- created in temp dir
--- dir perms 240 --
- created in temp dir
--- dir perms 241 --
- created in temp dir
--- dir perms 242 --
- created in temp dir
--- dir perms 243 --
- created in temp dir
--- dir perms 244 --
- created in temp dir
--- dir perms 245 --
- created in temp dir
--- dir perms 246 --
- created in temp dir
--- dir perms 247 --
- created in temp dir
--- dir perms 250 --
- created in temp dir
--- dir perms 251 --
- created in temp dir
--- dir perms 252 --
- created in temp dir
--- dir perms 253 --
- created in temp dir
--- dir perms 254 --
- created in temp dir
--- dir perms 255 --
- created in temp dir
--- dir perms 256 --
- created in temp dir
--- dir perms 257 --
- created in temp dir
--- dir perms 260 --
- created in temp dir
--- dir perms 261 --
- created in temp dir
--- dir perms 262 --
- created in temp dir
--- dir perms 263 --
- created in temp dir
--- dir perms 264 --
- created in temp dir
--- dir perms 265 --
- created in temp dir
--- dir perms 266 --
- created in temp dir
--- dir perms 267 --
- created in temp dir
--- dir perms 270 --
- created in temp dir
--- dir perms 271 --
- created in temp dir
--- dir perms 272 --
- created in temp dir
--- dir perms 273 --
- created in temp dir
--- dir perms 274 --
- created in temp dir
--- dir perms 275 --
- created in temp dir
--- dir perms 276 --
- created in temp dir
--- dir perms 277 --
- created in temp dir
--- dir perms 300 --
- created in requested dir
--- dir perms 301 --
- created in requested dir
--- dir perms 302 --
- created in requested dir
--- dir perms 303 --
- created in requested dir
--- dir perms 304 --
- created in requested dir
--- dir perms 305 --
- created in requested dir
--- dir perms 306 --
- created in requested dir
--- dir perms 307 --
- created in requested dir
--- dir perms 310 --
- created in requested dir
--- dir perms 311 --
- created in requested dir
--- dir perms 312 --
- created in requested dir
--- dir perms 313 --
- created in requested dir
--- dir perms 314 --
- created in requested dir
--- dir perms 315 --
- created in requested dir
--- dir perms 316 --
- created in requested dir
--- dir perms 317 --
- created in requested dir
--- dir perms 320 --
- created in requested dir
--- dir perms 321 --
- created in requested dir
--- dir perms 322 --
- created in requested dir
--- dir perms 323 --
- created in requested dir
--- dir perms 324 --
- created in requested dir
--- dir perms 325 --
- created in requested dir
--- dir perms 326 --
- created in requested dir
--- dir perms 327 --
- created in requested dir
--- dir perms 330 --
- created in requested dir
--- dir perms 331 --
- created in requested dir
--- dir perms 332 --
- created in requested dir
--- dir perms 333 --
- created in requested dir
--- dir perms 334 --
- created in requested dir
--- dir perms 335 --
- created in requested dir
--- dir perms 336 --
- created in requested dir
--- dir perms 337 --
- created in requested dir
--- dir perms 340 --
- created in requested dir
--- dir perms 341 --
- created in requested dir
--- dir perms 342 --
- created in requested dir
--- dir perms 343 --
- created in requested dir
--- dir perms 344 --
- created in requested dir
--- dir perms 345 --
- created in requested dir
--- dir perms 346 --
- created in requested dir
--- dir perms 347 --
- created in requested dir
--- dir perms 350 --
- created in requested dir
--- dir perms 351 --
- created in requested dir
--- dir perms 352 --
- created in requested dir
--- dir perms 353 --
- created in requested dir
--- dir perms 354 --
- created in requested dir
--- dir perms 355 --
- created in requested dir
--- dir perms 356 --
- created in requested dir
--- dir perms 357 --
- created in requested dir
--- dir perms 360 --
- created in requested dir
--- dir perms 361 --
- created in requested dir
--- dir perms 362 --
- created in requested dir
--- dir perms 363 --
- created in requested dir
--- dir perms 364 --
- created in requested dir
--- dir perms 365 --
- created in requested dir
--- dir perms 366 --
- created in requested dir
--- dir perms 367 --
- created in requested dir
--- dir perms 370 --
- created in requested dir
--- dir perms 371 --
- created in requested dir
--- dir perms 372 --
- created in requested dir
--- dir perms 373 --
- created in requested dir
--- dir perms 374 --
- created in requested dir
--- dir perms 375 --
- created in requested dir
--- dir perms 376 --
- created in requested dir
--- dir perms 377 --
- created in requested dir
--- dir perms 400 --
- created in temp dir
--- dir perms 401 --
- created in temp dir
--- dir perms 402 --
- created in temp dir
--- dir perms 403 --
- created in temp dir
--- dir perms 404 --
- created in temp dir
--- dir perms 405 --
- created in temp dir
--- dir perms 406 --
- created in temp dir
--- dir perms 407 --
- created in temp dir
--- dir perms 410 --
- created in temp dir
--- dir perms 411 --
- created in temp dir
--- dir perms 412 --
- created in temp dir
--- dir perms 413 --
- created in temp dir
--- dir perms 414 --
- created in temp dir
--- dir perms 415 --
- created in temp dir
--- dir perms 416 --
- created in temp dir
--- dir perms 417 --
- created in temp dir
--- dir perms 420 --
- created in temp dir
--- dir perms 421 --
- created in temp dir
--- dir perms 422 --
- created in temp dir
--- dir perms 423 --
- created in temp dir
--- dir perms 424 --
- created in temp dir
--- dir perms 425 --
- created in temp dir
--- dir perms 426 --
- created in temp dir
--- dir perms 427 --
- created in temp dir
--- dir perms 430 --
- created in temp dir
--- dir perms 431 --
- created in temp dir
--- dir perms 432 --
- created in temp dir
--- dir perms 433 --
- created in temp dir
--- dir perms 434 --
- created in temp dir
--- dir perms 435 --
- created in temp dir
--- dir perms 436 --
- created in temp dir
--- dir perms 437 --
- created in temp dir
--- dir perms 440 --
- created in temp dir
--- dir perms 441 --
- created in temp dir
--- dir perms 442 --
- created in temp dir
--- dir perms 443 --
- created in temp dir
--- dir perms 444 --
- created in temp dir
--- dir perms 445 --
- created in temp dir
--- dir perms 446 --
- created in temp dir
--- dir perms 447 --
- created in temp dir
--- dir perms 450 --
- created in temp dir
--- dir perms 451 --
- created in temp dir
--- dir perms 452 --
- created in temp dir
--- dir perms 453 --
- created in temp dir
--- dir perms 454 --
- created in temp dir
--- dir perms 455 --
- created in temp dir
--- dir perms 456 --
- created in temp dir
--- dir perms 457 --
- created in temp dir
--- dir perms 460 --
- created in temp dir
--- dir perms 461 --
- created in temp dir
--- dir perms 462 --
- created in temp dir
--- dir perms 463 --
- created in temp dir
--- dir perms 464 --
- created in temp dir
--- dir perms 465 --
- created in temp dir
--- dir perms 466 --
- created in temp dir
--- dir perms 467 --
- created in temp dir
--- dir perms 470 --
- created in temp dir
--- dir perms 471 --
- created in temp dir
--- dir perms 472 --
- created in temp dir
--- dir perms 473 --
- created in temp dir
--- dir perms 474 --
- created in temp dir
--- dir perms 475 --
- created in temp dir
--- dir perms 476 --
- created in temp dir
--- dir perms 477 --
- created in temp dir
--- dir perms 500 --
- created in temp dir
--- dir perms 501 --
- created in temp dir
--- dir perms 502 --
- created in temp dir
--- dir perms 503 --
- created in temp dir
--- dir perms 504 --
- created in temp dir
--- dir perms 505 --
- created in temp dir
--- dir perms 506 --
- created in temp dir
--- dir perms 507 --
- created in temp dir
--- dir perms 510 --
- created in temp dir
--- dir perms 511 --
- created in temp dir
--- dir perms 512 --
- created in temp dir
--- dir perms 513 --
- created in temp dir
--- dir perms 514 --
- created in temp dir
--- dir perms 515 --
- created in temp dir
--- dir perms 516 --
- created in temp dir
--- dir perms 517 --
- created in temp dir
--- dir perms 520 --
- created in temp dir
--- dir perms 521 --
- created in temp dir
--- dir perms 522 --
- created in temp dir
--- dir perms 523 --
- created in temp dir
--- dir perms 524 --
- created in temp dir
--- dir perms 525 --
- created in temp dir
--- dir perms 526 --
- created in temp dir
--- dir perms 527 --
- created in temp dir
--- dir perms 530 --
- created in temp dir
--- dir perms 531 --
- created in temp dir
--- dir perms 532 --
- created in temp dir
--- dir perms 533 --
- created in temp dir
--- dir perms 534 --
- created in temp dir
--- dir perms 535 --
- created in temp dir
--- dir perms 536 --
- created in temp dir
--- dir perms 537 --
- created in temp dir
--- dir perms 540 --
- created in temp dir
--- dir perms 541 --
- created in temp dir
--- dir perms 542 --
- created in temp dir
--- dir perms 543 --
- created in temp dir
--- dir perms 544 --
- created in temp dir
--- dir perms 545 --
- created in temp dir
--- dir perms 546 --
- created in temp dir
--- dir perms 547 --
- created in temp dir
--- dir perms 550 --
- created in temp dir
--- dir perms 551 --
- created in temp dir
--- dir perms 552 --
- created in temp dir
--- dir perms 553 --
- created in temp dir
--- dir perms 554 --
- created in temp dir
--- dir perms 555 --
- created in temp dir
--- dir perms 556 --
- created in temp dir
--- dir perms 557 --
- created in temp dir
--- dir perms 560 --
- created in temp dir
--- dir perms 561 --
- created in temp dir
--- dir perms 562 --
- created in temp dir
--- dir perms 563 --
- created in temp dir
--- dir perms 564 --
- created in temp dir
--- dir perms 565 --
- created in temp dir
--- dir perms 566 --
- created in temp dir
--- dir perms 567 --
- created in temp dir
--- dir perms 570 --
- created in temp dir
--- dir perms 571 --
- created in temp dir
--- dir perms 572 --
- created in temp dir
--- dir perms 573 --
- created in temp dir
--- dir perms 574 --
- created in temp dir
--- dir perms 575 --
- created in temp dir
--- dir perms 576 --
- created in temp dir
--- dir perms 577 --
- created in temp dir
--- dir perms 600 --
- created in temp dir
--- dir perms 601 --
- created in temp dir
--- dir perms 602 --
- created in temp dir
--- dir perms 603 --
- created in temp dir
--- dir perms 604 --
- created in temp dir
--- dir perms 605 --
- created in temp dir
--- dir perms 606 --
- created in temp dir
--- dir perms 607 --
- created in temp dir
--- dir perms 610 --
- created in temp dir
--- dir perms 611 --
- created in temp dir
--- dir perms 612 --
- created in temp dir
--- dir perms 613 --
- created in temp dir
--- dir perms 614 --
- created in temp dir
--- dir perms 615 --
- created in temp dir
--- dir perms 616 --
- created in temp dir
--- dir perms 617 --
- created in temp dir
--- dir perms 620 --
- created in temp dir
--- dir perms 621 --
- created in temp dir
--- dir perms 622 --
- created in temp dir
--- dir perms 623 --
- created in temp dir
--- dir perms 624 --
- created in temp dir
--- dir perms 625 --
- created in temp dir
--- dir perms 626 --
- created in temp dir
--- dir perms 627 --
- created in temp dir
--- dir perms 630 --
- created in temp dir
--- dir perms 631 --
- created in temp dir
--- dir perms 632 --
- created in temp dir
--- dir perms 633 --
- created in temp dir
--- dir perms 634 --
- created in temp dir
--- dir perms 635 --
- created in temp dir
--- dir perms 636 --
- created in temp dir
--- dir perms 637 --
- created in temp dir
--- dir perms 640 --
- created in temp dir
--- dir perms 641 --
- created in temp dir
--- dir perms 642 --
- created in temp dir
--- dir perms 643 --
- created in temp dir
--- dir perms 644 --
- created in temp dir
--- dir perms 645 --
- created in temp dir
--- dir perms 646 --
- created in temp dir
--- dir perms 647 --
- created in temp dir
--- dir perms 650 --
- created in temp dir
--- dir perms 651 --
- created in temp dir
--- dir perms 652 --
- created in temp dir
--- dir perms 653 --
- created in temp dir
--- dir perms 654 --
- created in temp dir
--- dir perms 655 --
- created in temp dir
--- dir perms 656 --
- created in temp dir
--- dir perms 657 --
- created in temp dir
--- dir perms 660 --
- created in temp dir
--- dir perms 661 --
- created in temp dir
--- dir perms 662 --
- created in temp dir
--- dir perms 663 --
- created in temp dir
--- dir perms 664 --
- created in temp dir
--- dir perms 665 --
- created in temp dir
--- dir perms 666 --
- created in temp dir
--- dir perms 667 --
- created in temp dir
--- dir perms 670 --
- created in temp dir
--- dir perms 671 --
- created in temp dir
--- dir perms 672 --
- created in temp dir
--- dir perms 673 --
- created in temp dir
--- dir perms 674 --
- created in temp dir
--- dir perms 675 --
- created in temp dir
--- dir perms 676 --
- created in temp dir
--- dir perms 677 --
- created in temp dir
--- dir perms 700 --
- created in requested dir
--- dir perms 701 --
- created in requested dir
--- dir perms 702 --
- created in requested dir
--- dir perms 703 --
- created in requested dir
--- dir perms 704 --
- created in requested dir
--- dir perms 705 --
- created in requested dir
--- dir perms 706 --
- created in requested dir
--- dir perms 707 --
- created in requested dir
--- dir perms 710 --
- created in requested dir
--- dir perms 711 --
- created in requested dir
--- dir perms 712 --
- created in requested dir
--- dir perms 713 --
- created in requested dir
--- dir perms 714 --
- created in requested dir
--- dir perms 715 --
- created in requested dir
--- dir perms 716 --
- created in requested dir
--- dir perms 717 --
- created in requested dir
--- dir perms 720 --
- created in requested dir
--- dir perms 721 --
- created in requested dir
--- dir perms 722 --
- created in requested dir
--- dir perms 723 --
- created in requested dir
--- dir perms 724 --
- created in requested dir
--- dir perms 725 --
- created in requested dir
--- dir perms 726 --
- created in requested dir
--- dir perms 727 --
- created in requested dir
--- dir perms 730 --
- created in requested dir
--- dir perms 731 --
- created in requested dir
--- dir perms 732 --
- created in requested dir
--- dir perms 733 --
- created in requested dir
--- dir perms 734 --
- created in requested dir
--- dir perms 735 --
- created in requested dir
--- dir perms 736 --
- created in requested dir
--- dir perms 737 --
- created in requested dir
--- dir perms 740 --
- created in requested dir
--- dir perms 741 --
- created in requested dir
--- dir perms 742 --
- created in requested dir
--- dir perms 743 --
- created in requested dir
--- dir perms 744 --
- created in requested dir
--- dir perms 745 --
- created in requested dir
--- dir perms 746 --
- created in requested dir
--- dir perms 747 --
- created in requested dir
--- dir perms 750 --
- created in requested dir
--- dir perms 751 --
- created in requested dir
--- dir perms 752 --
- created in requested dir
--- dir perms 753 --
- created in requested dir
--- dir perms 754 --
- created in requested dir
--- dir perms 755 --
- created in requested dir
--- dir perms 756 --
- created in requested dir
--- dir perms 757 --
- created in requested dir
--- dir perms 760 --
- created in requested dir
--- dir perms 761 --
- created in requested dir
--- dir perms 762 --
- created in requested dir
--- dir perms 763 --
- created in requested dir
--- dir perms 764 --
- created in requested dir
--- dir perms 765 --
- created in requested dir
--- dir perms 766 --
- created in requested dir
--- dir perms 767 --
- created in requested dir
--- dir perms 770 --
- created in requested dir
--- dir perms 771 --
- created in requested dir
--- dir perms 772 --
- created in requested dir
--- dir perms 773 --
- created in requested dir
--- dir perms 774 --
- created in requested dir
--- dir perms 775 --
- created in requested dir
--- dir perms 776 --
- created in requested dir
--- dir perms 777 --
- created in requested dir
-*** Done ***
diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt
index 0c8caca95c..918ef36588 100644
--- a/ext/standard/tests/file/tempnam_variation7-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt
@@ -65,10 +65,14 @@ echo "\n*** Done ***\n";
--EXPECTF--
*** Testing tempnam() with invalid/non-existing directory names ***
-- Iteration 0 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- Iteration 1 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
@@ -85,6 +89,8 @@ File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- Iteration 5 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
@@ -101,10 +107,14 @@ Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on
Warning: unlink(): %r(Invalid argument|No such file or directory)%r in %s on line %d
-- Iteration 8 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- Iteration 9 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt
index b6f81caabc..d24c1d8974 100644
--- a/ext/standard/tests/file/tempnam_variation7.phpt
+++ b/ext/standard/tests/file/tempnam_variation7.phpt
@@ -70,10 +70,14 @@ echo "\n*** Done ***\n";
--EXPECTF--
*** Testing tempnam() with invalid/non-existing directory names ***
-- Iteration 0 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 1 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
@@ -90,6 +94,8 @@ File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 5 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
@@ -106,10 +112,14 @@ Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on
Warning: unlink(): %s in %s on line %d
-- Iteration 8 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s/tempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 9 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
File name is => %s/tempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
diff --git a/ext/standard/tests/file/tempnam_variation8-win32.phpt b/ext/standard/tests/file/tempnam_variation8-win32.phpt
index 8df67b609e..52ff7b9daa 100644
--- a/ext/standard/tests/file/tempnam_variation8-win32.phpt
+++ b/ext/standard/tests/file/tempnam_variation8-win32.phpt
@@ -115,11 +115,15 @@ File permissions are => 100666
File created in => directory specified
-- Iteration 6 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation8-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
-- Iteration 7 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation8-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
@@ -140,6 +144,8 @@ File permissions are => 100666
File created in => directory specified
-- Iteration 11 --
+
+Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation8-win32.php on line %d
File name is => %s\t%s
File permissions are => 100666
File created in => temp dir
diff --git a/ext/standard/tests/general_functions/bug70018.phpt b/ext/standard/tests/general_functions/bug70018.phpt
new file mode 100644
index 0000000000..d4c38b9d8a
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug70018.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #70018 (exec does not strip all whitespace)
+--SKIPIF--
+<?php
+if ("cli" != php_sapi_name()) {
+ die("skip.. CLI only test");
+}
+?>
+--FILE--
+<?php
+$output = array();
+
+$test_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid());
+file_put_contents($test_fl, '<?php echo "abc\f\n \n";');
+
+exec(PHP_BINARY . " -n $test_fl", $output);
+
+var_dump($output);
+
+@unlink($test_fl);
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(3) "abc"
+ [1]=>
+ string(0) ""
+}
diff --git a/ext/standard/tests/general_functions/bug70157.phpt b/ext/standard/tests/general_functions/bug70157.phpt
new file mode 100644
index 0000000000..f593682051
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug70157.phpt
@@ -0,0 +1,29 @@
+--TEST--
+parse_ini_string() crashes on values starting with number or unquoted strings
+--FILE--
+<?php
+
+$contents = <<<EOS
+[agatha.christie]
+title = 10 little indians
+foo[123] = E_ALL & ~E_DEPRECATED
+foo[456] = 123
+EOS;
+
+var_dump(parse_ini_string($contents, false, INI_SCANNER_TYPED));
+
+?>
+Done
+--EXPECTF--
+array(%d) {
+ ["title"]=>
+ string(%d) "10 little indians"
+ ["foo"]=>
+ array(%d) {
+ [123]=>
+ string(%d) "24575"
+ [456]=>
+ int(123)
+ }
+}
+Done
diff --git a/ext/standard/tests/general_functions/bug70249.phpt b/ext/standard/tests/general_functions/bug70249.phpt
new file mode 100644
index 0000000000..743df83ba0
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug70249.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)
+--FILE--
+<?php
+
+class Logger {
+ public function __construct() {
+ register_shutdown_function(function () {
+ // make regular flush before other shutdown functions, which allows session data collection and so on
+ $this->flush();
+ // make sure log entries written by shutdown functions are also flushed
+ // ensure "flush()" is called last when there are multiple shutdown functions
+ register_shutdown_function([$this, 'flush'], true);
+ });
+ }
+
+ public function flush($final = false) {
+ return 1;
+ }
+}
+
+for ($i = 0; $i < 200; $i++) {
+ $a = new Logger();
+}
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/standard/tests/general_functions/bug70947.phpt b/ext/standard/tests/general_functions/bug70947.phpt
new file mode 100644
index 0000000000..d07e5a331f
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug70947.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #70947 (INI parser segfault with INI_SCANNER_TYPED)
+--FILE--
+<?php
+$o = parse_ini_string('foo = bar 123', FALSE, INI_SCANNER_TYPED);
+var_dump($o);
+?>
+--EXPECT--
+array(1) {
+ ["foo"]=>
+ string(7) "bar 123"
+}
diff --git a/ext/standard/tests/general_functions/bug71891.phpt b/ext/standard/tests/general_functions/bug71891.phpt
new file mode 100644
index 0000000000..b1f7e200d8
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug71891.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #71891 (header_register_callback() and register_shutdown_function())
+--FILE--
+<?php
+
+header_register_callback(function () {
+ echo 'header';
+ register_shutdown_function(function () {
+ echo 'shutdown';
+ });
+});
+?>
+--EXPECT--
+header
diff --git a/ext/standard/tests/general_functions/bug72300.phpt b/ext/standard/tests/general_functions/bug72300.phpt
new file mode 100644
index 0000000000..94d1f20f8a
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug72300.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #72300 (ignore_user_abort(false) has no effect)
+--INI--
+ignore_user_abort=0
+--FILE--
+<?php
+
+var_dump(ignore_user_abort(true));
+var_dump(ignore_user_abort());
+var_dump(ini_get("ignore_user_abort"));
+var_dump(ignore_user_abort(false));
+var_dump(ignore_user_abort());
+var_dump(ini_get("ignore_user_abort"));
+
+?>
+--EXPECT--
+int(0)
+int(1)
+string(1) "1"
+int(1)
+int(0)
+string(1) "0"
diff --git a/ext/standard/tests/general_functions/connection_aborted.phpt b/ext/standard/tests/general_functions/connection_aborted.phpt
new file mode 100644
index 0000000000..79618c2aa1
--- /dev/null
+++ b/ext/standard/tests/general_functions/connection_aborted.phpt
@@ -0,0 +1,10 @@
+--TEST--
+int connection_aborted ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--FILE--
+<?php
+var_dump(connection_aborted());
+?>
+--EXPECTF--
+int(0)
diff --git a/ext/standard/tests/general_functions/connection_status.phpt b/ext/standard/tests/general_functions/connection_status.phpt
new file mode 100644
index 0000000000..5e0677fe27
--- /dev/null
+++ b/ext/standard/tests/general_functions/connection_status.phpt
@@ -0,0 +1,10 @@
+--TEST--
+int connection_status ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--FILE--
+<?php
+var_dump(connection_status() == CONNECTION_NORMAL);
+?>
+--EXPECTF--
+bool(true)
diff --git a/ext/standard/tests/general_functions/debug_zval_dump_b.phpt b/ext/standard/tests/general_functions/debug_zval_dump_b.phpt
index 00ec7a88a4..ec8e0a66ed 100644
--- a/ext/standard/tests/general_functions/debug_zval_dump_b.phpt
+++ b/ext/standard/tests/general_functions/debug_zval_dump_b.phpt
Binary files differ
diff --git a/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt b/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt
index 00180da1ac..4fe2f4c95b 100644
--- a/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt
+++ b/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt
Binary files differ
diff --git a/ext/standard/tests/general_functions/debug_zval_dump_o.phpt b/ext/standard/tests/general_functions/debug_zval_dump_o.phpt
index 1f2b7e155d..c06dff556d 100644
--- a/ext/standard/tests/general_functions/debug_zval_dump_o.phpt
+++ b/ext/standard/tests/general_functions/debug_zval_dump_o.phpt
@@ -120,36 +120,36 @@ echo "Done\n";
-- Iteration 1 --
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -161,44 +161,44 @@ object(no_member_class)#%d (0) refcount(%d){
-- Iteration 3 --
object(contains_object_class)#%d (9) refcount(%d){
["p"]=>
- long(30)
+ int(30)
["p1":protected]=>
- long(40)
+ int(40)
["p2":"contains_object_class":private]=>
- long(50)
+ int(50)
["class_object1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -207,36 +207,36 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object2"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -245,36 +245,36 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object3":"contains_object_class":private]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -283,36 +283,36 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object4":protected]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -324,44 +324,44 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object5"]=>
object(contains_object_class)#%d (9) refcount(%d){
["p"]=>
- long(30)
+ int(30)
["p1":protected]=>
- long(40)
+ int(40)
["p2":"contains_object_class":private]=>
- long(50)
+ int(50)
["class_object1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -370,36 +370,36 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object2"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -408,36 +408,36 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object3":"contains_object_class":private]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -446,36 +446,36 @@ object(contains_object_class)#%d (9) refcount(%d){
["class_object4":protected]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -491,36 +491,36 @@ object(contains_object_class)#%d (9) refcount(%d){
-- Iteration 4 --
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -529,36 +529,36 @@ object(object_class)#%d (6) refcount(%d){
-- Iteration 5 --
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -572,36 +572,36 @@ NULL
-- Iteration 8 --
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -610,121 +610,121 @@ object(object_class)#%d (6) refcount(%d){
-- Iteration 9 --
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (6) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
}
}
-- Iteration 10 --
-long(30)
+int(30)
-- Iteration 11 --
NULL
-- Testing debug_zval_dump() on overwritten object variables --
-long(500)
-long(500)
-long(500)
-long(500)
+int(500)
+int(500)
+int(500)
+int(500)
-- Testing debug_zval_dump() on objects having circular reference --
object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
["obj"]=>
&object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -738,55 +738,55 @@ object(object_class)#%d (7) refcount(%d){
["obj"]=>
&object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
["obj"]=>
&object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
@@ -797,38 +797,38 @@ object(object_class)#%d (7) refcount(%d){
["obj"]=>
&object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
["obj"]=>
&object(object_class)#%d (7) refcount(%d){
["value1"]=>
- long(5)
+ int(5)
["value2":"object_class":private]=>
- long(10)
+ int(10)
["value3":protected]=>
- long(20)
+ int(20)
["value4"]=>
- long(30)
+ int(30)
["array_var"]=>
array(2) refcount(%d){
["key1"]=>
- long(1)
+ int(1)
["key2 "]=>
- long(3)
+ int(3)
}
["object_class1"]=>
*RECURSION*
diff --git a/ext/standard/tests/general_functions/debug_zval_dump_v.phpt b/ext/standard/tests/general_functions/debug_zval_dump_v.phpt
index f4b768a77e..849d8b492c 100644
--- a/ext/standard/tests/general_functions/debug_zval_dump_v.phpt
+++ b/ext/standard/tests/general_functions/debug_zval_dump_v.phpt
@@ -124,27 +124,27 @@ echo "Done\n";
--- Variation 1: global variable inside a function ---
-- Value of global variable, before calling dump_globalvar() --
-long(10)
+int(10)
-- Value of local variable inside dump_globalvar() --
-long(10)
+int(10)
-- Value of global variable inside dump_globalvar() --
-long(10)
+int(10)
-- Value of global variable, after exiting dump_globalvar() --
-long(10)
+int(10)
--- Variation 2: one variable references another ---
-- Value of $first_var: --
-long(10)
+int(10)
-- Value of $ref_first_var --
NULL
-- Value of $first_var --
-long(10)
+int(10)
-- Value of $ref_first_var --
@@ -152,18 +152,18 @@ Notice: Undefined variable: ref_first_var in %s on line %d
NULL
-- Value of $first_var --
-long(10)
+int(10)
--- Variation 3: multiple references of variables ---
-- Value of $var_1: (before referencing) --
-long(10)
+int(10)
-- Value of $var_2: (referencing var_1) --
-long(10)
+int(10)
-- Value of $var_3: (referencing var_2) --
-long(10)
+int(10)
-- Value of $var_3: (after unsetting var_3) --
@@ -171,10 +171,10 @@ Notice: Undefined variable: var_3 in %s on line %d
NULL
-- Value of $var_2: --
-long(10)
+int(10)
-- Value of $var_3: --
-long(10)
+int(10)
-- Value of $var_1: (after unsetting variable_1) --
@@ -182,7 +182,7 @@ Notice: Undefined variable: var_1 in %s on line %d
NULL
-- Value of $var_2: --
-long(10)
+int(10)
*** Testing debug_zval_dump() on miscelleneous input arguments ***
-- Iteration 1 --
diff --git a/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt b/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt
new file mode 100644
index 0000000000..cbb3f6fcc4
--- /dev/null
+++ b/ext/standard/tests/general_functions/escapeshellarg_bug71039.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Test escapeshellarg() string with \0 bytes
+--FILE--
+<?php
+escapeshellarg("hello\0world");
+
+?>
+===DONE===
+--EXPECTF--
+Fatal error: escapeshellarg(): Input string contains NULL bytes in %s on line %d
diff --git a/ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt b/ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt
new file mode 100644
index 0000000000..c57da3691c
--- /dev/null
+++ b/ext/standard/tests/general_functions/escapeshellarg_bug71270.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test escapeshellarg() allowed argument length
+--FILE--
+<?php
+ini_set('memory_limit', -1);
+$var_2 = str_repeat('A', 1024*1024*64);
+escapeshellarg($var_2);
+
+?>
+===DONE===
+--EXPECTF--
+Fatal error: escapeshellarg(): Argument exceeds the allowed length of %d bytes in %s on line %d
diff --git a/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt b/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt
new file mode 100644
index 0000000000..0a4d7eacff
--- /dev/null
+++ b/ext/standard/tests/general_functions/escapeshellcmd_bug71039.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Test escapeshellcmd() string with \0 bytes
+--FILE--
+<?php
+escapeshellcmd("hello\0world");
+
+?>
+===DONE===
+--EXPECTF--
+Fatal error: escapeshellcmd(): Input string contains NULL bytes in %s on line %d
diff --git a/ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt b/ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt
new file mode 100644
index 0000000000..4686193d41
--- /dev/null
+++ b/ext/standard/tests/general_functions/escapeshellcmd_bug71270.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test escapeshellcmd() allowed argument length
+--FILE--
+<?php
+ini_set('memory_limit', -1);
+$var_2 = str_repeat('A', 1024*1024*64);
+escapeshellcmd($var_2);
+
+?>
+===DONE===
+--EXPECTF--
+Fatal error: escapeshellcmd(): Command exceeds the allowed length of %d bytes in %s on line %d
diff --git a/ext/standard/tests/general_functions/floatval.phpt b/ext/standard/tests/general_functions/floatval.phpt
index 9b7a3281e4..d7bdffd6ae 100644
--- a/ext/standard/tests/general_functions/floatval.phpt
+++ b/ext/standard/tests/general_functions/floatval.phpt
@@ -155,6 +155,10 @@ float(5000000)
float(-5000000)
*** Testing floatval() on non floating types ***
+
+Notice: A non well formed numeric value encountered in %s on line 69
+
+Notice: A non well formed numeric value encountered in %s on line 70
float(-2147483648)
float(2147483648)
float(%d)
diff --git a/ext/standard/tests/general_functions/floatval_variation1.phpt b/ext/standard/tests/general_functions/floatval_variation1.phpt
index 83925b89b0..aa808cfba1 100644
--- a/ext/standard/tests/general_functions/floatval_variation1.phpt
+++ b/ext/standard/tests/general_functions/floatval_variation1.phpt
@@ -52,6 +52,11 @@ foreach ($not_float_types as $key => $type ) {
?>
===DONE===
--EXPECTF--
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
+Notice: A non well formed numeric value encountered in %s on line %d
+
*** Testing floatval() on non floating types ***
-- Iteration : -2147483648 --
@@ -151,4 +156,4 @@ float(0)
-- Iteration : null --
float(0)
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/standard/tests/general_functions/getenv.phpt b/ext/standard/tests/general_functions/getenv.phpt
new file mode 100644
index 0000000000..006378a337
--- /dev/null
+++ b/ext/standard/tests/general_functions/getenv.phpt
@@ -0,0 +1,16 @@
+--TEST--
+getenv() basic tests
+--ENV--
+FOO=bar
+--FILE--
+<?php
+
+var_dump(getenv("FOO"));
+var_dump(getenv()["FOO"]);
+
+echo "Done\n";
+?>
+--EXPECTF--
+string(3) "bar"
+string(3) "bar"
+Done
diff --git a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
index 2242952769..18b05b6a97 100644
--- a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
@@ -282,7 +282,7 @@ string(7) "integer"
-- Iteration 18 --
string(6) "string"
bool(true)
-int(1)
+int(100)
string(7) "integer"
-- Iteration 19 --
string(6) "string"
@@ -297,7 +297,7 @@ string(7) "integer"
-- Iteration 21 --
string(6) "string"
bool(true)
-int(-1)
+int(0)
string(7) "integer"
-- Iteration 22 --
string(6) "string"
@@ -312,7 +312,7 @@ string(7) "integer"
-- Iteration 24 --
string(6) "string"
bool(true)
-int(1)
+int(100)
string(7) "integer"
-- Iteration 25 --
string(6) "string"
@@ -327,7 +327,7 @@ string(7) "integer"
-- Iteration 27 --
string(6) "string"
bool(true)
-int(-1)
+int(0)
string(7) "integer"
-- Iteration 28 --
string(6) "string"
@@ -687,7 +687,7 @@ string(7) "integer"
-- Iteration 18 --
string(6) "string"
bool(true)
-int(1)
+int(100)
string(7) "integer"
-- Iteration 19 --
string(6) "string"
@@ -702,7 +702,7 @@ string(7) "integer"
-- Iteration 21 --
string(6) "string"
bool(true)
-int(-1)
+int(0)
string(7) "integer"
-- Iteration 22 --
string(6) "string"
@@ -717,7 +717,7 @@ string(7) "integer"
-- Iteration 24 --
string(6) "string"
bool(true)
-int(1)
+int(100)
string(7) "integer"
-- Iteration 25 --
string(6) "string"
@@ -732,7 +732,7 @@ string(7) "integer"
-- Iteration 27 --
string(6) "string"
bool(true)
-int(-1)
+int(0)
string(7) "integer"
-- Iteration 28 --
string(6) "string"
diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt
index 01ee023e5c..e5b630a839 100644
--- a/ext/standard/tests/general_functions/print_r.phpt
+++ b/ext/standard/tests/general_functions/print_r.phpt
@@ -442,9 +442,9 @@ Array
*** Testing print_r() on float variables ***
-- Iteration 1 --
-0
-0
-0
+-0
+-0
+-0
-- Iteration 2 --
0
0
@@ -1605,7 +1605,7 @@ Array
-- Iteration 4 --
Array
(
- [0] => 0
+ [0] => -0
[1] => Where am I?
[2] => Array
(
@@ -1621,7 +1621,7 @@ Array
Array
(
- [0] => 0
+ [0] => -0
[1] => Where am I?
[2] => Array
(
@@ -1637,7 +1637,7 @@ Array
Array
(
- [0] => 0
+ [0] => -0
[1] => Where am I?
[2] => Array
(
diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt
index d62b3f9790..40f44ea1e4 100644
--- a/ext/standard/tests/general_functions/print_r_64bit.phpt
+++ b/ext/standard/tests/general_functions/print_r_64bit.phpt
@@ -443,9 +443,9 @@ Array
*** Testing print_r() on float variables ***
-- Iteration 1 --
-0
-0
-0
+-0
+-0
+-0
-- Iteration 2 --
0
0
@@ -1606,7 +1606,7 @@ Array
-- Iteration 4 --
Array
(
- [0] => 0
+ [0] => -0
[1] => Where am I?
[2] => Array
(
@@ -1622,7 +1622,7 @@ Array
Array
(
- [0] => 0
+ [0] => -0
[1] => Where am I?
[2] => Array
(
@@ -1638,7 +1638,7 @@ Array
Array
(
- [0] => 0
+ [0] => -0
[1] => Where am I?
[2] => Array
(
diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt
index be8c648d3a..9821e95eaa 100644
--- a/ext/standard/tests/general_functions/var_dump.phpt
+++ b/ext/standard/tests/general_functions/var_dump.phpt
@@ -368,7 +368,7 @@ float(-2147483648)
*** Testing var_dump() on float variables ***
-- Iteration 1 --
-float(0)
+float(-0)
-- Iteration 2 --
float(0)
-- Iteration 3 --
@@ -893,7 +893,7 @@ array(4) {
-- Iteration 4 --
array(6) {
[0]=>
- float(0)
+ float(-0)
[1]=>
string(11) "Where am I?"
[2]=>
@@ -1022,7 +1022,7 @@ array(15) {
}
array(32) {
[0]=>
- float(0)
+ float(-0)
[1]=>
float(0)
[2]=>
@@ -1519,7 +1519,7 @@ array(6) {
[3]=>
array(6) {
[0]=>
- float(0)
+ float(-0)
[1]=>
string(11) "Where am I?"
[2]=>
diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt
index 3672357936..6bbbb3f51d 100644
--- a/ext/standard/tests/general_functions/var_dump_64bit.phpt
+++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt
@@ -368,7 +368,7 @@ int(-2147483648)
*** Testing var_dump() on float variables ***
-- Iteration 1 --
-float(0)
+float(-0)
-- Iteration 2 --
float(0)
-- Iteration 3 --
@@ -893,7 +893,7 @@ array(4) {
-- Iteration 4 --
array(6) {
[0]=>
- float(0)
+ float(-0)
[1]=>
string(11) "Where am I?"
[2]=>
@@ -1022,7 +1022,7 @@ array(15) {
}
array(32) {
[0]=>
- float(0)
+ float(-0)
[1]=>
float(0)
[2]=>
@@ -1519,7 +1519,7 @@ array(6) {
[3]=>
array(6) {
[0]=>
- float(0)
+ float(-0)
[1]=>
string(11) "Where am I?"
[2]=>
diff --git a/ext/standard/tests/general_functions/var_export-locale.phpt b/ext/standard/tests/general_functions/var_export-locale.phpt
index 1cadb4aa55..47dfcbb3ee 100644
--- a/ext/standard/tests/general_functions/var_export-locale.phpt
+++ b/ext/standard/tests/general_functions/var_export-locale.phpt
@@ -30,12 +30,12 @@ $valid_ints = array(
'0x12ab',
'0Xfff',
'0XFA',
- -0x80000000, // max negative integer as hexadecimal
+ -0x7fffffff - 1, // max negative integer as hexadecimal
'0x7fffffff', // max positive integer as hexadecimal
0x7FFFFFFF, // max positive integer as hexadecimal
'0123', // integer as octal
01, // should be quivalent to octal 1
- -020000000000, // max negative integer as octal
+ -017777777777 - 1, // max negative integer as octal
017777777777, // max positive integer as octal
);
$counter = 1;
@@ -79,12 +79,12 @@ $counter++;
echo "*** Testing var_export() with valid float values ***\n";
// different valid float vlaues
$valid_floats = array(
- -2147483649, // float value
- 2147483648, // float value
- -0x80000001, // float value, beyond max negative int
- 0x800000001, // float value, beyond max positive int
- 020000000001, // float value, beyond max positive int
- -020000000001, // float value, beyond max negative int
+ (float)-2147483649, // float value
+ (float)2147483648, // float value
+ (float)-0x80000001, // float value, beyond max negative int
+ (float)0x800000001, // float value, beyond max positive int
+ (float)020000000001, // float value, beyond max positive int
+ (float)-020000000001, // float value, beyond max negative int
0.0,
-0.1,
10.0000000000000000005,
@@ -103,7 +103,7 @@ $valid_floats = array(
$counter = 1;
/* Loop to check for above float values with var_export() */
echo "\n*** Output for float values ***\n";
-foreach($valid_bool as $float_value) {
+foreach($valid_floats as $float_value) {
echo "\nIteration ".$counter."\n";
var_export( $float_value );
echo "\n";
@@ -467,39 +467,123 @@ string(5) "false"
*** Output for float values ***
Iteration 1
-1
-1
-string(1) "1"
+-2147483649.0
+-2147483649.0
+string(13) "-2147483649.0"
Iteration 2
-true
-true
-string(4) "true"
+2147483648.0
+2147483648.0
+string(12) "2147483648.0"
Iteration 3
-true
-true
-string(4) "true"
+-2147483649.0
+-2147483649.0
+string(13) "-2147483649.0"
Iteration 4
-0
-0
-string(1) "0"
+34359738369.0
+34359738369.0
+string(13) "34359738369.0"
Iteration 5
-false
-false
-string(5) "false"
+2147483649.0
+2147483649.0
+string(12) "2147483649.0"
Iteration 6
-false
-false
-string(5) "false"
+-2147483649.0
+-2147483649.0
+string(13) "-2147483649.0"
+
+
+Iteration 7
+0.0
+0.0
+string(3) "0.0"
+
+
+Iteration 8
+-0.10000000000000001
+-0.10000000000000001
+string(20) "-0.10000000000000001"
+
+
+Iteration 9
+10.0
+10.0
+string(4) "10.0"
+
+
+Iteration 10
+1050000.0
+1050000.0
+string(9) "1050000.0"
+
+
+Iteration 11
+100000.0
+100000.0
+string(8) "100000.0"
+
+
+Iteration 12
+1.0000000000000001E-5
+1.0000000000000001E-5
+string(21) "1.0000000000000001E-5"
+
+
+Iteration 13
+100000.0
+100000.0
+string(8) "100000.0"
+
+
+Iteration 14
+100000.0
+100000.0
+string(8) "100000.0"
+
+
+Iteration 15
+100000.0
+100000.0
+string(8) "100000.0"
+
+
+Iteration 16
+1.0000000000000001E-5
+1.0000000000000001E-5
+string(21) "1.0000000000000001E-5"
+
+
+Iteration 17
+5000000.0
+5000000.0
+string(9) "5000000.0"
+
+
+Iteration 18
+6.0000000000000006E-20
+6.0000000000000006E-20
+string(22) "6.0000000000000006E-20"
+
+
+Iteration 19
+5.0000000000000001E+42
+5.0000000000000001E+42
+string(22) "5.0000000000000001E+42"
+
+
+Iteration 20
+3.4000000000000001E-33
+3.4000000000000001E-33
+string(22) "3.4000000000000001E-33"
*** Testing var_export() with valid strings ***
diff --git a/ext/standard/tests/general_functions/var_export_basic1.phpt b/ext/standard/tests/general_functions/var_export_basic1.phpt
index cba04b8507..5f7b89124c 100644
--- a/ext/standard/tests/general_functions/var_export_basic1.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic1.phpt
@@ -22,12 +22,12 @@ $valid_ints = array(
"'0x12ab'" => '0x12ab',
"'0Xfff'" => '0Xfff',
"'0XFA'" => '0XFA',
- "-0x80000000" => -0x80000000, // max negative integer as hexadecimal
+ "-0x80000000" => -0x7FFFFFFF - 1, // max negative integer as hexadecimal
"'0x7fffffff'" => '0x7fffffff', // max positive integer as hexadecimal
"0x7FFFFFFF" => 0x7FFFFFFF, // max positive integer as hexadecimal
"'0123'" => '0123', // integer as octal
"01912" => 01, // should be quivalent to octal 1
- "-020000000000" => -020000000000, // max negative integer as octal
+ "-020000000000" => -017777777777 - 1, // max negative integer as octal
"017777777777" => 017777777777, // max positive integer as octal
);
diff --git a/ext/standard/tests/general_functions/var_export_basic3.phpt b/ext/standard/tests/general_functions/var_export_basic3.phpt
index 58c0448167..35692ad627 100644
--- a/ext/standard/tests/general_functions/var_export_basic3.phpt
+++ b/ext/standard/tests/general_functions/var_export_basic3.phpt
@@ -13,12 +13,12 @@ serialize_precision=17
echo "*** Testing var_export() with valid float values ***\n";
// different valid float vlaues
$valid_floats = array(
- "-2147483649" => -2147483649, // float value
- "2147483648" => 2147483648, // float value
- "-0x80000001" => -0x80000001, // float value, beyond max negative int
- "0x800000001" => 0x800000001, // float value, beyond max positive int
- "020000000001" => 020000000001, // float value, beyond max positive int
- "-020000000001" => -020000000001, // float value, beyond max negative int
+ "-2147483649" => (float)-2147483649, // float value
+ "2147483648" => (float)2147483648, // float value
+ "-0x80000001" => (float)-0x80000001, // float value, beyond max negative int
+ "0x800000001" => (float)0x800000001, // float value, beyond max positive int
+ "020000000001" => (float)020000000001, // float value, beyond max positive int
+ "-020000000001" => (float)-020000000001, // float value, beyond max negative int
"0.0" => 0.0,
"-0.1" => -0.1,
"10.0000000000000000005" => 10.0000000000000000005,
@@ -54,45 +54,45 @@ foreach($valid_floats as $key => $float_value) {
*** Output for float values ***
-- Iteration: -2147483649 --
--2147483649
--2147483649
-string(11) "-2147483649"
+-2147483649.0
+-2147483649.0
+string(13) "-2147483649.0"
-- Iteration: 2147483648 --
-2147483648
-2147483648
-string(10) "2147483648"
+2147483648.0
+2147483648.0
+string(12) "2147483648.0"
-- Iteration: -0x80000001 --
--2147483649
--2147483649
-string(11) "-2147483649"
+-2147483649.0
+-2147483649.0
+string(13) "-2147483649.0"
-- Iteration: 0x800000001 --
-34359738369
-34359738369
-string(11) "34359738369"
+34359738369.0
+34359738369.0
+string(13) "34359738369.0"
-- Iteration: 020000000001 --
-2147483649
-2147483649
-string(10) "2147483649"
+2147483649.0
+2147483649.0
+string(12) "2147483649.0"
-- Iteration: -020000000001 --
--2147483649
--2147483649
-string(11) "-2147483649"
+-2147483649.0
+-2147483649.0
+string(13) "-2147483649.0"
-- Iteration: 0.0 --
-0
-0
-string(1) "0"
+0.0
+0.0
+string(3) "0.0"
-- Iteration: -0.1 --
@@ -102,21 +102,21 @@ string(20) "-0.10000000000000001"
-- Iteration: 10.0000000000000000005 --
-10
-10
-string(2) "10"
+10.0
+10.0
+string(4) "10.0"
-- Iteration: 10.5e+5 --
-1050000
-1050000
-string(7) "1050000"
+1050000.0
+1050000.0
+string(9) "1050000.0"
-- Iteration: 1e5 --
-100000
-100000
-string(6) "100000"
+100000.0
+100000.0
+string(8) "100000.0"
-- Iteration: 1e-5 --
@@ -126,21 +126,21 @@ string(21) "1.0000000000000001E-5"
-- Iteration: 1e+5 --
-100000
-100000
-string(6) "100000"
+100000.0
+100000.0
+string(8) "100000.0"
-- Iteration: 1E5 --
-100000
-100000
-string(6) "100000"
+100000.0
+100000.0
+string(8) "100000.0"
-- Iteration: 1E+5 --
-100000
-100000
-string(6) "100000"
+100000.0
+100000.0
+string(8) "100000.0"
-- Iteration: 1E-5 --
@@ -150,9 +150,9 @@ string(21) "1.0000000000000001E-5"
-- Iteration: .5e+7 --
-5000000
-5000000
-string(7) "5000000"
+5000000.0
+5000000.0
+string(9) "5000000.0"
-- Iteration: .6e-19 --
diff --git a/ext/standard/tests/general_functions/var_export_bug66179.phpt b/ext/standard/tests/general_functions/var_export_bug66179.phpt
new file mode 100644
index 0000000000..15952199e5
--- /dev/null
+++ b/ext/standard/tests/general_functions/var_export_bug66179.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #66179 (var_export() exports float as integer)
+--FILE--
+<?php
+
+var_export(1.0);
+echo PHP_EOL;
+var_export(123.0);
+echo PHP_EOL;
+var_export(-1.0);
+echo PHP_EOL;
+var_export(-123.0);
+echo PHP_EOL;
+var_export(0.0);
+echo PHP_EOL;
+var_export(-0.0);
+echo PHP_EOL;
+var_export(10000000000000000.0);
+echo PHP_EOL;
+
+?>
+--EXPECTF--
+1.0
+123.0
+-1.0
+-123.0
+0.0
+-0.0
+10000000000000000.0
diff --git a/ext/standard/tests/general_functions/var_export_bug71314.phpt b/ext/standard/tests/general_functions/var_export_bug71314.phpt
new file mode 100644
index 0000000000..aaa8f794c0
--- /dev/null
+++ b/ext/standard/tests/general_functions/var_export_bug71314.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #71314 (var_export(INF) prints INF.0)
+--FILE--
+<?php
+
+var_export(INF);
+echo PHP_EOL;
+var_export(-INF);
+echo PHP_EOL;
+var_export(NAN);
+echo PHP_EOL;
+--EXPECT--
+INF
+-INF
+NAN
diff --git a/ext/standard/tests/http/bug38802.phpt b/ext/standard/tests/http/bug38802.phpt
index 73b41183ae..5e9fd10273 100644
--- a/ext/standard/tests/http/bug38802.phpt
+++ b/ext/standard/tests/http/bug38802.phpt
@@ -86,44 +86,52 @@ array(7) {
string(15) "HTTP/1.0 200 OK"
}
string(5) "done."
-string(195) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
GET /foo/bar2 HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
GET /foo/bar3 HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
GET /foo/bar4 HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: fail after 2 redirections --
Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: Redirection limit reached, aborting in %s
bool(false)
-string(97) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
GET /foo/bar2 HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: fail at first redirection --
Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: Redirection limit reached, aborting in %s
bool(false)
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: fail at first redirection (2) --
Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: Redirection limit reached, aborting in %s
bool(false)
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: return at first redirection --
@@ -135,8 +143,9 @@ array(2) {
string(41) "Location: http://127.0.0.1:12342/foo/bar2"
}
string(1) "1"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: return at first redirection (2) --
@@ -148,8 +157,9 @@ array(2) {
string(41) "Location: http://127.0.0.1:12342/foo/bar2"
}
string(1) "1"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: return at second redirection --
@@ -165,10 +175,12 @@ array(4) {
string(41) "Location: http://127.0.0.1:12342/foo/bar3"
}
string(0) ""
-string(97) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
GET /foo/bar2 HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
diff --git a/ext/standard/tests/http/bug48929.phpt b/ext/standard/tests/http/bug48929.phpt
index 2d1e45917a..b31ed292be 100644
--- a/ext/standard/tests/http/bug48929.phpt
+++ b/ext/standard/tests/http/bug48929.phpt
@@ -39,18 +39,20 @@ echo "-- Test: requests with 'header' as string --\n";
do_test(array('header' => "X-Foo: bar\r\nContent-Type: text/plain", 'method' => 'POST', 'content' => 'ohai'));
?>
---EXPECT--
+--EXPECTF--
-- Test: requests with 'header' as array --
-string(103) "POST / HTTP/1.0
+string(%d) "POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
Content-Length: 4
X-Foo: bar
Content-Type: text/plain
ohai"
-- Test: requests with 'header' as string --
-string(103) "POST / HTTP/1.0
+string(%d) "POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
Content-Length: 4
X-Foo: bar
Content-Type: text/plain
diff --git a/ext/standard/tests/http/bug53198.phpt b/ext/standard/tests/http/bug53198.phpt
index 3c640fa9c8..2585c3df6e 100644
--- a/ext/standard/tests/http/bug53198.phpt
+++ b/ext/standard/tests/http/bug53198.phpt
@@ -41,17 +41,18 @@ ini_set('from', 'junk@junk.com');
do_test();
?>
---EXPECT--
+--EXPECTF--
-- Test: leave default --
-string(63) "GET / HTTP/1.0
+string(%d) "GET / HTTP/1.0
From: teste@teste.pt
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: after ini_set --
-string(62) "GET / HTTP/1.0
+string(%d) "GET / HTTP/1.0
From: junk@junk.com
Host: 127.0.0.1:12342
+Connection: close
"
-
diff --git a/ext/standard/tests/http/bug61548.phpt b/ext/standard/tests/http/bug61548.phpt
index 138b15a338..38b2bbf086 100644
--- a/ext/standard/tests/http/bug61548.phpt
+++ b/ext/standard/tests/http/bug61548.phpt
@@ -44,30 +44,35 @@ Done
--EXPECT--
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
Content-type: text/plain
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
Content-type: text/plain
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
Content-type: text/plain
@@ -75,34 +80,40 @@ Third:
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
Third:
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Content-type:text/plain
Second:2
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Content-type:text/plain
Second:2
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Content-type:text/plain
Second:2
@@ -110,9 +121,9 @@ Third:
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
First:1
Second:2
Third:
Done
-
diff --git a/ext/standard/tests/http/bug65634.phpt b/ext/standard/tests/http/bug65634.phpt
index 8f358cc6cf..2d2b13989e 100644
--- a/ext/standard/tests/http/bug65634.phpt
+++ b/ext/standard/tests/http/bug65634.phpt
@@ -53,6 +53,7 @@ do_test('1.1', 'keep-alive');
HTTP/1.0, default behaviour:
GET / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
HTTP/1.0, connection: close:
GET / HTTP/1.0
@@ -78,4 +79,3 @@ HTTP/1.1, connection: keep-alive:
GET / HTTP/1.1
Host: 127.0.0.1:12342
Connection: keep-alive
-
diff --git a/ext/standard/tests/http/bug67430.phpt b/ext/standard/tests/http/bug67430.phpt
index d4474fdf5d..a563951cd8 100644
--- a/ext/standard/tests/http/bug67430.phpt
+++ b/ext/standard/tests/http/bug67430.phpt
@@ -39,11 +39,14 @@ Done
--EXPECT--
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
GET /foo HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
POST / HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
Done
diff --git a/ext/standard/tests/http/http_response_header_01.phpt b/ext/standard/tests/http/http_response_header_01.phpt
new file mode 100644
index 0000000000..2facf4fae5
--- /dev/null
+++ b/ext/standard/tests/http/http_response_header_01.phpt
@@ -0,0 +1,38 @@
+--TEST--
+$http_reponse_header (no redirect)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22346'); ?>
+--INI--
+allow_url_fopen=1
+allow_url_include=1
+--FILE--
+<?php
+require 'server.inc';
+
+$responses = array(
+ "data://text/plain,HTTP/1.0 200 Ok\r\nSome: Header\r\nSome: Header\r\n\r\nBody",
+);
+
+$pid = http_server("tcp://127.0.0.1:22346", $responses, $output);
+
+function test() {
+ $f = file_get_contents('http://127.0.0.1:22346/');
+ var_dump($f);
+ var_dump($http_response_header);
+}
+test();
+
+http_server_kill($pid);
+?>
+==DONE==
+--EXPECT--
+string(4) "Body"
+array(3) {
+ [0]=>
+ string(15) "HTTP/1.0 200 Ok"
+ [1]=>
+ string(12) "Some: Header"
+ [2]=>
+ string(12) "Some: Header"
+}
+==DONE==
diff --git a/ext/standard/tests/http/http_response_header_02.phpt b/ext/standard/tests/http/http_response_header_02.phpt
new file mode 100644
index 0000000000..0d4da1af14
--- /dev/null
+++ b/ext/standard/tests/http/http_response_header_02.phpt
@@ -0,0 +1,44 @@
+--TEST--
+$http_reponse_header (redirect)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22347'); ?>
+--INI--
+allow_url_fopen=1
+allow_url_include=1
+--FILE--
+<?php
+require 'server.inc';
+
+$responses = array(
+ "data://text/plain,HTTP/1.0 302 Found\r\n"
+ . "Some: Header\r\nLocation: http://127.0.0.1:22347/try-again\r\n\r\n",
+ "data://test/plain,HTTP/1.0 200 Ok\r\nSome: Header\r\n\r\nBody",
+);
+
+$pid = http_server("tcp://127.0.0.1:22347", $responses, $output);
+
+function test() {
+ $f = file_get_contents('http://127.0.0.1:22347/');
+ var_dump($f);
+ var_dump($http_response_header);
+}
+test();
+
+http_server_kill($pid);
+?>
+==DONE==
+--EXPECT--
+string(4) "Body"
+array(5) {
+ [0]=>
+ string(18) "HTTP/1.0 302 Found"
+ [1]=>
+ string(12) "Some: Header"
+ [2]=>
+ string(42) "Location: http://127.0.0.1:22347/try-again"
+ [3]=>
+ string(15) "HTTP/1.0 200 Ok"
+ [4]=>
+ string(12) "Some: Header"
+}
+==DONE==
diff --git a/ext/standard/tests/http/http_response_header_03.phpt b/ext/standard/tests/http/http_response_header_03.phpt
new file mode 100644
index 0000000000..866a9b3ba5
--- /dev/null
+++ b/ext/standard/tests/http/http_response_header_03.phpt
@@ -0,0 +1,45 @@
+--TEST--
+$http_reponse_header (redirect + not found)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22348'); ?>
+--INI--
+allow_url_fopen=1
+allow_url_include=1
+--FILE--
+<?php
+require 'server.inc';
+
+$responses = array(
+ "data://text/plain,HTTP/1.0 302 Found\r\n"
+ . "Some: Header\r\nLocation: http://127.0.0.1:22348/try-again\r\n\r\n",
+ "data://test/plain,HTTP/1.0 404 Not Found\r\nSome: Header\r\n\r\nBody",
+);
+
+$pid = http_server("tcp://127.0.0.1:22348", $responses, $output);
+
+function test() {
+ $f = file_get_contents('http://127.0.0.1:22348/');
+ var_dump($f);
+ var_dump($http_response_header);
+}
+test();
+
+http_server_kill($pid);
+?>
+==DONE==
+--EXPECTF--
+Warning: file_get_contents(http://127.0.0.1:22348/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found%a
+bool(false)
+array(5) {
+ [0]=>
+ string(18) "HTTP/1.0 302 Found"
+ [1]=>
+ string(12) "Some: Header"
+ [2]=>
+ string(42) "Location: http://127.0.0.1:22348/try-again"
+ [3]=>
+ string(22) "HTTP/1.0 404 Not Found"
+ [4]=>
+ string(12) "Some: Header"
+}
+==DONE==
diff --git a/ext/standard/tests/http/ignore_errors.phpt b/ext/standard/tests/http/ignore_errors.phpt
index ab5421890b..54a0073b5e 100644
--- a/ext/standard/tests/http/ignore_errors.phpt
+++ b/ext/standard/tests/http/ignore_errors.phpt
@@ -27,7 +27,7 @@ function do_test($context_options) {
if ($fd) {
$meta_data = stream_get_meta_data($fd);
var_dump($meta_data['wrapper_data']);
-
+
var_dump(stream_get_contents($fd));
}
@@ -62,16 +62,18 @@ array(2) {
string(10) "X-Foo: bar"
}
string(1) "1"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: HTTP request failed! HTTP/1.0 404 Not found
in %s on line %d
bool(false)
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: requests with ignore_errors --
@@ -83,8 +85,9 @@ array(2) {
string(10) "X-Foo: bar"
}
string(1) "1"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
resource(%d) of type (stream)
@@ -95,8 +98,9 @@ array(2) {
string(10) "X-bar: baz"
}
string(1) "2"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
-- Test: requests with ignore_errors (2) --
@@ -108,8 +112,9 @@ array(2) {
string(10) "X-Foo: bar"
}
string(1) "1"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
resource(%d) of type (stream)
@@ -120,7 +125,8 @@ array(2) {
string(10) "X-bar: baz"
}
string(1) "2"
-string(48) "GET /foo/bar HTTP/1.0
+string(%d) "GET /foo/bar HTTP/1.0
Host: 127.0.0.1:12342
+Connection: close
"
diff --git a/ext/standard/tests/image/bug70052.phpt b/ext/standard/tests/image/bug70052.phpt
new file mode 100644
index 0000000000..76ebda92b2
--- /dev/null
+++ b/ext/standard/tests/image/bug70052.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70052 (getimagesize() fails for very large and very small WBMP)
+--FILE--
+<?php
+var_dump(getimagesize(__DIR__ . '/bug70052_1.wbmp'));
+var_dump(getimagesize(__DIR__ . '/bug70052_2.wbmp'));
+?>
+--EXPECT--
+bool(false)
+array(5) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(3)
+ [2]=>
+ int(15)
+ [3]=>
+ string(20) "width="3" height="3""
+ ["mime"]=>
+ string(18) "image/vnd.wap.wbmp"
+}
diff --git a/ext/standard/tests/image/bug70052_1.wbmp b/ext/standard/tests/image/bug70052_1.wbmp
new file mode 100644
index 0000000000..2c32f379ae
--- /dev/null
+++ b/ext/standard/tests/image/bug70052_1.wbmp
Binary files differ
diff --git a/ext/standard/tests/image/bug70052_2.wbmp b/ext/standard/tests/image/bug70052_2.wbmp
new file mode 100644
index 0000000000..d0f4313fc1
--- /dev/null
+++ b/ext/standard/tests/image/bug70052_2.wbmp
Binary files differ
diff --git a/ext/standard/tests/image/bug70096.phpt b/ext/standard/tests/image/bug70096.phpt
new file mode 100644
index 0000000000..0dd55cb6ca
--- /dev/null
+++ b/ext/standard/tests/image/bug70096.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #70096 (Repeated iptcembed() adds superfluous FF bytes)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+if (!function_exists('imagejpeg')) die('skip imagejpeg not available');
+?>
+--FILE--
+<?php
+$filename = __DIR__ . '/bug70096.jpg';
+$im = imagecreatetruecolor(10, 10);
+imagejpeg($im, $filename);
+imagedestroy($im);
+$data = "\x1C\x02x\x00\x0ATest image"
+ . "\x1C\x02t\x00\x22Copyright 2008-2009, The PHP Group";
+$content1 = iptcembed($data, $filename);
+$fp = fopen($filename, "wb");
+fwrite($fp, $content1);
+fclose($fp);
+$content2 = iptcembed($data, $filename);
+$fp = fopen($filename, "wb");
+fwrite($fp, $content2);
+fclose($fp);
+var_dump($content1 === $content2);
+?>
+--CLEAN--
+<?php
+$filename = __DIR__ . '/bug70096.jpg';
+@unlink($filename);
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/math/decbin_basic.phpt b/ext/standard/tests/math/decbin_basic.phpt
index b4389956f4..572a04245e 100644
--- a/ext/standard/tests/math/decbin_basic.phpt
+++ b/ext/standard/tests/math/decbin_basic.phpt
@@ -31,7 +31,7 @@ string(2) "11"
string(7) "1011111"
string(4) "1010"
string(12) "111101101110"
-string(2) "11"
+string(12) "111101101110"
string(6) "100111"
string(1) "0"
string(1) "1"
diff --git a/ext/standard/tests/math/dechex_basic.phpt b/ext/standard/tests/math/dechex_basic.phpt
index 2423d8e748..ac53a97b34 100644
--- a/ext/standard/tests/math/dechex_basic.phpt
+++ b/ext/standard/tests/math/dechex_basic.phpt
@@ -30,7 +30,7 @@ string(1) "3"
string(2) "5f"
string(1) "a"
string(3) "f6e"
-string(1) "3"
+string(3) "f6e"
string(2) "27"
string(1) "0"
string(1) "1"
diff --git a/ext/standard/tests/math/decoct_basic.phpt b/ext/standard/tests/math/decoct_basic.phpt
index cc1f0a899a..3a5011b973 100644
--- a/ext/standard/tests/math/decoct_basic.phpt
+++ b/ext/standard/tests/math/decoct_basic.phpt
@@ -30,7 +30,7 @@ string(1) "3"
string(3) "137"
string(2) "12"
string(4) "7556"
-string(1) "3"
+string(4) "7556"
string(2) "47"
string(1) "0"
string(1) "1"
diff --git a/ext/standard/tests/math/mt_rand_value.phpt b/ext/standard/tests/math/mt_rand_value.phpt
new file mode 100644
index 0000000000..772305ad63
--- /dev/null
+++ b/ext/standard/tests/math/mt_rand_value.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test mt_rand() output
+--FILE--
+<?php
+
+mt_srand(12345678);
+
+for ($i=0; $i<16; $i++) {
+ echo mt_rand().PHP_EOL;
+}
+echo PHP_EOL;
+
+$x = 0;
+for ($i=0; $i<1024; $i++) {
+ $x ^= mt_rand();
+}
+echo $x.PHP_EOL;
+
+/*
+ * Note that the output will be different from the original mt19937ar.c,
+ * because PHP's implementation contains a bug. Thus, this test actually
+ * checks to make sure that PHP's behaviour is wrong, but consistently so.
+ */
+
+?>
+--EXPECTF--
+1614640687
+1711027313
+857485497
+688176834
+1386682158
+412773096
+813703253
+898651287
+2087374214
+1382556330
+1640700129
+1863374167
+1324097651
+1923803667
+676334965
+853386222
+
+1571178311
diff --git a/ext/standard/tests/math/pow_variation1.phpt b/ext/standard/tests/math/pow_variation1.phpt
index 5576e5b493..c744c4eb9d 100644
--- a/ext/standard/tests/math/pow_variation1.phpt
+++ b/ext/standard/tests/math/pow_variation1.phpt
@@ -143,21 +143,31 @@ int(1)
int(0)
-- Iteration 17 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 18 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 19 --
int(0)
-- Iteration 20 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 21 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 22 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 23 --
diff --git a/ext/standard/tests/math/pow_variation1_64bit.phpt b/ext/standard/tests/math/pow_variation1_64bit.phpt
index e1986ba858..ea2ae45d18 100644
--- a/ext/standard/tests/math/pow_variation1_64bit.phpt
+++ b/ext/standard/tests/math/pow_variation1_64bit.phpt
@@ -143,21 +143,31 @@ int(1)
int(0)
-- Iteration 17 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 18 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 19 --
int(0)
-- Iteration 20 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 21 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 22 --
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
-- Iteration 23 --
diff --git a/ext/standard/tests/math/pow_variation2.phpt b/ext/standard/tests/math/pow_variation2.phpt
index f571936727..36b085b647 100644
--- a/ext/standard/tests/math/pow_variation2.phpt
+++ b/ext/standard/tests/math/pow_variation2.phpt
@@ -139,21 +139,31 @@ float(20.3)
float(1)
-- Iteration 17 --
+
+Warning: A non-numeric value encountered in %s on line %d
float(1)
-- Iteration 18 --
+
+Warning: A non-numeric value encountered in %s on line %d
float(1)
-- Iteration 19 --
int(1)
-- Iteration 20 --
+
+Warning: A non-numeric value encountered in %s on line %d
float(1)
-- Iteration 21 --
+
+Warning: A non-numeric value encountered in %s on line %d
float(1)
-- Iteration 22 --
+
+Warning: A non-numeric value encountered in %s on line %d
float(1)
-- Iteration 23 --
diff --git a/ext/standard/tests/math/round_bug71201.phpt b/ext/standard/tests/math/round_bug71201.phpt
new file mode 100644
index 0000000000..43a5e11263
--- /dev/null
+++ b/ext/standard/tests/math/round_bug71201.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #71201 round() segfault on 64-bit builds
+--FILE--
+<?php
+echo round(1.0, -2147483648), "\n";
+?>
+===DONE===
+--EXPECT--
+0
+===DONE===
diff --git a/ext/standard/tests/network/bug55472.phpt b/ext/standard/tests/network/bug55472.phpt
new file mode 100644
index 0000000000..3e0c12795c
--- /dev/null
+++ b/ext/standard/tests/network/bug55472.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #55472 (ip2long(integer) returns integer)
+--FILE--
+<?php
+var_dump(ip2long(26));
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/standard/tests/network/gethostname.phpt b/ext/standard/tests/network/gethostname.phpt
new file mode 100644
index 0000000000..5c811b8c6f
--- /dev/null
+++ b/ext/standard/tests/network/gethostname.phpt
@@ -0,0 +1,20 @@
+--TEST--
+string gethostname(void);
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+var_dump(gethostname());
+var_dump(gethostname("php-zend-brazil"));
+?>
+--EXPECTF--
+%s
+
+Warning: gethostname() expects exactly %d parameters, %d given in %s on line %d
+NULL
diff --git a/ext/standard/tests/network/getprotobyname_basic.phpt b/ext/standard/tests/network/getprotobyname_basic.phpt
new file mode 100644
index 0000000000..37cc26aa2b
--- /dev/null
+++ b/ext/standard/tests/network/getprotobyname_basic.phpt
@@ -0,0 +1,10 @@
+--TEST--
+getprotobyname function basic test
+--CREDITS--
+edgarsandi - <edgar.r.sandi@gmail.com>
+--FILE--
+<?php
+ var_dump(getprotobyname('tcp'));
+?>
+--EXPECT--
+int(6)
diff --git a/ext/standard/tests/network/getprotobyname_error.phpt b/ext/standard/tests/network/getprotobyname_error.phpt
new file mode 100644
index 0000000000..7ee366ac7a
--- /dev/null
+++ b/ext/standard/tests/network/getprotobyname_error.phpt
@@ -0,0 +1,16 @@
+--TEST--
+getprotobyname function errors test
+--CREDITS--
+edgarsandi - <edgar.r.sandi@gmail.com>
+--FILE--
+<?php
+ // empty protocol name
+ var_dump(getprotobyname());
+
+ // invalid protocol name
+ var_dump(getprotobyname('abc'));
+?>
+--EXPECTF--
+Warning: getprotobyname() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+bool(false)
diff --git a/ext/standard/tests/network/getprotobynumber_basic.phpt b/ext/standard/tests/network/getprotobynumber_basic.phpt
new file mode 100644
index 0000000000..7850e60ffd
--- /dev/null
+++ b/ext/standard/tests/network/getprotobynumber_basic.phpt
@@ -0,0 +1,10 @@
+--TEST--
+getprotobynumber function basic test
+--CREDITS--
+edgarsandi - <edgar.r.sandi@gmail.com>
+--FILE--
+<?php
+ var_dump(getprotobynumber(6));
+?>
+--EXPECT--
+string(3) "tcp"
diff --git a/ext/standard/tests/network/getprotobynumber_error.phpt b/ext/standard/tests/network/getprotobynumber_error.phpt
new file mode 100644
index 0000000000..7df12e864a
--- /dev/null
+++ b/ext/standard/tests/network/getprotobynumber_error.phpt
@@ -0,0 +1,16 @@
+--TEST--
+getprotobynumber function errors test
+--CREDITS--
+edgarsandi - <edgar.r.sandi@gmail.com>
+--FILE--
+<?php
+ // empty protocol number
+ var_dump(getprotobynumber());
+
+ // invalid protocol number
+ var_dump(getprotobynumber(999));
+?>
+--EXPECTF--
+Warning: getprotobynumber() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+bool(false)
diff --git a/ext/standard/tests/network/ip.phpt b/ext/standard/tests/network/ip.phpt
index 3fc1b9dcf4..abe50e7192 100644
--- a/ext/standard/tests/network/ip.phpt
+++ b/ext/standard/tests/network/ip.phpt
@@ -48,20 +48,22 @@ string(7) "0.0.0.0"
int(1118019956)
string(14) "66.163.161.116"
-Warning: ip2long() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: ip2long() expects exactly 1 parameter, 0 given in %sip.php on line %d
NULL
bool(false)
bool(false)
int(1869573999)
-Warning: ip2long() expects parameter 1 to be string, array given in %s on line %d
+Warning: ip2long() expects parameter 1 to be string, array given in %sip.php on line %d
NULL
-Warning: long2ip() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: long2ip() expects exactly 1 parameter, 0 given in %sip.php on line %d
NULL
string(13) "255.254.82.80"
-string(7) "0.0.0.0"
-Warning: long2ip() expects parameter 1 to be string, array given in %s on line %d
+Warning: long2ip() expects parameter 1 to be integer, string given in %sip.php on line %d
+NULL
+
+Warning: long2ip() expects parameter 1 to be integer, array given in %sip.php on line %d
NULL
Done
diff --git a/ext/standard/tests/network/ip_x86_64.phpt b/ext/standard/tests/network/ip_x86_64.phpt
index 1fcb8b2043..45a48ca9df 100644
--- a/ext/standard/tests/network/ip_x86_64.phpt
+++ b/ext/standard/tests/network/ip_x86_64.phpt
@@ -48,20 +48,22 @@ string(7) "0.0.0.0"
int(1118019956)
string(14) "66.163.161.116"
-Warning: ip2long() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: ip2long() expects exactly 1 parameter, 0 given in %sip_x86_64.php on line %d
NULL
bool(false)
bool(false)
int(1869573999)
-Warning: ip2long() expects parameter 1 to be string, array given in %s on line %d
+Warning: ip2long() expects parameter 1 to be string, array given in %sip_x86_64.php on line %d
NULL
-Warning: long2ip() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: long2ip() expects exactly 1 parameter, 0 given in %sip_x86_64.php on line %d
NULL
string(13) "255.254.82.80"
-string(7) "0.0.0.0"
-Warning: long2ip() expects parameter 1 to be string, array given in %s on line %d
+Warning: long2ip() expects parameter 1 to be integer, string given in %sip_x86_64.php on line %d
+NULL
+
+Warning: long2ip() expects parameter 1 to be integer, array given in %sip_x86_64.php on line %d
NULL
Done
diff --git a/ext/standard/tests/network/long2ip_variation1.phpt b/ext/standard/tests/network/long2ip_variation1.phpt
index 2dc6fb123b..e7336712be 100644
--- a/ext/standard/tests/network/long2ip_variation1.phpt
+++ b/ext/standard/tests/network/long2ip_variation1.phpt
@@ -126,19 +126,19 @@ string(15) "255.255.255.246"
string(7) "0.0.0.0"
--empty array--
-Error: 2 - long2ip() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - long2ip() expects parameter 1 to be integer, array given, %slong2ip_variation1.php(%d)
NULL
--int indexed array--
-Error: 2 - long2ip() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - long2ip() expects parameter 1 to be integer, array given, %slong2ip_variation1.php(%d)
NULL
--associative array--
-Error: 2 - long2ip() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - long2ip() expects parameter 1 to be integer, array given, %slong2ip_variation1.php(%d)
NULL
--nested arrays--
-Error: 2 - long2ip() expects parameter 1 to be string, array given, %s(%d)
+Error: 2 - long2ip() expects parameter 1 to be integer, array given, %slong2ip_variation1.php(%d)
NULL
--uppercase NULL--
@@ -160,28 +160,35 @@ string(7) "0.0.0.1"
string(7) "0.0.0.0"
--empty string DQ--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, string given, %slong2ip_variation1.php(%d)
+NULL
--empty string SQ--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, string given, %slong2ip_variation1.php(%d)
+NULL
--string DQ--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, string given, %slong2ip_variation1.php(%d)
+NULL
--string SQ--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, string given, %slong2ip_variation1.php(%d)
+NULL
--mixed case string--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, string given, %slong2ip_variation1.php(%d)
+NULL
--heredoc--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, string given, %slong2ip_variation1.php(%d)
+NULL
--instance of classWithToString--
-string(7) "0.0.0.0"
+Error: 2 - long2ip() expects parameter 1 to be integer, object given, %slong2ip_variation1.php(%d)
+NULL
--instance of classWithoutToString--
-Error: 2 - long2ip() expects parameter 1 to be string, object given, %s(%d)
+Error: 2 - long2ip() expects parameter 1 to be integer, object given, %slong2ip_variation1.php(%d)
NULL
--undefined var--
@@ -191,6 +198,6 @@ string(7) "0.0.0.0"
string(7) "0.0.0.0"
--resource--
-Error: 2 - long2ip() expects parameter 1 to be string, resource given, %s(%d)
+Error: 2 - long2ip() expects parameter 1 to be integer, resource given, %slong2ip_variation1.php(%d)
NULL
===DONE===
diff --git a/ext/standard/tests/network/setcookie.phpt b/ext/standard/tests/network/setcookie.phpt
index 3b8e551834..68c929997d 100644
--- a/ext/standard/tests/network/setcookie.phpt
+++ b/ext/standard/tests/network/setcookie.phpt
@@ -6,6 +6,7 @@ date.timezone=UTC
--FILE--
<?php
setcookie('name');
+setcookie('name', '');
setcookie('name', 'value');
setcookie('name', 'space value');
setcookie('name', 'value', 0);
@@ -19,7 +20,8 @@ setcookie('name', 'value', 0, '', '', FALSE, TRUE);
$expected = array(
- 'Set-Cookie: name=',
+ 'Set-Cookie: name=deleted; expires='.date('D, d-M-Y H:i:s', 1).' GMT; Max-Age=0',
+ 'Set-Cookie: name=deleted; expires='.date('D, d-M-Y H:i:s', 1).' GMT; Max-Age=0',
'Set-Cookie: name=value',
'Set-Cookie: name=space+value',
'Set-Cookie: name=value',
@@ -64,6 +66,7 @@ while (next($headers) !== FALSE);
echo ($i === 0)
? 'OK'
: 'A total of '.$i.' errors found.';
+?>
--EXPECTHEADERS--
--EXPECT--
diff --git a/ext/standard/tests/network/socket_get_status_basic.phpt b/ext/standard/tests/network/socket_get_status_basic.phpt
index 46215f9838..32a8d9ce6f 100644
--- a/ext/standard/tests/network/socket_get_status_basic.phpt
+++ b/ext/standard/tests/network/socket_get_status_basic.phpt
@@ -18,6 +18,12 @@ fclose($server);
?>
--EXPECTF--
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socket%S"
["mode"]=>
@@ -26,10 +32,4 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/network/udp4loop.phpt b/ext/standard/tests/network/udp4loop.phpt
index 10d36ed73f..3f78df267a 100644
--- a/ext/standard/tests/network/udp4loop.phpt
+++ b/ext/standard/tests/network/udp4loop.phpt
@@ -3,13 +3,17 @@ Streams Based IPv4 UDP Loopback test
--FILE--
<?php
/* Setup socket server */
- $server = stream_socket_server('udp://127.0.0.1:31338', $errno, $errstr, STREAM_SERVER_BIND);
+ for ($port = 31338; $port < 31500; ++$port) {
+ $uri = "udp://127.0.0.1:$port";
+ $server = @stream_socket_server($uri, $errno, $errstr, STREAM_SERVER_BIND);
+ if ($server) break;
+ }
if (!$server) {
- die('Unable to create AF_INET socket [server]');
+ die('Unable to create AF_INET socket [server]: ' . $errstr);
}
/* Connect to it */
- $client = stream_socket_client('udp://127.0.0.1:31338');
+ $client = stream_socket_client($uri);
if (!$client) {
die('Unable to create AF_INET socket [client]');
}
diff --git a/ext/standard/tests/random/random_bytes.phpt b/ext/standard/tests/random/random_bytes.phpt
index 86391383e4..6a7d438835 100644
--- a/ext/standard/tests/random/random_bytes.phpt
+++ b/ext/standard/tests/random/random_bytes.phpt
@@ -8,7 +8,10 @@ var_dump(strlen(bin2hex(random_bytes(16))));
var_dump(is_string(random_bytes(10)));
+var_dump(is_string(random_bytes(257)));
+
?>
--EXPECT--
int(32)
bool(true)
+bool(true)
diff --git a/ext/standard/tests/random/random_bytes_error.phpt b/ext/standard/tests/random/random_bytes_error.phpt
index 466a3ac3bf..c1607c01ff 100644
--- a/ext/standard/tests/random/random_bytes_error.phpt
+++ b/ext/standard/tests/random/random_bytes_error.phpt
@@ -4,14 +4,19 @@ Test error operation of random_bytes()
<?php
//-=-=-=-
-var_dump(random_bytes());
+try {
+ $bytes = random_bytes();
+} catch (TypeError $e) {
+ echo $e->getMessage().PHP_EOL;
+}
-var_dump(random_bytes(-1));
+try {
+ $bytes = random_bytes(0);
+} catch (Error $e) {
+ echo $e->getMessage().PHP_EOL;
+}
?>
---EXPECTF--
-Warning: random_bytes() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: random_bytes(): Length must be greater than 0 in %s on line %d
-bool(false)
+--EXPECT--
+random_bytes() expects exactly 1 parameter, 0 given
+Length must be greater than 0
diff --git a/ext/standard/tests/random/random_int.phpt b/ext/standard/tests/random/random_int.phpt
index 0c3081452c..768bc4f97d 100644
--- a/ext/standard/tests/random/random_int.phpt
+++ b/ext/standard/tests/random/random_int.phpt
@@ -11,8 +11,11 @@ var_dump($x >= 10 && $x <= 100);
var_dump(random_int(-1000, -1) < 0);
+var_dump(random_int(42,42));
+
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
+int(42)
diff --git a/ext/standard/tests/random/random_int_error.phpt b/ext/standard/tests/random/random_int_error.phpt
index 5f7a69b215..9b98bdd7c0 100644
--- a/ext/standard/tests/random/random_int_error.phpt
+++ b/ext/standard/tests/random/random_int_error.phpt
@@ -4,19 +4,26 @@ Test error operation of random_int()
<?php
//-=-=-=-
-var_dump(random_int());
+try {
+ $randomInt = random_int();
+} catch (TypeError $e) {
+ echo $e->getMessage().PHP_EOL;
+}
-var_dump(random_int(10));
+try {
+ $randomInt = random_int(42);
+} catch (TypeError $e) {
+ echo $e->getMessage().PHP_EOL;
+}
-var_dump(random_int(10, 0));
+try {
+ $randomInt = random_int(42,0);
+} catch (Error $e) {
+ echo $e->getMessage().PHP_EOL;
+}
?>
---EXPECTF--
-Warning: random_int() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: random_int() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: random_int(): Minimum value must be less than the maximum value in %s on line %d
-bool(false)
+--EXPECT--
+random_int() expects exactly 2 parameters, 0 given
+random_int() expects exactly 2 parameters, 1 given
+Minimum value must be less than or equal to the maximum value
diff --git a/ext/standard/tests/serialize/bug69152.phpt b/ext/standard/tests/serialize/bug69152.phpt
index b766c0afbd..be3aa273ed 100644
--- a/ext/standard/tests/serialize/bug69152.phpt
+++ b/ext/standard/tests/serialize/bug69152.phpt
@@ -9,6 +9,7 @@ $x->test();
?>
--EXPECTF--
+Notice: Undefined property: Exception::$previous in %s on line %d
Exception in %s:%d
Stack trace:
#0 {main}
diff --git a/ext/standard/tests/serialize/bug69793.phpt b/ext/standard/tests/serialize/bug69793.phpt
new file mode 100644
index 0000000000..db6e6da922
--- /dev/null
+++ b/ext/standard/tests/serialize/bug69793.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #69793: Remotely triggerable stack exhaustion via recursive method calls
+--FILE--
+<?php
+$e = unserialize('O:9:"Exception":7:{s:17:"'."\0".'Exception'."\0".'string";s:1:"a";s:7:"'."\0".'*'."\0".'code";i:0;s:7:"'."\0".'*'."\0".'file";R:1;s:7:"'."\0".'*'."\0".'line";i:1337;s:16:"'."\0".'Exception'."\0".'trace";a:0:{}s:19:"'."\0".'Exception'."\0".'previous";i:10;s:10:"'."\0".'*'."\0".'message";N;}');
+
+var_dump($e."");
+?>
+--EXPECTF--
+Notice: Undefined property: Exception::$message in %s%ebug69793.php on line %d
+
+Notice: Undefined property: Exception::$file in %s%ebug69793.php on line %d
+
+Notice: Undefined property: Exception::$previous in %s%ebug69793.php on line %d
+string(41) "Exception in :1337
+Stack trace:
+#0 {main}"
diff --git a/ext/standard/tests/serialize/bug70172.phpt b/ext/standard/tests/serialize/bug70172.phpt
new file mode 100644
index 0000000000..471d1a4b4e
--- /dev/null
+++ b/ext/standard/tests/serialize/bug70172.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Bug #70172 - Use After Free Vulnerability in unserialize()
+--FILE--
+<?php
+class obj implements Serializable {
+ var $data;
+ function serialize() {
+ return serialize($this->data);
+ }
+ function unserialize($data) {
+ $this->data = unserialize($data);
+ }
+}
+
+$fakezval = ptr2str(1122334455);
+$fakezval .= ptr2str(0);
+$fakezval .= "\x00\x00\x00\x00";
+$fakezval .= "\x01";
+$fakezval .= "\x00";
+$fakezval .= "\x00\x00";
+
+$inner = 'r:2;';
+$exploit = 'a:2:{i:0;i:1;i:1;C:3:"obj":'.strlen($inner).':{'.$inner.'}}';
+
+$data = unserialize($exploit);
+
+for ($i = 0; $i < 5; $i++) {
+ $v[$i] = $fakezval.$i;
+}
+
+var_dump($data);
+
+function ptr2str($ptr)
+{
+ $out = '';
+ for ($i = 0; $i < 8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+ return $out;
+}
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ object(obj)#%d (1) {
+ ["data"]=>
+ int(1)
+ }
+}
diff --git a/ext/standard/tests/serialize/bug70172_2.phpt b/ext/standard/tests/serialize/bug70172_2.phpt
new file mode 100644
index 0000000000..dc9067168a
--- /dev/null
+++ b/ext/standard/tests/serialize/bug70172_2.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Bug #70172 - Use After Free Vulnerability in unserialize()
+--XFAIL--
+Unfinished merge, needs fix.
+--FILE--
+<?php
+class obj implements Serializable {
+ var $data;
+ function serialize() {
+ return serialize($this->data);
+ }
+ function unserialize($data) {
+ $this->data = unserialize($data);
+ }
+}
+
+class obj2 {
+ var $ryat;
+ function __wakeup() {
+ $this->ryat = 1;
+ }
+}
+
+$fakezval = ptr2str(1122334455);
+$fakezval .= ptr2str(0);
+$fakezval .= "\x00\x00\x00\x00";
+$fakezval .= "\x01";
+$fakezval .= "\x00";
+$fakezval .= "\x00\x00";
+
+$inner = 'r:2;';
+$exploit = 'a:2:{i:0;O:4:"obj2":1:{s:4:"ryat";C:3:"obj":'.strlen($inner).':{'.$inner.'}}i:1;a:1:{i:0;a:1:{i:0;R:4;}}}';
+
+$data = unserialize($exploit);
+
+for ($i = 0; $i < 5; $i++) {
+ $v[$i] = $fakezval.$i;
+}
+
+var_dump($data);
+
+function ptr2str($ptr)
+{
+ $out = '';
+ for ($i = 0; $i < 8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+ return $out;
+}
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ object(obj2)#%d (1) {
+ ["ryat"]=>
+ int(1)
+ }
+ [1]=>
+ array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ &object(obj2)#%d (1) {
+ ["ryat"]=>
+ int(1)
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/ext/standard/tests/serialize/bug70219.phpt b/ext/standard/tests/serialize/bug70219.phpt
new file mode 100644
index 0000000000..e134c78a9f
--- /dev/null
+++ b/ext/standard/tests/serialize/bug70219.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Bug #70219 Use after free vulnerability in session deserializer
+--XFAIL--
+Unfinished merge, needs fix.
+--FILE--
+<?php
+class obj implements Serializable {
+ var $data;
+ function serialize() {
+ return serialize($this->data);
+ }
+ function unserialize($data) {
+ session_start();
+ session_decode($data);
+ }
+}
+
+$inner = 'ryat|a:1:{i:0;a:1:{i:1;';
+$exploit = 'a:2:{i:0;C:3:"obj":'.strlen($inner).':{'.$inner.'}i:1;R:4;}';
+
+$data = unserialize($exploit);
+
+for ($i = 0; $i < 5; $i++) {
+ $v[$i] = 'hi'.$i;
+}
+
+var_dump($data);
+?>
+--EXPECTF--
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s on line %d
+array(2) {
+ [0]=>
+ object(obj)#%d (1) {
+ ["data"]=>
+ NULL
+ }
+ [1]=>
+ &array(1) {
+ ["data"]=>
+ NULL
+ }
+}
diff --git a/ext/standard/tests/serialize/bug70219_1.phpt b/ext/standard/tests/serialize/bug70219_1.phpt
new file mode 100644
index 0000000000..6bbc593b34
--- /dev/null
+++ b/ext/standard/tests/serialize/bug70219_1.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Bug #70219 Use after free vulnerability in session deserializer
+--SKIPIF--
+<?php
+if (!extension_loaded("session")) {
+ die("skip Session module not loaded");
+}
+?>
+--FILE--
+<?php
+ini_set('session.serialize_handler', 'php_serialize');
+session_start();
+
+class obj implements Serializable {
+ var $data;
+ function serialize() {
+ return serialize($this->data);
+ }
+ function unserialize($data) {
+ session_decode($data);
+ }
+}
+
+$inner = 'r:2;';
+$exploit = 'a:2:{i:0;C:3:"obj":'.strlen($inner).':{'.$inner.'}i:1;C:3:"obj":'.strlen($inner).':{'.$inner.'}}';
+
+$data = unserialize($exploit);
+
+for ($i = 0; $i < 5; $i++) {
+ $v[$i] = 'hi'.$i;
+}
+
+var_dump($data);
+var_dump($_SESSION);
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ object(obj)#%d (1) {
+ ["data"]=>
+ NULL
+ }
+ [1]=>
+ object(obj)#%d (1) {
+ ["data"]=>
+ NULL
+ }
+}
+object(obj)#1 (1) {
+ ["data"]=>
+ NULL
+}
diff --git a/ext/standard/tests/serialize/bug70963.phpt b/ext/standard/tests/serialize/bug70963.phpt
new file mode 100644
index 0000000000..fc76771299
--- /dev/null
+++ b/ext/standard/tests/serialize/bug70963.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #70963 (Unserialize shows UNKNOW in result)
+--FILE--
+<?php
+var_dump(unserialize('a:2:{i:0;O:9:"exception":1:{s:16:"'."\0".'Exception'."\0".'trace";s:4:"test";}i:1;R:3;}'));
+var_dump(unserialize('a:2:{i:0;O:9:"exception":1:{s:16:"'."\0".'Exception'."\0".'trace";s:4:"test";}i:1;r:3;}'));
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ object(Exception)#%d (5) {
+ ["message":protected]=>
+ string(0) ""
+ ["string":"Exception":private]=>
+ string(0) ""
+ ["code":protected]=>
+ int(0)
+ ["file":protected]=>
+ string(%d) "%s"
+ ["line":protected]=>
+ int(%d)
+ }
+}
+array(1) {
+ [0]=>
+ object(Exception)#%d (5) {
+ ["message":protected]=>
+ string(0) ""
+ ["string":"Exception":private]=>
+ string(0) ""
+ ["code":protected]=>
+ int(0)
+ ["file":protected]=>
+ string(%d) "%s"
+ ["line":protected]=>
+ int(%d)
+ }
+}
diff --git a/ext/standard/tests/serialize/bug71311.phpt b/ext/standard/tests/serialize/bug71311.phpt
new file mode 100644
index 0000000000..3c70783d37
--- /dev/null
+++ b/ext/standard/tests/serialize/bug71311.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71311 Use-after-free vulnerability in SPL(ArrayObject, unserialize)
+--FILE--
+<?php
+$data = unserialize("C:11:\"ArrayObject\":11:{x:i:0;r:3;XX");
+var_dump($data);
+?>
+--EXPECTF--
+Fatal error: Uncaught UnexpectedValueException: Error at offset 10 of 11 bytes in %s%ebug71311.php:2
+Stack trace:
+#0 [internal function]: ArrayObject->unserialize('x:i:0;r:3;X')
+#1 %s%ebug71311.php(2): unserialize('%s')
+#2 {main}
+ thrown in %s%ebug71311.php on line 2
+
+
diff --git a/ext/standard/tests/serialize/bug71313.phpt b/ext/standard/tests/serialize/bug71313.phpt
new file mode 100644
index 0000000000..2ad429227d
--- /dev/null
+++ b/ext/standard/tests/serialize/bug71313.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #71311 Use-after-free vulnerability in SPL(SplObjectStorage, unserialize)
+--FILE--
+<?php
+$data = unserialize("C:16:\"SplObjectStorage\":113:{x:i:2;O:8:\"stdClass\":0:{},a:2:{s:4:\"prev\";i:2;s:4:\"next\";O:8:\"stdClass\":0:{}};r:7;,R:2;s:4:\"next\";;r:3;};m:a:0:{}}");
+var_dump($data);
+?>
+--EXPECTF--
+Fatal error: Uncaught UnexpectedValueException: Error at offset 82 of 113 bytes in %s%ebug71313.php:2
+Stack trace:
+#0 [internal function]: SplObjectStorage->unserialize('%s')
+#1 %s%ebug71313.php(2): unserialize('%s')
+#2 {main}
+ thrown in %s%ebug71313.php on line 2
diff --git a/ext/standard/tests/serialize/bug71840.phpt b/ext/standard/tests/serialize/bug71840.phpt
new file mode 100644
index 0000000000..6cbf04bfb4
--- /dev/null
+++ b/ext/standard/tests/serialize/bug71840.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #71840 (Unserialize accepts wrongly data)
+--FILE--
+<?php
+var_dump(unserialize('a:1:{s:0:""0a:0:{}}'));
+?>
+--EXPECTF--
+Notice: unserialize(): Error at offset 11 of 19 bytes in %sbug71840.php on line %d
+bool(false)
diff --git a/ext/standard/tests/serialize/bug71940.phpt b/ext/standard/tests/serialize/bug71940.phpt
new file mode 100644
index 0000000000..c391ba6603
--- /dev/null
+++ b/ext/standard/tests/serialize/bug71940.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Bug #71940 (Unserialize crushes on restore object reference)
+--FILE--
+<?php
+
+class Identity
+{
+ private $role;
+
+ public function __construct($role)
+ {
+ $this->role = $role;
+ }
+}
+
+class Entry implements \Serializable
+{
+ private $identity;
+
+ public function __construct(Identity $identity)
+ {
+ $this->identity = $identity;
+ }
+
+ public function serialize()
+ {
+ return serialize(array($this->identity));
+ }
+
+ public function unserialize($serialized)
+ {
+ list($this->identity) = unserialize($serialized);
+ }
+}
+
+$identity = new Identity('test');
+$identityRef = &$identity;
+
+$entry1 = new Entry($identity);
+$entry2 = new Entry($identityRef);
+
+$serialized = serialize([$entry1, $entry2]);
+print_r(unserialize($serialized));
+
+?>
+--EXPECTF--
+Array
+(
+ [0] => Entry Object
+ (
+ [identity:Entry:private] => Identity Object
+ (
+ [role:Identity:private] => test
+ )
+
+ )
+
+ [1] => Entry Object
+ (
+ [identity:Entry:private] => Identity Object
+ (
+ [role:Identity:private] => test
+ )
+
+ )
+
+)
diff --git a/ext/standard/tests/serialize/bug71995.phpt b/ext/standard/tests/serialize/bug71995.phpt
new file mode 100644
index 0000000000..0f7ac98722
--- /dev/null
+++ b/ext/standard/tests/serialize/bug71995.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71995 (Returning the same var twice from __sleep() produces broken serialized data)
+--FILE--
+<?php
+
+class A {
+ public $b;
+ public function __construct() {
+ $this->b = new StdClass();
+ }
+ public function __sleep() {
+ return array("b", "b");
+ }
+}
+$a = new A();
+$s = serialize($a);
+var_dump($s);
+var_dump(unserialize($s));
+?>
+--EXPECTF--
+Notice: serialize(): "b" is returned from __sleep multiple times in %sbug71995.php on line %d
+string(39) "O:1:"A":1:{s:1:"b";O:8:"stdClass":0:{}}"
+object(A)#%d (1) {
+ ["b"]=>
+ object(stdClass)#%d (0) {
+ }
+}
diff --git a/ext/standard/tests/serialize/bug72229.phpt b/ext/standard/tests/serialize/bug72229.phpt
new file mode 100644
index 0000000000..17c393c7d4
--- /dev/null
+++ b/ext/standard/tests/serialize/bug72229.phpt
@@ -0,0 +1,53 @@
+--TEST--
+Bug #72229 (Wrong reference when serialize/unserialize an object)
+--FILE--
+<?php
+class C1
+{
+ public $arr1 = array();
+ public $arr2 = array();
+ public function __construct()
+ {
+ $this->arr1[0] = $this;
+ $this->arr2[0] = $this->arr1[0];
+ $var1 = &$this->arr1[0]; // Set a reference...
+ unset($var1); // ... and unset it.
+ }
+}
+$Obj1 = new C1();
+$txt1 = serialize($Obj1);
+$Obj2 = unserialize($txt1);
+$Obj1->arr2[0] = 50;
+print_r($Obj1);
+$Obj2->arr2[0] = 50;
+print_r($Obj2);
+?>
+--EXPECTF--
+C1 Object
+(
+ [arr1] => Array
+ (
+ [0] => C1 Object
+ *RECURSION*
+ )
+
+ [arr2] => Array
+ (
+ [0] => 50
+ )
+
+)
+C1 Object
+(
+ [arr1] => Array
+ (
+ [0] => C1 Object
+ *RECURSION*
+ )
+
+ [arr2] => Array
+ (
+ [0] => 50
+ )
+
+)
diff --git a/ext/standard/tests/serialize/unserialize_error_001.phpt b/ext/standard/tests/serialize/unserialize_error_001.phpt
new file mode 100644
index 0000000000..5589cbd835
--- /dev/null
+++ b/ext/standard/tests/serialize/unserialize_error_001.phpt
@@ -0,0 +1,52 @@
+--TEST--
+Test unserialize() with non-bool/array allowed_classes
+--FILE--
+<?php
+class foo {
+ public $x = "bar";
+}
+$z = array(new foo(), 2, "3");
+$s = serialize($z);
+
+var_dump(unserialize($s, ["allowed_classes" => null]));
+var_dump(unserialize($s, ["allowed_classes" => 0]));
+var_dump(unserialize($s, ["allowed_classes" => 1]));
+
+--EXPECTF--
+array(3) {
+ [0]=>
+ object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "foo"
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(__PHP_Incomplete_Class)#%d (2) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(3) "foo"
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
+array(3) {
+ [0]=>
+ object(foo)#%d (1) {
+ ["x"]=>
+ string(3) "bar"
+ }
+ [1]=>
+ int(2)
+ [2]=>
+ string(1) "3"
+}
diff --git a/ext/standard/tests/serialize/unserialize_subclasses.phpt b/ext/standard/tests/serialize/unserialize_subclasses.phpt
new file mode 100644
index 0000000000..1f2384f72b
--- /dev/null
+++ b/ext/standard/tests/serialize/unserialize_subclasses.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Test unserialize() with allowed_classes and subclasses
+--FILE--
+<?php
+
+class C {}
+class D extends C {}
+
+$c = serialize(new C);
+$d = serialize(new D);
+
+var_dump(unserialize($c, ["allowed_classes" => ["C"]]));
+var_dump(unserialize($c, ["allowed_classes" => ["D"]]));
+var_dump(unserialize($d, ["allowed_classes" => ["C"]]));
+var_dump(unserialize($d, ["allowed_classes" => ["D"]]));
+
+--EXPECTF--
+object(C)#%d (0) {
+}
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(1) "C"
+}
+object(__PHP_Incomplete_Class)#%d (1) {
+ ["__PHP_Incomplete_Class_Name"]=>
+ string(1) "D"
+}
+object(D)#%d (0) {
+}
diff --git a/ext/standard/tests/streams/bug70198.phpt b/ext/standard/tests/streams/bug70198.phpt
new file mode 100644
index 0000000000..bfba808769
--- /dev/null
+++ b/ext/standard/tests/streams/bug70198.phpt
@@ -0,0 +1,61 @@
+--TEST--
+Bug #70198 Checking liveness does not work as expected
+--SKIPIF--
+<?php
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+?>
+--FILE--
+<?php
+
+/* What is checked here is
+ - start a server and listen
+ - as soon as client connects, close connection and exit
+ - on the client side - sleep(1) and check feof()
+*/
+
+$srv_addr = "tcp://127.0.0.1:8964";
+$srv_fl = dirname(__FILE__) . "/bug70198_svr_" . md5(uniqid()) . ".php";
+$srv_fl_cont = <<<SRV
+<?php
+\$socket = stream_socket_server('$srv_addr', \$errno, \$errstr);
+
+if (!\$socket) {
+ echo "\$errstr (\$errno)\\n";
+} else {
+ if (\$conn = stream_socket_accept(\$socket, 3)) {
+ sleep(1);
+ /* just close the connection immediately after accepting,
+ the client side will need wait a bit longer to realize it.*/
+ fclose(\$conn);
+ }
+ fclose(\$socket);
+}
+SRV;
+file_put_contents($srv_fl, $srv_fl_cont);
+$dummy0 = $dummy1 = array();
+$srv_proc = proc_open(PHP_BINARY . " -n $srv_fl", $dummy0, $dummy1);
+
+$i = 0;
+/* wait a bit for the server startup */
+sleep(1);
+$fp = stream_socket_client($srv_addr, $errno, $errstr, 2);
+if (!$fp) {
+ echo "$errstr ($errno)\n";
+} else {
+ stream_set_blocking($fp, 0);
+ sleep(2);
+ while (!feof($fp)) {
+ ++$i;
+ }
+ fclose($fp);
+ var_dump($i);
+}
+
+proc_close($srv_proc);
+unlink($srv_fl);
+?>
+==DONE==
+--EXPECTF--
+int(0)
+==DONE==
+
diff --git a/ext/standard/tests/streams/bug71245.phpt b/ext/standard/tests/streams/bug71245.phpt
new file mode 100644
index 0000000000..e1d82f65f9
--- /dev/null
+++ b/ext/standard/tests/streams/bug71245.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #71245 (file_get_contents() ignores "header" context option if it's a reference)
+--FILE--
+<?php
+$headers = ['Host: okey.com'];
+$httpContext = [
+ 'http' => [
+ 'protocol_version' => '1.1',
+ 'method' => 'GET',
+ 'header' => &$headers,
+ 'follow_location' => 0,
+ 'max_redirects' => 0,
+ 'ignore_errors' => true,
+ 'timeout' => 60,
+ ],
+];
+$context = stream_context_create($httpContext);
+$headers = ["Host: bad.com"];
+print_r(stream_context_get_options($context));
+?>
+--EXPECTF--
+Array
+(
+ [http] => Array
+ (
+ [protocol_version] => 1.1
+ [method] => GET
+ [header] => Array
+ (
+ [0] => Host: okey.com
+ )
+
+ [follow_location] => 0
+ [max_redirects] => 0
+ [ignore_errors] => 1
+ [timeout] => 60
+ )
+
+)
diff --git a/ext/standard/tests/streams/bug71323.phpt b/ext/standard/tests/streams/bug71323.phpt
new file mode 100644
index 0000000000..dfe0bd8afe
--- /dev/null
+++ b/ext/standard/tests/streams/bug71323.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #71323: Output of stream_get_meta_data can be falsified by its input
+--FILE--
+<?php
+$file = 'data:text/plain;z=y;uri=eviluri;mediatype=wut?;mediatype2=hello,somedata';
+$meta = stream_get_meta_data(fopen($file, "r"));
+var_dump($meta);
+?>
+--EXPECTF--
+array(10) {
+ ["mediatype"]=>
+ string(10) "text/plain"
+ ["z"]=>
+ string(1) "y"
+ ["uri"]=>
+ string(72) "data:text/plain;z=y;uri=eviluri;mediatype=wut?;mediatype2=hello,somedata"
+ ["mediatype2"]=>
+ string(5) "hello"
+ ["base64"]=>
+ bool(false)
+ ["wrapper_type"]=>
+ string(7) "RFC2397"
+ ["stream_type"]=>
+ string(7) "RFC2397"
+ ["mode"]=>
+ string(1) "r"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(true)
+}
diff --git a/ext/standard/tests/streams/bug71884.phpt b/ext/standard/tests/streams/bug71884.phpt
new file mode 100644
index 0000000000..798c6b6431
--- /dev/null
+++ b/ext/standard/tests/streams/bug71884.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #71884 (Null pointer deref (segfault) in stream_context_get_default)
+--FILE--
+<?php
+$arr=array();
+$arr[0]['A']=0;
+stream_context_get_default($arr);
+?>
+--EXPECTF--
+Warning: stream_context_get_default(): options should have the form ["wrappername"]["optionname"] = $value in %sbug71884.php on line %d
diff --git a/ext/standard/tests/streams/bug72075.phpt b/ext/standard/tests/streams/bug72075.phpt
new file mode 100644
index 0000000000..93dce60350
--- /dev/null
+++ b/ext/standard/tests/streams/bug72075.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #72075 (Referencing socket resources breaks stream_select)
+--FILE--
+<?php
+$r = [stream_socket_server("tcp://127.0.0.1:0", $errno, $errStr)];
+$w = NULL;
+$e = NULL;
+
+// Without this line, all is well:
+$dummy =& $r[0];
+
+print stream_select($r, $w, $e, 0.5);
+
+--EXPECT--
+0
diff --git a/ext/standard/tests/streams/bug72221.phpt b/ext/standard/tests/streams/bug72221.phpt
new file mode 100644
index 0000000000..8f30099cab
--- /dev/null
+++ b/ext/standard/tests/streams/bug72221.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #72221 (Segmentation fault in stream_get_line / zend_memnstr_ex)
+--FILE--
+<?php
+$fp = fopen("php://memory", "r+");
+fwrite($fp, str_repeat("baad", 1024*1024));
+rewind($fp);
+stream_get_line($fp, 1024*1024*2, "aaaa");
+echo "Done\n";
+--EXPECT--
+Done
diff --git a/ext/standard/tests/streams/set_file_buffer.phpt b/ext/standard/tests/streams/set_file_buffer.phpt
new file mode 100644
index 0000000000..04d0fb121d
--- /dev/null
+++ b/ext/standard/tests/streams/set_file_buffer.phpt
@@ -0,0 +1,47 @@
+--TEST--
+int set_file_buffer ( resource $stream , int $buffer );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--FILE--
+<?php
+
+class test_wrapper {
+
+ function stream_open($path, $mode, $openedpath) {
+ return true;
+ }
+
+ function stream_eof() {
+ return false;
+ }
+
+ function stream_write($data) {
+ echo "size: ", strlen($data), "\n";
+ return strlen($data);
+ }
+
+ function stream_set_option($option, $arg1, $arg2) {
+ echo "option: ", $option, ", ", $arg1, ", ", $arg2, "\n";
+ return false;
+ }
+}
+
+var_dump(stream_wrapper_register('test', 'test_wrapper'));
+$fd = fopen("test://foo","r");
+var_dump(set_file_buffer($fd, 50));
+var_dump(stream_set_chunk_size($fd, 42));
+var_dump(fwrite($fd, str_repeat('0', 70)));
+?>
+--CLEAN--
+<?php
+fclose($fd);
+unset($fd);
+?>
+--EXPECTF--
+bool(true)
+option: %d, %d, %d
+int(%i)
+int(%d)
+size: %d
+size: %d
+int(%d)
diff --git a/ext/standard/tests/streams/stream_context_set_option_error_001.phpt b/ext/standard/tests/streams/stream_context_set_option_error_001.phpt
index 04b37ca115..ad75650b50 100644
--- a/ext/standard/tests/streams/stream_context_set_option_error_001.phpt
+++ b/ext/standard/tests/streams/stream_context_set_option_error_001.phpt
@@ -14,8 +14,8 @@ var_dump(stream_context_set_option($context, 'http'));
var_dump(stream_context_set_option($context, array(), 'foo', 'bar'));
?>
--EXPECTF--
-Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d
+Warning: stream_context_set_option() expects parameter 2 to be array, string given in %s on line %d
bool(false)
-Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d
+Warning: stream_context_set_option() expects parameter 2 to be string, array given in %s on line %d
bool(false)
diff --git a/ext/standard/tests/streams/stream_context_set_option_error_002.phpt b/ext/standard/tests/streams/stream_context_set_option_error_002.phpt
index e80fd39ed8..ea3a5db851 100644
--- a/ext/standard/tests/streams/stream_context_set_option_error_002.phpt
+++ b/ext/standard/tests/streams/stream_context_set_option_error_002.phpt
@@ -11,8 +11,8 @@ $context = stream_context_create();
var_dump(stream_context_set_option($context));
?>
--EXPECTF--
-Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d
+Warning: stream_context_set_option() expects exactly 4 parameters, 0 given in %s on line %d
bool(false)
-Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d
+Warning: stream_context_set_option() expects exactly 4 parameters, 1 given in %s on line %d
bool(false)
diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay.phpt
new file mode 100644
index 0000000000..ca3289fbc2
--- /dev/null
+++ b/ext/standard/tests/streams/stream_context_tcp_nodelay.phpt
@@ -0,0 +1,22 @@
+--TEST--
+stream context tcp_nodelay
+--SKIPIF--
+<?php if (!extension_loaded("sockets")) die("skip: need sockets") ?>
+--FILE--
+<?php
+$ctxt = stream_context_create([
+ "socket" => [
+ "tcp_nodelay" => true
+ ]
+]);
+
+$stream = stream_socket_client(
+ "tcp://www.php.net:80", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $ctxt);
+
+$socket =
+ socket_import_stream($stream);
+
+var_dump(socket_get_option($socket, SOL_TCP, TCP_NODELAY) > 0);
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt
new file mode 100644
index 0000000000..08ad4c2d2e
--- /dev/null
+++ b/ext/standard/tests/streams/stream_context_tcp_nodelay_fopen.phpt
@@ -0,0 +1,21 @@
+--TEST--
+stream context tcp_nodelay fopen
+--SKIPIF--
+<?php if (!extension_loaded("sockets")) die("skip: need sockets") ?>
+--FILE--
+<?php
+$ctxt = stream_context_create([
+ "socket" => [
+ "tcp_nodelay" => true
+ ]
+]);
+
+$stream = fopen("http://www.php.net", "r", false, $ctxt);
+
+$socket =
+ @socket_import_stream($stream);
+
+var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY) > 0);
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt
new file mode 100644
index 0000000000..6606a15052
--- /dev/null
+++ b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt
@@ -0,0 +1,47 @@
+--TEST--
+stream context tcp_nodelay server
+--SKIPIF--
+<?php if (!extension_loaded("sockets")) die("skip: need sockets") ?>
+--FILE--
+<?php
+$serverCode = <<<'CODE'
+ $ctxt = stream_context_create([
+ "socket" => [
+ "tcp_nodelay" => true
+ ]
+ ]);
+
+ $server = stream_socket_server(
+ "tcp://127.0.0.1:9099", $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $ctxt);
+
+ $client = stream_socket_accept($server);
+
+ var_dump(socket_get_option(
+ socket_import_stream($server),
+ SOL_TCP, TCP_NODELAY) > 0);
+
+ var_dump(socket_get_option(
+ socket_import_stream($client),
+ SOL_TCP, TCP_NODELAY) > 0);
+
+ fclose($client);
+ fclose($server);
+CODE;
+
+$clientCode = <<<'CODE'
+ $test = stream_socket_client(
+ "tcp://127.0.0.1:9099", $errno, $errstr, 10);
+
+ sleep(1);
+
+ fclose($test);
+CODE;
+
+include sprintf(
+ "%s/../../../openssl/tests/ServerClientTestCase.inc",
+ dirname(__FILE__));
+ServerClientTestCase::getInstance()->run($serverCode, $clientCode);
+?>
+--EXPECT--
+bool(false)
+bool(true)
diff --git a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt
index f46c8fd70b..6658d69a4b 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt
@@ -13,6 +13,12 @@ var_dump(stream_get_meta_data($dirObject->handle));
?>
--EXPECT--
array(8) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -23,14 +29,14 @@ array(8) {
int(0)
["seekable"]=>
bool(true)
+}
+array(8) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(8) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -41,10 +47,4 @@ array(8) {
int(0)
["seekable"]=>
bool(true)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt
index 4758c750f9..bad5987990 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_basic.phpt
@@ -12,6 +12,12 @@ fclose($fp);
?>
--EXPECTF--
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -24,10 +30,4 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%sstream_get_meta_data_file_basic.php"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt
index 572653e3db..d54eb04410 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation1.phpt
@@ -29,6 +29,12 @@ unlink($filename);
?>
--EXPECTF--
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -41,14 +47,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -61,14 +67,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -81,14 +87,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -101,14 +107,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -121,14 +127,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -141,14 +147,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -161,14 +167,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -181,14 +187,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -201,14 +207,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -221,14 +227,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -241,14 +247,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -261,14 +267,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -281,14 +287,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -301,14 +307,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -321,14 +327,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -341,14 +347,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -361,14 +367,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -381,14 +387,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -401,14 +407,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -421,14 +427,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -441,14 +447,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -461,14 +467,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -481,14 +487,14 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -501,10 +507,4 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt
index d186cb7e9b..6b3fde203a 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation2.phpt
@@ -43,6 +43,12 @@ unlink($filename);
--EXPECTF--
Write some data to the file:
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -55,12 +61,6 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
@@ -68,6 +68,12 @@ Read a line of the file, causing data to be buffered:
string(15) "a line of data
"
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -80,17 +86,17 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
+}
+
+
+Read 20 bytes from the file:
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Read 20 bytes from the file:
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -103,17 +109,17 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
Read entire file:
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -126,10 +132,4 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s.tmp"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(true)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt
index c51d9bd087..46a5ba5b37 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation4.phpt
@@ -28,6 +28,12 @@ unlink($filename);
--EXPECTF--
Create a file:
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -40,16 +46,16 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "File://%sstream_get_meta_data_file_variation4.php.tmp"
+}
+
+Change to file's directory and open with a relative path:
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-Change to file's directory and open with a relative path:
-array(9) {
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -62,10 +68,4 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "stream_get_meta_data_file_variation4.php.tmp"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt b/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt
index 386b92f421..22fcee4b6f 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_file_variation5.phpt
@@ -33,6 +33,12 @@ unlink($filename);
--EXPECTF--
Write some data to the file:
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -45,17 +51,17 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
Read entire file:
array(9) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
["wrapper_type"]=>
string(9) "plainfile"
["stream_type"]=>
@@ -68,10 +74,4 @@ array(9) {
bool(true)
["uri"]=>
string(%i) "%s"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(true)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt
index 3f4dfbc43a..b7ab37c7c5 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_process_basic.phpt
@@ -18,6 +18,12 @@ echo "Done";
?>
--EXPECT--
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(5) "STDIO"
["mode"]=>
@@ -26,11 +32,5 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
Done
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt
index 86c9cd77c8..66658bd5d0 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_basic.phpt
@@ -10,6 +10,12 @@ fclose($tcp_socket);
?>
--EXPECTF--
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -18,10 +24,4 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt
index 88d354b378..1c7f1fd256 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt
@@ -39,6 +39,12 @@ var_dump(stream_get_meta_data($client));
--EXPECTF--
Write some data:
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -47,17 +53,17 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
+}
+
+
+Read a line from the client, causing data to be buffered:
+array(7) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Read a line from the client, causing data to be buffered:
-array(7) {
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -66,17 +72,17 @@ array(7) {
int(15)
["seekable"]=>
bool(false)
+}
+
+
+Read 3 bytes of data from the client:
+array(7) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Read 3 bytes of data from the client:
-array(7) {
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -85,17 +91,17 @@ array(7) {
int(12)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
Close the server side socket and read the remaining data from the client:
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -104,10 +110,4 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(true)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt
index e8e39209c9..cb713c8525 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt
@@ -37,25 +37,12 @@ fclose($server);
?>
--EXPECTF--
array(7) {
- ["stream_type"]=>
- string(%d) "tcp_socke%s"
- ["mode"]=>
- string(2) "r+"
- ["unread_bytes"]=>
- int(0)
- ["seekable"]=>
- bool(false)
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Set a timeout on the client and attempt a read:
-array(7) {
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -64,17 +51,17 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
+}
+
+
+Set a timeout on the client and attempt a read:
+array(7) {
["timed_out"]=>
bool(true)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Write some data from the server:
-array(7) {
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -83,17 +70,17 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
+}
+
+
+Write some data from the server:
+array(7) {
["timed_out"]=>
bool(true)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Read some data from the client:
-array(7) {
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -102,10 +89,23 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
+}
+
+
+Read some data from the client:
+array(7) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
+ ["stream_type"]=>
+ string(%d) "tcp_socke%s"
+ ["mode"]=>
+ string(2) "r+"
+ ["unread_bytes"]=>
+ int(0)
+ ["seekable"]=>
+ bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt
index 5b68eba25d..c7f08cbe12 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt
@@ -32,6 +32,12 @@ fclose($server);
?>
--EXPECTF--
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -40,18 +46,18 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
Set blocking to false:
bool(true)
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(false)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -60,18 +66,18 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(false)
- ["eof"]=>
- bool(false)
}
Set blocking to true:
bool(true)
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -80,10 +86,4 @@ array(7) {
int(0)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt b/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt
index e3f59d10dc..e37e991f16 100644
--- a/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt
+++ b/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt
@@ -37,6 +37,12 @@ fclose($client);
--EXPECTF--
Write some data:
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -45,17 +51,17 @@ array(7) {
int(%i)
["seekable"]=>
bool(false)
+}
+
+
+Read a line from the client:
+array(7) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-
-Read a line from the client:
-array(7) {
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -64,17 +70,17 @@ array(7) {
int(%i)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
Close the server side socket and read the remaining data from the client:
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(true)
["stream_type"]=>
string(%d) "tcp_socke%s"
["mode"]=>
@@ -83,10 +89,4 @@ array(7) {
int(%i)
["seekable"]=>
bool(false)
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(true)
}
diff --git a/ext/standard/tests/streams/stream_get_transports.phpt b/ext/standard/tests/streams/stream_get_transports.phpt
new file mode 100644
index 0000000000..0d4e194d64
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_transports.phpt
@@ -0,0 +1,16 @@
+--TEST--
+array stream_get_transports ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+print((is_array(stream_get_transports())) ? ("yes") : ("Test 'array stream_get_transports ( void );' has failed"));
+?>
+--EXPECT--
+yes
diff --git a/ext/standard/tests/streams/stream_get_wrappers.phpt b/ext/standard/tests/streams/stream_get_wrappers.phpt
new file mode 100644
index 0000000000..58dfdc930d
--- /dev/null
+++ b/ext/standard/tests/streams/stream_get_wrappers.phpt
@@ -0,0 +1,21 @@
+--TEST--
+array stream_get_wrappers ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+print((is_array(stream_get_wrappers())) ? ("yes") : ("Test 'array stream_get_wrappers ( void );' has failed"));
+echo "\n";
+class Foo { }
+stream_wrapper_register("foo", "Foo");
+var_dump(in_array("foo", stream_get_wrappers()));
+?>
+--EXPECT--
+yes
+bool(true)
diff --git a/ext/standard/tests/streams/stream_socket_enable_crypto-win32.phpt b/ext/standard/tests/streams/stream_socket_enable_crypto-win32.phpt
new file mode 100644
index 0000000000..c61e93d038
--- /dev/null
+++ b/ext/standard/tests/streams/stream_socket_enable_crypto-win32.phpt
@@ -0,0 +1,70 @@
+--TEST--
+mixed stream_socket_enable_crypto(resource $stream , bool $enable [, int $crypto_type [, resource $session_stream ]] ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('openssl')) {
+ die('skip ext openssl required');
+}
+if (substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+?>
+--FILE--
+<?php
+$serverUri = "tcp://127.0.0.1:31854";
+$sock = stream_socket_server($serverUri, $errno, $errstr);
+
+if (is_resource($sock)) {
+ var_dump(stream_socket_enable_crypto($sock, false));
+ var_dump(stream_socket_enable_crypto($sock, true));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv23_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_SERVER));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_SERVER));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_SERVER));
+} else {
+ die("Test stream_socket_enable_crypto has failed; Unable to connect: {$errstr} ({$errno})");
+}
+?>
+--CLEAN--
+<?php
+unset($serverUri);
+unset($sock);
+unset($errno);
+unset($errstr);
+?>
+--EXPECTF--
+bool(false)
+
+Warning: stream_socket_enable_crypto(): When enabling encryption you must specify the crypto type in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSLv2 unavailable in the OpenSSL library against which PHP is linked in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
+ in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
diff --git a/ext/standard/tests/streams/stream_socket_enable_crypto.phpt b/ext/standard/tests/streams/stream_socket_enable_crypto.phpt
new file mode 100644
index 0000000000..e7ee3e5b3b
--- /dev/null
+++ b/ext/standard/tests/streams/stream_socket_enable_crypto.phpt
@@ -0,0 +1,69 @@
+--TEST--
+mixed stream_socket_enable_crypto(resource $stream , bool $enable [, int $crypto_type [, resource $session_stream ]] ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (!extension_loaded('openssl')) {
+ die('skip ext/openssl required');
+}
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip not for windows');
+}
+?>
+--FILE--
+<?php
+$serverUri = "tcp://127.0.0.1:31854";
+$sock = stream_socket_server($serverUri, $errno, $errstr);
+
+if (is_resource($sock)) {
+ var_dump(stream_socket_enable_crypto($sock, false));
+ var_dump(stream_socket_enable_crypto($sock, true));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv23_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_CLIENT));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_SERVER));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_SERVER));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER));
+ var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_SERVER));
+} else {
+ die("Test stream_socket_enable_crypto has failed; Unable to connect: {$errstr} ({$errno})");
+}
+?>
+--CLEAN--
+<?php
+unset($serverUri);
+unset($sock);
+unset($errno);
+unset($errstr);
+?>
+--EXPECTF--
+bool(false)
+
+Warning: stream_socket_enable_crypto(): When enabling encryption you must specify the crypto type in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL: Broken pipe in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
+
+Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
+bool(false)
diff --git a/ext/standard/tests/streams/stream_socket_get_name.phpt b/ext/standard/tests/streams/stream_socket_get_name.phpt
new file mode 100644
index 0000000000..17bf0b7db4
--- /dev/null
+++ b/ext/standard/tests/streams/stream_socket_get_name.phpt
@@ -0,0 +1,26 @@
+--TEST--
+string stream_socket_get_name ( resource $handle , bool $want_peer ) ;
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+$serverUri = "tcp://127.0.0.1:31854";
+$sock = stream_socket_server($serverUri, $errno, $errstr);
+
+var_dump(stream_socket_get_name($sock, false));
+var_dump(stream_socket_get_name($sock, true));
+?>
+--CLEAN--
+<?php
+unset($serverUri);
+unset($sock);
+?>
+--EXPECT--
+string(15) "127.0.0.1:31854"
+bool(false)
diff --git a/ext/standard/tests/streams/stream_socket_recvfrom.phpt b/ext/standard/tests/streams/stream_socket_recvfrom.phpt
new file mode 100644
index 0000000000..f4161288ff
--- /dev/null
+++ b/ext/standard/tests/streams/stream_socket_recvfrom.phpt
@@ -0,0 +1,34 @@
+--TEST--
+string stream_socket_recvfrom ( resource $socket , int $length [, int $flags = 0 [, string &$address ]] );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
+--SKIPIF--
+<?php
+if (phpversion() < "5.3.0") {
+ die('SKIP php version so lower.');
+}
+?>
+--FILE--
+<?php
+$serverUri = "tcp://127.0.0.1:31854";
+$sock = stream_socket_server($serverUri, $errno, $errstr);
+$sockLen = 1500;
+
+var_dump(stream_socket_recvfrom($sock, $sockLen));
+var_dump(stream_socket_recvfrom($sock, $sockLen, STREAM_OOB));
+var_dump(stream_socket_recvfrom($sock, $sockLen, STREAM_PEEK));
+?>
+--CLEAN--
+<?php
+fclose($sock);
+unset($serverUri);
+unset($clientFlags);
+unset($sock);
+unset($sockLen);
+unset($errno);
+unset($errstr);
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
diff --git a/ext/standard/tests/strings/basename_invalid_path.phpt b/ext/standard/tests/strings/basename_invalid_path.phpt
new file mode 100644
index 0000000000..b632efa845
--- /dev/null
+++ b/ext/standard/tests/strings/basename_invalid_path.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test basename() function : usage variations with invalid paths
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) == "WIN"))
+ die('skip not for Windows"');
+?>
+--FILE--
+<?php
+/* Prototype: string basename ( string $path [, string $suffix] );
+ Description: Given a string containing a path to a file,
+ this function will return the base name of the file.
+ If the filename ends in suffix this will also be cut off.
+*/
+
+var_dump(basename(chr(-1)));
+
+echo "Done\n";
+
+--EXPECTF--
+string(0) ""
+Done
diff --git a/ext/standard/tests/strings/basename_invalid_path_win.phpt b/ext/standard/tests/strings/basename_invalid_path_win.phpt
new file mode 100644
index 0000000000..587f2b114c
--- /dev/null
+++ b/ext/standard/tests/strings/basename_invalid_path_win.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test basename() function : usage variations with invalid paths
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) != "WIN"))
+ die('skip Run only on Windows"');
+?>
+--FILE--
+<?php
+/* Prototype: string basename ( string $path [, string $suffix] );
+ Description: Given a string containing a path to a file,
+ this function will return the base name of the file.
+ If the filename ends in suffix this will also be cut off.
+*/
+
+var_dump(basename("\377"));
+
+echo "Done\n";
+
+--EXPECTF--
+string(1) "%c"
+Done
diff --git a/ext/standard/tests/strings/basename_variation.phpt b/ext/standard/tests/strings/basename_variation.phpt
index 2d74a389ab..1efd8c701a 100644
--- a/ext/standard/tests/strings/basename_variation.phpt
+++ b/ext/standard/tests/strings/basename_variation.phpt
@@ -66,7 +66,7 @@ $file_path_variations = array (
/* empty paths */
array(""),
array(''),
- array(NULL)
+ array(NULL),
);
function check_basename( $path_arrays ) {
diff --git a/ext/standard/tests/strings/bug40754.phpt b/ext/standard/tests/strings/bug40754.phpt
index 6cfe47056b..84e4337463 100644
--- a/ext/standard/tests/strings/bug40754.phpt
+++ b/ext/standard/tests/strings/bug40754.phpt
@@ -32,7 +32,7 @@ var_dump(substr("abcde", $v, $v));
bool(false)
bool(false)
-Warning: substr_count(): Offset value 2147483647 exceeds string length in %s on line %d
+Warning: substr_count(): Offset not contained in string in %s on line %d
bool(false)
Warning: substr_compare(): The start position cannot exceed initial string length in %s on line %d
@@ -41,10 +41,10 @@ bool(false)
Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-Warning: substr_count(): Offset value 2147483647 exceeds string length in %s on line %d
+Warning: substr_count(): Offset not contained in string in %s on line %d
bool(false)
-Warning: substr_count(): Length value 2147483647 exceeds string length in %s on line %d
+Warning: substr_count(): Invalid length value in %s on line %d
bool(false)
Warning: strpos(): Offset not contained in string in %s on line %d
diff --git a/ext/standard/tests/strings/bug53021.phpt b/ext/standard/tests/strings/bug53021.phpt
index 4a8fbe4f76..38d904761d 100644
--- a/ext/standard/tests/strings/bug53021.phpt
+++ b/ext/standard/tests/strings/bug53021.phpt
@@ -10,11 +10,14 @@ echo html_entity_decode("&quot;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&quot;", ENT_COMPAT, 'UTF-8'), "\n";
echo html_entity_decode("&#34;", ENT_COMPAT, 'UTF-8'), "\n";
+echo html_entity_decode("&quot;"), "\n";
+echo html_entity_decode("&#34;"), "\n";
echo "\nsingle quotes variations:", "\n";
echo html_entity_decode("&#39;", ENT_NOQUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#39;", ENT_QUOTES, 'UTF-8'), "\n";
echo html_entity_decode("&#39;", ENT_COMPAT, 'UTF-8'), "\n";
+echo html_entity_decode("&#39;"), "\n";
--EXPECT--
array(1) {
[1]=>
@@ -27,8 +30,11 @@ double quotes variations:
"
"
"
+"
+"
single quotes variations:
&#39;
'
&#39;
+&#39;
diff --git a/ext/standard/tests/strings/bug55871.phpt b/ext/standard/tests/strings/bug55871.phpt
index 249d1bd3a3..0044f50ce7 100644
--- a/ext/standard/tests/strings/bug55871.phpt
+++ b/ext/standard/tests/strings/bug55871.phpt
@@ -41,6 +41,8 @@ array(1) {
[0]=>
string(0) ""
}
+
+Warning: A non-numeric value encountered in %s on line %d
array(1) {
[0]=>
string(40) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
diff --git a/ext/standard/tests/strings/bug65769.phpt b/ext/standard/tests/strings/bug65769.phpt
index 15dad45bd5..23eeda9fd1 100644
--- a/ext/standard/tests/strings/bug65769.phpt
+++ b/ext/standard/tests/strings/bug65769.phpt
@@ -73,7 +73,7 @@ string(19) "Serbian_Serbia.1250"
string(1) ","
string(1) "."
string(3) "RSD"
-string(4) "din."
+string(3) "RSD"
string(1) ","
string(1) "."
++++++++++++++++++++++
diff --git a/ext/standard/tests/strings/bug70487.phpt b/ext/standard/tests/strings/bug70487.phpt
new file mode 100644
index 0000000000..e4ca1ff0b4
--- /dev/null
+++ b/ext/standard/tests/strings/bug70487.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #70487: pack('x') produces an error
+--FILE--
+<?php
+
+var_dump(pack('x') === "\0");
+
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/standard/tests/strings/bug70667.phpt b/ext/standard/tests/strings/bug70667.phpt
new file mode 100644
index 0000000000..fd3deadb29
--- /dev/null
+++ b/ext/standard/tests/strings/bug70667.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #70667 (strtr() causes invalid writes and a crashes)
+--FILE--
+<?php
+$a = array("{{language_id}}"=>"255", "{{partner_name}}"=>"test1");
+var_dump(strtr("Sign in to test1", $a));
+?>
+--EXPECT--
+string(16) "Sign in to test1"
diff --git a/ext/standard/tests/strings/bug70720.phpt b/ext/standard/tests/strings/bug70720.phpt
new file mode 100644
index 0000000000..6cdc600c2d
--- /dev/null
+++ b/ext/standard/tests/strings/bug70720.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #70720 (strip_tags() doesnt handle "xml" correctly)
+--FILE--
+<?php
+var_dump(strip_tags('<?php $dom->test(); ?> this is a test'));
+var_dump(strip_tags('<?php $xml->test(); ?> this is a test'));
+var_dump(strip_tags('<?xml $xml->test(); ?> this is a test'));
+
+/* "->" case in HTML */
+var_dump(strip_tags("<span class=sf-dump-> this is a test</span>"));
+?>
+--EXPECTF--
+string(15) " this is a test"
+string(15) " this is a test"
+string(15) " this is a test"
+string(15) " this is a test"
diff --git a/ext/standard/tests/strings/bug71188.phpt b/ext/standard/tests/strings/bug71188.phpt
new file mode 100644
index 0000000000..10738253c4
--- /dev/null
+++ b/ext/standard/tests/strings/bug71188.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71188 (str_replace converts integers in original $search array to strings)
+--FILE--
+<?php
+$a = [0, 1, 2];
+$b = ["Nula", "Jedna", "Dva"];
+
+var_dump($a);
+str_replace($a, $b, "1");
+var_dump($a);
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
diff --git a/ext/standard/tests/strings/bug71190.phpt b/ext/standard/tests/strings/bug71190.phpt
new file mode 100644
index 0000000000..feabe7c172
--- /dev/null
+++ b/ext/standard/tests/strings/bug71190.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #71190 (substr_replace converts integers in original $search array to strings)
+--FILE--
+<?php
+$b = [0, 1, 2];
+
+var_dump($b);
+substr_replace("test", $b, "1");
+var_dump($b);
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
diff --git a/ext/standard/tests/strings/bug71806.dat b/ext/standard/tests/strings/bug71806.dat
new file mode 100644
index 0000000000..c999da61c2
--- /dev/null
+++ b/ext/standard/tests/strings/bug71806.dat
@@ -0,0 +1,3 @@
+<?php
+/* comment */
+echo 098 ;
diff --git a/ext/standard/tests/strings/bug71806.phpt b/ext/standard/tests/strings/bug71806.phpt
new file mode 100644
index 0000000000..6eb534d0a0
--- /dev/null
+++ b/ext/standard/tests/strings/bug71806.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #71806 (php_strip_whitespace() fails on some numerical values)
+--FILE--
+<?php
+
+echo php_strip_whitespace(__DIR__ . '/bug71806.dat');
+
+?>
+--EXPECT--
+<?php
+ echo 098 ;
diff --git a/ext/standard/tests/strings/bug71969.phpt b/ext/standard/tests/strings/bug71969.phpt
new file mode 100644
index 0000000000..aafceb09ad
--- /dev/null
+++ b/ext/standard/tests/strings/bug71969.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71969 (str_replace returns an incorrect resulting array after a foreach by reference)
+--FILE--
+<?php
+$a = array(
+ array("one" => array("a"=>"0000", "b"=>"1111")),
+);
+
+//foreach by reference, changing the array value
+foreach($a as &$record)
+{
+ $record["one"]["a"] = "2222";
+}
+var_dump(str_replace("2", "3", $a));
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ array(1) {
+ ["one"]=>
+ array(2) {
+ ["a"]=>
+ string(4) "2222"
+ ["b"]=>
+ string(4) "1111"
+ }
+ }
+}
diff --git a/ext/standard/tests/strings/bug72100.phpt b/ext/standard/tests/strings/bug72100.phpt
new file mode 100644
index 0000000000..7fcc0831b6
--- /dev/null
+++ b/ext/standard/tests/strings/bug72100.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Test implode() function, problems with big numbers
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+var_dump( implode(" ", ["hello long", 999999999999999999, PHP_INT_MAX]));
+var_dump( implode(" ", ["hello negative long", -999999999999999999, PHP_INT_MIN] ) );
+var_dump( implode(" ", ["hello small long", -101, -100, -99, -90, -11, -10, -9, -1, 0, 1, 2, 9, 10, 11, 90, 99, 100, 101] ) );
+echo "Done\n";
+?>
+--EXPECT--
+string(49) "hello long 999999999999999999 9223372036854775807"
+string(60) "hello negative long -999999999999999999 -9223372036854775808"
+string(76) "hello small long -101 -100 -99 -90 -11 -10 -9 -1 0 1 2 9 10 11 90 99 100 101"
+Done
diff --git a/ext/standard/tests/strings/dirname_error.phpt b/ext/standard/tests/strings/dirname_error.phpt
index bf6310283b..303a59b2d5 100644
--- a/ext/standard/tests/strings/dirname_error.phpt
+++ b/ext/standard/tests/strings/dirname_error.phpt
@@ -9,17 +9,23 @@ echo "*** Testing error conditions ***\n";
// zero arguments
var_dump( dirname() );
+// Bad arg
+var_dump( dirname("/var/tmp/bar.gz", 0) );
+
// more than expected no. of arguments
-var_dump( dirname("/var/tmp/bar.gz", ".gz") );
+var_dump( dirname("/var/tmp/bar.gz", 1, ".gz") );
echo "Done\n";
?>
--EXPECTF--
*** Testing error conditions ***
-Warning: dirname() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: dirname() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: dirname(): Invalid argument, levels must be >= 1 in %s on line %d
NULL
-Warning: dirname() expects exactly 1 parameter, 2 given in %s on line %d
+Warning: dirname() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
diff --git a/ext/standard/tests/strings/dirname_multi.phpt b/ext/standard/tests/strings/dirname_multi.phpt
new file mode 100644
index 0000000000..febbd0c293
--- /dev/null
+++ b/ext/standard/tests/strings/dirname_multi.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Test dirname() function : usage variations
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) == "WIN"))
+ die('skip not for Windows');
+?>
+--FILE--
+<?php
+/* Prototype: string dirname ( string $path [, int nb]);
+ Description: Returns directory name component of path.
+*/
+for ($i=0 ; $i<5 ; $i++) {
+ var_dump(dirname("/foo/bar/baz", $i));
+}
+var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
+?>
+Done
+--EXPECTF--
+Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi.php on line %d
+NULL
+string(8) "/foo/bar"
+string(4) "/foo"
+string(1) "/"
+string(1) "/"
+string(1) "/"
+Done
diff --git a/ext/standard/tests/strings/dirname_multi_win.phpt b/ext/standard/tests/strings/dirname_multi_win.phpt
new file mode 100644
index 0000000000..4fed5895e6
--- /dev/null
+++ b/ext/standard/tests/strings/dirname_multi_win.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test dirname() function : usage variations
+--SKIPIF--
+<?php
+if((substr(PHP_OS, 0, 3) != "WIN"))
+ die('skip Windows only');
+?>
+--FILE--
+<?php
+/* Prototype: string dirname ( string $path [, int nb]);
+ Description: Returns directory name component of path.
+*/
+for ($i=0 ; $i<5 ; $i++) {
+ var_dump(dirname("/foo/bar/baz", $i));
+}
+var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
+var_dump(dirname("g:/foo/bar/baz", PHP_INT_MAX));
+var_dump(dirname("g:foo/bar/baz", PHP_INT_MAX));
+?>
+Done
+--EXPECTF--
+Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi_win.php on line %d
+NULL
+string(8) "/foo/bar"
+string(4) "/foo"
+string(1) "\"
+string(1) "\"
+string(1) "\"
+string(3) "g:\"
+string(3) "g:."
+Done
diff --git a/ext/standard/tests/strings/html_entity_decode3.phpt b/ext/standard/tests/strings/html_entity_decode3.phpt
index fcf2710679..48cff17bda 100644
--- a/ext/standard/tests/strings/html_entity_decode3.phpt
+++ b/ext/standard/tests/strings/html_entity_decode3.phpt
@@ -14,6 +14,7 @@ $tests = array(
"&#x0E;",
"&#x1F;",
"&#x20;", //allowed always
+ "&#x27;", //single quote, depends on flags
"&#x7F;", //DEL
"&#x80;", //C1
"&#x9F;",
@@ -76,6 +77,17 @@ foreach ($tests as $t) {
}
}
+echo "\n*** Default options ***\n";
+
+foreach ($tests as $t) {
+ $dec = html_entity_decode($t);
+ if ($t == $dec) {
+ echo "$t\tNOT DECODED\n";
+ } else {
+ echo "$t\tDECODED\n";
+ }
+}
+
echo "\nDone.\n";
--EXPECT--
*** HTML 4.01 ***
@@ -89,6 +101,7 @@ echo "\nDone.\n";
&#x0E; NOT DECODED
&#x1F; NOT DECODED
&#x20; DECODED
+&#x27; DECODED
&#x7F; NOT DECODED
&#x80; NOT DECODED
&#x9F; NOT DECODED
@@ -117,6 +130,7 @@ echo "\nDone.\n";
&#x0E; NOT DECODED
&#x1F; NOT DECODED
&#x20; DECODED
+&#x27; DECODED
&#x7F; DECODED
&#x80; DECODED
&#x9F; DECODED
@@ -145,6 +159,7 @@ echo "\nDone.\n";
&#x0E; NOT DECODED
&#x1F; NOT DECODED
&#x20; DECODED
+&#x27; DECODED
&#x7F; NOT DECODED
&#x80; NOT DECODED
&#x9F; NOT DECODED
@@ -173,6 +188,7 @@ echo "\nDone.\n";
&#x0E; NOT DECODED
&#x1F; NOT DECODED
&#x20; DECODED
+&#x27; DECODED
&#x7F; DECODED
&#x80; DECODED
&#x9F; DECODED
@@ -190,4 +206,33 @@ echo "\nDone.\n";
&#x2FFFE; DECODED
&#x2FFFF; DECODED
+*** Default options ***
+&#0; NOT DECODED
+&#1; NOT DECODED
+&#x09; DECODED
+&#x0A; DECODED
+&#x0B; NOT DECODED
+&#x0C; NOT DECODED
+&#x0D; DECODED
+&#x0E; NOT DECODED
+&#x1F; NOT DECODED
+&#x20; DECODED
+&#x27; NOT DECODED
+&#x7F; NOT DECODED
+&#x80; NOT DECODED
+&#x9F; NOT DECODED
+&#xA0; DECODED
+&#xD7FF; DECODED
+&#xD800; NOT DECODED
+&#xDFFF; NOT DECODED
+&#xE000; DECODED
+&#xFFFE; DECODED
+&#xFFFF; DECODED
+&#xFDCF; DECODED
+&#xFDD0; DECODED
+&#xFDEF; DECODED
+&#xFDF0; DECODED
+&#x2FFFE; DECODED
+&#x2FFFF; DECODED
+
Done.
diff --git a/ext/standard/tests/strings/money_format_error.phpt b/ext/standard/tests/strings/money_format_error.phpt
index cf110b43ab..454b593537 100644
--- a/ext/standard/tests/strings/money_format_error.phpt
+++ b/ext/standard/tests/strings/money_format_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test money_format() function : error conditions
+Test money_format() function : error conditions
--SKIPIF--
<?php
if (!function_exists('money_format')) {
@@ -30,9 +30,10 @@ echo "\n-- Testing money_format() function with insufficient arguments --\n";
var_dump( money_format($string) );
echo "\n-- Testing money_format() function with more than expected no. of arguments --\n";
-
var_dump( money_format($string, $value, $extra_arg) );
+echo "\n-- Testing money_format() function with more than one token --\n";
+var_dump( money_format($string . $string, $value) );
?>
===DONE===
--EXPECTF--
@@ -52,4 +53,9 @@ NULL
Warning: money_format() expects exactly 2 parameters, 3 given in %s on line %d
NULL
-===DONE=== \ No newline at end of file
+
+-- Testing money_format() function with more than one token --
+
+Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
+bool(false)
+===DONE===
diff --git a/ext/standard/tests/strings/moneyformat.phpt b/ext/standard/tests/strings/moneyformat.phpt
index db6c48c7d5..39245772bc 100644
--- a/ext/standard/tests/strings/moneyformat.phpt
+++ b/ext/standard/tests/strings/moneyformat.phpt
@@ -14,10 +14,6 @@ if (setlocale(LC_MONETARY, 'en_US') === false) {
<?php
setlocale(LC_MONETARY, 'en_US');
var_dump( money_format("X%nY", 3.1415));
-var_dump(money_format("AAAAA%n%n%n%n", NULL));
?>
--EXPECTF--
string(7) "X$3.14Y"
-
-Warning: money_format(): Only a single %ci or %cn token can be used in %s on line %d
-bool(false)
diff --git a/ext/standard/tests/strings/str_pad_variation5.phpt b/ext/standard/tests/strings/str_pad_variation5.phpt
index d050ae80e8..f1f47b932c 100644
--- a/ext/standard/tests/strings/str_pad_variation5.phpt
+++ b/ext/standard/tests/strings/str_pad_variation5.phpt
@@ -31,4 +31,4 @@ var_dump( str_pad($input, $pad_length) );
--EXPECTF--
*** Testing str_pad() function: with large value for for 'pad_length' argument ***
-Fatal error: Allowed memory size of 134217728 bytes exhausted%s(tried to allocate 2147483648 bytes) in %s on line %d
+Fatal error: Allowed memory size of 134217728 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
diff --git a/ext/standard/tests/strings/stripos_basic2.phpt b/ext/standard/tests/strings/stripos_basic2.phpt
index 3022bae168..226d3f61d2 100644
--- a/ext/standard/tests/strings/stripos_basic2.phpt
+++ b/ext/standard/tests/strings/stripos_basic2.phpt
@@ -18,6 +18,9 @@ var_dump( stripos("Hello, World", "Hello", 0) );
var_dump( stripos("Hello, World", 'Hello', 1) );
var_dump( stripos('Hello, World', 'WORLD', 1) );
var_dump( stripos('Hello, World', "WoRld", 5) );
+var_dump( stripos('Hello, World', "WoRld", -6) );
+var_dump( stripos('Hello, World', "WoRld", -3) );
+var_dump( stripos('Hello, World', "WoRld", -12) );
//heredoc string for haystack & needle, with various offsets
var_dump( stripos($heredoc_str, "Hello, World", 0) );
@@ -25,12 +28,19 @@ var_dump( stripos($heredoc_str, 'Hello', 0) );
var_dump( stripos($heredoc_str, 'Hello', 1) );
var_dump( stripos($heredoc_str, $heredoc_str, 0) );
var_dump( stripos($heredoc_str, $heredoc_str, 1) );
+var_dump( stripos($heredoc_str, $heredoc_str, -strlen($heredoc_str)) );
+var_dump( stripos($heredoc_str, $heredoc_str, -strlen($heredoc_str)+1) );
//various offsets
var_dump( stripos("Hello, World", "o", 3) );
var_dump( stripos("Hello, World", "O", 5) );
var_dump( stripos("Hello, World", "o", 6) );
var_dump( stripos("Hello, World", "o", 10) );
+var_dump( stripos("Hello, World", "o", -7) );
+var_dump( stripos("Hello, World", "o", -8) );
+var_dump( stripos("Hello, World", "o", -10) );
+var_dump( stripos("Hello, World", "o", -4) );
+var_dump( stripos("Hello, World", "o", -3) );
echo "*** Done ***";
?>
--EXPECTF--
@@ -40,13 +50,23 @@ int(0)
bool(false)
int(7)
int(7)
+int(7)
+bool(false)
+int(7)
int(0)
int(0)
bool(false)
int(0)
bool(false)
+int(0)
+bool(false)
int(4)
int(8)
int(8)
bool(false)
+int(8)
+int(4)
+int(4)
+int(8)
+bool(false)
*** Done ***
diff --git a/ext/standard/tests/strings/stripos_error.phpt b/ext/standard/tests/strings/stripos_error.phpt
index ef6ad9e6ec..c59473046d 100644
--- a/ext/standard/tests/strings/stripos_error.phpt
+++ b/ext/standard/tests/strings/stripos_error.phpt
@@ -16,6 +16,13 @@ var_dump( stripos("String") );
echo "\n-- With more than expected number of arguments --";
var_dump( stripos("string", "String", 1, 'extra_arg') );
+
+echo "\n-- Offset beyond the end of the string --";
+var_dump( stripos("Hello World", "o", 12) );
+
+echo "\n-- Offset before the start of the string --";
+var_dump( stripos("Hello World", "o", -12) );
+
echo "*** Done ***";
?>
--EXPECTF--
@@ -32,4 +39,12 @@ NULL
-- With more than expected number of arguments --
Warning: stripos() expects at most 3 parameters, 4 given in %s on line %d
NULL
+
+-- Offset beyond the end of the string --
+Warning: stripos(): Offset not contained in string in %s on line %d
+bool(false)
+
+-- Offset before the start of the string --
+Warning: stripos(): Offset not contained in string in %s on line %d
+bool(false)
*** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation14.phpt b/ext/standard/tests/strings/stripos_variation14.phpt
index aabf0e62ea..3339e2f27e 100644
--- a/ext/standard/tests/strings/stripos_variation14.phpt
+++ b/ext/standard/tests/strings/stripos_variation14.phpt
@@ -1,7 +1,5 @@
--TEST--
Test stripos() function : usage variations - unexpected inputs for 'offset' argument
---SKIPIF--
-<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
--FILE--
<?php
/* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
@@ -37,7 +35,7 @@ $offsets = array (
// float values
1.5,
-1.5,
- 1.5e10,
+ 1.5e6,
1.6E-10,
.5,
@@ -91,8 +89,6 @@ echo "*** Done ***";
-- Iteration 1 --
int(6)
-- Iteration 2 --
-
-Warning: stripos(): Offset not contained in string in %s on line %d
bool(false)
-- Iteration 3 --
diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt
index 36854d1b37..f5d60a69b5 100644
--- a/ext/standard/tests/strings/strpos.phpt
+++ b/ext/standard/tests/strings/strpos.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/substr_count_basic.phpt b/ext/standard/tests/strings/substr_count_basic.phpt
index f880e9481e..c7c96fd55b 100644
--- a/ext/standard/tests/strings/substr_count_basic.phpt
+++ b/ext/standard/tests/strings/substr_count_basic.phpt
@@ -9,12 +9,17 @@ var_dump(@substr_count("a", ""));
var_dump(@substr_count("", "a"));
var_dump(@substr_count("", "a"));
var_dump(@substr_count("", chr(0)));
+
$a = str_repeat("abcacba", 100);
var_dump(@substr_count($a, "bca"));
+
$a = str_repeat("abcacbabca", 100);
var_dump(@substr_count($a, "bca"));
var_dump(substr_count($a, "bca", 200));
var_dump(substr_count($a, "bca", 200, 50));
+var_dump(substr_count($a, "bca", -200));
+var_dump(substr_count($a, "bca", -200, 50));
+var_dump(substr_count($a, "bca", -200, -50));
echo "Done\n";
@@ -30,4 +35,7 @@ int(100)
int(200)
int(160)
int(10)
+int(40)
+int(10)
+int(30)
Done
diff --git a/ext/standard/tests/strings/substr_count_error.phpt b/ext/standard/tests/strings/substr_count_error.phpt
index f6924217b9..881da391e6 100644
--- a/ext/standard/tests/strings/substr_count_error.phpt
+++ b/ext/standard/tests/strings/substr_count_error.phpt
@@ -4,27 +4,31 @@ Test substr_count() function (error conditions)
<?php
echo "\n*** Testing error conditions ***\n";
+$str = 'abcdefghik';
+
/* Zero argument */
var_dump( substr_count() );
/* more than expected no. of args */
var_dump( substr_count($str, "t", 0, 15, 30) );
-/* offset as negative value */
-var_dump(substr_count($str, "t", -5));
+/* offset before start */
+var_dump(substr_count($str, "t", -20));
/* offset > size of the string */
var_dump(substr_count($str, "t", 25));
/* Using offset and length to go beyond the size of the string:
Warning message expected, as length+offset > length of string */
-var_dump( substr_count($str, "i", 5, 15) );
+var_dump( substr_count($str, "i", 5, 7) );
-/* length as Null */
-var_dump( substr_count($str, "t", "", "") );
-var_dump( substr_count($str, "i", NULL, NULL) );
-
-echo "Done\n";
+/* Invalid offset argument */
+var_dump( substr_count($str, "t", "") );
+
+/* length too small */
+var_dump( substr_count($str, "t", 2, -20) );
+
+echo "Done\n";
?>
--EXPECTF--
@@ -33,33 +37,21 @@ echo "Done\n";
Warning: substr_count() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Notice: Undefined variable: str in %s on line %d
-
Warning: substr_count() expects at most 4 parameters, 5 given in %s on line %d
NULL
-Notice: Undefined variable: str in %s on line %d
-
-Warning: substr_count(): Offset should be greater than or equal to 0 in %s on line %d
+Warning: substr_count(): Offset not contained in string in %s on line %d
bool(false)
-Notice: Undefined variable: str in %s on line %d
-
-Warning: substr_count(): Offset value 25 exceeds string length in %s on line %d
+Warning: substr_count(): Offset not contained in string in %s on line %d
bool(false)
-Notice: Undefined variable: str in %s on line %d
-
-Warning: substr_count(): Offset value 5 exceeds string length in %s on line %d
+Warning: substr_count(): Invalid length value in %s on line %d
bool(false)
-Notice: Undefined variable: str in %s on line %d
-
Warning: substr_count() expects parameter 3 to be integer, string given in %s on line %d
NULL
-Notice: Undefined variable: str in %s on line %d
-
-Warning: substr_count(): Length should be greater than 0 in %s on line %d
+Warning: substr_count(): Invalid length value in %s on line %d
bool(false)
Done
diff --git a/ext/standard/tests/strings/substr_replace_error.phpt b/ext/standard/tests/strings/substr_replace_error.phpt
index fd314cbd9d..0a15035af2 100644
--- a/ext/standard/tests/strings/substr_replace_error.phpt
+++ b/ext/standard/tests/strings/substr_replace_error.phpt
@@ -52,19 +52,19 @@ NULL
-- Testing substr_replace() function with start and length different types --
-Warning: substr_replace(): 'from' and 'len' should be of same type - numerical or array in %s on line %d
+Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d
string(12) "Good morning"
-Warning: substr_replace(): 'from' and 'len' should be of same type - numerical or array in %s on line %d
+Warning: substr_replace(): 'start' and 'length' should be of same type - numerical or array in %s on line %d
string(12) "Good morning"
-- Testing substr_replace() function with start and length with a different number of elements --
-Warning: substr_replace(): 'from' and 'len' should have the same number of elements in %s on line %d
+Warning: substr_replace(): 'start' and 'length' should have the same number of elements in %s on line %d
string(12) "Good morning"
-- Testing substr_replace() function with start and length as arrays but string not--
-Warning: substr_replace(): Functionality of 'from' and 'len' as arrays is not implemented in %s on line %d
+Warning: substr_replace(): Functionality of 'start' and 'length' as arrays is not implemented in %s on line %d
string(12) "Good morning"
-===DONE=== \ No newline at end of file
+===DONE===
diff --git a/ext/standard/tests/strings/unpack_error.phpt b/ext/standard/tests/strings/unpack_error.phpt
index 1ef97ccbaf..3a4f334c3b 100644
--- a/ext/standard/tests/strings/unpack_error.phpt
+++ b/ext/standard/tests/strings/unpack_error.phpt
@@ -15,7 +15,7 @@ var_dump( unpack() );
echo "\n-- Testing unpack() function with more than expected no. of arguments --\n";
$extra_arg = 10;
-var_dump(unpack("I", pack("I", 65534), $extra_arg));
+var_dump(unpack("I", pack("I", 65534), 0, $extra_arg));
echo "\n-- Testing unpack() function with invalid format character --\n";
$extra_arg = 10;
@@ -27,12 +27,12 @@ var_dump(unpack("G", pack("I", 65534)));
-- Testing unpack() function with no arguments --
-Warning: unpack() expects exactly 2 parameters, 0 given in %s on line %d
+Warning: unpack() expects at least 2 parameters, 0 given in %s on line %d
NULL
-- Testing unpack() function with more than expected no. of arguments --
-Warning: unpack() expects exactly 2 parameters, 3 given in %s on line %d
+Warning: unpack() expects at most 3 parameters, 4 given in %s on line %d
NULL
-- Testing unpack() function with invalid format character --
diff --git a/ext/standard/tests/strings/unpack_offset.phpt b/ext/standard/tests/strings/unpack_offset.phpt
new file mode 100644
index 0000000000..c8c08e74f2
--- /dev/null
+++ b/ext/standard/tests/strings/unpack_offset.phpt
@@ -0,0 +1,17 @@
+--TEST--
+unpack() with offset
+--FILE--
+<?php
+$data = "pad" . pack("ll", 0x01020304, 0x05060708);
+
+$a = unpack("l2", $data, 3);
+printf("0x%08x 0x%08x\n", $a[1], $a[2]);
+
+printf("0x%08x 0x%08x\n",
+ unpack("l", $data, 3)[1],
+ unpack("@4/l", $data, 3)[1]);
+?>
+--EXPECT--
+0x01020304 0x05060708
+0x01020304 0x05060708
+
diff --git a/ext/standard/tests/strings/url_t.phpt b/ext/standard/tests/strings/url_t.phpt
index e172061ec2..8fdddcb9f5 100644
--- a/ext/standard/tests/strings/url_t.phpt
+++ b/ext/standard/tests/strings/url_t.phpt
@@ -575,22 +575,7 @@ $sample_urls = array (
string(16) "some_page_ref123"
}
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
- ["scheme"]=>
- string(4) "http"
- ["host"]=>
- string(11) "www.php.net"
- ["port"]=>
- int(80)
- ["user"]=>
- string(14) "secret@hideout"
- ["path"]=>
- string(10) "/index.php"
- ["query"]=>
- string(31) "test=1&test2=char&test3=mixesCI"
- ["fragment"]=>
- string(16) "some_page_ref123"
-}
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: bool(false)
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(8) {
["scheme"]=>
@@ -759,22 +744,7 @@ $sample_urls = array (
string(7) "9130731"
}
---> http://user:@pass@host/path?argument?value#etc: array(7) {
- ["scheme"]=>
- string(4) "http"
- ["host"]=>
- string(4) "host"
- ["user"]=>
- string(4) "user"
- ["pass"]=>
- string(5) "@pass"
- ["path"]=>
- string(5) "/path"
- ["query"]=>
- string(14) "argument?value"
- ["fragment"]=>
- string(3) "etc"
-}
+--> http://user:@pass@host/path?argument?value#etc: bool(false)
string(4) "http"
string(11) "www.php.net"
int(80)
diff --git a/ext/standard/tests/url/get_headers_error_001.phpt b/ext/standard/tests/url/get_headers_error_001.phpt
index 8d5fd11f60..270c8350c0 100644
--- a/ext/standard/tests/url/get_headers_error_001.phpt
+++ b/ext/standard/tests/url/get_headers_error_001.phpt
@@ -5,7 +5,7 @@ June Henriksen <juneih@redpill-linpro.com>
#PHPTestFest2009 Norway 2009-06-09 \o/
--FILE--
<?php
-/* Prototype : proto array get_headers(string url[, int format])
+/* Prototype : proto array get_headers(string url[, int format[, resource $context]])
* Description: Fetches all the headers sent by the server in response to a HTTP request
* Source code: ext/standard/url.c
* Alias to functions:
@@ -21,8 +21,9 @@ var_dump( get_headers() );
echo "\n-- Testing get_headers() function with more than expected no. of arguments --\n";
$url = 'string_val';
$format = 1;
+$context = stream_context_get_default();
$extra_arg = 10;
-var_dump( get_headers($url, $format, $extra_arg) );
+var_dump( get_headers($url, $format, $context, $extra_arg) );
echo "Done";
?>
@@ -36,7 +37,7 @@ NULL
-- Testing get_headers() function with more than expected no. of arguments --
-Warning: get_headers() expects at most 2 parameters, 3 given in %s on line 19
+Warning: get_headers() expects at most 3 parameters, 4 given in %s on line 20
NULL
Done
diff --git a/ext/standard/tests/url/get_headers_error_003.phpt b/ext/standard/tests/url/get_headers_error_003.phpt
new file mode 100644
index 0000000000..6c8878513c
--- /dev/null
+++ b/ext/standard/tests/url/get_headers_error_003.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Test get_headers() function : test with context
+--FILE--
+<?php
+
+include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc";
+php_cli_server_start('header("X-Request-Method: ".$_SERVER["REQUEST_METHOD"]);');
+
+$opts = array(
+ 'http' => array(
+ 'method' => 'HEAD'
+ )
+);
+
+$context = stream_context_create($opts);
+$headers = get_headers("http://".PHP_CLI_SERVER_ADDRESS, 1, $context);
+echo $headers["X-Request-Method"]."\n";
+
+stream_context_set_default($opts);
+$headers = get_headers("http://".PHP_CLI_SERVER_ADDRESS, 1);
+echo $headers["X-Request-Method"]."\n";
+
+echo "Done";
+?>
+--EXPECTF--
+HEAD
+HEAD
+Done
+
+
+
diff --git a/ext/standard/tests/url/parse_url_basic_001.phpt b/ext/standard/tests/url/parse_url_basic_001.phpt
index 0708691fe3..e482566b88 100644
--- a/ext/standard/tests/url/parse_url_basic_001.phpt
+++ b/ext/standard/tests/url/parse_url_basic_001.phpt
@@ -507,23 +507,6 @@ echo "Done";
string(16) "some_page_ref123"
}
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
- ["scheme"]=>
- string(4) "http"
- ["host"]=>
- string(11) "www.php.net"
- ["port"]=>
- int(80)
- ["user"]=>
- string(14) "secret@hideout"
- ["path"]=>
- string(10) "/index.php"
- ["query"]=>
- string(31) "test=1&test2=char&test3=mixesCI"
- ["fragment"]=>
- string(16) "some_page_ref123"
-}
-
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(8) {
["scheme"]=>
string(4) "http"
@@ -691,23 +674,6 @@ echo "Done";
string(7) "9130731"
}
---> http://user:@pass@host/path?argument?value#etc: array(7) {
- ["scheme"]=>
- string(4) "http"
- ["host"]=>
- string(4) "host"
- ["user"]=>
- string(4) "user"
- ["pass"]=>
- string(5) "@pass"
- ["path"]=>
- string(5) "/path"
- ["query"]=>
- string(14) "argument?value"
- ["fragment"]=>
- string(3) "etc"
-}
-
--> http://10.10.10.10/:80: array(3) {
["scheme"]=>
string(4) "http"
@@ -883,4 +849,10 @@ echo "Done";
--> http://blah.com:123456: bool(false)
--> http://blah.com:abcdef: bool(false)
+
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: bool(false)
+
+--> http://user:@pass@host/path?argument?value#etc: bool(false)
+
+--> http://foo.com\@bar.com: bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_002.phpt b/ext/standard/tests/url/parse_url_basic_002.phpt
index c05d1f487a..b68a82f4a9 100644
--- a/ext/standard/tests/url/parse_url_basic_002.phpt
+++ b/ext/standard/tests/url/parse_url_basic_002.phpt
@@ -69,7 +69,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(4) "http"
--> nntp://news.php.net : string(4) "nntp"
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : string(3) "ftp"
@@ -89,7 +88,6 @@ echo "Done";
--> scheme: : string(6) "scheme"
--> foo+bar://baz@bang/bla : string(7) "foo+bar"
--> gg:9130731 : string(2) "gg"
---> http://user:@pass@host/path?argument?value#etc : string(4) "http"
--> http://10.10.10.10/:80 : string(4) "http"
--> http://x:? : string(4) "http"
--> x:blah.com : string(1) "x"
@@ -125,4 +123,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_003.phpt b/ext/standard/tests/url/parse_url_basic_003.phpt
index 88eda504d5..19ee322feb 100644
--- a/ext/standard/tests/url/parse_url_basic_003.phpt
+++ b/ext/standard/tests/url/parse_url_basic_003.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(11) "www.php.net"
--> nntp://news.php.net : string(12) "news.php.net"
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : string(11) "ftp.gnu.org"
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : string(4) "bang"
--> gg:9130731 : NULL
---> http://user:@pass@host/path?argument?value#etc : string(4) "host"
--> http://10.10.10.10/:80 : string(11) "10.10.10.10"
--> http://x:? : string(1) "x"
--> x:blah.com : NULL
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_004.phpt b/ext/standard/tests/url/parse_url_basic_004.phpt
index e3b9abd91c..e26b3976fc 100644
--- a/ext/standard/tests/url/parse_url_basic_004.phpt
+++ b/ext/standard/tests/url/parse_url_basic_004.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : int(80)
--> nntp://news.php.net : NULL
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : NULL
--> gg:9130731 : NULL
---> http://user:@pass@host/path?argument?value#etc : NULL
--> http://10.10.10.10/:80 : NULL
--> http://x:? : NULL
--> x:blah.com : NULL
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_005.phpt b/ext/standard/tests/url/parse_url_basic_005.phpt
index 5b2cb98f8b..df2095a949 100644
--- a/ext/standard/tests/url/parse_url_basic_005.phpt
+++ b/ext/standard/tests/url/parse_url_basic_005.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(0) ""
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(14) "secret@hideout"
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(6) "secret"
--> nntp://news.php.net : NULL
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : string(3) "baz"
--> gg:9130731 : NULL
---> http://user:@pass@host/path?argument?value#etc : string(4) "user"
--> http://10.10.10.10/:80 : NULL
--> http://x:? : NULL
--> x:blah.com : NULL
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_006.phpt b/ext/standard/tests/url/parse_url_basic_006.phpt
index 79af6b8b62..4c79e8dcb2 100644
--- a/ext/standard/tests/url/parse_url_basic_006.phpt
+++ b/ext/standard/tests/url/parse_url_basic_006.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(0) ""
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(7) "hideout"
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(7) "hideout"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : NULL
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(7) "hid:out"
--> nntp://news.php.net : NULL
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : NULL
--> gg:9130731 : NULL
---> http://user:@pass@host/path?argument?value#etc : string(5) "@pass"
--> http://10.10.10.10/:80 : NULL
--> http://x:? : NULL
--> x:blah.com : NULL
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_007.phpt b/ext/standard/tests/url/parse_url_basic_007.phpt
index 8e04553983..52f3a92add 100644
--- a/ext/standard/tests/url/parse_url_basic_007.phpt
+++ b/ext/standard/tests/url/parse_url_basic_007.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(10) "/index.php"
--> nntp://news.php.net : NULL
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : string(22) "/gnu/glic/glibc.tar.gz"
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : string(4) "/bla"
--> gg:9130731 : string(7) "9130731"
---> http://user:@pass@host/path?argument?value#etc : string(5) "/path"
--> http://10.10.10.10/:80 : string(4) "/:80"
--> http://x:? : NULL
--> x:blah.com : string(8) "blah.com"
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_008.phpt b/ext/standard/tests/url/parse_url_basic_008.phpt
index 0c77221465..874c901076 100644
--- a/ext/standard/tests/url/parse_url_basic_008.phpt
+++ b/ext/standard/tests/url/parse_url_basic_008.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(31) "test=1&test2=char&test3=mixesCI"
--> nntp://news.php.net : NULL
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : NULL
--> gg:9130731 : NULL
---> http://user:@pass@host/path?argument?value#etc : string(14) "argument?value"
--> http://10.10.10.10/:80 : NULL
--> http://x:? : NULL
--> x:blah.com : NULL
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/parse_url_basic_009.phpt b/ext/standard/tests/url/parse_url_basic_009.phpt
index 487b271149..ea0b257751 100644
--- a/ext/standard/tests/url/parse_url_basic_009.phpt
+++ b/ext/standard/tests/url/parse_url_basic_009.phpt
@@ -68,7 +68,6 @@ echo "Done";
--> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
--> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
--> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
---> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
--> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : string(16) "some_page_ref123"
--> nntp://news.php.net : NULL
--> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz : NULL
@@ -88,7 +87,6 @@ echo "Done";
--> scheme: : NULL
--> foo+bar://baz@bang/bla : NULL
--> gg:9130731 : NULL
---> http://user:@pass@host/path?argument?value#etc : string(3) "etc"
--> http://10.10.10.10/:80 : NULL
--> http://x:? : NULL
--> x:blah.com : NULL
@@ -124,4 +122,7 @@ echo "Done";
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
+--> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123 : bool(false)
+--> http://user:@pass@host/path?argument?value#etc : bool(false)
+--> http://foo.com\@bar.com : bool(false)
Done
diff --git a/ext/standard/tests/url/urls.inc b/ext/standard/tests/url/urls.inc
index d8ffe91378..6228bd8b7d 100644
--- a/ext/standard/tests/url/urls.inc
+++ b/ext/standard/tests/url/urls.inc
@@ -48,7 +48,6 @@ $urls = array(
'http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
'http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
'http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
-'http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
'http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
'nntp://news.php.net',
'ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz',
@@ -68,7 +67,6 @@ $urls = array(
'scheme:',
'foo+bar://baz@bang/bla',
'gg:9130731',
-'http://user:@pass@host/path?argument?value#etc',
'http://10.10.10.10/:80',
'http://x:?',
'x:blah.com',
@@ -106,6 +104,9 @@ $urls = array(
'http://:?',
'http://blah.com:123456',
'http://blah.com:abcdef',
+'http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
+'http://user:@pass@host/path?argument?value#etc',
+'http://foo.com\\@bar.com'
);
diff --git a/ext/standard/type.c b/ext/standard/type.c
index b4d8586dcc..529d666d02 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -154,8 +154,11 @@ PHP_FUNCTION(intval)
ZEND_PARSE_PARAMETERS_END();
#endif
- ZVAL_DUP(return_value, num);
- convert_to_long_base(return_value, (int)base);
+ if (Z_TYPE_P(num) != IS_STRING || base == 10) {
+ RETVAL_LONG(zval_get_long(num));
+ } else {
+ RETVAL_LONG(ZEND_STRTOL(Z_STRVAL_P(num), NULL, base));
+ }
}
/* }}} */
diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c
index baf35dfc18..f429e6d4a0 100644
--- a/ext/standard/uniqid.c
+++ b/ext/standard/uniqid.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/uniqid.h b/ext/standard/uniqid.h
index b336df9b78..6b59f053a5 100644
--- a/ext/standard/uniqid.h
+++ b/ext/standard/uniqid.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 2531a0ff9a..d69c11f1c1 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -242,6 +242,19 @@ PHPAPI php_url *php_url_parse_ex(char const *str, size_t length)
/* check for login and password */
if ((p = zend_memrchr(s, '@', (e-s)))) {
+ /* check for invalid chars inside login/pass */
+ pp = s;
+ while (pp < p) {
+ if (!isalnum(*pp) && *pp != ':' && *pp != ';' && *pp != '=' && !(*pp >= '!' && *pp <= ',')) {
+ if (ret->scheme) {
+ efree(ret->scheme);
+ }
+ efree(ret);
+ return NULL;
+ }
+ pp++;
+ }
+
if ((pp = memchr(s, ':', (p-s)))) {
ret->user = estrndup(s, (pp-s));
php_replace_controlchars_ex(ret->user, (pp - s));
@@ -320,7 +333,7 @@ PHPAPI php_url *php_url_parse_ex(char const *str, size_t length)
nohost:
if ((p = memchr(s, '?', (ue - s)))) {
- pp = strchr(s, '#');
+ pp = memchr(s, '#', (ue - s));
if (pp && pp < p) {
if (pp - s) {
@@ -493,7 +506,7 @@ PHPAPI zend_string *php_url_encode(char const *s, size_t len)
from = (unsigned char *)s;
end = (unsigned char *)s + len;
- start = zend_string_alloc(3 * len, 0);
+ start = zend_string_safe_alloc(3, len, 0, 0);
to = (unsigned char*)ZSTR_VAL(start);
while (from < end) {
@@ -608,10 +621,10 @@ PHPAPI size_t php_url_decode(char *str, size_t len)
*/
PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len)
{
- register int x, y;
+ register size_t x, y;
zend_string *str;
- str = zend_string_alloc(3 * len, 0);
+ str = zend_string_safe_alloc(3, len, 0, 0);
for (x = 0, y = 0; len--; x++, y++) {
ZSTR_VAL(str)[y] = (unsigned char) s[x];
#ifndef CHARSET_EBCDIC
@@ -708,22 +721,24 @@ PHPAPI size_t php_raw_url_decode(char *str, size_t len)
}
/* }}} */
-/* {{{ proto array get_headers(string url[, int format])
+/* {{{ proto array get_headers(string url[, int format[, resource context]])
fetches all the headers sent by the server in response to a HTTP request */
PHP_FUNCTION(get_headers)
{
char *url;
size_t url_len;
- php_stream_context *context;
php_stream *stream;
zval *prev_val, *hdr = NULL, *h;
HashTable *hashT;
zend_long format = 0;
+ zval *zcontext = NULL;
+ php_stream_context *context;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &url, &url_len, &format) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|lr!", &url, &url_len, &format, &zcontext) == FAILURE) {
return;
}
- context = FG(default_context) ? FG(default_context) : (FG(default_context) = php_stream_context_alloc());
+
+ context = php_stream_context_from_zval(zcontext, 0);
if (!(stream = php_stream_open_wrapper_ex(url, "r", REPORT_ERRORS | STREAM_USE_URL | STREAM_ONLY_GET_HEADERS, NULL, context))) {
RETURN_FALSE;
@@ -767,7 +782,7 @@ no_name_header:
s++;
}
- if ((prev_val = zend_hash_str_find(HASH_OF(return_value), Z_STRVAL_P(hdr), (p - Z_STRVAL_P(hdr)))) == NULL) {
+ if ((prev_val = zend_hash_str_find(Z_ARRVAL_P(return_value), Z_STRVAL_P(hdr), (p - Z_STRVAL_P(hdr)))) == NULL) {
add_assoc_stringl_ex(return_value, Z_STRVAL_P(hdr), (p - Z_STRVAL_P(hdr)), s, (Z_STRLEN_P(hdr) - (s - Z_STRVAL_P(hdr))));
} else { /* some headers may occur more than once, therefor we need to remake the string into an array */
convert_to_array(prev_val);
diff --git a/ext/standard/url.h b/ext/standard/url.h
index 45de605f1a..864ba8b3ac 100644
--- a/ext/standard/url.h
+++ b/ext/standard/url.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index 2ffe1451c2..07ebbe09a2 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h
index a69a3257fa..900f2bb44d 100644
--- a/ext/standard/url_scanner_ex.h
+++ b/ext/standard/url_scanner_ex.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re
index ef05e8098f..9eb0952750 100644
--- a/ext/standard/url_scanner_ex.re
+++ b/ext/standard/url_scanner_ex.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index fc2141f73b..4434fd1f0d 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -473,7 +473,7 @@ static void php_stream_bucket_attach(int append, INTERNAL_FUNCTION_PARAMETERS)
}
/* }}} */
-/* {{{ proto void stream_bucket_prepend(resource brigade, resource bucket)
+/* {{{ proto void stream_bucket_prepend(resource brigade, object bucket)
Prepend bucket to brigade */
PHP_FUNCTION(stream_bucket_prepend)
{
@@ -481,7 +481,7 @@ PHP_FUNCTION(stream_bucket_prepend)
}
/* }}} */
-/* {{{ proto void stream_bucket_append(resource brigade, resource bucket)
+/* {{{ proto void stream_bucket_append(resource brigade, object bucket)
Append bucket to brigade */
PHP_FUNCTION(stream_bucket_append)
{
diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c
index 6520dda376..e443337ec4 100644
--- a/ext/standard/uuencode.c
+++ b/ext/standard/uuencode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -174,7 +174,7 @@ PHPAPI zend_string *php_uudecode(char *src, size_t src_len) /* {{{ */
}
assert(p >= ZSTR_VAL(dest));
- if ((len = total_len > (size_t)(p - ZSTR_VAL(dest)))) {
+ if ((len = total_len) > (size_t)(p - ZSTR_VAL(dest))) {
*p++ = PHP_UU_DEC(*s) << 2 | PHP_UU_DEC(*(s + 1)) >> 4;
if (len > 1) {
*p++ = PHP_UU_DEC(*(s + 1)) << 4 | PHP_UU_DEC(*(s + 2)) >> 2;
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 055110382b..16b9fffba1 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -35,25 +35,6 @@
#define COMMON (is_ref ? "&" : "")
/* }}} */
-static uint zend_obj_num_elements(HashTable *ht)
-{
- Bucket *p;
- uint idx;
- uint num;
-
- num = ht->nNumOfElements;
- for (idx = 0; idx < ht->nNumUsed; idx++) {
- p = ht->arData + idx;
- if (Z_TYPE(p->val) == IS_UNDEF) continue;
- if (Z_TYPE(p->val) == IS_INDIRECT) {
- if (Z_TYPE_P(Z_INDIRECT(p->val)) == IS_UNDEF) {
- num--;
- }
- }
- }
- return num;
-}
-
static void php_array_element_dump(zval *zv, zend_ulong index, zend_string *key, int level) /* {{{ */
{
if (key == NULL) { /* numeric key */
@@ -103,6 +84,7 @@ PHPAPI void php_var_dump(zval *struc, int level) /* {{{ */
zend_ulong num;
zend_string *key;
zval *val;
+ uint32_t count;
if (level > 1) {
php_printf("%*c", level - 1, ' ');
@@ -126,7 +108,7 @@ again:
php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc));
break;
case IS_STRING:
- php_printf("%sstring(%d) \"", COMMON, Z_STRLEN_P(struc));
+ php_printf("%sstring(%zd) \"", COMMON, Z_STRLEN_P(struc));
PHPWRITE(Z_STRVAL_P(struc), Z_STRLEN_P(struc));
PUTS("\"\n");
break;
@@ -137,7 +119,8 @@ again:
--myht->u.v.nApplyCount;
return;
}
- php_printf("%sarray(%d) {\n", COMMON, zend_hash_num_elements(myht));
+ count = zend_array_count(myht);
+ php_printf("%sarray(%d) {\n", COMMON, count);
is_temp = 0;
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) {
@@ -164,7 +147,7 @@ again:
myht = Z_OBJDEBUG_P(struc, is_temp);
class_name = Z_OBJ_HANDLER_P(struc, get_class_name)(Z_OBJ_P(struc));
- php_printf("%sobject(%s)#%d (%d) {\n", COMMON, ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(struc), myht ? zend_obj_num_elements(myht) : 0);
+ php_printf("%sobject(%s)#%d (%d) {\n", COMMON, ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(struc), myht ? zend_array_count(myht) : 0);
zend_string_release(class_name);
if (myht) {
@@ -271,6 +254,7 @@ PHPAPI void php_debug_zval_dump(zval *struc, int level) /* {{{ */
zend_ulong index;
zend_string *key;
zval *val;
+ uint32_t count;
if (level > 1) {
php_printf("%*c", level - 1, ' ');
@@ -288,13 +272,13 @@ again:
php_printf("%sNULL\n", COMMON);
break;
case IS_LONG:
- php_printf("%slong(" ZEND_LONG_FMT ")\n", COMMON, Z_LVAL_P(struc));
+ php_printf("%sint(" ZEND_LONG_FMT ")\n", COMMON, Z_LVAL_P(struc));
break;
case IS_DOUBLE:
- php_printf("%sdouble(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc));
+ php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc));
break;
case IS_STRING:
- php_printf("%sstring(%d) \"", COMMON, Z_STRLEN_P(struc));
+ php_printf("%sstring(%zd) \"", COMMON, Z_STRLEN_P(struc));
PHPWRITE(Z_STRVAL_P(struc), Z_STRLEN_P(struc));
php_printf("\" refcount(%u)\n", Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1);
break;
@@ -305,7 +289,8 @@ again:
PUTS("*RECURSION*\n");
return;
}
- php_printf("%sarray(%d) refcount(%u){\n", COMMON, zend_hash_num_elements(myht), Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1);
+ count = zend_array_count(myht);
+ php_printf("%sarray(%d) refcount(%u){\n", COMMON, count, Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1);
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, index, key, val) {
zval_array_element_dump(val, index, key, level);
} ZEND_HASH_FOREACH_END();
@@ -332,7 +317,7 @@ again:
}
}
class_name = Z_OBJ_HANDLER_P(struc, get_class_name)(Z_OBJ_P(struc));
- php_printf("%sobject(%s)#%d (%d) refcount(%u){\n", COMMON, ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(struc), myht ? zend_obj_num_elements(myht) : 0, Z_REFCOUNT_P(struc));
+ php_printf("%sobject(%s)#%d (%d) refcount(%u){\n", COMMON, ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(struc), myht ? zend_array_count(myht) : 0, Z_REFCOUNT_P(struc));
zend_string_release(class_name);
if (myht) {
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, index, key, val) {
@@ -351,7 +336,7 @@ again:
break;
case IS_RESOURCE: {
const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(struc));
- php_printf("%sresource(" ZEND_LONG_FMT ") of type (%s) refcount(%u)\n", COMMON, Z_RES_P(struc)->handle, type_name ? type_name : "Unknown", Z_REFCOUNT_P(struc));
+ php_printf("%sresource(%d) of type (%s) refcount(%u)\n", COMMON, Z_RES_P(struc)->handle, type_name ? type_name : "Unknown", Z_REFCOUNT_P(struc));
break;
}
case IS_REFERENCE:
@@ -475,6 +460,15 @@ again:
case IS_DOUBLE:
tmp_len = spprintf(&tmp_str, 0,"%.*H", PG(serialize_precision), Z_DVAL_P(struc));
smart_str_appendl(buf, tmp_str, tmp_len);
+ /* Without a decimal point, PHP treats a number literal as an int.
+ * This check even works for scientific notation, because the
+ * mantissa always contains a decimal point.
+ * We need to check for finiteness, because INF, -INF and NAN
+ * must not have a decimal point added.
+ */
+ if (zend_finite(Z_DVAL_P(struc)) && NULL == strchr(tmp_str, '.')) {
+ smart_str_appendl(buf, ".0", 2);
+ }
efree(tmp_str);
break;
case IS_STRING:
@@ -567,7 +561,6 @@ PHPAPI void php_var_export(zval *struc, int level) /* {{{ */
}
/* }}} */
-
/* {{{ proto mixed var_export(mixed var [, bool return])
Outputs or returns a string representation of a variable */
PHP_FUNCTION(var_export)
@@ -673,48 +666,79 @@ static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc
}
/* }}} */
+static HashTable *php_var_serialize_collect_names(HashTable *src, uint32_t count, zend_bool incomplete) /* {{{ */ {
+ zval *val;
+ HashTable *ht;
+ zend_string *key, *name;
+
+ ALLOC_HASHTABLE(ht);
+ zend_hash_init(ht, count, NULL, NULL, 0);
+ ZEND_HASH_FOREACH_STR_KEY_VAL(src, key, val) {
+ if (incomplete && strcmp(ZSTR_VAL(key), MAGIC_MEMBER) == 0) {
+ continue;
+ }
+ if (Z_TYPE_P(val) != IS_STRING) {
+ php_error_docref(NULL, E_NOTICE,
+ "__sleep should return an array only containing the names of instance-variables to serialize.");
+ }
+ name = zval_get_string(val);
+ if (zend_hash_exists(ht, name)) {
+ php_error_docref(NULL, E_NOTICE,
+ "\"%s\" is returned from __sleep multiple times", ZSTR_VAL(name));
+ zend_string_release(name);
+ continue;
+ }
+ zend_hash_add_empty_element(ht, name);
+ zend_string_release(name);
+ } ZEND_HASH_FOREACH_END();
+
+ return ht;
+}
+/* }}} */
+
static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, php_serialize_data_t var_hash) /* {{{ */
{
uint32_t count;
zend_bool incomplete_class;
+ HashTable *ht;
incomplete_class = php_var_serialize_class_name(buf, struc);
/* count after serializing name, since php_var_serialize_class_name
* changes the count if the variable is incomplete class */
- count = zend_hash_num_elements(HASH_OF(retval_ptr));
- if (incomplete_class) {
- --count;
+ if (Z_TYPE_P(retval_ptr) == IS_ARRAY) {
+ ht = Z_ARRVAL_P(retval_ptr);
+ count = zend_array_count(ht);
+ } else if (Z_TYPE_P(retval_ptr) == IS_OBJECT) {
+ ht = Z_OBJPROP_P(retval_ptr);
+ count = zend_array_count(ht);
+ if (incomplete_class) {
+ --count;
+ }
+ } else {
+ count = 0;
+ ht = NULL;
}
- smart_str_append_unsigned(buf, count);
- smart_str_appendl(buf, ":{", 2);
if (count > 0) {
- zend_string *key;
- zval *d, *val;
+ zval *d;
zval nval, *nvalp;
zend_string *name;
- HashTable *propers, *ht;
+ HashTable *names, *propers;
+
+ names = php_var_serialize_collect_names(ht, count, incomplete_class);
+
+ smart_str_append_unsigned(buf, zend_hash_num_elements(names));
+ smart_str_appendl(buf, ":{", 2);
ZVAL_NULL(&nval);
nvalp = &nval;
+ propers = Z_OBJPROP_P(struc);
- ht = HASH_OF(retval_ptr);
- ZEND_HASH_FOREACH_STR_KEY_VAL(ht, key, val) {
- if (incomplete_class && strcmp(ZSTR_VAL(key), MAGIC_MEMBER) == 0) {
- continue;
- }
-
- if (Z_TYPE_P(val) != IS_STRING) {
- php_error_docref(NULL, E_NOTICE,
- "__sleep should return an array only containing the names of instance-variables to serialize.");
- }
- name = zval_get_string(val);
- propers = Z_OBJPROP_P(struc);
+ ZEND_HASH_FOREACH_STR_KEY(names, name) {
if ((d = zend_hash_find(propers, name)) != NULL) {
if (Z_TYPE_P(d) == IS_INDIRECT) {
d = Z_INDIRECT_P(d);
if (Z_TYPE_P(d) == IS_UNDEF) {
- zend_string_release(name);
continue;
}
}
@@ -767,10 +791,14 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
php_var_serialize_intern(buf, nvalp, var_hash);
}
}
- zend_string_release(name);
} ZEND_HASH_FOREACH_END();
+ smart_str_appendc(buf, '}');
+
+ zend_hash_destroy(names);
+ FREE_HASHTABLE(names);
+ } else {
+ smart_str_appendl(buf, "0:{}", 4);
}
- smart_str_appendc(buf, '}');
}
/* }}} */
@@ -862,7 +890,7 @@ again:
return;
}
- if (ce && ce != PHP_IC_ENTRY && zend_hash_str_exists(&ce->function_table, "__sleep", sizeof("__sleep")-1)) {
+ if (ce != PHP_IC_ENTRY && zend_hash_str_exists(&ce->function_table, "__sleep", sizeof("__sleep")-1)) {
ZVAL_STRINGL(&fname, "__sleep", sizeof("__sleep") - 1);
BG(serialize_lock)++;
res = call_user_function_ex(CG(function_table), struc, &fname, &retval, 0, 0, 1, NULL);
@@ -898,16 +926,17 @@ again:
zend_bool incomplete_class = 0;
if (Z_TYPE_P(struc) == IS_ARRAY) {
smart_str_appendl(buf, "a:", 2);
- myht = HASH_OF(struc);
+ myht = Z_ARRVAL_P(struc);
+ i = zend_array_count(myht);
} else {
incomplete_class = php_var_serialize_class_name(buf, struc);
myht = Z_OBJPROP_P(struc);
- }
- /* count after serializing name, since php_var_serialize_class_name
- * changes the count if the variable is incomplete class */
- i = myht ? zend_hash_num_elements(myht) : 0;
- if (i > 0 && incomplete_class) {
- --i;
+ /* count after serializing name, since php_var_serialize_class_name
+ * changes the count if the variable is incomplete class */
+ i = zend_array_count(myht);
+ if (i > 0 && incomplete_class) {
+ --i;
+ }
}
smart_str_append_unsigned(buf, i);
smart_str_appendl(buf, ":{", 2);
@@ -928,6 +957,10 @@ again:
php_var_serialize_string(buf, ZSTR_VAL(key), ZSTR_LEN(key));
}
+ if (Z_ISREF_P(data) && Z_REFCOUNT_P(data) == 1) {
+ data = Z_REFVAL_P(data);
+ }
+
/* we should still add element even if it's not OK,
* since we already wrote the length of the array before */
if ((Z_TYPE_P(data) == IS_ARRAY && Z_TYPE_P(struc) == IS_ARRAY && Z_ARR_P(data) == Z_ARR_P(struc))
@@ -994,7 +1027,7 @@ PHP_FUNCTION(serialize)
}
/* }}} */
-/* {{{ proto mixed unserialize(string variable_representation[, bool|array allowed_classes])
+/* {{{ proto mixed unserialize(string variable_representation[, array allowed_classes])
Takes a string representation of variable and recreates it */
PHP_FUNCTION(unserialize)
{
@@ -1036,18 +1069,28 @@ PHP_FUNCTION(unserialize)
if (!php_var_unserialize_ex(return_value, &p, p + buf_len, &var_hash, class_hash)) {
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
- if(class_hash) {
+ if (class_hash) {
zend_hash_destroy(class_hash);
FREE_HASHTABLE(class_hash);
}
zval_ptr_dtor(return_value);
if (!EG(exception)) {
- php_error_docref(NULL, E_NOTICE, "Error at offset " ZEND_LONG_FMT " of %d bytes", (zend_long)((char*)p - buf), buf_len);
+ php_error_docref(NULL, E_NOTICE, "Error at offset " ZEND_LONG_FMT " of %zd bytes",
+ (zend_long)((char*)p - buf), buf_len);
}
RETURN_FALSE;
}
+ /* We should keep an reference to return_value to prevent it from being dtor
+ in case nesting calls to unserialize */
+ var_push_dtor(&var_hash, return_value);
+
+ /* Ensure return value is a value */
+ if (Z_ISREF_P(return_value)) {
+ zend_unwrap_reference(return_value);
+ }
+
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
- if(class_hash) {
+ if (class_hash) {
zend_hash_destroy(class_hash);
FREE_HASHTABLE(class_hash);
}
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index b3aa1c567b..3fc074dd6a 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -44,7 +44,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval *rval)
{
var_entries *var_hash = (*var_hashx)->last;
#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
+ fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(rval));
#endif
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
@@ -66,69 +66,45 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval *rval)
PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval *rval)
{
- var_dtor_entries *var_hash;
-
- if (!var_hashx || !*var_hashx) {
- return;
- }
-
- var_hash = (*var_hashx)->last_dtor;
-#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_push_dtor(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
-#endif
-
- if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
- var_hash = emalloc(sizeof(var_dtor_entries));
- var_hash->used_slots = 0;
- var_hash->next = 0;
-
- if (!(*var_hashx)->first_dtor) {
- (*var_hashx)->first_dtor = var_hash;
- } else {
- ((var_dtor_entries *) (*var_hashx)->last_dtor)->next = var_hash;
- }
-
- (*var_hashx)->last_dtor = var_hash;
- }
-
- ZVAL_COPY(&var_hash->data[var_hash->used_slots], rval);
- var_hash->used_slots++;
+ zval *tmp_var = var_tmp_var(var_hashx);
+ if (!tmp_var) {
+ return;
+ }
+ ZVAL_COPY(tmp_var, rval);
}
-//???
-#if 0
-PHPAPI void var_push_dtor_no_addref(php_unserialize_data_t *var_hashx, zval *rval)
+PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx)
{
- var_dtor_entries *var_hash = (*var_hashx)->last_dtor;
-#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_push_dtor_no_addref(%ld): %d (%d)\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval), Z_REFCOUNT_PP(rval));
-#endif
-
- if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
- var_hash = emalloc(sizeof(var_dtor_entries));
- var_hash->used_slots = 0;
- var_hash->next = 0;
-
- if (!(*var_hashx)->first_dtor) {
- (*var_hashx)->first_dtor = var_hash;
- } else {
- ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash;
- }
-
- (*var_hashx)->last_dtor = var_hash;
- }
-
- ZVAL_COPY_VALUE(&var_hash->data[var_hash->used_slots], rval);
- var_hash->used_slots++;
+ var_dtor_entries *var_hash;
+
+ if (!var_hashx || !*var_hashx) {
+ return NULL;
+ }
+
+ var_hash = (*var_hashx)->last_dtor;
+ if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
+ var_hash = emalloc(sizeof(var_dtor_entries));
+ var_hash->used_slots = 0;
+ var_hash->next = 0;
+
+ if (!(*var_hashx)->first_dtor) {
+ (*var_hashx)->first_dtor = var_hash;
+ } else {
+ ((var_dtor_entries *) (*var_hashx)->last_dtor)->next = var_hash;
+ }
+
+ (*var_hashx)->last_dtor = var_hash;
+ }
+ ZVAL_UNDEF(&var_hash->data[var_hash->used_slots]);
+ return &var_hash->data[var_hash->used_slots++];
}
-#endif
PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval *nzval)
{
zend_long i;
var_entries *var_hash = (*var_hashx)->first;
#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval));
+ fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(nzval));
#endif
while (var_hash) {
@@ -173,16 +149,19 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
while (var_hash) {
next = var_hash->next;
- efree(var_hash);
+ efree_size(var_hash, sizeof(var_entries));
var_hash = next;
}
while (var_dtor_hash) {
for (i = 0; i < var_dtor_hash->used_slots; i++) {
+#if VAR_ENTRIES_DBG
+ fprintf(stderr, "var_destroy dtor(%p, %ld)\n", var_dtor_hash->data[i], Z_REFCOUNT_P(var_dtor_hash->data[i]));
+#endif
zval_ptr_dtor(&var_dtor_hash->data[i]);
}
next = var_dtor_hash->next;
- efree(var_dtor_hash);
+ efree_size(var_dtor_hash, sizeof(var_dtor_entries));
var_dtor_hash = next;
}
}
@@ -192,7 +171,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t maxlen)
{
size_t i, j;
- zend_string *str = zend_string_alloc(len, 0);
+ zend_string *str = zend_string_safe_alloc(1, len, 0, 0);
unsigned char *end = *(unsigned char **)p+maxlen;
if (end < *p) {
@@ -259,7 +238,7 @@ static inline int unserialize_allowed_class(zend_string *class_name, HashTable *
#define YYMARKER marker
-#line 267 "ext/standard/var_unserializer.re"
+#line 246 "ext/standard/var_unserializer.re"
@@ -386,13 +365,22 @@ string_key:
}
}
- zval_dtor(&key);
-
if (!php_var_unserialize_ex(data, p, max, var_hash, classes)) {
+ zval_dtor(&key);
return 0;
}
- var_push_dtor(var_hash, data);
+ if (UNEXPECTED(Z_ISUNDEF_P(data))) {
+ if (Z_TYPE(key) == IS_LONG) {
+ zend_hash_index_del(ht, Z_LVAL(key));
+ } else {
+ zend_hash_del_ind(ht, Z_STR(key));
+ }
+ } else {
+ var_push_dtor(var_hash, data);
+ }
+
+ zval_dtor(&key);
if (elements && *(*p-1) != ';' && *(*p-1) != '}') {
(*p)--;
@@ -466,13 +454,15 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
{
zval retval;
zval fname;
+ HashTable *ht;
if (Z_TYPE_P(rval) != IS_OBJECT) {
return 0;
}
- //??? TODO: resize before
- if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_P(rval), elements, 1)) {
+ ht = Z_OBJPROP_P(rval);
+ zend_hash_extend(ht, zend_hash_num_elements(ht) + elements, (ht->u.flags & HASH_FLAG_PACKED));
+ if (!process_nested_data(UNSERIALIZE_PASSTHRU, ht, elements, 1)) {
return 0;
}
@@ -524,7 +514,7 @@ PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
start = cursor;
-#line 528 "ext/standard/var_unserializer.c"
+#line 518 "ext/standard/var_unserializer.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -584,9 +574,9 @@ yy2:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy95;
yy3:
-#line 875 "ext/standard/var_unserializer.re"
+#line 884 "ext/standard/var_unserializer.re"
{ return 0; }
-#line 590 "ext/standard/var_unserializer.c"
+#line 580 "ext/standard/var_unserializer.c"
yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy89;
@@ -629,13 +619,13 @@ yy13:
goto yy3;
yy14:
++YYCURSOR;
-#line 869 "ext/standard/var_unserializer.re"
+#line 878 "ext/standard/var_unserializer.re"
{
/* this is the case where we have less data than planned */
php_error_docref(NULL, E_NOTICE, "Unexpected end of serialized data");
return 0; /* not sure if it should be 0 or 1 here? */
}
-#line 639 "ext/standard/var_unserializer.c"
+#line 629 "ext/standard/var_unserializer.c"
yy16:
yych = *++YYCURSOR;
goto yy3;
@@ -665,7 +655,7 @@ yy20:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 724 "ext/standard/var_unserializer.re"
+#line 733 "ext/standard/var_unserializer.re"
{
size_t len, len2, len3, maxlen;
zend_long elements;
@@ -680,11 +670,11 @@ yy20:
zval retval;
zval args[1];
+ if (!var_hash) return 0;
if (*start == 'C') {
custom_object = 1;
}
-//??? INIT_PZVAL(rval);
len2 = len = parse_uiv(start + 2);
maxlen = max - YYCURSOR;
if (maxlen < len || len == 0) {
@@ -810,7 +800,7 @@ yy20:
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
-#line 814 "ext/standard/var_unserializer.c"
+#line 804 "ext/standard/var_unserializer.c"
yy25:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -835,15 +825,14 @@ yy27:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 716 "ext/standard/var_unserializer.re"
+#line 726 "ext/standard/var_unserializer.re"
{
-
-//??? INIT_PZVAL(rval);
+ if (!var_hash) return 0;
return object_common2(UNSERIALIZE_PASSTHRU,
object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
}
-#line 847 "ext/standard/var_unserializer.c"
+#line 836 "ext/standard/var_unserializer.c"
yy32:
yych = *++YYCURSOR;
if (yych == '+') goto yy33;
@@ -864,20 +853,23 @@ yy34:
yych = *++YYCURSOR;
if (yych != '{') goto yy18;
++YYCURSOR;
-#line 695 "ext/standard/var_unserializer.re"
+#line 702 "ext/standard/var_unserializer.re"
{
zend_long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
*p = YYCURSOR;
+ if (!var_hash) return 0;
if (elements < 0) {
return 0;
}
array_init_size(rval, elements);
-//??? we can't convert from packed to hash during unserialization, because
-//??? reference to some zvals might be keept in var_hash (to support references)
- zend_hash_real_init(Z_ARRVAL_P(rval), 0);
+ if (elements) {
+ /* we can't convert from packed to hash during unserialization, because
+ reference to some zvals might be keept in var_hash (to support references) */
+ zend_hash_real_init(Z_ARRVAL_P(rval), 0);
+ }
if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_P(rval), elements, 0)) {
return 0;
@@ -885,7 +877,7 @@ yy34:
return finish_nested_data(UNSERIALIZE_PASSTHRU);
}
-#line 889 "ext/standard/var_unserializer.c"
+#line 881 "ext/standard/var_unserializer.c"
yy39:
yych = *++YYCURSOR;
if (yych == '+') goto yy40;
@@ -906,7 +898,7 @@ yy41:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 667 "ext/standard/var_unserializer.re"
+#line 668 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
zend_string *str;
@@ -928,13 +920,19 @@ yy41:
return 0;
}
+ if (*(YYCURSOR + 1) != ';') {
+ efree(str);
+ *p = YYCURSOR + 1;
+ return 0;
+ }
+
YYCURSOR += 2;
*p = YYCURSOR;
ZVAL_STR(rval, str);
return 1;
}
-#line 938 "ext/standard/var_unserializer.c"
+#line 936 "ext/standard/var_unserializer.c"
yy46:
yych = *++YYCURSOR;
if (yych == '+') goto yy47;
@@ -955,7 +953,7 @@ yy48:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 640 "ext/standard/var_unserializer.re"
+#line 636 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
char *str;
@@ -976,13 +974,18 @@ yy48:
return 0;
}
+ if (*(YYCURSOR + 1) != ';') {
+ *p = YYCURSOR + 1;
+ return 0;
+ }
+
YYCURSOR += 2;
*p = YYCURSOR;
ZVAL_STRINGL(rval, str, len);
return 1;
}
-#line 986 "ext/standard/var_unserializer.c"
+#line 989 "ext/standard/var_unserializer.c"
yy53:
yych = *++YYCURSOR;
if (yych <= '/') {
@@ -1070,7 +1073,7 @@ yy61:
}
yy63:
++YYCURSOR;
-#line 631 "ext/standard/var_unserializer.re"
+#line 627 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
use_double:
@@ -1079,7 +1082,7 @@ use_double:
ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL));
return 1;
}
-#line 1083 "ext/standard/var_unserializer.c"
+#line 1086 "ext/standard/var_unserializer.c"
yy65:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1138,7 +1141,7 @@ yy73:
yych = *++YYCURSOR;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 615 "ext/standard/var_unserializer.re"
+#line 611 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
@@ -1154,7 +1157,7 @@ yy73:
return 1;
}
-#line 1158 "ext/standard/var_unserializer.c"
+#line 1161 "ext/standard/var_unserializer.c"
yy76:
yych = *++YYCURSOR;
if (yych == 'N') goto yy73;
@@ -1181,7 +1184,7 @@ yy79:
if (yych <= '9') goto yy79;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 589 "ext/standard/var_unserializer.re"
+#line 585 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
int digits = YYCURSOR - start - 3;
@@ -1207,7 +1210,7 @@ yy79:
ZVAL_LONG(rval, parse_iv(start + 2));
return 1;
}
-#line 1211 "ext/standard/var_unserializer.c"
+#line 1214 "ext/standard/var_unserializer.c"
yy83:
yych = *++YYCURSOR;
if (yych <= '/') goto yy18;
@@ -1215,22 +1218,22 @@ yy83:
yych = *++YYCURSOR;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 583 "ext/standard/var_unserializer.re"
+#line 579 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_BOOL(rval, parse_iv(start + 2));
return 1;
}
-#line 1225 "ext/standard/var_unserializer.c"
+#line 1228 "ext/standard/var_unserializer.c"
yy87:
++YYCURSOR;
-#line 577 "ext/standard/var_unserializer.re"
+#line 573 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_NULL(rval);
return 1;
}
-#line 1234 "ext/standard/var_unserializer.c"
+#line 1237 "ext/standard/var_unserializer.c"
yy89:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1253,7 +1256,7 @@ yy91:
if (yych <= '9') goto yy91;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 554 "ext/standard/var_unserializer.re"
+#line 548 "ext/standard/var_unserializer.re"
{
zend_long id;
@@ -1265,18 +1268,20 @@ yy91:
return 0;
}
-//???
-//??? if (rval == rval_ref) return 0;
+ if (rval_ref == rval) {
+ return 0;
+ }
+
+ if (Z_ISUNDEF_P(rval_ref) || (Z_ISREF_P(rval_ref) && Z_ISUNDEF_P(Z_REFVAL_P(rval_ref)))) {
+ ZVAL_UNDEF(rval);
+ return 1;
+ }
-//??? if (!ZVAL_IS_UNDEF(rval)) {
-//??? var_push_dtor_no_addref(var_hash, rval);
-//??? }
ZVAL_COPY(rval, rval_ref);
-//??? Z_UNSET_ISREF_PP(rval);
return 1;
}
-#line 1280 "ext/standard/var_unserializer.c"
+#line 1285 "ext/standard/var_unserializer.c"
yy95:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1299,7 +1304,7 @@ yy97:
if (yych <= '9') goto yy97;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 532 "ext/standard/var_unserializer.re"
+#line 522 "ext/standard/var_unserializer.re"
{
zend_long id;
@@ -1312,6 +1317,10 @@ yy97:
}
zval_ptr_dtor(rval);
+ if (Z_ISUNDEF_P(rval_ref) || (Z_ISREF_P(rval_ref) && Z_ISUNDEF_P(Z_REFVAL_P(rval_ref)))) {
+ ZVAL_UNDEF(rval);
+ return 1;
+ }
if (Z_ISREF_P(rval_ref)) {
ZVAL_COPY(rval, rval_ref);
} else {
@@ -1321,9 +1330,9 @@ yy97:
return 1;
}
-#line 1325 "ext/standard/var_unserializer.c"
+#line 1334 "ext/standard/var_unserializer.c"
}
-#line 877 "ext/standard/var_unserializer.re"
+#line 886 "ext/standard/var_unserializer.re"
return 0;
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index 0b0917a60a..81cc26db9d 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,7 +42,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval *rval)
{
var_entries *var_hash = (*var_hashx)->last;
#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
+ fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(rval));
#endif
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
@@ -64,69 +64,45 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval *rval)
PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval *rval)
{
- var_dtor_entries *var_hash;
-
- if (!var_hashx || !*var_hashx) {
- return;
- }
-
- var_hash = (*var_hashx)->last_dtor;
-#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_push_dtor(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
-#endif
-
- if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
- var_hash = emalloc(sizeof(var_dtor_entries));
- var_hash->used_slots = 0;
- var_hash->next = 0;
-
- if (!(*var_hashx)->first_dtor) {
- (*var_hashx)->first_dtor = var_hash;
- } else {
- ((var_dtor_entries *) (*var_hashx)->last_dtor)->next = var_hash;
- }
-
- (*var_hashx)->last_dtor = var_hash;
- }
-
- ZVAL_COPY(&var_hash->data[var_hash->used_slots], rval);
- var_hash->used_slots++;
+ zval *tmp_var = var_tmp_var(var_hashx);
+ if (!tmp_var) {
+ return;
+ }
+ ZVAL_COPY(tmp_var, rval);
}
-//???
-#if 0
-PHPAPI void var_push_dtor_no_addref(php_unserialize_data_t *var_hashx, zval *rval)
+PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx)
{
- var_dtor_entries *var_hash = (*var_hashx)->last_dtor;
-#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_push_dtor_no_addref(%ld): %d (%d)\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval), Z_REFCOUNT_PP(rval));
-#endif
-
- if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
- var_hash = emalloc(sizeof(var_dtor_entries));
- var_hash->used_slots = 0;
- var_hash->next = 0;
-
- if (!(*var_hashx)->first_dtor) {
- (*var_hashx)->first_dtor = var_hash;
- } else {
- ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash;
- }
-
- (*var_hashx)->last_dtor = var_hash;
- }
-
- ZVAL_COPY_VALUE(&var_hash->data[var_hash->used_slots], rval);
- var_hash->used_slots++;
+ var_dtor_entries *var_hash;
+
+ if (!var_hashx || !*var_hashx) {
+ return NULL;
+ }
+
+ var_hash = (*var_hashx)->last_dtor;
+ if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
+ var_hash = emalloc(sizeof(var_dtor_entries));
+ var_hash->used_slots = 0;
+ var_hash->next = 0;
+
+ if (!(*var_hashx)->first_dtor) {
+ (*var_hashx)->first_dtor = var_hash;
+ } else {
+ ((var_dtor_entries *) (*var_hashx)->last_dtor)->next = var_hash;
+ }
+
+ (*var_hashx)->last_dtor = var_hash;
+ }
+ ZVAL_UNDEF(&var_hash->data[var_hash->used_slots]);
+ return &var_hash->data[var_hash->used_slots++];
}
-#endif
PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval *nzval)
{
zend_long i;
var_entries *var_hash = (*var_hashx)->first;
#if VAR_ENTRIES_DBG
- fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval));
+ fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(nzval));
#endif
while (var_hash) {
@@ -171,16 +147,19 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
while (var_hash) {
next = var_hash->next;
- efree(var_hash);
+ efree_size(var_hash, sizeof(var_entries));
var_hash = next;
}
while (var_dtor_hash) {
for (i = 0; i < var_dtor_hash->used_slots; i++) {
+#if VAR_ENTRIES_DBG
+ fprintf(stderr, "var_destroy dtor(%p, %ld)\n", var_dtor_hash->data[i], Z_REFCOUNT_P(var_dtor_hash->data[i]));
+#endif
zval_ptr_dtor(&var_dtor_hash->data[i]);
}
next = var_dtor_hash->next;
- efree(var_dtor_hash);
+ efree_size(var_dtor_hash, sizeof(var_dtor_entries));
var_dtor_hash = next;
}
}
@@ -190,7 +169,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
static zend_string *unserialize_str(const unsigned char **p, size_t len, size_t maxlen)
{
size_t i, j;
- zend_string *str = zend_string_alloc(len, 0);
+ zend_string *str = zend_string_safe_alloc(1, len, 0, 0);
unsigned char *end = *(unsigned char **)p+maxlen;
if (end < *p) {
@@ -390,13 +369,22 @@ string_key:
}
}
- zval_dtor(&key);
-
if (!php_var_unserialize_ex(data, p, max, var_hash, classes)) {
+ zval_dtor(&key);
return 0;
}
- var_push_dtor(var_hash, data);
+ if (UNEXPECTED(Z_ISUNDEF_P(data))) {
+ if (Z_TYPE(key) == IS_LONG) {
+ zend_hash_index_del(ht, Z_LVAL(key));
+ } else {
+ zend_hash_del_ind(ht, Z_STR(key));
+ }
+ } else {
+ var_push_dtor(var_hash, data);
+ }
+
+ zval_dtor(&key);
if (elements && *(*p-1) != ';' && *(*p-1) != '}') {
(*p)--;
@@ -470,13 +458,15 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
{
zval retval;
zval fname;
+ HashTable *ht;
if (Z_TYPE_P(rval) != IS_OBJECT) {
return 0;
}
- //??? TODO: resize before
- if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_P(rval), elements, 1)) {
+ ht = Z_OBJPROP_P(rval);
+ zend_hash_extend(ht, zend_hash_num_elements(ht) + elements, (ht->u.flags & HASH_FLAG_PACKED));
+ if (!process_nested_data(UNSERIALIZE_PASSTHRU, ht, elements, 1)) {
return 0;
}
@@ -541,6 +531,10 @@ PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
}
zval_ptr_dtor(rval);
+ if (Z_ISUNDEF_P(rval_ref) || (Z_ISREF_P(rval_ref) && Z_ISUNDEF_P(Z_REFVAL_P(rval_ref)))) {
+ ZVAL_UNDEF(rval);
+ return 1;
+ }
if (Z_ISREF_P(rval_ref)) {
ZVAL_COPY(rval, rval_ref);
} else {
@@ -562,14 +556,16 @@ PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER)
return 0;
}
-//???
-//??? if (rval == rval_ref) return 0;
+ if (rval_ref == rval) {
+ return 0;
+ }
+
+ if (Z_ISUNDEF_P(rval_ref) || (Z_ISREF_P(rval_ref) && Z_ISUNDEF_P(Z_REFVAL_P(rval_ref)))) {
+ ZVAL_UNDEF(rval);
+ return 1;
+ }
-//??? if (!ZVAL_IS_UNDEF(rval)) {
-//??? var_push_dtor_no_addref(var_hash, rval);
-//??? }
ZVAL_COPY(rval, rval_ref);
-//??? Z_UNSET_ISREF_PP(rval);
return 1;
}
@@ -657,6 +653,11 @@ use_double:
return 0;
}
+ if (*(YYCURSOR + 1) != ';') {
+ *p = YYCURSOR + 1;
+ return 0;
+ }
+
YYCURSOR += 2;
*p = YYCURSOR;
@@ -685,6 +686,12 @@ use_double:
return 0;
}
+ if (*(YYCURSOR + 1) != ';') {
+ efree(str);
+ *p = YYCURSOR + 1;
+ return 0;
+ }
+
YYCURSOR += 2;
*p = YYCURSOR;
@@ -696,15 +703,18 @@ use_double:
zend_long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
*p = YYCURSOR;
+ if (!var_hash) return 0;
if (elements < 0) {
return 0;
}
array_init_size(rval, elements);
-//??? we can't convert from packed to hash during unserialization, because
-//??? reference to some zvals might be keept in var_hash (to support references)
- zend_hash_real_init(Z_ARRVAL_P(rval), 0);
+ if (elements) {
+ /* we can't convert from packed to hash during unserialization, because
+ reference to some zvals might be keept in var_hash (to support references) */
+ zend_hash_real_init(Z_ARRVAL_P(rval), 0);
+ }
if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_P(rval), elements, 0)) {
return 0;
@@ -714,8 +724,7 @@ use_double:
}
"o:" iv ":" ["] {
-
-//??? INIT_PZVAL(rval);
+ if (!var_hash) return 0;
return object_common2(UNSERIALIZE_PASSTHRU,
object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
@@ -735,11 +744,11 @@ object ":" uiv ":" ["] {
zval retval;
zval args[1];
+ if (!var_hash) return 0;
if (*start == 'C') {
custom_object = 1;
}
-//??? INIT_PZVAL(rval);
len2 = len = parse_uiv(start + 2);
maxlen = max - YYCURSOR;
if (maxlen < len || len == 0) {
diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c
index f47b3806b1..688f25afad 100644
--- a/ext/standard/versioning.c
+++ b/ext/standard/versioning.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sysvmsg/php_sysvmsg.h b/ext/sysvmsg/php_sysvmsg.h
index 8ee9aa97db..94c2e8e55a 100644
--- a/ext/sysvmsg/php_sysvmsg.h
+++ b/ext/sysvmsg/php_sysvmsg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 09cf0a561f..b291daed03 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sysvsem/php_sysvsem.h b/ext/sysvsem/php_sysvsem.h
index f7a40b5677..18524bea21 100644
--- a/ext/sysvsem/php_sysvsem.h
+++ b/ext/sysvsem/php_sysvsem.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index 3b3290a7de..e28e6b4c1b 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sysvshm/php_sysvshm.h b/ext/sysvshm/php_sysvshm.h
index 36ec0fb650..8bd261992f 100644
--- a/ext/sysvshm/php_sysvshm.h
+++ b/ext/sysvshm/php_sysvshm.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@ extern zend_module_entry sysvshm_module_entry;
#ifdef PHP_WIN32
# include <TSRM/tsrm_win32.h>
-typedef int key_t;
+# include "win32/ipc.h"
# ifndef THREAD_LS
# define THREAD_LS
# endif
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index f5d8ca8c93..2ecb19dd0f 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/sysvshm/tests/002.phpt b/ext/sysvshm/tests/002.phpt
index 4ae7a86a4a..cf83b8228b 100644
--- a/ext/sysvshm/tests/002.phpt
+++ b/ext/sysvshm/tests/002.phpt
@@ -25,7 +25,7 @@ var_dump($s = shm_attach($key, 1024));
shm_remove($key);
var_dump($s = shm_attach($key, 1024));
shm_remove($s);
-var_dump(shm_attach($key, 1024, 0666));
+var_dump($s = shm_attach($key, 1024, 0666));
shm_remove($s);
var_dump($s = shm_attach($key, 1024));
diff --git a/ext/sysvshm/tests/007.phpt b/ext/sysvshm/tests/007.phpt
index d68fcea7dd..584f13ac7a 100644
--- a/ext/sysvshm/tests/007.phpt
+++ b/ext/sysvshm/tests/007.phpt
@@ -17,7 +17,6 @@ var_dump(shm_remove(0));
var_dump(shm_remove(""));
var_dump(shm_remove($s));
-var_dump(shm_remove($s));
shm_detach($s);
var_dump(shm_remove($s));
@@ -38,7 +37,6 @@ NULL
Warning: shm_remove() expects parameter 1 to be resource, string given in %s007.php on line %d
NULL
bool(true)
-bool(true)
Warning: shm_remove(): supplied resource is not a valid sysvshm resource in %s007.php on line %d
bool(false)
diff --git a/ext/sysvshm/tests/shutdown_crash_0.phpt b/ext/sysvshm/tests/shutdown_crash_0.phpt
new file mode 100644
index 0000000000..c547c7e859
--- /dev/null
+++ b/ext/sysvshm/tests/shutdown_crash_0.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Shutdown crash when attached/removed same key segment multiple times
+--SKIPIF--
+<?php
+if (!extension_loaded("sysvshm")){ print 'skip'; }
+?>
+--FILE--
+<?php
+
+/*$key = ftok(__FILE__, 't');
+var_dump($key);*/
+$key = 42;
+
+var_dump($s = shm_attach($key, 1024));
+shm_remove($s);
+var_dump($s = shm_attach($key, 1024));
+shm_remove($s);
+
+--EXPECTF--
+resource(%d) of type (sysvshm)
+resource(%d) of type (sysvshm)
+
diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h
index 76d42e4566..c229baf34c 100644
--- a/ext/tidy/php_tidy.h
+++ b/ext/tidy/php_tidy.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -42,13 +42,10 @@ ZEND_BEGIN_MODULE_GLOBALS(tidy)
zend_bool clean_output;
ZEND_END_MODULE_GLOBALS(tidy)
-#ifdef ZTS
-#define TG(v) ZEND_TSRMG(tidy_globals_id, zend_tidy_globals *, v)
-#ifdef COMPILE_DL_TIDY
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define TG(v) (tidy_globals.v)
+#define TG(v) ZEND_MODULE_GLOBALS_ACCESSOR(tidy, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_TIDY)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 41d268218a..0c6c3e1385 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -71,7 +71,7 @@
#define TIDY_APPLY_CONFIG_ZVAL(_doc, _val) \
if(_val) { \
if(Z_TYPE_P(_val) == IS_ARRAY) { \
- _php_tidy_apply_config_array(_doc, HASH_OF(_val)); \
+ _php_tidy_apply_config_array(_doc, Z_ARRVAL_P(_val)); \
} else { \
convert_to_string_ex(_val); \
TIDY_OPEN_BASE_DIR_CHECK(Z_STRVAL_P(_val)); \
@@ -467,7 +467,7 @@ zend_module_entry tidy_module_entry = {
#ifdef COMPILE_DL_TIDY
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(tidy)
#endif
@@ -578,6 +578,11 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil
data = arg1;
}
+ if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(data))) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+
doc = tidyCreate();
errbuf = emalloc(sizeof(TidyBuffer));
tidyBufInit(errbuf);
@@ -609,7 +614,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil
TidyBuffer buf;
tidyBufInit(&buf);
- tidyBufAttach(&buf, (byte *) ZSTR_VAL(data), ZSTR_LEN(data));
+ tidyBufAttach(&buf, (byte *) ZSTR_VAL(data), (uint)ZSTR_LEN(data));
if (tidyParseBuffer(doc, &buf) < 0) {
php_error_docref(NULL, E_WARNING, "%s", errbuf->bp);
@@ -992,10 +997,9 @@ static void php_tidy_create_node(INTERNAL_FUNCTION_PARAMETERS, tidy_base_nodetyp
static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options)
{
zval *opt_val;
- zend_ulong opt_indx;
zend_string *opt_name;
- ZEND_HASH_FOREACH_KEY_VAL(ht_options, opt_indx, opt_name, opt_val) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(ht_options, opt_name, opt_val) {
if (opt_name == NULL) {
continue;
}
@@ -1005,7 +1009,7 @@ static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options)
return SUCCESS;
}
-static int php_tidy_parse_string(PHPTidyObj *obj, char *string, int len, char *enc)
+static int php_tidy_parse_string(PHPTidyObj *obj, char *string, uint len, char *enc)
{
TidyBuffer buf;
@@ -1151,7 +1155,6 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co
int status = FAILURE;
TidyDoc doc;
TidyBuffer inbuf, outbuf, errbuf;
- PHP_OUTPUT_TSRMLS(output_context);
if (TG(clean_output) && (output_context->op & PHP_OUTPUT_HANDLER_START) && (output_context->op & PHP_OUTPUT_HANDLER_FINAL)) {
doc = tidyCreate();
@@ -1161,10 +1164,15 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co
tidyOptSetBool(doc, TidyForceOutput, yes);
tidyOptSetBool(doc, TidyMark, no);
+ if (ZEND_SIZE_T_UINT_OVFL(output_context->in.used)) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ return status;
+ }
+
TIDY_SET_DEFAULT_CONFIG(doc);
tidyBufInit(&inbuf);
- tidyBufAttach(&inbuf, (byte *) output_context->in.data, output_context->in.used);
+ tidyBufAttach(&inbuf, (byte *) output_context->in.data, (uint)output_context->in.used);
if (0 <= tidyParseBuffer(doc, &inbuf) && 0 <= tidyCleanAndRepair(doc)) {
tidyBufInit(&outbuf);
@@ -1198,12 +1206,17 @@ static PHP_FUNCTION(tidy_parse_string)
RETURN_FALSE;
}
+ if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(input))) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+
tidy_instanciate(tidy_ce_doc, return_value);
obj = Z_TIDY_P(return_value);
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
- if (php_tidy_parse_string(obj, ZSTR_VAL(input), ZSTR_LEN(input), enc) == FAILURE) {
+ if (php_tidy_parse_string(obj, ZSTR_VAL(input), (uint)ZSTR_LEN(input), enc) == FAILURE) {
zval_ptr_dtor(return_value);
RETURN_FALSE;
}
@@ -1264,9 +1277,14 @@ static PHP_FUNCTION(tidy_parse_file)
RETURN_FALSE;
}
+ if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
- if (php_tidy_parse_string(obj, ZSTR_VAL(contents), ZSTR_LEN(contents), enc) == FAILURE) {
+ if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint)ZSTR_LEN(contents), enc) == FAILURE) {
zval_ptr_dtor(return_value);
RETVAL_FALSE;
}
@@ -1405,7 +1423,7 @@ static PHP_FUNCTION(tidy_get_config)
break;
case TidyBoolean:
- add_assoc_bool(return_value, opt_name, (zend_long)opt_value);
+ add_assoc_bool(return_value, opt_name, opt_value ? 1 : 0);
break;
}
}
@@ -1577,9 +1595,14 @@ static TIDY_DOC_METHOD(__construct)
return;
}
+ if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
- php_tidy_parse_string(obj, ZSTR_VAL(contents), ZSTR_LEN(contents), enc);
+ php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint)ZSTR_LEN(contents), enc);
zend_string_release(contents);
}
@@ -1608,9 +1631,14 @@ static TIDY_DOC_METHOD(parseFile)
RETURN_FALSE;
}
+ if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
- if (php_tidy_parse_string(obj, ZSTR_VAL(contents), ZSTR_LEN(contents), enc) == FAILURE) {
+ if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint)ZSTR_LEN(contents), enc) == FAILURE) {
RETVAL_FALSE;
} else {
RETVAL_TRUE;
@@ -1633,11 +1661,16 @@ static TIDY_DOC_METHOD(parseString)
RETURN_FALSE;
}
+ if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(input))) {
+ php_error_docref(NULL, E_WARNING, "Input string is too long");
+ RETURN_FALSE;
+ }
+
obj = Z_TIDY_P(object);
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
- if(php_tidy_parse_string(obj, ZSTR_VAL(input), ZSTR_LEN(input), enc) == SUCCESS) {
+ if(php_tidy_parse_string(obj, ZSTR_VAL(input), (uint)ZSTR_LEN(input), enc) == SUCCESS) {
RETURN_TRUE;
}
diff --git a/ext/tokenizer/Makefile.frag b/ext/tokenizer/Makefile.frag
index eb122f4210..f971394741 100644
--- a/ext/tokenizer/Makefile.frag
+++ b/ext/tokenizer/Makefile.frag
@@ -1,3 +1,4 @@
$(top_srcdir)/Zend/zend_language_parser.c:
$(top_srcdir)/Zend/zend_language_scanner.c:
+$(top_srcdir)/ext/tokenizer/tokenizer_data.c: $(top_srcdir)/Zend/zend_language_parser.h
$(builddir)/tokenizer.lo: $(top_srcdir)/Zend/zend_language_parser.c $(top_srcdir)/Zend/zend_language_scanner.c
diff --git a/ext/tokenizer/php_tokenizer.h b/ext/tokenizer/php_tokenizer.h
index ec042192fc..a069c13828 100644
--- a/ext/tokenizer/php_tokenizer.h
+++ b/ext/tokenizer/php_tokenizer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/tokenizer/tests/parse_errors.phpt b/ext/tokenizer/tests/parse_errors.phpt
index bfa6e07ac4..700326ff41 100644
--- a/ext/tokenizer/tests/parse_errors.phpt
+++ b/ext/tokenizer/tests/parse_errors.phpt
@@ -7,10 +7,19 @@ Parse errors during token_get_all()
function test_parse_error($code) {
try {
- var_dump(token_get_all($code));
+ var_dump(token_get_all($code, TOKEN_PARSE));
} catch (ParseError $e) {
echo $e->getMessage(), "\n";
}
+
+ foreach (token_get_all($code) as $token) {
+ if (is_array($token)) {
+ echo token_name($token[0]), " ($token[1])\n";
+ } else {
+ echo "$token\n";
+ }
+ }
+ echo "\n";
}
test_parse_error('<?php var_dump(078);');
@@ -21,6 +30,37 @@ test_parse_error('<?php var_dump(078 + 078);');
?>
--EXPECT--
Invalid numeric literal
+T_OPEN_TAG (<?php )
+T_STRING (var_dump)
+(
+T_LNUMBER (078)
+)
+;
+
Invalid UTF-8 codepoint escape sequence
+T_OPEN_TAG (<?php )
+T_STRING (var_dump)
+(
+T_CONSTANT_ENCAPSED_STRING ("\u{xyz}")
+)
+;
+
Invalid UTF-8 codepoint escape sequence: Codepoint too large
+T_OPEN_TAG (<?php )
+T_STRING (var_dump)
+(
+T_CONSTANT_ENCAPSED_STRING ("\u{ffffff}")
+)
+;
+
Invalid numeric literal
+T_OPEN_TAG (<?php )
+T_STRING (var_dump)
+(
+T_LNUMBER (078)
+T_WHITESPACE ( )
++
+T_WHITESPACE ( )
+T_LNUMBER (078)
+)
+;
diff --git a/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_001.phpt b/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_001.phpt
index eb0e300964..fc166e2fc6 100644
--- a/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_001.phpt
+++ b/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_001.phpt
@@ -11,6 +11,7 @@ $x->$continue;
X::continue();
$x->continue();
X::class;
+$x->__halt_compiler();
class X {
const CONTINUE = 1;
@@ -60,22 +61,28 @@ L7: T_STRING X
L7: T_DOUBLE_COLON ::
L7: T_STRING class
;
-L9: T_CLASS class
-L9: T_STRING X
+L8: T_VARIABLE $x
+L8: T_OBJECT_OPERATOR ->
+L8: T_STRING __halt_compiler
+(
+)
+;
+L10: T_CLASS class
+L10: T_STRING X
{
-L10: T_CONST const
-L10: T_STRING CONTINUE
+L11: T_CONST const
+L11: T_STRING CONTINUE
=
-L10: T_LNUMBER 1
+L11: T_LNUMBER 1
;
-L11: T_PUBLIC public
-L11: T_VARIABLE $x
+L12: T_PUBLIC public
+L12: T_VARIABLE $x
=
-L11: T_STRING self
-L11: T_DOUBLE_COLON ::
-L11: T_STRING CONTINUE
+L12: T_STRING self
+L12: T_DOUBLE_COLON ::
+L12: T_STRING CONTINUE
+
-L11: T_LNUMBER 1
+L12: T_LNUMBER 1
;
}
-Done
+Done \ No newline at end of file
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 63405ea6cd..c0eb38a63f 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,6 +28,7 @@
#include "php_tokenizer.h"
#include "zend.h"
+#include "zend_exceptions.h"
#include "zend_language_scanner.h"
#include "zend_language_scanner_defs.h"
#include <zend_language_parser.h>
@@ -46,6 +47,7 @@ void tokenizer_token_get_all_register_constants(INIT_FUNC_ARGS) {
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_token_get_all, 0, 0, 1)
ZEND_ARG_INFO(0, source)
+ ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_token_name, 0, 0, 1)
@@ -111,7 +113,6 @@ static zend_bool tokenize(zval *return_value, zend_string *source)
zval token;
zval keyword;
int token_type;
- zend_bool destroy;
int token_line = 1;
int need_tokens = -1; /* for __halt_compiler lexing. -1 = disabled */
@@ -126,24 +127,10 @@ static zend_bool tokenize(zval *return_value, zend_string *source)
LANG_SCNG(yy_state) = yycINITIAL;
array_init(return_value);
- ZVAL_NULL(&token);
+ ZVAL_UNDEF(&token);
while ((token_type = lex_scan(&token))) {
-
- if(token_type == T_ERROR) break;
-
- destroy = 1;
- switch (token_type) {
- case T_CLOSE_TAG:
- if (zendtext[zendleng - 1] != '>') {
- CG(zend_lineno)++;
- }
- case T_OPEN_TAG:
- case T_OPEN_TAG_WITH_ECHO:
- case T_WHITESPACE:
- case T_COMMENT:
- case T_DOC_COMMENT:
- destroy = 0;
- break;
+ if (token_type == T_CLOSE_TAG && zendtext[zendleng - 1] != '>') {
+ CG(zend_lineno)++;
}
if (token_type >= 256) {
@@ -161,10 +148,11 @@ static zend_bool tokenize(zval *return_value, zend_string *source)
} else {
add_next_index_stringl(return_value, (char *)zendtext, zendleng);
}
- if (destroy && Z_TYPE(token) != IS_NULL) {
+
+ if (Z_TYPE(token) != IS_UNDEF) {
zval_dtor(&token);
+ ZVAL_UNDEF(&token);
}
- ZVAL_NULL(&token);
/* after T_HALT_COMPILER collect the next three non-dropped tokens */
if (need_tokens != -1) {
@@ -203,9 +191,9 @@ void on_event(zend_php_scanner_event event, int token, int line)
HashTable *tokens_ht;
zval *token_zv;
- switch(event) {
+ switch (event) {
case ON_TOKEN:
- if (token == T_ERROR || token == END) break;
+ if (token == END) break;
if (token >= 256) {
array_init(&keyword);
add_next_index_long(&keyword, token);
@@ -277,7 +265,7 @@ static zend_bool tokenize_parse(zval *return_value, zend_string *source)
/* }}} */
-/* {{{ proto array token_get_all(string source)
+/* {{{ proto array token_get_all(string source [, int flags])
*/
PHP_FUNCTION(token_get_all)
{
@@ -293,6 +281,8 @@ PHP_FUNCTION(token_get_all)
success = tokenize_parse(return_value, source);
} else {
success = tokenize(return_value, source);
+ /* Normal token_get_all() should not throw. */
+ zend_clear_exception();
}
if (!success) RETURN_FALSE;
diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c
index 6769202a3b..30a778df77 100644
--- a/ext/tokenizer/tokenizer_data.c
+++ b/ext/tokenizer/tokenizer_data.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/tokenizer/tokenizer_data_gen.sh b/ext/tokenizer/tokenizer_data_gen.sh
index 49ef7cbfa3..8063f50514 100755
--- a/ext/tokenizer/tokenizer_data_gen.sh
+++ b/ext/tokenizer/tokenizer_data_gen.sh
@@ -16,7 +16,7 @@ echo '/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -46,7 +46,7 @@ echo '/*
echo 'void tokenizer_register_constants(INIT_FUNC_ARGS) {' >> $OUTFILE
$AWK '
- /^#define T_ERROR/ { next }
+ /^#define T_(NOELSE|ERROR)/ { next }
/^#define T_/ { print " REGISTER_LONG_CONSTANT(\"" $2 "\", " $2 ", CONST_CS | CONST_PERSISTENT);" }
' < $INFILE >> $OUTFILE
echo ' REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT);' >> $OUTFILE
@@ -64,7 +64,7 @@ $AWK '
print " case T_PAAMAYIM_NEKUDOTAYIM: return \"T_DOUBLE_COLON\";"
next
}
- /^#define T_ERROR/ { next }
+ /^#define T_(NOELSE|ERROR)/ { next }
/^#define T_/ {
print " case " $2 ": return \"" $2 "\";"
}
diff --git a/ext/wddx/php_wddx.h b/ext/wddx/php_wddx.h
index 480f4c0488..a527aa940c 100644
--- a/ext/wddx/php_wddx.h
+++ b/ext/wddx/php_wddx.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/wddx/php_wddx_api.h b/ext/wddx/php_wddx_api.h
index 1a8d62f562..c26f6ae274 100644
--- a/ext/wddx/php_wddx_api.h
+++ b/ext/wddx/php_wddx_api.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/wddx/tests/bug70661.phpt b/ext/wddx/tests/bug70661.phpt
new file mode 100644
index 0000000000..e068c20a7a
--- /dev/null
+++ b/ext/wddx/tests/bug70661.phpt
@@ -0,0 +1,69 @@
+--TEST--
+Bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
+--SKIPIF--
+<?php
+if (!extension_loaded("wddx")) print "skip";
+?>
+--FILE--
+<?php
+$fakezval = ptr2str(1122334455);
+$fakezval .= ptr2str(0);
+$fakezval .= "\x00\x00\x00\x00";
+$fakezval .= "\x01";
+$fakezval .= "\x00";
+$fakezval .= "\x00\x00";
+
+$x = <<<EOT
+<?xml version='1.0'?>
+<wddxPacket version='1.0'>
+<header/>
+ <data>
+ <struct>
+ <recordset rowCount='1' fieldNames='ryat'>
+ <field name='ryat'>
+ <var name='php_class_name'>
+ <string>stdClass</string>
+ </var>
+ <null/>
+ </field>
+ </recordset>
+ </struct>
+ </data>
+</wddxPacket>
+EOT;
+
+$y = wddx_deserialize($x);
+
+for ($i = 0; $i < 5; $i++) {
+ $v[$i] = $fakezval.$i;
+}
+
+var_dump($y);
+
+function ptr2str($ptr)
+{
+ $out = '';
+
+ for ($i = 0; $i < 8; $i++) {
+ $out .= chr($ptr & 0xff);
+ $ptr >>= 8;
+ }
+
+ return $out;
+}
+?>
+DONE
+--EXPECTF--
+array(1) {
+ [0]=>
+ array(1) {
+ ["ryat"]=>
+ array(2) {
+ ["php_class_name"]=>
+ string(8) "stdClass"
+ [0]=>
+ NULL
+ }
+ }
+}
+DONE \ No newline at end of file
diff --git a/ext/wddx/tests/bug70741.phpt b/ext/wddx/tests/bug70741.phpt
new file mode 100644
index 0000000000..9c7e09b48b
--- /dev/null
+++ b/ext/wddx/tests/bug70741.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #70741 (Session WDDX Packet Deserialization Type Confusion Vulnerability)
+--SKIPIF--
+<?php
+if (!extension_loaded("wddx")) print "skip";
+?>
+--FILE--
+<?php
+ini_set('session.serialize_handler', 'wddx');
+session_start();
+
+$hashtable = str_repeat('A', 66);
+$wddx = "<?xml version='1.0'?>
+<wddxPacket version='1.0'>
+<header/>
+ <data>
+ <string>$hashtable</string>
+ </data>
+</wddxPacket>";
+session_decode($wddx);
+?>
+DONE
+--EXPECTF--
+
+Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s on line %d
+DONE \ No newline at end of file
diff --git a/ext/wddx/tests/bug71335.phpt b/ext/wddx/tests/bug71335.phpt
new file mode 100644
index 0000000000..57a7f14f81
--- /dev/null
+++ b/ext/wddx/tests/bug71335.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Bug #71335 (Type Confusion in WDDX Packet Deserialization)
+--SKIPIF--
+<?php
+if (!extension_loaded("wddx")) print "skip";
+?>
+--FILE--
+<?php
+$x = "<?xml version='1.0'?>
+<wddxPacket version='1.0'>
+<header/>
+ <data>
+ <struct>
+ <var name='php_class_name'>
+ <string>stdClass</string>
+ </var>
+ <var name='php_class_name'>
+ <string>stdClass</string>
+ </var>
+ </struct>
+ </data>
+</wddxPacket>";
+
+$d = wddx_deserialize($x);
+var_dump($d);
+?>
+DONE
+--EXPECTF--
+object(stdClass)#%d (1) {
+ ["php_class_name"]=>
+ string(8) "stdClass"
+}
+DONE
diff --git a/ext/wddx/tests/bug71587.phpt b/ext/wddx/tests/bug71587.phpt
new file mode 100644
index 0000000000..3fdfc35c16
--- /dev/null
+++ b/ext/wddx/tests/bug71587.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #71587 (Use-After-Free / Double-Free in WDDX Deserialize)
+--SKIPIF--
+<?php
+if (!extension_loaded("wddx")) print "skip";
+?>
+--FILE--
+<?php
+
+$xml = <<<EOF
+<?xml version='1.0' ?>
+<!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'>
+<wddxPacket version='1.0'>
+ <array>
+ <var name='ML'></var>
+ <string>manhluat</string>
+ <var name='ML2'></var>
+ <boolean value='a'/>
+ <boolean value='true'/>
+ </array>
+</wddxPacket>
+EOF;
+
+$wddx = wddx_deserialize($xml);
+var_dump($wddx);
+// Print mem leak
+foreach($wddx as $k=>$v)
+ printf("Key: %s\nValue: %s\n",bin2hex($k),bin2hex($v));
+
+?>
+DONE
+--EXPECTF--
+array(2) {
+ [0]=>
+ string(8) "manhluat"
+ [1]=>
+ bool(true)
+}
+Key: 30
+Value: 6d616e686c756174
+Key: 31
+Value: 31
+DONE
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index d364115799..e848afdeb7 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -298,6 +298,10 @@ PS_SERIALIZER_DECODE_FUNC(wddx)
ZVAL_UNDEF(&retval);
if ((ret = php_wddx_deserialize_ex(val, vallen, &retval)) == SUCCESS) {
+ if (Z_TYPE(retval) != IS_ARRAY) {
+ zval_dtor(&retval);
+ return FAILURE;
+ }
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL(retval), idx, key, ent) {
if (key == NULL) {
key = zend_long_to_str(idx);
@@ -390,9 +394,8 @@ static void php_wddx_serialize_string(wddx_packet *packet, zval *var)
php_wddx_add_chunk_static(packet, WDDX_STRING_S);
if (Z_STRLEN_P(var) > 0) {
- zend_string *buf;
-
- buf = php_escape_html_entities(Z_STRVAL_P(var), Z_STRLEN_P(var), 0, ENT_QUOTES, NULL);
+ zend_string *buf = php_escape_html_entities(
+ (unsigned char *) Z_STRVAL_P(var), Z_STRLEN_P(var), 0, ENT_QUOTES, NULL);
php_wddx_add_chunk_ex(packet, ZSTR_VAL(buf), ZSTR_LEN(buf));
@@ -464,7 +467,7 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
PHP_CLEANUP_CLASS_ATTRIBUTES();
- objhash = HASH_OF(obj);
+ objhash = Z_OBJPROP_P(obj);
ZEND_HASH_FOREACH_VAL(sleephash, varname) {
if (Z_TYPE_P(varname) != IS_STRING) {
@@ -494,7 +497,7 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
PHP_CLEANUP_CLASS_ATTRIBUTES();
- objhash = HASH_OF(obj);
+ objhash = Z_OBJPROP_P(obj);
ZEND_HASH_FOREACH_KEY_VAL(objhash, idx, key, ent) {
if (ent == obj) {
continue;
@@ -534,7 +537,7 @@ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr)
char tmp_buf[WDDX_BUF_LEN];
zend_ulong ind = 0;
- target_hash = HASH_OF(arr);
+ target_hash = Z_ARRVAL_P(arr);
ZEND_HASH_FOREACH_KEY(target_hash, idx, key) {
if (key) {
is_struct = 1;
@@ -589,9 +592,7 @@ void php_wddx_serialize_var(wddx_packet *packet, zval *var, zend_string *name)
if (name) {
char *tmp_buf;
- zend_string *name_esc;
-
- name_esc = php_escape_html_entities(ZSTR_VAL(name), ZSTR_LEN(name), 0, ENT_QUOTES, NULL);
+ zend_string *name_esc = php_escape_html_entities((unsigned char *) ZSTR_VAL(name), ZSTR_LEN(name), 0, ENT_QUOTES, NULL);
tmp_buf = emalloc(ZSTR_LEN(name_esc) + sizeof(WDDX_VAR_S));
snprintf(tmp_buf, ZSTR_LEN(name_esc) + sizeof(WDDX_VAR_S), WDDX_VAR_S, ZSTR_VAL(name_esc));
php_wddx_add_chunk(packet, tmp_buf);
@@ -736,7 +737,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
char tmp_buf[2];
snprintf(tmp_buf, sizeof(tmp_buf), "%c", (char)strtol((char *)atts[i], NULL, 16));
- php_wddx_process_data(user_data, tmp_buf, strlen(tmp_buf));
+ php_wddx_process_data(user_data, (XML_Char *) tmp_buf, strlen(tmp_buf));
break;
}
}
@@ -783,7 +784,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp((char *)atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
- stack->varname = estrdup(atts[i]);
+ stack->varname = estrdup((char *)atts[i]);
break;
}
}
@@ -798,9 +799,9 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
if (!strcmp((char *)atts[i], "fieldNames") && atts[++i] && atts[i][0]) {
zval tmp;
char *key;
- char *p1, *p2, *endp;
+ const char *p1, *p2, *endp;
- endp = (char *)atts[i] + strlen(atts[i]);
+ endp = (char *)atts[i] + strlen((char *)atts[i]);
p1 = (char *)atts[i];
while ((p2 = php_memnstr(p1, ",", sizeof(",")-1, endp)) != NULL) {
key = estrndup(p1, p2 - p1);
@@ -835,7 +836,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
if (wddx_stack_top(stack, (void**)&recordset) == SUCCESS &&
recordset->type == ST_RECORDSET &&
- (field = zend_hash_str_find(Z_ARRVAL(recordset->data), (char*)atts[i], strlen(atts[i]))) != NULL) {
+ (field = zend_hash_str_find(Z_ARRVAL(recordset->data), (char*)atts[i], strlen((char *)atts[i]))) != NULL) {
ZVAL_COPY_VALUE(&ent.data, field);
}
@@ -876,10 +877,19 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
!strcmp((char *)name, EL_DATETIME)) {
wddx_stack_top(stack, (void**)&ent1);
- if (!strcmp((char *)name, EL_BINARY)) {
- zend_string *new_str;
+ if (Z_TYPE(ent1->data) == IS_UNDEF) {
+ if (stack->top > 1) {
+ stack->top--;
+ } else {
+ stack->done = 1;
+ }
+ efree(ent1);
+ return;
+ }
- new_str = php_base64_decode(Z_STRVAL(ent1->data), Z_STRLEN(ent1->data));
+ if (!strcmp((char *)name, EL_BINARY)) {
+ zend_string *new_str = php_base64_decode(
+ (unsigned char *)Z_STRVAL(ent1->data), Z_STRLEN(ent1->data));
zval_ptr_dtor(&ent1->data);
ZVAL_STR(&ent1->data, new_str);
}
@@ -912,7 +922,8 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
if (ent1->varname) {
if (!strcmp(ent1->varname, PHP_CLASS_NAME_VAR) &&
- Z_TYPE(ent1->data) == IS_STRING && Z_STRLEN(ent1->data)) {
+ Z_TYPE(ent1->data) == IS_STRING && Z_STRLEN(ent1->data) &&
+ ent2->type == ST_STRUCT && Z_TYPE(ent2->data) == IS_ARRAY) {
zend_bool incomplete_class = 0;
zend_str_tolower(Z_STRVAL(ent1->data), Z_STRLEN(ent1->data));
@@ -943,12 +954,8 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
/* Clean up class name var entry */
zval_ptr_dtor(&ent1->data);
} else if (Z_TYPE(ent2->data) == IS_OBJECT) {
- zend_class_entry *old_scope = EG(scope);
-
- EG(scope) = Z_OBJCE(ent2->data);
- add_property_zval(&ent2->data, ent1->varname, &ent1->data);
+ zend_update_property(Z_OBJCE(ent2->data), &ent2->data, ent1->varname, strlen(ent1->varname), &ent1->data);
if Z_REFCOUNTED(ent1->data) Z_DELREF(ent1->data);
- EG(scope) = old_scope;
} else {
zend_symtable_str_update(target_hash, ent1->varname, strlen(ent1->varname), &ent1->data);
}
@@ -963,6 +970,7 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
}
} else if (!strcmp((char *)name, EL_VAR) && stack->varname) {
efree(stack->varname);
+ stack->varname = NULL;
} else if (!strcmp((char *)name, EL_FIELD)) {
st_entry *ent;
wddx_stack_top(stack, (void **)&ent);
@@ -1004,11 +1012,11 @@ static void php_wddx_process_data(void *user_data, const XML_Char *s, int len)
} else if (!strcmp((char *)s, "false")) {
Z_LVAL(ent->data) = 0;
} else {
- stack->top--;
zval_ptr_dtor(&ent->data);
- if (ent->varname)
+ if (ent->varname) {
efree(ent->varname);
- efree(ent);
+ }
+ ZVAL_UNDEF(&ent->data);
}
break;
@@ -1045,14 +1053,14 @@ int php_wddx_deserialize_ex(const char *value, size_t vallen, zval *return_value
int retval;
wddx_stack_init(&stack);
- parser = XML_ParserCreate("UTF-8");
+ parser = XML_ParserCreate((XML_Char *) "UTF-8");
XML_SetUserData(parser, &stack);
XML_SetElementHandler(parser, php_wddx_push_element, php_wddx_pop_element);
XML_SetCharacterDataHandler(parser, php_wddx_process_data);
/* XXX value should be parsed in the loop to exhaust size_t */
- XML_Parse(parser, value, (int)vallen, 1);
+ XML_Parse(parser, (const XML_Char *) value, (int)vallen, 1);
XML_ParserFree(parser);
@@ -1204,7 +1212,7 @@ PHP_FUNCTION(wddx_packet_end)
}
/* }}} */
-/* {{{ proto int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])
+/* {{{ proto bool wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])
Serializes given variables and adds them to packet given by packet_id */
PHP_FUNCTION(wddx_add_vars)
{
diff --git a/ext/xml/compat.c b/ext/xml/compat.c
index df0879dea4..3fc203ee23 100644
--- a/ext/xml/compat.c
+++ b/ext/xml/compat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h
index 420bedd19d..75f2885148 100644
--- a/ext/xml/expat_compat.h
+++ b/ext/xml/expat_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h
index c8eb3cf6d1..47757c9b8c 100644
--- a/ext/xml/php_xml.h
+++ b/ext/xml/php_xml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -144,13 +144,10 @@ PHP_XML_API zend_string *xml_utf8_encode(const char *, size_t, const XML_Char *)
#define phpext_xml_ptr xml_module_ptr
-#ifdef ZTS
-#define XML(v) ZEND_TSRMG(xml_globals_id, zend_xml_globals *, v)
-#ifdef COMPILE_DL_XML
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define XML(v) (xml_globals.v)
+#define XML(v) ZEND_MODULE_GLOBALS_ACCESSOR(xml, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_XML)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif /* PHP_XML_H */
diff --git a/ext/xml/tests/bug32001.phpt b/ext/xml/tests/bug32001.phpt
index b5d2a7b0bd..2e9e67d4ca 100644
--- a/ext/xml/tests/bug32001.phpt
+++ b/ext/xml/tests/bug32001.phpt
@@ -4,6 +4,8 @@ Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect),
<?php
require_once("skipif.inc");
if (!extension_loaded('iconv')) die ("skip iconv extension not available");
+if (ICONV_IMPL == 'glibc' && version_compare(ICONV_VERSION, '2.12', '<='))
+ die("skip iconv of glibc <= 2.12 is buggy");
?>
--FILE--
<?php
diff --git a/ext/xml/tests/bug72099.phpt b/ext/xml/tests/bug72099.phpt
new file mode 100644
index 0000000000..50173a6a4c
--- /dev/null
+++ b/ext/xml/tests/bug72099.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #72099: xml_parse_into_struct segmentation fault
+--SKIPIF--
+<?php
+require_once("skipif.inc");
+?>
+--FILE--
+<?php
+$var1=xml_parser_create_ns();
+$var2=str_repeat("a", 10);
+$var3=[];
+$var4=[];
+xml_parse_into_struct($var1, $var2, $var3, $var4);
+var_dump($var3);
+--EXPECT--
+array(0) {
+} \ No newline at end of file
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index bcded6203a..9a23044641 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -63,7 +63,7 @@ ZEND_DECLARE_MODULE_GLOBALS(xml)
/* {{{ dynamically loadable module stuff */
#ifdef COMPILE_DL_XML
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(xml)
#endif /* COMPILE_DL_XML */
@@ -111,7 +111,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_xml_set_object, 0, 0, 2)
ZEND_ARG_INFO(0, parser)
- ZEND_ARG_INFO(1, obj)
+ ZEND_ARG_INFO(0, obj)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_xml_set_element_handler, 0, 0, 3)
@@ -483,9 +483,7 @@ static void xml_call_handler(xml_parser *parser, zval *handler, zend_function *f
zend_fcall_info fci;
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fci.function_name, handler);
- fci.symbol_table = NULL;
fci.object = Z_OBJ(parser->object);
fci.retval = retval;
fci.param_count = argc;
@@ -581,7 +579,7 @@ PHP_XML_API zend_string *xml_utf8_encode(const char *s, size_t len, const XML_Ch
}
/* This is the theoretical max (will never get beyond len * 2 as long
* as we are converting from single-byte characters, though) */
- str = zend_string_alloc(len * 4, 0);
+ str = zend_string_safe_alloc(len, 4, 0, 0);
ZSTR_LEN(str) = 0;
while (pos > 0) {
c = encoder ? encoder((unsigned char)(*s)) : (unsigned short)(*s);
@@ -1169,7 +1167,7 @@ PHP_FUNCTION(xml_set_object)
xml_parser *parser;
zval *pind, *mythis;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "ro/", &pind, &mythis) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ro", &pind, &mythis) == FAILURE) {
return;
}
@@ -1183,9 +1181,7 @@ PHP_FUNCTION(xml_set_object)
}
/* please leave this commented - or ask thies@thieso.net before doing it (again) */
-/* #ifdef ZEND_ENGINE_2
- zval_add_ref(&parser->object);
-#endif */
+ /* zval_add_ref(&parser->object); */
ZVAL_COPY(&parser->object, mythis);
@@ -1383,7 +1379,7 @@ PHP_FUNCTION(xml_set_end_namespace_decl_handler)
}
/* }}} */
-/* {{{ proto int xml_parse(resource parser, string data [, int isFinal])
+/* {{{ proto int xml_parse(resource parser, string data [, bool isFinal])
Start parsing an XML document */
PHP_FUNCTION(xml_parse)
{
@@ -1392,9 +1388,9 @@ PHP_FUNCTION(xml_parse)
char *data;
size_t data_len;
int ret;
- zend_long isFinal = 0;
+ zend_bool isFinal = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|l", &pind, &data, &data_len, &isFinal) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|b", &pind, &data, &data_len, &isFinal) == FAILURE) {
return;
}
@@ -1573,9 +1569,10 @@ PHP_FUNCTION(xml_parser_free)
RETURN_FALSE;
}
- res = Z_RES(parser->index);
- ZVAL_UNDEF(&parser->index);
- zend_list_close(res);
+ if (zend_list_delete(Z_RES(parser->index)) == FAILURE) {
+ RETURN_FALSE;
+ }
+
RETURN_TRUE;
}
/* }}} */
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index f636903e90..5646634a9b 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xmlreader/php_xmlreader.h b/ext/xmlreader/php_xmlreader.h
index c5cc22cf57..b0b0e1350c 100644
--- a/ext/xmlreader/php_xmlreader.h
+++ b/ext/xmlreader/php_xmlreader.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xmlreader/tests/XMLReaderBad_bug71805.xml b/ext/xmlreader/tests/XMLReaderBad_bug71805.xml
new file mode 100644
index 0000000000..68ee25ddb8
--- /dev/null
+++ b/ext/xmlreader/tests/XMLReaderBad_bug71805.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<records>
+
+<record><aaa><bbbb><ccc><![CDATA[XXX Xxxxxxxxxxxx]]></ccc><ddd><![CDATA[XXX Xx]]></ddd></bbbb><eee><![CDATA[Xxxxx xxxxxxx: xxxx://xxx.xxx.xx.xx/xxxx?xxxxXx=0xx000x0-000x-0xx0-x000-x0000xx0xx00
+Xxxxxxxxxxxx xx Xxxxxxxxxxxx Xxxxxxxxx xx Xxxxxxxxx Xxxxxxxxxxxx Xxxxxxxxxxx Xxxxxxxxxxxx (XXX Xxxxxxxxxxxx), xxxxxxxxx xxxxxxx xx Xxx Xxxxxxxxxx Xxxxxxxxxx Xxx.]]></eee></aaa><fff><bbbb><ggg><![CDATA[Xxxxxxxxx Xxxxxxxxxxxxxxx Xxxxxxxxxx xx Xxxxxxxxxxxx]]></ggg><ccc><![CDATA[XXX Xxxxxxxxxxxx]]></ccc></bbbb><hhh><![CDATA[Xx xxxxx, xx xxxxxxxxxxx XXX Xxxxxxxxxxxx x xxxxxcé x’xxxxxxxx xxx x’Xxxxxxléx léxxxxxxxxx xx xx xxxxxxxx xx xx Xxxxxxxxxx Xxxxxxxxxx Xxx (xxx xxx xx xxxxxxxxxx xxxxxxxxx). Xxxxx xxx xréxxxx xxx xxxxxx xxx déxxxxxxxx XXX Xxxxxxxxxxxx xx xxxx xx’xxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxréxxxxxxtéx xx xxxxxxx xxx XX, xxx XXX xx xxx XXX xx xx xxxxxxxx xx xxxxx x’xxxxxxxx xx xxxxx xx xxxxxxxxx xxxxxxxxxxxxx xxréé (XXX). (Xxxxxxxxéx XXX - Xxx 0000)]]></hhh></fff></record>
+
+</records> \ No newline at end of file
diff --git a/ext/xmlreader/tests/XMLReaderGood_bug71805.xml b/ext/xmlreader/tests/XMLReaderGood_bug71805.xml
new file mode 100644
index 0000000000..9a59e0c978
--- /dev/null
+++ b/ext/xmlreader/tests/XMLReaderGood_bug71805.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<records>
+
+<record><aaa><bbbb><ddd><![CDATA[XXX Xx]]></ddd></bbbb><eee><![CDATA[Xxxxx xxxxxxx: xxxx://xxx.xxx.xx.xx/xxxx?xxxxXx=0xx000x0-000x-0xx0-x000-x0000xx0xx00
+Xxxxxxxxxxxx xx Xxxxxxxxxxxx Xxxxxxxxx xx Xxxxxxxxx Xxxxxxxxxxxx Xxxxxxxxxxx Xxxxxxxxxxxx (XXX Xxxxxxxxxxxx), xxxxxxxxx xxxxxxx xx Xxx Xxxxxxxxxx Xxxxxxxxxx Xxx.]]></eee></aaa><fff><bbbb><ggg><![CDATA[Xxxxxxxxx Xxxxxxxxxxxxxxx Xxxxxxxxxx xx Xxxxxxxxxxxx]]></ggg><ccc><![CDATA[XXX Xxxxxxxxxxxx]]></ccc></bbbb><hhh><![CDATA[Xx xxxxx, xx xxxxxxxxxxx XXX Xxxxxxxxxxxx x xxxxxcé x’xxxxxxxx xxx x’Xxxxxxléx léxxxxxxxxx xx xx xxxxxxxx xx xx Xxxxxxxxxx Xxxxxxxxxx Xxx (xxx xxx xx xxxxxxxxxx xxxxxxxxx). Xxxxx xxx xréxxxx xxx xxxxxx xxx déxxxxxxxx XXX Xxxxxxxxxxxx xx xxxx xx’xxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxréxxxxxxtéx xx xxxxxxx xxx XX, xxx XXX xx xxx XXX xx xx xxxxxxxx xx xxxxx x’xxxxxxxx xx xxxxx xx xxxxxxxxx xxxxxxxxxxxxx xxréé (XXX). (Xxxxxxxxéx XXX - Xxx 0000)]]></hhh></fff></record>
+
+</records> \ No newline at end of file
diff --git a/ext/xmlreader/tests/bug70309.phpt b/ext/xmlreader/tests/bug70309.phpt
new file mode 100644
index 0000000000..021d346bda
--- /dev/null
+++ b/ext/xmlreader/tests/bug70309.phpt
@@ -0,0 +1,43 @@
+--TEST--
+XMLReader: Bug #70309 XmlReader read generates extra output
+--SKIPIF--
+<?php if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. only for Windows'); ?>
+<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
+<?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?>
+--FILE--
+<?php
+
+/* From the bug report an extra message comes from libxml2 debug output left unwrapped. */
+
+$doc = new \XMLReader();
+
+$doc->xml('<?xml version="1.0" encoding="UTF-8"?>
+<chapter xmlns="http://docbook.org/ns/docbook" version="5.0">
+<title>Test Chapter</title>
+<para>
+This is a paragraph in the test chapter. It is unremarkable in
+every regard. This is a paragraph in the test chapter. It is
+unremarkable in every regard. This is a paragraph in the test
+chapter. It is unremarkable in every regard.
+</para>
+<paar>
+<emphasis role="bold">This</emphasis> paragraph contains
+<emphasis>some <emphasis>emphasized</emphasis> text</emphasis>
+1and a <superscript>super</superscript>script
+and a <subscript>sub</subscript>script.
+</para>
+<para>
+This is a paragraph in the test chapter. It is unremarkable in
+every regard. This is a paragraph in the test chapter. It is
+unremarkable in every regard. This is a paragraph in the test
+chapter. It is unremarkable in every regard.
+</para>
+</chapter>');
+
+$doc->setRelaxNGSchema('http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng');
+
+while (@$doc->read() !== false);
+?>
+===DONE===
+--EXPECTF--
+===DONE===
diff --git a/ext/xmlreader/tests/bug71805.phpt b/ext/xmlreader/tests/bug71805.phpt
new file mode 100644
index 0000000000..3d1713ace5
--- /dev/null
+++ b/ext/xmlreader/tests/bug71805.phpt
@@ -0,0 +1,39 @@
+--TEST--
+XMLReader: Bug #71805 XML files can generate UTF-8 error even if they are UTF-8
+--SKIPIF--
+<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
+--FILE--
+<?php
+
+TestXML(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'XMLReaderGood_bug71805.xml');
+TestXML(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'XMLReaderBad_bug71805.xml');
+
+function TestXML($file) {
+ $XR = new XMLReader;
+ $XR->open($file, null, LIBXML_NOBLANKS);
+
+ while (($lastRead = $XR->read()) && ($XR->name !== 'records'));
+ while (($lastRead = $XR->read()) && ($XR->name !== 'record'));
+ while ($lastRead) {
+ $xml = $XR->readOuterXML();
+ if ($xml === '') {
+ $err = '';
+ if ($e = libxml_get_last_error()) { $err = $e->message.' (line: '.$e->line.')'; }
+ $XR->close();
+ echo $file.' : Problem with file'.($err ? ' — '.$err : '').'.';
+ echo "\n";
+ return;
+ }
+ while (($lastRead = $XR->next()) && ($XR->name !== 'record'));
+ }
+ $XR->close();
+ echo $file.' : Good!';
+ echo "\n";
+ return;
+}
+?>
+===DONE===
+--EXPECTF--
+%sXMLReaderGood_bug71805.xml : Good!
+%sXMLReaderBad_bug71805.xml : Good!
+===DONE===
diff --git a/ext/xmlrpc/php_xmlrpc.h b/ext/xmlrpc/php_xmlrpc.h
index 2adfb71346..615af09cdc 100644
--- a/ext/xmlrpc/php_xmlrpc.h
+++ b/ext/xmlrpc/php_xmlrpc.h
@@ -37,7 +37,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xmlrpc/tests/bug70526.phpt b/ext/xmlrpc/tests/bug70526.phpt
new file mode 100644
index 0000000000..6ed3e1b997
--- /dev/null
+++ b/ext/xmlrpc/tests/bug70526.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #70526 (xmlrpc_set_type returns false on success)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+?>
+--FILE--
+<?php
+$params = date("Ymd\TH:i:s", time());
+$rv = xmlrpc_set_type($params, 'datetime');
+var_dump($rv);
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/xmlrpc/tests/bug70728.phpt b/ext/xmlrpc/tests/bug70728.phpt
new file mode 100644
index 0000000000..72f72f85b0
--- /dev/null
+++ b/ext/xmlrpc/tests/bug70728.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+$obj = new stdClass;
+$obj->xmlrpc_type = 'base64';
+$obj->scalar = 0x1122334455;
+var_dump(xmlrpc_encode($obj));
+var_dump($obj);
+?>
+--EXPECTF--
+string(135) "<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <base64>NzM1ODgyMjkyMDU=&#10;</base64>
+ </value>
+</param>
+</params>
+"
+object(stdClass)#1 (2) {
+ ["xmlrpc_type"]=>
+ string(6) "base64"
+ ["scalar"]=>
+ float(73588229205)
+}
diff --git a/ext/xmlrpc/tests/bug70728_64bit.phpt b/ext/xmlrpc/tests/bug70728_64bit.phpt
new file mode 100644
index 0000000000..3ed5093918
--- /dev/null
+++ b/ext/xmlrpc/tests/bug70728_64bit.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+$obj = new stdClass;
+$obj->xmlrpc_type = 'base64';
+$obj->scalar = 0x1122334455;
+var_dump(xmlrpc_encode($obj));
+var_dump($obj);
+?>
+--EXPECTF--
+string(135) "<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <base64>NzM1ODgyMjkyMDU=&#10;</base64>
+ </value>
+</param>
+</params>
+"
+object(stdClass)#1 (2) {
+ ["xmlrpc_type"]=>
+ string(6) "base64"
+ ["scalar"]=>
+ int(73588229205)
+}
diff --git a/ext/xmlrpc/tests/bug71501.phpt b/ext/xmlrpc/tests/bug71501.phpt
new file mode 100644
index 0000000000..950d21d6d4
--- /dev/null
+++ b/ext/xmlrpc/tests/bug71501.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #71501 (xmlrpc_encode_request ignores encoding option)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+?>
+--FILE--
+<?php
+$params = 'Lê Trung Hiếu';
+echo xmlrpc_encode_request('foo', $params, ['encoding' => 'UTF-8', 'escaping' => 'markup']);
+?>
+--EXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<methodCall>
+<methodName>foo</methodName>
+<params>
+ <param>
+ <value>
+ <string>Lê Trung Hiếu</string>
+ </value>
+ </param>
+</params>
+</methodCall>
diff --git a/ext/xmlrpc/tests/bug72155.phpt b/ext/xmlrpc/tests/bug72155.phpt
new file mode 100644
index 0000000000..5a71423dce
--- /dev/null
+++ b/ext/xmlrpc/tests/bug72155.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #72155 (use-after-free caused by get_zval_xmlrpc_type)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+?>
+--FILE--
+<?php
+if (false !== strpos(PHP_OS, "WIN")) {
+ $fl = "c:\\windows\\explorer.exe";
+} else {
+ $fl = "/etc/passwd";
+}
+$var0 = fopen($fl,"r");
+$var1 = xmlrpc_encode($var0);
+var_dump($var1);
+?>
+--EXPECTF--
+string(109) "<?xml version="1.0" encoding="utf-8"?>
+<params>
+<param>
+ <value>
+ <int>5</int>
+ </value>
+</param>
+</params>
+"
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index 5ea2894300..daec4c1155 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -37,7 +37,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -412,45 +412,46 @@ static void set_output_options(php_output_options* options, zval* output_opts)
}
}
- /* encoding code set */
- if ((val = zend_hash_str_find(Z_ARRVAL_P(output_opts), ENCODING_KEY, ENCODING_KEY_LEN)) != NULL) {
- if (Z_TYPE_P(val) == IS_STRING) {
- options->xmlrpc_out.xml_elem_opts.encoding = estrdup(Z_STRVAL_P(val));
- }
+ }
+
+ /* encoding code set */
+ if ((val = zend_hash_str_find(Z_ARRVAL_P(output_opts), ENCODING_KEY, ENCODING_KEY_LEN)) != NULL) {
+ if (Z_TYPE_P(val) == IS_STRING) {
+ options->xmlrpc_out.xml_elem_opts.encoding = estrdup(Z_STRVAL_P(val));
}
+ }
- /* escaping options */
- if ((val = zend_hash_str_find(Z_ARRVAL_P(output_opts), ESCAPING_KEY, ESCAPING_KEY_LEN)) != NULL) {
- /* multiple values allowed. check if array */
- if (Z_TYPE_P(val) == IS_ARRAY) {
- zval* iter_val;
-
- options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_no_escaping;
-
- ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(val), iter_val) {
- if (Z_TYPE_P(iter_val) == IS_STRING && Z_STRVAL_P(iter_val)) {
- if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_CDATA)) {
- options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_cdata_escaping;
- } else if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_NON_ASCII)) {
- options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_non_ascii_escaping;
- } else if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_NON_PRINT)) {
- options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_non_print_escaping;
- } else if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_MARKUP)) {
- options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_markup_escaping;
- }
+ /* escaping options */
+ if ((val = zend_hash_str_find(Z_ARRVAL_P(output_opts), ESCAPING_KEY, ESCAPING_KEY_LEN)) != NULL) {
+ /* multiple values allowed. check if array */
+ if (Z_TYPE_P(val) == IS_ARRAY) {
+ zval* iter_val;
+
+ options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_no_escaping;
+
+ ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(val), iter_val) {
+ if (Z_TYPE_P(iter_val) == IS_STRING && Z_STRVAL_P(iter_val)) {
+ if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_CDATA)) {
+ options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_cdata_escaping;
+ } else if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_NON_ASCII)) {
+ options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_non_ascii_escaping;
+ } else if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_NON_PRINT)) {
+ options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_non_print_escaping;
+ } else if (!strcmp(Z_STRVAL_P(iter_val), ESCAPING_VALUE_MARKUP)) {
+ options->xmlrpc_out.xml_elem_opts.escaping |= xml_elem_markup_escaping;
}
- } ZEND_HASH_FOREACH_END();
- /* else, check for single value */
- } else if (Z_TYPE_P(val) == IS_STRING) {
- if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_CDATA)) {
- options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_cdata_escaping;
- } else if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_NON_ASCII)) {
- options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_non_ascii_escaping;
- } else if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_NON_PRINT)) {
- options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_non_print_escaping;
- } else if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_MARKUP)) {
- options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_markup_escaping;
}
+ } ZEND_HASH_FOREACH_END();
+ /* else, check for single value */
+ } else if (Z_TYPE_P(val) == IS_STRING) {
+ if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_CDATA)) {
+ options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_cdata_escaping;
+ } else if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_NON_ASCII)) {
+ options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_non_ascii_escaping;
+ } else if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_NON_PRINT)) {
+ options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_non_print_escaping;
+ } else if (!strcmp(Z_STRVAL_P(val), ESCAPING_VALUE_MARKUP)) {
+ options->xmlrpc_out.xml_elem_opts.escaping = xml_elem_markup_escaping;
}
}
}
@@ -515,7 +516,15 @@ static XMLRPC_VALUE PHP_to_XMLRPC_worker (const char* key, zval* in_val, int dep
xReturn = XMLRPC_CreateValueEmpty();
XMLRPC_SetValueID(xReturn, key, 0);
} else {
- xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(val), Z_STRLEN(val));
+ if (Z_TYPE(val) != IS_STRING) {
+ zval newvalue;
+ ZVAL_DUP(&newvalue, &val);
+ convert_to_string(&newvalue);
+ xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(newvalue), Z_STRLEN(newvalue));
+ zval_dtor(&newvalue);
+ } else {
+ xReturn = XMLRPC_CreateValueBase64(key, Z_STRVAL(val), Z_STRLEN(val));
+ }
}
break;
case xmlrpc_datetime:
@@ -527,7 +536,7 @@ static XMLRPC_VALUE PHP_to_XMLRPC_worker (const char* key, zval* in_val, int dep
xReturn = XMLRPC_CreateValueBoolean(key, Z_TYPE(val) == IS_TRUE);
break;
case xmlrpc_int:
- convert_to_long(&val);
+ ZVAL_LONG(&val, zval_get_long(&val));
xReturn = XMLRPC_CreateValueInt(key, Z_LVAL(val));
break;
case xmlrpc_double:
@@ -1284,7 +1293,7 @@ int set_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE newtype) /* {{{ */
convert_to_object(value);
if (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type)) {
- bSuccess = zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_VALUE_TS_ATTR, sizeof(OBJECT_VALUE_TS_ATTR) - 1, &ztimestamp) != NULL;
+ bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_VALUE_TS_ATTR, sizeof(OBJECT_VALUE_TS_ATTR) - 1, &ztimestamp) != NULL)? SUCCESS : FAILURE;
}
} else {
zval_ptr_dtor(&type);
@@ -1295,7 +1304,7 @@ int set_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE newtype) /* {{{ */
}
} else {
convert_to_object(value);
- bSuccess = zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type) != NULL;
+ bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type) != NULL)? SUCCESS : FAILURE;
}
}
}
@@ -1358,7 +1367,7 @@ XMLRPC_VALUE_TYPE get_zval_xmlrpc_type(zval* value, zval* newvalue) /* {{{ */
if (newvalue) {
zval* val;
- if ((type == xmlrpc_base64 && Z_TYPE_P(value) != IS_NULL) || type == xmlrpc_datetime) {
+ if ((type == xmlrpc_base64 && Z_TYPE_P(value) == IS_OBJECT) || type == xmlrpc_datetime) {
if ((val = zend_hash_str_find(Z_OBJPROP_P(value), OBJECT_VALUE_ATTR, sizeof(OBJECT_VALUE_ATTR) - 1)) != NULL) {
ZVAL_COPY_VALUE(newvalue, val);
}
diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c
index a7da0e7902..be7e82555a 100644
--- a/ext/xmlwriter/php_xmlwriter.c
+++ b/ext/xmlwriter/php_xmlwriter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1622,7 +1622,7 @@ static PHP_FUNCTION(xmlwriter_end_dtd_entity)
}
/* }}} */
-/* {{{ proto bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])
+/* {{{ proto bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, bool pe [, string pubid [, string sysid [, string ndataid]]]])
Write full DTD Entity tag - returns FALSE on error */
static PHP_FUNCTION(xmlwriter_write_dtd_entity)
{
diff --git a/ext/xmlwriter/php_xmlwriter.h b/ext/xmlwriter/php_xmlwriter.h
index ff4a6b8617..988fb5c5c7 100644
--- a/ext/xmlwriter/php_xmlwriter.h
+++ b/ext/xmlwriter/php_xmlwriter.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index 60338bb997..04435c6e68 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h
index 4250ae83d6..985b743734 100644
--- a/ext/xsl/php_xsl.h
+++ b/ext/xsl/php_xsl.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -115,16 +115,6 @@ ZEND_BEGIN_MODULE_GLOBALS(xsl)
ZEND_END_MODULE_GLOBALS(xsl)
*/
-/* In every utility function you add that needs to use variables
- in php_xsl_globals, call TSRM_FETCH(); after declaring other
- variables used by that function, or better yet, pass in
- after the last function argument and declare your utility function
- with after the last declared argument. Always refer to
- the globals in your function as XSL_G(variable). You are
- encouraged to rename these macros something shorter, see
- examples in any other php module directory.
-*/
-
#ifdef ZTS
#define XSL_G(v) TSRMG(xsl_globals_id, zend_xsl_globals *, v)
#else
diff --git a/ext/xsl/tests/bug70535.phpt b/ext/xsl/tests/bug70535.phpt
new file mode 100644
index 0000000000..f775e87a00
--- /dev/null
+++ b/ext/xsl/tests/bug70535.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #70535 (XSLT: free(): invalid pointer)
+--SKIPIF--
+<?php
+if (!extension_loaded('xsl')) die("skip Extension XSL is required");
+if (!extension_loaded("simplexml")) die("skip simplexml extension is not loaded");
+?>
+--FILE--
+<?php
+
+$xmlInput = simplexml_load_string('<root></root>');
+$xslInput = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="root"><xsl:text>success</xsl:text></xsl:template></xsl:stylesheet>';
+
+$xsl = new \DomDocument();
+$xsl->loadXML($xslInput);
+$xslt = new \XsltProcessor();
+$xslt->importStylesheet($xsl);
+$xmloutput = $xslt->transformToXml($xmlInput);
+?>
+okey
+--EXPECT--
+okey
diff --git a/ext/xsl/tests/bug71540.phpt b/ext/xsl/tests/bug71540.phpt
new file mode 100644
index 0000000000..ba034824fe
--- /dev/null
+++ b/ext/xsl/tests/bug71540.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Bug #71540 (NULL pointer dereference in xsl_ext_function_php())
+--SKIPIF--
+<?php
+if (!extension_loaded('xsl')) die("skip Extension XSL is required\n");
+if (LIBXML_VERSION >= 20903) die('skip this test is for PHP linked with libxml2 < 2.9.3 only')
+?>
+--FILE--
+<?php
+$xml = <<<EOB
+<allusers>
+ <user>
+ <uid>bob</uid>
+ </user>
+</allusers>
+EOB;
+$xsl = <<<EOB
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:php="http://php.net/xsl">
+<xsl:output method="html" encoding="utf-8" indent="yes"/>
+ <xsl:template match="allusers">
+ <html><body>
+ <h2>Users</h2>
+ <table>
+ <xsl:for-each select="user">
+ <tr><td>
+ <xsl:value-of
+ select="php:function('test',uid,test(test))"/>
+ </td></tr>
+ </xsl:for-each>
+ </table>
+ </body></html>
+ </xsl:template>
+</xsl:stylesheet>
+EOB;
+
+$xmldoc = new DOMDocument();
+$xmldoc->loadXML($xml);
+$xsldoc = new DOMDocument();
+$xsldoc->loadXML($xsl);
+
+$proc = new XSLTProcessor();
+$proc->registerPHPFunctions();
+$proc->importStyleSheet($xsldoc);
+echo $proc->transformToXML($xmldoc);
+?>
+DONE
+--EXPECTF--
+Warning: XSLTProcessor::transformToXml(): xmlXPathCompOpEval: function test not found in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): Unregistered function in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): Stack usage errror in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): Stack usage errror in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: 2 objects left on the stack. in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): runtime error: file %s line 13 element value-of in %sbug71540.php on line %d
+
+Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %sbug71540.php on line %d
+<html xmlns:php="http://php.net/xsl"><body>
+<h2>Users</h2>
+<table><tr><td></td></tr></table>
+</body></html>
+DONE
diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h
index e7ae296e82..7d08a7faef 100644
--- a/ext/xsl/xsl_fe.h
+++ b/ext/xsl/xsl_fe.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index f5a8fa8e33..5339812253 100644
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -153,7 +153,6 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params)
return NULL;
} else {
if (Z_TYPE_P(value) != IS_STRING) {
- SEPARATE_ZVAL(value);
convert_to_string(value);
}
@@ -218,7 +217,9 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
if (error == 1) {
for (i = nargs - 1; i >= 0; i--) {
obj = valuePop(ctxt);
- xmlXPathFreeObject(obj);
+ if (obj) {
+ xmlXPathFreeObject(obj);
+ }
}
return;
}
@@ -230,6 +231,10 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
/* Reverse order to pop values off ctxt stack */
for (i = nargs - 2; i >= 0; i--) {
obj = valuePop(ctxt);
+ if (obj == NULL) {
+ ZVAL_NULL(&args[i]);
+ continue;
+ }
switch (obj->type) {
case XPATH_STRING:
ZVAL_STRING(&args[i], (char *)obj->stringval);
@@ -266,7 +271,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
if (node->children) {
node = xmlNewDocNode(node->doc, NULL, (char *) node->children, node->name);
} else {
- node = xmlNewDocNode(node->doc, NULL, "xmlns", node->name);
+ node = xmlNewDocNode(node->doc, NULL, (const xmlChar *) "xmlns", node->name);
}
node->type = XML_NAMESPACE_DECL;
node->parent = nsparent;
@@ -282,7 +287,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
}
break;
default:
- str = xmlXPathCastToString(obj);
+ str = (char *) xmlXPathCastToString(obj);
ZVAL_STRING(&args[i], str);
xmlFree(str);
}
@@ -290,7 +295,6 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
}
fci.size = sizeof(fci);
- fci.function_table = EG(function_table);
if (fci.param_count > 0) {
fci.params = args;
} else {
@@ -299,10 +303,10 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
obj = valuePop(ctxt);
- if (obj->stringval == NULL) {
+ if (obj == NULL || obj->stringval == NULL) {
php_error_docref(NULL, E_WARNING, "Handler name must be a string");
xmlXPathFreeObject(obj);
- valuePush(ctxt, xmlXPathNewString(""));
+ valuePush(ctxt, xmlXPathNewString((const xmlChar *) ""));
if (fci.param_count > 0) {
for (i = 0; i < nargs - 1; i++) {
zval_ptr_dtor(&args[i]);
@@ -311,28 +315,27 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
}
return;
}
- ZVAL_STRING(&handler, obj->stringval);
+ ZVAL_STRING(&handler, (char *) obj->stringval);
xmlXPathFreeObject(obj);
ZVAL_COPY_VALUE(&fci.function_name, &handler);
- fci.symbol_table = NULL;
fci.object = NULL;
fci.retval = &retval;
fci.no_separation = 0;
/*fci.function_handler_cache = &function_ptr;*/
if (!zend_make_callable(&handler, &callable)) {
php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", ZSTR_VAL(callable));
- valuePush(ctxt, xmlXPathNewString(""));
+ valuePush(ctxt, xmlXPathNewString((const xmlChar *) ""));
} else if ( intern->registerPhpFunctions == 2 && zend_hash_exists(intern->registered_phpfunctions, callable) == 0) {
php_error_docref(NULL, E_WARNING, "Not allowed to call handler '%s()'", ZSTR_VAL(callable));
/* Push an empty string, so that we at least have an xslt result... */
- valuePush(ctxt, xmlXPathNewString(""));
+ valuePush(ctxt, xmlXPathNewString((const xmlChar *) ""));
} else {
result = zend_call_function(&fci, NULL);
if (result == FAILURE) {
if (Z_TYPE(handler) == IS_STRING) {
php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", Z_STRVAL(handler));
- valuePush(ctxt, xmlXPathNewString(""));
+ valuePush(ctxt, xmlXPathNewString((const xmlChar *) ""));
}
/* retval is == NULL, when an exception occurred, don't report anything, because PHP itself will handle that */
} else if (Z_ISUNDEF(retval)) {
@@ -350,13 +353,13 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
nodep = dom_object_get_node(obj);
valuePush(ctxt, xmlXPathNewNodeSet(nodep));
} else if (Z_TYPE(retval) == IS_TRUE || Z_TYPE(retval) == IS_FALSE) {
- valuePush(ctxt, xmlXPathNewBoolean(Z_LVAL(retval)));
+ valuePush(ctxt, xmlXPathNewBoolean(Z_TYPE(retval) == IS_TRUE));
} else if (Z_TYPE(retval) == IS_OBJECT) {
php_error_docref(NULL, E_WARNING, "A PHP Object cannot be converted to a XPath-string");
- valuePush(ctxt, xmlXPathNewString(""));
+ valuePush(ctxt, xmlXPathNewString((const xmlChar *) ""));
} else {
convert_to_string_ex(&retval);
- valuePush(ctxt, xmlXPathNewString(Z_STRVAL(retval)));
+ valuePush(ctxt, xmlXPathNewString((xmlChar *) Z_STRVAL(retval)));
}
zval_ptr_dtor(&retval);
}
@@ -445,7 +448,7 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
nodep = xmlDocGetRootElement(sheetp->doc);
if (nodep && (nodep = nodep->children)) {
while (nodep) {
- if (nodep->type == XML_ELEMENT_NODE && xmlStrEqual(nodep->name, "key") && xmlStrEqual(nodep->ns->href, XSLT_NAMESPACE)) {
+ if (nodep->type == XML_ELEMENT_NODE && xmlStrEqual(nodep->name, (const xmlChar *) "key") && xmlStrEqual(nodep->ns->href, XSLT_NAMESPACE)) {
intern->hasKeys = 1;
break;
}
@@ -728,7 +731,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml)
if (newdocp) {
ret = xsltSaveResultToString(&doc_txt_ptr, &doc_txt_len, newdocp, sheetp);
if (doc_txt_ptr && doc_txt_len) {
- RETVAL_STRINGL(doc_txt_ptr, doc_txt_len);
+ RETVAL_STRINGL((char *) doc_txt_ptr, doc_txt_len);
xmlFree(doc_txt_ptr);
}
xmlFreeDoc(newdocp);
@@ -748,7 +751,6 @@ PHP_FUNCTION(xsl_xsltprocessor_set_parameter)
zval *id;
zval *array_value, *entry, new_string;
xsl_object *intern;
- zend_ulong idx;
char *namespace;
size_t namespace_len;
zend_string *string_key, *name, *value;
@@ -756,12 +758,11 @@ PHP_FUNCTION(xsl_xsltprocessor_set_parameter)
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "sa", &namespace, &namespace_len, &array_value) == SUCCESS) {
intern = Z_XSL_P(id);
- ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array_value), idx, string_key, entry) {
+ ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(array_value), string_key, entry) {
if (string_key == NULL) {
php_error_docref(NULL, E_WARNING, "Invalid parameter array");
RETURN_FALSE;
}
- SEPARATE_ZVAL(entry);
convert_to_string_ex(entry);
if (Z_REFCOUNTED_P(entry)) {
Z_ADDREF_P(entry);
@@ -849,7 +850,6 @@ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions)
intern = Z_XSL_P(id);
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(array_value), entry) {
- SEPARATE_ZVAL(entry);
convert_to_string_ex(entry);
ZVAL_LONG(&new_string ,1);
zend_hash_update(intern->registered_phpfunctions, Z_STR_P(entry), &new_string);
diff --git a/ext/zip/config.m4 b/ext/zip/config.m4
index 6dbc1e292b..81f47df556 100644
--- a/ext/zip/config.m4
+++ b/ext/zip/config.m4
@@ -122,6 +122,7 @@ if test "$PHP_ZIP" != "no"; then
lib/zip_get_archive_comment.c lib/zip_get_archive_flag.c lib/zip_get_compression_implementation.c\
lib/zip_get_encryption_implementation.c lib/zip_get_file_comment.c lib/zip_get_name.c lib/zip_get_num_entries.c \
lib/zip_get_num_files.c lib/zip_memdup.c lib/zip_name_locate.c lib/zip_new.c lib/zip_open.c lib/zip_rename.c lib/zip_replace.c\
+ lib/zip_hash.c \
lib/zip_set_archive_comment.c lib/zip_set_archive_flag.c lib/zip_set_default_password.c lib/zip_set_file_comment.c\
lib/zip_set_file_compression.c lib/zip_set_name.c lib/zip_source_buffer.c lib/zip_source_close.c lib/zip_source_crc.c\
lib/zip_source_deflate.c lib/zip_source_error.c lib/zip_source_file.c lib/zip_source_filep.c lib/zip_source_free.c\
diff --git a/ext/zip/config.w32 b/ext/zip/config.w32
index a9a8088fb5..5460b6d6bd 100644
--- a/ext/zip/config.w32
+++ b/ext/zip/config.w32
@@ -21,9 +21,10 @@ if (PHP_ZIP != "no") {
zip_get_archive_comment.c zip_get_archive_flag.c zip_get_compression_implementation.c\
zip_get_encryption_implementation.c zip_get_file_comment.c zip_get_name.c zip_get_num_entries.c \
zip_get_num_files.c zip_memdup.c zip_name_locate.c zip_new.c zip_open.c zip_rename.c zip_replace.c\
+ zip_hash.c \
zip_set_archive_comment.c zip_set_archive_flag.c zip_set_default_password.c zip_set_file_comment.c\
zip_set_file_compression.c zip_set_name.c zip_source_buffer.c zip_source_close.c zip_source_crc.c\
- zip_source_deflate.c zip_source_error.c zip_source_file.c zip_source_filep.c zip_source_free.c\
+ zip_source_deflate.c zip_source_error.c zip_source_filep.c zip_source_free.c\
zip_source_function.c zip_source_layered.c zip_source_open.c zip_source_pkware.c \
zip_source_read.c zip_source_stat.c zip_source_window.c zip_source_zip.c zip_source_zip_new.c\
zip_stat.c zip_stat_index.c zip_stat_init.c zip_strerror.c zip_string.c zip_unchange.c zip_unchange_all.c\
@@ -31,7 +32,8 @@ if (PHP_ZIP != "no") {
zip_file_set_external_attributes.c zip_file_get_external_attributes.c zip_source_write.c \
zip_source_call.c zip_source_supports.c zip_buffer.c zip_source_seek.c zip_source_tell.c \
zip_io_util.c zip_source_remove.c zip_source_rollback_write.c zip_source_commit_write.c \
- zip_source_tell_write.c zip_source_begin_write.c zip_source_seek_write.c", "zip");
+ zip_source_tell_write.c zip_source_begin_write.c zip_source_seek_write.c \
+ zip_source_win32a.c zip_source_win32utf8.c zip_source_win32handle.c zip_source_win32w.c", "zip");
AC_DEFINE('HAVE_ZIP', 1);
ADD_FLAG("CFLAGS_ZIP", "/D _WIN32");
diff --git a/ext/zip/lib/config.h b/ext/zip/lib/config.h
index ee77c66d43..6627ff2a51 100644
--- a/ext/zip/lib/config.h
+++ b/ext/zip/lib/config.h
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/zip/lib/zip_add_entry.c b/ext/zip/lib/zip_add_entry.c
index 24dbdaf47c..9a9465c5f0 100644
--- a/ext/zip/lib/zip_add_entry.c
+++ b/ext/zip/lib/zip_add_entry.c
@@ -1,6 +1,6 @@
/*
zip_add_entry.c -- create and init struct zip_entry
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -46,8 +46,19 @@ _zip_add_entry(zip_t *za)
if (za->nentry+1 >= za->nentry_alloc) {
zip_entry_t *rentries;
- zip_uint64_t nalloc = za->nentry_alloc + 16;
- zip_uint64_t realloc_size = sizeof(struct zip_entry) * (size_t)nalloc;
+ zip_uint64_t nalloc = za->nentry_alloc;
+ zip_uint64_t additional_entries = 2 * nalloc;
+ zip_uint64_t realloc_size;
+
+ if (additional_entries < 16) {
+ additional_entries = 16;
+ }
+ else if (additional_entries > 1024) {
+ additional_entries = 1024;
+ }
+ /* neither + nor * overflows can happen: nentry_alloc * sizeof(struct zip_entry) < UINT64_MAX */
+ nalloc += additional_entries;
+ realloc_size = sizeof(struct zip_entry) * (size_t)nalloc;
if (sizeof(struct zip_entry) * (size_t)za->nentry_alloc > realloc_size) {
zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
diff --git a/ext/zip/lib/zip_buffer.c b/ext/zip/lib/zip_buffer.c
index 3d79b09f13..43864f9ba9 100644
--- a/ext/zip/lib/zip_buffer.c
+++ b/ext/zip/lib/zip_buffer.c
@@ -303,6 +303,17 @@ _zip_buffer_set_offset(zip_buffer_t *buffer, zip_uint64_t offset)
}
+int
+_zip_buffer_skip(zip_buffer_t *buffer, zip_uint64_t length) {
+ zip_uint64_t offset = buffer->offset + length;
+
+ if (offset < buffer->offset) {
+ buffer->ok = false;
+ return -1;
+ }
+ return _zip_buffer_set_offset(buffer, offset);
+}
+
zip_uint64_t
_zip_buffer_size(zip_buffer_t *buffer)
{
diff --git a/ext/zip/lib/zip_close.c b/ext/zip/lib/zip_close.c
index a13e4466b3..b5eca67a46 100644
--- a/ext/zip/lib/zip_close.c
+++ b/ext/zip/lib/zip_close.c
@@ -40,7 +40,6 @@
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
-#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/ext/zip/lib/zip_delete.c b/ext/zip/lib/zip_delete.c
index b3e7abb848..34520b0310 100644
--- a/ext/zip/lib/zip_delete.c
+++ b/ext/zip/lib/zip_delete.c
@@ -1,6 +1,6 @@
/*
zip_delete.c -- delete file from zip archive
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -38,6 +38,8 @@
ZIP_EXTERN int
zip_delete(zip_t *za, zip_uint64_t idx)
{
+ const char *name;
+
if (idx >= za->nentry) {
zip_error_set(&za->error, ZIP_ER_INVAL, 0);
return -1;
@@ -48,6 +50,14 @@ zip_delete(zip_t *za, zip_uint64_t idx)
return -1;
}
+ if ((name=_zip_get_name(za, idx, 0, &za->error)) == NULL) {
+ return -1;
+ }
+
+ if (!_zip_hash_delete(za->names, (const zip_uint8_t *)name, &za->error)) {
+ return -1;
+ }
+
/* allow duplicate file names, because the file will
* be removed directly afterwards */
if (_zip_unchange(za, idx, 1) != 0)
diff --git a/ext/zip/lib/zip_dirent.c b/ext/zip/lib/zip_dirent.c
index e3a78b3146..630b6a49cb 100644
--- a/ext/zip/lib/zip_dirent.c
+++ b/ext/zip/lib/zip_dirent.c
@@ -1,6 +1,6 @@
/*
zip_dirent.c -- read directory entry (local or central), clean dirent
- Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -17,7 +17,7 @@
3. The names of the authors may not be used to endorse or promote
products derived from this software without specific prior
written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -35,7 +35,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -67,7 +66,7 @@ _zip_cdir_new(zip_uint64_t nentry, zip_error_t *error)
{
zip_cdir_t *cd;
zip_uint64_t i;
-
+
if ((cd=(zip_cdir_t *)malloc(sizeof(*cd))) == NULL) {
zip_error_set(error, ZIP_ER_MEMORY, 0);
return NULL;
@@ -110,7 +109,7 @@ _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivor
}
offset = (zip_uint64_t)off;
- is_zip64 = 0;
+ is_zip64 = false;
for (i=0; i<survivors; i++) {
zip_entry_t *entry = za->entry+filelist[i].idx;
@@ -135,7 +134,7 @@ _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivor
zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
return -1;
}
-
+
if (is_zip64) {
_zip_buffer_put(buffer, EOCD64_MAGIC, 4);
_zip_buffer_put_64(buffer, EOCD64LEN-12);
@@ -152,7 +151,7 @@ _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivor
_zip_buffer_put_64(buffer, offset+size);
_zip_buffer_put_32(buffer, 1);
}
-
+
_zip_buffer_put(buffer, EOCD_MAGIC, 4);
_zip_buffer_put_32(buffer, 0);
_zip_buffer_put_16(buffer, (zip_uint16_t)(survivors >= ZIP_UINT16_MAX ? ZIP_UINT16_MAX : survivors));
@@ -163,7 +162,7 @@ _zip_cdir_write(zip_t *za, const zip_filelist_t *filelist, zip_uint64_t survivor
comment = za->comment_changed ? za->comment_changes : za->comment_orig;
_zip_buffer_put_16(buffer, (zip_uint16_t)(comment ? comment->length : 0));
-
+
if (!_zip_buffer_ok(buffer)) {
zip_error_set(&za->error, ZIP_ER_INTERNAL, 0);
_zip_buffer_free(buffer);
@@ -199,7 +198,7 @@ _zip_dirent_clone(const zip_dirent_t *sde)
memcpy(tde, sde, sizeof(*sde));
else
_zip_dirent_init(tde);
-
+
tde->changed = 0;
tde->cloned = 1;
@@ -289,7 +288,7 @@ _zip_dirent_new(void)
Fills the zip directory entry zde.
If buffer is non-NULL, data is taken from there; otherwise data is read from fp as needed.
-
+
If local is true, it reads a local header instead of a central directory entry.
Returns size of dirent read if successful. On error, error is filled in and -1 is returned.
@@ -304,7 +303,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
zip_uint16_t filename_len, comment_len, ef_len;
bool from_buffer = (buffer != NULL);
-
+
size = local ? LENTRYSIZE : CDENTRYSIZE;
if (buffer) {
@@ -337,19 +336,19 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
zde->version_needed = _zip_buffer_get_16(buffer);
zde->bitflags = _zip_buffer_get_16(buffer);
zde->comp_method = _zip_buffer_get_16(buffer);
-
+
/* convert to time_t */
dostime = _zip_buffer_get_16(buffer);
dosdate = _zip_buffer_get_16(buffer);
zde->last_mod = _zip_d2u_time(dostime, dosdate);
-
+
zde->crc = _zip_buffer_get_32(buffer);
zde->comp_size = _zip_buffer_get_32(buffer);
zde->uncomp_size = _zip_buffer_get_32(buffer);
-
+
filename_len = _zip_buffer_get_16(buffer);
ef_len = _zip_buffer_get_16(buffer);
-
+
if (local) {
comment_len = 0;
zde->disk_number = 0;
@@ -363,7 +362,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
zde->ext_attrib = _zip_buffer_get_32(buffer);
zde->offset = _zip_buffer_get_32(buffer);
}
-
+
if (!_zip_buffer_ok(buffer)) {
zip_error_set(error, ZIP_ER_INTERNAL, 0);
if (!from_buffer) {
@@ -386,7 +385,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
}
else {
_zip_buffer_free(buffer);
-
+
if ((buffer = _zip_buffer_new_from_source(src, variable_size, NULL, error)) == NULL) {
return -1;
}
@@ -424,7 +423,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
}
return -1;
}
- if ((zde->extra_fields=_zip_ef_parse(ef, ef_len, local ? ZIP_EF_LOCAL : ZIP_EF_CENTRAL, error)) == NULL) {
+ if (!_zip_ef_parse(ef, ef_len, local ? ZIP_EF_LOCAL : ZIP_EF_CENTRAL, &zde->extra_fields, error)) {
free(ef);
if (!from_buffer) {
_zip_buffer_free(buffer);
@@ -471,7 +470,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
}
return -1;
}
-
+
if ((ef_buffer = _zip_buffer_new((zip_uint8_t *)ef, got_len)) == NULL) {
zip_error_set(error, ZIP_ER_MEMORY, 0);
if (!from_buffer) {
@@ -479,11 +478,14 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
}
return -1;
}
-
+
if (zde->uncomp_size == ZIP_UINT32_MAX)
zde->uncomp_size = _zip_buffer_get_64(ef_buffer);
- else if (local)
- ef += 8;
+ else if (local) {
+ /* From appnote.txt: This entry in the Local header MUST
+ include BOTH original and compressed file size fields. */
+ (void)_zip_buffer_skip(ef_buffer, 8); /* error is caught by _zip_buffer_eof() call */
+ }
if (zde->comp_size == ZIP_UINT32_MAX)
zde->comp_size = _zip_buffer_get_64(ef_buffer);
if (!local) {
@@ -492,7 +494,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
if (zde->disk_number == ZIP_UINT16_MAX)
zde->disk_number = _zip_buffer_get_32(buffer);
}
-
+
if (!_zip_buffer_eof(ef_buffer)) {
zip_error_set(error, ZIP_ER_INCONS, 0);
_zip_buffer_free(ef_buffer);
@@ -503,7 +505,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
}
_zip_buffer_free(ef_buffer);
}
-
+
if (!_zip_buffer_ok(buffer)) {
zip_error_set(error, ZIP_ER_INTERNAL, 0);
if (!from_buffer) {
@@ -520,7 +522,7 @@ _zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, boo
zip_error_set(error, ZIP_ER_SEEK, EFBIG);
return -1;
}
-
+
zde->extra_fields = _zip_ef_remove_internal(zde->extra_fields);
return (zip_int64_t)(size + variable_size);
@@ -535,15 +537,15 @@ _zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string
zip_buffer_t *buffer;
const zip_uint8_t *ef = _zip_ef_get_by_id(de->extra_fields, &ef_len, id, 0, ZIP_EF_BOTH, NULL);
-
+
if (ef == NULL || ef_len < 5 || ef[0] != 1) {
return str;
}
-
+
if ((buffer = _zip_buffer_new((zip_uint8_t *)ef, ef_len)) == NULL) {
return str;
}
-
+
_zip_buffer_get_8(buffer);
ef_crc = _zip_buffer_get_32(buffer);
@@ -556,9 +558,9 @@ _zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string
str = ef_str;
}
}
-
+
_zip_buffer_free(buffer);
-
+
return str;
}
@@ -578,7 +580,7 @@ _zip_dirent_size(zip_source_t *src, zip_uint16_t flags, zip_error_t *error)
_zip_error_set_from_source(error, src);
return -1;
}
-
+
if ((buffer = _zip_buffer_new_from_source(src, local ? 4 : 6, b, error)) == NULL) {
return -1;
}
@@ -586,7 +588,7 @@ _zip_dirent_size(zip_source_t *src, zip_uint16_t flags, zip_error_t *error)
for (i=0; i<(local ? 2 : 3); i++) {
size += _zip_buffer_get_16(buffer);
}
-
+
if (!_zip_buffer_eof(buffer)) {
zip_error_set(error, ZIP_ER_INTERNAL, 0);
_zip_buffer_free(buffer);
@@ -614,16 +616,15 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
zip_uint16_t dostime, dosdate;
zip_encoding_type_t com_enc, name_enc;
zip_extra_field_t *ef;
+ zip_extra_field_t *ef64;
+ zip_uint32_t ef_total_size;
bool is_zip64;
bool is_really_zip64;
zip_uint8_t buf[CDENTRYSIZE];
zip_buffer_t *buffer;
- zip_uint32_t ef_total_size;
ef = NULL;
- is_zip64 = false;
-
name_enc = _zip_guess_encoding(de->filename, ZIP_ENCODING_UNKNOWN);
com_enc = _zip_guess_encoding(de->comment, ZIP_ENCODING_UNKNOWN);
@@ -648,20 +649,19 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
ef = ef2;
}
}
-
+
is_really_zip64 = _zip_dirent_needs_zip64(de, flags);
is_zip64 = (flags & (ZIP_FL_LOCAL|ZIP_FL_FORCE_ZIP64)) == (ZIP_FL_LOCAL|ZIP_FL_FORCE_ZIP64) || is_really_zip64;
-
+
if (is_zip64) {
zip_uint8_t ef_zip64[EFZIP64SIZE];
zip_buffer_t *ef_buffer = _zip_buffer_new(ef_zip64, sizeof(ef_zip64));
- zip_extra_field_t *ef64;
if (ef_buffer == NULL) {
zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
_zip_ef_free(ef);
return -1;
}
-
+
if (flags & ZIP_FL_LOCAL) {
if ((flags & ZIP_FL_FORCE_ZIP64) || de->comp_size > ZIP_UINT32_MAX || de->uncomp_size > ZIP_UINT32_MAX) {
_zip_buffer_put_64(ef_buffer, de->uncomp_size);
@@ -681,7 +681,7 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
}
}
}
-
+
if (!_zip_buffer_ok(ef_buffer)) {
zip_error_set(&za->error, ZIP_ER_INTERNAL, 0);
_zip_buffer_free(ef_buffer);
@@ -700,9 +700,9 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
_zip_ef_free(ef);
return -1;
}
-
+
_zip_buffer_put(buffer, (flags & ZIP_FL_LOCAL) ? LOCAL_MAGIC : CENTRAL_MAGIC, 4);
-
+
if ((flags & ZIP_FL_LOCAL) == 0) {
_zip_buffer_put_16(buffer, (zip_uint16_t)(is_really_zip64 ? 45 : de->version_madeby));
}
@@ -715,7 +715,7 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
_zip_buffer_put_16(buffer, dosdate);
_zip_buffer_put_32(buffer, de->crc);
-
+
if (((flags & ZIP_FL_LOCAL) == ZIP_FL_LOCAL) && ((de->comp_size >= ZIP_UINT32_MAX) || (de->uncomp_size >= ZIP_UINT32_MAX))) {
/* In local headers, if a ZIP64 EF is written, it MUST contain
* both compressed and uncompressed sizes (even if one of the
@@ -744,7 +744,7 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
/* TODO: check for overflow */
ef_total_size = (zip_uint32_t)_zip_ef_size(de->extra_fields, flags) + (zip_uint32_t)_zip_ef_size(ef, ZIP_EF_BOTH);
_zip_buffer_put_16(buffer, (zip_uint16_t)ef_total_size);
-
+
if ((flags & ZIP_FL_LOCAL) == 0) {
_zip_buffer_put_16(buffer, _zip_string_length(de->comment));
_zip_buffer_put_16(buffer, (zip_uint16_t)de->disk_number);
@@ -755,7 +755,7 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
else
_zip_buffer_put_32(buffer, ZIP_UINT32_MAX);
}
-
+
if (!_zip_buffer_ok(buffer)) {
zip_error_set(&za->error, ZIP_ER_INTERNAL, 0);
_zip_buffer_free(buffer);
@@ -768,7 +768,7 @@ _zip_dirent_write(zip_t *za, zip_dirent_t *de, zip_flags_t flags)
_zip_ef_free(ef);
return -1;
}
-
+
_zip_buffer_free(buffer);
if (de->filename) {
@@ -810,10 +810,10 @@ _zip_d2u_time(zip_uint16_t dtime, zip_uint16_t ddate)
struct tm tm;
memset(&tm, 0, sizeof(tm));
-
+
/* let mktime decide if DST is in effect */
tm.tm_isdst = -1;
-
+
tm.tm_year = ((ddate>>9)&127) + 1980 - 1900;
tm.tm_mon = ((ddate>>5)&15) - 1;
tm.tm_mday = ddate&31;
@@ -834,13 +834,16 @@ _zip_ef_utf8(zip_uint16_t id, zip_string_t *str, zip_error_t *error)
zip_buffer_t *buffer;
zip_extra_field_t *ef;
- raw = _zip_string_get(str, &len, ZIP_FL_ENC_RAW, NULL);
+ if ((raw=_zip_string_get(str, &len, ZIP_FL_ENC_RAW, NULL)) == NULL) {
+ /* error already set */
+ return NULL;
+ }
if (len+5 > ZIP_UINT16_MAX) {
zip_error_set(error, ZIP_ER_INVAL, 0); /* TODO: better error code? */
return NULL;
}
-
+
if ((buffer = _zip_buffer_new(NULL, len+5)) == NULL) {
zip_error_set(error, ZIP_ER_MEMORY, 0);
return NULL;
@@ -855,7 +858,7 @@ _zip_ef_utf8(zip_uint16_t id, zip_string_t *str, zip_error_t *error)
_zip_buffer_free(buffer);
return NULL;
}
-
+
ef = _zip_ef_new(id, (zip_uint16_t)(_zip_buffer_offset(buffer)), _zip_buffer_data(buffer), ZIP_EF_BOTH);
_zip_buffer_free(buffer);
@@ -898,6 +901,10 @@ _zip_u2d_time(time_t intime, zip_uint16_t *dtime, zip_uint16_t *ddate)
struct tm *tm;
tm = localtime(&intime);
+ if (tm->tm_year < 80) {
+ tm->tm_year = 80;
+ }
+
*ddate = (zip_uint16_t)(((tm->tm_year+1900-1980)<<9) + ((tm->tm_mon+1)<<5) + tm->tm_mday);
*dtime = (zip_uint16_t)(((tm->tm_hour)<<11) + ((tm->tm_min)<<5) + ((tm->tm_sec)>>1));
diff --git a/ext/zip/lib/zip_discard.c b/ext/zip/lib/zip_discard.c
index db22370842..1876c84f0c 100644
--- a/ext/zip/lib/zip_discard.c
+++ b/ext/zip/lib/zip_discard.c
@@ -1,6 +1,6 @@
/*
zip_discard.c -- discard and free struct zip
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -58,6 +58,8 @@ zip_discard(zip_t *za)
_zip_string_free(za->comment_orig);
_zip_string_free(za->comment_changes);
+ _zip_hash_free(za->names);
+
if (za->entry) {
for (i=0; i<za->nentry; i++)
_zip_entry_finalize(za->entry+i);
diff --git a/ext/zip/lib/zip_error.c b/ext/zip/lib/zip_error.c
index a21a00bc29..43ddf4f9cb 100644
--- a/ext/zip/lib/zip_error.c
+++ b/ext/zip/lib/zip_error.c
@@ -1,6 +1,6 @@
/*
zip_error.c -- zip_error_t helper functions
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -31,7 +31,6 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <errno.h>
#include <stdlib.h>
#include "zipint.h"
diff --git a/ext/zip/lib/zip_error_strerror.c b/ext/zip/lib/zip_error_strerror.c
index 2f124ccd46..29efc8a91c 100644
--- a/ext/zip/lib/zip_error_strerror.c
+++ b/ext/zip/lib/zip_error_strerror.c
@@ -1,6 +1,6 @@
/*
zip_error_sterror.c -- get string representation of struct zip_error
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -32,7 +32,6 @@
*/
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/ext/zip/lib/zip_error_to_str.c b/ext/zip/lib/zip_error_to_str.c
index d4119253f7..22de177842 100644
--- a/ext/zip/lib/zip_error_to_str.c
+++ b/ext/zip/lib/zip_error_to_str.c
@@ -1,6 +1,6 @@
/*
zip_error_to_str.c -- get string representation of zip error code
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -32,7 +32,6 @@
*/
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/ext/zip/lib/zip_extra_field.c b/ext/zip/lib/zip_extra_field.c
index b2566c6887..035047827e 100644
--- a/ext/zip/lib/zip_extra_field.c
+++ b/ext/zip/lib/zip_extra_field.c
@@ -31,13 +31,11 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include "zipint.h"
-
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "zipint.h"
+
zip_extra_field_t *
_zip_ef_clone(const zip_extra_field_t *ef, zip_error_t *error)
@@ -207,20 +205,20 @@ _zip_ef_new(zip_uint16_t id, zip_uint16_t size, const zip_uint8_t *data, zip_fla
}
-zip_extra_field_t *
-_zip_ef_parse(const zip_uint8_t *data, zip_uint16_t len, zip_flags_t flags, zip_error_t *error)
+bool
+_zip_ef_parse(const zip_uint8_t *data, zip_uint16_t len, zip_flags_t flags, zip_extra_field_t **ef_head_p, zip_error_t *error)
{
zip_buffer_t *buffer;
zip_extra_field_t *ef, *ef2, *ef_head;
if ((buffer = _zip_buffer_new((zip_uint8_t *)data, len)) == NULL) {
zip_error_set(error, ZIP_ER_MEMORY, 0);
- return NULL;
+ return false;
}
ef_head = ef = NULL;
- while (_zip_buffer_ok(buffer) && !_zip_buffer_eof(buffer)) {
+ while (_zip_buffer_ok(buffer) && _zip_buffer_left(buffer) >= 4) {
zip_uint16_t fid, flen;
zip_uint8_t *ef_data;
@@ -229,14 +227,17 @@ _zip_ef_parse(const zip_uint8_t *data, zip_uint16_t len, zip_flags_t flags, zip_
ef_data = _zip_buffer_get(buffer, flen);
if (ef_data == NULL) {
- break;
+ zip_error_set(error, ZIP_ER_INCONS, 0);
+ _zip_buffer_free(buffer);
+ _zip_ef_free(ef_head);
+ return false;
}
if ((ef2=_zip_ef_new(fid, flen, ef_data, flags)) == NULL) {
zip_error_set(error, ZIP_ER_MEMORY, 0);
_zip_buffer_free(buffer);
_zip_ef_free(ef_head);
- return NULL;
+ return false;
}
if (ef_head) {
@@ -248,15 +249,29 @@ _zip_ef_parse(const zip_uint8_t *data, zip_uint16_t len, zip_flags_t flags, zip_
}
if (!_zip_buffer_eof(buffer)) {
- zip_error_set(error, ZIP_ER_INCONS, 0);
- _zip_buffer_free(buffer);
- _zip_ef_free(ef_head);
- return NULL;
+ /* Android APK files align stored file data with padding in extra fields; ignore. */
+ /* see https://android.googlesource.com/platform/build/+/master/tools/zipalign/ZipAlign.cpp */
+ size_t glen = _zip_buffer_left(buffer);
+ zip_uint8_t *garbage;
+ garbage = _zip_buffer_get(buffer, glen);
+ if (glen >= 4 || garbage == NULL || memcmp(garbage, "\0\0\0", glen) != 0) {
+ zip_error_set(error, ZIP_ER_INCONS, 0);
+ _zip_buffer_free(buffer);
+ _zip_ef_free(ef_head);
+ return false;
+ }
}
_zip_buffer_free(buffer);
+
+ if (ef_head_p) {
+ *ef_head_p = ef_head;
+ }
+ else {
+ _zip_ef_free(ef_head);
+ }
- return ef_head;
+ return true;
}
@@ -400,14 +415,16 @@ _zip_read_local_ef(zip_t *za, zip_uint64_t idx)
if (ef_raw == NULL)
return -1;
- if ((ef=_zip_ef_parse(ef_raw, ef_len, ZIP_EF_LOCAL, &za->error)) == NULL) {
+ if (!_zip_ef_parse(ef_raw, ef_len, ZIP_EF_LOCAL, &ef, &za->error)) {
free(ef_raw);
return -1;
}
free(ef_raw);
-
- ef = _zip_ef_remove_internal(ef);
- e->orig->extra_fields = _zip_ef_merge(e->orig->extra_fields, ef);
+
+ if (ef) {
+ ef = _zip_ef_remove_internal(ef);
+ e->orig->extra_fields = _zip_ef_merge(e->orig->extra_fields, ef);
+ }
}
e->orig->local_extra_fields_read = 1;
diff --git a/ext/zip/lib/zip_fdopen.c b/ext/zip/lib/zip_fdopen.c
index c5b55311d2..bbcdf4f6bf 100644
--- a/ext/zip/lib/zip_fdopen.c
+++ b/ext/zip/lib/zip_fdopen.c
@@ -33,6 +33,9 @@
#include "zipint.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
ZIP_EXTERN zip_t *
diff --git a/ext/zip/lib/zip_file_get_offset.c b/ext/zip/lib/zip_file_get_offset.c
index 1aaca712d7..0257b042bc 100644
--- a/ext/zip/lib/zip_file_get_offset.c
+++ b/ext/zip/lib/zip_file_get_offset.c
@@ -1,6 +1,6 @@
/*
zip_file_get_offset.c -- get offset of file data in archive.
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -35,7 +35,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/ext/zip/lib/zip_filerange_crc.c b/ext/zip/lib/zip_filerange_crc.c
index 8e06e8fa8b..f2a27fab34 100644
--- a/ext/zip/lib/zip_filerange_crc.c
+++ b/ext/zip/lib/zip_filerange_crc.c
@@ -1,6 +1,6 @@
/*
zip_filerange_crc.c -- compute CRC32 for a range of a file
- Copyright (C) 2008-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 2008-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -33,7 +33,6 @@
#include <stdio.h>
-#include <errno.h>
#include "zipint.h"
diff --git a/ext/zip/lib/zip_fopen_index.c b/ext/zip/lib/zip_fopen_index.c
index e9a169a2e1..7496f9829f 100644
--- a/ext/zip/lib/zip_fopen_index.c
+++ b/ext/zip/lib/zip_fopen_index.c
@@ -1,6 +1,6 @@
/*
zip_fopen_index.c -- open file in zip archive for reading by index
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -32,7 +32,6 @@
*/
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/ext/zip/lib/zip_fopen_index_encrypted.c b/ext/zip/lib/zip_fopen_index_encrypted.c
index 21cc43333c..92258e85fe 100644
--- a/ext/zip/lib/zip_fopen_index_encrypted.c
+++ b/ext/zip/lib/zip_fopen_index_encrypted.c
@@ -1,6 +1,6 @@
/*
zip_fopen_index_encrypted.c -- open file for reading by index w/ password
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -32,7 +32,6 @@
*/
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/ext/zip/lib/zip_hash.c b/ext/zip/lib/zip_hash.c
new file mode 100644
index 0000000000..23f9708dfd
--- /dev/null
+++ b/ext/zip/lib/zip_hash.c
@@ -0,0 +1,267 @@
+/*
+ zip_hash.c -- hash table string -> uint64
+ Copyright (C) 2015-2016 Dieter Baron and Thomas Klausner
+
+ This file is part of libzip, a library to manipulate ZIP archives.
+ The authors can be contacted at <libzip@nih.at>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. The names of the authors may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include "zipint.h"
+
+struct zip_hash_entry {
+ const zip_uint8_t *name;
+ zip_int64_t orig_index;
+ zip_int64_t current_index;
+ struct zip_hash_entry *next;
+};
+typedef struct zip_hash_entry zip_hash_entry_t;
+
+struct zip_hash {
+ zip_uint16_t table_size;
+ zip_hash_entry_t **table;
+};
+
+zip_hash_t *
+_zip_hash_new(zip_uint16_t table_size, zip_error_t *error)
+{
+ zip_hash_t *hash;
+
+ if (table_size == 0) {
+ zip_error_set(error, ZIP_ER_INTERNAL, 0);
+ return NULL;
+ }
+
+ if ((hash=(zip_hash_t *)malloc(sizeof(zip_hash_t))) == NULL) {
+ zip_error_set(error, ZIP_ER_MEMORY, 0);
+ return NULL;
+ }
+ hash->table_size = table_size;
+ if ((hash->table=(zip_hash_entry_t**)calloc(table_size, sizeof(zip_hash_entry_t *))) == NULL) {
+ free(hash);
+ zip_error_set(error, ZIP_ER_MEMORY, 0);
+ return NULL;
+ }
+
+ return hash;
+}
+
+static void
+_free_list(zip_hash_entry_t *entry)
+{
+ zip_hash_entry_t *next;
+ do {
+ next = entry->next;
+ free(entry);
+ entry = next;
+ } while (entry != NULL);
+}
+
+void
+_zip_hash_free(zip_hash_t *hash)
+{
+ zip_uint16_t i;
+
+ if (hash == NULL) {
+ return;
+ }
+
+ for (i=0; i<hash->table_size; i++) {
+ if (hash->table[i] != NULL) {
+ _free_list(hash->table[i]);
+ }
+ }
+ free(hash->table);
+ free(hash);
+}
+
+static zip_uint16_t
+_hash_string(const zip_uint8_t *name, zip_uint16_t size)
+{
+#define HASH_MULTIPLIER 33
+ zip_uint16_t value = 5381;
+
+ if (name == NULL)
+ return 0;
+
+ while (*name != 0) {
+ value = (zip_uint16_t)(((value * HASH_MULTIPLIER) + (zip_uint8_t)*name) % size);
+ name++;
+ }
+
+ return value;
+}
+
+/* insert into hash, return error on existence or memory issues */
+bool
+_zip_hash_add(zip_hash_t *hash, const zip_uint8_t *name, zip_uint64_t index, zip_flags_t flags, zip_error_t *error)
+{
+ zip_uint16_t hash_value;
+ zip_hash_entry_t *entry;
+
+ if (hash == NULL || name == NULL || index > ZIP_INT64_MAX) {
+ zip_error_set(error, ZIP_ER_INVAL, 0);
+ return false;
+ }
+
+ hash_value = _hash_string(name, hash->table_size);
+ for (entry = hash->table[hash_value]; entry != NULL; entry = entry->next) {
+ if (strcmp((const char *)name, (const char *)entry->name) == 0) {
+ if (((flags & ZIP_FL_UNCHANGED) && entry->orig_index != -1) || entry->current_index != -1) {
+ zip_error_set(error, ZIP_ER_EXISTS, 0);
+ return false;
+ }
+ else {
+ break;
+ }
+ }
+ }
+
+ if (entry == NULL) {
+ if ((entry=(zip_hash_entry_t *)malloc(sizeof(zip_hash_entry_t))) == NULL) {
+ zip_error_set(error, ZIP_ER_MEMORY, 0);
+ return false;
+ }
+ entry->name = name;
+ entry->next = hash->table[hash_value];
+ hash->table[hash_value] = entry;
+ entry->orig_index = -1;
+ }
+
+ if (flags & ZIP_FL_UNCHANGED) {
+ entry->orig_index = (zip_int64_t)index;
+ }
+ entry->current_index = (zip_int64_t)index;
+
+ return true;
+}
+
+/* remove entry from hash, error if not found */
+bool
+_zip_hash_delete(zip_hash_t *hash, const zip_uint8_t *name, zip_error_t *error)
+{
+ zip_uint16_t hash_value;
+ zip_hash_entry_t *entry, *previous;
+
+ if (hash == NULL || name == NULL) {
+ zip_error_set(error, ZIP_ER_INVAL, 0);
+ return false;
+ }
+
+ hash_value = _hash_string(name, hash->table_size);
+ previous = NULL;
+ entry = hash->table[hash_value];
+ while (entry) {
+ if (strcmp((const char *)name, (const char *)entry->name) == 0) {
+ if (entry->orig_index == -1) {
+ if (previous) {
+ previous->next = entry->next;
+ }
+ else {
+ hash->table[hash_value] = entry->next;
+ }
+ free(entry);
+ }
+ else {
+ entry->current_index = -1;
+ }
+ return true;
+ }
+ previous = entry;
+ entry = entry->next;
+ };
+
+ zip_error_set(error, ZIP_ER_NOENT, 0);
+ return false;
+}
+
+/* find value for entry in hash, -1 if not found */
+zip_int64_t
+_zip_hash_lookup(zip_hash_t *hash, const zip_uint8_t *name, zip_flags_t flags, zip_error_t *error)
+{
+ zip_uint16_t hash_value;
+ zip_hash_entry_t *entry;
+
+ if (hash == NULL || name == NULL) {
+ zip_error_set(error, ZIP_ER_INVAL, 0);
+ return -1;
+ }
+
+ hash_value = _hash_string(name, hash->table_size);
+ for (entry = hash->table[hash_value]; entry != NULL; entry = entry->next) {
+ if (strcmp((const char *)name, (const char *)entry->name) == 0) {
+ if (flags & ZIP_FL_UNCHANGED) {
+ if (entry->orig_index != -1) {
+ return entry->orig_index;
+ }
+ }
+ else {
+ if (entry->current_index != -1) {
+ return entry->current_index;
+ }
+ }
+ break;
+ }
+ }
+
+ zip_error_set(error, ZIP_ER_NOENT, 0);
+ return -1;
+}
+
+void
+_zip_hash_revert(zip_hash_t *hash)
+{
+ zip_uint16_t i;
+ zip_hash_entry_t *entry, *previous;
+
+ for (i = 0; i < hash->table_size; i++) {
+ previous = NULL;
+ entry = hash->table[i];
+ while (entry) {
+ if (entry->orig_index == -1) {
+ zip_hash_entry_t *p;
+ if (previous) {
+ previous->next = entry->next;
+ }
+ else {
+ hash->table[i] = entry->next;
+ }
+ p = entry;
+ entry = entry->next;
+ /* previous does not change */
+ free(p);
+ }
+ else {
+ entry->current_index = entry->orig_index;
+ previous = entry;
+ entry = entry->next;
+ }
+ }
+ }
+}
diff --git a/ext/zip/lib/zip_io_util.c b/ext/zip/lib/zip_io_util.c
index 4a6bc1ddc1..b16927defb 100644
--- a/ext/zip/lib/zip_io_util.c
+++ b/ext/zip/lib/zip_io_util.c
@@ -1,6 +1,6 @@
/*
zip_io_util.c -- I/O helper functions
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -31,7 +31,6 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
diff --git a/ext/zip/lib/zip_name_locate.c b/ext/zip/lib/zip_name_locate.c
index 820ea0ca7f..50ca40b1a9 100644
--- a/ext/zip/lib/zip_name_locate.c
+++ b/ext/zip/lib/zip_name_locate.c
@@ -1,6 +1,6 @@
/*
zip_name_locate.c -- get index by name
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -62,27 +62,33 @@ _zip_name_locate(zip_t *za, const char *fname, zip_flags_t flags, zip_error_t *e
return -1;
}
- cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp;
-
- for (i=0; i<za->nentry; i++) {
- fn = _zip_get_name(za, i, flags, error);
-
- /* newly added (partially filled) entry or error */
- if (fn == NULL)
- continue;
-
- if (flags & ZIP_FL_NODIR) {
- p = strrchr(fn, '/');
- if (p)
- fn = p+1;
+ if (flags & (ZIP_FL_NOCASE|ZIP_FL_NODIR|ZIP_FL_ENC_CP437)) {
+ /* can't use hash table */
+ cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp;
+
+ for (i=0; i<za->nentry; i++) {
+ fn = _zip_get_name(za, i, flags, error);
+
+ /* newly added (partially filled) entry or error */
+ if (fn == NULL)
+ continue;
+
+ if (flags & ZIP_FL_NODIR) {
+ p = strrchr(fn, '/');
+ if (p)
+ fn = p+1;
+ }
+
+ if (cmp(fname, fn) == 0) {
+ _zip_error_clear(error);
+ return (zip_int64_t)i;
+ }
}
- if (cmp(fname, fn) == 0) {
- _zip_error_clear(error);
- return (zip_int64_t)i;
- }
+ zip_error_set(error, ZIP_ER_NOENT, 0);
+ return -1;
+ }
+ else {
+ return _zip_hash_lookup(za->names, (const zip_uint8_t *)fname, flags, error);
}
-
- zip_error_set(error, ZIP_ER_NOENT, 0);
- return -1;
}
diff --git a/ext/zip/lib/zip_new.c b/ext/zip/lib/zip_new.c
index d54a247c29..562dd76a36 100644
--- a/ext/zip/lib/zip_new.c
+++ b/ext/zip/lib/zip_new.c
@@ -1,6 +1,6 @@
/*
zip_new.c -- create and init struct zip
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -52,6 +52,11 @@ _zip_new(zip_error_t *error)
return NULL;
}
+ if ((za->names = _zip_hash_new(ZIP_HASH_TABLE_SIZE, error)) == NULL) {
+ free(za);
+ return NULL;
+ }
+
za->src = NULL;
za->open_flags = 0;
zip_error_init(&za->error);
diff --git a/ext/zip/lib/zip_open.c b/ext/zip/lib/zip_open.c
index fb9c566cb1..d6209ee1e7 100644
--- a/ext/zip/lib/zip_open.c
+++ b/ext/zip/lib/zip_open.c
@@ -33,7 +33,6 @@
#include <sys/stat.h>
-#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -184,7 +183,7 @@ _zip_open(zip_source_t *src, unsigned int flags, zip_error_t *error)
zip_t *za;
zip_cdir_t *cdir;
struct zip_stat st;
- zip_uint64_t len;
+ zip_uint64_t len, idx;
zip_stat_init(&st);
if (zip_source_stat(src, &st) < 0) {
@@ -223,11 +222,31 @@ _zip_open(zip_source_t *src, unsigned int flags, zip_error_t *error)
za->nentry = cdir->nentry;
za->nentry_alloc = cdir->nentry_alloc;
za->comment_orig = cdir->comment;
-
- za->ch_flags = za->flags;
free(cdir);
+ for (idx = 0; idx < za->nentry; idx++) {
+ const zip_uint8_t *name = _zip_string_get(za->entry[idx].orig->filename, NULL, 0, error);
+ if (name == NULL) {
+ /* keep src so discard does not get rid of it */
+ zip_source_keep(src);
+ zip_discard(za);
+ return NULL;
+ }
+
+ if (_zip_hash_add(za->names, name, idx, ZIP_FL_UNCHANGED, &za->error) == false) {
+ if (za->error.zip_err != ZIP_ER_EXISTS || (flags & ZIP_CHECKCONS)) {
+ _zip_error_copy(error, &za->error);
+ /* keep src so discard does not get rid of it */
+ zip_source_keep(src);
+ zip_discard(za);
+ return NULL;
+ }
+ }
+ }
+
+ za->ch_flags = za->flags;
+
return za;
}
@@ -274,11 +293,6 @@ _zip_read_cdir(zip_t *za, zip_buffer_t *buffer, zip_uint64_t buf_offset, zip_err
return NULL;
}
- if (_zip_buffer_get_32(buffer) != 0) {
- zip_error_set(error, ZIP_ER_MULTIDISK, 0);
- return NULL;
- }
-
if (eocd_offset >= EOCD64LOCLEN && memcmp(_zip_buffer_data(buffer) + eocd_offset - EOCD64LOCLEN, EOCD64LOC_MAGIC, 4) == 0) {
_zip_buffer_set_offset(buffer, eocd_offset - EOCD64LOCLEN);
cd = _zip_read_eocd64(za->src, buffer, buf_offset, za->flags, error);
@@ -649,7 +663,8 @@ _zip_memmem(const unsigned char *big, size_t biglen, const unsigned char *little
}
-static zip_cdir_t *_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error)
+static zip_cdir_t *
+_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset, unsigned int flags, zip_error_t *error)
{
zip_cdir_t *cd;
zip_uint64_t i, nentry, size, offset, eocd_offset;
@@ -661,7 +676,12 @@ static zip_cdir_t *_zip_read_eocd(zip_buffer_t *buffer, zip_uint64_t buf_offset,
eocd_offset = _zip_buffer_offset(buffer);
- _zip_buffer_get(buffer, 8); /* magic and number of disks already verified */
+ _zip_buffer_get(buffer, 4); /* magic already verified */
+
+ if (_zip_buffer_get_32(buffer) != 0) {
+ zip_error_set(error, ZIP_ER_MULTIDISK, 0);
+ return NULL;
+ }
/* number of cdir-entries on this disk */
i = _zip_buffer_get_16(buffer);
@@ -711,10 +731,14 @@ _zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offse
zip_uint64_t eocd_offset;
zip_uint64_t size, nentry, i, eocdloc_offset;
bool free_buffer;
+ zip_uint32_t num_disks, num_disks64, eocd_disk, eocd_disk64;
eocdloc_offset = _zip_buffer_offset(buffer);
- _zip_buffer_get(buffer, 8); /* magic and single disk already verified */
+ _zip_buffer_get(buffer, 4); /* magic already verified */
+
+ num_disks = _zip_buffer_get_16(buffer);
+ eocd_disk = _zip_buffer_get_16(buffer);
eocd_offset = _zip_buffer_get_64(buffer);
if (eocd_offset > ZIP_INT64_MAX || eocd_offset + EOCD64LEN < eocd_offset) {
@@ -760,8 +784,29 @@ _zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offse
return NULL;
}
- _zip_buffer_get(buffer, 12); /* skip version made by/needed and num disks */
-
+ _zip_buffer_get(buffer, 4); /* skip version made by/needed */
+
+ num_disks64 = _zip_buffer_get_32(buffer);
+ eocd_disk64 = _zip_buffer_get_32(buffer);
+
+ /* if eocd values are 0xffff, we have to use eocd64 values.
+ otherwise, if the values are not the same, it's inconsistent;
+ in any case, if the value is not 0, we don't support it */
+ if (num_disks == 0xffff) {
+ num_disks = num_disks64;
+ }
+ if (eocd_disk == 0xffff) {
+ eocd_disk = eocd_disk64;
+ }
+ if ((flags & ZIP_CHECKCONS) && (eocd_disk != eocd_disk64 || num_disks != num_disks64)) {
+ zip_error_set(error, ZIP_ER_INCONS, 0);
+ return NULL;
+ }
+ if (num_disks != 0 || eocd_disk != 0) {
+ zip_error_set(error, ZIP_ER_MULTIDISK, 0);
+ return NULL;
+ }
+
nentry = _zip_buffer_get_64(buffer);
i = _zip_buffer_get_64(buffer);
diff --git a/ext/zip/lib/zip_set_default_password.c b/ext/zip/lib/zip_set_default_password.c
index ac098dc5fc..10b48062fd 100644
--- a/ext/zip/lib/zip_set_default_password.c
+++ b/ext/zip/lib/zip_set_default_password.c
@@ -44,8 +44,7 @@ zip_set_default_password(zip_t *za, const char *passwd)
if (za == NULL)
return -1;
- if (za->default_password)
- free(za->default_password);
+ free(za->default_password);
if (passwd) {
if ((za->default_password=strdup(passwd)) == NULL) {
diff --git a/ext/zip/lib/zip_set_name.c b/ext/zip/lib/zip_set_name.c
index 5a10381753..2a461437e2 100644
--- a/ext/zip/lib/zip_set_name.c
+++ b/ext/zip/lib/zip_set_name.c
@@ -1,6 +1,6 @@
/*
zip_set_name.c -- rename helper function
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -43,8 +43,10 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
{
zip_entry_t *e;
zip_string_t *str;
- int changed;
+ bool same_as_orig;
zip_int64_t i;
+ const zip_uint8_t *old_name, *new_name;
+ zip_string_t *old_str;
if (idx >= za->nentry) {
zip_error_set(&za->error, ZIP_ER_INVAL, 0);
@@ -56,7 +58,7 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
return -1;
}
- if (name && strlen(name) > 0) {
+ if (name && name[0] != '\0') {
/* TODO: check for string too long */
if ((str=_zip_string_new((const zip_uint8_t *)name, (zip_uint16_t)strlen(name), flags, &za->error)) == NULL)
return -1;
@@ -81,34 +83,75 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
e = za->entry+idx;
- if (e->changes) {
- _zip_string_free(e->changes->filename);
- e->changes->filename = NULL;
- e->changes->changed &= ~ZIP_DIRENT_FILENAME;
- }
-
if (e->orig)
- changed = !_zip_string_equal(e->orig->filename, str);
+ same_as_orig = _zip_string_equal(e->orig->filename, str);
else
- changed = 1;
-
- if (changed) {
- if (e->changes == NULL) {
- if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) {
- zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
- _zip_string_free(str);
- return -1;
- }
- }
- e->changes->filename = str;
- e->changes->changed |= ZIP_DIRENT_FILENAME;
+ same_as_orig = false;
+
+ if (!same_as_orig && e->changes == NULL) {
+ if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) {
+ zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
+ _zip_string_free(str);
+ return -1;
+ }
+ }
+
+ if ((new_name = _zip_string_get(same_as_orig ? e->orig->filename : str, NULL, 0, &za->error)) == NULL) {
+ _zip_string_free(str);
+ return -1;
+ }
+
+ if (e->changes) {
+ old_str = e->changes->filename;
+ }
+ else if (e->orig) {
+ old_str = e->orig->filename;
}
else {
+ old_str = NULL;
+ }
+
+ if (old_str) {
+ if ((old_name = _zip_string_get(old_str, NULL, 0, &za->error)) == NULL) {
+ _zip_string_free(str);
+ return -1;
+ }
+ }
+ else {
+ old_name = NULL;
+ }
+
+ if (_zip_hash_add(za->names, new_name, idx, 0, &za->error) == false) {
+ _zip_string_free(str);
+ return -1;
+ }
+ if (old_name) {
+ _zip_hash_delete(za->names, old_name, NULL);
+ }
+
+ if (same_as_orig) {
+ if (e->changes) {
+ if (e->changes->changed & ZIP_DIRENT_FILENAME) {
+ _zip_string_free(e->changes->filename);
+ e->changes->changed &= ~ZIP_DIRENT_FILENAME;
+ if (e->changes->changed == 0) {
+ _zip_dirent_free(e->changes);
+ e->changes = NULL;
+ }
+ else {
+ /* TODO: what if not cloned? can that happen? */
+ e->changes->filename = e->orig->filename;
+ }
+ }
+ }
_zip_string_free(str);
- if (e->changes && e->changes->changed == 0) {
- _zip_dirent_free(e->changes);
- e->changes = NULL;
+ }
+ else {
+ if (e->changes->changed & ZIP_DIRENT_FILENAME) {
+ _zip_string_free(e->changes->filename);
}
+ e->changes->changed |= ZIP_DIRENT_FILENAME;
+ e->changes->filename = str;
}
return 0;
diff --git a/ext/zip/lib/zip_source_buffer.c b/ext/zip/lib/zip_source_buffer.c
index aadf6e40b0..f3f8ee0d58 100644
--- a/ext/zip/lib/zip_source_buffer.c
+++ b/ext/zip/lib/zip_source_buffer.c
@@ -1,6 +1,6 @@
/*
zip_source_buffer.c -- create zip data source from buffer
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -31,7 +31,6 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -376,6 +375,7 @@ static zip_int64_t
buffer_write(buffer_t *buffer, const zip_uint8_t *data, zip_uint64_t length, zip_error_t *error)
{
zip_uint64_t n, i, fragment_offset;
+ zip_uint8_t **fragments;
if (buffer->offset + length + buffer->fragment_size - 1 < length) {
zip_error_set(error, ZIP_ER_INVAL, 0);
@@ -388,7 +388,6 @@ buffer_write(buffer_t *buffer, const zip_uint8_t *data, zip_uint64_t length, zip
if (needed_fragments > buffer->fragments_capacity) {
zip_uint64_t new_capacity = buffer->fragments_capacity;
- zip_uint8_t **fragments;
while (new_capacity < needed_fragments) {
new_capacity *= 2;
diff --git a/ext/zip/lib/zip_source_crc.c b/ext/zip/lib/zip_source_crc.c
index eed726616a..01f526c647 100644
--- a/ext/zip/lib/zip_source_crc.c
+++ b/ext/zip/lib/zip_source_crc.c
@@ -1,6 +1,6 @@
/*
zip_source_crc.c -- pass-through source that calculates CRC32 and size
- Copyright (C) 2009-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 2009-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -39,10 +39,12 @@
#include "zipint.h"
struct crc_context {
- int eof;
- int validate;
+ int validate; /* whether to check CRC on EOF and return error on mismatch */
+ int crc_complete; /* whether CRC was computed for complete file */
zip_error_t error;
zip_uint64_t size;
+ zip_uint64_t position; /* current reading position */
+ zip_uint64_t crc_position; /* how far we've computed the CRC */
zip_uint32_t crc;
};
@@ -64,12 +66,13 @@ zip_source_crc(zip_t *za, zip_source_t *src, int validate)
return NULL;
}
- ctx->eof = 0;
- ctx->validate = validate;
zip_error_init(&ctx->error);
+ ctx->validate = validate;
+ ctx->crc_complete = 0;
+ ctx->crc_position = 0;
+ ctx->crc = (zip_uint32_t)crc32(0, NULL, 0);
ctx->size = 0;
- ctx->crc = 0;
-
+
return zip_source_layered(za, src, crc_read, ctx);
}
@@ -84,51 +87,50 @@ crc_read(zip_source_t *src, void *_ctx, void *data, zip_uint64_t len, zip_source
switch (cmd) {
case ZIP_SOURCE_OPEN:
- ctx->eof = 0;
- ctx->crc = (zip_uint32_t)crc32(0, NULL, 0);
- ctx->size = 0;
-
+ ctx->position = 0;
return 0;
case ZIP_SOURCE_READ:
- if (ctx->eof || len == 0)
- return 0;
-
- if ((n=zip_source_read(src, data, len)) < 0) {
+ if ((n = zip_source_read(src, data, len)) < 0) {
_zip_error_set_from_source(&ctx->error, src);
return -1;
}
if (n == 0) {
- ctx->eof = 1;
- if (ctx->validate) {
- struct zip_stat st;
+ if (ctx->crc_position == ctx->position) {
+ ctx->crc_complete = 1;
+ ctx->size = ctx->position;
+
+ if (ctx->validate) {
+ struct zip_stat st;
- if (zip_source_stat(src, &st) < 0) {
- _zip_error_set_from_source(&ctx->error, src);
- return -1;
- }
+ if (zip_source_stat(src, &st) < 0) {
+ _zip_error_set_from_source(&ctx->error, src);
+ return -1;
+ }
- if ((st.valid & ZIP_STAT_CRC) && st.crc != ctx->crc) {
- zip_error_set(&ctx->error, ZIP_ER_CRC, 0);
- return -1;
- }
- if ((st.valid & ZIP_STAT_SIZE) && st.size != ctx->size) {
- zip_error_set(&ctx->error, ZIP_ER_INCONS, 0);
- return -1;
+ if ((st.valid & ZIP_STAT_CRC) && st.crc != ctx->crc) {
+ zip_error_set(&ctx->error, ZIP_ER_CRC, 0);
+ return -1;
+ }
+ if ((st.valid & ZIP_STAT_SIZE) && st.size != ctx->size) {
+ zip_error_set(&ctx->error, ZIP_ER_INCONS, 0);
+ return -1;
+ }
}
}
}
- else {
+ else if (!ctx->crc_complete && ctx->position <= ctx->crc_position) {
zip_uint64_t i, nn;
- for (i=0; i < (zip_uint64_t)n; i += nn) {
+ for (i = ctx->crc_position - ctx->position; i < (zip_uint64_t)n; i += nn) {
nn = ZIP_MIN(UINT_MAX, (zip_uint64_t)n-i);
ctx->crc = (zip_uint32_t)crc32(ctx->crc, (const Bytef *)data+i, (uInt)nn);
+ ctx->crc_position += nn;
}
- ctx->size += (zip_uint64_t)n;
}
+ ctx->position += (zip_uint64_t)n;
return n;
case ZIP_SOURCE_CLOSE:
@@ -140,7 +142,7 @@ crc_read(zip_source_t *src, void *_ctx, void *data, zip_uint64_t len, zip_source
st = (zip_stat_t *)data;
- if (ctx->eof) {
+ if (ctx->crc_complete) {
/* TODO: Set comp_size, comp_method, encryption_method?
After all, this only works for uncompressed data. */
st->size = ctx->size;
@@ -161,7 +163,37 @@ crc_read(zip_source_t *src, void *_ctx, void *data, zip_uint64_t len, zip_source
return 0;
case ZIP_SOURCE_SUPPORTS:
- return zip_source_make_command_bitmap(ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_CLOSE, ZIP_SOURCE_STAT, ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE, -1);
+ {
+ zip_int64_t mask = zip_source_supports(src);
+
+ if (mask < 0) {
+ _zip_error_set_from_source(&ctx->error, src);
+ return -1;
+ }
+
+ return mask & ~zip_source_make_command_bitmap(ZIP_SOURCE_BEGIN_WRITE, ZIP_SOURCE_COMMIT_WRITE, ZIP_SOURCE_ROLLBACK_WRITE, ZIP_SOURCE_SEEK_WRITE, ZIP_SOURCE_TELL_WRITE, ZIP_SOURCE_REMOVE, -1);
+ }
+
+ case ZIP_SOURCE_SEEK:
+ {
+ zip_int64_t new_position;
+ zip_source_args_seek_t *args = ZIP_SOURCE_GET_ARGS(zip_source_args_seek_t, data, len, &ctx->error);
+
+ if (args == NULL) {
+ return -1;
+ }
+ if (zip_source_seek(src, args->offset, args->whence) < 0 || (new_position = zip_source_tell(src)) < 0) {
+ _zip_error_set_from_source(&ctx->error, src);
+ return -1;
+ }
+
+ ctx->position = (zip_uint64_t)new_position;
+
+ return 0;
+ }
+
+ case ZIP_SOURCE_TELL:
+ return (zip_int64_t)ctx->position;
default:
zip_error_set(&ctx->error, ZIP_ER_OPNOTSUPP, 0);
diff --git a/ext/zip/lib/zip_source_file.c b/ext/zip/lib/zip_source_file.c
index 1465e1700e..b3cd7ab29f 100644
--- a/ext/zip/lib/zip_source_file.c
+++ b/ext/zip/lib/zip_source_file.c
@@ -32,7 +32,6 @@
*/
-#include <errno.h>
#include <stdio.h>
#include "zipint.h"
diff --git a/ext/zip/lib/zip_source_filep.c b/ext/zip/lib/zip_source_filep.c
index e541305d7f..70255dec41 100644
--- a/ext/zip/lib/zip_source_filep.c
+++ b/ext/zip/lib/zip_source_filep.c
@@ -31,15 +31,17 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include "zipint.h"
-
#include <sys/stat.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "zipint.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#ifdef _WIN32
/* WIN32 needs <fcntl.h> for _O_BINARY */
#include <fcntl.h>
@@ -49,11 +51,12 @@
#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
-#ifndef S_IRWXG
-#define S_IRWXG (S_IRWXU >> 3)
-#endif
-#ifndef S_IRWXO
-#define S_IRWXO (S_IRWXG >> 3)
+#if defined(S_IXUSR) && defined(S_IRWXG) && defined(S_IRWXO)
+#define _SAFE_MASK (S_IXUSR | S_IRWXG | S_IRWXO)
+#elif defined(_S_IWRITE)
+#define _SAFE_MASK (_S_IWRITE)
+#else
+#error do not know safe values for umask, please report this
#endif
#ifdef _MSC_VER
@@ -183,13 +186,7 @@ create_temp_output(struct read_file *ctx)
}
sprintf(temp, "%s.XXXXXX", ctx->fname);
-#ifdef _WIN32
- /* This might work under VS2015, however there's no good documentation
- about it. So let it be for now. */
- mask = 0;
-#else
- mask = umask(S_IXUSR | S_IRWXG | S_IRWXO);
-#endif
+ mask = umask(_SAFE_MASK);
if ((tfd=mkstemp(temp)) == -1) {
zip_error_set(&ctx->error, ZIP_ER_TMPOPEN, errno);
umask(mask);
diff --git a/ext/zip/lib/zip_source_pkware.c b/ext/zip/lib/zip_source_pkware.c
index ce281ac148..125e4e2c2a 100644
--- a/ext/zip/lib/zip_source_pkware.c
+++ b/ext/zip/lib/zip_source_pkware.c
@@ -1,6 +1,6 @@
/*
zip_source_pkware.c -- Traditional PKWARE de/encryption routines
- Copyright (C) 2009-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 2009-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -107,7 +107,7 @@ decrypt(struct trad_pkware *ctx, zip_uint8_t *out, const zip_uint8_t *in,
if (!update_only) {
/* decrypt next byte */
tmp = (zip_uint16_t)(ctx->key[2] | 2);
- tmp = (zip_uint16_t)((tmp * (tmp ^ 1)) >> 8);
+ tmp = (zip_uint16_t)(((zip_uint32_t)tmp * (tmp ^ 1)) >> 8);
b ^= (Bytef)tmp;
}
diff --git a/ext/zip/lib/zip_source_stat.c b/ext/zip/lib/zip_source_stat.c
index 34cb05f452..a6b46d06a6 100644
--- a/ext/zip/lib/zip_source_stat.c
+++ b/ext/zip/lib/zip_source_stat.c
@@ -1,6 +1,6 @@
/*
zip_source_stat.c -- get meta information from zip_source
- Copyright (C) 2009-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 2009-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -35,7 +35,7 @@
#include "zipint.h"
-int
+ZIP_EXTERN int
zip_source_stat(zip_source_t *src, zip_stat_t *st)
{
if (src->source_closed) {
diff --git a/ext/zip/lib/zip_source_supports.c b/ext/zip/lib/zip_source_supports.c
index 3c100fb71f..75a4a4626d 100644
--- a/ext/zip/lib/zip_source_supports.c
+++ b/ext/zip/lib/zip_source_supports.c
@@ -1,6 +1,6 @@
/*
zip_source_supports.c -- check for supported functions
- Copyright (C) 2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 2014-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -44,7 +44,7 @@ zip_source_supports(zip_source_t *src)
}
-zip_int64_t
+ZIP_EXTERN zip_int64_t
zip_source_make_command_bitmap(zip_source_cmd_t cmd0, ...)
{
zip_int64_t bitmap;
diff --git a/ext/zip/lib/zip_source_win32a.c b/ext/zip/lib/zip_source_win32a.c
index c20e891b08..85493b660e 100644
--- a/ext/zip/lib/zip_source_win32a.c
+++ b/ext/zip/lib/zip_source_win32a.c
@@ -1,6 +1,6 @@
/*
zip_source_win32a.c -- create data source from Windows file (ANSI)
-Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
+Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -32,7 +32,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <errno.h>
#include <stdio.h>
#include "zipint.h"
@@ -45,11 +44,11 @@ static int _win32_rename_temp_a(_zip_source_win32_read_file_t *ctx);
static int _win32_remove_a(const void *fname);
static _zip_source_win32_file_ops_t win32_ops_a = {
- .op_strdup = _win32_strdup_a,
- .op_open = _win32_open_a,
- .op_create_temp = _win32_create_temp_a,
- .op_rename_temp = _win32_rename_temp_a,
- .op_remove = _win32_remove_a
+ _win32_strdup_a,
+ _win32_open_a,
+ _win32_create_temp_a,
+ _win32_rename_temp_a,
+ _win32_remove_a
};
ZIP_EXTERN zip_source_t *
diff --git a/ext/zip/lib/zip_source_win32handle.c b/ext/zip/lib/zip_source_win32handle.c
index dd17c021b3..35e2e67972 100644
--- a/ext/zip/lib/zip_source_win32handle.c
+++ b/ext/zip/lib/zip_source_win32handle.c
@@ -1,6 +1,6 @@
/*
zip_source_win32file.c -- create data source from HANDLE (Win32)
-Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
+Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -33,7 +33,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <wchar.h>
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -409,6 +408,7 @@ _win32_read_file(void *state, void *data, zip_uint64_t len, zip_source_cmd_t cmd
static int
_win32_create_temp_file(_zip_source_win32_read_file_t *ctx)
{
+ zip_uint32_t value;
/*
Windows has GetTempFileName(), but it closes the file after
creation, leaving it open to a horrible race condition. So
@@ -448,7 +448,7 @@ _win32_create_temp_file(_zip_source_win32_read_file_t *ctx)
}
}
- zip_uint32_t value = GetTickCount();
+ value = GetTickCount();
for (i = 0; i < 1024 && th == INVALID_HANDLE_VALUE; i++) {
th = ctx->ops->op_create_temp(ctx, &temp, value + i, psa);
if (th == INVALID_HANDLE_VALUE && GetLastError() != ERROR_FILE_EXISTS)
diff --git a/ext/zip/lib/zip_source_win32utf8.c b/ext/zip/lib/zip_source_win32utf8.c
index e11214ba05..004c66ac2b 100644
--- a/ext/zip/lib/zip_source_win32utf8.c
+++ b/ext/zip/lib/zip_source_win32utf8.c
@@ -32,7 +32,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <errno.h>
#include <stdio.h>
#include "zipint.h"
diff --git a/ext/zip/lib/zip_source_win32w.c b/ext/zip/lib/zip_source_win32w.c
index 27cdf910e0..551aba5f37 100644
--- a/ext/zip/lib/zip_source_win32w.c
+++ b/ext/zip/lib/zip_source_win32w.c
@@ -1,6 +1,6 @@
/*
zip_source_win32w.c -- create data source from Windows file (UTF-16)
-Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
+Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -32,7 +32,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <errno.h>
#include <stdio.h>
#include "zipint.h"
@@ -45,11 +44,11 @@ static int _win32_rename_temp_w(_zip_source_win32_read_file_t *ctx);
static int _win32_remove_w(const void *fname);
static _zip_source_win32_file_ops_t win32_ops_w = {
- .op_strdup = _win32_strdup_w,
- .op_open = _win32_open_w,
- .op_create_temp = _win32_create_temp_w,
- .op_rename_temp = _win32_rename_temp_w,
- .op_remove = _win32_remove_w
+ _win32_strdup_w,
+ _win32_open_w,
+ _win32_create_temp_w,
+ _win32_rename_temp_w,
+ _win32_remove_w
};
ZIP_EXTERN zip_source_t *
@@ -100,7 +99,7 @@ _win32_create_temp_w(_zip_source_win32_read_file_t *ctx, void **temp, zip_uint32
return INVALID_HANDLE_VALUE;
}
}
- if (swprintf((wchar_t *)*temp, len, L"%s.%08x", (const wchar_t *)ctx->fname, value) != len - 1) {
+ if (_snwprintf((wchar_t *)*temp, len, L"%s.%08x", (const wchar_t *)ctx->fname, value) != len - 1) {
return INVALID_HANDLE_VALUE;
}
diff --git a/ext/zip/lib/zip_unchange.c b/ext/zip/lib/zip_unchange.c
index 6c8a495c78..5ef5462127 100644
--- a/ext/zip/lib/zip_unchange.c
+++ b/ext/zip/lib/zip_unchange.c
@@ -1,6 +1,6 @@
/*
zip_unchange.c -- undo changes to file in zip archive
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -48,6 +48,7 @@ int
_zip_unchange(zip_t *za, zip_uint64_t idx, int allow_duplicates)
{
zip_int64_t i;
+ const char *orig_name, *changed_name;
if (idx >= za->nentry) {
zip_error_set(&za->error, ZIP_ER_INVAL, 0);
@@ -55,9 +56,32 @@ _zip_unchange(zip_t *za, zip_uint64_t idx, int allow_duplicates)
}
if (!allow_duplicates && za->entry[idx].changes && (za->entry[idx].changes->changed & ZIP_DIRENT_FILENAME)) {
- i = _zip_name_locate(za, _zip_get_name(za, idx, ZIP_FL_UNCHANGED, NULL), 0, NULL);
- if (i >= 0 && (zip_uint64_t)i != idx) {
- zip_error_set(&za->error, ZIP_ER_EXISTS, 0);
+ if (za->entry[idx].orig != NULL) {
+ if ((orig_name=_zip_get_name(za, idx, ZIP_FL_UNCHANGED, &za->error)) == NULL) {
+ return -1;
+ }
+
+ i = _zip_name_locate(za, orig_name, 0, NULL);
+ if (i >= 0 && (zip_uint64_t)i != idx) {
+ zip_error_set(&za->error, ZIP_ER_EXISTS, 0);
+ return -1;
+ }
+ }
+ else {
+ orig_name = NULL;
+ }
+
+ if ((changed_name=_zip_get_name(za, idx, 0, &za->error)) == NULL) {
+ return -1;
+ }
+
+ if (orig_name) {
+ if (_zip_hash_add(za->names, (const zip_uint8_t *)orig_name, idx, 0, &za->error) == false) {
+ return -1;
+ }
+ }
+ if (_zip_hash_delete(za->names, (const zip_uint8_t *)changed_name, &za->error) == false) {
+ _zip_hash_delete(za->names, (const zip_uint8_t *)orig_name, NULL);
return -1;
}
}
diff --git a/ext/zip/lib/zip_unchange_all.c b/ext/zip/lib/zip_unchange_all.c
index 60076838d4..dc89f7fdaf 100644
--- a/ext/zip/lib/zip_unchange_all.c
+++ b/ext/zip/lib/zip_unchange_all.c
@@ -1,6 +1,6 @@
/*
zip_unchange.c -- undo changes to all files in zip archive
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -43,6 +43,8 @@ zip_unchange_all(zip_t *za)
int ret;
zip_uint64_t i;
+ _zip_hash_revert(za->names);
+
ret = 0;
for (i=0; i<za->nentry; i++)
ret |= _zip_unchange(za, i, 1);
diff --git a/ext/zip/lib/zipconf.h b/ext/zip/lib/zipconf.h
index c8716fb952..8ac2652e1d 100644
--- a/ext/zip/lib/zipconf.h
+++ b/ext/zip/lib/zipconf.h
@@ -7,10 +7,10 @@
This file was generated automatically by CMake
based on ../cmake-zipconf.h.in.
*/
-#define LIBZIP_VERSION "1.0.1"
+#define LIBZIP_VERSION "1.1.2"
#define LIBZIP_VERSION_MAJOR 1
-#define LIBZIP_VERSION_MINOR 0
-#define LIBZIP_VERSION_MICRO 1
+#define LIBZIP_VERSION_MINOR 1
+#define LIBZIP_VERSION_MICRO 2
/* #undef HAVE_INTTYPES_H_LIBZIP */
diff --git a/ext/zip/lib/zipint.h b/ext/zip/lib/zipint.h
index d13bab42ab..68b18c70a3 100644
--- a/ext/zip/lib/zipint.h
+++ b/ext/zip/lib/zipint.h
@@ -3,7 +3,7 @@
/*
zipint.h -- internal declarations.
- Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -65,6 +65,22 @@ typedef char bool;
#define false 0
#endif
+#include <errno.h>
+
+/* at least MinGW does not provide EOPNOTSUPP, see
+ * http://sourceforge.net/p/mingw/bugs/263/
+ */
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP EINVAL
+#endif
+
+/* at least MinGW does not provide EOVERFLOW, see
+ * http://sourceforge.net/p/mingw/bugs/242/
+ */
+#ifndef EOVERFLOW
+#define EOVERFLOW EFBIG
+#endif
+
#ifdef _WIN32
#if defined(HAVE__CLOSE)
#define close _close
@@ -76,7 +92,7 @@ typedef char bool;
#if defined(HAVE__FDOPEN)
#define fdopen _fdopen
#endif
-#if defined(HAVE__FILENO)
+#if !defined(HAVE_FILENO) && defined(HAVE__FILENO)
#define fileno _fileno
#endif
/* Windows' open() doesn't understand Unix permissions */
@@ -92,6 +108,9 @@ typedef char bool;
#define strdup _strdup
#endif
#endif
+#if !defined(HAVE__SETMODE) && defined(HAVE_SETMODE)
+#define _setmode setmode
+#endif
#endif
#ifndef HAVE_FSEEKO
@@ -110,6 +129,8 @@ int _zip_mkstemp(char *);
#if !defined(HAVE_STRCASECMP)
#if defined(HAVE__STRICMP)
#define strcasecmp _stricmp
+#elif defined(HAVE_STRICMP)
+#define strcasecmp stricmp
#endif
#endif
@@ -129,12 +150,10 @@ int _zip_mkstemp(char *);
#if defined(HAVE_FTELLO) && defined(HAVE_FSEEKO)
#define ZIP_FSEEK_MAX ZIP_OFF_MAX
#define ZIP_FSEEK_MIN ZIP_OFF_MIN
-#elif SIZEOF_LONG >= 8
-#define ZIP_FSEEK_MAX (long)ZIP_INT64_MAX
-#define ZIP_FSEEK_MIN (long)ZIP_INT64_MIN
#else
-#define ZIP_FSEEK_MAX (long)ZIP_INT32_MAX
-#define ZIP_FSEEK_MIN (long)ZIP_INT32_MIN
+#include <limits.h>
+#define ZIP_FSEEK_MAX LONG_MAX
+#define ZIP_FSEEK_MIN LONG_MIN
#endif
#ifndef SIZE_MAX
@@ -255,13 +274,19 @@ enum zip_encoding_type {
typedef enum zip_encoding_type zip_encoding_type_t;
+#ifndef ZIP_HASH_TABLE_SIZE
+#define ZIP_HASH_TABLE_SIZE 8192
+#endif
+
+struct zip_hash;
+
typedef struct zip_cdir zip_cdir_t;
typedef struct zip_dirent zip_dirent_t;
typedef struct zip_entry zip_entry_t;
typedef struct zip_extra_field zip_extra_field_t;
typedef struct zip_string zip_string_t;
typedef struct zip_buffer zip_buffer_t;
-
+typedef struct zip_hash zip_hash_t;
/* zip archive, part of API */
@@ -276,7 +301,7 @@ struct zip {
char *default_password; /* password used when no other supplied */
zip_string_t *comment_orig; /* archive comment */
- zip_string_t *comment_changes; /* changed archive comment */
+ zip_string_t *comment_changes; /* changed archive comment */
bool comment_changed; /* whether archive comment was changed */
zip_uint64_t nentry; /* number of entries */
@@ -286,6 +311,8 @@ struct zip {
unsigned int nopen_source; /* number of open sources using archive */
unsigned int nopen_source_alloc; /* number of sources allocated */
zip_source_t **open_source; /* open sources using archive */
+
+ zip_hash_t *names; /* hash table for name lookup */
char *tempdir; /* custom temp dir (needed e.g. for OS X sandboxing) */
};
@@ -312,7 +339,7 @@ struct zip_file {
struct zip_dirent {
zip_uint32_t changed;
bool local_extra_fields_read; /* whether we already read in local header extra fields */
- bool cloned; /* whether this instance is cloned, and thus shares non-changed strings */
+ bool cloned; /* whether this instance is cloned, and thus shares non-changed strings */
zip_uint16_t version_madeby; /* (c) version of creator */
zip_uint16_t version_needed; /* (cl) version needed to extract */
@@ -415,7 +442,7 @@ struct zip_buffer {
struct zip_filelist {
zip_uint64_t idx;
-// TODO const char *name;
+/* TODO const char *name; */
};
typedef struct zip_filelist zip_filelist_t;
@@ -453,6 +480,7 @@ int _zip_buffer_put_16(zip_buffer_t *buffer, zip_uint16_t i);
int _zip_buffer_put_32(zip_buffer_t *buffer, zip_uint32_t i);
int _zip_buffer_put_64(zip_buffer_t *buffer, zip_uint64_t i);
int _zip_buffer_put_8(zip_buffer_t *buffer, zip_uint8_t i);
+int _zip_buffer_skip(zip_buffer_t *buffer, zip_uint64_t length);
int _zip_buffer_set_offset(zip_buffer_t *buffer, zip_uint64_t offset);
zip_uint64_t _zip_buffer_size(zip_buffer_t *buffer);
@@ -478,7 +506,7 @@ void _zip_ef_free(zip_extra_field_t *);
const zip_uint8_t *_zip_ef_get_by_id(const zip_extra_field_t *, zip_uint16_t *, zip_uint16_t, zip_uint16_t, zip_flags_t, zip_error_t *);
zip_extra_field_t *_zip_ef_merge(zip_extra_field_t *, zip_extra_field_t *);
zip_extra_field_t *_zip_ef_new(zip_uint16_t, zip_uint16_t, const zip_uint8_t *, zip_flags_t);
-zip_extra_field_t *_zip_ef_parse(const zip_uint8_t *, zip_uint16_t, zip_flags_t, zip_error_t *);
+bool _zip_ef_parse(const zip_uint8_t *, zip_uint16_t, zip_flags_t, zip_extra_field_t **, zip_error_t *);
zip_extra_field_t *_zip_ef_remove_internal(zip_extra_field_t *);
zip_uint16_t _zip_ef_size(const zip_extra_field_t *, zip_flags_t);
int _zip_ef_write(zip_t *za, const zip_extra_field_t *ef, zip_flags_t flags);
@@ -505,6 +533,13 @@ zip_dirent_t *_zip_get_dirent(zip_t *, zip_uint64_t, zip_flags_t, zip_error_t *)
enum zip_encoding_type _zip_guess_encoding(zip_string_t *, enum zip_encoding_type);
zip_uint8_t *_zip_cp437_to_utf8(const zip_uint8_t * const, zip_uint32_t, zip_uint32_t *, zip_error_t *);
+bool _zip_hash_add(zip_hash_t *hash, const zip_uint8_t *name, zip_uint64_t index, zip_flags_t flags, zip_error_t *error);
+bool _zip_hash_delete(zip_hash_t *hash, const zip_uint8_t *key, zip_error_t *error);
+void _zip_hash_free(zip_hash_t *hash);
+zip_int64_t _zip_hash_lookup(zip_hash_t *hash, const zip_uint8_t *name, zip_flags_t flags, zip_error_t *error);
+zip_hash_t *_zip_hash_new(zip_uint16_t hash_size, zip_error_t *error);
+void _zip_hash_revert(zip_hash_t *hash);
+
zip_t *_zip_open(zip_source_t *, unsigned int, zip_error_t *);
int _zip_read(zip_source_t *src, zip_uint8_t *data, zip_uint64_t length, zip_error_t *error);
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index fca40d20f0..fca0a9d617 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -172,7 +171,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil
/* it is a directory only, see #40228 */
if (path_cleaned_len > 1 && IS_SLASH(path_cleaned[path_cleaned_len - 1])) {
- len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, file);
+ len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, path_cleaned);
is_dir_only = 1;
} else {
memcpy(file_dirname, path_cleaned, path_cleaned_len);
@@ -315,12 +314,12 @@ static int php_zip_add_file(struct zip *za, const char *filename, size_t filenam
static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char **remove_path, size_t *remove_path_len, char **add_path, size_t *add_path_len) /* {{{ */
{
zval *option;
- if ((option = zend_hash_str_find(HASH_OF(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
+ if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
*remove_all_path = zval_get_long(option);
}
/* If I add more options, it would make sense to create a nice static struct and loop over it. */
- if ((option = zend_hash_str_find(HASH_OF(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
+ if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
if (Z_TYPE_P(option) != IS_STRING) {
php_error_docref(NULL, E_WARNING, "remove_path option expected to be a string");
return -1;
@@ -332,7 +331,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char
}
if (Z_STRLEN_P(option) >= MAXPATHLEN) {
- php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %i, %i given)",
+ php_error_docref(NULL, E_WARNING, "remove_path string is too long (max: %d, %zd given)",
MAXPATHLEN - 1, Z_STRLEN_P(option));
return -1;
}
@@ -340,7 +339,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char
*remove_path = Z_STRVAL_P(option);
}
- if ((option = zend_hash_str_find(HASH_OF(options), "add_path", sizeof("add_path") - 1)) != NULL) {
+ if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "add_path", sizeof("add_path") - 1)) != NULL) {
if (Z_TYPE_P(option) != IS_STRING) {
php_error_docref(NULL, E_WARNING, "add_path option expected to be a string");
return -1;
@@ -352,7 +351,7 @@ static int php_zip_parse_options(zval *options, zend_long *remove_all_path, char
}
if (Z_STRLEN_P(option) >= MAXPATHLEN) {
- php_error_docref(NULL, E_WARNING, "add_path string too long (max: %i, %i given)",
+ php_error_docref(NULL, E_WARNING, "add_path string too long (max: %d, %zd given)",
MAXPATHLEN - 1, Z_STRLEN_P(option));
return -1;
}
@@ -997,7 +996,7 @@ static void php_zip_object_free_storage(zend_object *object) /* {{{ */
}
if (intern->za) {
if (zip_close(intern->za) != 0) {
- php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context");
+ php_error_docref(NULL, E_WARNING, "Cannot destroy the zip context: %s", zip_strerror(intern->za));
return;
}
intern->za = NULL;
@@ -1283,7 +1282,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_read)
}
if (zr_rsrc->zf) {
- buffer = zend_string_alloc(len, 0);
+ buffer = zend_string_safe_alloc(1, len, 0, 0);
n = zip_fread(zr_rsrc->zf, ZSTR_VAL(buffer), ZSTR_LEN(buffer));
if (n > 0) {
ZSTR_VAL(buffer)[n] = '\0';
@@ -1496,6 +1495,7 @@ static ZIPARCHIVE_METHOD(close)
struct zip *intern;
zval *self = getThis();
ze_zip_object *ze_obj;
+ int err;
if (!self) {
RETURN_FALSE;
@@ -1505,7 +1505,8 @@ static ZIPARCHIVE_METHOD(close)
ze_obj = Z_ZIP_P(self);
- if (zip_close(intern)) {
+ if ((err = zip_close(intern))) {
+ php_error_docref(NULL, E_WARNING, "%s", zip_strerror(intern));
zip_discard(intern);
}
@@ -1514,7 +1515,11 @@ static ZIPARCHIVE_METHOD(close)
ze_obj->filename_len = 0;
ze_obj->za = NULL;
- RETURN_TRUE;
+ if (!err) {
+ RETURN_TRUE;
+ } else {
+ RETURN_FALSE;
+ }
}
/* }}} */
@@ -2293,13 +2298,13 @@ static ZIPARCHIVE_METHOD(setCompressionName)
ZIP_FROM_OBJECT(intern, this);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l",
&name, &name_len, &comp_method, &comp_flags) == FAILURE) {
return;
}
if (name_len < 1) {
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name");
+ php_error_docref(NULL, E_NOTICE, "Empty string as entry name");
}
idx = zip_name_locate(intern, name, 0);
@@ -2330,7 +2335,7 @@ static ZIPARCHIVE_METHOD(setCompressionIndex)
ZIP_FROM_OBJECT(intern, this);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l",
&index, &comp_method, &comp_flags) == FAILURE) {
return;
}
@@ -2663,7 +2668,7 @@ static ZIPARCHIVE_METHOD(extractTo)
for (i = 0; i < filecount; i++) {
char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
- if (!php_zip_extract_file(intern, pathto, file, strlen(file))) {
+ if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file))) {
RETURN_FALSE;
}
}
@@ -2724,7 +2729,7 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
RETURN_FALSE;
}
- buffer = zend_string_alloc(len, 0);
+ buffer = zend_string_safe_alloc(1, len, 0, 0);
n = zip_fread(zf, ZSTR_VAL(buffer), ZSTR_LEN(buffer));
if (n < 1) {
zend_string_free(buffer);
@@ -3034,6 +3039,37 @@ static PHP_MINIT_FUNCTION(zip)
REGISTER_ZIP_CLASS_CONST_LONG("FL_NODIR", ZIP_FL_NODIR);
REGISTER_ZIP_CLASS_CONST_LONG("FL_COMPRESSED", ZIP_FL_COMPRESSED);
REGISTER_ZIP_CLASS_CONST_LONG("FL_UNCHANGED", ZIP_FL_UNCHANGED);
+#ifdef ZIP_FL_ENC_GUESS
+ /* Default filename encoding policy. */
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_GUESS", ZIP_FL_ENC_GUESS);
+#endif
+#ifdef ZIP_FL_ENC_RAW
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_RAW", ZIP_FL_ENC_RAW);
+#endif
+#ifdef ZIP_FL_ENC_STRICT
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_STRICT", ZIP_FL_ENC_STRICT);
+#endif
+#ifdef ZIP_FL_ENC_UTF_8
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_UTF_8", ZIP_FL_ENC_UTF_8);
+#endif
+#ifdef ZIP_FL_ENC_CP437
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_CP437", ZIP_FL_ENC_CP437);
+#endif
+
+/* XXX The below are rather not implemented or to check whether makes sense to expose. */
+/*#ifdef ZIP_FL_RECOMPRESS
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_RECOMPRESS", ZIP_FL_RECOMPRESS);
+#endif
+#ifdef ZIP_FL_ENCRYPTED
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_ENCRYPTED", ZIP_FL_ENCRYPTED);
+#endif
+#ifdef ZIP_FL_LOCAL
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_LOCAL", ZIP_FL_LOCAL);
+#endif
+#ifdef ZIP_FL_CENTRAL
+ REGISTER_ZIP_CLASS_CONST_LONG("FL_CENTRAL", ZIP_FL_CENTRAL);
+#endif */
+
REGISTER_ZIP_CLASS_CONST_LONG("CM_DEFAULT", ZIP_CM_DEFAULT);
REGISTER_ZIP_CLASS_CONST_LONG("CM_STORE", ZIP_CM_STORE);
REGISTER_ZIP_CLASS_CONST_LONG("CM_SHRINK", ZIP_CM_SHRINK);
@@ -3129,7 +3165,6 @@ static PHP_MINFO_FUNCTION(zip)
php_info_print_table_start();
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "Extension Version","$Id$");
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION);
php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION);
diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h
index 1ac775eebf..ad65fdeb9d 100644
--- a/ext/zip/php_zip.h
+++ b/ext/zip/php_zip.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#ifndef PHP_ZIP_H
#define PHP_ZIP_H
@@ -38,24 +37,9 @@ extern zend_module_entry zip_module_entry;
#define ZIP_OVERWRITE ZIP_TRUNCATE
#endif
-#define PHP_ZIP_VERSION "1.13.0dev"
+#define PHP_ZIP_VERSION "1.13.2"
-#ifndef Z_SET_REFCOUNT_P
-# if PHP_MAJOR_VERSION < 6 && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3)
-# define Z_SET_REFCOUNT_P(pz, rc) pz->refcount = rc
-# define Z_UNSET_ISREF_P(pz) pz->is_ref = 0
-# endif
-#endif
-
-/* {{{ ZIP_OPENBASEDIR_CHECKPATH(filename) */
-#if PHP_API_VERSION < 20100412
-# define ZIP_OPENBASEDIR_CHECKPATH(filename) \
- (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename)
-#else
-#define ZIP_OPENBASEDIR_CHECKPATH(filename) \
- php_check_open_basedir(filename)
-#endif
-/* }}} */
+#define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)
typedef struct _ze_zip_rsrc {
struct zip *za;
diff --git a/ext/zip/tests/bug70322.phpt b/ext/zip/tests/bug70322.phpt
new file mode 100644
index 0000000000..a9b4915914
--- /dev/null
+++ b/ext/zip/tests/bug70322.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #70322 (ZipArchive::close() doesn't indicate errors)
+--DESCRIPTION--
+We want to test whether ZipArchive::close() returns FALSE and raises a warning
+on failure, so we force the failure by adding a file to the archive, which we
+delete before closing.
+--SKIPIF--
+<?php
+if (!extension_loaded('zip')) die('skip requires zip extension');
+?>
+--FILE--
+<?php
+$zipfile = __DIR__ . '/bug70322.zip';
+$textfile = __DIR__ . '/bug70322.txt';
+touch($textfile);
+$zip = new ZipArchive();
+$zip->open($zipfile, ZipArchive::CREATE);
+$zip->addFile($textfile);
+unlink($textfile);
+var_dump($zip->close());
+?>
+--CLEAN--
+<?php
+// we don't expect the archive to be created, but clean up just in case...
+@unlink(__DIR__ . '/bug70322.zip');
+?>
+--EXPECTF--
+Warning: ZipArchive::close(): Read error: No such file or directory in %s%ebug70322.php on line %d
+bool(false)
diff --git a/ext/zip/tests/bug70350.phpt b/ext/zip/tests/bug70350.phpt
new file mode 100644
index 0000000000..d81de65a32
--- /dev/null
+++ b/ext/zip/tests/bug70350.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Bug #70350 (ZipArchive::extractTo allows for directory traversal when creating directories)
+--SKIPIF--
+<?php
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+
+$dir = dirname(__FILE__)."/bug70350";
+mkdir($dir);
+$archive = new ZipArchive();
+$archive->open("$dir/a.zip",ZipArchive::CREATE);
+$archive->addEmptyDir("../down2/");
+$archive->close();
+
+$archive2 = new ZipArchive();
+$archive2->open("$dir/a.zip");
+$archive2->extractTo($dir);
+$archive2->close();
+var_dump(file_exists("$dir/down2/"));
+var_dump(file_exists("../down2/"));
+?>
+--CLEAN--
+<?php
+$dir = dirname(__FILE__)."/bug70350";
+rmdir("$dir/down2");
+unlink("$dir/a.zip");
+rmdir($dir);
+?>
+--EXPECT--
+bool(true)
+bool(false)
diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt
new file mode 100644
index 0000000000..87ba618450
--- /dev/null
+++ b/ext/zip/tests/bug72258.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #72258 ZipArchive converts filenames to unrecoverable form
+--SKIPIF--
+<?php
+/* $Id$ */
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+
+$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug72258.zip";
+
+$zip = new \ZipArchive();
+$res = $zip->open($fn);
+if ($res !== true) {
+ echo 'Error opening: ' . $res;
+ die();
+}
+
+for ($i = 0; $i < $zip->numFiles; $i++) {
+ $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW);
+ var_dump($fnInArc);
+}
+?>
+--EXPECT--
+string(6) "€‚ƒ„/"
diff --git a/ext/zip/tests/bug72258.zip b/ext/zip/tests/bug72258.zip
new file mode 100644
index 0000000000..07ea2e4948
--- /dev/null
+++ b/ext/zip/tests/bug72258.zip
Binary files differ
diff --git a/ext/zip/tests/compression_methods.phpt b/ext/zip/tests/compression_methods.phpt
new file mode 100644
index 0000000000..084fa848f1
--- /dev/null
+++ b/ext/zip/tests/compression_methods.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Recognition of compression methods
+--DESCRIPTION--
+This test is supposed to cover all compression methods that are recognized by
+libzip, but for now only 6 methods are available in compression_methods.zip.
+The zip and the test should be extended, if possible.
+--SKIPIF--
+<?php
+if (!extension_loaded('zip')) die('skip zip extension not available');
+?>
+--FILE--
+<?php
+$methods = array(
+ 'store' => ZipArchive::CM_STORE,
+ 'deflate' => ZipArchive::CM_DEFLATE,
+ 'deflate64' => ZipArchive::CM_DEFLATE64,
+ 'bzip2' => ZipArchive::CM_BZIP2,
+ 'lzma' => ZipArchive::CM_LZMA,
+ 'ppmd' => ZipArchive::CM_PPMD
+);
+$zip = new ZipArchive();
+$zip->open(__DIR__ . '/compression_methods.zip');
+foreach ($methods as $filename => $method) {
+ echo "$filename: ";
+ var_dump($zip->statName($filename)['comp_method'] === $method);
+}
+$zip->close();
+?>
+--EXPECT--
+store: bool(true)
+deflate: bool(true)
+deflate64: bool(true)
+bzip2: bool(true)
+lzma: bool(true)
+ppmd: bool(true)
diff --git a/ext/zip/tests/compression_methods.zip b/ext/zip/tests/compression_methods.zip
new file mode 100644
index 0000000000..44ed8ff5ed
--- /dev/null
+++ b/ext/zip/tests/compression_methods.zip
Binary files differ
diff --git a/ext/zip/tests/oo_addglob.phpt b/ext/zip/tests/oo_addglob.phpt
index 970bfc7678..ad8f8780de 100644
--- a/ext/zip/tests/oo_addglob.phpt
+++ b/ext/zip/tests/oo_addglob.phpt
@@ -8,6 +8,7 @@ w/Kenzo over the shoulder
<?php
/* $Id$ */
if(!extension_loaded('zip')) die('skip');
+if(!defined("GLOB_BRACE")) die ('skip');
?>
--FILE--
<?php
diff --git a/ext/zip/tests/oo_delete.phpt b/ext/zip/tests/oo_delete.phpt
index 9eac821734..69c6151d5c 100644
--- a/ext/zip/tests/oo_delete.phpt
+++ b/ext/zip/tests/oo_delete.phpt
@@ -63,7 +63,8 @@ $sb = $zip->statIndex(1);
var_dump($sb);
$sb = $zip->statIndex(2);
var_dump($sb);
-$zip->close();
+// suppress irrelevant error message:
+@$zip->close();
unset($zip);
if (file_exists($file)) {
diff --git a/ext/zip/tests/stream_meta_data.phpt b/ext/zip/tests/stream_meta_data.phpt
index bd080980ed..63f720ad85 100644
--- a/ext/zip/tests/stream_meta_data.phpt
+++ b/ext/zip/tests/stream_meta_data.phpt
@@ -35,6 +35,12 @@ fclose($fp);
?>
--EXPECTF--
array(8) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(3) "zip"
["mode"]=>
@@ -45,14 +51,14 @@ array(8) {
bool(false)
["uri"]=>
string(3) "foo"
+}
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-array(9) {
["wrapper_type"]=>
string(11) "zip wrapper"
["stream_type"]=>
@@ -65,10 +71,4 @@ array(9) {
bool(false)
["uri"]=>
string(%d) "zip://%stest_with_comment.zip#foo"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
diff --git a/ext/zip/zip_stream.c b/ext/zip/zip_stream.c
index 3ae3e34f13..a088985198 100644
--- a/ext/zip/zip_stream.c
+++ b/ext/zip/zip_stream.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,13 +16,11 @@
+----------------------------------------------------------------------+
*/
-/* $Id$ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "php.h"
#if HAVE_ZIP
-#if defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3)
#include "php_streams.h"
#include "ext/standard/file.h"
@@ -61,7 +59,7 @@ static size_t php_zip_ops_read(php_stream *stream, char *buf, size_t count)
zip_error_t *err;
err = zip_file_get_error(self->zf);
stream->eof = 1;
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Zip stream error: %s", zip_error_strerror(err));
+ php_error_docref(NULL, E_WARNING, "Zip stream error: %s", zip_error_strerror(err));
zip_error_fini(err);
#endif
return 0;
@@ -357,5 +355,4 @@ php_stream_wrapper php_stream_zip_wrapper = {
NULL,
0 /* is_url */
};
-#endif /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
#endif /* HAVE_ZIP */
diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h
index b69c948523..c24f32e007 100644
--- a/ext/zlib/php_zlib.h
+++ b/ext/zlib/php_zlib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -63,6 +63,8 @@ ZEND_BEGIN_MODULE_GLOBALS(zlib)
int compression_coding;
ZEND_END_MODULE_GLOBALS(zlib);
+#define ZLIBG(v) ZEND_MODULE_GLOBALS_ACCESSOR(zlib, v)
+
php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC);
extern php_stream_ops php_stream_gzio_ops;
extern php_stream_wrapper php_stream_gzip_wrapper;
@@ -71,13 +73,6 @@ extern zend_module_entry php_zlib_module_entry;
#define zlib_module_ptr &php_zlib_module_entry
#define phpext_zlib_ptr zlib_module_ptr
-#ifdef ZTS
-# include "TSRM.h"
-# define ZLIBG(v) ZEND_TSRMG(zlib_globals_id, zend_zlib_globals *, v)
-#else
-# define ZLIBG(v) (zlib_globals.v)
-#endif
-
#endif /* PHP_ZLIB_H */
/*
diff --git a/ext/zlib/tests/gzgetss.gz b/ext/zlib/tests/gzgetss.gz
new file mode 100644
index 0000000000..f6c9f5cd10
--- /dev/null
+++ b/ext/zlib/tests/gzgetss.gz
Binary files differ
diff --git a/ext/zlib/tests/gzgetss.phpt b/ext/zlib/tests/gzgetss.phpt
new file mode 100644
index 0000000000..b0bdcb9c86
--- /dev/null
+++ b/ext/zlib/tests/gzgetss.phpt
@@ -0,0 +1,22 @@
+--TEST--
+gzgetss — Get line from gz-file pointer and strip HTML tags - function
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--SKIPIF--
+<?php
+
+<?php
+if(!extension_loaded("zlib")){die("skip - ZLIB extension not loaded");}
+?>
+--FILE--
+<?php
+$handle = gzopen(__DIR__ . '/gzgetss.gz', 'r');
+
+while (!gzeof($handle)){
+ $buffer = gzgetss($handle, 4096, "<code>");
+ print($buffer);
+}
+gzclose($handle);
+?>
+--EXPECT--
+<code>stringgzgetss(resource $zp, int $length [, string $allowable_tags ]);<code/> \ No newline at end of file
diff --git a/ext/zlib/tests/gzgetss.test b/ext/zlib/tests/gzgetss.test
new file mode 100644
index 0000000000..37df4858df
--- /dev/null
+++ b/ext/zlib/tests/gzgetss.test
@@ -0,0 +1,5 @@
+<div>
+ <p class="para rdfs-comment">
+ <code><span class="type">string</span><span class="methodname"><strong>gzgetss</strong></span>(resource $zp, int $length [, string $allowable_tags ]);<code/>
+ </p>
+</div> \ No newline at end of file
diff --git a/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt b/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt
index 2f76b46d96..a9d208eeaa 100644
--- a/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt
+++ b/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt
@@ -25,6 +25,12 @@ gzclose($h);
--EXPECTF--
no wrapper
array(7) {
+ ["timed_out"]=>
+ bool(false)
+ ["blocked"]=>
+ bool(true)
+ ["eof"]=>
+ bool(false)
["stream_type"]=>
string(4) "ZLIB"
["mode"]=>
@@ -33,16 +39,16 @@ array(7) {
int(0)
["seekable"]=>
bool(true)
+}
+
+with wrapper
+array(9) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
-}
-
-with wrapper
-array(9) {
["wrapper_type"]=>
string(4) "ZLIB"
["stream_type"]=>
@@ -55,11 +61,5 @@ array(9) {
bool(true)
["uri"]=>
string(%d) "compress.zlib://%s/004.txt.gz"
- ["timed_out"]=>
- bool(false)
- ["blocked"]=>
- bool(true)
- ["eof"]=>
- bool(false)
}
===DONE=== \ No newline at end of file
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 2d141597ed..d9d6be1638 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -124,7 +124,6 @@ static int php_zlib_output_encoding(void)
static int php_zlib_output_handler_ex(php_zlib_context *ctx, php_output_context *output_context)
{
int flags = Z_SYNC_FLUSH;
- PHP_OUTPUT_TSRMLS(output_context);
if (output_context->op & PHP_OUTPUT_HANDLER_START) {
/* start up */
@@ -210,7 +209,6 @@ static int php_zlib_output_handler_ex(php_zlib_context *ctx, php_output_context
static int php_zlib_output_handler(void **handler_context, php_output_context *output_context)
{
php_zlib_context *ctx = *(php_zlib_context **) handler_context;
- PHP_OUTPUT_TSRMLS(output_context);
if (!php_zlib_output_encoding()) {
/* "Vary: Accept-Encoding" header sent along uncompressed content breaks caching in MSIE,
@@ -1066,7 +1064,7 @@ PHP_FUNCTION(deflate_init)
case Z_DEFAULT_STRATEGY:
break;
default:
- php_error_docref(NULL, E_WARNING, "strategy must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY", strategy);
+ php_error_docref(NULL, E_WARNING, "strategy must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY");
RETURN_FALSE;
}
@@ -1189,7 +1187,7 @@ PHP_FUNCTION(deflate_add)
#ifdef COMPILE_DL_ZLIB
#ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(php_zlib)
#endif
diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c
index c0705f8b31..8313b5bb1d 100644
--- a/ext/zlib/zlib_filter.c
+++ b/ext/zlib/zlib_filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,9 +26,9 @@
/* Passed as opaque in malloc callbacks */
typedef struct _php_zlib_filter_data {
z_stream strm;
- char *inbuf;
+ unsigned char *inbuf;
size_t inbuf_len;
- char *outbuf;
+ unsigned char *outbuf;
size_t outbuf_len;
int persistent;
zend_bool finished;
@@ -112,7 +112,8 @@ static php_stream_filter_status_t php_zlib_inflate_filter(
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
- out_bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0);
+ out_bucket = php_stream_bucket_new(
+ stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0);
php_stream_bucket_append(buckets_out, out_bucket);
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
@@ -136,7 +137,8 @@ static php_stream_filter_status_t php_zlib_inflate_filter(
if (data->strm.avail_out < data->outbuf_len) {
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
- bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0);
+ bucket = php_stream_bucket_new(
+ stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0);
php_stream_bucket_append(buckets_out, bucket);
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
@@ -226,7 +228,8 @@ static php_stream_filter_status_t php_zlib_deflate_filter(
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
- out_bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0);
+ out_bucket = php_stream_bucket_new(
+ stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0);
php_stream_bucket_append(buckets_out, out_bucket);
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
@@ -245,7 +248,8 @@ static php_stream_filter_status_t php_zlib_deflate_filter(
if (data->strm.avail_out < data->outbuf_len) {
size_t bucketlen = data->outbuf_len - data->strm.avail_out;
- bucket = php_stream_bucket_new(stream, estrndup(data->outbuf, bucketlen), bucketlen, 1, 0);
+ bucket = php_stream_bucket_new(
+ stream, estrndup((char *) data->outbuf, bucketlen), bucketlen, 1, 0);
php_stream_bucket_append(buckets_out, bucket);
data->strm.avail_out = data->outbuf_len;
data->strm.next_out = data->outbuf;
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c
index 6e63cc2641..4c67db6e39 100644
--- a/ext/zlib/zlib_fopen_wrapper.c
+++ b/ext/zlib/zlib_fopen_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/header b/header
index bd442cbb61..58e870ad9e 100644
--- a/header
+++ b/header
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/SAPI.c b/main/SAPI.c
index f14638a22f..496bbfbd12 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -43,12 +43,6 @@
#include "rfc1867.h"
-#ifdef PHP_WIN32
-#define STRCASECMP stricmp
-#else
-#define STRCASECMP strcasecmp
-#endif
-
#include "php_content_types.h"
#ifdef ZTS
@@ -148,14 +142,14 @@ PHP_FUNCTION(header_register_callback)
}
/* }}} */
-static void sapi_run_header_callback(void)
+static void sapi_run_header_callback(zval *callback)
{
int error;
zend_fcall_info fci;
char *callback_error = NULL;
zval retval;
- if (zend_fcall_info_init(&SG(callback_func), 0, &fci, &SG(fci_cache), NULL, &callback_error) == SUCCESS) {
+ if (zend_fcall_info_init(callback, 0, &fci, &SG(fci_cache), NULL, &callback_error) == SUCCESS) {
fci.retval = &retval;
error = zend_call_function(&fci, &SG(fci_cache));
@@ -285,7 +279,12 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
read_bytes = sapi_read_post_block(buffer, SAPI_POST_BLOCK_SIZE);
if (read_bytes > 0) {
- php_stream_write(SG(request_info).request_body, buffer, read_bytes);
+ if (php_stream_write(SG(request_info).request_body, buffer, read_bytes) != read_bytes) {
+ /* if parts of the stream can't be written, purge it completely */
+ php_stream_truncate_set_size(SG(request_info).request_body, 0);
+ php_error_docref(NULL, E_WARNING, "POST data can't be buffered; all data discarded");
+ break;
+ }
}
if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) {
@@ -447,7 +446,6 @@ SAPI_API void sapi_activate(void)
SG(sapi_headers).http_status_line = NULL;
SG(sapi_headers).mimetype = NULL;
SG(headers_sent) = 0;
- SG(callback_run) = 0;
ZVAL_UNDEF(&SG(callback_func));
SG(read_post_bytes) = 0;
SG(request_info).request_body = NULL;
@@ -544,8 +542,6 @@ SAPI_API void sapi_deactivate(void)
sapi_send_headers_free();
SG(sapi_started) = 0;
SG(headers_sent) = 0;
- SG(callback_run) = 0;
- zval_ptr_dtor(&SG(callback_func));
SG(request_info).headers_read = 0;
SG(global_request_time) = 0;
}
@@ -773,7 +769,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
colon_offset = strchr(header_line, ':');
if (colon_offset) {
*colon_offset = 0;
- if (!STRCASECMP(header_line, "Content-Type")) {
+ if (!strcasecmp(header_line, "Content-Type")) {
char *ptr = colon_offset+1, *mimetype = NULL, *newheader;
size_t len = header_line_len - (ptr - header_line), newlen;
while (*ptr == ' ') {
@@ -805,7 +801,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
}
efree(mimetype);
SG(sapi_headers).send_default_content_type = 0;
- } else if (!STRCASECMP(header_line, "Content-Length")) {
+ } else if (!strcasecmp(header_line, "Content-Length")) {
/* Script is setting Content-length. The script cannot reasonably
* know the size of the message body after compression, so it's best
* do disable compression altogether. This contributes to making scripts
@@ -815,7 +811,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
zend_alter_ini_entry_chars(key,
"0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
zend_string_release(key);
- } else if (!STRCASECMP(header_line, "Location")) {
+ } else if (!strcasecmp(header_line, "Location")) {
if ((SG(sapi_headers).http_response_code < 300 ||
SG(sapi_headers).http_response_code > 399) &&
SG(sapi_headers).http_response_code != 201) {
@@ -831,7 +827,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
sapi_update_response_code(302);
}
}
- } else if (!STRCASECMP(header_line, "WWW-Authenticate")) { /* HTTP Authentication */
+ } else if (!strcasecmp(header_line, "WWW-Authenticate")) { /* HTTP Authentication */
sapi_update_response_code(401); /* authentication-required */
}
if (sapi_header.header==header_line) {
@@ -852,7 +848,7 @@ SAPI_API int sapi_send_headers(void)
int retval;
int ret = FAILURE;
- if (SG(headers_sent) || SG(request_info).no_headers || SG(callback_run)) {
+ if (SG(headers_sent) || SG(request_info).no_headers) {
return SUCCESS;
}
@@ -860,21 +856,33 @@ SAPI_API int sapi_send_headers(void)
* in case of an error situation.
*/
if (SG(sapi_headers).send_default_content_type && sapi_module.send_headers) {
- sapi_header_struct default_header;
- uint len;
-
- SG(sapi_headers).mimetype = get_default_content_type(0, &len);
- default_header.header_len = sizeof("Content-type: ") - 1 + len;
- default_header.header = emalloc(default_header.header_len + 1);
- memcpy(default_header.header, "Content-type: ", sizeof("Content-type: ") - 1);
- memcpy(default_header.header + sizeof("Content-type: ") - 1, SG(sapi_headers).mimetype, len + 1);
- sapi_header_add_op(SAPI_HEADER_ADD, &default_header);
+ uint len = 0;
+ char *default_mimetype = get_default_content_type(0, &len);
+
+ if (default_mimetype && len) {
+ sapi_header_struct default_header;
+
+ SG(sapi_headers).mimetype = default_mimetype;
+
+ default_header.header_len = sizeof("Content-type: ") - 1 + len;
+ default_header.header = emalloc(default_header.header_len + 1);
+
+ memcpy(default_header.header, "Content-type: ", sizeof("Content-type: ") - 1);
+ memcpy(default_header.header + sizeof("Content-type: ") - 1, SG(sapi_headers).mimetype, len + 1);
+
+ sapi_header_add_op(SAPI_HEADER_ADD, &default_header);
+ } else {
+ efree(default_mimetype);
+ }
SG(sapi_headers).send_default_content_type = 0;
}
- if (Z_TYPE(SG(callback_func)) != IS_UNDEF && !SG(callback_run)) {
- SG(callback_run) = 1;
- sapi_run_header_callback();
+ if (Z_TYPE(SG(callback_func)) != IS_UNDEF) {
+ zval cb;
+ ZVAL_COPY_VALUE(&cb, &SG(callback_func));
+ ZVAL_UNDEF(&SG(callback_func));
+ sapi_run_header_callback(&cb);
+ zval_ptr_dtor(&cb);
}
SG(headers_sent) = 1;
diff --git a/main/SAPI.h b/main/SAPI.h
index 67ee50dec2..e8eae2f106 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -136,7 +136,6 @@ typedef struct _sapi_globals_struct {
HashTable known_post_content_types;
zval callback_func;
zend_fcall_info_cache fci_cache;
- zend_bool callback_run;
} sapi_globals_struct;
diff --git a/main/build-defs.h.in b/main/build-defs.h.in
index 6821b631f5..0ee7174985 100644
--- a/main/build-defs.h.in
+++ b/main/build-defs.h.in
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/fastcgi.c b/main/fastcgi.c
index cd8ca4523c..8fc7d6a968 100644
--- a/main/fastcgi.c
+++ b/main/fastcgi.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -692,7 +692,7 @@ int fcgi_listen(const char *path, int backlog)
if(strlen(host) > MAXFQDNLEN) {
hep = NULL;
} else {
- hep = gethostbyname(host);
+ hep = php_network_gethostbyname(host);
}
if (!hep || hep->h_addrtype != AF_INET || !hep->h_addr_list[0]) {
fcgi_log(FCGI_ERROR, "Cannot resolve host name '%s'!\n", host);
@@ -1049,7 +1049,12 @@ static int fcgi_read_request(fcgi_request *req)
req->in_len = 0;
req->out_hdr = NULL;
req->out_pos = req->out_buf;
- req->has_env = 1;
+
+ if (req->has_env) {
+ fcgi_hash_clean(&req->env);
+ } else {
+ req->has_env = 1;
+ }
if (safe_read(req, &hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) ||
hdr.version < FCGI_VERSION_1) {
@@ -1277,21 +1282,21 @@ void fcgi_close(fcgi_request *req, int force, int destroy)
DisconnectNamedPipe(pipe);
} else {
if (!force) {
- fcgi_header buf;
+ char buf[8];
shutdown(req->fd, 1);
- /* read the last FCGI_STDIN header (it may be omitted) */
- recv(req->fd, (char *)(&buf), sizeof(buf), 0);
+ /* read any remaining data, it may be omitted */
+ while (recv(req->fd, buf, sizeof(buf), 0) > 0) {}
}
closesocket(req->fd);
}
#else
if (!force) {
- fcgi_header buf;
+ char buf[8];
shutdown(req->fd, 1);
- /* read the last FCGI_STDIN header (it may be omitted) */
- recv(req->fd, (char *)(&buf), sizeof(buf), 0);
+ /* read any remaining data, it may be omitted */
+ while (recv(req->fd, buf, sizeof(buf), 0) > 0) {}
}
close(req->fd);
#endif
diff --git a/main/fastcgi.h b/main/fastcgi.h
index df7d9ed314..c45a4e4835 100644
--- a/main/fastcgi.h
+++ b/main/fastcgi.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 09a07f4f6f..c3646ee0fd 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -505,6 +505,13 @@ PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length,
(IS_SLASH(filename[1]) ||
((filename[1] == '.') && IS_SLASH(filename[2])))) ||
IS_ABSOLUTE_PATH(filename, filename_length) ||
+#if PHP_WIN32
+ /* This should count as an absolute local path as well, however
+ IS_ABSOLUTE_PATH doesn't care about this path form till now. It
+ might be a big thing to extend, thus just a local handling for
+ now. */
+ filename_length >=2 && IS_SLASH(filename[0]) && !IS_SLASH(filename[1]) ||
+#endif
!path ||
!*path) {
if (tsrm_realpath(filename, resolved_path)) {
@@ -640,7 +647,7 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c
if ((*filename == '.')
/* Absolute path open */
|| IS_ABSOLUTE_PATH(filename, filename_length)
- || (!path || (path && !*path))
+ || (!path || !*path)
) {
return php_fopen_and_set_opened_path(filename, mode, opened_path);
}
diff --git a/main/fopen_wrappers.h b/main/fopen_wrappers.h
index e693b03dba..e9f5159fcd 100644
--- a/main/fopen_wrappers.h
+++ b/main/fopen_wrappers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,15 +34,8 @@ PHPAPI int php_check_open_basedir(const char *path);
PHPAPI int php_check_open_basedir_ex(const char *path, int warn);
PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path);
-/* {{{ OPENBASEDIR_CHECKPATH(filename) to ease merge between 6.x and 5.x */
-#if PHP_API_VERSION < 20100412
-# define OPENBASEDIR_CHECKPATH(filename) \
- (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename)
-#else
-#define OPENBASEDIR_CHECKPATH(filename) \
- php_check_open_basedir(filename)
-#endif
-/* }}} */
+/* OPENBASEDIR_CHECKPATH(filename) to ease merge between 6.x and 5.x */
+#define OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)
PHPAPI int php_check_safe_mode_include_dir(const char *path);
diff --git a/main/getopt.c b/main/getopt.c
index 4174ec21f2..cc88bd100a 100644
--- a/main/getopt.c
+++ b/main/getopt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/http_status_codes.h b/main/http_status_codes.h
index 4567fb4f3d..2c7477e66b 100644
--- a/main/http_status_codes.h
+++ b/main/http_status_codes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -66,6 +66,7 @@ static http_response_status_code_pair http_status_map[] = {
{ 428, "Precondition Required" },
{ 429, "Too Many Requests" },
{ 431, "Request Header Fields Too Large" },
+ { 451, "Unavailable For Legal Reasons"},
{ 500, "Internal Server Error" },
{ 501, "Not Implemented" },
{ 502, "Bad Gateway" },
diff --git a/main/internal_functions.c.in b/main/internal_functions.c.in
index d04eea3103..5cefe7d30e 100644
--- a/main/internal_functions.c.in
+++ b/main/internal_functions.c.in
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/internal_functions_nw.c b/main/internal_functions_nw.c
index 9d5db7d843..75e19ced10 100644
--- a/main/internal_functions_nw.c
+++ b/main/internal_functions_nw.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c
index 45baf802c0..d64d9e82fb 100644
--- a/main/internal_functions_win32.c
+++ b/main/internal_functions_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -97,9 +97,6 @@
#if HAVE_XML && HAVE_WDDX
#include "ext/wddx/php_wddx.h"
#endif
-#ifdef HAVE_SQLITE
-#include "ext/sqlite/php_sqlite.h"
-#endif
#include "ext/com_dotnet/php_com_dotnet.h"
#ifdef HAVE_SPL
#include "ext/spl/php_spl.h"
@@ -172,9 +169,6 @@ static zend_module_entry *php_builtin_extensions[] = {
#if HAVE_XML && HAVE_WDDX
,phpext_wddx_ptr
#endif
-#if HAVE_SQLITE
- ,phpext_sqlite_ptr
-#endif
#if HAVE_SPL
,phpext_spl_ptr
#endif
diff --git a/main/main.c b/main/main.c
index 26b2531724..cc4b30b462 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -572,7 +572,7 @@ PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("user_ini.filename", ".user.ini", PHP_INI_SYSTEM, OnUpdateString, user_ini_filename, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("user_ini.cache_ttl", "300", PHP_INI_SYSTEM, OnUpdateLong, user_ini_cache_ttl, php_core_globals, core_globals)
- STD_PHP_INI_BOOLEAN("exit_on_timeout", "0", PHP_INI_ALL, OnUpdateBool, exit_on_timeout, php_core_globals, core_globals)
+ STD_PHP_INI_ENTRY("hard_timeout", "2", PHP_INI_SYSTEM, OnUpdateLong, hard_timeout, zend_executor_globals, executor_globals)
#ifdef PHP_WIN32
STD_PHP_INI_BOOLEAN("windows.show_crt_warning", "0", PHP_INI_ALL, OnUpdateBool, windows_show_crt_warning, php_core_globals, core_globals)
#endif
@@ -607,9 +607,9 @@ PHPAPI int php_get_module_initialized(void)
}
/* }}} */
-/* {{{ php_log_err
+/* {{{ php_log_err_with_severity
*/
-PHPAPI void php_log_err(char *log_message)
+PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int)
{
int fd = -1;
time_t error_time;
@@ -624,7 +624,7 @@ PHPAPI void php_log_err(char *log_message)
if (PG(error_log) != NULL) {
#ifdef HAVE_SYSLOG_H
if (!strcmp(PG(error_log), "syslog")) {
- php_syslog(LOG_NOTICE, "%s", log_message);
+ php_syslog(syslog_type_int, "%s", log_message);
PG(in_error_log) = 0;
return;
}
@@ -703,7 +703,7 @@ PHPAPI size_t php_printf(const char *format, ...)
* html error messages if correcponding ini setting (html_errors) is activated.
* See: CODING_STANDARDS for details.
*/
-PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args)
+PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args)
{
zend_string *replace_buffer = NULL, *replace_origin = NULL;
char *buffer = NULL, *docref_buf = NULL, *target = NULL;
@@ -723,9 +723,20 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
if (PG(html_errors)) {
replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, NULL);
+ /* Retry with substituting invalid chars on fail. */
+ if (!replace_buffer || ZSTR_LEN(replace_buffer) < 1) {
+ replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT | ENT_HTML_SUBSTITUTE_ERRORS, NULL);
+ }
+
efree(buffer);
- buffer = ZSTR_VAL(replace_buffer);
- buffer_len = (int)ZSTR_LEN(replace_buffer);
+
+ if (replace_buffer) {
+ buffer = ZSTR_VAL(replace_buffer);
+ buffer_len = (int)ZSTR_LEN(replace_buffer);
+ } else {
+ buffer = "";
+ buffer_len = 0;
+ }
}
/* which function caused the problem if any at all */
@@ -878,7 +889,9 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
if (replace_buffer) {
zend_string_free(replace_buffer);
} else {
- efree(buffer);
+ if (buffer_len > 0) {
+ efree(buffer);
+ }
}
php_error(type, "%s", message);
@@ -888,7 +901,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
/* {{{ php_error_docref0 */
/* See: CODING_STANDARDS for details. */
-PHPAPI void php_error_docref0(const char *docref, int type, const char *format, ...)
+PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...)
{
va_list args;
@@ -900,7 +913,7 @@ PHPAPI void php_error_docref0(const char *docref, int type, const char *format,
/* {{{ php_error_docref1 */
/* See: CODING_STANDARDS for details. */
-PHPAPI void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
+PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
{
va_list args;
@@ -912,7 +925,7 @@ PHPAPI void php_error_docref1(const char *docref, const char *param1, int type,
/* {{{ php_error_docref2 */
/* See: CODING_STANDARDS for details. */
-PHPAPI void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
+PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
{
char *params;
va_list args;
@@ -929,7 +942,7 @@ PHPAPI void php_error_docref2(const char *docref, const char *param1, const char
#ifdef PHP_WIN32
#define PHP_WIN32_ERROR_MSG_BUFFER_SIZE 512
-PHPAPI void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2) {
+PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2) {
if (error == 0) {
php_error_docref2(NULL, param1, param2, E_WARNING, "%s", strerror(errno));
} else {
@@ -957,7 +970,7 @@ PHPAPI void php_html_puts(const char *str, size_t size)
/* {{{ php_error_cb
extended error handling function */
-static void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
+static ZEND_COLD void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
{
char *buffer;
int buffer_len, display;
@@ -982,20 +995,16 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
/* store the error if it has changed */
if (display) {
-#ifdef ZEND_SIGNALS
- HANDLE_BLOCK_INTERRUPTIONS();
-#endif
if (PG(last_error_message)) {
- free(PG(last_error_message));
+ char *s = PG(last_error_message);
PG(last_error_message) = NULL;
+ free(s);
}
if (PG(last_error_file)) {
- free(PG(last_error_file));
+ char *s = PG(last_error_file);
PG(last_error_file) = NULL;
+ free(s);
}
-#ifdef ZEND_SIGNALS
- HANDLE_UNBLOCK_INTERRUPTIONS();
-#endif
if (!error_filename) {
error_filename = "Unknown";
}
@@ -1040,6 +1049,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
if (display && (EG(error_reporting) & type || (type & E_CORE))
&& (PG(log_errors) || PG(display_errors) || (!module_initialized))) {
char *error_type_str;
+ int syslog_type_int = LOG_NOTICE;
switch (type) {
case E_ERROR:
@@ -1047,29 +1057,36 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
case E_COMPILE_ERROR:
case E_USER_ERROR:
error_type_str = "Fatal error";
+ syslog_type_int = LOG_ERR;
break;
case E_RECOVERABLE_ERROR:
error_type_str = "Catchable fatal error";
+ syslog_type_int = LOG_ERR;
break;
case E_WARNING:
case E_CORE_WARNING:
case E_COMPILE_WARNING:
case E_USER_WARNING:
error_type_str = "Warning";
+ syslog_type_int = LOG_WARNING;
break;
case E_PARSE:
error_type_str = "Parse error";
+ syslog_type_int = LOG_EMERG;
break;
case E_NOTICE:
case E_USER_NOTICE:
error_type_str = "Notice";
+ syslog_type_int = LOG_NOTICE;
break;
case E_STRICT:
error_type_str = "Strict Standards";
+ syslog_type_int = LOG_INFO;
break;
case E_DEPRECATED:
case E_USER_DEPRECATED:
error_type_str = "Deprecated";
+ syslog_type_int = LOG_INFO;
break;
default:
error_type_str = "Unknown error";
@@ -1084,7 +1101,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
}
#endif
spprintf(&log_buffer, 0, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno);
- php_log_err(log_buffer);
+ php_log_err_with_severity(log_buffer, syslog_type_int);
efree(log_buffer);
}
@@ -1411,7 +1428,7 @@ static void php_free_request_globals(void)
/* {{{ php_message_handler_for_zend
*/
-static void php_message_handler_for_zend(zend_long message, const void *data)
+static ZEND_COLD void php_message_handler_for_zend(zend_long message, const void *data)
{
switch (message) {
case ZMSG_FAILED_INCLUDE_FOPEN:
@@ -1496,8 +1513,6 @@ static void php_message_handler_for_zend(zend_long message, const void *data)
void php_on_timeout(int seconds)
{
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
- zend_set_timeout(EG(timeout_seconds), 1);
- if(PG(exit_on_timeout)) sapi_terminate_process();
}
#if PHP_SIGCHILD
@@ -1557,6 +1572,9 @@ int php_request_startup(void)
#endif /* HAVE_DTRACE */
#ifdef PHP_WIN32
+# if defined(ZTS)
+ _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
+# endif
PG(com_initialized) = 0;
#endif
@@ -1700,6 +1718,9 @@ void php_request_shutdown_for_hook(void *dummy)
if (PG(modules_activated)) {
zend_deactivate_modules();
+ }
+
+ if (PG(modules_activated)) {
php_free_shutdown_functions();
}
@@ -1790,7 +1811,6 @@ void php_request_shutdown(void *dummy)
/* 5. Call all extensions RSHUTDOWN functions */
if (PG(modules_activated)) {
zend_deactivate_modules();
- php_free_shutdown_functions();
}
/* 6. Shutdown output layer (send the set HTTP headers, cleanup output handlers, etc.) */
@@ -1798,7 +1818,12 @@ void php_request_shutdown(void *dummy)
php_output_deactivate();
} zend_end_try();
- /* 7. Destroy super-globals */
+ /* 7. Free shutdown functions */
+ if (PG(modules_activated)) {
+ php_free_shutdown_functions();
+ }
+
+ /* 8. Destroy super-globals */
zend_try {
int i;
@@ -1807,37 +1832,37 @@ void php_request_shutdown(void *dummy)
}
} zend_end_try();
- /* 8. free request-bound globals */
+ /* 9. free request-bound globals */
php_free_request_globals();
- /* 9. Shutdown scanner/executor/compiler and restore ini entries */
+ /* 10. Shutdown scanner/executor/compiler and restore ini entries */
zend_deactivate();
- /* 10. Call all extensions post-RSHUTDOWN functions */
+ /* 11. Call all extensions post-RSHUTDOWN functions */
zend_try {
zend_post_deactivate_modules();
} zend_end_try();
- /* 11. SAPI related shutdown (free stuff) */
+ /* 12. SAPI related shutdown (free stuff) */
zend_try {
sapi_deactivate();
} zend_end_try();
- /* 12. free virtual CWD memory */
+ /* 13. free virtual CWD memory */
virtual_cwd_deactivate();
- /* 13. Destroy stream hashes */
+ /* 14. Destroy stream hashes */
zend_try {
php_shutdown_stream_hashes();
} zend_end_try();
- /* 14. Free Willy (here be crashes) */
+ /* 15. Free Willy (here be crashes) */
zend_interned_strings_restore();
zend_try {
shutdown_memory_manager(CG(unclean_shutdown) || !report_memleaks, 0);
} zend_end_try();
- /* 15. Reset max_execution_time */
+ /* 16. Reset max_execution_time */
zend_try {
zend_unset_timeout();
} zend_end_try();
diff --git a/main/network.c b/main/network.c
index c08194bcd6..aedff7e207 100644
--- a/main/network.c
+++ b/main/network.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -245,16 +245,15 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
freeaddrinfo(res);
#else
if (!inet_aton(host, &in)) {
- /* XXX NOT THREAD SAFE (is safe under win32) */
if(strlen(host) > MAXFQDNLEN) {
host_info = NULL;
errno = E2BIG;
} else {
- host_info = gethostbyname(host);
+ host_info = php_network_gethostbyname(host);
}
if (host_info == NULL) {
if (error_string) {
- error_string = strpprintf(0, "php_network_getaddresses: gethostbyname failed. errno=%d", errno);
+ *error_string = strpprintf(0, "php_network_getaddresses: gethostbyname failed. errno=%d", errno);
php_error_docref(NULL, E_WARNING, "%s", ZSTR_VAL(*error_string));
} else {
php_error_docref(NULL, E_WARNING, "php_network_getaddresses: gethostbyname failed");
@@ -472,6 +471,12 @@ php_socket_t php_network_bind_socket_to_local_addr(const char *host, unsigned po
#ifdef SO_REUSEADDR
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char*)&sockoptval, sizeof(sockoptval));
#endif
+#ifdef IPV6_V6ONLY
+ if (sockopts & STREAM_SOCKOP_IPV6_V6ONLY) {
+ int ipv6_val = !!(sockopts & STREAM_SOCKOP_IPV6_V6ONLY_ENABLED);
+ setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6_val, sizeof(sockoptval));
+ }
+#endif
#ifdef SO_REUSEPORT
if (sockopts & STREAM_SOCKOP_SO_REUSEPORT) {
setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (char*)&sockoptval, sizeof(sockoptval));
@@ -482,6 +487,11 @@ php_socket_t php_network_bind_socket_to_local_addr(const char *host, unsigned po
setsockopt(sock, SOL_SOCKET, SO_BROADCAST, (char*)&sockoptval, sizeof(sockoptval));
}
#endif
+#ifdef TCP_NODELAY
+ if (sockopts & STREAM_SOCKOP_TCP_NODELAY) {
+ setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&sockoptval, sizeof(sockoptval));
+ }
+#endif
n = bind(sock, sa, socklen);
@@ -721,7 +731,8 @@ PHPAPI php_socket_t php_network_accept_incoming(php_socket_t srvsock,
socklen_t *addrlen,
struct timeval *timeout,
zend_string **error_string,
- int *error_code
+ int *error_code,
+ int tcp_nodelay
)
{
php_socket_t clisock = -1;
@@ -745,6 +756,11 @@ PHPAPI php_socket_t php_network_accept_incoming(php_socket_t srvsock,
textaddr,
addr, addrlen
);
+ if (tcp_nodelay) {
+#ifdef TCP_NODELAY
+ setsockopt(clisock, IPPROTO_TCP, TCP_NODELAY, (char*)&tcp_nodelay, sizeof(tcp_nodelay));
+#endif
+ }
} else {
error = php_socket_errno();
}
@@ -762,7 +778,6 @@ PHPAPI php_socket_t php_network_accept_incoming(php_socket_t srvsock,
/* }}} */
-
/* Connect to a remote host using an interruptible connect with optional timeout.
* Optionally, the connect can be made asynchronously, which will implicitly
* enable non-blocking mode on the socket.
@@ -897,6 +912,15 @@ skip_bind:
}
}
#endif
+
+#ifdef TCP_NODELAY
+ {
+ int val = 1;
+ if (sockopts & STREAM_SOCKOP_TCP_NODELAY) {
+ setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&val, sizeof(val));
+ }
+ }
+#endif
n = php_network_connect_socket(sock, sa, socklen, asynchronous,
timeout ? &working_timeout : NULL,
error_string, error_code);
@@ -1251,9 +1275,95 @@ PHPAPI int php_poll2(php_pollfd *ufds, unsigned int nfds, int timeout)
}
return n;
}
+#endif
+
+#if defined(HAVE_GETHOSTBYNAME_R)
+#ifdef HAVE_FUNC_GETHOSTBYNAME_R_6
+struct hostent * gethostname_re (const char *host,struct hostent *hostbuf,char **tmphstbuf,size_t *hstbuflen)
+{
+ struct hostent *hp;
+ int herr,res;
+
+ if (*hstbuflen == 0) {
+ *hstbuflen = 1024;
+ *tmphstbuf = (char *)malloc (*hstbuflen);
+ }
+
+ while (( res =
+ gethostbyname_r(host,hostbuf,*tmphstbuf,*hstbuflen,&hp,&herr))
+ && (errno == ERANGE)) {
+ /* Enlarge the buffer. */
+ *hstbuflen *= 2;
+ *tmphstbuf = (char *)realloc (*tmphstbuf,*hstbuflen);
+ }
+
+ if (res != SUCCESS) {
+ return NULL;
+ }
+
+ return hp;
+}
+#endif
+#ifdef HAVE_FUNC_GETHOSTBYNAME_R_5
+struct hostent * gethostname_re (const char *host,struct hostent *hostbuf,char **tmphstbuf,size_t *hstbuflen)
+{
+ struct hostent *hp;
+ int herr;
+
+ if (*hstbuflen == 0) {
+ *hstbuflen = 1024;
+ *tmphstbuf = (char *)malloc (*hstbuflen);
+ }
+ while ((NULL == ( hp =
+ gethostbyname_r(host,hostbuf,*tmphstbuf,*hstbuflen,&herr)))
+ && (errno == ERANGE)) {
+ /* Enlarge the buffer. */
+ *hstbuflen *= 2;
+ *tmphstbuf = (char *)realloc (*tmphstbuf,*hstbuflen);
+ }
+ return hp;
+}
#endif
+#ifdef HAVE_FUNC_GETHOSTBYNAME_R_3
+struct hostent * gethostname_re (const char *host,struct hostent *hostbuf,char **tmphstbuf,size_t *hstbuflen)
+{
+ if (*hstbuflen == 0) {
+ *hstbuflen = sizeof(struct hostent_data);
+ *tmphstbuf = (char *)malloc (*hstbuflen);
+ } else {
+ if (*hstbuflen < sizeof(struct hostent_data)) {
+ *hstbuflen = sizeof(struct hostent_data);
+ *tmphstbuf = (char *)realloc(*tmphstbuf, *hstbuflen);
+ }
+ }
+ memset((void *)(*tmphstbuf),0,*hstbuflen);
+
+ if (SUCCESS != gethostbyname_r(host,hostbuf,(struct hostent_data *)*tmphstbuf)) {
+ return NULL;
+ }
+ return hostbuf;
+}
+#endif
+#endif
+
+PHPAPI struct hostent* php_network_gethostbyname(char *name) {
+#if !defined(HAVE_GETHOSTBYNAME_R)
+ return gethostbyname(name);
+#else
+ if (FG(tmp_host_buf)) {
+ free(FG(tmp_host_buf));
+ }
+
+ FG(tmp_host_buf) = NULL;
+ FG(tmp_host_buf_len) = 0;
+
+ memset(&FG(tmp_host_info), 0, sizeof(struct hostent));
+
+ return gethostname_re(name, &FG(tmp_host_info), &FG(tmp_host_buf), &FG(tmp_host_buf_len));
+#endif
+}
/*
* Local variables:
diff --git a/main/output.c b/main/output.c
index 5c56fe98cd..2a51100960 100644
--- a/main/output.c
+++ b/main/output.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -665,7 +665,7 @@ PHPAPI int php_output_handler_alias_register(const char *name, size_t name_len,
}
/* }}} */
-/* {{{ SUCCESS|FAILURE php_output_handler_hook(php_output_handler_hook_t type, void *arg TSMRLS_DC)
+/* {{{ SUCCESS|FAILURE php_output_handler_hook(php_output_handler_hook_t type, void *arg)
* Output handler hook for output handler functions to check/modify the current handlers abilities */
PHPAPI int php_output_handler_hook(php_output_handler_hook_t type, void *arg)
{
@@ -715,7 +715,7 @@ PHPAPI void php_output_handler_dtor(php_output_handler *handler)
}
/* }}} */
-/* {{{ void php_output_handler_free(php_output_handler **handler TSMRLS_DC)
+/* {{{ void php_output_handler_free(php_output_handler **handler)
* Destroy and free an output handler */
PHPAPI void php_output_handler_free(php_output_handler **h)
{
@@ -763,7 +763,7 @@ static inline int php_output_lock_error(int op)
if (op && OG(active) && OG(running)) {
/* fatal error */
php_output_deactivate();
- php_error_docref("ref.outcontrol", E_RECOVERABLE_ERROR, "Cannot use output buffering in output buffering display handlers");
+ php_error_docref("ref.outcontrol", E_ERROR, "Cannot use output buffering in output buffering display handlers");
return 1;
}
return 0;
@@ -909,7 +909,6 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
{
php_output_handler_status_t status;
int original_op = context->op;
- PHP_OUTPUT_TSRMLS(context);
#if PHP_OUTPUT_DEBUG
fprintf(stderr, ">>> op(%d, "
@@ -1249,7 +1248,6 @@ static inline int php_output_stack_pop(int flags)
static int php_output_handler_compat_func(void **handler_context, php_output_context *output_context)
{
php_output_handler_func_t func = *(php_output_handler_func_t *) handler_context;
- PHP_OUTPUT_TSRMLS(output_context);
if (func) {
char *out_str = NULL;
diff --git a/main/php.h b/main/php.h
index 1d2c2dc099..ed6a4d7189 100644
--- a/main/php.h
+++ b/main/php.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,7 +26,7 @@
#include <dmalloc.h>
#endif
-#define PHP_API_VERSION 20131218
+#define PHP_API_VERSION 20151012
#define PHP_HAVE_STREAMS
#define YYDEBUG 0
#define PHP_DEFAULT_CHARSET "UTF-8"
@@ -257,11 +257,7 @@ END_EXTERN_C()
# endif
#endif
-#if defined(__GNUC__) && __GNUC__ >= 4
-# define php_ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
-#else
-# define php_ignore_value(x) ((void) (x))
-#endif
+#define php_ignore_value(x) ZEND_IGNORE_VALUE(x)
/* global variables */
#if !defined(PHP_WIN32)
@@ -284,7 +280,13 @@ PHPAPI size_t php_write(void *buf, size_t size);
PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1,
2);
PHPAPI int php_get_module_initialized(void);
-PHPAPI void php_log_err(char *log_message);
+#ifdef HAVE_SYSLOG_H
+#include "php_syslog.h"
+#define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE)
+#else
+#define php_log_err(msg) php_log_err_with_severity(msg, 5)
+#endif
+PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int);
int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2);
int cfgparse(void);
END_EXTERN_C()
@@ -299,23 +301,17 @@ static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handli
}
static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
-PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0);
-
-#ifdef ZTS
-#define PHP_ATTR_FMT_OFFSET 1
-#else
-#define PHP_ATTR_FMT_OFFSET 0
-#endif
+PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0);
/* PHPAPI void php_error(int type, const char *format, ...); */
-PHPAPI void php_error_docref0(const char *docref, int type, const char *format, ...)
- PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4);
-PHPAPI void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
- PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5);
-PHPAPI void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
- PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6);
+PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...)
+ PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
+PHPAPI ZEND_COLD void php_error_docref1(const char *docref, const char *param1, int type, const char *format, ...)
+ PHP_ATTRIBUTE_FORMAT(printf, 4, 5);
+PHPAPI ZEND_COLD void php_error_docref2(const char *docref, const char *param1, const char *param2, int type, const char *format, ...)
+ PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
#ifdef PHP_WIN32
-PHPAPI void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2);
+PHPAPI ZEND_COLD void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2);
#endif
END_EXTERN_C()
@@ -334,7 +330,7 @@ END_EXTERN_C()
BEGIN_EXTERN_C()
PHPAPI extern int (*php_register_internal_extensions_func)(void);
PHPAPI int php_register_internal_extensions(void);
-PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void *));
+PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *));
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);
PHPAPI void php_com_initialize(void);
PHPAPI char *php_get_current_user(void);
diff --git a/main/php_compat.h b/main/php_compat.h
index d4a9efc114..a73f8e3559 100644
--- a/main/php_compat.h
+++ b/main/php_compat.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_content_types.c b/main/php_content_types.c
index 7b80813040..51b18c424d 100644
--- a/main/php_content_types.c
+++ b/main/php_content_types.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_content_types.h b/main/php_content_types.h
index eeca8da39a..1b9f070bbc 100644
--- a/main/php_content_types.h
+++ b/main/php_content_types.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_getopt.h b/main/php_getopt.h
index 9437c51d07..d84ba18ed9 100644
--- a/main/php_getopt.h
+++ b/main/php_getopt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_globals.h b/main/php_globals.h
index 315e3b7830..e50ea2ebfb 100644
--- a/main/php_globals.h
+++ b/main/php_globals.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -147,7 +147,6 @@ struct _php_core_globals {
char *disable_functions;
char *disable_classes;
zend_bool allow_url_include;
- zend_bool exit_on_timeout;
#ifdef PHP_WIN32
zend_bool com_initialized;
#endif
diff --git a/main/php_ini.c b/main/php_ini.c
index ac79e60879..d056f51edd 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -421,7 +421,7 @@ int php_init_config(void)
SetLastError(0);
- /*If the given bugger is not large enough to hold the data, the return value is
+ /*If the given buffer is not large enough to hold the data, the return value is
the buffer size, in characters, required to hold the string and its terminating
null character. We use this return value to alloc the final buffer. */
size = GetEnvironmentVariableA("PHPRC", &dummybuf, 0);
@@ -553,7 +553,6 @@ int php_init_config(void)
fh.handle.fp = VCWD_FOPEN(php_ini_file_name, "r");
if (fh.handle.fp) {
fh.filename = expand_filepath(php_ini_file_name, NULL);
- opened_path = zend_string_init(fh.filename, strlen(fh.filename), 0);
}
}
}
@@ -599,6 +598,8 @@ int php_init_config(void)
zend_hash_str_update(&configuration_hash, "cfg_file_path", sizeof("cfg_file_path")-1, &tmp);
if (opened_path) {
zend_string_release(opened_path);
+ } else {
+ efree((char *)fh.filename);
}
php_ini_opened_path = zend_strndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
}
@@ -637,7 +638,7 @@ int php_init_config(void)
}
if (!debpath[0]) {
/* empty string means default builtin value
- to allow "/foo/phd.d:" or ":/foo/php.d" */
+ to allow "/foo/php.d:" or ":/foo/php.d" */
debpath = PHP_CONFIG_FILE_SCAN_DIR;
}
lenpath = (int)strlen(debpath);
diff --git a/main/php_ini.h b/main/php_ini.h
index f583208800..715e2111f1 100644
--- a/main/php_ini.h
+++ b/main/php_ini.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_main.h b/main/php_main.h
index 7caaba6ea7..69f5b3c202 100644
--- a/main/php_main.h
+++ b/main/php_main.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_memory_streams.h b/main/php_memory_streams.h
index 8db6e5323b..8db0f110f9 100644
--- a/main/php_memory_streams.h
+++ b/main/php_memory_streams.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_network.h b/main/php_network.h
index d17530208a..16e0e60255 100644
--- a/main/php_network.h
+++ b/main/php_network.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,6 +28,7 @@
#else
# undef closesocket
# define closesocket close
+# include <netinet/tcp.h>
#endif
#ifndef HAVE_SHUTDOWN
@@ -74,6 +75,10 @@ END_EXTERN_C()
#include <sys/socket.h>
#endif
+#ifdef HAVE_GETHOSTBYNAME_R
+#include <netdb.h>
+#endif
+
/* These are here, rather than with the win32 counterparts above,
* since <sys/socket.h> defines them. */
#ifndef SHUT_RD
@@ -106,9 +111,12 @@ typedef int php_socket_t;
# define SOCK_RECV_ERR -1
#endif
-#define STREAM_SOCKOP_NONE 1 << 0
-#define STREAM_SOCKOP_SO_REUSEPORT 1 << 1
-#define STREAM_SOCKOP_SO_BROADCAST 1 << 2
+#define STREAM_SOCKOP_NONE (1 << 0)
+#define STREAM_SOCKOP_SO_REUSEPORT (1 << 1)
+#define STREAM_SOCKOP_SO_BROADCAST (1 << 2)
+#define STREAM_SOCKOP_IPV6_V6ONLY (1 << 3)
+#define STREAM_SOCKOP_IPV6_V6ONLY_ENABLED (1 << 4)
+#define STREAM_SOCKOP_TCP_NODELAY (1 << 5)
/* uncomment this to debug poll(2) emulation on systems that have poll(2) */
@@ -259,7 +267,8 @@ PHPAPI php_socket_t php_network_accept_incoming(php_socket_t srvsock,
socklen_t *addrlen,
struct timeval *timeout,
zend_string **error_string,
- int *error_code
+ int *error_code,
+ int tcp_nodelay
);
PHPAPI int php_network_get_sock_name(php_socket_t sock,
@@ -307,6 +316,10 @@ PHPAPI void php_network_populate_name_from_sockaddr(
PHPAPI int php_network_parse_network_address_with_port(const char *addr,
zend_long addrlen, struct sockaddr *sa, socklen_t *sl);
+
+PHPAPI struct hostent* php_network_gethostbyname(char *name);
+
+PHPAPI int php_set_sock_blocking(php_socket_t socketd, int block);
END_EXTERN_C()
#define php_stream_sock_open_from_socket(socket, persistent) _php_stream_sock_open_from_socket((socket), (persistent) STREAMS_CC)
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index 4b8a5636b9..caddf1b390 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,6 +19,7 @@
/* $Id$ */
#include "php.h"
+#include "php_open_temporary_file.h"
#include <errno.h>
#include <sys/types.h>
@@ -249,7 +250,7 @@ PHPAPI const char* php_get_temporary_directory(void)
* This function should do its best to return a file pointer to a newly created
* unique file, on every platform.
*/
-PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, zend_string **opened_path_p, zend_bool open_basedir_check)
+PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, zend_string **opened_path_p, uint32_t flags)
{
int fd;
const char *temp_dir;
@@ -265,7 +266,7 @@ PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, zend_strin
def_tmp:
temp_dir = php_get_temporary_directory();
- if (temp_dir && *temp_dir != '\0' && (!open_basedir_check || !php_check_open_basedir(temp_dir))) {
+ if (temp_dir && *temp_dir != '\0' && (!(flags & PHP_TMP_FILE_OPEN_BASEDIR_CHECK) || !php_check_open_basedir(temp_dir))) {
return php_do_open_temporary_file(temp_dir, pfx, opened_path_p);
} else {
return -1;
@@ -276,6 +277,9 @@ def_tmp:
fd = php_do_open_temporary_file(dir, pfx, opened_path_p);
if (fd == -1) {
/* Use default temporary directory. */
+ if (!(flags & PHP_TMP_FILE_SILENT)) {
+ php_error_docref(NULL, E_NOTICE, "file created in the system's temporary directory");
+ }
goto def_tmp;
}
return fd;
diff --git a/main/php_open_temporary_file.h b/main/php_open_temporary_file.h
index 3d45fbe332..f82f577c75 100644
--- a/main/php_open_temporary_file.h
+++ b/main/php_open_temporary_file.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,9 +21,12 @@
#ifndef PHP_OPEN_TEMPORARY_FILE_H
#define PHP_OPEN_TEMPORARY_FILE_H
+#define PHP_TMP_FILE_OPEN_BASEDIR_CHECK (1<<0)
+#define PHP_TMP_FILE_SILENT (1<<1)
+
BEGIN_EXTERN_C()
PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, zend_string **opened_path_p);
-PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, zend_string **opened_path_p, zend_bool open_basedir_check);
+PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, zend_string **opened_path_p, uint32_t flags);
PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, zend_string **opened_path_p);
PHPAPI const char *php_get_temporary_directory(void);
END_EXTERN_C()
diff --git a/main/php_output.h b/main/php_output.h
index 34c344534c..5d2ea5f9e8 100644
--- a/main/php_output.h
+++ b/main/php_output.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -95,7 +95,7 @@ typedef struct _php_output_buffer {
size_t size;
size_t used;
uint free:1;
- uint _res:31;
+ uint _reserved:31;
} php_output_buffer;
typedef struct _php_output_context {
@@ -104,9 +104,6 @@ typedef struct _php_output_context {
php_output_buffer out;
} php_output_context;
-/* XXX remove this after TLS branch merge */
-#define PHP_OUTPUT_TSRMLS(ctx)
-
/* old-style, stateless callback */
typedef void (*php_output_handler_func_t)(char *output, size_t output_len, char **handled_output, size_t *handled_output_len, int mode);
/* new-style, opaque context callback */
@@ -149,7 +146,7 @@ ZEND_BEGIN_MODULE_GLOBALS(output)
int flags;
ZEND_END_MODULE_GLOBALS(output)
-PHPAPI ZEND_EXTERN_MODULE_GLOBALS(output);
+PHPAPI ZEND_EXTERN_MODULE_GLOBALS(output)
/* there should not be a need to use OG() from outside of output.c */
#ifdef ZTS
diff --git a/main/php_reentrancy.h b/main/php_reentrancy.h
index 2240d634a1..6eb838c230 100644
--- a/main/php_reentrancy.h
+++ b/main/php_reentrancy.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_scandir.c b/main/php_scandir.c
index 67bb25696c..50f6de82bf 100644
--- a/main/php_scandir.c
+++ b/main/php_scandir.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_scandir.h b/main/php_scandir.h
index cd473a0262..c198b02464 100644
--- a/main/php_scandir.h
+++ b/main/php_scandir.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_sprintf.c b/main/php_sprintf.c
index 3eecffa770..708c1176c2 100644
--- a/main/php_sprintf.c
+++ b/main/php_sprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_stdint.h b/main/php_stdint.h
index d04b67e175..1d5b9605bb 100644
--- a/main/php_stdint.h
+++ b/main/php_stdint.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -19,6 +19,25 @@
#ifndef PHP_STDINT_H
#define PHP_STDINT_H
+/* C99 requires these for C++ to get the definitions
+ * of INT64_MAX and other macros used by Zend/zend_long.h
+ * C11 drops this requirement, so these effectively
+ * just backport that piece of behavior.
+ *
+ * These defines are placed here instead of
+ * with the include below, because sys/types
+ * and inttypes may include stdint themselves.
+ * And these definitions MUST come first.
+ */
+#ifdef __cplusplus
+# ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+# endif
+# ifndef __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+# endif
+#endif
+
#if defined(_MSC_VER)
/* Make sure the regular stdint.h wasn't included already and prevent it to be
included afterwards. Though if some other library needs some stuff from
diff --git a/main/php_streams.h b/main/php_streams.h
index 255b065bd4..cd5319ca22 100644
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -267,7 +267,7 @@ END_EXTERN_C()
RETURN_FALSE; \
} \
} while (0)
-#define php_stream_from_res_no_verify(xstr, pzval) (xstr) = (php_stream*)zend_fetch_resource((res), "stream", php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_res_no_verify(xstr, pzval) (xstr) = (php_stream*)zend_fetch_resource2((res), "stream", php_file_le_stream(), php_file_le_pstream())
#define php_stream_from_zval_no_verify(xstr, pzval) (xstr) = (php_stream*)zend_fetch_resource2_ex((pzval), "stream", php_file_le_stream(), php_file_le_pstream())
BEGIN_EXTERN_C()
@@ -313,11 +313,7 @@ PHPAPI size_t _php_stream_write(php_stream *stream, const char *buf, size_t coun
PHPAPI void _php_stream_fill_read_buffer(php_stream *stream, size_t size);
#define php_stream_fill_read_buffer(stream, size) _php_stream_fill_read_buffer((stream), (size))
-#ifdef ZTS
-PHPAPI size_t _php_stream_printf(php_stream *stream, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-#else
PHPAPI size_t _php_stream_printf(php_stream *stream, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
-#endif
/* php_stream_printf macro & function require */
#define php_stream_printf _php_stream_printf
@@ -572,18 +568,8 @@ PHPAPI const char *php_stream_locate_eol(php_stream *stream, zend_string *buf);
#define php_stream_open_wrapper(path, mode, options, opened) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), NULL STREAMS_CC)
#define php_stream_open_wrapper_ex(path, mode, options, opened, context) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), (context) STREAMS_CC)
-#define php_stream_get_from_zval(stream, zstream, mode, options, opened, context) \
- if (Z_TYPE_PP((zstream)) == IS_RESOURCE) { \
- php_stream_from_zval((stream), (zstream)); \
- } else (stream) = Z_TYPE_PP((zstream)) == IS_STRING ? \
- php_stream_open_wrapper_ex(Z_STRVAL_PP((zstream)), (mode), (options), (opened), (context)) : NULL
-
/* pushes an error message onto the stack for a wrapper instance */
-#ifdef ZTS
-PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int options, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 4, 5);
-#else
PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int options, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-#endif
#define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */
#define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */
diff --git a/main/php_syslog.h b/main/php_syslog.h
index f748833bfd..efece21ac7 100644
--- a/main/php_syslog.h
+++ b/main/php_syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/php_ticks.c b/main/php_ticks.c
index b776652626..1688cdee82 100644
--- a/main/php_ticks.c
+++ b/main/php_ticks.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,9 +21,15 @@
#include "php.h"
#include "php_ticks.h"
+struct st_tick_function
+{
+ void (*func)(int, void *);
+ void *arg;
+};
+
int php_startup_ticks(void)
{
- zend_llist_init(&PG(tick_functions), sizeof(void(*)(int)), NULL, 1);
+ zend_llist_init(&PG(tick_functions), sizeof(struct st_tick_function), NULL, 1);
return SUCCESS;
}
@@ -39,30 +45,27 @@ void php_shutdown_ticks(void)
static int php_compare_tick_functions(void *elem1, void *elem2)
{
- void(*func1)(int);
- void(*func2)(int);
- memcpy(&func1, elem1, sizeof(void(*)(int)));
- memcpy(&func2, elem2, sizeof(void(*)(int)));
- return (func1 == func2);
+ struct st_tick_function *e1 = (struct st_tick_function *)elem1;
+ struct st_tick_function *e2 = (struct st_tick_function *)elem2;
+ return e1->func == e2->func && e1->arg == e2->arg;
}
-PHPAPI void php_add_tick_function(void (*func)(int))
+PHPAPI void php_add_tick_function(void (*func)(int, void*), void * arg)
{
- zend_llist_add_element(&PG(tick_functions), (void *)&func);
+ struct st_tick_function tmp = {func, arg};
+ zend_llist_add_element(&PG(tick_functions), (void *)&tmp);
}
-PHPAPI void php_remove_tick_function(void (*func)(int))
+PHPAPI void php_remove_tick_function(void (*func)(int, void *), void * arg)
{
- zend_llist_del_element(&PG(tick_functions), (void *)func,
- (int(*)(void*, void*))php_compare_tick_functions);
+ struct st_tick_function tmp = {func, arg};
+ zend_llist_del_element(&PG(tick_functions), (void *)&tmp, (int(*)(void*, void*))php_compare_tick_functions);
}
-static void php_tick_iterator(void *data, void *arg)
+static void php_tick_iterator(void *d, void *arg)
{
- void (*func)(int);
-
- memcpy(&func, data, sizeof(void(*)(int)));
- func(*((int *)arg));
+ struct st_tick_function *data = (struct st_tick_function *)d;
+ data->func(*((int *)arg), data->arg);
}
void php_run_ticks(int count)
diff --git a/main/php_ticks.h b/main/php_ticks.h
index b6ae0e72e2..d2f54432be 100644
--- a/main/php_ticks.h
+++ b/main/php_ticks.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -27,8 +27,8 @@ void php_shutdown_ticks(void);
void php_run_ticks(int count);
BEGIN_EXTERN_C()
-PHPAPI void php_add_tick_function(void (*func)(int));
-PHPAPI void php_remove_tick_function(void (*func)(int));
+PHPAPI void php_add_tick_function(void (*func)(int, void *), void *arg);
+PHPAPI void php_remove_tick_function(void (*func)(int, void *), void * arg);
END_EXTERN_C()
#endif
diff --git a/main/php_variables.c b/main/php_variables.c
index 43b00d9322..73274d7695 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -524,7 +524,7 @@ zend_bool php_std_auto_global_callback(char *name, uint name_len)
/* {{{ php_build_argv
*/
-static void php_build_argv(char *s, zval *track_vars_array)
+PHPAPI void php_build_argv(char *s, zval *track_vars_array)
{
zval arr, argc, tmp;
int count = 0;
@@ -592,6 +592,8 @@ static void php_build_argv(char *s, zval *track_vars_array)
*/
static inline void php_register_server_variables(void)
{
+ zval request_time_float, request_time_long;
+
zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_SERVER]);
array_init(&PG(http_globals)[TRACK_VARS_SERVER]);
@@ -610,15 +612,12 @@ static inline void php_register_server_variables(void)
if (SG(request_info).auth_digest) {
php_register_variable("PHP_AUTH_DIGEST", SG(request_info).auth_digest, &PG(http_globals)[TRACK_VARS_SERVER]);
}
- /* store request init time */
- {
- zval request_time_float, request_time_long;
- ZVAL_DOUBLE(&request_time_float, sapi_get_request_time());
- php_register_variable_ex("REQUEST_TIME_FLOAT", &request_time_float, &PG(http_globals)[TRACK_VARS_SERVER]);
- ZVAL_LONG(&request_time_long, zend_dval_to_lval(Z_DVAL(request_time_float)));
- php_register_variable_ex("REQUEST_TIME", &request_time_long, &PG(http_globals)[TRACK_VARS_SERVER]);
- }
+ /* store request init time */
+ ZVAL_DOUBLE(&request_time_float, sapi_get_request_time());
+ php_register_variable_ex("REQUEST_TIME_FLOAT", &request_time_float, &PG(http_globals)[TRACK_VARS_SERVER]);
+ ZVAL_LONG(&request_time_long, zend_dval_to_lval(Z_DVAL(request_time_float)));
+ php_register_variable_ex("REQUEST_TIME", &request_time_long, &PG(http_globals)[TRACK_VARS_SERVER]);
}
/* }}} */
@@ -650,7 +649,7 @@ static void php_autoglobal_merge(HashTable *dest, HashTable *src)
zend_hash_index_update(dest, num_key, src_entry);
}
} else {
- SEPARATE_ZVAL(dest_entry);
+ SEPARATE_ARRAY(dest_entry);
php_autoglobal_merge(Z_ARRVAL_P(dest_entry), Z_ARRVAL_P(src_entry));
}
} ZEND_HASH_FOREACH_END();
@@ -740,8 +739,8 @@ static zend_bool php_auto_globals_create_server(zend_string *name)
if (SG(request_info).argc) {
zval *argc, *argv;
- if ((argc = zend_hash_str_find(&EG(symbol_table), "argc", sizeof("argc")-1)) != NULL &&
- (argv = zend_hash_str_find(&EG(symbol_table), "argv", sizeof("argv")-1)) != NULL) {
+ if ((argc = zend_hash_str_find_ind(&EG(symbol_table), "argc", sizeof("argc")-1)) != NULL &&
+ (argv = zend_hash_str_find_ind(&EG(symbol_table), "argv", sizeof("argv")-1)) != NULL) {
Z_ADDREF_P(argv);
zend_hash_str_update(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "argv", sizeof("argv")-1, argv);
zend_hash_str_update(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "argc", sizeof("argc")-1, argc);
diff --git a/main/php_variables.h b/main/php_variables.h
index a80c152c83..613e2f2904 100644
--- a/main/php_variables.h
+++ b/main/php_variables.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -41,6 +41,7 @@ PHPAPI void php_register_variable(char *var, char *val, zval *track_vars_array);
PHPAPI void php_register_variable_safe(char *var, char *val, size_t val_len, zval *track_vars_array);
PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_array);
+PHPAPI void php_build_argv(char *s, zval *track_vars_array);
PHPAPI int php_hash_environment(void);
END_EXTERN_C()
diff --git a/main/php_version.h b/main/php_version.h
index d48ab24141..4714e5dc4b 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -1,8 +1,8 @@
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 7
-#define PHP_MINOR_VERSION 0
+#define PHP_MINOR_VERSION 1
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-dev"
-#define PHP_VERSION "7.0.0-dev"
-#define PHP_VERSION_ID 70000
+#define PHP_VERSION "7.1.0-dev"
+#define PHP_VERSION_ID 70100
diff --git a/main/reentrancy.c b/main/reentrancy.c
index b69d6cc450..72b744d6b6 100644
--- a/main/reentrancy.c
+++ b/main/reentrancy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 1db3cd303f..14e72d91f5 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/rfc1867.h b/main/rfc1867.h
index 1015e6e591..cbe2203647 100644
--- a/main/rfc1867.h
+++ b/main/rfc1867.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/snprintf.c b/main/snprintf.c
index aff6a8cbda..261293ccbe 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/snprintf.h b/main/snprintf.h
index c40147ec2d..918cb60152 100644
--- a/main/snprintf.h
+++ b/main/snprintf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -86,7 +86,7 @@ PHPAPI int ap_php_vasprintf(char **buf, const char *format, va_list ap);
PHPAPI int ap_php_asprintf(char **buf, const char *format, ...);
PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf);
-PHPAPI char * php_conv_fp(register char format, register double num,
+PHPAPI char * php_conv_fp(char format, double num,
boolean_e add_dp, int precision, char dec_point, bool_int * is_negative, char *buf, size_t *len);
END_EXTERN_C()
@@ -153,11 +153,11 @@ typedef enum {
typedef WIDE_INT wide_int;
typedef unsigned WIDE_INT u_wide_int;
-PHPAPI char * ap_php_conv_10(register wide_int num, register bool_int is_unsigned,
- register bool_int * is_negative, char *buf_end, register size_t *len);
+PHPAPI char * ap_php_conv_10(wide_int num, bool_int is_unsigned,
+ bool_int * is_negative, char *buf_end, size_t *len);
-PHPAPI char * ap_php_conv_p2(register u_wide_int num, register int nbits,
- char format, char *buf_end, register size_t *len);
+PHPAPI char * ap_php_conv_p2(u_wide_int num, int nbits,
+ char format, char *buf_end, size_t *len);
/* The maximum precision that's allowed for float conversion. Does not include
* decimal separator, exponent, sign, terminator. Currently does not affect
diff --git a/main/spprintf.c b/main/spprintf.c
index 759372b370..ab8117d3be 100644
--- a/main/spprintf.c
+++ b/main/spprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -838,7 +838,6 @@ skip_output:
PHPAPI size_t vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) /* {{{ */
{
smart_string buf = {0};
- size_t result;
/* since there are places where (v)spprintf called without checking for null,
a bit of defensive coding here */
@@ -855,13 +854,11 @@ PHPAPI size_t vspprintf(char **pbuf, size_t max_len, const char *format, va_list
if (buf.c) {
*pbuf = buf.c;
- result = buf.len;
+ return buf.len;
} else {
- *pbuf = NULL;
- result = 0;
+ *pbuf = estrndup("", 0);
+ return 0;
}
-
- return result;
}
/* }}} */
@@ -883,11 +880,15 @@ PHPAPI zend_string *vstrpprintf(size_t max_len, const char *format, va_list ap)
xbuf_format_converter(&buf, 0, format, ap);
- if (max_len && buf.s && ZSTR_LEN(buf.s) > max_len) {
+ if (!buf.s) {
+ return ZSTR_EMPTY_ALLOC();
+ }
+
+ if (max_len && ZSTR_LEN(buf.s) > max_len) {
ZSTR_LEN(buf.s) = max_len;
}
- smart_str_0(&buf);
+ smart_str_0(&buf);
return buf.s;
}
/* }}} */
diff --git a/main/spprintf.h b/main/spprintf.h
index d3c680406a..82d2e2378c 100644
--- a/main/spprintf.h
+++ b/main/spprintf.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -41,9 +41,9 @@ PHPAPI size_t spprintf( char **pbuf, size_t max_len, const char *format, ...) PH
PHPAPI size_t vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0);
-PHPAPI zend_string *vstrpprintf(size_t max_len, const char *format, va_list ap);
+PHPAPI zend_string *vstrpprintf(size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 2, 0);
-PHPAPI zend_string *strpprintf(size_t max_len, const char *format, ...);
+PHPAPI zend_string *strpprintf(size_t max_len, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
END_EXTERN_C()
#endif /* SNPRINTF_H */
diff --git a/main/streams/cast.c b/main/streams/cast.c
index 286541324e..68afda20b6 100644
--- a/main/streams/cast.c
+++ b/main/streams/cast.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/filter.c b/main/streams/filter.c
index b4705aa113..d063c1a915 100644
--- a/main/streams/filter.c
+++ b/main/streams/filter.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c
index 4dffc27ade..85395107d5 100644
--- a/main/streams/glob_wrapper.c
+++ b/main/streams/glob_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/memory.c b/main/streams/memory.c
index 5145776f7e..56ffe344aa 100644
--- a/main/streams/memory.c
+++ b/main/streams/memory.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -22,7 +22,7 @@
#include "php.h"
#include "ext/standard/base64.h"
-PHPAPI int php_url_decode(char *str, int len);
+PHPAPI size_t php_url_decode(char *str, size_t len);
/* Memory streams use a dynamic memory buffer to emulate a stream.
* You can use php_stream_memory_open to create a readonly stream
@@ -697,7 +697,9 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con
plen = sep - path;
vlen = (semi ? semi - sep : mlen - plen) - 1 /* '=' */;
key = estrndup(path, plen);
- add_assoc_stringl_ex(&meta, key, plen, sep + 1, vlen);
+ if (plen != sizeof("mediatype")-1 || memcmp(key, "mediatype", sizeof("mediatype")-1)) {
+ add_assoc_stringl_ex(&meta, key, plen, sep + 1, vlen);
+ }
efree(key);
plen += vlen + 1;
mlen -= plen;
@@ -728,7 +730,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con
ilen = (int)ZSTR_LEN(base64_comma);
} else {
comma = estrndup(comma, dlen);
- dlen = php_url_decode(comma, (int)dlen);
+ dlen = php_url_decode(comma, dlen);
ilen = (int)dlen;
}
diff --git a/main/streams/mmap.c b/main/streams/mmap.c
index 04427ed5c4..4828a75ce2 100644
--- a/main/streams/mmap.c
+++ b/main/streams/mmap.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h
index 25f5bb3f58..f0a10e8622 100644
--- a/main/streams/php_stream_context.h
+++ b/main/streams/php_stream_context.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_filter_api.h b/main/streams/php_stream_filter_api.h
index a37517e1ea..27a6da9692 100644
--- a/main/streams/php_stream_filter_api.h
+++ b/main/streams/php_stream_filter_api.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_glob_wrapper.h b/main/streams/php_stream_glob_wrapper.h
index 15a4d978c6..f548d8d5bc 100644
--- a/main/streams/php_stream_glob_wrapper.h
+++ b/main/streams/php_stream_glob_wrapper.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_mmap.h b/main/streams/php_stream_mmap.h
index e912a5593e..ae9762a4a9 100644
--- a/main/streams/php_stream_mmap.h
+++ b/main/streams/php_stream_mmap.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_plain_wrapper.h b/main/streams/php_stream_plain_wrapper.h
index 61fc09542b..9cb2bbd002 100644
--- a/main/streams/php_stream_plain_wrapper.h
+++ b/main/streams/php_stream_plain_wrapper.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_transport.h b/main/streams/php_stream_transport.h
index f21bbb5520..c05e9e2e52 100644
--- a/main/streams/php_stream_transport.h
+++ b/main/streams/php_stream_transport.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_stream_userspace.h b/main/streams/php_stream_userspace.h
index bb984067ac..b706f3a19a 100644
--- a/main/streams/php_stream_userspace.h
+++ b/main/streams/php_stream_userspace.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/php_streams_int.h b/main/streams/php_streams_int.h
index 0188202c91..8be55a2e12 100644
--- a/main/streams/php_streams_int.h
+++ b/main/streams/php_streams_int.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 101fe4aa53..d510c909a7 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -336,7 +336,11 @@ static size_t php_stdiop_write(php_stream *stream, const char *buf, size_t count
if (data->fd >= 0) {
#ifdef PHP_WIN32
- int bytes_written = write(data->fd, buf, (unsigned int)count);
+ int bytes_written;
+ if (ZEND_SIZE_T_UINT_OVFL(count)) {
+ count = UINT_MAX;
+ }
+ bytes_written = _write(data->fd, buf, (unsigned int)count);
#else
int bytes_written = write(data->fd, buf, count);
#endif
@@ -1480,7 +1484,7 @@ not_relative_path:
}
#endif
- if (!path || (path && !*path)) {
+ if (!path || !*path) {
return php_stream_fopen_rel(filename, mode, opened_path, options);
}
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 7f919ca834..d64d5caa6a 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -84,6 +84,7 @@ fprintf(stderr, "forget_persistent: %s:%p\n", stream->ops->label, stream);
if (stream->ctx) {
zend_list_delete(stream->ctx);
+ stream->ctx = NULL;
}
return 0;
@@ -2233,19 +2234,19 @@ PHPAPI int php_stream_context_set_option(php_stream_context *context,
const char *wrappername, const char *optionname, zval *optionvalue)
{
zval *wrapperhash;
- zval category, copied_val;
-
- ZVAL_DUP(&copied_val, optionvalue);
+ zval category;
- if (NULL == (wrapperhash = zend_hash_str_find(Z_ARRVAL(context->options), wrappername, strlen(wrappername)))) {
+ wrapperhash = zend_hash_str_find(Z_ARRVAL(context->options), wrappername, strlen(wrappername));
+ if (NULL == wrapperhash) {
array_init(&category);
- if (NULL == zend_hash_str_update(Z_ARRVAL(context->options), (char*)wrappername, strlen(wrappername), &category)) {
+ wrapperhash = zend_hash_str_update(Z_ARRVAL(context->options), (char*)wrappername, strlen(wrappername), &category);
+ if (NULL == wrapperhash) {
return FAILURE;
}
-
- wrapperhash = &category;
}
- return zend_hash_str_update(Z_ARRVAL_P(wrapperhash), optionname, strlen(optionname), &copied_val) ? SUCCESS : FAILURE;
+ ZVAL_DEREF(optionvalue);
+ Z_TRY_ADDREF_P(optionvalue);
+ return zend_hash_str_update(Z_ARRVAL_P(wrapperhash), optionname, strlen(optionname), optionvalue) ? SUCCESS : FAILURE;
}
/* }}} */
diff --git a/main/streams/transports.c b/main/streams/transports.c
index eab6c42df7..feaa099c8c 100644
--- a/main/streams/transports.c
+++ b/main/streams/transports.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index b73db20d40..eb8b32eed9 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -299,9 +299,7 @@ static void user_stream_create_object(struct php_user_stream_wrapper *uwrap, php
zval retval;
fci.size = sizeof(fci);
- fci.function_table = &uwrap->ce->function_table;
ZVAL_UNDEF(&fci.function_name);
- fci.symbol_table = NULL;
fci.object = Z_OBJ_P(object);
fci.retval = &retval;
fci.param_count = 0;
@@ -310,7 +308,7 @@ static void user_stream_create_object(struct php_user_stream_wrapper *uwrap, php
fcc.initialized = 1;
fcc.function_handler = uwrap->ce->constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(object);
fcc.object = Z_OBJ_P(object);
@@ -840,9 +838,7 @@ static int statbuf_from_array(zval *array, php_stream_statbuf *ssb)
#define STAT_PROP_ENTRY_EX(name, name2) \
if (NULL != (elem = zend_hash_str_find(Z_ARRVAL_P(array), #name, sizeof(#name)-1))) { \
- SEPARATE_ZVAL(elem); \
- convert_to_long(elem); \
- ssb->sb.st_##name2 = Z_LVAL_P(elem); \
+ ssb->sb.st_##name2 = zval_get_long(elem); \
}
#define STAT_PROP_ENTRY(name) STAT_PROP_ENTRY_EX(name,name)
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index 13ed703682..cc76ace510 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -77,10 +77,10 @@ retry:
didwrite = send(sock->socket, buf, XP_SOCK_BUF_SIZE(count), (sock->is_blocked && ptimeout) ? MSG_DONTWAIT : 0);
if (didwrite <= 0) {
- long err = php_socket_errno();
+ int err = php_socket_errno();
char *estr;
- if (sock->is_blocked && err == EWOULDBLOCK) {
+ if (sock->is_blocked && (err == EWOULDBLOCK || err == EAGAIN)) {
int retval;
sock->timeout_event = 0;
@@ -152,6 +152,7 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count)
{
php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
ssize_t nr_bytes = 0;
+ int err;
if (!sock || sock->socket == -1) {
return 0;
@@ -164,8 +165,9 @@ static size_t php_sockop_read(php_stream *stream, char *buf, size_t count)
}
nr_bytes = recv(sock->socket, buf, XP_SOCK_BUF_SIZE(count), (sock->is_blocked && sock->timeout.tv_sec != -1) ? MSG_DONTWAIT : 0);
+ err = php_socket_errno();
- stream->eof = (nr_bytes == 0 || (nr_bytes == -1 && php_socket_errno() != EWOULDBLOCK));
+ stream->eof = (nr_bytes == 0 || (nr_bytes == -1 && err != EWOULDBLOCK && err != EAGAIN));
if (nr_bytes > 0) {
php_stream_notify_progress_increment(PHP_STREAM_CONTEXT(stream), nr_bytes, 0);
@@ -314,7 +316,17 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void
if (sock->socket == -1) {
alive = 0;
} else if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
- if (0 >= recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
+#ifdef PHP_WIN32
+ int ret;
+#else
+ ssize_t ret;
+#endif
+ int err;
+
+ ret = recv(sock->socket, &buf, sizeof(buf), MSG_PEEK);
+ err = php_socket_errno();
+ if (0 == ret || /* the counterpart did properly shutdown*/
+ (0 > ret && err != EWOULDBLOCK && err != EAGAIN)) { /* there was an unrecoverable error */
alive = 0;
}
}
@@ -623,6 +635,16 @@ static inline int php_tcp_sockop_bind(php_stream *stream, php_netstream_data_t *
return -1;
}
+#ifdef IPV6_V6ONLY
+ if (PHP_STREAM_CONTEXT(stream)
+ && (tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "ipv6_v6only")) != NULL
+ && Z_TYPE_P(tmpzval) != IS_NULL
+ ) {
+ sockopts |= STREAM_SOCKOP_IPV6_V6ONLY;
+ sockopts |= STREAM_SOCKOP_IPV6_V6ONLY_ENABLED * zend_is_true(tmpzval);
+ }
+#endif
+
#ifdef SO_REUSEPORT
if (PHP_STREAM_CONTEXT(stream)
&& (tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "so_reuseport")) != NULL
@@ -720,6 +742,18 @@ static inline int php_tcp_sockop_connect(php_stream *stream, php_netstream_data_
}
#endif
+ if (stream->ops != &php_stream_udp_socket_ops /* TCP_NODELAY is only applicable for TCP */
+#ifdef AF_UNIX
+ && stream->ops != &php_stream_unix_socket_ops
+ && stream->ops != &php_stream_unixdg_socket_ops
+#endif
+ && PHP_STREAM_CONTEXT(stream)
+ && (tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "tcp_nodelay")) != NULL
+ && zend_is_true(tmpzval)
+ ) {
+ sockopts |= STREAM_SOCKOP_TCP_NODELAY;
+ }
+
/* Note: the test here for php_stream_udp_socket_ops is important, because we
* want the default to be TCP sockets so that the openssl extension can
* re-use this code. */
@@ -761,36 +795,37 @@ static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t
php_stream_xport_param *xparam STREAMS_DC)
{
int clisock;
+ zend_bool nodelay = 0;
+ zval *tmpzval = NULL;
xparam->outputs.client = NULL;
+ if ((NULL != PHP_STREAM_CONTEXT(stream)) &&
+ (tmpzval = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "tcp_nodelay")) != NULL &&
+ zend_is_true(tmpzval)) {
+ nodelay = 1;
+ }
+
clisock = php_network_accept_incoming(sock->socket,
- xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
- xparam->want_addr ? &xparam->outputs.addr : NULL,
- xparam->want_addr ? &xparam->outputs.addrlen : NULL,
- xparam->inputs.timeout,
- xparam->want_errortext ? &xparam->outputs.error_text : NULL,
- &xparam->outputs.error_code
- );
+ xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
+ xparam->want_addr ? &xparam->outputs.addr : NULL,
+ xparam->want_addr ? &xparam->outputs.addrlen : NULL,
+ xparam->inputs.timeout,
+ xparam->want_errortext ? &xparam->outputs.error_text : NULL,
+ &xparam->outputs.error_code,
+ nodelay);
if (clisock >= 0) {
- php_netstream_data_t *clisockdata;
-
- clisockdata = emalloc(sizeof(*clisockdata));
-
- if (clisockdata == NULL) {
- close(clisock);
- /* technically a fatal error */
- } else {
- memcpy(clisockdata, sock, sizeof(*clisockdata));
- clisockdata->socket = clisock;
-
- xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
- if (xparam->outputs.client) {
- xparam->outputs.client->ctx = stream->ctx;
- if (stream->ctx) {
- GC_REFCOUNT(stream->ctx)++;
- }
+ php_netstream_data_t *clisockdata = (php_netstream_data_t*) emalloc(sizeof(*clisockdata));
+
+ memcpy(clisockdata, sock, sizeof(*clisockdata));
+ clisockdata->socket = clisock;
+
+ xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
+ if (xparam->outputs.client) {
+ xparam->outputs.client->ctx = stream->ctx;
+ if (stream->ctx) {
+ GC_REFCOUNT(stream->ctx)++;
}
}
}
diff --git a/main/strlcat.c b/main/strlcat.c
index e52ee39442..242819ac6f 100644
--- a/main/strlcat.c
+++ b/main/strlcat.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/strlcpy.c b/main/strlcpy.c
index 44e29ad39b..60d3e9906d 100644
--- a/main/strlcpy.c
+++ b/main/strlcpy.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/main/win95nt.h b/main/win95nt.h
index 84c3647afc..70ee7777bd 100644
--- a/main/win95nt.h
+++ b/main/win95nt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/makedist b/makedist
index 1552f9efb3..48c6312e78 100755
--- a/makedist
+++ b/makedist
@@ -28,9 +28,14 @@ VER=$1 ; shift
old_IFS="$IFS"
IFS=.
-eval set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
-if test "${1}" = "1" -a "${2}" -lt "28"; then
- echo "You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)"
+eval set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /g'`
+if test "${1}" -lt "3" -o "${1}" = "3" -a "${2}" -eq "0" -a "${3}" -lt "2"; then
+ echo "You will need bison >= 3.0.2 if you want to regenerate the Zend parser (found ${1}.${2}.${3})."
+ exit 2
+fi
+eval set `re2c --version| grep 're2c' | cut -d ' ' -f 2 | sed -e 's/\./ /g'`
+if test "${2}" -lt "13" -o "${2}" -eq "13" -a "${3}" -lt "5"; then
+ echo "You will need re2c >= 0.13.5 if you want to regenerate the Zend scanner (found ${1}.${2}.${3})."
exit 2
fi
IFS="$old_IFS"
@@ -113,7 +118,12 @@ sed -i 's,^#ifndef YYTOKENTYPE,#include "zend.h"\n#ifndef YYTOKENTYPE,g' $MY_OLD
# download pear
$ECHO_N "makedist: Attempting to download PEAR's phar archive"
if test ! -x wget; then
- wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/
+ wget https://pear.php.net/install-pear-nozlib.phar -nd -P pear/
+ if [ "x$?" != "x0" ]
+ then
+ $ECHO_N "Pear download failed";
+ exit 7
+ fi
else
$ECHO_N "Missing wget binary needed for pear download";
exit 7
diff --git a/netware/start.c b/netware/start.c
index 76f72247db..18555a4d88 100644
--- a/netware/start.c
+++ b/netware/start.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/pear/Makefile.frag b/pear/Makefile.frag
index 00bacae2df..bbe8ec3513 100644
--- a/pear/Makefile.frag
+++ b/pear/Makefile.frag
@@ -9,6 +9,7 @@ WGET = `which wget 2>/dev/null`
FETCH = `which fetch 2>/dev/null`
PEAR_PREFIX = -dp a${program_prefix}
PEAR_SUFFIX = -ds a$(program_suffix)
+PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
install-pear-installer: $(SAPI_CLI_PATH)
@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
@@ -20,11 +21,11 @@ install-pear:
cp $(srcdir)/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \
else \
if test ! -z "$(WGET)" && test -x "$(WGET)"; then \
- "$(WGET)" http://pear.php.net/install-pear-nozlib.phar -nd -P $(builddir)/; \
+ "$(WGET)" "${PEAR_INSTALLER_URL}" -nd -P $(builddir)/; \
elif test ! -z "$(FETCH)" && test -x "$(FETCH)"; then \
- "$(FETCH)" -o $(builddir)/ http://pear.php.net/install-pear-nozlib.phar; \
+ "$(FETCH)" -o $(builddir)/ "${PEAR_INSTALLER_URL}"; \
else \
- $(top_builddir)/sapi/cli/php -n $(srcdir)/fetch.php http://pear.php.net/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \
+ $(top_builddir)/sapi/cli/php -n $(srcdir)/fetch.php "${PEAR_INSTALLER_URL}" $(builddir)/install-pear-nozlib.phar; \
fi \
fi \
fi
diff --git a/pear/install-pear-nozlib.phar b/pear/install-pear-nozlib.phar
deleted file mode 100644
index 2f77855924..0000000000
--- a/pear/install-pear-nozlib.phar
+++ /dev/null
@@ -1,97196 +0,0 @@
-<?php
-error_reporting(1803);
-if (function_exists('mb_internal_encoding')) {
- mb_internal_encoding('ASCII');
-}
-if (!class_exists('PHP_Archive')) {/**
- * PHP_Archive Class (implements .phar)
- *
- * @package PHP_Archive
- * @category PHP
- */
-/**
- * PHP_Archive Class (implements .phar)
- *
- * PHAR files a singular archive from which an entire application can run.
- * To use it, simply package it using {@see PHP_Archive_Creator} and use phar://
- * URIs to your includes. i.e. require_once 'phar://config.php' will include config.php
- * from the root of the PHAR file.
- *
- * Gz code borrowed from the excellent File_Archive package by Vincent Lascaux.
- *
- * @copyright Copyright David Shafik and Synaptic Media 2004. All rights reserved.
- * @author Davey Shafik <davey@synapticmedia.net>
- * @author Greg Beaver <cellog@php.net>
- * @link http://www.synapticmedia.net Synaptic Media
- * @version Id$
- * @package PHP_Archive
- * @category PHP
- */
-
-class PHP_Archive
-{
- const GZ = 0x00001000;
- const BZ2 = 0x00002000;
- const SIG = 0x00010000;
- const SHA1 = 0x0002;
- const MD5 = 0x0001;
- const SHA256 = 0x0003;
- const SHA512 = 0x0004;
- const OPENSSL = 0x0010;
- /**
- * Whether this archive is compressed with zlib
- *
- * @var bool
- */
- private $_compressed;
- /**
- * @var string Real path to the .phar archive
- */
- private $_archiveName = null;
- /**
- * Current file name in the phar
- * @var string
- */
- protected $currentFilename = null;
- /**
- * Length of current file in the phar
- * @var string
- */
- protected $internalFileLength = null;
- /**
- * true if the current file is an empty directory
- * @var string
- */
- protected $isDir = false;
- /**
- * Current file statistics (size, creation date, etc.)
- * @var string
- */
- protected $currentStat = null;
- /**
- * @var resource|null Pointer to open .phar
- */
- protected $fp = null;
- /**
- * @var int Current Position of the pointer
- */
- protected $position = 0;
-
- /**
- * Map actual realpath of phars to meta-data about the phar
- *
- * Data is indexed by the alias that is used by internal files. In other
- * words, if a file is included via:
- * <code>
- * require_once 'phar://PEAR.phar/PEAR/Installer.php';
- * </code>
- * then the alias is "PEAR.phar"
- *
- * Information stored is a boolean indicating whether this .phar is compressed
- * with zlib, another for bzip2, phar-specific meta-data, and
- * the precise offset of internal files
- * within the .phar, used with the {@link $_manifest} to load actual file contents
- * @var array
- */
- private static $_pharMapping = array();
- /**
- * Map real file paths to alias used
- *
- * @var array
- */
- private static $_pharFiles = array();
- /**
- * File listing for the .phar
- *
- * The manifest is indexed per phar.
- *
- * Files within the .phar are indexed by their relative path within the
- * .phar. Each file has this information in its internal array
- *
- * - 0 = uncompressed file size
- * - 1 = timestamp of when file was added to phar
- * - 2 = offset of file within phar relative to internal file's start
- * - 3 = compressed file size (actual size in the phar)
- * @var array
- */
- private static $_manifest = array();
- /**
- * Absolute offset of internal files within the .phar, indexed by absolute
- * path to the .phar
- *
- * @var array
- */
- private static $_fileStart = array();
- /**
- * file name of the phar
- *
- * @var string
- */
- private $_basename;
-
-
- /**
- * Default MIME types used for the web front controller
- *
- * @var array
- */
- public static $defaultmimes = array(
- 'aif' => 'audio/x-aiff',
- 'aiff' => 'audio/x-aiff',
- 'arc' => 'application/octet-stream',
- 'arj' => 'application/octet-stream',
- 'art' => 'image/x-jg',
- 'asf' => 'video/x-ms-asf',
- 'asx' => 'video/x-ms-asf',
- 'avi' => 'video/avi',
- 'bin' => 'application/octet-stream',
- 'bm' => 'image/bmp',
- 'bmp' => 'image/bmp',
- 'bz2' => 'application/x-bzip2',
- 'css' => 'text/css',
- 'doc' => 'application/msword',
- 'dot' => 'application/msword',
- 'dv' => 'video/x-dv',
- 'dvi' => 'application/x-dvi',
- 'eps' => 'application/postscript',
- 'exe' => 'application/octet-stream',
- 'gif' => 'image/gif',
- 'gz' => 'application/x-gzip',
- 'gzip' => 'application/x-gzip',
- 'htm' => 'text/html',
- 'html' => 'text/html',
- 'ico' => 'image/x-icon',
- 'jpe' => 'image/jpeg',
- 'jpg' => 'image/jpeg',
- 'jpeg' => 'image/jpeg',
- 'js' => 'application/x-javascript',
- 'log' => 'text/plain',
- 'mid' => 'audio/x-midi',
- 'mov' => 'video/quicktime',
- 'mp2' => 'audio/mpeg',
- 'mp3' => 'audio/mpeg3',
- 'mpg' => 'audio/mpeg',
- 'pdf' => 'aplication/pdf',
- 'png' => 'image/png',
- 'rtf' => 'application/rtf',
- 'tif' => 'image/tiff',
- 'tiff' => 'image/tiff',
- 'txt' => 'text/plain',
- 'xml' => 'text/xml',
- );
-
- public static $defaultphp = array(
- 'php' => true
- );
-
- public static $defaultphps = array(
- 'phps' => true
- );
-
- public static $deny = array('/.+\.inc$/');
-
- public static function viewSource($archive, $file)
- {
- // security, idea borrowed from PHK
- if (!file_exists($archive . '.introspect')) {
- header("HTTP/1.0 404 Not Found");
- return false;
- }
- if (self::_fileExists($archive, $_GET['viewsource'])) {
- $source = highlight_file('phar://install-pear-nozlib.phar/' .
- $_GET['viewsource'], true);
- header('Content-Type: text/html');
- header('Content-Length: ' . strlen($source));
- echo '<html><head><title>Source of ',
- htmlspecialchars($_GET['viewsource']), '</title></head>';
- echo '<body><h1>Source of ',
- htmlspecialchars($_GET['viewsource']), '</h1>';
- if (isset($_GET['introspect'])) {
- echo '<a href="', htmlspecialchars($_SERVER['PHP_SELF']),
- '?introspect=', urlencode(htmlspecialchars($_GET['introspect'])),
- '">Return to ', htmlspecialchars($_GET['introspect']), '</a><br />';
- }
- echo $source;
- return false;
- } else {
- header("HTTP/1.0 404 Not Found");
- return false;
- }
-
- }
-
- public static function introspect($archive, $dir)
- {
- // security, idea borrowed from PHK
- if (!file_exists($archive . '.introspect')) {
- header("HTTP/1.0 404 Not Found");
- return false;
- }
- if (!$dir) {
- $dir = '/';
- }
- $dir = self::processFile($dir);
- if ($dir[0] != '/') {
- $dir = '/' . $dir;
- }
- try {
- $self = htmlspecialchars($_SERVER['PHP_SELF']);
- $iterate = new DirectoryIterator('phar://install-pear-nozlib.phar' . $dir);
- echo '<html><head><title>Introspect ', htmlspecialchars($dir),
- '</title></head><body><h1>Introspect ', htmlspecialchars($dir),
- '</h1><ul>';
- if ($dir != '/') {
- echo '<li><a href="', $self, '?introspect=',
- htmlspecialchars(dirname($dir)), '">..</a></li>';
- }
- foreach ($iterate as $entry) {
- if ($entry->isDot()) continue;
- $name = self::processFile($entry->getPathname());
- $name = str_replace('phar://install-pear-nozlib.phar/', '', $name);
- if ($entry->isDir()) {
- echo '<li><a href="', $self, '?introspect=',
- urlencode(htmlspecialchars($name)),
- '">',
- htmlspecialchars($entry->getFilename()), '/</a> [directory]</li>';
- } else {
- echo '<li><a href="', $self, '?introspect=',
- urlencode(htmlspecialchars($dir)), '&viewsource=',
- urlencode(htmlspecialchars($name)),
- '">',
- htmlspecialchars($entry->getFilename()), '</a></li>';
- }
- }
- return false;
- } catch (Exception $e) {
- echo '<html><head><title>Directory not found: ',
- htmlspecialchars($dir), '</title></head>',
- '<body><h1>Directory not found: ', htmlspecialchars($dir), '</h1>',
- '<p>Try <a href="', htmlspecialchars($_SERVER['PHP_SELF']), '?introspect=/">',
- 'This link</a></p></body></html>';
- return false;
- }
- }
-
- public static function webFrontController($initfile)
- {
- if (isset($_SERVER) && isset($_SERVER['REQUEST_URI'])) {
- $uri = parse_url($_SERVER['REQUEST_URI']);
- $archive = realpath($_SERVER['SCRIPT_FILENAME']);
- $subpath = str_replace('/' . basename($archive), '', $uri['path']);
- if (!$subpath || $subpath == '/') {
- if (isset($_GET['viewsource'])) {
- return self::viewSource($archive, $_GET['viewsource']);
- }
- if (isset($_GET['introspect'])) {
- return self::introspect($archive, $_GET['introspect']);
- }
- $subpath = '/' . $initfile;
- }
- if (!self::_fileExists($archive, substr($subpath, 1))) {
- header("HTTP/1.0 404 Not Found");
- return false;
- }
- foreach (self::$deny as $pattern) {
- if (preg_match($pattern, $subpath)) {
- header("HTTP/1.0 404 Not Found");
- return false;
- }
- }
- $inf = pathinfo(basename($subpath));
- if (!isset($inf['extension'])) {
- header('Content-Type: text/plain');
- header('Content-Length: ' .
- self::_filesize($archive, substr($subpath, 1)));
- readfile('phar://install-pear-nozlib.phar' . $subpath);
- return false;
- }
- if (isset(self::$defaultphp[$inf['extension']])) {
- include 'phar://install-pear-nozlib.phar' . $subpath;
- return false;
- }
- if (isset(self::$defaultmimes[$inf['extension']])) {
- header('Content-Type: ' . self::$defaultmimes[$inf['extension']]);
- header('Content-Length: ' .
- self::_filesize($archive, substr($subpath, 1)));
- readfile('phar://install-pear-nozlib.phar' . $subpath);
- return false;
- }
- if (isset(self::$defaultphps[$inf['extension']])) {
- header('Content-Type: text/html');
- $c = highlight_file('phar://install-pear-nozlib.phar' . $subpath, true);
- header('Content-Length: ' . strlen($c));
- echo $c;
- return false;
- }
- header('Content-Type: text/plain');
- header('Content-Length: ' .
- self::_filesize($archive, substr($subpath, 1)));
- readfile('phar://install-pear-nozlib.phar' . $subpath);
- }
- }
-
- /**
- * Detect end of stub
- *
- * @param string $buffer stub past '__HALT_'.'COMPILER();'
- * @return end of stub, prior to length of manifest.
- */
- private static final function _endOfStubLength($buffer)
- {
- $pos = 0;
- if (!strlen($buffer)) {
- return $pos;
- }
- if (($buffer[0] == ' ' || $buffer[0] == "\n") && @substr($buffer, 1, 2) == '')
- {
- $pos += 3;
- if ($buffer[$pos] == "\r" && $buffer[$pos+1] == "\n") {
- $pos += 2;
- }
- else if ($buffer[$pos] == "\n") {
- $pos += 1;
- }
- }
- return $pos;
- }
-
- /**
- * Allows loading an external Phar archive without include()ing it
- *
- * @param string $file phar package to load
- * @param string $alias alias to use
- * @throws Exception
- */
- public static final function loadPhar($file, $alias = NULL)
- {
- $file = realpath($file);
- if ($file) {
- $fp = fopen($file, 'rb');
- $buffer = '';
- while (!feof($fp)) {
- $buffer .= fread($fp, 8192);
- // don't break phars
- if ($pos = strpos($buffer, '__HALT_COMPI' . 'LER();')) {
- $buffer .= fread($fp, 5);
- fclose($fp);
- $pos += 18;
- $pos += self::_endOfStubLength(substr($buffer, $pos));
- return self::_mapPhar($file, $pos, $alias);
- }
- }
- fclose($fp);
- }
- }
-
- /**
- * Map a full real file path to an alias used to refer to the .phar
- *
- * This function can only be called from the initialization of the .phar itself.
- * Any attempt to call from outside the .phar or to re-alias the .phar will fail
- * as a security measure.
- * @param string $alias
- * @param int $dataoffset the value of 43613
- */
- public static final function mapPhar($alias = NULL, $dataoffset = NULL)
- {
- try {
- $trace = debug_backtrace();
- $file = $trace[0]['file'];
- // this ensures that this is safe
- if (!in_array($file, get_included_files())) {
- die('SECURITY ERROR: PHP_Archive::mapPhar can only be called from within ' .
- 'the phar that initiates it');
- }
- $file = realpath($file);
- if (!isset($dataoffset)) {
- $dataoffset = constant('__COMPILER_HALT_OFFSET'.'__');
- $fp = fopen($file, 'rb');
- fseek($fp, $dataoffset, SEEK_SET);
- $dataoffset = $dataoffset + self::_endOfStubLength(fread($fp, 5));
- fclose($fp);
- }
-
- self::_mapPhar($file, $dataoffset);
- } catch (Exception $e) {
- die($e->getMessage());
- }
- }
-
- /**
- * Sub-function, allows recovery from errors
- *
- * @param unknown_type $file
- * @param unknown_type $dataoffset
- */
- private static function _mapPhar($file, $dataoffset, $alias = NULL)
- {
- $file = realpath($file);
- if (isset(self::$_manifest[$file])) {
- return;
- }
- if (!is_array(self::$_pharMapping)) {
- self::$_pharMapping = array();
- }
- $fp = fopen($file, 'rb');
- // seek to __HALT_COMPILER_OFFSET__
- fseek($fp, $dataoffset);
- $manifest_length = unpack('Vlen', fread($fp, 4));
- $manifest = '';
- $last = '1';
- while (strlen($last) && strlen($manifest) < $manifest_length['len']) {
- $read = 8192;
- if ($manifest_length['len'] - strlen($manifest) < 8192) {
- $read = $manifest_length['len'] - strlen($manifest);
- }
- $last = fread($fp, $read);
- $manifest .= $last;
- }
- if (strlen($manifest) < $manifest_length['len']) {
- throw new Exception('ERROR: manifest length read was "' .
- strlen($manifest) .'" should be "' .
- $manifest_length['len'] . '"');
- }
- $info = self::_unserializeManifest($manifest);
- if ($info['alias']) {
- $alias = $info['alias'];
- $explicit = true;
- } else {
- if (!isset($alias)) {
- $alias = $file;
- }
- $explicit = false;
- }
- self::$_manifest[$file] = $info['manifest'];
- $compressed = $info['compressed'];
- self::$_fileStart[$file] = ftell($fp);
- fclose($fp);
- if ($compressed & 0x00001000) {
- if (!function_exists('gzinflate')) {
- throw new Exception('Error: zlib extension is not enabled - gzinflate() function needed' .
- ' for compressed .phars');
- }
- }
- if ($compressed & 0x00002000) {
- if (!function_exists('bzdecompress')) {
- throw new Exception('Error: bzip2 extension is not enabled - bzdecompress() function needed' .
- ' for compressed .phars');
- }
- }
- if (isset(self::$_pharMapping[$alias])) {
- throw new Exception('ERROR: PHP_Archive::mapPhar has already been called for alias "' .
- $alias . '" cannot re-alias to "' . $file . '"');
- }
- self::$_pharMapping[$alias] = array($file, $compressed, $dataoffset, $explicit,
- $info['metadata']);
- self::$_pharFiles[$file] = $alias;
- }
-
- /**
- * extract the manifest into an internal array
- *
- * @param string $manifest
- * @return false|array
- */
- private static function _unserializeManifest($manifest)
- {
- // retrieve the number of files in the manifest
- $info = unpack('V', substr($manifest, 0, 4));
- $apiver = substr($manifest, 4, 2);
- $apiver = bin2hex($apiver);
- $apiver_dots = hexdec($apiver[0]) . '.' . hexdec($apiver[1]) . '.' . hexdec($apiver[2]);
- $majorcompat = hexdec($apiver[0]);
- $calcapi = explode('.', self::APIVersion());
- if ($calcapi[0] != $majorcompat) {
- throw new Exception('Phar is incompatible API version ' . $apiver_dots . ', but ' .
- 'PHP_Archive is API version '.self::APIVersion());
- }
- if ($calcapi[0] === '0') {
- if (self::APIVersion() != $apiver_dots) {
- throw new Exception('Phar is API version ' . $apiver_dots .
- ', but PHP_Archive is API version '.self::APIVersion(), E_USER_ERROR);
- }
- }
- $flags = unpack('V', substr($manifest, 6, 4));
- $ret = array('compressed' => $flags & 0x00003000);
- // signature is not verified by default in PHP_Archive, phar is better
- $ret['hassignature'] = $flags & 0x00010000;
- $aliaslen = unpack('V', substr($manifest, 10, 4));
- if ($aliaslen) {
- $ret['alias'] = substr($manifest, 14, $aliaslen[1]);
- } else {
- $ret['alias'] = false;
- }
- $manifest = substr($manifest, 14 + $aliaslen[1]);
- $metadatalen = unpack('V', substr($manifest, 0, 4));
- if ($metadatalen[1]) {
- $ret['metadata'] = unserialize(substr($manifest, 4, $metadatalen[1]));
- $manifest = substr($manifest, 4 + $metadatalen[1]);
- } else {
- $ret['metadata'] = null;
- $manifest = substr($manifest, 4);
- }
- $offset = 0;
- $start = 0;
- for ($i = 0; $i < $info[1]; $i++) {
- // length of the file name
- $len = unpack('V', substr($manifest, $start, 4));
- $start += 4;
- // file name
- $savepath = substr($manifest, $start, $len[1]);
- $start += $len[1];
- // retrieve manifest data:
- // 0 = uncompressed file size
- // 1 = timestamp of when file was added to phar
- // 2 = compressed filesize
- // 3 = crc32
- // 4 = flags
- // 5 = metadata length
- $ret['manifest'][$savepath] = array_values(unpack('Va/Vb/Vc/Vd/Ve/Vf', substr($manifest, $start, 24)));
- $ret['manifest'][$savepath][3] = sprintf('%u', $ret['manifest'][$savepath][3]
- & 0xffffffff);
- if ($ret['manifest'][$savepath][5]) {
- $ret['manifest'][$savepath][6] = unserialize(substr($manifest, $start + 24,
- $ret['manifest'][$savepath][5]));
- } else {
- $ret['manifest'][$savepath][6] = null;
- }
- $ret['manifest'][$savepath][7] = $offset;
- $offset += $ret['manifest'][$savepath][2];
- $start += 24 + $ret['manifest'][$savepath][5];
- }
- return $ret;
- }
-
- /**
- * @param string
- */
- private static function processFile($path)
- {
- if ($path == '.') {
- return '';
- }
- $std = str_replace("\\", "/", $path);
- while ($std != ($std = preg_replace("/[^\/:?]+\/\.\.\//", "", $std))) ;
- $std = str_replace("/./", "", $std);
- if (strlen($std) > 1 && $std[0] == '/') {
- $std = substr($std, 1);
- }
- if (strncmp($std, "./", 2) == 0) {
- return substr($std, 2);
- } else {
- return $std;
- }
- }
-
- /**
- * Seek in the master archive to a matching file or directory
- * @param string
- */
- protected function selectFile($path, $allowdirs = true)
- {
- $std = self::processFile($path);
- if (isset(self::$_manifest[$this->_archiveName][$path])) {
- if ($path[strlen($path)-1] == '/') {
- // directory
- if (!$allowdirs) {
- return 'Error: "' . $path . '" is a directory in phar "' . $this->_basename . '"';
- }
- $this->_setCurrentFile($path, true);
- } else {
- $this->_setCurrentFile($path);
- }
- return true;
- }
- if (!$allowdirs) {
- return 'Error: "' . $path . '" is not a file in phar "' . $this->_basename . '"';
- }
- foreach (self::$_manifest[$this->_archiveName] as $file => $info) {
- if (empty($std) ||
- //$std is a directory
- strncmp($std.'/', $path, strlen($std)+1) == 0) {
- $this->currentFilename = $this->internalFileLength = $this->currentStat = null;
- return true;
- }
- }
- return 'Error: "' . $path . '" not found in phar "' . $this->_basename . '"';
- }
-
- private function _setCurrentFile($path, $dir = false)
- {
- if ($dir) {
- $this->currentStat = array(
- 2 => 040777, // directory mode, readable by all, writeable by none
- 4 => 0, // uid
- 5 => 0, // gid
- 7 => 0, // size
- 9 => self::$_manifest[$this->_archiveName][$path][1], // creation time
- );
- $this->internalFileLength = 0;
- $this->isDir = true;
- } else {
- $this->currentStat = array(
- 2 => 0100444, // file mode, readable by all, writeable by none
- 4 => 0, // uid
- 5 => 0, // gid
- 7 => self::$_manifest[$this->_archiveName][$path][0], // size
- 9 => self::$_manifest[$this->_archiveName][$path][1], // creation time
- );
- $this->internalFileLength = self::$_manifest[$this->_archiveName][$path][2];
- $this->isDir = false;
- }
- $this->currentFilename = $path;
- // seek to offset of file header within the .phar
- if (is_resource(@$this->fp)) {
- fseek($this->fp, self::$_fileStart[$this->_archiveName] + self::$_manifest[$this->_archiveName][$path][7]);
- }
- }
-
- private static function _fileExists($archive, $path)
- {
- return isset(self::$_manifest[$archive]) &&
- isset(self::$_manifest[$archive][$path]);
- }
-
- private static function _filesize($archive, $path)
- {
- return self::$_manifest[$archive][$path][0];
- }
-
- /**
- * Seek to a file within the master archive, and extract its contents
- * @param string
- * @return array|string an array containing an error message string is returned
- * upon error, otherwise the file contents are returned
- */
- public function extractFile($path)
- {
- $this->fp = @fopen($this->_archiveName, "rb");
- if (!$this->fp) {
- return array('Error: cannot open phar "' . $this->_archiveName . '"');
- }
- if (($e = $this->selectFile($path, false)) === true) {
- $data = '';
- $count = $this->internalFileLength;
- while ($count) {
- if ($count < 8192) {
- $data .= @fread($this->fp, $count);
- $count = 0;
- } else {
- $count -= 8192;
- $data .= @fread($this->fp, 8192);
- }
- }
- @fclose($this->fp);
- if (self::$_manifest[$this->_archiveName][$path][4] & self::GZ) {
- $data = gzinflate($data);
- } elseif (self::$_manifest[$this->_archiveName][$path][4] & self::BZ2) {
- $data = bzdecompress($data);
- }
- if (!isset(self::$_manifest[$this->_archiveName][$path]['ok'])) {
- if (strlen($data) != $this->currentStat[7]) {
- return array("Not valid internal .phar file (size error {$size} != " .
- $this->currentStat[7] . ")");
- }
- if (self::$_manifest[$this->_archiveName][$path][3] != sprintf("%u", crc32($data) & 0xffffffff)) {
- return array("Not valid internal .phar file (checksum error)");
- }
- self::$_manifest[$this->_archiveName][$path]['ok'] = true;
- }
- return $data;
- } else {
- @fclose($this->fp);
- return array($e);
- }
- }
-
- /**
- * Parse urls like phar:///fullpath/to/my.phar/file.txt
- *
- * @param string $file
- * @return false|array
- */
- static protected function parseUrl($file)
- {
- if (substr($file, 0, 7) != 'phar://') {
- return false;
- }
- $file = substr($file, 7);
-
- $ret = array('scheme' => 'phar');
- $pos_p = strpos($file, '.phar.php');
- $pos_z = strpos($file, '.phar.gz');
- $pos_b = strpos($file, '.phar.bz2');
- if ($pos_p) {
- if ($pos_z) {
- return false;
- }
- $ret['host'] = substr($file, 0, $pos_p + strlen('.phar.php'));
- $ret['path'] = substr($file, strlen($ret['host']));
- } elseif ($pos_z) {
- $ret['host'] = substr($file, 0, $pos_z + strlen('.phar.gz'));
- $ret['path'] = substr($file, strlen($ret['host']));
- } elseif ($pos_b) {
- $ret['host'] = substr($file, 0, $pos_z + strlen('.phar.bz2'));
- $ret['path'] = substr($file, strlen($ret['host']));
- } elseif (($pos_p = strpos($file, ".phar")) !== false) {
- $ret['host'] = substr($file, 0, $pos_p + strlen('.phar'));
- $ret['path'] = substr($file, strlen($ret['host']));
- } else {
- return false;
- }
- if (!$ret['path']) {
- $ret['path'] = '/';
- }
- return $ret;
- }
-
- /**
- * Locate the .phar archive in the include_path and detect the file to open within
- * the archive.
- *
- * Possible parameters are phar://pharname.phar/filename_within_phar.ext
- * @param string a file within the archive
- * @return string the filename within the .phar to retrieve
- */
- public function initializeStream($file)
- {
- $file = self::processFile($file);
- $info = @parse_url($file);
- if (!$info) {
- $info = self::parseUrl($file);
- }
- if (!$info) {
- return false;
- }
- if (!isset($info['host'])) {
- // malformed internal file
- return false;
- }
- if (!isset(self::$_pharFiles[$info['host']]) &&
- !isset(self::$_pharMapping[$info['host']])) {
- try {
- self::loadPhar($info['host']);
- // use alias from here out
- $info['host'] = self::$_pharFiles[$info['host']];
- } catch (Exception $e) {
- return false;
- }
- }
- if (!isset($info['path'])) {
- return false;
- } elseif (strlen($info['path']) > 1) {
- $info['path'] = substr($info['path'], 1);
- }
- if (isset(self::$_pharMapping[$info['host']])) {
- $this->_basename = $info['host'];
- $this->_archiveName = self::$_pharMapping[$info['host']][0];
- $this->_compressed = self::$_pharMapping[$info['host']][1];
- } elseif (isset(self::$_pharFiles[$info['host']])) {
- $this->_archiveName = $info['host'];
- $this->_basename = self::$_pharFiles[$info['host']];
- $this->_compressed = self::$_pharMapping[$this->_basename][1];
- }
- $file = $info['path'];
- return $file;
- }
-
- /**
- * Open the requested file - PHP streams API
- *
- * @param string $file String provided by the Stream wrapper
- * @access private
- */
- public function stream_open($file)
- {
- return $this->_streamOpen($file);
- }
-
- /**
- * @param string filename to opne, or directory name
- * @param bool if true, a directory will be matched, otherwise only files
- * will be matched
- * @uses trigger_error()
- * @return bool success of opening
- * @access private
- */
- private function _streamOpen($file, $searchForDir = false)
- {
- $path = $this->initializeStream($file);
- if (!$path) {
- trigger_error('Error: Unknown phar in "' . $file . '"', E_USER_ERROR);
- }
- if (is_array($this->file = $this->extractFile($path))) {
- trigger_error($this->file[0], E_USER_ERROR);
- return false;
- }
- if ($path != $this->currentFilename) {
- if (!$searchForDir) {
- trigger_error("Cannot open '$file', is a directory", E_USER_ERROR);
- return false;
- } else {
- $this->file = '';
- return true;
- }
- }
-
- if (!is_null($this->file) && $this->file !== false) {
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * Read the data - PHP streams API
- *
- * @param int
- * @access private
- */
- public function stream_read($count)
- {
- $ret = substr($this->file, $this->position, $count);
- $this->position += strlen($ret);
- return $ret;
- }
-
- /**
- * Whether we've hit the end of the file - PHP streams API
- * @access private
- */
- function stream_eof()
- {
- return $this->position >= $this->currentStat[7];
- }
-
- /**
- * For seeking the stream - PHP streams API
- * @param int
- * @param SEEK_SET|SEEK_CUR|SEEK_END
- * @access private
- */
- public function stream_seek($pos, $whence)
- {
- switch ($whence) {
- case SEEK_SET:
- if ($pos < 0) {
- return false;
- }
- $this->position = $pos;
- break;
- case SEEK_CUR:
- if ($pos + $this->currentStat[7] < 0) {
- return false;
- }
- $this->position += $pos;
- break;
- case SEEK_END:
- if ($pos + $this->currentStat[7] < 0) {
- return false;
- }
- $this->position = $pos + $this->currentStat[7];
- break;
- default:
- return false;
- }
- return true;
- }
-
- /**
- * The current position in the stream - PHP streams API
- * @access private
- */
- public function stream_tell()
- {
- return $this->position;
- }
-
- /**
- * The result of an fstat call, returns mod time from creation, and file size -
- * PHP streams API
- * @uses _stream_stat()
- * @access private
- */
- public function stream_stat()
- {
- return $this->_stream_stat();
- }
-
- /**
- * Retrieve statistics on a file or directory within the .phar
- * @param string file/directory to stat
- * @access private
- */
- public function _stream_stat($file = null)
- {
- $std = $file ? self::processFile($file) : $this->currentFilename;
- if ($file) {
- if (isset(self::$_manifest[$this->_archiveName][$file])) {
- $this->_setCurrentFile($file);
- $isdir = false;
- } else {
- do {
- $isdir = false;
- if ($file == '/') {
- break;
- }
- foreach (self::$_manifest[$this->_archiveName] as $path => $info) {
- if (strpos($path, $file) === 0) {
- if (strlen($path) > strlen($file) &&
- $path[strlen($file)] == '/') {
- break 2;
- }
- }
- }
- // no files exist and no directories match this string
- return false;
- } while (false);
- $isdir = true;
- }
- } else {
- $isdir = false; // open streams must be files
- }
- $mode = $isdir ? 0040444 : 0100444;
- // 040000 = dir, 010000 = file
- // everything is readable, nothing is writeable
- return array(
- 0, 0, $mode, 0, 0, 0, 0, 0, 0, 0, 0, 0, // non-associative indices
- 'dev' => 0, 'ino' => 0,
- 'mode' => $mode,
- 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'blksize' => 0, 'blocks' => 0,
- 'size' => $this->currentStat[7],
- 'atime' => $this->currentStat[9],
- 'mtime' => $this->currentStat[9],
- 'ctime' => $this->currentStat[9],
- );
- }
-
- /**
- * Stat a closed file or directory - PHP streams API
- * @param string
- * @param int
- * @access private
- */
- public function url_stat($url, $flags)
- {
- $path = $this->initializeStream($url);
- return $this->_stream_stat($path);
- }
-
- /**
- * Open a directory in the .phar for reading - PHP streams API
- * @param string directory name
- * @access private
- */
- public function dir_opendir($path)
- {
- $info = @parse_url($path);
- if (!$info) {
- $info = self::parseUrl($path);
- if (!$info) {
- trigger_error('Error: "' . $path . '" is a file, and cannot be opened with opendir',
- E_USER_ERROR);
- return false;
- }
- }
- $path = !empty($info['path']) ?
- $info['host'] . $info['path'] : $info['host'] . '/';
- $path = $this->initializeStream('phar://' . $path);
- if (isset(self::$_manifest[$this->_archiveName][$path])) {
- trigger_error('Error: "' . $path . '" is a file, and cannot be opened with opendir',
- E_USER_ERROR);
- return false;
- }
- if ($path == false) {
- trigger_error('Error: Unknown phar in "' . $file . '"', E_USER_ERROR);
- return false;
- }
- $this->fp = @fopen($this->_archiveName, "rb");
- if (!$this->fp) {
- trigger_error('Error: cannot open phar "' . $this->_archiveName . '"');
- return false;
- }
- $this->_dirFiles = array();
- foreach (self::$_manifest[$this->_archiveName] as $file => $info) {
- if ($path == '/') {
- if (strpos($file, '/')) {
- $a = explode('/', $file);
- $this->_dirFiles[array_shift($a)] = true;
- } else {
- $this->_dirFiles[$file] = true;
- }
- } elseif (strpos($file, $path) === 0) {
- $fname = substr($file, strlen($path) + 1);
- if ($fname == '/' || $fname[strlen($fname)-1] == '/') {
- continue; // empty directory
- }
- if (strpos($fname, '/')) {
- // this is a directory
- $a = explode('/', $fname);
- $this->_dirFiles[array_shift($a)] = true;
- } elseif ($file[strlen($path)] == '/') {
- // this is a file
- $this->_dirFiles[$fname] = true;
- }
- }
- }
- @fclose($this->fp);
- if (!count($this->_dirFiles)) {
- return false;
- }
- @uksort($this->_dirFiles, 'strnatcmp');
- return true;
- }
-
- /**
- * Read the next directory entry - PHP streams API
- * @access private
- */
- public function dir_readdir()
- {
- $ret = key($this->_dirFiles);
- @next($this->_dirFiles);
- if (!$ret) {
- return false;
- }
- return $ret;
- }
-
- /**
- * Close a directory handle opened with opendir() - PHP streams API
- * @access private
- */
- public function dir_closedir()
- {
- $this->_dirFiles = array();
- return true;
- }
-
- /**
- * Rewind to the first directory entry - PHP streams API
- * @access private
- */
- public function dir_rewinddir()
- {
- @reset($this->_dirFiles);
- return true;
- }
-
- /**
- * API version of this class
- * @return string
- */
- public static final function APIVersion()
- {
- return '1.0.0';
- }
-
- /**
- * Retrieve Phar-specific metadata for a Phar archive
- *
- * @param string $phar full path to Phar archive, or alias
- * @return null|mixed The value that was serialized for the Phar
- * archive's metadata
- * @throws Exception
- */
- public static function getPharMetadata($phar)
- {
- if (isset(self::$_pharFiles[$phar])) {
- $phar = self::$_pharFiles[$phar];
- }
- if (!isset(self::$_pharMapping[$phar])) {
- throw new Exception('Unknown Phar archive: "' . $phar . '"');
- }
- return self::$_pharMapping[$phar][4];
- }
-
- /**
- * Retrieve File-specific metadata for a Phar archive file
- *
- * @param string $phar full path to Phar archive, or alias
- * @param string $file relative path to file within Phar archive
- * @return null|mixed The value that was serialized for the Phar
- * archive's metadata
- * @throws Exception
- */
- public static function getFileMetadata($phar, $file)
- {
- if (!isset(self::$_pharFiles[$phar])) {
- if (!isset(self::$_pharMapping[$phar])) {
- throw new Exception('Unknown Phar archive: "' . $phar . '"');
- }
- $phar = self::$_pharMapping[$phar][0];
- }
- if (!isset(self::$_manifest[$phar])) {
- throw new Exception('Unknown Phar: "' . $phar . '"');
- }
- $file = self::processFile($file);
- if (!isset(self::$_manifest[$phar][$file])) {
- throw new Exception('Unknown file "' . $file . '" within Phar "'. $phar . '"');
- }
- return self::$_manifest[$phar][$file][6];
- }
-
- /**
- * @return list of supported signature algorithmns.
- */
- public static function getSupportedSignatures()
- {
- $ret = array('MD5', 'SHA-1');
- if (extension_loaded('hash')) {
- $ret[] = 'SHA-256';
- $ret[] = 'SHA-512';
- }
- if (extension_loaded('openssl')) {
- $ret[] = 'OpenSSL';
- }
- return $ret;
- }
-}}
-if (!class_exists('Phar')) {
- PHP_Archive::mapPhar(null, 43613 );
-} else {
- try {
- Phar::mapPhar();
- } catch (Exception $e) {
- echo $e->getMessage();
- }
-}
-if (class_exists('PHP_Archive') && !in_array('phar', stream_get_wrappers())) {
- stream_wrapper_register('phar', 'PHP_Archive');
-}
-
-@ini_set('memory_limit', -1);
-if (extension_loaded('phar')) {if (isset($_SERVER) && isset($_SERVER['REQUEST_URI'])) {
- $uri = parse_url($_SERVER['REQUEST_URI']);
- $archive = realpath($_SERVER['SCRIPT_FILENAME']);
- $subpath = str_replace('/' . basename($archive), '', $uri['path']);
- $mimetypes = array (
- 'aif' => 'audio/x-aiff',
- 'aiff' => 'audio/x-aiff',
- 'arc' => 'application/octet-stream',
- 'arj' => 'application/octet-stream',
- 'art' => 'image/x-jg',
- 'asf' => 'video/x-ms-asf',
- 'asx' => 'video/x-ms-asf',
- 'avi' => 'video/avi',
- 'bin' => 'application/octet-stream',
- 'bm' => 'image/bmp',
- 'bmp' => 'image/bmp',
- 'bz2' => 'application/x-bzip2',
- 'css' => 'text/css',
- 'doc' => 'application/msword',
- 'dot' => 'application/msword',
- 'dv' => 'video/x-dv',
- 'dvi' => 'application/x-dvi',
- 'eps' => 'application/postscript',
- 'exe' => 'application/octet-stream',
- 'gif' => 'image/gif',
- 'gz' => 'application/x-gzip',
- 'gzip' => 'application/x-gzip',
- 'htm' => 'text/html',
- 'html' => 'text/html',
- 'ico' => 'image/x-icon',
- 'jpe' => 'image/jpeg',
- 'jpg' => 'image/jpeg',
- 'jpeg' => 'image/jpeg',
- 'js' => 'application/x-javascript',
- 'log' => 'text/plain',
- 'mid' => 'audio/x-midi',
- 'mov' => 'video/quicktime',
- 'mp2' => 'audio/mpeg',
- 'mp3' => 'audio/mpeg3',
- 'mpg' => 'audio/mpeg',
- 'pdf' => 'aplication/pdf',
- 'png' => 'image/png',
- 'rtf' => 'application/rtf',
- 'tif' => 'image/tiff',
- 'tiff' => 'image/tiff',
- 'txt' => 'text/plain',
- 'xml' => 'text/xml',
-);
- $phpfiles = array (
- 'php' => true,
-);
- $phpsfiles = array (
- 'phps' => true,
-);
- $deny = array (
- 0 => '/.+\\.inc$/',
-);
- $subpath = str_replace('/' . basename($archive), '', $uri['path']);
- if (!$subpath || $subpath == '/') {
- $subpath = '/PEAR.php';
- }
- if ($subpath[0] != '/') {
- $subpath = '/' . $subpath;
- }
- if (!@file_exists('phar://' . $archive . $subpath)) {
- header("HTTP/1.0 404 Not Found");
- exit;
- }
-
- foreach ($deny as $pattern) {
- if (preg_match($pattern, $subpath)) {
- header("HTTP/1.0 404 Not Found");
- exit;
- }
- }
- $inf = pathinfo(basename($subpath));
- if (!isset($inf['extension'])) {
- header('Content-Type: text/plain');
- header('Content-Length: ' . filesize('phar://' . $archive . $subpath));
- readfile('phar://' . $archive . $subpath);
- exit;
- }
- if (isset($phpfiles[$inf['extension']])) {
- include 'phar://' . $archive . '/' . $subpath;
- exit;
- }
- if (isset($mimetypes[$inf['extension']])) {
- header('Content-Type: ' . $mimetypes[$inf['extension']]);
- header('Content-Length: ' . filesize('phar://' . $archive . $subpath));
- readfile('phar://' . $archive . $subpath);
- exit;
- }
- if (isset($phpsfiles[$inf['extension']])) {
- header('Content-Type: text/html');
- $c = highlight_file('phar://' . $archive . $subpath, true);
- header('Content-Length: ' . strlen($c));
- echo $c;
- exit;
- }
- header('Content-Type: text/plain');
- header('Content-Length: ' . filesize('phar://' . $archive . '/' . $subpath));
- readfile('phar://' . $archive . '/' . $subpath);
- exit;
-}} else {if (!empty($_SERVER['REQUEST_URI'])) {PHP_Archive::webFrontController('PEAR.php');exit;}}
-
-
-
-require_once 'phar://install-pear-nozlib.phar/index.php';
-__HALT_COMPILER();Û
-?
-?
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * File::CSV
- *
- * PHP versions 4 and 5
- *
- * Copyright (c) 1997-2008,
- * Vincent Blavet <vincent@phpconcept.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category File_Formats
- * @package Archive_Tar
- * @author Vincent Blavet <vincent@phpconcept.net>
- * @copyright 1997-2010 The Authors
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Archive_Tar
- */
-
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-
-define('ARCHIVE_TAR_ATT_SEPARATOR', 90001);
-define('ARCHIVE_TAR_END_BLOCK', pack("a512", ''));
-
-if (!function_exists('gzopen') && function_exists('gzopen64')) {
- function gzopen($filename, $mode, $use_include_path = 0)
- {
- return gzopen64($filename, $mode, $use_include_path);
- }
-}
-
-if (!function_exists('gztell') && function_exists('gztell64')) {
- function gztell($zp)
- {
- return gztell64($zp);
- }
-}
-
-if (!function_exists('gzseek') && function_exists('gzseek64')) {
- function gzseek($zp, $offset, $whence = SEEK_SET)
- {
- return gzseek64($zp, $offset, $whence);
- }
-}
-
-/**
- * Creates a (compressed) Tar archive
- *
- * @package Archive_Tar
- * @author Vincent Blavet <vincent@phpconcept.net>
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version $Revision$
- */
-class Archive_Tar extends PEAR
-{
- /**
- * @var string Name of the Tar
- */
- var $_tarname = '';
-
- /**
- * @var boolean if true, the Tar file will be gzipped
- */
- var $_compress = false;
-
- /**
- * @var string Type of compression : 'none', 'gz', 'bz2' or 'lzma2'
- */
- var $_compress_type = 'none';
-
- /**
- * @var string Explode separator
- */
- var $_separator = ' ';
-
- /**
- * @var file descriptor
- */
- var $_file = 0;
-
- /**
- * @var string Local Tar name of a remote Tar (http:// or ftp://)
- */
- var $_temp_tarname = '';
-
- /**
- * @var string regular expression for ignoring files or directories
- */
- var $_ignore_regexp = '';
-
- /**
- * @var object PEAR_Error object
- */
- var $error_object = null;
-
- // {{{ constructor
- /**
- * Archive_Tar Class constructor. This flavour of the constructor only
- * declare a new Archive_Tar object, identifying it by the name of the
- * tar file.
- * If the compress argument is set the tar will be read or created as a
- * gzip or bz2 compressed TAR file.
- *
- * @param string $p_tarname The name of the tar archive to create
- * @param string $p_compress can be null, 'gz', 'bz2' or 'lzma2'. This
- * parameter indicates if gzip, bz2 or lzma2 compression
- * is required. For compatibility reason the
- * boolean value 'true' means 'gz'.
- *
- * @access public
- */
- function Archive_Tar($p_tarname, $p_compress = null)
- {
- if (version_compare(PHP_VERSION, '5.0.0', '<')) {
- $this->PEAR();
- }
- $this->_compress = false;
- $this->_compress_type = 'none';
- if (($p_compress === null) || ($p_compress == '')) {
- if (@file_exists($p_tarname)) {
- if ($fp = @fopen($p_tarname, "rb")) {
- // look for gzip magic cookie
- $data = fread($fp, 2);
- fclose($fp);
- if ($data == "\37\213") {
- $this->_compress = true;
- $this->_compress_type = 'gz';
- // No sure it's enought for a magic code ....
- } elseif ($data == "BZ") {
- $this->_compress = true;
- $this->_compress_type = 'bz2';
- } elseif (file_get_contents($p_tarname, false, null, 1, 4) == '7zXZ') {
- $this->_compress = true;
- $this->_compress_type = 'lzma2';
- }
- }
- } else {
- // probably a remote file or some file accessible
- // through a stream interface
- if (substr($p_tarname, -2) == 'gz') {
- $this->_compress = true;
- $this->_compress_type = 'gz';
- } elseif ((substr($p_tarname, -3) == 'bz2') ||
- (substr($p_tarname, -2) == 'bz')
- ) {
- $this->_compress = true;
- $this->_compress_type = 'bz2';
- } else {
- if (substr($p_tarname, -2) == 'xz') {
- $this->_compress = true;
- $this->_compress_type = 'lzma2';
- }
- }
- }
- } else {
- if (($p_compress === true) || ($p_compress == 'gz')) {
- $this->_compress = true;
- $this->_compress_type = 'gz';
- } else {
- if ($p_compress == 'bz2') {
- $this->_compress = true;
- $this->_compress_type = 'bz2';
- } else {
- if ($p_compress == 'lzma2') {
- $this->_compress = true;
- $this->_compress_type = 'lzma2';
- } else {
- $this->_error(
- "Unsupported compression type '$p_compress'\n" .
- "Supported types are 'gz', 'bz2' and 'lzma2'.\n"
- );
- return false;
- }
- }
- }
- }
- $this->_tarname = $p_tarname;
- if ($this->_compress) { // assert zlib or bz2 or xz extension support
- if ($this->_compress_type == 'gz') {
- $extname = 'zlib';
- } else {
- if ($this->_compress_type == 'bz2') {
- $extname = 'bz2';
- } else {
- if ($this->_compress_type == 'lzma2') {
- $extname = 'xz';
- }
- }
- }
-
- if (!extension_loaded($extname)) {
- PEAR::loadExtension($extname);
- }
- if (!extension_loaded($extname)) {
- $this->_error(
- "The extension '$extname' couldn't be found.\n" .
- "Please make sure your version of PHP was built " .
- "with '$extname' support.\n"
- );
- return false;
- }
- }
- }
-
- // }}}
-
- // {{{ destructor
- function _Archive_Tar()
- {
- $this->_close();
- // ----- Look for a local copy to delete
- if ($this->_temp_tarname != '') {
- @unlink($this->_temp_tarname);
- }
- $this->_PEAR();
- }
-
- // }}}
-
- // {{{ PHP5-compatible destructor
- function __destruct()
- {
- $this->_Archive_Tar();
- }
-
- // }}}
-
- // {{{ create()
- /**
- * This method creates the archive file and add the files / directories
- * that are listed in $p_filelist.
- * If a file with the same name exist and is writable, it is replaced
- * by the new tar.
- * The method return false and a PEAR error text.
- * The $p_filelist parameter can be an array of string, each string
- * representing a filename or a directory name with their path if
- * needed. It can also be a single string with names separated by a
- * single blank.
- * For each directory added in the archive, the files and
- * sub-directories are also added.
- * See also createModify() method for more details.
- *
- * @param array $p_filelist An array of filenames and directory names, or a
- * single string with names separated by a single
- * blank space.
- *
- * @return true on success, false on error.
- * @see createModify()
- * @access public
- */
- function create($p_filelist)
- {
- return $this->createModify($p_filelist, '', '');
- }
-
- // }}}
-
- // {{{ add()
- /**
- * This method add the files / directories that are listed in $p_filelist in
- * the archive. If the archive does not exist it is created.
- * The method return false and a PEAR error text.
- * The files and directories listed are only added at the end of the archive,
- * even if a file with the same name is already archived.
- * See also createModify() method for more details.
- *
- * @param array $p_filelist An array of filenames and directory names, or a
- * single string with names separated by a single
- * blank space.
- *
- * @return true on success, false on error.
- * @see createModify()
- * @access public
- */
- function add($p_filelist)
- {
- return $this->addModify($p_filelist, '', '');
- }
-
- // }}}
-
- // {{{ extract()
- function extract($p_path = '', $p_preserve = false)
- {
- return $this->extractModify($p_path, '', $p_preserve);
- }
-
- // }}}
-
- // {{{ listContent()
- function listContent()
- {
- $v_list_detail = array();
-
- if ($this->_openRead()) {
- if (!$this->_extractList('', $v_list_detail, "list", '', '')) {
- unset($v_list_detail);
- $v_list_detail = 0;
- }
- $this->_close();
- }
-
- return $v_list_detail;
- }
-
- // }}}
-
- // {{{ createModify()
- /**
- * This method creates the archive file and add the files / directories
- * that are listed in $p_filelist.
- * If the file already exists and is writable, it is replaced by the
- * new tar. It is a create and not an add. If the file exists and is
- * read-only or is a directory it is not replaced. The method return
- * false and a PEAR error text.
- * The $p_filelist parameter can be an array of string, each string
- * representing a filename or a directory name with their path if
- * needed. It can also be a single string with names separated by a
- * single blank.
- * The path indicated in $p_remove_dir will be removed from the
- * memorized path of each file / directory listed when this path
- * exists. By default nothing is removed (empty path '')
- * The path indicated in $p_add_dir will be added at the beginning of
- * the memorized path of each file / directory listed. However it can
- * be set to empty ''. The adding of a path is done after the removing
- * of path.
- * The path add/remove ability enables the user to prepare an archive
- * for extraction in a different path than the origin files are.
- * See also addModify() method for file adding properties.
- *
- * @param array $p_filelist An array of filenames and directory names,
- * or a single string with names separated by
- * a single blank space.
- * @param string $p_add_dir A string which contains a path to be added
- * to the memorized path of each element in
- * the list.
- * @param string $p_remove_dir A string which contains a path to be
- * removed from the memorized path of each
- * element in the list, when relevant.
- *
- * @return boolean true on success, false on error.
- * @access public
- * @see addModify()
- */
- function createModify($p_filelist, $p_add_dir, $p_remove_dir = '')
- {
- $v_result = true;
-
- if (!$this->_openWrite()) {
- return false;
- }
-
- if ($p_filelist != '') {
- if (is_array($p_filelist)) {
- $v_list = $p_filelist;
- } elseif (is_string($p_filelist)) {
- $v_list = explode($this->_separator, $p_filelist);
- } else {
- $this->_cleanFile();
- $this->_error('Invalid file list');
- return false;
- }
-
- $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir);
- }
-
- if ($v_result) {
- $this->_writeFooter();
- $this->_close();
- } else {
- $this->_cleanFile();
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ addModify()
- /**
- * This method add the files / directories listed in $p_filelist at the
- * end of the existing archive. If the archive does not yet exists it
- * is created.
- * The $p_filelist parameter can be an array of string, each string
- * representing a filename or a directory name with their path if
- * needed. It can also be a single string with names separated by a
- * single blank.
- * The path indicated in $p_remove_dir will be removed from the
- * memorized path of each file / directory listed when this path
- * exists. By default nothing is removed (empty path '')
- * The path indicated in $p_add_dir will be added at the beginning of
- * the memorized path of each file / directory listed. However it can
- * be set to empty ''. The adding of a path is done after the removing
- * of path.
- * The path add/remove ability enables the user to prepare an archive
- * for extraction in a different path than the origin files are.
- * If a file/dir is already in the archive it will only be added at the
- * end of the archive. There is no update of the existing archived
- * file/dir. However while extracting the archive, the last file will
- * replace the first one. This results in a none optimization of the
- * archive size.
- * If a file/dir does not exist the file/dir is ignored. However an
- * error text is send to PEAR error.
- * If a file/dir is not readable the file/dir is ignored. However an
- * error text is send to PEAR error.
- *
- * @param array $p_filelist An array of filenames and directory
- * names, or a single string with names
- * separated by a single blank space.
- * @param string $p_add_dir A string which contains a path to be
- * added to the memorized path of each
- * element in the list.
- * @param string $p_remove_dir A string which contains a path to be
- * removed from the memorized path of
- * each element in the list, when
- * relevant.
- *
- * @return true on success, false on error.
- * @access public
- */
- function addModify($p_filelist, $p_add_dir, $p_remove_dir = '')
- {
- $v_result = true;
-
- if (!$this->_isArchive()) {
- $v_result = $this->createModify(
- $p_filelist,
- $p_add_dir,
- $p_remove_dir
- );
- } else {
- if (is_array($p_filelist)) {
- $v_list = $p_filelist;
- } elseif (is_string($p_filelist)) {
- $v_list = explode($this->_separator, $p_filelist);
- } else {
- $this->_error('Invalid file list');
- return false;
- }
-
- $v_result = $this->_append($v_list, $p_add_dir, $p_remove_dir);
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ addString()
- /**
- * This method add a single string as a file at the
- * end of the existing archive. If the archive does not yet exists it
- * is created.
- *
- * @param string $p_filename A string which contains the full
- * filename path that will be associated
- * with the string.
- * @param string $p_string The content of the file added in
- * the archive.
- * @param int $p_datetime A custom date/time (unix timestamp)
- * for the file (optional).
- * @param array $p_params An array of optional params:
- * stamp => the datetime (replaces
- * datetime above if it exists)
- * mode => the permissions on the
- * file (600 by default)
- * type => is this a link? See the
- * tar specification for details.
- * (default = regular file)
- * uid => the user ID of the file
- * (default = 0 = root)
- * gid => the group ID of the file
- * (default = 0 = root)
- *
- * @return true on success, false on error.
- * @access public
- */
- function addString($p_filename, $p_string, $p_datetime = false, $p_params = array())
- {
- $p_stamp = @$p_params["stamp"] ? $p_params["stamp"] : ($p_datetime ? $p_datetime : time());
- $p_mode = @$p_params["mode"] ? $p_params["mode"] : 0600;
- $p_type = @$p_params["type"] ? $p_params["type"] : "";
- $p_uid = @$p_params["uid"] ? $p_params["uid"] : "";
- $p_gid = @$p_params["gid"] ? $p_params["gid"] : "";
- $v_result = true;
-
- if (!$this->_isArchive()) {
- if (!$this->_openWrite()) {
- return false;
- }
- $this->_close();
- }
-
- if (!$this->_openAppend()) {
- return false;
- }
-
- // Need to check the get back to the temporary file ? ....
- $v_result = $this->_addString($p_filename, $p_string, $p_datetime, $p_params);
-
- $this->_writeFooter();
-
- $this->_close();
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ extractModify()
- /**
- * This method extract all the content of the archive in the directory
- * indicated by $p_path. When relevant the memorized path of the
- * files/dir can be modified by removing the $p_remove_path path at the
- * beginning of the file/dir path.
- * While extracting a file, if the directory path does not exists it is
- * created.
- * While extracting a file, if the file already exists it is replaced
- * without looking for last modification date.
- * While extracting a file, if the file already exists and is write
- * protected, the extraction is aborted.
- * While extracting a file, if a directory with the same name already
- * exists, the extraction is aborted.
- * While extracting a directory, if a file with the same name already
- * exists, the extraction is aborted.
- * While extracting a file/directory if the destination directory exist
- * and is write protected, or does not exist but can not be created,
- * the extraction is aborted.
- * If after extraction an extracted file does not show the correct
- * stored file size, the extraction is aborted.
- * When the extraction is aborted, a PEAR error text is set and false
- * is returned. However the result can be a partial extraction that may
- * need to be manually cleaned.
- *
- * @param string $p_path The path of the directory where the
- * files/dir need to by extracted.
- * @param string $p_remove_path Part of the memorized path that can be
- * removed if present at the beginning of
- * the file/dir path.
- * @param boolean $p_preserve Preserve user/group ownership of files
- *
- * @return boolean true on success, false on error.
- * @access public
- * @see extractList()
- */
- function extractModify($p_path, $p_remove_path, $p_preserve = false)
- {
- $v_result = true;
- $v_list_detail = array();
-
- if ($v_result = $this->_openRead()) {
- $v_result = $this->_extractList(
- $p_path,
- $v_list_detail,
- "complete",
- 0,
- $p_remove_path,
- $p_preserve
- );
- $this->_close();
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ extractInString()
- /**
- * This method extract from the archive one file identified by $p_filename.
- * The return value is a string with the file content, or NULL on error.
- *
- * @param string $p_filename The path of the file to extract in a string.
- *
- * @return a string with the file content or NULL.
- * @access public
- */
- function extractInString($p_filename)
- {
- if ($this->_openRead()) {
- $v_result = $this->_extractInString($p_filename);
- $this->_close();
- } else {
- $v_result = null;
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ extractList()
- /**
- * This method extract from the archive only the files indicated in the
- * $p_filelist. These files are extracted in the current directory or
- * in the directory indicated by the optional $p_path parameter.
- * If indicated the $p_remove_path can be used in the same way as it is
- * used in extractModify() method.
- *
- * @param array $p_filelist An array of filenames and directory names,
- * or a single string with names separated
- * by a single blank space.
- * @param string $p_path The path of the directory where the
- * files/dir need to by extracted.
- * @param string $p_remove_path Part of the memorized path that can be
- * removed if present at the beginning of
- * the file/dir path.
- * @param boolean $p_preserve Preserve user/group ownership of files
- *
- * @return true on success, false on error.
- * @access public
- * @see extractModify()
- */
- function extractList($p_filelist, $p_path = '', $p_remove_path = '', $p_preserve = false)
- {
- $v_result = true;
- $v_list_detail = array();
-
- if (is_array($p_filelist)) {
- $v_list = $p_filelist;
- } elseif (is_string($p_filelist)) {
- $v_list = explode($this->_separator, $p_filelist);
- } else {
- $this->_error('Invalid string list');
- return false;
- }
-
- if ($v_result = $this->_openRead()) {
- $v_result = $this->_extractList(
- $p_path,
- $v_list_detail,
- "partial",
- $v_list,
- $p_remove_path,
- $p_preserve
- );
- $this->_close();
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ setAttribute()
- /**
- * This method set specific attributes of the archive. It uses a variable
- * list of parameters, in the format attribute code + attribute values :
- * $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ',');
- *
- * @param mixed $argv variable list of attributes and values
- *
- * @return true on success, false on error.
- * @access public
- */
- function setAttribute()
- {
- $v_result = true;
-
- // ----- Get the number of variable list of arguments
- if (($v_size = func_num_args()) == 0) {
- return true;
- }
-
- // ----- Get the arguments
- $v_att_list = & func_get_args();
-
- // ----- Read the attributes
- $i = 0;
- while ($i < $v_size) {
-
- // ----- Look for next option
- switch ($v_att_list[$i]) {
- // ----- Look for options that request a string value
- case ARCHIVE_TAR_ATT_SEPARATOR :
- // ----- Check the number of parameters
- if (($i + 1) >= $v_size) {
- $this->_error(
- 'Invalid number of parameters for '
- . 'attribute ARCHIVE_TAR_ATT_SEPARATOR'
- );
- return false;
- }
-
- // ----- Get the value
- $this->_separator = $v_att_list[$i + 1];
- $i++;
- break;
-
- default :
- $this->_error('Unknown attribute code ' . $v_att_list[$i] . '');
- return false;
- }
-
- // ----- Next attribute
- $i++;
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ setIgnoreRegexp()
- /**
- * This method sets the regular expression for ignoring files and directories
- * at import, for example:
- * $arch->setIgnoreRegexp("#CVS|\.svn#");
- *
- * @param string $regexp regular expression defining which files or directories to ignore
- *
- * @access public
- */
- function setIgnoreRegexp($regexp)
- {
- $this->_ignore_regexp = $regexp;
- }
-
- // }}}
-
- // {{{ setIgnoreList()
- /**
- * This method sets the regular expression for ignoring all files and directories
- * matching the filenames in the array list at import, for example:
- * $arch->setIgnoreList(array('CVS', '.svn', 'bin/tool'));
- *
- * @param array $list a list of file or directory names to ignore
- *
- * @access public
- */
- function setIgnoreList($list)
- {
- $regexp = str_replace(array('#', '.', '^', '$'), array('\#', '\.', '\^', '\$'), $list);
- $regexp = '#/' . join('$|/', $list) . '#';
- $this->setIgnoreRegexp($regexp);
- }
-
- // }}}
-
- // {{{ _error()
- function _error($p_message)
- {
- $this->error_object = & $this->raiseError($p_message);
- }
-
- // }}}
-
- // {{{ _warning()
- function _warning($p_message)
- {
- $this->error_object = & $this->raiseError($p_message);
- }
-
- // }}}
-
- // {{{ _isArchive()
- function _isArchive($p_filename = null)
- {
- if ($p_filename == null) {
- $p_filename = $this->_tarname;
- }
- clearstatcache();
- return @is_file($p_filename) && !@is_link($p_filename);
- }
-
- // }}}
-
- // {{{ _openWrite()
- function _openWrite()
- {
- if ($this->_compress_type == 'gz' && function_exists('gzopen')) {
- $this->_file = @gzopen($this->_tarname, "wb9");
- } else {
- if ($this->_compress_type == 'bz2' && function_exists('bzopen')) {
- $this->_file = @bzopen($this->_tarname, "w");
- } else {
- if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) {
- $this->_file = @xzopen($this->_tarname, 'w');
- } else {
- if ($this->_compress_type == 'none') {
- $this->_file = @fopen($this->_tarname, "wb");
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- return false;
- }
- }
- }
- }
-
- if ($this->_file == 0) {
- $this->_error(
- 'Unable to open in write mode \''
- . $this->_tarname . '\''
- );
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _openRead()
- function _openRead()
- {
- if (strtolower(substr($this->_tarname, 0, 7)) == 'http://') {
-
- // ----- Look if a local copy need to be done
- if ($this->_temp_tarname == '') {
- $this->_temp_tarname = uniqid('tar') . '.tmp';
- if (!$v_file_from = @fopen($this->_tarname, 'rb')) {
- $this->_error(
- 'Unable to open in read mode \''
- . $this->_tarname . '\''
- );
- $this->_temp_tarname = '';
- return false;
- }
- if (!$v_file_to = @fopen($this->_temp_tarname, 'wb')) {
- $this->_error(
- 'Unable to open in write mode \''
- . $this->_temp_tarname . '\''
- );
- $this->_temp_tarname = '';
- return false;
- }
- while ($v_data = @fread($v_file_from, 1024)) {
- @fwrite($v_file_to, $v_data);
- }
- @fclose($v_file_from);
- @fclose($v_file_to);
- }
-
- // ----- File to open if the local copy
- $v_filename = $this->_temp_tarname;
-
- } else // ----- File to open if the normal Tar file
- {
- $v_filename = $this->_tarname;
- }
-
- if ($this->_compress_type == 'gz' && function_exists('gzopen')) {
- $this->_file = @gzopen($v_filename, "rb");
- } else {
- if ($this->_compress_type == 'bz2' && function_exists('bzopen')) {
- $this->_file = @bzopen($v_filename, "r");
- } else {
- if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) {
- $this->_file = @xzopen($v_filename, "r");
- } else {
- if ($this->_compress_type == 'none') {
- $this->_file = @fopen($v_filename, "rb");
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- return false;
- }
- }
- }
- }
-
- if ($this->_file == 0) {
- $this->_error('Unable to open in read mode \'' . $v_filename . '\'');
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _openReadWrite()
- function _openReadWrite()
- {
- if ($this->_compress_type == 'gz') {
- $this->_file = @gzopen($this->_tarname, "r+b");
- } else {
- if ($this->_compress_type == 'bz2') {
- $this->_error(
- 'Unable to open bz2 in read/write mode \''
- . $this->_tarname . '\' (limitation of bz2 extension)'
- );
- return false;
- } else {
- if ($this->_compress_type == 'lzma2') {
- $this->_error(
- 'Unable to open lzma2 in read/write mode \''
- . $this->_tarname . '\' (limitation of lzma2 extension)'
- );
- return false;
- } else {
- if ($this->_compress_type == 'none') {
- $this->_file = @fopen($this->_tarname, "r+b");
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- return false;
- }
- }
- }
- }
-
- if ($this->_file == 0) {
- $this->_error(
- 'Unable to open in read/write mode \''
- . $this->_tarname . '\''
- );
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _close()
- function _close()
- {
- //if (isset($this->_file)) {
- if (is_resource($this->_file)) {
- if ($this->_compress_type == 'gz') {
- @gzclose($this->_file);
- } else {
- if ($this->_compress_type == 'bz2') {
- @bzclose($this->_file);
- } else {
- if ($this->_compress_type == 'lzma2') {
- @xzclose($this->_file);
- } else {
- if ($this->_compress_type == 'none') {
- @fclose($this->_file);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
-
- $this->_file = 0;
- }
-
- // ----- Look if a local copy need to be erase
- // Note that it might be interesting to keep the url for a time : ToDo
- if ($this->_temp_tarname != '') {
- @unlink($this->_temp_tarname);
- $this->_temp_tarname = '';
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _cleanFile()
- function _cleanFile()
- {
- $this->_close();
-
- // ----- Look for a local copy
- if ($this->_temp_tarname != '') {
- // ----- Remove the local copy but not the remote tarname
- @unlink($this->_temp_tarname);
- $this->_temp_tarname = '';
- } else {
- // ----- Remove the local tarname file
- @unlink($this->_tarname);
- }
- $this->_tarname = '';
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeBlock()
- function _writeBlock($p_binary_data, $p_len = null)
- {
- if (is_resource($this->_file)) {
- if ($p_len === null) {
- if ($this->_compress_type == 'gz') {
- @gzputs($this->_file, $p_binary_data);
- } else {
- if ($this->_compress_type == 'bz2') {
- @bzwrite($this->_file, $p_binary_data);
- } else {
- if ($this->_compress_type == 'lzma2') {
- @xzwrite($this->_file, $p_binary_data);
- } else {
- if ($this->_compress_type == 'none') {
- @fputs($this->_file, $p_binary_data);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
- } else {
- if ($this->_compress_type == 'gz') {
- @gzputs($this->_file, $p_binary_data, $p_len);
- } else {
- if ($this->_compress_type == 'bz2') {
- @bzwrite($this->_file, $p_binary_data, $p_len);
- } else {
- if ($this->_compress_type == 'lzma2') {
- @xzwrite($this->_file, $p_binary_data, $p_len);
- } else {
- if ($this->_compress_type == 'none') {
- @fputs($this->_file, $p_binary_data, $p_len);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
-
- }
- }
- return true;
- }
-
- // }}}
-
- // {{{ _readBlock()
- function _readBlock()
- {
- $v_block = null;
- if (is_resource($this->_file)) {
- if ($this->_compress_type == 'gz') {
- $v_block = @gzread($this->_file, 512);
- } else {
- if ($this->_compress_type == 'bz2') {
- $v_block = @bzread($this->_file, 512);
- } else {
- if ($this->_compress_type == 'lzma2') {
- $v_block = @xzread($this->_file, 512);
- } else {
- if ($this->_compress_type == 'none') {
- $v_block = @fread($this->_file, 512);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
- }
- return $v_block;
- }
-
- // }}}
-
- // {{{ _jumpBlock()
- function _jumpBlock($p_len = null)
- {
- if (is_resource($this->_file)) {
- if ($p_len === null) {
- $p_len = 1;
- }
-
- if ($this->_compress_type == 'gz') {
- @gzseek($this->_file, gztell($this->_file) + ($p_len * 512));
- } else {
- if ($this->_compress_type == 'bz2') {
- // ----- Replace missing bztell() and bzseek()
- for ($i = 0; $i < $p_len; $i++) {
- $this->_readBlock();
- }
- } else {
- if ($this->_compress_type == 'lzma2') {
- // ----- Replace missing xztell() and xzseek()
- for ($i = 0; $i < $p_len; $i++) {
- $this->_readBlock();
- }
- } else {
- if ($this->_compress_type == 'none') {
- @fseek($this->_file, $p_len * 512, SEEK_CUR);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
-
- }
- return true;
- }
-
- // }}}
-
- // {{{ _writeFooter()
- function _writeFooter()
- {
- if (is_resource($this->_file)) {
- // ----- Write the last 0 filled block for end of archive
- $v_binary_data = pack('a1024', '');
- $this->_writeBlock($v_binary_data);
- }
- return true;
- }
-
- // }}}
-
- // {{{ _addList()
- function _addList($p_list, $p_add_dir, $p_remove_dir)
- {
- $v_result = true;
- $v_header = array();
-
- // ----- Remove potential windows directory separator
- $p_add_dir = $this->_translateWinPath($p_add_dir);
- $p_remove_dir = $this->_translateWinPath($p_remove_dir, false);
-
- if (!$this->_file) {
- $this->_error('Invalid file descriptor');
- return false;
- }
-
- if (sizeof($p_list) == 0) {
- return true;
- }
-
- foreach ($p_list as $v_filename) {
- if (!$v_result) {
- break;
- }
-
- // ----- Skip the current tar name
- if ($v_filename == $this->_tarname) {
- continue;
- }
-
- if ($v_filename == '') {
- continue;
- }
-
- // ----- ignore files and directories matching the ignore regular expression
- if ($this->_ignore_regexp && preg_match($this->_ignore_regexp, '/' . $v_filename)) {
- $this->_warning("File '$v_filename' ignored");
- continue;
- }
-
- if (!file_exists($v_filename) && !is_link($v_filename)) {
- $this->_warning("File '$v_filename' does not exist");
- continue;
- }
-
- // ----- Add the file or directory header
- if (!$this->_addFile($v_filename, $v_header, $p_add_dir, $p_remove_dir)) {
- return false;
- }
-
- if (@is_dir($v_filename) && !@is_link($v_filename)) {
- if (!($p_hdir = opendir($v_filename))) {
- $this->_warning("Directory '$v_filename' can not be read");
- continue;
- }
- while (false !== ($p_hitem = readdir($p_hdir))) {
- if (($p_hitem != '.') && ($p_hitem != '..')) {
- if ($v_filename != ".") {
- $p_temp_list[0] = $v_filename . '/' . $p_hitem;
- } else {
- $p_temp_list[0] = $p_hitem;
- }
-
- $v_result = $this->_addList(
- $p_temp_list,
- $p_add_dir,
- $p_remove_dir
- );
- }
- }
-
- unset($p_temp_list);
- unset($p_hdir);
- unset($p_hitem);
- }
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ _addFile()
- function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_stored_filename = null)
- {
- if (!$this->_file) {
- $this->_error('Invalid file descriptor');
- return false;
- }
-
- if ($p_filename == '') {
- $this->_error('Invalid file name');
- return false;
- }
-
- if (is_null($v_stored_filename)) {
- // ----- Calculate the stored filename
- $p_filename = $this->_translateWinPath($p_filename, false);;
- $v_stored_filename = $p_filename;
-
- if (strcmp($p_filename, $p_remove_dir) == 0) {
- return true;
- }
-
- if ($p_remove_dir != '') {
- if (substr($p_remove_dir, -1) != '/') {
- $p_remove_dir .= '/';
- }
-
- if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir) {
- $v_stored_filename = substr($p_filename, strlen($p_remove_dir));
- }
- }
-
- $v_stored_filename = $this->_translateWinPath($v_stored_filename);
- if ($p_add_dir != '') {
- if (substr($p_add_dir, -1) == '/') {
- $v_stored_filename = $p_add_dir . $v_stored_filename;
- } else {
- $v_stored_filename = $p_add_dir . '/' . $v_stored_filename;
- }
- }
-
- $v_stored_filename = $this->_pathReduction($v_stored_filename);
- }
-
- if ($this->_isArchive($p_filename)) {
- if (($v_file = @fopen($p_filename, "rb")) == 0) {
- $this->_warning(
- "Unable to open file '" . $p_filename
- . "' in binary read mode"
- );
- return true;
- }
-
- if (!$this->_writeHeader($p_filename, $v_stored_filename)) {
- return false;
- }
-
- while (($v_buffer = fread($v_file, 512)) != '') {
- $v_binary_data = pack("a512", "$v_buffer");
- $this->_writeBlock($v_binary_data);
- }
-
- fclose($v_file);
-
- } else {
- // ----- Only header for dir
- if (!$this->_writeHeader($p_filename, $v_stored_filename)) {
- return false;
- }
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _addString()
- function _addString($p_filename, $p_string, $p_datetime = false, $p_params = array())
- {
- $p_stamp = @$p_params["stamp"] ? $p_params["stamp"] : ($p_datetime ? $p_datetime : time());
- $p_mode = @$p_params["mode"] ? $p_params["mode"] : 0600;
- $p_type = @$p_params["type"] ? $p_params["type"] : "";
- $p_uid = @$p_params["uid"] ? $p_params["uid"] : 0;
- $p_gid = @$p_params["gid"] ? $p_params["gid"] : 0;
- if (!$this->_file) {
- $this->_error('Invalid file descriptor');
- return false;
- }
-
- if ($p_filename == '') {
- $this->_error('Invalid file name');
- return false;
- }
-
- // ----- Calculate the stored filename
- $p_filename = $this->_translateWinPath($p_filename, false);;
-
- // ----- If datetime is not specified, set current time
- if ($p_datetime === false) {
- $p_datetime = time();
- }
-
- if (!$this->_writeHeaderBlock(
- $p_filename,
- strlen($p_string),
- $p_stamp,
- $p_mode,
- $p_type,
- $p_uid,
- $p_gid
- )
- ) {
- return false;
- }
-
- $i = 0;
- while (($v_buffer = substr($p_string, (($i++) * 512), 512)) != '') {
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeHeader()
- function _writeHeader($p_filename, $p_stored_filename)
- {
- if ($p_stored_filename == '') {
- $p_stored_filename = $p_filename;
- }
- $v_reduce_filename = $this->_pathReduction($p_stored_filename);
-
- if (strlen($v_reduce_filename) > 99) {
- if (!$this->_writeLongHeader($v_reduce_filename)) {
- return false;
- }
- }
-
- $v_info = lstat($p_filename);
- $v_uid = sprintf("%07s", DecOct($v_info[4]));
- $v_gid = sprintf("%07s", DecOct($v_info[5]));
- $v_perms = sprintf("%07s", DecOct($v_info['mode'] & 000777));
-
- $v_mtime = sprintf("%011s", DecOct($v_info['mtime']));
-
- $v_linkname = '';
-
- if (@is_link($p_filename)) {
- $v_typeflag = '2';
- $v_linkname = readlink($p_filename);
- $v_size = sprintf("%011s", DecOct(0));
- } elseif (@is_dir($p_filename)) {
- $v_typeflag = "5";
- $v_size = sprintf("%011s", DecOct(0));
- } else {
- $v_typeflag = '0';
- clearstatcache();
- $v_size = sprintf("%011s", DecOct($v_info['size']));
- }
-
- $v_magic = 'ustar ';
-
- $v_version = ' ';
-
- if (function_exists('posix_getpwuid')) {
- $userinfo = posix_getpwuid($v_info[4]);
- $groupinfo = posix_getgrgid($v_info[5]);
-
- $v_uname = $userinfo['name'];
- $v_gname = $groupinfo['name'];
- } else {
- $v_uname = '';
- $v_gname = '';
- }
-
- $v_devmajor = '';
-
- $v_devminor = '';
-
- $v_prefix = '';
-
- $v_binary_data_first = pack(
- "a100a8a8a8a12a12",
- $v_reduce_filename,
- $v_perms,
- $v_uid,
- $v_gid,
- $v_size,
- $v_mtime
- );
- $v_binary_data_last = pack(
- "a1a100a6a2a32a32a8a8a155a12",
- $v_typeflag,
- $v_linkname,
- $v_magic,
- $v_version,
- $v_uname,
- $v_gname,
- $v_devmajor,
- $v_devminor,
- $v_prefix,
- ''
- );
-
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data_first, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156, $j = 0; $i < 512; $i++, $j++) {
- $v_checksum += ord(substr($v_binary_data_last, $j, 1));
- }
-
- // ----- Write the first 148 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_first, 148);
-
- // ----- Write the calculated checksum
- $v_checksum = sprintf("%06s ", DecOct($v_checksum));
- $v_binary_data = pack("a8", $v_checksum);
- $this->_writeBlock($v_binary_data, 8);
-
- // ----- Write the last 356 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_last, 356);
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeHeaderBlock()
- function _writeHeaderBlock(
- $p_filename,
- $p_size,
- $p_mtime = 0,
- $p_perms = 0,
- $p_type = '',
- $p_uid = 0,
- $p_gid = 0
- ) {
- $p_filename = $this->_pathReduction($p_filename);
-
- if (strlen($p_filename) > 99) {
- if (!$this->_writeLongHeader($p_filename)) {
- return false;
- }
- }
-
- if ($p_type == "5") {
- $v_size = sprintf("%011s", DecOct(0));
- } else {
- $v_size = sprintf("%011s", DecOct($p_size));
- }
-
- $v_uid = sprintf("%07s", DecOct($p_uid));
- $v_gid = sprintf("%07s", DecOct($p_gid));
- $v_perms = sprintf("%07s", DecOct($p_perms & 000777));
-
- $v_mtime = sprintf("%11s", DecOct($p_mtime));
-
- $v_linkname = '';
-
- $v_magic = 'ustar ';
-
- $v_version = ' ';
-
- if (function_exists('posix_getpwuid')) {
- $userinfo = posix_getpwuid($p_uid);
- $groupinfo = posix_getgrgid($p_gid);
-
- $v_uname = $userinfo['name'];
- $v_gname = $groupinfo['name'];
- } else {
- $v_uname = '';
- $v_gname = '';
- }
-
- $v_devmajor = '';
-
- $v_devminor = '';
-
- $v_prefix = '';
-
- $v_binary_data_first = pack(
- "a100a8a8a8a12A12",
- $p_filename,
- $v_perms,
- $v_uid,
- $v_gid,
- $v_size,
- $v_mtime
- );
- $v_binary_data_last = pack(
- "a1a100a6a2a32a32a8a8a155a12",
- $p_type,
- $v_linkname,
- $v_magic,
- $v_version,
- $v_uname,
- $v_gname,
- $v_devmajor,
- $v_devminor,
- $v_prefix,
- ''
- );
-
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data_first, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156, $j = 0; $i < 512; $i++, $j++) {
- $v_checksum += ord(substr($v_binary_data_last, $j, 1));
- }
-
- // ----- Write the first 148 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_first, 148);
-
- // ----- Write the calculated checksum
- $v_checksum = sprintf("%06s ", DecOct($v_checksum));
- $v_binary_data = pack("a8", $v_checksum);
- $this->_writeBlock($v_binary_data, 8);
-
- // ----- Write the last 356 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_last, 356);
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeLongHeader()
- function _writeLongHeader($p_filename)
- {
- $v_size = sprintf("%11s ", DecOct(strlen($p_filename)));
-
- $v_typeflag = 'L';
-
- $v_linkname = '';
-
- $v_magic = '';
-
- $v_version = '';
-
- $v_uname = '';
-
- $v_gname = '';
-
- $v_devmajor = '';
-
- $v_devminor = '';
-
- $v_prefix = '';
-
- $v_binary_data_first = pack(
- "a100a8a8a8a12a12",
- '././@LongLink',
- 0,
- 0,
- 0,
- $v_size,
- 0
- );
- $v_binary_data_last = pack(
- "a1a100a6a2a32a32a8a8a155a12",
- $v_typeflag,
- $v_linkname,
- $v_magic,
- $v_version,
- $v_uname,
- $v_gname,
- $v_devmajor,
- $v_devminor,
- $v_prefix,
- ''
- );
-
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data_first, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156, $j = 0; $i < 512; $i++, $j++) {
- $v_checksum += ord(substr($v_binary_data_last, $j, 1));
- }
-
- // ----- Write the first 148 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_first, 148);
-
- // ----- Write the calculated checksum
- $v_checksum = sprintf("%06s ", DecOct($v_checksum));
- $v_binary_data = pack("a8", $v_checksum);
- $this->_writeBlock($v_binary_data, 8);
-
- // ----- Write the last 356 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_last, 356);
-
- // ----- Write the filename as content of the block
- $i = 0;
- while (($v_buffer = substr($p_filename, (($i++) * 512), 512)) != '') {
- $v_binary_data = pack("a512", "$v_buffer");
- $this->_writeBlock($v_binary_data);
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _readHeader()
- function _readHeader($v_binary_data, &$v_header)
- {
- if (strlen($v_binary_data) == 0) {
- $v_header['filename'] = '';
- return true;
- }
-
- if (strlen($v_binary_data) != 512) {
- $v_header['filename'] = '';
- $this->_error('Invalid block size : ' . strlen($v_binary_data));
- return false;
- }
-
- if (!is_array($v_header)) {
- $v_header = array();
- }
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156; $i < 512; $i++) {
- $v_checksum += ord(substr($v_binary_data, $i, 1));
- }
-
- if (version_compare(PHP_VERSION, "5.5.0-dev") < 0) {
- $fmt = "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" .
- "a8checksum/a1typeflag/a100link/a6magic/a2version/" .
- "a32uname/a32gname/a8devmajor/a8devminor/a131prefix";
- } else {
- $fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" .
- "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" .
- "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix";
- }
- $v_data = unpack($fmt, $v_binary_data);
-
- if (strlen($v_data["prefix"]) > 0) {
- $v_data["filename"] = "$v_data[prefix]/$v_data[filename]";
- }
-
- // ----- Extract the checksum
- $v_header['checksum'] = OctDec(trim($v_data['checksum']));
- if ($v_header['checksum'] != $v_checksum) {
- $v_header['filename'] = '';
-
- // ----- Look for last block (empty block)
- if (($v_checksum == 256) && ($v_header['checksum'] == 0)) {
- return true;
- }
-
- $this->_error(
- 'Invalid checksum for file "' . $v_data['filename']
- . '" : ' . $v_checksum . ' calculated, '
- . $v_header['checksum'] . ' expected'
- );
- return false;
- }
-
- // ----- Extract the properties
- $v_header['filename'] = rtrim($v_data['filename'], "\0");
- if ($this->_maliciousFilename($v_header['filename'])) {
- $this->_error(
- 'Malicious .tar detected, file "' . $v_header['filename'] .
- '" will not install in desired directory tree'
- );
- return false;
- }
- $v_header['mode'] = OctDec(trim($v_data['mode']));
- $v_header['uid'] = OctDec(trim($v_data['uid']));
- $v_header['gid'] = OctDec(trim($v_data['gid']));
- $v_header['size'] = OctDec(trim($v_data['size']));
- $v_header['mtime'] = OctDec(trim($v_data['mtime']));
- if (($v_header['typeflag'] = $v_data['typeflag']) == "5") {
- $v_header['size'] = 0;
- }
- $v_header['link'] = trim($v_data['link']);
- /* ----- All these fields are removed form the header because
- they do not carry interesting info
- $v_header[magic] = trim($v_data[magic]);
- $v_header[version] = trim($v_data[version]);
- $v_header[uname] = trim($v_data[uname]);
- $v_header[gname] = trim($v_data[gname]);
- $v_header[devmajor] = trim($v_data[devmajor]);
- $v_header[devminor] = trim($v_data[devminor]);
- */
-
- return true;
- }
-
- // }}}
-
- // {{{ _maliciousFilename()
- /**
- * Detect and report a malicious file name
- *
- * @param string $file
- *
- * @return bool
- * @access private
- */
- function _maliciousFilename($file)
- {
- if (strpos($file, '/../') !== false) {
- return true;
- }
- if (strpos($file, '../') === 0) {
- return true;
- }
- return false;
- }
-
- // }}}
-
- // {{{ _readLongHeader()
- function _readLongHeader(&$v_header)
- {
- $v_filename = '';
- $v_filesize = $v_header['size'];
- $n = floor($v_header['size'] / 512);
- for ($i = 0; $i < $n; $i++) {
- $v_content = $this->_readBlock();
- $v_filename .= $v_content;
- }
- if (($v_header['size'] % 512) != 0) {
- $v_content = $this->_readBlock();
- $v_filename .= $v_content;
- }
-
- // ----- Read the next header
- $v_binary_data = $this->_readBlock();
-
- if (!$this->_readHeader($v_binary_data, $v_header)) {
- return false;
- }
-
- $v_filename = rtrim(substr($v_filename, 0, $v_filesize), "\0");
- $v_header['filename'] = $v_filename;
- if ($this->_maliciousFilename($v_filename)) {
- $this->_error(
- 'Malicious .tar detected, file "' . $v_filename .
- '" will not install in desired directory tree'
- );
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _extractInString()
- /**
- * This method extract from the archive one file identified by $p_filename.
- * The return value is a string with the file content, or null on error.
- *
- * @param string $p_filename The path of the file to extract in a string.
- *
- * @return a string with the file content or null.
- * @access private
- */
- function _extractInString($p_filename)
- {
- $v_result_str = "";
-
- While (strlen($v_binary_data = $this->_readBlock()) != 0) {
- if (!$this->_readHeader($v_binary_data, $v_header)) {
- return null;
- }
-
- if ($v_header['filename'] == '') {
- continue;
- }
-
- // ----- Look for long filename
- if ($v_header['typeflag'] == 'L') {
- if (!$this->_readLongHeader($v_header)) {
- return null;
- }
- }
-
- if ($v_header['filename'] == $p_filename) {
- if ($v_header['typeflag'] == "5") {
- $this->_error(
- 'Unable to extract in string a directory '
- . 'entry {' . $v_header['filename'] . '}'
- );
- return null;
- } else {
- $n = floor($v_header['size'] / 512);
- for ($i = 0; $i < $n; $i++) {
- $v_result_str .= $this->_readBlock();
- }
- if (($v_header['size'] % 512) != 0) {
- $v_content = $this->_readBlock();
- $v_result_str .= substr(
- $v_content,
- 0,
- ($v_header['size'] % 512)
- );
- }
- return $v_result_str;
- }
- } else {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- }
- }
-
- return null;
- }
-
- // }}}
-
- // {{{ _extractList()
- function _extractList(
- $p_path,
- &$p_list_detail,
- $p_mode,
- $p_file_list,
- $p_remove_path,
- $p_preserve = false
- ) {
- $v_result = true;
- $v_nb = 0;
- $v_extract_all = true;
- $v_listing = false;
-
- $p_path = $this->_translateWinPath($p_path, false);
- if ($p_path == '' || (substr($p_path, 0, 1) != '/'
- && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':'))
- ) {
- $p_path = "./" . $p_path;
- }
- $p_remove_path = $this->_translateWinPath($p_remove_path);
-
- // ----- Look for path to remove format (should end by /)
- if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/')) {
- $p_remove_path .= '/';
- }
- $p_remove_path_size = strlen($p_remove_path);
-
- switch ($p_mode) {
- case "complete" :
- $v_extract_all = true;
- $v_listing = false;
- break;
- case "partial" :
- $v_extract_all = false;
- $v_listing = false;
- break;
- case "list" :
- $v_extract_all = false;
- $v_listing = true;
- break;
- default :
- $this->_error('Invalid extract mode (' . $p_mode . ')');
- return false;
- }
-
- clearstatcache();
-
- while (strlen($v_binary_data = $this->_readBlock()) != 0) {
- $v_extract_file = false;
- $v_extraction_stopped = 0;
-
- if (!$this->_readHeader($v_binary_data, $v_header)) {
- return false;
- }
-
- if ($v_header['filename'] == '') {
- continue;
- }
-
- // ----- Look for long filename
- if ($v_header['typeflag'] == 'L') {
- if (!$this->_readLongHeader($v_header)) {
- return false;
- }
- }
-
- // ignore extended / pax headers
- if ($v_header['typeflag'] == 'x' || $v_header['typeflag'] == 'g') {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- continue;
- }
-
- if ((!$v_extract_all) && (is_array($p_file_list))) {
- // ----- By default no unzip if the file is not found
- $v_extract_file = false;
-
- for ($i = 0; $i < sizeof($p_file_list); $i++) {
- // ----- Look if it is a directory
- if (substr($p_file_list[$i], -1) == '/') {
- // ----- Look if the directory is in the filename path
- if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
- && (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
- == $p_file_list[$i])
- ) {
- $v_extract_file = true;
- break;
- }
- } // ----- It is a file, so compare the file names
- elseif ($p_file_list[$i] == $v_header['filename']) {
- $v_extract_file = true;
- break;
- }
- }
- } else {
- $v_extract_file = true;
- }
-
- // ----- Look if this file need to be extracted
- if (($v_extract_file) && (!$v_listing)) {
- if (($p_remove_path != '')
- && (substr($v_header['filename'] . '/', 0, $p_remove_path_size)
- == $p_remove_path)
- ) {
- $v_header['filename'] = substr(
- $v_header['filename'],
- $p_remove_path_size
- );
- if ($v_header['filename'] == '') {
- continue;
- }
- }
- if (($p_path != './') && ($p_path != '/')) {
- while (substr($p_path, -1) == '/') {
- $p_path = substr($p_path, 0, strlen($p_path) - 1);
- }
-
- if (substr($v_header['filename'], 0, 1) == '/') {
- $v_header['filename'] = $p_path . $v_header['filename'];
- } else {
- $v_header['filename'] = $p_path . '/' . $v_header['filename'];
- }
- }
- if (file_exists($v_header['filename'])) {
- if ((@is_dir($v_header['filename']))
- && ($v_header['typeflag'] == '')
- ) {
- $this->_error(
- 'File ' . $v_header['filename']
- . ' already exists as a directory'
- );
- return false;
- }
- if (($this->_isArchive($v_header['filename']))
- && ($v_header['typeflag'] == "5")
- ) {
- $this->_error(
- 'Directory ' . $v_header['filename']
- . ' already exists as a file'
- );
- return false;
- }
- if (!is_writeable($v_header['filename'])) {
- $this->_error(
- 'File ' . $v_header['filename']
- . ' already exists and is write protected'
- );
- return false;
- }
- if (filemtime($v_header['filename']) > $v_header['mtime']) {
- // To be completed : An error or silent no replace ?
- }
- } // ----- Check the directory availability and create it if necessary
- elseif (($v_result
- = $this->_dirCheck(
- ($v_header['typeflag'] == "5"
- ? $v_header['filename']
- : dirname($v_header['filename']))
- )) != 1
- ) {
- $this->_error('Unable to create path for ' . $v_header['filename']);
- return false;
- }
-
- if ($v_extract_file) {
- if ($v_header['typeflag'] == "5") {
- if (!@file_exists($v_header['filename'])) {
- if (!@mkdir($v_header['filename'], 0777)) {
- $this->_error(
- 'Unable to create directory {'
- . $v_header['filename'] . '}'
- );
- return false;
- }
- }
- } elseif ($v_header['typeflag'] == "2") {
- if (@file_exists($v_header['filename'])) {
- @unlink($v_header['filename']);
- }
- if (!@symlink($v_header['link'], $v_header['filename'])) {
- $this->_error(
- 'Unable to extract symbolic link {'
- . $v_header['filename'] . '}'
- );
- return false;
- }
- } else {
- if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
- $this->_error(
- 'Error while opening {' . $v_header['filename']
- . '} in write binary mode'
- );
- return false;
- } else {
- $n = floor($v_header['size'] / 512);
- for ($i = 0; $i < $n; $i++) {
- $v_content = $this->_readBlock();
- fwrite($v_dest_file, $v_content, 512);
- }
- if (($v_header['size'] % 512) != 0) {
- $v_content = $this->_readBlock();
- fwrite($v_dest_file, $v_content, ($v_header['size'] % 512));
- }
-
- @fclose($v_dest_file);
-
- if ($p_preserve) {
- @chown($v_header['filename'], $v_header['uid']);
- @chgrp($v_header['filename'], $v_header['gid']);
- }
-
- // ----- Change the file mode, mtime
- @touch($v_header['filename'], $v_header['mtime']);
- if ($v_header['mode'] & 0111) {
- // make file executable, obey umask
- $mode = fileperms($v_header['filename']) | (~umask() & 0111);
- @chmod($v_header['filename'], $mode);
- }
- }
-
- // ----- Check the file size
- clearstatcache();
- if (!is_file($v_header['filename'])) {
- $this->_error(
- 'Extracted file ' . $v_header['filename']
- . 'does not exist. Archive may be corrupted.'
- );
- return false;
- }
-
- $filesize = filesize($v_header['filename']);
- if ($filesize != $v_header['size']) {
- $this->_error(
- 'Extracted file ' . $v_header['filename']
- . ' does not have the correct file size \''
- . $filesize
- . '\' (' . $v_header['size']
- . ' expected). Archive may be corrupted.'
- );
- return false;
- }
- }
- } else {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- }
- } else {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- }
-
- /* TBC : Seems to be unused ...
- if ($this->_compress)
- $v_end_of_file = @gzeof($this->_file);
- else
- $v_end_of_file = @feof($this->_file);
- */
-
- if ($v_listing || $v_extract_file || $v_extraction_stopped) {
- // ----- Log extracted files
- if (($v_file_dir = dirname($v_header['filename']))
- == $v_header['filename']
- ) {
- $v_file_dir = '';
- }
- if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == '')) {
- $v_file_dir = '/';
- }
-
- $p_list_detail[$v_nb++] = $v_header;
- if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) {
- return true;
- }
- }
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _openAppend()
- function _openAppend()
- {
- if (filesize($this->_tarname) == 0) {
- return $this->_openWrite();
- }
-
- if ($this->_compress) {
- $this->_close();
-
- if (!@rename($this->_tarname, $this->_tarname . ".tmp")) {
- $this->_error(
- 'Error while renaming \'' . $this->_tarname
- . '\' to temporary file \'' . $this->_tarname
- . '.tmp\''
- );
- return false;
- }
-
- if ($this->_compress_type == 'gz') {
- $v_temp_tar = @gzopen($this->_tarname . ".tmp", "rb");
- } elseif ($this->_compress_type == 'bz2') {
- $v_temp_tar = @bzopen($this->_tarname . ".tmp", "r");
- } elseif ($this->_compress_type == 'lzma2') {
- $v_temp_tar = @xzopen($this->_tarname . ".tmp", "r");
- }
-
-
- if ($v_temp_tar == 0) {
- $this->_error(
- 'Unable to open file \'' . $this->_tarname
- . '.tmp\' in binary read mode'
- );
- @rename($this->_tarname . ".tmp", $this->_tarname);
- return false;
- }
-
- if (!$this->_openWrite()) {
- @rename($this->_tarname . ".tmp", $this->_tarname);
- return false;
- }
-
- if ($this->_compress_type == 'gz') {
- $end_blocks = 0;
-
- while (!@gzeof($v_temp_tar)) {
- $v_buffer = @gzread($v_temp_tar, 512);
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
- $end_blocks++;
- // do not copy end blocks, we will re-make them
- // after appending
- continue;
- } elseif ($end_blocks > 0) {
- for ($i = 0; $i < $end_blocks; $i++) {
- $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
- }
- $end_blocks = 0;
- }
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- @gzclose($v_temp_tar);
- } elseif ($this->_compress_type == 'bz2') {
- $end_blocks = 0;
-
- while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) {
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
- $end_blocks++;
- // do not copy end blocks, we will re-make them
- // after appending
- continue;
- } elseif ($end_blocks > 0) {
- for ($i = 0; $i < $end_blocks; $i++) {
- $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
- }
- $end_blocks = 0;
- }
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- @bzclose($v_temp_tar);
- } elseif ($this->_compress_type == 'lzma2') {
- $end_blocks = 0;
-
- while (strlen($v_buffer = @xzread($v_temp_tar, 512)) > 0) {
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
- $end_blocks++;
- // do not copy end blocks, we will re-make them
- // after appending
- continue;
- } elseif ($end_blocks > 0) {
- for ($i = 0; $i < $end_blocks; $i++) {
- $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
- }
- $end_blocks = 0;
- }
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- @xzclose($v_temp_tar);
- }
-
- if (!@unlink($this->_tarname . ".tmp")) {
- $this->_error(
- 'Error while deleting temporary file \''
- . $this->_tarname . '.tmp\''
- );
- }
-
- } else {
- // ----- For not compressed tar, just add files before the last
- // one or two 512 bytes block
- if (!$this->_openReadWrite()) {
- return false;
- }
-
- clearstatcache();
- $v_size = filesize($this->_tarname);
-
- // We might have zero, one or two end blocks.
- // The standard is two, but we should try to handle
- // other cases.
- fseek($this->_file, $v_size - 1024);
- if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
- fseek($this->_file, $v_size - 1024);
- } elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
- fseek($this->_file, $v_size - 512);
- }
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _append()
- function _append($p_filelist, $p_add_dir = '', $p_remove_dir = '')
- {
- if (!$this->_openAppend()) {
- return false;
- }
-
- if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir)) {
- $this->_writeFooter();
- }
-
- $this->_close();
-
- return true;
- }
-
- // }}}
-
- // {{{ _dirCheck()
-
- /**
- * Check if a directory exists and create it (including parent
- * dirs) if not.
- *
- * @param string $p_dir directory to check
- *
- * @return bool true if the directory exists or was created
- */
- function _dirCheck($p_dir)
- {
- clearstatcache();
- if ((@is_dir($p_dir)) || ($p_dir == '')) {
- return true;
- }
-
- $p_parent_dir = dirname($p_dir);
-
- if (($p_parent_dir != $p_dir) &&
- ($p_parent_dir != '') &&
- (!$this->_dirCheck($p_parent_dir))
- ) {
- return false;
- }
-
- if (!@mkdir($p_dir, 0777)) {
- $this->_error("Unable to create directory '$p_dir'");
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _pathReduction()
-
- /**
- * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar",
- * rand emove double slashes.
- *
- * @param string $p_dir path to reduce
- *
- * @return string reduced path
- *
- * @access private
- *
- */
- function _pathReduction($p_dir)
- {
- $v_result = '';
-
- // ----- Look for not empty path
- if ($p_dir != '') {
- // ----- Explode path by directory names
- $v_list = explode('/', $p_dir);
-
- // ----- Study directories from last to first
- for ($i = sizeof($v_list) - 1; $i >= 0; $i--) {
- // ----- Look for current path
- if ($v_list[$i] == ".") {
- // ----- Ignore this directory
- // Should be the first $i=0, but no check is done
- } else {
- if ($v_list[$i] == "..") {
- // ----- Ignore it and ignore the $i-1
- $i--;
- } else {
- if (($v_list[$i] == '')
- && ($i != (sizeof($v_list) - 1))
- && ($i != 0)
- ) {
- // ----- Ignore only the double '//' in path,
- // but not the first and last /
- } else {
- $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/'
- . $v_result : '');
- }
- }
- }
- }
- }
-
- if (defined('OS_WINDOWS') && OS_WINDOWS) {
- $v_result = strtr($v_result, '\\', '/');
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ _translateWinPath()
- function _translateWinPath($p_path, $p_remove_disk_letter = true)
- {
- if (defined('OS_WINDOWS') && OS_WINDOWS) {
- // ----- Look for potential disk letter
- if (($p_remove_disk_letter)
- && (($v_position = strpos($p_path, ':')) != false)
- ) {
- $p_path = substr($p_path, $v_position + 1);
- }
- // ----- Change potential windows directory separator
- if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0, 1) == '\\')) {
- $p_path = strtr($p_path, '\\', '/');
- }
- }
- return $p_path;
- }
- // }}}
-
-}
-
-?>
-package.xml
-<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Archive_Tar</name>
- <channel>pear.php.net</channel>
- <summary>Tar file management class</summary>
- <description>This class provides handling of tar files in PHP.
-It supports creating, listing, extracting and adding to tar files.
-Gzip support is available if PHP has the zlib extension built-in or
-loaded. Bz2 compression is also supported with the bz2 extension loaded.</description>
- <lead>
- <name>Vincent Blavet</name>
- <user>vblavet</user>
- <email>vincent@phpconcept.net</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Greg Beaver</name>
- <user>cellog</user>
- <email>greg@chiaraquartet.net</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Michiel Rook</name>
- <user>mrook</user>
- <email>mrook@php.net</email>
- <active>yes</active>
- </lead>
- <helper>
- <name>Stig Bakken</name>
- <user>ssb</user>
- <email>stig@php.net</email>
- <active>no</active>
- </helper>
- <date>2015-04-14</date>
- <time>12:24:12</time>
- <version>
- <release>1.3.16</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #20514: invalid package.xml; not installable with pyrus [mrook]
- </notes>
- <contents>
- <dir name="/">
- <file baseinstalldir="/" md5sum="d8be5182769eaa7fa3fc2596473f4838" name="Archive/Tar.php" role="php" />
- <file baseinstalldir="/" md5sum="2fb90f0be7089a45c09a0d1182792419" name="docs/Archive_Tar.txt" role="doc" />
- </dir>
- </contents>
- <compatible>
- <name>PEAR</name>
- <channel>pear.php.net</channel>
- <min>1.8.0</min>
- <max>1.9.10</max>
- </compatible>
- <dependencies>
- <required>
- <php>
- <min>4.3.0</min>
- </php>
- <pearinstaller>
- <min>1.5.4</min>
- </pearinstaller>
- </required>
- </dependencies>
- <phprelease />
- <changelog>
- <release>
- <version>
- <release>1.3.15</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2015-03-05</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fixes composer.json parse error
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.14</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2015-02-26</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #18505: Possible incorrect handling of file names in TAR [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.13</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2014-09-02</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD
- License</license>
- <notes>
-* Fix Bug #20382: gzopen fix [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.12</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2014-08-04</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD
- License</license>
- <notes>
-* Fix Bug #19964: Memory leaking in Archive_Tar [mrook]
- * Fix Bug #20246: Broken with php 5.5.9 [mrook]
- * Fix Bug #20275: &quot;pax_global_header&quot; looks like a regular file
- * [mrook]
- * Implement Feature #19827: pass filename to _addFile function - downstream
- * patch [mrook]
- * Implement Feature #20132: Add custom mode/uid/gid to addString() [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.11</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2013-02-09</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD
- License</license>
- <notes>
-* Fix Bug #19746: Broken with PHP 5.5 [mrook]
- * Implement Feature #11258: Custom date/time in files added on-the-fly
- * [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.10</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2012-04-10</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD
- License</license>
- <notes>
-* Fix Bug #13361: Unable to add() some files (ex. mp3) [mrook]
- * Fix Bug #19330: Class creates incorrect (non-readable) tar.gz file
- * [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.9</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2012-02-27</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #16759: No error thrown from missing PHP zlib functions [mrook]
- * Fix Bug #18877: Incorrect handling of backslashes in filenames on Linux [mrook]
- * Fix Bug #19085: Error while packaging [mrook]
- * Fix Bug #19289: Invalid tar file generated [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.8</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2011-10-14</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #17853: Test failure: dirtraversal.phpt [mrook]
- * Fix Bug #18512: dead links are not saved in tar file [mrook]
- * Fix Bug #18702: Unpacks incorrectly on long file names using header prefix [mrook]
- * Implement Feature #10145: Patch to return a Pear Error Object on failure [mrook]
- * Implement Feature #17491: Option to preserve permissions [mrook]
- * Implement Feature #17813: Prevent PHP notice when extracting corrupted archive [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.7</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2010-04-26</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-PEAR compatibility update
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.6</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2010-03-09</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #16963: extractList can&apos;t extract zipped files from big tar [mrook]
- * Implement Feature #4013: Ignoring files and directories on creating an archive. [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.5</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2009-12-31</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #16958: Update &apos;compatible&apos; tag in package.xml [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.4</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2009-12-30</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #11871: wrong result of ::listContent() if filename begins or ends with space [mrook]
- * Fix Bug #12462: invalid tar magic [mrook]
- * Fix Bug #13918: Long filenames may get up to 511 0x00 bytes appended on read [mrook]
- * Fix Bug #16202: Bogus modification times [mrook]
- * Implement Feature #16212: Die is not exception [mrook]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.3</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2009-03-27</date>
- <license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-Change the license to New BSD license
-
- minor bugfix release
- * fix Bug #9921 compression with bzip2 fails [cellog]
- * fix Bug #11594 _readLongHeader leaves 0 bytes in filename [jamessas]
- * fix Bug #11769 Incorrect symlink handing [fajar99]
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.2</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2007-01-03</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Correct Bug #4016
-Remove duplicate remove error display with &apos;@&apos;
-Correct Bug #3909 : Check existence of OS_WINDOWS constant
-Correct Bug #5452 fix for &quot;lone zero block&quot; when untarring packages
-Change filemode (from pear-core/Archive/Tar.php v.1.21)
-Correct Bug #6486 Can not extract symlinks
-Correct Bug #6933 Archive_Tar (Tar file management class) Directory traversal
-Correct Bug #8114 Files added on-the-fly not storing date
-Correct Bug #9352 Bug on _dirCheck function over nfs path
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.1</release>
- <api>1.3.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2005-03-17</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Correct Bug #3855
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.0</release>
- <api>1.3.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2005-03-06</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Bugs correction (2475, 2488, 2135, 2176)
- </notes>
- </release>
- <release>
- <version>
- <release>1.2</release>
- <api>1.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2004-05-08</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Add support for other separator than the space char and bug
- correction
- </notes>
- </release>
- <release>
- <version>
- <release>1.1</release>
- <api>1.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-05-28</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-* Add support for BZ2 compression
-* Add support for add and extract without using temporary files : methods addString() and extractInString()
- </notes>
- </release>
- <release>
- <version>
- <release>1.0</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-01-24</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Change status to stable
- </notes>
- </release>
- <release>
- <version>
- <release>0.10-b1</release>
- <api>0.10-b1</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2003-01-08</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Add support for long filenames (greater than 99 characters)
- </notes>
- </release>
- <release>
- <version>
- <release>0.9</release>
- <api>0.9</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2002-05-27</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Auto-detect gzip&apos;ed files
- </notes>
- </release>
- <release>
- <version>
- <release>0.4</release>
- <api>0.4</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2002-05-20</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Windows bugfix: use forward slashes inside archives
- </notes>
- </release>
- <release>
- <version>
- <release>0.2</release>
- <api>0.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2002-02-18</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-From initial commit to stable
- </notes>
- </release>
- <release>
- <version>
- <release>0.3</release>
- <api>0.3</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2002-04-13</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Windows bugfix: used wrong directory separators
- </notes>
- </release>
- </changelog>
-</package>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * File::CSV
- *
- * PHP versions 4 and 5
- *
- * Copyright (c) 1997-2008,
- * Vincent Blavet <vincent@phpconcept.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category File_Formats
- * @package Archive_Tar
- * @author Vincent Blavet <vincent@phpconcept.net>
- * @copyright 1997-2010 The Authors
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Archive_Tar
- */
-
-require_once 'PEAR.php';
-
-define('ARCHIVE_TAR_ATT_SEPARATOR', 90001);
-define('ARCHIVE_TAR_END_BLOCK', pack("a512", ''));
-
-if (!function_exists('gzopen') && function_exists('gzopen64')) {
- function gzopen($filename, $mode, $use_include_path = 0)
- {
- return gzopen64($filename, $mode, $use_include_path);
- }
-}
-
-if (!function_exists('gztell') && function_exists('gztell64')) {
- function gztell($zp)
- {
- return gztell64($zp);
- }
-}
-
-if (!function_exists('gzseek') && function_exists('gzseek64')) {
- function gzseek($zp, $offset, $whence = SEEK_SET)
- {
- return gzseek64($zp, $offset, $whence);
- }
-}
-
-/**
- * Creates a (compressed) Tar archive
- *
- * @package Archive_Tar
- * @author Vincent Blavet <vincent@phpconcept.net>
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version $Revision$
- */
-class Archive_Tar extends PEAR
-{
- /**
- * @var string Name of the Tar
- */
- var $_tarname = '';
-
- /**
- * @var boolean if true, the Tar file will be gzipped
- */
- var $_compress = false;
-
- /**
- * @var string Type of compression : 'none', 'gz', 'bz2' or 'lzma2'
- */
- var $_compress_type = 'none';
-
- /**
- * @var string Explode separator
- */
- var $_separator = ' ';
-
- /**
- * @var file descriptor
- */
- var $_file = 0;
-
- /**
- * @var string Local Tar name of a remote Tar (http:// or ftp://)
- */
- var $_temp_tarname = '';
-
- /**
- * @var string regular expression for ignoring files or directories
- */
- var $_ignore_regexp = '';
-
- /**
- * @var object PEAR_Error object
- */
- var $error_object = null;
-
- // {{{ constructor
- /**
- * Archive_Tar Class constructor. This flavour of the constructor only
- * declare a new Archive_Tar object, identifying it by the name of the
- * tar file.
- * If the compress argument is set the tar will be read or created as a
- * gzip or bz2 compressed TAR file.
- *
- * @param string $p_tarname The name of the tar archive to create
- * @param string $p_compress can be null, 'gz', 'bz2' or 'lzma2'. This
- * parameter indicates if gzip, bz2 or lzma2 compression
- * is required. For compatibility reason the
- * boolean value 'true' means 'gz'.
- *
- * @access public
- */
- function Archive_Tar($p_tarname, $p_compress = null)
- {
- if (version_compare(PHP_VERSION, '5.0.0', '<')) {
- $this->PEAR();
- }
- $this->_compress = false;
- $this->_compress_type = 'none';
- if (($p_compress === null) || ($p_compress == '')) {
- if (@file_exists($p_tarname)) {
- if ($fp = @fopen($p_tarname, "rb")) {
- // look for gzip magic cookie
- $data = fread($fp, 2);
- fclose($fp);
- if ($data == "\37\213") {
- $this->_compress = true;
- $this->_compress_type = 'gz';
- // No sure it's enought for a magic code ....
- } elseif ($data == "BZ") {
- $this->_compress = true;
- $this->_compress_type = 'bz2';
- } elseif (file_get_contents($p_tarname, false, null, 1, 4) == '7zXZ') {
- $this->_compress = true;
- $this->_compress_type = 'lzma2';
- }
- }
- } else {
- // probably a remote file or some file accessible
- // through a stream interface
- if (substr($p_tarname, -2) == 'gz') {
- $this->_compress = true;
- $this->_compress_type = 'gz';
- } elseif ((substr($p_tarname, -3) == 'bz2') ||
- (substr($p_tarname, -2) == 'bz')
- ) {
- $this->_compress = true;
- $this->_compress_type = 'bz2';
- } else {
- if (substr($p_tarname, -2) == 'xz') {
- $this->_compress = true;
- $this->_compress_type = 'lzma2';
- }
- }
- }
- } else {
- if (($p_compress === true) || ($p_compress == 'gz')) {
- $this->_compress = true;
- $this->_compress_type = 'gz';
- } else {
- if ($p_compress == 'bz2') {
- $this->_compress = true;
- $this->_compress_type = 'bz2';
- } else {
- if ($p_compress == 'lzma2') {
- $this->_compress = true;
- $this->_compress_type = 'lzma2';
- } else {
- $this->_error(
- "Unsupported compression type '$p_compress'\n" .
- "Supported types are 'gz', 'bz2' and 'lzma2'.\n"
- );
- return false;
- }
- }
- }
- }
- $this->_tarname = $p_tarname;
- if ($this->_compress) { // assert zlib or bz2 or xz extension support
- if ($this->_compress_type == 'gz') {
- $extname = 'zlib';
- } else {
- if ($this->_compress_type == 'bz2') {
- $extname = 'bz2';
- } else {
- if ($this->_compress_type == 'lzma2') {
- $extname = 'xz';
- }
- }
- }
-
- if (!extension_loaded($extname)) {
- PEAR::loadExtension($extname);
- }
- if (!extension_loaded($extname)) {
- $this->_error(
- "The extension '$extname' couldn't be found.\n" .
- "Please make sure your version of PHP was built " .
- "with '$extname' support.\n"
- );
- return false;
- }
- }
- }
-
- // }}}
-
- // {{{ destructor
- function _Archive_Tar()
- {
- $this->_close();
- // ----- Look for a local copy to delete
- if ($this->_temp_tarname != '') {
- @unlink($this->_temp_tarname);
- }
- $this->_PEAR();
- }
-
- // }}}
-
- // {{{ PHP5-compatible destructor
- function __destruct()
- {
- $this->_Archive_Tar();
- }
-
- // }}}
-
- // {{{ create()
- /**
- * This method creates the archive file and add the files / directories
- * that are listed in $p_filelist.
- * If a file with the same name exist and is writable, it is replaced
- * by the new tar.
- * The method return false and a PEAR error text.
- * The $p_filelist parameter can be an array of string, each string
- * representing a filename or a directory name with their path if
- * needed. It can also be a single string with names separated by a
- * single blank.
- * For each directory added in the archive, the files and
- * sub-directories are also added.
- * See also createModify() method for more details.
- *
- * @param array $p_filelist An array of filenames and directory names, or a
- * single string with names separated by a single
- * blank space.
- *
- * @return true on success, false on error.
- * @see createModify()
- * @access public
- */
- function create($p_filelist)
- {
- return $this->createModify($p_filelist, '', '');
- }
-
- // }}}
-
- // {{{ add()
- /**
- * This method add the files / directories that are listed in $p_filelist in
- * the archive. If the archive does not exist it is created.
- * The method return false and a PEAR error text.
- * The files and directories listed are only added at the end of the archive,
- * even if a file with the same name is already archived.
- * See also createModify() method for more details.
- *
- * @param array $p_filelist An array of filenames and directory names, or a
- * single string with names separated by a single
- * blank space.
- *
- * @return true on success, false on error.
- * @see createModify()
- * @access public
- */
- function add($p_filelist)
- {
- return $this->addModify($p_filelist, '', '');
- }
-
- // }}}
-
- // {{{ extract()
- function extract($p_path = '', $p_preserve = false)
- {
- return $this->extractModify($p_path, '', $p_preserve);
- }
-
- // }}}
-
- // {{{ listContent()
- function listContent()
- {
- $v_list_detail = array();
-
- if ($this->_openRead()) {
- if (!$this->_extractList('', $v_list_detail, "list", '', '')) {
- unset($v_list_detail);
- $v_list_detail = 0;
- }
- $this->_close();
- }
-
- return $v_list_detail;
- }
-
- // }}}
-
- // {{{ createModify()
- /**
- * This method creates the archive file and add the files / directories
- * that are listed in $p_filelist.
- * If the file already exists and is writable, it is replaced by the
- * new tar. It is a create and not an add. If the file exists and is
- * read-only or is a directory it is not replaced. The method return
- * false and a PEAR error text.
- * The $p_filelist parameter can be an array of string, each string
- * representing a filename or a directory name with their path if
- * needed. It can also be a single string with names separated by a
- * single blank.
- * The path indicated in $p_remove_dir will be removed from the
- * memorized path of each file / directory listed when this path
- * exists. By default nothing is removed (empty path '')
- * The path indicated in $p_add_dir will be added at the beginning of
- * the memorized path of each file / directory listed. However it can
- * be set to empty ''. The adding of a path is done after the removing
- * of path.
- * The path add/remove ability enables the user to prepare an archive
- * for extraction in a different path than the origin files are.
- * See also addModify() method for file adding properties.
- *
- * @param array $p_filelist An array of filenames and directory names,
- * or a single string with names separated by
- * a single blank space.
- * @param string $p_add_dir A string which contains a path to be added
- * to the memorized path of each element in
- * the list.
- * @param string $p_remove_dir A string which contains a path to be
- * removed from the memorized path of each
- * element in the list, when relevant.
- *
- * @return boolean true on success, false on error.
- * @access public
- * @see addModify()
- */
- function createModify($p_filelist, $p_add_dir, $p_remove_dir = '')
- {
- $v_result = true;
-
- if (!$this->_openWrite()) {
- return false;
- }
-
- if ($p_filelist != '') {
- if (is_array($p_filelist)) {
- $v_list = $p_filelist;
- } elseif (is_string($p_filelist)) {
- $v_list = explode($this->_separator, $p_filelist);
- } else {
- $this->_cleanFile();
- $this->_error('Invalid file list');
- return false;
- }
-
- $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir);
- }
-
- if ($v_result) {
- $this->_writeFooter();
- $this->_close();
- } else {
- $this->_cleanFile();
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ addModify()
- /**
- * This method add the files / directories listed in $p_filelist at the
- * end of the existing archive. If the archive does not yet exists it
- * is created.
- * The $p_filelist parameter can be an array of string, each string
- * representing a filename or a directory name with their path if
- * needed. It can also be a single string with names separated by a
- * single blank.
- * The path indicated in $p_remove_dir will be removed from the
- * memorized path of each file / directory listed when this path
- * exists. By default nothing is removed (empty path '')
- * The path indicated in $p_add_dir will be added at the beginning of
- * the memorized path of each file / directory listed. However it can
- * be set to empty ''. The adding of a path is done after the removing
- * of path.
- * The path add/remove ability enables the user to prepare an archive
- * for extraction in a different path than the origin files are.
- * If a file/dir is already in the archive it will only be added at the
- * end of the archive. There is no update of the existing archived
- * file/dir. However while extracting the archive, the last file will
- * replace the first one. This results in a none optimization of the
- * archive size.
- * If a file/dir does not exist the file/dir is ignored. However an
- * error text is send to PEAR error.
- * If a file/dir is not readable the file/dir is ignored. However an
- * error text is send to PEAR error.
- *
- * @param array $p_filelist An array of filenames and directory
- * names, or a single string with names
- * separated by a single blank space.
- * @param string $p_add_dir A string which contains a path to be
- * added to the memorized path of each
- * element in the list.
- * @param string $p_remove_dir A string which contains a path to be
- * removed from the memorized path of
- * each element in the list, when
- * relevant.
- *
- * @return true on success, false on error.
- * @access public
- */
- function addModify($p_filelist, $p_add_dir, $p_remove_dir = '')
- {
- $v_result = true;
-
- if (!$this->_isArchive()) {
- $v_result = $this->createModify(
- $p_filelist,
- $p_add_dir,
- $p_remove_dir
- );
- } else {
- if (is_array($p_filelist)) {
- $v_list = $p_filelist;
- } elseif (is_string($p_filelist)) {
- $v_list = explode($this->_separator, $p_filelist);
- } else {
- $this->_error('Invalid file list');
- return false;
- }
-
- $v_result = $this->_append($v_list, $p_add_dir, $p_remove_dir);
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ addString()
- /**
- * This method add a single string as a file at the
- * end of the existing archive. If the archive does not yet exists it
- * is created.
- *
- * @param string $p_filename A string which contains the full
- * filename path that will be associated
- * with the string.
- * @param string $p_string The content of the file added in
- * the archive.
- * @param int $p_datetime A custom date/time (unix timestamp)
- * for the file (optional).
- * @param array $p_params An array of optional params:
- * stamp => the datetime (replaces
- * datetime above if it exists)
- * mode => the permissions on the
- * file (600 by default)
- * type => is this a link? See the
- * tar specification for details.
- * (default = regular file)
- * uid => the user ID of the file
- * (default = 0 = root)
- * gid => the group ID of the file
- * (default = 0 = root)
- *
- * @return true on success, false on error.
- * @access public
- */
- function addString($p_filename, $p_string, $p_datetime = false, $p_params = array())
- {
- $p_stamp = @$p_params["stamp"] ? $p_params["stamp"] : ($p_datetime ? $p_datetime : time());
- $p_mode = @$p_params["mode"] ? $p_params["mode"] : 0600;
- $p_type = @$p_params["type"] ? $p_params["type"] : "";
- $p_uid = @$p_params["uid"] ? $p_params["uid"] : "";
- $p_gid = @$p_params["gid"] ? $p_params["gid"] : "";
- $v_result = true;
-
- if (!$this->_isArchive()) {
- if (!$this->_openWrite()) {
- return false;
- }
- $this->_close();
- }
-
- if (!$this->_openAppend()) {
- return false;
- }
-
- // Need to check the get back to the temporary file ? ....
- $v_result = $this->_addString($p_filename, $p_string, $p_datetime, $p_params);
-
- $this->_writeFooter();
-
- $this->_close();
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ extractModify()
- /**
- * This method extract all the content of the archive in the directory
- * indicated by $p_path. When relevant the memorized path of the
- * files/dir can be modified by removing the $p_remove_path path at the
- * beginning of the file/dir path.
- * While extracting a file, if the directory path does not exists it is
- * created.
- * While extracting a file, if the file already exists it is replaced
- * without looking for last modification date.
- * While extracting a file, if the file already exists and is write
- * protected, the extraction is aborted.
- * While extracting a file, if a directory with the same name already
- * exists, the extraction is aborted.
- * While extracting a directory, if a file with the same name already
- * exists, the extraction is aborted.
- * While extracting a file/directory if the destination directory exist
- * and is write protected, or does not exist but can not be created,
- * the extraction is aborted.
- * If after extraction an extracted file does not show the correct
- * stored file size, the extraction is aborted.
- * When the extraction is aborted, a PEAR error text is set and false
- * is returned. However the result can be a partial extraction that may
- * need to be manually cleaned.
- *
- * @param string $p_path The path of the directory where the
- * files/dir need to by extracted.
- * @param string $p_remove_path Part of the memorized path that can be
- * removed if present at the beginning of
- * the file/dir path.
- * @param boolean $p_preserve Preserve user/group ownership of files
- *
- * @return boolean true on success, false on error.
- * @access public
- * @see extractList()
- */
- function extractModify($p_path, $p_remove_path, $p_preserve = false)
- {
- $v_result = true;
- $v_list_detail = array();
-
- if ($v_result = $this->_openRead()) {
- $v_result = $this->_extractList(
- $p_path,
- $v_list_detail,
- "complete",
- 0,
- $p_remove_path,
- $p_preserve
- );
- $this->_close();
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ extractInString()
- /**
- * This method extract from the archive one file identified by $p_filename.
- * The return value is a string with the file content, or NULL on error.
- *
- * @param string $p_filename The path of the file to extract in a string.
- *
- * @return a string with the file content or NULL.
- * @access public
- */
- function extractInString($p_filename)
- {
- if ($this->_openRead()) {
- $v_result = $this->_extractInString($p_filename);
- $this->_close();
- } else {
- $v_result = null;
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ extractList()
- /**
- * This method extract from the archive only the files indicated in the
- * $p_filelist. These files are extracted in the current directory or
- * in the directory indicated by the optional $p_path parameter.
- * If indicated the $p_remove_path can be used in the same way as it is
- * used in extractModify() method.
- *
- * @param array $p_filelist An array of filenames and directory names,
- * or a single string with names separated
- * by a single blank space.
- * @param string $p_path The path of the directory where the
- * files/dir need to by extracted.
- * @param string $p_remove_path Part of the memorized path that can be
- * removed if present at the beginning of
- * the file/dir path.
- * @param boolean $p_preserve Preserve user/group ownership of files
- *
- * @return true on success, false on error.
- * @access public
- * @see extractModify()
- */
- function extractList($p_filelist, $p_path = '', $p_remove_path = '', $p_preserve = false)
- {
- $v_result = true;
- $v_list_detail = array();
-
- if (is_array($p_filelist)) {
- $v_list = $p_filelist;
- } elseif (is_string($p_filelist)) {
- $v_list = explode($this->_separator, $p_filelist);
- } else {
- $this->_error('Invalid string list');
- return false;
- }
-
- if ($v_result = $this->_openRead()) {
- $v_result = $this->_extractList(
- $p_path,
- $v_list_detail,
- "partial",
- $v_list,
- $p_remove_path,
- $p_preserve
- );
- $this->_close();
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ setAttribute()
- /**
- * This method set specific attributes of the archive. It uses a variable
- * list of parameters, in the format attribute code + attribute values :
- * $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ',');
- *
- * @param mixed $argv variable list of attributes and values
- *
- * @return true on success, false on error.
- * @access public
- */
- function setAttribute()
- {
- $v_result = true;
-
- // ----- Get the number of variable list of arguments
- if (($v_size = func_num_args()) == 0) {
- return true;
- }
-
- // ----- Get the arguments
- $v_att_list = & func_get_args();
-
- // ----- Read the attributes
- $i = 0;
- while ($i < $v_size) {
-
- // ----- Look for next option
- switch ($v_att_list[$i]) {
- // ----- Look for options that request a string value
- case ARCHIVE_TAR_ATT_SEPARATOR :
- // ----- Check the number of parameters
- if (($i + 1) >= $v_size) {
- $this->_error(
- 'Invalid number of parameters for '
- . 'attribute ARCHIVE_TAR_ATT_SEPARATOR'
- );
- return false;
- }
-
- // ----- Get the value
- $this->_separator = $v_att_list[$i + 1];
- $i++;
- break;
-
- default :
- $this->_error('Unknown attribute code ' . $v_att_list[$i] . '');
- return false;
- }
-
- // ----- Next attribute
- $i++;
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ setIgnoreRegexp()
- /**
- * This method sets the regular expression for ignoring files and directories
- * at import, for example:
- * $arch->setIgnoreRegexp("#CVS|\.svn#");
- *
- * @param string $regexp regular expression defining which files or directories to ignore
- *
- * @access public
- */
- function setIgnoreRegexp($regexp)
- {
- $this->_ignore_regexp = $regexp;
- }
-
- // }}}
-
- // {{{ setIgnoreList()
- /**
- * This method sets the regular expression for ignoring all files and directories
- * matching the filenames in the array list at import, for example:
- * $arch->setIgnoreList(array('CVS', '.svn', 'bin/tool'));
- *
- * @param array $list a list of file or directory names to ignore
- *
- * @access public
- */
- function setIgnoreList($list)
- {
- $regexp = str_replace(array('#', '.', '^', '$'), array('\#', '\.', '\^', '\$'), $list);
- $regexp = '#/' . join('$|/', $list) . '#';
- $this->setIgnoreRegexp($regexp);
- }
-
- // }}}
-
- // {{{ _error()
- function _error($p_message)
- {
- $this->error_object = & $this->raiseError($p_message);
- }
-
- // }}}
-
- // {{{ _warning()
- function _warning($p_message)
- {
- $this->error_object = & $this->raiseError($p_message);
- }
-
- // }}}
-
- // {{{ _isArchive()
- function _isArchive($p_filename = null)
- {
- if ($p_filename == null) {
- $p_filename = $this->_tarname;
- }
- clearstatcache();
- return @is_file($p_filename) && !@is_link($p_filename);
- }
-
- // }}}
-
- // {{{ _openWrite()
- function _openWrite()
- {
- if ($this->_compress_type == 'gz' && function_exists('gzopen')) {
- $this->_file = @gzopen($this->_tarname, "wb9");
- } else {
- if ($this->_compress_type == 'bz2' && function_exists('bzopen')) {
- $this->_file = @bzopen($this->_tarname, "w");
- } else {
- if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) {
- $this->_file = @xzopen($this->_tarname, 'w');
- } else {
- if ($this->_compress_type == 'none') {
- $this->_file = @fopen($this->_tarname, "wb");
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- return false;
- }
- }
- }
- }
-
- if ($this->_file == 0) {
- $this->_error(
- 'Unable to open in write mode \''
- . $this->_tarname . '\''
- );
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _openRead()
- function _openRead()
- {
- if (strtolower(substr($this->_tarname, 0, 7)) == 'http://') {
-
- // ----- Look if a local copy need to be done
- if ($this->_temp_tarname == '') {
- $this->_temp_tarname = uniqid('tar') . '.tmp';
- if (!$v_file_from = @fopen($this->_tarname, 'rb')) {
- $this->_error(
- 'Unable to open in read mode \''
- . $this->_tarname . '\''
- );
- $this->_temp_tarname = '';
- return false;
- }
- if (!$v_file_to = @fopen($this->_temp_tarname, 'wb')) {
- $this->_error(
- 'Unable to open in write mode \''
- . $this->_temp_tarname . '\''
- );
- $this->_temp_tarname = '';
- return false;
- }
- while ($v_data = @fread($v_file_from, 1024)) {
- @fwrite($v_file_to, $v_data);
- }
- @fclose($v_file_from);
- @fclose($v_file_to);
- }
-
- // ----- File to open if the local copy
- $v_filename = $this->_temp_tarname;
-
- } else // ----- File to open if the normal Tar file
- {
- $v_filename = $this->_tarname;
- }
-
- if ($this->_compress_type == 'gz' && function_exists('gzopen')) {
- $this->_file = @gzopen($v_filename, "rb");
- } else {
- if ($this->_compress_type == 'bz2' && function_exists('bzopen')) {
- $this->_file = @bzopen($v_filename, "r");
- } else {
- if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) {
- $this->_file = @xzopen($v_filename, "r");
- } else {
- if ($this->_compress_type == 'none') {
- $this->_file = @fopen($v_filename, "rb");
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- return false;
- }
- }
- }
- }
-
- if ($this->_file == 0) {
- $this->_error('Unable to open in read mode \'' . $v_filename . '\'');
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _openReadWrite()
- function _openReadWrite()
- {
- if ($this->_compress_type == 'gz') {
- $this->_file = @gzopen($this->_tarname, "r+b");
- } else {
- if ($this->_compress_type == 'bz2') {
- $this->_error(
- 'Unable to open bz2 in read/write mode \''
- . $this->_tarname . '\' (limitation of bz2 extension)'
- );
- return false;
- } else {
- if ($this->_compress_type == 'lzma2') {
- $this->_error(
- 'Unable to open lzma2 in read/write mode \''
- . $this->_tarname . '\' (limitation of lzma2 extension)'
- );
- return false;
- } else {
- if ($this->_compress_type == 'none') {
- $this->_file = @fopen($this->_tarname, "r+b");
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- return false;
- }
- }
- }
- }
-
- if ($this->_file == 0) {
- $this->_error(
- 'Unable to open in read/write mode \''
- . $this->_tarname . '\''
- );
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _close()
- function _close()
- {
- //if (isset($this->_file)) {
- if (is_resource($this->_file)) {
- if ($this->_compress_type == 'gz') {
- @gzclose($this->_file);
- } else {
- if ($this->_compress_type == 'bz2') {
- @bzclose($this->_file);
- } else {
- if ($this->_compress_type == 'lzma2') {
- @xzclose($this->_file);
- } else {
- if ($this->_compress_type == 'none') {
- @fclose($this->_file);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
-
- $this->_file = 0;
- }
-
- // ----- Look if a local copy need to be erase
- // Note that it might be interesting to keep the url for a time : ToDo
- if ($this->_temp_tarname != '') {
- @unlink($this->_temp_tarname);
- $this->_temp_tarname = '';
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _cleanFile()
- function _cleanFile()
- {
- $this->_close();
-
- // ----- Look for a local copy
- if ($this->_temp_tarname != '') {
- // ----- Remove the local copy but not the remote tarname
- @unlink($this->_temp_tarname);
- $this->_temp_tarname = '';
- } else {
- // ----- Remove the local tarname file
- @unlink($this->_tarname);
- }
- $this->_tarname = '';
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeBlock()
- function _writeBlock($p_binary_data, $p_len = null)
- {
- if (is_resource($this->_file)) {
- if ($p_len === null) {
- if ($this->_compress_type == 'gz') {
- @gzputs($this->_file, $p_binary_data);
- } else {
- if ($this->_compress_type == 'bz2') {
- @bzwrite($this->_file, $p_binary_data);
- } else {
- if ($this->_compress_type == 'lzma2') {
- @xzwrite($this->_file, $p_binary_data);
- } else {
- if ($this->_compress_type == 'none') {
- @fputs($this->_file, $p_binary_data);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
- } else {
- if ($this->_compress_type == 'gz') {
- @gzputs($this->_file, $p_binary_data, $p_len);
- } else {
- if ($this->_compress_type == 'bz2') {
- @bzwrite($this->_file, $p_binary_data, $p_len);
- } else {
- if ($this->_compress_type == 'lzma2') {
- @xzwrite($this->_file, $p_binary_data, $p_len);
- } else {
- if ($this->_compress_type == 'none') {
- @fputs($this->_file, $p_binary_data, $p_len);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
-
- }
- }
- return true;
- }
-
- // }}}
-
- // {{{ _readBlock()
- function _readBlock()
- {
- $v_block = null;
- if (is_resource($this->_file)) {
- if ($this->_compress_type == 'gz') {
- $v_block = @gzread($this->_file, 512);
- } else {
- if ($this->_compress_type == 'bz2') {
- $v_block = @bzread($this->_file, 512);
- } else {
- if ($this->_compress_type == 'lzma2') {
- $v_block = @xzread($this->_file, 512);
- } else {
- if ($this->_compress_type == 'none') {
- $v_block = @fread($this->_file, 512);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
- }
- return $v_block;
- }
-
- // }}}
-
- // {{{ _jumpBlock()
- function _jumpBlock($p_len = null)
- {
- if (is_resource($this->_file)) {
- if ($p_len === null) {
- $p_len = 1;
- }
-
- if ($this->_compress_type == 'gz') {
- @gzseek($this->_file, gztell($this->_file) + ($p_len * 512));
- } else {
- if ($this->_compress_type == 'bz2') {
- // ----- Replace missing bztell() and bzseek()
- for ($i = 0; $i < $p_len; $i++) {
- $this->_readBlock();
- }
- } else {
- if ($this->_compress_type == 'lzma2') {
- // ----- Replace missing xztell() and xzseek()
- for ($i = 0; $i < $p_len; $i++) {
- $this->_readBlock();
- }
- } else {
- if ($this->_compress_type == 'none') {
- @fseek($this->_file, $p_len * 512, SEEK_CUR);
- } else {
- $this->_error(
- 'Unknown or missing compression type ('
- . $this->_compress_type . ')'
- );
- }
- }
- }
- }
-
- }
- return true;
- }
-
- // }}}
-
- // {{{ _writeFooter()
- function _writeFooter()
- {
- if (is_resource($this->_file)) {
- // ----- Write the last 0 filled block for end of archive
- $v_binary_data = pack('a1024', '');
- $this->_writeBlock($v_binary_data);
- }
- return true;
- }
-
- // }}}
-
- // {{{ _addList()
- function _addList($p_list, $p_add_dir, $p_remove_dir)
- {
- $v_result = true;
- $v_header = array();
-
- // ----- Remove potential windows directory separator
- $p_add_dir = $this->_translateWinPath($p_add_dir);
- $p_remove_dir = $this->_translateWinPath($p_remove_dir, false);
-
- if (!$this->_file) {
- $this->_error('Invalid file descriptor');
- return false;
- }
-
- if (sizeof($p_list) == 0) {
- return true;
- }
-
- foreach ($p_list as $v_filename) {
- if (!$v_result) {
- break;
- }
-
- // ----- Skip the current tar name
- if ($v_filename == $this->_tarname) {
- continue;
- }
-
- if ($v_filename == '') {
- continue;
- }
-
- // ----- ignore files and directories matching the ignore regular expression
- if ($this->_ignore_regexp && preg_match($this->_ignore_regexp, '/' . $v_filename)) {
- $this->_warning("File '$v_filename' ignored");
- continue;
- }
-
- if (!file_exists($v_filename) && !is_link($v_filename)) {
- $this->_warning("File '$v_filename' does not exist");
- continue;
- }
-
- // ----- Add the file or directory header
- if (!$this->_addFile($v_filename, $v_header, $p_add_dir, $p_remove_dir)) {
- return false;
- }
-
- if (@is_dir($v_filename) && !@is_link($v_filename)) {
- if (!($p_hdir = opendir($v_filename))) {
- $this->_warning("Directory '$v_filename' can not be read");
- continue;
- }
- while (false !== ($p_hitem = readdir($p_hdir))) {
- if (($p_hitem != '.') && ($p_hitem != '..')) {
- if ($v_filename != ".") {
- $p_temp_list[0] = $v_filename . '/' . $p_hitem;
- } else {
- $p_temp_list[0] = $p_hitem;
- }
-
- $v_result = $this->_addList(
- $p_temp_list,
- $p_add_dir,
- $p_remove_dir
- );
- }
- }
-
- unset($p_temp_list);
- unset($p_hdir);
- unset($p_hitem);
- }
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ _addFile()
- function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_stored_filename = null)
- {
- if (!$this->_file) {
- $this->_error('Invalid file descriptor');
- return false;
- }
-
- if ($p_filename == '') {
- $this->_error('Invalid file name');
- return false;
- }
-
- if (is_null($v_stored_filename)) {
- // ----- Calculate the stored filename
- $p_filename = $this->_translateWinPath($p_filename, false);;
- $v_stored_filename = $p_filename;
-
- if (strcmp($p_filename, $p_remove_dir) == 0) {
- return true;
- }
-
- if ($p_remove_dir != '') {
- if (substr($p_remove_dir, -1) != '/') {
- $p_remove_dir .= '/';
- }
-
- if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir) {
- $v_stored_filename = substr($p_filename, strlen($p_remove_dir));
- }
- }
-
- $v_stored_filename = $this->_translateWinPath($v_stored_filename);
- if ($p_add_dir != '') {
- if (substr($p_add_dir, -1) == '/') {
- $v_stored_filename = $p_add_dir . $v_stored_filename;
- } else {
- $v_stored_filename = $p_add_dir . '/' . $v_stored_filename;
- }
- }
-
- $v_stored_filename = $this->_pathReduction($v_stored_filename);
- }
-
- if ($this->_isArchive($p_filename)) {
- if (($v_file = @fopen($p_filename, "rb")) == 0) {
- $this->_warning(
- "Unable to open file '" . $p_filename
- . "' in binary read mode"
- );
- return true;
- }
-
- if (!$this->_writeHeader($p_filename, $v_stored_filename)) {
- return false;
- }
-
- while (($v_buffer = fread($v_file, 512)) != '') {
- $v_binary_data = pack("a512", "$v_buffer");
- $this->_writeBlock($v_binary_data);
- }
-
- fclose($v_file);
-
- } else {
- // ----- Only header for dir
- if (!$this->_writeHeader($p_filename, $v_stored_filename)) {
- return false;
- }
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _addString()
- function _addString($p_filename, $p_string, $p_datetime = false, $p_params = array())
- {
- $p_stamp = @$p_params["stamp"] ? $p_params["stamp"] : ($p_datetime ? $p_datetime : time());
- $p_mode = @$p_params["mode"] ? $p_params["mode"] : 0600;
- $p_type = @$p_params["type"] ? $p_params["type"] : "";
- $p_uid = @$p_params["uid"] ? $p_params["uid"] : 0;
- $p_gid = @$p_params["gid"] ? $p_params["gid"] : 0;
- if (!$this->_file) {
- $this->_error('Invalid file descriptor');
- return false;
- }
-
- if ($p_filename == '') {
- $this->_error('Invalid file name');
- return false;
- }
-
- // ----- Calculate the stored filename
- $p_filename = $this->_translateWinPath($p_filename, false);;
-
- // ----- If datetime is not specified, set current time
- if ($p_datetime === false) {
- $p_datetime = time();
- }
-
- if (!$this->_writeHeaderBlock(
- $p_filename,
- strlen($p_string),
- $p_stamp,
- $p_mode,
- $p_type,
- $p_uid,
- $p_gid
- )
- ) {
- return false;
- }
-
- $i = 0;
- while (($v_buffer = substr($p_string, (($i++) * 512), 512)) != '') {
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeHeader()
- function _writeHeader($p_filename, $p_stored_filename)
- {
- if ($p_stored_filename == '') {
- $p_stored_filename = $p_filename;
- }
- $v_reduce_filename = $this->_pathReduction($p_stored_filename);
-
- if (strlen($v_reduce_filename) > 99) {
- if (!$this->_writeLongHeader($v_reduce_filename)) {
- return false;
- }
- }
-
- $v_info = lstat($p_filename);
- $v_uid = sprintf("%07s", DecOct($v_info[4]));
- $v_gid = sprintf("%07s", DecOct($v_info[5]));
- $v_perms = sprintf("%07s", DecOct($v_info['mode'] & 000777));
-
- $v_mtime = sprintf("%011s", DecOct($v_info['mtime']));
-
- $v_linkname = '';
-
- if (@is_link($p_filename)) {
- $v_typeflag = '2';
- $v_linkname = readlink($p_filename);
- $v_size = sprintf("%011s", DecOct(0));
- } elseif (@is_dir($p_filename)) {
- $v_typeflag = "5";
- $v_size = sprintf("%011s", DecOct(0));
- } else {
- $v_typeflag = '0';
- clearstatcache();
- $v_size = sprintf("%011s", DecOct($v_info['size']));
- }
-
- $v_magic = 'ustar ';
-
- $v_version = ' ';
-
- if (function_exists('posix_getpwuid')) {
- $userinfo = posix_getpwuid($v_info[4]);
- $groupinfo = posix_getgrgid($v_info[5]);
-
- $v_uname = $userinfo['name'];
- $v_gname = $groupinfo['name'];
- } else {
- $v_uname = '';
- $v_gname = '';
- }
-
- $v_devmajor = '';
-
- $v_devminor = '';
-
- $v_prefix = '';
-
- $v_binary_data_first = pack(
- "a100a8a8a8a12a12",
- $v_reduce_filename,
- $v_perms,
- $v_uid,
- $v_gid,
- $v_size,
- $v_mtime
- );
- $v_binary_data_last = pack(
- "a1a100a6a2a32a32a8a8a155a12",
- $v_typeflag,
- $v_linkname,
- $v_magic,
- $v_version,
- $v_uname,
- $v_gname,
- $v_devmajor,
- $v_devminor,
- $v_prefix,
- ''
- );
-
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data_first, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156, $j = 0; $i < 512; $i++, $j++) {
- $v_checksum += ord(substr($v_binary_data_last, $j, 1));
- }
-
- // ----- Write the first 148 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_first, 148);
-
- // ----- Write the calculated checksum
- $v_checksum = sprintf("%06s ", DecOct($v_checksum));
- $v_binary_data = pack("a8", $v_checksum);
- $this->_writeBlock($v_binary_data, 8);
-
- // ----- Write the last 356 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_last, 356);
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeHeaderBlock()
- function _writeHeaderBlock(
- $p_filename,
- $p_size,
- $p_mtime = 0,
- $p_perms = 0,
- $p_type = '',
- $p_uid = 0,
- $p_gid = 0
- ) {
- $p_filename = $this->_pathReduction($p_filename);
-
- if (strlen($p_filename) > 99) {
- if (!$this->_writeLongHeader($p_filename)) {
- return false;
- }
- }
-
- if ($p_type == "5") {
- $v_size = sprintf("%011s", DecOct(0));
- } else {
- $v_size = sprintf("%011s", DecOct($p_size));
- }
-
- $v_uid = sprintf("%07s", DecOct($p_uid));
- $v_gid = sprintf("%07s", DecOct($p_gid));
- $v_perms = sprintf("%07s", DecOct($p_perms & 000777));
-
- $v_mtime = sprintf("%11s", DecOct($p_mtime));
-
- $v_linkname = '';
-
- $v_magic = 'ustar ';
-
- $v_version = ' ';
-
- if (function_exists('posix_getpwuid')) {
- $userinfo = posix_getpwuid($p_uid);
- $groupinfo = posix_getgrgid($p_gid);
-
- $v_uname = $userinfo['name'];
- $v_gname = $groupinfo['name'];
- } else {
- $v_uname = '';
- $v_gname = '';
- }
-
- $v_devmajor = '';
-
- $v_devminor = '';
-
- $v_prefix = '';
-
- $v_binary_data_first = pack(
- "a100a8a8a8a12A12",
- $p_filename,
- $v_perms,
- $v_uid,
- $v_gid,
- $v_size,
- $v_mtime
- );
- $v_binary_data_last = pack(
- "a1a100a6a2a32a32a8a8a155a12",
- $p_type,
- $v_linkname,
- $v_magic,
- $v_version,
- $v_uname,
- $v_gname,
- $v_devmajor,
- $v_devminor,
- $v_prefix,
- ''
- );
-
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data_first, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156, $j = 0; $i < 512; $i++, $j++) {
- $v_checksum += ord(substr($v_binary_data_last, $j, 1));
- }
-
- // ----- Write the first 148 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_first, 148);
-
- // ----- Write the calculated checksum
- $v_checksum = sprintf("%06s ", DecOct($v_checksum));
- $v_binary_data = pack("a8", $v_checksum);
- $this->_writeBlock($v_binary_data, 8);
-
- // ----- Write the last 356 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_last, 356);
-
- return true;
- }
-
- // }}}
-
- // {{{ _writeLongHeader()
- function _writeLongHeader($p_filename)
- {
- $v_size = sprintf("%11s ", DecOct(strlen($p_filename)));
-
- $v_typeflag = 'L';
-
- $v_linkname = '';
-
- $v_magic = '';
-
- $v_version = '';
-
- $v_uname = '';
-
- $v_gname = '';
-
- $v_devmajor = '';
-
- $v_devminor = '';
-
- $v_prefix = '';
-
- $v_binary_data_first = pack(
- "a100a8a8a8a12a12",
- '././@LongLink',
- 0,
- 0,
- 0,
- $v_size,
- 0
- );
- $v_binary_data_last = pack(
- "a1a100a6a2a32a32a8a8a155a12",
- $v_typeflag,
- $v_linkname,
- $v_magic,
- $v_version,
- $v_uname,
- $v_gname,
- $v_devmajor,
- $v_devminor,
- $v_prefix,
- ''
- );
-
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data_first, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156, $j = 0; $i < 512; $i++, $j++) {
- $v_checksum += ord(substr($v_binary_data_last, $j, 1));
- }
-
- // ----- Write the first 148 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_first, 148);
-
- // ----- Write the calculated checksum
- $v_checksum = sprintf("%06s ", DecOct($v_checksum));
- $v_binary_data = pack("a8", $v_checksum);
- $this->_writeBlock($v_binary_data, 8);
-
- // ----- Write the last 356 bytes of the header in the archive
- $this->_writeBlock($v_binary_data_last, 356);
-
- // ----- Write the filename as content of the block
- $i = 0;
- while (($v_buffer = substr($p_filename, (($i++) * 512), 512)) != '') {
- $v_binary_data = pack("a512", "$v_buffer");
- $this->_writeBlock($v_binary_data);
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _readHeader()
- function _readHeader($v_binary_data, &$v_header)
- {
- if (strlen($v_binary_data) == 0) {
- $v_header['filename'] = '';
- return true;
- }
-
- if (strlen($v_binary_data) != 512) {
- $v_header['filename'] = '';
- $this->_error('Invalid block size : ' . strlen($v_binary_data));
- return false;
- }
-
- if (!is_array($v_header)) {
- $v_header = array();
- }
- // ----- Calculate the checksum
- $v_checksum = 0;
- // ..... First part of the header
- for ($i = 0; $i < 148; $i++) {
- $v_checksum += ord(substr($v_binary_data, $i, 1));
- }
- // ..... Ignore the checksum value and replace it by ' ' (space)
- for ($i = 148; $i < 156; $i++) {
- $v_checksum += ord(' ');
- }
- // ..... Last part of the header
- for ($i = 156; $i < 512; $i++) {
- $v_checksum += ord(substr($v_binary_data, $i, 1));
- }
-
- if (version_compare(PHP_VERSION, "5.5.0-dev") < 0) {
- $fmt = "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" .
- "a8checksum/a1typeflag/a100link/a6magic/a2version/" .
- "a32uname/a32gname/a8devmajor/a8devminor/a131prefix";
- } else {
- $fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" .
- "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" .
- "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix";
- }
- $v_data = unpack($fmt, $v_binary_data);
-
- if (strlen($v_data["prefix"]) > 0) {
- $v_data["filename"] = "$v_data[prefix]/$v_data[filename]";
- }
-
- // ----- Extract the checksum
- $v_header['checksum'] = OctDec(trim($v_data['checksum']));
- if ($v_header['checksum'] != $v_checksum) {
- $v_header['filename'] = '';
-
- // ----- Look for last block (empty block)
- if (($v_checksum == 256) && ($v_header['checksum'] == 0)) {
- return true;
- }
-
- $this->_error(
- 'Invalid checksum for file "' . $v_data['filename']
- . '" : ' . $v_checksum . ' calculated, '
- . $v_header['checksum'] . ' expected'
- );
- return false;
- }
-
- // ----- Extract the properties
- $v_header['filename'] = rtrim($v_data['filename'], "\0");
- if ($this->_maliciousFilename($v_header['filename'])) {
- $this->_error(
- 'Malicious .tar detected, file "' . $v_header['filename'] .
- '" will not install in desired directory tree'
- );
- return false;
- }
- $v_header['mode'] = OctDec(trim($v_data['mode']));
- $v_header['uid'] = OctDec(trim($v_data['uid']));
- $v_header['gid'] = OctDec(trim($v_data['gid']));
- $v_header['size'] = OctDec(trim($v_data['size']));
- $v_header['mtime'] = OctDec(trim($v_data['mtime']));
- if (($v_header['typeflag'] = $v_data['typeflag']) == "5") {
- $v_header['size'] = 0;
- }
- $v_header['link'] = trim($v_data['link']);
- /* ----- All these fields are removed form the header because
- they do not carry interesting info
- $v_header[magic] = trim($v_data[magic]);
- $v_header[version] = trim($v_data[version]);
- $v_header[uname] = trim($v_data[uname]);
- $v_header[gname] = trim($v_data[gname]);
- $v_header[devmajor] = trim($v_data[devmajor]);
- $v_header[devminor] = trim($v_data[devminor]);
- */
-
- return true;
- }
-
- // }}}
-
- // {{{ _maliciousFilename()
- /**
- * Detect and report a malicious file name
- *
- * @param string $file
- *
- * @return bool
- * @access private
- */
- function _maliciousFilename($file)
- {
- if (strpos($file, '/../') !== false) {
- return true;
- }
- if (strpos($file, '../') === 0) {
- return true;
- }
- return false;
- }
-
- // }}}
-
- // {{{ _readLongHeader()
- function _readLongHeader(&$v_header)
- {
- $v_filename = '';
- $v_filesize = $v_header['size'];
- $n = floor($v_header['size'] / 512);
- for ($i = 0; $i < $n; $i++) {
- $v_content = $this->_readBlock();
- $v_filename .= $v_content;
- }
- if (($v_header['size'] % 512) != 0) {
- $v_content = $this->_readBlock();
- $v_filename .= $v_content;
- }
-
- // ----- Read the next header
- $v_binary_data = $this->_readBlock();
-
- if (!$this->_readHeader($v_binary_data, $v_header)) {
- return false;
- }
-
- $v_filename = rtrim(substr($v_filename, 0, $v_filesize), "\0");
- $v_header['filename'] = $v_filename;
- if ($this->_maliciousFilename($v_filename)) {
- $this->_error(
- 'Malicious .tar detected, file "' . $v_filename .
- '" will not install in desired directory tree'
- );
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _extractInString()
- /**
- * This method extract from the archive one file identified by $p_filename.
- * The return value is a string with the file content, or null on error.
- *
- * @param string $p_filename The path of the file to extract in a string.
- *
- * @return a string with the file content or null.
- * @access private
- */
- function _extractInString($p_filename)
- {
- $v_result_str = "";
-
- While (strlen($v_binary_data = $this->_readBlock()) != 0) {
- if (!$this->_readHeader($v_binary_data, $v_header)) {
- return null;
- }
-
- if ($v_header['filename'] == '') {
- continue;
- }
-
- // ----- Look for long filename
- if ($v_header['typeflag'] == 'L') {
- if (!$this->_readLongHeader($v_header)) {
- return null;
- }
- }
-
- if ($v_header['filename'] == $p_filename) {
- if ($v_header['typeflag'] == "5") {
- $this->_error(
- 'Unable to extract in string a directory '
- . 'entry {' . $v_header['filename'] . '}'
- );
- return null;
- } else {
- $n = floor($v_header['size'] / 512);
- for ($i = 0; $i < $n; $i++) {
- $v_result_str .= $this->_readBlock();
- }
- if (($v_header['size'] % 512) != 0) {
- $v_content = $this->_readBlock();
- $v_result_str .= substr(
- $v_content,
- 0,
- ($v_header['size'] % 512)
- );
- }
- return $v_result_str;
- }
- } else {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- }
- }
-
- return null;
- }
-
- // }}}
-
- // {{{ _extractList()
- function _extractList(
- $p_path,
- &$p_list_detail,
- $p_mode,
- $p_file_list,
- $p_remove_path,
- $p_preserve = false
- ) {
- $v_result = true;
- $v_nb = 0;
- $v_extract_all = true;
- $v_listing = false;
-
- $p_path = $this->_translateWinPath($p_path, false);
- if ($p_path == '' || (substr($p_path, 0, 1) != '/'
- && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':'))
- ) {
- $p_path = "./" . $p_path;
- }
- $p_remove_path = $this->_translateWinPath($p_remove_path);
-
- // ----- Look for path to remove format (should end by /)
- if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/')) {
- $p_remove_path .= '/';
- }
- $p_remove_path_size = strlen($p_remove_path);
-
- switch ($p_mode) {
- case "complete" :
- $v_extract_all = true;
- $v_listing = false;
- break;
- case "partial" :
- $v_extract_all = false;
- $v_listing = false;
- break;
- case "list" :
- $v_extract_all = false;
- $v_listing = true;
- break;
- default :
- $this->_error('Invalid extract mode (' . $p_mode . ')');
- return false;
- }
-
- clearstatcache();
-
- while (strlen($v_binary_data = $this->_readBlock()) != 0) {
- $v_extract_file = false;
- $v_extraction_stopped = 0;
-
- if (!$this->_readHeader($v_binary_data, $v_header)) {
- return false;
- }
-
- if ($v_header['filename'] == '') {
- continue;
- }
-
- // ----- Look for long filename
- if ($v_header['typeflag'] == 'L') {
- if (!$this->_readLongHeader($v_header)) {
- return false;
- }
- }
-
- // ignore extended / pax headers
- if ($v_header['typeflag'] == 'x' || $v_header['typeflag'] == 'g') {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- continue;
- }
-
- if ((!$v_extract_all) && (is_array($p_file_list))) {
- // ----- By default no unzip if the file is not found
- $v_extract_file = false;
-
- for ($i = 0; $i < sizeof($p_file_list); $i++) {
- // ----- Look if it is a directory
- if (substr($p_file_list[$i], -1) == '/') {
- // ----- Look if the directory is in the filename path
- if ((strlen($v_header['filename']) > strlen($p_file_list[$i]))
- && (substr($v_header['filename'], 0, strlen($p_file_list[$i]))
- == $p_file_list[$i])
- ) {
- $v_extract_file = true;
- break;
- }
- } // ----- It is a file, so compare the file names
- elseif ($p_file_list[$i] == $v_header['filename']) {
- $v_extract_file = true;
- break;
- }
- }
- } else {
- $v_extract_file = true;
- }
-
- // ----- Look if this file need to be extracted
- if (($v_extract_file) && (!$v_listing)) {
- if (($p_remove_path != '')
- && (substr($v_header['filename'] . '/', 0, $p_remove_path_size)
- == $p_remove_path)
- ) {
- $v_header['filename'] = substr(
- $v_header['filename'],
- $p_remove_path_size
- );
- if ($v_header['filename'] == '') {
- continue;
- }
- }
- if (($p_path != './') && ($p_path != '/')) {
- while (substr($p_path, -1) == '/') {
- $p_path = substr($p_path, 0, strlen($p_path) - 1);
- }
-
- if (substr($v_header['filename'], 0, 1) == '/') {
- $v_header['filename'] = $p_path . $v_header['filename'];
- } else {
- $v_header['filename'] = $p_path . '/' . $v_header['filename'];
- }
- }
- if (file_exists($v_header['filename'])) {
- if ((@is_dir($v_header['filename']))
- && ($v_header['typeflag'] == '')
- ) {
- $this->_error(
- 'File ' . $v_header['filename']
- . ' already exists as a directory'
- );
- return false;
- }
- if (($this->_isArchive($v_header['filename']))
- && ($v_header['typeflag'] == "5")
- ) {
- $this->_error(
- 'Directory ' . $v_header['filename']
- . ' already exists as a file'
- );
- return false;
- }
- if (!is_writeable($v_header['filename'])) {
- $this->_error(
- 'File ' . $v_header['filename']
- . ' already exists and is write protected'
- );
- return false;
- }
- if (filemtime($v_header['filename']) > $v_header['mtime']) {
- // To be completed : An error or silent no replace ?
- }
- } // ----- Check the directory availability and create it if necessary
- elseif (($v_result
- = $this->_dirCheck(
- ($v_header['typeflag'] == "5"
- ? $v_header['filename']
- : dirname($v_header['filename']))
- )) != 1
- ) {
- $this->_error('Unable to create path for ' . $v_header['filename']);
- return false;
- }
-
- if ($v_extract_file) {
- if ($v_header['typeflag'] == "5") {
- if (!@file_exists($v_header['filename'])) {
- if (!@mkdir($v_header['filename'], 0777)) {
- $this->_error(
- 'Unable to create directory {'
- . $v_header['filename'] . '}'
- );
- return false;
- }
- }
- } elseif ($v_header['typeflag'] == "2") {
- if (@file_exists($v_header['filename'])) {
- @unlink($v_header['filename']);
- }
- if (!@symlink($v_header['link'], $v_header['filename'])) {
- $this->_error(
- 'Unable to extract symbolic link {'
- . $v_header['filename'] . '}'
- );
- return false;
- }
- } else {
- if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
- $this->_error(
- 'Error while opening {' . $v_header['filename']
- . '} in write binary mode'
- );
- return false;
- } else {
- $n = floor($v_header['size'] / 512);
- for ($i = 0; $i < $n; $i++) {
- $v_content = $this->_readBlock();
- fwrite($v_dest_file, $v_content, 512);
- }
- if (($v_header['size'] % 512) != 0) {
- $v_content = $this->_readBlock();
- fwrite($v_dest_file, $v_content, ($v_header['size'] % 512));
- }
-
- @fclose($v_dest_file);
-
- if ($p_preserve) {
- @chown($v_header['filename'], $v_header['uid']);
- @chgrp($v_header['filename'], $v_header['gid']);
- }
-
- // ----- Change the file mode, mtime
- @touch($v_header['filename'], $v_header['mtime']);
- if ($v_header['mode'] & 0111) {
- // make file executable, obey umask
- $mode = fileperms($v_header['filename']) | (~umask() & 0111);
- @chmod($v_header['filename'], $mode);
- }
- }
-
- // ----- Check the file size
- clearstatcache();
- if (!is_file($v_header['filename'])) {
- $this->_error(
- 'Extracted file ' . $v_header['filename']
- . 'does not exist. Archive may be corrupted.'
- );
- return false;
- }
-
- $filesize = filesize($v_header['filename']);
- if ($filesize != $v_header['size']) {
- $this->_error(
- 'Extracted file ' . $v_header['filename']
- . ' does not have the correct file size \''
- . $filesize
- . '\' (' . $v_header['size']
- . ' expected). Archive may be corrupted.'
- );
- return false;
- }
- }
- } else {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- }
- } else {
- $this->_jumpBlock(ceil(($v_header['size'] / 512)));
- }
-
- /* TBC : Seems to be unused ...
- if ($this->_compress)
- $v_end_of_file = @gzeof($this->_file);
- else
- $v_end_of_file = @feof($this->_file);
- */
-
- if ($v_listing || $v_extract_file || $v_extraction_stopped) {
- // ----- Log extracted files
- if (($v_file_dir = dirname($v_header['filename']))
- == $v_header['filename']
- ) {
- $v_file_dir = '';
- }
- if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == '')) {
- $v_file_dir = '/';
- }
-
- $p_list_detail[$v_nb++] = $v_header;
- if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) {
- return true;
- }
- }
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _openAppend()
- function _openAppend()
- {
- if (filesize($this->_tarname) == 0) {
- return $this->_openWrite();
- }
-
- if ($this->_compress) {
- $this->_close();
-
- if (!@rename($this->_tarname, $this->_tarname . ".tmp")) {
- $this->_error(
- 'Error while renaming \'' . $this->_tarname
- . '\' to temporary file \'' . $this->_tarname
- . '.tmp\''
- );
- return false;
- }
-
- if ($this->_compress_type == 'gz') {
- $v_temp_tar = @gzopen($this->_tarname . ".tmp", "rb");
- } elseif ($this->_compress_type == 'bz2') {
- $v_temp_tar = @bzopen($this->_tarname . ".tmp", "r");
- } elseif ($this->_compress_type == 'lzma2') {
- $v_temp_tar = @xzopen($this->_tarname . ".tmp", "r");
- }
-
-
- if ($v_temp_tar == 0) {
- $this->_error(
- 'Unable to open file \'' . $this->_tarname
- . '.tmp\' in binary read mode'
- );
- @rename($this->_tarname . ".tmp", $this->_tarname);
- return false;
- }
-
- if (!$this->_openWrite()) {
- @rename($this->_tarname . ".tmp", $this->_tarname);
- return false;
- }
-
- if ($this->_compress_type == 'gz') {
- $end_blocks = 0;
-
- while (!@gzeof($v_temp_tar)) {
- $v_buffer = @gzread($v_temp_tar, 512);
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
- $end_blocks++;
- // do not copy end blocks, we will re-make them
- // after appending
- continue;
- } elseif ($end_blocks > 0) {
- for ($i = 0; $i < $end_blocks; $i++) {
- $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
- }
- $end_blocks = 0;
- }
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- @gzclose($v_temp_tar);
- } elseif ($this->_compress_type == 'bz2') {
- $end_blocks = 0;
-
- while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) {
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
- $end_blocks++;
- // do not copy end blocks, we will re-make them
- // after appending
- continue;
- } elseif ($end_blocks > 0) {
- for ($i = 0; $i < $end_blocks; $i++) {
- $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
- }
- $end_blocks = 0;
- }
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- @bzclose($v_temp_tar);
- } elseif ($this->_compress_type == 'lzma2') {
- $end_blocks = 0;
-
- while (strlen($v_buffer = @xzread($v_temp_tar, 512)) > 0) {
- if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
- $end_blocks++;
- // do not copy end blocks, we will re-make them
- // after appending
- continue;
- } elseif ($end_blocks > 0) {
- for ($i = 0; $i < $end_blocks; $i++) {
- $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
- }
- $end_blocks = 0;
- }
- $v_binary_data = pack("a512", $v_buffer);
- $this->_writeBlock($v_binary_data);
- }
-
- @xzclose($v_temp_tar);
- }
-
- if (!@unlink($this->_tarname . ".tmp")) {
- $this->_error(
- 'Error while deleting temporary file \''
- . $this->_tarname . '.tmp\''
- );
- }
-
- } else {
- // ----- For not compressed tar, just add files before the last
- // one or two 512 bytes block
- if (!$this->_openReadWrite()) {
- return false;
- }
-
- clearstatcache();
- $v_size = filesize($this->_tarname);
-
- // We might have zero, one or two end blocks.
- // The standard is two, but we should try to handle
- // other cases.
- fseek($this->_file, $v_size - 1024);
- if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
- fseek($this->_file, $v_size - 1024);
- } elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
- fseek($this->_file, $v_size - 512);
- }
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _append()
- function _append($p_filelist, $p_add_dir = '', $p_remove_dir = '')
- {
- if (!$this->_openAppend()) {
- return false;
- }
-
- if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir)) {
- $this->_writeFooter();
- }
-
- $this->_close();
-
- return true;
- }
-
- // }}}
-
- // {{{ _dirCheck()
-
- /**
- * Check if a directory exists and create it (including parent
- * dirs) if not.
- *
- * @param string $p_dir directory to check
- *
- * @return bool true if the directory exists or was created
- */
- function _dirCheck($p_dir)
- {
- clearstatcache();
- if ((@is_dir($p_dir)) || ($p_dir == '')) {
- return true;
- }
-
- $p_parent_dir = dirname($p_dir);
-
- if (($p_parent_dir != $p_dir) &&
- ($p_parent_dir != '') &&
- (!$this->_dirCheck($p_parent_dir))
- ) {
- return false;
- }
-
- if (!@mkdir($p_dir, 0777)) {
- $this->_error("Unable to create directory '$p_dir'");
- return false;
- }
-
- return true;
- }
-
- // }}}
-
- // {{{ _pathReduction()
-
- /**
- * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar",
- * rand emove double slashes.
- *
- * @param string $p_dir path to reduce
- *
- * @return string reduced path
- *
- * @access private
- *
- */
- function _pathReduction($p_dir)
- {
- $v_result = '';
-
- // ----- Look for not empty path
- if ($p_dir != '') {
- // ----- Explode path by directory names
- $v_list = explode('/', $p_dir);
-
- // ----- Study directories from last to first
- for ($i = sizeof($v_list) - 1; $i >= 0; $i--) {
- // ----- Look for current path
- if ($v_list[$i] == ".") {
- // ----- Ignore this directory
- // Should be the first $i=0, but no check is done
- } else {
- if ($v_list[$i] == "..") {
- // ----- Ignore it and ignore the $i-1
- $i--;
- } else {
- if (($v_list[$i] == '')
- && ($i != (sizeof($v_list) - 1))
- && ($i != 0)
- ) {
- // ----- Ignore only the double '//' in path,
- // but not the first and last /
- } else {
- $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/'
- . $v_result : '');
- }
- }
- }
- }
- }
-
- if (defined('OS_WINDOWS') && OS_WINDOWS) {
- $v_result = strtr($v_result, '\\', '/');
- }
-
- return $v_result;
- }
-
- // }}}
-
- // {{{ _translateWinPath()
- function _translateWinPath($p_path, $p_remove_disk_letter = true)
- {
- if (defined('OS_WINDOWS') && OS_WINDOWS) {
- // ----- Look for potential disk letter
- if (($p_remove_disk_letter)
- && (($v_position = strpos($p_path, ':')) != false)
- ) {
- $p_path = substr($p_path, $v_position + 1);
- }
- // ----- Change potential windows directory separator
- if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0, 1) == '\\')) {
- $p_path = strtr($p_path, '\\', '/');
- }
- }
- return $p_path;
- }
- // }}}
-
-}
-
-?>
-
-===================================
-Last update : 2001-08-15
-
-
-
-Overview :
-----------
-
- The Archive_Tar class helps in creating and managing GNU TAR format
- files compressed by GNU ZIP or not.
- The class offers basic functions like creating an archive, adding
- files in the archive, extracting files from the archive and listing
- the archive content.
- It also provide advanced functions that allow the adding and
- extraction of files with path manipulation.
-
-
-Sample :
---------
-
- // ----- Creating the object (uncompressed archive)
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->setErrorHandling(PEAR_ERROR_PRINT);
-
- // ----- Creating the archive
- $v_list[0]="file.txt";
- $v_list[1]="data/";
- $v_list[2]="file.log";
- $tar_object->create($v_list);
-
- // ----- Adding files
- $v_list[0]="dev/file.txt";
- $v_list[1]="dev/data/";
- $v_list[2]="log/file.log";
- $tar_object->add($v_list);
-
- // ----- Adding more files
- $tar_object->add("release/newfile.log release/readme.txt");
-
- // ----- Listing the content
- if (($v_list = $tar_object->listContent()) != 0)
- for ($i=0; $i<sizeof($v_list); $i++)
- {
- echo "Filename :'".$v_list[$i][filename]."'<br>";
- echo " .size :'".$v_list[$i][size]."'<br>";
- echo " .mtime :'".$v_list[$i][mtime]."' (".date("l dS of F Y h:i:s A", $v_list[$i][mtime]).")<br>";
- echo " .mode :'".$v_list[$i][mode]."'<br>";
- echo " .uid :'".$v_list[$i][uid]."'<br>";
- echo " .gid :'".$v_list[$i][gid]."'<br>";
- echo " .typeflag :'".$v_list[$i][typeflag]."'<br>";
- }
-
- // ----- Extracting the archive in directory "install"
- $tar_object->extract("install");
-
-
-Public arguments :
-------------------
-
-None
-
-
-Public Methods :
-----------------
-
-Method : Archive_Tar($p_tarname, $compress = null)
-Description :
- Archive_Tar Class constructor. This flavour of the constructor only
- declare a new Archive_Tar object, identifying it by the name of the
- tar file.
- If the compress argument is set the tar will be read or created as a
- gzip or bz2 compressed TAR file.
-Arguments :
- $p_tarname : A valid filename for the tar archive file.
- $p_compress : can be null, 'gz' or 'bz2'. For
- compatibility reason it can also be true. This
- parameter indicates if gzip or bz2 compression
- is required.
-Return value :
- The Archive_Tar object.
-Sample :
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object_compressed = new Archive_Tar("tarname.tgz", true);
-How it works :
- Initialize the object.
-
-Method : create($p_filelist)
-Description :
- This method creates the archive file and add the files / directories
- that are listed in $p_filelist.
- If the file already exists and is writable, it is replaced by the
- new tar. It is a create and not an add. If the file exists and is
- read-only or is a directory it is not replaced. The method return
- false and a PEAR error text.
- The $p_filelist parameter can be an array of string, each string
- representing a filename or a directory name with their path if
- needed. It can also be a single string with names separated by a
- single blank.
- See also createModify() method for more details.
-Arguments :
- $p_filelist : An array of filenames and directory names, or a single
- string with names separated by a single blank space.
-Return value :
- true on success, false on error.
-Sample 1 :
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
- $v_list[0]="file.txt";
- $v_list[1]="data/"; (Optional '/' at the end)
- $v_list[2]="file.log";
- $tar_object->create($v_list);
-Sample 2 :
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
- $tar_object->create("file.txt data/ file.log");
-How it works :
- Just calling the createModify() method with the right parameters.
-
-Method : createModify($p_filelist, $p_add_dir, $p_remove_dir = "")
-Description :
- This method creates the archive file and add the files / directories
- that are listed in $p_filelist.
- If the file already exists and is writable, it is replaced by the
- new tar. It is a create and not an add. If the file exists and is
- read-only or is a directory it is not replaced. The method return
- false and a PEAR error text.
- The $p_filelist parameter can be an array of string, each string
- representing a filename or a directory name with their path if
- needed. It can also be a single string with names separated by a
- single blank.
- The path indicated in $p_remove_dir will be removed from the
- memorized path of each file / directory listed when this path
- exists. By default nothing is removed (empty path "")
- The path indicated in $p_add_dir will be added at the beginning of
- the memorized path of each file / directory listed. However it can
- be set to empty "". The adding of a path is done after the removing
- of path.
- The path add/remove ability enables the user to prepare an archive
- for extraction in a different path than the origin files are.
- See also addModify() method for file adding properties.
-Arguments :
- $p_filelist : An array of filenames and directory names, or a single
- string with names separated by a single blank space.
- $p_add_dir : A string which contains a path to be added to the
- memorized path of each element in the list.
- $p_remove_dir : A string which contains a path to be removed from
- the memorized path of each element in the list, when
- relevant.
-Return value :
- true on success, false on error.
-Sample 1 :
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
- $v_list[0]="file.txt";
- $v_list[1]="data/"; (Optional '/' at the end)
- $v_list[2]="file.log";
- $tar_object->createModify($v_list, "install");
- // files are stored in the archive as :
- // install/file.txt
- // install/data
- // install/data/file1.txt
- // install/data/... all the files and sub-dirs of data/
- // install/file.log
-Sample 2 :
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling
- $v_list[0]="dev/file.txt";
- $v_list[1]="dev/data/"; (Optional '/' at the end)
- $v_list[2]="log/file.log";
- $tar_object->createModify($v_list, "install", "dev");
- // files are stored in the archive as :
- // install/file.txt
- // install/data
- // install/data/file1.txt
- // install/data/... all the files and sub-dirs of data/
- // install/log/file.log
-How it works :
- Open the file in write mode (erasing the existing one if one),
- call the _addList() method for adding the files in an empty archive,
- add the tar footer (512 bytes block), close the tar file.
-
-
-Method : addModify($p_filelist, $p_add_dir, $p_remove_dir="")
-Description :
- This method add the files / directories listed in $p_filelist at the
- end of the existing archive. If the archive does not yet exists it
- is created.
- The $p_filelist parameter can be an array of string, each string
- representing a filename or a directory name with their path if
- needed. It can also be a single string with names separated by a
- single blank.
- The path indicated in $p_remove_dir will be removed from the
- memorized path of each file / directory listed when this path
- exists. By default nothing is removed (empty path "")
- The path indicated in $p_add_dir will be added at the beginning of
- the memorized path of each file / directory listed. However it can
- be set to empty "". The adding of a path is done after the removing
- of path.
- The path add/remove ability enables the user to prepare an archive
- for extraction in a different path than the origin files are.
- If a file/dir is already in the archive it will only be added at the
- end of the archive. There is no update of the existing archived
- file/dir. However while extracting the archive, the last file will
- replace the first one. This results in a none optimization of the
- archive size.
- If a file/dir does not exist the file/dir is ignored. However an
- error text is send to PEAR error.
- If a file/dir is not readable the file/dir is ignored. However an
- error text is send to PEAR error.
- If the resulting filename/dirname (after the add/remove option or
- not) string is greater than 99 char, the file/dir is
- ignored. However an error text is send to PEAR error.
-Arguments :
- $p_filelist : An array of filenames and directory names, or a single
- string with names separated by a single blank space.
- $p_add_dir : A string which contains a path to be added to the
- memorized path of each element in the list.
- $p_remove_dir : A string which contains a path to be removed from
- the memorized path of each element in the list, when
- relevant.
-Return value :
- true on success, false on error.
-Sample 1 :
- $tar_object = new Archive_Tar("tarname.tar");
- [...]
- $v_list[0]="dev/file.txt";
- $v_list[1]="dev/data/"; (Optional '/' at the end)
- $v_list[2]="log/file.log";
- $tar_object->addModify($v_list, "install");
- // files are stored in the archive as :
- // install/file.txt
- // install/data
- // install/data/file1.txt
- // install/data/... all the files and sub-dirs of data/
- // install/file.log
-Sample 2 :
- $tar_object = new Archive_Tar("tarname.tar");
- [...]
- $v_list[0]="dev/file.txt";
- $v_list[1]="dev/data/"; (Optional '/' at the end)
- $v_list[2]="log/file.log";
- $tar_object->addModify($v_list, "install", "dev");
- // files are stored in the archive as :
- // install/file.txt
- // install/data
- // install/data/file1.txt
- // install/data/... all the files and sub-dirs of data/
- // install/log/file.log
-How it works :
- If the archive does not exists it create it and add the files.
- If the archive does exists and is not compressed, it open it, jump
- before the last empty 512 bytes block (tar footer) and add the files
- at this point.
- If the archive does exists and is compressed, a temporary copy file
- is created. This temporary file is then 'gzip' read block by block
- until the last empty block. The new files are then added in the
- compressed file.
- The adding of files is done by going through the file/dir list,
- adding files per files, in a recursive way through the
- directory. Each time a path need to be added/removed it is done
- before writing the file header in the archive.
-
-Method : add($p_filelist)
-Description :
- This method add the files / directories listed in $p_filelist at the
- end of the existing archive. If the archive does not yet exists it
- is created.
- The $p_filelist parameter can be an array of string, each string
- representing a filename or a directory name with their path if
- needed. It can also be a single string with names separated by a
- single blank.
- See addModify() method for details and limitations.
-Arguments :
- $p_filelist : An array of filenames and directory names, or a single
- string with names separated by a single blank space.
-Return value :
- true on success, false on error.
-Sample 1 :
- $tar_object = new Archive_Tar("tarname.tar");
- [...]
- $v_list[0]="dev/file.txt";
- $v_list[1]="dev/data/"; (Optional '/' at the end)
- $v_list[2]="log/file.log";
- $tar_object->add($v_list);
-Sample 2 :
- $tar_object = new Archive_Tar("tarname.tgz", true);
- [...]
- $v_list[0]="dev/file.txt";
- $v_list[1]="dev/data/"; (Optional '/' at the end)
- $v_list[2]="log/file.log";
- $tar_object->add($v_list);
-How it works :
- Simply call the addModify() method with the right parameters.
-
-Method : addString($p_filename, $p_string, $p_datetime, $p_params)
-Description :
- This method add a single string as a file at the
- end of the existing archive. If the archive does not yet exists it
- is created.
-Arguments :
- $p_filename : A string which contains the full filename path
- that will be associated with the string.
- $p_string : The content of the file added in the archive.
- $p_datetime : (Optional) Timestamp of the file (default = now)
- $p_params : (Optional) Various file metadata:
- stamp - As above, timestamp of the file
- mode - UNIX-style permissions (default 0600)
- type - Is this a regular file or link (see TAR
- format spec for how to create a hard/symlink)
- uid - UNIX-style user ID (default 0 = root)
- gid - UNIX-style group ID (default 0 = root)
-Return value :
- true on success, false on error.
-Sample 1 :
- $v_archive = & new Archive_Tar($p_filename);
- $v_archive->setErrorHandling(PEAR_ERROR_PRINT);
- $v_result = $v_archive->addString('data/test.txt', 'This is the text of the string');
- $v_result = $v_archive->addString(
- 'data/test.sh',
- "#!/bin/sh\necho 'Hello'",
- time(),
- array( "mode" => 0755, "uid" => 34 )
- );
-
-
-Method : extract($p_path = "")
-Description :
- This method extract all the content of the archive in the directory
- indicated by $p_path.If $p_path is optional, if not set the archive
- is extracted in the current directory.
- While extracting a file, if the directory path does not exists it is
- created.
- See extractModify() for details and limitations.
-Arguments :
- $p_path : Optional path where the files/dir need to by extracted.
-Return value :
- true on success, false on error.
-Sample :
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->extract();
-How it works :
- Simply call the extractModify() method with appropriate parameters.
-
-Method : extractModify($p_path, $p_remove_path)
-Description :
- This method extract all the content of the archive in the directory
- indicated by $p_path. When relevant the memorized path of the
- files/dir can be modified by removing the $p_remove_path path at the
- beginning of the file/dir path.
- While extracting a file, if the directory path does not exists it is
- created.
- While extracting a file, if the file already exists it is replaced
- without looking for last modification date.
- While extracting a file, if the file already exists and is write
- protected, the extraction is aborted.
- While extracting a file, if a directory with the same name already
- exists, the extraction is aborted.
- While extracting a directory, if a file with the same name already
- exists, the extraction is aborted.
- While extracting a file/directory if the destination directory exist
- and is write protected, or does not exist but can not be created,
- the extraction is aborted.
- If after extraction an extracted file does not show the correct
- stored file size, the extraction is aborted.
- When the extraction is aborted, a PEAR error text is set and false
- is returned. However the result can be a partial extraction that may
- need to be manually cleaned.
-Arguments :
- $p_path : The path of the directory where the files/dir need to by
- extracted.
- $p_remove_path : Part of the memorized path that can be removed if
- present at the beginning of the file/dir path.
-Return value :
- true on success, false on error.
-Sample :
- // Imagine tarname.tar with files :
- // dev/data/file.txt
- // dev/data/log.txt
- // readme.txt
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->extractModify("install", "dev");
- // Files will be extracted there :
- // install/data/file.txt
- // install/data/log.txt
- // install/readme.txt
-How it works :
- Open the archive and call a more generic function that can extract
- only a part of the archive or all the archive.
- See extractList() method for more details.
-
-Method : extractInString($p_filename)
-Description :
- This method extract from the archive one file identified by $p_filename.
- The return value is a string with the file content, or NULL on error.
-Arguments :
- $p_filename : The path of the file to extract in a string.
-Return value :
- a string with the file content or NULL.
-Sample :
- // Imagine tarname.tar with files :
- // dev/data/file.txt
- // dev/data/log.txt
- // dev/readme.txt
- $v_archive = & new Archive_Tar('tarname.tar');
- $v_archive->setErrorHandling(PEAR_ERROR_PRINT);
- $v_string = $v_archive->extractInString('dev/readme.txt');
- echo $v_string;
-
-Method : listContent()
-Description :
- This method returns an array of arrays that describe each
- file/directory present in the archive.
- The array is not sorted, so it show the position of the file in the
- archive.
- The file informations are :
- $file[filename] : Name and path of the file/dir.
- $file[mode] : File permissions (result of fileperms())
- $file[uid] : user id
- $file[gid] : group id
- $file[size] : filesize
- $file[mtime] : Last modification time (result of filemtime())
- $file[typeflag] : "" for file, "5" for directory
-Arguments :
-Return value :
- An array of arrays or 0 on error.
-Sample :
- $tar_object = new Archive_Tar("tarname.tar");
- if (($v_list = $tar_object->listContent()) != 0)
- for ($i=0; $i<sizeof($v_list); $i++)
- {
- echo "Filename :'".$v_list[$i][filename]."'<br>";
- echo " .size :'".$v_list[$i][size]."'<br>";
- echo " .mtime :'".$v_list[$i][mtime]."' (".
- date("l dS of F Y h:i:s A", $v_list[$i][mtime]).")<br>";
- echo " .mode :'".$v_list[$i][mode]."'<br>";
- echo " .uid :'".$v_list[$i][uid]."'<br>";
- echo " .gid :'".$v_list[$i][gid]."'<br>";
- echo " .typeflag :'".$v_list[$i][typeflag]."'<br>";
- }
-How it works :
- Call the same function as an extract however with a flag to only go
- through the archive without extracting the files.
-
-Method : extractList($p_filelist, $p_path = "", $p_remove_path = "")
-Description :
- This method extract from the archive only the files indicated in the
- $p_filelist. These files are extracted in the current directory or
- in the directory indicated by the optional $p_path parameter.
- If indicated the $p_remove_path can be used in the same way as it is
- used in extractModify() method.
-Arguments :
- $p_filelist : An array of filenames and directory names, or a single
- string with names separated by a single blank space.
- $p_path : The path of the directory where the files/dir need to by
- extracted.
- $p_remove_path : Part of the memorized path that can be removed if
- present at the beginning of the file/dir path.
-Return value :
- true on success, false on error.
-Sample :
- // Imagine tarname.tar with files :
- // dev/data/file.txt
- // dev/data/log.txt
- // readme.txt
- $tar_object = new Archive_Tar("tarname.tar");
- $tar_object->extractList("dev/data/file.txt readme.txt", "install",
- "dev");
- // Files will be extracted there :
- // install/data/file.txt
- // install/readme.txt
-How it works :
- Go through the archive and extract only the files present in the
- list.
-
-
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-/**
- * PHP Version 5
- *
- * Copyright (c) 1997-2004 The PHP Group
- *
- * This source file is subject to version 3.0 of the PHP license,
- * that is bundled with this package in the file LICENSE, and is
- * available through the world-wide-web at the following url:
- * http://www.php.net/license/3_0.txt.
- * If you did not receive a copy of the PHP license and are unable to
- * obtain it through the world-wide-web, please send a note to
- * license@php.net so we can mail you a copy immediately.
- *
- * @category Console
- * @package Console_Getopt
- * @author Andrei Zmievski <andrei@php.net>
- * @license http://www.php.net/license/3_0.txt PHP 3.0
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Console_Getopt
- */
-
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-
-/**
- * Command-line options parsing class.
- *
- * @category Console
- * @package Console_Getopt
- * @author Andrei Zmievski <andrei@php.net>
- * @license http://www.php.net/license/3_0.txt PHP 3.0
- * @link http://pear.php.net/package/Console_Getopt
- */
-class Console_Getopt
-{
-
- /**
- * Parses the command-line options.
- *
- * The first parameter to this function should be the list of command-line
- * arguments without the leading reference to the running program.
- *
- * The second parameter is a string of allowed short options. Each of the
- * option letters can be followed by a colon ':' to specify that the option
- * requires an argument, or a double colon '::' to specify that the option
- * takes an optional argument.
- *
- * The third argument is an optional array of allowed long options. The
- * leading '--' should not be included in the option name. Options that
- * require an argument should be followed by '=', and options that take an
- * option argument should be followed by '=='.
- *
- * The return value is an array of two elements: the list of parsed
- * options and the list of non-option command-line arguments. Each entry in
- * the list of parsed options is a pair of elements - the first one
- * specifies the option, and the second one specifies the option argument,
- * if there was one.
- *
- * Long and short options can be mixed.
- *
- * Most of the semantics of this function are based on GNU getopt_long().
- *
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return array two-element array containing the list of parsed options and
- * the non-option arguments
- */
- public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
- {
- return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
- }
-
- /**
- * This function expects $args to start with the script name (POSIX-style).
- * Preserved for backwards compatibility.
- *
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- *
- * @see getopt2()
- * @return array two-element array containing the list of parsed options and
- * the non-option arguments
- */
- public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
- {
- return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
- }
-
- /**
- * The actual implementation of the argument parsing code.
- *
- * @param int $version Version to use
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return array
- */
- public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
- {
- // in case you pass directly readPHPArgv() as the first arg
- if (PEAR::isError($args)) {
- return $args;
- }
-
- if (empty($args)) {
- return array(array(), array());
- }
-
- $non_opts = $opts = array();
-
- settype($args, 'array');
-
- if ($long_options) {
- sort($long_options);
- }
-
- /*
- * Preserve backwards compatibility with callers that relied on
- * erroneous POSIX fix.
- */
- if ($version < 2) {
- if (isset($args[0]{0}) && $args[0]{0} != '-') {
- array_shift($args);
- }
- }
-
- reset($args);
- while (list($i, $arg) = each($args)) {
- /* The special element '--' means explicit end of
- options. Treat the rest of the arguments as non-options
- and end the loop. */
- if ($arg == '--') {
- $non_opts = array_merge($non_opts, array_slice($args, $i + 1));
- break;
- }
-
- if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
- } elseif (strlen($arg) > 1 && $arg{1} == '-') {
- $error = Console_Getopt::_parseLongOption(substr($arg, 2),
- $long_options,
- $opts,
- $args,
- $skip_unknown);
- if (PEAR::isError($error)) {
- return $error;
- }
- } elseif ($arg == '-') {
- // - is stdin
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
- } else {
- $error = Console_Getopt::_parseShortOption(substr($arg, 1),
- $short_options,
- $opts,
- $args,
- $skip_unknown);
- if (PEAR::isError($error)) {
- return $error;
- }
- }
- }
-
- return array($opts, $non_opts);
- }
-
- /**
- * Parse short option
- *
- * @param string $arg Argument
- * @param string[] $short_options Available short options
- * @param string[][] &$opts
- * @param string[] &$args
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return void
- */
- protected static function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
- {
- for ($i = 0; $i < strlen($arg); $i++) {
- $opt = $arg{$i};
- $opt_arg = null;
-
- /* Try to find the short option in the specifier string. */
- if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
- if ($skip_unknown === true) {
- break;
- }
-
- $msg = "Console_Getopt: unrecognized option -- $opt";
- return PEAR::raiseError($msg);
- }
-
- if (strlen($spec) > 1 && $spec{1} == ':') {
- if (strlen($spec) > 2 && $spec{2} == ':') {
- if ($i + 1 < strlen($arg)) {
- /* Option takes an optional argument. Use the remainder of
- the arg string if there is anything left. */
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- }
- } else {
- /* Option requires an argument. Use the remainder of the arg
- string if there is anything left. */
- if ($i + 1 < strlen($arg)) {
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- } else if (list(, $opt_arg) = each($args)) {
- /* Else use the next argument. */;
- if (Console_Getopt::_isShortOpt($opt_arg)
- || Console_Getopt::_isLongOpt($opt_arg)) {
- $msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- } else {
- $msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- }
- }
-
- $opts[] = array($opt, $opt_arg);
- }
- }
-
- /**
- * Checks if an argument is a short option
- *
- * @param string $arg Argument to check
- *
- * @return bool
- */
- protected static function _isShortOpt($arg)
- {
- return strlen($arg) == 2 && $arg[0] == '-'
- && preg_match('/[a-zA-Z]/', $arg[1]);
- }
-
- /**
- * Checks if an argument is a long option
- *
- * @param string $arg Argument to check
- *
- * @return bool
- */
- protected static function _isLongOpt($arg)
- {
- return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
- preg_match('/[a-zA-Z]+$/', substr($arg, 2));
- }
-
- /**
- * Parse long option
- *
- * @param string $arg Argument
- * @param string[] $long_options Available long options
- * @param string[][] &$opts
- * @param string[] &$args
- *
- * @return void|PEAR_Error
- */
- protected static function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
- {
- @list($opt, $opt_arg) = explode('=', $arg, 2);
-
- $opt_len = strlen($opt);
-
- for ($i = 0; $i < count($long_options); $i++) {
- $long_opt = $long_options[$i];
- $opt_start = substr($long_opt, 0, $opt_len);
-
- $long_opt_name = str_replace('=', '', $long_opt);
-
- /* Option doesn't match. Go on to the next one. */
- if ($long_opt_name != $opt) {
- continue;
- }
-
- $opt_rest = substr($long_opt, $opt_len);
-
- /* Check that the options uniquely matches one of the allowed
- options. */
- if ($i + 1 < count($long_options)) {
- $next_option_rest = substr($long_options[$i + 1], $opt_len);
- } else {
- $next_option_rest = '';
- }
-
- if ($opt_rest != '' && $opt{0} != '=' &&
- $i + 1 < count($long_options) &&
- $opt == substr($long_options[$i+1], 0, $opt_len) &&
- $next_option_rest != '' &&
- $next_option_rest{0} != '=') {
-
- $msg = "Console_Getopt: option --$opt is ambiguous";
- return PEAR::raiseError($msg);
- }
-
- if (substr($long_opt, -1) == '=') {
- if (substr($long_opt, -2) != '==') {
- /* Long option requires an argument.
- Take the next argument if one wasn't specified. */;
- if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
- $msg = "Console_Getopt: option requires an argument --$opt";
- return PEAR::raiseError($msg);
- }
-
- if (Console_Getopt::_isShortOpt($opt_arg)
- || Console_Getopt::_isLongOpt($opt_arg)) {
- $msg = "Console_Getopt: option requires an argument --$opt";
- return PEAR::raiseError($msg);
- }
- }
- } else if ($opt_arg) {
- $msg = "Console_Getopt: option --$opt doesn't allow an argument";
- return PEAR::raiseError($msg);
- }
-
- $opts[] = array('--' . $opt, $opt_arg);
- return;
- }
-
- if ($skip_unknown === true) {
- return;
- }
-
- return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
- }
-
- /**
- * Safely read the $argv PHP array across different PHP configurations.
- * Will take care on register_globals and register_argc_argv ini directives
- *
- * @return mixed the $argv PHP array or PEAR error if not registered
- */
- public static function readPHPArgv()
- {
- global $argv;
- if (!is_array($argv)) {
- if (!@is_array($_SERVER['argv'])) {
- if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
- $msg = "Could not read cmd args (register_argc_argv=Off?)";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- return $GLOBALS['HTTP_SERVER_VARS']['argv'];
- }
- return $_SERVER['argv'];
- }
- return $argv;
- }
-
-}package.xml
-<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Console_Getopt</name>
- <channel>pear.php.net</channel>
- <summary>Command-line option parser</summary>
- <description>This is a PHP implementation of &quot;getopt&quot; supporting both
-short and long options.</description>
- <lead>
- <name>Andrei Zmievski</name>
- <user>andrei</user>
- <email>andrei@php.net</email>
- <active>no</active>
- </lead>
- <developer>
- <name>Stig Bakken</name>
- <user>ssb</user>
- <email>stig@php.net</email>
- <active>no</active>
- </developer>
- <helper>
- <name>Greg Beaver</name>
- <user>cellog</user>
- <email>cellog@php.net</email>
- <active>yes</active>
- </helper>
- <date>2015-02-22</date>
- <time>13:25:49</time>
- <version>
- <release>1.4.0</release>
- <api>1.4.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
- <notes>
-* Change license to BSD-2-Clause
-* Set minimum PHP version to 5.4.0
-* Mark static methods with &quot;static&quot; keyword
- </notes>
- <contents>
- <dir name="/">
- <file md5sum="013530beb065fb8885f70af40b6c91fa" name="Console/Getopt.php" role="php" />
- </dir>
- </contents>
- <compatible>
- <name>PEAR</name>
- <channel>pear.php.net</channel>
- <min>1.4.0</min>
- <max>1.999.999</max>
- </compatible>
- <dependencies>
- <required>
- <php>
- <min>5.4.0</min>
- </php>
- <pearinstaller>
- <min>1.8.0</min>
- </pearinstaller>
- </required>
- </dependencies>
- <phprelease />
- <changelog>
- <release>
- <date>2015-02-22</date>
- <version>
- <release>1.3.1</release>
- <api>1.3.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">BSD-2-Clause</license>
- <notes>
-* Change license to BSD-2-Clause
-* Set minimum PHP version to 5.4.0
-* Mark static methods with &quot;static&quot; keyword
- </notes>
- </release>
- <release>
- <date>2011-03-07</date>
- <version>
- <release>1.3.1</release>
- <api>1.3.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-* Change the minimum PEAR installer dep to be lower
- </notes>
- </release>
- <release>
- <date>2010-12-11</date>
- <time>20:20:13</time>
- <version>
- <release>1.3.0</release>
- <api>1.3.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-* Implement Request #13140: [PATCH] to skip unknown parameters. [patch by rquadling, improved on by dufuz]
- </notes>
- </release>
- <release>
- <date>2007-06-12</date>
- <version>
- <release>1.2.3</release>
- <api>1.2.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-* fix Bug #11068: No way to read plain &quot;-&quot; option [cardoe]
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.2</release>
- <api>1.2.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2007-02-17</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-* fix Bug #4475: An ambiguous error occurred when specifying similar longoption name.
-* fix Bug #10055: Not failing properly on short options missing required values
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.1</release>
- <api>1.2.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2006-12-08</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag)
- </notes>
- </release>
- <release>
- <version>
- <release>1.2</release>
- <api>1.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-12-11</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Fix to preserve BC with 1.0 and allow correct behaviour for new users
- </notes>
- </release>
- <release>
- <version>
- <release>1.0</release>
- <api>1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2002-09-13</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Stable release
- </notes>
- </release>
- <release>
- <version>
- <release>0.11</release>
- <api>0.11</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2002-05-26</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-POSIX getopt compatibility fix: treat first element of args
- array as command name
- </notes>
- </release>
- <release>
- <version>
- <release>0.10</release>
- <api>0.10</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2002-05-12</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Packaging fix
- </notes>
- </release>
- <release>
- <version>
- <release>0.9</release>
- <api>0.9</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2002-05-12</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-Initial release
- </notes>
- </release>
- </changelog>
-</package>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-/**
- * PHP Version 5
- *
- * Copyright (c) 1997-2004 The PHP Group
- *
- * This source file is subject to version 3.0 of the PHP license,
- * that is bundled with this package in the file LICENSE, and is
- * available through the world-wide-web at the following url:
- * http://www.php.net/license/3_0.txt.
- * If you did not receive a copy of the PHP license and are unable to
- * obtain it through the world-wide-web, please send a note to
- * license@php.net so we can mail you a copy immediately.
- *
- * @category Console
- * @package Console_Getopt
- * @author Andrei Zmievski <andrei@php.net>
- * @license http://www.php.net/license/3_0.txt PHP 3.0
- * @version CVS: $Id$
- * @link http://pear.php.net/package/Console_Getopt
- */
-
-require_once 'PEAR.php';
-
-/**
- * Command-line options parsing class.
- *
- * @category Console
- * @package Console_Getopt
- * @author Andrei Zmievski <andrei@php.net>
- * @license http://www.php.net/license/3_0.txt PHP 3.0
- * @link http://pear.php.net/package/Console_Getopt
- */
-class Console_Getopt
-{
-
- /**
- * Parses the command-line options.
- *
- * The first parameter to this function should be the list of command-line
- * arguments without the leading reference to the running program.
- *
- * The second parameter is a string of allowed short options. Each of the
- * option letters can be followed by a colon ':' to specify that the option
- * requires an argument, or a double colon '::' to specify that the option
- * takes an optional argument.
- *
- * The third argument is an optional array of allowed long options. The
- * leading '--' should not be included in the option name. Options that
- * require an argument should be followed by '=', and options that take an
- * option argument should be followed by '=='.
- *
- * The return value is an array of two elements: the list of parsed
- * options and the list of non-option command-line arguments. Each entry in
- * the list of parsed options is a pair of elements - the first one
- * specifies the option, and the second one specifies the option argument,
- * if there was one.
- *
- * Long and short options can be mixed.
- *
- * Most of the semantics of this function are based on GNU getopt_long().
- *
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return array two-element array containing the list of parsed options and
- * the non-option arguments
- */
- public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
- {
- return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
- }
-
- /**
- * This function expects $args to start with the script name (POSIX-style).
- * Preserved for backwards compatibility.
- *
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- *
- * @see getopt2()
- * @return array two-element array containing the list of parsed options and
- * the non-option arguments
- */
- public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
- {
- return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
- }
-
- /**
- * The actual implementation of the argument parsing code.
- *
- * @param int $version Version to use
- * @param array $args an array of command-line arguments
- * @param string $short_options specifies the list of allowed short options
- * @param array $long_options specifies the list of allowed long options
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return array
- */
- public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
- {
- // in case you pass directly readPHPArgv() as the first arg
- if (PEAR::isError($args)) {
- return $args;
- }
-
- if (empty($args)) {
- return array(array(), array());
- }
-
- $non_opts = $opts = array();
-
- settype($args, 'array');
-
- if ($long_options) {
- sort($long_options);
- }
-
- /*
- * Preserve backwards compatibility with callers that relied on
- * erroneous POSIX fix.
- */
- if ($version < 2) {
- if (isset($args[0]{0}) && $args[0]{0} != '-') {
- array_shift($args);
- }
- }
-
- reset($args);
- while (list($i, $arg) = each($args)) {
- /* The special element '--' means explicit end of
- options. Treat the rest of the arguments as non-options
- and end the loop. */
- if ($arg == '--') {
- $non_opts = array_merge($non_opts, array_slice($args, $i + 1));
- break;
- }
-
- if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
- } elseif (strlen($arg) > 1 && $arg{1} == '-') {
- $error = Console_Getopt::_parseLongOption(substr($arg, 2),
- $long_options,
- $opts,
- $args,
- $skip_unknown);
- if (PEAR::isError($error)) {
- return $error;
- }
- } elseif ($arg == '-') {
- // - is stdin
- $non_opts = array_merge($non_opts, array_slice($args, $i));
- break;
- } else {
- $error = Console_Getopt::_parseShortOption(substr($arg, 1),
- $short_options,
- $opts,
- $args,
- $skip_unknown);
- if (PEAR::isError($error)) {
- return $error;
- }
- }
- }
-
- return array($opts, $non_opts);
- }
-
- /**
- * Parse short option
- *
- * @param string $arg Argument
- * @param string[] $short_options Available short options
- * @param string[][] &$opts
- * @param string[] &$args
- * @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
- *
- * @return void
- */
- protected static function _parseShortOption($arg, $short_options, &$opts, &$args, $skip_unknown)
- {
- for ($i = 0; $i < strlen($arg); $i++) {
- $opt = $arg{$i};
- $opt_arg = null;
-
- /* Try to find the short option in the specifier string. */
- if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') {
- if ($skip_unknown === true) {
- break;
- }
-
- $msg = "Console_Getopt: unrecognized option -- $opt";
- return PEAR::raiseError($msg);
- }
-
- if (strlen($spec) > 1 && $spec{1} == ':') {
- if (strlen($spec) > 2 && $spec{2} == ':') {
- if ($i + 1 < strlen($arg)) {
- /* Option takes an optional argument. Use the remainder of
- the arg string if there is anything left. */
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- }
- } else {
- /* Option requires an argument. Use the remainder of the arg
- string if there is anything left. */
- if ($i + 1 < strlen($arg)) {
- $opts[] = array($opt, substr($arg, $i + 1));
- break;
- } else if (list(, $opt_arg) = each($args)) {
- /* Else use the next argument. */;
- if (Console_Getopt::_isShortOpt($opt_arg)
- || Console_Getopt::_isLongOpt($opt_arg)) {
- $msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- } else {
- $msg = "option requires an argument --$opt";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- }
- }
-
- $opts[] = array($opt, $opt_arg);
- }
- }
-
- /**
- * Checks if an argument is a short option
- *
- * @param string $arg Argument to check
- *
- * @return bool
- */
- protected static function _isShortOpt($arg)
- {
- return strlen($arg) == 2 && $arg[0] == '-'
- && preg_match('/[a-zA-Z]/', $arg[1]);
- }
-
- /**
- * Checks if an argument is a long option
- *
- * @param string $arg Argument to check
- *
- * @return bool
- */
- protected static function _isLongOpt($arg)
- {
- return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
- preg_match('/[a-zA-Z]+$/', substr($arg, 2));
- }
-
- /**
- * Parse long option
- *
- * @param string $arg Argument
- * @param string[] $long_options Available long options
- * @param string[][] &$opts
- * @param string[] &$args
- *
- * @return void|PEAR_Error
- */
- protected static function _parseLongOption($arg, $long_options, &$opts, &$args, $skip_unknown)
- {
- @list($opt, $opt_arg) = explode('=', $arg, 2);
-
- $opt_len = strlen($opt);
-
- for ($i = 0; $i < count($long_options); $i++) {
- $long_opt = $long_options[$i];
- $opt_start = substr($long_opt, 0, $opt_len);
-
- $long_opt_name = str_replace('=', '', $long_opt);
-
- /* Option doesn't match. Go on to the next one. */
- if ($long_opt_name != $opt) {
- continue;
- }
-
- $opt_rest = substr($long_opt, $opt_len);
-
- /* Check that the options uniquely matches one of the allowed
- options. */
- if ($i + 1 < count($long_options)) {
- $next_option_rest = substr($long_options[$i + 1], $opt_len);
- } else {
- $next_option_rest = '';
- }
-
- if ($opt_rest != '' && $opt{0} != '=' &&
- $i + 1 < count($long_options) &&
- $opt == substr($long_options[$i+1], 0, $opt_len) &&
- $next_option_rest != '' &&
- $next_option_rest{0} != '=') {
-
- $msg = "Console_Getopt: option --$opt is ambiguous";
- return PEAR::raiseError($msg);
- }
-
- if (substr($long_opt, -1) == '=') {
- if (substr($long_opt, -2) != '==') {
- /* Long option requires an argument.
- Take the next argument if one wasn't specified. */;
- if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
- $msg = "Console_Getopt: option requires an argument --$opt";
- return PEAR::raiseError($msg);
- }
-
- if (Console_Getopt::_isShortOpt($opt_arg)
- || Console_Getopt::_isLongOpt($opt_arg)) {
- $msg = "Console_Getopt: option requires an argument --$opt";
- return PEAR::raiseError($msg);
- }
- }
- } else if ($opt_arg) {
- $msg = "Console_Getopt: option --$opt doesn't allow an argument";
- return PEAR::raiseError($msg);
- }
-
- $opts[] = array('--' . $opt, $opt_arg);
- return;
- }
-
- if ($skip_unknown === true) {
- return;
- }
-
- return PEAR::raiseError("Console_Getopt: unrecognized option --$opt");
- }
-
- /**
- * Safely read the $argv PHP array across different PHP configurations.
- * Will take care on register_globals and register_argc_argv ini directives
- *
- * @return mixed the $argv PHP array or PEAR error if not registered
- */
- public static function readPHPArgv()
- {
- global $argv;
- if (!is_array($argv)) {
- if (!@is_array($_SERVER['argv'])) {
- if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
- $msg = "Could not read cmd args (register_argc_argv=Off?)";
- return PEAR::raiseError("Console_Getopt: " . $msg);
- }
- return $GLOBALS['HTTP_SERVER_VARS']['argv'];
- }
- return $_SERVER['argv'];
- }
- return $argv;
- }
-
-}
-
-error_reporting(1803);
-
-if (ini_get('date.timezone') === '') {
- date_default_timezone_set('UTC');
-}
-
-$pear_dir = dirname(__FILE__);
-ini_set('include_path', '');
-if (function_exists('mb_internal_encoding')) {
- mb_internal_encoding('ASCII');
-}
-set_time_limit(0);
-include_once 'phar://install-pear-nozlib.phar/PEAR.php';
-include_once 'phar://install-pear-nozlib.phar/PEAR/Installer.php';
-include_once 'phar://install-pear-nozlib.phar/PEAR/Registry.php';
-include_once 'phar://install-pear-nozlib.phar/PEAR/PackageFile.php';
-include_once 'phar://install-pear-nozlib.phar/PEAR/Downloader/Package.php';
-include_once 'phar://install-pear-nozlib.phar/PEAR/Frontend.php';
-$a = true;
-if (!PEAR::loadExtension('xml')) {
- $a = false;
- echo "[PEAR] xml extension is required\n";
-}
-if (!PEAR::loadExtension('pcre')) {
- $a = false;
- echo "[PEAR] pcre extension is required\n";
-}
-if (!$a) {
- return -1;
-}
-
-$force = false;
-$install_files = array('Archive_Tar' => 'phar://install-pear-nozlib.phar/Archive_Tar-1.3.16.tar',
-'Console_Getopt' => 'phar://install-pear-nozlib.phar/Console_Getopt-1.4.0.tar',
-'Structures_Graph' => 'phar://install-pear-nozlib.phar/Structures_Graph-1.1.0.tar',
-'XML_Util' => 'phar://install-pear-nozlib.phar/XML_Util-1.3.0.tar',
-'PEAR' => 'phar://install-pear-nozlib.phar/PEAR-1.9.5.tar',
-);
-array_shift($argv);
-$debug = false;
-for ($i = 0; $i < sizeof($argv); $i++) {
- $arg = $argv[$i];
- $bn = basename($arg);
- if (preg_match('/package-(.*)\.xml$/', $bn, $matches) ||
- preg_match('/([A-Za-z0-9_:]+)-.*\.(tar|tgz)$/', $bn, $matches)) {
- $install_files[$matches[1]] = $arg;
- } elseif ($arg == '-a') {
- $cache_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '--force') {
- $force = true;
- } elseif ($arg == '-dp') {
- $prefix = $argv[$i+1];
- $i++;
- } elseif ($arg == '-ds') {
- $suffix = $argv[$i+1];
- $i++;
- } elseif ($arg == '-d') {
- $with_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '-b') {
- $bin_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '-c') {
- $cfg_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '-w') {
- $www_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '-p') {
- $php_bin = $argv[$i+1];
- $i++;
- } elseif ($arg == '-o') {
- $download_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '-t') {
- $temp_dir = $argv[$i+1];
- $i++;
- } elseif ($arg == '--debug') {
- $debug = 1;
- } elseif ($arg == '--extremedebug') {
- $debug = 2;
- }
-}
-
-$config = PEAR_Config::singleton();
-
-if (PEAR::isError($config)) {
- $locs = PEAR_Config::getDefaultConfigFiles();
- die("ERROR: One of $locs[user] or $locs[system] is corrupt, please remove them and try again");
-}
-
-// make sure we use only default values
-$config_layers = $config->getLayers();
-foreach ($config_layers as $layer) {
- if ($layer == 'default') continue;
- $config->removeLayer($layer);
-}
-$keys = $config->getKeys();
-if ($debug) {
- $config->set('verbose', 5, 'default');
-} else {
- $config->set('verbose', 0, 'default');
-}
-// PEAR executables
-if (!empty($bin_dir)) {
- $config->set('bin_dir', $bin_dir, 'default');
-}
-
-// Cache files
-if (!empty($cache_dir)) {
- $config->set('cache_dir', $cache_dir, 'default');
-}
-
-// Config files
-if (!empty($cfg_dir)) {
- $config->set('cfg_dir', $cfg_dir, 'default');
-}
-
-// Web files
-if (!empty($www_dir)) {
- $config->set('www_dir', $www_dir, 'default');
-}
-
-// Downloaded files
-if (!empty($download_dir)) {
- $config->set('download_dir', $download_dir, 'default');
-}
-
-// Temporary files
-if (!empty($temp_dir)) {
- $config->set('temp_dir', $temp_dir, 'default');
-}
-
-// User supplied a dir prefix
-if (!empty($with_dir)) {
- $ds = DIRECTORY_SEPARATOR;
- $config->set('php_dir', $with_dir, 'default');
- $config->set('doc_dir', $with_dir . $ds . 'doc', 'default');
- $config->set('data_dir', $with_dir . $ds . 'data', 'default');
- $config->set('test_dir', $with_dir . $ds . 'test', 'default');
- if (empty($www_dir)) {
- $config->set('www_dir', $with_dir . $ds . 'htdocs', 'default');
- }
- if (empty($cfg_dir)) {
- $config->set('cfg_dir', $with_dir . $ds . 'cfg', 'default');
- }
- if (!is_writable($config->get('cache_dir'))) {
- include_once 'phar://install-pear-nozlib.phar/System.php';
- $cdir = System::mktemp(array('-d', 'pear'));
- if (PEAR::isError($cdir)) {
- $ui->outputData("[PEAR] cannot make new temporary directory: " . $cdir);
- die(1);
- }
- $oldcachedir = $config->get('cache_dir');
- $config->set('cache_dir', $cdir);
- }
-}
-
-// PHP executable
-if (!empty($php_bin)) {
- $config->set('php_bin', $php_bin);
-}
-
-// PHP prefix
-if (isset($prefix)) {
- if ($prefix != 'a') {
- if ($prefix[0] == 'a') {
- $prefix = substr($prefix, 1);
- }
- $config->set('php_prefix', $prefix, 'system');
- }
-}
-
-// PHP suffix
-if (isset($suffix)) {
- if ($suffix != 'a') {
- if ($suffix[0] == 'a') {
- $suffix = substr($suffix, 1);
- }
- $config->set('php_suffix', $suffix, 'system');
- }
-}
-
-/* Print PEAR Conf (useful for debugging do NOT REMOVE) */
-if ($debug) {
- sort($keys);
- foreach ($keys as $key) {
- echo $key . ' ' .
- $config->getPrompt($key) . ": " . $config->get($key, null, 'default') . "\n";
- }
- if ($debug == 2) { // extreme debugging
- exit;
- }
-}
-// end print
-
-$php_dir = $config->get('php_dir');
-$options = array();
-$options['upgrade'] = true;
-$install_root = getenv('INSTALL_ROOT');
-if (!empty($install_root)) {
- $options['packagingroot'] = $install_root;
- $reg = new PEAR_Registry($options['packagingroot']);
-} else {
- $reg = $config->getRegistry('default');
-}
-
-$ui = PEAR_Frontend::singleton('PEAR_Frontend_CLI');
-if (PEAR::isError($ui)) {
- die($ui->getMessage());
-}
-$installer = new PEAR_Installer($ui);
-$pkg = new PEAR_PackageFile($config, $debug);
-
-foreach ($install_files as $package => $instfile) {
- $info = $pkg->fromAnyFile($instfile, PEAR_VALIDATE_INSTALLING);
- if (PEAR::isError($info)) {
- if (is_array($info->getUserInfo())) {
- foreach ($info->getUserInfo() as $err) {
- $ui->outputData(sprintf("[PEAR] %s: %s", $package, $err['message']));
- }
- }
- $ui->outputData(sprintf("[PEAR] %s: %s", $package, $info->getMessage()));
- continue;
- }
- $new_ver = $info->getVersion();
- $downloaderpackage = new PEAR_Downloader_Package($installer);
- $err = $downloaderpackage->initialize($instfile);
- if (PEAR::isError($err)) {
- $ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
- continue;
- }
- if ($reg->packageExists($package)) {
- $old_ver = $reg->packageInfo($package, 'version');
- if (version_compare($new_ver, $old_ver, 'gt')) {
- $installer->setOptions($options);
- $dp = array($downloaderpackage);
- $installer->setDownloadedPackages($dp);
- $err = $installer->install($downloaderpackage, $options);
- if (PEAR::isError($err)) {
- $ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
- continue;
- }
- $ui->outputData(sprintf("[PEAR] %-15s- upgraded: %s", $package, $new_ver));
- } else {
- if ($force) {
- $options['force'] = true;
- $installer->setOptions($options);
- $dp = array($downloaderpackage);
- $installer->setDownloadedPackages($dp);
- $err = $installer->install($downloaderpackage, $options);
- if (PEAR::isError($err)) {
- $ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
- continue;
- }
- $ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
- } else {
- $ui->outputData(sprintf("[PEAR] %-15s- already installed: %s", $package, $old_ver));
- }
- }
- } else {
- $options['nodeps'] = true;
- $installer->setOptions($options);
- $dp = array($downloaderpackage);
- $installer->setDownloadedPackages($dp);
- $err = $installer->install($downloaderpackage, $options);
- if (PEAR::isError($err)) {
- $ui->outputData(sprintf("[PEAR] %s: %s", $package, $err->getMessage()));
- continue;
- }
- $ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));
- }
- if ($package == 'PEAR') {
- if (is_file($ufile = $config->getConfFile('user'))) {
- $ui->outputData('Warning! a PEAR user config file already exists from ' .
- 'a previous PEAR installation at ' .
- "'$ufile'. You may probably want to remove it.");
- }
- $config->set('verbose', 1, 'default');
- if (isset($oldcachedir)) {
- $config->set('cache_dir', $oldcachedir);
- }
- $data = array();
- foreach ($config->getKeys() as $key) {
- $data[$key] = $config->get($key);
- }
- $cnf_file = $config->getConfFile('system');
- if (!empty($install_root)) {
- $cnf_file = $install_root . DIRECTORY_SEPARATOR . $cnf_file;
- }
- $config->writeConfigFile($cnf_file, 'system', $data);
- $ui->outputData('Wrote PEAR system config file at: ' . $cnf_file);
- $ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');
- }
-}
-?>
-<?php
-/**
- * The OS_Guess class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since PEAR 0.1
- */
-
-// {{{ uname examples
-
-// php_uname() without args returns the same as 'uname -a', or a PHP-custom
-// string for Windows.
-// PHP versions prior to 4.3 return the uname of the host where PHP was built,
-// as of 4.3 it returns the uname of the host running the PHP code.
-//
-// PC RedHat Linux 7.1:
-// Linux host.example.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
-//
-// PC Debian Potato:
-// Linux host 2.4.17 #2 SMP Tue Feb 12 15:10:04 CET 2002 i686 unknown
-//
-// PC FreeBSD 3.3:
-// FreeBSD host.example.com 3.3-STABLE FreeBSD 3.3-STABLE #0: Mon Feb 21 00:42:31 CET 2000 root@example.com:/usr/src/sys/compile/CONFIG i386
-//
-// PC FreeBSD 4.3:
-// FreeBSD host.example.com 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Mon Jun 25 11:19:43 EDT 2001 root@example.com:/usr/src/sys/compile/CONFIG i386
-//
-// PC FreeBSD 4.5:
-// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb 6 23:59:23 CET 2002 root@example.com:/usr/src/sys/compile/CONFIG i386
-//
-// PC FreeBSD 4.5 w/uname from GNU shellutils:
-// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb i386 unknown
-//
-// HP 9000/712 HP-UX 10:
-// HP-UX iq B.10.10 A 9000/712 2008429113 two-user license
-//
-// HP 9000/712 HP-UX 10 w/uname from GNU shellutils:
-// HP-UX host B.10.10 A 9000/712 unknown
-//
-// IBM RS6000/550 AIX 4.3:
-// AIX host 3 4 000003531C00
-//
-// AIX 4.3 w/uname from GNU shellutils:
-// AIX host 3 4 000003531C00 unknown
-//
-// SGI Onyx IRIX 6.5 w/uname from GNU shellutils:
-// IRIX64 host 6.5 01091820 IP19 mips
-//
-// SGI Onyx IRIX 6.5:
-// IRIX64 host 6.5 01091820 IP19
-//
-// SparcStation 20 Solaris 8 w/uname from GNU shellutils:
-// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc
-//
-// SparcStation 20 Solaris 8:
-// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc SUNW,SPARCstation-20
-//
-// Mac OS X (Darwin)
-// Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh
-//
-// Mac OS X early versions
-//
-
-// }}}
-
-/* TODO:
- * - define endianness, to allow matchSignature("bigend") etc.
- */
-
-/**
- * Retrieves information about the current operating system
- *
- * This class uses php_uname() to grok information about the current OS
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class OS_Guess
-{
- var $sysname;
- var $nodename;
- var $cpu;
- var $release;
- var $extra;
-
- function __construct($uname = null)
- {
- list($this->sysname,
- $this->release,
- $this->cpu,
- $this->extra,
- $this->nodename) = $this->parseSignature($uname);
- }
-
- function parseSignature($uname = null)
- {
- static $sysmap = array(
- 'HP-UX' => 'hpux',
- 'IRIX64' => 'irix',
- );
- static $cpumap = array(
- 'i586' => 'i386',
- 'i686' => 'i386',
- 'ppc' => 'powerpc',
- );
- if ($uname === null) {
- $uname = php_uname();
- }
- $parts = preg_split('/\s+/', trim($uname));
- $n = count($parts);
-
- $release = $machine = $cpu = '';
- $sysname = $parts[0];
- $nodename = $parts[1];
- $cpu = $parts[$n-1];
- $extra = '';
- if ($cpu == 'unknown') {
- $cpu = $parts[$n - 2];
- }
-
- switch ($sysname) {
- case 'AIX' :
- $release = "$parts[3].$parts[2]";
- break;
- case 'Windows' :
- switch ($parts[1]) {
- case '95/98':
- $release = '9x';
- break;
- default:
- $release = $parts[1];
- break;
- }
- $cpu = 'i386';
- break;
- case 'Linux' :
- $extra = $this->_detectGlibcVersion();
- // use only the first two digits from the kernel version
- $release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]);
- break;
- case 'Mac' :
- $sysname = 'darwin';
- $nodename = $parts[2];
- $release = $parts[3];
- if ($cpu == 'Macintosh') {
- if ($parts[$n - 2] == 'Power') {
- $cpu = 'powerpc';
- }
- }
- break;
- case 'Darwin' :
- if ($cpu == 'Macintosh') {
- if ($parts[$n - 2] == 'Power') {
- $cpu = 'powerpc';
- }
- }
- $release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]);
- break;
- default:
- $release = preg_replace('/-.*/', '', $parts[2]);
- break;
- }
-
- if (isset($sysmap[$sysname])) {
- $sysname = $sysmap[$sysname];
- } else {
- $sysname = strtolower($sysname);
- }
- if (isset($cpumap[$cpu])) {
- $cpu = $cpumap[$cpu];
- }
- return array($sysname, $release, $cpu, $extra, $nodename);
- }
-
- function _detectGlibcVersion()
- {
- static $glibc = false;
- if ($glibc !== false) {
- return $glibc; // no need to run this multiple times
- }
- $major = $minor = 0;
- include_once 'phar://install-pear-nozlib.phar/' . "System.php";
- // Use glibc's <features.h> header file to
- // get major and minor version number:
- if (@file_exists('/usr/include/features.h') &&
- @is_readable('/usr/include/features.h')) {
- if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {
- $features_file = fopen('/usr/include/features.h', 'rb');
- while (!feof($features_file)) {
- $line = fgets($features_file, 8192);
- if (!$line || (strpos($line, '#define') === false)) {
- continue;
- }
- if (strpos($line, '__GLIBC__')) {
- // major version number #define __GLIBC__ version
- $line = preg_split('/\s+/', $line);
- $glibc_major = trim($line[2]);
- if (isset($glibc_minor)) {
- break;
- }
- continue;
- }
-
- if (strpos($line, '__GLIBC_MINOR__')) {
- // got the minor version number
- // #define __GLIBC_MINOR__ version
- $line = preg_split('/\s+/', $line);
- $glibc_minor = trim($line[2]);
- if (isset($glibc_major)) {
- break;
- }
- continue;
- }
- }
- fclose($features_file);
- if (!isset($glibc_major) || !isset($glibc_minor)) {
- return $glibc = '';
- }
- return $glibc = 'glibc' . trim($glibc_major) . "." . trim($glibc_minor) ;
- } // no cpp
-
- $tmpfile = System::mktemp("glibctest");
- $fp = fopen($tmpfile, "w");
- fwrite($fp, "#include <features.h>\n__GLIBC__ __GLIBC_MINOR__\n");
- fclose($fp);
- $cpp = popen("/usr/bin/cpp $tmpfile", "r");
- while ($line = fgets($cpp, 1024)) {
- if ($line{0} == '#' || trim($line) == '') {
- continue;
- }
-
- if (list($major, $minor) = explode(' ', trim($line))) {
- break;
- }
- }
- pclose($cpp);
- unlink($tmpfile);
- } // features.h
-
- if (!($major && $minor) && @is_link('/lib/libc.so.6')) {
- // Let's try reading the libc.so.6 symlink
- if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib/libc.so.6')), $matches)) {
- list($major, $minor) = explode('.', $matches[1]);
- }
- }
-
- if (!($major && $minor)) {
- return $glibc = '';
- }
-
- return $glibc = "glibc{$major}.{$minor}";
- }
-
- function getSignature()
- {
- if (empty($this->extra)) {
- return "{$this->sysname}-{$this->release}-{$this->cpu}";
- }
- return "{$this->sysname}-{$this->release}-{$this->cpu}-{$this->extra}";
- }
-
- function getSysname()
- {
- return $this->sysname;
- }
-
- function getNodename()
- {
- return $this->nodename;
- }
-
- function getCpu()
- {
- return $this->cpu;
- }
-
- function getRelease()
- {
- return $this->release;
- }
-
- function getExtra()
- {
- return $this->extra;
- }
-
- function matchSignature($match)
- {
- $fragments = is_array($match) ? $match : explode('-', $match);
- $n = count($fragments);
- $matches = 0;
- if ($n > 0) {
- $matches += $this->_matchFragment($fragments[0], $this->sysname);
- }
- if ($n > 1) {
- $matches += $this->_matchFragment($fragments[1], $this->release);
- }
- if ($n > 2) {
- $matches += $this->_matchFragment($fragments[2], $this->cpu);
- }
- if ($n > 3) {
- $matches += $this->_matchFragment($fragments[3], $this->extra);
- }
- return ($matches == $n);
- }
-
- function _matchFragment($fragment, $value)
- {
- if (strcspn($fragment, '*?') < strlen($fragment)) {
- $reg = '/^' . str_replace(array('*', '?', '/'), array('.*', '.', '\\/'), $fragment) . '\\z/';
- return preg_match($reg, $value);
- }
- return ($fragment == '*' || !strcasecmp($fragment, $value));
- }
-
-}
-/*
- * Local Variables:
- * indent-tabs-mode: nil
- * c-basic-offset: 4
- * End:
- */
-package.xml
-<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>PEAR</name>
- <channel>pear.php.net</channel>
- <summary>PEAR Base System</summary>
- <description>The PEAR package contains:
- * the PEAR installer, for creating, distributing
- and installing packages
- * the PEAR_Exception PHP5 error handling mechanism
- * the PEAR_ErrorStack advanced error handling mechanism
- * the PEAR_Error error handling mechanism
- * the OS_Guess class for retrieving info about the OS
- where PHP is running on
- * the System class for quick handling of common operations
- with files and directories
- * the PEAR base class
- Features in a nutshell:
- * full support for channels
- * pre-download dependency validation
- * new package.xml 2.0 format allows tremendous flexibility while maintaining BC
- * support for optional dependency groups and limited support for sub-packaging
- * robust dependency support
- * full dependency validation on uninstall
- * remote install for hosts with only ftp access - no more problems with
- restricted host installation
- * full support for mirroring
- * support for bundling several packages into a single tarball
- * support for static dependencies on a url-based package
- * support for custom file roles and installation tasks</description>
- <lead>
- <name>Greg Beaver</name>
- <user>cellog</user>
- <email>cellog@php.net</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Pierre-Alain Joye</name>
- <user>pajoye</user>
- <email>pierre@php.net</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Stig Bakken</name>
- <user>ssb</user>
- <email>stig@php.net</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Tomas V.V.Cox</name>
- <user>cox</user>
- <email>cox@idecnet.com</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Helgi Thormar</name>
- <user>dufuz</user>
- <email>dufuz@php.net</email>
- <active>no</active>
- </lead>
- <lead>
- <name>Christian Weiske</name>
- <user>cweiske</user>
- <email>cweiske@php.net</email>
- <active>yes</active>
- </lead>
- <developer>
- <name>Tias Guns</name>
- <user>tias</user>
- <email>tias@php.net</email>
- <active>no</active>
- </developer>
- <helper>
- <name>Tim Jackson</name>
- <user>timj</user>
- <email>timj@php.net</email>
- <active>no</active>
- </helper>
- <helper>
- <name>Bertrand Gugger</name>
- <user>toggg</user>
- <email>toggg@php.net</email>
- <active>no</active>
- </helper>
- <helper>
- <name>Martin Jansen</name>
- <user>mj</user>
- <email>mj@php.net</email>
- <active>no</active>
- </helper>
- <date>2015-06-16</date>
- <time>15:53:26</time>
- <version>
- <release>1.9.5</release>
- <api>1.9.5</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-No changes since 1.9.5dev1
-
-Bug fixes in 1.9.5.dev1:
-* Fix bug #18343: Entities in file names decoded during packaging [cweiske]
-* Fix bug #18665: pecl extensions not enabled in empty php.ini files [Louis Opter]
-* Fix bug #18834: Do not truncate cache file if it is a symlink [avb]
-* Fix bug #18892: Parse error in Installer.php [ashnazg]
-* Fix bug #19482: fix pearcmd for include paths with trailing backslash [cweiske]
-* Fix bug #19793: PHP Notice about ob_end_clean() [cweiske]
-* Fix bug #20086: Invalid regexp in PEAR_Builder::build() [avb]
-* Fix bug #20203: split content-type and get real mime type [Samu Voutilainen]
-* Fix bug #20283: use full path for &quot;zend_extension=...&quot; [cweiske]
-* Fix bug #20284: Reset interpreter before running --CLEAN-- section php-cgi run [Mats Lindh]
-* Fix bug #20285: fix spelling mistakes [Veres Lajos]
-* Fix bug #20286: Support access of static variables on objects in validator [cweiske]
-* Fix bug #20321: Correctly detect name of current user during installation [cweiske]
-* Fix bug: let pear run-tests fail when there are failed tests [cweiske]
-* Prepare a test for bug #18056 / bug #18834 [avb]
- </notes>
- <contents>
- <dir name="/">
- <file md5sum="871ed3c14b667b22765eb3ba6618246e" name="OS/Guess.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="a27ac7bbcd59575bd7eb47c26f393fb7" name="PEAR/ChannelFile/Parser.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="8fd87e64002e11fd86eb2f3fbfee6599" name="PEAR/Command/Auth.xml" role="php" />
- <file md5sum="7cc172f1aab717868cfb9182bffc1bd6" name="PEAR/Command/Auth.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="73602fd7f051eaf8d37452d0e3063bdb" name="PEAR/Command/Build.xml" role="php" />
- <file md5sum="87f08181b04413e4f85eda31e3470813" name="PEAR/Command/Build.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="6d5aab4d4308c3005b5f584c7783a031" name="PEAR/Command/Channels.xml" role="php" />
- <file md5sum="3be1244fe9d3f98a2ecbd09e6a7f4de5" name="PEAR/Command/Channels.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="eaa3bd88483a7c1ca2c5773f2e228d5a" name="PEAR/Command/Common.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="91f189cb9423b5e87ee0abc5ea1a2be3" name="PEAR/Command/Config.xml" role="php" />
- <file md5sum="45f29ee1f0fb1292c19d4611faa4f77c" name="PEAR/Command/Config.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="2db0386b865d3f9a29f9126728722ece" name="PEAR/Command/Install.xml" role="php" />
- <file md5sum="8c2e07d70a1efae5f87a629899192019" name="PEAR/Command/Install.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="5cb62a04c0a268f4edd64a49a3895c92" name="PEAR/Command/Mirror.xml" role="php" />
- <file md5sum="90d4d159c03bd83e62ac899e1b4e05c6" name="PEAR/Command/Mirror.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="9367dcd7e4dbdde423f9c4c7d3f3a919" name="PEAR/Command/Package.xml" role="php" />
- <file md5sum="9434e3ae9d2cd10e83978d8d6213ace4" name="PEAR/Command/Package.php" role="php">
- <tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" />
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="28dc842ea725d8787b9f9c3dbca5aa22" name="PEAR/Command/Pickle.xml" role="php" />
- <file md5sum="a856882b752fe97c0fc38783640a6134" name="PEAR/Command/Pickle.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="49b046cfc14747f0365e02e9c3f0e6dc" name="PEAR/Command/Registry.xml" role="php" />
- <file md5sum="034741c88bef7b1c92d54ce455794a4f" name="PEAR/Command/Registry.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="29c02e823879b4e3e291f6b36fb339f1" name="PEAR/Command/Remote.xml" role="php" />
- <file md5sum="a55391003d9ad29467600db1fcc43113" name="PEAR/Command/Remote.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="a50c32015005e0761cc3b04679b29ed0" name="PEAR/Command/Test.xml" role="php" />
- <file md5sum="42db7eda8715aa7194178624cb26b53a" name="PEAR/Command/Test.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="0b3ff65f17d62f534f6693bed15fae4d" name="PEAR/Downloader/Package.php" role="php">
- <tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
- </file>
- <file md5sum="f4b9edf9424fedbf45f7ac735c8ebd26" name="PEAR/Frontend/CLI.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="0e081c9e1ffccde9904e61aeaaf60d71" name="PEAR/Installer/Role/Common.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="d8c62e6275e3aaa7784290912406092c" name="PEAR/Installer/Role/Cfg.xml" role="php" />
- <file md5sum="be739bdd6d7163dc10fb5d76729c017b" name="PEAR/Installer/Role/Cfg.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="89a4a2a286e842d45a98974f40a0565c" name="PEAR/Installer/Role/Data.xml" role="php" />
- <file md5sum="e213b6b24ef779fbf5075e9380f86bd2" name="PEAR/Installer/Role/Data.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="b1ce0fe105251c3b75209d6518ee69ac" name="PEAR/Installer/Role/Doc.xml" role="php" />
- <file md5sum="cbb1e4f1fc51e8af2a48eae136225aa4" name="PEAR/Installer/Role/Doc.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="af71c0ad42d16a323afe24a4f884ef15" name="PEAR/Installer/Role/Ext.xml" role="php" />
- <file md5sum="2e4679ad94c986076a540e8b45b347ef" name="PEAR/Installer/Role/Ext.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="ef88f0321d3e481c2130c95122cf76d8" name="PEAR/Installer/Role/Php.xml" role="php" />
- <file md5sum="9054354283bd5ecba5dac88915b3f434" name="PEAR/Installer/Role/Php.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="746461dc3b48af6d24094cb0211608f2" name="PEAR/Installer/Role/Script.xml" role="php" />
- <file md5sum="f1b4ce343083971fd0c1b61a907e5a9c" name="PEAR/Installer/Role/Script.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="e147d63f168ea156fc2be38caaa63804" name="PEAR/Installer/Role/Src.xml" role="php" />
- <file md5sum="582701788601cfde7e292af975eb3848" name="PEAR/Installer/Role/Src.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="a24b596ec987aa5688fc19e8ed4e97ea" name="PEAR/Installer/Role/Test.xml" role="php" />
- <file md5sum="959d481cbf9e1d9aa3680fbc584f112e" name="PEAR/Installer/Role/Test.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="7641e71c5785bb33a4261ebe25ed0fd7" name="PEAR/Installer/Role/Www.xml" role="php" />
- <file md5sum="5b19f05b56a686d063989c4f5a0a0e07" name="PEAR/Installer/Role/Www.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="aba6b8460a41418136f8e8372b556c71" name="PEAR/Installer/Role.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="d8a5976e8d4f626bc7156b4b91d21ad9" name="PEAR/PackageFile/Generator/v1.php" role="php">
- <tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
- </file>
- <file md5sum="62bc7985f8aa6009613d431d4e178938" name="PEAR/PackageFile/Generator/v2.php" role="php">
- <tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
- </file>
- <file md5sum="ff06699490c6f5f464bff5844b94a4fd" name="PEAR/PackageFile/Parser/v1.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="2d14ca94e52e6fe1780976cba1d5d9b0" name="PEAR/PackageFile/Parser/v2.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="77f746d2b159bd3891341660cbade99f" name="PEAR/PackageFile/v2/rw.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="bbe251e5dd51c0bd06d155b28416ceec" name="PEAR/PackageFile/v2/Validator.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="53633cdedaa4cc7e071c8787e06f3e94" name="PEAR/PackageFile/v1.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="7946c18d947ea3906e3c4123114dc809" name="PEAR/PackageFile/v2.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="f826093d96de84737f72ba9490c1b83f" name="PEAR/REST/10.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="a6a631f981dd11fc7cc2f6d0d013ac7c" name="PEAR/REST/11.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="ed8469d24eb5db9d1bdb21b659069330" name="PEAR/REST/13.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="f20637521dbabcfd002226ec16b8f930" name="PEAR/Task/Postinstallscript/rw.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="87cdd5863eb6524e83d5d04acb4109ad" name="PEAR/Task/Replace/rw.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="d3f4a9c730bc95cae4ae7a672551799e" name="PEAR/Task/Unixeol/rw.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="e1285569c9e8cada94eb1ab7cec8a1f0" name="PEAR/Task/Windowseol/rw.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="0638ca7f081fd44198d4d204fb7279a1" name="PEAR/Task/Common.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="e83344102fb91bb9fb45044b75be01f7" name="PEAR/Task/Postinstallscript.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="2f14c6bcb3b76c3a4e6c5d4a88f859e9" name="PEAR/Task/Replace.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="68ce6647b9206194e983b1347034da09" name="PEAR/Task/Unixeol.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="6d22302124aacf7467d1f93fed82e804" name="PEAR/Task/Windowseol.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="b1510b072b2049d2088f5ebb41fe76a9" name="PEAR/Validator/PECL.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="b746dd0ceb528f265446b8eea7f27b01" name="PEAR/Autoloader.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="8efb582ce47139a3f94378a3130f8925" name="PEAR/Builder.php" role="php">
- <tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
- </file>
- <file md5sum="e90dc9ca7d61b5a9c1ae2a8873d322b0" name="PEAR/ChannelFile.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="ec9ba204a1568833097d3f33336b441e" name="PEAR/Command.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="fbbdcb7fecc5176e1c54ef8c899aab04" name="PEAR/Common.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="6f75e34dc8012651727dfdf612c4c719" name="PEAR/Config.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="6038245772250d490cd7f1e57350fc94" name="PEAR/DependencyDB.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="4868fc6df1b0a044c8c2003bd9ac38f1" name="PEAR/Dependency2.php" role="php">
- <tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
- </file>
- <file md5sum="98f1ff8ffd4a44455dfb967dd40ad011" name="PEAR/Downloader.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="eeb46279dc45a99da7c8219416e368c6" name="PEAR/ErrorStack.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="1c2d338c329c0b30d71a9814bd9da4af" name="PEAR/Exception.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="13f09b311368d95941240cd4da4ce11d" name="PEAR/Frontend.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="e16d609cadd08d4f53f01d16d7039d84" name="PEAR/Installer.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="2e31ebb5efd17623d19df56bbdcecb53" name="PEAR/PackageFile.php" role="php">
- <tasks:replace from="@PEAR-VER@" to="version" type="package-info" />
- </file>
- <file md5sum="2062fa1ab2bb327b7b083b7e7749cb6f" name="PEAR/Packager.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="b424ce71c7e9729bba8647c8f033dbc6" name="PEAR/Registry.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="91edc2153284012f47aff10991ec936b" name="PEAR/REST.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="abc2f4bc11bbc0b6b3d757204086097a" name="PEAR/RunTest.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="050cc7ac75d9dc2ab9f81706887f87d7" name="PEAR/Validate.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="8f0972c7d4da9b7af28872b2ae739f0b" name="PEAR/XMLParser.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file baseinstalldir="/" md5sum="d888d06143e3cac0dae78bbb2e761366" name="scripts/pear.bat" role="script">
- <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- <tasks:windowseol />
- </file>
- <file baseinstalldir="/" md5sum="762c9aeb3a91f7160a12896ce197acb6" name="scripts/peardev.bat" role="script">
- <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- <tasks:windowseol />
- </file>
- <file baseinstalldir="/" md5sum="2bd742ce721c8dd5aa164613c063a8a9" name="scripts/pecl.bat" role="script">
- <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- <tasks:windowseol />
- </file>
- <file baseinstalldir="/" md5sum="8ac139504e80bede470aef6d405100b6" name="scripts/pear.sh" role="script">
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
- <tasks:replace from="@pear_version@" to="version" type="package-info" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- <tasks:unixeol />
- </file>
- <file baseinstalldir="/" md5sum="08ea03525b4ba914dfd9ec69c4238cf4" name="scripts/peardev.sh" role="script">
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
- <tasks:replace from="@pear_version@" to="version" type="package-info" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- <tasks:unixeol />
- </file>
- <file baseinstalldir="/" md5sum="41fab77b7808267d88b8e06097a1fbbe" name="scripts/pecl.sh" role="script">
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
- <tasks:replace from="@pear_version@" to="version" type="package-info" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- <tasks:unixeol />
- </file>
- <file baseinstalldir="/" md5sum="8288caefe63c6f71d631e014fc72007b" name="scripts/pearcmd.php" role="php">
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
- <tasks:replace from="@pear_version@" to="version" type="package-info" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- </file>
- <file baseinstalldir="/" md5sum="dba5ee0eaf5466a2c46682333b1494a2" name="scripts/peclcmd.php" role="php">
- <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
- <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
- <tasks:replace from="@pear_version@" to="version" type="package-info" />
- <tasks:replace from="@include_path@" to="php_dir" type="pear-config" />
- </file>
- <file md5sum="45b44486d8090de17b2a8b4211fab247" name="LICENSE" role="doc" />
- <file md5sum="eaac3d33068c6e67573ed44155b149ae" name="INSTALL" role="doc" />
- <file md5sum="4a49bc83a392934e57af45c70a589fda" name="package.dtd" role="data" />
- <file md5sum="23106d502eaf3f2f545b7b8e6baf537d" name="PEAR.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="26a5d4a6d2cac6e51cd3463dd37cd7e0" name="README.rst" role="doc" />
- <file md5sum="8c88b101bfb72540109949d0c07c5f0c" name="System.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file md5sum="acd010e3bc43c0f72df584acde7b9158" name="template.spec" role="data" />
- </dir>
- </contents>
- <dependencies>
- <required>
- <php>
- <min>5.4.0</min>
- </php>
- <pearinstaller>
- <min>1.4.3</min>
- </pearinstaller>
- <package>
- <name>Archive_Tar</name>
- <channel>pear.php.net</channel>
- <min>1.3.12</min>
- </package>
- <package>
- <name>Structures_Graph</name>
- <channel>pear.php.net</channel>
- <min>1.0.2</min>
- <recommended>1.0.4</recommended>
- </package>
- <package>
- <name>Console_Getopt</name>
- <channel>pear.php.net</channel>
- <min>1.2</min>
- <recommended>1.2.3</recommended>
- </package>
- <package>
- <name>XML_Util</name>
- <channel>pear.php.net</channel>
- <min>1.2.0</min>
- <recommended>1.2.3</recommended>
- </package>
- <package>
- <name>PEAR_Frontend_Web</name>
- <channel>pear.php.net</channel>
- <max>0.4</max>
- <conflicts />
- </package>
- <package>
- <name>PEAR_Frontend_Gtk</name>
- <channel>pear.php.net</channel>
- <max>0.4.0</max>
- <exclude>0.4.0</exclude>
- <conflicts />
- </package>
- <extension>
- <name>xml</name>
- </extension>
- <extension>
- <name>pcre</name>
- </extension>
- </required>
- <group hint="PEAR&apos;s web-based installer" name="webinstaller">
- <package>
- <name>PEAR_Frontend_Web</name>
- <channel>pear.php.net</channel>
- <min>0.5.1</min>
- </package>
- </group>
- <group hint="PEAR&apos;s PHP-GTK-based installer" name="gtkinstaller">
- <package>
- <name>PEAR_Frontend_Gtk</name>
- <channel>pear.php.net</channel>
- <min>0.4.0</min>
- </package>
- </group>
- <group hint="PEAR&apos;s PHP-GTK2-based installer" name="gtk2installer">
- <package>
- <name>PEAR_Frontend_Gtk2</name>
- <channel>pear.php.net</channel>
- </package>
- </group>
- </dependencies>
- <phprelease>
- <installconditions>
- <os>
- <name>windows</name>
- </os>
- </installconditions>
- <filelist>
- <install as="pear.bat" name="scripts/pear.bat" />
- <install as="peardev.bat" name="scripts/peardev.bat" />
- <install as="pecl.bat" name="scripts/pecl.bat" />
- <install as="pearcmd.php" name="scripts/pearcmd.php" />
- <install as="peclcmd.php" name="scripts/peclcmd.php" />
- <ignore name="scripts/peardev.sh" />
- <ignore name="scripts/pear.sh" />
- <ignore name="scripts/pecl.sh" />
- </filelist>
- </phprelease>
- <phprelease>
- <filelist>
- <install as="pear" name="scripts/pear.sh" />
- <install as="peardev" name="scripts/peardev.sh" />
- <install as="pecl" name="scripts/pecl.sh" />
- <install as="pearcmd.php" name="scripts/pearcmd.php" />
- <install as="peclcmd.php" name="scripts/peclcmd.php" />
- <ignore name="scripts/pear.bat" />
- <ignore name="scripts/peardev.bat" />
- <ignore name="scripts/pecl.bat" />
- </filelist>
- </phprelease>
- <changelog>
- <release>
- <version>
- <release>1.8.0alpha1</release>
- <api>1.8.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>stable</api>
- </stability>
- <date>2009-03-09</date>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Implement Request #10373: if pref_state=stable and installed package=beta, allow up to latest beta version [dufuz]
-* Implement Request #10581: login / logout should map to channel-login / channel-logout [dufuz]
-* Implement Request #10825: Only display the &quot;invalid or missing package file&quot;-error if it makes sense [dufuz]
-* Implement Request #11170: script to generate Command/[command].xml [dufuz]
-* Implement Request #11176: improve channel ... has updated its protocols message [dufuz]
-* Implement Request #12706: pear list -a hard to read [dufuz]
-* Implement Request #11353: upgrade-all and upgrade commands to upgrade within the same stability level [dufuz]
-* Implement Request #13015: Add https discovery for channel.xml [dufuz / initial patch by Martin Roos]
-* Implement Request #13927: install-pear.php should have option to set www_dir [timj]
-* Implement Request #14324: Make the pear install command behave similar to apt-get [dufuz]
-* Implement Request #14325: make pear upgrade with no params behave like pear upgrade-all [dufuz]
- - upgrade-all can be considered deprecated in favor of calling upgrade with no parameters to replicate
- better what other package managers are doing. upgrade-all will still work as intended.
-* Implement Request #14504: add a channel parameter support to the upgrade function [dufuz]
- - Options -c ezc and --channel=ezc got added to upgrade and upgrade-all to allow for
- channel specific upgrades
-* Implement Request #14556: install-pear-nozlib.phar should get download_dir config and other options [cweiske]
-* Implement Request #15566: Add doc.php.net as a default channel [dufuz / saltybeagle]
-
-* Fix PHP Bug #43857: --program-suffix not always reflected everywhere [cellog]
-* Fix PHP Bug #47323: strotime warnings in make install [dufuz]
-
-* Fix Bug #13908: pear info command and maintainers inactive not mentioned [dufuz]
-* Fix Bug #13926: install-pear.php does not set cfg_dir if -d option set with no -c option [timj]
-* Fix Bug #13943: tests fail when php.exe path contains spaces [dufuz / jorrit]
-* Fix Bug #13953: config-set/config-show with channel alias fail [cellog]
-* Fix Bug #13958: When a phpt tests exit() or die() xdebug coverage is not generated, patch by izi (David Jean Louis) [izi / dufuz]
-* Fix Bug #14041: Unpredictable unit test processing sequence [dufuz]
-* Fix Bug #14140: Strict warning not suppressed in the shutdown function [dufuz]
-* Fix Bug #14210: pear list -ia brings warnings [dufuz]
-* Fix Bug #14274: PEAR packager mangles package.xml encoding, then complains about it [dufuz]
-* Fix Bug #14287: cannot upgrade from stable to beta via -beta when config is set to stable [dufuz]
-* Fix Bug #14300: Package files themselves can not be served over https [dufuz / initial patch by Martin Roos]
-* Fix Bug #14437: openbasedir warning when loading config [dufuz]
-* Fix Bug #14558: PackageFile.php creates tmp directory outside configured temp_dir [cweiske]
-* Fix Bug #14947: downloadHttp() is missing Host part of the HTTP Request when using Proxy [ifeghali]
-* Fix Bug #14977: PEAR/Frontend.php doesn&apos;t require_once PEAR.php [dufuz]
-* Fix Bug #15750: Unreachable code in PEAR_Downloader [dufuz]
-* Fix Bug #15979: Package files incorrectly removed when splitting a package into multiple pkgs [dufuz]
-* Fix Bug #15914: pear upgrade installs different version if desired version not found [dufuz]
-
-NOTE!
-Functions that have been deprecated for 3+ years in PEAR_Common, please take a moment
-to migrate over to one of the alternatives that have ben provided:
-* PEAR_Common-&gt;downloadHttp (use PEAR_Downloader-&gt;downloadHttp instead)
-* PEAR_Common-&gt;infoFromTgzFile (use PEAR_PackageFile-&gt;fromTgzFile instead)
-* PEAR_Common-&gt;infoFromDescriptionFile (use PEAR_PackageFile-&gt;fromPackageFile instead)
-* PEAR_Common-&gt;infoFromString (use PEAR_PackageFile-&gt;fromXmlstring instead)
-* PEAR_Common-&gt;infoFromArray (use PEAR_PackageFile-&gt;fromAnyFile instead)
-* PEAR_Common-&gt;xmlFromInfo (use a PEAR_PackageFile_v* object&apos;s generator instead)
-* PEAR_Common-&gt;validatePackageInfo (use the validation of PEAR_PackageFile objects)
-* PEAR_Common-&gt;analyzeSourceCode (use a PEAR_PackageFile_v* object instead)
-* PEAR_Common-&gt;detectDependencies (use PEAR_Downloader_Package-&gt;detectDependencies instead)
-* PEAR_Common-&gt;buildProvidesArray (use PEAR_PackageFile_v1-&gt;_buildProvidesArray or
- PEAR_PackageFile_v2_Validator-&gt;_buildProvidesArray)
-
-PHP 4.4 and 5.1.6 are now the minimum PHP requirements, for brave souls
-pear upgrade -f PEAR will allow people with lower versions
-to upgrade to this release but no guarantees will be made that it will work properly.
-
-Support for XML RPC channels has been dropped - The only ones that used it
-(pear.php.net and pecl.php.net) have used the REST interface for years now.
-SOAP support also removed as it was only proof of concept.
-
-Move codebase from the PHP License to New BSD 2 clause license
- </notes>
- </release>
- <release>
- <date>2009-03-27</date>
- <version>
- <release>1.8.0RC1</release>
- <api>1.8.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #14331: pear cvstag only works from inside the package directory [dufuz]
-* Fix Bug #16045: E_Notice: Undefined index: channel in PEAR/DependencyDB.php [dufuz]
-
-* Implemented Request #11230: better error message when mirror not in channel.xml file [dufuz]
-* Implemented Request #13150: Add support for following HTTP 302 redirects [dufuz]
- </notes>
- </release>
- <release>
- <date>2009-04-10</date>
- <version>
- <release>1.8.0</release>
- <api>1.8.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-Changes since RC1:
- * Fix Bug #14792: Bad md5sum for files with replaced content [dufuz]
- * Fix Bug #16057:-r is limited to 4 directories in depth [dufuz]
- * Fix Bug #16077: PEAR5::getStaticProperty does not return a reference to the property [dufuz]
-
- Remove custom XML_Util class in favor of using upstream XML_Util package as dependency
-
-RC1 Release Notes:
- * Fix Bug #14331: pear cvstag only works from inside the package directory [dufuz]
- * Fix Bug #16045: E_Notice: Undefined index: channel in PEAR/DependencyDB.php [dufuz]
-
- * Implemented Request #11230: better error message when mirror not in channel.xml file [dufuz]
- * Implemented Request #13150: Add support for following HTTP 302 redirects [dufuz]
-
-Alpha1 Release Notes:
- * Implement Request #10373: if pref_state=stable and installed package=beta, allow up to latest beta version [dufuz]
- * Implement Request #10581: login / logout should map to channel-login / channel-logout [dufuz]
- * Implement Request #10825: Only display the &quot;invalid or missing package file&quot;-error if it makes sense [dufuz]
- * Implement Request #11170: script to generate Command/[command].xml [dufuz]
- * Implement Request #11176: improve channel ... has updated its protocols message [dufuz]
- * Implement Request #12706: pear list -a hard to read [dufuz]
- * Implement Request #11353: upgrade-all and upgrade commands to upgrade within the same stability level [dufuz]
- * Implement Request #13015: Add https discovery for channel.xml [dufuz / initial patch by Martin Roos]
- * Implement Request #13927: install-pear.php should have option to set www_dir [timj]
- * Implement Request #14324: Make the pear install command behave similar to apt-get [dufuz]
- * Implement Request #14325: make pear upgrade with no params behave like pear upgrade-all [dufuz]
- - upgrade-all can be considered deprecated in favor of calling upgrade with no parameters to replicate
- better what other package managers are doing. upgrade-all will still work as intended.
- * Implement Request #14504: add a channel parameter support to the upgrade function [dufuz]
- - Options -c ezc and --channel=ezc got added to upgrade and upgrade-all to allow for
- channel specific upgrades
- * Implement Request #14556: install-pear-nozlib.phar should get download_dir config and other options [cweiske]
- * Implement Request #15566: Add doc.php.net as a default channel [dufuz / saltybeagle]
-
- * Fix PHP Bug #43857: --program-suffix not always reflected everywhere [cellog]
- * Fix PHP Bug #47323: strotime warnings in make install [dufuz]
-
- * Fix Bug #13908: pear info command and maintainers inactive not mentioned [dufuz]
- * Fix Bug #13926: install-pear.php does not set cfg_dir if -d option set with no -c option [timj]
- * Fix Bug #13943: tests fail when php.exe path contains spaces [dufuz / jorrit]
- * Fix Bug #13953: config-set/config-show with channel alias fail [cellog]
- * Fix Bug #13958: When a phpt tests exit() or die() xdebug coverage is not generated, patch by izi (David Jean Louis) [izi / dufuz]
- * Fix Bug #14041: Unpredictable unit test processing sequence [dufuz]
- * Fix Bug #14140: Strict warning not suppressed in the shutdown function [dufuz]
- * Fix Bug #14210: pear list -ia brings warnings [dufuz]
- * Fix Bug #14274: PEAR packager mangles package.xml encoding, then complains about it [dufuz]
- * Fix Bug #14287: cannot upgrade from stable to beta via -beta when config is set to stable [dufuz]
- * Fix Bug #14300: Package files themselves can not be served over https [dufuz / initial patch by Martin Roos]
- * Fix Bug #14437: openbasedir warning when loading config [dufuz]
- * Fix Bug #14558: PackageFile.php creates tmp directory outside configured temp_dir [cweiske]
- * Fix Bug #14947: downloadHttp() is missing Host part of the HTTP Request when using Proxy [ifeghali]
- * Fix Bug #14977: PEAR/Frontend.php doesn&apos;t require_once PEAR.php [dufuz]
- * Fix Bug #15750: Unreachable code in PEAR_Downloader [dufuz]
- * Fix Bug #15979: Package files incorrectly removed when splitting a package into multiple pkgs [dufuz]
- * Fix Bug #15914: pear upgrade installs different version if desired version not found [dufuz]
-
- NOTE!
- Functions that have been deprecated for 3+ years in PEAR_Common, please take a moment
- to migrate over to one of the alternatives that have ben provided:
- * PEAR_Common-&gt;downloadHttp (use PEAR_Downloader-&gt;downloadHttp instead)
- * PEAR_Common-&gt;infoFromTgzFile (use PEAR_PackageFile-&gt;fromTgzFile instead)
- * PEAR_Common-&gt;infoFromDescriptionFile (use PEAR_PackageFile-&gt;fromPackageFile instead)
- * PEAR_Common-&gt;infoFromString (use PEAR_PackageFile-&gt;fromXmlstring instead)
- * PEAR_Common-&gt;infoFromArray (use PEAR_PackageFile-&gt;fromAnyFile instead)
- * PEAR_Common-&gt;xmlFromInfo (use a PEAR_PackageFile_v* object&apos;s generator instead)
- * PEAR_Common-&gt;validatePackageInfo (use the validation of PEAR_PackageFile objects)
- * PEAR_Common-&gt;analyzeSourceCode (use a PEAR_PackageFile_v* object instead)
- * PEAR_Common-&gt;detectDependencies (use PEAR_Downloader_Package-&gt;detectDependencies instead)
- * PEAR_Common-&gt;buildProvidesArray (use PEAR_PackageFile_v1-&gt;_buildProvidesArray or
- PEAR_PackageFile_v2_Validator-&gt;_buildProvidesArray)
-
- PHP 4.4 and 5.1.6 are now the minimum PHP requirements, for brave souls
- pear upgrade -f PEAR will allow people with lower versions
- to upgrade to this release but no guarantees will be made that it will work properly.
-
- Support for XML RPC channels has been dropped - The only ones that used it
- (pear.php.net and pecl.php.net) have used the REST interface for years now.
- SOAP support also removed as it was only proof of concept.
-
- Move codebase from the PHP License to New BSD 2 clause license
- </notes>
- </release>
- <release>
- <date>2009-04-15</date>
- <version>
- <release>1.8.1</release>
- <api>1.8.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #16099 PEAR crash on PHP4 (parse error) [dufuz]
- </notes>
- </release>
- <release>
- <date>2009-08-18</date>
- <version>
- <release>1.9.0RC1</release>
- <api>1.9.0RC1</api>
- </version>
- <stability>
- <release>beta</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Implement Request #16213: add alias to list-channels output [dufuz]
-* Implement Request #16378: pear svntag [dufuz]
-* Implement Request #16386: PEAR_Config::remove() does not support specifying a channel [timj]
-* Implement Request #16396: package-dependencies should allow package names [dufuz]
-
-* Fix Bug #11181: pear requests channel.xml from main server instead from mirror [dufuz]
-* Fix Bug #14493: pear install --offline doesn&apos;t print out errors [dufuz]
-* Fix Bug #11348: pear package-dependencies isn&apos;t well explained [dufuz]
-* Fix Bug #16108: PEAR_PackageFile_Generator_v2 PHP4 parse error when running upgrade-all [dufuz]
-* Fix Bug #16113: Installing certain packages fails due incorrect encoding handling [dufuz]
-* Fix Bug #16122: PEAR RunTest failed to run as expected [dufuz]
-* Fix Bug #16366: compiling 5.2.10 leads to non-functioning pear [dufuz]
-* Fix Bug #16387: channel-logout does not support logging out from a non-default channel [timj]
-* Fix Bug #16444: Setting preferred mirror fails [dufuz]
-* Fix the shutdown functions where a index might not exist and thus raise a notice [derick]
- </notes>
- </release>
- <release>
- <date>2009-08-20</date>
- <version>
- <release>1.9.0RC2</release>
- <api>1.9.0RC2</api>
- </version>
- <stability>
- <release>beta</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* REST 1.4 file was occasionally being included but REST 1.4 is not intended for this release cycle [dufuz]
- </notes>
- </release>
- <release>
- <date>2009-08-21</date>
- <version>
- <release>1.9.0RC3</release>
- <api>1.9.0RC3</api>
- </version>
- <stability>
- <release>beta</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Improved svntag support to handle packages like PEAR it self [dufuz]
- </notes>
- </release>
- <release>
- <date>2009-08-23</date>
- <version>
- <release>1.9.0RC4</release>
- <api>1.9.0RC4</api>
- </version>
- <stability>
- <release>beta</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fixed a problem where the original channel could not be set as a preferred_mirror again [dufuz]
-* Make sure channel aliases can&apos;t be made to start with - [dufuz]
-* Output issues with pear search [dufuz]
-* Fixed couple of stray notices [dufuz]
- </notes>
- </release>
- <release>
- <date>2009-09-03</date>
- <version>
- <release>1.9.0</release>
- <api>1.9.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fix Bug #16547: The phar for PEAR installer uses ereg() which is deprecated [dufuz]
- </notes>
- </release>
- <release>
- <date>2010-05-26</date>
- <version>
- <release>1.9.1</release>
- <api>1.9.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* svntag improvements, tag package files passed into the command and better directory checks [dufuz]
-* rely on Structures_Graph minimum version instead of recommended version [saltybeagle]
-* Fix Bug #12613: running go-pear.phar from C:\ fails [dufuz]
-* Fix Bug #14841: Installing pear into directory with space fails [dufuz]
-* Fix Bug #16644: pear.bat returns syntax error when parenthesis are in install path. [dufuz] [patch by bwaters (Bryan Waters)]
-* Fix Bug #16767: Use of Depreciated HTML Attributes in the Exception class [dufuz] [patch by fuhrysteve (Stephen J. Fuhry)]
-* Fix Bug #16864: &quot;pear list-upgrades -i&quot; issues E_WARNINGS [dufuz] [patch by rquadling (Richard Quadling)]
-* Fix Bug #17220: command `pear help` outputs to stderr instead of stdout [dufuz]
-* Fix Bug #17234: channel-discover adds port to HTTP Host header [dufuz]
-* Fix Bug #17292: Code Coverage in PEAR_RunTest does not work with namespaces [sebastian]
-* Fix Bug #17359: loadExtension() fails over missing dl() when used in multithread env [dufuz]
-* Fix Bug #17378: pear info $package fails if directory with that name exists [dufuz]
- </notes>
- </release>
- <release>
- <date>2011-02-28</date>
- <time>18:30:00</time>
- <version>
- <release>1.9.2</release>
- <api>1.9.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-Important! This is a security fix release. The advisory can be found at
-http://pear.php.net/advisory-20110228.txt
-
- Bugs:
- * Fixed Bug #17463: Regression: On Windows, svntag [patch by doconnor]
- * Fixed Bug #17641: pecl-list doesn&apos;t sort packages by name [dufuz]
- * Fixed Bug #17781: invalid argument warning on foreach due to an empty optional dependencie [dufuz]
- * Fixed Bug #17801: PEAR run-tests wrongly detects php-cgi [patch by David Jean Louis (izi)]
- * Fixed Bug #17839: pear svntag does not tag package.xml file [dufuz]
- * Fixed Bug #17986: PEAR Installer cannot handle files moved between packages [dufuz]
- * Fixed Bug #17997: Strange output if directories are not writeable [dufuz]
- * Fixed Bug #18001: PEAR/RunTest coverage fails [dufuz]
- * Fixed Bug #18056 [SECURITY]: Symlink attack in PEAR install [dufuz]
- * Fixed Bug #18218: &quot;pear package&quot; does not allow the use of late static binding [dufuz and Christer Edvartsen]
- * Fixed Bug #18238: Wrong return code from &quot;pear help&quot; [till]
- * Fixed Bug #18308: Broken error message about missing channel validator [yunosh]
-
- This feature is implemented as a result of #18056
- * Implemented Request #16648: Use TMPDIR for builds instead of /var/tmp [dufuz]
- </notes>
- </release>
- <release>
- <date>2011-06-04</date>
- <time>15:30:00</time>
- <version>
- <release>1.9.3</release>
- <api>1.9.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-* Fixed Bug #17744: Empty changelog causes fatal error in setChangelogentry [dufuz]
-* Fixed Bug #18340: raiseErro typo [doconnor]
-* Fixed Bug #18349: package.xml version not recognized when single quoted [dufuz]
-* Fixed Bug #18364: date.timezone errors for sh/bat files when TZ is not set in php.ini [dufuz]
-* Fixed Bug #18388: Parentheses error in REST.php line 232 [dufuz]
-* Fixed Bug #18428: invalid preg_match patterns [glen]
-* Fixed Bug #18486: REST/10.php does not check error condition [dufuz]
-* Fixed a problem in RunTest and code coverage. Correctly register the
- code coverage shutdown function in case we are inside a namespace. [sebastian]
-* Fixed a bug with extensions not providing their config.m4 and co in the root directory of
- their pecl package but rather in a sub directory, such as xhprof. [dufuz]
- </notes>
- </release>
- <release>
- <date>2011-07-06</date>
- <time>15:30:00</time>
- <version>
- <release>1.9.4</release>
- <api>1.9.4</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-Bug Fixes:
-* Bug #17350: &quot;pear install --force&quot; doesn&apos;t uninstall files from previous pkg versions [dufuz]
-* Bug #18362: A whitespace TEMP_DIR path breaks install/upgrade functionality [dufuz]
-* Bug #18440: bad tmp folder path on install : Unable to create path for C:/Program/tmp [dufuz]
-* Bug #18581: &quot;config-get -c&quot; not returning channel&apos;s configuration when using alias [dufuz]
-* Bug #18639: regression: installing xdebug fails most likely due to another fix [dufuz]
-
-Features
-* All System (the class) functions can now take in spaced paths as long as they are surrounded in quotes.
- Prior to this it was possible to do that by passing all values in as an array (by product of #18362, #18440) [dufuz]
- </notes>
- </release>
- <release>
- <date>2014-06-27</date>
- <time>18:17:00</time>
- <version>
- <release>1.9.5dev1</release>
- <api>1.9.5</api>
- </version>
- <stability>
- <release>devel</release>
- <api>devel</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-Bug fixes:
-* Fix bug #18343: Entities in file names decoded during packaging [cweiske]
-* Fix bug #18665: pecl extensions not enabled in empty php.ini files [Louis Opter]
-* Fix bug #18834: Do not truncate cache file if it is a symlink [avb]
-* Fix bug #18892: Parse error in Installer.php [ashnazg]
-* Fix bug #19482: fix pearcmd for include paths with trailing backslash [cweiske]
-* Fix bug #19793: PHP Notice about ob_end_clean() [cweiske]
-* Fix bug #20086: Invalid regexp in PEAR_Builder::build() [avb]
-* Fix bug #20203: split content-type and get real mime type [Samu Voutilainen]
-* Fix bug #20283: use full path for &quot;zend_extension=...&quot; [cweiske]
-* Fix bug #20284: Reset interpreter before running --CLEAN-- section php-cgi run [Mats Lindh]
-* Fix bug #20285: fix spelling mistakes [Veres Lajos]
-* Fix bug #20286: Support access of static variables on objects in validator [cweiske]
-* Fix bug #20321: Correctly detect name of current user during installation [cweiske]
-* Fix bug: let pear run-tests fail when there are failed tests [cweiske]
-* Prepare a test for bug #18056 / bug #18834 [avb]
- </notes>
- </release>
- <release>
- <date>2014-07-12</date>
- <time>14:22:23</time>
- <version>
- <release>1.9.5</release>
- <api>1.9.5</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>
-No changes since 1.9.5.dev1.
-
-Bug fixes in 1.9.5.dev1:
-* Fix bug #18343: Entities in file names decoded during packaging [cweiske]
-* Fix bug #18665: pecl extensions not enabled in empty php.ini files [Louis Opter]
-* Fix bug #18834: Do not truncate cache file if it is a symlink [avb]
-* Fix bug #18892: Parse error in Installer.php [ashnazg]
-* Fix bug #19482: fix pearcmd for include paths with trailing backslash [cweiske]
-* Fix bug #19793: PHP Notice about ob_end_clean() [cweiske]
-* Fix bug #20086: Invalid regexp in PEAR_Builder::build() [avb]
-* Fix bug #20203: split content-type and get real mime type [Samu Voutilainen]
-* Fix bug #20283: use full path for &quot;zend_extension=...&quot; [cweiske]
-* Fix bug #20284: Reset interpreter before running --CLEAN-- section php-cgi run [Mats Lindh]
-* Fix bug #20285: fix spelling mistakes [Veres Lajos]
-* Fix bug #20286: Support access of static variables on objects in validator [cweiske]
-* Fix bug #20321: Correctly detect name of current user during installation [cweiske]
-* Fix bug: let pear run-tests fail when there are failed tests [cweiske]
-* Prepare a test for bug #18056 / bug #18834 [avb]
- </notes>
- </release>
- </changelog>
-</package>
-
-/**
- * The OS_Guess class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since PEAR 0.1
- */
-
-// {{{ uname examples
-
-// php_uname() without args returns the same as 'uname -a', or a PHP-custom
-// string for Windows.
-// PHP versions prior to 4.3 return the uname of the host where PHP was built,
-// as of 4.3 it returns the uname of the host running the PHP code.
-//
-// PC RedHat Linux 7.1:
-// Linux host.example.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
-//
-// PC Debian Potato:
-// Linux host 2.4.17 #2 SMP Tue Feb 12 15:10:04 CET 2002 i686 unknown
-//
-// PC FreeBSD 3.3:
-// FreeBSD host.example.com 3.3-STABLE FreeBSD 3.3-STABLE #0: Mon Feb 21 00:42:31 CET 2000 root@example.com:/usr/src/sys/compile/CONFIG i386
-//
-// PC FreeBSD 4.3:
-// FreeBSD host.example.com 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Mon Jun 25 11:19:43 EDT 2001 root@example.com:/usr/src/sys/compile/CONFIG i386
-//
-// PC FreeBSD 4.5:
-// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb 6 23:59:23 CET 2002 root@example.com:/usr/src/sys/compile/CONFIG i386
-//
-// PC FreeBSD 4.5 w/uname from GNU shellutils:
-// FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb i386 unknown
-//
-// HP 9000/712 HP-UX 10:
-// HP-UX iq B.10.10 A 9000/712 2008429113 two-user license
-//
-// HP 9000/712 HP-UX 10 w/uname from GNU shellutils:
-// HP-UX host B.10.10 A 9000/712 unknown
-//
-// IBM RS6000/550 AIX 4.3:
-// AIX host 3 4 000003531C00
-//
-// AIX 4.3 w/uname from GNU shellutils:
-// AIX host 3 4 000003531C00 unknown
-//
-// SGI Onyx IRIX 6.5 w/uname from GNU shellutils:
-// IRIX64 host 6.5 01091820 IP19 mips
-//
-// SGI Onyx IRIX 6.5:
-// IRIX64 host 6.5 01091820 IP19
-//
-// SparcStation 20 Solaris 8 w/uname from GNU shellutils:
-// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc
-//
-// SparcStation 20 Solaris 8:
-// SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc SUNW,SPARCstation-20
-//
-// Mac OS X (Darwin)
-// Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh
-//
-// Mac OS X early versions
-//
-
-// }}}
-
-/* TODO:
- * - define endianness, to allow matchSignature("bigend") etc.
- */
-
-/**
- * Retrieves information about the current operating system
- *
- * This class uses php_uname() to grok information about the current OS
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class OS_Guess
-{
- var $sysname;
- var $nodename;
- var $cpu;
- var $release;
- var $extra;
-
- function __construct($uname = null)
- {
- list($this->sysname,
- $this->release,
- $this->cpu,
- $this->extra,
- $this->nodename) = $this->parseSignature($uname);
- }
-
- function parseSignature($uname = null)
- {
- static $sysmap = array(
- 'HP-UX' => 'hpux',
- 'IRIX64' => 'irix',
- );
- static $cpumap = array(
- 'i586' => 'i386',
- 'i686' => 'i386',
- 'ppc' => 'powerpc',
- );
- if ($uname === null) {
- $uname = php_uname();
- }
- $parts = preg_split('/\s+/', trim($uname));
- $n = count($parts);
-
- $release = $machine = $cpu = '';
- $sysname = $parts[0];
- $nodename = $parts[1];
- $cpu = $parts[$n-1];
- $extra = '';
- if ($cpu == 'unknown') {
- $cpu = $parts[$n - 2];
- }
-
- switch ($sysname) {
- case 'AIX' :
- $release = "$parts[3].$parts[2]";
- break;
- case 'Windows' :
- switch ($parts[1]) {
- case '95/98':
- $release = '9x';
- break;
- default:
- $release = $parts[1];
- break;
- }
- $cpu = 'i386';
- break;
- case 'Linux' :
- $extra = $this->_detectGlibcVersion();
- // use only the first two digits from the kernel version
- $release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]);
- break;
- case 'Mac' :
- $sysname = 'darwin';
- $nodename = $parts[2];
- $release = $parts[3];
- if ($cpu == 'Macintosh') {
- if ($parts[$n - 2] == 'Power') {
- $cpu = 'powerpc';
- }
- }
- break;
- case 'Darwin' :
- if ($cpu == 'Macintosh') {
- if ($parts[$n - 2] == 'Power') {
- $cpu = 'powerpc';
- }
- }
- $release = preg_replace('/^([0-9]+\.[0-9]+).*/', '\1', $parts[2]);
- break;
- default:
- $release = preg_replace('/-.*/', '', $parts[2]);
- break;
- }
-
- if (isset($sysmap[$sysname])) {
- $sysname = $sysmap[$sysname];
- } else {
- $sysname = strtolower($sysname);
- }
- if (isset($cpumap[$cpu])) {
- $cpu = $cpumap[$cpu];
- }
- return array($sysname, $release, $cpu, $extra, $nodename);
- }
-
- function _detectGlibcVersion()
- {
- static $glibc = false;
- if ($glibc !== false) {
- return $glibc; // no need to run this multiple times
- }
- $major = $minor = 0;
- include_once "System.php";
- // Use glibc's <features.h> header file to
- // get major and minor version number:
- if (@file_exists('/usr/include/features.h') &&
- @is_readable('/usr/include/features.h')) {
- if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {
- $features_file = fopen('/usr/include/features.h', 'rb');
- while (!feof($features_file)) {
- $line = fgets($features_file, 8192);
- if (!$line || (strpos($line, '#define') === false)) {
- continue;
- }
- if (strpos($line, '__GLIBC__')) {
- // major version number #define __GLIBC__ version
- $line = preg_split('/\s+/', $line);
- $glibc_major = trim($line[2]);
- if (isset($glibc_minor)) {
- break;
- }
- continue;
- }
-
- if (strpos($line, '__GLIBC_MINOR__')) {
- // got the minor version number
- // #define __GLIBC_MINOR__ version
- $line = preg_split('/\s+/', $line);
- $glibc_minor = trim($line[2]);
- if (isset($glibc_major)) {
- break;
- }
- continue;
- }
- }
- fclose($features_file);
- if (!isset($glibc_major) || !isset($glibc_minor)) {
- return $glibc = '';
- }
- return $glibc = 'glibc' . trim($glibc_major) . "." . trim($glibc_minor) ;
- } // no cpp
-
- $tmpfile = System::mktemp("glibctest");
- $fp = fopen($tmpfile, "w");
- fwrite($fp, "#include <features.h>\n__GLIBC__ __GLIBC_MINOR__\n");
- fclose($fp);
- $cpp = popen("/usr/bin/cpp $tmpfile", "r");
- while ($line = fgets($cpp, 1024)) {
- if ($line{0} == '#' || trim($line) == '') {
- continue;
- }
-
- if (list($major, $minor) = explode(' ', trim($line))) {
- break;
- }
- }
- pclose($cpp);
- unlink($tmpfile);
- } // features.h
-
- if (!($major && $minor) && @is_link('/lib/libc.so.6')) {
- // Let's try reading the libc.so.6 symlink
- if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib/libc.so.6')), $matches)) {
- list($major, $minor) = explode('.', $matches[1]);
- }
- }
-
- if (!($major && $minor)) {
- return $glibc = '';
- }
-
- return $glibc = "glibc{$major}.{$minor}";
- }
-
- function getSignature()
- {
- if (empty($this->extra)) {
- return "{$this->sysname}-{$this->release}-{$this->cpu}";
- }
- return "{$this->sysname}-{$this->release}-{$this->cpu}-{$this->extra}";
- }
-
- function getSysname()
- {
- return $this->sysname;
- }
-
- function getNodename()
- {
- return $this->nodename;
- }
-
- function getCpu()
- {
- return $this->cpu;
- }
-
- function getRelease()
- {
- return $this->release;
- }
-
- function getExtra()
- {
- return $this->extra;
- }
-
- function matchSignature($match)
- {
- $fragments = is_array($match) ? $match : explode('-', $match);
- $n = count($fragments);
- $matches = 0;
- if ($n > 0) {
- $matches += $this->_matchFragment($fragments[0], $this->sysname);
- }
- if ($n > 1) {
- $matches += $this->_matchFragment($fragments[1], $this->release);
- }
- if ($n > 2) {
- $matches += $this->_matchFragment($fragments[2], $this->cpu);
- }
- if ($n > 3) {
- $matches += $this->_matchFragment($fragments[3], $this->extra);
- }
- return ($matches == $n);
- }
-
- function _matchFragment($fragment, $value)
- {
- if (strcspn($fragment, '*?') < strlen($fragment)) {
- $reg = '/^' . str_replace(array('*', '?', '/'), array('.*', '.', '\\/'), $fragment) . '\\z/';
- return preg_match($reg, $value);
- }
- return ($fragment == '*' || !strcasecmp($fragment, $value));
- }
-
-}
-/*
- * Local Variables:
- * indent-tabs-mode: nil
- * c-basic-offset: 4
- * End:
- */
-
-/**
- * PEAR_ChannelFile_Parser for parsing channel.xml
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * base xml parser class
- */
-require_once 'PEAR/XMLParser.php';
-require_once 'PEAR/ChannelFile.php';
-/**
- * Parser for channel.xml
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_ChannelFile_Parser extends PEAR_XMLParser
-{
- var $_config;
- var $_logger;
- var $_registry;
-
- function setConfig(&$c)
- {
- $this->_config = &$c;
- $this->_registry = &$c->getRegistry();
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
-
- function parse($data, $file)
- {
- if (PEAR::isError($err = parent::parse($data, $file))) {
- return $err;
- }
-
- $ret = new PEAR_ChannelFile;
- $ret->setConfig($this->_config);
- if (isset($this->_logger)) {
- $ret->setLogger($this->_logger);
- }
-
- $ret->fromArray($this->_unserializedData);
- // make sure the filelist is in the easy to read format needed
- $ret->flattenFilelist();
- $ret->setPackagefile($file, $archive);
- return $ret;
- }
-}
- <login>
- <summary>Connects and authenticates to remote server [Deprecated in favor of channel-login]</summary>
- <function>doLogin</function>
- <shortcut>li</shortcut>
- <options />
- <doc>&lt;channel name&gt;
-WARNING: This function is deprecated in favor of using channel-login
-
-Log in to a remote channel server. If &lt;channel name&gt; is not supplied,
-the default channel is used. To use remote functions in the installer
-that require any kind of privileges, you need to log in first. The
-username and password you enter here will be stored in your per-user
-PEAR configuration (~/.pearrc on Unix-like systems). After logging
-in, your username and password will be sent along in subsequent
-operations on the remote server.</doc>
- </login>
- <logout>
- <summary>Logs out from the remote server [Deprecated in favor of channel-logout]</summary>
- <function>doLogout</function>
- <shortcut>lo</shortcut>
- <options />
- <doc>
-WARNING: This function is deprecated in favor of using channel-logout
-
-Logs out from the remote server. This command does not actually
-connect to the remote server, it only deletes the stored username and
-password from your user configuration.</doc>
- </logout>
-</commands>
-/**
- * PEAR_Command_Auth (login, logout commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- * @deprecated since 1.8.0alpha1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Channels.php';
-
-/**
- * PEAR commands for login/logout
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- * @deprecated since 1.8.0alpha1
- */
-class PEAR_Command_Auth extends PEAR_Command_Channels
-{
- var $commands = array(
- 'login' => array(
- 'summary' => 'Connects and authenticates to remote server [Deprecated in favor of channel-login]',
- 'shortcut' => 'li',
- 'function' => 'doLogin',
- 'options' => array(),
- 'doc' => '<channel name>
-WARNING: This function is deprecated in favor of using channel-login
-
-Log in to a remote channel server. If <channel name> is not supplied,
-the default channel is used. To use remote functions in the installer
-that require any kind of privileges, you need to log in first. The
-username and password you enter here will be stored in your per-user
-PEAR configuration (~/.pearrc on Unix-like systems). After logging
-in, your username and password will be sent along in subsequent
-operations on the remote server.',
- ),
- 'logout' => array(
- 'summary' => 'Logs out from the remote server [Deprecated in favor of channel-logout]',
- 'shortcut' => 'lo',
- 'function' => 'doLogout',
- 'options' => array(),
- 'doc' => '
-WARNING: This function is deprecated in favor of using channel-logout
-
-Logs out from the remote server. This command does not actually
-connect to the remote server, it only deletes the stored username and
-password from your user configuration.',
- )
-
- );
-
- /**
- * PEAR_Command_Auth constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-}
-
- <build>
- <summary>Build an Extension From C Source</summary>
- <function>doBuild</function>
- <shortcut>b</shortcut>
- <options />
- <doc>[package.xml]
-Builds one or more extensions contained in a package.</doc>
- </build>
-</commands>
-/**
- * PEAR_Command_Auth (build command)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for building extensions.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Build extends PEAR_Command_Common
-{
- var $commands = array(
- 'build' => array(
- 'summary' => 'Build an Extension From C Source',
- 'function' => 'doBuild',
- 'shortcut' => 'b',
- 'options' => array(),
- 'doc' => '[package.xml]
-Builds one or more extensions contained in a package.'
- ),
- );
-
- /**
- * PEAR_Command_Build constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function doBuild($command, $options, $params)
- {
- require_once 'PEAR/Builder.php';
- if (sizeof($params) < 1) {
- $params[0] = 'package.xml';
- }
-
- $builder = new PEAR_Builder($this->ui);
- $this->debug = $this->config->get('verbose');
- $err = $builder->build($params[0], array(&$this, 'buildCallback'));
- if (PEAR::isError($err)) {
- return $err;
- }
-
- return true;
- }
-
- function buildCallback($what, $data)
- {
- if (($what == 'cmdoutput' && $this->debug > 1) ||
- ($what == 'output' && $this->debug > 0)) {
- $this->ui->outputData(rtrim($data), 'build');
- }
- }
-}
-
- <list-channels>
- <summary>List Available Channels</summary>
- <function>doList</function>
- <shortcut>lc</shortcut>
- <options />
- <doc>
-List all available channels for installation.
-</doc>
- </list-channels>
- <update-channels>
- <summary>Update the Channel List</summary>
- <function>doUpdateAll</function>
- <shortcut>uc</shortcut>
- <options />
- <doc>
-List all installed packages in all channels.
-</doc>
- </update-channels>
- <channel-delete>
- <summary>Remove a Channel From the List</summary>
- <function>doDelete</function>
- <shortcut>cde</shortcut>
- <options />
- <doc>&lt;channel name&gt;
-Delete a channel from the registry. You may not
-remove any channel that has installed packages.
-</doc>
- </channel-delete>
- <channel-add>
- <summary>Add a Channel</summary>
- <function>doAdd</function>
- <shortcut>ca</shortcut>
- <options />
- <doc>&lt;channel.xml&gt;
-Add a private channel to the channel list. Note that all
-public channels should be synced using &quot;update-channels&quot;.
-Parameter may be either a local file or remote URL to a
-channel.xml.
-</doc>
- </channel-add>
- <channel-update>
- <summary>Update an Existing Channel</summary>
- <function>doUpdate</function>
- <shortcut>cu</shortcut>
- <options>
- <force>
- <shortopt>f</shortopt>
- <doc>will force download of new channel.xml if an existing channel name is used</doc>
- </force>
- <channel>
- <shortopt>c</shortopt>
- <doc>will force download of new channel.xml if an existing channel name is used</doc>
- <arg>CHANNEL</arg>
- </channel>
- </options>
- <doc>[&lt;channel.xml&gt;|&lt;channel name&gt;]
-Update a channel in the channel list directly. Note that all
-public channels can be synced using &quot;update-channels&quot;.
-Parameter may be a local or remote channel.xml, or the name of
-an existing channel.
-</doc>
- </channel-update>
- <channel-info>
- <summary>Retrieve Information on a Channel</summary>
- <function>doInfo</function>
- <shortcut>ci</shortcut>
- <options />
- <doc>&lt;package&gt;
-List the files in an installed package.
-</doc>
- </channel-info>
- <channel-alias>
- <summary>Specify an alias to a channel name</summary>
- <function>doAlias</function>
- <shortcut>cha</shortcut>
- <options />
- <doc>&lt;channel&gt; &lt;alias&gt;
-Specify a specific alias to use for a channel name.
-The alias may not be an existing channel name or
-alias.
-</doc>
- </channel-alias>
- <channel-discover>
- <summary>Initialize a Channel from its server</summary>
- <function>doDiscover</function>
- <shortcut>di</shortcut>
- <options />
- <doc>[&lt;channel.xml&gt;|&lt;channel name&gt;]
-Initialize a channel from its server and create a local channel.xml.
-If &lt;channel name&gt; is in the format &quot;&lt;username&gt;:&lt;password&gt;@&lt;channel&gt;&quot; then
-&lt;username&gt; and &lt;password&gt; will be set as the login username/password for
-&lt;channel&gt;. Use caution when passing the username/password in this way, as
-it may allow other users on your computer to briefly view your username/
-password via the system&#039;s process list.
-</doc>
- </channel-discover>
- <channel-login>
- <summary>Connects and authenticates to remote channel server</summary>
- <function>doLogin</function>
- <shortcut>cli</shortcut>
- <options />
- <doc>&lt;channel name&gt;
-Log in to a remote channel server. If &lt;channel name&gt; is not supplied,
-the default channel is used. To use remote functions in the installer
-that require any kind of privileges, you need to log in first. The
-username and password you enter here will be stored in your per-user
-PEAR configuration (~/.pearrc on Unix-like systems). After logging
-in, your username and password will be sent along in subsequent
-operations on the remote server.</doc>
- </channel-login>
- <channel-logout>
- <summary>Logs out from the remote channel server</summary>
- <function>doLogout</function>
- <shortcut>clo</shortcut>
- <options />
- <doc>&lt;channel name&gt;
-Logs out from a remote channel server. If &lt;channel name&gt; is not supplied,
-the default channel is used. This command does not actually connect to the
-remote server, it only deletes the stored username and password from your user
-configuration.</doc>
- </channel-logout>
-</commands>
-// /* vim: set expandtab tabstop=4 shiftwidth=4: */
-/**
- * PEAR_Command_Channels (list-channels, update-channels, channel-delete, channel-add,
- * channel-update, channel-info, channel-alias, channel-discover commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-define('PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS', -500);
-
-/**
- * PEAR commands for managing channels.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Command_Channels extends PEAR_Command_Common
-{
- var $commands = array(
- 'list-channels' => array(
- 'summary' => 'List Available Channels',
- 'function' => 'doList',
- 'shortcut' => 'lc',
- 'options' => array(),
- 'doc' => '
-List all available channels for installation.
-',
- ),
- 'update-channels' => array(
- 'summary' => 'Update the Channel List',
- 'function' => 'doUpdateAll',
- 'shortcut' => 'uc',
- 'options' => array(),
- 'doc' => '
-List all installed packages in all channels.
-'
- ),
- 'channel-delete' => array(
- 'summary' => 'Remove a Channel From the List',
- 'function' => 'doDelete',
- 'shortcut' => 'cde',
- 'options' => array(),
- 'doc' => '<channel name>
-Delete a channel from the registry. You may not
-remove any channel that has installed packages.
-'
- ),
- 'channel-add' => array(
- 'summary' => 'Add a Channel',
- 'function' => 'doAdd',
- 'shortcut' => 'ca',
- 'options' => array(),
- 'doc' => '<channel.xml>
-Add a private channel to the channel list. Note that all
-public channels should be synced using "update-channels".
-Parameter may be either a local file or remote URL to a
-channel.xml.
-'
- ),
- 'channel-update' => array(
- 'summary' => 'Update an Existing Channel',
- 'function' => 'doUpdate',
- 'shortcut' => 'cu',
- 'options' => array(
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'will force download of new channel.xml if an existing channel name is used',
- ),
- 'channel' => array(
- 'shortopt' => 'c',
- 'arg' => 'CHANNEL',
- 'doc' => 'will force download of new channel.xml if an existing channel name is used',
- ),
-),
- 'doc' => '[<channel.xml>|<channel name>]
-Update a channel in the channel list directly. Note that all
-public channels can be synced using "update-channels".
-Parameter may be a local or remote channel.xml, or the name of
-an existing channel.
-'
- ),
- 'channel-info' => array(
- 'summary' => 'Retrieve Information on a Channel',
- 'function' => 'doInfo',
- 'shortcut' => 'ci',
- 'options' => array(),
- 'doc' => '<package>
-List the files in an installed package.
-'
- ),
- 'channel-alias' => array(
- 'summary' => 'Specify an alias to a channel name',
- 'function' => 'doAlias',
- 'shortcut' => 'cha',
- 'options' => array(),
- 'doc' => '<channel> <alias>
-Specify a specific alias to use for a channel name.
-The alias may not be an existing channel name or
-alias.
-'
- ),
- 'channel-discover' => array(
- 'summary' => 'Initialize a Channel from its server',
- 'function' => 'doDiscover',
- 'shortcut' => 'di',
- 'options' => array(),
- 'doc' => '[<channel.xml>|<channel name>]
-Initialize a channel from its server and create a local channel.xml.
-If <channel name> is in the format "<username>:<password>@<channel>" then
-<username> and <password> will be set as the login username/password for
-<channel>. Use caution when passing the username/password in this way, as
-it may allow other users on your computer to briefly view your username/
-password via the system\'s process list.
-'
- ),
- 'channel-login' => array(
- 'summary' => 'Connects and authenticates to remote channel server',
- 'shortcut' => 'cli',
- 'function' => 'doLogin',
- 'options' => array(),
- 'doc' => '<channel name>
-Log in to a remote channel server. If <channel name> is not supplied,
-the default channel is used. To use remote functions in the installer
-that require any kind of privileges, you need to log in first. The
-username and password you enter here will be stored in your per-user
-PEAR configuration (~/.pearrc on Unix-like systems). After logging
-in, your username and password will be sent along in subsequent
-operations on the remote server.',
- ),
- 'channel-logout' => array(
- 'summary' => 'Logs out from the remote channel server',
- 'shortcut' => 'clo',
- 'function' => 'doLogout',
- 'options' => array(),
- 'doc' => '<channel name>
-Logs out from a remote channel server. If <channel name> is not supplied,
-the default channel is used. This command does not actually connect to the
-remote server, it only deletes the stored username and password from your user
-configuration.',
- ),
- );
-
- /**
- * PEAR_Command_Registry constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function _sortChannels($a, $b)
- {
- return strnatcasecmp($a->getName(), $b->getName());
- }
-
- function doList($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
- $registered = $reg->getChannels();
- usort($registered, array(&$this, '_sortchannels'));
- $i = $j = 0;
- $data = array(
- 'caption' => 'Registered Channels:',
- 'border' => true,
- 'headline' => array('Channel', 'Alias', 'Summary')
- );
- foreach ($registered as $channel) {
- $data['data'][] = array($channel->getName(),
- $channel->getAlias(),
- $channel->getSummary());
- }
-
- if (count($registered) === 0) {
- $data = '(no registered channels)';
- }
- $this->ui->outputData($data, $command);
- return true;
- }
-
- function doUpdateAll($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
- $channels = $reg->getChannels();
-
- $success = true;
- foreach ($channels as $channel) {
- if ($channel->getName() != '__uri') {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->doUpdate('channel-update',
- $options,
- array($channel->getName()));
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- $success = false;
- } else {
- $success &= $err;
- }
- }
- }
- return $success;
- }
-
- function doInfo($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError("No channel specified");
- }
-
- $reg = &$this->config->getRegistry();
- $channel = strtolower($params[0]);
- if ($reg->channelExists($channel)) {
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $this->raiseError($chan);
- }
- } else {
- if (strpos($channel, '://')) {
- $downloader = &$this->getDownloader();
- $tmpdir = $this->config->get('temp_dir');
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $loc = $downloader->downloadHttp($channel, $this->ui, $tmpdir);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($loc)) {
- return $this->raiseError('Cannot open "' . $channel .
- '" (' . $loc->getMessage() . ')');
- } else {
- $contents = implode('', file($loc));
- }
- } else {
- if (!file_exists($params[0])) {
- return $this->raiseError('Unknown channel "' . $channel . '"');
- }
-
- $fp = fopen($params[0], 'r');
- if (!$fp) {
- return $this->raiseError('Cannot open "' . $params[0] . '"');
- }
-
- $contents = '';
- while (!feof($fp)) {
- $contents .= fread($fp, 1024);
- }
- fclose($fp);
- }
-
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $chan = new PEAR_ChannelFile;
- $chan->fromXmlString($contents);
- $chan->validate();
- if ($errs = $chan->getErrors(true)) {
- foreach ($errs as $err) {
- $this->ui->outputData($err['level'] . ': ' . $err['message']);
- }
- return $this->raiseError('Channel file "' . $params[0] . '" is not valid');
- }
- }
-
- if (!$chan) {
- return $this->raiseError('Serious error: Channel "' . $params[0] .
- '" has a corrupted registry entry');
- }
-
- $channel = $chan->getName();
- $caption = 'Channel ' . $channel . ' Information:';
- $data1 = array(
- 'caption' => $caption,
- 'border' => true);
- $data1['data']['server'] = array('Name and Server', $chan->getName());
- if ($chan->getAlias() != $chan->getName()) {
- $data1['data']['alias'] = array('Alias', $chan->getAlias());
- }
-
- $data1['data']['summary'] = array('Summary', $chan->getSummary());
- $validate = $chan->getValidationPackage();
- $data1['data']['vpackage'] = array('Validation Package Name', $validate['_content']);
- $data1['data']['vpackageversion'] =
- array('Validation Package Version', $validate['attribs']['version']);
- $d = array();
- $d['main'] = $data1;
-
- $data['data'] = array();
- $data['caption'] = 'Server Capabilities';
- $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base');
- if ($chan->supportsREST()) {
- if ($chan->supportsREST()) {
- $funcs = $chan->getFunctions('rest');
- if (!isset($funcs[0])) {
- $funcs = array($funcs);
- }
- foreach ($funcs as $protocol) {
- $data['data'][] = array('rest', $protocol['attribs']['type'],
- $protocol['_content']);
- }
- }
- } else {
- $data['data'][] = array('No supported protocols');
- }
-
- $d['protocols'] = $data;
- $data['data'] = array();
- $mirrors = $chan->getMirrors();
- if ($mirrors) {
- $data['caption'] = 'Channel ' . $channel . ' Mirrors:';
- unset($data['headline']);
- foreach ($mirrors as $mirror) {
- $data['data'][] = array($mirror['attribs']['host']);
- $d['mirrors'] = $data;
- }
-
- foreach ($mirrors as $i => $mirror) {
- $data['data'] = array();
- $data['caption'] = 'Mirror ' . $mirror['attribs']['host'] . ' Capabilities';
- $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base');
- if ($chan->supportsREST($mirror['attribs']['host'])) {
- if ($chan->supportsREST($mirror['attribs']['host'])) {
- $funcs = $chan->getFunctions('rest', $mirror['attribs']['host']);
- if (!isset($funcs[0])) {
- $funcs = array($funcs);
- }
-
- foreach ($funcs as $protocol) {
- $data['data'][] = array('rest', $protocol['attribs']['type'],
- $protocol['_content']);
- }
- }
- } else {
- $data['data'][] = array('No supported protocols');
- }
- $d['mirrorprotocols' . $i] = $data;
- }
- }
- $this->ui->outputData($d, 'channel-info');
- }
-
- // }}}
-
- function doDelete($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError('channel-delete: no channel specified');
- }
-
- $reg = &$this->config->getRegistry();
- if (!$reg->channelExists($params[0])) {
- return $this->raiseError('channel-delete: channel "' . $params[0] . '" does not exist');
- }
-
- $channel = $reg->channelName($params[0]);
- if ($channel == 'pear.php.net') {
- return $this->raiseError('Cannot delete the pear.php.net channel');
- }
-
- if ($channel == 'pecl.php.net') {
- return $this->raiseError('Cannot delete the pecl.php.net channel');
- }
-
- if ($channel == 'doc.php.net') {
- return $this->raiseError('Cannot delete the doc.php.net channel');
- }
-
- if ($channel == '__uri') {
- return $this->raiseError('Cannot delete the __uri pseudo-channel');
- }
-
- if (PEAR::isError($err = $reg->listPackages($channel))) {
- return $err;
- }
-
- if (count($err)) {
- return $this->raiseError('Channel "' . $channel .
- '" has installed packages, cannot delete');
- }
-
- if (!$reg->deleteChannel($channel)) {
- return $this->raiseError('Channel "' . $channel . '" deletion failed');
- } else {
- $this->config->deleteChannel($channel);
- $this->ui->outputData('Channel "' . $channel . '" deleted', $command);
- }
- }
-
- function doAdd($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError('channel-add: no channel file specified');
- }
-
- if (strpos($params[0], '://')) {
- $downloader = &$this->getDownloader();
- $tmpdir = $this->config->get('temp_dir');
- if (!file_exists($tmpdir)) {
- require_once 'System.php';
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = System::mkdir(array('-p', $tmpdir));
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($err)) {
- return $this->raiseError('channel-add: temp_dir does not exist: "' .
- $tmpdir .
- '" - You can change this location with "pear config-set temp_dir"');
- }
- }
-
- if (!is_writable($tmpdir)) {
- return $this->raiseError('channel-add: temp_dir is not writable: "' .
- $tmpdir .
- '" - You can change this location with "pear config-set temp_dir"');
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $loc = $downloader->downloadHttp($params[0], $this->ui, $tmpdir, null, false);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($loc)) {
- return $this->raiseError('channel-add: Cannot open "' . $params[0] .
- '" (' . $loc->getMessage() . ')');
- }
-
- list($loc, $lastmodified) = $loc;
- $contents = implode('', file($loc));
- } else {
- $lastmodified = $fp = false;
- if (file_exists($params[0])) {
- $fp = fopen($params[0], 'r');
- }
-
- if (!$fp) {
- return $this->raiseError('channel-add: cannot open "' . $params[0] . '"');
- }
-
- $contents = '';
- while (!feof($fp)) {
- $contents .= fread($fp, 1024);
- }
- fclose($fp);
- }
-
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $channel = new PEAR_ChannelFile;
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $result = $channel->fromXmlString($contents);
- PEAR::staticPopErrorHandling();
- if (!$result) {
- $exit = false;
- if (count($errors = $channel->getErrors(true))) {
- foreach ($errors as $error) {
- $this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message']));
- if (!$exit) {
- $exit = $error['level'] == 'error' ? true : false;
- }
- }
- if ($exit) {
- return $this->raiseError('channel-add: invalid channel.xml file');
- }
- }
- }
-
- $reg = &$this->config->getRegistry();
- if ($reg->channelExists($channel->getName())) {
- return $this->raiseError('channel-add: Channel "' . $channel->getName() .
- '" exists, use channel-update to update entry', PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS);
- }
-
- $ret = $reg->addChannel($channel, $lastmodified);
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- if (!$ret) {
- return $this->raiseError('channel-add: adding Channel "' . $channel->getName() .
- '" to registry failed');
- }
-
- $this->config->setChannels($reg->listChannels());
- $this->config->writeConfigFile();
- $this->ui->outputData('Adding Channel "' . $channel->getName() . '" succeeded', $command);
- }
-
- function doUpdate($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError("No channel file specified");
- }
-
- $tmpdir = $this->config->get('temp_dir');
- if (!file_exists($tmpdir)) {
- require_once 'System.php';
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = System::mkdir(array('-p', $tmpdir));
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($err)) {
- return $this->raiseError('channel-add: temp_dir does not exist: "' .
- $tmpdir .
- '" - You can change this location with "pear config-set temp_dir"');
- }
- }
-
- if (!is_writable($tmpdir)) {
- return $this->raiseError('channel-add: temp_dir is not writable: "' .
- $tmpdir .
- '" - You can change this location with "pear config-set temp_dir"');
- }
-
- $reg = &$this->config->getRegistry();
- $lastmodified = false;
- if ((!file_exists($params[0]) || is_dir($params[0]))
- && $reg->channelExists(strtolower($params[0]))) {
- $c = $reg->getChannel(strtolower($params[0]));
- if (PEAR::isError($c)) {
- return $this->raiseError($c);
- }
-
- $this->ui->outputData("Updating channel \"$params[0]\"", $command);
- $dl = &$this->getDownloader(array());
- // if force is specified, use a timestamp of "1" to force retrieval
- $lastmodified = isset($options['force']) ? false : $c->lastModified();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml',
- $this->ui, $tmpdir, null, $lastmodified);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($contents)) {
- // Attempt to fall back to https
- $this->ui->outputData("Channel \"$params[0]\" is not responding over http://, failed with message: " . $contents->getMessage());
- $this->ui->outputData("Trying channel \"$params[0]\" over https:// instead");
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml',
- $this->ui, $tmpdir, null, $lastmodified);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($contents)) {
- return $this->raiseError('Cannot retrieve channel.xml for channel "' .
- $c->getName() . '" (' . $contents->getMessage() . ')');
- }
- }
-
- list($contents, $lastmodified) = $contents;
- if (!$contents) {
- $this->ui->outputData("Channel \"$params[0]\" is up to date");
- return;
- }
-
- $contents = implode('', file($contents));
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $channel = new PEAR_ChannelFile;
- $channel->fromXmlString($contents);
- if (!$channel->getErrors()) {
- // security check: is the downloaded file for the channel we got it from?
- if (strtolower($channel->getName()) != strtolower($c->getName())) {
- if (!isset($options['force'])) {
- return $this->raiseError('ERROR: downloaded channel definition file' .
- ' for channel "' . $channel->getName() . '" from channel "' .
- strtolower($c->getName()) . '"');
- }
-
- $this->ui->log(0, 'WARNING: downloaded channel definition file' .
- ' for channel "' . $channel->getName() . '" from channel "' .
- strtolower($c->getName()) . '"');
- }
- }
- } else {
- if (strpos($params[0], '://')) {
- $dl = &$this->getDownloader();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $loc = $dl->downloadHttp($params[0],
- $this->ui, $tmpdir, null, $lastmodified);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($loc)) {
- return $this->raiseError("Cannot open " . $params[0] .
- ' (' . $loc->getMessage() . ')');
- }
-
- list($loc, $lastmodified) = $loc;
- $contents = implode('', file($loc));
- } else {
- $fp = false;
- if (file_exists($params[0])) {
- $fp = fopen($params[0], 'r');
- }
-
- if (!$fp) {
- return $this->raiseError("Cannot open " . $params[0]);
- }
-
- $contents = '';
- while (!feof($fp)) {
- $contents .= fread($fp, 1024);
- }
- fclose($fp);
- }
-
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $channel = new PEAR_ChannelFile;
- $channel->fromXmlString($contents);
- }
-
- $exit = false;
- if (count($errors = $channel->getErrors(true))) {
- foreach ($errors as $error) {
- $this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message']));
- if (!$exit) {
- $exit = $error['level'] == 'error' ? true : false;
- }
- }
- if ($exit) {
- return $this->raiseError('Invalid channel.xml file');
- }
- }
-
- if (!$reg->channelExists($channel->getName())) {
- return $this->raiseError('Error: Channel "' . $channel->getName() .
- '" does not exist, use channel-add to add an entry');
- }
-
- $ret = $reg->updateChannel($channel, $lastmodified);
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- if (!$ret) {
- return $this->raiseError('Updating Channel "' . $channel->getName() .
- '" in registry failed');
- }
-
- $this->config->setChannels($reg->listChannels());
- $this->config->writeConfigFile();
- $this->ui->outputData('Update of Channel "' . $channel->getName() . '" succeeded');
- }
-
- function &getDownloader()
- {
- if (!class_exists('PEAR_Downloader')) {
- require_once 'PEAR/Downloader.php';
- }
- $a = new PEAR_Downloader($this->ui, array(), $this->config);
- return $a;
- }
-
- function doAlias($command, $options, $params)
- {
- if (count($params) === 1) {
- return $this->raiseError('No channel alias specified');
- }
-
- if (count($params) !== 2 || (!empty($params[1]) && $params[1]{0} == '-')) {
- return $this->raiseError(
- 'Invalid format, correct is: channel-alias channel alias');
- }
-
- $reg = &$this->config->getRegistry();
- if (!$reg->channelExists($params[0], true)) {
- $extra = '';
- if ($reg->isAlias($params[0])) {
- $extra = ' (use "channel-alias ' . $reg->channelName($params[0]) . ' ' .
- strtolower($params[1]) . '")';
- }
-
- return $this->raiseError('"' . $params[0] . '" is not a valid channel' . $extra);
- }
-
- if ($reg->isAlias($params[1])) {
- return $this->raiseError('Channel "' . $reg->channelName($params[1]) . '" is ' .
- 'already aliased to "' . strtolower($params[1]) . '", cannot re-alias');
- }
-
- $chan = &$reg->getChannel($params[0]);
- if (PEAR::isError($chan)) {
- return $this->raiseError('Corrupt registry? Error retrieving channel "' . $params[0] .
- '" information (' . $chan->getMessage() . ')');
- }
-
- // make it a local alias
- if (!$chan->setAlias(strtolower($params[1]), true)) {
- return $this->raiseError('Alias "' . strtolower($params[1]) .
- '" is not a valid channel alias');
- }
-
- $reg->updateChannel($chan);
- $this->ui->outputData('Channel "' . $chan->getName() . '" aliased successfully to "' .
- strtolower($params[1]) . '"');
- }
-
- /**
- * The channel-discover command
- *
- * @param string $command command name
- * @param array $options option_name => value
- * @param array $params list of additional parameters.
- * $params[0] should contain a string with either:
- * - <channel name> or
- * - <username>:<password>@<channel name>
- * @return null|PEAR_Error
- */
- function doDiscover($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError("No channel server specified");
- }
-
- // Look for the possible input format "<username>:<password>@<channel>"
- if (preg_match('/^(.+):(.+)@(.+)\\z/', $params[0], $matches)) {
- $username = $matches[1];
- $password = $matches[2];
- $channel = $matches[3];
- } else {
- $channel = $params[0];
- }
-
- $reg = &$this->config->getRegistry();
- if ($reg->channelExists($channel)) {
- if (!$reg->isAlias($channel)) {
- return $this->raiseError("Channel \"$channel\" is already initialized", PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS);
- }
-
- return $this->raiseError("A channel alias named \"$channel\" " .
- 'already exists, aliasing channel "' . $reg->channelName($channel)
- . '"');
- }
-
- $this->pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->doAdd($command, $options, array('http://' . $channel . '/channel.xml'));
- $this->popErrorHandling();
- if (PEAR::isError($err)) {
- if ($err->getCode() === PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS) {
- return $this->raiseError("Discovery of channel \"$channel\" failed (" .
- $err->getMessage() . ')');
- }
- // Attempt fetch via https
- $this->ui->outputData("Discovering channel $channel over http:// failed with message: " . $err->getMessage());
- $this->ui->outputData("Trying to discover channel $channel over https:// instead");
- $this->pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->doAdd($command, $options, array('https://' . $channel . '/channel.xml'));
- $this->popErrorHandling();
- if (PEAR::isError($err)) {
- return $this->raiseError("Discovery of channel \"$channel\" failed (" .
- $err->getMessage() . ')');
- }
- }
-
- // Store username/password if they were given
- // Arguably we should do a logintest on the channel here, but since
- // that's awkward on a REST-based channel (even "pear login" doesn't
- // do it for those), and XML-RPC is deprecated, it's fairly pointless.
- if (isset($username)) {
- $this->config->set('username', $username, 'user', $channel);
- $this->config->set('password', $password, 'user', $channel);
- $this->config->store();
- $this->ui->outputData("Stored login for channel \"$channel\" using username \"$username\"", $command);
- }
-
- $this->ui->outputData("Discovery of channel \"$channel\" succeeded", $command);
- }
-
- /**
- * Execute the 'login' command.
- *
- * @param string $command command name
- * @param array $options option_name => value
- * @param array $params list of additional parameters
- *
- * @return bool TRUE on success or
- * a PEAR error on failure
- *
- * @access public
- */
- function doLogin($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
-
- // If a parameter is supplied, use that as the channel to log in to
- $channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel');
-
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $this->raiseError($chan);
- }
-
- $server = $this->config->get('preferred_mirror', null, $channel);
- $username = $this->config->get('username', null, $channel);
- if (empty($username)) {
- $username = isset($_ENV['USER']) ? $_ENV['USER'] : null;
- }
- $this->ui->outputData("Logging in to $server.", $command);
-
- list($username, $password) = $this->ui->userDialog(
- $command,
- array('Username', 'Password'),
- array('text', 'password'),
- array($username, '')
- );
- $username = trim($username);
- $password = trim($password);
-
- $ourfile = $this->config->getConfFile('user');
- if (!$ourfile) {
- $ourfile = $this->config->getConfFile('system');
- }
-
- $this->config->set('username', $username, 'user', $channel);
- $this->config->set('password', $password, 'user', $channel);
-
- if ($chan->supportsREST()) {
- $ok = true;
- }
-
- if ($ok !== true) {
- return $this->raiseError('Login failed!');
- }
-
- $this->ui->outputData("Logged in.", $command);
- // avoid changing any temporary settings changed with -d
- $ourconfig = new PEAR_Config($ourfile, $ourfile);
- $ourconfig->set('username', $username, 'user', $channel);
- $ourconfig->set('password', $password, 'user', $channel);
- $ourconfig->store();
-
- return true;
- }
-
- /**
- * Execute the 'logout' command.
- *
- * @param string $command command name
- * @param array $options option_name => value
- * @param array $params list of additional parameters
- *
- * @return bool TRUE on success or
- * a PEAR error on failure
- *
- * @access public
- */
- function doLogout($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
-
- // If a parameter is supplied, use that as the channel to log in to
- $channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel');
-
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $this->raiseError($chan);
- }
-
- $server = $this->config->get('preferred_mirror', null, $channel);
- $this->ui->outputData("Logging out from $server.", $command);
- $this->config->remove('username', 'user', $channel);
- $this->config->remove('password', 'user', $channel);
- $this->config->store();
- return true;
- }
-}
-
-/**
- * PEAR_Command_Common base class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR.php';
-
-/**
- * PEAR commands base class
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Common extends PEAR
-{
- /**
- * PEAR_Config object used to pass user system and configuration
- * on when executing commands
- *
- * @var PEAR_Config
- */
- var $config;
- /**
- * @var PEAR_Registry
- * @access protected
- */
- var $_registry;
-
- /**
- * User Interface object, for all interaction with the user.
- * @var object
- */
- var $ui;
-
- var $_deps_rel_trans = array(
- 'lt' => '<',
- 'le' => '<=',
- 'eq' => '=',
- 'ne' => '!=',
- 'gt' => '>',
- 'ge' => '>=',
- 'has' => '=='
- );
-
- var $_deps_type_trans = array(
- 'pkg' => 'package',
- 'ext' => 'extension',
- 'php' => 'PHP',
- 'prog' => 'external program',
- 'ldlib' => 'external library for linking',
- 'rtlib' => 'external runtime library',
- 'os' => 'operating system',
- 'websrv' => 'web server',
- 'sapi' => 'SAPI backend'
- );
-
- /**
- * PEAR_Command_Common constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct();
- $this->config = &$config;
- $this->ui = &$ui;
- }
-
- /**
- * Return a list of all the commands defined by this class.
- * @return array list of commands
- * @access public
- */
- function getCommands()
- {
- $ret = array();
- foreach (array_keys($this->commands) as $command) {
- $ret[$command] = $this->commands[$command]['summary'];
- }
-
- return $ret;
- }
-
- /**
- * Return a list of all the command shortcuts defined by this class.
- * @return array shortcut => command
- * @access public
- */
- function getShortcuts()
- {
- $ret = array();
- foreach (array_keys($this->commands) as $command) {
- if (isset($this->commands[$command]['shortcut'])) {
- $ret[$this->commands[$command]['shortcut']] = $command;
- }
- }
-
- return $ret;
- }
-
- function getOptions($command)
- {
- $shortcuts = $this->getShortcuts();
- if (isset($shortcuts[$command])) {
- $command = $shortcuts[$command];
- }
-
- if (isset($this->commands[$command]) &&
- isset($this->commands[$command]['options'])) {
- return $this->commands[$command]['options'];
- }
-
- return null;
- }
-
- function getGetoptArgs($command, &$short_args, &$long_args)
- {
- $short_args = '';
- $long_args = array();
- if (empty($this->commands[$command]) || empty($this->commands[$command]['options'])) {
- return;
- }
-
- reset($this->commands[$command]['options']);
- while (list($option, $info) = each($this->commands[$command]['options'])) {
- $larg = $sarg = '';
- if (isset($info['arg'])) {
- if ($info['arg']{0} == '(') {
- $larg = '==';
- $sarg = '::';
- $arg = substr($info['arg'], 1, -1);
- } else {
- $larg = '=';
- $sarg = ':';
- $arg = $info['arg'];
- }
- }
-
- if (isset($info['shortopt'])) {
- $short_args .= $info['shortopt'] . $sarg;
- }
-
- $long_args[] = $option . $larg;
- }
- }
-
- /**
- * Returns the help message for the given command
- *
- * @param string $command The command
- * @return mixed A fail string if the command does not have help or
- * a two elements array containing [0]=>help string,
- * [1]=> help string for the accepted cmd args
- */
- function getHelp($command)
- {
- $config = &PEAR_Config::singleton();
- if (!isset($this->commands[$command])) {
- return "No such command \"$command\"";
- }
-
- $help = null;
- if (isset($this->commands[$command]['doc'])) {
- $help = $this->commands[$command]['doc'];
- }
-
- if (empty($help)) {
- // XXX (cox) Fallback to summary if there is no doc (show both?)
- if (!isset($this->commands[$command]['summary'])) {
- return "No help for command \"$command\"";
- }
- $help = $this->commands[$command]['summary'];
- }
-
- if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) {
- foreach($matches[0] as $k => $v) {
- $help = preg_replace("/$v/", $config->get($matches[1][$k]), $help);
- }
- }
-
- return array($help, $this->getHelpArgs($command));
- }
-
- /**
- * Returns the help for the accepted arguments of a command
- *
- * @param string $command
- * @return string The help string
- */
- function getHelpArgs($command)
- {
- if (isset($this->commands[$command]['options']) &&
- count($this->commands[$command]['options']))
- {
- $help = "Options:\n";
- foreach ($this->commands[$command]['options'] as $k => $v) {
- if (isset($v['arg'])) {
- if ($v['arg'][0] == '(') {
- $arg = substr($v['arg'], 1, -1);
- $sapp = " [$arg]";
- $lapp = "[=$arg]";
- } else {
- $sapp = " $v[arg]";
- $lapp = "=$v[arg]";
- }
- } else {
- $sapp = $lapp = "";
- }
-
- if (isset($v['shortopt'])) {
- $s = $v['shortopt'];
- $help .= " -$s$sapp, --$k$lapp\n";
- } else {
- $help .= " --$k$lapp\n";
- }
-
- $p = " ";
- $doc = rtrim(str_replace("\n", "\n$p", $v['doc']));
- $help .= " $doc\n";
- }
-
- return $help;
- }
-
- return null;
- }
-
- function run($command, $options, $params)
- {
- if (empty($this->commands[$command]['function'])) {
- // look for shortcuts
- foreach (array_keys($this->commands) as $cmd) {
- if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) {
- if (empty($this->commands[$cmd]['function'])) {
- return $this->raiseError("unknown command `$command'");
- } else {
- $func = $this->commands[$cmd]['function'];
- }
- $command = $cmd;
-
- //$command = $this->commands[$cmd]['function'];
- break;
- }
- }
- } else {
- $func = $this->commands[$command]['function'];
- }
-
- return $this->$func($command, $options, $params);
- }
-}
-
- <config-show>
- <summary>Show All Settings</summary>
- <function>doConfigShow</function>
- <shortcut>csh</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>show configuration variables for another channel</doc>
- <arg>CHAN</arg>
- </channel>
- </options>
- <doc>[layer]
-Displays all configuration values. An optional argument
-may be used to tell which configuration layer to display. Valid
-configuration layers are &quot;user&quot;, &quot;system&quot; and &quot;default&quot;. To display
-configurations for different channels, set the default_channel
-configuration variable and run config-show again.
-</doc>
- </config-show>
- <config-get>
- <summary>Show One Setting</summary>
- <function>doConfigGet</function>
- <shortcut>cg</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>show configuration variables for another channel</doc>
- <arg>CHAN</arg>
- </channel>
- </options>
- <doc>&lt;parameter&gt; [layer]
-Displays the value of one configuration parameter. The
-first argument is the name of the parameter, an optional second argument
-may be used to tell which configuration layer to look in. Valid configuration
-layers are &quot;user&quot;, &quot;system&quot; and &quot;default&quot;. If no layer is specified, a value
-will be picked from the first layer that defines the parameter, in the order
-just specified. The configuration value will be retrieved for the channel
-specified by the default_channel configuration variable.
-</doc>
- </config-get>
- <config-set>
- <summary>Change Setting</summary>
- <function>doConfigSet</function>
- <shortcut>cs</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>show configuration variables for another channel</doc>
- <arg>CHAN</arg>
- </channel>
- </options>
- <doc>&lt;parameter&gt; &lt;value&gt; [layer]
-Sets the value of one configuration parameter. The first argument is
-the name of the parameter, the second argument is the new value. Some
-parameters are subject to validation, and the command will fail with
-an error message if the new value does not make sense. An optional
-third argument may be used to specify in which layer to set the
-configuration parameter. The default layer is &quot;user&quot;. The
-configuration value will be set for the current channel, which
-is controlled by the default_channel configuration variable.
-</doc>
- </config-set>
- <config-help>
- <summary>Show Information About Setting</summary>
- <function>doConfigHelp</function>
- <shortcut>ch</shortcut>
- <options />
- <doc>[parameter]
-Displays help for a configuration parameter. Without arguments it
-displays help for all configuration parameters.
-</doc>
- </config-help>
- <config-create>
- <summary>Create a Default configuration file</summary>
- <function>doConfigCreate</function>
- <shortcut>coc</shortcut>
- <options>
- <windows>
- <shortopt>w</shortopt>
- <doc>create a config file for a windows install</doc>
- </windows>
- </options>
- <doc>&lt;root path&gt; &lt;filename&gt;
-Create a default configuration file with all directory configuration
-variables set to subdirectories of &lt;root path&gt;, and save it as &lt;filename&gt;.
-This is useful especially for creating a configuration file for a remote
-PEAR installation (using the --remoteconfig option of install, upgrade,
-and uninstall).
-</doc>
- </config-create>
-</commands>
-/**
- * PEAR_Command_Config (config-show, config-get, config-set, config-help, config-create commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for managing configuration data.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Config extends PEAR_Command_Common
-{
- var $commands = array(
- 'config-show' => array(
- 'summary' => 'Show All Settings',
- 'function' => 'doConfigShow',
- 'shortcut' => 'csh',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'show configuration variables for another channel',
- 'arg' => 'CHAN',
- ),
-),
- 'doc' => '[layer]
-Displays all configuration values. An optional argument
-may be used to tell which configuration layer to display. Valid
-configuration layers are "user", "system" and "default". To display
-configurations for different channels, set the default_channel
-configuration variable and run config-show again.
-',
- ),
- 'config-get' => array(
- 'summary' => 'Show One Setting',
- 'function' => 'doConfigGet',
- 'shortcut' => 'cg',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'show configuration variables for another channel',
- 'arg' => 'CHAN',
- ),
-),
- 'doc' => '<parameter> [layer]
-Displays the value of one configuration parameter. The
-first argument is the name of the parameter, an optional second argument
-may be used to tell which configuration layer to look in. Valid configuration
-layers are "user", "system" and "default". If no layer is specified, a value
-will be picked from the first layer that defines the parameter, in the order
-just specified. The configuration value will be retrieved for the channel
-specified by the default_channel configuration variable.
-',
- ),
- 'config-set' => array(
- 'summary' => 'Change Setting',
- 'function' => 'doConfigSet',
- 'shortcut' => 'cs',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'show configuration variables for another channel',
- 'arg' => 'CHAN',
- ),
-),
- 'doc' => '<parameter> <value> [layer]
-Sets the value of one configuration parameter. The first argument is
-the name of the parameter, the second argument is the new value. Some
-parameters are subject to validation, and the command will fail with
-an error message if the new value does not make sense. An optional
-third argument may be used to specify in which layer to set the
-configuration parameter. The default layer is "user". The
-configuration value will be set for the current channel, which
-is controlled by the default_channel configuration variable.
-',
- ),
- 'config-help' => array(
- 'summary' => 'Show Information About Setting',
- 'function' => 'doConfigHelp',
- 'shortcut' => 'ch',
- 'options' => array(),
- 'doc' => '[parameter]
-Displays help for a configuration parameter. Without arguments it
-displays help for all configuration parameters.
-',
- ),
- 'config-create' => array(
- 'summary' => 'Create a Default configuration file',
- 'function' => 'doConfigCreate',
- 'shortcut' => 'coc',
- 'options' => array(
- 'windows' => array(
- 'shortopt' => 'w',
- 'doc' => 'create a config file for a windows install',
- ),
- ),
- 'doc' => '<root path> <filename>
-Create a default configuration file with all directory configuration
-variables set to subdirectories of <root path>, and save it as <filename>.
-This is useful especially for creating a configuration file for a remote
-PEAR installation (using the --remoteconfig option of install, upgrade,
-and uninstall).
-',
- ),
- );
-
- /**
- * PEAR_Command_Config constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function doConfigShow($command, $options, $params)
- {
- $layer = null;
- if (is_array($params)) {
- $layer = isset($params[0]) ? $params[0] : null;
- }
-
- // $params[0] -> the layer
- if ($error = $this->_checkLayer($layer)) {
- return $this->raiseError("config-show:$error");
- }
-
- $keys = $this->config->getKeys();
- sort($keys);
- $channel = isset($options['channel']) ? $options['channel'] :
- $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- $channel = $reg->channelName($channel);
- $data = array('caption' => 'Configuration (channel ' . $channel . '):');
- foreach ($keys as $key) {
- $type = $this->config->getType($key);
- $value = $this->config->get($key, $layer, $channel);
- if ($type == 'password' && $value) {
- $value = '********';
- }
-
- if ($value === false) {
- $value = 'false';
- } elseif ($value === true) {
- $value = 'true';
- }
-
- $data['data'][$this->config->getGroup($key)][] = array($this->config->getPrompt($key) , $key, $value);
- }
-
- foreach ($this->config->getLayers() as $layer) {
- $data['data']['Config Files'][] = array(ucfirst($layer) . ' Configuration File', 'Filename' , $this->config->getConfFile($layer));
- }
-
- $this->ui->outputData($data, $command);
- return true;
- }
-
- function doConfigGet($command, $options, $params)
- {
- $args_cnt = is_array($params) ? count($params) : 0;
- switch ($args_cnt) {
- case 1:
- $config_key = $params[0];
- $layer = null;
- break;
- case 2:
- $config_key = $params[0];
- $layer = $params[1];
- if ($error = $this->_checkLayer($layer)) {
- return $this->raiseError("config-get:$error");
- }
- break;
- case 0:
- default:
- return $this->raiseError("config-get expects 1 or 2 parameters");
- }
-
- $reg = &$this->config->getRegistry();
- $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel');
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- $channel = $reg->channelName($channel);
- $this->ui->outputData($this->config->get($config_key, $layer, $channel), $command);
- return true;
- }
-
- function doConfigSet($command, $options, $params)
- {
- // $param[0] -> a parameter to set
- // $param[1] -> the value for the parameter
- // $param[2] -> the layer
- $failmsg = '';
- if (count($params) < 2 || count($params) > 3) {
- $failmsg .= "config-set expects 2 or 3 parameters";
- return PEAR::raiseError($failmsg);
- }
-
- if (isset($params[2]) && ($error = $this->_checkLayer($params[2]))) {
- $failmsg .= $error;
- return PEAR::raiseError("config-set:$failmsg");
- }
-
- $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- $channel = $reg->channelName($channel);
- if ($params[0] == 'default_channel' && !$reg->channelExists($params[1])) {
- return $this->raiseError('Channel "' . $params[1] . '" does not exist');
- }
-
- if ($params[0] == 'preferred_mirror'
- && (
- !$reg->mirrorExists($channel, $params[1]) &&
- (!$reg->channelExists($params[1]) || $channel != $params[1])
- )
- ) {
- $msg = 'Channel Mirror "' . $params[1] . '" does not exist';
- $msg .= ' in your registry for channel "' . $channel . '".';
- $msg .= "\n" . 'Attempt to run "pear channel-update ' . $channel .'"';
- $msg .= ' if you believe this mirror should exist as you may';
- $msg .= ' have outdated channel information.';
- return $this->raiseError($msg);
- }
-
- if (count($params) == 2) {
- array_push($params, 'user');
- $layer = 'user';
- } else {
- $layer = $params[2];
- }
-
- array_push($params, $channel);
- if (!call_user_func_array(array(&$this->config, 'set'), $params)) {
- array_pop($params);
- $failmsg = "config-set (" . implode(", ", $params) . ") failed, channel $channel";
- } else {
- $this->config->store($layer);
- }
-
- if ($failmsg) {
- return $this->raiseError($failmsg);
- }
-
- $this->ui->outputData('config-set succeeded', $command);
- return true;
- }
-
- function doConfigHelp($command, $options, $params)
- {
- if (empty($params)) {
- $params = $this->config->getKeys();
- }
-
- $data['caption'] = "Config help" . ((count($params) == 1) ? " for $params[0]" : '');
- $data['headline'] = array('Name', 'Type', 'Description');
- $data['border'] = true;
- foreach ($params as $name) {
- $type = $this->config->getType($name);
- $docs = $this->config->getDocs($name);
- if ($type == 'set') {
- $docs = rtrim($docs) . "\nValid set: " .
- implode(' ', $this->config->getSetValues($name));
- }
-
- $data['data'][] = array($name, $type, $docs);
- }
-
- $this->ui->outputData($data, $command);
- }
-
- function doConfigCreate($command, $options, $params)
- {
- if (count($params) != 2) {
- return PEAR::raiseError('config-create: must have 2 parameters, root path and ' .
- 'filename to save as');
- }
-
- $root = $params[0];
- // Clean up the DIRECTORY_SEPARATOR mess
- $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
- $root = preg_replace(array('!\\\\+!', '!/+!', "!$ds2+!"),
- array('/', '/', '/'),
- $root);
- if ($root{0} != '/') {
- if (!isset($options['windows'])) {
- return PEAR::raiseError('Root directory must be an absolute path beginning ' .
- 'with "/", was: "' . $root . '"');
- }
-
- if (!preg_match('/^[A-Za-z]:/', $root)) {
- return PEAR::raiseError('Root directory must be an absolute path beginning ' .
- 'with "\\" or "C:\\", was: "' . $root . '"');
- }
- }
-
- $windows = isset($options['windows']);
- if ($windows) {
- $root = str_replace('/', '\\', $root);
- }
-
- if (!file_exists($params[1]) && !@touch($params[1])) {
- return PEAR::raiseError('Could not create "' . $params[1] . '"');
- }
-
- $params[1] = realpath($params[1]);
- $config = new PEAR_Config($params[1], '#no#system#config#', false, false);
- if ($root{strlen($root) - 1} == '/') {
- $root = substr($root, 0, strlen($root) - 1);
- }
-
- $config->noRegistry();
- $config->set('php_dir', $windows ? "$root\\pear\\php" : "$root/pear/php", 'user');
- $config->set('data_dir', $windows ? "$root\\pear\\data" : "$root/pear/data");
- $config->set('www_dir', $windows ? "$root\\pear\\www" : "$root/pear/www");
- $config->set('cfg_dir', $windows ? "$root\\pear\\cfg" : "$root/pear/cfg");
- $config->set('ext_dir', $windows ? "$root\\pear\\ext" : "$root/pear/ext");
- $config->set('doc_dir', $windows ? "$root\\pear\\docs" : "$root/pear/docs");
- $config->set('test_dir', $windows ? "$root\\pear\\tests" : "$root/pear/tests");
- $config->set('cache_dir', $windows ? "$root\\pear\\cache" : "$root/pear/cache");
- $config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download");
- $config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp");
- $config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear");
- $config->writeConfigFile();
- $this->_showConfig($config);
- $this->ui->outputData('Successfully created default configuration file "' . $params[1] . '"',
- $command);
- }
-
- function _showConfig(&$config)
- {
- $params = array('user');
- $keys = $config->getKeys();
- sort($keys);
- $channel = 'pear.php.net';
- $data = array('caption' => 'Configuration (channel ' . $channel . '):');
- foreach ($keys as $key) {
- $type = $config->getType($key);
- $value = $config->get($key, 'user', $channel);
- if ($type == 'password' && $value) {
- $value = '********';
- }
-
- if ($value === false) {
- $value = 'false';
- } elseif ($value === true) {
- $value = 'true';
- }
- $data['data'][$config->getGroup($key)][] =
- array($config->getPrompt($key) , $key, $value);
- }
-
- foreach ($config->getLayers() as $layer) {
- $data['data']['Config Files'][] =
- array(ucfirst($layer) . ' Configuration File', 'Filename' ,
- $config->getConfFile($layer));
- }
-
- $this->ui->outputData($data, 'config-show');
- return true;
- }
-
- /**
- * Checks if a layer is defined or not
- *
- * @param string $layer The layer to search for
- * @return mixed False on no error or the error message
- */
- function _checkLayer($layer = null)
- {
- if (!empty($layer) && $layer != 'default') {
- $layers = $this->config->getLayers();
- if (!in_array($layer, $layers)) {
- return " only the layers: \"" . implode('" or "', $layers) . "\" are supported";
- }
- }
-
- return false;
- }
-}
-
- <install>
- <summary>Install Package</summary>
- <function>doInstall</function>
- <shortcut>i</shortcut>
- <options>
- <force>
- <shortopt>f</shortopt>
- <doc>will overwrite newer installed packages</doc>
- </force>
- <loose>
- <shortopt>l</shortopt>
- <doc>do not check for recommended dependency version</doc>
- </loose>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, install anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not install files, only register the package as installed</doc>
- </register-only>
- <soft>
- <shortopt>s</shortopt>
- <doc>soft install, fail silently, or upgrade if already installed</doc>
- </soft>
- <nobuild>
- <shortopt>B</shortopt>
- <doc>don&#039;t build C extensions</doc>
- </nobuild>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>request uncompressed files when downloading</doc>
- </nocompress>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT), use packagingroot for RPM</doc>
- <arg>DIR</arg>
- </installroot>
- <packagingroot>
- <shortopt>P</shortopt>
- <doc>root directory used when packaging files, like RPM packaging</doc>
- <arg>DIR</arg>
- </packagingroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <alldeps>
- <shortopt>a</shortopt>
- <doc>install all required and optional dependencies</doc>
- </alldeps>
- <onlyreqdeps>
- <shortopt>o</shortopt>
- <doc>install all required dependencies</doc>
- </onlyreqdeps>
- <offline>
- <shortopt>O</shortopt>
- <doc>do not attempt to download any urls or contact channels</doc>
- </offline>
- <pretend>
- <shortopt>p</shortopt>
- <doc>Only list the packages that would be downloaded</doc>
- </pretend>
- </options>
- <doc>[channel/]&lt;package&gt; ...
-Installs one or more PEAR packages. You can specify a package to
-install in four ways:
-
-&quot;Package-1.0.tgz&quot; : installs from a local file
-
-&quot;http://example.com/Package-1.0.tgz&quot; : installs from
-anywhere on the net.
-
-&quot;package.xml&quot; : installs the package described in
-package.xml. Useful for testing, or for wrapping a PEAR package in
-another package manager such as RPM.
-
-&quot;Package[-version/state][.tar]&quot; : queries your default channel&#039;s server
-({config master_server}) and downloads the newest package with
-the preferred quality/state ({config preferred_state}).
-
-To retrieve Package version 1.1, use &quot;Package-1.1,&quot; to retrieve
-Package state beta, use &quot;Package-beta.&quot; To retrieve an uncompressed
-file, append .tar (make sure there is no file by the same name first)
-
-To download a package from another channel, prefix with the channel name like
-&quot;channel/Package&quot;
-
-More than one package may be specified at once. It is ok to mix these
-four ways of specifying packages.
-</doc>
- </install>
- <upgrade>
- <summary>Upgrade Package</summary>
- <function>doInstall</function>
- <shortcut>up</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>upgrade packages from a specific channel</doc>
- <arg>CHAN</arg>
- </channel>
- <force>
- <shortopt>f</shortopt>
- <doc>overwrite newer installed packages</doc>
- </force>
- <loose>
- <shortopt>l</shortopt>
- <doc>do not check for recommended dependency version</doc>
- </loose>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, upgrade anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not install files, only register the package as upgraded</doc>
- </register-only>
- <nobuild>
- <shortopt>B</shortopt>
- <doc>don&#039;t build C extensions</doc>
- </nobuild>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>request uncompressed files when downloading</doc>
- </nocompress>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT)</doc>
- <arg>DIR</arg>
- </installroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <alldeps>
- <shortopt>a</shortopt>
- <doc>install all required and optional dependencies</doc>
- </alldeps>
- <onlyreqdeps>
- <shortopt>o</shortopt>
- <doc>install all required dependencies</doc>
- </onlyreqdeps>
- <offline>
- <shortopt>O</shortopt>
- <doc>do not attempt to download any urls or contact channels</doc>
- </offline>
- <pretend>
- <shortopt>p</shortopt>
- <doc>Only list the packages that would be downloaded</doc>
- </pretend>
- </options>
- <doc>&lt;package&gt; ...
-Upgrades one or more PEAR packages. See documentation for the
-&quot;install&quot; command for ways to specify a package.
-
-When upgrading, your package will be updated if the provided new
-package has a higher version number (use the -f option if you need to
-upgrade anyway).
-
-More than one package may be specified at once.
-</doc>
- </upgrade>
- <upgrade-all>
- <summary>Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]</summary>
- <function>doUpgradeAll</function>
- <shortcut>ua</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>upgrade packages from a specific channel</doc>
- <arg>CHAN</arg>
- </channel>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, upgrade anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not install files, only register the package as upgraded</doc>
- </register-only>
- <nobuild>
- <shortopt>B</shortopt>
- <doc>don&#039;t build C extensions</doc>
- </nobuild>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>request uncompressed files when downloading</doc>
- </nocompress>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT), use packagingroot for RPM</doc>
- <arg>DIR</arg>
- </installroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <loose>
- <shortopt></shortopt>
- <doc>do not check for recommended dependency version</doc>
- </loose>
- </options>
- <doc>
-WARNING: This function is deprecated in favor of using the upgrade command with no params
-
-Upgrades all packages that have a newer release available. Upgrades are
-done only if there is a release available of the state specified in
-&quot;preferred_state&quot; (currently {config preferred_state}), or a state considered
-more stable.
-</doc>
- </upgrade-all>
- <uninstall>
- <summary>Un-install Package</summary>
- <function>doUninstall</function>
- <shortcut>un</shortcut>
- <options>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, uninstall anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not remove files, only register the packages as not installed</doc>
- </register-only>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT)</doc>
- <arg>DIR</arg>
- </installroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <offline>
- <shortopt>O</shortopt>
- <doc>do not attempt to uninstall remotely</doc>
- </offline>
- </options>
- <doc>[channel/]&lt;package&gt; ...
-Uninstalls one or more PEAR packages. More than one package may be
-specified at once. Prefix with channel name to uninstall from a
-channel not in your default channel ({config default_channel})
-</doc>
- </uninstall>
- <bundle>
- <summary>Unpacks a Pecl Package</summary>
- <function>doBundle</function>
- <shortcut>bun</shortcut>
- <options>
- <destination>
- <shortopt>d</shortopt>
- <doc>Optional destination directory for unpacking (defaults to current path or &quot;ext&quot; if exists)</doc>
- <arg>DIR</arg>
- </destination>
- <force>
- <shortopt>f</shortopt>
- <doc>Force the unpacking even if there were errors in the package</doc>
- </force>
- </options>
- <doc>&lt;package&gt;
-Unpacks a Pecl Package into the selected location. It will download the
-package if needed.
-</doc>
- </bundle>
- <run-scripts>
- <summary>Run Post-Install Scripts bundled with a package</summary>
- <function>doRunScripts</function>
- <shortcut>rs</shortcut>
- <options />
- <doc>&lt;package&gt;
-Run post-installation scripts in package &lt;package&gt;, if any exist.
-</doc>
- </run-scripts>
-</commands>
-/**
- * PEAR_Command_Install (install, upgrade, upgrade-all, uninstall, bundle, run-scripts commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for installation or deinstallation/upgrading of
- * packages.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Install extends PEAR_Command_Common
-{
- // {{{ properties
-
- var $commands = array(
- 'install' => array(
- 'summary' => 'Install Package',
- 'function' => 'doInstall',
- 'shortcut' => 'i',
- 'options' => array(
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'will overwrite newer installed packages',
- ),
- 'loose' => array(
- 'shortopt' => 'l',
- 'doc' => 'do not check for recommended dependency version',
- ),
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, install anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not install files, only register the package as installed',
- ),
- 'soft' => array(
- 'shortopt' => 's',
- 'doc' => 'soft install, fail silently, or upgrade if already installed',
- ),
- 'nobuild' => array(
- 'shortopt' => 'B',
- 'doc' => 'don\'t build C extensions',
- ),
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'request uncompressed files when downloading',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM',
- ),
- 'packagingroot' => array(
- 'shortopt' => 'P',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when packaging files, like RPM packaging',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'alldeps' => array(
- 'shortopt' => 'a',
- 'doc' => 'install all required and optional dependencies',
- ),
- 'onlyreqdeps' => array(
- 'shortopt' => 'o',
- 'doc' => 'install all required dependencies',
- ),
- 'offline' => array(
- 'shortopt' => 'O',
- 'doc' => 'do not attempt to download any urls or contact channels',
- ),
- 'pretend' => array(
- 'shortopt' => 'p',
- 'doc' => 'Only list the packages that would be downloaded',
- ),
- ),
- 'doc' => '[channel/]<package> ...
-Installs one or more PEAR packages. You can specify a package to
-install in four ways:
-
-"Package-1.0.tgz" : installs from a local file
-
-"http://example.com/Package-1.0.tgz" : installs from
-anywhere on the net.
-
-"package.xml" : installs the package described in
-package.xml. Useful for testing, or for wrapping a PEAR package in
-another package manager such as RPM.
-
-"Package[-version/state][.tar]" : queries your default channel\'s server
-({config master_server}) and downloads the newest package with
-the preferred quality/state ({config preferred_state}).
-
-To retrieve Package version 1.1, use "Package-1.1," to retrieve
-Package state beta, use "Package-beta." To retrieve an uncompressed
-file, append .tar (make sure there is no file by the same name first)
-
-To download a package from another channel, prefix with the channel name like
-"channel/Package"
-
-More than one package may be specified at once. It is ok to mix these
-four ways of specifying packages.
-'),
- 'upgrade' => array(
- 'summary' => 'Upgrade Package',
- 'function' => 'doInstall',
- 'shortcut' => 'up',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'upgrade packages from a specific channel',
- 'arg' => 'CHAN',
- ),
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'overwrite newer installed packages',
- ),
- 'loose' => array(
- 'shortopt' => 'l',
- 'doc' => 'do not check for recommended dependency version',
- ),
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, upgrade anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not install files, only register the package as upgraded',
- ),
- 'nobuild' => array(
- 'shortopt' => 'B',
- 'doc' => 'don\'t build C extensions',
- ),
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'request uncompressed files when downloading',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'alldeps' => array(
- 'shortopt' => 'a',
- 'doc' => 'install all required and optional dependencies',
- ),
- 'onlyreqdeps' => array(
- 'shortopt' => 'o',
- 'doc' => 'install all required dependencies',
- ),
- 'offline' => array(
- 'shortopt' => 'O',
- 'doc' => 'do not attempt to download any urls or contact channels',
- ),
- 'pretend' => array(
- 'shortopt' => 'p',
- 'doc' => 'Only list the packages that would be downloaded',
- ),
- ),
- 'doc' => '<package> ...
-Upgrades one or more PEAR packages. See documentation for the
-"install" command for ways to specify a package.
-
-When upgrading, your package will be updated if the provided new
-package has a higher version number (use the -f option if you need to
-upgrade anyway).
-
-More than one package may be specified at once.
-'),
- 'upgrade-all' => array(
- 'summary' => 'Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]',
- 'function' => 'doUpgradeAll',
- 'shortcut' => 'ua',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'upgrade packages from a specific channel',
- 'arg' => 'CHAN',
- ),
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, upgrade anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not install files, only register the package as upgraded',
- ),
- 'nobuild' => array(
- 'shortopt' => 'B',
- 'doc' => 'don\'t build C extensions',
- ),
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'request uncompressed files when downloading',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'loose' => array(
- 'doc' => 'do not check for recommended dependency version',
- ),
- ),
- 'doc' => '
-WARNING: This function is deprecated in favor of using the upgrade command with no params
-
-Upgrades all packages that have a newer release available. Upgrades are
-done only if there is a release available of the state specified in
-"preferred_state" (currently {config preferred_state}), or a state considered
-more stable.
-'),
- 'uninstall' => array(
- 'summary' => 'Un-install Package',
- 'function' => 'doUninstall',
- 'shortcut' => 'un',
- 'options' => array(
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, uninstall anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not remove files, only register the packages as not installed',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'offline' => array(
- 'shortopt' => 'O',
- 'doc' => 'do not attempt to uninstall remotely',
- ),
- ),
- 'doc' => '[channel/]<package> ...
-Uninstalls one or more PEAR packages. More than one package may be
-specified at once. Prefix with channel name to uninstall from a
-channel not in your default channel ({config default_channel})
-'),
- 'bundle' => array(
- 'summary' => 'Unpacks a Pecl Package',
- 'function' => 'doBundle',
- 'shortcut' => 'bun',
- 'options' => array(
- 'destination' => array(
- 'shortopt' => 'd',
- 'arg' => 'DIR',
- 'doc' => 'Optional destination directory for unpacking (defaults to current path or "ext" if exists)',
- ),
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'Force the unpacking even if there were errors in the package',
- ),
- ),
- 'doc' => '<package>
-Unpacks a Pecl Package into the selected location. It will download the
-package if needed.
-'),
- 'run-scripts' => array(
- 'summary' => 'Run Post-Install Scripts bundled with a package',
- 'function' => 'doRunScripts',
- 'shortcut' => 'rs',
- 'options' => array(
- ),
- 'doc' => '<package>
-Run post-installation scripts in package <package>, if any exist.
-'),
- );
-
- // }}}
- // {{{ constructor
-
- /**
- * PEAR_Command_Install constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- // }}}
-
- /**
- * For unit testing purposes
- */
- function &getDownloader(&$ui, $options, &$config)
- {
- if (!class_exists('PEAR_Downloader')) {
- require_once 'PEAR/Downloader.php';
- }
- $a = new PEAR_Downloader($ui, $options, $config);
- return $a;
- }
-
- /**
- * For unit testing purposes
- */
- function &getInstaller(&$ui)
- {
- if (!class_exists('PEAR_Installer')) {
- require_once 'PEAR/Installer.php';
- }
- $a = new PEAR_Installer($ui);
- return $a;
- }
-
- function enableExtension($binaries, $type)
- {
- if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) {
- return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location');
- }
- $ini = $this->_parseIni($phpini);
- if (PEAR::isError($ini)) {
- return $ini;
- }
- $line = 0;
- if ($type == 'extsrc' || $type == 'extbin') {
- $search = 'extensions';
- $enable = 'extension';
- } else {
- $search = 'zend_extensions';
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $enable = 'zend_extension' . $debug . $ts;
- }
- foreach ($ini[$search] as $line => $extension) {
- if (in_array($extension, $binaries, true) || in_array(
- $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) {
- // already enabled - assume if one is, all are
- return true;
- }
- }
- if ($line) {
- $newini = array_slice($ini['all'], 0, $line);
- } else {
- $newini = array();
- }
- foreach ($binaries as $binary) {
- if ($ini['extension_dir']) {
- $binary = basename($binary);
- }
- $newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n");
- }
- $newini = array_merge($newini, array_slice($ini['all'], $line));
- $fp = @fopen($phpini, 'wb');
- if (!$fp) {
- return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
- }
- foreach ($newini as $line) {
- fwrite($fp, $line);
- }
- fclose($fp);
- return true;
- }
-
- function disableExtension($binaries, $type)
- {
- if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) {
- return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location');
- }
- $ini = $this->_parseIni($phpini);
- if (PEAR::isError($ini)) {
- return $ini;
- }
- $line = 0;
- if ($type == 'extsrc' || $type == 'extbin') {
- $search = 'extensions';
- $enable = 'extension';
- } else {
- $search = 'zend_extensions';
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $enable = 'zend_extension' . $debug . $ts;
- }
- $found = false;
- foreach ($ini[$search] as $line => $extension) {
- if (in_array($extension, $binaries, true) || in_array(
- $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) {
- $found = true;
- break;
- }
- }
- if (!$found) {
- // not enabled
- return true;
- }
- $fp = @fopen($phpini, 'wb');
- if (!$fp) {
- return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
- }
- if ($line) {
- $newini = array_slice($ini['all'], 0, $line);
- // delete the enable line
- $newini = array_merge($newini, array_slice($ini['all'], $line + 1));
- } else {
- $newini = array_slice($ini['all'], 1);
- }
- foreach ($newini as $line) {
- fwrite($fp, $line);
- }
- fclose($fp);
- return true;
- }
-
- function _parseIni($filename)
- {
- if (!file_exists($filename)) {
- return PEAR::raiseError('php.ini "' . $filename . '" does not exist');
- }
-
- if (filesize($filename) > 300000) {
- return PEAR::raiseError('php.ini "' . $filename . '" is too large, aborting');
- }
-
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $zend_extension_line = 'zend_extension' . $debug . $ts;
- $all = @file($filename);
- if ($all === false) {
- return PEAR::raiseError('php.ini "' . $filename .'" could not be read');
- }
- $zend_extensions = $extensions = array();
- // assume this is right, but pull from the php.ini if it is found
- $extension_dir = ini_get('extension_dir');
- foreach ($all as $linenum => $line) {
- $line = trim($line);
- if (!$line) {
- continue;
- }
- if ($line[0] == ';') {
- continue;
- }
- if (strtolower(substr($line, 0, 13)) == 'extension_dir') {
- $line = trim(substr($line, 13));
- if ($line[0] == '=') {
- $x = trim(substr($line, 1));
- $x = explode(';', $x);
- $extension_dir = str_replace('"', '', array_shift($x));
- continue;
- }
- }
- if (strtolower(substr($line, 0, 9)) == 'extension') {
- $line = trim(substr($line, 9));
- if ($line[0] == '=') {
- $x = trim(substr($line, 1));
- $x = explode(';', $x);
- $extensions[$linenum] = str_replace('"', '', array_shift($x));
- continue;
- }
- }
- if (strtolower(substr($line, 0, strlen($zend_extension_line))) ==
- $zend_extension_line) {
- $line = trim(substr($line, strlen($zend_extension_line)));
- if ($line[0] == '=') {
- $x = trim(substr($line, 1));
- $x = explode(';', $x);
- $zend_extensions[$linenum] = str_replace('"', '', array_shift($x));
- continue;
- }
- }
- }
- return array(
- 'extensions' => $extensions,
- 'zend_extensions' => $zend_extensions,
- 'extension_dir' => $extension_dir,
- 'all' => $all,
- );
- }
-
- // {{{ doInstall()
-
- function doInstall($command, $options, $params)
- {
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
-
- if (isset($options['installroot']) && isset($options['packagingroot'])) {
- return $this->raiseError('ERROR: cannot use both --installroot and --packagingroot');
- }
-
- $reg = &$this->config->getRegistry();
- $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel');
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- if (empty($this->installer)) {
- $this->installer = &$this->getInstaller($this->ui);
- }
-
- if ($command == 'upgrade' || $command == 'upgrade-all') {
- // If people run the upgrade command but pass nothing, emulate a upgrade-all
- if ($command == 'upgrade' && empty($params)) {
- return $this->doUpgradeAll($command, $options, $params);
- }
- $options['upgrade'] = true;
- } else {
- $packages = $params;
- }
-
- $instreg = &$reg; // instreg used to check if package is installed
- if (isset($options['packagingroot']) && !isset($options['upgrade'])) {
- $packrootphp_dir = $this->installer->_prependPath(
- $this->config->get('php_dir', null, 'pear.php.net'),
- $options['packagingroot']);
- $instreg = new PEAR_Registry($packrootphp_dir); // other instreg!
-
- if ($this->config->get('verbose') > 2) {
- $this->ui->outputData('using package root: ' . $options['packagingroot']);
- }
- }
-
- $abstractpackages = $otherpackages = array();
- // parse params
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
-
- foreach ($params as $param) {
- if (strpos($param, 'http://') === 0) {
- $otherpackages[] = $param;
- continue;
- }
-
- if (strpos($param, 'channel://') === false && @file_exists($param)) {
- if (isset($options['force'])) {
- $otherpackages[] = $param;
- continue;
- }
-
- $pkg = new PEAR_PackageFile($this->config);
- $pf = $pkg->fromAnyFile($param, PEAR_VALIDATE_DOWNLOADING);
- if (PEAR::isError($pf)) {
- $otherpackages[] = $param;
- continue;
- }
-
- $exists = $reg->packageExists($pf->getPackage(), $pf->getChannel());
- $pversion = $reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel());
- $version_compare = version_compare($pf->getVersion(), $pversion, '<=');
- if ($exists && $version_compare) {
- if ($this->config->get('verbose')) {
- $this->ui->outputData('Ignoring installed package ' .
- $reg->parsedPackageNameToString(
- array('package' => $pf->getPackage(),
- 'channel' => $pf->getChannel()), true));
- }
- continue;
- }
- $otherpackages[] = $param;
- continue;
- }
-
- $e = $reg->parsePackageName($param, $channel);
- if (PEAR::isError($e)) {
- $otherpackages[] = $param;
- } else {
- $abstractpackages[] = $e;
- }
- }
- PEAR::staticPopErrorHandling();
-
- // if there are any local package .tgz or remote static url, we can't
- // filter. The filter only works for abstract packages
- if (count($abstractpackages) && !isset($options['force'])) {
- // when not being forced, only do necessary upgrades/installs
- if (isset($options['upgrade'])) {
- $abstractpackages = $this->_filterUptodatePackages($abstractpackages, $command);
- } else {
- $count = count($abstractpackages);
- foreach ($abstractpackages as $i => $package) {
- if (isset($package['group'])) {
- // do not filter out install groups
- continue;
- }
-
- if ($instreg->packageExists($package['package'], $package['channel'])) {
- if ($count > 1) {
- if ($this->config->get('verbose')) {
- $this->ui->outputData('Ignoring installed package ' .
- $reg->parsedPackageNameToString($package, true));
- }
- unset($abstractpackages[$i]);
- } elseif ($count === 1) {
- // Lets try to upgrade it since it's already installed
- $options['upgrade'] = true;
- }
- }
- }
- }
- $abstractpackages =
- array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
- } elseif (count($abstractpackages)) {
- $abstractpackages =
- array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
- }
-
- $packages = array_merge($abstractpackages, $otherpackages);
- if (!count($packages)) {
- $c = '';
- if (isset($options['channel'])){
- $c .= ' in channel "' . $options['channel'] . '"';
- }
- $this->ui->outputData('Nothing to ' . $command . $c);
- return true;
- }
-
- $this->downloader = &$this->getDownloader($this->ui, $options, $this->config);
- $errors = $downloaded = $binaries = array();
- $downloaded = &$this->downloader->download($packages);
- if (PEAR::isError($downloaded)) {
- return $this->raiseError($downloaded);
- }
-
- $errors = $this->downloader->getErrorMsgs();
- if (count($errors)) {
- $err = array();
- $err['data'] = array();
- foreach ($errors as $error) {
- if ($error !== null) {
- $err['data'][] = array($error);
- }
- }
-
- if (!empty($err['data'])) {
- $err['headline'] = 'Install Errors';
- $this->ui->outputData($err);
- }
-
- if (!count($downloaded)) {
- return $this->raiseError("$command failed");
- }
- }
-
- $data = array(
- 'headline' => 'Packages that would be Installed'
- );
-
- if (isset($options['pretend'])) {
- foreach ($downloaded as $package) {
- $data['data'][] = array($reg->parsedPackageNameToString($package->getParsedPackage()));
- }
- $this->ui->outputData($data, 'pretend');
- return true;
- }
-
- $this->installer->setOptions($options);
- $this->installer->sortPackagesForInstall($downloaded);
- if (PEAR::isError($err = $this->installer->setDownloadedPackages($downloaded))) {
- $this->raiseError($err->getMessage());
- return true;
- }
-
- $binaries = $extrainfo = array();
- foreach ($downloaded as $param) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->installer->install($param, $options);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($info)) {
- $oldinfo = $info;
- $pkg = &$param->getPackageFile();
- if ($info->getCode() != PEAR_INSTALLER_NOBINARY) {
- if (!($info = $pkg->installBinary($this->installer))) {
- $this->ui->outputData('ERROR: ' .$oldinfo->getMessage());
- continue;
- }
-
- // we just installed a different package than requested,
- // let's change the param and info so that the rest of this works
- $param = $info[0];
- $info = $info[1];
- }
- }
-
- if (!is_array($info)) {
- return $this->raiseError("$command failed");
- }
-
- if ($param->getPackageType() == 'extsrc' ||
- $param->getPackageType() == 'extbin' ||
- $param->getPackageType() == 'zendextsrc' ||
- $param->getPackageType() == 'zendextbin'
- ) {
- $pkg = &$param->getPackageFile();
- if ($instbin = $pkg->getInstalledBinary()) {
- $instpkg = &$instreg->getPackage($instbin, $pkg->getChannel());
- } else {
- $instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel());
- }
-
- foreach ($instpkg->getFilelist() as $name => $atts) {
- $pinfo = pathinfo($atts['installed_as']);
- if (!isset($pinfo['extension']) ||
- in_array($pinfo['extension'], array('c', 'h'))
- ) {
- continue; // make sure we don't match php_blah.h
- }
-
- if ((strpos($pinfo['basename'], 'php_') === 0 &&
- $pinfo['extension'] == 'dll') ||
- // most unices
- $pinfo['extension'] == 'so' ||
- // hp-ux
- $pinfo['extension'] == 'sl') {
- $binaries[] = array($atts['installed_as'], $pinfo);
- break;
- }
- }
-
- if (count($binaries)) {
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($param->getPackageType() == 'extsrc' ||
- $param->getPackageType() == 'extbin') {
- $exttype = 'extension';
- $extpath = $pinfo[1]['basename'];
- } else {
- $exttype = 'zend_extension';
- $extpath = $atts['installed_as'];
- }
- $extrainfo[] = 'You should add "' . $exttype . '=' .
- $extpath . '" to php.ini';
- } else {
- $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
- ' enabled in php.ini';
- }
- }
- }
- }
-
- if ($this->config->get('verbose') > 0) {
- $chan = $param->getChannel();
- $label = $reg->parsedPackageNameToString(
- array(
- 'channel' => $chan,
- 'package' => $param->getPackage(),
- 'version' => $param->getVersion(),
- ));
- $out = array('data' => "$command ok: $label");
- if (isset($info['release_warnings'])) {
- $out['release_warnings'] = $info['release_warnings'];
- }
- $this->ui->outputData($out, $command);
-
- if (!isset($options['register-only']) && !isset($options['offline'])) {
- if ($this->config->isDefinedLayer('ftp')) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->installer->ftpInstall($param);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($info)) {
- $this->ui->outputData($info->getMessage());
- $this->ui->outputData("remote install failed: $label");
- } else {
- $this->ui->outputData("remote install ok: $label");
- }
- }
- }
- }
-
- $deps = $param->getDeps();
- if ($deps) {
- if (isset($deps['group'])) {
- $groups = $deps['group'];
- if (!isset($groups[0])) {
- $groups = array($groups);
- }
-
- foreach ($groups as $group) {
- if ($group['attribs']['name'] == 'default') {
- // default group is always installed, unless the user
- // explicitly chooses to install another group
- continue;
- }
- $extrainfo[] = $param->getPackage() . ': Optional feature ' .
- $group['attribs']['name'] . ' available (' .
- $group['attribs']['hint'] . ')';
- }
-
- $extrainfo[] = $param->getPackage() .
- ': To install optional features use "pear install ' .
- $reg->parsedPackageNameToString(
- array('package' => $param->getPackage(),
- 'channel' => $param->getChannel()), true) .
- '#featurename"';
- }
- }
-
- $pkg = &$instreg->getPackage($param->getPackage(), $param->getChannel());
- // $pkg may be NULL if install is a 'fake' install via --packagingroot
- if (is_object($pkg)) {
- $pkg->setConfig($this->config);
- if ($list = $pkg->listPostinstallScripts()) {
- $pn = $reg->parsedPackageNameToString(array('channel' =>
- $param->getChannel(), 'package' => $param->getPackage()), true);
- $extrainfo[] = $pn . ' has post-install scripts:';
- foreach ($list as $file) {
- $extrainfo[] = $file;
- }
- $extrainfo[] = $param->getPackage() .
- ': Use "pear run-scripts ' . $pn . '" to finish setup.';
- $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES';
- }
- }
- }
-
- if (count($extrainfo)) {
- foreach ($extrainfo as $info) {
- $this->ui->outputData($info);
- }
- }
-
- return true;
- }
-
- // }}}
- // {{{ doUpgradeAll()
-
- function doUpgradeAll($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
- $upgrade = array();
-
- if (isset($options['channel'])) {
- $channels = array($options['channel']);
- } else {
- $channels = $reg->listChannels();
- }
-
- foreach ($channels as $channel) {
- if ($channel == '__uri') {
- continue;
- }
-
- // parse name with channel
- foreach ($reg->listPackages($channel) as $name) {
- $upgrade[] = $reg->parsedPackageNameToString(array(
- 'channel' => $channel,
- 'package' => $name
- ));
- }
- }
-
- $err = $this->doInstall($command, $options, $upgrade);
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- }
- }
-
- // }}}
- // {{{ doUninstall()
-
- function doUninstall($command, $options, $params)
- {
- if (count($params) < 1) {
- return $this->raiseError("Please supply the package(s) you want to uninstall");
- }
-
- if (empty($this->installer)) {
- $this->installer = &$this->getInstaller($this->ui);
- }
-
- if (isset($options['remoteconfig'])) {
- $e = $this->config->readFTPConfigFile($options['remoteconfig']);
- if (!PEAR::isError($e)) {
- $this->installer->setConfig($this->config);
- }
- }
-
- $reg = &$this->config->getRegistry();
- $newparams = array();
- $binaries = array();
- $badparams = array();
- foreach ($params as $pkg) {
- $channel = $this->config->get('default_channel');
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $parsed = $reg->parsePackageName($pkg, $channel);
- PEAR::staticPopErrorHandling();
- if (!$parsed || PEAR::isError($parsed)) {
- $badparams[] = $pkg;
- continue;
- }
- $package = $parsed['package'];
- $channel = $parsed['channel'];
- $info = &$reg->getPackage($package, $channel);
- if ($info === null &&
- ($channel == 'pear.php.net' || $channel == 'pecl.php.net')) {
- // make sure this isn't a package that has flipped from pear to pecl but
- // used a package.xml 1.0
- $testc = ($channel == 'pear.php.net') ? 'pecl.php.net' : 'pear.php.net';
- $info = &$reg->getPackage($package, $testc);
- if ($info !== null) {
- $channel = $testc;
- }
- }
- if ($info === null) {
- $badparams[] = $pkg;
- } else {
- $newparams[] = &$info;
- // check for binary packages (this is an alias for those packages if so)
- if ($installedbinary = $info->getInstalledBinary()) {
- $this->ui->log('adding binary package ' .
- $reg->parsedPackageNameToString(array('channel' => $channel,
- 'package' => $installedbinary), true));
- $newparams[] = &$reg->getPackage($installedbinary, $channel);
- }
- // add the contents of a dependency group to the list of installed packages
- if (isset($parsed['group'])) {
- $group = $info->getDependencyGroup($parsed['group']);
- if ($group) {
- $installed = $reg->getInstalledGroup($group);
- if ($installed) {
- foreach ($installed as $i => $p) {
- $newparams[] = &$installed[$i];
- }
- }
- }
- }
- }
- }
- $err = $this->installer->sortPackagesForUninstall($newparams);
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- return true;
- }
- $params = $newparams;
- // twist this to use it to check on whether dependent packages are also being uninstalled
- // for circular dependencies like subpackages
- $this->installer->setUninstallPackages($newparams);
- $params = array_merge($params, $badparams);
- $binaries = array();
- foreach ($params as $pkg) {
- $this->installer->pushErrorHandling(PEAR_ERROR_RETURN);
- if ($err = $this->installer->uninstall($pkg, $options)) {
- $this->installer->popErrorHandling();
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- continue;
- }
- if ($pkg->getPackageType() == 'extsrc' ||
- $pkg->getPackageType() == 'extbin' ||
- $pkg->getPackageType() == 'zendextsrc' ||
- $pkg->getPackageType() == 'zendextbin') {
- if ($instbin = $pkg->getInstalledBinary()) {
- continue; // this will be uninstalled later
- }
-
- foreach ($pkg->getFilelist() as $name => $atts) {
- $pinfo = pathinfo($atts['installed_as']);
- if (!isset($pinfo['extension']) ||
- in_array($pinfo['extension'], array('c', 'h'))) {
- continue; // make sure we don't match php_blah.h
- }
- if ((strpos($pinfo['basename'], 'php_') === 0 &&
- $pinfo['extension'] == 'dll') ||
- // most unices
- $pinfo['extension'] == 'so' ||
- // hp-ux
- $pinfo['extension'] == 'sl') {
- $binaries[] = array($atts['installed_as'], $pinfo);
- break;
- }
- }
- if (count($binaries)) {
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($pkg->getPackageType() == 'extsrc' ||
- $pkg->getPackageType() == 'extbin') {
- $exttype = 'extension';
- } else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
- }
- $this->ui->outputData('Unable to remove "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" from php.ini', $command);
- } else {
- $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() .
- ' disabled in php.ini', $command);
- }
- }
- }
- }
- $savepkg = $pkg;
- if ($this->config->get('verbose') > 0) {
- if (is_object($pkg)) {
- $pkg = $reg->parsedPackageNameToString($pkg);
- }
- $this->ui->outputData("uninstall ok: $pkg", $command);
- }
- if (!isset($options['offline']) && is_object($savepkg) &&
- defined('PEAR_REMOTEINSTALL_OK')) {
- if ($this->config->isDefinedLayer('ftp')) {
- $this->installer->pushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->installer->ftpUninstall($savepkg);
- $this->installer->popErrorHandling();
- if (PEAR::isError($info)) {
- $this->ui->outputData($info->getMessage());
- $this->ui->outputData("remote uninstall failed: $pkg");
- } else {
- $this->ui->outputData("remote uninstall ok: $pkg");
- }
- }
- }
- } else {
- $this->installer->popErrorHandling();
- if (!is_object($pkg)) {
- return $this->raiseError("uninstall failed: $pkg");
- }
- $pkg = $reg->parsedPackageNameToString($pkg);
- }
- }
-
- return true;
- }
-
- // }}}
-
-
- // }}}
- // {{{ doBundle()
- /*
- (cox) It just downloads and untars the package, does not do
- any check that the PEAR_Installer::_installFile() does.
- */
-
- function doBundle($command, $options, $params)
- {
- $opts = array(
- 'force' => true,
- 'nodeps' => true,
- 'soft' => true,
- 'downloadonly' => true
- );
- $downloader = &$this->getDownloader($this->ui, $opts, $this->config);
- $reg = &$this->config->getRegistry();
- if (count($params) < 1) {
- return $this->raiseError("Please supply the package you want to bundle");
- }
-
- if (isset($options['destination'])) {
- if (!is_dir($options['destination'])) {
- System::mkdir('-p ' . $options['destination']);
- }
- $dest = realpath($options['destination']);
- } else {
- $pwd = getcwd();
- $dir = $pwd . DIRECTORY_SEPARATOR . 'ext';
- $dest = is_dir($dir) ? $dir : $pwd;
- }
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $downloader->setDownloadDir($dest);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($err)) {
- return PEAR::raiseError('download directory "' . $dest .
- '" is not writeable.');
- }
- $result = &$downloader->download(array($params[0]));
- if (PEAR::isError($result)) {
- return $result;
- }
- if (!isset($result[0])) {
- return $this->raiseError('unable to unpack ' . $params[0]);
- }
- $pkgfile = &$result[0]->getPackageFile();
- $pkgname = $pkgfile->getName();
- $pkgversion = $pkgfile->getVersion();
-
- // Unpacking -------------------------------------------------
- $dest .= DIRECTORY_SEPARATOR . $pkgname;
- $orig = $pkgname . '-' . $pkgversion;
-
- $tar = new Archive_Tar($pkgfile->getArchiveFile());
- if (!$tar->extractModify($dest, $orig)) {
- return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile());
- }
- $this->ui->outputData("Package ready at '$dest'");
- // }}}
- }
-
- // }}}
-
- function doRunScripts($command, $options, $params)
- {
- if (!isset($params[0])) {
- return $this->raiseError('run-scripts expects 1 parameter: a package name');
- }
-
- $reg = &$this->config->getRegistry();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel'));
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($parsed)) {
- return $this->raiseError($parsed);
- }
-
- $package = &$reg->getPackage($parsed['package'], $parsed['channel']);
- if (!is_object($package)) {
- return $this->raiseError('Could not retrieve package "' . $params[0] . '" from registry');
- }
-
- $package->setConfig($this->config);
- $package->runPostinstallScripts();
- $this->ui->outputData('Install scripts complete', $command);
- return true;
- }
-
- /**
- * Given a list of packages, filter out those ones that are already up to date
- *
- * @param $packages: packages, in parsed array format !
- * @return list of packages that can be upgraded
- */
- function _filterUptodatePackages($packages, $command)
- {
- $reg = &$this->config->getRegistry();
- $latestReleases = array();
-
- $ret = array();
- foreach ($packages as $package) {
- if (isset($package['group'])) {
- $ret[] = $package;
- continue;
- }
-
- $channel = $package['channel'];
- $name = $package['package'];
- if (!$reg->packageExists($name, $channel)) {
- $ret[] = $package;
- continue;
- }
-
- if (!isset($latestReleases[$channel])) {
- // fill in cache for this channel
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $this->raiseError($chan);
- }
-
- $base2 = false;
- $preferred_mirror = $this->config->get('preferred_mirror', null, $channel);
- if ($chan->supportsREST($preferred_mirror) &&
- (
- //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) ||
- ($base = $chan->getBaseURL('REST1.0', $preferred_mirror))
- )
- ) {
- $dorest = true;
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (!isset($package['state'])) {
- $state = $this->config->get('preferred_state', null, $channel);
- } else {
- $state = $package['state'];
- }
-
- if ($dorest) {
- if ($base2) {
- $rest = &$this->config->getREST('1.4', array());
- $base = $base2;
- } else {
- $rest = &$this->config->getREST('1.0', array());
- }
-
- $installed = array_flip($reg->listPackages($channel));
- $latest = $rest->listLatestUpgrades($base, $state, $installed, $channel, $reg);
- }
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($latest)) {
- $this->ui->outputData('Error getting channel info from ' . $channel .
- ': ' . $latest->getMessage());
- continue;
- }
-
- $latestReleases[$channel] = array_change_key_case($latest);
- }
-
- // check package for latest release
- $name_lower = strtolower($name);
- if (isset($latestReleases[$channel][$name_lower])) {
- // if not set, up to date
- $inst_version = $reg->packageInfo($name, 'version', $channel);
- $channel_version = $latestReleases[$channel][$name_lower]['version'];
- if (version_compare($channel_version, $inst_version, 'le')) {
- // installed version is up-to-date
- continue;
- }
-
- // maintain BC
- if ($command == 'upgrade-all') {
- $this->ui->outputData(array('data' => 'Will upgrade ' .
- $reg->parsedPackageNameToString($package)), $command);
- }
- $ret[] = $package;
- }
- }
-
- return $ret;
- }
-}
-
- <download-all>
- <summary>Downloads each available package from the default channel</summary>
- <function>doDownloadAll</function>
- <shortcut>da</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>specify a channel other than the default channel</doc>
- <arg>CHAN</arg>
- </channel>
- </options>
- <doc>
-Requests a list of available packages from the default channel ({config default_channel})
-and downloads them to current working directory. Note: only
-packages within preferred_state ({config preferred_state}) will be downloaded</doc>
- </download-all>
-</commands>
-/**
- * PEAR_Command_Mirror (download-all command)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Alexander Merz <alexmerz@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.2.0
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for providing file mirrors
- *
- * @category pear
- * @package PEAR
- * @author Alexander Merz <alexmerz@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.2.0
- */
-class PEAR_Command_Mirror extends PEAR_Command_Common
-{
- var $commands = array(
- 'download-all' => array(
- 'summary' => 'Downloads each available package from the default channel',
- 'function' => 'doDownloadAll',
- 'shortcut' => 'da',
- 'options' => array(
- 'channel' =>
- array(
- 'shortopt' => 'c',
- 'doc' => 'specify a channel other than the default channel',
- 'arg' => 'CHAN',
- ),
- ),
- 'doc' => '
-Requests a list of available packages from the default channel ({config default_channel})
-and downloads them to current working directory. Note: only
-packages within preferred_state ({config preferred_state}) will be downloaded'
- ),
- );
-
- /**
- * PEAR_Command_Mirror constructor.
- *
- * @access public
- * @param object PEAR_Frontend a reference to an frontend
- * @param object PEAR_Config a reference to the configuration data
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- /**
- * For unit-testing
- */
- function &factory($a)
- {
- $a = &PEAR_Command::factory($a, $this->config);
- return $a;
- }
-
- /**
- * retrieves a list of avaible Packages from master server
- * and downloads them
- *
- * @access public
- * @param string $command the command
- * @param array $options the command options before the command
- * @param array $params the stuff after the command name
- * @return bool true if successful
- * @throw PEAR_Error
- */
- function doDownloadAll($command, $options, $params)
- {
- $savechannel = $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- $channel = isset($options['channel']) ? $options['channel'] :
- $this->config->get('default_channel');
- if (!$reg->channelExists($channel)) {
- $this->config->set('default_channel', $savechannel);
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
- $this->config->set('default_channel', $channel);
-
- $this->ui->outputData('Using Channel ' . $this->config->get('default_channel'));
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $this->raiseError($chan);
- }
-
- if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
- $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
- $rest = &$this->config->getREST('1.0', array());
- $remoteInfo = array_flip($rest->listPackages($base, $channel));
- }
-
- if (PEAR::isError($remoteInfo)) {
- return $remoteInfo;
- }
-
- $cmd = &$this->factory("download");
- if (PEAR::isError($cmd)) {
- return $cmd;
- }
-
- $this->ui->outputData('Using Preferred State of ' .
- $this->config->get('preferred_state'));
- $this->ui->outputData('Gathering release information, please wait...');
-
- /**
- * Error handling not necessary, because already done by
- * the download command
- */
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $cmd->run('download', array('downloadonly' => true), array_keys($remoteInfo));
- PEAR::staticPopErrorHandling();
- $this->config->set('default_channel', $savechannel);
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage());
- }
-
- return true;
- }
-}
-
- <package>
- <summary>Build Package</summary>
- <function>doPackage</function>
- <shortcut>p</shortcut>
- <options>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>Do not gzip the package file</doc>
- </nocompress>
- <showname>
- <shortopt>n</shortopt>
- <doc>Print the name of the packaged file.</doc>
- </showname>
- </options>
- <doc>[descfile] [descfile2]
-Creates a PEAR package from its description file (usually called
-package.xml). If a second packagefile is passed in, then
-the packager will check to make sure that one is a package.xml
-version 1.0, and the other is a package.xml version 2.0. The
-package.xml version 1.0 will be saved as &quot;package.xml&quot; in the archive,
-and the other as &quot;package2.xml&quot; in the archive&quot;
-</doc>
- </package>
- <package-validate>
- <summary>Validate Package Consistency</summary>
- <function>doPackageValidate</function>
- <shortcut>pv</shortcut>
- <options />
- <doc>
-</doc>
- </package-validate>
- <cvsdiff>
- <summary>Run a &quot;cvs diff&quot; for all files in a package</summary>
- <function>doCvsDiff</function>
- <shortcut>cd</shortcut>
- <options>
- <quiet>
- <shortopt>q</shortopt>
- <doc>Be quiet</doc>
- </quiet>
- <reallyquiet>
- <shortopt>Q</shortopt>
- <doc>Be really quiet</doc>
- </reallyquiet>
- <date>
- <shortopt>D</shortopt>
- <doc>Diff against revision of DATE</doc>
- <arg>DATE</arg>
- </date>
- <release>
- <shortopt>R</shortopt>
- <doc>Diff against tag for package release REL</doc>
- <arg>REL</arg>
- </release>
- <revision>
- <shortopt>r</shortopt>
- <doc>Diff against revision REV</doc>
- <arg>REV</arg>
- </revision>
- <context>
- <shortopt>c</shortopt>
- <doc>Generate context diff</doc>
- </context>
- <unified>
- <shortopt>u</shortopt>
- <doc>Generate unified diff</doc>
- </unified>
- <ignore-case>
- <shortopt>i</shortopt>
- <doc>Ignore case, consider upper- and lower-case letters equivalent</doc>
- </ignore-case>
- <ignore-whitespace>
- <shortopt>b</shortopt>
- <doc>Ignore changes in amount of white space</doc>
- </ignore-whitespace>
- <ignore-blank-lines>
- <shortopt>B</shortopt>
- <doc>Ignore changes that insert or delete blank lines</doc>
- </ignore-blank-lines>
- <brief>
- <shortopt></shortopt>
- <doc>Report only whether the files differ, no details</doc>
- </brief>
- <dry-run>
- <shortopt>n</shortopt>
- <doc>Don&#039;t do anything, just pretend</doc>
- </dry-run>
- </options>
- <doc>&lt;package.xml&gt;
-Compares all the files in a package. Without any options, this
-command will compare the current code with the last checked-in code.
-Using the -r or -R option you may compare the current code with that
-of a specific release.
-</doc>
- </cvsdiff>
- <svntag>
- <summary>Set SVN Release Tag</summary>
- <function>doSvnTag</function>
- <shortcut>sv</shortcut>
- <options>
- <quiet>
- <shortopt>q</shortopt>
- <doc>Be quiet</doc>
- </quiet>
- <slide>
- <shortopt>F</shortopt>
- <doc>Move (slide) tag if it exists</doc>
- </slide>
- <delete>
- <shortopt>d</shortopt>
- <doc>Remove tag</doc>
- </delete>
- <dry-run>
- <shortopt>n</shortopt>
- <doc>Don&#039;t do anything, just pretend</doc>
- </dry-run>
- </options>
- <doc>&lt;package.xml&gt; [files...]
- Sets a SVN tag on all files in a package. Use this command after you have
- packaged a distribution tarball with the &quot;package&quot; command to tag what
- revisions of what files were in that release. If need to fix something
- after running svntag once, but before the tarball is released to the public,
- use the &quot;slide&quot; option to move the release tag.
-
- to include files (such as a second package.xml, or tests not included in the
- release), pass them as additional parameters.
- </doc>
- </svntag>
- <cvstag>
- <summary>Set CVS Release Tag</summary>
- <function>doCvsTag</function>
- <shortcut>ct</shortcut>
- <options>
- <quiet>
- <shortopt>q</shortopt>
- <doc>Be quiet</doc>
- </quiet>
- <reallyquiet>
- <shortopt>Q</shortopt>
- <doc>Be really quiet</doc>
- </reallyquiet>
- <slide>
- <shortopt>F</shortopt>
- <doc>Move (slide) tag if it exists</doc>
- </slide>
- <delete>
- <shortopt>d</shortopt>
- <doc>Remove tag</doc>
- </delete>
- <dry-run>
- <shortopt>n</shortopt>
- <doc>Don&#039;t do anything, just pretend</doc>
- </dry-run>
- </options>
- <doc>&lt;package.xml&gt; [files...]
-Sets a CVS tag on all files in a package. Use this command after you have
-packaged a distribution tarball with the &quot;package&quot; command to tag what
-revisions of what files were in that release. If need to fix something
-after running cvstag once, but before the tarball is released to the public,
-use the &quot;slide&quot; option to move the release tag.
-
-to include files (such as a second package.xml, or tests not included in the
-release), pass them as additional parameters.
-</doc>
- </cvstag>
- <package-dependencies>
- <summary>Show package dependencies</summary>
- <function>doPackageDependencies</function>
- <shortcut>pd</shortcut>
- <options />
- <doc>&lt;package-file&gt; or &lt;package.xml&gt; or &lt;install-package-name&gt;
-List all dependencies the package has.
-Can take a tgz / tar file, package.xml or a package name of an installed package.</doc>
- </package-dependencies>
- <sign>
- <summary>Sign a package distribution file</summary>
- <function>doSign</function>
- <shortcut>si</shortcut>
- <options>
- <verbose>
- <shortopt>v</shortopt>
- <doc>Display GnuPG output</doc>
- </verbose>
- </options>
- <doc>&lt;package-file&gt;
-Signs a package distribution (.tar or .tgz) file with GnuPG.</doc>
- </sign>
- <makerpm>
- <summary>Builds an RPM spec file from a PEAR package</summary>
- <function>doMakeRPM</function>
- <shortcut>rpm</shortcut>
- <options>
- <spec-template>
- <shortopt>t</shortopt>
- <doc>Use FILE as RPM spec file template</doc>
- <arg>FILE</arg>
- </spec-template>
- <rpm-pkgname>
- <shortopt>p</shortopt>
- <doc>Use FORMAT as format string for RPM package name, %s is replaced
-by the PEAR package name, defaults to &quot;PEAR::%s&quot;.</doc>
- <arg>FORMAT</arg>
- </rpm-pkgname>
- </options>
- <doc>&lt;package-file&gt;
-
-Creates an RPM .spec file for wrapping a PEAR package inside an RPM
-package. Intended to be used from the SPECS directory, with the PEAR
-package tarball in the SOURCES directory:
-
-$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz
-Wrote RPM spec file PEAR::Net_Geo-1.0.spec
-$ rpm -bb PEAR::Net_Socket-1.0.spec
-...
-Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
-</doc>
- </makerpm>
- <convert>
- <summary>Convert a package.xml 1.0 to package.xml 2.0 format</summary>
- <function>doConvert</function>
- <shortcut>c2</shortcut>
- <options>
- <flat>
- <shortopt>f</shortopt>
- <doc>do not beautify the filelist.</doc>
- </flat>
- </options>
- <doc>[descfile] [descfile2]
-Converts a package.xml in 1.0 format into a package.xml
-in 2.0 format. The new file will be named package2.xml by default,
-and package.xml will be used as the old file by default.
-This is not the most intelligent conversion, and should only be
-used for automated conversion or learning the format.
-</doc>
- </convert>
-</commands>
-/**
- * PEAR_Command_Package (package, package-validate, cvsdiff, cvstag, package-dependencies,
- * sign, makerpm, convert commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for login/logout
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: @package_version@
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-
-class PEAR_Command_Package extends PEAR_Command_Common
-{
- var $commands = array(
- 'package' => array(
- 'summary' => 'Build Package',
- 'function' => 'doPackage',
- 'shortcut' => 'p',
- 'options' => array(
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'Do not gzip the package file'
- ),
- 'showname' => array(
- 'shortopt' => 'n',
- 'doc' => 'Print the name of the packaged file.',
- ),
- ),
- 'doc' => '[descfile] [descfile2]
-Creates a PEAR package from its description file (usually called
-package.xml). If a second packagefile is passed in, then
-the packager will check to make sure that one is a package.xml
-version 1.0, and the other is a package.xml version 2.0. The
-package.xml version 1.0 will be saved as "package.xml" in the archive,
-and the other as "package2.xml" in the archive"
-'
- ),
- 'package-validate' => array(
- 'summary' => 'Validate Package Consistency',
- 'function' => 'doPackageValidate',
- 'shortcut' => 'pv',
- 'options' => array(),
- 'doc' => '
-',
- ),
- 'cvsdiff' => array(
- 'summary' => 'Run a "cvs diff" for all files in a package',
- 'function' => 'doCvsDiff',
- 'shortcut' => 'cd',
- 'options' => array(
- 'quiet' => array(
- 'shortopt' => 'q',
- 'doc' => 'Be quiet',
- ),
- 'reallyquiet' => array(
- 'shortopt' => 'Q',
- 'doc' => 'Be really quiet',
- ),
- 'date' => array(
- 'shortopt' => 'D',
- 'doc' => 'Diff against revision of DATE',
- 'arg' => 'DATE',
- ),
- 'release' => array(
- 'shortopt' => 'R',
- 'doc' => 'Diff against tag for package release REL',
- 'arg' => 'REL',
- ),
- 'revision' => array(
- 'shortopt' => 'r',
- 'doc' => 'Diff against revision REV',
- 'arg' => 'REV',
- ),
- 'context' => array(
- 'shortopt' => 'c',
- 'doc' => 'Generate context diff',
- ),
- 'unified' => array(
- 'shortopt' => 'u',
- 'doc' => 'Generate unified diff',
- ),
- 'ignore-case' => array(
- 'shortopt' => 'i',
- 'doc' => 'Ignore case, consider upper- and lower-case letters equivalent',
- ),
- 'ignore-whitespace' => array(
- 'shortopt' => 'b',
- 'doc' => 'Ignore changes in amount of white space',
- ),
- 'ignore-blank-lines' => array(
- 'shortopt' => 'B',
- 'doc' => 'Ignore changes that insert or delete blank lines',
- ),
- 'brief' => array(
- 'doc' => 'Report only whether the files differ, no details',
- ),
- 'dry-run' => array(
- 'shortopt' => 'n',
- 'doc' => 'Don\'t do anything, just pretend',
- ),
- ),
- 'doc' => '<package.xml>
-Compares all the files in a package. Without any options, this
-command will compare the current code with the last checked-in code.
-Using the -r or -R option you may compare the current code with that
-of a specific release.
-',
- ),
- 'svntag' => array(
- 'summary' => 'Set SVN Release Tag',
- 'function' => 'doSvnTag',
- 'shortcut' => 'sv',
- 'options' => array(
- 'quiet' => array(
- 'shortopt' => 'q',
- 'doc' => 'Be quiet',
- ),
- 'slide' => array(
- 'shortopt' => 'F',
- 'doc' => 'Move (slide) tag if it exists',
- ),
- 'delete' => array(
- 'shortopt' => 'd',
- 'doc' => 'Remove tag',
- ),
- 'dry-run' => array(
- 'shortopt' => 'n',
- 'doc' => 'Don\'t do anything, just pretend',
- ),
- ),
- 'doc' => '<package.xml> [files...]
- Sets a SVN tag on all files in a package. Use this command after you have
- packaged a distribution tarball with the "package" command to tag what
- revisions of what files were in that release. If need to fix something
- after running svntag once, but before the tarball is released to the public,
- use the "slide" option to move the release tag.
-
- to include files (such as a second package.xml, or tests not included in the
- release), pass them as additional parameters.
- ',
- ),
- 'cvstag' => array(
- 'summary' => 'Set CVS Release Tag',
- 'function' => 'doCvsTag',
- 'shortcut' => 'ct',
- 'options' => array(
- 'quiet' => array(
- 'shortopt' => 'q',
- 'doc' => 'Be quiet',
- ),
- 'reallyquiet' => array(
- 'shortopt' => 'Q',
- 'doc' => 'Be really quiet',
- ),
- 'slide' => array(
- 'shortopt' => 'F',
- 'doc' => 'Move (slide) tag if it exists',
- ),
- 'delete' => array(
- 'shortopt' => 'd',
- 'doc' => 'Remove tag',
- ),
- 'dry-run' => array(
- 'shortopt' => 'n',
- 'doc' => 'Don\'t do anything, just pretend',
- ),
- ),
- 'doc' => '<package.xml> [files...]
-Sets a CVS tag on all files in a package. Use this command after you have
-packaged a distribution tarball with the "package" command to tag what
-revisions of what files were in that release. If need to fix something
-after running cvstag once, but before the tarball is released to the public,
-use the "slide" option to move the release tag.
-
-to include files (such as a second package.xml, or tests not included in the
-release), pass them as additional parameters.
-',
- ),
- 'package-dependencies' => array(
- 'summary' => 'Show package dependencies',
- 'function' => 'doPackageDependencies',
- 'shortcut' => 'pd',
- 'options' => array(),
- 'doc' => '<package-file> or <package.xml> or <install-package-name>
-List all dependencies the package has.
-Can take a tgz / tar file, package.xml or a package name of an installed package.'
- ),
- 'sign' => array(
- 'summary' => 'Sign a package distribution file',
- 'function' => 'doSign',
- 'shortcut' => 'si',
- 'options' => array(
- 'verbose' => array(
- 'shortopt' => 'v',
- 'doc' => 'Display GnuPG output',
- ),
- ),
- 'doc' => '<package-file>
-Signs a package distribution (.tar or .tgz) file with GnuPG.',
- ),
- 'makerpm' => array(
- 'summary' => 'Builds an RPM spec file from a PEAR package',
- 'function' => 'doMakeRPM',
- 'shortcut' => 'rpm',
- 'options' => array(
- 'spec-template' => array(
- 'shortopt' => 't',
- 'arg' => 'FILE',
- 'doc' => 'Use FILE as RPM spec file template'
- ),
- 'rpm-pkgname' => array(
- 'shortopt' => 'p',
- 'arg' => 'FORMAT',
- 'doc' => 'Use FORMAT as format string for RPM package name, %s is replaced
-by the PEAR package name, defaults to "PEAR::%s".',
- ),
- ),
- 'doc' => '<package-file>
-
-Creates an RPM .spec file for wrapping a PEAR package inside an RPM
-package. Intended to be used from the SPECS directory, with the PEAR
-package tarball in the SOURCES directory:
-
-$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz
-Wrote RPM spec file PEAR::Net_Geo-1.0.spec
-$ rpm -bb PEAR::Net_Socket-1.0.spec
-...
-Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
-',
- ),
- 'convert' => array(
- 'summary' => 'Convert a package.xml 1.0 to package.xml 2.0 format',
- 'function' => 'doConvert',
- 'shortcut' => 'c2',
- 'options' => array(
- 'flat' => array(
- 'shortopt' => 'f',
- 'doc' => 'do not beautify the filelist.',
- ),
- ),
- 'doc' => '[descfile] [descfile2]
-Converts a package.xml in 1.0 format into a package.xml
-in 2.0 format. The new file will be named package2.xml by default,
-and package.xml will be used as the old file by default.
-This is not the most intelligent conversion, and should only be
-used for automated conversion or learning the format.
-'
- ),
- );
-
- var $output;
-
- /**
- * PEAR_Command_Package constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function _displayValidationResults($err, $warn, $strict = false)
- {
- foreach ($err as $e) {
- $this->output .= "Error: $e\n";
- }
- foreach ($warn as $w) {
- $this->output .= "Warning: $w\n";
- }
- $this->output .= sprintf('Validation: %d error(s), %d warning(s)'."\n",
- sizeof($err), sizeof($warn));
- if ($strict && count($err) > 0) {
- $this->output .= "Fix these errors and try again.";
- return false;
- }
- return true;
- }
-
- function &getPackager()
- {
- if (!class_exists('PEAR_Packager')) {
- require_once 'PEAR/Packager.php';
- }
- $a = new PEAR_Packager;
- return $a;
- }
-
- function &getPackageFile($config, $debug = false)
- {
- if (!class_exists('PEAR_Common')) {
- require_once 'PEAR/Common.php';
- }
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
- $a = new PEAR_PackageFile($config, $debug);
- $common = new PEAR_Common;
- $common->ui = $this->ui;
- $a->setLogger($common);
- return $a;
- }
-
- function doPackage($command, $options, $params)
- {
- $this->output = '';
- $pkginfofile = isset($params[0]) ? $params[0] : 'package.xml';
- $pkg2 = isset($params[1]) ? $params[1] : null;
- if (!$pkg2 && !isset($params[0]) && file_exists('package2.xml')) {
- $pkg2 = 'package2.xml';
- }
-
- $packager = &$this->getPackager();
- $compress = empty($options['nocompress']) ? true : false;
- $result = $packager->package($pkginfofile, $compress, $pkg2);
- if (PEAR::isError($result)) {
- return $this->raiseError($result);
- }
-
- // Don't want output, only the package file name just created
- if (isset($options['showname'])) {
- $this->output = $result;
- }
-
- if ($this->output) {
- $this->ui->outputData($this->output, $command);
- }
-
- return true;
- }
-
- function doPackageValidate($command, $options, $params)
- {
- $this->output = '';
- if (count($params) < 1) {
- $params[0] = 'package.xml';
- }
-
- $obj = &$this->getPackageFile($this->config, $this->_debug);
- $obj->rawReturn();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $info = $obj->fromTgzFile($params[0], PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($info)) {
- $info = $obj->fromPackageFile($params[0], PEAR_VALIDATE_NORMAL);
- } else {
- $archive = $info->getArchiveFile();
- $tar = new Archive_Tar($archive);
- $tar->extract(dirname($info->getPackageFile()));
- $info->setPackageFile(dirname($info->getPackageFile()) . DIRECTORY_SEPARATOR .
- $info->getPackage() . '-' . $info->getVersion() . DIRECTORY_SEPARATOR .
- basename($info->getPackageFile()));
- }
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- $valid = false;
- if ($info->getPackagexmlVersion() == '2.0') {
- if ($valid = $info->validate(PEAR_VALIDATE_NORMAL)) {
- $info->flattenFileList();
- $valid = $info->validate(PEAR_VALIDATE_PACKAGING);
- }
- } else {
- $valid = $info->validate(PEAR_VALIDATE_PACKAGING);
- }
-
- $err = $warn = array();
- if ($errors = $info->getValidationWarnings()) {
- foreach ($errors as $error) {
- if ($error['level'] == 'warning') {
- $warn[] = $error['message'];
- } else {
- $err[] = $error['message'];
- }
- }
- }
-
- $this->_displayValidationResults($err, $warn);
- $this->ui->outputData($this->output, $command);
- return true;
- }
-
- function doSvnTag($command, $options, $params)
- {
- $this->output = '';
- $_cmd = $command;
- if (count($params) < 1) {
- $help = $this->getHelp($command);
- return $this->raiseError("$command: missing parameter: $help[0]");
- }
-
- $packageFile = realpath($params[0]);
- $dir = dirname($packageFile);
- $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1);
- $obj = &$this->getPackageFile($this->config, $this->_debug);
- $info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- $err = $warn = array();
- if (!$info->validate()) {
- foreach ($info->getValidationWarnings() as $error) {
- if ($error['level'] == 'warning') {
- $warn[] = $error['message'];
- } else {
- $err[] = $error['message'];
- }
- }
- }
-
- if (!$this->_displayValidationResults($err, $warn, true)) {
- $this->ui->outputData($this->output, $command);
- return $this->raiseError('SVN tag failed');
- }
-
- $version = $info->getVersion();
- $package = $info->getName();
- $svntag = "$package-$version";
-
- if (isset($options['delete'])) {
- return $this->_svnRemoveTag($version, $package, $svntag, $packageFile, $options);
- }
-
- $path = $this->_svnFindPath($packageFile);
-
- // Check if there are any modified files
- $fp = popen('svn st --xml ' . dirname($packageFile), "r");
- $out = '';
- while ($line = fgets($fp, 1024)) {
- $out .= rtrim($line)."\n";
- }
- pclose($fp);
-
- if (!isset($options['quiet']) && strpos($out, 'item="modified"')) {
- $params = array(array(
- 'name' => 'modified',
- 'type' => 'yesno',
- 'default' => 'no',
- 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not committed, do you still want to tag ' . $version . '?',
- ));
- $answers = $this->ui->confirmDialog($params);
-
- if (!in_array($answers['modified'], array('y', 'yes', 'on', '1'))) {
- return true;
- }
- }
-
- if (isset($options['slide'])) {
- $this->_svnRemoveTag($version, $package, $svntag, $packageFile, $options);
- }
-
- // Check if tag already exists
- $releaseTag = $path['local']['base'] . 'tags' . DIRECTORY_SEPARATOR . $svntag;
- $existsCommand = 'svn ls ' . $path['base'] . 'tags/';
-
- $fp = popen($existsCommand, "r");
- $out = '';
- while ($line = fgets($fp, 1024)) {
- $out .= rtrim($line)."\n";
- }
- pclose($fp);
-
- if (in_array($svntag . DIRECTORY_SEPARATOR, explode("\n", $out))) {
- $this->ui->outputData($this->output, $command);
- return $this->raiseError('SVN tag ' . $svntag . ' for ' . $package . ' already exists.');
- } elseif (file_exists($path['local']['base'] . 'tags') === false) {
- return $this->raiseError('Can not locate the tags directory at ' . $path['local']['base'] . 'tags');
- } elseif (is_writeable($path['local']['base'] . 'tags') === false) {
- return $this->raiseError('Can not write to the tag directory at ' . $path['local']['base'] . 'tags');
- } else {
- $makeCommand = 'svn mkdir ' . $releaseTag;
- $this->output .= "+ $makeCommand\n";
- if (empty($options['dry-run'])) {
- // We need to create the tag dir.
- $fp = popen($makeCommand, "r");
- $out = '';
- while ($line = fgets($fp, 1024)) {
- $out .= rtrim($line)."\n";
- }
- pclose($fp);
- $this->output .= "$out\n";
- }
- }
-
- $command = 'svn';
- if (isset($options['quiet'])) {
- $command .= ' -q';
- }
-
- $command .= ' copy --parents ';
-
- $dir = dirname($packageFile);
- $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1);
- $files = array_keys($info->getFilelist());
- if (!in_array(basename($packageFile), $files)) {
- $files[] = basename($packageFile);
- }
-
- array_shift($params);
- if (count($params)) {
- // add in additional files to be tagged (package files and such)
- $files = array_merge($files, $params);
- }
-
- $commands = array();
- foreach ($files as $file) {
- if (!file_exists($file)) {
- $file = $dir . DIRECTORY_SEPARATOR . $file;
- }
- $commands[] = $command . ' ' . escapeshellarg($file) . ' ' .
- escapeshellarg($releaseTag . DIRECTORY_SEPARATOR . $file);
- }
-
- $this->output .= implode("\n", $commands) . "\n";
- if (empty($options['dry-run'])) {
- foreach ($commands as $command) {
- $fp = popen($command, "r");
- while ($line = fgets($fp, 1024)) {
- $this->output .= rtrim($line)."\n";
- }
- pclose($fp);
- }
- }
-
- $command = 'svn ci -m "Tagging the ' . $version . ' release" ' . $releaseTag . "\n";
- $this->output .= "+ $command\n";
- if (empty($options['dry-run'])) {
- $fp = popen($command, "r");
- while ($line = fgets($fp, 1024)) {
- $this->output .= rtrim($line)."\n";
- }
- pclose($fp);
- }
-
- $this->ui->outputData($this->output, $_cmd);
- return true;
- }
-
- function _svnFindPath($file)
- {
- $xml = '';
- $command = "svn info --xml $file";
- $fp = popen($command, "r");
- while ($line = fgets($fp, 1024)) {
- $xml .= rtrim($line)."\n";
- }
- pclose($fp);
- $url_tag = strpos($xml, '<url>');
- $url = substr($xml, $url_tag + 5, strpos($xml, '</url>', $url_tag + 5) - ($url_tag + 5));
-
- $path = array();
- $path['from'] = substr($url, 0, strrpos($url, '/'));
- $path['base'] = substr($path['from'], 0, strrpos($path['from'], '/') + 1);
-
- // Figure out the local paths - see http://pear.php.net/bugs/17463
- $pos = strpos($file, DIRECTORY_SEPARATOR . 'trunk' . DIRECTORY_SEPARATOR);
- if ($pos === false) {
- $pos = strpos($file, DIRECTORY_SEPARATOR . 'branches' . DIRECTORY_SEPARATOR);
- }
- $path['local']['base'] = substr($file, 0, $pos + 1);
-
- return $path;
- }
-
- function _svnRemoveTag($version, $package, $tag, $packageFile, $options)
- {
- $command = 'svn';
-
- if (isset($options['quiet'])) {
- $command .= ' -q';
- }
-
- $command .= ' remove';
- $command .= ' -m "Removing tag for the ' . $version . ' release."';
-
- $path = $this->_svnFindPath($packageFile);
- $command .= ' ' . $path['base'] . 'tags/' . $tag;
-
-
- if ($this->config->get('verbose') > 1) {
- $this->output .= "+ $command\n";
- }
-
- $this->output .= "+ $command\n";
- if (empty($options['dry-run'])) {
- $fp = popen($command, "r");
- while ($line = fgets($fp, 1024)) {
- $this->output .= rtrim($line)."\n";
- }
- pclose($fp);
- }
-
- $this->ui->outputData($this->output, $command);
- return true;
- }
-
- function doCvsTag($command, $options, $params)
- {
- $this->output = '';
- $_cmd = $command;
- if (count($params) < 1) {
- $help = $this->getHelp($command);
- return $this->raiseError("$command: missing parameter: $help[0]");
- }
-
- $packageFile = realpath($params[0]);
- $obj = &$this->getPackageFile($this->config, $this->_debug);
- $info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- $err = $warn = array();
- if (!$info->validate()) {
- foreach ($info->getValidationWarnings() as $error) {
- if ($error['level'] == 'warning') {
- $warn[] = $error['message'];
- } else {
- $err[] = $error['message'];
- }
- }
- }
-
- if (!$this->_displayValidationResults($err, $warn, true)) {
- $this->ui->outputData($this->output, $command);
- return $this->raiseError('CVS tag failed');
- }
-
- $version = $info->getVersion();
- $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $version);
- $cvstag = "RELEASE_$cvsversion";
- $files = array_keys($info->getFilelist());
- $command = 'cvs';
- if (isset($options['quiet'])) {
- $command .= ' -q';
- }
-
- if (isset($options['reallyquiet'])) {
- $command .= ' -Q';
- }
-
- $command .= ' tag';
- if (isset($options['slide'])) {
- $command .= ' -F';
- }
-
- if (isset($options['delete'])) {
- $command .= ' -d';
- }
-
- $command .= ' ' . $cvstag . ' ' . escapeshellarg($params[0]);
- array_shift($params);
- if (count($params)) {
- // add in additional files to be tagged
- $files = array_merge($files, $params);
- }
-
- $dir = dirname($packageFile);
- $dir = substr($dir, strrpos($dir, '/') + 1);
- foreach ($files as $file) {
- if (!file_exists($file)) {
- $file = $dir . DIRECTORY_SEPARATOR . $file;
- }
- $command .= ' ' . escapeshellarg($file);
- }
-
- if ($this->config->get('verbose') > 1) {
- $this->output .= "+ $command\n";
- }
-
- $this->output .= "+ $command\n";
- if (empty($options['dry-run'])) {
- $fp = popen($command, "r");
- while ($line = fgets($fp, 1024)) {
- $this->output .= rtrim($line)."\n";
- }
- pclose($fp);
- }
-
- $this->ui->outputData($this->output, $_cmd);
- return true;
- }
-
- function doCvsDiff($command, $options, $params)
- {
- $this->output = '';
- if (sizeof($params) < 1) {
- $help = $this->getHelp($command);
- return $this->raiseError("$command: missing parameter: $help[0]");
- }
-
- $file = realpath($params[0]);
- $obj = &$this->getPackageFile($this->config, $this->_debug);
- $info = $obj->fromAnyFile($file, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- $err = $warn = array();
- if (!$info->validate()) {
- foreach ($info->getValidationWarnings() as $error) {
- if ($error['level'] == 'warning') {
- $warn[] = $error['message'];
- } else {
- $err[] = $error['message'];
- }
- }
- }
-
- if (!$this->_displayValidationResults($err, $warn, true)) {
- $this->ui->outputData($this->output, $command);
- return $this->raiseError('CVS diff failed');
- }
-
- $info1 = $info->getFilelist();
- $files = $info1;
- $cmd = "cvs";
- if (isset($options['quiet'])) {
- $cmd .= ' -q';
- unset($options['quiet']);
- }
-
- if (isset($options['reallyquiet'])) {
- $cmd .= ' -Q';
- unset($options['reallyquiet']);
- }
-
- if (isset($options['release'])) {
- $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $options['release']);
- $cvstag = "RELEASE_$cvsversion";
- $options['revision'] = $cvstag;
- unset($options['release']);
- }
-
- $execute = true;
- if (isset($options['dry-run'])) {
- $execute = false;
- unset($options['dry-run']);
- }
-
- $cmd .= ' diff';
- // the rest of the options are passed right on to "cvs diff"
- foreach ($options as $option => $optarg) {
- $arg = $short = false;
- if (isset($this->commands[$command]['options'][$option])) {
- $arg = $this->commands[$command]['options'][$option]['arg'];
- $short = $this->commands[$command]['options'][$option]['shortopt'];
- }
- $cmd .= $short ? " -$short" : " --$option";
- if ($arg && $optarg) {
- $cmd .= ($short ? '' : '=') . escapeshellarg($optarg);
- }
- }
-
- foreach ($files as $file) {
- $cmd .= ' ' . escapeshellarg($file['name']);
- }
-
- if ($this->config->get('verbose') > 1) {
- $this->output .= "+ $cmd\n";
- }
-
- if ($execute) {
- $fp = popen($cmd, "r");
- while ($line = fgets($fp, 1024)) {
- $this->output .= rtrim($line)."\n";
- }
- pclose($fp);
- }
-
- $this->ui->outputData($this->output, $command);
- return true;
- }
-
- function doPackageDependencies($command, $options, $params)
- {
- // $params[0] -> the PEAR package to list its information
- if (count($params) !== 1) {
- return $this->raiseError("bad parameter(s), try \"help $command\"");
- }
-
- $obj = &$this->getPackageFile($this->config, $this->_debug);
- if (is_file($params[0]) || strpos($params[0], '.xml') > 0) {
- $info = $obj->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL);
- } else {
- $reg = $this->config->getRegistry();
- $info = $obj->fromArray($reg->packageInfo($params[0]));
- }
-
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- $deps = $info->getDeps();
- if (is_array($deps)) {
- if ($info->getPackagexmlVersion() == '1.0') {
- $data = array(
- 'caption' => 'Dependencies for pear/' . $info->getPackage(),
- 'border' => true,
- 'headline' => array("Required?", "Type", "Name", "Relation", "Version"),
- );
-
- foreach ($deps as $d) {
- if (isset($d['optional'])) {
- if ($d['optional'] == 'yes') {
- $req = 'No';
- } else {
- $req = 'Yes';
- }
- } else {
- $req = 'Yes';
- }
-
- if (isset($this->_deps_rel_trans[$d['rel']])) {
- $rel = $this->_deps_rel_trans[$d['rel']];
- } else {
- $rel = $d['rel'];
- }
-
- if (isset($this->_deps_type_trans[$d['type']])) {
- $type = ucfirst($this->_deps_type_trans[$d['type']]);
- } else {
- $type = $d['type'];
- }
-
- if (isset($d['name'])) {
- $name = $d['name'];
- } else {
- $name = '';
- }
-
- if (isset($d['version'])) {
- $version = $d['version'];
- } else {
- $version = '';
- }
-
- $data['data'][] = array($req, $type, $name, $rel, $version);
- }
- } else { // package.xml 2.0 dependencies display
- require_once 'PEAR/Dependency2.php';
- $deps = $info->getDependencies();
- $reg = &$this->config->getRegistry();
- if (is_array($deps)) {
- $d = new PEAR_Dependency2($this->config, array(), '');
- $data = array(
- 'caption' => 'Dependencies for ' . $info->getPackage(),
- 'border' => true,
- 'headline' => array("Required?", "Type", "Name", 'Versioning', 'Group'),
- );
- foreach ($deps as $type => $subd) {
- $req = ($type == 'required') ? 'Yes' : 'No';
- if ($type == 'group') {
- $group = $subd['attribs']['name'];
- } else {
- $group = '';
- }
-
- if (!isset($subd[0])) {
- $subd = array($subd);
- }
-
- foreach ($subd as $groupa) {
- foreach ($groupa as $deptype => $depinfo) {
- if ($deptype == 'attribs') {
- continue;
- }
-
- if ($deptype == 'pearinstaller') {
- $deptype = 'pear Installer';
- }
-
- if (!isset($depinfo[0])) {
- $depinfo = array($depinfo);
- }
-
- foreach ($depinfo as $inf) {
- $name = '';
- if (isset($inf['channel'])) {
- $alias = $reg->channelAlias($inf['channel']);
- if (!$alias) {
- $alias = '(channel?) ' .$inf['channel'];
- }
- $name = $alias . '/';
-
- }
- if (isset($inf['name'])) {
- $name .= $inf['name'];
- } elseif (isset($inf['pattern'])) {
- $name .= $inf['pattern'];
- } else {
- $name .= '';
- }
-
- if (isset($inf['uri'])) {
- $name .= ' [' . $inf['uri'] . ']';
- }
-
- if (isset($inf['conflicts'])) {
- $ver = 'conflicts';
- } else {
- $ver = $d->_getExtraString($inf);
- }
-
- $data['data'][] = array($req, ucfirst($deptype), $name,
- $ver, $group);
- }
- }
- }
- }
- }
- }
-
- $this->ui->outputData($data, $command);
- return true;
- }
-
- // Fallback
- $this->ui->outputData("This package does not have any dependencies.", $command);
- }
-
- function doSign($command, $options, $params)
- {
- // should move most of this code into PEAR_Packager
- // so it'll be easy to implement "pear package --sign"
- if (count($params) !== 1) {
- return $this->raiseError("bad parameter(s), try \"help $command\"");
- }
-
- require_once 'System.php';
- require_once 'Archive/Tar.php';
-
- if (!file_exists($params[0])) {
- return $this->raiseError("file does not exist: $params[0]");
- }
-
- $obj = $this->getPackageFile($this->config, $this->_debug);
- $info = $obj->fromTgzFile($params[0], PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- $tar = new Archive_Tar($params[0]);
-
- $tmpdir = $this->config->get('temp_dir');
- $tmpdir = System::mktemp(' -t "' . $tmpdir . '" -d pearsign');
- if (!$tar->extractList('package2.xml package.xml package.sig', $tmpdir)) {
- return $this->raiseError("failed to extract tar file");
- }
-
- if (file_exists("$tmpdir/package.sig")) {
- return $this->raiseError("package already signed");
- }
-
- $packagexml = 'package.xml';
- if (file_exists("$tmpdir/package2.xml")) {
- $packagexml = 'package2.xml';
- }
-
- if (file_exists("$tmpdir/package.sig")) {
- unlink("$tmpdir/package.sig");
- }
-
- if (!file_exists("$tmpdir/$packagexml")) {
- return $this->raiseError("Extracted file $tmpdir/$packagexml not found.");
- }
-
- $input = $this->ui->userDialog($command,
- array('GnuPG Passphrase'),
- array('password'));
- if (!isset($input[0])) {
- //use empty passphrase
- $input[0] = '';
- }
-
- $devnull = (isset($options['verbose'])) ? '' : ' 2>/dev/null';
- $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/$packagexml" . $devnull, "w");
- if (!$gpg) {
- return $this->raiseError("gpg command failed");
- }
-
- fwrite($gpg, "$input[0]\n");
- if (pclose($gpg) || !file_exists("$tmpdir/package.sig")) {
- return $this->raiseError("gpg sign failed");
- }
-
- if (!$tar->addModify("$tmpdir/package.sig", '', $tmpdir)) {
- return $this->raiseError('failed adding signature to file');
- }
-
- $this->ui->outputData("Package signed.", $command);
- return true;
- }
-
- /**
- * For unit testing purposes
- */
- function &getInstaller(&$ui)
- {
- if (!class_exists('PEAR_Installer')) {
- require_once 'PEAR/Installer.php';
- }
- $a = new PEAR_Installer($ui);
- return $a;
- }
-
- /**
- * For unit testing purposes
- */
- function &getCommandPackaging(&$ui, &$config)
- {
- if (!class_exists('PEAR_Command_Packaging')) {
- if ($fp = @fopen('PEAR/Command/Packaging.php', 'r', true)) {
- fclose($fp);
- include_once 'PEAR/Command/Packaging.php';
- }
- }
-
- if (class_exists('PEAR_Command_Packaging')) {
- $a = new PEAR_Command_Packaging($ui, $config);
- } else {
- $a = null;
- }
-
- return $a;
- }
-
- function doMakeRPM($command, $options, $params)
- {
-
- // Check to see if PEAR_Command_Packaging is installed, and
- // transparently switch to use the "make-rpm-spec" command from it
- // instead, if it does. Otherwise, continue to use the old version
- // of "makerpm" supplied with this package (PEAR).
- $packaging_cmd = $this->getCommandPackaging($this->ui, $this->config);
- if ($packaging_cmd !== null) {
- $this->ui->outputData('PEAR_Command_Packaging is installed; using '.
- 'newer "make-rpm-spec" command instead');
- return $packaging_cmd->run('make-rpm-spec', $options, $params);
- }
-
- $this->ui->outputData('WARNING: "pear makerpm" is no longer available; an '.
- 'improved version is available via "pear make-rpm-spec", which '.
- 'is available by installing PEAR_Command_Packaging');
- return true;
- }
-
- function doConvert($command, $options, $params)
- {
- $packagexml = isset($params[0]) ? $params[0] : 'package.xml';
- $newpackagexml = isset($params[1]) ? $params[1] : dirname($packagexml) .
- DIRECTORY_SEPARATOR . 'package2.xml';
- $pkg = &$this->getPackageFile($this->config, $this->_debug);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $pf = $pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf)) {
- if (is_array($pf->getUserInfo())) {
- foreach ($pf->getUserInfo() as $warning) {
- $this->ui->outputData($warning['message']);
- }
- }
- return $this->raiseError($pf);
- }
-
- if (is_a($pf, 'PEAR_PackageFile_v2')) {
- $this->ui->outputData($packagexml . ' is already a package.xml version 2.0');
- return true;
- }
-
- $gen = &$pf->getDefaultGenerator();
- $newpf = &$gen->toV2();
- $newpf->setPackagefile($newpackagexml);
- $gen = &$newpf->getDefaultGenerator();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $state = (isset($options['flat']) ? PEAR_VALIDATE_PACKAGING : PEAR_VALIDATE_NORMAL);
- $saved = $gen->toPackageFile(dirname($newpackagexml), $state, basename($newpackagexml));
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($saved)) {
- if (is_array($saved->getUserInfo())) {
- foreach ($saved->getUserInfo() as $warning) {
- $this->ui->outputData($warning['message']);
- }
- }
-
- $this->ui->outputData($saved->getMessage());
- return true;
- }
-
- $this->ui->outputData('Wrote new version 2.0 package.xml to "' . $saved . '"');
- return true;
- }
-}
-
- <pickle>
- <summary>Build PECL Package</summary>
- <function>doPackage</function>
- <shortcut>pi</shortcut>
- <options>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>Do not gzip the package file</doc>
- </nocompress>
- <showname>
- <shortopt>n</shortopt>
- <doc>Print the name of the packaged file.</doc>
- </showname>
- </options>
- <doc>[descfile]
-Creates a PECL package from its package2.xml file.
-
-An automatic conversion will be made to a package.xml 1.0 and written out to
-disk in the current directory as &quot;package.xml&quot;. Note that
-only simple package.xml 2.0 will be converted. package.xml 2.0 with:
-
- - dependency types other than required/optional PECL package/ext/php/pearinstaller
- - more than one extsrcrelease or zendextsrcrelease
- - zendextbinrelease, extbinrelease, phprelease, or bundle release type
- - dependency groups
- - ignore tags in release filelist
- - tasks other than replace
- - custom roles
-
-will cause pickle to fail, and output an error message. If your package2.xml
-uses any of these features, you are best off using PEAR_PackageFileManager to
-generate both package.xml.
-</doc>
- </pickle>
-</commands>
-/**
- * PEAR_Command_Pickle (pickle command)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2005-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for login/logout
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2005-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.1
- */
-
-class PEAR_Command_Pickle extends PEAR_Command_Common
-{
- var $commands = array(
- 'pickle' => array(
- 'summary' => 'Build PECL Package',
- 'function' => 'doPackage',
- 'shortcut' => 'pi',
- 'options' => array(
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'Do not gzip the package file'
- ),
- 'showname' => array(
- 'shortopt' => 'n',
- 'doc' => 'Print the name of the packaged file.',
- ),
- ),
- 'doc' => '[descfile]
-Creates a PECL package from its package2.xml file.
-
-An automatic conversion will be made to a package.xml 1.0 and written out to
-disk in the current directory as "package.xml". Note that
-only simple package.xml 2.0 will be converted. package.xml 2.0 with:
-
- - dependency types other than required/optional PECL package/ext/php/pearinstaller
- - more than one extsrcrelease or zendextsrcrelease
- - zendextbinrelease, extbinrelease, phprelease, or bundle release type
- - dependency groups
- - ignore tags in release filelist
- - tasks other than replace
- - custom roles
-
-will cause pickle to fail, and output an error message. If your package2.xml
-uses any of these features, you are best off using PEAR_PackageFileManager to
-generate both package.xml.
-'
- ),
- );
-
- /**
- * PEAR_Command_Package constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- /**
- * For unit-testing ease
- *
- * @return PEAR_Packager
- */
- function &getPackager()
- {
- if (!class_exists('PEAR_Packager')) {
- require_once 'PEAR/Packager.php';
- }
-
- $a = new PEAR_Packager;
- return $a;
- }
-
- /**
- * For unit-testing ease
- *
- * @param PEAR_Config $config
- * @param bool $debug
- * @param string|null $tmpdir
- * @return PEAR_PackageFile
- */
- function &getPackageFile($config, $debug = false)
- {
- if (!class_exists('PEAR_Common')) {
- require_once 'PEAR/Common.php';
- }
-
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
-
- $a = new PEAR_PackageFile($config, $debug);
- $common = new PEAR_Common;
- $common->ui = $this->ui;
- $a->setLogger($common);
- return $a;
- }
-
- function doPackage($command, $options, $params)
- {
- $this->output = '';
- $pkginfofile = isset($params[0]) ? $params[0] : 'package2.xml';
- $packager = &$this->getPackager();
- if (PEAR::isError($err = $this->_convertPackage($pkginfofile))) {
- return $err;
- }
-
- $compress = empty($options['nocompress']) ? true : false;
- $result = $packager->package($pkginfofile, $compress, 'package.xml');
- if (PEAR::isError($result)) {
- return $this->raiseError($result);
- }
-
- // Don't want output, only the package file name just created
- if (isset($options['showname'])) {
- $this->ui->outputData($result, $command);
- }
-
- return true;
- }
-
- function _convertPackage($packagexml)
- {
- $pkg = &$this->getPackageFile($this->config);
- $pf2 = &$pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL);
- if (!is_a($pf2, 'PEAR_PackageFile_v2')) {
- return $this->raiseError('Cannot process "' .
- $packagexml . '", is not a package.xml 2.0');
- }
-
- require_once 'PEAR/PackageFile/v1.php';
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->config);
- if ($pf2->getPackageType() != 'extsrc' && $pf2->getPackageType() != 'zendextsrc') {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", is not an extension source package. Using a PEAR_PackageFileManager-based ' .
- 'script is an option');
- }
-
- if (is_array($pf2->getUsesRole())) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains custom roles. Using a PEAR_PackageFileManager-based script or ' .
- 'the convert command is an option');
- }
-
- if (is_array($pf2->getUsesTask())) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains custom tasks. Using a PEAR_PackageFileManager-based script or ' .
- 'the convert command is an option');
- }
-
- $deps = $pf2->getDependencies();
- if (isset($deps['group'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains dependency groups. Using a PEAR_PackageFileManager-based script ' .
- 'or the convert command is an option');
- }
-
- if (isset($deps['required']['subpackage']) ||
- isset($deps['optional']['subpackage'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains subpackage dependencies. Using a PEAR_PackageFileManager-based '.
- 'script is an option');
- }
-
- if (isset($deps['required']['os'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains os dependencies. Using a PEAR_PackageFileManager-based '.
- 'script is an option');
- }
-
- if (isset($deps['required']['arch'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains arch dependencies. Using a PEAR_PackageFileManager-based '.
- 'script is an option');
- }
-
- $pf->setPackage($pf2->getPackage());
- $pf->setSummary($pf2->getSummary());
- $pf->setDescription($pf2->getDescription());
- foreach ($pf2->getMaintainers() as $maintainer) {
- $pf->addMaintainer($maintainer['role'], $maintainer['handle'],
- $maintainer['name'], $maintainer['email']);
- }
-
- $pf->setVersion($pf2->getVersion());
- $pf->setDate($pf2->getDate());
- $pf->setLicense($pf2->getLicense());
- $pf->setState($pf2->getState());
- $pf->setNotes($pf2->getNotes());
- $pf->addPhpDep($deps['required']['php']['min'], 'ge');
- if (isset($deps['required']['php']['max'])) {
- $pf->addPhpDep($deps['required']['php']['max'], 'le');
- }
-
- if (isset($deps['required']['package'])) {
- if (!isset($deps['required']['package'][0])) {
- $deps['required']['package'] = array($deps['required']['package']);
- }
-
- foreach ($deps['required']['package'] as $dep) {
- if (!isset($dep['channel'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
- ' contains uri-based dependency on a package. Using a ' .
- 'PEAR_PackageFileManager-based script is an option');
- }
-
- if ($dep['channel'] != 'pear.php.net'
- && $dep['channel'] != 'pecl.php.net'
- && $dep['channel'] != 'doc.php.net') {
- return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
- ' contains dependency on a non-standard channel package. Using a ' .
- 'PEAR_PackageFileManager-based script is an option');
- }
-
- if (isset($dep['conflicts'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
- ' contains conflicts dependency. Using a ' .
- 'PEAR_PackageFileManager-based script is an option');
- }
-
- if (isset($dep['exclude'])) {
- $this->ui->outputData('WARNING: exclude tags are ignored in conversion');
- }
-
- if (isset($dep['min'])) {
- $pf->addPackageDep($dep['name'], $dep['min'], 'ge');
- }
-
- if (isset($dep['max'])) {
- $pf->addPackageDep($dep['name'], $dep['max'], 'le');
- }
- }
- }
-
- if (isset($deps['required']['extension'])) {
- if (!isset($deps['required']['extension'][0])) {
- $deps['required']['extension'] = array($deps['required']['extension']);
- }
-
- foreach ($deps['required']['extension'] as $dep) {
- if (isset($dep['conflicts'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
- ' contains conflicts dependency. Using a ' .
- 'PEAR_PackageFileManager-based script is an option');
- }
-
- if (isset($dep['exclude'])) {
- $this->ui->outputData('WARNING: exclude tags are ignored in conversion');
- }
-
- if (isset($dep['min'])) {
- $pf->addExtensionDep($dep['name'], $dep['min'], 'ge');
- }
-
- if (isset($dep['max'])) {
- $pf->addExtensionDep($dep['name'], $dep['max'], 'le');
- }
- }
- }
-
- if (isset($deps['optional']['package'])) {
- if (!isset($deps['optional']['package'][0])) {
- $deps['optional']['package'] = array($deps['optional']['package']);
- }
-
- foreach ($deps['optional']['package'] as $dep) {
- if (!isset($dep['channel'])) {
- return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
- ' contains uri-based dependency on a package. Using a ' .
- 'PEAR_PackageFileManager-based script is an option');
- }
-
- if ($dep['channel'] != 'pear.php.net'
- && $dep['channel'] != 'pecl.php.net'
- && $dep['channel'] != 'doc.php.net') {
- return $this->raiseError('Cannot safely convert "' . $packagexml . '"' .
- ' contains dependency on a non-standard channel package. Using a ' .
- 'PEAR_PackageFileManager-based script is an option');
- }
-
- if (isset($dep['exclude'])) {
- $this->ui->outputData('WARNING: exclude tags are ignored in conversion');
- }
-
- if (isset($dep['min'])) {
- $pf->addPackageDep($dep['name'], $dep['min'], 'ge', 'yes');
- }
-
- if (isset($dep['max'])) {
- $pf->addPackageDep($dep['name'], $dep['max'], 'le', 'yes');
- }
- }
- }
-
- if (isset($deps['optional']['extension'])) {
- if (!isset($deps['optional']['extension'][0])) {
- $deps['optional']['extension'] = array($deps['optional']['extension']);
- }
-
- foreach ($deps['optional']['extension'] as $dep) {
- if (isset($dep['exclude'])) {
- $this->ui->outputData('WARNING: exclude tags are ignored in conversion');
- }
-
- if (isset($dep['min'])) {
- $pf->addExtensionDep($dep['name'], $dep['min'], 'ge', 'yes');
- }
-
- if (isset($dep['max'])) {
- $pf->addExtensionDep($dep['name'], $dep['max'], 'le', 'yes');
- }
- }
- }
-
- $contents = $pf2->getContents();
- $release = $pf2->getReleases();
- if (isset($releases[0])) {
- return $this->raiseError('Cannot safely process "' . $packagexml . '" contains '
- . 'multiple extsrcrelease/zendextsrcrelease tags. Using a PEAR_PackageFileManager-based script ' .
- 'or the convert command is an option');
- }
-
- if ($configoptions = $pf2->getConfigureOptions()) {
- foreach ($configoptions as $option) {
- $default = isset($option['default']) ? $option['default'] : false;
- $pf->addConfigureOption($option['name'], $option['prompt'], $default);
- }
- }
-
- if (isset($release['filelist']['ignore'])) {
- return $this->raiseError('Cannot safely process "' . $packagexml . '" contains '
- . 'ignore tags. Using a PEAR_PackageFileManager-based script or the convert' .
- ' command is an option');
- }
-
- if (isset($release['filelist']['install']) &&
- !isset($release['filelist']['install'][0])) {
- $release['filelist']['install'] = array($release['filelist']['install']);
- }
-
- if (isset($contents['dir']['attribs']['baseinstalldir'])) {
- $baseinstalldir = $contents['dir']['attribs']['baseinstalldir'];
- } else {
- $baseinstalldir = false;
- }
-
- if (!isset($contents['dir']['file'][0])) {
- $contents['dir']['file'] = array($contents['dir']['file']);
- }
-
- foreach ($contents['dir']['file'] as $file) {
- if ($baseinstalldir && !isset($file['attribs']['baseinstalldir'])) {
- $file['attribs']['baseinstalldir'] = $baseinstalldir;
- }
-
- $processFile = $file;
- unset($processFile['attribs']);
- if (count($processFile)) {
- foreach ($processFile as $name => $task) {
- if ($name != $pf2->getTasksNs() . ':replace') {
- return $this->raiseError('Cannot safely process "' . $packagexml .
- '" contains tasks other than replace. Using a ' .
- 'PEAR_PackageFileManager-based script is an option.');
- }
- $file['attribs']['replace'][] = $task;
- }
- }
-
- if (!in_array($file['attribs']['role'], PEAR_Common::getFileRoles())) {
- return $this->raiseError('Cannot safely convert "' . $packagexml .
- '", contains custom roles. Using a PEAR_PackageFileManager-based script ' .
- 'or the convert command is an option');
- }
-
- if (isset($release['filelist']['install'])) {
- foreach ($release['filelist']['install'] as $installas) {
- if ($installas['attribs']['name'] == $file['attribs']['name']) {
- $file['attribs']['install-as'] = $installas['attribs']['as'];
- }
- }
- }
-
- $pf->addFile('/', $file['attribs']['name'], $file['attribs']);
- }
-
- if ($pf2->getChangeLog()) {
- $this->ui->outputData('WARNING: changelog is not translated to package.xml ' .
- '1.0, use PEAR_PackageFileManager-based script if you need changelog-' .
- 'translation for package.xml 1.0');
- }
-
- $gen = &$pf->getDefaultGenerator();
- $gen->toPackageFile('.');
- }
-}
-
- <list>
- <summary>List Installed Packages In The Default Channel</summary>
- <function>doList</function>
- <shortcut>l</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>list installed packages from this channel</doc>
- <arg>CHAN</arg>
- </channel>
- <allchannels>
- <shortopt>a</shortopt>
- <doc>list installed packages from all channels</doc>
- </allchannels>
- <channelinfo>
- <shortopt>i</shortopt>
- <doc>output fully channel-aware data, even on failure</doc>
- </channelinfo>
- </options>
- <doc>&lt;package&gt;
-If invoked without parameters, this command lists the PEAR packages
-installed in your php_dir ({config php_dir}). With a parameter, it
-lists the files in a package.
-</doc>
- </list>
- <list-files>
- <summary>List Files In Installed Package</summary>
- <function>doFileList</function>
- <shortcut>fl</shortcut>
- <options />
- <doc>&lt;package&gt;
-List the files in an installed package.
-</doc>
- </list-files>
- <shell-test>
- <summary>Shell Script Test</summary>
- <function>doShellTest</function>
- <shortcut>st</shortcut>
- <options />
- <doc>&lt;package&gt; [[relation] version]
-Tests if a package is installed in the system. Will exit(1) if it is not.
- &lt;relation&gt; The version comparison operator. One of:
- &lt;, lt, &lt;=, le, &gt;, gt, &gt;=, ge, ==, =, eq, !=, &lt;&gt;, ne
- &lt;version&gt; The version to compare with
-</doc>
- </shell-test>
- <info>
- <summary>Display information about a package</summary>
- <function>doInfo</function>
- <shortcut>in</shortcut>
- <options />
- <doc>&lt;package&gt;
-Displays information about a package. The package argument may be a
-local package file, an URL to a package file, or the name of an
-installed package.</doc>
- </info>
-</commands>
-/**
- * PEAR_Command_Registry (list, list-files, shell-test, info commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for registry manipulation
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Registry extends PEAR_Command_Common
-{
- var $commands = array(
- 'list' => array(
- 'summary' => 'List Installed Packages In The Default Channel',
- 'function' => 'doList',
- 'shortcut' => 'l',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'list installed packages from this channel',
- 'arg' => 'CHAN',
- ),
- 'allchannels' => array(
- 'shortopt' => 'a',
- 'doc' => 'list installed packages from all channels',
- ),
- 'channelinfo' => array(
- 'shortopt' => 'i',
- 'doc' => 'output fully channel-aware data, even on failure',
- ),
- ),
- 'doc' => '<package>
-If invoked without parameters, this command lists the PEAR packages
-installed in your php_dir ({config php_dir}). With a parameter, it
-lists the files in a package.
-',
- ),
- 'list-files' => array(
- 'summary' => 'List Files In Installed Package',
- 'function' => 'doFileList',
- 'shortcut' => 'fl',
- 'options' => array(),
- 'doc' => '<package>
-List the files in an installed package.
-'
- ),
- 'shell-test' => array(
- 'summary' => 'Shell Script Test',
- 'function' => 'doShellTest',
- 'shortcut' => 'st',
- 'options' => array(),
- 'doc' => '<package> [[relation] version]
-Tests if a package is installed in the system. Will exit(1) if it is not.
- <relation> The version comparison operator. One of:
- <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne
- <version> The version to compare with
-'),
- 'info' => array(
- 'summary' => 'Display information about a package',
- 'function' => 'doInfo',
- 'shortcut' => 'in',
- 'options' => array(),
- 'doc' => '<package>
-Displays information about a package. The package argument may be a
-local package file, an URL to a package file, or the name of an
-installed package.'
- )
- );
-
- /**
- * PEAR_Command_Registry constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function _sortinfo($a, $b)
- {
- $apackage = isset($a['package']) ? $a['package'] : $a['name'];
- $bpackage = isset($b['package']) ? $b['package'] : $b['name'];
- return strcmp($apackage, $bpackage);
- }
-
- function doList($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
- $channelinfo = isset($options['channelinfo']);
- if (isset($options['allchannels']) && !$channelinfo) {
- return $this->doListAll($command, array(), $params);
- }
-
- if (isset($options['allchannels']) && $channelinfo) {
- // allchannels with $channelinfo
- unset($options['allchannels']);
- $channels = $reg->getChannels();
- $errors = array();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($channels as $channel) {
- $options['channel'] = $channel->getName();
- $ret = $this->doList($command, $options, $params);
-
- if (PEAR::isError($ret)) {
- $errors[] = $ret;
- }
- }
-
- PEAR::staticPopErrorHandling();
- if (count($errors)) {
- // for now, only give first error
- return PEAR::raiseError($errors[0]);
- }
-
- return true;
- }
-
- if (count($params) === 1) {
- return $this->doFileList($command, $options, $params);
- }
-
- if (isset($options['channel'])) {
- if (!$reg->channelExists($options['channel'])) {
- return $this->raiseError('Channel "' . $options['channel'] .'" does not exist');
- }
-
- $channel = $reg->channelName($options['channel']);
- } else {
- $channel = $this->config->get('default_channel');
- }
-
- $installed = $reg->packageInfo(null, null, $channel);
- usort($installed, array(&$this, '_sortinfo'));
-
- $data = array(
- 'caption' => 'Installed packages, channel ' .
- $channel . ':',
- 'border' => true,
- 'headline' => array('Package', 'Version', 'State'),
- 'channel' => $channel,
- );
- if ($channelinfo) {
- $data['headline'] = array('Channel', 'Package', 'Version', 'State');
- }
-
- if (count($installed) && !isset($data['data'])) {
- $data['data'] = array();
- }
-
- foreach ($installed as $package) {
- $pobj = $reg->getPackage(isset($package['package']) ?
- $package['package'] : $package['name'], $channel);
- if ($channelinfo) {
- $packageinfo = array($pobj->getChannel(), $pobj->getPackage(), $pobj->getVersion(),
- $pobj->getState() ? $pobj->getState() : null);
- } else {
- $packageinfo = array($pobj->getPackage(), $pobj->getVersion(),
- $pobj->getState() ? $pobj->getState() : null);
- }
- $data['data'][] = $packageinfo;
- }
-
- if (count($installed) === 0) {
- if (!$channelinfo) {
- $data = '(no packages installed from channel ' . $channel . ')';
- } else {
- $data = array(
- 'caption' => 'Installed packages, channel ' .
- $channel . ':',
- 'border' => true,
- 'channel' => $channel,
- 'data' => array(array('(no packages installed)')),
- );
- }
- }
-
- $this->ui->outputData($data, $command);
- return true;
- }
-
- function doListAll($command, $options, $params)
- {
- // This duplicate code is deprecated over
- // list --channelinfo, which gives identical
- // output for list and list --allchannels.
- $reg = &$this->config->getRegistry();
- $installed = $reg->packageInfo(null, null, null);
- foreach ($installed as $channel => $packages) {
- usort($packages, array($this, '_sortinfo'));
- $data = array(
- 'caption' => 'Installed packages, channel ' . $channel . ':',
- 'border' => true,
- 'headline' => array('Package', 'Version', 'State'),
- 'channel' => $channel
- );
-
- foreach ($packages as $package) {
- $p = isset($package['package']) ? $package['package'] : $package['name'];
- $pobj = $reg->getPackage($p, $channel);
- $data['data'][] = array($pobj->getPackage(), $pobj->getVersion(),
- $pobj->getState() ? $pobj->getState() : null);
- }
-
- // Adds a blank line after each section
- $data['data'][] = array();
-
- if (count($packages) === 0) {
- $data = array(
- 'caption' => 'Installed packages, channel ' . $channel . ':',
- 'border' => true,
- 'data' => array(array('(no packages installed)'), array()),
- 'channel' => $channel
- );
- }
- $this->ui->outputData($data, $command);
- }
- return true;
- }
-
- function doFileList($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError('list-files expects 1 parameter');
- }
-
- $reg = &$this->config->getRegistry();
- $fp = false;
- if (!is_dir($params[0]) && (file_exists($params[0]) || $fp = @fopen($params[0], 'r'))) {
- if ($fp) {
- fclose($fp);
- }
-
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
-
- $pkg = new PEAR_PackageFile($this->config, $this->_debug);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $info = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL);
- PEAR::staticPopErrorHandling();
- $headings = array('Package File', 'Install Path');
- $installed = false;
- } else {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel'));
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($parsed)) {
- return $this->raiseError($parsed);
- }
-
- $info = &$reg->getPackage($parsed['package'], $parsed['channel']);
- $headings = array('Type', 'Install Path');
- $installed = true;
- }
-
- if (PEAR::isError($info)) {
- return $this->raiseError($info);
- }
-
- if ($info === null) {
- return $this->raiseError("`$params[0]' not installed");
- }
-
- $list = ($info->getPackagexmlVersion() == '1.0' || $installed) ?
- $info->getFilelist() : $info->getContents();
- if ($installed) {
- $caption = 'Installed Files For ' . $params[0];
- } else {
- $caption = 'Contents of ' . basename($params[0]);
- }
-
- $data = array(
- 'caption' => $caption,
- 'border' => true,
- 'headline' => $headings);
- if ($info->getPackagexmlVersion() == '1.0' || $installed) {
- foreach ($list as $file => $att) {
- if ($installed) {
- if (empty($att['installed_as'])) {
- continue;
- }
- $data['data'][] = array($att['role'], $att['installed_as']);
- } else {
- if (isset($att['baseinstalldir']) && !in_array($att['role'],
- array('test', 'data', 'doc'))) {
- $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR .
- $file;
- } else {
- $dest = $file;
- }
- switch ($att['role']) {
- case 'test':
- case 'data':
- case 'doc':
- $role = $att['role'];
- if ($role == 'test') {
- $role .= 's';
- }
- $dest = $this->config->get($role . '_dir') . DIRECTORY_SEPARATOR .
- $info->getPackage() . DIRECTORY_SEPARATOR . $dest;
- break;
- case 'php':
- default:
- $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR .
- $dest;
- }
- $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
- $dest = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"),
- array(DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR),
- $dest);
- $file = preg_replace('!/+!', '/', $file);
- $data['data'][] = array($file, $dest);
- }
- }
- } else { // package.xml 2.0, not installed
- if (!isset($list['dir']['file'][0])) {
- $list['dir']['file'] = array($list['dir']['file']);
- }
-
- foreach ($list['dir']['file'] as $att) {
- $att = $att['attribs'];
- $file = $att['name'];
- $role = &PEAR_Installer_Role::factory($info, $att['role'], $this->config);
- $role->setup($this, $info, $att, $file);
- if (!$role->isInstallable()) {
- $dest = '(not installable)';
- } else {
- $dest = $role->processInstallation($info, $att, $file, '');
- if (PEAR::isError($dest)) {
- $dest = '(Unknown role "' . $att['role'] . ')';
- } else {
- list(,, $dest) = $dest;
- }
- }
- $data['data'][] = array($file, $dest);
- }
- }
-
- $this->ui->outputData($data, $command);
- return true;
- }
-
- function doShellTest($command, $options, $params)
- {
- if (count($params) < 1) {
- return PEAR::raiseError('ERROR, usage: pear shell-test packagename [[relation] version]');
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $reg = &$this->config->getRegistry();
- $info = $reg->parsePackageName($params[0], $this->config->get('default_channel'));
- if (PEAR::isError($info)) {
- exit(1); // invalid package name
- }
-
- $package = $info['package'];
- $channel = $info['channel'];
- // "pear shell-test Foo"
- if (!$reg->packageExists($package, $channel)) {
- if ($channel == 'pecl.php.net') {
- if ($reg->packageExists($package, 'pear.php.net')) {
- $channel = 'pear.php.net'; // magically change channels for extensions
- }
- }
- }
-
- if (count($params) === 1) {
- if (!$reg->packageExists($package, $channel)) {
- exit(1);
- }
- // "pear shell-test Foo 1.0"
- } elseif (count($params) === 2) {
- $v = $reg->packageInfo($package, 'version', $channel);
- if (!$v || !version_compare("$v", "{$params[1]}", "ge")) {
- exit(1);
- }
- // "pear shell-test Foo ge 1.0"
- } elseif (count($params) === 3) {
- $v = $reg->packageInfo($package, 'version', $channel);
- if (!$v || !version_compare("$v", "{$params[2]}", $params[1])) {
- exit(1);
- }
- } else {
- PEAR::staticPopErrorHandling();
- $this->raiseError("$command: expects 1 to 3 parameters");
- exit(1);
- }
- }
-
- function doInfo($command, $options, $params)
- {
- if (count($params) !== 1) {
- return $this->raiseError('pear info expects 1 parameter');
- }
-
- $info = $fp = false;
- $reg = &$this->config->getRegistry();
- if (is_file($params[0]) && !is_dir($params[0]) &&
- (file_exists($params[0]) || $fp = @fopen($params[0], 'r'))
- ) {
- if ($fp) {
- fclose($fp);
- }
-
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
-
- $pkg = new PEAR_PackageFile($this->config, $this->_debug);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $obj = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($obj)) {
- $uinfo = $obj->getUserInfo();
- if (is_array($uinfo)) {
- foreach ($uinfo as $message) {
- if (is_array($message)) {
- $message = $message['message'];
- }
- $this->ui->outputData($message);
- }
- }
-
- return $this->raiseError($obj);
- }
-
- if ($obj->getPackagexmlVersion() != '1.0') {
- return $this->_doInfo2($command, $options, $params, $obj, false);
- }
-
- $info = $obj->toArray();
- } else {
- $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel'));
- if (PEAR::isError($parsed)) {
- return $this->raiseError($parsed);
- }
-
- $package = $parsed['package'];
- $channel = $parsed['channel'];
- $info = $reg->packageInfo($package, null, $channel);
- if (isset($info['old'])) {
- $obj = $reg->getPackage($package, $channel);
- return $this->_doInfo2($command, $options, $params, $obj, true);
- }
- }
-
- if (PEAR::isError($info)) {
- return $info;
- }
-
- if (empty($info)) {
- $this->raiseError("No information found for `$params[0]'");
- return;
- }
-
- unset($info['filelist']);
- unset($info['dirtree']);
- unset($info['changelog']);
- if (isset($info['xsdversion'])) {
- $info['package.xml version'] = $info['xsdversion'];
- unset($info['xsdversion']);
- }
-
- if (isset($info['packagerversion'])) {
- $info['packaged with PEAR version'] = $info['packagerversion'];
- unset($info['packagerversion']);
- }
-
- $keys = array_keys($info);
- $longtext = array('description', 'summary');
- foreach ($keys as $key) {
- if (is_array($info[$key])) {
- switch ($key) {
- case 'maintainers': {
- $i = 0;
- $mstr = '';
- foreach ($info[$key] as $m) {
- if ($i++ > 0) {
- $mstr .= "\n";
- }
- $mstr .= $m['name'] . " <";
- if (isset($m['email'])) {
- $mstr .= $m['email'];
- } else {
- $mstr .= $m['handle'] . '@php.net';
- }
- $mstr .= "> ($m[role])";
- }
- $info[$key] = $mstr;
- break;
- }
- case 'release_deps': {
- $i = 0;
- $dstr = '';
- foreach ($info[$key] as $d) {
- if (isset($this->_deps_rel_trans[$d['rel']])) {
- $rel = $this->_deps_rel_trans[$d['rel']];
- } else {
- $rel = $d['rel'];
- }
- if (isset($this->_deps_type_trans[$d['type']])) {
- $type = ucfirst($this->_deps_type_trans[$d['type']]);
- } else {
- $type = $d['type'];
- }
- if (isset($d['name'])) {
- $name = $d['name'] . ' ';
- } else {
- $name = '';
- }
- if (isset($d['version'])) {
- $version = $d['version'] . ' ';
- } else {
- $version = '';
- }
- if (isset($d['optional']) && $d['optional'] == 'yes') {
- $optional = ' (optional)';
- } else {
- $optional = '';
- }
- $dstr .= "$type $name$rel $version$optional\n";
- }
- $info[$key] = $dstr;
- break;
- }
- case 'provides' : {
- $debug = $this->config->get('verbose');
- if ($debug < 2) {
- $pstr = 'Classes: ';
- } else {
- $pstr = '';
- }
- $i = 0;
- foreach ($info[$key] as $p) {
- if ($debug < 2 && $p['type'] != "class") {
- continue;
- }
- // Only print classes when verbosity mode is < 2
- if ($debug < 2) {
- if ($i++ > 0) {
- $pstr .= ", ";
- }
- $pstr .= $p['name'];
- } else {
- if ($i++ > 0) {
- $pstr .= "\n";
- }
- $pstr .= ucfirst($p['type']) . " " . $p['name'];
- if (isset($p['explicit']) && $p['explicit'] == 1) {
- $pstr .= " (explicit)";
- }
- }
- }
- $info[$key] = $pstr;
- break;
- }
- case 'configure_options' : {
- foreach ($info[$key] as $i => $p) {
- $info[$key][$i] = array_map(null, array_keys($p), array_values($p));
- $info[$key][$i] = array_map(create_function('$a',
- 'return join(" = ",$a);'), $info[$key][$i]);
- $info[$key][$i] = implode(', ', $info[$key][$i]);
- }
- $info[$key] = implode("\n", $info[$key]);
- break;
- }
- default: {
- $info[$key] = implode(", ", $info[$key]);
- break;
- }
- }
- }
-
- if ($key == '_lastmodified') {
- $hdate = date('Y-m-d', $info[$key]);
- unset($info[$key]);
- $info['Last Modified'] = $hdate;
- } elseif ($key == '_lastversion') {
- $info['Previous Installed Version'] = $info[$key] ? $info[$key] : '- None -';
- unset($info[$key]);
- } else {
- $info[$key] = trim($info[$key]);
- if (in_array($key, $longtext)) {
- $info[$key] = preg_replace('/ +/', ' ', $info[$key]);
- }
- }
- }
-
- $caption = 'About ' . $info['package'] . '-' . $info['version'];
- $data = array(
- 'caption' => $caption,
- 'border' => true);
- foreach ($info as $key => $value) {
- $key = ucwords(trim(str_replace('_', ' ', $key)));
- $data['data'][] = array($key, $value);
- }
- $data['raw'] = $info;
-
- $this->ui->outputData($data, 'package-info');
- }
-
- /**
- * @access private
- */
- function _doInfo2($command, $options, $params, &$obj, $installed)
- {
- $reg = &$this->config->getRegistry();
- $caption = 'About ' . $obj->getChannel() . '/' .$obj->getPackage() . '-' .
- $obj->getVersion();
- $data = array(
- 'caption' => $caption,
- 'border' => true);
- switch ($obj->getPackageType()) {
- case 'php' :
- $release = 'PEAR-style PHP-based Package';
- break;
- case 'extsrc' :
- $release = 'PECL-style PHP extension (source code)';
- break;
- case 'zendextsrc' :
- $release = 'PECL-style Zend extension (source code)';
- break;
- case 'extbin' :
- $release = 'PECL-style PHP extension (binary)';
- break;
- case 'zendextbin' :
- $release = 'PECL-style Zend extension (binary)';
- break;
- case 'bundle' :
- $release = 'Package bundle (collection of packages)';
- break;
- }
- $extends = $obj->getExtends();
- $extends = $extends ?
- $obj->getPackage() . ' (extends ' . $extends . ')' : $obj->getPackage();
- if ($src = $obj->getSourcePackage()) {
- $extends .= ' (source package ' . $src['channel'] . '/' . $src['package'] . ')';
- }
-
- $info = array(
- 'Release Type' => $release,
- 'Name' => $extends,
- 'Channel' => $obj->getChannel(),
- 'Summary' => preg_replace('/ +/', ' ', $obj->getSummary()),
- 'Description' => preg_replace('/ +/', ' ', $obj->getDescription()),
- );
- $info['Maintainers'] = '';
- foreach (array('lead', 'developer', 'contributor', 'helper') as $role) {
- $leads = $obj->{"get{$role}s"}();
- if (!$leads) {
- continue;
- }
-
- if (isset($leads['active'])) {
- $leads = array($leads);
- }
-
- foreach ($leads as $lead) {
- if (!empty($info['Maintainers'])) {
- $info['Maintainers'] .= "\n";
- }
-
- $active = $lead['active'] == 'no' ? ', inactive' : '';
- $info['Maintainers'] .= $lead['name'] . ' <';
- $info['Maintainers'] .= $lead['email'] . "> ($role$active)";
- }
- }
-
- $info['Release Date'] = $obj->getDate();
- if ($time = $obj->getTime()) {
- $info['Release Date'] .= ' ' . $time;
- }
-
- $info['Release Version'] = $obj->getVersion() . ' (' . $obj->getState() . ')';
- $info['API Version'] = $obj->getVersion('api') . ' (' . $obj->getState('api') . ')';
- $info['License'] = $obj->getLicense();
- $uri = $obj->getLicenseLocation();
- if ($uri) {
- if (isset($uri['uri'])) {
- $info['License'] .= ' (' . $uri['uri'] . ')';
- } else {
- $extra = $obj->getInstalledLocation($info['filesource']);
- if ($extra) {
- $info['License'] .= ' (' . $uri['filesource'] . ')';
- }
- }
- }
-
- $info['Release Notes'] = $obj->getNotes();
- if ($compat = $obj->getCompatible()) {
- if (!isset($compat[0])) {
- $compat = array($compat);
- }
-
- $info['Compatible with'] = '';
- foreach ($compat as $package) {
- $info['Compatible with'] .= $package['channel'] . '/' . $package['name'] .
- "\nVersions >= " . $package['min'] . ', <= ' . $package['max'];
- if (isset($package['exclude'])) {
- if (is_array($package['exclude'])) {
- $package['exclude'] = implode(', ', $package['exclude']);
- }
-
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
- $info['Not Compatible with'] .= $package['channel'] . '/' .
- $package['name'] . "\nVersions " . $package['exclude'];
- }
- }
- }
-
- $usesrole = $obj->getUsesrole();
- if ($usesrole) {
- if (!isset($usesrole[0])) {
- $usesrole = array($usesrole);
- }
-
- foreach ($usesrole as $roledata) {
- if (isset($info['Uses Custom Roles'])) {
- $info['Uses Custom Roles'] .= "\n";
- } else {
- $info['Uses Custom Roles'] = '';
- }
-
- if (isset($roledata['package'])) {
- $rolepackage = $reg->parsedPackageNameToString($roledata, true);
- } else {
- $rolepackage = $roledata['uri'];
- }
- $info['Uses Custom Roles'] .= $roledata['role'] . ' (' . $rolepackage . ')';
- }
- }
-
- $usestask = $obj->getUsestask();
- if ($usestask) {
- if (!isset($usestask[0])) {
- $usestask = array($usestask);
- }
-
- foreach ($usestask as $taskdata) {
- if (isset($info['Uses Custom Tasks'])) {
- $info['Uses Custom Tasks'] .= "\n";
- } else {
- $info['Uses Custom Tasks'] = '';
- }
-
- if (isset($taskdata['package'])) {
- $taskpackage = $reg->parsedPackageNameToString($taskdata, true);
- } else {
- $taskpackage = $taskdata['uri'];
- }
- $info['Uses Custom Tasks'] .= $taskdata['task'] . ' (' . $taskpackage . ')';
- }
- }
-
- $deps = $obj->getDependencies();
- $info['Required Dependencies'] = 'PHP version ' . $deps['required']['php']['min'];
- if (isset($deps['required']['php']['max'])) {
- $info['Required Dependencies'] .= '-' . $deps['required']['php']['max'] . "\n";
- } else {
- $info['Required Dependencies'] .= "\n";
- }
-
- if (isset($deps['required']['php']['exclude'])) {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
-
- if (is_array($deps['required']['php']['exclude'])) {
- $deps['required']['php']['exclude'] =
- implode(', ', $deps['required']['php']['exclude']);
- }
- $info['Not Compatible with'] .= "PHP versions\n " .
- $deps['required']['php']['exclude'];
- }
-
- $info['Required Dependencies'] .= 'PEAR installer version';
- if (isset($deps['required']['pearinstaller']['max'])) {
- $info['Required Dependencies'] .= 's ' .
- $deps['required']['pearinstaller']['min'] . '-' .
- $deps['required']['pearinstaller']['max'];
- } else {
- $info['Required Dependencies'] .= ' ' .
- $deps['required']['pearinstaller']['min'] . ' or newer';
- }
-
- if (isset($deps['required']['pearinstaller']['exclude'])) {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
-
- if (is_array($deps['required']['pearinstaller']['exclude'])) {
- $deps['required']['pearinstaller']['exclude'] =
- implode(', ', $deps['required']['pearinstaller']['exclude']);
- }
- $info['Not Compatible with'] .= "PEAR installer\n Versions " .
- $deps['required']['pearinstaller']['exclude'];
- }
-
- foreach (array('Package', 'Extension') as $type) {
- $index = strtolower($type);
- if (isset($deps['required'][$index])) {
- if (isset($deps['required'][$index]['name'])) {
- $deps['required'][$index] = array($deps['required'][$index]);
- }
-
- foreach ($deps['required'][$index] as $package) {
- if (isset($package['conflicts'])) {
- $infoindex = 'Not Compatible with';
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
- } else {
- $infoindex = 'Required Dependencies';
- $info[$infoindex] .= "\n";
- }
-
- if ($index == 'extension') {
- $name = $package['name'];
- } else {
- if (isset($package['channel'])) {
- $name = $package['channel'] . '/' . $package['name'];
- } else {
- $name = '__uri/' . $package['name'] . ' (static URI)';
- }
- }
-
- $info[$infoindex] .= "$type $name";
- if (isset($package['uri'])) {
- $info[$infoindex] .= "\n Download URI: $package[uri]";
- continue;
- }
-
- if (isset($package['max']) && isset($package['min'])) {
- $info[$infoindex] .= " \n Versions " .
- $package['min'] . '-' . $package['max'];
- } elseif (isset($package['min'])) {
- $info[$infoindex] .= " \n Version " .
- $package['min'] . ' or newer';
- } elseif (isset($package['max'])) {
- $info[$infoindex] .= " \n Version " .
- $package['max'] . ' or older';
- }
-
- if (isset($package['recommended'])) {
- $info[$infoindex] .= "\n Recommended version: $package[recommended]";
- }
-
- if (isset($package['exclude'])) {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
-
- if (is_array($package['exclude'])) {
- $package['exclude'] = implode(', ', $package['exclude']);
- }
-
- $package['package'] = $package['name']; // for parsedPackageNameToString
- if (isset($package['conflicts'])) {
- $info['Not Compatible with'] .= '=> except ';
- }
- $info['Not Compatible with'] .= 'Package ' .
- $reg->parsedPackageNameToString($package, true);
- $info['Not Compatible with'] .= "\n Versions " . $package['exclude'];
- }
- }
- }
- }
-
- if (isset($deps['required']['os'])) {
- if (isset($deps['required']['os']['name'])) {
- $dep['required']['os']['name'] = array($dep['required']['os']['name']);
- }
-
- foreach ($dep['required']['os'] as $os) {
- if (isset($os['conflicts']) && $os['conflicts'] == 'yes') {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
- $info['Not Compatible with'] .= "$os[name] Operating System";
- } else {
- $info['Required Dependencies'] .= "\n";
- $info['Required Dependencies'] .= "$os[name] Operating System";
- }
- }
- }
-
- if (isset($deps['required']['arch'])) {
- if (isset($deps['required']['arch']['pattern'])) {
- $dep['required']['arch']['pattern'] = array($dep['required']['os']['pattern']);
- }
-
- foreach ($dep['required']['arch'] as $os) {
- if (isset($os['conflicts']) && $os['conflicts'] == 'yes') {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
- $info['Not Compatible with'] .= "OS/Arch matching pattern '/$os[pattern]/'";
- } else {
- $info['Required Dependencies'] .= "\n";
- $info['Required Dependencies'] .= "OS/Arch matching pattern '/$os[pattern]/'";
- }
- }
- }
-
- if (isset($deps['optional'])) {
- foreach (array('Package', 'Extension') as $type) {
- $index = strtolower($type);
- if (isset($deps['optional'][$index])) {
- if (isset($deps['optional'][$index]['name'])) {
- $deps['optional'][$index] = array($deps['optional'][$index]);
- }
-
- foreach ($deps['optional'][$index] as $package) {
- if (isset($package['conflicts']) && $package['conflicts'] == 'yes') {
- $infoindex = 'Not Compatible with';
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
- } else {
- $infoindex = 'Optional Dependencies';
- if (!isset($info['Optional Dependencies'])) {
- $info['Optional Dependencies'] = '';
- } else {
- $info['Optional Dependencies'] .= "\n";
- }
- }
-
- if ($index == 'extension') {
- $name = $package['name'];
- } else {
- if (isset($package['channel'])) {
- $name = $package['channel'] . '/' . $package['name'];
- } else {
- $name = '__uri/' . $package['name'] . ' (static URI)';
- }
- }
-
- $info[$infoindex] .= "$type $name";
- if (isset($package['uri'])) {
- $info[$infoindex] .= "\n Download URI: $package[uri]";
- continue;
- }
-
- if ($infoindex == 'Not Compatible with') {
- // conflicts is only used to say that all versions conflict
- continue;
- }
-
- if (isset($package['max']) && isset($package['min'])) {
- $info[$infoindex] .= " \n Versions " .
- $package['min'] . '-' . $package['max'];
- } elseif (isset($package['min'])) {
- $info[$infoindex] .= " \n Version " .
- $package['min'] . ' or newer';
- } elseif (isset($package['max'])) {
- $info[$infoindex] .= " \n Version " .
- $package['min'] . ' or older';
- }
-
- if (isset($package['recommended'])) {
- $info[$infoindex] .= "\n Recommended version: $package[recommended]";
- }
-
- if (isset($package['exclude'])) {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info['Not Compatible with'] .= "\n";
- }
-
- if (is_array($package['exclude'])) {
- $package['exclude'] = implode(', ', $package['exclude']);
- }
-
- $info['Not Compatible with'] .= "Package $package\n Versions " .
- $package['exclude'];
- }
- }
- }
- }
- }
-
- if (isset($deps['group'])) {
- if (!isset($deps['group'][0])) {
- $deps['group'] = array($deps['group']);
- }
-
- foreach ($deps['group'] as $group) {
- $info['Dependency Group ' . $group['attribs']['name']] = $group['attribs']['hint'];
- $groupindex = $group['attribs']['name'] . ' Contents';
- $info[$groupindex] = '';
- foreach (array('Package', 'Extension') as $type) {
- $index = strtolower($type);
- if (isset($group[$index])) {
- if (isset($group[$index]['name'])) {
- $group[$index] = array($group[$index]);
- }
-
- foreach ($group[$index] as $package) {
- if (!empty($info[$groupindex])) {
- $info[$groupindex] .= "\n";
- }
-
- if ($index == 'extension') {
- $name = $package['name'];
- } else {
- if (isset($package['channel'])) {
- $name = $package['channel'] . '/' . $package['name'];
- } else {
- $name = '__uri/' . $package['name'] . ' (static URI)';
- }
- }
-
- if (isset($package['uri'])) {
- if (isset($package['conflicts']) && $package['conflicts'] == 'yes') {
- $info[$groupindex] .= "Not Compatible with $type $name";
- } else {
- $info[$groupindex] .= "$type $name";
- }
-
- $info[$groupindex] .= "\n Download URI: $package[uri]";
- continue;
- }
-
- if (isset($package['conflicts']) && $package['conflicts'] == 'yes') {
- $info[$groupindex] .= "Not Compatible with $type $name";
- continue;
- }
-
- $info[$groupindex] .= "$type $name";
- if (isset($package['max']) && isset($package['min'])) {
- $info[$groupindex] .= " \n Versions " .
- $package['min'] . '-' . $package['max'];
- } elseif (isset($package['min'])) {
- $info[$groupindex] .= " \n Version " .
- $package['min'] . ' or newer';
- } elseif (isset($package['max'])) {
- $info[$groupindex] .= " \n Version " .
- $package['min'] . ' or older';
- }
-
- if (isset($package['recommended'])) {
- $info[$groupindex] .= "\n Recommended version: $package[recommended]";
- }
-
- if (isset($package['exclude'])) {
- if (!isset($info['Not Compatible with'])) {
- $info['Not Compatible with'] = '';
- } else {
- $info[$groupindex] .= "Not Compatible with\n";
- }
-
- if (is_array($package['exclude'])) {
- $package['exclude'] = implode(', ', $package['exclude']);
- }
- $info[$groupindex] .= " Package $package\n Versions " .
- $package['exclude'];
- }
- }
- }
- }
- }
- }
-
- if ($obj->getPackageType() == 'bundle') {
- $info['Bundled Packages'] = '';
- foreach ($obj->getBundledPackages() as $package) {
- if (!empty($info['Bundled Packages'])) {
- $info['Bundled Packages'] .= "\n";
- }
-
- if (isset($package['uri'])) {
- $info['Bundled Packages'] .= '__uri/' . $package['name'];
- $info['Bundled Packages'] .= "\n (URI: $package[uri]";
- } else {
- $info['Bundled Packages'] .= $package['channel'] . '/' . $package['name'];
- }
- }
- }
-
- $info['package.xml version'] = '2.0';
- if ($installed) {
- if ($obj->getLastModified()) {
- $info['Last Modified'] = date('Y-m-d H:i', $obj->getLastModified());
- }
-
- $v = $obj->getLastInstalledVersion();
- $info['Previous Installed Version'] = $v ? $v : '- None -';
- }
-
- foreach ($info as $key => $value) {
- $data['data'][] = array($key, $value);
- }
-
- $data['raw'] = $obj->getArray(); // no validation needed
- $this->ui->outputData($data, 'package-info');
- }
-}
-
- <remote-info>
- <summary>Information About Remote Packages</summary>
- <function>doRemoteInfo</function>
- <shortcut>ri</shortcut>
- <options />
- <doc>&lt;package&gt;
-Get details on a package from the server.</doc>
- </remote-info>
- <list-upgrades>
- <summary>List Available Upgrades</summary>
- <function>doListUpgrades</function>
- <shortcut>lu</shortcut>
- <options>
- <channelinfo>
- <shortopt>i</shortopt>
- <doc>output fully channel-aware data, even on failure</doc>
- </channelinfo>
- </options>
- <doc>[preferred_state]
-List releases on the server of packages you have installed where
-a newer version is available with the same release state (stable etc.)
-or the state passed as the second parameter.</doc>
- </list-upgrades>
- <remote-list>
- <summary>List Remote Packages</summary>
- <function>doRemoteList</function>
- <shortcut>rl</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>specify a channel other than the default channel</doc>
- <arg>CHAN</arg>
- </channel>
- </options>
- <doc>
-Lists the packages available on the configured server along with the
-latest stable release of each package.</doc>
- </remote-list>
- <search>
- <summary>Search remote package database</summary>
- <function>doSearch</function>
- <shortcut>sp</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>specify a channel other than the default channel</doc>
- <arg>CHAN</arg>
- </channel>
- <allchannels>
- <shortopt>a</shortopt>
- <doc>search packages from all known channels</doc>
- </allchannels>
- <channelinfo>
- <shortopt>i</shortopt>
- <doc>output fully channel-aware data, even on failure</doc>
- </channelinfo>
- </options>
- <doc>[packagename] [packageinfo]
-Lists all packages which match the search parameters. The first
-parameter is a fragment of a packagename. The default channel
-will be used unless explicitly overridden. The second parameter
-will be used to match any portion of the summary/description</doc>
- </search>
- <list-all>
- <summary>List All Packages</summary>
- <function>doListAll</function>
- <shortcut>la</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>specify a channel other than the default channel</doc>
- <arg>CHAN</arg>
- </channel>
- <channelinfo>
- <shortopt>i</shortopt>
- <doc>output fully channel-aware data, even on failure</doc>
- </channelinfo>
- </options>
- <doc>
-Lists the packages available on the configured server along with the
-latest stable release of each package.</doc>
- </list-all>
- <download>
- <summary>Download Package</summary>
- <function>doDownload</function>
- <shortcut>d</shortcut>
- <options>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>download an uncompressed (.tar) file</doc>
- </nocompress>
- </options>
- <doc>&lt;package&gt;...
-Download package tarballs. The files will be named as suggested by the
-server, for example if you download the DB package and the latest stable
-version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.</doc>
- </download>
- <clear-cache>
- <summary>Clear Web Services Cache</summary>
- <function>doClearCache</function>
- <shortcut>cc</shortcut>
- <options />
- <doc>
-Clear the XML-RPC/REST cache. See also the cache_ttl configuration
-parameter.
-</doc>
- </clear-cache>
-</commands>
-/**
- * PEAR_Command_Remote (remote-info, list-upgrades, remote-list, search, list-all, download,
- * clear-cache commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-require_once 'PEAR/REST.php';
-
-/**
- * PEAR commands for remote server querying
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Remote extends PEAR_Command_Common
-{
- var $commands = array(
- 'remote-info' => array(
- 'summary' => 'Information About Remote Packages',
- 'function' => 'doRemoteInfo',
- 'shortcut' => 'ri',
- 'options' => array(),
- 'doc' => '<package>
-Get details on a package from the server.',
- ),
- 'list-upgrades' => array(
- 'summary' => 'List Available Upgrades',
- 'function' => 'doListUpgrades',
- 'shortcut' => 'lu',
- 'options' => array(
- 'channelinfo' => array(
- 'shortopt' => 'i',
- 'doc' => 'output fully channel-aware data, even on failure',
- ),
- ),
- 'doc' => '[preferred_state]
-List releases on the server of packages you have installed where
-a newer version is available with the same release state (stable etc.)
-or the state passed as the second parameter.'
- ),
- 'remote-list' => array(
- 'summary' => 'List Remote Packages',
- 'function' => 'doRemoteList',
- 'shortcut' => 'rl',
- 'options' => array(
- 'channel' =>
- array(
- 'shortopt' => 'c',
- 'doc' => 'specify a channel other than the default channel',
- 'arg' => 'CHAN',
- )
- ),
- 'doc' => '
-Lists the packages available on the configured server along with the
-latest stable release of each package.',
- ),
- 'search' => array(
- 'summary' => 'Search remote package database',
- 'function' => 'doSearch',
- 'shortcut' => 'sp',
- 'options' => array(
- 'channel' =>
- array(
- 'shortopt' => 'c',
- 'doc' => 'specify a channel other than the default channel',
- 'arg' => 'CHAN',
- ),
- 'allchannels' => array(
- 'shortopt' => 'a',
- 'doc' => 'search packages from all known channels',
- ),
- 'channelinfo' => array(
- 'shortopt' => 'i',
- 'doc' => 'output fully channel-aware data, even on failure',
- ),
- ),
- 'doc' => '[packagename] [packageinfo]
-Lists all packages which match the search parameters. The first
-parameter is a fragment of a packagename. The default channel
-will be used unless explicitly overridden. The second parameter
-will be used to match any portion of the summary/description',
- ),
- 'list-all' => array(
- 'summary' => 'List All Packages',
- 'function' => 'doListAll',
- 'shortcut' => 'la',
- 'options' => array(
- 'channel' =>
- array(
- 'shortopt' => 'c',
- 'doc' => 'specify a channel other than the default channel',
- 'arg' => 'CHAN',
- ),
- 'channelinfo' => array(
- 'shortopt' => 'i',
- 'doc' => 'output fully channel-aware data, even on failure',
- ),
- ),
- 'doc' => '
-Lists the packages available on the configured server along with the
-latest stable release of each package.',
- ),
- 'download' => array(
- 'summary' => 'Download Package',
- 'function' => 'doDownload',
- 'shortcut' => 'd',
- 'options' => array(
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'download an uncompressed (.tar) file',
- ),
- ),
- 'doc' => '<package>...
-Download package tarballs. The files will be named as suggested by the
-server, for example if you download the DB package and the latest stable
-version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.',
- ),
- 'clear-cache' => array(
- 'summary' => 'Clear Web Services Cache',
- 'function' => 'doClearCache',
- 'shortcut' => 'cc',
- 'options' => array(),
- 'doc' => '
-Clear the REST cache. See also the cache_ttl configuration
-parameter.
-',
- ),
- );
-
- /**
- * PEAR_Command_Remote constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function _checkChannelForStatus($channel, $chan)
- {
- if (PEAR::isError($chan)) {
- $this->raiseError($chan);
- }
- if (!is_a($chan, 'PEAR_ChannelFile')) {
- return $this->raiseError('Internal corruption error: invalid channel "' .
- $channel . '"');
- }
- $rest = new PEAR_REST($this->config);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $mirror = $this->config->get('preferred_mirror', null,
- $channel);
- $a = $rest->downloadHttp('http://' . $channel .
- '/channel.xml', $chan->lastModified());
- PEAR::staticPopErrorHandling();
- if (!PEAR::isError($a) && $a) {
- $this->ui->outputData('WARNING: channel "' . $channel . '" has ' .
- 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $channel .
- '" to update');
- }
- }
-
- function doRemoteInfo($command, $options, $params)
- {
- if (sizeof($params) != 1) {
- return $this->raiseError("$command expects one param: the remote package name");
- }
- $savechannel = $channel = $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- $package = $params[0];
- $parsed = $reg->parsePackageName($package, $channel);
- if (PEAR::isError($parsed)) {
- return $this->raiseError('Invalid package name "' . $package . '"');
- }
-
- $channel = $parsed['channel'];
- $this->config->set('default_channel', $channel);
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
- return $e;
- }
-
- $mirror = $this->config->get('preferred_mirror');
- if ($chan->supportsREST($mirror) && $base = $chan->getBaseURL('REST1.0', $mirror)) {
- $rest = &$this->config->getREST('1.0', array());
- $info = $rest->packageInfo($base, $parsed['package'], $channel);
- }
-
- if (!isset($info)) {
- return $this->raiseError('No supported protocol was found');
- }
-
- if (PEAR::isError($info)) {
- $this->config->set('default_channel', $savechannel);
- return $this->raiseError($info);
- }
-
- if (!isset($info['name'])) {
- return $this->raiseError('No remote package "' . $package . '" was found');
- }
-
- $installed = $reg->packageInfo($info['name'], null, $channel);
- $info['installed'] = $installed['version'] ? $installed['version'] : '- no -';
- if (is_array($info['installed'])) {
- $info['installed'] = $info['installed']['release'];
- }
-
- $this->ui->outputData($info, $command);
- $this->config->set('default_channel', $savechannel);
-
- return true;
- }
-
- function doRemoteList($command, $options, $params)
- {
- $savechannel = $channel = $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- if (isset($options['channel'])) {
- $channel = $options['channel'];
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- $this->config->set('default_channel', $channel);
- }
-
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
- return $e;
- }
-
- $list_options = false;
- if ($this->config->get('preferred_state') == 'stable') {
- $list_options = true;
- }
-
- $available = array();
- if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
- $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))
- ) {
- // use faster list-all if available
- $rest = &$this->config->getREST('1.1', array());
- $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName());
- } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) &&
- $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
- $rest = &$this->config->getREST('1.0', array());
- $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName());
- }
-
- if (PEAR::isError($available)) {
- $this->config->set('default_channel', $savechannel);
- return $this->raiseError($available);
- }
-
- $i = $j = 0;
- $data = array(
- 'caption' => 'Channel ' . $channel . ' Available packages:',
- 'border' => true,
- 'headline' => array('Package', 'Version'),
- 'channel' => $channel
- );
-
- if (count($available) == 0) {
- $data = '(no packages available yet)';
- } else {
- foreach ($available as $name => $info) {
- $version = (isset($info['stable']) && $info['stable']) ? $info['stable'] : '-n/a-';
- $data['data'][] = array($name, $version);
- }
- }
- $this->ui->outputData($data, $command);
- $this->config->set('default_channel', $savechannel);
- return true;
- }
-
- function doListAll($command, $options, $params)
- {
- $savechannel = $channel = $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- if (isset($options['channel'])) {
- $channel = $options['channel'];
- if (!$reg->channelExists($channel)) {
- return $this->raiseError("Channel \"$channel\" does not exist");
- }
-
- $this->config->set('default_channel', $channel);
- }
-
- $list_options = false;
- if ($this->config->get('preferred_state') == 'stable') {
- $list_options = true;
- }
-
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
- return $e;
- }
-
- if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
- $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))) {
- // use faster list-all if available
- $rest = &$this->config->getREST('1.1', array());
- $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName());
- } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) &&
- $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
- $rest = &$this->config->getREST('1.0', array());
- $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName());
- }
-
- if (PEAR::isError($available)) {
- $this->config->set('default_channel', $savechannel);
- return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "' . $available->getMessage() . '")');
- }
-
- $data = array(
- 'caption' => 'All packages [Channel ' . $channel . ']:',
- 'border' => true,
- 'headline' => array('Package', 'Latest', 'Local'),
- 'channel' => $channel,
- );
-
- if (isset($options['channelinfo'])) {
- // add full channelinfo
- $data['caption'] = 'Channel ' . $channel . ' All packages:';
- $data['headline'] = array('Channel', 'Package', 'Latest', 'Local',
- 'Description', 'Dependencies');
- }
- $local_pkgs = $reg->listPackages($channel);
-
- foreach ($available as $name => $info) {
- $installed = $reg->packageInfo($name, null, $channel);
- if (is_array($installed['version'])) {
- $installed['version'] = $installed['version']['release'];
- }
- $desc = $info['summary'];
- if (isset($params[$name])) {
- $desc .= "\n\n".$info['description'];
- }
- if (isset($options['mode']))
- {
- if ($options['mode'] == 'installed' && !isset($installed['version'])) {
- continue;
- }
- if ($options['mode'] == 'notinstalled' && isset($installed['version'])) {
- continue;
- }
- if ($options['mode'] == 'upgrades'
- && (!isset($installed['version']) || version_compare($installed['version'],
- $info['stable'], '>='))) {
- continue;
- }
- }
- $pos = array_search(strtolower($name), $local_pkgs);
- if ($pos !== false) {
- unset($local_pkgs[$pos]);
- }
-
- if (isset($info['stable']) && !$info['stable']) {
- $info['stable'] = null;
- }
-
- if (isset($options['channelinfo'])) {
- // add full channelinfo
- if ($info['stable'] === $info['unstable']) {
- $state = $info['state'];
- } else {
- $state = 'stable';
- }
- $latest = $info['stable'].' ('.$state.')';
- $local = '';
- if (isset($installed['version'])) {
- $inst_state = $reg->packageInfo($name, 'release_state', $channel);
- $local = $installed['version'].' ('.$inst_state.')';
- }
-
- $packageinfo = array(
- $channel,
- $name,
- $latest,
- $local,
- isset($desc) ? $desc : null,
- isset($info['deps']) ? $info['deps'] : null,
- );
- } else {
- $packageinfo = array(
- $reg->channelAlias($channel) . '/' . $name,
- isset($info['stable']) ? $info['stable'] : null,
- isset($installed['version']) ? $installed['version'] : null,
- isset($desc) ? $desc : null,
- isset($info['deps']) ? $info['deps'] : null,
- );
- }
- $data['data'][$info['category']][] = $packageinfo;
- }
-
- if (isset($options['mode']) && in_array($options['mode'], array('notinstalled', 'upgrades'))) {
- $this->config->set('default_channel', $savechannel);
- $this->ui->outputData($data, $command);
- return true;
- }
-
- foreach ($local_pkgs as $name) {
- $info = &$reg->getPackage($name, $channel);
- $data['data']['Local'][] = array(
- $reg->channelAlias($channel) . '/' . $info->getPackage(),
- '',
- $info->getVersion(),
- $info->getSummary(),
- $info->getDeps()
- );
- }
-
- $this->config->set('default_channel', $savechannel);
- $this->ui->outputData($data, $command);
- return true;
- }
-
- function doSearch($command, $options, $params)
- {
- if ((!isset($params[0]) || empty($params[0]))
- && (!isset($params[1]) || empty($params[1])))
- {
- return $this->raiseError('no valid search string supplied');
- }
-
- $channelinfo = isset($options['channelinfo']);
- $reg = &$this->config->getRegistry();
- if (isset($options['allchannels'])) {
- // search all channels
- unset($options['allchannels']);
- $channels = $reg->getChannels();
- $errors = array();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($channels as $channel) {
- if ($channel->getName() != '__uri') {
- $options['channel'] = $channel->getName();
- $ret = $this->doSearch($command, $options, $params);
- if (PEAR::isError($ret)) {
- $errors[] = $ret;
- }
- }
- }
-
- PEAR::staticPopErrorHandling();
- if (count($errors) !== 0) {
- // for now, only give first error
- return PEAR::raiseError($errors[0]);
- }
-
- return true;
- }
-
- $savechannel = $channel = $this->config->get('default_channel');
- $package = strtolower($params[0]);
- $summary = isset($params[1]) ? $params[1] : false;
- if (isset($options['channel'])) {
- $reg = &$this->config->getRegistry();
- $channel = $options['channel'];
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- $this->config->set('default_channel', $channel);
- }
-
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
- return $e;
- }
-
- if ($chan->supportsREST($this->config->get('preferred_mirror')) &&
- $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) {
- $rest = &$this->config->getREST('1.0', array());
- $available = $rest->listAll($base, false, false, $package, $summary, $chan->getName());
- }
-
- if (PEAR::isError($available)) {
- $this->config->set('default_channel', $savechannel);
- return $this->raiseError($available);
- }
-
- if (!$available && !$channelinfo) {
- // clean exit when not found, no error !
- $data = 'no packages found that match pattern "' . $package . '", for channel '.$channel.'.';
- $this->ui->outputData($data);
- $this->config->set('default_channel', $channel);
- return true;
- }
-
- if ($channelinfo) {
- $data = array(
- 'caption' => 'Matched packages, channel ' . $channel . ':',
- 'border' => true,
- 'headline' => array('Channel', 'Package', 'Stable/(Latest)', 'Local'),
- 'channel' => $channel
- );
- } else {
- $data = array(
- 'caption' => 'Matched packages, channel ' . $channel . ':',
- 'border' => true,
- 'headline' => array('Package', 'Stable/(Latest)', 'Local'),
- 'channel' => $channel
- );
- }
-
- if (!$available && $channelinfo) {
- unset($data['headline']);
- $data['data'] = 'No packages found that match pattern "' . $package . '".';
- $available = array();
- }
-
- foreach ($available as $name => $info) {
- $installed = $reg->packageInfo($name, null, $channel);
- $desc = $info['summary'];
- if (isset($params[$name]))
- $desc .= "\n\n".$info['description'];
-
- if (!isset($info['stable']) || !$info['stable']) {
- $version_remote = 'none';
- } else {
- if ($info['unstable']) {
- $version_remote = $info['unstable'];
- } else {
- $version_remote = $info['stable'];
- }
- $version_remote .= ' ('.$info['state'].')';
- }
- $version = is_array($installed['version']) ? $installed['version']['release'] :
- $installed['version'];
- if ($channelinfo) {
- $packageinfo = array(
- $channel,
- $name,
- $version_remote,
- $version,
- $desc,
- );
- } else {
- $packageinfo = array(
- $name,
- $version_remote,
- $version,
- $desc,
- );
- }
- $data['data'][$info['category']][] = $packageinfo;
- }
-
- $this->ui->outputData($data, $command);
- $this->config->set('default_channel', $channel);
- return true;
- }
-
- function &getDownloader($options)
- {
- if (!class_exists('PEAR_Downloader')) {
- require_once 'PEAR/Downloader.php';
- }
- $a = new PEAR_Downloader($this->ui, $options, $this->config);
- return $a;
- }
-
- function doDownload($command, $options, $params)
- {
- // make certain that dependencies are ignored
- $options['downloadonly'] = 1;
-
- // eliminate error messages for preferred_state-related errors
- /* TODO: Should be an option, but until now download does respect
- prefered state */
- /* $options['ignorepreferred_state'] = 1; */
- // eliminate error messages for preferred_state-related errors
-
- $downloader = &$this->getDownloader($options);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $e = $downloader->setDownloadDir(getcwd());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($e)) {
- return $this->raiseError('Current directory is not writeable, cannot download');
- }
-
- $errors = array();
- $downloaded = array();
- $err = $downloader->download($params);
- if (PEAR::isError($err)) {
- return $err;
- }
-
- $errors = $downloader->getErrorMsgs();
- if (count($errors)) {
- foreach ($errors as $error) {
- if ($error !== null) {
- $this->ui->outputData($error);
- }
- }
-
- return $this->raiseError("$command failed");
- }
-
- $downloaded = $downloader->getDownloadedPackages();
- foreach ($downloaded as $pkg) {
- $this->ui->outputData("File $pkg[file] downloaded", $command);
- }
-
- return true;
- }
-
- function downloadCallback($msg, $params = null)
- {
- if ($msg == 'done') {
- $this->bytes_downloaded = $params;
- }
- }
-
- function doListUpgrades($command, $options, $params)
- {
- require_once 'PEAR/Common.php';
- if (isset($params[0]) && !is_array(PEAR_Common::betterStates($params[0]))) {
- return $this->raiseError($params[0] . ' is not a valid state (stable/beta/alpha/devel/etc.) try "pear help list-upgrades"');
- }
-
- $savechannel = $channel = $this->config->get('default_channel');
- $reg = &$this->config->getRegistry();
- foreach ($reg->listChannels() as $channel) {
- $inst = array_flip($reg->listPackages($channel));
- if (!count($inst)) {
- continue;
- }
-
- if ($channel == '__uri') {
- continue;
- }
-
- $this->config->set('default_channel', $channel);
- $state = empty($params[0]) ? $this->config->get('preferred_state') : $params[0];
-
- $caption = $channel . ' Available Upgrades';
- $chan = $reg->getChannel($channel);
- if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) {
- return $e;
- }
-
- $latest = array();
- $base2 = false;
- $preferred_mirror = $this->config->get('preferred_mirror');
- if ($chan->supportsREST($preferred_mirror) &&
- (
- //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) ||
- ($base = $chan->getBaseURL('REST1.0', $preferred_mirror))
- )
-
- ) {
- if ($base2) {
- $rest = &$this->config->getREST('1.4', array());
- $base = $base2;
- } else {
- $rest = &$this->config->getREST('1.0', array());
- }
-
- if (empty($state) || $state == 'any') {
- $state = false;
- } else {
- $caption .= ' (' . implode(', ', PEAR_Common::betterStates($state, true)) . ')';
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $latest = $rest->listLatestUpgrades($base, $state, $inst, $channel, $reg);
- PEAR::staticPopErrorHandling();
- }
-
- if (PEAR::isError($latest)) {
- $this->ui->outputData($latest->getMessage());
- continue;
- }
-
- $caption .= ':';
- if (PEAR::isError($latest)) {
- $this->config->set('default_channel', $savechannel);
- return $latest;
- }
-
- $data = array(
- 'caption' => $caption,
- 'border' => 1,
- 'headline' => array('Channel', 'Package', 'Local', 'Remote', 'Size'),
- 'channel' => $channel
- );
-
- foreach ((array)$latest as $pkg => $info) {
- $package = strtolower($pkg);
- if (!isset($inst[$package])) {
- // skip packages we don't have installed
- continue;
- }
-
- extract($info);
- $inst_version = $reg->packageInfo($package, 'version', $channel);
- $inst_state = $reg->packageInfo($package, 'release_state', $channel);
- if (version_compare("$version", "$inst_version", "le")) {
- // installed version is up-to-date
- continue;
- }
-
- if ($filesize >= 20480) {
- $filesize += 1024 - ($filesize % 1024);
- $fs = sprintf("%dkB", $filesize / 1024);
- } elseif ($filesize > 0) {
- $filesize += 103 - ($filesize % 103);
- $fs = sprintf("%.1fkB", $filesize / 1024.0);
- } else {
- $fs = " -"; // XXX center instead
- }
-
- $data['data'][] = array($channel, $pkg, "$inst_version ($inst_state)", "$version ($state)", $fs);
- }
-
- if (isset($options['channelinfo'])) {
- if (empty($data['data'])) {
- unset($data['headline']);
- if (count($inst) == 0) {
- $data['data'] = '(no packages installed)';
- } else {
- $data['data'] = '(no upgrades available)';
- }
- }
- $this->ui->outputData($data, $command);
- } else {
- if (empty($data['data'])) {
- $this->ui->outputData('Channel ' . $channel . ': No upgrades available');
- } else {
- $this->ui->outputData($data, $command);
- }
- }
- }
-
- $this->config->set('default_channel', $savechannel);
- return true;
- }
-
- function doClearCache($command, $options, $params)
- {
- $cache_dir = $this->config->get('cache_dir');
- $verbose = $this->config->get('verbose');
- $output = '';
- if (!file_exists($cache_dir) || !is_dir($cache_dir)) {
- return $this->raiseError("$cache_dir does not exist or is not a directory");
- }
-
- if (!($dp = @opendir($cache_dir))) {
- return $this->raiseError("opendir($cache_dir) failed: $php_errormsg");
- }
-
- if ($verbose >= 1) {
- $output .= "reading directory $cache_dir\n";
- }
-
- $num = 0;
- while ($ent = readdir($dp)) {
- if (preg_match('/rest.cache(file|id)\\z/', $ent)) {
- $path = $cache_dir . DIRECTORY_SEPARATOR . $ent;
- if (file_exists($path)) {
- $ok = @unlink($path);
- } else {
- $ok = false;
- $php_errormsg = '';
- }
-
- if ($ok) {
- if ($verbose >= 2) {
- $output .= "deleted $path\n";
- }
- $num++;
- } elseif ($verbose >= 1) {
- $output .= "failed to delete $path $php_errormsg\n";
- }
- }
- }
-
- closedir($dp);
- if ($verbose >= 1) {
- $output .= "$num cache entries cleared\n";
- }
-
- $this->ui->outputData(rtrim($output), $command);
- return $num;
- }
-}
-
- <run-tests>
- <summary>Run Regression Tests</summary>
- <function>doRunTests</function>
- <shortcut>rt</shortcut>
- <options>
- <recur>
- <shortopt>r</shortopt>
- <doc>Run tests in child directories, recursively. 4 dirs deep maximum</doc>
- </recur>
- <ini>
- <shortopt>i</shortopt>
- <doc>actual string of settings to pass to php in format &quot; -d setting=blah&quot;</doc>
- <arg>SETTINGS</arg>
- </ini>
- <realtimelog>
- <shortopt>l</shortopt>
- <doc>Log test runs/results as they are run</doc>
- </realtimelog>
- <quiet>
- <shortopt>q</shortopt>
- <doc>Only display detail for failed tests</doc>
- </quiet>
- <simple>
- <shortopt>s</shortopt>
- <doc>Display simple output for all tests</doc>
- </simple>
- <package>
- <shortopt>p</shortopt>
- <doc>Treat parameters as installed packages from which to run tests</doc>
- </package>
- <phpunit>
- <shortopt>u</shortopt>
- <doc>Search parameters for AllTests.php, and use that to run phpunit-based tests
-If none is found, all .phpt tests will be tried instead.</doc>
- </phpunit>
- <tapoutput>
- <shortopt>t</shortopt>
- <doc>Output run-tests.log in TAP-compliant format</doc>
- </tapoutput>
- <cgi>
- <shortopt>c</shortopt>
- <doc>CGI php executable (needed for tests with POST/GET section)</doc>
- <arg>PHPCGI</arg>
- </cgi>
- <coverage>
- <shortopt>x</shortopt>
- <doc>Generate a code coverage report (requires Xdebug 2.0.0+)</doc>
- </coverage>
- </options>
- <doc>[testfile|dir ...]
-Run regression tests with PHP&#039;s regression testing script (run-tests.php).</doc>
- </run-tests>
-</commands>
-/**
- * PEAR_Command_Test (run-tests)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for login/logout
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-
-class PEAR_Command_Test extends PEAR_Command_Common
-{
- var $commands = array(
- 'run-tests' => array(
- 'summary' => 'Run Regression Tests',
- 'function' => 'doRunTests',
- 'shortcut' => 'rt',
- 'options' => array(
- 'recur' => array(
- 'shortopt' => 'r',
- 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum',
- ),
- 'ini' => array(
- 'shortopt' => 'i',
- 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"',
- 'arg' => 'SETTINGS'
- ),
- 'realtimelog' => array(
- 'shortopt' => 'l',
- 'doc' => 'Log test runs/results as they are run',
- ),
- 'quiet' => array(
- 'shortopt' => 'q',
- 'doc' => 'Only display detail for failed tests',
- ),
- 'simple' => array(
- 'shortopt' => 's',
- 'doc' => 'Display simple output for all tests',
- ),
- 'package' => array(
- 'shortopt' => 'p',
- 'doc' => 'Treat parameters as installed packages from which to run tests',
- ),
- 'phpunit' => array(
- 'shortopt' => 'u',
- 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests
-If none is found, all .phpt tests will be tried instead.',
- ),
- 'tapoutput' => array(
- 'shortopt' => 't',
- 'doc' => 'Output run-tests.log in TAP-compliant format',
- ),
- 'cgi' => array(
- 'shortopt' => 'c',
- 'doc' => 'CGI php executable (needed for tests with POST/GET section)',
- 'arg' => 'PHPCGI',
- ),
- 'coverage' => array(
- 'shortopt' => 'x',
- 'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)',
- ),
- 'showdiff' => array(
- 'shortopt' => 'd',
- 'doc' => 'Output diff on test failure',
- ),
- ),
- 'doc' => '[testfile|dir ...]
-Run regression tests with PHP\'s regression testing script (run-tests.php).',
- ),
- );
-
- var $output;
-
- /**
- * PEAR_Command_Test constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- function doRunTests($command, $options, $params)
- {
- if (isset($options['phpunit']) && isset($options['tapoutput'])) {
- return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time');
- }
-
- require_once 'PEAR/Common.php';
- require_once 'System.php';
- $log = new PEAR_Common;
- $log->ui = &$this->ui; // slightly hacky, but it will work
- $tests = array();
- $depth = isset($options['recur']) ? 14 : 1;
-
- if (!count($params)) {
- $params[] = '.';
- }
-
- if (isset($options['package'])) {
- $oldparams = $params;
- $params = array();
- $reg = &$this->config->getRegistry();
- foreach ($oldparams as $param) {
- $pname = $reg->parsePackageName($param, $this->config->get('default_channel'));
- if (PEAR::isError($pname)) {
- return $this->raiseError($pname);
- }
-
- $package = &$reg->getPackage($pname['package'], $pname['channel']);
- if (!$package) {
- return PEAR::raiseError('Unknown package "' .
- $reg->parsedPackageNameToString($pname) . '"');
- }
-
- $filelist = $package->getFilelist();
- foreach ($filelist as $name => $atts) {
- if (isset($atts['role']) && $atts['role'] != 'test') {
- continue;
- }
-
- if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) {
- $params[] = $atts['installed_as'];
- continue;
- } elseif (!preg_match('/\.phpt\\z/', $name)) {
- continue;
- }
- $params[] = $atts['installed_as'];
- }
- }
- }
-
- foreach ($params as $p) {
- if (is_dir($p)) {
- if (isset($options['phpunit'])) {
- $dir = System::find(array($p, '-type', 'f',
- '-maxdepth', $depth,
- '-name', 'AllTests.php'));
- if (count($dir)) {
- foreach ($dir as $p) {
- $p = realpath($p);
- if (!count($tests) ||
- (count($tests) && strlen($p) < strlen($tests[0]))) {
- // this is in a higher-level directory, use this one instead.
- $tests = array($p);
- }
- }
- }
- continue;
- }
-
- $args = array($p, '-type', 'f', '-name', '*.phpt');
- } else {
- if (isset($options['phpunit'])) {
- if (preg_match('/AllTests\.php\\z/i', $p)) {
- $p = realpath($p);
- if (!count($tests) ||
- (count($tests) && strlen($p) < strlen($tests[0]))) {
- // this is in a higher-level directory, use this one instead.
- $tests = array($p);
- }
- }
- continue;
- }
-
- if (file_exists($p) && preg_match('/\.phpt$/', $p)) {
- $tests[] = $p;
- continue;
- }
-
- if (!preg_match('/\.phpt\\z/', $p)) {
- $p .= '.phpt';
- }
-
- $args = array(dirname($p), '-type', 'f', '-name', $p);
- }
-
- if (!isset($options['recur'])) {
- $args[] = '-maxdepth';
- $args[] = 1;
- }
-
- $dir = System::find($args);
- $tests = array_merge($tests, $dir);
- }
-
- $ini_settings = '';
- if (isset($options['ini'])) {
- $ini_settings .= $options['ini'];
- }
-
- if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) {
- $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}";
- }
-
- if ($ini_settings) {
- $this->ui->outputData('Using INI settings: "' . $ini_settings . '"');
- }
-
- $skipped = $passed = $failed = array();
- $tests_count = count($tests);
- $this->ui->outputData('Running ' . $tests_count . ' tests', $command);
- $start = time();
- if (isset($options['realtimelog']) && file_exists('run-tests.log')) {
- unlink('run-tests.log');
- }
-
- if (isset($options['tapoutput'])) {
- $tap = '1..' . $tests_count . "\n";
- }
-
- require_once 'PEAR/RunTest.php';
- $run = new PEAR_RunTest($log, $options);
- $run->tests_count = $tests_count;
-
- if (isset($options['coverage']) && extension_loaded('xdebug')){
- $run->xdebug_loaded = true;
- } else {
- $run->xdebug_loaded = false;
- }
-
- $j = $i = 1;
- foreach ($tests as $t) {
- if (isset($options['realtimelog'])) {
- $fp = @fopen('run-tests.log', 'a');
- if ($fp) {
- fwrite($fp, "Running test [$i / $tests_count] $t...");
- fclose($fp);
- }
- }
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (isset($options['phpunit'])) {
- $result = $run->runPHPUnit($t, $ini_settings);
- } else {
- $result = $run->run($t, $ini_settings, $j);
- }
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($result)) {
- $this->ui->log($result->getMessage());
- continue;
- }
-
- if (isset($options['tapoutput'])) {
- $tap .= $result[0] . ' ' . $i . $result[1] . "\n";
- continue;
- }
-
- if (isset($options['realtimelog'])) {
- $fp = @fopen('run-tests.log', 'a');
- if ($fp) {
- fwrite($fp, "$result\n");
- fclose($fp);
- }
- }
-
- if ($result == 'FAILED') {
- $failed[] = $t;
- }
- if ($result == 'PASSED') {
- $passed[] = $t;
- }
- if ($result == 'SKIPPED') {
- $skipped[] = $t;
- }
-
- $j++;
- }
-
- $total = date('i:s', time() - $start);
- if (isset($options['tapoutput'])) {
- $fp = @fopen('run-tests.log', 'w');
- if ($fp) {
- fwrite($fp, $tap, strlen($tap));
- fclose($fp);
- $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') .
- '"', $command);
- }
- } else {
- if (count($failed)) {
- $output = "TOTAL TIME: $total\n";
- $output .= count($passed) . " PASSED TESTS\n";
- $output .= count($skipped) . " SKIPPED TESTS\n";
- $output .= count($failed) . " FAILED TESTS:\n";
- foreach ($failed as $failure) {
- $output .= $failure . "\n";
- }
-
- $mode = isset($options['realtimelog']) ? 'a' : 'w';
- $fp = @fopen('run-tests.log', $mode);
-
- if ($fp) {
- fwrite($fp, $output, strlen($output));
- fclose($fp);
- $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command);
- }
- } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) {
- @unlink('run-tests.log');
- }
- }
- $this->ui->outputData('TOTAL TIME: ' . $total);
- $this->ui->outputData(count($passed) . ' PASSED TESTS', $command);
- $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command);
- if (count($failed)) {
- $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command);
- foreach ($failed as $failure) {
- $this->ui->outputData($failure, $command);
- }
- }
-
- if (count($failed) == 0) {
- return true;
- }
- return $this->raiseError('Some tests failed');
- }
-}
-
-/**
- * PEAR_Downloader_Package
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Error code when parameter initialization fails because no releases
- * exist within preferred_state, but releases do exist
- */
-define('PEAR_DOWNLOADER_PACKAGE_STATE', -1003);
-/**
- * Error code when parameter initialization fails because no releases
- * exist that will work with the existing PHP version
- */
-define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004);
-
-/**
- * Coordinates download parameters and manages their dependencies
- * prior to downloading them.
- *
- * Input can come from three sources:
- *
- * - local files (archives or package.xml)
- * - remote files (downloadable urls)
- * - abstract package names
- *
- * The first two elements are handled cleanly by PEAR_PackageFile, but the third requires
- * accessing pearweb's xml-rpc interface to determine necessary dependencies, and the
- * format returned of dependencies is slightly different from that used in package.xml.
- *
- * This class hides the differences between these elements, and makes automatic
- * dependency resolution a piece of cake. It also manages conflicts when
- * two classes depend on incompatible dependencies, or differing versions of the same
- * package dependency. In addition, download will not be attempted if the php version is
- * not supported, PEAR installer version is not supported, or non-PECL extensions are not
- * installed.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Downloader_Package
-{
- /**
- * @var PEAR_Downloader
- */
- var $_downloader;
- /**
- * @var PEAR_Config
- */
- var $_config;
- /**
- * @var PEAR_Registry
- */
- var $_registry;
- /**
- * Used to implement packagingroot properly
- * @var PEAR_Registry
- */
- var $_installRegistry;
- /**
- * @var PEAR_PackageFile_v1|PEAR_PackageFile|v2
- */
- var $_packagefile;
- /**
- * @var array
- */
- var $_parsedname;
- /**
- * @var array
- */
- var $_downloadURL;
- /**
- * @var array
- */
- var $_downloadDeps = array();
- /**
- * @var boolean
- */
- var $_valid = false;
- /**
- * @var boolean
- */
- var $_analyzed = false;
- /**
- * if this or a parent package was invoked with Package-state, this is set to the
- * state variable.
- *
- * This allows temporary reassignment of preferred_state for a parent package and all of
- * its dependencies.
- * @var string|false
- */
- var $_explicitState = false;
- /**
- * If this package is invoked with Package#group, this variable will be true
- */
- var $_explicitGroup = false;
- /**
- * Package type local|url
- * @var string
- */
- var $_type;
- /**
- * Contents of package.xml, if downloaded from a remote channel
- * @var string|false
- * @access private
- */
- var $_rawpackagefile;
- /**
- * @var boolean
- * @access private
- */
- var $_validated = false;
-
- /**
- * @param PEAR_Downloader
- */
- function __construct(&$downloader)
- {
- $this->_downloader = &$downloader;
- $this->_config = &$this->_downloader->config;
- $this->_registry = &$this->_config->getRegistry();
- $options = $downloader->getOptions();
- if (isset($options['packagingroot'])) {
- $this->_config->setInstallRoot($options['packagingroot']);
- $this->_installRegistry = &$this->_config->getRegistry();
- $this->_config->setInstallRoot(false);
- } else {
- $this->_installRegistry = &$this->_registry;
- }
- $this->_valid = $this->_analyzed = false;
- }
-
- /**
- * Parse the input and determine whether this is a local file, a remote uri, or an
- * abstract package name.
- *
- * This is the heart of the PEAR_Downloader_Package(), and is used in
- * {@link PEAR_Downloader::download()}
- * @param string
- * @return bool|PEAR_Error
- */
- function initialize($param)
- {
- $origErr = $this->_fromFile($param);
- if ($this->_valid) {
- return true;
- }
-
- $options = $this->_downloader->getOptions();
- if (isset($options['offline'])) {
- if (PEAR::isError($origErr) && !isset($options['soft'])) {
- foreach ($origErr->getUserInfo() as $userInfo) {
- if (isset($userInfo['message'])) {
- $this->_downloader->log(0, $userInfo['message']);
- }
- }
-
- $this->_downloader->log(0, $origErr->getMessage());
- }
-
- return PEAR::raiseError('Cannot download non-local package "' . $param . '"');
- }
-
- $err = $this->_fromUrl($param);
- if (PEAR::isError($err) || !$this->_valid) {
- if ($this->_type == 'url') {
- if (PEAR::isError($err) && !isset($options['soft'])) {
- $this->_downloader->log(0, $err->getMessage());
- }
-
- return PEAR::raiseError("Invalid or missing remote package file");
- }
-
- $err = $this->_fromString($param);
- if (PEAR::isError($err) || !$this->_valid) {
- if (PEAR::isError($err) && $err->getCode() == PEAR_DOWNLOADER_PACKAGE_STATE) {
- return false; // instruct the downloader to silently skip
- }
-
- if (isset($this->_type) && $this->_type == 'local' && PEAR::isError($origErr)) {
- if (is_array($origErr->getUserInfo())) {
- foreach ($origErr->getUserInfo() as $err) {
- if (is_array($err)) {
- $err = $err['message'];
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $err);
- }
- }
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $origErr->getMessage());
- }
-
- if (is_array($param)) {
- $param = $this->_registry->parsedPackageNameToString($param, true);
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file");
- }
-
- // Passing no message back - already logged above
- return PEAR::raiseError();
- }
-
- if (PEAR::isError($err) && !isset($options['soft'])) {
- $this->_downloader->log(0, $err->getMessage());
- }
-
- if (is_array($param)) {
- $param = $this->_registry->parsedPackageNameToString($param, true);
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file");
- }
-
- // Passing no message back - already logged above
- return PEAR::raiseError();
- }
- }
-
- return true;
- }
-
- /**
- * Retrieve any non-local packages
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|PEAR_Error
- */
- function &download()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile;
- }
-
- if (isset($this->_downloadURL['url'])) {
- $this->_isvalid = false;
- $info = $this->getParsedPackage();
- foreach ($info as $i => $p) {
- $info[$i] = strtolower($p);
- }
-
- $err = $this->_fromUrl($this->_downloadURL['url'],
- $this->_registry->parsedPackageNameToString($this->_parsedname, true));
- $newinfo = $this->getParsedPackage();
- foreach ($newinfo as $i => $p) {
- $newinfo[$i] = strtolower($p);
- }
-
- if ($info != $newinfo) {
- do {
- if ($info['channel'] == 'pecl.php.net' && $newinfo['channel'] == 'pear.php.net') {
- $info['channel'] = 'pear.php.net';
- if ($info == $newinfo) {
- // skip the channel check if a pecl package says it's a PEAR package
- break;
- }
- }
- if ($info['channel'] == 'pear.php.net' && $newinfo['channel'] == 'pecl.php.net') {
- $info['channel'] = 'pecl.php.net';
- if ($info == $newinfo) {
- // skip the channel check if a pecl package says it's a PEAR package
- break;
- }
- }
-
- return PEAR::raiseError('CRITICAL ERROR: We are ' .
- $this->_registry->parsedPackageNameToString($info) . ', but the file ' .
- 'downloaded claims to be ' .
- $this->_registry->parsedPackageNameToString($this->getParsedPackage()));
- } while (false);
- }
-
- if (PEAR::isError($err) || !$this->_valid) {
- return $err;
- }
- }
-
- $this->_type = 'local';
- return $this->_packagefile;
- }
-
- function &getPackageFile()
- {
- return $this->_packagefile;
- }
-
- function &getDownloader()
- {
- return $this->_downloader;
- }
-
- function getType()
- {
- return $this->_type;
- }
-
- /**
- * Like {@link initialize()}, but operates on a dependency
- */
- function fromDepURL($dep)
- {
- $this->_downloadURL = $dep;
- if (isset($dep['uri'])) {
- $options = $this->_downloader->getOptions();
- if (!extension_loaded("zlib") || isset($options['nocompress'])) {
- $ext = '.tar';
- } else {
- $ext = '.tgz';
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->_fromUrl($dep['uri'] . $ext);
- PEAR::popErrorHandling();
- if (PEAR::isError($err)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $err->getMessage());
- }
-
- return PEAR::raiseError('Invalid uri dependency "' . $dep['uri'] . $ext . '", ' .
- 'cannot download');
- }
- } else {
- $this->_parsedname =
- array(
- 'package' => $dep['info']->getPackage(),
- 'channel' => $dep['info']->getChannel(),
- 'version' => $dep['version']
- );
- if (!isset($dep['nodefault'])) {
- $this->_parsedname['group'] = 'default'; // download the default dependency group
- $this->_explicitGroup = false;
- }
-
- $this->_rawpackagefile = $dep['raw'];
- }
- }
-
- function detectDependencies($params)
- {
- $options = $this->_downloader->getOptions();
- if (isset($options['downloadonly'])) {
- return;
- }
-
- if (isset($options['offline'])) {
- $this->_downloader->log(3, 'Skipping dependency download check, --offline specified');
- return;
- }
-
- $pname = $this->getParsedPackage();
- if (!$pname) {
- return;
- }
-
- $deps = $this->getDeps();
- if (!$deps) {
- return;
- }
-
- if (isset($deps['required'])) { // package.xml 2.0
- return $this->_detect2($deps, $pname, $options, $params);
- }
-
- return $this->_detect1($deps, $pname, $options, $params);
- }
-
- function setValidated()
- {
- $this->_validated = true;
- }
-
- function alreadyValidated()
- {
- return $this->_validated;
- }
-
- /**
- * Remove packages to be downloaded that are already installed
- * @param array of PEAR_Downloader_Package objects
- * @static
- */
- function removeInstalled(&$params)
- {
- if (!isset($params[0])) {
- return;
- }
-
- $options = $params[0]->_downloader->getOptions();
- if (!isset($options['downloadonly'])) {
- foreach ($params as $i => $param) {
- $package = $param->getPackage();
- $channel = $param->getChannel();
- // remove self if already installed with this version
- // this does not need any pecl magic - we only remove exact matches
- if ($param->_installRegistry->packageExists($package, $channel)) {
- $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel);
- if (version_compare($packageVersion, $param->getVersion(), '==')) {
- if (!isset($options['force'])) {
- $info = $param->getParsedPackage();
- unset($info['version']);
- unset($info['state']);
- if (!isset($options['soft'])) {
- $param->_downloader->log(1, 'Skipping package "' .
- $param->getShortName() .
- '", already installed as version ' . $packageVersion);
- }
- $params[$i] = false;
- }
- } elseif (!isset($options['force']) && !isset($options['upgrade']) &&
- !isset($options['soft'])) {
- $info = $param->getParsedPackage();
- $param->_downloader->log(1, 'Skipping package "' .
- $param->getShortName() .
- '", already installed as version ' . $packageVersion);
- $params[$i] = false;
- }
- }
- }
- }
-
- PEAR_Downloader_Package::removeDuplicates($params);
- }
-
- function _detect2($deps, $pname, $options, $params)
- {
- $this->_downloadDeps = array();
- $groupnotfound = false;
- foreach (array('package', 'subpackage') as $packagetype) {
- // get required dependency group
- if (isset($deps['required'][$packagetype])) {
- if (isset($deps['required'][$packagetype][0])) {
- foreach ($deps['required'][$packagetype] as $dep) {
- if (isset($dep['conflicts'])) {
- // skip any package that this package conflicts with
- continue;
- }
- $ret = $this->_detect2Dep($dep, $pname, 'required', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- } else {
- $dep = $deps['required'][$packagetype];
- if (!isset($dep['conflicts'])) {
- // skip any package that this package conflicts with
- $ret = $this->_detect2Dep($dep, $pname, 'required', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- }
- }
-
- // get optional dependency group, if any
- if (isset($deps['optional'][$packagetype])) {
- $skipnames = array();
- if (!isset($deps['optional'][$packagetype][0])) {
- $deps['optional'][$packagetype] = array($deps['optional'][$packagetype]);
- }
-
- foreach ($deps['optional'][$packagetype] as $dep) {
- $skip = false;
- if (!isset($options['alldeps'])) {
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, 'Notice: package "' .
- $this->_registry->parsedPackageNameToString($this->getParsedPackage(),
- true) . '" optional dependency "' .
- $this->_registry->parsedPackageNameToString(array('package' =>
- $dep['name'], 'channel' => 'pear.php.net'), true) .
- '" will not be automatically downloaded');
- }
- $skipnames[] = $this->_registry->parsedPackageNameToString($dep, true);
- $skip = true;
- unset($dep['package']);
- }
-
- $ret = $this->_detect2Dep($dep, $pname, 'optional', $params);
- if (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
-
- if (!$ret) {
- $dep['package'] = $dep['name'];
- $skip = count($skipnames) ?
- $skipnames[count($skipnames) - 1] : '';
- if ($skip ==
- $this->_registry->parsedPackageNameToString($dep, true)) {
- array_pop($skipnames);
- }
- }
-
- if (!$skip && is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- }
- }
-
- if (count($skipnames)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'Did not download optional dependencies: ' .
- implode(', ', $skipnames) .
- ', use --alldeps to download automatically');
- }
- }
- }
-
- // get requested dependency group, if any
- $groupname = $this->getGroup();
- $explicit = $this->_explicitGroup;
- if (!$groupname) {
- if (!$this->canDefault()) {
- continue;
- }
-
- $groupname = 'default'; // try the default dependency group
- }
-
- if ($groupnotfound) {
- continue;
- }
-
- if (isset($deps['group'])) {
- if (isset($deps['group']['attribs'])) {
- if (strtolower($deps['group']['attribs']['name']) == strtolower($groupname)) {
- $group = $deps['group'];
- } elseif ($explicit) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, 'Warning: package "' .
- $this->_registry->parsedPackageNameToString($pname, true) .
- '" has no dependency ' . 'group named "' . $groupname . '"');
- }
-
- $groupnotfound = true;
- continue;
- }
- } else {
- $found = false;
- foreach ($deps['group'] as $group) {
- if (strtolower($group['attribs']['name']) == strtolower($groupname)) {
- $found = true;
- break;
- }
- }
-
- if (!$found) {
- if ($explicit) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, 'Warning: package "' .
- $this->_registry->parsedPackageNameToString($pname, true) .
- '" has no dependency ' . 'group named "' . $groupname . '"');
- }
- }
-
- $groupnotfound = true;
- continue;
- }
- }
- }
-
- if (isset($group) && isset($group[$packagetype])) {
- if (isset($group[$packagetype][0])) {
- foreach ($group[$packagetype] as $dep) {
- $ret = $this->_detect2Dep($dep, $pname, 'dependency group "' .
- $group['attribs']['name'] . '"', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- } else {
- $ret = $this->_detect2Dep($group[$packagetype], $pname,
- 'dependency group "' .
- $group['attribs']['name'] . '"', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- }
- }
- }
-
- function _detect2Dep($dep, $pname, $group, $params)
- {
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- $options = $this->_downloader->getOptions();
- if (isset($dep['uri'])) {
- return array('uri' => $dep['uri'], 'dep' => $dep);;
- }
-
- $testdep = $dep;
- $testdep['package'] = $dep['name'];
- if (PEAR_Downloader_Package::willDownload($testdep, $params)) {
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group .
- ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", will be installed');
- }
- return false;
- }
-
- $options = $this->_downloader->getOptions();
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if ($this->_explicitState) {
- $pname['state'] = $this->_explicitState;
- }
-
- $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname);
- if (PEAR::isError($url)) {
- PEAR::popErrorHandling();
- return $url;
- }
-
- $dep['package'] = $dep['name'];
- $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, $group == 'optional' &&
- !isset($options['alldeps']), true);
- PEAR::popErrorHandling();
- if (PEAR::isError($ret)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
-
- return false;
- }
-
- // check to see if a dep is already installed and is the same or newer
- if (!isset($dep['min']) && !isset($dep['max']) && !isset($dep['recommended'])) {
- $oper = 'has';
- } else {
- $oper = 'gt';
- }
-
- // do not try to move this before getDepPackageDownloadURL
- // we can't determine whether upgrade is necessary until we know what
- // version would be downloaded
- if (!isset($options['force']) && $this->isInstalled($ret, $oper)) {
- $version = $this->_installRegistry->packageInfo($dep['name'], 'version', $dep['channel']);
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group .
- ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '" version ' . $url['version'] . ', already installed as version ' .
- $version);
- }
-
- return false;
- }
-
- if (isset($dep['nodefault'])) {
- $ret['nodefault'] = true;
- }
-
- return $ret;
- }
-
- function _detect1($deps, $pname, $options, $params)
- {
- $this->_downloadDeps = array();
- $skipnames = array();
- foreach ($deps as $dep) {
- $nodownload = false;
- if (isset ($dep['type']) && $dep['type'] === 'pkg') {
- $dep['channel'] = 'pear.php.net';
- $dep['package'] = $dep['name'];
- switch ($dep['rel']) {
- case 'not' :
- continue 2;
- case 'ge' :
- case 'eq' :
- case 'gt' :
- case 'has' :
- $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ?
- 'required' :
- 'optional';
- if (PEAR_Downloader_Package::willDownload($dep, $params)) {
- $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group
- . ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", will be installed');
- continue 2;
- }
- $fakedp = new PEAR_PackageFile_v1;
- $fakedp->setPackage($dep['name']);
- // skip internet check if we are not upgrading (bug #5810)
- if (!isset($options['upgrade']) && $this->isInstalled(
- $fakedp, $dep['rel'])) {
- $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group
- . ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", is already installed');
- continue 2;
- }
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if ($this->_explicitState) {
- $pname['state'] = $this->_explicitState;
- }
-
- $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname);
- $chan = 'pear.php.net';
- if (PEAR::isError($url)) {
- // check to see if this is a pecl package that has jumped
- // from pear.php.net to pecl.php.net channel
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
-
- $newdep = PEAR_Dependency2::normalizeDep($dep);
- $newdep = $newdep[0];
- $newdep['channel'] = 'pecl.php.net';
- $chan = 'pecl.php.net';
- $url = $this->_downloader->_getDepPackageDownloadUrl($newdep, $pname);
- $obj = &$this->_installRegistry->getPackage($dep['name']);
- if (PEAR::isError($url)) {
- PEAR::popErrorHandling();
- if ($obj !== null && $this->isInstalled($obj, $dep['rel'])) {
- $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ?
- 'required' :
- 'optional';
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, $this->getShortName() .
- ': Skipping ' . $group . ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", already installed as version ' . $obj->getVersion());
- }
- $skip = count($skipnames) ?
- $skipnames[count($skipnames) - 1] : '';
- if ($skip ==
- $this->_registry->parsedPackageNameToString($dep, true)) {
- array_pop($skipnames);
- }
- continue;
- } else {
- if (isset($dep['optional']) && $dep['optional'] == 'yes') {
- $this->_downloader->log(2, $this->getShortName() .
- ': Skipping optional dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", no releases exist');
- continue;
- } else {
- return $url;
- }
- }
- }
- }
-
- PEAR::popErrorHandling();
- if (!isset($options['alldeps'])) {
- if (isset($dep['optional']) && $dep['optional'] == 'yes') {
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, 'Notice: package "' .
- $this->getShortName() .
- '" optional dependency "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true) .
- '" will not be automatically downloaded');
- }
- $skipnames[] = $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true);
- $nodownload = true;
- }
- }
-
- if (!isset($options['alldeps']) && !isset($options['onlyreqdeps'])) {
- if (!isset($dep['optional']) || $dep['optional'] == 'no') {
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, 'Notice: package "' .
- $this->getShortName() .
- '" required dependency "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true) .
- '" will not be automatically downloaded');
- }
- $skipnames[] = $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true);
- $nodownload = true;
- }
- }
-
- // check to see if a dep is already installed
- // do not try to move this before getDepPackageDownloadURL
- // we can't determine whether upgrade is necessary until we know what
- // version would be downloaded
- if (!isset($options['force']) && $this->isInstalled(
- $url, $dep['rel'])) {
- $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ?
- 'required' :
- 'optional';
- $dep['package'] = $dep['name'];
- if (isset($newdep)) {
- $version = $this->_installRegistry->packageInfo($newdep['name'], 'version', $newdep['channel']);
- } else {
- $version = $this->_installRegistry->packageInfo($dep['name'], 'version');
- }
-
- $dep['version'] = $url['version'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group .
- ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", already installed as version ' . $version);
- }
-
- $skip = count($skipnames) ?
- $skipnames[count($skipnames) - 1] : '';
- if ($skip ==
- $this->_registry->parsedPackageNameToString($dep, true)) {
- array_pop($skipnames);
- }
-
- continue;
- }
-
- if ($nodownload) {
- continue;
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if (isset($newdep)) {
- $dep = $newdep;
- }
-
- $dep['package'] = $dep['name'];
- $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params,
- isset($dep['optional']) && $dep['optional'] == 'yes' &&
- !isset($options['alldeps']), true);
- PEAR::popErrorHandling();
- if (PEAR::isError($ret)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- continue;
- }
-
- $this->_downloadDeps[] = $ret;
- }
- }
-
- if (count($skipnames)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'Did not download dependencies: ' .
- implode(', ', $skipnames) .
- ', use --alldeps or --onlyreqdeps to download automatically');
- }
- }
- }
-
- function setDownloadURL($pkg)
- {
- $this->_downloadURL = $pkg;
- }
-
- /**
- * Set the package.xml object for this downloaded package
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg
- */
- function setPackageFile(&$pkg)
- {
- $this->_packagefile = &$pkg;
- }
-
- function getShortName()
- {
- return $this->_registry->parsedPackageNameToString(array('channel' => $this->getChannel(),
- 'package' => $this->getPackage()), true);
- }
-
- function getParsedPackage()
- {
- if (isset($this->_packagefile) || isset($this->_parsedname)) {
- return array('channel' => $this->getChannel(),
- 'package' => $this->getPackage(),
- 'version' => $this->getVersion());
- }
-
- return false;
- }
-
- function getDownloadURL()
- {
- return $this->_downloadURL;
- }
-
- function canDefault()
- {
- if (isset($this->_downloadURL) && isset($this->_downloadURL['nodefault'])) {
- return false;
- }
-
- return true;
- }
-
- function getPackage()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackage();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getPackage();
- }
-
- return false;
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- function isSubpackage(&$pf)
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->isSubpackage($pf);
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->isSubpackage($pf);
- }
-
- return false;
- }
-
- function getPackageType()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackageType();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getPackageType();
- }
-
- return false;
- }
-
- function isBundle()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackageType() == 'bundle';
- }
-
- return false;
- }
-
- function getPackageXmlVersion()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackagexmlVersion();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getPackagexmlVersion();
- }
-
- return '1.0';
- }
-
- function getChannel()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getChannel();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getChannel();
- }
-
- return false;
- }
-
- function getURI()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getURI();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getURI();
- }
-
- return false;
- }
-
- function getVersion()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getVersion();
- } elseif (isset($this->_downloadURL['version'])) {
- return $this->_downloadURL['version'];
- }
-
- return false;
- }
-
- function isCompatible($pf)
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->isCompatible($pf);
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->isCompatible($pf);
- }
-
- return true;
- }
-
- function setGroup($group)
- {
- $this->_parsedname['group'] = $group;
- }
-
- function getGroup()
- {
- if (isset($this->_parsedname['group'])) {
- return $this->_parsedname['group'];
- }
-
- return '';
- }
-
- function isExtension($name)
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->isExtension($name);
- } elseif (isset($this->_downloadURL['info'])) {
- if ($this->_downloadURL['info']->getPackagexmlVersion() == '2.0') {
- return $this->_downloadURL['info']->getProvidesExtension() == $name;
- }
-
- return false;
- }
-
- return false;
- }
-
- function getDeps()
- {
- if (isset($this->_packagefile)) {
- $ver = $this->_packagefile->getPackagexmlVersion();
- if (version_compare($ver, '2.0', '>=')) {
- return $this->_packagefile->getDeps(true);
- }
-
- return $this->_packagefile->getDeps();
- } elseif (isset($this->_downloadURL['info'])) {
- $ver = $this->_downloadURL['info']->getPackagexmlVersion();
- if (version_compare($ver, '2.0', '>=')) {
- return $this->_downloadURL['info']->getDeps(true);
- }
-
- return $this->_downloadURL['info']->getDeps();
- }
-
- return array();
- }
-
- /**
- * @param array Parsed array from {@link PEAR_Registry::parsePackageName()} or a dependency
- * returned from getDepDownloadURL()
- */
- function isEqual($param)
- {
- if (is_object($param)) {
- $channel = $param->getChannel();
- $package = $param->getPackage();
- if ($param->getURI()) {
- $param = array(
- 'channel' => $param->getChannel(),
- 'package' => $param->getPackage(),
- 'version' => $param->getVersion(),
- 'uri' => $param->getURI(),
- );
- } else {
- $param = array(
- 'channel' => $param->getChannel(),
- 'package' => $param->getPackage(),
- 'version' => $param->getVersion(),
- );
- }
- } else {
- if (isset($param['uri'])) {
- if ($this->getChannel() != '__uri') {
- return false;
- }
- return $param['uri'] == $this->getURI();
- }
-
- $package = isset($param['package']) ? $param['package'] : $param['info']->getPackage();
- $channel = isset($param['channel']) ? $param['channel'] : $param['info']->getChannel();
- if (isset($param['rel'])) {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
-
- $newdep = PEAR_Dependency2::normalizeDep($param);
- $newdep = $newdep[0];
- } elseif (isset($param['min'])) {
- $newdep = $param;
- }
- }
-
- if (isset($newdep)) {
- if (!isset($newdep['min'])) {
- $newdep['min'] = '0';
- }
-
- if (!isset($newdep['max'])) {
- $newdep['max'] = '100000000000000000000';
- }
-
- // use magic to support pecl packages suddenly jumping to the pecl channel
- // we need to support both dependency possibilities
- if ($channel == 'pear.php.net' && $this->getChannel() == 'pecl.php.net') {
- if ($package == $this->getPackage()) {
- $channel = 'pecl.php.net';
- }
- }
- if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') {
- if ($package == $this->getPackage()) {
- $channel = 'pear.php.net';
- }
- }
-
- return (strtolower($package) == strtolower($this->getPackage()) &&
- $channel == $this->getChannel() &&
- version_compare($newdep['min'], $this->getVersion(), '<=') &&
- version_compare($newdep['max'], $this->getVersion(), '>='));
- }
-
- // use magic to support pecl packages suddenly jumping to the pecl channel
- if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') {
- if (strtolower($package) == strtolower($this->getPackage())) {
- $channel = 'pear.php.net';
- }
- }
-
- if (isset($param['version'])) {
- return (strtolower($package) == strtolower($this->getPackage()) &&
- $channel == $this->getChannel() &&
- $param['version'] == $this->getVersion());
- }
-
- return strtolower($package) == strtolower($this->getPackage()) &&
- $channel == $this->getChannel();
- }
-
- function isInstalled($dep, $oper = '==')
- {
- if (!$dep) {
- return false;
- }
-
- if ($oper != 'ge' && $oper != 'gt' && $oper != 'has' && $oper != '==') {
- return false;
- }
-
- if (is_object($dep)) {
- $package = $dep->getPackage();
- $channel = $dep->getChannel();
- if ($dep->getURI()) {
- $dep = array(
- 'uri' => $dep->getURI(),
- 'version' => $dep->getVersion(),
- );
- } else {
- $dep = array(
- 'version' => $dep->getVersion(),
- );
- }
- } else {
- if (isset($dep['uri'])) {
- $channel = '__uri';
- $package = $dep['dep']['name'];
- } else {
- $channel = $dep['info']->getChannel();
- $package = $dep['info']->getPackage();
- }
- }
-
- $options = $this->_downloader->getOptions();
- $test = $this->_installRegistry->packageExists($package, $channel);
- if (!$test && $channel == 'pecl.php.net') {
- // do magic to allow upgrading from old pecl packages to new ones
- $test = $this->_installRegistry->packageExists($package, 'pear.php.net');
- $channel = 'pear.php.net';
- }
-
- if ($test) {
- if (isset($dep['uri'])) {
- if ($this->_installRegistry->packageInfo($package, 'uri', '__uri') == $dep['uri']) {
- return true;
- }
- }
-
- if (isset($options['upgrade'])) {
- $packageVersion = $this->_installRegistry->packageInfo($package, 'version', $channel);
- if (version_compare($packageVersion, $dep['version'], '>=')) {
- return true;
- }
-
- return false;
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Detect duplicate package names with differing versions
- *
- * If a user requests to install Date 1.4.6 and Date 1.4.7,
- * for instance, this is a logic error. This method
- * detects this situation.
- *
- * @param array $params array of PEAR_Downloader_Package objects
- * @param array $errorparams empty array
- * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts
- */
- function detectStupidDuplicates($params, &$errorparams)
- {
- $existing = array();
- foreach ($params as $i => $param) {
- $package = $param->getPackage();
- $channel = $param->getChannel();
- $group = $param->getGroup();
- if (!isset($existing[$channel . '/' . $package])) {
- $existing[$channel . '/' . $package] = array();
- }
-
- if (!isset($existing[$channel . '/' . $package][$group])) {
- $existing[$channel . '/' . $package][$group] = array();
- }
-
- $existing[$channel . '/' . $package][$group][] = $i;
- }
-
- $indices = array();
- foreach ($existing as $package => $groups) {
- foreach ($groups as $group => $dupes) {
- if (count($dupes) > 1) {
- $indices = $indices + $dupes;
- }
- }
- }
-
- $indices = array_unique($indices);
- foreach ($indices as $index) {
- $errorparams[] = $params[$index];
- }
-
- return count($errorparams);
- }
-
- /**
- * @param array
- * @param bool ignore install groups - for final removal of dupe packages
- * @static
- */
- function removeDuplicates(&$params, $ignoreGroups = false)
- {
- $pnames = array();
- foreach ($params as $i => $param) {
- if (!$param) {
- continue;
- }
-
- if ($param->getPackage()) {
- $group = $ignoreGroups ? '' : $param->getGroup();
- $pnames[$i] = $param->getChannel() . '/' .
- $param->getPackage() . '-' . $param->getVersion() . '#' . $group;
- }
- }
-
- $pnames = array_unique($pnames);
- $unset = array_diff(array_keys($params), array_keys($pnames));
- $testp = array_flip($pnames);
- foreach ($params as $i => $param) {
- if (!$param) {
- $unset[] = $i;
- continue;
- }
-
- if (!is_a($param, 'PEAR_Downloader_Package')) {
- $unset[] = $i;
- continue;
- }
-
- $group = $ignoreGroups ? '' : $param->getGroup();
- if (!isset($testp[$param->getChannel() . '/' . $param->getPackage() . '-' .
- $param->getVersion() . '#' . $group])) {
- $unset[] = $i;
- }
- }
-
- foreach ($unset as $i) {
- unset($params[$i]);
- }
-
- $ret = array();
- foreach ($params as $i => $param) {
- $ret[] = &$params[$i];
- }
-
- $params = array();
- foreach ($ret as $i => $param) {
- $params[] = &$ret[$i];
- }
- }
-
- function explicitState()
- {
- return $this->_explicitState;
- }
-
- function setExplicitState($s)
- {
- $this->_explicitState = $s;
- }
-
- /**
- * @static
- */
- function mergeDependencies(&$params)
- {
- $bundles = $newparams = array();
- foreach ($params as $i => $param) {
- if (!$param->isBundle()) {
- continue;
- }
-
- $bundles[] = $i;
- $pf = &$param->getPackageFile();
- $newdeps = array();
- $contents = $pf->getBundledPackages();
- if (!is_array($contents)) {
- $contents = array($contents);
- }
-
- foreach ($contents as $file) {
- $filecontents = $pf->getFileContents($file);
- $dl = &$param->getDownloader();
- $options = $dl->getOptions();
- if (PEAR::isError($dir = $dl->getDownloadDir())) {
- return $dir;
- }
-
- $fp = @fopen($dir . DIRECTORY_SEPARATOR . $file, 'wb');
- if (!$fp) {
- continue;
- }
-
- // FIXME do symlink check
-
- fwrite($fp, $filecontents, strlen($filecontents));
- fclose($fp);
- if ($s = $params[$i]->explicitState()) {
- $obj->setExplicitState($s);
- }
-
- $obj = new PEAR_Downloader_Package($params[$i]->getDownloader());
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if (PEAR::isError($dir = $dl->getDownloadDir())) {
- PEAR::popErrorHandling();
- return $dir;
- }
-
- $e = $obj->_fromFile($a = $dir . DIRECTORY_SEPARATOR . $file);
- PEAR::popErrorHandling();
- if (PEAR::isError($e)) {
- if (!isset($options['soft'])) {
- $dl->log(0, $e->getMessage());
- }
- continue;
- }
-
- if (!PEAR_Downloader_Package::willDownload($obj,
- array_merge($params, $newparams)) && !$param->isInstalled($obj)) {
- $newparams[] = $obj;
- }
- }
- }
-
- foreach ($bundles as $i) {
- unset($params[$i]); // remove bundles - only their contents matter for installation
- }
-
- PEAR_Downloader_Package::removeDuplicates($params); // strip any unset indices
- if (count($newparams)) { // add in bundled packages for install
- foreach ($newparams as $i => $unused) {
- $params[] = &$newparams[$i];
- }
- $newparams = array();
- }
-
- foreach ($params as $i => $param) {
- $newdeps = array();
- foreach ($param->_downloadDeps as $dep) {
- $merge = array_merge($params, $newparams);
- if (!PEAR_Downloader_Package::willDownload($dep, $merge)
- && !$param->isInstalled($dep)
- ) {
- $newdeps[] = $dep;
- } else {
- //var_dump($dep);
- // detect versioning conflicts here
- }
- }
-
- // convert the dependencies into PEAR_Downloader_Package objects for the next time around
- $params[$i]->_downloadDeps = array();
- foreach ($newdeps as $dep) {
- $obj = new PEAR_Downloader_Package($params[$i]->getDownloader());
- if ($s = $params[$i]->explicitState()) {
- $obj->setExplicitState($s);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $e = $obj->fromDepURL($dep);
- PEAR::popErrorHandling();
- if (PEAR::isError($e)) {
- if (!isset($options['soft'])) {
- $obj->_downloader->log(0, $e->getMessage());
- }
- continue;
- }
-
- $e = $obj->detectDependencies($params);
- if (PEAR::isError($e)) {
- if (!isset($options['soft'])) {
- $obj->_downloader->log(0, $e->getMessage());
- }
- }
-
- $newparams[] = $obj;
- }
- }
-
- if (count($newparams)) {
- foreach ($newparams as $i => $unused) {
- $params[] = &$newparams[$i];
- }
- return true;
- }
-
- return false;
- }
-
-
- /**
- * @static
- */
- function willDownload($param, $params)
- {
- if (!is_array($params)) {
- return false;
- }
-
- foreach ($params as $obj) {
- if ($obj->isEqual($param)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * For simpler unit-testing
- * @param PEAR_Config
- * @param int
- * @param string
- */
- function &getPackagefileObject(&$c, $d)
- {
- $a = new PEAR_PackageFile($c, $d);
- return $a;
- }
-
- /**
- * This will retrieve from a local file if possible, and parse out
- * a group name as well. The original parameter will be modified to reflect this.
- * @param string|array can be a parsed package name as well
- * @access private
- */
- function _fromFile(&$param)
- {
- $saveparam = $param;
- if (is_string($param)) {
- if (!@file_exists($param)) {
- $test = explode('#', $param);
- $group = array_pop($test);
- if (@file_exists(implode('#', $test))) {
- $this->setGroup($group);
- $param = implode('#', $test);
- $this->_explicitGroup = true;
- }
- }
-
- if (@is_file($param)) {
- $this->_type = 'local';
- $options = $this->_downloader->getOptions();
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->_debug);
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING);
- PEAR::popErrorHandling();
- if (PEAR::isError($pf)) {
- $this->_valid = false;
- $param = $saveparam;
- return $pf;
- }
- $this->_packagefile = &$pf;
- if (!$this->getGroup()) {
- $this->setGroup('default'); // install the default dependency group
- }
- return $this->_valid = true;
- }
- }
- $param = $saveparam;
- return $this->_valid = false;
- }
-
- function _fromUrl($param, $saveparam = '')
- {
- if (!is_array($param) && (preg_match('#^(http|https|ftp)://#', $param))) {
- $options = $this->_downloader->getOptions();
- $this->_type = 'url';
- $callback = $this->_downloader->ui ?
- array(&$this->_downloader, '_downloadCallback') : null;
- $this->_downloader->pushErrorHandling(PEAR_ERROR_RETURN);
- if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) {
- $this->_downloader->popErrorHandling();
- return $dir;
- }
-
- $this->_downloader->log(3, 'Downloading "' . $param . '"');
- $file = $this->_downloader->downloadHttp($param, $this->_downloader->ui,
- $dir, $callback, null, false, $this->getChannel());
- $this->_downloader->popErrorHandling();
- if (PEAR::isError($file)) {
- if (!empty($saveparam)) {
- $saveparam = ", cannot download \"$saveparam\"";
- }
- $err = PEAR::raiseError('Could not download from "' . $param .
- '"' . $saveparam . ' (' . $file->getMessage() . ')');
- return $err;
- }
-
- if ($this->_rawpackagefile) {
- require_once 'Archive/Tar.php';
- $tar = new Archive_Tar($file);
- $packagexml = $tar->extractInString('package2.xml');
- if (!$packagexml) {
- $packagexml = $tar->extractInString('package.xml');
- }
-
- if (str_replace(array("\n", "\r"), array('',''), $packagexml) !=
- str_replace(array("\n", "\r"), array('',''), $this->_rawpackagefile)) {
- if ($this->getChannel() != 'pear.php.net') {
- return PEAR::raiseError('CRITICAL ERROR: package.xml downloaded does ' .
- 'not match value returned from xml-rpc');
- }
-
- // be more lax for the existing PEAR packages that have not-ok
- // characters in their package.xml
- $this->_downloader->log(0, 'CRITICAL WARNING: The "' .
- $this->getPackage() . '" package has invalid characters in its ' .
- 'package.xml. The next version of PEAR may not be able to install ' .
- 'this package for security reasons. Please open a bug report at ' .
- 'http://pear.php.net/package/' . $this->getPackage() . '/bugs');
- }
- }
-
- // whew, download worked!
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug);
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING);
- PEAR::popErrorHandling();
- if (PEAR::isError($pf)) {
- if (is_array($pf->getUserInfo())) {
- foreach ($pf->getUserInfo() as $err) {
- if (is_array($err)) {
- $err = $err['message'];
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, "Validation Error: $err");
- }
- }
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $pf->getMessage());
- }
-
- ///FIXME need to pass back some error code that we can use to match with to cancel all further operations
- /// At least stop all deps of this package from being installed
- $out = $saveparam ? $saveparam : $param;
- $err = PEAR::raiseError('Download of "' . $out . '" succeeded, but it is not a valid package archive');
- $this->_valid = false;
- return $err;
- }
-
- $this->_packagefile = &$pf;
- $this->setGroup('default'); // install the default dependency group
- return $this->_valid = true;
- }
-
- return $this->_valid = false;
- }
-
- /**
- *
- * @param string|array pass in an array of format
- * array(
- * 'package' => 'pname',
- * ['channel' => 'channame',]
- * ['version' => 'version',]
- * ['state' => 'state',])
- * or a string of format [channame/]pname[-version|-state]
- */
- function _fromString($param)
- {
- $options = $this->_downloader->getOptions();
- $channel = $this->_config->get('default_channel');
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pname = $this->_registry->parsePackageName($param, $channel);
- PEAR::popErrorHandling();
- if (PEAR::isError($pname)) {
- if ($pname->getCode() == 'invalid') {
- $this->_valid = false;
- return false;
- }
-
- if ($pname->getCode() == 'channel') {
- $parsed = $pname->getUserInfo();
- if ($this->_downloader->discover($parsed['channel'])) {
- if ($this->_config->get('auto_discover')) {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pname = $this->_registry->parsePackageName($param, $channel);
- PEAR::popErrorHandling();
- } else {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, 'Channel "' . $parsed['channel'] .
- '" is not initialized, use ' .
- '"pear channel-discover ' . $parsed['channel'] . '" to initialize' .
- 'or pear config-set auto_discover 1');
- }
- }
- }
-
- if (PEAR::isError($pname)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $pname->getMessage());
- }
-
- if (is_array($param)) {
- $param = $this->_registry->parsedPackageNameToString($param);
- }
-
- $err = PEAR::raiseError('invalid package name/package file "' . $param . '"');
- $this->_valid = false;
- return $err;
- }
- } else {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $pname->getMessage());
- }
-
- $err = PEAR::raiseError('invalid package name/package file "' . $param . '"');
- $this->_valid = false;
- return $err;
- }
- }
-
- if (!isset($this->_type)) {
- $this->_type = 'rest';
- }
-
- $this->_parsedname = $pname;
- $this->_explicitState = isset($pname['state']) ? $pname['state'] : false;
- $this->_explicitGroup = isset($pname['group']) ? true : false;
-
- $info = $this->_downloader->_getPackageDownloadUrl($pname);
- if (PEAR::isError($info)) {
- if ($info->getCode() != -976 && $pname['channel'] == 'pear.php.net') {
- // try pecl
- $pname['channel'] = 'pecl.php.net';
- if ($test = $this->_downloader->_getPackageDownloadUrl($pname)) {
- if (!PEAR::isError($test)) {
- $info = PEAR::raiseError($info->getMessage() . ' - package ' .
- $this->_registry->parsedPackageNameToString($pname, true) .
- ' can be installed with "pecl install ' . $pname['package'] .
- '"');
- } else {
- $pname['channel'] = 'pear.php.net';
- }
- } else {
- $pname['channel'] = 'pear.php.net';
- }
- }
-
- return $info;
- }
-
- $this->_rawpackagefile = $info['raw'];
- $ret = $this->_analyzeDownloadURL($info, $param, $pname);
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- if ($ret) {
- $this->_downloadURL = $ret;
- return $this->_valid = (bool) $ret;
- }
- }
-
- /**
- * @param array output of package.getDownloadURL
- * @param string|array|object information for detecting packages to be downloaded, and
- * for errors
- * @param array name information of the package
- * @param array|null packages to be downloaded
- * @param bool is this an optional dependency?
- * @param bool is this any kind of dependency?
- * @access private
- */
- function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = false,
- $isdependency = false)
- {
- if (!is_string($param) && PEAR_Downloader_Package::willDownload($param, $params)) {
- return false;
- }
-
- if ($info === false) {
- $saveparam = !is_string($param) ? ", cannot download \"$param\"" : '';
-
- // no releases exist
- return PEAR::raiseError('No releases for package "' .
- $this->_registry->parsedPackageNameToString($pname, true) . '" exist' . $saveparam);
- }
-
- if (strtolower($info['info']->getChannel()) != strtolower($pname['channel'])) {
- $err = false;
- if ($pname['channel'] == 'pecl.php.net') {
- if ($info['info']->getChannel() != 'pear.php.net') {
- $err = true;
- }
- } elseif ($info['info']->getChannel() == 'pecl.php.net') {
- if ($pname['channel'] != 'pear.php.net') {
- $err = true;
- }
- } else {
- $err = true;
- }
-
- if ($err) {
- return PEAR::raiseError('SECURITY ERROR: package in channel "' . $pname['channel'] .
- '" retrieved another channel\'s name for download! ("' .
- $info['info']->getChannel() . '")');
- }
- }
-
- $preferred_state = $this->_config->get('preferred_state');
- if (!isset($info['url'])) {
- $package_version = $this->_registry->packageInfo($info['info']->getPackage(),
- 'version', $info['info']->getChannel());
- if ($this->isInstalled($info)) {
- if ($isdependency && version_compare($info['version'], $package_version, '<=')) {
- // ignore bogus errors of "failed to download dependency"
- // if it is already installed and the one that would be
- // downloaded is older or the same version (Bug #7219)
- return false;
- }
- }
-
- if ($info['version'] === $package_version) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] .
- '/' . $pname['package'] . '-' . $package_version. ', additionally the suggested version' .
- ' (' . $package_version . ') is the same as the locally installed one.');
- }
-
- return false;
- }
-
- if (version_compare($info['version'], $package_version, '<=')) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] .
- '/' . $pname['package'] . '-' . $package_version . ', additionally the suggested version' .
- ' (' . $info['version'] . ') is a lower version than the locally installed one (' . $package_version . ').');
- }
-
- return false;
- }
-
- $instead = ', will instead download version ' . $info['version'] .
- ', stability "' . $info['info']->getState() . '"';
- // releases exist, but we failed to get any
- if (isset($this->_downloader->_options['force'])) {
- if (isset($pname['version'])) {
- $vs = ', version "' . $pname['version'] . '"';
- } elseif (isset($pname['state'])) {
- $vs = ', stability "' . $pname['state'] . '"';
- } elseif ($param == 'dependency') {
- if (!class_exists('PEAR_Common')) {
- require_once 'PEAR/Common.php';
- }
-
- if (!in_array($info['info']->getState(),
- PEAR_Common::betterStates($preferred_state, true))) {
- if ($optional) {
- // don't spit out confusing error message
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = ' within preferred state "' . $preferred_state .
- '"';
- } else {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
-
- if ($optional) {
- // don't spit out confusing error message
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = PEAR_Dependency2::_getExtraString($pname);
- $instead = '';
- }
- } else {
- $vs = ' within preferred state "' . $preferred_state . '"';
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] .
- '/' . $pname['package'] . $vs . $instead);
- }
-
- // download the latest release
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- } else {
- if (isset($info['php']) && $info['php']) {
- $err = PEAR::raiseError('Failed to download ' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'],
- 'package' => $pname['package']),
- true) .
- ', latest release is version ' . $info['php']['v'] .
- ', but it requires PHP version "' .
- $info['php']['m'] . '", use "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package'],
- 'version' => $info['php']['v'])) . '" to install',
- PEAR_DOWNLOADER_PACKAGE_PHPVERSION);
- return $err;
- }
-
- // construct helpful error message
- if (isset($pname['version'])) {
- $vs = ', version "' . $pname['version'] . '"';
- } elseif (isset($pname['state'])) {
- $vs = ', stability "' . $pname['state'] . '"';
- } elseif ($param == 'dependency') {
- if (!class_exists('PEAR_Common')) {
- require_once 'PEAR/Common.php';
- }
-
- if (!in_array($info['info']->getState(),
- PEAR_Common::betterStates($preferred_state, true))) {
- if ($optional) {
- // don't spit out confusing error message, and don't die on
- // optional dep failure!
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = ' within preferred state "' . $preferred_state . '"';
- } else {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
-
- if ($optional) {
- // don't spit out confusing error message, and don't die on
- // optional dep failure!
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = PEAR_Dependency2::_getExtraString($pname);
- }
- } else {
- $vs = ' within preferred state "' . $this->_downloader->config->get('preferred_state') . '"';
- }
-
- $options = $this->_downloader->getOptions();
- // this is only set by the "download-all" command
- if (isset($options['ignorepreferred_state'])) {
- $err = PEAR::raiseError(
- 'Failed to download ' . $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package']),
- true)
- . $vs .
- ', latest release is version ' . $info['version'] .
- ', stability "' . $info['info']->getState() . '", use "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package'],
- 'version' => $info['version'])) . '" to install',
- PEAR_DOWNLOADER_PACKAGE_STATE);
- return $err;
- }
-
- // Checks if the user has a package installed already and checks the release against
- // the state against the installed package, this allows upgrades for packages
- // with lower stability than the preferred_state
- $stability = $this->_registry->packageInfo($pname['package'], 'stability', $pname['channel']);
- if (!$this->isInstalled($info)
- || !in_array($info['info']->getState(), PEAR_Common::betterStates($stability['release'], true))
- ) {
- $err = PEAR::raiseError(
- 'Failed to download ' . $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package']),
- true)
- . $vs .
- ', latest release is version ' . $info['version'] .
- ', stability "' . $info['info']->getState() . '", use "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package'],
- 'version' => $info['version'])) . '" to install');
- return $err;
- }
- }
- }
-
- if (isset($info['deprecated']) && $info['deprecated']) {
- $this->_downloader->log(0,
- 'WARNING: "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $info['info']->getChannel(),
- 'package' => $info['info']->getPackage()), true) .
- '" is deprecated in favor of "' .
- $this->_registry->parsedPackageNameToString($info['deprecated'], true) .
- '"');
- }
-
- return $info;
- }
-}
-
-/**
- * PEAR_Frontend_CLI
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-/**
- * base class
- */
-require_once 'PEAR/Frontend.php';
-
-/**
- * Command-line Frontend for the PEAR Installer
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Frontend_CLI extends PEAR_Frontend
-{
- /**
- * What type of user interface this frontend is for.
- * @var string
- * @access public
- */
- var $type = 'CLI';
- var $lp = ''; // line prefix
-
- var $params = array();
- var $term = array(
- 'bold' => '',
- 'normal' => '',
- );
-
- function __construct()
- {
- parent::__construct();
- $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1
- if (function_exists('posix_isatty') && !posix_isatty(1)) {
- // output is being redirected to a file or through a pipe
- } elseif ($term) {
- if (preg_match('/^(xterm|vt220|linux)/', $term)) {
- $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109);
- $this->term['normal'] = sprintf("%c%c%c", 27, 91, 109);
- } elseif (preg_match('/^vt100/', $term)) {
- $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0);
- $this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0);
- }
- } elseif (OS_WINDOWS) {
- // XXX add ANSI codes here
- }
- }
-
- /**
- * @param object PEAR_Error object
- */
- function displayError($e)
- {
- return $this->_displayLine($e->getMessage());
- }
-
- /**
- * @param object PEAR_Error object
- */
- function displayFatalError($eobj)
- {
- $this->displayError($eobj);
- if (class_exists('PEAR_Config')) {
- $config = &PEAR_Config::singleton();
- if ($config->get('verbose') > 5) {
- if (function_exists('debug_print_backtrace')) {
- debug_print_backtrace();
- exit(1);
- }
-
- $raised = false;
- foreach (debug_backtrace() as $i => $frame) {
- if (!$raised) {
- if (isset($frame['class'])
- && strtolower($frame['class']) == 'pear'
- && strtolower($frame['function']) == 'raiseerror'
- ) {
- $raised = true;
- } else {
- continue;
- }
- }
-
- $frame['class'] = !isset($frame['class']) ? '' : $frame['class'];
- $frame['type'] = !isset($frame['type']) ? '' : $frame['type'];
- $frame['function'] = !isset($frame['function']) ? '' : $frame['function'];
- $frame['line'] = !isset($frame['line']) ? '' : $frame['line'];
- $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]");
- }
- }
- }
-
- exit(1);
- }
-
- /**
- * Instruct the runInstallScript method to skip a paramgroup that matches the
- * id value passed in.
- *
- * This method is useful for dynamically configuring which sections of a post-install script
- * will be run based on the user's setup, which is very useful for making flexible
- * post-install scripts without losing the cross-Frontend ability to retrieve user input
- * @param string
- */
- function skipParamgroup($id)
- {
- $this->_skipSections[$id] = true;
- }
-
- function runPostinstallScripts(&$scripts)
- {
- foreach ($scripts as $i => $script) {
- $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj);
- }
- }
-
- /**
- * @param array $xml contents of postinstallscript tag
- * @param object $script post-installation script
- * @param string install|upgrade
- */
- function runInstallScript($xml, &$script)
- {
- $this->_skipSections = array();
- if (!is_array($xml) || !isset($xml['paramgroup'])) {
- $script->run(array(), '_default');
- return;
- }
-
- $completedPhases = array();
- if (!isset($xml['paramgroup'][0])) {
- $xml['paramgroup'] = array($xml['paramgroup']);
- }
-
- foreach ($xml['paramgroup'] as $group) {
- if (isset($this->_skipSections[$group['id']])) {
- // the post-install script chose to skip this section dynamically
- continue;
- }
-
- if (isset($group['name'])) {
- $paramname = explode('::', $group['name']);
- if ($lastgroup['id'] != $paramname[0]) {
- continue;
- }
-
- $group['name'] = $paramname[1];
- if (!isset($answers)) {
- return;
- }
-
- if (isset($answers[$group['name']])) {
- switch ($group['conditiontype']) {
- case '=' :
- if ($answers[$group['name']] != $group['value']) {
- continue 2;
- }
- break;
- case '!=' :
- if ($answers[$group['name']] == $group['value']) {
- continue 2;
- }
- break;
- case 'preg_match' :
- if (!@preg_match('/' . $group['value'] . '/',
- $answers[$group['name']])) {
- continue 2;
- }
- break;
- default :
- return;
- }
- }
- }
-
- $lastgroup = $group;
- if (isset($group['instructions'])) {
- $this->_display($group['instructions']);
- }
-
- if (!isset($group['param'][0])) {
- $group['param'] = array($group['param']);
- }
-
- if (isset($group['param'])) {
- if (method_exists($script, 'postProcessPrompts')) {
- $prompts = $script->postProcessPrompts($group['param'], $group['id']);
- if (!is_array($prompts) || count($prompts) != count($group['param'])) {
- $this->outputData('postinstall', 'Error: post-install script did not ' .
- 'return proper post-processed prompts');
- $prompts = $group['param'];
- } else {
- foreach ($prompts as $i => $var) {
- if (!is_array($var) || !isset($var['prompt']) ||
- !isset($var['name']) ||
- ($var['name'] != $group['param'][$i]['name']) ||
- ($var['type'] != $group['param'][$i]['type'])
- ) {
- $this->outputData('postinstall', 'Error: post-install script ' .
- 'modified the variables or prompts, severe security risk. ' .
- 'Will instead use the defaults from the package.xml');
- $prompts = $group['param'];
- }
- }
- }
-
- $answers = $this->confirmDialog($prompts);
- } else {
- $answers = $this->confirmDialog($group['param']);
- }
- }
-
- if ((isset($answers) && $answers) || !isset($group['param'])) {
- if (!isset($answers)) {
- $answers = array();
- }
-
- array_unshift($completedPhases, $group['id']);
- if (!$script->run($answers, $group['id'])) {
- $script->run($completedPhases, '_undoOnError');
- return;
- }
- } else {
- $script->run($completedPhases, '_undoOnError');
- return;
- }
- }
- }
-
- /**
- * Ask for user input, confirm the answers and continue until the user is satisfied
- * @param array an array of arrays, format array('name' => 'paramname', 'prompt' =>
- * 'text to display', 'type' => 'string'[, default => 'default value'])
- * @return array
- */
- function confirmDialog($params)
- {
- $answers = $prompts = $types = array();
- foreach ($params as $param) {
- $prompts[$param['name']] = $param['prompt'];
- $types[$param['name']] = $param['type'];
- $answers[$param['name']] = isset($param['default']) ? $param['default'] : '';
- }
-
- $tried = false;
- do {
- if ($tried) {
- $i = 1;
- foreach ($answers as $var => $value) {
- if (!strlen($value)) {
- echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n");
- }
- $i++;
- }
- }
-
- $answers = $this->userDialog('', $prompts, $types, $answers);
- $tried = true;
- } while (is_array($answers) && count(array_filter($answers)) != count($prompts));
-
- return $answers;
- }
-
- function userDialog($command, $prompts, $types = array(), $defaults = array(), $screensize = 20)
- {
- if (!is_array($prompts)) {
- return array();
- }
-
- $testprompts = array_keys($prompts);
- $result = $defaults;
-
- reset($prompts);
- if (count($prompts) === 1) {
- foreach ($prompts as $key => $prompt) {
- $type = $types[$key];
- $default = @$defaults[$key];
- print "$prompt ";
- if ($default) {
- print "[$default] ";
- }
- print ": ";
-
- $line = fgets(STDIN, 2048);
- $result[$key] = ($default && trim($line) == '') ? $default : trim($line);
- }
-
- return $result;
- }
-
- $first_run = true;
- while (true) {
- $descLength = max(array_map('strlen', $prompts));
- $descFormat = "%-{$descLength}s";
- $last = count($prompts);
-
- $i = 0;
- foreach ($prompts as $n => $var) {
- $res = isset($result[$n]) ? $result[$n] : null;
- printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], $res);
- }
- print "\n1-$last, 'all', 'abort', or Enter to continue: ";
-
- $tmp = trim(fgets(STDIN, 1024));
- if (empty($tmp)) {
- break;
- }
-
- if ($tmp == 'abort') {
- return false;
- }
-
- if (isset($testprompts[(int)$tmp - 1])) {
- $var = $testprompts[(int)$tmp - 1];
- $desc = $prompts[$var];
- $current = @$result[$var];
- print "$desc [$current] : ";
- $tmp = trim(fgets(STDIN, 1024));
- if ($tmp !== '') {
- $result[$var] = $tmp;
- }
- } elseif ($tmp == 'all') {
- foreach ($prompts as $var => $desc) {
- $current = $result[$var];
- print "$desc [$current] : ";
- $tmp = trim(fgets(STDIN, 1024));
- if (trim($tmp) !== '') {
- $result[$var] = trim($tmp);
- }
- }
- }
-
- $first_run = false;
- }
-
- return $result;
- }
-
- function userConfirm($prompt, $default = 'yes')
- {
- trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR);
- static $positives = array('y', 'yes', 'on', '1');
- static $negatives = array('n', 'no', 'off', '0');
- print "$this->lp$prompt [$default] : ";
- $fp = fopen("php://stdin", "r");
- $line = fgets($fp, 2048);
- fclose($fp);
- $answer = strtolower(trim($line));
- if (empty($answer)) {
- $answer = $default;
- }
- if (in_array($answer, $positives)) {
- return true;
- }
- if (in_array($answer, $negatives)) {
- return false;
- }
- if (in_array($default, $positives)) {
- return true;
- }
- return false;
- }
-
- function outputData($data, $command = '_default')
- {
- switch ($command) {
- case 'channel-info':
- foreach ($data as $type => $section) {
- if ($type == 'main') {
- $section['data'] = array_values($section['data']);
- }
-
- $this->outputData($section);
- }
- break;
- case 'install':
- case 'upgrade':
- case 'upgrade-all':
- if (is_array($data) && isset($data['release_warnings'])) {
- $this->_displayLine('');
- $this->_startTable(array(
- 'border' => false,
- 'caption' => 'Release Warnings'
- ));
- $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55)));
- $this->_endTable();
- $this->_displayLine('');
- }
-
- $this->_displayLine(is_array($data) ? $data['data'] : $data);
- break;
- case 'search':
- $this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
- }
-
- $packages = array();
- foreach($data['data'] as $category) {
- foreach($category as $name => $pkg) {
- $packages[$pkg[0]] = $pkg;
- }
- }
-
- $p = array_keys($packages);
- natcasesort($p);
- foreach ($p as $name) {
- $this->_tableRow($packages[$name], null, array(1 => array('wrap' => 55)));
- }
-
- $this->_endTable();
- break;
- case 'list-all':
- if (!isset($data['data'])) {
- $this->_displayLine('No packages in channel');
- break;
- }
-
- $this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
- }
-
- $packages = array();
- foreach($data['data'] as $category) {
- foreach($category as $name => $pkg) {
- $packages[$pkg[0]] = $pkg;
- }
- }
-
- $p = array_keys($packages);
- natcasesort($p);
- foreach ($p as $name) {
- $pkg = $packages[$name];
- unset($pkg[4], $pkg[5]);
- $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
- }
-
- $this->_endTable();
- break;
- case 'config-show':
- $data['border'] = false;
- $opts = array(
- 0 => array('wrap' => 30),
- 1 => array('wrap' => 20),
- 2 => array('wrap' => 35)
- );
-
- $this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'], array('bold' => true), $opts);
- }
-
- foreach ($data['data'] as $group) {
- foreach ($group as $value) {
- if ($value[2] == '') {
- $value[2] = "<not set>";
- }
-
- $this->_tableRow($value, null, $opts);
- }
- }
-
- $this->_endTable();
- break;
- case 'remote-info':
- $d = $data;
- $data = array(
- 'caption' => 'Package details:',
- 'border' => false,
- 'data' => array(
- array("Latest", $data['stable']),
- array("Installed", $data['installed']),
- array("Package", $data['name']),
- array("License", $data['license']),
- array("Category", $data['category']),
- array("Summary", $data['summary']),
- array("Description", $data['description']),
- ),
- );
-
- if (isset($d['deprecated']) && $d['deprecated']) {
- $conf = &PEAR_Config::singleton();
- $reg = $conf->getRegistry();
- $name = $reg->parsedPackageNameToString($d['deprecated'], true);
- $data['data'][] = array('Deprecated! use', $name);
- }
- default: {
- if (is_array($data)) {
- $this->_startTable($data);
- $count = count($data['data'][0]);
- if ($count == 2) {
- $opts = array(0 => array('wrap' => 25),
- 1 => array('wrap' => 48)
- );
- } elseif ($count == 3) {
- $opts = array(0 => array('wrap' => 30),
- 1 => array('wrap' => 20),
- 2 => array('wrap' => 35)
- );
- } else {
- $opts = null;
- }
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'],
- array('bold' => true),
- $opts);
- }
-
- if (is_array($data['data'])) {
- foreach($data['data'] as $row) {
- $this->_tableRow($row, null, $opts);
- }
- } else {
- $this->_tableRow(array($data['data']), null, $opts);
- }
- $this->_endTable();
- } else {
- $this->_displayLine($data);
- }
- }
- }
- }
-
- function log($text, $append_crlf = true)
- {
- if ($append_crlf) {
- return $this->_displayLine($text);
- }
-
- return $this->_display($text);
- }
-
- function bold($text)
- {
- if (empty($this->term['bold'])) {
- return strtoupper($text);
- }
-
- return $this->term['bold'] . $text . $this->term['normal'];
- }
-
- function _displayHeading($title)
- {
- print $this->lp.$this->bold($title)."\n";
- print $this->lp.str_repeat("=", strlen($title))."\n";
- }
-
- function _startTable($params = array())
- {
- $params['table_data'] = array();
- $params['widest'] = array(); // indexed by column
- $params['highest'] = array(); // indexed by row
- $params['ncols'] = 0;
- $this->params = $params;
- }
-
- function _tableRow($columns, $rowparams = array(), $colparams = array())
- {
- $highest = 1;
- for ($i = 0; $i < count($columns); $i++) {
- $col = &$columns[$i];
- if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) {
- $col = wordwrap($col, $colparams[$i]['wrap']);
- }
-
- if (strpos($col, "\n") !== false) {
- $multiline = explode("\n", $col);
- $w = 0;
- foreach ($multiline as $n => $line) {
- $len = strlen($line);
- if ($len > $w) {
- $w = $len;
- }
- }
- $lines = count($multiline);
- } else {
- $w = strlen($col);
- }
-
- if (isset($this->params['widest'][$i])) {
- if ($w > $this->params['widest'][$i]) {
- $this->params['widest'][$i] = $w;
- }
- } else {
- $this->params['widest'][$i] = $w;
- }
-
- $tmp = count_chars($columns[$i], 1);
- // handle unix, mac and windows formats
- $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1;
- if ($lines > $highest) {
- $highest = $lines;
- }
- }
-
- if (count($columns) > $this->params['ncols']) {
- $this->params['ncols'] = count($columns);
- }
-
- $new_row = array(
- 'data' => $columns,
- 'height' => $highest,
- 'rowparams' => $rowparams,
- 'colparams' => $colparams,
- );
- $this->params['table_data'][] = $new_row;
- }
-
- function _endTable()
- {
- extract($this->params);
- if (!empty($caption)) {
- $this->_displayHeading($caption);
- }
-
- if (count($table_data) === 0) {
- return;
- }
-
- if (!isset($width)) {
- $width = $widest;
- } else {
- for ($i = 0; $i < $ncols; $i++) {
- if (!isset($width[$i])) {
- $width[$i] = $widest[$i];
- }
- }
- }
-
- $border = false;
- if (empty($border)) {
- $cellstart = '';
- $cellend = ' ';
- $rowend = '';
- $padrowend = false;
- $borderline = '';
- } else {
- $cellstart = '| ';
- $cellend = ' ';
- $rowend = '|';
- $padrowend = true;
- $borderline = '+';
- foreach ($width as $w) {
- $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1);
- $borderline .= '+';
- }
- }
-
- if ($borderline) {
- $this->_displayLine($borderline);
- }
-
- for ($i = 0; $i < count($table_data); $i++) {
- extract($table_data[$i]);
- if (!is_array($rowparams)) {
- $rowparams = array();
- }
-
- if (!is_array($colparams)) {
- $colparams = array();
- }
-
- $rowlines = array();
- if ($height > 1) {
- for ($c = 0; $c < count($data); $c++) {
- $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]);
- if (count($rowlines[$c]) < $height) {
- $rowlines[$c] = array_pad($rowlines[$c], $height, '');
- }
- }
- } else {
- for ($c = 0; $c < count($data); $c++) {
- $rowlines[$c] = array($data[$c]);
- }
- }
-
- for ($r = 0; $r < $height; $r++) {
- $rowtext = '';
- for ($c = 0; $c < count($data); $c++) {
- if (isset($colparams[$c])) {
- $attribs = array_merge($rowparams, $colparams);
- } else {
- $attribs = $rowparams;
- }
-
- $w = isset($width[$c]) ? $width[$c] : 0;
- //$cell = $data[$c];
- $cell = $rowlines[$c][$r];
- $l = strlen($cell);
- if ($l > $w) {
- $cell = substr($cell, 0, $w);
- }
-
- if (isset($attribs['bold'])) {
- $cell = $this->bold($cell);
- }
-
- if ($l < $w) {
- // not using str_pad here because we may
- // add bold escape characters to $cell
- $cell .= str_repeat(' ', $w - $l);
- }
-
- $rowtext .= $cellstart . $cell . $cellend;
- }
-
- if (!$border) {
- $rowtext = rtrim($rowtext);
- }
-
- $rowtext .= $rowend;
- $this->_displayLine($rowtext);
- }
- }
-
- if ($borderline) {
- $this->_displayLine($borderline);
- }
- }
-
- function _displayLine($text)
- {
- print "$this->lp$text\n";
- }
-
- function _display($text)
- {
- print $text;
- }
-}
-
-/**
- * Base class for all installation roles.
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class for all installation roles.
- *
- * This class allows extensibility of file roles. Packages with complex
- * customization can now provide custom file roles along with the possibility of
- * adding configuration values to match.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Common
-{
- /**
- * @var PEAR_Config
- * @access protected
- */
- var $config;
-
- /**
- * @param PEAR_Config
- */
- function __construct(&$config)
- {
- $this->config = $config;
- }
-
- /**
- * Retrieve configuration information about a file role from its XML info
- *
- * @param string $role Role Classname, as in "PEAR_Installer_Role_Data"
- * @return array
- */
- function getInfo($role)
- {
- if (empty($GLOBALS['_PEAR_INSTALLER_ROLES'][$role])) {
- return PEAR::raiseError('Unknown Role class: "' . $role . '"');
- }
- return $GLOBALS['_PEAR_INSTALLER_ROLES'][$role];
- }
-
- /**
- * This is called for each file to set up the directories and files
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param array attributes from the <file> tag
- * @param string file name
- * @return array an array consisting of:
- *
- * 1 the original, pre-baseinstalldir installation directory
- * 2 the final installation directory
- * 3 the full path to the final location of the file
- * 4 the location of the pre-installation file
- */
- function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null)
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- if (!$roleInfo['locationconfig']) {
- return false;
- }
- if ($roleInfo['honorsbaseinstall']) {
- $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], $layer,
- $pkg->getChannel());
- if (!empty($atts['baseinstalldir'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
- }
- } elseif ($roleInfo['unusualbaseinstall']) {
- $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'],
- $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage();
- if (!empty($atts['baseinstalldir'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
- }
- } else {
- $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'],
- $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage();
- }
- if (dirname($file) != '.' && empty($atts['install-as'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . dirname($file);
- }
- if (empty($atts['install-as'])) {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file);
- } else {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as'];
- }
- $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file;
-
- // Clean up the DIRECTORY_SEPARATOR mess
- $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
-
- list($dest_dir, $dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"),
- array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR),
- array($dest_dir, $dest_file, $orig_file));
- return array($save_destdir, $dest_dir, $dest_file, $orig_file);
- }
-
- /**
- * Get the name of the configuration variable that specifies the location of this file
- * @return string|false
- */
- function getLocationConfig()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['locationconfig'];
- }
-
- /**
- * Do any unusual setup here
- * @param PEAR_Installer
- * @param PEAR_PackageFile_v2
- * @param array file attributes
- * @param string file name
- */
- function setup(&$installer, $pkg, $atts, $file)
- {
- }
-
- function isExecutable()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['executable'];
- }
-
- function isInstallable()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['installable'];
- }
-
- function isExtension()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['phpextension'];
- }
-}
-?>
-
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>cfg_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall>1</unusualbaseinstall>
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Cfg
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2007-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.7.0
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2007-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.7.0
- */
-class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common
-{
- /**
- * @var PEAR_Installer
- */
- var $installer;
-
- /**
- * the md5 of the original file
- *
- * @var unknown_type
- */
- var $md5 = null;
-
- /**
- * Do any unusual setup here
- * @param PEAR_Installer
- * @param PEAR_PackageFile_v2
- * @param array file attributes
- * @param string file name
- */
- function setup(&$installer, $pkg, $atts, $file)
- {
- $this->installer = &$installer;
- $reg = &$this->installer->config->getRegistry();
- $package = $reg->getPackage($pkg->getPackage(), $pkg->getChannel());
- if ($package) {
- $filelist = $package->getFilelist();
- if (isset($filelist[$file]) && isset($filelist[$file]['md5sum'])) {
- $this->md5 = $filelist[$file]['md5sum'];
- }
- }
- }
-
- function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null)
- {
- $test = parent::processInstallation($pkg, $atts, $file, $tmp_path, $layer);
- if (@file_exists($test[2]) && @file_exists($test[3])) {
- $md5 = md5_file($test[2]);
- // configuration has already been installed, check for mods
- if ($md5 !== $this->md5 && $md5 !== md5_file($test[3])) {
- // configuration has been modified, so save our version as
- // configfile-version
- $old = $test[2];
- $test[2] .= '.new-' . $pkg->getVersion();
- // backup original and re-install it
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $tmpcfg = $this->config->get('temp_dir');
- $newloc = System::mkdir(array('-p', $tmpcfg));
- if (!$newloc) {
- // try temp_dir
- $newloc = System::mktemp(array('-d'));
- if (!$newloc || PEAR::isError($newloc)) {
- PEAR::popErrorHandling();
- return PEAR::raiseError('Could not save existing configuration file '.
- $old . ', unable to install. Please set temp_dir ' .
- 'configuration variable to a writeable location and try again');
- }
- } else {
- $newloc = $tmpcfg;
- }
-
- $temp_file = $newloc . DIRECTORY_SEPARATOR . uniqid('savefile');
- if (!@copy($old, $temp_file)) {
- PEAR::popErrorHandling();
- return PEAR::raiseError('Could not save existing configuration file '.
- $old . ', unable to install. Please set temp_dir ' .
- 'configuration variable to a writeable location and try again');
- }
-
- PEAR::popErrorHandling();
- $this->installer->log(0, "WARNING: configuration file $old is being installed as $test[2], you should manually merge in changes to the existing configuration file");
- $this->installer->addFileOperation('rename', array($temp_file, $old, false));
- $this->installer->addFileOperation('delete', array($temp_file));
- }
- }
-
- return $test;
- }
-}
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>data_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Data
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
-?>
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>doc_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Doc
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
-?>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>ext_dir</locationconfig>
- <honorsbaseinstall>1</honorsbaseinstall>
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension>1</phpextension>
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Ext
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {}
-?>
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>php_dir</locationconfig>
- <honorsbaseinstall>1</honorsbaseinstall>
- <unusualbaseinstall />
- <phpfile>1</phpfile>
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Php
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
-?>
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>bin_dir</locationconfig>
- <honorsbaseinstall>1</honorsbaseinstall>
- <unusualbaseinstall />
- <phpfile />
- <executable>1</executable>
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Script
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
-?>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <installable>1</installable>
- <locationconfig>temp_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Src
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common
-{
- function setup(&$installer, $pkg, $atts, $file)
- {
- $installer->source_files++;
- }
-}
-?>
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>test_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Test
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
-?>
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>www_dir</locationconfig>
- <honorsbaseinstall>1</honorsbaseinstall>
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role>
-/**
- * PEAR_Installer_Role_Www
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2007-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.7.0
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2007-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.7.0
- */
-class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {}
-?>
-/**
- * PEAR_Installer_Role
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * base class for installer roles
- */
-require_once 'PEAR/Installer/Role/Common.php';
-require_once 'PEAR/XMLParser.php';
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role
-{
- /**
- * Set up any additional configuration variables that file roles require
- *
- * Never call this directly, it is called by the PEAR_Config constructor
- * @param PEAR_Config
- * @access private
- * @static
- */
- function initializeConfig(&$config)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $class => $info) {
- if (!$info['config_vars']) {
- continue;
- }
-
- $config->_addConfigVars($class, $info['config_vars']);
- }
- }
-
- /**
- * @param PEAR_PackageFile_v2
- * @param string role name
- * @param PEAR_Config
- * @return PEAR_Installer_Role_Common
- * @static
- */
- function &factory($pkg, $role, &$config)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- if (!in_array($role, PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) {
- $a = false;
- return $a;
- }
-
- $a = 'PEAR_Installer_Role_' . ucfirst($role);
- if (!class_exists($a)) {
- require_once str_replace('_', '/', $a) . '.php';
- }
-
- $b = new $a($config);
- return $b;
- }
-
- /**
- * Get a list of file roles that are valid for the particular release type.
- *
- * For instance, src files serve no purpose in regular php releases.
- * @param string
- * @param bool clear cache
- * @return array
- * @static
- */
- function getValidRoles($release, $clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret = array();
- if ($clear) {
- $ret = array();
- }
-
- if (isset($ret[$release])) {
- return $ret[$release];
- }
-
- $ret[$release] = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if (in_array($release, $okreleases['releasetypes'])) {
- $ret[$release][] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret[$release];
- }
-
- /**
- * Get a list of roles that require their files to be installed
- *
- * Most roles must be installed, but src and package roles, for instance
- * are pseudo-roles. src files are compiled into a new extension. Package
- * roles are actually fully bundled releases of a package
- * @param bool clear cache
- * @return array
- * @static
- */
- function getInstallableRoles($clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret;
- if ($clear) {
- unset($ret);
- }
-
- if (isset($ret)) {
- return $ret;
- }
-
- $ret = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if ($okreleases['installable']) {
- $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret;
- }
-
- /**
- * Return an array of roles that are affected by the baseinstalldir attribute
- *
- * Most roles ignore this attribute, and instead install directly into:
- * PackageName/filepath
- * so a tests file tests/file.phpt is installed into PackageName/tests/filepath.php
- * @param bool clear cache
- * @return array
- * @static
- */
- function getBaseinstallRoles($clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret;
- if ($clear) {
- unset($ret);
- }
-
- if (isset($ret)) {
- return $ret;
- }
-
- $ret = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if ($okreleases['honorsbaseinstall']) {
- $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret;
- }
-
- /**
- * Return an array of file roles that should be analyzed for PHP content at package time,
- * like the "php" role.
- * @param bool clear cache
- * @return array
- * @static
- */
- function getPhpRoles($clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret;
- if ($clear) {
- unset($ret);
- }
-
- if (isset($ret)) {
- return $ret;
- }
-
- $ret = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if ($okreleases['phpfile']) {
- $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret;
- }
-
- /**
- * Scan through the Command directory looking for classes
- * and see what commands they implement.
- * @param string which directory to look for classes, defaults to
- * the Installer/Roles subdirectory of
- * the directory from where this file (__FILE__) is
- * included.
- *
- * @return bool TRUE on success, a PEAR error on failure
- * @access public
- * @static
- */
- function registerRoles($dir = null)
- {
- $GLOBALS['_PEAR_INSTALLER_ROLES'] = array();
- $parser = new PEAR_XMLParser;
- if ($dir === null) {
- $dir = dirname(__FILE__) . '/Role';
- }
-
- if (!file_exists($dir) || !is_dir($dir)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory");
- }
-
- $dp = @opendir($dir);
- if (empty($dp)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg");
- }
-
- while ($entry = readdir($dp)) {
- if ($entry{0} == '.' || substr($entry, -4) != '.xml') {
- continue;
- }
-
- $class = "PEAR_Installer_Role_".substr($entry, 0, -4);
- // List of roles
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'][$class])) {
- $file = "$dir/$entry";
- $parser->parse(file_get_contents($file));
- $data = $parser->getData();
- if (!is_array($data['releasetypes'])) {
- $data['releasetypes'] = array($data['releasetypes']);
- }
-
- $GLOBALS['_PEAR_INSTALLER_ROLES'][$class] = $data;
- }
- }
-
- closedir($dp);
- ksort($GLOBALS['_PEAR_INSTALLER_ROLES']);
- PEAR_Installer_Role::getBaseinstallRoles(true);
- PEAR_Installer_Role::getInstallableRoles(true);
- PEAR_Installer_Role::getPhpRoles(true);
- PEAR_Installer_Role::getValidRoles('****', true);
- return true;
- }
-}
-/**
- * package.xml generation class, package.xml version 1.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * needed for PEAR_VALIDATE_* constants
- */
-require_once 'PEAR/Validate.php';
-require_once 'System.php';
-require_once 'PEAR/PackageFile/v2.php';
-/**
- * This class converts a PEAR_PackageFile_v1 object into any output format.
- *
- * Supported output formats include array, XML string, and a PEAR_PackageFile_v2
- * object, for converting package.xml 1.0 into package.xml 2.0 with no sweat.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Generator_v1
-{
- /**
- * @var PEAR_PackageFile_v1
- */
- var $_packagefile;
- function __construct(&$packagefile)
- {
- $this->_packagefile = &$packagefile;
- }
-
- function getPackagerVersion()
- {
- return '1.9.5';
- }
-
- /**
- * @param PEAR_Packager
- * @param bool if true, a .tgz is written, otherwise a .tar is written
- * @param string|null directory in which to save the .tgz
- * @return string|PEAR_Error location of package or error object
- */
- function toTgz(&$packager, $compress = true, $where = null)
- {
- require_once 'Archive/Tar.php';
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: "' . $where . '" could' .
- ' not be created');
- }
- if (file_exists($where . DIRECTORY_SEPARATOR . 'package.xml') &&
- !is_file($where . DIRECTORY_SEPARATOR . 'package.xml')) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: unable to save package.xml as' .
- ' "' . $where . DIRECTORY_SEPARATOR . 'package.xml"');
- }
- if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: invalid package file');
- }
- $pkginfo = $this->_packagefile->getArray();
- $ext = $compress ? '.tgz' : '.tar';
- $pkgver = $pkginfo['package'] . '-' . $pkginfo['version'];
- $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext;
- if (file_exists(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext) &&
- !is_file(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: cannot create tgz file "' .
- getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext . '"');
- }
- if ($pkgfile = $this->_packagefile->getPackageFile()) {
- $pkgdir = dirname(realpath($pkgfile));
- $pkgfile = basename($pkgfile);
- } else {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: package file object must ' .
- 'be created from a real file');
- }
- // {{{ Create the package file list
- $filelist = array();
- $i = 0;
-
- foreach ($this->_packagefile->getFilelist() as $fname => $atts) {
- $file = $pkgdir . DIRECTORY_SEPARATOR . $fname;
- if (!file_exists($file)) {
- return PEAR::raiseError("File does not exist: $fname");
- } else {
- $filelist[$i++] = $file;
- if (!isset($atts['md5sum'])) {
- $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($file));
- }
- $packager->log(2, "Adding file $fname");
- }
- }
- // }}}
- $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true);
- if ($packagexml) {
- $tar = new Archive_Tar($dest_package, $compress);
- $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors
- // ----- Creates with the package.xml file
- $ok = $tar->createModify(array($packagexml), '', $where);
- if (PEAR::isError($ok)) {
- return $ok;
- } elseif (!$ok) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed');
- }
- // ----- Add the content of the package
- if (!$tar->addModify($filelist, $pkgver, $pkgdir)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed');
- }
- return $dest_package;
- }
- }
-
- /**
- * @param string|null directory to place the package.xml in, or null for a temporary dir
- * @param int one of the PEAR_VALIDATE_* constants
- * @param string name of the generated file
- * @param bool if true, then no analysis will be performed on role="php" files
- * @return string|PEAR_Error path to the created file on success
- */
- function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml',
- $nofilechecking = false)
- {
- if (!$this->_packagefile->validate($state, $nofilechecking)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: invalid package.xml',
- null, null, null, $this->_packagefile->getValidationWarnings());
- }
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: "' . $where . '" could' .
- ' not be created');
- }
- $newpkgfile = $where . DIRECTORY_SEPARATOR . $name;
- $np = @fopen($newpkgfile, 'wb');
- if (!$np) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: unable to save ' .
- "$name as $newpkgfile");
- }
- fwrite($np, $this->toXml($state, true));
- fclose($np);
- return $newpkgfile;
- }
-
- /**
- * fix both XML encoding to be UTF8, and replace standard XML entities < > " & '
- *
- * @param string $string
- * @return string
- * @access private
- */
- function _fixXmlEncoding($string)
- {
- return strtr($string, array(
- '&' => '&amp;',
- '>' => '&gt;',
- '<' => '&lt;',
- '"' => '&quot;',
- '\'' => '&apos;' ));
- }
-
- /**
- * Return an XML document based on the package info (as returned
- * by the PEAR_Common::infoFrom* methods).
- *
- * @return string XML data
- */
- function toXml($state = PEAR_VALIDATE_NORMAL, $nofilevalidation = false)
- {
- $this->_packagefile->setDate(date('Y-m-d'));
- if (!$this->_packagefile->validate($state, $nofilevalidation)) {
- return false;
- }
- $pkginfo = $this->_packagefile->getArray();
- static $maint_map = array(
- "handle" => "user",
- "name" => "name",
- "email" => "email",
- "role" => "role",
- );
- $ret = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
- $ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n";
- $ret .= "<package version=\"1.0\" packagerversion=\"1.9.5\">\n" .
-" <name>$pkginfo[package]</name>";
- if (isset($pkginfo['extends'])) {
- $ret .= "\n<extends>$pkginfo[extends]</extends>";
- }
- $ret .=
- "\n <summary>".$this->_fixXmlEncoding($pkginfo['summary'])."</summary>\n" .
-" <description>".trim($this->_fixXmlEncoding($pkginfo['description']))."\n </description>\n" .
-" <maintainers>\n";
- foreach ($pkginfo['maintainers'] as $maint) {
- $ret .= " <maintainer>\n";
- foreach ($maint_map as $idx => $elm) {
- $ret .= " <$elm>";
- $ret .= $this->_fixXmlEncoding($maint[$idx]);
- $ret .= "</$elm>\n";
- }
- $ret .= " </maintainer>\n";
- }
- $ret .= " </maintainers>\n";
- $ret .= $this->_makeReleaseXml($pkginfo, false, $state);
- if (isset($pkginfo['changelog']) && count($pkginfo['changelog']) > 0) {
- $ret .= " <changelog>\n";
- foreach ($pkginfo['changelog'] as $oldrelease) {
- $ret .= $this->_makeReleaseXml($oldrelease, true);
- }
- $ret .= " </changelog>\n";
- }
- $ret .= "</package>\n";
- return $ret;
- }
-
- // }}}
- // {{{ _makeReleaseXml()
-
- /**
- * Generate part of an XML description with release information.
- *
- * @param array $pkginfo array with release information
- * @param bool $changelog whether the result will be in a changelog element
- *
- * @return string XML data
- *
- * @access private
- */
- function _makeReleaseXml($pkginfo, $changelog = false, $state = PEAR_VALIDATE_NORMAL)
- {
- // XXX QUOTE ENTITIES IN PCDATA, OR EMBED IN CDATA BLOCKS!!
- $indent = $changelog ? " " : "";
- $ret = "$indent <release>\n";
- if (!empty($pkginfo['version'])) {
- $ret .= "$indent <version>$pkginfo[version]</version>\n";
- }
- if (!empty($pkginfo['release_date'])) {
- $ret .= "$indent <date>$pkginfo[release_date]</date>\n";
- }
- if (!empty($pkginfo['release_license'])) {
- $ret .= "$indent <license>$pkginfo[release_license]</license>\n";
- }
- if (!empty($pkginfo['release_state'])) {
- $ret .= "$indent <state>$pkginfo[release_state]</state>\n";
- }
- if (!empty($pkginfo['release_notes'])) {
- $ret .= "$indent <notes>".trim($this->_fixXmlEncoding($pkginfo['release_notes']))
- ."\n$indent </notes>\n";
- }
- if (!empty($pkginfo['release_warnings'])) {
- $ret .= "$indent <warnings>".$this->_fixXmlEncoding($pkginfo['release_warnings'])."</warnings>\n";
- }
- if (isset($pkginfo['release_deps']) && sizeof($pkginfo['release_deps']) > 0) {
- $ret .= "$indent <deps>\n";
- foreach ($pkginfo['release_deps'] as $dep) {
- $ret .= "$indent <dep type=\"$dep[type]\" rel=\"$dep[rel]\"";
- if (isset($dep['version'])) {
- $ret .= " version=\"$dep[version]\"";
- }
- if (isset($dep['optional'])) {
- $ret .= " optional=\"$dep[optional]\"";
- }
- if (isset($dep['name'])) {
- $ret .= ">$dep[name]</dep>\n";
- } else {
- $ret .= "/>\n";
- }
- }
- $ret .= "$indent </deps>\n";
- }
- if (isset($pkginfo['configure_options'])) {
- $ret .= "$indent <configureoptions>\n";
- foreach ($pkginfo['configure_options'] as $c) {
- $ret .= "$indent <configureoption name=\"".
- $this->_fixXmlEncoding($c['name']) . "\"";
- if (isset($c['default'])) {
- $ret .= " default=\"" . $this->_fixXmlEncoding($c['default']) . "\"";
- }
- $ret .= " prompt=\"" . $this->_fixXmlEncoding($c['prompt']) . "\"";
- $ret .= "/>\n";
- }
- $ret .= "$indent </configureoptions>\n";
- }
- if (isset($pkginfo['provides'])) {
- foreach ($pkginfo['provides'] as $key => $what) {
- $ret .= "$indent <provides type=\"$what[type]\" ";
- $ret .= "name=\"$what[name]\" ";
- if (isset($what['extends'])) {
- $ret .= "extends=\"$what[extends]\" ";
- }
- $ret .= "/>\n";
- }
- }
- if (isset($pkginfo['filelist'])) {
- $ret .= "$indent <filelist>\n";
- if ($state ^ PEAR_VALIDATE_PACKAGING) {
- $ret .= $this->recursiveXmlFilelist($pkginfo['filelist']);
- } else {
- foreach ($pkginfo['filelist'] as $file => $fa) {
- if (!isset($fa['role'])) {
- $fa['role'] = '';
- }
- $ret .= "$indent <file role=\"$fa[role]\"";
- if (isset($fa['baseinstalldir'])) {
- $ret .= ' baseinstalldir="' .
- $this->_fixXmlEncoding($fa['baseinstalldir']) . '"';
- }
- if (isset($fa['md5sum'])) {
- $ret .= " md5sum=\"$fa[md5sum]\"";
- }
- if (isset($fa['platform'])) {
- $ret .= " platform=\"$fa[platform]\"";
- }
- if (!empty($fa['install-as'])) {
- $ret .= ' install-as="' .
- $this->_fixXmlEncoding($fa['install-as']) . '"';
- }
- $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"';
- if (empty($fa['replacements'])) {
- $ret .= "/>\n";
- } else {
- $ret .= ">\n";
- foreach ($fa['replacements'] as $r) {
- $ret .= "$indent <replace";
- foreach ($r as $k => $v) {
- $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"';
- }
- $ret .= "/>\n";
- }
- $ret .= "$indent </file>\n";
- }
- }
- }
- $ret .= "$indent </filelist>\n";
- }
- $ret .= "$indent </release>\n";
- return $ret;
- }
-
- /**
- * @param array
- * @access protected
- */
- function recursiveXmlFilelist($list)
- {
- $this->_dirs = array();
- foreach ($list as $file => $attributes) {
- $this->_addDir($this->_dirs, explode('/', dirname($file)), $file, $attributes);
- }
- return $this->_formatDir($this->_dirs);
- }
-
- /**
- * @param array
- * @param array
- * @param string|null
- * @param array|null
- * @access private
- */
- function _addDir(&$dirs, $dir, $file = null, $attributes = null)
- {
- if ($dir == array() || $dir == array('.')) {
- $dirs['files'][basename($file)] = $attributes;
- return;
- }
- $curdir = array_shift($dir);
- if (!isset($dirs['dirs'][$curdir])) {
- $dirs['dirs'][$curdir] = array();
- }
- $this->_addDir($dirs['dirs'][$curdir], $dir, $file, $attributes);
- }
-
- /**
- * @param array
- * @param string
- * @param string
- * @access private
- */
- function _formatDir($dirs, $indent = '', $curdir = '')
- {
- $ret = '';
- if (!count($dirs)) {
- return '';
- }
- if (isset($dirs['dirs'])) {
- uksort($dirs['dirs'], 'strnatcasecmp');
- foreach ($dirs['dirs'] as $dir => $contents) {
- $usedir = "$curdir/$dir";
- $ret .= "$indent <dir name=\"$dir\">\n";
- $ret .= $this->_formatDir($contents, "$indent ", $usedir);
- $ret .= "$indent </dir> <!-- $usedir -->\n";
- }
- }
- if (isset($dirs['files'])) {
- uksort($dirs['files'], 'strnatcasecmp');
- foreach ($dirs['files'] as $file => $attribs) {
- $ret .= $this->_formatFile($file, $attribs, $indent);
- }
- }
- return $ret;
- }
-
- /**
- * @param string
- * @param array
- * @param string
- * @access private
- */
- function _formatFile($file, $attributes, $indent)
- {
- $ret = "$indent <file role=\"$attributes[role]\"";
- if (isset($attributes['baseinstalldir'])) {
- $ret .= ' baseinstalldir="' .
- $this->_fixXmlEncoding($attributes['baseinstalldir']) . '"';
- }
- if (isset($attributes['md5sum'])) {
- $ret .= " md5sum=\"$attributes[md5sum]\"";
- }
- if (isset($attributes['platform'])) {
- $ret .= " platform=\"$attributes[platform]\"";
- }
- if (!empty($attributes['install-as'])) {
- $ret .= ' install-as="' .
- $this->_fixXmlEncoding($attributes['install-as']) . '"';
- }
- $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"';
- if (empty($attributes['replacements'])) {
- $ret .= "/>\n";
- } else {
- $ret .= ">\n";
- foreach ($attributes['replacements'] as $r) {
- $ret .= "$indent <replace";
- foreach ($r as $k => $v) {
- $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"';
- }
- $ret .= "/>\n";
- }
- $ret .= "$indent </file>\n";
- }
- return $ret;
- }
-
- // {{{ _unIndent()
-
- /**
- * Unindent given string (?)
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- }
- }
- return $data;
- }
-
- /**
- * @return array
- */
- function dependenciesToV2()
- {
- $arr = array();
- $this->_convertDependencies2_0($arr);
- return $arr['dependencies'];
- }
-
- /**
- * Convert a package.xml version 1.0 into version 2.0
- *
- * Note that this does a basic conversion, to allow more advanced
- * features like bundles and multiple releases
- * @param string the classname to instantiate and return. This must be
- * PEAR_PackageFile_v2 or a descendant
- * @param boolean if true, only valid, deterministic package.xml 1.0 as defined by the
- * strictest parameters will be converted
- * @return PEAR_PackageFile_v2|PEAR_Error
- */
- function &toV2($class = 'PEAR_PackageFile_v2', $strict = false)
- {
- if ($strict) {
- if (!$this->_packagefile->validate()) {
- $a = PEAR::raiseError('invalid package.xml version 1.0 cannot be converted' .
- ' to version 2.0', null, null, null,
- $this->_packagefile->getValidationWarnings(true));
- return $a;
- }
- }
-
- $arr = array(
- 'attribs' => array(
- 'version' => '2.0',
- 'xmlns' => 'http://pear.php.net/dtd/package-2.0',
- 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
- 'xsi:schemaLocation' => "http://pear.php.net/dtd/tasks-1.0\n" .
-"http://pear.php.net/dtd/tasks-1.0.xsd\n" .
-"http://pear.php.net/dtd/package-2.0\n" .
-'http://pear.php.net/dtd/package-2.0.xsd',
- ),
- 'name' => $this->_packagefile->getPackage(),
- 'channel' => 'pear.php.net',
- );
- $arr['summary'] = $this->_packagefile->getSummary();
- $arr['description'] = $this->_packagefile->getDescription();
- $maintainers = $this->_packagefile->getMaintainers();
- foreach ($maintainers as $maintainer) {
- if ($maintainer['role'] != 'lead') {
- continue;
- }
- $new = array(
- 'name' => $maintainer['name'],
- 'user' => $maintainer['handle'],
- 'email' => $maintainer['email'],
- 'active' => 'yes',
- );
- $arr['lead'][] = $new;
- }
-
- if (!isset($arr['lead'])) { // some people... you know?
- $arr['lead'] = array(
- 'name' => 'unknown',
- 'user' => 'unknown',
- 'email' => 'noleadmaintainer@example.com',
- 'active' => 'no',
- );
- }
-
- if (count($arr['lead']) == 1) {
- $arr['lead'] = $arr['lead'][0];
- }
-
- foreach ($maintainers as $maintainer) {
- if ($maintainer['role'] == 'lead') {
- continue;
- }
- $new = array(
- 'name' => $maintainer['name'],
- 'user' => $maintainer['handle'],
- 'email' => $maintainer['email'],
- 'active' => 'yes',
- );
- $arr[$maintainer['role']][] = $new;
- }
-
- if (isset($arr['developer']) && count($arr['developer']) == 1) {
- $arr['developer'] = $arr['developer'][0];
- }
-
- if (isset($arr['contributor']) && count($arr['contributor']) == 1) {
- $arr['contributor'] = $arr['contributor'][0];
- }
-
- if (isset($arr['helper']) && count($arr['helper']) == 1) {
- $arr['helper'] = $arr['helper'][0];
- }
-
- $arr['date'] = $this->_packagefile->getDate();
- $arr['version'] =
- array(
- 'release' => $this->_packagefile->getVersion(),
- 'api' => $this->_packagefile->getVersion(),
- );
- $arr['stability'] =
- array(
- 'release' => $this->_packagefile->getState(),
- 'api' => $this->_packagefile->getState(),
- );
- $licensemap =
- array(
- 'php' => 'http://www.php.net/license',
- 'php license' => 'http://www.php.net/license',
- 'lgpl' => 'http://www.gnu.org/copyleft/lesser.html',
- 'bsd' => 'http://www.opensource.org/licenses/bsd-license.php',
- 'bsd style' => 'http://www.opensource.org/licenses/bsd-license.php',
- 'bsd-style' => 'http://www.opensource.org/licenses/bsd-license.php',
- 'mit' => 'http://www.opensource.org/licenses/mit-license.php',
- 'gpl' => 'http://www.gnu.org/copyleft/gpl.html',
- 'apache' => 'http://www.opensource.org/licenses/apache2.0.php'
- );
-
- if (isset($licensemap[strtolower($this->_packagefile->getLicense())])) {
- $arr['license'] = array(
- 'attribs' => array('uri' =>
- $licensemap[strtolower($this->_packagefile->getLicense())]),
- '_content' => $this->_packagefile->getLicense()
- );
- } else {
- // don't use bogus uri
- $arr['license'] = $this->_packagefile->getLicense();
- }
-
- $arr['notes'] = $this->_packagefile->getNotes();
- $temp = array();
- $arr['contents'] = $this->_convertFilelist2_0($temp);
- $this->_convertDependencies2_0($arr);
- $release = ($this->_packagefile->getConfigureOptions() || $this->_isExtension) ?
- 'extsrcrelease' : 'phprelease';
- if ($release == 'extsrcrelease') {
- $arr['channel'] = 'pecl.php.net';
- $arr['providesextension'] = $arr['name']; // assumption
- }
-
- $arr[$release] = array();
- if ($this->_packagefile->getConfigureOptions()) {
- $arr[$release]['configureoption'] = $this->_packagefile->getConfigureOptions();
- foreach ($arr[$release]['configureoption'] as $i => $opt) {
- $arr[$release]['configureoption'][$i] = array('attribs' => $opt);
- }
- if (count($arr[$release]['configureoption']) == 1) {
- $arr[$release]['configureoption'] = $arr[$release]['configureoption'][0];
- }
- }
-
- $this->_convertRelease2_0($arr[$release], $temp);
- if ($release == 'extsrcrelease' && count($arr[$release]) > 1) {
- // multiple extsrcrelease tags added in PEAR 1.4.1
- $arr['dependencies']['required']['pearinstaller']['min'] = '1.4.1';
- }
-
- if ($cl = $this->_packagefile->getChangelog()) {
- foreach ($cl as $release) {
- $rel = array();
- $rel['version'] =
- array(
- 'release' => $release['version'],
- 'api' => $release['version'],
- );
- if (!isset($release['release_state'])) {
- $release['release_state'] = 'stable';
- }
-
- $rel['stability'] =
- array(
- 'release' => $release['release_state'],
- 'api' => $release['release_state'],
- );
- if (isset($release['release_date'])) {
- $rel['date'] = $release['release_date'];
- } else {
- $rel['date'] = date('Y-m-d');
- }
-
- if (isset($release['release_license'])) {
- if (isset($licensemap[strtolower($release['release_license'])])) {
- $uri = $licensemap[strtolower($release['release_license'])];
- } else {
- $uri = 'http://www.example.com';
- }
- $rel['license'] = array(
- 'attribs' => array('uri' => $uri),
- '_content' => $release['release_license']
- );
- } else {
- $rel['license'] = $arr['license'];
- }
-
- if (!isset($release['release_notes'])) {
- $release['release_notes'] = 'no release notes';
- }
-
- $rel['notes'] = $release['release_notes'];
- $arr['changelog']['release'][] = $rel;
- }
- }
-
- $ret = new $class;
- $ret->setConfig($this->_packagefile->_config);
- if (isset($this->_packagefile->_logger) && is_object($this->_packagefile->_logger)) {
- $ret->setLogger($this->_packagefile->_logger);
- }
-
- $ret->fromArray($arr);
- return $ret;
- }
-
- /**
- * @param array
- * @param bool
- * @access private
- */
- function _convertDependencies2_0(&$release, $internal = false)
- {
- $peardep = array('pearinstaller' =>
- array('min' => '1.4.0b1')); // this is a lot safer
- $required = $optional = array();
- $release['dependencies'] = array('required' => array());
- if ($this->_packagefile->hasDeps()) {
- foreach ($this->_packagefile->getDeps() as $dep) {
- if (!isset($dep['optional']) || $dep['optional'] == 'no') {
- $required[] = $dep;
- } else {
- $optional[] = $dep;
- }
- }
- foreach (array('required', 'optional') as $arr) {
- $deps = array();
- foreach ($$arr as $dep) {
- // organize deps by dependency type and name
- if (!isset($deps[$dep['type']])) {
- $deps[$dep['type']] = array();
- }
- if (isset($dep['name'])) {
- $deps[$dep['type']][$dep['name']][] = $dep;
- } else {
- $deps[$dep['type']][] = $dep;
- }
- }
- do {
- if (isset($deps['php'])) {
- $php = array();
- if (count($deps['php']) > 1) {
- $php = $this->_processPhpDeps($deps['php']);
- } else {
- if (!isset($deps['php'][0])) {
- list($key, $blah) = each ($deps['php']); // stupid buggy versions
- $deps['php'] = array($blah[0]);
- }
- $php = $this->_processDep($deps['php'][0]);
- if (!$php) {
- break; // poor mans throw
- }
- }
- $release['dependencies'][$arr]['php'] = $php;
- }
- } while (false);
- do {
- if (isset($deps['pkg'])) {
- $pkg = array();
- $pkg = $this->_processMultipleDepsName($deps['pkg']);
- if (!$pkg) {
- break; // poor mans throw
- }
- $release['dependencies'][$arr]['package'] = $pkg;
- }
- } while (false);
- do {
- if (isset($deps['ext'])) {
- $pkg = array();
- $pkg = $this->_processMultipleDepsName($deps['ext']);
- $release['dependencies'][$arr]['extension'] = $pkg;
- }
- } while (false);
- // skip sapi - it's not supported so nobody will have used it
- // skip os - it's not supported in 1.0
- }
- }
- if (isset($release['dependencies']['required'])) {
- $release['dependencies']['required'] =
- array_merge($peardep, $release['dependencies']['required']);
- } else {
- $release['dependencies']['required'] = $peardep;
- }
- if (!isset($release['dependencies']['required']['php'])) {
- $release['dependencies']['required']['php'] =
- array('min' => '4.0.0');
- }
- $order = array();
- $bewm = $release['dependencies']['required'];
- $order['php'] = $bewm['php'];
- $order['pearinstaller'] = $bewm['pearinstaller'];
- isset($bewm['package']) ? $order['package'] = $bewm['package'] :0;
- isset($bewm['extension']) ? $order['extension'] = $bewm['extension'] :0;
- $release['dependencies']['required'] = $order;
- }
-
- /**
- * @param array
- * @access private
- */
- function _convertFilelist2_0(&$package)
- {
- $ret = array('dir' =>
- array(
- 'attribs' => array('name' => '/'),
- 'file' => array()
- )
- );
- $package['platform'] =
- $package['install-as'] = array();
- $this->_isExtension = false;
- foreach ($this->_packagefile->getFilelist() as $name => $file) {
- $file['name'] = $name;
- if (isset($file['role']) && $file['role'] == 'src') {
- $this->_isExtension = true;
- }
- if (isset($file['replacements'])) {
- $repl = $file['replacements'];
- unset($file['replacements']);
- } else {
- unset($repl);
- }
- if (isset($file['install-as'])) {
- $package['install-as'][$name] = $file['install-as'];
- unset($file['install-as']);
- }
- if (isset($file['platform'])) {
- $package['platform'][$name] = $file['platform'];
- unset($file['platform']);
- }
- $file = array('attribs' => $file);
- if (isset($repl)) {
- foreach ($repl as $replace ) {
- $file['tasks:replace'][] = array('attribs' => $replace);
- }
- if (count($repl) == 1) {
- $file['tasks:replace'] = $file['tasks:replace'][0];
- }
- }
- $ret['dir']['file'][] = $file;
- }
- return $ret;
- }
-
- /**
- * Post-process special files with install-as/platform attributes and
- * make the release tag.
- *
- * This complex method follows this work-flow to create the release tags:
- *
- * <pre>
- * - if any install-as/platform exist, create a generic release and fill it with
- * o <install as=..> tags for <file name=... install-as=...>
- * o <install as=..> tags for <file name=... platform=!... install-as=..>
- * o <ignore> tags for <file name=... platform=...>
- * o <ignore> tags for <file name=... platform=... install-as=..>
- * - create a release for each platform encountered and fill with
- * o <install as..> tags for <file name=... install-as=...>
- * o <install as..> tags for <file name=... platform=this platform install-as=..>
- * o <install as..> tags for <file name=... platform=!other platform install-as=..>
- * o <ignore> tags for <file name=... platform=!this platform>
- * o <ignore> tags for <file name=... platform=other platform>
- * o <ignore> tags for <file name=... platform=other platform install-as=..>
- * o <ignore> tags for <file name=... platform=!this platform install-as=..>
- * </pre>
- *
- * It does this by accessing the $package parameter, which contains an array with
- * indices:
- *
- * - platform: mapping of file => OS the file should be installed on
- * - install-as: mapping of file => installed name
- * - osmap: mapping of OS => list of files that should be installed
- * on that OS
- * - notosmap: mapping of OS => list of files that should not be
- * installed on that OS
- *
- * @param array
- * @param array
- * @access private
- */
- function _convertRelease2_0(&$release, $package)
- {
- //- if any install-as/platform exist, create a generic release and fill it with
- if (count($package['platform']) || count($package['install-as'])) {
- $generic = array();
- $genericIgnore = array();
- foreach ($package['install-as'] as $file => $as) {
- //o <install as=..> tags for <file name=... install-as=...>
- if (!isset($package['platform'][$file])) {
- $generic[] = $file;
- continue;
- }
- //o <install as=..> tags for <file name=... platform=!... install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file]{0} == '!') {
- $generic[] = $file;
- continue;
- }
- //o <ignore> tags for <file name=... platform=... install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file]{0} != '!') {
- $genericIgnore[] = $file;
- continue;
- }
- }
- foreach ($package['platform'] as $file => $platform) {
- if (isset($package['install-as'][$file])) {
- continue;
- }
- if ($platform{0} != '!') {
- //o <ignore> tags for <file name=... platform=...>
- $genericIgnore[] = $file;
- }
- }
- if (count($package['platform'])) {
- $oses = $notplatform = $platform = array();
- foreach ($package['platform'] as $file => $os) {
- // get a list of oses
- if ($os{0} == '!') {
- if (isset($oses[substr($os, 1)])) {
- continue;
- }
- $oses[substr($os, 1)] = count($oses);
- } else {
- if (isset($oses[$os])) {
- continue;
- }
- $oses[$os] = count($oses);
- }
- }
- //- create a release for each platform encountered and fill with
- foreach ($oses as $os => $releaseNum) {
- $release[$releaseNum]['installconditions']['os']['name'] = $os;
- $release[$releaseNum]['filelist'] = array('install' => array(),
- 'ignore' => array());
- foreach ($package['install-as'] as $file => $as) {
- //o <install as=..> tags for <file name=... install-as=...>
- if (!isset($package['platform'][$file])) {
- $release[$releaseNum]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $as,
- ),
- );
- continue;
- }
- //o <install as..> tags for
- // <file name=... platform=this platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file] == $os) {
- $release[$releaseNum]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $as,
- ),
- );
- continue;
- }
- //o <install as..> tags for
- // <file name=... platform=!other platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file] != "!$os" &&
- $package['platform'][$file]{0} == '!') {
- $release[$releaseNum]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $as,
- ),
- );
- continue;
- }
- //o <ignore> tags for
- // <file name=... platform=!this platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file] == "!$os") {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- continue;
- }
- //o <ignore> tags for
- // <file name=... platform=other platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file]{0} != '!' &&
- $package['platform'][$file] != $os) {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- continue;
- }
- }
- foreach ($package['platform'] as $file => $platform) {
- if (isset($package['install-as'][$file])) {
- continue;
- }
- //o <ignore> tags for <file name=... platform=!this platform>
- if ($platform == "!$os") {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- continue;
- }
- //o <ignore> tags for <file name=... platform=other platform>
- if ($platform{0} != '!' && $platform != $os) {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- }
- }
- if (!count($release[$releaseNum]['filelist']['install'])) {
- unset($release[$releaseNum]['filelist']['install']);
- }
- if (!count($release[$releaseNum]['filelist']['ignore'])) {
- unset($release[$releaseNum]['filelist']['ignore']);
- }
- }
- if (count($generic) || count($genericIgnore)) {
- $release[count($oses)] = array();
- if (count($generic)) {
- foreach ($generic as $file) {
- if (isset($package['install-as'][$file])) {
- $installas = $package['install-as'][$file];
- } else {
- $installas = $file;
- }
- $release[count($oses)]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $installas,
- )
- );
- }
- }
- if (count($genericIgnore)) {
- foreach ($genericIgnore as $file) {
- $release[count($oses)]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- )
- );
- }
- }
- }
- // cleanup
- foreach ($release as $i => $rel) {
- if (isset($rel['filelist']['install']) &&
- count($rel['filelist']['install']) == 1) {
- $release[$i]['filelist']['install'] =
- $release[$i]['filelist']['install'][0];
- }
- if (isset($rel['filelist']['ignore']) &&
- count($rel['filelist']['ignore']) == 1) {
- $release[$i]['filelist']['ignore'] =
- $release[$i]['filelist']['ignore'][0];
- }
- }
- if (count($release) == 1) {
- $release = $release[0];
- }
- } else {
- // no platform atts, but some install-as atts
- foreach ($package['install-as'] as $file => $value) {
- $release['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $value
- )
- );
- }
- if (count($release['filelist']['install']) == 1) {
- $release['filelist']['install'] = $release['filelist']['install'][0];
- }
- }
- }
- }
-
- /**
- * @param array
- * @return array
- * @access private
- */
- function _processDep($dep)
- {
- if ($dep['type'] == 'php') {
- if ($dep['rel'] == 'has') {
- // come on - everyone has php!
- return false;
- }
- }
- $php = array();
- if ($dep['type'] != 'php') {
- $php['name'] = $dep['name'];
- if ($dep['type'] == 'pkg') {
- $php['channel'] = 'pear.php.net';
- }
- }
- switch ($dep['rel']) {
- case 'gt' :
- $php['min'] = $dep['version'];
- $php['exclude'] = $dep['version'];
- break;
- case 'ge' :
- if (!isset($dep['version'])) {
- if ($dep['type'] == 'php') {
- if (isset($dep['name'])) {
- $dep['version'] = $dep['name'];
- }
- }
- }
- $php['min'] = $dep['version'];
- break;
- case 'lt' :
- $php['max'] = $dep['version'];
- $php['exclude'] = $dep['version'];
- break;
- case 'le' :
- $php['max'] = $dep['version'];
- break;
- case 'eq' :
- $php['min'] = $dep['version'];
- $php['max'] = $dep['version'];
- break;
- case 'ne' :
- $php['exclude'] = $dep['version'];
- break;
- case 'not' :
- $php['conflicts'] = 'yes';
- break;
- }
- return $php;
- }
-
- /**
- * @param array
- * @return array
- */
- function _processPhpDeps($deps)
- {
- $test = array();
- foreach ($deps as $dep) {
- $test[] = $this->_processDep($dep);
- }
- $min = array();
- $max = array();
- foreach ($test as $dep) {
- if (!$dep) {
- continue;
- }
- if (isset($dep['min'])) {
- $min[$dep['min']] = count($min);
- }
- if (isset($dep['max'])) {
- $max[$dep['max']] = count($max);
- }
- }
- if (count($min) > 0) {
- uksort($min, 'version_compare');
- }
- if (count($max) > 0) {
- uksort($max, 'version_compare');
- }
- if (count($min)) {
- // get the highest minimum
- $min = array_pop($a = array_flip($min));
- } else {
- $min = false;
- }
- if (count($max)) {
- // get the lowest maximum
- $max = array_shift($a = array_flip($max));
- } else {
- $max = false;
- }
- if ($min) {
- $php['min'] = $min;
- }
- if ($max) {
- $php['max'] = $max;
- }
- $exclude = array();
- foreach ($test as $dep) {
- if (!isset($dep['exclude'])) {
- continue;
- }
- $exclude[] = $dep['exclude'];
- }
- if (count($exclude)) {
- $php['exclude'] = $exclude;
- }
- return $php;
- }
-
- /**
- * process multiple dependencies that have a name, like package deps
- * @param array
- * @return array
- * @access private
- */
- function _processMultipleDepsName($deps)
- {
- $ret = $tests = array();
- foreach ($deps as $name => $dep) {
- foreach ($dep as $d) {
- $tests[$name][] = $this->_processDep($d);
- }
- }
-
- foreach ($tests as $name => $test) {
- $max = $min = $php = array();
- $php['name'] = $name;
- foreach ($test as $dep) {
- if (!$dep) {
- continue;
- }
- if (isset($dep['channel'])) {
- $php['channel'] = 'pear.php.net';
- }
- if (isset($dep['conflicts']) && $dep['conflicts'] == 'yes') {
- $php['conflicts'] = 'yes';
- }
- if (isset($dep['min'])) {
- $min[$dep['min']] = count($min);
- }
- if (isset($dep['max'])) {
- $max[$dep['max']] = count($max);
- }
- }
- if (count($min) > 0) {
- uksort($min, 'version_compare');
- }
- if (count($max) > 0) {
- uksort($max, 'version_compare');
- }
- if (count($min)) {
- // get the highest minimum
- $min = array_pop($a = array_flip($min));
- } else {
- $min = false;
- }
- if (count($max)) {
- // get the lowest maximum
- $max = array_shift($a = array_flip($max));
- } else {
- $max = false;
- }
- if ($min) {
- $php['min'] = $min;
- }
- if ($max) {
- $php['max'] = $max;
- }
- $exclude = array();
- foreach ($test as $dep) {
- if (!isset($dep['exclude'])) {
- continue;
- }
- $exclude[] = $dep['exclude'];
- }
- if (count($exclude)) {
- $php['exclude'] = $exclude;
- }
- $ret[] = $php;
- }
- return $ret;
- }
-}
-?>
-
-/**
- * package.xml generation class, package.xml version 2.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * file/dir manipulation routines
- */
-require_once 'System.php';
-require_once 'XML/Util.php';
-
-/**
- * This class converts a PEAR_PackageFile_v2 object into any output format.
- *
- * Supported output formats include array, XML string (using S. Schmidt's
- * XML_Serializer, slightly customized)
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Generator_v2
-{
- /**
- * default options for the serialization
- * @access private
- * @var array $_defaultOptions
- */
- var $_defaultOptions = array(
- 'indent' => ' ', // string used for indentation
- 'linebreak' => "\n", // string used for newlines
- 'typeHints' => false, // automatically add type hin attributes
- 'addDecl' => true, // add an XML declaration
- 'defaultTagName' => 'XML_Serializer_Tag', // tag used for indexed arrays or invalid names
- 'classAsTagName' => false, // use classname for objects in indexed arrays
- 'keyAttribute' => '_originalKey', // attribute where original key is stored
- 'typeAttribute' => '_type', // attribute for type (only if typeHints => true)
- 'classAttribute' => '_class', // attribute for class of objects (only if typeHints => true)
- 'scalarAsAttributes' => false, // scalar values (strings, ints,..) will be serialized as attribute
- 'prependAttributes' => '', // prepend string for attributes
- 'indentAttributes' => false, // indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column
- 'mode' => 'simplexml', // use 'simplexml' to use parent name as tagname if transforming an indexed array
- 'addDoctype' => false, // add a doctype declaration
- 'doctype' => null, // supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()}
- 'rootName' => 'package', // name of the root tag
- 'rootAttributes' => array(
- 'version' => '2.0',
- 'xmlns' => 'http://pear.php.net/dtd/package-2.0',
- 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
- 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0
-http://pear.php.net/dtd/tasks-1.0.xsd
-http://pear.php.net/dtd/package-2.0
-http://pear.php.net/dtd/package-2.0.xsd',
- ), // attributes of the root tag
- 'attributesArray' => 'attribs', // all values in this key will be treated as attributes
- 'contentName' => '_content', // this value will be used directly as content, instead of creating a new tag, may only be used in conjunction with attributesArray
- 'beautifyFilelist' => false,
- 'encoding' => 'UTF-8',
- );
-
- /**
- * options for the serialization
- * @access private
- * @var array $options
- */
- var $options = array();
-
- /**
- * current tag depth
- * @var integer $_tagDepth
- */
- var $_tagDepth = 0;
-
- /**
- * serilialized representation of the data
- * @var string $_serializedData
- */
- var $_serializedData = null;
- /**
- * @var PEAR_PackageFile_v2
- */
- var $_packagefile;
- /**
- * @param PEAR_PackageFile_v2
- */
- function __construct(&$packagefile)
- {
- $this->_packagefile = &$packagefile;
- if (isset($this->_packagefile->encoding)) {
- $this->_defaultOptions['encoding'] = $this->_packagefile->encoding;
- }
- }
-
- /**
- * @return string
- */
- function getPackagerVersion()
- {
- return '1.9.5';
- }
-
- /**
- * @param PEAR_Packager
- * @param bool generate a .tgz or a .tar
- * @param string|null temporary directory to package in
- */
- function toTgz(&$packager, $compress = true, $where = null)
- {
- $a = null;
- return $this->toTgz2($packager, $a, $compress, $where);
- }
-
- /**
- * Package up both a package.xml and package2.xml for the same release
- * @param PEAR_Packager
- * @param PEAR_PackageFile_v1
- * @param bool generate a .tgz or a .tar
- * @param string|null temporary directory to package in
- */
- function toTgz2(&$packager, &$pf1, $compress = true, $where = null)
- {
- require_once 'Archive/Tar.php';
- if (!$this->_packagefile->isEquivalent($pf1)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' .
- basename($pf1->getPackageFile()) .
- '" is not equivalent to "' . basename($this->_packagefile->getPackageFile())
- . '"');
- }
-
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . $where . '" could' .
- ' not be created');
- }
-
- $file = $where . DIRECTORY_SEPARATOR . 'package.xml';
- if (file_exists($file) && !is_file($file)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: unable to save package.xml as' .
- ' "' . $file .'"');
- }
-
- if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: invalid package.xml');
- }
-
- $ext = $compress ? '.tgz' : '.tar';
- $pkgver = $this->_packagefile->getPackage() . '-' . $this->_packagefile->getVersion();
- $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext;
- if (file_exists($dest_package) && !is_file($dest_package)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: cannot create tgz file "' .
- $dest_package . '"');
- }
-
- $pkgfile = $this->_packagefile->getPackageFile();
- if (!$pkgfile) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: package file object must ' .
- 'be created from a real file');
- }
-
- $pkgdir = dirname(realpath($pkgfile));
- $pkgfile = basename($pkgfile);
-
- // {{{ Create the package file list
- $filelist = array();
- $i = 0;
- $this->_packagefile->flattenFilelist();
- $contents = $this->_packagefile->getContents();
- if (isset($contents['bundledpackage'])) { // bundles of packages
- $contents = $contents['bundledpackage'];
- if (!isset($contents[0])) {
- $contents = array($contents);
- }
-
- $packageDir = $where;
- foreach ($contents as $i => $package) {
- $fname = $package;
- $file = $pkgdir . DIRECTORY_SEPARATOR . $fname;
- if (!file_exists($file)) {
- return $packager->raiseError("File does not exist: $fname");
- }
-
- $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname;
- System::mkdir(array('-p', dirname($tfile)));
- copy($file, $tfile);
- $filelist[$i++] = $tfile;
- $packager->log(2, "Adding package $fname");
- }
- } else { // normal packages
- $contents = $contents['dir']['file'];
- if (!isset($contents[0])) {
- $contents = array($contents);
- }
-
- $packageDir = $where;
- foreach ($contents as $i => $file) {
- $fname = $file['attribs']['name'];
- $atts = $file['attribs'];
- $orig = $file;
- $file = $pkgdir . DIRECTORY_SEPARATOR . $fname;
- if (!file_exists($file)) {
- return $packager->raiseError("File does not exist: $fname");
- }
-
- $origperms = fileperms($file);
- $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname;
- unset($orig['attribs']);
- if (count($orig)) { // file with tasks
- // run any package-time tasks
- $contents = file_get_contents($file);
- foreach ($orig as $tag => $raw) {
- $tag = str_replace(
- array($this->_packagefile->getTasksNs() . ':', '-'),
- array('', '_'), $tag);
- $task = "PEAR_Task_$tag";
- $task = new $task($this->_packagefile->_config,
- $this->_packagefile->_logger,
- PEAR_TASK_PACKAGE);
- $task->init($raw, $atts, null);
- $res = $task->startSession($this->_packagefile, $contents, $tfile);
- if (!$res) {
- continue; // skip this task
- }
-
- if (PEAR::isError($res)) {
- return $res;
- }
-
- $contents = $res; // save changes
- System::mkdir(array('-p', dirname($tfile)));
- $wp = fopen($tfile, "wb");
- fwrite($wp, $contents);
- fclose($wp);
- }
- }
-
- if (!file_exists($tfile)) {
- System::mkdir(array('-p', dirname($tfile)));
- copy($file, $tfile);
- }
-
- chmod($tfile, $origperms);
- $filelist[$i++] = $tfile;
- $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($tfile), $i - 1);
- $packager->log(2, "Adding file $fname");
- }
- }
- // }}}
-
- $name = $pf1 !== null ? 'package2.xml' : 'package.xml';
- $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, $name);
- if ($packagexml) {
- $tar = new Archive_Tar($dest_package, $compress);
- $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors
- // ----- Creates with the package.xml file
- $ok = $tar->createModify(array($packagexml), '', $where);
- if (PEAR::isError($ok)) {
- return $packager->raiseError($ok);
- } elseif (!$ok) {
- return $packager->raiseError('PEAR_Packagefile_v2::toTgz(): adding ' . $name .
- ' failed');
- }
-
- // ----- Add the content of the package
- if (!$tar->addModify($filelist, $pkgver, $where)) {
- return $packager->raiseError(
- 'PEAR_Packagefile_v2::toTgz(): tarball creation failed');
- }
-
- // add the package.xml version 1.0
- if ($pf1 !== null) {
- $pfgen = &$pf1->getDefaultGenerator();
- $packagexml1 = $pfgen->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true);
- if (!$tar->addModify(array($packagexml1), '', $where)) {
- return $packager->raiseError(
- 'PEAR_Packagefile_v2::toTgz(): adding package.xml failed');
- }
- }
-
- return $dest_package;
- }
- }
-
- function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml')
- {
- if (!$this->_packagefile->validate($state)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: invalid package.xml',
- null, null, null, $this->_packagefile->getValidationWarnings());
- }
-
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: "' . $where . '" could' .
- ' not be created');
- }
-
- $newpkgfile = $where . DIRECTORY_SEPARATOR . $name;
- $np = @fopen($newpkgfile, 'wb');
- if (!$np) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: unable to save ' .
- "$name as $newpkgfile");
- }
- fwrite($np, $this->toXml($state));
- fclose($np);
- return $newpkgfile;
- }
-
- function &toV2()
- {
- return $this->_packagefile;
- }
-
- /**
- * Return an XML document based on the package info (as returned
- * by the PEAR_Common::infoFrom* methods).
- *
- * @return string XML data
- */
- function toXml($state = PEAR_VALIDATE_NORMAL, $options = array())
- {
- $this->_packagefile->setDate(date('Y-m-d'));
- $this->_packagefile->setTime(date('H:i:s'));
- if (!$this->_packagefile->validate($state)) {
- return false;
- }
-
- if (is_array($options)) {
- $this->options = array_merge($this->_defaultOptions, $options);
- } else {
- $this->options = $this->_defaultOptions;
- }
-
- $arr = $this->_packagefile->getArray();
- if (isset($arr['filelist'])) {
- unset($arr['filelist']);
- }
-
- if (isset($arr['_lastversion'])) {
- unset($arr['_lastversion']);
- }
-
- // Fix the notes a little bit
- if (isset($arr['notes'])) {
- // This trims out the indenting, needs fixing
- $arr['notes'] = "\n" . trim($arr['notes']) . "\n";
- }
-
- if (isset($arr['changelog']) && !empty($arr['changelog'])) {
- // Fix for inconsistency how the array is filled depending on the changelog release amount
- if (!isset($arr['changelog']['release'][0])) {
- $release = $arr['changelog']['release'];
- unset($arr['changelog']['release']);
-
- $arr['changelog']['release'] = array();
- $arr['changelog']['release'][0] = $release;
- }
-
- foreach (array_keys($arr['changelog']['release']) as $key) {
- $c =& $arr['changelog']['release'][$key];
- if (isset($c['notes'])) {
- // This trims out the indenting, needs fixing
- $c['notes'] = "\n" . trim($c['notes']) . "\n";
- }
- }
- }
-
- if ($state ^ PEAR_VALIDATE_PACKAGING && !isset($arr['bundle'])) {
- $use = $this->_recursiveXmlFilelist($arr['contents']['dir']['file']);
- unset($arr['contents']['dir']['file']);
- if (isset($use['dir'])) {
- $arr['contents']['dir']['dir'] = $use['dir'];
- }
- if (isset($use['file'])) {
- $arr['contents']['dir']['file'] = $use['file'];
- }
- $this->options['beautifyFilelist'] = true;
- }
-
- $arr['attribs']['packagerversion'] = '1.9.5';
- if ($this->serialize($arr, $options)) {
- return $this->_serializedData . "\n";
- }
-
- return false;
- }
-
-
- function _recursiveXmlFilelist($list)
- {
- $dirs = array();
- if (isset($list['attribs'])) {
- $file = $list['attribs']['name'];
- unset($list['attribs']['name']);
- $attributes = $list['attribs'];
- $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes);
- } else {
- foreach ($list as $a) {
- $file = $a['attribs']['name'];
- $attributes = $a['attribs'];
- unset($a['attribs']);
- $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes, $a);
- }
- }
- $this->_formatDir($dirs);
- $this->_deFormat($dirs);
- return $dirs;
- }
-
- function _addDir(&$dirs, $dir, $file = null, $attributes = null, $tasks = null)
- {
- if (!$tasks) {
- $tasks = array();
- }
- if ($dir == array() || $dir == array('.')) {
- $dirs['file'][basename($file)] = $tasks;
- $attributes['name'] = basename($file);
- $dirs['file'][basename($file)]['attribs'] = $attributes;
- return;
- }
- $curdir = array_shift($dir);
- if (!isset($dirs['dir'][$curdir])) {
- $dirs['dir'][$curdir] = array();
- }
- $this->_addDir($dirs['dir'][$curdir], $dir, $file, $attributes, $tasks);
- }
-
- function _formatDir(&$dirs)
- {
- if (!count($dirs)) {
- return array();
- }
- $newdirs = array();
- if (isset($dirs['dir'])) {
- $newdirs['dir'] = $dirs['dir'];
- }
- if (isset($dirs['file'])) {
- $newdirs['file'] = $dirs['file'];
- }
- $dirs = $newdirs;
- if (isset($dirs['dir'])) {
- uksort($dirs['dir'], 'strnatcasecmp');
- foreach ($dirs['dir'] as $dir => $contents) {
- $this->_formatDir($dirs['dir'][$dir]);
- }
- }
- if (isset($dirs['file'])) {
- uksort($dirs['file'], 'strnatcasecmp');
- };
- }
-
- function _deFormat(&$dirs)
- {
- if (!count($dirs)) {
- return array();
- }
- $newdirs = array();
- if (isset($dirs['dir'])) {
- foreach ($dirs['dir'] as $dir => $contents) {
- $newdir = array();
- $newdir['attribs']['name'] = $dir;
- $this->_deFormat($contents);
- foreach ($contents as $tag => $val) {
- $newdir[$tag] = $val;
- }
- $newdirs['dir'][] = $newdir;
- }
- if (count($newdirs['dir']) == 1) {
- $newdirs['dir'] = $newdirs['dir'][0];
- }
- }
- if (isset($dirs['file'])) {
- foreach ($dirs['file'] as $name => $file) {
- $newdirs['file'][] = $file;
- }
- if (count($newdirs['file']) == 1) {
- $newdirs['file'] = $newdirs['file'][0];
- }
- }
- $dirs = $newdirs;
- }
-
- /**
- * reset all options to default options
- *
- * @access public
- * @see setOption(), XML_Unserializer()
- */
- function resetOptions()
- {
- $this->options = $this->_defaultOptions;
- }
-
- /**
- * set an option
- *
- * You can use this method if you do not want to set all options in the constructor
- *
- * @access public
- * @see resetOption(), XML_Serializer()
- */
- function setOption($name, $value)
- {
- $this->options[$name] = $value;
- }
-
- /**
- * sets several options at once
- *
- * You can use this method if you do not want to set all options in the constructor
- *
- * @access public
- * @see resetOption(), XML_Unserializer(), setOption()
- */
- function setOptions($options)
- {
- $this->options = array_merge($this->options, $options);
- }
-
- /**
- * serialize data
- *
- * @access public
- * @param mixed $data data to serialize
- * @return boolean true on success, pear error on failure
- */
- function serialize($data, $options = null)
- {
- // if options have been specified, use them instead
- // of the previously defined ones
- if (is_array($options)) {
- $optionsBak = $this->options;
- if (isset($options['overrideOptions']) && $options['overrideOptions'] == true) {
- $this->options = array_merge($this->_defaultOptions, $options);
- } else {
- $this->options = array_merge($this->options, $options);
- }
- } else {
- $optionsBak = null;
- }
-
- // start depth is zero
- $this->_tagDepth = 0;
- $this->_serializedData = '';
- // serialize an array
- if (is_array($data)) {
- $tagName = isset($this->options['rootName']) ? $this->options['rootName'] : 'array';
- $this->_serializedData .= $this->_serializeArray($data, $tagName, $this->options['rootAttributes']);
- }
-
- // add doctype declaration
- if ($this->options['addDoctype'] === true) {
- $this->_serializedData = XML_Util::getDoctypeDeclaration($tagName, $this->options['doctype'])
- . $this->options['linebreak']
- . $this->_serializedData;
- }
-
- // build xml declaration
- if ($this->options['addDecl']) {
- $atts = array();
- $encoding = isset($this->options['encoding']) ? $this->options['encoding'] : null;
- $this->_serializedData = XML_Util::getXMLDeclaration('1.0', $encoding)
- . $this->options['linebreak']
- . $this->_serializedData;
- }
-
-
- if ($optionsBak !== null) {
- $this->options = $optionsBak;
- }
-
- return true;
- }
-
- /**
- * get the result of the serialization
- *
- * @access public
- * @return string serialized XML
- */
- function getSerializedData()
- {
- if ($this->_serializedData === null) {
- return $this->raiseError('No serialized data available. Use XML_Serializer::serialize() first.', XML_SERIALIZER_ERROR_NO_SERIALIZATION);
- }
- return $this->_serializedData;
- }
-
- /**
- * serialize any value
- *
- * This method checks for the type of the value and calls the appropriate method
- *
- * @access private
- * @param mixed $value
- * @param string $tagName
- * @param array $attributes
- * @return string
- */
- function _serializeValue($value, $tagName = null, $attributes = array())
- {
- if (is_array($value)) {
- $xml = $this->_serializeArray($value, $tagName, $attributes);
- } elseif (is_object($value)) {
- $xml = $this->_serializeObject($value, $tagName);
- } else {
- $tag = array(
- 'qname' => $tagName,
- 'attributes' => $attributes,
- 'content' => $value
- );
- $xml = $this->_createXMLTag($tag);
- }
- return $xml;
- }
-
- /**
- * serialize an array
- *
- * @access private
- * @param array $array array to serialize
- * @param string $tagName name of the root tag
- * @param array $attributes attributes for the root tag
- * @return string $string serialized data
- * @uses XML_Util::isValidName() to check, whether key has to be substituted
- */
- function _serializeArray(&$array, $tagName = null, $attributes = array())
- {
- $_content = null;
-
- /**
- * check for special attributes
- */
- if ($this->options['attributesArray'] !== null) {
- if (isset($array[$this->options['attributesArray']])) {
- $attributes = $array[$this->options['attributesArray']];
- unset($array[$this->options['attributesArray']]);
- }
- /**
- * check for special content
- */
- if ($this->options['contentName'] !== null) {
- if (isset($array[$this->options['contentName']])) {
- $_content = $array[$this->options['contentName']];
- unset($array[$this->options['contentName']]);
- }
- }
- }
-
- /*
- * if mode is set to simpleXML, check whether
- * the array is associative or indexed
- */
- if (is_array($array) && $this->options['mode'] == 'simplexml') {
- $indexed = true;
- if (!count($array)) {
- $indexed = false;
- }
- foreach ($array as $key => $val) {
- if (!is_int($key)) {
- $indexed = false;
- break;
- }
- }
-
- if ($indexed && $this->options['mode'] == 'simplexml') {
- $string = '';
- foreach ($array as $key => $val) {
- if ($this->options['beautifyFilelist'] && $tagName == 'dir') {
- if (!isset($this->_curdir)) {
- $this->_curdir = '';
- }
- $savedir = $this->_curdir;
- if (isset($val['attribs'])) {
- if ($val['attribs']['name'] == '/') {
- $this->_curdir = '/';
- } else {
- if ($this->_curdir == '/') {
- $this->_curdir = '';
- }
- $this->_curdir .= '/' . $val['attribs']['name'];
- }
- }
- }
- $string .= $this->_serializeValue( $val, $tagName, $attributes);
- if ($this->options['beautifyFilelist'] && $tagName == 'dir') {
- $string .= ' <!-- ' . $this->_curdir . ' -->';
- if (empty($savedir)) {
- unset($this->_curdir);
- } else {
- $this->_curdir = $savedir;
- }
- }
-
- $string .= $this->options['linebreak'];
- // do indentation
- if ($this->options['indent'] !== null && $this->_tagDepth > 0) {
- $string .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
- }
- return rtrim($string);
- }
- }
-
- if ($this->options['scalarAsAttributes'] === true) {
- foreach ($array as $key => $value) {
- if (is_scalar($value) && (XML_Util::isValidName($key) === true)) {
- unset($array[$key]);
- $attributes[$this->options['prependAttributes'].$key] = $value;
- }
- }
- }
-
- // check for empty array => create empty tag
- if (empty($array)) {
- $tag = array(
- 'qname' => $tagName,
- 'content' => $_content,
- 'attributes' => $attributes
- );
-
- } else {
- $this->_tagDepth++;
- $tmp = $this->options['linebreak'];
- foreach ($array as $key => $value) {
- // do indentation
- if ($this->options['indent'] !== null && $this->_tagDepth > 0) {
- $tmp .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
-
- // copy key
- $origKey = $key;
- // key cannot be used as tagname => use default tag
- $valid = XML_Util::isValidName($key);
- if (PEAR::isError($valid)) {
- if ($this->options['classAsTagName'] && is_object($value)) {
- $key = get_class($value);
- } else {
- $key = $this->options['defaultTagName'];
- }
- }
- $atts = array();
- if ($this->options['typeHints'] === true) {
- $atts[$this->options['typeAttribute']] = gettype($value);
- if ($key !== $origKey) {
- $atts[$this->options['keyAttribute']] = (string)$origKey;
- }
-
- }
- if ($this->options['beautifyFilelist'] && $key == 'dir') {
- if (!isset($this->_curdir)) {
- $this->_curdir = '';
- }
- $savedir = $this->_curdir;
- if (isset($value['attribs'])) {
- if ($value['attribs']['name'] == '/') {
- $this->_curdir = '/';
- } else {
- $this->_curdir .= '/' . $value['attribs']['name'];
- }
- }
- }
-
- if (is_string($value) && $value && ($value{strlen($value) - 1} == "\n")) {
- $value .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
- $tmp .= $this->_createXMLTag(array(
- 'qname' => $key,
- 'attributes' => $atts,
- 'content' => $value )
- );
- if ($this->options['beautifyFilelist'] && $key == 'dir') {
- if (isset($value['attribs'])) {
- $tmp .= ' <!-- ' . $this->_curdir . ' -->';
- if (empty($savedir)) {
- unset($this->_curdir);
- } else {
- $this->_curdir = $savedir;
- }
- }
- }
- $tmp .= $this->options['linebreak'];
- }
-
- $this->_tagDepth--;
- if ($this->options['indent']!==null && $this->_tagDepth>0) {
- $tmp .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
-
- if (trim($tmp) === '') {
- $tmp = null;
- }
-
- $tag = array(
- 'qname' => $tagName,
- 'content' => $tmp,
- 'attributes' => $attributes
- );
- }
- if ($this->options['typeHints'] === true) {
- if (!isset($tag['attributes'][$this->options['typeAttribute']])) {
- $tag['attributes'][$this->options['typeAttribute']] = 'array';
- }
- }
-
- $string = $this->_createXMLTag($tag, false);
- return $string;
- }
-
- /**
- * create a tag from an array
- * this method awaits an array in the following format
- * array(
- * 'qname' => $tagName,
- * 'attributes' => array(),
- * 'content' => $content, // optional
- * 'namespace' => $namespace // optional
- * 'namespaceUri' => $namespaceUri // optional
- * )
- *
- * @access private
- * @param array $tag tag definition
- * @param boolean $replaceEntities whether to replace XML entities in content or not
- * @return string $string XML tag
- */
- function _createXMLTag($tag, $replaceEntities = true)
- {
- if ($this->options['indentAttributes'] !== false) {
- $multiline = true;
- $indent = str_repeat($this->options['indent'], $this->_tagDepth);
-
- if ($this->options['indentAttributes'] == '_auto') {
- $indent .= str_repeat(' ', (strlen($tag['qname'])+2));
-
- } else {
- $indent .= $this->options['indentAttributes'];
- }
- } else {
- $indent = $multiline = false;
- }
-
- if (is_array($tag['content'])) {
- if (empty($tag['content'])) {
- $tag['content'] = '';
- }
- } elseif(is_scalar($tag['content']) && (string)$tag['content'] == '') {
- $tag['content'] = '';
- }
-
- if (is_scalar($tag['content']) || is_null($tag['content'])) {
- if ($replaceEntities === true) {
- $replaceEntities = XML_UTIL_ENTITIES_XML;
- }
-
- $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak']);
- } elseif (is_array($tag['content'])) {
- $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']);
- } elseif (is_object($tag['content'])) {
- $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']);
- } elseif (is_resource($tag['content'])) {
- settype($tag['content'], 'string');
- $tag = XML_Util::createTagFromArray($tag, $replaceEntities);
- }
- return $tag;
- }
-}
-
-/**
- * package.xml parsing class, package.xml version 1.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * package.xml abstraction class
- */
-require_once 'PEAR/PackageFile/v1.php';
-/**
- * Parser for package.xml version 1.0
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: @PEAR-VER@
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Parser_v1
-{
- var $_registry;
- var $_config;
- var $_logger;
- /**
- * BC hack to allow PEAR_Common::infoFromString() to sort of
- * work with the version 2.0 format - there's no filelist though
- * @param PEAR_PackageFile_v2
- */
- function fromV2($packagefile)
- {
- $info = $packagefile->getArray(true);
- $ret = new PEAR_PackageFile_v1;
- $ret->fromArray($info['old']);
- }
-
- function setConfig(&$c)
- {
- $this->_config = &$c;
- $this->_registry = &$c->getRegistry();
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
-
- /**
- * @param string contents of package.xml file, version 1.0
- * @return bool success of parsing
- */
- function &parse($data, $file, $archive = false)
- {
- if (!extension_loaded('xml')) {
- return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension');
- }
- $xp = xml_parser_create();
- if (!$xp) {
- $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml');
- return $a;
- }
- xml_set_object($xp, $this);
- xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0');
- xml_set_character_data_handler($xp, '_pkginfo_cdata_1_0');
- xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false);
-
- $this->element_stack = array();
- $this->_packageInfo = array('provides' => array());
- $this->current_element = false;
- unset($this->dir_install);
- $this->_packageInfo['filelist'] = array();
- $this->filelist =& $this->_packageInfo['filelist'];
- $this->dir_names = array();
- $this->in_changelog = false;
- $this->d_i = 0;
- $this->cdata = '';
- $this->_isValid = true;
-
- if (!xml_parse($xp, $data, 1)) {
- $code = xml_get_error_code($xp);
- $line = xml_get_current_line_number($xp);
- xml_parser_free($xp);
- $a = &PEAR::raiseError(sprintf("XML error: %s at line %d",
- $str = xml_error_string($code), $line), 2);
- return $a;
- }
-
- xml_parser_free($xp);
-
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->_config);
- if (isset($this->_logger)) {
- $pf->setLogger($this->_logger);
- }
- $pf->setPackagefile($file, $archive);
- $pf->fromArray($this->_packageInfo);
- return $pf;
- }
- // {{{ _unIndent()
-
- /**
- * Unindent given string
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- } elseif (trim(substr($line, 0, $indent_len))) {
- $data .= ltrim($line);
- }
- }
- return $data;
- }
-
- // Support for package DTD v1.0:
- // {{{ _element_start_1_0()
-
- /**
- * XML parser callback for ending elements. Used for version 1.0
- * packages.
- *
- * @param resource $xp XML parser resource
- * @param string $name name of ending element
- *
- * @return void
- *
- * @access private
- */
- function _element_start_1_0($xp, $name, $attribs)
- {
- array_push($this->element_stack, $name);
- $this->current_element = $name;
- $spos = sizeof($this->element_stack) - 2;
- $this->prev_element = ($spos >= 0) ? $this->element_stack[$spos] : '';
- $this->current_attributes = $attribs;
- $this->cdata = '';
- switch ($name) {
- case 'dir':
- if ($this->in_changelog) {
- break;
- }
- if (array_key_exists('name', $attribs) && $attribs['name'] != '/') {
- $attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
- $attribs['name']);
- if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) {
- $attribs['name'] = substr($attribs['name'], 0,
- strlen($attribs['name']) - 1);
- }
- if (strpos($attribs['name'], '/') === 0) {
- $attribs['name'] = substr($attribs['name'], 1);
- }
- $this->dir_names[] = $attribs['name'];
- }
- if (isset($attribs['baseinstalldir'])) {
- $this->dir_install = $attribs['baseinstalldir'];
- }
- if (isset($attribs['role'])) {
- $this->dir_role = $attribs['role'];
- }
- break;
- case 'file':
- if ($this->in_changelog) {
- break;
- }
- if (isset($attribs['name'])) {
- $path = '';
- if (count($this->dir_names)) {
- foreach ($this->dir_names as $dir) {
- $path .= $dir . '/';
- }
- }
- $path .= preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
- $attribs['name']);
- unset($attribs['name']);
- $this->current_path = $path;
- $this->filelist[$path] = $attribs;
- // Set the baseinstalldir only if the file don't have this attrib
- if (!isset($this->filelist[$path]['baseinstalldir']) &&
- isset($this->dir_install))
- {
- $this->filelist[$path]['baseinstalldir'] = $this->dir_install;
- }
- // Set the Role
- if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) {
- $this->filelist[$path]['role'] = $this->dir_role;
- }
- }
- break;
- case 'replace':
- if (!$this->in_changelog) {
- $this->filelist[$this->current_path]['replacements'][] = $attribs;
- }
- break;
- case 'maintainers':
- $this->_packageInfo['maintainers'] = array();
- $this->m_i = 0; // maintainers array index
- break;
- case 'maintainer':
- // compatibility check
- if (!isset($this->_packageInfo['maintainers'])) {
- $this->_packageInfo['maintainers'] = array();
- $this->m_i = 0;
- }
- $this->_packageInfo['maintainers'][$this->m_i] = array();
- $this->current_maintainer =& $this->_packageInfo['maintainers'][$this->m_i];
- break;
- case 'changelog':
- $this->_packageInfo['changelog'] = array();
- $this->c_i = 0; // changelog array index
- $this->in_changelog = true;
- break;
- case 'release':
- if ($this->in_changelog) {
- $this->_packageInfo['changelog'][$this->c_i] = array();
- $this->current_release = &$this->_packageInfo['changelog'][$this->c_i];
- } else {
- $this->current_release = &$this->_packageInfo;
- }
- break;
- case 'deps':
- if (!$this->in_changelog) {
- $this->_packageInfo['release_deps'] = array();
- }
- break;
- case 'dep':
- // dependencies array index
- if (!$this->in_changelog) {
- $this->d_i++;
- isset($attribs['type']) ? ($attribs['type'] = strtolower($attribs['type'])) : false;
- $this->_packageInfo['release_deps'][$this->d_i] = $attribs;
- }
- break;
- case 'configureoptions':
- if (!$this->in_changelog) {
- $this->_packageInfo['configure_options'] = array();
- }
- break;
- case 'configureoption':
- if (!$this->in_changelog) {
- $this->_packageInfo['configure_options'][] = $attribs;
- }
- break;
- case 'provides':
- if (empty($attribs['type']) || empty($attribs['name'])) {
- break;
- }
- $attribs['explicit'] = true;
- $this->_packageInfo['provides']["$attribs[type];$attribs[name]"] = $attribs;
- break;
- case 'package' :
- if (isset($attribs['version'])) {
- $this->_packageInfo['xsdversion'] = trim($attribs['version']);
- } else {
- $this->_packageInfo['xsdversion'] = '1.0';
- }
- if (isset($attribs['packagerversion'])) {
- $this->_packageInfo['packagerversion'] = $attribs['packagerversion'];
- }
- break;
- }
- }
-
- // }}}
- // {{{ _element_end_1_0()
-
- /**
- * XML parser callback for ending elements. Used for version 1.0
- * packages.
- *
- * @param resource $xp XML parser resource
- * @param string $name name of ending element
- *
- * @return void
- *
- * @access private
- */
- function _element_end_1_0($xp, $name)
- {
- $data = trim($this->cdata);
- switch ($name) {
- case 'name':
- switch ($this->prev_element) {
- case 'package':
- $this->_packageInfo['package'] = $data;
- break;
- case 'maintainer':
- $this->current_maintainer['name'] = $data;
- break;
- }
- break;
- case 'extends' :
- $this->_packageInfo['extends'] = $data;
- break;
- case 'summary':
- $this->_packageInfo['summary'] = $data;
- break;
- case 'description':
- $data = $this->_unIndent($this->cdata);
- $this->_packageInfo['description'] = $data;
- break;
- case 'user':
- $this->current_maintainer['handle'] = $data;
- break;
- case 'email':
- $this->current_maintainer['email'] = $data;
- break;
- case 'role':
- $this->current_maintainer['role'] = $data;
- break;
- case 'version':
- if ($this->in_changelog) {
- $this->current_release['version'] = $data;
- } else {
- $this->_packageInfo['version'] = $data;
- }
- break;
- case 'date':
- if ($this->in_changelog) {
- $this->current_release['release_date'] = $data;
- } else {
- $this->_packageInfo['release_date'] = $data;
- }
- break;
- case 'notes':
- // try to "de-indent" release notes in case someone
- // has been over-indenting their xml ;-)
- // Trim only on the right side
- $data = rtrim($this->_unIndent($this->cdata));
- if ($this->in_changelog) {
- $this->current_release['release_notes'] = $data;
- } else {
- $this->_packageInfo['release_notes'] = $data;
- }
- break;
- case 'warnings':
- if ($this->in_changelog) {
- $this->current_release['release_warnings'] = $data;
- } else {
- $this->_packageInfo['release_warnings'] = $data;
- }
- break;
- case 'state':
- if ($this->in_changelog) {
- $this->current_release['release_state'] = $data;
- } else {
- $this->_packageInfo['release_state'] = $data;
- }
- break;
- case 'license':
- if ($this->in_changelog) {
- $this->current_release['release_license'] = $data;
- } else {
- $this->_packageInfo['release_license'] = $data;
- }
- break;
- case 'dep':
- if ($data && !$this->in_changelog) {
- $this->_packageInfo['release_deps'][$this->d_i]['name'] = $data;
- }
- break;
- case 'dir':
- if ($this->in_changelog) {
- break;
- }
- array_pop($this->dir_names);
- break;
- case 'file':
- if ($this->in_changelog) {
- break;
- }
- if ($data) {
- $path = '';
- if (count($this->dir_names)) {
- foreach ($this->dir_names as $dir) {
- $path .= $dir . '/';
- }
- }
- $path .= $data;
- $this->filelist[$path] = $this->current_attributes;
- // Set the baseinstalldir only if the file don't have this attrib
- if (!isset($this->filelist[$path]['baseinstalldir']) &&
- isset($this->dir_install))
- {
- $this->filelist[$path]['baseinstalldir'] = $this->dir_install;
- }
- // Set the Role
- if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) {
- $this->filelist[$path]['role'] = $this->dir_role;
- }
- }
- break;
- case 'maintainer':
- if (empty($this->_packageInfo['maintainers'][$this->m_i]['role'])) {
- $this->_packageInfo['maintainers'][$this->m_i]['role'] = 'lead';
- }
- $this->m_i++;
- break;
- case 'release':
- if ($this->in_changelog) {
- $this->c_i++;
- }
- break;
- case 'changelog':
- $this->in_changelog = false;
- break;
- }
- array_pop($this->element_stack);
- $spos = sizeof($this->element_stack) - 1;
- $this->current_element = ($spos > 0) ? $this->element_stack[$spos] : '';
- $this->cdata = '';
- }
-
- // }}}
- // {{{ _pkginfo_cdata_1_0()
-
- /**
- * XML parser callback for character data. Used for version 1.0
- * packages.
- *
- * @param resource $xp XML parser resource
- * @param string $name character data
- *
- * @return void
- *
- * @access private
- */
- function _pkginfo_cdata_1_0($xp, $data)
- {
- if (isset($this->cdata)) {
- $this->cdata .= $data;
- }
- }
-
- // }}}
-}
-?>
-/**
- * package.xml parsing class, package.xml version 2.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * base xml parser class
- */
-require_once 'PEAR/XMLParser.php';
-require_once 'PEAR/PackageFile/v2.php';
-/**
- * Parser for package.xml version 2.0
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: @PEAR-VER@
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
-{
- var $_config;
- var $_logger;
- var $_registry;
-
- function setConfig(&$c)
- {
- $this->_config = &$c;
- $this->_registry = &$c->getRegistry();
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
- /**
- * Unindent given string
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- } else {
- $data .= $line . "\n";
- }
- }
- return $data;
- }
-
- /**
- * post-process data
- *
- * @param string $data
- * @param string $element element name
- */
- function postProcess($data, $element)
- {
- if ($element == 'notes') {
- return trim($this->_unIndent($data));
- }
- return trim($data);
- }
-
- /**
- * @param string
- * @param string file name of the package.xml
- * @param string|false name of the archive this package.xml came from, if any
- * @param string class name to instantiate and return. This must be PEAR_PackageFile_v2 or
- * a subclass
- * @return PEAR_PackageFile_v2
- */
- function &parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2')
- {
- if (PEAR::isError($err = parent::parse($data, $file))) {
- return $err;
- }
-
- $ret = new $class;
- $ret->encoding = $this->encoding;
- $ret->setConfig($this->_config);
- if (isset($this->_logger)) {
- $ret->setLogger($this->_logger);
- }
-
- $ret->fromArray($this->_unserializedData);
- $ret->setPackagefile($file, $archive);
- return $ret;
- }
-}
-/**
- * PEAR_PackageFile_v2, package.xml version 2.0, read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a8
- */
-/**
- * For base class
- */
-require_once 'PEAR/PackageFile/v2.php';
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a8
- */
-class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2
-{
- /**
- * @param string Extension name
- * @return bool success of operation
- */
- function setProvidesExtension($extension)
- {
- if (in_array($this->getPackageType(),
- array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
- if (!isset($this->_packageInfo['providesextension'])) {
- // ensure that the channel tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease',
- 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'bundle', 'changelog'),
- $extension, 'providesextension');
- }
- $this->_packageInfo['providesextension'] = $extension;
- return true;
- }
- return false;
- }
-
- function setPackage($package)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['attribs'])) {
- $this->_packageInfo = array_merge(array('attribs' => array(
- 'version' => '2.0',
- 'xmlns' => 'http://pear.php.net/dtd/package-2.0',
- 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
- 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0
- http://pear.php.net/dtd/tasks-1.0.xsd
- http://pear.php.net/dtd/package-2.0
- http://pear.php.net/dtd/package-2.0.xsd',
- )), $this->_packageInfo);
- }
- if (!isset($this->_packageInfo['name'])) {
- return $this->_packageInfo = array_merge(array('name' => $package),
- $this->_packageInfo);
- }
- $this->_packageInfo['name'] = $package;
- }
-
- /**
- * set this as a package.xml version 2.1
- * @access private
- */
- function _setPackageVersion2_1()
- {
- $info = array(
- 'version' => '2.1',
- 'xmlns' => 'http://pear.php.net/dtd/package-2.1',
- 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
- 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0
- http://pear.php.net/dtd/tasks-1.0.xsd
- http://pear.php.net/dtd/package-2.1
- http://pear.php.net/dtd/package-2.1.xsd',
- );
- if (!isset($this->_packageInfo['attribs'])) {
- $this->_packageInfo = array_merge(array('attribs' => $info), $this->_packageInfo);
- } else {
- $this->_packageInfo['attribs'] = $info;
- }
- }
-
- function setUri($uri)
- {
- unset($this->_packageInfo['channel']);
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['uri'])) {
- // ensure that the uri tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('extends', 'summary', 'description', 'lead',
- 'developer', 'contributor', 'helper', 'date', 'time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), $uri, 'uri');
- }
- $this->_packageInfo['uri'] = $uri;
- }
-
- function setChannel($channel)
- {
- unset($this->_packageInfo['uri']);
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['channel'])) {
- // ensure that the channel tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('extends', 'summary', 'description', 'lead',
- 'developer', 'contributor', 'helper', 'date', 'time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), $channel, 'channel');
- }
- $this->_packageInfo['channel'] = $channel;
- }
-
- function setExtends($extends)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['extends'])) {
- // ensure that the extends tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('summary', 'description', 'lead',
- 'developer', 'contributor', 'helper', 'date', 'time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), $extends, 'extends');
- }
- $this->_packageInfo['extends'] = $extends;
- }
-
- function setSummary($summary)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['summary'])) {
- // ensure that the summary tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('description', 'lead',
- 'developer', 'contributor', 'helper', 'date', 'time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), $summary, 'summary');
- }
- $this->_packageInfo['summary'] = $summary;
- }
-
- function setDescription($desc)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['description'])) {
- // ensure that the description tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('lead',
- 'developer', 'contributor', 'helper', 'date', 'time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), $desc, 'description');
- }
- $this->_packageInfo['description'] = $desc;
- }
-
- /**
- * Adds a new maintainer - no checking of duplicates is performed, use
- * updatemaintainer for that purpose.
- */
- function addMaintainer($role, $handle, $name, $email, $active = 'yes')
- {
- if (!in_array($role, array('lead', 'developer', 'contributor', 'helper'))) {
- return false;
- }
- if (isset($this->_packageInfo[$role])) {
- if (!isset($this->_packageInfo[$role][0])) {
- $this->_packageInfo[$role] = array($this->_packageInfo[$role]);
- }
- $this->_packageInfo[$role][] =
- array(
- 'name' => $name,
- 'user' => $handle,
- 'email' => $email,
- 'active' => $active,
- );
- } else {
- $testarr = array('lead',
- 'developer', 'contributor', 'helper', 'date', 'time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease',
- 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog');
- foreach (array('lead', 'developer', 'contributor', 'helper') as $testrole) {
- array_shift($testarr);
- if ($role == $testrole) {
- break;
- }
- }
- if (!isset($this->_packageInfo[$role])) {
- // ensure that the extends tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo, $testarr,
- array(), $role);
- }
- $this->_packageInfo[$role] =
- array(
- 'name' => $name,
- 'user' => $handle,
- 'email' => $email,
- 'active' => $active,
- );
- }
- $this->_isValid = 0;
- }
-
- function updateMaintainer($newrole, $handle, $name, $email, $active = 'yes')
- {
- $found = false;
- foreach (array('lead', 'developer', 'contributor', 'helper') as $role) {
- if (!isset($this->_packageInfo[$role])) {
- continue;
- }
- $info = $this->_packageInfo[$role];
- if (!isset($info[0])) {
- if ($info['user'] == $handle) {
- $found = true;
- break;
- }
- }
- foreach ($info as $i => $maintainer) {
- if (is_array($maintainer) && $maintainer['user'] == $handle) {
- $found = $i;
- break 2;
- }
- }
- }
- if ($found === false) {
- return $this->addMaintainer($newrole, $handle, $name, $email, $active);
- }
- if ($found !== false) {
- if ($found === true) {
- unset($this->_packageInfo[$role]);
- } else {
- unset($this->_packageInfo[$role][$found]);
- $this->_packageInfo[$role] = array_values($this->_packageInfo[$role]);
- }
- }
- $this->addMaintainer($newrole, $handle, $name, $email, $active);
- $this->_isValid = 0;
- }
-
- function deleteMaintainer($handle)
- {
- $found = false;
- foreach (array('lead', 'developer', 'contributor', 'helper') as $role) {
- if (!isset($this->_packageInfo[$role])) {
- continue;
- }
- if (!isset($this->_packageInfo[$role][0])) {
- $this->_packageInfo[$role] = array($this->_packageInfo[$role]);
- }
- foreach ($this->_packageInfo[$role] as $i => $maintainer) {
- if ($maintainer['user'] == $handle) {
- $found = $i;
- break;
- }
- }
- if ($found !== false) {
- unset($this->_packageInfo[$role][$found]);
- if (!count($this->_packageInfo[$role]) && $role == 'lead') {
- $this->_isValid = 0;
- }
- if (!count($this->_packageInfo[$role])) {
- unset($this->_packageInfo[$role]);
- return true;
- }
- $this->_packageInfo[$role] =
- array_values($this->_packageInfo[$role]);
- if (count($this->_packageInfo[$role]) == 1) {
- $this->_packageInfo[$role] = $this->_packageInfo[$role][0];
- }
- return true;
- }
- if (count($this->_packageInfo[$role]) == 1) {
- $this->_packageInfo[$role] = $this->_packageInfo[$role][0];
- }
- }
- return false;
- }
-
- function setReleaseVersion($version)
- {
- if (isset($this->_packageInfo['version']) &&
- isset($this->_packageInfo['version']['release'])) {
- unset($this->_packageInfo['version']['release']);
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array(
- 'version' => array('stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'),
- 'release' => array('api')));
- $this->_isValid = 0;
- }
-
- function setAPIVersion($version)
- {
- if (isset($this->_packageInfo['version']) &&
- isset($this->_packageInfo['version']['api'])) {
- unset($this->_packageInfo['version']['api']);
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array(
- 'version' => array('stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'),
- 'api' => array()));
- $this->_isValid = 0;
- }
-
- /**
- * snapshot|devel|alpha|beta|stable
- */
- function setReleaseStability($state)
- {
- if (isset($this->_packageInfo['stability']) &&
- isset($this->_packageInfo['stability']['release'])) {
- unset($this->_packageInfo['stability']['release']);
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array(
- 'stability' => array('license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'),
- 'release' => array('api')));
- $this->_isValid = 0;
- }
-
- /**
- * @param devel|alpha|beta|stable
- */
- function setAPIStability($state)
- {
- if (isset($this->_packageInfo['stability']) &&
- isset($this->_packageInfo['stability']['api'])) {
- unset($this->_packageInfo['stability']['api']);
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array(
- 'stability' => array('license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'),
- 'api' => array()));
- $this->_isValid = 0;
- }
-
- function setLicense($license, $uri = false, $filesource = false)
- {
- if (!isset($this->_packageInfo['license'])) {
- // ensure that the license tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), 0, 'license');
- }
- if ($uri || $filesource) {
- $attribs = array();
- if ($uri) {
- $attribs['uri'] = $uri;
- }
- $uri = true; // for test below
- if ($filesource) {
- $attribs['filesource'] = $filesource;
- }
- }
- $license = $uri ? array('attribs' => $attribs, '_content' => $license) : $license;
- $this->_packageInfo['license'] = $license;
- $this->_isValid = 0;
- }
-
- function setNotes($notes)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['notes'])) {
- // ensure that the notes tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('contents', 'compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'extbinrelease', 'bundle', 'changelog'), $notes, 'notes');
- }
- $this->_packageInfo['notes'] = $notes;
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- * @param string file name
- * @param string installed path
- */
- function setInstalledAs($file, $path)
- {
- if ($path) {
- return $this->_packageInfo['filelist'][$file]['installed_as'] = $path;
- }
- unset($this->_packageInfo['filelist'][$file]['installed_as']);
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- */
- function installedFile($file, $atts)
- {
- if (isset($this->_packageInfo['filelist'][$file])) {
- $this->_packageInfo['filelist'][$file] =
- array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']);
- } else {
- $this->_packageInfo['filelist'][$file] = $atts['attribs'];
- }
- }
-
- /**
- * Reset the listing of package contents
- * @param string base installation dir for the whole package, if any
- */
- function clearContents($baseinstall = false)
- {
- $this->_filesValid = false;
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['contents'])) {
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('compatible',
- 'dependencies', 'providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease',
- 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'bundle', 'changelog'), array(), 'contents');
- }
- if ($this->getPackageType() != 'bundle') {
- $this->_packageInfo['contents'] =
- array('dir' => array('attribs' => array('name' => '/')));
- if ($baseinstall) {
- $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'] = $baseinstall;
- }
- } else {
- $this->_packageInfo['contents'] = array('bundledpackage' => array());
- }
- }
-
- /**
- * @param string relative path of the bundled package.
- */
- function addBundledPackage($path)
- {
- if ($this->getPackageType() != 'bundle') {
- return false;
- }
- $this->_filesValid = false;
- $this->_isValid = 0;
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $path, array(
- 'contents' => array('compatible', 'dependencies', 'providesextension',
- 'usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease',
- 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'bundle', 'changelog'),
- 'bundledpackage' => array()));
- }
-
- /**
- * @param string file name
- * @param PEAR_Task_Common a read/write task
- */
- function addTaskToFile($filename, $task)
- {
- if (!method_exists($task, 'getXml')) {
- return false;
- }
- if (!method_exists($task, 'getName')) {
- return false;
- }
- if (!method_exists($task, 'validate')) {
- return false;
- }
- if (!$task->validate()) {
- return false;
- }
- if (!isset($this->_packageInfo['contents']['dir']['file'])) {
- return false;
- }
- $this->getTasksNs(); // discover the tasks namespace if not done already
- $files = $this->_packageInfo['contents']['dir']['file'];
- if (!isset($files[0])) {
- $files = array($files);
- $ind = false;
- } else {
- $ind = true;
- }
- foreach ($files as $i => $file) {
- if (isset($file['attribs'])) {
- if ($file['attribs']['name'] == $filename) {
- if ($ind) {
- $t = isset($this->_packageInfo['contents']['dir']['file'][$i]
- ['attribs'][$this->_tasksNs .
- ':' . $task->getName()]) ?
- $this->_packageInfo['contents']['dir']['file'][$i]
- ['attribs'][$this->_tasksNs .
- ':' . $task->getName()] : false;
- if ($t && !isset($t[0])) {
- $this->_packageInfo['contents']['dir']['file'][$i]
- [$this->_tasksNs . ':' . $task->getName()] = array($t);
- }
- $this->_packageInfo['contents']['dir']['file'][$i][$this->_tasksNs .
- ':' . $task->getName()][] = $task->getXml();
- } else {
- $t = isset($this->_packageInfo['contents']['dir']['file']
- ['attribs'][$this->_tasksNs .
- ':' . $task->getName()]) ? $this->_packageInfo['contents']['dir']['file']
- ['attribs'][$this->_tasksNs .
- ':' . $task->getName()] : false;
- if ($t && !isset($t[0])) {
- $this->_packageInfo['contents']['dir']['file']
- [$this->_tasksNs . ':' . $task->getName()] = array($t);
- }
- $this->_packageInfo['contents']['dir']['file'][$this->_tasksNs .
- ':' . $task->getName()][] = $task->getXml();
- }
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * @param string path to the file
- * @param string filename
- * @param array extra attributes
- */
- function addFile($dir, $file, $attrs)
- {
- if ($this->getPackageType() == 'bundle') {
- return false;
- }
- $this->_filesValid = false;
- $this->_isValid = 0;
- $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir);
- if ($dir == '/' || $dir == '') {
- $dir = '';
- } else {
- $dir .= '/';
- }
- $attrs['name'] = $dir . $file;
- if (!isset($this->_packageInfo['contents'])) {
- // ensure that the contents tag is set up
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('compatible', 'dependencies', 'providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease',
- 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'bundle', 'changelog'), array(), 'contents');
- }
- if (isset($this->_packageInfo['contents']['dir']['file'])) {
- if (!isset($this->_packageInfo['contents']['dir']['file'][0])) {
- $this->_packageInfo['contents']['dir']['file'] =
- array($this->_packageInfo['contents']['dir']['file']);
- }
- $this->_packageInfo['contents']['dir']['file'][]['attribs'] = $attrs;
- } else {
- $this->_packageInfo['contents']['dir']['file']['attribs'] = $attrs;
- }
- }
-
- /**
- * @param string Dependent package name
- * @param string Dependent package's channel name
- * @param string minimum version of specified package that this release is guaranteed to be
- * compatible with
- * @param string maximum version of specified package that this release is guaranteed to be
- * compatible with
- * @param string versions of specified package that this release is not compatible with
- */
- function addCompatiblePackage($name, $channel, $min, $max, $exclude = false)
- {
- $this->_isValid = 0;
- $set = array(
- 'name' => $name,
- 'channel' => $channel,
- 'min' => $min,
- 'max' => $max,
- );
- if ($exclude) {
- $set['exclude'] = $exclude;
- }
- $this->_isValid = 0;
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array(
- 'compatible' => array('dependencies', 'providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')
- ));
- }
-
- /**
- * Removes the <usesrole> tag entirely
- */
- function resetUsesrole()
- {
- if (isset($this->_packageInfo['usesrole'])) {
- unset($this->_packageInfo['usesrole']);
- }
- }
-
- /**
- * @param string
- * @param string package name or uri
- * @param string channel name if non-uri
- */
- function addUsesrole($role, $packageOrUri, $channel = false) {
- $set = array('role' => $role);
- if ($channel) {
- $set['package'] = $packageOrUri;
- $set['channel'] = $channel;
- } else {
- $set['uri'] = $packageOrUri;
- }
- $this->_isValid = 0;
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array(
- 'usesrole' => array('usestask', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')
- ));
- }
-
- /**
- * Removes the <usestask> tag entirely
- */
- function resetUsestask()
- {
- if (isset($this->_packageInfo['usestask'])) {
- unset($this->_packageInfo['usestask']);
- }
- }
-
-
- /**
- * @param string
- * @param string package name or uri
- * @param string channel name if non-uri
- */
- function addUsestask($task, $packageOrUri, $channel = false) {
- $set = array('task' => $task);
- if ($channel) {
- $set['package'] = $packageOrUri;
- $set['channel'] = $channel;
- } else {
- $set['uri'] = $packageOrUri;
- }
- $this->_isValid = 0;
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array(
- 'usestask' => array('srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')
- ));
- }
-
- /**
- * Remove all compatible tags
- */
- function clearCompatible()
- {
- unset($this->_packageInfo['compatible']);
- }
-
- /**
- * Reset dependencies prior to adding new ones
- */
- function clearDeps()
- {
- if (!isset($this->_packageInfo['dependencies'])) {
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, array(),
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog')));
- }
- $this->_packageInfo['dependencies'] = array();
- }
-
- /**
- * @param string minimum PHP version allowed
- * @param string maximum PHP version allowed
- * @param array $exclude incompatible PHP versions
- */
- function setPhpDep($min, $max = false, $exclude = false)
- {
- $this->_isValid = 0;
- $dep =
- array(
- 'min' => $min,
- );
- if ($max) {
- $dep['max'] = $max;
- }
- if ($exclude) {
- if (count($exclude) == 1) {
- $exclude = $exclude[0];
- }
- $dep['exclude'] = $exclude;
- }
- if (isset($this->_packageInfo['dependencies']['required']['php'])) {
- $this->_stack->push(__FUNCTION__, 'warning', array('dep' =>
- $this->_packageInfo['dependencies']['required']['php']),
- 'warning: PHP dependency already exists, overwriting');
- unset($this->_packageInfo['dependencies']['required']['php']);
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'required' => array('optional', 'group'),
- 'php' => array('pearinstaller', 'package', 'subpackage', 'extension', 'os', 'arch')
- ));
- return true;
- }
-
- /**
- * @param string minimum allowed PEAR installer version
- * @param string maximum allowed PEAR installer version
- * @param string recommended PEAR installer version
- * @param array incompatible version of the PEAR installer
- */
- function setPearinstallerDep($min, $max = false, $recommended = false, $exclude = false)
- {
- $this->_isValid = 0;
- $dep =
- array(
- 'min' => $min,
- );
- if ($max) {
- $dep['max'] = $max;
- }
- if ($recommended) {
- $dep['recommended'] = $recommended;
- }
- if ($exclude) {
- if (count($exclude) == 1) {
- $exclude = $exclude[0];
- }
- $dep['exclude'] = $exclude;
- }
- if (isset($this->_packageInfo['dependencies']['required']['pearinstaller'])) {
- $this->_stack->push(__FUNCTION__, 'warning', array('dep' =>
- $this->_packageInfo['dependencies']['required']['pearinstaller']),
- 'warning: PEAR Installer dependency already exists, overwriting');
- unset($this->_packageInfo['dependencies']['required']['pearinstaller']);
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'required' => array('optional', 'group'),
- 'pearinstaller' => array('package', 'subpackage', 'extension', 'os', 'arch')
- ));
- }
-
- /**
- * Mark a package as conflicting with this package
- * @param string package name
- * @param string package channel
- * @param string extension this package provides, if any
- * @param string|false minimum version required
- * @param string|false maximum version allowed
- * @param array|false versions to exclude from installation
- */
- function addConflictingPackageDepWithChannel($name, $channel,
- $providesextension = false, $min = false, $max = false, $exclude = false)
- {
- $this->_isValid = 0;
- $dep = $this->_constructDep($name, $channel, false, $min, $max, false,
- $exclude, $providesextension, false, true);
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'required' => array('optional', 'group'),
- 'package' => array('subpackage', 'extension', 'os', 'arch')
- ));
- }
-
- /**
- * Mark a package as conflicting with this package
- * @param string package name
- * @param string package channel
- * @param string extension this package provides, if any
- */
- function addConflictingPackageDepWithUri($name, $uri, $providesextension = false)
- {
- $this->_isValid = 0;
- $dep =
- array(
- 'name' => $name,
- 'uri' => $uri,
- 'conflicts' => '',
- );
- if ($providesextension) {
- $dep['providesextension'] = $providesextension;
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'required' => array('optional', 'group'),
- 'package' => array('subpackage', 'extension', 'os', 'arch')
- ));
- }
-
- function addDependencyGroup($name, $hint)
- {
- $this->_isValid = 0;
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo,
- array('attribs' => array('name' => $name, 'hint' => $hint)),
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'group' => array(),
- ));
- }
-
- /**
- * @param string package name
- * @param string|false channel name, false if this is a uri
- * @param string|false uri name, false if this is a channel
- * @param string|false minimum version required
- * @param string|false maximum version allowed
- * @param string|false recommended installation version
- * @param array|false versions to exclude from installation
- * @param string extension this package provides, if any
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- * @param bool if true, tells the installer to negate this dependency (conflicts)
- * @return array
- * @access private
- */
- function _constructDep($name, $channel, $uri, $min, $max, $recommended, $exclude,
- $providesextension = false, $nodefault = false,
- $conflicts = false)
- {
- $dep =
- array(
- 'name' => $name,
- );
- if ($channel) {
- $dep['channel'] = $channel;
- } elseif ($uri) {
- $dep['uri'] = $uri;
- }
- if ($min) {
- $dep['min'] = $min;
- }
- if ($max) {
- $dep['max'] = $max;
- }
- if ($recommended) {
- $dep['recommended'] = $recommended;
- }
- if ($exclude) {
- if (is_array($exclude) && count($exclude) == 1) {
- $exclude = $exclude[0];
- }
- $dep['exclude'] = $exclude;
- }
- if ($conflicts) {
- $dep['conflicts'] = '';
- }
- if ($nodefault) {
- $dep['nodefault'] = '';
- }
- if ($providesextension) {
- $dep['providesextension'] = $providesextension;
- }
- return $dep;
- }
-
- /**
- * @param package|subpackage
- * @param string group name
- * @param string package name
- * @param string package channel
- * @param string minimum version
- * @param string maximum version
- * @param string recommended version
- * @param array|false optional excluded versions
- * @param string extension this package provides, if any
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- * @return bool false if the dependency group has not been initialized with
- * {@link addDependencyGroup()}, or a subpackage is added with
- * a providesextension
- */
- function addGroupPackageDepWithChannel($type, $groupname, $name, $channel, $min = false,
- $max = false, $recommended = false, $exclude = false,
- $providesextension = false, $nodefault = false)
- {
- if ($type == 'subpackage' && $providesextension) {
- return false; // subpackages must be php packages
- }
- $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude,
- $providesextension, $nodefault);
- return $this->_addGroupDependency($type, $dep, $groupname);
- }
-
- /**
- * @param package|subpackage
- * @param string group name
- * @param string package name
- * @param string package uri
- * @param string extension this package provides, if any
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- * @return bool false if the dependency group has not been initialized with
- * {@link addDependencyGroup()}
- */
- function addGroupPackageDepWithURI($type, $groupname, $name, $uri, $providesextension = false,
- $nodefault = false)
- {
- if ($type == 'subpackage' && $providesextension) {
- return false; // subpackages must be php packages
- }
- $dep = $this->_constructDep($name, false, $uri, false, false, false, false,
- $providesextension, $nodefault);
- return $this->_addGroupDependency($type, $dep, $groupname);
- }
-
- /**
- * @param string group name (must be pre-existing)
- * @param string extension name
- * @param string minimum version allowed
- * @param string maximum version allowed
- * @param string recommended version
- * @param array incompatible versions
- */
- function addGroupExtensionDep($groupname, $name, $min = false, $max = false,
- $recommended = false, $exclude = false)
- {
- $this->_isValid = 0;
- $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude);
- return $this->_addGroupDependency('extension', $dep, $groupname);
- }
-
- /**
- * @param package|subpackage|extension
- * @param array dependency contents
- * @param string name of the dependency group to add this to
- * @return boolean
- * @access private
- */
- function _addGroupDependency($type, $dep, $groupname)
- {
- $arr = array('subpackage', 'extension');
- if ($type != 'package') {
- array_shift($arr);
- }
- if ($type == 'extension') {
- array_shift($arr);
- }
- if (!isset($this->_packageInfo['dependencies']['group'])) {
- return false;
- } else {
- if (!isset($this->_packageInfo['dependencies']['group'][0])) {
- if ($this->_packageInfo['dependencies']['group']['attribs']['name'] == $groupname) {
- $this->_packageInfo['dependencies']['group'] = $this->_mergeTag(
- $this->_packageInfo['dependencies']['group'], $dep,
- array(
- $type => $arr
- ));
- $this->_isValid = 0;
- return true;
- } else {
- return false;
- }
- } else {
- foreach ($this->_packageInfo['dependencies']['group'] as $i => $group) {
- if ($group['attribs']['name'] == $groupname) {
- $this->_packageInfo['dependencies']['group'][$i] = $this->_mergeTag(
- $this->_packageInfo['dependencies']['group'][$i], $dep,
- array(
- $type => $arr
- ));
- $this->_isValid = 0;
- return true;
- }
- }
- return false;
- }
- }
- }
-
- /**
- * @param optional|required
- * @param string package name
- * @param string package channel
- * @param string minimum version
- * @param string maximum version
- * @param string recommended version
- * @param string extension this package provides, if any
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- * @param array|false optional excluded versions
- */
- function addPackageDepWithChannel($type, $name, $channel, $min = false, $max = false,
- $recommended = false, $exclude = false,
- $providesextension = false, $nodefault = false)
- {
- if (!in_array($type, array('optional', 'required'), true)) {
- $type = 'required';
- }
- $this->_isValid = 0;
- $arr = array('optional', 'group');
- if ($type != 'required') {
- array_shift($arr);
- }
- $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude,
- $providesextension, $nodefault);
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- $type => $arr,
- 'package' => array('subpackage', 'extension', 'os', 'arch')
- ));
- }
-
- /**
- * @param optional|required
- * @param string name of the package
- * @param string uri of the package
- * @param string extension this package provides, if any
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- */
- function addPackageDepWithUri($type, $name, $uri, $providesextension = false,
- $nodefault = false)
- {
- $this->_isValid = 0;
- $arr = array('optional', 'group');
- if ($type != 'required') {
- array_shift($arr);
- }
- $dep = $this->_constructDep($name, false, $uri, false, false, false, false,
- $providesextension, $nodefault);
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- $type => $arr,
- 'package' => array('subpackage', 'extension', 'os', 'arch')
- ));
- }
-
- /**
- * @param optional|required optional, required
- * @param string package name
- * @param string package channel
- * @param string minimum version
- * @param string maximum version
- * @param string recommended version
- * @param array incompatible versions
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- */
- function addSubpackageDepWithChannel($type, $name, $channel, $min = false, $max = false,
- $recommended = false, $exclude = false,
- $nodefault = false)
- {
- $this->_isValid = 0;
- $arr = array('optional', 'group');
- if ($type != 'required') {
- array_shift($arr);
- }
- $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude,
- $nodefault);
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- $type => $arr,
- 'subpackage' => array('extension', 'os', 'arch')
- ));
- }
-
- /**
- * @param optional|required optional, required
- * @param string package name
- * @param string package uri for download
- * @param bool if true, tells the installer to ignore the default optional dependency group
- * when installing this package
- */
- function addSubpackageDepWithUri($type, $name, $uri, $nodefault = false)
- {
- $this->_isValid = 0;
- $arr = array('optional', 'group');
- if ($type != 'required') {
- array_shift($arr);
- }
- $dep = $this->_constructDep($name, false, $uri, false, false, false, false, $nodefault);
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- $type => $arr,
- 'subpackage' => array('extension', 'os', 'arch')
- ));
- }
-
- /**
- * @param optional|required optional, required
- * @param string extension name
- * @param string minimum version
- * @param string maximum version
- * @param string recommended version
- * @param array incompatible versions
- */
- function addExtensionDep($type, $name, $min = false, $max = false, $recommended = false,
- $exclude = false)
- {
- $this->_isValid = 0;
- $arr = array('optional', 'group');
- if ($type != 'required') {
- array_shift($arr);
- }
- $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude);
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- $type => $arr,
- 'extension' => array('os', 'arch')
- ));
- }
-
- /**
- * @param string Operating system name
- * @param boolean true if this package cannot be installed on this OS
- */
- function addOsDep($name, $conflicts = false)
- {
- $this->_isValid = 0;
- $dep = array('name' => $name);
- if ($conflicts) {
- $dep['conflicts'] = '';
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'required' => array('optional', 'group'),
- 'os' => array('arch')
- ));
- }
-
- /**
- * @param string Architecture matching pattern
- * @param boolean true if this package cannot be installed on this architecture
- */
- function addArchDep($pattern, $conflicts = false)
- {
- $this->_isValid = 0;
- $dep = array('pattern' => $pattern);
- if ($conflicts) {
- $dep['conflicts'] = '';
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep,
- array(
- 'dependencies' => array('providesextension', 'usesrole', 'usestask',
- 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'),
- 'required' => array('optional', 'group'),
- 'arch' => array()
- ));
- }
-
- /**
- * Set the kind of package, and erase all release tags
- *
- * - a php package is a PEAR-style package
- * - an extbin package is a PECL-style extension binary
- * - an extsrc package is a PECL-style source for a binary
- * - an zendextbin package is a PECL-style zend extension binary
- * - an zendextsrc package is a PECL-style source for a zend extension binary
- * - a bundle package is a collection of other pre-packaged packages
- * @param php|extbin|extsrc|zendextsrc|zendextbin|bundle
- * @return bool success
- */
- function setPackageType($type)
- {
- $this->_isValid = 0;
- if (!in_array($type, array('php', 'extbin', 'extsrc', 'zendextsrc',
- 'zendextbin', 'bundle'))) {
- return false;
- }
-
- if (in_array($type, array('zendextsrc', 'zendextbin'))) {
- $this->_setPackageVersion2_1();
- }
-
- if ($type != 'bundle') {
- $type .= 'release';
- }
-
- foreach (array('phprelease', 'extbinrelease', 'extsrcrelease',
- 'zendextsrcrelease', 'zendextbinrelease', 'bundle') as $test) {
- unset($this->_packageInfo[$test]);
- }
-
- if (!isset($this->_packageInfo[$type])) {
- // ensure that the release tag is set up
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('changelog'),
- array(), $type);
- }
-
- $this->_packageInfo[$type] = array();
- return true;
- }
-
- /**
- * @return bool true if package type is set up
- */
- function addRelease()
- {
- if ($type = $this->getPackageType()) {
- if ($type != 'bundle') {
- $type .= 'release';
- }
- $this->_packageInfo = $this->_mergeTag($this->_packageInfo, array(),
- array($type => array('changelog')));
- return true;
- }
- return false;
- }
-
- /**
- * Get the current release tag in order to add to it
- * @param bool returns only releases that have installcondition if true
- * @return array|null
- */
- function &_getCurrentRelease($strict = true)
- {
- if ($p = $this->getPackageType()) {
- if ($strict) {
- if ($p == 'extsrc' || $p == 'zendextsrc') {
- $a = null;
- return $a;
- }
- }
- if ($p != 'bundle') {
- $p .= 'release';
- }
- if (isset($this->_packageInfo[$p][0])) {
- return $this->_packageInfo[$p][count($this->_packageInfo[$p]) - 1];
- } else {
- return $this->_packageInfo[$p];
- }
- } else {
- $a = null;
- return $a;
- }
- }
-
- /**
- * Add a file to the current release that should be installed under a different name
- * @param string <contents> path to file
- * @param string name the file should be installed as
- */
- function addInstallAs($path, $as)
- {
- $r = &$this->_getCurrentRelease();
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- $r = $this->_mergeTag($r, array('attribs' => array('name' => $path, 'as' => $as)),
- array(
- 'filelist' => array(),
- 'install' => array('ignore')
- ));
- }
-
- /**
- * Add a file to the current release that should be ignored
- * @param string <contents> path to file
- * @return bool success of operation
- */
- function addIgnore($path)
- {
- $r = &$this->_getCurrentRelease();
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- $r = $this->_mergeTag($r, array('attribs' => array('name' => $path)),
- array(
- 'filelist' => array(),
- 'ignore' => array()
- ));
- }
-
- /**
- * Add an extension binary package for this extension source code release
- *
- * Note that the package must be from the same channel as the extension source package
- * @param string
- */
- function addBinarypackage($package)
- {
- if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
- return false;
- }
- $r = &$this->_getCurrentRelease(false);
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- $r = $this->_mergeTag($r, $package,
- array(
- 'binarypackage' => array('filelist'),
- ));
- }
-
- /**
- * Add a configureoption to an extension source package
- * @param string
- * @param string
- * @param string
- */
- function addConfigureOption($name, $prompt, $default = null)
- {
- if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
- return false;
- }
-
- $r = &$this->_getCurrentRelease(false);
- if ($r === null) {
- return false;
- }
-
- $opt = array('attribs' => array('name' => $name, 'prompt' => $prompt));
- if ($default !== null) {
- $opt['attribs']['default'] = $default;
- }
-
- $this->_isValid = 0;
- $r = $this->_mergeTag($r, $opt,
- array(
- 'configureoption' => array('binarypackage', 'filelist'),
- ));
- }
-
- /**
- * Set an installation condition based on php version for the current release set
- * @param string minimum version
- * @param string maximum version
- * @param false|array incompatible versions of PHP
- */
- function setPhpInstallCondition($min, $max, $exclude = false)
- {
- $r = &$this->_getCurrentRelease();
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- if (isset($r['installconditions']['php'])) {
- unset($r['installconditions']['php']);
- }
- $dep = array('min' => $min, 'max' => $max);
- if ($exclude) {
- if (is_array($exclude) && count($exclude) == 1) {
- $exclude = $exclude[0];
- }
- $dep['exclude'] = $exclude;
- }
- if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('configureoption', 'binarypackage',
- 'filelist'),
- 'php' => array('extension', 'os', 'arch')
- ));
- } else {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('filelist'),
- 'php' => array('extension', 'os', 'arch')
- ));
- }
- }
-
- /**
- * @param optional|required optional, required
- * @param string extension name
- * @param string minimum version
- * @param string maximum version
- * @param string recommended version
- * @param array incompatible versions
- */
- function addExtensionInstallCondition($name, $min = false, $max = false, $recommended = false,
- $exclude = false)
- {
- $r = &$this->_getCurrentRelease();
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude);
- if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('configureoption', 'binarypackage',
- 'filelist'),
- 'extension' => array('os', 'arch')
- ));
- } else {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('filelist'),
- 'extension' => array('os', 'arch')
- ));
- }
- }
-
- /**
- * Set an installation condition based on operating system for the current release set
- * @param string OS name
- * @param bool whether this OS is incompatible with the current release
- */
- function setOsInstallCondition($name, $conflicts = false)
- {
- $r = &$this->_getCurrentRelease();
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- if (isset($r['installconditions']['os'])) {
- unset($r['installconditions']['os']);
- }
- $dep = array('name' => $name);
- if ($conflicts) {
- $dep['conflicts'] = '';
- }
- if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('configureoption', 'binarypackage',
- 'filelist'),
- 'os' => array('arch')
- ));
- } else {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('filelist'),
- 'os' => array('arch')
- ));
- }
- }
-
- /**
- * Set an installation condition based on architecture for the current release set
- * @param string architecture pattern
- * @param bool whether this arch is incompatible with the current release
- */
- function setArchInstallCondition($pattern, $conflicts = false)
- {
- $r = &$this->_getCurrentRelease();
- if ($r === null) {
- return false;
- }
- $this->_isValid = 0;
- if (isset($r['installconditions']['arch'])) {
- unset($r['installconditions']['arch']);
- }
- $dep = array('pattern' => $pattern);
- if ($conflicts) {
- $dep['conflicts'] = '';
- }
- if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('configureoption', 'binarypackage',
- 'filelist'),
- 'arch' => array()
- ));
- } else {
- $r = $this->_mergeTag($r, $dep,
- array(
- 'installconditions' => array('filelist'),
- 'arch' => array()
- ));
- }
- }
-
- /**
- * For extension binary releases, this is used to specify either the
- * static URI to a source package, or the package name and channel of the extsrc/zendextsrc
- * package it is based on.
- * @param string Package name, or full URI to source package (extsrc/zendextsrc type)
- */
- function setSourcePackage($packageOrUri)
- {
- $this->_isValid = 0;
- if (isset($this->_packageInfo['channel'])) {
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease',
- 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'bundle', 'changelog'),
- $packageOrUri, 'srcpackage');
- } else {
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease',
- 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease',
- 'bundle', 'changelog'), $packageOrUri, 'srcuri');
- }
- }
-
- /**
- * Generate a valid change log entry from the current package.xml
- * @param string|false
- */
- function generateChangeLogEntry($notes = false)
- {
- return array(
- 'version' =>
- array(
- 'release' => $this->getVersion('release'),
- 'api' => $this->getVersion('api'),
- ),
- 'stability' =>
- $this->getStability(),
- 'date' => $this->getDate(),
- 'license' => $this->getLicense(true),
- 'notes' => $notes ? $notes : $this->getNotes()
- );
- }
-
- /**
- * @param string release version to set change log notes for
- * @param array output of {@link generateChangeLogEntry()}
- */
- function setChangelogEntry($releaseversion, $contents)
- {
- if (!isset($this->_packageInfo['changelog'])) {
- $this->_packageInfo['changelog']['release'] = $contents;
- return;
- }
- if (!isset($this->_packageInfo['changelog']['release'][0])) {
- if ($this->_packageInfo['changelog']['release']['version']['release'] == $releaseversion) {
- $this->_packageInfo['changelog']['release'] = array(
- $this->_packageInfo['changelog']['release']);
- } else {
- $this->_packageInfo['changelog']['release'] = array(
- $this->_packageInfo['changelog']['release']);
- return $this->_packageInfo['changelog']['release'][] = $contents;
- }
- }
- foreach($this->_packageInfo['changelog']['release'] as $index => $changelog) {
- if (isset($changelog['version']) &&
- strnatcasecmp($changelog['version']['release'], $releaseversion) == 0) {
- $curlog = $index;
- }
- }
- if (isset($curlog)) {
- $this->_packageInfo['changelog']['release'][$curlog] = $contents;
- } else {
- $this->_packageInfo['changelog']['release'][] = $contents;
- }
- }
-
- /**
- * Remove the changelog entirely
- */
- function clearChangeLog()
- {
- unset($this->_packageInfo['changelog']);
- }
-}
-/**
- * PEAR_PackageFile_v2, package.xml version 2.0, read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a8
- */
-/**
- * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
- * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a8
- * @access private
- */
-class PEAR_PackageFile_v2_Validator
-{
- /**
- * @var array
- */
- var $_packageInfo;
- /**
- * @var PEAR_PackageFile_v2
- */
- var $_pf;
- /**
- * @var PEAR_ErrorStack
- */
- var $_stack;
- /**
- * @var int
- */
- var $_isValid = 0;
- /**
- * @var int
- */
- var $_filesValid = 0;
- /**
- * @var int
- */
- var $_curState = 0;
- /**
- * @param PEAR_PackageFile_v2
- * @param int
- */
- function validate(&$pf, $state = PEAR_VALIDATE_NORMAL)
- {
- $this->_pf = &$pf;
- $this->_curState = $state;
- $this->_packageInfo = $this->_pf->getArray();
- $this->_isValid = $this->_pf->_isValid;
- $this->_filesValid = $this->_pf->_filesValid;
- $this->_stack = &$pf->_stack;
- $this->_stack->getErrors(true);
- if (($this->_isValid & $state) == $state) {
- return true;
- }
- if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
- return false;
- }
- if (!isset($this->_packageInfo['attribs']['version']) ||
- ($this->_packageInfo['attribs']['version'] != '2.0' &&
- $this->_packageInfo['attribs']['version'] != '2.1')
- ) {
- $this->_noPackageVersion();
- }
- $structure =
- array(
- 'name',
- 'channel|uri',
- '*extends', // can't be multiple, but this works fine
- 'summary',
- 'description',
- '+lead', // these all need content checks
- '*developer',
- '*contributor',
- '*helper',
- 'date',
- '*time',
- 'version',
- 'stability',
- 'license->?uri->?filesource',
- 'notes',
- 'contents', //special validation needed
- '*compatible',
- 'dependencies', //special validation needed
- '*usesrole',
- '*usestask', // reserve these for 1.4.0a1 to implement
- // this will allow a package.xml to gracefully say it
- // needs a certain package installed in order to implement a role or task
- '*providesextension',
- '*srcpackage|*srcuri',
- '+phprelease|+extsrcrelease|+extbinrelease|' .
- '+zendextsrcrelease|+zendextbinrelease|bundle', //special validation needed
- '*changelog',
- );
- $test = $this->_packageInfo;
- if (isset($test['dependencies']) &&
- isset($test['dependencies']['required']) &&
- isset($test['dependencies']['required']['pearinstaller']) &&
- isset($test['dependencies']['required']['pearinstaller']['min']) &&
- '1.9.5' != '@package' . '_version@' &&
- version_compare('1.9.5',
- $test['dependencies']['required']['pearinstaller']['min'], '<')
- ) {
- $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
- return false;
- }
- // ignore post-installation array fields
- if (array_key_exists('filelist', $test)) {
- unset($test['filelist']);
- }
- if (array_key_exists('_lastmodified', $test)) {
- unset($test['_lastmodified']);
- }
- if (array_key_exists('#binarypackage', $test)) {
- unset($test['#binarypackage']);
- }
- if (array_key_exists('old', $test)) {
- unset($test['old']);
- }
- if (array_key_exists('_lastversion', $test)) {
- unset($test['_lastversion']);
- }
- if (!$this->_stupidSchemaValidate($structure, $test, '<package>')) {
- return false;
- }
- if (empty($this->_packageInfo['name'])) {
- $this->_tagCannotBeEmpty('name');
- }
- $test = isset($this->_packageInfo['uri']) ? 'uri' :'channel';
- if (empty($this->_packageInfo[$test])) {
- $this->_tagCannotBeEmpty($test);
- }
- if (is_array($this->_packageInfo['license']) &&
- (!isset($this->_packageInfo['license']['_content']) ||
- empty($this->_packageInfo['license']['_content']))) {
- $this->_tagCannotBeEmpty('license');
- } elseif (empty($this->_packageInfo['license'])) {
- $this->_tagCannotBeEmpty('license');
- }
- if (empty($this->_packageInfo['summary'])) {
- $this->_tagCannotBeEmpty('summary');
- }
- if (empty($this->_packageInfo['description'])) {
- $this->_tagCannotBeEmpty('description');
- }
- if (empty($this->_packageInfo['date'])) {
- $this->_tagCannotBeEmpty('date');
- }
- if (empty($this->_packageInfo['notes'])) {
- $this->_tagCannotBeEmpty('notes');
- }
- if (isset($this->_packageInfo['time']) && empty($this->_packageInfo['time'])) {
- $this->_tagCannotBeEmpty('time');
- }
- if (isset($this->_packageInfo['dependencies'])) {
- $this->_validateDependencies();
- }
- if (isset($this->_packageInfo['compatible'])) {
- $this->_validateCompatible();
- }
- if (!isset($this->_packageInfo['bundle'])) {
- if (empty($this->_packageInfo['contents'])) {
- $this->_tagCannotBeEmpty('contents');
- }
- if (!isset($this->_packageInfo['contents']['dir'])) {
- $this->_filelistMustContainDir('contents');
- return false;
- }
- if (isset($this->_packageInfo['contents']['file'])) {
- $this->_filelistCannotContainFile('contents');
- return false;
- }
- }
- $this->_validateMaintainers();
- $this->_validateStabilityVersion();
- $fail = false;
- if (array_key_exists('usesrole', $this->_packageInfo)) {
- $roles = $this->_packageInfo['usesrole'];
- if (!is_array($roles) || !isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if (!isset($role['role'])) {
- $this->_usesroletaskMustHaveRoleTask('usesrole', 'role');
- $fail = true;
- } else {
- if (!isset($role['channel'])) {
- if (!isset($role['uri'])) {
- $this->_usesroletaskMustHaveChannelOrUri($role['role'], 'usesrole');
- $fail = true;
- }
- } elseif (!isset($role['package'])) {
- $this->_usesroletaskMustHavePackage($role['role'], 'usesrole');
- $fail = true;
- }
- }
- }
- }
- if (array_key_exists('usestask', $this->_packageInfo)) {
- $roles = $this->_packageInfo['usestask'];
- if (!is_array($roles) || !isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if (!isset($role['task'])) {
- $this->_usesroletaskMustHaveRoleTask('usestask', 'task');
- $fail = true;
- } else {
- if (!isset($role['channel'])) {
- if (!isset($role['uri'])) {
- $this->_usesroletaskMustHaveChannelOrUri($role['task'], 'usestask');
- $fail = true;
- }
- } elseif (!isset($role['package'])) {
- $this->_usesroletaskMustHavePackage($role['task'], 'usestask');
- $fail = true;
- }
- }
- }
- }
-
- if ($fail) {
- return false;
- }
-
- $list = $this->_packageInfo['contents'];
- if (isset($list['dir']) && is_array($list['dir']) && isset($list['dir'][0])) {
- $this->_multipleToplevelDirNotAllowed();
- return $this->_isValid = 0;
- }
-
- $this->_validateFilelist();
- $this->_validateRelease();
- if (!$this->_stack->hasErrors()) {
- $chan = $this->_pf->_registry->getChannel($this->_pf->getChannel(), true);
- if (PEAR::isError($chan)) {
- $this->_unknownChannel($this->_pf->getChannel());
- } else {
- $valpack = $chan->getValidationPackage();
- // for channel validator packages, always use the default PEAR validator.
- // otherwise, they can't be installed or packaged
- $validator = $chan->getValidationObject($this->_pf->getPackage());
- if (!$validator) {
- $this->_stack->push(__FUNCTION__, 'error',
- array('channel' => $chan->getName(),
- 'package' => $this->_pf->getPackage(),
- 'name' => $valpack['_content'],
- 'version' => $valpack['attribs']['version']),
- 'package "%channel%/%package%" cannot be properly validated without ' .
- 'validation package "%channel%/%name%-%version%"');
- return $this->_isValid = 0;
- }
- $validator->setPackageFile($this->_pf);
- $validator->validate($state);
- $failures = $validator->getFailures();
- foreach ($failures['errors'] as $error) {
- $this->_stack->push(__FUNCTION__, 'error', $error,
- 'Channel validator error: field "%field%" - %reason%');
- }
- foreach ($failures['warnings'] as $warning) {
- $this->_stack->push(__FUNCTION__, 'warning', $warning,
- 'Channel validator warning: field "%field%" - %reason%');
- }
- }
- }
-
- $this->_pf->_isValid = $this->_isValid = !$this->_stack->hasErrors('error');
- if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$this->_filesValid) {
- if ($this->_pf->getPackageType() == 'bundle') {
- if ($this->_analyzeBundledPackages()) {
- $this->_filesValid = $this->_pf->_filesValid = true;
- } else {
- $this->_pf->_isValid = $this->_isValid = 0;
- }
- } else {
- if (!$this->_analyzePhpFiles()) {
- $this->_pf->_isValid = $this->_isValid = 0;
- } else {
- $this->_filesValid = $this->_pf->_filesValid = true;
- }
- }
- }
-
- if ($this->_isValid) {
- return $this->_pf->_isValid = $this->_isValid = $state;
- }
-
- return $this->_pf->_isValid = $this->_isValid = 0;
- }
-
- function _stupidSchemaValidate($structure, $xml, $root)
- {
- if (!is_array($xml)) {
- $xml = array();
- }
- $keys = array_keys($xml);
- reset($keys);
- $key = current($keys);
- while ($key == 'attribs' || $key == '_contents') {
- $key = next($keys);
- }
- $unfoundtags = $optionaltags = array();
- $ret = true;
- $mismatch = false;
- foreach ($structure as $struc) {
- if ($key) {
- $tag = $xml[$key];
- }
- $test = $this->_processStructure($struc);
- if (isset($test['choices'])) {
- $loose = true;
- foreach ($test['choices'] as $choice) {
- if ($key == $choice['tag']) {
- $key = next($keys);
- while ($key == 'attribs' || $key == '_contents') {
- $key = next($keys);
- }
- $unfoundtags = $optionaltags = array();
- $mismatch = false;
- if ($key && $key != $choice['tag'] && isset($choice['multiple'])) {
- $unfoundtags[] = $choice['tag'];
- $optionaltags[] = $choice['tag'];
- if ($key) {
- $mismatch = true;
- }
- }
- $ret &= $this->_processAttribs($choice, $tag, $root);
- continue 2;
- } else {
- $unfoundtags[] = $choice['tag'];
- $mismatch = true;
- }
- if (!isset($choice['multiple']) || $choice['multiple'] != '*') {
- $loose = false;
- } else {
- $optionaltags[] = $choice['tag'];
- }
- }
- if (!$loose) {
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- return false;
- }
- } else {
- if ($key != $test['tag']) {
- if (isset($test['multiple']) && $test['multiple'] != '*') {
- $unfoundtags[] = $test['tag'];
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- return false;
- } else {
- if ($key) {
- $mismatch = true;
- }
- $unfoundtags[] = $test['tag'];
- $optionaltags[] = $test['tag'];
- }
- if (!isset($test['multiple'])) {
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- return false;
- }
- continue;
- } else {
- $unfoundtags = $optionaltags = array();
- $mismatch = false;
- }
- $key = next($keys);
- while ($key == 'attribs' || $key == '_contents') {
- $key = next($keys);
- }
- if ($key && $key != $test['tag'] && isset($test['multiple'])) {
- $unfoundtags[] = $test['tag'];
- $optionaltags[] = $test['tag'];
- $mismatch = true;
- }
- $ret &= $this->_processAttribs($test, $tag, $root);
- continue;
- }
- }
- if (!$mismatch && count($optionaltags)) {
- // don't error out on any optional tags
- $unfoundtags = array_diff($unfoundtags, $optionaltags);
- }
- if (count($unfoundtags)) {
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- } elseif ($key) {
- // unknown tags
- $this->_invalidTagOrder('*no tags allowed here*', $key, $root);
- while ($key = next($keys)) {
- $this->_invalidTagOrder('*no tags allowed here*', $key, $root);
- }
- }
- return $ret;
- }
-
- function _processAttribs($choice, $tag, $context)
- {
- if (isset($choice['attribs'])) {
- if (!is_array($tag)) {
- $tag = array($tag);
- }
- $tags = $tag;
- if (!isset($tags[0])) {
- $tags = array($tags);
- }
- $ret = true;
- foreach ($tags as $i => $tag) {
- if (!is_array($tag) || !isset($tag['attribs'])) {
- foreach ($choice['attribs'] as $attrib) {
- if ($attrib{0} != '?') {
- $ret &= $this->_tagHasNoAttribs($choice['tag'],
- $context);
- continue 2;
- }
- }
- }
- foreach ($choice['attribs'] as $attrib) {
- if ($attrib{0} != '?') {
- if (!isset($tag['attribs'][$attrib])) {
- $ret &= $this->_tagMissingAttribute($choice['tag'],
- $attrib, $context);
- }
- }
- }
- }
- return $ret;
- }
- return true;
- }
-
- function _processStructure($key)
- {
- $ret = array();
- if (count($pieces = explode('|', $key)) > 1) {
- $ret['choices'] = array();
- foreach ($pieces as $piece) {
- $ret['choices'][] = $this->_processStructure($piece);
- }
- return $ret;
- }
- $multi = $key{0};
- if ($multi == '+' || $multi == '*') {
- $ret['multiple'] = $key{0};
- $key = substr($key, 1);
- }
- if (count($attrs = explode('->', $key)) > 1) {
- $ret['tag'] = array_shift($attrs);
- $ret['attribs'] = $attrs;
- } else {
- $ret['tag'] = $key;
- }
- return $ret;
- }
-
- function _validateStabilityVersion()
- {
- $structure = array('release', 'api');
- $a = $this->_stupidSchemaValidate($structure, $this->_packageInfo['version'], '<version>');
- $a &= $this->_stupidSchemaValidate($structure, $this->_packageInfo['stability'], '<stability>');
- if ($a) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $this->_packageInfo['version']['release'])) {
- $this->_invalidVersion('release', $this->_packageInfo['version']['release']);
- }
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $this->_packageInfo['version']['api'])) {
- $this->_invalidVersion('api', $this->_packageInfo['version']['api']);
- }
- if (!in_array($this->_packageInfo['stability']['release'],
- array('snapshot', 'devel', 'alpha', 'beta', 'stable'))) {
- $this->_invalidState('release', $this->_packageInfo['stability']['release']);
- }
- if (!in_array($this->_packageInfo['stability']['api'],
- array('devel', 'alpha', 'beta', 'stable'))) {
- $this->_invalidState('api', $this->_packageInfo['stability']['api']);
- }
- }
- }
-
- function _validateMaintainers()
- {
- $structure =
- array(
- 'name',
- 'user',
- 'email',
- 'active',
- );
- foreach (array('lead', 'developer', 'contributor', 'helper') as $type) {
- if (!isset($this->_packageInfo[$type])) {
- continue;
- }
- if (isset($this->_packageInfo[$type][0])) {
- foreach ($this->_packageInfo[$type] as $lead) {
- $this->_stupidSchemaValidate($structure, $lead, '<' . $type . '>');
- }
- } else {
- $this->_stupidSchemaValidate($structure, $this->_packageInfo[$type],
- '<' . $type . '>');
- }
- }
- }
-
- function _validatePhpDep($dep, $installcondition = false)
- {
- $structure = array(
- 'min',
- '*max',
- '*exclude',
- );
- $type = $installcondition ? '<installcondition><php>' : '<dependencies><required><php>';
- $this->_stupidSchemaValidate($structure, $dep, $type);
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion($type . '<min>', $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion($type . '<max>', $dep['max']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match(
- '/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
- $exclude)) {
- $this->_invalidVersion($type . '<exclude>', $exclude);
- }
- }
- }
- }
-
- function _validatePearinstallerDep($dep)
- {
- $structure = array(
- 'min',
- '*max',
- '*recommended',
- '*exclude',
- );
- $this->_stupidSchemaValidate($structure, $dep, '<dependencies><required><pearinstaller>');
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><min>',
- $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><max>',
- $dep['max']);
- }
- }
- if (isset($dep['recommended'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['recommended'])) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><recommended>',
- $dep['recommended']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><exclude>',
- $exclude);
- }
- }
- }
- }
-
- function _validatePackageDep($dep, $group, $type = '<package>')
- {
- if (isset($dep['uri'])) {
- if (isset($dep['conflicts'])) {
- $structure = array(
- 'name',
- 'uri',
- 'conflicts',
- '*providesextension',
- );
- } else {
- $structure = array(
- 'name',
- 'uri',
- '*providesextension',
- );
- }
- } else {
- if (isset($dep['conflicts'])) {
- $structure = array(
- 'name',
- 'channel',
- '*min',
- '*max',
- '*exclude',
- 'conflicts',
- '*providesextension',
- );
- } else {
- $structure = array(
- 'name',
- 'channel',
- '*min',
- '*max',
- '*recommended',
- '*exclude',
- '*nodefault',
- '*providesextension',
- );
- }
- }
- if (isset($dep['name'])) {
- $type .= '<name>' . $dep['name'] . '</name>';
- }
- $this->_stupidSchemaValidate($structure, $dep, '<dependencies>' . $group . $type);
- if (isset($dep['uri']) && (isset($dep['min']) || isset($dep['max']) ||
- isset($dep['recommended']) || isset($dep['exclude']))) {
- $this->_uriDepsCannotHaveVersioning('<dependencies>' . $group . $type);
- }
- if (isset($dep['channel']) && strtolower($dep['channel']) == '__uri') {
- $this->_DepchannelCannotBeUri('<dependencies>' . $group . $type);
- }
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<min>', $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<max>', $dep['max']);
- }
- }
- if (isset($dep['recommended'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['recommended'])) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<recommended>',
- $dep['recommended']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<exclude>',
- $exclude);
- }
- }
- }
- }
-
- function _validateSubpackageDep($dep, $group)
- {
- $this->_validatePackageDep($dep, $group, '<subpackage>');
- if (isset($dep['providesextension'])) {
- $this->_subpackageCannotProvideExtension(isset($dep['name']) ? $dep['name'] : '');
- }
- if (isset($dep['conflicts'])) {
- $this->_subpackagesCannotConflict(isset($dep['name']) ? $dep['name'] : '');
- }
- }
-
- function _validateExtensionDep($dep, $group = false, $installcondition = false)
- {
- if (isset($dep['conflicts'])) {
- $structure = array(
- 'name',
- '*min',
- '*max',
- '*exclude',
- 'conflicts',
- );
- } else {
- $structure = array(
- 'name',
- '*min',
- '*max',
- '*recommended',
- '*exclude',
- );
- }
- if ($installcondition) {
- $type = '<installcondition><extension>';
- } else {
- $type = '<dependencies>' . $group . '<extension>';
- }
- if (isset($dep['name'])) {
- $type .= '<name>' . $dep['name'] . '</name>';
- }
- $this->_stupidSchemaValidate($structure, $dep, $type);
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion(substr($type, 1) . '<min', $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion(substr($type, 1) . '<max', $dep['max']);
- }
- }
- if (isset($dep['recommended'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['recommended'])) {
- $this->_invalidVersion(substr($type, 1) . '<recommended', $dep['recommended']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion(substr($type, 1) . '<exclude', $exclude);
- }
- }
- }
- }
-
- function _validateOsDep($dep, $installcondition = false)
- {
- $structure = array(
- 'name',
- '*conflicts',
- );
- $type = $installcondition ? '<installcondition><os>' : '<dependencies><required><os>';
- if ($this->_stupidSchemaValidate($structure, $dep, $type)) {
- if ($dep['name'] == '*') {
- if (array_key_exists('conflicts', $dep)) {
- $this->_cannotConflictWithAllOs($type);
- }
- }
- }
- }
-
- function _validateArchDep($dep, $installcondition = false)
- {
- $structure = array(
- 'pattern',
- '*conflicts',
- );
- $type = $installcondition ? '<installcondition><arch>' : '<dependencies><required><arch>';
- $this->_stupidSchemaValidate($structure, $dep, $type);
- }
-
- function _validateInstallConditions($cond, $release)
- {
- $structure = array(
- '*php',
- '*extension',
- '*os',
- '*arch',
- );
- if (!$this->_stupidSchemaValidate($structure,
- $cond, $release)) {
- return false;
- }
- foreach (array('php', 'extension', 'os', 'arch') as $type) {
- if (isset($cond[$type])) {
- $iter = $cond[$type];
- if (!is_array($iter) || !isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- if ($type == 'extension') {
- $this->{"_validate{$type}Dep"}($package, false, true);
- } else {
- $this->{"_validate{$type}Dep"}($package, true);
- }
- }
- }
- }
- }
-
- function _validateDependencies()
- {
- $structure = array(
- 'required',
- '*optional',
- '*group->name->hint'
- );
- if (!$this->_stupidSchemaValidate($structure,
- $this->_packageInfo['dependencies'], '<dependencies>')) {
- return false;
- }
- foreach (array('required', 'optional') as $simpledep) {
- if (isset($this->_packageInfo['dependencies'][$simpledep])) {
- if ($simpledep == 'optional') {
- $structure = array(
- '*package',
- '*subpackage',
- '*extension',
- );
- } else {
- $structure = array(
- 'php',
- 'pearinstaller',
- '*package',
- '*subpackage',
- '*extension',
- '*os',
- '*arch',
- );
- }
- if ($this->_stupidSchemaValidate($structure,
- $this->_packageInfo['dependencies'][$simpledep],
- "<dependencies><$simpledep>")) {
- foreach (array('package', 'subpackage', 'extension') as $type) {
- if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) {
- $iter = $this->_packageInfo['dependencies'][$simpledep][$type];
- if (!isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- if ($type != 'extension') {
- if (isset($package['uri'])) {
- if (isset($package['channel'])) {
- $this->_UrlOrChannel($type,
- $package['name']);
- }
- } else {
- if (!isset($package['channel'])) {
- $this->_NoChannel($type, $package['name']);
- }
- }
- }
- $this->{"_validate{$type}Dep"}($package, "<$simpledep>");
- }
- }
- }
- if ($simpledep == 'optional') {
- continue;
- }
- foreach (array('php', 'pearinstaller', 'os', 'arch') as $type) {
- if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) {
- $iter = $this->_packageInfo['dependencies'][$simpledep][$type];
- if (!isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- $this->{"_validate{$type}Dep"}($package);
- }
- }
- }
- }
- }
- }
- if (isset($this->_packageInfo['dependencies']['group'])) {
- $groups = $this->_packageInfo['dependencies']['group'];
- if (!isset($groups[0])) {
- $groups = array($groups);
- }
- $structure = array(
- '*package',
- '*subpackage',
- '*extension',
- );
- foreach ($groups as $group) {
- if ($this->_stupidSchemaValidate($structure, $group, '<group>')) {
- if (!PEAR_Validate::validGroupName($group['attribs']['name'])) {
- $this->_invalidDepGroupName($group['attribs']['name']);
- }
- foreach (array('package', 'subpackage', 'extension') as $type) {
- if (isset($group[$type])) {
- $iter = $group[$type];
- if (!isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- if ($type != 'extension') {
- if (isset($package['uri'])) {
- if (isset($package['channel'])) {
- $this->_UrlOrChannelGroup($type,
- $package['name'],
- $group['name']);
- }
- } else {
- if (!isset($package['channel'])) {
- $this->_NoChannelGroup($type,
- $package['name'],
- $group['name']);
- }
- }
- }
- $this->{"_validate{$type}Dep"}($package, '<group name="' .
- $group['attribs']['name'] . '">');
- }
- }
- }
- }
- }
- }
- }
-
- function _validateCompatible()
- {
- $compat = $this->_packageInfo['compatible'];
- if (!isset($compat[0])) {
- $compat = array($compat);
- }
- $required = array('name', 'channel', 'min', 'max', '*exclude');
- foreach ($compat as $package) {
- $type = '<compatible>';
- if (is_array($package) && array_key_exists('name', $package)) {
- $type .= '<name>' . $package['name'] . '</name>';
- }
- $this->_stupidSchemaValidate($required, $package, $type);
- if (is_array($package) && array_key_exists('min', $package)) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $package['min'])) {
- $this->_invalidVersion(substr($type, 1) . '<min', $package['min']);
- }
- }
- if (is_array($package) && array_key_exists('max', $package)) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $package['max'])) {
- $this->_invalidVersion(substr($type, 1) . '<max', $package['max']);
- }
- }
- if (is_array($package) && array_key_exists('exclude', $package)) {
- if (!is_array($package['exclude'])) {
- $package['exclude'] = array($package['exclude']);
- }
- foreach ($package['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion(substr($type, 1) . '<exclude', $exclude);
- }
- }
- }
- }
- }
-
- function _validateBundle($list)
- {
- if (!is_array($list) || !isset($list['bundledpackage'])) {
- return $this->_NoBundledPackages();
- }
- if (!is_array($list['bundledpackage']) || !isset($list['bundledpackage'][0])) {
- return $this->_AtLeast2BundledPackages();
- }
- foreach ($list['bundledpackage'] as $package) {
- if (!is_string($package)) {
- $this->_bundledPackagesMustBeFilename();
- }
- }
- }
-
- function _validateFilelist($list = false, $allowignore = false, $dirs = '')
- {
- $iscontents = false;
- if (!$list) {
- $iscontents = true;
- $list = $this->_packageInfo['contents'];
- if (isset($this->_packageInfo['bundle'])) {
- return $this->_validateBundle($list);
- }
- }
- if ($allowignore) {
- $struc = array(
- '*install->name->as',
- '*ignore->name'
- );
- } else {
- $struc = array(
- '*dir->name->?baseinstalldir',
- '*file->name->role->?baseinstalldir->?md5sum'
- );
- if (isset($list['dir']) && isset($list['file'])) {
- // stave off validation errors without requiring a set order.
- $_old = $list;
- if (isset($list['attribs'])) {
- $list = array('attribs' => $_old['attribs']);
- }
- $list['dir'] = $_old['dir'];
- $list['file'] = $_old['file'];
- }
- }
- if (!isset($list['attribs']) || !isset($list['attribs']['name'])) {
- $unknown = $allowignore ? '<filelist>' : '<dir name="*unknown*">';
- $dirname = $iscontents ? '<contents>' : $unknown;
- } else {
- $dirname = '<dir name="' . $list['attribs']['name'] . '">';
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $list['attribs']['name']))) {
- // file contains .. parent directory or . cur directory
- $this->_invalidDirName($list['attribs']['name']);
- }
- }
- $res = $this->_stupidSchemaValidate($struc, $list, $dirname);
- if ($allowignore && $res) {
- $ignored_or_installed = array();
- $this->_pf->getFilelist();
- $fcontents = $this->_pf->getContents();
- $filelist = array();
- if (!isset($fcontents['dir']['file'][0])) {
- $fcontents['dir']['file'] = array($fcontents['dir']['file']);
- }
- foreach ($fcontents['dir']['file'] as $file) {
- $filelist[$file['attribs']['name']] = true;
- }
- if (isset($list['install'])) {
- if (!isset($list['install'][0])) {
- $list['install'] = array($list['install']);
- }
- foreach ($list['install'] as $file) {
- if (!isset($filelist[$file['attribs']['name']])) {
- $this->_notInContents($file['attribs']['name'], 'install');
- continue;
- }
- if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) {
- $this->_multipleInstallAs($file['attribs']['name']);
- }
- if (!isset($ignored_or_installed[$file['attribs']['name']])) {
- $ignored_or_installed[$file['attribs']['name']] = array();
- }
- $ignored_or_installed[$file['attribs']['name']][] = 1;
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $file['attribs']['as']))) {
- // file contains .. parent directory or . cur directory references
- $this->_invalidFileInstallAs($file['attribs']['name'],
- $file['attribs']['as']);
- }
- }
- }
- if (isset($list['ignore'])) {
- if (!isset($list['ignore'][0])) {
- $list['ignore'] = array($list['ignore']);
- }
- foreach ($list['ignore'] as $file) {
- if (!isset($filelist[$file['attribs']['name']])) {
- $this->_notInContents($file['attribs']['name'], 'ignore');
- continue;
- }
- if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) {
- $this->_ignoreAndInstallAs($file['attribs']['name']);
- }
- }
- }
- }
- if (!$allowignore && isset($list['file'])) {
- if (is_string($list['file'])) {
- $this->_oldStyleFileNotAllowed();
- return false;
- }
- if (!isset($list['file'][0])) {
- // single file
- $list['file'] = array($list['file']);
- }
- foreach ($list['file'] as $i => $file)
- {
- if (isset($file['attribs']) && isset($file['attribs']['name'])) {
- if ($file['attribs']['name']{0} == '.' &&
- $file['attribs']['name']{1} == '/') {
- // name is something like "./doc/whatever.txt"
- $this->_invalidFileName($file['attribs']['name'], $dirname);
- }
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $file['attribs']['name']))) {
- // file contains .. parent directory or . cur directory
- $this->_invalidFileName($file['attribs']['name'], $dirname);
- }
- }
- if (isset($file['attribs']) && isset($file['attribs']['role'])) {
- if (!$this->_validateRole($file['attribs']['role'])) {
- if (isset($this->_packageInfo['usesrole'])) {
- $roles = $this->_packageInfo['usesrole'];
- if (!isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if ($role['role'] = $file['attribs']['role']) {
- $msg = 'This package contains role "%role%" and requires ' .
- 'package "%package%" to be used';
- if (isset($role['uri'])) {
- $params = array('role' => $role['role'],
- 'package' => $role['uri']);
- } else {
- $params = array('role' => $role['role'],
- 'package' => $this->_pf->_registry->
- parsedPackageNameToString(array('package' =>
- $role['package'], 'channel' => $role['channel']),
- true));
- }
- $this->_stack->push('_mustInstallRole', 'error', $params, $msg);
- }
- }
- }
- $this->_invalidFileRole($file['attribs']['name'],
- $dirname, $file['attribs']['role']);
- }
- }
- if (!isset($file['attribs'])) {
- continue;
- }
- $save = $file['attribs'];
- if ($dirs) {
- $save['name'] = $dirs . '/' . $save['name'];
- }
- unset($file['attribs']);
- if (count($file) && $this->_curState != PEAR_VALIDATE_DOWNLOADING) { // has tasks
- foreach ($file as $task => $value) {
- if ($tagClass = $this->_pf->getTask($task)) {
- if (!is_array($value) || !isset($value[0])) {
- $value = array($value);
- }
- foreach ($value as $v) {
- $ret = call_user_func(array($tagClass, 'validateXml'),
- $this->_pf, $v, $this->_pf->_config, $save);
- if (is_array($ret)) {
- $this->_invalidTask($task, $ret, isset($save['name']) ?
- $save['name'] : '');
- }
- }
- } else {
- if (isset($this->_packageInfo['usestask'])) {
- $roles = $this->_packageInfo['usestask'];
- if (!isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if ($role['task'] = $task) {
- $msg = 'This package contains task "%task%" and requires ' .
- 'package "%package%" to be used';
- if (isset($role['uri'])) {
- $params = array('task' => $role['task'],
- 'package' => $role['uri']);
- } else {
- $params = array('task' => $role['task'],
- 'package' => $this->_pf->_registry->
- parsedPackageNameToString(array('package' =>
- $role['package'], 'channel' => $role['channel']),
- true));
- }
- $this->_stack->push('_mustInstallTask', 'error',
- $params, $msg);
- }
- }
- }
- $this->_unknownTask($task, $save['name']);
- }
- }
- }
- }
- }
- if (isset($list['ignore'])) {
- if (!$allowignore) {
- $this->_ignoreNotAllowed('ignore');
- }
- }
- if (isset($list['install'])) {
- if (!$allowignore) {
- $this->_ignoreNotAllowed('install');
- }
- }
- if (isset($list['file'])) {
- if ($allowignore) {
- $this->_fileNotAllowed('file');
- }
- }
- if (isset($list['dir'])) {
- if ($allowignore) {
- $this->_fileNotAllowed('dir');
- } else {
- if (!isset($list['dir'][0])) {
- $list['dir'] = array($list['dir']);
- }
- foreach ($list['dir'] as $dir) {
- if (isset($dir['attribs']) && isset($dir['attribs']['name'])) {
- if ($dir['attribs']['name'] == '/' ||
- !isset($this->_packageInfo['contents']['dir']['dir'])) {
- // always use nothing if the filelist has already been flattened
- $newdirs = '';
- } elseif ($dirs == '') {
- $newdirs = $dir['attribs']['name'];
- } else {
- $newdirs = $dirs . '/' . $dir['attribs']['name'];
- }
- } else {
- $newdirs = $dirs;
- }
- $this->_validateFilelist($dir, $allowignore, $newdirs);
- }
- }
- }
- }
-
- function _validateRelease()
- {
- if (isset($this->_packageInfo['phprelease'])) {
- $release = 'phprelease';
- if (isset($this->_packageInfo['providesextension'])) {
- $this->_cannotProvideExtension($release);
- }
- if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
- $this->_cannotHaveSrcpackage($release);
- }
- $releases = $this->_packageInfo['phprelease'];
- if (!is_array($releases)) {
- return true;
- }
- if (!isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*filelist',
- ), $rel, '<phprelease>');
- }
- }
- foreach (array('', 'zend') as $prefix) {
- $releasetype = $prefix . 'extsrcrelease';
- if (isset($this->_packageInfo[$releasetype])) {
- $release = $releasetype;
- if (!isset($this->_packageInfo['providesextension'])) {
- $this->_mustProvideExtension($release);
- }
- if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
- $this->_cannotHaveSrcpackage($release);
- }
- $releases = $this->_packageInfo[$releasetype];
- if (!is_array($releases)) {
- return true;
- }
- if (!isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*configureoption->name->prompt->?default',
- '*binarypackage',
- '*filelist',
- ), $rel, '<' . $releasetype . '>');
- if (isset($rel['binarypackage'])) {
- if (!is_array($rel['binarypackage']) || !isset($rel['binarypackage'][0])) {
- $rel['binarypackage'] = array($rel['binarypackage']);
- }
- foreach ($rel['binarypackage'] as $bin) {
- if (!is_string($bin)) {
- $this->_binaryPackageMustBePackagename();
- }
- }
- }
- }
- }
- $releasetype = 'extbinrelease';
- if (isset($this->_packageInfo[$releasetype])) {
- $release = $releasetype;
- if (!isset($this->_packageInfo['providesextension'])) {
- $this->_mustProvideExtension($release);
- }
- if (isset($this->_packageInfo['channel']) &&
- !isset($this->_packageInfo['srcpackage'])) {
- $this->_mustSrcPackage($release);
- }
- if (isset($this->_packageInfo['uri']) && !isset($this->_packageInfo['srcuri'])) {
- $this->_mustSrcuri($release);
- }
- $releases = $this->_packageInfo[$releasetype];
- if (!is_array($releases)) {
- return true;
- }
- if (!isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*filelist',
- ), $rel, '<' . $releasetype . '>');
- }
- }
- }
- if (isset($this->_packageInfo['bundle'])) {
- $release = 'bundle';
- if (isset($this->_packageInfo['providesextension'])) {
- $this->_cannotProvideExtension($release);
- }
- if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
- $this->_cannotHaveSrcpackage($release);
- }
- $releases = $this->_packageInfo['bundle'];
- if (!is_array($releases) || !isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*filelist',
- ), $rel, '<bundle>');
- }
- }
- foreach ($releases as $rel) {
- if (is_array($rel) && array_key_exists('installconditions', $rel)) {
- $this->_validateInstallConditions($rel['installconditions'],
- "<$release><installconditions>");
- }
- if (is_array($rel) && array_key_exists('filelist', $rel)) {
- if ($rel['filelist']) {
-
- $this->_validateFilelist($rel['filelist'], true);
- }
- }
- }
- }
-
- /**
- * This is here to allow role extension through plugins
- * @param string
- */
- function _validateRole($role)
- {
- return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType()));
- }
-
- function _pearVersionTooLow($version)
- {
- $this->_stack->push(__FUNCTION__, 'error',
- array('version' => $version),
- 'This package.xml requires PEAR version %version% to parse properly, we are ' .
- 'version 1.9.5');
- }
-
- function _invalidTagOrder($oktags, $actual, $root)
- {
- $this->_stack->push(__FUNCTION__, 'error',
- array('oktags' => $oktags, 'actual' => $actual, 'root' => $root),
- 'Invalid tag order in %root%, found <%actual%> expected one of "%oktags%"');
- }
-
- function _ignoreNotAllowed($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '<%type%> is not allowed inside global <contents>, only inside ' .
- '<phprelease>/<extbinrelease>/<zendextbinrelease>, use <dir> and <file> only');
- }
-
- function _fileNotAllowed($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '<%type%> is not allowed inside release <filelist>, only inside ' .
- '<contents>, use <ignore> and <install> only');
- }
-
- function _oldStyleFileNotAllowed()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'Old-style <file>name</file> is not allowed. Use' .
- '<file name="name" role="role"/>');
- }
-
- function _tagMissingAttribute($tag, $attr, $context)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag,
- 'attribute' => $attr, 'context' => $context),
- 'tag <%tag%> in context "%context%" has no attribute "%attribute%"');
- }
-
- function _tagHasNoAttribs($tag, $context)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag,
- 'context' => $context),
- 'tag <%tag%> has no attributes in context "%context%"');
- }
-
- function _invalidInternalStructure()
- {
- $this->_stack->push(__FUNCTION__, 'exception', array(),
- 'internal array was not generated by compatible parser, or extreme parser error, cannot continue');
- }
-
- function _invalidFileRole($file, $dir, $role)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'file' => $file, 'dir' => $dir, 'role' => $role,
- 'roles' => PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())),
- 'File "%file%" in directory "%dir%" has invalid role "%role%", should be one of %roles%');
- }
-
- function _invalidFileName($file, $dir)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'file' => $file),
- 'File "%file%" in directory "%dir%" cannot begin with "./" or contain ".."');
- }
-
- function _invalidFileInstallAs($file, $as)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'file' => $file, 'as' => $as),
- 'File "%file%" <install as="%as%"/> cannot contain "./" or contain ".."');
- }
-
- function _invalidDirName($dir)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'dir' => $file),
- 'Directory "%dir%" cannot begin with "./" or contain ".."');
- }
-
- function _filelistCannotContainFile($filelist)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist),
- '<%tag%> can only contain <dir>, contains <file>. Use ' .
- '<dir name="/"> as the first dir element');
- }
-
- function _filelistMustContainDir($filelist)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist),
- '<%tag%> must contain <dir>. Use <dir name="/"> as the ' .
- 'first dir element');
- }
-
- function _tagCannotBeEmpty($tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag),
- '<%tag%> cannot be empty (<%tag%/>)');
- }
-
- function _UrlOrChannel($type, $name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name),
- 'Required dependency <%type%> "%name%" can have either url OR ' .
- 'channel attributes, and not both');
- }
-
- function _NoChannel($type, $name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name),
- 'Required dependency <%type%> "%name%" must have either url OR ' .
- 'channel attributes');
- }
-
- function _UrlOrChannelGroup($type, $name, $group)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name, 'group' => $group),
- 'Group "%group%" dependency <%type%> "%name%" can have either url OR ' .
- 'channel attributes, and not both');
- }
-
- function _NoChannelGroup($type, $name, $group)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name, 'group' => $group),
- 'Group "%group%" dependency <%type%> "%name%" must have either url OR ' .
- 'channel attributes');
- }
-
- function _unknownChannel($channel)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('channel' => $channel),
- 'Unknown channel "%channel%"');
- }
-
- function _noPackageVersion()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'package.xml <package> tag has no version attribute, or version is not 2.0');
- }
-
- function _NoBundledPackages()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'No <bundledpackage> tag was found in <contents>, required for bundle packages');
- }
-
- function _AtLeast2BundledPackages()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'At least 2 packages must be bundled in a bundle package');
- }
-
- function _ChannelOrUri($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Bundled package "%name%" can have either a uri or a channel, not both');
- }
-
- function _noChildTag($child, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('child' => $child, 'tag' => $tag),
- 'Tag <%tag%> is missing child tag <%child%>');
- }
-
- function _invalidVersion($type, $value)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value),
- 'Version type <%type%> is not a valid version (%value%)');
- }
-
- function _invalidState($type, $value)
- {
- $states = array('stable', 'beta', 'alpha', 'devel');
- if ($type != 'api') {
- $states[] = 'snapshot';
- }
- if (strtolower($value) == 'rc') {
- $this->_stack->push(__FUNCTION__, 'error',
- array('version' => $this->_packageInfo['version']['release']),
- 'RC is not a state, it is a version postfix, try %version%RC1, stability beta');
- }
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value,
- 'types' => $states),
- 'Stability type <%type%> is not a valid stability (%value%), must be one of ' .
- '%types%');
- }
-
- function _invalidTask($task, $ret, $file)
- {
- switch ($ret[0]) {
- case PEAR_TASK_ERROR_MISSING_ATTRIB :
- $info = array('attrib' => $ret[1], 'task' => $task, 'file' => $file);
- $msg = 'task <%task%> is missing attribute "%attrib%" in file %file%';
- break;
- case PEAR_TASK_ERROR_NOATTRIBS :
- $info = array('task' => $task, 'file' => $file);
- $msg = 'task <%task%> has no attributes in file %file%';
- break;
- case PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE :
- $info = array('attrib' => $ret[1], 'values' => $ret[3],
- 'was' => $ret[2], 'task' => $task, 'file' => $file);
- $msg = 'task <%task%> attribute "%attrib%" has the wrong value "%was%" '.
- 'in file %file%, expecting one of "%values%"';
- break;
- case PEAR_TASK_ERROR_INVALID :
- $info = array('reason' => $ret[1], 'task' => $task, 'file' => $file);
- $msg = 'task <%task%> in file %file% is invalid because of "%reason%"';
- break;
- }
- $this->_stack->push(__FUNCTION__, 'error', $info, $msg);
- }
-
- function _unknownTask($task, $file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('task' => $task, 'file' => $file),
- 'Unknown task "%task%" passed in file <file name="%file%">');
- }
-
- function _subpackageCannotProvideExtension($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Subpackage dependency "%name%" cannot use <providesextension>, ' .
- 'only package dependencies can use this tag');
- }
-
- function _subpackagesCannotConflict($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Subpackage dependency "%name%" cannot use <conflicts/>, ' .
- 'only package dependencies can use this tag');
- }
-
- function _cannotProvideExtension($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<%release%> packages cannot use <providesextension>, only extbinrelease, extsrcrelease, zendextsrcrelease, and zendextbinrelease can provide a PHP extension');
- }
-
- function _mustProvideExtension($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<%release%> packages must use <providesextension> to indicate which PHP extension is provided');
- }
-
- function _cannotHaveSrcpackage($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<%release%> packages cannot specify a source code package, only extension binaries may use the <srcpackage> tag');
- }
-
- function _mustSrcPackage($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<extbinrelease>/<zendextbinrelease> packages must specify a source code package with <srcpackage>');
- }
-
- function _mustSrcuri($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<extbinrelease>/<zendextbinrelease> packages must specify a source code package with <srcuri>');
- }
-
- function _uriDepsCannotHaveVersioning($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '%type%: dependencies with a <uri> tag cannot have any versioning information');
- }
-
- function _conflictingDepsCannotHaveVersioning($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '%type%: conflicting dependencies cannot have versioning info, use <exclude> to ' .
- 'exclude specific versions of a dependency');
- }
-
- function _DepchannelCannotBeUri($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '%type%: channel cannot be __uri, this is a pseudo-channel reserved for uri ' .
- 'dependencies only');
- }
-
- function _bundledPackagesMustBeFilename()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- '<bundledpackage> tags must contain only the filename of a package release ' .
- 'in the bundle');
- }
-
- function _binaryPackageMustBePackagename()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- '<binarypackage> tags must contain the name of a package that is ' .
- 'a compiled version of this extsrc/zendextsrc package');
- }
-
- function _fileNotFound($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'File "%file%" in package.xml does not exist');
- }
-
- function _notInContents($file, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file, 'tag' => $tag),
- '<%tag% name="%file%"> is invalid, file is not in <contents>');
- }
-
- function _cannotValidateNoPathSet()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'Cannot validate files, no path to package file is set (use setPackageFile())');
- }
-
- function _usesroletaskMustHaveChannelOrUri($role, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag),
- '<%tag%> for role "%role%" must contain either <uri>, or <channel> and <package>');
- }
-
- function _usesroletaskMustHavePackage($role, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag),
- '<%tag%> for role "%role%" must contain <package>');
- }
-
- function _usesroletaskMustHaveRoleTask($tag, $type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, 'type' => $type),
- '<%tag%> must contain <%type%> defining the %type% to be used');
- }
-
- function _cannotConflictWithAllOs($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag),
- '%tag% cannot conflict with all OSes');
- }
-
- function _invalidDepGroupName($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Invalid dependency group name "%name%"');
- }
-
- function _multipleToplevelDirNotAllowed()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'Multiple top-level <dir> tags are not allowed. Enclose them ' .
- 'in a <dir name="/">');
- }
-
- function _multipleInstallAs($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Only one <install> tag is allowed for file "%file%"');
- }
-
- function _ignoreAndInstallAs($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Cannot have both <ignore> and <install> tags for file "%file%"');
- }
-
- function _analyzeBundledPackages()
- {
- if (!$this->_isValid) {
- return false;
- }
- if (!$this->_pf->getPackageType() == 'bundle') {
- return false;
- }
- if (!isset($this->_pf->_packageFile)) {
- return false;
- }
- $dir_prefix = dirname($this->_pf->_packageFile);
- $common = new PEAR_Common;
- $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') :
- array($common, 'log');
- $info = $this->_pf->getContents();
- $info = $info['bundledpackage'];
- if (!is_array($info)) {
- $info = array($info);
- }
- $pkg = new PEAR_PackageFile($this->_pf->_config);
- foreach ($info as $package) {
- if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $package)) {
- $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $package);
- $this->_isValid = 0;
- continue;
- }
- call_user_func_array($log, array(1, "Analyzing bundled package $package"));
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $pkg->fromAnyFile($dir_prefix . DIRECTORY_SEPARATOR . $package,
- PEAR_VALIDATE_NORMAL);
- PEAR::popErrorHandling();
- if (PEAR::isError($ret)) {
- call_user_func_array($log, array(0, "ERROR: package $package is not a valid " .
- 'package'));
- $inf = $ret->getUserInfo();
- if (is_array($inf)) {
- foreach ($inf as $err) {
- call_user_func_array($log, array(1, $err['message']));
- }
- }
- return false;
- }
- }
- return true;
- }
-
- function _analyzePhpFiles()
- {
- if (!$this->_isValid) {
- return false;
- }
- if (!isset($this->_pf->_packageFile)) {
- $this->_cannotValidateNoPathSet();
- return false;
- }
- $dir_prefix = dirname($this->_pf->_packageFile);
- $common = new PEAR_Common;
- $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') :
- array(&$common, 'log');
- $info = $this->_pf->getContents();
- if (!$info || !isset($info['dir']['file'])) {
- $this->_tagCannotBeEmpty('contents><dir');
- return false;
- }
- $info = $info['dir']['file'];
- if (isset($info['attribs'])) {
- $info = array($info);
- }
- $provides = array();
- foreach ($info as $fa) {
- $fa = $fa['attribs'];
- $file = $fa['name'];
- if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $file)) {
- $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $file);
- $this->_isValid = 0;
- continue;
- }
- if (in_array($fa['role'], PEAR_Installer_Role::getPhpRoles()) && $dir_prefix) {
- call_user_func_array($log, array(1, "Analyzing $file"));
- $srcinfo = $this->analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file);
- if ($srcinfo) {
- $provides = array_merge($provides, $this->_buildProvidesArray($srcinfo));
- }
- }
- }
- $this->_packageName = $pn = $this->_pf->getPackage();
- $pnl = strlen($pn);
- foreach ($provides as $key => $what) {
- if (isset($what['explicit']) || !$what) {
- // skip conformance checks if the provides entry is
- // specified in the package.xml file
- continue;
- }
- extract($what);
- if ($type == 'class') {
- if (!strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_stack->push(__FUNCTION__, 'warning',
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn),
- 'in %file%: %type% "%name%" not prefixed with package name "%package%"');
- } elseif ($type == 'function') {
- if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_stack->push(__FUNCTION__, 'warning',
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn),
- 'in %file%: %type% "%name%" not prefixed with package name "%package%"');
- }
- }
- return $this->_isValid;
- }
-
- /**
- * Analyze the source code of the given PHP file
- *
- * @param string Filename of the PHP file
- * @param boolean whether to analyze $file as the file contents
- * @return mixed
- */
- function analyzeSourceCode($file, $string = false)
- {
- if (!function_exists("token_get_all")) {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Parser error: token_get_all() function must exist to analyze source code, PHP may have been compiled with --disable-tokenizer');
- return false;
- }
-
- if (!defined('T_DOC_COMMENT')) {
- define('T_DOC_COMMENT', T_COMMENT);
- }
-
- if (!defined('T_INTERFACE')) {
- define('T_INTERFACE', -1);
- }
-
- if (!defined('T_IMPLEMENTS')) {
- define('T_IMPLEMENTS', -1);
- }
-
- if ($string) {
- $contents = $file;
- } else {
- if (!$fp = @fopen($file, "r")) {
- return false;
- }
- fclose($fp);
- $contents = file_get_contents($file);
- }
-
- // Silence this function so we can catch PHP Warnings and show our own custom message
- $tokens = @token_get_all($contents);
- if (isset($php_errormsg)) {
- if (isset($this->_stack)) {
- $pn = $this->_pf->getPackage();
- $this->_stack->push(__FUNCTION__, 'warning',
- array('file' => $file, 'package' => $pn),
- 'in %file%: Could not process file for unknown reasons,' .
- ' possibly a PHP parse error in %file% from %package%');
- }
- }
-/*
- for ($i = 0; $i < sizeof($tokens); $i++) {
- @list($token, $data) = $tokens[$i];
- if (is_string($token)) {
- var_dump($token);
- } else {
- print token_name($token) . ' ';
- var_dump(rtrim($data));
- }
- }
-*/
- $look_for = 0;
- $paren_level = 0;
- $bracket_level = 0;
- $brace_level = 0;
- $lastphpdoc = '';
- $current_class = '';
- $current_interface = '';
- $current_class_level = -1;
- $current_function = '';
- $current_function_level = -1;
- $declared_classes = array();
- $declared_interfaces = array();
- $declared_functions = array();
- $declared_methods = array();
- $used_classes = array();
- $used_functions = array();
- $extends = array();
- $implements = array();
- $nodeps = array();
- $inquote = false;
- $interface = false;
- for ($i = 0; $i < sizeof($tokens); $i++) {
- if (is_array($tokens[$i])) {
- list($token, $data) = $tokens[$i];
- } else {
- $token = $tokens[$i];
- $data = '';
- }
-
- if ($inquote) {
- if ($token != '"' && $token != T_END_HEREDOC) {
- continue;
- } else {
- $inquote = false;
- continue;
- }
- }
-
- switch ($token) {
- case T_WHITESPACE :
- continue;
- case ';':
- if ($interface) {
- $current_function = '';
- $current_function_level = -1;
- }
- break;
- case '"':
- case T_START_HEREDOC:
- $inquote = true;
- break;
- case T_CURLY_OPEN:
- case T_DOLLAR_OPEN_CURLY_BRACES:
- case '{': $brace_level++; continue 2;
- case '}':
- $brace_level--;
- if ($current_class_level == $brace_level) {
- $current_class = '';
- $current_class_level = -1;
- }
- if ($current_function_level == $brace_level) {
- $current_function = '';
- $current_function_level = -1;
- }
- continue 2;
- case '[': $bracket_level++; continue 2;
- case ']': $bracket_level--; continue 2;
- case '(': $paren_level++; continue 2;
- case ')': $paren_level--; continue 2;
- case T_INTERFACE:
- $interface = true;
- case T_CLASS:
- if (($current_class_level != -1) || ($current_function_level != -1)) {
- if (isset($this->_stack)) {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Parser error: invalid PHP found in file "%file%"');
- } else {
- PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"",
- PEAR_COMMON_ERROR_INVALIDPHP);
- }
-
- return false;
- }
- case T_FUNCTION:
- case T_NEW:
- case T_EXTENDS:
- case T_IMPLEMENTS:
- $look_for = $token;
- continue 2;
- case T_STRING:
- if ($look_for == T_CLASS) {
- $current_class = $data;
- $current_class_level = $brace_level;
- $declared_classes[] = $current_class;
- } elseif ($look_for == T_INTERFACE) {
- $current_interface = $data;
- $current_class_level = $brace_level;
- $declared_interfaces[] = $current_interface;
- } elseif ($look_for == T_IMPLEMENTS) {
- $implements[$current_class] = $data;
- } elseif ($look_for == T_EXTENDS) {
- $extends[$current_class] = $data;
- } elseif ($look_for == T_FUNCTION) {
- if ($current_class) {
- $current_function = "$current_class::$data";
- $declared_methods[$current_class][] = $data;
- } elseif ($current_interface) {
- $current_function = "$current_interface::$data";
- $declared_methods[$current_interface][] = $data;
- } else {
- $current_function = $data;
- $declared_functions[] = $current_function;
- }
-
- $current_function_level = $brace_level;
- $m = array();
- } elseif ($look_for == T_NEW) {
- $used_classes[$data] = true;
- }
-
- $look_for = 0;
- continue 2;
- case T_VARIABLE:
- $look_for = 0;
- continue 2;
- case T_DOC_COMMENT:
- case T_COMMENT:
- if (preg_match('!^/\*\*\s!', $data)) {
- $lastphpdoc = $data;
- if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) {
- $nodeps = array_merge($nodeps, $m[1]);
- }
- }
- continue 2;
- case T_DOUBLE_COLON:
- $token = $tokens[$i - 1][0];
- if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC || $token == T_VARIABLE)) {
- if (isset($this->_stack)) {
- $this->_stack->push(__FUNCTION__, 'warning', array('file' => $file),
- 'Parser error: invalid PHP found in file "%file%"');
- } else {
- PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"",
- PEAR_COMMON_ERROR_INVALIDPHP);
- }
-
- return false;
- }
-
- $class = $tokens[$i - 1][1];
- if (strtolower($class) != 'parent') {
- $used_classes[$class] = true;
- }
-
- continue 2;
- }
- }
-
- return array(
- "source_file" => $file,
- "declared_classes" => $declared_classes,
- "declared_interfaces" => $declared_interfaces,
- "declared_methods" => $declared_methods,
- "declared_functions" => $declared_functions,
- "used_classes" => array_diff(array_keys($used_classes), $nodeps),
- "inheritance" => $extends,
- "implements" => $implements,
- );
- }
-
- /**
- * Build a "provides" array from data returned by
- * analyzeSourceCode(). The format of the built array is like
- * this:
- *
- * array(
- * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'),
- * ...
- * )
- *
- *
- * @param array $srcinfo array with information about a source file
- * as returned by the analyzeSourceCode() method.
- *
- * @return void
- *
- * @access private
- *
- */
- function _buildProvidesArray($srcinfo)
- {
- if (!$this->_isValid) {
- return array();
- }
-
- $providesret = array();
- $file = basename($srcinfo['source_file']);
- $pn = isset($this->_pf) ? $this->_pf->getPackage() : '';
- $pnl = strlen($pn);
- foreach ($srcinfo['declared_classes'] as $class) {
- $key = "class;$class";
- if (isset($providesret[$key])) {
- continue;
- }
-
- $providesret[$key] =
- array('file'=> $file, 'type' => 'class', 'name' => $class);
- if (isset($srcinfo['inheritance'][$class])) {
- $providesret[$key]['extends'] =
- $srcinfo['inheritance'][$class];
- }
- }
-
- foreach ($srcinfo['declared_methods'] as $class => $methods) {
- foreach ($methods as $method) {
- $function = "$class::$method";
- $key = "function;$function";
- if ($method{0} == '_' || !strcasecmp($method, $class) ||
- isset($providesret[$key])) {
- continue;
- }
-
- $providesret[$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- foreach ($srcinfo['declared_functions'] as $function) {
- $key = "function;$function";
- if ($function{0} == '_' || isset($providesret[$key])) {
- continue;
- }
-
- if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {
- $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\"";
- }
-
- $providesret[$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
-
- return $providesret;
- }
-}
-
-/**
- * PEAR_PackageFile_v1, package.xml version 1.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * For error handling
- */
-require_once 'PEAR/ErrorStack.php';
-
-/**
- * Error code if parsing is attempted with no xml extension
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_XML_EXT', 3);
-
-/**
- * Error code if creating the xml parser resource fails
- */
-define('PEAR_PACKAGEFILE_ERROR_CANT_MAKE_PARSER', 4);
-
-/**
- * Error code used for all sax xml parsing errors
- */
-define('PEAR_PACKAGEFILE_ERROR_PARSER_ERROR', 5);
-
-/**
- * Error code used when there is no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_NAME', 6);
-
-/**
- * Error code when a package name is not valid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_NAME', 7);
-
-/**
- * Error code used when no summary is parsed
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_SUMMARY', 8);
-
-/**
- * Error code for summaries that are more than 1 line
- */
-define('PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY', 9);
-
-/**
- * Error code used when no description is present
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION', 10);
-
-/**
- * Error code used when no license is present
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_LICENSE', 11);
-
-/**
- * Error code used when a <version> version number is not present
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_VERSION', 12);
-
-/**
- * Error code used when a <version> version number is invalid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_VERSION', 13);
-
-/**
- * Error code when release state is missing
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_STATE', 14);
-
-/**
- * Error code when release state is invalid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_STATE', 15);
-
-/**
- * Error code when release state is missing
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DATE', 16);
-
-/**
- * Error code when release state is invalid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DATE', 17);
-
-/**
- * Error code when no release notes are found
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_NOTES', 18);
-
-/**
- * Error code when no maintainers are found
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS', 19);
-
-/**
- * Error code when a maintainer has no handle
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE', 20);
-
-/**
- * Error code when a maintainer has no handle
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE', 21);
-
-/**
- * Error code when a maintainer has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME', 22);
-
-/**
- * Error code when a maintainer has no email
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL', 23);
-
-/**
- * Error code when a maintainer has no handle
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_MAINTROLE', 24);
-
-/**
- * Error code when a dependency is not a PHP dependency, but has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPNAME', 25);
-
-/**
- * Error code when a dependency has no type (pkg, php, etc.)
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE', 26);
-
-/**
- * Error code when a dependency has no relation (lt, ge, has, etc.)
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPREL', 27);
-
-/**
- * Error code when a dependency is not a 'has' relation, but has no version
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION', 28);
-
-/**
- * Error code when a dependency has an invalid relation
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPREL', 29);
-
-/**
- * Error code when a dependency has an invalid type
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPTYPE', 30);
-
-/**
- * Error code when a dependency has an invalid optional option
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL', 31);
-
-/**
- * Error code when a dependency is a pkg dependency, and has an invalid package name
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPNAME', 32);
-
-/**
- * Error code when a dependency has a channel="foo" attribute, and foo is not a registered channel
- */
-define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_DEPCHANNEL', 33);
-
-/**
- * Error code when rel="has" and version attribute is present.
- */
-define('PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED', 34);
-
-/**
- * Error code when type="php" and dependency name is present
- */
-define('PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED', 35);
-
-/**
- * Error code when a configure option has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_CONFNAME', 36);
-
-/**
- * Error code when a configure option has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT', 37);
-
-/**
- * Error code when a file in the filelist has an invalid role
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE', 38);
-
-/**
- * Error code when a file in the filelist has no role
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_FILEROLE', 39);
-
-/**
- * Error code when analyzing a php source file that has parse errors
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE', 40);
-
-/**
- * Error code when analyzing a php source file reveals a source element
- * without a package name prefix
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX', 41);
-
-/**
- * Error code when an unknown channel is specified
- */
-define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_CHANNEL', 42);
-
-/**
- * Error code when no files are found in the filelist
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_FILES', 43);
-
-/**
- * Error code when a file is not valid php according to _analyzeSourceCode()
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_FILE', 44);
-
-/**
- * Error code when the channel validator returns an error or warning
- */
-define('PEAR_PACKAGEFILE_ERROR_CHANNELVAL', 45);
-
-/**
- * Error code when a php5 package is packaged in php4 (analysis doesn't work)
- */
-define('PEAR_PACKAGEFILE_ERROR_PHP5', 46);
-
-/**
- * Error code when a file is listed in package.xml but does not exist
- */
-define('PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND', 47);
-
-/**
- * Error code when a <dep type="php" rel="not"... is encountered (use rel="ne")
- */
-define('PEAR_PACKAGEFILE_PHP_NO_NOT', 48);
-
-/**
- * Error code when a package.xml contains non-ISO-8859-1 characters
- */
-define('PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS', 49);
-
-/**
- * Error code when a dependency is not a 'has' relation, but has no version
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION', 50);
-
-/**
- * Error code when a package has no lead developer
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_LEAD', 51);
-
-/**
- * Error code when a filename begins with "."
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
-/**
- * package.xml encapsulator
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_v1
-{
- /**
- * @access private
- * @var PEAR_ErrorStack
- * @access private
- */
- var $_stack;
-
- /**
- * A registry object, used to access the package name validation regex for non-standard channels
- * @var PEAR_Registry
- * @access private
- */
- var $_registry;
-
- /**
- * An object that contains a log method that matches PEAR_Common::log's signature
- * @var object
- * @access private
- */
- var $_logger;
-
- /**
- * Parsed package information
- * @var array
- * @access private
- */
- var $_packageInfo;
-
- /**
- * path to package.xml
- * @var string
- * @access private
- */
- var $_packageFile;
-
- /**
- * path to package .tgz or false if this is a local/extracted package.xml
- * @var string
- * @access private
- */
- var $_archiveFile;
-
- /**
- * @var int
- * @access private
- */
- var $_isValid = 0;
-
- /**
- * Determines whether this packagefile was initialized only with partial package info
- *
- * If this package file was constructed via parsing REST, it will only contain
- *
- * - package name
- * - channel name
- * - dependencies
- * @var boolean
- * @access private
- */
- var $_incomplete = true;
-
- /**
- * @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack
- * @param string Name of Error Stack class to use.
- */
- function __construct()
- {
- $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v1');
- $this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
- $this->_isValid = 0;
- }
-
- function installBinary($installer)
- {
- return false;
- }
-
- function isExtension($name)
- {
- return false;
- }
-
- function setConfig(&$config)
- {
- $this->_config = &$config;
- $this->_registry = &$config->getRegistry();
- }
-
- function setRequestedGroup()
- {
- // placeholder
- }
-
- /**
- * For saving in the registry.
- *
- * Set the last version that was installed
- * @param string
- */
- function setLastInstalledVersion($version)
- {
- $this->_packageInfo['_lastversion'] = $version;
- }
-
- /**
- * @return string|false
- */
- function getLastInstalledVersion()
- {
- if (isset($this->_packageInfo['_lastversion'])) {
- return $this->_packageInfo['_lastversion'];
- }
- return false;
- }
-
- function getInstalledBinary()
- {
- return false;
- }
-
- function listPostinstallScripts()
- {
- return false;
- }
-
- function initPostinstallScripts()
- {
- return false;
- }
-
- function setLogger(&$logger)
- {
- if ($logger && (!is_object($logger) || !method_exists($logger, 'log'))) {
- return PEAR::raiseError('Logger must be compatible with PEAR_Common::log');
- }
- $this->_logger = &$logger;
- }
-
- function setPackagefile($file, $archive = false)
- {
- $this->_packageFile = $file;
- $this->_archiveFile = $archive ? $archive : $file;
- }
-
- function getPackageFile()
- {
- return isset($this->_packageFile) ? $this->_packageFile : false;
- }
-
- function getPackageType()
- {
- return 'php';
- }
-
- function getArchiveFile()
- {
- return $this->_archiveFile;
- }
-
- function packageInfo($field)
- {
- if (!is_string($field) || empty($field) ||
- !isset($this->_packageInfo[$field])) {
- return false;
- }
- return $this->_packageInfo[$field];
- }
-
- function setDirtree($path)
- {
- if (!isset($this->_packageInfo['dirtree'])) {
- $this->_packageInfo['dirtree'] = array();
- }
- $this->_packageInfo['dirtree'][$path] = true;
- }
-
- function getDirtree()
- {
- if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) {
- return $this->_packageInfo['dirtree'];
- }
- return false;
- }
-
- function resetDirtree()
- {
- unset($this->_packageInfo['dirtree']);
- }
-
- function fromArray($pinfo)
- {
- $this->_incomplete = false;
- $this->_packageInfo = $pinfo;
- }
-
- function isIncomplete()
- {
- return $this->_incomplete;
- }
-
- function getChannel()
- {
- return 'pear.php.net';
- }
-
- function getUri()
- {
- return false;
- }
-
- function getTime()
- {
- return false;
- }
-
- function getExtends()
- {
- if (isset($this->_packageInfo['extends'])) {
- return $this->_packageInfo['extends'];
- }
- return false;
- }
-
- /**
- * @return array
- */
- function toArray()
- {
- if (!$this->validate(PEAR_VALIDATE_NORMAL)) {
- return false;
- }
- return $this->getArray();
- }
-
- function getArray()
- {
- return $this->_packageInfo;
- }
-
- function getName()
- {
- return $this->getPackage();
- }
-
- function getPackage()
- {
- if (isset($this->_packageInfo['package'])) {
- return $this->_packageInfo['package'];
- }
- return false;
- }
-
- /**
- * WARNING - don't use this unless you know what you are doing
- */
- function setRawPackage($package)
- {
- $this->_packageInfo['package'] = $package;
- }
-
- function setPackage($package)
- {
- $this->_packageInfo['package'] = $package;
- $this->_isValid = false;
- }
-
- function getVersion()
- {
- if (isset($this->_packageInfo['version'])) {
- return $this->_packageInfo['version'];
- }
- return false;
- }
-
- function setVersion($version)
- {
- $this->_packageInfo['version'] = $version;
- $this->_isValid = false;
- }
-
- function clearMaintainers()
- {
- unset($this->_packageInfo['maintainers']);
- }
-
- function getMaintainers()
- {
- if (isset($this->_packageInfo['maintainers'])) {
- return $this->_packageInfo['maintainers'];
- }
- return false;
- }
-
- /**
- * Adds a new maintainer - no checking of duplicates is performed, use
- * updatemaintainer for that purpose.
- */
- function addMaintainer($role, $handle, $name, $email)
- {
- $this->_packageInfo['maintainers'][] =
- array('handle' => $handle, 'role' => $role, 'email' => $email, 'name' => $name);
- $this->_isValid = false;
- }
-
- function updateMaintainer($role, $handle, $name, $email)
- {
- $found = false;
- if (!isset($this->_packageInfo['maintainers']) ||
- !is_array($this->_packageInfo['maintainers'])) {
- return $this->addMaintainer($role, $handle, $name, $email);
- }
- foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) {
- if ($maintainer['handle'] == $handle) {
- $found = $i;
- break;
- }
- }
- if ($found !== false) {
- unset($this->_packageInfo['maintainers'][$found]);
- $this->_packageInfo['maintainers'] =
- array_values($this->_packageInfo['maintainers']);
- }
- $this->addMaintainer($role, $handle, $name, $email);
- }
-
- function deleteMaintainer($handle)
- {
- $found = false;
- foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) {
- if ($maintainer['handle'] == $handle) {
- $found = $i;
- break;
- }
- }
- if ($found !== false) {
- unset($this->_packageInfo['maintainers'][$found]);
- $this->_packageInfo['maintainers'] =
- array_values($this->_packageInfo['maintainers']);
- return true;
- }
- return false;
- }
-
- function getState()
- {
- if (isset($this->_packageInfo['release_state'])) {
- return $this->_packageInfo['release_state'];
- }
- return false;
- }
-
- function setRawState($state)
- {
- $this->_packageInfo['release_state'] = $state;
- }
-
- function setState($state)
- {
- $this->_packageInfo['release_state'] = $state;
- $this->_isValid = false;
- }
-
- function getDate()
- {
- if (isset($this->_packageInfo['release_date'])) {
- return $this->_packageInfo['release_date'];
- }
- return false;
- }
-
- function setDate($date)
- {
- $this->_packageInfo['release_date'] = $date;
- $this->_isValid = false;
- }
-
- function getLicense()
- {
- if (isset($this->_packageInfo['release_license'])) {
- return $this->_packageInfo['release_license'];
- }
- return false;
- }
-
- function setLicense($date)
- {
- $this->_packageInfo['release_license'] = $date;
- $this->_isValid = false;
- }
-
- function getSummary()
- {
- if (isset($this->_packageInfo['summary'])) {
- return $this->_packageInfo['summary'];
- }
- return false;
- }
-
- function setSummary($summary)
- {
- $this->_packageInfo['summary'] = $summary;
- $this->_isValid = false;
- }
-
- function getDescription()
- {
- if (isset($this->_packageInfo['description'])) {
- return $this->_packageInfo['description'];
- }
- return false;
- }
-
- function setDescription($desc)
- {
- $this->_packageInfo['description'] = $desc;
- $this->_isValid = false;
- }
-
- function getNotes()
- {
- if (isset($this->_packageInfo['release_notes'])) {
- return $this->_packageInfo['release_notes'];
- }
- return false;
- }
-
- function setNotes($notes)
- {
- $this->_packageInfo['release_notes'] = $notes;
- $this->_isValid = false;
- }
-
- function getDeps()
- {
- if (isset($this->_packageInfo['release_deps'])) {
- return $this->_packageInfo['release_deps'];
- }
- return false;
- }
-
- /**
- * Reset dependencies prior to adding new ones
- */
- function clearDeps()
- {
- unset($this->_packageInfo['release_deps']);
- }
-
- function addPhpDep($version, $rel)
- {
- $this->_isValid = false;
- $this->_packageInfo['release_deps'][] =
- array('type' => 'php',
- 'rel' => $rel,
- 'version' => $version);
- }
-
- function addPackageDep($name, $version, $rel, $optional = 'no')
- {
- $this->_isValid = false;
- $dep =
- array('type' => 'pkg',
- 'name' => $name,
- 'rel' => $rel,
- 'optional' => $optional);
- if ($rel != 'has' && $rel != 'not') {
- $dep['version'] = $version;
- }
- $this->_packageInfo['release_deps'][] = $dep;
- }
-
- function addExtensionDep($name, $version, $rel, $optional = 'no')
- {
- $this->_isValid = false;
- $this->_packageInfo['release_deps'][] =
- array('type' => 'ext',
- 'name' => $name,
- 'rel' => $rel,
- 'version' => $version,
- 'optional' => $optional);
- }
-
- /**
- * WARNING - do not use this function directly unless you know what you're doing
- */
- function setDeps($deps)
- {
- $this->_packageInfo['release_deps'] = $deps;
- }
-
- function hasDeps()
- {
- return isset($this->_packageInfo['release_deps']) &&
- count($this->_packageInfo['release_deps']);
- }
-
- function getDependencyGroup($group)
- {
- return false;
- }
-
- function isCompatible($pf)
- {
- return false;
- }
-
- function isSubpackageOf($p)
- {
- return $p->isSubpackage($this);
- }
-
- function isSubpackage($p)
- {
- return false;
- }
-
- function dependsOn($package, $channel)
- {
- if (strtolower($channel) != 'pear.php.net') {
- return false;
- }
- if (!($deps = $this->getDeps())) {
- return false;
- }
- foreach ($deps as $dep) {
- if ($dep['type'] != 'pkg') {
- continue;
- }
- if (strtolower($dep['name']) == strtolower($package)) {
- return true;
- }
- }
- return false;
- }
-
- function getConfigureOptions()
- {
- if (isset($this->_packageInfo['configure_options'])) {
- return $this->_packageInfo['configure_options'];
- }
- return false;
- }
-
- function hasConfigureOptions()
- {
- return isset($this->_packageInfo['configure_options']) &&
- count($this->_packageInfo['configure_options']);
- }
-
- function addConfigureOption($name, $prompt, $default = false)
- {
- $o = array('name' => $name, 'prompt' => $prompt);
- if ($default !== false) {
- $o['default'] = $default;
- }
- if (!isset($this->_packageInfo['configure_options'])) {
- $this->_packageInfo['configure_options'] = array();
- }
- $this->_packageInfo['configure_options'][] = $o;
- }
-
- function clearConfigureOptions()
- {
- unset($this->_packageInfo['configure_options']);
- }
-
- function getProvides()
- {
- if (isset($this->_packageInfo['provides'])) {
- return $this->_packageInfo['provides'];
- }
- return false;
- }
-
- function getProvidesExtension()
- {
- return false;
- }
-
- function addFile($dir, $file, $attrs)
- {
- $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir);
- if ($dir == '/' || $dir == '') {
- $dir = '';
- } else {
- $dir .= '/';
- }
- $file = $dir . $file;
- $file = preg_replace('![\\/]+!', '/', $file);
- $this->_packageInfo['filelist'][$file] = $attrs;
- }
-
- function getInstallationFilelist()
- {
- return $this->getFilelist();
- }
-
- function getFilelist()
- {
- if (isset($this->_packageInfo['filelist'])) {
- return $this->_packageInfo['filelist'];
- }
- return false;
- }
-
- function setFileAttribute($file, $attr, $value)
- {
- $this->_packageInfo['filelist'][$file][$attr] = $value;
- }
-
- function resetFilelist()
- {
- $this->_packageInfo['filelist'] = array();
- }
-
- function setInstalledAs($file, $path)
- {
- if ($path) {
- return $this->_packageInfo['filelist'][$file]['installed_as'] = $path;
- }
- unset($this->_packageInfo['filelist'][$file]['installed_as']);
- }
-
- function installedFile($file, $atts)
- {
- if (isset($this->_packageInfo['filelist'][$file])) {
- $this->_packageInfo['filelist'][$file] =
- array_merge($this->_packageInfo['filelist'][$file], $atts);
- } else {
- $this->_packageInfo['filelist'][$file] = $atts;
- }
- }
-
- function getChangelog()
- {
- if (isset($this->_packageInfo['changelog'])) {
- return $this->_packageInfo['changelog'];
- }
- return false;
- }
-
- function getPackagexmlVersion()
- {
- return '1.0';
- }
-
- /**
- * Wrapper to {@link PEAR_ErrorStack::getErrors()}
- * @param boolean determines whether to purge the error stack after retrieving
- * @return array
- */
- function getValidationWarnings($purge = true)
- {
- return $this->_stack->getErrors($purge);
- }
-
- // }}}
- /**
- * Validation error. Also marks the object contents as invalid
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateError($code, $params = array())
- {
- $this->_stack->push($code, 'error', $params, false, false, debug_backtrace());
- $this->_isValid = false;
- }
-
- /**
- * Validation warning. Does not mark the object contents invalid.
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateWarning($code, $params = array())
- {
- $this->_stack->push($code, 'warning', $params, false, false, debug_backtrace());
- }
-
- /**
- * @param integer error code
- * @access protected
- */
- function _getErrorMessage()
- {
- return array(
- PEAR_PACKAGEFILE_ERROR_NO_NAME =>
- 'Missing Package Name',
- PEAR_PACKAGEFILE_ERROR_NO_SUMMARY =>
- 'No summary found',
- PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY =>
- 'Summary should be on one line',
- PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION =>
- 'Missing description',
- PEAR_PACKAGEFILE_ERROR_NO_LICENSE =>
- 'Missing license',
- PEAR_PACKAGEFILE_ERROR_NO_VERSION =>
- 'No release version found',
- PEAR_PACKAGEFILE_ERROR_NO_STATE =>
- 'No release state found',
- PEAR_PACKAGEFILE_ERROR_NO_DATE =>
- 'No release date found',
- PEAR_PACKAGEFILE_ERROR_NO_NOTES =>
- 'No release notes found',
- PEAR_PACKAGEFILE_ERROR_NO_LEAD =>
- 'Package must have at least one lead maintainer',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS =>
- 'No maintainers found, at least one must be defined',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE =>
- 'Maintainer %index% has no handle (user ID at channel server)',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE =>
- 'Maintainer %index% has no role',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME =>
- 'Maintainer %index% has no name',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL =>
- 'Maintainer %index% has no email',
- PEAR_PACKAGEFILE_ERROR_NO_DEPNAME =>
- 'Dependency %index% is not a php dependency, and has no name',
- PEAR_PACKAGEFILE_ERROR_NO_DEPREL =>
- 'Dependency %index% has no relation (rel)',
- PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE =>
- 'Dependency %index% has no type',
- PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED =>
- 'PHP Dependency %index% has a name attribute of "%name%" which will be' .
- ' ignored!',
- PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION =>
- 'Dependency %index% is not a rel="has" or rel="not" dependency, ' .
- 'and has no version',
- PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION =>
- 'Dependency %index% is a type="php" dependency, ' .
- 'and has no version',
- PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED =>
- 'Dependency %index% is a rel="%rel%" dependency, versioning is ignored',
- PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL =>
- 'Dependency %index% has invalid optional value "%opt%", should be yes or no',
- PEAR_PACKAGEFILE_PHP_NO_NOT =>
- 'Dependency %index%: php dependencies cannot use "not" rel, use "ne"' .
- ' to exclude specific versions',
- PEAR_PACKAGEFILE_ERROR_NO_CONFNAME =>
- 'Configure Option %index% has no name',
- PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT =>
- 'Configure Option %index% has no prompt',
- PEAR_PACKAGEFILE_ERROR_NO_FILES =>
- 'No files in <filelist> section of package.xml',
- PEAR_PACKAGEFILE_ERROR_NO_FILEROLE =>
- 'File "%file%" has no role, expecting one of "%roles%"',
- PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE =>
- 'File "%file%" has invalid role "%role%", expecting one of "%roles%"',
- PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME =>
- 'File "%file%" cannot start with ".", cannot package or install',
- PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE =>
- 'Parser error: invalid PHP found in file "%file%"',
- PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX =>
- 'in %file%: %type% "%name%" not prefixed with package name "%package%"',
- PEAR_PACKAGEFILE_ERROR_INVALID_FILE =>
- 'Parser error: invalid PHP file "%file%"',
- PEAR_PACKAGEFILE_ERROR_CHANNELVAL =>
- 'Channel validator error: field "%field%" - %reason%',
- PEAR_PACKAGEFILE_ERROR_PHP5 =>
- 'Error, PHP5 token encountered in %file%, analysis should be in PHP5',
- PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND =>
- 'File "%file%" in package.xml does not exist',
- PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS =>
- 'Package.xml contains non-ISO-8859-1 characters, and may not validate',
- );
- }
-
- /**
- * Validate XML package definition file.
- *
- * @access public
- * @return boolean
- */
- function validate($state = PEAR_VALIDATE_NORMAL, $nofilechecking = false)
- {
- if (($this->_isValid & $state) == $state) {
- return true;
- }
- $this->_isValid = true;
- $info = $this->_packageInfo;
- if (empty($info['package'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NAME);
- $this->_packageName = $pn = 'unknown';
- } else {
- $this->_packageName = $pn = $info['package'];
- }
-
- if (empty($info['summary'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_SUMMARY);
- } elseif (strpos(trim($info['summary']), "\n") !== false) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY,
- array('summary' => $info['summary']));
- }
- if (empty($info['description'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION);
- }
- if (empty($info['release_license'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LICENSE);
- }
- if (empty($info['version'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_VERSION);
- }
- if (empty($info['release_state'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_STATE);
- }
- if (empty($info['release_date'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DATE);
- }
- if (empty($info['release_notes'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NOTES);
- }
- if (empty($info['maintainers'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS);
- } else {
- $haslead = false;
- $i = 1;
- foreach ($info['maintainers'] as $m) {
- if (empty($m['handle'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE,
- array('index' => $i));
- }
- if (empty($m['role'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE,
- array('index' => $i, 'roles' => PEAR_Common::getUserRoles()));
- } elseif ($m['role'] == 'lead') {
- $haslead = true;
- }
- if (empty($m['name'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME,
- array('index' => $i));
- }
- if (empty($m['email'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL,
- array('index' => $i));
- }
- $i++;
- }
- if (!$haslead) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LEAD);
- }
- }
- if (!empty($info['release_deps'])) {
- $i = 1;
- foreach ($info['release_deps'] as $d) {
- if (!isset($d['type']) || empty($d['type'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE,
- array('index' => $i, 'types' => PEAR_Common::getDependencyTypes()));
- continue;
- }
- if (!isset($d['rel']) || empty($d['rel'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPREL,
- array('index' => $i, 'rels' => PEAR_Common::getDependencyRelations()));
- continue;
- }
- if (!empty($d['optional'])) {
- if (!in_array($d['optional'], array('yes', 'no'))) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL,
- array('index' => $i, 'opt' => $d['optional']));
- }
- }
- if ($d['rel'] != 'has' && $d['rel'] != 'not' && empty($d['version'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION,
- array('index' => $i));
- } elseif (($d['rel'] == 'has' || $d['rel'] == 'not') && !empty($d['version'])) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED,
- array('index' => $i, 'rel' => $d['rel']));
- }
- if ($d['type'] == 'php' && !empty($d['name'])) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED,
- array('index' => $i, 'name' => $d['name']));
- } elseif ($d['type'] != 'php' && empty($d['name'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPNAME,
- array('index' => $i));
- }
- if ($d['type'] == 'php' && empty($d['version'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION,
- array('index' => $i));
- }
- if (($d['rel'] == 'not') && ($d['type'] == 'php')) {
- $this->_validateError(PEAR_PACKAGEFILE_PHP_NO_NOT,
- array('index' => $i));
- }
- $i++;
- }
- }
- if (!empty($info['configure_options'])) {
- $i = 1;
- foreach ($info['configure_options'] as $c) {
- if (empty($c['name'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFNAME,
- array('index' => $i));
- }
- if (empty($c['prompt'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT,
- array('index' => $i));
- }
- $i++;
- }
- }
- if (empty($info['filelist'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILES);
- $errors[] = 'no files';
- } else {
- foreach ($info['filelist'] as $file => $fa) {
- if (empty($fa['role'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILEROLE,
- array('file' => $file, 'roles' => PEAR_Common::getFileRoles()));
- continue;
- } elseif (!in_array($fa['role'], PEAR_Common::getFileRoles())) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE,
- array('file' => $file, 'role' => $fa['role'], 'roles' => PEAR_Common::getFileRoles()));
- }
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', str_replace('\\', '/', $file))) {
- // file contains .. parent directory or . cur directory references
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
- array('file' => $file));
- }
- if (isset($fa['install-as']) &&
- preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $fa['install-as']))) {
- // install-as contains .. parent directory or . cur directory references
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
- array('file' => $file . ' [installed as ' . $fa['install-as'] . ']'));
- }
- if (isset($fa['baseinstalldir']) &&
- preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $fa['baseinstalldir']))) {
- // install-as contains .. parent directory or . cur directory references
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
- array('file' => $file . ' [baseinstalldir ' . $fa['baseinstalldir'] . ']'));
- }
- }
- }
- if (isset($this->_registry) && $this->_isValid) {
- $chan = $this->_registry->getChannel('pear.php.net');
- if (PEAR::isError($chan)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $chan->getMessage());
- return $this->_isValid = 0;
- }
- $validator = $chan->getValidationObject();
- $validator->setPackageFile($this);
- $validator->validate($state);
- $failures = $validator->getFailures();
- foreach ($failures['errors'] as $error) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $error);
- }
- foreach ($failures['warnings'] as $warning) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $warning);
- }
- }
- if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$nofilechecking) {
- if ($this->_analyzePhpFiles()) {
- $this->_isValid = true;
- }
- }
- if ($this->_isValid) {
- return $this->_isValid = $state;
- }
- return $this->_isValid = 0;
- }
-
- function _analyzePhpFiles()
- {
- if (!$this->_isValid) {
- return false;
- }
- if (!isset($this->_packageFile)) {
- return false;
- }
- $dir_prefix = dirname($this->_packageFile);
- $common = new PEAR_Common;
- $log = isset($this->_logger) ? array(&$this->_logger, 'log') :
- array($common, 'log');
- $info = $this->getFilelist();
- foreach ($info as $file => $fa) {
- if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $file)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND,
- array('file' => realpath($dir_prefix) . DIRECTORY_SEPARATOR . $file));
- continue;
- }
- if ($fa['role'] == 'php' && $dir_prefix) {
- call_user_func_array($log, array(1, "Analyzing $file"));
- $srcinfo = $this->_analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file);
- if ($srcinfo) {
- $this->_buildProvidesArray($srcinfo);
- }
- }
- }
- $this->_packageName = $pn = $this->getPackage();
- $pnl = strlen($pn);
- if (isset($this->_packageInfo['provides'])) {
- foreach ((array) $this->_packageInfo['provides'] as $key => $what) {
- if (isset($what['explicit'])) {
- // skip conformance checks if the provides entry is
- // specified in the package.xml file
- continue;
- }
- extract($what);
- if ($type == 'class') {
- if (!strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX,
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn));
- } elseif ($type == 'function') {
- if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX,
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn));
- }
- }
- }
- return $this->_isValid;
- }
-
- /**
- * Get the default xml generator object
- *
- * @return PEAR_PackageFile_Generator_v1
- */
- function &getDefaultGenerator()
- {
- if (!class_exists('PEAR_PackageFile_Generator_v1')) {
- require_once 'PEAR/PackageFile/Generator/v1.php';
- }
- $a = new PEAR_PackageFile_Generator_v1($this);
- return $a;
- }
-
- /**
- * Get the contents of a file listed within the package.xml
- * @param string
- * @return string
- */
- function getFileContents($file)
- {
- if ($this->_archiveFile == $this->_packageFile) { // unpacked
- $dir = dirname($this->_packageFile);
- $file = $dir . DIRECTORY_SEPARATOR . $file;
- $file = str_replace(array('/', '\\'),
- array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file);
- if (file_exists($file) && is_readable($file)) {
- return implode('', file($file));
- }
- } else { // tgz
- if (!class_exists('Archive_Tar')) {
- require_once 'Archive/Tar.php';
- }
- $tar = new Archive_Tar($this->_archiveFile);
- $tar->pushErrorHandling(PEAR_ERROR_RETURN);
- if ($file != 'package.xml' && $file != 'package2.xml') {
- $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file;
- }
- $file = $tar->extractInString($file);
- $tar->popErrorHandling();
- if (PEAR::isError($file)) {
- return PEAR::raiseError("Cannot locate file '$file' in archive");
- }
- return $file;
- }
- }
-
- // {{{ analyzeSourceCode()
- /**
- * Analyze the source code of the given PHP file
- *
- * @param string Filename of the PHP file
- * @return mixed
- * @access private
- */
- function _analyzeSourceCode($file)
- {
- if (!function_exists("token_get_all")) {
- return false;
- }
- if (!defined('T_DOC_COMMENT')) {
- define('T_DOC_COMMENT', T_COMMENT);
- }
- if (!defined('T_INTERFACE')) {
- define('T_INTERFACE', -1);
- }
- if (!defined('T_IMPLEMENTS')) {
- define('T_IMPLEMENTS', -1);
- }
- if (!$fp = @fopen($file, "r")) {
- return false;
- }
- fclose($fp);
- $contents = file_get_contents($file);
- $tokens = token_get_all($contents);
-/*
- for ($i = 0; $i < sizeof($tokens); $i++) {
- @list($token, $data) = $tokens[$i];
- if (is_string($token)) {
- var_dump($token);
- } else {
- print token_name($token) . ' ';
- var_dump(rtrim($data));
- }
- }
-*/
- $look_for = 0;
- $paren_level = 0;
- $bracket_level = 0;
- $brace_level = 0;
- $lastphpdoc = '';
- $current_class = '';
- $current_interface = '';
- $current_class_level = -1;
- $current_function = '';
- $current_function_level = -1;
- $declared_classes = array();
- $declared_interfaces = array();
- $declared_functions = array();
- $declared_methods = array();
- $used_classes = array();
- $used_functions = array();
- $extends = array();
- $implements = array();
- $nodeps = array();
- $inquote = false;
- $interface = false;
- for ($i = 0; $i < sizeof($tokens); $i++) {
- if (is_array($tokens[$i])) {
- list($token, $data) = $tokens[$i];
- } else {
- $token = $tokens[$i];
- $data = '';
- }
- if ($inquote) {
- if ($token != '"' && $token != T_END_HEREDOC) {
- continue;
- } else {
- $inquote = false;
- continue;
- }
- }
- switch ($token) {
- case T_WHITESPACE :
- continue;
- case ';':
- if ($interface) {
- $current_function = '';
- $current_function_level = -1;
- }
- break;
- case '"':
- case T_START_HEREDOC:
- $inquote = true;
- break;
- case T_CURLY_OPEN:
- case T_DOLLAR_OPEN_CURLY_BRACES:
- case '{': $brace_level++; continue 2;
- case '}':
- $brace_level--;
- if ($current_class_level == $brace_level) {
- $current_class = '';
- $current_class_level = -1;
- }
- if ($current_function_level == $brace_level) {
- $current_function = '';
- $current_function_level = -1;
- }
- continue 2;
- case '[': $bracket_level++; continue 2;
- case ']': $bracket_level--; continue 2;
- case '(': $paren_level++; continue 2;
- case ')': $paren_level--; continue 2;
- case T_INTERFACE:
- $interface = true;
- case T_CLASS:
- if (($current_class_level != -1) || ($current_function_level != -1)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE,
- array('file' => $file));
- return false;
- }
- case T_FUNCTION:
- case T_NEW:
- case T_EXTENDS:
- case T_IMPLEMENTS:
- $look_for = $token;
- continue 2;
- case T_STRING:
- if ($look_for == T_CLASS) {
- $current_class = $data;
- $current_class_level = $brace_level;
- $declared_classes[] = $current_class;
- } elseif ($look_for == T_INTERFACE) {
- $current_interface = $data;
- $current_class_level = $brace_level;
- $declared_interfaces[] = $current_interface;
- } elseif ($look_for == T_IMPLEMENTS) {
- $implements[$current_class] = $data;
- } elseif ($look_for == T_EXTENDS) {
- $extends[$current_class] = $data;
- } elseif ($look_for == T_FUNCTION) {
- if ($current_class) {
- $current_function = "$current_class::$data";
- $declared_methods[$current_class][] = $data;
- } elseif ($current_interface) {
- $current_function = "$current_interface::$data";
- $declared_methods[$current_interface][] = $data;
- } else {
- $current_function = $data;
- $declared_functions[] = $current_function;
- }
- $current_function_level = $brace_level;
- $m = array();
- } elseif ($look_for == T_NEW) {
- $used_classes[$data] = true;
- }
- $look_for = 0;
- continue 2;
- case T_VARIABLE:
- $look_for = 0;
- continue 2;
- case T_DOC_COMMENT:
- case T_COMMENT:
- if (preg_match('!^/\*\*\s!', $data)) {
- $lastphpdoc = $data;
- if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) {
- $nodeps = array_merge($nodeps, $m[1]);
- }
- }
- continue 2;
- case T_DOUBLE_COLON:
- if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE,
- array('file' => $file));
- return false;
- }
- $class = $tokens[$i - 1][1];
- if (strtolower($class) != 'parent') {
- $used_classes[$class] = true;
- }
- continue 2;
- }
- }
- return array(
- "source_file" => $file,
- "declared_classes" => $declared_classes,
- "declared_interfaces" => $declared_interfaces,
- "declared_methods" => $declared_methods,
- "declared_functions" => $declared_functions,
- "used_classes" => array_diff(array_keys($used_classes), $nodeps),
- "inheritance" => $extends,
- "implements" => $implements,
- );
- }
-
- /**
- * Build a "provides" array from data returned by
- * analyzeSourceCode(). The format of the built array is like
- * this:
- *
- * array(
- * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'),
- * ...
- * )
- *
- *
- * @param array $srcinfo array with information about a source file
- * as returned by the analyzeSourceCode() method.
- *
- * @return void
- *
- * @access private
- *
- */
- function _buildProvidesArray($srcinfo)
- {
- if (!$this->_isValid) {
- return false;
- }
- $file = basename($srcinfo['source_file']);
- $pn = $this->getPackage();
- $pnl = strlen($pn);
- foreach ($srcinfo['declared_classes'] as $class) {
- $key = "class;$class";
- if (isset($this->_packageInfo['provides'][$key])) {
- continue;
- }
- $this->_packageInfo['provides'][$key] =
- array('file'=> $file, 'type' => 'class', 'name' => $class);
- if (isset($srcinfo['inheritance'][$class])) {
- $this->_packageInfo['provides'][$key]['extends'] =
- $srcinfo['inheritance'][$class];
- }
- }
- foreach ($srcinfo['declared_methods'] as $class => $methods) {
- foreach ($methods as $method) {
- $function = "$class::$method";
- $key = "function;$function";
- if ($method{0} == '_' || !strcasecmp($method, $class) ||
- isset($this->_packageInfo['provides'][$key])) {
- continue;
- }
- $this->_packageInfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- foreach ($srcinfo['declared_functions'] as $function) {
- $key = "function;$function";
- if ($function{0} == '_' || isset($this->_packageInfo['provides'][$key])) {
- continue;
- }
- if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {
- $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\"";
- }
- $this->_packageInfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- // }}}
-}
-?>
-
-/**
- * PEAR_PackageFile_v2, package.xml version 2.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * For error handling
- */
-require_once 'PEAR/ErrorStack.php';
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_v2
-{
-
- /**
- * Parsed package information
- * @var array
- * @access private
- */
- var $_packageInfo = array();
-
- /**
- * path to package .tgz or false if this is a local/extracted package.xml
- * @var string|false
- * @access private
- */
- var $_archiveFile;
-
- /**
- * path to package .xml or false if this is an abstract parsed-from-string xml
- * @var string|false
- * @access private
- */
- var $_packageFile;
-
- /**
- * This is used by file analysis routines to log progress information
- * @var PEAR_Common
- * @access protected
- */
- var $_logger;
-
- /**
- * This is set to the highest validation level that has been validated
- *
- * If the package.xml is invalid or unknown, this is set to 0. If
- * normal validation has occurred, this is set to PEAR_VALIDATE_NORMAL. If
- * downloading/installation validation has occurred it is set to PEAR_VALIDATE_DOWNLOADING
- * or INSTALLING, and so on up to PEAR_VALIDATE_PACKAGING. This allows validation
- * "caching" to occur, which is particularly important for package validation, so
- * that PHP files are not validated twice
- * @var int
- * @access private
- */
- var $_isValid = 0;
-
- /**
- * True if the filelist has been validated
- * @param bool
- */
- var $_filesValid = false;
-
- /**
- * @var PEAR_Registry
- * @access protected
- */
- var $_registry;
-
- /**
- * @var PEAR_Config
- * @access protected
- */
- var $_config;
-
- /**
- * Optional Dependency group requested for installation
- * @var string
- * @access private
- */
- var $_requestedGroup = false;
-
- /**
- * @var PEAR_ErrorStack
- * @access protected
- */
- var $_stack;
-
- /**
- * Namespace prefix used for tasks in this package.xml - use tasks: whenever possible
- */
- var $_tasksNs;
-
- /**
- * Determines whether this packagefile was initialized only with partial package info
- *
- * If this package file was constructed via parsing REST, it will only contain
- *
- * - package name
- * - channel name
- * - dependencies
- * @var boolean
- * @access private
- */
- var $_incomplete = true;
-
- /**
- * @var PEAR_PackageFile_v2_Validator
- */
- var $_v2Validator;
-
- /**
- * The constructor merely sets up the private error stack
- */
- function __construct()
- {
- $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null);
- $this->_isValid = false;
- }
-
- /**
- * To make unit-testing easier
- * @param PEAR_Frontend_*
- * @param array options
- * @param PEAR_Config
- * @return PEAR_Downloader
- * @access protected
- */
- function &getPEARDownloader(&$i, $o, &$c)
- {
- $z = new PEAR_Downloader($i, $o, $c);
- return $z;
- }
-
- /**
- * To make unit-testing easier
- * @param PEAR_Config
- * @param array options
- * @param array package name as returned from {@link PEAR_Registry::parsePackageName()}
- * @param int PEAR_VALIDATE_* constant
- * @return PEAR_Dependency2
- * @access protected
- */
- function &getPEARDependency2(&$c, $o, $p, $s = PEAR_VALIDATE_INSTALLING)
- {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
- $z = new PEAR_Dependency2($c, $o, $p, $s);
- return $z;
- }
-
- function getInstalledBinary()
- {
- return isset($this->_packageInfo['#binarypackage']) ? $this->_packageInfo['#binarypackage'] :
- false;
- }
-
- /**
- * Installation of source package has failed, attempt to download and install the
- * binary version of this package.
- * @param PEAR_Installer
- * @return array|false
- */
- function installBinary(&$installer)
- {
- if (!OS_WINDOWS) {
- $a = false;
- return $a;
- }
- if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
- $releasetype = $this->getPackageType() . 'release';
- if (!is_array($installer->getInstallPackages())) {
- $a = false;
- return $a;
- }
- foreach ($installer->getInstallPackages() as $p) {
- if ($p->isExtension($this->_packageInfo['providesextension'])) {
- if ($p->getPackageType() != 'extsrc' && $p->getPackageType() != 'zendextsrc') {
- $a = false;
- return $a; // the user probably downloaded it separately
- }
- }
- }
- if (isset($this->_packageInfo[$releasetype]['binarypackage'])) {
- $installer->log(0, 'Attempting to download binary version of extension "' .
- $this->_packageInfo['providesextension'] . '"');
- $params = $this->_packageInfo[$releasetype]['binarypackage'];
- if (!is_array($params) || !isset($params[0])) {
- $params = array($params);
- }
- if (isset($this->_packageInfo['channel'])) {
- foreach ($params as $i => $param) {
- $params[$i] = array('channel' => $this->_packageInfo['channel'],
- 'package' => $param, 'version' => $this->getVersion());
- }
- }
- $dl = &$this->getPEARDownloader($installer->ui, $installer->getOptions(),
- $installer->config);
- $verbose = $dl->config->get('verbose');
- $dl->config->set('verbose', -1);
- foreach ($params as $param) {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $dl->download(array($param));
- PEAR::popErrorHandling();
- if (is_array($ret) && count($ret)) {
- break;
- }
- }
- $dl->config->set('verbose', $verbose);
- if (is_array($ret)) {
- if (count($ret) == 1) {
- $pf = $ret[0]->getPackageFile();
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $installer->install($ret[0]);
- PEAR::popErrorHandling();
- if (is_array($err)) {
- $this->_packageInfo['#binarypackage'] = $ret[0]->getPackage();
- // "install" self, so all dependencies will work transparently
- $this->_registry->addPackage2($this);
- $installer->log(0, 'Download and install of binary extension "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pf->getChannel(),
- 'package' => $pf->getPackage()), true) . '" successful');
- $a = array($ret[0], $err);
- return $a;
- }
- $installer->log(0, 'Download and install of binary extension "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pf->getChannel(),
- 'package' => $pf->getPackage()), true) . '" failed');
- }
- }
- }
- }
- $a = false;
- return $a;
- }
-
- /**
- * @return string|false Extension name
- */
- function getProvidesExtension()
- {
- if (in_array($this->getPackageType(),
- array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
- if (isset($this->_packageInfo['providesextension'])) {
- return $this->_packageInfo['providesextension'];
- }
- }
- return false;
- }
-
- /**
- * @param string Extension name
- * @return bool
- */
- function isExtension($extension)
- {
- if (in_array($this->getPackageType(),
- array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
- return $this->_packageInfo['providesextension'] == $extension;
- }
- return false;
- }
-
- /**
- * Tests whether every part of the package.xml 1.0 is represented in
- * this package.xml 2.0
- * @param PEAR_PackageFile_v1
- * @return bool
- */
- function isEquivalent($pf1)
- {
- if (!$pf1) {
- return true;
- }
- if ($this->getPackageType() == 'bundle') {
- return false;
- }
- $this->_stack->getErrors(true);
- if (!$pf1->validate(PEAR_VALIDATE_NORMAL)) {
- return false;
- }
- $pass = true;
- if ($pf1->getPackage() != $this->getPackage()) {
- $this->_differentPackage($pf1->getPackage());
- $pass = false;
- }
- if ($pf1->getVersion() != $this->getVersion()) {
- $this->_differentVersion($pf1->getVersion());
- $pass = false;
- }
- if (trim($pf1->getSummary()) != $this->getSummary()) {
- $this->_differentSummary($pf1->getSummary());
- $pass = false;
- }
- if (preg_replace('/\s+/', '', $pf1->getDescription()) !=
- preg_replace('/\s+/', '', $this->getDescription())) {
- $this->_differentDescription($pf1->getDescription());
- $pass = false;
- }
- if ($pf1->getState() != $this->getState()) {
- $this->_differentState($pf1->getState());
- $pass = false;
- }
- if (!strstr(preg_replace('/\s+/', '', $this->getNotes()),
- preg_replace('/\s+/', '', $pf1->getNotes()))) {
- $this->_differentNotes($pf1->getNotes());
- $pass = false;
- }
- $mymaintainers = $this->getMaintainers();
- $yourmaintainers = $pf1->getMaintainers();
- for ($i1 = 0; $i1 < count($yourmaintainers); $i1++) {
- $reset = false;
- for ($i2 = 0; $i2 < count($mymaintainers); $i2++) {
- if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) {
- if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) {
- $this->_differentRole($mymaintainers[$i2]['handle'],
- $yourmaintainers[$i1]['role'], $mymaintainers[$i2]['role']);
- $pass = false;
- }
- if ($mymaintainers[$i2]['email'] != $yourmaintainers[$i1]['email']) {
- $this->_differentEmail($mymaintainers[$i2]['handle'],
- $yourmaintainers[$i1]['email'], $mymaintainers[$i2]['email']);
- $pass = false;
- }
- if ($mymaintainers[$i2]['name'] != $yourmaintainers[$i1]['name']) {
- $this->_differentName($mymaintainers[$i2]['handle'],
- $yourmaintainers[$i1]['name'], $mymaintainers[$i2]['name']);
- $pass = false;
- }
- unset($mymaintainers[$i2]);
- $mymaintainers = array_values($mymaintainers);
- unset($yourmaintainers[$i1]);
- $yourmaintainers = array_values($yourmaintainers);
- $reset = true;
- break;
- }
- }
- if ($reset) {
- $i1 = -1;
- }
- }
- $this->_unmatchedMaintainers($mymaintainers, $yourmaintainers);
- $filelist = $this->getFilelist();
- foreach ($pf1->getFilelist() as $file => $atts) {
- if (!isset($filelist[$file])) {
- $this->_missingFile($file);
- $pass = false;
- }
- }
- return $pass;
- }
-
- function _differentPackage($package)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('package' => $package,
- 'self' => $this->getPackage()),
- 'package.xml 1.0 package "%package%" does not match "%self%"');
- }
-
- function _differentVersion($version)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('version' => $version,
- 'self' => $this->getVersion()),
- 'package.xml 1.0 version "%version%" does not match "%self%"');
- }
-
- function _differentState($state)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('state' => $state,
- 'self' => $this->getState()),
- 'package.xml 1.0 state "%state%" does not match "%self%"');
- }
-
- function _differentRole($handle, $role, $selfrole)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle,
- 'role' => $role, 'self' => $selfrole),
- 'package.xml 1.0 maintainer "%handle%" role "%role%" does not match "%self%"');
- }
-
- function _differentEmail($handle, $email, $selfemail)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle,
- 'email' => $email, 'self' => $selfemail),
- 'package.xml 1.0 maintainer "%handle%" email "%email%" does not match "%self%"');
- }
-
- function _differentName($handle, $name, $selfname)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle,
- 'name' => $name, 'self' => $selfname),
- 'package.xml 1.0 maintainer "%handle%" name "%name%" does not match "%self%"');
- }
-
- function _unmatchedMaintainers($my, $yours)
- {
- if ($my) {
- array_walk($my, create_function('&$i, $k', '$i = $i["handle"];'));
- $this->_stack->push(__FUNCTION__, 'error', array('handles' => $my),
- 'package.xml 2.0 has unmatched extra maintainers "%handles%"');
- }
- if ($yours) {
- array_walk($yours, create_function('&$i, $k', '$i = $i["handle"];'));
- $this->_stack->push(__FUNCTION__, 'error', array('handles' => $yours),
- 'package.xml 1.0 has unmatched extra maintainers "%handles%"');
- }
- }
-
- function _differentNotes($notes)
- {
- $truncnotes = strlen($notes) < 25 ? $notes : substr($notes, 0, 24) . '...';
- $truncmynotes = strlen($this->getNotes()) < 25 ? $this->getNotes() :
- substr($this->getNotes(), 0, 24) . '...';
- $this->_stack->push(__FUNCTION__, 'error', array('notes' => $truncnotes,
- 'self' => $truncmynotes),
- 'package.xml 1.0 release notes "%notes%" do not match "%self%"');
- }
-
- function _differentSummary($summary)
- {
- $truncsummary = strlen($summary) < 25 ? $summary : substr($summary, 0, 24) . '...';
- $truncmysummary = strlen($this->getsummary()) < 25 ? $this->getSummary() :
- substr($this->getsummary(), 0, 24) . '...';
- $this->_stack->push(__FUNCTION__, 'error', array('summary' => $truncsummary,
- 'self' => $truncmysummary),
- 'package.xml 1.0 summary "%summary%" does not match "%self%"');
- }
-
- function _differentDescription($description)
- {
- $truncdescription = trim(strlen($description) < 25 ? $description : substr($description, 0, 24) . '...');
- $truncmydescription = trim(strlen($this->getDescription()) < 25 ? $this->getDescription() :
- substr($this->getdescription(), 0, 24) . '...');
- $this->_stack->push(__FUNCTION__, 'error', array('description' => $truncdescription,
- 'self' => $truncmydescription),
- 'package.xml 1.0 description "%description%" does not match "%self%"');
- }
-
- function _missingFile($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'package.xml 1.0 file "%file%" is not present in <contents>');
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawState($state)
- {
- if (!isset($this->_packageInfo['stability'])) {
- $this->_packageInfo['stability'] = array();
- }
- $this->_packageInfo['stability']['release'] = $state;
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawCompatible($compatible)
- {
- $this->_packageInfo['compatible'] = $compatible;
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawPackage($package)
- {
- $this->_packageInfo['name'] = $package;
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawChannel($channel)
- {
- $this->_packageInfo['channel'] = $channel;
- }
-
- function setRequestedGroup($group)
- {
- $this->_requestedGroup = $group;
- }
-
- function getRequestedGroup()
- {
- if (isset($this->_requestedGroup)) {
- return $this->_requestedGroup;
- }
- return false;
- }
-
- /**
- * For saving in the registry.
- *
- * Set the last version that was installed
- * @param string
- */
- function setLastInstalledVersion($version)
- {
- $this->_packageInfo['_lastversion'] = $version;
- }
-
- /**
- * @return string|false
- */
- function getLastInstalledVersion()
- {
- if (isset($this->_packageInfo['_lastversion'])) {
- return $this->_packageInfo['_lastversion'];
- }
- return false;
- }
-
- /**
- * Determines whether this package.xml has post-install scripts or not
- * @return array|false
- */
- function listPostinstallScripts()
- {
- $filelist = $this->getFilelist();
- $contents = $this->getContents();
- $contents = $contents['dir']['file'];
- if (!is_array($contents) || !isset($contents[0])) {
- $contents = array($contents);
- }
- $taskfiles = array();
- foreach ($contents as $file) {
- $atts = $file['attribs'];
- unset($file['attribs']);
- if (count($file)) {
- $taskfiles[$atts['name']] = $file;
- }
- }
- $common = new PEAR_Common;
- $common->debug = $this->_config->get('verbose');
- $this->_scripts = array();
- $ret = array();
- foreach ($taskfiles as $name => $tasks) {
- if (!isset($filelist[$name])) {
- // ignored files will not be in the filelist
- continue;
- }
- $atts = $filelist[$name];
- foreach ($tasks as $tag => $raw) {
- $task = $this->getTask($tag);
- $task = new $task($this->_config, $common, PEAR_TASK_INSTALL);
- if ($task->isScript()) {
- $ret[] = $filelist[$name]['installed_as'];
- }
- }
- }
- if (count($ret)) {
- return $ret;
- }
- return false;
- }
-
- /**
- * Initialize post-install scripts for running
- *
- * This method can be used to detect post-install scripts, as the return value
- * indicates whether any exist
- * @return bool
- */
- function initPostinstallScripts()
- {
- $filelist = $this->getFilelist();
- $contents = $this->getContents();
- $contents = $contents['dir']['file'];
- if (!is_array($contents) || !isset($contents[0])) {
- $contents = array($contents);
- }
- $taskfiles = array();
- foreach ($contents as $file) {
- $atts = $file['attribs'];
- unset($file['attribs']);
- if (count($file)) {
- $taskfiles[$atts['name']] = $file;
- }
- }
- $common = new PEAR_Common;
- $common->debug = $this->_config->get('verbose');
- $this->_scripts = array();
- foreach ($taskfiles as $name => $tasks) {
- if (!isset($filelist[$name])) {
- // file was not installed due to installconditions
- continue;
- }
- $atts = $filelist[$name];
- foreach ($tasks as $tag => $raw) {
- $taskname = $this->getTask($tag);
- $task = new $taskname($this->_config, $common, PEAR_TASK_INSTALL);
- if (!$task->isScript()) {
- continue; // scripts are only handled after installation
- }
- $lastversion = isset($this->_packageInfo['_lastversion']) ?
- $this->_packageInfo['_lastversion'] : null;
- $task->init($raw, $atts, $lastversion);
- $res = $task->startSession($this, $atts['installed_as']);
- if (!$res) {
- continue; // skip this file
- }
- if (PEAR::isError($res)) {
- return $res;
- }
- $assign = &$task;
- $this->_scripts[] = &$assign;
- }
- }
- if (count($this->_scripts)) {
- return true;
- }
- return false;
- }
-
- function runPostinstallScripts()
- {
- if ($this->initPostinstallScripts()) {
- $ui = &PEAR_Frontend::singleton();
- if ($ui) {
- $ui->runPostinstallScripts($this->_scripts, $this);
- }
- }
- }
-
-
- /**
- * Convert a recursive set of <dir> and <file> tags into a single <dir> tag with
- * <file> tags.
- */
- function flattenFilelist()
- {
- if (isset($this->_packageInfo['bundle'])) {
- return;
- }
- $filelist = array();
- if (isset($this->_packageInfo['contents']['dir']['dir'])) {
- $this->_getFlattenedFilelist($filelist, $this->_packageInfo['contents']['dir']);
- if (!isset($filelist[1])) {
- $filelist = $filelist[0];
- }
- $this->_packageInfo['contents']['dir']['file'] = $filelist;
- unset($this->_packageInfo['contents']['dir']['dir']);
- } else {
- // else already flattened but check for baseinstalldir propagation
- if (isset($this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'])) {
- if (isset($this->_packageInfo['contents']['dir']['file'][0])) {
- foreach ($this->_packageInfo['contents']['dir']['file'] as $i => $file) {
- if (isset($file['attribs']['baseinstalldir'])) {
- continue;
- }
- $this->_packageInfo['contents']['dir']['file'][$i]['attribs']['baseinstalldir']
- = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
- }
- } else {
- if (!isset($this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'])) {
- $this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir']
- = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
- }
- }
- }
- }
- }
-
- /**
- * @param array the final flattened file list
- * @param array the current directory being processed
- * @param string|false any recursively inherited baeinstalldir attribute
- * @param string private recursion variable
- * @return array
- * @access protected
- */
- function _getFlattenedFilelist(&$files, $dir, $baseinstall = false, $path = '')
- {
- if (isset($dir['attribs']) && isset($dir['attribs']['baseinstalldir'])) {
- $baseinstall = $dir['attribs']['baseinstalldir'];
- }
- if (isset($dir['dir'])) {
- if (!isset($dir['dir'][0])) {
- $dir['dir'] = array($dir['dir']);
- }
- foreach ($dir['dir'] as $subdir) {
- if (!isset($subdir['attribs']) || !isset($subdir['attribs']['name'])) {
- $name = '*unknown*';
- } else {
- $name = $subdir['attribs']['name'];
- }
- $newpath = empty($path) ? $name :
- $path . '/' . $name;
- $this->_getFlattenedFilelist($files, $subdir,
- $baseinstall, $newpath);
- }
- }
- if (isset($dir['file'])) {
- if (!isset($dir['file'][0])) {
- $dir['file'] = array($dir['file']);
- }
- foreach ($dir['file'] as $file) {
- $attrs = $file['attribs'];
- $name = $attrs['name'];
- if ($baseinstall && !isset($attrs['baseinstalldir'])) {
- $attrs['baseinstalldir'] = $baseinstall;
- }
- $attrs['name'] = empty($path) ? $name : $path . '/' . $name;
- $attrs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
- $attrs['name']);
- $file['attribs'] = $attrs;
- $files[] = $file;
- }
- }
- }
-
- function setConfig(&$config)
- {
- $this->_config = &$config;
- $this->_registry = &$config->getRegistry();
- }
-
- function setLogger(&$logger)
- {
- if (!is_object($logger) || !method_exists($logger, 'log')) {
- return PEAR::raiseError('Logger must be compatible with PEAR_Common::log');
- }
- $this->_logger = &$logger;
- }
-
- /**
- * WARNING - do not use this function directly unless you know what you're doing
- */
- function setDeps($deps)
- {
- $this->_packageInfo['dependencies'] = $deps;
- }
-
- /**
- * WARNING - do not use this function directly unless you know what you're doing
- */
- function setCompatible($compat)
- {
- $this->_packageInfo['compatible'] = $compat;
- }
-
- function setPackagefile($file, $archive = false)
- {
- $this->_packageFile = $file;
- $this->_archiveFile = $archive ? $archive : $file;
- }
-
- /**
- * Wrapper to {@link PEAR_ErrorStack::getErrors()}
- * @param boolean determines whether to purge the error stack after retrieving
- * @return array
- */
- function getValidationWarnings($purge = true)
- {
- return $this->_stack->getErrors($purge);
- }
-
- function getPackageFile()
- {
- return $this->_packageFile;
- }
-
- function getArchiveFile()
- {
- return $this->_archiveFile;
- }
-
-
- /**
- * Directly set the array that defines this packagefile
- *
- * WARNING: no validation. This should only be performed by internal methods
- * inside PEAR or by inputting an array saved from an existing PEAR_PackageFile_v2
- * @param array
- */
- function fromArray($pinfo)
- {
- unset($pinfo['old']);
- unset($pinfo['xsdversion']);
- // If the changelog isn't an array then it was passed in as an empty tag
- if (isset($pinfo['changelog']) && !is_array($pinfo['changelog'])) {
- unset($pinfo['changelog']);
- }
- $this->_incomplete = false;
- $this->_packageInfo = $pinfo;
- }
-
- function isIncomplete()
- {
- return $this->_incomplete;
- }
-
- /**
- * @return array
- */
- function toArray($forreg = false)
- {
- if (!$this->validate(PEAR_VALIDATE_NORMAL)) {
- return false;
- }
- return $this->getArray($forreg);
- }
-
- function getArray($forReg = false)
- {
- if ($forReg) {
- $arr = $this->_packageInfo;
- $arr['old'] = array();
- $arr['old']['version'] = $this->getVersion();
- $arr['old']['release_date'] = $this->getDate();
- $arr['old']['release_state'] = $this->getState();
- $arr['old']['release_license'] = $this->getLicense();
- $arr['old']['release_notes'] = $this->getNotes();
- $arr['old']['release_deps'] = $this->getDeps();
- $arr['old']['maintainers'] = $this->getMaintainers();
- $arr['xsdversion'] = '2.0';
- return $arr;
- } else {
- $info = $this->_packageInfo;
- unset($info['dirtree']);
- if (isset($info['_lastversion'])) {
- unset($info['_lastversion']);
- }
- if (isset($info['#binarypackage'])) {
- unset($info['#binarypackage']);
- }
- return $info;
- }
- }
-
- function packageInfo($field)
- {
- $arr = $this->getArray(true);
- if ($field == 'state') {
- return $arr['stability']['release'];
- }
- if ($field == 'api-version') {
- return $arr['version']['api'];
- }
- if ($field == 'api-state') {
- return $arr['stability']['api'];
- }
- if (isset($arr['old'][$field])) {
- if (!is_string($arr['old'][$field])) {
- return null;
- }
- return $arr['old'][$field];
- }
- if (isset($arr[$field])) {
- if (!is_string($arr[$field])) {
- return null;
- }
- return $arr[$field];
- }
- return null;
- }
-
- function getName()
- {
- return $this->getPackage();
- }
-
- function getPackage()
- {
- if (isset($this->_packageInfo['name'])) {
- return $this->_packageInfo['name'];
- }
- return false;
- }
-
- function getChannel()
- {
- if (isset($this->_packageInfo['uri'])) {
- return '__uri';
- }
- if (isset($this->_packageInfo['channel'])) {
- return strtolower($this->_packageInfo['channel']);
- }
- return false;
- }
-
- function getUri()
- {
- if (isset($this->_packageInfo['uri'])) {
- return $this->_packageInfo['uri'];
- }
- return false;
- }
-
- function getExtends()
- {
- if (isset($this->_packageInfo['extends'])) {
- return $this->_packageInfo['extends'];
- }
- return false;
- }
-
- function getSummary()
- {
- if (isset($this->_packageInfo['summary'])) {
- return $this->_packageInfo['summary'];
- }
- return false;
- }
-
- function getDescription()
- {
- if (isset($this->_packageInfo['description'])) {
- return $this->_packageInfo['description'];
- }
- return false;
- }
-
- function getMaintainers($raw = false)
- {
- if (!isset($this->_packageInfo['lead'])) {
- return false;
- }
- if ($raw) {
- $ret = array('lead' => $this->_packageInfo['lead']);
- (isset($this->_packageInfo['developer'])) ?
- $ret['developer'] = $this->_packageInfo['developer'] :null;
- (isset($this->_packageInfo['contributor'])) ?
- $ret['contributor'] = $this->_packageInfo['contributor'] :null;
- (isset($this->_packageInfo['helper'])) ?
- $ret['helper'] = $this->_packageInfo['helper'] :null;
- return $ret;
- } else {
- $ret = array();
- $leads = isset($this->_packageInfo['lead'][0]) ? $this->_packageInfo['lead'] :
- array($this->_packageInfo['lead']);
- foreach ($leads as $lead) {
- $s = $lead;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'lead';
- $ret[] = $s;
- }
- if (isset($this->_packageInfo['developer'])) {
- $leads = isset($this->_packageInfo['developer'][0]) ?
- $this->_packageInfo['developer'] :
- array($this->_packageInfo['developer']);
- foreach ($leads as $maintainer) {
- $s = $maintainer;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'developer';
- $ret[] = $s;
- }
- }
- if (isset($this->_packageInfo['contributor'])) {
- $leads = isset($this->_packageInfo['contributor'][0]) ?
- $this->_packageInfo['contributor'] :
- array($this->_packageInfo['contributor']);
- foreach ($leads as $maintainer) {
- $s = $maintainer;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'contributor';
- $ret[] = $s;
- }
- }
- if (isset($this->_packageInfo['helper'])) {
- $leads = isset($this->_packageInfo['helper'][0]) ?
- $this->_packageInfo['helper'] :
- array($this->_packageInfo['helper']);
- foreach ($leads as $maintainer) {
- $s = $maintainer;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'helper';
- $ret[] = $s;
- }
- }
- return $ret;
- }
- return false;
- }
-
- function getLeads()
- {
- if (isset($this->_packageInfo['lead'])) {
- return $this->_packageInfo['lead'];
- }
- return false;
- }
-
- function getDevelopers()
- {
- if (isset($this->_packageInfo['developer'])) {
- return $this->_packageInfo['developer'];
- }
- return false;
- }
-
- function getContributors()
- {
- if (isset($this->_packageInfo['contributor'])) {
- return $this->_packageInfo['contributor'];
- }
- return false;
- }
-
- function getHelpers()
- {
- if (isset($this->_packageInfo['helper'])) {
- return $this->_packageInfo['helper'];
- }
- return false;
- }
-
- function setDate($date)
- {
- if (!isset($this->_packageInfo['date'])) {
- // ensure that the extends tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease',
- 'zendextbinrelease', 'bundle', 'changelog'), array(), 'date');
- }
- $this->_packageInfo['date'] = $date;
- $this->_isValid = 0;
- }
-
- function setTime($time)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['time'])) {
- // ensure that the time tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease',
- 'zendextbinrelease', 'bundle', 'changelog'), $time, 'time');
- }
- $this->_packageInfo['time'] = $time;
- }
-
- function getDate()
- {
- if (isset($this->_packageInfo['date'])) {
- return $this->_packageInfo['date'];
- }
- return false;
- }
-
- function getTime()
- {
- if (isset($this->_packageInfo['time'])) {
- return $this->_packageInfo['time'];
- }
- return false;
- }
-
- /**
- * @param package|api version category to return
- */
- function getVersion($key = 'release')
- {
- if (isset($this->_packageInfo['version'][$key])) {
- return $this->_packageInfo['version'][$key];
- }
- return false;
- }
-
- function getStability()
- {
- if (isset($this->_packageInfo['stability'])) {
- return $this->_packageInfo['stability'];
- }
- return false;
- }
-
- function getState($key = 'release')
- {
- if (isset($this->_packageInfo['stability'][$key])) {
- return $this->_packageInfo['stability'][$key];
- }
- return false;
- }
-
- function getLicense($raw = false)
- {
- if (isset($this->_packageInfo['license'])) {
- if ($raw) {
- return $this->_packageInfo['license'];
- }
- if (is_array($this->_packageInfo['license'])) {
- return $this->_packageInfo['license']['_content'];
- } else {
- return $this->_packageInfo['license'];
- }
- }
- return false;
- }
-
- function getLicenseLocation()
- {
- if (!isset($this->_packageInfo['license']) || !is_array($this->_packageInfo['license'])) {
- return false;
- }
- return $this->_packageInfo['license']['attribs'];
- }
-
- function getNotes()
- {
- if (isset($this->_packageInfo['notes'])) {
- return $this->_packageInfo['notes'];
- }
- return false;
- }
-
- /**
- * Return the <usesrole> tag contents, if any
- * @return array|false
- */
- function getUsesrole()
- {
- if (isset($this->_packageInfo['usesrole'])) {
- return $this->_packageInfo['usesrole'];
- }
- return false;
- }
-
- /**
- * Return the <usestask> tag contents, if any
- * @return array|false
- */
- function getUsestask()
- {
- if (isset($this->_packageInfo['usestask'])) {
- return $this->_packageInfo['usestask'];
- }
- return false;
- }
-
- /**
- * This should only be used to retrieve filenames and install attributes
- */
- function getFilelist($preserve = false)
- {
- if (isset($this->_packageInfo['filelist']) && !$preserve) {
- return $this->_packageInfo['filelist'];
- }
- $this->flattenFilelist();
- if ($contents = $this->getContents()) {
- $ret = array();
- if (!isset($contents['dir'])) {
- return false;
- }
- if (!isset($contents['dir']['file'][0])) {
- $contents['dir']['file'] = array($contents['dir']['file']);
- }
- foreach ($contents['dir']['file'] as $file) {
- if (!isset($file['attribs']['name'])) {
- continue;
- }
- $name = $file['attribs']['name'];
- if (!$preserve) {
- $file = $file['attribs'];
- }
- $ret[$name] = $file;
- }
- if (!$preserve) {
- $this->_packageInfo['filelist'] = $ret;
- }
- return $ret;
- }
- return false;
- }
-
- /**
- * Return configure options array, if any
- *
- * @return array|false
- */
- function getConfigureOptions()
- {
- if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
- return false;
- }
-
- $releases = $this->getReleases();
- if (isset($releases[0])) {
- $releases = $releases[0];
- }
-
- if (isset($releases['configureoption'])) {
- if (!isset($releases['configureoption'][0])) {
- $releases['configureoption'] = array($releases['configureoption']);
- }
-
- for ($i = 0; $i < count($releases['configureoption']); $i++) {
- $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs'];
- }
-
- return $releases['configureoption'];
- }
-
- return false;
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- */
- function resetFilelist()
- {
- $this->_packageInfo['filelist'] = array();
- }
-
- /**
- * Retrieve a list of files that should be installed on this computer
- * @return array
- */
- function getInstallationFilelist($forfilecheck = false)
- {
- $contents = $this->getFilelist(true);
- if (isset($contents['dir']['attribs']['baseinstalldir'])) {
- $base = $contents['dir']['attribs']['baseinstalldir'];
- }
- if (isset($this->_packageInfo['bundle'])) {
- return PEAR::raiseError(
- 'Exception: bundles should be handled in download code only');
- }
- $release = $this->getReleases();
- if ($release) {
- if (!isset($release[0])) {
- if (!isset($release['installconditions']) && !isset($release['filelist'])) {
- if ($forfilecheck) {
- return $this->getFilelist();
- }
- return $contents;
- }
- $release = array($release);
- }
- $depchecker = &$this->getPEARDependency2($this->_config, array(),
- array('channel' => $this->getChannel(), 'package' => $this->getPackage()),
- PEAR_VALIDATE_INSTALLING);
- foreach ($release as $instance) {
- if (isset($instance['installconditions'])) {
- $installconditions = $instance['installconditions'];
- if (is_array($installconditions)) {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($installconditions as $type => $conditions) {
- if (!isset($conditions[0])) {
- $conditions = array($conditions);
- }
- foreach ($conditions as $condition) {
- $ret = $depchecker->{"validate{$type}Dependency"}($condition);
- if (PEAR::isError($ret)) {
- PEAR::popErrorHandling();
- continue 3; // skip this release
- }
- }
- }
- PEAR::popErrorHandling();
- }
- }
- // this is the release to use
- if (isset($instance['filelist'])) {
- // ignore files
- if (isset($instance['filelist']['ignore'])) {
- $ignore = isset($instance['filelist']['ignore'][0]) ?
- $instance['filelist']['ignore'] :
- array($instance['filelist']['ignore']);
- foreach ($ignore as $ig) {
- unset ($contents[$ig['attribs']['name']]);
- }
- }
- // install files as this name
- if (isset($instance['filelist']['install'])) {
- $installas = isset($instance['filelist']['install'][0]) ?
- $instance['filelist']['install'] :
- array($instance['filelist']['install']);
- foreach ($installas as $as) {
- $contents[$as['attribs']['name']]['attribs']['install-as'] =
- $as['attribs']['as'];
- }
- }
- }
- if ($forfilecheck) {
- foreach ($contents as $file => $attrs) {
- $contents[$file] = $attrs['attribs'];
- }
- }
- return $contents;
- }
- } else { // simple release - no installconditions or install-as
- if ($forfilecheck) {
- return $this->getFilelist();
- }
- return $contents;
- }
- // no releases matched
- return PEAR::raiseError('No releases in package.xml matched the existing operating ' .
- 'system, extensions installed, or architecture, cannot install');
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- * @param string file name
- * @param string installed path
- */
- function setInstalledAs($file, $path)
- {
- if ($path) {
- return $this->_packageInfo['filelist'][$file]['installed_as'] = $path;
- }
- unset($this->_packageInfo['filelist'][$file]['installed_as']);
- }
-
- function getInstalledLocation($file)
- {
- if (isset($this->_packageInfo['filelist'][$file]['installed_as'])) {
- return $this->_packageInfo['filelist'][$file]['installed_as'];
- }
- return false;
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- */
- function installedFile($file, $atts)
- {
- if (isset($this->_packageInfo['filelist'][$file])) {
- $this->_packageInfo['filelist'][$file] =
- array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']);
- } else {
- $this->_packageInfo['filelist'][$file] = $atts['attribs'];
- }
- }
-
- /**
- * Retrieve the contents tag
- */
- function getContents()
- {
- if (isset($this->_packageInfo['contents'])) {
- return $this->_packageInfo['contents'];
- }
- return false;
- }
-
- /**
- * @param string full path to file
- * @param string attribute name
- * @param string attribute value
- * @param int risky but fast - use this to choose a file based on its position in the list
- * of files. Index is zero-based like PHP arrays.
- * @return bool success of operation
- */
- function setFileAttribute($filename, $attr, $value, $index = false)
- {
- $this->_isValid = 0;
- if (in_array($attr, array('role', 'name', 'baseinstalldir'))) {
- $this->_filesValid = false;
- }
- if ($index !== false &&
- isset($this->_packageInfo['contents']['dir']['file'][$index]['attribs'])) {
- $this->_packageInfo['contents']['dir']['file'][$index]['attribs'][$attr] = $value;
- return true;
- }
- if (!isset($this->_packageInfo['contents']['dir']['file'])) {
- return false;
- }
- $files = $this->_packageInfo['contents']['dir']['file'];
- if (!isset($files[0])) {
- $files = array($files);
- $ind = false;
- } else {
- $ind = true;
- }
- foreach ($files as $i => $file) {
- if (isset($file['attribs'])) {
- if ($file['attribs']['name'] == $filename) {
- if ($ind) {
- $this->_packageInfo['contents']['dir']['file'][$i]['attribs'][$attr] = $value;
- } else {
- $this->_packageInfo['contents']['dir']['file']['attribs'][$attr] = $value;
- }
- return true;
- }
- }
- }
- return false;
- }
-
- function setDirtree($path)
- {
- if (!isset($this->_packageInfo['dirtree'])) {
- $this->_packageInfo['dirtree'] = array();
- }
- $this->_packageInfo['dirtree'][$path] = true;
- }
-
- function getDirtree()
- {
- if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) {
- return $this->_packageInfo['dirtree'];
- }
- return false;
- }
-
- function resetDirtree()
- {
- unset($this->_packageInfo['dirtree']);
- }
-
- /**
- * Determines whether this package claims it is compatible with the version of
- * the package that has a recommended version dependency
- * @param PEAR_PackageFile_v2|PEAR_PackageFile_v1|PEAR_Downloader_Package
- * @return boolean
- */
- function isCompatible($pf)
- {
- if (!isset($this->_packageInfo['compatible'])) {
- return false;
- }
- if (!isset($this->_packageInfo['channel'])) {
- return false;
- }
- $me = $pf->getVersion();
- $compatible = $this->_packageInfo['compatible'];
- if (!isset($compatible[0])) {
- $compatible = array($compatible);
- }
- $found = false;
- foreach ($compatible as $info) {
- if (strtolower($info['name']) == strtolower($pf->getPackage())) {
- if (strtolower($info['channel']) == strtolower($pf->getChannel())) {
- $found = true;
- break;
- }
- }
- }
- if (!$found) {
- return false;
- }
- if (isset($info['exclude'])) {
- if (!isset($info['exclude'][0])) {
- $info['exclude'] = array($info['exclude']);
- }
- foreach ($info['exclude'] as $exclude) {
- if (version_compare($me, $exclude, '==')) {
- return false;
- }
- }
- }
- if (version_compare($me, $info['min'], '>=') && version_compare($me, $info['max'], '<=')) {
- return true;
- }
- return false;
- }
-
- /**
- * @return array|false
- */
- function getCompatible()
- {
- if (isset($this->_packageInfo['compatible'])) {
- return $this->_packageInfo['compatible'];
- }
- return false;
- }
-
- function getDependencies()
- {
- if (isset($this->_packageInfo['dependencies'])) {
- return $this->_packageInfo['dependencies'];
- }
- return false;
- }
-
- function isSubpackageOf($p)
- {
- return $p->isSubpackage($this);
- }
-
- /**
- * Determines whether the passed in package is a subpackage of this package.
- *
- * No version checking is done, only name verification.
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return bool
- */
- function isSubpackage($p)
- {
- $sub = array();
- if (isset($this->_packageInfo['dependencies']['required']['subpackage'])) {
- $sub = $this->_packageInfo['dependencies']['required']['subpackage'];
- if (!isset($sub[0])) {
- $sub = array($sub);
- }
- }
- if (isset($this->_packageInfo['dependencies']['optional']['subpackage'])) {
- $sub1 = $this->_packageInfo['dependencies']['optional']['subpackage'];
- if (!isset($sub1[0])) {
- $sub1 = array($sub1);
- }
- $sub = array_merge($sub, $sub1);
- }
- if (isset($this->_packageInfo['dependencies']['group'])) {
- $group = $this->_packageInfo['dependencies']['group'];
- if (!isset($group[0])) {
- $group = array($group);
- }
- foreach ($group as $deps) {
- if (isset($deps['subpackage'])) {
- $sub2 = $deps['subpackage'];
- if (!isset($sub2[0])) {
- $sub2 = array($sub2);
- }
- $sub = array_merge($sub, $sub2);
- }
- }
- }
- foreach ($sub as $dep) {
- if (strtolower($dep['name']) == strtolower($p->getPackage())) {
- if (isset($dep['channel'])) {
- if (strtolower($dep['channel']) == strtolower($p->getChannel())) {
- return true;
- }
- } else {
- if ($dep['uri'] == $p->getURI()) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- function dependsOn($package, $channel)
- {
- if (!($deps = $this->getDependencies())) {
- return false;
- }
- foreach (array('package', 'subpackage') as $type) {
- foreach (array('required', 'optional') as $needed) {
- if (isset($deps[$needed][$type])) {
- if (!isset($deps[$needed][$type][0])) {
- $deps[$needed][$type] = array($deps[$needed][$type]);
- }
- foreach ($deps[$needed][$type] as $dep) {
- $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri';
- if (strtolower($dep['name']) == strtolower($package) &&
- $depchannel == $channel) {
- return true;
- }
- }
- }
- }
- if (isset($deps['group'])) {
- if (!isset($deps['group'][0])) {
- $dep['group'] = array($deps['group']);
- }
- foreach ($deps['group'] as $group) {
- if (isset($group[$type])) {
- if (!is_array($group[$type])) {
- $group[$type] = array($group[$type]);
- }
- foreach ($group[$type] as $dep) {
- $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri';
- if (strtolower($dep['name']) == strtolower($package) &&
- $depchannel == $channel) {
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Get the contents of a dependency group
- * @param string
- * @return array|false
- */
- function getDependencyGroup($name)
- {
- $name = strtolower($name);
- if (!isset($this->_packageInfo['dependencies']['group'])) {
- return false;
- }
- $groups = $this->_packageInfo['dependencies']['group'];
- if (!isset($groups[0])) {
- $groups = array($groups);
- }
- foreach ($groups as $group) {
- if (strtolower($group['attribs']['name']) == $name) {
- return $group;
- }
- }
- return false;
- }
-
- /**
- * Retrieve a partial package.xml 1.0 representation of dependencies
- *
- * a very limited representation of dependencies is returned by this method.
- * The <exclude> tag for excluding certain versions of a dependency is
- * completely ignored. In addition, dependency groups are ignored, with the
- * assumption that all dependencies in dependency groups are also listed in
- * the optional group that work with all dependency groups
- * @param boolean return package.xml 2.0 <dependencies> tag
- * @return array|false
- */
- function getDeps($raw = false, $nopearinstaller = false)
- {
- if (isset($this->_packageInfo['dependencies'])) {
- if ($raw) {
- return $this->_packageInfo['dependencies'];
- }
- $ret = array();
- $map = array(
- 'php' => 'php',
- 'package' => 'pkg',
- 'subpackage' => 'pkg',
- 'extension' => 'ext',
- 'os' => 'os',
- 'pearinstaller' => 'pkg',
- );
- foreach (array('required', 'optional') as $type) {
- $optional = ($type == 'optional') ? 'yes' : 'no';
- if (!isset($this->_packageInfo['dependencies'][$type])
- || empty($this->_packageInfo['dependencies'][$type])) {
- continue;
- }
- foreach ($this->_packageInfo['dependencies'][$type] as $dtype => $deps) {
- if ($dtype == 'pearinstaller' && $nopearinstaller) {
- continue;
- }
- if (!isset($deps[0])) {
- $deps = array($deps);
- }
- foreach ($deps as $dep) {
- if (!isset($map[$dtype])) {
- // no support for arch type
- continue;
- }
- if ($dtype == 'pearinstaller') {
- $dep['name'] = 'PEAR';
- $dep['channel'] = 'pear.php.net';
- }
- $s = array('type' => $map[$dtype]);
- if (isset($dep['channel'])) {
- $s['channel'] = $dep['channel'];
- }
- if (isset($dep['uri'])) {
- $s['uri'] = $dep['uri'];
- }
- if (isset($dep['name'])) {
- $s['name'] = $dep['name'];
- }
- if (isset($dep['conflicts'])) {
- $s['rel'] = 'not';
- } else {
- if (!isset($dep['min']) &&
- !isset($dep['max'])) {
- $s['rel'] = 'has';
- $s['optional'] = $optional;
- } elseif (isset($dep['min']) &&
- isset($dep['max'])) {
- $s['rel'] = 'ge';
- $s1 = $s;
- $s1['rel'] = 'le';
- $s['version'] = $dep['min'];
- $s1['version'] = $dep['max'];
- if (isset($dep['channel'])) {
- $s1['channel'] = $dep['channel'];
- }
- if ($dtype != 'php') {
- $s['name'] = $dep['name'];
- $s1['name'] = $dep['name'];
- }
- $s['optional'] = $optional;
- $s1['optional'] = $optional;
- $ret[] = $s1;
- } elseif (isset($dep['min'])) {
- if (isset($dep['exclude']) &&
- $dep['exclude'] == $dep['min']) {
- $s['rel'] = 'gt';
- } else {
- $s['rel'] = 'ge';
- }
- $s['version'] = $dep['min'];
- $s['optional'] = $optional;
- if ($dtype != 'php') {
- $s['name'] = $dep['name'];
- }
- } elseif (isset($dep['max'])) {
- if (isset($dep['exclude']) &&
- $dep['exclude'] == $dep['max']) {
- $s['rel'] = 'lt';
- } else {
- $s['rel'] = 'le';
- }
- $s['version'] = $dep['max'];
- $s['optional'] = $optional;
- if ($dtype != 'php') {
- $s['name'] = $dep['name'];
- }
- }
- }
- $ret[] = $s;
- }
- }
- }
- if (count($ret)) {
- return $ret;
- }
- }
- return false;
- }
-
- /**
- * @return php|extsrc|extbin|zendextsrc|zendextbin|bundle|false
- */
- function getPackageType()
- {
- if (isset($this->_packageInfo['phprelease'])) {
- return 'php';
- }
- if (isset($this->_packageInfo['extsrcrelease'])) {
- return 'extsrc';
- }
- if (isset($this->_packageInfo['extbinrelease'])) {
- return 'extbin';
- }
- if (isset($this->_packageInfo['zendextsrcrelease'])) {
- return 'zendextsrc';
- }
- if (isset($this->_packageInfo['zendextbinrelease'])) {
- return 'zendextbin';
- }
- if (isset($this->_packageInfo['bundle'])) {
- return 'bundle';
- }
- return false;
- }
-
- /**
- * @return array|false
- */
- function getReleases()
- {
- $type = $this->getPackageType();
- if ($type != 'bundle') {
- $type .= 'release';
- }
- if ($this->getPackageType() && isset($this->_packageInfo[$type])) {
- return $this->_packageInfo[$type];
- }
- return false;
- }
-
- /**
- * @return array
- */
- function getChangelog()
- {
- if (isset($this->_packageInfo['changelog'])) {
- return $this->_packageInfo['changelog'];
- }
- return false;
- }
-
- function hasDeps()
- {
- return isset($this->_packageInfo['dependencies']);
- }
-
- function getPackagexmlVersion()
- {
- if (isset($this->_packageInfo['zendextsrcrelease'])) {
- return '2.1';
- }
- if (isset($this->_packageInfo['zendextbinrelease'])) {
- return '2.1';
- }
- return '2.0';
- }
-
- /**
- * @return array|false
- */
- function getSourcePackage()
- {
- if (isset($this->_packageInfo['extbinrelease']) ||
- isset($this->_packageInfo['zendextbinrelease'])) {
- return array('channel' => $this->_packageInfo['srcchannel'],
- 'package' => $this->_packageInfo['srcpackage']);
- }
- return false;
- }
-
- function getBundledPackages()
- {
- if (isset($this->_packageInfo['bundle'])) {
- return $this->_packageInfo['contents']['bundledpackage'];
- }
- return false;
- }
-
- function getLastModified()
- {
- if (isset($this->_packageInfo['_lastmodified'])) {
- return $this->_packageInfo['_lastmodified'];
- }
- return false;
- }
-
- /**
- * Get the contents of a file listed within the package.xml
- * @param string
- * @return string
- */
- function getFileContents($file)
- {
- if ($this->_archiveFile == $this->_packageFile) { // unpacked
- $dir = dirname($this->_packageFile);
- $file = $dir . DIRECTORY_SEPARATOR . $file;
- $file = str_replace(array('/', '\\'),
- array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file);
- if (file_exists($file) && is_readable($file)) {
- return implode('', file($file));
- }
- } else { // tgz
- $tar = new Archive_Tar($this->_archiveFile);
- $tar->pushErrorHandling(PEAR_ERROR_RETURN);
- if ($file != 'package.xml' && $file != 'package2.xml') {
- $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file;
- }
- $file = $tar->extractInString($file);
- $tar->popErrorHandling();
- if (PEAR::isError($file)) {
- return PEAR::raiseError("Cannot locate file '$file' in archive");
- }
- return $file;
- }
- }
-
- function &getRW()
- {
- if (!class_exists('PEAR_PackageFile_v2_rw')) {
- require_once 'PEAR/PackageFile/v2/rw.php';
- }
- $a = new PEAR_PackageFile_v2_rw;
- foreach (get_object_vars($this) as $name => $unused) {
- if (!isset($this->$name)) {
- continue;
- }
- if ($name == '_config' || $name == '_logger'|| $name == '_registry' ||
- $name == '_stack') {
- $a->$name = &$this->$name;
- } else {
- $a->$name = $this->$name;
- }
- }
- return $a;
- }
-
- function &getDefaultGenerator()
- {
- if (!class_exists('PEAR_PackageFile_Generator_v2')) {
- require_once 'PEAR/PackageFile/Generator/v2.php';
- }
- $a = new PEAR_PackageFile_Generator_v2($this);
- return $a;
- }
-
- function analyzeSourceCode($file, $string = false)
- {
- if (!isset($this->_v2Validator) ||
- !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
- if (!class_exists('PEAR_PackageFile_v2_Validator')) {
- require_once 'PEAR/PackageFile/v2/Validator.php';
- }
- $this->_v2Validator = new PEAR_PackageFile_v2_Validator;
- }
- return $this->_v2Validator->analyzeSourceCode($file, $string);
- }
-
- function validate($state = PEAR_VALIDATE_NORMAL)
- {
- if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
- return false;
- }
- if (!isset($this->_v2Validator) ||
- !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
- if (!class_exists('PEAR_PackageFile_v2_Validator')) {
- require_once 'PEAR/PackageFile/v2/Validator.php';
- }
- $this->_v2Validator = new PEAR_PackageFile_v2_Validator;
- }
- if (isset($this->_packageInfo['xsdversion'])) {
- unset($this->_packageInfo['xsdversion']);
- }
- return $this->_v2Validator->validate($this, $state);
- }
-
- function getTasksNs()
- {
- if (!isset($this->_tasksNs)) {
- if (isset($this->_packageInfo['attribs'])) {
- foreach ($this->_packageInfo['attribs'] as $name => $value) {
- if ($value == 'http://pear.php.net/dtd/tasks-1.0') {
- $this->_tasksNs = str_replace('xmlns:', '', $name);
- break;
- }
- }
- }
- }
- return $this->_tasksNs;
- }
-
- /**
- * Determine whether a task name is a valid task. Custom tasks may be defined
- * using subdirectories by putting a "-" in the name, as in <tasks:mycustom-task>
- *
- * Note that this method will auto-load the task class file and test for the existence
- * of the name with "-" replaced by "_" as in PEAR/Task/mycustom/task.php makes class
- * PEAR_Task_mycustom_task
- * @param string
- * @return boolean
- */
- function getTask($task)
- {
- $this->getTasksNs();
- // transform all '-' to '/' and 'tasks:' to '' so tasks:replace becomes replace
- $task = str_replace(array($this->_tasksNs . ':', '-'), array('', ' '), $task);
- $taskfile = str_replace(' ', '/', ucwords($task));
- $task = str_replace(array(' ', '/'), '_', ucwords($task));
- if (class_exists("PEAR_Task_$task")) {
- return "PEAR_Task_$task";
- }
- $fp = @fopen("PEAR/Task/$taskfile.php", 'r', true);
- if ($fp) {
- fclose($fp);
- require_once "PEAR/Task/$taskfile.php";
- return "PEAR_Task_$task";
- }
- return false;
- }
-
- /**
- * Key-friendly array_splice
- * @param tagname to splice a value in before
- * @param mixed the value to splice in
- * @param string the new tag name
- */
- function _ksplice($array, $key, $value, $newkey)
- {
- $offset = array_search($key, array_keys($array));
- $after = array_slice($array, $offset);
- $before = array_slice($array, 0, $offset);
- $before[$newkey] = $value;
- return array_merge($before, $after);
- }
-
- /**
- * @param array a list of possible keys, in the order they may occur
- * @param mixed contents of the new package.xml tag
- * @param string tag name
- * @access private
- */
- function _insertBefore($array, $keys, $contents, $newkey)
- {
- foreach ($keys as $key) {
- if (isset($array[$key])) {
- return $array = $this->_ksplice($array, $key, $contents, $newkey);
- }
- }
- $array[$newkey] = $contents;
- return $array;
- }
-
- /**
- * @param subsection of {@link $_packageInfo}
- * @param array|string tag contents
- * @param array format:
- * <pre>
- * array(
- * tagname => array(list of tag names that follow this one),
- * childtagname => array(list of child tag names that follow this one),
- * )
- * </pre>
- *
- * This allows construction of nested tags
- * @access private
- */
- function _mergeTag($manip, $contents, $order)
- {
- if (count($order)) {
- foreach ($order as $tag => $curorder) {
- if (!isset($manip[$tag])) {
- // ensure that the tag is set up
- $manip = $this->_insertBefore($manip, $curorder, array(), $tag);
- }
- if (count($order) > 1) {
- $manip[$tag] = $this->_mergeTag($manip[$tag], $contents, array_slice($order, 1));
- return $manip;
- }
- }
- } else {
- return $manip;
- }
- if (is_array($manip[$tag]) && !empty($manip[$tag]) && isset($manip[$tag][0])) {
- $manip[$tag][] = $contents;
- } else {
- if (!count($manip[$tag])) {
- $manip[$tag] = $contents;
- } else {
- $manip[$tag] = array($manip[$tag]);
- $manip[$tag][] = $contents;
- }
- }
- return $manip;
- }
-}
-?>
-
-/**
- * PEAR_REST_10
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a12
- */
-
-/**
- * For downloading REST xml/txt files
- */
-require_once 'PEAR/REST.php';
-
-/**
- * Implement REST 1.0
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a12
- */
-class PEAR_REST_10
-{
- /**
- * @var PEAR_REST
- */
- var $_rest;
- function __construct($config, $options = array())
- {
- $this->_rest = new PEAR_REST($config, $options);
- }
-
- /**
- * Retrieve information about a remote package to be downloaded from a REST server
- *
- * @param string $base The uri to prepend to all REST calls
- * @param array $packageinfo an array of format:
- * <pre>
- * array(
- * 'package' => 'packagename',
- * 'channel' => 'channelname',
- * ['state' => 'alpha' (or valid state),]
- * -or-
- * ['version' => '1.whatever']
- * </pre>
- * @param string $prefstate Current preferred_state config variable value
- * @param bool $installed the installed version of this package to compare against
- * @return array|false|PEAR_Error see {@link _returnDownloadURL()}
- */
- function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false)
- {
- $states = $this->betterStates($prefstate, true);
- if (!$states) {
- return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
- }
-
- $channel = $packageinfo['channel'];
- $package = $packageinfo['package'];
- $state = isset($packageinfo['state']) ? $packageinfo['state'] : null;
- $version = isset($packageinfo['version']) ? $packageinfo['version'] : null;
- $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml';
-
- $info = $this->_rest->retrieveData($restFile, false, false, $channel);
- if (PEAR::isError($info)) {
- return PEAR::raiseError('No releases available for package "' .
- $channel . '/' . $package . '"');
- }
-
- if (!isset($info['r'])) {
- return false;
- }
-
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
-
- foreach ($info['r'] as $release) {
- if (!isset($this->_rest->_options['force']) && ($installed &&
- version_compare($release['v'], $installed, '<'))) {
- continue;
- }
-
- if (isset($state)) {
- // try our preferred state first
- if ($release['s'] == $state) {
- $found = true;
- break;
- }
- // see if there is something newer and more stable
- // bug #7221
- if (in_array($release['s'], $this->betterStates($state), true)) {
- $found = true;
- break;
- }
- } elseif (isset($version)) {
- if ($release['v'] == $version) {
- $found = true;
- break;
- }
- } else {
- if (in_array($release['s'], $states)) {
- $found = true;
- break;
- }
- }
- }
-
- return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel);
- }
-
- function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage,
- $prefstate = 'stable', $installed = false, $channel = false)
- {
- $states = $this->betterStates($prefstate, true);
- if (!$states) {
- return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
- }
-
- $channel = $dependency['channel'];
- $package = $dependency['name'];
- $state = isset($dependency['state']) ? $dependency['state'] : null;
- $version = isset($dependency['version']) ? $dependency['version'] : null;
- $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml';
-
- $info = $this->_rest->retrieveData($restFile, false, false, $channel);
- if (PEAR::isError($info)) {
- return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package']
- . '" dependency "' . $channel . '/' . $package . '" has no releases');
- }
-
- if (!is_array($info) || !isset($info['r'])) {
- return false;
- }
-
- $exclude = array();
- $min = $max = $recommended = false;
- if ($xsdversion == '1.0') {
- switch ($dependency['rel']) {
- case 'ge' :
- $min = $dependency['version'];
- break;
- case 'gt' :
- $min = $dependency['version'];
- $exclude = array($dependency['version']);
- break;
- case 'eq' :
- $recommended = $dependency['version'];
- break;
- case 'lt' :
- $max = $dependency['version'];
- $exclude = array($dependency['version']);
- break;
- case 'le' :
- $max = $dependency['version'];
- break;
- case 'ne' :
- $exclude = array($dependency['version']);
- break;
- }
- } else {
- $min = isset($dependency['min']) ? $dependency['min'] : false;
- $max = isset($dependency['max']) ? $dependency['max'] : false;
- $recommended = isset($dependency['recommended']) ?
- $dependency['recommended'] : false;
- if (isset($dependency['exclude'])) {
- if (!isset($dependency['exclude'][0])) {
- $exclude = array($dependency['exclude']);
- }
- }
- }
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
- foreach ($info['r'] as $release) {
- if (!isset($this->_rest->_options['force']) && ($installed &&
- version_compare($release['v'], $installed, '<'))) {
- continue;
- }
- if (in_array($release['v'], $exclude)) { // skip excluded versions
- continue;
- }
- // allow newer releases to say "I'm OK with the dependent package"
- if ($xsdversion == '2.0' && isset($release['co'])) {
- if (!is_array($release['co']) || !isset($release['co'][0])) {
- $release['co'] = array($release['co']);
- }
- foreach ($release['co'] as $entry) {
- if (isset($entry['x']) && !is_array($entry['x'])) {
- $entry['x'] = array($entry['x']);
- } elseif (!isset($entry['x'])) {
- $entry['x'] = array();
- }
- if ($entry['c'] == $deppackage['channel'] &&
- strtolower($entry['p']) == strtolower($deppackage['package']) &&
- version_compare($deppackage['version'], $entry['min'], '>=') &&
- version_compare($deppackage['version'], $entry['max'], '<=') &&
- !in_array($release['v'], $entry['x'])) {
- $recommended = $release['v'];
- break;
- }
- }
- }
- if ($recommended) {
- if ($release['v'] != $recommended) { // if we want a specific
- // version, then skip all others
- continue;
- } else {
- if (!in_array($release['s'], $states)) {
- // the stability is too low, but we must return the
- // recommended version if possible
- return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel);
- }
- }
- }
- if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions
- continue;
- }
- if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions
- continue;
- }
- if ($installed && version_compare($release['v'], $installed, '<')) {
- continue;
- }
- if (in_array($release['s'], $states)) { // if in the preferred state...
- $found = true; // ... then use it
- break;
- }
- }
- return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel);
- }
-
- /**
- * Take raw data and return the array needed for processing a download URL
- *
- * @param string $base REST base uri
- * @param string $package Package name
- * @param array $release an array of format array('v' => version, 's' => state)
- * describing the release to download
- * @param array $info list of all releases as defined by allreleases.xml
- * @param bool|null $found determines whether the release was found or this is the next
- * best alternative. If null, then versions were skipped because
- * of PHP dependency
- * @return array|PEAR_Error
- * @access private
- */
- function _returnDownloadURL($base, $package, $release, $info, $found, $phpversion = false, $channel = false)
- {
- if (!$found) {
- $release = $info['r'][0];
- }
-
- $packageLower = strtolower($package);
- $pinfo = $this->_rest->retrieveCacheFirst($base . 'p/' . $packageLower . '/' .
- 'info.xml', false, false, $channel);
- if (PEAR::isError($pinfo)) {
- return PEAR::raiseError('Package "' . $package .
- '" does not have REST info xml available');
- }
-
- $releaseinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' .
- $release['v'] . '.xml', false, false, $channel);
- if (PEAR::isError($releaseinfo)) {
- return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] .
- '" does not have REST xml available');
- }
-
- $packagexml = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' .
- 'deps.' . $release['v'] . '.txt', false, true, $channel);
- if (PEAR::isError($packagexml)) {
- return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] .
- '" does not have REST dependency information available');
- }
-
- $packagexml = unserialize($packagexml);
- if (!$packagexml) {
- $packagexml = array();
- }
-
- $allinfo = $this->_rest->retrieveData($base . 'r/' . $packageLower .
- '/allreleases.xml', false, false, $channel);
- if (PEAR::isError($allinfo)) {
- return $allinfo;
- }
-
- if (!is_array($allinfo['r']) || !isset($allinfo['r'][0])) {
- $allinfo['r'] = array($allinfo['r']);
- }
-
- $compatible = false;
- foreach ($allinfo['r'] as $release) {
- if ($release['v'] != $releaseinfo['v']) {
- continue;
- }
-
- if (!isset($release['co'])) {
- break;
- }
-
- $compatible = array();
- if (!is_array($release['co']) || !isset($release['co'][0])) {
- $release['co'] = array($release['co']);
- }
-
- foreach ($release['co'] as $entry) {
- $comp = array();
- $comp['name'] = $entry['p'];
- $comp['channel'] = $entry['c'];
- $comp['min'] = $entry['min'];
- $comp['max'] = $entry['max'];
- if (isset($entry['x']) && !is_array($entry['x'])) {
- $comp['exclude'] = $entry['x'];
- }
-
- $compatible[] = $comp;
- }
-
- if (count($compatible) == 1) {
- $compatible = $compatible[0];
- }
-
- break;
- }
-
- $deprecated = false;
- if (isset($pinfo['dc']) && isset($pinfo['dp'])) {
- if (is_array($pinfo['dp'])) {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']['_content']));
- } else {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']));
- }
- }
-
- $return = array(
- 'version' => $releaseinfo['v'],
- 'info' => $packagexml,
- 'package' => $releaseinfo['p']['_content'],
- 'stability' => $releaseinfo['st'],
- 'compatible' => $compatible,
- 'deprecated' => $deprecated,
- );
-
- if ($found) {
- $return['url'] = $releaseinfo['g'];
- return $return;
- }
-
- $return['php'] = $phpversion;
- return $return;
- }
-
- function listPackages($base, $channel = false)
- {
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return array();
- }
-
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- return $packagelist['p'];
- }
-
- /**
- * List all categories of a REST server
- *
- * @param string $base base URL of the server
- * @return array of categorynames
- */
- function listCategories($base, $channel = false)
- {
- $categories = array();
-
- // c/categories.xml does not exist;
- // check for every package its category manually
- // This is SLOOOWWWW : ///
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- $ret = array();
- return $ret;
- }
-
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($packagelist['p'] as $package) {
- $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel);
- if (PEAR::isError($inf)) {
- PEAR::popErrorHandling();
- return $inf;
- }
- $cat = $inf['ca']['_content'];
- if (!isset($categories[$cat])) {
- $categories[$cat] = $inf['ca'];
- }
- }
-
- return array_values($categories);
- }
-
- /**
- * List a category of a REST server
- *
- * @param string $base base URL of the server
- * @param string $category name of the category
- * @param boolean $info also download full package info
- * @return array of packagenames
- */
- function listCategory($base, $category, $info = false, $channel = false)
- {
- // gives '404 Not Found' error when category doesn't exist
- $packagelist = $this->_rest->retrieveData($base.'c/'.urlencode($category).'/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return array();
- }
-
- if (!is_array($packagelist['p']) ||
- !isset($packagelist['p'][0])) { // only 1 pkg
- $packagelist = array($packagelist['p']);
- } else {
- $packagelist = $packagelist['p'];
- }
-
- if ($info == true) {
- // get individual package info
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($packagelist as $i => $packageitem) {
- $url = sprintf('%s'.'r/%s/latest.txt',
- $base,
- strtolower($packageitem['_content']));
- $version = $this->_rest->retrieveData($url, false, false, $channel);
- if (PEAR::isError($version)) {
- break; // skipit
- }
- $url = sprintf('%s'.'r/%s/%s.xml',
- $base,
- strtolower($packageitem['_content']),
- $version);
- $info = $this->_rest->retrieveData($url, false, false, $channel);
- if (PEAR::isError($info)) {
- break; // skipit
- }
- $packagelist[$i]['info'] = $info;
- }
- PEAR::popErrorHandling();
- }
-
- return $packagelist;
- }
-
-
- function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false)
- {
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
- if ($this->_rest->config->get('verbose') > 0) {
- $ui = &PEAR_Frontend::singleton();
- $ui->log('Retrieving data...0%', true);
- }
- $ret = array();
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return $ret;
- }
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- // only search-packagename = quicksearch !
- if ($searchpackage && (!$searchsummary || empty($searchpackage))) {
- $newpackagelist = array();
- foreach ($packagelist['p'] as $package) {
- if (!empty($searchpackage) && stristr($package, $searchpackage) !== false) {
- $newpackagelist[] = $package;
- }
- }
- $packagelist['p'] = $newpackagelist;
- }
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $next = .1;
- foreach ($packagelist['p'] as $progress => $package) {
- if ($this->_rest->config->get('verbose') > 0) {
- if ($progress / count($packagelist['p']) >= $next) {
- if ($next == .5) {
- $ui->log('50%', false);
- } else {
- $ui->log('.', false);
- }
- $next += .1;
- }
- }
-
- if ($basic) { // remote-list command
- if ($dostable) {
- $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/stable.txt', false, false, $channel);
- } else {
- $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/latest.txt', false, false, $channel);
- }
- if (PEAR::isError($latest)) {
- $latest = false;
- }
- $info = array('stable' => $latest);
- } else { // list-all command
- $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel);
- if (PEAR::isError($inf)) {
- PEAR::popErrorHandling();
- return $inf;
- }
- if ($searchpackage) {
- $found = (!empty($searchpackage) && stristr($package, $searchpackage) !== false);
- if (!$found && !(isset($searchsummary) && !empty($searchsummary)
- && (stristr($inf['s'], $searchsummary) !== false
- || stristr($inf['d'], $searchsummary) !== false)))
- {
- continue;
- };
- }
- $releases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/allreleases.xml', false, false, $channel);
- if (PEAR::isError($releases)) {
- continue;
- }
- if (!isset($releases['r'][0])) {
- $releases['r'] = array($releases['r']);
- }
- unset($latest);
- unset($unstable);
- unset($stable);
- unset($state);
- foreach ($releases['r'] as $release) {
- if (!isset($latest)) {
- if ($dostable && $release['s'] == 'stable') {
- $latest = $release['v'];
- $state = 'stable';
- }
- if (!$dostable) {
- $latest = $release['v'];
- $state = $release['s'];
- }
- }
- if (!isset($stable) && $release['s'] == 'stable') {
- $stable = $release['v'];
- if (!isset($unstable)) {
- $unstable = $stable;
- }
- }
- if (!isset($unstable) && $release['s'] != 'stable') {
- $latest = $unstable = $release['v'];
- $state = $release['s'];
- }
- if (isset($latest) && !isset($state)) {
- $state = $release['s'];
- }
- if (isset($latest) && isset($stable) && isset($unstable)) {
- break;
- }
- }
- $deps = array();
- if (!isset($unstable)) {
- $unstable = false;
- $state = 'stable';
- if (isset($stable)) {
- $latest = $unstable = $stable;
- }
- } else {
- $latest = $unstable;
- }
- if (!isset($latest)) {
- $latest = false;
- }
- if ($latest) {
- $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' .
- $latest . '.txt', false, false, $channel);
- if (!PEAR::isError($d)) {
- $d = unserialize($d);
- if ($d) {
- if (isset($d['required'])) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'PEAR/PackageFile/v2.php';
- }
- if (!isset($pf)) {
- $pf = new PEAR_PackageFile_v2;
- }
- $pf->setDeps($d);
- $tdeps = $pf->getDeps();
- } else {
- $tdeps = $d;
- }
- foreach ($tdeps as $dep) {
- if ($dep['type'] !== 'pkg') {
- continue;
- }
- $deps[] = $dep;
- }
- }
- }
- }
- if (!isset($stable)) {
- $stable = '-n/a-';
- }
- if (!$searchpackage) {
- $info = array('stable' => $latest, 'summary' => $inf['s'], 'description' =>
- $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'],
- 'unstable' => $unstable, 'state' => $state);
- } else {
- $info = array('stable' => $stable, 'summary' => $inf['s'], 'description' =>
- $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'],
- 'unstable' => $unstable, 'state' => $state);
- }
- }
- $ret[$package] = $info;
- }
- PEAR::popErrorHandling();
- return $ret;
- }
-
- function listLatestUpgrades($base, $pref_state, $installed, $channel, &$reg)
- {
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- $ret = array();
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return $ret;
- }
-
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- foreach ($packagelist['p'] as $package) {
- if (!isset($installed[strtolower($package)])) {
- continue;
- }
-
- $inst_version = $reg->packageInfo($package, 'version', $channel);
- $inst_state = $reg->packageInfo($package, 'release_state', $channel);
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/allreleases.xml', false, false, $channel);
- PEAR::popErrorHandling();
- if (PEAR::isError($info)) {
- continue; // no remote releases
- }
-
- if (!isset($info['r'])) {
- continue;
- }
-
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
-
- // $info['r'] is sorted by version number
- usort($info['r'], array($this, '_sortReleasesByVersionNumber'));
- foreach ($info['r'] as $release) {
- if ($inst_version && version_compare($release['v'], $inst_version, '<=')) {
- // not newer than the one installed
- break;
- }
-
- // new version > installed version
- if (!$pref_state) {
- // every state is a good state
- $found = true;
- break;
- } else {
- $new_state = $release['s'];
- // if new state >= installed state: go
- if (in_array($new_state, $this->betterStates($inst_state, true))) {
- $found = true;
- break;
- } else {
- // only allow to lower the state of package,
- // if new state >= preferred state: go
- if (in_array($new_state, $this->betterStates($pref_state, true))) {
- $found = true;
- break;
- }
- }
- }
- }
-
- if (!$found) {
- continue;
- }
-
- $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' .
- $release['v'] . '.xml', false, false, $channel);
- if (PEAR::isError($relinfo)) {
- return $relinfo;
- }
-
- $ret[$package] = array(
- 'version' => $release['v'],
- 'state' => $release['s'],
- 'filesize' => $relinfo['f'],
- );
- }
-
- return $ret;
- }
-
- function packageInfo($base, $package, $channel = false)
- {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pinfo = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel);
- if (PEAR::isError($pinfo)) {
- PEAR::popErrorHandling();
- return PEAR::raiseError('Unknown package: "' . $package . '" in channel "' . $channel . '"' . "\n". 'Debug: ' .
- $pinfo->getMessage());
- }
-
- $releases = array();
- $allreleases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/allreleases.xml', false, false, $channel);
- if (!PEAR::isError($allreleases)) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'PEAR/PackageFile/v2.php';
- }
-
- if (!is_array($allreleases['r']) || !isset($allreleases['r'][0])) {
- $allreleases['r'] = array($allreleases['r']);
- }
-
- $pf = new PEAR_PackageFile_v2;
- foreach ($allreleases['r'] as $release) {
- $ds = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' .
- $release['v'] . '.txt', false, false, $channel);
- if (PEAR::isError($ds)) {
- continue;
- }
-
- if (!isset($latest)) {
- $latest = $release['v'];
- }
-
- $pf->setDeps(unserialize($ds));
- $ds = $pf->getDeps();
- $info = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package)
- . '/' . $release['v'] . '.xml', false, false, $channel);
-
- if (PEAR::isError($info)) {
- continue;
- }
-
- $releases[$release['v']] = array(
- 'doneby' => $info['m'],
- 'license' => $info['l'],
- 'summary' => $info['s'],
- 'description' => $info['d'],
- 'releasedate' => $info['da'],
- 'releasenotes' => $info['n'],
- 'state' => $release['s'],
- 'deps' => $ds ? $ds : array(),
- );
- }
- } else {
- $latest = '';
- }
-
- PEAR::popErrorHandling();
- if (isset($pinfo['dc']) && isset($pinfo['dp'])) {
- if (is_array($pinfo['dp'])) {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']['_content']));
- } else {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']));
- }
- } else {
- $deprecated = false;
- }
-
- if (!isset($latest)) {
- $latest = '';
- }
-
- return array(
- 'name' => $pinfo['n'],
- 'channel' => $pinfo['c'],
- 'category' => $pinfo['ca']['_content'],
- 'stable' => $latest,
- 'license' => $pinfo['l'],
- 'summary' => $pinfo['s'],
- 'description' => $pinfo['d'],
- 'releases' => $releases,
- 'deprecated' => $deprecated,
- );
- }
-
- /**
- * Return an array containing all of the states that are more stable than
- * or equal to the passed in state
- *
- * @param string Release state
- * @param boolean Determines whether to include $state in the list
- * @return false|array False if $state is not a valid release state
- */
- function betterStates($state, $include = false)
- {
- static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- $i = array_search($state, $states);
- if ($i === false) {
- return false;
- }
-
- if ($include) {
- $i--;
- }
-
- return array_slice($states, $i + 1);
- }
-
- /**
- * Sort releases by version number
- *
- * @access private
- */
- function _sortReleasesByVersionNumber($a, $b)
- {
- if (version_compare($a['v'], $b['v'], '=')) {
- return 0;
- }
-
- if (version_compare($a['v'], $b['v'], '>')) {
- return -1;
- }
-
- if (version_compare($a['v'], $b['v'], '<')) {
- return 1;
- }
- }
-}
-
-/**
- * PEAR_REST_11 - implement faster list-all/remote-list command
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.3
- */
-
-/**
- * For downloading REST xml/txt files
- */
-require_once 'PEAR/REST.php';
-
-/**
- * Implement REST 1.1
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.3
- */
-class PEAR_REST_11
-{
- /**
- * @var PEAR_REST
- */
- var $_rest;
-
- function __construct($config, $options = array())
- {
- $this->_rest = new PEAR_REST($config, $options);
- }
-
- function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false)
- {
- $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel);
- if (PEAR::isError($categorylist)) {
- return $categorylist;
- }
-
- $ret = array();
- if (!is_array($categorylist['c']) || !isset($categorylist['c'][0])) {
- $categorylist['c'] = array($categorylist['c']);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
-
- foreach ($categorylist['c'] as $progress => $category) {
- $category = $category['_content'];
- $packagesinfo = $this->_rest->retrieveData($base .
- 'c/' . urlencode($category) . '/packagesinfo.xml', false, false, $channel);
-
- if (PEAR::isError($packagesinfo)) {
- continue;
- }
-
- if (!is_array($packagesinfo) || !isset($packagesinfo['pi'])) {
- continue;
- }
-
- if (!is_array($packagesinfo['pi']) || !isset($packagesinfo['pi'][0])) {
- $packagesinfo['pi'] = array($packagesinfo['pi']);
- }
-
- foreach ($packagesinfo['pi'] as $packageinfo) {
- if (empty($packageinfo)) {
- continue;
- }
-
- $info = $packageinfo['p'];
- $package = $info['n'];
- $releases = isset($packageinfo['a']) ? $packageinfo['a'] : false;
- unset($latest);
- unset($unstable);
- unset($stable);
- unset($state);
-
- if ($releases) {
- if (!isset($releases['r'][0])) {
- $releases['r'] = array($releases['r']);
- }
-
- foreach ($releases['r'] as $release) {
- if (!isset($latest)) {
- if ($dostable && $release['s'] == 'stable') {
- $latest = $release['v'];
- $state = 'stable';
- }
- if (!$dostable) {
- $latest = $release['v'];
- $state = $release['s'];
- }
- }
-
- if (!isset($stable) && $release['s'] == 'stable') {
- $stable = $release['v'];
- if (!isset($unstable)) {
- $unstable = $stable;
- }
- }
-
- if (!isset($unstable) && $release['s'] != 'stable') {
- $unstable = $release['v'];
- $state = $release['s'];
- }
-
- if (isset($latest) && !isset($state)) {
- $state = $release['s'];
- }
-
- if (isset($latest) && isset($stable) && isset($unstable)) {
- break;
- }
- }
- }
-
- if ($basic) { // remote-list command
- if (!isset($latest)) {
- $latest = false;
- }
-
- if ($dostable) {
- // $state is not set if there are no releases
- if (isset($state) && $state == 'stable') {
- $ret[$package] = array('stable' => $latest);
- } else {
- $ret[$package] = array('stable' => '-n/a-');
- }
- } else {
- $ret[$package] = array('stable' => $latest);
- }
-
- continue;
- }
-
- // list-all command
- if (!isset($unstable)) {
- $unstable = false;
- $state = 'stable';
- if (isset($stable)) {
- $latest = $unstable = $stable;
- }
- } else {
- $latest = $unstable;
- }
-
- if (!isset($latest)) {
- $latest = false;
- }
-
- $deps = array();
- if ($latest && isset($packageinfo['deps'])) {
- if (!is_array($packageinfo['deps']) ||
- !isset($packageinfo['deps'][0])
- ) {
- $packageinfo['deps'] = array($packageinfo['deps']);
- }
-
- $d = false;
- foreach ($packageinfo['deps'] as $dep) {
- if ($dep['v'] == $latest) {
- $d = unserialize($dep['d']);
- }
- }
-
- if ($d) {
- if (isset($d['required'])) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'PEAR/PackageFile/v2.php';
- }
-
- if (!isset($pf)) {
- $pf = new PEAR_PackageFile_v2;
- }
-
- $pf->setDeps($d);
- $tdeps = $pf->getDeps();
- } else {
- $tdeps = $d;
- }
-
- foreach ($tdeps as $dep) {
- if ($dep['type'] !== 'pkg') {
- continue;
- }
-
- $deps[] = $dep;
- }
- }
- }
-
- $info = array(
- 'stable' => $latest,
- 'summary' => $info['s'],
- 'description' => $info['d'],
- 'deps' => $deps,
- 'category' => $info['ca']['_content'],
- 'unstable' => $unstable,
- 'state' => $state
- );
- $ret[$package] = $info;
- }
- }
-
- PEAR::popErrorHandling();
- return $ret;
- }
-
- /**
- * List all categories of a REST server
- *
- * @param string $base base URL of the server
- * @return array of categorynames
- */
- function listCategories($base, $channel = false)
- {
- $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel);
- if (PEAR::isError($categorylist)) {
- return $categorylist;
- }
-
- if (!is_array($categorylist) || !isset($categorylist['c'])) {
- return array();
- }
-
- if (isset($categorylist['c']['_content'])) {
- // only 1 category
- $categorylist['c'] = array($categorylist['c']);
- }
-
- return $categorylist['c'];
- }
-
- /**
- * List packages in a category of a REST server
- *
- * @param string $base base URL of the server
- * @param string $category name of the category
- * @param boolean $info also download full package info
- * @return array of packagenames
- */
- function listCategory($base, $category, $info = false, $channel = false)
- {
- if ($info == false) {
- $url = '%s'.'c/%s/packages.xml';
- } else {
- $url = '%s'.'c/%s/packagesinfo.xml';
- }
- $url = sprintf($url,
- $base,
- urlencode($category));
-
- // gives '404 Not Found' error when category doesn't exist
- $packagelist = $this->_rest->retrieveData($url, false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
- if (!is_array($packagelist)) {
- return array();
- }
-
- if ($info == false) {
- if (!isset($packagelist['p'])) {
- return array();
- }
- if (!is_array($packagelist['p']) ||
- !isset($packagelist['p'][0])) { // only 1 pkg
- $packagelist = array($packagelist['p']);
- } else {
- $packagelist = $packagelist['p'];
- }
- return $packagelist;
- }
-
- // info == true
- if (!isset($packagelist['pi'])) {
- return array();
- }
-
- if (!is_array($packagelist['pi']) ||
- !isset($packagelist['pi'][0])) { // only 1 pkg
- $packagelist_pre = array($packagelist['pi']);
- } else {
- $packagelist_pre = $packagelist['pi'];
- }
-
- $packagelist = array();
- foreach ($packagelist_pre as $i => $item) {
- // compatibility with r/<latest.txt>.xml
- if (isset($item['a']['r'][0])) {
- // multiple releases
- $item['p']['v'] = $item['a']['r'][0]['v'];
- $item['p']['st'] = $item['a']['r'][0]['s'];
- } elseif (isset($item['a'])) {
- // first and only release
- $item['p']['v'] = $item['a']['r']['v'];
- $item['p']['st'] = $item['a']['r']['s'];
- }
-
- $packagelist[$i] = array('attribs' => $item['p']['r'],
- '_content' => $item['p']['n'],
- 'info' => $item['p']);
- }
-
- return $packagelist;
- }
-
- /**
- * Return an array containing all of the states that are more stable than
- * or equal to the passed in state
- *
- * @param string Release state
- * @param boolean Determines whether to include $state in the list
- * @return false|array False if $state is not a valid release state
- */
- function betterStates($state, $include = false)
- {
- static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- $i = array_search($state, $states);
- if ($i === false) {
- return false;
- }
- if ($include) {
- $i--;
- }
- return array_slice($states, $i + 1);
- }
-}
-?>
-
-/**
- * PEAR_REST_13
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a12
- */
-
-/**
- * For downloading REST xml/txt files
- */
-require_once 'PEAR/REST.php';
-require_once 'PEAR/REST/10.php';
-
-/**
- * Implement REST 1.3
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a12
- */
-class PEAR_REST_13 extends PEAR_REST_10
-{
- /**
- * Retrieve information about a remote package to be downloaded from a REST server
- *
- * This is smart enough to resolve the minimum PHP version dependency prior to download
- * @param string $base The uri to prepend to all REST calls
- * @param array $packageinfo an array of format:
- * <pre>
- * array(
- * 'package' => 'packagename',
- * 'channel' => 'channelname',
- * ['state' => 'alpha' (or valid state),]
- * -or-
- * ['version' => '1.whatever']
- * </pre>
- * @param string $prefstate Current preferred_state config variable value
- * @param bool $installed the installed version of this package to compare against
- * @return array|false|PEAR_Error see {@link _returnDownloadURL()}
- */
- function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false)
- {
- $states = $this->betterStates($prefstate, true);
- if (!$states) {
- return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
- }
-
- $channel = $packageinfo['channel'];
- $package = $packageinfo['package'];
- $state = isset($packageinfo['state']) ? $packageinfo['state'] : null;
- $version = isset($packageinfo['version']) ? $packageinfo['version'] : null;
- $restFile = $base . 'r/' . strtolower($package) . '/allreleases2.xml';
-
- $info = $this->_rest->retrieveData($restFile, false, false, $channel);
- if (PEAR::isError($info)) {
- return PEAR::raiseError('No releases available for package "' .
- $channel . '/' . $package . '"');
- }
-
- if (!isset($info['r'])) {
- return false;
- }
-
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
-
- $skippedphp = false;
- foreach ($info['r'] as $release) {
- if (!isset($this->_rest->_options['force']) && ($installed &&
- version_compare($release['v'], $installed, '<'))) {
- continue;
- }
-
- if (isset($state)) {
- // try our preferred state first
- if ($release['s'] == $state) {
- if (!isset($version) && version_compare($release['m'], phpversion(), '>')) {
- // skip releases that require a PHP version newer than our PHP version
- $skippedphp = $release;
- continue;
- }
- $found = true;
- break;
- }
-
- // see if there is something newer and more stable
- // bug #7221
- if (in_array($release['s'], $this->betterStates($state), true)) {
- if (!isset($version) && version_compare($release['m'], phpversion(), '>')) {
- // skip releases that require a PHP version newer than our PHP version
- $skippedphp = $release;
- continue;
- }
- $found = true;
- break;
- }
- } elseif (isset($version)) {
- if ($release['v'] == $version) {
- if (!isset($this->_rest->_options['force']) &&
- !isset($version) &&
- version_compare($release['m'], phpversion(), '>')) {
- // skip releases that require a PHP version newer than our PHP version
- $skippedphp = $release;
- continue;
- }
- $found = true;
- break;
- }
- } else {
- if (in_array($release['s'], $states)) {
- if (version_compare($release['m'], phpversion(), '>')) {
- // skip releases that require a PHP version newer than our PHP version
- $skippedphp = $release;
- continue;
- }
- $found = true;
- break;
- }
- }
- }
-
- if (!$found && $skippedphp) {
- $found = null;
- }
-
- return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel);
- }
-
- function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage,
- $prefstate = 'stable', $installed = false, $channel = false)
- {
- $states = $this->betterStates($prefstate, true);
- if (!$states) {
- return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
- }
-
- $channel = $dependency['channel'];
- $package = $dependency['name'];
- $state = isset($dependency['state']) ? $dependency['state'] : null;
- $version = isset($dependency['version']) ? $dependency['version'] : null;
- $restFile = $base . 'r/' . strtolower($package) .'/allreleases2.xml';
-
- $info = $this->_rest->retrieveData($restFile, false, false, $channel);
- if (PEAR::isError($info)) {
- return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package']
- . '" dependency "' . $channel . '/' . $package . '" has no releases');
- }
-
- if (!is_array($info) || !isset($info['r'])) {
- return false;
- }
-
- $exclude = array();
- $min = $max = $recommended = false;
- if ($xsdversion == '1.0') {
- $pinfo['package'] = $dependency['name'];
- $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this
- switch ($dependency['rel']) {
- case 'ge' :
- $min = $dependency['version'];
- break;
- case 'gt' :
- $min = $dependency['version'];
- $exclude = array($dependency['version']);
- break;
- case 'eq' :
- $recommended = $dependency['version'];
- break;
- case 'lt' :
- $max = $dependency['version'];
- $exclude = array($dependency['version']);
- break;
- case 'le' :
- $max = $dependency['version'];
- break;
- case 'ne' :
- $exclude = array($dependency['version']);
- break;
- }
- } else {
- $pinfo['package'] = $dependency['name'];
- $min = isset($dependency['min']) ? $dependency['min'] : false;
- $max = isset($dependency['max']) ? $dependency['max'] : false;
- $recommended = isset($dependency['recommended']) ?
- $dependency['recommended'] : false;
- if (isset($dependency['exclude'])) {
- if (!isset($dependency['exclude'][0])) {
- $exclude = array($dependency['exclude']);
- }
- }
- }
-
- $skippedphp = $found = $release = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
-
- foreach ($info['r'] as $release) {
- if (!isset($this->_rest->_options['force']) && ($installed &&
- version_compare($release['v'], $installed, '<'))) {
- continue;
- }
-
- if (in_array($release['v'], $exclude)) { // skip excluded versions
- continue;
- }
-
- // allow newer releases to say "I'm OK with the dependent package"
- if ($xsdversion == '2.0' && isset($release['co'])) {
- if (!is_array($release['co']) || !isset($release['co'][0])) {
- $release['co'] = array($release['co']);
- }
-
- foreach ($release['co'] as $entry) {
- if (isset($entry['x']) && !is_array($entry['x'])) {
- $entry['x'] = array($entry['x']);
- } elseif (!isset($entry['x'])) {
- $entry['x'] = array();
- }
-
- if ($entry['c'] == $deppackage['channel'] &&
- strtolower($entry['p']) == strtolower($deppackage['package']) &&
- version_compare($deppackage['version'], $entry['min'], '>=') &&
- version_compare($deppackage['version'], $entry['max'], '<=') &&
- !in_array($release['v'], $entry['x'])) {
- if (version_compare($release['m'], phpversion(), '>')) {
- // skip dependency releases that require a PHP version
- // newer than our PHP version
- $skippedphp = $release;
- continue;
- }
-
- $recommended = $release['v'];
- break;
- }
- }
- }
-
- if ($recommended) {
- if ($release['v'] != $recommended) { // if we want a specific
- // version, then skip all others
- continue;
- }
-
- if (!in_array($release['s'], $states)) {
- // the stability is too low, but we must return the
- // recommended version if possible
- return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel);
- }
- }
-
- if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions
- continue;
- }
-
- if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions
- continue;
- }
-
- if ($installed && version_compare($release['v'], $installed, '<')) {
- continue;
- }
-
- if (in_array($release['s'], $states)) { // if in the preferred state...
- if (version_compare($release['m'], phpversion(), '>')) {
- // skip dependency releases that require a PHP version
- // newer than our PHP version
- $skippedphp = $release;
- continue;
- }
-
- $found = true; // ... then use it
- break;
- }
- }
-
- if (!$found && $skippedphp) {
- $found = null;
- }
-
- return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel);
- }
-}
-/**
- * <tasks:postinstallscript> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Postinstallscript.php';
-/**
- * Abstracts the postinstallscript file task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
-{
- /**
- * parent package file object
- *
- * @var PEAR_PackageFile_v2_rw
- */
- public $_pkg;
- /**
- * Enter description here...
- *
- * @param PEAR_PackageFile_v2_rw $pkg Package
- * @param PEAR_Config $config Config
- * @param PEAR_Frontend $logger Logger
- * @param array $fileXml XML
- *
- * @return PEAR_Task_Postinstallscript_rw
- */
- function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
- }
-
- public function getName()
- {
- return 'postinstallscript';
- }
-
- /**
- * add a simple <paramgroup> to the post-install script
- *
- * Order is significant, so call this method in the same
- * sequence the users should see the paramgroups. The $params
- * parameter should either be the result of a call to {@link getParam()}
- * or an array of calls to getParam().
- *
- * Use {@link addConditionTypeGroup()} to add a <paramgroup> containing
- * a <conditiontype> tag
- *
- * @param string $id <paramgroup> id as seen by the script
- * @param array|false $params array of getParam() calls, or false for no params
- * @param string|false $instructions
- */
- public function addParamGroup($id, $params = false, $instructions = false)
- {
- if ($params && isset($params[0]) && !isset($params[1])) {
- $params = $params[0];
- }
- $stuff =
- array(
- $this->_pkg->getTasksNs().':id' => $id,
- );
- if ($instructions) {
- $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
- }
- if ($params) {
- $stuff[$this->_pkg->getTasksNs().':param'] = $params;
- }
- $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
- }
-
- /**
- * Add a complex <paramgroup> to the post-install script with conditions
- *
- * This inserts a <paramgroup> with
- *
- * Order is significant, so call this method in the same
- * sequence the users should see the paramgroups. The $params
- * parameter should either be the result of a call to {@link getParam()}
- * or an array of calls to getParam().
- *
- * Use {@link addParamGroup()} to add a simple <paramgroup>
- *
- * @param string $id <paramgroup> id as seen by the script
- * @param string $oldgroup <paramgroup> id of the section referenced by
- * <conditiontype>
- * @param string $param name of the <param> from the older section referenced
- * by <contitiontype>
- * @param string $value value to match of the parameter
- * @param string $conditiontype one of '=', '!=', 'preg_match'
- * @param array|false $params array of getParam() calls, or false for no params
- * @param string|false $instructions
- */
- public function addConditionTypeGroup($id,
- $oldgroup,
- $param,
- $value,
- $conditiontype = '=',
- $params = false,
- $instructions = false
- ) {
- if ($params && isset($params[0]) && !isset($params[1])) {
- $params = $params[0];
- }
- $stuff = array(
- $this->_pkg->getTasksNs().':id' => $id,
- );
- if ($instructions) {
- $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
- }
- $stuff[$this->_pkg->getTasksNs().':name'] = $oldgroup.'::'.$param;
- $stuff[$this->_pkg->getTasksNs().':conditiontype'] = $conditiontype;
- $stuff[$this->_pkg->getTasksNs().':value'] = $value;
- if ($params) {
- $stuff[$this->_pkg->getTasksNs().':param'] = $params;
- }
- $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
- }
-
- public function getXml()
- {
- return $this->_params;
- }
-
- /**
- * Use to set up a param tag for use in creating a paramgroup
- *
- * @param mixed $name Name of parameter
- * @param mixed $prompt Prompt
- * @param string $type Type, defaults to 'string'
- * @param mixed $default Default value
- *
- * @static
- * @return array
- */
- public function getParam($name, $prompt, $type = 'string', $default = null)
- {
- if ($default !== null) {
- return
- array(
- $this->_pkg->getTasksNs().':name' => $name,
- $this->_pkg->getTasksNs().':prompt' => $prompt,
- $this->_pkg->getTasksNs().':type' => $type,
- $this->_pkg->getTasksNs().':default' => $default,
- );
- }
-
- return
- array(
- $this->_pkg->getTasksNs().':name' => $name,
- $this->_pkg->getTasksNs().':prompt' => $prompt,
- $this->_pkg->getTasksNs().':type' => $type,
- );
- }
-}
-
-/**
- * <tasks:replace> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Replace.php';
-/**
- * Abstracts the replace task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Replace_rw extends PEAR_Task_Replace
-{
- public function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
- }
-
- public function setInfo($from, $to, $type)
- {
- $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
- }
-
- public function getName()
- {
- return 'replace';
- }
-
- public function getXml()
- {
- return $this->_params;
- }
-}
-
-/**
- * <tasks:unixeol> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Unixeol.php';
-/**
- * Abstracts the unixeol task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
-{
- function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return true;
- }
-
- public function getName()
- {
- return 'unixeol';
- }
-
- public function getXml()
- {
- return '';
- }
-}
-?>
-
-/**
- * <tasks:windowseol> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Windowseol.php';
-/**
- * Abstracts the windowseol task xml.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
-{
- function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return true;
- }
-
- public function getName()
- {
- return 'windowseol';
- }
-
- public function getXml()
- {
- return '';
- }
-}
-?>
-
-/**
- * PEAR_Task_Common, base class for installer tasks
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**#@+
- * Error codes for task validation routines
- */
-define('PEAR_TASK_ERROR_NOATTRIBS', 1);
-define('PEAR_TASK_ERROR_MISSING_ATTRIB', 2);
-define('PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE', 3);
-define('PEAR_TASK_ERROR_INVALID', 4);
-/**#@-*/
-define('PEAR_TASK_PACKAGE', 1);
-define('PEAR_TASK_INSTALL', 2);
-define('PEAR_TASK_PACKAGEANDINSTALL', 3);
-/**
- * A task is an operation that manipulates the contents of a file.
- *
- * Simple tasks operate on 1 file. Multiple tasks are executed after all files have been
- * processed and installed, and are designed to operate on all files containing the task.
- * The Post-install script task simply takes advantage of the fact that it will be run
- * after installation, replace is a simple task.
- *
- * Combining tasks is possible, but ordering is significant.
- *
- * <file name="test.php" role="php">
- * <tasks:replace from="@data-dir@" to="data_dir" type="pear-config"/>
- * <tasks:postinstallscript/>
- * </file>
- *
- * This will first replace any instance of @data-dir@ in the test.php file
- * with the path to the current data directory. Then, it will include the
- * test.php file and run the script it contains to configure the package post-installation.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- * @abstract
- */
-class PEAR_Task_Common
-{
- /**
- * Valid types for this version are 'simple' and 'multiple'
- *
- * - simple tasks operate on the contents of a file and write out changes to disk
- * - multiple tasks operate on the contents of many files and write out the
- * changes directly to disk
- *
- * Child task classes must override this property.
- *
- * @access protected
- */
- protected $type = 'simple';
- /**
- * Determines which install phase this task is executed under
- */
- public $phase = PEAR_TASK_INSTALL;
- /**
- * @access protected
- */
- protected $config;
- /**
- * @access protected
- */
- protected $registry;
- /**
- * @access protected
- */
- public $logger;
- /**
- * @access protected
- */
- protected $installphase;
- /**
- * @param PEAR_Config
- * @param PEAR_Common
- */
- function __construct(&$config, &$logger, $phase)
- {
- $this->config = &$config;
- $this->registry = &$config->getRegistry();
- $this->logger = &$logger;
- $this->installphase = $phase;
- if ($this->type == 'multiple') {
- $GLOBALS['_PEAR_TASK_POSTINSTANCES'][get_class($this)][] = &$this;
- }
- }
-
- /**
- * Validate the basic contents of a task tag.
- *
- * @param PEAR_PackageFile_v2
- * @param array
- * @param PEAR_Config
- * @param array the entire parsed <file> tag
- *
- * @return true|array On error, return an array in format:
- * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...])
- *
- * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in
- * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and
- * an array of legal values in
- *
- * @static
- * @abstract
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- }
-
- /**
- * Initialize a task instance with the parameters
- *
- * @param array raw, parsed xml
- * @param array attributes from the <file> tag containing this task
- * @param string|null last installed version of this package
- * @abstract
- */
- public function init($xml, $fileAttributes, $lastVersion)
- {
- }
-
- /**
- * Begin a task processing session. All multiple tasks will be processed
- * after each file has been successfully installed, all simple tasks should
- * perform their task here and return any errors using the custom
- * throwError() method to allow forward compatibility
- *
- * This method MUST NOT write out any changes to disk
- *
- * @param PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- * @abstract
- */
- public function startSession($pkg, $contents, $dest)
- {
- }
-
- /**
- * This method is used to process each of the tasks for a particular
- * multiple class type. Simple tasks need not implement this method.
- *
- * @param array an array of tasks
- * @access protected
- * @static
- * @abstract
- */
- public function run($tasks)
- {
- }
-
- /**
- * @static
- * @final
- */
- public function hasPostinstallTasks()
- {
- return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
- }
-
- /**
- * @static
- * @final
- */
- public function runPostinstallTasks()
- {
- foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) {
- $err = call_user_func(
- array($class, 'run'),
- $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]
- );
- if ($err) {
- return PEAR_Task_Common::throwError($err);
- }
- }
- unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
- }
-
- /**
- * Determines whether a role is a script
- * @return bool
- */
- public function isScript()
- {
- return $this->type == 'script';
- }
-
- public function throwError($msg, $code = -1)
- {
- include_once 'PEAR.php';
-
- return PEAR::raiseError($msg, $code);
- }
-}
-
-/**
- * <tasks:postinstallscript>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Common.php';
-/**
- * Implements the postinstallscript file task.
- *
- * Note that post-install scripts are handled separately from installation, by the
- * "pear run-scripts" command
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Postinstallscript extends PEAR_Task_Common
-{
- public $type = 'script';
- public $_class;
- public $_params;
- public $_obj;
- /**
- *
- * @var PEAR_PackageFile_v2
- */
- public $_pkg;
- public $_contents;
- public $phase = PEAR_TASK_INSTALL;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * This also attempts to validate the script to make sure it meets the criteria
- * for a post-install script
- *
- * @param PEAR_PackageFile_v2
- * @param array The XML contents of the <postinstallscript> tag
- * @param PEAR_Config
- * @param array the entire parsed <file> tag
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if ($fileXml['role'] != 'php') {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must be role="php"', );
- }
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $file = $pkg->getFileContents($fileXml['name']);
- if (PEAR::isError($file)) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" is not valid: '.
- $file->getMessage(), );
- } elseif ($file === null) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" could not be retrieved for processing!', );
- } else {
- $analysis = $pkg->analyzeSourceCode($file, true);
- if (!$analysis) {
- PEAR::popErrorHandling();
- $warnings = '';
- foreach ($pkg->getValidationWarnings() as $warn) {
- $warnings .= $warn['message']."\n";
- }
-
- return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "'.
- $fileXml['name'].'" failed: '.$warnings, );
- }
- if (count($analysis['declared_classes']) != 1) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must declare exactly 1 class', );
- }
- $class = $analysis['declared_classes'][0];
- if ($class != str_replace(
- array('/', '.php'), array('_', ''),
- $fileXml['name']
- ).'_postinstall') {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" class "'.$class.'" must be named "'.
- str_replace(
- array('/', '.php'), array('_', ''),
- $fileXml['name']
- ).'_postinstall"', );
- }
- if (!isset($analysis['declared_methods'][$class])) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must declare methods init() and run()', );
- }
- $methods = array('init' => 0, 'run' => 1);
- foreach ($analysis['declared_methods'][$class] as $method) {
- if (isset($methods[$method])) {
- unset($methods[$method]);
- }
- }
- if (count($methods)) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must declare methods init() and run()', );
- }
- }
- PEAR::popErrorHandling();
- $definedparams = array();
- $tasksNamespace = $pkg->getTasksNs().':';
- if (!isset($xml[$tasksNamespace.'paramgroup']) && isset($xml['paramgroup'])) {
- // in order to support the older betas, which did not expect internal tags
- // to also use the namespace
- $tasksNamespace = '';
- }
- if (isset($xml[$tasksNamespace.'paramgroup'])) {
- $params = $xml[$tasksNamespace.'paramgroup'];
- if (!is_array($params) || !isset($params[0])) {
- $params = array($params);
- }
- foreach ($params as $param) {
- if (!isset($param[$tasksNamespace.'id'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" <paramgroup> must have '.
- 'an '.$tasksNamespace.'id> tag', );
- }
- if (isset($param[$tasksNamespace.'name'])) {
- if (!in_array($param[$tasksNamespace.'name'], $definedparams)) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" parameter "'.$param[$tasksNamespace.'name'].
- '" has not been previously defined', );
- }
- if (!isset($param[$tasksNamespace.'conditiontype'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.
- 'conditiontype> tag containing either "=", '.
- '"!=", or "preg_match"', );
- }
- if (!in_array(
- $param[$tasksNamespace.'conditiontype'],
- array('=', '!=', 'preg_match')
- )) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.
- 'conditiontype> tag containing either "=", '.
- '"!=", or "preg_match"', );
- }
- if (!isset($param[$tasksNamespace.'value'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.
- 'value> tag containing expected parameter value', );
- }
- }
- if (isset($param[$tasksNamespace.'instructions'])) {
- if (!is_string($param[$tasksNamespace.'instructions'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" '.$tasksNamespace.'instructions> must be simple text', );
- }
- }
- if (!isset($param[$tasksNamespace.'param'])) {
- continue; // <param> is no longer required
- }
- $subparams = $param[$tasksNamespace.'param'];
- if (!is_array($subparams) || !isset($subparams[0])) {
- $subparams = array($subparams);
- }
- foreach ($subparams as $subparam) {
- if (!isset($subparam[$tasksNamespace.'name'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter for '.
- $tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].'" must have '.
- 'a '.$tasksNamespace.'name> tag', );
- }
- if (!preg_match(
- '/[a-zA-Z0-9]+/',
- $subparam[$tasksNamespace.'name']
- )) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter "'.
- $subparam[$tasksNamespace.'name'].
- '" for '.$tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].
- '" is not a valid name. Must contain only alphanumeric characters', );
- }
- if (!isset($subparam[$tasksNamespace.'prompt'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter "'.
- $subparam[$tasksNamespace.'name'].
- '" for '.$tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.'prompt> tag', );
- }
- if (!isset($subparam[$tasksNamespace.'type'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter "'.
- $subparam[$tasksNamespace.'name'].
- '" for '.$tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.'type> tag', );
- }
- $definedparams[] = $param[$tasksNamespace.'id'].'::'.
- $subparam[$tasksNamespace.'name'];
- }
- }
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array $xml raw, parsed xml
- * @param array $fileattribs attributes from the <file> tag containing
- * this task
- * @param string|null $lastversion last installed version of this package,
- * if any (useful for upgrades)
- */
- public function init($xml, $fileattribs, $lastversion)
- {
- $this->_class = str_replace('/', '_', $fileattribs['name']);
- $this->_filename = $fileattribs['name'];
- $this->_class = str_replace('.php', '', $this->_class).'_postinstall';
- $this->_params = $xml;
- $this->_lastversion = $lastversion;
- }
-
- /**
- * Strip the tasks: namespace from internal params
- *
- * @access private
- */
- public function _stripNamespace($params = null)
- {
- if ($params === null) {
- $params = array();
- if (!is_array($this->_params)) {
- return;
- }
- foreach ($this->_params as $i => $param) {
- if (is_array($param)) {
- $param = $this->_stripNamespace($param);
- }
- $params[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
- }
- $this->_params = $params;
- } else {
- $newparams = array();
- foreach ($params as $i => $param) {
- if (is_array($param)) {
- $param = $this->_stripNamespace($param);
- }
- $newparams[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
- }
-
- return $newparams;
- }
- }
-
- /**
- * Unlike other tasks, the installed file name is passed in instead of the
- * file contents, because this task is handled post-installation
- *
- * @param mixed $pkg PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string $contents file name
- *
- * @return bool|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError)
- */
- public function startSession($pkg, $contents)
- {
- if ($this->installphase != PEAR_TASK_INSTALL) {
- return false;
- }
- // remove the tasks: namespace if present
- $this->_pkg = $pkg;
- $this->_stripNamespace();
- $this->logger->log(
- 0, 'Including external post-installation script "'.
- $contents.'" - any errors are in this script'
- );
- include_once $contents;
- if (class_exists($this->_class)) {
- $this->logger->log(0, 'Inclusion succeeded');
- } else {
- return $this->throwError(
- 'init of post-install script class "'.$this->_class
- .'" failed'
- );
- }
- $this->_obj = new $this->_class();
- $this->logger->log(1, 'running post-install script "'.$this->_class.'->init()"');
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $res = $this->_obj->init($this->config, $pkg, $this->_lastversion);
- PEAR::popErrorHandling();
- if ($res) {
- $this->logger->log(0, 'init succeeded');
- } else {
- return $this->throwError(
- 'init of post-install script "'.$this->_class.
- '->init()" failed'
- );
- }
- $this->_contents = $contents;
-
- return true;
- }
-
- /**
- * No longer used
- *
- * @see PEAR_PackageFile_v2::runPostinstallScripts()
- * @param array an array of tasks
- * @param string install or upgrade
- * @access protected
- * @static
- */
- public function run()
- {
- }
-}
-
-/**
- * <tasks:replace>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Common.php';
-/**
- * Implements the replace file task.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Replace extends PEAR_Task_Common
-{
- public $type = 'simple';
- public $phase = PEAR_TASK_PACKAGEANDINSTALL;
- public $_replacements;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if (!isset($xml['attribs'])) {
- return array(PEAR_TASK_ERROR_NOATTRIBS);
- }
- if (!isset($xml['attribs']['type'])) {
- return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'type');
- }
- if (!isset($xml['attribs']['to'])) {
- return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'to');
- }
- if (!isset($xml['attribs']['from'])) {
- return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'from');
- }
- if ($xml['attribs']['type'] == 'pear-config') {
- if (!in_array($xml['attribs']['to'], $config->getKeys())) {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- $config->getKeys(), );
- }
- } elseif ($xml['attribs']['type'] == 'php-const') {
- if (defined($xml['attribs']['to'])) {
- return true;
- } else {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- array('valid PHP constant'), );
- }
- } elseif ($xml['attribs']['type'] == 'package-info') {
- if (in_array(
- $xml['attribs']['to'],
- array('name', 'summary', 'channel', 'notes', 'extends', 'description',
- 'release_notes', 'license', 'release-license', 'license-uri',
- 'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time', )
- )) {
- return true;
- } else {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- array('name', 'summary', 'channel', 'notes', 'extends', 'description',
- 'release_notes', 'license', 'release-license', 'license-uri',
- 'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time', ), );
- }
- } else {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'],
- array('pear-config', 'package-info', 'php-const'), );
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param unused
- */
- public function init($xml, $attribs)
- {
- $this->_replacements = isset($xml['attribs']) ? array($xml) : $xml;
- }
-
- /**
- * Do a package.xml 1.0 replacement, with additional package-info fields available
- *
- * See validateXml() source for the complete list of allowed fields
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- */
- public function startSession($pkg, $contents, $dest)
- {
- $subst_from = $subst_to = array();
- foreach ($this->_replacements as $a) {
- $a = $a['attribs'];
- $to = '';
- if ($a['type'] == 'pear-config') {
- if ($this->installphase == PEAR_TASK_PACKAGE) {
- return false;
- }
- if ($a['to'] == 'master_server') {
- $chan = $this->registry->getChannel($pkg->getChannel());
- if (!PEAR::isError($chan)) {
- $to = $chan->getServer();
- } else {
- $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
-
- return false;
- }
- } else {
- if ($this->config->isDefinedLayer('ftp')) {
- // try the remote config file first
- $to = $this->config->get($a['to'], 'ftp', $pkg->getChannel());
- if (is_null($to)) {
- // then default to local
- $to = $this->config->get($a['to'], null, $pkg->getChannel());
- }
- } else {
- $to = $this->config->get($a['to'], null, $pkg->getChannel());
- }
- }
- if (is_null($to)) {
- $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
-
- return false;
- }
- } elseif ($a['type'] == 'php-const') {
- if ($this->installphase == PEAR_TASK_PACKAGE) {
- return false;
- }
- if (defined($a['to'])) {
- $to = constant($a['to']);
- } else {
- $this->logger->log(0, "$dest: invalid php-const replacement: $a[to]");
-
- return false;
- }
- } else {
- if ($t = $pkg->packageInfo($a['to'])) {
- $to = $t;
- } else {
- $this->logger->log(0, "$dest: invalid package-info replacement: $a[to]");
-
- return false;
- }
- }
- if (!is_null($to)) {
- $subst_from[] = $a['from'];
- $subst_to[] = $to;
- }
- }
- $this->logger->log(
- 3, "doing ".sizeof($subst_from).
- " substitution(s) for $dest"
- );
- if (sizeof($subst_from)) {
- $contents = str_replace($subst_from, $subst_to, $contents);
- }
-
- return $contents;
- }
-}
-
-/**
- * <tasks:unixeol>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Common.php';
-/**
- * Implements the unix line endings file task.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Unixeol extends PEAR_Task_Common
-{
- public $type = 'simple';
- public $phase = PEAR_TASK_PACKAGE;
- public $_replacements;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if ($xml != '') {
- return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param unused
- */
- public function init($xml, $attribs)
- {
- }
-
- /**
- * Replace all line endings with line endings customized for the current OS
- *
- * See validateXml() source for the complete list of allowed fields
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- */
- public function startSession($pkg, $contents, $dest)
- {
- $this->logger->log(3, "replacing all line endings with \\n in $dest");
-
- return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents);
- }
-}
-
-/**
- * <tasks:windowseol>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'PEAR/Task/Common.php';
-/**
- * Implements the windows line endsings file task.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Windowseol extends PEAR_Task_Common
-{
- public $type = 'simple';
- public $phase = PEAR_TASK_PACKAGE;
- public $_replacements;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if ($xml != '') {
- return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param unused
- */
- public function init($xml, $attribs)
- {
- }
-
- /**
- * Replace all line endings with windows line endings
- *
- * See validateXml() source for the complete list of allowed fields
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- */
- public function startSession($pkg, $contents, $dest)
- {
- $this->logger->log(3, "replacing all line endings with \\r\\n in $dest");
-
- return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents);
- }
-}
-
-/**
- * Channel Validator for the pecl.php.net channel
- *
- * PHP 4 and PHP 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a5
- */
-/**
- * This is the parent class for all validators
- */
-require_once 'PEAR/Validate.php';
-/**
- * Channel Validator for the pecl.php.net channel
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a5
- */
-class PEAR_Validator_PECL extends PEAR_Validate
-{
- function validateVersion()
- {
- if ($this->_state == PEAR_VALIDATE_PACKAGING) {
- $version = $this->_packagexml->getVersion();
- $versioncomponents = explode('.', $version);
- $last = array_pop($versioncomponents);
- if (substr($last, 1, 2) == 'rc') {
- $this->_addFailure('version', 'Release Candidate versions must have ' .
- 'upper-case RC, not lower-case rc');
- return false;
- }
- }
- return true;
- }
-
- function validatePackageName()
- {
- $ret = parent::validatePackageName();
- if ($this->_packagexml->getPackageType() == 'extsrc' ||
- $this->_packagexml->getPackageType() == 'zendextsrc') {
- if (strtolower($this->_packagexml->getPackage()) !=
- strtolower($this->_packagexml->getProvidesExtension())) {
- $this->_addWarning('providesextension', 'package name "' .
- $this->_packagexml->getPackage() . '" is different from extension name "' .
- $this->_packagexml->getProvidesExtension() . '"');
- }
- }
- return $ret;
- }
-}
-?>
-/**
- * Class auto-loader
- *
- * PHP versions 4
-
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
- * @since File available since Release 0.1
- * @deprecated File deprecated in Release 1.4.0a1
- */
-
-// /* vim: set expandtab tabstop=4 shiftwidth=4: */
-
-if (!extension_loaded("overload")) {
- // die hard without ext/overload
- die("Rebuild PHP with the `overload' extension to use PEAR_Autoloader");
-}
-
-/**
- * Include for PEAR_Error and PEAR classes
- */
-require_once "PEAR.php";
-
-/**
- * This class is for objects where you want to separate the code for
- * some methods into separate classes. This is useful if you have a
- * class with not-frequently-used methods that contain lots of code
- * that you would like to avoid always parsing.
- *
- * The PEAR_Autoloader class provides autoloading and aggregation.
- * The autoloading lets you set up in which classes the separated
- * methods are found. Aggregation is the technique used to import new
- * methods, an instance of each class providing separated methods is
- * stored and called every time the aggregated method is called.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader
- * @since File available since Release 0.1
- * @deprecated File deprecated in Release 1.4.0a1
- */
-class PEAR_Autoloader extends PEAR
-{
- // {{{ properties
-
- /**
- * Map of methods and classes where they are defined
- *
- * @var array
- *
- * @access private
- */
- var $_autoload_map = array();
-
- /**
- * Map of methods and aggregate objects
- *
- * @var array
- *
- * @access private
- */
- var $_method_map = array();
-
- // }}}
- // {{{ addAutoload()
-
- /**
- * Add one or more autoload entries.
- *
- * @param string $method which method to autoload
- *
- * @param string $classname (optional) which class to find the method in.
- * If the $method parameter is an array, this
- * parameter may be omitted (and will be ignored
- * if not), and the $method parameter will be
- * treated as an associative array with method
- * names as keys and class names as values.
- *
- * @return void
- *
- * @access public
- */
- function addAutoload($method, $classname = null)
- {
- if (is_array($method)) {
- array_walk($method, create_function('$a,&$b', '$b = strtolower($b);'));
- $this->_autoload_map = array_merge($this->_autoload_map, $method);
- } else {
- $this->_autoload_map[strtolower($method)] = $classname;
- }
- }
-
- // }}}
- // {{{ removeAutoload()
-
- /**
- * Remove an autoload entry.
- *
- * @param string $method which method to remove the autoload entry for
- *
- * @return bool TRUE if an entry was removed, FALSE if not
- *
- * @access public
- */
- function removeAutoload($method)
- {
- $method = strtolower($method);
- $ok = isset($this->_autoload_map[$method]);
- unset($this->_autoload_map[$method]);
- return $ok;
- }
-
- // }}}
- // {{{ addAggregateObject()
-
- /**
- * Add an aggregate object to this object. If the specified class
- * is not defined, loading it will be attempted following PEAR's
- * file naming scheme. All the methods in the class will be
- * aggregated, except private ones (name starting with an
- * underscore) and constructors.
- *
- * @param string $classname what class to instantiate for the object.
- *
- * @return void
- *
- * @access public
- */
- function addAggregateObject($classname)
- {
- $classname = strtolower($classname);
- if (!class_exists($classname)) {
- $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname);
- include_once $include_file;
- }
- $obj = new $classname;
- $methods = get_class_methods($classname);
- foreach ($methods as $method) {
- // don't import priviate methods and constructors
- if ($method{0} != '_' && $method != $classname) {
- $this->_method_map[$method] = $obj;
- }
- }
- }
-
- // }}}
- // {{{ removeAggregateObject()
-
- /**
- * Remove an aggregate object.
- *
- * @param string $classname the class of the object to remove
- *
- * @return bool TRUE if an object was removed, FALSE if not
- *
- * @access public
- */
- function removeAggregateObject($classname)
- {
- $ok = false;
- $classname = strtolower($classname);
- reset($this->_method_map);
- while (list($method, $obj) = each($this->_method_map)) {
- if (is_a($obj, $classname)) {
- unset($this->_method_map[$method]);
- $ok = true;
- }
- }
- return $ok;
- }
-
- // }}}
- // {{{ __call()
-
- /**
- * Overloaded object call handler, called each time an
- * undefined/aggregated method is invoked. This method repeats
- * the call in the right aggregate object and passes on the return
- * value.
- *
- * @param string $method which method that was called
- *
- * @param string $args An array of the parameters passed in the
- * original call
- *
- * @return mixed The return value from the aggregated method, or a PEAR
- * error if the called method was unknown.
- */
- function __call($method, $args, &$retval)
- {
- $method = strtolower($method);
- if (empty($this->_method_map[$method]) && isset($this->_autoload_map[$method])) {
- $this->addAggregateObject($this->_autoload_map[$method]);
- }
- if (isset($this->_method_map[$method])) {
- $retval = call_user_func_array(array($this->_method_map[$method], $method), $args);
- return true;
- }
- return false;
- }
-
- // }}}
-}
-
-overload("PEAR_Autoloader");
-
-?>
-
-/**
- * PEAR_Builder for building PHP extensions (PECL packages)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- *
- * TODO: log output parameters in PECL command line
- * TODO: msdev path in configuration
- */
-
-/**
- * Needed for extending PEAR_Builder
- */
-require_once 'PEAR/Common.php';
-require_once 'PEAR/PackageFile.php';
-
-/**
- * Class to handle building (compiling) extensions.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since PHP 4.0.2
- * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php
- */
-class PEAR_Builder extends PEAR_Common
-{
- var $php_api_version = 0;
- var $zend_module_api_no = 0;
- var $zend_extension_api_no = 0;
-
- var $extensions_built = array();
-
- /**
- * @var string Used for reporting when it is not possible to pass function
- * via extra parameter, e.g. log, msdevCallback
- */
- var $current_callback = null;
-
- // used for msdev builds
- var $_lastline = null;
- var $_firstline = null;
-
- /**
- * PEAR_Builder constructor.
- *
- * @param object $ui user interface object (instance of PEAR_Frontend_*)
- *
- * @access public
- */
- function __construct(&$ui)
- {
- parent::__construct();
- $this->setFrontendObject($ui);
- }
-
- /**
- * Build an extension from source on windows.
- * requires msdev
- */
- function _build_win32($descfile, $callback = null)
- {
- if (is_object($descfile)) {
- $pkg = $descfile;
- $descfile = $pkg->getPackageFile();
- } else {
- $pf = new PEAR_PackageFile($this->config, $this->debug);
- $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($pkg)) {
- return $pkg;
- }
- }
- $dir = dirname($descfile);
- $old_cwd = getcwd();
-
- if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
- return $this->raiseError("could not chdir to $dir");
- }
-
- // packages that were in a .tar have the packagefile in this directory
- $vdir = $pkg->getPackage() . '-' . $pkg->getVersion();
- if (file_exists($dir) && is_dir($vdir)) {
- if (!chdir($vdir)) {
- return $this->raiseError("could not chdir to " . realpath($vdir));
- }
-
- $dir = getcwd();
- }
-
- $this->log(2, "building in $dir");
-
- $dsp = $pkg->getPackage().'.dsp';
- if (!file_exists("$dir/$dsp")) {
- return $this->raiseError("The DSP $dsp does not exist.");
- }
- // XXX TODO: make release build type configurable
- $command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"';
-
- $err = $this->_runCommand($command, array(&$this, 'msdevCallback'));
- if (PEAR::isError($err)) {
- return $err;
- }
-
- // figure out the build platform and type
- $platform = 'Win32';
- $buildtype = 'Release';
- if (preg_match('/.*?'.$pkg->getPackage().'\s-\s(\w+)\s(.*?)-+/i',$this->_firstline,$matches)) {
- $platform = $matches[1];
- $buildtype = $matches[2];
- }
-
- if (preg_match('/(.*)?\s-\s(\d+).*?(\d+)/', $this->_lastline, $matches)) {
- if ($matches[2]) {
- // there were errors in the build
- return $this->raiseError("There were errors during compilation.");
- }
- $out = $matches[1];
- } else {
- return $this->raiseError("Did not understand the completion status returned from msdev.exe.");
- }
-
- // msdev doesn't tell us the output directory :/
- // open the dsp, find /out and use that directory
- $dsptext = join(file($dsp),'');
-
- // this regex depends on the build platform and type having been
- // correctly identified above.
- $regex ='/.*?!IF\s+"\$\(CFG\)"\s+==\s+("'.
- $pkg->getPackage().'\s-\s'.
- $platform.'\s'.
- $buildtype.'").*?'.
- '\/out:"(.*?)"/is';
-
- if ($dsptext && preg_match($regex, $dsptext, $matches)) {
- // what we get back is a relative path to the output file itself.
- $outfile = realpath($matches[2]);
- } else {
- return $this->raiseError("Could not retrieve output information from $dsp.");
- }
- // realpath returns false if the file doesn't exist
- if ($outfile && copy($outfile, "$dir/$out")) {
- $outfile = "$dir/$out";
- }
-
- $built_files[] = array(
- 'file' => "$outfile",
- 'php_api' => $this->php_api_version,
- 'zend_mod_api' => $this->zend_module_api_no,
- 'zend_ext_api' => $this->zend_extension_api_no,
- );
-
- return $built_files;
- }
- // }}}
-
- // {{{ msdevCallback()
- function msdevCallback($what, $data)
- {
- if (!$this->_firstline)
- $this->_firstline = $data;
- $this->_lastline = $data;
- call_user_func($this->current_callback, $what, $data);
- }
-
- /**
- * @param string
- * @param string
- * @param array
- * @access private
- */
- function _harvestInstDir($dest_prefix, $dirname, &$built_files)
- {
- $d = opendir($dirname);
- if (!$d)
- return false;
-
- $ret = true;
- while (($ent = readdir($d)) !== false) {
- if ($ent{0} == '.')
- continue;
-
- $full = $dirname . DIRECTORY_SEPARATOR . $ent;
- if (is_dir($full)) {
- if (!$this->_harvestInstDir(
- $dest_prefix . DIRECTORY_SEPARATOR . $ent,
- $full, $built_files)) {
- $ret = false;
- break;
- }
- } else {
- $dest = $dest_prefix . DIRECTORY_SEPARATOR . $ent;
- $built_files[] = array(
- 'file' => $full,
- 'dest' => $dest,
- 'php_api' => $this->php_api_version,
- 'zend_mod_api' => $this->zend_module_api_no,
- 'zend_ext_api' => $this->zend_extension_api_no,
- );
- }
- }
- closedir($d);
- return $ret;
- }
-
- /**
- * Build an extension from source. Runs "phpize" in the source
- * directory, but compiles in a temporary directory
- * (TMPDIR/pear-build-USER/PACKAGE-VERSION).
- *
- * @param string|PEAR_PackageFile_v* $descfile path to XML package description file, or
- * a PEAR_PackageFile object
- *
- * @param mixed $callback callback function used to report output,
- * see PEAR_Builder::_runCommand for details
- *
- * @return array an array of associative arrays with built files,
- * format:
- * array( array( 'file' => '/path/to/ext.so',
- * 'php_api' => YYYYMMDD,
- * 'zend_mod_api' => YYYYMMDD,
- * 'zend_ext_api' => YYYYMMDD ),
- * ... )
- *
- * @access public
- *
- * @see PEAR_Builder::_runCommand
- */
- function build($descfile, $callback = null)
- {
- if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php([^\\/\\\\]+)?$/',
- $this->config->get('php_bin'), $matches)) {
- if (isset($matches[2]) && strlen($matches[2]) &&
- trim($matches[2]) != trim($this->config->get('php_prefix'))) {
- $this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') .
- ' appears to have a prefix ' . $matches[2] . ', but' .
- ' config variable php_prefix does not match');
- }
-
- if (isset($matches[3]) && strlen($matches[3]) &&
- trim($matches[3]) != trim($this->config->get('php_suffix'))) {
- $this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') .
- ' appears to have a suffix ' . $matches[3] . ', but' .
- ' config variable php_suffix does not match');
- }
- }
-
- $this->current_callback = $callback;
- if (PEAR_OS == "Windows") {
- return $this->_build_win32($descfile, $callback);
- }
-
- if (PEAR_OS != 'Unix') {
- return $this->raiseError("building extensions not supported on this platform");
- }
-
- if (is_object($descfile)) {
- $pkg = $descfile;
- $descfile = $pkg->getPackageFile();
- if (is_a($pkg, 'PEAR_PackageFile_v1')) {
- $dir = dirname($descfile);
- } else {
- $dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName();
- // automatically delete at session end
- $this->addTempFile($dir);
- }
- } else {
- $pf = new PEAR_PackageFile($this->config);
- $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($pkg)) {
- return $pkg;
- }
- $dir = dirname($descfile);
- }
-
- // Find config. outside of normal path - e.g. config.m4
- foreach (array_keys($pkg->getInstallationFileList()) as $item) {
- if (stristr(basename($item), 'config.m4') && dirname($item) != '.') {
- $dir .= DIRECTORY_SEPARATOR . dirname($item);
- break;
- }
- }
-
- $old_cwd = getcwd();
- if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
- return $this->raiseError("could not chdir to $dir");
- }
-
- $vdir = $pkg->getPackage() . '-' . $pkg->getVersion();
- if (is_dir($vdir)) {
- chdir($vdir);
- }
-
- $dir = getcwd();
- $this->log(2, "building in $dir");
- putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
- $err = $this->_runCommand($this->config->get('php_prefix')
- . "phpize" .
- $this->config->get('php_suffix'),
- array(&$this, 'phpizeCallback'));
- if (PEAR::isError($err)) {
- return $err;
- }
-
- if (!$err) {
- return $this->raiseError("`phpize' failed");
- }
-
- // {{{ start of interactive part
- $configure_command = "$dir/configure";
- $configure_options = $pkg->getConfigureOptions();
- if ($configure_options) {
- foreach ($configure_options as $o) {
- $default = array_key_exists('default', $o) ? $o['default'] : null;
- list($r) = $this->ui->userDialog('build',
- array($o['prompt']),
- array('text'),
- array($default));
- if (substr($o['name'], 0, 5) == 'with-' &&
- ($r == 'yes' || $r == 'autodetect')) {
- $configure_command .= " --$o[name]";
- } else {
- $configure_command .= " --$o[name]=".trim($r);
- }
- }
- }
- // }}} end of interactive part
-
- // FIXME make configurable
- if (!$user=getenv('USER')) {
- $user='defaultuser';
- }
-
- $tmpdir = $this->config->get('temp_dir');
- $build_basedir = System::mktemp(' -t "' . $tmpdir . '" -d "pear-build-' . $user . '"');
- $build_dir = "$build_basedir/$vdir";
- $inst_dir = "$build_basedir/install-$vdir";
- $this->log(1, "building in $build_dir");
- if (is_dir($build_dir)) {
- System::rm(array('-rf', $build_dir));
- }
-
- if (!System::mkDir(array('-p', $build_dir))) {
- return $this->raiseError("could not create build dir: $build_dir");
- }
-
- $this->addTempFile($build_dir);
- if (!System::mkDir(array('-p', $inst_dir))) {
- return $this->raiseError("could not create temporary install dir: $inst_dir");
- }
- $this->addTempFile($inst_dir);
-
- $make_command = getenv('MAKE') ? getenv('MAKE') : 'make';
-
- $to_run = array(
- $configure_command,
- $make_command,
- "$make_command INSTALL_ROOT=\"$inst_dir\" install",
- "find \"$inst_dir\" | xargs ls -dils"
- );
- if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) {
- return $this->raiseError("could not chdir to $build_dir");
- }
- putenv('PHP_PEAR_VERSION=1.9.5');
- foreach ($to_run as $cmd) {
- $err = $this->_runCommand($cmd, $callback);
- if (PEAR::isError($err)) {
- chdir($old_cwd);
- return $err;
- }
- if (!$err) {
- chdir($old_cwd);
- return $this->raiseError("`$cmd' failed");
- }
- }
- if (!($dp = opendir("modules"))) {
- chdir($old_cwd);
- return $this->raiseError("no `modules' directory found");
- }
- $built_files = array();
- $prefix = exec($this->config->get('php_prefix')
- . "php-config" .
- $this->config->get('php_suffix') . " --prefix");
- $this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files);
- chdir($old_cwd);
- return $built_files;
- }
-
- /**
- * Message callback function used when running the "phpize"
- * program. Extracts the API numbers used. Ignores other message
- * types than "cmdoutput".
- *
- * @param string $what the type of message
- * @param mixed $data the message
- *
- * @return void
- *
- * @access public
- */
- function phpizeCallback($what, $data)
- {
- if ($what != 'cmdoutput') {
- return;
- }
- $this->log(1, rtrim($data));
- if (preg_match('/You should update your .aclocal.m4/', $data)) {
- return;
- }
- $matches = array();
- if (preg_match('/^\s+(\S[^:]+):\s+(\d{8})/', $data, $matches)) {
- $member = preg_replace('/[^a-z]/', '_', strtolower($matches[1]));
- $apino = (int)$matches[2];
- if (isset($this->$member)) {
- $this->$member = $apino;
- //$msg = sprintf("%-22s : %d", $matches[1], $apino);
- //$this->log(1, $msg);
- }
- }
- }
-
- /**
- * Run an external command, using a message callback to report
- * output. The command will be run through popen and output is
- * reported for every line with a "cmdoutput" message with the
- * line string, including newlines, as payload.
- *
- * @param string $command the command to run
- *
- * @param mixed $callback (optional) function to use as message
- * callback
- *
- * @return bool whether the command was successful (exit code 0
- * means success, any other means failure)
- *
- * @access private
- */
- function _runCommand($command, $callback = null)
- {
- $this->log(1, "running: $command");
- $pp = popen("$command 2>&1", "r");
- if (!$pp) {
- return $this->raiseError("failed to run `$command'");
- }
- if ($callback && $callback[0]->debug == 1) {
- $olddbg = $callback[0]->debug;
- $callback[0]->debug = 2;
- }
-
- while ($line = fgets($pp, 1024)) {
- if ($callback) {
- call_user_func($callback, 'cmdoutput', $line);
- } else {
- $this->log(2, rtrim($line));
- }
- }
- if ($callback && isset($olddbg)) {
- $callback[0]->debug = $olddbg;
- }
-
- $exitcode = is_resource($pp) ? pclose($pp) : -1;
- return ($exitcode == 0);
- }
-
- function log($level, $msg)
- {
- if ($this->current_callback) {
- if ($this->debug >= $level) {
- call_user_func($this->current_callback, 'output', $msg);
- }
- return;
- }
- return PEAR_Common::log($level, $msg);
- }
-}
-
-/**
- * PEAR_ChannelFile, the channel handling class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Needed for error handling
- */
-require_once 'PEAR/ErrorStack.php';
-require_once 'PEAR/XMLParser.php';
-require_once 'PEAR/Common.php';
-
-/**
- * Error code if the channel.xml <channel> tag does not contain a valid version
- */
-define('PEAR_CHANNELFILE_ERROR_NO_VERSION', 1);
-/**
- * Error code if the channel.xml <channel> tag version is not supported (version 1.0 is the only supported version,
- * currently
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_VERSION', 2);
-
-/**
- * Error code if parsing is attempted with no xml extension
- */
-define('PEAR_CHANNELFILE_ERROR_NO_XML_EXT', 3);
-
-/**
- * Error code if creating the xml parser resource fails
- */
-define('PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER', 4);
-
-/**
- * Error code used for all sax xml parsing errors
- */
-define('PEAR_CHANNELFILE_ERROR_PARSER_ERROR', 5);
-
-/**#@+
- * Validation errors
- */
-/**
- * Error code when channel name is missing
- */
-define('PEAR_CHANNELFILE_ERROR_NO_NAME', 6);
-/**
- * Error code when channel name is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_NAME', 7);
-/**
- * Error code when channel summary is missing
- */
-define('PEAR_CHANNELFILE_ERROR_NO_SUMMARY', 8);
-/**
- * Error code when channel summary is multi-line
- */
-define('PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY', 9);
-/**
- * Error code when channel server is missing for protocol
- */
-define('PEAR_CHANNELFILE_ERROR_NO_HOST', 10);
-/**
- * Error code when channel server is invalid for protocol
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_HOST', 11);
-/**
- * Error code when a mirror name is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_MIRROR', 21);
-/**
- * Error code when a mirror type is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE', 22);
-/**
- * Error code when an attempt is made to generate xml, but the parsed content is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID', 23);
-/**
- * Error code when an empty package name validate regex is passed in
- */
-define('PEAR_CHANNELFILE_ERROR_EMPTY_REGEX', 24);
-/**
- * Error code when a <function> tag has no version
- */
-define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION', 25);
-/**
- * Error code when a <function> tag has no name
- */
-define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME', 26);
-/**
- * Error code when a <validatepackage> tag has no name
- */
-define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME', 27);
-/**
- * Error code when a <validatepackage> tag has no version attribute
- */
-define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION', 28);
-/**
- * Error code when a mirror does not exist but is called for in one of the set*
- * methods.
- */
-define('PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND', 32);
-/**
- * Error code when a server port is not numeric
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_PORT', 33);
-/**
- * Error code when <static> contains no version attribute
- */
-define('PEAR_CHANNELFILE_ERROR_NO_STATICVERSION', 34);
-/**
- * Error code when <baseurl> contains no type attribute in a <rest> protocol definition
- */
-define('PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE', 35);
-/**
- * Error code when a mirror is defined and the channel.xml represents the __uri pseudo-channel
- */
-define('PEAR_CHANNELFILE_URI_CANT_MIRROR', 36);
-/**
- * Error code when ssl attribute is present and is not "yes"
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_SSL', 37);
-/**#@-*/
-
-/**
- * Mirror types allowed. Currently only internet servers are recognized.
- */
-$GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server');
-
-
-/**
- * The Channel handling class
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_ChannelFile
-{
- /**
- * @access private
- * @var PEAR_ErrorStack
- * @access private
- */
- var $_stack;
-
- /**
- * Supported channel.xml versions, for parsing
- * @var array
- * @access private
- */
- var $_supportedVersions = array('1.0');
-
- /**
- * Parsed channel information
- * @var array
- * @access private
- */
- var $_channelInfo;
-
- /**
- * index into the subchannels array, used for parsing xml
- * @var int
- * @access private
- */
- var $_subchannelIndex;
-
- /**
- * index into the mirrors array, used for parsing xml
- * @var int
- * @access private
- */
- var $_mirrorIndex;
-
- /**
- * Flag used to determine the validity of parsed content
- * @var boolean
- * @access private
- */
- var $_isValid = false;
-
- function __construct()
- {
- $this->_stack = new PEAR_ErrorStack('PEAR_ChannelFile');
- $this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
- $this->_isValid = false;
- }
-
- /**
- * @return array
- * @access protected
- */
- function _getErrorMessage()
- {
- return
- array(
- PEAR_CHANNELFILE_ERROR_INVALID_VERSION =>
- 'While parsing channel.xml, an invalid version number "%version% was passed in, expecting one of %versions%',
- PEAR_CHANNELFILE_ERROR_NO_VERSION =>
- 'No version number found in <channel> tag',
- PEAR_CHANNELFILE_ERROR_NO_XML_EXT =>
- '%error%',
- PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER =>
- 'Unable to create XML parser',
- PEAR_CHANNELFILE_ERROR_PARSER_ERROR =>
- '%error%',
- PEAR_CHANNELFILE_ERROR_NO_NAME =>
- 'Missing channel name',
- PEAR_CHANNELFILE_ERROR_INVALID_NAME =>
- 'Invalid channel %tag% "%name%"',
- PEAR_CHANNELFILE_ERROR_NO_SUMMARY =>
- 'Missing channel summary',
- PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY =>
- 'Channel summary should be on one line, but is multi-line',
- PEAR_CHANNELFILE_ERROR_NO_HOST =>
- 'Missing channel server for %type% server',
- PEAR_CHANNELFILE_ERROR_INVALID_HOST =>
- 'Server name "%server%" is invalid for %type% server',
- PEAR_CHANNELFILE_ERROR_INVALID_MIRROR =>
- 'Invalid mirror name "%name%", mirror type %type%',
- PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE =>
- 'Invalid mirror type "%type%"',
- PEAR_CHANNELFILE_ERROR_INVALID =>
- 'Cannot generate xml, contents are invalid',
- PEAR_CHANNELFILE_ERROR_EMPTY_REGEX =>
- 'packagenameregex cannot be empty',
- PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION =>
- '%parent% %protocol% function has no version',
- PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME =>
- '%parent% %protocol% function has no name',
- PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE =>
- '%parent% rest baseurl has no type',
- PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME =>
- 'Validation package has no name in <validatepackage> tag',
- PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION =>
- 'Validation package "%package%" has no version',
- PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND =>
- 'Mirror "%mirror%" does not exist',
- PEAR_CHANNELFILE_ERROR_INVALID_PORT =>
- 'Port "%port%" must be numeric',
- PEAR_CHANNELFILE_ERROR_NO_STATICVERSION =>
- '<static> tag must contain version attribute',
- PEAR_CHANNELFILE_URI_CANT_MIRROR =>
- 'The __uri pseudo-channel cannot have mirrors',
- PEAR_CHANNELFILE_ERROR_INVALID_SSL =>
- '%server% has invalid ssl attribute "%ssl%" can only be yes or not present',
- );
- }
-
- /**
- * @param string contents of package.xml file
- * @return bool success of parsing
- */
- function fromXmlString($data)
- {
- if (preg_match('/<channel\s+version="([0-9]+\.[0-9]+)"/', $data, $channelversion)) {
- if (!in_array($channelversion[1], $this->_supportedVersions)) {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_INVALID_VERSION, 'error',
- array('version' => $channelversion[1]));
- return false;
- }
- $parser = new PEAR_XMLParser;
- $result = $parser->parse($data);
- if ($result !== true) {
- if ($result->getCode() == 1) {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error',
- array('error' => $result->getMessage()));
- } else {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error');
- }
- return false;
- }
- $this->_channelInfo = $parser->getData();
- return true;
- } else {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_VERSION, 'error', array('xml' => $data));
- return false;
- }
- }
-
- /**
- * @return array
- */
- function toArray()
- {
- if (!$this->_isValid && !$this->validate()) {
- return false;
- }
- return $this->_channelInfo;
- }
-
- /**
- * @param array
- * @static
- * @return PEAR_ChannelFile|false false if invalid
- */
- function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack')
- {
- $a = new PEAR_ChannelFile($compatibility, $stackClass);
- $a->_fromArray($data);
- if (!$a->validate()) {
- $a = false;
- return $a;
- }
- return $a;
- }
-
- /**
- * Unlike {@link fromArray()} this does not do any validation
- * @param array
- * @static
- * @return PEAR_ChannelFile
- */
- function &fromArrayWithErrors($data, $compatibility = false,
- $stackClass = 'PEAR_ErrorStack')
- {
- $a = new PEAR_ChannelFile($compatibility, $stackClass);
- $a->_fromArray($data);
- return $a;
- }
-
- /**
- * @param array
- * @access private
- */
- function _fromArray($data)
- {
- $this->_channelInfo = $data;
- }
-
- /**
- * Wrapper to {@link PEAR_ErrorStack::getErrors()}
- * @param boolean determines whether to purge the error stack after retrieving
- * @return array
- */
- function getErrors($purge = false)
- {
- return $this->_stack->getErrors($purge);
- }
-
- /**
- * Unindent given string (?)
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- }
- }
- return $data;
- }
-
- /**
- * Parse a channel.xml file. Expects the name of
- * a channel xml file as input.
- *
- * @param string $descfile name of channel xml file
- * @return bool success of parsing
- */
- function fromXmlFile($descfile)
- {
- if (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) ||
- (!$fp = fopen($descfile, 'r'))) {
- require_once 'PEAR.php';
- return PEAR::raiseError("Unable to open $descfile");
- }
-
- // read the whole thing so we only get one cdata callback
- // for each block of cdata
- fclose($fp);
- $data = file_get_contents($descfile);
- return $this->fromXmlString($data);
- }
-
- /**
- * Parse channel information from different sources
- *
- * This method is able to extract information about a channel
- * from an .xml file or a string
- *
- * @access public
- * @param string Filename of the source or the source itself
- * @return bool
- */
- function fromAny($info)
- {
- if (is_string($info) && file_exists($info) && strlen($info) < 255) {
- $tmp = substr($info, -4);
- if ($tmp == '.xml') {
- $info = $this->fromXmlFile($info);
- } else {
- $fp = fopen($info, "r");
- $test = fread($fp, 5);
- fclose($fp);
- if ($test == "<?xml") {
- $info = $this->fromXmlFile($info);
- }
- }
- if (PEAR::isError($info)) {
- require_once 'PEAR.php';
- return PEAR::raiseError($info);
- }
- }
- if (is_string($info)) {
- $info = $this->fromXmlString($info);
- }
- return $info;
- }
-
- /**
- * Return an XML document based on previous parsing and modifications
- *
- * @return string XML data
- *
- * @access public
- */
- function toXml()
- {
- if (!$this->_isValid && !$this->validate()) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID);
- return false;
- }
- if (!isset($this->_channelInfo['attribs']['version'])) {
- $this->_channelInfo['attribs']['version'] = '1.0';
- }
- $channelInfo = $this->_channelInfo;
- $ret = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
- $ret .= "<channel version=\"" .
- $channelInfo['attribs']['version'] . "\" xmlns=\"http://pear.php.net/channel-1.0\"
- xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
- xsi:schemaLocation=\"http://pear.php.net/dtd/channel-"
- . $channelInfo['attribs']['version'] . " http://pear.php.net/dtd/channel-" .
- $channelInfo['attribs']['version'] . ".xsd\">
- <name>$channelInfo[name]</name>
- <summary>" . htmlspecialchars($channelInfo['summary'])."</summary>
-";
- if (isset($channelInfo['suggestedalias'])) {
- $ret .= ' <suggestedalias>' . $channelInfo['suggestedalias'] . "</suggestedalias>\n";
- }
- if (isset($channelInfo['validatepackage'])) {
- $ret .= ' <validatepackage version="' .
- $channelInfo['validatepackage']['attribs']['version']. '">' .
- htmlspecialchars($channelInfo['validatepackage']['_content']) .
- "</validatepackage>\n";
- }
- $ret .= " <servers>\n";
- $ret .= ' <primary';
- if (isset($channelInfo['servers']['primary']['attribs']['ssl'])) {
- $ret .= ' ssl="' . $channelInfo['servers']['primary']['attribs']['ssl'] . '"';
- }
- if (isset($channelInfo['servers']['primary']['attribs']['port'])) {
- $ret .= ' port="' . $channelInfo['servers']['primary']['attribs']['port'] . '"';
- }
- $ret .= ">\n";
- if (isset($channelInfo['servers']['primary']['rest'])) {
- $ret .= $this->_makeRestXml($channelInfo['servers']['primary']['rest'], ' ');
- }
- $ret .= " </primary>\n";
- if (isset($channelInfo['servers']['mirror'])) {
- $ret .= $this->_makeMirrorsXml($channelInfo);
- }
- $ret .= " </servers>\n";
- $ret .= "</channel>";
- return str_replace("\r", "\n", str_replace("\r\n", "\n", $ret));
- }
-
- /**
- * Generate the <rest> tag
- * @access private
- */
- function _makeRestXml($info, $indent)
- {
- $ret = $indent . "<rest>\n";
- if (isset($info['baseurl']) && !isset($info['baseurl'][0])) {
- $info['baseurl'] = array($info['baseurl']);
- }
-
- if (isset($info['baseurl'])) {
- foreach ($info['baseurl'] as $url) {
- $ret .= "$indent <baseurl type=\"" . $url['attribs']['type'] . "\"";
- $ret .= ">" . $url['_content'] . "</baseurl>\n";
- }
- }
- $ret .= $indent . "</rest>\n";
- return $ret;
- }
-
- /**
- * Generate the <mirrors> tag
- * @access private
- */
- function _makeMirrorsXml($channelInfo)
- {
- $ret = "";
- if (!isset($channelInfo['servers']['mirror'][0])) {
- $channelInfo['servers']['mirror'] = array($channelInfo['servers']['mirror']);
- }
- foreach ($channelInfo['servers']['mirror'] as $mirror) {
- $ret .= ' <mirror host="' . $mirror['attribs']['host'] . '"';
- if (isset($mirror['attribs']['port'])) {
- $ret .= ' port="' . $mirror['attribs']['port'] . '"';
- }
- if (isset($mirror['attribs']['ssl'])) {
- $ret .= ' ssl="' . $mirror['attribs']['ssl'] . '"';
- }
- $ret .= ">\n";
- if (isset($mirror['rest'])) {
- if (isset($mirror['rest'])) {
- $ret .= $this->_makeRestXml($mirror['rest'], ' ');
- }
- $ret .= " </mirror>\n";
- } else {
- $ret .= "/>\n";
- }
- }
- return $ret;
- }
-
- /**
- * Generate the <functions> tag
- * @access private
- */
- function _makeFunctionsXml($functions, $indent, $rest = false)
- {
- $ret = '';
- if (!isset($functions[0])) {
- $functions = array($functions);
- }
- foreach ($functions as $function) {
- $ret .= "$indent<function version=\"" . $function['attribs']['version'] . "\"";
- if ($rest) {
- $ret .= ' uri="' . $function['attribs']['uri'] . '"';
- }
- $ret .= ">" . $function['_content'] . "</function>\n";
- }
- return $ret;
- }
-
- /**
- * Validation error. Also marks the object contents as invalid
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateError($code, $params = array())
- {
- $this->_stack->push($code, 'error', $params);
- $this->_isValid = false;
- }
-
- /**
- * Validation warning. Does not mark the object contents invalid.
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateWarning($code, $params = array())
- {
- $this->_stack->push($code, 'warning', $params);
- }
-
- /**
- * Validate parsed file.
- *
- * @access public
- * @return boolean
- */
- function validate()
- {
- $this->_isValid = true;
- $info = $this->_channelInfo;
- if (empty($info['name'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_NAME);
- } elseif (!$this->validChannelServer($info['name'])) {
- if ($info['name'] != '__uri') {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, array('tag' => 'name',
- 'name' => $info['name']));
- }
- }
- if (empty($info['summary'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY);
- } elseif (strpos(trim($info['summary']), "\n") !== false) {
- $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY,
- array('summary' => $info['summary']));
- }
- if (isset($info['suggestedalias'])) {
- if (!$this->validChannelServer($info['suggestedalias'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'suggestedalias', 'name' =>$info['suggestedalias']));
- }
- }
- if (isset($info['localalias'])) {
- if (!$this->validChannelServer($info['localalias'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'localalias', 'name' =>$info['localalias']));
- }
- }
- if (isset($info['validatepackage'])) {
- if (!isset($info['validatepackage']['_content'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME);
- }
- if (!isset($info['validatepackage']['attribs']['version'])) {
- $content = isset($info['validatepackage']['_content']) ?
- $info['validatepackage']['_content'] :
- null;
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION,
- array('package' => $content));
- }
- }
-
- if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['port']) &&
- !is_numeric($info['servers']['primary']['attribs']['port'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_PORT,
- array('port' => $info['servers']['primary']['attribs']['port']));
- }
-
- if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['ssl']) &&
- $info['servers']['primary']['attribs']['ssl'] != 'yes') {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL,
- array('ssl' => $info['servers']['primary']['attribs']['ssl'],
- 'server' => $info['name']));
- }
-
- if (isset($info['servers']['primary']['rest']) &&
- isset($info['servers']['primary']['rest']['baseurl'])) {
- $this->_validateFunctions('rest', $info['servers']['primary']['rest']['baseurl']);
- }
- if (isset($info['servers']['mirror'])) {
- if ($this->_channelInfo['name'] == '__uri') {
- $this->_validateError(PEAR_CHANNELFILE_URI_CANT_MIRROR);
- }
- if (!isset($info['servers']['mirror'][0])) {
- $info['servers']['mirror'] = array($info['servers']['mirror']);
- }
- foreach ($info['servers']['mirror'] as $mirror) {
- if (!isset($mirror['attribs']['host'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_HOST,
- array('type' => 'mirror'));
- } elseif (!$this->validChannelServer($mirror['attribs']['host'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_HOST,
- array('server' => $mirror['attribs']['host'], 'type' => 'mirror'));
- }
- if (isset($mirror['attribs']['ssl']) && $mirror['attribs']['ssl'] != 'yes') {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL,
- array('ssl' => $info['ssl'], 'server' => $mirror['attribs']['host']));
- }
- if (isset($mirror['rest'])) {
- $this->_validateFunctions('rest', $mirror['rest']['baseurl'],
- $mirror['attribs']['host']);
- }
- }
- }
- return $this->_isValid;
- }
-
- /**
- * @param string rest - protocol name this function applies to
- * @param array the functions
- * @param string the name of the parent element (mirror name, for instance)
- */
- function _validateFunctions($protocol, $functions, $parent = '')
- {
- if (!isset($functions[0])) {
- $functions = array($functions);
- }
-
- foreach ($functions as $function) {
- if (!isset($function['_content']) || empty($function['_content'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME,
- array('parent' => $parent, 'protocol' => $protocol));
- }
-
- if ($protocol == 'rest') {
- if (!isset($function['attribs']['type']) ||
- empty($function['attribs']['type'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE,
- array('parent' => $parent, 'protocol' => $protocol));
- }
- } else {
- if (!isset($function['attribs']['version']) ||
- empty($function['attribs']['version'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION,
- array('parent' => $parent, 'protocol' => $protocol));
- }
- }
- }
- }
-
- /**
- * Test whether a string contains a valid channel server.
- * @param string $ver the package version to test
- * @return bool
- */
- function validChannelServer($server)
- {
- if ($server == '__uri') {
- return true;
- }
- return (bool) preg_match(PEAR_CHANNELS_SERVER_PREG, $server);
- }
-
- /**
- * @return string|false
- */
- function getName()
- {
- if (isset($this->_channelInfo['name'])) {
- return $this->_channelInfo['name'];
- }
-
- return false;
- }
-
- /**
- * @return string|false
- */
- function getServer()
- {
- if (isset($this->_channelInfo['name'])) {
- return $this->_channelInfo['name'];
- }
-
- return false;
- }
-
- /**
- * @return int|80 port number to connect to
- */
- function getPort($mirror = false)
- {
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- if (isset($mir['attribs']['port'])) {
- return $mir['attribs']['port'];
- }
-
- if ($this->getSSL($mirror)) {
- return 443;
- }
-
- return 80;
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary']['attribs']['port'])) {
- return $this->_channelInfo['servers']['primary']['attribs']['port'];
- }
-
- if ($this->getSSL()) {
- return 443;
- }
-
- return 80;
- }
-
- /**
- * @return bool Determines whether secure sockets layer (SSL) is used to connect to this channel
- */
- function getSSL($mirror = false)
- {
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- if (isset($mir['attribs']['ssl'])) {
- return true;
- }
-
- return false;
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) {
- return true;
- }
-
- return false;
- }
-
- /**
- * @return string|false
- */
- function getSummary()
- {
- if (isset($this->_channelInfo['summary'])) {
- return $this->_channelInfo['summary'];
- }
-
- return false;
- }
-
- /**
- * @param string protocol type
- * @param string Mirror name
- * @return array|false
- */
- function getFunctions($protocol, $mirror = false)
- {
- if ($this->getName() == '__uri') {
- return false;
- }
-
- $function = $protocol == 'rest' ? 'baseurl' : 'function';
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- if (isset($mir[$protocol][$function])) {
- return $mir[$protocol][$function];
- }
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary'][$protocol][$function])) {
- return $this->_channelInfo['servers']['primary'][$protocol][$function];
- }
-
- return false;
- }
-
- /**
- * @param string Protocol type
- * @param string Function name (null to return the
- * first protocol of the type requested)
- * @param string Mirror name, if any
- * @return array
- */
- function getFunction($type, $name = null, $mirror = false)
- {
- $protocols = $this->getFunctions($type, $mirror);
- if (!$protocols) {
- return false;
- }
-
- foreach ($protocols as $protocol) {
- if ($name === null) {
- return $protocol;
- }
-
- if ($protocol['_content'] != $name) {
- continue;
- }
-
- return $protocol;
- }
-
- return false;
- }
-
- /**
- * @param string protocol type
- * @param string protocol name
- * @param string version
- * @param string mirror name
- * @return boolean
- */
- function supports($type, $name = null, $mirror = false, $version = '1.0')
- {
- $protocols = $this->getFunctions($type, $mirror);
- if (!$protocols) {
- return false;
- }
-
- foreach ($protocols as $protocol) {
- if ($protocol['attribs']['version'] != $version) {
- continue;
- }
-
- if ($name === null) {
- return true;
- }
-
- if ($protocol['_content'] != $name) {
- continue;
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Determines whether a channel supports Representational State Transfer (REST) protocols
- * for retrieving channel information
- * @param string
- * @return bool
- */
- function supportsREST($mirror = false)
- {
- if ($mirror == $this->_channelInfo['name']) {
- $mirror = false;
- }
-
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- return isset($mir['rest']);
- }
-
- return false;
- }
-
- return isset($this->_channelInfo['servers']['primary']['rest']);
- }
-
- /**
- * Get the URL to access a base resource.
- *
- * Hyperlinks in the returned xml will be used to retrieve the proper information
- * needed. This allows extreme extensibility and flexibility in implementation
- * @param string Resource Type to retrieve
- */
- function getBaseURL($resourceType, $mirror = false)
- {
- if ($mirror == $this->_channelInfo['name']) {
- $mirror = false;
- }
-
- if ($mirror) {
- $mir = $this->getMirror($mirror);
- if (!$mir) {
- return false;
- }
-
- $rest = $mir['rest'];
- } else {
- $rest = $this->_channelInfo['servers']['primary']['rest'];
- }
-
- if (!isset($rest['baseurl'][0])) {
- $rest['baseurl'] = array($rest['baseurl']);
- }
-
- foreach ($rest['baseurl'] as $baseurl) {
- if (strtolower($baseurl['attribs']['type']) == strtolower($resourceType)) {
- return $baseurl['_content'];
- }
- }
-
- return false;
- }
-
- /**
- * Since REST does not implement RPC, provide this as a logical wrapper around
- * resetFunctions for REST
- * @param string|false mirror name, if any
- */
- function resetREST($mirror = false)
- {
- return $this->resetFunctions('rest', $mirror);
- }
-
- /**
- * Empty all protocol definitions
- * @param string protocol type
- * @param string|false mirror name, if any
- */
- function resetFunctions($type, $mirror = false)
- {
- if ($mirror) {
- if (isset($this->_channelInfo['servers']['mirror'])) {
- $mirrors = $this->_channelInfo['servers']['mirror'];
- if (!isset($mirrors[0])) {
- $mirrors = array($mirrors);
- }
-
- foreach ($mirrors as $i => $mir) {
- if ($mir['attribs']['host'] == $mirror) {
- if (isset($this->_channelInfo['servers']['mirror'][$i][$type])) {
- unset($this->_channelInfo['servers']['mirror'][$i][$type]);
- }
-
- return true;
- }
- }
-
- return false;
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary'][$type])) {
- unset($this->_channelInfo['servers']['primary'][$type]);
- }
-
- return true;
- }
-
- /**
- * Set a channel's protocols to the protocols supported by pearweb
- */
- function setDefaultPEARProtocols($version = '1.0', $mirror = false)
- {
- switch ($version) {
- case '1.0' :
- $this->resetREST($mirror);
-
- if (!isset($this->_channelInfo['servers'])) {
- $this->_channelInfo['servers'] = array('primary' =>
- array('rest' => array()));
- } elseif (!isset($this->_channelInfo['servers']['primary'])) {
- $this->_channelInfo['servers']['primary'] = array('rest' => array());
- }
-
- return true;
- break;
- default :
- return false;
- break;
- }
- }
-
- /**
- * @return array
- */
- function getMirrors()
- {
- if (isset($this->_channelInfo['servers']['mirror'])) {
- $mirrors = $this->_channelInfo['servers']['mirror'];
- if (!isset($mirrors[0])) {
- $mirrors = array($mirrors);
- }
-
- return $mirrors;
- }
-
- return array();
- }
-
- /**
- * Get the unserialized XML representing a mirror
- * @return array|false
- */
- function getMirror($server)
- {
- foreach ($this->getMirrors() as $mirror) {
- if ($mirror['attribs']['host'] == $server) {
- return $mirror;
- }
- }
-
- return false;
- }
-
- /**
- * @param string
- * @return string|false
- * @error PEAR_CHANNELFILE_ERROR_NO_NAME
- * @error PEAR_CHANNELFILE_ERROR_INVALID_NAME
- */
- function setName($name)
- {
- return $this->setServer($name);
- }
-
- /**
- * Set the socket number (port) that is used to connect to this channel
- * @param integer
- * @param string|false name of the mirror server, or false for the primary
- */
- function setPort($port, $mirror = false)
- {
- if ($mirror) {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $this->_channelInfo['servers']['mirror'][$i]['attribs']['port'] = $port;
- return true;
- }
- }
-
- return false;
- } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- $this->_channelInfo['servers']['mirror']['attribs']['port'] = $port;
- $this->_isValid = false;
- return true;
- }
- }
-
- $this->_channelInfo['servers']['primary']['attribs']['port'] = $port;
- $this->_isValid = false;
- return true;
- }
-
- /**
- * Set the socket number (port) that is used to connect to this channel
- * @param bool Determines whether to turn on SSL support or turn it off
- * @param string|false name of the mirror server, or false for the primary
- */
- function setSSL($ssl = true, $mirror = false)
- {
- if ($mirror) {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- if (!$ssl) {
- if (isset($this->_channelInfo['servers']['mirror'][$i]
- ['attribs']['ssl'])) {
- unset($this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl']);
- }
- } else {
- $this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl'] = 'yes';
- }
-
- return true;
- }
- }
-
- return false;
- } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- if (!$ssl) {
- if (isset($this->_channelInfo['servers']['mirror']['attribs']['ssl'])) {
- unset($this->_channelInfo['servers']['mirror']['attribs']['ssl']);
- }
- } else {
- $this->_channelInfo['servers']['mirror']['attribs']['ssl'] = 'yes';
- }
-
- $this->_isValid = false;
- return true;
- }
- }
-
- if ($ssl) {
- $this->_channelInfo['servers']['primary']['attribs']['ssl'] = 'yes';
- } else {
- if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) {
- unset($this->_channelInfo['servers']['primary']['attribs']['ssl']);
- }
- }
-
- $this->_isValid = false;
- return true;
- }
-
- /**
- * @param string
- * @return string|false
- * @error PEAR_CHANNELFILE_ERROR_NO_SERVER
- * @error PEAR_CHANNELFILE_ERROR_INVALID_SERVER
- */
- function setServer($server, $mirror = false)
- {
- if (empty($server)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SERVER);
- return false;
- } elseif (!$this->validChannelServer($server)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'name', 'name' => $server));
- return false;
- }
-
- if ($mirror) {
- $found = false;
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $found = true;
- break;
- }
- }
-
- if (!$found) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $this->_channelInfo['mirror'][$i]['attribs']['host'] = $server;
- return true;
- }
-
- $this->_channelInfo['name'] = $server;
- return true;
- }
-
- /**
- * @param string
- * @return boolean success
- * @error PEAR_CHANNELFILE_ERROR_NO_SUMMARY
- * @warning PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY
- */
- function setSummary($summary)
- {
- if (empty($summary)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY);
- return false;
- } elseif (strpos(trim($summary), "\n") !== false) {
- $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY,
- array('summary' => $summary));
- }
-
- $this->_channelInfo['summary'] = $summary;
- return true;
- }
-
- /**
- * @param string
- * @param boolean determines whether the alias is in channel.xml or local
- * @return boolean success
- */
- function setAlias($alias, $local = false)
- {
- if (!$this->validChannelServer($alias)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'suggestedalias', 'name' => $alias));
- return false;
- }
-
- if ($local) {
- $this->_channelInfo['localalias'] = $alias;
- } else {
- $this->_channelInfo['suggestedalias'] = $alias;
- }
-
- return true;
- }
-
- /**
- * @return string
- */
- function getAlias()
- {
- if (isset($this->_channelInfo['localalias'])) {
- return $this->_channelInfo['localalias'];
- }
- if (isset($this->_channelInfo['suggestedalias'])) {
- return $this->_channelInfo['suggestedalias'];
- }
- if (isset($this->_channelInfo['name'])) {
- return $this->_channelInfo['name'];
- }
- return '';
- }
-
- /**
- * Set the package validation object if it differs from PEAR's default
- * The class must be includeable via changing _ in the classname to path separator,
- * but no checking of this is made.
- * @param string|false pass in false to reset to the default packagename regex
- * @return boolean success
- */
- function setValidationPackage($validateclass, $version)
- {
- if (empty($validateclass)) {
- unset($this->_channelInfo['validatepackage']);
- }
- $this->_channelInfo['validatepackage'] = array('_content' => $validateclass);
- $this->_channelInfo['validatepackage']['attribs'] = array('version' => $version);
- }
-
- /**
- * Add a protocol to the provides section
- * @param string protocol type
- * @param string protocol version
- * @param string protocol name, if any
- * @param string mirror name, if this is a mirror's protocol
- * @return bool
- */
- function addFunction($type, $version, $name = '', $mirror = false)
- {
- if ($mirror) {
- return $this->addMirrorFunction($mirror, $type, $version, $name);
- }
-
- $set = array('attribs' => array('version' => $version), '_content' => $name);
- if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) {
- if (!isset($this->_channelInfo['servers'])) {
- $this->_channelInfo['servers'] = array('primary' =>
- array($type => array()));
- } elseif (!isset($this->_channelInfo['servers']['primary'])) {
- $this->_channelInfo['servers']['primary'] = array($type => array());
- }
-
- $this->_channelInfo['servers']['primary'][$type]['function'] = $set;
- $this->_isValid = false;
- return true;
- } elseif (!isset($this->_channelInfo['servers']['primary'][$type]['function'][0])) {
- $this->_channelInfo['servers']['primary'][$type]['function'] = array(
- $this->_channelInfo['servers']['primary'][$type]['function']);
- }
-
- $this->_channelInfo['servers']['primary'][$type]['function'][] = $set;
- return true;
- }
- /**
- * Add a protocol to a mirror's provides section
- * @param string mirror name (server)
- * @param string protocol type
- * @param string protocol version
- * @param string protocol name, if any
- */
- function addMirrorFunction($mirror, $type, $version, $name = '')
- {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $setmirror = false;
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $setmirror = &$this->_channelInfo['servers']['mirror'][$i];
- break;
- }
- }
- } else {
- if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- $setmirror = &$this->_channelInfo['servers']['mirror'];
- }
- }
-
- if (!$setmirror) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $set = array('attribs' => array('version' => $version), '_content' => $name);
- if (!isset($setmirror[$type]['function'])) {
- $setmirror[$type]['function'] = $set;
- $this->_isValid = false;
- return true;
- } elseif (!isset($setmirror[$type]['function'][0])) {
- $setmirror[$type]['function'] = array($setmirror[$type]['function']);
- }
-
- $setmirror[$type]['function'][] = $set;
- $this->_isValid = false;
- return true;
- }
-
- /**
- * @param string Resource Type this url links to
- * @param string URL
- * @param string|false mirror name, if this is not a primary server REST base URL
- */
- function setBaseURL($resourceType, $url, $mirror = false)
- {
- if ($mirror) {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $setmirror = false;
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $setmirror = &$this->_channelInfo['servers']['mirror'][$i];
- break;
- }
- }
- } else {
- if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- $setmirror = &$this->_channelInfo['servers']['mirror'];
- }
- }
- } else {
- $setmirror = &$this->_channelInfo['servers']['primary'];
- }
-
- $set = array('attribs' => array('type' => $resourceType), '_content' => $url);
- if (!isset($setmirror['rest'])) {
- $setmirror['rest'] = array();
- }
-
- if (!isset($setmirror['rest']['baseurl'])) {
- $setmirror['rest']['baseurl'] = $set;
- $this->_isValid = false;
- return true;
- } elseif (!isset($setmirror['rest']['baseurl'][0])) {
- $setmirror['rest']['baseurl'] = array($setmirror['rest']['baseurl']);
- }
-
- foreach ($setmirror['rest']['baseurl'] as $i => $url) {
- if ($url['attribs']['type'] == $resourceType) {
- $this->_isValid = false;
- $setmirror['rest']['baseurl'][$i] = $set;
- return true;
- }
- }
-
- $setmirror['rest']['baseurl'][] = $set;
- $this->_isValid = false;
- return true;
- }
-
- /**
- * @param string mirror server
- * @param int mirror http port
- * @return boolean
- */
- function addMirror($server, $port = null)
- {
- if ($this->_channelInfo['name'] == '__uri') {
- return false; // the __uri channel cannot have mirrors by definition
- }
-
- $set = array('attribs' => array('host' => $server));
- if (is_numeric($port)) {
- $set['attribs']['port'] = $port;
- }
-
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_channelInfo['servers']['mirror'] = $set;
- return true;
- }
-
- if (!isset($this->_channelInfo['servers']['mirror'][0])) {
- $this->_channelInfo['servers']['mirror'] =
- array($this->_channelInfo['servers']['mirror']);
- }
-
- $this->_channelInfo['servers']['mirror'][] = $set;
- return true;
- }
-
- /**
- * Retrieve the name of the validation package for this channel
- * @return string|false
- */
- function getValidationPackage()
- {
- if (!$this->_isValid && !$this->validate()) {
- return false;
- }
-
- if (!isset($this->_channelInfo['validatepackage'])) {
- return array('attribs' => array('version' => 'default'),
- '_content' => 'PEAR_Validate');
- }
-
- return $this->_channelInfo['validatepackage'];
- }
-
- /**
- * Retrieve the object that can be used for custom validation
- * @param string|false the name of the package to validate. If the package is
- * the channel validation package, PEAR_Validate is returned
- * @return PEAR_Validate|false false is returned if the validation package
- * cannot be located
- */
- function &getValidationObject($package = false)
- {
- if (!class_exists('PEAR_Validate')) {
- require_once 'PEAR/Validate.php';
- }
-
- if (!$this->_isValid) {
- if (!$this->validate()) {
- $a = false;
- return $a;
- }
- }
-
- if (isset($this->_channelInfo['validatepackage'])) {
- if ($package == $this->_channelInfo['validatepackage']) {
- // channel validation packages are always validated by PEAR_Validate
- $val = new PEAR_Validate;
- return $val;
- }
-
- if (!class_exists(str_replace('.', '_',
- $this->_channelInfo['validatepackage']['_content']))) {
- if ($this->isIncludeable(str_replace('_', '/',
- $this->_channelInfo['validatepackage']['_content']) . '.php')) {
- include_once str_replace('_', '/',
- $this->_channelInfo['validatepackage']['_content']) . '.php';
- $vclass = str_replace('.', '_',
- $this->_channelInfo['validatepackage']['_content']);
- $val = new $vclass;
- } else {
- $a = false;
- return $a;
- }
- } else {
- $vclass = str_replace('.', '_',
- $this->_channelInfo['validatepackage']['_content']);
- $val = new $vclass;
- }
- } else {
- $val = new PEAR_Validate;
- }
-
- return $val;
- }
-
- function isIncludeable($path)
- {
- $possibilities = explode(PATH_SEPARATOR, ini_get('include_path'));
- foreach ($possibilities as $dir) {
- if (file_exists($dir . DIRECTORY_SEPARATOR . $path)
- && is_readable($dir . DIRECTORY_SEPARATOR . $path)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * This function is used by the channel updater and retrieves a value set by
- * the registry, or the current time if it has not been set
- * @return string
- */
- function lastModified()
- {
- if (isset($this->_channelInfo['_lastmodified'])) {
- return $this->_channelInfo['_lastmodified'];
- }
-
- return time();
- }
-}
-
-/**
- * PEAR_Command, command pattern class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * Needed for error handling
- */
-require_once 'PEAR.php';
-require_once 'PEAR/Frontend.php';
-require_once 'PEAR/XMLParser.php';
-
-/**
- * List of commands and what classes they are implemented in.
- * @var array command => implementing class
- */
-$GLOBALS['_PEAR_Command_commandlist'] = array();
-
-/**
- * List of commands and their descriptions
- * @var array command => description
- */
-$GLOBALS['_PEAR_Command_commanddesc'] = array();
-
-/**
- * List of shortcuts to common commands.
- * @var array shortcut => command
- */
-$GLOBALS['_PEAR_Command_shortcuts'] = array();
-
-/**
- * Array of command objects
- * @var array class => object
- */
-$GLOBALS['_PEAR_Command_objects'] = array();
-
-/**
- * PEAR command class, a simple factory class for administrative
- * commands.
- *
- * How to implement command classes:
- *
- * - The class must be called PEAR_Command_Nnn, installed in the
- * "PEAR/Common" subdir, with a method called getCommands() that
- * returns an array of the commands implemented by the class (see
- * PEAR/Command/Install.php for an example).
- *
- * - The class must implement a run() function that is called with three
- * params:
- *
- * (string) command name
- * (array) assoc array with options, freely defined by each
- * command, for example:
- * array('force' => true)
- * (array) list of the other parameters
- *
- * The run() function returns a PEAR_CommandResponse object. Use
- * these methods to get information:
- *
- * int getStatus() Returns PEAR_COMMAND_(SUCCESS|FAILURE|PARTIAL)
- * *_PARTIAL means that you need to issue at least
- * one more command to complete the operation
- * (used for example for validation steps).
- *
- * string getMessage() Returns a message for the user. Remember,
- * no HTML or other interface-specific markup.
- *
- * If something unexpected happens, run() returns a PEAR error.
- *
- * - DON'T OUTPUT ANYTHING! Return text for output instead.
- *
- * - DON'T USE HTML! The text you return will be used from both Gtk,
- * web and command-line interfaces, so for now, keep everything to
- * plain text.
- *
- * - DON'T USE EXIT OR DIE! Always use pear errors. From static
- * classes do PEAR::raiseError(), from other classes do
- * $this->raiseError().
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command
-{
- // {{{ factory()
-
- /**
- * Get the right object for executing a command.
- *
- * @param string $command The name of the command
- * @param object $config Instance of PEAR_Config object
- *
- * @return object the command object or a PEAR error
- *
- * @access public
- * @static
- */
- function &factory($command, &$config)
- {
- if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
- PEAR_Command::registerCommands();
- }
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
- $command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
- }
- if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
- $a = PEAR::raiseError("unknown command `$command'");
- return $a;
- }
- $class = $GLOBALS['_PEAR_Command_commandlist'][$command];
- if (!class_exists($class)) {
- require_once $GLOBALS['_PEAR_Command_objects'][$class];
- }
- if (!class_exists($class)) {
- $a = PEAR::raiseError("unknown command `$command'");
- return $a;
- }
- $ui =& PEAR_Command::getFrontendObject();
- $obj = new $class($ui, $config);
- return $obj;
- }
-
- // }}}
- // {{{ & getObject()
- function &getObject($command)
- {
- $class = $GLOBALS['_PEAR_Command_commandlist'][$command];
- if (!class_exists($class)) {
- require_once $GLOBALS['_PEAR_Command_objects'][$class];
- }
- if (!class_exists($class)) {
- return PEAR::raiseError("unknown command `$command'");
- }
- $ui =& PEAR_Command::getFrontendObject();
- $config = &PEAR_Config::singleton();
- $obj = new $class($ui, $config);
- return $obj;
- }
-
- // }}}
- // {{{ & getFrontendObject()
-
- /**
- * Get instance of frontend object.
- *
- * @return object|PEAR_Error
- * @static
- */
- function &getFrontendObject()
- {
- $a = &PEAR_Frontend::singleton();
- return $a;
- }
-
- // }}}
- // {{{ & setFrontendClass()
-
- /**
- * Load current frontend class.
- *
- * @param string $uiclass Name of class implementing the frontend
- *
- * @return object the frontend object, or a PEAR error
- * @static
- */
- function &setFrontendClass($uiclass)
- {
- $a = &PEAR_Frontend::setFrontendClass($uiclass);
- return $a;
- }
-
- // }}}
- // {{{ setFrontendType()
-
- /**
- * Set current frontend.
- *
- * @param string $uitype Name of the frontend type (for example "CLI")
- *
- * @return object the frontend object, or a PEAR error
- * @static
- */
- function setFrontendType($uitype)
- {
- $uiclass = 'PEAR_Frontend_' . $uitype;
- return PEAR_Command::setFrontendClass($uiclass);
- }
-
- // }}}
- // {{{ registerCommands()
-
- /**
- * Scan through the Command directory looking for classes
- * and see what commands they implement.
- *
- * @param bool (optional) if FALSE (default), the new list of
- * commands should replace the current one. If TRUE,
- * new entries will be merged with old.
- *
- * @param string (optional) where (what directory) to look for
- * classes, defaults to the Command subdirectory of
- * the directory from where this file (__FILE__) is
- * included.
- *
- * @return bool TRUE on success, a PEAR error on failure
- *
- * @access public
- * @static
- */
- function registerCommands($merge = false, $dir = null)
- {
- $parser = new PEAR_XMLParser;
- if ($dir === null) {
- $dir = dirname(__FILE__) . '/Command';
- }
- if (!is_dir($dir)) {
- return PEAR::raiseError("registerCommands: opendir($dir) '$dir' does not exist or is not a directory");
- }
- $dp = @opendir($dir);
- if (empty($dp)) {
- return PEAR::raiseError("registerCommands: opendir($dir) failed");
- }
- if (!$merge) {
- $GLOBALS['_PEAR_Command_commandlist'] = array();
- }
-
- while ($file = readdir($dp)) {
- if ($file{0} == '.' || substr($file, -4) != '.xml') {
- continue;
- }
-
- $f = substr($file, 0, -4);
- $class = "PEAR_Command_" . $f;
- // List of commands
- if (empty($GLOBALS['_PEAR_Command_objects'][$class])) {
- $GLOBALS['_PEAR_Command_objects'][$class] = "$dir/" . $f . '.php';
- }
-
- $parser->parse(file_get_contents("$dir/$file"));
- $implements = $parser->getData();
- foreach ($implements as $command => $desc) {
- if ($command == 'attribs') {
- continue;
- }
-
- if (isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
- return PEAR::raiseError('Command "' . $command . '" already registered in ' .
- 'class "' . $GLOBALS['_PEAR_Command_commandlist'][$command] . '"');
- }
-
- $GLOBALS['_PEAR_Command_commandlist'][$command] = $class;
- $GLOBALS['_PEAR_Command_commanddesc'][$command] = $desc['summary'];
- if (isset($desc['shortcut'])) {
- $shortcut = $desc['shortcut'];
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$shortcut])) {
- return PEAR::raiseError('Command shortcut "' . $shortcut . '" already ' .
- 'registered to command "' . $command . '" in class "' .
- $GLOBALS['_PEAR_Command_commandlist'][$command] . '"');
- }
- $GLOBALS['_PEAR_Command_shortcuts'][$shortcut] = $command;
- }
-
- if (isset($desc['options']) && $desc['options']) {
- foreach ($desc['options'] as $oname => $option) {
- if (isset($option['shortopt']) && strlen($option['shortopt']) > 1) {
- return PEAR::raiseError('Option "' . $oname . '" short option "' .
- $option['shortopt'] . '" must be ' .
- 'only 1 character in Command "' . $command . '" in class "' .
- $class . '"');
- }
- }
- }
- }
- }
-
- ksort($GLOBALS['_PEAR_Command_shortcuts']);
- ksort($GLOBALS['_PEAR_Command_commandlist']);
- @closedir($dp);
- return true;
- }
-
- // }}}
- // {{{ getCommands()
-
- /**
- * Get the list of currently supported commands, and what
- * classes implement them.
- *
- * @return array command => implementing class
- *
- * @access public
- * @static
- */
- function getCommands()
- {
- if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
- PEAR_Command::registerCommands();
- }
- return $GLOBALS['_PEAR_Command_commandlist'];
- }
-
- // }}}
- // {{{ getShortcuts()
-
- /**
- * Get the list of command shortcuts.
- *
- * @return array shortcut => command
- *
- * @access public
- * @static
- */
- function getShortcuts()
- {
- if (empty($GLOBALS['_PEAR_Command_shortcuts'])) {
- PEAR_Command::registerCommands();
- }
- return $GLOBALS['_PEAR_Command_shortcuts'];
- }
-
- // }}}
- // {{{ getGetoptArgs()
-
- /**
- * Compiles arguments for getopt.
- *
- * @param string $command command to get optstring for
- * @param string $short_args (reference) short getopt format
- * @param array $long_args (reference) long getopt format
- *
- * @return void
- *
- * @access public
- * @static
- */
- function getGetoptArgs($command, &$short_args, &$long_args)
- {
- if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
- PEAR_Command::registerCommands();
- }
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
- $command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
- }
- if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
- return null;
- }
- $obj = &PEAR_Command::getObject($command);
- return $obj->getGetoptArgs($command, $short_args, $long_args);
- }
-
- // }}}
- // {{{ getDescription()
-
- /**
- * Get description for a command.
- *
- * @param string $command Name of the command
- *
- * @return string command description
- *
- * @access public
- * @static
- */
- function getDescription($command)
- {
- if (!isset($GLOBALS['_PEAR_Command_commanddesc'][$command])) {
- return null;
- }
- return $GLOBALS['_PEAR_Command_commanddesc'][$command];
- }
-
- // }}}
- // {{{ getHelp()
-
- /**
- * Get help for command.
- *
- * @param string $command Name of the command to return help for
- *
- * @access public
- * @static
- */
- function getHelp($command)
- {
- $cmds = PEAR_Command::getCommands();
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
- $command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
- }
- if (isset($cmds[$command])) {
- $obj = &PEAR_Command::getObject($command);
- return $obj->getHelp($command);
- }
- return false;
- }
- // }}}
-}
-/**
- * PEAR_Common, the base class for the PEAR Installer
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1.0
- * @deprecated File deprecated since Release 1.4.0a1
- */
-
-/**
- * Include error handling
- */
-require_once 'PEAR.php';
-
-/**
- * PEAR_Common error when an invalid PHP file is passed to PEAR_Common::analyzeSourceCode()
- */
-define('PEAR_COMMON_ERROR_INVALIDPHP', 1);
-define('_PEAR_COMMON_PACKAGE_NAME_PREG', '[A-Za-z][a-zA-Z0-9_]+');
-define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/');
-
-// this should allow: 1, 1.0, 1.0RC1, 1.0dev, 1.0dev123234234234, 1.0a1, 1.0b1, 1.0pl1
-define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?');
-define('PEAR_COMMON_PACKAGE_VERSION_PREG', '/^' . _PEAR_COMMON_PACKAGE_VERSION_PREG . '\\z/i');
-
-// XXX far from perfect :-)
-define('_PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '(' . _PEAR_COMMON_PACKAGE_NAME_PREG .
- ')(-([.0-9a-zA-Z]+))?');
-define('PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_PACKAGE_DOWNLOAD_PREG .
- '\\z/');
-
-define('_PEAR_CHANNELS_NAME_PREG', '[A-Za-z][a-zA-Z0-9\.]+');
-define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '\\z/');
-
-// this should allow any dns or IP address, plus a path - NO UNDERSCORES ALLOWED
-define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*(\/[a-zA-Z0-9\-]+)*');
-define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '\\z/i');
-
-define('_PEAR_CHANNELS_PACKAGE_PREG', '(' ._PEAR_CHANNELS_SERVER_PREG . ')\/('
- . _PEAR_COMMON_PACKAGE_NAME_PREG . ')');
-define('PEAR_CHANNELS_PACKAGE_PREG', '/^' . _PEAR_CHANNELS_PACKAGE_PREG . '\\z/i');
-
-define('_PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '(' . _PEAR_CHANNELS_NAME_PREG . ')::('
- . _PEAR_COMMON_PACKAGE_NAME_PREG . ')(-([.0-9a-zA-Z]+))?');
-define('PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_CHANNEL_DOWNLOAD_PREG . '\\z/');
-
-/**
- * List of temporary files and directories registered by
- * PEAR_Common::addTempFile().
- * @var array
- */
-$GLOBALS['_PEAR_Common_tempfiles'] = array();
-
-/**
- * Valid maintainer roles
- * @var array
- */
-$GLOBALS['_PEAR_Common_maintainer_roles'] = array('lead','developer','contributor','helper');
-
-/**
- * Valid release states
- * @var array
- */
-$GLOBALS['_PEAR_Common_release_states'] = array('alpha','beta','stable','snapshot','devel');
-
-/**
- * Valid dependency types
- * @var array
- */
-$GLOBALS['_PEAR_Common_dependency_types'] = array('pkg','ext','php','prog','ldlib','rtlib','os','websrv','sapi');
-
-/**
- * Valid dependency relations
- * @var array
- */
-$GLOBALS['_PEAR_Common_dependency_relations'] = array('has','eq','lt','le','gt','ge','not', 'ne');
-
-/**
- * Valid file roles
- * @var array
- */
-$GLOBALS['_PEAR_Common_file_roles'] = array('php','ext','test','doc','data','src','script');
-
-/**
- * Valid replacement types
- * @var array
- */
-$GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config', 'package-info');
-
-/**
- * Valid "provide" types
- * @var array
- */
-$GLOBALS['_PEAR_Common_provide_types'] = array('ext', 'prog', 'class', 'function', 'feature', 'api');
-
-/**
- * Valid "provide" types
- * @var array
- */
-$GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'pre-uninstall', 'post-uninstall', 'pre-build', 'post-build', 'pre-configure', 'post-configure', 'pre-setup', 'post-setup');
-
-/**
- * Class providing common functionality for PEAR administration classes.
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- * @deprecated This class will disappear, and its components will be spread
- * into smaller classes, like the AT&T breakup, as of Release 1.4.0a1
- */
-class PEAR_Common extends PEAR
-{
- /**
- * User Interface object (PEAR_Frontend_* class). If null,
- * the log() method uses print.
- * @var object
- */
- var $ui = null;
-
- /**
- * Configuration object (PEAR_Config).
- * @var PEAR_Config
- */
- var $config = null;
-
- /** stack of elements, gives some sort of XML context */
- var $element_stack = array();
-
- /** name of currently parsed XML element */
- var $current_element;
-
- /** array of attributes of the currently parsed XML element */
- var $current_attributes = array();
-
- /** assoc with information about a package */
- var $pkginfo = array();
-
- var $current_path = null;
-
- /**
- * Flag variable used to mark a valid package file
- * @var boolean
- * @access private
- */
- var $_validPackageFile;
-
- /**
- * PEAR_Common constructor
- *
- * @access public
- */
- function __construct()
- {
- parent::__construct();
- $this->config = &PEAR_Config::singleton();
- $this->debug = $this->config->get('verbose');
- }
-
- /**
- * PEAR_Common destructor
- *
- * @access private
- */
- function _PEAR_Common()
- {
- // doesn't work due to bug #14744
- //$tempfiles = $this->_tempfiles;
- $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles'];
- while ($file = array_shift($tempfiles)) {
- if (@is_dir($file)) {
- if (!class_exists('System')) {
- require_once 'System.php';
- }
-
- System::rm(array('-rf', $file));
- } elseif (file_exists($file)) {
- unlink($file);
- }
- }
- }
-
- /**
- * Register a temporary file or directory. When the destructor is
- * executed, all registered temporary files and directories are
- * removed.
- *
- * @param string $file name of file or directory
- *
- * @return void
- *
- * @access public
- */
- function addTempFile($file)
- {
- if (!class_exists('PEAR_Frontend')) {
- require_once 'PEAR/Frontend.php';
- }
- PEAR_Frontend::addTempFile($file);
- }
-
- /**
- * Wrapper to System::mkDir(), creates a directory as well as
- * any necessary parent directories.
- *
- * @param string $dir directory name
- *
- * @return bool TRUE on success, or a PEAR error
- *
- * @access public
- */
- function mkDirHier($dir)
- {
- // Only used in Installer - move it there ?
- $this->log(2, "+ create dir $dir");
- if (!class_exists('System')) {
- require_once 'System.php';
- }
- return System::mkDir(array('-p', $dir));
- }
-
- /**
- * Logging method.
- *
- * @param int $level log level (0 is quiet, higher is noisier)
- * @param string $msg message to write to the log
- *
- * @return void
- *
- * @access public
- * @static
- */
- function log($level, $msg, $append_crlf = true)
- {
- if ($this->debug >= $level) {
- if (!class_exists('PEAR_Frontend')) {
- require_once 'PEAR/Frontend.php';
- }
-
- $ui = &PEAR_Frontend::singleton();
- if (is_a($ui, 'PEAR_Frontend')) {
- $ui->log($msg, $append_crlf);
- } else {
- print "$msg\n";
- }
- }
- }
-
- /**
- * Create and register a temporary directory.
- *
- * @param string $tmpdir (optional) Directory to use as tmpdir.
- * Will use system defaults (for example
- * /tmp or c:\windows\temp) if not specified
- *
- * @return string name of created directory
- *
- * @access public
- */
- function mkTempDir($tmpdir = '')
- {
- $topt = $tmpdir ? array('-t', $tmpdir) : array();
- $topt = array_merge($topt, array('-d', 'pear'));
- if (!class_exists('System')) {
- require_once 'System.php';
- }
-
- if (!$tmpdir = System::mktemp($topt)) {
- return false;
- }
-
- $this->addTempFile($tmpdir);
- return $tmpdir;
- }
-
- /**
- * Set object that represents the frontend to be used.
- *
- * @param object Reference of the frontend object
- * @return void
- * @access public
- */
- function setFrontendObject(&$ui)
- {
- $this->ui = &$ui;
- }
-
- /**
- * Return an array containing all of the states that are more stable than
- * or equal to the passed in state
- *
- * @param string Release state
- * @param boolean Determines whether to include $state in the list
- * @return false|array False if $state is not a valid release state
- */
- function betterStates($state, $include = false)
- {
- static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- $i = array_search($state, $states);
- if ($i === false) {
- return false;
- }
- if ($include) {
- $i--;
- }
- return array_slice($states, $i + 1);
- }
-
- /**
- * Get the valid roles for a PEAR package maintainer
- *
- * @return array
- * @static
- */
- function getUserRoles()
- {
- return $GLOBALS['_PEAR_Common_maintainer_roles'];
- }
-
- /**
- * Get the valid package release states of packages
- *
- * @return array
- * @static
- */
- function getReleaseStates()
- {
- return $GLOBALS['_PEAR_Common_release_states'];
- }
-
- /**
- * Get the implemented dependency types (php, ext, pkg etc.)
- *
- * @return array
- * @static
- */
- function getDependencyTypes()
- {
- return $GLOBALS['_PEAR_Common_dependency_types'];
- }
-
- /**
- * Get the implemented dependency relations (has, lt, ge etc.)
- *
- * @return array
- * @static
- */
- function getDependencyRelations()
- {
- return $GLOBALS['_PEAR_Common_dependency_relations'];
- }
-
- /**
- * Get the implemented file roles
- *
- * @return array
- * @static
- */
- function getFileRoles()
- {
- return $GLOBALS['_PEAR_Common_file_roles'];
- }
-
- /**
- * Get the implemented file replacement types in
- *
- * @return array
- * @static
- */
- function getReplacementTypes()
- {
- return $GLOBALS['_PEAR_Common_replacement_types'];
- }
-
- /**
- * Get the implemented file replacement types in
- *
- * @return array
- * @static
- */
- function getProvideTypes()
- {
- return $GLOBALS['_PEAR_Common_provide_types'];
- }
-
- /**
- * Get the implemented file replacement types in
- *
- * @return array
- * @static
- */
- function getScriptPhases()
- {
- return $GLOBALS['_PEAR_Common_script_phases'];
- }
-
- /**
- * Test whether a string contains a valid package name.
- *
- * @param string $name the package name to test
- *
- * @return bool
- *
- * @access public
- */
- function validPackageName($name)
- {
- return (bool)preg_match(PEAR_COMMON_PACKAGE_NAME_PREG, $name);
- }
-
- /**
- * Test whether a string contains a valid package version.
- *
- * @param string $ver the package version to test
- *
- * @return bool
- *
- * @access public
- */
- function validPackageVersion($ver)
- {
- return (bool)preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver);
- }
-
- /**
- * @param string $path relative or absolute include path
- * @return boolean
- * @static
- */
- function isIncludeable($path)
- {
- if (file_exists($path) && is_readable($path)) {
- return true;
- }
-
- $ipath = explode(PATH_SEPARATOR, ini_get('include_path'));
- foreach ($ipath as $include) {
- $test = realpath($include . DIRECTORY_SEPARATOR . $path);
- if (file_exists($test) && is_readable($test)) {
- return true;
- }
- }
-
- return false;
- }
-
- function _postProcessChecks($pf)
- {
- if (!PEAR::isError($pf)) {
- return $this->_postProcessValidPackagexml($pf);
- }
-
- $errs = $pf->getUserinfo();
- if (is_array($errs)) {
- foreach ($errs as $error) {
- $e = $this->raiseError($error['message'], $error['code'], null, null, $error);
- }
- }
-
- return $pf;
- }
-
- /**
- * Returns information about a package file. Expects the name of
- * a gzipped tar file as input.
- *
- * @param string $file name of .tgz file
- *
- * @return array array with package information
- *
- * @access public
- * @deprecated use PEAR_PackageFile->fromTgzFile() instead
- *
- */
- function infoFromTgzFile($file)
- {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL);
- return $this->_postProcessChecks($pf);
- }
-
- /**
- * Returns information about a package file. Expects the name of
- * a package xml file as input.
- *
- * @param string $descfile name of package xml file
- *
- * @return array array with package information
- *
- * @access public
- * @deprecated use PEAR_PackageFile->fromPackageFile() instead
- *
- */
- function infoFromDescriptionFile($descfile)
- {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
- return $this->_postProcessChecks($pf);
- }
-
- /**
- * Returns information about a package file. Expects the contents
- * of a package xml file as input.
- *
- * @param string $data contents of package.xml file
- *
- * @return array array with package information
- *
- * @access public
- * @deprecated use PEAR_PackageFile->fromXmlstring() instead
- *
- */
- function infoFromString($data)
- {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromXmlString($data, PEAR_VALIDATE_NORMAL, false);
- return $this->_postProcessChecks($pf);
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return array
- */
- function _postProcessValidPackagexml(&$pf)
- {
- if (!is_a($pf, 'PEAR_PackageFile_v2')) {
- $this->pkginfo = $pf->toArray();
- return $this->pkginfo;
- }
-
- // sort of make this into a package.xml 1.0-style array
- // changelog is not converted to old format.
- $arr = $pf->toArray(true);
- $arr = array_merge($arr, $arr['old']);
- unset($arr['old'], $arr['xsdversion'], $arr['contents'], $arr['compatible'],
- $arr['channel'], $arr['uri'], $arr['dependencies'], $arr['phprelease'],
- $arr['extsrcrelease'], $arr['zendextsrcrelease'], $arr['extbinrelease'],
- $arr['zendextbinrelease'], $arr['bundle'], $arr['lead'], $arr['developer'],
- $arr['helper'], $arr['contributor']);
- $arr['filelist'] = $pf->getFilelist();
- $this->pkginfo = $arr;
- return $arr;
- }
-
- /**
- * Returns package information from different sources
- *
- * This method is able to extract information about a package
- * from a .tgz archive or from a XML package definition file.
- *
- * @access public
- * @param string Filename of the source ('package.xml', '<package>.tgz')
- * @return string
- * @deprecated use PEAR_PackageFile->fromAnyFile() instead
- */
- function infoFromAny($info)
- {
- if (is_string($info) && file_exists($info)) {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($pf)) {
- $errs = $pf->getUserinfo();
- if (is_array($errs)) {
- foreach ($errs as $error) {
- $e = $this->raiseError($error['message'], $error['code'], null, null, $error);
- }
- }
-
- return $pf;
- }
-
- return $this->_postProcessValidPackagexml($pf);
- }
-
- return $info;
- }
-
- /**
- * Return an XML document based on the package info (as returned
- * by the PEAR_Common::infoFrom* methods).
- *
- * @param array $pkginfo package info
- *
- * @return string XML data
- *
- * @access public
- * @deprecated use a PEAR_PackageFile_v* object's generator instead
- */
- function xmlFromInfo($pkginfo)
- {
- $config = &PEAR_Config::singleton();
- $packagefile = new PEAR_PackageFile($config);
- $pf = &$packagefile->fromArray($pkginfo);
- $gen = &$pf->getDefaultGenerator();
- return $gen->toXml(PEAR_VALIDATE_PACKAGING);
- }
-
- /**
- * Validate XML package definition file.
- *
- * @param string $info Filename of the package archive or of the
- * package definition file
- * @param array $errors Array that will contain the errors
- * @param array $warnings Array that will contain the warnings
- * @param string $dir_prefix (optional) directory where source files
- * may be found, or empty if they are not available
- * @access public
- * @return boolean
- * @deprecated use the validation of PEAR_PackageFile objects
- */
- function validatePackageInfo($info, &$errors, &$warnings, $dir_prefix = '')
- {
- $config = &PEAR_Config::singleton();
- $packagefile = new PEAR_PackageFile($config);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (strpos($info, '<?xml') !== false) {
- $pf = &$packagefile->fromXmlString($info, PEAR_VALIDATE_NORMAL, '');
- } else {
- $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL);
- }
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf)) {
- $errs = $pf->getUserinfo();
- if (is_array($errs)) {
- foreach ($errs as $error) {
- if ($error['level'] == 'error') {
- $errors[] = $error['message'];
- } else {
- $warnings[] = $error['message'];
- }
- }
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Build a "provides" array from data returned by
- * analyzeSourceCode(). The format of the built array is like
- * this:
- *
- * array(
- * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'),
- * ...
- * )
- *
- *
- * @param array $srcinfo array with information about a source file
- * as returned by the analyzeSourceCode() method.
- *
- * @return void
- *
- * @access public
- *
- */
- function buildProvidesArray($srcinfo)
- {
- $file = basename($srcinfo['source_file']);
- $pn = '';
- if (isset($this->_packageName)) {
- $pn = $this->_packageName;
- }
-
- $pnl = strlen($pn);
- foreach ($srcinfo['declared_classes'] as $class) {
- $key = "class;$class";
- if (isset($this->pkginfo['provides'][$key])) {
- continue;
- }
-
- $this->pkginfo['provides'][$key] =
- array('file'=> $file, 'type' => 'class', 'name' => $class);
- if (isset($srcinfo['inheritance'][$class])) {
- $this->pkginfo['provides'][$key]['extends'] =
- $srcinfo['inheritance'][$class];
- }
- }
-
- foreach ($srcinfo['declared_methods'] as $class => $methods) {
- foreach ($methods as $method) {
- $function = "$class::$method";
- $key = "function;$function";
- if ($method{0} == '_' || !strcasecmp($method, $class) ||
- isset($this->pkginfo['provides'][$key])) {
- continue;
- }
-
- $this->pkginfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- foreach ($srcinfo['declared_functions'] as $function) {
- $key = "function;$function";
- if ($function{0} == '_' || isset($this->pkginfo['provides'][$key])) {
- continue;
- }
-
- if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {
- $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\"";
- }
-
- $this->pkginfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- /**
- * Analyze the source code of the given PHP file
- *
- * @param string Filename of the PHP file
- * @return mixed
- * @access public
- */
- function analyzeSourceCode($file)
- {
- if (!class_exists('PEAR_PackageFile_v2_Validator')) {
- require_once 'PEAR/PackageFile/v2/Validator.php';
- }
-
- $a = new PEAR_PackageFile_v2_Validator;
- return $a->analyzeSourceCode($file);
- }
-
- function detectDependencies($any, $status_callback = null)
- {
- if (!function_exists("token_get_all")) {
- return false;
- }
-
- if (PEAR::isError($info = $this->infoFromAny($any))) {
- return $this->raiseError($info);
- }
-
- if (!is_array($info)) {
- return false;
- }
-
- $deps = array();
- $used_c = $decl_c = $decl_f = $decl_m = array();
- foreach ($info['filelist'] as $file => $fa) {
- $tmp = $this->analyzeSourceCode($file);
- $used_c = @array_merge($used_c, $tmp['used_classes']);
- $decl_c = @array_merge($decl_c, $tmp['declared_classes']);
- $decl_f = @array_merge($decl_f, $tmp['declared_functions']);
- $decl_m = @array_merge($decl_m, $tmp['declared_methods']);
- $inheri = @array_merge($inheri, $tmp['inheritance']);
- }
-
- $used_c = array_unique($used_c);
- $decl_c = array_unique($decl_c);
- $undecl_c = array_diff($used_c, $decl_c);
-
- return array('used_classes' => $used_c,
- 'declared_classes' => $decl_c,
- 'declared_methods' => $decl_m,
- 'declared_functions' => $decl_f,
- 'undeclared_classes' => $undecl_c,
- 'inheritance' => $inheri,
- );
- }
-
- /**
- * Download a file through HTTP. Considers suggested file name in
- * Content-disposition: header and can run a callback function for
- * different events. The callback will be called with two
- * parameters: the callback type, and parameters. The implemented
- * callback types are:
- *
- * 'setup' called at the very beginning, parameter is a UI object
- * that should be used for all output
- * 'message' the parameter is a string with an informational message
- * 'saveas' may be used to save with a different file name, the
- * parameter is the filename that is about to be used.
- * If a 'saveas' callback returns a non-empty string,
- * that file name will be used as the filename instead.
- * Note that $save_dir will not be affected by this, only
- * the basename of the file.
- * 'start' download is starting, parameter is number of bytes
- * that are expected, or -1 if unknown
- * 'bytesread' parameter is the number of bytes read so far
- * 'done' download is complete, parameter is the total number
- * of bytes read
- * 'connfailed' if the TCP connection fails, this callback is called
- * with array(host,port,errno,errmsg)
- * 'writefailed' if writing to disk fails, this callback is called
- * with array(destfile,errmsg)
- *
- * If an HTTP proxy has been configured (http_proxy PEAR_Config
- * setting), the proxy will be used.
- *
- * @param string $url the URL to download
- * @param object $ui PEAR_Frontend_* instance
- * @param object $config PEAR_Config instance
- * @param string $save_dir (optional) directory to save file in
- * @param mixed $callback (optional) function/method to call for status
- * updates
- *
- * @return string Returns the full path of the downloaded file or a PEAR
- * error on failure. If the error is caused by
- * socket-related errors, the error object will
- * have the fsockopen error code available through
- * getCode().
- *
- * @access public
- * @deprecated in favor of PEAR_Downloader::downloadHttp()
- */
- function downloadHttp($url, &$ui, $save_dir = '.', $callback = null)
- {
- if (!class_exists('PEAR_Downloader')) {
- require_once 'PEAR/Downloader.php';
- }
- return PEAR_Downloader::downloadHttp($url, $ui, $save_dir, $callback);
- }
-}
-
-require_once 'PEAR/Config.php';
-require_once 'PEAR/PackageFile.php';
-
-/**
- * PEAR_Config, customized configuration handling for the PEAR Installer
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * Required for error handling
- */
-require_once 'PEAR.php';
-require_once 'PEAR/Registry.php';
-require_once 'PEAR/Installer/Role.php';
-require_once 'System.php';
-
-/**
- * Last created PEAR_Config instance.
- * @var object
- */
-$GLOBALS['_PEAR_Config_instance'] = null;
-if (!defined('PEAR_INSTALL_DIR') || !PEAR_INSTALL_DIR) {
- $PEAR_INSTALL_DIR = PHP_LIBDIR . DIRECTORY_SEPARATOR . 'pear';
-} else {
- $PEAR_INSTALL_DIR = PEAR_INSTALL_DIR;
-}
-
-// Below we define constants with default values for all configuration
-// parameters except username/password. All of them can have their
-// defaults set through environment variables. The reason we use the
-// PHP_ prefix is for some security, PHP protects environment
-// variables starting with PHP_*.
-
-// default channel and preferred mirror is based on whether we are invoked through
-// the "pear" or the "pecl" command
-if (!defined('PEAR_RUNTYPE')) {
- define('PEAR_RUNTYPE', 'pear');
-}
-
-if (PEAR_RUNTYPE == 'pear') {
- define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pear.php.net');
-} else {
- define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pecl.php.net');
-}
-
-if (getenv('PHP_PEAR_SYSCONF_DIR')) {
- define('PEAR_CONFIG_SYSCONFDIR', getenv('PHP_PEAR_SYSCONF_DIR'));
-} elseif (getenv('SystemRoot')) {
- define('PEAR_CONFIG_SYSCONFDIR', getenv('SystemRoot'));
-} else {
- define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR);
-}
-
-// Default for master_server
-if (getenv('PHP_PEAR_MASTER_SERVER')) {
- define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', getenv('PHP_PEAR_MASTER_SERVER'));
-} else {
- define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', 'pear.php.net');
-}
-
-// Default for http_proxy
-if (getenv('PHP_PEAR_HTTP_PROXY')) {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('PHP_PEAR_HTTP_PROXY'));
-} elseif (getenv('http_proxy')) {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('http_proxy'));
-} else {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', '');
-}
-
-// Default for php_dir
-if (getenv('PHP_PEAR_INSTALL_DIR')) {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', getenv('PHP_PEAR_INSTALL_DIR'));
-} else {
- if (@file_exists($PEAR_INSTALL_DIR) && is_dir($PEAR_INSTALL_DIR)) {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR);
- } else {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR);
- }
-}
-
-// Default for ext_dir
-if (getenv('PHP_PEAR_EXTENSION_DIR')) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR'));
-} else {
- if (ini_get('extension_dir')) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir'));
- } elseif (defined('PEAR_EXTENSION_DIR') &&
- file_exists(PEAR_EXTENSION_DIR) && is_dir(PEAR_EXTENSION_DIR)) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR);
- } elseif (defined('PHP_EXTENSION_DIR')) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR);
- } else {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.');
- }
-}
-
-// Default for doc_dir
-if (getenv('PHP_PEAR_DOC_DIR')) {
- define('PEAR_CONFIG_DEFAULT_DOC_DIR', getenv('PHP_PEAR_DOC_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_DOC_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'docs');
-}
-
-// Default for bin_dir
-if (getenv('PHP_PEAR_BIN_DIR')) {
- define('PEAR_CONFIG_DEFAULT_BIN_DIR', getenv('PHP_PEAR_BIN_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_BIN_DIR', PHP_BINDIR);
-}
-
-// Default for data_dir
-if (getenv('PHP_PEAR_DATA_DIR')) {
- define('PEAR_CONFIG_DEFAULT_DATA_DIR', getenv('PHP_PEAR_DATA_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_DATA_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data');
-}
-
-// Default for cfg_dir
-if (getenv('PHP_PEAR_CFG_DIR')) {
- define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_CFG_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg');
-}
-
-// Default for www_dir
-if (getenv('PHP_PEAR_WWW_DIR')) {
- define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_WWW_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www');
-}
-
-// Default for test_dir
-if (getenv('PHP_PEAR_TEST_DIR')) {
- define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_TEST_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests');
-}
-
-// Default for temp_dir
-if (getenv('PHP_PEAR_TEMP_DIR')) {
- define('PEAR_CONFIG_DEFAULT_TEMP_DIR', getenv('PHP_PEAR_TEMP_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_TEMP_DIR',
- System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'temp');
-}
-
-// Default for cache_dir
-if (getenv('PHP_PEAR_CACHE_DIR')) {
- define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_CACHE_DIR',
- System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'cache');
-}
-
-// Default for download_dir
-if (getenv('PHP_PEAR_DOWNLOAD_DIR')) {
- define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', getenv('PHP_PEAR_DOWNLOAD_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR',
- System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'download');
-}
-
-// Default for php_bin
-if (getenv('PHP_PEAR_PHP_BIN')) {
- define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN'));
-} else {
- define('PEAR_CONFIG_DEFAULT_PHP_BIN', PEAR_CONFIG_DEFAULT_BIN_DIR.
- DIRECTORY_SEPARATOR.'php'.(OS_WINDOWS ? '.exe' : ''));
-}
-
-// Default for verbose
-if (getenv('PHP_PEAR_VERBOSE')) {
- define('PEAR_CONFIG_DEFAULT_VERBOSE', getenv('PHP_PEAR_VERBOSE'));
-} else {
- define('PEAR_CONFIG_DEFAULT_VERBOSE', 1);
-}
-
-// Default for preferred_state
-if (getenv('PHP_PEAR_PREFERRED_STATE')) {
- define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', getenv('PHP_PEAR_PREFERRED_STATE'));
-} else {
- define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', 'stable');
-}
-
-// Default for umask
-if (getenv('PHP_PEAR_UMASK')) {
- define('PEAR_CONFIG_DEFAULT_UMASK', getenv('PHP_PEAR_UMASK'));
-} else {
- define('PEAR_CONFIG_DEFAULT_UMASK', decoct(umask()));
-}
-
-// Default for cache_ttl
-if (getenv('PHP_PEAR_CACHE_TTL')) {
- define('PEAR_CONFIG_DEFAULT_CACHE_TTL', getenv('PHP_PEAR_CACHE_TTL'));
-} else {
- define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 3600);
-}
-
-// Default for sig_type
-if (getenv('PHP_PEAR_SIG_TYPE')) {
- define('PEAR_CONFIG_DEFAULT_SIG_TYPE', getenv('PHP_PEAR_SIG_TYPE'));
-} else {
- define('PEAR_CONFIG_DEFAULT_SIG_TYPE', 'gpg');
-}
-
-// Default for sig_bin
-if (getenv('PHP_PEAR_SIG_BIN')) {
- define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN'));
-} else {
- define('PEAR_CONFIG_DEFAULT_SIG_BIN',
- System::which(
- 'gpg', OS_WINDOWS ? 'c:\gnupg\gpg.exe' : '/usr/local/bin/gpg'));
-}
-
-// Default for sig_keydir
-if (getenv('PHP_PEAR_SIG_KEYDIR')) {
- define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', getenv('PHP_PEAR_SIG_KEYDIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR',
- PEAR_CONFIG_SYSCONFDIR . DIRECTORY_SEPARATOR . 'pearkeys');
-}
-
-/**
- * This is a class for storing configuration data, keeping track of
- * which are system-defined, user-defined or defaulted.
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Config extends PEAR
-{
- /**
- * Array of config files used.
- *
- * @var array layer => config file
- */
- var $files = array(
- 'system' => '',
- 'user' => '',
- );
-
- var $layers = array();
-
- /**
- * Configuration data, two-dimensional array where the first
- * dimension is the config layer ('user', 'system' and 'default'),
- * and the second dimension is keyname => value.
- *
- * The order in the first dimension is important! Earlier
- * layers will shadow later ones when a config value is
- * requested (if a 'user' value exists, it will be returned first,
- * then 'system' and finally 'default').
- *
- * @var array layer => array(keyname => value, ...)
- */
- var $configuration = array(
- 'user' => array(),
- 'system' => array(),
- 'default' => array(),
- );
-
- /**
- * Configuration values that can be set for a channel
- *
- * All other configuration values can only have a global value
- * @var array
- * @access private
- */
- var $_channelConfigInfo = array(
- 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir',
- 'test_dir', 'www_dir', 'php_bin', 'php_prefix', 'php_suffix', 'username',
- 'password', 'verbose', 'preferred_state', 'umask', 'preferred_mirror', 'php_ini'
- );
-
- /**
- * Channels that can be accessed
- * @see setChannels()
- * @var array
- * @access private
- */
- var $_channels = array('pear.php.net', 'pecl.php.net', '__uri');
-
- /**
- * This variable is used to control the directory values returned
- * @see setInstallRoot();
- * @var string|false
- * @access private
- */
- var $_installRoot = false;
-
- /**
- * If requested, this will always refer to the registry
- * contained in php_dir
- * @var PEAR_Registry
- */
- var $_registry = array();
-
- /**
- * @var array
- * @access private
- */
- var $_regInitialized = array();
-
- /**
- * @var bool
- * @access private
- */
- var $_noRegistry = false;
-
- /**
- * amount of errors found while parsing config
- * @var integer
- * @access private
- */
- var $_errorsFound = 0;
- var $_lastError = null;
-
- /**
- * Information about the configuration data. Stores the type,
- * default value and a documentation string for each configuration
- * value.
- *
- * @var array layer => array(infotype => value, ...)
- */
- var $configuration_info = array(
- // Channels/Internet Access
- 'default_channel' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_CHANNEL,
- 'doc' => 'the default channel to use for all non explicit commands',
- 'prompt' => 'Default Channel',
- 'group' => 'Internet Access',
- ),
- 'preferred_mirror' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_CHANNEL,
- 'doc' => 'the default server or mirror to use for channel actions',
- 'prompt' => 'Default Channel Mirror',
- 'group' => 'Internet Access',
- ),
- 'remote_config' => array(
- 'type' => 'password',
- 'default' => '',
- 'doc' => 'ftp url of remote configuration file to use for synchronized install',
- 'prompt' => 'Remote Configuration File',
- 'group' => 'Internet Access',
- ),
- 'auto_discover' => array(
- 'type' => 'integer',
- 'default' => 0,
- 'doc' => 'whether to automatically discover new channels',
- 'prompt' => 'Auto-discover new Channels',
- 'group' => 'Internet Access',
- ),
- // Internet Access
- 'master_server' => array(
- 'type' => 'string',
- 'default' => 'pear.php.net',
- 'doc' => 'name of the main PEAR server [NOT USED IN THIS VERSION]',
- 'prompt' => 'PEAR server [DEPRECATED]',
- 'group' => 'Internet Access',
- ),
- 'http_proxy' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_HTTP_PROXY,
- 'doc' => 'HTTP proxy (host:port) to use when downloading packages',
- 'prompt' => 'HTTP Proxy Server Address',
- 'group' => 'Internet Access',
- ),
- // File Locations
- 'php_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_PHP_DIR,
- 'doc' => 'directory where .php files are installed',
- 'prompt' => 'PEAR directory',
- 'group' => 'File Locations',
- ),
- 'ext_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_EXT_DIR,
- 'doc' => 'directory where loadable extensions are installed',
- 'prompt' => 'PHP extension directory',
- 'group' => 'File Locations',
- ),
- 'doc_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_DOC_DIR,
- 'doc' => 'directory where documentation is installed',
- 'prompt' => 'PEAR documentation directory',
- 'group' => 'File Locations',
- ),
- 'bin_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_BIN_DIR,
- 'doc' => 'directory where executables are installed',
- 'prompt' => 'PEAR executables directory',
- 'group' => 'File Locations',
- ),
- 'data_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_DATA_DIR,
- 'doc' => 'directory where data files are installed',
- 'prompt' => 'PEAR data directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'cfg_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR,
- 'doc' => 'directory where modifiable configuration files are installed',
- 'prompt' => 'PEAR configuration file directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'www_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR,
- 'doc' => 'directory where www frontend files (html/js) are installed',
- 'prompt' => 'PEAR www files directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'test_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR,
- 'doc' => 'directory where regression tests are installed',
- 'prompt' => 'PEAR test directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'cache_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR,
- 'doc' => 'directory which is used for web service cache',
- 'prompt' => 'PEAR Installer cache directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'temp_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_TEMP_DIR,
- 'doc' => 'directory which is used for all temp files',
- 'prompt' => 'PEAR Installer temp directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'download_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR,
- 'doc' => 'directory which is used for all downloaded files',
- 'prompt' => 'PEAR Installer download directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_bin' => array(
- 'type' => 'file',
- 'default' => PEAR_CONFIG_DEFAULT_PHP_BIN,
- 'doc' => 'PHP CLI/CGI binary for executing scripts',
- 'prompt' => 'PHP CLI/CGI binary',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_prefix' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => '--program-prefix for php_bin\'s ./configure, used for pecl installs',
- 'prompt' => '--program-prefix passed to PHP\'s ./configure',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_suffix' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => '--program-suffix for php_bin\'s ./configure, used for pecl installs',
- 'prompt' => '--program-suffix passed to PHP\'s ./configure',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_ini' => array(
- 'type' => 'file',
- 'default' => '',
- 'doc' => 'location of php.ini in which to enable PECL extensions on install',
- 'prompt' => 'php.ini location',
- 'group' => 'File Locations (Advanced)',
- ),
- // Maintainers
- 'username' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => '(maintainers) your PEAR account name',
- 'prompt' => 'PEAR username (for maintainers)',
- 'group' => 'Maintainers',
- ),
- 'password' => array(
- 'type' => 'password',
- 'default' => '',
- 'doc' => '(maintainers) your PEAR account password',
- 'prompt' => 'PEAR password (for maintainers)',
- 'group' => 'Maintainers',
- ),
- // Advanced
- 'verbose' => array(
- 'type' => 'integer',
- 'default' => PEAR_CONFIG_DEFAULT_VERBOSE,
- 'doc' => 'verbosity level
-0: really quiet
-1: somewhat quiet
-2: verbose
-3: debug',
- 'prompt' => 'Debug Log Level',
- 'group' => 'Advanced',
- ),
- 'preferred_state' => array(
- 'type' => 'set',
- 'default' => PEAR_CONFIG_DEFAULT_PREFERRED_STATE,
- 'doc' => 'the installer will prefer releases with this state when installing packages without a version or state specified',
- 'valid_set' => array(
- 'stable', 'beta', 'alpha', 'devel', 'snapshot'),
- 'prompt' => 'Preferred Package State',
- 'group' => 'Advanced',
- ),
- 'umask' => array(
- 'type' => 'mask',
- 'default' => PEAR_CONFIG_DEFAULT_UMASK,
- 'doc' => 'umask used when creating files (Unix-like systems only)',
- 'prompt' => 'Unix file mask',
- 'group' => 'Advanced',
- ),
- 'cache_ttl' => array(
- 'type' => 'integer',
- 'default' => PEAR_CONFIG_DEFAULT_CACHE_TTL,
- 'doc' => 'amount of secs where the local cache is used and not updated',
- 'prompt' => 'Cache TimeToLive',
- 'group' => 'Advanced',
- ),
- 'sig_type' => array(
- 'type' => 'set',
- 'default' => PEAR_CONFIG_DEFAULT_SIG_TYPE,
- 'doc' => 'which package signature mechanism to use',
- 'valid_set' => array('gpg'),
- 'prompt' => 'Package Signature Type',
- 'group' => 'Maintainers',
- ),
- 'sig_bin' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_SIG_BIN,
- 'doc' => 'which package signature mechanism to use',
- 'prompt' => 'Signature Handling Program',
- 'group' => 'Maintainers',
- ),
- 'sig_keyid' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => 'which key to use for signing with',
- 'prompt' => 'Signature Key Id',
- 'group' => 'Maintainers',
- ),
- 'sig_keydir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_SIG_KEYDIR,
- 'doc' => 'directory where signature keys are located',
- 'prompt' => 'Signature Key Directory',
- 'group' => 'Maintainers',
- ),
- // __channels is reserved - used for channel-specific configuration
- );
-
- /**
- * Constructor.
- *
- * @param string file to read user-defined options from
- * @param string file to read system-wide defaults from
- * @param bool determines whether a registry object "follows"
- * the value of php_dir (is automatically created
- * and moved when php_dir is changed)
- * @param bool if true, fails if configuration files cannot be loaded
- *
- * @access public
- *
- * @see PEAR_Config::singleton
- */
- function __construct($user_file = '', $system_file = '', $ftp_file = false,
- $strict = true)
- {
- parent::__construct();
- PEAR_Installer_Role::initializeConfig($this);
- $sl = DIRECTORY_SEPARATOR;
- if (empty($user_file)) {
- if (OS_WINDOWS) {
- $user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini';
- } else {
- $user_file = getenv('HOME') . $sl . '.pearrc';
- }
- }
-
- if (empty($system_file)) {
- $system_file = PEAR_CONFIG_SYSCONFDIR . $sl;
- if (OS_WINDOWS) {
- $system_file .= 'pearsys.ini';
- } else {
- $system_file .= 'pear.conf';
- }
- }
-
- $this->layers = array_keys($this->configuration);
- $this->files['user'] = $user_file;
- $this->files['system'] = $system_file;
- if ($user_file && file_exists($user_file)) {
- $this->pushErrorHandling(PEAR_ERROR_RETURN);
- $this->readConfigFile($user_file, 'user', $strict);
- $this->popErrorHandling();
- if ($this->_errorsFound > 0) {
- return;
- }
- }
-
- if ($system_file && @file_exists($system_file)) {
- $this->mergeConfigFile($system_file, false, 'system', $strict);
- if ($this->_errorsFound > 0) {
- return;
- }
-
- }
-
- if (!$ftp_file) {
- $ftp_file = $this->get('remote_config');
- }
-
- if ($ftp_file && defined('PEAR_REMOTEINSTALL_OK')) {
- $this->readFTPConfigFile($ftp_file);
- }
-
- foreach ($this->configuration_info as $key => $info) {
- $this->configuration['default'][$key] = $info['default'];
- }
-
- $this->_registry['default'] = new PEAR_Registry($this->configuration['default']['php_dir']);
- $this->_registry['default']->setConfig($this, false);
- $this->_regInitialized['default'] = false;
- //$GLOBALS['_PEAR_Config_instance'] = &$this;
- }
-
- /**
- * Return the default locations of user and system configuration files
- * @static
- */
- function getDefaultConfigFiles()
- {
- $sl = DIRECTORY_SEPARATOR;
- if (OS_WINDOWS) {
- return array(
- 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini',
- 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini'
- );
- }
-
- return array(
- 'user' => getenv('HOME') . $sl . '.pearrc',
- 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf'
- );
- }
-
- /**
- * Static singleton method. If you want to keep only one instance
- * of this class in use, this method will give you a reference to
- * the last created PEAR_Config object if one exists, or create a
- * new object.
- *
- * @param string (optional) file to read user-defined options from
- * @param string (optional) file to read system-wide defaults from
- *
- * @return object an existing or new PEAR_Config instance
- *
- * @access public
- *
- * @see PEAR_Config::PEAR_Config
- */
- function &singleton($user_file = '', $system_file = '', $strict = true)
- {
- if (is_object($GLOBALS['_PEAR_Config_instance'])) {
- return $GLOBALS['_PEAR_Config_instance'];
- }
-
- $t_conf = new PEAR_Config($user_file, $system_file, false, $strict);
- if ($t_conf->_errorsFound > 0) {
- return $t_conf->lastError;
- }
-
- $GLOBALS['_PEAR_Config_instance'] = &$t_conf;
- return $GLOBALS['_PEAR_Config_instance'];
- }
-
- /**
- * Determine whether any configuration files have been detected, and whether a
- * registry object can be retrieved from this configuration.
- * @return bool
- * @since PEAR 1.4.0a1
- */
- function validConfiguration()
- {
- if ($this->isDefinedLayer('user') || $this->isDefinedLayer('system')) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Reads configuration data from a file. All existing values in
- * the config layer are discarded and replaced with data from the
- * file.
- * @param string file to read from, if NULL or not specified, the
- * last-used file for the same layer (second param) is used
- * @param string config layer to insert data into ('user' or 'system')
- * @return bool TRUE on success or a PEAR error on failure
- */
- function readConfigFile($file = null, $layer = 'user', $strict = true)
- {
- if (empty($this->files[$layer])) {
- return $this->raiseError("unknown config layer `$layer'");
- }
-
- if ($file === null) {
- $file = $this->files[$layer];
- }
-
- $data = $this->_readConfigDataFrom($file);
- if (PEAR::isError($data)) {
- if (!$strict) {
- return true;
- }
-
- $this->_errorsFound++;
- $this->lastError = $data;
-
- return $data;
- }
-
- $this->files[$layer] = $file;
- $this->_decodeInput($data);
- $this->configuration[$layer] = $data;
- $this->_setupChannels();
- if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
- $this->_registry[$layer] = new PEAR_Registry($phpdir);
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- } else {
- unset($this->_registry[$layer]);
- }
- return true;
- }
-
- /**
- * @param string url to the remote config file, like ftp://www.example.com/pear/config.ini
- * @return true|PEAR_Error
- */
- function readFTPConfigFile($path)
- {
- do { // poor man's try
- if (!class_exists('PEAR_FTP')) {
- if (!class_exists('PEAR_Common')) {
- require_once 'PEAR/Common.php';
- }
- if (PEAR_Common::isIncludeable('PEAR/FTP.php')) {
- require_once 'PEAR/FTP.php';
- }
- }
-
- if (!class_exists('PEAR_FTP')) {
- return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config');
- }
-
- $this->_ftp = new PEAR_FTP;
- $this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN);
- $e = $this->_ftp->init($path);
- if (PEAR::isError($e)) {
- $this->_ftp->popErrorHandling();
- return $e;
- }
-
- $tmp = System::mktemp('-d');
- PEAR_Common::addTempFile($tmp);
- $e = $this->_ftp->get(basename($path), $tmp . DIRECTORY_SEPARATOR .
- 'pear.ini', false, FTP_BINARY);
- if (PEAR::isError($e)) {
- $this->_ftp->popErrorHandling();
- return $e;
- }
-
- PEAR_Common::addTempFile($tmp . DIRECTORY_SEPARATOR . 'pear.ini');
- $this->_ftp->disconnect();
- $this->_ftp->popErrorHandling();
- $this->files['ftp'] = $tmp . DIRECTORY_SEPARATOR . 'pear.ini';
- $e = $this->readConfigFile(null, 'ftp');
- if (PEAR::isError($e)) {
- return $e;
- }
-
- $fail = array();
- foreach ($this->configuration_info as $key => $val) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- // any directory configs must be set for this to work
- if (!isset($this->configuration['ftp'][$key])) {
- $fail[] = $key;
- }
- }
- }
-
- if (!count($fail)) {
- return true;
- }
-
- $fail = '"' . implode('", "', $fail) . '"';
- unset($this->files['ftp']);
- unset($this->configuration['ftp']);
- return PEAR::raiseError('ERROR: Ftp configuration file must set all ' .
- 'directory configuration variables. These variables were not set: ' .
- $fail);
- } while (false); // poor man's catch
- unset($this->files['ftp']);
- return PEAR::raiseError('no remote host specified');
- }
-
- /**
- * Reads the existing configurations and creates the _channels array from it
- */
- function _setupChannels()
- {
- $set = array_flip(array_values($this->_channels));
- foreach ($this->configuration as $layer => $data) {
- $i = 1000;
- if (isset($data['__channels']) && is_array($data['__channels'])) {
- foreach ($data['__channels'] as $channel => $info) {
- $set[$channel] = $i++;
- }
- }
- }
- $this->_channels = array_values(array_flip($set));
- $this->setChannels($this->_channels);
- }
-
- function deleteChannel($channel)
- {
- $ch = strtolower($channel);
- foreach ($this->configuration as $layer => $data) {
- if (isset($data['__channels']) && isset($data['__channels'][$ch])) {
- unset($this->configuration[$layer]['__channels'][$ch]);
- }
- }
-
- $this->_channels = array_flip($this->_channels);
- unset($this->_channels[$ch]);
- $this->_channels = array_flip($this->_channels);
- }
-
- /**
- * Merges data into a config layer from a file. Does the same
- * thing as readConfigFile, except it does not replace all
- * existing values in the config layer.
- * @param string file to read from
- * @param bool whether to overwrite existing data (default TRUE)
- * @param string config layer to insert data into ('user' or 'system')
- * @param string if true, errors are returned if file opening fails
- * @return bool TRUE on success or a PEAR error on failure
- */
- function mergeConfigFile($file, $override = true, $layer = 'user', $strict = true)
- {
- if (empty($this->files[$layer])) {
- return $this->raiseError("unknown config layer `$layer'");
- }
-
- if ($file === null) {
- $file = $this->files[$layer];
- }
-
- $data = $this->_readConfigDataFrom($file);
- if (PEAR::isError($data)) {
- if (!$strict) {
- return true;
- }
-
- $this->_errorsFound++;
- $this->lastError = $data;
-
- return $data;
- }
-
- $this->_decodeInput($data);
- if ($override) {
- $this->configuration[$layer] =
- PEAR_Config::arrayMergeRecursive($this->configuration[$layer], $data);
- } else {
- $this->configuration[$layer] =
- PEAR_Config::arrayMergeRecursive($data, $this->configuration[$layer]);
- }
-
- $this->_setupChannels();
- if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
- $this->_registry[$layer] = new PEAR_Registry($phpdir);
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- } else {
- unset($this->_registry[$layer]);
- }
- return true;
- }
-
- /**
- * @param array
- * @param array
- * @return array
- * @static
- */
- function arrayMergeRecursive($arr2, $arr1)
- {
- $ret = array();
- foreach ($arr2 as $key => $data) {
- if (!isset($arr1[$key])) {
- $ret[$key] = $data;
- unset($arr1[$key]);
- continue;
- }
- if (is_array($data)) {
- if (!is_array($arr1[$key])) {
- $ret[$key] = $arr1[$key];
- unset($arr1[$key]);
- continue;
- }
- $ret[$key] = PEAR_Config::arrayMergeRecursive($arr1[$key], $arr2[$key]);
- unset($arr1[$key]);
- }
- }
-
- return array_merge($ret, $arr1);
- }
-
- /**
- * Writes data into a config layer from a file.
- *
- * @param string|null file to read from, or null for default
- * @param string config layer to insert data into ('user' or
- * 'system')
- * @param string|null data to write to config file or null for internal data [DEPRECATED]
- * @return bool TRUE on success or a PEAR error on failure
- */
- function writeConfigFile($file = null, $layer = 'user', $data = null)
- {
- $this->_lazyChannelSetup($layer);
- if ($layer == 'both' || $layer == 'all') {
- foreach ($this->files as $type => $file) {
- $err = $this->writeConfigFile($file, $type, $data);
- if (PEAR::isError($err)) {
- return $err;
- }
- }
- return true;
- }
-
- if (empty($this->files[$layer])) {
- return $this->raiseError("unknown config file type `$layer'");
- }
-
- if ($file === null) {
- $file = $this->files[$layer];
- }
-
- $data = ($data === null) ? $this->configuration[$layer] : $data;
- $this->_encodeOutput($data);
- $opt = array('-p', dirname($file));
- if (!@System::mkDir($opt)) {
- return $this->raiseError("could not create directory: " . dirname($file));
- }
-
- if (file_exists($file) && is_file($file) && !is_writeable($file)) {
- return $this->raiseError("no write access to $file!");
- }
-
- $fp = @fopen($file, "w");
- if (!$fp) {
- return $this->raiseError("PEAR_Config::writeConfigFile fopen('$file','w') failed ($php_errormsg)");
- }
-
- $contents = "#PEAR_Config 0.9\n" . serialize($data);
- if (!@fwrite($fp, $contents)) {
- return $this->raiseError("PEAR_Config::writeConfigFile: fwrite failed ($php_errormsg)");
- }
- return true;
- }
-
- /**
- * Reads configuration data from a file and returns the parsed data
- * in an array.
- *
- * @param string file to read from
- * @return array configuration data or a PEAR error on failure
- * @access private
- */
- function _readConfigDataFrom($file)
- {
- $fp = false;
- if (file_exists($file)) {
- $fp = @fopen($file, "r");
- }
-
- if (!$fp) {
- return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed");
- }
-
- $size = filesize($file);
- fclose($fp);
- $contents = file_get_contents($file);
- if (empty($contents)) {
- return $this->raiseError('Configuration file "' . $file . '" is empty');
- }
-
- $version = false;
- if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) {
- $version = $matches[1];
- $contents = substr($contents, strlen($matches[0]));
- } else {
- // Museum config file
- if (substr($contents,0,2) == 'a:') {
- $version = '0.1';
- }
- }
-
- if ($version && version_compare("$version", '1', '<')) {
- // no '@', it is possible that unserialize
- // raises a notice but it seems to block IO to
- // STDOUT if a '@' is used and a notice is raise
- $data = unserialize($contents);
-
- if (!is_array($data) && !$data) {
- if ($contents == serialize(false)) {
- $data = array();
- } else {
- $err = $this->raiseError("PEAR_Config: bad data in $file");
- return $err;
- }
- }
- if (!is_array($data)) {
- if (strlen(trim($contents)) > 0) {
- $error = "PEAR_Config: bad data in $file";
- $err = $this->raiseError($error);
- return $err;
- }
-
- $data = array();
- }
- // add parsing of newer formats here...
- } else {
- $err = $this->raiseError("$file: unknown version `$version'");
- return $err;
- }
-
- return $data;
- }
-
- /**
- * Gets the file used for storing the config for a layer
- *
- * @param string $layer 'user' or 'system'
- */
- function getConfFile($layer)
- {
- return $this->files[$layer];
- }
-
- /**
- * @param string Configuration class name, used for detecting duplicate calls
- * @param array information on a role as parsed from its xml file
- * @return true|PEAR_Error
- * @access private
- */
- function _addConfigVars($class, $vars)
- {
- static $called = array();
- if (isset($called[$class])) {
- return;
- }
-
- $called[$class] = 1;
- if (count($vars) > 3) {
- return $this->raiseError('Roles can only define 3 new config variables or less');
- }
-
- foreach ($vars as $name => $var) {
- if (!is_array($var)) {
- return $this->raiseError('Configuration information must be an array');
- }
-
- if (!isset($var['type'])) {
- return $this->raiseError('Configuration information must contain a type');
- } elseif (!in_array($var['type'],
- array('string', 'mask', 'password', 'directory', 'file', 'set'))) {
- return $this->raiseError(
- 'Configuration type must be one of directory, file, string, ' .
- 'mask, set, or password');
- }
- if (!isset($var['default'])) {
- return $this->raiseError(
- 'Configuration information must contain a default value ("default" index)');
- }
-
- if (is_array($var['default'])) {
- $real_default = '';
- foreach ($var['default'] as $config_var => $val) {
- if (strpos($config_var, 'text') === 0) {
- $real_default .= $val;
- } elseif (strpos($config_var, 'constant') === 0) {
- if (!defined($val)) {
- return $this->raiseError(
- 'Unknown constant "' . $val . '" requested in ' .
- 'default value for configuration variable "' .
- $name . '"');
- }
-
- $real_default .= constant($val);
- } elseif (isset($this->configuration_info[$config_var])) {
- $real_default .=
- $this->configuration_info[$config_var]['default'];
- } else {
- return $this->raiseError(
- 'Unknown request for "' . $config_var . '" value in ' .
- 'default value for configuration variable "' .
- $name . '"');
- }
- }
- $var['default'] = $real_default;
- }
-
- if ($var['type'] == 'integer') {
- $var['default'] = (integer) $var['default'];
- }
-
- if (!isset($var['doc'])) {
- return $this->raiseError(
- 'Configuration information must contain a summary ("doc" index)');
- }
-
- if (!isset($var['prompt'])) {
- return $this->raiseError(
- 'Configuration information must contain a simple prompt ("prompt" index)');
- }
-
- if (!isset($var['group'])) {
- return $this->raiseError(
- 'Configuration information must contain a simple group ("group" index)');
- }
-
- if (isset($this->configuration_info[$name])) {
- return $this->raiseError('Configuration variable "' . $name .
- '" already exists');
- }
-
- $this->configuration_info[$name] = $var;
- // fix bug #7351: setting custom config variable in a channel fails
- $this->_channelConfigInfo[] = $name;
- }
-
- return true;
- }
-
- /**
- * Encodes/scrambles configuration data before writing to files.
- * Currently, 'password' values will be base64-encoded as to avoid
- * that people spot cleartext passwords by accident.
- *
- * @param array (reference) array to encode values in
- * @return bool TRUE on success
- * @access private
- */
- function _encodeOutput(&$data)
- {
- foreach ($data as $key => $value) {
- if ($key == '__channels') {
- foreach ($data['__channels'] as $channel => $blah) {
- $this->_encodeOutput($data['__channels'][$channel]);
- }
- }
-
- if (!isset($this->configuration_info[$key])) {
- continue;
- }
-
- $type = $this->configuration_info[$key]['type'];
- switch ($type) {
- // we base64-encode passwords so they are at least
- // not shown in plain by accident
- case 'password': {
- $data[$key] = base64_encode($data[$key]);
- break;
- }
- case 'mask': {
- $data[$key] = octdec($data[$key]);
- break;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Decodes/unscrambles configuration data after reading from files.
- *
- * @param array (reference) array to encode values in
- * @return bool TRUE on success
- * @access private
- *
- * @see PEAR_Config::_encodeOutput
- */
- function _decodeInput(&$data)
- {
- if (!is_array($data)) {
- return true;
- }
-
- foreach ($data as $key => $value) {
- if ($key == '__channels') {
- foreach ($data['__channels'] as $channel => $blah) {
- $this->_decodeInput($data['__channels'][$channel]);
- }
- }
-
- if (!isset($this->configuration_info[$key])) {
- continue;
- }
-
- $type = $this->configuration_info[$key]['type'];
- switch ($type) {
- case 'password': {
- $data[$key] = base64_decode($data[$key]);
- break;
- }
- case 'mask': {
- $data[$key] = decoct($data[$key]);
- break;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Retrieve the default channel.
- *
- * On startup, channels are not initialized, so if the default channel is not
- * pear.php.net, then initialize the config.
- * @param string registry layer
- * @return string|false
- */
- function getDefaultChannel($layer = null)
- {
- $ret = false;
- if ($layer === null) {
- foreach ($this->layers as $layer) {
- if (isset($this->configuration[$layer]['default_channel'])) {
- $ret = $this->configuration[$layer]['default_channel'];
- break;
- }
- }
- } elseif (isset($this->configuration[$layer]['default_channel'])) {
- $ret = $this->configuration[$layer]['default_channel'];
- }
-
- if ($ret == 'pear.php.net' && defined('PEAR_RUNTYPE') && PEAR_RUNTYPE == 'pecl') {
- $ret = 'pecl.php.net';
- }
-
- if ($ret) {
- if ($ret != 'pear.php.net') {
- $this->_lazyChannelSetup();
- }
-
- return $ret;
- }
-
- return PEAR_CONFIG_DEFAULT_CHANNEL;
- }
-
- /**
- * Returns a configuration value, prioritizing layers as per the
- * layers property.
- *
- * @param string config key
- * @return mixed the config value, or NULL if not found
- * @access public
- */
- function get($key, $layer = null, $channel = false)
- {
- if (!isset($this->configuration_info[$key])) {
- return null;
- }
-
- if ($key == '__channels') {
- return null;
- }
-
- if ($key == 'default_channel') {
- return $this->getDefaultChannel($layer);
- }
-
- if (!$channel) {
- $channel = $this->getDefaultChannel();
- } elseif ($channel != 'pear.php.net') {
- $this->_lazyChannelSetup();
- }
- $channel = strtolower($channel);
-
- $test = (in_array($key, $this->_channelConfigInfo)) ?
- $this->_getChannelValue($key, $layer, $channel) :
- null;
- if ($test !== null) {
- if ($this->_installRoot) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- return $this->_prependPath($test, $this->_installRoot);
- }
- }
- return $test;
- }
-
- if ($layer === null) {
- foreach ($this->layers as $layer) {
- if (isset($this->configuration[$layer][$key])) {
- $test = $this->configuration[$layer][$key];
- if ($this->_installRoot) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- return $this->_prependPath($test, $this->_installRoot);
- }
- }
-
- if ($key == 'preferred_mirror') {
- $reg = &$this->getRegistry();
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $channel;
- }
-
- if (!$chan->getMirror($test) && $chan->getName() != $test) {
- return $channel; // mirror does not exist
- }
- }
- }
- return $test;
- }
- }
- } elseif (isset($this->configuration[$layer][$key])) {
- $test = $this->configuration[$layer][$key];
- if ($this->_installRoot) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- return $this->_prependPath($test, $this->_installRoot);
- }
- }
-
- if ($key == 'preferred_mirror') {
- $reg = &$this->getRegistry();
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $channel;
- }
-
- if (!$chan->getMirror($test) && $chan->getName() != $test) {
- return $channel; // mirror does not exist
- }
- }
- }
-
- return $test;
- }
-
- return null;
- }
-
- /**
- * Returns a channel-specific configuration value, prioritizing layers as per the
- * layers property.
- *
- * @param string config key
- * @return mixed the config value, or NULL if not found
- * @access private
- */
- function _getChannelValue($key, $layer, $channel)
- {
- if ($key == '__channels' || $channel == 'pear.php.net') {
- return null;
- }
-
- $ret = null;
- if ($layer === null) {
- foreach ($this->layers as $ilayer) {
- if (isset($this->configuration[$ilayer]['__channels'][$channel][$key])) {
- $ret = $this->configuration[$ilayer]['__channels'][$channel][$key];
- break;
- }
- }
- } elseif (isset($this->configuration[$layer]['__channels'][$channel][$key])) {
- $ret = $this->configuration[$layer]['__channels'][$channel][$key];
- }
-
- if ($key != 'preferred_mirror') {
- return $ret;
- }
-
-
- if ($ret !== null) {
- $reg = &$this->getRegistry($layer);
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $channel;
- }
-
- if (!$chan->getMirror($ret) && $chan->getName() != $ret) {
- return $channel; // mirror does not exist
- }
- }
-
- return $ret;
- }
-
- if ($channel != $this->getDefaultChannel($layer)) {
- return $channel; // we must use the channel name as the preferred mirror
- // if the user has not chosen an alternate
- }
-
- return $this->getDefaultChannel($layer);
- }
-
- /**
- * Set a config value in a specific layer (defaults to 'user').
- * Enforces the types defined in the configuration_info array. An
- * integer config variable will be cast to int, and a set config
- * variable will be validated against its legal values.
- *
- * @param string config key
- * @param string config value
- * @param string (optional) config layer
- * @param string channel to set this value for, or null for global value
- * @return bool TRUE on success, FALSE on failure
- */
- function set($key, $value, $layer = 'user', $channel = false)
- {
- if ($key == '__channels') {
- return false;
- }
-
- if (!isset($this->configuration[$layer])) {
- return false;
- }
-
- if ($key == 'default_channel') {
- // can only set this value globally
- $channel = 'pear.php.net';
- if ($value != 'pear.php.net') {
- $this->_lazyChannelSetup($layer);
- }
- }
-
- if ($key == 'preferred_mirror') {
- if ($channel == '__uri') {
- return false; // can't set the __uri pseudo-channel's mirror
- }
-
- $reg = &$this->getRegistry($layer);
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel ? $channel : 'pear.php.net');
- if (PEAR::isError($chan)) {
- return false;
- }
-
- if (!$chan->getMirror($value) && $chan->getName() != $value) {
- return false; // mirror does not exist
- }
- }
- }
-
- if (!isset($this->configuration_info[$key])) {
- return false;
- }
-
- extract($this->configuration_info[$key]);
- switch ($type) {
- case 'integer':
- $value = (int)$value;
- break;
- case 'set': {
- // If a valid_set is specified, require the value to
- // be in the set. If there is no valid_set, accept
- // any value.
- if ($valid_set) {
- reset($valid_set);
- if ((key($valid_set) === 0 && !in_array($value, $valid_set)) ||
- (key($valid_set) !== 0 && empty($valid_set[$value])))
- {
- return false;
- }
- }
- break;
- }
- }
-
- if (!$channel) {
- $channel = $this->get('default_channel', null, 'pear.php.net');
- }
-
- if (!in_array($channel, $this->_channels)) {
- $this->_lazyChannelSetup($layer);
- $reg = &$this->getRegistry($layer);
- if ($reg) {
- $channel = $reg->channelName($channel);
- }
-
- if (!in_array($channel, $this->_channels)) {
- return false;
- }
- }
-
- if ($channel != 'pear.php.net') {
- if (in_array($key, $this->_channelConfigInfo)) {
- $this->configuration[$layer]['__channels'][$channel][$key] = $value;
- return true;
- }
-
- return false;
- }
-
- if ($key == 'default_channel') {
- if (!isset($reg)) {
- $reg = &$this->getRegistry($layer);
- if (!$reg) {
- $reg = &$this->getRegistry();
- }
- }
-
- if ($reg) {
- $value = $reg->channelName($value);
- }
-
- if (!$value) {
- return false;
- }
- }
-
- $this->configuration[$layer][$key] = $value;
- if ($key == 'php_dir' && !$this->_noRegistry) {
- if (!isset($this->_registry[$layer]) ||
- $value != $this->_registry[$layer]->install_dir) {
- $this->_registry[$layer] = new PEAR_Registry($value);
- $this->_regInitialized[$layer] = false;
- $this->_registry[$layer]->setConfig($this, false);
- }
- }
-
- return true;
- }
-
- function _lazyChannelSetup($uselayer = false)
- {
- if ($this->_noRegistry) {
- return;
- }
-
- $merge = false;
- foreach ($this->_registry as $layer => $p) {
- if ($uselayer && $uselayer != $layer) {
- continue;
- }
-
- if (!$this->_regInitialized[$layer]) {
- if ($layer == 'default' && isset($this->_registry['user']) ||
- isset($this->_registry['system'])) {
- // only use the default registry if there are no alternatives
- continue;
- }
-
- if (!is_object($this->_registry[$layer])) {
- if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) {
- $this->_registry[$layer] = new PEAR_Registry($phpdir);
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- } else {
- unset($this->_registry[$layer]);
- return;
- }
- }
-
- $this->setChannels($this->_registry[$layer]->listChannels(), $merge);
- $this->_regInitialized[$layer] = true;
- $merge = true;
- }
- }
- }
-
- /**
- * Set the list of channels.
- *
- * This should be set via a call to {@link PEAR_Registry::listChannels()}
- * @param array
- * @param bool
- * @return bool success of operation
- */
- function setChannels($channels, $merge = false)
- {
- if (!is_array($channels)) {
- return false;
- }
-
- if ($merge) {
- $this->_channels = array_merge($this->_channels, $channels);
- } else {
- $this->_channels = $channels;
- }
-
- foreach ($channels as $channel) {
- $channel = strtolower($channel);
- if ($channel == 'pear.php.net') {
- continue;
- }
-
- foreach ($this->layers as $layer) {
- if (!isset($this->configuration[$layer]['__channels'])) {
- $this->configuration[$layer]['__channels'] = array();
- }
- if (!isset($this->configuration[$layer]['__channels'][$channel])
- || !is_array($this->configuration[$layer]['__channels'][$channel])) {
- $this->configuration[$layer]['__channels'][$channel] = array();
- }
- }
- }
-
- return true;
- }
-
- /**
- * Get the type of a config value.
- *
- * @param string config key
- *
- * @return string type, one of "string", "integer", "file",
- * "directory", "set" or "password".
- *
- * @access public
- *
- */
- function getType($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['type'];
- }
- return false;
- }
-
- /**
- * Get the documentation for a config value.
- *
- * @param string config key
- * @return string documentation string
- *
- * @access public
- *
- */
- function getDocs($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['doc'];
- }
-
- return false;
- }
-
- /**
- * Get the short documentation for a config value.
- *
- * @param string config key
- * @return string short documentation string
- *
- * @access public
- *
- */
- function getPrompt($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['prompt'];
- }
-
- return false;
- }
-
- /**
- * Get the parameter group for a config key.
- *
- * @param string config key
- * @return string parameter group
- *
- * @access public
- *
- */
- function getGroup($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['group'];
- }
-
- return false;
- }
-
- /**
- * Get the list of parameter groups.
- *
- * @return array list of parameter groups
- *
- * @access public
- *
- */
- function getGroups()
- {
- $tmp = array();
- foreach ($this->configuration_info as $key => $info) {
- $tmp[$info['group']] = 1;
- }
-
- return array_keys($tmp);
- }
-
- /**
- * Get the list of the parameters in a group.
- *
- * @param string $group parameter group
- * @return array list of parameters in $group
- *
- * @access public
- *
- */
- function getGroupKeys($group)
- {
- $keys = array();
- foreach ($this->configuration_info as $key => $info) {
- if ($info['group'] == $group) {
- $keys[] = $key;
- }
- }
-
- return $keys;
- }
-
- /**
- * Get the list of allowed set values for a config value. Returns
- * NULL for config values that are not sets.
- *
- * @param string config key
- * @return array enumerated array of set values, or NULL if the
- * config key is unknown or not a set
- *
- * @access public
- *
- */
- function getSetValues($key)
- {
- if (isset($this->configuration_info[$key]) &&
- isset($this->configuration_info[$key]['type']) &&
- $this->configuration_info[$key]['type'] == 'set')
- {
- $valid_set = $this->configuration_info[$key]['valid_set'];
- reset($valid_set);
- if (key($valid_set) === 0) {
- return $valid_set;
- }
-
- return array_keys($valid_set);
- }
-
- return null;
- }
-
- /**
- * Get all the current config keys.
- *
- * @return array simple array of config keys
- *
- * @access public
- */
- function getKeys()
- {
- $keys = array();
- foreach ($this->layers as $layer) {
- $test = $this->configuration[$layer];
- if (isset($test['__channels'])) {
- foreach ($test['__channels'] as $channel => $configs) {
- $keys = array_merge($keys, $configs);
- }
- }
-
- unset($test['__channels']);
- $keys = array_merge($keys, $test);
-
- }
- return array_keys($keys);
- }
-
- /**
- * Remove the a config key from a specific config layer.
- *
- * @param string config key
- * @param string (optional) config layer
- * @param string (optional) channel (defaults to default channel)
- * @return bool TRUE on success, FALSE on failure
- *
- * @access public
- */
- function remove($key, $layer = 'user', $channel = null)
- {
- if ($channel === null) {
- $channel = $this->getDefaultChannel();
- }
-
- if ($channel !== 'pear.php.net') {
- if (isset($this->configuration[$layer]['__channels'][$channel][$key])) {
- unset($this->configuration[$layer]['__channels'][$channel][$key]);
- return true;
- }
- }
-
- if (isset($this->configuration[$layer][$key])) {
- unset($this->configuration[$layer][$key]);
- return true;
- }
-
- return false;
- }
-
- /**
- * Temporarily remove an entire config layer. USE WITH CARE!
- *
- * @param string config key
- * @param string (optional) config layer
- * @return bool TRUE on success, FALSE on failure
- *
- * @access public
- */
- function removeLayer($layer)
- {
- if (isset($this->configuration[$layer])) {
- $this->configuration[$layer] = array();
- return true;
- }
-
- return false;
- }
-
- /**
- * Stores configuration data in a layer.
- *
- * @param string config layer to store
- * @return bool TRUE on success, or PEAR error on failure
- *
- * @access public
- */
- function store($layer = 'user', $data = null)
- {
- return $this->writeConfigFile(null, $layer, $data);
- }
-
- /**
- * Tells what config layer that gets to define a key.
- *
- * @param string config key
- * @param boolean return the defining channel
- *
- * @return string|array the config layer, or an empty string if not found.
- *
- * if $returnchannel, the return is an array array('layer' => layername,
- * 'channel' => channelname), or an empty string if not found
- *
- * @access public
- */
- function definedBy($key, $returnchannel = false)
- {
- foreach ($this->layers as $layer) {
- $channel = $this->getDefaultChannel();
- if ($channel !== 'pear.php.net') {
- if (isset($this->configuration[$layer]['__channels'][$channel][$key])) {
- if ($returnchannel) {
- return array('layer' => $layer, 'channel' => $channel);
- }
- return $layer;
- }
- }
-
- if (isset($this->configuration[$layer][$key])) {
- if ($returnchannel) {
- return array('layer' => $layer, 'channel' => 'pear.php.net');
- }
- return $layer;
- }
- }
-
- return '';
- }
-
- /**
- * Tells whether a given key exists as a config value.
- *
- * @param string config key
- * @return bool whether <config key> exists in this object
- *
- * @access public
- */
- function isDefined($key)
- {
- foreach ($this->layers as $layer) {
- if (isset($this->configuration[$layer][$key])) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Tells whether a given config layer exists.
- *
- * @param string config layer
- * @return bool whether <config layer> exists in this object
- *
- * @access public
- */
- function isDefinedLayer($layer)
- {
- return isset($this->configuration[$layer]);
- }
-
- /**
- * Returns the layers defined (except the 'default' one)
- *
- * @return array of the defined layers
- */
- function getLayers()
- {
- $cf = $this->configuration;
- unset($cf['default']);
- return array_keys($cf);
- }
-
- function apiVersion()
- {
- return '1.1';
- }
-
- /**
- * @return PEAR_Registry
- */
- function &getRegistry($use = null)
- {
- $layer = $use === null ? 'user' : $use;
- if (isset($this->_registry[$layer])) {
- return $this->_registry[$layer];
- } elseif ($use === null && isset($this->_registry['system'])) {
- return $this->_registry['system'];
- } elseif ($use === null && isset($this->_registry['default'])) {
- return $this->_registry['default'];
- } elseif ($use) {
- $a = false;
- return $a;
- }
-
- // only go here if null was passed in
- echo "CRITICAL ERROR: Registry could not be initialized from any value";
- exit(1);
- }
-
- /**
- * This is to allow customization like the use of installroot
- * @param PEAR_Registry
- * @return bool
- */
- function setRegistry(&$reg, $layer = 'user')
- {
- if ($this->_noRegistry) {
- return false;
- }
-
- if (!in_array($layer, array('user', 'system'))) {
- return false;
- }
-
- $this->_registry[$layer] = &$reg;
- if (is_object($reg)) {
- $this->_registry[$layer]->setConfig($this, false);
- }
-
- return true;
- }
-
- function noRegistry()
- {
- $this->_noRegistry = true;
- }
-
- /**
- * @return PEAR_REST
- */
- function &getREST($version, $options = array())
- {
- $version = str_replace('.', '', $version);
- if (!class_exists($class = 'PEAR_REST_' . $version)) {
- require_once 'PEAR/REST/' . $version . '.php';
- }
-
- $remote = new $class($this, $options);
- return $remote;
- }
-
- /**
- * The ftp server is set in {@link readFTPConfigFile()}. It exists only if a
- * remote configuration file has been specified
- * @return PEAR_FTP|false
- */
- function &getFTP()
- {
- if (isset($this->_ftp)) {
- return $this->_ftp;
- }
-
- $a = false;
- return $a;
- }
-
- function _prependPath($path, $prepend)
- {
- if (strlen($prepend) > 0) {
- if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) {
- if (preg_match('/^[a-z]:/i', $prepend)) {
- $prepend = substr($prepend, 2);
- } elseif ($prepend{0} != '\\') {
- $prepend = "\\$prepend";
- }
- $path = substr($path, 0, 2) . $prepend . substr($path, 2);
- } else {
- $path = $prepend . $path;
- }
- }
- return $path;
- }
-
- /**
- * @param string|false installation directory to prepend to all _dir variables, or false to
- * disable
- */
- function setInstallRoot($root)
- {
- if (substr($root, -1) == DIRECTORY_SEPARATOR) {
- $root = substr($root, 0, -1);
- }
- $old = $this->_installRoot;
- $this->_installRoot = $root;
- if (($old != $root) && !$this->_noRegistry) {
- foreach (array_keys($this->_registry) as $layer) {
- if ($layer == 'ftp' || !isset($this->_registry[$layer])) {
- continue;
- }
- $this->_registry[$layer] =
- new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net'));
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- }
- }
- }
-}
-
-/**
- * PEAR_DependencyDB, advanced installed packages dependency database
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Needed for error handling
- */
-require_once 'PEAR.php';
-require_once 'PEAR/Config.php';
-
-$GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array();
-/**
- * Track dependency relationships between installed packages
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Tomas V.V.Cox <cox@idec.net.com>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_DependencyDB
-{
- // {{{ properties
-
- /**
- * This is initialized by {@link setConfig()}
- * @var PEAR_Config
- * @access private
- */
- var $_config;
- /**
- * This is initialized by {@link setConfig()}
- * @var PEAR_Registry
- * @access private
- */
- var $_registry;
- /**
- * Filename of the dependency DB (usually .depdb)
- * @var string
- * @access private
- */
- var $_depdb = false;
- /**
- * File name of the lockfile (usually .depdblock)
- * @var string
- * @access private
- */
- var $_lockfile = false;
- /**
- * Open file resource for locking the lockfile
- * @var resource|false
- * @access private
- */
- var $_lockFp = false;
- /**
- * API version of this class, used to validate a file on-disk
- * @var string
- * @access private
- */
- var $_version = '1.0';
- /**
- * Cached dependency database file
- * @var array|null
- * @access private
- */
- var $_cache;
-
- // }}}
- // {{{ & singleton()
-
- /**
- * Get a raw dependency database. Calls setConfig() and assertDepsDB()
- * @param PEAR_Config
- * @param string|false full path to the dependency database, or false to use default
- * @return PEAR_DependencyDB|PEAR_Error
- * @static
- */
- function &singleton(&$config, $depdb = false)
- {
- $phpdir = $config->get('php_dir', null, 'pear.php.net');
- if (!isset($GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir])) {
- $a = new PEAR_DependencyDB;
- $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir] = &$a;
- $a->setConfig($config, $depdb);
- $e = $a->assertDepsDB();
- if (PEAR::isError($e)) {
- return $e;
- }
- }
-
- return $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir];
- }
-
- /**
- * Set up the registry/location of dependency DB
- * @param PEAR_Config|false
- * @param string|false full path to the dependency database, or false to use default
- */
- function setConfig(&$config, $depdb = false)
- {
- if (!$config) {
- $this->_config = &PEAR_Config::singleton();
- } else {
- $this->_config = &$config;
- }
-
- $this->_registry = &$this->_config->getRegistry();
- if (!$depdb) {
- $this->_depdb = $this->_config->get('php_dir', null, 'pear.php.net') .
- DIRECTORY_SEPARATOR . '.depdb';
- } else {
- $this->_depdb = $depdb;
- }
-
- $this->_lockfile = dirname($this->_depdb) . DIRECTORY_SEPARATOR . '.depdblock';
- }
- // }}}
-
- function hasWriteAccess()
- {
- if (!file_exists($this->_depdb)) {
- $dir = $this->_depdb;
- while ($dir && $dir != '.') {
- $dir = dirname($dir); // cd ..
- if ($dir != '.' && file_exists($dir)) {
- if (is_writeable($dir)) {
- return true;
- }
-
- return false;
- }
- }
-
- return false;
- }
-
- return is_writeable($this->_depdb);
- }
-
- // {{{ assertDepsDB()
-
- /**
- * Create the dependency database, if it doesn't exist. Error if the database is
- * newer than the code reading it.
- * @return void|PEAR_Error
- */
- function assertDepsDB()
- {
- if (!is_file($this->_depdb)) {
- $this->rebuildDB();
- return;
- }
-
- $depdb = $this->_getDepDB();
- // Datatype format has been changed, rebuild the Deps DB
- if ($depdb['_version'] < $this->_version) {
- $this->rebuildDB();
- }
-
- if ($depdb['_version']{0} > $this->_version{0}) {
- return PEAR::raiseError('Dependency database is version ' .
- $depdb['_version'] . ', and we are version ' .
- $this->_version . ', cannot continue');
- }
- }
-
- /**
- * Get a list of installed packages that depend on this package
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
- * @return array|false
- */
- function getDependentPackages(&$pkg)
- {
- $data = $this->_getDepDB();
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- if (isset($data['packages'][$channel][$package])) {
- return $data['packages'][$channel][$package];
- }
-
- return false;
- }
-
- /**
- * Get a list of the actual dependencies of installed packages that depend on
- * a package.
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
- * @return array|false
- */
- function getDependentPackageDependencies(&$pkg)
- {
- $data = $this->_getDepDB();
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- $depend = $this->getDependentPackages($pkg);
- if (!$depend) {
- return false;
- }
-
- $dependencies = array();
- foreach ($depend as $info) {
- $temp = $this->getDependencies($info);
- foreach ($temp as $dep) {
- if (
- isset($dep['dep'], $dep['dep']['channel'], $dep['dep']['name']) &&
- strtolower($dep['dep']['channel']) == $channel &&
- strtolower($dep['dep']['name']) == $package
- ) {
- if (!isset($dependencies[$info['channel']])) {
- $dependencies[$info['channel']] = array();
- }
-
- if (!isset($dependencies[$info['channel']][$info['package']])) {
- $dependencies[$info['channel']][$info['package']] = array();
- }
- $dependencies[$info['channel']][$info['package']][] = $dep;
- }
- }
- }
-
- return $dependencies;
- }
-
- /**
- * Get a list of dependencies of this installed package
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
- * @return array|false
- */
- function getDependencies(&$pkg)
- {
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- $data = $this->_getDepDB();
- if (isset($data['dependencies'][$channel][$package])) {
- return $data['dependencies'][$channel][$package];
- }
-
- return false;
- }
-
- /**
- * Determine whether $parent depends on $child, near or deep
- * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2
- * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2
- */
- function dependsOn($parent, $child)
- {
- $c = array();
- $this->_getDepDB();
- return $this->_dependsOn($parent, $child, $c);
- }
-
- function _dependsOn($parent, $child, &$checked)
- {
- if (is_object($parent)) {
- $channel = strtolower($parent->getChannel());
- $package = strtolower($parent->getPackage());
- } else {
- $channel = strtolower($parent['channel']);
- $package = strtolower($parent['package']);
- }
-
- if (is_object($child)) {
- $depchannel = strtolower($child->getChannel());
- $deppackage = strtolower($child->getPackage());
- } else {
- $depchannel = strtolower($child['channel']);
- $deppackage = strtolower($child['package']);
- }
-
- if (isset($checked[$channel][$package][$depchannel][$deppackage])) {
- return false; // avoid endless recursion
- }
-
- $checked[$channel][$package][$depchannel][$deppackage] = true;
- if (!isset($this->_cache['dependencies'][$channel][$package])) {
- return false;
- }
-
- foreach ($this->_cache['dependencies'][$channel][$package] as $info) {
- if (isset($info['dep']['uri'])) {
- if (is_object($child)) {
- if ($info['dep']['uri'] == $child->getURI()) {
- return true;
- }
- } elseif (isset($child['uri'])) {
- if ($info['dep']['uri'] == $child['uri']) {
- return true;
- }
- }
- return false;
- }
-
- if (strtolower($info['dep']['channel']) == $depchannel &&
- strtolower($info['dep']['name']) == $deppackage) {
- return true;
- }
- }
-
- foreach ($this->_cache['dependencies'][$channel][$package] as $info) {
- if (isset($info['dep']['uri'])) {
- if ($this->_dependsOn(array(
- 'uri' => $info['dep']['uri'],
- 'package' => $info['dep']['name']), $child, $checked)) {
- return true;
- }
- } else {
- if ($this->_dependsOn(array(
- 'channel' => $info['dep']['channel'],
- 'package' => $info['dep']['name']), $child, $checked)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Register dependencies of a package that is being installed or upgraded
- * @param PEAR_PackageFile_v2|PEAR_PackageFile_v2
- */
- function installPackage(&$package)
- {
- $data = $this->_getDepDB();
- unset($this->_cache);
- $this->_setPackageDeps($data, $package);
- $this->_writeDepDB($data);
- }
-
- /**
- * Remove dependencies of a package that is being uninstalled, or upgraded.
- *
- * Upgraded packages first uninstall, then install
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array If an array, then it must have
- * indices 'channel' and 'package'
- */
- function uninstallPackage(&$pkg)
- {
- $data = $this->_getDepDB();
- unset($this->_cache);
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- if (!isset($data['dependencies'][$channel][$package])) {
- return true;
- }
-
- foreach ($data['dependencies'][$channel][$package] as $dep) {
- $found = false;
- $depchannel = isset($dep['dep']['uri']) ? '__uri' : strtolower($dep['dep']['channel']);
- $depname = strtolower($dep['dep']['name']);
- if (isset($data['packages'][$depchannel][$depname])) {
- foreach ($data['packages'][$depchannel][$depname] as $i => $info) {
- if ($info['channel'] == $channel && $info['package'] == $package) {
- $found = true;
- break;
- }
- }
- }
-
- if ($found) {
- unset($data['packages'][$depchannel][$depname][$i]);
- if (!count($data['packages'][$depchannel][$depname])) {
- unset($data['packages'][$depchannel][$depname]);
- if (!count($data['packages'][$depchannel])) {
- unset($data['packages'][$depchannel]);
- }
- } else {
- $data['packages'][$depchannel][$depname] =
- array_values($data['packages'][$depchannel][$depname]);
- }
- }
- }
-
- unset($data['dependencies'][$channel][$package]);
- if (!count($data['dependencies'][$channel])) {
- unset($data['dependencies'][$channel]);
- }
-
- if (!count($data['dependencies'])) {
- unset($data['dependencies']);
- }
-
- if (!count($data['packages'])) {
- unset($data['packages']);
- }
-
- $this->_writeDepDB($data);
- }
-
- /**
- * Rebuild the dependency DB by reading registry entries.
- * @return true|PEAR_Error
- */
- function rebuildDB()
- {
- $depdb = array('_version' => $this->_version);
- if (!$this->hasWriteAccess()) {
- // allow startup for read-only with older Registry
- return $depdb;
- }
-
- $packages = $this->_registry->listAllPackages();
- if (PEAR::isError($packages)) {
- return $packages;
- }
-
- foreach ($packages as $channel => $ps) {
- foreach ($ps as $package) {
- $package = $this->_registry->getPackage($package, $channel);
- if (PEAR::isError($package)) {
- return $package;
- }
- $this->_setPackageDeps($depdb, $package);
- }
- }
-
- $error = $this->_writeDepDB($depdb);
- if (PEAR::isError($error)) {
- return $error;
- }
-
- $this->_cache = $depdb;
- return true;
- }
-
- /**
- * Register usage of the dependency DB to prevent race conditions
- * @param int one of the LOCK_* constants
- * @return true|PEAR_Error
- * @access private
- */
- function _lock($mode = LOCK_EX)
- {
- if (stristr(php_uname(), 'Windows 9')) {
- return true;
- }
-
- if ($mode != LOCK_UN && is_resource($this->_lockFp)) {
- // XXX does not check type of lock (LOCK_SH/LOCK_EX)
- return true;
- }
-
- $open_mode = 'w';
- // XXX People reported problems with LOCK_SH and 'w'
- if ($mode === LOCK_SH) {
- if (!file_exists($this->_lockfile)) {
- touch($this->_lockfile);
- } elseif (!is_file($this->_lockfile)) {
- return PEAR::raiseError('could not create Dependency lock file, ' .
- 'it exists and is not a regular file');
- }
- $open_mode = 'r';
- }
-
- if (!is_resource($this->_lockFp)) {
- $this->_lockFp = @fopen($this->_lockfile, $open_mode);
- }
-
- if (!is_resource($this->_lockFp)) {
- return PEAR::raiseError("could not create Dependency lock file" .
- (isset($php_errormsg) ? ": " . $php_errormsg : ""));
- }
-
- if (!(int)flock($this->_lockFp, $mode)) {
- switch ($mode) {
- case LOCK_SH: $str = 'shared'; break;
- case LOCK_EX: $str = 'exclusive'; break;
- case LOCK_UN: $str = 'unlock'; break;
- default: $str = 'unknown'; break;
- }
-
- return PEAR::raiseError("could not acquire $str lock ($this->_lockfile)");
- }
-
- return true;
- }
-
- /**
- * Release usage of dependency DB
- * @return true|PEAR_Error
- * @access private
- */
- function _unlock()
- {
- $ret = $this->_lock(LOCK_UN);
- if (is_resource($this->_lockFp)) {
- fclose($this->_lockFp);
- }
- $this->_lockFp = null;
- return $ret;
- }
-
- /**
- * Load the dependency database from disk, or return the cache
- * @return array|PEAR_Error
- */
- function _getDepDB()
- {
- if (!$this->hasWriteAccess()) {
- return array('_version' => $this->_version);
- }
-
- if (isset($this->_cache)) {
- return $this->_cache;
- }
-
- if (!$fp = fopen($this->_depdb, 'r')) {
- $err = PEAR::raiseError("Could not open dependencies file `".$this->_depdb."'");
- return $err;
- }
-
- clearstatcache();
- fclose($fp);
- $data = unserialize(file_get_contents($this->_depdb));
- $this->_cache = $data;
- return $data;
- }
-
- /**
- * Write out the dependency database to disk
- * @param array the database
- * @return true|PEAR_Error
- * @access private
- */
- function _writeDepDB(&$deps)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- if (!$fp = fopen($this->_depdb, 'wb')) {
- $this->_unlock();
- return PEAR::raiseError("Could not open dependencies file `".$this->_depdb."' for writing");
- }
-
- fwrite($fp, serialize($deps));
- fclose($fp);
- $this->_unlock();
- $this->_cache = $deps;
- return true;
- }
-
- /**
- * Register all dependencies from a package in the dependencies database, in essence
- * "installing" the package's dependency information
- * @param array the database
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @access private
- */
- function _setPackageDeps(&$data, &$pkg)
- {
- $pkg->setConfig($this->_config);
- if ($pkg->getPackagexmlVersion() == '1.0') {
- $gen = &$pkg->getDefaultGenerator();
- $deps = $gen->dependenciesToV2();
- } else {
- $deps = $pkg->getDeps(true);
- }
-
- if (!$deps) {
- return;
- }
-
- if (!is_array($data)) {
- $data = array();
- }
-
- if (!isset($data['dependencies'])) {
- $data['dependencies'] = array();
- }
-
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
-
- if (!isset($data['dependencies'][$channel])) {
- $data['dependencies'][$channel] = array();
- }
-
- $data['dependencies'][$channel][$package] = array();
- if (isset($deps['required']['package'])) {
- if (!isset($deps['required']['package'][0])) {
- $deps['required']['package'] = array($deps['required']['package']);
- }
-
- foreach ($deps['required']['package'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'required');
- }
- }
-
- if (isset($deps['optional']['package'])) {
- if (!isset($deps['optional']['package'][0])) {
- $deps['optional']['package'] = array($deps['optional']['package']);
- }
-
- foreach ($deps['optional']['package'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional');
- }
- }
-
- if (isset($deps['required']['subpackage'])) {
- if (!isset($deps['required']['subpackage'][0])) {
- $deps['required']['subpackage'] = array($deps['required']['subpackage']);
- }
-
- foreach ($deps['required']['subpackage'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'required');
- }
- }
-
- if (isset($deps['optional']['subpackage'])) {
- if (!isset($deps['optional']['subpackage'][0])) {
- $deps['optional']['subpackage'] = array($deps['optional']['subpackage']);
- }
-
- foreach ($deps['optional']['subpackage'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional');
- }
- }
-
- if (isset($deps['group'])) {
- if (!isset($deps['group'][0])) {
- $deps['group'] = array($deps['group']);
- }
-
- foreach ($deps['group'] as $group) {
- if (isset($group['package'])) {
- if (!isset($group['package'][0])) {
- $group['package'] = array($group['package']);
- }
-
- foreach ($group['package'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional',
- $group['attribs']['name']);
- }
- }
-
- if (isset($group['subpackage'])) {
- if (!isset($group['subpackage'][0])) {
- $group['subpackage'] = array($group['subpackage']);
- }
-
- foreach ($group['subpackage'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional',
- $group['attribs']['name']);
- }
- }
- }
- }
-
- if ($data['dependencies'][$channel][$package] == array()) {
- unset($data['dependencies'][$channel][$package]);
- if (!count($data['dependencies'][$channel])) {
- unset($data['dependencies'][$channel]);
- }
- }
- }
-
- /**
- * @param array the database
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param array the specific dependency
- * @param required|optional whether this is a required or an optional dep
- * @param string|false dependency group this dependency is from, or false for ordinary dep
- */
- function _registerDep(&$data, &$pkg, $dep, $type, $group = false)
- {
- $info = array(
- 'dep' => $dep,
- 'type' => $type,
- 'group' => $group
- );
-
- $dep = array_map('strtolower', $dep);
- $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri';
- if (!isset($data['dependencies'])) {
- $data['dependencies'] = array();
- }
-
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
-
- if (!isset($data['dependencies'][$channel])) {
- $data['dependencies'][$channel] = array();
- }
-
- if (!isset($data['dependencies'][$channel][$package])) {
- $data['dependencies'][$channel][$package] = array();
- }
-
- $data['dependencies'][$channel][$package][] = $info;
- if (isset($data['packages'][$depchannel][$dep['name']])) {
- $found = false;
- foreach ($data['packages'][$depchannel][$dep['name']] as $i => $p) {
- if ($p['channel'] == $channel && $p['package'] == $package) {
- $found = true;
- break;
- }
- }
- } else {
- if (!isset($data['packages'])) {
- $data['packages'] = array();
- }
-
- if (!isset($data['packages'][$depchannel])) {
- $data['packages'][$depchannel] = array();
- }
-
- if (!isset($data['packages'][$depchannel][$dep['name']])) {
- $data['packages'][$depchannel][$dep['name']] = array();
- }
-
- $found = false;
- }
-
- if (!$found) {
- $data['packages'][$depchannel][$dep['name']][] = array(
- 'channel' => $channel,
- 'package' => $package
- );
- }
- }
-}
-/**
- * PEAR_Dependency2, advanced dependency validation
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Required for the PEAR_VALIDATE_* constants
- */
-require_once 'PEAR/Validate.php';
-
-/**
- * Dependency check for PEAR packages
- *
- * This class handles both version 1.0 and 2.0 dependencies
- * WARNING: *any* changes to this class must be duplicated in the
- * test_PEAR_Dependency2 class found in tests/PEAR_Dependency2/setup.php.inc,
- * or unit tests will not actually validate the changes
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Dependency2
-{
- /**
- * One of the PEAR_VALIDATE_* states
- * @see PEAR_VALIDATE_NORMAL
- * @var integer
- */
- var $_state;
-
- /**
- * Command-line options to install/upgrade/uninstall commands
- * @param array
- */
- var $_options;
-
- /**
- * @var OS_Guess
- */
- var $_os;
-
- /**
- * @var PEAR_Registry
- */
- var $_registry;
-
- /**
- * @var PEAR_Config
- */
- var $_config;
-
- /**
- * @var PEAR_DependencyDB
- */
- var $_dependencydb;
-
- /**
- * Output of PEAR_Registry::parsedPackageName()
- * @var array
- */
- var $_currentPackage;
-
- /**
- * @param PEAR_Config
- * @param array installation options
- * @param array format of PEAR_Registry::parsedPackageName()
- * @param int installation state (one of PEAR_VALIDATE_*)
- */
- function __construct(&$config, $installoptions, $package,
- $state = PEAR_VALIDATE_INSTALLING)
- {
- $this->_config = &$config;
- if (!class_exists('PEAR_DependencyDB')) {
- require_once 'PEAR/DependencyDB.php';
- }
-
- if (isset($installoptions['packagingroot'])) {
- // make sure depdb is in the right location
- $config->setInstallRoot($installoptions['packagingroot']);
- }
-
- $this->_registry = &$config->getRegistry();
- $this->_dependencydb = &PEAR_DependencyDB::singleton($config);
- if (isset($installoptions['packagingroot'])) {
- $config->setInstallRoot(false);
- }
-
- $this->_options = $installoptions;
- $this->_state = $state;
- if (!class_exists('OS_Guess')) {
- require_once 'OS/Guess.php';
- }
-
- $this->_os = new OS_Guess;
- $this->_currentPackage = $package;
- }
-
- function _getExtraString($dep)
- {
- $extra = ' (';
- if (isset($dep['uri'])) {
- return '';
- }
-
- if (isset($dep['recommended'])) {
- $extra .= 'recommended version ' . $dep['recommended'];
- } else {
- if (isset($dep['min'])) {
- $extra .= 'version >= ' . $dep['min'];
- }
-
- if (isset($dep['max'])) {
- if ($extra != ' (') {
- $extra .= ', ';
- }
- $extra .= 'version <= ' . $dep['max'];
- }
-
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- if ($extra != ' (') {
- $extra .= ', ';
- }
-
- $extra .= 'excluded versions: ';
- foreach ($dep['exclude'] as $i => $exclude) {
- if ($i) {
- $extra .= ', ';
- }
- $extra .= $exclude;
- }
- }
- }
-
- $extra .= ')';
- if ($extra == ' ()') {
- $extra = '';
- }
-
- return $extra;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function getPHP_OS()
- {
- return PHP_OS;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function getsysname()
- {
- return $this->_os->getSysname();
- }
-
- /**
- * Specify a dependency on an OS. Use arch for detailed os/processor information
- *
- * There are two generic OS dependencies that will be the most common, unix and windows.
- * Other options are linux, freebsd, darwin (OS X), sunos, irix, hpux, aix
- */
- function validateOsDependency($dep)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING && $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- if ($dep['name'] == '*') {
- return true;
- }
-
- $not = isset($dep['conflicts']) ? true : false;
- switch (strtolower($dep['name'])) {
- case 'windows' :
- if ($not) {
- if (strtolower(substr($this->getPHP_OS(), 0, 3)) == 'win') {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Cannot install %s on Windows");
- }
-
- return $this->warning("warning: Cannot install %s on Windows");
- }
- } else {
- if (strtolower(substr($this->getPHP_OS(), 0, 3)) != 'win') {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Can only install %s on Windows");
- }
-
- return $this->warning("warning: Can only install %s on Windows");
- }
- }
- break;
- case 'unix' :
- $unices = array('linux', 'freebsd', 'darwin', 'sunos', 'irix', 'hpux', 'aix');
- if ($not) {
- if (in_array($this->getSysname(), $unices)) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Cannot install %s on any Unix system");
- }
-
- return $this->warning( "warning: Cannot install %s on any Unix system");
- }
- } else {
- if (!in_array($this->getSysname(), $unices)) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Can only install %s on a Unix system");
- }
-
- return $this->warning("warning: Can only install %s on a Unix system");
- }
- }
- break;
- default :
- if ($not) {
- if (strtolower($dep['name']) == strtolower($this->getSysname())) {
- if (!isset($this->_options['nodeps']) &&
- !isset($this->_options['force'])) {
- return $this->raiseError('Cannot install %s on ' . $dep['name'] .
- ' operating system');
- }
-
- return $this->warning('warning: Cannot install %s on ' .
- $dep['name'] . ' operating system');
- }
- } else {
- if (strtolower($dep['name']) != strtolower($this->getSysname())) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('Cannot install %s on ' .
- $this->getSysname() .
- ' operating system, can only install on ' . $dep['name']);
- }
-
- return $this->warning('warning: Cannot install %s on ' .
- $this->getSysname() .
- ' operating system, can only install on ' . $dep['name']);
- }
- }
- }
- return true;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function matchSignature($pattern)
- {
- return $this->_os->matchSignature($pattern);
- }
-
- /**
- * Specify a complex dependency on an OS/processor/kernel version,
- * Use OS for simple operating system dependency.
- *
- * This is the only dependency that accepts an eregable pattern. The pattern
- * will be matched against the php_uname() output parsed by OS_Guess
- */
- function validateArchDependency($dep)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING) {
- return true;
- }
-
- $not = isset($dep['conflicts']) ? true : false;
- if (!$this->matchSignature($dep['pattern'])) {
- if (!$not) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s Architecture dependency failed, does not ' .
- 'match "' . $dep['pattern'] . '"');
- }
-
- return $this->warning('warning: %s Architecture dependency failed, does ' .
- 'not match "' . $dep['pattern'] . '"');
- }
-
- return true;
- }
-
- if ($not) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s Architecture dependency failed, required "' .
- $dep['pattern'] . '"');
- }
-
- return $this->warning('warning: %s Architecture dependency failed, ' .
- 'required "' . $dep['pattern'] . '"');
- }
-
- return true;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function extension_loaded($name)
- {
- return extension_loaded($name);
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function phpversion($name = null)
- {
- if ($name !== null) {
- return phpversion($name);
- }
-
- return phpversion();
- }
-
- function validateExtensionDependency($dep, $required = true)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING &&
- $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- $loaded = $this->extension_loaded($dep['name']);
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- }
-
- if (!isset($dep['min']) && !isset($dep['max']) &&
- !isset($dep['recommended']) && !isset($dep['exclude'])
- ) {
- if ($loaded) {
- if (isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return $this->warning('warning: %s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return true;
- }
-
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if ($required) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return $this->warning('warning: %s requires PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return $this->warning('%s can optionally use PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- if (!$loaded) {
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if (!$required) {
- return $this->warning('%s can optionally use PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP extension "' . $dep['name'] .
- '"' . $extra);
- }
-
- return $this->warning('warning: %s requires PHP extension "' . $dep['name'] .
- '"' . $extra);
- }
-
- $version = (string) $this->phpversion($dep['name']);
- if (empty($version)) {
- $version = '0';
- }
-
- $fail = false;
- if (isset($dep['min']) && !version_compare($version, $dep['min'], '>=')) {
- $fail = true;
- }
-
- if (isset($dep['max']) && !version_compare($version, $dep['max'], '<=')) {
- $fail = true;
- }
-
- if ($fail && !isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP extension "' . $dep['name'] .
- '"' . $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s requires PHP extension "' . $dep['name'] .
- '"' . $extra . ', installed version is ' . $version);
- } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail && isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
-
- if (isset($dep['exclude'])) {
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($version, $exclude, '==')) {
- if (isset($dep['conflicts'])) {
- continue;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s is not compatible with PHP extension "' .
- $dep['name'] . '" version ' .
- $exclude);
- }
-
- return $this->warning('warning: %s is not compatible with PHP extension "' .
- $dep['name'] . '" version ' .
- $exclude);
- } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
- }
- }
-
- if (isset($dep['recommended'])) {
- if (version_compare($version, $dep['recommended'], '==')) {
- return true;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s dependency: PHP extension ' . $dep['name'] .
- ' version "' . $version . '"' .
- ' is not the recommended version "' . $dep['recommended'] .
- '", but may be compatible, use --force to install');
- }
-
- return $this->warning('warning: %s dependency: PHP extension ' .
- $dep['name'] . ' version "' . $version . '"' .
- ' is not the recommended version "' . $dep['recommended'].'"');
- }
-
- return true;
- }
-
- function validatePhpDependency($dep)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING &&
- $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- $version = $this->phpversion();
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- }
-
- if (isset($dep['min'])) {
- if (!version_compare($version, $dep['min'], '>=')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
- }
-
- if (isset($dep['max'])) {
- if (!version_compare($version, $dep['max'], '<=')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
- }
-
- if (isset($dep['exclude'])) {
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($version, $exclude, '==')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s is not compatible with PHP version ' .
- $exclude);
- }
-
- return $this->warning(
- 'warning: %s is not compatible with PHP version ' .
- $exclude);
- }
- }
- }
-
- return true;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function getPEARVersion()
- {
- return '1.9.5';
- }
-
- function validatePearinstallerDependency($dep)
- {
- $pearversion = $this->getPEARVersion();
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- }
-
- if (version_compare($pearversion, $dep['min'], '<')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
-
- return $this->warning('warning: %s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
-
- if (isset($dep['max'])) {
- if (version_compare($pearversion, $dep['max'], '>')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
-
- return $this->warning('warning: %s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
- }
-
- if (isset($dep['exclude'])) {
- if (!isset($dep['exclude'][0])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($exclude, $pearversion, '==')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s is not compatible with PEAR Installer ' .
- 'version ' . $exclude);
- }
-
- return $this->warning('warning: %s is not compatible with PEAR ' .
- 'Installer version ' . $exclude);
- }
- }
- }
-
- return true;
- }
-
- function validateSubpackageDependency($dep, $required, $params)
- {
- return $this->validatePackageDependency($dep, $required, $params);
- }
-
- /**
- * @param array dependency information (2.0 format)
- * @param boolean whether this is a required dependency
- * @param array a list of downloaded packages to be installed, if any
- * @param boolean if true, then deps on pear.php.net that fail will also check
- * against pecl.php.net packages to accommodate extensions that have
- * moved to pecl.php.net from pear.php.net
- */
- function validatePackageDependency($dep, $required, $params, $depv1 = false)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING &&
- $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- if (isset($dep['providesextension'])) {
- if ($this->extension_loaded($dep['providesextension'])) {
- $save = $dep;
- $subdep = $dep;
- $subdep['name'] = $subdep['providesextension'];
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->validateExtensionDependency($subdep, $required);
- PEAR::popErrorHandling();
- if (!PEAR::isError($ret)) {
- return true;
- }
- }
- }
-
- if ($this->_state == PEAR_VALIDATE_INSTALLING) {
- return $this->_validatePackageInstall($dep, $required, $depv1);
- }
-
- if ($this->_state == PEAR_VALIDATE_DOWNLOADING) {
- return $this->_validatePackageDownload($dep, $required, $params, $depv1);
- }
- }
-
- function _validatePackageDownload($dep, $required, $params, $depv1 = false)
- {
- $dep['package'] = $dep['name'];
- if (isset($dep['uri'])) {
- $dep['channel'] = '__uri';
- }
-
- $depname = $this->_registry->parsedPackageNameToString($dep, true);
- $found = false;
- foreach ($params as $param) {
- if ($param->isEqual(
- array('package' => $dep['name'],
- 'channel' => $dep['channel']))) {
- $found = true;
- break;
- }
-
- if ($depv1 && $dep['channel'] == 'pear.php.net') {
- if ($param->isEqual(
- array('package' => $dep['name'],
- 'channel' => 'pecl.php.net'))) {
- $found = true;
- break;
- }
- }
- }
-
- if (!$found && isset($dep['providesextension'])) {
- foreach ($params as $param) {
- if ($param->isExtension($dep['providesextension'])) {
- $found = true;
- break;
- }
- }
- }
-
- if ($found) {
- $version = $param->getVersion();
- $installed = false;
- $downloaded = true;
- } else {
- if ($this->_registry->packageExists($dep['name'], $dep['channel'])) {
- $installed = true;
- $downloaded = false;
- $version = $this->_registry->packageinfo($dep['name'], 'version',
- $dep['channel']);
- } else {
- if ($dep['channel'] == 'pecl.php.net' && $this->_registry->packageExists($dep['name'],
- 'pear.php.net')) {
- $installed = true;
- $downloaded = false;
- $version = $this->_registry->packageinfo($dep['name'], 'version',
- 'pear.php.net');
- } else {
- $version = 'not installed or downloaded';
- $installed = false;
- $downloaded = false;
- }
- }
- }
-
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude']) && !is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- if (!isset($dep['min']) && !isset($dep['max']) &&
- !isset($dep['recommended']) && !isset($dep['exclude'])
- ) {
- if ($installed || $downloaded) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (isset($dep['conflicts'])) {
- $rest = '';
- if ($version) {
- $rest = ", $installed version is " . $version;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra . $rest);
- }
-
- return $this->warning('warning: %s conflicts with package "' . $depname . '"' . $extra . $rest);
- }
-
- return true;
- }
-
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if ($required) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('warning: %s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('%s can optionally use package "' . $depname . '"' . $extra);
- }
-
- if (!$installed && !$downloaded) {
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if ($required) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('warning: %s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('%s can optionally use package "' . $depname . '"' . $extra);
- }
-
- $fail = false;
- if (isset($dep['min']) && version_compare($version, $dep['min'], '<')) {
- $fail = true;
- }
-
- if (isset($dep['max']) && version_compare($version, $dep['max'], '>')) {
- $fail = true;
- }
-
- if ($fail && !isset($dep['conflicts'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- $dep['package'] = $dep['name'];
- $dep = $this->_registry->parsedPackageNameToString($dep, true);
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
-
- return $this->warning('warning: %s requires package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail &&
- isset($dep['conflicts']) && !isset($dep['exclude'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra .
- ", $installed version is " . $version);
- }
-
- return $this->warning('warning: %s conflicts with package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
-
- if (isset($dep['exclude'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($version, $exclude, '==') && !isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) &&
- !isset($this->_options['force'])
- ) {
- return $this->raiseError('%s is not compatible with ' .
- $installed . ' package "' .
- $depname . '" version ' .
- $exclude);
- }
-
- return $this->warning('warning: %s is not compatible with ' .
- $installed . ' package "' .
- $depname . '" version ' .
- $exclude);
- } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
-
- return $this->warning('warning: %s conflicts with package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
- }
- }
-
- if (isset($dep['recommended'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (version_compare($version, $dep['recommended'], '==')) {
- return true;
- }
-
- if (!$found && $installed) {
- $param = $this->_registry->getPackage($dep['name'], $dep['channel']);
- }
-
- if ($param) {
- $found = false;
- foreach ($params as $parent) {
- if ($parent->isEqual($this->_currentPackage)) {
- $found = true;
- break;
- }
- }
-
- if ($found) {
- if ($param->isCompatible($parent)) {
- return true;
- }
- } else { // this is for validPackage() calls
- $parent = $this->_registry->getPackage($this->_currentPackage['package'],
- $this->_currentPackage['channel']);
- if ($parent !== null && $param->isCompatible($parent)) {
- return true;
- }
- }
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force']) &&
- !isset($this->_options['loose'])
- ) {
- return $this->raiseError('%s dependency package "' . $depname .
- '" ' . $installed . ' version ' . $version .
- ' is not the recommended version ' . $dep['recommended'] .
- ', but may be compatible, use --force to install');
- }
-
- return $this->warning('warning: %s dependency package "' . $depname .
- '" ' . $installed . ' version ' . $version .
- ' is not the recommended version ' . $dep['recommended']);
- }
-
- return true;
- }
-
- function _validatePackageInstall($dep, $required, $depv1 = false)
- {
- return $this->_validatePackageDownload($dep, $required, array(), $depv1);
- }
-
- /**
- * Verify that uninstalling packages passed in to command line is OK.
- *
- * @param PEAR_Installer $dl
- * @return PEAR_Error|true
- */
- function validatePackageUninstall(&$dl)
- {
- if (PEAR::isError($this->_dependencydb)) {
- return $this->_dependencydb;
- }
-
- $params = array();
- // construct an array of "downloaded" packages to fool the package dependency checker
- // into using these to validate uninstalls of circular dependencies
- $downloaded = &$dl->getUninstallPackages();
- foreach ($downloaded as $i => $pf) {
- if (!class_exists('PEAR_Downloader_Package')) {
- require_once 'PEAR/Downloader/Package.php';
- }
- $dp = new PEAR_Downloader_Package($dl);
- $dp->setPackageFile($downloaded[$i]);
- $params[$i] = $dp;
- }
-
- // check cache
- $memyselfandI = strtolower($this->_currentPackage['channel']) . '/' .
- strtolower($this->_currentPackage['package']);
- if (isset($dl->___uninstall_package_cache)) {
- $badpackages = $dl->___uninstall_package_cache;
- if (isset($badpackages[$memyselfandI]['warnings'])) {
- foreach ($badpackages[$memyselfandI]['warnings'] as $warning) {
- $dl->log(0, $warning[0]);
- }
- }
-
- if (isset($badpackages[$memyselfandI]['errors'])) {
- foreach ($badpackages[$memyselfandI]['errors'] as $error) {
- if (is_array($error)) {
- $dl->log(0, $error[0]);
- } else {
- $dl->log(0, $error->getMessage());
- }
- }
-
- if (isset($this->_options['nodeps']) || isset($this->_options['force'])) {
- return $this->warning(
- 'warning: %s should not be uninstalled, other installed packages depend ' .
- 'on this package');
- }
-
- return $this->raiseError(
- '%s cannot be uninstalled, other installed packages depend on this package');
- }
-
- return true;
- }
-
- // first, list the immediate parents of each package to be uninstalled
- $perpackagelist = array();
- $allparents = array();
- foreach ($params as $i => $param) {
- $a = array(
- 'channel' => strtolower($param->getChannel()),
- 'package' => strtolower($param->getPackage())
- );
-
- $deps = $this->_dependencydb->getDependentPackages($a);
- if ($deps) {
- foreach ($deps as $d) {
- $pardeps = $this->_dependencydb->getDependencies($d);
- foreach ($pardeps as $dep) {
- if (strtolower($dep['dep']['channel']) == $a['channel'] &&
- strtolower($dep['dep']['name']) == $a['package']) {
- if (!isset($perpackagelist[$a['channel'] . '/' . $a['package']])) {
- $perpackagelist[$a['channel'] . '/' . $a['package']] = array();
- }
- $perpackagelist[$a['channel'] . '/' . $a['package']][]
- = array($d['channel'] . '/' . $d['package'], $dep);
- if (!isset($allparents[$d['channel'] . '/' . $d['package']])) {
- $allparents[$d['channel'] . '/' . $d['package']] = array();
- }
- if (!isset($allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']])) {
- $allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']] = array();
- }
- $allparents[$d['channel'] . '/' . $d['package']]
- [$a['channel'] . '/' . $a['package']][]
- = array($d, $dep);
- }
- }
- }
- }
- }
-
- // next, remove any packages from the parents list that are not installed
- $remove = array();
- foreach ($allparents as $parent => $d1) {
- foreach ($d1 as $d) {
- if ($this->_registry->packageExists($d[0][0]['package'], $d[0][0]['channel'])) {
- continue;
- }
- $remove[$parent] = true;
- }
- }
-
- // next remove any packages from the parents list that are not passed in for
- // uninstallation
- foreach ($allparents as $parent => $d1) {
- foreach ($d1 as $d) {
- foreach ($params as $param) {
- if (strtolower($param->getChannel()) == $d[0][0]['channel'] &&
- strtolower($param->getPackage()) == $d[0][0]['package']) {
- // found it
- continue 3;
- }
- }
- $remove[$parent] = true;
- }
- }
-
- // remove all packages whose dependencies fail
- // save which ones failed for error reporting
- $badchildren = array();
- do {
- $fail = false;
- foreach ($remove as $package => $unused) {
- if (!isset($allparents[$package])) {
- continue;
- }
-
- foreach ($allparents[$package] as $kid => $d1) {
- foreach ($d1 as $depinfo) {
- if ($depinfo[1]['type'] != 'optional') {
- if (isset($badchildren[$kid])) {
- continue;
- }
- $badchildren[$kid] = true;
- $remove[$kid] = true;
- $fail = true;
- continue 2;
- }
- }
- }
- if ($fail) {
- // start over, we removed some children
- continue 2;
- }
- }
- } while ($fail);
-
- // next, construct the list of packages that can't be uninstalled
- $badpackages = array();
- $save = $this->_currentPackage;
- foreach ($perpackagelist as $package => $packagedeps) {
- foreach ($packagedeps as $parent) {
- if (!isset($remove[$parent[0]])) {
- continue;
- }
-
- $packagename = $this->_registry->parsePackageName($parent[0]);
- $packagename['channel'] = $this->_registry->channelAlias($packagename['channel']);
- $pa = $this->_registry->getPackage($packagename['package'], $packagename['channel']);
- $packagename['package'] = $pa->getPackage();
- $this->_currentPackage = $packagename;
- // parent is not present in uninstall list, make sure we can actually
- // uninstall it (parent dep is optional)
- $parentname['channel'] = $this->_registry->channelAlias($parent[1]['dep']['channel']);
- $pa = $this->_registry->getPackage($parent[1]['dep']['name'], $parent[1]['dep']['channel']);
- $parentname['package'] = $pa->getPackage();
- $parent[1]['dep']['package'] = $parentname['package'];
- $parent[1]['dep']['channel'] = $parentname['channel'];
- if ($parent[1]['type'] == 'optional') {
- $test = $this->_validatePackageUninstall($parent[1]['dep'], false, $dl);
- if ($test !== true) {
- $badpackages[$package]['warnings'][] = $test;
- }
- } else {
- $test = $this->_validatePackageUninstall($parent[1]['dep'], true, $dl);
- if ($test !== true) {
- $badpackages[$package]['errors'][] = $test;
- }
- }
- }
- }
-
- $this->_currentPackage = $save;
- $dl->___uninstall_package_cache = $badpackages;
- if (isset($badpackages[$memyselfandI])) {
- if (isset($badpackages[$memyselfandI]['warnings'])) {
- foreach ($badpackages[$memyselfandI]['warnings'] as $warning) {
- $dl->log(0, $warning[0]);
- }
- }
-
- if (isset($badpackages[$memyselfandI]['errors'])) {
- foreach ($badpackages[$memyselfandI]['errors'] as $error) {
- if (is_array($error)) {
- $dl->log(0, $error[0]);
- } else {
- $dl->log(0, $error->getMessage());
- }
- }
-
- if (isset($this->_options['nodeps']) || isset($this->_options['force'])) {
- return $this->warning(
- 'warning: %s should not be uninstalled, other installed packages depend ' .
- 'on this package');
- }
-
- return $this->raiseError(
- '%s cannot be uninstalled, other installed packages depend on this package');
- }
- }
-
- return true;
- }
-
- function _validatePackageUninstall($dep, $required, $dl)
- {
- $depname = $this->_registry->parsedPackageNameToString($dep, true);
- $version = $this->_registry->packageinfo($dep['package'], 'version', $dep['channel']);
- if (!$version) {
- return true;
- }
-
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude']) && !is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- if (isset($dep['conflicts'])) {
- return true; // uninstall OK - these packages conflict (probably installed with --force)
- }
-
- if (!isset($dep['min']) && !isset($dep['max'])) {
- if (!$required) {
- return $this->warning('"' . $depname . '" can be optionally used by ' .
- 'installed package %s' . $extra);
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('"' . $depname . '" is required by ' .
- 'installed package %s' . $extra);
- }
-
- return $this->warning('warning: "' . $depname . '" is required by ' .
- 'installed package %s' . $extra);
- }
-
- $fail = false;
- if (isset($dep['min']) && version_compare($version, $dep['min'], '>=')) {
- $fail = true;
- }
-
- if (isset($dep['max']) && version_compare($version, $dep['max'], '<=')) {
- $fail = true;
- }
-
- // we re-use this variable, preserve the original value
- $saverequired = $required;
- if (!$required) {
- return $this->warning($depname . $extra . ' can be optionally used by installed package' .
- ' "%s"');
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError($depname . $extra . ' is required by installed package' .
- ' "%s"');
- }
-
- return $this->raiseError('warning: ' . $depname . $extra .
- ' is required by installed package "%s"');
- }
-
- /**
- * validate a downloaded package against installed packages
- *
- * As of PEAR 1.4.3, this will only validate
- *
- * @param array|PEAR_Downloader_Package|PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * $pkg package identifier (either
- * array('package' => blah, 'channel' => blah) or an array with
- * index 'info' referencing an object)
- * @param PEAR_Downloader $dl
- * @param array $params full list of packages to install
- * @return true|PEAR_Error
- */
- function validatePackage($pkg, &$dl, $params = array())
- {
- if (is_array($pkg) && isset($pkg['info'])) {
- $deps = $this->_dependencydb->getDependentPackageDependencies($pkg['info']);
- } else {
- $deps = $this->_dependencydb->getDependentPackageDependencies($pkg);
- }
-
- $fail = false;
- if ($deps) {
- if (!class_exists('PEAR_Downloader_Package')) {
- require_once 'PEAR/Downloader/Package.php';
- }
-
- $dp = new PEAR_Downloader_Package($dl);
- if (is_object($pkg)) {
- $dp->setPackageFile($pkg);
- } else {
- $dp->setDownloadURL($pkg);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($deps as $channel => $info) {
- foreach ($info as $package => $ds) {
- foreach ($params as $packd) {
- if (strtolower($packd->getPackage()) == strtolower($package) &&
- $packd->getChannel() == $channel) {
- $dl->log(3, 'skipping installed package check of "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $channel, 'package' => $package),
- true) .
- '", version "' . $packd->getVersion() . '" will be ' .
- 'downloaded and installed');
- continue 2; // jump to next package
- }
- }
-
- foreach ($ds as $d) {
- $checker = new PEAR_Dependency2($this->_config, $this->_options,
- array('channel' => $channel, 'package' => $package), $this->_state);
- $dep = $d['dep'];
- $required = $d['type'] == 'required';
- $ret = $checker->_validatePackageDownload($dep, $required, array(&$dp));
- if (is_array($ret)) {
- $dl->log(0, $ret[0]);
- } elseif (PEAR::isError($ret)) {
- $dl->log(0, $ret->getMessage());
- $fail = true;
- }
- }
- }
- }
- PEAR::popErrorHandling();
- }
-
- if ($fail) {
- return $this->raiseError(
- '%s cannot be installed, conflicts with installed packages');
- }
-
- return true;
- }
-
- /**
- * validate a package.xml 1.0 dependency
- */
- function validateDependency1($dep, $params = array())
- {
- if (!isset($dep['optional'])) {
- $dep['optional'] = 'no';
- }
-
- list($newdep, $type) = $this->normalizeDep($dep);
- if (!$newdep) {
- return $this->raiseError("Invalid Dependency");
- }
-
- if (method_exists($this, "validate{$type}Dependency")) {
- return $this->{"validate{$type}Dependency"}($newdep, $dep['optional'] == 'no',
- $params, true);
- }
- }
-
- /**
- * Convert a 1.0 dep into a 2.0 dep
- */
- function normalizeDep($dep)
- {
- $types = array(
- 'pkg' => 'Package',
- 'ext' => 'Extension',
- 'os' => 'Os',
- 'php' => 'Php'
- );
-
- if (!isset($types[$dep['type']])) {
- return array(false, false);
- }
-
- $type = $types[$dep['type']];
-
- $newdep = array();
- switch ($type) {
- case 'Package' :
- $newdep['channel'] = 'pear.php.net';
- case 'Extension' :
- case 'Os' :
- $newdep['name'] = $dep['name'];
- break;
- }
-
- $dep['rel'] = PEAR_Dependency2::signOperator($dep['rel']);
- switch ($dep['rel']) {
- case 'has' :
- return array($newdep, $type);
- break;
- case 'not' :
- $newdep['conflicts'] = true;
- break;
- case '>=' :
- case '>' :
- $newdep['min'] = $dep['version'];
- if ($dep['rel'] == '>') {
- $newdep['exclude'] = $dep['version'];
- }
- break;
- case '<=' :
- case '<' :
- $newdep['max'] = $dep['version'];
- if ($dep['rel'] == '<') {
- $newdep['exclude'] = $dep['version'];
- }
- break;
- case 'ne' :
- case '!=' :
- $newdep['min'] = '0';
- $newdep['max'] = '100000';
- $newdep['exclude'] = $dep['version'];
- break;
- case '==' :
- $newdep['min'] = $dep['version'];
- $newdep['max'] = $dep['version'];
- break;
- }
- if ($type == 'Php') {
- if (!isset($newdep['min'])) {
- $newdep['min'] = '4.4.0';
- }
-
- if (!isset($newdep['max'])) {
- $newdep['max'] = '6.0.0';
- }
- }
- return array($newdep, $type);
- }
-
- /**
- * Converts text comparing operators to them sign equivalents
- *
- * Example: 'ge' to '>='
- *
- * @access public
- * @param string Operator
- * @return string Sign equivalent
- */
- function signOperator($operator)
- {
- switch($operator) {
- case 'lt': return '<';
- case 'le': return '<=';
- case 'gt': return '>';
- case 'ge': return '>=';
- case 'eq': return '==';
- case 'ne': return '!=';
- default:
- return $operator;
- }
- }
-
- function raiseError($msg)
- {
- if (isset($this->_options['ignore-errors'])) {
- return $this->warning($msg);
- }
-
- return PEAR::raiseError(sprintf($msg, $this->_registry->parsedPackageNameToString(
- $this->_currentPackage, true)));
- }
-
- function warning($msg)
- {
- return array(sprintf($msg, $this->_registry->parsedPackageNameToString(
- $this->_currentPackage, true)));
- }
-}
-
-/**
- * PEAR_Downloader, the PEAR Installer's download utility class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.3.0
- */
-
-/**
- * Needed for constants, extending
- */
-require_once 'PEAR/Common.php';
-
-define('PEAR_INSTALLER_OK', 1);
-define('PEAR_INSTALLER_FAILED', 0);
-define('PEAR_INSTALLER_SKIPPED', -1);
-define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2);
-
-/**
- * Administration class used to download anything from the internet (PEAR Packages,
- * static URLs, xml files)
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.3.0
- */
-class PEAR_Downloader extends PEAR_Common
-{
- /**
- * @var PEAR_Registry
- * @access private
- */
- var $_registry;
-
- /**
- * Preferred Installation State (snapshot, devel, alpha, beta, stable)
- * @var string|null
- * @access private
- */
- var $_preferredState;
-
- /**
- * Options from command-line passed to Install.
- *
- * Recognized options:<br />
- * - onlyreqdeps : install all required dependencies as well
- * - alldeps : install all dependencies, including optional
- * - installroot : base relative path to install files in
- * - force : force a download even if warnings would prevent it
- * - nocompress : download uncompressed tarballs
- * @see PEAR_Command_Install
- * @access private
- * @var array
- */
- var $_options;
-
- /**
- * Downloaded Packages after a call to download().
- *
- * Format of each entry:
- *
- * <code>
- * array('pkg' => 'package_name', 'file' => '/path/to/local/file',
- * 'info' => array() // parsed package.xml
- * );
- * </code>
- * @access private
- * @var array
- */
- var $_downloadedPackages = array();
-
- /**
- * Packages slated for download.
- *
- * This is used to prevent downloading a package more than once should it be a dependency
- * for two packages to be installed.
- * Format of each entry:
- *
- * <pre>
- * array('package_name1' => parsed package.xml, 'package_name2' => parsed package.xml,
- * );
- * </pre>
- * @access private
- * @var array
- */
- var $_toDownload = array();
-
- /**
- * Array of every package installed, with names lower-cased.
- *
- * Format:
- * <code>
- * array('package1' => 0, 'package2' => 1, );
- * </code>
- * @var array
- */
- var $_installed = array();
-
- /**
- * @var array
- * @access private
- */
- var $_errorStack = array();
-
- /**
- * @var boolean
- * @access private
- */
- var $_internalDownload = false;
-
- /**
- * Temporary variable used in sorting packages by dependency in {@link sortPkgDeps()}
- * @var array
- * @access private
- */
- var $_packageSortTree;
-
- /**
- * Temporary directory, or configuration value where downloads will occur
- * @var string
- */
- var $_downloadDir;
-
- /**
- * @param PEAR_Frontend_*
- * @param array
- * @param PEAR_Config
- */
- function __construct($ui = null, $options = array(), $config = null)
- {
- parent::__construct();
- $this->_options = $options;
- if ($config !== null) {
- $this->config = &$config;
- $this->_preferredState = $this->config->get('preferred_state');
- }
- $this->ui = &$ui;
- if (!$this->_preferredState) {
- // don't inadvertantly use a non-set preferred_state
- $this->_preferredState = null;
- }
-
- if ($config !== null) {
- if (isset($this->_options['installroot'])) {
- $this->config->setInstallRoot($this->_options['installroot']);
- }
- $this->_registry = &$config->getRegistry();
- }
-
- if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) {
- $this->_installed = $this->_registry->listAllPackages();
- foreach ($this->_installed as $key => $unused) {
- if (!count($unused)) {
- continue;
- }
- $strtolower = create_function('$a','return strtolower($a);');
- array_walk($this->_installed[$key], $strtolower);
- }
- }
- }
-
- /**
- * Attempt to discover a channel's remote capabilities from
- * its server name
- * @param string
- * @return boolean
- */
- function discover($channel)
- {
- $this->log(1, 'Attempting to discover channel "' . $channel . '"...');
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $callback = $this->ui ? array(&$this, '_downloadCallback') : null;
- if (!class_exists('System')) {
- require_once 'System.php';
- }
-
- $tmpdir = $this->config->get('temp_dir');
- $tmp = System::mktemp('-d -t "' . $tmpdir . '"');
- $a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false);
- PEAR::popErrorHandling();
- if (PEAR::isError($a)) {
- // Attempt to fallback to https automatically.
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $this->log(1, 'Attempting fallback to https instead of http on channel "' . $channel . '"...');
- $a = $this->downloadHttp('https://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false);
- PEAR::popErrorHandling();
- if (PEAR::isError($a)) {
- return false;
- }
- }
-
- list($a, $lastmodified) = $a;
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $b = new PEAR_ChannelFile;
- if ($b->fromXmlFile($a)) {
- unlink($a);
- if ($this->config->get('auto_discover')) {
- $this->_registry->addChannel($b, $lastmodified);
- $alias = $b->getName();
- if ($b->getName() == $this->_registry->channelName($b->getAlias())) {
- $alias = $b->getAlias();
- }
-
- $this->log(1, 'Auto-discovered channel "' . $channel .
- '", alias "' . $alias . '", adding to registry');
- }
-
- return true;
- }
-
- unlink($a);
- return false;
- }
-
- /**
- * For simpler unit-testing
- * @param PEAR_Downloader
- * @return PEAR_Downloader_Package
- */
- function newDownloaderPackage(&$t)
- {
- if (!class_exists('PEAR_Downloader_Package')) {
- require_once 'PEAR/Downloader/Package.php';
- }
- $a = new PEAR_Downloader_Package($t);
- return $a;
- }
-
- /**
- * For simpler unit-testing
- * @param PEAR_Config
- * @param array
- * @param array
- * @param int
- */
- function &getDependency2Object(&$c, $i, $p, $s)
- {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
- $z = new PEAR_Dependency2($c, $i, $p, $s);
- return $z;
- }
-
- function &download($params)
- {
- if (!count($params)) {
- $a = array();
- return $a;
- }
-
- if (!isset($this->_registry)) {
- $this->_registry = &$this->config->getRegistry();
- }
-
- $channelschecked = array();
- // convert all parameters into PEAR_Downloader_Package objects
- foreach ($params as $i => $param) {
- $params[$i] = &$this->newDownloaderPackage($this);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $params[$i]->initialize($param);
- PEAR::staticPopErrorHandling();
- if (!$err) {
- // skip parameters that were missed by preferred_state
- continue;
- }
-
- if (PEAR::isError($err)) {
- if (!isset($this->_options['soft']) && $err->getMessage() !== '') {
- $this->log(0, $err->getMessage());
- }
-
- $params[$i] = false;
- if (is_object($param)) {
- $param = $param->getChannel() . '/' . $param->getPackage();
- }
-
- if (!isset($this->_options['soft'])) {
- $this->log(2, 'Package "' . $param . '" is not valid');
- }
-
- // Message logged above in a specific verbose mode, passing null to not show up on CLI
- $this->pushError(null, PEAR_INSTALLER_SKIPPED);
- } else {
- do {
- if ($params[$i] && $params[$i]->getType() == 'local') {
- // bug #7090 skip channel.xml check for local packages
- break;
- }
-
- if ($params[$i] && !isset($channelschecked[$params[$i]->getChannel()]) &&
- !isset($this->_options['offline'])
- ) {
- $channelschecked[$params[$i]->getChannel()] = true;
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (!class_exists('System')) {
- require_once 'System.php';
- }
-
- $curchannel = &$this->_registry->getChannel($params[$i]->getChannel());
- if (PEAR::isError($curchannel)) {
- PEAR::staticPopErrorHandling();
- return $this->raiseError($curchannel);
- }
-
- if (PEAR::isError($dir = $this->getDownloadDir())) {
- PEAR::staticPopErrorHandling();
- break;
- }
-
- $mirror = $this->config->get('preferred_mirror', null, $params[$i]->getChannel());
- $url = 'http://' . $mirror . '/channel.xml';
- $a = $this->downloadHttp($url, $this->ui, $dir, null, $curchannel->lastModified());
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($a) || !$a) {
- // Attempt fallback to https automatically
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $a = $this->downloadHttp('https://' . $mirror .
- '/channel.xml', $this->ui, $dir, null, $curchannel->lastModified());
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($a) || !$a) {
- break;
- }
- }
- $this->log(0, 'WARNING: channel "' . $params[$i]->getChannel() . '" has ' .
- 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $params[$i]->getChannel() .
- '" to update');
- }
- } while (false);
-
- if ($params[$i] && !isset($this->_options['downloadonly'])) {
- if (isset($this->_options['packagingroot'])) {
- $checkdir = $this->_prependPath(
- $this->config->get('php_dir', null, $params[$i]->getChannel()),
- $this->_options['packagingroot']);
- } else {
- $checkdir = $this->config->get('php_dir',
- null, $params[$i]->getChannel());
- }
-
- while ($checkdir && $checkdir != '/' && !file_exists($checkdir)) {
- $checkdir = dirname($checkdir);
- }
-
- if ($checkdir == '.') {
- $checkdir = '/';
- }
-
- if (!is_writeable($checkdir)) {
- return PEAR::raiseError('Cannot install, php_dir for channel "' .
- $params[$i]->getChannel() . '" is not writeable by the current user');
- }
- }
- }
- }
-
- unset($channelschecked);
- PEAR_Downloader_Package::removeDuplicates($params);
- if (!count($params)) {
- $a = array();
- return $a;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['offline'])) {
- $reverify = true;
- while ($reverify) {
- $reverify = false;
- foreach ($params as $i => $param) {
- //PHP Bug 40768 / PEAR Bug #10944
- //Nested foreaches fail in PHP 5.2.1
- key($params);
- $ret = $params[$i]->detectDependencies($params);
- if (PEAR::isError($ret)) {
- $reverify = true;
- $params[$i] = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- if (!isset($this->_options['soft'])) {
- $this->log(0, $ret->getMessage());
- }
- continue 2;
- }
- }
- }
- }
-
- if (isset($this->_options['offline'])) {
- $this->log(3, 'Skipping dependency download check, --offline specified');
- }
-
- if (!count($params)) {
- $a = array();
- return $a;
- }
-
- while (PEAR_Downloader_Package::mergeDependencies($params));
- PEAR_Downloader_Package::removeDuplicates($params, true);
- $errorparams = array();
- if (PEAR_Downloader_Package::detectStupidDuplicates($params, $errorparams)) {
- if (count($errorparams)) {
- foreach ($errorparams as $param) {
- $name = $this->_registry->parsedPackageNameToString($param->getParsedPackage());
- $this->pushError('Duplicate package ' . $name . ' found', PEAR_INSTALLER_FAILED);
- }
- $a = array();
- return $a;
- }
- }
-
- PEAR_Downloader_Package::removeInstalled($params);
- if (!count($params)) {
- $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED);
- $a = array();
- return $a;
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->analyzeDependencies($params);
- PEAR::popErrorHandling();
- if (!count($params)) {
- $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED);
- $a = array();
- return $a;
- }
-
- $ret = array();
- $newparams = array();
- if (isset($this->_options['pretend'])) {
- return $params;
- }
-
- $somefailed = false;
- foreach ($params as $i => $package) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $pf = &$params[$i]->download();
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf)) {
- if (!isset($this->_options['soft'])) {
- $this->log(1, $pf->getMessage());
- $this->log(0, 'Error: cannot download "' .
- $this->_registry->parsedPackageNameToString($package->getParsedPackage(),
- true) .
- '"');
- }
- $somefailed = true;
- continue;
- }
-
- $newparams[] = &$params[$i];
- $ret[] = array(
- 'file' => $pf->getArchiveFile(),
- 'info' => &$pf,
- 'pkg' => $pf->getPackage()
- );
- }
-
- if ($somefailed) {
- // remove params that did not download successfully
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->analyzeDependencies($newparams, true);
- PEAR::popErrorHandling();
- if (!count($newparams)) {
- $this->pushError('Download failed', PEAR_INSTALLER_FAILED);
- $a = array();
- return $a;
- }
- }
-
- $this->_downloadedPackages = $ret;
- return $newparams;
- }
-
- /**
- * @param array all packages to be installed
- */
- function analyzeDependencies(&$params, $force = false)
- {
- if (isset($this->_options['downloadonly'])) {
- return;
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $redo = true;
- $reset = $hasfailed = $failed = false;
- while ($redo) {
- $redo = false;
- foreach ($params as $i => $param) {
- $deps = $param->getDeps();
- if (!$deps) {
- $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(),
- $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING);
- $send = $param->getPackageFile();
-
- $installcheck = $depchecker->validatePackage($send, $this, $params);
- if (PEAR::isError($installcheck)) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $installcheck->getMessage());
- }
- $hasfailed = true;
- $params[$i] = false;
- $reset = true;
- $redo = true;
- $failed = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- continue 2;
- }
- continue;
- }
-
- if (!$reset && $param->alreadyValidated() && !$force) {
- continue;
- }
-
- if (count($deps)) {
- $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(),
- $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING);
- $send = $param->getPackageFile();
- if ($send === null) {
- $send = $param->getDownloadURL();
- }
-
- $installcheck = $depchecker->validatePackage($send, $this, $params);
- if (PEAR::isError($installcheck)) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $installcheck->getMessage());
- }
- $hasfailed = true;
- $params[$i] = false;
- $reset = true;
- $redo = true;
- $failed = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- continue 2;
- }
-
- $failed = false;
- if (isset($deps['required']) && is_array($deps['required'])) {
- foreach ($deps['required'] as $type => $dep) {
- // note: Dependency2 will never return a PEAR_Error if ignore-errors
- // is specified, so soft is needed to turn off logging
- if (!isset($dep[0])) {
- if (PEAR::isError($e = $depchecker->{"validate{$type}Dependency"}($dep,
- true, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- } else {
- foreach ($dep as $d) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($d,
- true, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- }
-
- if (isset($deps['optional']) && is_array($deps['optional'])) {
- foreach ($deps['optional'] as $type => $dep) {
- if (!isset($dep[0])) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($dep,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- } else {
- foreach ($dep as $d) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($d,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- }
- }
-
- $groupname = $param->getGroup();
- if (isset($deps['group']) && $groupname) {
- if (!isset($deps['group'][0])) {
- $deps['group'] = array($deps['group']);
- }
-
- $found = false;
- foreach ($deps['group'] as $group) {
- if ($group['attribs']['name'] == $groupname) {
- $found = true;
- break;
- }
- }
-
- if ($found) {
- unset($group['attribs']);
- foreach ($group as $type => $dep) {
- if (!isset($dep[0])) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($dep,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- } else {
- foreach ($dep as $d) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($d,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- }
- }
- }
- } else {
- foreach ($deps as $dep) {
- if (PEAR::isError($e = $depchecker->validateDependency1($dep, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- $params[$i]->setValidated();
- }
-
- if ($failed) {
- $hasfailed = true;
- $params[$i] = false;
- $reset = true;
- $redo = true;
- $failed = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- continue 2;
- }
- }
- }
-
- PEAR::staticPopErrorHandling();
- if ($hasfailed && (isset($this->_options['ignore-errors']) ||
- isset($this->_options['nodeps']))) {
- // this is probably not needed, but just in case
- if (!isset($this->_options['soft'])) {
- $this->log(0, 'WARNING: dependencies failed');
- }
- }
- }
-
- /**
- * Retrieve the directory that downloads will happen in
- * @access private
- * @return string
- */
- function getDownloadDir()
- {
- if (isset($this->_downloadDir)) {
- return $this->_downloadDir;
- }
-
- $downloaddir = $this->config->get('download_dir');
- if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) {
- if (is_dir($downloaddir) && !is_writable($downloaddir)) {
- $this->log(0, 'WARNING: configuration download directory "' . $downloaddir .
- '" is not writeable. Change download_dir config variable to ' .
- 'a writeable dir to avoid this warning');
- }
-
- if (!class_exists('System')) {
- require_once 'System.php';
- }
-
- if (PEAR::isError($downloaddir = System::mktemp('-d'))) {
- return $downloaddir;
- }
- $this->log(3, '+ tmp dir created at ' . $downloaddir);
- }
-
- if (!is_writable($downloaddir)) {
- if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) ||
- !is_writable($downloaddir)) {
- return PEAR::raiseError('download directory "' . $downloaddir .
- '" is not writeable. Change download_dir config variable to ' .
- 'a writeable dir');
- }
- }
-
- return $this->_downloadDir = $downloaddir;
- }
-
- function setDownloadDir($dir)
- {
- if (!@is_writable($dir)) {
- if (PEAR::isError(System::mkdir(array('-p', $dir)))) {
- return PEAR::raiseError('download directory "' . $dir .
- '" is not writeable. Change download_dir config variable to ' .
- 'a writeable dir');
- }
- }
- $this->_downloadDir = $dir;
- }
-
- function configSet($key, $value, $layer = 'user', $channel = false)
- {
- $this->config->set($key, $value, $layer, $channel);
- $this->_preferredState = $this->config->get('preferred_state', null, $channel);
- if (!$this->_preferredState) {
- // don't inadvertantly use a non-set preferred_state
- $this->_preferredState = null;
- }
- }
-
- function setOptions($options)
- {
- $this->_options = $options;
- }
-
- function getOptions()
- {
- return $this->_options;
- }
-
-
- /**
- * @param array output of {@link parsePackageName()}
- * @access private
- */
- function _getPackageDownloadUrl($parr)
- {
- $curchannel = $this->config->get('default_channel');
- $this->configSet('default_channel', $parr['channel']);
- // getDownloadURL returns an array. On error, it only contains information
- // on the latest release as array(version, info). On success it contains
- // array(version, info, download url string)
- $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state');
- if (!$this->_registry->channelExists($parr['channel'])) {
- do {
- if ($this->config->get('auto_discover') && $this->discover($parr['channel'])) {
- break;
- }
-
- $this->configSet('default_channel', $curchannel);
- return PEAR::raiseError('Unknown remote channel: ' . $parr['channel']);
- } while (false);
- }
-
- $chan = &$this->_registry->getChannel($parr['channel']);
- if (PEAR::isError($chan)) {
- return $chan;
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $version = $this->_registry->packageInfo($parr['package'], 'version', $parr['channel']);
- $stability = $this->_registry->packageInfo($parr['package'], 'stability', $parr['channel']);
- // package is installed - use the installed release stability level
- if (!isset($parr['state']) && $stability !== null) {
- $state = $stability['release'];
- }
- PEAR::staticPopErrorHandling();
- $base2 = false;
-
- $preferred_mirror = $this->config->get('preferred_mirror');
- if (!$chan->supportsREST($preferred_mirror) ||
- (
- !($base2 = $chan->getBaseURL('REST1.3', $preferred_mirror))
- &&
- !($base = $chan->getBaseURL('REST1.0', $preferred_mirror))
- )
- ) {
- return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.');
- }
-
- if ($base2) {
- $rest = &$this->config->getREST('1.3', $this->_options);
- $base = $base2;
- } else {
- $rest = &$this->config->getREST('1.0', $this->_options);
- }
-
- $downloadVersion = false;
- if (!isset($parr['version']) && !isset($parr['state']) && $version
- && !PEAR::isError($version)
- && !isset($this->_options['downloadonly'])
- ) {
- $downloadVersion = $version;
- }
-
- $url = $rest->getDownloadURL($base, $parr, $state, $downloadVersion, $chan->getName());
- if (PEAR::isError($url)) {
- $this->configSet('default_channel', $curchannel);
- return $url;
- }
-
- if ($parr['channel'] != $curchannel) {
- $this->configSet('default_channel', $curchannel);
- }
-
- if (!is_array($url)) {
- return $url;
- }
-
- $url['raw'] = false; // no checking is necessary for REST
- if (!is_array($url['info'])) {
- return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' .
- 'this should never happen');
- }
-
- if (!isset($this->_options['force']) &&
- !isset($this->_options['downloadonly']) &&
- $version &&
- !PEAR::isError($version) &&
- !isset($parr['group'])
- ) {
- if (version_compare($version, $url['version'], '=')) {
- return PEAR::raiseError($this->_registry->parsedPackageNameToString(
- $parr, true) . ' is already installed and is the same as the ' .
- 'released version ' . $url['version'], -976);
- }
-
- if (version_compare($version, $url['version'], '>')) {
- return PEAR::raiseError($this->_registry->parsedPackageNameToString(
- $parr, true) . ' is already installed and is newer than detected ' .
- 'released version ' . $url['version'], -976);
- }
- }
-
- if (isset($url['info']['required']) || $url['compatible']) {
- require_once 'PEAR/PackageFile/v2.php';
- $pf = new PEAR_PackageFile_v2;
- $pf->setRawChannel($parr['channel']);
- if ($url['compatible']) {
- $pf->setRawCompatible($url['compatible']);
- }
- } else {
- require_once 'PEAR/PackageFile/v1.php';
- $pf = new PEAR_PackageFile_v1;
- }
-
- $pf->setRawPackage($url['package']);
- $pf->setDeps($url['info']);
- if ($url['compatible']) {
- $pf->setCompatible($url['compatible']);
- }
-
- $pf->setRawState($url['stability']);
- $url['info'] = &$pf;
- if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) {
- $ext = '.tar';
- } else {
- $ext = '.tgz';
- }
-
- if (is_array($url) && isset($url['url'])) {
- $url['url'] .= $ext;
- }
-
- return $url;
- }
-
- /**
- * @param array dependency array
- * @access private
- */
- function _getDepPackageDownloadUrl($dep, $parr)
- {
- $xsdversion = isset($dep['rel']) ? '1.0' : '2.0';
- $curchannel = $this->config->get('default_channel');
- if (isset($dep['uri'])) {
- $xsdversion = '2.0';
- $chan = &$this->_registry->getChannel('__uri');
- if (PEAR::isError($chan)) {
- return $chan;
- }
-
- $version = $this->_registry->packageInfo($dep['name'], 'version', '__uri');
- $this->configSet('default_channel', '__uri');
- } else {
- if (isset($dep['channel'])) {
- $remotechannel = $dep['channel'];
- } else {
- $remotechannel = 'pear.php.net';
- }
-
- if (!$this->_registry->channelExists($remotechannel)) {
- do {
- if ($this->config->get('auto_discover')) {
- if ($this->discover($remotechannel)) {
- break;
- }
- }
- return PEAR::raiseError('Unknown remote channel: ' . $remotechannel);
- } while (false);
- }
-
- $chan = &$this->_registry->getChannel($remotechannel);
- if (PEAR::isError($chan)) {
- return $chan;
- }
-
- $version = $this->_registry->packageInfo($dep['name'], 'version', $remotechannel);
- $this->configSet('default_channel', $remotechannel);
- }
-
- $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state');
- if (isset($parr['state']) && isset($parr['version'])) {
- unset($parr['state']);
- }
-
- if (isset($dep['uri'])) {
- $info = &$this->newDownloaderPackage($this);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $info->initialize($dep);
- PEAR::staticPopErrorHandling();
- if (!$err) {
- // skip parameters that were missed by preferred_state
- return PEAR::raiseError('Cannot initialize dependency');
- }
-
- if (PEAR::isError($err)) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $err->getMessage());
- }
-
- if (is_object($info)) {
- $param = $info->getChannel() . '/' . $info->getPackage();
- }
- return PEAR::raiseError('Package "' . $param . '" is not valid');
- }
- return $info;
- } elseif ($chan->supportsREST($this->config->get('preferred_mirror'))
- &&
- (
- ($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror')))
- ||
- ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror')))
- )
- ) {
- if ($base2) {
- $base = $base2;
- $rest = &$this->config->getREST('1.3', $this->_options);
- } else {
- $rest = &$this->config->getREST('1.0', $this->_options);
- }
-
- $url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr,
- $state, $version, $chan->getName());
- if (PEAR::isError($url)) {
- return $url;
- }
-
- if ($parr['channel'] != $curchannel) {
- $this->configSet('default_channel', $curchannel);
- }
-
- if (!is_array($url)) {
- return $url;
- }
-
- $url['raw'] = false; // no checking is necessary for REST
- if (!is_array($url['info'])) {
- return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' .
- 'this should never happen');
- }
-
- if (isset($url['info']['required'])) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'PEAR/PackageFile/v2.php';
- }
- $pf = new PEAR_PackageFile_v2;
- $pf->setRawChannel($remotechannel);
- } else {
- if (!class_exists('PEAR_PackageFile_v1')) {
- require_once 'PEAR/PackageFile/v1.php';
- }
- $pf = new PEAR_PackageFile_v1;
-
- }
- $pf->setRawPackage($url['package']);
- $pf->setDeps($url['info']);
- if ($url['compatible']) {
- $pf->setCompatible($url['compatible']);
- }
-
- $pf->setRawState($url['stability']);
- $url['info'] = &$pf;
- if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) {
- $ext = '.tar';
- } else {
- $ext = '.tgz';
- }
-
- if (is_array($url) && isset($url['url'])) {
- $url['url'] .= $ext;
- }
-
- return $url;
- }
-
- return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.');
- }
-
- /**
- * @deprecated in favor of _getPackageDownloadUrl
- */
- function getPackageDownloadUrl($package, $version = null, $channel = false)
- {
- if ($version) {
- $package .= "-$version";
- }
- if ($this === null || $this->_registry === null) {
- $package = "http://pear.php.net/get/$package";
- } else {
- $chan = $this->_registry->getChannel($channel);
- if (PEAR::isError($chan)) {
- return '';
- }
- $package = "http://" . $chan->getServer() . "/get/$package";
- }
- if (!extension_loaded("zlib")) {
- $package .= '?uncompress=yes';
- }
- return $package;
- }
-
- /**
- * Retrieve a list of downloaded packages after a call to {@link download()}.
- *
- * Also resets the list of downloaded packages.
- * @return array
- */
- function getDownloadedPackages()
- {
- $ret = $this->_downloadedPackages;
- $this->_downloadedPackages = array();
- $this->_toDownload = array();
- return $ret;
- }
-
- function _downloadCallback($msg, $params = null)
- {
- switch ($msg) {
- case 'saveas':
- $this->log(1, "downloading $params ...");
- break;
- case 'done':
- $this->log(1, '...done: ' . number_format($params, 0, '', ',') . ' bytes');
- break;
- case 'bytesread':
- static $bytes;
- if (empty($bytes)) {
- $bytes = 0;
- }
- if (!($bytes % 10240)) {
- $this->log(1, '.', false);
- }
- $bytes += $params;
- break;
- case 'start':
- if($params[1] == -1) {
- $length = "Unknown size";
- } else {
- $length = number_format($params[1], 0, '', ',')." bytes";
- }
- $this->log(1, "Starting to download {$params[0]} ($length)");
- break;
- }
- if (method_exists($this->ui, '_downloadCallback'))
- $this->ui->_downloadCallback($msg, $params);
- }
-
- function _prependPath($path, $prepend)
- {
- if (strlen($prepend) > 0) {
- if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) {
- if (preg_match('/^[a-z]:/i', $prepend)) {
- $prepend = substr($prepend, 2);
- } elseif ($prepend{0} != '\\') {
- $prepend = "\\$prepend";
- }
- $path = substr($path, 0, 2) . $prepend . substr($path, 2);
- } else {
- $path = $prepend . $path;
- }
- }
- return $path;
- }
-
- /**
- * @param string
- * @param integer
- */
- function pushError($errmsg, $code = -1)
- {
- array_push($this->_errorStack, array($errmsg, $code));
- }
-
- function getErrorMsgs()
- {
- $msgs = array();
- $errs = $this->_errorStack;
- foreach ($errs as $err) {
- $msgs[] = $err[0];
- }
- $this->_errorStack = array();
- return $msgs;
- }
-
- /**
- * for BC
- *
- * @deprecated
- */
- function sortPkgDeps(&$packages, $uninstall = false)
- {
- $uninstall ?
- $this->sortPackagesForUninstall($packages) :
- $this->sortPackagesForInstall($packages);
- }
-
- /**
- * Sort a list of arrays of array(downloaded packagefilename) by dependency.
- *
- * This uses the topological sort method from graph theory, and the
- * Structures_Graph package to properly sort dependencies for installation.
- * @param array an array of downloaded PEAR_Downloader_Packages
- * @return array array of array(packagefilename, package.xml contents)
- */
- function sortPackagesForInstall(&$packages)
- {
- require_once 'Structures/Graph.php';
- require_once 'Structures/Graph/Node.php';
- require_once 'Structures/Graph/Manipulator/TopologicalSorter.php';
- $depgraph = new Structures_Graph(true);
- $nodes = array();
- $reg = &$this->config->getRegistry();
- foreach ($packages as $i => $package) {
- $pname = $reg->parsedPackageNameToString(
- array(
- 'channel' => $package->getChannel(),
- 'package' => strtolower($package->getPackage()),
- ));
- $nodes[$pname] = new Structures_Graph_Node;
- $nodes[$pname]->setData($packages[$i]);
- $depgraph->addNode($nodes[$pname]);
- }
-
- $deplinks = array();
- foreach ($nodes as $package => $node) {
- $pf = &$node->getData();
- $pdeps = $pf->getDeps(true);
- if (!$pdeps) {
- continue;
- }
-
- if ($pf->getPackagexmlVersion() == '1.0') {
- foreach ($pdeps as $dep) {
- if ($dep['type'] != 'pkg' ||
- (isset($dep['optional']) && $dep['optional'] == 'yes')) {
- continue;
- }
-
- $dname = $reg->parsedPackageNameToString(
- array(
- 'channel' => 'pear.php.net',
- 'package' => strtolower($dep['name']),
- ));
-
- if (isset($nodes[$dname])) {
- if (!isset($deplinks[$dname])) {
- $deplinks[$dname] = array();
- }
-
- $deplinks[$dname][$package] = 1;
- // dependency is in installed packages
- continue;
- }
-
- $dname = $reg->parsedPackageNameToString(
- array(
- 'channel' => 'pecl.php.net',
- 'package' => strtolower($dep['name']),
- ));
-
- if (isset($nodes[$dname])) {
- if (!isset($deplinks[$dname])) {
- $deplinks[$dname] = array();
- }
-
- $deplinks[$dname][$package] = 1;
- // dependency is in installed packages
- continue;
- }
- }
- } else {
- // the only ordering we care about is:
- // 1) subpackages must be installed before packages that depend on them
- // 2) required deps must be installed before packages that depend on them
- if (isset($pdeps['required']['subpackage'])) {
- $t = $pdeps['required']['subpackage'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
-
- if (isset($pdeps['group'])) {
- if (!isset($pdeps['group'][0])) {
- $pdeps['group'] = array($pdeps['group']);
- }
-
- foreach ($pdeps['group'] as $group) {
- if (isset($group['subpackage'])) {
- $t = $group['subpackage'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
- }
- }
-
- if (isset($pdeps['optional']['subpackage'])) {
- $t = $pdeps['optional']['subpackage'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
-
- if (isset($pdeps['required']['package'])) {
- $t = $pdeps['required']['package'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
-
- if (isset($pdeps['group'])) {
- if (!isset($pdeps['group'][0])) {
- $pdeps['group'] = array($pdeps['group']);
- }
-
- foreach ($pdeps['group'] as $group) {
- if (isset($group['package'])) {
- $t = $group['package'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
- }
- }
- }
- }
-
- $this->_detectDepCycle($deplinks);
- foreach ($deplinks as $dependent => $parents) {
- foreach ($parents as $parent => $unused) {
- $nodes[$dependent]->connectTo($nodes[$parent]);
- }
- }
-
- $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph);
- $ret = array();
- for ($i = 0, $count = count($installOrder); $i < $count; $i++) {
- foreach ($installOrder[$i] as $index => $sortedpackage) {
- $data = &$installOrder[$i][$index]->getData();
- $ret[] = &$nodes[$reg->parsedPackageNameToString(
- array(
- 'channel' => $data->getChannel(),
- 'package' => strtolower($data->getPackage()),
- ))]->getData();
- }
- }
-
- $packages = $ret;
- return;
- }
-
- /**
- * Detect recursive links between dependencies and break the cycles
- *
- * @param array
- * @access private
- */
- function _detectDepCycle(&$deplinks)
- {
- do {
- $keepgoing = false;
- foreach ($deplinks as $dep => $parents) {
- foreach ($parents as $parent => $unused) {
- // reset the parent cycle detector
- $this->_testCycle(null, null, null);
- if ($this->_testCycle($dep, $deplinks, $parent)) {
- $keepgoing = true;
- unset($deplinks[$dep][$parent]);
- if (count($deplinks[$dep]) == 0) {
- unset($deplinks[$dep]);
- }
-
- continue 3;
- }
- }
- }
- } while ($keepgoing);
- }
-
- function _testCycle($test, $deplinks, $dep)
- {
- static $visited = array();
- if ($test === null) {
- $visited = array();
- return;
- }
-
- // this happens when a parent has a dep cycle on another dependency
- // but the child is not part of the cycle
- if (isset($visited[$dep])) {
- return false;
- }
-
- $visited[$dep] = 1;
- if ($test == $dep) {
- return true;
- }
-
- if (isset($deplinks[$dep])) {
- if (in_array($test, array_keys($deplinks[$dep]), true)) {
- return true;
- }
-
- foreach ($deplinks[$dep] as $parent => $unused) {
- if ($this->_testCycle($test, $deplinks, $parent)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Set up the dependency for installation parsing
- *
- * @param array $t dependency information
- * @param PEAR_Registry $reg
- * @param array $deplinks list of dependency links already established
- * @param array $nodes all existing package nodes
- * @param string $package parent package name
- * @access private
- */
- function _setupGraph($t, $reg, &$deplinks, &$nodes, $package)
- {
- foreach ($t as $dep) {
- $depchannel = !isset($dep['channel']) ? '__uri': $dep['channel'];
- $dname = $reg->parsedPackageNameToString(
- array(
- 'channel' => $depchannel,
- 'package' => strtolower($dep['name']),
- ));
-
- if (isset($nodes[$dname])) {
- if (!isset($deplinks[$dname])) {
- $deplinks[$dname] = array();
- }
- $deplinks[$dname][$package] = 1;
- }
- }
- }
-
- function _dependsOn($a, $b)
- {
- return $this->_checkDepTree(strtolower($a->getChannel()), strtolower($a->getPackage()), $b);
- }
-
- function _checkDepTree($channel, $package, $b, $checked = array())
- {
- $checked[$channel][$package] = true;
- if (!isset($this->_depTree[$channel][$package])) {
- return false;
- }
-
- if (isset($this->_depTree[$channel][$package][strtolower($b->getChannel())]
- [strtolower($b->getPackage())])) {
- return true;
- }
-
- foreach ($this->_depTree[$channel][$package] as $ch => $packages) {
- foreach ($packages as $pa => $true) {
- if ($this->_checkDepTree($ch, $pa, $b, $checked)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- function _sortInstall($a, $b)
- {
- if (!$a->getDeps() && !$b->getDeps()) {
- return 0; // neither package has dependencies, order is insignificant
- }
- if ($a->getDeps() && !$b->getDeps()) {
- return 1; // $a must be installed after $b because $a has dependencies
- }
- if (!$a->getDeps() && $b->getDeps()) {
- return -1; // $b must be installed after $a because $b has dependencies
- }
- // both packages have dependencies
- if ($this->_dependsOn($a, $b)) {
- return 1;
- }
- if ($this->_dependsOn($b, $a)) {
- return -1;
- }
- return 0;
- }
-
- /**
- * Download a file through HTTP. Considers suggested file name in
- * Content-disposition: header and can run a callback function for
- * different events. The callback will be called with two
- * parameters: the callback type, and parameters. The implemented
- * callback types are:
- *
- * 'setup' called at the very beginning, parameter is a UI object
- * that should be used for all output
- * 'message' the parameter is a string with an informational message
- * 'saveas' may be used to save with a different file name, the
- * parameter is the filename that is about to be used.
- * If a 'saveas' callback returns a non-empty string,
- * that file name will be used as the filename instead.
- * Note that $save_dir will not be affected by this, only
- * the basename of the file.
- * 'start' download is starting, parameter is number of bytes
- * that are expected, or -1 if unknown
- * 'bytesread' parameter is the number of bytes read so far
- * 'done' download is complete, parameter is the total number
- * of bytes read
- * 'connfailed' if the TCP/SSL connection fails, this callback is called
- * with array(host,port,errno,errmsg)
- * 'writefailed' if writing to disk fails, this callback is called
- * with array(destfile,errmsg)
- *
- * If an HTTP proxy has been configured (http_proxy PEAR_Config
- * setting), the proxy will be used.
- *
- * @param string $url the URL to download
- * @param object $ui PEAR_Frontend_* instance
- * @param object $config PEAR_Config instance
- * @param string $save_dir directory to save file in
- * @param mixed $callback function/method to call for status
- * updates
- * @param false|string|array $lastmodified header values to check against for caching
- * use false to return the header values from this download
- * @param false|array $accept Accept headers to send
- * @param false|string $channel Channel to use for retrieving authentication
- * @return string|array Returns the full path of the downloaded file or a PEAR
- * error on failure. If the error is caused by
- * socket-related errors, the error object will
- * have the fsockopen error code available through
- * getCode(). If caching is requested, then return the header
- * values.
- *
- * @access public
- */
- function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null,
- $accept = false, $channel = false)
- {
- static $redirect = 0;
- // always reset , so we are clean case of error
- $wasredirect = $redirect;
- $redirect = 0;
- if ($callback) {
- call_user_func($callback, 'setup', array(&$ui));
- }
-
- $info = parse_url($url);
- if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) {
- return PEAR::raiseError('Cannot download non-http URL "' . $url . '"');
- }
-
- if (!isset($info['host'])) {
- return PEAR::raiseError('Cannot download from non-URL "' . $url . '"');
- }
-
- $host = isset($info['host']) ? $info['host'] : null;
- $port = isset($info['port']) ? $info['port'] : null;
- $path = isset($info['path']) ? $info['path'] : null;
-
- if (isset($this)) {
- $config = &$this->config;
- } else {
- $config = &PEAR_Config::singleton();
- }
-
- $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
- if ($config->get('http_proxy') &&
- $proxy = parse_url($config->get('http_proxy'))) {
- $proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
- if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
- $proxy_host = 'ssl://' . $proxy_host;
- }
- $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080;
- $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null;
- $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null;
-
- if ($callback) {
- call_user_func($callback, 'message', "Using HTTP proxy $host:$port");
- }
- }
-
- if (empty($port)) {
- $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80;
- }
-
- $scheme = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http';
-
- if ($proxy_host != '') {
- $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr);
- if (!$fp) {
- if ($callback) {
- call_user_func($callback, 'connfailed', array($proxy_host, $proxy_port,
- $errno, $errstr));
- }
- return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", $errno);
- }
-
- if ($lastmodified === false || $lastmodified) {
- $request = "GET $url HTTP/1.1\r\n";
- $request .= "Host: $host\r\n";
- } else {
- $request = "GET $url HTTP/1.0\r\n";
- $request .= "Host: $host\r\n";
- }
- } else {
- $network_host = $host;
- if (isset($info['scheme']) && $info['scheme'] == 'https') {
- $network_host = 'ssl://' . $host;
- }
-
- $fp = @fsockopen($network_host, $port, $errno, $errstr);
- if (!$fp) {
- if ($callback) {
- call_user_func($callback, 'connfailed', array($host, $port,
- $errno, $errstr));
- }
- return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno);
- }
-
- if ($lastmodified === false || $lastmodified) {
- $request = "GET $path HTTP/1.1\r\n";
- $request .= "Host: $host\r\n";
- } else {
- $request = "GET $path HTTP/1.0\r\n";
- $request .= "Host: $host\r\n";
- }
- }
-
- $ifmodifiedsince = '';
- if (is_array($lastmodified)) {
- if (isset($lastmodified['Last-Modified'])) {
- $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n";
- }
-
- if (isset($lastmodified['ETag'])) {
- $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n";
- }
- } else {
- $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
- }
-
- $request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.5/PHP/" . PHP_VERSION . "\r\n";
-
- if (isset($this)) { // only pass in authentication for non-static calls
- $username = $config->get('username', null, $channel);
- $password = $config->get('password', null, $channel);
- if ($username && $password) {
- $tmp = base64_encode("$username:$password");
- $request .= "Authorization: Basic $tmp\r\n";
- }
- }
-
- if ($proxy_host != '' && $proxy_user != '') {
- $request .= 'Proxy-Authorization: Basic ' .
- base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n";
- }
-
- if ($accept) {
- $request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
- }
-
- $request .= "Connection: close\r\n";
- $request .= "\r\n";
- fwrite($fp, $request);
- $headers = array();
- $reply = 0;
- while (trim($line = fgets($fp, 1024))) {
- if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) {
- $headers[strtolower($matches[1])] = trim($matches[2]);
- } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {
- $reply = (int)$matches[1];
- if ($reply == 304 && ($lastmodified || ($lastmodified === false))) {
- return false;
- }
-
- if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) {
- return PEAR::raiseError("File $scheme://$host:$port$path not valid (received: $line)");
- }
- }
- }
-
- if ($reply != 200) {
- if (!isset($headers['location'])) {
- return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirected but no location)");
- }
-
- if ($wasredirect > 4) {
- return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirection looped more than 5 times)");
- }
-
- $redirect = $wasredirect + 1;
- return $this->downloadHttp($headers['location'],
- $ui, $save_dir, $callback, $lastmodified, $accept);
- }
-
- if (isset($headers['content-disposition']) &&
- preg_match('/\sfilename=\"([^;]*\S)\"\s*(;|\\z)/', $headers['content-disposition'], $matches)) {
- $save_as = basename($matches[1]);
- } else {
- $save_as = basename($url);
- }
-
- if ($callback) {
- $tmp = call_user_func($callback, 'saveas', $save_as);
- if ($tmp) {
- $save_as = $tmp;
- }
- }
-
- $dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as;
- if (is_link($dest_file)) {
- return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $dest_file . ' as it is symlinked to ' . readlink($dest_file) . ' - Possible symlink attack');
- }
-
- if (!$wp = @fopen($dest_file, 'wb')) {
- fclose($fp);
- if ($callback) {
- call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg));
- }
- return PEAR::raiseError("could not open $dest_file for writing");
- }
-
- $length = isset($headers['content-length']) ? $headers['content-length'] : -1;
-
- $bytes = 0;
- if ($callback) {
- call_user_func($callback, 'start', array(basename($dest_file), $length));
- }
-
- while ($data = fread($fp, 1024)) {
- $bytes += strlen($data);
- if ($callback) {
- call_user_func($callback, 'bytesread', $bytes);
- }
- if (!@fwrite($wp, $data)) {
- fclose($fp);
- if ($callback) {
- call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg));
- }
- return PEAR::raiseError("$dest_file: write failed ($php_errormsg)");
- }
- }
-
- fclose($fp);
- fclose($wp);
- if ($callback) {
- call_user_func($callback, 'done', $bytes);
- }
-
- if ($lastmodified === false || $lastmodified) {
- if (isset($headers['etag'])) {
- $lastmodified = array('ETag' => $headers['etag']);
- }
-
- if (isset($headers['last-modified'])) {
- if (is_array($lastmodified)) {
- $lastmodified['Last-Modified'] = $headers['last-modified'];
- } else {
- $lastmodified = $headers['last-modified'];
- }
- }
- return array($dest_file, $lastmodified, $headers);
- }
- return $dest_file;
- }
-}
-
-/**
- * Error Stack Implementation
- *
- * This is an incredibly simple implementation of a very complex error handling
- * facility. It contains the ability
- * to track multiple errors from multiple packages simultaneously. In addition,
- * it can track errors of many levels, save data along with the error, context
- * information such as the exact file, line number, class and function that
- * generated the error, and if necessary, it can raise a traditional PEAR_Error.
- * It has built-in support for PEAR::Log, to log errors as they occur
- *
- * Since version 0.2alpha, it is also possible to selectively ignore errors,
- * through the use of an error callback, see {@link pushCallback()}
- *
- * Since version 0.3alpha, it is possible to specify the exception class
- * returned from {@link push()}
- *
- * Since version PEAR1.3.2, ErrorStack no longer instantiates an exception class. This can
- * still be done quite handily in an error callback or by manipulating the returned array
- * @category Debugging
- * @package PEAR_ErrorStack
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2004-2008 Greg Beaver
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR_ErrorStack
- */
-
-/**
- * Singleton storage
- *
- * Format:
- * <pre>
- * array(
- * 'package1' => PEAR_ErrorStack object,
- * 'package2' => PEAR_ErrorStack object,
- * ...
- * )
- * </pre>
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_SINGLETON']
- */
-$GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] = array();
-
-/**
- * Global error callback (default)
- *
- * This is only used if set to non-false. * is the default callback for
- * all packages, whereas specific packages may set a default callback
- * for all instances, regardless of whether they are a singleton or not.
- *
- * To exclude non-singletons, only set the local callback for the singleton
- * @see PEAR_ErrorStack::setDefaultCallback()
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']
- */
-$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] = array(
- '*' => false,
-);
-
-/**
- * Global Log object (default)
- *
- * This is only used if set to non-false. Use to set a default log object for
- * all stacks, regardless of instantiation order or location
- * @see PEAR_ErrorStack::setDefaultLogger()
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']
- */
-$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = false;
-
-/**
- * Global Overriding Callback
- *
- * This callback will override any error callbacks that specific loggers have set.
- * Use with EXTREME caution
- * @see PEAR_ErrorStack::staticPushCallback()
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']
- */
-$GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array();
-
-/**#@+
- * One of four possible return values from the error Callback
- * @see PEAR_ErrorStack::_errorCallback()
- */
-/**
- * If this is returned, then the error will be both pushed onto the stack
- * and logged.
- */
-define('PEAR_ERRORSTACK_PUSHANDLOG', 1);
-/**
- * If this is returned, then the error will only be pushed onto the stack,
- * and not logged.
- */
-define('PEAR_ERRORSTACK_PUSH', 2);
-/**
- * If this is returned, then the error will only be logged, but not pushed
- * onto the error stack.
- */
-define('PEAR_ERRORSTACK_LOG', 3);
-/**
- * If this is returned, then the error is completely ignored.
- */
-define('PEAR_ERRORSTACK_IGNORE', 4);
-/**
- * If this is returned, then the error is logged and die() is called.
- */
-define('PEAR_ERRORSTACK_DIE', 5);
-/**#@-*/
-
-/**
- * Error code for an attempt to instantiate a non-class as a PEAR_ErrorStack in
- * the singleton method.
- */
-define('PEAR_ERRORSTACK_ERR_NONCLASS', 1);
-
-/**
- * Error code for an attempt to pass an object into {@link PEAR_ErrorStack::getMessage()}
- * that has no __toString() method
- */
-define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
-/**
- * Error Stack Implementation
- *
- * Usage:
- * <code>
- * // global error stack
- * $global_stack = &PEAR_ErrorStack::singleton('MyPackage');
- * // local error stack
- * $local_stack = new PEAR_ErrorStack('MyPackage');
- * </code>
- * @author Greg Beaver <cellog@php.net>
- * @version 1.9.5
- * @package PEAR_ErrorStack
- * @category Debugging
- * @copyright 2004-2008 Greg Beaver
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR_ErrorStack
- */
-class PEAR_ErrorStack {
- /**
- * Errors are stored in the order that they are pushed on the stack.
- * @since 0.4alpha Errors are no longer organized by error level.
- * This renders pop() nearly unusable, and levels could be more easily
- * handled in a callback anyway
- * @var array
- * @access private
- */
- var $_errors = array();
-
- /**
- * Storage of errors by level.
- *
- * Allows easy retrieval and deletion of only errors from a particular level
- * @since PEAR 1.4.0dev
- * @var array
- * @access private
- */
- var $_errorsByLevel = array();
-
- /**
- * Package name this error stack represents
- * @var string
- * @access protected
- */
- var $_package;
-
- /**
- * Determines whether a PEAR_Error is thrown upon every error addition
- * @var boolean
- * @access private
- */
- var $_compat = false;
-
- /**
- * If set to a valid callback, this will be used to generate the error
- * message from the error code, otherwise the message passed in will be
- * used
- * @var false|string|array
- * @access private
- */
- var $_msgCallback = false;
-
- /**
- * If set to a valid callback, this will be used to generate the error
- * context for an error. For PHP-related errors, this will be a file
- * and line number as retrieved from debug_backtrace(), but can be
- * customized for other purposes. The error might actually be in a separate
- * configuration file, or in a database query.
- * @var false|string|array
- * @access protected
- */
- var $_contextCallback = false;
-
- /**
- * If set to a valid callback, this will be called every time an error
- * is pushed onto the stack. The return value will be used to determine
- * whether to allow an error to be pushed or logged.
- *
- * The return value must be one an PEAR_ERRORSTACK_* constant
- * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
- * @var false|string|array
- * @access protected
- */
- var $_errorCallback = array();
-
- /**
- * PEAR::Log object for logging errors
- * @var false|Log
- * @access protected
- */
- var $_logger = false;
-
- /**
- * Error messages - designed to be overridden
- * @var array
- * @abstract
- */
- var $_errorMsgs = array();
-
- /**
- * Set up a new error stack
- *
- * @param string $package name of the package this error stack represents
- * @param callback $msgCallback callback used for error message generation
- * @param callback $contextCallback callback used for context generation,
- * defaults to {@link getFileLine()}
- * @param boolean $throwPEAR_Error
- */
- function __construct($package, $msgCallback = false, $contextCallback = false,
- $throwPEAR_Error = false)
- {
- $this->_package = $package;
- $this->setMessageCallback($msgCallback);
- $this->setContextCallback($contextCallback);
- $this->_compat = $throwPEAR_Error;
- }
-
- /**
- * Return a single error stack for this package.
- *
- * Note that all parameters are ignored if the stack for package $package
- * has already been instantiated
- * @param string $package name of the package this error stack represents
- * @param callback $msgCallback callback used for error message generation
- * @param callback $contextCallback callback used for context generation,
- * defaults to {@link getFileLine()}
- * @param boolean $throwPEAR_Error
- * @param string $stackClass class to instantiate
- * @static
- * @return PEAR_ErrorStack
- */
- function &singleton($package, $msgCallback = false, $contextCallback = false,
- $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack')
- {
- if (isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) {
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package];
- }
- if (!class_exists($stackClass)) {
- if (function_exists('debug_backtrace')) {
- $trace = debug_backtrace();
- }
- PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_NONCLASS,
- 'exception', array('stackclass' => $stackClass),
- 'stack class "%stackclass%" is not a valid class name (should be like PEAR_ErrorStack)',
- false, $trace);
- }
- $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package] =
- new $stackClass($package, $msgCallback, $contextCallback, $throwPEAR_Error);
-
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package];
- }
-
- /**
- * Internal error handler for PEAR_ErrorStack class
- *
- * Dies if the error is an exception (and would have died anyway)
- * @access private
- */
- function _handleError($err)
- {
- if ($err['level'] == 'exception') {
- $message = $err['message'];
- if (isset($_SERVER['REQUEST_URI'])) {
- echo '<br />';
- } else {
- echo "\n";
- }
- var_dump($err['context']);
- die($message);
- }
- }
-
- /**
- * Set up a PEAR::Log object for all error stacks that don't have one
- * @param Log $log
- * @static
- */
- function setDefaultLogger(&$log)
- {
- if (is_object($log) && method_exists($log, 'log') ) {
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
- } elseif (is_callable($log)) {
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
- }
- }
-
- /**
- * Set up a PEAR::Log object for this error stack
- * @param Log $log
- */
- function setLogger(&$log)
- {
- if (is_object($log) && method_exists($log, 'log') ) {
- $this->_logger = &$log;
- } elseif (is_callable($log)) {
- $this->_logger = &$log;
- }
- }
-
- /**
- * Set an error code => error message mapping callback
- *
- * This method sets the callback that can be used to generate error
- * messages for any instance
- * @param array|string Callback function/method
- */
- function setMessageCallback($msgCallback)
- {
- if (!$msgCallback) {
- $this->_msgCallback = array(&$this, 'getErrorMessage');
- } else {
- if (is_callable($msgCallback)) {
- $this->_msgCallback = $msgCallback;
- }
- }
- }
-
- /**
- * Get an error code => error message mapping callback
- *
- * This method returns the current callback that can be used to generate error
- * messages
- * @return array|string|false Callback function/method or false if none
- */
- function getMessageCallback()
- {
- return $this->_msgCallback;
- }
-
- /**
- * Sets a default callback to be used by all error stacks
- *
- * This method sets the callback that can be used to generate error
- * messages for a singleton
- * @param array|string Callback function/method
- * @param string Package name, or false for all packages
- * @static
- */
- function setDefaultCallback($callback = false, $package = false)
- {
- if (!is_callable($callback)) {
- $callback = false;
- }
- $package = $package ? $package : '*';
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$package] = $callback;
- }
-
- /**
- * Set a callback that generates context information (location of error) for an error stack
- *
- * This method sets the callback that can be used to generate context
- * information for an error. Passing in NULL will disable context generation
- * and remove the expensive call to debug_backtrace()
- * @param array|string|null Callback function/method
- */
- function setContextCallback($contextCallback)
- {
- if ($contextCallback === null) {
- return $this->_contextCallback = false;
- }
- if (!$contextCallback) {
- $this->_contextCallback = array(&$this, 'getFileLine');
- } else {
- if (is_callable($contextCallback)) {
- $this->_contextCallback = $contextCallback;
- }
- }
- }
-
- /**
- * Set an error Callback
- * If set to a valid callback, this will be called every time an error
- * is pushed onto the stack. The return value will be used to determine
- * whether to allow an error to be pushed or logged.
- *
- * The return value must be one of the ERRORSTACK_* constants.
- *
- * This functionality can be used to emulate PEAR's pushErrorHandling, and
- * the PEAR_ERROR_CALLBACK mode, without affecting the integrity of
- * the error stack or logging
- * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
- * @see popCallback()
- * @param string|array $cb
- */
- function pushCallback($cb)
- {
- array_push($this->_errorCallback, $cb);
- }
-
- /**
- * Remove a callback from the error callback stack
- * @see pushCallback()
- * @return array|string|false
- */
- function popCallback()
- {
- if (!count($this->_errorCallback)) {
- return false;
- }
- return array_pop($this->_errorCallback);
- }
-
- /**
- * Set a temporary overriding error callback for every package error stack
- *
- * Use this to temporarily disable all existing callbacks (can be used
- * to emulate the @ operator, for instance)
- * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
- * @see staticPopCallback(), pushCallback()
- * @param string|array $cb
- * @static
- */
- function staticPushCallback($cb)
- {
- array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb);
- }
-
- /**
- * Remove a temporary overriding error callback
- * @see staticPushCallback()
- * @return array|string|false
- * @static
- */
- function staticPopCallback()
- {
- $ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']);
- if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) {
- $GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array();
- }
- return $ret;
- }
-
- /**
- * Add an error to the stack
- *
- * If the message generator exists, it is called with 2 parameters.
- * - the current Error Stack object
- * - an array that is in the same format as an error. Available indices
- * are 'code', 'package', 'time', 'params', 'level', and 'context'
- *
- * Next, if the error should contain context information, this is
- * handled by the context grabbing method.
- * Finally, the error is pushed onto the proper error stack
- * @param int $code Package-specific error code
- * @param string $level Error level. This is NOT spell-checked
- * @param array $params associative array of error parameters
- * @param string $msg Error message, or a portion of it if the message
- * is to be generated
- * @param array $repackage If this error re-packages an error pushed by
- * another package, place the array returned from
- * {@link pop()} in this parameter
- * @param array $backtrace Protected parameter: use this to pass in the
- * {@link debug_backtrace()} that should be used
- * to find error context
- * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also
- * thrown. If a PEAR_Error is returned, the userinfo
- * property is set to the following array:
- *
- * <code>
- * array(
- * 'code' => $code,
- * 'params' => $params,
- * 'package' => $this->_package,
- * 'level' => $level,
- * 'time' => time(),
- * 'context' => $context,
- * 'message' => $msg,
- * //['repackage' => $err] repackaged error array/Exception class
- * );
- * </code>
- *
- * Normally, the previous array is returned.
- */
- function push($code, $level = 'error', $params = array(), $msg = false,
- $repackage = false, $backtrace = false)
- {
- $context = false;
- // grab error context
- if ($this->_contextCallback) {
- if (!$backtrace) {
- $backtrace = debug_backtrace();
- }
- $context = call_user_func($this->_contextCallback, $code, $params, $backtrace);
- }
-
- // save error
- $time = explode(' ', microtime());
- $time = $time[1] + $time[0];
- $err = array(
- 'code' => $code,
- 'params' => $params,
- 'package' => $this->_package,
- 'level' => $level,
- 'time' => $time,
- 'context' => $context,
- 'message' => $msg,
- );
-
- if ($repackage) {
- $err['repackage'] = $repackage;
- }
-
- // set up the error message, if necessary
- if ($this->_msgCallback) {
- $msg = call_user_func_array($this->_msgCallback,
- array(&$this, $err));
- $err['message'] = $msg;
- }
- $push = $log = true;
- $die = false;
- // try the overriding callback first
- $callback = $this->staticPopCallback();
- if ($callback) {
- $this->staticPushCallback($callback);
- }
- if (!is_callable($callback)) {
- // try the local callback next
- $callback = $this->popCallback();
- if (is_callable($callback)) {
- $this->pushCallback($callback);
- } else {
- // try the default callback
- $callback = isset($GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package]) ?
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package] :
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*'];
- }
- }
- if (is_callable($callback)) {
- switch(call_user_func($callback, $err)){
- case PEAR_ERRORSTACK_IGNORE:
- return $err;
- break;
- case PEAR_ERRORSTACK_PUSH:
- $log = false;
- break;
- case PEAR_ERRORSTACK_LOG:
- $push = false;
- break;
- case PEAR_ERRORSTACK_DIE:
- $die = true;
- break;
- // anything else returned has the same effect as pushandlog
- }
- }
- if ($push) {
- array_unshift($this->_errors, $err);
- if (!isset($this->_errorsByLevel[$err['level']])) {
- $this->_errorsByLevel[$err['level']] = array();
- }
- $this->_errorsByLevel[$err['level']][] = &$this->_errors[0];
- }
- if ($log) {
- if ($this->_logger || $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']) {
- $this->_log($err);
- }
- }
- if ($die) {
- die();
- }
- if ($this->_compat && $push) {
- return $this->raiseError($msg, $code, null, null, $err);
- }
- return $err;
- }
-
- /**
- * Static version of {@link push()}
- *
- * @param string $package Package name this error belongs to
- * @param int $code Package-specific error code
- * @param string $level Error level. This is NOT spell-checked
- * @param array $params associative array of error parameters
- * @param string $msg Error message, or a portion of it if the message
- * is to be generated
- * @param array $repackage If this error re-packages an error pushed by
- * another package, place the array returned from
- * {@link pop()} in this parameter
- * @param array $backtrace Protected parameter: use this to pass in the
- * {@link debug_backtrace()} that should be used
- * to find error context
- * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also
- * thrown. see docs for {@link push()}
- * @static
- */
- function staticPush($package, $code, $level = 'error', $params = array(),
- $msg = false, $repackage = false, $backtrace = false)
- {
- $s = &PEAR_ErrorStack::singleton($package);
- if ($s->_contextCallback) {
- if (!$backtrace) {
- if (function_exists('debug_backtrace')) {
- $backtrace = debug_backtrace();
- }
- }
- }
- return $s->push($code, $level, $params, $msg, $repackage, $backtrace);
- }
-
- /**
- * Log an error using PEAR::Log
- * @param array $err Error array
- * @param array $levels Error level => Log constant map
- * @access protected
- */
- function _log($err)
- {
- if ($this->_logger) {
- $logger = &$this->_logger;
- } else {
- $logger = &$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'];
- }
- if (is_a($logger, 'Log')) {
- $levels = array(
- 'exception' => PEAR_LOG_CRIT,
- 'alert' => PEAR_LOG_ALERT,
- 'critical' => PEAR_LOG_CRIT,
- 'error' => PEAR_LOG_ERR,
- 'warning' => PEAR_LOG_WARNING,
- 'notice' => PEAR_LOG_NOTICE,
- 'info' => PEAR_LOG_INFO,
- 'debug' => PEAR_LOG_DEBUG);
- if (isset($levels[$err['level']])) {
- $level = $levels[$err['level']];
- } else {
- $level = PEAR_LOG_INFO;
- }
- $logger->log($err['message'], $level, $err);
- } else { // support non-standard logs
- call_user_func($logger, $err);
- }
- }
-
-
- /**
- * Pop an error off of the error stack
- *
- * @return false|array
- * @since 0.4alpha it is no longer possible to specify a specific error
- * level to return - the last error pushed will be returned, instead
- */
- function pop()
- {
- $err = @array_shift($this->_errors);
- if (!is_null($err)) {
- @array_pop($this->_errorsByLevel[$err['level']]);
- if (!count($this->_errorsByLevel[$err['level']])) {
- unset($this->_errorsByLevel[$err['level']]);
- }
- }
- return $err;
- }
-
- /**
- * Pop an error off of the error stack, static method
- *
- * @param string package name
- * @return boolean
- * @since PEAR1.5.0a1
- */
- function staticPop($package)
- {
- if ($package) {
- if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) {
- return false;
- }
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop();
- }
- }
-
- /**
- * Determine whether there are any errors on the stack
- * @param string|array Level name. Use to determine if any errors
- * of level (string), or levels (array) have been pushed
- * @return boolean
- */
- function hasErrors($level = false)
- {
- if ($level) {
- return isset($this->_errorsByLevel[$level]);
- }
- return count($this->_errors);
- }
-
- /**
- * Retrieve all errors since last purge
- *
- * @param boolean set in order to empty the error stack
- * @param string level name, to return only errors of a particular severity
- * @return array
- */
- function getErrors($purge = false, $level = false)
- {
- if (!$purge) {
- if ($level) {
- if (!isset($this->_errorsByLevel[$level])) {
- return array();
- } else {
- return $this->_errorsByLevel[$level];
- }
- } else {
- return $this->_errors;
- }
- }
- if ($level) {
- $ret = $this->_errorsByLevel[$level];
- foreach ($this->_errorsByLevel[$level] as $i => $unused) {
- // entries are references to the $_errors array
- $this->_errorsByLevel[$level][$i] = false;
- }
- // array_filter removes all entries === false
- $this->_errors = array_filter($this->_errors);
- unset($this->_errorsByLevel[$level]);
- return $ret;
- }
- $ret = $this->_errors;
- $this->_errors = array();
- $this->_errorsByLevel = array();
- return $ret;
- }
-
- /**
- * Determine whether there are any errors on a single error stack, or on any error stack
- *
- * The optional parameter can be used to test the existence of any errors without the need of
- * singleton instantiation
- * @param string|false Package name to check for errors
- * @param string Level name to check for a particular severity
- * @return boolean
- * @static
- */
- function staticHasErrors($package = false, $level = false)
- {
- if ($package) {
- if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) {
- return false;
- }
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->hasErrors($level);
- }
- foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) {
- if ($obj->hasErrors($level)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Get a list of all errors since last purge, organized by package
- * @since PEAR 1.4.0dev BC break! $level is now in the place $merge used to be
- * @param boolean $purge Set to purge the error stack of existing errors
- * @param string $level Set to a level name in order to retrieve only errors of a particular level
- * @param boolean $merge Set to return a flat array, not organized by package
- * @param array $sortfunc Function used to sort a merged array - default
- * sorts by time, and should be good for most cases
- * @static
- * @return array
- */
- function staticGetErrors($purge = false, $level = false, $merge = false,
- $sortfunc = array('PEAR_ErrorStack', '_sortErrors'))
- {
- $ret = array();
- if (!is_callable($sortfunc)) {
- $sortfunc = array('PEAR_ErrorStack', '_sortErrors');
- }
- foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) {
- $test = $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->getErrors($purge, $level);
- if ($test) {
- if ($merge) {
- $ret = array_merge($ret, $test);
- } else {
- $ret[$package] = $test;
- }
- }
- }
- if ($merge) {
- usort($ret, $sortfunc);
- }
- return $ret;
- }
-
- /**
- * Error sorting function, sorts by time
- * @access private
- */
- function _sortErrors($a, $b)
- {
- if ($a['time'] == $b['time']) {
- return 0;
- }
- if ($a['time'] < $b['time']) {
- return 1;
- }
- return -1;
- }
-
- /**
- * Standard file/line number/function/class context callback
- *
- * This function uses a backtrace generated from {@link debug_backtrace()}
- * and so will not work at all in PHP < 4.3.0. The frame should
- * reference the frame that contains the source of the error.
- * @return array|false either array('file' => file, 'line' => line,
- * 'function' => function name, 'class' => class name) or
- * if this doesn't work, then false
- * @param unused
- * @param integer backtrace frame.
- * @param array Results of debug_backtrace()
- * @static
- */
- function getFileLine($code, $params, $backtrace = null)
- {
- if ($backtrace === null) {
- return false;
- }
- $frame = 0;
- $functionframe = 1;
- if (!isset($backtrace[1])) {
- $functionframe = 0;
- } else {
- while (isset($backtrace[$functionframe]['function']) &&
- $backtrace[$functionframe]['function'] == 'eval' &&
- isset($backtrace[$functionframe + 1])) {
- $functionframe++;
- }
- }
- if (isset($backtrace[$frame])) {
- if (!isset($backtrace[$frame]['file'])) {
- $frame++;
- }
- $funcbacktrace = $backtrace[$functionframe];
- $filebacktrace = $backtrace[$frame];
- $ret = array('file' => $filebacktrace['file'],
- 'line' => $filebacktrace['line']);
- // rearrange for eval'd code or create function errors
- if (strpos($filebacktrace['file'], '(') &&
- preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'],
- $matches)) {
- $ret['file'] = $matches[1];
- $ret['line'] = $matches[2] + 0;
- }
- if (isset($funcbacktrace['function']) && isset($backtrace[1])) {
- if ($funcbacktrace['function'] != 'eval') {
- if ($funcbacktrace['function'] == '__lambda_func') {
- $ret['function'] = 'create_function() code';
- } else {
- $ret['function'] = $funcbacktrace['function'];
- }
- }
- }
- if (isset($funcbacktrace['class']) && isset($backtrace[1])) {
- $ret['class'] = $funcbacktrace['class'];
- }
- return $ret;
- }
- return false;
- }
-
- /**
- * Standard error message generation callback
- *
- * This method may also be called by a custom error message generator
- * to fill in template values from the params array, simply
- * set the third parameter to the error message template string to use
- *
- * The special variable %__msg% is reserved: use it only to specify
- * where a message passed in by the user should be placed in the template,
- * like so:
- *
- * Error message: %msg% - internal error
- *
- * If the message passed like so:
- *
- * <code>
- * $stack->push(ERROR_CODE, 'error', array(), 'server error 500');
- * </code>
- *
- * The returned error message will be "Error message: server error 500 -
- * internal error"
- * @param PEAR_ErrorStack
- * @param array
- * @param string|false Pre-generated error message template
- * @static
- * @return string
- */
- function getErrorMessage(&$stack, $err, $template = false)
- {
- if ($template) {
- $mainmsg = $template;
- } else {
- $mainmsg = $stack->getErrorMessageTemplate($err['code']);
- }
- $mainmsg = str_replace('%__msg%', $err['message'], $mainmsg);
- if (is_array($err['params']) && count($err['params'])) {
- foreach ($err['params'] as $name => $val) {
- if (is_array($val)) {
- // @ is needed in case $val is a multi-dimensional array
- $val = @implode(', ', $val);
- }
- if (is_object($val)) {
- if (method_exists($val, '__toString')) {
- $val = $val->__toString();
- } else {
- PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_OBJTOSTRING,
- 'warning', array('obj' => get_class($val)),
- 'object %obj% passed into getErrorMessage, but has no __toString() method');
- $val = 'Object';
- }
- }
- $mainmsg = str_replace('%' . $name . '%', $val, $mainmsg);
- }
- }
- return $mainmsg;
- }
-
- /**
- * Standard Error Message Template generator from code
- * @return string
- */
- function getErrorMessageTemplate($code)
- {
- if (!isset($this->_errorMsgs[$code])) {
- return '%__msg%';
- }
- return $this->_errorMsgs[$code];
- }
-
- /**
- * Set the Error Message Template array
- *
- * The array format must be:
- * <pre>
- * array(error code => 'message template',...)
- * </pre>
- *
- * Error message parameters passed into {@link push()} will be used as input
- * for the error message. If the template is 'message %foo% was %bar%', and the
- * parameters are array('foo' => 'one', 'bar' => 'six'), the error message returned will
- * be 'message one was six'
- * @return string
- */
- function setErrorMessageTemplate($template)
- {
- $this->_errorMsgs = $template;
- }
-
-
- /**
- * emulate PEAR::raiseError()
- *
- * @return PEAR_Error
- */
- function raiseError()
- {
- require_once 'PEAR.php';
- $args = func_get_args();
- return call_user_func_array(array('PEAR', 'raiseError'), $args);
- }
-}
-$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
-$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
-?>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-/**
- * PEAR_Exception
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Hans Lellelid <hans@velum.net>
- * @author Bertrand Mansion <bmansion@mamasam.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.3.3
- */
-
-
-/**
- * Base PEAR_Exception Class
- *
- * 1) Features:
- *
- * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception))
- * - Definable triggers, shot when exceptions occur
- * - Pretty and informative error messages
- * - Added more context info available (like class, method or cause)
- * - cause can be a PEAR_Exception or an array of mixed
- * PEAR_Exceptions/PEAR_ErrorStack warnings
- * - callbacks for specific exception classes and their children
- *
- * 2) Ideas:
- *
- * - Maybe a way to define a 'template' for the output
- *
- * 3) Inherited properties from PHP Exception Class:
- *
- * protected $message
- * protected $code
- * protected $line
- * protected $file
- * private $trace
- *
- * 4) Inherited methods from PHP Exception Class:
- *
- * __clone
- * __construct
- * getMessage
- * getCode
- * getFile
- * getLine
- * getTraceSafe
- * getTraceSafeAsString
- * __toString
- *
- * 5) Usage example
- *
- * <code>
- * require_once 'PEAR/Exception.php';
- *
- * class Test {
- * function foo() {
- * throw new PEAR_Exception('Error Message', ERROR_CODE);
- * }
- * }
- *
- * function myLogger($pear_exception) {
- * echo $pear_exception->getMessage();
- * }
- * // each time a exception is thrown the 'myLogger' will be called
- * // (its use is completely optional)
- * PEAR_Exception::addObserver('myLogger');
- * $test = new Test;
- * try {
- * $test->foo();
- * } catch (PEAR_Exception $e) {
- * print $e;
- * }
- * </code>
- *
- * @category pear
- * @package PEAR
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Hans Lellelid <hans@velum.net>
- * @author Bertrand Mansion <bmansion@mamasam.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.3.3
- *
- */
-class PEAR_Exception extends Exception
-{
- const OBSERVER_PRINT = -2;
- const OBSERVER_TRIGGER = -4;
- const OBSERVER_DIE = -8;
- protected $cause;
- private static $_observers = array();
- private static $_uniqueid = 0;
- private $_trace;
-
- /**
- * Supported signatures:
- * - PEAR_Exception(string $message);
- * - PEAR_Exception(string $message, int $code);
- * - PEAR_Exception(string $message, Exception $cause);
- * - PEAR_Exception(string $message, Exception $cause, int $code);
- * - PEAR_Exception(string $message, PEAR_Error $cause);
- * - PEAR_Exception(string $message, PEAR_Error $cause, int $code);
- * - PEAR_Exception(string $message, array $causes);
- * - PEAR_Exception(string $message, array $causes, int $code);
- * @param string exception message
- * @param int|Exception|PEAR_Error|array|null exception cause
- * @param int|null exception code or null
- */
- public function __construct($message, $p2 = null, $p3 = null)
- {
- if (is_int($p2)) {
- $code = $p2;
- $this->cause = null;
- } elseif (is_object($p2) || is_array($p2)) {
- // using is_object allows both Exception and PEAR_Error
- if (is_object($p2) && !($p2 instanceof Exception)) {
- if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) {
- throw new PEAR_Exception('exception cause must be Exception, ' .
- 'array, or PEAR_Error');
- }
- }
- $code = $p3;
- if (is_array($p2) && isset($p2['message'])) {
- // fix potential problem of passing in a single warning
- $p2 = array($p2);
- }
- $this->cause = $p2;
- } else {
- $code = null;
- $this->cause = null;
- }
- parent::__construct($message, $code);
- $this->signal();
- }
-
- /**
- * @param mixed $callback - A valid php callback, see php func is_callable()
- * - A PEAR_Exception::OBSERVER_* constant
- * - An array(const PEAR_Exception::OBSERVER_*,
- * mixed $options)
- * @param string $label The name of the observer. Use this if you want
- * to remove it later with removeObserver()
- */
- public static function addObserver($callback, $label = 'default')
- {
- self::$_observers[$label] = $callback;
- }
-
- public static function removeObserver($label = 'default')
- {
- unset(self::$_observers[$label]);
- }
-
- /**
- * @return int unique identifier for an observer
- */
- public static function getUniqueId()
- {
- return self::$_uniqueid++;
- }
-
- private function signal()
- {
- foreach (self::$_observers as $func) {
- if (is_callable($func)) {
- call_user_func($func, $this);
- continue;
- }
- settype($func, 'array');
- switch ($func[0]) {
- case self::OBSERVER_PRINT :
- $f = (isset($func[1])) ? $func[1] : '%s';
- printf($f, $this->getMessage());
- break;
- case self::OBSERVER_TRIGGER :
- $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE;
- trigger_error($this->getMessage(), $f);
- break;
- case self::OBSERVER_DIE :
- $f = (isset($func[1])) ? $func[1] : '%s';
- die(printf($f, $this->getMessage()));
- break;
- default:
- trigger_error('invalid observer type', E_USER_WARNING);
- }
- }
- }
-
- /**
- * Return specific error information that can be used for more detailed
- * error messages or translation.
- *
- * This method may be overridden in child exception classes in order
- * to add functionality not present in PEAR_Exception and is a placeholder
- * to define API
- *
- * The returned array must be an associative array of parameter => value like so:
- * <pre>
- * array('name' => $name, 'context' => array(...))
- * </pre>
- * @return array
- */
- public function getErrorData()
- {
- return array();
- }
-
- /**
- * Returns the exception that caused this exception to be thrown
- * @access public
- * @return Exception|array The context of the exception
- */
- public function getCause()
- {
- return $this->cause;
- }
-
- /**
- * Function must be public to call on caused exceptions
- * @param array
- */
- public function getCauseMessage(&$causes)
- {
- $trace = $this->getTraceSafe();
- $cause = array('class' => get_class($this),
- 'message' => $this->message,
- 'file' => 'unknown',
- 'line' => 'unknown');
- if (isset($trace[0])) {
- if (isset($trace[0]['file'])) {
- $cause['file'] = $trace[0]['file'];
- $cause['line'] = $trace[0]['line'];
- }
- }
- $causes[] = $cause;
- if ($this->cause instanceof PEAR_Exception) {
- $this->cause->getCauseMessage($causes);
- } elseif ($this->cause instanceof Exception) {
- $causes[] = array('class' => get_class($this->cause),
- 'message' => $this->cause->getMessage(),
- 'file' => $this->cause->getFile(),
- 'line' => $this->cause->getLine());
- } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) {
- $causes[] = array('class' => get_class($this->cause),
- 'message' => $this->cause->getMessage(),
- 'file' => 'unknown',
- 'line' => 'unknown');
- } elseif (is_array($this->cause)) {
- foreach ($this->cause as $cause) {
- if ($cause instanceof PEAR_Exception) {
- $cause->getCauseMessage($causes);
- } elseif ($cause instanceof Exception) {
- $causes[] = array('class' => get_class($cause),
- 'message' => $cause->getMessage(),
- 'file' => $cause->getFile(),
- 'line' => $cause->getLine());
- } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) {
- $causes[] = array('class' => get_class($cause),
- 'message' => $cause->getMessage(),
- 'file' => 'unknown',
- 'line' => 'unknown');
- } elseif (is_array($cause) && isset($cause['message'])) {
- // PEAR_ErrorStack warning
- $causes[] = array(
- 'class' => $cause['package'],
- 'message' => $cause['message'],
- 'file' => isset($cause['context']['file']) ?
- $cause['context']['file'] :
- 'unknown',
- 'line' => isset($cause['context']['line']) ?
- $cause['context']['line'] :
- 'unknown',
- );
- }
- }
- }
- }
-
- public function getTraceSafe()
- {
- if (!isset($this->_trace)) {
- $this->_trace = $this->getTrace();
- if (empty($this->_trace)) {
- $backtrace = debug_backtrace();
- $this->_trace = array($backtrace[count($backtrace)-1]);
- }
- }
- return $this->_trace;
- }
-
- public function getErrorClass()
- {
- $trace = $this->getTraceSafe();
- return $trace[0]['class'];
- }
-
- public function getErrorMethod()
- {
- $trace = $this->getTraceSafe();
- return $trace[0]['function'];
- }
-
- public function __toString()
- {
- if (isset($_SERVER['REQUEST_URI'])) {
- return $this->toHtml();
- }
- return $this->toText();
- }
-
- public function toHtml()
- {
- $trace = $this->getTraceSafe();
- $causes = array();
- $this->getCauseMessage($causes);
- $html = '<table style="border: 1px" cellspacing="0">' . "\n";
- foreach ($causes as $i => $cause) {
- $html .= '<tr><td colspan="3" style="background: #ff9999">'
- . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: '
- . htmlspecialchars($cause['message']) . ' in <b>' . $cause['file'] . '</b> '
- . 'on line <b>' . $cause['line'] . '</b>'
- . "</td></tr>\n";
- }
- $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>' . "\n"
- . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>'
- . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>'
- . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n";
-
- foreach ($trace as $k => $v) {
- $html .= '<tr><td style="text-align: center;">' . $k . '</td>'
- . '<td>';
- if (!empty($v['class'])) {
- $html .= $v['class'] . $v['type'];
- }
- $html .= $v['function'];
- $args = array();
- if (!empty($v['args'])) {
- foreach ($v['args'] as $arg) {
- if (is_null($arg)) $args[] = 'null';
- elseif (is_array($arg)) $args[] = 'Array';
- elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')';
- elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false';
- elseif (is_int($arg) || is_double($arg)) $args[] = $arg;
- else {
- $arg = (string)$arg;
- $str = htmlspecialchars(substr($arg, 0, 16));
- if (strlen($arg) > 16) $str .= '&hellip;';
- $args[] = "'" . $str . "'";
- }
- }
- }
- $html .= '(' . implode(', ',$args) . ')'
- . '</td>'
- . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown')
- . ':' . (isset($v['line']) ? $v['line'] : 'unknown')
- . '</td></tr>' . "\n";
- }
- $html .= '<tr><td style="text-align: center;">' . ($k+1) . '</td>'
- . '<td>{main}</td>'
- . '<td>&nbsp;</td></tr>' . "\n"
- . '</table>';
- return $html;
- }
-
- public function toText()
- {
- $causes = array();
- $this->getCauseMessage($causes);
- $causeMsg = '';
- foreach ($causes as $i => $cause) {
- $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '
- . $cause['message'] . ' in ' . $cause['file']
- . ' on line ' . $cause['line'] . "\n";
- }
- return $causeMsg . $this->getTraceAsString();
- }
-}
-/**
- * PEAR_Frontend, the singleton-based frontend for user input/output
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Include error handling
- */
-//require_once 'PEAR.php';
-
-/**
- * Which user interface class is being used.
- * @var string class name
- */
-$GLOBALS['_PEAR_FRONTEND_CLASS'] = 'PEAR_Frontend_CLI';
-
-/**
- * Instance of $_PEAR_Command_uiclass.
- * @var object
- */
-$GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null;
-
-/**
- * Singleton-based frontend for PEAR user input/output
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Frontend extends PEAR
-{
- /**
- * Retrieve the frontend object
- * @return PEAR_Frontend_CLI|PEAR_Frontend_Web|PEAR_Frontend_Gtk
- * @static
- */
- function &singleton($type = null)
- {
- if ($type === null) {
- if (!isset($GLOBALS['_PEAR_FRONTEND_SINGLETON'])) {
- $a = false;
- return $a;
- }
- return $GLOBALS['_PEAR_FRONTEND_SINGLETON'];
- }
-
- $a = PEAR_Frontend::setFrontendClass($type);
- return $a;
- }
-
- /**
- * Set the frontend class that will be used by calls to {@link singleton()}
- *
- * Frontends are expected to conform to the PEAR naming standard of
- * _ => DIRECTORY_SEPARATOR (PEAR_Frontend_CLI is in PEAR/Frontend/CLI.php)
- * @param string $uiclass full class name
- * @return PEAR_Frontend
- * @static
- */
- function &setFrontendClass($uiclass)
- {
- if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) &&
- is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], $uiclass)) {
- return $GLOBALS['_PEAR_FRONTEND_SINGLETON'];
- }
-
- if (!class_exists($uiclass)) {
- $file = str_replace('_', '/', $uiclass) . '.php';
- if (PEAR_Frontend::isIncludeable($file)) {
- include_once $file;
- }
- }
-
- if (class_exists($uiclass)) {
- $obj = new $uiclass;
- // quick test to see if this class implements a few of the most
- // important frontend methods
- if (is_a($obj, 'PEAR_Frontend')) {
- $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$obj;
- $GLOBALS['_PEAR_FRONTEND_CLASS'] = $uiclass;
- return $obj;
- }
-
- $err = PEAR::raiseError("not a frontend class: $uiclass");
- return $err;
- }
-
- $err = PEAR::raiseError("no such class: $uiclass");
- return $err;
- }
-
- /**
- * Set the frontend class that will be used by calls to {@link singleton()}
- *
- * Frontends are expected to be a descendant of PEAR_Frontend
- * @param PEAR_Frontend
- * @return PEAR_Frontend
- * @static
- */
- function &setFrontendObject($uiobject)
- {
- if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) &&
- is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) {
- return $GLOBALS['_PEAR_FRONTEND_SINGLETON'];
- }
-
- if (!is_a($uiobject, 'PEAR_Frontend')) {
- $err = PEAR::raiseError('not a valid frontend class: (' .
- get_class($uiobject) . ')');
- return $err;
- }
-
- $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$uiobject;
- $GLOBALS['_PEAR_FRONTEND_CLASS'] = get_class($uiobject);
- return $uiobject;
- }
-
- /**
- * @param string $path relative or absolute include path
- * @return boolean
- * @static
- */
- function isIncludeable($path)
- {
- if (file_exists($path) && is_readable($path)) {
- return true;
- }
-
- $fp = @fopen($path, 'r', true);
- if ($fp) {
- fclose($fp);
- return true;
- }
-
- return false;
- }
-
- /**
- * @param PEAR_Config
- */
- function setConfig(&$config)
- {
- }
-
- /**
- * This can be overridden to allow session-based temporary file management
- *
- * By default, all files are deleted at the end of a session. The web installer
- * needs to be able to sustain a list over many sessions in order to support
- * user interaction with install scripts
- */
- function addTempFile($file)
- {
- $GLOBALS['_PEAR_Common_tempfiles'][] = $file;
- }
-
- /**
- * Log an action
- *
- * @param string $msg the message to log
- * @param boolean $append_crlf
- * @return boolean true
- * @abstract
- */
- function log($msg, $append_crlf = true)
- {
- }
-
- /**
- * Run a post-installation script
- *
- * @param array $scripts array of post-install scripts
- * @abstract
- */
- function runPostinstallScripts(&$scripts)
- {
- }
-
- /**
- * Display human-friendly output formatted depending on the
- * $command parameter.
- *
- * This should be able to handle basic output data with no command
- * @param mixed $data data structure containing the information to display
- * @param string $command command from which this method was called
- * @abstract
- */
- function outputData($data, $command = '_default')
- {
- }
-
- /**
- * Display a modal form dialog and return the given input
- *
- * A frontend that requires multiple requests to retrieve and process
- * data must take these needs into account, and implement the request
- * handling code.
- * @param string $command command from which this method was called
- * @param array $prompts associative array. keys are the input field names
- * and values are the description
- * @param array $types array of input field types (text, password,
- * etc.) keys have to be the same like in $prompts
- * @param array $defaults array of default values. again keys have
- * to be the same like in $prompts. Do not depend
- * on a default value being set.
- * @return array input sent by the user
- * @abstract
- */
- function userDialog($command, $prompts, $types = array(), $defaults = array())
- {
- }
-}
-/**
- * PEAR_Installer
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * Used for installation groups in package.xml 2.0 and platform exceptions
- */
-require_once 'OS/Guess.php';
-require_once 'PEAR/Downloader.php';
-
-define('PEAR_INSTALLER_NOBINARY', -240);
-/**
- * Administration class used to install PEAR packages and maintain the
- * installed package database.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Installer extends PEAR_Downloader
-{
- // {{{ properties
-
- /** name of the package directory, for example Foo-1.0
- * @var string
- */
- var $pkgdir;
-
- /** directory where PHP code files go
- * @var string
- */
- var $phpdir;
-
- /** directory where PHP extension files go
- * @var string
- */
- var $extdir;
-
- /** directory where documentation goes
- * @var string
- */
- var $docdir;
-
- /** installation root directory (ala PHP's INSTALL_ROOT or
- * automake's DESTDIR
- * @var string
- */
- var $installroot = '';
-
- /** debug level
- * @var int
- */
- var $debug = 1;
-
- /** temporary directory
- * @var string
- */
- var $tmpdir;
-
- /**
- * PEAR_Registry object used by the installer
- * @var PEAR_Registry
- */
- var $registry;
-
- /**
- * array of PEAR_Downloader_Packages
- * @var array
- */
- var $_downloadedPackages;
-
- /** List of file transactions queued for an install/upgrade/uninstall.
- *
- * Format:
- * array(
- * 0 => array("rename => array("from-file", "to-file")),
- * 1 => array("delete" => array("file-to-delete")),
- * ...
- * )
- *
- * @var array
- */
- var $file_operations = array();
-
- // }}}
-
- // {{{ constructor
-
- /**
- * PEAR_Installer constructor.
- *
- * @param object $ui user interface object (instance of PEAR_Frontend_*)
- *
- * @access public
- */
- function __construct(&$ui)
- {
- parent::__construct($ui, array(), null);
- $this->setFrontendObject($ui);
- $this->debug = $this->config->get('verbose');
- }
-
- function setOptions($options)
- {
- $this->_options = $options;
- }
-
- function setConfig(&$config)
- {
- $this->config = &$config;
- $this->_registry = &$config->getRegistry();
- }
-
- // }}}
-
- function _removeBackups($files)
- {
- foreach ($files as $path) {
- $this->addFileOperation('removebackup', array($path));
- }
- }
-
- // {{{ _deletePackageFiles()
-
- /**
- * Delete a package's installed files, does not remove empty directories.
- *
- * @param string package name
- * @param string channel name
- * @param bool if true, then files are backed up first
- * @return bool TRUE on success, or a PEAR error on failure
- * @access protected
- */
- function _deletePackageFiles($package, $channel = false, $backup = false)
- {
- if (!$channel) {
- $channel = 'pear.php.net';
- }
-
- if (!strlen($package)) {
- return $this->raiseError("No package to uninstall given");
- }
-
- if (strtolower($package) == 'pear' && $channel == 'pear.php.net') {
- // to avoid race conditions, include all possible needed files
- require_once 'PEAR/Task/Common.php';
- require_once 'PEAR/Task/Replace.php';
- require_once 'PEAR/Task/Unixeol.php';
- require_once 'PEAR/Task/Windowseol.php';
- require_once 'PEAR/PackageFile/v1.php';
- require_once 'PEAR/PackageFile/v2.php';
- require_once 'PEAR/PackageFile/Generator/v1.php';
- require_once 'PEAR/PackageFile/Generator/v2.php';
- }
-
- $filelist = $this->_registry->packageInfo($package, 'filelist', $channel);
- if ($filelist == null) {
- return $this->raiseError("$channel/$package not installed");
- }
-
- $ret = array();
- foreach ($filelist as $file => $props) {
- if (empty($props['installed_as'])) {
- continue;
- }
-
- $path = $props['installed_as'];
- if ($backup) {
- $this->addFileOperation('backup', array($path));
- $ret[] = $path;
- }
-
- $this->addFileOperation('delete', array($path));
- }
-
- if ($backup) {
- return $ret;
- }
-
- return true;
- }
-
- // }}}
- // {{{ _installFile()
-
- /**
- * @param string filename
- * @param array attributes from <file> tag in package.xml
- * @param string path to install the file in
- * @param array options from command-line
- * @access private
- */
- function _installFile($file, $atts, $tmp_path, $options)
- {
- // {{{ return if this file is meant for another platform
- static $os;
- if (!isset($this->_registry)) {
- $this->_registry = &$this->config->getRegistry();
- }
-
- if (isset($atts['platform'])) {
- if (empty($os)) {
- $os = new OS_Guess();
- }
-
- if (strlen($atts['platform']) && $atts['platform']{0} == '!') {
- $negate = true;
- $platform = substr($atts['platform'], 1);
- } else {
- $negate = false;
- $platform = $atts['platform'];
- }
-
- if ((bool) $os->matchSignature($platform) === $negate) {
- $this->log(3, "skipped $file (meant for $atts[platform], we are ".$os->getSignature().")");
- return PEAR_INSTALLER_SKIPPED;
- }
- }
- // }}}
-
- $channel = $this->pkginfo->getChannel();
- // {{{ assemble the destination paths
- switch ($atts['role']) {
- case 'src':
- case 'extsrc':
- $this->source_files++;
- return;
- case 'doc':
- case 'data':
- case 'test':
- $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel) .
- DIRECTORY_SEPARATOR . $this->pkginfo->getPackage();
- unset($atts['baseinstalldir']);
- break;
- case 'ext':
- case 'php':
- $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel);
- break;
- case 'script':
- $dest_dir = $this->config->get('bin_dir', null, $channel);
- break;
- default:
- return $this->raiseError("Invalid role `$atts[role]' for file $file");
- }
-
- $save_destdir = $dest_dir;
- if (!empty($atts['baseinstalldir'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
- }
-
- if (dirname($file) != '.' && empty($atts['install-as'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . dirname($file);
- }
-
- if (empty($atts['install-as'])) {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file);
- } else {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as'];
- }
- $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file;
-
- // Clean up the DIRECTORY_SEPARATOR mess
- $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
- list($dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"),
- array(DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR),
- array($dest_file, $orig_file));
- $final_dest_file = $installed_as = $dest_file;
- if (isset($this->_options['packagingroot'])) {
- $installedas_dest_dir = dirname($final_dest_file);
- $installedas_dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- $final_dest_file = $this->_prependPath($final_dest_file, $this->_options['packagingroot']);
- } else {
- $installedas_dest_dir = dirname($final_dest_file);
- $installedas_dest_file = $installedas_dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- }
-
- $dest_dir = dirname($final_dest_file);
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) {
- return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED);
- }
- // }}}
-
- if (empty($this->_options['register-only']) &&
- (!file_exists($dest_dir) || !is_dir($dest_dir))) {
- if (!$this->mkDirHier($dest_dir)) {
- return $this->raiseError("failed to mkdir $dest_dir",
- PEAR_INSTALLER_FAILED);
- }
- $this->log(3, "+ mkdir $dest_dir");
- }
-
- // pretty much nothing happens if we are only registering the install
- if (empty($this->_options['register-only'])) {
- if (empty($atts['replacements'])) {
- if (!file_exists($orig_file)) {
- return $this->raiseError("file $orig_file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!@copy($orig_file, $dest_file)) {
- return $this->raiseError("failed to write $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ cp $orig_file $dest_file");
- if (isset($atts['md5sum'])) {
- $md5sum = md5_file($dest_file);
- }
- } else {
- // {{{ file with replacements
- if (!file_exists($orig_file)) {
- return $this->raiseError("file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- $contents = file_get_contents($orig_file);
- if ($contents === false) {
- $contents = '';
- }
-
- if (isset($atts['md5sum'])) {
- $md5sum = md5($contents);
- }
-
- $subst_from = $subst_to = array();
- foreach ($atts['replacements'] as $a) {
- $to = '';
- if ($a['type'] == 'php-const') {
- if (preg_match('/^[a-z0-9_]+\\z/i', $a['to'])) {
- eval("\$to = $a[to];");
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "invalid php-const replacement: $a[to]");
- }
- continue;
- }
- } elseif ($a['type'] == 'pear-config') {
- if ($a['to'] == 'master_server') {
- $chan = $this->_registry->getChannel($channel);
- if (!PEAR::isError($chan)) {
- $to = $chan->getServer();
- } else {
- $to = $this->config->get($a['to'], null, $channel);
- }
- } else {
- $to = $this->config->get($a['to'], null, $channel);
- }
- if (is_null($to)) {
- if (!isset($options['soft'])) {
- $this->log(0, "invalid pear-config replacement: $a[to]");
- }
- continue;
- }
- } elseif ($a['type'] == 'package-info') {
- if ($t = $this->pkginfo->packageInfo($a['to'])) {
- $to = $t;
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "invalid package-info replacement: $a[to]");
- }
- continue;
- }
- }
- if (!is_null($to)) {
- $subst_from[] = $a['from'];
- $subst_to[] = $to;
- }
- }
-
- $this->log(3, "doing ".sizeof($subst_from)." substitution(s) for $final_dest_file");
- if (sizeof($subst_from)) {
- $contents = str_replace($subst_from, $subst_to, $contents);
- }
-
- $wp = @fopen($dest_file, "wb");
- if (!is_resource($wp)) {
- return $this->raiseError("failed to create $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- if (@fwrite($wp, $contents) === false) {
- return $this->raiseError("failed writing to $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- fclose($wp);
- // }}}
- }
-
- // {{{ check the md5
- if (isset($md5sum)) {
- if (strtolower($md5sum) === strtolower($atts['md5sum'])) {
- $this->log(2, "md5sum ok: $final_dest_file");
- } else {
- if (empty($options['force'])) {
- // delete the file
- if (file_exists($dest_file)) {
- unlink($dest_file);
- }
-
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("bad md5sum for file $final_dest_file",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- }
- }
- }
- // }}}
- // {{{ set file permissions
- if (!OS_WINDOWS) {
- if ($atts['role'] == 'script') {
- $mode = 0777 & ~(int)octdec($this->config->get('umask'));
- $this->log(3, "+ chmod +x $dest_file");
- } else {
- $mode = 0666 & ~(int)octdec($this->config->get('umask'));
- }
-
- if ($atts['role'] != 'src') {
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
- }
- }
- }
- }
- // }}}
-
- if ($atts['role'] == 'src') {
- rename($dest_file, $final_dest_file);
- $this->log(2, "renamed source file $dest_file to $final_dest_file");
- } else {
- $this->addFileOperation("rename", array($dest_file, $final_dest_file,
- $atts['role'] == 'ext'));
- }
- }
-
- // Store the full path where the file was installed for easy unistall
- if ($atts['role'] != 'script') {
- $loc = $this->config->get($atts['role'] . '_dir');
- } else {
- $loc = $this->config->get('bin_dir');
- }
-
- if ($atts['role'] != 'src') {
- $this->addFileOperation("installed_as", array($file, $installed_as,
- $loc,
- dirname(substr($installedas_dest_file, strlen($loc)))));
- }
-
- //$this->log(2, "installed: $dest_file");
- return PEAR_INSTALLER_OK;
- }
-
- // }}}
- // {{{ _installFile2()
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string filename
- * @param array attributes from <file> tag in package.xml
- * @param string path to install the file in
- * @param array options from command-line
- * @access private
- */
- function _installFile2(&$pkg, $file, &$real_atts, $tmp_path, $options)
- {
- $atts = $real_atts;
- if (!isset($this->_registry)) {
- $this->_registry = &$this->config->getRegistry();
- }
-
- $channel = $pkg->getChannel();
- // {{{ assemble the destination paths
- if (!in_array($atts['attribs']['role'],
- PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) {
- return $this->raiseError('Invalid role `' . $atts['attribs']['role'] .
- "' for file $file");
- }
-
- $role = &PEAR_Installer_Role::factory($pkg, $atts['attribs']['role'], $this->config);
- $err = $role->setup($this, $pkg, $atts['attribs'], $file);
- if (PEAR::isError($err)) {
- return $err;
- }
-
- if (!$role->isInstallable()) {
- return;
- }
-
- $info = $role->processInstallation($pkg, $atts['attribs'], $file, $tmp_path);
- if (PEAR::isError($info)) {
- return $info;
- }
-
- list($save_destdir, $dest_dir, $dest_file, $orig_file) = $info;
- if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) {
- return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED);
- }
-
- $final_dest_file = $installed_as = $dest_file;
- if (isset($this->_options['packagingroot'])) {
- $final_dest_file = $this->_prependPath($final_dest_file,
- $this->_options['packagingroot']);
- }
-
- $dest_dir = dirname($final_dest_file);
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- // }}}
-
- if (empty($this->_options['register-only'])) {
- if (!file_exists($dest_dir) || !is_dir($dest_dir)) {
- if (!$this->mkDirHier($dest_dir)) {
- return $this->raiseError("failed to mkdir $dest_dir",
- PEAR_INSTALLER_FAILED);
- }
- $this->log(3, "+ mkdir $dest_dir");
- }
- }
-
- $attribs = $atts['attribs'];
- unset($atts['attribs']);
- // pretty much nothing happens if we are only registering the install
- if (empty($this->_options['register-only'])) {
- if (!count($atts)) { // no tasks
- if (!file_exists($orig_file)) {
- return $this->raiseError("file $orig_file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!@copy($orig_file, $dest_file)) {
- return $this->raiseError("failed to write $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ cp $orig_file $dest_file");
- if (isset($attribs['md5sum'])) {
- $md5sum = md5_file($dest_file);
- }
- } else { // file with tasks
- if (!file_exists($orig_file)) {
- return $this->raiseError("file $orig_file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- $contents = file_get_contents($orig_file);
- if ($contents === false) {
- $contents = '';
- }
-
- if (isset($attribs['md5sum'])) {
- $md5sum = md5($contents);
- }
-
- foreach ($atts as $tag => $raw) {
- $tag = str_replace(array($pkg->getTasksNs() . ':', '-'), array('', '_'), $tag);
- $task = "PEAR_Task_$tag";
- $task = new $task($this->config, $this, PEAR_TASK_INSTALL);
- if (!$task->isScript()) { // scripts are only handled after installation
- $task->init($raw, $attribs, $pkg->getLastInstalledVersion());
- $res = $task->startSession($pkg, $contents, $final_dest_file);
- if ($res === false) {
- continue; // skip this file
- }
-
- if (PEAR::isError($res)) {
- return $res;
- }
-
- $contents = $res; // save changes
- }
-
- $wp = @fopen($dest_file, "wb");
- if (!is_resource($wp)) {
- return $this->raiseError("failed to create $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- if (fwrite($wp, $contents) === false) {
- return $this->raiseError("failed writing to $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- fclose($wp);
- }
- }
-
- // {{{ check the md5
- if (isset($md5sum)) {
- // Make sure the original md5 sum matches with expected
- if (strtolower($md5sum) === strtolower($attribs['md5sum'])) {
- $this->log(2, "md5sum ok: $final_dest_file");
-
- if (isset($contents)) {
- // set md5 sum based on $content in case any tasks were run.
- $real_atts['attribs']['md5sum'] = md5($contents);
- }
- } else {
- if (empty($options['force'])) {
- // delete the file
- if (file_exists($dest_file)) {
- unlink($dest_file);
- }
-
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("bad md5sum for file $final_dest_file",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- }
- }
- } else {
- $real_atts['attribs']['md5sum'] = md5_file($dest_file);
- }
-
- // }}}
- // {{{ set file permissions
- if (!OS_WINDOWS) {
- if ($role->isExecutable()) {
- $mode = 0777 & ~(int)octdec($this->config->get('umask'));
- $this->log(3, "+ chmod +x $dest_file");
- } else {
- $mode = 0666 & ~(int)octdec($this->config->get('umask'));
- }
-
- if ($attribs['role'] != 'src') {
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
- }
- }
- }
- }
- // }}}
-
- if ($attribs['role'] == 'src') {
- rename($dest_file, $final_dest_file);
- $this->log(2, "renamed source file $dest_file to $final_dest_file");
- } else {
- $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension()));
- }
- }
-
- // Store the full path where the file was installed for easy uninstall
- if ($attribs['role'] != 'src') {
- $loc = $this->config->get($role->getLocationConfig(), null, $channel);
- $this->addFileOperation('installed_as', array($file, $installed_as,
- $loc,
- dirname(substr($installed_as, strlen($loc)))));
- }
-
- //$this->log(2, "installed: $dest_file");
- return PEAR_INSTALLER_OK;
- }
-
- // }}}
- // {{{ addFileOperation()
-
- /**
- * Add a file operation to the current file transaction.
- *
- * @see startFileTransaction()
- * @param string $type This can be one of:
- * - rename: rename a file ($data has 3 values)
- * - backup: backup an existing file ($data has 1 value)
- * - removebackup: clean up backups created during install ($data has 1 value)
- * - chmod: change permissions on a file ($data has 2 values)
- * - delete: delete a file ($data has 1 value)
- * - rmdir: delete a directory if empty ($data has 1 value)
- * - installed_as: mark a file as installed ($data has 4 values).
- * @param array $data For all file operations, this array must contain the
- * full path to the file or directory that is being operated on. For
- * the rename command, the first parameter must be the file to rename,
- * the second its new name, the third whether this is a PHP extension.
- *
- * The installed_as operation contains 4 elements in this order:
- * 1. Filename as listed in the filelist element from package.xml
- * 2. Full path to the installed file
- * 3. Full path from the php_dir configuration variable used in this
- * installation
- * 4. Relative path from the php_dir that this file is installed in
- */
- function addFileOperation($type, $data)
- {
- if (!is_array($data)) {
- return $this->raiseError('Internal Error: $data in addFileOperation'
- . ' must be an array, was ' . gettype($data));
- }
-
- if ($type == 'chmod') {
- $octmode = decoct($data[0]);
- $this->log(3, "adding to transaction: $type $octmode $data[1]");
- } else {
- $this->log(3, "adding to transaction: $type " . implode(" ", $data));
- }
- $this->file_operations[] = array($type, $data);
- }
-
- // }}}
- // {{{ startFileTransaction()
-
- function startFileTransaction($rollback_in_case = false)
- {
- if (count($this->file_operations) && $rollback_in_case) {
- $this->rollbackFileTransaction();
- }
- $this->file_operations = array();
- }
-
- // }}}
- // {{{ commitFileTransaction()
-
- function commitFileTransaction()
- {
- // {{{ first, check permissions and such manually
- $errors = array();
- foreach ($this->file_operations as $key => $tr) {
- list($type, $data) = $tr;
- switch ($type) {
- case 'rename':
- if (!file_exists($data[0])) {
- $errors[] = "cannot rename file $data[0], doesn't exist";
- }
-
- // check that dest dir. is writable
- if (!is_writable(dirname($data[1]))) {
- $errors[] = "permission denied ($type): $data[1]";
- }
- break;
- case 'chmod':
- // check that file is writable
- if (!is_writable($data[1])) {
- $errors[] = "permission denied ($type): $data[1] " . decoct($data[0]);
- }
- break;
- case 'delete':
- if (!file_exists($data[0])) {
- $this->log(2, "warning: file $data[0] doesn't exist, can't be deleted");
- }
- // check that directory is writable
- if (file_exists($data[0])) {
- if (!is_writable(dirname($data[0]))) {
- $errors[] = "permission denied ($type): $data[0]";
- } else {
- // make sure the file to be deleted can be opened for writing
- $fp = false;
- if (!is_dir($data[0]) &&
- (!is_writable($data[0]) || !($fp = @fopen($data[0], 'a')))) {
- $errors[] = "permission denied ($type): $data[0]";
- } elseif ($fp) {
- fclose($fp);
- }
- }
-
- /* Verify we are not deleting a file owned by another package
- * This can happen when a file moves from package A to B in
- * an upgrade ala http://pear.php.net/17986
- */
- $info = array(
- 'package' => strtolower($this->pkginfo->getName()),
- 'channel' => strtolower($this->pkginfo->getChannel()),
- );
- $result = $this->_registry->checkFileMap($data[0], $info, '1.1');
- if (is_array($result)) {
- $res = array_diff($result, $info);
- if (!empty($res)) {
- $new = $this->_registry->getPackage($result[1], $result[0]);
- $this->file_operations[$key] = false;
- $pkginfoName = $this->pkginfo->getName();
- $newChannel = $new->getChannel();
- $newPackage = $new->getName();
- $this->log(3, "file $data[0] was scheduled for removal from $pkginfoName but is owned by $newChannel/$newPackage, removal has been cancelled.");
- }
- }
- }
- break;
- }
-
- }
- // }}}
-
- $n = count($this->file_operations);
- $this->log(2, "about to commit $n file operations for " . $this->pkginfo->getName());
-
- $m = count($errors);
- if ($m > 0) {
- foreach ($errors as $error) {
- if (!isset($this->_options['soft'])) {
- $this->log(1, $error);
- }
- }
-
- if (!isset($this->_options['ignore-errors'])) {
- return false;
- }
- }
-
- $this->_dirtree = array();
- // {{{ really commit the transaction
- foreach ($this->file_operations as $i => $tr) {
- if (!$tr) {
- // support removal of non-existing backups
- continue;
- }
-
- list($type, $data) = $tr;
- switch ($type) {
- case 'backup':
- if (!file_exists($data[0])) {
- $this->file_operations[$i] = false;
- break;
- }
-
- if (!@copy($data[0], $data[0] . '.bak')) {
- $this->log(1, 'Could not copy ' . $data[0] . ' to ' . $data[0] .
- '.bak ' . $php_errormsg);
- return false;
- }
- $this->log(3, "+ backup $data[0] to $data[0].bak");
- break;
- case 'removebackup':
- if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) {
- unlink($data[0] . '.bak');
- $this->log(3, "+ rm backup of $data[0] ($data[0].bak)");
- }
- break;
- case 'rename':
- $test = file_exists($data[1]) ? @unlink($data[1]) : null;
- if (!$test && file_exists($data[1])) {
- if ($data[2]) {
- $extra = ', this extension must be installed manually. Rename to "' .
- basename($data[1]) . '"';
- } else {
- $extra = '';
- }
-
- if (!isset($this->_options['soft'])) {
- $this->log(1, 'Could not delete ' . $data[1] . ', cannot rename ' .
- $data[0] . $extra);
- }
-
- if (!isset($this->_options['ignore-errors'])) {
- return false;
- }
- }
-
- // permissions issues with rename - copy() is far superior
- $perms = @fileperms($data[0]);
- if (!@copy($data[0], $data[1])) {
- $this->log(1, 'Could not rename ' . $data[0] . ' to ' . $data[1] .
- ' ' . $php_errormsg);
- return false;
- }
-
- // copy over permissions, otherwise they are lost
- @chmod($data[1], $perms);
- @unlink($data[0]);
- $this->log(3, "+ mv $data[0] $data[1]");
- break;
- case 'chmod':
- if (!@chmod($data[1], $data[0])) {
- $this->log(1, 'Could not chmod ' . $data[1] . ' to ' .
- decoct($data[0]) . ' ' . $php_errormsg);
- return false;
- }
-
- $octmode = decoct($data[0]);
- $this->log(3, "+ chmod $octmode $data[1]");
- break;
- case 'delete':
- if (file_exists($data[0])) {
- if (!@unlink($data[0])) {
- $this->log(1, 'Could not delete ' . $data[0] . ' ' .
- $php_errormsg);
- return false;
- }
- $this->log(3, "+ rm $data[0]");
- }
- break;
- case 'rmdir':
- if (file_exists($data[0])) {
- do {
- $testme = opendir($data[0]);
- while (false !== ($entry = readdir($testme))) {
- if ($entry == '.' || $entry == '..') {
- continue;
- }
- closedir($testme);
- break 2; // this directory is not empty and can't be
- // deleted
- }
-
- closedir($testme);
- if (!@rmdir($data[0])) {
- $this->log(1, 'Could not rmdir ' . $data[0] . ' ' .
- $php_errormsg);
- return false;
- }
- $this->log(3, "+ rmdir $data[0]");
- } while (false);
- }
- break;
- case 'installed_as':
- $this->pkginfo->setInstalledAs($data[0], $data[1]);
- if (!isset($this->_dirtree[dirname($data[1])])) {
- $this->_dirtree[dirname($data[1])] = true;
- $this->pkginfo->setDirtree(dirname($data[1]));
-
- while(!empty($data[3]) && dirname($data[3]) != $data[3] &&
- $data[3] != '/' && $data[3] != '\\') {
- $this->pkginfo->setDirtree($pp =
- $this->_prependPath($data[3], $data[2]));
- $this->_dirtree[$pp] = true;
- $data[3] = dirname($data[3]);
- }
- }
- break;
- }
- }
- // }}}
- $this->log(2, "successfully committed $n file operations");
- $this->file_operations = array();
- return true;
- }
-
- // }}}
- // {{{ rollbackFileTransaction()
-
- function rollbackFileTransaction()
- {
- $n = count($this->file_operations);
- $this->log(2, "rolling back $n file operations");
- foreach ($this->file_operations as $tr) {
- list($type, $data) = $tr;
- switch ($type) {
- case 'backup':
- if (file_exists($data[0] . '.bak')) {
- if (file_exists($data[0] && is_writable($data[0]))) {
- unlink($data[0]);
- }
- @copy($data[0] . '.bak', $data[0]);
- $this->log(3, "+ restore $data[0] from $data[0].bak");
- }
- break;
- case 'removebackup':
- if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) {
- unlink($data[0] . '.bak');
- $this->log(3, "+ rm backup of $data[0] ($data[0].bak)");
- }
- break;
- case 'rename':
- @unlink($data[0]);
- $this->log(3, "+ rm $data[0]");
- break;
- case 'mkdir':
- @rmdir($data[0]);
- $this->log(3, "+ rmdir $data[0]");
- break;
- case 'chmod':
- break;
- case 'delete':
- break;
- case 'installed_as':
- $this->pkginfo->setInstalledAs($data[0], false);
- break;
- }
- }
- $this->pkginfo->resetDirtree();
- $this->file_operations = array();
- }
-
- // }}}
- // {{{ mkDirHier($dir)
-
- function mkDirHier($dir)
- {
- $this->addFileOperation('mkdir', array($dir));
- return parent::mkDirHier($dir);
- }
-
- // }}}
- // {{{ download()
-
- /**
- * Download any files and their dependencies, if necessary
- *
- * @param array a mixed list of package names, local files, or package.xml
- * @param PEAR_Config
- * @param array options from the command line
- * @param array this is the array that will be populated with packages to
- * install. Format of each entry:
- *
- * <code>
- * array('pkg' => 'package_name', 'file' => '/path/to/local/file',
- * 'info' => array() // parsed package.xml
- * );
- * </code>
- * @param array this will be populated with any error messages
- * @param false private recursion variable
- * @param false private recursion variable
- * @param false private recursion variable
- * @deprecated in favor of PEAR_Downloader
- */
- function download($packages, $options, &$config, &$installpackages,
- &$errors, $installed = false, $willinstall = false, $state = false)
- {
- // trickiness: initialize here
- parent::PEAR_Downloader($this->ui, $options, $config);
- $ret = parent::download($packages);
- $errors = $this->getErrorMsgs();
- $installpackages = $this->getDownloadedPackages();
- trigger_error("PEAR Warning: PEAR_Installer::download() is deprecated " .
- "in favor of PEAR_Downloader class", E_USER_WARNING);
- return $ret;
- }
-
- // }}}
- // {{{ _parsePackageXml()
-
- function _parsePackageXml(&$descfile)
- {
- // Parse xml file -----------------------------------------------
- $pkg = new PEAR_PackageFile($this->config, $this->debug);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($p)) {
- if (is_array($p->getUserInfo())) {
- foreach ($p->getUserInfo() as $err) {
- $loglevel = $err['level'] == 'error' ? 0 : 1;
- if (!isset($this->_options['soft'])) {
- $this->log($loglevel, ucfirst($err['level']) . ': ' . $err['message']);
- }
- }
- }
- return $this->raiseError('Installation failed: invalid package file');
- }
-
- $descfile = $p->getPackageFile();
- return $p;
- }
-
- // }}}
- /**
- * Set the list of PEAR_Downloader_Package objects to allow more sane
- * dependency validation
- * @param array
- */
- function setDownloadedPackages(&$pkgs)
- {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->analyzeDependencies($pkgs);
- PEAR::popErrorHandling();
- if (PEAR::isError($err)) {
- return $err;
- }
- $this->_downloadedPackages = &$pkgs;
- }
-
- /**
- * Set the list of PEAR_Downloader_Package objects to allow more sane
- * dependency validation
- * @param array
- */
- function setUninstallPackages(&$pkgs)
- {
- $this->_downloadedPackages = &$pkgs;
- }
-
- function getInstallPackages()
- {
- return $this->_downloadedPackages;
- }
-
- // {{{ install()
-
- /**
- * Installs the files within the package file specified.
- *
- * @param string|PEAR_Downloader_Package $pkgfile path to the package file,
- * or a pre-initialized packagefile object
- * @param array $options
- * recognized options:
- * - installroot : optional prefix directory for installation
- * - force : force installation
- * - register-only : update registry but don't install files
- * - upgrade : upgrade existing install
- * - soft : fail silently
- * - nodeps : ignore dependency conflicts/missing dependencies
- * - alldeps : install all dependencies
- * - onlyreqdeps : install only required dependencies
- *
- * @return array|PEAR_Error package info if successful
- */
- function install($pkgfile, $options = array())
- {
- $this->_options = $options;
- $this->_registry = &$this->config->getRegistry();
- if (is_object($pkgfile)) {
- $dlpkg = &$pkgfile;
- $pkg = $pkgfile->getPackageFile();
- $pkgfile = $pkg->getArchiveFile();
- $descfile = $pkg->getPackageFile();
- } else {
- $descfile = $pkgfile;
- $pkg = $this->_parsePackageXml($descfile);
- if (PEAR::isError($pkg)) {
- return $pkg;
- }
- }
-
- $tmpdir = dirname($descfile);
- if (realpath($descfile) != realpath($pkgfile)) {
- // Use the temp_dir since $descfile can contain the download dir path
- $tmpdir = $this->config->get('temp_dir', null, 'pear.php.net');
- $tmpdir = System::mktemp('-d -t "' . $tmpdir . '"');
-
- $tar = new Archive_Tar($pkgfile);
- if (!$tar->extract($tmpdir)) {
- return $this->raiseError("unable to unpack $pkgfile");
- }
- }
-
- $pkgname = $pkg->getName();
- $channel = $pkg->getChannel();
- if (isset($this->_options['packagingroot'])) {
- $regdir = $this->_prependPath(
- $this->config->get('php_dir', null, 'pear.php.net'),
- $this->_options['packagingroot']);
-
- $packrootphp_dir = $this->_prependPath(
- $this->config->get('php_dir', null, $channel),
- $this->_options['packagingroot']);
- }
-
- if (isset($options['installroot'])) {
- $this->config->setInstallRoot($options['installroot']);
- $this->_registry = &$this->config->getRegistry();
- $installregistry = &$this->_registry;
- $this->installroot = ''; // all done automagically now
- $php_dir = $this->config->get('php_dir', null, $channel);
- } else {
- $this->config->setInstallRoot(false);
- $this->_registry = &$this->config->getRegistry();
- if (isset($this->_options['packagingroot'])) {
- $installregistry = new PEAR_Registry($regdir);
- if (!$installregistry->channelExists($channel, true)) {
- // we need to fake a channel-discover of this channel
- $chanobj = $this->_registry->getChannel($channel, true);
- $installregistry->addChannel($chanobj);
- }
- $php_dir = $packrootphp_dir;
- } else {
- $installregistry = &$this->_registry;
- $php_dir = $this->config->get('php_dir', null, $channel);
- }
- $this->installroot = '';
- }
-
- // {{{ checks to do when not in "force" mode
- if (empty($options['force']) &&
- (file_exists($this->config->get('php_dir')) &&
- is_dir($this->config->get('php_dir')))) {
- $testp = $channel == 'pear.php.net' ? $pkgname : array($channel, $pkgname);
- $instfilelist = $pkg->getInstallationFileList(true);
- if (PEAR::isError($instfilelist)) {
- return $instfilelist;
- }
-
- // ensure we have the most accurate registry
- $installregistry->flushFileMap();
- $test = $installregistry->checkFileMap($instfilelist, $testp, '1.1');
- if (PEAR::isError($test)) {
- return $test;
- }
-
- if (sizeof($test)) {
- $pkgs = $this->getInstallPackages();
- $found = false;
- foreach ($pkgs as $param) {
- if ($pkg->isSubpackageOf($param)) {
- $found = true;
- break;
- }
- }
-
- if ($found) {
- // subpackages can conflict with earlier versions of parent packages
- $parentreg = $installregistry->packageInfo($param->getPackage(), null, $param->getChannel());
- $tmp = $test;
- foreach ($tmp as $file => $info) {
- if (is_array($info)) {
- if (strtolower($info[1]) == strtolower($param->getPackage()) &&
- strtolower($info[0]) == strtolower($param->getChannel())
- ) {
- if (isset($parentreg['filelist'][$file])) {
- unset($parentreg['filelist'][$file]);
- } else{
- $pos = strpos($file, '/');
- $basedir = substr($file, 0, $pos);
- $file2 = substr($file, $pos + 1);
- if (isset($parentreg['filelist'][$file2]['baseinstalldir'])
- && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir
- ) {
- unset($parentreg['filelist'][$file2]);
- }
- }
-
- unset($test[$file]);
- }
- } else {
- if (strtolower($param->getChannel()) != 'pear.php.net') {
- continue;
- }
-
- if (strtolower($info) == strtolower($param->getPackage())) {
- if (isset($parentreg['filelist'][$file])) {
- unset($parentreg['filelist'][$file]);
- } else{
- $pos = strpos($file, '/');
- $basedir = substr($file, 0, $pos);
- $file2 = substr($file, $pos + 1);
- if (isset($parentreg['filelist'][$file2]['baseinstalldir'])
- && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir
- ) {
- unset($parentreg['filelist'][$file2]);
- }
- }
-
- unset($test[$file]);
- }
- }
- }
-
- $pfk = new PEAR_PackageFile($this->config);
- $parentpkg = &$pfk->fromArray($parentreg);
- $installregistry->updatePackage2($parentpkg);
- }
-
- if ($param->getChannel() == 'pecl.php.net' && isset($options['upgrade'])) {
- $tmp = $test;
- foreach ($tmp as $file => $info) {
- if (is_string($info)) {
- // pear.php.net packages are always stored as strings
- if (strtolower($info) == strtolower($param->getPackage())) {
- // upgrading existing package
- unset($test[$file]);
- }
- }
- }
- }
-
- if (count($test)) {
- $msg = "$channel/$pkgname: conflicting files found:\n";
- $longest = max(array_map("strlen", array_keys($test)));
- $fmt = "%${longest}s (%s)\n";
- foreach ($test as $file => $info) {
- if (!is_array($info)) {
- $info = array('pear.php.net', $info);
- }
- $info = $info[0] . '/' . $info[1];
- $msg .= sprintf($fmt, $file, $info);
- }
-
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($msg);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "WARNING: $msg");
- }
- }
- }
- }
- // }}}
-
- $this->startFileTransaction();
-
- $usechannel = $channel;
- if ($channel == 'pecl.php.net') {
- $test = $installregistry->packageExists($pkgname, $channel);
- if (!$test) {
- $test = $installregistry->packageExists($pkgname, 'pear.php.net');
- $usechannel = 'pear.php.net';
- }
- } else {
- $test = $installregistry->packageExists($pkgname, $channel);
- }
-
- if (empty($options['upgrade']) && empty($options['soft'])) {
- // checks to do only when installing new packages
- if (empty($options['force']) && $test) {
- return $this->raiseError("$channel/$pkgname is already installed");
- }
- } else {
- // Upgrade
- if ($test) {
- $v1 = $installregistry->packageInfo($pkgname, 'version', $usechannel);
- $v2 = $pkg->getVersion();
- $cmp = version_compare("$v1", "$v2", 'gt');
- if (empty($options['force']) && !version_compare("$v2", "$v1", 'gt')) {
- return $this->raiseError("upgrade to a newer version ($v2 is not newer than $v1)");
- }
- }
- }
-
- // Do cleanups for upgrade and install, remove old release's files first
- if ($test && empty($options['register-only'])) {
- // when upgrading, remove old release's files first:
- if (PEAR::isError($err = $this->_deletePackageFiles($pkgname, $usechannel,
- true))) {
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($err);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: ' . $err->getMessage());
- }
- } else {
- $backedup = $err;
- }
- }
-
- // {{{ Copy files to dest dir ---------------------------------------
-
- // info from the package it self we want to access from _installFile
- $this->pkginfo = &$pkg;
- // used to determine whether we should build any C code
- $this->source_files = 0;
-
- $savechannel = $this->config->get('default_channel');
- if (empty($options['register-only']) && !is_dir($php_dir)) {
- if (PEAR::isError(System::mkdir(array('-p'), $php_dir))) {
- return $this->raiseError("no installation destination directory '$php_dir'\n");
- }
- }
-
- if (substr($pkgfile, -4) != '.xml') {
- $tmpdir .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion();
- }
-
- $this->configSet('default_channel', $channel);
- // {{{ install files
-
- $ver = $pkg->getPackagexmlVersion();
- if (version_compare($ver, '2.0', '>=')) {
- $filelist = $pkg->getInstallationFilelist();
- } else {
- $filelist = $pkg->getFileList();
- }
-
- if (PEAR::isError($filelist)) {
- return $filelist;
- }
-
- $p = &$installregistry->getPackage($pkgname, $channel);
- $dirtree = (empty($options['register-only']) && $p) ? $p->getDirTree() : false;
-
- $pkg->resetFilelist();
- $pkg->setLastInstalledVersion($installregistry->packageInfo($pkg->getPackage(),
- 'version', $pkg->getChannel()));
- foreach ($filelist as $file => $atts) {
- $this->expectError(PEAR_INSTALLER_FAILED);
- if ($pkg->getPackagexmlVersion() == '1.0') {
- $res = $this->_installFile($file, $atts, $tmpdir, $options);
- } else {
- $res = $this->_installFile2($pkg, $file, $atts, $tmpdir, $options);
- }
- $this->popExpect();
-
- if (PEAR::isError($res)) {
- if (empty($options['ignore-errors'])) {
- $this->rollbackFileTransaction();
- if ($res->getMessage() == "file does not exist") {
- $this->raiseError("file $file in package.xml does not exist");
- }
-
- return $this->raiseError($res);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "Warning: " . $res->getMessage());
- }
- }
-
- $real = isset($atts['attribs']) ? $atts['attribs'] : $atts;
- if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') {
- // Register files that were installed
- $pkg->installedFile($file, $atts);
- }
- }
- // }}}
-
- // {{{ compile and install source files
- if ($this->source_files > 0 && empty($options['nobuild'])) {
- if (PEAR::isError($err =
- $this->_compileSourceFiles($savechannel, $pkg))) {
- return $err;
- }
- }
- // }}}
-
- if (isset($backedup)) {
- $this->_removeBackups($backedup);
- }
-
- if (!$this->commitFileTransaction()) {
- $this->rollbackFileTransaction();
- $this->configSet('default_channel', $savechannel);
- return $this->raiseError("commit failed", PEAR_INSTALLER_FAILED);
- }
- // }}}
-
- $ret = false;
- $installphase = 'install';
- $oldversion = false;
- // {{{ Register that the package is installed -----------------------
- if (empty($options['upgrade'])) {
- // if 'force' is used, replace the info in registry
- $usechannel = $channel;
- if ($channel == 'pecl.php.net') {
- $test = $installregistry->packageExists($pkgname, $channel);
- if (!$test) {
- $test = $installregistry->packageExists($pkgname, 'pear.php.net');
- $usechannel = 'pear.php.net';
- }
- } else {
- $test = $installregistry->packageExists($pkgname, $channel);
- }
-
- if (!empty($options['force']) && $test) {
- $oldversion = $installregistry->packageInfo($pkgname, 'version', $usechannel);
- $installregistry->deletePackage($pkgname, $usechannel);
- }
- $ret = $installregistry->addPackage2($pkg);
- } else {
- if ($dirtree) {
- $this->startFileTransaction();
- // attempt to delete empty directories
- uksort($dirtree, array($this, '_sortDirs'));
- foreach($dirtree as $dir => $notused) {
- $this->addFileOperation('rmdir', array($dir));
- }
- $this->commitFileTransaction();
- }
-
- $usechannel = $channel;
- if ($channel == 'pecl.php.net') {
- $test = $installregistry->packageExists($pkgname, $channel);
- if (!$test) {
- $test = $installregistry->packageExists($pkgname, 'pear.php.net');
- $usechannel = 'pear.php.net';
- }
- } else {
- $test = $installregistry->packageExists($pkgname, $channel);
- }
-
- // new: upgrade installs a package if it isn't installed
- if (!$test) {
- $ret = $installregistry->addPackage2($pkg);
- } else {
- if ($usechannel != $channel) {
- $installregistry->deletePackage($pkgname, $usechannel);
- $ret = $installregistry->addPackage2($pkg);
- } else {
- $ret = $installregistry->updatePackage2($pkg);
- }
- $installphase = 'upgrade';
- }
- }
-
- if (!$ret) {
- $this->configSet('default_channel', $savechannel);
- return $this->raiseError("Adding package $channel/$pkgname to registry failed");
- }
- // }}}
-
- $this->configSet('default_channel', $savechannel);
- if (class_exists('PEAR_Task_Common')) { // this is auto-included if any tasks exist
- if (PEAR_Task_Common::hasPostinstallTasks()) {
- PEAR_Task_Common::runPostinstallTasks($installphase);
- }
- }
-
- return $pkg->toArray(true);
- }
-
- // }}}
-
- // {{{ _compileSourceFiles()
- /**
- * @param string
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- function _compileSourceFiles($savechannel, &$filelist)
- {
- require_once 'PEAR/Builder.php';
- $this->log(1, "$this->source_files source files, building");
- $bob = new PEAR_Builder($this->ui);
- $bob->debug = $this->debug;
- $built = $bob->build($filelist, array(&$this, '_buildCallback'));
- if (PEAR::isError($built)) {
- $this->rollbackFileTransaction();
- $this->configSet('default_channel', $savechannel);
- return $built;
- }
-
- $this->log(1, "\nBuild process completed successfully");
- foreach ($built as $ext) {
- $bn = basename($ext['file']);
- list($_ext_name, $_ext_suff) = explode('.', $bn);
- if ($_ext_suff == '.so' || $_ext_suff == '.dll') {
- if (extension_loaded($_ext_name)) {
- $this->raiseError("Extension '$_ext_name' already loaded. " .
- 'Please unload it in your php.ini file ' .
- 'prior to install or upgrade');
- }
- $role = 'ext';
- } else {
- $role = 'src';
- }
-
- $dest = $ext['dest'];
- $packagingroot = '';
- if (isset($this->_options['packagingroot'])) {
- $packagingroot = $this->_options['packagingroot'];
- }
-
- $copyto = $this->_prependPath($dest, $packagingroot);
- $extra = $copyto != $dest ? " as '$copyto'" : '';
- $this->log(1, "Installing '$dest'$extra");
-
- $copydir = dirname($copyto);
- // pretty much nothing happens if we are only registering the install
- if (empty($this->_options['register-only'])) {
- if (!file_exists($copydir) || !is_dir($copydir)) {
- if (!$this->mkDirHier($copydir)) {
- return $this->raiseError("failed to mkdir $copydir",
- PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ mkdir $copydir");
- }
-
- if (!@copy($ext['file'], $copyto)) {
- return $this->raiseError("failed to write $copyto ($php_errormsg)", PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ cp $ext[file] $copyto");
- $this->addFileOperation('rename', array($ext['file'], $copyto));
- if (!OS_WINDOWS) {
- $mode = 0666 & ~(int)octdec($this->config->get('umask'));
- $this->addFileOperation('chmod', array($mode, $copyto));
- if (!@chmod($copyto, $mode)) {
- $this->log(0, "failed to change mode of $copyto ($php_errormsg)");
- }
- }
- }
-
-
- $data = array(
- 'role' => $role,
- 'name' => $bn,
- 'installed_as' => $dest,
- 'php_api' => $ext['php_api'],
- 'zend_mod_api' => $ext['zend_mod_api'],
- 'zend_ext_api' => $ext['zend_ext_api'],
- );
-
- if ($filelist->getPackageXmlVersion() == '1.0') {
- $filelist->installedFile($bn, $data);
- } else {
- $filelist->installedFile($bn, array('attribs' => $data));
- }
- }
- }
-
- // }}}
- function &getUninstallPackages()
- {
- return $this->_downloadedPackages;
- }
- // {{{ uninstall()
-
- /**
- * Uninstall a package
- *
- * This method removes all files installed by the application, and then
- * removes any empty directories.
- * @param string package name
- * @param array Command-line options. Possibilities include:
- *
- * - installroot: base installation dir, if not the default
- * - register-only : update registry but don't remove files
- * - nodeps: do not process dependencies of other packages to ensure
- * uninstallation does not break things
- */
- function uninstall($package, $options = array())
- {
- $installRoot = isset($options['installroot']) ? $options['installroot'] : '';
- $this->config->setInstallRoot($installRoot);
-
- $this->installroot = '';
- $this->_registry = &$this->config->getRegistry();
- if (is_object($package)) {
- $channel = $package->getChannel();
- $pkg = $package;
- $package = $pkg->getPackage();
- } else {
- $pkg = false;
- $info = $this->_registry->parsePackageName($package,
- $this->config->get('default_channel'));
- $channel = $info['channel'];
- $package = $info['package'];
- }
-
- $savechannel = $this->config->get('default_channel');
- $this->configSet('default_channel', $channel);
- if (!is_object($pkg)) {
- $pkg = $this->_registry->getPackage($package, $channel);
- }
-
- if (!$pkg) {
- $this->configSet('default_channel', $savechannel);
- return $this->raiseError($this->_registry->parsedPackageNameToString(
- array(
- 'channel' => $channel,
- 'package' => $package
- ), true) . ' not installed');
- }
-
- if ($pkg->getInstalledBinary()) {
- // this is just an alias for a binary package
- return $this->_registry->deletePackage($package, $channel);
- }
-
- $filelist = $pkg->getFilelist();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'PEAR/Dependency2.php';
- }
-
- $depchecker = new PEAR_Dependency2($this->config, $options,
- array('channel' => $channel, 'package' => $package),
- PEAR_VALIDATE_UNINSTALLING);
- $e = $depchecker->validatePackageUninstall($this);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($e)) {
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($e);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: ' . $e->getMessage());
- }
- } elseif (is_array($e)) {
- if (!isset($options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
-
- $this->pkginfo = &$pkg;
- // pretty much nothing happens if we are only registering the uninstall
- if (empty($options['register-only'])) {
- // {{{ Delete the files
- $this->startFileTransaction();
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) {
- PEAR::popErrorHandling();
- $this->rollbackFileTransaction();
- $this->configSet('default_channel', $savechannel);
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($err);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: ' . $err->getMessage());
- }
- } else {
- PEAR::popErrorHandling();
- }
-
- if (!$this->commitFileTransaction()) {
- $this->rollbackFileTransaction();
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("uninstall failed");
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: uninstall failed');
- }
- } else {
- $this->startFileTransaction();
- $dirtree = $pkg->getDirTree();
- if ($dirtree === false) {
- $this->configSet('default_channel', $savechannel);
- return $this->_registry->deletePackage($package, $channel);
- }
-
- // attempt to delete empty directories
- uksort($dirtree, array($this, '_sortDirs'));
- foreach($dirtree as $dir => $notused) {
- $this->addFileOperation('rmdir', array($dir));
- }
-
- if (!$this->commitFileTransaction()) {
- $this->rollbackFileTransaction();
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("uninstall failed");
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: uninstall failed');
- }
- }
- }
- // }}}
- }
-
- $this->configSet('default_channel', $savechannel);
- // Register that the package is no longer installed
- return $this->_registry->deletePackage($package, $channel);
- }
-
- /**
- * Sort a list of arrays of array(downloaded packagefilename) by dependency.
- *
- * It also removes duplicate dependencies
- * @param array an array of PEAR_PackageFile_v[1/2] objects
- * @return array|PEAR_Error array of array(packagefilename, package.xml contents)
- */
- function sortPackagesForUninstall(&$packages)
- {
- $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->config);
- if (PEAR::isError($this->_dependencyDB)) {
- return $this->_dependencyDB;
- }
- usort($packages, array(&$this, '_sortUninstall'));
- }
-
- function _sortUninstall($a, $b)
- {
- if (!$a->getDeps() && !$b->getDeps()) {
- return 0; // neither package has dependencies, order is insignificant
- }
- if ($a->getDeps() && !$b->getDeps()) {
- return -1; // $a must be installed after $b because $a has dependencies
- }
- if (!$a->getDeps() && $b->getDeps()) {
- return 1; // $b must be installed after $a because $b has dependencies
- }
- // both packages have dependencies
- if ($this->_dependencyDB->dependsOn($a, $b)) {
- return -1;
- }
- if ($this->_dependencyDB->dependsOn($b, $a)) {
- return 1;
- }
- return 0;
- }
-
- // }}}
- // {{{ _sortDirs()
- function _sortDirs($a, $b)
- {
- if (strnatcmp($a, $b) == -1) return 1;
- if (strnatcmp($a, $b) == 1) return -1;
- return 0;
- }
-
- // }}}
-
- // {{{ _buildCallback()
-
- function _buildCallback($what, $data)
- {
- if (($what == 'cmdoutput' && $this->debug > 1) ||
- ($what == 'output' && $this->debug > 0)) {
- $this->ui->outputData(rtrim($data), 'build');
- }
- }
-
- // }}}
-}
-
-/**
- * PEAR_PackageFile, package.xml parsing utility class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * needed for PEAR_VALIDATE_* constants
- */
-require_once 'PEAR/Validate.php';
-/**
- * Error code if the package.xml <package> tag does not contain a valid version
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION', 1);
-/**
- * Error code if the package.xml <package> tag version is not supported (version 1.0 and 1.1 are the only supported versions,
- * currently
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2);
-/**
- * Abstraction for the package.xml package description file
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile
-{
- /**
- * @var PEAR_Config
- */
- var $_config;
- var $_debug;
-
- var $_logger = false;
- /**
- * @var boolean
- */
- var $_rawReturn = false;
-
- /**
- * helper for extracting Archive_Tar errors
- * @var array
- * @access private
- */
- var $_extractErrors = array();
-
- /**
- *
- * @param PEAR_Config $config
- * @param ? $debug
- * @param string @tmpdir Optional temporary directory for uncompressing
- * files
- */
- function __construct(&$config, $debug = false)
- {
- $this->_config = $config;
- $this->_debug = $debug;
- }
-
- /**
- * Turn off validation - return a parsed package.xml without checking it
- *
- * This is used by the package-validate command
- */
- function rawReturn()
- {
- $this->_rawReturn = true;
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
-
- /**
- * Create a PEAR_PackageFile_Parser_v* of a given version.
- * @param int $version
- * @return PEAR_PackageFile_Parser_v1|PEAR_PackageFile_Parser_v1
- */
- function &parserFactory($version)
- {
- if (!in_array($version{0}, array('1', '2'))) {
- $a = false;
- return $a;
- }
-
- include_once 'PEAR/PackageFile/Parser/v' . $version{0} . '.php';
- $version = $version{0};
- $class = "PEAR_PackageFile_Parser_v$version";
- $a = new $class;
- return $a;
- }
-
- /**
- * For simpler unit-testing
- * @return string
- */
- function getClassPrefix()
- {
- return 'PEAR_PackageFile_v';
- }
-
- /**
- * Create a PEAR_PackageFile_v* of a given version.
- * @param int $version
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v1
- */
- function &factory($version)
- {
- if (!in_array($version{0}, array('1', '2'))) {
- $a = false;
- return $a;
- }
-
- include_once 'PEAR/PackageFile/v' . $version{0} . '.php';
- $version = $version{0};
- $class = $this->getClassPrefix() . $version;
- $a = new $class;
- return $a;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from its toArray() method
- *
- * WARNING: no validation is performed, the array is assumed to be valid,
- * always parse from xml if you want validation.
- * @param array $arr
- * @return PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2
- * @uses factory() to construct the returned object.
- */
- function &fromArray($arr)
- {
- if (isset($arr['xsdversion'])) {
- $obj = &$this->factory($arr['xsdversion']);
- if ($this->_logger) {
- $obj->setLogger($this->_logger);
- }
-
- $obj->setConfig($this->_config);
- $obj->fromArray($arr);
- return $obj;
- }
-
- if (isset($arr['package']['attribs']['version'])) {
- $obj = &$this->factory($arr['package']['attribs']['version']);
- } else {
- $obj = &$this->factory('1.0');
- }
-
- if ($this->_logger) {
- $obj->setLogger($this->_logger);
- }
-
- $obj->setConfig($this->_config);
- $obj->fromArray($arr);
- return $obj;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from an XML string.
- * @access public
- * @param string $data contents of package.xml file
- * @param int $state package state (one of PEAR_VALIDATE_* constants)
- * @param string $file full path to the package.xml file (and the files
- * it references)
- * @param string $archive optional name of the archive that the XML was
- * extracted from, if any
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @uses parserFactory() to construct a parser to load the package.
- */
- function &fromXmlString($data, $state, $file, $archive = false)
- {
- if (preg_match('/<package[^>]+version=[\'"]([0-9]+\.[0-9]+)[\'"]/', $data, $packageversion)) {
- if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) {
- return PEAR::raiseError('package.xml version "' . $packageversion[1] .
- '" is not supported, only 1.0, 2.0, and 2.1 are supported.');
- }
-
- $object = &$this->parserFactory($packageversion[1]);
- if ($this->_logger) {
- $object->setLogger($this->_logger);
- }
-
- $object->setConfig($this->_config);
- $pf = $object->parse($data, $file, $archive);
- if (PEAR::isError($pf)) {
- return $pf;
- }
-
- if ($this->_rawReturn) {
- return $pf;
- }
-
- if (!$pf->validate($state)) {;
- if ($this->_config->get('verbose') > 0
- && $this->_logger && $pf->getValidationWarnings(false)
- ) {
- foreach ($pf->getValidationWarnings(false) as $warning) {
- $this->_logger->log(0, 'ERROR: ' . $warning['message']);
- }
- }
-
- $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed',
- 2, null, null, $pf->getValidationWarnings());
- return $a;
- }
-
- if ($this->_logger && $pf->getValidationWarnings(false)) {
- foreach ($pf->getValidationWarnings() as $warning) {
- $this->_logger->log(0, 'WARNING: ' . $warning['message']);
- }
- }
-
- if (method_exists($pf, 'flattenFilelist')) {
- $pf->flattenFilelist(); // for v2
- }
-
- return $pf;
- } elseif (preg_match('/<package[^>]+version=[\'"]([^"\']+)[\'"]/', $data, $packageversion)) {
- $a = PEAR::raiseError('package.xml file "' . $file .
- '" has unsupported package.xml <package> version "' . $packageversion[1] . '"');
- return $a;
- } else {
- if (!class_exists('PEAR_ErrorStack')) {
- require_once 'PEAR/ErrorStack.php';
- }
-
- PEAR_ErrorStack::staticPush('PEAR_PackageFile',
- PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION,
- 'warning', array('xml' => $data), 'package.xml "' . $file .
- '" has no package.xml <package> version');
- $object = &$this->parserFactory('1.0');
- $object->setConfig($this->_config);
- $pf = $object->parse($data, $file, $archive);
- if (PEAR::isError($pf)) {
- return $pf;
- }
-
- if ($this->_rawReturn) {
- return $pf;
- }
-
- if (!$pf->validate($state)) {
- $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed',
- 2, null, null, $pf->getValidationWarnings());
- return $a;
- }
-
- if ($this->_logger && $pf->getValidationWarnings(false)) {
- foreach ($pf->getValidationWarnings() as $warning) {
- $this->_logger->log(0, 'WARNING: ' . $warning['message']);
- }
- }
-
- if (method_exists($pf, 'flattenFilelist')) {
- $pf->flattenFilelist(); // for v2
- }
-
- return $pf;
- }
- }
-
- /**
- * Register a temporary file or directory. When the destructor is
- * executed, all registered temporary files and directories are
- * removed.
- *
- * @param string $file name of file or directory
- * @return void
- */
- function addTempFile($file)
- {
- $GLOBALS['_PEAR_Common_tempfiles'][] = $file;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from a compresed Tar or Tgz file.
- * @access public
- * @param string contents of package.xml file
- * @param int package state (one of PEAR_VALIDATE_* constants)
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @using Archive_Tar to extract the files
- * @using fromPackageFile() to load the package after the package.xml
- * file is extracted.
- */
- function &fromTgzFile($file, $state)
- {
- if (!class_exists('Archive_Tar')) {
- require_once 'Archive/Tar.php';
- }
-
- $tar = new Archive_Tar($file);
- if ($this->_debug <= 1) {
- $tar->pushErrorHandling(PEAR_ERROR_RETURN);
- }
-
- $content = $tar->listContent();
- if ($this->_debug <= 1) {
- $tar->popErrorHandling();
- }
-
- if (!is_array($content)) {
- if (is_string($file) && strlen($file < 255) &&
- (!file_exists($file) || !@is_file($file))) {
- $ret = PEAR::raiseError("could not open file \"$file\"");
- return $ret;
- }
-
- $file = realpath($file);
- $ret = PEAR::raiseError("Could not get contents of package \"$file\"".
- '. Invalid tgz file.');
- return $ret;
- }
-
- if (!count($content) && !@is_file($file)) {
- $ret = PEAR::raiseError("could not open file \"$file\"");
- return $ret;
- }
-
- $xml = null;
- $origfile = $file;
- foreach ($content as $file) {
- $name = $file['filename'];
- if ($name == 'package2.xml') { // allow a .tgz to distribute both versions
- $xml = $name;
- break;
- }
-
- if ($name == 'package.xml') {
- $xml = $name;
- break;
- } elseif (preg_match('/package.xml$/', $name, $match)) {
- $xml = $name;
- break;
- }
- }
-
- $tmpdir = System::mktemp('-t "' . $this->_config->get('temp_dir') . '" -d pear');
- if ($tmpdir === false) {
- $ret = PEAR::raiseError("there was a problem with getting the configured temp directory");
- return $ret;
- }
-
- PEAR_PackageFile::addTempFile($tmpdir);
-
- $this->_extractErrors();
- PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors'));
-
- if (!$xml || !$tar->extractList(array($xml), $tmpdir)) {
- $extra = implode("\n", $this->_extractErrors());
- if ($extra) {
- $extra = ' ' . $extra;
- }
-
- PEAR::staticPopErrorHandling();
- $ret = PEAR::raiseError('could not extract the package.xml file from "' .
- $origfile . '"' . $extra);
- return $ret;
- }
-
- PEAR::staticPopErrorHandling();
- $ret = &PEAR_PackageFile::fromPackageFile("$tmpdir/$xml", $state, $origfile);
- return $ret;
- }
-
- /**
- * helper callback for extracting Archive_Tar errors
- *
- * @param PEAR_Error|null $err
- * @return array
- * @access private
- */
- function _extractErrors($err = null)
- {
- static $errors = array();
- if ($err === null) {
- $e = $errors;
- $errors = array();
- return $e;
- }
- $errors[] = $err->getMessage();
- }
-
- /**
- * Create a PEAR_PackageFile_v* from a package.xml file.
- *
- * @access public
- * @param string $descfile name of package xml file
- * @param int $state package state (one of PEAR_VALIDATE_* constants)
- * @param string|false $archive name of the archive this package.xml came
- * from, if any
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @uses PEAR_PackageFile::fromXmlString to create the oject after the
- * XML is loaded from the package.xml file.
- */
- function &fromPackageFile($descfile, $state, $archive = false)
- {
- $fp = false;
- if (is_string($descfile) && strlen($descfile) < 255 &&
- (
- !file_exists($descfile) || !is_file($descfile) || !is_readable($descfile)
- || (!$fp = @fopen($descfile, 'r'))
- )
- ) {
- $a = PEAR::raiseError("Unable to open $descfile");
- return $a;
- }
-
- // read the whole thing so we only get one cdata callback
- // for each block of cdata
- fclose($fp);
- $data = file_get_contents($descfile);
- $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive);
- return $ret;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file.
- *
- * This method is able to extract information about a package from a .tgz
- * archive or from a XML package definition file.
- *
- * @access public
- * @param string $info file name
- * @param int $state package state (one of PEAR_VALIDATE_* constants)
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @uses fromPackageFile() if the file appears to be XML
- * @uses fromTgzFile() to load all non-XML files
- */
- function &fromAnyFile($info, $state)
- {
- if (is_dir($info)) {
- $dir_name = realpath($info);
- if (file_exists($dir_name . '/package.xml')) {
- $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state);
- } elseif (file_exists($dir_name . '/package2.xml')) {
- $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state);
- } else {
- $info = PEAR::raiseError("No package definition found in '$info' directory");
- }
-
- return $info;
- }
-
- $fp = false;
- if (is_string($info) && strlen($info) < 255 &&
- (file_exists($info) || ($fp = @fopen($info, 'r')))
- ) {
-
- if ($fp) {
- fclose($fp);
- }
-
- $tmp = substr($info, -4);
- if ($tmp == '.xml') {
- $info = &PEAR_PackageFile::fromPackageFile($info, $state);
- } elseif ($tmp == '.tar' || $tmp == '.tgz') {
- $info = &PEAR_PackageFile::fromTgzFile($info, $state);
- } else {
- $fp = fopen($info, 'r');
- $test = fread($fp, 5);
- fclose($fp);
- if ($test == '<?xml') {
- $info = &PEAR_PackageFile::fromPackageFile($info, $state);
- } else {
- $info = &PEAR_PackageFile::fromTgzFile($info, $state);
- }
- }
-
- return $info;
- }
-
- $info = PEAR::raiseError("Cannot open '$info' for parsing");
- return $info;
- }
-}
-
-/**
- * PEAR_Packager for generating releases
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR/Common.php';
-require_once 'PEAR/PackageFile.php';
-require_once 'System.php';
-
-/**
- * Administration class used to make a PEAR release tarball.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Packager extends PEAR_Common
-{
- /**
- * @var PEAR_Registry
- */
- var $_registry;
-
- function package($pkgfile = null, $compress = true, $pkg2 = null)
- {
- // {{{ validate supplied package.xml file
- if (empty($pkgfile)) {
- $pkgfile = 'package.xml';
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $pkg = new PEAR_PackageFile($this->config, $this->debug);
- $pf = &$pkg->fromPackageFile($pkgfile, PEAR_VALIDATE_NORMAL);
- $main = &$pf;
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf)) {
- if (is_array($pf->getUserInfo())) {
- foreach ($pf->getUserInfo() as $error) {
- $this->log(0, 'Error: ' . $error['message']);
- }
- }
-
- $this->log(0, $pf->getMessage());
- return $this->raiseError("Cannot package, errors in package file");
- }
-
- foreach ($pf->getValidationWarnings() as $warning) {
- $this->log(1, 'Warning: ' . $warning['message']);
- }
-
- // }}}
- if ($pkg2) {
- $this->log(0, 'Attempting to process the second package file');
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $pf2 = &$pkg->fromPackageFile($pkg2, PEAR_VALIDATE_NORMAL);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf2)) {
- if (is_array($pf2->getUserInfo())) {
- foreach ($pf2->getUserInfo() as $error) {
- $this->log(0, 'Error: ' . $error['message']);
- }
- }
- $this->log(0, $pf2->getMessage());
- return $this->raiseError("Cannot package, errors in second package file");
- }
-
- foreach ($pf2->getValidationWarnings() as $warning) {
- $this->log(1, 'Warning: ' . $warning['message']);
- }
-
- if ($pf2->getPackagexmlVersion() == '2.0' ||
- $pf2->getPackagexmlVersion() == '2.1'
- ) {
- $main = &$pf2;
- $other = &$pf;
- } else {
- $main = &$pf;
- $other = &$pf2;
- }
-
- if ($main->getPackagexmlVersion() != '2.0' &&
- $main->getPackagexmlVersion() != '2.1') {
- return PEAR::raiseError('Error: cannot package two package.xml version 1.0, can ' .
- 'only package together a package.xml 1.0 and package.xml 2.0');
- }
-
- if ($other->getPackagexmlVersion() != '1.0') {
- return PEAR::raiseError('Error: cannot package two package.xml version 2.0, can ' .
- 'only package together a package.xml 1.0 and package.xml 2.0');
- }
- }
-
- $main->setLogger($this);
- if (!$main->validate(PEAR_VALIDATE_PACKAGING)) {
- foreach ($main->getValidationWarnings() as $warning) {
- $this->log(0, 'Error: ' . $warning['message']);
- }
- return $this->raiseError("Cannot package, errors in package");
- }
-
- foreach ($main->getValidationWarnings() as $warning) {
- $this->log(1, 'Warning: ' . $warning['message']);
- }
-
- if ($pkg2) {
- $other->setLogger($this);
- $a = false;
- if (!$other->validate(PEAR_VALIDATE_NORMAL) || $a = !$main->isEquivalent($other)) {
- foreach ($other->getValidationWarnings() as $warning) {
- $this->log(0, 'Error: ' . $warning['message']);
- }
-
- foreach ($main->getValidationWarnings() as $warning) {
- $this->log(0, 'Error: ' . $warning['message']);
- }
-
- if ($a) {
- return $this->raiseError('The two package.xml files are not equivalent!');
- }
-
- return $this->raiseError("Cannot package, errors in package");
- }
-
- foreach ($other->getValidationWarnings() as $warning) {
- $this->log(1, 'Warning: ' . $warning['message']);
- }
-
- $gen = &$main->getDefaultGenerator();
- $tgzfile = $gen->toTgz2($this, $other, $compress);
- if (PEAR::isError($tgzfile)) {
- return $tgzfile;
- }
-
- $dest_package = basename($tgzfile);
- $pkgdir = dirname($pkgfile);
-
- // TAR the Package -------------------------------------------
- $this->log(1, "Package $dest_package done");
- if (file_exists("$pkgdir/CVS/Root")) {
- $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion());
- $cvstag = "RELEASE_$cvsversion";
- $this->log(1, 'Tag the released code with "pear cvstag ' .
- $main->getPackageFile() . '"');
- $this->log(1, "(or set the CVS tag $cvstag by hand)");
- } elseif (file_exists("$pkgdir/.svn")) {
- $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion());
- $svntag = $pf->getName() . "-$svnversion";
- $this->log(1, 'Tag the released code with "pear svntag ' .
- $main->getPackageFile() . '"');
- $this->log(1, "(or set the SVN tag $svntag by hand)");
- }
- } else { // this branch is executed for single packagefile packaging
- $gen = &$pf->getDefaultGenerator();
- $tgzfile = $gen->toTgz($this, $compress);
- if (PEAR::isError($tgzfile)) {
- $this->log(0, $tgzfile->getMessage());
- return $this->raiseError("Cannot package, errors in package");
- }
-
- $dest_package = basename($tgzfile);
- $pkgdir = dirname($pkgfile);
-
- // TAR the Package -------------------------------------------
- $this->log(1, "Package $dest_package done");
- if (file_exists("$pkgdir/CVS/Root")) {
- $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion());
- $cvstag = "RELEASE_$cvsversion";
- $this->log(1, "Tag the released code with `pear cvstag $pkgfile'");
- $this->log(1, "(or set the CVS tag $cvstag by hand)");
- } elseif (file_exists("$pkgdir/.svn")) {
- $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion());
- $svntag = $pf->getName() . "-$svnversion";
- $this->log(1, "Tag the released code with `pear svntag $pkgfile'");
- $this->log(1, "(or set the SVN tag $svntag by hand)");
- }
- }
-
- return $dest_package;
- }
-}
-/**
- * PEAR_Registry
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * for PEAR_Error
- */
-require_once 'PEAR.php';
-require_once 'PEAR/DependencyDB.php';
-
-define('PEAR_REGISTRY_ERROR_LOCK', -2);
-define('PEAR_REGISTRY_ERROR_FORMAT', -3);
-define('PEAR_REGISTRY_ERROR_FILE', -4);
-define('PEAR_REGISTRY_ERROR_CONFLICT', -5);
-define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6);
-
-/**
- * Administration class used to maintain the installed package database.
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Registry extends PEAR
-{
- /**
- * File containing all channel information.
- * @var string
- */
- var $channels = '';
-
- /** Directory where registry files are stored.
- * @var string
- */
- var $statedir = '';
-
- /** File where the file map is stored
- * @var string
- */
- var $filemap = '';
-
- /** Directory where registry files for channels are stored.
- * @var string
- */
- var $channelsdir = '';
-
- /** Name of file used for locking the registry
- * @var string
- */
- var $lockfile = '';
-
- /** File descriptor used during locking
- * @var resource
- */
- var $lock_fp = null;
-
- /** Mode used during locking
- * @var int
- */
- var $lock_mode = 0; // XXX UNUSED
-
- /** Cache of package information. Structure:
- * array(
- * 'package' => array('id' => ... ),
- * ... )
- * @var array
- */
- var $pkginfo_cache = array();
-
- /** Cache of file map. Structure:
- * array( '/path/to/file' => 'package', ... )
- * @var array
- */
- var $filemap_cache = array();
-
- /**
- * @var false|PEAR_ChannelFile
- */
- var $_pearChannel;
-
- /**
- * @var false|PEAR_ChannelFile
- */
- var $_peclChannel;
-
- /**
- * @var false|PEAR_ChannelFile
- */
- var $_docChannel;
-
- /**
- * @var PEAR_DependencyDB
- */
- var $_dependencyDB;
-
- /**
- * @var PEAR_Config
- */
- var $_config;
-
- /**
- * PEAR_Registry constructor.
- *
- * @param string (optional) PEAR install directory (for .php files)
- * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PEAR channel, if
- * default values are not desired. Only used the very first time a PEAR
- * repository is initialized
- * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PECL channel, if
- * default values are not desired. Only used the very first time a PEAR
- * repository is initialized
- *
- * @access public
- */
- function __construct($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false,
- $pecl_channel = false)
- {
- parent::__construct();
- $this->setInstallDir($pear_install_dir);
- $this->_pearChannel = $pear_channel;
- $this->_peclChannel = $pecl_channel;
- $this->_config = false;
- }
-
- function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR)
- {
- $ds = DIRECTORY_SEPARATOR;
- $this->install_dir = $pear_install_dir;
- $this->channelsdir = $pear_install_dir.$ds.'.channels';
- $this->statedir = $pear_install_dir.$ds.'.registry';
- $this->filemap = $pear_install_dir.$ds.'.filemap';
- $this->lockfile = $pear_install_dir.$ds.'.lock';
- }
-
- function hasWriteAccess()
- {
- if (!file_exists($this->install_dir)) {
- $dir = $this->install_dir;
- while ($dir && $dir != '.') {
- $olddir = $dir;
- $dir = dirname($dir);
- if ($dir != '.' && file_exists($dir)) {
- if (is_writeable($dir)) {
- return true;
- }
-
- return false;
- }
-
- if ($dir == $olddir) { // this can happen in safe mode
- return @is_writable($dir);
- }
- }
-
- return false;
- }
-
- return is_writeable($this->install_dir);
- }
-
- function setConfig(&$config, $resetInstallDir = true)
- {
- $this->_config = &$config;
- if ($resetInstallDir) {
- $this->setInstallDir($config->get('php_dir'));
- }
- }
-
- function _initializeChannelDirs()
- {
- static $running = false;
- if (!$running) {
- $running = true;
- $ds = DIRECTORY_SEPARATOR;
- if (!is_dir($this->channelsdir) ||
- !file_exists($this->channelsdir . $ds . 'pear.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . '__uri.reg')) {
- if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) {
- $pear_channel = $this->_pearChannel;
- if (!is_a($pear_channel, 'PEAR_ChannelFile') || !$pear_channel->validate()) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $pear_channel = new PEAR_ChannelFile;
- $pear_channel->setAlias('pear');
- $pear_channel->setServer('pear.php.net');
- $pear_channel->setSummary('PHP Extension and Application Repository');
- $pear_channel->setDefaultPEARProtocols();
- $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
- //$pear_channel->setBaseURL('REST1.4', 'http://pear.php.net/rest/');
- } else {
- $pear_channel->setServer('pear.php.net');
- $pear_channel->setAlias('pear');
- }
-
- $pear_channel->validate();
- $this->_addChannel($pear_channel);
- }
-
- if (!file_exists($this->channelsdir . $ds . 'pecl.php.net.reg')) {
- $pecl_channel = $this->_peclChannel;
- if (!is_a($pecl_channel, 'PEAR_ChannelFile') || !$pecl_channel->validate()) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $pecl_channel = new PEAR_ChannelFile;
- $pecl_channel->setAlias('pecl');
- $pecl_channel->setServer('pecl.php.net');
- $pecl_channel->setSummary('PHP Extension Community Library');
- $pecl_channel->setDefaultPEARProtocols();
- $pecl_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
- $pecl_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
- $pecl_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
- } else {
- $pecl_channel->setServer('pecl.php.net');
- $pecl_channel->setAlias('pecl');
- }
-
- $pecl_channel->validate();
- $this->_addChannel($pecl_channel);
- }
-
- if (!file_exists($this->channelsdir . $ds . 'doc.php.net.reg')) {
- $doc_channel = $this->_docChannel;
- if (!is_a($doc_channel, 'PEAR_ChannelFile') || !$doc_channel->validate()) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $doc_channel = new PEAR_ChannelFile;
- $doc_channel->setAlias('phpdocs');
- $doc_channel->setServer('doc.php.net');
- $doc_channel->setSummary('PHP Documentation Team');
- $doc_channel->setDefaultPEARProtocols();
- $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
- } else {
- $doc_channel->setServer('doc.php.net');
- $doc_channel->setAlias('doc');
- }
-
- $doc_channel->validate();
- $this->_addChannel($doc_channel);
- }
-
- if (!file_exists($this->channelsdir . $ds . '__uri.reg')) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $private = new PEAR_ChannelFile;
- $private->setName('__uri');
- $private->setDefaultPEARProtocols();
- $private->setBaseURL('REST1.0', '****');
- $private->setSummary('Pseudo-channel for static packages');
- $this->_addChannel($private);
- }
- $this->_rebuildFileMap();
- }
-
- $running = false;
- }
- }
-
- function _initializeDirs()
- {
- $ds = DIRECTORY_SEPARATOR;
- // XXX Compatibility code should be removed in the future
- // rename all registry files if any to lowercase
- if (!OS_WINDOWS && file_exists($this->statedir) && is_dir($this->statedir) &&
- $handle = opendir($this->statedir)) {
- $dest = $this->statedir . $ds;
- while (false !== ($file = readdir($handle))) {
- if (preg_match('/^.*[A-Z].*\.reg\\z/', $file)) {
- rename($dest . $file, $dest . strtolower($file));
- }
- }
- closedir($handle);
- }
-
- $this->_initializeChannelDirs();
- if (!file_exists($this->filemap)) {
- $this->_rebuildFileMap();
- }
- $this->_initializeDepDB();
- }
-
- function _initializeDepDB()
- {
- if (!isset($this->_dependencyDB)) {
- static $initializing = false;
- if (!$initializing) {
- $initializing = true;
- if (!$this->_config) { // never used?
- $file = OS_WINDOWS ? 'pear.ini' : '.pearrc';
- $this->_config = new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR .
- $file);
- $this->_config->setRegistry($this);
- $this->_config->set('php_dir', $this->install_dir);
- }
-
- $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
- if (PEAR::isError($this->_dependencyDB)) {
- // attempt to recover by removing the dep db
- if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') .
- DIRECTORY_SEPARATOR . '.depdb')) {
- @unlink($this->_config->get('php_dir', null, 'pear.php.net') .
- DIRECTORY_SEPARATOR . '.depdb');
- }
-
- $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
- if (PEAR::isError($this->_dependencyDB)) {
- echo $this->_dependencyDB->getMessage();
- echo 'Unrecoverable error';
- exit(1);
- }
- }
-
- $initializing = false;
- }
- }
- }
-
- /**
- * PEAR_Registry destructor. Makes sure no locks are forgotten.
- *
- * @access private
- */
- function _PEAR_Registry()
- {
- parent::_PEAR();
- if (is_resource($this->lock_fp)) {
- $this->_unlock();
- }
- }
-
- /**
- * Make sure the directory where we keep registry files exists.
- *
- * @return bool TRUE if directory exists, FALSE if it could not be
- * created
- *
- * @access private
- */
- function _assertStateDir($channel = false)
- {
- if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') {
- return $this->_assertChannelStateDir($channel);
- }
-
- static $init = false;
- if (!file_exists($this->statedir)) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'System.php';
- if (!System::mkdir(array('-p', $this->statedir))) {
- return $this->raiseError("could not create directory '{$this->statedir}'");
- }
- $init = true;
- } elseif (!is_dir($this->statedir)) {
- return $this->raiseError('Cannot create directory ' . $this->statedir . ', ' .
- 'it already exists and is not a directory');
- }
-
- $ds = DIRECTORY_SEPARATOR;
- if (!file_exists($this->channelsdir)) {
- if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . '__uri.reg')) {
- $init = true;
- }
- } elseif (!is_dir($this->channelsdir)) {
- return $this->raiseError('Cannot create directory ' . $this->channelsdir . ', ' .
- 'it already exists and is not a directory');
- }
-
- if ($init) {
- static $running = false;
- if (!$running) {
- $running = true;
- $this->_initializeDirs();
- $running = false;
- $init = false;
- }
- } else {
- $this->_initializeDepDB();
- }
-
- return true;
- }
-
- /**
- * Make sure the directory where we keep registry files exists for a non-standard channel.
- *
- * @param string channel name
- * @return bool TRUE if directory exists, FALSE if it could not be
- * created
- *
- * @access private
- */
- function _assertChannelStateDir($channel)
- {
- $ds = DIRECTORY_SEPARATOR;
- if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') {
- if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) {
- $this->_initializeChannelDirs();
- }
- return $this->_assertStateDir($channel);
- }
-
- $channelDir = $this->_channelDirectoryName($channel);
- if (!is_dir($this->channelsdir) ||
- !file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) {
- $this->_initializeChannelDirs();
- }
-
- if (!file_exists($channelDir)) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'System.php';
- if (!System::mkdir(array('-p', $channelDir))) {
- return $this->raiseError("could not create directory '" . $channelDir .
- "'");
- }
- } elseif (!is_dir($channelDir)) {
- return $this->raiseError("could not create directory '" . $channelDir .
- "', already exists and is not a directory");
- }
-
- return true;
- }
-
- /**
- * Make sure the directory where we keep registry files for channels exists
- *
- * @return bool TRUE if directory exists, FALSE if it could not be
- * created
- *
- * @access private
- */
- function _assertChannelDir()
- {
- if (!file_exists($this->channelsdir)) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'System.php';
- if (!System::mkdir(array('-p', $this->channelsdir))) {
- return $this->raiseError("could not create directory '{$this->channelsdir}'");
- }
- } elseif (!is_dir($this->channelsdir)) {
- return $this->raiseError("could not create directory '{$this->channelsdir}" .
- "', it already exists and is not a directory");
- }
-
- if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'System.php';
- if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) {
- return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'");
- }
- } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
- return $this->raiseError("could not create directory '{$this->channelsdir}" .
- "/.alias', it already exists and is not a directory");
- }
-
- return true;
- }
-
- /**
- * Get the name of the file where data for a given package is stored.
- *
- * @param string channel name, or false if this is a PEAR package
- * @param string package name
- *
- * @return string registry file name
- *
- * @access public
- */
- function _packageFileName($package, $channel = false)
- {
- if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') {
- return $this->_channelDirectoryName($channel) . DIRECTORY_SEPARATOR .
- strtolower($package) . '.reg';
- }
-
- return $this->statedir . DIRECTORY_SEPARATOR . strtolower($package) . '.reg';
- }
-
- /**
- * Get the name of the file where data for a given channel is stored.
- * @param string channel name
- * @return string registry file name
- */
- function _channelFileName($channel, $noaliases = false)
- {
- if (!$noaliases) {
- if (file_exists($this->_getChannelAliasFileName($channel))) {
- $channel = implode('', file($this->_getChannelAliasFileName($channel)));
- }
- }
- return $this->channelsdir . DIRECTORY_SEPARATOR . str_replace('/', '_',
- strtolower($channel)) . '.reg';
- }
-
- /**
- * @param string
- * @return string
- */
- function _getChannelAliasFileName($alias)
- {
- return $this->channelsdir . DIRECTORY_SEPARATOR . '.alias' .
- DIRECTORY_SEPARATOR . str_replace('/', '_', strtolower($alias)) . '.txt';
- }
-
- /**
- * Get the name of a channel from its alias
- */
- function _getChannelFromAlias($channel)
- {
- if (!$this->_channelExists($channel)) {
- if ($channel == 'pear.php.net') {
- return 'pear.php.net';
- }
-
- if ($channel == 'pecl.php.net') {
- return 'pecl.php.net';
- }
-
- if ($channel == 'doc.php.net') {
- return 'doc.php.net';
- }
-
- if ($channel == '__uri') {
- return '__uri';
- }
-
- return false;
- }
-
- $channel = strtolower($channel);
- if (file_exists($this->_getChannelAliasFileName($channel))) {
- // translate an alias to an actual channel
- return implode('', file($this->_getChannelAliasFileName($channel)));
- }
-
- return $channel;
- }
-
- /**
- * Get the alias of a channel from its alias or its name
- */
- function _getAlias($channel)
- {
- if (!$this->_channelExists($channel)) {
- if ($channel == 'pear.php.net') {
- return 'pear';
- }
-
- if ($channel == 'pecl.php.net') {
- return 'pecl';
- }
-
- if ($channel == 'doc.php.net') {
- return 'phpdocs';
- }
-
- return false;
- }
-
- $channel = $this->_getChannel($channel);
- if (PEAR::isError($channel)) {
- return $channel;
- }
-
- return $channel->getAlias();
- }
-
- /**
- * Get the name of the file where data for a given package is stored.
- *
- * @param string channel name, or false if this is a PEAR package
- * @param string package name
- *
- * @return string registry file name
- *
- * @access public
- */
- function _channelDirectoryName($channel)
- {
- if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') {
- return $this->statedir;
- }
-
- $ch = $this->_getChannelFromAlias($channel);
- if (!$ch) {
- $ch = $channel;
- }
-
- return $this->statedir . DIRECTORY_SEPARATOR . strtolower('.channel.' .
- str_replace('/', '_', $ch));
- }
-
- function _openPackageFile($package, $mode, $channel = false)
- {
- if (!$this->_assertStateDir($channel)) {
- return null;
- }
-
- if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) {
- return null;
- }
-
- $file = $this->_packageFileName($package, $channel);
- if (!file_exists($file) && $mode == 'r' || $mode == 'rb') {
- return null;
- }
-
- $fp = @fopen($file, $mode);
- if (!$fp) {
- return null;
- }
-
- return $fp;
- }
-
- function _closePackageFile($fp)
- {
- fclose($fp);
- }
-
- function _openChannelFile($channel, $mode)
- {
- if (!$this->_assertChannelDir()) {
- return null;
- }
-
- if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) {
- return null;
- }
-
- $file = $this->_channelFileName($channel);
- if (!file_exists($file) && $mode == 'r' || $mode == 'rb') {
- return null;
- }
-
- $fp = @fopen($file, $mode);
- if (!$fp) {
- return null;
- }
-
- return $fp;
- }
-
- function _closeChannelFile($fp)
- {
- fclose($fp);
- }
-
- function _rebuildFileMap()
- {
- if (!class_exists('PEAR_Installer_Role')) {
- require_once 'PEAR/Installer/Role.php';
- }
-
- $channels = $this->_listAllPackages();
- $files = array();
- foreach ($channels as $channel => $packages) {
- foreach ($packages as $package) {
- $version = $this->_packageInfo($package, 'version', $channel);
- $filelist = $this->_packageInfo($package, 'filelist', $channel);
- if (!is_array($filelist)) {
- continue;
- }
-
- foreach ($filelist as $name => $attrs) {
- if (isset($attrs['attribs'])) {
- $attrs = $attrs['attribs'];
- }
-
- // it is possible for conflicting packages in different channels to
- // conflict with data files/doc files
- if ($name == 'dirtree') {
- continue;
- }
-
- if (isset($attrs['role']) && !in_array($attrs['role'],
- PEAR_Installer_Role::getInstallableRoles())) {
- // these are not installed
- continue;
- }
-
- if (isset($attrs['role']) && !in_array($attrs['role'],
- PEAR_Installer_Role::getBaseinstallRoles())) {
- $attrs['baseinstalldir'] = $package;
- }
-
- if (isset($attrs['baseinstalldir'])) {
- $file = $attrs['baseinstalldir'].DIRECTORY_SEPARATOR.$name;
- } else {
- $file = $name;
- }
-
- $file = preg_replace(',^/+,', '', $file);
- if ($channel != 'pear.php.net') {
- if (!isset($files[$attrs['role']])) {
- $files[$attrs['role']] = array();
- }
- $files[$attrs['role']][$file] = array(strtolower($channel),
- strtolower($package));
- } else {
- if (!isset($files[$attrs['role']])) {
- $files[$attrs['role']] = array();
- }
- $files[$attrs['role']][$file] = strtolower($package);
- }
- }
- }
- }
-
-
- $this->_assertStateDir();
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- $fp = @fopen($this->filemap, 'wb');
- if (!$fp) {
- return false;
- }
-
- $this->filemap_cache = $files;
- fwrite($fp, serialize($files));
- fclose($fp);
- return true;
- }
-
- function _readFileMap()
- {
- if (!file_exists($this->filemap)) {
- return array();
- }
-
- $fp = @fopen($this->filemap, 'r');
- if (!$fp) {
- return $this->raiseError('PEAR_Registry: could not open filemap "' . $this->filemap . '"', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg);
- }
-
- clearstatcache();
- $fsize = filesize($this->filemap);
- fclose($fp);
- $data = file_get_contents($this->filemap);
- $tmp = unserialize($data);
- if (!$tmp && $fsize > 7) {
- return $this->raiseError('PEAR_Registry: invalid filemap data', PEAR_REGISTRY_ERROR_FORMAT, null, null, $data);
- }
-
- $this->filemap_cache = $tmp;
- return true;
- }
-
- /**
- * Lock the registry.
- *
- * @param integer lock mode, one of LOCK_EX, LOCK_SH or LOCK_UN.
- * See flock manual for more information.
- *
- * @return bool TRUE on success, FALSE if locking failed, or a
- * PEAR error if some other error occurs (such as the
- * lock file not being writable).
- *
- * @access private
- */
- function _lock($mode = LOCK_EX)
- {
- if (stristr(php_uname(), 'Windows 9')) {
- return true;
- }
-
- if ($mode != LOCK_UN && is_resource($this->lock_fp)) {
- // XXX does not check type of lock (LOCK_SH/LOCK_EX)
- return true;
- }
-
- if (!$this->_assertStateDir()) {
- if ($mode == LOCK_EX) {
- return $this->raiseError('Registry directory is not writeable by the current user');
- }
-
- return true;
- }
-
- $open_mode = 'w';
- // XXX People reported problems with LOCK_SH and 'w'
- if ($mode === LOCK_SH || $mode === LOCK_UN) {
- if (!file_exists($this->lockfile)) {
- touch($this->lockfile);
- }
- $open_mode = 'r';
- }
-
- if (!is_resource($this->lock_fp)) {
- $this->lock_fp = @fopen($this->lockfile, $open_mode);
- }
-
- if (!is_resource($this->lock_fp)) {
- $this->lock_fp = null;
- return $this->raiseError("could not create lock file" .
- (isset($php_errormsg) ? ": " . $php_errormsg : ""));
- }
-
- if (!(int)flock($this->lock_fp, $mode)) {
- switch ($mode) {
- case LOCK_SH: $str = 'shared'; break;
- case LOCK_EX: $str = 'exclusive'; break;
- case LOCK_UN: $str = 'unlock'; break;
- default: $str = 'unknown'; break;
- }
-
- //is resource at this point, close it on error.
- fclose($this->lock_fp);
- $this->lock_fp = null;
- return $this->raiseError("could not acquire $str lock ($this->lockfile)",
- PEAR_REGISTRY_ERROR_LOCK);
- }
-
- return true;
- }
-
- function _unlock()
- {
- $ret = $this->_lock(LOCK_UN);
- if (is_resource($this->lock_fp)) {
- fclose($this->lock_fp);
- }
-
- $this->lock_fp = null;
- return $ret;
- }
-
- function _packageExists($package, $channel = false)
- {
- return file_exists($this->_packageFileName($package, $channel));
- }
-
- /**
- * Determine whether a channel exists in the registry
- *
- * @param string Channel name
- * @param bool if true, then aliases will be ignored
- * @return boolean
- */
- function _channelExists($channel, $noaliases = false)
- {
- $a = file_exists($this->_channelFileName($channel, $noaliases));
- if (!$a && $channel == 'pear.php.net') {
- return true;
- }
-
- if (!$a && $channel == 'pecl.php.net') {
- return true;
- }
-
- if (!$a && $channel == 'doc.php.net') {
- return true;
- }
-
- return $a;
- }
-
- /**
- * Determine whether a mirror exists within the deafult channel in the registry
- *
- * @param string Channel name
- * @param string Mirror name
- *
- * @return boolean
- */
- function _mirrorExists($channel, $mirror)
- {
- $data = $this->_channelInfo($channel);
- if (!isset($data['servers']['mirror'])) {
- return false;
- }
-
- foreach ($data['servers']['mirror'] as $m) {
- if ($m['attribs']['host'] == $mirror) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @param PEAR_ChannelFile Channel object
- * @param donotuse
- * @param string Last-Modified HTTP tag from remote request
- * @return boolean|PEAR_Error True on creation, false if it already exists
- */
- function _addChannel($channel, $update = false, $lastmodified = false)
- {
- if (!is_a($channel, 'PEAR_ChannelFile')) {
- return false;
- }
-
- if (!$channel->validate()) {
- return false;
- }
-
- if (file_exists($this->_channelFileName($channel->getName()))) {
- if (!$update) {
- return false;
- }
-
- $checker = $this->_getChannel($channel->getName());
- if (PEAR::isError($checker)) {
- return $checker;
- }
-
- if ($channel->getAlias() != $checker->getAlias()) {
- if (file_exists($this->_getChannelAliasFileName($checker->getAlias()))) {
- @unlink($this->_getChannelAliasFileName($checker->getAlias()));
- }
- }
- } else {
- if ($update && !in_array($channel->getName(), array('pear.php.net', 'pecl.php.net', 'doc.php.net'))) {
- return false;
- }
- }
-
- $ret = $this->_assertChannelDir();
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- $ret = $this->_assertChannelStateDir($channel->getName());
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- if ($channel->getAlias() != $channel->getName()) {
- if (file_exists($this->_getChannelAliasFileName($channel->getAlias())) &&
- $this->_getChannelFromAlias($channel->getAlias()) != $channel->getName()) {
- $channel->setAlias($channel->getName());
- }
-
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- $fp = @fopen($this->_getChannelAliasFileName($channel->getAlias()), 'w');
- if (!$fp) {
- return false;
- }
-
- fwrite($fp, $channel->getName());
- fclose($fp);
- }
-
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- $fp = @fopen($this->_channelFileName($channel->getName()), 'wb');
- if (!$fp) {
- return false;
- }
-
- $info = $channel->toArray();
- if ($lastmodified) {
- $info['_lastmodified'] = $lastmodified;
- } else {
- $info['_lastmodified'] = date('r');
- }
-
- fwrite($fp, serialize($info));
- fclose($fp);
- return true;
- }
-
- /**
- * Deletion fails if there are any packages installed from the channel
- * @param string|PEAR_ChannelFile channel name
- * @return boolean|PEAR_Error True on deletion, false if it doesn't exist
- */
- function _deleteChannel($channel)
- {
- if (!is_string($channel)) {
- if (!is_a($channel, 'PEAR_ChannelFile')) {
- return false;
- }
-
- if (!$channel->validate()) {
- return false;
- }
- $channel = $channel->getName();
- }
-
- if ($this->_getChannelFromAlias($channel) == '__uri') {
- return false;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') {
- return false;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'doc.php.net') {
- return false;
- }
-
- if (!$this->_channelExists($channel)) {
- return false;
- }
-
- if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') {
- return false;
- }
-
- $channel = $this->_getChannelFromAlias($channel);
- if ($channel == 'pear.php.net') {
- return false;
- }
-
- $test = $this->_listChannelPackages($channel);
- if (count($test)) {
- return false;
- }
-
- $test = @rmdir($this->_channelDirectoryName($channel));
- if (!$test) {
- return false;
- }
-
- $file = $this->_getChannelAliasFileName($this->_getAlias($channel));
- if (file_exists($file)) {
- $test = @unlink($file);
- if (!$test) {
- return false;
- }
- }
-
- $file = $this->_channelFileName($channel);
- $ret = true;
- if (file_exists($file)) {
- $ret = @unlink($file);
- }
-
- return $ret;
- }
-
- /**
- * Determine whether a channel exists in the registry
- * @param string Channel Alias
- * @return boolean
- */
- function _isChannelAlias($alias)
- {
- return file_exists($this->_getChannelAliasFileName($alias));
- }
-
- /**
- * @param string|null
- * @param string|null
- * @param string|null
- * @return array|null
- * @access private
- */
- function _packageInfo($package = null, $key = null, $channel = 'pear.php.net')
- {
- if ($package === null) {
- if ($channel === null) {
- $channels = $this->_listChannels();
- $ret = array();
- foreach ($channels as $channel) {
- $channel = strtolower($channel);
- $ret[$channel] = array();
- $packages = $this->_listPackages($channel);
- foreach ($packages as $package) {
- $ret[$channel][] = $this->_packageInfo($package, null, $channel);
- }
- }
-
- return $ret;
- }
-
- $ps = $this->_listPackages($channel);
- if (!count($ps)) {
- return array();
- }
- return array_map(array(&$this, '_packageInfo'),
- $ps, array_fill(0, count($ps), null),
- array_fill(0, count($ps), $channel));
- }
-
- $fp = $this->_openPackageFile($package, 'r', $channel);
- if ($fp === null) {
- return null;
- }
-
- clearstatcache();
- $this->_closePackageFile($fp);
- $data = file_get_contents($this->_packageFileName($package, $channel));
- $data = unserialize($data);
- if ($key === null) {
- return $data;
- }
-
- // compatibility for package.xml version 2.0
- if (isset($data['old'][$key])) {
- return $data['old'][$key];
- }
-
- if (isset($data[$key])) {
- return $data[$key];
- }
-
- return null;
- }
-
- /**
- * @param string Channel name
- * @param bool whether to strictly retrieve info of channels, not just aliases
- * @return array|null
- */
- function _channelInfo($channel, $noaliases = false)
- {
- if (!$this->_channelExists($channel, $noaliases)) {
- return null;
- }
-
- $fp = $this->_openChannelFile($channel, 'r');
- if ($fp === null) {
- return null;
- }
-
- clearstatcache();
- $this->_closeChannelFile($fp);
- $data = file_get_contents($this->_channelFileName($channel));
- $data = unserialize($data);
- return $data;
- }
-
- function _listChannels()
- {
- $channellist = array();
- if (!file_exists($this->channelsdir) || !is_dir($this->channelsdir)) {
- return array('pear.php.net', 'pecl.php.net', 'doc.php.net', '__uri');
- }
-
- $dp = opendir($this->channelsdir);
- while ($ent = readdir($dp)) {
- if ($ent{0} == '.' || substr($ent, -4) != '.reg') {
- continue;
- }
-
- if ($ent == '__uri.reg') {
- $channellist[] = '__uri';
- continue;
- }
-
- $channellist[] = str_replace('_', '/', substr($ent, 0, -4));
- }
-
- closedir($dp);
- if (!in_array('pear.php.net', $channellist)) {
- $channellist[] = 'pear.php.net';
- }
-
- if (!in_array('pecl.php.net', $channellist)) {
- $channellist[] = 'pecl.php.net';
- }
-
- if (!in_array('doc.php.net', $channellist)) {
- $channellist[] = 'doc.php.net';
- }
-
-
- if (!in_array('__uri', $channellist)) {
- $channellist[] = '__uri';
- }
-
- natsort($channellist);
- return $channellist;
- }
-
- function _listPackages($channel = false)
- {
- if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') {
- return $this->_listChannelPackages($channel);
- }
-
- if (!file_exists($this->statedir) || !is_dir($this->statedir)) {
- return array();
- }
-
- $pkglist = array();
- $dp = opendir($this->statedir);
- if (!$dp) {
- return $pkglist;
- }
-
- while ($ent = readdir($dp)) {
- if ($ent{0} == '.' || substr($ent, -4) != '.reg') {
- continue;
- }
-
- $pkglist[] = substr($ent, 0, -4);
- }
- closedir($dp);
- return $pkglist;
- }
-
- function _listChannelPackages($channel)
- {
- $pkglist = array();
- if (!file_exists($this->_channelDirectoryName($channel)) ||
- !is_dir($this->_channelDirectoryName($channel))) {
- return array();
- }
-
- $dp = opendir($this->_channelDirectoryName($channel));
- if (!$dp) {
- return $pkglist;
- }
-
- while ($ent = readdir($dp)) {
- if ($ent{0} == '.' || substr($ent, -4) != '.reg') {
- continue;
- }
- $pkglist[] = substr($ent, 0, -4);
- }
-
- closedir($dp);
- return $pkglist;
- }
-
- function _listAllPackages()
- {
- $ret = array();
- foreach ($this->_listChannels() as $channel) {
- $ret[$channel] = $this->_listPackages($channel);
- }
-
- return $ret;
- }
-
- /**
- * Add an installed package to the registry
- * @param string package name
- * @param array package info (parsed by PEAR_Common::infoFrom*() methods)
- * @return bool success of saving
- * @access private
- */
- function _addPackage($package, $info)
- {
- if ($this->_packageExists($package)) {
- return false;
- }
-
- $fp = $this->_openPackageFile($package, 'wb');
- if ($fp === null) {
- return false;
- }
-
- $info['_lastmodified'] = time();
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- if (isset($info['filelist'])) {
- $this->_rebuildFileMap();
- }
-
- return true;
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return bool
- * @access private
- */
- function _addPackage2($info)
- {
- if (!is_a($info, 'PEAR_PackageFile_v1') && !is_a($info, 'PEAR_PackageFile_v2')) {
- return false;
- }
-
- if (!$info->validate()) {
- if (class_exists('PEAR_Common')) {
- $ui = PEAR_Frontend::singleton();
- if ($ui) {
- foreach ($info->getValidationWarnings() as $err) {
- $ui->log($err['message'], true);
- }
- }
- }
- return false;
- }
-
- $channel = $info->getChannel();
- $package = $info->getPackage();
- $save = $info;
- if ($this->_packageExists($package, $channel)) {
- return false;
- }
-
- if (!$this->_channelExists($channel, true)) {
- return false;
- }
-
- $info = $info->toArray(true);
- if (!$info) {
- return false;
- }
-
- $fp = $this->_openPackageFile($package, 'wb', $channel);
- if ($fp === null) {
- return false;
- }
-
- $info['_lastmodified'] = time();
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- $this->_rebuildFileMap();
- return true;
- }
-
- /**
- * @param string Package name
- * @param array parsed package.xml 1.0
- * @param bool this parameter is only here for BC. Don't use it.
- * @access private
- */
- function _updatePackage($package, $info, $merge = true)
- {
- $oldinfo = $this->_packageInfo($package);
- if (empty($oldinfo)) {
- return false;
- }
-
- $fp = $this->_openPackageFile($package, 'w');
- if ($fp === null) {
- return false;
- }
-
- if (is_object($info)) {
- $info = $info->toArray();
- }
- $info['_lastmodified'] = time();
-
- $newinfo = $info;
- if ($merge) {
- $info = array_merge($oldinfo, $info);
- } else {
- $diff = $info;
- }
-
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- if (isset($newinfo['filelist'])) {
- $this->_rebuildFileMap();
- }
-
- return true;
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return bool
- * @access private
- */
- function _updatePackage2($info)
- {
- if (!$this->_packageExists($info->getPackage(), $info->getChannel())) {
- return false;
- }
-
- $fp = $this->_openPackageFile($info->getPackage(), 'w', $info->getChannel());
- if ($fp === null) {
- return false;
- }
-
- $save = $info;
- $info = $save->getArray(true);
- $info['_lastmodified'] = time();
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- $this->_rebuildFileMap();
- return true;
- }
-
- /**
- * @param string Package name
- * @param string Channel name
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null
- * @access private
- */
- function &_getPackage($package, $channel = 'pear.php.net')
- {
- $info = $this->_packageInfo($package, null, $channel);
- if ($info === null) {
- return $info;
- }
-
- $a = $this->_config;
- if (!$a) {
- $this->_config = new PEAR_Config;
- $this->_config->set('php_dir', $this->statedir);
- }
-
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'PEAR/PackageFile.php';
- }
-
- $pkg = new PEAR_PackageFile($this->_config);
- $pf = &$pkg->fromArray($info);
- return $pf;
- }
-
- /**
- * @param string channel name
- * @param bool whether to strictly retrieve channel names
- * @return PEAR_ChannelFile|PEAR_Error
- * @access private
- */
- function &_getChannel($channel, $noaliases = false)
- {
- $ch = false;
- if ($this->_channelExists($channel, $noaliases)) {
- $chinfo = $this->_channelInfo($channel, $noaliases);
- if ($chinfo) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $ch = &PEAR_ChannelFile::fromArrayWithErrors($chinfo);
- }
- }
-
- if ($ch) {
- if ($ch->validate()) {
- return $ch;
- }
-
- foreach ($ch->getErrors(true) as $err) {
- $message = $err['message'] . "\n";
- }
-
- $ch = PEAR::raiseError($message);
- return $ch;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'pear.php.net') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $pear_channel = new PEAR_ChannelFile;
- $pear_channel->setServer('pear.php.net');
- $pear_channel->setAlias('pear');
- $pear_channel->setSummary('PHP Extension and Application Repository');
- $pear_channel->setDefaultPEARProtocols();
- $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
- return $pear_channel;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
- $pear_channel = new PEAR_ChannelFile;
- $pear_channel->setServer('pecl.php.net');
- $pear_channel->setAlias('pecl');
- $pear_channel->setSummary('PHP Extension Community Library');
- $pear_channel->setDefaultPEARProtocols();
- $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
- $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
- $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
- return $pear_channel;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'doc.php.net') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $doc_channel = new PEAR_ChannelFile;
- $doc_channel->setServer('doc.php.net');
- $doc_channel->setAlias('phpdocs');
- $doc_channel->setSummary('PHP Documentation Team');
- $doc_channel->setDefaultPEARProtocols();
- $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
- return $doc_channel;
- }
-
-
- if ($this->_getChannelFromAlias($channel) == '__uri') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'PEAR/ChannelFile.php';
- }
-
- $private = new PEAR_ChannelFile;
- $private->setName('__uri');
- $private->setDefaultPEARProtocols();
- $private->setBaseURL('REST1.0', '****');
- $private->setSummary('Pseudo-channel for static packages');
- return $private;
- }
-
- return $ch;
- }
-
- /**
- * @param string Package name
- * @param string Channel name
- * @return bool
- */
- function packageExists($package, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_packageExists($package, $channel);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
-
- // {{{ channelExists()
-
- /**
- * @param string channel name
- * @param bool if true, then aliases will be ignored
- * @return bool
- */
- function channelExists($channel, $noaliases = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_channelExists($channel, $noaliases);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
-
- /**
- * @param string channel name mirror is in
- * @param string mirror name
- *
- * @return bool
- */
- function mirrorExists($channel, $mirror)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
-
- $ret = $this->_mirrorExists($channel, $mirror);
- $this->_unlock();
- return $ret;
- }
-
- // {{{ isAlias()
-
- /**
- * Determines whether the parameter is an alias of a channel
- * @param string
- * @return bool
- */
- function isAlias($alias)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_isChannelAlias($alias);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ packageInfo()
-
- /**
- * @param string|null
- * @param string|null
- * @param string
- * @return array|null
- */
- function packageInfo($package = null, $key = null, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_packageInfo($package, $key, $channel);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ channelInfo()
-
- /**
- * Retrieve a raw array of channel data.
- *
- * Do not use this, instead use {@link getChannel()} for normal
- * operations. Array structure is undefined in this method
- * @param string channel name
- * @param bool whether to strictly retrieve information only on non-aliases
- * @return array|null|PEAR_Error
- */
- function channelInfo($channel = null, $noaliases = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_channelInfo($channel, $noaliases);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
-
- /**
- * @param string
- */
- function channelName($channel)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_getChannelFromAlias($channel);
- $this->_unlock();
- return $ret;
- }
-
- /**
- * @param string
- */
- function channelAlias($channel)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_getAlias($channel);
- $this->_unlock();
- return $ret;
- }
- // {{{ listPackages()
-
- function listPackages($channel = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_listPackages($channel);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ listAllPackages()
-
- function listAllPackages()
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_listAllPackages();
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ listChannel()
-
- function listChannels()
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_listChannels();
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ addPackage()
-
- /**
- * Add an installed package to the registry
- * @param string|PEAR_PackageFile_v1|PEAR_PackageFile_v2 package name or object
- * that will be passed to {@link addPackage2()}
- * @param array package info (parsed by PEAR_Common::infoFrom*() methods)
- * @return bool success of saving
- */
- function addPackage($package, $info)
- {
- if (is_object($info)) {
- return $this->addPackage2($info);
- }
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
- $ret = $this->_addPackage($package, $info);
- $this->_unlock();
- if ($ret) {
- if (!class_exists('PEAR_PackageFile_v1')) {
- require_once 'PEAR/PackageFile/v1.php';
- }
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->_config);
- $pf->fromArray($info);
- $this->_dependencyDB->uninstallPackage($pf);
- $this->_dependencyDB->installPackage($pf);
- }
- return $ret;
- }
-
- // }}}
- // {{{ addPackage2()
-
- function addPackage2($info)
- {
- if (!is_object($info)) {
- return $this->addPackage($info['package'], $info);
- }
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
- $ret = $this->_addPackage2($info);
- $this->_unlock();
- if ($ret) {
- $this->_dependencyDB->uninstallPackage($info);
- $this->_dependencyDB->installPackage($info);
- }
- return $ret;
- }
-
- // }}}
- // {{{ updateChannel()
-
- /**
- * For future expandibility purposes, separate this
- * @param PEAR_ChannelFile
- */
- function updateChannel($channel, $lastmodified = null)
- {
- if ($channel->getName() == '__uri') {
- return false;
- }
- return $this->addChannel($channel, $lastmodified, true);
- }
-
- // }}}
- // {{{ deleteChannel()
-
- /**
- * Deletion fails if there are any packages installed from the channel
- * @param string|PEAR_ChannelFile channel name
- * @return boolean|PEAR_Error True on deletion, false if it doesn't exist
- */
- function deleteChannel($channel)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $ret = $this->_deleteChannel($channel);
- $this->_unlock();
- if ($ret && is_a($this->_config, 'PEAR_Config')) {
- $this->_config->setChannels($this->listChannels());
- }
-
- return $ret;
- }
-
- // }}}
- // {{{ addChannel()
-
- /**
- * @param PEAR_ChannelFile Channel object
- * @param string Last-Modified header from HTTP for caching
- * @return boolean|PEAR_Error True on creation, false if it already exists
- */
- function addChannel($channel, $lastmodified = false, $update = false)
- {
- if (!is_a($channel, 'PEAR_ChannelFile') || !$channel->validate()) {
- return false;
- }
-
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $ret = $this->_addChannel($channel, $update, $lastmodified);
- $this->_unlock();
- if (!$update && $ret && is_a($this->_config, 'PEAR_Config')) {
- $this->_config->setChannels($this->listChannels());
- }
-
- return $ret;
- }
-
- // }}}
- // {{{ deletePackage()
-
- function deletePackage($package, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $file = $this->_packageFileName($package, $channel);
- $ret = file_exists($file) ? @unlink($file) : false;
- $this->_rebuildFileMap();
- $this->_unlock();
- $p = array('channel' => $channel, 'package' => $package);
- $this->_dependencyDB->uninstallPackage($p);
- return $ret;
- }
-
- // }}}
- // {{{ updatePackage()
-
- function updatePackage($package, $info, $merge = true)
- {
- if (is_object($info)) {
- return $this->updatePackage2($info, $merge);
- }
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
- $ret = $this->_updatePackage($package, $info, $merge);
- $this->_unlock();
- if ($ret) {
- if (!class_exists('PEAR_PackageFile_v1')) {
- require_once 'PEAR/PackageFile/v1.php';
- }
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->_config);
- $pf->fromArray($this->packageInfo($package));
- $this->_dependencyDB->uninstallPackage($pf);
- $this->_dependencyDB->installPackage($pf);
- }
- return $ret;
- }
-
- // }}}
- // {{{ updatePackage2()
-
- function updatePackage2($info)
- {
-
- if (!is_object($info)) {
- return $this->updatePackage($info['package'], $info, $merge);
- }
-
- if (!$info->validate(PEAR_VALIDATE_DOWNLOADING)) {
- return false;
- }
-
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $ret = $this->_updatePackage2($info);
- $this->_unlock();
- if ($ret) {
- $this->_dependencyDB->uninstallPackage($info);
- $this->_dependencyDB->installPackage($info);
- }
-
- return $ret;
- }
-
- // }}}
- // {{{ getChannel()
- /**
- * @param string channel name
- * @param bool whether to strictly return raw channels (no aliases)
- * @return PEAR_ChannelFile|PEAR_Error
- */
- function &getChannel($channel, $noaliases = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = &$this->_getChannel($channel, $noaliases);
- $this->_unlock();
- if (!$ret) {
- return PEAR::raiseError('Unknown channel: ' . $channel);
- }
- return $ret;
- }
-
- // }}}
- // {{{ getPackage()
- /**
- * @param string package name
- * @param string channel name
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null
- */
- function &getPackage($package, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $pf = &$this->_getPackage($package, $channel);
- $this->_unlock();
- return $pf;
- }
-
- // }}}
-
- /**
- * Get PEAR_PackageFile_v[1/2] objects representing the contents of
- * a dependency group that are installed.
- *
- * This is used at uninstall-time
- * @param array
- * @return array|false
- */
- function getInstalledGroup($group)
- {
- $ret = array();
- if (isset($group['package'])) {
- if (!isset($group['package'][0])) {
- $group['package'] = array($group['package']);
- }
- foreach ($group['package'] as $package) {
- $depchannel = isset($package['channel']) ? $package['channel'] : '__uri';
- $p = &$this->getPackage($package['name'], $depchannel);
- if ($p) {
- $save = &$p;
- $ret[] = &$save;
- }
- }
- }
- if (isset($group['subpackage'])) {
- if (!isset($group['subpackage'][0])) {
- $group['subpackage'] = array($group['subpackage']);
- }
- foreach ($group['subpackage'] as $package) {
- $depchannel = isset($package['channel']) ? $package['channel'] : '__uri';
- $p = &$this->getPackage($package['name'], $depchannel);
- if ($p) {
- $save = &$p;
- $ret[] = &$save;
- }
- }
- }
- if (!count($ret)) {
- return false;
- }
- return $ret;
- }
-
- // {{{ getChannelValidator()
- /**
- * @param string channel name
- * @return PEAR_Validate|false
- */
- function &getChannelValidator($channel)
- {
- $chan = $this->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $chan;
- }
- $val = $chan->getValidationObject();
- return $val;
- }
- // }}}
- // {{{ getChannels()
- /**
- * @param string channel name
- * @return array an array of PEAR_ChannelFile objects representing every installed channel
- */
- function &getChannels()
- {
- $ret = array();
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- foreach ($this->_listChannels() as $channel) {
- $e = &$this->_getChannel($channel);
- if (!$e || PEAR::isError($e)) {
- continue;
- }
- $ret[] = $e;
- }
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ checkFileMap()
-
- /**
- * Test whether a file or set of files belongs to a package.
- *
- * If an array is passed in
- * @param string|array file path, absolute or relative to the pear
- * install dir
- * @param string|array name of PEAR package or array('package' => name, 'channel' =>
- * channel) of a package that will be ignored
- * @param string API version - 1.1 will exclude any files belonging to a package
- * @param array private recursion variable
- * @return array|false which package and channel the file belongs to, or an empty
- * string if the file does not belong to an installed package,
- * or belongs to the second parameter's package
- */
- function checkFileMap($path, $package = false, $api = '1.0', $attrs = false)
- {
- if (is_array($path)) {
- static $notempty;
- if (empty($notempty)) {
- if (!class_exists('PEAR_Installer_Role')) {
- require_once 'PEAR/Installer/Role.php';
- }
- $notempty = create_function('$a','return !empty($a);');
- }
- $package = is_array($package) ? array(strtolower($package[0]), strtolower($package[1]))
- : strtolower($package);
- $pkgs = array();
- foreach ($path as $name => $attrs) {
- if (is_array($attrs)) {
- if (isset($attrs['install-as'])) {
- $name = $attrs['install-as'];
- }
- if (!in_array($attrs['role'], PEAR_Installer_Role::getInstallableRoles())) {
- // these are not installed
- continue;
- }
- if (!in_array($attrs['role'], PEAR_Installer_Role::getBaseinstallRoles())) {
- $attrs['baseinstalldir'] = is_array($package) ? $package[1] : $package;
- }
- if (isset($attrs['baseinstalldir'])) {
- $name = $attrs['baseinstalldir'] . DIRECTORY_SEPARATOR . $name;
- }
- }
- $pkgs[$name] = $this->checkFileMap($name, $package, $api, $attrs);
- if (PEAR::isError($pkgs[$name])) {
- return $pkgs[$name];
- }
- }
- return array_filter($pkgs, $notempty);
- }
- if (empty($this->filemap_cache)) {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $err = $this->_readFileMap();
- $this->_unlock();
- if (PEAR::isError($err)) {
- return $err;
- }
- }
- if (!$attrs) {
- $attrs = array('role' => 'php'); // any old call would be for PHP role only
- }
- if (isset($this->filemap_cache[$attrs['role']][$path])) {
- if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) {
- return false;
- }
- return $this->filemap_cache[$attrs['role']][$path];
- }
- $l = strlen($this->install_dir);
- if (substr($path, 0, $l) == $this->install_dir) {
- $path = preg_replace('!^'.DIRECTORY_SEPARATOR.'+!', '', substr($path, $l));
- }
- if (isset($this->filemap_cache[$attrs['role']][$path])) {
- if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) {
- return false;
- }
- return $this->filemap_cache[$attrs['role']][$path];
- }
- return false;
- }
-
- // }}}
- // {{{ flush()
- /**
- * Force a reload of the filemap
- * @since 1.5.0RC3
- */
- function flushFileMap()
- {
- $this->filemap_cache = null;
- clearstatcache(); // ensure that the next read gets the full, current filemap
- }
-
- // }}}
- // {{{ apiVersion()
- /**
- * Get the expected API version. Channels API is version 1.1, as it is backwards
- * compatible with 1.0
- * @return string
- */
- function apiVersion()
- {
- return '1.1';
- }
- // }}}
-
-
- /**
- * Parse a package name, or validate a parsed package name array
- * @param string|array pass in an array of format
- * array(
- * 'package' => 'pname',
- * ['channel' => 'channame',]
- * ['version' => 'version',]
- * ['state' => 'state',]
- * ['group' => 'groupname'])
- * or a string of format
- * [channel://][channame/]pname[-version|-state][/group=groupname]
- * @return array|PEAR_Error
- */
- function parsePackageName($param, $defaultchannel = 'pear.php.net')
- {
- $saveparam = $param;
- if (is_array($param)) {
- // convert to string for error messages
- $saveparam = $this->parsedPackageNameToString($param);
- // process the array
- if (!isset($param['package'])) {
- return PEAR::raiseError('parsePackageName(): array $param ' .
- 'must contain a valid package name in index "param"',
- 'package', null, null, $param);
- }
- if (!isset($param['uri'])) {
- if (!isset($param['channel'])) {
- $param['channel'] = $defaultchannel;
- }
- } else {
- $param['channel'] = '__uri';
- }
- } else {
- $components = @parse_url((string) $param);
- if (isset($components['scheme'])) {
- if ($components['scheme'] == 'http') {
- // uri package
- $param = array('uri' => $param, 'channel' => '__uri');
- } elseif($components['scheme'] != 'channel') {
- return PEAR::raiseError('parsePackageName(): only channel:// uris may ' .
- 'be downloaded, not "' . $param . '"', 'invalid', null, null, $param);
- }
- }
- if (!isset($components['path'])) {
- return PEAR::raiseError('parsePackageName(): array $param ' .
- 'must contain a valid package name in "' . $param . '"',
- 'package', null, null, $param);
- }
- if (isset($components['host'])) {
- // remove the leading "/"
- $components['path'] = substr($components['path'], 1);
- }
- if (!isset($components['scheme'])) {
- if (strpos($components['path'], '/') !== false) {
- if ($components['path']{0} == '/') {
- return PEAR::raiseError('parsePackageName(): this is not ' .
- 'a package name, it begins with "/" in "' . $param . '"',
- 'invalid', null, null, $param);
- }
- $parts = explode('/', $components['path']);
- $components['host'] = array_shift($parts);
- if (count($parts) > 1) {
- $components['path'] = array_pop($parts);
- $components['host'] .= '/' . implode('/', $parts);
- } else {
- $components['path'] = implode('/', $parts);
- }
- } else {
- $components['host'] = $defaultchannel;
- }
- } else {
- if (strpos($components['path'], '/')) {
- $parts = explode('/', $components['path']);
- $components['path'] = array_pop($parts);
- $components['host'] .= '/' . implode('/', $parts);
- }
- }
-
- if (is_array($param)) {
- $param['package'] = $components['path'];
- } else {
- $param = array(
- 'package' => $components['path']
- );
- if (isset($components['host'])) {
- $param['channel'] = $components['host'];
- }
- }
- if (isset($components['fragment'])) {
- $param['group'] = $components['fragment'];
- }
- if (isset($components['user'])) {
- $param['user'] = $components['user'];
- }
- if (isset($components['pass'])) {
- $param['pass'] = $components['pass'];
- }
- if (isset($components['query'])) {
- parse_str($components['query'], $param['opts']);
- }
- // check for extension
- $pathinfo = pathinfo($param['package']);
- if (isset($pathinfo['extension']) &&
- in_array(strtolower($pathinfo['extension']), array('tgz', 'tar'))) {
- $param['extension'] = $pathinfo['extension'];
- $param['package'] = substr($pathinfo['basename'], 0,
- strlen($pathinfo['basename']) - 4);
- }
- // check for version
- if (strpos($param['package'], '-')) {
- $test = explode('-', $param['package']);
- if (count($test) != 2) {
- return PEAR::raiseError('parsePackageName(): only one version/state ' .
- 'delimiter "-" is allowed in "' . $saveparam . '"',
- 'version', null, null, $param);
- }
- list($param['package'], $param['version']) = $test;
- }
- }
- // validation
- $info = $this->channelExists($param['channel']);
- if (PEAR::isError($info)) {
- return $info;
- }
- if (!$info) {
- return PEAR::raiseError('unknown channel "' . $param['channel'] .
- '" in "' . $saveparam . '"', 'channel', null, null, $param);
- }
- $chan = $this->getChannel($param['channel']);
- if (PEAR::isError($chan)) {
- return $chan;
- }
- if (!$chan) {
- return PEAR::raiseError("Exception: corrupt registry, could not " .
- "retrieve channel " . $param['channel'] . " information",
- 'registry', null, null, $param);
- }
- $param['channel'] = $chan->getName();
- $validate = $chan->getValidationObject();
- $vpackage = $chan->getValidationPackage();
- // validate package name
- if (!$validate->validPackageName($param['package'], $vpackage['_content'])) {
- return PEAR::raiseError('parsePackageName(): invalid package name "' .
- $param['package'] . '" in "' . $saveparam . '"',
- 'package', null, null, $param);
- }
- if (isset($param['group'])) {
- if (!PEAR_Validate::validGroupName($param['group'])) {
- return PEAR::raiseError('parsePackageName(): dependency group "' . $param['group'] .
- '" is not a valid group name in "' . $saveparam . '"', 'group', null, null,
- $param);
- }
- }
- if (isset($param['state'])) {
- if (!in_array(strtolower($param['state']), $validate->getValidStates())) {
- return PEAR::raiseError('parsePackageName(): state "' . $param['state']
- . '" is not a valid state in "' . $saveparam . '"',
- 'state', null, null, $param);
- }
- }
- if (isset($param['version'])) {
- if (isset($param['state'])) {
- return PEAR::raiseError('parsePackageName(): cannot contain both ' .
- 'a version and a stability (state) in "' . $saveparam . '"',
- 'version/state', null, null, $param);
- }
- // check whether version is actually a state
- if (in_array(strtolower($param['version']), $validate->getValidStates())) {
- $param['state'] = strtolower($param['version']);
- unset($param['version']);
- } else {
- if (!$validate->validVersion($param['version'])) {
- return PEAR::raiseError('parsePackageName(): "' . $param['version'] .
- '" is neither a valid version nor a valid state in "' .
- $saveparam . '"', 'version/state', null, null, $param);
- }
- }
- }
- return $param;
- }
-
- /**
- * @param array
- * @return string
- */
- function parsedPackageNameToString($parsed, $brief = false)
- {
- if (is_string($parsed)) {
- return $parsed;
- }
- if (is_object($parsed)) {
- $p = $parsed;
- $parsed = array(
- 'package' => $p->getPackage(),
- 'channel' => $p->getChannel(),
- 'version' => $p->getVersion(),
- );
- }
- if (isset($parsed['uri'])) {
- return $parsed['uri'];
- }
- if ($brief) {
- if ($channel = $this->channelAlias($parsed['channel'])) {
- return $channel . '/' . $parsed['package'];
- }
- }
- $upass = '';
- if (isset($parsed['user'])) {
- $upass = $parsed['user'];
- if (isset($parsed['pass'])) {
- $upass .= ':' . $parsed['pass'];
- }
- $upass = "$upass@";
- }
- $ret = 'channel://' . $upass . $parsed['channel'] . '/' . $parsed['package'];
- if (isset($parsed['version']) || isset($parsed['state'])) {
- $ver = isset($parsed['version']) ? $parsed['version'] : '';
- $ver .= isset($parsed['state']) ? $parsed['state'] : '';
- $ret .= '-' . $ver;
- }
- if (isset($parsed['extension'])) {
- $ret .= '.' . $parsed['extension'];
- }
- if (isset($parsed['opts'])) {
- $ret .= '?';
- foreach ($parsed['opts'] as $name => $value) {
- $parsed['opts'][$name] = "$name=$value";
- }
- $ret .= implode('&', $parsed['opts']);
- }
- if (isset($parsed['group'])) {
- $ret .= '#' . $parsed['group'];
- }
- return $ret;
- }
-}
-
-/**
- * PEAR_REST
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * For downloading xml files
- */
-require_once 'PEAR.php';
-require_once 'PEAR/XMLParser.php';
-
-/**
- * Intelligently retrieve data, following hyperlinks if necessary, and re-directing
- * as well
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_REST
-{
- var $config;
- var $_options;
-
- function __construct(&$config, $options = array())
- {
- $this->config = &$config;
- $this->_options = $options;
- }
-
- /**
- * Retrieve REST data, but always retrieve the local cache if it is available.
- *
- * This is useful for elements that should never change, such as information on a particular
- * release
- * @param string full URL to this resource
- * @param array|false contents of the accept-encoding header
- * @param boolean if true, xml will be returned as a string, otherwise, xml will be
- * parsed using PEAR_XMLParser
- * @return string|array
- */
- function retrieveCacheFirst($url, $accept = false, $forcestring = false, $channel = false)
- {
- $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cachefile';
-
- if (file_exists($cachefile)) {
- return unserialize(implode('', file($cachefile)));
- }
-
- return $this->retrieveData($url, $accept, $forcestring, $channel);
- }
-
- /**
- * Retrieve a remote REST resource
- * @param string full URL to this resource
- * @param array|false contents of the accept-encoding header
- * @param boolean if true, xml will be returned as a string, otherwise, xml will be
- * parsed using PEAR_XMLParser
- * @return string|array
- */
- function retrieveData($url, $accept = false, $forcestring = false, $channel = false)
- {
- $cacheId = $this->getCacheId($url);
- if ($ret = $this->useLocalCache($url, $cacheId)) {
- return $ret;
- }
-
- $file = $trieddownload = false;
- if (!isset($this->_options['offline'])) {
- $trieddownload = true;
- $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange'] : false, $accept, $channel);
- }
-
- if (PEAR::isError($file)) {
- if ($file->getCode() !== -9276) {
- return $file;
- }
-
- $trieddownload = false;
- $file = false; // use local copy if available on socket connect error
- }
-
- if (!$file) {
- $ret = $this->getCache($url);
- if (!PEAR::isError($ret) && $trieddownload) {
- // reset the age of the cache if the server says it was unmodified
- $result = $this->saveCache($url, $ret, null, true, $cacheId);
- if (PEAR::isError($result)) {
- return PEAR::raiseError($result->getMessage());
- }
- }
-
- return $ret;
- }
-
- if (is_array($file)) {
- $headers = $file[2];
- $lastmodified = $file[1];
- $content = $file[0];
- } else {
- $headers = array();
- $lastmodified = false;
- $content = $file;
- }
-
- if ($forcestring) {
- $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
- if (PEAR::isError($result)) {
- return PEAR::raiseError($result->getMessage());
- }
-
- return $content;
- }
-
- if (isset($headers['content-type'])) {
- $content_type = explode(";", $headers['content-type']);
- $content_type = $content_type[0];
- switch ($content_type) {
- case 'text/xml' :
- case 'application/xml' :
- case 'text/plain' :
- if ($content_type === 'text/plain') {
- $check = substr($content, 0, 5);
- if ($check !== '<?xml') {
- break;
- }
- }
-
- $parser = new PEAR_XMLParser;
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $parser->parse($content);
- PEAR::popErrorHandling();
- if (PEAR::isError($err)) {
- return PEAR::raiseError('Invalid xml downloaded from "' . $url . '": ' .
- $err->getMessage());
- }
- $content = $parser->getData();
- case 'text/html' :
- default :
- // use it as a string
- }
- } else {
- // assume XML
- $parser = new PEAR_XMLParser;
- $parser->parse($content);
- $content = $parser->getData();
- }
-
- $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
- if (PEAR::isError($result)) {
- return PEAR::raiseError($result->getMessage());
- }
-
- return $content;
- }
-
- function useLocalCache($url, $cacheid = null)
- {
- if ($cacheid === null) {
- $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cacheid';
- if (!file_exists($cacheidfile)) {
- return false;
- }
-
- $cacheid = unserialize(implode('', file($cacheidfile)));
- }
-
- $cachettl = $this->config->get('cache_ttl');
- // If cache is newer than $cachettl seconds, we use the cache!
- if (time() - $cacheid['age'] < $cachettl) {
- return $this->getCache($url);
- }
-
- return false;
- }
-
- function getCacheId($url)
- {
- $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cacheid';
-
- if (!file_exists($cacheidfile)) {
- return false;
- }
-
- $ret = unserialize(implode('', file($cacheidfile)));
- return $ret;
- }
-
- function getCache($url)
- {
- $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cachefile';
-
- if (!file_exists($cachefile)) {
- return PEAR::raiseError('No cached content available for "' . $url . '"');
- }
-
- return unserialize(implode('', file($cachefile)));
- }
-
- /**
- * @param string full URL to REST resource
- * @param string original contents of the REST resource
- * @param array HTTP Last-Modified and ETag headers
- * @param bool if true, then the cache id file should be regenerated to
- * trigger a new time-to-live value
- */
- function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)
- {
- $cache_dir = $this->config->get('cache_dir');
- $d = $cache_dir . DIRECTORY_SEPARATOR . md5($url);
- $cacheidfile = $d . 'rest.cacheid';
- $cachefile = $d . 'rest.cachefile';
-
- if (!is_dir($cache_dir)) {
- if (System::mkdir(array('-p', $cache_dir)) === false) {
- return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory and attempts to create the directory failed.");
- }
- }
-
- if ($cacheid === null && $nochange) {
- $cacheid = unserialize(implode('', file($cacheidfile)));
- }
-
- $idData = serialize(array(
- 'age' => time(),
- 'lastChange' => ($nochange ? $cacheid['lastChange'] : $lastmodified),
- ));
-
- $result = $this->saveCacheFile($cacheidfile, $idData);
- if (PEAR::isError($result)) {
- return $result;
- } elseif ($nochange) {
- return true;
- }
-
- $result = $this->saveCacheFile($cachefile, serialize($contents));
- if (PEAR::isError($result)) {
- if (file_exists($cacheidfile)) {
- @unlink($cacheidfile);
- }
-
- return $result;
- }
-
- return true;
- }
-
- function saveCacheFile($file, $contents)
- {
- $len = strlen($contents);
-
- $cachefile_fp = @fopen($file, 'xb'); // x is the O_CREAT|O_EXCL mode
- if ($cachefile_fp !== false) { // create file
- if (fwrite($cachefile_fp, $contents, $len) < $len) {
- fclose($cachefile_fp);
- return PEAR::raiseError("Could not write $file.");
- }
- } else { // update file
- $cachefile_fp = @fopen($file, 'r+b'); // do not truncate file
- if (!$cachefile_fp) {
- return PEAR::raiseError("Could not open $file for writing.");
- }
-
- if (OS_WINDOWS) {
- $not_symlink = !is_link($file); // see bug #18834
- } else {
- $cachefile_lstat = lstat($file);
- $cachefile_fstat = fstat($cachefile_fp);
- $not_symlink = $cachefile_lstat['mode'] == $cachefile_fstat['mode']
- && $cachefile_lstat['ino'] == $cachefile_fstat['ino']
- && $cachefile_lstat['dev'] == $cachefile_fstat['dev']
- && $cachefile_fstat['nlink'] === 1;
- }
-
- if ($not_symlink) {
- ftruncate($cachefile_fp, 0); // NOW truncate
- if (fwrite($cachefile_fp, $contents, $len) < $len) {
- fclose($cachefile_fp);
- return PEAR::raiseError("Could not write $file.");
- }
- } else {
- fclose($cachefile_fp);
- $link = function_exists('readlink') ? readlink($file) : $file;
- return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $file . ' as it is symlinked to ' . $link . ' - Possible symlink attack');
- }
- }
-
- fclose($cachefile_fp);
- return true;
- }
-
- /**
- * Efficiently Download a file through HTTP. Returns downloaded file as a string in-memory
- * This is best used for small files
- *
- * If an HTTP proxy has been configured (http_proxy PEAR_Config
- * setting), the proxy will be used.
- *
- * @param string $url the URL to download
- * @param string $save_dir directory to save file in
- * @param false|string|array $lastmodified header values to check against for caching
- * use false to return the header values from this download
- * @param false|array $accept Accept headers to send
- * @return string|array Returns the contents of the downloaded file or a PEAR
- * error on failure. If the error is caused by
- * socket-related errors, the error object will
- * have the fsockopen error code available through
- * getCode(). If caching is requested, then return the header
- * values.
- *
- * @access public
- */
- function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false)
- {
- static $redirect = 0;
- // always reset , so we are clean case of error
- $wasredirect = $redirect;
- $redirect = 0;
-
- $info = parse_url($url);
- if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) {
- return PEAR::raiseError('Cannot download non-http URL "' . $url . '"');
- }
-
- if (!isset($info['host'])) {
- return PEAR::raiseError('Cannot download from non-URL "' . $url . '"');
- }
-
- $host = isset($info['host']) ? $info['host'] : null;
- $port = isset($info['port']) ? $info['port'] : null;
- $path = isset($info['path']) ? $info['path'] : null;
- $schema = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http';
-
- $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
- if ($this->config->get('http_proxy')&&
- $proxy = parse_url($this->config->get('http_proxy'))
- ) {
- $proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
- if ($schema === 'https') {
- $proxy_host = 'ssl://' . $proxy_host;
- }
-
- $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080;
- $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null;
- $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null;
- $proxy_schema = (isset($proxy['scheme']) && $proxy['scheme'] == 'https') ? 'https' : 'http';
- }
-
- if (empty($port)) {
- $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80;
- }
-
- if (isset($proxy['host'])) {
- $request = "GET $url HTTP/1.1\r\n";
- } else {
- $request = "GET $path HTTP/1.1\r\n";
- }
-
- $request .= "Host: $host\r\n";
- $ifmodifiedsince = '';
- if (is_array($lastmodified)) {
- if (isset($lastmodified['Last-Modified'])) {
- $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n";
- }
-
- if (isset($lastmodified['ETag'])) {
- $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n";
- }
- } else {
- $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
- }
-
- $request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.5/PHP/" . PHP_VERSION . "\r\n";
-
- $username = $this->config->get('username', null, $channel);
- $password = $this->config->get('password', null, $channel);
-
- if ($username && $password) {
- $tmp = base64_encode("$username:$password");
- $request .= "Authorization: Basic $tmp\r\n";
- }
-
- if ($proxy_host != '' && $proxy_user != '') {
- $request .= 'Proxy-Authorization: Basic ' .
- base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n";
- }
-
- if ($accept) {
- $request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
- }
-
- $request .= "Accept-Encoding:\r\n";
- $request .= "Connection: close\r\n";
- $request .= "\r\n";
-
- if ($proxy_host != '') {
- $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr, 15);
- if (!$fp) {
- return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", -9276);
- }
- } else {
- if ($schema === 'https') {
- $host = 'ssl://' . $host;
- }
-
- $fp = @fsockopen($host, $port, $errno, $errstr);
- if (!$fp) {
- return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno);
- }
- }
-
- fwrite($fp, $request);
-
- $headers = array();
- $reply = 0;
- while ($line = trim(fgets($fp, 1024))) {
- if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) {
- $headers[strtolower($matches[1])] = trim($matches[2]);
- } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {
- $reply = (int)$matches[1];
- if ($reply == 304 && ($lastmodified || ($lastmodified === false))) {
- return false;
- }
-
- if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) {
- return PEAR::raiseError("File $schema://$host:$port$path not valid (received: $line)");
- }
- }
- }
-
- if ($reply != 200) {
- if (!isset($headers['location'])) {
- return PEAR::raiseError("File $schema://$host:$port$path not valid (redirected but no location)");
- }
-
- if ($wasredirect > 4) {
- return PEAR::raiseError("File $schema://$host:$port$path not valid (redirection looped more than 5 times)");
- }
-
- $redirect = $wasredirect + 1;
- return $this->downloadHttp($headers['location'], $lastmodified, $accept, $channel);
- }
-
- $length = isset($headers['content-length']) ? $headers['content-length'] : -1;
-
- $data = '';
- while ($chunk = @fread($fp, 8192)) {
- $data .= $chunk;
- }
- fclose($fp);
-
- if ($lastmodified === false || $lastmodified) {
- if (isset($headers['etag'])) {
- $lastmodified = array('ETag' => $headers['etag']);
- }
-
- if (isset($headers['last-modified'])) {
- if (is_array($lastmodified)) {
- $lastmodified['Last-Modified'] = $headers['last-modified'];
- } else {
- $lastmodified = $headers['last-modified'];
- }
- }
-
- return array($data, $lastmodified, $headers);
- }
-
- return $data;
- }
-}
-
-/**
- * PEAR_RunTest
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.3.3
- */
-
-/**
- * for error handling
- */
-require_once 'PEAR.php';
-require_once 'PEAR/Config.php';
-
-define('DETAILED', 1);
-putenv("PHP_PEAR_RUNTESTS=1");
-
-/**
- * Simplified version of PHP's test suite
- *
- * Try it with:
- *
- * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);'
- *
- *
- * @category pear
- * @package PEAR
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.3.3
- */
-class PEAR_RunTest
-{
- var $_headers = array();
- var $_logger;
- var $_options;
- var $_php;
- var $tests_count;
- var $xdebug_loaded;
- /**
- * Saved value of php executable, used to reset $_php when we
- * have a test that uses cgi
- *
- * @var unknown_type
- */
- var $_savephp;
- var $ini_overwrites = array(
- 'output_handler=',
- 'open_basedir=',
- 'disable_functions=',
- 'output_buffering=Off',
- 'display_errors=1',
- 'log_errors=0',
- 'html_errors=0',
- 'track_errors=1',
- 'report_memleaks=0',
- 'report_zend_debug=0',
- 'docref_root=',
- 'docref_ext=.html',
- 'error_prepend_string=',
- 'error_append_string=',
- 'auto_prepend_file=',
- 'auto_append_file=',
- 'xdebug.default_enable=0',
- 'allow_url_fopen=1',
- );
-
- /**
- * An object that supports the PEAR_Common->log() signature, or null
- * @param PEAR_Common|null
- */
- function __construct($logger = null, $options = array())
- {
- if (!defined('E_DEPRECATED')) {
- define('E_DEPRECATED', 0);
- }
- if (!defined('E_STRICT')) {
- define('E_STRICT', 0);
- }
- $this->ini_overwrites[] = 'error_reporting=' . (E_ALL & ~(E_DEPRECATED | E_STRICT));
- if (is_null($logger)) {
- require_once 'PEAR/Common.php';
- $logger = new PEAR_Common;
- }
- $this->_logger = $logger;
- $this->_options = $options;
-
- $conf = &PEAR_Config::singleton();
- $this->_php = $conf->get('php_bin');
- }
-
- /**
- * Taken from php-src/run-tests.php
- *
- * @param string $commandline command name
- * @param array $env
- * @param string $stdin standard input to pass to the command
- * @return unknown
- */
- function system_with_timeout($commandline, $env = null, $stdin = null)
- {
- $data = '';
- $proc = proc_open($commandline, array(
- 0 => array('pipe', 'r'),
- 1 => array('pipe', 'w'),
- 2 => array('pipe', 'w')
- ), $pipes, null, $env, array('suppress_errors' => true));
-
- if (!$proc) {
- return false;
- }
-
- if (is_string($stdin)) {
- fwrite($pipes[0], $stdin);
- }
- fclose($pipes[0]);
-
- while (true) {
- /* hide errors from interrupted syscalls */
- $r = $pipes;
- $e = $w = null;
- $n = @stream_select($r, $w, $e, 60);
-
- if ($n === 0) {
- /* timed out */
- $data .= "\n ** ERROR: process timed out **\n";
- proc_terminate($proc);
- return array(1234567890, $data);
- } else if ($n > 0) {
- $line = fread($pipes[1], 8192);
- if (strlen($line) == 0) {
- /* EOF */
- break;
- }
- $data .= $line;
- }
- }
- if (function_exists('proc_get_status')) {
- $stat = proc_get_status($proc);
- if ($stat['signaled']) {
- $data .= "\nTermsig=".$stat['stopsig'];
- }
- }
- $code = proc_close($proc);
- if (function_exists('proc_get_status')) {
- $code = $stat['exitcode'];
- }
- return array($code, $data);
- }
-
- /**
- * Turns a PHP INI string into an array
- *
- * Turns -d "include_path=/foo/bar" into this:
- * array(
- * 'include_path' => array(
- * 'operator' => '-d',
- * 'value' => '/foo/bar',
- * )
- * )
- * Works both with quotes and without
- *
- * @param string an PHP INI string, -d "include_path=/foo/bar"
- * @return array
- */
- function iniString2array($ini_string)
- {
- if (!$ini_string) {
- return array();
- }
- $split = preg_split('/[\s]|=/', $ini_string, -1, PREG_SPLIT_NO_EMPTY);
- $key = $split[1][0] == '"' ? substr($split[1], 1) : $split[1];
- $value = $split[2][strlen($split[2]) - 1] == '"' ? substr($split[2], 0, -1) : $split[2];
- // FIXME review if this is really the struct to go with
- $array = array($key => array('operator' => $split[0], 'value' => $value));
- return $array;
- }
-
- function settings2array($settings, $ini_settings)
- {
- foreach ($settings as $setting) {
- if (strpos($setting, '=') !== false) {
- $setting = explode('=', $setting, 2);
- $name = trim(strtolower($setting[0]));
- $value = trim($setting[1]);
- $ini_settings[$name] = $value;
- }
- }
- return $ini_settings;
- }
-
- function settings2params($ini_settings)
- {
- $settings = '';
- foreach ($ini_settings as $name => $value) {
- if (is_array($value)) {
- $operator = $value['operator'];
- $value = $value['value'];
- } else {
- $operator = '-d';
- }
- $value = addslashes($value);
- $settings .= " $operator \"$name=$value\"";
- }
- return $settings;
- }
-
- function _preparePhpBin($php, $file, $ini_settings)
- {
- $file = escapeshellarg($file);
- $cmd = $php . $ini_settings . ' -f ' . $file;
-
- return $cmd;
- }
-
- function runPHPUnit($file, $ini_settings = '')
- {
- if (!file_exists($file) && file_exists(getcwd() . DIRECTORY_SEPARATOR . $file)) {
- $file = realpath(getcwd() . DIRECTORY_SEPARATOR . $file);
- } elseif (file_exists($file)) {
- $file = realpath($file);
- }
-
- $cmd = $this->_preparePhpBin($this->_php, $file, $ini_settings);
- if (isset($this->_logger)) {
- $this->_logger->log(2, 'Running command "' . $cmd . '"');
- }
-
- $savedir = getcwd(); // in case the test moves us around
- chdir(dirname($file));
- echo `$cmd`;
- chdir($savedir);
- return 'PASSED'; // we have no way of knowing this information so assume passing
- }
-
- /**
- * Runs an individual test case.
- *
- * @param string The filename of the test
- * @param array|string INI settings to be applied to the test run
- * @param integer Number what the current running test is of the
- * whole test suite being runned.
- *
- * @return string|object Returns PASSED, WARNED, FAILED depending on how the
- * test came out.
- * PEAR Error when the tester it self fails
- */
- function run($file, $ini_settings = array(), $test_number = 1)
- {
- $this->_restorePHPBinary();
-
- if (empty($this->_options['cgi'])) {
- // try to see if php-cgi is in the path
- $res = $this->system_with_timeout('php-cgi -v');
- if (false !== $res && !(is_array($res) && in_array($res[0], array(-1, 127)))) {
- $this->_options['cgi'] = 'php-cgi';
- }
- }
- if (1 < $len = strlen($this->tests_count)) {
- $test_number = str_pad($test_number, $len, ' ', STR_PAD_LEFT);
- $test_nr = "[$test_number/$this->tests_count] ";
- } else {
- $test_nr = '';
- }
-
- $file = realpath($file);
- $section_text = $this->_readFile($file);
- if (PEAR::isError($section_text)) {
- return $section_text;
- }
-
- if (isset($section_text['POST_RAW']) && isset($section_text['UPLOAD'])) {
- return PEAR::raiseError("Cannot contain both POST_RAW and UPLOAD in test file: $file");
- }
-
- $cwd = getcwd();
-
- $pass_options = '';
- if (!empty($this->_options['ini'])) {
- $pass_options = $this->_options['ini'];
- }
-
- if (is_string($ini_settings)) {
- $ini_settings = $this->iniString2array($ini_settings);
- }
-
- $ini_settings = $this->settings2array($this->ini_overwrites, $ini_settings);
- if ($section_text['INI']) {
- if (strpos($section_text['INI'], '{PWD}') !== false) {
- $section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']);
- }
- $ini = preg_split( "/[\n\r]+/", $section_text['INI']);
- $ini_settings = $this->settings2array($ini, $ini_settings);
- }
- $ini_settings = $this->settings2params($ini_settings);
- $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file);
-
- $tested = trim($section_text['TEST']);
- $tested.= !isset($this->_options['simple']) ? "[$shortname]" : ' ';
-
- if (!empty($section_text['POST']) || !empty($section_text['POST_RAW']) ||
- !empty($section_text['UPLOAD']) || !empty($section_text['GET']) ||
- !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) {
- if (empty($this->_options['cgi'])) {
- if (!isset($this->_options['quiet'])) {
- $this->_logger->log(0, "SKIP $test_nr$tested (reason: --cgi option needed for this test, type 'pear help run-tests')");
- }
- if (isset($this->_options['tapoutput'])) {
- return array('ok', ' # skip --cgi option needed for this test, "pear help run-tests" for info');
- }
- return 'SKIPPED';
- }
- $this->_savePHPBinary();
- $this->_php = $this->_options['cgi'];
- }
-
- $temp_dir = realpath(dirname($file));
- $main_file_name = basename($file, 'phpt');
- $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff';
- $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log';
- $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp';
- $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out';
- $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem';
- $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php';
- $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php';
- $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php';
- $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.');
-
- // unlink old test results
- $this->_cleanupOldFiles($file);
-
- // Check if test should be skipped.
- $res = $this->_runSkipIf($section_text, $temp_skipif, $tested, $ini_settings);
- if (count($res) != 2) {
- return $res;
- }
- $info = $res['info'];
- $warn = $res['warn'];
-
- // We've satisfied the preconditions - run the test!
- if (isset($this->_options['coverage']) && $this->xdebug_loaded) {
- $xdebug_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'xdebug';
- $text = "\n" . 'function coverage_shutdown() {' .
- "\n" . ' $xdebug = var_export(xdebug_get_code_coverage(), true);';
- if (!function_exists('file_put_contents')) {
- $text .= "\n" . ' $fh = fopen(\'' . $xdebug_file . '\', "wb");' .
- "\n" . ' if ($fh !== false) {' .
- "\n" . ' fwrite($fh, $xdebug);' .
- "\n" . ' fclose($fh);' .
- "\n" . ' }';
- } else {
- $text .= "\n" . ' file_put_contents(\'' . $xdebug_file . '\', $xdebug);';
- }
-
- // Workaround for http://pear.php.net/bugs/bug.php?id=17292
- $lines = explode("\n", $section_text['FILE']);
- $numLines = count($lines);
- $namespace = '';
- $coverage_shutdown = 'coverage_shutdown';
-
- if (
- substr($lines[0], 0, 2) == '<?' ||
- substr($lines[0], 0, 5) == '<?php'
- ) {
- unset($lines[0]);
- }
-
-
- for ($i = 0; $i < $numLines; $i++) {
- if (isset($lines[$i]) && substr($lines[$i], 0, 9) == 'namespace') {
- $namespace = substr($lines[$i], 10, -1);
- $coverage_shutdown = $namespace . '\\coverage_shutdown';
- $namespace = "namespace " . $namespace . ";\n";
-
- unset($lines[$i]);
- break;
- }
- }
-
- $text .= "\n xdebug_stop_code_coverage();" .
- "\n" . '} // end coverage_shutdown()' .
- "\n\n" . 'register_shutdown_function("' . $coverage_shutdown . '");';
- $text .= "\n" . 'xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);' . "\n";
-
- $this->save_text($temp_file, "<?php\n" . $namespace . $text . "\n" . implode("\n", $lines));
- } else {
- $this->save_text($temp_file, $section_text['FILE']);
- }
-
- $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : '';
- $cmd = $this->_preparePhpBin($this->_php, $temp_file, $ini_settings);
- $cmd.= "$args 2>&1";
- if (isset($this->_logger)) {
- $this->_logger->log(2, 'Running command "' . $cmd . '"');
- }
-
- // Reset environment from any previous test.
- $env = $this->_resetEnv($section_text, $temp_file);
-
- $section_text = $this->_processUpload($section_text, $file);
- if (PEAR::isError($section_text)) {
- return $section_text;
- }
-
- if (array_key_exists('POST_RAW', $section_text) && !empty($section_text['POST_RAW'])) {
- $post = trim($section_text['POST_RAW']);
- $raw_lines = explode("\n", $post);
-
- $request = '';
- $started = false;
- foreach ($raw_lines as $i => $line) {
- if (empty($env['CONTENT_TYPE']) &&
- preg_match('/^Content-Type:(.*)/i', $line, $res)) {
- $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1]));
- continue;
- }
- if ($started) {
- $request .= "\n";
- }
- $started = true;
- $request .= $line;
- }
-
- $env['CONTENT_LENGTH'] = strlen($request);
- $env['REQUEST_METHOD'] = 'POST';
-
- $this->save_text($tmp_post, $request);
- $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post";
- } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) {
- $post = trim($section_text['POST']);
- $this->save_text($tmp_post, $post);
- $content_length = strlen($post);
-
- $env['REQUEST_METHOD'] = 'POST';
- $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
- $env['CONTENT_LENGTH'] = $content_length;
-
- $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post";
- } else {
- $env['REQUEST_METHOD'] = 'GET';
- $env['CONTENT_TYPE'] = '';
- $env['CONTENT_LENGTH'] = '';
- }
-
- if (OS_WINDOWS && isset($section_text['RETURNS'])) {
- ob_start();
- system($cmd, $return_value);
- $out = ob_get_contents();
- ob_end_clean();
- $section_text['RETURNS'] = (int) trim($section_text['RETURNS']);
- $returnfail = ($return_value != $section_text['RETURNS']);
- } else {
- $returnfail = false;
- $stdin = isset($section_text['STDIN']) ? $section_text['STDIN'] : null;
- $out = $this->system_with_timeout($cmd, $env, $stdin);
- $return_value = $out[0];
- $out = $out[1];
- }
-
- $output = preg_replace('/\r\n/', "\n", trim($out));
-
- if (isset($tmp_post) && realpath($tmp_post) && file_exists($tmp_post)) {
- @unlink(realpath($tmp_post));
- }
- chdir($cwd); // in case the test moves us around
-
- /* when using CGI, strip the headers from the output */
- $output = $this->_stripHeadersCGI($output);
-
- if (isset($section_text['EXPECTHEADERS'])) {
- $testheaders = $this->_processHeaders($section_text['EXPECTHEADERS']);
- $missing = array_diff_assoc($testheaders, $this->_headers);
- $changed = '';
- foreach ($missing as $header => $value) {
- if (isset($this->_headers[$header])) {
- $changed .= "-$header: $value\n+$header: ";
- $changed .= $this->_headers[$header];
- } else {
- $changed .= "-$header: $value\n";
- }
- }
- if ($missing) {
- // tack on failed headers to output:
- $output .= "\n====EXPECTHEADERS FAILURE====:\n$changed";
- }
- }
-
- $this->_testCleanup($section_text, $temp_clean);
-
- // Does the output match what is expected?
- do {
- if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) {
- if (isset($section_text['EXPECTF'])) {
- $wanted = trim($section_text['EXPECTF']);
- } else {
- $wanted = trim($section_text['EXPECTREGEX']);
- }
- $wanted_re = preg_replace('/\r\n/', "\n", $wanted);
- if (isset($section_text['EXPECTF'])) {
- $wanted_re = preg_quote($wanted_re, '/');
- // Stick to basics
- $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy
- $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re);
- $wanted_re = str_replace("%d", "[0-9]+", $wanted_re);
- $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re);
- $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re);
- $wanted_re = str_replace("%c", ".", $wanted_re);
- // %f allows two points "-.0.0" but that is the best *simple* expression
- }
-
- /* DEBUG YOUR REGEX HERE
- var_dump($wanted_re);
- print(str_repeat('=', 80) . "\n");
- var_dump($output);
- */
- if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) {
- if (file_exists($temp_file)) {
- unlink($temp_file);
- }
- if (array_key_exists('FAIL', $section_text)) {
- break;
- }
- if (!isset($this->_options['quiet'])) {
- $this->_logger->log(0, "PASS $test_nr$tested$info");
- }
- if (isset($this->_options['tapoutput'])) {
- return array('ok', ' - ' . $tested);
- }
- return 'PASSED';
- }
- } else {
- if (isset($section_text['EXPECTFILE'])) {
- $f = $temp_dir . '/' . trim($section_text['EXPECTFILE']);
- if (!($fp = @fopen($f, 'rb'))) {
- return PEAR::raiseError('--EXPECTFILE-- section file ' .
- $f . ' not found');
- }
- fclose($fp);
- $section_text['EXPECT'] = file_get_contents($f);
- }
-
- if (isset($section_text['EXPECT'])) {
- $wanted = preg_replace('/\r\n/', "\n", trim($section_text['EXPECT']));
- } else {
- $wanted = '';
- }
-
- // compare and leave on success
- if (!$returnfail && 0 == strcmp($output, $wanted)) {
- if (file_exists($temp_file)) {
- unlink($temp_file);
- }
- if (array_key_exists('FAIL', $section_text)) {
- break;
- }
- if (!isset($this->_options['quiet'])) {
- $this->_logger->log(0, "PASS $test_nr$tested$info");
- }
- if (isset($this->_options['tapoutput'])) {
- return array('ok', ' - ' . $tested);
- }
- return 'PASSED';
- }
- }
- } while (false);
-
- if (array_key_exists('FAIL', $section_text)) {
- // we expect a particular failure
- // this is only used for testing PEAR_RunTest
- $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null;
- $faildiff = $this->generate_diff($wanted, $output, null, $expectf);
- $faildiff = preg_replace('/\r/', '', $faildiff);
- $wanted = preg_replace('/\r/', '', trim($section_text['FAIL']));
- if ($faildiff == $wanted) {
- if (!isset($this->_options['quiet'])) {
- $this->_logger->log(0, "PASS $test_nr$tested$info");
- }
- if (isset($this->_options['tapoutput'])) {
- return array('ok', ' - ' . $tested);
- }
- return 'PASSED';
- }
- unset($section_text['EXPECTF']);
- $output = $faildiff;
- if (isset($section_text['RETURNS'])) {
- return PEAR::raiseError('Cannot have both RETURNS and FAIL in the same test: ' .
- $file);
- }
- }
-
- // Test failed so we need to report details.
- $txt = $warn ? 'WARN ' : 'FAIL ';
- $this->_logger->log(0, $txt . $test_nr . $tested . $info);
-
- // write .exp
- $res = $this->_writeLog($exp_filename, $wanted);
- if (PEAR::isError($res)) {
- return $res;
- }
-
- // write .out
- $res = $this->_writeLog($output_filename, $output);
- if (PEAR::isError($res)) {
- return $res;
- }
-
- // write .diff
- $returns = isset($section_text['RETURNS']) ?
- array(trim($section_text['RETURNS']), $return_value) : null;
- $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null;
- $data = $this->generate_diff($wanted, $output, $returns, $expectf);
- $res = $this->_writeLog($diff_filename, $data);
- if (isset($this->_options['showdiff'])) {
- $this->_logger->log(0, "========DIFF========");
- $this->_logger->log(0, $data);
- $this->_logger->log(0, "========DONE========");
- }
- if (PEAR::isError($res)) {
- return $res;
- }
-
- // write .log
- $data = "
----- EXPECTED OUTPUT
-$wanted
----- ACTUAL OUTPUT
-$output
----- FAILED
-";
-
- if ($returnfail) {
- $data .= "
----- EXPECTED RETURN
-$section_text[RETURNS]
----- ACTUAL RETURN
-$return_value
-";
- }
-
- $res = $this->_writeLog($log_filename, $data);
- if (PEAR::isError($res)) {
- return $res;
- }
-
- if (isset($this->_options['tapoutput'])) {
- $wanted = explode("\n", $wanted);
- $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted);
- $output = explode("\n", $output);
- $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output);
- return array($wanted . $output . 'not ok', ' - ' . $tested);
- }
- return $warn ? 'WARNED' : 'FAILED';
- }
-
- function generate_diff($wanted, $output, $rvalue, $wanted_re)
- {
- $w = explode("\n", $wanted);
- $o = explode("\n", $output);
- $wr = explode("\n", $wanted_re);
- $w1 = array_diff_assoc($w, $o);
- $o1 = array_diff_assoc($o, $w);
- $o2 = $w2 = array();
- foreach ($w1 as $idx => $val) {
- if (!$wanted_re || !isset($wr[$idx]) || !isset($o1[$idx]) ||
- !preg_match('/^' . $wr[$idx] . '\\z/', $o1[$idx])) {
- $w2[sprintf("%03d<", $idx)] = sprintf("%03d- ", $idx + 1) . $val;
- }
- }
- foreach ($o1 as $idx => $val) {
- if (!$wanted_re || !isset($wr[$idx]) ||
- !preg_match('/^' . $wr[$idx] . '\\z/', $val)) {
- $o2[sprintf("%03d>", $idx)] = sprintf("%03d+ ", $idx + 1) . $val;
- }
- }
- $diff = array_merge($w2, $o2);
- ksort($diff);
- $extra = $rvalue ? "##EXPECTED: $rvalue[0]\r\n##RETURNED: $rvalue[1]" : '';
- return implode("\r\n", $diff) . $extra;
- }
-
- // Write the given text to a temporary file, and return the filename.
- function save_text($filename, $text)
- {
- if (!$fp = fopen($filename, 'w')) {
- return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)");
- }
- fwrite($fp, $text);
- fclose($fp);
- if (1 < DETAILED) echo "
-FILE $filename {{{
-$text
-}}}
-";
- }
-
- function _cleanupOldFiles($file)
- {
- $temp_dir = realpath(dirname($file));
- $mainFileName = basename($file, 'phpt');
- $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'diff';
- $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'log';
- $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'exp';
- $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'out';
- $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'mem';
- $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'php';
- $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'skip.php';
- $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'clean.php';
- $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.');
-
- // unlink old test results
- @unlink($diff_filename);
- @unlink($log_filename);
- @unlink($exp_filename);
- @unlink($output_filename);
- @unlink($memcheck_filename);
- @unlink($temp_file);
- @unlink($temp_skipif);
- @unlink($tmp_post);
- @unlink($temp_clean);
- }
-
- function _runSkipIf($section_text, $temp_skipif, $tested, $ini_settings)
- {
- $info = '';
- $warn = false;
- if (array_key_exists('SKIPIF', $section_text) && trim($section_text['SKIPIF'])) {
- $this->save_text($temp_skipif, $section_text['SKIPIF']);
- $output = $this->system_with_timeout("$this->_php$ini_settings -f \"$temp_skipif\"");
- $output = $output[1];
- $loutput = ltrim($output);
- unlink($temp_skipif);
- if (!strncasecmp('skip', $loutput, 4)) {
- $skipreason = "SKIP $tested";
- if (preg_match('/^\s*skip\s*(.+)\s*/i', $output, $m)) {
- $skipreason .= '(reason: ' . $m[1] . ')';
- }
- if (!isset($this->_options['quiet'])) {
- $this->_logger->log(0, $skipreason);
- }
- if (isset($this->_options['tapoutput'])) {
- return array('ok', ' # skip ' . $reason);
- }
- return 'SKIPPED';
- }
-
- if (!strncasecmp('info', $loutput, 4)
- && preg_match('/^\s*info\s*(.+)\s*/i', $output, $m)) {
- $info = " (info: $m[1])";
- }
-
- if (!strncasecmp('warn', $loutput, 4)
- && preg_match('/^\s*warn\s*(.+)\s*/i', $output, $m)) {
- $warn = true; /* only if there is a reason */
- $info = " (warn: $m[1])";
- }
- }
-
- return array('warn' => $warn, 'info' => $info);
- }
-
- function _stripHeadersCGI($output)
- {
- $this->headers = array();
- if (!empty($this->_options['cgi']) &&
- $this->_php == $this->_options['cgi'] &&
- preg_match("/^(.*?)(?:\n\n(.*)|\\z)/s", $output, $match)) {
- $output = isset($match[2]) ? trim($match[2]) : '';
- $this->_headers = $this->_processHeaders($match[1]);
- }
-
- return $output;
- }
-
- /**
- * Return an array that can be used with array_diff() to compare headers
- *
- * @param string $text
- */
- function _processHeaders($text)
- {
- $headers = array();
- $rh = preg_split("/[\n\r]+/", $text);
- foreach ($rh as $line) {
- if (strpos($line, ':')!== false) {
- $line = explode(':', $line, 2);
- $headers[trim($line[0])] = trim($line[1]);
- }
- }
- return $headers;
- }
-
- function _readFile($file)
- {
- // Load the sections of the test file.
- $section_text = array(
- 'TEST' => '(unnamed test)',
- 'SKIPIF' => '',
- 'GET' => '',
- 'COOKIE' => '',
- 'POST' => '',
- 'ARGS' => '',
- 'INI' => '',
- 'CLEAN' => '',
- );
-
- if (!is_file($file) || !$fp = fopen($file, "r")) {
- return PEAR::raiseError("Cannot open test file: $file");
- }
-
- $section = '';
- while (!feof($fp)) {
- $line = fgets($fp);
-
- // Match the beginning of a section.
- if (preg_match('/^--([_A-Z]+)--/', $line, $r)) {
- $section = $r[1];
- $section_text[$section] = '';
- continue;
- } elseif (empty($section)) {
- fclose($fp);
- return PEAR::raiseError("Invalid sections formats in test file: $file");
- }
-
- // Add to the section text.
- $section_text[$section] .= $line;
- }
- fclose($fp);
-
- return $section_text;
- }
-
- function _writeLog($logname, $data)
- {
- if (!$log = fopen($logname, 'w')) {
- return PEAR::raiseError("Cannot create test log - $logname");
- }
- fwrite($log, $data);
- fclose($log);
- }
-
- function _resetEnv($section_text, $temp_file)
- {
- $env = $_ENV;
- $env['REDIRECT_STATUS'] = '';
- $env['QUERY_STRING'] = '';
- $env['PATH_TRANSLATED'] = '';
- $env['SCRIPT_FILENAME'] = '';
- $env['REQUEST_METHOD'] = '';
- $env['CONTENT_TYPE'] = '';
- $env['CONTENT_LENGTH'] = '';
- if (!empty($section_text['ENV'])) {
- if (strpos($section_text['ENV'], '{PWD}') !== false) {
- $section_text['ENV'] = str_replace('{PWD}', dirname($temp_file), $section_text['ENV']);
- }
- foreach (explode("\n", trim($section_text['ENV'])) as $e) {
- $e = explode('=', trim($e), 2);
- if (!empty($e[0]) && isset($e[1])) {
- $env[$e[0]] = $e[1];
- }
- }
- }
- if (array_key_exists('GET', $section_text)) {
- $env['QUERY_STRING'] = trim($section_text['GET']);
- } else {
- $env['QUERY_STRING'] = '';
- }
- if (array_key_exists('COOKIE', $section_text)) {
- $env['HTTP_COOKIE'] = trim($section_text['COOKIE']);
- } else {
- $env['HTTP_COOKIE'] = '';
- }
- $env['REDIRECT_STATUS'] = '1';
- $env['PATH_TRANSLATED'] = $temp_file;
- $env['SCRIPT_FILENAME'] = $temp_file;
-
- return $env;
- }
-
- function _processUpload($section_text, $file)
- {
- if (array_key_exists('UPLOAD', $section_text) && !empty($section_text['UPLOAD'])) {
- $upload_files = trim($section_text['UPLOAD']);
- $upload_files = explode("\n", $upload_files);
-
- $request = "Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737\n" .
- "-----------------------------20896060251896012921717172737\n";
- foreach ($upload_files as $fileinfo) {
- $fileinfo = explode('=', $fileinfo);
- if (count($fileinfo) != 2) {
- return PEAR::raiseError("Invalid UPLOAD section in test file: $file");
- }
- if (!realpath(dirname($file) . '/' . $fileinfo[1])) {
- return PEAR::raiseError("File for upload does not exist: $fileinfo[1] " .
- "in test file: $file");
- }
- $file_contents = file_get_contents(dirname($file) . '/' . $fileinfo[1]);
- $fileinfo[1] = basename($fileinfo[1]);
- $request .= "Content-Disposition: form-data; name=\"$fileinfo[0]\"; filename=\"$fileinfo[1]\"\n";
- $request .= "Content-Type: text/plain\n\n";
- $request .= $file_contents . "\n" .
- "-----------------------------20896060251896012921717172737\n";
- }
-
- if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) {
- // encode POST raw
- $post = trim($section_text['POST']);
- $post = explode('&', $post);
- foreach ($post as $i => $post_info) {
- $post_info = explode('=', $post_info);
- if (count($post_info) != 2) {
- return PEAR::raiseError("Invalid POST data in test file: $file");
- }
- $post_info[0] = rawurldecode($post_info[0]);
- $post_info[1] = rawurldecode($post_info[1]);
- $post[$i] = $post_info;
- }
- foreach ($post as $post_info) {
- $request .= "Content-Disposition: form-data; name=\"$post_info[0]\"\n\n";
- $request .= $post_info[1] . "\n" .
- "-----------------------------20896060251896012921717172737\n";
- }
- unset($section_text['POST']);
- }
- $section_text['POST_RAW'] = $request;
- }
-
- return $section_text;
- }
-
- function _testCleanup($section_text, $temp_clean)
- {
- if ($section_text['CLEAN']) {
- $this->_restorePHPBinary();
-
- // perform test cleanup
- $this->save_text($temp_clean, $section_text['CLEAN']);
- $output = $this->system_with_timeout("$this->_php $temp_clean 2>&1");
- if (strlen($output[1])) {
- echo "BORKED --CLEAN-- section! output:\n", $output[1];
- }
- if (file_exists($temp_clean)) {
- unlink($temp_clean);
- }
- }
- }
-
- function _savePHPBinary()
- {
- $this->_savephp = $this->_php;
- }
-
- function _restorePHPBinary()
- {
- if (isset($this->_savephp))
- {
- $this->_php = $this->_savephp;
- unset($this->_savephp);
- }
- }
-}
-
-/**
- * PEAR_Validate
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**#@+
- * Constants for install stage
- */
-define('PEAR_VALIDATE_INSTALLING', 1);
-define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others
-define('PEAR_VALIDATE_NORMAL', 3);
-define('PEAR_VALIDATE_DOWNLOADING', 4); // this is not bit-mapped like the others
-define('PEAR_VALIDATE_PACKAGING', 7);
-/**#@-*/
-require_once 'PEAR/Common.php';
-require_once 'PEAR/Validator/PECL.php';
-
-/**
- * Validation class for package.xml - channel-level advanced validation
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Validate
-{
- var $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG;
- /**
- * @var PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- var $_packagexml;
- /**
- * @var int one of the PEAR_VALIDATE_* constants
- */
- var $_state = PEAR_VALIDATE_NORMAL;
- /**
- * Format: ('error' => array('field' => name, 'reason' => reason), 'warning' => same)
- * @var array
- * @access private
- */
- var $_failures = array('error' => array(), 'warning' => array());
-
- /**
- * Override this method to handle validation of normal package names
- * @param string
- * @return bool
- * @access protected
- */
- function _validPackageName($name)
- {
- return (bool) preg_match('/^' . $this->packageregex . '\\z/', $name);
- }
-
- /**
- * @param string package name to validate
- * @param string name of channel-specific validation package
- * @final
- */
- function validPackageName($name, $validatepackagename = false)
- {
- if ($validatepackagename) {
- if (strtolower($name) == strtolower($validatepackagename)) {
- return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*\\z/', $name);
- }
- }
- return $this->_validPackageName($name);
- }
-
- /**
- * This validates a bundle name, and bundle names must conform
- * to the PEAR naming convention, so the method is final and static.
- * @param string
- * @final
- * @static
- */
- function validGroupName($name)
- {
- return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name);
- }
-
- /**
- * Determine whether $state represents a valid stability level
- * @param string
- * @return bool
- * @static
- * @final
- */
- function validState($state)
- {
- return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable'));
- }
-
- /**
- * Get a list of valid stability levels
- * @return array
- * @static
- * @final
- */
- function getValidStates()
- {
- return array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- }
-
- /**
- * Determine whether a version is a properly formatted version number that can be used
- * by version_compare
- * @param string
- * @return bool
- * @static
- * @final
- */
- function validVersion($ver)
- {
- return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver);
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- function setPackageFile(&$pf)
- {
- $this->_packagexml = &$pf;
- }
-
- /**
- * @access private
- */
- function _addFailure($field, $reason)
- {
- $this->_failures['errors'][] = array('field' => $field, 'reason' => $reason);
- }
-
- /**
- * @access private
- */
- function _addWarning($field, $reason)
- {
- $this->_failures['warnings'][] = array('field' => $field, 'reason' => $reason);
- }
-
- function getFailures()
- {
- $failures = $this->_failures;
- $this->_failures = array('warnings' => array(), 'errors' => array());
- return $failures;
- }
-
- /**
- * @param int one of the PEAR_VALIDATE_* constants
- */
- function validate($state = null)
- {
- if (!isset($this->_packagexml)) {
- return false;
- }
- if ($state !== null) {
- $this->_state = $state;
- }
- $this->_failures = array('warnings' => array(), 'errors' => array());
- $this->validatePackageName();
- $this->validateVersion();
- $this->validateMaintainers();
- $this->validateDate();
- $this->validateSummary();
- $this->validateDescription();
- $this->validateLicense();
- $this->validateNotes();
- if ($this->_packagexml->getPackagexmlVersion() == '1.0') {
- $this->validateState();
- $this->validateFilelist();
- } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0' ||
- $this->_packagexml->getPackagexmlVersion() == '2.1') {
- $this->validateTime();
- $this->validateStability();
- $this->validateDeps();
- $this->validateMainFilelist();
- $this->validateReleaseFilelist();
- //$this->validateGlobalTasks();
- $this->validateChangelog();
- }
- return !((bool) count($this->_failures['errors']));
- }
-
- /**
- * @access protected
- */
- function validatePackageName()
- {
- if ($this->_state == PEAR_VALIDATE_PACKAGING ||
- $this->_state == PEAR_VALIDATE_NORMAL) {
- if (($this->_packagexml->getPackagexmlVersion() == '2.0' ||
- $this->_packagexml->getPackagexmlVersion() == '2.1') &&
- $this->_packagexml->getExtends()) {
- $version = $this->_packagexml->getVersion() . '';
- $name = $this->_packagexml->getPackage();
- $test = array_shift($a = explode('.', $version));
- if ($test == '0') {
- return true;
- }
- $vlen = strlen($test);
- $majver = substr($name, strlen($name) - $vlen);
- while ($majver && !is_numeric($majver{0})) {
- $majver = substr($majver, 1);
- }
- if ($majver != $test) {
- $this->_addWarning('package', "package $name extends package " .
- $this->_packagexml->getExtends() . ' and so the name should ' .
- 'have a postfix equal to the major version like "' .
- $this->_packagexml->getExtends() . $test . '"');
- return true;
- } elseif (substr($name, 0, strlen($name) - $vlen) !=
- $this->_packagexml->getExtends()) {
- $this->_addWarning('package', "package $name extends package " .
- $this->_packagexml->getExtends() . ' and so the name must ' .
- 'be an extension like "' . $this->_packagexml->getExtends() .
- $test . '"');
- return true;
- }
- }
- }
- if (!$this->validPackageName($this->_packagexml->getPackage())) {
- $this->_addFailure('name', 'package name "' .
- $this->_packagexml->getPackage() . '" is invalid');
- return false;
- }
- }
-
- /**
- * @access protected
- */
- function validateVersion()
- {
- if ($this->_state != PEAR_VALIDATE_PACKAGING) {
- if (!$this->validVersion($this->_packagexml->getVersion())) {
- $this->_addFailure('version',
- 'Invalid version number "' . $this->_packagexml->getVersion() . '"');
- }
- return false;
- }
- $version = $this->_packagexml->getVersion();
- $versioncomponents = explode('.', $version);
- if (count($versioncomponents) != 3) {
- $this->_addWarning('version',
- 'A version number should have 3 decimals (x.y.z)');
- return true;
- }
- $name = $this->_packagexml->getPackage();
- // version must be based upon state
- switch ($this->_packagexml->getState()) {
- case 'snapshot' :
- return true;
- case 'devel' :
- if ($versioncomponents[0] . 'a' == '0a') {
- return true;
- }
- if ($versioncomponents[0] == 0) {
- $versioncomponents[0] = '0';
- $this->_addWarning('version',
- 'version "' . $version . '" should be "' .
- implode('.' ,$versioncomponents) . '"');
- } else {
- $this->_addWarning('version',
- 'packages with devel stability must be < version 1.0.0');
- }
- return true;
- break;
- case 'alpha' :
- case 'beta' :
- // check for a package that extends a package,
- // like Foo and Foo2
- if ($this->_state == PEAR_VALIDATE_PACKAGING) {
- if (substr($versioncomponents[2], 1, 2) == 'rc') {
- $this->_addFailure('version', 'Release Candidate versions ' .
- 'must have capital RC, not lower-case rc');
- return false;
- }
- }
- if (!$this->_packagexml->getExtends()) {
- if ($versioncomponents[0] == '1') {
- if ($versioncomponents[2]{0} == '0') {
- if ($versioncomponents[2] == '0') {
- // version 1.*.0000
- $this->_addWarning('version',
- 'version 1.' . $versioncomponents[1] .
- '.0 probably should not be alpha or beta');
- return true;
- } elseif (strlen($versioncomponents[2]) > 1) {
- // version 1.*.0RC1 or 1.*.0beta24 etc.
- return true;
- } else {
- // version 1.*.0
- $this->_addWarning('version',
- 'version 1.' . $versioncomponents[1] .
- '.0 probably should not be alpha or beta');
- return true;
- }
- } else {
- $this->_addWarning('version',
- 'bugfix versions (1.3.x where x > 0) probably should ' .
- 'not be alpha or beta');
- return true;
- }
- } elseif ($versioncomponents[0] != '0') {
- $this->_addWarning('version',
- 'major versions greater than 1 are not allowed for packages ' .
- 'without an <extends> tag or an identical postfix (foo2 v2.0.0)');
- return true;
- }
- if ($versioncomponents[0] . 'a' == '0a') {
- return true;
- }
- if ($versioncomponents[0] == 0) {
- $versioncomponents[0] = '0';
- $this->_addWarning('version',
- 'version "' . $version . '" should be "' .
- implode('.' ,$versioncomponents) . '"');
- }
- } else {
- $vlen = strlen($versioncomponents[0] . '');
- $majver = substr($name, strlen($name) - $vlen);
- while ($majver && !is_numeric($majver{0})) {
- $majver = substr($majver, 1);
- }
- if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) {
- $this->_addWarning('version', 'first version number "' .
- $versioncomponents[0] . '" must match the postfix of ' .
- 'package name "' . $name . '" (' .
- $majver . ')');
- return true;
- }
- if ($versioncomponents[0] == $majver) {
- if ($versioncomponents[2]{0} == '0') {
- if ($versioncomponents[2] == '0') {
- // version 2.*.0000
- $this->_addWarning('version',
- "version $majver." . $versioncomponents[1] .
- '.0 probably should not be alpha or beta');
- return false;
- } elseif (strlen($versioncomponents[2]) > 1) {
- // version 2.*.0RC1 or 2.*.0beta24 etc.
- return true;
- } else {
- // version 2.*.0
- $this->_addWarning('version',
- "version $majver." . $versioncomponents[1] .
- '.0 cannot be alpha or beta');
- return true;
- }
- } else {
- $this->_addWarning('version',
- "bugfix versions ($majver.x.y where y > 0) should " .
- 'not be alpha or beta');
- return true;
- }
- } elseif ($versioncomponents[0] != '0') {
- $this->_addWarning('version',
- "only versions 0.x.y and $majver.x.y are allowed for alpha/beta releases");
- return true;
- }
- if ($versioncomponents[0] . 'a' == '0a') {
- return true;
- }
- if ($versioncomponents[0] == 0) {
- $versioncomponents[0] = '0';
- $this->_addWarning('version',
- 'version "' . $version . '" should be "' .
- implode('.' ,$versioncomponents) . '"');
- }
- }
- return true;
- break;
- case 'stable' :
- if ($versioncomponents[0] == '0') {
- $this->_addWarning('version', 'versions less than 1.0.0 cannot ' .
- 'be stable');
- return true;
- }
- if (!is_numeric($versioncomponents[2])) {
- if (preg_match('/\d+(rc|a|alpha|b|beta)\d*/i',
- $versioncomponents[2])) {
- $this->_addWarning('version', 'version "' . $version . '" or any ' .
- 'RC/beta/alpha version cannot be stable');
- return true;
- }
- }
- // check for a package that extends a package,
- // like Foo and Foo2
- if ($this->_packagexml->getExtends()) {
- $vlen = strlen($versioncomponents[0] . '');
- $majver = substr($name, strlen($name) - $vlen);
- while ($majver && !is_numeric($majver{0})) {
- $majver = substr($majver, 1);
- }
- if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) {
- $this->_addWarning('version', 'first version number "' .
- $versioncomponents[0] . '" must match the postfix of ' .
- 'package name "' . $name . '" (' .
- $majver . ')');
- return true;
- }
- } elseif ($versioncomponents[0] > 1) {
- $this->_addWarning('version', 'major version x in x.y.z may not be greater than ' .
- '1 for any package that does not have an <extends> tag');
- }
- return true;
- break;
- default :
- return false;
- break;
- }
- }
-
- /**
- * @access protected
- */
- function validateMaintainers()
- {
- // maintainers can only be truly validated server-side for most channels
- // but allow this customization for those who wish it
- return true;
- }
-
- /**
- * @access protected
- */
- function validateDate()
- {
- if ($this->_state == PEAR_VALIDATE_NORMAL ||
- $this->_state == PEAR_VALIDATE_PACKAGING) {
-
- if (!preg_match('/(\d\d\d\d)\-(\d\d)\-(\d\d)/',
- $this->_packagexml->getDate(), $res) ||
- count($res) < 4
- || !checkdate($res[2], $res[3], $res[1])
- ) {
- $this->_addFailure('date', 'invalid release date "' .
- $this->_packagexml->getDate() . '"');
- return false;
- }
-
- if ($this->_state == PEAR_VALIDATE_PACKAGING &&
- $this->_packagexml->getDate() != date('Y-m-d')) {
- $this->_addWarning('date', 'Release Date "' .
- $this->_packagexml->getDate() . '" is not today');
- }
- }
- return true;
- }
-
- /**
- * @access protected
- */
- function validateTime()
- {
- if (!$this->_packagexml->getTime()) {
- // default of no time value set
- return true;
- }
-
- // packager automatically sets time, so only validate if pear validate is called
- if ($this->_state = PEAR_VALIDATE_NORMAL) {
- if (!preg_match('/\d\d:\d\d:\d\d/',
- $this->_packagexml->getTime())) {
- $this->_addFailure('time', 'invalid release time "' .
- $this->_packagexml->getTime() . '"');
- return false;
- }
-
- $result = preg_match('|\d{2}\:\d{2}\:\d{2}|', $this->_packagexml->getTime(), $matches);
- if ($result === false || empty($matches)) {
- $this->_addFailure('time', 'invalid release time "' .
- $this->_packagexml->getTime() . '"');
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * @access protected
- */
- function validateState()
- {
- // this is the closest to "final" php4 can get
- if (!PEAR_Validate::validState($this->_packagexml->getState())) {
- if (strtolower($this->_packagexml->getState() == 'rc')) {
- $this->_addFailure('state', 'RC is not a state, it is a version ' .
- 'postfix, use ' . $this->_packagexml->getVersion() . 'RC1, state beta');
- }
- $this->_addFailure('state', 'invalid release state "' .
- $this->_packagexml->getState() . '", must be one of: ' .
- implode(', ', PEAR_Validate::getValidStates()));
- return false;
- }
- return true;
- }
-
- /**
- * @access protected
- */
- function validateStability()
- {
- $ret = true;
- $packagestability = $this->_packagexml->getState();
- $apistability = $this->_packagexml->getState('api');
- if (!PEAR_Validate::validState($packagestability)) {
- $this->_addFailure('state', 'invalid release stability "' .
- $this->_packagexml->getState() . '", must be one of: ' .
- implode(', ', PEAR_Validate::getValidStates()));
- $ret = false;
- }
- $apistates = PEAR_Validate::getValidStates();
- array_shift($apistates); // snapshot is not allowed
- if (!in_array($apistability, $apistates)) {
- $this->_addFailure('state', 'invalid API stability "' .
- $this->_packagexml->getState('api') . '", must be one of: ' .
- implode(', ', $apistates));
- $ret = false;
- }
- return $ret;
- }
-
- /**
- * @access protected
- */
- function validateSummary()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateDescription()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateLicense()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateNotes()
- {
- return true;
- }
-
- /**
- * for package.xml 2.0 only - channels can't use package.xml 1.0
- * @access protected
- */
- function validateDependencies()
- {
- return true;
- }
-
- /**
- * for package.xml 1.0 only
- * @access private
- */
- function _validateFilelist()
- {
- return true; // placeholder for now
- }
-
- /**
- * for package.xml 2.0 only
- * @access protected
- */
- function validateMainFilelist()
- {
- return true; // placeholder for now
- }
-
- /**
- * for package.xml 2.0 only
- * @access protected
- */
- function validateReleaseFilelist()
- {
- return true; // placeholder for now
- }
-
- /**
- * @access protected
- */
- function validateChangelog()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateFilelist()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateDeps()
- {
- return true;
- }
-}
-/**
- * PEAR_XMLParser
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Parser for any xml file
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_XMLParser
-{
- /**
- * unserilialized data
- * @var string $_serializedData
- */
- var $_unserializedData = null;
-
- /**
- * name of the root tag
- * @var string $_root
- */
- var $_root = null;
-
- /**
- * stack for all data that is found
- * @var array $_dataStack
- */
- var $_dataStack = array();
-
- /**
- * stack for all values that are generated
- * @var array $_valStack
- */
- var $_valStack = array();
-
- /**
- * current tag depth
- * @var int $_depth
- */
- var $_depth = 0;
-
- /**
- * The XML encoding to use
- * @var string $encoding
- */
- var $encoding = 'ISO-8859-1';
-
- /**
- * @return array
- */
- function getData()
- {
- return $this->_unserializedData;
- }
-
- /**
- * @param string xml content
- * @return true|PEAR_Error
- */
- function parse($data)
- {
- if (!extension_loaded('xml')) {
- include_once 'PEAR.php';
- return PEAR::raiseError("XML Extension not found", 1);
- }
- $this->_dataStack = $this->_valStack = array();
- $this->_depth = 0;
-
- if (
- strpos($data, 'encoding="UTF-8"')
- || strpos($data, 'encoding="utf-8"')
- || strpos($data, "encoding='UTF-8'")
- || strpos($data, "encoding='utf-8'")
- ) {
- $this->encoding = 'UTF-8';
- }
-
- $xp = xml_parser_create($this->encoding);
- xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0);
- xml_set_object($xp, $this);
- xml_set_element_handler($xp, 'startHandler', 'endHandler');
- xml_set_character_data_handler($xp, 'cdataHandler');
- if (!xml_parse($xp, $data)) {
- $msg = xml_error_string(xml_get_error_code($xp));
- $line = xml_get_current_line_number($xp);
- xml_parser_free($xp);
- include_once 'PEAR.php';
- return PEAR::raiseError("XML Error: '$msg' on line '$line'", 2);
- }
- xml_parser_free($xp);
- return true;
- }
-
- /**
- * Start element handler for XML parser
- *
- * @access private
- * @param object $parser XML parser object
- * @param string $element XML element
- * @param array $attribs attributes of XML tag
- * @return void
- */
- function startHandler($parser, $element, $attribs)
- {
- $this->_depth++;
- $this->_dataStack[$this->_depth] = null;
-
- $val = array(
- 'name' => $element,
- 'value' => null,
- 'type' => 'string',
- 'childrenKeys' => array(),
- 'aggregKeys' => array()
- );
-
- if (count($attribs) > 0) {
- $val['children'] = array();
- $val['type'] = 'array';
- $val['children']['attribs'] = $attribs;
- }
-
- array_push($this->_valStack, $val);
- }
-
- /**
- * post-process data
- *
- * @param string $data
- * @param string $element element name
- */
- function postProcess($data, $element)
- {
- return trim($data);
- }
-
- /**
- * End element handler for XML parser
- *
- * @access private
- * @param object XML parser object
- * @param string
- * @return void
- */
- function endHandler($parser, $element)
- {
- $value = array_pop($this->_valStack);
- $data = $this->postProcess($this->_dataStack[$this->_depth], $element);
-
- // adjust type of the value
- switch (strtolower($value['type'])) {
- // unserialize an array
- case 'array':
- if ($data !== '') {
- $value['children']['_content'] = $data;
- }
-
- $value['value'] = isset($value['children']) ? $value['children'] : array();
- break;
-
- /*
- * unserialize a null value
- */
- case 'null':
- $data = null;
- break;
-
- /*
- * unserialize any scalar value
- */
- default:
- settype($data, $value['type']);
- $value['value'] = $data;
- break;
- }
-
- $parent = array_pop($this->_valStack);
- if ($parent === null) {
- $this->_unserializedData = &$value['value'];
- $this->_root = &$value['name'];
- return true;
- }
-
- // parent has to be an array
- if (!isset($parent['children']) || !is_array($parent['children'])) {
- $parent['children'] = array();
- if ($parent['type'] != 'array') {
- $parent['type'] = 'array';
- }
- }
-
- if (!empty($value['name'])) {
- // there already has been a tag with this name
- if (in_array($value['name'], $parent['childrenKeys'])) {
- // no aggregate has been created for this tag
- if (!in_array($value['name'], $parent['aggregKeys'])) {
- if (isset($parent['children'][$value['name']])) {
- $parent['children'][$value['name']] = array($parent['children'][$value['name']]);
- } else {
- $parent['children'][$value['name']] = array();
- }
- array_push($parent['aggregKeys'], $value['name']);
- }
- array_push($parent['children'][$value['name']], $value['value']);
- } else {
- $parent['children'][$value['name']] = &$value['value'];
- array_push($parent['childrenKeys'], $value['name']);
- }
- } else {
- array_push($parent['children'],$value['value']);
- }
- array_push($this->_valStack, $parent);
-
- $this->_depth--;
- }
-
- /**
- * Handler for character data
- *
- * @access private
- * @param object XML parser object
- * @param string CDATA
- * @return void
- */
- function cdataHandler($parser, $cdata)
- {
- $this->_dataStack[$this->_depth] .= $cdata;
- }
-}
-
-REM ----------------------------------------------------------------------
-REM PHP version 5
-REM ----------------------------------------------------------------------
-REM Copyright (c) 1997-2010 The Authors
-REM ----------------------------------------------------------------------
-REM http://opensource.org/licenses/bsd-license.php New BSD License
-REM ----------------------------------------------------------------------
-REM Authors: Alexander Merz (alexmerz@php.net)
-REM ----------------------------------------------------------------------
-REM
-REM Last updated 12/29/2004 ($Id$ is not replaced if the file is binary)
-
-REM change this lines to match the paths of your system
-REM -------------------
-
-
-REM Test to see if this is a raw pear.bat (uninstalled version)
-SET TMPTMPTMPTMPT=@includ
-SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@
-FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED)
-
-REM Check PEAR global ENV, set them if they do not exist
-IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@"
-IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@"
-IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@"
-
-GOTO :INSTALLED
-
-:NOTINSTALLED
-ECHO WARNING: This is a raw, uninstalled pear.bat
-
-REM Check to see if we can grab the directory of this file (Windows NT+)
-IF %~n0 == pear (
-FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" (
-SET "PHP_PEAR_PHP_BIN=%%~$PATH:x"
-echo Using PHP Executable "%PHP_PEAR_PHP_BIN%"
-"%PHP_PEAR_PHP_BIN%" -v
-GOTO :NEXTTEST
-))
-GOTO :FAILAUTODETECT
-:NEXTTEST
-IF "%PHP_PEAR_PHP_BIN%" NEQ "" (
-
-REM We can use this PHP to run a temporary php file to get the dirname of pear
-
-echo ^<?php $s=getcwd^(^);chdir^($a=dirname^(__FILE__^).'\\'^);if^(stristr^($a,'\\scripts'^)^)$a=dirname^(dirname^($a^)^).'\\';$f=fopen^($s.'\\~a.a','wb'^);echo$s.'\\~a.a';fwrite^($f,$a^);fclose^($f^);chdir^($s^);?^> > ~~getloc.php
-"%PHP_PEAR_PHP_BIN%" ~~getloc.php
-set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a
-DEL ~a.a
-DEL ~~getloc.php
-set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear"
-
-REM Make sure there is a pearcmd.php at our disposal
-
-IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php (
-IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-)
-)
-GOTO :INSTALLED
-) ELSE (
-REM Windows Me/98 cannot succeed, so allow the batch to fail
-)
-:FAILAUTODETECT
-echo WARNING: failed to auto-detect pear information
-:INSTALLED
-
-REM Check Folders and files
-IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR
-IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2
-IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR
-IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR
-
-REM launch pearcmd
-GOTO RUN
-:PEAR_INSTALL_ERROR
-ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_INSTALL_DIR%
-GOTO END
-:PEAR_INSTALL_ERROR2
-ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
-ECHO pearcmd.php could not be found there.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_INSTALL_DIR%
-GOTO END
-:PEAR_BIN_ERROR
-ECHO PHP_PEAR_BIN_DIR is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_BIN_DIR%
-GOTO END
-:PEAR_PHPBIN_ERROR
-ECHO PHP_PEAR_PHP_BIN is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_PHP_BIN%
-GOTO END
-:RUN
-"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d open_basedir="" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d register_argc_argv="On" -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
-:END
-@ECHO ON
-
-REM ----------------------------------------------------------------------
-REM PHP version 5
-REM ----------------------------------------------------------------------
-REM Copyright (c) 1997-2004 The PHP Group
-REM ----------------------------------------------------------------------
-REM This source file is subject to version 3.0 of the PHP license,
-REM that is bundled with this package in the file LICENSE, and is
-REM available at through the world-wide-web at
-REM http://www.php.net/license/3_0.txt.
-REM If you did not receive a copy of the PHP license and are unable to
-REM obtain it through the world-wide-web, please send a note to
-REM license@php.net so we can mail you a copy immediately.
-REM ----------------------------------------------------------------------
-REM Authors: Alexander Merz (alexmerz@php.net)
-REM ----------------------------------------------------------------------
-REM
-REM $Id: peardev.bat,v 1.6 2007-09-03 03:00:17 cellog Exp $
-
-REM change this lines to match the paths of your system
-REM -------------------
-
-
-REM Test to see if this is a raw pear.bat (uninstalled version)
-SET TMPTMPTMPTMPT=@includ
-SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@
-FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED)
-
-REM Check PEAR global ENV, set them if they do not exist
-IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@"
-IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@"
-IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@"
-GOTO :INSTALLED
-
-:NOTINSTALLED
-ECHO WARNING: This is a raw, uninstalled pear.bat
-
-REM Check to see if we can grab the directory of this file (Windows NT+)
-IF %~n0 == pear (
-FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" (
-SET "PHP_PEAR_PHP_BIN=%%~$PATH:x"
-echo Using PHP Executable "%PHP_PEAR_PHP_BIN%"
-"%PHP_PEAR_PHP_BIN%" -v
-GOTO :NEXTTEST
-))
-GOTO :FAILAUTODETECT
-:NEXTTEST
-IF "%PHP_PEAR_PHP_BIN%" NEQ "" (
-
-REM We can use this PHP to run a temporary php file to get the dirname of pear
-
-echo ^<?php $s=getcwd^(^);chdir^($a=dirname^(__FILE__^).'\\'^);if^(stristr^($a,'\\scripts'^)^)$a=dirname^(dirname^($a^)^).'\\';$f=fopen^($s.'\\~a.a','wb'^);echo$s.'\\~a.a';fwrite^($f,$a^);fclose^($f^);chdir^($s^);?^> > ~~getloc.php
-"%PHP_PEAR_PHP_BIN%" ~~getloc.php
-set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a
-DEL ~a.a
-DEL ~~getloc.php
-set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear"
-
-REM Make sure there is a pearcmd.php at our disposal
-
-IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php (
-IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-)
-)
-GOTO :INSTALLED
-) ELSE (
-REM Windows Me/98 cannot succeed, so allow the batch to fail
-)
-:FAILAUTODETECT
-echo WARNING: failed to auto-detect pear information
-:INSTALLED
-
-REM Check Folders and files
-IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR
-IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2
-IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR
-IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR
-REM launch pearcmd
-GOTO RUN
-:PEAR_INSTALL_ERROR
-ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_INSTALL_DIR%
-GOTO END
-:PEAR_INSTALL_ERROR2
-ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
-ECHO pearcmd.php could not be found there.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_INSTALL_DIR%
-GOTO END
-:PEAR_BIN_ERROR
-ECHO PHP_PEAR_BIN_DIR is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_BIN_DIR%
-GOTO END
-:PEAR_PHPBIN_ERROR
-ECHO PHP_PEAR_PHP_BIN is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_PHP_BIN%
-GOTO END
-:RUN
-"%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
-:END
-@ECHO ON
-
-REM ----------------------------------------------------------------------
-REM PHP version 5
-REM ----------------------------------------------------------------------
-REM Copyright (c) 1997-2004 The PHP Group
-REM ----------------------------------------------------------------------
-REM This source file is subject to version 3.0 of the PHP license,
-REM that is bundled with this package in the file LICENSE, and is
-REM available at through the world-wide-web at
-REM http://www.php.net/license/3_0.txt.
-REM If you did not receive a copy of the PHP license and are unable to
-REM obtain it through the world-wide-web, please send a note to
-REM license@php.net so we can mail you a copy immediately.
-REM ----------------------------------------------------------------------
-REM Authors: Alexander Merz (alexmerz@php.net)
-REM ----------------------------------------------------------------------
-REM
-REM Last updated 02/08/2004 ($Id$ is not replaced if the file is binary)
-
-REM change this lines to match the paths of your system
-REM -------------------
-
-
-REM Test to see if this is a raw pear.bat (uninstalled version)
-SET TMPTMPTMPTMPT=@includ
-SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@
-FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED)
-
-REM Check PEAR global ENV, set them if they do not exist
-IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@"
-IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@"
-IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@"
-GOTO :INSTALLED
-
-:NOTINSTALLED
-ECHO WARNING: This is a raw, uninstalled pear.bat
-
-REM Check to see if we can grab the directory of this file (Windows NT+)
-IF %~n0 == pear (
-FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" (
-SET "PHP_PEAR_PHP_BIN=%%~$PATH:x"
-echo Using PHP Executable "%PHP_PEAR_PHP_BIN%"
-"%PHP_PEAR_PHP_BIN%" -v
-GOTO :NEXTTEST
-))
-GOTO :FAILAUTODETECT
-:NEXTTEST
-IF "%PHP_PEAR_PHP_BIN%" NEQ "" (
-
-REM We can use this PHP to run a temporary php file to get the dirname of pear
-
-echo ^<?php $s=getcwd^(^);chdir^($a=dirname^(__FILE__^).'\\'^);if^(stristr^($a,'\\scripts'^)^)$a=dirname^(dirname^($a^)^).'\\';$f=fopen^($s.'\\~a.a','wb'^);echo$s.'\\~a.a';fwrite^($f,$a^);fclose^($f^);chdir^($s^);?^> > ~~getloc.php
-"%PHP_PEAR_PHP_BIN%" ~~getloc.php
-set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a
-DEL ~a.a
-DEL ~~getloc.php
-set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear"
-
-REM Make sure there is a pearcmd.php at our disposal
-
-IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php (
-IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php
-)
-)
-GOTO :INSTALLED
-) ELSE (
-REM Windows Me/98 cannot succeed, so allow the batch to fail
-)
-:FAILAUTODETECT
-echo WARNING: failed to auto-detect pear information
-:INSTALLED
-
-REM Check Folders and files
-IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR
-IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2
-IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR
-IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR
-REM launch pearcmd
-GOTO RUN
-:PEAR_INSTALL_ERROR
-ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_INSTALL_DIR%
-GOTO END
-:PEAR_INSTALL_ERROR2
-ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
-ECHO pearcmd.php could not be found there.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_INSTALL_DIR%
-GOTO END
-:PEAR_BIN_ERROR
-ECHO PHP_PEAR_BIN_DIR is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_BIN_DIR%
-GOTO END
-:PEAR_PHPBIN_ERROR
-ECHO PHP_PEAR_PHP_BIN is not set correctly.
-ECHO Please fix it using your environment variable or modify
-ECHO the default value in pear.bat
-ECHO The current value is:
-ECHO %PHP_PEAR_PHP_BIN%
-GOTO END
-:RUN
-"%PHP_PEAR_PHP_BIN%" -C -n -d date.timezone=UTC -d output_buffering=1 -d safe_mode=0 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -d register_argc_argv="On" -d variables_order=EGPCS -f "%PHP_PEAR_INSTALL_DIR%\peclcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
-:END
-@ECHO ON
-
-# first find which PHP binary to use
-if test "x$PHP_PEAR_PHP_BIN" != "x"; then
- PHP="$PHP_PEAR_PHP_BIN"
-else
- if test "@php_bin@" = '@'php_bin'@'; then
- PHP=php
- else
- PHP="@php_bin@"
- fi
-fi
-
-# then look for the right pear include dir
-if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
- INCDIR=$PHP_PEAR_INSTALL_DIR
- INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR"
-else
- if test "@php_dir@" = '@'php_dir'@'; then
- INCDIR=`dirname $0`
- INCARG=""
- else
- INCDIR="@php_dir@"
- INCARG="-d include_path=@php_dir@"
- fi
-fi
-
-exec $PHP -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
-
-# first find which PHP binary to use
-if test "x$PHP_PEAR_PHP_BIN" != "x"; then
- PHP="$PHP_PEAR_PHP_BIN"
-else
- if test "@php_bin@" = '@'php_bin'@'; then
- PHP=php
- else
- PHP="@php_bin@"
- fi
-fi
-
-# then look for the right pear include dir
-if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
- INCDIR=$PHP_PEAR_INSTALL_DIR
- INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR"
-else
- if test "@php_dir@" = '@'php_dir'@'; then
- INCDIR=`dirname $0`
- INCARG=""
- else
- INCDIR="@php_dir@"
- INCARG="-d include_path=@php_dir@"
- fi
-fi
-
-exec $PHP -d date.timezone=UTC -d memory_limit="-1" -C -q $INCARG -d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d variables_order=EGPCS -d auto_append_file="" $INCDIR/pearcmd.php "$@"
-
-
-# first find which PHP binary to use
-if test "x$PHP_PEAR_PHP_BIN" != "x"; then
- PHP="$PHP_PEAR_PHP_BIN"
-else
- if test "@php_bin@" = '@'php_bin'@'; then
- PHP=php
- else
- PHP="@php_bin@"
- fi
-fi
-
-# then look for the right pear include dir
-if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
- INCDIR=$PHP_PEAR_INSTALL_DIR
- INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR"
-else
- if test "@php_dir@" = '@'php_dir'@'; then
- INCDIR=`dirname $0`
- INCARG=""
- else
- INCDIR="@php_dir@"
- INCARG="-d include_path=@php_dir@"
- fi
-fi
-
-exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
-
-/**
- * PEAR, the PHP Extension and Application Repository
- *
- * Command line interface
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- */
-
-@ob_end_clean();
-if (!defined('PEAR_RUNTYPE')) {
- // this is defined in peclcmd.php as 'pecl'
- define('PEAR_RUNTYPE', 'pear');
-}
-define('PEAR_IGNORE_BACKTRACE', 1);
-/**
- * @nodep Gtk
- */
-//the space is needed for windows include paths with trailing backslash
-// http://pear.php.net/bugs/bug.php?id=19482
-if ('@include_path@ ' != '@'.'include_path'.'@ ') {
- ini_set('include_path', trim('@include_path@ '). PATH_SEPARATOR . get_include_path());
- $raw = false;
-} else {
- // this is a raw, uninstalled pear, either a cvs checkout, or php distro
- $raw = true;
-}
-@ini_set('allow_url_fopen', true);
-@set_time_limit(0);
-ob_implicit_flush(true);
-@ini_set('track_errors', true);
-@ini_set('html_errors', false);
-$_PEAR_PHPDIR = '#$%^&*';
-set_error_handler('error_handler');
-
-$pear_package_version = "@pear_version@";
-
-require_once 'PEAR.php';
-require_once 'PEAR/Frontend.php';
-require_once 'PEAR/Config.php';
-require_once 'PEAR/Command.php';
-require_once 'Console/Getopt.php';
-
-
-PEAR_Command::setFrontendType('CLI');
-$all_commands = PEAR_Command::getCommands();
-
-// remove this next part when we stop supporting that crap-ass PHP 4.2
-if (!isset($_SERVER['argv']) && !isset($argv) && !isset($HTTP_SERVER_VARS['argv'])) {
- echo 'ERROR: either use the CLI php executable, ' .
- 'or set register_argc_argv=On in php.ini';
- exit(1);
-}
-
-$argv = Console_Getopt::readPHPArgv();
-// fix CGI sapi oddity - the -- in pear.bat/pear is not removed
-if (php_sapi_name() != 'cli' && isset($argv[1]) && $argv[1] == '--') {
- unset($argv[1]);
- $argv = array_values($argv);
-}
-$progname = PEAR_RUNTYPE;
-array_shift($argv);
-$options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV");
-if (PEAR::isError($options)) {
- usage($options);
-}
-
-$opts = $options[0];
-
-$fetype = 'CLI';
-if ($progname == 'gpear' || $progname == 'pear-gtk') {
- $fetype = 'Gtk2';
-} else {
- foreach ($opts as $opt) {
- if ($opt[0] == 'G') {
- $fetype = 'Gtk2';
- }
- }
-}
-
-$pear_user_config = '';
-$pear_system_config = '';
-$store_user_config = false;
-$store_system_config = false;
-$verbose = 1;
-
-foreach ($opts as $opt) {
- switch ($opt[0]) {
- case 'c':
- $pear_user_config = $opt[1];
- break;
- case 'C':
- $pear_system_config = $opt[1];
- break;
- }
-}
-
-PEAR_Command::setFrontendType($fetype);
-$ui = &PEAR_Command::getFrontendObject();
-$config = &PEAR_Config::singleton($pear_user_config, $pear_system_config);
-
-if (PEAR::isError($config)) {
- $_file = '';
- if ($pear_user_config !== false) {
- $_file .= $pear_user_config;
- }
- if ($pear_system_config !== false) {
- $_file .= '/' . $pear_system_config;
- }
- if ($_file == '/') {
- $_file = 'The default config file';
- }
- $config->getMessage();
- $ui->outputData("ERROR: $_file is not a valid config file or is corrupted.");
- // We stop, we have no idea where we are :)
- exit(1);
-}
-
-// this is used in the error handler to retrieve a relative path
-$_PEAR_PHPDIR = $config->get('php_dir');
-$ui->setConfig($config);
-PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError"));
-
-$verbose = $config->get("verbose");
-$cmdopts = array();
-
-if ($raw) {
- if (!$config->isDefinedLayer('user') && !$config->isDefinedLayer('system')) {
- $found = false;
- foreach ($opts as $opt) {
- if ($opt[0] == 'd' || $opt[0] == 'D') {
- // the user knows what they are doing, and are setting config values
- $found = true;
- }
- }
- if (!$found) {
- // no prior runs, try to install PEAR
- $parent = dirname(__FILE__);
- if (strpos($parent, 'scripts')) {
- $grandparent = dirname($parent);
- $packagexml = $grandparent . DIRECTORY_SEPARATOR . 'package2.xml';
- $pearbase = $grandparent;
- } else {
- $packagexml = $parent . DIRECTORY_SEPARATOR . 'package2.xml';
- $pearbase = $parent;
- }
- if (file_exists($packagexml)) {
- $options[1] = array(
- 'install',
- $packagexml
- );
- $config->set('php_dir', $pearbase . DIRECTORY_SEPARATOR . 'php');
- $config->set('data_dir', $pearbase . DIRECTORY_SEPARATOR . 'data');
- $config->set('doc_dir', $pearbase . DIRECTORY_SEPARATOR . 'docs');
- $config->set('test_dir', $pearbase . DIRECTORY_SEPARATOR . 'tests');
- $config->set(
- 'ext_dir',
- $pearbase . DIRECTORY_SEPARATOR . 'extensions'
- );
- $config->set('bin_dir', $pearbase);
- $config->mergeConfigFile($pearbase . 'pear.ini', false);
- $config->store();
- $config->set('auto_discover', 1);
- }
- }
- }
-}
-foreach ($opts as $opt) {
- $param = !empty($opt[1]) ? $opt[1] : true;
- switch ($opt[0]) {
- case 'd':
- if ($param === true) {
- die(
- 'Invalid usage of "-d" option, expected -d config_value=value, ' .
- 'received "-d"' . "\n"
- );
- }
- $possible = explode('=', $param);
- if (count($possible) != 2) {
- die(
- 'Invalid usage of "-d" option, expected ' .
- '-d config_value=value, received "' . $param . '"' . "\n"
- );
- }
- list($key, $value) = explode('=', $param);
- $config->set($key, $value, 'user');
- break;
- case 'D':
- if ($param === true) {
- die(
- 'Invalid usage of "-d" option, expected ' .
- '-d config_value=value, received "-d"' . "\n"
- );
- }
- $possible = explode('=', $param);
- if (count($possible) != 2) {
- die(
- 'Invalid usage of "-d" option, expected ' .
- '-d config_value=value, received "' . $param . '"' . "\n"
- );
- }
- list($key, $value) = explode('=', $param);
- $config->set($key, $value, 'system');
- break;
- case 's':
- $store_user_config = true;
- break;
- case 'S':
- $store_system_config = true;
- break;
- case 'u':
- $config->remove($param, 'user');
- break;
- case 'v':
- $config->set('verbose', $config->get('verbose') + 1);
- break;
- case 'q':
- $config->set('verbose', $config->get('verbose') - 1);
- break;
- case 'V':
- usage(null, 'version');
- case 'c':
- case 'C':
- break;
- default:
- // all non pear params goes to the command
- $cmdopts[$opt[0]] = $param;
- break;
- }
-}
-
-if ($store_system_config) {
- $config->store('system');
-}
-
-if ($store_user_config) {
- $config->store('user');
-}
-
-$command = (isset($options[1][0])) ? $options[1][0] : null;
-if (empty($command) && ($store_user_config || $store_system_config)) {
- exit;
-}
-
-if ($fetype == 'Gtk2') {
- if (!$config->validConfiguration()) {
- PEAR::raiseError(
- "CRITICAL ERROR: no existing valid configuration files found in " .
- "files '$pear_user_config' or '$pear_system_config', " .
- "please copy an existing configuration file to one of these " .
- "locations, or use the -c and -s options to create one"
- );
- }
- Gtk::main();
-} else {
- do {
- if ($command == 'help') {
- usage(null, @$options[1][1]);
- }
-
- if (!$config->validConfiguration()) {
- PEAR::raiseError(
- "CRITICAL ERROR: no existing valid configuration files found " .
- "in files '$pear_user_config' or '$pear_system_config', " .
- "please copy an existing configuration file to one of " .
- "these locations, or use the -c and -s options to create one"
- );
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $cmd = PEAR_Command::factory($command, $config);
- PEAR::popErrorHandling();
- if (PEAR::isError($cmd)) {
- usage(null, @$options[1][0]);
- }
-
- $short_args = $long_args = null;
- PEAR_Command::getGetoptArgs($command, $short_args, $long_args);
- array_shift($options[1]);
- $tmp = Console_Getopt::getopt2($options[1], $short_args, $long_args);
-
- if (PEAR::isError($tmp)) {
- break;
- }
-
- list($tmpopt, $params) = $tmp;
- $opts = array();
- foreach ($tmpopt as $foo => $tmp2) {
- list($opt, $value) = $tmp2;
- if ($value === null) {
- $value = true; // options without args
- }
-
- if (strlen($opt) == 1) {
- $cmdoptions = $cmd->getOptions($command);
- foreach ($cmdoptions as $o => $d) {
- if (isset($d['shortopt']) && $d['shortopt'] == $opt) {
- $opts[$o] = $value;
- }
- }
- } else {
- if (substr($opt, 0, 2) == '--') {
- $opts[substr($opt, 2)] = $value;
- }
- }
- }
-
- $ok = $cmd->run($command, $opts, $params);
- if ($ok === false) {
- PEAR::raiseError("unknown command `$command'");
- }
-
- if (PEAR::isError($ok)) {
- PEAR::setErrorHandling(
- PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")
- );
- PEAR::raiseError($ok);
- }
- } while (false);
-}
-
-// {{{ usage()
-
-/**
- * Display usage information
- *
- * @param mixed $error Optional error message
- * @param mixed $helpsubject Optional subject/command to display help for
- *
- * @return void
- */
-function usage($error = null, $helpsubject = null)
-{
- global $progname, $all_commands;
- $stdout = fopen('php://stdout', 'w');
- if (PEAR::isError($error)) {
- fputs($stdout, $error->getMessage() . "\n");
- } elseif ($error !== null) {
- fputs($stdout, "$error\n");
- }
-
- if ($helpsubject != null) {
- $put = cmdHelp($helpsubject);
- } else {
- $put = "Commands:\n";
- $maxlen = max(array_map("strlen", $all_commands));
- $formatstr = "%-{$maxlen}s %s\n";
- ksort($all_commands);
- foreach ($all_commands as $cmd => $class) {
- $put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd));
- }
- $put .=
- "Usage: $progname [options] command [command-options] <parameters>\n".
- "Type \"$progname help options\" to list all options.\n".
- "Type \"$progname help shortcuts\" to list all command shortcuts.\n".
- "Type \"$progname help version\" or ".
- "\"$progname version\" to list version information.\n".
- "Type \"$progname help <command>\" to get the help ".
- "for the specified command.";
- }
- fputs($stdout, "$put\n");
- fclose($stdout);
-
- if ($error === null) {
- exit(0);
- }
- exit(1);
-}
-
-/**
- * Return help string for specified command
- *
- * @param string $command Command to return help for
- *
- * @return void
- */
-function cmdHelp($command)
-{
- global $progname, $all_commands, $config;
- if ($command == "options") {
- return
- "Options:\n".
- " -v increase verbosity level (default 1)\n".
- " -q be quiet, decrease verbosity level\n".
- " -c file find user configuration in `file'\n".
- " -C file find system configuration in `file'\n".
- " -d foo=bar set user config variable `foo' to `bar'\n".
- " -D foo=bar set system config variable `foo' to `bar'\n".
- " -G start in graphical (Gtk) mode\n".
- " -s store user configuration\n".
- " -S store system configuration\n".
- " -u foo unset `foo' in the user configuration\n".
- " -h, -? display help/usage (this message)\n".
- " -V version information\n";
- } elseif ($command == "shortcuts") {
- $sc = PEAR_Command::getShortcuts();
- $ret = "Shortcuts:\n";
- foreach ($sc as $s => $c) {
- $ret .= sprintf(" %-8s %s\n", $s, $c);
- }
- return $ret;
-
- } elseif ($command == "version") {
- return "PEAR Version: ".$GLOBALS['pear_package_version'].
- "\nPHP Version: ".phpversion().
- "\nZend Engine Version: ".zend_version().
- "\nRunning on: ".php_uname();
-
- } elseif ($help = PEAR_Command::getHelp($command)) {
- if (is_string($help)) {
- return "$progname $command [options] $help\n";
- }
-
- if ($help[1] === null) {
- return "$progname $command $help[0]";
- }
-
- return "$progname $command [options] $help[0]\n$help[1]";
- }
-
- return "Command '$command' is not valid, try '$progname help'";
-}
-
-// }}}
-
-/**
- * error_handler
- *
- * @param mixed $errno Error number
- * @param mixed $errmsg Message
- * @param mixed $file Filename
- * @param mixed $line Line number
- * @param mixed $vars Variables
- *
- * @access public
- * @return boolean
- */
-function error_handler($errno, $errmsg, $file, $line, $vars)
-{
- if ($errno & E_STRICT
- || $errno & E_DEPRECATED
- || !error_reporting()
- ) {
- if ($errno & E_STRICT) {
- return; // E_STRICT
- }
- if ($errno & E_DEPRECATED) {
- return; // E_DEPRECATED
- }
- if (isset($GLOBALS['config']) && $GLOBALS['config']->get('verbose') < 4) {
- return false; // @silenced error, show all if debug is high enough
- }
- }
- $errortype = array (
- E_DEPRECATED => 'Deprecated Warning',
- E_ERROR => "Error",
- E_WARNING => "Warning",
- E_PARSE => "Parsing Error",
- E_STRICT => 'Strict Warning',
- E_NOTICE => "Notice",
- E_CORE_ERROR => "Core Error",
- E_CORE_WARNING => "Core Warning",
- E_COMPILE_ERROR => "Compile Error",
- E_COMPILE_WARNING => "Compile Warning",
- E_USER_ERROR => "User Error",
- E_USER_WARNING => "User Warning",
- E_USER_NOTICE => "User Notice"
- );
- $prefix = $errortype[$errno];
- global $_PEAR_PHPDIR;
- if (stristr($file, $_PEAR_PHPDIR)) {
- $file = substr($file, strlen($_PEAR_PHPDIR) + 1);
- } else {
- $file = basename($file);
- }
- print "\n$prefix: $errmsg in $file on line $line\n";
- return false;
-}
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * mode: php
- * End:
- */
-// vim600:syn=php
-
-/**
- * PEAR, the PHP Extension and Application Repository
- *
- * Command line interface
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- */
-
-/**
- * @nodep Gtk
- */
-//the space is needed for windows include paths with trailing backslash
-// http://pear.php.net/bugs/bug.php?id=19482
-if ('@include_path@ ' != '@'.'include_path'.'@ ') {
- ini_set('include_path', trim('@include_path@ '). PATH_SEPARATOR . get_include_path());
- $raw = false;
-} else {
- // this is a raw, uninstalled pear, either a cvs checkout, or php distro
- $raw = true;
-}
-define('PEAR_RUNTYPE', 'pecl');
-require_once 'pearcmd.php';
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * mode: php
- * End:
- */
-// vim600:syn=php
-
-?>
-
- Stig Bakken <ssb@php.net>,
- Gregory Beaver <cellog@php.net>,
- Helgi Þormar Þorbjörnsson <helgi@php.net>,
- Tomas V.V.Cox <cox@idecnet.com>,
- Martin Jansen <mj@php.net>.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=========================
-Installing the PEAR Installer.
-
-You should install PEAR on a local development machine first. Installing
-PEAR on a remote production machine should only be done after you are
-familiar with PEAR and have tested code using PEAR on your development
-machine.
-
-There are two methods of installing PEAR
- - PEAR bundled in PHP
- - go-pear
-
-We will first examine how to install PEAR that is bundled with PHP.
-
-Microsoft Windows
-=================
-If you are running PHP 5.2.0 or newer, simply download and
-run the windows installer (.msi) and PEAR can be automatically
-installed.
-
-Otherwise, for older PHP versions, download the .zip of windows,
-there is a script included with your PHP distribution that is called
-"go-pear". You must open a command box in order to run it. Click
-"start" then click "Run..." and type "cmd.exe" to open a command box.
-Use "cd" to change directory to the location of PHP where you unzipped it,
-and run the go-pear command.
-
-Unix
-====
-When compiling PHP from source, you simply need to include the
---with-pear directive on the "./configure" command. This is "on"
-by default in most PHP versions, but it doesn't hurt to list it
-explicitly. You should also consider enabling the zlib extension via
---enable-zlib, so that the PEAR installer will be able to handle gzipped
-files (i.e. smaller package files for faster downloads). Later, when you
-run "make install" to install PHP itself, part of the process will be
-prompts that ask you where you want PEAR to be installed.
-
-go-pear
-=======
-For users who cannot perform the above steps, or who wish to obtain the
-latest PEAR with a slightly higher risk of failure, use go-pear. go-pear
-is obtained by downloading http://pear.php.net/go-pear and saving it as go-pear.php.
-After downloading, simply run "php go-pear.php" or open it in a web browser
-(windows only) to download and install PEAR.
-
-You can always ask general installation questions on pear-general@lists.php.net,
-a public mailing list devoted to support for PEAR packages and installation-
-related issues.
-
-Happy PHPing, we hope PEAR will be a great tool for your development work!
-
- $Id: package.dtd,v 1.38 2005-11-12 02:23:07 cellog Exp $
-
- This is the PEAR package description, version 1.0.
- It should be used with the informal public identifier:
-
- "-//PHP Group//DTD PEAR Package 1.0//EN//XML"
-
- Copyright (c) 1997-2005 The PHP Group
-
- This source file is subject to version 3.00 of the PHP license,
- that is bundled with this package in the file LICENSE, and is
- available at through the world-wide-web at
- http://www.php.net/license/3_0.txt.
- If you did not receive a copy of the PHP license and are unable to
- obtain it through the world-wide-web, please send a note to
- license@php.net so we can mail you a copy immediately.
-
- Authors:
- Stig S. Bakken <ssb@fast.no>
- Gregory Beaver <cellog@php.net>
-
- -->
-<!ENTITY % NUMBER "CDATA">
-<!ELEMENT package (name,summary,description,license?,maintainers,release,changelog?)>
-<!ATTLIST package type (source|binary|empty) "empty"
- version CDATA #REQUIRED
- packagerversion CDATA #IMPLIED>
-
-<!ELEMENT name (#PCDATA)>
-
-<!ELEMENT summary (#PCDATA)>
-
-<!ELEMENT license (#PCDATA)>
-
-<!ELEMENT description (#PCDATA)>
-
-<!ELEMENT maintainers (maintainer)+>
-
-<!ELEMENT maintainer (user|role|name|email)+>
-
-<!ELEMENT user (#PCDATA)>
-
-<!ELEMENT role (#PCDATA)>
-
-<!ELEMENT email (#PCDATA)>
-
-<!ELEMENT changelog (release)+>
-
-<!ELEMENT release (version,date,license,state,notes,warnings?,provides*,deps?,configureoptions?,filelist?)>
-
-<!ELEMENT version (#PCDATA)>
-
-<!ELEMENT date (#PCDATA)>
-
-<!ELEMENT state (#PCDATA)>
-
-<!ELEMENT notes (#PCDATA)>
-
-<!ELEMENT warnings (#PCDATA)>
-
-<!ELEMENT deps (dep*)>
-
-<!ELEMENT dep (#PCDATA)>
-<!ATTLIST dep type (pkg|ext|php) #REQUIRED
- rel (has|eq|lt|le|gt|ge) #IMPLIED
- version CDATA #IMPLIED
- optional (yes|no) 'no'>
-
-<!ELEMENT configureoptions (configureoption)+>
-
-<!ELEMENT configureoption EMPTY>
-<!ATTLIST configureoption name CDATA #REQUIRED
- default CDATA #IMPLIED
- prompt CDATA #REQUIRED>
-
-<!ELEMENT provides EMPTY>
-<!ATTLIST provides type (ext|prog|class|function|feature|api) #REQUIRED
- name CDATA #REQUIRED
- extends CDATA #IMPLIED>
-<!ELEMENT filelist (dir|file)+>
-
-<!ELEMENT dir (dir|file)+>
-<!ATTLIST dir name CDATA #REQUIRED
- role (php|ext|src|test|doc|data|script) 'php'
- baseinstalldir CDATA #IMPLIED>
-
-<!ELEMENT file (replace*)>
-<!ATTLIST file role (php|ext|src|test|doc|data|script) 'php'
- debug (na|on|off) 'na'
- format CDATA #IMPLIED
- baseinstalldir CDATA #IMPLIED
- platform CDATA #IMPLIED
- md5sum CDATA #IMPLIED
- name CDATA #REQUIRED
- install-as CDATA #IMPLIED>
-
-<!ELEMENT replace EMPTY>
-<!ATTLIST replace type (php-const|pear-config|package-info) #REQUIRED
- from CDATA #REQUIRED
- to CDATA #REQUIRED>
-
-
-
-/**
- * PEAR, the PHP Extension and Application Repository
- *
- * PEAR class and PEAR_Error class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Sterling Hughes <sterling@php.net>
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2010 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**#@+
- * ERROR constants
- */
-define('PEAR_ERROR_RETURN', 1);
-define('PEAR_ERROR_PRINT', 2);
-define('PEAR_ERROR_TRIGGER', 4);
-define('PEAR_ERROR_DIE', 8);
-define('PEAR_ERROR_CALLBACK', 16);
-/**
- * WARNING: obsolete
- * @deprecated
- */
-define('PEAR_ERROR_EXCEPTION', 32);
-/**#@-*/
-
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- define('OS_WINDOWS', true);
- define('OS_UNIX', false);
- define('PEAR_OS', 'Windows');
-} else {
- define('OS_WINDOWS', false);
- define('OS_UNIX', true);
- define('PEAR_OS', 'Unix'); // blatant assumption
-}
-
-$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
-$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
-$GLOBALS['_PEAR_destructor_object_list'] = array();
-$GLOBALS['_PEAR_shutdown_funcs'] = array();
-$GLOBALS['_PEAR_error_handler_stack'] = array();
-
-@ini_set('track_errors', true);
-
-/**
- * Base class for other PEAR classes. Provides rudimentary
- * emulation of destructors.
- *
- * If you want a destructor in your class, inherit PEAR and make a
- * destructor method called _yourclassname (same name as the
- * constructor, but with a "_" prefix). Also, in your constructor you
- * have to call the PEAR constructor: $this->PEAR();.
- * The destructor method will be called without parameters. Note that
- * at in some SAPI implementations (such as Apache), any output during
- * the request shutdown (in which destructors are called) seems to be
- * discarded. If you need to get any debug information from your
- * destructor, use error_log(), syslog() or something similar.
- *
- * IMPORTANT! To use the emulated destructors you need to create the
- * objects by reference: $obj =& new PEAR_child;
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @see PEAR_Error
- * @since Class available since PHP 4.0.2
- * @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear
- */
-class PEAR
-{
- /**
- * Whether to enable internal debug messages.
- *
- * @var bool
- * @access private
- */
- var $_debug = false;
-
- /**
- * Default error mode for this object.
- *
- * @var int
- * @access private
- */
- var $_default_error_mode = null;
-
- /**
- * Default error options used for this object when error mode
- * is PEAR_ERROR_TRIGGER.
- *
- * @var int
- * @access private
- */
- var $_default_error_options = null;
-
- /**
- * Default error handler (callback) for this object, if error mode is
- * PEAR_ERROR_CALLBACK.
- *
- * @var string
- * @access private
- */
- var $_default_error_handler = '';
-
- /**
- * Which class to use for error objects.
- *
- * @var string
- * @access private
- */
- var $_error_class = 'PEAR_Error';
-
- /**
- * An array of expected errors.
- *
- * @var array
- * @access private
- */
- var $_expected_errors = array();
-
- /**
- * Constructor. Registers this object in
- * $_PEAR_destructor_object_list for destructor emulation if a
- * destructor object exists.
- *
- * @param string $error_class (optional) which class to use for
- * error objects, defaults to PEAR_Error.
- * @access public
- * @return void
- */
- function __construct($error_class = null)
- {
- $classname = strtolower(get_class($this));
- if ($this->_debug) {
- print "PEAR constructor called, class=$classname\n";
- }
-
- if ($error_class !== null) {
- $this->_error_class = $error_class;
- }
-
- while ($classname && strcasecmp($classname, "pear")) {
- $destructor = "_$classname";
- if (method_exists($this, $destructor)) {
- global $_PEAR_destructor_object_list;
- $_PEAR_destructor_object_list[] = &$this;
- if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
- register_shutdown_function("_PEAR_call_destructors");
- $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
- }
- break;
- } else {
- $classname = get_parent_class($classname);
- }
- }
- }
-
- /**
- * Only here for backwards compatibility.
- * E.g. Archive_Tar calls $this->PEAR() in its constructor.
- *
- * @param string $error_class Which class to use for error objects,
- * defaults to PEAR_Error.
- */
- public function PEAR($error_class = null)
- {
- $this->__construct($error_class);
- }
-
- /**
- * Destructor (the emulated type of...). Does nothing right now,
- * but is included for forward compatibility, so subclass
- * destructors should always call it.
- *
- * See the note in the class desciption about output from
- * destructors.
- *
- * @access public
- * @return void
- */
- function _PEAR() {
- if ($this->_debug) {
- printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
- }
- }
-
- /**
- * If you have a class that's mostly/entirely static, and you need static
- * properties, you can use this method to simulate them. Eg. in your method(s)
- * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar');
- * You MUST use a reference, or they will not persist!
- *
- * @access public
- * @param string $class The calling classname, to prevent clashes
- * @param string $var The variable to retrieve.
- * @return mixed A reference to the variable. If not set it will be
- * auto initialised to NULL.
- */
- static function &getStaticProperty($class, $var)
- {
- static $properties;
- if (!isset($properties[$class])) {
- $properties[$class] = array();
- }
-
- if (!array_key_exists($var, $properties[$class])) {
- $properties[$class][$var] = null;
- }
-
- return $properties[$class][$var];
- }
-
- /**
- * Use this function to register a shutdown method for static
- * classes.
- *
- * @access public
- * @param mixed $func The function name (or array of class/method) to call
- * @param mixed $args The arguments to pass to the function
- * @return void
- */
- function registerShutdownFunc($func, $args = array())
- {
- // if we are called statically, there is a potential
- // that no shutdown func is registered. Bug #6445
- if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
- register_shutdown_function("_PEAR_call_destructors");
- $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
- }
- $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
- }
-
- /**
- * Tell whether a value is a PEAR error.
- *
- * @param mixed $data the value to test
- * @param int $code if $data is an error object, return true
- * only if $code is a string and
- * $obj->getMessage() == $code or
- * $code is an integer and $obj->getCode() == $code
- * @access public
- * @return bool true if parameter is an error
- */
- function isError($data, $code = null)
- {
- if (!is_a($data, 'PEAR_Error')) {
- return false;
- }
-
- if (is_null($code)) {
- return true;
- } elseif (is_string($code)) {
- return $data->getMessage() == $code;
- }
-
- return $data->getCode() == $code;
- }
-
- /**
- * Sets how errors generated by this object should be handled.
- * Can be invoked both in objects and statically. If called
- * statically, setErrorHandling sets the default behaviour for all
- * PEAR objects. If called in an object, setErrorHandling sets
- * the default behaviour for that object.
- *
- * @param int $mode
- * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
- * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
- * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION.
- *
- * @param mixed $options
- * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one
- * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
- *
- * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected
- * to be the callback function or method. A callback
- * function is a string with the name of the function, a
- * callback method is an array of two elements: the element
- * at index 0 is the object, and the element at index 1 is
- * the name of the method to call in the object.
- *
- * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is
- * a printf format string used when printing the error
- * message.
- *
- * @access public
- * @return void
- * @see PEAR_ERROR_RETURN
- * @see PEAR_ERROR_PRINT
- * @see PEAR_ERROR_TRIGGER
- * @see PEAR_ERROR_DIE
- * @see PEAR_ERROR_CALLBACK
- * @see PEAR_ERROR_EXCEPTION
- *
- * @since PHP 4.0.5
- */
- function setErrorHandling($mode = null, $options = null)
- {
- if (isset($this) && is_a($this, 'PEAR')) {
- $setmode = &$this->_default_error_mode;
- $setoptions = &$this->_default_error_options;
- } else {
- $setmode = &$GLOBALS['_PEAR_default_error_mode'];
- $setoptions = &$GLOBALS['_PEAR_default_error_options'];
- }
-
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $setmode = $mode;
- $setoptions = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $setmode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $setoptions = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- }
-
- /**
- * This method is used to tell which errors you expect to get.
- * Expected errors are always returned with error mode
- * PEAR_ERROR_RETURN. Expected error codes are stored in a stack,
- * and this method pushes a new element onto it. The list of
- * expected errors are in effect until they are popped off the
- * stack with the popExpect() method.
- *
- * Note that this method can not be called statically
- *
- * @param mixed $code a single error code or an array of error codes to expect
- *
- * @return int the new depth of the "expected errors" stack
- * @access public
- */
- function expectError($code = '*')
- {
- if (is_array($code)) {
- array_push($this->_expected_errors, $code);
- } else {
- array_push($this->_expected_errors, array($code));
- }
- return count($this->_expected_errors);
- }
-
- /**
- * This method pops one element off the expected error codes
- * stack.
- *
- * @return array the list of error codes that were popped
- */
- function popExpect()
- {
- return array_pop($this->_expected_errors);
- }
-
- /**
- * This method checks unsets an error code if available
- *
- * @param mixed error code
- * @return bool true if the error code was unset, false otherwise
- * @access private
- * @since PHP 4.3.0
- */
- function _checkDelExpect($error_code)
- {
- $deleted = false;
- foreach ($this->_expected_errors as $key => $error_array) {
- if (in_array($error_code, $error_array)) {
- unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
- $deleted = true;
- }
-
- // clean up empty arrays
- if (0 == count($this->_expected_errors[$key])) {
- unset($this->_expected_errors[$key]);
- }
- }
-
- return $deleted;
- }
-
- /**
- * This method deletes all occurences of the specified element from
- * the expected error codes stack.
- *
- * @param mixed $error_code error code that should be deleted
- * @return mixed list of error codes that were deleted or error
- * @access public
- * @since PHP 4.3.0
- */
- function delExpect($error_code)
- {
- $deleted = false;
- if ((is_array($error_code) && (0 != count($error_code)))) {
- // $error_code is a non-empty array here; we walk through it trying
- // to unset all values
- foreach ($error_code as $key => $error) {
- $deleted = $this->_checkDelExpect($error) ? true : false;
- }
-
- return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
- } elseif (!empty($error_code)) {
- // $error_code comes alone, trying to unset it
- if ($this->_checkDelExpect($error_code)) {
- return true;
- }
-
- return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
- }
-
- // $error_code is empty
- return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
- }
-
- /**
- * This method is a wrapper that returns an instance of the
- * configured error class with this object's default error
- * handling applied. If the $mode and $options parameters are not
- * specified, the object's defaults are used.
- *
- * @param mixed $message a text error message or a PEAR error object
- *
- * @param int $code a numeric error code (it is up to your class
- * to define these if you want to use codes)
- *
- * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
- * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
- * PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION.
- *
- * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter
- * specifies the PHP-internal error level (one of
- * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
- * If $mode is PEAR_ERROR_CALLBACK, this
- * parameter specifies the callback function or
- * method. In other error modes this parameter
- * is ignored.
- *
- * @param string $userinfo If you need to pass along for example debug
- * information, this parameter is meant for that.
- *
- * @param string $error_class The returned error object will be
- * instantiated from this class, if specified.
- *
- * @param bool $skipmsg If true, raiseError will only pass error codes,
- * the error message parameter will be dropped.
- *
- * @access public
- * @return object a PEAR error object
- * @see PEAR::setErrorHandling
- * @since PHP 4.0.5
- */
- function &raiseError($message = null,
- $code = null,
- $mode = null,
- $options = null,
- $userinfo = null,
- $error_class = null,
- $skipmsg = false)
- {
- // The error is yet a PEAR error object
- if (is_object($message)) {
- $code = $message->getCode();
- $userinfo = $message->getUserInfo();
- $error_class = $message->getType();
- $message->error_message_prefix = '';
- $message = $message->getMessage();
- }
-
- if (
- isset($this) &&
- isset($this->_expected_errors) &&
- count($this->_expected_errors) > 0 &&
- count($exp = end($this->_expected_errors))
- ) {
- if ($exp[0] == "*" ||
- (is_int(reset($exp)) && in_array($code, $exp)) ||
- (is_string(reset($exp)) && in_array($message, $exp))
- ) {
- $mode = PEAR_ERROR_RETURN;
- }
- }
-
- // No mode given, try global ones
- if ($mode === null) {
- // Class error handler
- if (isset($this) && isset($this->_default_error_mode)) {
- $mode = $this->_default_error_mode;
- $options = $this->_default_error_options;
- // Global error handler
- } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) {
- $mode = $GLOBALS['_PEAR_default_error_mode'];
- $options = $GLOBALS['_PEAR_default_error_options'];
- }
- }
-
- if ($error_class !== null) {
- $ec = $error_class;
- } elseif (isset($this) && isset($this->_error_class)) {
- $ec = $this->_error_class;
- } else {
- $ec = 'PEAR_Error';
- }
-
- if ($skipmsg) {
- $a = new $ec($code, $mode, $options, $userinfo);
- } else {
- $a = new $ec($message, $code, $mode, $options, $userinfo);
- }
-
- return $a;
- }
-
- /**
- * Simpler form of raiseError with fewer options. In most cases
- * message, code and userinfo are enough.
- *
- * @param mixed $message a text error message or a PEAR error object
- *
- * @param int $code a numeric error code (it is up to your class
- * to define these if you want to use codes)
- *
- * @param string $userinfo If you need to pass along for example debug
- * information, this parameter is meant for that.
- *
- * @access public
- * @return object a PEAR error object
- * @see PEAR::raiseError
- */
- function &throwError($message = null, $code = null, $userinfo = null)
- {
- if (isset($this) && is_a($this, 'PEAR')) {
- $a = &$this->raiseError($message, $code, null, null, $userinfo);
- return $a;
- }
-
- $a = &PEAR::raiseError($message, $code, null, null, $userinfo);
- return $a;
- }
-
- function staticPushErrorHandling($mode, $options = null)
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
- $def_options = &$GLOBALS['_PEAR_default_error_options'];
- $stack[] = array($def_mode, $def_options);
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $def_mode = $mode;
- $def_options = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $def_mode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $def_options = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- $stack[] = array($mode, $options);
- return true;
- }
-
- function staticPopErrorHandling()
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- $setmode = &$GLOBALS['_PEAR_default_error_mode'];
- $setoptions = &$GLOBALS['_PEAR_default_error_options'];
- array_pop($stack);
- list($mode, $options) = $stack[sizeof($stack) - 1];
- array_pop($stack);
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $setmode = $mode;
- $setoptions = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $setmode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $setoptions = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- return true;
- }
-
- /**
- * Push a new error handler on top of the error handler options stack. With this
- * you can easily override the actual error handler for some code and restore
- * it later with popErrorHandling.
- *
- * @param mixed $mode (same as setErrorHandling)
- * @param mixed $options (same as setErrorHandling)
- *
- * @return bool Always true
- *
- * @see PEAR::setErrorHandling
- */
- function pushErrorHandling($mode, $options = null)
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- if (isset($this) && is_a($this, 'PEAR')) {
- $def_mode = &$this->_default_error_mode;
- $def_options = &$this->_default_error_options;
- } else {
- $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
- $def_options = &$GLOBALS['_PEAR_default_error_options'];
- }
- $stack[] = array($def_mode, $def_options);
-
- if (isset($this) && is_a($this, 'PEAR')) {
- $this->setErrorHandling($mode, $options);
- } else {
- PEAR::setErrorHandling($mode, $options);
- }
- $stack[] = array($mode, $options);
- return true;
- }
-
- /**
- * Pop the last error handler used
- *
- * @return bool Always true
- *
- * @see PEAR::pushErrorHandling
- */
- function popErrorHandling()
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- array_pop($stack);
- list($mode, $options) = $stack[sizeof($stack) - 1];
- array_pop($stack);
- if (isset($this) && is_a($this, 'PEAR')) {
- $this->setErrorHandling($mode, $options);
- } else {
- PEAR::setErrorHandling($mode, $options);
- }
- return true;
- }
-
- /**
- * OS independent PHP extension load. Remember to take care
- * on the correct extension name for case sensitive OSes.
- *
- * @param string $ext The extension name
- * @return bool Success or not on the dl() call
- */
- function loadExtension($ext)
- {
- if (extension_loaded($ext)) {
- return true;
- }
-
- // if either returns true dl() will produce a FATAL error, stop that
- if (
- function_exists('dl') === false ||
- ini_get('enable_dl') != 1
- ) {
- return false;
- }
-
- if (OS_WINDOWS) {
- $suffix = '.dll';
- } elseif (PHP_OS == 'HP-UX') {
- $suffix = '.sl';
- } elseif (PHP_OS == 'AIX') {
- $suffix = '.a';
- } elseif (PHP_OS == 'OSX') {
- $suffix = '.bundle';
- } else {
- $suffix = '.so';
- }
-
- return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
- }
-}
-
-function _PEAR_call_destructors()
-{
- global $_PEAR_destructor_object_list;
- if (is_array($_PEAR_destructor_object_list) &&
- sizeof($_PEAR_destructor_object_list))
- {
- reset($_PEAR_destructor_object_list);
-
- $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
-
- if ($destructLifoExists) {
- $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
- }
-
- while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
- $classname = get_class($objref);
- while ($classname) {
- $destructor = "_$classname";
- if (method_exists($objref, $destructor)) {
- $objref->$destructor();
- break;
- } else {
- $classname = get_parent_class($classname);
- }
- }
- }
- // Empty the object list to ensure that destructors are
- // not called more than once.
- $_PEAR_destructor_object_list = array();
- }
-
- // Now call the shutdown functions
- if (
- isset($GLOBALS['_PEAR_shutdown_funcs']) &&
- is_array($GLOBALS['_PEAR_shutdown_funcs']) &&
- !empty($GLOBALS['_PEAR_shutdown_funcs'])
- ) {
- foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) {
- call_user_func_array($value[0], $value[1]);
- }
- }
-}
-
-/**
- * Standard PEAR error class for PHP 4
- *
- * This class is supserseded by {@link PEAR_Exception} in PHP 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/manual/en/core.pear.pear-error.php
- * @see PEAR::raiseError(), PEAR::throwError()
- * @since Class available since PHP 4.0.2
- */
-class PEAR_Error
-{
- var $error_message_prefix = '';
- var $mode = PEAR_ERROR_RETURN;
- var $level = E_USER_NOTICE;
- var $code = -1;
- var $message = '';
- var $userinfo = '';
- var $backtrace = null;
-
- /**
- * PEAR_Error constructor
- *
- * @param string $message message
- *
- * @param int $code (optional) error code
- *
- * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
- * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER,
- * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION
- *
- * @param mixed $options (optional) error level, _OR_ in the case of
- * PEAR_ERROR_CALLBACK, the callback function or object/method
- * tuple.
- *
- * @param string $userinfo (optional) additional user/debug info
- *
- * @access public
- *
- */
- function __construct($message = 'unknown error', $code = null,
- $mode = null, $options = null, $userinfo = null)
- {
- if ($mode === null) {
- $mode = PEAR_ERROR_RETURN;
- }
- $this->message = $message;
- $this->code = $code;
- $this->mode = $mode;
- $this->userinfo = $userinfo;
-
- $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
-
- if (!$skiptrace) {
- $this->backtrace = debug_backtrace();
- if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) {
- unset($this->backtrace[0]['object']);
- }
- }
-
- if ($mode & PEAR_ERROR_CALLBACK) {
- $this->level = E_USER_NOTICE;
- $this->callback = $options;
- } else {
- if ($options === null) {
- $options = E_USER_NOTICE;
- }
-
- $this->level = $options;
- $this->callback = null;
- }
-
- if ($this->mode & PEAR_ERROR_PRINT) {
- if (is_null($options) || is_int($options)) {
- $format = "%s";
- } else {
- $format = $options;
- }
-
- printf($format, $this->getMessage());
- }
-
- if ($this->mode & PEAR_ERROR_TRIGGER) {
- trigger_error($this->getMessage(), $this->level);
- }
-
- if ($this->mode & PEAR_ERROR_DIE) {
- $msg = $this->getMessage();
- if (is_null($options) || is_int($options)) {
- $format = "%s";
- if (substr($msg, -1) != "\n") {
- $msg .= "\n";
- }
- } else {
- $format = $options;
- }
- die(sprintf($format, $msg));
- }
-
- if ($this->mode & PEAR_ERROR_CALLBACK && is_callable($this->callback)) {
- call_user_func($this->callback, $this);
- }
-
- if ($this->mode & PEAR_ERROR_EXCEPTION) {
- trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING);
- eval('$e = new Exception($this->message, $this->code);throw($e);');
- }
- }
-
- /**
- * Get the error mode from an error object.
- *
- * @return int error mode
- * @access public
- */
- function getMode()
- {
- return $this->mode;
- }
-
- /**
- * Get the callback function/method from an error object.
- *
- * @return mixed callback function or object/method array
- * @access public
- */
- function getCallback()
- {
- return $this->callback;
- }
-
- /**
- * Get the error message from an error object.
- *
- * @return string full error message
- * @access public
- */
- function getMessage()
- {
- return ($this->error_message_prefix . $this->message);
- }
-
- /**
- * Get error code from an error object
- *
- * @return int error code
- * @access public
- */
- function getCode()
- {
- return $this->code;
- }
-
- /**
- * Get the name of this error/exception.
- *
- * @return string error/exception name (type)
- * @access public
- */
- function getType()
- {
- return get_class($this);
- }
-
- /**
- * Get additional user-supplied information.
- *
- * @return string user-supplied information
- * @access public
- */
- function getUserInfo()
- {
- return $this->userinfo;
- }
-
- /**
- * Get additional debug information supplied by the application.
- *
- * @return string debug information
- * @access public
- */
- function getDebugInfo()
- {
- return $this->getUserInfo();
- }
-
- /**
- * Get the call backtrace from where the error was generated.
- * Supported with PHP 4.3.0 or newer.
- *
- * @param int $frame (optional) what frame to fetch
- * @return array Backtrace, or NULL if not available.
- * @access public
- */
- function getBacktrace($frame = null)
- {
- if (defined('PEAR_IGNORE_BACKTRACE')) {
- return null;
- }
- if ($frame === null) {
- return $this->backtrace;
- }
- return $this->backtrace[$frame];
- }
-
- function addUserInfo($info)
- {
- if (empty($this->userinfo)) {
- $this->userinfo = $info;
- } else {
- $this->userinfo .= " ** $info";
- }
- }
-
- function __toString()
- {
- return $this->getMessage();
- }
-
- /**
- * Make a string representation of this object.
- *
- * @return string a string with an object summary
- * @access public
- */
- function toString()
- {
- $modes = array();
- $levels = array(E_USER_NOTICE => 'notice',
- E_USER_WARNING => 'warning',
- E_USER_ERROR => 'error');
- if ($this->mode & PEAR_ERROR_CALLBACK) {
- if (is_array($this->callback)) {
- $callback = (is_object($this->callback[0]) ?
- strtolower(get_class($this->callback[0])) :
- $this->callback[0]) . '::' .
- $this->callback[1];
- } else {
- $callback = $this->callback;
- }
- return sprintf('[%s: message="%s" code=%d mode=callback '.
- 'callback=%s prefix="%s" info="%s"]',
- strtolower(get_class($this)), $this->message, $this->code,
- $callback, $this->error_message_prefix,
- $this->userinfo);
- }
- if ($this->mode & PEAR_ERROR_PRINT) {
- $modes[] = 'print';
- }
- if ($this->mode & PEAR_ERROR_TRIGGER) {
- $modes[] = 'trigger';
- }
- if ($this->mode & PEAR_ERROR_DIE) {
- $modes[] = 'die';
- }
- if ($this->mode & PEAR_ERROR_RETURN) {
- $modes[] = 'return';
- }
- return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
- 'prefix="%s" info="%s"]',
- strtolower(get_class($this)), $this->message, $this->code,
- implode("|", $modes), $levels[$this->level],
- $this->error_message_prefix,
- $this->userinfo);
- }
-}
-
-/*
- * Local Variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- */
-
-=========================
-
-What is the PEAR Installer? What is PEAR?
-------------------------------------------
-PEAR is the PHP Extension and Application Repository, found at
-http://pear.php.net.
-
-The **PEAR Installer** is this software, which contains executable
-files and PHP code that is used to **download and install** PEAR code
-from pear.php.net.
-
-PEAR contains useful **software libraries and applications** such as
-MDB2 (database abstraction), HTML_QuickForm (HTML forms management),
-PhpDocumentor (auto-documentation generator), DB_DataObject
-(Data Access Abstraction), and many hundreds more.
-Browse all available packages at http://pear.php.net, the list is
-constantly growing and updating to reflect improvements in the PHP language.
-
-.. warning::
- Do not run PEAR without installing it - if you downloaded this
- tarball manually, you MUST install it. Read the instructions in INSTALL
- prior to use.
-
-
-Documentation
--------------
-Documentation for PEAR can be found at http://pear.php.net/manual/.
-Installation documentation can be found in the INSTALL file included
-in this tarball.
-
-
-Tests
------
-Run the tests without installation as follows::
-
- $ ./scripts/pear.sh run-tests -r tests
-
-You should have the ``Text_Diff`` package installed to get nicer error output.
-
-Happy PHPing, we hope PEAR will be a great tool for your development work!
-
-/**
- * File/Directory manipulation
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package System
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'PEAR.php';
-require_once 'Console/Getopt.php';
-
-$GLOBALS['_System_temp_files'] = array();
-
-/**
-* System offers cross plattform compatible system functions
-*
-* Static functions for different operations. Should work under
-* Unix and Windows. The names and usage has been taken from its respectively
-* GNU commands. The functions will return (bool) false on error and will
-* trigger the error with the PHP trigger_error() function (you can silence
-* the error by prefixing a '@' sign after the function call, but this
-* is not recommended practice. Instead use an error handler with
-* {@link set_error_handler()}).
-*
-* Documentation on this class you can find in:
-* http://pear.php.net/manual/
-*
-* Example usage:
-* if (!@System::rm('-r file1 dir1')) {
-* print "could not delete file1 or dir1";
-* }
-*
-* In case you need to to pass file names with spaces,
-* pass the params as an array:
-*
-* System::rm(array('-r', $file1, $dir1));
-*
-* @category pear
-* @package System
-* @author Tomas V.V. Cox <cox@idecnet.com>
-* @copyright 1997-2006 The PHP Group
-* @license http://opensource.org/licenses/bsd-license.php New BSD License
-* @version Release: 1.9.5
-* @link http://pear.php.net/package/PEAR
-* @since Class available since Release 0.1
-* @static
-*/
-class System
-{
- /**
- * returns the commandline arguments of a function
- *
- * @param string $argv the commandline
- * @param string $short_options the allowed option short-tags
- * @param string $long_options the allowed option long-tags
- * @return array the given options and there values
- * @static
- * @access private
- */
- function _parseArgs($argv, $short_options, $long_options = null)
- {
- if (!is_array($argv) && $argv !== null) {
- /*
- // Quote all items that are a short option
- $av = preg_split('/(\A| )--?[a-z0-9]+[ =]?((?<!\\\\)((,\s*)|((?<!,)\s+))?)/i', $argv, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
- $offset = 0;
- foreach ($av as $a) {
- $b = trim($a[0]);
- if ($b{0} == '"' || $b{0} == "'") {
- continue;
- }
-
- $escape = escapeshellarg($b);
- $pos = $a[1] + $offset;
- $argv = substr_replace($argv, $escape, $pos, strlen($b));
- $offset += 2;
- }
- */
-
- // Find all items, quoted or otherwise
- preg_match_all("/(?:[\"'])(.*?)(?:['\"])|([^\s]+)/", $argv, $av);
- $argv = $av[1];
- foreach ($av[2] as $k => $a) {
- if (empty($a)) {
- continue;
- }
- $argv[$k] = trim($a) ;
- }
- }
-
- return Console_Getopt::getopt2($argv, $short_options, $long_options);
- }
-
- /**
- * Output errors with PHP trigger_error(). You can silence the errors
- * with prefixing a "@" sign to the function call: @System::mkdir(..);
- *
- * @param mixed $error a PEAR error or a string with the error message
- * @return bool false
- * @static
- * @access private
- */
- function raiseError($error)
- {
- if (PEAR::isError($error)) {
- $error = $error->getMessage();
- }
- trigger_error($error, E_USER_WARNING);
- return false;
- }
-
- /**
- * Creates a nested array representing the structure of a directory
- *
- * System::_dirToStruct('dir1', 0) =>
- * Array
- * (
- * [dirs] => Array
- * (
- * [0] => dir1
- * )
- *
- * [files] => Array
- * (
- * [0] => dir1/file2
- * [1] => dir1/file3
- * )
- * )
- * @param string $sPath Name of the directory
- * @param integer $maxinst max. deep of the lookup
- * @param integer $aktinst starting deep of the lookup
- * @param bool $silent if true, do not emit errors.
- * @return array the structure of the dir
- * @static
- * @access private
- */
- function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
- {
- $struct = array('dirs' => array(), 'files' => array());
- if (($dir = @opendir($sPath)) === false) {
- if (!$silent) {
- System::raiseError("Could not open dir $sPath");
- }
- return $struct; // XXX could not open error
- }
-
- $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ?
- $list = array();
- while (false !== ($file = readdir($dir))) {
- if ($file != '.' && $file != '..') {
- $list[] = $file;
- }
- }
-
- closedir($dir);
- natsort($list);
- if ($aktinst < $maxinst || $maxinst == 0) {
- foreach ($list as $val) {
- $path = $sPath . DIRECTORY_SEPARATOR . $val;
- if (is_dir($path) && !is_link($path)) {
- $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent);
- $struct = array_merge_recursive($struct, $tmp);
- } else {
- $struct['files'][] = $path;
- }
- }
- }
-
- return $struct;
- }
-
- /**
- * Creates a nested array representing the structure of a directory and files
- *
- * @param array $files Array listing files and dirs
- * @return array
- * @static
- * @see System::_dirToStruct()
- */
- function _multipleToStruct($files)
- {
- $struct = array('dirs' => array(), 'files' => array());
- settype($files, 'array');
- foreach ($files as $file) {
- if (is_dir($file) && !is_link($file)) {
- $tmp = System::_dirToStruct($file, 0);
- $struct = array_merge_recursive($tmp, $struct);
- } else {
- if (!in_array($file, $struct['files'])) {
- $struct['files'][] = $file;
- }
- }
- }
- return $struct;
- }
-
- /**
- * The rm command for removing files.
- * Supports multiple files and dirs and also recursive deletes
- *
- * @param string $args the arguments for rm
- * @return mixed PEAR_Error or true for success
- * @static
- * @access public
- */
- function rm($args)
- {
- $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'r') {
- $do_recursive = true;
- }
- }
- $ret = true;
- if (isset($do_recursive)) {
- $struct = System::_multipleToStruct($opts[1]);
- foreach ($struct['files'] as $file) {
- if (!@unlink($file)) {
- $ret = false;
- }
- }
-
- rsort($struct['dirs']);
- foreach ($struct['dirs'] as $dir) {
- if (!@rmdir($dir)) {
- $ret = false;
- }
- }
- } else {
- foreach ($opts[1] as $file) {
- $delete = (is_dir($file)) ? 'rmdir' : 'unlink';
- if (!@$delete($file)) {
- $ret = false;
- }
- }
- }
- return $ret;
- }
-
- /**
- * Make directories.
- *
- * The -p option will create parent directories
- * @param string $args the name of the director(y|ies) to create
- * @return bool True for success
- * @static
- * @access public
- */
- function mkDir($args)
- {
- $opts = System::_parseArgs($args, 'pm:');
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
-
- $mode = 0777; // default mode
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'p') {
- $create_parents = true;
- } elseif ($opt[0] == 'm') {
- // if the mode is clearly an octal number (starts with 0)
- // convert it to decimal
- if (strlen($opt[1]) && $opt[1]{0} == '0') {
- $opt[1] = octdec($opt[1]);
- } else {
- // convert to int
- $opt[1] += 0;
- }
- $mode = $opt[1];
- }
- }
-
- $ret = true;
- if (isset($create_parents)) {
- foreach ($opts[1] as $dir) {
- $dirstack = array();
- while ((!file_exists($dir) || !is_dir($dir)) &&
- $dir != DIRECTORY_SEPARATOR) {
- array_unshift($dirstack, $dir);
- $dir = dirname($dir);
- }
-
- while ($newdir = array_shift($dirstack)) {
- if (!is_writeable(dirname($newdir))) {
- $ret = false;
- break;
- }
-
- if (!mkdir($newdir, $mode)) {
- $ret = false;
- }
- }
- }
- } else {
- foreach($opts[1] as $dir) {
- if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) {
- $ret = false;
- }
- }
- }
-
- return $ret;
- }
-
- /**
- * Concatenate files
- *
- * Usage:
- * 1) $var = System::cat('sample.txt test.txt');
- * 2) System::cat('sample.txt test.txt > final.txt');
- * 3) System::cat('sample.txt test.txt >> final.txt');
- *
- * Note: as the class use fopen, urls should work also (test that)
- *
- * @param string $args the arguments
- * @return boolean true on success
- * @static
- * @access public
- */
- function &cat($args)
- {
- $ret = null;
- $files = array();
- if (!is_array($args)) {
- $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
- }
-
- $count_args = count($args);
- for ($i = 0; $i < $count_args; $i++) {
- if ($args[$i] == '>') {
- $mode = 'wb';
- $outputfile = $args[$i+1];
- break;
- } elseif ($args[$i] == '>>') {
- $mode = 'ab+';
- $outputfile = $args[$i+1];
- break;
- } else {
- $files[] = $args[$i];
- }
- }
- $outputfd = false;
- if (isset($mode)) {
- if (!$outputfd = fopen($outputfile, $mode)) {
- $err = System::raiseError("Could not open $outputfile");
- return $err;
- }
- $ret = true;
- }
- foreach ($files as $file) {
- if (!$fd = fopen($file, 'r')) {
- System::raiseError("Could not open $file");
- continue;
- }
- while ($cont = fread($fd, 2048)) {
- if (is_resource($outputfd)) {
- fwrite($outputfd, $cont);
- } else {
- $ret .= $cont;
- }
- }
- fclose($fd);
- }
- if (is_resource($outputfd)) {
- fclose($outputfd);
- }
- return $ret;
- }
-
- /**
- * Creates temporary files or directories. This function will remove
- * the created files when the scripts finish its execution.
- *
- * Usage:
- * 1) $tempfile = System::mktemp("prefix");
- * 2) $tempdir = System::mktemp("-d prefix");
- * 3) $tempfile = System::mktemp();
- * 4) $tempfile = System::mktemp("-t /var/tmp prefix");
- *
- * prefix -> The string that will be prepended to the temp name
- * (defaults to "tmp").
- * -d -> A temporary dir will be created instead of a file.
- * -t -> The target dir where the temporary (file|dir) will be created. If
- * this param is missing by default the env vars TMP on Windows or
- * TMPDIR in Unix will be used. If these vars are also missing
- * c:\windows\temp or /tmp will be used.
- *
- * @param string $args The arguments
- * @return mixed the full path of the created (file|dir) or false
- * @see System::tmpdir()
- * @static
- * @access public
- */
- function mktemp($args = null)
- {
- static $first_time = true;
- $opts = System::_parseArgs($args, 't:d');
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
-
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'd') {
- $tmp_is_dir = true;
- } elseif ($opt[0] == 't') {
- $tmpdir = $opt[1];
- }
- }
-
- $prefix = (isset($opts[1][0])) ? $opts[1][0] : 'tmp';
- if (!isset($tmpdir)) {
- $tmpdir = System::tmpdir();
- }
-
- if (!System::mkDir(array('-p', $tmpdir))) {
- return false;
- }
-
- $tmp = tempnam($tmpdir, $prefix);
- if (isset($tmp_is_dir)) {
- unlink($tmp); // be careful possible race condition here
- if (!mkdir($tmp, 0700)) {
- return System::raiseError("Unable to create temporary directory $tmpdir");
- }
- }
-
- $GLOBALS['_System_temp_files'][] = $tmp;
- if (isset($tmp_is_dir)) {
- //$GLOBALS['_System_temp_files'][] = dirname($tmp);
- }
-
- if ($first_time) {
- PEAR::registerShutdownFunc(array('System', '_removeTmpFiles'));
- $first_time = false;
- }
-
- return $tmp;
- }
-
- /**
- * Remove temporary files created my mkTemp. This function is executed
- * at script shutdown time
- *
- * @static
- * @access private
- */
- function _removeTmpFiles()
- {
- if (count($GLOBALS['_System_temp_files'])) {
- $delete = $GLOBALS['_System_temp_files'];
- array_unshift($delete, '-r');
- System::rm($delete);
- $GLOBALS['_System_temp_files'] = array();
- }
- }
-
- /**
- * Get the path of the temporal directory set in the system
- * by looking in its environments variables.
- * Note: php.ini-recommended removes the "E" from the variables_order setting,
- * making unavaible the $_ENV array, that s why we do tests with _ENV
- *
- * @static
- * @return string The temporary directory on the system
- */
- function tmpdir()
- {
- if (OS_WINDOWS) {
- if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) {
- return $var;
- }
- if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP')) {
- return $var;
- }
- if ($var = isset($_ENV['USERPROFILE']) ? $_ENV['USERPROFILE'] : getenv('USERPROFILE')) {
- return $var;
- }
- if ($var = isset($_ENV['windir']) ? $_ENV['windir'] : getenv('windir')) {
- return $var;
- }
- return getenv('SystemRoot') . '\temp';
- }
- if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) {
- return $var;
- }
- return realpath('/tmp');
- }
-
- /**
- * The "which" command (show the full path of a command)
- *
- * @param string $program The command to search for
- * @param mixed $fallback Value to return if $program is not found
- *
- * @return mixed A string with the full path or false if not found
- * @static
- * @author Stig Bakken <ssb@php.net>
- */
- function which($program, $fallback = false)
- {
- // enforce API
- if (!is_string($program) || '' == $program) {
- return $fallback;
- }
-
- // full path given
- if (basename($program) != $program) {
- $path_elements[] = dirname($program);
- $program = basename($program);
- } else {
- $path = getenv('PATH');
- if (!$path) {
- $path = getenv('Path'); // some OSes are just stupid enough to do this
- }
-
- $path_elements = explode(PATH_SEPARATOR, $path);
- }
-
- if (OS_WINDOWS) {
- $exe_suffixes = getenv('PATHEXT')
- ? explode(PATH_SEPARATOR, getenv('PATHEXT'))
- : array('.exe','.bat','.cmd','.com');
- // allow passing a command.exe param
- if (strpos($program, '.') !== false) {
- array_unshift($exe_suffixes, '');
- }
- } else {
- $exe_suffixes = array('');
- }
-
- foreach ($exe_suffixes as $suff) {
- foreach ($path_elements as $dir) {
- $file = $dir . DIRECTORY_SEPARATOR . $program . $suff;
- if (is_executable($file)) {
- return $file;
- }
- }
- }
- return $fallback;
- }
-
- /**
- * The "find" command
- *
- * Usage:
- *
- * System::find($dir);
- * System::find("$dir -type d");
- * System::find("$dir -type f");
- * System::find("$dir -name *.php");
- * System::find("$dir -name *.php -name *.htm*");
- * System::find("$dir -maxdepth 1");
- *
- * Params implmented:
- * $dir -> Start the search at this directory
- * -type d -> return only directories
- * -type f -> return only files
- * -maxdepth <n> -> max depth of recursion
- * -name <pattern> -> search pattern (bash style). Multiple -name param allowed
- *
- * @param mixed Either array or string with the command line
- * @return array Array of found files
- * @static
- *
- */
- function find($args)
- {
- if (!is_array($args)) {
- $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
- }
- $dir = realpath(array_shift($args));
- if (!$dir) {
- return array();
- }
- $patterns = array();
- $depth = 0;
- $do_files = $do_dirs = true;
- $args_count = count($args);
- for ($i = 0; $i < $args_count; $i++) {
- switch ($args[$i]) {
- case '-type':
- if (in_array($args[$i+1], array('d', 'f'))) {
- if ($args[$i+1] == 'd') {
- $do_files = false;
- } else {
- $do_dirs = false;
- }
- }
- $i++;
- break;
- case '-name':
- $name = preg_quote($args[$i+1], '#');
- // our magic characters ? and * have just been escaped,
- // so now we change the escaped versions to PCRE operators
- $name = strtr($name, array('\?' => '.', '\*' => '.*'));
- $patterns[] = '('.$name.')';
- $i++;
- break;
- case '-maxdepth':
- $depth = $args[$i+1];
- break;
- }
- }
- $path = System::_dirToStruct($dir, $depth, 0, true);
- if ($do_files && $do_dirs) {
- $files = array_merge($path['files'], $path['dirs']);
- } elseif ($do_dirs) {
- $files = $path['dirs'];
- } else {
- $files = $path['files'];
- }
- if (count($patterns)) {
- $dsq = preg_quote(DIRECTORY_SEPARATOR, '#');
- $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#';
- $ret = array();
- $files_count = count($files);
- for ($i = 0; $i < $files_count; $i++) {
- // only search in the part of the file below the current directory
- $filepart = basename($files[$i]);
- if (preg_match($pattern, $filepart)) {
- $ret[] = $files[$i];
- }
- }
- return $ret;
- }
- return $files;
- }
-}
-Name: @rpm_package@
-Version: @version@
-Release: 1
-License: @release_license@
-Group: Development/Libraries
-Source: http://@master_server@/get/@package@-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-root
-URL: http://@master_server@/package/@package@
-Prefix: %{_prefix}
-BuildArchitectures: @arch@
-@extra_headers@
-
-%description
-@description@
-
-%prep
-rm -rf %{buildroot}/*
-%setup -c -T
-# XXX Source files location is missing here in pear cmd
-pear -v -c %{buildroot}/pearrc \
- -d php_dir=%{_libdir}/php/pear \
- -d doc_dir=/docs \
- -d bin_dir=%{_bindir} \
- -d data_dir=%{_libdir}/php/pear/data \
- -d test_dir=%{_libdir}/php/pear/tests \
- -d ext_dir=%{_libdir} \@extra_config@
- -s
-
-%build
-echo BuildRoot=%{buildroot}
-
-%postun
-# if refcount = 0 then package has been removed (not upgraded)
-if [ "$1" -eq "0" ]; then
- pear uninstall --nodeps -r @possible_channel@@package@
- rm @rpm_xml_dir@/@package@.xml
-fi
-
-
-%post
-# if refcount = 2 then package has been upgraded
-if [ "$1" -ge "2" ]; then
- pear upgrade --nodeps -r @rpm_xml_dir@/@package@.xml
-else
- pear install --nodeps -r @rpm_xml_dir@/@package@.xml
-fi
-
-%install
-pear -c %{buildroot}/pearrc install --nodeps -R %{buildroot} \
- $RPM_SOURCE_DIR/@package@-%{version}.tgz
-rm %{buildroot}/pearrc
-rm %{buildroot}/%{_libdir}/php/pear/.filemap
-rm %{buildroot}/%{_libdir}/php/pear/.lock
-rm -rf %{buildroot}/%{_libdir}/php/pear/.registry
-if [ "@doc_files@" != "" ]; then
- mv %{buildroot}/docs/@package@/* .
- rm -rf %{buildroot}/docs
-fi
-mkdir -p %{buildroot}@rpm_xml_dir@
-tar -xzf $RPM_SOURCE_DIR/@package@-%{version}.tgz package@package2xml@.xml
-cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
-
-#rm -rf %{buildroot}/*
-#pear -q install -R %{buildroot} -n package@package2xml@.xml
-#mkdir -p %{buildroot}@rpm_xml_dir@
-#cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
-
-%files
- %defattr(-,root,root)
- %doc @doc_files@
- /
-
-/**
- * PEAR, the PHP Extension and Application Repository
- *
- * PEAR class and PEAR_Error class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Sterling Hughes <sterling@php.net>
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2010 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**#@+
- * ERROR constants
- */
-define('PEAR_ERROR_RETURN', 1);
-define('PEAR_ERROR_PRINT', 2);
-define('PEAR_ERROR_TRIGGER', 4);
-define('PEAR_ERROR_DIE', 8);
-define('PEAR_ERROR_CALLBACK', 16);
-/**
- * WARNING: obsolete
- * @deprecated
- */
-define('PEAR_ERROR_EXCEPTION', 32);
-/**#@-*/
-
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- define('OS_WINDOWS', true);
- define('OS_UNIX', false);
- define('PEAR_OS', 'Windows');
-} else {
- define('OS_WINDOWS', false);
- define('OS_UNIX', true);
- define('PEAR_OS', 'Unix'); // blatant assumption
-}
-
-$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
-$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
-$GLOBALS['_PEAR_destructor_object_list'] = array();
-$GLOBALS['_PEAR_shutdown_funcs'] = array();
-$GLOBALS['_PEAR_error_handler_stack'] = array();
-
-@ini_set('track_errors', true);
-
-/**
- * Base class for other PEAR classes. Provides rudimentary
- * emulation of destructors.
- *
- * If you want a destructor in your class, inherit PEAR and make a
- * destructor method called _yourclassname (same name as the
- * constructor, but with a "_" prefix). Also, in your constructor you
- * have to call the PEAR constructor: $this->PEAR();.
- * The destructor method will be called without parameters. Note that
- * at in some SAPI implementations (such as Apache), any output during
- * the request shutdown (in which destructors are called) seems to be
- * discarded. If you need to get any debug information from your
- * destructor, use error_log(), syslog() or something similar.
- *
- * IMPORTANT! To use the emulated destructors you need to create the
- * objects by reference: $obj =& new PEAR_child;
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @see PEAR_Error
- * @since Class available since PHP 4.0.2
- * @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear
- */
-class PEAR
-{
- /**
- * Whether to enable internal debug messages.
- *
- * @var bool
- * @access private
- */
- var $_debug = false;
-
- /**
- * Default error mode for this object.
- *
- * @var int
- * @access private
- */
- var $_default_error_mode = null;
-
- /**
- * Default error options used for this object when error mode
- * is PEAR_ERROR_TRIGGER.
- *
- * @var int
- * @access private
- */
- var $_default_error_options = null;
-
- /**
- * Default error handler (callback) for this object, if error mode is
- * PEAR_ERROR_CALLBACK.
- *
- * @var string
- * @access private
- */
- var $_default_error_handler = '';
-
- /**
- * Which class to use for error objects.
- *
- * @var string
- * @access private
- */
- var $_error_class = 'PEAR_Error';
-
- /**
- * An array of expected errors.
- *
- * @var array
- * @access private
- */
- var $_expected_errors = array();
-
- /**
- * Constructor. Registers this object in
- * $_PEAR_destructor_object_list for destructor emulation if a
- * destructor object exists.
- *
- * @param string $error_class (optional) which class to use for
- * error objects, defaults to PEAR_Error.
- * @access public
- * @return void
- */
- function __construct($error_class = null)
- {
- $classname = strtolower(get_class($this));
- if ($this->_debug) {
- print "PEAR constructor called, class=$classname\n";
- }
-
- if ($error_class !== null) {
- $this->_error_class = $error_class;
- }
-
- while ($classname && strcasecmp($classname, "pear")) {
- $destructor = "_$classname";
- if (method_exists($this, $destructor)) {
- global $_PEAR_destructor_object_list;
- $_PEAR_destructor_object_list[] = &$this;
- if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
- register_shutdown_function("_PEAR_call_destructors");
- $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
- }
- break;
- } else {
- $classname = get_parent_class($classname);
- }
- }
- }
-
- /**
- * Only here for backwards compatibility.
- * E.g. Archive_Tar calls $this->PEAR() in its constructor.
- *
- * @param string $error_class Which class to use for error objects,
- * defaults to PEAR_Error.
- */
- public function PEAR($error_class = null)
- {
- $this->__construct($error_class);
- }
-
- /**
- * Destructor (the emulated type of...). Does nothing right now,
- * but is included for forward compatibility, so subclass
- * destructors should always call it.
- *
- * See the note in the class desciption about output from
- * destructors.
- *
- * @access public
- * @return void
- */
- function _PEAR() {
- if ($this->_debug) {
- printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
- }
- }
-
- /**
- * If you have a class that's mostly/entirely static, and you need static
- * properties, you can use this method to simulate them. Eg. in your method(s)
- * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar');
- * You MUST use a reference, or they will not persist!
- *
- * @access public
- * @param string $class The calling classname, to prevent clashes
- * @param string $var The variable to retrieve.
- * @return mixed A reference to the variable. If not set it will be
- * auto initialised to NULL.
- */
- static function &getStaticProperty($class, $var)
- {
- static $properties;
- if (!isset($properties[$class])) {
- $properties[$class] = array();
- }
-
- if (!array_key_exists($var, $properties[$class])) {
- $properties[$class][$var] = null;
- }
-
- return $properties[$class][$var];
- }
-
- /**
- * Use this function to register a shutdown method for static
- * classes.
- *
- * @access public
- * @param mixed $func The function name (or array of class/method) to call
- * @param mixed $args The arguments to pass to the function
- * @return void
- */
- function registerShutdownFunc($func, $args = array())
- {
- // if we are called statically, there is a potential
- // that no shutdown func is registered. Bug #6445
- if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
- register_shutdown_function("_PEAR_call_destructors");
- $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
- }
- $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
- }
-
- /**
- * Tell whether a value is a PEAR error.
- *
- * @param mixed $data the value to test
- * @param int $code if $data is an error object, return true
- * only if $code is a string and
- * $obj->getMessage() == $code or
- * $code is an integer and $obj->getCode() == $code
- * @access public
- * @return bool true if parameter is an error
- */
- function isError($data, $code = null)
- {
- if (!is_a($data, 'PEAR_Error')) {
- return false;
- }
-
- if (is_null($code)) {
- return true;
- } elseif (is_string($code)) {
- return $data->getMessage() == $code;
- }
-
- return $data->getCode() == $code;
- }
-
- /**
- * Sets how errors generated by this object should be handled.
- * Can be invoked both in objects and statically. If called
- * statically, setErrorHandling sets the default behaviour for all
- * PEAR objects. If called in an object, setErrorHandling sets
- * the default behaviour for that object.
- *
- * @param int $mode
- * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
- * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
- * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION.
- *
- * @param mixed $options
- * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one
- * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
- *
- * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected
- * to be the callback function or method. A callback
- * function is a string with the name of the function, a
- * callback method is an array of two elements: the element
- * at index 0 is the object, and the element at index 1 is
- * the name of the method to call in the object.
- *
- * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is
- * a printf format string used when printing the error
- * message.
- *
- * @access public
- * @return void
- * @see PEAR_ERROR_RETURN
- * @see PEAR_ERROR_PRINT
- * @see PEAR_ERROR_TRIGGER
- * @see PEAR_ERROR_DIE
- * @see PEAR_ERROR_CALLBACK
- * @see PEAR_ERROR_EXCEPTION
- *
- * @since PHP 4.0.5
- */
- function setErrorHandling($mode = null, $options = null)
- {
- if (isset($this) && is_a($this, 'PEAR')) {
- $setmode = &$this->_default_error_mode;
- $setoptions = &$this->_default_error_options;
- } else {
- $setmode = &$GLOBALS['_PEAR_default_error_mode'];
- $setoptions = &$GLOBALS['_PEAR_default_error_options'];
- }
-
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $setmode = $mode;
- $setoptions = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $setmode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $setoptions = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- }
-
- /**
- * This method is used to tell which errors you expect to get.
- * Expected errors are always returned with error mode
- * PEAR_ERROR_RETURN. Expected error codes are stored in a stack,
- * and this method pushes a new element onto it. The list of
- * expected errors are in effect until they are popped off the
- * stack with the popExpect() method.
- *
- * Note that this method can not be called statically
- *
- * @param mixed $code a single error code or an array of error codes to expect
- *
- * @return int the new depth of the "expected errors" stack
- * @access public
- */
- function expectError($code = '*')
- {
- if (is_array($code)) {
- array_push($this->_expected_errors, $code);
- } else {
- array_push($this->_expected_errors, array($code));
- }
- return count($this->_expected_errors);
- }
-
- /**
- * This method pops one element off the expected error codes
- * stack.
- *
- * @return array the list of error codes that were popped
- */
- function popExpect()
- {
- return array_pop($this->_expected_errors);
- }
-
- /**
- * This method checks unsets an error code if available
- *
- * @param mixed error code
- * @return bool true if the error code was unset, false otherwise
- * @access private
- * @since PHP 4.3.0
- */
- function _checkDelExpect($error_code)
- {
- $deleted = false;
- foreach ($this->_expected_errors as $key => $error_array) {
- if (in_array($error_code, $error_array)) {
- unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
- $deleted = true;
- }
-
- // clean up empty arrays
- if (0 == count($this->_expected_errors[$key])) {
- unset($this->_expected_errors[$key]);
- }
- }
-
- return $deleted;
- }
-
- /**
- * This method deletes all occurences of the specified element from
- * the expected error codes stack.
- *
- * @param mixed $error_code error code that should be deleted
- * @return mixed list of error codes that were deleted or error
- * @access public
- * @since PHP 4.3.0
- */
- function delExpect($error_code)
- {
- $deleted = false;
- if ((is_array($error_code) && (0 != count($error_code)))) {
- // $error_code is a non-empty array here; we walk through it trying
- // to unset all values
- foreach ($error_code as $key => $error) {
- $deleted = $this->_checkDelExpect($error) ? true : false;
- }
-
- return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
- } elseif (!empty($error_code)) {
- // $error_code comes alone, trying to unset it
- if ($this->_checkDelExpect($error_code)) {
- return true;
- }
-
- return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
- }
-
- // $error_code is empty
- return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
- }
-
- /**
- * This method is a wrapper that returns an instance of the
- * configured error class with this object's default error
- * handling applied. If the $mode and $options parameters are not
- * specified, the object's defaults are used.
- *
- * @param mixed $message a text error message or a PEAR error object
- *
- * @param int $code a numeric error code (it is up to your class
- * to define these if you want to use codes)
- *
- * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
- * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
- * PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION.
- *
- * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter
- * specifies the PHP-internal error level (one of
- * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
- * If $mode is PEAR_ERROR_CALLBACK, this
- * parameter specifies the callback function or
- * method. In other error modes this parameter
- * is ignored.
- *
- * @param string $userinfo If you need to pass along for example debug
- * information, this parameter is meant for that.
- *
- * @param string $error_class The returned error object will be
- * instantiated from this class, if specified.
- *
- * @param bool $skipmsg If true, raiseError will only pass error codes,
- * the error message parameter will be dropped.
- *
- * @access public
- * @return object a PEAR error object
- * @see PEAR::setErrorHandling
- * @since PHP 4.0.5
- */
- function &raiseError($message = null,
- $code = null,
- $mode = null,
- $options = null,
- $userinfo = null,
- $error_class = null,
- $skipmsg = false)
- {
- // The error is yet a PEAR error object
- if (is_object($message)) {
- $code = $message->getCode();
- $userinfo = $message->getUserInfo();
- $error_class = $message->getType();
- $message->error_message_prefix = '';
- $message = $message->getMessage();
- }
-
- if (
- isset($this) &&
- isset($this->_expected_errors) &&
- count($this->_expected_errors) > 0 &&
- count($exp = end($this->_expected_errors))
- ) {
- if ($exp[0] == "*" ||
- (is_int(reset($exp)) && in_array($code, $exp)) ||
- (is_string(reset($exp)) && in_array($message, $exp))
- ) {
- $mode = PEAR_ERROR_RETURN;
- }
- }
-
- // No mode given, try global ones
- if ($mode === null) {
- // Class error handler
- if (isset($this) && isset($this->_default_error_mode)) {
- $mode = $this->_default_error_mode;
- $options = $this->_default_error_options;
- // Global error handler
- } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) {
- $mode = $GLOBALS['_PEAR_default_error_mode'];
- $options = $GLOBALS['_PEAR_default_error_options'];
- }
- }
-
- if ($error_class !== null) {
- $ec = $error_class;
- } elseif (isset($this) && isset($this->_error_class)) {
- $ec = $this->_error_class;
- } else {
- $ec = 'PEAR_Error';
- }
-
- if ($skipmsg) {
- $a = new $ec($code, $mode, $options, $userinfo);
- } else {
- $a = new $ec($message, $code, $mode, $options, $userinfo);
- }
-
- return $a;
- }
-
- /**
- * Simpler form of raiseError with fewer options. In most cases
- * message, code and userinfo are enough.
- *
- * @param mixed $message a text error message or a PEAR error object
- *
- * @param int $code a numeric error code (it is up to your class
- * to define these if you want to use codes)
- *
- * @param string $userinfo If you need to pass along for example debug
- * information, this parameter is meant for that.
- *
- * @access public
- * @return object a PEAR error object
- * @see PEAR::raiseError
- */
- function &throwError($message = null, $code = null, $userinfo = null)
- {
- if (isset($this) && is_a($this, 'PEAR')) {
- $a = &$this->raiseError($message, $code, null, null, $userinfo);
- return $a;
- }
-
- $a = &PEAR::raiseError($message, $code, null, null, $userinfo);
- return $a;
- }
-
- function staticPushErrorHandling($mode, $options = null)
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
- $def_options = &$GLOBALS['_PEAR_default_error_options'];
- $stack[] = array($def_mode, $def_options);
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $def_mode = $mode;
- $def_options = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $def_mode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $def_options = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- $stack[] = array($mode, $options);
- return true;
- }
-
- function staticPopErrorHandling()
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- $setmode = &$GLOBALS['_PEAR_default_error_mode'];
- $setoptions = &$GLOBALS['_PEAR_default_error_options'];
- array_pop($stack);
- list($mode, $options) = $stack[sizeof($stack) - 1];
- array_pop($stack);
- switch ($mode) {
- case PEAR_ERROR_EXCEPTION:
- case PEAR_ERROR_RETURN:
- case PEAR_ERROR_PRINT:
- case PEAR_ERROR_TRIGGER:
- case PEAR_ERROR_DIE:
- case null:
- $setmode = $mode;
- $setoptions = $options;
- break;
-
- case PEAR_ERROR_CALLBACK:
- $setmode = $mode;
- // class/object method callback
- if (is_callable($options)) {
- $setoptions = $options;
- } else {
- trigger_error("invalid error callback", E_USER_WARNING);
- }
- break;
-
- default:
- trigger_error("invalid error mode", E_USER_WARNING);
- break;
- }
- return true;
- }
-
- /**
- * Push a new error handler on top of the error handler options stack. With this
- * you can easily override the actual error handler for some code and restore
- * it later with popErrorHandling.
- *
- * @param mixed $mode (same as setErrorHandling)
- * @param mixed $options (same as setErrorHandling)
- *
- * @return bool Always true
- *
- * @see PEAR::setErrorHandling
- */
- function pushErrorHandling($mode, $options = null)
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- if (isset($this) && is_a($this, 'PEAR')) {
- $def_mode = &$this->_default_error_mode;
- $def_options = &$this->_default_error_options;
- } else {
- $def_mode = &$GLOBALS['_PEAR_default_error_mode'];
- $def_options = &$GLOBALS['_PEAR_default_error_options'];
- }
- $stack[] = array($def_mode, $def_options);
-
- if (isset($this) && is_a($this, 'PEAR')) {
- $this->setErrorHandling($mode, $options);
- } else {
- PEAR::setErrorHandling($mode, $options);
- }
- $stack[] = array($mode, $options);
- return true;
- }
-
- /**
- * Pop the last error handler used
- *
- * @return bool Always true
- *
- * @see PEAR::pushErrorHandling
- */
- function popErrorHandling()
- {
- $stack = &$GLOBALS['_PEAR_error_handler_stack'];
- array_pop($stack);
- list($mode, $options) = $stack[sizeof($stack) - 1];
- array_pop($stack);
- if (isset($this) && is_a($this, 'PEAR')) {
- $this->setErrorHandling($mode, $options);
- } else {
- PEAR::setErrorHandling($mode, $options);
- }
- return true;
- }
-
- /**
- * OS independent PHP extension load. Remember to take care
- * on the correct extension name for case sensitive OSes.
- *
- * @param string $ext The extension name
- * @return bool Success or not on the dl() call
- */
- function loadExtension($ext)
- {
- if (extension_loaded($ext)) {
- return true;
- }
-
- // if either returns true dl() will produce a FATAL error, stop that
- if (
- function_exists('dl') === false ||
- ini_get('enable_dl') != 1
- ) {
- return false;
- }
-
- if (OS_WINDOWS) {
- $suffix = '.dll';
- } elseif (PHP_OS == 'HP-UX') {
- $suffix = '.sl';
- } elseif (PHP_OS == 'AIX') {
- $suffix = '.a';
- } elseif (PHP_OS == 'OSX') {
- $suffix = '.bundle';
- } else {
- $suffix = '.so';
- }
-
- return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
- }
-}
-
-function _PEAR_call_destructors()
-{
- global $_PEAR_destructor_object_list;
- if (is_array($_PEAR_destructor_object_list) &&
- sizeof($_PEAR_destructor_object_list))
- {
- reset($_PEAR_destructor_object_list);
-
- $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo');
-
- if ($destructLifoExists) {
- $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
- }
-
- while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
- $classname = get_class($objref);
- while ($classname) {
- $destructor = "_$classname";
- if (method_exists($objref, $destructor)) {
- $objref->$destructor();
- break;
- } else {
- $classname = get_parent_class($classname);
- }
- }
- }
- // Empty the object list to ensure that destructors are
- // not called more than once.
- $_PEAR_destructor_object_list = array();
- }
-
- // Now call the shutdown functions
- if (
- isset($GLOBALS['_PEAR_shutdown_funcs']) &&
- is_array($GLOBALS['_PEAR_shutdown_funcs']) &&
- !empty($GLOBALS['_PEAR_shutdown_funcs'])
- ) {
- foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) {
- call_user_func_array($value[0], $value[1]);
- }
- }
-}
-
-/**
- * Standard PEAR error class for PHP 4
- *
- * This class is supserseded by {@link PEAR_Exception} in PHP 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Gregory Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/manual/en/core.pear.pear-error.php
- * @see PEAR::raiseError(), PEAR::throwError()
- * @since Class available since PHP 4.0.2
- */
-class PEAR_Error
-{
- var $error_message_prefix = '';
- var $mode = PEAR_ERROR_RETURN;
- var $level = E_USER_NOTICE;
- var $code = -1;
- var $message = '';
- var $userinfo = '';
- var $backtrace = null;
-
- /**
- * PEAR_Error constructor
- *
- * @param string $message message
- *
- * @param int $code (optional) error code
- *
- * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
- * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER,
- * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION
- *
- * @param mixed $options (optional) error level, _OR_ in the case of
- * PEAR_ERROR_CALLBACK, the callback function or object/method
- * tuple.
- *
- * @param string $userinfo (optional) additional user/debug info
- *
- * @access public
- *
- */
- function __construct($message = 'unknown error', $code = null,
- $mode = null, $options = null, $userinfo = null)
- {
- if ($mode === null) {
- $mode = PEAR_ERROR_RETURN;
- }
- $this->message = $message;
- $this->code = $code;
- $this->mode = $mode;
- $this->userinfo = $userinfo;
-
- $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace');
-
- if (!$skiptrace) {
- $this->backtrace = debug_backtrace();
- if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) {
- unset($this->backtrace[0]['object']);
- }
- }
-
- if ($mode & PEAR_ERROR_CALLBACK) {
- $this->level = E_USER_NOTICE;
- $this->callback = $options;
- } else {
- if ($options === null) {
- $options = E_USER_NOTICE;
- }
-
- $this->level = $options;
- $this->callback = null;
- }
-
- if ($this->mode & PEAR_ERROR_PRINT) {
- if (is_null($options) || is_int($options)) {
- $format = "%s";
- } else {
- $format = $options;
- }
-
- printf($format, $this->getMessage());
- }
-
- if ($this->mode & PEAR_ERROR_TRIGGER) {
- trigger_error($this->getMessage(), $this->level);
- }
-
- if ($this->mode & PEAR_ERROR_DIE) {
- $msg = $this->getMessage();
- if (is_null($options) || is_int($options)) {
- $format = "%s";
- if (substr($msg, -1) != "\n") {
- $msg .= "\n";
- }
- } else {
- $format = $options;
- }
- die(sprintf($format, $msg));
- }
-
- if ($this->mode & PEAR_ERROR_CALLBACK && is_callable($this->callback)) {
- call_user_func($this->callback, $this);
- }
-
- if ($this->mode & PEAR_ERROR_EXCEPTION) {
- trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING);
- eval('$e = new Exception($this->message, $this->code);throw($e);');
- }
- }
-
- /**
- * Get the error mode from an error object.
- *
- * @return int error mode
- * @access public
- */
- function getMode()
- {
- return $this->mode;
- }
-
- /**
- * Get the callback function/method from an error object.
- *
- * @return mixed callback function or object/method array
- * @access public
- */
- function getCallback()
- {
- return $this->callback;
- }
-
- /**
- * Get the error message from an error object.
- *
- * @return string full error message
- * @access public
- */
- function getMessage()
- {
- return ($this->error_message_prefix . $this->message);
- }
-
- /**
- * Get error code from an error object
- *
- * @return int error code
- * @access public
- */
- function getCode()
- {
- return $this->code;
- }
-
- /**
- * Get the name of this error/exception.
- *
- * @return string error/exception name (type)
- * @access public
- */
- function getType()
- {
- return get_class($this);
- }
-
- /**
- * Get additional user-supplied information.
- *
- * @return string user-supplied information
- * @access public
- */
- function getUserInfo()
- {
- return $this->userinfo;
- }
-
- /**
- * Get additional debug information supplied by the application.
- *
- * @return string debug information
- * @access public
- */
- function getDebugInfo()
- {
- return $this->getUserInfo();
- }
-
- /**
- * Get the call backtrace from where the error was generated.
- * Supported with PHP 4.3.0 or newer.
- *
- * @param int $frame (optional) what frame to fetch
- * @return array Backtrace, or NULL if not available.
- * @access public
- */
- function getBacktrace($frame = null)
- {
- if (defined('PEAR_IGNORE_BACKTRACE')) {
- return null;
- }
- if ($frame === null) {
- return $this->backtrace;
- }
- return $this->backtrace[$frame];
- }
-
- function addUserInfo($info)
- {
- if (empty($this->userinfo)) {
- $this->userinfo = $info;
- } else {
- $this->userinfo .= " ** $info";
- }
- }
-
- function __toString()
- {
- return $this->getMessage();
- }
-
- /**
- * Make a string representation of this object.
- *
- * @return string a string with an object summary
- * @access public
- */
- function toString()
- {
- $modes = array();
- $levels = array(E_USER_NOTICE => 'notice',
- E_USER_WARNING => 'warning',
- E_USER_ERROR => 'error');
- if ($this->mode & PEAR_ERROR_CALLBACK) {
- if (is_array($this->callback)) {
- $callback = (is_object($this->callback[0]) ?
- strtolower(get_class($this->callback[0])) :
- $this->callback[0]) . '::' .
- $this->callback[1];
- } else {
- $callback = $this->callback;
- }
- return sprintf('[%s: message="%s" code=%d mode=callback '.
- 'callback=%s prefix="%s" info="%s"]',
- strtolower(get_class($this)), $this->message, $this->code,
- $callback, $this->error_message_prefix,
- $this->userinfo);
- }
- if ($this->mode & PEAR_ERROR_PRINT) {
- $modes[] = 'print';
- }
- if ($this->mode & PEAR_ERROR_TRIGGER) {
- $modes[] = 'trigger';
- }
- if ($this->mode & PEAR_ERROR_DIE) {
- $modes[] = 'die';
- }
- if ($this->mode & PEAR_ERROR_RETURN) {
- $modes[] = 'return';
- }
- return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
- 'prefix="%s" info="%s"]',
- strtolower(get_class($this)), $this->message, $this->code,
- implode("|", $modes), $levels[$this->level],
- $this->error_message_prefix,
- $this->userinfo);
- }
-}
-
-/*
- * Local Variables:
- * mode: php
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- */
-<?php
-/**
- * PEAR_ChannelFile, the channel handling class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Needed for error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ErrorStack.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
-
-/**
- * Error code if the channel.xml <channel> tag does not contain a valid version
- */
-define('PEAR_CHANNELFILE_ERROR_NO_VERSION', 1);
-/**
- * Error code if the channel.xml <channel> tag version is not supported (version 1.0 is the only supported version,
- * currently
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_VERSION', 2);
-
-/**
- * Error code if parsing is attempted with no xml extension
- */
-define('PEAR_CHANNELFILE_ERROR_NO_XML_EXT', 3);
-
-/**
- * Error code if creating the xml parser resource fails
- */
-define('PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER', 4);
-
-/**
- * Error code used for all sax xml parsing errors
- */
-define('PEAR_CHANNELFILE_ERROR_PARSER_ERROR', 5);
-
-/**#@+
- * Validation errors
- */
-/**
- * Error code when channel name is missing
- */
-define('PEAR_CHANNELFILE_ERROR_NO_NAME', 6);
-/**
- * Error code when channel name is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_NAME', 7);
-/**
- * Error code when channel summary is missing
- */
-define('PEAR_CHANNELFILE_ERROR_NO_SUMMARY', 8);
-/**
- * Error code when channel summary is multi-line
- */
-define('PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY', 9);
-/**
- * Error code when channel server is missing for protocol
- */
-define('PEAR_CHANNELFILE_ERROR_NO_HOST', 10);
-/**
- * Error code when channel server is invalid for protocol
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_HOST', 11);
-/**
- * Error code when a mirror name is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_MIRROR', 21);
-/**
- * Error code when a mirror type is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE', 22);
-/**
- * Error code when an attempt is made to generate xml, but the parsed content is invalid
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID', 23);
-/**
- * Error code when an empty package name validate regex is passed in
- */
-define('PEAR_CHANNELFILE_ERROR_EMPTY_REGEX', 24);
-/**
- * Error code when a <function> tag has no version
- */
-define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION', 25);
-/**
- * Error code when a <function> tag has no name
- */
-define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME', 26);
-/**
- * Error code when a <validatepackage> tag has no name
- */
-define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME', 27);
-/**
- * Error code when a <validatepackage> tag has no version attribute
- */
-define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION', 28);
-/**
- * Error code when a mirror does not exist but is called for in one of the set*
- * methods.
- */
-define('PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND', 32);
-/**
- * Error code when a server port is not numeric
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_PORT', 33);
-/**
- * Error code when <static> contains no version attribute
- */
-define('PEAR_CHANNELFILE_ERROR_NO_STATICVERSION', 34);
-/**
- * Error code when <baseurl> contains no type attribute in a <rest> protocol definition
- */
-define('PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE', 35);
-/**
- * Error code when a mirror is defined and the channel.xml represents the __uri pseudo-channel
- */
-define('PEAR_CHANNELFILE_URI_CANT_MIRROR', 36);
-/**
- * Error code when ssl attribute is present and is not "yes"
- */
-define('PEAR_CHANNELFILE_ERROR_INVALID_SSL', 37);
-/**#@-*/
-
-/**
- * Mirror types allowed. Currently only internet servers are recognized.
- */
-$GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server');
-
-
-/**
- * The Channel handling class
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_ChannelFile
-{
- /**
- * @access private
- * @var PEAR_ErrorStack
- * @access private
- */
- var $_stack;
-
- /**
- * Supported channel.xml versions, for parsing
- * @var array
- * @access private
- */
- var $_supportedVersions = array('1.0');
-
- /**
- * Parsed channel information
- * @var array
- * @access private
- */
- var $_channelInfo;
-
- /**
- * index into the subchannels array, used for parsing xml
- * @var int
- * @access private
- */
- var $_subchannelIndex;
-
- /**
- * index into the mirrors array, used for parsing xml
- * @var int
- * @access private
- */
- var $_mirrorIndex;
-
- /**
- * Flag used to determine the validity of parsed content
- * @var boolean
- * @access private
- */
- var $_isValid = false;
-
- function __construct()
- {
- $this->_stack = new PEAR_ErrorStack('PEAR_ChannelFile');
- $this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
- $this->_isValid = false;
- }
-
- /**
- * @return array
- * @access protected
- */
- function _getErrorMessage()
- {
- return
- array(
- PEAR_CHANNELFILE_ERROR_INVALID_VERSION =>
- 'While parsing channel.xml, an invalid version number "%version% was passed in, expecting one of %versions%',
- PEAR_CHANNELFILE_ERROR_NO_VERSION =>
- 'No version number found in <channel> tag',
- PEAR_CHANNELFILE_ERROR_NO_XML_EXT =>
- '%error%',
- PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER =>
- 'Unable to create XML parser',
- PEAR_CHANNELFILE_ERROR_PARSER_ERROR =>
- '%error%',
- PEAR_CHANNELFILE_ERROR_NO_NAME =>
- 'Missing channel name',
- PEAR_CHANNELFILE_ERROR_INVALID_NAME =>
- 'Invalid channel %tag% "%name%"',
- PEAR_CHANNELFILE_ERROR_NO_SUMMARY =>
- 'Missing channel summary',
- PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY =>
- 'Channel summary should be on one line, but is multi-line',
- PEAR_CHANNELFILE_ERROR_NO_HOST =>
- 'Missing channel server for %type% server',
- PEAR_CHANNELFILE_ERROR_INVALID_HOST =>
- 'Server name "%server%" is invalid for %type% server',
- PEAR_CHANNELFILE_ERROR_INVALID_MIRROR =>
- 'Invalid mirror name "%name%", mirror type %type%',
- PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE =>
- 'Invalid mirror type "%type%"',
- PEAR_CHANNELFILE_ERROR_INVALID =>
- 'Cannot generate xml, contents are invalid',
- PEAR_CHANNELFILE_ERROR_EMPTY_REGEX =>
- 'packagenameregex cannot be empty',
- PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION =>
- '%parent% %protocol% function has no version',
- PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME =>
- '%parent% %protocol% function has no name',
- PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE =>
- '%parent% rest baseurl has no type',
- PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME =>
- 'Validation package has no name in <validatepackage> tag',
- PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION =>
- 'Validation package "%package%" has no version',
- PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND =>
- 'Mirror "%mirror%" does not exist',
- PEAR_CHANNELFILE_ERROR_INVALID_PORT =>
- 'Port "%port%" must be numeric',
- PEAR_CHANNELFILE_ERROR_NO_STATICVERSION =>
- '<static> tag must contain version attribute',
- PEAR_CHANNELFILE_URI_CANT_MIRROR =>
- 'The __uri pseudo-channel cannot have mirrors',
- PEAR_CHANNELFILE_ERROR_INVALID_SSL =>
- '%server% has invalid ssl attribute "%ssl%" can only be yes or not present',
- );
- }
-
- /**
- * @param string contents of package.xml file
- * @return bool success of parsing
- */
- function fromXmlString($data)
- {
- if (preg_match('/<channel\s+version="([0-9]+\.[0-9]+)"/', $data, $channelversion)) {
- if (!in_array($channelversion[1], $this->_supportedVersions)) {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_INVALID_VERSION, 'error',
- array('version' => $channelversion[1]));
- return false;
- }
- $parser = new PEAR_XMLParser;
- $result = $parser->parse($data);
- if ($result !== true) {
- if ($result->getCode() == 1) {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error',
- array('error' => $result->getMessage()));
- } else {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error');
- }
- return false;
- }
- $this->_channelInfo = $parser->getData();
- return true;
- } else {
- $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_VERSION, 'error', array('xml' => $data));
- return false;
- }
- }
-
- /**
- * @return array
- */
- function toArray()
- {
- if (!$this->_isValid && !$this->validate()) {
- return false;
- }
- return $this->_channelInfo;
- }
-
- /**
- * @param array
- * @static
- * @return PEAR_ChannelFile|false false if invalid
- */
- function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack')
- {
- $a = new PEAR_ChannelFile($compatibility, $stackClass);
- $a->_fromArray($data);
- if (!$a->validate()) {
- $a = false;
- return $a;
- }
- return $a;
- }
-
- /**
- * Unlike {@link fromArray()} this does not do any validation
- * @param array
- * @static
- * @return PEAR_ChannelFile
- */
- function &fromArrayWithErrors($data, $compatibility = false,
- $stackClass = 'PEAR_ErrorStack')
- {
- $a = new PEAR_ChannelFile($compatibility, $stackClass);
- $a->_fromArray($data);
- return $a;
- }
-
- /**
- * @param array
- * @access private
- */
- function _fromArray($data)
- {
- $this->_channelInfo = $data;
- }
-
- /**
- * Wrapper to {@link PEAR_ErrorStack::getErrors()}
- * @param boolean determines whether to purge the error stack after retrieving
- * @return array
- */
- function getErrors($purge = false)
- {
- return $this->_stack->getErrors($purge);
- }
-
- /**
- * Unindent given string (?)
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- }
- }
- return $data;
- }
-
- /**
- * Parse a channel.xml file. Expects the name of
- * a channel xml file as input.
- *
- * @param string $descfile name of channel xml file
- * @return bool success of parsing
- */
- function fromXmlFile($descfile)
- {
- if (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) ||
- (!$fp = fopen($descfile, 'r'))) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
- return PEAR::raiseError("Unable to open $descfile");
- }
-
- // read the whole thing so we only get one cdata callback
- // for each block of cdata
- fclose($fp);
- $data = file_get_contents($descfile);
- return $this->fromXmlString($data);
- }
-
- /**
- * Parse channel information from different sources
- *
- * This method is able to extract information about a channel
- * from an .xml file or a string
- *
- * @access public
- * @param string Filename of the source or the source itself
- * @return bool
- */
- function fromAny($info)
- {
- if (is_string($info) && file_exists($info) && strlen($info) < 255) {
- $tmp = substr($info, -4);
- if ($tmp == '.xml') {
- $info = $this->fromXmlFile($info);
- } else {
- $fp = fopen($info, "r");
- $test = fread($fp, 5);
- fclose($fp);
- if ($test == "<?xml") {
- $info = $this->fromXmlFile($info);
- }
- }
- if (PEAR::isError($info)) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
- return PEAR::raiseError($info);
- }
- }
- if (is_string($info)) {
- $info = $this->fromXmlString($info);
- }
- return $info;
- }
-
- /**
- * Return an XML document based on previous parsing and modifications
- *
- * @return string XML data
- *
- * @access public
- */
- function toXml()
- {
- if (!$this->_isValid && !$this->validate()) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID);
- return false;
- }
- if (!isset($this->_channelInfo['attribs']['version'])) {
- $this->_channelInfo['attribs']['version'] = '1.0';
- }
- $channelInfo = $this->_channelInfo;
- $ret = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
- $ret .= "<channel version=\"" .
- $channelInfo['attribs']['version'] . "\" xmlns=\"http://pear.php.net/channel-1.0\"
- xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
- xsi:schemaLocation=\"http://pear.php.net/dtd/channel-"
- . $channelInfo['attribs']['version'] . " http://pear.php.net/dtd/channel-" .
- $channelInfo['attribs']['version'] . ".xsd\">
- <name>$channelInfo[name]</name>
- <summary>" . htmlspecialchars($channelInfo['summary'])."</summary>
-";
- if (isset($channelInfo['suggestedalias'])) {
- $ret .= ' <suggestedalias>' . $channelInfo['suggestedalias'] . "</suggestedalias>\n";
- }
- if (isset($channelInfo['validatepackage'])) {
- $ret .= ' <validatepackage version="' .
- $channelInfo['validatepackage']['attribs']['version']. '">' .
- htmlspecialchars($channelInfo['validatepackage']['_content']) .
- "</validatepackage>\n";
- }
- $ret .= " <servers>\n";
- $ret .= ' <primary';
- if (isset($channelInfo['servers']['primary']['attribs']['ssl'])) {
- $ret .= ' ssl="' . $channelInfo['servers']['primary']['attribs']['ssl'] . '"';
- }
- if (isset($channelInfo['servers']['primary']['attribs']['port'])) {
- $ret .= ' port="' . $channelInfo['servers']['primary']['attribs']['port'] . '"';
- }
- $ret .= ">\n";
- if (isset($channelInfo['servers']['primary']['rest'])) {
- $ret .= $this->_makeRestXml($channelInfo['servers']['primary']['rest'], ' ');
- }
- $ret .= " </primary>\n";
- if (isset($channelInfo['servers']['mirror'])) {
- $ret .= $this->_makeMirrorsXml($channelInfo);
- }
- $ret .= " </servers>\n";
- $ret .= "</channel>";
- return str_replace("\r", "\n", str_replace("\r\n", "\n", $ret));
- }
-
- /**
- * Generate the <rest> tag
- * @access private
- */
- function _makeRestXml($info, $indent)
- {
- $ret = $indent . "<rest>\n";
- if (isset($info['baseurl']) && !isset($info['baseurl'][0])) {
- $info['baseurl'] = array($info['baseurl']);
- }
-
- if (isset($info['baseurl'])) {
- foreach ($info['baseurl'] as $url) {
- $ret .= "$indent <baseurl type=\"" . $url['attribs']['type'] . "\"";
- $ret .= ">" . $url['_content'] . "</baseurl>\n";
- }
- }
- $ret .= $indent . "</rest>\n";
- return $ret;
- }
-
- /**
- * Generate the <mirrors> tag
- * @access private
- */
- function _makeMirrorsXml($channelInfo)
- {
- $ret = "";
- if (!isset($channelInfo['servers']['mirror'][0])) {
- $channelInfo['servers']['mirror'] = array($channelInfo['servers']['mirror']);
- }
- foreach ($channelInfo['servers']['mirror'] as $mirror) {
- $ret .= ' <mirror host="' . $mirror['attribs']['host'] . '"';
- if (isset($mirror['attribs']['port'])) {
- $ret .= ' port="' . $mirror['attribs']['port'] . '"';
- }
- if (isset($mirror['attribs']['ssl'])) {
- $ret .= ' ssl="' . $mirror['attribs']['ssl'] . '"';
- }
- $ret .= ">\n";
- if (isset($mirror['rest'])) {
- if (isset($mirror['rest'])) {
- $ret .= $this->_makeRestXml($mirror['rest'], ' ');
- }
- $ret .= " </mirror>\n";
- } else {
- $ret .= "/>\n";
- }
- }
- return $ret;
- }
-
- /**
- * Generate the <functions> tag
- * @access private
- */
- function _makeFunctionsXml($functions, $indent, $rest = false)
- {
- $ret = '';
- if (!isset($functions[0])) {
- $functions = array($functions);
- }
- foreach ($functions as $function) {
- $ret .= "$indent<function version=\"" . $function['attribs']['version'] . "\"";
- if ($rest) {
- $ret .= ' uri="' . $function['attribs']['uri'] . '"';
- }
- $ret .= ">" . $function['_content'] . "</function>\n";
- }
- return $ret;
- }
-
- /**
- * Validation error. Also marks the object contents as invalid
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateError($code, $params = array())
- {
- $this->_stack->push($code, 'error', $params);
- $this->_isValid = false;
- }
-
- /**
- * Validation warning. Does not mark the object contents invalid.
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateWarning($code, $params = array())
- {
- $this->_stack->push($code, 'warning', $params);
- }
-
- /**
- * Validate parsed file.
- *
- * @access public
- * @return boolean
- */
- function validate()
- {
- $this->_isValid = true;
- $info = $this->_channelInfo;
- if (empty($info['name'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_NAME);
- } elseif (!$this->validChannelServer($info['name'])) {
- if ($info['name'] != '__uri') {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, array('tag' => 'name',
- 'name' => $info['name']));
- }
- }
- if (empty($info['summary'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY);
- } elseif (strpos(trim($info['summary']), "\n") !== false) {
- $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY,
- array('summary' => $info['summary']));
- }
- if (isset($info['suggestedalias'])) {
- if (!$this->validChannelServer($info['suggestedalias'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'suggestedalias', 'name' =>$info['suggestedalias']));
- }
- }
- if (isset($info['localalias'])) {
- if (!$this->validChannelServer($info['localalias'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'localalias', 'name' =>$info['localalias']));
- }
- }
- if (isset($info['validatepackage'])) {
- if (!isset($info['validatepackage']['_content'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME);
- }
- if (!isset($info['validatepackage']['attribs']['version'])) {
- $content = isset($info['validatepackage']['_content']) ?
- $info['validatepackage']['_content'] :
- null;
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION,
- array('package' => $content));
- }
- }
-
- if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['port']) &&
- !is_numeric($info['servers']['primary']['attribs']['port'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_PORT,
- array('port' => $info['servers']['primary']['attribs']['port']));
- }
-
- if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['ssl']) &&
- $info['servers']['primary']['attribs']['ssl'] != 'yes') {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL,
- array('ssl' => $info['servers']['primary']['attribs']['ssl'],
- 'server' => $info['name']));
- }
-
- if (isset($info['servers']['primary']['rest']) &&
- isset($info['servers']['primary']['rest']['baseurl'])) {
- $this->_validateFunctions('rest', $info['servers']['primary']['rest']['baseurl']);
- }
- if (isset($info['servers']['mirror'])) {
- if ($this->_channelInfo['name'] == '__uri') {
- $this->_validateError(PEAR_CHANNELFILE_URI_CANT_MIRROR);
- }
- if (!isset($info['servers']['mirror'][0])) {
- $info['servers']['mirror'] = array($info['servers']['mirror']);
- }
- foreach ($info['servers']['mirror'] as $mirror) {
- if (!isset($mirror['attribs']['host'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_HOST,
- array('type' => 'mirror'));
- } elseif (!$this->validChannelServer($mirror['attribs']['host'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_HOST,
- array('server' => $mirror['attribs']['host'], 'type' => 'mirror'));
- }
- if (isset($mirror['attribs']['ssl']) && $mirror['attribs']['ssl'] != 'yes') {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL,
- array('ssl' => $info['ssl'], 'server' => $mirror['attribs']['host']));
- }
- if (isset($mirror['rest'])) {
- $this->_validateFunctions('rest', $mirror['rest']['baseurl'],
- $mirror['attribs']['host']);
- }
- }
- }
- return $this->_isValid;
- }
-
- /**
- * @param string rest - protocol name this function applies to
- * @param array the functions
- * @param string the name of the parent element (mirror name, for instance)
- */
- function _validateFunctions($protocol, $functions, $parent = '')
- {
- if (!isset($functions[0])) {
- $functions = array($functions);
- }
-
- foreach ($functions as $function) {
- if (!isset($function['_content']) || empty($function['_content'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME,
- array('parent' => $parent, 'protocol' => $protocol));
- }
-
- if ($protocol == 'rest') {
- if (!isset($function['attribs']['type']) ||
- empty($function['attribs']['type'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE,
- array('parent' => $parent, 'protocol' => $protocol));
- }
- } else {
- if (!isset($function['attribs']['version']) ||
- empty($function['attribs']['version'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION,
- array('parent' => $parent, 'protocol' => $protocol));
- }
- }
- }
- }
-
- /**
- * Test whether a string contains a valid channel server.
- * @param string $ver the package version to test
- * @return bool
- */
- function validChannelServer($server)
- {
- if ($server == '__uri') {
- return true;
- }
- return (bool) preg_match(PEAR_CHANNELS_SERVER_PREG, $server);
- }
-
- /**
- * @return string|false
- */
- function getName()
- {
- if (isset($this->_channelInfo['name'])) {
- return $this->_channelInfo['name'];
- }
-
- return false;
- }
-
- /**
- * @return string|false
- */
- function getServer()
- {
- if (isset($this->_channelInfo['name'])) {
- return $this->_channelInfo['name'];
- }
-
- return false;
- }
-
- /**
- * @return int|80 port number to connect to
- */
- function getPort($mirror = false)
- {
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- if (isset($mir['attribs']['port'])) {
- return $mir['attribs']['port'];
- }
-
- if ($this->getSSL($mirror)) {
- return 443;
- }
-
- return 80;
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary']['attribs']['port'])) {
- return $this->_channelInfo['servers']['primary']['attribs']['port'];
- }
-
- if ($this->getSSL()) {
- return 443;
- }
-
- return 80;
- }
-
- /**
- * @return bool Determines whether secure sockets layer (SSL) is used to connect to this channel
- */
- function getSSL($mirror = false)
- {
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- if (isset($mir['attribs']['ssl'])) {
- return true;
- }
-
- return false;
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) {
- return true;
- }
-
- return false;
- }
-
- /**
- * @return string|false
- */
- function getSummary()
- {
- if (isset($this->_channelInfo['summary'])) {
- return $this->_channelInfo['summary'];
- }
-
- return false;
- }
-
- /**
- * @param string protocol type
- * @param string Mirror name
- * @return array|false
- */
- function getFunctions($protocol, $mirror = false)
- {
- if ($this->getName() == '__uri') {
- return false;
- }
-
- $function = $protocol == 'rest' ? 'baseurl' : 'function';
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- if (isset($mir[$protocol][$function])) {
- return $mir[$protocol][$function];
- }
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary'][$protocol][$function])) {
- return $this->_channelInfo['servers']['primary'][$protocol][$function];
- }
-
- return false;
- }
-
- /**
- * @param string Protocol type
- * @param string Function name (null to return the
- * first protocol of the type requested)
- * @param string Mirror name, if any
- * @return array
- */
- function getFunction($type, $name = null, $mirror = false)
- {
- $protocols = $this->getFunctions($type, $mirror);
- if (!$protocols) {
- return false;
- }
-
- foreach ($protocols as $protocol) {
- if ($name === null) {
- return $protocol;
- }
-
- if ($protocol['_content'] != $name) {
- continue;
- }
-
- return $protocol;
- }
-
- return false;
- }
-
- /**
- * @param string protocol type
- * @param string protocol name
- * @param string version
- * @param string mirror name
- * @return boolean
- */
- function supports($type, $name = null, $mirror = false, $version = '1.0')
- {
- $protocols = $this->getFunctions($type, $mirror);
- if (!$protocols) {
- return false;
- }
-
- foreach ($protocols as $protocol) {
- if ($protocol['attribs']['version'] != $version) {
- continue;
- }
-
- if ($name === null) {
- return true;
- }
-
- if ($protocol['_content'] != $name) {
- continue;
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Determines whether a channel supports Representational State Transfer (REST) protocols
- * for retrieving channel information
- * @param string
- * @return bool
- */
- function supportsREST($mirror = false)
- {
- if ($mirror == $this->_channelInfo['name']) {
- $mirror = false;
- }
-
- if ($mirror) {
- if ($mir = $this->getMirror($mirror)) {
- return isset($mir['rest']);
- }
-
- return false;
- }
-
- return isset($this->_channelInfo['servers']['primary']['rest']);
- }
-
- /**
- * Get the URL to access a base resource.
- *
- * Hyperlinks in the returned xml will be used to retrieve the proper information
- * needed. This allows extreme extensibility and flexibility in implementation
- * @param string Resource Type to retrieve
- */
- function getBaseURL($resourceType, $mirror = false)
- {
- if ($mirror == $this->_channelInfo['name']) {
- $mirror = false;
- }
-
- if ($mirror) {
- $mir = $this->getMirror($mirror);
- if (!$mir) {
- return false;
- }
-
- $rest = $mir['rest'];
- } else {
- $rest = $this->_channelInfo['servers']['primary']['rest'];
- }
-
- if (!isset($rest['baseurl'][0])) {
- $rest['baseurl'] = array($rest['baseurl']);
- }
-
- foreach ($rest['baseurl'] as $baseurl) {
- if (strtolower($baseurl['attribs']['type']) == strtolower($resourceType)) {
- return $baseurl['_content'];
- }
- }
-
- return false;
- }
-
- /**
- * Since REST does not implement RPC, provide this as a logical wrapper around
- * resetFunctions for REST
- * @param string|false mirror name, if any
- */
- function resetREST($mirror = false)
- {
- return $this->resetFunctions('rest', $mirror);
- }
-
- /**
- * Empty all protocol definitions
- * @param string protocol type
- * @param string|false mirror name, if any
- */
- function resetFunctions($type, $mirror = false)
- {
- if ($mirror) {
- if (isset($this->_channelInfo['servers']['mirror'])) {
- $mirrors = $this->_channelInfo['servers']['mirror'];
- if (!isset($mirrors[0])) {
- $mirrors = array($mirrors);
- }
-
- foreach ($mirrors as $i => $mir) {
- if ($mir['attribs']['host'] == $mirror) {
- if (isset($this->_channelInfo['servers']['mirror'][$i][$type])) {
- unset($this->_channelInfo['servers']['mirror'][$i][$type]);
- }
-
- return true;
- }
- }
-
- return false;
- }
-
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['primary'][$type])) {
- unset($this->_channelInfo['servers']['primary'][$type]);
- }
-
- return true;
- }
-
- /**
- * Set a channel's protocols to the protocols supported by pearweb
- */
- function setDefaultPEARProtocols($version = '1.0', $mirror = false)
- {
- switch ($version) {
- case '1.0' :
- $this->resetREST($mirror);
-
- if (!isset($this->_channelInfo['servers'])) {
- $this->_channelInfo['servers'] = array('primary' =>
- array('rest' => array()));
- } elseif (!isset($this->_channelInfo['servers']['primary'])) {
- $this->_channelInfo['servers']['primary'] = array('rest' => array());
- }
-
- return true;
- break;
- default :
- return false;
- break;
- }
- }
-
- /**
- * @return array
- */
- function getMirrors()
- {
- if (isset($this->_channelInfo['servers']['mirror'])) {
- $mirrors = $this->_channelInfo['servers']['mirror'];
- if (!isset($mirrors[0])) {
- $mirrors = array($mirrors);
- }
-
- return $mirrors;
- }
-
- return array();
- }
-
- /**
- * Get the unserialized XML representing a mirror
- * @return array|false
- */
- function getMirror($server)
- {
- foreach ($this->getMirrors() as $mirror) {
- if ($mirror['attribs']['host'] == $server) {
- return $mirror;
- }
- }
-
- return false;
- }
-
- /**
- * @param string
- * @return string|false
- * @error PEAR_CHANNELFILE_ERROR_NO_NAME
- * @error PEAR_CHANNELFILE_ERROR_INVALID_NAME
- */
- function setName($name)
- {
- return $this->setServer($name);
- }
-
- /**
- * Set the socket number (port) that is used to connect to this channel
- * @param integer
- * @param string|false name of the mirror server, or false for the primary
- */
- function setPort($port, $mirror = false)
- {
- if ($mirror) {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $this->_channelInfo['servers']['mirror'][$i]['attribs']['port'] = $port;
- return true;
- }
- }
-
- return false;
- } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- $this->_channelInfo['servers']['mirror']['attribs']['port'] = $port;
- $this->_isValid = false;
- return true;
- }
- }
-
- $this->_channelInfo['servers']['primary']['attribs']['port'] = $port;
- $this->_isValid = false;
- return true;
- }
-
- /**
- * Set the socket number (port) that is used to connect to this channel
- * @param bool Determines whether to turn on SSL support or turn it off
- * @param string|false name of the mirror server, or false for the primary
- */
- function setSSL($ssl = true, $mirror = false)
- {
- if ($mirror) {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- if (!$ssl) {
- if (isset($this->_channelInfo['servers']['mirror'][$i]
- ['attribs']['ssl'])) {
- unset($this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl']);
- }
- } else {
- $this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl'] = 'yes';
- }
-
- return true;
- }
- }
-
- return false;
- } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- if (!$ssl) {
- if (isset($this->_channelInfo['servers']['mirror']['attribs']['ssl'])) {
- unset($this->_channelInfo['servers']['mirror']['attribs']['ssl']);
- }
- } else {
- $this->_channelInfo['servers']['mirror']['attribs']['ssl'] = 'yes';
- }
-
- $this->_isValid = false;
- return true;
- }
- }
-
- if ($ssl) {
- $this->_channelInfo['servers']['primary']['attribs']['ssl'] = 'yes';
- } else {
- if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) {
- unset($this->_channelInfo['servers']['primary']['attribs']['ssl']);
- }
- }
-
- $this->_isValid = false;
- return true;
- }
-
- /**
- * @param string
- * @return string|false
- * @error PEAR_CHANNELFILE_ERROR_NO_SERVER
- * @error PEAR_CHANNELFILE_ERROR_INVALID_SERVER
- */
- function setServer($server, $mirror = false)
- {
- if (empty($server)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SERVER);
- return false;
- } elseif (!$this->validChannelServer($server)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'name', 'name' => $server));
- return false;
- }
-
- if ($mirror) {
- $found = false;
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $found = true;
- break;
- }
- }
-
- if (!$found) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $this->_channelInfo['mirror'][$i]['attribs']['host'] = $server;
- return true;
- }
-
- $this->_channelInfo['name'] = $server;
- return true;
- }
-
- /**
- * @param string
- * @return boolean success
- * @error PEAR_CHANNELFILE_ERROR_NO_SUMMARY
- * @warning PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY
- */
- function setSummary($summary)
- {
- if (empty($summary)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY);
- return false;
- } elseif (strpos(trim($summary), "\n") !== false) {
- $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY,
- array('summary' => $summary));
- }
-
- $this->_channelInfo['summary'] = $summary;
- return true;
- }
-
- /**
- * @param string
- * @param boolean determines whether the alias is in channel.xml or local
- * @return boolean success
- */
- function setAlias($alias, $local = false)
- {
- if (!$this->validChannelServer($alias)) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME,
- array('tag' => 'suggestedalias', 'name' => $alias));
- return false;
- }
-
- if ($local) {
- $this->_channelInfo['localalias'] = $alias;
- } else {
- $this->_channelInfo['suggestedalias'] = $alias;
- }
-
- return true;
- }
-
- /**
- * @return string
- */
- function getAlias()
- {
- if (isset($this->_channelInfo['localalias'])) {
- return $this->_channelInfo['localalias'];
- }
- if (isset($this->_channelInfo['suggestedalias'])) {
- return $this->_channelInfo['suggestedalias'];
- }
- if (isset($this->_channelInfo['name'])) {
- return $this->_channelInfo['name'];
- }
- return '';
- }
-
- /**
- * Set the package validation object if it differs from PEAR's default
- * The class must be includeable via changing _ in the classname to path separator,
- * but no checking of this is made.
- * @param string|false pass in false to reset to the default packagename regex
- * @return boolean success
- */
- function setValidationPackage($validateclass, $version)
- {
- if (empty($validateclass)) {
- unset($this->_channelInfo['validatepackage']);
- }
- $this->_channelInfo['validatepackage'] = array('_content' => $validateclass);
- $this->_channelInfo['validatepackage']['attribs'] = array('version' => $version);
- }
-
- /**
- * Add a protocol to the provides section
- * @param string protocol type
- * @param string protocol version
- * @param string protocol name, if any
- * @param string mirror name, if this is a mirror's protocol
- * @return bool
- */
- function addFunction($type, $version, $name = '', $mirror = false)
- {
- if ($mirror) {
- return $this->addMirrorFunction($mirror, $type, $version, $name);
- }
-
- $set = array('attribs' => array('version' => $version), '_content' => $name);
- if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) {
- if (!isset($this->_channelInfo['servers'])) {
- $this->_channelInfo['servers'] = array('primary' =>
- array($type => array()));
- } elseif (!isset($this->_channelInfo['servers']['primary'])) {
- $this->_channelInfo['servers']['primary'] = array($type => array());
- }
-
- $this->_channelInfo['servers']['primary'][$type]['function'] = $set;
- $this->_isValid = false;
- return true;
- } elseif (!isset($this->_channelInfo['servers']['primary'][$type]['function'][0])) {
- $this->_channelInfo['servers']['primary'][$type]['function'] = array(
- $this->_channelInfo['servers']['primary'][$type]['function']);
- }
-
- $this->_channelInfo['servers']['primary'][$type]['function'][] = $set;
- return true;
- }
- /**
- * Add a protocol to a mirror's provides section
- * @param string mirror name (server)
- * @param string protocol type
- * @param string protocol version
- * @param string protocol name, if any
- */
- function addMirrorFunction($mirror, $type, $version, $name = '')
- {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $setmirror = false;
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $setmirror = &$this->_channelInfo['servers']['mirror'][$i];
- break;
- }
- }
- } else {
- if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- $setmirror = &$this->_channelInfo['servers']['mirror'];
- }
- }
-
- if (!$setmirror) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $set = array('attribs' => array('version' => $version), '_content' => $name);
- if (!isset($setmirror[$type]['function'])) {
- $setmirror[$type]['function'] = $set;
- $this->_isValid = false;
- return true;
- } elseif (!isset($setmirror[$type]['function'][0])) {
- $setmirror[$type]['function'] = array($setmirror[$type]['function']);
- }
-
- $setmirror[$type]['function'][] = $set;
- $this->_isValid = false;
- return true;
- }
-
- /**
- * @param string Resource Type this url links to
- * @param string URL
- * @param string|false mirror name, if this is not a primary server REST base URL
- */
- function setBaseURL($resourceType, $url, $mirror = false)
- {
- if ($mirror) {
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND,
- array('mirror' => $mirror));
- return false;
- }
-
- $setmirror = false;
- if (isset($this->_channelInfo['servers']['mirror'][0])) {
- foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) {
- if ($mirror == $mir['attribs']['host']) {
- $setmirror = &$this->_channelInfo['servers']['mirror'][$i];
- break;
- }
- }
- } else {
- if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) {
- $setmirror = &$this->_channelInfo['servers']['mirror'];
- }
- }
- } else {
- $setmirror = &$this->_channelInfo['servers']['primary'];
- }
-
- $set = array('attribs' => array('type' => $resourceType), '_content' => $url);
- if (!isset($setmirror['rest'])) {
- $setmirror['rest'] = array();
- }
-
- if (!isset($setmirror['rest']['baseurl'])) {
- $setmirror['rest']['baseurl'] = $set;
- $this->_isValid = false;
- return true;
- } elseif (!isset($setmirror['rest']['baseurl'][0])) {
- $setmirror['rest']['baseurl'] = array($setmirror['rest']['baseurl']);
- }
-
- foreach ($setmirror['rest']['baseurl'] as $i => $url) {
- if ($url['attribs']['type'] == $resourceType) {
- $this->_isValid = false;
- $setmirror['rest']['baseurl'][$i] = $set;
- return true;
- }
- }
-
- $setmirror['rest']['baseurl'][] = $set;
- $this->_isValid = false;
- return true;
- }
-
- /**
- * @param string mirror server
- * @param int mirror http port
- * @return boolean
- */
- function addMirror($server, $port = null)
- {
- if ($this->_channelInfo['name'] == '__uri') {
- return false; // the __uri channel cannot have mirrors by definition
- }
-
- $set = array('attribs' => array('host' => $server));
- if (is_numeric($port)) {
- $set['attribs']['port'] = $port;
- }
-
- if (!isset($this->_channelInfo['servers']['mirror'])) {
- $this->_channelInfo['servers']['mirror'] = $set;
- return true;
- }
-
- if (!isset($this->_channelInfo['servers']['mirror'][0])) {
- $this->_channelInfo['servers']['mirror'] =
- array($this->_channelInfo['servers']['mirror']);
- }
-
- $this->_channelInfo['servers']['mirror'][] = $set;
- return true;
- }
-
- /**
- * Retrieve the name of the validation package for this channel
- * @return string|false
- */
- function getValidationPackage()
- {
- if (!$this->_isValid && !$this->validate()) {
- return false;
- }
-
- if (!isset($this->_channelInfo['validatepackage'])) {
- return array('attribs' => array('version' => 'default'),
- '_content' => 'PEAR_Validate');
- }
-
- return $this->_channelInfo['validatepackage'];
- }
-
- /**
- * Retrieve the object that can be used for custom validation
- * @param string|false the name of the package to validate. If the package is
- * the channel validation package, PEAR_Validate is returned
- * @return PEAR_Validate|false false is returned if the validation package
- * cannot be located
- */
- function &getValidationObject($package = false)
- {
- if (!class_exists('PEAR_Validate')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
- }
-
- if (!$this->_isValid) {
- if (!$this->validate()) {
- $a = false;
- return $a;
- }
- }
-
- if (isset($this->_channelInfo['validatepackage'])) {
- if ($package == $this->_channelInfo['validatepackage']) {
- // channel validation packages are always validated by PEAR_Validate
- $val = new PEAR_Validate;
- return $val;
- }
-
- if (!class_exists(str_replace('.', '_',
- $this->_channelInfo['validatepackage']['_content']))) {
- if ($this->isIncludeable(str_replace('_', '/',
- $this->_channelInfo['validatepackage']['_content']) . '.php')) {
- include_once 'phar://install-pear-nozlib.phar/' . str_replace('_', '/',
- $this->_channelInfo['validatepackage']['_content']) . '.php';
- $vclass = str_replace('.', '_',
- $this->_channelInfo['validatepackage']['_content']);
- $val = new $vclass;
- } else {
- $a = false;
- return $a;
- }
- } else {
- $vclass = str_replace('.', '_',
- $this->_channelInfo['validatepackage']['_content']);
- $val = new $vclass;
- }
- } else {
- $val = new PEAR_Validate;
- }
-
- return $val;
- }
-
- function isIncludeable($path)
- {
- $possibilities = explode(PATH_SEPARATOR, ini_get('include_path'));
- foreach ($possibilities as $dir) {
- if (file_exists($dir . DIRECTORY_SEPARATOR . $path)
- && is_readable($dir . DIRECTORY_SEPARATOR . $path)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * This function is used by the channel updater and retrieves a value set by
- * the registry, or the current time if it has not been set
- * @return string
- */
- function lastModified()
- {
- if (isset($this->_channelInfo['_lastmodified'])) {
- return $this->_channelInfo['_lastmodified'];
- }
-
- return time();
- }
-}
-<?php
-/**
- * PEAR_ChannelFile_Parser for parsing channel.xml
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * base xml parser class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
-/**
- * Parser for channel.xml
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_ChannelFile_Parser extends PEAR_XMLParser
-{
- var $_config;
- var $_logger;
- var $_registry;
-
- function setConfig(&$c)
- {
- $this->_config = &$c;
- $this->_registry = &$c->getRegistry();
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
-
- function parse($data, $file)
- {
- if (PEAR::isError($err = parent::parse($data, $file))) {
- return $err;
- }
-
- $ret = new PEAR_ChannelFile;
- $ret->setConfig($this->_config);
- if (isset($this->_logger)) {
- $ret->setLogger($this->_logger);
- }
-
- $ret->fromArray($this->_unserializedData);
- // make sure the filelist is in the easy to read format needed
- $ret->flattenFilelist();
- $ret->setPackagefile($file, $archive);
- return $ret;
- }
-}<?php
-/**
- * PEAR_Command, command pattern class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * Needed for error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Frontend.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
-
-/**
- * List of commands and what classes they are implemented in.
- * @var array command => implementing class
- */
-$GLOBALS['_PEAR_Command_commandlist'] = array();
-
-/**
- * List of commands and their descriptions
- * @var array command => description
- */
-$GLOBALS['_PEAR_Command_commanddesc'] = array();
-
-/**
- * List of shortcuts to common commands.
- * @var array shortcut => command
- */
-$GLOBALS['_PEAR_Command_shortcuts'] = array();
-
-/**
- * Array of command objects
- * @var array class => object
- */
-$GLOBALS['_PEAR_Command_objects'] = array();
-
-/**
- * PEAR command class, a simple factory class for administrative
- * commands.
- *
- * How to implement command classes:
- *
- * - The class must be called PEAR_Command_Nnn, installed in the
- * "PEAR/Common" subdir, with a method called getCommands() that
- * returns an array of the commands implemented by the class (see
- * PEAR/Command/Install.php for an example).
- *
- * - The class must implement a run() function that is called with three
- * params:
- *
- * (string) command name
- * (array) assoc array with options, freely defined by each
- * command, for example:
- * array('force' => true)
- * (array) list of the other parameters
- *
- * The run() function returns a PEAR_CommandResponse object. Use
- * these methods to get information:
- *
- * int getStatus() Returns PEAR_COMMAND_(SUCCESS|FAILURE|PARTIAL)
- * *_PARTIAL means that you need to issue at least
- * one more command to complete the operation
- * (used for example for validation steps).
- *
- * string getMessage() Returns a message for the user. Remember,
- * no HTML or other interface-specific markup.
- *
- * If something unexpected happens, run() returns a PEAR error.
- *
- * - DON'T OUTPUT ANYTHING! Return text for output instead.
- *
- * - DON'T USE HTML! The text you return will be used from both Gtk,
- * web and command-line interfaces, so for now, keep everything to
- * plain text.
- *
- * - DON'T USE EXIT OR DIE! Always use pear errors. From static
- * classes do PEAR::raiseError(), from other classes do
- * $this->raiseError().
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command
-{
- // {{{ factory()
-
- /**
- * Get the right object for executing a command.
- *
- * @param string $command The name of the command
- * @param object $config Instance of PEAR_Config object
- *
- * @return object the command object or a PEAR error
- *
- * @access public
- * @static
- */
- function &factory($command, &$config)
- {
- if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
- PEAR_Command::registerCommands();
- }
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
- $command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
- }
- if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
- $a = PEAR::raiseError("unknown command `$command'");
- return $a;
- }
- $class = $GLOBALS['_PEAR_Command_commandlist'][$command];
- if (!class_exists($class)) {
- require_once $GLOBALS['_PEAR_Command_objects'][$class];
- }
- if (!class_exists($class)) {
- $a = PEAR::raiseError("unknown command `$command'");
- return $a;
- }
- $ui =& PEAR_Command::getFrontendObject();
- $obj = new $class($ui, $config);
- return $obj;
- }
-
- // }}}
- // {{{ & getObject()
- function &getObject($command)
- {
- $class = $GLOBALS['_PEAR_Command_commandlist'][$command];
- if (!class_exists($class)) {
- require_once $GLOBALS['_PEAR_Command_objects'][$class];
- }
- if (!class_exists($class)) {
- return PEAR::raiseError("unknown command `$command'");
- }
- $ui =& PEAR_Command::getFrontendObject();
- $config = &PEAR_Config::singleton();
- $obj = new $class($ui, $config);
- return $obj;
- }
-
- // }}}
- // {{{ & getFrontendObject()
-
- /**
- * Get instance of frontend object.
- *
- * @return object|PEAR_Error
- * @static
- */
- function &getFrontendObject()
- {
- $a = &PEAR_Frontend::singleton();
- return $a;
- }
-
- // }}}
- // {{{ & setFrontendClass()
-
- /**
- * Load current frontend class.
- *
- * @param string $uiclass Name of class implementing the frontend
- *
- * @return object the frontend object, or a PEAR error
- * @static
- */
- function &setFrontendClass($uiclass)
- {
- $a = &PEAR_Frontend::setFrontendClass($uiclass);
- return $a;
- }
-
- // }}}
- // {{{ setFrontendType()
-
- /**
- * Set current frontend.
- *
- * @param string $uitype Name of the frontend type (for example "CLI")
- *
- * @return object the frontend object, or a PEAR error
- * @static
- */
- function setFrontendType($uitype)
- {
- $uiclass = 'PEAR_Frontend_' . $uitype;
- return PEAR_Command::setFrontendClass($uiclass);
- }
-
- // }}}
- // {{{ registerCommands()
-
- /**
- * Scan through the Command directory looking for classes
- * and see what commands they implement.
- *
- * @param bool (optional) if FALSE (default), the new list of
- * commands should replace the current one. If TRUE,
- * new entries will be merged with old.
- *
- * @param string (optional) where (what directory) to look for
- * classes, defaults to the Command subdirectory of
- * the directory from where this file (__FILE__) is
- * included.
- *
- * @return bool TRUE on success, a PEAR error on failure
- *
- * @access public
- * @static
- */
- function registerCommands($merge = false, $dir = null)
- {
- $parser = new PEAR_XMLParser;
- if ($dir === null) {
- $dir = dirname(__FILE__) . '/Command';
- }
- if (!is_dir($dir)) {
- return PEAR::raiseError("registerCommands: opendir($dir) '$dir' does not exist or is not a directory");
- }
- $dp = @opendir($dir);
- if (empty($dp)) {
- return PEAR::raiseError("registerCommands: opendir($dir) failed");
- }
- if (!$merge) {
- $GLOBALS['_PEAR_Command_commandlist'] = array();
- }
-
- while ($file = readdir($dp)) {
- if ($file{0} == '.' || substr($file, -4) != '.xml') {
- continue;
- }
-
- $f = substr($file, 0, -4);
- $class = "PEAR_Command_" . $f;
- // List of commands
- if (empty($GLOBALS['_PEAR_Command_objects'][$class])) {
- $GLOBALS['_PEAR_Command_objects'][$class] = "$dir/" . $f . '.php';
- }
-
- $parser->parse(file_get_contents("$dir/$file"));
- $implements = $parser->getData();
- foreach ($implements as $command => $desc) {
- if ($command == 'attribs') {
- continue;
- }
-
- if (isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
- return PEAR::raiseError('Command "' . $command . '" already registered in ' .
- 'class "' . $GLOBALS['_PEAR_Command_commandlist'][$command] . '"');
- }
-
- $GLOBALS['_PEAR_Command_commandlist'][$command] = $class;
- $GLOBALS['_PEAR_Command_commanddesc'][$command] = $desc['summary'];
- if (isset($desc['shortcut'])) {
- $shortcut = $desc['shortcut'];
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$shortcut])) {
- return PEAR::raiseError('Command shortcut "' . $shortcut . '" already ' .
- 'registered to command "' . $command . '" in class "' .
- $GLOBALS['_PEAR_Command_commandlist'][$command] . '"');
- }
- $GLOBALS['_PEAR_Command_shortcuts'][$shortcut] = $command;
- }
-
- if (isset($desc['options']) && $desc['options']) {
- foreach ($desc['options'] as $oname => $option) {
- if (isset($option['shortopt']) && strlen($option['shortopt']) > 1) {
- return PEAR::raiseError('Option "' . $oname . '" short option "' .
- $option['shortopt'] . '" must be ' .
- 'only 1 character in Command "' . $command . '" in class "' .
- $class . '"');
- }
- }
- }
- }
- }
-
- ksort($GLOBALS['_PEAR_Command_shortcuts']);
- ksort($GLOBALS['_PEAR_Command_commandlist']);
- @closedir($dp);
- return true;
- }
-
- // }}}
- // {{{ getCommands()
-
- /**
- * Get the list of currently supported commands, and what
- * classes implement them.
- *
- * @return array command => implementing class
- *
- * @access public
- * @static
- */
- function getCommands()
- {
- if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
- PEAR_Command::registerCommands();
- }
- return $GLOBALS['_PEAR_Command_commandlist'];
- }
-
- // }}}
- // {{{ getShortcuts()
-
- /**
- * Get the list of command shortcuts.
- *
- * @return array shortcut => command
- *
- * @access public
- * @static
- */
- function getShortcuts()
- {
- if (empty($GLOBALS['_PEAR_Command_shortcuts'])) {
- PEAR_Command::registerCommands();
- }
- return $GLOBALS['_PEAR_Command_shortcuts'];
- }
-
- // }}}
- // {{{ getGetoptArgs()
-
- /**
- * Compiles arguments for getopt.
- *
- * @param string $command command to get optstring for
- * @param string $short_args (reference) short getopt format
- * @param array $long_args (reference) long getopt format
- *
- * @return void
- *
- * @access public
- * @static
- */
- function getGetoptArgs($command, &$short_args, &$long_args)
- {
- if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
- PEAR_Command::registerCommands();
- }
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
- $command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
- }
- if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) {
- return null;
- }
- $obj = &PEAR_Command::getObject($command);
- return $obj->getGetoptArgs($command, $short_args, $long_args);
- }
-
- // }}}
- // {{{ getDescription()
-
- /**
- * Get description for a command.
- *
- * @param string $command Name of the command
- *
- * @return string command description
- *
- * @access public
- * @static
- */
- function getDescription($command)
- {
- if (!isset($GLOBALS['_PEAR_Command_commanddesc'][$command])) {
- return null;
- }
- return $GLOBALS['_PEAR_Command_commanddesc'][$command];
- }
-
- // }}}
- // {{{ getHelp()
-
- /**
- * Get help for command.
- *
- * @param string $command Name of the command to return help for
- *
- * @access public
- * @static
- */
- function getHelp($command)
- {
- $cmds = PEAR_Command::getCommands();
- if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {
- $command = $GLOBALS['_PEAR_Command_shortcuts'][$command];
- }
- if (isset($cmds[$command])) {
- $obj = &PEAR_Command::getObject($command);
- return $obj->getHelp($command);
- }
- return false;
- }
- // }}}
-}<?php
-/**
- * PEAR_Command_Common base class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-
-/**
- * PEAR commands base class
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Common extends PEAR
-{
- /**
- * PEAR_Config object used to pass user system and configuration
- * on when executing commands
- *
- * @var PEAR_Config
- */
- var $config;
- /**
- * @var PEAR_Registry
- * @access protected
- */
- var $_registry;
-
- /**
- * User Interface object, for all interaction with the user.
- * @var object
- */
- var $ui;
-
- var $_deps_rel_trans = array(
- 'lt' => '<',
- 'le' => '<=',
- 'eq' => '=',
- 'ne' => '!=',
- 'gt' => '>',
- 'ge' => '>=',
- 'has' => '=='
- );
-
- var $_deps_type_trans = array(
- 'pkg' => 'package',
- 'ext' => 'extension',
- 'php' => 'PHP',
- 'prog' => 'external program',
- 'ldlib' => 'external library for linking',
- 'rtlib' => 'external runtime library',
- 'os' => 'operating system',
- 'websrv' => 'web server',
- 'sapi' => 'SAPI backend'
- );
-
- /**
- * PEAR_Command_Common constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct();
- $this->config = &$config;
- $this->ui = &$ui;
- }
-
- /**
- * Return a list of all the commands defined by this class.
- * @return array list of commands
- * @access public
- */
- function getCommands()
- {
- $ret = array();
- foreach (array_keys($this->commands) as $command) {
- $ret[$command] = $this->commands[$command]['summary'];
- }
-
- return $ret;
- }
-
- /**
- * Return a list of all the command shortcuts defined by this class.
- * @return array shortcut => command
- * @access public
- */
- function getShortcuts()
- {
- $ret = array();
- foreach (array_keys($this->commands) as $command) {
- if (isset($this->commands[$command]['shortcut'])) {
- $ret[$this->commands[$command]['shortcut']] = $command;
- }
- }
-
- return $ret;
- }
-
- function getOptions($command)
- {
- $shortcuts = $this->getShortcuts();
- if (isset($shortcuts[$command])) {
- $command = $shortcuts[$command];
- }
-
- if (isset($this->commands[$command]) &&
- isset($this->commands[$command]['options'])) {
- return $this->commands[$command]['options'];
- }
-
- return null;
- }
-
- function getGetoptArgs($command, &$short_args, &$long_args)
- {
- $short_args = '';
- $long_args = array();
- if (empty($this->commands[$command]) || empty($this->commands[$command]['options'])) {
- return;
- }
-
- reset($this->commands[$command]['options']);
- while (list($option, $info) = each($this->commands[$command]['options'])) {
- $larg = $sarg = '';
- if (isset($info['arg'])) {
- if ($info['arg']{0} == '(') {
- $larg = '==';
- $sarg = '::';
- $arg = substr($info['arg'], 1, -1);
- } else {
- $larg = '=';
- $sarg = ':';
- $arg = $info['arg'];
- }
- }
-
- if (isset($info['shortopt'])) {
- $short_args .= $info['shortopt'] . $sarg;
- }
-
- $long_args[] = $option . $larg;
- }
- }
-
- /**
- * Returns the help message for the given command
- *
- * @param string $command The command
- * @return mixed A fail string if the command does not have help or
- * a two elements array containing [0]=>help string,
- * [1]=> help string for the accepted cmd args
- */
- function getHelp($command)
- {
- $config = &PEAR_Config::singleton();
- if (!isset($this->commands[$command])) {
- return "No such command \"$command\"";
- }
-
- $help = null;
- if (isset($this->commands[$command]['doc'])) {
- $help = $this->commands[$command]['doc'];
- }
-
- if (empty($help)) {
- // XXX (cox) Fallback to summary if there is no doc (show both?)
- if (!isset($this->commands[$command]['summary'])) {
- return "No help for command \"$command\"";
- }
- $help = $this->commands[$command]['summary'];
- }
-
- if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) {
- foreach($matches[0] as $k => $v) {
- $help = preg_replace("/$v/", $config->get($matches[1][$k]), $help);
- }
- }
-
- return array($help, $this->getHelpArgs($command));
- }
-
- /**
- * Returns the help for the accepted arguments of a command
- *
- * @param string $command
- * @return string The help string
- */
- function getHelpArgs($command)
- {
- if (isset($this->commands[$command]['options']) &&
- count($this->commands[$command]['options']))
- {
- $help = "Options:\n";
- foreach ($this->commands[$command]['options'] as $k => $v) {
- if (isset($v['arg'])) {
- if ($v['arg'][0] == '(') {
- $arg = substr($v['arg'], 1, -1);
- $sapp = " [$arg]";
- $lapp = "[=$arg]";
- } else {
- $sapp = " $v[arg]";
- $lapp = "=$v[arg]";
- }
- } else {
- $sapp = $lapp = "";
- }
-
- if (isset($v['shortopt'])) {
- $s = $v['shortopt'];
- $help .= " -$s$sapp, --$k$lapp\n";
- } else {
- $help .= " --$k$lapp\n";
- }
-
- $p = " ";
- $doc = rtrim(str_replace("\n", "\n$p", $v['doc']));
- $help .= " $doc\n";
- }
-
- return $help;
- }
-
- return null;
- }
-
- function run($command, $options, $params)
- {
- if (empty($this->commands[$command]['function'])) {
- // look for shortcuts
- foreach (array_keys($this->commands) as $cmd) {
- if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) {
- if (empty($this->commands[$cmd]['function'])) {
- return $this->raiseError("unknown command `$command'");
- } else {
- $func = $this->commands[$cmd]['function'];
- }
- $command = $cmd;
-
- //$command = $this->commands[$cmd]['function'];
- break;
- }
- }
- } else {
- $func = $this->commands[$command]['function'];
- }
-
- return $this->$func($command, $options, $params);
- }
-}
-<?php
-/**
- * PEAR_Command_Install (install, upgrade, upgrade-all, uninstall, bundle, run-scripts commands)
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Command/Common.php';
-
-/**
- * PEAR commands for installation or deinstallation/upgrading of
- * packages.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Command_Install extends PEAR_Command_Common
-{
- // {{{ properties
-
- var $commands = array(
- 'install' => array(
- 'summary' => 'Install Package',
- 'function' => 'doInstall',
- 'shortcut' => 'i',
- 'options' => array(
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'will overwrite newer installed packages',
- ),
- 'loose' => array(
- 'shortopt' => 'l',
- 'doc' => 'do not check for recommended dependency version',
- ),
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, install anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not install files, only register the package as installed',
- ),
- 'soft' => array(
- 'shortopt' => 's',
- 'doc' => 'soft install, fail silently, or upgrade if already installed',
- ),
- 'nobuild' => array(
- 'shortopt' => 'B',
- 'doc' => 'don\'t build C extensions',
- ),
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'request uncompressed files when downloading',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM',
- ),
- 'packagingroot' => array(
- 'shortopt' => 'P',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when packaging files, like RPM packaging',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'alldeps' => array(
- 'shortopt' => 'a',
- 'doc' => 'install all required and optional dependencies',
- ),
- 'onlyreqdeps' => array(
- 'shortopt' => 'o',
- 'doc' => 'install all required dependencies',
- ),
- 'offline' => array(
- 'shortopt' => 'O',
- 'doc' => 'do not attempt to download any urls or contact channels',
- ),
- 'pretend' => array(
- 'shortopt' => 'p',
- 'doc' => 'Only list the packages that would be downloaded',
- ),
- ),
- 'doc' => '[channel/]<package> ...
-Installs one or more PEAR packages. You can specify a package to
-install in four ways:
-
-"Package-1.0.tgz" : installs from a local file
-
-"http://example.com/Package-1.0.tgz" : installs from
-anywhere on the net.
-
-"package.xml" : installs the package described in
-package.xml. Useful for testing, or for wrapping a PEAR package in
-another package manager such as RPM.
-
-"Package[-version/state][.tar]" : queries your default channel\'s server
-({config master_server}) and downloads the newest package with
-the preferred quality/state ({config preferred_state}).
-
-To retrieve Package version 1.1, use "Package-1.1," to retrieve
-Package state beta, use "Package-beta." To retrieve an uncompressed
-file, append .tar (make sure there is no file by the same name first)
-
-To download a package from another channel, prefix with the channel name like
-"channel/Package"
-
-More than one package may be specified at once. It is ok to mix these
-four ways of specifying packages.
-'),
- 'upgrade' => array(
- 'summary' => 'Upgrade Package',
- 'function' => 'doInstall',
- 'shortcut' => 'up',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'upgrade packages from a specific channel',
- 'arg' => 'CHAN',
- ),
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'overwrite newer installed packages',
- ),
- 'loose' => array(
- 'shortopt' => 'l',
- 'doc' => 'do not check for recommended dependency version',
- ),
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, upgrade anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not install files, only register the package as upgraded',
- ),
- 'nobuild' => array(
- 'shortopt' => 'B',
- 'doc' => 'don\'t build C extensions',
- ),
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'request uncompressed files when downloading',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'alldeps' => array(
- 'shortopt' => 'a',
- 'doc' => 'install all required and optional dependencies',
- ),
- 'onlyreqdeps' => array(
- 'shortopt' => 'o',
- 'doc' => 'install all required dependencies',
- ),
- 'offline' => array(
- 'shortopt' => 'O',
- 'doc' => 'do not attempt to download any urls or contact channels',
- ),
- 'pretend' => array(
- 'shortopt' => 'p',
- 'doc' => 'Only list the packages that would be downloaded',
- ),
- ),
- 'doc' => '<package> ...
-Upgrades one or more PEAR packages. See documentation for the
-"install" command for ways to specify a package.
-
-When upgrading, your package will be updated if the provided new
-package has a higher version number (use the -f option if you need to
-upgrade anyway).
-
-More than one package may be specified at once.
-'),
- 'upgrade-all' => array(
- 'summary' => 'Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]',
- 'function' => 'doUpgradeAll',
- 'shortcut' => 'ua',
- 'options' => array(
- 'channel' => array(
- 'shortopt' => 'c',
- 'doc' => 'upgrade packages from a specific channel',
- 'arg' => 'CHAN',
- ),
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, upgrade anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not install files, only register the package as upgraded',
- ),
- 'nobuild' => array(
- 'shortopt' => 'B',
- 'doc' => 'don\'t build C extensions',
- ),
- 'nocompress' => array(
- 'shortopt' => 'Z',
- 'doc' => 'request uncompressed files when downloading',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'loose' => array(
- 'doc' => 'do not check for recommended dependency version',
- ),
- ),
- 'doc' => '
-WARNING: This function is deprecated in favor of using the upgrade command with no params
-
-Upgrades all packages that have a newer release available. Upgrades are
-done only if there is a release available of the state specified in
-"preferred_state" (currently {config preferred_state}), or a state considered
-more stable.
-'),
- 'uninstall' => array(
- 'summary' => 'Un-install Package',
- 'function' => 'doUninstall',
- 'shortcut' => 'un',
- 'options' => array(
- 'nodeps' => array(
- 'shortopt' => 'n',
- 'doc' => 'ignore dependencies, uninstall anyway',
- ),
- 'register-only' => array(
- 'shortopt' => 'r',
- 'doc' => 'do not remove files, only register the packages as not installed',
- ),
- 'installroot' => array(
- 'shortopt' => 'R',
- 'arg' => 'DIR',
- 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)',
- ),
- 'ignore-errors' => array(
- 'doc' => 'force install even if there were errors',
- ),
- 'offline' => array(
- 'shortopt' => 'O',
- 'doc' => 'do not attempt to uninstall remotely',
- ),
- ),
- 'doc' => '[channel/]<package> ...
-Uninstalls one or more PEAR packages. More than one package may be
-specified at once. Prefix with channel name to uninstall from a
-channel not in your default channel ({config default_channel})
-'),
- 'bundle' => array(
- 'summary' => 'Unpacks a Pecl Package',
- 'function' => 'doBundle',
- 'shortcut' => 'bun',
- 'options' => array(
- 'destination' => array(
- 'shortopt' => 'd',
- 'arg' => 'DIR',
- 'doc' => 'Optional destination directory for unpacking (defaults to current path or "ext" if exists)',
- ),
- 'force' => array(
- 'shortopt' => 'f',
- 'doc' => 'Force the unpacking even if there were errors in the package',
- ),
- ),
- 'doc' => '<package>
-Unpacks a Pecl Package into the selected location. It will download the
-package if needed.
-'),
- 'run-scripts' => array(
- 'summary' => 'Run Post-Install Scripts bundled with a package',
- 'function' => 'doRunScripts',
- 'shortcut' => 'rs',
- 'options' => array(
- ),
- 'doc' => '<package>
-Run post-installation scripts in package <package>, if any exist.
-'),
- );
-
- // }}}
- // {{{ constructor
-
- /**
- * PEAR_Command_Install constructor.
- *
- * @access public
- */
- function __construct(&$ui, &$config)
- {
- parent::__construct($ui, $config);
- }
-
- // }}}
-
- /**
- * For unit testing purposes
- */
- function &getDownloader(&$ui, $options, &$config)
- {
- if (!class_exists('PEAR_Downloader')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Downloader.php';
- }
- $a = new PEAR_Downloader($ui, $options, $config);
- return $a;
- }
-
- /**
- * For unit testing purposes
- */
- function &getInstaller(&$ui)
- {
- if (!class_exists('PEAR_Installer')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Installer.php';
- }
- $a = new PEAR_Installer($ui);
- return $a;
- }
-
- function enableExtension($binaries, $type)
- {
- if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) {
- return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location');
- }
- $ini = $this->_parseIni($phpini);
- if (PEAR::isError($ini)) {
- return $ini;
- }
- $line = 0;
- if ($type == 'extsrc' || $type == 'extbin') {
- $search = 'extensions';
- $enable = 'extension';
- } else {
- $search = 'zend_extensions';
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $enable = 'zend_extension' . $debug . $ts;
- }
- foreach ($ini[$search] as $line => $extension) {
- if (in_array($extension, $binaries, true) || in_array(
- $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) {
- // already enabled - assume if one is, all are
- return true;
- }
- }
- if ($line) {
- $newini = array_slice($ini['all'], 0, $line);
- } else {
- $newini = array();
- }
- foreach ($binaries as $binary) {
- if ($ini['extension_dir']) {
- $binary = basename($binary);
- }
- $newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n");
- }
- $newini = array_merge($newini, array_slice($ini['all'], $line));
- $fp = @fopen($phpini, 'wb');
- if (!$fp) {
- return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
- }
- foreach ($newini as $line) {
- fwrite($fp, $line);
- }
- fclose($fp);
- return true;
- }
-
- function disableExtension($binaries, $type)
- {
- if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) {
- return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location');
- }
- $ini = $this->_parseIni($phpini);
- if (PEAR::isError($ini)) {
- return $ini;
- }
- $line = 0;
- if ($type == 'extsrc' || $type == 'extbin') {
- $search = 'extensions';
- $enable = 'extension';
- } else {
- $search = 'zend_extensions';
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $enable = 'zend_extension' . $debug . $ts;
- }
- $found = false;
- foreach ($ini[$search] as $line => $extension) {
- if (in_array($extension, $binaries, true) || in_array(
- $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) {
- $found = true;
- break;
- }
- }
- if (!$found) {
- // not enabled
- return true;
- }
- $fp = @fopen($phpini, 'wb');
- if (!$fp) {
- return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing');
- }
- if ($line) {
- $newini = array_slice($ini['all'], 0, $line);
- // delete the enable line
- $newini = array_merge($newini, array_slice($ini['all'], $line + 1));
- } else {
- $newini = array_slice($ini['all'], 1);
- }
- foreach ($newini as $line) {
- fwrite($fp, $line);
- }
- fclose($fp);
- return true;
- }
-
- function _parseIni($filename)
- {
- if (!file_exists($filename)) {
- return PEAR::raiseError('php.ini "' . $filename . '" does not exist');
- }
-
- if (filesize($filename) > 300000) {
- return PEAR::raiseError('php.ini "' . $filename . '" is too large, aborting');
- }
-
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $zend_extension_line = 'zend_extension' . $debug . $ts;
- $all = @file($filename);
- if ($all === false) {
- return PEAR::raiseError('php.ini "' . $filename .'" could not be read');
- }
- $zend_extensions = $extensions = array();
- // assume this is right, but pull from the php.ini if it is found
- $extension_dir = ini_get('extension_dir');
- foreach ($all as $linenum => $line) {
- $line = trim($line);
- if (!$line) {
- continue;
- }
- if ($line[0] == ';') {
- continue;
- }
- if (strtolower(substr($line, 0, 13)) == 'extension_dir') {
- $line = trim(substr($line, 13));
- if ($line[0] == '=') {
- $x = trim(substr($line, 1));
- $x = explode(';', $x);
- $extension_dir = str_replace('"', '', array_shift($x));
- continue;
- }
- }
- if (strtolower(substr($line, 0, 9)) == 'extension') {
- $line = trim(substr($line, 9));
- if ($line[0] == '=') {
- $x = trim(substr($line, 1));
- $x = explode(';', $x);
- $extensions[$linenum] = str_replace('"', '', array_shift($x));
- continue;
- }
- }
- if (strtolower(substr($line, 0, strlen($zend_extension_line))) ==
- $zend_extension_line) {
- $line = trim(substr($line, strlen($zend_extension_line)));
- if ($line[0] == '=') {
- $x = trim(substr($line, 1));
- $x = explode(';', $x);
- $zend_extensions[$linenum] = str_replace('"', '', array_shift($x));
- continue;
- }
- }
- }
- return array(
- 'extensions' => $extensions,
- 'zend_extensions' => $zend_extensions,
- 'extension_dir' => $extension_dir,
- 'all' => $all,
- );
- }
-
- // {{{ doInstall()
-
- function doInstall($command, $options, $params)
- {
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
- }
-
- if (isset($options['installroot']) && isset($options['packagingroot'])) {
- return $this->raiseError('ERROR: cannot use both --installroot and --packagingroot');
- }
-
- $reg = &$this->config->getRegistry();
- $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel');
- if (!$reg->channelExists($channel)) {
- return $this->raiseError('Channel "' . $channel . '" does not exist');
- }
-
- if (empty($this->installer)) {
- $this->installer = &$this->getInstaller($this->ui);
- }
-
- if ($command == 'upgrade' || $command == 'upgrade-all') {
- // If people run the upgrade command but pass nothing, emulate a upgrade-all
- if ($command == 'upgrade' && empty($params)) {
- return $this->doUpgradeAll($command, $options, $params);
- }
- $options['upgrade'] = true;
- } else {
- $packages = $params;
- }
-
- $instreg = &$reg; // instreg used to check if package is installed
- if (isset($options['packagingroot']) && !isset($options['upgrade'])) {
- $packrootphp_dir = $this->installer->_prependPath(
- $this->config->get('php_dir', null, 'pear.php.net'),
- $options['packagingroot']);
- $instreg = new PEAR_Registry($packrootphp_dir); // other instreg!
-
- if ($this->config->get('verbose') > 2) {
- $this->ui->outputData('using package root: ' . $options['packagingroot']);
- }
- }
-
- $abstractpackages = $otherpackages = array();
- // parse params
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
-
- foreach ($params as $param) {
- if (strpos($param, 'http://') === 0) {
- $otherpackages[] = $param;
- continue;
- }
-
- if (strpos($param, 'channel://') === false && @file_exists($param)) {
- if (isset($options['force'])) {
- $otherpackages[] = $param;
- continue;
- }
-
- $pkg = new PEAR_PackageFile($this->config);
- $pf = $pkg->fromAnyFile($param, PEAR_VALIDATE_DOWNLOADING);
- if (PEAR::isError($pf)) {
- $otherpackages[] = $param;
- continue;
- }
-
- $exists = $reg->packageExists($pf->getPackage(), $pf->getChannel());
- $pversion = $reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel());
- $version_compare = version_compare($pf->getVersion(), $pversion, '<=');
- if ($exists && $version_compare) {
- if ($this->config->get('verbose')) {
- $this->ui->outputData('Ignoring installed package ' .
- $reg->parsedPackageNameToString(
- array('package' => $pf->getPackage(),
- 'channel' => $pf->getChannel()), true));
- }
- continue;
- }
- $otherpackages[] = $param;
- continue;
- }
-
- $e = $reg->parsePackageName($param, $channel);
- if (PEAR::isError($e)) {
- $otherpackages[] = $param;
- } else {
- $abstractpackages[] = $e;
- }
- }
- PEAR::staticPopErrorHandling();
-
- // if there are any local package .tgz or remote static url, we can't
- // filter. The filter only works for abstract packages
- if (count($abstractpackages) && !isset($options['force'])) {
- // when not being forced, only do necessary upgrades/installs
- if (isset($options['upgrade'])) {
- $abstractpackages = $this->_filterUptodatePackages($abstractpackages, $command);
- } else {
- $count = count($abstractpackages);
- foreach ($abstractpackages as $i => $package) {
- if (isset($package['group'])) {
- // do not filter out install groups
- continue;
- }
-
- if ($instreg->packageExists($package['package'], $package['channel'])) {
- if ($count > 1) {
- if ($this->config->get('verbose')) {
- $this->ui->outputData('Ignoring installed package ' .
- $reg->parsedPackageNameToString($package, true));
- }
- unset($abstractpackages[$i]);
- } elseif ($count === 1) {
- // Lets try to upgrade it since it's already installed
- $options['upgrade'] = true;
- }
- }
- }
- }
- $abstractpackages =
- array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
- } elseif (count($abstractpackages)) {
- $abstractpackages =
- array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages);
- }
-
- $packages = array_merge($abstractpackages, $otherpackages);
- if (!count($packages)) {
- $c = '';
- if (isset($options['channel'])){
- $c .= ' in channel "' . $options['channel'] . '"';
- }
- $this->ui->outputData('Nothing to ' . $command . $c);
- return true;
- }
-
- $this->downloader = &$this->getDownloader($this->ui, $options, $this->config);
- $errors = $downloaded = $binaries = array();
- $downloaded = &$this->downloader->download($packages);
- if (PEAR::isError($downloaded)) {
- return $this->raiseError($downloaded);
- }
-
- $errors = $this->downloader->getErrorMsgs();
- if (count($errors)) {
- $err = array();
- $err['data'] = array();
- foreach ($errors as $error) {
- if ($error !== null) {
- $err['data'][] = array($error);
- }
- }
-
- if (!empty($err['data'])) {
- $err['headline'] = 'Install Errors';
- $this->ui->outputData($err);
- }
-
- if (!count($downloaded)) {
- return $this->raiseError("$command failed");
- }
- }
-
- $data = array(
- 'headline' => 'Packages that would be Installed'
- );
-
- if (isset($options['pretend'])) {
- foreach ($downloaded as $package) {
- $data['data'][] = array($reg->parsedPackageNameToString($package->getParsedPackage()));
- }
- $this->ui->outputData($data, 'pretend');
- return true;
- }
-
- $this->installer->setOptions($options);
- $this->installer->sortPackagesForInstall($downloaded);
- if (PEAR::isError($err = $this->installer->setDownloadedPackages($downloaded))) {
- $this->raiseError($err->getMessage());
- return true;
- }
-
- $binaries = $extrainfo = array();
- foreach ($downloaded as $param) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->installer->install($param, $options);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($info)) {
- $oldinfo = $info;
- $pkg = &$param->getPackageFile();
- if ($info->getCode() != PEAR_INSTALLER_NOBINARY) {
- if (!($info = $pkg->installBinary($this->installer))) {
- $this->ui->outputData('ERROR: ' .$oldinfo->getMessage());
- continue;
- }
-
- // we just installed a different package than requested,
- // let's change the param and info so that the rest of this works
- $param = $info[0];
- $info = $info[1];
- }
- }
-
- if (!is_array($info)) {
- return $this->raiseError("$command failed");
- }
-
- if ($param->getPackageType() == 'extsrc' ||
- $param->getPackageType() == 'extbin' ||
- $param->getPackageType() == 'zendextsrc' ||
- $param->getPackageType() == 'zendextbin'
- ) {
- $pkg = &$param->getPackageFile();
- if ($instbin = $pkg->getInstalledBinary()) {
- $instpkg = &$instreg->getPackage($instbin, $pkg->getChannel());
- } else {
- $instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel());
- }
-
- foreach ($instpkg->getFilelist() as $name => $atts) {
- $pinfo = pathinfo($atts['installed_as']);
- if (!isset($pinfo['extension']) ||
- in_array($pinfo['extension'], array('c', 'h'))
- ) {
- continue; // make sure we don't match php_blah.h
- }
-
- if ((strpos($pinfo['basename'], 'php_') === 0 &&
- $pinfo['extension'] == 'dll') ||
- // most unices
- $pinfo['extension'] == 'so' ||
- // hp-ux
- $pinfo['extension'] == 'sl') {
- $binaries[] = array($atts['installed_as'], $pinfo);
- break;
- }
- }
-
- if (count($binaries)) {
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($param->getPackageType() == 'extsrc' ||
- $param->getPackageType() == 'extbin') {
- $exttype = 'extension';
- $extpath = $pinfo[1]['basename'];
- } else {
- $exttype = 'zend_extension';
- $extpath = $atts['installed_as'];
- }
- $extrainfo[] = 'You should add "' . $exttype . '=' .
- $extpath . '" to php.ini';
- } else {
- $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() .
- ' enabled in php.ini';
- }
- }
- }
- }
-
- if ($this->config->get('verbose') > 0) {
- $chan = $param->getChannel();
- $label = $reg->parsedPackageNameToString(
- array(
- 'channel' => $chan,
- 'package' => $param->getPackage(),
- 'version' => $param->getVersion(),
- ));
- $out = array('data' => "$command ok: $label");
- if (isset($info['release_warnings'])) {
- $out['release_warnings'] = $info['release_warnings'];
- }
- $this->ui->outputData($out, $command);
-
- if (!isset($options['register-only']) && !isset($options['offline'])) {
- if ($this->config->isDefinedLayer('ftp')) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->installer->ftpInstall($param);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($info)) {
- $this->ui->outputData($info->getMessage());
- $this->ui->outputData("remote install failed: $label");
- } else {
- $this->ui->outputData("remote install ok: $label");
- }
- }
- }
- }
-
- $deps = $param->getDeps();
- if ($deps) {
- if (isset($deps['group'])) {
- $groups = $deps['group'];
- if (!isset($groups[0])) {
- $groups = array($groups);
- }
-
- foreach ($groups as $group) {
- if ($group['attribs']['name'] == 'default') {
- // default group is always installed, unless the user
- // explicitly chooses to install another group
- continue;
- }
- $extrainfo[] = $param->getPackage() . ': Optional feature ' .
- $group['attribs']['name'] . ' available (' .
- $group['attribs']['hint'] . ')';
- }
-
- $extrainfo[] = $param->getPackage() .
- ': To install optional features use "pear install ' .
- $reg->parsedPackageNameToString(
- array('package' => $param->getPackage(),
- 'channel' => $param->getChannel()), true) .
- '#featurename"';
- }
- }
-
- $pkg = &$instreg->getPackage($param->getPackage(), $param->getChannel());
- // $pkg may be NULL if install is a 'fake' install via --packagingroot
- if (is_object($pkg)) {
- $pkg->setConfig($this->config);
- if ($list = $pkg->listPostinstallScripts()) {
- $pn = $reg->parsedPackageNameToString(array('channel' =>
- $param->getChannel(), 'package' => $param->getPackage()), true);
- $extrainfo[] = $pn . ' has post-install scripts:';
- foreach ($list as $file) {
- $extrainfo[] = $file;
- }
- $extrainfo[] = $param->getPackage() .
- ': Use "pear run-scripts ' . $pn . '" to finish setup.';
- $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES';
- }
- }
- }
-
- if (count($extrainfo)) {
- foreach ($extrainfo as $info) {
- $this->ui->outputData($info);
- }
- }
-
- return true;
- }
-
- // }}}
- // {{{ doUpgradeAll()
-
- function doUpgradeAll($command, $options, $params)
- {
- $reg = &$this->config->getRegistry();
- $upgrade = array();
-
- if (isset($options['channel'])) {
- $channels = array($options['channel']);
- } else {
- $channels = $reg->listChannels();
- }
-
- foreach ($channels as $channel) {
- if ($channel == '__uri') {
- continue;
- }
-
- // parse name with channel
- foreach ($reg->listPackages($channel) as $name) {
- $upgrade[] = $reg->parsedPackageNameToString(array(
- 'channel' => $channel,
- 'package' => $name
- ));
- }
- }
-
- $err = $this->doInstall($command, $options, $upgrade);
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- }
- }
-
- // }}}
- // {{{ doUninstall()
-
- function doUninstall($command, $options, $params)
- {
- if (count($params) < 1) {
- return $this->raiseError("Please supply the package(s) you want to uninstall");
- }
-
- if (empty($this->installer)) {
- $this->installer = &$this->getInstaller($this->ui);
- }
-
- if (isset($options['remoteconfig'])) {
- $e = $this->config->readFTPConfigFile($options['remoteconfig']);
- if (!PEAR::isError($e)) {
- $this->installer->setConfig($this->config);
- }
- }
-
- $reg = &$this->config->getRegistry();
- $newparams = array();
- $binaries = array();
- $badparams = array();
- foreach ($params as $pkg) {
- $channel = $this->config->get('default_channel');
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $parsed = $reg->parsePackageName($pkg, $channel);
- PEAR::staticPopErrorHandling();
- if (!$parsed || PEAR::isError($parsed)) {
- $badparams[] = $pkg;
- continue;
- }
- $package = $parsed['package'];
- $channel = $parsed['channel'];
- $info = &$reg->getPackage($package, $channel);
- if ($info === null &&
- ($channel == 'pear.php.net' || $channel == 'pecl.php.net')) {
- // make sure this isn't a package that has flipped from pear to pecl but
- // used a package.xml 1.0
- $testc = ($channel == 'pear.php.net') ? 'pecl.php.net' : 'pear.php.net';
- $info = &$reg->getPackage($package, $testc);
- if ($info !== null) {
- $channel = $testc;
- }
- }
- if ($info === null) {
- $badparams[] = $pkg;
- } else {
- $newparams[] = &$info;
- // check for binary packages (this is an alias for those packages if so)
- if ($installedbinary = $info->getInstalledBinary()) {
- $this->ui->log('adding binary package ' .
- $reg->parsedPackageNameToString(array('channel' => $channel,
- 'package' => $installedbinary), true));
- $newparams[] = &$reg->getPackage($installedbinary, $channel);
- }
- // add the contents of a dependency group to the list of installed packages
- if (isset($parsed['group'])) {
- $group = $info->getDependencyGroup($parsed['group']);
- if ($group) {
- $installed = $reg->getInstalledGroup($group);
- if ($installed) {
- foreach ($installed as $i => $p) {
- $newparams[] = &$installed[$i];
- }
- }
- }
- }
- }
- }
- $err = $this->installer->sortPackagesForUninstall($newparams);
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- return true;
- }
- $params = $newparams;
- // twist this to use it to check on whether dependent packages are also being uninstalled
- // for circular dependencies like subpackages
- $this->installer->setUninstallPackages($newparams);
- $params = array_merge($params, $badparams);
- $binaries = array();
- foreach ($params as $pkg) {
- $this->installer->pushErrorHandling(PEAR_ERROR_RETURN);
- if ($err = $this->installer->uninstall($pkg, $options)) {
- $this->installer->popErrorHandling();
- if (PEAR::isError($err)) {
- $this->ui->outputData($err->getMessage(), $command);
- continue;
- }
- if ($pkg->getPackageType() == 'extsrc' ||
- $pkg->getPackageType() == 'extbin' ||
- $pkg->getPackageType() == 'zendextsrc' ||
- $pkg->getPackageType() == 'zendextbin') {
- if ($instbin = $pkg->getInstalledBinary()) {
- continue; // this will be uninstalled later
- }
-
- foreach ($pkg->getFilelist() as $name => $atts) {
- $pinfo = pathinfo($atts['installed_as']);
- if (!isset($pinfo['extension']) ||
- in_array($pinfo['extension'], array('c', 'h'))) {
- continue; // make sure we don't match php_blah.h
- }
- if ((strpos($pinfo['basename'], 'php_') === 0 &&
- $pinfo['extension'] == 'dll') ||
- // most unices
- $pinfo['extension'] == 'so' ||
- // hp-ux
- $pinfo['extension'] == 'sl') {
- $binaries[] = array($atts['installed_as'], $pinfo);
- break;
- }
- }
- if (count($binaries)) {
- foreach ($binaries as $pinfo) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType());
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($ret)) {
- $extrainfo[] = $ret->getMessage();
- if ($pkg->getPackageType() == 'extsrc' ||
- $pkg->getPackageType() == 'extbin') {
- $exttype = 'extension';
- } else {
- ob_start();
- phpinfo(INFO_GENERAL);
- $info = ob_get_contents();
- ob_end_clean();
- $debug = function_exists('leak') ? '_debug' : '';
- $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : '';
- $exttype = 'zend_extension' . $debug . $ts;
- }
- $this->ui->outputData('Unable to remove "' . $exttype . '=' .
- $pinfo[1]['basename'] . '" from php.ini', $command);
- } else {
- $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() .
- ' disabled in php.ini', $command);
- }
- }
- }
- }
- $savepkg = $pkg;
- if ($this->config->get('verbose') > 0) {
- if (is_object($pkg)) {
- $pkg = $reg->parsedPackageNameToString($pkg);
- }
- $this->ui->outputData("uninstall ok: $pkg", $command);
- }
- if (!isset($options['offline']) && is_object($savepkg) &&
- defined('PEAR_REMOTEINSTALL_OK')) {
- if ($this->config->isDefinedLayer('ftp')) {
- $this->installer->pushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->installer->ftpUninstall($savepkg);
- $this->installer->popErrorHandling();
- if (PEAR::isError($info)) {
- $this->ui->outputData($info->getMessage());
- $this->ui->outputData("remote uninstall failed: $pkg");
- } else {
- $this->ui->outputData("remote uninstall ok: $pkg");
- }
- }
- }
- } else {
- $this->installer->popErrorHandling();
- if (!is_object($pkg)) {
- return $this->raiseError("uninstall failed: $pkg");
- }
- $pkg = $reg->parsedPackageNameToString($pkg);
- }
- }
-
- return true;
- }
-
- // }}}
-
-
- // }}}
- // {{{ doBundle()
- /*
- (cox) It just downloads and untars the package, does not do
- any check that the PEAR_Installer::_installFile() does.
- */
-
- function doBundle($command, $options, $params)
- {
- $opts = array(
- 'force' => true,
- 'nodeps' => true,
- 'soft' => true,
- 'downloadonly' => true
- );
- $downloader = &$this->getDownloader($this->ui, $opts, $this->config);
- $reg = &$this->config->getRegistry();
- if (count($params) < 1) {
- return $this->raiseError("Please supply the package you want to bundle");
- }
-
- if (isset($options['destination'])) {
- if (!is_dir($options['destination'])) {
- System::mkdir('-p ' . $options['destination']);
- }
- $dest = realpath($options['destination']);
- } else {
- $pwd = getcwd();
- $dir = $pwd . DIRECTORY_SEPARATOR . 'ext';
- $dest = is_dir($dir) ? $dir : $pwd;
- }
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $downloader->setDownloadDir($dest);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($err)) {
- return PEAR::raiseError('download directory "' . $dest .
- '" is not writeable.');
- }
- $result = &$downloader->download(array($params[0]));
- if (PEAR::isError($result)) {
- return $result;
- }
- if (!isset($result[0])) {
- return $this->raiseError('unable to unpack ' . $params[0]);
- }
- $pkgfile = &$result[0]->getPackageFile();
- $pkgname = $pkgfile->getName();
- $pkgversion = $pkgfile->getVersion();
-
- // Unpacking -------------------------------------------------
- $dest .= DIRECTORY_SEPARATOR . $pkgname;
- $orig = $pkgname . '-' . $pkgversion;
-
- $tar = new Archive_Tar($pkgfile->getArchiveFile());
- if (!$tar->extractModify($dest, $orig)) {
- return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile());
- }
- $this->ui->outputData("Package ready at '$dest'");
- // }}}
- }
-
- // }}}
-
- function doRunScripts($command, $options, $params)
- {
- if (!isset($params[0])) {
- return $this->raiseError('run-scripts expects 1 parameter: a package name');
- }
-
- $reg = &$this->config->getRegistry();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel'));
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($parsed)) {
- return $this->raiseError($parsed);
- }
-
- $package = &$reg->getPackage($parsed['package'], $parsed['channel']);
- if (!is_object($package)) {
- return $this->raiseError('Could not retrieve package "' . $params[0] . '" from registry');
- }
-
- $package->setConfig($this->config);
- $package->runPostinstallScripts();
- $this->ui->outputData('Install scripts complete', $command);
- return true;
- }
-
- /**
- * Given a list of packages, filter out those ones that are already up to date
- *
- * @param $packages: packages, in parsed array format !
- * @return list of packages that can be upgraded
- */
- function _filterUptodatePackages($packages, $command)
- {
- $reg = &$this->config->getRegistry();
- $latestReleases = array();
-
- $ret = array();
- foreach ($packages as $package) {
- if (isset($package['group'])) {
- $ret[] = $package;
- continue;
- }
-
- $channel = $package['channel'];
- $name = $package['package'];
- if (!$reg->packageExists($name, $channel)) {
- $ret[] = $package;
- continue;
- }
-
- if (!isset($latestReleases[$channel])) {
- // fill in cache for this channel
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $this->raiseError($chan);
- }
-
- $base2 = false;
- $preferred_mirror = $this->config->get('preferred_mirror', null, $channel);
- if ($chan->supportsREST($preferred_mirror) &&
- (
- //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) ||
- ($base = $chan->getBaseURL('REST1.0', $preferred_mirror))
- )
- ) {
- $dorest = true;
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (!isset($package['state'])) {
- $state = $this->config->get('preferred_state', null, $channel);
- } else {
- $state = $package['state'];
- }
-
- if ($dorest) {
- if ($base2) {
- $rest = &$this->config->getREST('1.4', array());
- $base = $base2;
- } else {
- $rest = &$this->config->getREST('1.0', array());
- }
-
- $installed = array_flip($reg->listPackages($channel));
- $latest = $rest->listLatestUpgrades($base, $state, $installed, $channel, $reg);
- }
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($latest)) {
- $this->ui->outputData('Error getting channel info from ' . $channel .
- ': ' . $latest->getMessage());
- continue;
- }
-
- $latestReleases[$channel] = array_change_key_case($latest);
- }
-
- // check package for latest release
- $name_lower = strtolower($name);
- if (isset($latestReleases[$channel][$name_lower])) {
- // if not set, up to date
- $inst_version = $reg->packageInfo($name, 'version', $channel);
- $channel_version = $latestReleases[$channel][$name_lower]['version'];
- if (version_compare($channel_version, $inst_version, 'le')) {
- // installed version is up-to-date
- continue;
- }
-
- // maintain BC
- if ($command == 'upgrade-all') {
- $this->ui->outputData(array('data' => 'Will upgrade ' .
- $reg->parsedPackageNameToString($package)), $command);
- }
- $ret[] = $package;
- }
- }
-
- return $ret;
- }
-}
-<commands version="1.0">
- <install>
- <summary>Install Package</summary>
- <function>doInstall</function>
- <shortcut>i</shortcut>
- <options>
- <force>
- <shortopt>f</shortopt>
- <doc>will overwrite newer installed packages</doc>
- </force>
- <loose>
- <shortopt>l</shortopt>
- <doc>do not check for recommended dependency version</doc>
- </loose>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, install anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not install files, only register the package as installed</doc>
- </register-only>
- <soft>
- <shortopt>s</shortopt>
- <doc>soft install, fail silently, or upgrade if already installed</doc>
- </soft>
- <nobuild>
- <shortopt>B</shortopt>
- <doc>don&#039;t build C extensions</doc>
- </nobuild>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>request uncompressed files when downloading</doc>
- </nocompress>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT), use packagingroot for RPM</doc>
- <arg>DIR</arg>
- </installroot>
- <packagingroot>
- <shortopt>P</shortopt>
- <doc>root directory used when packaging files, like RPM packaging</doc>
- <arg>DIR</arg>
- </packagingroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <alldeps>
- <shortopt>a</shortopt>
- <doc>install all required and optional dependencies</doc>
- </alldeps>
- <onlyreqdeps>
- <shortopt>o</shortopt>
- <doc>install all required dependencies</doc>
- </onlyreqdeps>
- <offline>
- <shortopt>O</shortopt>
- <doc>do not attempt to download any urls or contact channels</doc>
- </offline>
- <pretend>
- <shortopt>p</shortopt>
- <doc>Only list the packages that would be downloaded</doc>
- </pretend>
- </options>
- <doc>[channel/]&lt;package&gt; ...
-Installs one or more PEAR packages. You can specify a package to
-install in four ways:
-
-&quot;Package-1.0.tgz&quot; : installs from a local file
-
-&quot;http://example.com/Package-1.0.tgz&quot; : installs from
-anywhere on the net.
-
-&quot;package.xml&quot; : installs the package described in
-package.xml. Useful for testing, or for wrapping a PEAR package in
-another package manager such as RPM.
-
-&quot;Package[-version/state][.tar]&quot; : queries your default channel&#039;s server
-({config master_server}) and downloads the newest package with
-the preferred quality/state ({config preferred_state}).
-
-To retrieve Package version 1.1, use &quot;Package-1.1,&quot; to retrieve
-Package state beta, use &quot;Package-beta.&quot; To retrieve an uncompressed
-file, append .tar (make sure there is no file by the same name first)
-
-To download a package from another channel, prefix with the channel name like
-&quot;channel/Package&quot;
-
-More than one package may be specified at once. It is ok to mix these
-four ways of specifying packages.
-</doc>
- </install>
- <upgrade>
- <summary>Upgrade Package</summary>
- <function>doInstall</function>
- <shortcut>up</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>upgrade packages from a specific channel</doc>
- <arg>CHAN</arg>
- </channel>
- <force>
- <shortopt>f</shortopt>
- <doc>overwrite newer installed packages</doc>
- </force>
- <loose>
- <shortopt>l</shortopt>
- <doc>do not check for recommended dependency version</doc>
- </loose>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, upgrade anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not install files, only register the package as upgraded</doc>
- </register-only>
- <nobuild>
- <shortopt>B</shortopt>
- <doc>don&#039;t build C extensions</doc>
- </nobuild>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>request uncompressed files when downloading</doc>
- </nocompress>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT)</doc>
- <arg>DIR</arg>
- </installroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <alldeps>
- <shortopt>a</shortopt>
- <doc>install all required and optional dependencies</doc>
- </alldeps>
- <onlyreqdeps>
- <shortopt>o</shortopt>
- <doc>install all required dependencies</doc>
- </onlyreqdeps>
- <offline>
- <shortopt>O</shortopt>
- <doc>do not attempt to download any urls or contact channels</doc>
- </offline>
- <pretend>
- <shortopt>p</shortopt>
- <doc>Only list the packages that would be downloaded</doc>
- </pretend>
- </options>
- <doc>&lt;package&gt; ...
-Upgrades one or more PEAR packages. See documentation for the
-&quot;install&quot; command for ways to specify a package.
-
-When upgrading, your package will be updated if the provided new
-package has a higher version number (use the -f option if you need to
-upgrade anyway).
-
-More than one package may be specified at once.
-</doc>
- </upgrade>
- <upgrade-all>
- <summary>Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]</summary>
- <function>doUpgradeAll</function>
- <shortcut>ua</shortcut>
- <options>
- <channel>
- <shortopt>c</shortopt>
- <doc>upgrade packages from a specific channel</doc>
- <arg>CHAN</arg>
- </channel>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, upgrade anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not install files, only register the package as upgraded</doc>
- </register-only>
- <nobuild>
- <shortopt>B</shortopt>
- <doc>don&#039;t build C extensions</doc>
- </nobuild>
- <nocompress>
- <shortopt>Z</shortopt>
- <doc>request uncompressed files when downloading</doc>
- </nocompress>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT), use packagingroot for RPM</doc>
- <arg>DIR</arg>
- </installroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <loose>
- <shortopt></shortopt>
- <doc>do not check for recommended dependency version</doc>
- </loose>
- </options>
- <doc>
-WARNING: This function is deprecated in favor of using the upgrade command with no params
-
-Upgrades all packages that have a newer release available. Upgrades are
-done only if there is a release available of the state specified in
-&quot;preferred_state&quot; (currently {config preferred_state}), or a state considered
-more stable.
-</doc>
- </upgrade-all>
- <uninstall>
- <summary>Un-install Package</summary>
- <function>doUninstall</function>
- <shortcut>un</shortcut>
- <options>
- <nodeps>
- <shortopt>n</shortopt>
- <doc>ignore dependencies, uninstall anyway</doc>
- </nodeps>
- <register-only>
- <shortopt>r</shortopt>
- <doc>do not remove files, only register the packages as not installed</doc>
- </register-only>
- <installroot>
- <shortopt>R</shortopt>
- <doc>root directory used when installing files (ala PHP&#039;s INSTALL_ROOT)</doc>
- <arg>DIR</arg>
- </installroot>
- <ignore-errors>
- <shortopt></shortopt>
- <doc>force install even if there were errors</doc>
- </ignore-errors>
- <offline>
- <shortopt>O</shortopt>
- <doc>do not attempt to uninstall remotely</doc>
- </offline>
- </options>
- <doc>[channel/]&lt;package&gt; ...
-Uninstalls one or more PEAR packages. More than one package may be
-specified at once. Prefix with channel name to uninstall from a
-channel not in your default channel ({config default_channel})
-</doc>
- </uninstall>
- <bundle>
- <summary>Unpacks a Pecl Package</summary>
- <function>doBundle</function>
- <shortcut>bun</shortcut>
- <options>
- <destination>
- <shortopt>d</shortopt>
- <doc>Optional destination directory for unpacking (defaults to current path or &quot;ext&quot; if exists)</doc>
- <arg>DIR</arg>
- </destination>
- <force>
- <shortopt>f</shortopt>
- <doc>Force the unpacking even if there were errors in the package</doc>
- </force>
- </options>
- <doc>&lt;package&gt;
-Unpacks a Pecl Package into the selected location. It will download the
-package if needed.
-</doc>
- </bundle>
- <run-scripts>
- <summary>Run Post-Install Scripts bundled with a package</summary>
- <function>doRunScripts</function>
- <shortcut>rs</shortcut>
- <options />
- <doc>&lt;package&gt;
-Run post-installation scripts in package &lt;package&gt;, if any exist.
-</doc>
- </run-scripts>
-</commands><?php
-/**
- * PEAR_Common, the base class for the PEAR Installer
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1.0
- * @deprecated File deprecated since Release 1.4.0a1
- */
-
-/**
- * Include error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-
-/**
- * PEAR_Common error when an invalid PHP file is passed to PEAR_Common::analyzeSourceCode()
- */
-define('PEAR_COMMON_ERROR_INVALIDPHP', 1);
-define('_PEAR_COMMON_PACKAGE_NAME_PREG', '[A-Za-z][a-zA-Z0-9_]+');
-define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/');
-
-// this should allow: 1, 1.0, 1.0RC1, 1.0dev, 1.0dev123234234234, 1.0a1, 1.0b1, 1.0pl1
-define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?');
-define('PEAR_COMMON_PACKAGE_VERSION_PREG', '/^' . _PEAR_COMMON_PACKAGE_VERSION_PREG . '\\z/i');
-
-// XXX far from perfect :-)
-define('_PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '(' . _PEAR_COMMON_PACKAGE_NAME_PREG .
- ')(-([.0-9a-zA-Z]+))?');
-define('PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_PACKAGE_DOWNLOAD_PREG .
- '\\z/');
-
-define('_PEAR_CHANNELS_NAME_PREG', '[A-Za-z][a-zA-Z0-9\.]+');
-define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '\\z/');
-
-// this should allow any dns or IP address, plus a path - NO UNDERSCORES ALLOWED
-define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*(\/[a-zA-Z0-9\-]+)*');
-define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '\\z/i');
-
-define('_PEAR_CHANNELS_PACKAGE_PREG', '(' ._PEAR_CHANNELS_SERVER_PREG . ')\/('
- . _PEAR_COMMON_PACKAGE_NAME_PREG . ')');
-define('PEAR_CHANNELS_PACKAGE_PREG', '/^' . _PEAR_CHANNELS_PACKAGE_PREG . '\\z/i');
-
-define('_PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '(' . _PEAR_CHANNELS_NAME_PREG . ')::('
- . _PEAR_COMMON_PACKAGE_NAME_PREG . ')(-([.0-9a-zA-Z]+))?');
-define('PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_CHANNEL_DOWNLOAD_PREG . '\\z/');
-
-/**
- * List of temporary files and directories registered by
- * PEAR_Common::addTempFile().
- * @var array
- */
-$GLOBALS['_PEAR_Common_tempfiles'] = array();
-
-/**
- * Valid maintainer roles
- * @var array
- */
-$GLOBALS['_PEAR_Common_maintainer_roles'] = array('lead','developer','contributor','helper');
-
-/**
- * Valid release states
- * @var array
- */
-$GLOBALS['_PEAR_Common_release_states'] = array('alpha','beta','stable','snapshot','devel');
-
-/**
- * Valid dependency types
- * @var array
- */
-$GLOBALS['_PEAR_Common_dependency_types'] = array('pkg','ext','php','prog','ldlib','rtlib','os','websrv','sapi');
-
-/**
- * Valid dependency relations
- * @var array
- */
-$GLOBALS['_PEAR_Common_dependency_relations'] = array('has','eq','lt','le','gt','ge','not', 'ne');
-
-/**
- * Valid file roles
- * @var array
- */
-$GLOBALS['_PEAR_Common_file_roles'] = array('php','ext','test','doc','data','src','script');
-
-/**
- * Valid replacement types
- * @var array
- */
-$GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config', 'package-info');
-
-/**
- * Valid "provide" types
- * @var array
- */
-$GLOBALS['_PEAR_Common_provide_types'] = array('ext', 'prog', 'class', 'function', 'feature', 'api');
-
-/**
- * Valid "provide" types
- * @var array
- */
-$GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'pre-uninstall', 'post-uninstall', 'pre-build', 'post-build', 'pre-configure', 'post-configure', 'pre-setup', 'post-setup');
-
-/**
- * Class providing common functionality for PEAR administration classes.
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- * @deprecated This class will disappear, and its components will be spread
- * into smaller classes, like the AT&T breakup, as of Release 1.4.0a1
- */
-class PEAR_Common extends PEAR
-{
- /**
- * User Interface object (PEAR_Frontend_* class). If null,
- * the log() method uses print.
- * @var object
- */
- var $ui = null;
-
- /**
- * Configuration object (PEAR_Config).
- * @var PEAR_Config
- */
- var $config = null;
-
- /** stack of elements, gives some sort of XML context */
- var $element_stack = array();
-
- /** name of currently parsed XML element */
- var $current_element;
-
- /** array of attributes of the currently parsed XML element */
- var $current_attributes = array();
-
- /** assoc with information about a package */
- var $pkginfo = array();
-
- var $current_path = null;
-
- /**
- * Flag variable used to mark a valid package file
- * @var boolean
- * @access private
- */
- var $_validPackageFile;
-
- /**
- * PEAR_Common constructor
- *
- * @access public
- */
- function __construct()
- {
- parent::__construct();
- $this->config = &PEAR_Config::singleton();
- $this->debug = $this->config->get('verbose');
- }
-
- /**
- * PEAR_Common destructor
- *
- * @access private
- */
- function _PEAR_Common()
- {
- // doesn't work due to bug #14744
- //$tempfiles = $this->_tempfiles;
- $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles'];
- while ($file = array_shift($tempfiles)) {
- if (@is_dir($file)) {
- if (!class_exists('System')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- }
-
- System::rm(array('-rf', $file));
- } elseif (file_exists($file)) {
- unlink($file);
- }
- }
- }
-
- /**
- * Register a temporary file or directory. When the destructor is
- * executed, all registered temporary files and directories are
- * removed.
- *
- * @param string $file name of file or directory
- *
- * @return void
- *
- * @access public
- */
- function addTempFile($file)
- {
- if (!class_exists('PEAR_Frontend')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Frontend.php';
- }
- PEAR_Frontend::addTempFile($file);
- }
-
- /**
- * Wrapper to System::mkDir(), creates a directory as well as
- * any necessary parent directories.
- *
- * @param string $dir directory name
- *
- * @return bool TRUE on success, or a PEAR error
- *
- * @access public
- */
- function mkDirHier($dir)
- {
- // Only used in Installer - move it there ?
- $this->log(2, "+ create dir $dir");
- if (!class_exists('System')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- }
- return System::mkDir(array('-p', $dir));
- }
-
- /**
- * Logging method.
- *
- * @param int $level log level (0 is quiet, higher is noisier)
- * @param string $msg message to write to the log
- *
- * @return void
- *
- * @access public
- * @static
- */
- function log($level, $msg, $append_crlf = true)
- {
- if ($this->debug >= $level) {
- if (!class_exists('PEAR_Frontend')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Frontend.php';
- }
-
- $ui = &PEAR_Frontend::singleton();
- if (is_a($ui, 'PEAR_Frontend')) {
- $ui->log($msg, $append_crlf);
- } else {
- print "$msg\n";
- }
- }
- }
-
- /**
- * Create and register a temporary directory.
- *
- * @param string $tmpdir (optional) Directory to use as tmpdir.
- * Will use system defaults (for example
- * /tmp or c:\windows\temp) if not specified
- *
- * @return string name of created directory
- *
- * @access public
- */
- function mkTempDir($tmpdir = '')
- {
- $topt = $tmpdir ? array('-t', $tmpdir) : array();
- $topt = array_merge($topt, array('-d', 'pear'));
- if (!class_exists('System')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- }
-
- if (!$tmpdir = System::mktemp($topt)) {
- return false;
- }
-
- $this->addTempFile($tmpdir);
- return $tmpdir;
- }
-
- /**
- * Set object that represents the frontend to be used.
- *
- * @param object Reference of the frontend object
- * @return void
- * @access public
- */
- function setFrontendObject(&$ui)
- {
- $this->ui = &$ui;
- }
-
- /**
- * Return an array containing all of the states that are more stable than
- * or equal to the passed in state
- *
- * @param string Release state
- * @param boolean Determines whether to include $state in the list
- * @return false|array False if $state is not a valid release state
- */
- function betterStates($state, $include = false)
- {
- static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- $i = array_search($state, $states);
- if ($i === false) {
- return false;
- }
- if ($include) {
- $i--;
- }
- return array_slice($states, $i + 1);
- }
-
- /**
- * Get the valid roles for a PEAR package maintainer
- *
- * @return array
- * @static
- */
- function getUserRoles()
- {
- return $GLOBALS['_PEAR_Common_maintainer_roles'];
- }
-
- /**
- * Get the valid package release states of packages
- *
- * @return array
- * @static
- */
- function getReleaseStates()
- {
- return $GLOBALS['_PEAR_Common_release_states'];
- }
-
- /**
- * Get the implemented dependency types (php, ext, pkg etc.)
- *
- * @return array
- * @static
- */
- function getDependencyTypes()
- {
- return $GLOBALS['_PEAR_Common_dependency_types'];
- }
-
- /**
- * Get the implemented dependency relations (has, lt, ge etc.)
- *
- * @return array
- * @static
- */
- function getDependencyRelations()
- {
- return $GLOBALS['_PEAR_Common_dependency_relations'];
- }
-
- /**
- * Get the implemented file roles
- *
- * @return array
- * @static
- */
- function getFileRoles()
- {
- return $GLOBALS['_PEAR_Common_file_roles'];
- }
-
- /**
- * Get the implemented file replacement types in
- *
- * @return array
- * @static
- */
- function getReplacementTypes()
- {
- return $GLOBALS['_PEAR_Common_replacement_types'];
- }
-
- /**
- * Get the implemented file replacement types in
- *
- * @return array
- * @static
- */
- function getProvideTypes()
- {
- return $GLOBALS['_PEAR_Common_provide_types'];
- }
-
- /**
- * Get the implemented file replacement types in
- *
- * @return array
- * @static
- */
- function getScriptPhases()
- {
- return $GLOBALS['_PEAR_Common_script_phases'];
- }
-
- /**
- * Test whether a string contains a valid package name.
- *
- * @param string $name the package name to test
- *
- * @return bool
- *
- * @access public
- */
- function validPackageName($name)
- {
- return (bool)preg_match(PEAR_COMMON_PACKAGE_NAME_PREG, $name);
- }
-
- /**
- * Test whether a string contains a valid package version.
- *
- * @param string $ver the package version to test
- *
- * @return bool
- *
- * @access public
- */
- function validPackageVersion($ver)
- {
- return (bool)preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver);
- }
-
- /**
- * @param string $path relative or absolute include path
- * @return boolean
- * @static
- */
- function isIncludeable($path)
- {
- if (file_exists($path) && is_readable($path)) {
- return true;
- }
-
- $ipath = explode(PATH_SEPARATOR, ini_get('include_path'));
- foreach ($ipath as $include) {
- $test = realpath($include . DIRECTORY_SEPARATOR . $path);
- if (file_exists($test) && is_readable($test)) {
- return true;
- }
- }
-
- return false;
- }
-
- function _postProcessChecks($pf)
- {
- if (!PEAR::isError($pf)) {
- return $this->_postProcessValidPackagexml($pf);
- }
-
- $errs = $pf->getUserinfo();
- if (is_array($errs)) {
- foreach ($errs as $error) {
- $e = $this->raiseError($error['message'], $error['code'], null, null, $error);
- }
- }
-
- return $pf;
- }
-
- /**
- * Returns information about a package file. Expects the name of
- * a gzipped tar file as input.
- *
- * @param string $file name of .tgz file
- *
- * @return array array with package information
- *
- * @access public
- * @deprecated use PEAR_PackageFile->fromTgzFile() instead
- *
- */
- function infoFromTgzFile($file)
- {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL);
- return $this->_postProcessChecks($pf);
- }
-
- /**
- * Returns information about a package file. Expects the name of
- * a package xml file as input.
- *
- * @param string $descfile name of package xml file
- *
- * @return array array with package information
- *
- * @access public
- * @deprecated use PEAR_PackageFile->fromPackageFile() instead
- *
- */
- function infoFromDescriptionFile($descfile)
- {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
- return $this->_postProcessChecks($pf);
- }
-
- /**
- * Returns information about a package file. Expects the contents
- * of a package xml file as input.
- *
- * @param string $data contents of package.xml file
- *
- * @return array array with package information
- *
- * @access public
- * @deprecated use PEAR_PackageFile->fromXmlstring() instead
- *
- */
- function infoFromString($data)
- {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromXmlString($data, PEAR_VALIDATE_NORMAL, false);
- return $this->_postProcessChecks($pf);
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return array
- */
- function _postProcessValidPackagexml(&$pf)
- {
- if (!is_a($pf, 'PEAR_PackageFile_v2')) {
- $this->pkginfo = $pf->toArray();
- return $this->pkginfo;
- }
-
- // sort of make this into a package.xml 1.0-style array
- // changelog is not converted to old format.
- $arr = $pf->toArray(true);
- $arr = array_merge($arr, $arr['old']);
- unset($arr['old'], $arr['xsdversion'], $arr['contents'], $arr['compatible'],
- $arr['channel'], $arr['uri'], $arr['dependencies'], $arr['phprelease'],
- $arr['extsrcrelease'], $arr['zendextsrcrelease'], $arr['extbinrelease'],
- $arr['zendextbinrelease'], $arr['bundle'], $arr['lead'], $arr['developer'],
- $arr['helper'], $arr['contributor']);
- $arr['filelist'] = $pf->getFilelist();
- $this->pkginfo = $arr;
- return $arr;
- }
-
- /**
- * Returns package information from different sources
- *
- * This method is able to extract information about a package
- * from a .tgz archive or from a XML package definition file.
- *
- * @access public
- * @param string Filename of the source ('package.xml', '<package>.tgz')
- * @return string
- * @deprecated use PEAR_PackageFile->fromAnyFile() instead
- */
- function infoFromAny($info)
- {
- if (is_string($info) && file_exists($info)) {
- $packagefile = new PEAR_PackageFile($this->config);
- $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL);
- if (PEAR::isError($pf)) {
- $errs = $pf->getUserinfo();
- if (is_array($errs)) {
- foreach ($errs as $error) {
- $e = $this->raiseError($error['message'], $error['code'], null, null, $error);
- }
- }
-
- return $pf;
- }
-
- return $this->_postProcessValidPackagexml($pf);
- }
-
- return $info;
- }
-
- /**
- * Return an XML document based on the package info (as returned
- * by the PEAR_Common::infoFrom* methods).
- *
- * @param array $pkginfo package info
- *
- * @return string XML data
- *
- * @access public
- * @deprecated use a PEAR_PackageFile_v* object's generator instead
- */
- function xmlFromInfo($pkginfo)
- {
- $config = &PEAR_Config::singleton();
- $packagefile = new PEAR_PackageFile($config);
- $pf = &$packagefile->fromArray($pkginfo);
- $gen = &$pf->getDefaultGenerator();
- return $gen->toXml(PEAR_VALIDATE_PACKAGING);
- }
-
- /**
- * Validate XML package definition file.
- *
- * @param string $info Filename of the package archive or of the
- * package definition file
- * @param array $errors Array that will contain the errors
- * @param array $warnings Array that will contain the warnings
- * @param string $dir_prefix (optional) directory where source files
- * may be found, or empty if they are not available
- * @access public
- * @return boolean
- * @deprecated use the validation of PEAR_PackageFile objects
- */
- function validatePackageInfo($info, &$errors, &$warnings, $dir_prefix = '')
- {
- $config = &PEAR_Config::singleton();
- $packagefile = new PEAR_PackageFile($config);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (strpos($info, '<?xml') !== false) {
- $pf = &$packagefile->fromXmlString($info, PEAR_VALIDATE_NORMAL, '');
- } else {
- $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL);
- }
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf)) {
- $errs = $pf->getUserinfo();
- if (is_array($errs)) {
- foreach ($errs as $error) {
- if ($error['level'] == 'error') {
- $errors[] = $error['message'];
- } else {
- $warnings[] = $error['message'];
- }
- }
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Build a "provides" array from data returned by
- * analyzeSourceCode(). The format of the built array is like
- * this:
- *
- * array(
- * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'),
- * ...
- * )
- *
- *
- * @param array $srcinfo array with information about a source file
- * as returned by the analyzeSourceCode() method.
- *
- * @return void
- *
- * @access public
- *
- */
- function buildProvidesArray($srcinfo)
- {
- $file = basename($srcinfo['source_file']);
- $pn = '';
- if (isset($this->_packageName)) {
- $pn = $this->_packageName;
- }
-
- $pnl = strlen($pn);
- foreach ($srcinfo['declared_classes'] as $class) {
- $key = "class;$class";
- if (isset($this->pkginfo['provides'][$key])) {
- continue;
- }
-
- $this->pkginfo['provides'][$key] =
- array('file'=> $file, 'type' => 'class', 'name' => $class);
- if (isset($srcinfo['inheritance'][$class])) {
- $this->pkginfo['provides'][$key]['extends'] =
- $srcinfo['inheritance'][$class];
- }
- }
-
- foreach ($srcinfo['declared_methods'] as $class => $methods) {
- foreach ($methods as $method) {
- $function = "$class::$method";
- $key = "function;$function";
- if ($method{0} == '_' || !strcasecmp($method, $class) ||
- isset($this->pkginfo['provides'][$key])) {
- continue;
- }
-
- $this->pkginfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- foreach ($srcinfo['declared_functions'] as $function) {
- $key = "function;$function";
- if ($function{0} == '_' || isset($this->pkginfo['provides'][$key])) {
- continue;
- }
-
- if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {
- $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\"";
- }
-
- $this->pkginfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- /**
- * Analyze the source code of the given PHP file
- *
- * @param string Filename of the PHP file
- * @return mixed
- * @access public
- */
- function analyzeSourceCode($file)
- {
- if (!class_exists('PEAR_PackageFile_v2_Validator')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2/Validator.php';
- }
-
- $a = new PEAR_PackageFile_v2_Validator;
- return $a->analyzeSourceCode($file);
- }
-
- function detectDependencies($any, $status_callback = null)
- {
- if (!function_exists("token_get_all")) {
- return false;
- }
-
- if (PEAR::isError($info = $this->infoFromAny($any))) {
- return $this->raiseError($info);
- }
-
- if (!is_array($info)) {
- return false;
- }
-
- $deps = array();
- $used_c = $decl_c = $decl_f = $decl_m = array();
- foreach ($info['filelist'] as $file => $fa) {
- $tmp = $this->analyzeSourceCode($file);
- $used_c = @array_merge($used_c, $tmp['used_classes']);
- $decl_c = @array_merge($decl_c, $tmp['declared_classes']);
- $decl_f = @array_merge($decl_f, $tmp['declared_functions']);
- $decl_m = @array_merge($decl_m, $tmp['declared_methods']);
- $inheri = @array_merge($inheri, $tmp['inheritance']);
- }
-
- $used_c = array_unique($used_c);
- $decl_c = array_unique($decl_c);
- $undecl_c = array_diff($used_c, $decl_c);
-
- return array('used_classes' => $used_c,
- 'declared_classes' => $decl_c,
- 'declared_methods' => $decl_m,
- 'declared_functions' => $decl_f,
- 'undeclared_classes' => $undecl_c,
- 'inheritance' => $inheri,
- );
- }
-
- /**
- * Download a file through HTTP. Considers suggested file name in
- * Content-disposition: header and can run a callback function for
- * different events. The callback will be called with two
- * parameters: the callback type, and parameters. The implemented
- * callback types are:
- *
- * 'setup' called at the very beginning, parameter is a UI object
- * that should be used for all output
- * 'message' the parameter is a string with an informational message
- * 'saveas' may be used to save with a different file name, the
- * parameter is the filename that is about to be used.
- * If a 'saveas' callback returns a non-empty string,
- * that file name will be used as the filename instead.
- * Note that $save_dir will not be affected by this, only
- * the basename of the file.
- * 'start' download is starting, parameter is number of bytes
- * that are expected, or -1 if unknown
- * 'bytesread' parameter is the number of bytes read so far
- * 'done' download is complete, parameter is the total number
- * of bytes read
- * 'connfailed' if the TCP connection fails, this callback is called
- * with array(host,port,errno,errmsg)
- * 'writefailed' if writing to disk fails, this callback is called
- * with array(destfile,errmsg)
- *
- * If an HTTP proxy has been configured (http_proxy PEAR_Config
- * setting), the proxy will be used.
- *
- * @param string $url the URL to download
- * @param object $ui PEAR_Frontend_* instance
- * @param object $config PEAR_Config instance
- * @param string $save_dir (optional) directory to save file in
- * @param mixed $callback (optional) function/method to call for status
- * updates
- *
- * @return string Returns the full path of the downloaded file or a PEAR
- * error on failure. If the error is caused by
- * socket-related errors, the error object will
- * have the fsockopen error code available through
- * getCode().
- *
- * @access public
- * @deprecated in favor of PEAR_Downloader::downloadHttp()
- */
- function downloadHttp($url, &$ui, $save_dir = '.', $callback = null)
- {
- if (!class_exists('PEAR_Downloader')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Downloader.php';
- }
- return PEAR_Downloader::downloadHttp($url, $ui, $save_dir, $callback);
- }
-}
-
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Config.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
-<?php
-/**
- * PEAR_Config, customized configuration handling for the PEAR Installer
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * Required for error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Registry.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Installer/Role.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
-
-/**
- * Last created PEAR_Config instance.
- * @var object
- */
-$GLOBALS['_PEAR_Config_instance'] = null;
-if (!defined('PEAR_INSTALL_DIR') || !PEAR_INSTALL_DIR) {
- $PEAR_INSTALL_DIR = PHP_LIBDIR . DIRECTORY_SEPARATOR . 'pear';
-} else {
- $PEAR_INSTALL_DIR = PEAR_INSTALL_DIR;
-}
-
-// Below we define constants with default values for all configuration
-// parameters except username/password. All of them can have their
-// defaults set through environment variables. The reason we use the
-// PHP_ prefix is for some security, PHP protects environment
-// variables starting with PHP_*.
-
-// default channel and preferred mirror is based on whether we are invoked through
-// the "pear" or the "pecl" command
-if (!defined('PEAR_RUNTYPE')) {
- define('PEAR_RUNTYPE', 'pear');
-}
-
-if (PEAR_RUNTYPE == 'pear') {
- define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pear.php.net');
-} else {
- define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pecl.php.net');
-}
-
-if (getenv('PHP_PEAR_SYSCONF_DIR')) {
- define('PEAR_CONFIG_SYSCONFDIR', getenv('PHP_PEAR_SYSCONF_DIR'));
-} elseif (getenv('SystemRoot')) {
- define('PEAR_CONFIG_SYSCONFDIR', getenv('SystemRoot'));
-} else {
- define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR);
-}
-
-// Default for master_server
-if (getenv('PHP_PEAR_MASTER_SERVER')) {
- define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', getenv('PHP_PEAR_MASTER_SERVER'));
-} else {
- define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', 'pear.php.net');
-}
-
-// Default for http_proxy
-if (getenv('PHP_PEAR_HTTP_PROXY')) {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('PHP_PEAR_HTTP_PROXY'));
-} elseif (getenv('http_proxy')) {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('http_proxy'));
-} else {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', '');
-}
-
-// Default for php_dir
-if (getenv('PHP_PEAR_INSTALL_DIR')) {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', getenv('PHP_PEAR_INSTALL_DIR'));
-} else {
- if (@file_exists($PEAR_INSTALL_DIR) && is_dir($PEAR_INSTALL_DIR)) {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR);
- } else {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR);
- }
-}
-
-// Default for ext_dir
-if (getenv('PHP_PEAR_EXTENSION_DIR')) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR'));
-} else {
- if (ini_get('extension_dir')) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir'));
- } elseif (defined('PEAR_EXTENSION_DIR') &&
- file_exists(PEAR_EXTENSION_DIR) && is_dir(PEAR_EXTENSION_DIR)) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR);
- } elseif (defined('PHP_EXTENSION_DIR')) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR);
- } else {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.');
- }
-}
-
-// Default for doc_dir
-if (getenv('PHP_PEAR_DOC_DIR')) {
- define('PEAR_CONFIG_DEFAULT_DOC_DIR', getenv('PHP_PEAR_DOC_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_DOC_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'docs');
-}
-
-// Default for bin_dir
-if (getenv('PHP_PEAR_BIN_DIR')) {
- define('PEAR_CONFIG_DEFAULT_BIN_DIR', getenv('PHP_PEAR_BIN_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_BIN_DIR', PHP_BINDIR);
-}
-
-// Default for data_dir
-if (getenv('PHP_PEAR_DATA_DIR')) {
- define('PEAR_CONFIG_DEFAULT_DATA_DIR', getenv('PHP_PEAR_DATA_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_DATA_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data');
-}
-
-// Default for cfg_dir
-if (getenv('PHP_PEAR_CFG_DIR')) {
- define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_CFG_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg');
-}
-
-// Default for www_dir
-if (getenv('PHP_PEAR_WWW_DIR')) {
- define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_WWW_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www');
-}
-
-// Default for test_dir
-if (getenv('PHP_PEAR_TEST_DIR')) {
- define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_TEST_DIR',
- $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests');
-}
-
-// Default for temp_dir
-if (getenv('PHP_PEAR_TEMP_DIR')) {
- define('PEAR_CONFIG_DEFAULT_TEMP_DIR', getenv('PHP_PEAR_TEMP_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_TEMP_DIR',
- System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'temp');
-}
-
-// Default for cache_dir
-if (getenv('PHP_PEAR_CACHE_DIR')) {
- define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_CACHE_DIR',
- System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'cache');
-}
-
-// Default for download_dir
-if (getenv('PHP_PEAR_DOWNLOAD_DIR')) {
- define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', getenv('PHP_PEAR_DOWNLOAD_DIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR',
- System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'download');
-}
-
-// Default for php_bin
-if (getenv('PHP_PEAR_PHP_BIN')) {
- define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN'));
-} else {
- define('PEAR_CONFIG_DEFAULT_PHP_BIN', PEAR_CONFIG_DEFAULT_BIN_DIR.
- DIRECTORY_SEPARATOR.'php'.(OS_WINDOWS ? '.exe' : ''));
-}
-
-// Default for verbose
-if (getenv('PHP_PEAR_VERBOSE')) {
- define('PEAR_CONFIG_DEFAULT_VERBOSE', getenv('PHP_PEAR_VERBOSE'));
-} else {
- define('PEAR_CONFIG_DEFAULT_VERBOSE', 1);
-}
-
-// Default for preferred_state
-if (getenv('PHP_PEAR_PREFERRED_STATE')) {
- define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', getenv('PHP_PEAR_PREFERRED_STATE'));
-} else {
- define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', 'stable');
-}
-
-// Default for umask
-if (getenv('PHP_PEAR_UMASK')) {
- define('PEAR_CONFIG_DEFAULT_UMASK', getenv('PHP_PEAR_UMASK'));
-} else {
- define('PEAR_CONFIG_DEFAULT_UMASK', decoct(umask()));
-}
-
-// Default for cache_ttl
-if (getenv('PHP_PEAR_CACHE_TTL')) {
- define('PEAR_CONFIG_DEFAULT_CACHE_TTL', getenv('PHP_PEAR_CACHE_TTL'));
-} else {
- define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 3600);
-}
-
-// Default for sig_type
-if (getenv('PHP_PEAR_SIG_TYPE')) {
- define('PEAR_CONFIG_DEFAULT_SIG_TYPE', getenv('PHP_PEAR_SIG_TYPE'));
-} else {
- define('PEAR_CONFIG_DEFAULT_SIG_TYPE', 'gpg');
-}
-
-// Default for sig_bin
-if (getenv('PHP_PEAR_SIG_BIN')) {
- define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN'));
-} else {
- define('PEAR_CONFIG_DEFAULT_SIG_BIN',
- System::which(
- 'gpg', OS_WINDOWS ? 'c:\gnupg\gpg.exe' : '/usr/local/bin/gpg'));
-}
-
-// Default for sig_keydir
-if (getenv('PHP_PEAR_SIG_KEYDIR')) {
- define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', getenv('PHP_PEAR_SIG_KEYDIR'));
-} else {
- define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR',
- PEAR_CONFIG_SYSCONFDIR . DIRECTORY_SEPARATOR . 'pearkeys');
-}
-
-/**
- * This is a class for storing configuration data, keeping track of
- * which are system-defined, user-defined or defaulted.
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Config extends PEAR
-{
- /**
- * Array of config files used.
- *
- * @var array layer => config file
- */
- var $files = array(
- 'system' => '',
- 'user' => '',
- );
-
- var $layers = array();
-
- /**
- * Configuration data, two-dimensional array where the first
- * dimension is the config layer ('user', 'system' and 'default'),
- * and the second dimension is keyname => value.
- *
- * The order in the first dimension is important! Earlier
- * layers will shadow later ones when a config value is
- * requested (if a 'user' value exists, it will be returned first,
- * then 'system' and finally 'default').
- *
- * @var array layer => array(keyname => value, ...)
- */
- var $configuration = array(
- 'user' => array(),
- 'system' => array(),
- 'default' => array(),
- );
-
- /**
- * Configuration values that can be set for a channel
- *
- * All other configuration values can only have a global value
- * @var array
- * @access private
- */
- var $_channelConfigInfo = array(
- 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir',
- 'test_dir', 'www_dir', 'php_bin', 'php_prefix', 'php_suffix', 'username',
- 'password', 'verbose', 'preferred_state', 'umask', 'preferred_mirror', 'php_ini'
- );
-
- /**
- * Channels that can be accessed
- * @see setChannels()
- * @var array
- * @access private
- */
- var $_channels = array('pear.php.net', 'pecl.php.net', '__uri');
-
- /**
- * This variable is used to control the directory values returned
- * @see setInstallRoot();
- * @var string|false
- * @access private
- */
- var $_installRoot = false;
-
- /**
- * If requested, this will always refer to the registry
- * contained in php_dir
- * @var PEAR_Registry
- */
- var $_registry = array();
-
- /**
- * @var array
- * @access private
- */
- var $_regInitialized = array();
-
- /**
- * @var bool
- * @access private
- */
- var $_noRegistry = false;
-
- /**
- * amount of errors found while parsing config
- * @var integer
- * @access private
- */
- var $_errorsFound = 0;
- var $_lastError = null;
-
- /**
- * Information about the configuration data. Stores the type,
- * default value and a documentation string for each configuration
- * value.
- *
- * @var array layer => array(infotype => value, ...)
- */
- var $configuration_info = array(
- // Channels/Internet Access
- 'default_channel' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_CHANNEL,
- 'doc' => 'the default channel to use for all non explicit commands',
- 'prompt' => 'Default Channel',
- 'group' => 'Internet Access',
- ),
- 'preferred_mirror' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_CHANNEL,
- 'doc' => 'the default server or mirror to use for channel actions',
- 'prompt' => 'Default Channel Mirror',
- 'group' => 'Internet Access',
- ),
- 'remote_config' => array(
- 'type' => 'password',
- 'default' => '',
- 'doc' => 'ftp url of remote configuration file to use for synchronized install',
- 'prompt' => 'Remote Configuration File',
- 'group' => 'Internet Access',
- ),
- 'auto_discover' => array(
- 'type' => 'integer',
- 'default' => 0,
- 'doc' => 'whether to automatically discover new channels',
- 'prompt' => 'Auto-discover new Channels',
- 'group' => 'Internet Access',
- ),
- // Internet Access
- 'master_server' => array(
- 'type' => 'string',
- 'default' => 'pear.php.net',
- 'doc' => 'name of the main PEAR server [NOT USED IN THIS VERSION]',
- 'prompt' => 'PEAR server [DEPRECATED]',
- 'group' => 'Internet Access',
- ),
- 'http_proxy' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_HTTP_PROXY,
- 'doc' => 'HTTP proxy (host:port) to use when downloading packages',
- 'prompt' => 'HTTP Proxy Server Address',
- 'group' => 'Internet Access',
- ),
- // File Locations
- 'php_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_PHP_DIR,
- 'doc' => 'directory where .php files are installed',
- 'prompt' => 'PEAR directory',
- 'group' => 'File Locations',
- ),
- 'ext_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_EXT_DIR,
- 'doc' => 'directory where loadable extensions are installed',
- 'prompt' => 'PHP extension directory',
- 'group' => 'File Locations',
- ),
- 'doc_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_DOC_DIR,
- 'doc' => 'directory where documentation is installed',
- 'prompt' => 'PEAR documentation directory',
- 'group' => 'File Locations',
- ),
- 'bin_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_BIN_DIR,
- 'doc' => 'directory where executables are installed',
- 'prompt' => 'PEAR executables directory',
- 'group' => 'File Locations',
- ),
- 'data_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_DATA_DIR,
- 'doc' => 'directory where data files are installed',
- 'prompt' => 'PEAR data directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'cfg_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR,
- 'doc' => 'directory where modifiable configuration files are installed',
- 'prompt' => 'PEAR configuration file directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'www_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR,
- 'doc' => 'directory where www frontend files (html/js) are installed',
- 'prompt' => 'PEAR www files directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'test_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR,
- 'doc' => 'directory where regression tests are installed',
- 'prompt' => 'PEAR test directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'cache_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR,
- 'doc' => 'directory which is used for web service cache',
- 'prompt' => 'PEAR Installer cache directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'temp_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_TEMP_DIR,
- 'doc' => 'directory which is used for all temp files',
- 'prompt' => 'PEAR Installer temp directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'download_dir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR,
- 'doc' => 'directory which is used for all downloaded files',
- 'prompt' => 'PEAR Installer download directory',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_bin' => array(
- 'type' => 'file',
- 'default' => PEAR_CONFIG_DEFAULT_PHP_BIN,
- 'doc' => 'PHP CLI/CGI binary for executing scripts',
- 'prompt' => 'PHP CLI/CGI binary',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_prefix' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => '--program-prefix for php_bin\'s ./configure, used for pecl installs',
- 'prompt' => '--program-prefix passed to PHP\'s ./configure',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_suffix' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => '--program-suffix for php_bin\'s ./configure, used for pecl installs',
- 'prompt' => '--program-suffix passed to PHP\'s ./configure',
- 'group' => 'File Locations (Advanced)',
- ),
- 'php_ini' => array(
- 'type' => 'file',
- 'default' => '',
- 'doc' => 'location of php.ini in which to enable PECL extensions on install',
- 'prompt' => 'php.ini location',
- 'group' => 'File Locations (Advanced)',
- ),
- // Maintainers
- 'username' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => '(maintainers) your PEAR account name',
- 'prompt' => 'PEAR username (for maintainers)',
- 'group' => 'Maintainers',
- ),
- 'password' => array(
- 'type' => 'password',
- 'default' => '',
- 'doc' => '(maintainers) your PEAR account password',
- 'prompt' => 'PEAR password (for maintainers)',
- 'group' => 'Maintainers',
- ),
- // Advanced
- 'verbose' => array(
- 'type' => 'integer',
- 'default' => PEAR_CONFIG_DEFAULT_VERBOSE,
- 'doc' => 'verbosity level
-0: really quiet
-1: somewhat quiet
-2: verbose
-3: debug',
- 'prompt' => 'Debug Log Level',
- 'group' => 'Advanced',
- ),
- 'preferred_state' => array(
- 'type' => 'set',
- 'default' => PEAR_CONFIG_DEFAULT_PREFERRED_STATE,
- 'doc' => 'the installer will prefer releases with this state when installing packages without a version or state specified',
- 'valid_set' => array(
- 'stable', 'beta', 'alpha', 'devel', 'snapshot'),
- 'prompt' => 'Preferred Package State',
- 'group' => 'Advanced',
- ),
- 'umask' => array(
- 'type' => 'mask',
- 'default' => PEAR_CONFIG_DEFAULT_UMASK,
- 'doc' => 'umask used when creating files (Unix-like systems only)',
- 'prompt' => 'Unix file mask',
- 'group' => 'Advanced',
- ),
- 'cache_ttl' => array(
- 'type' => 'integer',
- 'default' => PEAR_CONFIG_DEFAULT_CACHE_TTL,
- 'doc' => 'amount of secs where the local cache is used and not updated',
- 'prompt' => 'Cache TimeToLive',
- 'group' => 'Advanced',
- ),
- 'sig_type' => array(
- 'type' => 'set',
- 'default' => PEAR_CONFIG_DEFAULT_SIG_TYPE,
- 'doc' => 'which package signature mechanism to use',
- 'valid_set' => array('gpg'),
- 'prompt' => 'Package Signature Type',
- 'group' => 'Maintainers',
- ),
- 'sig_bin' => array(
- 'type' => 'string',
- 'default' => PEAR_CONFIG_DEFAULT_SIG_BIN,
- 'doc' => 'which package signature mechanism to use',
- 'prompt' => 'Signature Handling Program',
- 'group' => 'Maintainers',
- ),
- 'sig_keyid' => array(
- 'type' => 'string',
- 'default' => '',
- 'doc' => 'which key to use for signing with',
- 'prompt' => 'Signature Key Id',
- 'group' => 'Maintainers',
- ),
- 'sig_keydir' => array(
- 'type' => 'directory',
- 'default' => PEAR_CONFIG_DEFAULT_SIG_KEYDIR,
- 'doc' => 'directory where signature keys are located',
- 'prompt' => 'Signature Key Directory',
- 'group' => 'Maintainers',
- ),
- // __channels is reserved - used for channel-specific configuration
- );
-
- /**
- * Constructor.
- *
- * @param string file to read user-defined options from
- * @param string file to read system-wide defaults from
- * @param bool determines whether a registry object "follows"
- * the value of php_dir (is automatically created
- * and moved when php_dir is changed)
- * @param bool if true, fails if configuration files cannot be loaded
- *
- * @access public
- *
- * @see PEAR_Config::singleton
- */
- function __construct($user_file = '', $system_file = '', $ftp_file = false,
- $strict = true)
- {
- parent::__construct();
- PEAR_Installer_Role::initializeConfig($this);
- $sl = DIRECTORY_SEPARATOR;
- if (empty($user_file)) {
- if (OS_WINDOWS) {
- $user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini';
- } else {
- $user_file = getenv('HOME') . $sl . '.pearrc';
- }
- }
-
- if (empty($system_file)) {
- $system_file = PEAR_CONFIG_SYSCONFDIR . $sl;
- if (OS_WINDOWS) {
- $system_file .= 'pearsys.ini';
- } else {
- $system_file .= 'pear.conf';
- }
- }
-
- $this->layers = array_keys($this->configuration);
- $this->files['user'] = $user_file;
- $this->files['system'] = $system_file;
- if ($user_file && file_exists($user_file)) {
- $this->pushErrorHandling(PEAR_ERROR_RETURN);
- $this->readConfigFile($user_file, 'user', $strict);
- $this->popErrorHandling();
- if ($this->_errorsFound > 0) {
- return;
- }
- }
-
- if ($system_file && @file_exists($system_file)) {
- $this->mergeConfigFile($system_file, false, 'system', $strict);
- if ($this->_errorsFound > 0) {
- return;
- }
-
- }
-
- if (!$ftp_file) {
- $ftp_file = $this->get('remote_config');
- }
-
- if ($ftp_file && defined('PEAR_REMOTEINSTALL_OK')) {
- $this->readFTPConfigFile($ftp_file);
- }
-
- foreach ($this->configuration_info as $key => $info) {
- $this->configuration['default'][$key] = $info['default'];
- }
-
- $this->_registry['default'] = new PEAR_Registry($this->configuration['default']['php_dir']);
- $this->_registry['default']->setConfig($this, false);
- $this->_regInitialized['default'] = false;
- //$GLOBALS['_PEAR_Config_instance'] = &$this;
- }
-
- /**
- * Return the default locations of user and system configuration files
- * @static
- */
- function getDefaultConfigFiles()
- {
- $sl = DIRECTORY_SEPARATOR;
- if (OS_WINDOWS) {
- return array(
- 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini',
- 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini'
- );
- }
-
- return array(
- 'user' => getenv('HOME') . $sl . '.pearrc',
- 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf'
- );
- }
-
- /**
- * Static singleton method. If you want to keep only one instance
- * of this class in use, this method will give you a reference to
- * the last created PEAR_Config object if one exists, or create a
- * new object.
- *
- * @param string (optional) file to read user-defined options from
- * @param string (optional) file to read system-wide defaults from
- *
- * @return object an existing or new PEAR_Config instance
- *
- * @access public
- *
- * @see PEAR_Config::PEAR_Config
- */
- function &singleton($user_file = '', $system_file = '', $strict = true)
- {
- if (is_object($GLOBALS['_PEAR_Config_instance'])) {
- return $GLOBALS['_PEAR_Config_instance'];
- }
-
- $t_conf = new PEAR_Config($user_file, $system_file, false, $strict);
- if ($t_conf->_errorsFound > 0) {
- return $t_conf->lastError;
- }
-
- $GLOBALS['_PEAR_Config_instance'] = &$t_conf;
- return $GLOBALS['_PEAR_Config_instance'];
- }
-
- /**
- * Determine whether any configuration files have been detected, and whether a
- * registry object can be retrieved from this configuration.
- * @return bool
- * @since PEAR 1.4.0a1
- */
- function validConfiguration()
- {
- if ($this->isDefinedLayer('user') || $this->isDefinedLayer('system')) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Reads configuration data from a file. All existing values in
- * the config layer are discarded and replaced with data from the
- * file.
- * @param string file to read from, if NULL or not specified, the
- * last-used file for the same layer (second param) is used
- * @param string config layer to insert data into ('user' or 'system')
- * @return bool TRUE on success or a PEAR error on failure
- */
- function readConfigFile($file = null, $layer = 'user', $strict = true)
- {
- if (empty($this->files[$layer])) {
- return $this->raiseError("unknown config layer `$layer'");
- }
-
- if ($file === null) {
- $file = $this->files[$layer];
- }
-
- $data = $this->_readConfigDataFrom($file);
- if (PEAR::isError($data)) {
- if (!$strict) {
- return true;
- }
-
- $this->_errorsFound++;
- $this->lastError = $data;
-
- return $data;
- }
-
- $this->files[$layer] = $file;
- $this->_decodeInput($data);
- $this->configuration[$layer] = $data;
- $this->_setupChannels();
- if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
- $this->_registry[$layer] = new PEAR_Registry($phpdir);
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- } else {
- unset($this->_registry[$layer]);
- }
- return true;
- }
-
- /**
- * @param string url to the remote config file, like ftp://www.example.com/pear/config.ini
- * @return true|PEAR_Error
- */
- function readFTPConfigFile($path)
- {
- do { // poor man's try
- if (!class_exists('PEAR_FTP')) {
- if (!class_exists('PEAR_Common')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
- }
- if (PEAR_Common::isIncludeable('PEAR/FTP.php')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/FTP.php';
- }
- }
-
- if (!class_exists('PEAR_FTP')) {
- return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config');
- }
-
- $this->_ftp = new PEAR_FTP;
- $this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN);
- $e = $this->_ftp->init($path);
- if (PEAR::isError($e)) {
- $this->_ftp->popErrorHandling();
- return $e;
- }
-
- $tmp = System::mktemp('-d');
- PEAR_Common::addTempFile($tmp);
- $e = $this->_ftp->get(basename($path), $tmp . DIRECTORY_SEPARATOR .
- 'pear.ini', false, FTP_BINARY);
- if (PEAR::isError($e)) {
- $this->_ftp->popErrorHandling();
- return $e;
- }
-
- PEAR_Common::addTempFile($tmp . DIRECTORY_SEPARATOR . 'pear.ini');
- $this->_ftp->disconnect();
- $this->_ftp->popErrorHandling();
- $this->files['ftp'] = $tmp . DIRECTORY_SEPARATOR . 'pear.ini';
- $e = $this->readConfigFile(null, 'ftp');
- if (PEAR::isError($e)) {
- return $e;
- }
-
- $fail = array();
- foreach ($this->configuration_info as $key => $val) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- // any directory configs must be set for this to work
- if (!isset($this->configuration['ftp'][$key])) {
- $fail[] = $key;
- }
- }
- }
-
- if (!count($fail)) {
- return true;
- }
-
- $fail = '"' . implode('", "', $fail) . '"';
- unset($this->files['ftp']);
- unset($this->configuration['ftp']);
- return PEAR::raiseError('ERROR: Ftp configuration file must set all ' .
- 'directory configuration variables. These variables were not set: ' .
- $fail);
- } while (false); // poor man's catch
- unset($this->files['ftp']);
- return PEAR::raiseError('no remote host specified');
- }
-
- /**
- * Reads the existing configurations and creates the _channels array from it
- */
- function _setupChannels()
- {
- $set = array_flip(array_values($this->_channels));
- foreach ($this->configuration as $layer => $data) {
- $i = 1000;
- if (isset($data['__channels']) && is_array($data['__channels'])) {
- foreach ($data['__channels'] as $channel => $info) {
- $set[$channel] = $i++;
- }
- }
- }
- $this->_channels = array_values(array_flip($set));
- $this->setChannels($this->_channels);
- }
-
- function deleteChannel($channel)
- {
- $ch = strtolower($channel);
- foreach ($this->configuration as $layer => $data) {
- if (isset($data['__channels']) && isset($data['__channels'][$ch])) {
- unset($this->configuration[$layer]['__channels'][$ch]);
- }
- }
-
- $this->_channels = array_flip($this->_channels);
- unset($this->_channels[$ch]);
- $this->_channels = array_flip($this->_channels);
- }
-
- /**
- * Merges data into a config layer from a file. Does the same
- * thing as readConfigFile, except it does not replace all
- * existing values in the config layer.
- * @param string file to read from
- * @param bool whether to overwrite existing data (default TRUE)
- * @param string config layer to insert data into ('user' or 'system')
- * @param string if true, errors are returned if file opening fails
- * @return bool TRUE on success or a PEAR error on failure
- */
- function mergeConfigFile($file, $override = true, $layer = 'user', $strict = true)
- {
- if (empty($this->files[$layer])) {
- return $this->raiseError("unknown config layer `$layer'");
- }
-
- if ($file === null) {
- $file = $this->files[$layer];
- }
-
- $data = $this->_readConfigDataFrom($file);
- if (PEAR::isError($data)) {
- if (!$strict) {
- return true;
- }
-
- $this->_errorsFound++;
- $this->lastError = $data;
-
- return $data;
- }
-
- $this->_decodeInput($data);
- if ($override) {
- $this->configuration[$layer] =
- PEAR_Config::arrayMergeRecursive($this->configuration[$layer], $data);
- } else {
- $this->configuration[$layer] =
- PEAR_Config::arrayMergeRecursive($data, $this->configuration[$layer]);
- }
-
- $this->_setupChannels();
- if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
- $this->_registry[$layer] = new PEAR_Registry($phpdir);
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- } else {
- unset($this->_registry[$layer]);
- }
- return true;
- }
-
- /**
- * @param array
- * @param array
- * @return array
- * @static
- */
- function arrayMergeRecursive($arr2, $arr1)
- {
- $ret = array();
- foreach ($arr2 as $key => $data) {
- if (!isset($arr1[$key])) {
- $ret[$key] = $data;
- unset($arr1[$key]);
- continue;
- }
- if (is_array($data)) {
- if (!is_array($arr1[$key])) {
- $ret[$key] = $arr1[$key];
- unset($arr1[$key]);
- continue;
- }
- $ret[$key] = PEAR_Config::arrayMergeRecursive($arr1[$key], $arr2[$key]);
- unset($arr1[$key]);
- }
- }
-
- return array_merge($ret, $arr1);
- }
-
- /**
- * Writes data into a config layer from a file.
- *
- * @param string|null file to read from, or null for default
- * @param string config layer to insert data into ('user' or
- * 'system')
- * @param string|null data to write to config file or null for internal data [DEPRECATED]
- * @return bool TRUE on success or a PEAR error on failure
- */
- function writeConfigFile($file = null, $layer = 'user', $data = null)
- {
- $this->_lazyChannelSetup($layer);
- if ($layer == 'both' || $layer == 'all') {
- foreach ($this->files as $type => $file) {
- $err = $this->writeConfigFile($file, $type, $data);
- if (PEAR::isError($err)) {
- return $err;
- }
- }
- return true;
- }
-
- if (empty($this->files[$layer])) {
- return $this->raiseError("unknown config file type `$layer'");
- }
-
- if ($file === null) {
- $file = $this->files[$layer];
- }
-
- $data = ($data === null) ? $this->configuration[$layer] : $data;
- $this->_encodeOutput($data);
- $opt = array('-p', dirname($file));
- if (!@System::mkDir($opt)) {
- return $this->raiseError("could not create directory: " . dirname($file));
- }
-
- if (file_exists($file) && is_file($file) && !is_writeable($file)) {
- return $this->raiseError("no write access to $file!");
- }
-
- $fp = @fopen($file, "w");
- if (!$fp) {
- return $this->raiseError("PEAR_Config::writeConfigFile fopen('$file','w') failed ($php_errormsg)");
- }
-
- $contents = "#PEAR_Config 0.9\n" . serialize($data);
- if (!@fwrite($fp, $contents)) {
- return $this->raiseError("PEAR_Config::writeConfigFile: fwrite failed ($php_errormsg)");
- }
- return true;
- }
-
- /**
- * Reads configuration data from a file and returns the parsed data
- * in an array.
- *
- * @param string file to read from
- * @return array configuration data or a PEAR error on failure
- * @access private
- */
- function _readConfigDataFrom($file)
- {
- $fp = false;
- if (file_exists($file)) {
- $fp = @fopen($file, "r");
- }
-
- if (!$fp) {
- return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed");
- }
-
- $size = filesize($file);
- fclose($fp);
- $contents = file_get_contents($file);
- if (empty($contents)) {
- return $this->raiseError('Configuration file "' . $file . '" is empty');
- }
-
- $version = false;
- if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) {
- $version = $matches[1];
- $contents = substr($contents, strlen($matches[0]));
- } else {
- // Museum config file
- if (substr($contents,0,2) == 'a:') {
- $version = '0.1';
- }
- }
-
- if ($version && version_compare("$version", '1', '<')) {
- // no '@', it is possible that unserialize
- // raises a notice but it seems to block IO to
- // STDOUT if a '@' is used and a notice is raise
- $data = unserialize($contents);
-
- if (!is_array($data) && !$data) {
- if ($contents == serialize(false)) {
- $data = array();
- } else {
- $err = $this->raiseError("PEAR_Config: bad data in $file");
- return $err;
- }
- }
- if (!is_array($data)) {
- if (strlen(trim($contents)) > 0) {
- $error = "PEAR_Config: bad data in $file";
- $err = $this->raiseError($error);
- return $err;
- }
-
- $data = array();
- }
- // add parsing of newer formats here...
- } else {
- $err = $this->raiseError("$file: unknown version `$version'");
- return $err;
- }
-
- return $data;
- }
-
- /**
- * Gets the file used for storing the config for a layer
- *
- * @param string $layer 'user' or 'system'
- */
- function getConfFile($layer)
- {
- return $this->files[$layer];
- }
-
- /**
- * @param string Configuration class name, used for detecting duplicate calls
- * @param array information on a role as parsed from its xml file
- * @return true|PEAR_Error
- * @access private
- */
- function _addConfigVars($class, $vars)
- {
- static $called = array();
- if (isset($called[$class])) {
- return;
- }
-
- $called[$class] = 1;
- if (count($vars) > 3) {
- return $this->raiseError('Roles can only define 3 new config variables or less');
- }
-
- foreach ($vars as $name => $var) {
- if (!is_array($var)) {
- return $this->raiseError('Configuration information must be an array');
- }
-
- if (!isset($var['type'])) {
- return $this->raiseError('Configuration information must contain a type');
- } elseif (!in_array($var['type'],
- array('string', 'mask', 'password', 'directory', 'file', 'set'))) {
- return $this->raiseError(
- 'Configuration type must be one of directory, file, string, ' .
- 'mask, set, or password');
- }
- if (!isset($var['default'])) {
- return $this->raiseError(
- 'Configuration information must contain a default value ("default" index)');
- }
-
- if (is_array($var['default'])) {
- $real_default = '';
- foreach ($var['default'] as $config_var => $val) {
- if (strpos($config_var, 'text') === 0) {
- $real_default .= $val;
- } elseif (strpos($config_var, 'constant') === 0) {
- if (!defined($val)) {
- return $this->raiseError(
- 'Unknown constant "' . $val . '" requested in ' .
- 'default value for configuration variable "' .
- $name . '"');
- }
-
- $real_default .= constant($val);
- } elseif (isset($this->configuration_info[$config_var])) {
- $real_default .=
- $this->configuration_info[$config_var]['default'];
- } else {
- return $this->raiseError(
- 'Unknown request for "' . $config_var . '" value in ' .
- 'default value for configuration variable "' .
- $name . '"');
- }
- }
- $var['default'] = $real_default;
- }
-
- if ($var['type'] == 'integer') {
- $var['default'] = (integer) $var['default'];
- }
-
- if (!isset($var['doc'])) {
- return $this->raiseError(
- 'Configuration information must contain a summary ("doc" index)');
- }
-
- if (!isset($var['prompt'])) {
- return $this->raiseError(
- 'Configuration information must contain a simple prompt ("prompt" index)');
- }
-
- if (!isset($var['group'])) {
- return $this->raiseError(
- 'Configuration information must contain a simple group ("group" index)');
- }
-
- if (isset($this->configuration_info[$name])) {
- return $this->raiseError('Configuration variable "' . $name .
- '" already exists');
- }
-
- $this->configuration_info[$name] = $var;
- // fix bug #7351: setting custom config variable in a channel fails
- $this->_channelConfigInfo[] = $name;
- }
-
- return true;
- }
-
- /**
- * Encodes/scrambles configuration data before writing to files.
- * Currently, 'password' values will be base64-encoded as to avoid
- * that people spot cleartext passwords by accident.
- *
- * @param array (reference) array to encode values in
- * @return bool TRUE on success
- * @access private
- */
- function _encodeOutput(&$data)
- {
- foreach ($data as $key => $value) {
- if ($key == '__channels') {
- foreach ($data['__channels'] as $channel => $blah) {
- $this->_encodeOutput($data['__channels'][$channel]);
- }
- }
-
- if (!isset($this->configuration_info[$key])) {
- continue;
- }
-
- $type = $this->configuration_info[$key]['type'];
- switch ($type) {
- // we base64-encode passwords so they are at least
- // not shown in plain by accident
- case 'password': {
- $data[$key] = base64_encode($data[$key]);
- break;
- }
- case 'mask': {
- $data[$key] = octdec($data[$key]);
- break;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Decodes/unscrambles configuration data after reading from files.
- *
- * @param array (reference) array to encode values in
- * @return bool TRUE on success
- * @access private
- *
- * @see PEAR_Config::_encodeOutput
- */
- function _decodeInput(&$data)
- {
- if (!is_array($data)) {
- return true;
- }
-
- foreach ($data as $key => $value) {
- if ($key == '__channels') {
- foreach ($data['__channels'] as $channel => $blah) {
- $this->_decodeInput($data['__channels'][$channel]);
- }
- }
-
- if (!isset($this->configuration_info[$key])) {
- continue;
- }
-
- $type = $this->configuration_info[$key]['type'];
- switch ($type) {
- case 'password': {
- $data[$key] = base64_decode($data[$key]);
- break;
- }
- case 'mask': {
- $data[$key] = decoct($data[$key]);
- break;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Retrieve the default channel.
- *
- * On startup, channels are not initialized, so if the default channel is not
- * pear.php.net, then initialize the config.
- * @param string registry layer
- * @return string|false
- */
- function getDefaultChannel($layer = null)
- {
- $ret = false;
- if ($layer === null) {
- foreach ($this->layers as $layer) {
- if (isset($this->configuration[$layer]['default_channel'])) {
- $ret = $this->configuration[$layer]['default_channel'];
- break;
- }
- }
- } elseif (isset($this->configuration[$layer]['default_channel'])) {
- $ret = $this->configuration[$layer]['default_channel'];
- }
-
- if ($ret == 'pear.php.net' && defined('PEAR_RUNTYPE') && PEAR_RUNTYPE == 'pecl') {
- $ret = 'pecl.php.net';
- }
-
- if ($ret) {
- if ($ret != 'pear.php.net') {
- $this->_lazyChannelSetup();
- }
-
- return $ret;
- }
-
- return PEAR_CONFIG_DEFAULT_CHANNEL;
- }
-
- /**
- * Returns a configuration value, prioritizing layers as per the
- * layers property.
- *
- * @param string config key
- * @return mixed the config value, or NULL if not found
- * @access public
- */
- function get($key, $layer = null, $channel = false)
- {
- if (!isset($this->configuration_info[$key])) {
- return null;
- }
-
- if ($key == '__channels') {
- return null;
- }
-
- if ($key == 'default_channel') {
- return $this->getDefaultChannel($layer);
- }
-
- if (!$channel) {
- $channel = $this->getDefaultChannel();
- } elseif ($channel != 'pear.php.net') {
- $this->_lazyChannelSetup();
- }
- $channel = strtolower($channel);
-
- $test = (in_array($key, $this->_channelConfigInfo)) ?
- $this->_getChannelValue($key, $layer, $channel) :
- null;
- if ($test !== null) {
- if ($this->_installRoot) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- return $this->_prependPath($test, $this->_installRoot);
- }
- }
- return $test;
- }
-
- if ($layer === null) {
- foreach ($this->layers as $layer) {
- if (isset($this->configuration[$layer][$key])) {
- $test = $this->configuration[$layer][$key];
- if ($this->_installRoot) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- return $this->_prependPath($test, $this->_installRoot);
- }
- }
-
- if ($key == 'preferred_mirror') {
- $reg = &$this->getRegistry();
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $channel;
- }
-
- if (!$chan->getMirror($test) && $chan->getName() != $test) {
- return $channel; // mirror does not exist
- }
- }
- }
- return $test;
- }
- }
- } elseif (isset($this->configuration[$layer][$key])) {
- $test = $this->configuration[$layer][$key];
- if ($this->_installRoot) {
- if (in_array($this->getGroup($key),
- array('File Locations', 'File Locations (Advanced)')) &&
- $this->getType($key) == 'directory') {
- return $this->_prependPath($test, $this->_installRoot);
- }
- }
-
- if ($key == 'preferred_mirror') {
- $reg = &$this->getRegistry();
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $channel;
- }
-
- if (!$chan->getMirror($test) && $chan->getName() != $test) {
- return $channel; // mirror does not exist
- }
- }
- }
-
- return $test;
- }
-
- return null;
- }
-
- /**
- * Returns a channel-specific configuration value, prioritizing layers as per the
- * layers property.
- *
- * @param string config key
- * @return mixed the config value, or NULL if not found
- * @access private
- */
- function _getChannelValue($key, $layer, $channel)
- {
- if ($key == '__channels' || $channel == 'pear.php.net') {
- return null;
- }
-
- $ret = null;
- if ($layer === null) {
- foreach ($this->layers as $ilayer) {
- if (isset($this->configuration[$ilayer]['__channels'][$channel][$key])) {
- $ret = $this->configuration[$ilayer]['__channels'][$channel][$key];
- break;
- }
- }
- } elseif (isset($this->configuration[$layer]['__channels'][$channel][$key])) {
- $ret = $this->configuration[$layer]['__channels'][$channel][$key];
- }
-
- if ($key != 'preferred_mirror') {
- return $ret;
- }
-
-
- if ($ret !== null) {
- $reg = &$this->getRegistry($layer);
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $channel;
- }
-
- if (!$chan->getMirror($ret) && $chan->getName() != $ret) {
- return $channel; // mirror does not exist
- }
- }
-
- return $ret;
- }
-
- if ($channel != $this->getDefaultChannel($layer)) {
- return $channel; // we must use the channel name as the preferred mirror
- // if the user has not chosen an alternate
- }
-
- return $this->getDefaultChannel($layer);
- }
-
- /**
- * Set a config value in a specific layer (defaults to 'user').
- * Enforces the types defined in the configuration_info array. An
- * integer config variable will be cast to int, and a set config
- * variable will be validated against its legal values.
- *
- * @param string config key
- * @param string config value
- * @param string (optional) config layer
- * @param string channel to set this value for, or null for global value
- * @return bool TRUE on success, FALSE on failure
- */
- function set($key, $value, $layer = 'user', $channel = false)
- {
- if ($key == '__channels') {
- return false;
- }
-
- if (!isset($this->configuration[$layer])) {
- return false;
- }
-
- if ($key == 'default_channel') {
- // can only set this value globally
- $channel = 'pear.php.net';
- if ($value != 'pear.php.net') {
- $this->_lazyChannelSetup($layer);
- }
- }
-
- if ($key == 'preferred_mirror') {
- if ($channel == '__uri') {
- return false; // can't set the __uri pseudo-channel's mirror
- }
-
- $reg = &$this->getRegistry($layer);
- if (is_object($reg)) {
- $chan = &$reg->getChannel($channel ? $channel : 'pear.php.net');
- if (PEAR::isError($chan)) {
- return false;
- }
-
- if (!$chan->getMirror($value) && $chan->getName() != $value) {
- return false; // mirror does not exist
- }
- }
- }
-
- if (!isset($this->configuration_info[$key])) {
- return false;
- }
-
- extract($this->configuration_info[$key]);
- switch ($type) {
- case 'integer':
- $value = (int)$value;
- break;
- case 'set': {
- // If a valid_set is specified, require the value to
- // be in the set. If there is no valid_set, accept
- // any value.
- if ($valid_set) {
- reset($valid_set);
- if ((key($valid_set) === 0 && !in_array($value, $valid_set)) ||
- (key($valid_set) !== 0 && empty($valid_set[$value])))
- {
- return false;
- }
- }
- break;
- }
- }
-
- if (!$channel) {
- $channel = $this->get('default_channel', null, 'pear.php.net');
- }
-
- if (!in_array($channel, $this->_channels)) {
- $this->_lazyChannelSetup($layer);
- $reg = &$this->getRegistry($layer);
- if ($reg) {
- $channel = $reg->channelName($channel);
- }
-
- if (!in_array($channel, $this->_channels)) {
- return false;
- }
- }
-
- if ($channel != 'pear.php.net') {
- if (in_array($key, $this->_channelConfigInfo)) {
- $this->configuration[$layer]['__channels'][$channel][$key] = $value;
- return true;
- }
-
- return false;
- }
-
- if ($key == 'default_channel') {
- if (!isset($reg)) {
- $reg = &$this->getRegistry($layer);
- if (!$reg) {
- $reg = &$this->getRegistry();
- }
- }
-
- if ($reg) {
- $value = $reg->channelName($value);
- }
-
- if (!$value) {
- return false;
- }
- }
-
- $this->configuration[$layer][$key] = $value;
- if ($key == 'php_dir' && !$this->_noRegistry) {
- if (!isset($this->_registry[$layer]) ||
- $value != $this->_registry[$layer]->install_dir) {
- $this->_registry[$layer] = new PEAR_Registry($value);
- $this->_regInitialized[$layer] = false;
- $this->_registry[$layer]->setConfig($this, false);
- }
- }
-
- return true;
- }
-
- function _lazyChannelSetup($uselayer = false)
- {
- if ($this->_noRegistry) {
- return;
- }
-
- $merge = false;
- foreach ($this->_registry as $layer => $p) {
- if ($uselayer && $uselayer != $layer) {
- continue;
- }
-
- if (!$this->_regInitialized[$layer]) {
- if ($layer == 'default' && isset($this->_registry['user']) ||
- isset($this->_registry['system'])) {
- // only use the default registry if there are no alternatives
- continue;
- }
-
- if (!is_object($this->_registry[$layer])) {
- if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) {
- $this->_registry[$layer] = new PEAR_Registry($phpdir);
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- } else {
- unset($this->_registry[$layer]);
- return;
- }
- }
-
- $this->setChannels($this->_registry[$layer]->listChannels(), $merge);
- $this->_regInitialized[$layer] = true;
- $merge = true;
- }
- }
- }
-
- /**
- * Set the list of channels.
- *
- * This should be set via a call to {@link PEAR_Registry::listChannels()}
- * @param array
- * @param bool
- * @return bool success of operation
- */
- function setChannels($channels, $merge = false)
- {
- if (!is_array($channels)) {
- return false;
- }
-
- if ($merge) {
- $this->_channels = array_merge($this->_channels, $channels);
- } else {
- $this->_channels = $channels;
- }
-
- foreach ($channels as $channel) {
- $channel = strtolower($channel);
- if ($channel == 'pear.php.net') {
- continue;
- }
-
- foreach ($this->layers as $layer) {
- if (!isset($this->configuration[$layer]['__channels'])) {
- $this->configuration[$layer]['__channels'] = array();
- }
- if (!isset($this->configuration[$layer]['__channels'][$channel])
- || !is_array($this->configuration[$layer]['__channels'][$channel])) {
- $this->configuration[$layer]['__channels'][$channel] = array();
- }
- }
- }
-
- return true;
- }
-
- /**
- * Get the type of a config value.
- *
- * @param string config key
- *
- * @return string type, one of "string", "integer", "file",
- * "directory", "set" or "password".
- *
- * @access public
- *
- */
- function getType($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['type'];
- }
- return false;
- }
-
- /**
- * Get the documentation for a config value.
- *
- * @param string config key
- * @return string documentation string
- *
- * @access public
- *
- */
- function getDocs($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['doc'];
- }
-
- return false;
- }
-
- /**
- * Get the short documentation for a config value.
- *
- * @param string config key
- * @return string short documentation string
- *
- * @access public
- *
- */
- function getPrompt($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['prompt'];
- }
-
- return false;
- }
-
- /**
- * Get the parameter group for a config key.
- *
- * @param string config key
- * @return string parameter group
- *
- * @access public
- *
- */
- function getGroup($key)
- {
- if (isset($this->configuration_info[$key])) {
- return $this->configuration_info[$key]['group'];
- }
-
- return false;
- }
-
- /**
- * Get the list of parameter groups.
- *
- * @return array list of parameter groups
- *
- * @access public
- *
- */
- function getGroups()
- {
- $tmp = array();
- foreach ($this->configuration_info as $key => $info) {
- $tmp[$info['group']] = 1;
- }
-
- return array_keys($tmp);
- }
-
- /**
- * Get the list of the parameters in a group.
- *
- * @param string $group parameter group
- * @return array list of parameters in $group
- *
- * @access public
- *
- */
- function getGroupKeys($group)
- {
- $keys = array();
- foreach ($this->configuration_info as $key => $info) {
- if ($info['group'] == $group) {
- $keys[] = $key;
- }
- }
-
- return $keys;
- }
-
- /**
- * Get the list of allowed set values for a config value. Returns
- * NULL for config values that are not sets.
- *
- * @param string config key
- * @return array enumerated array of set values, or NULL if the
- * config key is unknown or not a set
- *
- * @access public
- *
- */
- function getSetValues($key)
- {
- if (isset($this->configuration_info[$key]) &&
- isset($this->configuration_info[$key]['type']) &&
- $this->configuration_info[$key]['type'] == 'set')
- {
- $valid_set = $this->configuration_info[$key]['valid_set'];
- reset($valid_set);
- if (key($valid_set) === 0) {
- return $valid_set;
- }
-
- return array_keys($valid_set);
- }
-
- return null;
- }
-
- /**
- * Get all the current config keys.
- *
- * @return array simple array of config keys
- *
- * @access public
- */
- function getKeys()
- {
- $keys = array();
- foreach ($this->layers as $layer) {
- $test = $this->configuration[$layer];
- if (isset($test['__channels'])) {
- foreach ($test['__channels'] as $channel => $configs) {
- $keys = array_merge($keys, $configs);
- }
- }
-
- unset($test['__channels']);
- $keys = array_merge($keys, $test);
-
- }
- return array_keys($keys);
- }
-
- /**
- * Remove the a config key from a specific config layer.
- *
- * @param string config key
- * @param string (optional) config layer
- * @param string (optional) channel (defaults to default channel)
- * @return bool TRUE on success, FALSE on failure
- *
- * @access public
- */
- function remove($key, $layer = 'user', $channel = null)
- {
- if ($channel === null) {
- $channel = $this->getDefaultChannel();
- }
-
- if ($channel !== 'pear.php.net') {
- if (isset($this->configuration[$layer]['__channels'][$channel][$key])) {
- unset($this->configuration[$layer]['__channels'][$channel][$key]);
- return true;
- }
- }
-
- if (isset($this->configuration[$layer][$key])) {
- unset($this->configuration[$layer][$key]);
- return true;
- }
-
- return false;
- }
-
- /**
- * Temporarily remove an entire config layer. USE WITH CARE!
- *
- * @param string config key
- * @param string (optional) config layer
- * @return bool TRUE on success, FALSE on failure
- *
- * @access public
- */
- function removeLayer($layer)
- {
- if (isset($this->configuration[$layer])) {
- $this->configuration[$layer] = array();
- return true;
- }
-
- return false;
- }
-
- /**
- * Stores configuration data in a layer.
- *
- * @param string config layer to store
- * @return bool TRUE on success, or PEAR error on failure
- *
- * @access public
- */
- function store($layer = 'user', $data = null)
- {
- return $this->writeConfigFile(null, $layer, $data);
- }
-
- /**
- * Tells what config layer that gets to define a key.
- *
- * @param string config key
- * @param boolean return the defining channel
- *
- * @return string|array the config layer, or an empty string if not found.
- *
- * if $returnchannel, the return is an array array('layer' => layername,
- * 'channel' => channelname), or an empty string if not found
- *
- * @access public
- */
- function definedBy($key, $returnchannel = false)
- {
- foreach ($this->layers as $layer) {
- $channel = $this->getDefaultChannel();
- if ($channel !== 'pear.php.net') {
- if (isset($this->configuration[$layer]['__channels'][$channel][$key])) {
- if ($returnchannel) {
- return array('layer' => $layer, 'channel' => $channel);
- }
- return $layer;
- }
- }
-
- if (isset($this->configuration[$layer][$key])) {
- if ($returnchannel) {
- return array('layer' => $layer, 'channel' => 'pear.php.net');
- }
- return $layer;
- }
- }
-
- return '';
- }
-
- /**
- * Tells whether a given key exists as a config value.
- *
- * @param string config key
- * @return bool whether <config key> exists in this object
- *
- * @access public
- */
- function isDefined($key)
- {
- foreach ($this->layers as $layer) {
- if (isset($this->configuration[$layer][$key])) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Tells whether a given config layer exists.
- *
- * @param string config layer
- * @return bool whether <config layer> exists in this object
- *
- * @access public
- */
- function isDefinedLayer($layer)
- {
- return isset($this->configuration[$layer]);
- }
-
- /**
- * Returns the layers defined (except the 'default' one)
- *
- * @return array of the defined layers
- */
- function getLayers()
- {
- $cf = $this->configuration;
- unset($cf['default']);
- return array_keys($cf);
- }
-
- function apiVersion()
- {
- return '1.1';
- }
-
- /**
- * @return PEAR_Registry
- */
- function &getRegistry($use = null)
- {
- $layer = $use === null ? 'user' : $use;
- if (isset($this->_registry[$layer])) {
- return $this->_registry[$layer];
- } elseif ($use === null && isset($this->_registry['system'])) {
- return $this->_registry['system'];
- } elseif ($use === null && isset($this->_registry['default'])) {
- return $this->_registry['default'];
- } elseif ($use) {
- $a = false;
- return $a;
- }
-
- // only go here if null was passed in
- echo "CRITICAL ERROR: Registry could not be initialized from any value";
- exit(1);
- }
-
- /**
- * This is to allow customization like the use of installroot
- * @param PEAR_Registry
- * @return bool
- */
- function setRegistry(&$reg, $layer = 'user')
- {
- if ($this->_noRegistry) {
- return false;
- }
-
- if (!in_array($layer, array('user', 'system'))) {
- return false;
- }
-
- $this->_registry[$layer] = &$reg;
- if (is_object($reg)) {
- $this->_registry[$layer]->setConfig($this, false);
- }
-
- return true;
- }
-
- function noRegistry()
- {
- $this->_noRegistry = true;
- }
-
- /**
- * @return PEAR_REST
- */
- function &getREST($version, $options = array())
- {
- $version = str_replace('.', '', $version);
- if (!class_exists($class = 'PEAR_REST_' . $version)) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/REST/' . $version . '.php';
- }
-
- $remote = new $class($this, $options);
- return $remote;
- }
-
- /**
- * The ftp server is set in {@link readFTPConfigFile()}. It exists only if a
- * remote configuration file has been specified
- * @return PEAR_FTP|false
- */
- function &getFTP()
- {
- if (isset($this->_ftp)) {
- return $this->_ftp;
- }
-
- $a = false;
- return $a;
- }
-
- function _prependPath($path, $prepend)
- {
- if (strlen($prepend) > 0) {
- if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) {
- if (preg_match('/^[a-z]:/i', $prepend)) {
- $prepend = substr($prepend, 2);
- } elseif ($prepend{0} != '\\') {
- $prepend = "\\$prepend";
- }
- $path = substr($path, 0, 2) . $prepend . substr($path, 2);
- } else {
- $path = $prepend . $path;
- }
- }
- return $path;
- }
-
- /**
- * @param string|false installation directory to prepend to all _dir variables, or false to
- * disable
- */
- function setInstallRoot($root)
- {
- if (substr($root, -1) == DIRECTORY_SEPARATOR) {
- $root = substr($root, 0, -1);
- }
- $old = $this->_installRoot;
- $this->_installRoot = $root;
- if (($old != $root) && !$this->_noRegistry) {
- foreach (array_keys($this->_registry) as $layer) {
- if ($layer == 'ftp' || !isset($this->_registry[$layer])) {
- continue;
- }
- $this->_registry[$layer] =
- new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net'));
- $this->_registry[$layer]->setConfig($this, false);
- $this->_regInitialized[$layer] = false;
- }
- }
- }
-}
-<?php
-/**
- * PEAR_Dependency2, advanced dependency validation
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Required for the PEAR_VALIDATE_* constants
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
-
-/**
- * Dependency check for PEAR packages
- *
- * This class handles both version 1.0 and 2.0 dependencies
- * WARNING: *any* changes to this class must be duplicated in the
- * test_PEAR_Dependency2 class found in tests/PEAR_Dependency2/setup.php.inc,
- * or unit tests will not actually validate the changes
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Dependency2
-{
- /**
- * One of the PEAR_VALIDATE_* states
- * @see PEAR_VALIDATE_NORMAL
- * @var integer
- */
- var $_state;
-
- /**
- * Command-line options to install/upgrade/uninstall commands
- * @param array
- */
- var $_options;
-
- /**
- * @var OS_Guess
- */
- var $_os;
-
- /**
- * @var PEAR_Registry
- */
- var $_registry;
-
- /**
- * @var PEAR_Config
- */
- var $_config;
-
- /**
- * @var PEAR_DependencyDB
- */
- var $_dependencydb;
-
- /**
- * Output of PEAR_Registry::parsedPackageName()
- * @var array
- */
- var $_currentPackage;
-
- /**
- * @param PEAR_Config
- * @param array installation options
- * @param array format of PEAR_Registry::parsedPackageName()
- * @param int installation state (one of PEAR_VALIDATE_*)
- */
- function __construct(&$config, $installoptions, $package,
- $state = PEAR_VALIDATE_INSTALLING)
- {
- $this->_config = &$config;
- if (!class_exists('PEAR_DependencyDB')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/DependencyDB.php';
- }
-
- if (isset($installoptions['packagingroot'])) {
- // make sure depdb is in the right location
- $config->setInstallRoot($installoptions['packagingroot']);
- }
-
- $this->_registry = &$config->getRegistry();
- $this->_dependencydb = &PEAR_DependencyDB::singleton($config);
- if (isset($installoptions['packagingroot'])) {
- $config->setInstallRoot(false);
- }
-
- $this->_options = $installoptions;
- $this->_state = $state;
- if (!class_exists('OS_Guess')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'OS/Guess.php';
- }
-
- $this->_os = new OS_Guess;
- $this->_currentPackage = $package;
- }
-
- function _getExtraString($dep)
- {
- $extra = ' (';
- if (isset($dep['uri'])) {
- return '';
- }
-
- if (isset($dep['recommended'])) {
- $extra .= 'recommended version ' . $dep['recommended'];
- } else {
- if (isset($dep['min'])) {
- $extra .= 'version >= ' . $dep['min'];
- }
-
- if (isset($dep['max'])) {
- if ($extra != ' (') {
- $extra .= ', ';
- }
- $extra .= 'version <= ' . $dep['max'];
- }
-
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- if ($extra != ' (') {
- $extra .= ', ';
- }
-
- $extra .= 'excluded versions: ';
- foreach ($dep['exclude'] as $i => $exclude) {
- if ($i) {
- $extra .= ', ';
- }
- $extra .= $exclude;
- }
- }
- }
-
- $extra .= ')';
- if ($extra == ' ()') {
- $extra = '';
- }
-
- return $extra;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function getPHP_OS()
- {
- return PHP_OS;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function getsysname()
- {
- return $this->_os->getSysname();
- }
-
- /**
- * Specify a dependency on an OS. Use arch for detailed os/processor information
- *
- * There are two generic OS dependencies that will be the most common, unix and windows.
- * Other options are linux, freebsd, darwin (OS X), sunos, irix, hpux, aix
- */
- function validateOsDependency($dep)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING && $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- if ($dep['name'] == '*') {
- return true;
- }
-
- $not = isset($dep['conflicts']) ? true : false;
- switch (strtolower($dep['name'])) {
- case 'windows' :
- if ($not) {
- if (strtolower(substr($this->getPHP_OS(), 0, 3)) == 'win') {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Cannot install %s on Windows");
- }
-
- return $this->warning("warning: Cannot install %s on Windows");
- }
- } else {
- if (strtolower(substr($this->getPHP_OS(), 0, 3)) != 'win') {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Can only install %s on Windows");
- }
-
- return $this->warning("warning: Can only install %s on Windows");
- }
- }
- break;
- case 'unix' :
- $unices = array('linux', 'freebsd', 'darwin', 'sunos', 'irix', 'hpux', 'aix');
- if ($not) {
- if (in_array($this->getSysname(), $unices)) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Cannot install %s on any Unix system");
- }
-
- return $this->warning( "warning: Cannot install %s on any Unix system");
- }
- } else {
- if (!in_array($this->getSysname(), $unices)) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError("Can only install %s on a Unix system");
- }
-
- return $this->warning("warning: Can only install %s on a Unix system");
- }
- }
- break;
- default :
- if ($not) {
- if (strtolower($dep['name']) == strtolower($this->getSysname())) {
- if (!isset($this->_options['nodeps']) &&
- !isset($this->_options['force'])) {
- return $this->raiseError('Cannot install %s on ' . $dep['name'] .
- ' operating system');
- }
-
- return $this->warning('warning: Cannot install %s on ' .
- $dep['name'] . ' operating system');
- }
- } else {
- if (strtolower($dep['name']) != strtolower($this->getSysname())) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('Cannot install %s on ' .
- $this->getSysname() .
- ' operating system, can only install on ' . $dep['name']);
- }
-
- return $this->warning('warning: Cannot install %s on ' .
- $this->getSysname() .
- ' operating system, can only install on ' . $dep['name']);
- }
- }
- }
- return true;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function matchSignature($pattern)
- {
- return $this->_os->matchSignature($pattern);
- }
-
- /**
- * Specify a complex dependency on an OS/processor/kernel version,
- * Use OS for simple operating system dependency.
- *
- * This is the only dependency that accepts an eregable pattern. The pattern
- * will be matched against the php_uname() output parsed by OS_Guess
- */
- function validateArchDependency($dep)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING) {
- return true;
- }
-
- $not = isset($dep['conflicts']) ? true : false;
- if (!$this->matchSignature($dep['pattern'])) {
- if (!$not) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s Architecture dependency failed, does not ' .
- 'match "' . $dep['pattern'] . '"');
- }
-
- return $this->warning('warning: %s Architecture dependency failed, does ' .
- 'not match "' . $dep['pattern'] . '"');
- }
-
- return true;
- }
-
- if ($not) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s Architecture dependency failed, required "' .
- $dep['pattern'] . '"');
- }
-
- return $this->warning('warning: %s Architecture dependency failed, ' .
- 'required "' . $dep['pattern'] . '"');
- }
-
- return true;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function extension_loaded($name)
- {
- return extension_loaded($name);
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function phpversion($name = null)
- {
- if ($name !== null) {
- return phpversion($name);
- }
-
- return phpversion();
- }
-
- function validateExtensionDependency($dep, $required = true)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING &&
- $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- $loaded = $this->extension_loaded($dep['name']);
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- }
-
- if (!isset($dep['min']) && !isset($dep['max']) &&
- !isset($dep['recommended']) && !isset($dep['exclude'])
- ) {
- if ($loaded) {
- if (isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return $this->warning('warning: %s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return true;
- }
-
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if ($required) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return $this->warning('warning: %s requires PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- return $this->warning('%s can optionally use PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- if (!$loaded) {
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if (!$required) {
- return $this->warning('%s can optionally use PHP extension "' .
- $dep['name'] . '"' . $extra);
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP extension "' . $dep['name'] .
- '"' . $extra);
- }
-
- return $this->warning('warning: %s requires PHP extension "' . $dep['name'] .
- '"' . $extra);
- }
-
- $version = (string) $this->phpversion($dep['name']);
- if (empty($version)) {
- $version = '0';
- }
-
- $fail = false;
- if (isset($dep['min']) && !version_compare($version, $dep['min'], '>=')) {
- $fail = true;
- }
-
- if (isset($dep['max']) && !version_compare($version, $dep['max'], '<=')) {
- $fail = true;
- }
-
- if ($fail && !isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP extension "' . $dep['name'] .
- '"' . $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s requires PHP extension "' . $dep['name'] .
- '"' . $extra . ', installed version is ' . $version);
- } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail && isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
-
- if (isset($dep['exclude'])) {
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($version, $exclude, '==')) {
- if (isset($dep['conflicts'])) {
- continue;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s is not compatible with PHP extension "' .
- $dep['name'] . '" version ' .
- $exclude);
- }
-
- return $this->warning('warning: %s is not compatible with PHP extension "' .
- $dep['name'] . '" version ' .
- $exclude);
- } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s conflicts with PHP extension "' .
- $dep['name'] . '"' . $extra . ', installed version is ' . $version);
- }
- }
- }
-
- if (isset($dep['recommended'])) {
- if (version_compare($version, $dep['recommended'], '==')) {
- return true;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s dependency: PHP extension ' . $dep['name'] .
- ' version "' . $version . '"' .
- ' is not the recommended version "' . $dep['recommended'] .
- '", but may be compatible, use --force to install');
- }
-
- return $this->warning('warning: %s dependency: PHP extension ' .
- $dep['name'] . ' version "' . $version . '"' .
- ' is not the recommended version "' . $dep['recommended'].'"');
- }
-
- return true;
- }
-
- function validatePhpDependency($dep)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING &&
- $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- $version = $this->phpversion();
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- }
-
- if (isset($dep['min'])) {
- if (!version_compare($version, $dep['min'], '>=')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
- }
-
- if (isset($dep['max'])) {
- if (!version_compare($version, $dep['max'], '<=')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
-
- return $this->warning('warning: %s requires PHP' .
- $extra . ', installed version is ' . $version);
- }
- }
-
- if (isset($dep['exclude'])) {
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($version, $exclude, '==')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s is not compatible with PHP version ' .
- $exclude);
- }
-
- return $this->warning(
- 'warning: %s is not compatible with PHP version ' .
- $exclude);
- }
- }
- }
-
- return true;
- }
-
- /**
- * This makes unit-testing a heck of a lot easier
- */
- function getPEARVersion()
- {
- return '1.9.5';
- }
-
- function validatePearinstallerDependency($dep)
- {
- $pearversion = $this->getPEARVersion();
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- }
-
- if (version_compare($pearversion, $dep['min'], '<')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
-
- return $this->warning('warning: %s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
-
- if (isset($dep['max'])) {
- if (version_compare($pearversion, $dep['max'], '>')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
-
- return $this->warning('warning: %s requires PEAR Installer' . $extra .
- ', installed version is ' . $pearversion);
- }
- }
-
- if (isset($dep['exclude'])) {
- if (!isset($dep['exclude'][0])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($exclude, $pearversion, '==')) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s is not compatible with PEAR Installer ' .
- 'version ' . $exclude);
- }
-
- return $this->warning('warning: %s is not compatible with PEAR ' .
- 'Installer version ' . $exclude);
- }
- }
- }
-
- return true;
- }
-
- function validateSubpackageDependency($dep, $required, $params)
- {
- return $this->validatePackageDependency($dep, $required, $params);
- }
-
- /**
- * @param array dependency information (2.0 format)
- * @param boolean whether this is a required dependency
- * @param array a list of downloaded packages to be installed, if any
- * @param boolean if true, then deps on pear.php.net that fail will also check
- * against pecl.php.net packages to accommodate extensions that have
- * moved to pecl.php.net from pear.php.net
- */
- function validatePackageDependency($dep, $required, $params, $depv1 = false)
- {
- if ($this->_state != PEAR_VALIDATE_INSTALLING &&
- $this->_state != PEAR_VALIDATE_DOWNLOADING) {
- return true;
- }
-
- if (isset($dep['providesextension'])) {
- if ($this->extension_loaded($dep['providesextension'])) {
- $save = $dep;
- $subdep = $dep;
- $subdep['name'] = $subdep['providesextension'];
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $this->validateExtensionDependency($subdep, $required);
- PEAR::popErrorHandling();
- if (!PEAR::isError($ret)) {
- return true;
- }
- }
- }
-
- if ($this->_state == PEAR_VALIDATE_INSTALLING) {
- return $this->_validatePackageInstall($dep, $required, $depv1);
- }
-
- if ($this->_state == PEAR_VALIDATE_DOWNLOADING) {
- return $this->_validatePackageDownload($dep, $required, $params, $depv1);
- }
- }
-
- function _validatePackageDownload($dep, $required, $params, $depv1 = false)
- {
- $dep['package'] = $dep['name'];
- if (isset($dep['uri'])) {
- $dep['channel'] = '__uri';
- }
-
- $depname = $this->_registry->parsedPackageNameToString($dep, true);
- $found = false;
- foreach ($params as $param) {
- if ($param->isEqual(
- array('package' => $dep['name'],
- 'channel' => $dep['channel']))) {
- $found = true;
- break;
- }
-
- if ($depv1 && $dep['channel'] == 'pear.php.net') {
- if ($param->isEqual(
- array('package' => $dep['name'],
- 'channel' => 'pecl.php.net'))) {
- $found = true;
- break;
- }
- }
- }
-
- if (!$found && isset($dep['providesextension'])) {
- foreach ($params as $param) {
- if ($param->isExtension($dep['providesextension'])) {
- $found = true;
- break;
- }
- }
- }
-
- if ($found) {
- $version = $param->getVersion();
- $installed = false;
- $downloaded = true;
- } else {
- if ($this->_registry->packageExists($dep['name'], $dep['channel'])) {
- $installed = true;
- $downloaded = false;
- $version = $this->_registry->packageinfo($dep['name'], 'version',
- $dep['channel']);
- } else {
- if ($dep['channel'] == 'pecl.php.net' && $this->_registry->packageExists($dep['name'],
- 'pear.php.net')) {
- $installed = true;
- $downloaded = false;
- $version = $this->_registry->packageinfo($dep['name'], 'version',
- 'pear.php.net');
- } else {
- $version = 'not installed or downloaded';
- $installed = false;
- $downloaded = false;
- }
- }
- }
-
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude']) && !is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- if (!isset($dep['min']) && !isset($dep['max']) &&
- !isset($dep['recommended']) && !isset($dep['exclude'])
- ) {
- if ($installed || $downloaded) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (isset($dep['conflicts'])) {
- $rest = '';
- if ($version) {
- $rest = ", $installed version is " . $version;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra . $rest);
- }
-
- return $this->warning('warning: %s conflicts with package "' . $depname . '"' . $extra . $rest);
- }
-
- return true;
- }
-
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if ($required) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('warning: %s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('%s can optionally use package "' . $depname . '"' . $extra);
- }
-
- if (!$installed && !$downloaded) {
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- if ($required) {
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('warning: %s requires package "' . $depname . '"' . $extra);
- }
-
- return $this->warning('%s can optionally use package "' . $depname . '"' . $extra);
- }
-
- $fail = false;
- if (isset($dep['min']) && version_compare($version, $dep['min'], '<')) {
- $fail = true;
- }
-
- if (isset($dep['max']) && version_compare($version, $dep['max'], '>')) {
- $fail = true;
- }
-
- if ($fail && !isset($dep['conflicts'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- $dep['package'] = $dep['name'];
- $dep = $this->_registry->parsedPackageNameToString($dep, true);
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s requires package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
-
- return $this->warning('warning: %s requires package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail &&
- isset($dep['conflicts']) && !isset($dep['exclude'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra .
- ", $installed version is " . $version);
- }
-
- return $this->warning('warning: %s conflicts with package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
-
- if (isset($dep['exclude'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- foreach ($dep['exclude'] as $exclude) {
- if (version_compare($version, $exclude, '==') && !isset($dep['conflicts'])) {
- if (!isset($this->_options['nodeps']) &&
- !isset($this->_options['force'])
- ) {
- return $this->raiseError('%s is not compatible with ' .
- $installed . ' package "' .
- $depname . '" version ' .
- $exclude);
- }
-
- return $this->warning('warning: %s is not compatible with ' .
- $installed . ' package "' .
- $depname . '" version ' .
- $exclude);
- } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('%s conflicts with package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
-
- return $this->warning('warning: %s conflicts with package "' . $depname . '"' .
- $extra . ", $installed version is " . $version);
- }
- }
- }
-
- if (isset($dep['recommended'])) {
- $installed = $installed ? 'installed' : 'downloaded';
- if (version_compare($version, $dep['recommended'], '==')) {
- return true;
- }
-
- if (!$found && $installed) {
- $param = $this->_registry->getPackage($dep['name'], $dep['channel']);
- }
-
- if ($param) {
- $found = false;
- foreach ($params as $parent) {
- if ($parent->isEqual($this->_currentPackage)) {
- $found = true;
- break;
- }
- }
-
- if ($found) {
- if ($param->isCompatible($parent)) {
- return true;
- }
- } else { // this is for validPackage() calls
- $parent = $this->_registry->getPackage($this->_currentPackage['package'],
- $this->_currentPackage['channel']);
- if ($parent !== null && $param->isCompatible($parent)) {
- return true;
- }
- }
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force']) &&
- !isset($this->_options['loose'])
- ) {
- return $this->raiseError('%s dependency package "' . $depname .
- '" ' . $installed . ' version ' . $version .
- ' is not the recommended version ' . $dep['recommended'] .
- ', but may be compatible, use --force to install');
- }
-
- return $this->warning('warning: %s dependency package "' . $depname .
- '" ' . $installed . ' version ' . $version .
- ' is not the recommended version ' . $dep['recommended']);
- }
-
- return true;
- }
-
- function _validatePackageInstall($dep, $required, $depv1 = false)
- {
- return $this->_validatePackageDownload($dep, $required, array(), $depv1);
- }
-
- /**
- * Verify that uninstalling packages passed in to command line is OK.
- *
- * @param PEAR_Installer $dl
- * @return PEAR_Error|true
- */
- function validatePackageUninstall(&$dl)
- {
- if (PEAR::isError($this->_dependencydb)) {
- return $this->_dependencydb;
- }
-
- $params = array();
- // construct an array of "downloaded" packages to fool the package dependency checker
- // into using these to validate uninstalls of circular dependencies
- $downloaded = &$dl->getUninstallPackages();
- foreach ($downloaded as $i => $pf) {
- if (!class_exists('PEAR_Downloader_Package')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Downloader/Package.php';
- }
- $dp = new PEAR_Downloader_Package($dl);
- $dp->setPackageFile($downloaded[$i]);
- $params[$i] = $dp;
- }
-
- // check cache
- $memyselfandI = strtolower($this->_currentPackage['channel']) . '/' .
- strtolower($this->_currentPackage['package']);
- if (isset($dl->___uninstall_package_cache)) {
- $badpackages = $dl->___uninstall_package_cache;
- if (isset($badpackages[$memyselfandI]['warnings'])) {
- foreach ($badpackages[$memyselfandI]['warnings'] as $warning) {
- $dl->log(0, $warning[0]);
- }
- }
-
- if (isset($badpackages[$memyselfandI]['errors'])) {
- foreach ($badpackages[$memyselfandI]['errors'] as $error) {
- if (is_array($error)) {
- $dl->log(0, $error[0]);
- } else {
- $dl->log(0, $error->getMessage());
- }
- }
-
- if (isset($this->_options['nodeps']) || isset($this->_options['force'])) {
- return $this->warning(
- 'warning: %s should not be uninstalled, other installed packages depend ' .
- 'on this package');
- }
-
- return $this->raiseError(
- '%s cannot be uninstalled, other installed packages depend on this package');
- }
-
- return true;
- }
-
- // first, list the immediate parents of each package to be uninstalled
- $perpackagelist = array();
- $allparents = array();
- foreach ($params as $i => $param) {
- $a = array(
- 'channel' => strtolower($param->getChannel()),
- 'package' => strtolower($param->getPackage())
- );
-
- $deps = $this->_dependencydb->getDependentPackages($a);
- if ($deps) {
- foreach ($deps as $d) {
- $pardeps = $this->_dependencydb->getDependencies($d);
- foreach ($pardeps as $dep) {
- if (strtolower($dep['dep']['channel']) == $a['channel'] &&
- strtolower($dep['dep']['name']) == $a['package']) {
- if (!isset($perpackagelist[$a['channel'] . '/' . $a['package']])) {
- $perpackagelist[$a['channel'] . '/' . $a['package']] = array();
- }
- $perpackagelist[$a['channel'] . '/' . $a['package']][]
- = array($d['channel'] . '/' . $d['package'], $dep);
- if (!isset($allparents[$d['channel'] . '/' . $d['package']])) {
- $allparents[$d['channel'] . '/' . $d['package']] = array();
- }
- if (!isset($allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']])) {
- $allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']] = array();
- }
- $allparents[$d['channel'] . '/' . $d['package']]
- [$a['channel'] . '/' . $a['package']][]
- = array($d, $dep);
- }
- }
- }
- }
- }
-
- // next, remove any packages from the parents list that are not installed
- $remove = array();
- foreach ($allparents as $parent => $d1) {
- foreach ($d1 as $d) {
- if ($this->_registry->packageExists($d[0][0]['package'], $d[0][0]['channel'])) {
- continue;
- }
- $remove[$parent] = true;
- }
- }
-
- // next remove any packages from the parents list that are not passed in for
- // uninstallation
- foreach ($allparents as $parent => $d1) {
- foreach ($d1 as $d) {
- foreach ($params as $param) {
- if (strtolower($param->getChannel()) == $d[0][0]['channel'] &&
- strtolower($param->getPackage()) == $d[0][0]['package']) {
- // found it
- continue 3;
- }
- }
- $remove[$parent] = true;
- }
- }
-
- // remove all packages whose dependencies fail
- // save which ones failed for error reporting
- $badchildren = array();
- do {
- $fail = false;
- foreach ($remove as $package => $unused) {
- if (!isset($allparents[$package])) {
- continue;
- }
-
- foreach ($allparents[$package] as $kid => $d1) {
- foreach ($d1 as $depinfo) {
- if ($depinfo[1]['type'] != 'optional') {
- if (isset($badchildren[$kid])) {
- continue;
- }
- $badchildren[$kid] = true;
- $remove[$kid] = true;
- $fail = true;
- continue 2;
- }
- }
- }
- if ($fail) {
- // start over, we removed some children
- continue 2;
- }
- }
- } while ($fail);
-
- // next, construct the list of packages that can't be uninstalled
- $badpackages = array();
- $save = $this->_currentPackage;
- foreach ($perpackagelist as $package => $packagedeps) {
- foreach ($packagedeps as $parent) {
- if (!isset($remove[$parent[0]])) {
- continue;
- }
-
- $packagename = $this->_registry->parsePackageName($parent[0]);
- $packagename['channel'] = $this->_registry->channelAlias($packagename['channel']);
- $pa = $this->_registry->getPackage($packagename['package'], $packagename['channel']);
- $packagename['package'] = $pa->getPackage();
- $this->_currentPackage = $packagename;
- // parent is not present in uninstall list, make sure we can actually
- // uninstall it (parent dep is optional)
- $parentname['channel'] = $this->_registry->channelAlias($parent[1]['dep']['channel']);
- $pa = $this->_registry->getPackage($parent[1]['dep']['name'], $parent[1]['dep']['channel']);
- $parentname['package'] = $pa->getPackage();
- $parent[1]['dep']['package'] = $parentname['package'];
- $parent[1]['dep']['channel'] = $parentname['channel'];
- if ($parent[1]['type'] == 'optional') {
- $test = $this->_validatePackageUninstall($parent[1]['dep'], false, $dl);
- if ($test !== true) {
- $badpackages[$package]['warnings'][] = $test;
- }
- } else {
- $test = $this->_validatePackageUninstall($parent[1]['dep'], true, $dl);
- if ($test !== true) {
- $badpackages[$package]['errors'][] = $test;
- }
- }
- }
- }
-
- $this->_currentPackage = $save;
- $dl->___uninstall_package_cache = $badpackages;
- if (isset($badpackages[$memyselfandI])) {
- if (isset($badpackages[$memyselfandI]['warnings'])) {
- foreach ($badpackages[$memyselfandI]['warnings'] as $warning) {
- $dl->log(0, $warning[0]);
- }
- }
-
- if (isset($badpackages[$memyselfandI]['errors'])) {
- foreach ($badpackages[$memyselfandI]['errors'] as $error) {
- if (is_array($error)) {
- $dl->log(0, $error[0]);
- } else {
- $dl->log(0, $error->getMessage());
- }
- }
-
- if (isset($this->_options['nodeps']) || isset($this->_options['force'])) {
- return $this->warning(
- 'warning: %s should not be uninstalled, other installed packages depend ' .
- 'on this package');
- }
-
- return $this->raiseError(
- '%s cannot be uninstalled, other installed packages depend on this package');
- }
- }
-
- return true;
- }
-
- function _validatePackageUninstall($dep, $required, $dl)
- {
- $depname = $this->_registry->parsedPackageNameToString($dep, true);
- $version = $this->_registry->packageinfo($dep['package'], 'version', $dep['channel']);
- if (!$version) {
- return true;
- }
-
- $extra = $this->_getExtraString($dep);
- if (isset($dep['exclude']) && !is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
-
- if (isset($dep['conflicts'])) {
- return true; // uninstall OK - these packages conflict (probably installed with --force)
- }
-
- if (!isset($dep['min']) && !isset($dep['max'])) {
- if (!$required) {
- return $this->warning('"' . $depname . '" can be optionally used by ' .
- 'installed package %s' . $extra);
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError('"' . $depname . '" is required by ' .
- 'installed package %s' . $extra);
- }
-
- return $this->warning('warning: "' . $depname . '" is required by ' .
- 'installed package %s' . $extra);
- }
-
- $fail = false;
- if (isset($dep['min']) && version_compare($version, $dep['min'], '>=')) {
- $fail = true;
- }
-
- if (isset($dep['max']) && version_compare($version, $dep['max'], '<=')) {
- $fail = true;
- }
-
- // we re-use this variable, preserve the original value
- $saverequired = $required;
- if (!$required) {
- return $this->warning($depname . $extra . ' can be optionally used by installed package' .
- ' "%s"');
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) {
- return $this->raiseError($depname . $extra . ' is required by installed package' .
- ' "%s"');
- }
-
- return $this->raiseError('warning: ' . $depname . $extra .
- ' is required by installed package "%s"');
- }
-
- /**
- * validate a downloaded package against installed packages
- *
- * As of PEAR 1.4.3, this will only validate
- *
- * @param array|PEAR_Downloader_Package|PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * $pkg package identifier (either
- * array('package' => blah, 'channel' => blah) or an array with
- * index 'info' referencing an object)
- * @param PEAR_Downloader $dl
- * @param array $params full list of packages to install
- * @return true|PEAR_Error
- */
- function validatePackage($pkg, &$dl, $params = array())
- {
- if (is_array($pkg) && isset($pkg['info'])) {
- $deps = $this->_dependencydb->getDependentPackageDependencies($pkg['info']);
- } else {
- $deps = $this->_dependencydb->getDependentPackageDependencies($pkg);
- }
-
- $fail = false;
- if ($deps) {
- if (!class_exists('PEAR_Downloader_Package')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Downloader/Package.php';
- }
-
- $dp = new PEAR_Downloader_Package($dl);
- if (is_object($pkg)) {
- $dp->setPackageFile($pkg);
- } else {
- $dp->setDownloadURL($pkg);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($deps as $channel => $info) {
- foreach ($info as $package => $ds) {
- foreach ($params as $packd) {
- if (strtolower($packd->getPackage()) == strtolower($package) &&
- $packd->getChannel() == $channel) {
- $dl->log(3, 'skipping installed package check of "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $channel, 'package' => $package),
- true) .
- '", version "' . $packd->getVersion() . '" will be ' .
- 'downloaded and installed');
- continue 2; // jump to next package
- }
- }
-
- foreach ($ds as $d) {
- $checker = new PEAR_Dependency2($this->_config, $this->_options,
- array('channel' => $channel, 'package' => $package), $this->_state);
- $dep = $d['dep'];
- $required = $d['type'] == 'required';
- $ret = $checker->_validatePackageDownload($dep, $required, array(&$dp));
- if (is_array($ret)) {
- $dl->log(0, $ret[0]);
- } elseif (PEAR::isError($ret)) {
- $dl->log(0, $ret->getMessage());
- $fail = true;
- }
- }
- }
- }
- PEAR::popErrorHandling();
- }
-
- if ($fail) {
- return $this->raiseError(
- '%s cannot be installed, conflicts with installed packages');
- }
-
- return true;
- }
-
- /**
- * validate a package.xml 1.0 dependency
- */
- function validateDependency1($dep, $params = array())
- {
- if (!isset($dep['optional'])) {
- $dep['optional'] = 'no';
- }
-
- list($newdep, $type) = $this->normalizeDep($dep);
- if (!$newdep) {
- return $this->raiseError("Invalid Dependency");
- }
-
- if (method_exists($this, "validate{$type}Dependency")) {
- return $this->{"validate{$type}Dependency"}($newdep, $dep['optional'] == 'no',
- $params, true);
- }
- }
-
- /**
- * Convert a 1.0 dep into a 2.0 dep
- */
- function normalizeDep($dep)
- {
- $types = array(
- 'pkg' => 'Package',
- 'ext' => 'Extension',
- 'os' => 'Os',
- 'php' => 'Php'
- );
-
- if (!isset($types[$dep['type']])) {
- return array(false, false);
- }
-
- $type = $types[$dep['type']];
-
- $newdep = array();
- switch ($type) {
- case 'Package' :
- $newdep['channel'] = 'pear.php.net';
- case 'Extension' :
- case 'Os' :
- $newdep['name'] = $dep['name'];
- break;
- }
-
- $dep['rel'] = PEAR_Dependency2::signOperator($dep['rel']);
- switch ($dep['rel']) {
- case 'has' :
- return array($newdep, $type);
- break;
- case 'not' :
- $newdep['conflicts'] = true;
- break;
- case '>=' :
- case '>' :
- $newdep['min'] = $dep['version'];
- if ($dep['rel'] == '>') {
- $newdep['exclude'] = $dep['version'];
- }
- break;
- case '<=' :
- case '<' :
- $newdep['max'] = $dep['version'];
- if ($dep['rel'] == '<') {
- $newdep['exclude'] = $dep['version'];
- }
- break;
- case 'ne' :
- case '!=' :
- $newdep['min'] = '0';
- $newdep['max'] = '100000';
- $newdep['exclude'] = $dep['version'];
- break;
- case '==' :
- $newdep['min'] = $dep['version'];
- $newdep['max'] = $dep['version'];
- break;
- }
- if ($type == 'Php') {
- if (!isset($newdep['min'])) {
- $newdep['min'] = '4.4.0';
- }
-
- if (!isset($newdep['max'])) {
- $newdep['max'] = '6.0.0';
- }
- }
- return array($newdep, $type);
- }
-
- /**
- * Converts text comparing operators to them sign equivalents
- *
- * Example: 'ge' to '>='
- *
- * @access public
- * @param string Operator
- * @return string Sign equivalent
- */
- function signOperator($operator)
- {
- switch($operator) {
- case 'lt': return '<';
- case 'le': return '<=';
- case 'gt': return '>';
- case 'ge': return '>=';
- case 'eq': return '==';
- case 'ne': return '!=';
- default:
- return $operator;
- }
- }
-
- function raiseError($msg)
- {
- if (isset($this->_options['ignore-errors'])) {
- return $this->warning($msg);
- }
-
- return PEAR::raiseError(sprintf($msg, $this->_registry->parsedPackageNameToString(
- $this->_currentPackage, true)));
- }
-
- function warning($msg)
- {
- return array(sprintf($msg, $this->_registry->parsedPackageNameToString(
- $this->_currentPackage, true)));
- }
-}
-<?php
-/**
- * PEAR_DependencyDB, advanced installed packages dependency database
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Needed for error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Config.php';
-
-$GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array();
-/**
- * Track dependency relationships between installed packages
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Tomas V.V.Cox <cox@idec.net.com>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_DependencyDB
-{
- // {{{ properties
-
- /**
- * This is initialized by {@link setConfig()}
- * @var PEAR_Config
- * @access private
- */
- var $_config;
- /**
- * This is initialized by {@link setConfig()}
- * @var PEAR_Registry
- * @access private
- */
- var $_registry;
- /**
- * Filename of the dependency DB (usually .depdb)
- * @var string
- * @access private
- */
- var $_depdb = false;
- /**
- * File name of the lockfile (usually .depdblock)
- * @var string
- * @access private
- */
- var $_lockfile = false;
- /**
- * Open file resource for locking the lockfile
- * @var resource|false
- * @access private
- */
- var $_lockFp = false;
- /**
- * API version of this class, used to validate a file on-disk
- * @var string
- * @access private
- */
- var $_version = '1.0';
- /**
- * Cached dependency database file
- * @var array|null
- * @access private
- */
- var $_cache;
-
- // }}}
- // {{{ & singleton()
-
- /**
- * Get a raw dependency database. Calls setConfig() and assertDepsDB()
- * @param PEAR_Config
- * @param string|false full path to the dependency database, or false to use default
- * @return PEAR_DependencyDB|PEAR_Error
- * @static
- */
- function &singleton(&$config, $depdb = false)
- {
- $phpdir = $config->get('php_dir', null, 'pear.php.net');
- if (!isset($GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir])) {
- $a = new PEAR_DependencyDB;
- $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir] = &$a;
- $a->setConfig($config, $depdb);
- $e = $a->assertDepsDB();
- if (PEAR::isError($e)) {
- return $e;
- }
- }
-
- return $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir];
- }
-
- /**
- * Set up the registry/location of dependency DB
- * @param PEAR_Config|false
- * @param string|false full path to the dependency database, or false to use default
- */
- function setConfig(&$config, $depdb = false)
- {
- if (!$config) {
- $this->_config = &PEAR_Config::singleton();
- } else {
- $this->_config = &$config;
- }
-
- $this->_registry = &$this->_config->getRegistry();
- if (!$depdb) {
- $this->_depdb = $this->_config->get('php_dir', null, 'pear.php.net') .
- DIRECTORY_SEPARATOR . '.depdb';
- } else {
- $this->_depdb = $depdb;
- }
-
- $this->_lockfile = dirname($this->_depdb) . DIRECTORY_SEPARATOR . '.depdblock';
- }
- // }}}
-
- function hasWriteAccess()
- {
- if (!file_exists($this->_depdb)) {
- $dir = $this->_depdb;
- while ($dir && $dir != '.') {
- $dir = dirname($dir); // cd ..
- if ($dir != '.' && file_exists($dir)) {
- if (is_writeable($dir)) {
- return true;
- }
-
- return false;
- }
- }
-
- return false;
- }
-
- return is_writeable($this->_depdb);
- }
-
- // {{{ assertDepsDB()
-
- /**
- * Create the dependency database, if it doesn't exist. Error if the database is
- * newer than the code reading it.
- * @return void|PEAR_Error
- */
- function assertDepsDB()
- {
- if (!is_file($this->_depdb)) {
- $this->rebuildDB();
- return;
- }
-
- $depdb = $this->_getDepDB();
- // Datatype format has been changed, rebuild the Deps DB
- if ($depdb['_version'] < $this->_version) {
- $this->rebuildDB();
- }
-
- if ($depdb['_version']{0} > $this->_version{0}) {
- return PEAR::raiseError('Dependency database is version ' .
- $depdb['_version'] . ', and we are version ' .
- $this->_version . ', cannot continue');
- }
- }
-
- /**
- * Get a list of installed packages that depend on this package
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
- * @return array|false
- */
- function getDependentPackages(&$pkg)
- {
- $data = $this->_getDepDB();
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- if (isset($data['packages'][$channel][$package])) {
- return $data['packages'][$channel][$package];
- }
-
- return false;
- }
-
- /**
- * Get a list of the actual dependencies of installed packages that depend on
- * a package.
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
- * @return array|false
- */
- function getDependentPackageDependencies(&$pkg)
- {
- $data = $this->_getDepDB();
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- $depend = $this->getDependentPackages($pkg);
- if (!$depend) {
- return false;
- }
-
- $dependencies = array();
- foreach ($depend as $info) {
- $temp = $this->getDependencies($info);
- foreach ($temp as $dep) {
- if (
- isset($dep['dep'], $dep['dep']['channel'], $dep['dep']['name']) &&
- strtolower($dep['dep']['channel']) == $channel &&
- strtolower($dep['dep']['name']) == $package
- ) {
- if (!isset($dependencies[$info['channel']])) {
- $dependencies[$info['channel']] = array();
- }
-
- if (!isset($dependencies[$info['channel']][$info['package']])) {
- $dependencies[$info['channel']][$info['package']] = array();
- }
- $dependencies[$info['channel']][$info['package']][] = $dep;
- }
- }
- }
-
- return $dependencies;
- }
-
- /**
- * Get a list of dependencies of this installed package
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array
- * @return array|false
- */
- function getDependencies(&$pkg)
- {
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- $data = $this->_getDepDB();
- if (isset($data['dependencies'][$channel][$package])) {
- return $data['dependencies'][$channel][$package];
- }
-
- return false;
- }
-
- /**
- * Determine whether $parent depends on $child, near or deep
- * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2
- * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2
- */
- function dependsOn($parent, $child)
- {
- $c = array();
- $this->_getDepDB();
- return $this->_dependsOn($parent, $child, $c);
- }
-
- function _dependsOn($parent, $child, &$checked)
- {
- if (is_object($parent)) {
- $channel = strtolower($parent->getChannel());
- $package = strtolower($parent->getPackage());
- } else {
- $channel = strtolower($parent['channel']);
- $package = strtolower($parent['package']);
- }
-
- if (is_object($child)) {
- $depchannel = strtolower($child->getChannel());
- $deppackage = strtolower($child->getPackage());
- } else {
- $depchannel = strtolower($child['channel']);
- $deppackage = strtolower($child['package']);
- }
-
- if (isset($checked[$channel][$package][$depchannel][$deppackage])) {
- return false; // avoid endless recursion
- }
-
- $checked[$channel][$package][$depchannel][$deppackage] = true;
- if (!isset($this->_cache['dependencies'][$channel][$package])) {
- return false;
- }
-
- foreach ($this->_cache['dependencies'][$channel][$package] as $info) {
- if (isset($info['dep']['uri'])) {
- if (is_object($child)) {
- if ($info['dep']['uri'] == $child->getURI()) {
- return true;
- }
- } elseif (isset($child['uri'])) {
- if ($info['dep']['uri'] == $child['uri']) {
- return true;
- }
- }
- return false;
- }
-
- if (strtolower($info['dep']['channel']) == $depchannel &&
- strtolower($info['dep']['name']) == $deppackage) {
- return true;
- }
- }
-
- foreach ($this->_cache['dependencies'][$channel][$package] as $info) {
- if (isset($info['dep']['uri'])) {
- if ($this->_dependsOn(array(
- 'uri' => $info['dep']['uri'],
- 'package' => $info['dep']['name']), $child, $checked)) {
- return true;
- }
- } else {
- if ($this->_dependsOn(array(
- 'channel' => $info['dep']['channel'],
- 'package' => $info['dep']['name']), $child, $checked)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Register dependencies of a package that is being installed or upgraded
- * @param PEAR_PackageFile_v2|PEAR_PackageFile_v2
- */
- function installPackage(&$package)
- {
- $data = $this->_getDepDB();
- unset($this->_cache);
- $this->_setPackageDeps($data, $package);
- $this->_writeDepDB($data);
- }
-
- /**
- * Remove dependencies of a package that is being uninstalled, or upgraded.
- *
- * Upgraded packages first uninstall, then install
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array If an array, then it must have
- * indices 'channel' and 'package'
- */
- function uninstallPackage(&$pkg)
- {
- $data = $this->_getDepDB();
- unset($this->_cache);
- if (is_object($pkg)) {
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
- } else {
- $channel = strtolower($pkg['channel']);
- $package = strtolower($pkg['package']);
- }
-
- if (!isset($data['dependencies'][$channel][$package])) {
- return true;
- }
-
- foreach ($data['dependencies'][$channel][$package] as $dep) {
- $found = false;
- $depchannel = isset($dep['dep']['uri']) ? '__uri' : strtolower($dep['dep']['channel']);
- $depname = strtolower($dep['dep']['name']);
- if (isset($data['packages'][$depchannel][$depname])) {
- foreach ($data['packages'][$depchannel][$depname] as $i => $info) {
- if ($info['channel'] == $channel && $info['package'] == $package) {
- $found = true;
- break;
- }
- }
- }
-
- if ($found) {
- unset($data['packages'][$depchannel][$depname][$i]);
- if (!count($data['packages'][$depchannel][$depname])) {
- unset($data['packages'][$depchannel][$depname]);
- if (!count($data['packages'][$depchannel])) {
- unset($data['packages'][$depchannel]);
- }
- } else {
- $data['packages'][$depchannel][$depname] =
- array_values($data['packages'][$depchannel][$depname]);
- }
- }
- }
-
- unset($data['dependencies'][$channel][$package]);
- if (!count($data['dependencies'][$channel])) {
- unset($data['dependencies'][$channel]);
- }
-
- if (!count($data['dependencies'])) {
- unset($data['dependencies']);
- }
-
- if (!count($data['packages'])) {
- unset($data['packages']);
- }
-
- $this->_writeDepDB($data);
- }
-
- /**
- * Rebuild the dependency DB by reading registry entries.
- * @return true|PEAR_Error
- */
- function rebuildDB()
- {
- $depdb = array('_version' => $this->_version);
- if (!$this->hasWriteAccess()) {
- // allow startup for read-only with older Registry
- return $depdb;
- }
-
- $packages = $this->_registry->listAllPackages();
- if (PEAR::isError($packages)) {
- return $packages;
- }
-
- foreach ($packages as $channel => $ps) {
- foreach ($ps as $package) {
- $package = $this->_registry->getPackage($package, $channel);
- if (PEAR::isError($package)) {
- return $package;
- }
- $this->_setPackageDeps($depdb, $package);
- }
- }
-
- $error = $this->_writeDepDB($depdb);
- if (PEAR::isError($error)) {
- return $error;
- }
-
- $this->_cache = $depdb;
- return true;
- }
-
- /**
- * Register usage of the dependency DB to prevent race conditions
- * @param int one of the LOCK_* constants
- * @return true|PEAR_Error
- * @access private
- */
- function _lock($mode = LOCK_EX)
- {
- if (stristr(php_uname(), 'Windows 9')) {
- return true;
- }
-
- if ($mode != LOCK_UN && is_resource($this->_lockFp)) {
- // XXX does not check type of lock (LOCK_SH/LOCK_EX)
- return true;
- }
-
- $open_mode = 'w';
- // XXX People reported problems with LOCK_SH and 'w'
- if ($mode === LOCK_SH) {
- if (!file_exists($this->_lockfile)) {
- touch($this->_lockfile);
- } elseif (!is_file($this->_lockfile)) {
- return PEAR::raiseError('could not create Dependency lock file, ' .
- 'it exists and is not a regular file');
- }
- $open_mode = 'r';
- }
-
- if (!is_resource($this->_lockFp)) {
- $this->_lockFp = @fopen($this->_lockfile, $open_mode);
- }
-
- if (!is_resource($this->_lockFp)) {
- return PEAR::raiseError("could not create Dependency lock file" .
- (isset($php_errormsg) ? ": " . $php_errormsg : ""));
- }
-
- if (!(int)flock($this->_lockFp, $mode)) {
- switch ($mode) {
- case LOCK_SH: $str = 'shared'; break;
- case LOCK_EX: $str = 'exclusive'; break;
- case LOCK_UN: $str = 'unlock'; break;
- default: $str = 'unknown'; break;
- }
-
- return PEAR::raiseError("could not acquire $str lock ($this->_lockfile)");
- }
-
- return true;
- }
-
- /**
- * Release usage of dependency DB
- * @return true|PEAR_Error
- * @access private
- */
- function _unlock()
- {
- $ret = $this->_lock(LOCK_UN);
- if (is_resource($this->_lockFp)) {
- fclose($this->_lockFp);
- }
- $this->_lockFp = null;
- return $ret;
- }
-
- /**
- * Load the dependency database from disk, or return the cache
- * @return array|PEAR_Error
- */
- function _getDepDB()
- {
- if (!$this->hasWriteAccess()) {
- return array('_version' => $this->_version);
- }
-
- if (isset($this->_cache)) {
- return $this->_cache;
- }
-
- if (!$fp = fopen($this->_depdb, 'r')) {
- $err = PEAR::raiseError("Could not open dependencies file `".$this->_depdb."'");
- return $err;
- }
-
- clearstatcache();
- fclose($fp);
- $data = unserialize(file_get_contents($this->_depdb));
- $this->_cache = $data;
- return $data;
- }
-
- /**
- * Write out the dependency database to disk
- * @param array the database
- * @return true|PEAR_Error
- * @access private
- */
- function _writeDepDB(&$deps)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- if (!$fp = fopen($this->_depdb, 'wb')) {
- $this->_unlock();
- return PEAR::raiseError("Could not open dependencies file `".$this->_depdb."' for writing");
- }
-
- fwrite($fp, serialize($deps));
- fclose($fp);
- $this->_unlock();
- $this->_cache = $deps;
- return true;
- }
-
- /**
- * Register all dependencies from a package in the dependencies database, in essence
- * "installing" the package's dependency information
- * @param array the database
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @access private
- */
- function _setPackageDeps(&$data, &$pkg)
- {
- $pkg->setConfig($this->_config);
- if ($pkg->getPackagexmlVersion() == '1.0') {
- $gen = &$pkg->getDefaultGenerator();
- $deps = $gen->dependenciesToV2();
- } else {
- $deps = $pkg->getDeps(true);
- }
-
- if (!$deps) {
- return;
- }
-
- if (!is_array($data)) {
- $data = array();
- }
-
- if (!isset($data['dependencies'])) {
- $data['dependencies'] = array();
- }
-
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
-
- if (!isset($data['dependencies'][$channel])) {
- $data['dependencies'][$channel] = array();
- }
-
- $data['dependencies'][$channel][$package] = array();
- if (isset($deps['required']['package'])) {
- if (!isset($deps['required']['package'][0])) {
- $deps['required']['package'] = array($deps['required']['package']);
- }
-
- foreach ($deps['required']['package'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'required');
- }
- }
-
- if (isset($deps['optional']['package'])) {
- if (!isset($deps['optional']['package'][0])) {
- $deps['optional']['package'] = array($deps['optional']['package']);
- }
-
- foreach ($deps['optional']['package'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional');
- }
- }
-
- if (isset($deps['required']['subpackage'])) {
- if (!isset($deps['required']['subpackage'][0])) {
- $deps['required']['subpackage'] = array($deps['required']['subpackage']);
- }
-
- foreach ($deps['required']['subpackage'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'required');
- }
- }
-
- if (isset($deps['optional']['subpackage'])) {
- if (!isset($deps['optional']['subpackage'][0])) {
- $deps['optional']['subpackage'] = array($deps['optional']['subpackage']);
- }
-
- foreach ($deps['optional']['subpackage'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional');
- }
- }
-
- if (isset($deps['group'])) {
- if (!isset($deps['group'][0])) {
- $deps['group'] = array($deps['group']);
- }
-
- foreach ($deps['group'] as $group) {
- if (isset($group['package'])) {
- if (!isset($group['package'][0])) {
- $group['package'] = array($group['package']);
- }
-
- foreach ($group['package'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional',
- $group['attribs']['name']);
- }
- }
-
- if (isset($group['subpackage'])) {
- if (!isset($group['subpackage'][0])) {
- $group['subpackage'] = array($group['subpackage']);
- }
-
- foreach ($group['subpackage'] as $dep) {
- $this->_registerDep($data, $pkg, $dep, 'optional',
- $group['attribs']['name']);
- }
- }
- }
- }
-
- if ($data['dependencies'][$channel][$package] == array()) {
- unset($data['dependencies'][$channel][$package]);
- if (!count($data['dependencies'][$channel])) {
- unset($data['dependencies'][$channel]);
- }
- }
- }
-
- /**
- * @param array the database
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param array the specific dependency
- * @param required|optional whether this is a required or an optional dep
- * @param string|false dependency group this dependency is from, or false for ordinary dep
- */
- function _registerDep(&$data, &$pkg, $dep, $type, $group = false)
- {
- $info = array(
- 'dep' => $dep,
- 'type' => $type,
- 'group' => $group
- );
-
- $dep = array_map('strtolower', $dep);
- $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri';
- if (!isset($data['dependencies'])) {
- $data['dependencies'] = array();
- }
-
- $channel = strtolower($pkg->getChannel());
- $package = strtolower($pkg->getPackage());
-
- if (!isset($data['dependencies'][$channel])) {
- $data['dependencies'][$channel] = array();
- }
-
- if (!isset($data['dependencies'][$channel][$package])) {
- $data['dependencies'][$channel][$package] = array();
- }
-
- $data['dependencies'][$channel][$package][] = $info;
- if (isset($data['packages'][$depchannel][$dep['name']])) {
- $found = false;
- foreach ($data['packages'][$depchannel][$dep['name']] as $i => $p) {
- if ($p['channel'] == $channel && $p['package'] == $package) {
- $found = true;
- break;
- }
- }
- } else {
- if (!isset($data['packages'])) {
- $data['packages'] = array();
- }
-
- if (!isset($data['packages'][$depchannel])) {
- $data['packages'][$depchannel] = array();
- }
-
- if (!isset($data['packages'][$depchannel][$dep['name']])) {
- $data['packages'][$depchannel][$dep['name']] = array();
- }
-
- $found = false;
- }
-
- if (!$found) {
- $data['packages'][$depchannel][$dep['name']][] = array(
- 'channel' => $channel,
- 'package' => $package
- );
- }
- }
-}<?php
-/**
- * PEAR_Downloader, the PEAR Installer's download utility class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.3.0
- */
-
-/**
- * Needed for constants, extending
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
-
-define('PEAR_INSTALLER_OK', 1);
-define('PEAR_INSTALLER_FAILED', 0);
-define('PEAR_INSTALLER_SKIPPED', -1);
-define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2);
-
-/**
- * Administration class used to download anything from the internet (PEAR Packages,
- * static URLs, xml files)
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.3.0
- */
-class PEAR_Downloader extends PEAR_Common
-{
- /**
- * @var PEAR_Registry
- * @access private
- */
- var $_registry;
-
- /**
- * Preferred Installation State (snapshot, devel, alpha, beta, stable)
- * @var string|null
- * @access private
- */
- var $_preferredState;
-
- /**
- * Options from command-line passed to Install.
- *
- * Recognized options:<br />
- * - onlyreqdeps : install all required dependencies as well
- * - alldeps : install all dependencies, including optional
- * - installroot : base relative path to install files in
- * - force : force a download even if warnings would prevent it
- * - nocompress : download uncompressed tarballs
- * @see PEAR_Command_Install
- * @access private
- * @var array
- */
- var $_options;
-
- /**
- * Downloaded Packages after a call to download().
- *
- * Format of each entry:
- *
- * <code>
- * array('pkg' => 'package_name', 'file' => '/path/to/local/file',
- * 'info' => array() // parsed package.xml
- * );
- * </code>
- * @access private
- * @var array
- */
- var $_downloadedPackages = array();
-
- /**
- * Packages slated for download.
- *
- * This is used to prevent downloading a package more than once should it be a dependency
- * for two packages to be installed.
- * Format of each entry:
- *
- * <pre>
- * array('package_name1' => parsed package.xml, 'package_name2' => parsed package.xml,
- * );
- * </pre>
- * @access private
- * @var array
- */
- var $_toDownload = array();
-
- /**
- * Array of every package installed, with names lower-cased.
- *
- * Format:
- * <code>
- * array('package1' => 0, 'package2' => 1, );
- * </code>
- * @var array
- */
- var $_installed = array();
-
- /**
- * @var array
- * @access private
- */
- var $_errorStack = array();
-
- /**
- * @var boolean
- * @access private
- */
- var $_internalDownload = false;
-
- /**
- * Temporary variable used in sorting packages by dependency in {@link sortPkgDeps()}
- * @var array
- * @access private
- */
- var $_packageSortTree;
-
- /**
- * Temporary directory, or configuration value where downloads will occur
- * @var string
- */
- var $_downloadDir;
-
- /**
- * @param PEAR_Frontend_*
- * @param array
- * @param PEAR_Config
- */
- function __construct($ui = null, $options = array(), $config = null)
- {
- parent::__construct();
- $this->_options = $options;
- if ($config !== null) {
- $this->config = &$config;
- $this->_preferredState = $this->config->get('preferred_state');
- }
- $this->ui = &$ui;
- if (!$this->_preferredState) {
- // don't inadvertantly use a non-set preferred_state
- $this->_preferredState = null;
- }
-
- if ($config !== null) {
- if (isset($this->_options['installroot'])) {
- $this->config->setInstallRoot($this->_options['installroot']);
- }
- $this->_registry = &$config->getRegistry();
- }
-
- if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) {
- $this->_installed = $this->_registry->listAllPackages();
- foreach ($this->_installed as $key => $unused) {
- if (!count($unused)) {
- continue;
- }
- $strtolower = create_function('$a','return strtolower($a);');
- array_walk($this->_installed[$key], $strtolower);
- }
- }
- }
-
- /**
- * Attempt to discover a channel's remote capabilities from
- * its server name
- * @param string
- * @return boolean
- */
- function discover($channel)
- {
- $this->log(1, 'Attempting to discover channel "' . $channel . '"...');
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $callback = $this->ui ? array(&$this, '_downloadCallback') : null;
- if (!class_exists('System')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- }
-
- $tmpdir = $this->config->get('temp_dir');
- $tmp = System::mktemp('-d -t "' . $tmpdir . '"');
- $a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false);
- PEAR::popErrorHandling();
- if (PEAR::isError($a)) {
- // Attempt to fallback to https automatically.
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $this->log(1, 'Attempting fallback to https instead of http on channel "' . $channel . '"...');
- $a = $this->downloadHttp('https://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false);
- PEAR::popErrorHandling();
- if (PEAR::isError($a)) {
- return false;
- }
- }
-
- list($a, $lastmodified) = $a;
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $b = new PEAR_ChannelFile;
- if ($b->fromXmlFile($a)) {
- unlink($a);
- if ($this->config->get('auto_discover')) {
- $this->_registry->addChannel($b, $lastmodified);
- $alias = $b->getName();
- if ($b->getName() == $this->_registry->channelName($b->getAlias())) {
- $alias = $b->getAlias();
- }
-
- $this->log(1, 'Auto-discovered channel "' . $channel .
- '", alias "' . $alias . '", adding to registry');
- }
-
- return true;
- }
-
- unlink($a);
- return false;
- }
-
- /**
- * For simpler unit-testing
- * @param PEAR_Downloader
- * @return PEAR_Downloader_Package
- */
- function newDownloaderPackage(&$t)
- {
- if (!class_exists('PEAR_Downloader_Package')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Downloader/Package.php';
- }
- $a = new PEAR_Downloader_Package($t);
- return $a;
- }
-
- /**
- * For simpler unit-testing
- * @param PEAR_Config
- * @param array
- * @param array
- * @param int
- */
- function &getDependency2Object(&$c, $i, $p, $s)
- {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
- $z = new PEAR_Dependency2($c, $i, $p, $s);
- return $z;
- }
-
- function &download($params)
- {
- if (!count($params)) {
- $a = array();
- return $a;
- }
-
- if (!isset($this->_registry)) {
- $this->_registry = &$this->config->getRegistry();
- }
-
- $channelschecked = array();
- // convert all parameters into PEAR_Downloader_Package objects
- foreach ($params as $i => $param) {
- $params[$i] = &$this->newDownloaderPackage($this);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $params[$i]->initialize($param);
- PEAR::staticPopErrorHandling();
- if (!$err) {
- // skip parameters that were missed by preferred_state
- continue;
- }
-
- if (PEAR::isError($err)) {
- if (!isset($this->_options['soft']) && $err->getMessage() !== '') {
- $this->log(0, $err->getMessage());
- }
-
- $params[$i] = false;
- if (is_object($param)) {
- $param = $param->getChannel() . '/' . $param->getPackage();
- }
-
- if (!isset($this->_options['soft'])) {
- $this->log(2, 'Package "' . $param . '" is not valid');
- }
-
- // Message logged above in a specific verbose mode, passing null to not show up on CLI
- $this->pushError(null, PEAR_INSTALLER_SKIPPED);
- } else {
- do {
- if ($params[$i] && $params[$i]->getType() == 'local') {
- // bug #7090 skip channel.xml check for local packages
- break;
- }
-
- if ($params[$i] && !isset($channelschecked[$params[$i]->getChannel()]) &&
- !isset($this->_options['offline'])
- ) {
- $channelschecked[$params[$i]->getChannel()] = true;
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (!class_exists('System')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- }
-
- $curchannel = &$this->_registry->getChannel($params[$i]->getChannel());
- if (PEAR::isError($curchannel)) {
- PEAR::staticPopErrorHandling();
- return $this->raiseError($curchannel);
- }
-
- if (PEAR::isError($dir = $this->getDownloadDir())) {
- PEAR::staticPopErrorHandling();
- break;
- }
-
- $mirror = $this->config->get('preferred_mirror', null, $params[$i]->getChannel());
- $url = 'http://' . $mirror . '/channel.xml';
- $a = $this->downloadHttp($url, $this->ui, $dir, null, $curchannel->lastModified());
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($a) || !$a) {
- // Attempt fallback to https automatically
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $a = $this->downloadHttp('https://' . $mirror .
- '/channel.xml', $this->ui, $dir, null, $curchannel->lastModified());
-
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($a) || !$a) {
- break;
- }
- }
- $this->log(0, 'WARNING: channel "' . $params[$i]->getChannel() . '" has ' .
- 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $params[$i]->getChannel() .
- '" to update');
- }
- } while (false);
-
- if ($params[$i] && !isset($this->_options['downloadonly'])) {
- if (isset($this->_options['packagingroot'])) {
- $checkdir = $this->_prependPath(
- $this->config->get('php_dir', null, $params[$i]->getChannel()),
- $this->_options['packagingroot']);
- } else {
- $checkdir = $this->config->get('php_dir',
- null, $params[$i]->getChannel());
- }
-
- while ($checkdir && $checkdir != '/' && !file_exists($checkdir)) {
- $checkdir = dirname($checkdir);
- }
-
- if ($checkdir == '.') {
- $checkdir = '/';
- }
-
- if (!is_writeable($checkdir)) {
- return PEAR::raiseError('Cannot install, php_dir for channel "' .
- $params[$i]->getChannel() . '" is not writeable by the current user');
- }
- }
- }
- }
-
- unset($channelschecked);
- PEAR_Downloader_Package::removeDuplicates($params);
- if (!count($params)) {
- $a = array();
- return $a;
- }
-
- if (!isset($this->_options['nodeps']) && !isset($this->_options['offline'])) {
- $reverify = true;
- while ($reverify) {
- $reverify = false;
- foreach ($params as $i => $param) {
- //PHP Bug 40768 / PEAR Bug #10944
- //Nested foreaches fail in PHP 5.2.1
- key($params);
- $ret = $params[$i]->detectDependencies($params);
- if (PEAR::isError($ret)) {
- $reverify = true;
- $params[$i] = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- if (!isset($this->_options['soft'])) {
- $this->log(0, $ret->getMessage());
- }
- continue 2;
- }
- }
- }
- }
-
- if (isset($this->_options['offline'])) {
- $this->log(3, 'Skipping dependency download check, --offline specified');
- }
-
- if (!count($params)) {
- $a = array();
- return $a;
- }
-
- while (PEAR_Downloader_Package::mergeDependencies($params));
- PEAR_Downloader_Package::removeDuplicates($params, true);
- $errorparams = array();
- if (PEAR_Downloader_Package::detectStupidDuplicates($params, $errorparams)) {
- if (count($errorparams)) {
- foreach ($errorparams as $param) {
- $name = $this->_registry->parsedPackageNameToString($param->getParsedPackage());
- $this->pushError('Duplicate package ' . $name . ' found', PEAR_INSTALLER_FAILED);
- }
- $a = array();
- return $a;
- }
- }
-
- PEAR_Downloader_Package::removeInstalled($params);
- if (!count($params)) {
- $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED);
- $a = array();
- return $a;
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->analyzeDependencies($params);
- PEAR::popErrorHandling();
- if (!count($params)) {
- $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED);
- $a = array();
- return $a;
- }
-
- $ret = array();
- $newparams = array();
- if (isset($this->_options['pretend'])) {
- return $params;
- }
-
- $somefailed = false;
- foreach ($params as $i => $package) {
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $pf = &$params[$i]->download();
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($pf)) {
- if (!isset($this->_options['soft'])) {
- $this->log(1, $pf->getMessage());
- $this->log(0, 'Error: cannot download "' .
- $this->_registry->parsedPackageNameToString($package->getParsedPackage(),
- true) .
- '"');
- }
- $somefailed = true;
- continue;
- }
-
- $newparams[] = &$params[$i];
- $ret[] = array(
- 'file' => $pf->getArchiveFile(),
- 'info' => &$pf,
- 'pkg' => $pf->getPackage()
- );
- }
-
- if ($somefailed) {
- // remove params that did not download successfully
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->analyzeDependencies($newparams, true);
- PEAR::popErrorHandling();
- if (!count($newparams)) {
- $this->pushError('Download failed', PEAR_INSTALLER_FAILED);
- $a = array();
- return $a;
- }
- }
-
- $this->_downloadedPackages = $ret;
- return $newparams;
- }
-
- /**
- * @param array all packages to be installed
- */
- function analyzeDependencies(&$params, $force = false)
- {
- if (isset($this->_options['downloadonly'])) {
- return;
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $redo = true;
- $reset = $hasfailed = $failed = false;
- while ($redo) {
- $redo = false;
- foreach ($params as $i => $param) {
- $deps = $param->getDeps();
- if (!$deps) {
- $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(),
- $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING);
- $send = $param->getPackageFile();
-
- $installcheck = $depchecker->validatePackage($send, $this, $params);
- if (PEAR::isError($installcheck)) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $installcheck->getMessage());
- }
- $hasfailed = true;
- $params[$i] = false;
- $reset = true;
- $redo = true;
- $failed = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- continue 2;
- }
- continue;
- }
-
- if (!$reset && $param->alreadyValidated() && !$force) {
- continue;
- }
-
- if (count($deps)) {
- $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(),
- $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING);
- $send = $param->getPackageFile();
- if ($send === null) {
- $send = $param->getDownloadURL();
- }
-
- $installcheck = $depchecker->validatePackage($send, $this, $params);
- if (PEAR::isError($installcheck)) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $installcheck->getMessage());
- }
- $hasfailed = true;
- $params[$i] = false;
- $reset = true;
- $redo = true;
- $failed = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- continue 2;
- }
-
- $failed = false;
- if (isset($deps['required']) && is_array($deps['required'])) {
- foreach ($deps['required'] as $type => $dep) {
- // note: Dependency2 will never return a PEAR_Error if ignore-errors
- // is specified, so soft is needed to turn off logging
- if (!isset($dep[0])) {
- if (PEAR::isError($e = $depchecker->{"validate{$type}Dependency"}($dep,
- true, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- } else {
- foreach ($dep as $d) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($d,
- true, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- }
-
- if (isset($deps['optional']) && is_array($deps['optional'])) {
- foreach ($deps['optional'] as $type => $dep) {
- if (!isset($dep[0])) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($dep,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- } else {
- foreach ($dep as $d) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($d,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- }
- }
-
- $groupname = $param->getGroup();
- if (isset($deps['group']) && $groupname) {
- if (!isset($deps['group'][0])) {
- $deps['group'] = array($deps['group']);
- }
-
- $found = false;
- foreach ($deps['group'] as $group) {
- if ($group['attribs']['name'] == $groupname) {
- $found = true;
- break;
- }
- }
-
- if ($found) {
- unset($group['attribs']);
- foreach ($group as $type => $dep) {
- if (!isset($dep[0])) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($dep,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- } else {
- foreach ($dep as $d) {
- if (PEAR::isError($e =
- $depchecker->{"validate{$type}Dependency"}($d,
- false, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- }
- }
- }
- } else {
- foreach ($deps as $dep) {
- if (PEAR::isError($e = $depchecker->validateDependency1($dep, $params))) {
- $failed = true;
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e->getMessage());
- }
- } elseif (is_array($e) && !$param->alreadyValidated()) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
- }
- }
- $params[$i]->setValidated();
- }
-
- if ($failed) {
- $hasfailed = true;
- $params[$i] = false;
- $reset = true;
- $redo = true;
- $failed = false;
- PEAR_Downloader_Package::removeDuplicates($params);
- continue 2;
- }
- }
- }
-
- PEAR::staticPopErrorHandling();
- if ($hasfailed && (isset($this->_options['ignore-errors']) ||
- isset($this->_options['nodeps']))) {
- // this is probably not needed, but just in case
- if (!isset($this->_options['soft'])) {
- $this->log(0, 'WARNING: dependencies failed');
- }
- }
- }
-
- /**
- * Retrieve the directory that downloads will happen in
- * @access private
- * @return string
- */
- function getDownloadDir()
- {
- if (isset($this->_downloadDir)) {
- return $this->_downloadDir;
- }
-
- $downloaddir = $this->config->get('download_dir');
- if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) {
- if (is_dir($downloaddir) && !is_writable($downloaddir)) {
- $this->log(0, 'WARNING: configuration download directory "' . $downloaddir .
- '" is not writeable. Change download_dir config variable to ' .
- 'a writeable dir to avoid this warning');
- }
-
- if (!class_exists('System')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- }
-
- if (PEAR::isError($downloaddir = System::mktemp('-d'))) {
- return $downloaddir;
- }
- $this->log(3, '+ tmp dir created at ' . $downloaddir);
- }
-
- if (!is_writable($downloaddir)) {
- if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) ||
- !is_writable($downloaddir)) {
- return PEAR::raiseError('download directory "' . $downloaddir .
- '" is not writeable. Change download_dir config variable to ' .
- 'a writeable dir');
- }
- }
-
- return $this->_downloadDir = $downloaddir;
- }
-
- function setDownloadDir($dir)
- {
- if (!@is_writable($dir)) {
- if (PEAR::isError(System::mkdir(array('-p', $dir)))) {
- return PEAR::raiseError('download directory "' . $dir .
- '" is not writeable. Change download_dir config variable to ' .
- 'a writeable dir');
- }
- }
- $this->_downloadDir = $dir;
- }
-
- function configSet($key, $value, $layer = 'user', $channel = false)
- {
- $this->config->set($key, $value, $layer, $channel);
- $this->_preferredState = $this->config->get('preferred_state', null, $channel);
- if (!$this->_preferredState) {
- // don't inadvertantly use a non-set preferred_state
- $this->_preferredState = null;
- }
- }
-
- function setOptions($options)
- {
- $this->_options = $options;
- }
-
- function getOptions()
- {
- return $this->_options;
- }
-
-
- /**
- * @param array output of {@link parsePackageName()}
- * @access private
- */
- function _getPackageDownloadUrl($parr)
- {
- $curchannel = $this->config->get('default_channel');
- $this->configSet('default_channel', $parr['channel']);
- // getDownloadURL returns an array. On error, it only contains information
- // on the latest release as array(version, info). On success it contains
- // array(version, info, download url string)
- $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state');
- if (!$this->_registry->channelExists($parr['channel'])) {
- do {
- if ($this->config->get('auto_discover') && $this->discover($parr['channel'])) {
- break;
- }
-
- $this->configSet('default_channel', $curchannel);
- return PEAR::raiseError('Unknown remote channel: ' . $parr['channel']);
- } while (false);
- }
-
- $chan = &$this->_registry->getChannel($parr['channel']);
- if (PEAR::isError($chan)) {
- return $chan;
- }
-
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $version = $this->_registry->packageInfo($parr['package'], 'version', $parr['channel']);
- $stability = $this->_registry->packageInfo($parr['package'], 'stability', $parr['channel']);
- // package is installed - use the installed release stability level
- if (!isset($parr['state']) && $stability !== null) {
- $state = $stability['release'];
- }
- PEAR::staticPopErrorHandling();
- $base2 = false;
-
- $preferred_mirror = $this->config->get('preferred_mirror');
- if (!$chan->supportsREST($preferred_mirror) ||
- (
- !($base2 = $chan->getBaseURL('REST1.3', $preferred_mirror))
- &&
- !($base = $chan->getBaseURL('REST1.0', $preferred_mirror))
- )
- ) {
- return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.');
- }
-
- if ($base2) {
- $rest = &$this->config->getREST('1.3', $this->_options);
- $base = $base2;
- } else {
- $rest = &$this->config->getREST('1.0', $this->_options);
- }
-
- $downloadVersion = false;
- if (!isset($parr['version']) && !isset($parr['state']) && $version
- && !PEAR::isError($version)
- && !isset($this->_options['downloadonly'])
- ) {
- $downloadVersion = $version;
- }
-
- $url = $rest->getDownloadURL($base, $parr, $state, $downloadVersion, $chan->getName());
- if (PEAR::isError($url)) {
- $this->configSet('default_channel', $curchannel);
- return $url;
- }
-
- if ($parr['channel'] != $curchannel) {
- $this->configSet('default_channel', $curchannel);
- }
-
- if (!is_array($url)) {
- return $url;
- }
-
- $url['raw'] = false; // no checking is necessary for REST
- if (!is_array($url['info'])) {
- return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' .
- 'this should never happen');
- }
-
- if (!isset($this->_options['force']) &&
- !isset($this->_options['downloadonly']) &&
- $version &&
- !PEAR::isError($version) &&
- !isset($parr['group'])
- ) {
- if (version_compare($version, $url['version'], '=')) {
- return PEAR::raiseError($this->_registry->parsedPackageNameToString(
- $parr, true) . ' is already installed and is the same as the ' .
- 'released version ' . $url['version'], -976);
- }
-
- if (version_compare($version, $url['version'], '>')) {
- return PEAR::raiseError($this->_registry->parsedPackageNameToString(
- $parr, true) . ' is already installed and is newer than detected ' .
- 'released version ' . $url['version'], -976);
- }
- }
-
- if (isset($url['info']['required']) || $url['compatible']) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
- $pf = new PEAR_PackageFile_v2;
- $pf->setRawChannel($parr['channel']);
- if ($url['compatible']) {
- $pf->setRawCompatible($url['compatible']);
- }
- } else {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
- $pf = new PEAR_PackageFile_v1;
- }
-
- $pf->setRawPackage($url['package']);
- $pf->setDeps($url['info']);
- if ($url['compatible']) {
- $pf->setCompatible($url['compatible']);
- }
-
- $pf->setRawState($url['stability']);
- $url['info'] = &$pf;
- if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) {
- $ext = '.tar';
- } else {
- $ext = '.tgz';
- }
-
- if (is_array($url) && isset($url['url'])) {
- $url['url'] .= $ext;
- }
-
- return $url;
- }
-
- /**
- * @param array dependency array
- * @access private
- */
- function _getDepPackageDownloadUrl($dep, $parr)
- {
- $xsdversion = isset($dep['rel']) ? '1.0' : '2.0';
- $curchannel = $this->config->get('default_channel');
- if (isset($dep['uri'])) {
- $xsdversion = '2.0';
- $chan = &$this->_registry->getChannel('__uri');
- if (PEAR::isError($chan)) {
- return $chan;
- }
-
- $version = $this->_registry->packageInfo($dep['name'], 'version', '__uri');
- $this->configSet('default_channel', '__uri');
- } else {
- if (isset($dep['channel'])) {
- $remotechannel = $dep['channel'];
- } else {
- $remotechannel = 'pear.php.net';
- }
-
- if (!$this->_registry->channelExists($remotechannel)) {
- do {
- if ($this->config->get('auto_discover')) {
- if ($this->discover($remotechannel)) {
- break;
- }
- }
- return PEAR::raiseError('Unknown remote channel: ' . $remotechannel);
- } while (false);
- }
-
- $chan = &$this->_registry->getChannel($remotechannel);
- if (PEAR::isError($chan)) {
- return $chan;
- }
-
- $version = $this->_registry->packageInfo($dep['name'], 'version', $remotechannel);
- $this->configSet('default_channel', $remotechannel);
- }
-
- $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state');
- if (isset($parr['state']) && isset($parr['version'])) {
- unset($parr['state']);
- }
-
- if (isset($dep['uri'])) {
- $info = &$this->newDownloaderPackage($this);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $err = $info->initialize($dep);
- PEAR::staticPopErrorHandling();
- if (!$err) {
- // skip parameters that were missed by preferred_state
- return PEAR::raiseError('Cannot initialize dependency');
- }
-
- if (PEAR::isError($err)) {
- if (!isset($this->_options['soft'])) {
- $this->log(0, $err->getMessage());
- }
-
- if (is_object($info)) {
- $param = $info->getChannel() . '/' . $info->getPackage();
- }
- return PEAR::raiseError('Package "' . $param . '" is not valid');
- }
- return $info;
- } elseif ($chan->supportsREST($this->config->get('preferred_mirror'))
- &&
- (
- ($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror')))
- ||
- ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror')))
- )
- ) {
- if ($base2) {
- $base = $base2;
- $rest = &$this->config->getREST('1.3', $this->_options);
- } else {
- $rest = &$this->config->getREST('1.0', $this->_options);
- }
-
- $url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr,
- $state, $version, $chan->getName());
- if (PEAR::isError($url)) {
- return $url;
- }
-
- if ($parr['channel'] != $curchannel) {
- $this->configSet('default_channel', $curchannel);
- }
-
- if (!is_array($url)) {
- return $url;
- }
-
- $url['raw'] = false; // no checking is necessary for REST
- if (!is_array($url['info'])) {
- return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' .
- 'this should never happen');
- }
-
- if (isset($url['info']['required'])) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
- }
- $pf = new PEAR_PackageFile_v2;
- $pf->setRawChannel($remotechannel);
- } else {
- if (!class_exists('PEAR_PackageFile_v1')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
- }
- $pf = new PEAR_PackageFile_v1;
-
- }
- $pf->setRawPackage($url['package']);
- $pf->setDeps($url['info']);
- if ($url['compatible']) {
- $pf->setCompatible($url['compatible']);
- }
-
- $pf->setRawState($url['stability']);
- $url['info'] = &$pf;
- if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) {
- $ext = '.tar';
- } else {
- $ext = '.tgz';
- }
-
- if (is_array($url) && isset($url['url'])) {
- $url['url'] .= $ext;
- }
-
- return $url;
- }
-
- return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.');
- }
-
- /**
- * @deprecated in favor of _getPackageDownloadUrl
- */
- function getPackageDownloadUrl($package, $version = null, $channel = false)
- {
- if ($version) {
- $package .= "-$version";
- }
- if ($this === null || $this->_registry === null) {
- $package = "http://pear.php.net/get/$package";
- } else {
- $chan = $this->_registry->getChannel($channel);
- if (PEAR::isError($chan)) {
- return '';
- }
- $package = "http://" . $chan->getServer() . "/get/$package";
- }
- if (!extension_loaded("zlib")) {
- $package .= '?uncompress=yes';
- }
- return $package;
- }
-
- /**
- * Retrieve a list of downloaded packages after a call to {@link download()}.
- *
- * Also resets the list of downloaded packages.
- * @return array
- */
- function getDownloadedPackages()
- {
- $ret = $this->_downloadedPackages;
- $this->_downloadedPackages = array();
- $this->_toDownload = array();
- return $ret;
- }
-
- function _downloadCallback($msg, $params = null)
- {
- switch ($msg) {
- case 'saveas':
- $this->log(1, "downloading $params ...");
- break;
- case 'done':
- $this->log(1, '...done: ' . number_format($params, 0, '', ',') . ' bytes');
- break;
- case 'bytesread':
- static $bytes;
- if (empty($bytes)) {
- $bytes = 0;
- }
- if (!($bytes % 10240)) {
- $this->log(1, '.', false);
- }
- $bytes += $params;
- break;
- case 'start':
- if($params[1] == -1) {
- $length = "Unknown size";
- } else {
- $length = number_format($params[1], 0, '', ',')." bytes";
- }
- $this->log(1, "Starting to download {$params[0]} ($length)");
- break;
- }
- if (method_exists($this->ui, '_downloadCallback'))
- $this->ui->_downloadCallback($msg, $params);
- }
-
- function _prependPath($path, $prepend)
- {
- if (strlen($prepend) > 0) {
- if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) {
- if (preg_match('/^[a-z]:/i', $prepend)) {
- $prepend = substr($prepend, 2);
- } elseif ($prepend{0} != '\\') {
- $prepend = "\\$prepend";
- }
- $path = substr($path, 0, 2) . $prepend . substr($path, 2);
- } else {
- $path = $prepend . $path;
- }
- }
- return $path;
- }
-
- /**
- * @param string
- * @param integer
- */
- function pushError($errmsg, $code = -1)
- {
- array_push($this->_errorStack, array($errmsg, $code));
- }
-
- function getErrorMsgs()
- {
- $msgs = array();
- $errs = $this->_errorStack;
- foreach ($errs as $err) {
- $msgs[] = $err[0];
- }
- $this->_errorStack = array();
- return $msgs;
- }
-
- /**
- * for BC
- *
- * @deprecated
- */
- function sortPkgDeps(&$packages, $uninstall = false)
- {
- $uninstall ?
- $this->sortPackagesForUninstall($packages) :
- $this->sortPackagesForInstall($packages);
- }
-
- /**
- * Sort a list of arrays of array(downloaded packagefilename) by dependency.
- *
- * This uses the topological sort method from graph theory, and the
- * Structures_Graph package to properly sort dependencies for installation.
- * @param array an array of downloaded PEAR_Downloader_Packages
- * @return array array of array(packagefilename, package.xml contents)
- */
- function sortPackagesForInstall(&$packages)
- {
- require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Node.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Manipulator/TopologicalSorter.php';
- $depgraph = new Structures_Graph(true);
- $nodes = array();
- $reg = &$this->config->getRegistry();
- foreach ($packages as $i => $package) {
- $pname = $reg->parsedPackageNameToString(
- array(
- 'channel' => $package->getChannel(),
- 'package' => strtolower($package->getPackage()),
- ));
- $nodes[$pname] = new Structures_Graph_Node;
- $nodes[$pname]->setData($packages[$i]);
- $depgraph->addNode($nodes[$pname]);
- }
-
- $deplinks = array();
- foreach ($nodes as $package => $node) {
- $pf = &$node->getData();
- $pdeps = $pf->getDeps(true);
- if (!$pdeps) {
- continue;
- }
-
- if ($pf->getPackagexmlVersion() == '1.0') {
- foreach ($pdeps as $dep) {
- if ($dep['type'] != 'pkg' ||
- (isset($dep['optional']) && $dep['optional'] == 'yes')) {
- continue;
- }
-
- $dname = $reg->parsedPackageNameToString(
- array(
- 'channel' => 'pear.php.net',
- 'package' => strtolower($dep['name']),
- ));
-
- if (isset($nodes[$dname])) {
- if (!isset($deplinks[$dname])) {
- $deplinks[$dname] = array();
- }
-
- $deplinks[$dname][$package] = 1;
- // dependency is in installed packages
- continue;
- }
-
- $dname = $reg->parsedPackageNameToString(
- array(
- 'channel' => 'pecl.php.net',
- 'package' => strtolower($dep['name']),
- ));
-
- if (isset($nodes[$dname])) {
- if (!isset($deplinks[$dname])) {
- $deplinks[$dname] = array();
- }
-
- $deplinks[$dname][$package] = 1;
- // dependency is in installed packages
- continue;
- }
- }
- } else {
- // the only ordering we care about is:
- // 1) subpackages must be installed before packages that depend on them
- // 2) required deps must be installed before packages that depend on them
- if (isset($pdeps['required']['subpackage'])) {
- $t = $pdeps['required']['subpackage'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
-
- if (isset($pdeps['group'])) {
- if (!isset($pdeps['group'][0])) {
- $pdeps['group'] = array($pdeps['group']);
- }
-
- foreach ($pdeps['group'] as $group) {
- if (isset($group['subpackage'])) {
- $t = $group['subpackage'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
- }
- }
-
- if (isset($pdeps['optional']['subpackage'])) {
- $t = $pdeps['optional']['subpackage'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
-
- if (isset($pdeps['required']['package'])) {
- $t = $pdeps['required']['package'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
-
- if (isset($pdeps['group'])) {
- if (!isset($pdeps['group'][0])) {
- $pdeps['group'] = array($pdeps['group']);
- }
-
- foreach ($pdeps['group'] as $group) {
- if (isset($group['package'])) {
- $t = $group['package'];
- if (!isset($t[0])) {
- $t = array($t);
- }
-
- $this->_setupGraph($t, $reg, $deplinks, $nodes, $package);
- }
- }
- }
- }
- }
-
- $this->_detectDepCycle($deplinks);
- foreach ($deplinks as $dependent => $parents) {
- foreach ($parents as $parent => $unused) {
- $nodes[$dependent]->connectTo($nodes[$parent]);
- }
- }
-
- $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph);
- $ret = array();
- for ($i = 0, $count = count($installOrder); $i < $count; $i++) {
- foreach ($installOrder[$i] as $index => $sortedpackage) {
- $data = &$installOrder[$i][$index]->getData();
- $ret[] = &$nodes[$reg->parsedPackageNameToString(
- array(
- 'channel' => $data->getChannel(),
- 'package' => strtolower($data->getPackage()),
- ))]->getData();
- }
- }
-
- $packages = $ret;
- return;
- }
-
- /**
- * Detect recursive links between dependencies and break the cycles
- *
- * @param array
- * @access private
- */
- function _detectDepCycle(&$deplinks)
- {
- do {
- $keepgoing = false;
- foreach ($deplinks as $dep => $parents) {
- foreach ($parents as $parent => $unused) {
- // reset the parent cycle detector
- $this->_testCycle(null, null, null);
- if ($this->_testCycle($dep, $deplinks, $parent)) {
- $keepgoing = true;
- unset($deplinks[$dep][$parent]);
- if (count($deplinks[$dep]) == 0) {
- unset($deplinks[$dep]);
- }
-
- continue 3;
- }
- }
- }
- } while ($keepgoing);
- }
-
- function _testCycle($test, $deplinks, $dep)
- {
- static $visited = array();
- if ($test === null) {
- $visited = array();
- return;
- }
-
- // this happens when a parent has a dep cycle on another dependency
- // but the child is not part of the cycle
- if (isset($visited[$dep])) {
- return false;
- }
-
- $visited[$dep] = 1;
- if ($test == $dep) {
- return true;
- }
-
- if (isset($deplinks[$dep])) {
- if (in_array($test, array_keys($deplinks[$dep]), true)) {
- return true;
- }
-
- foreach ($deplinks[$dep] as $parent => $unused) {
- if ($this->_testCycle($test, $deplinks, $parent)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Set up the dependency for installation parsing
- *
- * @param array $t dependency information
- * @param PEAR_Registry $reg
- * @param array $deplinks list of dependency links already established
- * @param array $nodes all existing package nodes
- * @param string $package parent package name
- * @access private
- */
- function _setupGraph($t, $reg, &$deplinks, &$nodes, $package)
- {
- foreach ($t as $dep) {
- $depchannel = !isset($dep['channel']) ? '__uri': $dep['channel'];
- $dname = $reg->parsedPackageNameToString(
- array(
- 'channel' => $depchannel,
- 'package' => strtolower($dep['name']),
- ));
-
- if (isset($nodes[$dname])) {
- if (!isset($deplinks[$dname])) {
- $deplinks[$dname] = array();
- }
- $deplinks[$dname][$package] = 1;
- }
- }
- }
-
- function _dependsOn($a, $b)
- {
- return $this->_checkDepTree(strtolower($a->getChannel()), strtolower($a->getPackage()), $b);
- }
-
- function _checkDepTree($channel, $package, $b, $checked = array())
- {
- $checked[$channel][$package] = true;
- if (!isset($this->_depTree[$channel][$package])) {
- return false;
- }
-
- if (isset($this->_depTree[$channel][$package][strtolower($b->getChannel())]
- [strtolower($b->getPackage())])) {
- return true;
- }
-
- foreach ($this->_depTree[$channel][$package] as $ch => $packages) {
- foreach ($packages as $pa => $true) {
- if ($this->_checkDepTree($ch, $pa, $b, $checked)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- function _sortInstall($a, $b)
- {
- if (!$a->getDeps() && !$b->getDeps()) {
- return 0; // neither package has dependencies, order is insignificant
- }
- if ($a->getDeps() && !$b->getDeps()) {
- return 1; // $a must be installed after $b because $a has dependencies
- }
- if (!$a->getDeps() && $b->getDeps()) {
- return -1; // $b must be installed after $a because $b has dependencies
- }
- // both packages have dependencies
- if ($this->_dependsOn($a, $b)) {
- return 1;
- }
- if ($this->_dependsOn($b, $a)) {
- return -1;
- }
- return 0;
- }
-
- /**
- * Download a file through HTTP. Considers suggested file name in
- * Content-disposition: header and can run a callback function for
- * different events. The callback will be called with two
- * parameters: the callback type, and parameters. The implemented
- * callback types are:
- *
- * 'setup' called at the very beginning, parameter is a UI object
- * that should be used for all output
- * 'message' the parameter is a string with an informational message
- * 'saveas' may be used to save with a different file name, the
- * parameter is the filename that is about to be used.
- * If a 'saveas' callback returns a non-empty string,
- * that file name will be used as the filename instead.
- * Note that $save_dir will not be affected by this, only
- * the basename of the file.
- * 'start' download is starting, parameter is number of bytes
- * that are expected, or -1 if unknown
- * 'bytesread' parameter is the number of bytes read so far
- * 'done' download is complete, parameter is the total number
- * of bytes read
- * 'connfailed' if the TCP/SSL connection fails, this callback is called
- * with array(host,port,errno,errmsg)
- * 'writefailed' if writing to disk fails, this callback is called
- * with array(destfile,errmsg)
- *
- * If an HTTP proxy has been configured (http_proxy PEAR_Config
- * setting), the proxy will be used.
- *
- * @param string $url the URL to download
- * @param object $ui PEAR_Frontend_* instance
- * @param object $config PEAR_Config instance
- * @param string $save_dir directory to save file in
- * @param mixed $callback function/method to call for status
- * updates
- * @param false|string|array $lastmodified header values to check against for caching
- * use false to return the header values from this download
- * @param false|array $accept Accept headers to send
- * @param false|string $channel Channel to use for retrieving authentication
- * @return string|array Returns the full path of the downloaded file or a PEAR
- * error on failure. If the error is caused by
- * socket-related errors, the error object will
- * have the fsockopen error code available through
- * getCode(). If caching is requested, then return the header
- * values.
- *
- * @access public
- */
- function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null,
- $accept = false, $channel = false)
- {
- static $redirect = 0;
- // always reset , so we are clean case of error
- $wasredirect = $redirect;
- $redirect = 0;
- if ($callback) {
- call_user_func($callback, 'setup', array(&$ui));
- }
-
- $info = parse_url($url);
- if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) {
- return PEAR::raiseError('Cannot download non-http URL "' . $url . '"');
- }
-
- if (!isset($info['host'])) {
- return PEAR::raiseError('Cannot download from non-URL "' . $url . '"');
- }
-
- $host = isset($info['host']) ? $info['host'] : null;
- $port = isset($info['port']) ? $info['port'] : null;
- $path = isset($info['path']) ? $info['path'] : null;
-
- if (isset($this)) {
- $config = &$this->config;
- } else {
- $config = &PEAR_Config::singleton();
- }
-
- $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
- if ($config->get('http_proxy') &&
- $proxy = parse_url($config->get('http_proxy'))) {
- $proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
- if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
- $proxy_host = 'ssl://' . $proxy_host;
- }
- $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080;
- $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null;
- $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null;
-
- if ($callback) {
- call_user_func($callback, 'message', "Using HTTP proxy $host:$port");
- }
- }
-
- if (empty($port)) {
- $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80;
- }
-
- $scheme = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http';
-
- if ($proxy_host != '') {
- $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr);
- if (!$fp) {
- if ($callback) {
- call_user_func($callback, 'connfailed', array($proxy_host, $proxy_port,
- $errno, $errstr));
- }
- return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", $errno);
- }
-
- if ($lastmodified === false || $lastmodified) {
- $request = "GET $url HTTP/1.1\r\n";
- $request .= "Host: $host\r\n";
- } else {
- $request = "GET $url HTTP/1.0\r\n";
- $request .= "Host: $host\r\n";
- }
- } else {
- $network_host = $host;
- if (isset($info['scheme']) && $info['scheme'] == 'https') {
- $network_host = 'ssl://' . $host;
- }
-
- $fp = @fsockopen($network_host, $port, $errno, $errstr);
- if (!$fp) {
- if ($callback) {
- call_user_func($callback, 'connfailed', array($host, $port,
- $errno, $errstr));
- }
- return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno);
- }
-
- if ($lastmodified === false || $lastmodified) {
- $request = "GET $path HTTP/1.1\r\n";
- $request .= "Host: $host\r\n";
- } else {
- $request = "GET $path HTTP/1.0\r\n";
- $request .= "Host: $host\r\n";
- }
- }
-
- $ifmodifiedsince = '';
- if (is_array($lastmodified)) {
- if (isset($lastmodified['Last-Modified'])) {
- $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n";
- }
-
- if (isset($lastmodified['ETag'])) {
- $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n";
- }
- } else {
- $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
- }
-
- $request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.5/PHP/" . PHP_VERSION . "\r\n";
-
- if (isset($this)) { // only pass in authentication for non-static calls
- $username = $config->get('username', null, $channel);
- $password = $config->get('password', null, $channel);
- if ($username && $password) {
- $tmp = base64_encode("$username:$password");
- $request .= "Authorization: Basic $tmp\r\n";
- }
- }
-
- if ($proxy_host != '' && $proxy_user != '') {
- $request .= 'Proxy-Authorization: Basic ' .
- base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n";
- }
-
- if ($accept) {
- $request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
- }
-
- $request .= "Connection: close\r\n";
- $request .= "\r\n";
- fwrite($fp, $request);
- $headers = array();
- $reply = 0;
- while (trim($line = fgets($fp, 1024))) {
- if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) {
- $headers[strtolower($matches[1])] = trim($matches[2]);
- } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {
- $reply = (int)$matches[1];
- if ($reply == 304 && ($lastmodified || ($lastmodified === false))) {
- return false;
- }
-
- if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) {
- return PEAR::raiseError("File $scheme://$host:$port$path not valid (received: $line)");
- }
- }
- }
-
- if ($reply != 200) {
- if (!isset($headers['location'])) {
- return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirected but no location)");
- }
-
- if ($wasredirect > 4) {
- return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirection looped more than 5 times)");
- }
-
- $redirect = $wasredirect + 1;
- return $this->downloadHttp($headers['location'],
- $ui, $save_dir, $callback, $lastmodified, $accept);
- }
-
- if (isset($headers['content-disposition']) &&
- preg_match('/\sfilename=\"([^;]*\S)\"\s*(;|\\z)/', $headers['content-disposition'], $matches)) {
- $save_as = basename($matches[1]);
- } else {
- $save_as = basename($url);
- }
-
- if ($callback) {
- $tmp = call_user_func($callback, 'saveas', $save_as);
- if ($tmp) {
- $save_as = $tmp;
- }
- }
-
- $dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as;
- if (is_link($dest_file)) {
- return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $dest_file . ' as it is symlinked to ' . readlink($dest_file) . ' - Possible symlink attack');
- }
-
- if (!$wp = @fopen($dest_file, 'wb')) {
- fclose($fp);
- if ($callback) {
- call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg));
- }
- return PEAR::raiseError("could not open $dest_file for writing");
- }
-
- $length = isset($headers['content-length']) ? $headers['content-length'] : -1;
-
- $bytes = 0;
- if ($callback) {
- call_user_func($callback, 'start', array(basename($dest_file), $length));
- }
-
- while ($data = fread($fp, 1024)) {
- $bytes += strlen($data);
- if ($callback) {
- call_user_func($callback, 'bytesread', $bytes);
- }
- if (!@fwrite($wp, $data)) {
- fclose($fp);
- if ($callback) {
- call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg));
- }
- return PEAR::raiseError("$dest_file: write failed ($php_errormsg)");
- }
- }
-
- fclose($fp);
- fclose($wp);
- if ($callback) {
- call_user_func($callback, 'done', $bytes);
- }
-
- if ($lastmodified === false || $lastmodified) {
- if (isset($headers['etag'])) {
- $lastmodified = array('ETag' => $headers['etag']);
- }
-
- if (isset($headers['last-modified'])) {
- if (is_array($lastmodified)) {
- $lastmodified['Last-Modified'] = $headers['last-modified'];
- } else {
- $lastmodified = $headers['last-modified'];
- }
- }
- return array($dest_file, $lastmodified, $headers);
- }
- return $dest_file;
- }
-}
-<?php
-/**
- * PEAR_Downloader_Package
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Error code when parameter initialization fails because no releases
- * exist within preferred_state, but releases do exist
- */
-define('PEAR_DOWNLOADER_PACKAGE_STATE', -1003);
-/**
- * Error code when parameter initialization fails because no releases
- * exist that will work with the existing PHP version
- */
-define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004);
-
-/**
- * Coordinates download parameters and manages their dependencies
- * prior to downloading them.
- *
- * Input can come from three sources:
- *
- * - local files (archives or package.xml)
- * - remote files (downloadable urls)
- * - abstract package names
- *
- * The first two elements are handled cleanly by PEAR_PackageFile, but the third requires
- * accessing pearweb's xml-rpc interface to determine necessary dependencies, and the
- * format returned of dependencies is slightly different from that used in package.xml.
- *
- * This class hides the differences between these elements, and makes automatic
- * dependency resolution a piece of cake. It also manages conflicts when
- * two classes depend on incompatible dependencies, or differing versions of the same
- * package dependency. In addition, download will not be attempted if the php version is
- * not supported, PEAR installer version is not supported, or non-PECL extensions are not
- * installed.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Downloader_Package
-{
- /**
- * @var PEAR_Downloader
- */
- var $_downloader;
- /**
- * @var PEAR_Config
- */
- var $_config;
- /**
- * @var PEAR_Registry
- */
- var $_registry;
- /**
- * Used to implement packagingroot properly
- * @var PEAR_Registry
- */
- var $_installRegistry;
- /**
- * @var PEAR_PackageFile_v1|PEAR_PackageFile|v2
- */
- var $_packagefile;
- /**
- * @var array
- */
- var $_parsedname;
- /**
- * @var array
- */
- var $_downloadURL;
- /**
- * @var array
- */
- var $_downloadDeps = array();
- /**
- * @var boolean
- */
- var $_valid = false;
- /**
- * @var boolean
- */
- var $_analyzed = false;
- /**
- * if this or a parent package was invoked with Package-state, this is set to the
- * state variable.
- *
- * This allows temporary reassignment of preferred_state for a parent package and all of
- * its dependencies.
- * @var string|false
- */
- var $_explicitState = false;
- /**
- * If this package is invoked with Package#group, this variable will be true
- */
- var $_explicitGroup = false;
- /**
- * Package type local|url
- * @var string
- */
- var $_type;
- /**
- * Contents of package.xml, if downloaded from a remote channel
- * @var string|false
- * @access private
- */
- var $_rawpackagefile;
- /**
- * @var boolean
- * @access private
- */
- var $_validated = false;
-
- /**
- * @param PEAR_Downloader
- */
- function __construct(&$downloader)
- {
- $this->_downloader = &$downloader;
- $this->_config = &$this->_downloader->config;
- $this->_registry = &$this->_config->getRegistry();
- $options = $downloader->getOptions();
- if (isset($options['packagingroot'])) {
- $this->_config->setInstallRoot($options['packagingroot']);
- $this->_installRegistry = &$this->_config->getRegistry();
- $this->_config->setInstallRoot(false);
- } else {
- $this->_installRegistry = &$this->_registry;
- }
- $this->_valid = $this->_analyzed = false;
- }
-
- /**
- * Parse the input and determine whether this is a local file, a remote uri, or an
- * abstract package name.
- *
- * This is the heart of the PEAR_Downloader_Package(), and is used in
- * {@link PEAR_Downloader::download()}
- * @param string
- * @return bool|PEAR_Error
- */
- function initialize($param)
- {
- $origErr = $this->_fromFile($param);
- if ($this->_valid) {
- return true;
- }
-
- $options = $this->_downloader->getOptions();
- if (isset($options['offline'])) {
- if (PEAR::isError($origErr) && !isset($options['soft'])) {
- foreach ($origErr->getUserInfo() as $userInfo) {
- if (isset($userInfo['message'])) {
- $this->_downloader->log(0, $userInfo['message']);
- }
- }
-
- $this->_downloader->log(0, $origErr->getMessage());
- }
-
- return PEAR::raiseError('Cannot download non-local package "' . $param . '"');
- }
-
- $err = $this->_fromUrl($param);
- if (PEAR::isError($err) || !$this->_valid) {
- if ($this->_type == 'url') {
- if (PEAR::isError($err) && !isset($options['soft'])) {
- $this->_downloader->log(0, $err->getMessage());
- }
-
- return PEAR::raiseError("Invalid or missing remote package file");
- }
-
- $err = $this->_fromString($param);
- if (PEAR::isError($err) || !$this->_valid) {
- if (PEAR::isError($err) && $err->getCode() == PEAR_DOWNLOADER_PACKAGE_STATE) {
- return false; // instruct the downloader to silently skip
- }
-
- if (isset($this->_type) && $this->_type == 'local' && PEAR::isError($origErr)) {
- if (is_array($origErr->getUserInfo())) {
- foreach ($origErr->getUserInfo() as $err) {
- if (is_array($err)) {
- $err = $err['message'];
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $err);
- }
- }
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $origErr->getMessage());
- }
-
- if (is_array($param)) {
- $param = $this->_registry->parsedPackageNameToString($param, true);
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file");
- }
-
- // Passing no message back - already logged above
- return PEAR::raiseError();
- }
-
- if (PEAR::isError($err) && !isset($options['soft'])) {
- $this->_downloader->log(0, $err->getMessage());
- }
-
- if (is_array($param)) {
- $param = $this->_registry->parsedPackageNameToString($param, true);
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file");
- }
-
- // Passing no message back - already logged above
- return PEAR::raiseError();
- }
- }
-
- return true;
- }
-
- /**
- * Retrieve any non-local packages
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|PEAR_Error
- */
- function &download()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile;
- }
-
- if (isset($this->_downloadURL['url'])) {
- $this->_isvalid = false;
- $info = $this->getParsedPackage();
- foreach ($info as $i => $p) {
- $info[$i] = strtolower($p);
- }
-
- $err = $this->_fromUrl($this->_downloadURL['url'],
- $this->_registry->parsedPackageNameToString($this->_parsedname, true));
- $newinfo = $this->getParsedPackage();
- foreach ($newinfo as $i => $p) {
- $newinfo[$i] = strtolower($p);
- }
-
- if ($info != $newinfo) {
- do {
- if ($info['channel'] == 'pecl.php.net' && $newinfo['channel'] == 'pear.php.net') {
- $info['channel'] = 'pear.php.net';
- if ($info == $newinfo) {
- // skip the channel check if a pecl package says it's a PEAR package
- break;
- }
- }
- if ($info['channel'] == 'pear.php.net' && $newinfo['channel'] == 'pecl.php.net') {
- $info['channel'] = 'pecl.php.net';
- if ($info == $newinfo) {
- // skip the channel check if a pecl package says it's a PEAR package
- break;
- }
- }
-
- return PEAR::raiseError('CRITICAL ERROR: We are ' .
- $this->_registry->parsedPackageNameToString($info) . ', but the file ' .
- 'downloaded claims to be ' .
- $this->_registry->parsedPackageNameToString($this->getParsedPackage()));
- } while (false);
- }
-
- if (PEAR::isError($err) || !$this->_valid) {
- return $err;
- }
- }
-
- $this->_type = 'local';
- return $this->_packagefile;
- }
-
- function &getPackageFile()
- {
- return $this->_packagefile;
- }
-
- function &getDownloader()
- {
- return $this->_downloader;
- }
-
- function getType()
- {
- return $this->_type;
- }
-
- /**
- * Like {@link initialize()}, but operates on a dependency
- */
- function fromDepURL($dep)
- {
- $this->_downloadURL = $dep;
- if (isset($dep['uri'])) {
- $options = $this->_downloader->getOptions();
- if (!extension_loaded("zlib") || isset($options['nocompress'])) {
- $ext = '.tar';
- } else {
- $ext = '.tgz';
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->_fromUrl($dep['uri'] . $ext);
- PEAR::popErrorHandling();
- if (PEAR::isError($err)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $err->getMessage());
- }
-
- return PEAR::raiseError('Invalid uri dependency "' . $dep['uri'] . $ext . '", ' .
- 'cannot download');
- }
- } else {
- $this->_parsedname =
- array(
- 'package' => $dep['info']->getPackage(),
- 'channel' => $dep['info']->getChannel(),
- 'version' => $dep['version']
- );
- if (!isset($dep['nodefault'])) {
- $this->_parsedname['group'] = 'default'; // download the default dependency group
- $this->_explicitGroup = false;
- }
-
- $this->_rawpackagefile = $dep['raw'];
- }
- }
-
- function detectDependencies($params)
- {
- $options = $this->_downloader->getOptions();
- if (isset($options['downloadonly'])) {
- return;
- }
-
- if (isset($options['offline'])) {
- $this->_downloader->log(3, 'Skipping dependency download check, --offline specified');
- return;
- }
-
- $pname = $this->getParsedPackage();
- if (!$pname) {
- return;
- }
-
- $deps = $this->getDeps();
- if (!$deps) {
- return;
- }
-
- if (isset($deps['required'])) { // package.xml 2.0
- return $this->_detect2($deps, $pname, $options, $params);
- }
-
- return $this->_detect1($deps, $pname, $options, $params);
- }
-
- function setValidated()
- {
- $this->_validated = true;
- }
-
- function alreadyValidated()
- {
- return $this->_validated;
- }
-
- /**
- * Remove packages to be downloaded that are already installed
- * @param array of PEAR_Downloader_Package objects
- * @static
- */
- function removeInstalled(&$params)
- {
- if (!isset($params[0])) {
- return;
- }
-
- $options = $params[0]->_downloader->getOptions();
- if (!isset($options['downloadonly'])) {
- foreach ($params as $i => $param) {
- $package = $param->getPackage();
- $channel = $param->getChannel();
- // remove self if already installed with this version
- // this does not need any pecl magic - we only remove exact matches
- if ($param->_installRegistry->packageExists($package, $channel)) {
- $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel);
- if (version_compare($packageVersion, $param->getVersion(), '==')) {
- if (!isset($options['force'])) {
- $info = $param->getParsedPackage();
- unset($info['version']);
- unset($info['state']);
- if (!isset($options['soft'])) {
- $param->_downloader->log(1, 'Skipping package "' .
- $param->getShortName() .
- '", already installed as version ' . $packageVersion);
- }
- $params[$i] = false;
- }
- } elseif (!isset($options['force']) && !isset($options['upgrade']) &&
- !isset($options['soft'])) {
- $info = $param->getParsedPackage();
- $param->_downloader->log(1, 'Skipping package "' .
- $param->getShortName() .
- '", already installed as version ' . $packageVersion);
- $params[$i] = false;
- }
- }
- }
- }
-
- PEAR_Downloader_Package::removeDuplicates($params);
- }
-
- function _detect2($deps, $pname, $options, $params)
- {
- $this->_downloadDeps = array();
- $groupnotfound = false;
- foreach (array('package', 'subpackage') as $packagetype) {
- // get required dependency group
- if (isset($deps['required'][$packagetype])) {
- if (isset($deps['required'][$packagetype][0])) {
- foreach ($deps['required'][$packagetype] as $dep) {
- if (isset($dep['conflicts'])) {
- // skip any package that this package conflicts with
- continue;
- }
- $ret = $this->_detect2Dep($dep, $pname, 'required', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- } else {
- $dep = $deps['required'][$packagetype];
- if (!isset($dep['conflicts'])) {
- // skip any package that this package conflicts with
- $ret = $this->_detect2Dep($dep, $pname, 'required', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- }
- }
-
- // get optional dependency group, if any
- if (isset($deps['optional'][$packagetype])) {
- $skipnames = array();
- if (!isset($deps['optional'][$packagetype][0])) {
- $deps['optional'][$packagetype] = array($deps['optional'][$packagetype]);
- }
-
- foreach ($deps['optional'][$packagetype] as $dep) {
- $skip = false;
- if (!isset($options['alldeps'])) {
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, 'Notice: package "' .
- $this->_registry->parsedPackageNameToString($this->getParsedPackage(),
- true) . '" optional dependency "' .
- $this->_registry->parsedPackageNameToString(array('package' =>
- $dep['name'], 'channel' => 'pear.php.net'), true) .
- '" will not be automatically downloaded');
- }
- $skipnames[] = $this->_registry->parsedPackageNameToString($dep, true);
- $skip = true;
- unset($dep['package']);
- }
-
- $ret = $this->_detect2Dep($dep, $pname, 'optional', $params);
- if (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
-
- if (!$ret) {
- $dep['package'] = $dep['name'];
- $skip = count($skipnames) ?
- $skipnames[count($skipnames) - 1] : '';
- if ($skip ==
- $this->_registry->parsedPackageNameToString($dep, true)) {
- array_pop($skipnames);
- }
- }
-
- if (!$skip && is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- }
- }
-
- if (count($skipnames)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'Did not download optional dependencies: ' .
- implode(', ', $skipnames) .
- ', use --alldeps to download automatically');
- }
- }
- }
-
- // get requested dependency group, if any
- $groupname = $this->getGroup();
- $explicit = $this->_explicitGroup;
- if (!$groupname) {
- if (!$this->canDefault()) {
- continue;
- }
-
- $groupname = 'default'; // try the default dependency group
- }
-
- if ($groupnotfound) {
- continue;
- }
-
- if (isset($deps['group'])) {
- if (isset($deps['group']['attribs'])) {
- if (strtolower($deps['group']['attribs']['name']) == strtolower($groupname)) {
- $group = $deps['group'];
- } elseif ($explicit) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, 'Warning: package "' .
- $this->_registry->parsedPackageNameToString($pname, true) .
- '" has no dependency ' . 'group named "' . $groupname . '"');
- }
-
- $groupnotfound = true;
- continue;
- }
- } else {
- $found = false;
- foreach ($deps['group'] as $group) {
- if (strtolower($group['attribs']['name']) == strtolower($groupname)) {
- $found = true;
- break;
- }
- }
-
- if (!$found) {
- if ($explicit) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, 'Warning: package "' .
- $this->_registry->parsedPackageNameToString($pname, true) .
- '" has no dependency ' . 'group named "' . $groupname . '"');
- }
- }
-
- $groupnotfound = true;
- continue;
- }
- }
- }
-
- if (isset($group) && isset($group[$packagetype])) {
- if (isset($group[$packagetype][0])) {
- foreach ($group[$packagetype] as $dep) {
- $ret = $this->_detect2Dep($dep, $pname, 'dependency group "' .
- $group['attribs']['name'] . '"', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- } else {
- $ret = $this->_detect2Dep($group[$packagetype], $pname,
- 'dependency group "' .
- $group['attribs']['name'] . '"', $params);
- if (is_array($ret)) {
- $this->_downloadDeps[] = $ret;
- } elseif (PEAR::isError($ret) && !isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- }
- }
- }
- }
-
- function _detect2Dep($dep, $pname, $group, $params)
- {
- if (isset($dep['conflicts'])) {
- return true;
- }
-
- $options = $this->_downloader->getOptions();
- if (isset($dep['uri'])) {
- return array('uri' => $dep['uri'], 'dep' => $dep);;
- }
-
- $testdep = $dep;
- $testdep['package'] = $dep['name'];
- if (PEAR_Downloader_Package::willDownload($testdep, $params)) {
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group .
- ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", will be installed');
- }
- return false;
- }
-
- $options = $this->_downloader->getOptions();
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if ($this->_explicitState) {
- $pname['state'] = $this->_explicitState;
- }
-
- $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname);
- if (PEAR::isError($url)) {
- PEAR::popErrorHandling();
- return $url;
- }
-
- $dep['package'] = $dep['name'];
- $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, $group == 'optional' &&
- !isset($options['alldeps']), true);
- PEAR::popErrorHandling();
- if (PEAR::isError($ret)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
-
- return false;
- }
-
- // check to see if a dep is already installed and is the same or newer
- if (!isset($dep['min']) && !isset($dep['max']) && !isset($dep['recommended'])) {
- $oper = 'has';
- } else {
- $oper = 'gt';
- }
-
- // do not try to move this before getDepPackageDownloadURL
- // we can't determine whether upgrade is necessary until we know what
- // version would be downloaded
- if (!isset($options['force']) && $this->isInstalled($ret, $oper)) {
- $version = $this->_installRegistry->packageInfo($dep['name'], 'version', $dep['channel']);
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group .
- ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '" version ' . $url['version'] . ', already installed as version ' .
- $version);
- }
-
- return false;
- }
-
- if (isset($dep['nodefault'])) {
- $ret['nodefault'] = true;
- }
-
- return $ret;
- }
-
- function _detect1($deps, $pname, $options, $params)
- {
- $this->_downloadDeps = array();
- $skipnames = array();
- foreach ($deps as $dep) {
- $nodownload = false;
- if (isset ($dep['type']) && $dep['type'] === 'pkg') {
- $dep['channel'] = 'pear.php.net';
- $dep['package'] = $dep['name'];
- switch ($dep['rel']) {
- case 'not' :
- continue 2;
- case 'ge' :
- case 'eq' :
- case 'gt' :
- case 'has' :
- $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ?
- 'required' :
- 'optional';
- if (PEAR_Downloader_Package::willDownload($dep, $params)) {
- $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group
- . ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", will be installed');
- continue 2;
- }
- $fakedp = new PEAR_PackageFile_v1;
- $fakedp->setPackage($dep['name']);
- // skip internet check if we are not upgrading (bug #5810)
- if (!isset($options['upgrade']) && $this->isInstalled(
- $fakedp, $dep['rel'])) {
- $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group
- . ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", is already installed');
- continue 2;
- }
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if ($this->_explicitState) {
- $pname['state'] = $this->_explicitState;
- }
-
- $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname);
- $chan = 'pear.php.net';
- if (PEAR::isError($url)) {
- // check to see if this is a pecl package that has jumped
- // from pear.php.net to pecl.php.net channel
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
-
- $newdep = PEAR_Dependency2::normalizeDep($dep);
- $newdep = $newdep[0];
- $newdep['channel'] = 'pecl.php.net';
- $chan = 'pecl.php.net';
- $url = $this->_downloader->_getDepPackageDownloadUrl($newdep, $pname);
- $obj = &$this->_installRegistry->getPackage($dep['name']);
- if (PEAR::isError($url)) {
- PEAR::popErrorHandling();
- if ($obj !== null && $this->isInstalled($obj, $dep['rel'])) {
- $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ?
- 'required' :
- 'optional';
- $dep['package'] = $dep['name'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, $this->getShortName() .
- ': Skipping ' . $group . ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", already installed as version ' . $obj->getVersion());
- }
- $skip = count($skipnames) ?
- $skipnames[count($skipnames) - 1] : '';
- if ($skip ==
- $this->_registry->parsedPackageNameToString($dep, true)) {
- array_pop($skipnames);
- }
- continue;
- } else {
- if (isset($dep['optional']) && $dep['optional'] == 'yes') {
- $this->_downloader->log(2, $this->getShortName() .
- ': Skipping optional dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", no releases exist');
- continue;
- } else {
- return $url;
- }
- }
- }
- }
-
- PEAR::popErrorHandling();
- if (!isset($options['alldeps'])) {
- if (isset($dep['optional']) && $dep['optional'] == 'yes') {
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, 'Notice: package "' .
- $this->getShortName() .
- '" optional dependency "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true) .
- '" will not be automatically downloaded');
- }
- $skipnames[] = $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true);
- $nodownload = true;
- }
- }
-
- if (!isset($options['alldeps']) && !isset($options['onlyreqdeps'])) {
- if (!isset($dep['optional']) || $dep['optional'] == 'no') {
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, 'Notice: package "' .
- $this->getShortName() .
- '" required dependency "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true) .
- '" will not be automatically downloaded');
- }
- $skipnames[] = $this->_registry->parsedPackageNameToString(
- array('channel' => $chan, 'package' =>
- $dep['name']), true);
- $nodownload = true;
- }
- }
-
- // check to see if a dep is already installed
- // do not try to move this before getDepPackageDownloadURL
- // we can't determine whether upgrade is necessary until we know what
- // version would be downloaded
- if (!isset($options['force']) && $this->isInstalled(
- $url, $dep['rel'])) {
- $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ?
- 'required' :
- 'optional';
- $dep['package'] = $dep['name'];
- if (isset($newdep)) {
- $version = $this->_installRegistry->packageInfo($newdep['name'], 'version', $newdep['channel']);
- } else {
- $version = $this->_installRegistry->packageInfo($dep['name'], 'version');
- }
-
- $dep['version'] = $url['version'];
- if (!isset($options['soft'])) {
- $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group .
- ' dependency "' .
- $this->_registry->parsedPackageNameToString($dep, true) .
- '", already installed as version ' . $version);
- }
-
- $skip = count($skipnames) ?
- $skipnames[count($skipnames) - 1] : '';
- if ($skip ==
- $this->_registry->parsedPackageNameToString($dep, true)) {
- array_pop($skipnames);
- }
-
- continue;
- }
-
- if ($nodownload) {
- continue;
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if (isset($newdep)) {
- $dep = $newdep;
- }
-
- $dep['package'] = $dep['name'];
- $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params,
- isset($dep['optional']) && $dep['optional'] == 'yes' &&
- !isset($options['alldeps']), true);
- PEAR::popErrorHandling();
- if (PEAR::isError($ret)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $ret->getMessage());
- }
- continue;
- }
-
- $this->_downloadDeps[] = $ret;
- }
- }
-
- if (count($skipnames)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'Did not download dependencies: ' .
- implode(', ', $skipnames) .
- ', use --alldeps or --onlyreqdeps to download automatically');
- }
- }
- }
-
- function setDownloadURL($pkg)
- {
- $this->_downloadURL = $pkg;
- }
-
- /**
- * Set the package.xml object for this downloaded package
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg
- */
- function setPackageFile(&$pkg)
- {
- $this->_packagefile = &$pkg;
- }
-
- function getShortName()
- {
- return $this->_registry->parsedPackageNameToString(array('channel' => $this->getChannel(),
- 'package' => $this->getPackage()), true);
- }
-
- function getParsedPackage()
- {
- if (isset($this->_packagefile) || isset($this->_parsedname)) {
- return array('channel' => $this->getChannel(),
- 'package' => $this->getPackage(),
- 'version' => $this->getVersion());
- }
-
- return false;
- }
-
- function getDownloadURL()
- {
- return $this->_downloadURL;
- }
-
- function canDefault()
- {
- if (isset($this->_downloadURL) && isset($this->_downloadURL['nodefault'])) {
- return false;
- }
-
- return true;
- }
-
- function getPackage()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackage();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getPackage();
- }
-
- return false;
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- function isSubpackage(&$pf)
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->isSubpackage($pf);
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->isSubpackage($pf);
- }
-
- return false;
- }
-
- function getPackageType()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackageType();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getPackageType();
- }
-
- return false;
- }
-
- function isBundle()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackageType() == 'bundle';
- }
-
- return false;
- }
-
- function getPackageXmlVersion()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getPackagexmlVersion();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getPackagexmlVersion();
- }
-
- return '1.0';
- }
-
- function getChannel()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getChannel();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getChannel();
- }
-
- return false;
- }
-
- function getURI()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getURI();
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->getURI();
- }
-
- return false;
- }
-
- function getVersion()
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->getVersion();
- } elseif (isset($this->_downloadURL['version'])) {
- return $this->_downloadURL['version'];
- }
-
- return false;
- }
-
- function isCompatible($pf)
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->isCompatible($pf);
- } elseif (isset($this->_downloadURL['info'])) {
- return $this->_downloadURL['info']->isCompatible($pf);
- }
-
- return true;
- }
-
- function setGroup($group)
- {
- $this->_parsedname['group'] = $group;
- }
-
- function getGroup()
- {
- if (isset($this->_parsedname['group'])) {
- return $this->_parsedname['group'];
- }
-
- return '';
- }
-
- function isExtension($name)
- {
- if (isset($this->_packagefile)) {
- return $this->_packagefile->isExtension($name);
- } elseif (isset($this->_downloadURL['info'])) {
- if ($this->_downloadURL['info']->getPackagexmlVersion() == '2.0') {
- return $this->_downloadURL['info']->getProvidesExtension() == $name;
- }
-
- return false;
- }
-
- return false;
- }
-
- function getDeps()
- {
- if (isset($this->_packagefile)) {
- $ver = $this->_packagefile->getPackagexmlVersion();
- if (version_compare($ver, '2.0', '>=')) {
- return $this->_packagefile->getDeps(true);
- }
-
- return $this->_packagefile->getDeps();
- } elseif (isset($this->_downloadURL['info'])) {
- $ver = $this->_downloadURL['info']->getPackagexmlVersion();
- if (version_compare($ver, '2.0', '>=')) {
- return $this->_downloadURL['info']->getDeps(true);
- }
-
- return $this->_downloadURL['info']->getDeps();
- }
-
- return array();
- }
-
- /**
- * @param array Parsed array from {@link PEAR_Registry::parsePackageName()} or a dependency
- * returned from getDepDownloadURL()
- */
- function isEqual($param)
- {
- if (is_object($param)) {
- $channel = $param->getChannel();
- $package = $param->getPackage();
- if ($param->getURI()) {
- $param = array(
- 'channel' => $param->getChannel(),
- 'package' => $param->getPackage(),
- 'version' => $param->getVersion(),
- 'uri' => $param->getURI(),
- );
- } else {
- $param = array(
- 'channel' => $param->getChannel(),
- 'package' => $param->getPackage(),
- 'version' => $param->getVersion(),
- );
- }
- } else {
- if (isset($param['uri'])) {
- if ($this->getChannel() != '__uri') {
- return false;
- }
- return $param['uri'] == $this->getURI();
- }
-
- $package = isset($param['package']) ? $param['package'] : $param['info']->getPackage();
- $channel = isset($param['channel']) ? $param['channel'] : $param['info']->getChannel();
- if (isset($param['rel'])) {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
-
- $newdep = PEAR_Dependency2::normalizeDep($param);
- $newdep = $newdep[0];
- } elseif (isset($param['min'])) {
- $newdep = $param;
- }
- }
-
- if (isset($newdep)) {
- if (!isset($newdep['min'])) {
- $newdep['min'] = '0';
- }
-
- if (!isset($newdep['max'])) {
- $newdep['max'] = '100000000000000000000';
- }
-
- // use magic to support pecl packages suddenly jumping to the pecl channel
- // we need to support both dependency possibilities
- if ($channel == 'pear.php.net' && $this->getChannel() == 'pecl.php.net') {
- if ($package == $this->getPackage()) {
- $channel = 'pecl.php.net';
- }
- }
- if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') {
- if ($package == $this->getPackage()) {
- $channel = 'pear.php.net';
- }
- }
-
- return (strtolower($package) == strtolower($this->getPackage()) &&
- $channel == $this->getChannel() &&
- version_compare($newdep['min'], $this->getVersion(), '<=') &&
- version_compare($newdep['max'], $this->getVersion(), '>='));
- }
-
- // use magic to support pecl packages suddenly jumping to the pecl channel
- if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') {
- if (strtolower($package) == strtolower($this->getPackage())) {
- $channel = 'pear.php.net';
- }
- }
-
- if (isset($param['version'])) {
- return (strtolower($package) == strtolower($this->getPackage()) &&
- $channel == $this->getChannel() &&
- $param['version'] == $this->getVersion());
- }
-
- return strtolower($package) == strtolower($this->getPackage()) &&
- $channel == $this->getChannel();
- }
-
- function isInstalled($dep, $oper = '==')
- {
- if (!$dep) {
- return false;
- }
-
- if ($oper != 'ge' && $oper != 'gt' && $oper != 'has' && $oper != '==') {
- return false;
- }
-
- if (is_object($dep)) {
- $package = $dep->getPackage();
- $channel = $dep->getChannel();
- if ($dep->getURI()) {
- $dep = array(
- 'uri' => $dep->getURI(),
- 'version' => $dep->getVersion(),
- );
- } else {
- $dep = array(
- 'version' => $dep->getVersion(),
- );
- }
- } else {
- if (isset($dep['uri'])) {
- $channel = '__uri';
- $package = $dep['dep']['name'];
- } else {
- $channel = $dep['info']->getChannel();
- $package = $dep['info']->getPackage();
- }
- }
-
- $options = $this->_downloader->getOptions();
- $test = $this->_installRegistry->packageExists($package, $channel);
- if (!$test && $channel == 'pecl.php.net') {
- // do magic to allow upgrading from old pecl packages to new ones
- $test = $this->_installRegistry->packageExists($package, 'pear.php.net');
- $channel = 'pear.php.net';
- }
-
- if ($test) {
- if (isset($dep['uri'])) {
- if ($this->_installRegistry->packageInfo($package, 'uri', '__uri') == $dep['uri']) {
- return true;
- }
- }
-
- if (isset($options['upgrade'])) {
- $packageVersion = $this->_installRegistry->packageInfo($package, 'version', $channel);
- if (version_compare($packageVersion, $dep['version'], '>=')) {
- return true;
- }
-
- return false;
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Detect duplicate package names with differing versions
- *
- * If a user requests to install Date 1.4.6 and Date 1.4.7,
- * for instance, this is a logic error. This method
- * detects this situation.
- *
- * @param array $params array of PEAR_Downloader_Package objects
- * @param array $errorparams empty array
- * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts
- */
- function detectStupidDuplicates($params, &$errorparams)
- {
- $existing = array();
- foreach ($params as $i => $param) {
- $package = $param->getPackage();
- $channel = $param->getChannel();
- $group = $param->getGroup();
- if (!isset($existing[$channel . '/' . $package])) {
- $existing[$channel . '/' . $package] = array();
- }
-
- if (!isset($existing[$channel . '/' . $package][$group])) {
- $existing[$channel . '/' . $package][$group] = array();
- }
-
- $existing[$channel . '/' . $package][$group][] = $i;
- }
-
- $indices = array();
- foreach ($existing as $package => $groups) {
- foreach ($groups as $group => $dupes) {
- if (count($dupes) > 1) {
- $indices = $indices + $dupes;
- }
- }
- }
-
- $indices = array_unique($indices);
- foreach ($indices as $index) {
- $errorparams[] = $params[$index];
- }
-
- return count($errorparams);
- }
-
- /**
- * @param array
- * @param bool ignore install groups - for final removal of dupe packages
- * @static
- */
- function removeDuplicates(&$params, $ignoreGroups = false)
- {
- $pnames = array();
- foreach ($params as $i => $param) {
- if (!$param) {
- continue;
- }
-
- if ($param->getPackage()) {
- $group = $ignoreGroups ? '' : $param->getGroup();
- $pnames[$i] = $param->getChannel() . '/' .
- $param->getPackage() . '-' . $param->getVersion() . '#' . $group;
- }
- }
-
- $pnames = array_unique($pnames);
- $unset = array_diff(array_keys($params), array_keys($pnames));
- $testp = array_flip($pnames);
- foreach ($params as $i => $param) {
- if (!$param) {
- $unset[] = $i;
- continue;
- }
-
- if (!is_a($param, 'PEAR_Downloader_Package')) {
- $unset[] = $i;
- continue;
- }
-
- $group = $ignoreGroups ? '' : $param->getGroup();
- if (!isset($testp[$param->getChannel() . '/' . $param->getPackage() . '-' .
- $param->getVersion() . '#' . $group])) {
- $unset[] = $i;
- }
- }
-
- foreach ($unset as $i) {
- unset($params[$i]);
- }
-
- $ret = array();
- foreach ($params as $i => $param) {
- $ret[] = &$params[$i];
- }
-
- $params = array();
- foreach ($ret as $i => $param) {
- $params[] = &$ret[$i];
- }
- }
-
- function explicitState()
- {
- return $this->_explicitState;
- }
-
- function setExplicitState($s)
- {
- $this->_explicitState = $s;
- }
-
- /**
- * @static
- */
- function mergeDependencies(&$params)
- {
- $bundles = $newparams = array();
- foreach ($params as $i => $param) {
- if (!$param->isBundle()) {
- continue;
- }
-
- $bundles[] = $i;
- $pf = &$param->getPackageFile();
- $newdeps = array();
- $contents = $pf->getBundledPackages();
- if (!is_array($contents)) {
- $contents = array($contents);
- }
-
- foreach ($contents as $file) {
- $filecontents = $pf->getFileContents($file);
- $dl = &$param->getDownloader();
- $options = $dl->getOptions();
- if (PEAR::isError($dir = $dl->getDownloadDir())) {
- return $dir;
- }
-
- $fp = @fopen($dir . DIRECTORY_SEPARATOR . $file, 'wb');
- if (!$fp) {
- continue;
- }
-
- // FIXME do symlink check
-
- fwrite($fp, $filecontents, strlen($filecontents));
- fclose($fp);
- if ($s = $params[$i]->explicitState()) {
- $obj->setExplicitState($s);
- }
-
- $obj = new PEAR_Downloader_Package($params[$i]->getDownloader());
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if (PEAR::isError($dir = $dl->getDownloadDir())) {
- PEAR::popErrorHandling();
- return $dir;
- }
-
- $e = $obj->_fromFile($a = $dir . DIRECTORY_SEPARATOR . $file);
- PEAR::popErrorHandling();
- if (PEAR::isError($e)) {
- if (!isset($options['soft'])) {
- $dl->log(0, $e->getMessage());
- }
- continue;
- }
-
- if (!PEAR_Downloader_Package::willDownload($obj,
- array_merge($params, $newparams)) && !$param->isInstalled($obj)) {
- $newparams[] = $obj;
- }
- }
- }
-
- foreach ($bundles as $i) {
- unset($params[$i]); // remove bundles - only their contents matter for installation
- }
-
- PEAR_Downloader_Package::removeDuplicates($params); // strip any unset indices
- if (count($newparams)) { // add in bundled packages for install
- foreach ($newparams as $i => $unused) {
- $params[] = &$newparams[$i];
- }
- $newparams = array();
- }
-
- foreach ($params as $i => $param) {
- $newdeps = array();
- foreach ($param->_downloadDeps as $dep) {
- $merge = array_merge($params, $newparams);
- if (!PEAR_Downloader_Package::willDownload($dep, $merge)
- && !$param->isInstalled($dep)
- ) {
- $newdeps[] = $dep;
- } else {
- //var_dump($dep);
- // detect versioning conflicts here
- }
- }
-
- // convert the dependencies into PEAR_Downloader_Package objects for the next time around
- $params[$i]->_downloadDeps = array();
- foreach ($newdeps as $dep) {
- $obj = new PEAR_Downloader_Package($params[$i]->getDownloader());
- if ($s = $params[$i]->explicitState()) {
- $obj->setExplicitState($s);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $e = $obj->fromDepURL($dep);
- PEAR::popErrorHandling();
- if (PEAR::isError($e)) {
- if (!isset($options['soft'])) {
- $obj->_downloader->log(0, $e->getMessage());
- }
- continue;
- }
-
- $e = $obj->detectDependencies($params);
- if (PEAR::isError($e)) {
- if (!isset($options['soft'])) {
- $obj->_downloader->log(0, $e->getMessage());
- }
- }
-
- $newparams[] = $obj;
- }
- }
-
- if (count($newparams)) {
- foreach ($newparams as $i => $unused) {
- $params[] = &$newparams[$i];
- }
- return true;
- }
-
- return false;
- }
-
-
- /**
- * @static
- */
- function willDownload($param, $params)
- {
- if (!is_array($params)) {
- return false;
- }
-
- foreach ($params as $obj) {
- if ($obj->isEqual($param)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * For simpler unit-testing
- * @param PEAR_Config
- * @param int
- * @param string
- */
- function &getPackagefileObject(&$c, $d)
- {
- $a = new PEAR_PackageFile($c, $d);
- return $a;
- }
-
- /**
- * This will retrieve from a local file if possible, and parse out
- * a group name as well. The original parameter will be modified to reflect this.
- * @param string|array can be a parsed package name as well
- * @access private
- */
- function _fromFile(&$param)
- {
- $saveparam = $param;
- if (is_string($param)) {
- if (!@file_exists($param)) {
- $test = explode('#', $param);
- $group = array_pop($test);
- if (@file_exists(implode('#', $test))) {
- $this->setGroup($group);
- $param = implode('#', $test);
- $this->_explicitGroup = true;
- }
- }
-
- if (@is_file($param)) {
- $this->_type = 'local';
- $options = $this->_downloader->getOptions();
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->_debug);
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING);
- PEAR::popErrorHandling();
- if (PEAR::isError($pf)) {
- $this->_valid = false;
- $param = $saveparam;
- return $pf;
- }
- $this->_packagefile = &$pf;
- if (!$this->getGroup()) {
- $this->setGroup('default'); // install the default dependency group
- }
- return $this->_valid = true;
- }
- }
- $param = $saveparam;
- return $this->_valid = false;
- }
-
- function _fromUrl($param, $saveparam = '')
- {
- if (!is_array($param) && (preg_match('#^(http|https|ftp)://#', $param))) {
- $options = $this->_downloader->getOptions();
- $this->_type = 'url';
- $callback = $this->_downloader->ui ?
- array(&$this->_downloader, '_downloadCallback') : null;
- $this->_downloader->pushErrorHandling(PEAR_ERROR_RETURN);
- if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) {
- $this->_downloader->popErrorHandling();
- return $dir;
- }
-
- $this->_downloader->log(3, 'Downloading "' . $param . '"');
- $file = $this->_downloader->downloadHttp($param, $this->_downloader->ui,
- $dir, $callback, null, false, $this->getChannel());
- $this->_downloader->popErrorHandling();
- if (PEAR::isError($file)) {
- if (!empty($saveparam)) {
- $saveparam = ", cannot download \"$saveparam\"";
- }
- $err = PEAR::raiseError('Could not download from "' . $param .
- '"' . $saveparam . ' (' . $file->getMessage() . ')');
- return $err;
- }
-
- if ($this->_rawpackagefile) {
- require_once 'phar://install-pear-nozlib.phar/' . 'Archive/Tar.php';
- $tar = new Archive_Tar($file);
- $packagexml = $tar->extractInString('package2.xml');
- if (!$packagexml) {
- $packagexml = $tar->extractInString('package.xml');
- }
-
- if (str_replace(array("\n", "\r"), array('',''), $packagexml) !=
- str_replace(array("\n", "\r"), array('',''), $this->_rawpackagefile)) {
- if ($this->getChannel() != 'pear.php.net') {
- return PEAR::raiseError('CRITICAL ERROR: package.xml downloaded does ' .
- 'not match value returned from xml-rpc');
- }
-
- // be more lax for the existing PEAR packages that have not-ok
- // characters in their package.xml
- $this->_downloader->log(0, 'CRITICAL WARNING: The "' .
- $this->getPackage() . '" package has invalid characters in its ' .
- 'package.xml. The next version of PEAR may not be able to install ' .
- 'this package for security reasons. Please open a bug report at ' .
- 'http://pear.php.net/package/' . $this->getPackage() . '/bugs');
- }
- }
-
- // whew, download worked!
- $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug);
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING);
- PEAR::popErrorHandling();
- if (PEAR::isError($pf)) {
- if (is_array($pf->getUserInfo())) {
- foreach ($pf->getUserInfo() as $err) {
- if (is_array($err)) {
- $err = $err['message'];
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, "Validation Error: $err");
- }
- }
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $pf->getMessage());
- }
-
- ///FIXME need to pass back some error code that we can use to match with to cancel all further operations
- /// At least stop all deps of this package from being installed
- $out = $saveparam ? $saveparam : $param;
- $err = PEAR::raiseError('Download of "' . $out . '" succeeded, but it is not a valid package archive');
- $this->_valid = false;
- return $err;
- }
-
- $this->_packagefile = &$pf;
- $this->setGroup('default'); // install the default dependency group
- return $this->_valid = true;
- }
-
- return $this->_valid = false;
- }
-
- /**
- *
- * @param string|array pass in an array of format
- * array(
- * 'package' => 'pname',
- * ['channel' => 'channame',]
- * ['version' => 'version',]
- * ['state' => 'state',])
- * or a string of format [channame/]pname[-version|-state]
- */
- function _fromString($param)
- {
- $options = $this->_downloader->getOptions();
- $channel = $this->_config->get('default_channel');
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pname = $this->_registry->parsePackageName($param, $channel);
- PEAR::popErrorHandling();
- if (PEAR::isError($pname)) {
- if ($pname->getCode() == 'invalid') {
- $this->_valid = false;
- return false;
- }
-
- if ($pname->getCode() == 'channel') {
- $parsed = $pname->getUserInfo();
- if ($this->_downloader->discover($parsed['channel'])) {
- if ($this->_config->get('auto_discover')) {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pname = $this->_registry->parsePackageName($param, $channel);
- PEAR::popErrorHandling();
- } else {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, 'Channel "' . $parsed['channel'] .
- '" is not initialized, use ' .
- '"pear channel-discover ' . $parsed['channel'] . '" to initialize' .
- 'or pear config-set auto_discover 1');
- }
- }
- }
-
- if (PEAR::isError($pname)) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $pname->getMessage());
- }
-
- if (is_array($param)) {
- $param = $this->_registry->parsedPackageNameToString($param);
- }
-
- $err = PEAR::raiseError('invalid package name/package file "' . $param . '"');
- $this->_valid = false;
- return $err;
- }
- } else {
- if (!isset($options['soft'])) {
- $this->_downloader->log(0, $pname->getMessage());
- }
-
- $err = PEAR::raiseError('invalid package name/package file "' . $param . '"');
- $this->_valid = false;
- return $err;
- }
- }
-
- if (!isset($this->_type)) {
- $this->_type = 'rest';
- }
-
- $this->_parsedname = $pname;
- $this->_explicitState = isset($pname['state']) ? $pname['state'] : false;
- $this->_explicitGroup = isset($pname['group']) ? true : false;
-
- $info = $this->_downloader->_getPackageDownloadUrl($pname);
- if (PEAR::isError($info)) {
- if ($info->getCode() != -976 && $pname['channel'] == 'pear.php.net') {
- // try pecl
- $pname['channel'] = 'pecl.php.net';
- if ($test = $this->_downloader->_getPackageDownloadUrl($pname)) {
- if (!PEAR::isError($test)) {
- $info = PEAR::raiseError($info->getMessage() . ' - package ' .
- $this->_registry->parsedPackageNameToString($pname, true) .
- ' can be installed with "pecl install ' . $pname['package'] .
- '"');
- } else {
- $pname['channel'] = 'pear.php.net';
- }
- } else {
- $pname['channel'] = 'pear.php.net';
- }
- }
-
- return $info;
- }
-
- $this->_rawpackagefile = $info['raw'];
- $ret = $this->_analyzeDownloadURL($info, $param, $pname);
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- if ($ret) {
- $this->_downloadURL = $ret;
- return $this->_valid = (bool) $ret;
- }
- }
-
- /**
- * @param array output of package.getDownloadURL
- * @param string|array|object information for detecting packages to be downloaded, and
- * for errors
- * @param array name information of the package
- * @param array|null packages to be downloaded
- * @param bool is this an optional dependency?
- * @param bool is this any kind of dependency?
- * @access private
- */
- function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = false,
- $isdependency = false)
- {
- if (!is_string($param) && PEAR_Downloader_Package::willDownload($param, $params)) {
- return false;
- }
-
- if ($info === false) {
- $saveparam = !is_string($param) ? ", cannot download \"$param\"" : '';
-
- // no releases exist
- return PEAR::raiseError('No releases for package "' .
- $this->_registry->parsedPackageNameToString($pname, true) . '" exist' . $saveparam);
- }
-
- if (strtolower($info['info']->getChannel()) != strtolower($pname['channel'])) {
- $err = false;
- if ($pname['channel'] == 'pecl.php.net') {
- if ($info['info']->getChannel() != 'pear.php.net') {
- $err = true;
- }
- } elseif ($info['info']->getChannel() == 'pecl.php.net') {
- if ($pname['channel'] != 'pear.php.net') {
- $err = true;
- }
- } else {
- $err = true;
- }
-
- if ($err) {
- return PEAR::raiseError('SECURITY ERROR: package in channel "' . $pname['channel'] .
- '" retrieved another channel\'s name for download! ("' .
- $info['info']->getChannel() . '")');
- }
- }
-
- $preferred_state = $this->_config->get('preferred_state');
- if (!isset($info['url'])) {
- $package_version = $this->_registry->packageInfo($info['info']->getPackage(),
- 'version', $info['info']->getChannel());
- if ($this->isInstalled($info)) {
- if ($isdependency && version_compare($info['version'], $package_version, '<=')) {
- // ignore bogus errors of "failed to download dependency"
- // if it is already installed and the one that would be
- // downloaded is older or the same version (Bug #7219)
- return false;
- }
- }
-
- if ($info['version'] === $package_version) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] .
- '/' . $pname['package'] . '-' . $package_version. ', additionally the suggested version' .
- ' (' . $package_version . ') is the same as the locally installed one.');
- }
-
- return false;
- }
-
- if (version_compare($info['version'], $package_version, '<=')) {
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] .
- '/' . $pname['package'] . '-' . $package_version . ', additionally the suggested version' .
- ' (' . $info['version'] . ') is a lower version than the locally installed one (' . $package_version . ').');
- }
-
- return false;
- }
-
- $instead = ', will instead download version ' . $info['version'] .
- ', stability "' . $info['info']->getState() . '"';
- // releases exist, but we failed to get any
- if (isset($this->_downloader->_options['force'])) {
- if (isset($pname['version'])) {
- $vs = ', version "' . $pname['version'] . '"';
- } elseif (isset($pname['state'])) {
- $vs = ', stability "' . $pname['state'] . '"';
- } elseif ($param == 'dependency') {
- if (!class_exists('PEAR_Common')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
- }
-
- if (!in_array($info['info']->getState(),
- PEAR_Common::betterStates($preferred_state, true))) {
- if ($optional) {
- // don't spit out confusing error message
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = ' within preferred state "' . $preferred_state .
- '"';
- } else {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
-
- if ($optional) {
- // don't spit out confusing error message
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = PEAR_Dependency2::_getExtraString($pname);
- $instead = '';
- }
- } else {
- $vs = ' within preferred state "' . $preferred_state . '"';
- }
-
- if (!isset($options['soft'])) {
- $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] .
- '/' . $pname['package'] . $vs . $instead);
- }
-
- // download the latest release
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- } else {
- if (isset($info['php']) && $info['php']) {
- $err = PEAR::raiseError('Failed to download ' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'],
- 'package' => $pname['package']),
- true) .
- ', latest release is version ' . $info['php']['v'] .
- ', but it requires PHP version "' .
- $info['php']['m'] . '", use "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package'],
- 'version' => $info['php']['v'])) . '" to install',
- PEAR_DOWNLOADER_PACKAGE_PHPVERSION);
- return $err;
- }
-
- // construct helpful error message
- if (isset($pname['version'])) {
- $vs = ', version "' . $pname['version'] . '"';
- } elseif (isset($pname['state'])) {
- $vs = ', stability "' . $pname['state'] . '"';
- } elseif ($param == 'dependency') {
- if (!class_exists('PEAR_Common')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
- }
-
- if (!in_array($info['info']->getState(),
- PEAR_Common::betterStates($preferred_state, true))) {
- if ($optional) {
- // don't spit out confusing error message, and don't die on
- // optional dep failure!
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = ' within preferred state "' . $preferred_state . '"';
- } else {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
-
- if ($optional) {
- // don't spit out confusing error message, and don't die on
- // optional dep failure!
- return $this->_downloader->_getPackageDownloadUrl(
- array('package' => $pname['package'],
- 'channel' => $pname['channel'],
- 'version' => $info['version']));
- }
- $vs = PEAR_Dependency2::_getExtraString($pname);
- }
- } else {
- $vs = ' within preferred state "' . $this->_downloader->config->get('preferred_state') . '"';
- }
-
- $options = $this->_downloader->getOptions();
- // this is only set by the "download-all" command
- if (isset($options['ignorepreferred_state'])) {
- $err = PEAR::raiseError(
- 'Failed to download ' . $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package']),
- true)
- . $vs .
- ', latest release is version ' . $info['version'] .
- ', stability "' . $info['info']->getState() . '", use "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package'],
- 'version' => $info['version'])) . '" to install',
- PEAR_DOWNLOADER_PACKAGE_STATE);
- return $err;
- }
-
- // Checks if the user has a package installed already and checks the release against
- // the state against the installed package, this allows upgrades for packages
- // with lower stability than the preferred_state
- $stability = $this->_registry->packageInfo($pname['package'], 'stability', $pname['channel']);
- if (!$this->isInstalled($info)
- || !in_array($info['info']->getState(), PEAR_Common::betterStates($stability['release'], true))
- ) {
- $err = PEAR::raiseError(
- 'Failed to download ' . $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package']),
- true)
- . $vs .
- ', latest release is version ' . $info['version'] .
- ', stability "' . $info['info']->getState() . '", use "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pname['channel'], 'package' => $pname['package'],
- 'version' => $info['version'])) . '" to install');
- return $err;
- }
- }
- }
-
- if (isset($info['deprecated']) && $info['deprecated']) {
- $this->_downloader->log(0,
- 'WARNING: "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $info['info']->getChannel(),
- 'package' => $info['info']->getPackage()), true) .
- '" is deprecated in favor of "' .
- $this->_registry->parsedPackageNameToString($info['deprecated'], true) .
- '"');
- }
-
- return $info;
- }
-}
-<?php
-/**
- * Error Stack Implementation
- *
- * This is an incredibly simple implementation of a very complex error handling
- * facility. It contains the ability
- * to track multiple errors from multiple packages simultaneously. In addition,
- * it can track errors of many levels, save data along with the error, context
- * information such as the exact file, line number, class and function that
- * generated the error, and if necessary, it can raise a traditional PEAR_Error.
- * It has built-in support for PEAR::Log, to log errors as they occur
- *
- * Since version 0.2alpha, it is also possible to selectively ignore errors,
- * through the use of an error callback, see {@link pushCallback()}
- *
- * Since version 0.3alpha, it is possible to specify the exception class
- * returned from {@link push()}
- *
- * Since version PEAR1.3.2, ErrorStack no longer instantiates an exception class. This can
- * still be done quite handily in an error callback or by manipulating the returned array
- * @category Debugging
- * @package PEAR_ErrorStack
- * @author Greg Beaver <cellog@php.net>
- * @copyright 2004-2008 Greg Beaver
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR_ErrorStack
- */
-
-/**
- * Singleton storage
- *
- * Format:
- * <pre>
- * array(
- * 'package1' => PEAR_ErrorStack object,
- * 'package2' => PEAR_ErrorStack object,
- * ...
- * )
- * </pre>
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_SINGLETON']
- */
-$GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] = array();
-
-/**
- * Global error callback (default)
- *
- * This is only used if set to non-false. * is the default callback for
- * all packages, whereas specific packages may set a default callback
- * for all instances, regardless of whether they are a singleton or not.
- *
- * To exclude non-singletons, only set the local callback for the singleton
- * @see PEAR_ErrorStack::setDefaultCallback()
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']
- */
-$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] = array(
- '*' => false,
-);
-
-/**
- * Global Log object (default)
- *
- * This is only used if set to non-false. Use to set a default log object for
- * all stacks, regardless of instantiation order or location
- * @see PEAR_ErrorStack::setDefaultLogger()
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']
- */
-$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = false;
-
-/**
- * Global Overriding Callback
- *
- * This callback will override any error callbacks that specific loggers have set.
- * Use with EXTREME caution
- * @see PEAR_ErrorStack::staticPushCallback()
- * @access private
- * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']
- */
-$GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array();
-
-/**#@+
- * One of four possible return values from the error Callback
- * @see PEAR_ErrorStack::_errorCallback()
- */
-/**
- * If this is returned, then the error will be both pushed onto the stack
- * and logged.
- */
-define('PEAR_ERRORSTACK_PUSHANDLOG', 1);
-/**
- * If this is returned, then the error will only be pushed onto the stack,
- * and not logged.
- */
-define('PEAR_ERRORSTACK_PUSH', 2);
-/**
- * If this is returned, then the error will only be logged, but not pushed
- * onto the error stack.
- */
-define('PEAR_ERRORSTACK_LOG', 3);
-/**
- * If this is returned, then the error is completely ignored.
- */
-define('PEAR_ERRORSTACK_IGNORE', 4);
-/**
- * If this is returned, then the error is logged and die() is called.
- */
-define('PEAR_ERRORSTACK_DIE', 5);
-/**#@-*/
-
-/**
- * Error code for an attempt to instantiate a non-class as a PEAR_ErrorStack in
- * the singleton method.
- */
-define('PEAR_ERRORSTACK_ERR_NONCLASS', 1);
-
-/**
- * Error code for an attempt to pass an object into {@link PEAR_ErrorStack::getMessage()}
- * that has no __toString() method
- */
-define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2);
-/**
- * Error Stack Implementation
- *
- * Usage:
- * <code>
- * // global error stack
- * $global_stack = &PEAR_ErrorStack::singleton('MyPackage');
- * // local error stack
- * $local_stack = new PEAR_ErrorStack('MyPackage');
- * </code>
- * @author Greg Beaver <cellog@php.net>
- * @version 1.9.5
- * @package PEAR_ErrorStack
- * @category Debugging
- * @copyright 2004-2008 Greg Beaver
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR_ErrorStack
- */
-class PEAR_ErrorStack {
- /**
- * Errors are stored in the order that they are pushed on the stack.
- * @since 0.4alpha Errors are no longer organized by error level.
- * This renders pop() nearly unusable, and levels could be more easily
- * handled in a callback anyway
- * @var array
- * @access private
- */
- var $_errors = array();
-
- /**
- * Storage of errors by level.
- *
- * Allows easy retrieval and deletion of only errors from a particular level
- * @since PEAR 1.4.0dev
- * @var array
- * @access private
- */
- var $_errorsByLevel = array();
-
- /**
- * Package name this error stack represents
- * @var string
- * @access protected
- */
- var $_package;
-
- /**
- * Determines whether a PEAR_Error is thrown upon every error addition
- * @var boolean
- * @access private
- */
- var $_compat = false;
-
- /**
- * If set to a valid callback, this will be used to generate the error
- * message from the error code, otherwise the message passed in will be
- * used
- * @var false|string|array
- * @access private
- */
- var $_msgCallback = false;
-
- /**
- * If set to a valid callback, this will be used to generate the error
- * context for an error. For PHP-related errors, this will be a file
- * and line number as retrieved from debug_backtrace(), but can be
- * customized for other purposes. The error might actually be in a separate
- * configuration file, or in a database query.
- * @var false|string|array
- * @access protected
- */
- var $_contextCallback = false;
-
- /**
- * If set to a valid callback, this will be called every time an error
- * is pushed onto the stack. The return value will be used to determine
- * whether to allow an error to be pushed or logged.
- *
- * The return value must be one an PEAR_ERRORSTACK_* constant
- * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
- * @var false|string|array
- * @access protected
- */
- var $_errorCallback = array();
-
- /**
- * PEAR::Log object for logging errors
- * @var false|Log
- * @access protected
- */
- var $_logger = false;
-
- /**
- * Error messages - designed to be overridden
- * @var array
- * @abstract
- */
- var $_errorMsgs = array();
-
- /**
- * Set up a new error stack
- *
- * @param string $package name of the package this error stack represents
- * @param callback $msgCallback callback used for error message generation
- * @param callback $contextCallback callback used for context generation,
- * defaults to {@link getFileLine()}
- * @param boolean $throwPEAR_Error
- */
- function __construct($package, $msgCallback = false, $contextCallback = false,
- $throwPEAR_Error = false)
- {
- $this->_package = $package;
- $this->setMessageCallback($msgCallback);
- $this->setContextCallback($contextCallback);
- $this->_compat = $throwPEAR_Error;
- }
-
- /**
- * Return a single error stack for this package.
- *
- * Note that all parameters are ignored if the stack for package $package
- * has already been instantiated
- * @param string $package name of the package this error stack represents
- * @param callback $msgCallback callback used for error message generation
- * @param callback $contextCallback callback used for context generation,
- * defaults to {@link getFileLine()}
- * @param boolean $throwPEAR_Error
- * @param string $stackClass class to instantiate
- * @static
- * @return PEAR_ErrorStack
- */
- function &singleton($package, $msgCallback = false, $contextCallback = false,
- $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack')
- {
- if (isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) {
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package];
- }
- if (!class_exists($stackClass)) {
- if (function_exists('debug_backtrace')) {
- $trace = debug_backtrace();
- }
- PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_NONCLASS,
- 'exception', array('stackclass' => $stackClass),
- 'stack class "%stackclass%" is not a valid class name (should be like PEAR_ErrorStack)',
- false, $trace);
- }
- $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package] =
- new $stackClass($package, $msgCallback, $contextCallback, $throwPEAR_Error);
-
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package];
- }
-
- /**
- * Internal error handler for PEAR_ErrorStack class
- *
- * Dies if the error is an exception (and would have died anyway)
- * @access private
- */
- function _handleError($err)
- {
- if ($err['level'] == 'exception') {
- $message = $err['message'];
- if (isset($_SERVER['REQUEST_URI'])) {
- echo '<br />';
- } else {
- echo "\n";
- }
- var_dump($err['context']);
- die($message);
- }
- }
-
- /**
- * Set up a PEAR::Log object for all error stacks that don't have one
- * @param Log $log
- * @static
- */
- function setDefaultLogger(&$log)
- {
- if (is_object($log) && method_exists($log, 'log') ) {
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
- } elseif (is_callable($log)) {
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log;
- }
- }
-
- /**
- * Set up a PEAR::Log object for this error stack
- * @param Log $log
- */
- function setLogger(&$log)
- {
- if (is_object($log) && method_exists($log, 'log') ) {
- $this->_logger = &$log;
- } elseif (is_callable($log)) {
- $this->_logger = &$log;
- }
- }
-
- /**
- * Set an error code => error message mapping callback
- *
- * This method sets the callback that can be used to generate error
- * messages for any instance
- * @param array|string Callback function/method
- */
- function setMessageCallback($msgCallback)
- {
- if (!$msgCallback) {
- $this->_msgCallback = array(&$this, 'getErrorMessage');
- } else {
- if (is_callable($msgCallback)) {
- $this->_msgCallback = $msgCallback;
- }
- }
- }
-
- /**
- * Get an error code => error message mapping callback
- *
- * This method returns the current callback that can be used to generate error
- * messages
- * @return array|string|false Callback function/method or false if none
- */
- function getMessageCallback()
- {
- return $this->_msgCallback;
- }
-
- /**
- * Sets a default callback to be used by all error stacks
- *
- * This method sets the callback that can be used to generate error
- * messages for a singleton
- * @param array|string Callback function/method
- * @param string Package name, or false for all packages
- * @static
- */
- function setDefaultCallback($callback = false, $package = false)
- {
- if (!is_callable($callback)) {
- $callback = false;
- }
- $package = $package ? $package : '*';
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$package] = $callback;
- }
-
- /**
- * Set a callback that generates context information (location of error) for an error stack
- *
- * This method sets the callback that can be used to generate context
- * information for an error. Passing in NULL will disable context generation
- * and remove the expensive call to debug_backtrace()
- * @param array|string|null Callback function/method
- */
- function setContextCallback($contextCallback)
- {
- if ($contextCallback === null) {
- return $this->_contextCallback = false;
- }
- if (!$contextCallback) {
- $this->_contextCallback = array(&$this, 'getFileLine');
- } else {
- if (is_callable($contextCallback)) {
- $this->_contextCallback = $contextCallback;
- }
- }
- }
-
- /**
- * Set an error Callback
- * If set to a valid callback, this will be called every time an error
- * is pushed onto the stack. The return value will be used to determine
- * whether to allow an error to be pushed or logged.
- *
- * The return value must be one of the ERRORSTACK_* constants.
- *
- * This functionality can be used to emulate PEAR's pushErrorHandling, and
- * the PEAR_ERROR_CALLBACK mode, without affecting the integrity of
- * the error stack or logging
- * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
- * @see popCallback()
- * @param string|array $cb
- */
- function pushCallback($cb)
- {
- array_push($this->_errorCallback, $cb);
- }
-
- /**
- * Remove a callback from the error callback stack
- * @see pushCallback()
- * @return array|string|false
- */
- function popCallback()
- {
- if (!count($this->_errorCallback)) {
- return false;
- }
- return array_pop($this->_errorCallback);
- }
-
- /**
- * Set a temporary overriding error callback for every package error stack
- *
- * Use this to temporarily disable all existing callbacks (can be used
- * to emulate the @ operator, for instance)
- * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG
- * @see staticPopCallback(), pushCallback()
- * @param string|array $cb
- * @static
- */
- function staticPushCallback($cb)
- {
- array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb);
- }
-
- /**
- * Remove a temporary overriding error callback
- * @see staticPushCallback()
- * @return array|string|false
- * @static
- */
- function staticPopCallback()
- {
- $ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']);
- if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) {
- $GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array();
- }
- return $ret;
- }
-
- /**
- * Add an error to the stack
- *
- * If the message generator exists, it is called with 2 parameters.
- * - the current Error Stack object
- * - an array that is in the same format as an error. Available indices
- * are 'code', 'package', 'time', 'params', 'level', and 'context'
- *
- * Next, if the error should contain context information, this is
- * handled by the context grabbing method.
- * Finally, the error is pushed onto the proper error stack
- * @param int $code Package-specific error code
- * @param string $level Error level. This is NOT spell-checked
- * @param array $params associative array of error parameters
- * @param string $msg Error message, or a portion of it if the message
- * is to be generated
- * @param array $repackage If this error re-packages an error pushed by
- * another package, place the array returned from
- * {@link pop()} in this parameter
- * @param array $backtrace Protected parameter: use this to pass in the
- * {@link debug_backtrace()} that should be used
- * to find error context
- * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also
- * thrown. If a PEAR_Error is returned, the userinfo
- * property is set to the following array:
- *
- * <code>
- * array(
- * 'code' => $code,
- * 'params' => $params,
- * 'package' => $this->_package,
- * 'level' => $level,
- * 'time' => time(),
- * 'context' => $context,
- * 'message' => $msg,
- * //['repackage' => $err] repackaged error array/Exception class
- * );
- * </code>
- *
- * Normally, the previous array is returned.
- */
- function push($code, $level = 'error', $params = array(), $msg = false,
- $repackage = false, $backtrace = false)
- {
- $context = false;
- // grab error context
- if ($this->_contextCallback) {
- if (!$backtrace) {
- $backtrace = debug_backtrace();
- }
- $context = call_user_func($this->_contextCallback, $code, $params, $backtrace);
- }
-
- // save error
- $time = explode(' ', microtime());
- $time = $time[1] + $time[0];
- $err = array(
- 'code' => $code,
- 'params' => $params,
- 'package' => $this->_package,
- 'level' => $level,
- 'time' => $time,
- 'context' => $context,
- 'message' => $msg,
- );
-
- if ($repackage) {
- $err['repackage'] = $repackage;
- }
-
- // set up the error message, if necessary
- if ($this->_msgCallback) {
- $msg = call_user_func_array($this->_msgCallback,
- array(&$this, $err));
- $err['message'] = $msg;
- }
- $push = $log = true;
- $die = false;
- // try the overriding callback first
- $callback = $this->staticPopCallback();
- if ($callback) {
- $this->staticPushCallback($callback);
- }
- if (!is_callable($callback)) {
- // try the local callback next
- $callback = $this->popCallback();
- if (is_callable($callback)) {
- $this->pushCallback($callback);
- } else {
- // try the default callback
- $callback = isset($GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package]) ?
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package] :
- $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*'];
- }
- }
- if (is_callable($callback)) {
- switch(call_user_func($callback, $err)){
- case PEAR_ERRORSTACK_IGNORE:
- return $err;
- break;
- case PEAR_ERRORSTACK_PUSH:
- $log = false;
- break;
- case PEAR_ERRORSTACK_LOG:
- $push = false;
- break;
- case PEAR_ERRORSTACK_DIE:
- $die = true;
- break;
- // anything else returned has the same effect as pushandlog
- }
- }
- if ($push) {
- array_unshift($this->_errors, $err);
- if (!isset($this->_errorsByLevel[$err['level']])) {
- $this->_errorsByLevel[$err['level']] = array();
- }
- $this->_errorsByLevel[$err['level']][] = &$this->_errors[0];
- }
- if ($log) {
- if ($this->_logger || $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']) {
- $this->_log($err);
- }
- }
- if ($die) {
- die();
- }
- if ($this->_compat && $push) {
- return $this->raiseError($msg, $code, null, null, $err);
- }
- return $err;
- }
-
- /**
- * Static version of {@link push()}
- *
- * @param string $package Package name this error belongs to
- * @param int $code Package-specific error code
- * @param string $level Error level. This is NOT spell-checked
- * @param array $params associative array of error parameters
- * @param string $msg Error message, or a portion of it if the message
- * is to be generated
- * @param array $repackage If this error re-packages an error pushed by
- * another package, place the array returned from
- * {@link pop()} in this parameter
- * @param array $backtrace Protected parameter: use this to pass in the
- * {@link debug_backtrace()} that should be used
- * to find error context
- * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also
- * thrown. see docs for {@link push()}
- * @static
- */
- function staticPush($package, $code, $level = 'error', $params = array(),
- $msg = false, $repackage = false, $backtrace = false)
- {
- $s = &PEAR_ErrorStack::singleton($package);
- if ($s->_contextCallback) {
- if (!$backtrace) {
- if (function_exists('debug_backtrace')) {
- $backtrace = debug_backtrace();
- }
- }
- }
- return $s->push($code, $level, $params, $msg, $repackage, $backtrace);
- }
-
- /**
- * Log an error using PEAR::Log
- * @param array $err Error array
- * @param array $levels Error level => Log constant map
- * @access protected
- */
- function _log($err)
- {
- if ($this->_logger) {
- $logger = &$this->_logger;
- } else {
- $logger = &$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'];
- }
- if (is_a($logger, 'Log')) {
- $levels = array(
- 'exception' => PEAR_LOG_CRIT,
- 'alert' => PEAR_LOG_ALERT,
- 'critical' => PEAR_LOG_CRIT,
- 'error' => PEAR_LOG_ERR,
- 'warning' => PEAR_LOG_WARNING,
- 'notice' => PEAR_LOG_NOTICE,
- 'info' => PEAR_LOG_INFO,
- 'debug' => PEAR_LOG_DEBUG);
- if (isset($levels[$err['level']])) {
- $level = $levels[$err['level']];
- } else {
- $level = PEAR_LOG_INFO;
- }
- $logger->log($err['message'], $level, $err);
- } else { // support non-standard logs
- call_user_func($logger, $err);
- }
- }
-
-
- /**
- * Pop an error off of the error stack
- *
- * @return false|array
- * @since 0.4alpha it is no longer possible to specify a specific error
- * level to return - the last error pushed will be returned, instead
- */
- function pop()
- {
- $err = @array_shift($this->_errors);
- if (!is_null($err)) {
- @array_pop($this->_errorsByLevel[$err['level']]);
- if (!count($this->_errorsByLevel[$err['level']])) {
- unset($this->_errorsByLevel[$err['level']]);
- }
- }
- return $err;
- }
-
- /**
- * Pop an error off of the error stack, static method
- *
- * @param string package name
- * @return boolean
- * @since PEAR1.5.0a1
- */
- function staticPop($package)
- {
- if ($package) {
- if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) {
- return false;
- }
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop();
- }
- }
-
- /**
- * Determine whether there are any errors on the stack
- * @param string|array Level name. Use to determine if any errors
- * of level (string), or levels (array) have been pushed
- * @return boolean
- */
- function hasErrors($level = false)
- {
- if ($level) {
- return isset($this->_errorsByLevel[$level]);
- }
- return count($this->_errors);
- }
-
- /**
- * Retrieve all errors since last purge
- *
- * @param boolean set in order to empty the error stack
- * @param string level name, to return only errors of a particular severity
- * @return array
- */
- function getErrors($purge = false, $level = false)
- {
- if (!$purge) {
- if ($level) {
- if (!isset($this->_errorsByLevel[$level])) {
- return array();
- } else {
- return $this->_errorsByLevel[$level];
- }
- } else {
- return $this->_errors;
- }
- }
- if ($level) {
- $ret = $this->_errorsByLevel[$level];
- foreach ($this->_errorsByLevel[$level] as $i => $unused) {
- // entries are references to the $_errors array
- $this->_errorsByLevel[$level][$i] = false;
- }
- // array_filter removes all entries === false
- $this->_errors = array_filter($this->_errors);
- unset($this->_errorsByLevel[$level]);
- return $ret;
- }
- $ret = $this->_errors;
- $this->_errors = array();
- $this->_errorsByLevel = array();
- return $ret;
- }
-
- /**
- * Determine whether there are any errors on a single error stack, or on any error stack
- *
- * The optional parameter can be used to test the existence of any errors without the need of
- * singleton instantiation
- * @param string|false Package name to check for errors
- * @param string Level name to check for a particular severity
- * @return boolean
- * @static
- */
- function staticHasErrors($package = false, $level = false)
- {
- if ($package) {
- if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) {
- return false;
- }
- return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->hasErrors($level);
- }
- foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) {
- if ($obj->hasErrors($level)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Get a list of all errors since last purge, organized by package
- * @since PEAR 1.4.0dev BC break! $level is now in the place $merge used to be
- * @param boolean $purge Set to purge the error stack of existing errors
- * @param string $level Set to a level name in order to retrieve only errors of a particular level
- * @param boolean $merge Set to return a flat array, not organized by package
- * @param array $sortfunc Function used to sort a merged array - default
- * sorts by time, and should be good for most cases
- * @static
- * @return array
- */
- function staticGetErrors($purge = false, $level = false, $merge = false,
- $sortfunc = array('PEAR_ErrorStack', '_sortErrors'))
- {
- $ret = array();
- if (!is_callable($sortfunc)) {
- $sortfunc = array('PEAR_ErrorStack', '_sortErrors');
- }
- foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) {
- $test = $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->getErrors($purge, $level);
- if ($test) {
- if ($merge) {
- $ret = array_merge($ret, $test);
- } else {
- $ret[$package] = $test;
- }
- }
- }
- if ($merge) {
- usort($ret, $sortfunc);
- }
- return $ret;
- }
-
- /**
- * Error sorting function, sorts by time
- * @access private
- */
- function _sortErrors($a, $b)
- {
- if ($a['time'] == $b['time']) {
- return 0;
- }
- if ($a['time'] < $b['time']) {
- return 1;
- }
- return -1;
- }
-
- /**
- * Standard file/line number/function/class context callback
- *
- * This function uses a backtrace generated from {@link debug_backtrace()}
- * and so will not work at all in PHP < 4.3.0. The frame should
- * reference the frame that contains the source of the error.
- * @return array|false either array('file' => file, 'line' => line,
- * 'function' => function name, 'class' => class name) or
- * if this doesn't work, then false
- * @param unused
- * @param integer backtrace frame.
- * @param array Results of debug_backtrace()
- * @static
- */
- function getFileLine($code, $params, $backtrace = null)
- {
- if ($backtrace === null) {
- return false;
- }
- $frame = 0;
- $functionframe = 1;
- if (!isset($backtrace[1])) {
- $functionframe = 0;
- } else {
- while (isset($backtrace[$functionframe]['function']) &&
- $backtrace[$functionframe]['function'] == 'eval' &&
- isset($backtrace[$functionframe + 1])) {
- $functionframe++;
- }
- }
- if (isset($backtrace[$frame])) {
- if (!isset($backtrace[$frame]['file'])) {
- $frame++;
- }
- $funcbacktrace = $backtrace[$functionframe];
- $filebacktrace = $backtrace[$frame];
- $ret = array('file' => $filebacktrace['file'],
- 'line' => $filebacktrace['line']);
- // rearrange for eval'd code or create function errors
- if (strpos($filebacktrace['file'], '(') &&
- preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'],
- $matches)) {
- $ret['file'] = $matches[1];
- $ret['line'] = $matches[2] + 0;
- }
- if (isset($funcbacktrace['function']) && isset($backtrace[1])) {
- if ($funcbacktrace['function'] != 'eval') {
- if ($funcbacktrace['function'] == '__lambda_func') {
- $ret['function'] = 'create_function() code';
- } else {
- $ret['function'] = $funcbacktrace['function'];
- }
- }
- }
- if (isset($funcbacktrace['class']) && isset($backtrace[1])) {
- $ret['class'] = $funcbacktrace['class'];
- }
- return $ret;
- }
- return false;
- }
-
- /**
- * Standard error message generation callback
- *
- * This method may also be called by a custom error message generator
- * to fill in template values from the params array, simply
- * set the third parameter to the error message template string to use
- *
- * The special variable %__msg% is reserved: use it only to specify
- * where a message passed in by the user should be placed in the template,
- * like so:
- *
- * Error message: %msg% - internal error
- *
- * If the message passed like so:
- *
- * <code>
- * $stack->push(ERROR_CODE, 'error', array(), 'server error 500');
- * </code>
- *
- * The returned error message will be "Error message: server error 500 -
- * internal error"
- * @param PEAR_ErrorStack
- * @param array
- * @param string|false Pre-generated error message template
- * @static
- * @return string
- */
- function getErrorMessage(&$stack, $err, $template = false)
- {
- if ($template) {
- $mainmsg = $template;
- } else {
- $mainmsg = $stack->getErrorMessageTemplate($err['code']);
- }
- $mainmsg = str_replace('%__msg%', $err['message'], $mainmsg);
- if (is_array($err['params']) && count($err['params'])) {
- foreach ($err['params'] as $name => $val) {
- if (is_array($val)) {
- // @ is needed in case $val is a multi-dimensional array
- $val = @implode(', ', $val);
- }
- if (is_object($val)) {
- if (method_exists($val, '__toString')) {
- $val = $val->__toString();
- } else {
- PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_OBJTOSTRING,
- 'warning', array('obj' => get_class($val)),
- 'object %obj% passed into getErrorMessage, but has no __toString() method');
- $val = 'Object';
- }
- }
- $mainmsg = str_replace('%' . $name . '%', $val, $mainmsg);
- }
- }
- return $mainmsg;
- }
-
- /**
- * Standard Error Message Template generator from code
- * @return string
- */
- function getErrorMessageTemplate($code)
- {
- if (!isset($this->_errorMsgs[$code])) {
- return '%__msg%';
- }
- return $this->_errorMsgs[$code];
- }
-
- /**
- * Set the Error Message Template array
- *
- * The array format must be:
- * <pre>
- * array(error code => 'message template',...)
- * </pre>
- *
- * Error message parameters passed into {@link push()} will be used as input
- * for the error message. If the template is 'message %foo% was %bar%', and the
- * parameters are array('foo' => 'one', 'bar' => 'six'), the error message returned will
- * be 'message one was six'
- * @return string
- */
- function setErrorMessageTemplate($template)
- {
- $this->_errorMsgs = $template;
- }
-
-
- /**
- * emulate PEAR::raiseError()
- *
- * @return PEAR_Error
- */
- function raiseError()
- {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
- $args = func_get_args();
- return call_user_func_array(array('PEAR', 'raiseError'), $args);
- }
-}
-$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack');
-$stack->pushCallback(array('PEAR_ErrorStack', '_handleError'));
-?>
-<?php
-/**
- * PEAR_Frontend, the singleton-based frontend for user input/output
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Include error handling
- */
-//require_once 'PEAR.php';
-
-/**
- * Which user interface class is being used.
- * @var string class name
- */
-$GLOBALS['_PEAR_FRONTEND_CLASS'] = 'PEAR_Frontend_CLI';
-
-/**
- * Instance of $_PEAR_Command_uiclass.
- * @var object
- */
-$GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null;
-
-/**
- * Singleton-based frontend for PEAR user input/output
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Frontend extends PEAR
-{
- /**
- * Retrieve the frontend object
- * @return PEAR_Frontend_CLI|PEAR_Frontend_Web|PEAR_Frontend_Gtk
- * @static
- */
- function &singleton($type = null)
- {
- if ($type === null) {
- if (!isset($GLOBALS['_PEAR_FRONTEND_SINGLETON'])) {
- $a = false;
- return $a;
- }
- return $GLOBALS['_PEAR_FRONTEND_SINGLETON'];
- }
-
- $a = PEAR_Frontend::setFrontendClass($type);
- return $a;
- }
-
- /**
- * Set the frontend class that will be used by calls to {@link singleton()}
- *
- * Frontends are expected to conform to the PEAR naming standard of
- * _ => DIRECTORY_SEPARATOR (PEAR_Frontend_CLI is in PEAR/Frontend/CLI.php)
- * @param string $uiclass full class name
- * @return PEAR_Frontend
- * @static
- */
- function &setFrontendClass($uiclass)
- {
- if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) &&
- is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], $uiclass)) {
- return $GLOBALS['_PEAR_FRONTEND_SINGLETON'];
- }
-
- if (!class_exists($uiclass)) {
- $file = 'phar://install-pear-nozlib.phar/' . str_replace('_', '/', $uiclass) . '.php';
- if (PEAR_Frontend::isIncludeable($file)) {
- include_once $file;
- }
- }
-
- if (class_exists($uiclass)) {
- $obj = new $uiclass;
- // quick test to see if this class implements a few of the most
- // important frontend methods
- if (is_a($obj, 'PEAR_Frontend')) {
- $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$obj;
- $GLOBALS['_PEAR_FRONTEND_CLASS'] = $uiclass;
- return $obj;
- }
-
- $err = PEAR::raiseError("not a frontend class: $uiclass");
- return $err;
- }
-
- $err = PEAR::raiseError("no such class: $uiclass");
- return $err;
- }
-
- /**
- * Set the frontend class that will be used by calls to {@link singleton()}
- *
- * Frontends are expected to be a descendant of PEAR_Frontend
- * @param PEAR_Frontend
- * @return PEAR_Frontend
- * @static
- */
- function &setFrontendObject($uiobject)
- {
- if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) &&
- is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) {
- return $GLOBALS['_PEAR_FRONTEND_SINGLETON'];
- }
-
- if (!is_a($uiobject, 'PEAR_Frontend')) {
- $err = PEAR::raiseError('not a valid frontend class: (' .
- get_class($uiobject) . ')');
- return $err;
- }
-
- $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$uiobject;
- $GLOBALS['_PEAR_FRONTEND_CLASS'] = get_class($uiobject);
- return $uiobject;
- }
-
- /**
- * @param string $path relative or absolute include path
- * @return boolean
- * @static
- */
- function isIncludeable($path)
- {
- if (file_exists($path) && is_readable($path)) {
- return true;
- }
-
- $fp = @fopen($path, 'r', true);
- if ($fp) {
- fclose($fp);
- return true;
- }
-
- return false;
- }
-
- /**
- * @param PEAR_Config
- */
- function setConfig(&$config)
- {
- }
-
- /**
- * This can be overridden to allow session-based temporary file management
- *
- * By default, all files are deleted at the end of a session. The web installer
- * needs to be able to sustain a list over many sessions in order to support
- * user interaction with install scripts
- */
- function addTempFile($file)
- {
- $GLOBALS['_PEAR_Common_tempfiles'][] = $file;
- }
-
- /**
- * Log an action
- *
- * @param string $msg the message to log
- * @param boolean $append_crlf
- * @return boolean true
- * @abstract
- */
- function log($msg, $append_crlf = true)
- {
- }
-
- /**
- * Run a post-installation script
- *
- * @param array $scripts array of post-install scripts
- * @abstract
- */
- function runPostinstallScripts(&$scripts)
- {
- }
-
- /**
- * Display human-friendly output formatted depending on the
- * $command parameter.
- *
- * This should be able to handle basic output data with no command
- * @param mixed $data data structure containing the information to display
- * @param string $command command from which this method was called
- * @abstract
- */
- function outputData($data, $command = '_default')
- {
- }
-
- /**
- * Display a modal form dialog and return the given input
- *
- * A frontend that requires multiple requests to retrieve and process
- * data must take these needs into account, and implement the request
- * handling code.
- * @param string $command command from which this method was called
- * @param array $prompts associative array. keys are the input field names
- * and values are the description
- * @param array $types array of input field types (text, password,
- * etc.) keys have to be the same like in $prompts
- * @param array $defaults array of default values. again keys have
- * to be the same like in $prompts. Do not depend
- * on a default value being set.
- * @return array input sent by the user
- * @abstract
- */
- function userDialog($command, $prompts, $types = array(), $defaults = array())
- {
- }
-}<?php
-/**
- * PEAR_Frontend_CLI
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-/**
- * base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Frontend.php';
-
-/**
- * Command-line Frontend for the PEAR Installer
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Frontend_CLI extends PEAR_Frontend
-{
- /**
- * What type of user interface this frontend is for.
- * @var string
- * @access public
- */
- var $type = 'CLI';
- var $lp = ''; // line prefix
-
- var $params = array();
- var $term = array(
- 'bold' => '',
- 'normal' => '',
- );
-
- function __construct()
- {
- parent::__construct();
- $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1
- if (function_exists('posix_isatty') && !posix_isatty(1)) {
- // output is being redirected to a file or through a pipe
- } elseif ($term) {
- if (preg_match('/^(xterm|vt220|linux)/', $term)) {
- $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109);
- $this->term['normal'] = sprintf("%c%c%c", 27, 91, 109);
- } elseif (preg_match('/^vt100/', $term)) {
- $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0);
- $this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0);
- }
- } elseif (OS_WINDOWS) {
- // XXX add ANSI codes here
- }
- }
-
- /**
- * @param object PEAR_Error object
- */
- function displayError($e)
- {
- return $this->_displayLine($e->getMessage());
- }
-
- /**
- * @param object PEAR_Error object
- */
- function displayFatalError($eobj)
- {
- $this->displayError($eobj);
- if (class_exists('PEAR_Config')) {
- $config = &PEAR_Config::singleton();
- if ($config->get('verbose') > 5) {
- if (function_exists('debug_print_backtrace')) {
- debug_print_backtrace();
- exit(1);
- }
-
- $raised = false;
- foreach (debug_backtrace() as $i => $frame) {
- if (!$raised) {
- if (isset($frame['class'])
- && strtolower($frame['class']) == 'pear'
- && strtolower($frame['function']) == 'raiseerror'
- ) {
- $raised = true;
- } else {
- continue;
- }
- }
-
- $frame['class'] = !isset($frame['class']) ? '' : $frame['class'];
- $frame['type'] = !isset($frame['type']) ? '' : $frame['type'];
- $frame['function'] = !isset($frame['function']) ? '' : $frame['function'];
- $frame['line'] = !isset($frame['line']) ? '' : $frame['line'];
- $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]");
- }
- }
- }
-
- exit(1);
- }
-
- /**
- * Instruct the runInstallScript method to skip a paramgroup that matches the
- * id value passed in.
- *
- * This method is useful for dynamically configuring which sections of a post-install script
- * will be run based on the user's setup, which is very useful for making flexible
- * post-install scripts without losing the cross-Frontend ability to retrieve user input
- * @param string
- */
- function skipParamgroup($id)
- {
- $this->_skipSections[$id] = true;
- }
-
- function runPostinstallScripts(&$scripts)
- {
- foreach ($scripts as $i => $script) {
- $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj);
- }
- }
-
- /**
- * @param array $xml contents of postinstallscript tag
- * @param object $script post-installation script
- * @param string install|upgrade
- */
- function runInstallScript($xml, &$script)
- {
- $this->_skipSections = array();
- if (!is_array($xml) || !isset($xml['paramgroup'])) {
- $script->run(array(), '_default');
- return;
- }
-
- $completedPhases = array();
- if (!isset($xml['paramgroup'][0])) {
- $xml['paramgroup'] = array($xml['paramgroup']);
- }
-
- foreach ($xml['paramgroup'] as $group) {
- if (isset($this->_skipSections[$group['id']])) {
- // the post-install script chose to skip this section dynamically
- continue;
- }
-
- if (isset($group['name'])) {
- $paramname = explode('::', $group['name']);
- if ($lastgroup['id'] != $paramname[0]) {
- continue;
- }
-
- $group['name'] = $paramname[1];
- if (!isset($answers)) {
- return;
- }
-
- if (isset($answers[$group['name']])) {
- switch ($group['conditiontype']) {
- case '=' :
- if ($answers[$group['name']] != $group['value']) {
- continue 2;
- }
- break;
- case '!=' :
- if ($answers[$group['name']] == $group['value']) {
- continue 2;
- }
- break;
- case 'preg_match' :
- if (!@preg_match('/' . $group['value'] . '/',
- $answers[$group['name']])) {
- continue 2;
- }
- break;
- default :
- return;
- }
- }
- }
-
- $lastgroup = $group;
- if (isset($group['instructions'])) {
- $this->_display($group['instructions']);
- }
-
- if (!isset($group['param'][0])) {
- $group['param'] = array($group['param']);
- }
-
- if (isset($group['param'])) {
- if (method_exists($script, 'postProcessPrompts')) {
- $prompts = $script->postProcessPrompts($group['param'], $group['id']);
- if (!is_array($prompts) || count($prompts) != count($group['param'])) {
- $this->outputData('postinstall', 'Error: post-install script did not ' .
- 'return proper post-processed prompts');
- $prompts = $group['param'];
- } else {
- foreach ($prompts as $i => $var) {
- if (!is_array($var) || !isset($var['prompt']) ||
- !isset($var['name']) ||
- ($var['name'] != $group['param'][$i]['name']) ||
- ($var['type'] != $group['param'][$i]['type'])
- ) {
- $this->outputData('postinstall', 'Error: post-install script ' .
- 'modified the variables or prompts, severe security risk. ' .
- 'Will instead use the defaults from the package.xml');
- $prompts = $group['param'];
- }
- }
- }
-
- $answers = $this->confirmDialog($prompts);
- } else {
- $answers = $this->confirmDialog($group['param']);
- }
- }
-
- if ((isset($answers) && $answers) || !isset($group['param'])) {
- if (!isset($answers)) {
- $answers = array();
- }
-
- array_unshift($completedPhases, $group['id']);
- if (!$script->run($answers, $group['id'])) {
- $script->run($completedPhases, '_undoOnError');
- return;
- }
- } else {
- $script->run($completedPhases, '_undoOnError');
- return;
- }
- }
- }
-
- /**
- * Ask for user input, confirm the answers and continue until the user is satisfied
- * @param array an array of arrays, format array('name' => 'paramname', 'prompt' =>
- * 'text to display', 'type' => 'string'[, default => 'default value'])
- * @return array
- */
- function confirmDialog($params)
- {
- $answers = $prompts = $types = array();
- foreach ($params as $param) {
- $prompts[$param['name']] = $param['prompt'];
- $types[$param['name']] = $param['type'];
- $answers[$param['name']] = isset($param['default']) ? $param['default'] : '';
- }
-
- $tried = false;
- do {
- if ($tried) {
- $i = 1;
- foreach ($answers as $var => $value) {
- if (!strlen($value)) {
- echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n");
- }
- $i++;
- }
- }
-
- $answers = $this->userDialog('', $prompts, $types, $answers);
- $tried = true;
- } while (is_array($answers) && count(array_filter($answers)) != count($prompts));
-
- return $answers;
- }
-
- function userDialog($command, $prompts, $types = array(), $defaults = array(), $screensize = 20)
- {
- if (!is_array($prompts)) {
- return array();
- }
-
- $testprompts = array_keys($prompts);
- $result = $defaults;
-
- reset($prompts);
- if (count($prompts) === 1) {
- foreach ($prompts as $key => $prompt) {
- $type = $types[$key];
- $default = @$defaults[$key];
- print "$prompt ";
- if ($default) {
- print "[$default] ";
- }
- print ": ";
-
- $line = fgets(STDIN, 2048);
- $result[$key] = ($default && trim($line) == '') ? $default : trim($line);
- }
-
- return $result;
- }
-
- $first_run = true;
- while (true) {
- $descLength = max(array_map('strlen', $prompts));
- $descFormat = "%-{$descLength}s";
- $last = count($prompts);
-
- $i = 0;
- foreach ($prompts as $n => $var) {
- $res = isset($result[$n]) ? $result[$n] : null;
- printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], $res);
- }
- print "\n1-$last, 'all', 'abort', or Enter to continue: ";
-
- $tmp = trim(fgets(STDIN, 1024));
- if (empty($tmp)) {
- break;
- }
-
- if ($tmp == 'abort') {
- return false;
- }
-
- if (isset($testprompts[(int)$tmp - 1])) {
- $var = $testprompts[(int)$tmp - 1];
- $desc = $prompts[$var];
- $current = @$result[$var];
- print "$desc [$current] : ";
- $tmp = trim(fgets(STDIN, 1024));
- if ($tmp !== '') {
- $result[$var] = $tmp;
- }
- } elseif ($tmp == 'all') {
- foreach ($prompts as $var => $desc) {
- $current = $result[$var];
- print "$desc [$current] : ";
- $tmp = trim(fgets(STDIN, 1024));
- if (trim($tmp) !== '') {
- $result[$var] = trim($tmp);
- }
- }
- }
-
- $first_run = false;
- }
-
- return $result;
- }
-
- function userConfirm($prompt, $default = 'yes')
- {
- trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR);
- static $positives = array('y', 'yes', 'on', '1');
- static $negatives = array('n', 'no', 'off', '0');
- print "$this->lp$prompt [$default] : ";
- $fp = fopen("php://stdin", "r");
- $line = fgets($fp, 2048);
- fclose($fp);
- $answer = strtolower(trim($line));
- if (empty($answer)) {
- $answer = $default;
- }
- if (in_array($answer, $positives)) {
- return true;
- }
- if (in_array($answer, $negatives)) {
- return false;
- }
- if (in_array($default, $positives)) {
- return true;
- }
- return false;
- }
-
- function outputData($data, $command = '_default')
- {
- switch ($command) {
- case 'channel-info':
- foreach ($data as $type => $section) {
- if ($type == 'main') {
- $section['data'] = array_values($section['data']);
- }
-
- $this->outputData($section);
- }
- break;
- case 'install':
- case 'upgrade':
- case 'upgrade-all':
- if (is_array($data) && isset($data['release_warnings'])) {
- $this->_displayLine('');
- $this->_startTable(array(
- 'border' => false,
- 'caption' => 'Release Warnings'
- ));
- $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55)));
- $this->_endTable();
- $this->_displayLine('');
- }
-
- $this->_displayLine(is_array($data) ? $data['data'] : $data);
- break;
- case 'search':
- $this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
- }
-
- $packages = array();
- foreach($data['data'] as $category) {
- foreach($category as $name => $pkg) {
- $packages[$pkg[0]] = $pkg;
- }
- }
-
- $p = array_keys($packages);
- natcasesort($p);
- foreach ($p as $name) {
- $this->_tableRow($packages[$name], null, array(1 => array('wrap' => 55)));
- }
-
- $this->_endTable();
- break;
- case 'list-all':
- if (!isset($data['data'])) {
- $this->_displayLine('No packages in channel');
- break;
- }
-
- $this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55)));
- }
-
- $packages = array();
- foreach($data['data'] as $category) {
- foreach($category as $name => $pkg) {
- $packages[$pkg[0]] = $pkg;
- }
- }
-
- $p = array_keys($packages);
- natcasesort($p);
- foreach ($p as $name) {
- $pkg = $packages[$name];
- unset($pkg[4], $pkg[5]);
- $this->_tableRow($pkg, null, array(1 => array('wrap' => 55)));
- }
-
- $this->_endTable();
- break;
- case 'config-show':
- $data['border'] = false;
- $opts = array(
- 0 => array('wrap' => 30),
- 1 => array('wrap' => 20),
- 2 => array('wrap' => 35)
- );
-
- $this->_startTable($data);
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'], array('bold' => true), $opts);
- }
-
- foreach ($data['data'] as $group) {
- foreach ($group as $value) {
- if ($value[2] == '') {
- $value[2] = "<not set>";
- }
-
- $this->_tableRow($value, null, $opts);
- }
- }
-
- $this->_endTable();
- break;
- case 'remote-info':
- $d = $data;
- $data = array(
- 'caption' => 'Package details:',
- 'border' => false,
- 'data' => array(
- array("Latest", $data['stable']),
- array("Installed", $data['installed']),
- array("Package", $data['name']),
- array("License", $data['license']),
- array("Category", $data['category']),
- array("Summary", $data['summary']),
- array("Description", $data['description']),
- ),
- );
-
- if (isset($d['deprecated']) && $d['deprecated']) {
- $conf = &PEAR_Config::singleton();
- $reg = $conf->getRegistry();
- $name = $reg->parsedPackageNameToString($d['deprecated'], true);
- $data['data'][] = array('Deprecated! use', $name);
- }
- default: {
- if (is_array($data)) {
- $this->_startTable($data);
- $count = count($data['data'][0]);
- if ($count == 2) {
- $opts = array(0 => array('wrap' => 25),
- 1 => array('wrap' => 48)
- );
- } elseif ($count == 3) {
- $opts = array(0 => array('wrap' => 30),
- 1 => array('wrap' => 20),
- 2 => array('wrap' => 35)
- );
- } else {
- $opts = null;
- }
- if (isset($data['headline']) && is_array($data['headline'])) {
- $this->_tableRow($data['headline'],
- array('bold' => true),
- $opts);
- }
-
- if (is_array($data['data'])) {
- foreach($data['data'] as $row) {
- $this->_tableRow($row, null, $opts);
- }
- } else {
- $this->_tableRow(array($data['data']), null, $opts);
- }
- $this->_endTable();
- } else {
- $this->_displayLine($data);
- }
- }
- }
- }
-
- function log($text, $append_crlf = true)
- {
- if ($append_crlf) {
- return $this->_displayLine($text);
- }
-
- return $this->_display($text);
- }
-
- function bold($text)
- {
- if (empty($this->term['bold'])) {
- return strtoupper($text);
- }
-
- return $this->term['bold'] . $text . $this->term['normal'];
- }
-
- function _displayHeading($title)
- {
- print $this->lp.$this->bold($title)."\n";
- print $this->lp.str_repeat("=", strlen($title))."\n";
- }
-
- function _startTable($params = array())
- {
- $params['table_data'] = array();
- $params['widest'] = array(); // indexed by column
- $params['highest'] = array(); // indexed by row
- $params['ncols'] = 0;
- $this->params = $params;
- }
-
- function _tableRow($columns, $rowparams = array(), $colparams = array())
- {
- $highest = 1;
- for ($i = 0; $i < count($columns); $i++) {
- $col = &$columns[$i];
- if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) {
- $col = wordwrap($col, $colparams[$i]['wrap']);
- }
-
- if (strpos($col, "\n") !== false) {
- $multiline = explode("\n", $col);
- $w = 0;
- foreach ($multiline as $n => $line) {
- $len = strlen($line);
- if ($len > $w) {
- $w = $len;
- }
- }
- $lines = count($multiline);
- } else {
- $w = strlen($col);
- }
-
- if (isset($this->params['widest'][$i])) {
- if ($w > $this->params['widest'][$i]) {
- $this->params['widest'][$i] = $w;
- }
- } else {
- $this->params['widest'][$i] = $w;
- }
-
- $tmp = count_chars($columns[$i], 1);
- // handle unix, mac and windows formats
- $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1;
- if ($lines > $highest) {
- $highest = $lines;
- }
- }
-
- if (count($columns) > $this->params['ncols']) {
- $this->params['ncols'] = count($columns);
- }
-
- $new_row = array(
- 'data' => $columns,
- 'height' => $highest,
- 'rowparams' => $rowparams,
- 'colparams' => $colparams,
- );
- $this->params['table_data'][] = $new_row;
- }
-
- function _endTable()
- {
- extract($this->params);
- if (!empty($caption)) {
- $this->_displayHeading($caption);
- }
-
- if (count($table_data) === 0) {
- return;
- }
-
- if (!isset($width)) {
- $width = $widest;
- } else {
- for ($i = 0; $i < $ncols; $i++) {
- if (!isset($width[$i])) {
- $width[$i] = $widest[$i];
- }
- }
- }
-
- $border = false;
- if (empty($border)) {
- $cellstart = '';
- $cellend = ' ';
- $rowend = '';
- $padrowend = false;
- $borderline = '';
- } else {
- $cellstart = '| ';
- $cellend = ' ';
- $rowend = '|';
- $padrowend = true;
- $borderline = '+';
- foreach ($width as $w) {
- $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1);
- $borderline .= '+';
- }
- }
-
- if ($borderline) {
- $this->_displayLine($borderline);
- }
-
- for ($i = 0; $i < count($table_data); $i++) {
- extract($table_data[$i]);
- if (!is_array($rowparams)) {
- $rowparams = array();
- }
-
- if (!is_array($colparams)) {
- $colparams = array();
- }
-
- $rowlines = array();
- if ($height > 1) {
- for ($c = 0; $c < count($data); $c++) {
- $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]);
- if (count($rowlines[$c]) < $height) {
- $rowlines[$c] = array_pad($rowlines[$c], $height, '');
- }
- }
- } else {
- for ($c = 0; $c < count($data); $c++) {
- $rowlines[$c] = array($data[$c]);
- }
- }
-
- for ($r = 0; $r < $height; $r++) {
- $rowtext = '';
- for ($c = 0; $c < count($data); $c++) {
- if (isset($colparams[$c])) {
- $attribs = array_merge($rowparams, $colparams);
- } else {
- $attribs = $rowparams;
- }
-
- $w = isset($width[$c]) ? $width[$c] : 0;
- //$cell = $data[$c];
- $cell = $rowlines[$c][$r];
- $l = strlen($cell);
- if ($l > $w) {
- $cell = substr($cell, 0, $w);
- }
-
- if (isset($attribs['bold'])) {
- $cell = $this->bold($cell);
- }
-
- if ($l < $w) {
- // not using str_pad here because we may
- // add bold escape characters to $cell
- $cell .= str_repeat(' ', $w - $l);
- }
-
- $rowtext .= $cellstart . $cell . $cellend;
- }
-
- if (!$border) {
- $rowtext = rtrim($rowtext);
- }
-
- $rowtext .= $rowend;
- $this->_displayLine($rowtext);
- }
- }
-
- if ($borderline) {
- $this->_displayLine($borderline);
- }
- }
-
- function _displayLine($text)
- {
- print "$this->lp$text\n";
- }
-
- function _display($text)
- {
- print $text;
- }
-}
-<?php
-/**
- * PEAR_Installer
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * Used for installation groups in package.xml 2.0 and platform exceptions
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'OS/Guess.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Downloader.php';
-
-define('PEAR_INSTALLER_NOBINARY', -240);
-/**
- * Administration class used to install PEAR packages and maintain the
- * installed package database.
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V.V. Cox <cox@idecnet.com>
- * @author Martin Jansen <mj@php.net>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 0.1
- */
-class PEAR_Installer extends PEAR_Downloader
-{
- // {{{ properties
-
- /** name of the package directory, for example Foo-1.0
- * @var string
- */
- var $pkgdir;
-
- /** directory where PHP code files go
- * @var string
- */
- var $phpdir;
-
- /** directory where PHP extension files go
- * @var string
- */
- var $extdir;
-
- /** directory where documentation goes
- * @var string
- */
- var $docdir;
-
- /** installation root directory (ala PHP's INSTALL_ROOT or
- * automake's DESTDIR
- * @var string
- */
- var $installroot = '';
-
- /** debug level
- * @var int
- */
- var $debug = 1;
-
- /** temporary directory
- * @var string
- */
- var $tmpdir;
-
- /**
- * PEAR_Registry object used by the installer
- * @var PEAR_Registry
- */
- var $registry;
-
- /**
- * array of PEAR_Downloader_Packages
- * @var array
- */
- var $_downloadedPackages;
-
- /** List of file transactions queued for an install/upgrade/uninstall.
- *
- * Format:
- * array(
- * 0 => array("rename => array("from-file", "to-file")),
- * 1 => array("delete" => array("file-to-delete")),
- * ...
- * )
- *
- * @var array
- */
- var $file_operations = array();
-
- // }}}
-
- // {{{ constructor
-
- /**
- * PEAR_Installer constructor.
- *
- * @param object $ui user interface object (instance of PEAR_Frontend_*)
- *
- * @access public
- */
- function __construct(&$ui)
- {
- parent::__construct($ui, array(), null);
- $this->setFrontendObject($ui);
- $this->debug = $this->config->get('verbose');
- }
-
- function setOptions($options)
- {
- $this->_options = $options;
- }
-
- function setConfig(&$config)
- {
- $this->config = &$config;
- $this->_registry = &$config->getRegistry();
- }
-
- // }}}
-
- function _removeBackups($files)
- {
- foreach ($files as $path) {
- $this->addFileOperation('removebackup', array($path));
- }
- }
-
- // {{{ _deletePackageFiles()
-
- /**
- * Delete a package's installed files, does not remove empty directories.
- *
- * @param string package name
- * @param string channel name
- * @param bool if true, then files are backed up first
- * @return bool TRUE on success, or a PEAR error on failure
- * @access protected
- */
- function _deletePackageFiles($package, $channel = false, $backup = false)
- {
- if (!$channel) {
- $channel = 'pear.php.net';
- }
-
- if (!strlen($package)) {
- return $this->raiseError("No package to uninstall given");
- }
-
- if (strtolower($package) == 'pear' && $channel == 'pear.php.net') {
- // to avoid race conditions, include all possible needed files
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Replace.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Unixeol.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Windowseol.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/Generator/v1.php';
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/Generator/v2.php';
- }
-
- $filelist = $this->_registry->packageInfo($package, 'filelist', $channel);
- if ($filelist == null) {
- return $this->raiseError("$channel/$package not installed");
- }
-
- $ret = array();
- foreach ($filelist as $file => $props) {
- if (empty($props['installed_as'])) {
- continue;
- }
-
- $path = $props['installed_as'];
- if ($backup) {
- $this->addFileOperation('backup', array($path));
- $ret[] = $path;
- }
-
- $this->addFileOperation('delete', array($path));
- }
-
- if ($backup) {
- return $ret;
- }
-
- return true;
- }
-
- // }}}
- // {{{ _installFile()
-
- /**
- * @param string filename
- * @param array attributes from <file> tag in package.xml
- * @param string path to install the file in
- * @param array options from command-line
- * @access private
- */
- function _installFile($file, $atts, $tmp_path, $options)
- {
- // {{{ return if this file is meant for another platform
- static $os;
- if (!isset($this->_registry)) {
- $this->_registry = &$this->config->getRegistry();
- }
-
- if (isset($atts['platform'])) {
- if (empty($os)) {
- $os = new OS_Guess();
- }
-
- if (strlen($atts['platform']) && $atts['platform']{0} == '!') {
- $negate = true;
- $platform = substr($atts['platform'], 1);
- } else {
- $negate = false;
- $platform = $atts['platform'];
- }
-
- if ((bool) $os->matchSignature($platform) === $negate) {
- $this->log(3, "skipped $file (meant for $atts[platform], we are ".$os->getSignature().")");
- return PEAR_INSTALLER_SKIPPED;
- }
- }
- // }}}
-
- $channel = $this->pkginfo->getChannel();
- // {{{ assemble the destination paths
- switch ($atts['role']) {
- case 'src':
- case 'extsrc':
- $this->source_files++;
- return;
- case 'doc':
- case 'data':
- case 'test':
- $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel) .
- DIRECTORY_SEPARATOR . $this->pkginfo->getPackage();
- unset($atts['baseinstalldir']);
- break;
- case 'ext':
- case 'php':
- $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel);
- break;
- case 'script':
- $dest_dir = $this->config->get('bin_dir', null, $channel);
- break;
- default:
- return $this->raiseError("Invalid role `$atts[role]' for file $file");
- }
-
- $save_destdir = $dest_dir;
- if (!empty($atts['baseinstalldir'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
- }
-
- if (dirname($file) != '.' && empty($atts['install-as'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . dirname($file);
- }
-
- if (empty($atts['install-as'])) {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file);
- } else {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as'];
- }
- $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file;
-
- // Clean up the DIRECTORY_SEPARATOR mess
- $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
- list($dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"),
- array(DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR),
- array($dest_file, $orig_file));
- $final_dest_file = $installed_as = $dest_file;
- if (isset($this->_options['packagingroot'])) {
- $installedas_dest_dir = dirname($final_dest_file);
- $installedas_dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- $final_dest_file = $this->_prependPath($final_dest_file, $this->_options['packagingroot']);
- } else {
- $installedas_dest_dir = dirname($final_dest_file);
- $installedas_dest_file = $installedas_dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- }
-
- $dest_dir = dirname($final_dest_file);
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) {
- return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED);
- }
- // }}}
-
- if (empty($this->_options['register-only']) &&
- (!file_exists($dest_dir) || !is_dir($dest_dir))) {
- if (!$this->mkDirHier($dest_dir)) {
- return $this->raiseError("failed to mkdir $dest_dir",
- PEAR_INSTALLER_FAILED);
- }
- $this->log(3, "+ mkdir $dest_dir");
- }
-
- // pretty much nothing happens if we are only registering the install
- if (empty($this->_options['register-only'])) {
- if (empty($atts['replacements'])) {
- if (!file_exists($orig_file)) {
- return $this->raiseError("file $orig_file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!@copy($orig_file, $dest_file)) {
- return $this->raiseError("failed to write $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ cp $orig_file $dest_file");
- if (isset($atts['md5sum'])) {
- $md5sum = md5_file($dest_file);
- }
- } else {
- // {{{ file with replacements
- if (!file_exists($orig_file)) {
- return $this->raiseError("file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- $contents = file_get_contents($orig_file);
- if ($contents === false) {
- $contents = '';
- }
-
- if (isset($atts['md5sum'])) {
- $md5sum = md5($contents);
- }
-
- $subst_from = $subst_to = array();
- foreach ($atts['replacements'] as $a) {
- $to = '';
- if ($a['type'] == 'php-const') {
- if (preg_match('/^[a-z0-9_]+\\z/i', $a['to'])) {
- eval("\$to = $a[to];");
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "invalid php-const replacement: $a[to]");
- }
- continue;
- }
- } elseif ($a['type'] == 'pear-config') {
- if ($a['to'] == 'master_server') {
- $chan = $this->_registry->getChannel($channel);
- if (!PEAR::isError($chan)) {
- $to = $chan->getServer();
- } else {
- $to = $this->config->get($a['to'], null, $channel);
- }
- } else {
- $to = $this->config->get($a['to'], null, $channel);
- }
- if (is_null($to)) {
- if (!isset($options['soft'])) {
- $this->log(0, "invalid pear-config replacement: $a[to]");
- }
- continue;
- }
- } elseif ($a['type'] == 'package-info') {
- if ($t = $this->pkginfo->packageInfo($a['to'])) {
- $to = $t;
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "invalid package-info replacement: $a[to]");
- }
- continue;
- }
- }
- if (!is_null($to)) {
- $subst_from[] = $a['from'];
- $subst_to[] = $to;
- }
- }
-
- $this->log(3, "doing ".sizeof($subst_from)." substitution(s) for $final_dest_file");
- if (sizeof($subst_from)) {
- $contents = str_replace($subst_from, $subst_to, $contents);
- }
-
- $wp = @fopen($dest_file, "wb");
- if (!is_resource($wp)) {
- return $this->raiseError("failed to create $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- if (@fwrite($wp, $contents) === false) {
- return $this->raiseError("failed writing to $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- fclose($wp);
- // }}}
- }
-
- // {{{ check the md5
- if (isset($md5sum)) {
- if (strtolower($md5sum) === strtolower($atts['md5sum'])) {
- $this->log(2, "md5sum ok: $final_dest_file");
- } else {
- if (empty($options['force'])) {
- // delete the file
- if (file_exists($dest_file)) {
- unlink($dest_file);
- }
-
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("bad md5sum for file $final_dest_file",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- }
- }
- }
- // }}}
- // {{{ set file permissions
- if (!OS_WINDOWS) {
- if ($atts['role'] == 'script') {
- $mode = 0777 & ~(int)octdec($this->config->get('umask'));
- $this->log(3, "+ chmod +x $dest_file");
- } else {
- $mode = 0666 & ~(int)octdec($this->config->get('umask'));
- }
-
- if ($atts['role'] != 'src') {
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
- }
- }
- }
- }
- // }}}
-
- if ($atts['role'] == 'src') {
- rename($dest_file, $final_dest_file);
- $this->log(2, "renamed source file $dest_file to $final_dest_file");
- } else {
- $this->addFileOperation("rename", array($dest_file, $final_dest_file,
- $atts['role'] == 'ext'));
- }
- }
-
- // Store the full path where the file was installed for easy unistall
- if ($atts['role'] != 'script') {
- $loc = $this->config->get($atts['role'] . '_dir');
- } else {
- $loc = $this->config->get('bin_dir');
- }
-
- if ($atts['role'] != 'src') {
- $this->addFileOperation("installed_as", array($file, $installed_as,
- $loc,
- dirname(substr($installedas_dest_file, strlen($loc)))));
- }
-
- //$this->log(2, "installed: $dest_file");
- return PEAR_INSTALLER_OK;
- }
-
- // }}}
- // {{{ _installFile2()
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string filename
- * @param array attributes from <file> tag in package.xml
- * @param string path to install the file in
- * @param array options from command-line
- * @access private
- */
- function _installFile2(&$pkg, $file, &$real_atts, $tmp_path, $options)
- {
- $atts = $real_atts;
- if (!isset($this->_registry)) {
- $this->_registry = &$this->config->getRegistry();
- }
-
- $channel = $pkg->getChannel();
- // {{{ assemble the destination paths
- if (!in_array($atts['attribs']['role'],
- PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) {
- return $this->raiseError('Invalid role `' . $atts['attribs']['role'] .
- "' for file $file");
- }
-
- $role = &PEAR_Installer_Role::factory($pkg, $atts['attribs']['role'], $this->config);
- $err = $role->setup($this, $pkg, $atts['attribs'], $file);
- if (PEAR::isError($err)) {
- return $err;
- }
-
- if (!$role->isInstallable()) {
- return;
- }
-
- $info = $role->processInstallation($pkg, $atts['attribs'], $file, $tmp_path);
- if (PEAR::isError($info)) {
- return $info;
- }
-
- list($save_destdir, $dest_dir, $dest_file, $orig_file) = $info;
- if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) {
- return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED);
- }
-
- $final_dest_file = $installed_as = $dest_file;
- if (isset($this->_options['packagingroot'])) {
- $final_dest_file = $this->_prependPath($final_dest_file,
- $this->_options['packagingroot']);
- }
-
- $dest_dir = dirname($final_dest_file);
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file);
- // }}}
-
- if (empty($this->_options['register-only'])) {
- if (!file_exists($dest_dir) || !is_dir($dest_dir)) {
- if (!$this->mkDirHier($dest_dir)) {
- return $this->raiseError("failed to mkdir $dest_dir",
- PEAR_INSTALLER_FAILED);
- }
- $this->log(3, "+ mkdir $dest_dir");
- }
- }
-
- $attribs = $atts['attribs'];
- unset($atts['attribs']);
- // pretty much nothing happens if we are only registering the install
- if (empty($this->_options['register-only'])) {
- if (!count($atts)) { // no tasks
- if (!file_exists($orig_file)) {
- return $this->raiseError("file $orig_file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!@copy($orig_file, $dest_file)) {
- return $this->raiseError("failed to write $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ cp $orig_file $dest_file");
- if (isset($attribs['md5sum'])) {
- $md5sum = md5_file($dest_file);
- }
- } else { // file with tasks
- if (!file_exists($orig_file)) {
- return $this->raiseError("file $orig_file does not exist",
- PEAR_INSTALLER_FAILED);
- }
-
- $contents = file_get_contents($orig_file);
- if ($contents === false) {
- $contents = '';
- }
-
- if (isset($attribs['md5sum'])) {
- $md5sum = md5($contents);
- }
-
- foreach ($atts as $tag => $raw) {
- $tag = str_replace(array($pkg->getTasksNs() . ':', '-'), array('', '_'), $tag);
- $task = "PEAR_Task_$tag";
- $task = new $task($this->config, $this, PEAR_TASK_INSTALL);
- if (!$task->isScript()) { // scripts are only handled after installation
- $task->init($raw, $attribs, $pkg->getLastInstalledVersion());
- $res = $task->startSession($pkg, $contents, $final_dest_file);
- if ($res === false) {
- continue; // skip this file
- }
-
- if (PEAR::isError($res)) {
- return $res;
- }
-
- $contents = $res; // save changes
- }
-
- $wp = @fopen($dest_file, "wb");
- if (!is_resource($wp)) {
- return $this->raiseError("failed to create $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- if (fwrite($wp, $contents) === false) {
- return $this->raiseError("failed writing to $dest_file: $php_errormsg",
- PEAR_INSTALLER_FAILED);
- }
-
- fclose($wp);
- }
- }
-
- // {{{ check the md5
- if (isset($md5sum)) {
- // Make sure the original md5 sum matches with expected
- if (strtolower($md5sum) === strtolower($attribs['md5sum'])) {
- $this->log(2, "md5sum ok: $final_dest_file");
-
- if (isset($contents)) {
- // set md5 sum based on $content in case any tasks were run.
- $real_atts['attribs']['md5sum'] = md5($contents);
- }
- } else {
- if (empty($options['force'])) {
- // delete the file
- if (file_exists($dest_file)) {
- unlink($dest_file);
- }
-
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("bad md5sum for file $final_dest_file",
- PEAR_INSTALLER_FAILED);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- } else {
- if (!isset($options['soft'])) {
- $this->log(0, "warning : bad md5sum for file $final_dest_file");
- }
- }
- }
- } else {
- $real_atts['attribs']['md5sum'] = md5_file($dest_file);
- }
-
- // }}}
- // {{{ set file permissions
- if (!OS_WINDOWS) {
- if ($role->isExecutable()) {
- $mode = 0777 & ~(int)octdec($this->config->get('umask'));
- $this->log(3, "+ chmod +x $dest_file");
- } else {
- $mode = 0666 & ~(int)octdec($this->config->get('umask'));
- }
-
- if ($attribs['role'] != 'src') {
- $this->addFileOperation("chmod", array($mode, $dest_file));
- if (!@chmod($dest_file, $mode)) {
- if (!isset($options['soft'])) {
- $this->log(0, "failed to change mode of $dest_file: $php_errormsg");
- }
- }
- }
- }
- // }}}
-
- if ($attribs['role'] == 'src') {
- rename($dest_file, $final_dest_file);
- $this->log(2, "renamed source file $dest_file to $final_dest_file");
- } else {
- $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension()));
- }
- }
-
- // Store the full path where the file was installed for easy uninstall
- if ($attribs['role'] != 'src') {
- $loc = $this->config->get($role->getLocationConfig(), null, $channel);
- $this->addFileOperation('installed_as', array($file, $installed_as,
- $loc,
- dirname(substr($installed_as, strlen($loc)))));
- }
-
- //$this->log(2, "installed: $dest_file");
- return PEAR_INSTALLER_OK;
- }
-
- // }}}
- // {{{ addFileOperation()
-
- /**
- * Add a file operation to the current file transaction.
- *
- * @see startFileTransaction()
- * @param string $type This can be one of:
- * - rename: rename a file ($data has 3 values)
- * - backup: backup an existing file ($data has 1 value)
- * - removebackup: clean up backups created during install ($data has 1 value)
- * - chmod: change permissions on a file ($data has 2 values)
- * - delete: delete a file ($data has 1 value)
- * - rmdir: delete a directory if empty ($data has 1 value)
- * - installed_as: mark a file as installed ($data has 4 values).
- * @param array $data For all file operations, this array must contain the
- * full path to the file or directory that is being operated on. For
- * the rename command, the first parameter must be the file to rename,
- * the second its new name, the third whether this is a PHP extension.
- *
- * The installed_as operation contains 4 elements in this order:
- * 1. Filename as listed in the filelist element from package.xml
- * 2. Full path to the installed file
- * 3. Full path from the php_dir configuration variable used in this
- * installation
- * 4. Relative path from the php_dir that this file is installed in
- */
- function addFileOperation($type, $data)
- {
- if (!is_array($data)) {
- return $this->raiseError('Internal Error: $data in addFileOperation'
- . ' must be an array, was ' . gettype($data));
- }
-
- if ($type == 'chmod') {
- $octmode = decoct($data[0]);
- $this->log(3, "adding to transaction: $type $octmode $data[1]");
- } else {
- $this->log(3, "adding to transaction: $type " . implode(" ", $data));
- }
- $this->file_operations[] = array($type, $data);
- }
-
- // }}}
- // {{{ startFileTransaction()
-
- function startFileTransaction($rollback_in_case = false)
- {
- if (count($this->file_operations) && $rollback_in_case) {
- $this->rollbackFileTransaction();
- }
- $this->file_operations = array();
- }
-
- // }}}
- // {{{ commitFileTransaction()
-
- function commitFileTransaction()
- {
- // {{{ first, check permissions and such manually
- $errors = array();
- foreach ($this->file_operations as $key => $tr) {
- list($type, $data) = $tr;
- switch ($type) {
- case 'rename':
- if (!file_exists($data[0])) {
- $errors[] = "cannot rename file $data[0], doesn't exist";
- }
-
- // check that dest dir. is writable
- if (!is_writable(dirname($data[1]))) {
- $errors[] = "permission denied ($type): $data[1]";
- }
- break;
- case 'chmod':
- // check that file is writable
- if (!is_writable($data[1])) {
- $errors[] = "permission denied ($type): $data[1] " . decoct($data[0]);
- }
- break;
- case 'delete':
- if (!file_exists($data[0])) {
- $this->log(2, "warning: file $data[0] doesn't exist, can't be deleted");
- }
- // check that directory is writable
- if (file_exists($data[0])) {
- if (!is_writable(dirname($data[0]))) {
- $errors[] = "permission denied ($type): $data[0]";
- } else {
- // make sure the file to be deleted can be opened for writing
- $fp = false;
- if (!is_dir($data[0]) &&
- (!is_writable($data[0]) || !($fp = @fopen($data[0], 'a')))) {
- $errors[] = "permission denied ($type): $data[0]";
- } elseif ($fp) {
- fclose($fp);
- }
- }
-
- /* Verify we are not deleting a file owned by another package
- * This can happen when a file moves from package A to B in
- * an upgrade ala http://pear.php.net/17986
- */
- $info = array(
- 'package' => strtolower($this->pkginfo->getName()),
- 'channel' => strtolower($this->pkginfo->getChannel()),
- );
- $result = $this->_registry->checkFileMap($data[0], $info, '1.1');
- if (is_array($result)) {
- $res = array_diff($result, $info);
- if (!empty($res)) {
- $new = $this->_registry->getPackage($result[1], $result[0]);
- $this->file_operations[$key] = false;
- $pkginfoName = $this->pkginfo->getName();
- $newChannel = $new->getChannel();
- $newPackage = $new->getName();
- $this->log(3, "file $data[0] was scheduled for removal from $pkginfoName but is owned by $newChannel/$newPackage, removal has been cancelled.");
- }
- }
- }
- break;
- }
-
- }
- // }}}
-
- $n = count($this->file_operations);
- $this->log(2, "about to commit $n file operations for " . $this->pkginfo->getName());
-
- $m = count($errors);
- if ($m > 0) {
- foreach ($errors as $error) {
- if (!isset($this->_options['soft'])) {
- $this->log(1, $error);
- }
- }
-
- if (!isset($this->_options['ignore-errors'])) {
- return false;
- }
- }
-
- $this->_dirtree = array();
- // {{{ really commit the transaction
- foreach ($this->file_operations as $i => $tr) {
- if (!$tr) {
- // support removal of non-existing backups
- continue;
- }
-
- list($type, $data) = $tr;
- switch ($type) {
- case 'backup':
- if (!file_exists($data[0])) {
- $this->file_operations[$i] = false;
- break;
- }
-
- if (!@copy($data[0], $data[0] . '.bak')) {
- $this->log(1, 'Could not copy ' . $data[0] . ' to ' . $data[0] .
- '.bak ' . $php_errormsg);
- return false;
- }
- $this->log(3, "+ backup $data[0] to $data[0].bak");
- break;
- case 'removebackup':
- if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) {
- unlink($data[0] . '.bak');
- $this->log(3, "+ rm backup of $data[0] ($data[0].bak)");
- }
- break;
- case 'rename':
- $test = file_exists($data[1]) ? @unlink($data[1]) : null;
- if (!$test && file_exists($data[1])) {
- if ($data[2]) {
- $extra = ', this extension must be installed manually. Rename to "' .
- basename($data[1]) . '"';
- } else {
- $extra = '';
- }
-
- if (!isset($this->_options['soft'])) {
- $this->log(1, 'Could not delete ' . $data[1] . ', cannot rename ' .
- $data[0] . $extra);
- }
-
- if (!isset($this->_options['ignore-errors'])) {
- return false;
- }
- }
-
- // permissions issues with rename - copy() is far superior
- $perms = @fileperms($data[0]);
- if (!@copy($data[0], $data[1])) {
- $this->log(1, 'Could not rename ' . $data[0] . ' to ' . $data[1] .
- ' ' . $php_errormsg);
- return false;
- }
-
- // copy over permissions, otherwise they are lost
- @chmod($data[1], $perms);
- @unlink($data[0]);
- $this->log(3, "+ mv $data[0] $data[1]");
- break;
- case 'chmod':
- if (!@chmod($data[1], $data[0])) {
- $this->log(1, 'Could not chmod ' . $data[1] . ' to ' .
- decoct($data[0]) . ' ' . $php_errormsg);
- return false;
- }
-
- $octmode = decoct($data[0]);
- $this->log(3, "+ chmod $octmode $data[1]");
- break;
- case 'delete':
- if (file_exists($data[0])) {
- if (!@unlink($data[0])) {
- $this->log(1, 'Could not delete ' . $data[0] . ' ' .
- $php_errormsg);
- return false;
- }
- $this->log(3, "+ rm $data[0]");
- }
- break;
- case 'rmdir':
- if (file_exists($data[0])) {
- do {
- $testme = opendir($data[0]);
- while (false !== ($entry = readdir($testme))) {
- if ($entry == '.' || $entry == '..') {
- continue;
- }
- closedir($testme);
- break 2; // this directory is not empty and can't be
- // deleted
- }
-
- closedir($testme);
- if (!@rmdir($data[0])) {
- $this->log(1, 'Could not rmdir ' . $data[0] . ' ' .
- $php_errormsg);
- return false;
- }
- $this->log(3, "+ rmdir $data[0]");
- } while (false);
- }
- break;
- case 'installed_as':
- $this->pkginfo->setInstalledAs($data[0], $data[1]);
- if (!isset($this->_dirtree[dirname($data[1])])) {
- $this->_dirtree[dirname($data[1])] = true;
- $this->pkginfo->setDirtree(dirname($data[1]));
-
- while(!empty($data[3]) && dirname($data[3]) != $data[3] &&
- $data[3] != '/' && $data[3] != '\\') {
- $this->pkginfo->setDirtree($pp =
- $this->_prependPath($data[3], $data[2]));
- $this->_dirtree[$pp] = true;
- $data[3] = dirname($data[3]);
- }
- }
- break;
- }
- }
- // }}}
- $this->log(2, "successfully committed $n file operations");
- $this->file_operations = array();
- return true;
- }
-
- // }}}
- // {{{ rollbackFileTransaction()
-
- function rollbackFileTransaction()
- {
- $n = count($this->file_operations);
- $this->log(2, "rolling back $n file operations");
- foreach ($this->file_operations as $tr) {
- list($type, $data) = $tr;
- switch ($type) {
- case 'backup':
- if (file_exists($data[0] . '.bak')) {
- if (file_exists($data[0] && is_writable($data[0]))) {
- unlink($data[0]);
- }
- @copy($data[0] . '.bak', $data[0]);
- $this->log(3, "+ restore $data[0] from $data[0].bak");
- }
- break;
- case 'removebackup':
- if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) {
- unlink($data[0] . '.bak');
- $this->log(3, "+ rm backup of $data[0] ($data[0].bak)");
- }
- break;
- case 'rename':
- @unlink($data[0]);
- $this->log(3, "+ rm $data[0]");
- break;
- case 'mkdir':
- @rmdir($data[0]);
- $this->log(3, "+ rmdir $data[0]");
- break;
- case 'chmod':
- break;
- case 'delete':
- break;
- case 'installed_as':
- $this->pkginfo->setInstalledAs($data[0], false);
- break;
- }
- }
- $this->pkginfo->resetDirtree();
- $this->file_operations = array();
- }
-
- // }}}
- // {{{ mkDirHier($dir)
-
- function mkDirHier($dir)
- {
- $this->addFileOperation('mkdir', array($dir));
- return parent::mkDirHier($dir);
- }
-
- // }}}
- // {{{ download()
-
- /**
- * Download any files and their dependencies, if necessary
- *
- * @param array a mixed list of package names, local files, or package.xml
- * @param PEAR_Config
- * @param array options from the command line
- * @param array this is the array that will be populated with packages to
- * install. Format of each entry:
- *
- * <code>
- * array('pkg' => 'package_name', 'file' => '/path/to/local/file',
- * 'info' => array() // parsed package.xml
- * );
- * </code>
- * @param array this will be populated with any error messages
- * @param false private recursion variable
- * @param false private recursion variable
- * @param false private recursion variable
- * @deprecated in favor of PEAR_Downloader
- */
- function download($packages, $options, &$config, &$installpackages,
- &$errors, $installed = false, $willinstall = false, $state = false)
- {
- // trickiness: initialize here
- parent::PEAR_Downloader($this->ui, $options, $config);
- $ret = parent::download($packages);
- $errors = $this->getErrorMsgs();
- $installpackages = $this->getDownloadedPackages();
- trigger_error("PEAR Warning: PEAR_Installer::download() is deprecated " .
- "in favor of PEAR_Downloader class", E_USER_WARNING);
- return $ret;
- }
-
- // }}}
- // {{{ _parsePackageXml()
-
- function _parsePackageXml(&$descfile)
- {
- // Parse xml file -----------------------------------------------
- $pkg = new PEAR_PackageFile($this->config, $this->debug);
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- $p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($p)) {
- if (is_array($p->getUserInfo())) {
- foreach ($p->getUserInfo() as $err) {
- $loglevel = $err['level'] == 'error' ? 0 : 1;
- if (!isset($this->_options['soft'])) {
- $this->log($loglevel, ucfirst($err['level']) . ': ' . $err['message']);
- }
- }
- }
- return $this->raiseError('Installation failed: invalid package file');
- }
-
- $descfile = $p->getPackageFile();
- return $p;
- }
-
- // }}}
- /**
- * Set the list of PEAR_Downloader_Package objects to allow more sane
- * dependency validation
- * @param array
- */
- function setDownloadedPackages(&$pkgs)
- {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $this->analyzeDependencies($pkgs);
- PEAR::popErrorHandling();
- if (PEAR::isError($err)) {
- return $err;
- }
- $this->_downloadedPackages = &$pkgs;
- }
-
- /**
- * Set the list of PEAR_Downloader_Package objects to allow more sane
- * dependency validation
- * @param array
- */
- function setUninstallPackages(&$pkgs)
- {
- $this->_downloadedPackages = &$pkgs;
- }
-
- function getInstallPackages()
- {
- return $this->_downloadedPackages;
- }
-
- // {{{ install()
-
- /**
- * Installs the files within the package file specified.
- *
- * @param string|PEAR_Downloader_Package $pkgfile path to the package file,
- * or a pre-initialized packagefile object
- * @param array $options
- * recognized options:
- * - installroot : optional prefix directory for installation
- * - force : force installation
- * - register-only : update registry but don't install files
- * - upgrade : upgrade existing install
- * - soft : fail silently
- * - nodeps : ignore dependency conflicts/missing dependencies
- * - alldeps : install all dependencies
- * - onlyreqdeps : install only required dependencies
- *
- * @return array|PEAR_Error package info if successful
- */
- function install($pkgfile, $options = array())
- {
- $this->_options = $options;
- $this->_registry = &$this->config->getRegistry();
- if (is_object($pkgfile)) {
- $dlpkg = &$pkgfile;
- $pkg = $pkgfile->getPackageFile();
- $pkgfile = $pkg->getArchiveFile();
- $descfile = $pkg->getPackageFile();
- } else {
- $descfile = $pkgfile;
- $pkg = $this->_parsePackageXml($descfile);
- if (PEAR::isError($pkg)) {
- return $pkg;
- }
- }
-
- $tmpdir = dirname($descfile);
- if (realpath($descfile) != realpath($pkgfile)) {
- // Use the temp_dir since $descfile can contain the download dir path
- $tmpdir = $this->config->get('temp_dir', null, 'pear.php.net');
- $tmpdir = System::mktemp('-d -t "' . $tmpdir . '"');
-
- $tar = new Archive_Tar($pkgfile);
- if (!$tar->extract($tmpdir)) {
- return $this->raiseError("unable to unpack $pkgfile");
- }
- }
-
- $pkgname = $pkg->getName();
- $channel = $pkg->getChannel();
- if (isset($this->_options['packagingroot'])) {
- $regdir = $this->_prependPath(
- $this->config->get('php_dir', null, 'pear.php.net'),
- $this->_options['packagingroot']);
-
- $packrootphp_dir = $this->_prependPath(
- $this->config->get('php_dir', null, $channel),
- $this->_options['packagingroot']);
- }
-
- if (isset($options['installroot'])) {
- $this->config->setInstallRoot($options['installroot']);
- $this->_registry = &$this->config->getRegistry();
- $installregistry = &$this->_registry;
- $this->installroot = ''; // all done automagically now
- $php_dir = $this->config->get('php_dir', null, $channel);
- } else {
- $this->config->setInstallRoot(false);
- $this->_registry = &$this->config->getRegistry();
- if (isset($this->_options['packagingroot'])) {
- $installregistry = new PEAR_Registry($regdir);
- if (!$installregistry->channelExists($channel, true)) {
- // we need to fake a channel-discover of this channel
- $chanobj = $this->_registry->getChannel($channel, true);
- $installregistry->addChannel($chanobj);
- }
- $php_dir = $packrootphp_dir;
- } else {
- $installregistry = &$this->_registry;
- $php_dir = $this->config->get('php_dir', null, $channel);
- }
- $this->installroot = '';
- }
-
- // {{{ checks to do when not in "force" mode
- if (empty($options['force']) &&
- (file_exists($this->config->get('php_dir')) &&
- is_dir($this->config->get('php_dir')))) {
- $testp = $channel == 'pear.php.net' ? $pkgname : array($channel, $pkgname);
- $instfilelist = $pkg->getInstallationFileList(true);
- if (PEAR::isError($instfilelist)) {
- return $instfilelist;
- }
-
- // ensure we have the most accurate registry
- $installregistry->flushFileMap();
- $test = $installregistry->checkFileMap($instfilelist, $testp, '1.1');
- if (PEAR::isError($test)) {
- return $test;
- }
-
- if (sizeof($test)) {
- $pkgs = $this->getInstallPackages();
- $found = false;
- foreach ($pkgs as $param) {
- if ($pkg->isSubpackageOf($param)) {
- $found = true;
- break;
- }
- }
-
- if ($found) {
- // subpackages can conflict with earlier versions of parent packages
- $parentreg = $installregistry->packageInfo($param->getPackage(), null, $param->getChannel());
- $tmp = $test;
- foreach ($tmp as $file => $info) {
- if (is_array($info)) {
- if (strtolower($info[1]) == strtolower($param->getPackage()) &&
- strtolower($info[0]) == strtolower($param->getChannel())
- ) {
- if (isset($parentreg['filelist'][$file])) {
- unset($parentreg['filelist'][$file]);
- } else{
- $pos = strpos($file, '/');
- $basedir = substr($file, 0, $pos);
- $file2 = substr($file, $pos + 1);
- if (isset($parentreg['filelist'][$file2]['baseinstalldir'])
- && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir
- ) {
- unset($parentreg['filelist'][$file2]);
- }
- }
-
- unset($test[$file]);
- }
- } else {
- if (strtolower($param->getChannel()) != 'pear.php.net') {
- continue;
- }
-
- if (strtolower($info) == strtolower($param->getPackage())) {
- if (isset($parentreg['filelist'][$file])) {
- unset($parentreg['filelist'][$file]);
- } else{
- $pos = strpos($file, '/');
- $basedir = substr($file, 0, $pos);
- $file2 = substr($file, $pos + 1);
- if (isset($parentreg['filelist'][$file2]['baseinstalldir'])
- && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir
- ) {
- unset($parentreg['filelist'][$file2]);
- }
- }
-
- unset($test[$file]);
- }
- }
- }
-
- $pfk = new PEAR_PackageFile($this->config);
- $parentpkg = &$pfk->fromArray($parentreg);
- $installregistry->updatePackage2($parentpkg);
- }
-
- if ($param->getChannel() == 'pecl.php.net' && isset($options['upgrade'])) {
- $tmp = $test;
- foreach ($tmp as $file => $info) {
- if (is_string($info)) {
- // pear.php.net packages are always stored as strings
- if (strtolower($info) == strtolower($param->getPackage())) {
- // upgrading existing package
- unset($test[$file]);
- }
- }
- }
- }
-
- if (count($test)) {
- $msg = "$channel/$pkgname: conflicting files found:\n";
- $longest = max(array_map("strlen", array_keys($test)));
- $fmt = "%${longest}s (%s)\n";
- foreach ($test as $file => $info) {
- if (!is_array($info)) {
- $info = array('pear.php.net', $info);
- }
- $info = $info[0] . '/' . $info[1];
- $msg .= sprintf($fmt, $file, $info);
- }
-
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($msg);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "WARNING: $msg");
- }
- }
- }
- }
- // }}}
-
- $this->startFileTransaction();
-
- $usechannel = $channel;
- if ($channel == 'pecl.php.net') {
- $test = $installregistry->packageExists($pkgname, $channel);
- if (!$test) {
- $test = $installregistry->packageExists($pkgname, 'pear.php.net');
- $usechannel = 'pear.php.net';
- }
- } else {
- $test = $installregistry->packageExists($pkgname, $channel);
- }
-
- if (empty($options['upgrade']) && empty($options['soft'])) {
- // checks to do only when installing new packages
- if (empty($options['force']) && $test) {
- return $this->raiseError("$channel/$pkgname is already installed");
- }
- } else {
- // Upgrade
- if ($test) {
- $v1 = $installregistry->packageInfo($pkgname, 'version', $usechannel);
- $v2 = $pkg->getVersion();
- $cmp = version_compare("$v1", "$v2", 'gt');
- if (empty($options['force']) && !version_compare("$v2", "$v1", 'gt')) {
- return $this->raiseError("upgrade to a newer version ($v2 is not newer than $v1)");
- }
- }
- }
-
- // Do cleanups for upgrade and install, remove old release's files first
- if ($test && empty($options['register-only'])) {
- // when upgrading, remove old release's files first:
- if (PEAR::isError($err = $this->_deletePackageFiles($pkgname, $usechannel,
- true))) {
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($err);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: ' . $err->getMessage());
- }
- } else {
- $backedup = $err;
- }
- }
-
- // {{{ Copy files to dest dir ---------------------------------------
-
- // info from the package it self we want to access from _installFile
- $this->pkginfo = &$pkg;
- // used to determine whether we should build any C code
- $this->source_files = 0;
-
- $savechannel = $this->config->get('default_channel');
- if (empty($options['register-only']) && !is_dir($php_dir)) {
- if (PEAR::isError(System::mkdir(array('-p'), $php_dir))) {
- return $this->raiseError("no installation destination directory '$php_dir'\n");
- }
- }
-
- if (substr($pkgfile, -4) != '.xml') {
- $tmpdir .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion();
- }
-
- $this->configSet('default_channel', $channel);
- // {{{ install files
-
- $ver = $pkg->getPackagexmlVersion();
- if (version_compare($ver, '2.0', '>=')) {
- $filelist = $pkg->getInstallationFilelist();
- } else {
- $filelist = $pkg->getFileList();
- }
-
- if (PEAR::isError($filelist)) {
- return $filelist;
- }
-
- $p = &$installregistry->getPackage($pkgname, $channel);
- $dirtree = (empty($options['register-only']) && $p) ? $p->getDirTree() : false;
-
- $pkg->resetFilelist();
- $pkg->setLastInstalledVersion($installregistry->packageInfo($pkg->getPackage(),
- 'version', $pkg->getChannel()));
- foreach ($filelist as $file => $atts) {
- $this->expectError(PEAR_INSTALLER_FAILED);
- if ($pkg->getPackagexmlVersion() == '1.0') {
- $res = $this->_installFile($file, $atts, $tmpdir, $options);
- } else {
- $res = $this->_installFile2($pkg, $file, $atts, $tmpdir, $options);
- }
- $this->popExpect();
-
- if (PEAR::isError($res)) {
- if (empty($options['ignore-errors'])) {
- $this->rollbackFileTransaction();
- if ($res->getMessage() == "file does not exist") {
- $this->raiseError("file $file in package.xml does not exist");
- }
-
- return $this->raiseError($res);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, "Warning: " . $res->getMessage());
- }
- }
-
- $real = isset($atts['attribs']) ? $atts['attribs'] : $atts;
- if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') {
- // Register files that were installed
- $pkg->installedFile($file, $atts);
- }
- }
- // }}}
-
- // {{{ compile and install source files
- if ($this->source_files > 0 && empty($options['nobuild'])) {
- if (PEAR::isError($err =
- $this->_compileSourceFiles($savechannel, $pkg))) {
- return $err;
- }
- }
- // }}}
-
- if (isset($backedup)) {
- $this->_removeBackups($backedup);
- }
-
- if (!$this->commitFileTransaction()) {
- $this->rollbackFileTransaction();
- $this->configSet('default_channel', $savechannel);
- return $this->raiseError("commit failed", PEAR_INSTALLER_FAILED);
- }
- // }}}
-
- $ret = false;
- $installphase = 'install';
- $oldversion = false;
- // {{{ Register that the package is installed -----------------------
- if (empty($options['upgrade'])) {
- // if 'force' is used, replace the info in registry
- $usechannel = $channel;
- if ($channel == 'pecl.php.net') {
- $test = $installregistry->packageExists($pkgname, $channel);
- if (!$test) {
- $test = $installregistry->packageExists($pkgname, 'pear.php.net');
- $usechannel = 'pear.php.net';
- }
- } else {
- $test = $installregistry->packageExists($pkgname, $channel);
- }
-
- if (!empty($options['force']) && $test) {
- $oldversion = $installregistry->packageInfo($pkgname, 'version', $usechannel);
- $installregistry->deletePackage($pkgname, $usechannel);
- }
- $ret = $installregistry->addPackage2($pkg);
- } else {
- if ($dirtree) {
- $this->startFileTransaction();
- // attempt to delete empty directories
- uksort($dirtree, array($this, '_sortDirs'));
- foreach($dirtree as $dir => $notused) {
- $this->addFileOperation('rmdir', array($dir));
- }
- $this->commitFileTransaction();
- }
-
- $usechannel = $channel;
- if ($channel == 'pecl.php.net') {
- $test = $installregistry->packageExists($pkgname, $channel);
- if (!$test) {
- $test = $installregistry->packageExists($pkgname, 'pear.php.net');
- $usechannel = 'pear.php.net';
- }
- } else {
- $test = $installregistry->packageExists($pkgname, $channel);
- }
-
- // new: upgrade installs a package if it isn't installed
- if (!$test) {
- $ret = $installregistry->addPackage2($pkg);
- } else {
- if ($usechannel != $channel) {
- $installregistry->deletePackage($pkgname, $usechannel);
- $ret = $installregistry->addPackage2($pkg);
- } else {
- $ret = $installregistry->updatePackage2($pkg);
- }
- $installphase = 'upgrade';
- }
- }
-
- if (!$ret) {
- $this->configSet('default_channel', $savechannel);
- return $this->raiseError("Adding package $channel/$pkgname to registry failed");
- }
- // }}}
-
- $this->configSet('default_channel', $savechannel);
- if (class_exists('PEAR_Task_Common')) { // this is auto-included if any tasks exist
- if (PEAR_Task_Common::hasPostinstallTasks()) {
- PEAR_Task_Common::runPostinstallTasks($installphase);
- }
- }
-
- return $pkg->toArray(true);
- }
-
- // }}}
-
- // {{{ _compileSourceFiles()
- /**
- * @param string
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- function _compileSourceFiles($savechannel, &$filelist)
- {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Builder.php';
- $this->log(1, "$this->source_files source files, building");
- $bob = new PEAR_Builder($this->ui);
- $bob->debug = $this->debug;
- $built = $bob->build($filelist, array(&$this, '_buildCallback'));
- if (PEAR::isError($built)) {
- $this->rollbackFileTransaction();
- $this->configSet('default_channel', $savechannel);
- return $built;
- }
-
- $this->log(1, "\nBuild process completed successfully");
- foreach ($built as $ext) {
- $bn = basename($ext['file']);
- list($_ext_name, $_ext_suff) = explode('.', $bn);
- if ($_ext_suff == '.so' || $_ext_suff == '.dll') {
- if (extension_loaded($_ext_name)) {
- $this->raiseError("Extension '$_ext_name' already loaded. " .
- 'Please unload it in your php.ini file ' .
- 'prior to install or upgrade');
- }
- $role = 'ext';
- } else {
- $role = 'src';
- }
-
- $dest = $ext['dest'];
- $packagingroot = '';
- if (isset($this->_options['packagingroot'])) {
- $packagingroot = $this->_options['packagingroot'];
- }
-
- $copyto = $this->_prependPath($dest, $packagingroot);
- $extra = $copyto != $dest ? " as '$copyto'" : '';
- $this->log(1, "Installing '$dest'$extra");
-
- $copydir = dirname($copyto);
- // pretty much nothing happens if we are only registering the install
- if (empty($this->_options['register-only'])) {
- if (!file_exists($copydir) || !is_dir($copydir)) {
- if (!$this->mkDirHier($copydir)) {
- return $this->raiseError("failed to mkdir $copydir",
- PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ mkdir $copydir");
- }
-
- if (!@copy($ext['file'], $copyto)) {
- return $this->raiseError("failed to write $copyto ($php_errormsg)", PEAR_INSTALLER_FAILED);
- }
-
- $this->log(3, "+ cp $ext[file] $copyto");
- $this->addFileOperation('rename', array($ext['file'], $copyto));
- if (!OS_WINDOWS) {
- $mode = 0666 & ~(int)octdec($this->config->get('umask'));
- $this->addFileOperation('chmod', array($mode, $copyto));
- if (!@chmod($copyto, $mode)) {
- $this->log(0, "failed to change mode of $copyto ($php_errormsg)");
- }
- }
- }
-
-
- $data = array(
- 'role' => $role,
- 'name' => $bn,
- 'installed_as' => $dest,
- 'php_api' => $ext['php_api'],
- 'zend_mod_api' => $ext['zend_mod_api'],
- 'zend_ext_api' => $ext['zend_ext_api'],
- );
-
- if ($filelist->getPackageXmlVersion() == '1.0') {
- $filelist->installedFile($bn, $data);
- } else {
- $filelist->installedFile($bn, array('attribs' => $data));
- }
- }
- }
-
- // }}}
- function &getUninstallPackages()
- {
- return $this->_downloadedPackages;
- }
- // {{{ uninstall()
-
- /**
- * Uninstall a package
- *
- * This method removes all files installed by the application, and then
- * removes any empty directories.
- * @param string package name
- * @param array Command-line options. Possibilities include:
- *
- * - installroot: base installation dir, if not the default
- * - register-only : update registry but don't remove files
- * - nodeps: do not process dependencies of other packages to ensure
- * uninstallation does not break things
- */
- function uninstall($package, $options = array())
- {
- $installRoot = isset($options['installroot']) ? $options['installroot'] : '';
- $this->config->setInstallRoot($installRoot);
-
- $this->installroot = '';
- $this->_registry = &$this->config->getRegistry();
- if (is_object($package)) {
- $channel = $package->getChannel();
- $pkg = $package;
- $package = $pkg->getPackage();
- } else {
- $pkg = false;
- $info = $this->_registry->parsePackageName($package,
- $this->config->get('default_channel'));
- $channel = $info['channel'];
- $package = $info['package'];
- }
-
- $savechannel = $this->config->get('default_channel');
- $this->configSet('default_channel', $channel);
- if (!is_object($pkg)) {
- $pkg = $this->_registry->getPackage($package, $channel);
- }
-
- if (!$pkg) {
- $this->configSet('default_channel', $savechannel);
- return $this->raiseError($this->_registry->parsedPackageNameToString(
- array(
- 'channel' => $channel,
- 'package' => $package
- ), true) . ' not installed');
- }
-
- if ($pkg->getInstalledBinary()) {
- // this is just an alias for a binary package
- return $this->_registry->deletePackage($package, $channel);
- }
-
- $filelist = $pkg->getFilelist();
- PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
-
- $depchecker = new PEAR_Dependency2($this->config, $options,
- array('channel' => $channel, 'package' => $package),
- PEAR_VALIDATE_UNINSTALLING);
- $e = $depchecker->validatePackageUninstall($this);
- PEAR::staticPopErrorHandling();
- if (PEAR::isError($e)) {
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($e);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: ' . $e->getMessage());
- }
- } elseif (is_array($e)) {
- if (!isset($options['soft'])) {
- $this->log(0, $e[0]);
- }
- }
-
- $this->pkginfo = &$pkg;
- // pretty much nothing happens if we are only registering the uninstall
- if (empty($options['register-only'])) {
- // {{{ Delete the files
- $this->startFileTransaction();
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) {
- PEAR::popErrorHandling();
- $this->rollbackFileTransaction();
- $this->configSet('default_channel', $savechannel);
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError($err);
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: ' . $err->getMessage());
- }
- } else {
- PEAR::popErrorHandling();
- }
-
- if (!$this->commitFileTransaction()) {
- $this->rollbackFileTransaction();
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("uninstall failed");
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: uninstall failed');
- }
- } else {
- $this->startFileTransaction();
- $dirtree = $pkg->getDirTree();
- if ($dirtree === false) {
- $this->configSet('default_channel', $savechannel);
- return $this->_registry->deletePackage($package, $channel);
- }
-
- // attempt to delete empty directories
- uksort($dirtree, array($this, '_sortDirs'));
- foreach($dirtree as $dir => $notused) {
- $this->addFileOperation('rmdir', array($dir));
- }
-
- if (!$this->commitFileTransaction()) {
- $this->rollbackFileTransaction();
- if (!isset($options['ignore-errors'])) {
- return $this->raiseError("uninstall failed");
- }
-
- if (!isset($options['soft'])) {
- $this->log(0, 'WARNING: uninstall failed');
- }
- }
- }
- // }}}
- }
-
- $this->configSet('default_channel', $savechannel);
- // Register that the package is no longer installed
- return $this->_registry->deletePackage($package, $channel);
- }
-
- /**
- * Sort a list of arrays of array(downloaded packagefilename) by dependency.
- *
- * It also removes duplicate dependencies
- * @param array an array of PEAR_PackageFile_v[1/2] objects
- * @return array|PEAR_Error array of array(packagefilename, package.xml contents)
- */
- function sortPackagesForUninstall(&$packages)
- {
- $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->config);
- if (PEAR::isError($this->_dependencyDB)) {
- return $this->_dependencyDB;
- }
- usort($packages, array(&$this, '_sortUninstall'));
- }
-
- function _sortUninstall($a, $b)
- {
- if (!$a->getDeps() && !$b->getDeps()) {
- return 0; // neither package has dependencies, order is insignificant
- }
- if ($a->getDeps() && !$b->getDeps()) {
- return -1; // $a must be installed after $b because $a has dependencies
- }
- if (!$a->getDeps() && $b->getDeps()) {
- return 1; // $b must be installed after $a because $b has dependencies
- }
- // both packages have dependencies
- if ($this->_dependencyDB->dependsOn($a, $b)) {
- return -1;
- }
- if ($this->_dependencyDB->dependsOn($b, $a)) {
- return 1;
- }
- return 0;
- }
-
- // }}}
- // {{{ _sortDirs()
- function _sortDirs($a, $b)
- {
- if (strnatcmp($a, $b) == -1) return 1;
- if (strnatcmp($a, $b) == 1) return -1;
- return 0;
- }
-
- // }}}
-
- // {{{ _buildCallback()
-
- function _buildCallback($what, $data)
- {
- if (($what == 'cmdoutput' && $this->debug > 1) ||
- ($what == 'output' && $this->debug > 0)) {
- $this->ui->outputData(rtrim($data), 'build');
- }
- }
-
- // }}}
-}
-<?php
-/**
- * PEAR_Installer_Role
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * base class for installer roles
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Installer/Role/Common.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role
-{
- /**
- * Set up any additional configuration variables that file roles require
- *
- * Never call this directly, it is called by the PEAR_Config constructor
- * @param PEAR_Config
- * @access private
- * @static
- */
- function initializeConfig(&$config)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $class => $info) {
- if (!$info['config_vars']) {
- continue;
- }
-
- $config->_addConfigVars($class, $info['config_vars']);
- }
- }
-
- /**
- * @param PEAR_PackageFile_v2
- * @param string role name
- * @param PEAR_Config
- * @return PEAR_Installer_Role_Common
- * @static
- */
- function &factory($pkg, $role, &$config)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- if (!in_array($role, PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) {
- $a = false;
- return $a;
- }
-
- $a = 'PEAR_Installer_Role_' . ucfirst($role);
- if (!class_exists($a)) {
- require_once 'phar://install-pear-nozlib.phar/' . str_replace('_', '/', $a) . '.php';
- }
-
- $b = new $a($config);
- return $b;
- }
-
- /**
- * Get a list of file roles that are valid for the particular release type.
- *
- * For instance, src files serve no purpose in regular php releases.
- * @param string
- * @param bool clear cache
- * @return array
- * @static
- */
- function getValidRoles($release, $clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret = array();
- if ($clear) {
- $ret = array();
- }
-
- if (isset($ret[$release])) {
- return $ret[$release];
- }
-
- $ret[$release] = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if (in_array($release, $okreleases['releasetypes'])) {
- $ret[$release][] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret[$release];
- }
-
- /**
- * Get a list of roles that require their files to be installed
- *
- * Most roles must be installed, but src and package roles, for instance
- * are pseudo-roles. src files are compiled into a new extension. Package
- * roles are actually fully bundled releases of a package
- * @param bool clear cache
- * @return array
- * @static
- */
- function getInstallableRoles($clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret;
- if ($clear) {
- unset($ret);
- }
-
- if (isset($ret)) {
- return $ret;
- }
-
- $ret = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if ($okreleases['installable']) {
- $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret;
- }
-
- /**
- * Return an array of roles that are affected by the baseinstalldir attribute
- *
- * Most roles ignore this attribute, and instead install directly into:
- * PackageName/filepath
- * so a tests file tests/file.phpt is installed into PackageName/tests/filepath.php
- * @param bool clear cache
- * @return array
- * @static
- */
- function getBaseinstallRoles($clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret;
- if ($clear) {
- unset($ret);
- }
-
- if (isset($ret)) {
- return $ret;
- }
-
- $ret = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if ($okreleases['honorsbaseinstall']) {
- $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret;
- }
-
- /**
- * Return an array of file roles that should be analyzed for PHP content at package time,
- * like the "php" role.
- * @param bool clear cache
- * @return array
- * @static
- */
- function getPhpRoles($clear = false)
- {
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
- PEAR_Installer_Role::registerRoles();
- }
-
- static $ret;
- if ($clear) {
- unset($ret);
- }
-
- if (isset($ret)) {
- return $ret;
- }
-
- $ret = array();
- foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
- if ($okreleases['phpfile']) {
- $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
- }
- }
-
- return $ret;
- }
-
- /**
- * Scan through the Command directory looking for classes
- * and see what commands they implement.
- * @param string which directory to look for classes, defaults to
- * the Installer/Roles subdirectory of
- * the directory from where this file (__FILE__) is
- * included.
- *
- * @return bool TRUE on success, a PEAR error on failure
- * @access public
- * @static
- */
- function registerRoles($dir = null)
- {
- $GLOBALS['_PEAR_INSTALLER_ROLES'] = array();
- $parser = new PEAR_XMLParser;
- if ($dir === null) {
- $dir = dirname(__FILE__) . '/Role';
- }
-
- if (!file_exists($dir) || !is_dir($dir)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory");
- }
-
- $dp = @opendir($dir);
- if (empty($dp)) {
- return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg");
- }
-
- while ($entry = readdir($dp)) {
- if ($entry{0} == '.' || substr($entry, -4) != '.xml') {
- continue;
- }
-
- $class = "PEAR_Installer_Role_".substr($entry, 0, -4);
- // List of roles
- if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'][$class])) {
- $file = "$dir/$entry";
- $parser->parse(file_get_contents($file));
- $data = $parser->getData();
- if (!is_array($data['releasetypes'])) {
- $data['releasetypes'] = array($data['releasetypes']);
- }
-
- $GLOBALS['_PEAR_INSTALLER_ROLES'][$class] = $data;
- }
- }
-
- closedir($dp);
- ksort($GLOBALS['_PEAR_INSTALLER_ROLES']);
- PEAR_Installer_Role::getBaseinstallRoles(true);
- PEAR_Installer_Role::getInstallableRoles(true);
- PEAR_Installer_Role::getPhpRoles(true);
- PEAR_Installer_Role::getValidRoles('****', true);
- return true;
- }
-}<?php
-/**
- * Base class for all installation roles.
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class for all installation roles.
- *
- * This class allows extensibility of file roles. Packages with complex
- * customization can now provide custom file roles along with the possibility of
- * adding configuration values to match.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Common
-{
- /**
- * @var PEAR_Config
- * @access protected
- */
- var $config;
-
- /**
- * @param PEAR_Config
- */
- function __construct(&$config)
- {
- $this->config = $config;
- }
-
- /**
- * Retrieve configuration information about a file role from its XML info
- *
- * @param string $role Role Classname, as in "PEAR_Installer_Role_Data"
- * @return array
- */
- function getInfo($role)
- {
- if (empty($GLOBALS['_PEAR_INSTALLER_ROLES'][$role])) {
- return PEAR::raiseError('Unknown Role class: "' . $role . '"');
- }
- return $GLOBALS['_PEAR_INSTALLER_ROLES'][$role];
- }
-
- /**
- * This is called for each file to set up the directories and files
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param array attributes from the <file> tag
- * @param string file name
- * @return array an array consisting of:
- *
- * 1 the original, pre-baseinstalldir installation directory
- * 2 the final installation directory
- * 3 the full path to the final location of the file
- * 4 the location of the pre-installation file
- */
- function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null)
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- if (!$roleInfo['locationconfig']) {
- return false;
- }
- if ($roleInfo['honorsbaseinstall']) {
- $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], $layer,
- $pkg->getChannel());
- if (!empty($atts['baseinstalldir'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
- }
- } elseif ($roleInfo['unusualbaseinstall']) {
- $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'],
- $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage();
- if (!empty($atts['baseinstalldir'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
- }
- } else {
- $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'],
- $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage();
- }
- if (dirname($file) != '.' && empty($atts['install-as'])) {
- $dest_dir .= DIRECTORY_SEPARATOR . dirname($file);
- }
- if (empty($atts['install-as'])) {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file);
- } else {
- $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as'];
- }
- $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file;
-
- // Clean up the DIRECTORY_SEPARATOR mess
- $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;
-
- list($dest_dir, $dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"),
- array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR,
- DIRECTORY_SEPARATOR),
- array($dest_dir, $dest_file, $orig_file));
- return array($save_destdir, $dest_dir, $dest_file, $orig_file);
- }
-
- /**
- * Get the name of the configuration variable that specifies the location of this file
- * @return string|false
- */
- function getLocationConfig()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['locationconfig'];
- }
-
- /**
- * Do any unusual setup here
- * @param PEAR_Installer
- * @param PEAR_PackageFile_v2
- * @param array file attributes
- * @param string file name
- */
- function setup(&$installer, $pkg, $atts, $file)
- {
- }
-
- function isExecutable()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['executable'];
- }
-
- function isInstallable()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['installable'];
- }
-
- function isExtension()
- {
- $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' .
- ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this)))));
- if (PEAR::isError($roleInfo)) {
- return $roleInfo;
- }
- return $roleInfo['phpextension'];
- }
-}
-?>
-<?php
-/**
- * PEAR_Installer_Role_Data
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {}
-?><role version="1.0">
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>data_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role><?php
-/**
- * PEAR_Installer_Role_Doc
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {}
-?><role version="1.0">
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>doc_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role><?php
-/**
- * PEAR_Installer_Role_Php
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {}
-?><role version="1.0">
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>php_dir</locationconfig>
- <honorsbaseinstall>1</honorsbaseinstall>
- <unusualbaseinstall />
- <phpfile>1</phpfile>
- <executable />
- <phpextension />
- <config_vars />
-</role><?php
-/**
- * PEAR_Installer_Role_Script
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {}
-?><role version="1.0">
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>bin_dir</locationconfig>
- <honorsbaseinstall>1</honorsbaseinstall>
- <unusualbaseinstall />
- <phpfile />
- <executable>1</executable>
- <phpextension />
- <config_vars />
-</role><?php
-/**
- * PEAR_Installer_Role_Test
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {}
-?><role version="1.0">
- <releasetypes>php</releasetypes>
- <releasetypes>extsrc</releasetypes>
- <releasetypes>extbin</releasetypes>
- <releasetypes>zendextsrc</releasetypes>
- <releasetypes>zendextbin</releasetypes>
- <installable>1</installable>
- <locationconfig>test_dir</locationconfig>
- <honorsbaseinstall />
- <unusualbaseinstall />
- <phpfile />
- <executable />
- <phpextension />
- <config_vars />
-</role><?php
-/**
- * PEAR_PackageFile, package.xml parsing utility class
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * needed for PEAR_VALIDATE_* constants
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
-/**
- * Error code if the package.xml <package> tag does not contain a valid version
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION', 1);
-/**
- * Error code if the package.xml <package> tag version is not supported (version 1.0 and 1.1 are the only supported versions,
- * currently
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2);
-/**
- * Abstraction for the package.xml package description file
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile
-{
- /**
- * @var PEAR_Config
- */
- var $_config;
- var $_debug;
-
- var $_logger = false;
- /**
- * @var boolean
- */
- var $_rawReturn = false;
-
- /**
- * helper for extracting Archive_Tar errors
- * @var array
- * @access private
- */
- var $_extractErrors = array();
-
- /**
- *
- * @param PEAR_Config $config
- * @param ? $debug
- * @param string @tmpdir Optional temporary directory for uncompressing
- * files
- */
- function __construct(&$config, $debug = false)
- {
- $this->_config = $config;
- $this->_debug = $debug;
- }
-
- /**
- * Turn off validation - return a parsed package.xml without checking it
- *
- * This is used by the package-validate command
- */
- function rawReturn()
- {
- $this->_rawReturn = true;
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
-
- /**
- * Create a PEAR_PackageFile_Parser_v* of a given version.
- * @param int $version
- * @return PEAR_PackageFile_Parser_v1|PEAR_PackageFile_Parser_v1
- */
- function &parserFactory($version)
- {
- if (!in_array($version{0}, array('1', '2'))) {
- $a = false;
- return $a;
- }
-
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/Parser/v' . $version{0} . '.php';
- $version = $version{0};
- $class = "PEAR_PackageFile_Parser_v$version";
- $a = new $class;
- return $a;
- }
-
- /**
- * For simpler unit-testing
- * @return string
- */
- function getClassPrefix()
- {
- return 'PEAR_PackageFile_v';
- }
-
- /**
- * Create a PEAR_PackageFile_v* of a given version.
- * @param int $version
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v1
- */
- function &factory($version)
- {
- if (!in_array($version{0}, array('1', '2'))) {
- $a = false;
- return $a;
- }
-
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v' . $version{0} . '.php';
- $version = $version{0};
- $class = $this->getClassPrefix() . $version;
- $a = new $class;
- return $a;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from its toArray() method
- *
- * WARNING: no validation is performed, the array is assumed to be valid,
- * always parse from xml if you want validation.
- * @param array $arr
- * @return PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2
- * @uses factory() to construct the returned object.
- */
- function &fromArray($arr)
- {
- if (isset($arr['xsdversion'])) {
- $obj = &$this->factory($arr['xsdversion']);
- if ($this->_logger) {
- $obj->setLogger($this->_logger);
- }
-
- $obj->setConfig($this->_config);
- $obj->fromArray($arr);
- return $obj;
- }
-
- if (isset($arr['package']['attribs']['version'])) {
- $obj = &$this->factory($arr['package']['attribs']['version']);
- } else {
- $obj = &$this->factory('1.0');
- }
-
- if ($this->_logger) {
- $obj->setLogger($this->_logger);
- }
-
- $obj->setConfig($this->_config);
- $obj->fromArray($arr);
- return $obj;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from an XML string.
- * @access public
- * @param string $data contents of package.xml file
- * @param int $state package state (one of PEAR_VALIDATE_* constants)
- * @param string $file full path to the package.xml file (and the files
- * it references)
- * @param string $archive optional name of the archive that the XML was
- * extracted from, if any
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @uses parserFactory() to construct a parser to load the package.
- */
- function &fromXmlString($data, $state, $file, $archive = false)
- {
- if (preg_match('/<package[^>]+version=[\'"]([0-9]+\.[0-9]+)[\'"]/', $data, $packageversion)) {
- if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) {
- return PEAR::raiseError('package.xml version "' . $packageversion[1] .
- '" is not supported, only 1.0, 2.0, and 2.1 are supported.');
- }
-
- $object = &$this->parserFactory($packageversion[1]);
- if ($this->_logger) {
- $object->setLogger($this->_logger);
- }
-
- $object->setConfig($this->_config);
- $pf = $object->parse($data, $file, $archive);
- if (PEAR::isError($pf)) {
- return $pf;
- }
-
- if ($this->_rawReturn) {
- return $pf;
- }
-
- if (!$pf->validate($state)) {;
- if ($this->_config->get('verbose') > 0
- && $this->_logger && $pf->getValidationWarnings(false)
- ) {
- foreach ($pf->getValidationWarnings(false) as $warning) {
- $this->_logger->log(0, 'ERROR: ' . $warning['message']);
- }
- }
-
- $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed',
- 2, null, null, $pf->getValidationWarnings());
- return $a;
- }
-
- if ($this->_logger && $pf->getValidationWarnings(false)) {
- foreach ($pf->getValidationWarnings() as $warning) {
- $this->_logger->log(0, 'WARNING: ' . $warning['message']);
- }
- }
-
- if (method_exists($pf, 'flattenFilelist')) {
- $pf->flattenFilelist(); // for v2
- }
-
- return $pf;
- } elseif (preg_match('/<package[^>]+version=[\'"]([^"\']+)[\'"]/', $data, $packageversion)) {
- $a = PEAR::raiseError('package.xml file "' . $file .
- '" has unsupported package.xml <package> version "' . $packageversion[1] . '"');
- return $a;
- } else {
- if (!class_exists('PEAR_ErrorStack')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ErrorStack.php';
- }
-
- PEAR_ErrorStack::staticPush('PEAR_PackageFile',
- PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION,
- 'warning', array('xml' => $data), 'package.xml "' . $file .
- '" has no package.xml <package> version');
- $object = &$this->parserFactory('1.0');
- $object->setConfig($this->_config);
- $pf = $object->parse($data, $file, $archive);
- if (PEAR::isError($pf)) {
- return $pf;
- }
-
- if ($this->_rawReturn) {
- return $pf;
- }
-
- if (!$pf->validate($state)) {
- $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed',
- 2, null, null, $pf->getValidationWarnings());
- return $a;
- }
-
- if ($this->_logger && $pf->getValidationWarnings(false)) {
- foreach ($pf->getValidationWarnings() as $warning) {
- $this->_logger->log(0, 'WARNING: ' . $warning['message']);
- }
- }
-
- if (method_exists($pf, 'flattenFilelist')) {
- $pf->flattenFilelist(); // for v2
- }
-
- return $pf;
- }
- }
-
- /**
- * Register a temporary file or directory. When the destructor is
- * executed, all registered temporary files and directories are
- * removed.
- *
- * @param string $file name of file or directory
- * @return void
- */
- function addTempFile($file)
- {
- $GLOBALS['_PEAR_Common_tempfiles'][] = $file;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from a compresed Tar or Tgz file.
- * @access public
- * @param string contents of package.xml file
- * @param int package state (one of PEAR_VALIDATE_* constants)
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @using Archive_Tar to extract the files
- * @using fromPackageFile() to load the package after the package.xml
- * file is extracted.
- */
- function &fromTgzFile($file, $state)
- {
- if (!class_exists('Archive_Tar')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'Archive/Tar.php';
- }
-
- $tar = new Archive_Tar($file);
- if ($this->_debug <= 1) {
- $tar->pushErrorHandling(PEAR_ERROR_RETURN);
- }
-
- $content = $tar->listContent();
- if ($this->_debug <= 1) {
- $tar->popErrorHandling();
- }
-
- if (!is_array($content)) {
- if (is_string($file) && strlen($file < 255) &&
- (!file_exists($file) || !@is_file($file))) {
- $ret = PEAR::raiseError("could not open file \"$file\"");
- return $ret;
- }
-
- $file = realpath($file);
- $ret = PEAR::raiseError("Could not get contents of package \"$file\"".
- '. Invalid tgz file.');
- return $ret;
- }
-
- if (!count($content) && !@is_file($file)) {
- $ret = PEAR::raiseError("could not open file \"$file\"");
- return $ret;
- }
-
- $xml = null;
- $origfile = $file;
- foreach ($content as $file) {
- $name = $file['filename'];
- if ($name == 'package2.xml') { // allow a .tgz to distribute both versions
- $xml = $name;
- break;
- }
-
- if ($name == 'package.xml') {
- $xml = $name;
- break;
- } elseif (preg_match('/package.xml$/', $name, $match)) {
- $xml = $name;
- break;
- }
- }
-
- $tmpdir = System::mktemp('-t "' . $this->_config->get('temp_dir') . '" -d pear');
- if ($tmpdir === false) {
- $ret = PEAR::raiseError("there was a problem with getting the configured temp directory");
- return $ret;
- }
-
- PEAR_PackageFile::addTempFile($tmpdir);
-
- $this->_extractErrors();
- PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors'));
-
- if (!$xml || !$tar->extractList(array($xml), $tmpdir)) {
- $extra = implode("\n", $this->_extractErrors());
- if ($extra) {
- $extra = ' ' . $extra;
- }
-
- PEAR::staticPopErrorHandling();
- $ret = PEAR::raiseError('could not extract the package.xml file from "' .
- $origfile . '"' . $extra);
- return $ret;
- }
-
- PEAR::staticPopErrorHandling();
- $ret = &PEAR_PackageFile::fromPackageFile("$tmpdir/$xml", $state, $origfile);
- return $ret;
- }
-
- /**
- * helper callback for extracting Archive_Tar errors
- *
- * @param PEAR_Error|null $err
- * @return array
- * @access private
- */
- function _extractErrors($err = null)
- {
- static $errors = array();
- if ($err === null) {
- $e = $errors;
- $errors = array();
- return $e;
- }
- $errors[] = $err->getMessage();
- }
-
- /**
- * Create a PEAR_PackageFile_v* from a package.xml file.
- *
- * @access public
- * @param string $descfile name of package xml file
- * @param int $state package state (one of PEAR_VALIDATE_* constants)
- * @param string|false $archive name of the archive this package.xml came
- * from, if any
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @uses PEAR_PackageFile::fromXmlString to create the oject after the
- * XML is loaded from the package.xml file.
- */
- function &fromPackageFile($descfile, $state, $archive = false)
- {
- $fp = false;
- if (is_string($descfile) && strlen($descfile) < 255 &&
- (
- !file_exists($descfile) || !is_file($descfile) || !is_readable($descfile)
- || (!$fp = @fopen($descfile, 'r'))
- )
- ) {
- $a = PEAR::raiseError("Unable to open $descfile");
- return $a;
- }
-
- // read the whole thing so we only get one cdata callback
- // for each block of cdata
- fclose($fp);
- $data = file_get_contents($descfile);
- $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive);
- return $ret;
- }
-
- /**
- * Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file.
- *
- * This method is able to extract information about a package from a .tgz
- * archive or from a XML package definition file.
- *
- * @access public
- * @param string $info file name
- * @param int $state package state (one of PEAR_VALIDATE_* constants)
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @uses fromPackageFile() if the file appears to be XML
- * @uses fromTgzFile() to load all non-XML files
- */
- function &fromAnyFile($info, $state)
- {
- if (is_dir($info)) {
- $dir_name = realpath($info);
- if (file_exists($dir_name . '/package.xml')) {
- $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state);
- } elseif (file_exists($dir_name . '/package2.xml')) {
- $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state);
- } else {
- $info = PEAR::raiseError("No package definition found in '$info' directory");
- }
-
- return $info;
- }
-
- $fp = false;
- if (is_string($info) && strlen($info) < 255 &&
- (file_exists($info) || ($fp = @fopen($info, 'r')))
- ) {
-
- if ($fp) {
- fclose($fp);
- }
-
- $tmp = substr($info, -4);
- if ($tmp == '.xml') {
- $info = &PEAR_PackageFile::fromPackageFile($info, $state);
- } elseif ($tmp == '.tar' || $tmp == '.tgz') {
- $info = &PEAR_PackageFile::fromTgzFile($info, $state);
- } else {
- $fp = fopen($info, 'r');
- $test = fread($fp, 5);
- fclose($fp);
- if ($test == '<?xml') {
- $info = &PEAR_PackageFile::fromPackageFile($info, $state);
- } else {
- $info = &PEAR_PackageFile::fromTgzFile($info, $state);
- }
- }
-
- return $info;
- }
-
- $info = PEAR::raiseError("Cannot open '$info' for parsing");
- return $info;
- }
-}
-<?php
-/**
- * package.xml generation class, package.xml version 1.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * needed for PEAR_VALIDATE_* constants
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
-/**
- * This class converts a PEAR_PackageFile_v1 object into any output format.
- *
- * Supported output formats include array, XML string, and a PEAR_PackageFile_v2
- * object, for converting package.xml 1.0 into package.xml 2.0 with no sweat.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Generator_v1
-{
- /**
- * @var PEAR_PackageFile_v1
- */
- var $_packagefile;
- function __construct(&$packagefile)
- {
- $this->_packagefile = &$packagefile;
- }
-
- function getPackagerVersion()
- {
- return '1.9.5';
- }
-
- /**
- * @param PEAR_Packager
- * @param bool if true, a .tgz is written, otherwise a .tar is written
- * @param string|null directory in which to save the .tgz
- * @return string|PEAR_Error location of package or error object
- */
- function toTgz(&$packager, $compress = true, $where = null)
- {
- require_once 'phar://install-pear-nozlib.phar/' . 'Archive/Tar.php';
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: "' . $where . '" could' .
- ' not be created');
- }
- if (file_exists($where . DIRECTORY_SEPARATOR . 'package.xml') &&
- !is_file($where . DIRECTORY_SEPARATOR . 'package.xml')) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: unable to save package.xml as' .
- ' "' . $where . DIRECTORY_SEPARATOR . 'package.xml"');
- }
- if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: invalid package file');
- }
- $pkginfo = $this->_packagefile->getArray();
- $ext = $compress ? '.tgz' : '.tar';
- $pkgver = $pkginfo['package'] . '-' . $pkginfo['version'];
- $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext;
- if (file_exists(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext) &&
- !is_file(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: cannot create tgz file "' .
- getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext . '"');
- }
- if ($pkgfile = $this->_packagefile->getPackageFile()) {
- $pkgdir = dirname(realpath($pkgfile));
- $pkgfile = basename($pkgfile);
- } else {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: package file object must ' .
- 'be created from a real file');
- }
- // {{{ Create the package file list
- $filelist = array();
- $i = 0;
-
- foreach ($this->_packagefile->getFilelist() as $fname => $atts) {
- $file = $pkgdir . DIRECTORY_SEPARATOR . $fname;
- if (!file_exists($file)) {
- return PEAR::raiseError("File does not exist: $fname");
- } else {
- $filelist[$i++] = $file;
- if (!isset($atts['md5sum'])) {
- $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($file));
- }
- $packager->log(2, "Adding file $fname");
- }
- }
- // }}}
- $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true);
- if ($packagexml) {
- $tar = new Archive_Tar($dest_package, $compress);
- $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors
- // ----- Creates with the package.xml file
- $ok = $tar->createModify(array($packagexml), '', $where);
- if (PEAR::isError($ok)) {
- return $ok;
- } elseif (!$ok) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed');
- }
- // ----- Add the content of the package
- if (!$tar->addModify($filelist, $pkgver, $pkgdir)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed');
- }
- return $dest_package;
- }
- }
-
- /**
- * @param string|null directory to place the package.xml in, or null for a temporary dir
- * @param int one of the PEAR_VALIDATE_* constants
- * @param string name of the generated file
- * @param bool if true, then no analysis will be performed on role="php" files
- * @return string|PEAR_Error path to the created file on success
- */
- function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml',
- $nofilechecking = false)
- {
- if (!$this->_packagefile->validate($state, $nofilechecking)) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: invalid package.xml',
- null, null, null, $this->_packagefile->getValidationWarnings());
- }
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: "' . $where . '" could' .
- ' not be created');
- }
- $newpkgfile = $where . DIRECTORY_SEPARATOR . $name;
- $np = @fopen($newpkgfile, 'wb');
- if (!$np) {
- return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: unable to save ' .
- "$name as $newpkgfile");
- }
- fwrite($np, $this->toXml($state, true));
- fclose($np);
- return $newpkgfile;
- }
-
- /**
- * fix both XML encoding to be UTF8, and replace standard XML entities < > " & '
- *
- * @param string $string
- * @return string
- * @access private
- */
- function _fixXmlEncoding($string)
- {
- return strtr($string, array(
- '&' => '&amp;',
- '>' => '&gt;',
- '<' => '&lt;',
- '"' => '&quot;',
- '\'' => '&apos;' ));
- }
-
- /**
- * Return an XML document based on the package info (as returned
- * by the PEAR_Common::infoFrom* methods).
- *
- * @return string XML data
- */
- function toXml($state = PEAR_VALIDATE_NORMAL, $nofilevalidation = false)
- {
- $this->_packagefile->setDate(date('Y-m-d'));
- if (!$this->_packagefile->validate($state, $nofilevalidation)) {
- return false;
- }
- $pkginfo = $this->_packagefile->getArray();
- static $maint_map = array(
- "handle" => "user",
- "name" => "name",
- "email" => "email",
- "role" => "role",
- );
- $ret = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
- $ret .= "<!DOCTYPE package SYSTEM \"http://pear.php.net/dtd/package-1.0\">\n";
- $ret .= "<package version=\"1.0\" packagerversion=\"1.9.5\">\n" .
-" <name>$pkginfo[package]</name>";
- if (isset($pkginfo['extends'])) {
- $ret .= "\n<extends>$pkginfo[extends]</extends>";
- }
- $ret .=
- "\n <summary>".$this->_fixXmlEncoding($pkginfo['summary'])."</summary>\n" .
-" <description>".trim($this->_fixXmlEncoding($pkginfo['description']))."\n </description>\n" .
-" <maintainers>\n";
- foreach ($pkginfo['maintainers'] as $maint) {
- $ret .= " <maintainer>\n";
- foreach ($maint_map as $idx => $elm) {
- $ret .= " <$elm>";
- $ret .= $this->_fixXmlEncoding($maint[$idx]);
- $ret .= "</$elm>\n";
- }
- $ret .= " </maintainer>\n";
- }
- $ret .= " </maintainers>\n";
- $ret .= $this->_makeReleaseXml($pkginfo, false, $state);
- if (isset($pkginfo['changelog']) && count($pkginfo['changelog']) > 0) {
- $ret .= " <changelog>\n";
- foreach ($pkginfo['changelog'] as $oldrelease) {
- $ret .= $this->_makeReleaseXml($oldrelease, true);
- }
- $ret .= " </changelog>\n";
- }
- $ret .= "</package>\n";
- return $ret;
- }
-
- // }}}
- // {{{ _makeReleaseXml()
-
- /**
- * Generate part of an XML description with release information.
- *
- * @param array $pkginfo array with release information
- * @param bool $changelog whether the result will be in a changelog element
- *
- * @return string XML data
- *
- * @access private
- */
- function _makeReleaseXml($pkginfo, $changelog = false, $state = PEAR_VALIDATE_NORMAL)
- {
- // XXX QUOTE ENTITIES IN PCDATA, OR EMBED IN CDATA BLOCKS!!
- $indent = $changelog ? " " : "";
- $ret = "$indent <release>\n";
- if (!empty($pkginfo['version'])) {
- $ret .= "$indent <version>$pkginfo[version]</version>\n";
- }
- if (!empty($pkginfo['release_date'])) {
- $ret .= "$indent <date>$pkginfo[release_date]</date>\n";
- }
- if (!empty($pkginfo['release_license'])) {
- $ret .= "$indent <license>$pkginfo[release_license]</license>\n";
- }
- if (!empty($pkginfo['release_state'])) {
- $ret .= "$indent <state>$pkginfo[release_state]</state>\n";
- }
- if (!empty($pkginfo['release_notes'])) {
- $ret .= "$indent <notes>".trim($this->_fixXmlEncoding($pkginfo['release_notes']))
- ."\n$indent </notes>\n";
- }
- if (!empty($pkginfo['release_warnings'])) {
- $ret .= "$indent <warnings>".$this->_fixXmlEncoding($pkginfo['release_warnings'])."</warnings>\n";
- }
- if (isset($pkginfo['release_deps']) && sizeof($pkginfo['release_deps']) > 0) {
- $ret .= "$indent <deps>\n";
- foreach ($pkginfo['release_deps'] as $dep) {
- $ret .= "$indent <dep type=\"$dep[type]\" rel=\"$dep[rel]\"";
- if (isset($dep['version'])) {
- $ret .= " version=\"$dep[version]\"";
- }
- if (isset($dep['optional'])) {
- $ret .= " optional=\"$dep[optional]\"";
- }
- if (isset($dep['name'])) {
- $ret .= ">$dep[name]</dep>\n";
- } else {
- $ret .= "/>\n";
- }
- }
- $ret .= "$indent </deps>\n";
- }
- if (isset($pkginfo['configure_options'])) {
- $ret .= "$indent <configureoptions>\n";
- foreach ($pkginfo['configure_options'] as $c) {
- $ret .= "$indent <configureoption name=\"".
- $this->_fixXmlEncoding($c['name']) . "\"";
- if (isset($c['default'])) {
- $ret .= " default=\"" . $this->_fixXmlEncoding($c['default']) . "\"";
- }
- $ret .= " prompt=\"" . $this->_fixXmlEncoding($c['prompt']) . "\"";
- $ret .= "/>\n";
- }
- $ret .= "$indent </configureoptions>\n";
- }
- if (isset($pkginfo['provides'])) {
- foreach ($pkginfo['provides'] as $key => $what) {
- $ret .= "$indent <provides type=\"$what[type]\" ";
- $ret .= "name=\"$what[name]\" ";
- if (isset($what['extends'])) {
- $ret .= "extends=\"$what[extends]\" ";
- }
- $ret .= "/>\n";
- }
- }
- if (isset($pkginfo['filelist'])) {
- $ret .= "$indent <filelist>\n";
- if ($state ^ PEAR_VALIDATE_PACKAGING) {
- $ret .= $this->recursiveXmlFilelist($pkginfo['filelist']);
- } else {
- foreach ($pkginfo['filelist'] as $file => $fa) {
- if (!isset($fa['role'])) {
- $fa['role'] = '';
- }
- $ret .= "$indent <file role=\"$fa[role]\"";
- if (isset($fa['baseinstalldir'])) {
- $ret .= ' baseinstalldir="' .
- $this->_fixXmlEncoding($fa['baseinstalldir']) . '"';
- }
- if (isset($fa['md5sum'])) {
- $ret .= " md5sum=\"$fa[md5sum]\"";
- }
- if (isset($fa['platform'])) {
- $ret .= " platform=\"$fa[platform]\"";
- }
- if (!empty($fa['install-as'])) {
- $ret .= ' install-as="' .
- $this->_fixXmlEncoding($fa['install-as']) . '"';
- }
- $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"';
- if (empty($fa['replacements'])) {
- $ret .= "/>\n";
- } else {
- $ret .= ">\n";
- foreach ($fa['replacements'] as $r) {
- $ret .= "$indent <replace";
- foreach ($r as $k => $v) {
- $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"';
- }
- $ret .= "/>\n";
- }
- $ret .= "$indent </file>\n";
- }
- }
- }
- $ret .= "$indent </filelist>\n";
- }
- $ret .= "$indent </release>\n";
- return $ret;
- }
-
- /**
- * @param array
- * @access protected
- */
- function recursiveXmlFilelist($list)
- {
- $this->_dirs = array();
- foreach ($list as $file => $attributes) {
- $this->_addDir($this->_dirs, explode('/', dirname($file)), $file, $attributes);
- }
- return $this->_formatDir($this->_dirs);
- }
-
- /**
- * @param array
- * @param array
- * @param string|null
- * @param array|null
- * @access private
- */
- function _addDir(&$dirs, $dir, $file = null, $attributes = null)
- {
- if ($dir == array() || $dir == array('.')) {
- $dirs['files'][basename($file)] = $attributes;
- return;
- }
- $curdir = array_shift($dir);
- if (!isset($dirs['dirs'][$curdir])) {
- $dirs['dirs'][$curdir] = array();
- }
- $this->_addDir($dirs['dirs'][$curdir], $dir, $file, $attributes);
- }
-
- /**
- * @param array
- * @param string
- * @param string
- * @access private
- */
- function _formatDir($dirs, $indent = '', $curdir = '')
- {
- $ret = '';
- if (!count($dirs)) {
- return '';
- }
- if (isset($dirs['dirs'])) {
- uksort($dirs['dirs'], 'strnatcasecmp');
- foreach ($dirs['dirs'] as $dir => $contents) {
- $usedir = "$curdir/$dir";
- $ret .= "$indent <dir name=\"$dir\">\n";
- $ret .= $this->_formatDir($contents, "$indent ", $usedir);
- $ret .= "$indent </dir> <!-- $usedir -->\n";
- }
- }
- if (isset($dirs['files'])) {
- uksort($dirs['files'], 'strnatcasecmp');
- foreach ($dirs['files'] as $file => $attribs) {
- $ret .= $this->_formatFile($file, $attribs, $indent);
- }
- }
- return $ret;
- }
-
- /**
- * @param string
- * @param array
- * @param string
- * @access private
- */
- function _formatFile($file, $attributes, $indent)
- {
- $ret = "$indent <file role=\"$attributes[role]\"";
- if (isset($attributes['baseinstalldir'])) {
- $ret .= ' baseinstalldir="' .
- $this->_fixXmlEncoding($attributes['baseinstalldir']) . '"';
- }
- if (isset($attributes['md5sum'])) {
- $ret .= " md5sum=\"$attributes[md5sum]\"";
- }
- if (isset($attributes['platform'])) {
- $ret .= " platform=\"$attributes[platform]\"";
- }
- if (!empty($attributes['install-as'])) {
- $ret .= ' install-as="' .
- $this->_fixXmlEncoding($attributes['install-as']) . '"';
- }
- $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"';
- if (empty($attributes['replacements'])) {
- $ret .= "/>\n";
- } else {
- $ret .= ">\n";
- foreach ($attributes['replacements'] as $r) {
- $ret .= "$indent <replace";
- foreach ($r as $k => $v) {
- $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"';
- }
- $ret .= "/>\n";
- }
- $ret .= "$indent </file>\n";
- }
- return $ret;
- }
-
- // {{{ _unIndent()
-
- /**
- * Unindent given string (?)
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- }
- }
- return $data;
- }
-
- /**
- * @return array
- */
- function dependenciesToV2()
- {
- $arr = array();
- $this->_convertDependencies2_0($arr);
- return $arr['dependencies'];
- }
-
- /**
- * Convert a package.xml version 1.0 into version 2.0
- *
- * Note that this does a basic conversion, to allow more advanced
- * features like bundles and multiple releases
- * @param string the classname to instantiate and return. This must be
- * PEAR_PackageFile_v2 or a descendant
- * @param boolean if true, only valid, deterministic package.xml 1.0 as defined by the
- * strictest parameters will be converted
- * @return PEAR_PackageFile_v2|PEAR_Error
- */
- function &toV2($class = 'PEAR_PackageFile_v2', $strict = false)
- {
- if ($strict) {
- if (!$this->_packagefile->validate()) {
- $a = PEAR::raiseError('invalid package.xml version 1.0 cannot be converted' .
- ' to version 2.0', null, null, null,
- $this->_packagefile->getValidationWarnings(true));
- return $a;
- }
- }
-
- $arr = array(
- 'attribs' => array(
- 'version' => '2.0',
- 'xmlns' => 'http://pear.php.net/dtd/package-2.0',
- 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
- 'xsi:schemaLocation' => "http://pear.php.net/dtd/tasks-1.0\n" .
-"http://pear.php.net/dtd/tasks-1.0.xsd\n" .
-"http://pear.php.net/dtd/package-2.0\n" .
-'http://pear.php.net/dtd/package-2.0.xsd',
- ),
- 'name' => $this->_packagefile->getPackage(),
- 'channel' => 'pear.php.net',
- );
- $arr['summary'] = $this->_packagefile->getSummary();
- $arr['description'] = $this->_packagefile->getDescription();
- $maintainers = $this->_packagefile->getMaintainers();
- foreach ($maintainers as $maintainer) {
- if ($maintainer['role'] != 'lead') {
- continue;
- }
- $new = array(
- 'name' => $maintainer['name'],
- 'user' => $maintainer['handle'],
- 'email' => $maintainer['email'],
- 'active' => 'yes',
- );
- $arr['lead'][] = $new;
- }
-
- if (!isset($arr['lead'])) { // some people... you know?
- $arr['lead'] = array(
- 'name' => 'unknown',
- 'user' => 'unknown',
- 'email' => 'noleadmaintainer@example.com',
- 'active' => 'no',
- );
- }
-
- if (count($arr['lead']) == 1) {
- $arr['lead'] = $arr['lead'][0];
- }
-
- foreach ($maintainers as $maintainer) {
- if ($maintainer['role'] == 'lead') {
- continue;
- }
- $new = array(
- 'name' => $maintainer['name'],
- 'user' => $maintainer['handle'],
- 'email' => $maintainer['email'],
- 'active' => 'yes',
- );
- $arr[$maintainer['role']][] = $new;
- }
-
- if (isset($arr['developer']) && count($arr['developer']) == 1) {
- $arr['developer'] = $arr['developer'][0];
- }
-
- if (isset($arr['contributor']) && count($arr['contributor']) == 1) {
- $arr['contributor'] = $arr['contributor'][0];
- }
-
- if (isset($arr['helper']) && count($arr['helper']) == 1) {
- $arr['helper'] = $arr['helper'][0];
- }
-
- $arr['date'] = $this->_packagefile->getDate();
- $arr['version'] =
- array(
- 'release' => $this->_packagefile->getVersion(),
- 'api' => $this->_packagefile->getVersion(),
- );
- $arr['stability'] =
- array(
- 'release' => $this->_packagefile->getState(),
- 'api' => $this->_packagefile->getState(),
- );
- $licensemap =
- array(
- 'php' => 'http://www.php.net/license',
- 'php license' => 'http://www.php.net/license',
- 'lgpl' => 'http://www.gnu.org/copyleft/lesser.html',
- 'bsd' => 'http://www.opensource.org/licenses/bsd-license.php',
- 'bsd style' => 'http://www.opensource.org/licenses/bsd-license.php',
- 'bsd-style' => 'http://www.opensource.org/licenses/bsd-license.php',
- 'mit' => 'http://www.opensource.org/licenses/mit-license.php',
- 'gpl' => 'http://www.gnu.org/copyleft/gpl.html',
- 'apache' => 'http://www.opensource.org/licenses/apache2.0.php'
- );
-
- if (isset($licensemap[strtolower($this->_packagefile->getLicense())])) {
- $arr['license'] = array(
- 'attribs' => array('uri' =>
- $licensemap[strtolower($this->_packagefile->getLicense())]),
- '_content' => $this->_packagefile->getLicense()
- );
- } else {
- // don't use bogus uri
- $arr['license'] = $this->_packagefile->getLicense();
- }
-
- $arr['notes'] = $this->_packagefile->getNotes();
- $temp = array();
- $arr['contents'] = $this->_convertFilelist2_0($temp);
- $this->_convertDependencies2_0($arr);
- $release = ($this->_packagefile->getConfigureOptions() || $this->_isExtension) ?
- 'extsrcrelease' : 'phprelease';
- if ($release == 'extsrcrelease') {
- $arr['channel'] = 'pecl.php.net';
- $arr['providesextension'] = $arr['name']; // assumption
- }
-
- $arr[$release] = array();
- if ($this->_packagefile->getConfigureOptions()) {
- $arr[$release]['configureoption'] = $this->_packagefile->getConfigureOptions();
- foreach ($arr[$release]['configureoption'] as $i => $opt) {
- $arr[$release]['configureoption'][$i] = array('attribs' => $opt);
- }
- if (count($arr[$release]['configureoption']) == 1) {
- $arr[$release]['configureoption'] = $arr[$release]['configureoption'][0];
- }
- }
-
- $this->_convertRelease2_0($arr[$release], $temp);
- if ($release == 'extsrcrelease' && count($arr[$release]) > 1) {
- // multiple extsrcrelease tags added in PEAR 1.4.1
- $arr['dependencies']['required']['pearinstaller']['min'] = '1.4.1';
- }
-
- if ($cl = $this->_packagefile->getChangelog()) {
- foreach ($cl as $release) {
- $rel = array();
- $rel['version'] =
- array(
- 'release' => $release['version'],
- 'api' => $release['version'],
- );
- if (!isset($release['release_state'])) {
- $release['release_state'] = 'stable';
- }
-
- $rel['stability'] =
- array(
- 'release' => $release['release_state'],
- 'api' => $release['release_state'],
- );
- if (isset($release['release_date'])) {
- $rel['date'] = $release['release_date'];
- } else {
- $rel['date'] = date('Y-m-d');
- }
-
- if (isset($release['release_license'])) {
- if (isset($licensemap[strtolower($release['release_license'])])) {
- $uri = $licensemap[strtolower($release['release_license'])];
- } else {
- $uri = 'http://www.example.com';
- }
- $rel['license'] = array(
- 'attribs' => array('uri' => $uri),
- '_content' => $release['release_license']
- );
- } else {
- $rel['license'] = $arr['license'];
- }
-
- if (!isset($release['release_notes'])) {
- $release['release_notes'] = 'no release notes';
- }
-
- $rel['notes'] = $release['release_notes'];
- $arr['changelog']['release'][] = $rel;
- }
- }
-
- $ret = new $class;
- $ret->setConfig($this->_packagefile->_config);
- if (isset($this->_packagefile->_logger) && is_object($this->_packagefile->_logger)) {
- $ret->setLogger($this->_packagefile->_logger);
- }
-
- $ret->fromArray($arr);
- return $ret;
- }
-
- /**
- * @param array
- * @param bool
- * @access private
- */
- function _convertDependencies2_0(&$release, $internal = false)
- {
- $peardep = array('pearinstaller' =>
- array('min' => '1.4.0b1')); // this is a lot safer
- $required = $optional = array();
- $release['dependencies'] = array('required' => array());
- if ($this->_packagefile->hasDeps()) {
- foreach ($this->_packagefile->getDeps() as $dep) {
- if (!isset($dep['optional']) || $dep['optional'] == 'no') {
- $required[] = $dep;
- } else {
- $optional[] = $dep;
- }
- }
- foreach (array('required', 'optional') as $arr) {
- $deps = array();
- foreach ($$arr as $dep) {
- // organize deps by dependency type and name
- if (!isset($deps[$dep['type']])) {
- $deps[$dep['type']] = array();
- }
- if (isset($dep['name'])) {
- $deps[$dep['type']][$dep['name']][] = $dep;
- } else {
- $deps[$dep['type']][] = $dep;
- }
- }
- do {
- if (isset($deps['php'])) {
- $php = array();
- if (count($deps['php']) > 1) {
- $php = $this->_processPhpDeps($deps['php']);
- } else {
- if (!isset($deps['php'][0])) {
- list($key, $blah) = each ($deps['php']); // stupid buggy versions
- $deps['php'] = array($blah[0]);
- }
- $php = $this->_processDep($deps['php'][0]);
- if (!$php) {
- break; // poor mans throw
- }
- }
- $release['dependencies'][$arr]['php'] = $php;
- }
- } while (false);
- do {
- if (isset($deps['pkg'])) {
- $pkg = array();
- $pkg = $this->_processMultipleDepsName($deps['pkg']);
- if (!$pkg) {
- break; // poor mans throw
- }
- $release['dependencies'][$arr]['package'] = $pkg;
- }
- } while (false);
- do {
- if (isset($deps['ext'])) {
- $pkg = array();
- $pkg = $this->_processMultipleDepsName($deps['ext']);
- $release['dependencies'][$arr]['extension'] = $pkg;
- }
- } while (false);
- // skip sapi - it's not supported so nobody will have used it
- // skip os - it's not supported in 1.0
- }
- }
- if (isset($release['dependencies']['required'])) {
- $release['dependencies']['required'] =
- array_merge($peardep, $release['dependencies']['required']);
- } else {
- $release['dependencies']['required'] = $peardep;
- }
- if (!isset($release['dependencies']['required']['php'])) {
- $release['dependencies']['required']['php'] =
- array('min' => '4.0.0');
- }
- $order = array();
- $bewm = $release['dependencies']['required'];
- $order['php'] = $bewm['php'];
- $order['pearinstaller'] = $bewm['pearinstaller'];
- isset($bewm['package']) ? $order['package'] = $bewm['package'] :0;
- isset($bewm['extension']) ? $order['extension'] = $bewm['extension'] :0;
- $release['dependencies']['required'] = $order;
- }
-
- /**
- * @param array
- * @access private
- */
- function _convertFilelist2_0(&$package)
- {
- $ret = array('dir' =>
- array(
- 'attribs' => array('name' => '/'),
- 'file' => array()
- )
- );
- $package['platform'] =
- $package['install-as'] = array();
- $this->_isExtension = false;
- foreach ($this->_packagefile->getFilelist() as $name => $file) {
- $file['name'] = $name;
- if (isset($file['role']) && $file['role'] == 'src') {
- $this->_isExtension = true;
- }
- if (isset($file['replacements'])) {
- $repl = $file['replacements'];
- unset($file['replacements']);
- } else {
- unset($repl);
- }
- if (isset($file['install-as'])) {
- $package['install-as'][$name] = $file['install-as'];
- unset($file['install-as']);
- }
- if (isset($file['platform'])) {
- $package['platform'][$name] = $file['platform'];
- unset($file['platform']);
- }
- $file = array('attribs' => $file);
- if (isset($repl)) {
- foreach ($repl as $replace ) {
- $file['tasks:replace'][] = array('attribs' => $replace);
- }
- if (count($repl) == 1) {
- $file['tasks:replace'] = $file['tasks:replace'][0];
- }
- }
- $ret['dir']['file'][] = $file;
- }
- return $ret;
- }
-
- /**
- * Post-process special files with install-as/platform attributes and
- * make the release tag.
- *
- * This complex method follows this work-flow to create the release tags:
- *
- * <pre>
- * - if any install-as/platform exist, create a generic release and fill it with
- * o <install as=..> tags for <file name=... install-as=...>
- * o <install as=..> tags for <file name=... platform=!... install-as=..>
- * o <ignore> tags for <file name=... platform=...>
- * o <ignore> tags for <file name=... platform=... install-as=..>
- * - create a release for each platform encountered and fill with
- * o <install as..> tags for <file name=... install-as=...>
- * o <install as..> tags for <file name=... platform=this platform install-as=..>
- * o <install as..> tags for <file name=... platform=!other platform install-as=..>
- * o <ignore> tags for <file name=... platform=!this platform>
- * o <ignore> tags for <file name=... platform=other platform>
- * o <ignore> tags for <file name=... platform=other platform install-as=..>
- * o <ignore> tags for <file name=... platform=!this platform install-as=..>
- * </pre>
- *
- * It does this by accessing the $package parameter, which contains an array with
- * indices:
- *
- * - platform: mapping of file => OS the file should be installed on
- * - install-as: mapping of file => installed name
- * - osmap: mapping of OS => list of files that should be installed
- * on that OS
- * - notosmap: mapping of OS => list of files that should not be
- * installed on that OS
- *
- * @param array
- * @param array
- * @access private
- */
- function _convertRelease2_0(&$release, $package)
- {
- //- if any install-as/platform exist, create a generic release and fill it with
- if (count($package['platform']) || count($package['install-as'])) {
- $generic = array();
- $genericIgnore = array();
- foreach ($package['install-as'] as $file => $as) {
- //o <install as=..> tags for <file name=... install-as=...>
- if (!isset($package['platform'][$file])) {
- $generic[] = $file;
- continue;
- }
- //o <install as=..> tags for <file name=... platform=!... install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file]{0} == '!') {
- $generic[] = $file;
- continue;
- }
- //o <ignore> tags for <file name=... platform=... install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file]{0} != '!') {
- $genericIgnore[] = $file;
- continue;
- }
- }
- foreach ($package['platform'] as $file => $platform) {
- if (isset($package['install-as'][$file])) {
- continue;
- }
- if ($platform{0} != '!') {
- //o <ignore> tags for <file name=... platform=...>
- $genericIgnore[] = $file;
- }
- }
- if (count($package['platform'])) {
- $oses = $notplatform = $platform = array();
- foreach ($package['platform'] as $file => $os) {
- // get a list of oses
- if ($os{0} == '!') {
- if (isset($oses[substr($os, 1)])) {
- continue;
- }
- $oses[substr($os, 1)] = count($oses);
- } else {
- if (isset($oses[$os])) {
- continue;
- }
- $oses[$os] = count($oses);
- }
- }
- //- create a release for each platform encountered and fill with
- foreach ($oses as $os => $releaseNum) {
- $release[$releaseNum]['installconditions']['os']['name'] = $os;
- $release[$releaseNum]['filelist'] = array('install' => array(),
- 'ignore' => array());
- foreach ($package['install-as'] as $file => $as) {
- //o <install as=..> tags for <file name=... install-as=...>
- if (!isset($package['platform'][$file])) {
- $release[$releaseNum]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $as,
- ),
- );
- continue;
- }
- //o <install as..> tags for
- // <file name=... platform=this platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file] == $os) {
- $release[$releaseNum]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $as,
- ),
- );
- continue;
- }
- //o <install as..> tags for
- // <file name=... platform=!other platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file] != "!$os" &&
- $package['platform'][$file]{0} == '!') {
- $release[$releaseNum]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $as,
- ),
- );
- continue;
- }
- //o <ignore> tags for
- // <file name=... platform=!this platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file] == "!$os") {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- continue;
- }
- //o <ignore> tags for
- // <file name=... platform=other platform install-as=..>
- if (isset($package['platform'][$file]) &&
- $package['platform'][$file]{0} != '!' &&
- $package['platform'][$file] != $os) {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- continue;
- }
- }
- foreach ($package['platform'] as $file => $platform) {
- if (isset($package['install-as'][$file])) {
- continue;
- }
- //o <ignore> tags for <file name=... platform=!this platform>
- if ($platform == "!$os") {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- continue;
- }
- //o <ignore> tags for <file name=... platform=other platform>
- if ($platform{0} != '!' && $platform != $os) {
- $release[$releaseNum]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- ),
- );
- }
- }
- if (!count($release[$releaseNum]['filelist']['install'])) {
- unset($release[$releaseNum]['filelist']['install']);
- }
- if (!count($release[$releaseNum]['filelist']['ignore'])) {
- unset($release[$releaseNum]['filelist']['ignore']);
- }
- }
- if (count($generic) || count($genericIgnore)) {
- $release[count($oses)] = array();
- if (count($generic)) {
- foreach ($generic as $file) {
- if (isset($package['install-as'][$file])) {
- $installas = $package['install-as'][$file];
- } else {
- $installas = $file;
- }
- $release[count($oses)]['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $installas,
- )
- );
- }
- }
- if (count($genericIgnore)) {
- foreach ($genericIgnore as $file) {
- $release[count($oses)]['filelist']['ignore'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- )
- );
- }
- }
- }
- // cleanup
- foreach ($release as $i => $rel) {
- if (isset($rel['filelist']['install']) &&
- count($rel['filelist']['install']) == 1) {
- $release[$i]['filelist']['install'] =
- $release[$i]['filelist']['install'][0];
- }
- if (isset($rel['filelist']['ignore']) &&
- count($rel['filelist']['ignore']) == 1) {
- $release[$i]['filelist']['ignore'] =
- $release[$i]['filelist']['ignore'][0];
- }
- }
- if (count($release) == 1) {
- $release = $release[0];
- }
- } else {
- // no platform atts, but some install-as atts
- foreach ($package['install-as'] as $file => $value) {
- $release['filelist']['install'][] =
- array(
- 'attribs' => array(
- 'name' => $file,
- 'as' => $value
- )
- );
- }
- if (count($release['filelist']['install']) == 1) {
- $release['filelist']['install'] = $release['filelist']['install'][0];
- }
- }
- }
- }
-
- /**
- * @param array
- * @return array
- * @access private
- */
- function _processDep($dep)
- {
- if ($dep['type'] == 'php') {
- if ($dep['rel'] == 'has') {
- // come on - everyone has php!
- return false;
- }
- }
- $php = array();
- if ($dep['type'] != 'php') {
- $php['name'] = $dep['name'];
- if ($dep['type'] == 'pkg') {
- $php['channel'] = 'pear.php.net';
- }
- }
- switch ($dep['rel']) {
- case 'gt' :
- $php['min'] = $dep['version'];
- $php['exclude'] = $dep['version'];
- break;
- case 'ge' :
- if (!isset($dep['version'])) {
- if ($dep['type'] == 'php') {
- if (isset($dep['name'])) {
- $dep['version'] = $dep['name'];
- }
- }
- }
- $php['min'] = $dep['version'];
- break;
- case 'lt' :
- $php['max'] = $dep['version'];
- $php['exclude'] = $dep['version'];
- break;
- case 'le' :
- $php['max'] = $dep['version'];
- break;
- case 'eq' :
- $php['min'] = $dep['version'];
- $php['max'] = $dep['version'];
- break;
- case 'ne' :
- $php['exclude'] = $dep['version'];
- break;
- case 'not' :
- $php['conflicts'] = 'yes';
- break;
- }
- return $php;
- }
-
- /**
- * @param array
- * @return array
- */
- function _processPhpDeps($deps)
- {
- $test = array();
- foreach ($deps as $dep) {
- $test[] = $this->_processDep($dep);
- }
- $min = array();
- $max = array();
- foreach ($test as $dep) {
- if (!$dep) {
- continue;
- }
- if (isset($dep['min'])) {
- $min[$dep['min']] = count($min);
- }
- if (isset($dep['max'])) {
- $max[$dep['max']] = count($max);
- }
- }
- if (count($min) > 0) {
- uksort($min, 'version_compare');
- }
- if (count($max) > 0) {
- uksort($max, 'version_compare');
- }
- if (count($min)) {
- // get the highest minimum
- $min = array_pop($a = array_flip($min));
- } else {
- $min = false;
- }
- if (count($max)) {
- // get the lowest maximum
- $max = array_shift($a = array_flip($max));
- } else {
- $max = false;
- }
- if ($min) {
- $php['min'] = $min;
- }
- if ($max) {
- $php['max'] = $max;
- }
- $exclude = array();
- foreach ($test as $dep) {
- if (!isset($dep['exclude'])) {
- continue;
- }
- $exclude[] = $dep['exclude'];
- }
- if (count($exclude)) {
- $php['exclude'] = $exclude;
- }
- return $php;
- }
-
- /**
- * process multiple dependencies that have a name, like package deps
- * @param array
- * @return array
- * @access private
- */
- function _processMultipleDepsName($deps)
- {
- $ret = $tests = array();
- foreach ($deps as $name => $dep) {
- foreach ($dep as $d) {
- $tests[$name][] = $this->_processDep($d);
- }
- }
-
- foreach ($tests as $name => $test) {
- $max = $min = $php = array();
- $php['name'] = $name;
- foreach ($test as $dep) {
- if (!$dep) {
- continue;
- }
- if (isset($dep['channel'])) {
- $php['channel'] = 'pear.php.net';
- }
- if (isset($dep['conflicts']) && $dep['conflicts'] == 'yes') {
- $php['conflicts'] = 'yes';
- }
- if (isset($dep['min'])) {
- $min[$dep['min']] = count($min);
- }
- if (isset($dep['max'])) {
- $max[$dep['max']] = count($max);
- }
- }
- if (count($min) > 0) {
- uksort($min, 'version_compare');
- }
- if (count($max) > 0) {
- uksort($max, 'version_compare');
- }
- if (count($min)) {
- // get the highest minimum
- $min = array_pop($a = array_flip($min));
- } else {
- $min = false;
- }
- if (count($max)) {
- // get the lowest maximum
- $max = array_shift($a = array_flip($max));
- } else {
- $max = false;
- }
- if ($min) {
- $php['min'] = $min;
- }
- if ($max) {
- $php['max'] = $max;
- }
- $exclude = array();
- foreach ($test as $dep) {
- if (!isset($dep['exclude'])) {
- continue;
- }
- $exclude[] = $dep['exclude'];
- }
- if (count($exclude)) {
- $php['exclude'] = $exclude;
- }
- $ret[] = $php;
- }
- return $ret;
- }
-}
-?>
-<?php
-/**
- * package.xml generation class, package.xml version 2.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * file/dir manipulation routines
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'XML/Util.php';
-
-/**
- * This class converts a PEAR_PackageFile_v2 object into any output format.
- *
- * Supported output formats include array, XML string (using S. Schmidt's
- * XML_Serializer, slightly customized)
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Serializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Generator_v2
-{
- /**
- * default options for the serialization
- * @access private
- * @var array $_defaultOptions
- */
- var $_defaultOptions = array(
- 'indent' => ' ', // string used for indentation
- 'linebreak' => "\n", // string used for newlines
- 'typeHints' => false, // automatically add type hin attributes
- 'addDecl' => true, // add an XML declaration
- 'defaultTagName' => 'XML_Serializer_Tag', // tag used for indexed arrays or invalid names
- 'classAsTagName' => false, // use classname for objects in indexed arrays
- 'keyAttribute' => '_originalKey', // attribute where original key is stored
- 'typeAttribute' => '_type', // attribute for type (only if typeHints => true)
- 'classAttribute' => '_class', // attribute for class of objects (only if typeHints => true)
- 'scalarAsAttributes' => false, // scalar values (strings, ints,..) will be serialized as attribute
- 'prependAttributes' => '', // prepend string for attributes
- 'indentAttributes' => false, // indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column
- 'mode' => 'simplexml', // use 'simplexml' to use parent name as tagname if transforming an indexed array
- 'addDoctype' => false, // add a doctype declaration
- 'doctype' => null, // supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()}
- 'rootName' => 'package', // name of the root tag
- 'rootAttributes' => array(
- 'version' => '2.0',
- 'xmlns' => 'http://pear.php.net/dtd/package-2.0',
- 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0',
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
- 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0
-http://pear.php.net/dtd/tasks-1.0.xsd
-http://pear.php.net/dtd/package-2.0
-http://pear.php.net/dtd/package-2.0.xsd',
- ), // attributes of the root tag
- 'attributesArray' => 'attribs', // all values in this key will be treated as attributes
- 'contentName' => '_content', // this value will be used directly as content, instead of creating a new tag, may only be used in conjunction with attributesArray
- 'beautifyFilelist' => false,
- 'encoding' => 'UTF-8',
- );
-
- /**
- * options for the serialization
- * @access private
- * @var array $options
- */
- var $options = array();
-
- /**
- * current tag depth
- * @var integer $_tagDepth
- */
- var $_tagDepth = 0;
-
- /**
- * serilialized representation of the data
- * @var string $_serializedData
- */
- var $_serializedData = null;
- /**
- * @var PEAR_PackageFile_v2
- */
- var $_packagefile;
- /**
- * @param PEAR_PackageFile_v2
- */
- function __construct(&$packagefile)
- {
- $this->_packagefile = &$packagefile;
- if (isset($this->_packagefile->encoding)) {
- $this->_defaultOptions['encoding'] = $this->_packagefile->encoding;
- }
- }
-
- /**
- * @return string
- */
- function getPackagerVersion()
- {
- return '1.9.5';
- }
-
- /**
- * @param PEAR_Packager
- * @param bool generate a .tgz or a .tar
- * @param string|null temporary directory to package in
- */
- function toTgz(&$packager, $compress = true, $where = null)
- {
- $a = null;
- return $this->toTgz2($packager, $a, $compress, $where);
- }
-
- /**
- * Package up both a package.xml and package2.xml for the same release
- * @param PEAR_Packager
- * @param PEAR_PackageFile_v1
- * @param bool generate a .tgz or a .tar
- * @param string|null temporary directory to package in
- */
- function toTgz2(&$packager, &$pf1, $compress = true, $where = null)
- {
- require_once 'phar://install-pear-nozlib.phar/' . 'Archive/Tar.php';
- if (!$this->_packagefile->isEquivalent($pf1)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' .
- basename($pf1->getPackageFile()) .
- '" is not equivalent to "' . basename($this->_packagefile->getPackageFile())
- . '"');
- }
-
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . $where . '" could' .
- ' not be created');
- }
-
- $file = $where . DIRECTORY_SEPARATOR . 'package.xml';
- if (file_exists($file) && !is_file($file)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: unable to save package.xml as' .
- ' "' . $file .'"');
- }
-
- if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: invalid package.xml');
- }
-
- $ext = $compress ? '.tgz' : '.tar';
- $pkgver = $this->_packagefile->getPackage() . '-' . $this->_packagefile->getVersion();
- $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext;
- if (file_exists($dest_package) && !is_file($dest_package)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: cannot create tgz file "' .
- $dest_package . '"');
- }
-
- $pkgfile = $this->_packagefile->getPackageFile();
- if (!$pkgfile) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: package file object must ' .
- 'be created from a real file');
- }
-
- $pkgdir = dirname(realpath($pkgfile));
- $pkgfile = basename($pkgfile);
-
- // {{{ Create the package file list
- $filelist = array();
- $i = 0;
- $this->_packagefile->flattenFilelist();
- $contents = $this->_packagefile->getContents();
- if (isset($contents['bundledpackage'])) { // bundles of packages
- $contents = $contents['bundledpackage'];
- if (!isset($contents[0])) {
- $contents = array($contents);
- }
-
- $packageDir = $where;
- foreach ($contents as $i => $package) {
- $fname = $package;
- $file = $pkgdir . DIRECTORY_SEPARATOR . $fname;
- if (!file_exists($file)) {
- return $packager->raiseError("File does not exist: $fname");
- }
-
- $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname;
- System::mkdir(array('-p', dirname($tfile)));
- copy($file, $tfile);
- $filelist[$i++] = $tfile;
- $packager->log(2, "Adding package $fname");
- }
- } else { // normal packages
- $contents = $contents['dir']['file'];
- if (!isset($contents[0])) {
- $contents = array($contents);
- }
-
- $packageDir = $where;
- foreach ($contents as $i => $file) {
- $fname = $file['attribs']['name'];
- $atts = $file['attribs'];
- $orig = $file;
- $file = $pkgdir . DIRECTORY_SEPARATOR . $fname;
- if (!file_exists($file)) {
- return $packager->raiseError("File does not exist: $fname");
- }
-
- $origperms = fileperms($file);
- $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname;
- unset($orig['attribs']);
- if (count($orig)) { // file with tasks
- // run any package-time tasks
- $contents = file_get_contents($file);
- foreach ($orig as $tag => $raw) {
- $tag = str_replace(
- array($this->_packagefile->getTasksNs() . ':', '-'),
- array('', '_'), $tag);
- $task = "PEAR_Task_$tag";
- $task = new $task($this->_packagefile->_config,
- $this->_packagefile->_logger,
- PEAR_TASK_PACKAGE);
- $task->init($raw, $atts, null);
- $res = $task->startSession($this->_packagefile, $contents, $tfile);
- if (!$res) {
- continue; // skip this task
- }
-
- if (PEAR::isError($res)) {
- return $res;
- }
-
- $contents = $res; // save changes
- System::mkdir(array('-p', dirname($tfile)));
- $wp = fopen($tfile, "wb");
- fwrite($wp, $contents);
- fclose($wp);
- }
- }
-
- if (!file_exists($tfile)) {
- System::mkdir(array('-p', dirname($tfile)));
- copy($file, $tfile);
- }
-
- chmod($tfile, $origperms);
- $filelist[$i++] = $tfile;
- $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($tfile), $i - 1);
- $packager->log(2, "Adding file $fname");
- }
- }
- // }}}
-
- $name = $pf1 !== null ? 'package2.xml' : 'package.xml';
- $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, $name);
- if ($packagexml) {
- $tar = new Archive_Tar($dest_package, $compress);
- $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors
- // ----- Creates with the package.xml file
- $ok = $tar->createModify(array($packagexml), '', $where);
- if (PEAR::isError($ok)) {
- return $packager->raiseError($ok);
- } elseif (!$ok) {
- return $packager->raiseError('PEAR_Packagefile_v2::toTgz(): adding ' . $name .
- ' failed');
- }
-
- // ----- Add the content of the package
- if (!$tar->addModify($filelist, $pkgver, $where)) {
- return $packager->raiseError(
- 'PEAR_Packagefile_v2::toTgz(): tarball creation failed');
- }
-
- // add the package.xml version 1.0
- if ($pf1 !== null) {
- $pfgen = &$pf1->getDefaultGenerator();
- $packagexml1 = $pfgen->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true);
- if (!$tar->addModify(array($packagexml1), '', $where)) {
- return $packager->raiseError(
- 'PEAR_Packagefile_v2::toTgz(): adding package.xml failed');
- }
- }
-
- return $dest_package;
- }
- }
-
- function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml')
- {
- if (!$this->_packagefile->validate($state)) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: invalid package.xml',
- null, null, null, $this->_packagefile->getValidationWarnings());
- }
-
- if ($where === null) {
- if (!($where = System::mktemp(array('-d')))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: mktemp failed');
- }
- } elseif (!@System::mkDir(array('-p', $where))) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: "' . $where . '" could' .
- ' not be created');
- }
-
- $newpkgfile = $where . DIRECTORY_SEPARATOR . $name;
- $np = @fopen($newpkgfile, 'wb');
- if (!$np) {
- return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: unable to save ' .
- "$name as $newpkgfile");
- }
- fwrite($np, $this->toXml($state));
- fclose($np);
- return $newpkgfile;
- }
-
- function &toV2()
- {
- return $this->_packagefile;
- }
-
- /**
- * Return an XML document based on the package info (as returned
- * by the PEAR_Common::infoFrom* methods).
- *
- * @return string XML data
- */
- function toXml($state = PEAR_VALIDATE_NORMAL, $options = array())
- {
- $this->_packagefile->setDate(date('Y-m-d'));
- $this->_packagefile->setTime(date('H:i:s'));
- if (!$this->_packagefile->validate($state)) {
- return false;
- }
-
- if (is_array($options)) {
- $this->options = array_merge($this->_defaultOptions, $options);
- } else {
- $this->options = $this->_defaultOptions;
- }
-
- $arr = $this->_packagefile->getArray();
- if (isset($arr['filelist'])) {
- unset($arr['filelist']);
- }
-
- if (isset($arr['_lastversion'])) {
- unset($arr['_lastversion']);
- }
-
- // Fix the notes a little bit
- if (isset($arr['notes'])) {
- // This trims out the indenting, needs fixing
- $arr['notes'] = "\n" . trim($arr['notes']) . "\n";
- }
-
- if (isset($arr['changelog']) && !empty($arr['changelog'])) {
- // Fix for inconsistency how the array is filled depending on the changelog release amount
- if (!isset($arr['changelog']['release'][0])) {
- $release = $arr['changelog']['release'];
- unset($arr['changelog']['release']);
-
- $arr['changelog']['release'] = array();
- $arr['changelog']['release'][0] = $release;
- }
-
- foreach (array_keys($arr['changelog']['release']) as $key) {
- $c =& $arr['changelog']['release'][$key];
- if (isset($c['notes'])) {
- // This trims out the indenting, needs fixing
- $c['notes'] = "\n" . trim($c['notes']) . "\n";
- }
- }
- }
-
- if ($state ^ PEAR_VALIDATE_PACKAGING && !isset($arr['bundle'])) {
- $use = $this->_recursiveXmlFilelist($arr['contents']['dir']['file']);
- unset($arr['contents']['dir']['file']);
- if (isset($use['dir'])) {
- $arr['contents']['dir']['dir'] = $use['dir'];
- }
- if (isset($use['file'])) {
- $arr['contents']['dir']['file'] = $use['file'];
- }
- $this->options['beautifyFilelist'] = true;
- }
-
- $arr['attribs']['packagerversion'] = '1.9.5';
- if ($this->serialize($arr, $options)) {
- return $this->_serializedData . "\n";
- }
-
- return false;
- }
-
-
- function _recursiveXmlFilelist($list)
- {
- $dirs = array();
- if (isset($list['attribs'])) {
- $file = $list['attribs']['name'];
- unset($list['attribs']['name']);
- $attributes = $list['attribs'];
- $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes);
- } else {
- foreach ($list as $a) {
- $file = $a['attribs']['name'];
- $attributes = $a['attribs'];
- unset($a['attribs']);
- $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes, $a);
- }
- }
- $this->_formatDir($dirs);
- $this->_deFormat($dirs);
- return $dirs;
- }
-
- function _addDir(&$dirs, $dir, $file = null, $attributes = null, $tasks = null)
- {
- if (!$tasks) {
- $tasks = array();
- }
- if ($dir == array() || $dir == array('.')) {
- $dirs['file'][basename($file)] = $tasks;
- $attributes['name'] = basename($file);
- $dirs['file'][basename($file)]['attribs'] = $attributes;
- return;
- }
- $curdir = array_shift($dir);
- if (!isset($dirs['dir'][$curdir])) {
- $dirs['dir'][$curdir] = array();
- }
- $this->_addDir($dirs['dir'][$curdir], $dir, $file, $attributes, $tasks);
- }
-
- function _formatDir(&$dirs)
- {
- if (!count($dirs)) {
- return array();
- }
- $newdirs = array();
- if (isset($dirs['dir'])) {
- $newdirs['dir'] = $dirs['dir'];
- }
- if (isset($dirs['file'])) {
- $newdirs['file'] = $dirs['file'];
- }
- $dirs = $newdirs;
- if (isset($dirs['dir'])) {
- uksort($dirs['dir'], 'strnatcasecmp');
- foreach ($dirs['dir'] as $dir => $contents) {
- $this->_formatDir($dirs['dir'][$dir]);
- }
- }
- if (isset($dirs['file'])) {
- uksort($dirs['file'], 'strnatcasecmp');
- };
- }
-
- function _deFormat(&$dirs)
- {
- if (!count($dirs)) {
- return array();
- }
- $newdirs = array();
- if (isset($dirs['dir'])) {
- foreach ($dirs['dir'] as $dir => $contents) {
- $newdir = array();
- $newdir['attribs']['name'] = $dir;
- $this->_deFormat($contents);
- foreach ($contents as $tag => $val) {
- $newdir[$tag] = $val;
- }
- $newdirs['dir'][] = $newdir;
- }
- if (count($newdirs['dir']) == 1) {
- $newdirs['dir'] = $newdirs['dir'][0];
- }
- }
- if (isset($dirs['file'])) {
- foreach ($dirs['file'] as $name => $file) {
- $newdirs['file'][] = $file;
- }
- if (count($newdirs['file']) == 1) {
- $newdirs['file'] = $newdirs['file'][0];
- }
- }
- $dirs = $newdirs;
- }
-
- /**
- * reset all options to default options
- *
- * @access public
- * @see setOption(), XML_Unserializer()
- */
- function resetOptions()
- {
- $this->options = $this->_defaultOptions;
- }
-
- /**
- * set an option
- *
- * You can use this method if you do not want to set all options in the constructor
- *
- * @access public
- * @see resetOption(), XML_Serializer()
- */
- function setOption($name, $value)
- {
- $this->options[$name] = $value;
- }
-
- /**
- * sets several options at once
- *
- * You can use this method if you do not want to set all options in the constructor
- *
- * @access public
- * @see resetOption(), XML_Unserializer(), setOption()
- */
- function setOptions($options)
- {
- $this->options = array_merge($this->options, $options);
- }
-
- /**
- * serialize data
- *
- * @access public
- * @param mixed $data data to serialize
- * @return boolean true on success, pear error on failure
- */
- function serialize($data, $options = null)
- {
- // if options have been specified, use them instead
- // of the previously defined ones
- if (is_array($options)) {
- $optionsBak = $this->options;
- if (isset($options['overrideOptions']) && $options['overrideOptions'] == true) {
- $this->options = array_merge($this->_defaultOptions, $options);
- } else {
- $this->options = array_merge($this->options, $options);
- }
- } else {
- $optionsBak = null;
- }
-
- // start depth is zero
- $this->_tagDepth = 0;
- $this->_serializedData = '';
- // serialize an array
- if (is_array($data)) {
- $tagName = isset($this->options['rootName']) ? $this->options['rootName'] : 'array';
- $this->_serializedData .= $this->_serializeArray($data, $tagName, $this->options['rootAttributes']);
- }
-
- // add doctype declaration
- if ($this->options['addDoctype'] === true) {
- $this->_serializedData = XML_Util::getDoctypeDeclaration($tagName, $this->options['doctype'])
- . $this->options['linebreak']
- . $this->_serializedData;
- }
-
- // build xml declaration
- if ($this->options['addDecl']) {
- $atts = array();
- $encoding = isset($this->options['encoding']) ? $this->options['encoding'] : null;
- $this->_serializedData = XML_Util::getXMLDeclaration('1.0', $encoding)
- . $this->options['linebreak']
- . $this->_serializedData;
- }
-
-
- if ($optionsBak !== null) {
- $this->options = $optionsBak;
- }
-
- return true;
- }
-
- /**
- * get the result of the serialization
- *
- * @access public
- * @return string serialized XML
- */
- function getSerializedData()
- {
- if ($this->_serializedData === null) {
- return $this->raiseError('No serialized data available. Use XML_Serializer::serialize() first.', XML_SERIALIZER_ERROR_NO_SERIALIZATION);
- }
- return $this->_serializedData;
- }
-
- /**
- * serialize any value
- *
- * This method checks for the type of the value and calls the appropriate method
- *
- * @access private
- * @param mixed $value
- * @param string $tagName
- * @param array $attributes
- * @return string
- */
- function _serializeValue($value, $tagName = null, $attributes = array())
- {
- if (is_array($value)) {
- $xml = $this->_serializeArray($value, $tagName, $attributes);
- } elseif (is_object($value)) {
- $xml = $this->_serializeObject($value, $tagName);
- } else {
- $tag = array(
- 'qname' => $tagName,
- 'attributes' => $attributes,
- 'content' => $value
- );
- $xml = $this->_createXMLTag($tag);
- }
- return $xml;
- }
-
- /**
- * serialize an array
- *
- * @access private
- * @param array $array array to serialize
- * @param string $tagName name of the root tag
- * @param array $attributes attributes for the root tag
- * @return string $string serialized data
- * @uses XML_Util::isValidName() to check, whether key has to be substituted
- */
- function _serializeArray(&$array, $tagName = null, $attributes = array())
- {
- $_content = null;
-
- /**
- * check for special attributes
- */
- if ($this->options['attributesArray'] !== null) {
- if (isset($array[$this->options['attributesArray']])) {
- $attributes = $array[$this->options['attributesArray']];
- unset($array[$this->options['attributesArray']]);
- }
- /**
- * check for special content
- */
- if ($this->options['contentName'] !== null) {
- if (isset($array[$this->options['contentName']])) {
- $_content = $array[$this->options['contentName']];
- unset($array[$this->options['contentName']]);
- }
- }
- }
-
- /*
- * if mode is set to simpleXML, check whether
- * the array is associative or indexed
- */
- if (is_array($array) && $this->options['mode'] == 'simplexml') {
- $indexed = true;
- if (!count($array)) {
- $indexed = false;
- }
- foreach ($array as $key => $val) {
- if (!is_int($key)) {
- $indexed = false;
- break;
- }
- }
-
- if ($indexed && $this->options['mode'] == 'simplexml') {
- $string = '';
- foreach ($array as $key => $val) {
- if ($this->options['beautifyFilelist'] && $tagName == 'dir') {
- if (!isset($this->_curdir)) {
- $this->_curdir = '';
- }
- $savedir = $this->_curdir;
- if (isset($val['attribs'])) {
- if ($val['attribs']['name'] == '/') {
- $this->_curdir = '/';
- } else {
- if ($this->_curdir == '/') {
- $this->_curdir = '';
- }
- $this->_curdir .= '/' . $val['attribs']['name'];
- }
- }
- }
- $string .= $this->_serializeValue( $val, $tagName, $attributes);
- if ($this->options['beautifyFilelist'] && $tagName == 'dir') {
- $string .= ' <!-- ' . $this->_curdir . ' -->';
- if (empty($savedir)) {
- unset($this->_curdir);
- } else {
- $this->_curdir = $savedir;
- }
- }
-
- $string .= $this->options['linebreak'];
- // do indentation
- if ($this->options['indent'] !== null && $this->_tagDepth > 0) {
- $string .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
- }
- return rtrim($string);
- }
- }
-
- if ($this->options['scalarAsAttributes'] === true) {
- foreach ($array as $key => $value) {
- if (is_scalar($value) && (XML_Util::isValidName($key) === true)) {
- unset($array[$key]);
- $attributes[$this->options['prependAttributes'].$key] = $value;
- }
- }
- }
-
- // check for empty array => create empty tag
- if (empty($array)) {
- $tag = array(
- 'qname' => $tagName,
- 'content' => $_content,
- 'attributes' => $attributes
- );
-
- } else {
- $this->_tagDepth++;
- $tmp = $this->options['linebreak'];
- foreach ($array as $key => $value) {
- // do indentation
- if ($this->options['indent'] !== null && $this->_tagDepth > 0) {
- $tmp .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
-
- // copy key
- $origKey = $key;
- // key cannot be used as tagname => use default tag
- $valid = XML_Util::isValidName($key);
- if (PEAR::isError($valid)) {
- if ($this->options['classAsTagName'] && is_object($value)) {
- $key = get_class($value);
- } else {
- $key = $this->options['defaultTagName'];
- }
- }
- $atts = array();
- if ($this->options['typeHints'] === true) {
- $atts[$this->options['typeAttribute']] = gettype($value);
- if ($key !== $origKey) {
- $atts[$this->options['keyAttribute']] = (string)$origKey;
- }
-
- }
- if ($this->options['beautifyFilelist'] && $key == 'dir') {
- if (!isset($this->_curdir)) {
- $this->_curdir = '';
- }
- $savedir = $this->_curdir;
- if (isset($value['attribs'])) {
- if ($value['attribs']['name'] == '/') {
- $this->_curdir = '/';
- } else {
- $this->_curdir .= '/' . $value['attribs']['name'];
- }
- }
- }
-
- if (is_string($value) && $value && ($value{strlen($value) - 1} == "\n")) {
- $value .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
- $tmp .= $this->_createXMLTag(array(
- 'qname' => $key,
- 'attributes' => $atts,
- 'content' => $value )
- );
- if ($this->options['beautifyFilelist'] && $key == 'dir') {
- if (isset($value['attribs'])) {
- $tmp .= ' <!-- ' . $this->_curdir . ' -->';
- if (empty($savedir)) {
- unset($this->_curdir);
- } else {
- $this->_curdir = $savedir;
- }
- }
- }
- $tmp .= $this->options['linebreak'];
- }
-
- $this->_tagDepth--;
- if ($this->options['indent']!==null && $this->_tagDepth>0) {
- $tmp .= str_repeat($this->options['indent'], $this->_tagDepth);
- }
-
- if (trim($tmp) === '') {
- $tmp = null;
- }
-
- $tag = array(
- 'qname' => $tagName,
- 'content' => $tmp,
- 'attributes' => $attributes
- );
- }
- if ($this->options['typeHints'] === true) {
- if (!isset($tag['attributes'][$this->options['typeAttribute']])) {
- $tag['attributes'][$this->options['typeAttribute']] = 'array';
- }
- }
-
- $string = $this->_createXMLTag($tag, false);
- return $string;
- }
-
- /**
- * create a tag from an array
- * this method awaits an array in the following format
- * array(
- * 'qname' => $tagName,
- * 'attributes' => array(),
- * 'content' => $content, // optional
- * 'namespace' => $namespace // optional
- * 'namespaceUri' => $namespaceUri // optional
- * )
- *
- * @access private
- * @param array $tag tag definition
- * @param boolean $replaceEntities whether to replace XML entities in content or not
- * @return string $string XML tag
- */
- function _createXMLTag($tag, $replaceEntities = true)
- {
- if ($this->options['indentAttributes'] !== false) {
- $multiline = true;
- $indent = str_repeat($this->options['indent'], $this->_tagDepth);
-
- if ($this->options['indentAttributes'] == '_auto') {
- $indent .= str_repeat(' ', (strlen($tag['qname'])+2));
-
- } else {
- $indent .= $this->options['indentAttributes'];
- }
- } else {
- $indent = $multiline = false;
- }
-
- if (is_array($tag['content'])) {
- if (empty($tag['content'])) {
- $tag['content'] = '';
- }
- } elseif(is_scalar($tag['content']) && (string)$tag['content'] == '') {
- $tag['content'] = '';
- }
-
- if (is_scalar($tag['content']) || is_null($tag['content'])) {
- if ($replaceEntities === true) {
- $replaceEntities = XML_UTIL_ENTITIES_XML;
- }
-
- $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak']);
- } elseif (is_array($tag['content'])) {
- $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']);
- } elseif (is_object($tag['content'])) {
- $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']);
- } elseif (is_resource($tag['content'])) {
- settype($tag['content'], 'string');
- $tag = XML_Util::createTagFromArray($tag, $replaceEntities);
- }
- return $tag;
- }
-}
-<?php
-/**
- * package.xml parsing class, package.xml version 1.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * package.xml abstraction class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
-/**
- * Parser for package.xml version 1.0
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Parser_v1
-{
- var $_registry;
- var $_config;
- var $_logger;
- /**
- * BC hack to allow PEAR_Common::infoFromString() to sort of
- * work with the version 2.0 format - there's no filelist though
- * @param PEAR_PackageFile_v2
- */
- function fromV2($packagefile)
- {
- $info = $packagefile->getArray(true);
- $ret = new PEAR_PackageFile_v1;
- $ret->fromArray($info['old']);
- }
-
- function setConfig(&$c)
- {
- $this->_config = &$c;
- $this->_registry = &$c->getRegistry();
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
-
- /**
- * @param string contents of package.xml file, version 1.0
- * @return bool success of parsing
- */
- function &parse($data, $file, $archive = false)
- {
- if (!extension_loaded('xml')) {
- return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension');
- }
- $xp = xml_parser_create();
- if (!$xp) {
- $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml');
- return $a;
- }
- xml_set_object($xp, $this);
- xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0');
- xml_set_character_data_handler($xp, '_pkginfo_cdata_1_0');
- xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false);
-
- $this->element_stack = array();
- $this->_packageInfo = array('provides' => array());
- $this->current_element = false;
- unset($this->dir_install);
- $this->_packageInfo['filelist'] = array();
- $this->filelist =& $this->_packageInfo['filelist'];
- $this->dir_names = array();
- $this->in_changelog = false;
- $this->d_i = 0;
- $this->cdata = '';
- $this->_isValid = true;
-
- if (!xml_parse($xp, $data, 1)) {
- $code = xml_get_error_code($xp);
- $line = xml_get_current_line_number($xp);
- xml_parser_free($xp);
- $a = &PEAR::raiseError(sprintf("XML error: %s at line %d",
- $str = xml_error_string($code), $line), 2);
- return $a;
- }
-
- xml_parser_free($xp);
-
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->_config);
- if (isset($this->_logger)) {
- $pf->setLogger($this->_logger);
- }
- $pf->setPackagefile($file, $archive);
- $pf->fromArray($this->_packageInfo);
- return $pf;
- }
- // {{{ _unIndent()
-
- /**
- * Unindent given string
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- } elseif (trim(substr($line, 0, $indent_len))) {
- $data .= ltrim($line);
- }
- }
- return $data;
- }
-
- // Support for package DTD v1.0:
- // {{{ _element_start_1_0()
-
- /**
- * XML parser callback for ending elements. Used for version 1.0
- * packages.
- *
- * @param resource $xp XML parser resource
- * @param string $name name of ending element
- *
- * @return void
- *
- * @access private
- */
- function _element_start_1_0($xp, $name, $attribs)
- {
- array_push($this->element_stack, $name);
- $this->current_element = $name;
- $spos = sizeof($this->element_stack) - 2;
- $this->prev_element = ($spos >= 0) ? $this->element_stack[$spos] : '';
- $this->current_attributes = $attribs;
- $this->cdata = '';
- switch ($name) {
- case 'dir':
- if ($this->in_changelog) {
- break;
- }
- if (array_key_exists('name', $attribs) && $attribs['name'] != '/') {
- $attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
- $attribs['name']);
- if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) {
- $attribs['name'] = substr($attribs['name'], 0,
- strlen($attribs['name']) - 1);
- }
- if (strpos($attribs['name'], '/') === 0) {
- $attribs['name'] = substr($attribs['name'], 1);
- }
- $this->dir_names[] = $attribs['name'];
- }
- if (isset($attribs['baseinstalldir'])) {
- $this->dir_install = $attribs['baseinstalldir'];
- }
- if (isset($attribs['role'])) {
- $this->dir_role = $attribs['role'];
- }
- break;
- case 'file':
- if ($this->in_changelog) {
- break;
- }
- if (isset($attribs['name'])) {
- $path = '';
- if (count($this->dir_names)) {
- foreach ($this->dir_names as $dir) {
- $path .= $dir . '/';
- }
- }
- $path .= preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
- $attribs['name']);
- unset($attribs['name']);
- $this->current_path = $path;
- $this->filelist[$path] = $attribs;
- // Set the baseinstalldir only if the file don't have this attrib
- if (!isset($this->filelist[$path]['baseinstalldir']) &&
- isset($this->dir_install))
- {
- $this->filelist[$path]['baseinstalldir'] = $this->dir_install;
- }
- // Set the Role
- if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) {
- $this->filelist[$path]['role'] = $this->dir_role;
- }
- }
- break;
- case 'replace':
- if (!$this->in_changelog) {
- $this->filelist[$this->current_path]['replacements'][] = $attribs;
- }
- break;
- case 'maintainers':
- $this->_packageInfo['maintainers'] = array();
- $this->m_i = 0; // maintainers array index
- break;
- case 'maintainer':
- // compatibility check
- if (!isset($this->_packageInfo['maintainers'])) {
- $this->_packageInfo['maintainers'] = array();
- $this->m_i = 0;
- }
- $this->_packageInfo['maintainers'][$this->m_i] = array();
- $this->current_maintainer =& $this->_packageInfo['maintainers'][$this->m_i];
- break;
- case 'changelog':
- $this->_packageInfo['changelog'] = array();
- $this->c_i = 0; // changelog array index
- $this->in_changelog = true;
- break;
- case 'release':
- if ($this->in_changelog) {
- $this->_packageInfo['changelog'][$this->c_i] = array();
- $this->current_release = &$this->_packageInfo['changelog'][$this->c_i];
- } else {
- $this->current_release = &$this->_packageInfo;
- }
- break;
- case 'deps':
- if (!$this->in_changelog) {
- $this->_packageInfo['release_deps'] = array();
- }
- break;
- case 'dep':
- // dependencies array index
- if (!$this->in_changelog) {
- $this->d_i++;
- isset($attribs['type']) ? ($attribs['type'] = strtolower($attribs['type'])) : false;
- $this->_packageInfo['release_deps'][$this->d_i] = $attribs;
- }
- break;
- case 'configureoptions':
- if (!$this->in_changelog) {
- $this->_packageInfo['configure_options'] = array();
- }
- break;
- case 'configureoption':
- if (!$this->in_changelog) {
- $this->_packageInfo['configure_options'][] = $attribs;
- }
- break;
- case 'provides':
- if (empty($attribs['type']) || empty($attribs['name'])) {
- break;
- }
- $attribs['explicit'] = true;
- $this->_packageInfo['provides']["$attribs[type];$attribs[name]"] = $attribs;
- break;
- case 'package' :
- if (isset($attribs['version'])) {
- $this->_packageInfo['xsdversion'] = trim($attribs['version']);
- } else {
- $this->_packageInfo['xsdversion'] = '1.0';
- }
- if (isset($attribs['packagerversion'])) {
- $this->_packageInfo['packagerversion'] = $attribs['packagerversion'];
- }
- break;
- }
- }
-
- // }}}
- // {{{ _element_end_1_0()
-
- /**
- * XML parser callback for ending elements. Used for version 1.0
- * packages.
- *
- * @param resource $xp XML parser resource
- * @param string $name name of ending element
- *
- * @return void
- *
- * @access private
- */
- function _element_end_1_0($xp, $name)
- {
- $data = trim($this->cdata);
- switch ($name) {
- case 'name':
- switch ($this->prev_element) {
- case 'package':
- $this->_packageInfo['package'] = $data;
- break;
- case 'maintainer':
- $this->current_maintainer['name'] = $data;
- break;
- }
- break;
- case 'extends' :
- $this->_packageInfo['extends'] = $data;
- break;
- case 'summary':
- $this->_packageInfo['summary'] = $data;
- break;
- case 'description':
- $data = $this->_unIndent($this->cdata);
- $this->_packageInfo['description'] = $data;
- break;
- case 'user':
- $this->current_maintainer['handle'] = $data;
- break;
- case 'email':
- $this->current_maintainer['email'] = $data;
- break;
- case 'role':
- $this->current_maintainer['role'] = $data;
- break;
- case 'version':
- if ($this->in_changelog) {
- $this->current_release['version'] = $data;
- } else {
- $this->_packageInfo['version'] = $data;
- }
- break;
- case 'date':
- if ($this->in_changelog) {
- $this->current_release['release_date'] = $data;
- } else {
- $this->_packageInfo['release_date'] = $data;
- }
- break;
- case 'notes':
- // try to "de-indent" release notes in case someone
- // has been over-indenting their xml ;-)
- // Trim only on the right side
- $data = rtrim($this->_unIndent($this->cdata));
- if ($this->in_changelog) {
- $this->current_release['release_notes'] = $data;
- } else {
- $this->_packageInfo['release_notes'] = $data;
- }
- break;
- case 'warnings':
- if ($this->in_changelog) {
- $this->current_release['release_warnings'] = $data;
- } else {
- $this->_packageInfo['release_warnings'] = $data;
- }
- break;
- case 'state':
- if ($this->in_changelog) {
- $this->current_release['release_state'] = $data;
- } else {
- $this->_packageInfo['release_state'] = $data;
- }
- break;
- case 'license':
- if ($this->in_changelog) {
- $this->current_release['release_license'] = $data;
- } else {
- $this->_packageInfo['release_license'] = $data;
- }
- break;
- case 'dep':
- if ($data && !$this->in_changelog) {
- $this->_packageInfo['release_deps'][$this->d_i]['name'] = $data;
- }
- break;
- case 'dir':
- if ($this->in_changelog) {
- break;
- }
- array_pop($this->dir_names);
- break;
- case 'file':
- if ($this->in_changelog) {
- break;
- }
- if ($data) {
- $path = '';
- if (count($this->dir_names)) {
- foreach ($this->dir_names as $dir) {
- $path .= $dir . '/';
- }
- }
- $path .= $data;
- $this->filelist[$path] = $this->current_attributes;
- // Set the baseinstalldir only if the file don't have this attrib
- if (!isset($this->filelist[$path]['baseinstalldir']) &&
- isset($this->dir_install))
- {
- $this->filelist[$path]['baseinstalldir'] = $this->dir_install;
- }
- // Set the Role
- if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) {
- $this->filelist[$path]['role'] = $this->dir_role;
- }
- }
- break;
- case 'maintainer':
- if (empty($this->_packageInfo['maintainers'][$this->m_i]['role'])) {
- $this->_packageInfo['maintainers'][$this->m_i]['role'] = 'lead';
- }
- $this->m_i++;
- break;
- case 'release':
- if ($this->in_changelog) {
- $this->c_i++;
- }
- break;
- case 'changelog':
- $this->in_changelog = false;
- break;
- }
- array_pop($this->element_stack);
- $spos = sizeof($this->element_stack) - 1;
- $this->current_element = ($spos > 0) ? $this->element_stack[$spos] : '';
- $this->cdata = '';
- }
-
- // }}}
- // {{{ _pkginfo_cdata_1_0()
-
- /**
- * XML parser callback for character data. Used for version 1.0
- * packages.
- *
- * @param resource $xp XML parser resource
- * @param string $name character data
- *
- * @return void
- *
- * @access private
- */
- function _pkginfo_cdata_1_0($xp, $data)
- {
- if (isset($this->cdata)) {
- $this->cdata .= $data;
- }
- }
-
- // }}}
-}
-?><?php
-/**
- * package.xml parsing class, package.xml version 2.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * base xml parser class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
-/**
- * Parser for package.xml version 2.0
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser
-{
- var $_config;
- var $_logger;
- var $_registry;
-
- function setConfig(&$c)
- {
- $this->_config = &$c;
- $this->_registry = &$c->getRegistry();
- }
-
- function setLogger(&$l)
- {
- $this->_logger = &$l;
- }
- /**
- * Unindent given string
- *
- * @param string $str The string that has to be unindented.
- * @return string
- * @access private
- */
- function _unIndent($str)
- {
- // remove leading newlines
- $str = preg_replace('/^[\r\n]+/', '', $str);
- // find whitespace at the beginning of the first line
- $indent_len = strspn($str, " \t");
- $indent = substr($str, 0, $indent_len);
- $data = '';
- // remove the same amount of whitespace from following lines
- foreach (explode("\n", $str) as $line) {
- if (substr($line, 0, $indent_len) == $indent) {
- $data .= substr($line, $indent_len) . "\n";
- } else {
- $data .= $line . "\n";
- }
- }
- return $data;
- }
-
- /**
- * post-process data
- *
- * @param string $data
- * @param string $element element name
- */
- function postProcess($data, $element)
- {
- if ($element == 'notes') {
- return trim($this->_unIndent($data));
- }
- return trim($data);
- }
-
- /**
- * @param string
- * @param string file name of the package.xml
- * @param string|false name of the archive this package.xml came from, if any
- * @param string class name to instantiate and return. This must be PEAR_PackageFile_v2 or
- * a subclass
- * @return PEAR_PackageFile_v2
- */
- function &parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2')
- {
- if (PEAR::isError($err = parent::parse($data, $file))) {
- return $err;
- }
-
- $ret = new $class;
- $ret->encoding = $this->encoding;
- $ret->setConfig($this->_config);
- if (isset($this->_logger)) {
- $ret->setLogger($this->_logger);
- }
-
- $ret->fromArray($this->_unserializedData);
- $ret->setPackagefile($file, $archive);
- return $ret;
- }
-}<?php
-/**
- * PEAR_PackageFile_v1, package.xml version 1.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * For error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ErrorStack.php';
-
-/**
- * Error code if parsing is attempted with no xml extension
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_XML_EXT', 3);
-
-/**
- * Error code if creating the xml parser resource fails
- */
-define('PEAR_PACKAGEFILE_ERROR_CANT_MAKE_PARSER', 4);
-
-/**
- * Error code used for all sax xml parsing errors
- */
-define('PEAR_PACKAGEFILE_ERROR_PARSER_ERROR', 5);
-
-/**
- * Error code used when there is no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_NAME', 6);
-
-/**
- * Error code when a package name is not valid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_NAME', 7);
-
-/**
- * Error code used when no summary is parsed
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_SUMMARY', 8);
-
-/**
- * Error code for summaries that are more than 1 line
- */
-define('PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY', 9);
-
-/**
- * Error code used when no description is present
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION', 10);
-
-/**
- * Error code used when no license is present
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_LICENSE', 11);
-
-/**
- * Error code used when a <version> version number is not present
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_VERSION', 12);
-
-/**
- * Error code used when a <version> version number is invalid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_VERSION', 13);
-
-/**
- * Error code when release state is missing
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_STATE', 14);
-
-/**
- * Error code when release state is invalid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_STATE', 15);
-
-/**
- * Error code when release state is missing
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DATE', 16);
-
-/**
- * Error code when release state is invalid
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DATE', 17);
-
-/**
- * Error code when no release notes are found
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_NOTES', 18);
-
-/**
- * Error code when no maintainers are found
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS', 19);
-
-/**
- * Error code when a maintainer has no handle
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE', 20);
-
-/**
- * Error code when a maintainer has no handle
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE', 21);
-
-/**
- * Error code when a maintainer has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME', 22);
-
-/**
- * Error code when a maintainer has no email
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL', 23);
-
-/**
- * Error code when a maintainer has no handle
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_MAINTROLE', 24);
-
-/**
- * Error code when a dependency is not a PHP dependency, but has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPNAME', 25);
-
-/**
- * Error code when a dependency has no type (pkg, php, etc.)
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE', 26);
-
-/**
- * Error code when a dependency has no relation (lt, ge, has, etc.)
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPREL', 27);
-
-/**
- * Error code when a dependency is not a 'has' relation, but has no version
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION', 28);
-
-/**
- * Error code when a dependency has an invalid relation
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPREL', 29);
-
-/**
- * Error code when a dependency has an invalid type
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPTYPE', 30);
-
-/**
- * Error code when a dependency has an invalid optional option
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL', 31);
-
-/**
- * Error code when a dependency is a pkg dependency, and has an invalid package name
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPNAME', 32);
-
-/**
- * Error code when a dependency has a channel="foo" attribute, and foo is not a registered channel
- */
-define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_DEPCHANNEL', 33);
-
-/**
- * Error code when rel="has" and version attribute is present.
- */
-define('PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED', 34);
-
-/**
- * Error code when type="php" and dependency name is present
- */
-define('PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED', 35);
-
-/**
- * Error code when a configure option has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_CONFNAME', 36);
-
-/**
- * Error code when a configure option has no name
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT', 37);
-
-/**
- * Error code when a file in the filelist has an invalid role
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE', 38);
-
-/**
- * Error code when a file in the filelist has no role
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_FILEROLE', 39);
-
-/**
- * Error code when analyzing a php source file that has parse errors
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE', 40);
-
-/**
- * Error code when analyzing a php source file reveals a source element
- * without a package name prefix
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX', 41);
-
-/**
- * Error code when an unknown channel is specified
- */
-define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_CHANNEL', 42);
-
-/**
- * Error code when no files are found in the filelist
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_FILES', 43);
-
-/**
- * Error code when a file is not valid php according to _analyzeSourceCode()
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_FILE', 44);
-
-/**
- * Error code when the channel validator returns an error or warning
- */
-define('PEAR_PACKAGEFILE_ERROR_CHANNELVAL', 45);
-
-/**
- * Error code when a php5 package is packaged in php4 (analysis doesn't work)
- */
-define('PEAR_PACKAGEFILE_ERROR_PHP5', 46);
-
-/**
- * Error code when a file is listed in package.xml but does not exist
- */
-define('PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND', 47);
-
-/**
- * Error code when a <dep type="php" rel="not"... is encountered (use rel="ne")
- */
-define('PEAR_PACKAGEFILE_PHP_NO_NOT', 48);
-
-/**
- * Error code when a package.xml contains non-ISO-8859-1 characters
- */
-define('PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS', 49);
-
-/**
- * Error code when a dependency is not a 'has' relation, but has no version
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION', 50);
-
-/**
- * Error code when a package has no lead developer
- */
-define('PEAR_PACKAGEFILE_ERROR_NO_LEAD', 51);
-
-/**
- * Error code when a filename begins with "."
- */
-define('PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME', 52);
-/**
- * package.xml encapsulator
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_v1
-{
- /**
- * @access private
- * @var PEAR_ErrorStack
- * @access private
- */
- var $_stack;
-
- /**
- * A registry object, used to access the package name validation regex for non-standard channels
- * @var PEAR_Registry
- * @access private
- */
- var $_registry;
-
- /**
- * An object that contains a log method that matches PEAR_Common::log's signature
- * @var object
- * @access private
- */
- var $_logger;
-
- /**
- * Parsed package information
- * @var array
- * @access private
- */
- var $_packageInfo;
-
- /**
- * path to package.xml
- * @var string
- * @access private
- */
- var $_packageFile;
-
- /**
- * path to package .tgz or false if this is a local/extracted package.xml
- * @var string
- * @access private
- */
- var $_archiveFile;
-
- /**
- * @var int
- * @access private
- */
- var $_isValid = 0;
-
- /**
- * Determines whether this packagefile was initialized only with partial package info
- *
- * If this package file was constructed via parsing REST, it will only contain
- *
- * - package name
- * - channel name
- * - dependencies
- * @var boolean
- * @access private
- */
- var $_incomplete = true;
-
- /**
- * @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack
- * @param string Name of Error Stack class to use.
- */
- function __construct()
- {
- $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v1');
- $this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
- $this->_isValid = 0;
- }
-
- function installBinary($installer)
- {
- return false;
- }
-
- function isExtension($name)
- {
- return false;
- }
-
- function setConfig(&$config)
- {
- $this->_config = &$config;
- $this->_registry = &$config->getRegistry();
- }
-
- function setRequestedGroup()
- {
- // placeholder
- }
-
- /**
- * For saving in the registry.
- *
- * Set the last version that was installed
- * @param string
- */
- function setLastInstalledVersion($version)
- {
- $this->_packageInfo['_lastversion'] = $version;
- }
-
- /**
- * @return string|false
- */
- function getLastInstalledVersion()
- {
- if (isset($this->_packageInfo['_lastversion'])) {
- return $this->_packageInfo['_lastversion'];
- }
- return false;
- }
-
- function getInstalledBinary()
- {
- return false;
- }
-
- function listPostinstallScripts()
- {
- return false;
- }
-
- function initPostinstallScripts()
- {
- return false;
- }
-
- function setLogger(&$logger)
- {
- if ($logger && (!is_object($logger) || !method_exists($logger, 'log'))) {
- return PEAR::raiseError('Logger must be compatible with PEAR_Common::log');
- }
- $this->_logger = &$logger;
- }
-
- function setPackagefile($file, $archive = false)
- {
- $this->_packageFile = $file;
- $this->_archiveFile = $archive ? $archive : $file;
- }
-
- function getPackageFile()
- {
- return isset($this->_packageFile) ? $this->_packageFile : false;
- }
-
- function getPackageType()
- {
- return 'php';
- }
-
- function getArchiveFile()
- {
- return $this->_archiveFile;
- }
-
- function packageInfo($field)
- {
- if (!is_string($field) || empty($field) ||
- !isset($this->_packageInfo[$field])) {
- return false;
- }
- return $this->_packageInfo[$field];
- }
-
- function setDirtree($path)
- {
- if (!isset($this->_packageInfo['dirtree'])) {
- $this->_packageInfo['dirtree'] = array();
- }
- $this->_packageInfo['dirtree'][$path] = true;
- }
-
- function getDirtree()
- {
- if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) {
- return $this->_packageInfo['dirtree'];
- }
- return false;
- }
-
- function resetDirtree()
- {
- unset($this->_packageInfo['dirtree']);
- }
-
- function fromArray($pinfo)
- {
- $this->_incomplete = false;
- $this->_packageInfo = $pinfo;
- }
-
- function isIncomplete()
- {
- return $this->_incomplete;
- }
-
- function getChannel()
- {
- return 'pear.php.net';
- }
-
- function getUri()
- {
- return false;
- }
-
- function getTime()
- {
- return false;
- }
-
- function getExtends()
- {
- if (isset($this->_packageInfo['extends'])) {
- return $this->_packageInfo['extends'];
- }
- return false;
- }
-
- /**
- * @return array
- */
- function toArray()
- {
- if (!$this->validate(PEAR_VALIDATE_NORMAL)) {
- return false;
- }
- return $this->getArray();
- }
-
- function getArray()
- {
- return $this->_packageInfo;
- }
-
- function getName()
- {
- return $this->getPackage();
- }
-
- function getPackage()
- {
- if (isset($this->_packageInfo['package'])) {
- return $this->_packageInfo['package'];
- }
- return false;
- }
-
- /**
- * WARNING - don't use this unless you know what you are doing
- */
- function setRawPackage($package)
- {
- $this->_packageInfo['package'] = $package;
- }
-
- function setPackage($package)
- {
- $this->_packageInfo['package'] = $package;
- $this->_isValid = false;
- }
-
- function getVersion()
- {
- if (isset($this->_packageInfo['version'])) {
- return $this->_packageInfo['version'];
- }
- return false;
- }
-
- function setVersion($version)
- {
- $this->_packageInfo['version'] = $version;
- $this->_isValid = false;
- }
-
- function clearMaintainers()
- {
- unset($this->_packageInfo['maintainers']);
- }
-
- function getMaintainers()
- {
- if (isset($this->_packageInfo['maintainers'])) {
- return $this->_packageInfo['maintainers'];
- }
- return false;
- }
-
- /**
- * Adds a new maintainer - no checking of duplicates is performed, use
- * updatemaintainer for that purpose.
- */
- function addMaintainer($role, $handle, $name, $email)
- {
- $this->_packageInfo['maintainers'][] =
- array('handle' => $handle, 'role' => $role, 'email' => $email, 'name' => $name);
- $this->_isValid = false;
- }
-
- function updateMaintainer($role, $handle, $name, $email)
- {
- $found = false;
- if (!isset($this->_packageInfo['maintainers']) ||
- !is_array($this->_packageInfo['maintainers'])) {
- return $this->addMaintainer($role, $handle, $name, $email);
- }
- foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) {
- if ($maintainer['handle'] == $handle) {
- $found = $i;
- break;
- }
- }
- if ($found !== false) {
- unset($this->_packageInfo['maintainers'][$found]);
- $this->_packageInfo['maintainers'] =
- array_values($this->_packageInfo['maintainers']);
- }
- $this->addMaintainer($role, $handle, $name, $email);
- }
-
- function deleteMaintainer($handle)
- {
- $found = false;
- foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) {
- if ($maintainer['handle'] == $handle) {
- $found = $i;
- break;
- }
- }
- if ($found !== false) {
- unset($this->_packageInfo['maintainers'][$found]);
- $this->_packageInfo['maintainers'] =
- array_values($this->_packageInfo['maintainers']);
- return true;
- }
- return false;
- }
-
- function getState()
- {
- if (isset($this->_packageInfo['release_state'])) {
- return $this->_packageInfo['release_state'];
- }
- return false;
- }
-
- function setRawState($state)
- {
- $this->_packageInfo['release_state'] = $state;
- }
-
- function setState($state)
- {
- $this->_packageInfo['release_state'] = $state;
- $this->_isValid = false;
- }
-
- function getDate()
- {
- if (isset($this->_packageInfo['release_date'])) {
- return $this->_packageInfo['release_date'];
- }
- return false;
- }
-
- function setDate($date)
- {
- $this->_packageInfo['release_date'] = $date;
- $this->_isValid = false;
- }
-
- function getLicense()
- {
- if (isset($this->_packageInfo['release_license'])) {
- return $this->_packageInfo['release_license'];
- }
- return false;
- }
-
- function setLicense($date)
- {
- $this->_packageInfo['release_license'] = $date;
- $this->_isValid = false;
- }
-
- function getSummary()
- {
- if (isset($this->_packageInfo['summary'])) {
- return $this->_packageInfo['summary'];
- }
- return false;
- }
-
- function setSummary($summary)
- {
- $this->_packageInfo['summary'] = $summary;
- $this->_isValid = false;
- }
-
- function getDescription()
- {
- if (isset($this->_packageInfo['description'])) {
- return $this->_packageInfo['description'];
- }
- return false;
- }
-
- function setDescription($desc)
- {
- $this->_packageInfo['description'] = $desc;
- $this->_isValid = false;
- }
-
- function getNotes()
- {
- if (isset($this->_packageInfo['release_notes'])) {
- return $this->_packageInfo['release_notes'];
- }
- return false;
- }
-
- function setNotes($notes)
- {
- $this->_packageInfo['release_notes'] = $notes;
- $this->_isValid = false;
- }
-
- function getDeps()
- {
- if (isset($this->_packageInfo['release_deps'])) {
- return $this->_packageInfo['release_deps'];
- }
- return false;
- }
-
- /**
- * Reset dependencies prior to adding new ones
- */
- function clearDeps()
- {
- unset($this->_packageInfo['release_deps']);
- }
-
- function addPhpDep($version, $rel)
- {
- $this->_isValid = false;
- $this->_packageInfo['release_deps'][] =
- array('type' => 'php',
- 'rel' => $rel,
- 'version' => $version);
- }
-
- function addPackageDep($name, $version, $rel, $optional = 'no')
- {
- $this->_isValid = false;
- $dep =
- array('type' => 'pkg',
- 'name' => $name,
- 'rel' => $rel,
- 'optional' => $optional);
- if ($rel != 'has' && $rel != 'not') {
- $dep['version'] = $version;
- }
- $this->_packageInfo['release_deps'][] = $dep;
- }
-
- function addExtensionDep($name, $version, $rel, $optional = 'no')
- {
- $this->_isValid = false;
- $this->_packageInfo['release_deps'][] =
- array('type' => 'ext',
- 'name' => $name,
- 'rel' => $rel,
- 'version' => $version,
- 'optional' => $optional);
- }
-
- /**
- * WARNING - do not use this function directly unless you know what you're doing
- */
- function setDeps($deps)
- {
- $this->_packageInfo['release_deps'] = $deps;
- }
-
- function hasDeps()
- {
- return isset($this->_packageInfo['release_deps']) &&
- count($this->_packageInfo['release_deps']);
- }
-
- function getDependencyGroup($group)
- {
- return false;
- }
-
- function isCompatible($pf)
- {
- return false;
- }
-
- function isSubpackageOf($p)
- {
- return $p->isSubpackage($this);
- }
-
- function isSubpackage($p)
- {
- return false;
- }
-
- function dependsOn($package, $channel)
- {
- if (strtolower($channel) != 'pear.php.net') {
- return false;
- }
- if (!($deps = $this->getDeps())) {
- return false;
- }
- foreach ($deps as $dep) {
- if ($dep['type'] != 'pkg') {
- continue;
- }
- if (strtolower($dep['name']) == strtolower($package)) {
- return true;
- }
- }
- return false;
- }
-
- function getConfigureOptions()
- {
- if (isset($this->_packageInfo['configure_options'])) {
- return $this->_packageInfo['configure_options'];
- }
- return false;
- }
-
- function hasConfigureOptions()
- {
- return isset($this->_packageInfo['configure_options']) &&
- count($this->_packageInfo['configure_options']);
- }
-
- function addConfigureOption($name, $prompt, $default = false)
- {
- $o = array('name' => $name, 'prompt' => $prompt);
- if ($default !== false) {
- $o['default'] = $default;
- }
- if (!isset($this->_packageInfo['configure_options'])) {
- $this->_packageInfo['configure_options'] = array();
- }
- $this->_packageInfo['configure_options'][] = $o;
- }
-
- function clearConfigureOptions()
- {
- unset($this->_packageInfo['configure_options']);
- }
-
- function getProvides()
- {
- if (isset($this->_packageInfo['provides'])) {
- return $this->_packageInfo['provides'];
- }
- return false;
- }
-
- function getProvidesExtension()
- {
- return false;
- }
-
- function addFile($dir, $file, $attrs)
- {
- $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir);
- if ($dir == '/' || $dir == '') {
- $dir = '';
- } else {
- $dir .= '/';
- }
- $file = $dir . $file;
- $file = preg_replace('![\\/]+!', '/', $file);
- $this->_packageInfo['filelist'][$file] = $attrs;
- }
-
- function getInstallationFilelist()
- {
- return $this->getFilelist();
- }
-
- function getFilelist()
- {
- if (isset($this->_packageInfo['filelist'])) {
- return $this->_packageInfo['filelist'];
- }
- return false;
- }
-
- function setFileAttribute($file, $attr, $value)
- {
- $this->_packageInfo['filelist'][$file][$attr] = $value;
- }
-
- function resetFilelist()
- {
- $this->_packageInfo['filelist'] = array();
- }
-
- function setInstalledAs($file, $path)
- {
- if ($path) {
- return $this->_packageInfo['filelist'][$file]['installed_as'] = $path;
- }
- unset($this->_packageInfo['filelist'][$file]['installed_as']);
- }
-
- function installedFile($file, $atts)
- {
- if (isset($this->_packageInfo['filelist'][$file])) {
- $this->_packageInfo['filelist'][$file] =
- array_merge($this->_packageInfo['filelist'][$file], $atts);
- } else {
- $this->_packageInfo['filelist'][$file] = $atts;
- }
- }
-
- function getChangelog()
- {
- if (isset($this->_packageInfo['changelog'])) {
- return $this->_packageInfo['changelog'];
- }
- return false;
- }
-
- function getPackagexmlVersion()
- {
- return '1.0';
- }
-
- /**
- * Wrapper to {@link PEAR_ErrorStack::getErrors()}
- * @param boolean determines whether to purge the error stack after retrieving
- * @return array
- */
- function getValidationWarnings($purge = true)
- {
- return $this->_stack->getErrors($purge);
- }
-
- // }}}
- /**
- * Validation error. Also marks the object contents as invalid
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateError($code, $params = array())
- {
- $this->_stack->push($code, 'error', $params, false, false, debug_backtrace());
- $this->_isValid = false;
- }
-
- /**
- * Validation warning. Does not mark the object contents invalid.
- * @param error code
- * @param array error information
- * @access private
- */
- function _validateWarning($code, $params = array())
- {
- $this->_stack->push($code, 'warning', $params, false, false, debug_backtrace());
- }
-
- /**
- * @param integer error code
- * @access protected
- */
- function _getErrorMessage()
- {
- return array(
- PEAR_PACKAGEFILE_ERROR_NO_NAME =>
- 'Missing Package Name',
- PEAR_PACKAGEFILE_ERROR_NO_SUMMARY =>
- 'No summary found',
- PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY =>
- 'Summary should be on one line',
- PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION =>
- 'Missing description',
- PEAR_PACKAGEFILE_ERROR_NO_LICENSE =>
- 'Missing license',
- PEAR_PACKAGEFILE_ERROR_NO_VERSION =>
- 'No release version found',
- PEAR_PACKAGEFILE_ERROR_NO_STATE =>
- 'No release state found',
- PEAR_PACKAGEFILE_ERROR_NO_DATE =>
- 'No release date found',
- PEAR_PACKAGEFILE_ERROR_NO_NOTES =>
- 'No release notes found',
- PEAR_PACKAGEFILE_ERROR_NO_LEAD =>
- 'Package must have at least one lead maintainer',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS =>
- 'No maintainers found, at least one must be defined',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE =>
- 'Maintainer %index% has no handle (user ID at channel server)',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE =>
- 'Maintainer %index% has no role',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME =>
- 'Maintainer %index% has no name',
- PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL =>
- 'Maintainer %index% has no email',
- PEAR_PACKAGEFILE_ERROR_NO_DEPNAME =>
- 'Dependency %index% is not a php dependency, and has no name',
- PEAR_PACKAGEFILE_ERROR_NO_DEPREL =>
- 'Dependency %index% has no relation (rel)',
- PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE =>
- 'Dependency %index% has no type',
- PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED =>
- 'PHP Dependency %index% has a name attribute of "%name%" which will be' .
- ' ignored!',
- PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION =>
- 'Dependency %index% is not a rel="has" or rel="not" dependency, ' .
- 'and has no version',
- PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION =>
- 'Dependency %index% is a type="php" dependency, ' .
- 'and has no version',
- PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED =>
- 'Dependency %index% is a rel="%rel%" dependency, versioning is ignored',
- PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL =>
- 'Dependency %index% has invalid optional value "%opt%", should be yes or no',
- PEAR_PACKAGEFILE_PHP_NO_NOT =>
- 'Dependency %index%: php dependencies cannot use "not" rel, use "ne"' .
- ' to exclude specific versions',
- PEAR_PACKAGEFILE_ERROR_NO_CONFNAME =>
- 'Configure Option %index% has no name',
- PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT =>
- 'Configure Option %index% has no prompt',
- PEAR_PACKAGEFILE_ERROR_NO_FILES =>
- 'No files in <filelist> section of package.xml',
- PEAR_PACKAGEFILE_ERROR_NO_FILEROLE =>
- 'File "%file%" has no role, expecting one of "%roles%"',
- PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE =>
- 'File "%file%" has invalid role "%role%", expecting one of "%roles%"',
- PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME =>
- 'File "%file%" cannot start with ".", cannot package or install',
- PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE =>
- 'Parser error: invalid PHP found in file "%file%"',
- PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX =>
- 'in %file%: %type% "%name%" not prefixed with package name "%package%"',
- PEAR_PACKAGEFILE_ERROR_INVALID_FILE =>
- 'Parser error: invalid PHP file "%file%"',
- PEAR_PACKAGEFILE_ERROR_CHANNELVAL =>
- 'Channel validator error: field "%field%" - %reason%',
- PEAR_PACKAGEFILE_ERROR_PHP5 =>
- 'Error, PHP5 token encountered in %file%, analysis should be in PHP5',
- PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND =>
- 'File "%file%" in package.xml does not exist',
- PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS =>
- 'Package.xml contains non-ISO-8859-1 characters, and may not validate',
- );
- }
-
- /**
- * Validate XML package definition file.
- *
- * @access public
- * @return boolean
- */
- function validate($state = PEAR_VALIDATE_NORMAL, $nofilechecking = false)
- {
- if (($this->_isValid & $state) == $state) {
- return true;
- }
- $this->_isValid = true;
- $info = $this->_packageInfo;
- if (empty($info['package'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NAME);
- $this->_packageName = $pn = 'unknown';
- } else {
- $this->_packageName = $pn = $info['package'];
- }
-
- if (empty($info['summary'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_SUMMARY);
- } elseif (strpos(trim($info['summary']), "\n") !== false) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY,
- array('summary' => $info['summary']));
- }
- if (empty($info['description'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION);
- }
- if (empty($info['release_license'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LICENSE);
- }
- if (empty($info['version'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_VERSION);
- }
- if (empty($info['release_state'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_STATE);
- }
- if (empty($info['release_date'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DATE);
- }
- if (empty($info['release_notes'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NOTES);
- }
- if (empty($info['maintainers'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS);
- } else {
- $haslead = false;
- $i = 1;
- foreach ($info['maintainers'] as $m) {
- if (empty($m['handle'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE,
- array('index' => $i));
- }
- if (empty($m['role'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE,
- array('index' => $i, 'roles' => PEAR_Common::getUserRoles()));
- } elseif ($m['role'] == 'lead') {
- $haslead = true;
- }
- if (empty($m['name'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME,
- array('index' => $i));
- }
- if (empty($m['email'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL,
- array('index' => $i));
- }
- $i++;
- }
- if (!$haslead) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LEAD);
- }
- }
- if (!empty($info['release_deps'])) {
- $i = 1;
- foreach ($info['release_deps'] as $d) {
- if (!isset($d['type']) || empty($d['type'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE,
- array('index' => $i, 'types' => PEAR_Common::getDependencyTypes()));
- continue;
- }
- if (!isset($d['rel']) || empty($d['rel'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPREL,
- array('index' => $i, 'rels' => PEAR_Common::getDependencyRelations()));
- continue;
- }
- if (!empty($d['optional'])) {
- if (!in_array($d['optional'], array('yes', 'no'))) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL,
- array('index' => $i, 'opt' => $d['optional']));
- }
- }
- if ($d['rel'] != 'has' && $d['rel'] != 'not' && empty($d['version'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION,
- array('index' => $i));
- } elseif (($d['rel'] == 'has' || $d['rel'] == 'not') && !empty($d['version'])) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED,
- array('index' => $i, 'rel' => $d['rel']));
- }
- if ($d['type'] == 'php' && !empty($d['name'])) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED,
- array('index' => $i, 'name' => $d['name']));
- } elseif ($d['type'] != 'php' && empty($d['name'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPNAME,
- array('index' => $i));
- }
- if ($d['type'] == 'php' && empty($d['version'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION,
- array('index' => $i));
- }
- if (($d['rel'] == 'not') && ($d['type'] == 'php')) {
- $this->_validateError(PEAR_PACKAGEFILE_PHP_NO_NOT,
- array('index' => $i));
- }
- $i++;
- }
- }
- if (!empty($info['configure_options'])) {
- $i = 1;
- foreach ($info['configure_options'] as $c) {
- if (empty($c['name'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFNAME,
- array('index' => $i));
- }
- if (empty($c['prompt'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT,
- array('index' => $i));
- }
- $i++;
- }
- }
- if (empty($info['filelist'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILES);
- $errors[] = 'no files';
- } else {
- foreach ($info['filelist'] as $file => $fa) {
- if (empty($fa['role'])) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILEROLE,
- array('file' => $file, 'roles' => PEAR_Common::getFileRoles()));
- continue;
- } elseif (!in_array($fa['role'], PEAR_Common::getFileRoles())) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE,
- array('file' => $file, 'role' => $fa['role'], 'roles' => PEAR_Common::getFileRoles()));
- }
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', str_replace('\\', '/', $file))) {
- // file contains .. parent directory or . cur directory references
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
- array('file' => $file));
- }
- if (isset($fa['install-as']) &&
- preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $fa['install-as']))) {
- // install-as contains .. parent directory or . cur directory references
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
- array('file' => $file . ' [installed as ' . $fa['install-as'] . ']'));
- }
- if (isset($fa['baseinstalldir']) &&
- preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $fa['baseinstalldir']))) {
- // install-as contains .. parent directory or . cur directory references
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
- array('file' => $file . ' [baseinstalldir ' . $fa['baseinstalldir'] . ']'));
- }
- }
- }
- if (isset($this->_registry) && $this->_isValid) {
- $chan = $this->_registry->getChannel('pear.php.net');
- if (PEAR::isError($chan)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $chan->getMessage());
- return $this->_isValid = 0;
- }
- $validator = $chan->getValidationObject();
- $validator->setPackageFile($this);
- $validator->validate($state);
- $failures = $validator->getFailures();
- foreach ($failures['errors'] as $error) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $error);
- }
- foreach ($failures['warnings'] as $warning) {
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $warning);
- }
- }
- if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$nofilechecking) {
- if ($this->_analyzePhpFiles()) {
- $this->_isValid = true;
- }
- }
- if ($this->_isValid) {
- return $this->_isValid = $state;
- }
- return $this->_isValid = 0;
- }
-
- function _analyzePhpFiles()
- {
- if (!$this->_isValid) {
- return false;
- }
- if (!isset($this->_packageFile)) {
- return false;
- }
- $dir_prefix = dirname($this->_packageFile);
- $common = new PEAR_Common;
- $log = isset($this->_logger) ? array(&$this->_logger, 'log') :
- array($common, 'log');
- $info = $this->getFilelist();
- foreach ($info as $file => $fa) {
- if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $file)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND,
- array('file' => realpath($dir_prefix) . DIRECTORY_SEPARATOR . $file));
- continue;
- }
- if ($fa['role'] == 'php' && $dir_prefix) {
- call_user_func_array($log, array(1, "Analyzing $file"));
- $srcinfo = $this->_analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file);
- if ($srcinfo) {
- $this->_buildProvidesArray($srcinfo);
- }
- }
- }
- $this->_packageName = $pn = $this->getPackage();
- $pnl = strlen($pn);
- if (isset($this->_packageInfo['provides'])) {
- foreach ((array) $this->_packageInfo['provides'] as $key => $what) {
- if (isset($what['explicit'])) {
- // skip conformance checks if the provides entry is
- // specified in the package.xml file
- continue;
- }
- extract($what);
- if ($type == 'class') {
- if (!strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX,
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn));
- } elseif ($type == 'function') {
- if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX,
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn));
- }
- }
- }
- return $this->_isValid;
- }
-
- /**
- * Get the default xml generator object
- *
- * @return PEAR_PackageFile_Generator_v1
- */
- function &getDefaultGenerator()
- {
- if (!class_exists('PEAR_PackageFile_Generator_v1')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/Generator/v1.php';
- }
- $a = new PEAR_PackageFile_Generator_v1($this);
- return $a;
- }
-
- /**
- * Get the contents of a file listed within the package.xml
- * @param string
- * @return string
- */
- function getFileContents($file)
- {
- if ($this->_archiveFile == $this->_packageFile) { // unpacked
- $dir = dirname($this->_packageFile);
- $file = $dir . DIRECTORY_SEPARATOR . $file;
- $file = str_replace(array('/', '\\'),
- array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file);
- if (file_exists($file) && is_readable($file)) {
- return implode('', file($file));
- }
- } else { // tgz
- if (!class_exists('Archive_Tar')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'Archive/Tar.php';
- }
- $tar = new Archive_Tar($this->_archiveFile);
- $tar->pushErrorHandling(PEAR_ERROR_RETURN);
- if ($file != 'package.xml' && $file != 'package2.xml') {
- $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file;
- }
- $file = $tar->extractInString($file);
- $tar->popErrorHandling();
- if (PEAR::isError($file)) {
- return PEAR::raiseError("Cannot locate file '$file' in archive");
- }
- return $file;
- }
- }
-
- // {{{ analyzeSourceCode()
- /**
- * Analyze the source code of the given PHP file
- *
- * @param string Filename of the PHP file
- * @return mixed
- * @access private
- */
- function _analyzeSourceCode($file)
- {
- if (!function_exists("token_get_all")) {
- return false;
- }
- if (!defined('T_DOC_COMMENT')) {
- define('T_DOC_COMMENT', T_COMMENT);
- }
- if (!defined('T_INTERFACE')) {
- define('T_INTERFACE', -1);
- }
- if (!defined('T_IMPLEMENTS')) {
- define('T_IMPLEMENTS', -1);
- }
- if (!$fp = @fopen($file, "r")) {
- return false;
- }
- fclose($fp);
- $contents = file_get_contents($file);
- $tokens = token_get_all($contents);
-/*
- for ($i = 0; $i < sizeof($tokens); $i++) {
- @list($token, $data) = $tokens[$i];
- if (is_string($token)) {
- var_dump($token);
- } else {
- print token_name($token) . ' ';
- var_dump(rtrim($data));
- }
- }
-*/
- $look_for = 0;
- $paren_level = 0;
- $bracket_level = 0;
- $brace_level = 0;
- $lastphpdoc = '';
- $current_class = '';
- $current_interface = '';
- $current_class_level = -1;
- $current_function = '';
- $current_function_level = -1;
- $declared_classes = array();
- $declared_interfaces = array();
- $declared_functions = array();
- $declared_methods = array();
- $used_classes = array();
- $used_functions = array();
- $extends = array();
- $implements = array();
- $nodeps = array();
- $inquote = false;
- $interface = false;
- for ($i = 0; $i < sizeof($tokens); $i++) {
- if (is_array($tokens[$i])) {
- list($token, $data) = $tokens[$i];
- } else {
- $token = $tokens[$i];
- $data = '';
- }
- if ($inquote) {
- if ($token != '"' && $token != T_END_HEREDOC) {
- continue;
- } else {
- $inquote = false;
- continue;
- }
- }
- switch ($token) {
- case T_WHITESPACE :
- continue;
- case ';':
- if ($interface) {
- $current_function = '';
- $current_function_level = -1;
- }
- break;
- case '"':
- case T_START_HEREDOC:
- $inquote = true;
- break;
- case T_CURLY_OPEN:
- case T_DOLLAR_OPEN_CURLY_BRACES:
- case '{': $brace_level++; continue 2;
- case '}':
- $brace_level--;
- if ($current_class_level == $brace_level) {
- $current_class = '';
- $current_class_level = -1;
- }
- if ($current_function_level == $brace_level) {
- $current_function = '';
- $current_function_level = -1;
- }
- continue 2;
- case '[': $bracket_level++; continue 2;
- case ']': $bracket_level--; continue 2;
- case '(': $paren_level++; continue 2;
- case ')': $paren_level--; continue 2;
- case T_INTERFACE:
- $interface = true;
- case T_CLASS:
- if (($current_class_level != -1) || ($current_function_level != -1)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE,
- array('file' => $file));
- return false;
- }
- case T_FUNCTION:
- case T_NEW:
- case T_EXTENDS:
- case T_IMPLEMENTS:
- $look_for = $token;
- continue 2;
- case T_STRING:
- if ($look_for == T_CLASS) {
- $current_class = $data;
- $current_class_level = $brace_level;
- $declared_classes[] = $current_class;
- } elseif ($look_for == T_INTERFACE) {
- $current_interface = $data;
- $current_class_level = $brace_level;
- $declared_interfaces[] = $current_interface;
- } elseif ($look_for == T_IMPLEMENTS) {
- $implements[$current_class] = $data;
- } elseif ($look_for == T_EXTENDS) {
- $extends[$current_class] = $data;
- } elseif ($look_for == T_FUNCTION) {
- if ($current_class) {
- $current_function = "$current_class::$data";
- $declared_methods[$current_class][] = $data;
- } elseif ($current_interface) {
- $current_function = "$current_interface::$data";
- $declared_methods[$current_interface][] = $data;
- } else {
- $current_function = $data;
- $declared_functions[] = $current_function;
- }
- $current_function_level = $brace_level;
- $m = array();
- } elseif ($look_for == T_NEW) {
- $used_classes[$data] = true;
- }
- $look_for = 0;
- continue 2;
- case T_VARIABLE:
- $look_for = 0;
- continue 2;
- case T_DOC_COMMENT:
- case T_COMMENT:
- if (preg_match('!^/\*\*\s!', $data)) {
- $lastphpdoc = $data;
- if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) {
- $nodeps = array_merge($nodeps, $m[1]);
- }
- }
- continue 2;
- case T_DOUBLE_COLON:
- if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) {
- $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE,
- array('file' => $file));
- return false;
- }
- $class = $tokens[$i - 1][1];
- if (strtolower($class) != 'parent') {
- $used_classes[$class] = true;
- }
- continue 2;
- }
- }
- return array(
- "source_file" => $file,
- "declared_classes" => $declared_classes,
- "declared_interfaces" => $declared_interfaces,
- "declared_methods" => $declared_methods,
- "declared_functions" => $declared_functions,
- "used_classes" => array_diff(array_keys($used_classes), $nodeps),
- "inheritance" => $extends,
- "implements" => $implements,
- );
- }
-
- /**
- * Build a "provides" array from data returned by
- * analyzeSourceCode(). The format of the built array is like
- * this:
- *
- * array(
- * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'),
- * ...
- * )
- *
- *
- * @param array $srcinfo array with information about a source file
- * as returned by the analyzeSourceCode() method.
- *
- * @return void
- *
- * @access private
- *
- */
- function _buildProvidesArray($srcinfo)
- {
- if (!$this->_isValid) {
- return false;
- }
- $file = basename($srcinfo['source_file']);
- $pn = $this->getPackage();
- $pnl = strlen($pn);
- foreach ($srcinfo['declared_classes'] as $class) {
- $key = "class;$class";
- if (isset($this->_packageInfo['provides'][$key])) {
- continue;
- }
- $this->_packageInfo['provides'][$key] =
- array('file'=> $file, 'type' => 'class', 'name' => $class);
- if (isset($srcinfo['inheritance'][$class])) {
- $this->_packageInfo['provides'][$key]['extends'] =
- $srcinfo['inheritance'][$class];
- }
- }
- foreach ($srcinfo['declared_methods'] as $class => $methods) {
- foreach ($methods as $method) {
- $function = "$class::$method";
- $key = "function;$function";
- if ($method{0} == '_' || !strcasecmp($method, $class) ||
- isset($this->_packageInfo['provides'][$key])) {
- continue;
- }
- $this->_packageInfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- foreach ($srcinfo['declared_functions'] as $function) {
- $key = "function;$function";
- if ($function{0} == '_' || isset($this->_packageInfo['provides'][$key])) {
- continue;
- }
- if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {
- $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\"";
- }
- $this->_packageInfo['provides'][$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- // }}}
-}
-?>
-<?php
-/**
- * PEAR_PackageFile_v2, package.xml version 2.0
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * For error handling
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ErrorStack.php';
-/**
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_PackageFile_v2
-{
-
- /**
- * Parsed package information
- * @var array
- * @access private
- */
- var $_packageInfo = array();
-
- /**
- * path to package .tgz or false if this is a local/extracted package.xml
- * @var string|false
- * @access private
- */
- var $_archiveFile;
-
- /**
- * path to package .xml or false if this is an abstract parsed-from-string xml
- * @var string|false
- * @access private
- */
- var $_packageFile;
-
- /**
- * This is used by file analysis routines to log progress information
- * @var PEAR_Common
- * @access protected
- */
- var $_logger;
-
- /**
- * This is set to the highest validation level that has been validated
- *
- * If the package.xml is invalid or unknown, this is set to 0. If
- * normal validation has occurred, this is set to PEAR_VALIDATE_NORMAL. If
- * downloading/installation validation has occurred it is set to PEAR_VALIDATE_DOWNLOADING
- * or INSTALLING, and so on up to PEAR_VALIDATE_PACKAGING. This allows validation
- * "caching" to occur, which is particularly important for package validation, so
- * that PHP files are not validated twice
- * @var int
- * @access private
- */
- var $_isValid = 0;
-
- /**
- * True if the filelist has been validated
- * @param bool
- */
- var $_filesValid = false;
-
- /**
- * @var PEAR_Registry
- * @access protected
- */
- var $_registry;
-
- /**
- * @var PEAR_Config
- * @access protected
- */
- var $_config;
-
- /**
- * Optional Dependency group requested for installation
- * @var string
- * @access private
- */
- var $_requestedGroup = false;
-
- /**
- * @var PEAR_ErrorStack
- * @access protected
- */
- var $_stack;
-
- /**
- * Namespace prefix used for tasks in this package.xml - use tasks: whenever possible
- */
- var $_tasksNs;
-
- /**
- * Determines whether this packagefile was initialized only with partial package info
- *
- * If this package file was constructed via parsing REST, it will only contain
- *
- * - package name
- * - channel name
- * - dependencies
- * @var boolean
- * @access private
- */
- var $_incomplete = true;
-
- /**
- * @var PEAR_PackageFile_v2_Validator
- */
- var $_v2Validator;
-
- /**
- * The constructor merely sets up the private error stack
- */
- function __construct()
- {
- $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null);
- $this->_isValid = false;
- }
-
- /**
- * To make unit-testing easier
- * @param PEAR_Frontend_*
- * @param array options
- * @param PEAR_Config
- * @return PEAR_Downloader
- * @access protected
- */
- function &getPEARDownloader(&$i, $o, &$c)
- {
- $z = new PEAR_Downloader($i, $o, $c);
- return $z;
- }
-
- /**
- * To make unit-testing easier
- * @param PEAR_Config
- * @param array options
- * @param array package name as returned from {@link PEAR_Registry::parsePackageName()}
- * @param int PEAR_VALIDATE_* constant
- * @return PEAR_Dependency2
- * @access protected
- */
- function &getPEARDependency2(&$c, $o, $p, $s = PEAR_VALIDATE_INSTALLING)
- {
- if (!class_exists('PEAR_Dependency2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Dependency2.php';
- }
- $z = new PEAR_Dependency2($c, $o, $p, $s);
- return $z;
- }
-
- function getInstalledBinary()
- {
- return isset($this->_packageInfo['#binarypackage']) ? $this->_packageInfo['#binarypackage'] :
- false;
- }
-
- /**
- * Installation of source package has failed, attempt to download and install the
- * binary version of this package.
- * @param PEAR_Installer
- * @return array|false
- */
- function installBinary(&$installer)
- {
- if (!OS_WINDOWS) {
- $a = false;
- return $a;
- }
- if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') {
- $releasetype = $this->getPackageType() . 'release';
- if (!is_array($installer->getInstallPackages())) {
- $a = false;
- return $a;
- }
- foreach ($installer->getInstallPackages() as $p) {
- if ($p->isExtension($this->_packageInfo['providesextension'])) {
- if ($p->getPackageType() != 'extsrc' && $p->getPackageType() != 'zendextsrc') {
- $a = false;
- return $a; // the user probably downloaded it separately
- }
- }
- }
- if (isset($this->_packageInfo[$releasetype]['binarypackage'])) {
- $installer->log(0, 'Attempting to download binary version of extension "' .
- $this->_packageInfo['providesextension'] . '"');
- $params = $this->_packageInfo[$releasetype]['binarypackage'];
- if (!is_array($params) || !isset($params[0])) {
- $params = array($params);
- }
- if (isset($this->_packageInfo['channel'])) {
- foreach ($params as $i => $param) {
- $params[$i] = array('channel' => $this->_packageInfo['channel'],
- 'package' => $param, 'version' => $this->getVersion());
- }
- }
- $dl = &$this->getPEARDownloader($installer->ui, $installer->getOptions(),
- $installer->config);
- $verbose = $dl->config->get('verbose');
- $dl->config->set('verbose', -1);
- foreach ($params as $param) {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $dl->download(array($param));
- PEAR::popErrorHandling();
- if (is_array($ret) && count($ret)) {
- break;
- }
- }
- $dl->config->set('verbose', $verbose);
- if (is_array($ret)) {
- if (count($ret) == 1) {
- $pf = $ret[0]->getPackageFile();
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $installer->install($ret[0]);
- PEAR::popErrorHandling();
- if (is_array($err)) {
- $this->_packageInfo['#binarypackage'] = $ret[0]->getPackage();
- // "install" self, so all dependencies will work transparently
- $this->_registry->addPackage2($this);
- $installer->log(0, 'Download and install of binary extension "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pf->getChannel(),
- 'package' => $pf->getPackage()), true) . '" successful');
- $a = array($ret[0], $err);
- return $a;
- }
- $installer->log(0, 'Download and install of binary extension "' .
- $this->_registry->parsedPackageNameToString(
- array('channel' => $pf->getChannel(),
- 'package' => $pf->getPackage()), true) . '" failed');
- }
- }
- }
- }
- $a = false;
- return $a;
- }
-
- /**
- * @return string|false Extension name
- */
- function getProvidesExtension()
- {
- if (in_array($this->getPackageType(),
- array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
- if (isset($this->_packageInfo['providesextension'])) {
- return $this->_packageInfo['providesextension'];
- }
- }
- return false;
- }
-
- /**
- * @param string Extension name
- * @return bool
- */
- function isExtension($extension)
- {
- if (in_array($this->getPackageType(),
- array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) {
- return $this->_packageInfo['providesextension'] == $extension;
- }
- return false;
- }
-
- /**
- * Tests whether every part of the package.xml 1.0 is represented in
- * this package.xml 2.0
- * @param PEAR_PackageFile_v1
- * @return bool
- */
- function isEquivalent($pf1)
- {
- if (!$pf1) {
- return true;
- }
- if ($this->getPackageType() == 'bundle') {
- return false;
- }
- $this->_stack->getErrors(true);
- if (!$pf1->validate(PEAR_VALIDATE_NORMAL)) {
- return false;
- }
- $pass = true;
- if ($pf1->getPackage() != $this->getPackage()) {
- $this->_differentPackage($pf1->getPackage());
- $pass = false;
- }
- if ($pf1->getVersion() != $this->getVersion()) {
- $this->_differentVersion($pf1->getVersion());
- $pass = false;
- }
- if (trim($pf1->getSummary()) != $this->getSummary()) {
- $this->_differentSummary($pf1->getSummary());
- $pass = false;
- }
- if (preg_replace('/\s+/', '', $pf1->getDescription()) !=
- preg_replace('/\s+/', '', $this->getDescription())) {
- $this->_differentDescription($pf1->getDescription());
- $pass = false;
- }
- if ($pf1->getState() != $this->getState()) {
- $this->_differentState($pf1->getState());
- $pass = false;
- }
- if (!strstr(preg_replace('/\s+/', '', $this->getNotes()),
- preg_replace('/\s+/', '', $pf1->getNotes()))) {
- $this->_differentNotes($pf1->getNotes());
- $pass = false;
- }
- $mymaintainers = $this->getMaintainers();
- $yourmaintainers = $pf1->getMaintainers();
- for ($i1 = 0; $i1 < count($yourmaintainers); $i1++) {
- $reset = false;
- for ($i2 = 0; $i2 < count($mymaintainers); $i2++) {
- if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) {
- if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) {
- $this->_differentRole($mymaintainers[$i2]['handle'],
- $yourmaintainers[$i1]['role'], $mymaintainers[$i2]['role']);
- $pass = false;
- }
- if ($mymaintainers[$i2]['email'] != $yourmaintainers[$i1]['email']) {
- $this->_differentEmail($mymaintainers[$i2]['handle'],
- $yourmaintainers[$i1]['email'], $mymaintainers[$i2]['email']);
- $pass = false;
- }
- if ($mymaintainers[$i2]['name'] != $yourmaintainers[$i1]['name']) {
- $this->_differentName($mymaintainers[$i2]['handle'],
- $yourmaintainers[$i1]['name'], $mymaintainers[$i2]['name']);
- $pass = false;
- }
- unset($mymaintainers[$i2]);
- $mymaintainers = array_values($mymaintainers);
- unset($yourmaintainers[$i1]);
- $yourmaintainers = array_values($yourmaintainers);
- $reset = true;
- break;
- }
- }
- if ($reset) {
- $i1 = -1;
- }
- }
- $this->_unmatchedMaintainers($mymaintainers, $yourmaintainers);
- $filelist = $this->getFilelist();
- foreach ($pf1->getFilelist() as $file => $atts) {
- if (!isset($filelist[$file])) {
- $this->_missingFile($file);
- $pass = false;
- }
- }
- return $pass;
- }
-
- function _differentPackage($package)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('package' => $package,
- 'self' => $this->getPackage()),
- 'package.xml 1.0 package "%package%" does not match "%self%"');
- }
-
- function _differentVersion($version)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('version' => $version,
- 'self' => $this->getVersion()),
- 'package.xml 1.0 version "%version%" does not match "%self%"');
- }
-
- function _differentState($state)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('state' => $state,
- 'self' => $this->getState()),
- 'package.xml 1.0 state "%state%" does not match "%self%"');
- }
-
- function _differentRole($handle, $role, $selfrole)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle,
- 'role' => $role, 'self' => $selfrole),
- 'package.xml 1.0 maintainer "%handle%" role "%role%" does not match "%self%"');
- }
-
- function _differentEmail($handle, $email, $selfemail)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle,
- 'email' => $email, 'self' => $selfemail),
- 'package.xml 1.0 maintainer "%handle%" email "%email%" does not match "%self%"');
- }
-
- function _differentName($handle, $name, $selfname)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle,
- 'name' => $name, 'self' => $selfname),
- 'package.xml 1.0 maintainer "%handle%" name "%name%" does not match "%self%"');
- }
-
- function _unmatchedMaintainers($my, $yours)
- {
- if ($my) {
- array_walk($my, create_function('&$i, $k', '$i = $i["handle"];'));
- $this->_stack->push(__FUNCTION__, 'error', array('handles' => $my),
- 'package.xml 2.0 has unmatched extra maintainers "%handles%"');
- }
- if ($yours) {
- array_walk($yours, create_function('&$i, $k', '$i = $i["handle"];'));
- $this->_stack->push(__FUNCTION__, 'error', array('handles' => $yours),
- 'package.xml 1.0 has unmatched extra maintainers "%handles%"');
- }
- }
-
- function _differentNotes($notes)
- {
- $truncnotes = strlen($notes) < 25 ? $notes : substr($notes, 0, 24) . '...';
- $truncmynotes = strlen($this->getNotes()) < 25 ? $this->getNotes() :
- substr($this->getNotes(), 0, 24) . '...';
- $this->_stack->push(__FUNCTION__, 'error', array('notes' => $truncnotes,
- 'self' => $truncmynotes),
- 'package.xml 1.0 release notes "%notes%" do not match "%self%"');
- }
-
- function _differentSummary($summary)
- {
- $truncsummary = strlen($summary) < 25 ? $summary : substr($summary, 0, 24) . '...';
- $truncmysummary = strlen($this->getsummary()) < 25 ? $this->getSummary() :
- substr($this->getsummary(), 0, 24) . '...';
- $this->_stack->push(__FUNCTION__, 'error', array('summary' => $truncsummary,
- 'self' => $truncmysummary),
- 'package.xml 1.0 summary "%summary%" does not match "%self%"');
- }
-
- function _differentDescription($description)
- {
- $truncdescription = trim(strlen($description) < 25 ? $description : substr($description, 0, 24) . '...');
- $truncmydescription = trim(strlen($this->getDescription()) < 25 ? $this->getDescription() :
- substr($this->getdescription(), 0, 24) . '...');
- $this->_stack->push(__FUNCTION__, 'error', array('description' => $truncdescription,
- 'self' => $truncmydescription),
- 'package.xml 1.0 description "%description%" does not match "%self%"');
- }
-
- function _missingFile($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'package.xml 1.0 file "%file%" is not present in <contents>');
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawState($state)
- {
- if (!isset($this->_packageInfo['stability'])) {
- $this->_packageInfo['stability'] = array();
- }
- $this->_packageInfo['stability']['release'] = $state;
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawCompatible($compatible)
- {
- $this->_packageInfo['compatible'] = $compatible;
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawPackage($package)
- {
- $this->_packageInfo['name'] = $package;
- }
-
- /**
- * WARNING - do not use this function unless you know what you're doing
- */
- function setRawChannel($channel)
- {
- $this->_packageInfo['channel'] = $channel;
- }
-
- function setRequestedGroup($group)
- {
- $this->_requestedGroup = $group;
- }
-
- function getRequestedGroup()
- {
- if (isset($this->_requestedGroup)) {
- return $this->_requestedGroup;
- }
- return false;
- }
-
- /**
- * For saving in the registry.
- *
- * Set the last version that was installed
- * @param string
- */
- function setLastInstalledVersion($version)
- {
- $this->_packageInfo['_lastversion'] = $version;
- }
-
- /**
- * @return string|false
- */
- function getLastInstalledVersion()
- {
- if (isset($this->_packageInfo['_lastversion'])) {
- return $this->_packageInfo['_lastversion'];
- }
- return false;
- }
-
- /**
- * Determines whether this package.xml has post-install scripts or not
- * @return array|false
- */
- function listPostinstallScripts()
- {
- $filelist = $this->getFilelist();
- $contents = $this->getContents();
- $contents = $contents['dir']['file'];
- if (!is_array($contents) || !isset($contents[0])) {
- $contents = array($contents);
- }
- $taskfiles = array();
- foreach ($contents as $file) {
- $atts = $file['attribs'];
- unset($file['attribs']);
- if (count($file)) {
- $taskfiles[$atts['name']] = $file;
- }
- }
- $common = new PEAR_Common;
- $common->debug = $this->_config->get('verbose');
- $this->_scripts = array();
- $ret = array();
- foreach ($taskfiles as $name => $tasks) {
- if (!isset($filelist[$name])) {
- // ignored files will not be in the filelist
- continue;
- }
- $atts = $filelist[$name];
- foreach ($tasks as $tag => $raw) {
- $task = $this->getTask($tag);
- $task = new $task($this->_config, $common, PEAR_TASK_INSTALL);
- if ($task->isScript()) {
- $ret[] = $filelist[$name]['installed_as'];
- }
- }
- }
- if (count($ret)) {
- return $ret;
- }
- return false;
- }
-
- /**
- * Initialize post-install scripts for running
- *
- * This method can be used to detect post-install scripts, as the return value
- * indicates whether any exist
- * @return bool
- */
- function initPostinstallScripts()
- {
- $filelist = $this->getFilelist();
- $contents = $this->getContents();
- $contents = $contents['dir']['file'];
- if (!is_array($contents) || !isset($contents[0])) {
- $contents = array($contents);
- }
- $taskfiles = array();
- foreach ($contents as $file) {
- $atts = $file['attribs'];
- unset($file['attribs']);
- if (count($file)) {
- $taskfiles[$atts['name']] = $file;
- }
- }
- $common = new PEAR_Common;
- $common->debug = $this->_config->get('verbose');
- $this->_scripts = array();
- foreach ($taskfiles as $name => $tasks) {
- if (!isset($filelist[$name])) {
- // file was not installed due to installconditions
- continue;
- }
- $atts = $filelist[$name];
- foreach ($tasks as $tag => $raw) {
- $taskname = $this->getTask($tag);
- $task = new $taskname($this->_config, $common, PEAR_TASK_INSTALL);
- if (!$task->isScript()) {
- continue; // scripts are only handled after installation
- }
- $lastversion = isset($this->_packageInfo['_lastversion']) ?
- $this->_packageInfo['_lastversion'] : null;
- $task->init($raw, $atts, $lastversion);
- $res = $task->startSession($this, $atts['installed_as']);
- if (!$res) {
- continue; // skip this file
- }
- if (PEAR::isError($res)) {
- return $res;
- }
- $assign = &$task;
- $this->_scripts[] = &$assign;
- }
- }
- if (count($this->_scripts)) {
- return true;
- }
- return false;
- }
-
- function runPostinstallScripts()
- {
- if ($this->initPostinstallScripts()) {
- $ui = &PEAR_Frontend::singleton();
- if ($ui) {
- $ui->runPostinstallScripts($this->_scripts, $this);
- }
- }
- }
-
-
- /**
- * Convert a recursive set of <dir> and <file> tags into a single <dir> tag with
- * <file> tags.
- */
- function flattenFilelist()
- {
- if (isset($this->_packageInfo['bundle'])) {
- return;
- }
- $filelist = array();
- if (isset($this->_packageInfo['contents']['dir']['dir'])) {
- $this->_getFlattenedFilelist($filelist, $this->_packageInfo['contents']['dir']);
- if (!isset($filelist[1])) {
- $filelist = $filelist[0];
- }
- $this->_packageInfo['contents']['dir']['file'] = $filelist;
- unset($this->_packageInfo['contents']['dir']['dir']);
- } else {
- // else already flattened but check for baseinstalldir propagation
- if (isset($this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'])) {
- if (isset($this->_packageInfo['contents']['dir']['file'][0])) {
- foreach ($this->_packageInfo['contents']['dir']['file'] as $i => $file) {
- if (isset($file['attribs']['baseinstalldir'])) {
- continue;
- }
- $this->_packageInfo['contents']['dir']['file'][$i]['attribs']['baseinstalldir']
- = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
- }
- } else {
- if (!isset($this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'])) {
- $this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir']
- = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'];
- }
- }
- }
- }
- }
-
- /**
- * @param array the final flattened file list
- * @param array the current directory being processed
- * @param string|false any recursively inherited baeinstalldir attribute
- * @param string private recursion variable
- * @return array
- * @access protected
- */
- function _getFlattenedFilelist(&$files, $dir, $baseinstall = false, $path = '')
- {
- if (isset($dir['attribs']) && isset($dir['attribs']['baseinstalldir'])) {
- $baseinstall = $dir['attribs']['baseinstalldir'];
- }
- if (isset($dir['dir'])) {
- if (!isset($dir['dir'][0])) {
- $dir['dir'] = array($dir['dir']);
- }
- foreach ($dir['dir'] as $subdir) {
- if (!isset($subdir['attribs']) || !isset($subdir['attribs']['name'])) {
- $name = '*unknown*';
- } else {
- $name = $subdir['attribs']['name'];
- }
- $newpath = empty($path) ? $name :
- $path . '/' . $name;
- $this->_getFlattenedFilelist($files, $subdir,
- $baseinstall, $newpath);
- }
- }
- if (isset($dir['file'])) {
- if (!isset($dir['file'][0])) {
- $dir['file'] = array($dir['file']);
- }
- foreach ($dir['file'] as $file) {
- $attrs = $file['attribs'];
- $name = $attrs['name'];
- if ($baseinstall && !isset($attrs['baseinstalldir'])) {
- $attrs['baseinstalldir'] = $baseinstall;
- }
- $attrs['name'] = empty($path) ? $name : $path . '/' . $name;
- $attrs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'),
- $attrs['name']);
- $file['attribs'] = $attrs;
- $files[] = $file;
- }
- }
- }
-
- function setConfig(&$config)
- {
- $this->_config = &$config;
- $this->_registry = &$config->getRegistry();
- }
-
- function setLogger(&$logger)
- {
- if (!is_object($logger) || !method_exists($logger, 'log')) {
- return PEAR::raiseError('Logger must be compatible with PEAR_Common::log');
- }
- $this->_logger = &$logger;
- }
-
- /**
- * WARNING - do not use this function directly unless you know what you're doing
- */
- function setDeps($deps)
- {
- $this->_packageInfo['dependencies'] = $deps;
- }
-
- /**
- * WARNING - do not use this function directly unless you know what you're doing
- */
- function setCompatible($compat)
- {
- $this->_packageInfo['compatible'] = $compat;
- }
-
- function setPackagefile($file, $archive = false)
- {
- $this->_packageFile = $file;
- $this->_archiveFile = $archive ? $archive : $file;
- }
-
- /**
- * Wrapper to {@link PEAR_ErrorStack::getErrors()}
- * @param boolean determines whether to purge the error stack after retrieving
- * @return array
- */
- function getValidationWarnings($purge = true)
- {
- return $this->_stack->getErrors($purge);
- }
-
- function getPackageFile()
- {
- return $this->_packageFile;
- }
-
- function getArchiveFile()
- {
- return $this->_archiveFile;
- }
-
-
- /**
- * Directly set the array that defines this packagefile
- *
- * WARNING: no validation. This should only be performed by internal methods
- * inside PEAR or by inputting an array saved from an existing PEAR_PackageFile_v2
- * @param array
- */
- function fromArray($pinfo)
- {
- unset($pinfo['old']);
- unset($pinfo['xsdversion']);
- // If the changelog isn't an array then it was passed in as an empty tag
- if (isset($pinfo['changelog']) && !is_array($pinfo['changelog'])) {
- unset($pinfo['changelog']);
- }
- $this->_incomplete = false;
- $this->_packageInfo = $pinfo;
- }
-
- function isIncomplete()
- {
- return $this->_incomplete;
- }
-
- /**
- * @return array
- */
- function toArray($forreg = false)
- {
- if (!$this->validate(PEAR_VALIDATE_NORMAL)) {
- return false;
- }
- return $this->getArray($forreg);
- }
-
- function getArray($forReg = false)
- {
- if ($forReg) {
- $arr = $this->_packageInfo;
- $arr['old'] = array();
- $arr['old']['version'] = $this->getVersion();
- $arr['old']['release_date'] = $this->getDate();
- $arr['old']['release_state'] = $this->getState();
- $arr['old']['release_license'] = $this->getLicense();
- $arr['old']['release_notes'] = $this->getNotes();
- $arr['old']['release_deps'] = $this->getDeps();
- $arr['old']['maintainers'] = $this->getMaintainers();
- $arr['xsdversion'] = '2.0';
- return $arr;
- } else {
- $info = $this->_packageInfo;
- unset($info['dirtree']);
- if (isset($info['_lastversion'])) {
- unset($info['_lastversion']);
- }
- if (isset($info['#binarypackage'])) {
- unset($info['#binarypackage']);
- }
- return $info;
- }
- }
-
- function packageInfo($field)
- {
- $arr = $this->getArray(true);
- if ($field == 'state') {
- return $arr['stability']['release'];
- }
- if ($field == 'api-version') {
- return $arr['version']['api'];
- }
- if ($field == 'api-state') {
- return $arr['stability']['api'];
- }
- if (isset($arr['old'][$field])) {
- if (!is_string($arr['old'][$field])) {
- return null;
- }
- return $arr['old'][$field];
- }
- if (isset($arr[$field])) {
- if (!is_string($arr[$field])) {
- return null;
- }
- return $arr[$field];
- }
- return null;
- }
-
- function getName()
- {
- return $this->getPackage();
- }
-
- function getPackage()
- {
- if (isset($this->_packageInfo['name'])) {
- return $this->_packageInfo['name'];
- }
- return false;
- }
-
- function getChannel()
- {
- if (isset($this->_packageInfo['uri'])) {
- return '__uri';
- }
- if (isset($this->_packageInfo['channel'])) {
- return strtolower($this->_packageInfo['channel']);
- }
- return false;
- }
-
- function getUri()
- {
- if (isset($this->_packageInfo['uri'])) {
- return $this->_packageInfo['uri'];
- }
- return false;
- }
-
- function getExtends()
- {
- if (isset($this->_packageInfo['extends'])) {
- return $this->_packageInfo['extends'];
- }
- return false;
- }
-
- function getSummary()
- {
- if (isset($this->_packageInfo['summary'])) {
- return $this->_packageInfo['summary'];
- }
- return false;
- }
-
- function getDescription()
- {
- if (isset($this->_packageInfo['description'])) {
- return $this->_packageInfo['description'];
- }
- return false;
- }
-
- function getMaintainers($raw = false)
- {
- if (!isset($this->_packageInfo['lead'])) {
- return false;
- }
- if ($raw) {
- $ret = array('lead' => $this->_packageInfo['lead']);
- (isset($this->_packageInfo['developer'])) ?
- $ret['developer'] = $this->_packageInfo['developer'] :null;
- (isset($this->_packageInfo['contributor'])) ?
- $ret['contributor'] = $this->_packageInfo['contributor'] :null;
- (isset($this->_packageInfo['helper'])) ?
- $ret['helper'] = $this->_packageInfo['helper'] :null;
- return $ret;
- } else {
- $ret = array();
- $leads = isset($this->_packageInfo['lead'][0]) ? $this->_packageInfo['lead'] :
- array($this->_packageInfo['lead']);
- foreach ($leads as $lead) {
- $s = $lead;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'lead';
- $ret[] = $s;
- }
- if (isset($this->_packageInfo['developer'])) {
- $leads = isset($this->_packageInfo['developer'][0]) ?
- $this->_packageInfo['developer'] :
- array($this->_packageInfo['developer']);
- foreach ($leads as $maintainer) {
- $s = $maintainer;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'developer';
- $ret[] = $s;
- }
- }
- if (isset($this->_packageInfo['contributor'])) {
- $leads = isset($this->_packageInfo['contributor'][0]) ?
- $this->_packageInfo['contributor'] :
- array($this->_packageInfo['contributor']);
- foreach ($leads as $maintainer) {
- $s = $maintainer;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'contributor';
- $ret[] = $s;
- }
- }
- if (isset($this->_packageInfo['helper'])) {
- $leads = isset($this->_packageInfo['helper'][0]) ?
- $this->_packageInfo['helper'] :
- array($this->_packageInfo['helper']);
- foreach ($leads as $maintainer) {
- $s = $maintainer;
- $s['handle'] = $s['user'];
- unset($s['user']);
- $s['role'] = 'helper';
- $ret[] = $s;
- }
- }
- return $ret;
- }
- return false;
- }
-
- function getLeads()
- {
- if (isset($this->_packageInfo['lead'])) {
- return $this->_packageInfo['lead'];
- }
- return false;
- }
-
- function getDevelopers()
- {
- if (isset($this->_packageInfo['developer'])) {
- return $this->_packageInfo['developer'];
- }
- return false;
- }
-
- function getContributors()
- {
- if (isset($this->_packageInfo['contributor'])) {
- return $this->_packageInfo['contributor'];
- }
- return false;
- }
-
- function getHelpers()
- {
- if (isset($this->_packageInfo['helper'])) {
- return $this->_packageInfo['helper'];
- }
- return false;
- }
-
- function setDate($date)
- {
- if (!isset($this->_packageInfo['date'])) {
- // ensure that the extends tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('time', 'version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease',
- 'zendextbinrelease', 'bundle', 'changelog'), array(), 'date');
- }
- $this->_packageInfo['date'] = $date;
- $this->_isValid = 0;
- }
-
- function setTime($time)
- {
- $this->_isValid = 0;
- if (!isset($this->_packageInfo['time'])) {
- // ensure that the time tag is set up in the right location
- $this->_packageInfo = $this->_insertBefore($this->_packageInfo,
- array('version',
- 'stability', 'license', 'notes', 'contents', 'compatible',
- 'dependencies', 'providesextension', 'srcpackage', 'srcuri',
- 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease',
- 'zendextbinrelease', 'bundle', 'changelog'), $time, 'time');
- }
- $this->_packageInfo['time'] = $time;
- }
-
- function getDate()
- {
- if (isset($this->_packageInfo['date'])) {
- return $this->_packageInfo['date'];
- }
- return false;
- }
-
- function getTime()
- {
- if (isset($this->_packageInfo['time'])) {
- return $this->_packageInfo['time'];
- }
- return false;
- }
-
- /**
- * @param package|api version category to return
- */
- function getVersion($key = 'release')
- {
- if (isset($this->_packageInfo['version'][$key])) {
- return $this->_packageInfo['version'][$key];
- }
- return false;
- }
-
- function getStability()
- {
- if (isset($this->_packageInfo['stability'])) {
- return $this->_packageInfo['stability'];
- }
- return false;
- }
-
- function getState($key = 'release')
- {
- if (isset($this->_packageInfo['stability'][$key])) {
- return $this->_packageInfo['stability'][$key];
- }
- return false;
- }
-
- function getLicense($raw = false)
- {
- if (isset($this->_packageInfo['license'])) {
- if ($raw) {
- return $this->_packageInfo['license'];
- }
- if (is_array($this->_packageInfo['license'])) {
- return $this->_packageInfo['license']['_content'];
- } else {
- return $this->_packageInfo['license'];
- }
- }
- return false;
- }
-
- function getLicenseLocation()
- {
- if (!isset($this->_packageInfo['license']) || !is_array($this->_packageInfo['license'])) {
- return false;
- }
- return $this->_packageInfo['license']['attribs'];
- }
-
- function getNotes()
- {
- if (isset($this->_packageInfo['notes'])) {
- return $this->_packageInfo['notes'];
- }
- return false;
- }
-
- /**
- * Return the <usesrole> tag contents, if any
- * @return array|false
- */
- function getUsesrole()
- {
- if (isset($this->_packageInfo['usesrole'])) {
- return $this->_packageInfo['usesrole'];
- }
- return false;
- }
-
- /**
- * Return the <usestask> tag contents, if any
- * @return array|false
- */
- function getUsestask()
- {
- if (isset($this->_packageInfo['usestask'])) {
- return $this->_packageInfo['usestask'];
- }
- return false;
- }
-
- /**
- * This should only be used to retrieve filenames and install attributes
- */
- function getFilelist($preserve = false)
- {
- if (isset($this->_packageInfo['filelist']) && !$preserve) {
- return $this->_packageInfo['filelist'];
- }
- $this->flattenFilelist();
- if ($contents = $this->getContents()) {
- $ret = array();
- if (!isset($contents['dir'])) {
- return false;
- }
- if (!isset($contents['dir']['file'][0])) {
- $contents['dir']['file'] = array($contents['dir']['file']);
- }
- foreach ($contents['dir']['file'] as $file) {
- if (!isset($file['attribs']['name'])) {
- continue;
- }
- $name = $file['attribs']['name'];
- if (!$preserve) {
- $file = $file['attribs'];
- }
- $ret[$name] = $file;
- }
- if (!$preserve) {
- $this->_packageInfo['filelist'] = $ret;
- }
- return $ret;
- }
- return false;
- }
-
- /**
- * Return configure options array, if any
- *
- * @return array|false
- */
- function getConfigureOptions()
- {
- if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') {
- return false;
- }
-
- $releases = $this->getReleases();
- if (isset($releases[0])) {
- $releases = $releases[0];
- }
-
- if (isset($releases['configureoption'])) {
- if (!isset($releases['configureoption'][0])) {
- $releases['configureoption'] = array($releases['configureoption']);
- }
-
- for ($i = 0; $i < count($releases['configureoption']); $i++) {
- $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs'];
- }
-
- return $releases['configureoption'];
- }
-
- return false;
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- */
- function resetFilelist()
- {
- $this->_packageInfo['filelist'] = array();
- }
-
- /**
- * Retrieve a list of files that should be installed on this computer
- * @return array
- */
- function getInstallationFilelist($forfilecheck = false)
- {
- $contents = $this->getFilelist(true);
- if (isset($contents['dir']['attribs']['baseinstalldir'])) {
- $base = $contents['dir']['attribs']['baseinstalldir'];
- }
- if (isset($this->_packageInfo['bundle'])) {
- return PEAR::raiseError(
- 'Exception: bundles should be handled in download code only');
- }
- $release = $this->getReleases();
- if ($release) {
- if (!isset($release[0])) {
- if (!isset($release['installconditions']) && !isset($release['filelist'])) {
- if ($forfilecheck) {
- return $this->getFilelist();
- }
- return $contents;
- }
- $release = array($release);
- }
- $depchecker = &$this->getPEARDependency2($this->_config, array(),
- array('channel' => $this->getChannel(), 'package' => $this->getPackage()),
- PEAR_VALIDATE_INSTALLING);
- foreach ($release as $instance) {
- if (isset($instance['installconditions'])) {
- $installconditions = $instance['installconditions'];
- if (is_array($installconditions)) {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($installconditions as $type => $conditions) {
- if (!isset($conditions[0])) {
- $conditions = array($conditions);
- }
- foreach ($conditions as $condition) {
- $ret = $depchecker->{"validate{$type}Dependency"}($condition);
- if (PEAR::isError($ret)) {
- PEAR::popErrorHandling();
- continue 3; // skip this release
- }
- }
- }
- PEAR::popErrorHandling();
- }
- }
- // this is the release to use
- if (isset($instance['filelist'])) {
- // ignore files
- if (isset($instance['filelist']['ignore'])) {
- $ignore = isset($instance['filelist']['ignore'][0]) ?
- $instance['filelist']['ignore'] :
- array($instance['filelist']['ignore']);
- foreach ($ignore as $ig) {
- unset ($contents[$ig['attribs']['name']]);
- }
- }
- // install files as this name
- if (isset($instance['filelist']['install'])) {
- $installas = isset($instance['filelist']['install'][0]) ?
- $instance['filelist']['install'] :
- array($instance['filelist']['install']);
- foreach ($installas as $as) {
- $contents[$as['attribs']['name']]['attribs']['install-as'] =
- $as['attribs']['as'];
- }
- }
- }
- if ($forfilecheck) {
- foreach ($contents as $file => $attrs) {
- $contents[$file] = $attrs['attribs'];
- }
- }
- return $contents;
- }
- } else { // simple release - no installconditions or install-as
- if ($forfilecheck) {
- return $this->getFilelist();
- }
- return $contents;
- }
- // no releases matched
- return PEAR::raiseError('No releases in package.xml matched the existing operating ' .
- 'system, extensions installed, or architecture, cannot install');
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- * @param string file name
- * @param string installed path
- */
- function setInstalledAs($file, $path)
- {
- if ($path) {
- return $this->_packageInfo['filelist'][$file]['installed_as'] = $path;
- }
- unset($this->_packageInfo['filelist'][$file]['installed_as']);
- }
-
- function getInstalledLocation($file)
- {
- if (isset($this->_packageInfo['filelist'][$file]['installed_as'])) {
- return $this->_packageInfo['filelist'][$file]['installed_as'];
- }
- return false;
- }
-
- /**
- * This is only used at install-time, after all serialization
- * is over.
- */
- function installedFile($file, $atts)
- {
- if (isset($this->_packageInfo['filelist'][$file])) {
- $this->_packageInfo['filelist'][$file] =
- array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']);
- } else {
- $this->_packageInfo['filelist'][$file] = $atts['attribs'];
- }
- }
-
- /**
- * Retrieve the contents tag
- */
- function getContents()
- {
- if (isset($this->_packageInfo['contents'])) {
- return $this->_packageInfo['contents'];
- }
- return false;
- }
-
- /**
- * @param string full path to file
- * @param string attribute name
- * @param string attribute value
- * @param int risky but fast - use this to choose a file based on its position in the list
- * of files. Index is zero-based like PHP arrays.
- * @return bool success of operation
- */
- function setFileAttribute($filename, $attr, $value, $index = false)
- {
- $this->_isValid = 0;
- if (in_array($attr, array('role', 'name', 'baseinstalldir'))) {
- $this->_filesValid = false;
- }
- if ($index !== false &&
- isset($this->_packageInfo['contents']['dir']['file'][$index]['attribs'])) {
- $this->_packageInfo['contents']['dir']['file'][$index]['attribs'][$attr] = $value;
- return true;
- }
- if (!isset($this->_packageInfo['contents']['dir']['file'])) {
- return false;
- }
- $files = $this->_packageInfo['contents']['dir']['file'];
- if (!isset($files[0])) {
- $files = array($files);
- $ind = false;
- } else {
- $ind = true;
- }
- foreach ($files as $i => $file) {
- if (isset($file['attribs'])) {
- if ($file['attribs']['name'] == $filename) {
- if ($ind) {
- $this->_packageInfo['contents']['dir']['file'][$i]['attribs'][$attr] = $value;
- } else {
- $this->_packageInfo['contents']['dir']['file']['attribs'][$attr] = $value;
- }
- return true;
- }
- }
- }
- return false;
- }
-
- function setDirtree($path)
- {
- if (!isset($this->_packageInfo['dirtree'])) {
- $this->_packageInfo['dirtree'] = array();
- }
- $this->_packageInfo['dirtree'][$path] = true;
- }
-
- function getDirtree()
- {
- if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) {
- return $this->_packageInfo['dirtree'];
- }
- return false;
- }
-
- function resetDirtree()
- {
- unset($this->_packageInfo['dirtree']);
- }
-
- /**
- * Determines whether this package claims it is compatible with the version of
- * the package that has a recommended version dependency
- * @param PEAR_PackageFile_v2|PEAR_PackageFile_v1|PEAR_Downloader_Package
- * @return boolean
- */
- function isCompatible($pf)
- {
- if (!isset($this->_packageInfo['compatible'])) {
- return false;
- }
- if (!isset($this->_packageInfo['channel'])) {
- return false;
- }
- $me = $pf->getVersion();
- $compatible = $this->_packageInfo['compatible'];
- if (!isset($compatible[0])) {
- $compatible = array($compatible);
- }
- $found = false;
- foreach ($compatible as $info) {
- if (strtolower($info['name']) == strtolower($pf->getPackage())) {
- if (strtolower($info['channel']) == strtolower($pf->getChannel())) {
- $found = true;
- break;
- }
- }
- }
- if (!$found) {
- return false;
- }
- if (isset($info['exclude'])) {
- if (!isset($info['exclude'][0])) {
- $info['exclude'] = array($info['exclude']);
- }
- foreach ($info['exclude'] as $exclude) {
- if (version_compare($me, $exclude, '==')) {
- return false;
- }
- }
- }
- if (version_compare($me, $info['min'], '>=') && version_compare($me, $info['max'], '<=')) {
- return true;
- }
- return false;
- }
-
- /**
- * @return array|false
- */
- function getCompatible()
- {
- if (isset($this->_packageInfo['compatible'])) {
- return $this->_packageInfo['compatible'];
- }
- return false;
- }
-
- function getDependencies()
- {
- if (isset($this->_packageInfo['dependencies'])) {
- return $this->_packageInfo['dependencies'];
- }
- return false;
- }
-
- function isSubpackageOf($p)
- {
- return $p->isSubpackage($this);
- }
-
- /**
- * Determines whether the passed in package is a subpackage of this package.
- *
- * No version checking is done, only name verification.
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return bool
- */
- function isSubpackage($p)
- {
- $sub = array();
- if (isset($this->_packageInfo['dependencies']['required']['subpackage'])) {
- $sub = $this->_packageInfo['dependencies']['required']['subpackage'];
- if (!isset($sub[0])) {
- $sub = array($sub);
- }
- }
- if (isset($this->_packageInfo['dependencies']['optional']['subpackage'])) {
- $sub1 = $this->_packageInfo['dependencies']['optional']['subpackage'];
- if (!isset($sub1[0])) {
- $sub1 = array($sub1);
- }
- $sub = array_merge($sub, $sub1);
- }
- if (isset($this->_packageInfo['dependencies']['group'])) {
- $group = $this->_packageInfo['dependencies']['group'];
- if (!isset($group[0])) {
- $group = array($group);
- }
- foreach ($group as $deps) {
- if (isset($deps['subpackage'])) {
- $sub2 = $deps['subpackage'];
- if (!isset($sub2[0])) {
- $sub2 = array($sub2);
- }
- $sub = array_merge($sub, $sub2);
- }
- }
- }
- foreach ($sub as $dep) {
- if (strtolower($dep['name']) == strtolower($p->getPackage())) {
- if (isset($dep['channel'])) {
- if (strtolower($dep['channel']) == strtolower($p->getChannel())) {
- return true;
- }
- } else {
- if ($dep['uri'] == $p->getURI()) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- function dependsOn($package, $channel)
- {
- if (!($deps = $this->getDependencies())) {
- return false;
- }
- foreach (array('package', 'subpackage') as $type) {
- foreach (array('required', 'optional') as $needed) {
- if (isset($deps[$needed][$type])) {
- if (!isset($deps[$needed][$type][0])) {
- $deps[$needed][$type] = array($deps[$needed][$type]);
- }
- foreach ($deps[$needed][$type] as $dep) {
- $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri';
- if (strtolower($dep['name']) == strtolower($package) &&
- $depchannel == $channel) {
- return true;
- }
- }
- }
- }
- if (isset($deps['group'])) {
- if (!isset($deps['group'][0])) {
- $dep['group'] = array($deps['group']);
- }
- foreach ($deps['group'] as $group) {
- if (isset($group[$type])) {
- if (!is_array($group[$type])) {
- $group[$type] = array($group[$type]);
- }
- foreach ($group[$type] as $dep) {
- $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri';
- if (strtolower($dep['name']) == strtolower($package) &&
- $depchannel == $channel) {
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Get the contents of a dependency group
- * @param string
- * @return array|false
- */
- function getDependencyGroup($name)
- {
- $name = strtolower($name);
- if (!isset($this->_packageInfo['dependencies']['group'])) {
- return false;
- }
- $groups = $this->_packageInfo['dependencies']['group'];
- if (!isset($groups[0])) {
- $groups = array($groups);
- }
- foreach ($groups as $group) {
- if (strtolower($group['attribs']['name']) == $name) {
- return $group;
- }
- }
- return false;
- }
-
- /**
- * Retrieve a partial package.xml 1.0 representation of dependencies
- *
- * a very limited representation of dependencies is returned by this method.
- * The <exclude> tag for excluding certain versions of a dependency is
- * completely ignored. In addition, dependency groups are ignored, with the
- * assumption that all dependencies in dependency groups are also listed in
- * the optional group that work with all dependency groups
- * @param boolean return package.xml 2.0 <dependencies> tag
- * @return array|false
- */
- function getDeps($raw = false, $nopearinstaller = false)
- {
- if (isset($this->_packageInfo['dependencies'])) {
- if ($raw) {
- return $this->_packageInfo['dependencies'];
- }
- $ret = array();
- $map = array(
- 'php' => 'php',
- 'package' => 'pkg',
- 'subpackage' => 'pkg',
- 'extension' => 'ext',
- 'os' => 'os',
- 'pearinstaller' => 'pkg',
- );
- foreach (array('required', 'optional') as $type) {
- $optional = ($type == 'optional') ? 'yes' : 'no';
- if (!isset($this->_packageInfo['dependencies'][$type])
- || empty($this->_packageInfo['dependencies'][$type])) {
- continue;
- }
- foreach ($this->_packageInfo['dependencies'][$type] as $dtype => $deps) {
- if ($dtype == 'pearinstaller' && $nopearinstaller) {
- continue;
- }
- if (!isset($deps[0])) {
- $deps = array($deps);
- }
- foreach ($deps as $dep) {
- if (!isset($map[$dtype])) {
- // no support for arch type
- continue;
- }
- if ($dtype == 'pearinstaller') {
- $dep['name'] = 'PEAR';
- $dep['channel'] = 'pear.php.net';
- }
- $s = array('type' => $map[$dtype]);
- if (isset($dep['channel'])) {
- $s['channel'] = $dep['channel'];
- }
- if (isset($dep['uri'])) {
- $s['uri'] = $dep['uri'];
- }
- if (isset($dep['name'])) {
- $s['name'] = $dep['name'];
- }
- if (isset($dep['conflicts'])) {
- $s['rel'] = 'not';
- } else {
- if (!isset($dep['min']) &&
- !isset($dep['max'])) {
- $s['rel'] = 'has';
- $s['optional'] = $optional;
- } elseif (isset($dep['min']) &&
- isset($dep['max'])) {
- $s['rel'] = 'ge';
- $s1 = $s;
- $s1['rel'] = 'le';
- $s['version'] = $dep['min'];
- $s1['version'] = $dep['max'];
- if (isset($dep['channel'])) {
- $s1['channel'] = $dep['channel'];
- }
- if ($dtype != 'php') {
- $s['name'] = $dep['name'];
- $s1['name'] = $dep['name'];
- }
- $s['optional'] = $optional;
- $s1['optional'] = $optional;
- $ret[] = $s1;
- } elseif (isset($dep['min'])) {
- if (isset($dep['exclude']) &&
- $dep['exclude'] == $dep['min']) {
- $s['rel'] = 'gt';
- } else {
- $s['rel'] = 'ge';
- }
- $s['version'] = $dep['min'];
- $s['optional'] = $optional;
- if ($dtype != 'php') {
- $s['name'] = $dep['name'];
- }
- } elseif (isset($dep['max'])) {
- if (isset($dep['exclude']) &&
- $dep['exclude'] == $dep['max']) {
- $s['rel'] = 'lt';
- } else {
- $s['rel'] = 'le';
- }
- $s['version'] = $dep['max'];
- $s['optional'] = $optional;
- if ($dtype != 'php') {
- $s['name'] = $dep['name'];
- }
- }
- }
- $ret[] = $s;
- }
- }
- }
- if (count($ret)) {
- return $ret;
- }
- }
- return false;
- }
-
- /**
- * @return php|extsrc|extbin|zendextsrc|zendextbin|bundle|false
- */
- function getPackageType()
- {
- if (isset($this->_packageInfo['phprelease'])) {
- return 'php';
- }
- if (isset($this->_packageInfo['extsrcrelease'])) {
- return 'extsrc';
- }
- if (isset($this->_packageInfo['extbinrelease'])) {
- return 'extbin';
- }
- if (isset($this->_packageInfo['zendextsrcrelease'])) {
- return 'zendextsrc';
- }
- if (isset($this->_packageInfo['zendextbinrelease'])) {
- return 'zendextbin';
- }
- if (isset($this->_packageInfo['bundle'])) {
- return 'bundle';
- }
- return false;
- }
-
- /**
- * @return array|false
- */
- function getReleases()
- {
- $type = $this->getPackageType();
- if ($type != 'bundle') {
- $type .= 'release';
- }
- if ($this->getPackageType() && isset($this->_packageInfo[$type])) {
- return $this->_packageInfo[$type];
- }
- return false;
- }
-
- /**
- * @return array
- */
- function getChangelog()
- {
- if (isset($this->_packageInfo['changelog'])) {
- return $this->_packageInfo['changelog'];
- }
- return false;
- }
-
- function hasDeps()
- {
- return isset($this->_packageInfo['dependencies']);
- }
-
- function getPackagexmlVersion()
- {
- if (isset($this->_packageInfo['zendextsrcrelease'])) {
- return '2.1';
- }
- if (isset($this->_packageInfo['zendextbinrelease'])) {
- return '2.1';
- }
- return '2.0';
- }
-
- /**
- * @return array|false
- */
- function getSourcePackage()
- {
- if (isset($this->_packageInfo['extbinrelease']) ||
- isset($this->_packageInfo['zendextbinrelease'])) {
- return array('channel' => $this->_packageInfo['srcchannel'],
- 'package' => $this->_packageInfo['srcpackage']);
- }
- return false;
- }
-
- function getBundledPackages()
- {
- if (isset($this->_packageInfo['bundle'])) {
- return $this->_packageInfo['contents']['bundledpackage'];
- }
- return false;
- }
-
- function getLastModified()
- {
- if (isset($this->_packageInfo['_lastmodified'])) {
- return $this->_packageInfo['_lastmodified'];
- }
- return false;
- }
-
- /**
- * Get the contents of a file listed within the package.xml
- * @param string
- * @return string
- */
- function getFileContents($file)
- {
- if ($this->_archiveFile == $this->_packageFile) { // unpacked
- $dir = dirname($this->_packageFile);
- $file = $dir . DIRECTORY_SEPARATOR . $file;
- $file = str_replace(array('/', '\\'),
- array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file);
- if (file_exists($file) && is_readable($file)) {
- return implode('', file($file));
- }
- } else { // tgz
- $tar = new Archive_Tar($this->_archiveFile);
- $tar->pushErrorHandling(PEAR_ERROR_RETURN);
- if ($file != 'package.xml' && $file != 'package2.xml') {
- $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file;
- }
- $file = $tar->extractInString($file);
- $tar->popErrorHandling();
- if (PEAR::isError($file)) {
- return PEAR::raiseError("Cannot locate file '$file' in archive");
- }
- return $file;
- }
- }
-
- function &getRW()
- {
- if (!class_exists('PEAR_PackageFile_v2_rw')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2/rw.php';
- }
- $a = new PEAR_PackageFile_v2_rw;
- foreach (get_object_vars($this) as $name => $unused) {
- if (!isset($this->$name)) {
- continue;
- }
- if ($name == '_config' || $name == '_logger'|| $name == '_registry' ||
- $name == '_stack') {
- $a->$name = &$this->$name;
- } else {
- $a->$name = $this->$name;
- }
- }
- return $a;
- }
-
- function &getDefaultGenerator()
- {
- if (!class_exists('PEAR_PackageFile_Generator_v2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/Generator/v2.php';
- }
- $a = new PEAR_PackageFile_Generator_v2($this);
- return $a;
- }
-
- function analyzeSourceCode($file, $string = false)
- {
- if (!isset($this->_v2Validator) ||
- !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
- if (!class_exists('PEAR_PackageFile_v2_Validator')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2/Validator.php';
- }
- $this->_v2Validator = new PEAR_PackageFile_v2_Validator;
- }
- return $this->_v2Validator->analyzeSourceCode($file, $string);
- }
-
- function validate($state = PEAR_VALIDATE_NORMAL)
- {
- if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
- return false;
- }
- if (!isset($this->_v2Validator) ||
- !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) {
- if (!class_exists('PEAR_PackageFile_v2_Validator')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2/Validator.php';
- }
- $this->_v2Validator = new PEAR_PackageFile_v2_Validator;
- }
- if (isset($this->_packageInfo['xsdversion'])) {
- unset($this->_packageInfo['xsdversion']);
- }
- return $this->_v2Validator->validate($this, $state);
- }
-
- function getTasksNs()
- {
- if (!isset($this->_tasksNs)) {
- if (isset($this->_packageInfo['attribs'])) {
- foreach ($this->_packageInfo['attribs'] as $name => $value) {
- if ($value == 'http://pear.php.net/dtd/tasks-1.0') {
- $this->_tasksNs = str_replace('xmlns:', '', $name);
- break;
- }
- }
- }
- }
- return $this->_tasksNs;
- }
-
- /**
- * Determine whether a task name is a valid task. Custom tasks may be defined
- * using subdirectories by putting a "-" in the name, as in <tasks:mycustom-task>
- *
- * Note that this method will auto-load the task class file and test for the existence
- * of the name with "-" replaced by "_" as in PEAR/Task/mycustom/task.php makes class
- * PEAR_Task_mycustom_task
- * @param string
- * @return boolean
- */
- function getTask($task)
- {
- $this->getTasksNs();
- // transform all '-' to '/' and 'tasks:' to '' so tasks:replace becomes replace
- $task = str_replace(array($this->_tasksNs . ':', '-'), array('', ' '), $task);
- $taskfile = str_replace(' ', '/', ucwords($task));
- $task = str_replace(array(' ', '/'), '_', ucwords($task));
- if (class_exists("PEAR_Task_$task")) {
- return "PEAR_Task_$task";
- }
- $fp = @fopen("phar://install-pear-nozlib.phar/PEAR/Task/$taskfile.php", 'r', true);
- if ($fp) {
- fclose($fp);
- require_once 'phar://install-pear-nozlib.phar/' . "PEAR/Task/$taskfile.php";
- return "PEAR_Task_$task";
- }
- return false;
- }
-
- /**
- * Key-friendly array_splice
- * @param tagname to splice a value in before
- * @param mixed the value to splice in
- * @param string the new tag name
- */
- function _ksplice($array, $key, $value, $newkey)
- {
- $offset = array_search($key, array_keys($array));
- $after = array_slice($array, $offset);
- $before = array_slice($array, 0, $offset);
- $before[$newkey] = $value;
- return array_merge($before, $after);
- }
-
- /**
- * @param array a list of possible keys, in the order they may occur
- * @param mixed contents of the new package.xml tag
- * @param string tag name
- * @access private
- */
- function _insertBefore($array, $keys, $contents, $newkey)
- {
- foreach ($keys as $key) {
- if (isset($array[$key])) {
- return $array = $this->_ksplice($array, $key, $contents, $newkey);
- }
- }
- $array[$newkey] = $contents;
- return $array;
- }
-
- /**
- * @param subsection of {@link $_packageInfo}
- * @param array|string tag contents
- * @param array format:
- * <pre>
- * array(
- * tagname => array(list of tag names that follow this one),
- * childtagname => array(list of child tag names that follow this one),
- * )
- * </pre>
- *
- * This allows construction of nested tags
- * @access private
- */
- function _mergeTag($manip, $contents, $order)
- {
- if (count($order)) {
- foreach ($order as $tag => $curorder) {
- if (!isset($manip[$tag])) {
- // ensure that the tag is set up
- $manip = $this->_insertBefore($manip, $curorder, array(), $tag);
- }
- if (count($order) > 1) {
- $manip[$tag] = $this->_mergeTag($manip[$tag], $contents, array_slice($order, 1));
- return $manip;
- }
- }
- } else {
- return $manip;
- }
- if (is_array($manip[$tag]) && !empty($manip[$tag]) && isset($manip[$tag][0])) {
- $manip[$tag][] = $contents;
- } else {
- if (!count($manip[$tag])) {
- $manip[$tag] = $contents;
- } else {
- $manip[$tag] = array($manip[$tag]);
- $manip[$tag][] = $contents;
- }
- }
- return $manip;
- }
-}
-?>
-<?php
-/**
- * PEAR_PackageFile_v2, package.xml version 2.0, read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a8
- */
-/**
- * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
- * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a8
- * @access private
- */
-class PEAR_PackageFile_v2_Validator
-{
- /**
- * @var array
- */
- var $_packageInfo;
- /**
- * @var PEAR_PackageFile_v2
- */
- var $_pf;
- /**
- * @var PEAR_ErrorStack
- */
- var $_stack;
- /**
- * @var int
- */
- var $_isValid = 0;
- /**
- * @var int
- */
- var $_filesValid = 0;
- /**
- * @var int
- */
- var $_curState = 0;
- /**
- * @param PEAR_PackageFile_v2
- * @param int
- */
- function validate(&$pf, $state = PEAR_VALIDATE_NORMAL)
- {
- $this->_pf = &$pf;
- $this->_curState = $state;
- $this->_packageInfo = $this->_pf->getArray();
- $this->_isValid = $this->_pf->_isValid;
- $this->_filesValid = $this->_pf->_filesValid;
- $this->_stack = &$pf->_stack;
- $this->_stack->getErrors(true);
- if (($this->_isValid & $state) == $state) {
- return true;
- }
- if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) {
- return false;
- }
- if (!isset($this->_packageInfo['attribs']['version']) ||
- ($this->_packageInfo['attribs']['version'] != '2.0' &&
- $this->_packageInfo['attribs']['version'] != '2.1')
- ) {
- $this->_noPackageVersion();
- }
- $structure =
- array(
- 'name',
- 'channel|uri',
- '*extends', // can't be multiple, but this works fine
- 'summary',
- 'description',
- '+lead', // these all need content checks
- '*developer',
- '*contributor',
- '*helper',
- 'date',
- '*time',
- 'version',
- 'stability',
- 'license->?uri->?filesource',
- 'notes',
- 'contents', //special validation needed
- '*compatible',
- 'dependencies', //special validation needed
- '*usesrole',
- '*usestask', // reserve these for 1.4.0a1 to implement
- // this will allow a package.xml to gracefully say it
- // needs a certain package installed in order to implement a role or task
- '*providesextension',
- '*srcpackage|*srcuri',
- '+phprelease|+extsrcrelease|+extbinrelease|' .
- '+zendextsrcrelease|+zendextbinrelease|bundle', //special validation needed
- '*changelog',
- );
- $test = $this->_packageInfo;
- if (isset($test['dependencies']) &&
- isset($test['dependencies']['required']) &&
- isset($test['dependencies']['required']['pearinstaller']) &&
- isset($test['dependencies']['required']['pearinstaller']['min']) &&
- '1.9.5' != '@package' . '_version@' &&
- version_compare('1.9.5',
- $test['dependencies']['required']['pearinstaller']['min'], '<')
- ) {
- $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
- return false;
- }
- // ignore post-installation array fields
- if (array_key_exists('filelist', $test)) {
- unset($test['filelist']);
- }
- if (array_key_exists('_lastmodified', $test)) {
- unset($test['_lastmodified']);
- }
- if (array_key_exists('#binarypackage', $test)) {
- unset($test['#binarypackage']);
- }
- if (array_key_exists('old', $test)) {
- unset($test['old']);
- }
- if (array_key_exists('_lastversion', $test)) {
- unset($test['_lastversion']);
- }
- if (!$this->_stupidSchemaValidate($structure, $test, '<package>')) {
- return false;
- }
- if (empty($this->_packageInfo['name'])) {
- $this->_tagCannotBeEmpty('name');
- }
- $test = isset($this->_packageInfo['uri']) ? 'uri' :'channel';
- if (empty($this->_packageInfo[$test])) {
- $this->_tagCannotBeEmpty($test);
- }
- if (is_array($this->_packageInfo['license']) &&
- (!isset($this->_packageInfo['license']['_content']) ||
- empty($this->_packageInfo['license']['_content']))) {
- $this->_tagCannotBeEmpty('license');
- } elseif (empty($this->_packageInfo['license'])) {
- $this->_tagCannotBeEmpty('license');
- }
- if (empty($this->_packageInfo['summary'])) {
- $this->_tagCannotBeEmpty('summary');
- }
- if (empty($this->_packageInfo['description'])) {
- $this->_tagCannotBeEmpty('description');
- }
- if (empty($this->_packageInfo['date'])) {
- $this->_tagCannotBeEmpty('date');
- }
- if (empty($this->_packageInfo['notes'])) {
- $this->_tagCannotBeEmpty('notes');
- }
- if (isset($this->_packageInfo['time']) && empty($this->_packageInfo['time'])) {
- $this->_tagCannotBeEmpty('time');
- }
- if (isset($this->_packageInfo['dependencies'])) {
- $this->_validateDependencies();
- }
- if (isset($this->_packageInfo['compatible'])) {
- $this->_validateCompatible();
- }
- if (!isset($this->_packageInfo['bundle'])) {
- if (empty($this->_packageInfo['contents'])) {
- $this->_tagCannotBeEmpty('contents');
- }
- if (!isset($this->_packageInfo['contents']['dir'])) {
- $this->_filelistMustContainDir('contents');
- return false;
- }
- if (isset($this->_packageInfo['contents']['file'])) {
- $this->_filelistCannotContainFile('contents');
- return false;
- }
- }
- $this->_validateMaintainers();
- $this->_validateStabilityVersion();
- $fail = false;
- if (array_key_exists('usesrole', $this->_packageInfo)) {
- $roles = $this->_packageInfo['usesrole'];
- if (!is_array($roles) || !isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if (!isset($role['role'])) {
- $this->_usesroletaskMustHaveRoleTask('usesrole', 'role');
- $fail = true;
- } else {
- if (!isset($role['channel'])) {
- if (!isset($role['uri'])) {
- $this->_usesroletaskMustHaveChannelOrUri($role['role'], 'usesrole');
- $fail = true;
- }
- } elseif (!isset($role['package'])) {
- $this->_usesroletaskMustHavePackage($role['role'], 'usesrole');
- $fail = true;
- }
- }
- }
- }
- if (array_key_exists('usestask', $this->_packageInfo)) {
- $roles = $this->_packageInfo['usestask'];
- if (!is_array($roles) || !isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if (!isset($role['task'])) {
- $this->_usesroletaskMustHaveRoleTask('usestask', 'task');
- $fail = true;
- } else {
- if (!isset($role['channel'])) {
- if (!isset($role['uri'])) {
- $this->_usesroletaskMustHaveChannelOrUri($role['task'], 'usestask');
- $fail = true;
- }
- } elseif (!isset($role['package'])) {
- $this->_usesroletaskMustHavePackage($role['task'], 'usestask');
- $fail = true;
- }
- }
- }
- }
-
- if ($fail) {
- return false;
- }
-
- $list = $this->_packageInfo['contents'];
- if (isset($list['dir']) && is_array($list['dir']) && isset($list['dir'][0])) {
- $this->_multipleToplevelDirNotAllowed();
- return $this->_isValid = 0;
- }
-
- $this->_validateFilelist();
- $this->_validateRelease();
- if (!$this->_stack->hasErrors()) {
- $chan = $this->_pf->_registry->getChannel($this->_pf->getChannel(), true);
- if (PEAR::isError($chan)) {
- $this->_unknownChannel($this->_pf->getChannel());
- } else {
- $valpack = $chan->getValidationPackage();
- // for channel validator packages, always use the default PEAR validator.
- // otherwise, they can't be installed or packaged
- $validator = $chan->getValidationObject($this->_pf->getPackage());
- if (!$validator) {
- $this->_stack->push(__FUNCTION__, 'error',
- array('channel' => $chan->getName(),
- 'package' => $this->_pf->getPackage(),
- 'name' => $valpack['_content'],
- 'version' => $valpack['attribs']['version']),
- 'package "%channel%/%package%" cannot be properly validated without ' .
- 'validation package "%channel%/%name%-%version%"');
- return $this->_isValid = 0;
- }
- $validator->setPackageFile($this->_pf);
- $validator->validate($state);
- $failures = $validator->getFailures();
- foreach ($failures['errors'] as $error) {
- $this->_stack->push(__FUNCTION__, 'error', $error,
- 'Channel validator error: field "%field%" - %reason%');
- }
- foreach ($failures['warnings'] as $warning) {
- $this->_stack->push(__FUNCTION__, 'warning', $warning,
- 'Channel validator warning: field "%field%" - %reason%');
- }
- }
- }
-
- $this->_pf->_isValid = $this->_isValid = !$this->_stack->hasErrors('error');
- if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$this->_filesValid) {
- if ($this->_pf->getPackageType() == 'bundle') {
- if ($this->_analyzeBundledPackages()) {
- $this->_filesValid = $this->_pf->_filesValid = true;
- } else {
- $this->_pf->_isValid = $this->_isValid = 0;
- }
- } else {
- if (!$this->_analyzePhpFiles()) {
- $this->_pf->_isValid = $this->_isValid = 0;
- } else {
- $this->_filesValid = $this->_pf->_filesValid = true;
- }
- }
- }
-
- if ($this->_isValid) {
- return $this->_pf->_isValid = $this->_isValid = $state;
- }
-
- return $this->_pf->_isValid = $this->_isValid = 0;
- }
-
- function _stupidSchemaValidate($structure, $xml, $root)
- {
- if (!is_array($xml)) {
- $xml = array();
- }
- $keys = array_keys($xml);
- reset($keys);
- $key = current($keys);
- while ($key == 'attribs' || $key == '_contents') {
- $key = next($keys);
- }
- $unfoundtags = $optionaltags = array();
- $ret = true;
- $mismatch = false;
- foreach ($structure as $struc) {
- if ($key) {
- $tag = $xml[$key];
- }
- $test = $this->_processStructure($struc);
- if (isset($test['choices'])) {
- $loose = true;
- foreach ($test['choices'] as $choice) {
- if ($key == $choice['tag']) {
- $key = next($keys);
- while ($key == 'attribs' || $key == '_contents') {
- $key = next($keys);
- }
- $unfoundtags = $optionaltags = array();
- $mismatch = false;
- if ($key && $key != $choice['tag'] && isset($choice['multiple'])) {
- $unfoundtags[] = $choice['tag'];
- $optionaltags[] = $choice['tag'];
- if ($key) {
- $mismatch = true;
- }
- }
- $ret &= $this->_processAttribs($choice, $tag, $root);
- continue 2;
- } else {
- $unfoundtags[] = $choice['tag'];
- $mismatch = true;
- }
- if (!isset($choice['multiple']) || $choice['multiple'] != '*') {
- $loose = false;
- } else {
- $optionaltags[] = $choice['tag'];
- }
- }
- if (!$loose) {
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- return false;
- }
- } else {
- if ($key != $test['tag']) {
- if (isset($test['multiple']) && $test['multiple'] != '*') {
- $unfoundtags[] = $test['tag'];
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- return false;
- } else {
- if ($key) {
- $mismatch = true;
- }
- $unfoundtags[] = $test['tag'];
- $optionaltags[] = $test['tag'];
- }
- if (!isset($test['multiple'])) {
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- return false;
- }
- continue;
- } else {
- $unfoundtags = $optionaltags = array();
- $mismatch = false;
- }
- $key = next($keys);
- while ($key == 'attribs' || $key == '_contents') {
- $key = next($keys);
- }
- if ($key && $key != $test['tag'] && isset($test['multiple'])) {
- $unfoundtags[] = $test['tag'];
- $optionaltags[] = $test['tag'];
- $mismatch = true;
- }
- $ret &= $this->_processAttribs($test, $tag, $root);
- continue;
- }
- }
- if (!$mismatch && count($optionaltags)) {
- // don't error out on any optional tags
- $unfoundtags = array_diff($unfoundtags, $optionaltags);
- }
- if (count($unfoundtags)) {
- $this->_invalidTagOrder($unfoundtags, $key, $root);
- } elseif ($key) {
- // unknown tags
- $this->_invalidTagOrder('*no tags allowed here*', $key, $root);
- while ($key = next($keys)) {
- $this->_invalidTagOrder('*no tags allowed here*', $key, $root);
- }
- }
- return $ret;
- }
-
- function _processAttribs($choice, $tag, $context)
- {
- if (isset($choice['attribs'])) {
- if (!is_array($tag)) {
- $tag = array($tag);
- }
- $tags = $tag;
- if (!isset($tags[0])) {
- $tags = array($tags);
- }
- $ret = true;
- foreach ($tags as $i => $tag) {
- if (!is_array($tag) || !isset($tag['attribs'])) {
- foreach ($choice['attribs'] as $attrib) {
- if ($attrib{0} != '?') {
- $ret &= $this->_tagHasNoAttribs($choice['tag'],
- $context);
- continue 2;
- }
- }
- }
- foreach ($choice['attribs'] as $attrib) {
- if ($attrib{0} != '?') {
- if (!isset($tag['attribs'][$attrib])) {
- $ret &= $this->_tagMissingAttribute($choice['tag'],
- $attrib, $context);
- }
- }
- }
- }
- return $ret;
- }
- return true;
- }
-
- function _processStructure($key)
- {
- $ret = array();
- if (count($pieces = explode('|', $key)) > 1) {
- $ret['choices'] = array();
- foreach ($pieces as $piece) {
- $ret['choices'][] = $this->_processStructure($piece);
- }
- return $ret;
- }
- $multi = $key{0};
- if ($multi == '+' || $multi == '*') {
- $ret['multiple'] = $key{0};
- $key = substr($key, 1);
- }
- if (count($attrs = explode('->', $key)) > 1) {
- $ret['tag'] = array_shift($attrs);
- $ret['attribs'] = $attrs;
- } else {
- $ret['tag'] = $key;
- }
- return $ret;
- }
-
- function _validateStabilityVersion()
- {
- $structure = array('release', 'api');
- $a = $this->_stupidSchemaValidate($structure, $this->_packageInfo['version'], '<version>');
- $a &= $this->_stupidSchemaValidate($structure, $this->_packageInfo['stability'], '<stability>');
- if ($a) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $this->_packageInfo['version']['release'])) {
- $this->_invalidVersion('release', $this->_packageInfo['version']['release']);
- }
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $this->_packageInfo['version']['api'])) {
- $this->_invalidVersion('api', $this->_packageInfo['version']['api']);
- }
- if (!in_array($this->_packageInfo['stability']['release'],
- array('snapshot', 'devel', 'alpha', 'beta', 'stable'))) {
- $this->_invalidState('release', $this->_packageInfo['stability']['release']);
- }
- if (!in_array($this->_packageInfo['stability']['api'],
- array('devel', 'alpha', 'beta', 'stable'))) {
- $this->_invalidState('api', $this->_packageInfo['stability']['api']);
- }
- }
- }
-
- function _validateMaintainers()
- {
- $structure =
- array(
- 'name',
- 'user',
- 'email',
- 'active',
- );
- foreach (array('lead', 'developer', 'contributor', 'helper') as $type) {
- if (!isset($this->_packageInfo[$type])) {
- continue;
- }
- if (isset($this->_packageInfo[$type][0])) {
- foreach ($this->_packageInfo[$type] as $lead) {
- $this->_stupidSchemaValidate($structure, $lead, '<' . $type . '>');
- }
- } else {
- $this->_stupidSchemaValidate($structure, $this->_packageInfo[$type],
- '<' . $type . '>');
- }
- }
- }
-
- function _validatePhpDep($dep, $installcondition = false)
- {
- $structure = array(
- 'min',
- '*max',
- '*exclude',
- );
- $type = $installcondition ? '<installcondition><php>' : '<dependencies><required><php>';
- $this->_stupidSchemaValidate($structure, $dep, $type);
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion($type . '<min>', $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion($type . '<max>', $dep['max']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match(
- '/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/',
- $exclude)) {
- $this->_invalidVersion($type . '<exclude>', $exclude);
- }
- }
- }
- }
-
- function _validatePearinstallerDep($dep)
- {
- $structure = array(
- 'min',
- '*max',
- '*recommended',
- '*exclude',
- );
- $this->_stupidSchemaValidate($structure, $dep, '<dependencies><required><pearinstaller>');
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><min>',
- $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><max>',
- $dep['max']);
- }
- }
- if (isset($dep['recommended'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['recommended'])) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><recommended>',
- $dep['recommended']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion('<dependencies><required><pearinstaller><exclude>',
- $exclude);
- }
- }
- }
- }
-
- function _validatePackageDep($dep, $group, $type = '<package>')
- {
- if (isset($dep['uri'])) {
- if (isset($dep['conflicts'])) {
- $structure = array(
- 'name',
- 'uri',
- 'conflicts',
- '*providesextension',
- );
- } else {
- $structure = array(
- 'name',
- 'uri',
- '*providesextension',
- );
- }
- } else {
- if (isset($dep['conflicts'])) {
- $structure = array(
- 'name',
- 'channel',
- '*min',
- '*max',
- '*exclude',
- 'conflicts',
- '*providesextension',
- );
- } else {
- $structure = array(
- 'name',
- 'channel',
- '*min',
- '*max',
- '*recommended',
- '*exclude',
- '*nodefault',
- '*providesextension',
- );
- }
- }
- if (isset($dep['name'])) {
- $type .= '<name>' . $dep['name'] . '</name>';
- }
- $this->_stupidSchemaValidate($structure, $dep, '<dependencies>' . $group . $type);
- if (isset($dep['uri']) && (isset($dep['min']) || isset($dep['max']) ||
- isset($dep['recommended']) || isset($dep['exclude']))) {
- $this->_uriDepsCannotHaveVersioning('<dependencies>' . $group . $type);
- }
- if (isset($dep['channel']) && strtolower($dep['channel']) == '__uri') {
- $this->_DepchannelCannotBeUri('<dependencies>' . $group . $type);
- }
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<min>', $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<max>', $dep['max']);
- }
- }
- if (isset($dep['recommended'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['recommended'])) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<recommended>',
- $dep['recommended']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion('<dependencies>' . $group . $type . '<exclude>',
- $exclude);
- }
- }
- }
- }
-
- function _validateSubpackageDep($dep, $group)
- {
- $this->_validatePackageDep($dep, $group, '<subpackage>');
- if (isset($dep['providesextension'])) {
- $this->_subpackageCannotProvideExtension(isset($dep['name']) ? $dep['name'] : '');
- }
- if (isset($dep['conflicts'])) {
- $this->_subpackagesCannotConflict(isset($dep['name']) ? $dep['name'] : '');
- }
- }
-
- function _validateExtensionDep($dep, $group = false, $installcondition = false)
- {
- if (isset($dep['conflicts'])) {
- $structure = array(
- 'name',
- '*min',
- '*max',
- '*exclude',
- 'conflicts',
- );
- } else {
- $structure = array(
- 'name',
- '*min',
- '*max',
- '*recommended',
- '*exclude',
- );
- }
- if ($installcondition) {
- $type = '<installcondition><extension>';
- } else {
- $type = '<dependencies>' . $group . '<extension>';
- }
- if (isset($dep['name'])) {
- $type .= '<name>' . $dep['name'] . '</name>';
- }
- $this->_stupidSchemaValidate($structure, $dep, $type);
- if (isset($dep['min'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['min'])) {
- $this->_invalidVersion(substr($type, 1) . '<min', $dep['min']);
- }
- }
- if (isset($dep['max'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['max'])) {
- $this->_invalidVersion(substr($type, 1) . '<max', $dep['max']);
- }
- }
- if (isset($dep['recommended'])) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $dep['recommended'])) {
- $this->_invalidVersion(substr($type, 1) . '<recommended', $dep['recommended']);
- }
- }
- if (isset($dep['exclude'])) {
- if (!is_array($dep['exclude'])) {
- $dep['exclude'] = array($dep['exclude']);
- }
- foreach ($dep['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion(substr($type, 1) . '<exclude', $exclude);
- }
- }
- }
- }
-
- function _validateOsDep($dep, $installcondition = false)
- {
- $structure = array(
- 'name',
- '*conflicts',
- );
- $type = $installcondition ? '<installcondition><os>' : '<dependencies><required><os>';
- if ($this->_stupidSchemaValidate($structure, $dep, $type)) {
- if ($dep['name'] == '*') {
- if (array_key_exists('conflicts', $dep)) {
- $this->_cannotConflictWithAllOs($type);
- }
- }
- }
- }
-
- function _validateArchDep($dep, $installcondition = false)
- {
- $structure = array(
- 'pattern',
- '*conflicts',
- );
- $type = $installcondition ? '<installcondition><arch>' : '<dependencies><required><arch>';
- $this->_stupidSchemaValidate($structure, $dep, $type);
- }
-
- function _validateInstallConditions($cond, $release)
- {
- $structure = array(
- '*php',
- '*extension',
- '*os',
- '*arch',
- );
- if (!$this->_stupidSchemaValidate($structure,
- $cond, $release)) {
- return false;
- }
- foreach (array('php', 'extension', 'os', 'arch') as $type) {
- if (isset($cond[$type])) {
- $iter = $cond[$type];
- if (!is_array($iter) || !isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- if ($type == 'extension') {
- $this->{"_validate{$type}Dep"}($package, false, true);
- } else {
- $this->{"_validate{$type}Dep"}($package, true);
- }
- }
- }
- }
- }
-
- function _validateDependencies()
- {
- $structure = array(
- 'required',
- '*optional',
- '*group->name->hint'
- );
- if (!$this->_stupidSchemaValidate($structure,
- $this->_packageInfo['dependencies'], '<dependencies>')) {
- return false;
- }
- foreach (array('required', 'optional') as $simpledep) {
- if (isset($this->_packageInfo['dependencies'][$simpledep])) {
- if ($simpledep == 'optional') {
- $structure = array(
- '*package',
- '*subpackage',
- '*extension',
- );
- } else {
- $structure = array(
- 'php',
- 'pearinstaller',
- '*package',
- '*subpackage',
- '*extension',
- '*os',
- '*arch',
- );
- }
- if ($this->_stupidSchemaValidate($structure,
- $this->_packageInfo['dependencies'][$simpledep],
- "<dependencies><$simpledep>")) {
- foreach (array('package', 'subpackage', 'extension') as $type) {
- if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) {
- $iter = $this->_packageInfo['dependencies'][$simpledep][$type];
- if (!isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- if ($type != 'extension') {
- if (isset($package['uri'])) {
- if (isset($package['channel'])) {
- $this->_UrlOrChannel($type,
- $package['name']);
- }
- } else {
- if (!isset($package['channel'])) {
- $this->_NoChannel($type, $package['name']);
- }
- }
- }
- $this->{"_validate{$type}Dep"}($package, "<$simpledep>");
- }
- }
- }
- if ($simpledep == 'optional') {
- continue;
- }
- foreach (array('php', 'pearinstaller', 'os', 'arch') as $type) {
- if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) {
- $iter = $this->_packageInfo['dependencies'][$simpledep][$type];
- if (!isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- $this->{"_validate{$type}Dep"}($package);
- }
- }
- }
- }
- }
- }
- if (isset($this->_packageInfo['dependencies']['group'])) {
- $groups = $this->_packageInfo['dependencies']['group'];
- if (!isset($groups[0])) {
- $groups = array($groups);
- }
- $structure = array(
- '*package',
- '*subpackage',
- '*extension',
- );
- foreach ($groups as $group) {
- if ($this->_stupidSchemaValidate($structure, $group, '<group>')) {
- if (!PEAR_Validate::validGroupName($group['attribs']['name'])) {
- $this->_invalidDepGroupName($group['attribs']['name']);
- }
- foreach (array('package', 'subpackage', 'extension') as $type) {
- if (isset($group[$type])) {
- $iter = $group[$type];
- if (!isset($iter[0])) {
- $iter = array($iter);
- }
- foreach ($iter as $package) {
- if ($type != 'extension') {
- if (isset($package['uri'])) {
- if (isset($package['channel'])) {
- $this->_UrlOrChannelGroup($type,
- $package['name'],
- $group['name']);
- }
- } else {
- if (!isset($package['channel'])) {
- $this->_NoChannelGroup($type,
- $package['name'],
- $group['name']);
- }
- }
- }
- $this->{"_validate{$type}Dep"}($package, '<group name="' .
- $group['attribs']['name'] . '">');
- }
- }
- }
- }
- }
- }
- }
-
- function _validateCompatible()
- {
- $compat = $this->_packageInfo['compatible'];
- if (!isset($compat[0])) {
- $compat = array($compat);
- }
- $required = array('name', 'channel', 'min', 'max', '*exclude');
- foreach ($compat as $package) {
- $type = '<compatible>';
- if (is_array($package) && array_key_exists('name', $package)) {
- $type .= '<name>' . $package['name'] . '</name>';
- }
- $this->_stupidSchemaValidate($required, $package, $type);
- if (is_array($package) && array_key_exists('min', $package)) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $package['min'])) {
- $this->_invalidVersion(substr($type, 1) . '<min', $package['min']);
- }
- }
- if (is_array($package) && array_key_exists('max', $package)) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $package['max'])) {
- $this->_invalidVersion(substr($type, 1) . '<max', $package['max']);
- }
- }
- if (is_array($package) && array_key_exists('exclude', $package)) {
- if (!is_array($package['exclude'])) {
- $package['exclude'] = array($package['exclude']);
- }
- foreach ($package['exclude'] as $exclude) {
- if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/',
- $exclude)) {
- $this->_invalidVersion(substr($type, 1) . '<exclude', $exclude);
- }
- }
- }
- }
- }
-
- function _validateBundle($list)
- {
- if (!is_array($list) || !isset($list['bundledpackage'])) {
- return $this->_NoBundledPackages();
- }
- if (!is_array($list['bundledpackage']) || !isset($list['bundledpackage'][0])) {
- return $this->_AtLeast2BundledPackages();
- }
- foreach ($list['bundledpackage'] as $package) {
- if (!is_string($package)) {
- $this->_bundledPackagesMustBeFilename();
- }
- }
- }
-
- function _validateFilelist($list = false, $allowignore = false, $dirs = '')
- {
- $iscontents = false;
- if (!$list) {
- $iscontents = true;
- $list = $this->_packageInfo['contents'];
- if (isset($this->_packageInfo['bundle'])) {
- return $this->_validateBundle($list);
- }
- }
- if ($allowignore) {
- $struc = array(
- '*install->name->as',
- '*ignore->name'
- );
- } else {
- $struc = array(
- '*dir->name->?baseinstalldir',
- '*file->name->role->?baseinstalldir->?md5sum'
- );
- if (isset($list['dir']) && isset($list['file'])) {
- // stave off validation errors without requiring a set order.
- $_old = $list;
- if (isset($list['attribs'])) {
- $list = array('attribs' => $_old['attribs']);
- }
- $list['dir'] = $_old['dir'];
- $list['file'] = $_old['file'];
- }
- }
- if (!isset($list['attribs']) || !isset($list['attribs']['name'])) {
- $unknown = $allowignore ? '<filelist>' : '<dir name="*unknown*">';
- $dirname = $iscontents ? '<contents>' : $unknown;
- } else {
- $dirname = '<dir name="' . $list['attribs']['name'] . '">';
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $list['attribs']['name']))) {
- // file contains .. parent directory or . cur directory
- $this->_invalidDirName($list['attribs']['name']);
- }
- }
- $res = $this->_stupidSchemaValidate($struc, $list, $dirname);
- if ($allowignore && $res) {
- $ignored_or_installed = array();
- $this->_pf->getFilelist();
- $fcontents = $this->_pf->getContents();
- $filelist = array();
- if (!isset($fcontents['dir']['file'][0])) {
- $fcontents['dir']['file'] = array($fcontents['dir']['file']);
- }
- foreach ($fcontents['dir']['file'] as $file) {
- $filelist[$file['attribs']['name']] = true;
- }
- if (isset($list['install'])) {
- if (!isset($list['install'][0])) {
- $list['install'] = array($list['install']);
- }
- foreach ($list['install'] as $file) {
- if (!isset($filelist[$file['attribs']['name']])) {
- $this->_notInContents($file['attribs']['name'], 'install');
- continue;
- }
- if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) {
- $this->_multipleInstallAs($file['attribs']['name']);
- }
- if (!isset($ignored_or_installed[$file['attribs']['name']])) {
- $ignored_or_installed[$file['attribs']['name']] = array();
- }
- $ignored_or_installed[$file['attribs']['name']][] = 1;
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $file['attribs']['as']))) {
- // file contains .. parent directory or . cur directory references
- $this->_invalidFileInstallAs($file['attribs']['name'],
- $file['attribs']['as']);
- }
- }
- }
- if (isset($list['ignore'])) {
- if (!isset($list['ignore'][0])) {
- $list['ignore'] = array($list['ignore']);
- }
- foreach ($list['ignore'] as $file) {
- if (!isset($filelist[$file['attribs']['name']])) {
- $this->_notInContents($file['attribs']['name'], 'ignore');
- continue;
- }
- if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) {
- $this->_ignoreAndInstallAs($file['attribs']['name']);
- }
- }
- }
- }
- if (!$allowignore && isset($list['file'])) {
- if (is_string($list['file'])) {
- $this->_oldStyleFileNotAllowed();
- return false;
- }
- if (!isset($list['file'][0])) {
- // single file
- $list['file'] = array($list['file']);
- }
- foreach ($list['file'] as $i => $file)
- {
- if (isset($file['attribs']) && isset($file['attribs']['name'])) {
- if ($file['attribs']['name']{0} == '.' &&
- $file['attribs']['name']{1} == '/') {
- // name is something like "./doc/whatever.txt"
- $this->_invalidFileName($file['attribs']['name'], $dirname);
- }
- if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~',
- str_replace('\\', '/', $file['attribs']['name']))) {
- // file contains .. parent directory or . cur directory
- $this->_invalidFileName($file['attribs']['name'], $dirname);
- }
- }
- if (isset($file['attribs']) && isset($file['attribs']['role'])) {
- if (!$this->_validateRole($file['attribs']['role'])) {
- if (isset($this->_packageInfo['usesrole'])) {
- $roles = $this->_packageInfo['usesrole'];
- if (!isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if ($role['role'] = $file['attribs']['role']) {
- $msg = 'This package contains role "%role%" and requires ' .
- 'package "%package%" to be used';
- if (isset($role['uri'])) {
- $params = array('role' => $role['role'],
- 'package' => $role['uri']);
- } else {
- $params = array('role' => $role['role'],
- 'package' => $this->_pf->_registry->
- parsedPackageNameToString(array('package' =>
- $role['package'], 'channel' => $role['channel']),
- true));
- }
- $this->_stack->push('_mustInstallRole', 'error', $params, $msg);
- }
- }
- }
- $this->_invalidFileRole($file['attribs']['name'],
- $dirname, $file['attribs']['role']);
- }
- }
- if (!isset($file['attribs'])) {
- continue;
- }
- $save = $file['attribs'];
- if ($dirs) {
- $save['name'] = $dirs . '/' . $save['name'];
- }
- unset($file['attribs']);
- if (count($file) && $this->_curState != PEAR_VALIDATE_DOWNLOADING) { // has tasks
- foreach ($file as $task => $value) {
- if ($tagClass = $this->_pf->getTask($task)) {
- if (!is_array($value) || !isset($value[0])) {
- $value = array($value);
- }
- foreach ($value as $v) {
- $ret = call_user_func(array($tagClass, 'validateXml'),
- $this->_pf, $v, $this->_pf->_config, $save);
- if (is_array($ret)) {
- $this->_invalidTask($task, $ret, isset($save['name']) ?
- $save['name'] : '');
- }
- }
- } else {
- if (isset($this->_packageInfo['usestask'])) {
- $roles = $this->_packageInfo['usestask'];
- if (!isset($roles[0])) {
- $roles = array($roles);
- }
- foreach ($roles as $role) {
- if ($role['task'] = $task) {
- $msg = 'This package contains task "%task%" and requires ' .
- 'package "%package%" to be used';
- if (isset($role['uri'])) {
- $params = array('task' => $role['task'],
- 'package' => $role['uri']);
- } else {
- $params = array('task' => $role['task'],
- 'package' => $this->_pf->_registry->
- parsedPackageNameToString(array('package' =>
- $role['package'], 'channel' => $role['channel']),
- true));
- }
- $this->_stack->push('_mustInstallTask', 'error',
- $params, $msg);
- }
- }
- }
- $this->_unknownTask($task, $save['name']);
- }
- }
- }
- }
- }
- if (isset($list['ignore'])) {
- if (!$allowignore) {
- $this->_ignoreNotAllowed('ignore');
- }
- }
- if (isset($list['install'])) {
- if (!$allowignore) {
- $this->_ignoreNotAllowed('install');
- }
- }
- if (isset($list['file'])) {
- if ($allowignore) {
- $this->_fileNotAllowed('file');
- }
- }
- if (isset($list['dir'])) {
- if ($allowignore) {
- $this->_fileNotAllowed('dir');
- } else {
- if (!isset($list['dir'][0])) {
- $list['dir'] = array($list['dir']);
- }
- foreach ($list['dir'] as $dir) {
- if (isset($dir['attribs']) && isset($dir['attribs']['name'])) {
- if ($dir['attribs']['name'] == '/' ||
- !isset($this->_packageInfo['contents']['dir']['dir'])) {
- // always use nothing if the filelist has already been flattened
- $newdirs = '';
- } elseif ($dirs == '') {
- $newdirs = $dir['attribs']['name'];
- } else {
- $newdirs = $dirs . '/' . $dir['attribs']['name'];
- }
- } else {
- $newdirs = $dirs;
- }
- $this->_validateFilelist($dir, $allowignore, $newdirs);
- }
- }
- }
- }
-
- function _validateRelease()
- {
- if (isset($this->_packageInfo['phprelease'])) {
- $release = 'phprelease';
- if (isset($this->_packageInfo['providesextension'])) {
- $this->_cannotProvideExtension($release);
- }
- if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
- $this->_cannotHaveSrcpackage($release);
- }
- $releases = $this->_packageInfo['phprelease'];
- if (!is_array($releases)) {
- return true;
- }
- if (!isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*filelist',
- ), $rel, '<phprelease>');
- }
- }
- foreach (array('', 'zend') as $prefix) {
- $releasetype = $prefix . 'extsrcrelease';
- if (isset($this->_packageInfo[$releasetype])) {
- $release = $releasetype;
- if (!isset($this->_packageInfo['providesextension'])) {
- $this->_mustProvideExtension($release);
- }
- if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
- $this->_cannotHaveSrcpackage($release);
- }
- $releases = $this->_packageInfo[$releasetype];
- if (!is_array($releases)) {
- return true;
- }
- if (!isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*configureoption->name->prompt->?default',
- '*binarypackage',
- '*filelist',
- ), $rel, '<' . $releasetype . '>');
- if (isset($rel['binarypackage'])) {
- if (!is_array($rel['binarypackage']) || !isset($rel['binarypackage'][0])) {
- $rel['binarypackage'] = array($rel['binarypackage']);
- }
- foreach ($rel['binarypackage'] as $bin) {
- if (!is_string($bin)) {
- $this->_binaryPackageMustBePackagename();
- }
- }
- }
- }
- }
- $releasetype = 'extbinrelease';
- if (isset($this->_packageInfo[$releasetype])) {
- $release = $releasetype;
- if (!isset($this->_packageInfo['providesextension'])) {
- $this->_mustProvideExtension($release);
- }
- if (isset($this->_packageInfo['channel']) &&
- !isset($this->_packageInfo['srcpackage'])) {
- $this->_mustSrcPackage($release);
- }
- if (isset($this->_packageInfo['uri']) && !isset($this->_packageInfo['srcuri'])) {
- $this->_mustSrcuri($release);
- }
- $releases = $this->_packageInfo[$releasetype];
- if (!is_array($releases)) {
- return true;
- }
- if (!isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*filelist',
- ), $rel, '<' . $releasetype . '>');
- }
- }
- }
- if (isset($this->_packageInfo['bundle'])) {
- $release = 'bundle';
- if (isset($this->_packageInfo['providesextension'])) {
- $this->_cannotProvideExtension($release);
- }
- if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) {
- $this->_cannotHaveSrcpackage($release);
- }
- $releases = $this->_packageInfo['bundle'];
- if (!is_array($releases) || !isset($releases[0])) {
- $releases = array($releases);
- }
- foreach ($releases as $rel) {
- $this->_stupidSchemaValidate(array(
- '*installconditions',
- '*filelist',
- ), $rel, '<bundle>');
- }
- }
- foreach ($releases as $rel) {
- if (is_array($rel) && array_key_exists('installconditions', $rel)) {
- $this->_validateInstallConditions($rel['installconditions'],
- "<$release><installconditions>");
- }
- if (is_array($rel) && array_key_exists('filelist', $rel)) {
- if ($rel['filelist']) {
-
- $this->_validateFilelist($rel['filelist'], true);
- }
- }
- }
- }
-
- /**
- * This is here to allow role extension through plugins
- * @param string
- */
- function _validateRole($role)
- {
- return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType()));
- }
-
- function _pearVersionTooLow($version)
- {
- $this->_stack->push(__FUNCTION__, 'error',
- array('version' => $version),
- 'This package.xml requires PEAR version %version% to parse properly, we are ' .
- 'version 1.9.5');
- }
-
- function _invalidTagOrder($oktags, $actual, $root)
- {
- $this->_stack->push(__FUNCTION__, 'error',
- array('oktags' => $oktags, 'actual' => $actual, 'root' => $root),
- 'Invalid tag order in %root%, found <%actual%> expected one of "%oktags%"');
- }
-
- function _ignoreNotAllowed($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '<%type%> is not allowed inside global <contents>, only inside ' .
- '<phprelease>/<extbinrelease>/<zendextbinrelease>, use <dir> and <file> only');
- }
-
- function _fileNotAllowed($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '<%type%> is not allowed inside release <filelist>, only inside ' .
- '<contents>, use <ignore> and <install> only');
- }
-
- function _oldStyleFileNotAllowed()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'Old-style <file>name</file> is not allowed. Use' .
- '<file name="name" role="role"/>');
- }
-
- function _tagMissingAttribute($tag, $attr, $context)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag,
- 'attribute' => $attr, 'context' => $context),
- 'tag <%tag%> in context "%context%" has no attribute "%attribute%"');
- }
-
- function _tagHasNoAttribs($tag, $context)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag,
- 'context' => $context),
- 'tag <%tag%> has no attributes in context "%context%"');
- }
-
- function _invalidInternalStructure()
- {
- $this->_stack->push(__FUNCTION__, 'exception', array(),
- 'internal array was not generated by compatible parser, or extreme parser error, cannot continue');
- }
-
- function _invalidFileRole($file, $dir, $role)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'file' => $file, 'dir' => $dir, 'role' => $role,
- 'roles' => PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())),
- 'File "%file%" in directory "%dir%" has invalid role "%role%", should be one of %roles%');
- }
-
- function _invalidFileName($file, $dir)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'file' => $file),
- 'File "%file%" in directory "%dir%" cannot begin with "./" or contain ".."');
- }
-
- function _invalidFileInstallAs($file, $as)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'file' => $file, 'as' => $as),
- 'File "%file%" <install as="%as%"/> cannot contain "./" or contain ".."');
- }
-
- function _invalidDirName($dir)
- {
- $this->_stack->push(__FUNCTION__, 'error', array(
- 'dir' => $file),
- 'Directory "%dir%" cannot begin with "./" or contain ".."');
- }
-
- function _filelistCannotContainFile($filelist)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist),
- '<%tag%> can only contain <dir>, contains <file>. Use ' .
- '<dir name="/"> as the first dir element');
- }
-
- function _filelistMustContainDir($filelist)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist),
- '<%tag%> must contain <dir>. Use <dir name="/"> as the ' .
- 'first dir element');
- }
-
- function _tagCannotBeEmpty($tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag),
- '<%tag%> cannot be empty (<%tag%/>)');
- }
-
- function _UrlOrChannel($type, $name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name),
- 'Required dependency <%type%> "%name%" can have either url OR ' .
- 'channel attributes, and not both');
- }
-
- function _NoChannel($type, $name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name),
- 'Required dependency <%type%> "%name%" must have either url OR ' .
- 'channel attributes');
- }
-
- function _UrlOrChannelGroup($type, $name, $group)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name, 'group' => $group),
- 'Group "%group%" dependency <%type%> "%name%" can have either url OR ' .
- 'channel attributes, and not both');
- }
-
- function _NoChannelGroup($type, $name, $group)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type,
- 'name' => $name, 'group' => $group),
- 'Group "%group%" dependency <%type%> "%name%" must have either url OR ' .
- 'channel attributes');
- }
-
- function _unknownChannel($channel)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('channel' => $channel),
- 'Unknown channel "%channel%"');
- }
-
- function _noPackageVersion()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'package.xml <package> tag has no version attribute, or version is not 2.0');
- }
-
- function _NoBundledPackages()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'No <bundledpackage> tag was found in <contents>, required for bundle packages');
- }
-
- function _AtLeast2BundledPackages()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'At least 2 packages must be bundled in a bundle package');
- }
-
- function _ChannelOrUri($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Bundled package "%name%" can have either a uri or a channel, not both');
- }
-
- function _noChildTag($child, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('child' => $child, 'tag' => $tag),
- 'Tag <%tag%> is missing child tag <%child%>');
- }
-
- function _invalidVersion($type, $value)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value),
- 'Version type <%type%> is not a valid version (%value%)');
- }
-
- function _invalidState($type, $value)
- {
- $states = array('stable', 'beta', 'alpha', 'devel');
- if ($type != 'api') {
- $states[] = 'snapshot';
- }
- if (strtolower($value) == 'rc') {
- $this->_stack->push(__FUNCTION__, 'error',
- array('version' => $this->_packageInfo['version']['release']),
- 'RC is not a state, it is a version postfix, try %version%RC1, stability beta');
- }
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value,
- 'types' => $states),
- 'Stability type <%type%> is not a valid stability (%value%), must be one of ' .
- '%types%');
- }
-
- function _invalidTask($task, $ret, $file)
- {
- switch ($ret[0]) {
- case PEAR_TASK_ERROR_MISSING_ATTRIB :
- $info = array('attrib' => $ret[1], 'task' => $task, 'file' => $file);
- $msg = 'task <%task%> is missing attribute "%attrib%" in file %file%';
- break;
- case PEAR_TASK_ERROR_NOATTRIBS :
- $info = array('task' => $task, 'file' => $file);
- $msg = 'task <%task%> has no attributes in file %file%';
- break;
- case PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE :
- $info = array('attrib' => $ret[1], 'values' => $ret[3],
- 'was' => $ret[2], 'task' => $task, 'file' => $file);
- $msg = 'task <%task%> attribute "%attrib%" has the wrong value "%was%" '.
- 'in file %file%, expecting one of "%values%"';
- break;
- case PEAR_TASK_ERROR_INVALID :
- $info = array('reason' => $ret[1], 'task' => $task, 'file' => $file);
- $msg = 'task <%task%> in file %file% is invalid because of "%reason%"';
- break;
- }
- $this->_stack->push(__FUNCTION__, 'error', $info, $msg);
- }
-
- function _unknownTask($task, $file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('task' => $task, 'file' => $file),
- 'Unknown task "%task%" passed in file <file name="%file%">');
- }
-
- function _subpackageCannotProvideExtension($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Subpackage dependency "%name%" cannot use <providesextension>, ' .
- 'only package dependencies can use this tag');
- }
-
- function _subpackagesCannotConflict($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Subpackage dependency "%name%" cannot use <conflicts/>, ' .
- 'only package dependencies can use this tag');
- }
-
- function _cannotProvideExtension($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<%release%> packages cannot use <providesextension>, only extbinrelease, extsrcrelease, zendextsrcrelease, and zendextbinrelease can provide a PHP extension');
- }
-
- function _mustProvideExtension($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<%release%> packages must use <providesextension> to indicate which PHP extension is provided');
- }
-
- function _cannotHaveSrcpackage($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<%release%> packages cannot specify a source code package, only extension binaries may use the <srcpackage> tag');
- }
-
- function _mustSrcPackage($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<extbinrelease>/<zendextbinrelease> packages must specify a source code package with <srcpackage>');
- }
-
- function _mustSrcuri($release)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('release' => $release),
- '<extbinrelease>/<zendextbinrelease> packages must specify a source code package with <srcuri>');
- }
-
- function _uriDepsCannotHaveVersioning($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '%type%: dependencies with a <uri> tag cannot have any versioning information');
- }
-
- function _conflictingDepsCannotHaveVersioning($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '%type%: conflicting dependencies cannot have versioning info, use <exclude> to ' .
- 'exclude specific versions of a dependency');
- }
-
- function _DepchannelCannotBeUri($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('type' => $type),
- '%type%: channel cannot be __uri, this is a pseudo-channel reserved for uri ' .
- 'dependencies only');
- }
-
- function _bundledPackagesMustBeFilename()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- '<bundledpackage> tags must contain only the filename of a package release ' .
- 'in the bundle');
- }
-
- function _binaryPackageMustBePackagename()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- '<binarypackage> tags must contain the name of a package that is ' .
- 'a compiled version of this extsrc/zendextsrc package');
- }
-
- function _fileNotFound($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'File "%file%" in package.xml does not exist');
- }
-
- function _notInContents($file, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file, 'tag' => $tag),
- '<%tag% name="%file%"> is invalid, file is not in <contents>');
- }
-
- function _cannotValidateNoPathSet()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'Cannot validate files, no path to package file is set (use setPackageFile())');
- }
-
- function _usesroletaskMustHaveChannelOrUri($role, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag),
- '<%tag%> for role "%role%" must contain either <uri>, or <channel> and <package>');
- }
-
- function _usesroletaskMustHavePackage($role, $tag)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag),
- '<%tag%> for role "%role%" must contain <package>');
- }
-
- function _usesroletaskMustHaveRoleTask($tag, $type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, 'type' => $type),
- '<%tag%> must contain <%type%> defining the %type% to be used');
- }
-
- function _cannotConflictWithAllOs($type)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag),
- '%tag% cannot conflict with all OSes');
- }
-
- function _invalidDepGroupName($name)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('name' => $name),
- 'Invalid dependency group name "%name%"');
- }
-
- function _multipleToplevelDirNotAllowed()
- {
- $this->_stack->push(__FUNCTION__, 'error', array(),
- 'Multiple top-level <dir> tags are not allowed. Enclose them ' .
- 'in a <dir name="/">');
- }
-
- function _multipleInstallAs($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Only one <install> tag is allowed for file "%file%"');
- }
-
- function _ignoreAndInstallAs($file)
- {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Cannot have both <ignore> and <install> tags for file "%file%"');
- }
-
- function _analyzeBundledPackages()
- {
- if (!$this->_isValid) {
- return false;
- }
- if (!$this->_pf->getPackageType() == 'bundle') {
- return false;
- }
- if (!isset($this->_pf->_packageFile)) {
- return false;
- }
- $dir_prefix = dirname($this->_pf->_packageFile);
- $common = new PEAR_Common;
- $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') :
- array($common, 'log');
- $info = $this->_pf->getContents();
- $info = $info['bundledpackage'];
- if (!is_array($info)) {
- $info = array($info);
- }
- $pkg = new PEAR_PackageFile($this->_pf->_config);
- foreach ($info as $package) {
- if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $package)) {
- $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $package);
- $this->_isValid = 0;
- continue;
- }
- call_user_func_array($log, array(1, "Analyzing bundled package $package"));
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $ret = $pkg->fromAnyFile($dir_prefix . DIRECTORY_SEPARATOR . $package,
- PEAR_VALIDATE_NORMAL);
- PEAR::popErrorHandling();
- if (PEAR::isError($ret)) {
- call_user_func_array($log, array(0, "ERROR: package $package is not a valid " .
- 'package'));
- $inf = $ret->getUserInfo();
- if (is_array($inf)) {
- foreach ($inf as $err) {
- call_user_func_array($log, array(1, $err['message']));
- }
- }
- return false;
- }
- }
- return true;
- }
-
- function _analyzePhpFiles()
- {
- if (!$this->_isValid) {
- return false;
- }
- if (!isset($this->_pf->_packageFile)) {
- $this->_cannotValidateNoPathSet();
- return false;
- }
- $dir_prefix = dirname($this->_pf->_packageFile);
- $common = new PEAR_Common;
- $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') :
- array(&$common, 'log');
- $info = $this->_pf->getContents();
- if (!$info || !isset($info['dir']['file'])) {
- $this->_tagCannotBeEmpty('contents><dir');
- return false;
- }
- $info = $info['dir']['file'];
- if (isset($info['attribs'])) {
- $info = array($info);
- }
- $provides = array();
- foreach ($info as $fa) {
- $fa = $fa['attribs'];
- $file = $fa['name'];
- if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $file)) {
- $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $file);
- $this->_isValid = 0;
- continue;
- }
- if (in_array($fa['role'], PEAR_Installer_Role::getPhpRoles()) && $dir_prefix) {
- call_user_func_array($log, array(1, "Analyzing $file"));
- $srcinfo = $this->analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file);
- if ($srcinfo) {
- $provides = array_merge($provides, $this->_buildProvidesArray($srcinfo));
- }
- }
- }
- $this->_packageName = $pn = $this->_pf->getPackage();
- $pnl = strlen($pn);
- foreach ($provides as $key => $what) {
- if (isset($what['explicit']) || !$what) {
- // skip conformance checks if the provides entry is
- // specified in the package.xml file
- continue;
- }
- extract($what);
- if ($type == 'class') {
- if (!strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_stack->push(__FUNCTION__, 'warning',
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn),
- 'in %file%: %type% "%name%" not prefixed with package name "%package%"');
- } elseif ($type == 'function') {
- if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) {
- continue;
- }
- $this->_stack->push(__FUNCTION__, 'warning',
- array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn),
- 'in %file%: %type% "%name%" not prefixed with package name "%package%"');
- }
- }
- return $this->_isValid;
- }
-
- /**
- * Analyze the source code of the given PHP file
- *
- * @param string Filename of the PHP file
- * @param boolean whether to analyze $file as the file contents
- * @return mixed
- */
- function analyzeSourceCode($file, $string = false)
- {
- if (!function_exists("token_get_all")) {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Parser error: token_get_all() function must exist to analyze source code, PHP may have been compiled with --disable-tokenizer');
- return false;
- }
-
- if (!defined('T_DOC_COMMENT')) {
- define('T_DOC_COMMENT', T_COMMENT);
- }
-
- if (!defined('T_INTERFACE')) {
- define('T_INTERFACE', -1);
- }
-
- if (!defined('T_IMPLEMENTS')) {
- define('T_IMPLEMENTS', -1);
- }
-
- if ($string) {
- $contents = $file;
- } else {
- if (!$fp = @fopen($file, "r")) {
- return false;
- }
- fclose($fp);
- $contents = file_get_contents($file);
- }
-
- // Silence this function so we can catch PHP Warnings and show our own custom message
- $tokens = @token_get_all($contents);
- if (isset($php_errormsg)) {
- if (isset($this->_stack)) {
- $pn = $this->_pf->getPackage();
- $this->_stack->push(__FUNCTION__, 'warning',
- array('file' => $file, 'package' => $pn),
- 'in %file%: Could not process file for unknown reasons,' .
- ' possibly a PHP parse error in %file% from %package%');
- }
- }
-/*
- for ($i = 0; $i < sizeof($tokens); $i++) {
- @list($token, $data) = $tokens[$i];
- if (is_string($token)) {
- var_dump($token);
- } else {
- print token_name($token) . ' ';
- var_dump(rtrim($data));
- }
- }
-*/
- $look_for = 0;
- $paren_level = 0;
- $bracket_level = 0;
- $brace_level = 0;
- $lastphpdoc = '';
- $current_class = '';
- $current_interface = '';
- $current_class_level = -1;
- $current_function = '';
- $current_function_level = -1;
- $declared_classes = array();
- $declared_interfaces = array();
- $declared_functions = array();
- $declared_methods = array();
- $used_classes = array();
- $used_functions = array();
- $extends = array();
- $implements = array();
- $nodeps = array();
- $inquote = false;
- $interface = false;
- for ($i = 0; $i < sizeof($tokens); $i++) {
- if (is_array($tokens[$i])) {
- list($token, $data) = $tokens[$i];
- } else {
- $token = $tokens[$i];
- $data = '';
- }
-
- if ($inquote) {
- if ($token != '"' && $token != T_END_HEREDOC) {
- continue;
- } else {
- $inquote = false;
- continue;
- }
- }
-
- switch ($token) {
- case T_WHITESPACE :
- continue;
- case ';':
- if ($interface) {
- $current_function = '';
- $current_function_level = -1;
- }
- break;
- case '"':
- case T_START_HEREDOC:
- $inquote = true;
- break;
- case T_CURLY_OPEN:
- case T_DOLLAR_OPEN_CURLY_BRACES:
- case '{': $brace_level++; continue 2;
- case '}':
- $brace_level--;
- if ($current_class_level == $brace_level) {
- $current_class = '';
- $current_class_level = -1;
- }
- if ($current_function_level == $brace_level) {
- $current_function = '';
- $current_function_level = -1;
- }
- continue 2;
- case '[': $bracket_level++; continue 2;
- case ']': $bracket_level--; continue 2;
- case '(': $paren_level++; continue 2;
- case ')': $paren_level--; continue 2;
- case T_INTERFACE:
- $interface = true;
- case T_CLASS:
- if (($current_class_level != -1) || ($current_function_level != -1)) {
- if (isset($this->_stack)) {
- $this->_stack->push(__FUNCTION__, 'error', array('file' => $file),
- 'Parser error: invalid PHP found in file "%file%"');
- } else {
- PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"",
- PEAR_COMMON_ERROR_INVALIDPHP);
- }
-
- return false;
- }
- case T_FUNCTION:
- case T_NEW:
- case T_EXTENDS:
- case T_IMPLEMENTS:
- $look_for = $token;
- continue 2;
- case T_STRING:
- if ($look_for == T_CLASS) {
- $current_class = $data;
- $current_class_level = $brace_level;
- $declared_classes[] = $current_class;
- } elseif ($look_for == T_INTERFACE) {
- $current_interface = $data;
- $current_class_level = $brace_level;
- $declared_interfaces[] = $current_interface;
- } elseif ($look_for == T_IMPLEMENTS) {
- $implements[$current_class] = $data;
- } elseif ($look_for == T_EXTENDS) {
- $extends[$current_class] = $data;
- } elseif ($look_for == T_FUNCTION) {
- if ($current_class) {
- $current_function = "$current_class::$data";
- $declared_methods[$current_class][] = $data;
- } elseif ($current_interface) {
- $current_function = "$current_interface::$data";
- $declared_methods[$current_interface][] = $data;
- } else {
- $current_function = $data;
- $declared_functions[] = $current_function;
- }
-
- $current_function_level = $brace_level;
- $m = array();
- } elseif ($look_for == T_NEW) {
- $used_classes[$data] = true;
- }
-
- $look_for = 0;
- continue 2;
- case T_VARIABLE:
- $look_for = 0;
- continue 2;
- case T_DOC_COMMENT:
- case T_COMMENT:
- if (preg_match('!^/\*\*\s!', $data)) {
- $lastphpdoc = $data;
- if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) {
- $nodeps = array_merge($nodeps, $m[1]);
- }
- }
- continue 2;
- case T_DOUBLE_COLON:
- $token = $tokens[$i - 1][0];
- if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC || $token == T_VARIABLE)) {
- if (isset($this->_stack)) {
- $this->_stack->push(__FUNCTION__, 'warning', array('file' => $file),
- 'Parser error: invalid PHP found in file "%file%"');
- } else {
- PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"",
- PEAR_COMMON_ERROR_INVALIDPHP);
- }
-
- return false;
- }
-
- $class = $tokens[$i - 1][1];
- if (strtolower($class) != 'parent') {
- $used_classes[$class] = true;
- }
-
- continue 2;
- }
- }
-
- return array(
- "source_file" => $file,
- "declared_classes" => $declared_classes,
- "declared_interfaces" => $declared_interfaces,
- "declared_methods" => $declared_methods,
- "declared_functions" => $declared_functions,
- "used_classes" => array_diff(array_keys($used_classes), $nodeps),
- "inheritance" => $extends,
- "implements" => $implements,
- );
- }
-
- /**
- * Build a "provides" array from data returned by
- * analyzeSourceCode(). The format of the built array is like
- * this:
- *
- * array(
- * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'),
- * ...
- * )
- *
- *
- * @param array $srcinfo array with information about a source file
- * as returned by the analyzeSourceCode() method.
- *
- * @return void
- *
- * @access private
- *
- */
- function _buildProvidesArray($srcinfo)
- {
- if (!$this->_isValid) {
- return array();
- }
-
- $providesret = array();
- $file = basename($srcinfo['source_file']);
- $pn = isset($this->_pf) ? $this->_pf->getPackage() : '';
- $pnl = strlen($pn);
- foreach ($srcinfo['declared_classes'] as $class) {
- $key = "class;$class";
- if (isset($providesret[$key])) {
- continue;
- }
-
- $providesret[$key] =
- array('file'=> $file, 'type' => 'class', 'name' => $class);
- if (isset($srcinfo['inheritance'][$class])) {
- $providesret[$key]['extends'] =
- $srcinfo['inheritance'][$class];
- }
- }
-
- foreach ($srcinfo['declared_methods'] as $class => $methods) {
- foreach ($methods as $method) {
- $function = "$class::$method";
- $key = "function;$function";
- if ($method{0} == '_' || !strcasecmp($method, $class) ||
- isset($providesret[$key])) {
- continue;
- }
-
- $providesret[$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
- }
-
- foreach ($srcinfo['declared_functions'] as $function) {
- $key = "function;$function";
- if ($function{0} == '_' || isset($providesret[$key])) {
- continue;
- }
-
- if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {
- $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\"";
- }
-
- $providesret[$key] =
- array('file'=> $file, 'type' => 'function', 'name' => $function);
- }
-
- return $providesret;
- }
-}
-<?php
-/**
- * PEAR_Registry
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * for PEAR_Error
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/DependencyDB.php';
-
-define('PEAR_REGISTRY_ERROR_LOCK', -2);
-define('PEAR_REGISTRY_ERROR_FORMAT', -3);
-define('PEAR_REGISTRY_ERROR_FILE', -4);
-define('PEAR_REGISTRY_ERROR_CONFLICT', -5);
-define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6);
-
-/**
- * Administration class used to maintain the installed package database.
- * @category pear
- * @package PEAR
- * @author Stig Bakken <ssb@php.net>
- * @author Tomas V. V. Cox <cox@idecnet.com>
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Registry extends PEAR
-{
- /**
- * File containing all channel information.
- * @var string
- */
- var $channels = '';
-
- /** Directory where registry files are stored.
- * @var string
- */
- var $statedir = '';
-
- /** File where the file map is stored
- * @var string
- */
- var $filemap = '';
-
- /** Directory where registry files for channels are stored.
- * @var string
- */
- var $channelsdir = '';
-
- /** Name of file used for locking the registry
- * @var string
- */
- var $lockfile = '';
-
- /** File descriptor used during locking
- * @var resource
- */
- var $lock_fp = null;
-
- /** Mode used during locking
- * @var int
- */
- var $lock_mode = 0; // XXX UNUSED
-
- /** Cache of package information. Structure:
- * array(
- * 'package' => array('id' => ... ),
- * ... )
- * @var array
- */
- var $pkginfo_cache = array();
-
- /** Cache of file map. Structure:
- * array( '/path/to/file' => 'package', ... )
- * @var array
- */
- var $filemap_cache = array();
-
- /**
- * @var false|PEAR_ChannelFile
- */
- var $_pearChannel;
-
- /**
- * @var false|PEAR_ChannelFile
- */
- var $_peclChannel;
-
- /**
- * @var false|PEAR_ChannelFile
- */
- var $_docChannel;
-
- /**
- * @var PEAR_DependencyDB
- */
- var $_dependencyDB;
-
- /**
- * @var PEAR_Config
- */
- var $_config;
-
- /**
- * PEAR_Registry constructor.
- *
- * @param string (optional) PEAR install directory (for .php files)
- * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PEAR channel, if
- * default values are not desired. Only used the very first time a PEAR
- * repository is initialized
- * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PECL channel, if
- * default values are not desired. Only used the very first time a PEAR
- * repository is initialized
- *
- * @access public
- */
- function __construct($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false,
- $pecl_channel = false)
- {
- parent::__construct();
- $this->setInstallDir($pear_install_dir);
- $this->_pearChannel = $pear_channel;
- $this->_peclChannel = $pecl_channel;
- $this->_config = false;
- }
-
- function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR)
- {
- $ds = DIRECTORY_SEPARATOR;
- $this->install_dir = $pear_install_dir;
- $this->channelsdir = $pear_install_dir.$ds.'.channels';
- $this->statedir = $pear_install_dir.$ds.'.registry';
- $this->filemap = $pear_install_dir.$ds.'.filemap';
- $this->lockfile = $pear_install_dir.$ds.'.lock';
- }
-
- function hasWriteAccess()
- {
- if (!file_exists($this->install_dir)) {
- $dir = $this->install_dir;
- while ($dir && $dir != '.') {
- $olddir = $dir;
- $dir = dirname($dir);
- if ($dir != '.' && file_exists($dir)) {
- if (is_writeable($dir)) {
- return true;
- }
-
- return false;
- }
-
- if ($dir == $olddir) { // this can happen in safe mode
- return @is_writable($dir);
- }
- }
-
- return false;
- }
-
- return is_writeable($this->install_dir);
- }
-
- function setConfig(&$config, $resetInstallDir = true)
- {
- $this->_config = &$config;
- if ($resetInstallDir) {
- $this->setInstallDir($config->get('php_dir'));
- }
- }
-
- function _initializeChannelDirs()
- {
- static $running = false;
- if (!$running) {
- $running = true;
- $ds = DIRECTORY_SEPARATOR;
- if (!is_dir($this->channelsdir) ||
- !file_exists($this->channelsdir . $ds . 'pear.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . '__uri.reg')) {
- if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) {
- $pear_channel = $this->_pearChannel;
- if (!is_a($pear_channel, 'PEAR_ChannelFile') || !$pear_channel->validate()) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $pear_channel = new PEAR_ChannelFile;
- $pear_channel->setAlias('pear');
- $pear_channel->setServer('pear.php.net');
- $pear_channel->setSummary('PHP Extension and Application Repository');
- $pear_channel->setDefaultPEARProtocols();
- $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
- //$pear_channel->setBaseURL('REST1.4', 'http://pear.php.net/rest/');
- } else {
- $pear_channel->setServer('pear.php.net');
- $pear_channel->setAlias('pear');
- }
-
- $pear_channel->validate();
- $this->_addChannel($pear_channel);
- }
-
- if (!file_exists($this->channelsdir . $ds . 'pecl.php.net.reg')) {
- $pecl_channel = $this->_peclChannel;
- if (!is_a($pecl_channel, 'PEAR_ChannelFile') || !$pecl_channel->validate()) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $pecl_channel = new PEAR_ChannelFile;
- $pecl_channel->setAlias('pecl');
- $pecl_channel->setServer('pecl.php.net');
- $pecl_channel->setSummary('PHP Extension Community Library');
- $pecl_channel->setDefaultPEARProtocols();
- $pecl_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
- $pecl_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
- $pecl_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
- } else {
- $pecl_channel->setServer('pecl.php.net');
- $pecl_channel->setAlias('pecl');
- }
-
- $pecl_channel->validate();
- $this->_addChannel($pecl_channel);
- }
-
- if (!file_exists($this->channelsdir . $ds . 'doc.php.net.reg')) {
- $doc_channel = $this->_docChannel;
- if (!is_a($doc_channel, 'PEAR_ChannelFile') || !$doc_channel->validate()) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $doc_channel = new PEAR_ChannelFile;
- $doc_channel->setAlias('phpdocs');
- $doc_channel->setServer('doc.php.net');
- $doc_channel->setSummary('PHP Documentation Team');
- $doc_channel->setDefaultPEARProtocols();
- $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
- } else {
- $doc_channel->setServer('doc.php.net');
- $doc_channel->setAlias('doc');
- }
-
- $doc_channel->validate();
- $this->_addChannel($doc_channel);
- }
-
- if (!file_exists($this->channelsdir . $ds . '__uri.reg')) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $private = new PEAR_ChannelFile;
- $private->setName('__uri');
- $private->setDefaultPEARProtocols();
- $private->setBaseURL('REST1.0', '****');
- $private->setSummary('Pseudo-channel for static packages');
- $this->_addChannel($private);
- }
- $this->_rebuildFileMap();
- }
-
- $running = false;
- }
- }
-
- function _initializeDirs()
- {
- $ds = DIRECTORY_SEPARATOR;
- // XXX Compatibility code should be removed in the future
- // rename all registry files if any to lowercase
- if (!OS_WINDOWS && file_exists($this->statedir) && is_dir($this->statedir) &&
- $handle = opendir($this->statedir)) {
- $dest = $this->statedir . $ds;
- while (false !== ($file = readdir($handle))) {
- if (preg_match('/^.*[A-Z].*\.reg\\z/', $file)) {
- rename($dest . $file, $dest . strtolower($file));
- }
- }
- closedir($handle);
- }
-
- $this->_initializeChannelDirs();
- if (!file_exists($this->filemap)) {
- $this->_rebuildFileMap();
- }
- $this->_initializeDepDB();
- }
-
- function _initializeDepDB()
- {
- if (!isset($this->_dependencyDB)) {
- static $initializing = false;
- if (!$initializing) {
- $initializing = true;
- if (!$this->_config) { // never used?
- $file = OS_WINDOWS ? 'pear.ini' : '.pearrc';
- $this->_config = new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR .
- $file);
- $this->_config->setRegistry($this);
- $this->_config->set('php_dir', $this->install_dir);
- }
-
- $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
- if (PEAR::isError($this->_dependencyDB)) {
- // attempt to recover by removing the dep db
- if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') .
- DIRECTORY_SEPARATOR . '.depdb')) {
- @unlink($this->_config->get('php_dir', null, 'pear.php.net') .
- DIRECTORY_SEPARATOR . '.depdb');
- }
-
- $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
- if (PEAR::isError($this->_dependencyDB)) {
- echo $this->_dependencyDB->getMessage();
- echo 'Unrecoverable error';
- exit(1);
- }
- }
-
- $initializing = false;
- }
- }
- }
-
- /**
- * PEAR_Registry destructor. Makes sure no locks are forgotten.
- *
- * @access private
- */
- function _PEAR_Registry()
- {
- parent::_PEAR();
- if (is_resource($this->lock_fp)) {
- $this->_unlock();
- }
- }
-
- /**
- * Make sure the directory where we keep registry files exists.
- *
- * @return bool TRUE if directory exists, FALSE if it could not be
- * created
- *
- * @access private
- */
- function _assertStateDir($channel = false)
- {
- if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') {
- return $this->_assertChannelStateDir($channel);
- }
-
- static $init = false;
- if (!file_exists($this->statedir)) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- if (!System::mkdir(array('-p', $this->statedir))) {
- return $this->raiseError("could not create directory '{$this->statedir}'");
- }
- $init = true;
- } elseif (!is_dir($this->statedir)) {
- return $this->raiseError('Cannot create directory ' . $this->statedir . ', ' .
- 'it already exists and is not a directory');
- }
-
- $ds = DIRECTORY_SEPARATOR;
- if (!file_exists($this->channelsdir)) {
- if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') ||
- !file_exists($this->channelsdir . $ds . '__uri.reg')) {
- $init = true;
- }
- } elseif (!is_dir($this->channelsdir)) {
- return $this->raiseError('Cannot create directory ' . $this->channelsdir . ', ' .
- 'it already exists and is not a directory');
- }
-
- if ($init) {
- static $running = false;
- if (!$running) {
- $running = true;
- $this->_initializeDirs();
- $running = false;
- $init = false;
- }
- } else {
- $this->_initializeDepDB();
- }
-
- return true;
- }
-
- /**
- * Make sure the directory where we keep registry files exists for a non-standard channel.
- *
- * @param string channel name
- * @return bool TRUE if directory exists, FALSE if it could not be
- * created
- *
- * @access private
- */
- function _assertChannelStateDir($channel)
- {
- $ds = DIRECTORY_SEPARATOR;
- if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') {
- if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) {
- $this->_initializeChannelDirs();
- }
- return $this->_assertStateDir($channel);
- }
-
- $channelDir = $this->_channelDirectoryName($channel);
- if (!is_dir($this->channelsdir) ||
- !file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) {
- $this->_initializeChannelDirs();
- }
-
- if (!file_exists($channelDir)) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- if (!System::mkdir(array('-p', $channelDir))) {
- return $this->raiseError("could not create directory '" . $channelDir .
- "'");
- }
- } elseif (!is_dir($channelDir)) {
- return $this->raiseError("could not create directory '" . $channelDir .
- "', already exists and is not a directory");
- }
-
- return true;
- }
-
- /**
- * Make sure the directory where we keep registry files for channels exists
- *
- * @return bool TRUE if directory exists, FALSE if it could not be
- * created
- *
- * @access private
- */
- function _assertChannelDir()
- {
- if (!file_exists($this->channelsdir)) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- if (!System::mkdir(array('-p', $this->channelsdir))) {
- return $this->raiseError("could not create directory '{$this->channelsdir}'");
- }
- } elseif (!is_dir($this->channelsdir)) {
- return $this->raiseError("could not create directory '{$this->channelsdir}" .
- "', it already exists and is not a directory");
- }
-
- if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
- if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) {
- return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'");
- }
- } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
- return $this->raiseError("could not create directory '{$this->channelsdir}" .
- "/.alias', it already exists and is not a directory");
- }
-
- return true;
- }
-
- /**
- * Get the name of the file where data for a given package is stored.
- *
- * @param string channel name, or false if this is a PEAR package
- * @param string package name
- *
- * @return string registry file name
- *
- * @access public
- */
- function _packageFileName($package, $channel = false)
- {
- if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') {
- return $this->_channelDirectoryName($channel) . DIRECTORY_SEPARATOR .
- strtolower($package) . '.reg';
- }
-
- return $this->statedir . DIRECTORY_SEPARATOR . strtolower($package) . '.reg';
- }
-
- /**
- * Get the name of the file where data for a given channel is stored.
- * @param string channel name
- * @return string registry file name
- */
- function _channelFileName($channel, $noaliases = false)
- {
- if (!$noaliases) {
- if (file_exists($this->_getChannelAliasFileName($channel))) {
- $channel = implode('', file($this->_getChannelAliasFileName($channel)));
- }
- }
- return $this->channelsdir . DIRECTORY_SEPARATOR . str_replace('/', '_',
- strtolower($channel)) . '.reg';
- }
-
- /**
- * @param string
- * @return string
- */
- function _getChannelAliasFileName($alias)
- {
- return $this->channelsdir . DIRECTORY_SEPARATOR . '.alias' .
- DIRECTORY_SEPARATOR . str_replace('/', '_', strtolower($alias)) . '.txt';
- }
-
- /**
- * Get the name of a channel from its alias
- */
- function _getChannelFromAlias($channel)
- {
- if (!$this->_channelExists($channel)) {
- if ($channel == 'pear.php.net') {
- return 'pear.php.net';
- }
-
- if ($channel == 'pecl.php.net') {
- return 'pecl.php.net';
- }
-
- if ($channel == 'doc.php.net') {
- return 'doc.php.net';
- }
-
- if ($channel == '__uri') {
- return '__uri';
- }
-
- return false;
- }
-
- $channel = strtolower($channel);
- if (file_exists($this->_getChannelAliasFileName($channel))) {
- // translate an alias to an actual channel
- return implode('', file($this->_getChannelAliasFileName($channel)));
- }
-
- return $channel;
- }
-
- /**
- * Get the alias of a channel from its alias or its name
- */
- function _getAlias($channel)
- {
- if (!$this->_channelExists($channel)) {
- if ($channel == 'pear.php.net') {
- return 'pear';
- }
-
- if ($channel == 'pecl.php.net') {
- return 'pecl';
- }
-
- if ($channel == 'doc.php.net') {
- return 'phpdocs';
- }
-
- return false;
- }
-
- $channel = $this->_getChannel($channel);
- if (PEAR::isError($channel)) {
- return $channel;
- }
-
- return $channel->getAlias();
- }
-
- /**
- * Get the name of the file where data for a given package is stored.
- *
- * @param string channel name, or false if this is a PEAR package
- * @param string package name
- *
- * @return string registry file name
- *
- * @access public
- */
- function _channelDirectoryName($channel)
- {
- if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') {
- return $this->statedir;
- }
-
- $ch = $this->_getChannelFromAlias($channel);
- if (!$ch) {
- $ch = $channel;
- }
-
- return $this->statedir . DIRECTORY_SEPARATOR . strtolower('.channel.' .
- str_replace('/', '_', $ch));
- }
-
- function _openPackageFile($package, $mode, $channel = false)
- {
- if (!$this->_assertStateDir($channel)) {
- return null;
- }
-
- if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) {
- return null;
- }
-
- $file = $this->_packageFileName($package, $channel);
- if (!file_exists($file) && $mode == 'r' || $mode == 'rb') {
- return null;
- }
-
- $fp = @fopen($file, $mode);
- if (!$fp) {
- return null;
- }
-
- return $fp;
- }
-
- function _closePackageFile($fp)
- {
- fclose($fp);
- }
-
- function _openChannelFile($channel, $mode)
- {
- if (!$this->_assertChannelDir()) {
- return null;
- }
-
- if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) {
- return null;
- }
-
- $file = $this->_channelFileName($channel);
- if (!file_exists($file) && $mode == 'r' || $mode == 'rb') {
- return null;
- }
-
- $fp = @fopen($file, $mode);
- if (!$fp) {
- return null;
- }
-
- return $fp;
- }
-
- function _closeChannelFile($fp)
- {
- fclose($fp);
- }
-
- function _rebuildFileMap()
- {
- if (!class_exists('PEAR_Installer_Role')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Installer/Role.php';
- }
-
- $channels = $this->_listAllPackages();
- $files = array();
- foreach ($channels as $channel => $packages) {
- foreach ($packages as $package) {
- $version = $this->_packageInfo($package, 'version', $channel);
- $filelist = $this->_packageInfo($package, 'filelist', $channel);
- if (!is_array($filelist)) {
- continue;
- }
-
- foreach ($filelist as $name => $attrs) {
- if (isset($attrs['attribs'])) {
- $attrs = $attrs['attribs'];
- }
-
- // it is possible for conflicting packages in different channels to
- // conflict with data files/doc files
- if ($name == 'dirtree') {
- continue;
- }
-
- if (isset($attrs['role']) && !in_array($attrs['role'],
- PEAR_Installer_Role::getInstallableRoles())) {
- // these are not installed
- continue;
- }
-
- if (isset($attrs['role']) && !in_array($attrs['role'],
- PEAR_Installer_Role::getBaseinstallRoles())) {
- $attrs['baseinstalldir'] = $package;
- }
-
- if (isset($attrs['baseinstalldir'])) {
- $file = $attrs['baseinstalldir'].DIRECTORY_SEPARATOR.$name;
- } else {
- $file = $name;
- }
-
- $file = preg_replace(',^/+,', '', $file);
- if ($channel != 'pear.php.net') {
- if (!isset($files[$attrs['role']])) {
- $files[$attrs['role']] = array();
- }
- $files[$attrs['role']][$file] = array(strtolower($channel),
- strtolower($package));
- } else {
- if (!isset($files[$attrs['role']])) {
- $files[$attrs['role']] = array();
- }
- $files[$attrs['role']][$file] = strtolower($package);
- }
- }
- }
- }
-
-
- $this->_assertStateDir();
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- $fp = @fopen($this->filemap, 'wb');
- if (!$fp) {
- return false;
- }
-
- $this->filemap_cache = $files;
- fwrite($fp, serialize($files));
- fclose($fp);
- return true;
- }
-
- function _readFileMap()
- {
- if (!file_exists($this->filemap)) {
- return array();
- }
-
- $fp = @fopen($this->filemap, 'r');
- if (!$fp) {
- return $this->raiseError('PEAR_Registry: could not open filemap "' . $this->filemap . '"', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg);
- }
-
- clearstatcache();
- $fsize = filesize($this->filemap);
- fclose($fp);
- $data = file_get_contents($this->filemap);
- $tmp = unserialize($data);
- if (!$tmp && $fsize > 7) {
- return $this->raiseError('PEAR_Registry: invalid filemap data', PEAR_REGISTRY_ERROR_FORMAT, null, null, $data);
- }
-
- $this->filemap_cache = $tmp;
- return true;
- }
-
- /**
- * Lock the registry.
- *
- * @param integer lock mode, one of LOCK_EX, LOCK_SH or LOCK_UN.
- * See flock manual for more information.
- *
- * @return bool TRUE on success, FALSE if locking failed, or a
- * PEAR error if some other error occurs (such as the
- * lock file not being writable).
- *
- * @access private
- */
- function _lock($mode = LOCK_EX)
- {
- if (stristr(php_uname(), 'Windows 9')) {
- return true;
- }
-
- if ($mode != LOCK_UN && is_resource($this->lock_fp)) {
- // XXX does not check type of lock (LOCK_SH/LOCK_EX)
- return true;
- }
-
- if (!$this->_assertStateDir()) {
- if ($mode == LOCK_EX) {
- return $this->raiseError('Registry directory is not writeable by the current user');
- }
-
- return true;
- }
-
- $open_mode = 'w';
- // XXX People reported problems with LOCK_SH and 'w'
- if ($mode === LOCK_SH || $mode === LOCK_UN) {
- if (!file_exists($this->lockfile)) {
- touch($this->lockfile);
- }
- $open_mode = 'r';
- }
-
- if (!is_resource($this->lock_fp)) {
- $this->lock_fp = @fopen($this->lockfile, $open_mode);
- }
-
- if (!is_resource($this->lock_fp)) {
- $this->lock_fp = null;
- return $this->raiseError("could not create lock file" .
- (isset($php_errormsg) ? ": " . $php_errormsg : ""));
- }
-
- if (!(int)flock($this->lock_fp, $mode)) {
- switch ($mode) {
- case LOCK_SH: $str = 'shared'; break;
- case LOCK_EX: $str = 'exclusive'; break;
- case LOCK_UN: $str = 'unlock'; break;
- default: $str = 'unknown'; break;
- }
-
- //is resource at this point, close it on error.
- fclose($this->lock_fp);
- $this->lock_fp = null;
- return $this->raiseError("could not acquire $str lock ($this->lockfile)",
- PEAR_REGISTRY_ERROR_LOCK);
- }
-
- return true;
- }
-
- function _unlock()
- {
- $ret = $this->_lock(LOCK_UN);
- if (is_resource($this->lock_fp)) {
- fclose($this->lock_fp);
- }
-
- $this->lock_fp = null;
- return $ret;
- }
-
- function _packageExists($package, $channel = false)
- {
- return file_exists($this->_packageFileName($package, $channel));
- }
-
- /**
- * Determine whether a channel exists in the registry
- *
- * @param string Channel name
- * @param bool if true, then aliases will be ignored
- * @return boolean
- */
- function _channelExists($channel, $noaliases = false)
- {
- $a = file_exists($this->_channelFileName($channel, $noaliases));
- if (!$a && $channel == 'pear.php.net') {
- return true;
- }
-
- if (!$a && $channel == 'pecl.php.net') {
- return true;
- }
-
- if (!$a && $channel == 'doc.php.net') {
- return true;
- }
-
- return $a;
- }
-
- /**
- * Determine whether a mirror exists within the deafult channel in the registry
- *
- * @param string Channel name
- * @param string Mirror name
- *
- * @return boolean
- */
- function _mirrorExists($channel, $mirror)
- {
- $data = $this->_channelInfo($channel);
- if (!isset($data['servers']['mirror'])) {
- return false;
- }
-
- foreach ($data['servers']['mirror'] as $m) {
- if ($m['attribs']['host'] == $mirror) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * @param PEAR_ChannelFile Channel object
- * @param donotuse
- * @param string Last-Modified HTTP tag from remote request
- * @return boolean|PEAR_Error True on creation, false if it already exists
- */
- function _addChannel($channel, $update = false, $lastmodified = false)
- {
- if (!is_a($channel, 'PEAR_ChannelFile')) {
- return false;
- }
-
- if (!$channel->validate()) {
- return false;
- }
-
- if (file_exists($this->_channelFileName($channel->getName()))) {
- if (!$update) {
- return false;
- }
-
- $checker = $this->_getChannel($channel->getName());
- if (PEAR::isError($checker)) {
- return $checker;
- }
-
- if ($channel->getAlias() != $checker->getAlias()) {
- if (file_exists($this->_getChannelAliasFileName($checker->getAlias()))) {
- @unlink($this->_getChannelAliasFileName($checker->getAlias()));
- }
- }
- } else {
- if ($update && !in_array($channel->getName(), array('pear.php.net', 'pecl.php.net', 'doc.php.net'))) {
- return false;
- }
- }
-
- $ret = $this->_assertChannelDir();
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- $ret = $this->_assertChannelStateDir($channel->getName());
- if (PEAR::isError($ret)) {
- return $ret;
- }
-
- if ($channel->getAlias() != $channel->getName()) {
- if (file_exists($this->_getChannelAliasFileName($channel->getAlias())) &&
- $this->_getChannelFromAlias($channel->getAlias()) != $channel->getName()) {
- $channel->setAlias($channel->getName());
- }
-
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- $fp = @fopen($this->_getChannelAliasFileName($channel->getAlias()), 'w');
- if (!$fp) {
- return false;
- }
-
- fwrite($fp, $channel->getName());
- fclose($fp);
- }
-
- if (!$this->hasWriteAccess()) {
- return false;
- }
-
- $fp = @fopen($this->_channelFileName($channel->getName()), 'wb');
- if (!$fp) {
- return false;
- }
-
- $info = $channel->toArray();
- if ($lastmodified) {
- $info['_lastmodified'] = $lastmodified;
- } else {
- $info['_lastmodified'] = date('r');
- }
-
- fwrite($fp, serialize($info));
- fclose($fp);
- return true;
- }
-
- /**
- * Deletion fails if there are any packages installed from the channel
- * @param string|PEAR_ChannelFile channel name
- * @return boolean|PEAR_Error True on deletion, false if it doesn't exist
- */
- function _deleteChannel($channel)
- {
- if (!is_string($channel)) {
- if (!is_a($channel, 'PEAR_ChannelFile')) {
- return false;
- }
-
- if (!$channel->validate()) {
- return false;
- }
- $channel = $channel->getName();
- }
-
- if ($this->_getChannelFromAlias($channel) == '__uri') {
- return false;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') {
- return false;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'doc.php.net') {
- return false;
- }
-
- if (!$this->_channelExists($channel)) {
- return false;
- }
-
- if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') {
- return false;
- }
-
- $channel = $this->_getChannelFromAlias($channel);
- if ($channel == 'pear.php.net') {
- return false;
- }
-
- $test = $this->_listChannelPackages($channel);
- if (count($test)) {
- return false;
- }
-
- $test = @rmdir($this->_channelDirectoryName($channel));
- if (!$test) {
- return false;
- }
-
- $file = $this->_getChannelAliasFileName($this->_getAlias($channel));
- if (file_exists($file)) {
- $test = @unlink($file);
- if (!$test) {
- return false;
- }
- }
-
- $file = $this->_channelFileName($channel);
- $ret = true;
- if (file_exists($file)) {
- $ret = @unlink($file);
- }
-
- return $ret;
- }
-
- /**
- * Determine whether a channel exists in the registry
- * @param string Channel Alias
- * @return boolean
- */
- function _isChannelAlias($alias)
- {
- return file_exists($this->_getChannelAliasFileName($alias));
- }
-
- /**
- * @param string|null
- * @param string|null
- * @param string|null
- * @return array|null
- * @access private
- */
- function _packageInfo($package = null, $key = null, $channel = 'pear.php.net')
- {
- if ($package === null) {
- if ($channel === null) {
- $channels = $this->_listChannels();
- $ret = array();
- foreach ($channels as $channel) {
- $channel = strtolower($channel);
- $ret[$channel] = array();
- $packages = $this->_listPackages($channel);
- foreach ($packages as $package) {
- $ret[$channel][] = $this->_packageInfo($package, null, $channel);
- }
- }
-
- return $ret;
- }
-
- $ps = $this->_listPackages($channel);
- if (!count($ps)) {
- return array();
- }
- return array_map(array(&$this, '_packageInfo'),
- $ps, array_fill(0, count($ps), null),
- array_fill(0, count($ps), $channel));
- }
-
- $fp = $this->_openPackageFile($package, 'r', $channel);
- if ($fp === null) {
- return null;
- }
-
- clearstatcache();
- $this->_closePackageFile($fp);
- $data = file_get_contents($this->_packageFileName($package, $channel));
- $data = unserialize($data);
- if ($key === null) {
- return $data;
- }
-
- // compatibility for package.xml version 2.0
- if (isset($data['old'][$key])) {
- return $data['old'][$key];
- }
-
- if (isset($data[$key])) {
- return $data[$key];
- }
-
- return null;
- }
-
- /**
- * @param string Channel name
- * @param bool whether to strictly retrieve info of channels, not just aliases
- * @return array|null
- */
- function _channelInfo($channel, $noaliases = false)
- {
- if (!$this->_channelExists($channel, $noaliases)) {
- return null;
- }
-
- $fp = $this->_openChannelFile($channel, 'r');
- if ($fp === null) {
- return null;
- }
-
- clearstatcache();
- $this->_closeChannelFile($fp);
- $data = file_get_contents($this->_channelFileName($channel));
- $data = unserialize($data);
- return $data;
- }
-
- function _listChannels()
- {
- $channellist = array();
- if (!file_exists($this->channelsdir) || !is_dir($this->channelsdir)) {
- return array('pear.php.net', 'pecl.php.net', 'doc.php.net', '__uri');
- }
-
- $dp = opendir($this->channelsdir);
- while ($ent = readdir($dp)) {
- if ($ent{0} == '.' || substr($ent, -4) != '.reg') {
- continue;
- }
-
- if ($ent == '__uri.reg') {
- $channellist[] = '__uri';
- continue;
- }
-
- $channellist[] = str_replace('_', '/', substr($ent, 0, -4));
- }
-
- closedir($dp);
- if (!in_array('pear.php.net', $channellist)) {
- $channellist[] = 'pear.php.net';
- }
-
- if (!in_array('pecl.php.net', $channellist)) {
- $channellist[] = 'pecl.php.net';
- }
-
- if (!in_array('doc.php.net', $channellist)) {
- $channellist[] = 'doc.php.net';
- }
-
-
- if (!in_array('__uri', $channellist)) {
- $channellist[] = '__uri';
- }
-
- natsort($channellist);
- return $channellist;
- }
-
- function _listPackages($channel = false)
- {
- if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') {
- return $this->_listChannelPackages($channel);
- }
-
- if (!file_exists($this->statedir) || !is_dir($this->statedir)) {
- return array();
- }
-
- $pkglist = array();
- $dp = opendir($this->statedir);
- if (!$dp) {
- return $pkglist;
- }
-
- while ($ent = readdir($dp)) {
- if ($ent{0} == '.' || substr($ent, -4) != '.reg') {
- continue;
- }
-
- $pkglist[] = substr($ent, 0, -4);
- }
- closedir($dp);
- return $pkglist;
- }
-
- function _listChannelPackages($channel)
- {
- $pkglist = array();
- if (!file_exists($this->_channelDirectoryName($channel)) ||
- !is_dir($this->_channelDirectoryName($channel))) {
- return array();
- }
-
- $dp = opendir($this->_channelDirectoryName($channel));
- if (!$dp) {
- return $pkglist;
- }
-
- while ($ent = readdir($dp)) {
- if ($ent{0} == '.' || substr($ent, -4) != '.reg') {
- continue;
- }
- $pkglist[] = substr($ent, 0, -4);
- }
-
- closedir($dp);
- return $pkglist;
- }
-
- function _listAllPackages()
- {
- $ret = array();
- foreach ($this->_listChannels() as $channel) {
- $ret[$channel] = $this->_listPackages($channel);
- }
-
- return $ret;
- }
-
- /**
- * Add an installed package to the registry
- * @param string package name
- * @param array package info (parsed by PEAR_Common::infoFrom*() methods)
- * @return bool success of saving
- * @access private
- */
- function _addPackage($package, $info)
- {
- if ($this->_packageExists($package)) {
- return false;
- }
-
- $fp = $this->_openPackageFile($package, 'wb');
- if ($fp === null) {
- return false;
- }
-
- $info['_lastmodified'] = time();
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- if (isset($info['filelist'])) {
- $this->_rebuildFileMap();
- }
-
- return true;
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return bool
- * @access private
- */
- function _addPackage2($info)
- {
- if (!is_a($info, 'PEAR_PackageFile_v1') && !is_a($info, 'PEAR_PackageFile_v2')) {
- return false;
- }
-
- if (!$info->validate()) {
- if (class_exists('PEAR_Common')) {
- $ui = PEAR_Frontend::singleton();
- if ($ui) {
- foreach ($info->getValidationWarnings() as $err) {
- $ui->log($err['message'], true);
- }
- }
- }
- return false;
- }
-
- $channel = $info->getChannel();
- $package = $info->getPackage();
- $save = $info;
- if ($this->_packageExists($package, $channel)) {
- return false;
- }
-
- if (!$this->_channelExists($channel, true)) {
- return false;
- }
-
- $info = $info->toArray(true);
- if (!$info) {
- return false;
- }
-
- $fp = $this->_openPackageFile($package, 'wb', $channel);
- if ($fp === null) {
- return false;
- }
-
- $info['_lastmodified'] = time();
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- $this->_rebuildFileMap();
- return true;
- }
-
- /**
- * @param string Package name
- * @param array parsed package.xml 1.0
- * @param bool this parameter is only here for BC. Don't use it.
- * @access private
- */
- function _updatePackage($package, $info, $merge = true)
- {
- $oldinfo = $this->_packageInfo($package);
- if (empty($oldinfo)) {
- return false;
- }
-
- $fp = $this->_openPackageFile($package, 'w');
- if ($fp === null) {
- return false;
- }
-
- if (is_object($info)) {
- $info = $info->toArray();
- }
- $info['_lastmodified'] = time();
-
- $newinfo = $info;
- if ($merge) {
- $info = array_merge($oldinfo, $info);
- } else {
- $diff = $info;
- }
-
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- if (isset($newinfo['filelist'])) {
- $this->_rebuildFileMap();
- }
-
- return true;
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @return bool
- * @access private
- */
- function _updatePackage2($info)
- {
- if (!$this->_packageExists($info->getPackage(), $info->getChannel())) {
- return false;
- }
-
- $fp = $this->_openPackageFile($info->getPackage(), 'w', $info->getChannel());
- if ($fp === null) {
- return false;
- }
-
- $save = $info;
- $info = $save->getArray(true);
- $info['_lastmodified'] = time();
- fwrite($fp, serialize($info));
- $this->_closePackageFile($fp);
- $this->_rebuildFileMap();
- return true;
- }
-
- /**
- * @param string Package name
- * @param string Channel name
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null
- * @access private
- */
- function &_getPackage($package, $channel = 'pear.php.net')
- {
- $info = $this->_packageInfo($package, null, $channel);
- if ($info === null) {
- return $info;
- }
-
- $a = $this->_config;
- if (!$a) {
- $this->_config = new PEAR_Config;
- $this->_config->set('php_dir', $this->statedir);
- }
-
- if (!class_exists('PEAR_PackageFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile.php';
- }
-
- $pkg = new PEAR_PackageFile($this->_config);
- $pf = &$pkg->fromArray($info);
- return $pf;
- }
-
- /**
- * @param string channel name
- * @param bool whether to strictly retrieve channel names
- * @return PEAR_ChannelFile|PEAR_Error
- * @access private
- */
- function &_getChannel($channel, $noaliases = false)
- {
- $ch = false;
- if ($this->_channelExists($channel, $noaliases)) {
- $chinfo = $this->_channelInfo($channel, $noaliases);
- if ($chinfo) {
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $ch = &PEAR_ChannelFile::fromArrayWithErrors($chinfo);
- }
- }
-
- if ($ch) {
- if ($ch->validate()) {
- return $ch;
- }
-
- foreach ($ch->getErrors(true) as $err) {
- $message = $err['message'] . "\n";
- }
-
- $ch = PEAR::raiseError($message);
- return $ch;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'pear.php.net') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $pear_channel = new PEAR_ChannelFile;
- $pear_channel->setServer('pear.php.net');
- $pear_channel->setAlias('pear');
- $pear_channel->setSummary('PHP Extension and Application Repository');
- $pear_channel->setDefaultPEARProtocols();
- $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
- $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
- return $pear_channel;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
- $pear_channel = new PEAR_ChannelFile;
- $pear_channel->setServer('pecl.php.net');
- $pear_channel->setAlias('pecl');
- $pear_channel->setSummary('PHP Extension Community Library');
- $pear_channel->setDefaultPEARProtocols();
- $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
- $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
- $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
- return $pear_channel;
- }
-
- if ($this->_getChannelFromAlias($channel) == 'doc.php.net') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $doc_channel = new PEAR_ChannelFile;
- $doc_channel->setServer('doc.php.net');
- $doc_channel->setAlias('phpdocs');
- $doc_channel->setSummary('PHP Documentation Team');
- $doc_channel->setDefaultPEARProtocols();
- $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
- $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
- return $doc_channel;
- }
-
-
- if ($this->_getChannelFromAlias($channel) == '__uri') {
- // the registry is not properly set up, so use defaults
- if (!class_exists('PEAR_ChannelFile')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/ChannelFile.php';
- }
-
- $private = new PEAR_ChannelFile;
- $private->setName('__uri');
- $private->setDefaultPEARProtocols();
- $private->setBaseURL('REST1.0', '****');
- $private->setSummary('Pseudo-channel for static packages');
- return $private;
- }
-
- return $ch;
- }
-
- /**
- * @param string Package name
- * @param string Channel name
- * @return bool
- */
- function packageExists($package, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_packageExists($package, $channel);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
-
- // {{{ channelExists()
-
- /**
- * @param string channel name
- * @param bool if true, then aliases will be ignored
- * @return bool
- */
- function channelExists($channel, $noaliases = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_channelExists($channel, $noaliases);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
-
- /**
- * @param string channel name mirror is in
- * @param string mirror name
- *
- * @return bool
- */
- function mirrorExists($channel, $mirror)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
-
- $ret = $this->_mirrorExists($channel, $mirror);
- $this->_unlock();
- return $ret;
- }
-
- // {{{ isAlias()
-
- /**
- * Determines whether the parameter is an alias of a channel
- * @param string
- * @return bool
- */
- function isAlias($alias)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_isChannelAlias($alias);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ packageInfo()
-
- /**
- * @param string|null
- * @param string|null
- * @param string
- * @return array|null
- */
- function packageInfo($package = null, $key = null, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_packageInfo($package, $key, $channel);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ channelInfo()
-
- /**
- * Retrieve a raw array of channel data.
- *
- * Do not use this, instead use {@link getChannel()} for normal
- * operations. Array structure is undefined in this method
- * @param string channel name
- * @param bool whether to strictly retrieve information only on non-aliases
- * @return array|null|PEAR_Error
- */
- function channelInfo($channel = null, $noaliases = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_channelInfo($channel, $noaliases);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
-
- /**
- * @param string
- */
- function channelName($channel)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_getChannelFromAlias($channel);
- $this->_unlock();
- return $ret;
- }
-
- /**
- * @param string
- */
- function channelAlias($channel)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_getAlias($channel);
- $this->_unlock();
- return $ret;
- }
- // {{{ listPackages()
-
- function listPackages($channel = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_listPackages($channel);
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ listAllPackages()
-
- function listAllPackages()
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_listAllPackages();
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ listChannel()
-
- function listChannels()
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = $this->_listChannels();
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ addPackage()
-
- /**
- * Add an installed package to the registry
- * @param string|PEAR_PackageFile_v1|PEAR_PackageFile_v2 package name or object
- * that will be passed to {@link addPackage2()}
- * @param array package info (parsed by PEAR_Common::infoFrom*() methods)
- * @return bool success of saving
- */
- function addPackage($package, $info)
- {
- if (is_object($info)) {
- return $this->addPackage2($info);
- }
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
- $ret = $this->_addPackage($package, $info);
- $this->_unlock();
- if ($ret) {
- if (!class_exists('PEAR_PackageFile_v1')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
- }
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->_config);
- $pf->fromArray($info);
- $this->_dependencyDB->uninstallPackage($pf);
- $this->_dependencyDB->installPackage($pf);
- }
- return $ret;
- }
-
- // }}}
- // {{{ addPackage2()
-
- function addPackage2($info)
- {
- if (!is_object($info)) {
- return $this->addPackage($info['package'], $info);
- }
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
- $ret = $this->_addPackage2($info);
- $this->_unlock();
- if ($ret) {
- $this->_dependencyDB->uninstallPackage($info);
- $this->_dependencyDB->installPackage($info);
- }
- return $ret;
- }
-
- // }}}
- // {{{ updateChannel()
-
- /**
- * For future expandibility purposes, separate this
- * @param PEAR_ChannelFile
- */
- function updateChannel($channel, $lastmodified = null)
- {
- if ($channel->getName() == '__uri') {
- return false;
- }
- return $this->addChannel($channel, $lastmodified, true);
- }
-
- // }}}
- // {{{ deleteChannel()
-
- /**
- * Deletion fails if there are any packages installed from the channel
- * @param string|PEAR_ChannelFile channel name
- * @return boolean|PEAR_Error True on deletion, false if it doesn't exist
- */
- function deleteChannel($channel)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $ret = $this->_deleteChannel($channel);
- $this->_unlock();
- if ($ret && is_a($this->_config, 'PEAR_Config')) {
- $this->_config->setChannels($this->listChannels());
- }
-
- return $ret;
- }
-
- // }}}
- // {{{ addChannel()
-
- /**
- * @param PEAR_ChannelFile Channel object
- * @param string Last-Modified header from HTTP for caching
- * @return boolean|PEAR_Error True on creation, false if it already exists
- */
- function addChannel($channel, $lastmodified = false, $update = false)
- {
- if (!is_a($channel, 'PEAR_ChannelFile') || !$channel->validate()) {
- return false;
- }
-
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $ret = $this->_addChannel($channel, $update, $lastmodified);
- $this->_unlock();
- if (!$update && $ret && is_a($this->_config, 'PEAR_Config')) {
- $this->_config->setChannels($this->listChannels());
- }
-
- return $ret;
- }
-
- // }}}
- // {{{ deletePackage()
-
- function deletePackage($package, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $file = $this->_packageFileName($package, $channel);
- $ret = file_exists($file) ? @unlink($file) : false;
- $this->_rebuildFileMap();
- $this->_unlock();
- $p = array('channel' => $channel, 'package' => $package);
- $this->_dependencyDB->uninstallPackage($p);
- return $ret;
- }
-
- // }}}
- // {{{ updatePackage()
-
- function updatePackage($package, $info, $merge = true)
- {
- if (is_object($info)) {
- return $this->updatePackage2($info, $merge);
- }
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
- $ret = $this->_updatePackage($package, $info, $merge);
- $this->_unlock();
- if ($ret) {
- if (!class_exists('PEAR_PackageFile_v1')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v1.php';
- }
- $pf = new PEAR_PackageFile_v1;
- $pf->setConfig($this->_config);
- $pf->fromArray($this->packageInfo($package));
- $this->_dependencyDB->uninstallPackage($pf);
- $this->_dependencyDB->installPackage($pf);
- }
- return $ret;
- }
-
- // }}}
- // {{{ updatePackage2()
-
- function updatePackage2($info)
- {
-
- if (!is_object($info)) {
- return $this->updatePackage($info['package'], $info, $merge);
- }
-
- if (!$info->validate(PEAR_VALIDATE_DOWNLOADING)) {
- return false;
- }
-
- if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
- return $e;
- }
-
- $ret = $this->_updatePackage2($info);
- $this->_unlock();
- if ($ret) {
- $this->_dependencyDB->uninstallPackage($info);
- $this->_dependencyDB->installPackage($info);
- }
-
- return $ret;
- }
-
- // }}}
- // {{{ getChannel()
- /**
- * @param string channel name
- * @param bool whether to strictly return raw channels (no aliases)
- * @return PEAR_ChannelFile|PEAR_Error
- */
- function &getChannel($channel, $noaliases = false)
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $ret = &$this->_getChannel($channel, $noaliases);
- $this->_unlock();
- if (!$ret) {
- return PEAR::raiseError('Unknown channel: ' . $channel);
- }
- return $ret;
- }
-
- // }}}
- // {{{ getPackage()
- /**
- * @param string package name
- * @param string channel name
- * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null
- */
- function &getPackage($package, $channel = 'pear.php.net')
- {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $pf = &$this->_getPackage($package, $channel);
- $this->_unlock();
- return $pf;
- }
-
- // }}}
-
- /**
- * Get PEAR_PackageFile_v[1/2] objects representing the contents of
- * a dependency group that are installed.
- *
- * This is used at uninstall-time
- * @param array
- * @return array|false
- */
- function getInstalledGroup($group)
- {
- $ret = array();
- if (isset($group['package'])) {
- if (!isset($group['package'][0])) {
- $group['package'] = array($group['package']);
- }
- foreach ($group['package'] as $package) {
- $depchannel = isset($package['channel']) ? $package['channel'] : '__uri';
- $p = &$this->getPackage($package['name'], $depchannel);
- if ($p) {
- $save = &$p;
- $ret[] = &$save;
- }
- }
- }
- if (isset($group['subpackage'])) {
- if (!isset($group['subpackage'][0])) {
- $group['subpackage'] = array($group['subpackage']);
- }
- foreach ($group['subpackage'] as $package) {
- $depchannel = isset($package['channel']) ? $package['channel'] : '__uri';
- $p = &$this->getPackage($package['name'], $depchannel);
- if ($p) {
- $save = &$p;
- $ret[] = &$save;
- }
- }
- }
- if (!count($ret)) {
- return false;
- }
- return $ret;
- }
-
- // {{{ getChannelValidator()
- /**
- * @param string channel name
- * @return PEAR_Validate|false
- */
- function &getChannelValidator($channel)
- {
- $chan = $this->getChannel($channel);
- if (PEAR::isError($chan)) {
- return $chan;
- }
- $val = $chan->getValidationObject();
- return $val;
- }
- // }}}
- // {{{ getChannels()
- /**
- * @param string channel name
- * @return array an array of PEAR_ChannelFile objects representing every installed channel
- */
- function &getChannels()
- {
- $ret = array();
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- foreach ($this->_listChannels() as $channel) {
- $e = &$this->_getChannel($channel);
- if (!$e || PEAR::isError($e)) {
- continue;
- }
- $ret[] = $e;
- }
- $this->_unlock();
- return $ret;
- }
-
- // }}}
- // {{{ checkFileMap()
-
- /**
- * Test whether a file or set of files belongs to a package.
- *
- * If an array is passed in
- * @param string|array file path, absolute or relative to the pear
- * install dir
- * @param string|array name of PEAR package or array('package' => name, 'channel' =>
- * channel) of a package that will be ignored
- * @param string API version - 1.1 will exclude any files belonging to a package
- * @param array private recursion variable
- * @return array|false which package and channel the file belongs to, or an empty
- * string if the file does not belong to an installed package,
- * or belongs to the second parameter's package
- */
- function checkFileMap($path, $package = false, $api = '1.0', $attrs = false)
- {
- if (is_array($path)) {
- static $notempty;
- if (empty($notempty)) {
- if (!class_exists('PEAR_Installer_Role')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Installer/Role.php';
- }
- $notempty = create_function('$a','return !empty($a);');
- }
- $package = is_array($package) ? array(strtolower($package[0]), strtolower($package[1]))
- : strtolower($package);
- $pkgs = array();
- foreach ($path as $name => $attrs) {
- if (is_array($attrs)) {
- if (isset($attrs['install-as'])) {
- $name = $attrs['install-as'];
- }
- if (!in_array($attrs['role'], PEAR_Installer_Role::getInstallableRoles())) {
- // these are not installed
- continue;
- }
- if (!in_array($attrs['role'], PEAR_Installer_Role::getBaseinstallRoles())) {
- $attrs['baseinstalldir'] = is_array($package) ? $package[1] : $package;
- }
- if (isset($attrs['baseinstalldir'])) {
- $name = $attrs['baseinstalldir'] . DIRECTORY_SEPARATOR . $name;
- }
- }
- $pkgs[$name] = $this->checkFileMap($name, $package, $api, $attrs);
- if (PEAR::isError($pkgs[$name])) {
- return $pkgs[$name];
- }
- }
- return array_filter($pkgs, $notempty);
- }
- if (empty($this->filemap_cache)) {
- if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
- return $e;
- }
- $err = $this->_readFileMap();
- $this->_unlock();
- if (PEAR::isError($err)) {
- return $err;
- }
- }
- if (!$attrs) {
- $attrs = array('role' => 'php'); // any old call would be for PHP role only
- }
- if (isset($this->filemap_cache[$attrs['role']][$path])) {
- if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) {
- return false;
- }
- return $this->filemap_cache[$attrs['role']][$path];
- }
- $l = strlen($this->install_dir);
- if (substr($path, 0, $l) == $this->install_dir) {
- $path = preg_replace('!^'.DIRECTORY_SEPARATOR.'+!', '', substr($path, $l));
- }
- if (isset($this->filemap_cache[$attrs['role']][$path])) {
- if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) {
- return false;
- }
- return $this->filemap_cache[$attrs['role']][$path];
- }
- return false;
- }
-
- // }}}
- // {{{ flush()
- /**
- * Force a reload of the filemap
- * @since 1.5.0RC3
- */
- function flushFileMap()
- {
- $this->filemap_cache = null;
- clearstatcache(); // ensure that the next read gets the full, current filemap
- }
-
- // }}}
- // {{{ apiVersion()
- /**
- * Get the expected API version. Channels API is version 1.1, as it is backwards
- * compatible with 1.0
- * @return string
- */
- function apiVersion()
- {
- return '1.1';
- }
- // }}}
-
-
- /**
- * Parse a package name, or validate a parsed package name array
- * @param string|array pass in an array of format
- * array(
- * 'package' => 'pname',
- * ['channel' => 'channame',]
- * ['version' => 'version',]
- * ['state' => 'state',]
- * ['group' => 'groupname'])
- * or a string of format
- * [channel://][channame/]pname[-version|-state][/group=groupname]
- * @return array|PEAR_Error
- */
- function parsePackageName($param, $defaultchannel = 'pear.php.net')
- {
- $saveparam = $param;
- if (is_array($param)) {
- // convert to string for error messages
- $saveparam = $this->parsedPackageNameToString($param);
- // process the array
- if (!isset($param['package'])) {
- return PEAR::raiseError('parsePackageName(): array $param ' .
- 'must contain a valid package name in index "param"',
- 'package', null, null, $param);
- }
- if (!isset($param['uri'])) {
- if (!isset($param['channel'])) {
- $param['channel'] = $defaultchannel;
- }
- } else {
- $param['channel'] = '__uri';
- }
- } else {
- $components = @parse_url((string) $param);
- if (isset($components['scheme'])) {
- if ($components['scheme'] == 'http') {
- // uri package
- $param = array('uri' => $param, 'channel' => '__uri');
- } elseif($components['scheme'] != 'channel') {
- return PEAR::raiseError('parsePackageName(): only channel:// uris may ' .
- 'be downloaded, not "' . $param . '"', 'invalid', null, null, $param);
- }
- }
- if (!isset($components['path'])) {
- return PEAR::raiseError('parsePackageName(): array $param ' .
- 'must contain a valid package name in "' . $param . '"',
- 'package', null, null, $param);
- }
- if (isset($components['host'])) {
- // remove the leading "/"
- $components['path'] = substr($components['path'], 1);
- }
- if (!isset($components['scheme'])) {
- if (strpos($components['path'], '/') !== false) {
- if ($components['path']{0} == '/') {
- return PEAR::raiseError('parsePackageName(): this is not ' .
- 'a package name, it begins with "/" in "' . $param . '"',
- 'invalid', null, null, $param);
- }
- $parts = explode('/', $components['path']);
- $components['host'] = array_shift($parts);
- if (count($parts) > 1) {
- $components['path'] = array_pop($parts);
- $components['host'] .= '/' . implode('/', $parts);
- } else {
- $components['path'] = implode('/', $parts);
- }
- } else {
- $components['host'] = $defaultchannel;
- }
- } else {
- if (strpos($components['path'], '/')) {
- $parts = explode('/', $components['path']);
- $components['path'] = array_pop($parts);
- $components['host'] .= '/' . implode('/', $parts);
- }
- }
-
- if (is_array($param)) {
- $param['package'] = $components['path'];
- } else {
- $param = array(
- 'package' => $components['path']
- );
- if (isset($components['host'])) {
- $param['channel'] = $components['host'];
- }
- }
- if (isset($components['fragment'])) {
- $param['group'] = $components['fragment'];
- }
- if (isset($components['user'])) {
- $param['user'] = $components['user'];
- }
- if (isset($components['pass'])) {
- $param['pass'] = $components['pass'];
- }
- if (isset($components['query'])) {
- parse_str($components['query'], $param['opts']);
- }
- // check for extension
- $pathinfo = pathinfo($param['package']);
- if (isset($pathinfo['extension']) &&
- in_array(strtolower($pathinfo['extension']), array('tgz', 'tar'))) {
- $param['extension'] = $pathinfo['extension'];
- $param['package'] = substr($pathinfo['basename'], 0,
- strlen($pathinfo['basename']) - 4);
- }
- // check for version
- if (strpos($param['package'], '-')) {
- $test = explode('-', $param['package']);
- if (count($test) != 2) {
- return PEAR::raiseError('parsePackageName(): only one version/state ' .
- 'delimiter "-" is allowed in "' . $saveparam . '"',
- 'version', null, null, $param);
- }
- list($param['package'], $param['version']) = $test;
- }
- }
- // validation
- $info = $this->channelExists($param['channel']);
- if (PEAR::isError($info)) {
- return $info;
- }
- if (!$info) {
- return PEAR::raiseError('unknown channel "' . $param['channel'] .
- '" in "' . $saveparam . '"', 'channel', null, null, $param);
- }
- $chan = $this->getChannel($param['channel']);
- if (PEAR::isError($chan)) {
- return $chan;
- }
- if (!$chan) {
- return PEAR::raiseError("Exception: corrupt registry, could not " .
- "retrieve channel " . $param['channel'] . " information",
- 'registry', null, null, $param);
- }
- $param['channel'] = $chan->getName();
- $validate = $chan->getValidationObject();
- $vpackage = $chan->getValidationPackage();
- // validate package name
- if (!$validate->validPackageName($param['package'], $vpackage['_content'])) {
- return PEAR::raiseError('parsePackageName(): invalid package name "' .
- $param['package'] . '" in "' . $saveparam . '"',
- 'package', null, null, $param);
- }
- if (isset($param['group'])) {
- if (!PEAR_Validate::validGroupName($param['group'])) {
- return PEAR::raiseError('parsePackageName(): dependency group "' . $param['group'] .
- '" is not a valid group name in "' . $saveparam . '"', 'group', null, null,
- $param);
- }
- }
- if (isset($param['state'])) {
- if (!in_array(strtolower($param['state']), $validate->getValidStates())) {
- return PEAR::raiseError('parsePackageName(): state "' . $param['state']
- . '" is not a valid state in "' . $saveparam . '"',
- 'state', null, null, $param);
- }
- }
- if (isset($param['version'])) {
- if (isset($param['state'])) {
- return PEAR::raiseError('parsePackageName(): cannot contain both ' .
- 'a version and a stability (state) in "' . $saveparam . '"',
- 'version/state', null, null, $param);
- }
- // check whether version is actually a state
- if (in_array(strtolower($param['version']), $validate->getValidStates())) {
- $param['state'] = strtolower($param['version']);
- unset($param['version']);
- } else {
- if (!$validate->validVersion($param['version'])) {
- return PEAR::raiseError('parsePackageName(): "' . $param['version'] .
- '" is neither a valid version nor a valid state in "' .
- $saveparam . '"', 'version/state', null, null, $param);
- }
- }
- }
- return $param;
- }
-
- /**
- * @param array
- * @return string
- */
- function parsedPackageNameToString($parsed, $brief = false)
- {
- if (is_string($parsed)) {
- return $parsed;
- }
- if (is_object($parsed)) {
- $p = $parsed;
- $parsed = array(
- 'package' => $p->getPackage(),
- 'channel' => $p->getChannel(),
- 'version' => $p->getVersion(),
- );
- }
- if (isset($parsed['uri'])) {
- return $parsed['uri'];
- }
- if ($brief) {
- if ($channel = $this->channelAlias($parsed['channel'])) {
- return $channel . '/' . $parsed['package'];
- }
- }
- $upass = '';
- if (isset($parsed['user'])) {
- $upass = $parsed['user'];
- if (isset($parsed['pass'])) {
- $upass .= ':' . $parsed['pass'];
- }
- $upass = "$upass@";
- }
- $ret = 'channel://' . $upass . $parsed['channel'] . '/' . $parsed['package'];
- if (isset($parsed['version']) || isset($parsed['state'])) {
- $ver = isset($parsed['version']) ? $parsed['version'] : '';
- $ver .= isset($parsed['state']) ? $parsed['state'] : '';
- $ret .= '-' . $ver;
- }
- if (isset($parsed['extension'])) {
- $ret .= '.' . $parsed['extension'];
- }
- if (isset($parsed['opts'])) {
- $ret .= '?';
- foreach ($parsed['opts'] as $name => $value) {
- $parsed['opts'][$name] = "$name=$value";
- }
- $ret .= implode('&', $parsed['opts']);
- }
- if (isset($parsed['group'])) {
- $ret .= '#' . $parsed['group'];
- }
- return $ret;
- }
-}
-<?php
-/**
- * PEAR_REST
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * For downloading xml files
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/XMLParser.php';
-
-/**
- * Intelligently retrieve data, following hyperlinks if necessary, and re-directing
- * as well
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_REST
-{
- var $config;
- var $_options;
-
- function __construct(&$config, $options = array())
- {
- $this->config = &$config;
- $this->_options = $options;
- }
-
- /**
- * Retrieve REST data, but always retrieve the local cache if it is available.
- *
- * This is useful for elements that should never change, such as information on a particular
- * release
- * @param string full URL to this resource
- * @param array|false contents of the accept-encoding header
- * @param boolean if true, xml will be returned as a string, otherwise, xml will be
- * parsed using PEAR_XMLParser
- * @return string|array
- */
- function retrieveCacheFirst($url, $accept = false, $forcestring = false, $channel = false)
- {
- $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cachefile';
-
- if (file_exists($cachefile)) {
- return unserialize(implode('', file($cachefile)));
- }
-
- return $this->retrieveData($url, $accept, $forcestring, $channel);
- }
-
- /**
- * Retrieve a remote REST resource
- * @param string full URL to this resource
- * @param array|false contents of the accept-encoding header
- * @param boolean if true, xml will be returned as a string, otherwise, xml will be
- * parsed using PEAR_XMLParser
- * @return string|array
- */
- function retrieveData($url, $accept = false, $forcestring = false, $channel = false)
- {
- $cacheId = $this->getCacheId($url);
- if ($ret = $this->useLocalCache($url, $cacheId)) {
- return $ret;
- }
-
- $file = $trieddownload = false;
- if (!isset($this->_options['offline'])) {
- $trieddownload = true;
- $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange'] : false, $accept, $channel);
- }
-
- if (PEAR::isError($file)) {
- if ($file->getCode() !== -9276) {
- return $file;
- }
-
- $trieddownload = false;
- $file = false; // use local copy if available on socket connect error
- }
-
- if (!$file) {
- $ret = $this->getCache($url);
- if (!PEAR::isError($ret) && $trieddownload) {
- // reset the age of the cache if the server says it was unmodified
- $result = $this->saveCache($url, $ret, null, true, $cacheId);
- if (PEAR::isError($result)) {
- return PEAR::raiseError($result->getMessage());
- }
- }
-
- return $ret;
- }
-
- if (is_array($file)) {
- $headers = $file[2];
- $lastmodified = $file[1];
- $content = $file[0];
- } else {
- $headers = array();
- $lastmodified = false;
- $content = $file;
- }
-
- if ($forcestring) {
- $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
- if (PEAR::isError($result)) {
- return PEAR::raiseError($result->getMessage());
- }
-
- return $content;
- }
-
- if (isset($headers['content-type'])) {
- $content_type = explode(";", $headers['content-type']);
- $content_type = $content_type[0];
- switch ($content_type) {
- case 'text/xml' :
- case 'application/xml' :
- case 'text/plain' :
- if ($content_type === 'text/plain') {
- $check = substr($content, 0, 5);
- if ($check !== '<?xml') {
- break;
- }
- }
-
- $parser = new PEAR_XMLParser;
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $err = $parser->parse($content);
- PEAR::popErrorHandling();
- if (PEAR::isError($err)) {
- return PEAR::raiseError('Invalid xml downloaded from "' . $url . '": ' .
- $err->getMessage());
- }
- $content = $parser->getData();
- case 'text/html' :
- default :
- // use it as a string
- }
- } else {
- // assume XML
- $parser = new PEAR_XMLParser;
- $parser->parse($content);
- $content = $parser->getData();
- }
-
- $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId);
- if (PEAR::isError($result)) {
- return PEAR::raiseError($result->getMessage());
- }
-
- return $content;
- }
-
- function useLocalCache($url, $cacheid = null)
- {
- if ($cacheid === null) {
- $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cacheid';
- if (!file_exists($cacheidfile)) {
- return false;
- }
-
- $cacheid = unserialize(implode('', file($cacheidfile)));
- }
-
- $cachettl = $this->config->get('cache_ttl');
- // If cache is newer than $cachettl seconds, we use the cache!
- if (time() - $cacheid['age'] < $cachettl) {
- return $this->getCache($url);
- }
-
- return false;
- }
-
- function getCacheId($url)
- {
- $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cacheid';
-
- if (!file_exists($cacheidfile)) {
- return false;
- }
-
- $ret = unserialize(implode('', file($cacheidfile)));
- return $ret;
- }
-
- function getCache($url)
- {
- $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR .
- md5($url) . 'rest.cachefile';
-
- if (!file_exists($cachefile)) {
- return PEAR::raiseError('No cached content available for "' . $url . '"');
- }
-
- return unserialize(implode('', file($cachefile)));
- }
-
- /**
- * @param string full URL to REST resource
- * @param string original contents of the REST resource
- * @param array HTTP Last-Modified and ETag headers
- * @param bool if true, then the cache id file should be regenerated to
- * trigger a new time-to-live value
- */
- function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)
- {
- $cache_dir = $this->config->get('cache_dir');
- $d = $cache_dir . DIRECTORY_SEPARATOR . md5($url);
- $cacheidfile = $d . 'rest.cacheid';
- $cachefile = $d . 'rest.cachefile';
-
- if (!is_dir($cache_dir)) {
- if (System::mkdir(array('-p', $cache_dir)) === false) {
- return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory and attempts to create the directory failed.");
- }
- }
-
- if ($cacheid === null && $nochange) {
- $cacheid = unserialize(implode('', file($cacheidfile)));
- }
-
- $idData = serialize(array(
- 'age' => time(),
- 'lastChange' => ($nochange ? $cacheid['lastChange'] : $lastmodified),
- ));
-
- $result = $this->saveCacheFile($cacheidfile, $idData);
- if (PEAR::isError($result)) {
- return $result;
- } elseif ($nochange) {
- return true;
- }
-
- $result = $this->saveCacheFile($cachefile, serialize($contents));
- if (PEAR::isError($result)) {
- if (file_exists($cacheidfile)) {
- @unlink($cacheidfile);
- }
-
- return $result;
- }
-
- return true;
- }
-
- function saveCacheFile($file, $contents)
- {
- $len = strlen($contents);
-
- $cachefile_fp = @fopen($file, 'xb'); // x is the O_CREAT|O_EXCL mode
- if ($cachefile_fp !== false) { // create file
- if (fwrite($cachefile_fp, $contents, $len) < $len) {
- fclose($cachefile_fp);
- return PEAR::raiseError("Could not write $file.");
- }
- } else { // update file
- $cachefile_fp = @fopen($file, 'r+b'); // do not truncate file
- if (!$cachefile_fp) {
- return PEAR::raiseError("Could not open $file for writing.");
- }
-
- if (OS_WINDOWS) {
- $not_symlink = !is_link($file); // see bug #18834
- } else {
- $cachefile_lstat = lstat($file);
- $cachefile_fstat = fstat($cachefile_fp);
- $not_symlink = $cachefile_lstat['mode'] == $cachefile_fstat['mode']
- && $cachefile_lstat['ino'] == $cachefile_fstat['ino']
- && $cachefile_lstat['dev'] == $cachefile_fstat['dev']
- && $cachefile_fstat['nlink'] === 1;
- }
-
- if ($not_symlink) {
- ftruncate($cachefile_fp, 0); // NOW truncate
- if (fwrite($cachefile_fp, $contents, $len) < $len) {
- fclose($cachefile_fp);
- return PEAR::raiseError("Could not write $file.");
- }
- } else {
- fclose($cachefile_fp);
- $link = function_exists('readlink') ? readlink($file) : $file;
- return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $file . ' as it is symlinked to ' . $link . ' - Possible symlink attack');
- }
- }
-
- fclose($cachefile_fp);
- return true;
- }
-
- /**
- * Efficiently Download a file through HTTP. Returns downloaded file as a string in-memory
- * This is best used for small files
- *
- * If an HTTP proxy has been configured (http_proxy PEAR_Config
- * setting), the proxy will be used.
- *
- * @param string $url the URL to download
- * @param string $save_dir directory to save file in
- * @param false|string|array $lastmodified header values to check against for caching
- * use false to return the header values from this download
- * @param false|array $accept Accept headers to send
- * @return string|array Returns the contents of the downloaded file or a PEAR
- * error on failure. If the error is caused by
- * socket-related errors, the error object will
- * have the fsockopen error code available through
- * getCode(). If caching is requested, then return the header
- * values.
- *
- * @access public
- */
- function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false)
- {
- static $redirect = 0;
- // always reset , so we are clean case of error
- $wasredirect = $redirect;
- $redirect = 0;
-
- $info = parse_url($url);
- if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) {
- return PEAR::raiseError('Cannot download non-http URL "' . $url . '"');
- }
-
- if (!isset($info['host'])) {
- return PEAR::raiseError('Cannot download from non-URL "' . $url . '"');
- }
-
- $host = isset($info['host']) ? $info['host'] : null;
- $port = isset($info['port']) ? $info['port'] : null;
- $path = isset($info['path']) ? $info['path'] : null;
- $schema = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http';
-
- $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
- if ($this->config->get('http_proxy')&&
- $proxy = parse_url($this->config->get('http_proxy'))
- ) {
- $proxy_host = isset($proxy['host']) ? $proxy['host'] : null;
- if ($schema === 'https') {
- $proxy_host = 'ssl://' . $proxy_host;
- }
-
- $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080;
- $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null;
- $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null;
- $proxy_schema = (isset($proxy['scheme']) && $proxy['scheme'] == 'https') ? 'https' : 'http';
- }
-
- if (empty($port)) {
- $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80;
- }
-
- if (isset($proxy['host'])) {
- $request = "GET $url HTTP/1.1\r\n";
- } else {
- $request = "GET $path HTTP/1.1\r\n";
- }
-
- $request .= "Host: $host\r\n";
- $ifmodifiedsince = '';
- if (is_array($lastmodified)) {
- if (isset($lastmodified['Last-Modified'])) {
- $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n";
- }
-
- if (isset($lastmodified['ETag'])) {
- $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n";
- }
- } else {
- $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : '');
- }
-
- $request .= $ifmodifiedsince .
- "User-Agent: PEAR/1.9.5/PHP/" . PHP_VERSION . "\r\n";
-
- $username = $this->config->get('username', null, $channel);
- $password = $this->config->get('password', null, $channel);
-
- if ($username && $password) {
- $tmp = base64_encode("$username:$password");
- $request .= "Authorization: Basic $tmp\r\n";
- }
-
- if ($proxy_host != '' && $proxy_user != '') {
- $request .= 'Proxy-Authorization: Basic ' .
- base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n";
- }
-
- if ($accept) {
- $request .= 'Accept: ' . implode(', ', $accept) . "\r\n";
- }
-
- $request .= "Accept-Encoding:\r\n";
- $request .= "Connection: close\r\n";
- $request .= "\r\n";
-
- if ($proxy_host != '') {
- $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr, 15);
- if (!$fp) {
- return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", -9276);
- }
- } else {
- if ($schema === 'https') {
- $host = 'ssl://' . $host;
- }
-
- $fp = @fsockopen($host, $port, $errno, $errstr);
- if (!$fp) {
- return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno);
- }
- }
-
- fwrite($fp, $request);
-
- $headers = array();
- $reply = 0;
- while ($line = trim(fgets($fp, 1024))) {
- if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) {
- $headers[strtolower($matches[1])] = trim($matches[2]);
- } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) {
- $reply = (int)$matches[1];
- if ($reply == 304 && ($lastmodified || ($lastmodified === false))) {
- return false;
- }
-
- if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) {
- return PEAR::raiseError("File $schema://$host:$port$path not valid (received: $line)");
- }
- }
- }
-
- if ($reply != 200) {
- if (!isset($headers['location'])) {
- return PEAR::raiseError("File $schema://$host:$port$path not valid (redirected but no location)");
- }
-
- if ($wasredirect > 4) {
- return PEAR::raiseError("File $schema://$host:$port$path not valid (redirection looped more than 5 times)");
- }
-
- $redirect = $wasredirect + 1;
- return $this->downloadHttp($headers['location'], $lastmodified, $accept, $channel);
- }
-
- $length = isset($headers['content-length']) ? $headers['content-length'] : -1;
-
- $data = '';
- while ($chunk = @fread($fp, 8192)) {
- $data .= $chunk;
- }
- fclose($fp);
-
- if ($lastmodified === false || $lastmodified) {
- if (isset($headers['etag'])) {
- $lastmodified = array('ETag' => $headers['etag']);
- }
-
- if (isset($headers['last-modified'])) {
- if (is_array($lastmodified)) {
- $lastmodified['Last-Modified'] = $headers['last-modified'];
- } else {
- $lastmodified = $headers['last-modified'];
- }
- }
-
- return array($data, $lastmodified, $headers);
- }
-
- return $data;
- }
-}
-<?php
-/**
- * PEAR_REST_10
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a12
- */
-
-/**
- * For downloading REST xml/txt files
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/REST.php';
-
-/**
- * Implement REST 1.0
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a12
- */
-class PEAR_REST_10
-{
- /**
- * @var PEAR_REST
- */
- var $_rest;
- function __construct($config, $options = array())
- {
- $this->_rest = new PEAR_REST($config, $options);
- }
-
- /**
- * Retrieve information about a remote package to be downloaded from a REST server
- *
- * @param string $base The uri to prepend to all REST calls
- * @param array $packageinfo an array of format:
- * <pre>
- * array(
- * 'package' => 'packagename',
- * 'channel' => 'channelname',
- * ['state' => 'alpha' (or valid state),]
- * -or-
- * ['version' => '1.whatever']
- * </pre>
- * @param string $prefstate Current preferred_state config variable value
- * @param bool $installed the installed version of this package to compare against
- * @return array|false|PEAR_Error see {@link _returnDownloadURL()}
- */
- function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false)
- {
- $states = $this->betterStates($prefstate, true);
- if (!$states) {
- return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
- }
-
- $channel = $packageinfo['channel'];
- $package = $packageinfo['package'];
- $state = isset($packageinfo['state']) ? $packageinfo['state'] : null;
- $version = isset($packageinfo['version']) ? $packageinfo['version'] : null;
- $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml';
-
- $info = $this->_rest->retrieveData($restFile, false, false, $channel);
- if (PEAR::isError($info)) {
- return PEAR::raiseError('No releases available for package "' .
- $channel . '/' . $package . '"');
- }
-
- if (!isset($info['r'])) {
- return false;
- }
-
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
-
- foreach ($info['r'] as $release) {
- if (!isset($this->_rest->_options['force']) && ($installed &&
- version_compare($release['v'], $installed, '<'))) {
- continue;
- }
-
- if (isset($state)) {
- // try our preferred state first
- if ($release['s'] == $state) {
- $found = true;
- break;
- }
- // see if there is something newer and more stable
- // bug #7221
- if (in_array($release['s'], $this->betterStates($state), true)) {
- $found = true;
- break;
- }
- } elseif (isset($version)) {
- if ($release['v'] == $version) {
- $found = true;
- break;
- }
- } else {
- if (in_array($release['s'], $states)) {
- $found = true;
- break;
- }
- }
- }
-
- return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel);
- }
-
- function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage,
- $prefstate = 'stable', $installed = false, $channel = false)
- {
- $states = $this->betterStates($prefstate, true);
- if (!$states) {
- return PEAR::raiseError('"' . $prefstate . '" is not a valid state');
- }
-
- $channel = $dependency['channel'];
- $package = $dependency['name'];
- $state = isset($dependency['state']) ? $dependency['state'] : null;
- $version = isset($dependency['version']) ? $dependency['version'] : null;
- $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml';
-
- $info = $this->_rest->retrieveData($restFile, false, false, $channel);
- if (PEAR::isError($info)) {
- return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package']
- . '" dependency "' . $channel . '/' . $package . '" has no releases');
- }
-
- if (!is_array($info) || !isset($info['r'])) {
- return false;
- }
-
- $exclude = array();
- $min = $max = $recommended = false;
- if ($xsdversion == '1.0') {
- switch ($dependency['rel']) {
- case 'ge' :
- $min = $dependency['version'];
- break;
- case 'gt' :
- $min = $dependency['version'];
- $exclude = array($dependency['version']);
- break;
- case 'eq' :
- $recommended = $dependency['version'];
- break;
- case 'lt' :
- $max = $dependency['version'];
- $exclude = array($dependency['version']);
- break;
- case 'le' :
- $max = $dependency['version'];
- break;
- case 'ne' :
- $exclude = array($dependency['version']);
- break;
- }
- } else {
- $min = isset($dependency['min']) ? $dependency['min'] : false;
- $max = isset($dependency['max']) ? $dependency['max'] : false;
- $recommended = isset($dependency['recommended']) ?
- $dependency['recommended'] : false;
- if (isset($dependency['exclude'])) {
- if (!isset($dependency['exclude'][0])) {
- $exclude = array($dependency['exclude']);
- }
- }
- }
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
- foreach ($info['r'] as $release) {
- if (!isset($this->_rest->_options['force']) && ($installed &&
- version_compare($release['v'], $installed, '<'))) {
- continue;
- }
- if (in_array($release['v'], $exclude)) { // skip excluded versions
- continue;
- }
- // allow newer releases to say "I'm OK with the dependent package"
- if ($xsdversion == '2.0' && isset($release['co'])) {
- if (!is_array($release['co']) || !isset($release['co'][0])) {
- $release['co'] = array($release['co']);
- }
- foreach ($release['co'] as $entry) {
- if (isset($entry['x']) && !is_array($entry['x'])) {
- $entry['x'] = array($entry['x']);
- } elseif (!isset($entry['x'])) {
- $entry['x'] = array();
- }
- if ($entry['c'] == $deppackage['channel'] &&
- strtolower($entry['p']) == strtolower($deppackage['package']) &&
- version_compare($deppackage['version'], $entry['min'], '>=') &&
- version_compare($deppackage['version'], $entry['max'], '<=') &&
- !in_array($release['v'], $entry['x'])) {
- $recommended = $release['v'];
- break;
- }
- }
- }
- if ($recommended) {
- if ($release['v'] != $recommended) { // if we want a specific
- // version, then skip all others
- continue;
- } else {
- if (!in_array($release['s'], $states)) {
- // the stability is too low, but we must return the
- // recommended version if possible
- return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel);
- }
- }
- }
- if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions
- continue;
- }
- if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions
- continue;
- }
- if ($installed && version_compare($release['v'], $installed, '<')) {
- continue;
- }
- if (in_array($release['s'], $states)) { // if in the preferred state...
- $found = true; // ... then use it
- break;
- }
- }
- return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel);
- }
-
- /**
- * Take raw data and return the array needed for processing a download URL
- *
- * @param string $base REST base uri
- * @param string $package Package name
- * @param array $release an array of format array('v' => version, 's' => state)
- * describing the release to download
- * @param array $info list of all releases as defined by allreleases.xml
- * @param bool|null $found determines whether the release was found or this is the next
- * best alternative. If null, then versions were skipped because
- * of PHP dependency
- * @return array|PEAR_Error
- * @access private
- */
- function _returnDownloadURL($base, $package, $release, $info, $found, $phpversion = false, $channel = false)
- {
- if (!$found) {
- $release = $info['r'][0];
- }
-
- $packageLower = strtolower($package);
- $pinfo = $this->_rest->retrieveCacheFirst($base . 'p/' . $packageLower . '/' .
- 'info.xml', false, false, $channel);
- if (PEAR::isError($pinfo)) {
- return PEAR::raiseError('Package "' . $package .
- '" does not have REST info xml available');
- }
-
- $releaseinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' .
- $release['v'] . '.xml', false, false, $channel);
- if (PEAR::isError($releaseinfo)) {
- return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] .
- '" does not have REST xml available');
- }
-
- $packagexml = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' .
- 'deps.' . $release['v'] . '.txt', false, true, $channel);
- if (PEAR::isError($packagexml)) {
- return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] .
- '" does not have REST dependency information available');
- }
-
- $packagexml = unserialize($packagexml);
- if (!$packagexml) {
- $packagexml = array();
- }
-
- $allinfo = $this->_rest->retrieveData($base . 'r/' . $packageLower .
- '/allreleases.xml', false, false, $channel);
- if (PEAR::isError($allinfo)) {
- return $allinfo;
- }
-
- if (!is_array($allinfo['r']) || !isset($allinfo['r'][0])) {
- $allinfo['r'] = array($allinfo['r']);
- }
-
- $compatible = false;
- foreach ($allinfo['r'] as $release) {
- if ($release['v'] != $releaseinfo['v']) {
- continue;
- }
-
- if (!isset($release['co'])) {
- break;
- }
-
- $compatible = array();
- if (!is_array($release['co']) || !isset($release['co'][0])) {
- $release['co'] = array($release['co']);
- }
-
- foreach ($release['co'] as $entry) {
- $comp = array();
- $comp['name'] = $entry['p'];
- $comp['channel'] = $entry['c'];
- $comp['min'] = $entry['min'];
- $comp['max'] = $entry['max'];
- if (isset($entry['x']) && !is_array($entry['x'])) {
- $comp['exclude'] = $entry['x'];
- }
-
- $compatible[] = $comp;
- }
-
- if (count($compatible) == 1) {
- $compatible = $compatible[0];
- }
-
- break;
- }
-
- $deprecated = false;
- if (isset($pinfo['dc']) && isset($pinfo['dp'])) {
- if (is_array($pinfo['dp'])) {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']['_content']));
- } else {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']));
- }
- }
-
- $return = array(
- 'version' => $releaseinfo['v'],
- 'info' => $packagexml,
- 'package' => $releaseinfo['p']['_content'],
- 'stability' => $releaseinfo['st'],
- 'compatible' => $compatible,
- 'deprecated' => $deprecated,
- );
-
- if ($found) {
- $return['url'] = $releaseinfo['g'];
- return $return;
- }
-
- $return['php'] = $phpversion;
- return $return;
- }
-
- function listPackages($base, $channel = false)
- {
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return array();
- }
-
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- return $packagelist['p'];
- }
-
- /**
- * List all categories of a REST server
- *
- * @param string $base base URL of the server
- * @return array of categorynames
- */
- function listCategories($base, $channel = false)
- {
- $categories = array();
-
- // c/categories.xml does not exist;
- // check for every package its category manually
- // This is SLOOOWWWW : ///
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- $ret = array();
- return $ret;
- }
-
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($packagelist['p'] as $package) {
- $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel);
- if (PEAR::isError($inf)) {
- PEAR::popErrorHandling();
- return $inf;
- }
- $cat = $inf['ca']['_content'];
- if (!isset($categories[$cat])) {
- $categories[$cat] = $inf['ca'];
- }
- }
-
- return array_values($categories);
- }
-
- /**
- * List a category of a REST server
- *
- * @param string $base base URL of the server
- * @param string $category name of the category
- * @param boolean $info also download full package info
- * @return array of packagenames
- */
- function listCategory($base, $category, $info = false, $channel = false)
- {
- // gives '404 Not Found' error when category doesn't exist
- $packagelist = $this->_rest->retrieveData($base.'c/'.urlencode($category).'/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return array();
- }
-
- if (!is_array($packagelist['p']) ||
- !isset($packagelist['p'][0])) { // only 1 pkg
- $packagelist = array($packagelist['p']);
- } else {
- $packagelist = $packagelist['p'];
- }
-
- if ($info == true) {
- // get individual package info
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- foreach ($packagelist as $i => $packageitem) {
- $url = sprintf('%s'.'r/%s/latest.txt',
- $base,
- strtolower($packageitem['_content']));
- $version = $this->_rest->retrieveData($url, false, false, $channel);
- if (PEAR::isError($version)) {
- break; // skipit
- }
- $url = sprintf('%s'.'r/%s/%s.xml',
- $base,
- strtolower($packageitem['_content']),
- $version);
- $info = $this->_rest->retrieveData($url, false, false, $channel);
- if (PEAR::isError($info)) {
- break; // skipit
- }
- $packagelist[$i]['info'] = $info;
- }
- PEAR::popErrorHandling();
- }
-
- return $packagelist;
- }
-
-
- function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false)
- {
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
- if ($this->_rest->config->get('verbose') > 0) {
- $ui = &PEAR_Frontend::singleton();
- $ui->log('Retrieving data...0%', true);
- }
- $ret = array();
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return $ret;
- }
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- // only search-packagename = quicksearch !
- if ($searchpackage && (!$searchsummary || empty($searchpackage))) {
- $newpackagelist = array();
- foreach ($packagelist['p'] as $package) {
- if (!empty($searchpackage) && stristr($package, $searchpackage) !== false) {
- $newpackagelist[] = $package;
- }
- }
- $packagelist['p'] = $newpackagelist;
- }
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $next = .1;
- foreach ($packagelist['p'] as $progress => $package) {
- if ($this->_rest->config->get('verbose') > 0) {
- if ($progress / count($packagelist['p']) >= $next) {
- if ($next == .5) {
- $ui->log('50%', false);
- } else {
- $ui->log('.', false);
- }
- $next += .1;
- }
- }
-
- if ($basic) { // remote-list command
- if ($dostable) {
- $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/stable.txt', false, false, $channel);
- } else {
- $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/latest.txt', false, false, $channel);
- }
- if (PEAR::isError($latest)) {
- $latest = false;
- }
- $info = array('stable' => $latest);
- } else { // list-all command
- $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel);
- if (PEAR::isError($inf)) {
- PEAR::popErrorHandling();
- return $inf;
- }
- if ($searchpackage) {
- $found = (!empty($searchpackage) && stristr($package, $searchpackage) !== false);
- if (!$found && !(isset($searchsummary) && !empty($searchsummary)
- && (stristr($inf['s'], $searchsummary) !== false
- || stristr($inf['d'], $searchsummary) !== false)))
- {
- continue;
- };
- }
- $releases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/allreleases.xml', false, false, $channel);
- if (PEAR::isError($releases)) {
- continue;
- }
- if (!isset($releases['r'][0])) {
- $releases['r'] = array($releases['r']);
- }
- unset($latest);
- unset($unstable);
- unset($stable);
- unset($state);
- foreach ($releases['r'] as $release) {
- if (!isset($latest)) {
- if ($dostable && $release['s'] == 'stable') {
- $latest = $release['v'];
- $state = 'stable';
- }
- if (!$dostable) {
- $latest = $release['v'];
- $state = $release['s'];
- }
- }
- if (!isset($stable) && $release['s'] == 'stable') {
- $stable = $release['v'];
- if (!isset($unstable)) {
- $unstable = $stable;
- }
- }
- if (!isset($unstable) && $release['s'] != 'stable') {
- $latest = $unstable = $release['v'];
- $state = $release['s'];
- }
- if (isset($latest) && !isset($state)) {
- $state = $release['s'];
- }
- if (isset($latest) && isset($stable) && isset($unstable)) {
- break;
- }
- }
- $deps = array();
- if (!isset($unstable)) {
- $unstable = false;
- $state = 'stable';
- if (isset($stable)) {
- $latest = $unstable = $stable;
- }
- } else {
- $latest = $unstable;
- }
- if (!isset($latest)) {
- $latest = false;
- }
- if ($latest) {
- $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' .
- $latest . '.txt', false, false, $channel);
- if (!PEAR::isError($d)) {
- $d = unserialize($d);
- if ($d) {
- if (isset($d['required'])) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
- }
- if (!isset($pf)) {
- $pf = new PEAR_PackageFile_v2;
- }
- $pf->setDeps($d);
- $tdeps = $pf->getDeps();
- } else {
- $tdeps = $d;
- }
- foreach ($tdeps as $dep) {
- if ($dep['type'] !== 'pkg') {
- continue;
- }
- $deps[] = $dep;
- }
- }
- }
- }
- if (!isset($stable)) {
- $stable = '-n/a-';
- }
- if (!$searchpackage) {
- $info = array('stable' => $latest, 'summary' => $inf['s'], 'description' =>
- $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'],
- 'unstable' => $unstable, 'state' => $state);
- } else {
- $info = array('stable' => $stable, 'summary' => $inf['s'], 'description' =>
- $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'],
- 'unstable' => $unstable, 'state' => $state);
- }
- }
- $ret[$package] = $info;
- }
- PEAR::popErrorHandling();
- return $ret;
- }
-
- function listLatestUpgrades($base, $pref_state, $installed, $channel, &$reg)
- {
- $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel);
- if (PEAR::isError($packagelist)) {
- return $packagelist;
- }
-
- $ret = array();
- if (!is_array($packagelist) || !isset($packagelist['p'])) {
- return $ret;
- }
-
- if (!is_array($packagelist['p'])) {
- $packagelist['p'] = array($packagelist['p']);
- }
-
- foreach ($packagelist['p'] as $package) {
- if (!isset($installed[strtolower($package)])) {
- continue;
- }
-
- $inst_version = $reg->packageInfo($package, 'version', $channel);
- $inst_state = $reg->packageInfo($package, 'release_state', $channel);
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/allreleases.xml', false, false, $channel);
- PEAR::popErrorHandling();
- if (PEAR::isError($info)) {
- continue; // no remote releases
- }
-
- if (!isset($info['r'])) {
- continue;
- }
-
- $release = $found = false;
- if (!is_array($info['r']) || !isset($info['r'][0])) {
- $info['r'] = array($info['r']);
- }
-
- // $info['r'] is sorted by version number
- usort($info['r'], array($this, '_sortReleasesByVersionNumber'));
- foreach ($info['r'] as $release) {
- if ($inst_version && version_compare($release['v'], $inst_version, '<=')) {
- // not newer than the one installed
- break;
- }
-
- // new version > installed version
- if (!$pref_state) {
- // every state is a good state
- $found = true;
- break;
- } else {
- $new_state = $release['s'];
- // if new state >= installed state: go
- if (in_array($new_state, $this->betterStates($inst_state, true))) {
- $found = true;
- break;
- } else {
- // only allow to lower the state of package,
- // if new state >= preferred state: go
- if (in_array($new_state, $this->betterStates($pref_state, true))) {
- $found = true;
- break;
- }
- }
- }
- }
-
- if (!$found) {
- continue;
- }
-
- $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' .
- $release['v'] . '.xml', false, false, $channel);
- if (PEAR::isError($relinfo)) {
- return $relinfo;
- }
-
- $ret[$package] = array(
- 'version' => $release['v'],
- 'state' => $release['s'],
- 'filesize' => $relinfo['f'],
- );
- }
-
- return $ret;
- }
-
- function packageInfo($base, $package, $channel = false)
- {
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $pinfo = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel);
- if (PEAR::isError($pinfo)) {
- PEAR::popErrorHandling();
- return PEAR::raiseError('Unknown package: "' . $package . '" in channel "' . $channel . '"' . "\n". 'Debug: ' .
- $pinfo->getMessage());
- }
-
- $releases = array();
- $allreleases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) .
- '/allreleases.xml', false, false, $channel);
- if (!PEAR::isError($allreleases)) {
- if (!class_exists('PEAR_PackageFile_v2')) {
- require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/PackageFile/v2.php';
- }
-
- if (!is_array($allreleases['r']) || !isset($allreleases['r'][0])) {
- $allreleases['r'] = array($allreleases['r']);
- }
-
- $pf = new PEAR_PackageFile_v2;
- foreach ($allreleases['r'] as $release) {
- $ds = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' .
- $release['v'] . '.txt', false, false, $channel);
- if (PEAR::isError($ds)) {
- continue;
- }
-
- if (!isset($latest)) {
- $latest = $release['v'];
- }
-
- $pf->setDeps(unserialize($ds));
- $ds = $pf->getDeps();
- $info = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package)
- . '/' . $release['v'] . '.xml', false, false, $channel);
-
- if (PEAR::isError($info)) {
- continue;
- }
-
- $releases[$release['v']] = array(
- 'doneby' => $info['m'],
- 'license' => $info['l'],
- 'summary' => $info['s'],
- 'description' => $info['d'],
- 'releasedate' => $info['da'],
- 'releasenotes' => $info['n'],
- 'state' => $release['s'],
- 'deps' => $ds ? $ds : array(),
- );
- }
- } else {
- $latest = '';
- }
-
- PEAR::popErrorHandling();
- if (isset($pinfo['dc']) && isset($pinfo['dp'])) {
- if (is_array($pinfo['dp'])) {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']['_content']));
- } else {
- $deprecated = array('channel' => (string) $pinfo['dc'],
- 'package' => trim($pinfo['dp']));
- }
- } else {
- $deprecated = false;
- }
-
- if (!isset($latest)) {
- $latest = '';
- }
-
- return array(
- 'name' => $pinfo['n'],
- 'channel' => $pinfo['c'],
- 'category' => $pinfo['ca']['_content'],
- 'stable' => $latest,
- 'license' => $pinfo['l'],
- 'summary' => $pinfo['s'],
- 'description' => $pinfo['d'],
- 'releases' => $releases,
- 'deprecated' => $deprecated,
- );
- }
-
- /**
- * Return an array containing all of the states that are more stable than
- * or equal to the passed in state
- *
- * @param string Release state
- * @param boolean Determines whether to include $state in the list
- * @return false|array False if $state is not a valid release state
- */
- function betterStates($state, $include = false)
- {
- static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- $i = array_search($state, $states);
- if ($i === false) {
- return false;
- }
-
- if ($include) {
- $i--;
- }
-
- return array_slice($states, $i + 1);
- }
-
- /**
- * Sort releases by version number
- *
- * @access private
- */
- function _sortReleasesByVersionNumber($a, $b)
- {
- if (version_compare($a['v'], $b['v'], '=')) {
- return 0;
- }
-
- if (version_compare($a['v'], $b['v'], '>')) {
- return -1;
- }
-
- if (version_compare($a['v'], $b['v'], '<')) {
- return 1;
- }
- }
-}
-<?php
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'System.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Config.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Command.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
-class PEAR_Start extends PEAR
-{
- var $bin_dir;
- var $data_dir;
- var $cfg_dir;
- var $www_dir;
- var $install_pfc;
- var $corePackages =
- array(
- 'Archive_Tar',
- 'Console_Getopt',
- 'PEAR',
- 'Structures_Graph',
- 'XML_Util',
- );
- var $local_dir = array();
- var $origpwd;
- var $pfc_packages = array(
- 'DB',
- 'Net_Socket',
- 'Net_SMTP',
- 'Mail',
- 'XML_Parser',
- 'XML_RPC',
- 'PHPUnit'
- );
- var $php_dir;
- var $php_bin;
- var $pear_conf;
- var $validPHPBin = false;
- var $test_dir;
- var $download_dir;
- var $temp_dir;
- var $config =
- array(
- 'prefix',
- 'bin_dir',
- 'php_dir',
- 'doc_dir',
- 'data_dir',
- 'cfg_dir',
- 'www_dir',
- 'test_dir',
- 'temp_dir',
- 'download_dir',
- 'pear_conf',
- );
- var $prefix;
- var $progress = 0;
- var $configPrompt =
- array(
- 'prefix' => 'Installation base ($prefix)',
- 'temp_dir' => 'Temporary directory for processing',
- 'download_dir' => 'Temporary directory for downloads',
- 'bin_dir' => 'Binaries directory',
- 'php_dir' => 'PHP code directory ($php_dir)',
- 'doc_dir' => 'Documentation directory',
- 'data_dir' => 'Data directory',
- 'cfg_dir' => 'User-modifiable configuration files directory',
- 'www_dir' => 'Public Web Files directory',
- 'test_dir' => 'Tests directory',
- 'pear_conf' => 'Name of configuration file',
- );
-
- var $localInstall;
- var $PEARConfig;
- var $tarball = array();
- var $ptmp;
-
- function __construct()
- {
- parent::__construct();
- if (OS_WINDOWS) {
- $this->configPrompt['php_bin'] = 'Path to CLI php.exe';
- $this->config[] = 'php_bin';
- $this->prefix = getcwd();
-
- if (!@is_dir($this->prefix)) {
- if (@is_dir('c:\php5')) {
- $this->prefix = 'c:\php5';
- } elseif (@is_dir('c:\php4')) {
- $this->prefix = 'c:\php4';
- } elseif (@is_dir('c:\php')) {
- $this->prefix = 'c:\php';
- }
- }
-
- $slash = "\\";
- if (strrpos($this->prefix, '\\') === (strlen($this->prefix) - 1)) {
- $slash = '';
- }
-
- $this->localInstall = false;
- $this->bin_dir = '$prefix';
- $this->temp_dir = '$prefix' . $slash . 'tmp';
- $this->download_dir = '$prefix' . $slash . 'tmp';
- $this->php_dir = '$prefix' . $slash . 'pear';
- $this->doc_dir = '$prefix' . $slash . 'docs';
- $this->data_dir = '$prefix' . $slash . 'data';
- $this->test_dir = '$prefix' . $slash . 'tests';
- $this->www_dir = '$prefix' . $slash . 'www';
- $this->cfg_dir = '$prefix' . $slash . 'cfg';
- $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '\\pear.ini';
- /*
- * Detects php.exe
- */
- $this->validPHPBin = true;
- if ($t = $this->safeGetenv('PHP_PEAR_PHP_BIN')) {
- $this->php_bin = dirname($t);
- } elseif ($t = $this->safeGetenv('PHP_BIN')) {
- $this->php_bin = dirname($t);
- } elseif ($t = System::which('php')) {
- $this->php_bin = dirname($t);
- } elseif (is_file($this->prefix . '\cli\php.exe')) {
- $this->php_bin = $this->prefix . '\cli';
- } elseif (is_file($this->prefix . '\php.exe')) {
- $this->php_bin = $this->prefix;
- }
- $phpexe = OS_WINDOWS ? '\\php.exe' : '/php';
- if ($this->php_bin && !is_file($this->php_bin . $phpexe)) {
- $this->php_bin = '';
- } else {
- if (strpos($this->php_bin, ':') === 0) {
- $this->php_bin = getcwd() . DIRECTORY_SEPARATOR . $this->php_bin;
- }
- }
- if (!is_file($this->php_bin . $phpexe)) {
- if (is_file('c:/php/cli/php.exe')) {
- $this->php_bin = 'c"\\php\\cli';
- } elseif (is_file('c:/php5/php.exe')) {
- $this->php_bin = 'c:\\php5';
- } elseif (is_file('c:/php4/cli/php.exe')) {
- $this->php_bin = 'c:\\php4\\cli';
- } else {
- $this->validPHPBin = false;
- }
- }
- } else {
- $this->prefix = dirname(PHP_BINDIR);
- $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '/pear.conf';
- if ($this->getCurrentUser() != 'root') {
- $this->prefix = $this->safeGetenv('HOME') . '/pear';
- $this->pear_conf = $this->safeGetenv('HOME') . '.pearrc';
- }
- $this->bin_dir = '$prefix/bin';
- $this->php_dir = '$prefix/share/pear';
- $this->temp_dir = '/tmp/pear/install';
- $this->download_dir = '/tmp/pear/install';
- $this->doc_dir = '$prefix/docs';
- $this->www_dir = '$prefix/www';
- $this->cfg_dir = '$prefix/cfg';
- $this->data_dir = '$prefix/data';
- $this->test_dir = '$prefix/tests';
- // check if the user has installed PHP with PHP or GNU layout
- if (@is_dir("$this->prefix/lib/php/.registry")) {
- $this->php_dir = '$prefix/lib/php';
- } elseif (@is_dir("$this->prefix/share/pear/lib/.registry")) {
- $this->php_dir = '$prefix/share/pear/lib';
- $this->doc_dir = '$prefix/share/pear/docs';
- $this->data_dir = '$prefix/share/pear/data';
- $this->test_dir = '$prefix/share/pear/tests';
- } elseif (@is_dir("$this->prefix/share/php/.registry")) {
- $this->php_dir = '$prefix/share/php';
- }
- }
- }
-
- /**
- * Get the name of the user running the script.
- * Only needed on unix for now.
- *
- * @return string Name of the user ("root", "cweiske")
- */
- function getCurrentUser()
- {
- if (isset($_ENV['USER'])) {
- return $_ENV['USER'];
- } else {
- return trim(`whoami`);
- }
- }
-
- function safeGetenv($var)
- {
- if (is_array($_ENV) && isset($_ENV[$var])) {
- return $_ENV[$var];
- }
-
- return getenv($var);
- }
-
- function show($stuff)
- {
- print $stuff;
- }
-
- function locatePackagesToInstall()
- {
- $dp = @opendir(dirname(__FILE__) . '/go-pear-tarballs');
- if (empty($dp)) {
- return PEAR::raiseError("while locating packages to install: opendir('" .
- dirname(__FILE__) . "/go-pear-tarballs') failed");
- }
-
- $potentials = array();
- while (false !== ($entry = readdir($dp))) {
- if ($entry{0} == '.' || !in_array(substr($entry, -4), array('.tar', '.tgz'))) {
- continue;
- }
- $potentials[] = $entry;
- }
-
- closedir($dp);
- $notfound = array();
- foreach ($this->corePackages as $package) {
- foreach ($potentials as $i => $candidate) {
- if (preg_match('/^' . $package . '-' . _PEAR_COMMON_PACKAGE_VERSION_PREG
- . '\.(tar|tgz)\\z/', $candidate)) {
- $this->tarball[$package] = dirname(__FILE__) . '/go-pear-tarballs/' . $candidate;
- unset($potentials[$i]);
- continue 2;
- }
- }
-
- $notfound[] = $package;
- }
-
- if (count($notfound)) {
- return PEAR::raiseError("No tarballs found for core packages: " .
- implode(', ', $notfound));
- }
-
- $this->tarball = array_merge($this->tarball, $potentials);
- }
-
- function setupTempStuff()
- {
- if (!($this->ptmp = System::mktemp(array('-d')))) {
- $this->show("System's Tempdir failed, trying to use \$prefix/tmp ...");
- $res = System::mkDir(array($this->prefix . '/tmp'));
- if (!$res) {
- return PEAR::raiseError('mkdir ' . $this->prefix . '/tmp ... failed');
- }
-
- $_temp = tempnam($this->prefix . '/tmp', 'gope');
- System::rm(array('-rf', $_temp));
- System::mkdir(array('-p','-m', '0700', $_temp));
- $this->ptmp = $this->prefix . '/tmp';
- $ok = @chdir($this->ptmp);
-
- if (!$ok) { // This should not happen, really ;)
- $this->bail('chdir ' . $this->ptmp . ' ... failed');
- }
-
- print "ok\n";
-
- // Adjust TEMPDIR envvars
- if (!isset($_ENV)) {
- $_ENV = array();
- };
- $_ENV['TMPDIR'] = $_ENV['TEMP'] = $this->prefix . '/tmp';
- }
-
- return @chdir($this->ptmp);
- }
-
- /**
- * Try to detect the kind of SAPI used by the
- * the given php.exe.
- * @author Pierrre-Alain Joye
- */
- function win32DetectPHPSAPI()
- {
- if ($this->php_bin != '') {
- if (OS_WINDOWS) {
- exec('"' . $this->php_bin . '\\php.exe" -v', $res);
- } else {
- exec('"' . $this->php_bin . '/php" -v', $res);
- }
-
- if (is_array($res)) {
- if (isset($res[0]) && strpos($res[0],"(cli)")) {
- return 'cli';
- }
-
- if (isset($res[0]) && strpos($res[0],"cgi")) {
- return 'cgi';
- }
-
- if (isset($res[0]) && strpos($res[0],"cgi-fcgi")) {
- return 'cgi';
- }
-
- return 'unknown';
- }
- }
-
- return 'unknown';
- }
-
- function doInstall()
- {
- print "Beginning install...\n";
- // finish php_bin config
- if (OS_WINDOWS) {
- $this->php_bin .= '\\php.exe';
- } else {
- $this->php_bin .= '/php';
- }
- $this->PEARConfig = &PEAR_Config::singleton($this->pear_conf, $this->pear_conf);
- $this->PEARConfig->set('preferred_state', 'stable');
- foreach ($this->config as $var) {
- if ($var == 'pear_conf' || $var == 'prefix') {
- continue;
- }
- $this->PEARConfig->set($var, $this->$var);
- }
-
- $this->PEARConfig->store();
-// $this->PEARConfig->set('verbose', 6);
- print "Configuration written to $this->pear_conf...\n";
- $this->registry = &$this->PEARConfig->getRegistry();
- print "Initialized registry...\n";
- $install = &PEAR_Command::factory('install', $this->PEARConfig);
- print "Preparing to install...\n";
- $options = array(
- 'nodeps' => true,
- 'force' => true,
- 'upgrade' => true,
- );
- foreach ($this->tarball as $pkg => $src) {
- print "installing $src...\n";
- }
- $install->run('install', $options, array_values($this->tarball));
- }
-
- function postProcessConfigVars()
- {
- foreach ($this->config as $n => $var) {
- for ($m = 1; $m <= count($this->config); $m++) {
- $var2 = $this->config[$m];
- $this->$var = str_replace('$'.$var2, $this->$var2, $this->$var);
- }
- }
-
- foreach ($this->config as $var) {
- $dir = $this->$var;
-
- if (!preg_match('/_dir\\z/', $var)) {
- continue;
- }
-
- if (!@is_dir($dir)) {
- if (!System::mkDir(array('-p', $dir))) {
- $root = OS_WINDOWS ? 'administrator' : 'root';
- return PEAR::raiseError("Unable to create {$this->configPrompt[$var]} $dir.
-Run this script as $root or pick another location.\n");
- }
- }
- }
- }
-
- /**
- * Get the php.ini file used with the current
- * process or with the given php.exe
- *
- * Horrible hack, but well ;)
- *
- * Not used yet, will add the support later
- * @author Pierre-Alain Joye <paj@pearfr.org>
- */
- function getPhpiniPath()
- {
- $pathIni = get_cfg_var('cfg_file_path');
- if ($pathIni && is_file($pathIni)) {
- return $pathIni;
- }
-
- // Oh well, we can keep this too :)
- // I dunno if get_cfg_var() is safe on every OS
- if (OS_WINDOWS) {
- // on Windows, we can be pretty sure that there is a php.ini
- // file somewhere
- do {
- $php_ini = PHP_CONFIG_FILE_PATH . DIRECTORY_SEPARATOR . 'php.ini';
- if (@file_exists($php_ini)) {
- break;
- }
- $php_ini = 'c:\winnt\php.ini';
- if (@file_exists($php_ini)) {
- break;
- }
- $php_ini = 'c:\windows\php.ini';
- } while (false);
- } else {
- $php_ini = PHP_CONFIG_FILE_PATH . DIRECTORY_SEPARATOR . 'php.ini';
- }
-
- if (@is_file($php_ini)) {
- return $php_ini;
- }
-
- // We re running in hackz&troubles :)
- ob_implicit_flush(false);
- ob_start();
- phpinfo(INFO_GENERAL);
- $strInfo = ob_get_contents();
- ob_end_clean();
- ob_implicit_flush(true);
-
- if (php_sapi_name() != 'cli') {
- $strInfo = strip_tags($strInfo,'<td>');
- $arrayInfo = explode("</td>", $strInfo );
- $cli = false;
- } else {
- $arrayInfo = explode("\n", $strInfo);
- $cli = true;
- }
-
- foreach ($arrayInfo as $val) {
- if (strpos($val,"php.ini")) {
- if ($cli) {
- list(,$pathIni) = explode('=>', $val);
- } else {
- $pathIni = strip_tags(trim($val));
- }
- $pathIni = trim($pathIni);
- if (is_file($pathIni)) {
- return $pathIni;
- }
- }
- }
-
- return false;
- }
-}
-?>
-<?php
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Start.php';
-class PEAR_Start_CLI extends PEAR_Start
-{
-
- var $descLength;
- var $descFormat;
- var $first;
- var $last;
- var $origpwd;
- var $tty;
-
- /**
- * Path to .vbs file for directory selection
- * @var string
- */
- var $cscript;
-
- /**
- * SAPI for selected php.exe
- * @var string
- */
- var $php_bin_sapi;
-
- function __construct()
- {
- parent::construct();
- ini_set('html_errors', 0);
- define('WIN32GUI', OS_WINDOWS && php_sapi_name() == 'cli' && System::which('cscript'));
- $this->tty = OS_WINDOWS ? @fopen('\con', 'r') : @fopen('/dev/tty', 'r');
-
- if (!$this->tty) {
- $this->tty = fopen('php://stdin', 'r');
- }
- $this->origpwd = getcwd();
- $this->config = array_keys($this->configPrompt);
-
- // make indices run from 1...
- array_unshift($this->config, "");
- unset($this->config[0]);
- reset($this->config);
- $this->descLength = max(array_map('strlen', $this->configPrompt));
- $this->descFormat = "%-{$this->descLength}s";
- $this->first = key($this->config);
- end($this->config);
- $this->last = key($this->config);
- PEAR_Command::setFrontendType('CLI');
- }
-
- function _PEAR_Start_CLI()
- {
- if ($this->tty) {
- @fclose($this->tty);
- }
- if ($this->cscript) {
- @unlink($this->cscript);
- }
- }
-
- function run()
- {
- if (PEAR::isError($err = $this->locatePackagesToInstall())) {
- return $err;
- }
- $this->startupQuestion();
- $this->setupTempStuff();
- $this->getInstallLocations();
- $this->displayPreamble();
- if (PEAR::isError($err = $this->postProcessConfigVars())) {
- return $err;
- }
- $this->doInstall();
- $this->finishInstall();
- }
-
- function startupQuestion()
- {
- if (OS_WINDOWS) {
- print "
-Are you installing a system-wide PEAR or a local copy?
-(system|local) [system] : ";
- $tmp = trim(fgets($this->tty, 1024));
- if (!empty($tmp) && strtolower($tmp) !== 'system') {
- print "Please confirm local copy by typing 'yes' : ";
- $tmp = trim(fgets($this->tty, 1024));
- if (strtolower($tmp) == 'yes') {
- $slash = "\\";
- if (strrpos($this->prefix, '\\') === (strlen($this->prefix) - 1)) {
- $slash = '';
- }
-
- $this->localInstall = true;
- $this->pear_conf = '$prefix' . $slash . 'pear.ini';
- }
- }
- } else {
- if ($this->getCurrentUser() == 'root') {
- return;
- }
- $this->pear_conf = $this->safeGetenv('HOME') . '/.pearrc';
- }
- }
-
- function getInstallLocations()
- {
- while (true) {
- print "
-Below is a suggested file layout for your new PEAR installation. To
-change individual locations, type the number in front of the
-directory. Type 'all' to change all of them or simply press Enter to
-accept these locations.
-
-";
-
- foreach ($this->config as $n => $var) {
- $fullvar = $this->$var;
- foreach ($this->config as $blah => $unused) {
- foreach ($this->config as $m => $var2) {
- $fullvar = str_replace('$'.$var2, $this->$var2, $fullvar);
- }
- }
- printf("%2d. $this->descFormat : %s\n", $n, $this->configPrompt[$var], $fullvar);
- }
-
- print "\n$this->first-$this->last, 'all' or Enter to continue: ";
- $tmp = trim(fgets($this->tty, 1024));
- if (empty($tmp)) {
- if (OS_WINDOWS && !$this->validPHPBin) {
- echo "**ERROR**
-Please, enter the php.exe path.
-
-";
- } else {
- break;
- }
- }
-
- if (isset($this->config[(int)$tmp])) {
- $var = $this->config[(int)$tmp];
- $desc = $this->configPrompt[$var];
- $current = $this->$var;
- if (WIN32GUI && $var != 'pear_conf'){
- $tmp = $this->win32BrowseForFolder("Choose a Folder for $desc [$current] :");
- $tmp.= '\\';
- } else {
- print "(Use \$prefix as a shortcut for '$this->prefix', etc.)
-$desc [$current] : ";
- $tmp = trim(fgets($this->tty, 1024));
- }
- $old = $this->$var;
- $this->$var = $$var = $tmp;
- if (OS_WINDOWS && $var=='php_bin') {
- if ($this->validatePhpExecutable($tmp)) {
- $this->php_bin = $tmp;
- } else {
- $this->php_bin = $old;
- }
- }
- } elseif ($tmp == 'all') {
- foreach ($this->config as $n => $var) {
- $desc = $this->configPrompt[$var];
- $current = $this->$var;
- print "$desc [$current] : ";
- $tmp = trim(fgets($this->tty, 1024));
- if (!empty($tmp)) {
- $this->$var = $tmp;
- }
- }
- }
- }
- }
-
- function validatePhpExecutable($tmp)
- {
- if (OS_WINDOWS) {
- if (strpos($tmp, 'php.exe')) {
- $tmp = str_replace('php.exe', '', $tmp);
- }
- if (file_exists($tmp . DIRECTORY_SEPARATOR . 'php.exe')) {
- $tmp = $tmp . DIRECTORY_SEPARATOR . 'php.exe';
- $this->php_bin_sapi = $this->win32DetectPHPSAPI();
- if ($this->php_bin_sapi=='cgi'){
- print "
-******************************************************************************
-NOTICE! We found php.exe under $this->php_bin, it uses a $this->php_bin_sapi SAPI.
-PEAR commandline tool works well with it.
-If you have a CLI php.exe available, we recommend using it.
-
-Press Enter to continue...";
- $tmp = trim(fgets($this->tty, 1024));
- } elseif ($this->php_bin_sapi=='unknown') {
- print "
-******************************************************************************
-WARNING! We found php.exe under $this->php_bin, it uses an $this->php_bin_sapi SAPI.
-PEAR commandline tool has NOT been tested with it.
-If you have a CLI (or CGI) php.exe available, we strongly recommend using it.
-
-Press Enter to continue...";
- $tmp = trim(fgets($this->tty, 1024));
- }
- echo "php.exe (sapi: $this->php_bin_sapi) found.\n\n";
- return $this->validPHPBin = true;
- } else {
- echo "**ERROR**: not a folder, or no php.exe found in this folder.
-Press Enter to continue...";
- $tmp = trim(fgets($this->tty, 1024));
- return $this->validPHPBin = false;
- }
- }
- }
-
- /**
- * Create a vbs script to browse the getfolder dialog, called
- * by cscript, if it's available.
- * $label is the label text in the header of the dialog box
- *
- * TODO:
- * - Do not show Control panel
- * - Replace WSH with calls to w32 as soon as callbacks work
- * @author Pierrre-Alain Joye
- */
- function win32BrowseForFolder($label)
- {
- $wsh_browserfolder = 'Option Explicit
-Dim ArgObj, var1, var2, sa, sFld
-Set ArgObj = WScript.Arguments
-Const BIF_EDITBOX = &H10
-Const BIF_NEWDIALOGSTYLE = &H40
-Const BIF_RETURNONLYFSDIRS = &H0001
-Const BIF_DONTGOBELOWDOMAIN = &H0002
-Const BIF_STATUSTEXT = &H0004
-Const BIF_RETURNFSANCESTORS = &H0008
-Const BIF_VALIDATE = &H0020
-Const BIF_BROWSEFORCOMPUTER = &H1000
-Const BIF_BROWSEFORPRINTER = &H2000
-Const BIF_BROWSEINCLUDEFILES = &H4000
-Const OFN_LONGNAMES = &H200000
-Const OFN_NOLONGNAMES = &H40000
-Const ssfDRIVES = &H11
-Const ssfNETWORK = &H12
-Set sa = CreateObject("Shell.Application")
-var1=ArgObj(0)
-Set sFld = sa.BrowseForFolder(0, var1, BIF_EDITBOX + BIF_VALIDATE + BIF_BROWSEINCLUDEFILES + BIF_RETURNFSANCESTORS+BIF_NEWDIALOGSTYLE , ssfDRIVES )
-if not sFld is nothing Then
- if not left(sFld.items.item.path,1)=":" Then
- WScript.Echo sFld.items.item.path
- Else
- WScript.Echo "invalid"
- End If
-Else
- WScript.Echo "cancel"
-End If
-';
- if (!$this->cscript) {
- $this->cscript = $this->ptmp . DIRECTORY_SEPARATOR . "bf.vbs";
- // TODO: use file_put_contents()
- $fh = fopen($this->cscript, "wb+");
- fwrite($fh, $wsh_browserfolder, strlen($wsh_browserfolder));
- fclose($fh);
- }
-
- exec('cscript ' . escapeshellarg($this->cscript) . ' "' . escapeshellarg($label) . '" //noLogo', $arPath);
- if (!count($arPath) || $arPath[0]=='' || $arPath[0]=='cancel') {
- return '';
- } elseif ($arPath[0]=='invalid') {
- echo "Invalid Path.\n";
- return '';
- }
-
- return $arPath[0];
- }
-
- function displayPreamble()
- {
- if (OS_WINDOWS) {
- /*
- * Checks PHP SAPI version under windows/CLI
- */
- if ($this->php_bin == '') {
- print "
-We do not find any php.exe, please select the php.exe folder (CLI is
-recommended, usually in c:\php\cli\php.exe)
-";
- $this->validPHPBin = false;
- } elseif (strlen($this->php_bin)) {
- $this->php_bin_sapi = $this->win32DetectPHPSAPI();
- $this->validPHPBin = true;
- switch ($this->php_bin_sapi) {
- case 'cli':
- break;
- case 'cgi':
- case 'cgi-fcgi':
- print "
-*NOTICE*
-We found php.exe under $this->php_bin, it uses a $this->php_bin_sapi SAPI. PEAR commandline
-tool works well with it, if you have a CLI php.exe available, we
-recommend using it.
-";
- break;
- default:
- print "
-*WARNING*
-We found php.exe under $this->php_bin, it uses an unknown SAPI. PEAR commandline
-tool has not been tested with it, if you have a CLI (or CGI) php.exe available,
-we strongly recommend using it.
-
-";
- break;
- }
- }
- }
- }
-
- function finishInstall()
- {
- $sep = OS_WINDOWS ? ';' : ':';
- $include_path = explode($sep, ini_get('include_path'));
- if (OS_WINDOWS) {
- $found = false;
- $t = strtolower($this->php_dir);
- foreach ($include_path as $path) {
- if ($t == strtolower($path)) {
- $found = true;
- break;
- }
- }
- } else {
- $found = in_array($this->php_dir, $include_path);
- }
- if (!$found) {
- print "
-******************************************************************************
-WARNING! The include_path defined in the currently used php.ini does not
-contain the PEAR PHP directory you just specified:
-<$this->php_dir>
-If the specified directory is also not in the include_path used by
-your scripts, you will have problems getting any PEAR packages working.
-";
-
- if ($php_ini = $this->getPhpiniPath()) {
- print "\n\nWould you like to alter php.ini <$php_ini>? [Y/n] : ";
- $alter_phpini = !stristr(fgets($this->tty, 1024), "n");
- if ($alter_phpini) {
- $this->alterPhpIni($php_ini);
- } else {
- if (OS_WINDOWS) {
- print "
-Please look over your php.ini file to make sure
-$this->php_dir is in your include_path.";
- } else {
- print "
-I will add a workaround for this in the 'pear' command to make sure
-the installer works, but please look over your php.ini or Apache
-configuration to make sure $this->php_dir is in your include_path.
-";
- }
- }
- }
-
- print "
-Current include path : ".ini_get('include_path')."
-Configured directory : $this->php_dir
-Currently used php.ini (guess) : $php_ini
-";
-
- print "Press Enter to continue: ";
- fgets($this->tty, 1024);
- }
-
- $pear_cmd = $this->bin_dir . DIRECTORY_SEPARATOR . 'pear';
- $pear_cmd = OS_WINDOWS ? strtolower($pear_cmd).'.bat' : $pear_cmd;
-
- // check that the installed pear and the one in the path are the same (if any)
- $pear_old = System::which(OS_WINDOWS ? 'pear.bat' : 'pear', $this->bin_dir);
- if ($pear_old && ($pear_old != $pear_cmd)) {
- // check if it is a link or symlink
- $islink = OS_WINDOWS ? false : is_link($pear_old) ;
- if ($islink && readlink($pear_old) != $pear_cmd) {
- print "\n** WARNING! The link $pear_old does not point to the " .
- "installed $pear_cmd\n";
- } elseif (!$this->localInstall && is_writable($pear_old) && !is_dir($pear_old)) {
- rename($pear_old, "{$pear_old}_old");
- print "\n** WARNING! Backed up old pear to {$pear_old}_old\n";
- } else {
- print "\n** WARNING! Old version found at $pear_old, please remove it or ".
- "be sure to use the new $pear_cmd command\n";
- }
- }
-
- print "\nThe 'pear' command is now at your service at $pear_cmd\n";
-
- // Alert the user if the pear cmd is not in PATH
- $old_dir = $pear_old ? dirname($pear_old) : false;
- if (!$this->which('pear', $old_dir)) {
- print "
-** The 'pear' command is not currently in your PATH, so you need to
-** use '$pear_cmd' until you have added
-** '$this->bin_dir' to your PATH environment variable.
-
-";
-
- print "Run it without parameters to see the available actions, try 'pear list'
-to see what packages are installed, or 'pear help' for help.
-
-For more information about PEAR, see:
-
- http://pear.php.net/faq.php
- http://pear.php.net/manual/
-
-Thanks for using go-pear!
-
-";
- }
-
- if (OS_WINDOWS && !$this->localInstall) {
- $this->win32CreateRegEnv();
- }
- }
-
- /**
- * System::which() does not allow path exclusion
- */
- function which($program, $dont_search_in = false)
- {
- if (OS_WINDOWS) {
- if ($_path = $this->safeGetEnv('Path')) {
- $dirs = explode(';', $_path);
- } else {
- $dirs = explode(';', $this->safeGetEnv('PATH'));
- }
- foreach ($dirs as $i => $dir) {
- $dirs[$i] = strtolower(realpath($dir));
- }
- if ($dont_search_in) {
- $dont_search_in = strtolower(realpath($dont_search_in));
- }
- if ($dont_search_in &&
- ($key = array_search($dont_search_in, $dirs)) !== false)
- {
- unset($dirs[$key]);
- }
-
- foreach ($dirs as $dir) {
- $dir = str_replace('\\\\', '\\', $dir);
- if (!strlen($dir)) {
- continue;
- }
- if ($dir{strlen($dir) - 1} != '\\') {
- $dir .= '\\';
- }
- $tmp = $dir . $program;
- $info = pathinfo($tmp);
- if (isset($info['extension']) && in_array(strtolower($info['extension']),
- array('exe', 'com', 'bat', 'cmd'))) {
- if (file_exists($tmp)) {
- return strtolower($tmp);
- }
- } elseif (file_exists($ret = $tmp . '.exe') ||
- file_exists($ret = $tmp . '.com') ||
- file_exists($ret = $tmp . '.bat') ||
- file_exists($ret = $tmp . '.cmd')) {
- return strtolower($ret);
- }
- }
- } else {
- $dirs = explode(':', $this->safeGetEnv('PATH'));
- if ($dont_search_in &&
- ($key = array_search($dont_search_in, $dirs)) !== false)
- {
- unset($dirs[$key]);
- }
- foreach ($dirs as $dir) {
- if (is_executable("$dir/$program")) {
- return "$dir/$program";
- }
- }
- }
- return false;
- }
-
- /**
- * Not optimized, but seems to work, if some nice
- * peardev will test it? :)
- *
- * @author Pierre-Alain Joye <paj@pearfr.org>
- */
- function alterPhpIni($pathIni='')
- {
- $foundAt = array();
- $iniSep = OS_WINDOWS ? ';' : ':';
-
- if ($pathIni=='') {
- $pathIni = $this->getPhpiniPath();
- }
-
- $arrayIni = file($pathIni);
- $i=0;
- $found=0;
-
- // Looks for each active include_path directives
- foreach ($arrayIni as $iniLine) {
- $iniLine = trim($iniLine);
- $iniLine = str_replace(array("\n", "\r"), array('', ''), $iniLine);
- if (preg_match("/^\s*include_path/", $iniLine)) {
- $foundAt[] = $i;
- $found++;
- }
- $i++;
- }
-
- if ($found) {
- $includeLine = $arrayIni[$foundAt[0]];
- list(, $currentPath) = explode('=', $includeLine);
-
- $currentPath = trim($currentPath);
- if (substr($currentPath,0,1) == '"') {
- $currentPath = substr($currentPath, 1, strlen($currentPath) - 2);
- }
-
- $arrayPath = explode($iniSep, $currentPath);
- $newPath = array();
- if ($arrayPath[0]=='.') {
- $newPath[0] = '.';
- $newPath[1] = $this->php_dir;
- array_shift($arrayPath);
- } else {
- $newPath[0] = $this->php_dir;
- }
-
- foreach ($arrayPath as $path) {
- $newPath[]= $path;
- }
- } else {
- $newPath = array();
- $newPath[0] = '.';
- $newPath[1] = $this->php_dir;
- $foundAt[] = count($arrayIni); // add a new line if none is present
- }
- $nl = OS_WINDOWS ? "\r\n" : "\n";
- $includepath = 'include_path="' . implode($iniSep,$newPath) . '"';
- $newInclude = "$nl$nl;***** Added by go-pear$nl" .
- $includepath .
- $nl . ";*****" .
- $nl . $nl;
-
- $arrayIni[$foundAt[0]] = $newInclude;
-
- for ($i=1; $i<$found; $i++) {
- $arrayIni[$foundAt[$i]]=';' . trim($arrayIni[$foundAt[$i]]);
- }
-
- $newIni = implode("", $arrayIni);
- if (!($fh = @fopen($pathIni, "wb+"))) {
- $prefixIni = $this->prefix . DIRECTORY_SEPARATOR . "php.ini-gopear";
- $fh = fopen($prefixIni, "wb+");
- if (!$fh) {
- echo "
-******************************************************************************
-WARNING: Cannot write to $pathIni nor in $this->prefix/php.ini-gopear. Please
-modify manually your php.ini by adding:
-
-$includepath
-
-";
- return false;
- } else {
- fwrite($fh, $newIni, strlen($newIni));
- fclose($fh);
- echo "
-******************************************************************************
-WARNING: Cannot write to $pathIni, but php.ini was successfully created
-at <$this->prefix/php.ini-gopear>. Please replace the file <$pathIni> with
-<$prefixIni> or modify your php.ini by adding:
-
-$includepath
-
-";
-
- }
- } else {
- fwrite($fh, $newIni, strlen($newIni));
- fclose($fh);
- echo "
-php.ini <$pathIni> include_path updated.
-";
- }
- return true;
- }
-
- /**
- * Generates a registry addOn for Win32 platform
- * This addon set PEAR environment variables
- * @author Pierrre-Alain Joye
- */
- function win32CreateRegEnv()
- {
- $nl = "\r\n";
- $reg ='REGEDIT4'.$nl.
- '[HKEY_CURRENT_USER\Environment]'. $nl .
- '"PHP_PEAR_SYSCONF_DIR"="' . addslashes($this->prefix) . '"' . $nl .
- '"PHP_PEAR_INSTALL_DIR"="' . addslashes($this->php_dir) . '"' . $nl .
- '"PHP_PEAR_DOC_DIR"="' . addslashes($this->doc_dir) . '"' . $nl .
- '"PHP_PEAR_BIN_DIR"="' . addslashes($this->bin_dir) . '"' . $nl .
- '"PHP_PEAR_DATA_DIR"="' . addslashes($this->data_dir) . '"' . $nl .
- '"PHP_PEAR_PHP_BIN"="' . addslashes($this->php_bin) . '"' . $nl .
- '"PHP_PEAR_TEST_DIR"="' . addslashes($this->test_dir) . '"' . $nl;
-
- $fh = fopen($this->prefix . DIRECTORY_SEPARATOR . 'PEAR_ENV.reg', 'wb');
- if($fh){
- fwrite($fh, $reg, strlen($reg));
- fclose($fh);
- echo "
-
-* WINDOWS ENVIRONMENT VARIABLES *
-For convenience, a REG file is available under {$this->prefix}PEAR_ENV.reg .
-This file creates ENV variables for the current user.
-
-Double-click this file to add it to the current user registry.
-
-";
- }
- }
-
- function displayHTMLProgress()
- {
- }
-}
-?>
-<?php
-/**
- * PEAR_Task_Common, base class for installer tasks
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**#@+
- * Error codes for task validation routines
- */
-define('PEAR_TASK_ERROR_NOATTRIBS', 1);
-define('PEAR_TASK_ERROR_MISSING_ATTRIB', 2);
-define('PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE', 3);
-define('PEAR_TASK_ERROR_INVALID', 4);
-/**#@-*/
-define('PEAR_TASK_PACKAGE', 1);
-define('PEAR_TASK_INSTALL', 2);
-define('PEAR_TASK_PACKAGEANDINSTALL', 3);
-/**
- * A task is an operation that manipulates the contents of a file.
- *
- * Simple tasks operate on 1 file. Multiple tasks are executed after all files have been
- * processed and installed, and are designed to operate on all files containing the task.
- * The Post-install script task simply takes advantage of the fact that it will be run
- * after installation, replace is a simple task.
- *
- * Combining tasks is possible, but ordering is significant.
- *
- * <file name="test.php" role="php">
- * <tasks:replace from="@data-dir@" to="data_dir" type="pear-config"/>
- * <tasks:postinstallscript/>
- * </file>
- *
- * This will first replace any instance of @data-dir@ in the test.php file
- * with the path to the current data directory. Then, it will include the
- * test.php file and run the script it contains to configure the package post-installation.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- * @abstract
- */
-class PEAR_Task_Common
-{
- /**
- * Valid types for this version are 'simple' and 'multiple'
- *
- * - simple tasks operate on the contents of a file and write out changes to disk
- * - multiple tasks operate on the contents of many files and write out the
- * changes directly to disk
- *
- * Child task classes must override this property.
- *
- * @access protected
- */
- protected $type = 'simple';
- /**
- * Determines which install phase this task is executed under
- */
- public $phase = PEAR_TASK_INSTALL;
- /**
- * @access protected
- */
- protected $config;
- /**
- * @access protected
- */
- protected $registry;
- /**
- * @access protected
- */
- public $logger;
- /**
- * @access protected
- */
- protected $installphase;
- /**
- * @param PEAR_Config
- * @param PEAR_Common
- */
- function __construct(&$config, &$logger, $phase)
- {
- $this->config = &$config;
- $this->registry = &$config->getRegistry();
- $this->logger = &$logger;
- $this->installphase = $phase;
- if ($this->type == 'multiple') {
- $GLOBALS['_PEAR_TASK_POSTINSTANCES'][get_class($this)][] = &$this;
- }
- }
-
- /**
- * Validate the basic contents of a task tag.
- *
- * @param PEAR_PackageFile_v2
- * @param array
- * @param PEAR_Config
- * @param array the entire parsed <file> tag
- *
- * @return true|array On error, return an array in format:
- * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...])
- *
- * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in
- * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and
- * an array of legal values in
- *
- * @static
- * @abstract
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- }
-
- /**
- * Initialize a task instance with the parameters
- *
- * @param array raw, parsed xml
- * @param array attributes from the <file> tag containing this task
- * @param string|null last installed version of this package
- * @abstract
- */
- public function init($xml, $fileAttributes, $lastVersion)
- {
- }
-
- /**
- * Begin a task processing session. All multiple tasks will be processed
- * after each file has been successfully installed, all simple tasks should
- * perform their task here and return any errors using the custom
- * throwError() method to allow forward compatibility
- *
- * This method MUST NOT write out any changes to disk
- *
- * @param PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- * @abstract
- */
- public function startSession($pkg, $contents, $dest)
- {
- }
-
- /**
- * This method is used to process each of the tasks for a particular
- * multiple class type. Simple tasks need not implement this method.
- *
- * @param array an array of tasks
- * @access protected
- * @static
- * @abstract
- */
- public function run($tasks)
- {
- }
-
- /**
- * @static
- * @final
- */
- public function hasPostinstallTasks()
- {
- return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
- }
-
- /**
- * @static
- * @final
- */
- public function runPostinstallTasks()
- {
- foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) {
- $err = call_user_func(
- array($class, 'run'),
- $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]
- );
- if ($err) {
- return PEAR_Task_Common::throwError($err);
- }
- }
- unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']);
- }
-
- /**
- * Determines whether a role is a script
- * @return bool
- */
- public function isScript()
- {
- return $this->type == 'script';
- }
-
- public function throwError($msg, $code = -1)
- {
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-
- return PEAR::raiseError($msg, $code);
- }
-}
-<?php
-/**
- * <tasks:postinstallscript>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
-/**
- * Implements the postinstallscript file task.
- *
- * Note that post-install scripts are handled separately from installation, by the
- * "pear run-scripts" command
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Postinstallscript extends PEAR_Task_Common
-{
- public $type = 'script';
- public $_class;
- public $_params;
- public $_obj;
- /**
- *
- * @var PEAR_PackageFile_v2
- */
- public $_pkg;
- public $_contents;
- public $phase = PEAR_TASK_INSTALL;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * This also attempts to validate the script to make sure it meets the criteria
- * for a post-install script
- *
- * @param PEAR_PackageFile_v2
- * @param array The XML contents of the <postinstallscript> tag
- * @param PEAR_Config
- * @param array the entire parsed <file> tag
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if ($fileXml['role'] != 'php') {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must be role="php"', );
- }
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $file = $pkg->getFileContents($fileXml['name']);
- if (PEAR::isError($file)) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" is not valid: '.
- $file->getMessage(), );
- } elseif ($file === null) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" could not be retrieved for processing!', );
- } else {
- $analysis = $pkg->analyzeSourceCode($file, true);
- if (!$analysis) {
- PEAR::popErrorHandling();
- $warnings = '';
- foreach ($pkg->getValidationWarnings() as $warn) {
- $warnings .= $warn['message']."\n";
- }
-
- return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "'.
- $fileXml['name'].'" failed: '.$warnings, );
- }
- if (count($analysis['declared_classes']) != 1) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must declare exactly 1 class', );
- }
- $class = $analysis['declared_classes'][0];
- if ($class != str_replace(
- array('/', '.php'), array('_', ''),
- $fileXml['name']
- ).'_postinstall') {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" class "'.$class.'" must be named "'.
- str_replace(
- array('/', '.php'), array('_', ''),
- $fileXml['name']
- ).'_postinstall"', );
- }
- if (!isset($analysis['declared_methods'][$class])) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must declare methods init() and run()', );
- }
- $methods = array('init' => 0, 'run' => 1);
- foreach ($analysis['declared_methods'][$class] as $method) {
- if (isset($methods[$method])) {
- unset($methods[$method]);
- }
- }
- if (count($methods)) {
- PEAR::popErrorHandling();
-
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" must declare methods init() and run()', );
- }
- }
- PEAR::popErrorHandling();
- $definedparams = array();
- $tasksNamespace = $pkg->getTasksNs().':';
- if (!isset($xml[$tasksNamespace.'paramgroup']) && isset($xml['paramgroup'])) {
- // in order to support the older betas, which did not expect internal tags
- // to also use the namespace
- $tasksNamespace = '';
- }
- if (isset($xml[$tasksNamespace.'paramgroup'])) {
- $params = $xml[$tasksNamespace.'paramgroup'];
- if (!is_array($params) || !isset($params[0])) {
- $params = array($params);
- }
- foreach ($params as $param) {
- if (!isset($param[$tasksNamespace.'id'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" <paramgroup> must have '.
- 'an '.$tasksNamespace.'id> tag', );
- }
- if (isset($param[$tasksNamespace.'name'])) {
- if (!in_array($param[$tasksNamespace.'name'], $definedparams)) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" parameter "'.$param[$tasksNamespace.'name'].
- '" has not been previously defined', );
- }
- if (!isset($param[$tasksNamespace.'conditiontype'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.
- 'conditiontype> tag containing either "=", '.
- '"!=", or "preg_match"', );
- }
- if (!in_array(
- $param[$tasksNamespace.'conditiontype'],
- array('=', '!=', 'preg_match')
- )) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.
- 'conditiontype> tag containing either "=", '.
- '"!=", or "preg_match"', );
- }
- if (!isset($param[$tasksNamespace.'value'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.
- 'value> tag containing expected parameter value', );
- }
- }
- if (isset($param[$tasksNamespace.'instructions'])) {
- if (!is_string($param[$tasksNamespace.'instructions'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" '.$tasksNamespace.
- 'paramgroup> id "'.$param[$tasksNamespace.'id'].
- '" '.$tasksNamespace.'instructions> must be simple text', );
- }
- }
- if (!isset($param[$tasksNamespace.'param'])) {
- continue; // <param> is no longer required
- }
- $subparams = $param[$tasksNamespace.'param'];
- if (!is_array($subparams) || !isset($subparams[0])) {
- $subparams = array($subparams);
- }
- foreach ($subparams as $subparam) {
- if (!isset($subparam[$tasksNamespace.'name'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter for '.
- $tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].'" must have '.
- 'a '.$tasksNamespace.'name> tag', );
- }
- if (!preg_match(
- '/[a-zA-Z0-9]+/',
- $subparam[$tasksNamespace.'name']
- )) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter "'.
- $subparam[$tasksNamespace.'name'].
- '" for '.$tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].
- '" is not a valid name. Must contain only alphanumeric characters', );
- }
- if (!isset($subparam[$tasksNamespace.'prompt'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter "'.
- $subparam[$tasksNamespace.'name'].
- '" for '.$tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.'prompt> tag', );
- }
- if (!isset($subparam[$tasksNamespace.'type'])) {
- return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "'.
- $fileXml['name'].'" parameter "'.
- $subparam[$tasksNamespace.'name'].
- '" for '.$tasksNamespace.'paramgroup> id "'.
- $param[$tasksNamespace.'id'].
- '" must have a '.$tasksNamespace.'type> tag', );
- }
- $definedparams[] = $param[$tasksNamespace.'id'].'::'.
- $subparam[$tasksNamespace.'name'];
- }
- }
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array $xml raw, parsed xml
- * @param array $fileattribs attributes from the <file> tag containing
- * this task
- * @param string|null $lastversion last installed version of this package,
- * if any (useful for upgrades)
- */
- public function init($xml, $fileattribs, $lastversion)
- {
- $this->_class = str_replace('/', '_', $fileattribs['name']);
- $this->_filename = $fileattribs['name'];
- $this->_class = str_replace('.php', '', $this->_class).'_postinstall';
- $this->_params = $xml;
- $this->_lastversion = $lastversion;
- }
-
- /**
- * Strip the tasks: namespace from internal params
- *
- * @access private
- */
- public function _stripNamespace($params = null)
- {
- if ($params === null) {
- $params = array();
- if (!is_array($this->_params)) {
- return;
- }
- foreach ($this->_params as $i => $param) {
- if (is_array($param)) {
- $param = $this->_stripNamespace($param);
- }
- $params[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
- }
- $this->_params = $params;
- } else {
- $newparams = array();
- foreach ($params as $i => $param) {
- if (is_array($param)) {
- $param = $this->_stripNamespace($param);
- }
- $newparams[str_replace($this->_pkg->getTasksNs().':', '', $i)] = $param;
- }
-
- return $newparams;
- }
- }
-
- /**
- * Unlike other tasks, the installed file name is passed in instead of the
- * file contents, because this task is handled post-installation
- *
- * @param mixed $pkg PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string $contents file name
- *
- * @return bool|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError)
- */
- public function startSession($pkg, $contents)
- {
- if ($this->installphase != PEAR_TASK_INSTALL) {
- return false;
- }
- // remove the tasks: namespace if present
- $this->_pkg = $pkg;
- $this->_stripNamespace();
- $this->logger->log(
- 0, 'Including external post-installation script "'.
- $contents.'" - any errors are in this script'
- );
- include_once 'phar://install-pear-nozlib.phar/' . $contents;
- if (class_exists($this->_class)) {
- $this->logger->log(0, 'Inclusion succeeded');
- } else {
- return $this->throwError(
- 'init of post-install script class "'.$this->_class
- .'" failed'
- );
- }
- $this->_obj = new $this->_class();
- $this->logger->log(1, 'running post-install script "'.$this->_class.'->init()"');
- PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
- $res = $this->_obj->init($this->config, $pkg, $this->_lastversion);
- PEAR::popErrorHandling();
- if ($res) {
- $this->logger->log(0, 'init succeeded');
- } else {
- return $this->throwError(
- 'init of post-install script "'.$this->_class.
- '->init()" failed'
- );
- }
- $this->_contents = $contents;
-
- return true;
- }
-
- /**
- * No longer used
- *
- * @see PEAR_PackageFile_v2::runPostinstallScripts()
- * @param array an array of tasks
- * @param string install or upgrade
- * @access protected
- * @static
- */
- public function run()
- {
- }
-}
-<?php
-/**
- * <tasks:postinstallscript> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Postinstallscript.php';
-/**
- * Abstracts the postinstallscript file task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript
-{
- /**
- * parent package file object
- *
- * @var PEAR_PackageFile_v2_rw
- */
- public $_pkg;
- /**
- * Enter description here...
- *
- * @param PEAR_PackageFile_v2_rw $pkg Package
- * @param PEAR_Config $config Config
- * @param PEAR_Frontend $logger Logger
- * @param array $fileXml XML
- *
- * @return PEAR_Task_Postinstallscript_rw
- */
- function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
- }
-
- public function getName()
- {
- return 'postinstallscript';
- }
-
- /**
- * add a simple <paramgroup> to the post-install script
- *
- * Order is significant, so call this method in the same
- * sequence the users should see the paramgroups. The $params
- * parameter should either be the result of a call to {@link getParam()}
- * or an array of calls to getParam().
- *
- * Use {@link addConditionTypeGroup()} to add a <paramgroup> containing
- * a <conditiontype> tag
- *
- * @param string $id <paramgroup> id as seen by the script
- * @param array|false $params array of getParam() calls, or false for no params
- * @param string|false $instructions
- */
- public function addParamGroup($id, $params = false, $instructions = false)
- {
- if ($params && isset($params[0]) && !isset($params[1])) {
- $params = $params[0];
- }
- $stuff =
- array(
- $this->_pkg->getTasksNs().':id' => $id,
- );
- if ($instructions) {
- $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
- }
- if ($params) {
- $stuff[$this->_pkg->getTasksNs().':param'] = $params;
- }
- $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
- }
-
- /**
- * Add a complex <paramgroup> to the post-install script with conditions
- *
- * This inserts a <paramgroup> with
- *
- * Order is significant, so call this method in the same
- * sequence the users should see the paramgroups. The $params
- * parameter should either be the result of a call to {@link getParam()}
- * or an array of calls to getParam().
- *
- * Use {@link addParamGroup()} to add a simple <paramgroup>
- *
- * @param string $id <paramgroup> id as seen by the script
- * @param string $oldgroup <paramgroup> id of the section referenced by
- * <conditiontype>
- * @param string $param name of the <param> from the older section referenced
- * by <contitiontype>
- * @param string $value value to match of the parameter
- * @param string $conditiontype one of '=', '!=', 'preg_match'
- * @param array|false $params array of getParam() calls, or false for no params
- * @param string|false $instructions
- */
- public function addConditionTypeGroup($id,
- $oldgroup,
- $param,
- $value,
- $conditiontype = '=',
- $params = false,
- $instructions = false
- ) {
- if ($params && isset($params[0]) && !isset($params[1])) {
- $params = $params[0];
- }
- $stuff = array(
- $this->_pkg->getTasksNs().':id' => $id,
- );
- if ($instructions) {
- $stuff[$this->_pkg->getTasksNs().':instructions'] = $instructions;
- }
- $stuff[$this->_pkg->getTasksNs().':name'] = $oldgroup.'::'.$param;
- $stuff[$this->_pkg->getTasksNs().':conditiontype'] = $conditiontype;
- $stuff[$this->_pkg->getTasksNs().':value'] = $value;
- if ($params) {
- $stuff[$this->_pkg->getTasksNs().':param'] = $params;
- }
- $this->_params[$this->_pkg->getTasksNs().':paramgroup'][] = $stuff;
- }
-
- public function getXml()
- {
- return $this->_params;
- }
-
- /**
- * Use to set up a param tag for use in creating a paramgroup
- *
- * @param mixed $name Name of parameter
- * @param mixed $prompt Prompt
- * @param string $type Type, defaults to 'string'
- * @param mixed $default Default value
- *
- * @static
- * @return array
- */
- public function getParam($name, $prompt, $type = 'string', $default = null)
- {
- if ($default !== null) {
- return
- array(
- $this->_pkg->getTasksNs().':name' => $name,
- $this->_pkg->getTasksNs().':prompt' => $prompt,
- $this->_pkg->getTasksNs().':type' => $type,
- $this->_pkg->getTasksNs().':default' => $default,
- );
- }
-
- return
- array(
- $this->_pkg->getTasksNs().':name' => $name,
- $this->_pkg->getTasksNs().':prompt' => $prompt,
- $this->_pkg->getTasksNs().':type' => $type,
- );
- }
-}
-<?php
-/**
- * <tasks:replace>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
-/**
- * Implements the replace file task.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Replace extends PEAR_Task_Common
-{
- public $type = 'simple';
- public $phase = PEAR_TASK_PACKAGEANDINSTALL;
- public $_replacements;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if (!isset($xml['attribs'])) {
- return array(PEAR_TASK_ERROR_NOATTRIBS);
- }
- if (!isset($xml['attribs']['type'])) {
- return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'type');
- }
- if (!isset($xml['attribs']['to'])) {
- return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'to');
- }
- if (!isset($xml['attribs']['from'])) {
- return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'from');
- }
- if ($xml['attribs']['type'] == 'pear-config') {
- if (!in_array($xml['attribs']['to'], $config->getKeys())) {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- $config->getKeys(), );
- }
- } elseif ($xml['attribs']['type'] == 'php-const') {
- if (defined($xml['attribs']['to'])) {
- return true;
- } else {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- array('valid PHP constant'), );
- }
- } elseif ($xml['attribs']['type'] == 'package-info') {
- if (in_array(
- $xml['attribs']['to'],
- array('name', 'summary', 'channel', 'notes', 'extends', 'description',
- 'release_notes', 'license', 'release-license', 'license-uri',
- 'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time', )
- )) {
- return true;
- } else {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'],
- array('name', 'summary', 'channel', 'notes', 'extends', 'description',
- 'release_notes', 'license', 'release-license', 'license-uri',
- 'version', 'api-version', 'state', 'api-state', 'release_date',
- 'date', 'time', ), );
- }
- } else {
- return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'],
- array('pear-config', 'package-info', 'php-const'), );
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param unused
- */
- public function init($xml, $attribs)
- {
- $this->_replacements = isset($xml['attribs']) ? array($xml) : $xml;
- }
-
- /**
- * Do a package.xml 1.0 replacement, with additional package-info fields available
- *
- * See validateXml() source for the complete list of allowed fields
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- */
- public function startSession($pkg, $contents, $dest)
- {
- $subst_from = $subst_to = array();
- foreach ($this->_replacements as $a) {
- $a = $a['attribs'];
- $to = '';
- if ($a['type'] == 'pear-config') {
- if ($this->installphase == PEAR_TASK_PACKAGE) {
- return false;
- }
- if ($a['to'] == 'master_server') {
- $chan = $this->registry->getChannel($pkg->getChannel());
- if (!PEAR::isError($chan)) {
- $to = $chan->getServer();
- } else {
- $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
-
- return false;
- }
- } else {
- if ($this->config->isDefinedLayer('ftp')) {
- // try the remote config file first
- $to = $this->config->get($a['to'], 'ftp', $pkg->getChannel());
- if (is_null($to)) {
- // then default to local
- $to = $this->config->get($a['to'], null, $pkg->getChannel());
- }
- } else {
- $to = $this->config->get($a['to'], null, $pkg->getChannel());
- }
- }
- if (is_null($to)) {
- $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]");
-
- return false;
- }
- } elseif ($a['type'] == 'php-const') {
- if ($this->installphase == PEAR_TASK_PACKAGE) {
- return false;
- }
- if (defined($a['to'])) {
- $to = constant($a['to']);
- } else {
- $this->logger->log(0, "$dest: invalid php-const replacement: $a[to]");
-
- return false;
- }
- } else {
- if ($t = $pkg->packageInfo($a['to'])) {
- $to = $t;
- } else {
- $this->logger->log(0, "$dest: invalid package-info replacement: $a[to]");
-
- return false;
- }
- }
- if (!is_null($to)) {
- $subst_from[] = $a['from'];
- $subst_to[] = $to;
- }
- }
- $this->logger->log(
- 3, "doing ".sizeof($subst_from).
- " substitution(s) for $dest"
- );
- if (sizeof($subst_from)) {
- $contents = str_replace($subst_from, $subst_to, $contents);
- }
-
- return $contents;
- }
-}
-<?php
-/**
- * <tasks:replace> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Replace.php';
-/**
- * Abstracts the replace task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Replace_rw extends PEAR_Task_Replace
-{
- public function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents);
- }
-
- public function setInfo($from, $to, $type)
- {
- $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type));
- }
-
- public function getName()
- {
- return 'replace';
- }
-
- public function getXml()
- {
- return $this->_params;
- }
-}
-<?php
-/**
- * <tasks:unixeol>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
-/**
- * Implements the unix line endings file task.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Unixeol extends PEAR_Task_Common
-{
- public $type = 'simple';
- public $phase = PEAR_TASK_PACKAGE;
- public $_replacements;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if ($xml != '') {
- return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param unused
- */
- public function init($xml, $attribs)
- {
- }
-
- /**
- * Replace all line endings with line endings customized for the current OS
- *
- * See validateXml() source for the complete list of allowed fields
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- */
- public function startSession($pkg, $contents, $dest)
- {
- $this->logger->log(3, "replacing all line endings with \\n in $dest");
-
- return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents);
- }
-}
-<?php
-/**
- * <tasks:unixeol> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Unixeol.php';
-/**
- * Abstracts the unixeol task xml.
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol
-{
- function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return true;
- }
-
- public function getName()
- {
- return 'unixeol';
- }
-
- public function getXml()
- {
- return '';
- }
-}
-?>
-<?php
-/**
- * <tasks:windowseol>
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Common.php';
-/**
- * Implements the windows line endsings file task.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Task_Windowseol extends PEAR_Task_Common
-{
- public $type = 'simple';
- public $phase = PEAR_TASK_PACKAGE;
- public $_replacements;
-
- /**
- * Validate the raw xml at parsing-time.
- *
- * @param PEAR_PackageFile_v2
- * @param array raw, parsed xml
- * @param PEAR_Config
- * @static
- */
- public function validateXml($pkg, $xml, $config, $fileXml)
- {
- if ($xml != '') {
- return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed');
- }
-
- return true;
- }
-
- /**
- * Initialize a task instance with the parameters
- * @param array raw, parsed xml
- * @param unused
- */
- public function init($xml, $attribs)
- {
- }
-
- /**
- * Replace all line endings with windows line endings
- *
- * See validateXml() source for the complete list of allowed fields
- *
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- * @param string file contents
- * @param string the eventual final file location (informational only)
- * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail
- * (use $this->throwError), otherwise return the new contents
- */
- public function startSession($pkg, $contents, $dest)
- {
- $this->logger->log(3, "replacing all line endings with \\r\\n in $dest");
-
- return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents);
- }
-}
-<?php
-/**
- * <tasks:windowseol> - read/write version
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a10
- */
-/**
- * Base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Task/Windowseol.php';
-/**
- * Abstracts the windowseol task xml.
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a10
- */
-class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol
-{
- function __construct(&$pkg, &$config, &$logger, $fileXml)
- {
- parent::__construct($config, $logger, PEAR_TASK_PACKAGE);
- $this->_contents = $fileXml;
- $this->_pkg = &$pkg;
- $this->_params = array();
- }
-
- public function validate()
- {
- return true;
- }
-
- public function getName()
- {
- return 'windowseol';
- }
-
- public function getXml()
- {
- return '';
- }
-}
-?>
-<?php
-/**
- * PEAR_Validate
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-/**#@+
- * Constants for install stage
- */
-define('PEAR_VALIDATE_INSTALLING', 1);
-define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others
-define('PEAR_VALIDATE_NORMAL', 3);
-define('PEAR_VALIDATE_DOWNLOADING', 4); // this is not bit-mapped like the others
-define('PEAR_VALIDATE_PACKAGING', 7);
-/**#@-*/
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Common.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validator/PECL.php';
-
-/**
- * Validation class for package.xml - channel-level advanced validation
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_Validate
-{
- var $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG;
- /**
- * @var PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- var $_packagexml;
- /**
- * @var int one of the PEAR_VALIDATE_* constants
- */
- var $_state = PEAR_VALIDATE_NORMAL;
- /**
- * Format: ('error' => array('field' => name, 'reason' => reason), 'warning' => same)
- * @var array
- * @access private
- */
- var $_failures = array('error' => array(), 'warning' => array());
-
- /**
- * Override this method to handle validation of normal package names
- * @param string
- * @return bool
- * @access protected
- */
- function _validPackageName($name)
- {
- return (bool) preg_match('/^' . $this->packageregex . '\\z/', $name);
- }
-
- /**
- * @param string package name to validate
- * @param string name of channel-specific validation package
- * @final
- */
- function validPackageName($name, $validatepackagename = false)
- {
- if ($validatepackagename) {
- if (strtolower($name) == strtolower($validatepackagename)) {
- return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*\\z/', $name);
- }
- }
- return $this->_validPackageName($name);
- }
-
- /**
- * This validates a bundle name, and bundle names must conform
- * to the PEAR naming convention, so the method is final and static.
- * @param string
- * @final
- * @static
- */
- function validGroupName($name)
- {
- return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name);
- }
-
- /**
- * Determine whether $state represents a valid stability level
- * @param string
- * @return bool
- * @static
- * @final
- */
- function validState($state)
- {
- return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable'));
- }
-
- /**
- * Get a list of valid stability levels
- * @return array
- * @static
- * @final
- */
- function getValidStates()
- {
- return array('snapshot', 'devel', 'alpha', 'beta', 'stable');
- }
-
- /**
- * Determine whether a version is a properly formatted version number that can be used
- * by version_compare
- * @param string
- * @return bool
- * @static
- * @final
- */
- function validVersion($ver)
- {
- return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver);
- }
-
- /**
- * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2
- */
- function setPackageFile(&$pf)
- {
- $this->_packagexml = &$pf;
- }
-
- /**
- * @access private
- */
- function _addFailure($field, $reason)
- {
- $this->_failures['errors'][] = array('field' => $field, 'reason' => $reason);
- }
-
- /**
- * @access private
- */
- function _addWarning($field, $reason)
- {
- $this->_failures['warnings'][] = array('field' => $field, 'reason' => $reason);
- }
-
- function getFailures()
- {
- $failures = $this->_failures;
- $this->_failures = array('warnings' => array(), 'errors' => array());
- return $failures;
- }
-
- /**
- * @param int one of the PEAR_VALIDATE_* constants
- */
- function validate($state = null)
- {
- if (!isset($this->_packagexml)) {
- return false;
- }
- if ($state !== null) {
- $this->_state = $state;
- }
- $this->_failures = array('warnings' => array(), 'errors' => array());
- $this->validatePackageName();
- $this->validateVersion();
- $this->validateMaintainers();
- $this->validateDate();
- $this->validateSummary();
- $this->validateDescription();
- $this->validateLicense();
- $this->validateNotes();
- if ($this->_packagexml->getPackagexmlVersion() == '1.0') {
- $this->validateState();
- $this->validateFilelist();
- } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0' ||
- $this->_packagexml->getPackagexmlVersion() == '2.1') {
- $this->validateTime();
- $this->validateStability();
- $this->validateDeps();
- $this->validateMainFilelist();
- $this->validateReleaseFilelist();
- //$this->validateGlobalTasks();
- $this->validateChangelog();
- }
- return !((bool) count($this->_failures['errors']));
- }
-
- /**
- * @access protected
- */
- function validatePackageName()
- {
- if ($this->_state == PEAR_VALIDATE_PACKAGING ||
- $this->_state == PEAR_VALIDATE_NORMAL) {
- if (($this->_packagexml->getPackagexmlVersion() == '2.0' ||
- $this->_packagexml->getPackagexmlVersion() == '2.1') &&
- $this->_packagexml->getExtends()) {
- $version = $this->_packagexml->getVersion() . '';
- $name = $this->_packagexml->getPackage();
- $test = array_shift($a = explode('.', $version));
- if ($test == '0') {
- return true;
- }
- $vlen = strlen($test);
- $majver = substr($name, strlen($name) - $vlen);
- while ($majver && !is_numeric($majver{0})) {
- $majver = substr($majver, 1);
- }
- if ($majver != $test) {
- $this->_addWarning('package', "package $name extends package " .
- $this->_packagexml->getExtends() . ' and so the name should ' .
- 'have a postfix equal to the major version like "' .
- $this->_packagexml->getExtends() . $test . '"');
- return true;
- } elseif (substr($name, 0, strlen($name) - $vlen) !=
- $this->_packagexml->getExtends()) {
- $this->_addWarning('package', "package $name extends package " .
- $this->_packagexml->getExtends() . ' and so the name must ' .
- 'be an extension like "' . $this->_packagexml->getExtends() .
- $test . '"');
- return true;
- }
- }
- }
- if (!$this->validPackageName($this->_packagexml->getPackage())) {
- $this->_addFailure('name', 'package name "' .
- $this->_packagexml->getPackage() . '" is invalid');
- return false;
- }
- }
-
- /**
- * @access protected
- */
- function validateVersion()
- {
- if ($this->_state != PEAR_VALIDATE_PACKAGING) {
- if (!$this->validVersion($this->_packagexml->getVersion())) {
- $this->_addFailure('version',
- 'Invalid version number "' . $this->_packagexml->getVersion() . '"');
- }
- return false;
- }
- $version = $this->_packagexml->getVersion();
- $versioncomponents = explode('.', $version);
- if (count($versioncomponents) != 3) {
- $this->_addWarning('version',
- 'A version number should have 3 decimals (x.y.z)');
- return true;
- }
- $name = $this->_packagexml->getPackage();
- // version must be based upon state
- switch ($this->_packagexml->getState()) {
- case 'snapshot' :
- return true;
- case 'devel' :
- if ($versioncomponents[0] . 'a' == '0a') {
- return true;
- }
- if ($versioncomponents[0] == 0) {
- $versioncomponents[0] = '0';
- $this->_addWarning('version',
- 'version "' . $version . '" should be "' .
- implode('.' ,$versioncomponents) . '"');
- } else {
- $this->_addWarning('version',
- 'packages with devel stability must be < version 1.0.0');
- }
- return true;
- break;
- case 'alpha' :
- case 'beta' :
- // check for a package that extends a package,
- // like Foo and Foo2
- if ($this->_state == PEAR_VALIDATE_PACKAGING) {
- if (substr($versioncomponents[2], 1, 2) == 'rc') {
- $this->_addFailure('version', 'Release Candidate versions ' .
- 'must have capital RC, not lower-case rc');
- return false;
- }
- }
- if (!$this->_packagexml->getExtends()) {
- if ($versioncomponents[0] == '1') {
- if ($versioncomponents[2]{0} == '0') {
- if ($versioncomponents[2] == '0') {
- // version 1.*.0000
- $this->_addWarning('version',
- 'version 1.' . $versioncomponents[1] .
- '.0 probably should not be alpha or beta');
- return true;
- } elseif (strlen($versioncomponents[2]) > 1) {
- // version 1.*.0RC1 or 1.*.0beta24 etc.
- return true;
- } else {
- // version 1.*.0
- $this->_addWarning('version',
- 'version 1.' . $versioncomponents[1] .
- '.0 probably should not be alpha or beta');
- return true;
- }
- } else {
- $this->_addWarning('version',
- 'bugfix versions (1.3.x where x > 0) probably should ' .
- 'not be alpha or beta');
- return true;
- }
- } elseif ($versioncomponents[0] != '0') {
- $this->_addWarning('version',
- 'major versions greater than 1 are not allowed for packages ' .
- 'without an <extends> tag or an identical postfix (foo2 v2.0.0)');
- return true;
- }
- if ($versioncomponents[0] . 'a' == '0a') {
- return true;
- }
- if ($versioncomponents[0] == 0) {
- $versioncomponents[0] = '0';
- $this->_addWarning('version',
- 'version "' . $version . '" should be "' .
- implode('.' ,$versioncomponents) . '"');
- }
- } else {
- $vlen = strlen($versioncomponents[0] . '');
- $majver = substr($name, strlen($name) - $vlen);
- while ($majver && !is_numeric($majver{0})) {
- $majver = substr($majver, 1);
- }
- if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) {
- $this->_addWarning('version', 'first version number "' .
- $versioncomponents[0] . '" must match the postfix of ' .
- 'package name "' . $name . '" (' .
- $majver . ')');
- return true;
- }
- if ($versioncomponents[0] == $majver) {
- if ($versioncomponents[2]{0} == '0') {
- if ($versioncomponents[2] == '0') {
- // version 2.*.0000
- $this->_addWarning('version',
- "version $majver." . $versioncomponents[1] .
- '.0 probably should not be alpha or beta');
- return false;
- } elseif (strlen($versioncomponents[2]) > 1) {
- // version 2.*.0RC1 or 2.*.0beta24 etc.
- return true;
- } else {
- // version 2.*.0
- $this->_addWarning('version',
- "version $majver." . $versioncomponents[1] .
- '.0 cannot be alpha or beta');
- return true;
- }
- } else {
- $this->_addWarning('version',
- "bugfix versions ($majver.x.y where y > 0) should " .
- 'not be alpha or beta');
- return true;
- }
- } elseif ($versioncomponents[0] != '0') {
- $this->_addWarning('version',
- "only versions 0.x.y and $majver.x.y are allowed for alpha/beta releases");
- return true;
- }
- if ($versioncomponents[0] . 'a' == '0a') {
- return true;
- }
- if ($versioncomponents[0] == 0) {
- $versioncomponents[0] = '0';
- $this->_addWarning('version',
- 'version "' . $version . '" should be "' .
- implode('.' ,$versioncomponents) . '"');
- }
- }
- return true;
- break;
- case 'stable' :
- if ($versioncomponents[0] == '0') {
- $this->_addWarning('version', 'versions less than 1.0.0 cannot ' .
- 'be stable');
- return true;
- }
- if (!is_numeric($versioncomponents[2])) {
- if (preg_match('/\d+(rc|a|alpha|b|beta)\d*/i',
- $versioncomponents[2])) {
- $this->_addWarning('version', 'version "' . $version . '" or any ' .
- 'RC/beta/alpha version cannot be stable');
- return true;
- }
- }
- // check for a package that extends a package,
- // like Foo and Foo2
- if ($this->_packagexml->getExtends()) {
- $vlen = strlen($versioncomponents[0] . '');
- $majver = substr($name, strlen($name) - $vlen);
- while ($majver && !is_numeric($majver{0})) {
- $majver = substr($majver, 1);
- }
- if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) {
- $this->_addWarning('version', 'first version number "' .
- $versioncomponents[0] . '" must match the postfix of ' .
- 'package name "' . $name . '" (' .
- $majver . ')');
- return true;
- }
- } elseif ($versioncomponents[0] > 1) {
- $this->_addWarning('version', 'major version x in x.y.z may not be greater than ' .
- '1 for any package that does not have an <extends> tag');
- }
- return true;
- break;
- default :
- return false;
- break;
- }
- }
-
- /**
- * @access protected
- */
- function validateMaintainers()
- {
- // maintainers can only be truly validated server-side for most channels
- // but allow this customization for those who wish it
- return true;
- }
-
- /**
- * @access protected
- */
- function validateDate()
- {
- if ($this->_state == PEAR_VALIDATE_NORMAL ||
- $this->_state == PEAR_VALIDATE_PACKAGING) {
-
- if (!preg_match('/(\d\d\d\d)\-(\d\d)\-(\d\d)/',
- $this->_packagexml->getDate(), $res) ||
- count($res) < 4
- || !checkdate($res[2], $res[3], $res[1])
- ) {
- $this->_addFailure('date', 'invalid release date "' .
- $this->_packagexml->getDate() . '"');
- return false;
- }
-
- if ($this->_state == PEAR_VALIDATE_PACKAGING &&
- $this->_packagexml->getDate() != date('Y-m-d')) {
- $this->_addWarning('date', 'Release Date "' .
- $this->_packagexml->getDate() . '" is not today');
- }
- }
- return true;
- }
-
- /**
- * @access protected
- */
- function validateTime()
- {
- if (!$this->_packagexml->getTime()) {
- // default of no time value set
- return true;
- }
-
- // packager automatically sets time, so only validate if pear validate is called
- if ($this->_state = PEAR_VALIDATE_NORMAL) {
- if (!preg_match('/\d\d:\d\d:\d\d/',
- $this->_packagexml->getTime())) {
- $this->_addFailure('time', 'invalid release time "' .
- $this->_packagexml->getTime() . '"');
- return false;
- }
-
- $result = preg_match('|\d{2}\:\d{2}\:\d{2}|', $this->_packagexml->getTime(), $matches);
- if ($result === false || empty($matches)) {
- $this->_addFailure('time', 'invalid release time "' .
- $this->_packagexml->getTime() . '"');
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * @access protected
- */
- function validateState()
- {
- // this is the closest to "final" php4 can get
- if (!PEAR_Validate::validState($this->_packagexml->getState())) {
- if (strtolower($this->_packagexml->getState() == 'rc')) {
- $this->_addFailure('state', 'RC is not a state, it is a version ' .
- 'postfix, use ' . $this->_packagexml->getVersion() . 'RC1, state beta');
- }
- $this->_addFailure('state', 'invalid release state "' .
- $this->_packagexml->getState() . '", must be one of: ' .
- implode(', ', PEAR_Validate::getValidStates()));
- return false;
- }
- return true;
- }
-
- /**
- * @access protected
- */
- function validateStability()
- {
- $ret = true;
- $packagestability = $this->_packagexml->getState();
- $apistability = $this->_packagexml->getState('api');
- if (!PEAR_Validate::validState($packagestability)) {
- $this->_addFailure('state', 'invalid release stability "' .
- $this->_packagexml->getState() . '", must be one of: ' .
- implode(', ', PEAR_Validate::getValidStates()));
- $ret = false;
- }
- $apistates = PEAR_Validate::getValidStates();
- array_shift($apistates); // snapshot is not allowed
- if (!in_array($apistability, $apistates)) {
- $this->_addFailure('state', 'invalid API stability "' .
- $this->_packagexml->getState('api') . '", must be one of: ' .
- implode(', ', $apistates));
- $ret = false;
- }
- return $ret;
- }
-
- /**
- * @access protected
- */
- function validateSummary()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateDescription()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateLicense()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateNotes()
- {
- return true;
- }
-
- /**
- * for package.xml 2.0 only - channels can't use package.xml 1.0
- * @access protected
- */
- function validateDependencies()
- {
- return true;
- }
-
- /**
- * for package.xml 1.0 only
- * @access private
- */
- function _validateFilelist()
- {
- return true; // placeholder for now
- }
-
- /**
- * for package.xml 2.0 only
- * @access protected
- */
- function validateMainFilelist()
- {
- return true; // placeholder for now
- }
-
- /**
- * for package.xml 2.0 only
- * @access protected
- */
- function validateReleaseFilelist()
- {
- return true; // placeholder for now
- }
-
- /**
- * @access protected
- */
- function validateChangelog()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateFilelist()
- {
- return true;
- }
-
- /**
- * @access protected
- */
- function validateDeps()
- {
- return true;
- }
-}<?php
-/**
- * Channel Validator for the pecl.php.net channel
- *
- * PHP 4 and PHP 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2006 The PHP Group
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a5
- */
-/**
- * This is the parent class for all validators
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR/Validate.php';
-/**
- * Channel Validator for the pecl.php.net channel
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a5
- */
-class PEAR_Validator_PECL extends PEAR_Validate
-{
- function validateVersion()
- {
- if ($this->_state == PEAR_VALIDATE_PACKAGING) {
- $version = $this->_packagexml->getVersion();
- $versioncomponents = explode('.', $version);
- $last = array_pop($versioncomponents);
- if (substr($last, 1, 2) == 'rc') {
- $this->_addFailure('version', 'Release Candidate versions must have ' .
- 'upper-case RC, not lower-case rc');
- return false;
- }
- }
- return true;
- }
-
- function validatePackageName()
- {
- $ret = parent::validatePackageName();
- if ($this->_packagexml->getPackageType() == 'extsrc' ||
- $this->_packagexml->getPackageType() == 'zendextsrc') {
- if (strtolower($this->_packagexml->getPackage()) !=
- strtolower($this->_packagexml->getProvidesExtension())) {
- $this->_addWarning('providesextension', 'package name "' .
- $this->_packagexml->getPackage() . '" is different from extension name "' .
- $this->_packagexml->getProvidesExtension() . '"');
- }
- }
- return $ret;
- }
-}
-?><?php
-/**
- * PEAR_XMLParser
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 1.4.0a1
- */
-
-/**
- * Parser for any xml file
- * @category pear
- * @package PEAR
- * @author Greg Beaver <cellog@php.net>
- * @author Stephan Schmidt (original XML_Unserializer code)
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.9.5
- * @link http://pear.php.net/package/PEAR
- * @since Class available since Release 1.4.0a1
- */
-class PEAR_XMLParser
-{
- /**
- * unserilialized data
- * @var string $_serializedData
- */
- var $_unserializedData = null;
-
- /**
- * name of the root tag
- * @var string $_root
- */
- var $_root = null;
-
- /**
- * stack for all data that is found
- * @var array $_dataStack
- */
- var $_dataStack = array();
-
- /**
- * stack for all values that are generated
- * @var array $_valStack
- */
- var $_valStack = array();
-
- /**
- * current tag depth
- * @var int $_depth
- */
- var $_depth = 0;
-
- /**
- * The XML encoding to use
- * @var string $encoding
- */
- var $encoding = 'ISO-8859-1';
-
- /**
- * @return array
- */
- function getData()
- {
- return $this->_unserializedData;
- }
-
- /**
- * @param string xml content
- * @return true|PEAR_Error
- */
- function parse($data)
- {
- if (!extension_loaded('xml')) {
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
- return PEAR::raiseError("XML Extension not found", 1);
- }
- $this->_dataStack = $this->_valStack = array();
- $this->_depth = 0;
-
- if (
- strpos($data, 'encoding="UTF-8"')
- || strpos($data, 'encoding="utf-8"')
- || strpos($data, "encoding='UTF-8'")
- || strpos($data, "encoding='utf-8'")
- ) {
- $this->encoding = 'UTF-8';
- }
-
- $xp = xml_parser_create($this->encoding);
- xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0);
- xml_set_object($xp, $this);
- xml_set_element_handler($xp, 'startHandler', 'endHandler');
- xml_set_character_data_handler($xp, 'cdataHandler');
- if (!xml_parse($xp, $data)) {
- $msg = xml_error_string(xml_get_error_code($xp));
- $line = xml_get_current_line_number($xp);
- xml_parser_free($xp);
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
- return PEAR::raiseError("XML Error: '$msg' on line '$line'", 2);
- }
- xml_parser_free($xp);
- return true;
- }
-
- /**
- * Start element handler for XML parser
- *
- * @access private
- * @param object $parser XML parser object
- * @param string $element XML element
- * @param array $attribs attributes of XML tag
- * @return void
- */
- function startHandler($parser, $element, $attribs)
- {
- $this->_depth++;
- $this->_dataStack[$this->_depth] = null;
-
- $val = array(
- 'name' => $element,
- 'value' => null,
- 'type' => 'string',
- 'childrenKeys' => array(),
- 'aggregKeys' => array()
- );
-
- if (count($attribs) > 0) {
- $val['children'] = array();
- $val['type'] = 'array';
- $val['children']['attribs'] = $attribs;
- }
-
- array_push($this->_valStack, $val);
- }
-
- /**
- * post-process data
- *
- * @param string $data
- * @param string $element element name
- */
- function postProcess($data, $element)
- {
- return trim($data);
- }
-
- /**
- * End element handler for XML parser
- *
- * @access private
- * @param object XML parser object
- * @param string
- * @return void
- */
- function endHandler($parser, $element)
- {
- $value = array_pop($this->_valStack);
- $data = $this->postProcess($this->_dataStack[$this->_depth], $element);
-
- // adjust type of the value
- switch (strtolower($value['type'])) {
- // unserialize an array
- case 'array':
- if ($data !== '') {
- $value['children']['_content'] = $data;
- }
-
- $value['value'] = isset($value['children']) ? $value['children'] : array();
- break;
-
- /*
- * unserialize a null value
- */
- case 'null':
- $data = null;
- break;
-
- /*
- * unserialize any scalar value
- */
- default:
- settype($data, $value['type']);
- $value['value'] = $data;
- break;
- }
-
- $parent = array_pop($this->_valStack);
- if ($parent === null) {
- $this->_unserializedData = &$value['value'];
- $this->_root = &$value['name'];
- return true;
- }
-
- // parent has to be an array
- if (!isset($parent['children']) || !is_array($parent['children'])) {
- $parent['children'] = array();
- if ($parent['type'] != 'array') {
- $parent['type'] = 'array';
- }
- }
-
- if (!empty($value['name'])) {
- // there already has been a tag with this name
- if (in_array($value['name'], $parent['childrenKeys'])) {
- // no aggregate has been created for this tag
- if (!in_array($value['name'], $parent['aggregKeys'])) {
- if (isset($parent['children'][$value['name']])) {
- $parent['children'][$value['name']] = array($parent['children'][$value['name']]);
- } else {
- $parent['children'][$value['name']] = array();
- }
- array_push($parent['aggregKeys'], $value['name']);
- }
- array_push($parent['children'][$value['name']], $value['value']);
- } else {
- $parent['children'][$value['name']] = &$value['value'];
- array_push($parent['childrenKeys'], $value['name']);
- }
- } else {
- array_push($parent['children'],$value['value']);
- }
- array_push($this->_valStack, $parent);
-
- $this->_depth--;
- }
-
- /**
- * Handler for character data
- *
- * @access private
- * @param object XML parser object
- * @param string CDATA
- * @return void
- */
- function cdataHandler($parser, $cdata)
- {
- $this->_dataStack[$this->_depth] .= $cdata;
- }
-}<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * The Graph.php file contains the definition of the Structures_Graph class
- *
- * @package Structures_Graph
- */
-
-/* dependencies {{{ */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Node.php';
-/* }}} */
-
-define('STRUCTURES_GRAPH_ERROR_GENERIC', 100);
-
-/* class Structures_Graph {{{ */
-/**
- * The Structures_Graph class represents a graph data structure.
- *
- * A Graph is a data structure composed by a set of nodes, connected by arcs.
- * Graphs may either be directed or undirected. In a directed graph, arcs are
- * directional, and can be traveled only one way. In an undirected graph, arcs
- * are bidirectional, and can be traveled both ways.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
- */
-/* }}} */
-class Structures_Graph
-{
- /**
- * List of node objects in this graph
- * @access private
- */
- var $_nodes = array();
-
- /**
- * If the graph is directed or not
- * @access private
- */
- var $_directed = false;
-
-
- /**
- * Constructor
- *
- * @param boolean $directed Set to true if the graph is directed.
- * Set to false if it is not directed.
- */
- public function __construct($directed = true)
- {
- $this->_directed = $directed;
- }
-
- /**
- * Old constructor (PHP4-style; kept for BC with extending classes)
- *
- * @param boolean $directed Set to true if the graph is directed.
- * Set to false if it is not directed.
- *
- * @return void
- */
- public function Structures_Graph($directed = true)
- {
- $this->__construct($directed);
- }
-
- /**
- * Return true if a graph is directed
- *
- * @return boolean true if the graph is directed
- */
- public function isDirected()
- {
- return (boolean) $this->_directed;
- }
-
- /**
- * Add a Node to the Graph
- *
- * @param Structures_Graph_Node $newNode The node to be added.
- *
- * @return void
- */
- public function addNode(&$newNode)
- {
- // We only add nodes
- if (!is_a($newNode, 'Structures_Graph_Node')) {
- return Pear::raiseError(
- 'Structures_Graph::addNode received an object that is not'
- . ' a Structures_Graph_Node',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
-
- //Graphs are node *sets*, so duplicates are forbidden.
- // We allow nodes that are exactly equal, but disallow equal references.
- foreach ($this->_nodes as $key => $node) {
- /*
- ZE1 equality operators choke on the recursive cycle introduced
- by the _graph field in the Node object.
- So, we'll check references the hard way
- (change $this->_nodes[$key] and check if the change reflects in
- $node)
- */
- $savedData = $this->_nodes[$key];
- $referenceIsEqualFlag = false;
- $this->_nodes[$key] = true;
- if ($node === true) {
- $this->_nodes[$key] = false;
- if ($node === false) {
- $referenceIsEqualFlag = true;
- }
- }
- $this->_nodes[$key] = $savedData;
- if ($referenceIsEqualFlag) {
- return Pear::raiseError(
- 'Structures_Graph::addNode received an object that is'
- . ' a duplicate for this dataset',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
- }
- $this->_nodes[] =& $newNode;
- $newNode->setGraph($this);
- }
-
- /**
- * Remove a Node from the Graph
- *
- * @param Structures_Graph_Node $node The node to be removed from the graph
- *
- * @return void
- * @todo This is unimplemented
- */
- public function removeNode(&$node)
- {
- }
-
- /**
- * Return the node set, in no particular order.
- * For ordered node sets, use a Graph Manipulator insted.
- *
- * @return array The set of nodes in this graph
- * @see Structures_Graph_Manipulator_TopologicalSorter
- */
- public function &getNodes()
- {
- return $this->_nodes;
- }
-}
-?>
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * This file contains the definition of the Structures_Graph_Manipulator_AcyclicTest graph manipulator.
- *
- * @see Structures_Graph_Manipulator_AcyclicTest
- * @package Structures_Graph
- */
-
-/* dependencies {{{ */
-/** */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-/** */
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph.php';
-/** */
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Node.php';
-/* }}} */
-
-/* class Structures_Graph_Manipulator_AcyclicTest {{{ */
-/**
- * The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator
- * which tests whether a graph contains a cycle.
- *
- * The definition of an acyclic graph used in this manipulator is that of a
- * DAG. The graph must be directed, or else it is considered cyclic, even when
- * there are no arcs.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
- */
-class Structures_Graph_Manipulator_AcyclicTest {
- /* _nonVisitedInDegree {{{ */
- /**
- *
- * This is a variant of Structures_Graph::inDegree which does
- * not count nodes marked as visited.
- *
- * @return integer Number of non-visited nodes that link to this one
- */
- protected static function _nonVisitedInDegree(&$node) {
- $result = 0;
- $graphNodes =& $node->_graph->getNodes();
- foreach (array_keys($graphNodes) as $key) {
- if ((!$graphNodes[$key]->getMetadata('acyclic-test-visited')) && $graphNodes[$key]->connectsTo($node)) $result++;
- }
- return $result;
-
- }
- /* }}} */
-
- /* _isAcyclic {{{ */
- /**
- * Check if the graph is acyclic
- */
- protected static function _isAcyclic(&$graph) {
- // Mark every node as not visited
- $nodes =& $graph->getNodes();
- $nodeKeys = array_keys($nodes);
- $refGenerator = array();
- foreach($nodeKeys as $key) {
- $refGenerator[] = false;
- $nodes[$key]->setMetadata('acyclic-test-visited', $refGenerator[sizeof($refGenerator) - 1]);
- }
-
- // Iteratively peel off leaf nodes
- do {
- // Find out which nodes are leafs (excluding visited nodes)
- $leafNodes = array();
- foreach($nodeKeys as $key) {
- if ((!$nodes[$key]->getMetadata('acyclic-test-visited')) && Structures_Graph_Manipulator_AcyclicTest::_nonVisitedInDegree($nodes[$key]) == 0) {
- $leafNodes[] =& $nodes[$key];
- }
- }
- // Mark leafs as visited
- for ($i=sizeof($leafNodes) - 1; $i>=0; $i--) {
- $visited =& $leafNodes[$i]->getMetadata('acyclic-test-visited');
- $visited = true;
- $leafNodes[$i]->setMetadata('acyclic-test-visited', $visited);
- }
- } while (sizeof($leafNodes) > 0);
-
- // If graph is a DAG, there should be no non-visited nodes. Let's try to prove otherwise
- $result = true;
- foreach($nodeKeys as $key) if (!$nodes[$key]->getMetadata('acyclic-test-visited')) $result = false;
-
- // Cleanup visited marks
- foreach($nodeKeys as $key) $nodes[$key]->unsetMetadata('acyclic-test-visited');
-
- return $result;
- }
- /* }}} */
-
- /* isAcyclic {{{ */
- /**
- *
- * isAcyclic returns true if a graph contains no cycles, false otherwise.
- *
- * @return boolean true iff graph is acyclic
- */
- public static function isAcyclic(&$graph) {
- // We only test graphs
- if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_AcyclicTest::isAcyclic received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- if (!$graph->isDirected()) return false; // Only directed graphs may be acyclic
-
- return Structures_Graph_Manipulator_AcyclicTest::_isAcyclic($graph);
- }
- /* }}} */
-}
-/* }}} */
-?>
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.
- *
- * @package Structures_Graph
- */
-
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Node.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph/Manipulator/AcyclicTest.php';
-
-/**
- * The Structures_Graph_Manipulator_TopologicalSorter is a manipulator
- * which is able to return the set of nodes in a graph, sorted by topological
- * order.
- *
- * A graph may only be sorted topologically iff it's a DAG. You can test it
- * with the Structures_Graph_Manipulator_AcyclicTest.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @see Structures_Graph_Manipulator_AcyclicTest
- * @package Structures_Graph
- */
-class Structures_Graph_Manipulator_TopologicalSorter
-{
- /**
- * This is a variant of Structures_Graph::inDegree which does
- * not count nodes marked as visited.
- *
- * @param object $node Node to check
- *
- * @return integer Number of non-visited nodes that link to this one
- */
- protected static function _nonVisitedInDegree(&$node)
- {
- $result = 0;
- $graphNodes =& $node->_graph->getNodes();
- foreach (array_keys($graphNodes) as $key) {
- if ((!$graphNodes[$key]->getMetadata('topological-sort-visited'))
- && $graphNodes[$key]->connectsTo($node)
- ) {
- $result++;
- }
- }
- return $result;
-
- }
-
- /**
- * Sort implementation
- *
- * @param object $graph Graph to sort
- *
- * @return void
- */
- protected static function _sort(&$graph)
- {
- // Mark every node as not visited
- $nodes =& $graph->getNodes();
- $nodeKeys = array_keys($nodes);
- $refGenerator = array();
- foreach ($nodeKeys as $key) {
- $refGenerator[] = false;
- $nodes[$key]->setMetadata(
- 'topological-sort-visited',
- $refGenerator[sizeof($refGenerator) - 1]
- );
- }
-
- // Iteratively peel off leaf nodes
- $topologicalLevel = 0;
- do {
- // Find out which nodes are leafs (excluding visited nodes)
- $leafNodes = array();
- foreach ($nodeKeys as $key) {
- if ((!$nodes[$key]->getMetadata('topological-sort-visited'))
- && static::_nonVisitedInDegree($nodes[$key]) == 0
- ) {
- $leafNodes[] =& $nodes[$key];
- }
- }
- // Mark leafs as visited
- $refGenerator[] = $topologicalLevel;
- for ($i = sizeof($leafNodes) - 1; $i>=0; $i--) {
- $visited =& $leafNodes[$i]->getMetadata('topological-sort-visited');
- $visited = true;
- $leafNodes[$i]->setMetadata('topological-sort-visited', $visited);
- $leafNodes[$i]->setMetadata(
- 'topological-sort-level',
- $refGenerator[sizeof($refGenerator) - 1]
- );
- }
- $topologicalLevel++;
- } while (sizeof($leafNodes) > 0);
-
- // Cleanup visited marks
- foreach ($nodeKeys as $key) {
- $nodes[$key]->unsetMetadata('topological-sort-visited');
- }
- }
-
- /**
- * Sort returns the graph's nodes, sorted by topological order.
- *
- * The result is an array with as many entries as topological levels.
- * Each entry in this array is an array of nodes within
- * the given topological level.
- *
- * @param object $graph Graph to sort
- *
- * @return array The graph's nodes, sorted by topological order.
- */
- public static function sort(&$graph)
- {
- // We only sort graphs
- if (!is_a($graph, 'Structures_Graph')) {
- return Pear::raiseError(
- 'Structures_Graph_Manipulator_TopologicalSorter::sort received'
- . ' an object that is not a Structures_Graph',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
- if (!Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph)) {
- return Pear::raiseError(
- 'Structures_Graph_Manipulator_TopologicalSorter::sort'
- . ' received an graph that has cycles',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
-
- Structures_Graph_Manipulator_TopologicalSorter::_sort($graph);
- $result = array();
-
- // Fill out result array
- $nodes =& $graph->getNodes();
- $nodeKeys = array_keys($nodes);
- foreach ($nodeKeys as $key) {
- if (!array_key_exists($nodes[$key]->getMetadata('topological-sort-level'), $result)) {
- $result[$nodes[$key]->getMetadata('topological-sort-level')]
- = array();
- }
- $result[$nodes[$key]->getMetadata('topological-sort-level')][]
- =& $nodes[$key];
- $nodes[$key]->unsetMetadata('topological-sort-level');
- }
-
- return $result;
- }
-}
-?>
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * This file contains the definition of the Structures_Graph_Node class
- *
- * @see Structures_Graph_Node
- * @package Structures_Graph
- */
-
-/* dependencies {{{ */
-/** */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-/** */
-require_once 'phar://install-pear-nozlib.phar/' . 'Structures/Graph.php';
-/* }}} */
-
-/* class Structures_Graph_Node {{{ */
-/**
- * The Structures_Graph_Node class represents a Node that can be member of a
- * graph node set.
- *
- * A graph node can contain data. Under this API, the node contains default data,
- * and key index data. It behaves, thus, both as a regular data node, and as a
- * dictionary (or associative array) node.
- *
- * Regular data is accessed via getData and setData. Key indexed data is accessed
- * via getMetadata and setMetadata.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
- */
-/* }}} */
-class Structures_Graph_Node {
- /* fields {{{ */
- /**
- * @access private
- */
- var $_data = null;
- /** @access private */
- var $_metadata = array();
- /** @access private */
- var $_arcs = array();
- /** @access private */
- var $_graph = null;
- /* }}} */
-
- /* Constructor {{{ */
- /**
- *
- * Constructor
- *
- * @access public
- */
- function Structures_Graph_Node() {
- }
- /* }}} */
-
- /* getGraph {{{ */
- /**
- *
- * Node graph getter
- *
- * @return Structures_Graph Graph where node is stored
- * @access public
- */
- function &getGraph() {
- return $this->_graph;
- }
- /* }}} */
-
- /* setGraph {{{ */
- /**
- *
- * Node graph setter. This method should not be called directly. Use Graph::addNode instead.
- *
- * @param Structures_Graph Set the graph for this node.
- * @see Structures_Graph::addNode()
- * @access public
- */
- function setGraph(&$graph) {
- $this->_graph =& $graph;
- }
- /* }}} */
-
- /* getData {{{ */
- /**
- *
- * Node data getter.
- *
- * Each graph node can contain a reference to one variable. This is the getter for that reference.
- *
- * @return mixed Data stored in node
- * @access public
- */
- function &getData() {
- return $this->_data;
- }
- /* }}} */
-
- /* setData {{{ */
- /**
- *
- * Node data setter
- *
- * Each graph node can contain a reference to one variable. This is the setter for that reference.
- *
- * @return mixed Data to store in node
- * @access public
- */
- function setData(&$data) {
- $this->_data =& $data;
- }
- /* }}} */
-
- /* metadataKeyExists {{{ */
- /**
- *
- * Test for existence of metadata under a given key.
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method tests whether a given metadata key exists for this node.
- *
- * @param string Key to test
- * @return boolean
- * @access public
- */
- function metadataKeyExists($key) {
- return array_key_exists($key, $this->_metadata);
- }
- /* }}} */
-
- /* getMetadata {{{ */
- /**
- *
- * Node metadata getter
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method gets the data under the given key. If the key does
- * not exist, an error will be thrown, so testing using metadataKeyExists might be needed.
- *
- * @param string Key
- * @param boolean nullIfNonexistent (defaults to false).
- * @return mixed Metadata Data stored in node under given key
- * @see metadataKeyExists
- * @access public
- */
- function &getMetadata($key, $nullIfNonexistent = false) {
- if (array_key_exists($key, $this->_metadata)) {
- return $this->_metadata[$key];
- } else {
- if ($nullIfNonexistent) {
- $a = null;
- return $a;
- } else {
- $a = Pear::raiseError('Structures_Graph_Node::getMetadata: Requested key does not exist', STRUCTURES_GRAPH_ERROR_GENERIC);
- return $a;
- }
- }
- }
- /* }}} */
-
- /* unsetMetadata {{{ */
- /**
- *
- * Delete metadata by key
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method removes any data that might be stored under the provided key.
- * If the key does not exist, no error is thrown, so it is safe using this method without testing for key existence.
- *
- * @param string Key
- * @access public
- */
- function unsetMetadata($key) {
- if (array_key_exists($key, $this->_metadata)) unset($this->_metadata[$key]);
- }
- /* }}} */
-
- /* setMetadata {{{ */
- /**
- *
- * Node metadata setter
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method stores data under the given key. If the key already exists,
- * previously stored data is discarded.
- *
- * @param string Key
- * @param mixed Data
- * @access public
- */
- function setMetadata($key, &$data) {
- $this->_metadata[$key] =& $data;
- }
- /* }}} */
-
- /* _connectTo {{{ */
- /** @access private */
- function _connectTo(&$destinationNode) {
- $this->_arcs[] =& $destinationNode;
- }
- /* }}} */
-
- /* connectTo {{{ */
- /**
- *
- * Connect this node to another one.
- *
- * If the graph is not directed, the reverse arc, connecting $destinationNode to $this is also created.
- *
- * @param Structures_Graph_Node Node to connect to
- * @access public
- */
- function connectTo(&$destinationNode) {
- // We only connect to nodes
- if (!is_a($destinationNode, 'Structures_Graph_Node')) return Pear::raiseError('Structures_Graph_Node::connectTo received an object that is not a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC);
- // Nodes must already be in graphs to be connected
- if ($this->_graph == null) return Pear::raiseError('Structures_Graph_Node::connectTo Tried to connect a node that is not in a graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- if ($destinationNode->getGraph() == null) return Pear::raiseError('Structures_Graph_Node::connectTo Tried to connect to a node that is not in a graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- // Connect here
- $this->_connectTo($destinationNode);
- // If graph is undirected, connect back
- if (!$this->_graph->isDirected()) {
- $destinationNode->_connectTo($this);
- }
- }
- /* }}} */
-
- /* getNeighbours {{{ */
- /**
- *
- * Return nodes connected to this one.
- *
- * @return array Array of nodes
- * @access public
- */
- function getNeighbours() {
- return $this->_arcs;
- }
- /* }}} */
-
- /* connectsTo {{{ */
- /**
- *
- * Test wether this node has an arc to the target node
- *
- * @return boolean True if the two nodes are connected
- * @access public
- */
- function connectsTo(&$target) {
- if (version_compare(PHP_VERSION, '5.0.0') >= 0) {
- return in_array($target, $this->getNeighbours(), true);
- }
-
- $copy = $target;
- $arcKeys = array_keys($this->_arcs);
- foreach($arcKeys as $key) {
- /* ZE1 chokes on this expression:
- if ($target === $arc) return true;
- so, we'll use more convoluted stuff
- */
- $arc =& $this->_arcs[$key];
- $target = true;
- if ($arc === true) {
- $target = false;
- if ($arc === false) {
- $target = $copy;
- return true;
- }
- }
- }
- $target = $copy;
- return false;
- }
- /* }}} */
-
- /* inDegree {{{ */
- /**
- *
- * Calculate the in degree of the node.
- *
- * The indegree for a node is the number of arcs entering the node. For non directed graphs,
- * the indegree is equal to the outdegree.
- *
- * @return integer In degree of the node
- * @access public
- */
- function inDegree() {
- if ($this->_graph == null) return 0;
- if (!$this->_graph->isDirected()) return $this->outDegree();
- $result = 0;
- $graphNodes =& $this->_graph->getNodes();
- foreach (array_keys($graphNodes) as $key) {
- if ($graphNodes[$key]->connectsTo($this)) $result++;
- }
- return $result;
-
- }
- /* }}} */
-
- /* outDegree {{{ */
- /**
- *
- * Calculate the out degree of the node.
- *
- * The outdegree for a node is the number of arcs exiting the node. For non directed graphs,
- * the outdegree is always equal to the indegree.
- *
- * @return integer Out degree of the node
- * @access public
- */
- function outDegree() {
- if ($this->_graph == null) return 0;
- return sizeof($this->_arcs);
- }
- /* }}} */
-}
-?>
-package.xml
-<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Structures_Graph</name>
- <channel>pear.php.net</channel>
- <summary>Graph datastructure manipulation library</summary>
- <description>Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed
-and undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing
-as well as for characteristic extraction from the graph topology.</description>
- <lead>
- <name>Sérgio Carvalho</name>
- <user>sergiosgc</user>
- <email>sergio.carvalho@portugalmail.com</email>
- <active>yes</active>
- </lead>
- <helper>
- <name>Brett Bieber</name>
- <user>saltybeagle</user>
- <email>brett.bieber@gmail.com</email>
- <active>yes</active>
- </helper>
- <date>2015-02-26</date>
- <time>23:13:49</time>
- <version>
- <release>1.1.0</release>
- <api>1.1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license>LGPL-3.0+</license>
- <notes>
-* Set minimum PHP version to 5.3
-* Fix bug #19367: Incorrect FSF address in LICENSE
-* Change license from LGPL-2.1+ to LGPL-3.0+
- </notes>
- <contents>
- <dir baseinstalldir="/" name="/">
- <file baseinstalldir="/" md5sum="628eb6532a8047bf5962fe24c1c245df" name="docs/tutorials/Structures_Graph/Structures_Graph.pkg" role="doc" />
- <file baseinstalldir="/" md5sum="4b26eecd30f8695fc3739b1a5b59518e" name="Structures/Graph/Manipulator/AcyclicTest.php" role="php" />
- <file baseinstalldir="/" md5sum="1f857de1fbbaace54b857ed9712f399f" name="Structures/Graph/Manipulator/TopologicalSorter.php" role="php" />
- <file baseinstalldir="/" md5sum="928df500102eced877e1bda2d67df668" name="Structures/Graph/Node.php" role="php" />
- <file baseinstalldir="/" md5sum="88ae1ad8bcd74d4b74ad845f55611cdd" name="Structures/Graph.php" role="php" />
- <file baseinstalldir="/" md5sum="65e4e85e573833516f5cc1d7a81db9c5" name="tests/AllTests.php" role="test" />
- <file baseinstalldir="/" md5sum="68ba309e2ac6713527f0fd31456457a1" name="tests/BasicGraphTest.php" role="test" />
- <file baseinstalldir="/" md5sum="190fc4634be55cd98608b72bc9d0a27f" name="tests/TopologicalSorterTest.php" role="test" />
- <file baseinstalldir="/" md5sum="4dc0c43f054732ec0f2fc78458ebadde" name="tests/AcyclicTestTest.php" role="test" />
- <file baseinstalldir="/" md5sum="68ba309e2ac6713527f0fd31456457a1" name="tests/BasicGraphTest.php" role="test" />
- <file baseinstalldir="/" md5sum="c891580ee21a7aa863ac32566c979fc5" name="tests/helper.inc" role="test">
- <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
- </file>
- <file baseinstalldir="/" md5sum="b52f2d57d10c4f7ee67a7eb9615d5d24" name="LICENSE" role="doc" />
- </dir>
- </contents>
- <compatible>
- <name>PEAR</name>
- <channel>pear.php.net</channel>
- <min>1.5.0RC3</min>
- <max>1.9.1</max>
- </compatible>
- <dependencies>
- <required>
- <php>
- <min>5.3.0</min>
- </php>
- <pearinstaller>
- <min>1.4.3</min>
- </pearinstaller>
- </required>
- </dependencies>
- <phprelease />
- <changelog>
- <release>
- <version>
- <release>1.0.2</release>
- <api>1.0.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2007-01-07</date>
- <license uri="http://opensource.org/licenses/lgpl-license.php">LGPL</license>
- <notes>
-- Bug #9682 only variables can be returned by reference
-- fix Bug #9661 notice in Structures_Graph_Manipulator_Topological::sort()
- </notes>
- </release>
- <release>
- <version>
- <release>1.0.3</release>
- <api>1.0.3</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2009-10-11</date>
- <license>LGPL License</license>
- <notes>
-Bugfix Release:
-Version 1.0.3 is functionally equivalent to 1.0.2 but with an updated package.xml file.
-* Correct invalid md5 sum preventing installation with pyrus [saltybeagle]
-* Add compatible tag for PEAR 1.5.0RC3-1.9.0 [saltybeagle]
-* Update package.xml
- </notes>
- </release>
- <release>
- <version>
- <release>1.0.4</release>
- <api>1.0.3</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2010-10-25</date>
- <license>LGPL License</license>
- <notes>
-Bugfix Release:
-* Bug #17108 BasicGraph::test_directed_degree fails on PHP 5 [clockwerx]
- </notes>
- </release>
- <release>
- <version>
- <release>1.1.0</release>
- <api>1.1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2015-02-26</date>
- <license>LGPL-3.0+</license>
- <notes>
-* Set minimum PHP version to 5.3
-* Fix bug #19367: Incorrect FSF address in LICENSE
-* Change license from LGPL-2.1+ to LGPL-3.0+
- </notes>
- </release>
- </changelog>
-</package>
-
- <refnamediv>
- <refname><classname>Structures_Graph</classname> Tutorial</refname>
- <refpurpose>A first tour of graph datastructure manipulation</refpurpose>
- </refnamediv>
- <refsect1 id="{@id package.database.structures_graph.tutorial.intro}">
- <title>Introduction</title>
- <para>
- Structures_Graph is a package for creating and manipulating graph datastructures. A graph is a set of objects, called nodes, connected by arcs. When used as a datastructure, usually nodes contain data, and arcs represent relationships between nodes. When arcs have a direction, and can be travelled only one way, graphs are said to be directed. When arcs have no direction, and can always be travelled both ways, graphs are said to be non directed.
- </para>
- <para>
- Structures_Graph provides an object oriented API to create and directly query a graph, as well as a set of Manipulator classes to extract information from the graph.
- </para>
- </refsect1>
- <refsect1 id="{@id package.database.structures_graph.tutorial.creation}">
- <title>Creating a Graph</title>
- <para>
- Creating a graph is done using the simple constructor:
- <programlisting>
- <![CDATA[
-require_once 'Structures/Graph.php';
-
-$directedGraph =& new Structures_Graph(true);
-$nonDirectedGraph =& new Structures_Graph(false);
- ]]>
- </programlisting>
- and passing the constructor a flag telling it whether the graph should be directed. A directed graph will always be directed during its lifetime. It's a permanent characteristic.
- </para>
- <para>
- To fill out the graph, we'll need to create some nodes, and then call Graph::addNode.
- <programlisting>
- <![CDATA[
-require_once 'Structures/Graph/Node.php';
-
-$nodeOne =& new Structures_Graph_Node();
-$nodeTwo =& new Structures_Graph_Node();
-$nodeThree =& new Structures_Graph_Node();
-
-$directedGraph->addNode(&$nodeOne);
-$directedGraph->addNode(&$nodeTwo);
-$directedGraph->addNode(&$nodeThree);
- ]]>
- </programlisting>
- and then setup the arcs:
- <programlisting>
- <![CDATA[
-$nodeOne->connectTo($nodeTwo);
-$nodeOne->connectTo($nodeThree);
- ]]>
- </programlisting>
- Note that arcs can only be created after the nodes have been inserted into the graph.
- </para>
- </refsect1>
- <refsect1 id="{@id package.database.structures_graph.tutorial.nodesanddata}">
- <title>Associating Data</title>
- <para>
- Graphs are only useful as datastructures if they can hold data. Structure_Graph stores data in nodes. Each node contains a setter and a getter for its data.
- <programlisting>
- <![CDATA[
-$nodeOne->setData("Node One's Data is a String");
-$nodeTwo->setData(1976);
-$nodeThree->setData('Some other string');
-
-print("NodeTwo's Data is an integer: " . $nodeTwo->getData());
- ]]>
- </programlisting>
- </para>
- <para>
- Structure_Graph nodes can also store metadata, alongside with the main data. Metadata differs from regular data just because it is stored under a key, making it possible to store more than one data reference per node. The metadata getter and setter need the key to perform the operation:
- <programlisting>
- <![CDATA[
-$nodeOne->setMetadata('example key', "Node One's Sample Metadata");
-print("Metadata stored under key 'example key' in node one: " . $nodeOne->getMetadata('example key'));
-$nodeOne->unsetMetadata('example key');
- ]]>
- </programlisting>
- </para>
- </refsect1>
- <refsect1 id="{@id package.database.structures_graph.tutorial.querying}">
- <title>Querying a Graph</title>
- <para>
- Structures_Graph provides for basic querying of the graph:
- <programlisting>
- <![CDATA[
-// Nodes are able to calculate their indegree and outdegree
-print("NodeOne's inDegree: " . $nodeOne->inDegree());
-print("NodeOne's outDegree: " . $nodeOne->outDegree());
-
-// and naturally, nodes can report on their arcs
-$arcs = $nodeOne->getNeighbours();
-for ($i=0;$i<sizeof($arcs);$i++) {
- print("NodeOne has an arc to " . $arcs[$i]->getData());
-}
- ]]>
- </programlisting>
- </para>
- </refsect1>
-</refentry>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * This file contains the definition of the Structures_Graph_Manipulator_AcyclicTest graph manipulator.
- *
- * @see Structures_Graph_Manipulator_AcyclicTest
- * @package Structures_Graph
- */
-
-/* dependencies {{{ */
-/** */
-require_once 'PEAR.php';
-/** */
-require_once 'Structures/Graph.php';
-/** */
-require_once 'Structures/Graph/Node.php';
-/* }}} */
-
-/* class Structures_Graph_Manipulator_AcyclicTest {{{ */
-/**
- * The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator
- * which tests whether a graph contains a cycle.
- *
- * The definition of an acyclic graph used in this manipulator is that of a
- * DAG. The graph must be directed, or else it is considered cyclic, even when
- * there are no arcs.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
- */
-class Structures_Graph_Manipulator_AcyclicTest {
- /* _nonVisitedInDegree {{{ */
- /**
- *
- * This is a variant of Structures_Graph::inDegree which does
- * not count nodes marked as visited.
- *
- * @return integer Number of non-visited nodes that link to this one
- */
- protected static function _nonVisitedInDegree(&$node) {
- $result = 0;
- $graphNodes =& $node->_graph->getNodes();
- foreach (array_keys($graphNodes) as $key) {
- if ((!$graphNodes[$key]->getMetadata('acyclic-test-visited')) && $graphNodes[$key]->connectsTo($node)) $result++;
- }
- return $result;
-
- }
- /* }}} */
-
- /* _isAcyclic {{{ */
- /**
- * Check if the graph is acyclic
- */
- protected static function _isAcyclic(&$graph) {
- // Mark every node as not visited
- $nodes =& $graph->getNodes();
- $nodeKeys = array_keys($nodes);
- $refGenerator = array();
- foreach($nodeKeys as $key) {
- $refGenerator[] = false;
- $nodes[$key]->setMetadata('acyclic-test-visited', $refGenerator[sizeof($refGenerator) - 1]);
- }
-
- // Iteratively peel off leaf nodes
- do {
- // Find out which nodes are leafs (excluding visited nodes)
- $leafNodes = array();
- foreach($nodeKeys as $key) {
- if ((!$nodes[$key]->getMetadata('acyclic-test-visited')) && Structures_Graph_Manipulator_AcyclicTest::_nonVisitedInDegree($nodes[$key]) == 0) {
- $leafNodes[] =& $nodes[$key];
- }
- }
- // Mark leafs as visited
- for ($i=sizeof($leafNodes) - 1; $i>=0; $i--) {
- $visited =& $leafNodes[$i]->getMetadata('acyclic-test-visited');
- $visited = true;
- $leafNodes[$i]->setMetadata('acyclic-test-visited', $visited);
- }
- } while (sizeof($leafNodes) > 0);
-
- // If graph is a DAG, there should be no non-visited nodes. Let's try to prove otherwise
- $result = true;
- foreach($nodeKeys as $key) if (!$nodes[$key]->getMetadata('acyclic-test-visited')) $result = false;
-
- // Cleanup visited marks
- foreach($nodeKeys as $key) $nodes[$key]->unsetMetadata('acyclic-test-visited');
-
- return $result;
- }
- /* }}} */
-
- /* isAcyclic {{{ */
- /**
- *
- * isAcyclic returns true if a graph contains no cycles, false otherwise.
- *
- * @return boolean true iff graph is acyclic
- */
- public static function isAcyclic(&$graph) {
- // We only test graphs
- if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_AcyclicTest::isAcyclic received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- if (!$graph->isDirected()) return false; // Only directed graphs may be acyclic
-
- return Structures_Graph_Manipulator_AcyclicTest::_isAcyclic($graph);
- }
- /* }}} */
-}
-/* }}} */
-?>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.
- *
- * @package Structures_Graph
- */
-
-require_once 'PEAR.php';
-require_once 'Structures/Graph.php';
-require_once 'Structures/Graph/Node.php';
-require_once 'Structures/Graph/Manipulator/AcyclicTest.php';
-
-/**
- * The Structures_Graph_Manipulator_TopologicalSorter is a manipulator
- * which is able to return the set of nodes in a graph, sorted by topological
- * order.
- *
- * A graph may only be sorted topologically iff it's a DAG. You can test it
- * with the Structures_Graph_Manipulator_AcyclicTest.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @see Structures_Graph_Manipulator_AcyclicTest
- * @package Structures_Graph
- */
-class Structures_Graph_Manipulator_TopologicalSorter
-{
- /**
- * This is a variant of Structures_Graph::inDegree which does
- * not count nodes marked as visited.
- *
- * @param object $node Node to check
- *
- * @return integer Number of non-visited nodes that link to this one
- */
- protected static function _nonVisitedInDegree(&$node)
- {
- $result = 0;
- $graphNodes =& $node->_graph->getNodes();
- foreach (array_keys($graphNodes) as $key) {
- if ((!$graphNodes[$key]->getMetadata('topological-sort-visited'))
- && $graphNodes[$key]->connectsTo($node)
- ) {
- $result++;
- }
- }
- return $result;
-
- }
-
- /**
- * Sort implementation
- *
- * @param object $graph Graph to sort
- *
- * @return void
- */
- protected static function _sort(&$graph)
- {
- // Mark every node as not visited
- $nodes =& $graph->getNodes();
- $nodeKeys = array_keys($nodes);
- $refGenerator = array();
- foreach ($nodeKeys as $key) {
- $refGenerator[] = false;
- $nodes[$key]->setMetadata(
- 'topological-sort-visited',
- $refGenerator[sizeof($refGenerator) - 1]
- );
- }
-
- // Iteratively peel off leaf nodes
- $topologicalLevel = 0;
- do {
- // Find out which nodes are leafs (excluding visited nodes)
- $leafNodes = array();
- foreach ($nodeKeys as $key) {
- if ((!$nodes[$key]->getMetadata('topological-sort-visited'))
- && static::_nonVisitedInDegree($nodes[$key]) == 0
- ) {
- $leafNodes[] =& $nodes[$key];
- }
- }
- // Mark leafs as visited
- $refGenerator[] = $topologicalLevel;
- for ($i = sizeof($leafNodes) - 1; $i>=0; $i--) {
- $visited =& $leafNodes[$i]->getMetadata('topological-sort-visited');
- $visited = true;
- $leafNodes[$i]->setMetadata('topological-sort-visited', $visited);
- $leafNodes[$i]->setMetadata(
- 'topological-sort-level',
- $refGenerator[sizeof($refGenerator) - 1]
- );
- }
- $topologicalLevel++;
- } while (sizeof($leafNodes) > 0);
-
- // Cleanup visited marks
- foreach ($nodeKeys as $key) {
- $nodes[$key]->unsetMetadata('topological-sort-visited');
- }
- }
-
- /**
- * Sort returns the graph's nodes, sorted by topological order.
- *
- * The result is an array with as many entries as topological levels.
- * Each entry in this array is an array of nodes within
- * the given topological level.
- *
- * @param object $graph Graph to sort
- *
- * @return array The graph's nodes, sorted by topological order.
- */
- public static function sort(&$graph)
- {
- // We only sort graphs
- if (!is_a($graph, 'Structures_Graph')) {
- return Pear::raiseError(
- 'Structures_Graph_Manipulator_TopologicalSorter::sort received'
- . ' an object that is not a Structures_Graph',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
- if (!Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph)) {
- return Pear::raiseError(
- 'Structures_Graph_Manipulator_TopologicalSorter::sort'
- . ' received an graph that has cycles',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
-
- Structures_Graph_Manipulator_TopologicalSorter::_sort($graph);
- $result = array();
-
- // Fill out result array
- $nodes =& $graph->getNodes();
- $nodeKeys = array_keys($nodes);
- foreach ($nodeKeys as $key) {
- if (!array_key_exists($nodes[$key]->getMetadata('topological-sort-level'), $result)) {
- $result[$nodes[$key]->getMetadata('topological-sort-level')]
- = array();
- }
- $result[$nodes[$key]->getMetadata('topological-sort-level')][]
- =& $nodes[$key];
- $nodes[$key]->unsetMetadata('topological-sort-level');
- }
-
- return $result;
- }
-}
-?>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * This file contains the definition of the Structures_Graph_Node class
- *
- * @see Structures_Graph_Node
- * @package Structures_Graph
- */
-
-/* dependencies {{{ */
-/** */
-require_once 'PEAR.php';
-/** */
-require_once 'Structures/Graph.php';
-/* }}} */
-
-/* class Structures_Graph_Node {{{ */
-/**
- * The Structures_Graph_Node class represents a Node that can be member of a
- * graph node set.
- *
- * A graph node can contain data. Under this API, the node contains default data,
- * and key index data. It behaves, thus, both as a regular data node, and as a
- * dictionary (or associative array) node.
- *
- * Regular data is accessed via getData and setData. Key indexed data is accessed
- * via getMetadata and setMetadata.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
- */
-/* }}} */
-class Structures_Graph_Node {
- /* fields {{{ */
- /**
- * @access private
- */
- var $_data = null;
- /** @access private */
- var $_metadata = array();
- /** @access private */
- var $_arcs = array();
- /** @access private */
- var $_graph = null;
- /* }}} */
-
- /* Constructor {{{ */
- /**
- *
- * Constructor
- *
- * @access public
- */
- function Structures_Graph_Node() {
- }
- /* }}} */
-
- /* getGraph {{{ */
- /**
- *
- * Node graph getter
- *
- * @return Structures_Graph Graph where node is stored
- * @access public
- */
- function &getGraph() {
- return $this->_graph;
- }
- /* }}} */
-
- /* setGraph {{{ */
- /**
- *
- * Node graph setter. This method should not be called directly. Use Graph::addNode instead.
- *
- * @param Structures_Graph Set the graph for this node.
- * @see Structures_Graph::addNode()
- * @access public
- */
- function setGraph(&$graph) {
- $this->_graph =& $graph;
- }
- /* }}} */
-
- /* getData {{{ */
- /**
- *
- * Node data getter.
- *
- * Each graph node can contain a reference to one variable. This is the getter for that reference.
- *
- * @return mixed Data stored in node
- * @access public
- */
- function &getData() {
- return $this->_data;
- }
- /* }}} */
-
- /* setData {{{ */
- /**
- *
- * Node data setter
- *
- * Each graph node can contain a reference to one variable. This is the setter for that reference.
- *
- * @return mixed Data to store in node
- * @access public
- */
- function setData(&$data) {
- $this->_data =& $data;
- }
- /* }}} */
-
- /* metadataKeyExists {{{ */
- /**
- *
- * Test for existence of metadata under a given key.
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method tests whether a given metadata key exists for this node.
- *
- * @param string Key to test
- * @return boolean
- * @access public
- */
- function metadataKeyExists($key) {
- return array_key_exists($key, $this->_metadata);
- }
- /* }}} */
-
- /* getMetadata {{{ */
- /**
- *
- * Node metadata getter
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method gets the data under the given key. If the key does
- * not exist, an error will be thrown, so testing using metadataKeyExists might be needed.
- *
- * @param string Key
- * @param boolean nullIfNonexistent (defaults to false).
- * @return mixed Metadata Data stored in node under given key
- * @see metadataKeyExists
- * @access public
- */
- function &getMetadata($key, $nullIfNonexistent = false) {
- if (array_key_exists($key, $this->_metadata)) {
- return $this->_metadata[$key];
- } else {
- if ($nullIfNonexistent) {
- $a = null;
- return $a;
- } else {
- $a = Pear::raiseError('Structures_Graph_Node::getMetadata: Requested key does not exist', STRUCTURES_GRAPH_ERROR_GENERIC);
- return $a;
- }
- }
- }
- /* }}} */
-
- /* unsetMetadata {{{ */
- /**
- *
- * Delete metadata by key
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method removes any data that might be stored under the provided key.
- * If the key does not exist, no error is thrown, so it is safe using this method without testing for key existence.
- *
- * @param string Key
- * @access public
- */
- function unsetMetadata($key) {
- if (array_key_exists($key, $this->_metadata)) unset($this->_metadata[$key]);
- }
- /* }}} */
-
- /* setMetadata {{{ */
- /**
- *
- * Node metadata setter
- *
- * Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an
- * associative array or in a dictionary. This method stores data under the given key. If the key already exists,
- * previously stored data is discarded.
- *
- * @param string Key
- * @param mixed Data
- * @access public
- */
- function setMetadata($key, &$data) {
- $this->_metadata[$key] =& $data;
- }
- /* }}} */
-
- /* _connectTo {{{ */
- /** @access private */
- function _connectTo(&$destinationNode) {
- $this->_arcs[] =& $destinationNode;
- }
- /* }}} */
-
- /* connectTo {{{ */
- /**
- *
- * Connect this node to another one.
- *
- * If the graph is not directed, the reverse arc, connecting $destinationNode to $this is also created.
- *
- * @param Structures_Graph_Node Node to connect to
- * @access public
- */
- function connectTo(&$destinationNode) {
- // We only connect to nodes
- if (!is_a($destinationNode, 'Structures_Graph_Node')) return Pear::raiseError('Structures_Graph_Node::connectTo received an object that is not a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC);
- // Nodes must already be in graphs to be connected
- if ($this->_graph == null) return Pear::raiseError('Structures_Graph_Node::connectTo Tried to connect a node that is not in a graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- if ($destinationNode->getGraph() == null) return Pear::raiseError('Structures_Graph_Node::connectTo Tried to connect to a node that is not in a graph', STRUCTURES_GRAPH_ERROR_GENERIC);
- // Connect here
- $this->_connectTo($destinationNode);
- // If graph is undirected, connect back
- if (!$this->_graph->isDirected()) {
- $destinationNode->_connectTo($this);
- }
- }
- /* }}} */
-
- /* getNeighbours {{{ */
- /**
- *
- * Return nodes connected to this one.
- *
- * @return array Array of nodes
- * @access public
- */
- function getNeighbours() {
- return $this->_arcs;
- }
- /* }}} */
-
- /* connectsTo {{{ */
- /**
- *
- * Test wether this node has an arc to the target node
- *
- * @return boolean True if the two nodes are connected
- * @access public
- */
- function connectsTo(&$target) {
- if (version_compare(PHP_VERSION, '5.0.0') >= 0) {
- return in_array($target, $this->getNeighbours(), true);
- }
-
- $copy = $target;
- $arcKeys = array_keys($this->_arcs);
- foreach($arcKeys as $key) {
- /* ZE1 chokes on this expression:
- if ($target === $arc) return true;
- so, we'll use more convoluted stuff
- */
- $arc =& $this->_arcs[$key];
- $target = true;
- if ($arc === true) {
- $target = false;
- if ($arc === false) {
- $target = $copy;
- return true;
- }
- }
- }
- $target = $copy;
- return false;
- }
- /* }}} */
-
- /* inDegree {{{ */
- /**
- *
- * Calculate the in degree of the node.
- *
- * The indegree for a node is the number of arcs entering the node. For non directed graphs,
- * the indegree is equal to the outdegree.
- *
- * @return integer In degree of the node
- * @access public
- */
- function inDegree() {
- if ($this->_graph == null) return 0;
- if (!$this->_graph->isDirected()) return $this->outDegree();
- $result = 0;
- $graphNodes =& $this->_graph->getNodes();
- foreach (array_keys($graphNodes) as $key) {
- if ($graphNodes[$key]->connectsTo($this)) $result++;
- }
- return $result;
-
- }
- /* }}} */
-
- /* outDegree {{{ */
- /**
- *
- * Calculate the out degree of the node.
- *
- * The outdegree for a node is the number of arcs exiting the node. For non directed graphs,
- * the outdegree is always equal to the indegree.
- *
- * @return integer Out degree of the node
- * @access public
- */
- function outDegree() {
- if ($this->_graph == null) return 0;
- return sizeof($this->_arcs);
- }
- /* }}} */
-}
-?>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-/**
- * The Graph.php file contains the definition of the Structures_Graph class
- *
- * @package Structures_Graph
- */
-
-/* dependencies {{{ */
-require_once 'PEAR.php';
-require_once 'Structures/Graph/Node.php';
-/* }}} */
-
-define('STRUCTURES_GRAPH_ERROR_GENERIC', 100);
-
-/* class Structures_Graph {{{ */
-/**
- * The Structures_Graph class represents a graph data structure.
- *
- * A Graph is a data structure composed by a set of nodes, connected by arcs.
- * Graphs may either be directed or undirected. In a directed graph, arcs are
- * directional, and can be traveled only one way. In an undirected graph, arcs
- * are bidirectional, and can be traveled both ways.
- *
- * @author Sérgio Carvalho <sergio.carvalho@portugalmail.com>
- * @copyright (c) 2004 by Sérgio Carvalho
- * @package Structures_Graph
- */
-/* }}} */
-class Structures_Graph
-{
- /**
- * List of node objects in this graph
- * @access private
- */
- var $_nodes = array();
-
- /**
- * If the graph is directed or not
- * @access private
- */
- var $_directed = false;
-
-
- /**
- * Constructor
- *
- * @param boolean $directed Set to true if the graph is directed.
- * Set to false if it is not directed.
- */
- public function __construct($directed = true)
- {
- $this->_directed = $directed;
- }
-
- /**
- * Old constructor (PHP4-style; kept for BC with extending classes)
- *
- * @param boolean $directed Set to true if the graph is directed.
- * Set to false if it is not directed.
- *
- * @return void
- */
- public function Structures_Graph($directed = true)
- {
- $this->__construct($directed);
- }
-
- /**
- * Return true if a graph is directed
- *
- * @return boolean true if the graph is directed
- */
- public function isDirected()
- {
- return (boolean) $this->_directed;
- }
-
- /**
- * Add a Node to the Graph
- *
- * @param Structures_Graph_Node $newNode The node to be added.
- *
- * @return void
- */
- public function addNode(&$newNode)
- {
- // We only add nodes
- if (!is_a($newNode, 'Structures_Graph_Node')) {
- return Pear::raiseError(
- 'Structures_Graph::addNode received an object that is not'
- . ' a Structures_Graph_Node',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
-
- //Graphs are node *sets*, so duplicates are forbidden.
- // We allow nodes that are exactly equal, but disallow equal references.
- foreach ($this->_nodes as $key => $node) {
- /*
- ZE1 equality operators choke on the recursive cycle introduced
- by the _graph field in the Node object.
- So, we'll check references the hard way
- (change $this->_nodes[$key] and check if the change reflects in
- $node)
- */
- $savedData = $this->_nodes[$key];
- $referenceIsEqualFlag = false;
- $this->_nodes[$key] = true;
- if ($node === true) {
- $this->_nodes[$key] = false;
- if ($node === false) {
- $referenceIsEqualFlag = true;
- }
- }
- $this->_nodes[$key] = $savedData;
- if ($referenceIsEqualFlag) {
- return Pear::raiseError(
- 'Structures_Graph::addNode received an object that is'
- . ' a duplicate for this dataset',
- STRUCTURES_GRAPH_ERROR_GENERIC
- );
- }
- }
- $this->_nodes[] =& $newNode;
- $newNode->setGraph($this);
- }
-
- /**
- * Remove a Node from the Graph
- *
- * @param Structures_Graph_Node $node The node to be removed from the graph
- *
- * @return void
- * @todo This is unimplemented
- */
- public function removeNode(&$node)
- {
- }
-
- /**
- * Return the node set, in no particular order.
- * For ordered node sets, use a Graph Manipulator insted.
- *
- * @return array The set of nodes in this graph
- * @see Structures_Graph_Manipulator_TopologicalSorter
- */
- public function &getNodes()
- {
- return $this->_nodes;
- }
-}
-?>
-
-require_once dirname(__FILE__) . '/helper.inc';
-
-class Structures_Graph_AllTests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Structures_Graph Tests');
-
- $dir = new GlobIterator(dirname(__FILE__) . '/*Test.php');
- $suite->addTestFiles($dir);
-
- return $suite;
- }
-}
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-
-require_once dirname(__FILE__) . '/helper.inc';
-
-/**
- * @access private
- */
-class BasicGraph extends PHPUnit_Framework_TestCase
-{
- var $_graph = null;
-
- function test_create_graph() {
- $this->_graph = new Structures_Graph();
- $this->assertTrue(is_a($this->_graph, 'Structures_Graph'));
- }
-
- function test_add_node() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node($data);
- $this->_graph->addNode($node);
- $node = new Structures_Graph_Node($data);
- $this->_graph->addNode($node);
- $node = new Structures_Graph_Node($data);
- $this->_graph->addNode($node);
- }
-
- function test_connect_node() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node1 = new Structures_Graph_Node($data);
- $node2 = new Structures_Graph_Node($data);
- $this->_graph->addNode($node1);
- $this->_graph->addNode($node2);
- $node1->connectTo($node2);
-
- $node =& $this->_graph->getNodes();
- $node =& $node[0];
- $node = $node->getNeighbours();
- $node =& $node[0];
- /*
- ZE1 == and === operators fail on $node,$node2 because of the recursion introduced
- by the _graph field in the Node object. So, we'll use the stupid method for reference
- testing
- */
- $node = true;
- $this->assertTrue($node2);
- $node = false;
- $this->assertFalse($node2);
- }
-
- function test_data_references() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node();
- $node->setData($data);
- $this->_graph->addNode($node);
- $data = 2;
- $dataInNode =& $this->_graph->getNodes();
- $dataInNode =& $dataInNode[0];
- $dataInNode =& $dataInNode->getData();
- $this->assertEquals($data, $dataInNode);
- }
-
- function test_metadata_references() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node();
- $node->setMetadata('5', $data);
- $data = 2;
- $dataInNode =& $node->getMetadata('5');
- $this->assertEquals($data, $dataInNode);
- }
-
- function test_metadata_key_exists() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node();
- $node->setMetadata('5', $data);
- $this->assertTrue($node->metadataKeyExists('5'));
- $this->assertFalse($node->metadataKeyExists('1'));
- }
-
- function test_directed_degree() {
- $this->_graph = new Structures_Graph(true);
- $node = array();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $this->_graph->addNode($node[0]);
- $this->_graph->addNode($node[1]);
- $this->_graph->addNode($node[2]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->inDegree(), 'inDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 0 arcs');
- $this->assertEquals(0, $node[0]->outDegree(), 'outDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 0 arcs');
- $node[0]->connectTo($node[1]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 1 arc');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 1 arc');
- $this->assertEquals(1, $node[0]->outDegree(), 'outDegree test failed for node 0 with 1 arc');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 1 arc');
- $node[0]->connectTo($node[2]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(1, $node[2]->inDegree(), 'inDegree test failed for node 2 with 2 arcs');
- $this->assertEquals(2, $node[0]->outDegree(), 'outDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 2 arcs');
- }
-
- function test_undirected_degree() {
- $this->_graph = new Structures_Graph(false);
- $node = array();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $this->_graph->addNode($node[0]);
- $this->_graph->addNode($node[1]);
- $this->_graph->addNode($node[2]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->inDegree(), 'inDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 0 arcs');
- $this->assertEquals(0, $node[0]->outDegree(), 'outDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 0 arcs');
- $node[0]->connectTo($node[1]);
- $this->assertEquals(1, $node[0]->inDegree(), 'inDegree test failed for node 0 with 1 arc');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 1 arc');
- $this->assertEquals(1, $node[0]->outDegree(), 'outDegree test failed for node 0 with 1 arc');
- $this->assertEquals(1, $node[1]->outDegree(), 'outDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 1 arc');
- $node[0]->connectTo($node[2]);
- $this->assertEquals(2, $node[0]->inDegree(), 'inDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(1, $node[2]->inDegree(), 'inDegree test failed for node 2 with 2 arcs');
- $this->assertEquals(2, $node[0]->outDegree(), 'outDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(1, $node[1]->outDegree(), 'outDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(1, $node[2]->outDegree(), 'outDegree test failed for node 2 with 2 arcs');
- }
-}
-?>
-
-require_once dirname(__FILE__) . '/helper.inc';
-require_once 'Structures/Graph/Manipulator/TopologicalSorter.php';
-
-class TopologicalSorterTest extends PHPUnit_Framework_TestCase
-{
- public function testSort()
- {
- $graph = new Structures_Graph();
-
- $name1 = 'node1';
- $node1 = new Structures_Graph_Node();
- $node1->setData($name1);
- $graph->addNode($node1);
-
- $name11 = 'node11';
- $node11 = new Structures_Graph_Node();
- $node11->setData($name11);
- $graph->addNode($node11);
- $node1->connectTo($node11);
-
- $name12 = 'node12';
- $node12 = new Structures_Graph_Node();
- $node12->setData($name12);
- $graph->addNode($node12);
- $node1->connectTo($node12);
-
- $name121 = 'node121';
- $node121 = new Structures_Graph_Node();
- $node121->setData($name121);
- $graph->addNode($node121);
- $node12->connectTo($node121);
-
- $name2 = 'node2';
- $node2 = new Structures_Graph_Node();
- $node2->setData($name2);
- $graph->addNode($node2);
-
- $name21 = 'node21';
- $node21 = new Structures_Graph_Node();
- $node21->setData($name21);
- $graph->addNode($node21);
- $node2->connectTo($node21);
-
- $nodes = Structures_Graph_Manipulator_TopologicalSorter::sort($graph);
- $this->assertCount(2, $nodes[0]);
- $this->assertEquals('node1', $nodes[0][0]->getData());
- $this->assertEquals('node2', $nodes[0][1]->getData());
-
- $this->assertCount(3, $nodes[1]);
- $this->assertEquals('node11', $nodes[1][0]->getData());
- $this->assertEquals('node12', $nodes[1][1]->getData());
- $this->assertEquals('node21', $nodes[1][2]->getData());
-
- $this->assertCount(1, $nodes[2]);
- $this->assertEquals('node121', $nodes[2][0]->getData());
- }
-}
-?>
-
-require_once dirname(__FILE__) . '/helper.inc';
-require_once 'Structures/Graph/Manipulator/AcyclicTest.php';
-
-class AcyclicTestTest extends PHPUnit_Framework_TestCase
-{
- public function testIsAcyclicFalse()
- {
- $graph = new Structures_Graph();
- $node1 = new Structures_Graph_Node();
- $graph->addNode($node1);
-
- $node2 = new Structures_Graph_Node();
- $graph->addNode($node2);
- $node1->connectTo($node2);
-
- $node3 = new Structures_Graph_Node();
- $graph->addNode($node3);
- $node2->connectTo($node3);
-
- $node3->connectTo($node1);
-
- $this->assertFalse(
- Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph),
- 'Graph is cyclic'
- );
- }
-
- public function testIsAcyclicTrue()
- {
- $graph = new Structures_Graph();
- $node1 = new Structures_Graph_Node();
- $graph->addNode($node1);
-
- $node2 = new Structures_Graph_Node();
- $graph->addNode($node2);
- $node1->connectTo($node2);
-
- $node3 = new Structures_Graph_Node();
- $graph->addNode($node3);
- $node2->connectTo($node3);
-
- $this->assertTrue(
- Structures_Graph_Manipulator_AcyclicTest::isAcyclic($graph),
- 'Graph is acyclic'
- );
- }
-}
-?>
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
-// +-----------------------------------------------------------------------------+
-// | Copyright (c) 2003 Sérgio Gonçalves Carvalho |
-// +-----------------------------------------------------------------------------+
-// | This file is part of Structures_Graph. |
-// | |
-// | Structures_Graph is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU Lesser General Public License as published by |
-// | the Free Software Foundation; either version 2.1 of the License, or |
-// | (at your option) any later version. |
-// | |
-// | Structures_Graph is distributed in the hope that it will be useful, |
-// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-// | GNU Lesser General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU Lesser General Public License |
-// | along with Structures_Graph; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
-// | 02111-1307 USA |
-// +-----------------------------------------------------------------------------+
-// | Author: Sérgio Carvalho <sergio.carvalho@portugalmail.com> |
-// +-----------------------------------------------------------------------------+
-//
-
-require_once dirname(__FILE__) . '/helper.inc';
-
-/**
- * @access private
- */
-class BasicGraph extends PHPUnit_Framework_TestCase
-{
- var $_graph = null;
-
- function test_create_graph() {
- $this->_graph = new Structures_Graph();
- $this->assertTrue(is_a($this->_graph, 'Structures_Graph'));
- }
-
- function test_add_node() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node($data);
- $this->_graph->addNode($node);
- $node = new Structures_Graph_Node($data);
- $this->_graph->addNode($node);
- $node = new Structures_Graph_Node($data);
- $this->_graph->addNode($node);
- }
-
- function test_connect_node() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node1 = new Structures_Graph_Node($data);
- $node2 = new Structures_Graph_Node($data);
- $this->_graph->addNode($node1);
- $this->_graph->addNode($node2);
- $node1->connectTo($node2);
-
- $node =& $this->_graph->getNodes();
- $node =& $node[0];
- $node = $node->getNeighbours();
- $node =& $node[0];
- /*
- ZE1 == and === operators fail on $node,$node2 because of the recursion introduced
- by the _graph field in the Node object. So, we'll use the stupid method for reference
- testing
- */
- $node = true;
- $this->assertTrue($node2);
- $node = false;
- $this->assertFalse($node2);
- }
-
- function test_data_references() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node();
- $node->setData($data);
- $this->_graph->addNode($node);
- $data = 2;
- $dataInNode =& $this->_graph->getNodes();
- $dataInNode =& $dataInNode[0];
- $dataInNode =& $dataInNode->getData();
- $this->assertEquals($data, $dataInNode);
- }
-
- function test_metadata_references() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node();
- $node->setMetadata('5', $data);
- $data = 2;
- $dataInNode =& $node->getMetadata('5');
- $this->assertEquals($data, $dataInNode);
- }
-
- function test_metadata_key_exists() {
- $this->_graph = new Structures_Graph();
- $data = 1;
- $node = new Structures_Graph_Node();
- $node->setMetadata('5', $data);
- $this->assertTrue($node->metadataKeyExists('5'));
- $this->assertFalse($node->metadataKeyExists('1'));
- }
-
- function test_directed_degree() {
- $this->_graph = new Structures_Graph(true);
- $node = array();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $this->_graph->addNode($node[0]);
- $this->_graph->addNode($node[1]);
- $this->_graph->addNode($node[2]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->inDegree(), 'inDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 0 arcs');
- $this->assertEquals(0, $node[0]->outDegree(), 'outDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 0 arcs');
- $node[0]->connectTo($node[1]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 1 arc');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 1 arc');
- $this->assertEquals(1, $node[0]->outDegree(), 'outDegree test failed for node 0 with 1 arc');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 1 arc');
- $node[0]->connectTo($node[2]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(1, $node[2]->inDegree(), 'inDegree test failed for node 2 with 2 arcs');
- $this->assertEquals(2, $node[0]->outDegree(), 'outDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 2 arcs');
- }
-
- function test_undirected_degree() {
- $this->_graph = new Structures_Graph(false);
- $node = array();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $node[] = new Structures_Graph_Node();
- $this->_graph->addNode($node[0]);
- $this->_graph->addNode($node[1]);
- $this->_graph->addNode($node[2]);
- $this->assertEquals(0, $node[0]->inDegree(), 'inDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->inDegree(), 'inDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 0 arcs');
- $this->assertEquals(0, $node[0]->outDegree(), 'outDegree test failed for node 0 with 0 arcs');
- $this->assertEquals(0, $node[1]->outDegree(), 'outDegree test failed for node 1 with 0 arcs');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 0 arcs');
- $node[0]->connectTo($node[1]);
- $this->assertEquals(1, $node[0]->inDegree(), 'inDegree test failed for node 0 with 1 arc');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->inDegree(), 'inDegree test failed for node 2 with 1 arc');
- $this->assertEquals(1, $node[0]->outDegree(), 'outDegree test failed for node 0 with 1 arc');
- $this->assertEquals(1, $node[1]->outDegree(), 'outDegree test failed for node 1 with 1 arc');
- $this->assertEquals(0, $node[2]->outDegree(), 'outDegree test failed for node 2 with 1 arc');
- $node[0]->connectTo($node[2]);
- $this->assertEquals(2, $node[0]->inDegree(), 'inDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(1, $node[1]->inDegree(), 'inDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(1, $node[2]->inDegree(), 'inDegree test failed for node 2 with 2 arcs');
- $this->assertEquals(2, $node[0]->outDegree(), 'outDegree test failed for node 0 with 2 arcs');
- $this->assertEquals(1, $node[1]->outDegree(), 'outDegree test failed for node 1 with 2 arcs');
- $this->assertEquals(1, $node[2]->outDegree(), 'outDegree test failed for node 2 with 2 arcs');
- }
-}
-?>
-
-if ('@php_dir@' == '@'.'php_dir'.'@') {
- // This package hasn't been installed.
- // Adjust path to ensure includes find files in working directory.
- set_include_path(dirname(dirname(__FILE__))
- . PATH_SEPARATOR . dirname(__FILE__)
- . PATH_SEPARATOR . get_include_path());
-}
-
-require_once 'Structures/Graph.php';
-
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
-
-/**
- * File/Directory manipulation
- *
- * PHP versions 4 and 5
- *
- * @category pear
- * @package System
- * @author Tomas V.V.Cox <cox@idecnet.com>
- * @copyright 1997-2009 The Authors
- * @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @link http://pear.php.net/package/PEAR
- * @since File available since Release 0.1
- */
-
-/**
- * base class
- */
-require_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
-require_once 'phar://install-pear-nozlib.phar/' . 'Console/Getopt.php';
-
-$GLOBALS['_System_temp_files'] = array();
-
-/**
-* System offers cross plattform compatible system functions
-*
-* Static functions for different operations. Should work under
-* Unix and Windows. The names and usage has been taken from its respectively
-* GNU commands. The functions will return (bool) false on error and will
-* trigger the error with the PHP trigger_error() function (you can silence
-* the error by prefixing a '@' sign after the function call, but this
-* is not recommended practice. Instead use an error handler with
-* {@link set_error_handler()}).
-*
-* Documentation on this class you can find in:
-* http://pear.php.net/manual/
-*
-* Example usage:
-* if (!@System::rm('-r file1 dir1')) {
-* print "could not delete file1 or dir1";
-* }
-*
-* In case you need to to pass file names with spaces,
-* pass the params as an array:
-*
-* System::rm(array('-r', $file1, $dir1));
-*
-* @category pear
-* @package System
-* @author Tomas V.V. Cox <cox@idecnet.com>
-* @copyright 1997-2006 The PHP Group
-* @license http://opensource.org/licenses/bsd-license.php New BSD License
-* @version Release: 1.9.5
-* @link http://pear.php.net/package/PEAR
-* @since Class available since Release 0.1
-* @static
-*/
-class System
-{
- /**
- * returns the commandline arguments of a function
- *
- * @param string $argv the commandline
- * @param string $short_options the allowed option short-tags
- * @param string $long_options the allowed option long-tags
- * @return array the given options and there values
- * @static
- * @access private
- */
- function _parseArgs($argv, $short_options, $long_options = null)
- {
- if (!is_array($argv) && $argv !== null) {
- /*
- // Quote all items that are a short option
- $av = preg_split('/(\A| )--?[a-z0-9]+[ =]?((?<!\\\\)((,\s*)|((?<!,)\s+))?)/i', $argv, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);
- $offset = 0;
- foreach ($av as $a) {
- $b = trim($a[0]);
- if ($b{0} == '"' || $b{0} == "'") {
- continue;
- }
-
- $escape = escapeshellarg($b);
- $pos = $a[1] + $offset;
- $argv = substr_replace($argv, $escape, $pos, strlen($b));
- $offset += 2;
- }
- */
-
- // Find all items, quoted or otherwise
- preg_match_all("/(?:[\"'])(.*?)(?:['\"])|([^\s]+)/", $argv, $av);
- $argv = $av[1];
- foreach ($av[2] as $k => $a) {
- if (empty($a)) {
- continue;
- }
- $argv[$k] = trim($a) ;
- }
- }
-
- return Console_Getopt::getopt2($argv, $short_options, $long_options);
- }
-
- /**
- * Output errors with PHP trigger_error(). You can silence the errors
- * with prefixing a "@" sign to the function call: @System::mkdir(..);
- *
- * @param mixed $error a PEAR error or a string with the error message
- * @return bool false
- * @static
- * @access private
- */
- function raiseError($error)
- {
- if (PEAR::isError($error)) {
- $error = $error->getMessage();
- }
- trigger_error($error, E_USER_WARNING);
- return false;
- }
-
- /**
- * Creates a nested array representing the structure of a directory
- *
- * System::_dirToStruct('dir1', 0) =>
- * Array
- * (
- * [dirs] => Array
- * (
- * [0] => dir1
- * )
- *
- * [files] => Array
- * (
- * [0] => dir1/file2
- * [1] => dir1/file3
- * )
- * )
- * @param string $sPath Name of the directory
- * @param integer $maxinst max. deep of the lookup
- * @param integer $aktinst starting deep of the lookup
- * @param bool $silent if true, do not emit errors.
- * @return array the structure of the dir
- * @static
- * @access private
- */
- function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
- {
- $struct = array('dirs' => array(), 'files' => array());
- if (($dir = @opendir($sPath)) === false) {
- if (!$silent) {
- System::raiseError("Could not open dir $sPath");
- }
- return $struct; // XXX could not open error
- }
-
- $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ?
- $list = array();
- while (false !== ($file = readdir($dir))) {
- if ($file != '.' && $file != '..') {
- $list[] = $file;
- }
- }
-
- closedir($dir);
- natsort($list);
- if ($aktinst < $maxinst || $maxinst == 0) {
- foreach ($list as $val) {
- $path = $sPath . DIRECTORY_SEPARATOR . $val;
- if (is_dir($path) && !is_link($path)) {
- $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1, $silent);
- $struct = array_merge_recursive($struct, $tmp);
- } else {
- $struct['files'][] = $path;
- }
- }
- }
-
- return $struct;
- }
-
- /**
- * Creates a nested array representing the structure of a directory and files
- *
- * @param array $files Array listing files and dirs
- * @return array
- * @static
- * @see System::_dirToStruct()
- */
- function _multipleToStruct($files)
- {
- $struct = array('dirs' => array(), 'files' => array());
- settype($files, 'array');
- foreach ($files as $file) {
- if (is_dir($file) && !is_link($file)) {
- $tmp = System::_dirToStruct($file, 0);
- $struct = array_merge_recursive($tmp, $struct);
- } else {
- if (!in_array($file, $struct['files'])) {
- $struct['files'][] = $file;
- }
- }
- }
- return $struct;
- }
-
- /**
- * The rm command for removing files.
- * Supports multiple files and dirs and also recursive deletes
- *
- * @param string $args the arguments for rm
- * @return mixed PEAR_Error or true for success
- * @static
- * @access public
- */
- function rm($args)
- {
- $opts = System::_parseArgs($args, 'rf'); // "f" does nothing but I like it :-)
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'r') {
- $do_recursive = true;
- }
- }
- $ret = true;
- if (isset($do_recursive)) {
- $struct = System::_multipleToStruct($opts[1]);
- foreach ($struct['files'] as $file) {
- if (!@unlink($file)) {
- $ret = false;
- }
- }
-
- rsort($struct['dirs']);
- foreach ($struct['dirs'] as $dir) {
- if (!@rmdir($dir)) {
- $ret = false;
- }
- }
- } else {
- foreach ($opts[1] as $file) {
- $delete = (is_dir($file)) ? 'rmdir' : 'unlink';
- if (!@$delete($file)) {
- $ret = false;
- }
- }
- }
- return $ret;
- }
-
- /**
- * Make directories.
- *
- * The -p option will create parent directories
- * @param string $args the name of the director(y|ies) to create
- * @return bool True for success
- * @static
- * @access public
- */
- function mkDir($args)
- {
- $opts = System::_parseArgs($args, 'pm:');
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
-
- $mode = 0777; // default mode
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'p') {
- $create_parents = true;
- } elseif ($opt[0] == 'm') {
- // if the mode is clearly an octal number (starts with 0)
- // convert it to decimal
- if (strlen($opt[1]) && $opt[1]{0} == '0') {
- $opt[1] = octdec($opt[1]);
- } else {
- // convert to int
- $opt[1] += 0;
- }
- $mode = $opt[1];
- }
- }
-
- $ret = true;
- if (isset($create_parents)) {
- foreach ($opts[1] as $dir) {
- $dirstack = array();
- while ((!file_exists($dir) || !is_dir($dir)) &&
- $dir != DIRECTORY_SEPARATOR) {
- array_unshift($dirstack, $dir);
- $dir = dirname($dir);
- }
-
- while ($newdir = array_shift($dirstack)) {
- if (!is_writeable(dirname($newdir))) {
- $ret = false;
- break;
- }
-
- if (!mkdir($newdir, $mode)) {
- $ret = false;
- }
- }
- }
- } else {
- foreach($opts[1] as $dir) {
- if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) {
- $ret = false;
- }
- }
- }
-
- return $ret;
- }
-
- /**
- * Concatenate files
- *
- * Usage:
- * 1) $var = System::cat('sample.txt test.txt');
- * 2) System::cat('sample.txt test.txt > final.txt');
- * 3) System::cat('sample.txt test.txt >> final.txt');
- *
- * Note: as the class use fopen, urls should work also (test that)
- *
- * @param string $args the arguments
- * @return boolean true on success
- * @static
- * @access public
- */
- function &cat($args)
- {
- $ret = null;
- $files = array();
- if (!is_array($args)) {
- $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
- }
-
- $count_args = count($args);
- for ($i = 0; $i < $count_args; $i++) {
- if ($args[$i] == '>') {
- $mode = 'wb';
- $outputfile = $args[$i+1];
- break;
- } elseif ($args[$i] == '>>') {
- $mode = 'ab+';
- $outputfile = $args[$i+1];
- break;
- } else {
- $files[] = $args[$i];
- }
- }
- $outputfd = false;
- if (isset($mode)) {
- if (!$outputfd = fopen($outputfile, $mode)) {
- $err = System::raiseError("Could not open $outputfile");
- return $err;
- }
- $ret = true;
- }
- foreach ($files as $file) {
- if (!$fd = fopen($file, 'r')) {
- System::raiseError("Could not open $file");
- continue;
- }
- while ($cont = fread($fd, 2048)) {
- if (is_resource($outputfd)) {
- fwrite($outputfd, $cont);
- } else {
- $ret .= $cont;
- }
- }
- fclose($fd);
- }
- if (is_resource($outputfd)) {
- fclose($outputfd);
- }
- return $ret;
- }
-
- /**
- * Creates temporary files or directories. This function will remove
- * the created files when the scripts finish its execution.
- *
- * Usage:
- * 1) $tempfile = System::mktemp("prefix");
- * 2) $tempdir = System::mktemp("-d prefix");
- * 3) $tempfile = System::mktemp();
- * 4) $tempfile = System::mktemp("-t /var/tmp prefix");
- *
- * prefix -> The string that will be prepended to the temp name
- * (defaults to "tmp").
- * -d -> A temporary dir will be created instead of a file.
- * -t -> The target dir where the temporary (file|dir) will be created. If
- * this param is missing by default the env vars TMP on Windows or
- * TMPDIR in Unix will be used. If these vars are also missing
- * c:\windows\temp or /tmp will be used.
- *
- * @param string $args The arguments
- * @return mixed the full path of the created (file|dir) or false
- * @see System::tmpdir()
- * @static
- * @access public
- */
- function mktemp($args = null)
- {
- static $first_time = true;
- $opts = System::_parseArgs($args, 't:d');
- if (PEAR::isError($opts)) {
- return System::raiseError($opts);
- }
-
- foreach ($opts[0] as $opt) {
- if ($opt[0] == 'd') {
- $tmp_is_dir = true;
- } elseif ($opt[0] == 't') {
- $tmpdir = $opt[1];
- }
- }
-
- $prefix = (isset($opts[1][0])) ? $opts[1][0] : 'tmp';
- if (!isset($tmpdir)) {
- $tmpdir = System::tmpdir();
- }
-
- if (!System::mkDir(array('-p', $tmpdir))) {
- return false;
- }
-
- $tmp = tempnam($tmpdir, $prefix);
- if (isset($tmp_is_dir)) {
- unlink($tmp); // be careful possible race condition here
- if (!mkdir($tmp, 0700)) {
- return System::raiseError("Unable to create temporary directory $tmpdir");
- }
- }
-
- $GLOBALS['_System_temp_files'][] = $tmp;
- if (isset($tmp_is_dir)) {
- //$GLOBALS['_System_temp_files'][] = dirname($tmp);
- }
-
- if ($first_time) {
- PEAR::registerShutdownFunc(array('System', '_removeTmpFiles'));
- $first_time = false;
- }
-
- return $tmp;
- }
-
- /**
- * Remove temporary files created my mkTemp. This function is executed
- * at script shutdown time
- *
- * @static
- * @access private
- */
- function _removeTmpFiles()
- {
- if (count($GLOBALS['_System_temp_files'])) {
- $delete = $GLOBALS['_System_temp_files'];
- array_unshift($delete, '-r');
- System::rm($delete);
- $GLOBALS['_System_temp_files'] = array();
- }
- }
-
- /**
- * Get the path of the temporal directory set in the system
- * by looking in its environments variables.
- * Note: php.ini-recommended removes the "E" from the variables_order setting,
- * making unavaible the $_ENV array, that s why we do tests with _ENV
- *
- * @static
- * @return string The temporary directory on the system
- */
- function tmpdir()
- {
- if (OS_WINDOWS) {
- if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) {
- return $var;
- }
- if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP')) {
- return $var;
- }
- if ($var = isset($_ENV['USERPROFILE']) ? $_ENV['USERPROFILE'] : getenv('USERPROFILE')) {
- return $var;
- }
- if ($var = isset($_ENV['windir']) ? $_ENV['windir'] : getenv('windir')) {
- return $var;
- }
- return getenv('SystemRoot') . '\temp';
- }
- if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) {
- return $var;
- }
- return realpath('/tmp');
- }
-
- /**
- * The "which" command (show the full path of a command)
- *
- * @param string $program The command to search for
- * @param mixed $fallback Value to return if $program is not found
- *
- * @return mixed A string with the full path or false if not found
- * @static
- * @author Stig Bakken <ssb@php.net>
- */
- function which($program, $fallback = false)
- {
- // enforce API
- if (!is_string($program) || '' == $program) {
- return $fallback;
- }
-
- // full path given
- if (basename($program) != $program) {
- $path_elements[] = dirname($program);
- $program = basename($program);
- } else {
- $path = getenv('PATH');
- if (!$path) {
- $path = getenv('Path'); // some OSes are just stupid enough to do this
- }
-
- $path_elements = explode(PATH_SEPARATOR, $path);
- }
-
- if (OS_WINDOWS) {
- $exe_suffixes = getenv('PATHEXT')
- ? explode(PATH_SEPARATOR, getenv('PATHEXT'))
- : array('.exe','.bat','.cmd','.com');
- // allow passing a command.exe param
- if (strpos($program, '.') !== false) {
- array_unshift($exe_suffixes, '');
- }
- } else {
- $exe_suffixes = array('');
- }
-
- foreach ($exe_suffixes as $suff) {
- foreach ($path_elements as $dir) {
- $file = $dir . DIRECTORY_SEPARATOR . $program . $suff;
- if (is_executable($file)) {
- return $file;
- }
- }
- }
- return $fallback;
- }
-
- /**
- * The "find" command
- *
- * Usage:
- *
- * System::find($dir);
- * System::find("$dir -type d");
- * System::find("$dir -type f");
- * System::find("$dir -name *.php");
- * System::find("$dir -name *.php -name *.htm*");
- * System::find("$dir -maxdepth 1");
- *
- * Params implmented:
- * $dir -> Start the search at this directory
- * -type d -> return only directories
- * -type f -> return only files
- * -maxdepth <n> -> max depth of recursion
- * -name <pattern> -> search pattern (bash style). Multiple -name param allowed
- *
- * @param mixed Either array or string with the command line
- * @return array Array of found files
- * @static
- *
- */
- function find($args)
- {
- if (!is_array($args)) {
- $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY);
- }
- $dir = realpath(array_shift($args));
- if (!$dir) {
- return array();
- }
- $patterns = array();
- $depth = 0;
- $do_files = $do_dirs = true;
- $args_count = count($args);
- for ($i = 0; $i < $args_count; $i++) {
- switch ($args[$i]) {
- case '-type':
- if (in_array($args[$i+1], array('d', 'f'))) {
- if ($args[$i+1] == 'd') {
- $do_files = false;
- } else {
- $do_dirs = false;
- }
- }
- $i++;
- break;
- case '-name':
- $name = preg_quote($args[$i+1], '#');
- // our magic characters ? and * have just been escaped,
- // so now we change the escaped versions to PCRE operators
- $name = strtr($name, array('\?' => '.', '\*' => '.*'));
- $patterns[] = '('.$name.')';
- $i++;
- break;
- case '-maxdepth':
- $depth = $args[$i+1];
- break;
- }
- }
- $path = System::_dirToStruct($dir, $depth, 0, true);
- if ($do_files && $do_dirs) {
- $files = array_merge($path['files'], $path['dirs']);
- } elseif ($do_dirs) {
- $files = $path['dirs'];
- } else {
- $files = $path['files'];
- }
- if (count($patterns)) {
- $dsq = preg_quote(DIRECTORY_SEPARATOR, '#');
- $pattern = '#(^|'.$dsq.')'.implode('|', $patterns).'($|'.$dsq.')#';
- $ret = array();
- $files_count = count($files);
- for ($i = 0; $i < $files_count; $i++) {
- // only search in the part of the file below the current directory
- $filepart = basename($files[$i]);
- if (preg_match($pattern, $filepart)) {
- $ret[] = $files[$i];
- }
- }
- return $ret;
- }
- return $files;
- }
-}<?php
-/**
- * XML_Util
- *
- * XML Utilities package
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2003-2008 Stephan Schmidt <schst@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category XML
- * @package XML_Util
- * @author Stephan Schmidt <schst@php.net>
- * @copyright 2003-2008 Stephan Schmidt <schst@php.net>
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/XML_Util
- */
-
-/**
- * Error code for invalid chars in XML name
- */
-define('XML_UTIL_ERROR_INVALID_CHARS', 51);
-
-/**
- * Error code for invalid chars in XML name
- */
-define('XML_UTIL_ERROR_INVALID_START', 52);
-
-/**
- * Error code for non-scalar tag content
- */
-define('XML_UTIL_ERROR_NON_SCALAR_CONTENT', 60);
-
-/**
- * Error code for missing tag name
- */
-define('XML_UTIL_ERROR_NO_TAG_NAME', 61);
-
-/**
- * Replace XML entities
- */
-define('XML_UTIL_REPLACE_ENTITIES', 1);
-
-/**
- * Embedd content in a CData Section
- */
-define('XML_UTIL_CDATA_SECTION', 5);
-
-/**
- * Do not replace entitites
- */
-define('XML_UTIL_ENTITIES_NONE', 0);
-
-/**
- * Replace all XML entitites
- * This setting will replace <, >, ", ' and &
- */
-define('XML_UTIL_ENTITIES_XML', 1);
-
-/**
- * Replace only required XML entitites
- * This setting will replace <, " and &
- */
-define('XML_UTIL_ENTITIES_XML_REQUIRED', 2);
-
-/**
- * Replace HTML entitites
- * @link http://www.php.net/htmlentities
- */
-define('XML_UTIL_ENTITIES_HTML', 3);
-
-/**
- * Collapse all empty tags.
- */
-define('XML_UTIL_COLLAPSE_ALL', 1);
-
-/**
- * Collapse only empty XHTML tags that have no end tag.
- */
-define('XML_UTIL_COLLAPSE_XHTML_ONLY', 2);
-
-/**
- * Utility class for working with XML documents
- *
- * @category XML
- * @package XML_Util
- * @author Stephan Schmidt <schst@php.net>
- * @copyright 2003-2008 Stephan Schmidt <schst@php.net>
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.3.0
- * @link http://pear.php.net/package/XML_Util
- */
-class XML_Util
-{
- /**
- * Return API version
- *
- * @return string $version API version
- */
- public static function apiVersion()
- {
- return '1.1';
- }
-
- /**
- * Replace XML entities
- *
- * With the optional second parameter, you may select, which
- * entities should be replaced.
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // replace XML entites:
- * $string = XML_Util::replaceEntities('This string contains < & >.');
- * </code>
- *
- * With the optional third parameter, you may pass the character encoding
- * <code>
- * require_once 'XML/Util.php';
- *
- * // replace XML entites in UTF-8:
- * $string = XML_Util::replaceEntities(
- * 'This string contains < & > as well as ä, ö, ß, à and ê',
- * XML_UTIL_ENTITIES_HTML,
- * 'UTF-8'
- * );
- * </code>
- *
- * @param string $string string where XML special chars
- * should be replaced
- * @param int $replaceEntities setting for entities in attribute values
- * (one of XML_UTIL_ENTITIES_XML,
- * XML_UTIL_ENTITIES_XML_REQUIRED,
- * XML_UTIL_ENTITIES_HTML)
- * @param string $encoding encoding value (if any)...
- * must be a valid encoding as determined
- * by the htmlentities() function
- *
- * @return string string with replaced chars
- * @see reverseEntities()
- */
- public static function replaceEntities(
- $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
- ) {
- switch ($replaceEntities) {
- case XML_UTIL_ENTITIES_XML:
- return strtr(
- $string,
- array(
- '&' => '&amp;',
- '>' => '&gt;',
- '<' => '&lt;',
- '"' => '&quot;',
- '\'' => '&apos;'
- )
- );
- break;
- case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr(
- $string,
- array(
- '&' => '&amp;',
- '<' => '&lt;',
- '"' => '&quot;'
- )
- );
- break;
- case XML_UTIL_ENTITIES_HTML:
- return htmlentities($string, ENT_COMPAT, $encoding);
- break;
- }
- return $string;
- }
-
- /**
- * Reverse XML entities
- *
- * With the optional second parameter, you may select, which
- * entities should be reversed.
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // reverse XML entites:
- * $string = XML_Util::reverseEntities('This string contains &lt; &amp; &gt;.');
- * </code>
- *
- * With the optional third parameter, you may pass the character encoding
- * <code>
- * require_once 'XML/Util.php';
- *
- * // reverse XML entites in UTF-8:
- * $string = XML_Util::reverseEntities(
- * 'This string contains &lt; &amp; &gt; as well as'
- * . ' &auml;, &ouml;, &szlig;, &agrave; and &ecirc;',
- * XML_UTIL_ENTITIES_HTML,
- * 'UTF-8'
- * );
- * </code>
- *
- * @param string $string string where XML special chars
- * should be replaced
- * @param int $replaceEntities setting for entities in attribute values
- * (one of XML_UTIL_ENTITIES_XML,
- * XML_UTIL_ENTITIES_XML_REQUIRED,
- * XML_UTIL_ENTITIES_HTML)
- * @param string $encoding encoding value (if any)...
- * must be a valid encoding as determined
- * by the html_entity_decode() function
- *
- * @return string string with replaced chars
- * @see replaceEntities()
- */
- public static function reverseEntities(
- $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
- ) {
- switch ($replaceEntities) {
- case XML_UTIL_ENTITIES_XML:
- return strtr(
- $string,
- array(
- '&amp;' => '&',
- '&gt;' => '>',
- '&lt;' => '<',
- '&quot;' => '"',
- '&apos;' => '\''
- )
- );
- break;
- case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr(
- $string,
- array(
- '&amp;' => '&',
- '&lt;' => '<',
- '&quot;' => '"'
- )
- );
- break;
- case XML_UTIL_ENTITIES_HTML:
- return html_entity_decode($string, ENT_COMPAT, $encoding);
- break;
- }
- return $string;
- }
-
- /**
- * Build an xml declaration
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // get an XML declaration:
- * $xmlDecl = XML_Util::getXMLDeclaration('1.0', 'UTF-8', true);
- * </code>
- *
- * @param string $version xml version
- * @param string $encoding character encoding
- * @param bool $standalone document is standalone (or not)
- *
- * @return string xml declaration
- * @uses attributesToString() to serialize the attributes of the
- * XML declaration
- */
- public static function getXMLDeclaration(
- $version = '1.0', $encoding = null, $standalone = null
- ) {
- $attributes = array(
- 'version' => $version,
- );
- // add encoding
- if ($encoding !== null) {
- $attributes['encoding'] = $encoding;
- }
- // add standalone, if specified
- if ($standalone !== null) {
- $attributes['standalone'] = $standalone ? 'yes' : 'no';
- }
-
- return sprintf(
- '<?xml%s?>',
- XML_Util::attributesToString($attributes, false)
- );
- }
-
- /**
- * Build a document type declaration
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // get a doctype declaration:
- * $xmlDecl = XML_Util::getDocTypeDeclaration('rootTag','myDocType.dtd');
- * </code>
- *
- * @param string $root name of the root tag
- * @param string $uri uri of the doctype definition
- * (or array with uri and public id)
- * @param string $internalDtd internal dtd entries
- *
- * @return string doctype declaration
- * @since 0.2
- */
- public static function getDocTypeDeclaration(
- $root, $uri = null, $internalDtd = null
- ) {
- if (is_array($uri)) {
- $ref = sprintf(' PUBLIC "%s" "%s"', $uri['id'], $uri['uri']);
- } elseif (!empty($uri)) {
- $ref = sprintf(' SYSTEM "%s"', $uri);
- } else {
- $ref = '';
- }
-
- if (empty($internalDtd)) {
- return sprintf('<!DOCTYPE %s%s>', $root, $ref);
- } else {
- return sprintf("<!DOCTYPE %s%s [\n%s\n]>", $root, $ref, $internalDtd);
- }
- }
-
- /**
- * Create string representation of an attribute list
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // build an attribute string
- * $att = array(
- * 'foo' => 'bar',
- * 'argh' => 'tomato'
- * );
- *
- * $attList = XML_Util::attributesToString($att);
- * </code>
- *
- * @param array $attributes attribute array
- * @param bool|array $sort sort attribute list alphabetically,
- * may also be an assoc array containing
- * the keys 'sort', 'multiline', 'indent',
- * 'linebreak' and 'entities'
- * @param bool $multiline use linebreaks, if more than
- * one attribute is given
- * @param string $indent string used for indentation of
- * multiline attributes
- * @param string $linebreak string used for linebreaks of
- * multiline attributes
- * @param int $entities setting for entities in attribute values
- * (one of XML_UTIL_ENTITIES_NONE,
- * XML_UTIL_ENTITIES_XML,
- * XML_UTIL_ENTITIES_XML_REQUIRED,
- * XML_UTIL_ENTITIES_HTML)
- *
- * @return string string representation of the attributes
- * @uses replaceEntities() to replace XML entities in attribute values
- * @todo allow sort also to be an options array
- */
- public static function attributesToString(
- $attributes, $sort = true, $multiline = false,
- $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML
- ) {
- /*
- * second parameter may be an array
- */
- if (is_array($sort)) {
- if (isset($sort['multiline'])) {
- $multiline = $sort['multiline'];
- }
- if (isset($sort['indent'])) {
- $indent = $sort['indent'];
- }
- if (isset($sort['linebreak'])) {
- $multiline = $sort['linebreak'];
- }
- if (isset($sort['entities'])) {
- $entities = $sort['entities'];
- }
- if (isset($sort['sort'])) {
- $sort = $sort['sort'];
- } else {
- $sort = true;
- }
- }
- $string = '';
- if (is_array($attributes) && !empty($attributes)) {
- if ($sort) {
- ksort($attributes);
- }
- if (!$multiline || count($attributes) == 1) {
- foreach ($attributes as $key => $value) {
- if ($entities != XML_UTIL_ENTITIES_NONE) {
- if ($entities === XML_UTIL_CDATA_SECTION) {
- $entities = XML_UTIL_ENTITIES_XML;
- }
- $value = XML_Util::replaceEntities($value, $entities);
- }
- $string .= ' ' . $key . '="' . $value . '"';
- }
- } else {
- $first = true;
- foreach ($attributes as $key => $value) {
- if ($entities != XML_UTIL_ENTITIES_NONE) {
- $value = XML_Util::replaceEntities($value, $entities);
- }
- if ($first) {
- $string .= ' ' . $key . '="' . $value . '"';
- $first = false;
- } else {
- $string .= $linebreak . $indent . $key . '="' . $value . '"';
- }
- }
- }
- }
- return $string;
- }
-
- /**
- * Collapses empty tags.
- *
- * @param string $xml XML
- * @param int $mode Whether to collapse all empty tags (XML_UTIL_COLLAPSE_ALL)
- * or only XHTML (XML_UTIL_COLLAPSE_XHTML_ONLY) ones.
- *
- * @return string XML
- */
- public static function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
- {
- if ($mode == XML_UTIL_COLLAPSE_XHTML_ONLY) {
- return preg_replace(
- '/<(area|base(?:font)?|br|col|frame|hr|img|input|isindex|link|meta|'
- . 'param)([^>]*)><\/\\1>/s',
- '<\\1\\2 />',
- $xml
- );
- } else {
- return preg_replace('/<(\w+)([^>]*)><\/\\1>/s', '<\\1\\2 />', $xml);
- }
- }
-
- /**
- * Create a tag
- *
- * This method will call XML_Util::createTagFromArray(), which
- * is more flexible.
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML tag:
- * $tag = XML_Util::createTag('myNs:myTag',
- * array('foo' => 'bar'),
- * 'This is inside the tag',
- * 'http://www.w3c.org/myNs#');
- * </code>
- *
- * @param string $qname qualified tagname (including namespace)
- * @param array $attributes array containg attributes
- * @param mixed $content the content
- * @param string $namespaceUri URI of the namespace
- * @param int $replaceEntities whether to replace XML special chars in
- * content, embedd it in a CData section
- * or none of both
- * @param bool $multiline whether to create a multiline tag where
- * each attribute gets written to a single line
- * @param string $indent string used to indent attributes
- * (_auto indents attributes so they start
- * at the same column)
- * @param string $linebreak string used for linebreaks
- * @param bool $sortAttributes Whether to sort the attributes or not
- *
- * @return string XML tag
- * @see createTagFromArray()
- * @uses createTagFromArray() to create the tag
- */
- public static function createTag(
- $qname, $attributes = array(), $content = null,
- $namespaceUri = null, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
- $multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true
- ) {
- $tag = array(
- 'qname' => $qname,
- 'attributes' => $attributes
- );
-
- // add tag content
- if ($content !== null) {
- $tag['content'] = $content;
- }
-
- // add namespace Uri
- if ($namespaceUri !== null) {
- $tag['namespaceUri'] = $namespaceUri;
- }
-
- return XML_Util::createTagFromArray(
- $tag, $replaceEntities, $multiline,
- $indent, $linebreak, $sortAttributes
- );
- }
-
- /**
- * Create a tag from an array.
- * This method awaits an array in the following format
- * <pre>
- * array(
- * // qualified name of the tag
- * 'qname' => $qname
- *
- * // namespace prefix (optional, if qname is specified or no namespace)
- * 'namespace' => $namespace
- *
- * // local part of the tagname (optional, if qname is specified)
- * 'localpart' => $localpart,
- *
- * // array containing all attributes (optional)
- * 'attributes' => array(),
- *
- * // tag content (optional)
- * 'content' => $content,
- *
- * // namespaceUri for the given namespace (optional)
- * 'namespaceUri' => $namespaceUri
- * )
- * </pre>
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * $tag = array(
- * 'qname' => 'foo:bar',
- * 'namespaceUri' => 'http://foo.com',
- * 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- * 'content' => 'I\'m inside the tag',
- * );
- * // creating a tag with qualified name and namespaceUri
- * $string = XML_Util::createTagFromArray($tag);
- * </code>
- *
- * @param array $tag tag definition
- * @param int $replaceEntities whether to replace XML special chars in
- * content, embedd it in a CData section
- * or none of both
- * @param bool $multiline whether to create a multiline tag where each
- * attribute gets written to a single line
- * @param string $indent string used to indent attributes
- * (_auto indents attributes so they start
- * at the same column)
- * @param string $linebreak string used for linebreaks
- * @param bool $sortAttributes Whether to sort the attributes or not
- *
- * @return string XML tag
- *
- * @see createTag()
- * @uses attributesToString() to serialize the attributes of the tag
- * @uses splitQualifiedName() to get local part and namespace of a qualified name
- * @uses createCDataSection()
- * @uses raiseError()
- */
- public static function createTagFromArray(
- $tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
- $multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true
- ) {
- if (isset($tag['content']) && !is_scalar($tag['content'])) {
- return XML_Util::raiseError(
- 'Supplied non-scalar value as tag content',
- XML_UTIL_ERROR_NON_SCALAR_CONTENT
- );
- }
-
- if (!isset($tag['qname']) && !isset($tag['localPart'])) {
- return XML_Util::raiseError(
- 'You must either supply a qualified name '
- . '(qname) or local tag name (localPart).',
- XML_UTIL_ERROR_NO_TAG_NAME
- );
- }
-
- // if no attributes hav been set, use empty attributes
- if (!isset($tag['attributes']) || !is_array($tag['attributes'])) {
- $tag['attributes'] = array();
- }
-
- if (isset($tag['namespaces'])) {
- foreach ($tag['namespaces'] as $ns => $uri) {
- $tag['attributes']['xmlns:' . $ns] = $uri;
- }
- }
-
- if (!isset($tag['qname'])) {
- // qualified name is not given
-
- // check for namespace
- if (isset($tag['namespace']) && !empty($tag['namespace'])) {
- $tag['qname'] = $tag['namespace'] . ':' . $tag['localPart'];
- } else {
- $tag['qname'] = $tag['localPart'];
- }
- } elseif (isset($tag['namespaceUri']) && !isset($tag['namespace'])) {
- // namespace URI is set, but no namespace
-
- $parts = XML_Util::splitQualifiedName($tag['qname']);
-
- $tag['localPart'] = $parts['localPart'];
- if (isset($parts['namespace'])) {
- $tag['namespace'] = $parts['namespace'];
- }
- }
-
- if (isset($tag['namespaceUri']) && !empty($tag['namespaceUri'])) {
- // is a namespace given
- if (isset($tag['namespace']) && !empty($tag['namespace'])) {
- $tag['attributes']['xmlns:' . $tag['namespace']]
- = $tag['namespaceUri'];
- } else {
- // define this Uri as the default namespace
- $tag['attributes']['xmlns'] = $tag['namespaceUri'];
- }
- }
-
- // check for multiline attributes
- if ($multiline === true) {
- if ($indent === '_auto') {
- $indent = str_repeat(' ', (strlen($tag['qname'])+2));
- }
- }
-
- // create attribute list
- $attList = XML_Util::attributesToString(
- $tag['attributes'],
- $sortAttributes, $multiline, $indent, $linebreak
- );
- if (!isset($tag['content']) || (string)$tag['content'] == '') {
- $tag = sprintf('<%s%s />', $tag['qname'], $attList);
- } else {
- switch ($replaceEntities) {
- case XML_UTIL_ENTITIES_NONE:
- break;
- case XML_UTIL_CDATA_SECTION:
- $tag['content'] = XML_Util::createCDataSection($tag['content']);
- break;
- default:
- $tag['content'] = XML_Util::replaceEntities(
- $tag['content'], $replaceEntities
- );
- break;
- }
- $tag = sprintf(
- '<%s%s>%s</%s>', $tag['qname'], $attList, $tag['content'],
- $tag['qname']
- );
- }
- return $tag;
- }
-
- /**
- * Create a start element
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML start element:
- * $tag = XML_Util::createStartElement('myNs:myTag',
- * array('foo' => 'bar') ,'http://www.w3c.org/myNs#');
- * </code>
- *
- * @param string $qname qualified tagname (including namespace)
- * @param array $attributes array containg attributes
- * @param string $namespaceUri URI of the namespace
- * @param bool $multiline whether to create a multiline tag where each
- * attribute gets written to a single line
- * @param string $indent string used to indent attributes (_auto indents
- * attributes so they start at the same column)
- * @param string $linebreak string used for linebreaks
- * @param bool $sortAttributes Whether to sort the attributes or not
- *
- * @return string XML start element
- * @see createEndElement(), createTag()
- */
- public static function createStartElement(
- $qname, $attributes = array(), $namespaceUri = null,
- $multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true
- ) {
- // if no attributes hav been set, use empty attributes
- if (!isset($attributes) || !is_array($attributes)) {
- $attributes = array();
- }
-
- if ($namespaceUri != null) {
- $parts = XML_Util::splitQualifiedName($qname);
- }
-
- // check for multiline attributes
- if ($multiline === true) {
- if ($indent === '_auto') {
- $indent = str_repeat(' ', (strlen($qname)+2));
- }
- }
-
- if ($namespaceUri != null) {
- // is a namespace given
- if (isset($parts['namespace']) && !empty($parts['namespace'])) {
- $attributes['xmlns:' . $parts['namespace']] = $namespaceUri;
- } else {
- // define this Uri as the default namespace
- $attributes['xmlns'] = $namespaceUri;
- }
- }
-
- // create attribute list
- $attList = XML_Util::attributesToString(
- $attributes, $sortAttributes,
- $multiline, $indent, $linebreak
- );
- $element = sprintf('<%s%s>', $qname, $attList);
- return $element;
- }
-
- /**
- * Create an end element
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML start element:
- * $tag = XML_Util::createEndElement('myNs:myTag');
- * </code>
- *
- * @param string $qname qualified tagname (including namespace)
- *
- * @return string XML end element
- * @see createStartElement(), createTag()
- */
- public static function createEndElement($qname)
- {
- $element = sprintf('</%s>', $qname);
- return $element;
- }
-
- /**
- * Create an XML comment
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML start element:
- * $tag = XML_Util::createComment('I am a comment');
- * </code>
- *
- * @param string $content content of the comment
- *
- * @return string XML comment
- */
- public static function createComment($content)
- {
- $comment = sprintf('<!-- %s -->', $content);
- return $comment;
- }
-
- /**
- * Create a CData section
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create a CData section
- * $tag = XML_Util::createCDataSection('I am content.');
- * </code>
- *
- * @param string $data data of the CData section
- *
- * @return string CData section with content
- */
- public static function createCDataSection($data)
- {
- return sprintf(
- '<![CDATA[%s]]>',
- preg_replace('/\]\]>/', ']]]]><![CDATA[>', strval($data))
- );
- }
-
- /**
- * Split qualified name and return namespace and local part
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // split qualified tag
- * $parts = XML_Util::splitQualifiedName('xslt:stylesheet');
- * </code>
- * the returned array will contain two elements:
- * <pre>
- * array(
- * 'namespace' => 'xslt',
- * 'localPart' => 'stylesheet'
- * );
- * </pre>
- *
- * @param string $qname qualified tag name
- * @param string $defaultNs default namespace (optional)
- *
- * @return array array containing namespace and local part
- */
- public static function splitQualifiedName($qname, $defaultNs = null)
- {
- if (strstr($qname, ':')) {
- $tmp = explode(':', $qname);
- return array(
- 'namespace' => $tmp[0],
- 'localPart' => $tmp[1]
- );
- }
- return array(
- 'namespace' => $defaultNs,
- 'localPart' => $qname
- );
- }
-
- /**
- * Check, whether string is valid XML name
- *
- * <p>XML names are used for tagname, attribute names and various
- * other, lesser known entities.</p>
- * <p>An XML name may only consist of alphanumeric characters,
- * dashes, undescores and periods, and has to start with a letter
- * or an underscore.</p>
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // verify tag name
- * $result = XML_Util::isValidName('invalidTag?');
- * if (is_a($result, 'PEAR_Error')) {
- * print 'Invalid XML name: ' . $result->getMessage();
- * }
- * </code>
- *
- * @param string $string string that should be checked
- *
- * @return mixed true, if string is a valid XML name, PEAR error otherwise
- *
- * @todo support for other charsets
- * @todo PEAR CS - unable to avoid 85-char limit on second preg_match
- */
- public static function isValidName($string)
- {
- // check for invalid chars
- if (!preg_match('/^[[:alpha:]_]\\z/', $string{0})) {
- return XML_Util::raiseError(
- 'XML names may only start with letter or underscore',
- XML_UTIL_ERROR_INVALID_START
- );
- }
-
- // check for invalid chars
- $match = preg_match(
- '/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?'
- . '[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/',
- $string
- );
- if (!$match) {
- return XML_Util::raiseError(
- 'XML names may only contain alphanumeric '
- . 'chars, period, hyphen, colon and underscores',
- XML_UTIL_ERROR_INVALID_CHARS
- );
- }
- // XML name is valid
- return true;
- }
-
- /**
- * Replacement for XML_Util::raiseError
- *
- * Avoids the necessity to always require
- * PEAR.php
- *
- * @param string $msg error message
- * @param int $code error code
- *
- * @return PEAR_Error
- * @todo PEAR CS - should this use include_once instead?
- */
- public static function raiseError($msg, $code)
- {
- include_once 'phar://install-pear-nozlib.phar/' . 'PEAR.php';
- return PEAR::raiseError($msg, $code);
- }
-}
-?>
-package.xml
-<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>XML_Util</name>
- <channel>pear.php.net</channel>
- <summary>XML utility class</summary>
- <description>Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more.</description>
- <lead>
- <name>Chuck Burgess</name>
- <user>ashnazg</user>
- <email>ashnazg@php.net</email>
- <active>yes</active>
- </lead>
- <lead>
- <name>Stephan Schmidt</name>
- <user>schst</user>
- <email>schst@php-tools.net</email>
- <active>no</active>
- </lead>
- <helper>
- <name>Davey Shafik</name>
- <user>davey</user>
- <email>davey@php.net</email>
- <active>no</active>
- </helper>
- <date>2015-02-27</date>
- <time>12:11:41</time>
- <version>
- <release>1.3.0</release>
- <api>1.3.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-* Set minimum PHP version to 5.3.0
-* Mark static methods with static keyword
- </notes>
- <contents>
- <dir baseinstalldir="/" name="/">
- <file baseinstalldir="/" md5sum="af2746028ae4395f549855a5e444ada7" name="examples/example.php" role="doc" />
- <file baseinstalldir="/" md5sum="b9e52f4aa372c4067c609f49c2285b8f" name="examples/example2.php" role="doc" />
- <file baseinstalldir="/" md5sum="73088689d58b71cd4f86013c88b72216" name="tests/testBasic_apiVersion.phpt" role="test" />
- <file baseinstalldir="/" md5sum="4b17c0df7fbfb1bb2f3f636ebd6c2cbd" name="tests/testBasic_attributesToString.phpt" role="test" />
- <file baseinstalldir="/" md5sum="dc4202f1451bbeb62a5bc7d56a7c774c" name="tests/testBasic_collapseEmptyTags.phpt" role="test" />
- <file baseinstalldir="/" md5sum="4c87fda94fdfb7a78ba84998d6e28f45" name="tests/testBasic_createCDataSection.phpt" role="test" />
- <file baseinstalldir="/" md5sum="c101844768f146653c59c81978060158" name="tests/testBasic_createComment.phpt" role="test" />
- <file baseinstalldir="/" md5sum="ba75d66c2f0fb0010c71f3bcd1f64eb2" name="tests/testBasic_createEndElement.phpt" role="test" />
- <file baseinstalldir="/" md5sum="ad786fb687e1eea1f6890a7424709c79" name="tests/testBasic_createStartElement.phpt" role="test" />
- <file baseinstalldir="/" md5sum="5f453edadebaa3435c8e6f09a3aaaa9c" name="tests/testBasic_createTag.phpt" role="test" />
- <file baseinstalldir="/" md5sum="637fa86b8bcf0086334f69004a435169" name="tests/testBasic_createTagFromArray.phpt" role="test" />
- <file baseinstalldir="/" md5sum="817882a0ab33e60f17ee71874ad975f0" name="tests/testBasic_getDocTypeDeclaration.phpt" role="test" />
- <file baseinstalldir="/" md5sum="5bc1926a488a6b63ec6366bfcf06a50a" name="tests/testBasic_getXmlDeclaration.phpt" role="test" />
- <file baseinstalldir="/" md5sum="a727860d55c14194fdaffa839a59a540" name="tests/testBasic_isValidName.phpt" role="test" />
- <file baseinstalldir="/" md5sum="300a6192f7cc6f7bc3d8f2576b51e4b0" name="tests/testBasic_raiseError.phpt" role="test" />
- <file baseinstalldir="/" md5sum="e6717d43001775cccd52bd5195cf02e0" name="tests/testBasic_replaceEntities.phpt" role="test" />
- <file baseinstalldir="/" md5sum="431856aa83a23396a9f00915dd2be192" name="tests/testBasic_reverseEntities.phpt" role="test" />
- <file baseinstalldir="/" md5sum="ab035534463cae8cc903e907aead8ffe" name="tests/testBasic_splitQualifiedName.phpt" role="test" />
- <file baseinstalldir="/" md5sum="1850856692ff6c6df5e8acb16e1080ce" name="tests/testBug_4950.phpt" role="test" />
- <file baseinstalldir="/" md5sum="b4127883df40a4b0d1736ad42215ee25" name="tests/testBug_5392.phpt" role="test" />
- <file baseinstalldir="/" md5sum="b133427f8ea9b60c5bec7400cd5e4c7f" name="tests/testBug_18343.phpt" role="test" />
- <file baseinstalldir="/" md5sum="b702b9cd014402420453c66ae7a96803" name="XML/Util.php" role="php">
- <tasks:replace from="@version@" to="version" type="package-info" />
- </file>
- </dir>
- </contents>
- <dependencies>
- <required>
- <php>
- <min>5.3.0</min>
- </php>
- <pearinstaller>
- <min>1.4.3</min>
- </pearinstaller>
- <extension>
- <name>pcre</name>
- </extension>
- </required>
- </dependencies>
- <phprelease />
- <changelog>
- <release>
- <version>
- <release>0.1</release>
- <api>0.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-08-01</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-inital release
- </notes>
- </release>
- <release>
- <version>
- <release>0.1.1</release>
- <api>0.1.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-08-02</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-bugfix: removed bug in createTagFromArray
- </notes>
- </release>
- <release>
- <version>
- <release>0.2</release>
- <api>0.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-08-12</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-added XML_Util::getDocTypeDeclaration()
- </notes>
- </release>
- <release>
- <version>
- <release>0.2.1</release>
- <api>0.2.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-09-05</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-fixed bug with zero as tag content in createTagFromArray and createTag
- </notes>
- </release>
- <release>
- <version>
- <release>0.3</release>
- <api>0.3</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-09-12</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-added createStartElement() and createEndElement()
- </notes>
- </release>
- <release>
- <version>
- <release>0.4</release>
- <api>0.4</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-09-21</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-added createCDataSection(),
-added support for CData sections in createTag* methods,
-fixed bug #23,
-fixed bug in splitQualifiedName()
- </notes>
- </release>
- <release>
- <version>
- <release>0.5</release>
- <api>0.5</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-09-23</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-added support for multiline attributes in attributesToString(), createTag*() and createStartElement (requested by Yavor Shahpasov for XML_Serializer),
-added createComment
- </notes>
- </release>
- <release>
- <version>
- <release>0.5.1</release>
- <api>0.5.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-09-26</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-added default namespace parameter (optional) in splitQualifiedName() (requested by Sebastian Bergmann)
- </notes>
- </release>
- <release>
- <version>
- <release>0.5.2</release>
- <api>0.5.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2003-11-22</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-now creates XHTML compliant empty tags (Davey),
-minor whitespace fixes (Davey)
- </notes>
- </release>
- <release>
- <version>
- <release>0.6.0beta1</release>
- <api>0.6.0beta1</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2004-05-24</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- Fixed bug 1438 (namespaces not accepted for isValidName()) (thanks to davey)
-- added optional parameter to replaceEntities() to define the set of entities to replace
-- added optional parameter to attributesToString() to define, whether entities should be replaced (requested by Sebastian Bergmann)
-- allowed second parameter to XML_Util::attributesToString() to be an array containing options (easier to use, if you only need to set the last parameter)
-- introduced XML_Util::raiseError() to avoid the necessity of including PEAR.php, will only be included on error
- </notes>
- </release>
- <release>
- <version>
- <release>0.6.0</release>
- <api>0.6.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2004-06-07</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- Fixed bug 1438 (namespaces not accepted for isValidName()) (thanks to davey)
-- added optional parameter to replaceEntities() to define the set of entities to replace
-- added optional parameter to attributesToString() to define, whether entities should be replaced (requested by Sebastian Bergmann)
-- allowed second parameter to XML_Util::attributesToString() to be an array containing options (easier to use, if you only need to set the last parameter)
-- introduced XML_Util::raiseError() to avoid the necessity of including PEAR.php, will only be included on error
- </notes>
- </release>
- <release>
- <version>
- <release>0.6.1</release>
- <api>0.6.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2004-10-28</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- Added check for tag name (either as local part or qualified name) in createTagFromArray() (bug #1083)
- </notes>
- </release>
- <release>
- <version>
- <release>1.0.0</release>
- <api>1.0.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2004-10-28</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- Added reverseEntities() (request #2639)
- </notes>
- </release>
- <release>
- <version>
- <release>1.1.0</release>
- <api>1.1.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2004-11-19</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- Added collapseEmptyTags (patch by Sebastian Bergmann and Thomas Duffey)
- </notes>
- </release>
- <release>
- <version>
- <release>1.1.1</release>
- <api>1.1.1</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2004-12-23</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- fixed bug in replaceEntities() and reverseEntities() in conjunction with XML_UTIL_ENTITIES_HTML
-- createTag() and createTagFromArray() now accept XML_UTIL_ENTITIES_XML, XML_UTIL_ENTITIES_XML_REQUIRED, XML_UTIL_ENTITIES_HTML, XML_UTIL_ENTITIES_NONE and XML_UTIL_CDATA_SECTION as $replaceEntities parameter
- </notes>
- </release>
- <release>
- <version>
- <release>1.1.2</release>
- <api>1.1.2</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2006-12-01</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- fixed bug #5419: isValidName() now checks for character classes
-- implemented request #8196: added optional parameter to influence array sorting to createTag() createTagFromArray() and createStartElement()
- </notes>
- </release>
- <release>
- <version>
- <release>1.1.4</release>
- <api>1.1.4</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2006-12-16</date>
- <license uri="http://www.php.net/license">PHP License</license>
- <notes>
-- Fixed bug #9561: Not allowing underscores in middle of tags
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.0a1</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2008-05-04</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-Changed license to New BSD License (Req #13826 [ashnazg])
-Added a test suite against all API methods [ashnazg]
-Switch to package.xml v2 [ashnazg]
-Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|ja.doma]
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.0a2</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>alpha</release>
- <api>alpha</api>
- </stability>
- <date>2008-05-22</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-Changed license to New BSD License (Req #13826 [ashnazg])
-Added a test suite against all API methods [ashnazg]
-Switch to package.xml v2 [ashnazg]
-Added Req #13839: Missing XHTML empty tags to collapse [ashnazg|drry]
-Fixed Bug #5392: encoding of ISO-8859-1 is the only supported encoding [ashnazg]
-Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|drry]
--- (this fix differs from the one in v1.2.0a1)
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.0RC1</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>beta</release>
- <api>beta</api>
- </stability>
- <date>2008-07-12</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-Changed license to New BSD License (Req #13826 [ashnazg])
-Added a test suite against all API methods [ashnazg]
-Switch to package.xml v2 [ashnazg]
-Added Req #13839: Missing XHTML empty tags to collapse [ashnazg|drry]
-Fixed Bug #5392: encoding of ISO-8859-1 is the only supported encoding [ashnazg]
-Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|drry]
--- (this fix differs from the one in v1.2.0a1)
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.0</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2008-07-26</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-Changed license to New BSD License (Req #13826 [ashnazg])
-Added a test suite against all API methods [ashnazg]
-Switch to package.xml v2 [ashnazg]
-Added Req #13839: Missing XHTML empty tags to collapse [ashnazg|drry]
-Fixed Bug #5392: encoding of ISO-8859-1 is the only supported encoding [ashnazg]
-Fixed Bug #4950: Incorrect CDATA serializing [ashnazg|drry]
--- (this fix differs from the one in v1.2.0a1)
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.1</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2011-12-31</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-Fixed Bug #14760: Bug in getDocTypeDeclaration() [ashnazg|fpospisil]
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.2</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2014-06-07</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-QA release
-
-Bug #18343 Entities in file names decoded during packaging
-Bug #19174 upgrade PHPUnit require statements &amp; other fixes (for PEAR QA Team)
-Request #19750 examples/example.php encoding
- </notes>
- </release>
- <release>
- <version>
- <release>1.2.3</release>
- <api>1.2.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2014-06-07</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-Bug #20293 Broken installation for 1.2.2
- </notes>
- </release>
- <release>
- <version>
- <release>1.3.0</release>
- <api>1.3.0</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <date>2015-02-27</date>
- <license uri="http://opensource.org/licenses/bsd-license">BSD License</license>
- <notes>
-* Set minimum PHP version to 5.3.0
-* Mark static methods with static keyword
- </notes>
- </release>
- </changelog>
-</package>
-
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Examples (file #1)
- *
- * several examples for the methods of XML_Util
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2003-2008 Stephan Schmidt <schst@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category XML
- * @package XML_Util
- * @subpackage Examples
- * @author Stephan Schmidt <schst@php.net>
- * @copyright 2003-2008 Stephan Schmidt <schst@php.net>
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/XML_Util
- */
-
- /**
- * set error level
- */
- error_reporting(E_ALL);
-
- require_once 'XML/Util.php';
-
- /**
- * replacing XML entities
- */
- print 'replace XML entities:<br>';
- print XML_Util::replaceEntities('This string contains < & >.');
- print "\n<br><br>\n";
-
- /**
- * reversing XML entities
- */
- print 'replace XML entities:<br>';
- print XML_Util::reverseEntities('This string contains &lt; &amp; &gt;.');
- print "\n<br><br>\n";
-
- /**
- * building XML declaration
- */
- print 'building XML declaration:<br>';
- print htmlspecialchars(XML_Util::getXMLDeclaration());
- print "\n<br><br>\n";
-
- print 'building XML declaration with additional attributes:<br>';
- print htmlspecialchars(XML_Util::getXMLDeclaration('1.0', 'UTF-8', true));
- print "\n<br><br>\n";
-
- /**
- * building document type declaration
- */
- print 'building DocType declaration:<br>';
- print htmlspecialchars(XML_Util::getDocTypeDeclaration('package',
- 'http://pear.php.net/dtd/package-1.0'));
- print "\n<br><br>\n";
-
- print 'building DocType declaration with public ID (does not exist):<br>';
- print htmlspecialchars(XML_Util::getDocTypeDeclaration('package',
- array('uri' => 'http://pear.php.net/dtd/package-1.0',
- 'id' => '-//PHP//PEAR/DTD PACKAGE 0.1')));
- print "\n<br><br>\n";
-
- print 'building DocType declaration with internal DTD:<br>';
- print '<pre>';
- print htmlspecialchars(XML_Util::getDocTypeDeclaration('package',
- 'http://pear.php.net/dtd/package-1.0',
- '<!ELEMENT additionalInfo (#PCDATA)>'));
- print '</pre>';
- print "\n<br><br>\n";
-
- /**
- * creating an attribute string
- */
- $att = array(
- 'foo' => 'bar',
- 'argh' => 'tomato'
- );
-
- print 'converting array to string:<br>';
- print XML_Util::attributesToString($att);
- print "\n<br><br>\n";
-
-
- /**
- * creating an attribute string with linebreaks
- */
- $att = array(
- 'foo' => 'bar',
- 'argh' => 'tomato'
- );
-
- print 'converting array to string (including line breaks):<br>';
- print '<pre>';
- print XML_Util::attributesToString($att, true, true);
- print '</pre>';
- print "\n<br><br>\n";
-
-
- /**
- * splitting a qualified tag name
- */
- print 'splitting qualified tag name:<br>';
- print '<pre>';
- print_r(XML_Util::splitQualifiedName('xslt:stylesheet'));
- print '</pre>';
- print "\n<br>\n";
-
-
- /**
- * splitting a qualified tag name (no namespace)
- */
- print 'splitting qualified tag name (no namespace):<br>';
- print '<pre>';
- print_r(XML_Util::splitQualifiedName('foo'));
- print '</pre>';
- print "\n<br>\n";
-
- /**
- * splitting a qualified tag name (no namespace, but default namespace specified)
- */
- print 'splitting qualified tag name '
- . '(no namespace, but default namespace specified):<br>';
- print '<pre>';
- print_r(XML_Util::splitQualifiedName('foo', 'bar'));
- print '</pre>';
- print "\n<br>\n";
-
- /**
- * verifying XML names
- */
- print 'verifying \'My private tag\':<br>';
- print '<pre>';
- print_r(XML_Util::isValidname('My Private Tag'));
- print '</pre>';
- print "\n<br><br>\n";
-
- print 'verifying \'-MyTag\':<br>';
- print '<pre>';
- print_r(XML_Util::isValidname('-MyTag'));
- print '</pre>';
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag
- */
- $tag = array(
- 'namespace' => 'foo',
- 'localPart' => 'bar',
- 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- 'content' => 'I\'m inside the tag'
- );
-
- print 'creating a tag with namespace and local part:<br>';
- print htmlentities(XML_Util::createTagFromArray($tag));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag
- */
- $tag = array(
- 'qname' => 'foo:bar',
- 'namespaceUri' => 'http://foo.com',
- 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- 'content' => 'I\'m inside the tag'
- );
-
- print 'creating a tag with qualified name and namespaceUri:<br>';
- print htmlentities(XML_Util::createTagFromArray($tag));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag
- */
- $tag = array(
- 'qname' => 'bar',
- 'namespaceUri' => 'http://foo.com',
- 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable')
- );
-
- print 'creating an empty tag without namespace but namespace Uri:<br>';
- print htmlentities(XML_Util::createTagFromArray($tag));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag with more namespaces
- */
- $tag = array(
- 'namespace' => 'foo',
- 'localPart' => 'bar',
- 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- 'content' => 'I\'m inside the tag',
- 'namespaces' => array(
- 'bar' => 'http://bar.com',
- 'pear' => 'http://pear.php.net',
- )
- );
-
- print 'creating an XML tag with more namespaces:<br />';
- print htmlentities(XML_Util::createTagFromArray($tag));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag with a CData Section
- */
- $tag = array(
- 'qname' => 'foo',
- 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- 'content' => 'I\'m inside the tag'
- );
-
- print 'creating a tag with CData section:<br>';
- print htmlentities(XML_Util::createTagFromArray($tag, XML_UTIL_CDATA_SECTION));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag with a CData Section
- */
- $tag = array(
- 'qname' => 'foo',
- 'attributes' => array('key' => 'value', 'argh' => 'tütü'),
- 'content' =>
- 'Also XHTML-tags can be created '
- . 'and HTML entities can be replaced Ä ä Ü ö <>.'
- );
-
- print 'creating a tag with HTML entities:<br>';
- print htmlentities(XML_Util::createTagFromArray($tag, XML_UTIL_ENTITIES_HTML));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag with createTag
- */
- print 'creating a tag with createTag:<br>';
- print htmlentities(XML_Util::createTag('myNs:myTag',
- array('foo' => 'bar'),
- 'This is inside the tag',
- 'http://www.w3c.org/myNs#'));
- print "\n<br><br>\n";
-
-
- /**
- * trying to create an XML tag with an array as content
- */
- $tag = array(
- 'qname' => 'bar',
- 'content' => array('foo' => 'bar')
- );
- print 'trying to create an XML tag with an array as content:<br>';
- print '<pre>';
- print_r(XML_Util::createTagFromArray($tag));
- print '</pre>';
- print "\n<br><br>\n";
-
- /**
- * trying to create an XML tag without a name
- */
- $tag = array(
- 'attributes' => array('foo' => 'bar'),
- );
- print 'trying to create an XML tag without a name:<br>';
- print '<pre>';
- print_r(XML_Util::createTagFromArray($tag));
- print '</pre>';
- print "\n<br><br>\n";
-?>
-
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Examples (file #2)
- *
- * several examples for the methods of XML_Util
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2003-2008 Stephan Schmidt <schst@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category XML
- * @package XML_Util
- * @subpackage Examples
- * @author Stephan Schmidt <schst@php.net>
- * @copyright 2003-2008 Stephan Schmidt <schst@php.net>
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/XML_Util
- */
-
- /**
- * set error level
- */
- error_reporting(E_ALL);
-
- require_once 'XML/Util.php';
-
- /**
- * creating a start element
- */
- print 'creating a start element:<br>';
- print htmlentities(XML_Util::createStartElement('myNs:myTag',
- array('foo' => 'bar'), 'http://www.w3c.org/myNs#'));
- print "\n<br><br>\n";
-
-
- /**
- * creating a start element
- */
- print 'creating a start element:<br>';
- print htmlentities(XML_Util::createStartElement('myTag',
- array(), 'http://www.w3c.org/myNs#'));
- print "\n<br><br>\n";
-
- /**
- * creating a start element
- */
- print 'creating a start element:<br>';
- print '<pre>';
- print htmlentities(XML_Util::createStartElement('myTag',
- array('foo' => 'bar', 'argh' => 'tomato'),
- 'http://www.w3c.org/myNs#', true));
- print '</pre>';
- print "\n<br><br>\n";
-
-
- /**
- * creating an end element
- */
- print 'creating an end element:<br>';
- print htmlentities(XML_Util::createEndElement('myNs:myTag'));
- print "\n<br><br>\n";
-
- /**
- * creating a CData section
- */
- print 'creating a CData section:<br>';
- print htmlentities(XML_Util::createCDataSection('I am content.'));
- print "\n<br><br>\n";
-
- /**
- * creating a comment
- */
- print 'creating a comment:<br>';
- print htmlentities(XML_Util::createComment('I am a comment.'));
- print "\n<br><br>\n";
-
- /**
- * creating an XML tag with multiline mode
- */
- $tag = array(
- 'qname' => 'foo:bar',
- 'namespaceUri' => 'http://foo.com',
- 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- 'content' => 'I\'m inside the tag & contain dangerous chars'
- );
-
- print 'creating a tag with qualified name and namespaceUri:<br>';
- print '<pre>';
- print htmlentities(XML_Util::createTagFromArray($tag,
- XML_UTIL_REPLACE_ENTITIES, true));
- print '</pre>';
- print "\n<br><br>\n";
-
- /**
- * create an attribute string without replacing the entities
- */
- $atts = array('series' => 'Starsky &amp; Hutch', 'channel' => 'ABC');
- print 'creating a attribute string, '
- . 'entities in values already had been replaced:<br>';
- print htmlentities(XML_Util::attributesToString($atts,
- true, false, false, false, XML_UTIL_ENTITIES_NONE));
- print "\n<br><br>\n";
-
- /**
- * using the array-syntax for attributesToString()
- */
- $atts = array('series' => 'Starsky &amp; Hutch', 'channel' => 'ABC');
- print 'using the array-syntax for attributesToString()<br>';
- print htmlentities(XML_Util::attributesToString($atts,
- array('entities' => XML_UTIL_ENTITIES_NONE)));
- print "\n<br><br>\n";
-
-
-?>
-
-XML_Util::apiVersion() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::apiVersion() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic apiVersion() call" . PHP_EOL;
-echo XML_Util::apiVersion() . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::apiVersion() basic tests=====
-
-TEST: basic apiVersion() call
-1.1
-
-XML_Util::attributesToString() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::attributesToString() basic tests=====' . PHP_EOL . PHP_EOL;
-
-$att = array("foo" => "bar", "boo" => "baz");
-$sort1 = array(
- 'multiline' => true,
- 'indent' => '----',
- 'linebreak' => "^",
- 'entities' => XML_UTIL_ENTITIES_XML,
- 'sort' => true
-);
-$sort2 = array(
- 'multiline' => true,
- 'indent' => '----',
- 'linebreak' => "^",
- 'entities' => XML_UTIL_ENTITIES_XML,
-);
-
-echo "TEST: basic usage" . PHP_EOL;
-echo XML_Util::attributesToString($att) . PHP_EOL . PHP_EOL;
-
-echo "TEST: explicit \$sort = true" . PHP_EOL;
-echo XML_Util::attributesToString($att, true) . PHP_EOL . PHP_EOL;
-
-echo "TEST: explicit \$sort = false" . PHP_EOL;
-echo XML_Util::attributesToString($att, false) . PHP_EOL . PHP_EOL;
-
-echo "TEST: explicit \$multiline = false" . PHP_EOL;
-echo XML_Util::attributesToString($att, true, false) . PHP_EOL . PHP_EOL;
-
-echo "TEST: explicit \$multiline = true" . PHP_EOL;
-echo XML_Util::attributesToString($att, true, true) . PHP_EOL . PHP_EOL;
-
-echo "TEST: explicit \$indent = ' ' (8 spaces)" . PHP_EOL;
-echo XML_Util::attributesToString($att, true, true, ' ') . PHP_EOL . PHP_EOL;
-
-echo "TEST: explicit \$linebreak = '^' (some dummy char)" . PHP_EOL;
-echo XML_Util::attributesToString($att, true, true, '^') . PHP_EOL . PHP_EOL;
-
-echo "TEST: passing \$sort array of options that includes 'sort'" . PHP_EOL;
-echo XML_Util::attributesToString($att, $sort1) . PHP_EOL . PHP_EOL;
-
-echo "TEST: passing \$sort array of options that doesn't include 'sort'" . PHP_EOL;
-echo XML_Util::attributesToString($att, $sort2) . PHP_EOL . PHP_EOL;
-
-echo "TEST: do not replace entities" . PHP_EOL;
-$arr = array("foo" => "b@&r", "boo" => "b><z");
-echo XML_Util::attributesToString($arr, true, false, ' ', PHP_EOL,
- XML_UTIL_ENTITIES_NONE) . PHP_EOL . PHP_EOL;
-
-echo "TEST: replace all XML entities" . PHP_EOL;
-$arr = array("foo" => "b@&r", "boo" => "b><z");
-echo XML_Util::attributesToString($arr, true, false, ' ', PHP_EOL,
- XML_UTIL_ENTITIES_XML) . PHP_EOL . PHP_EOL;
-
-echo "TEST: replace only required XML entities" . PHP_EOL;
-$arr = array("foo" => "b@&r", "boo" => "b><z");
-echo XML_Util::attributesToString($arr, true, false, ' ', PHP_EOL,
- XML_UTIL_ENTITIES_XML_REQUIRED) . PHP_EOL . PHP_EOL;
-
-echo "TEST: replace HTML entities" . PHP_EOL;
-$arr = array("foo" => "b@&r", "boo" => "b><z");
-echo XML_Util::attributesToString($arr, true, false, ' ', PHP_EOL,
- XML_UTIL_ENTITIES_HTML) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::attributesToString() basic tests=====
-
-TEST: basic usage
- boo="baz" foo="bar"
-
-TEST: explicit $sort = true
- boo="baz" foo="bar"
-
-TEST: explicit $sort = false
- foo="bar" boo="baz"
-
-TEST: explicit $multiline = false
- boo="baz" foo="bar"
-
-TEST: explicit $multiline = true
- boo="baz"
- foo="bar"
-
-TEST: explicit $indent = ' ' (8 spaces)
- boo="baz"
- foo="bar"
-
-TEST: explicit $linebreak = '^' (some dummy char)
- boo="baz"
-^foo="bar"
-
-TEST: passing $sort array of options that includes 'sort'
- boo="baz"
-----foo="bar"
-
-TEST: passing $sort array of options that doesn't include 'sort'
- boo="baz"
-----foo="bar"
-
-TEST: do not replace entities
- boo="b><z" foo="b@&r"
-
-TEST: replace all XML entities
- boo="b&gt;&lt;z" foo="b@&amp;r"
-
-TEST: replace only required XML entities
- boo="b>&lt;z" foo="b@&amp;r"
-
-TEST: replace HTML entities
- boo="b&gt;&lt;z" foo="b@&amp;r"
-
-XML_Util::collapseEmptyTags() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::collapseEmptyTags() basic tests=====' . PHP_EOL . PHP_EOL;
-
-$emptyTag = "<foo></foo>";
-$otherTag = "<bar>baz</bar>";
-$xhtmlTag = "<b></b>";
-
-echo "TEST: basic usage" . PHP_EOL;
-echo XML_Util::collapseEmptyTags($emptyTag) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage alongside non-empty tag" . PHP_EOL;
-echo XML_Util::collapseEmptyTags($emptyTag . $otherTag) . PHP_EOL . PHP_EOL;
-
-echo "TEST: one empty tag, with COLLAPSE_ALL set" . PHP_EOL;
-echo XML_Util::collapseEmptyTags($emptyTag, XML_UTIL_COLLAPSE_ALL) . PHP_EOL . PHP_EOL;
-
-echo "TEST: one empty tag alongside non-empty tag, with COLLAPSE_ALL set" . PHP_EOL;
-echo XML_Util::collapseEmptyTags($emptyTag . $otherTag, XML_UTIL_COLLAPSE_ALL) . PHP_EOL . PHP_EOL;
-
-echo "TEST: one empty tag, with COLLAPSE_XHTML_ONLY set" . PHP_EOL;
-echo XML_Util::collapseEmptyTags($emptyTag, XML_UTIL_COLLAPSE_XHTML_ONLY) . PHP_EOL . PHP_EOL;
-
-echo "TEST: one empty tag alongside non-empty tag, with COLLAPSE_XHTML_ONLY set" . PHP_EOL;
-echo XML_Util::collapseEmptyTags($emptyTag . $xhtmlTag . $otherTag, XML_UTIL_COLLAPSE_XHTML_ONLY) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::collapseEmptyTags() basic tests=====
-
-TEST: basic usage
-<foo />
-
-TEST: basic usage alongside non-empty tag
-<foo /><bar>baz</bar>
-
-TEST: one empty tag, with COLLAPSE_ALL set
-<foo />
-
-TEST: one empty tag alongside non-empty tag, with COLLAPSE_ALL set
-<foo /><bar>baz</bar>
-
-TEST: one empty tag, with COLLAPSE_XHTML_ONLY set
-<foo></foo>
-
-TEST: one empty tag alongside non-empty tag, with COLLAPSE_XHTML_ONLY set
-<foo></foo><b></b><bar>baz</bar>
-
-XML_Util::createCDataSection() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::createCDataSection() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage" . PHP_EOL;
-echo XML_Util::createCDataSection("I am content.") . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::createCDataSection() basic tests=====
-
-TEST: basic usage
-<![CDATA[I am content.]]>
-
-XML_Util::createComment() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::createComment() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage" . PHP_EOL;
-echo XML_Util::createComment("I am comment.") . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::createComment() basic tests=====
-
-TEST: basic usage
-<!-- I am comment. -->
-
-XML_Util::createEndElement() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::createEndElement() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage (myTag)" . PHP_EOL;
-echo XML_Util::createEndElement("myTag") . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a namespaced tag (myNs:myTag)" . PHP_EOL;
-echo XML_Util::createEndElement("myNs:myTag") . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::createEndElement() basic tests=====
-
-TEST: basic usage (myTag)
-</myTag>
-
-TEST: basic usage with a namespaced tag (myNs:myTag)
-</myNs:myTag>
-
-XML_Util::createStartElement() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::createStartElement() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag only" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag"
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar")
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag only, passing '' as attribute arg" . PHP_EOL;
-echo XML_Util::createStartElement(
- 'myNs:myTag',
- ''
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes and namespace" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar"),
- "http://www.w3c.org/myNs#"
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with empty attributes, whose namespaceUri is not a full namespace" . PHP_EOL;
-echo XML_Util::createStartElement(
- 'myTag',
- '',
- 'foo'
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes, namespace, and multiline = true" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar"),
- "http://www.w3c.org/myNs#",
- true
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes, namespace, multiline = true, and indent = (2 spaces only)" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar"),
- "http://www.w3c.org/myNs#",
- true,
- ' '
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), and linebreak = '^'" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar"),
- "http://www.w3c.org/myNs#",
- true,
- ' ',
- '^'
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), linebreak = '^', and sortAttributes = true" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar", "boo" => "baz"),
- "http://www.w3c.org/myNs#",
- true,
- ' ',
- '^',
- true
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), linebreak = '^', and sortAttributes = false" . PHP_EOL;
-echo XML_Util::createStartElement(
- "myNs:myTag",
- array("foo" => "bar", "boo" => "baz"),
- "http://www.w3c.org/myNs#",
- true,
- ' ',
- '^',
- false
-) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::createStartElement() basic tests=====
-
-TEST: tag only
-<myNs:myTag>
-
-TEST: tag with attributes
-<myNs:myTag foo="bar">
-
-TEST: tag only, passing '' as attribute arg
-<myNs:myTag>
-
-TEST: tag with attributes and namespace
-<myNs:myTag foo="bar" xmlns:myNs="http://www.w3c.org/myNs#">
-
-TEST: tag with empty attributes, whose namespaceUri is not a full namespace
-<myTag xmlns="foo">
-
-TEST: tag with attributes, namespace, and multiline = true
-<myNs:myTag foo="bar"
- xmlns:myNs="http://www.w3c.org/myNs#">
-
-TEST: tag with attributes, namespace, multiline = true, and indent = (2 spaces only)
-<myNs:myTag foo="bar"
- xmlns:myNs="http://www.w3c.org/myNs#">
-
-TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), and linebreak = '^'
-<myNs:myTag foo="bar"^ xmlns:myNs="http://www.w3c.org/myNs#">
-
-TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), linebreak = '^', and sortAttributes = true
-<myNs:myTag boo="baz"^ foo="bar"^ xmlns:myNs="http://www.w3c.org/myNs#">
-
-TEST: tag with attributes, namespace, multiline = true, indent = (2 spaces only), linebreak = '^', and sortAttributes = false
-<myNs:myTag foo="bar"^ boo="baz"^ xmlns:myNs="http://www.w3c.org/myNs#">
-
-XML_Util::createTag() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::createTag() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar")
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute and content" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag"
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, and namespace" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag",
- "http://www.w3c.org/myNs#"
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, and REPLACE_ENTITIES" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, and CDATA_SECTION" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_CDATA_SECTION
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, and multiline = false" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES,
- false
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, and multiline = true" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES,
- true
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, and indent = (2 spaces)" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES,
- true,
- ' '
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), and linebreak = '^'" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES,
- true,
- ' ',
- '^'
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = true" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar", "boo" => "baz"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES,
- true,
- ' ',
- '^',
- true
-) . PHP_EOL . PHP_EOL;
-
-echo "TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = false" . PHP_EOL;
-echo XML_Util::createTag(
- "myNs:myTag",
- array("foo" => "bar", "boo" => "baz"),
- "This is inside the tag and has < & @ > in it",
- "http://www.w3c.org/myNs#",
- XML_UTIL_REPLACE_ENTITIES,
- true,
- ' ',
- '^',
- false
-) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::createTag() basic tests=====
-
-TEST: tag with attribute
-<myNs:myTag foo="bar" />
-
-TEST: tag with attribute and content
-<myNs:myTag foo="bar">This is inside the tag</myNs:myTag>
-
-TEST: tag with attribute, content, and namespace
-<myNs:myTag foo="bar" xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, and REPLACE_ENTITIES
-<myNs:myTag foo="bar" xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, and CDATA_SECTION
-<myNs:myTag foo="bar" xmlns:myNs="http://www.w3c.org/myNs#"><![CDATA[This is inside the tag and has < & @ > in it]]></myNs:myTag>
-
-TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, and multiline = false
-<myNs:myTag foo="bar" xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, and multiline = true
-<myNs:myTag foo="bar"
- xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, and indent = (2 spaces)
-<myNs:myTag foo="bar"
- xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), and linebreak = '^'
-<myNs:myTag foo="bar"^ xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = true
-<myNs:myTag boo="baz"^ foo="bar"^ xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-TEST: tag with attribute, content, namespace, REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = false
-<myNs:myTag foo="bar"^ boo="baz"^ xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag and has &lt; &amp; @ &gt; in it</myNs:myTag>
-
-XML_Util::createTagFromArray() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::createTagFromArray() basic tests=====' . PHP_EOL . PHP_EOL;
-
-$bad = array(
- "foo" => "bar",
-);
-$tag1 = array(
- "qname" => "foo:bar",
-);
-$tag2 = array(
- "qname" => "foo:bar",
- "namespaceUri" => "http://foo.com",
-);
-$tag3 = array(
- "qname" => "foo:bar",
- "namespaceUri" => "http://foo.com",
- "attributes" => array( "key" => "value", "argh" => "fruit&vegetable" ),
-);
-$tag4 = array(
- "qname" => "foo:bar",
- "namespaceUri" => "http://foo.com",
- "attributes" => array( "key" => "value", "argh" => "fruit&vegetable" ),
- "content" => "I'm inside the tag",
-);
-$tag5 = array(
- "qname" => "foo:bar",
- "attributes" => array( "key" => "value", "argh" => "fruit&vegetable" ),
- "content" => "I'm inside the tag",
-);
-$tag6 = array(
- "qname" => "foo:bar",
- "namespaceUri" => "http://foo.com",
- "content" => "I'm inside the tag",
-);
-$tag7 = array(
- "namespaceUri" => "http://foo.com",
- "attributes" => array( "key" => "value", "argh" => "fruit&vegetable" ),
- "content" => "I'm inside the tag",
-);
-
-$tag8 = array(
- 'content' => array('foo', 'bar')
-);
-
-$tag9 = array(
- 'qname' => 'foo:bar',
- 'namespaces' => array('ns1' => 'uri1', 'ns2' => 'uri2')
-);
-
-$tag10 = array(
- 'namespace' => 'http://foo.org',
- 'localPart' => 'bar'
-);
-
-$tag11 = array(
- 'namespace' => '',
- 'localPart' => 'bar'
-);
-
-$tag12 = array(
- 'localPart' => 'foo',
- 'namespaceUri' => 'http://bar.org'
-);
-
-echo "TEST: basic usage with an invalid array" . PHP_EOL;
-echo XML_Util::createTagFromArray($bad) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname only)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag1) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname and namespaceUri)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag2) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, and attributes)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag3) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, attributes, and content)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag5) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, and content)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag6) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (namespaceUri, attributes, and content)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag7) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), plus REPLACE_ENTITIES" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), plus ENTITIES_NONE" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_ENTITIES_NONE) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, and multiline = false" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES, false) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, and multiline = true" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES, true) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, and indent = (2 spaces)" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES, true, ' ') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, indent = (2 spaces), and linebreak = '^'" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES, true, ' ', '^') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = true" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES, true, ' ', '^', true) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = false" . PHP_EOL;
-echo XML_Util::createTagFromArray($tag4, XML_UTIL_REPLACE_ENTITIES, true, ' ', '^', false) . PHP_EOL . PHP_EOL;
-
-echo 'TEST: cause a non-scalar error on the content tag' . PHP_EOL;
-echo XML_Util::createTagFromArray($tag8) . PHP_EOL . PHP_EOL;
-
-echo 'TEST: handle an array of namespaces being passed' . PHP_EOL;
-echo XML_Util::createTagFromArray($tag9) . PHP_EOL . PHP_EOL;
-
-echo 'TEST: qname is derived from namespace + localPart' . PHP_EOL;
-echo XML_Util::createTagFromArray($tag10) . PHP_EOL . PHP_EOL;
-
-echo 'TEST: qname is derived from localPart only' . PHP_EOL;
-echo XML_Util::createTagFromArray($tag11) . PHP_EOL . PHP_EOL;
-
-echo 'TEST: namespaceUri is given, but namespace is not' . PHP_EOL;
-echo XML_Util::createTagFromArray($tag12) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::createTagFromArray() basic tests=====
-
-TEST: basic usage with an invalid array
-You must either supply a qualified name (qname) or local tag name (localPart).
-
-TEST: basic usage with a valid array (qname only)
-<foo:bar />
-
-TEST: basic usage with a valid array (qname and namespaceUri)
-<foo:bar xmlns:foo="http://foo.com" />
-
-TEST: basic usage with a valid array (qname, namespaceUri, and attributes)
-<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:foo="http://foo.com" />
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content)
-<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, attributes, and content)
-<foo:bar argh="fruit&amp;vegetable" key="value">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, and content)
-<foo:bar xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (namespaceUri, attributes, and content)
-You must either supply a qualified name (qname) or local tag name (localPart).
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), plus REPLACE_ENTITIES
-<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), plus ENTITIES_NONE
-<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:foo="http://foo.com">I'm inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, and multiline = false
-<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, and multiline = true
-<foo:bar argh="fruit&amp;vegetable"
- key="value"
- xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, and indent = (2 spaces)
-<foo:bar argh="fruit&amp;vegetable"
- key="value"
- xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, indent = (2 spaces), and linebreak = '^'
-<foo:bar argh="fruit&amp;vegetable"^ key="value"^ xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = true
-<foo:bar argh="fruit&amp;vegetable"^ key="value"^ xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: basic usage with a valid array (qname, namespaceUri, attributes, and content), REPLACE_ENTITIES, multiline = true, indent = (2 spaces), linebreak = '^', and sortAttributes = false
-<foo:bar key="value"^ argh="fruit&amp;vegetable"^ xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>
-
-TEST: cause a non-scalar error on the content tag
-Supplied non-scalar value as tag content
-
-TEST: handle an array of namespaces being passed
-<foo:bar xmlns:ns1="uri1" xmlns:ns2="uri2" />
-
-TEST: qname is derived from namespace + localPart
-<http://foo.org:bar />
-
-TEST: qname is derived from localPart only
-<bar />
-
-TEST: namespaceUri is given, but namespace is not
-<foo xmlns="http://bar.org" />
-
-XML_Util::getDocTypeDeclaration() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::getDocTypeDeclaration() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: using root only" . PHP_EOL;
-echo XML_Util::getDocTypeDeclaration("rootTag") . PHP_EOL . PHP_EOL;
-
-echo "TEST: using root and a string URI" . PHP_EOL;
-echo XML_Util::getDocTypeDeclaration("rootTag", "myDocType.dtd") . PHP_EOL . PHP_EOL;
-
-$uri = array(
- 'uri' => 'http://pear.php.net/dtd/package-1.0',
- 'id' => '-//PHP//PEAR/DTD PACKAGE 0.1'
-);
-$dtdEntry = '<!ELEMENT additionalInfo (#PCDATA)>';
-
-echo "TEST: using root and an array URI" . PHP_EOL;
-echo XML_Util::getDocTypeDeclaration("rootTag", $uri) . PHP_EOL . PHP_EOL;
-
-echo "TEST: using root and an array URI and an internal DTD entry" . PHP_EOL;
-echo XML_Util::getDocTypeDeclaration("rootTag", $uri, $dtdEntry) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::getDocTypeDeclaration() basic tests=====
-
-TEST: using root only
-<!DOCTYPE rootTag>
-
-TEST: using root and a string URI
-<!DOCTYPE rootTag SYSTEM "myDocType.dtd">
-
-TEST: using root and an array URI
-<!DOCTYPE rootTag PUBLIC "-//PHP//PEAR/DTD PACKAGE 0.1" "http://pear.php.net/dtd/package-1.0">
-
-TEST: using root and an array URI and an internal DTD entry
-<!DOCTYPE rootTag PUBLIC "-//PHP//PEAR/DTD PACKAGE 0.1" "http://pear.php.net/dtd/package-1.0" [
-<!ELEMENT additionalInfo (#PCDATA)>
-]>
-
-XML_Util::getXmlDeclaration() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::getXmlDeclaration() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: using version only" . PHP_EOL;
-echo XML_Util::getXMLDeclaration("1.0") . PHP_EOL . PHP_EOL;
-
-echo "TEST: using version and encoding" . PHP_EOL;
-echo XML_Util::getXMLDeclaration("1.0", "UTF-8") . PHP_EOL . PHP_EOL;
-
-echo "TEST: using version, encoding, and standalone flag" . PHP_EOL;
-echo XML_Util::getXMLDeclaration("1.0", "UTF-8", true) . PHP_EOL . PHP_EOL;
-
-echo "TEST: using version and standalone flag" . PHP_EOL;
-echo XML_Util::getXMLDeclaration("1.0", null, true) . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::getXmlDeclaration() basic tests=====
-
-TEST: using version only
-<?xml version="1.0"?>
-
-TEST: using version and encoding
-<?xml version="1.0" encoding="UTF-8"?>
-
-TEST: using version, encoding, and standalone flag
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-TEST: using version and standalone flag
-<?xml version="1.0" standalone="yes"?>
-
-XML_Util::isValidName() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::isValidName() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: valid tag" . PHP_EOL;
-$result = XML_Util::isValidName("alpha-x_y_z.123");
-if (is_a($result, 'PEAR_Error')) {
- print "Invalid XML name: " . $result->getMessage() . PHP_EOL . PHP_EOL;
-} else {
- print "Valid XML name." . PHP_EOL . PHP_EOL;
-}
-
-echo "TEST: invalid tag" . PHP_EOL;
-$result = XML_Util::isValidName("invalidTag?");
-if (is_a($result, 'PEAR_Error')) {
- print "Invalid XML name: " . $result->getMessage() . PHP_EOL . PHP_EOL;
-} else {
- print "Valid XML name." . PHP_EOL . PHP_EOL;
-}
-
-echo "TEST: invalid tag that doesn't start with a letter" . PHP_EOL;
-$result = XML_Util::isValidName("1234five");
-if (is_a($result, 'PEAR_Error')) {
- print "Invalid XML name: " . $result->getMessage() . PHP_EOL . PHP_EOL;
-} else {
- print "Valid XML name." . PHP_EOL . PHP_EOL;
-}
-
-?>
---EXPECT--
-=====XML_Util::isValidName() basic tests=====
-
-TEST: valid tag
-Valid XML name.
-
-TEST: invalid tag
-Invalid XML name: XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
-
-TEST: invalid tag that doesn't start with a letter
-Invalid XML name: XML names may only start with letter or underscore
-
-XML_Util::raiseError() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::raiseError() basic tests=====' . PHP_EOL . PHP_EOL;
-
-$error = XML_Util::raiseError("I am an error", 12345);
-if (is_a($error, 'PEAR_Error')) {
- print "PEAR Error: " . $error->getMessage() . PHP_EOL;
-}
-?>
---EXPECT--
-=====XML_Util::raiseError() basic tests=====
-
-PEAR Error: I am an error
-
-XML_Util::replaceEntities() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::replaceEntities() basic tests=====' . PHP_EOL . PHP_EOL;
-
-$data = 'This string contains < & >.';
-$utf8 = 'This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê';
-
-echo "TEST: basic usage" . PHP_EOL;
-echo XML_Util::replaceEntities($data) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage but with bogus \$replaceEntities arg" . PHP_EOL;
-echo XML_Util::replaceEntities($data, 'I_AM_BOGUS') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML" . PHP_EOL;
-echo XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_XML) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML and UTF-8" . PHP_EOL;
-echo XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_XML, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: utf8 usage with ENTITIES_XML and UTF-8" . PHP_EOL;
-echo XML_Util::replaceEntities($utf8, XML_UTIL_ENTITIES_XML, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML_REQUIRED" . PHP_EOL;
-echo XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_XML_REQUIRED) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML_REQUIRED and UTF-8" . PHP_EOL;
-echo XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_XML_REQUIRED, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: utf8 usage with ENTITIES_XML_REQUIRED and UTF-8" . PHP_EOL;
-echo XML_Util::replaceEntities($utf8, XML_UTIL_ENTITIES_XML_REQUIRED, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_HTML" . PHP_EOL;
-echo XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_HTML) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_HTML and UTF-8" . PHP_EOL;
-echo XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_HTML, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: utf8 usage with ENTITIES_HTML and UTF-8" . PHP_EOL;
-echo XML_Util::replaceEntities($utf8, XML_UTIL_ENTITIES_HTML, 'UTF-8') . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::replaceEntities() basic tests=====
-
-TEST: basic usage
-This string contains &lt; &amp; &gt;.
-
-TEST: basic usage but with bogus $replaceEntities arg
-This string contains < & >.
-
-TEST: basic usage with ENTITIES_XML
-This string contains &lt; &amp; &gt;.
-
-TEST: basic usage with ENTITIES_XML and UTF-8
-This string contains &lt; &amp; &gt;.
-
-TEST: utf8 usage with ENTITIES_XML and UTF-8
-This data contains special chars like &lt;, &gt;, &amp; and &quot; as well as ä, ö, ß, à and ê
-
-TEST: basic usage with ENTITIES_XML_REQUIRED
-This string contains &lt; &amp; >.
-
-TEST: basic usage with ENTITIES_XML_REQUIRED and UTF-8
-This string contains &lt; &amp; >.
-
-TEST: utf8 usage with ENTITIES_XML_REQUIRED and UTF-8
-This data contains special chars like &lt;, >, &amp; and &quot; as well as ä, ö, ß, à and ê
-
-TEST: basic usage with ENTITIES_HTML
-This string contains &lt; &amp; &gt;.
-
-TEST: basic usage with ENTITIES_HTML and UTF-8
-This string contains &lt; &amp; &gt;.
-
-TEST: utf8 usage with ENTITIES_HTML and UTF-8
-This data contains special chars like &lt;, &gt;, &amp; and &quot; as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;
-
-
-XML_Util::reverseEntities() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::reverseEntities() basic tests=====' . PHP_EOL . PHP_EOL;
-
-$data = 'This string contains &lt; &amp; &gt;.';
-$utf8 = 'This data contains special chars like &lt;, &gt;, &amp; and &quot; as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;';
-
-echo "TEST: basic usage" . PHP_EOL;
-echo XML_Util::reverseEntities($data) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage but with bogus \$replaceEntities arg" . PHP_EOL;
-echo XML_Util::reverseEntities($data, 'I_AM_BOGUS') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML" . PHP_EOL;
-echo XML_Util::reverseEntities($data, XML_UTIL_ENTITIES_XML) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML and UTF-8" . PHP_EOL;
-echo XML_Util::reverseEntities($data, XML_UTIL_ENTITIES_XML, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: utf8 usage with ENTITIES_XML and UTF-8" . PHP_EOL;
-echo XML_Util::reverseEntities($utf8, XML_UTIL_ENTITIES_XML, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML_REQUIRED" . PHP_EOL;
-echo XML_Util::reverseEntities($data, XML_UTIL_ENTITIES_XML_REQUIRED) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_XML_REQUIRED and UTF-8" . PHP_EOL;
-echo XML_Util::reverseEntities($data, XML_UTIL_ENTITIES_XML_REQUIRED, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: utf8 usage with ENTITIES_XML_REQUIRED and UTF-8" . PHP_EOL;
-echo XML_Util::reverseEntities($utf8, XML_UTIL_ENTITIES_XML_REQUIRED, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_HTML" . PHP_EOL;
-echo XML_Util::reverseEntities($data, XML_UTIL_ENTITIES_HTML) . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage with ENTITIES_HTML and UTF-8" . PHP_EOL;
-echo XML_Util::reverseEntities($data, XML_UTIL_ENTITIES_HTML, 'UTF-8') . PHP_EOL . PHP_EOL;
-
-echo "TEST: utf8 usage with ENTITIES_HTML and UTF-8" . PHP_EOL;
-echo XML_Util::reverseEntities($utf8, XML_UTIL_ENTITIES_HTML, 'UTF-8') . PHP_EOL . PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::reverseEntities() basic tests=====
-
-TEST: basic usage
-This string contains < & >.
-
-TEST: basic usage but with bogus $replaceEntities arg
-This string contains &lt; &amp; &gt;.
-
-TEST: basic usage with ENTITIES_XML
-This string contains < & >.
-
-TEST: basic usage with ENTITIES_XML and UTF-8
-This string contains < & >.
-
-TEST: utf8 usage with ENTITIES_XML and UTF-8
-This data contains special chars like <, >, & and " as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;
-
-TEST: basic usage with ENTITIES_XML_REQUIRED
-This string contains < & &gt;.
-
-TEST: basic usage with ENTITIES_XML_REQUIRED and UTF-8
-This string contains < & &gt;.
-
-TEST: utf8 usage with ENTITIES_XML_REQUIRED and UTF-8
-This data contains special chars like <, &gt;, & and " as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;
-
-TEST: basic usage with ENTITIES_HTML
-This string contains < & >.
-
-TEST: basic usage with ENTITIES_HTML and UTF-8
-This string contains < & >.
-
-TEST: utf8 usage with ENTITIES_HTML and UTF-8
-This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê
-
-XML_Util::splitQualifiedName() basic tests
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util::splitQualifiedName() basic tests=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: basic usage without namespace" . PHP_EOL;
-$return = XML_Util::splitQualifiedName("xslt:stylesheet");
-echo "namespace => " . $return['namespace'] . PHP_EOL;
-echo "localPart => " . $return['localPart'] . PHP_EOL;
-echo PHP_EOL;
-
-echo "TEST: basic usage with namespace" . PHP_EOL;
-$return = XML_Util::splitQualifiedName("stylesheet", "myNs");
-echo "namespace => " . $return['namespace'] . PHP_EOL;
-echo "localPart => " . $return['localPart'] . PHP_EOL;
-echo PHP_EOL;
-?>
---EXPECT--
-=====XML_Util::splitQualifiedName() basic tests=====
-
-TEST: basic usage without namespace
-namespace => xslt
-localPart => stylesheet
-
-TEST: basic usage with namespace
-namespace => myNs
-localPart => stylesheet
-
-XML_Util tests for Bug #4950 "Incorrect CDATA serializing"
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util tests for Bug #4950 "Incorrect CDATA serializing"=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: test case provided in bug report" . PHP_EOL;
-echo XML_Util::createTag("test", array(), "Content ]]></test> here!",
- null, XML_UTIL_CDATA_SECTION) . PHP_EOL;
-
-?>
---EXPECT--
-=====XML_Util tests for Bug #4950 "Incorrect CDATA serializing"=====
-
-TEST: test case provided in bug report
-<test><![CDATA[Content ]]]]><![CDATA[></test> here!]]></test>
-
-
-XML_Util tests for Bug #5392 "encoding of ISO-8859-1 is the only supported encoding"
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.0a1 2008-05-04
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util tests for Bug #5392 "encoding of ISO-8859-1 is the only supported encoding"=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: test case provided in bug report" . PHP_EOL;
-$data = 'This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê';
-
-$replaced = XML_Util::replaceEntities($data, XML_UTIL_ENTITIES_HTML, 'UTF-8');
-
-$reversed = XML_Util::reverseEntities($replaced, XML_UTIL_ENTITIES_HTML, 'UTF-8');
-
-echo $replaced . PHP_EOL;
-echo $reversed . PHP_EOL;
-
-?>
---EXPECT--
-=====XML_Util tests for Bug #5392 "encoding of ISO-8859-1 is the only supported encoding"=====
-
-TEST: test case provided in bug report
-This data contains special chars like &lt;, &gt;, &amp; and &quot; as well as &auml;, &ouml;, &szlig;, &agrave; and &ecirc;
-This data contains special chars like <, >, & and " as well as ä, ö, ß, à and ê
-
-XML_Util tests for Bug #18343 Entities in file names decoded during packaging
---CREDITS--
-Chuck Burgess <ashnazg@php.net>
-# created for v1.2.2a1 2014-06-03
---FILE--
-<?php
-require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
-echo '=====XML_Util tests for Bug #18343 "Entities in file names decoded during packaging"=====' . PHP_EOL . PHP_EOL;
-
-echo "TEST: test case provided in bug report" . PHP_EOL;
-$array = array(
- "qname" => "install",
- "attributes" => array(
- "as" => "Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&s=Newsweek",
- "name" => "test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&s=Newsweek",
- )
-);
-
-echo "No matter what flags are given to createTagFromArray(), an attribute must *always* be at least ENTITIES_XML encoded..." . PHP_EOL . PHP_EOL;
-
-$flags = array(
- 'no flag' => null,
- 'false' => false,
- 'ENTITIES_NONE' => XML_UTIL_ENTITIES_NONE,
- 'ENTITIES_XML' => XML_UTIL_ENTITIES_XML,
- 'ENTITIES_XML_REQUIRED' => XML_UTIL_ENTITIES_XML_REQUIRED,
- 'ENTITIES_HTML' => XML_UTIL_ENTITIES_HTML,
- 'REPLACE_ENTITIES' => XML_UTIL_REPLACE_ENTITIES,
-);
-foreach ($flags as $flagKey => $flagValue) {
- echo "Testing with $flagKey:" . PHP_EOL;
- echo XML_Util::createTagFromArray($array, $flagValue) . PHP_EOL . PHP_EOL;
-}
-?>
---EXPECT--
-=====XML_Util tests for Bug #18343 "Entities in file names decoded during packaging"=====
-
-TEST: test case provided in bug report
-No matter what flags are given to createTagFromArray(), an attribute must *always* be at least ENTITIES_XML encoded...
-
-Testing with no flag:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-Testing with false:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-Testing with ENTITIES_NONE:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-Testing with ENTITIES_XML:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-Testing with ENTITIES_XML_REQUIRED:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-Testing with ENTITIES_HTML:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-Testing with REPLACE_ENTITIES:
-<install as="Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" name="test/Horde/Feed/fixtures/lexicon/http-p.moreover.com-cgi-local-page%2Fo=rss&amp;s=Newsweek" />
-
-
-/**
- * XML_Util
- *
- * XML Utilities package
- *
- * PHP versions 4 and 5
- *
- * LICENSE:
- *
- * Copyright (c) 2003-2008 Stephan Schmidt <schst@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category XML
- * @package XML_Util
- * @author Stephan Schmidt <schst@php.net>
- * @copyright 2003-2008 Stephan Schmidt <schst@php.net>
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version CVS: $Id$
- * @link http://pear.php.net/package/XML_Util
- */
-
-/**
- * Error code for invalid chars in XML name
- */
-define('XML_UTIL_ERROR_INVALID_CHARS', 51);
-
-/**
- * Error code for invalid chars in XML name
- */
-define('XML_UTIL_ERROR_INVALID_START', 52);
-
-/**
- * Error code for non-scalar tag content
- */
-define('XML_UTIL_ERROR_NON_SCALAR_CONTENT', 60);
-
-/**
- * Error code for missing tag name
- */
-define('XML_UTIL_ERROR_NO_TAG_NAME', 61);
-
-/**
- * Replace XML entities
- */
-define('XML_UTIL_REPLACE_ENTITIES', 1);
-
-/**
- * Embedd content in a CData Section
- */
-define('XML_UTIL_CDATA_SECTION', 5);
-
-/**
- * Do not replace entitites
- */
-define('XML_UTIL_ENTITIES_NONE', 0);
-
-/**
- * Replace all XML entitites
- * This setting will replace <, >, ", ' and &
- */
-define('XML_UTIL_ENTITIES_XML', 1);
-
-/**
- * Replace only required XML entitites
- * This setting will replace <, " and &
- */
-define('XML_UTIL_ENTITIES_XML_REQUIRED', 2);
-
-/**
- * Replace HTML entitites
- * @link http://www.php.net/htmlentities
- */
-define('XML_UTIL_ENTITIES_HTML', 3);
-
-/**
- * Collapse all empty tags.
- */
-define('XML_UTIL_COLLAPSE_ALL', 1);
-
-/**
- * Collapse only empty XHTML tags that have no end tag.
- */
-define('XML_UTIL_COLLAPSE_XHTML_ONLY', 2);
-
-/**
- * Utility class for working with XML documents
- *
- * @category XML
- * @package XML_Util
- * @author Stephan Schmidt <schst@php.net>
- * @copyright 2003-2008 Stephan Schmidt <schst@php.net>
- * @license http://opensource.org/licenses/bsd-license New BSD License
- * @version Release: 1.3.0
- * @link http://pear.php.net/package/XML_Util
- */
-class XML_Util
-{
- /**
- * Return API version
- *
- * @return string $version API version
- */
- public static function apiVersion()
- {
- return '1.1';
- }
-
- /**
- * Replace XML entities
- *
- * With the optional second parameter, you may select, which
- * entities should be replaced.
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // replace XML entites:
- * $string = XML_Util::replaceEntities('This string contains < & >.');
- * </code>
- *
- * With the optional third parameter, you may pass the character encoding
- * <code>
- * require_once 'XML/Util.php';
- *
- * // replace XML entites in UTF-8:
- * $string = XML_Util::replaceEntities(
- * 'This string contains < & > as well as ä, ö, ß, à and ê',
- * XML_UTIL_ENTITIES_HTML,
- * 'UTF-8'
- * );
- * </code>
- *
- * @param string $string string where XML special chars
- * should be replaced
- * @param int $replaceEntities setting for entities in attribute values
- * (one of XML_UTIL_ENTITIES_XML,
- * XML_UTIL_ENTITIES_XML_REQUIRED,
- * XML_UTIL_ENTITIES_HTML)
- * @param string $encoding encoding value (if any)...
- * must be a valid encoding as determined
- * by the htmlentities() function
- *
- * @return string string with replaced chars
- * @see reverseEntities()
- */
- public static function replaceEntities(
- $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
- ) {
- switch ($replaceEntities) {
- case XML_UTIL_ENTITIES_XML:
- return strtr(
- $string,
- array(
- '&' => '&amp;',
- '>' => '&gt;',
- '<' => '&lt;',
- '"' => '&quot;',
- '\'' => '&apos;'
- )
- );
- break;
- case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr(
- $string,
- array(
- '&' => '&amp;',
- '<' => '&lt;',
- '"' => '&quot;'
- )
- );
- break;
- case XML_UTIL_ENTITIES_HTML:
- return htmlentities($string, ENT_COMPAT, $encoding);
- break;
- }
- return $string;
- }
-
- /**
- * Reverse XML entities
- *
- * With the optional second parameter, you may select, which
- * entities should be reversed.
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // reverse XML entites:
- * $string = XML_Util::reverseEntities('This string contains &lt; &amp; &gt;.');
- * </code>
- *
- * With the optional third parameter, you may pass the character encoding
- * <code>
- * require_once 'XML/Util.php';
- *
- * // reverse XML entites in UTF-8:
- * $string = XML_Util::reverseEntities(
- * 'This string contains &lt; &amp; &gt; as well as'
- * . ' &auml;, &ouml;, &szlig;, &agrave; and &ecirc;',
- * XML_UTIL_ENTITIES_HTML,
- * 'UTF-8'
- * );
- * </code>
- *
- * @param string $string string where XML special chars
- * should be replaced
- * @param int $replaceEntities setting for entities in attribute values
- * (one of XML_UTIL_ENTITIES_XML,
- * XML_UTIL_ENTITIES_XML_REQUIRED,
- * XML_UTIL_ENTITIES_HTML)
- * @param string $encoding encoding value (if any)...
- * must be a valid encoding as determined
- * by the html_entity_decode() function
- *
- * @return string string with replaced chars
- * @see replaceEntities()
- */
- public static function reverseEntities(
- $string, $replaceEntities = XML_UTIL_ENTITIES_XML, $encoding = 'ISO-8859-1'
- ) {
- switch ($replaceEntities) {
- case XML_UTIL_ENTITIES_XML:
- return strtr(
- $string,
- array(
- '&amp;' => '&',
- '&gt;' => '>',
- '&lt;' => '<',
- '&quot;' => '"',
- '&apos;' => '\''
- )
- );
- break;
- case XML_UTIL_ENTITIES_XML_REQUIRED:
- return strtr(
- $string,
- array(
- '&amp;' => '&',
- '&lt;' => '<',
- '&quot;' => '"'
- )
- );
- break;
- case XML_UTIL_ENTITIES_HTML:
- return html_entity_decode($string, ENT_COMPAT, $encoding);
- break;
- }
- return $string;
- }
-
- /**
- * Build an xml declaration
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // get an XML declaration:
- * $xmlDecl = XML_Util::getXMLDeclaration('1.0', 'UTF-8', true);
- * </code>
- *
- * @param string $version xml version
- * @param string $encoding character encoding
- * @param bool $standalone document is standalone (or not)
- *
- * @return string xml declaration
- * @uses attributesToString() to serialize the attributes of the
- * XML declaration
- */
- public static function getXMLDeclaration(
- $version = '1.0', $encoding = null, $standalone = null
- ) {
- $attributes = array(
- 'version' => $version,
- );
- // add encoding
- if ($encoding !== null) {
- $attributes['encoding'] = $encoding;
- }
- // add standalone, if specified
- if ($standalone !== null) {
- $attributes['standalone'] = $standalone ? 'yes' : 'no';
- }
-
- return sprintf(
- '<?xml%s?>',
- XML_Util::attributesToString($attributes, false)
- );
- }
-
- /**
- * Build a document type declaration
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // get a doctype declaration:
- * $xmlDecl = XML_Util::getDocTypeDeclaration('rootTag','myDocType.dtd');
- * </code>
- *
- * @param string $root name of the root tag
- * @param string $uri uri of the doctype definition
- * (or array with uri and public id)
- * @param string $internalDtd internal dtd entries
- *
- * @return string doctype declaration
- * @since 0.2
- */
- public static function getDocTypeDeclaration(
- $root, $uri = null, $internalDtd = null
- ) {
- if (is_array($uri)) {
- $ref = sprintf(' PUBLIC "%s" "%s"', $uri['id'], $uri['uri']);
- } elseif (!empty($uri)) {
- $ref = sprintf(' SYSTEM "%s"', $uri);
- } else {
- $ref = '';
- }
-
- if (empty($internalDtd)) {
- return sprintf('<!DOCTYPE %s%s>', $root, $ref);
- } else {
- return sprintf("<!DOCTYPE %s%s [\n%s\n]>", $root, $ref, $internalDtd);
- }
- }
-
- /**
- * Create string representation of an attribute list
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // build an attribute string
- * $att = array(
- * 'foo' => 'bar',
- * 'argh' => 'tomato'
- * );
- *
- * $attList = XML_Util::attributesToString($att);
- * </code>
- *
- * @param array $attributes attribute array
- * @param bool|array $sort sort attribute list alphabetically,
- * may also be an assoc array containing
- * the keys 'sort', 'multiline', 'indent',
- * 'linebreak' and 'entities'
- * @param bool $multiline use linebreaks, if more than
- * one attribute is given
- * @param string $indent string used for indentation of
- * multiline attributes
- * @param string $linebreak string used for linebreaks of
- * multiline attributes
- * @param int $entities setting for entities in attribute values
- * (one of XML_UTIL_ENTITIES_NONE,
- * XML_UTIL_ENTITIES_XML,
- * XML_UTIL_ENTITIES_XML_REQUIRED,
- * XML_UTIL_ENTITIES_HTML)
- *
- * @return string string representation of the attributes
- * @uses replaceEntities() to replace XML entities in attribute values
- * @todo allow sort also to be an options array
- */
- public static function attributesToString(
- $attributes, $sort = true, $multiline = false,
- $indent = ' ', $linebreak = "\n", $entities = XML_UTIL_ENTITIES_XML
- ) {
- /*
- * second parameter may be an array
- */
- if (is_array($sort)) {
- if (isset($sort['multiline'])) {
- $multiline = $sort['multiline'];
- }
- if (isset($sort['indent'])) {
- $indent = $sort['indent'];
- }
- if (isset($sort['linebreak'])) {
- $multiline = $sort['linebreak'];
- }
- if (isset($sort['entities'])) {
- $entities = $sort['entities'];
- }
- if (isset($sort['sort'])) {
- $sort = $sort['sort'];
- } else {
- $sort = true;
- }
- }
- $string = '';
- if (is_array($attributes) && !empty($attributes)) {
- if ($sort) {
- ksort($attributes);
- }
- if (!$multiline || count($attributes) == 1) {
- foreach ($attributes as $key => $value) {
- if ($entities != XML_UTIL_ENTITIES_NONE) {
- if ($entities === XML_UTIL_CDATA_SECTION) {
- $entities = XML_UTIL_ENTITIES_XML;
- }
- $value = XML_Util::replaceEntities($value, $entities);
- }
- $string .= ' ' . $key . '="' . $value . '"';
- }
- } else {
- $first = true;
- foreach ($attributes as $key => $value) {
- if ($entities != XML_UTIL_ENTITIES_NONE) {
- $value = XML_Util::replaceEntities($value, $entities);
- }
- if ($first) {
- $string .= ' ' . $key . '="' . $value . '"';
- $first = false;
- } else {
- $string .= $linebreak . $indent . $key . '="' . $value . '"';
- }
- }
- }
- }
- return $string;
- }
-
- /**
- * Collapses empty tags.
- *
- * @param string $xml XML
- * @param int $mode Whether to collapse all empty tags (XML_UTIL_COLLAPSE_ALL)
- * or only XHTML (XML_UTIL_COLLAPSE_XHTML_ONLY) ones.
- *
- * @return string XML
- */
- public static function collapseEmptyTags($xml, $mode = XML_UTIL_COLLAPSE_ALL)
- {
- if ($mode == XML_UTIL_COLLAPSE_XHTML_ONLY) {
- return preg_replace(
- '/<(area|base(?:font)?|br|col|frame|hr|img|input|isindex|link|meta|'
- . 'param)([^>]*)><\/\\1>/s',
- '<\\1\\2 />',
- $xml
- );
- } else {
- return preg_replace('/<(\w+)([^>]*)><\/\\1>/s', '<\\1\\2 />', $xml);
- }
- }
-
- /**
- * Create a tag
- *
- * This method will call XML_Util::createTagFromArray(), which
- * is more flexible.
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML tag:
- * $tag = XML_Util::createTag('myNs:myTag',
- * array('foo' => 'bar'),
- * 'This is inside the tag',
- * 'http://www.w3c.org/myNs#');
- * </code>
- *
- * @param string $qname qualified tagname (including namespace)
- * @param array $attributes array containg attributes
- * @param mixed $content the content
- * @param string $namespaceUri URI of the namespace
- * @param int $replaceEntities whether to replace XML special chars in
- * content, embedd it in a CData section
- * or none of both
- * @param bool $multiline whether to create a multiline tag where
- * each attribute gets written to a single line
- * @param string $indent string used to indent attributes
- * (_auto indents attributes so they start
- * at the same column)
- * @param string $linebreak string used for linebreaks
- * @param bool $sortAttributes Whether to sort the attributes or not
- *
- * @return string XML tag
- * @see createTagFromArray()
- * @uses createTagFromArray() to create the tag
- */
- public static function createTag(
- $qname, $attributes = array(), $content = null,
- $namespaceUri = null, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
- $multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true
- ) {
- $tag = array(
- 'qname' => $qname,
- 'attributes' => $attributes
- );
-
- // add tag content
- if ($content !== null) {
- $tag['content'] = $content;
- }
-
- // add namespace Uri
- if ($namespaceUri !== null) {
- $tag['namespaceUri'] = $namespaceUri;
- }
-
- return XML_Util::createTagFromArray(
- $tag, $replaceEntities, $multiline,
- $indent, $linebreak, $sortAttributes
- );
- }
-
- /**
- * Create a tag from an array.
- * This method awaits an array in the following format
- * <pre>
- * array(
- * // qualified name of the tag
- * 'qname' => $qname
- *
- * // namespace prefix (optional, if qname is specified or no namespace)
- * 'namespace' => $namespace
- *
- * // local part of the tagname (optional, if qname is specified)
- * 'localpart' => $localpart,
- *
- * // array containing all attributes (optional)
- * 'attributes' => array(),
- *
- * // tag content (optional)
- * 'content' => $content,
- *
- * // namespaceUri for the given namespace (optional)
- * 'namespaceUri' => $namespaceUri
- * )
- * </pre>
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * $tag = array(
- * 'qname' => 'foo:bar',
- * 'namespaceUri' => 'http://foo.com',
- * 'attributes' => array('key' => 'value', 'argh' => 'fruit&vegetable'),
- * 'content' => 'I\'m inside the tag',
- * );
- * // creating a tag with qualified name and namespaceUri
- * $string = XML_Util::createTagFromArray($tag);
- * </code>
- *
- * @param array $tag tag definition
- * @param int $replaceEntities whether to replace XML special chars in
- * content, embedd it in a CData section
- * or none of both
- * @param bool $multiline whether to create a multiline tag where each
- * attribute gets written to a single line
- * @param string $indent string used to indent attributes
- * (_auto indents attributes so they start
- * at the same column)
- * @param string $linebreak string used for linebreaks
- * @param bool $sortAttributes Whether to sort the attributes or not
- *
- * @return string XML tag
- *
- * @see createTag()
- * @uses attributesToString() to serialize the attributes of the tag
- * @uses splitQualifiedName() to get local part and namespace of a qualified name
- * @uses createCDataSection()
- * @uses raiseError()
- */
- public static function createTagFromArray(
- $tag, $replaceEntities = XML_UTIL_REPLACE_ENTITIES,
- $multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true
- ) {
- if (isset($tag['content']) && !is_scalar($tag['content'])) {
- return XML_Util::raiseError(
- 'Supplied non-scalar value as tag content',
- XML_UTIL_ERROR_NON_SCALAR_CONTENT
- );
- }
-
- if (!isset($tag['qname']) && !isset($tag['localPart'])) {
- return XML_Util::raiseError(
- 'You must either supply a qualified name '
- . '(qname) or local tag name (localPart).',
- XML_UTIL_ERROR_NO_TAG_NAME
- );
- }
-
- // if no attributes hav been set, use empty attributes
- if (!isset($tag['attributes']) || !is_array($tag['attributes'])) {
- $tag['attributes'] = array();
- }
-
- if (isset($tag['namespaces'])) {
- foreach ($tag['namespaces'] as $ns => $uri) {
- $tag['attributes']['xmlns:' . $ns] = $uri;
- }
- }
-
- if (!isset($tag['qname'])) {
- // qualified name is not given
-
- // check for namespace
- if (isset($tag['namespace']) && !empty($tag['namespace'])) {
- $tag['qname'] = $tag['namespace'] . ':' . $tag['localPart'];
- } else {
- $tag['qname'] = $tag['localPart'];
- }
- } elseif (isset($tag['namespaceUri']) && !isset($tag['namespace'])) {
- // namespace URI is set, but no namespace
-
- $parts = XML_Util::splitQualifiedName($tag['qname']);
-
- $tag['localPart'] = $parts['localPart'];
- if (isset($parts['namespace'])) {
- $tag['namespace'] = $parts['namespace'];
- }
- }
-
- if (isset($tag['namespaceUri']) && !empty($tag['namespaceUri'])) {
- // is a namespace given
- if (isset($tag['namespace']) && !empty($tag['namespace'])) {
- $tag['attributes']['xmlns:' . $tag['namespace']]
- = $tag['namespaceUri'];
- } else {
- // define this Uri as the default namespace
- $tag['attributes']['xmlns'] = $tag['namespaceUri'];
- }
- }
-
- // check for multiline attributes
- if ($multiline === true) {
- if ($indent === '_auto') {
- $indent = str_repeat(' ', (strlen($tag['qname'])+2));
- }
- }
-
- // create attribute list
- $attList = XML_Util::attributesToString(
- $tag['attributes'],
- $sortAttributes, $multiline, $indent, $linebreak
- );
- if (!isset($tag['content']) || (string)$tag['content'] == '') {
- $tag = sprintf('<%s%s />', $tag['qname'], $attList);
- } else {
- switch ($replaceEntities) {
- case XML_UTIL_ENTITIES_NONE:
- break;
- case XML_UTIL_CDATA_SECTION:
- $tag['content'] = XML_Util::createCDataSection($tag['content']);
- break;
- default:
- $tag['content'] = XML_Util::replaceEntities(
- $tag['content'], $replaceEntities
- );
- break;
- }
- $tag = sprintf(
- '<%s%s>%s</%s>', $tag['qname'], $attList, $tag['content'],
- $tag['qname']
- );
- }
- return $tag;
- }
-
- /**
- * Create a start element
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML start element:
- * $tag = XML_Util::createStartElement('myNs:myTag',
- * array('foo' => 'bar') ,'http://www.w3c.org/myNs#');
- * </code>
- *
- * @param string $qname qualified tagname (including namespace)
- * @param array $attributes array containg attributes
- * @param string $namespaceUri URI of the namespace
- * @param bool $multiline whether to create a multiline tag where each
- * attribute gets written to a single line
- * @param string $indent string used to indent attributes (_auto indents
- * attributes so they start at the same column)
- * @param string $linebreak string used for linebreaks
- * @param bool $sortAttributes Whether to sort the attributes or not
- *
- * @return string XML start element
- * @see createEndElement(), createTag()
- */
- public static function createStartElement(
- $qname, $attributes = array(), $namespaceUri = null,
- $multiline = false, $indent = '_auto', $linebreak = "\n",
- $sortAttributes = true
- ) {
- // if no attributes hav been set, use empty attributes
- if (!isset($attributes) || !is_array($attributes)) {
- $attributes = array();
- }
-
- if ($namespaceUri != null) {
- $parts = XML_Util::splitQualifiedName($qname);
- }
-
- // check for multiline attributes
- if ($multiline === true) {
- if ($indent === '_auto') {
- $indent = str_repeat(' ', (strlen($qname)+2));
- }
- }
-
- if ($namespaceUri != null) {
- // is a namespace given
- if (isset($parts['namespace']) && !empty($parts['namespace'])) {
- $attributes['xmlns:' . $parts['namespace']] = $namespaceUri;
- } else {
- // define this Uri as the default namespace
- $attributes['xmlns'] = $namespaceUri;
- }
- }
-
- // create attribute list
- $attList = XML_Util::attributesToString(
- $attributes, $sortAttributes,
- $multiline, $indent, $linebreak
- );
- $element = sprintf('<%s%s>', $qname, $attList);
- return $element;
- }
-
- /**
- * Create an end element
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML start element:
- * $tag = XML_Util::createEndElement('myNs:myTag');
- * </code>
- *
- * @param string $qname qualified tagname (including namespace)
- *
- * @return string XML end element
- * @see createStartElement(), createTag()
- */
- public static function createEndElement($qname)
- {
- $element = sprintf('</%s>', $qname);
- return $element;
- }
-
- /**
- * Create an XML comment
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create an XML start element:
- * $tag = XML_Util::createComment('I am a comment');
- * </code>
- *
- * @param string $content content of the comment
- *
- * @return string XML comment
- */
- public static function createComment($content)
- {
- $comment = sprintf('<!-- %s -->', $content);
- return $comment;
- }
-
- /**
- * Create a CData section
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // create a CData section
- * $tag = XML_Util::createCDataSection('I am content.');
- * </code>
- *
- * @param string $data data of the CData section
- *
- * @return string CData section with content
- */
- public static function createCDataSection($data)
- {
- return sprintf(
- '<![CDATA[%s]]>',
- preg_replace('/\]\]>/', ']]]]><![CDATA[>', strval($data))
- );
- }
-
- /**
- * Split qualified name and return namespace and local part
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // split qualified tag
- * $parts = XML_Util::splitQualifiedName('xslt:stylesheet');
- * </code>
- * the returned array will contain two elements:
- * <pre>
- * array(
- * 'namespace' => 'xslt',
- * 'localPart' => 'stylesheet'
- * );
- * </pre>
- *
- * @param string $qname qualified tag name
- * @param string $defaultNs default namespace (optional)
- *
- * @return array array containing namespace and local part
- */
- public static function splitQualifiedName($qname, $defaultNs = null)
- {
- if (strstr($qname, ':')) {
- $tmp = explode(':', $qname);
- return array(
- 'namespace' => $tmp[0],
- 'localPart' => $tmp[1]
- );
- }
- return array(
- 'namespace' => $defaultNs,
- 'localPart' => $qname
- );
- }
-
- /**
- * Check, whether string is valid XML name
- *
- * <p>XML names are used for tagname, attribute names and various
- * other, lesser known entities.</p>
- * <p>An XML name may only consist of alphanumeric characters,
- * dashes, undescores and periods, and has to start with a letter
- * or an underscore.</p>
- *
- * <code>
- * require_once 'XML/Util.php';
- *
- * // verify tag name
- * $result = XML_Util::isValidName('invalidTag?');
- * if (is_a($result, 'PEAR_Error')) {
- * print 'Invalid XML name: ' . $result->getMessage();
- * }
- * </code>
- *
- * @param string $string string that should be checked
- *
- * @return mixed true, if string is a valid XML name, PEAR error otherwise
- *
- * @todo support for other charsets
- * @todo PEAR CS - unable to avoid 85-char limit on second preg_match
- */
- public static function isValidName($string)
- {
- // check for invalid chars
- if (!preg_match('/^[[:alpha:]_]\\z/', $string{0})) {
- return XML_Util::raiseError(
- 'XML names may only start with letter or underscore',
- XML_UTIL_ERROR_INVALID_START
- );
- }
-
- // check for invalid chars
- $match = preg_match(
- '/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?'
- . '[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/',
- $string
- );
- if (!$match) {
- return XML_Util::raiseError(
- 'XML names may only contain alphanumeric '
- . 'chars, period, hyphen, colon and underscores',
- XML_UTIL_ERROR_INVALID_CHARS
- );
- }
- // XML name is valid
- return true;
- }
-
- /**
- * Replacement for XML_Util::raiseError
- *
- * Avoids the necessity to always require
- * PEAR.php
- *
- * @param string $msg error message
- * @param int $code error code
- *
- * @return PEAR_Error
- * @todo PEAR CS - should this use include_once instead?
- */
- public static function raiseError($msg, $code)
- {
- include_once 'PEAR.php';
- return PEAR::raiseError($msg, $code);
- }
-}
-?>
-
diff --git a/php.ini-development b/php.ini-development
index e81f288a46..7c3f93863a 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -663,11 +663,10 @@ auto_prepend_file =
; http://php.net/auto-append-file
auto_append_file =
-; By default, PHP will output a character encoding using
-; the Content-type: header. To disable sending of the charset, simply
-; set it to be empty.
+; By default, PHP will output a media type using the Content-Type header. To
+; disable this, simply set it to be empty.
;
-; PHP's built-in default is text/html
+; PHP's built-in default media type is set to text/html.
; http://php.net/default-mimetype
default_mimetype = "text/html"
@@ -886,11 +885,10 @@ default_socket_timeout = 60
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
-;extension=php_pspell.dll
;extension=php_shmop.dll
-; The MIBS data available in the PHP distribution must be installed.
-; See http://www.php.net/manual/en/snmp.installation.php
+; The MIBS data available in the PHP distribution must be installed.
+; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll
;extension=php_soap.dll
@@ -956,10 +954,7 @@ cli_server.color = On
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
-
-[sqlite]
-; http://php.net/sqlite.assoc-case
-;sqlite.assoc_case = 0
+;intl.use_exceptions = 0
[sqlite3]
;sqlite3.extension_dir =
@@ -976,6 +971,10 @@ cli_server.color = On
; http://php.net/pcre.recursion-limit
;pcre.recursion_limit=100000
+;Enables or disables JIT compilation of patterns. This requires the PCRE
+;library to be compiled with JIT support.
+;pcre.jit=1
+
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; http://php.net/pdo-odbc.connection-pooling
@@ -1513,6 +1512,10 @@ url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
; http://php.net/session.upload-progress.min-freq
;session.upload_progress.min_freq = "1"
+; Only write session data when session data is changed. Enabled by default.
+; http://php.net/session.lazy-write
+;session.lazy_write = On
+
[Assertion]
; Switch whether to compile assertions at all (to have no overhead at run-time)
; -1: Do not compile at all
@@ -1826,6 +1829,21 @@ ldap.max_links = -1
; errors.
;opcache.mmap_base=
+; Enables and sets the second level cache directory.
+; It should improve performance when SHM memory is full, at server restart or
+; SHM reset. The default "" disables file based caching.
+;opcache.file_cache=
+
+; Enables or disables opcode caching in shared memory.
+;opcache.file_cache_only=0
+
+; Enables or disables checksum validation when script loaded from file cache.
+;opcache.file_cache_consistency_checks=1
+
+; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
+; This should improve performance, but requires appropriate OS configuration.
+;opcache.huge_code_pages=0
+
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
diff --git a/php.ini-production b/php.ini-production
index f4bdf7bf7f..80507d6bc5 100644
--- a/php.ini-production
+++ b/php.ini-production
@@ -663,11 +663,10 @@ auto_prepend_file =
; http://php.net/auto-append-file
auto_append_file =
-; By default, PHP will output a character encoding using
-; the Content-type: header. To disable sending of the charset, simply
-; set it to be empty.
+; By default, PHP will output a media type using the Content-Type header. To
+; disable this, simply set it to be empty.
;
-; PHP's built-in default is text/html
+; PHP's built-in default media type is set to text/html.
; http://php.net/default-mimetype
default_mimetype = "text/html"
@@ -886,11 +885,10 @@ default_socket_timeout = 60
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
-;extension=php_pspell.dll
;extension=php_shmop.dll
-; The MIBS data available in the PHP distribution must be installed.
-; See http://www.php.net/manual/en/snmp.installation.php
+; The MIBS data available in the PHP distribution must be installed.
+; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll
;extension=php_soap.dll
@@ -956,10 +954,7 @@ cli_server.color = On
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
-
-[sqlite]
-; http://php.net/sqlite.assoc-case
-;sqlite.assoc_case = 0
+;intl.use_exceptions = 0
[sqlite3]
;sqlite3.extension_dir =
@@ -976,6 +971,10 @@ cli_server.color = On
; http://php.net/pcre.recursion-limit
;pcre.recursion_limit=100000
+;Enables or disables JIT compilation of patterns. This requires the PCRE
+;library to be compiled with JIT support.
+;pcre.jit=1
+
[Pdo]
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
; http://php.net/pdo-odbc.connection-pooling
@@ -1513,15 +1512,19 @@ url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
; http://php.net/session.upload-progress.min-freq
;session.upload_progress.min_freq = "1"
+; Only write session data when session data is changed. Enabled by default.
+; http://php.net/session.lazy-write
+;session.lazy_write = On
+
[Assertion]
; Switch whether to compile assertions at all (to have no overhead at run-time)
; -1: Do not compile at all
; 0: Jump over assertion at run-time
; 1: Execute assertions
; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
-; Default Value: 1
-; Development Value: 1
-; Production Value: -1
+; Default Value: 1
+; Development Value: 1
+; Production Value: -1
; http://php.net/zend.assertions
zend.assertions = -1
@@ -1826,6 +1829,21 @@ ldap.max_links = -1
; errors.
;opcache.mmap_base=
+; Enables and sets the second level cache directory.
+; It should improve performance when SHM memory is full, at server restart or
+; SHM reset. The default "" disables file based caching.
+;opcache.file_cache=
+
+; Enables or disables opcode caching in shared memory.
+;opcache.file_cache_only=0
+
+; Enables or disables checksum validation when script loaded from file cache.
+;opcache.file_cache_consistency_checks=1
+
+; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
+; This should improve performance, but requires appropriate OS configuration.
+;opcache.huge_code_pages=1
+
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
diff --git a/run-tests.php b/run-tests.php
index 1251d3f96d..fd4e12081f 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -4,7 +4,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2010 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -59,27 +59,6 @@ NO_PROC_OPEN_ERROR;
exit;
}
-// Version constants only available as of 5.2.8
-if (!defined("PHP_VERSION_ID")) {
- list($major, $minor, $bug) = explode(".", phpversion(), 3);
- $bug = (int)$bug; // Many distros make up their own versions
- if ($bug < 10) {
- $bug = "0$bug";
- }
-
- define("PHP_VERSION_ID", "{$major}0{$minor}$bug");
- define("PHP_MAJOR_VERSION", $major);
-}
-
-// __DIR__ is available from 5.3.0
-if (PHP_VERSION_ID < 50300) {
- define('__DIR__', realpath(dirname(__FILE__)));
- // FILE_BINARY is available from 5.2.7
- if (PHP_VERSION_ID < 50207) {
- define('FILE_BINARY', 0);
- }
-}
-
// If timezone is not set, use UTC.
if (ini_get('date.timezone') == '') {
date_default_timezone_set('UTC');
@@ -113,22 +92,6 @@ while(@ob_end_clean());
if (ob_get_level()) echo "Not all buffers were deleted.\n";
error_reporting(E_ALL);
-if (PHP_MAJOR_VERSION < 6) {
- if (ini_get('safe_mode')) {
- echo <<< SAFE_MODE_WARNING
-
-+-----------------------------------------------------------+
-| ! WARNING ! |
-| You are running the test-suite with "safe_mode" ENABLED ! |
-| |
-| Chances are high that no test will work at all, |
-| depending on how you configured "safe_mode" ! |
-+-----------------------------------------------------------+
-
-
-SAFE_MODE_WARNING;
- }
-}
$environment = isset($_ENV) ? $_ENV : array();
if ((substr(PHP_OS, 0, 3) == "WIN") && empty($environment["SystemRoot"])) {
@@ -141,6 +104,7 @@ if ((substr(PHP_OS, 0, 3) == "WIN") && empty($environment["SystemRoot"])) {
$php = null;
$php_cgi = null;
+$phpdbg = null;
if (getenv('TEST_PHP_EXECUTABLE')) {
$php = getenv('TEST_PHP_EXECUTABLE');
@@ -158,6 +122,16 @@ if (getenv('TEST_PHP_EXECUTABLE')) {
$php_cgi = null;
}
}
+
+ if (!getenv('TEST_PHPDBG_EXECUTABLE')) {
+ $phpdbg = $cwd . '/sapi/phpdbg/phpdbg';
+
+ if (file_exists($phpdbg)) {
+ putenv("TEST_PHP_CGI_EXECUTABLE=$phpdbg");
+ } else {
+ $phpdbg = null;
+ }
+ }
}
$environment['TEST_PHP_EXECUTABLE'] = $php;
}
@@ -173,6 +147,17 @@ if (getenv('TEST_PHP_CGI_EXECUTABLE')) {
$environment['TEST_PHP_CGI_EXECUTABLE'] = $php_cgi;
}
+if (getenv('TEST_PHPDBG_EXECUTABLE')) {
+ $phpdbg = getenv('TEST_PHPDBG_EXECUTABLE');
+
+ if ($phpdbg=='auto') {
+ $phpdbg = $cwd . '/sapi/phpdbg/phpdbg';
+ putenv("TEST_PHPDBG_EXECUTABLE=$phpdbg");
+ }
+
+ $environment['TEST_PHPDBG_EXECUTABLE'] = $phpdbg;
+}
+
function verify_config()
{
global $php;
@@ -218,7 +203,6 @@ $exts_to_test = array();
$ini_overwrites = array(
'output_handler=',
'open_basedir=',
- 'safe_mode=0',
'disable_functions=',
'output_buffering=Off',
'error_reporting=' . (E_ALL | E_STRICT),
@@ -247,7 +231,7 @@ $no_file_cache = '-d opcache.file_cache= -d opcache.file_cache_only=0';
function write_information($show_html)
{
- global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test, $leak_check, $valgrind_header, $no_file_cache;
+ global $cwd, $php, $php_cgi, $phpdbg, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test, $leak_check, $valgrind_header, $no_file_cache;
// Get info from php
$info_file = __DIR__ . '/run-test-info.php';
@@ -274,6 +258,14 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
$php_cgi_info = '';
}
+ if ($phpdbg) {
+ $phpdbg_info = `$phpdbg $pass_options $info_params $no_file_cache -qrr "$info_file"`;
+ $php_info_sep = "\n---------------------------------------------------------------------";
+ $phpdbg_info = "$php_info_sep\nPHP : $phpdbg $phpdbg_info$php_info_sep";
+ } else {
+ $phpdbg_info = '';
+ }
+
@unlink($info_file);
// load list of enabled extensions
@@ -299,7 +291,7 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
// Write test context information.
echo "
=====================================================================
-PHP : $php $php_info $php_cgi_info
+PHP : $php $php_info $php_cgi_info $phpdbg_info
CWD : $cwd
Extra dirs : ";
foreach ($user_tests as $test_dir) {
@@ -854,7 +846,7 @@ $exts_skipped = 0;
$ignored_by_ext = 0;
sort($exts_to_test);
$test_dirs = array();
-$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 'sapi/cgi', 'sapi/fpm');
+$optionals = array('tests', 'ext', 'Zend', 'sapi');
foreach($optionals as $dir) {
if (@filetype($dir) == 'dir') {
@@ -1205,6 +1197,10 @@ function run_test($php, $file, $env)
$php_cgi = $env['TEST_PHP_CGI_EXECUTABLE'];
}
+ if (isset($env['TEST_PHPDBG_EXECUTABLE'])) {
+ $phpdbg = $env['TEST_PHPDBG_EXECUTABLE'];
+ }
+
if (is_array($file)) {
$file = $file[0];
}
@@ -1290,7 +1286,7 @@ TEST $file
} else {
- if (@count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) {
+ if (!isset($section_text['PHPDBG']) && @count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) {
$bork_info = "missing section --FILE--";
$borked = true;
}
@@ -1372,6 +1368,38 @@ TEST $file
}
}
+ /* For phpdbg tests, check if phpdbg sapi is available and if it is, use it. */
+ if (array_key_exists('PHPDBG', $section_text)) {
+ if (!isset($section_text['STDIN'])) {
+ $section_text['STDIN'] = $section_text['PHPDBG']."\n";
+ }
+
+ if (isset($phpdbg)) {
+ $old_php = $php;
+ $php = $phpdbg . ' -qIb';
+ } else if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) . "/phpdbg.exe")) {
+ $old_php = $php;
+ $php = realpath(dirname($php) . "/phpdbg.exe") . ' -qIb ';
+ } else {
+ if (file_exists(dirname($php) . "/../../sapi/phpdbg/phpdbg")) {
+ $old_php = $php;
+ $php = realpath(dirname($php) . "/../../sapi/phpdbg/phpdbg") . ' -qIb ';
+ } else if (file_exists("./sapi/phpdbg/phpdbg")) {
+ $old_php = $php;
+ $php = realpath("./sapi/phpdbg/phpdbg") . ' -qIb ';
+ } else if (file_exists(dirname($php) . "/phpdbg")) {
+ $old_php = $php;
+ $php = realpath(dirname($php) . "/phpdbg") . ' -qIb ';
+ } else {
+ show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available");
+
+ junit_init_suite(junit_get_suitename_for($shortname));
+ junit_mark_test_as('SKIP', $shortname, $tested, 0, 'phpdbg not available');
+ return 'SKIPPED';
+ }
+ }
+ }
+
if (!$SHOW_ONLY_GROUPS) {
show_test($test_idx, $shortname);
}
@@ -1473,6 +1501,23 @@ TEST $file
// Default ini settings
$ini_settings = array();
+
+ // Additional required extensions
+ if (array_key_exists('EXTENSIONS', $section_text)) {
+ $ext_dir=`$php -r 'echo ini_get("extension_dir");'`;
+ $extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS']));
+ $loaded = explode(",", `$php -n -r 'echo join(",", get_loaded_extensions());'`);
+ foreach ($extensions as $req_ext) {
+ if (!in_array($req_ext, $loaded)) {
+ if ($req_ext == 'opcache') {
+ $ini_settings['zend_extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
+ } else {
+ $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
+ }
+ }
+ }
+ }
+
// additional ini overwrites
//$ini_overwrites[] = 'setting=value';
settings2array($ini_overwrites, $ini_settings);
@@ -1486,18 +1531,6 @@ TEST $file
settings2array(preg_split( "/[\n\r]+/", $section_text['INI']), $ini_settings);
}
- // Additional required extensions
- if (array_key_exists('EXTENSIONS', $section_text)) {
- $ext_dir=`$php -r 'echo ini_get("extension_dir");'`;
- $extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS']));
- $loaded = explode(",", `$php -n -r 'echo join(",", get_loaded_extensions());'`);
- foreach ($extensions as $req_ext) {
- if (!in_array($req_ext, $loaded)) {
- $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
- }
- }
- }
-
settings2params($ini_settings);
// Check if test should be skipped.
@@ -1652,8 +1685,12 @@ TEST $file
}
// We've satisfied the preconditions - run the test!
- show_file_block('php', $section_text['FILE'], 'TEST');
- save_text($test_file, $section_text['FILE'], $temp_file);
+ if (isset($section_text['FILE'])) {
+ show_file_block('php', $section_text['FILE'], 'TEST');
+ save_text($test_file, $section_text['FILE'], $temp_file);
+ } else {
+ $test_file = $temp_file = "";
+ }
if (array_key_exists('GET', $section_text)) {
$query_string = trim($section_text['GET']);
@@ -1741,7 +1778,7 @@ TEST $file
$env['REQUEST_METHOD'] = 'PUT';
if (empty($request)) {
- junit_mark_test_as('BORK', $shortname, $tested, null, 'empty $request');
+ junit_mark_test_as('BORK', $shortname, $tested, null, 'empty $request');
return 'BORKED';
}
@@ -1765,34 +1802,33 @@ TEST $file
$cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
- } else if (array_key_exists('GZIP_POST', $section_text) && !empty($section_text['GZIP_POST'])) {
-
- $post = trim($section_text['GZIP_POST']);
- $post = gzencode($post, 9, FORCE_GZIP);
- $env['HTTP_CONTENT_ENCODING'] = 'gzip';
+ } else if (array_key_exists('GZIP_POST', $section_text) && !empty($section_text['GZIP_POST'])) {
- save_text($tmp_post, $post);
- $content_length = strlen($post);
+ $post = trim($section_text['GZIP_POST']);
+ $post = gzencode($post, 9, FORCE_GZIP);
+ $env['HTTP_CONTENT_ENCODING'] = 'gzip';
- $env['REQUEST_METHOD'] = 'POST';
- $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
- $env['CONTENT_LENGTH'] = $content_length;
+ save_text($tmp_post, $post);
+ $content_length = strlen($post);
- $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
+ $env['REQUEST_METHOD'] = 'POST';
+ $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
+ $env['CONTENT_LENGTH'] = $content_length;
- } else if (array_key_exists('DEFLATE_POST', $section_text) && !empty($section_text['DEFLATE_POST'])) {
- $post = trim($section_text['DEFLATE_POST']);
- $post = gzcompress($post, 9);
- $env['HTTP_CONTENT_ENCODING'] = 'deflate';
- save_text($tmp_post, $post);
- $content_length = strlen($post);
+ $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
- $env['REQUEST_METHOD'] = 'POST';
- $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
- $env['CONTENT_LENGTH'] = $content_length;
+ } else if (array_key_exists('DEFLATE_POST', $section_text) && !empty($section_text['DEFLATE_POST'])) {
+ $post = trim($section_text['DEFLATE_POST']);
+ $post = gzcompress($post, 9);
+ $env['HTTP_CONTENT_ENCODING'] = 'deflate';
+ save_text($tmp_post, $post);
+ $content_length = strlen($post);
- $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
+ $env['REQUEST_METHOD'] = 'POST';
+ $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
+ $env['CONTENT_LENGTH'] = $content_length;
+ $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 < \"$tmp_post\"";
} else {
@@ -1807,11 +1843,14 @@ TEST $file
$env['USE_ZEND_ALLOC'] = '0';
$env['ZEND_DONT_UNLOAD_MODULES'] = 1;
- if (version_compare($valgrind_version, '3.3.0', '>=')) {
+ /* --vex-iropt-register-updates=allregs-at-mem-access is necessary for phpdbg watchpoint tests */
+ if (version_compare($valgrind_version, '3.8.0', '>=')) {
/* valgrind 3.3.0+ doesn't have --log-file-exactly option */
- $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd";
+ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access --log-file=$memcheck_filename $cmd";
+ } elseif (version_compare($valgrind_version, '3.3.0', '>=')) {
+ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file=$memcheck_filename $cmd";
} else {
- $cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file-exactly=$memcheck_filename $cmd";
+ $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file-exactly=$memcheck_filename $cmd";
}
} else {
@@ -2301,7 +2340,7 @@ function settings2array($settings, &$ini_settings)
$name = trim($setting[0]);
$value = trim($setting[1]);
- if ($name == 'extension') {
+ if ($name == 'extension' || $name == 'zend_extension') {
if (!isset($ini_settings[$name])) {
$ini_settings[$name] = array();
@@ -2757,7 +2796,7 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag
} elseif ('WARN' == $type) {
junit_suite_record($suite, 'test_warn');
$JUNIT['files'][$file_name]['xml'] .= "<warning>$escaped_message</warning>\n";
- } elseif('FAIL' == $type) {
+ } elseif ('FAIL' == $type) {
junit_suite_record($suite, 'test_fail');
$JUNIT['files'][$file_name]['xml'] .= "<failure type='$output_type' message='$escaped_message'>$escaped_details</failure>\n";
} else {
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 636eee2d4b..38ff99aa7b 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -135,6 +135,14 @@ static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv,
}
}
+void config_entry_ctor(zval *zv)
+{
+ php_dir_entry *pe = (php_dir_entry*)Z_PTR_P(zv);
+ php_dir_entry *npe = malloc(sizeof(php_dir_entry));
+
+ memcpy(npe, pe, sizeof(php_dir_entry));
+ ZVAL_PTR(zv, npe);
+}
void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
{
@@ -142,12 +150,10 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
n = create_php_config(p, "merge_php_config");
/* copy old config */
- zend_hash_copy(&n->config, &d->config, NULL);
-//??? zend_hash_copy(&n->config, &d->config, NULL, NULL, sizeof(php_dir_entry));
+ zend_hash_copy(&n->config, &d->config, config_entry_ctor);
/* merge new config */
phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
- zend_hash_merge_ex(&n->config, &e->config, NULL, should_overwrite_per_dir_entry, NULL);
-//??? zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
+ zend_hash_merge_ex(&n->config, &e->config, config_entry_ctor, should_overwrite_per_dir_entry, NULL);
return n;
}
@@ -197,12 +203,17 @@ static apr_status_t destroy_php_config(void *data)
return APR_SUCCESS;
}
+static void config_entry_dtor(zval *zv)
+{
+ free((php_dir_entry*)Z_PTR_P(zv));
+}
+
void *create_php_config(apr_pool_t *p, char *dummy)
{
php_conf_rec *newx = (php_conf_rec *) apr_pcalloc(p, sizeof(*newx));
phpapdebug((stderr, "Creating new config (%p) for %s\n", newx, dummy));
- zend_hash_init(&newx->config, 0, NULL, NULL, 1);
+ zend_hash_init(&newx->config, 0, NULL, config_entry_dtor, 1);
apr_pool_cleanup_register(p, newx, destroy_php_config, apr_pool_cleanup_null);
return (void *) newx;
}
diff --git a/sapi/apache2handler/mod_php7.c b/sapi/apache2handler/mod_php7.c
index cf6fdaae12..fd7185f856 100644
--- a/sapi/apache2handler/mod_php7.c
+++ b/sapi/apache2handler/mod_php7.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index 489892cb60..69c01bbe02 100644
--- a/sapi/apache2handler/php_apache.h
+++ b/sapi/apache2handler/php_apache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,10 +24,16 @@
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
+#include "http_log.h"
#include "php.h"
#include "main/php_streams.h"
+/* Enable per-module logging in Apache 2.4+ */
+#ifdef APLOG_USE_MODULE
+APLOG_USE_MODULE(php7);
+#endif
+
/* Declare this so we can get to it from outside the sapi_apache2.c file */
extern module AP_MODULE_DECLARE_DATA php7_module;
@@ -80,7 +86,7 @@ extern zend_module_entry apache2_module_entry;
#ifdef ZTS
extern int php_apache2_info_id;
#define AP2(v) ZEND_TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
#else
extern php_apache2_info_struct php_apache2_info;
#define AP2(v) (php_apache2_info.v)
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 3c4cbd9f7b..9ba09da66e 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 42861bcf04..456b9719fa 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -66,7 +66,7 @@
/* A way to specify the location of the php.ini dir in an apache directive */
char *apache2_php_ini_path_override = NULL;
#if defined(PHP_WIN32) && defined(ZTS)
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
static size_t
@@ -123,15 +123,15 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_e
}
ctx->content_type = estrdup(val);
} else if (!strcasecmp(sapi_header->header, "content-length")) {
-#ifdef PHP_WIN32
-# ifdef APR_HAS_LARGE_FILES
- ap_set_content_length(ctx->r, (apr_off_t) _strtoui64(val, (char **)NULL, 10));
-# else
- ap_set_content_length(ctx->r, (apr_off_t) strtol(val, (char **)NULL, 10));
-# endif
-#else
- ap_set_content_length(ctx->r, (apr_off_t) strtol(val, (char **)NULL, 10));
-#endif
+ apr_off_t clen = 0;
+
+ if (APR_SUCCESS != apr_strtoff(&clen, val, (char **) NULL, 10)) {
+ /* We'll fall back to strtol, since that's what we used to
+ * do anyway. */
+ clen = (apr_off_t) strtol(val, (char **) NULL, 10);
+ }
+
+ ap_set_content_length(ctx->r, clen);
} else if (op == SAPI_HEADER_REPLACE) {
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
} else {
@@ -455,6 +455,11 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
(void)ts_resource(0);
ZEND_TSRMLS_CACHE_UPDATE();
#endif
+
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
sapi_startup(&apache2_sapi_module);
apache2_sapi_module.startup(&apache2_sapi_module);
apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null);
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 3de902a557..e758b33eeb 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,11 +31,11 @@
#include "SAPI.h"
#include <stdio.h>
-#include "php.h"
#ifdef PHP_WIN32
# include "win32/time.h"
# include "win32/signal.h"
+# include "win32/winutil.h"
# include <process.h>
#endif
@@ -103,7 +103,6 @@ struct sigaction act, old_term, old_quit, old_int;
static void (*php_php_import_environment_variables)(zval *array_ptr);
-#ifndef PHP_WIN32
/* these globals used for forking children on unix systems */
/**
* Number of child processes that will get created to service requests
@@ -116,6 +115,7 @@ static int children = 0;
*/
static int parent = 1;
+#ifndef PHP_WIN32
/* Did parent received exit signals SIG_TERM/SIG_INT/SIG_QUIT */
static int exit_signal = 0;
@@ -203,7 +203,7 @@ static void user_config_cache_entry_dtor(zval *el)
static int php_cgi_globals_id;
#define CGIG(v) ZEND_TSRMG(php_cgi_globals_id, php_cgi_globals_struct *, v)
#if defined(PHP_WIN32)
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
#else
static php_cgi_globals_struct php_cgi_globals;
@@ -223,6 +223,14 @@ static php_cgi_globals_struct php_cgi_globals;
#define TRANSLATE_SLASHES(path)
#endif
+#ifdef PHP_WIN32
+#define WIN32_MAX_SPAWN_CHILDREN 64
+HANDLE kid_cgi_ps[WIN32_MAX_SPAWN_CHILDREN];
+int kids;
+HANDLE job = NULL;
+JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_info = { 0 };
+#endif
+
#ifndef HAVE_ATTRIBUTE_WEAK
static void fcgi_log(int type, const char *format, ...) {
va_list ap;
@@ -355,9 +363,7 @@ static void sapi_fcgi_flush(void *server_context)
fcgi_request *request = (fcgi_request*) server_context;
if (
-#ifndef PHP_WIN32
!parent &&
-#endif
request && !fcgi_flush(request, 0)) {
php_handle_aborted_connection();
@@ -901,9 +907,7 @@ static int sapi_cgi_deactivate(void)
if (SG(sapi_started)) {
if (fcgi_is_fastcgi()) {
if (
-#ifndef PHP_WIN32
!parent &&
-#endif
!fcgi_finish_request((fcgi_request*)SG(server_context), 0)) {
php_handle_aborted_connection();
}
@@ -1432,6 +1436,29 @@ void fastcgi_cleanup(int signal)
exit(0);
}
}
+#else
+BOOL WINAPI fastcgi_cleanup(DWORD sig)
+{
+ int i = kids;
+
+ while (0 < i--) {
+ if (NULL == kid_cgi_ps[i]) {
+ continue;
+ }
+
+ TerminateProcess(kid_cgi_ps[i], 0);
+ CloseHandle(kid_cgi_ps[i]);
+ kid_cgi_ps[i] = NULL;
+ }
+
+ if (job) {
+ CloseHandle(job);
+ }
+
+ parent = 0;
+
+ return TRUE;
+}
#endif
PHP_INI_BEGIN()
@@ -1773,6 +1800,10 @@ int main(int argc, char *argv[])
ZEND_TSRMLS_CACHE_UPDATE();
#endif
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
#ifdef ZTS
ts_allocate_id(&php_cgi_globals_id, sizeof(php_cgi_globals_struct), (ts_allocate_ctor) php_cgi_globals_ctor, NULL);
#else
@@ -1976,8 +2007,7 @@ consult the installation file that came with this distribution, or visit \n\
/* library is already initialized, now init our request */
request = fcgi_init_request(fcgi_fd, NULL, NULL, NULL);
-#ifndef PHP_WIN32
- /* Pre-fork, if required */
+ /* Pre-fork or spawn, if required */
if (getenv("PHP_FCGI_CHILDREN")) {
char * children_str = getenv("PHP_FCGI_CHILDREN");
children = atoi(children_str);
@@ -1993,6 +2023,7 @@ consult the installation file that came with this distribution, or visit \n\
fcgi_set_mgmt_var("FCGI_MAX_REQS", sizeof("FCGI_MAX_REQS")-1, "1", sizeof("1")-1);
}
+#ifndef PHP_WIN32
if (children) {
int running = 0;
pid_t pid;
@@ -2078,6 +2109,103 @@ consult the installation file that came with this distribution, or visit \n\
parent = 0;
}
+#else
+ if (children) {
+ char *cmd_line;
+ char kid_buf[16];
+ char my_name[MAX_PATH] = {0};
+ int i;
+
+ ZeroMemory(&kid_cgi_ps, sizeof(kid_cgi_ps));
+ kids = children < WIN32_MAX_SPAWN_CHILDREN ? children : WIN32_MAX_SPAWN_CHILDREN;
+
+ SetConsoleCtrlHandler(fastcgi_cleanup, TRUE);
+
+ /* kids will inherit the env, don't let them spawn */
+ SetEnvironmentVariable("PHP_FCGI_CHILDREN", NULL);
+
+ GetModuleFileName(NULL, my_name, MAX_PATH);
+ cmd_line = my_name;
+
+ job = CreateJobObject(NULL, NULL);
+ if (!job) {
+ DWORD err = GetLastError();
+ char *err_text = php_win32_error_to_msg(err);
+
+ fprintf(stderr, "unable to create job object: [0x%08lx]: %s\n", err, err_text);
+
+ goto parent_out;
+ }
+
+ job_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
+ if (!SetInformationJobObject(job, JobObjectExtendedLimitInformation, &job_info, sizeof(job_info))) {
+ DWORD err = GetLastError();
+ char *err_text = php_win32_error_to_msg(err);
+
+ fprintf(stderr, "unable to configure job object: [0x%08lx]: %s\n", err, err_text);
+ }
+
+ while (parent) {
+ i = kids;
+ while (0 < i--) {
+ DWORD status;
+
+ if (NULL != kid_cgi_ps[i]) {
+ if(!GetExitCodeProcess(kid_cgi_ps[i], &status) || status != STILL_ACTIVE) {
+ CloseHandle(kid_cgi_ps[i]);
+ kid_cgi_ps[i] = NULL;
+ }
+ }
+ }
+
+ i = kids;
+ while (0 < i--) {
+ PROCESS_INFORMATION pi;
+ STARTUPINFO si;
+
+ if (NULL != kid_cgi_ps[i]) {
+ continue;
+ }
+
+ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+ ZeroMemory(&pi, sizeof(pi));
+
+ si.dwFlags = STARTF_USESTDHANDLES;
+ si.hStdOutput = INVALID_HANDLE_VALUE;
+ si.hStdInput = (HANDLE)_get_osfhandle(fcgi_fd);
+ si.hStdError = INVALID_HANDLE_VALUE;
+
+ if (CreateProcess(NULL, cmd_line, NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) {
+ kid_cgi_ps[i] = pi.hProcess;
+ if (!AssignProcessToJobObject(job, pi.hProcess)) {
+ DWORD err = GetLastError();
+ char *err_text = php_win32_error_to_msg(err);
+
+ fprintf(stderr, "unable to assign child process to job object: [0x%08lx]: %s\n", err, err_text);
+ }
+ CloseHandle(pi.hThread);
+ } else {
+ DWORD err = GetLastError();
+ char *err_text = php_win32_error_to_msg(err);
+
+ kid_cgi_ps[i] = NULL;
+
+ fprintf(stderr, "unable to spawn: [0x%08lx]: %s\n", err, err_text);
+ }
+ }
+
+ WaitForMultipleObjects(kids, kid_cgi_ps, FALSE, INFINITE);
+ }
+
+ snprintf(kid_buf, 16, "%d", children);
+ /* restore my env */
+ SetEnvironmentVariable("PHP_FCGI_CHILDREN", kid_buf);
+
+ goto parent_out;
+ } else {
+ parent = 0;
+ }
#endif /* WIN32 */
}
@@ -2213,9 +2341,9 @@ consult the installation file that came with this distribution, or visit \n\
SG(request_info).no_headers = 1;
}
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
@@ -2349,7 +2477,10 @@ consult the installation file that came with this distribution, or visit \n\
goto fastcgi_request_done;
}
- if (SG(request_info).path_translated) efree(SG(request_info).path_translated);
+ if (SG(request_info).path_translated) {
+ efree(SG(request_info).path_translated);
+ SG(request_info).path_translated = NULL;
+ }
if (free_query_string && SG(request_info).query_string) {
free(SG(request_info).query_string);
@@ -2483,7 +2614,10 @@ consult the installation file that came with this distribution, or visit \n\
fastcgi_request_done:
{
- if (SG(request_info).path_translated) efree(SG(request_info).path_translated);
+ if (SG(request_info).path_translated) {
+ efree(SG(request_info).path_translated);
+ SG(request_info).path_translated = NULL;
+ }
php_request_shutdown((void *) 0);
@@ -2575,9 +2709,7 @@ out:
#endif
}
-#ifndef PHP_WIN32
parent_out:
-#endif
SG(server_context) = NULL;
php_module_shutdown();
diff --git a/sapi/cgi/config9.m4 b/sapi/cgi/config9.m4
index e2195f4ee6..f544426202 100644
--- a/sapi/cgi/config9.m4
+++ b/sapi/cgi/config9.m4
@@ -55,9 +55,9 @@ if test "$PHP_CGI" != "no"; then
case $host_alias in
*aix*)
if test "$php_sapi_module" = "shared"; then
- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
else
- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
fi
;;
*darwin*)
diff --git a/sapi/cgi/tests/003.phpt b/sapi/cgi/tests/003.phpt
index 533743323f..1ba94f27ef 100644
--- a/sapi/cgi/tests/003.phpt
+++ b/sapi/cgi/tests/003.phpt
@@ -2,6 +2,11 @@
strip comments and whitespace with -w
--SKIPIF--
<?php
+
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die ("skip not for Windows");
+}
+
include "skipif.inc";
?>
--FILE--
diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt
index 8769126561..0e7117080d 100644
--- a/sapi/cgi/tests/004.phpt
+++ b/sapi/cgi/tests/004.phpt
@@ -26,7 +26,11 @@ var_dump(test::$pri);
file_put_contents($filename, $code);
-var_dump(`$php -n -f "$filename" 2>/dev/null`);
+if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+ var_dump(`$php -n -f "$filename"`);
+} else {
+ var_dump(`$php -n -f "$filename" 2>/dev/null`);
+}
var_dump(`$php -n -f "wrong"`);
@unlink($filename);
diff --git a/sapi/cgi/tests/005-win32.phpt b/sapi/cgi/tests/005-win32.phpt
new file mode 100644
index 0000000000..b7efb9b500
--- /dev/null
+++ b/sapi/cgi/tests/005-win32.phpt
@@ -0,0 +1,34 @@
+--TEST--
+using invalid combinations of cmdline options
+--SKIPIF--
+<?php
+
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die ("skip Windows only");
+}
+
+include "skipif.inc";
+?>
+--FILE--
+<?php
+
+include "include.inc";
+
+$php = get_cgi_path();
+reset_env_vars();
+
+var_dump(`$php -n -a -f "wrong"`);
+var_dump(`$php -n -f "wrong" -a`);
+
+echo "Done\n";
+?>
+--EXPECTF--
+string(51) "Interactive mode enabled
+
+No input file specified.
+"
+string(51) "Interactive mode enabled
+
+No input file specified.
+"
+Done
diff --git a/sapi/cgi/tests/005.phpt b/sapi/cgi/tests/005.phpt
index 34a28f9c5e..259005f3d9 100644
--- a/sapi/cgi/tests/005.phpt
+++ b/sapi/cgi/tests/005.phpt
@@ -1,7 +1,14 @@
--TEST--
using invalid combinations of cmdline options
--SKIPIF--
-<?php include "skipif.inc"; ?>
+<?php
+
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die ("skip not for Windows");
+}
+
+include "skipif.inc";
+?>
--FILE--
<?php
diff --git a/sapi/cgi/tests/006.phpt b/sapi/cgi/tests/006.phpt
index a2b2b2903a..08bfbf5d6c 100644
--- a/sapi/cgi/tests/006.phpt
+++ b/sapi/cgi/tests/006.phpt
@@ -44,7 +44,11 @@ class test
file_put_contents($filename, $code);
-var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
+if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+ var_dump(`"$php" -n -l "$filename"`);
+} else {
+ var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
+}
@unlink($filename);
diff --git a/sapi/cgi/tests/include.inc b/sapi/cgi/tests/include.inc
index 2d8ed8a2e3..dc98dc0f23 100644
--- a/sapi/cgi/tests/include.inc
+++ b/sapi/cgi/tests/include.inc
@@ -21,18 +21,27 @@ function get_cgi_path() /* {{{ */
if ($cli) {
/* trying to guess ... */
$php_path = $php;
- for ($i = 0; $i < 2; $i++) {
- $slash_pos = strrpos($php_path, "/");
- if ($slash_pos) {
- $php_path = substr($php_path, 0, $slash_pos);
- } else {
- return FALSE;
+ if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
+ /* On Windows it should be in the same dir as php.exe in most of the cases. */
+ $php_path = dirname($php);
+
+ if (is_dir($php_path) && file_exists("$php_path/php-cgi.exe") && is_executable("$php_path/php-cgi.exe")) {
+ return "$php_path/php-cgi.exe";
+ }
+ } else {
+ for ($i = 0; $i < 2; $i++) {
+ $slash_pos = strrpos($php_path, "/");
+ if ($slash_pos) {
+ $php_path = substr($php_path, 0, $slash_pos);
+ } else {
+ return FALSE;
+ }
}
- }
- if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php-cgi") && is_executable($php_path."/cgi/php-cgi")) {
- /* gotcha */
- return $php_path."/cgi/php-cgi";
+ if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php-cgi") && is_executable($php_path."/cgi/php-cgi")) {
+ /* gotcha */
+ return $php_path."/cgi/php-cgi";
+ }
}
return false;
}
diff --git a/sapi/cgi/tests/skipif.inc b/sapi/cgi/tests/skipif.inc
index 9da8b7934d..d2cef23589 100644
--- a/sapi/cgi/tests/skipif.inc
+++ b/sapi/cgi/tests/skipif.inc
@@ -4,10 +4,6 @@ if (substr(php_sapi_name(), 0, 3) == "cgi") {
exit;
}
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
-}
-
include dirname(__FILE__)."/include.inc";
if (!get_cgi_path()) {
diff --git a/sapi/cli/cli.h b/sapi/cli/cli.h
index c571eeb5c5..ea373c2595 100644
--- a/sapi/cli/cli.h
+++ b/sapi/cli/cli.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
index c5819cd8b4..04db2fecee 100644
--- a/sapi/cli/config.m4
+++ b/sapi/cli/config.m4
@@ -36,9 +36,9 @@ if test "$PHP_CLI" != "no"; then
case $host_alias in
*aix*)
if test "$php_sapi_module" = "shared"; then
- BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+ BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
else
- BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+ BUILD_CLI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
fi
;;
*darwin*)
diff --git a/sapi/cli/config.w32 b/sapi/cli/config.w32
index 664394c8a6..c6409b59df 100644
--- a/sapi/cli/config.w32
+++ b/sapi/cli/config.w32
@@ -12,6 +12,11 @@ if (PHP_CLI == "yes") {
ADD_FLAG("CFLAGS_CLI", "/D PHP_WIN32_DEBUG_HEAP");
}
ADD_FLAG("LDFLAGS_CLI", "/stack:67108864");
+
+ if (CHECK_LIB("edit_a.lib;edit.lib", "cli", PHP_CLI) &&
+ CHECK_HEADER_ADD_INCLUDE("editline/readline.h", "CFLAGS_CLI")) {
+ ADD_FLAG("CFLAGS_CLI", "/D HAVE_LIBEDIT");
+ }
}
if (PHP_CLI_WIN32 == "yes") {
diff --git a/sapi/cli/generate_mime_type_map.php b/sapi/cli/generate_mime_type_map.php
index 9e088814a0..402be0070c 100644
--- a/sapi/cli/generate_mime_type_map.php
+++ b/sapi/cli/generate_mime_type_map.php
@@ -27,12 +27,24 @@ array_walk($types, function ($line) use (&$extensions) {
}
});
+$additional_mime_maps = [
+ "map" => "application/json", // from commit: a0d62f08ae8cbebc88e5c92e08fca8d0cdc7309d
+];
+
+foreach($additional_mime_maps as $ext => $mime) {
+ if (!isset($extensions[$ext])) {
+ $extensions[$ext] = $mime;
+ } else {
+ printf(STDERR, "Ignored exist mime type: $ext => $mime\n");
+ }
+}
+
?>
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/cli/mime_type_map.h b/sapi/cli/mime_type_map.h
index e82fc3fd7f..0afa501429 100644
--- a/sapi/cli/mime_type_map.h
+++ b/sapi/cli/mime_type_map.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1009,6 +1009,7 @@ static php_cli_server_ext_mime_type_pair mime_type_map[] = {
{ "movie", "video/x-sgi-movie" },
{ "smv", "video/x-smv" },
{ "ice", "x-conference/x-cooltalk" },
+ { "map", "application/json" },
{ NULL, NULL }
};
diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in
index c062f3d20e..7b5863a5a5 100644
--- a/sapi/cli/php.1.in
+++ b/sapi/cli/php.1.in
@@ -1,4 +1,4 @@
-.TH @program_prefix@php 1 "2014" "The PHP Group" "Scripting Language"
+.TH @program_prefix@php 1 "2016" "The PHP Group" "Scripting Language"
.SH NAME
@program_prefix@php \- PHP Command Line Interface 'CLI'
.P
@@ -454,7 +454,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphp\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2014 The PHP Group
+Copyright \(co 1997\-2016 The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 3b2bed8538..09ce00f9e7 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -103,7 +103,7 @@ PHPAPI extern char *php_ini_scanned_path;
PHPAPI extern char *php_ini_scanned_files;
#if defined(PHP_WIN32) && defined(ZTS)
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
#ifndef O_BINARY
@@ -304,7 +304,7 @@ static size_t sapi_cli_ub_write(const char *str, size_t str_length) /* {{{ */
if (cli_shell_callbacks.cli_shell_ub_write) {
size_t ub_wrote;
ub_wrote = cli_shell_callbacks.cli_shell_ub_write(str, str_length);
- if (ub_wrote > -1) {
+ if (ub_wrote != (size_t) -1) {
return ub_wrote;
}
}
@@ -517,7 +517,7 @@ static void php_cli_usage(char *argv0)
" -a Run interactively\n"
#endif
" -c <path>|<file> Look for php.ini file in this directory\n"
- " -n No php.ini file will be used\n"
+ " -n No configuration (ini) files will be used\n"
" -d foo[=bar] Define INI entry foo with value 'bar'\n"
" -e Generate extended information for debugger/profiler\n"
" -f <file> Parse and execute <file>.\n"
@@ -682,17 +682,28 @@ static int do_cli(int argc, char **argv) /* {{{ */
goto out;
case 'v': /* show php version & quit */
- php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2015 The PHP Group\n%s",
+ php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s",
PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
-#if ZEND_DEBUG && defined(HAVE_GCOV)
- "(DEBUG GCOV)",
-#elif ZEND_DEBUG
- "(DEBUG)",
-#elif defined(HAVE_GCOV)
- "(GCOV)",
+#if ZTS
+ "ZTS "
#else
- "",
+ "NTS "
#endif
+#ifdef COMPILER
+ COMPILER
+ " "
+#endif
+#ifdef ARCHITECTURE
+ ARCHITECTURE
+ " "
+#endif
+#if ZEND_DEBUG
+ "DEBUG "
+#endif
+#ifdef HAVE_GCOV
+ "GCOV "
+#endif
+ ,
get_zend_version()
);
sapi_deactivate();
@@ -1015,16 +1026,15 @@ static int do_cli(int argc, char **argv) /* {{{ */
if (exec_begin && zend_eval_string_ex(exec_begin, NULL, "Command line begin code", 1) == FAILURE) {
exit_status=254;
}
- ZVAL_LONG(&argi, index);
- zend_hash_str_update(&EG(symbol_table), "argi", sizeof("argi")-1, &argi);
while (exit_status == SUCCESS && (input=php_stream_gets(s_in_process, NULL, 0)) != NULL) {
len = strlen(input);
while (len > 0 && len-- && (input[len]=='\n' || input[len]=='\r')) {
input[len] = '\0';
}
- ZVAL_STRINGL(&argn, input, len);
+ ZVAL_STRINGL(&argn, input, len + 1);
zend_hash_str_update(&EG(symbol_table), "argn", sizeof("argn")-1, &argn);
- Z_LVAL(argi) = ++index;
+ ZVAL_LONG(&argi, ++index);
+ zend_hash_str_update(&EG(symbol_table), "argi", sizeof("argi")-1, &argi);
if (exec_run) {
if (zend_eval_string_ex(exec_run, NULL, "Command line run code", 1) == FAILURE) {
exit_status=254;
@@ -1220,6 +1230,10 @@ int main(int argc, char *argv[])
ZEND_TSRMLS_CACHE_UPDATE();
#endif
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
#ifdef PHP_WIN32
_fmode = _O_BINARY; /*sets default for file streams to binary */
setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */
diff --git a/sapi/cli/php_cli_process_title.c b/sapi/cli/php_cli_process_title.c
index db614d4323..9323e5e99a 100644
--- a/sapi/cli/php_cli_process_title.c
+++ b/sapi/cli/php_cli_process_title.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/cli/php_cli_process_title.h b/sapi/cli/php_cli_process_title.h
index 30091fe2fb..f0a7e23b27 100644
--- a/sapi/cli/php_cli_process_title.h
+++ b/sapi/cli/php_cli_process_title.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index f76199af9a..a9d4a533b3 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -94,8 +94,9 @@
#include "ext/standard/file.h" /* for php_set_sock_blocking() :-( */
#include "zend_smart_str.h"
#include "ext/standard/html.h"
-#include "ext/standard/url.h" /* for php_url_decode() */
+#include "ext/standard/url.h" /* for php_raw_url_decode() */
#include "ext/standard/php_string.h" /* for php_dirname() */
+#include "ext/date/php_date.h" /* for php_format_date() */
#include "php_network.h"
#include "php_http_parser.h"
@@ -339,15 +340,24 @@ static void append_http_status_line(smart_str *buffer, int protocol_version, int
static void append_essential_headers(smart_str* buffer, php_cli_server_client *client, int persistent) /* {{{ */
{
- {
- char *val;
- if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) {
- smart_str_appendl_ex(buffer, "Host", sizeof("Host") - 1, persistent);
- smart_str_appendl_ex(buffer, ": ", sizeof(": ") - 1, persistent);
- smart_str_appends_ex(buffer, val, persistent);
- smart_str_appendl_ex(buffer, "\r\n", 2, persistent);
- }
+ char *val;
+ struct timeval tv = {0};
+
+ if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) {
+ smart_str_appendl_ex(buffer, "Host", sizeof("Host") - 1, persistent);
+ smart_str_appendl_ex(buffer, ": ", sizeof(": ") - 1, persistent);
+ smart_str_appends_ex(buffer, val, persistent);
+ smart_str_appendl_ex(buffer, "\r\n", 2, persistent);
+ }
+
+ if (!gettimeofday(&tv, NULL)) {
+ zend_string *dt = php_format_date("r", 1, tv.tv_sec, 1);
+ smart_str_appendl_ex(buffer, "Date: ", 6, persistent);
+ smart_str_appends_ex(buffer, dt->val, persistent);
+ smart_str_appendl_ex(buffer, "\r\n", 2, persistent);
+ zend_string_release(dt);
}
+
smart_str_appendl_ex(buffer, "Connection: close\r\n", sizeof("Connection: close\r\n") - 1, persistent);
} /* }}} */
@@ -604,6 +614,9 @@ static int sapi_cli_server_register_entry_cb(char **entry, int num_args, va_list
}
}
spprintf(&real_key, 0, "%s_%s", "HTTP", key);
+ if (strcmp(key, "CONTENT_TYPE") == 0 || strcmp(key, "CONTENT_LENGTH") == 0) {
+ sapi_cli_server_register_variable(track_vars_array, key, *entry);
+ }
sapi_cli_server_register_variable(track_vars_array, real_key, *entry);
efree(key);
efree(real_key);
@@ -1464,7 +1477,19 @@ static void normalize_vpath(char **retval, size_t *retval_len, const char *vpath
return;
}
- decoded_vpath_end = decoded_vpath + php_url_decode(decoded_vpath, (int)vpath_len);
+ decoded_vpath_end = decoded_vpath + php_raw_url_decode(decoded_vpath, (int)vpath_len);
+
+#ifdef PHP_WIN32
+ {
+ char *p = decoded_vpath;
+
+ do {
+ if (*p == '\\') {
+ *p = '/';
+ }
+ } while (*p++);
+ }
+#endif
p = decoded_vpath;
@@ -1940,6 +1965,19 @@ static int php_cli_server_begin_send_static(php_cli_server *server, php_cli_serv
return php_cli_server_send_error_page(server, client, 400);
}
+#ifdef PHP_WIN32
+ /* The win32 namespace will cut off trailing dots and spaces. Since the
+ VCWD functionality isn't used here, a sophisticated functionality
+ would have to be reimplemented to know ahead there are no files
+ with invalid names there. The simplest is just to forbid invalid
+ filenames, which is done here. */
+ if (client->request.path_translated &&
+ ('.' == client->request.path_translated[client->request.path_translated_len-1] ||
+ ' ' == client->request.path_translated[client->request.path_translated_len-1])) {
+ return php_cli_server_send_error_page(server, client, 500 TSRMLS_CC);
+ }
+#endif
+
fd = client->request.path_translated ? open(client->request.path_translated, O_RDONLY): -1;
if (fd < 0) {
return php_cli_server_send_error_page(server, client, 404);
@@ -2035,6 +2073,8 @@ static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server
zend_try {
zval retval;
+
+ ZVAL_UNDEF(&retval);
if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE, &retval, 1, &zfd)) {
if (Z_TYPE(retval) != IS_UNDEF) {
decline = Z_TYPE(retval) == IS_FALSE;
diff --git a/sapi/cli/php_cli_server.h b/sapi/cli/php_cli_server.h
index 9bbe98e1d5..cdf30bce2a 100644
--- a/sapi/cli/php_cli_server.h
+++ b/sapi/cli/php_cli_server.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -33,7 +33,7 @@ ZEND_END_MODULE_GLOBALS(cli_server)
#ifdef ZTS
#define CLI_SERVER_G(v) ZEND_TSRMG(cli_server_globals_id, zend_cli_server_globals *, v)
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
#else
#define CLI_SERVER_G(v) (cli_server_globals.v)
#endif
diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c
index d289e80f70..5f8eb3ce0b 100644
--- a/sapi/cli/php_http_parser.c
+++ b/sapi/cli/php_http_parser.c
@@ -89,6 +89,7 @@ static const char *method_strings[] =
, "LOCK"
, "MKCOL"
, "MOVE"
+ , "MKCALENDAR"
, "PROPFIND"
, "PROPPATCH"
, "SEARCH"
@@ -326,7 +327,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
const char *data,
size_t len)
{
- char c, ch;
+ char ch;
+ signed char c;
const char *p = data, *pe;
size_t to_read;
@@ -584,7 +586,7 @@ size_t php_http_parser_execute (php_http_parser *parser,
case 'G': parser->method = PHP_HTTP_GET; break;
case 'H': parser->method = PHP_HTTP_HEAD; break;
case 'L': parser->method = PHP_HTTP_LOCK; break;
- case 'M': parser->method = PHP_HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break;
+ case 'M': parser->method = PHP_HTTP_MKCOL; /* or MOVE, MKCALENDAR, MKACTIVITY, MERGE, M-SEARCH */ break;
case 'N': parser->method = PHP_HTTP_NOTIFY; break;
case 'O': parser->method = PHP_HTTP_OPTIONS; break;
case 'P': parser->method = PHP_HTTP_POST; /* or PROPFIND or PROPPATCH or PUT */ break;
@@ -622,6 +624,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
} else if (parser->method == PHP_HTTP_MKCOL) {
if (index == 1 && ch == 'O') {
parser->method = PHP_HTTP_MOVE;
+ } else if (index == 3 && ch == 'A') {
+ parser->method = PHP_HTTP_MKCALENDAR;
} else if (index == 1 && ch == 'E') {
parser->method = PHP_HTTP_MERGE;
} else if (index == 1 && ch == '-') {
diff --git a/sapi/cli/php_http_parser.h b/sapi/cli/php_http_parser.h
index 402e7e3c83..fa4873abeb 100644
--- a/sapi/cli/php_http_parser.h
+++ b/sapi/cli/php_http_parser.h
@@ -88,6 +88,7 @@ enum php_http_method
, PHP_HTTP_LOCK
, PHP_HTTP_MKCOL
, PHP_HTTP_MOVE
+ , PHP_HTTP_MKCALENDAR
, PHP_HTTP_PROPFIND
, PHP_HTTP_PROPPATCH
, PHP_HTTP_SEARCH
diff --git a/sapi/cli/ps_title.h b/sapi/cli/ps_title.h
index 4a8f6f7002..ee13cbe187 100644
--- a/sapi/cli/ps_title.h
+++ b/sapi/cli/ps_title.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/cli/tests/005.phpt b/sapi/cli/tests/005.phpt
index 60af3fc992..5a1e8b8fb1 100644
--- a/sapi/cli/tests/005.phpt
+++ b/sapi/cli/tests/005.phpt
@@ -4,7 +4,7 @@ show information about class
<?php
include "skipif.inc";
if (!extension_loaded("reflection")) {
- die("skip reflection extension required");
+ die("skip reflection extension required");
}
?>
--FILE--
@@ -18,7 +18,7 @@ var_dump(`"$php" -n --rc exception`);
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
string(40) "Exception: Class unknown does not exist
"
string(183) "Class [ <internal:Core> class stdClass ] {
@@ -40,7 +40,7 @@ string(183) "Class [ <internal:Core> class stdClass ] {
}
"
-string(1544) "Class [ <internal:Core> class Exception implements Throwable ] {
+string(1607) "Class [ <internal:Core> class Exception implements Throwable ] {
- Constants [0] {
}
@@ -61,7 +61,7 @@ string(1544) "Class [ <internal:Core> class Exception implements Throwable ] {
Property [ <default> private $previous ]
}
- - Methods [10] {
+ - Methods [11] {
Method [ <internal:Core> final private method __clone ] {
}
@@ -74,6 +74,9 @@ string(1544) "Class [ <internal:Core> class Exception implements Throwable ] {
}
}
+ Method [ <internal:Core> public method __wakeup ] {
+ }
+
Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
}
diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt
index b86c8a3197..b24da56660 100644
--- a/sapi/cli/tests/006.phpt
+++ b/sapi/cli/tests/006.phpt
@@ -25,7 +25,7 @@ string(44) "Exception: Extension unknown does not exist
"
string(37) "Exception: Extension does not exist
"
-string(%d) "Extension [ <persistent> extension #%d pcre version %d.%d.%d%a ] {
+string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
- INI {
Entry [ pcre.backtrack_limit <ALL> ]
@@ -39,7 +39,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %d.%d.%d%a ] {
}
}
- - Constants [14] {
+ - Constants [15] {
Constant [ integer PREG_PATTERN_ORDER ] { 1 }
Constant [ integer PREG_SET_ORDER ] { 2 }
Constant [ integer PREG_OFFSET_CAPTURE ] { 256 }
@@ -53,6 +53,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %d.%d.%d%a ] {
Constant [ integer PREG_RECURSION_LIMIT_ERROR ] { 3 }
Constant [ integer PREG_BAD_UTF8_ERROR ] { 4 }
Constant [ integer PREG_BAD_UTF8_OFFSET_ERROR ] { 5 }
+ Constant [ integer PREG_JIT_STACKLIMIT_ERROR ] { 6 }
Constant [ string PCRE_VERSION ] { %s }
}
diff --git a/sapi/cli/tests/bug43177.phpt b/sapi/cli/tests/bug43177.phpt
index 23af545908..e475fb09b4 100644
--- a/sapi/cli/tests/bug43177.phpt
+++ b/sapi/cli/tests/bug43177.phpt
@@ -61,6 +61,7 @@ HEADER
--EXPECTF--
HTTP/1.1 200 OK
Host: localhost
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
@@ -68,18 +69,21 @@ Content-type: text/html; charset=UTF-8
OK
HTTP/1.0 500 Internal Server Error
Host: localhost
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
HTTP/1.0 500 Internal Server Error
Host: localhost
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
HTTP/1.0 500 Internal Server Error
Host: localhost
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug64529.phpt b/sapi/cli/tests/bug64529.phpt
index 8452953baf..7331b8303e 100644
--- a/sapi/cli/tests/bug64529.phpt
+++ b/sapi/cli/tests/bug64529.phpt
@@ -5,6 +5,9 @@ Bug #64529 (Ran out of opcode space)
if (substr(PHP_OS, 0, 3) == "WIN") {
die("skip non windows test");
}
+if (!extension_loaded("readline") || !readline_info("done")) {
+ die("skip readline support required");
+}
exec('which expect', $output, $ret);
if ($ret) {
die("skip no expect installed");
diff --git a/sapi/cli/tests/bug65066_100.phpt b/sapi/cli/tests/bug65066_100.phpt
index 901ba188fd..34381d8e96 100644
--- a/sapi/cli/tests/bug65066_100.phpt
+++ b/sapi/cli/tests/bug65066_100.phpt
@@ -34,6 +34,7 @@ HEADER
--EXPECTF--
HTTP/1.1 100 Continue
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug65066_422.phpt b/sapi/cli/tests/bug65066_422.phpt
index 4e5d31c7a7..f25ddfbca6 100644
--- a/sapi/cli/tests/bug65066_422.phpt
+++ b/sapi/cli/tests/bug65066_422.phpt
@@ -34,6 +34,7 @@ HEADER
--EXPECTF--
HTTP/1.1 422 Unknown Status Code
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug65066_511.phpt b/sapi/cli/tests/bug65066_511.phpt
index a0b4eae393..27c9f9755a 100644
--- a/sapi/cli/tests/bug65066_511.phpt
+++ b/sapi/cli/tests/bug65066_511.phpt
@@ -34,6 +34,7 @@ HEADER
--EXPECTF--
HTTP/1.1 511 Network Authentication Required
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug65633.phpt b/sapi/cli/tests/bug65633.phpt
index 456436b1f7..2e9f2796e8 100644
--- a/sapi/cli/tests/bug65633.phpt
+++ b/sapi/cli/tests/bug65633.phpt
@@ -37,6 +37,7 @@ fclose($fp);
?>
--EXPECTF--
HTTP/1.1 200 OK
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug66606_1.phpt b/sapi/cli/tests/bug66606_1.phpt
new file mode 100644
index 0000000000..ad35038bae
--- /dev/null
+++ b/sapi/cli/tests/bug66606_1.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #66606 (Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE) - GET request
+--INI--
+allow_url_fopen=1
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start('var_dump($_SERVER["CONTENT_TYPE"], $_SERVER["CONTENT_LENGTH"])');
+echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS);
+?>
+--EXPECTF--
+NULL
+NULL
diff --git a/sapi/cli/tests/bug66606_2.phpt b/sapi/cli/tests/bug66606_2.phpt
new file mode 100644
index 0000000000..c47b7736c0
--- /dev/null
+++ b/sapi/cli/tests/bug66606_2.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #66606 (Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE) - POST request
+--INI--
+allow_url_fopen=1
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start('var_dump($_SERVER["CONTENT_TYPE"], $_SERVER["CONTENT_LENGTH"])');
+
+list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
+$port = intval($port)?:80;
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+
+if (fwrite($fp, <<<HEADER
+POST /index.php HTTP/1.1
+Host: {$host}
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 3
+
+a=b
+HEADER
+)) {
+ while (!feof($fp)) {
+ echo fgets($fp);
+ }
+}
+
+fclose($fp);
+?>
+--EXPECTF--
+HTTP/1.1 200 OK
+Host: %s
+Date: %s
+Connection: close
+X-Powered-By: PHP/%s
+Content-type: text/html; charset=UTF-8
+
+string(33) "application/x-www-form-urlencoded"
+string(1) "3"
diff --git a/sapi/cli/tests/bug66830.phpt b/sapi/cli/tests/bug66830.phpt
index 58c07e031a..b21b33627e 100644
--- a/sapi/cli/tests/bug66830.phpt
+++ b/sapi/cli/tests/bug66830.phpt
@@ -37,6 +37,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug67429.phpt b/sapi/cli/tests/bug67429.phpt
index 856946b29d..2ad4a27f07 100644
--- a/sapi/cli/tests/bug67429.phpt
+++ b/sapi/cli/tests/bug67429.phpt
@@ -38,11 +38,13 @@ HEADER
?>
--EXPECTF--
HTTP/1.1 308 Permanent Redirect
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
HTTP/1.1 426 Upgrade Required
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug68291.phpt b/sapi/cli/tests/bug68291.phpt
new file mode 100644
index 0000000000..62042307c5
--- /dev/null
+++ b/sapi/cli/tests/bug68291.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #68291 (404 on urls with '+')
+--INI--
+allow_url_fopen=1
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+include "php_cli_server.inc";
+file_put_contents(__DIR__ . '/bug68291+test.html', 'Found');
+php_cli_server_start(NULL, NULL);
+echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/bug68291+test.html');
+?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/bug68291+test.html');
+?>
+--EXPECT--
+Found
diff --git a/sapi/cli/tests/bug68745.phpt b/sapi/cli/tests/bug68745.phpt
index 733d7d0900..4cdfe0ae4e 100644
--- a/sapi/cli/tests/bug68745.phpt
+++ b/sapi/cli/tests/bug68745.phpt
@@ -27,6 +27,7 @@ fclose($fp);
?>
--EXPECTF--
HTTP/1.1 200 OK
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/bug69655.phpt b/sapi/cli/tests/bug69655.phpt
index 188b9c31ee..73791c95d5 100644
--- a/sapi/cli/tests/bug69655.phpt
+++ b/sapi/cli/tests/bug69655.phpt
@@ -10,7 +10,7 @@ include "skipif.inc";
<?php
include "php_cli_server.inc";
php_cli_server_start();
-foreach (['MKCALENDAR', 'MKCO', 'MKCOLL', 'M'] as $method) {
+foreach (['MKCO', 'MKCOLL', 'M'] as $method) {
$context = stream_context_create(['http' => ['method' => $method]]);
// the following is supposed to emit a warning for unsupported methods
file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS, false, $context);
@@ -25,6 +25,3 @@ Warning: file_get_contents(http://localhost:8964): failed to open stream: HTTP r
Warning: file_get_contents(http://localhost:8964): failed to open stream: HTTP request failed! HTTP/1.0 501 Not Implemented
in %s on line %d
-
-Warning: file_get_contents(http://localhost:8964): failed to open stream: HTTP request failed! HTTP/1.0 501 Not Implemented
- in %s on line %d
diff --git a/sapi/cli/tests/bug69953.phpt b/sapi/cli/tests/bug69953.phpt
new file mode 100644
index 0000000000..4de41fee40
--- /dev/null
+++ b/sapi/cli/tests/bug69953.phpt
@@ -0,0 +1,17 @@
+--TEST--
+FR #69953 (Support MKCALENDAR request method)
+--INI--
+allow_url_fopen=1
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start('echo $_SERVER["REQUEST_METHOD"];');
+$context = stream_context_create(['http' => ['method' => 'MKCALENDAR']]);
+var_dump(file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS, false, $context));
+?>
+--EXPECT--
+string(10) "MKCALENDAR"
diff --git a/sapi/cli/tests/bug70006.phpt b/sapi/cli/tests/bug70006.phpt
new file mode 100644
index 0000000000..855c9e1f80
--- /dev/null
+++ b/sapi/cli/tests/bug70006.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #70006 (cli - function with default arg = STDOUT crash output)
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+
+function foo1($stream = STDOUT)
+{
+ //do nothing
+}
+foo1();
+?>
+okey
+--EXPECT--
+okey
diff --git a/sapi/cli/tests/bug70264.phpt b/sapi/cli/tests/bug70264.phpt
new file mode 100644
index 0000000000..877b1194f2
--- /dev/null
+++ b/sapi/cli/tests/bug70264.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #70264 (CLI server directory traversal)
+--INI--
+allow_url_fopen=1
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start(null, null);
+echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/..\\CREDITS");
+echo file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS . "/..%5CCREDITS");
+?>
+--EXPECTF--
+Warning: file_get_contents(http://%s/..\CREDITS): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
+ in %sbug70264.php on line %d
+
+Warning: file_get_contents(http://%s/..%5CCREDITS): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
+ in %sbug70264.php on line %d
diff --git a/sapi/cli/tests/bug70470.phpt b/sapi/cli/tests/bug70470.phpt
new file mode 100644
index 0000000000..acd8c98f05
--- /dev/null
+++ b/sapi/cli/tests/bug70470.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Bug #70470 (Built-in server truncates headers spanning over TCP packets)
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--XFAIL--
+bug is not fixed yet
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start("var_dump(getAllheaders());");
+
+$fp = fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT, $errno, $errmsg, 0.5);
+
+if (!$fp) {
+ die("connect failed: " . $errmsg);
+}
+
+fwrite($fp, "GET / HTTP/1.1\r\n");
+fwrite($fp, "Host: " . PHP_CLI_SERVER_HOSTNAME . "\r\n");
+fwrite($fp, "Content");
+fflush($fp);
+usleep(200000);
+fwrite($fp, "-Type: text/html; charset=UTF-8\r\n");
+fwrite($fp, "Connection: clo");
+fflush($fp);
+usleep(200000);
+fwrite($fp, "se\r\n\r\n");
+while (!feof($fp)) {
+ echo fgets($fp);
+}
+fclose($fp);
+?>
+--EXPECTF--
+HTTP/1.1 200 OK
+%a
+array(3) {
+ ["Host"]=>
+ string(9) "localhost"
+ ["Content-Type"]=>
+ string(24) "text/html; charset=UTF-8"
+ ["Connection"]=>
+ string(5) "close"
+}
diff --git a/sapi/cli/tests/bug71005.phpt b/sapi/cli/tests/bug71005.phpt
new file mode 100644
index 0000000000..f02f261fbf
--- /dev/null
+++ b/sapi/cli/tests/bug71005.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Bug #71005 (Segfault in php_cli_server_dispatch_router())
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+
+$code = <<<'EOF'
+set_exception_handler(function () { echo 'goodbye'; });
+throw new Exception;
+EOF;
+
+include "php_cli_server.inc";
+php_cli_server_start($code);
+
+list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
+$port = intval($port) ?: 80;
+
+$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+if (!$fp) {
+ die("connect failed");
+}
+
+if(fwrite($fp, <<<HEADER
+GET / HTTP/1.1
+Host: {$host}
+
+
+HEADER
+)) {
+ while (!feof($fp)) {
+ echo fgets($fp);
+ }
+}
+
+?>
+--EXPECTF--
+HTTP/1.1 200 OK
+Host: %s
+Date: %s
+Connection: close
+X-Powered-By: PHP/%s
+Content-type: text/html; charset=UTF-8
+
+goodbye
diff --git a/sapi/cli/tests/bug71624.phpt b/sapi/cli/tests/bug71624.phpt
new file mode 100644
index 0000000000..aa4c69da12
--- /dev/null
+++ b/sapi/cli/tests/bug71624.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #61977 Test that -R properly sets argi and argn
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+
+$php = getenv('TEST_PHP_EXECUTABLE');
+
+$filename_txt = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71624.test.txt";
+
+$txt = 'foo
+test
+hello
+';
+
+file_put_contents($filename_txt, $txt);
+
+$test_args = ['$argi', '$argn'];
+foreach ($test_args as $test_arg) {
+ if (substr(PHP_OS, 0, 3) == 'WIN') {
+ var_dump(`type "$filename_txt" | "$php" -n -R "echo $test_arg . PHP_EOL;"`);
+ } else {
+ var_dump(`cat "$filename_txt" | "$php" -n -R 'echo $test_arg . PHP_EOL;'`);
+ }
+}
+
+@unlink($filename_txt);
+
+echo "Done\n";
+?>
+--EXPECT--
+string(6) "1
+2
+3
+"
+string(15) "foo
+test
+hello
+"
+Done
diff --git a/sapi/cli/tests/cli_process_title_windows.phpt b/sapi/cli/tests/cli_process_title_windows.phpt
index 12eb80756d..4e81b4c634 100644
--- a/sapi/cli/tests/cli_process_title_windows.phpt
+++ b/sapi/cli/tests/cli_process_title_windows.phpt
@@ -21,7 +21,7 @@ if (shell_exec('PowerShell -Help') === NULL)
// cli_set_process_title(). We're only making the API calls to ensure there are
// no warnings/errors.
-$is_windows8 = false;
+$is_windows8_or_above = false;
$ps_output = shell_exec("PowerShell -NoProfile \"(Get-Host).UI.RawUI.WindowTitle\"");
if ($ps_output === null)
{
@@ -31,8 +31,8 @@ if ($ps_output === null)
$ps_output = trim($ps_output);
$end_title_windows8 = ": Windows PowerShell";
-if (($ps_output == "Windows PowerShell") || (strlen($ps_output) > strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) === $end_title_windows8))
- $is_windows8 = true;
+if (($ps_output == "Windows PowerShell") || (strlen($ps_output) > strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) === $end_title_windows8) || PHP_WINDOWS_VERSION_MAJOR >= 10)
+ $is_windows8_or_above = true;
echo "*** Testing setting the process title ***\n";
@@ -42,7 +42,7 @@ $pid = getmypid();
if (cli_set_process_title($original_title) === true)
echo "Successfully set title\n";
-if ($is_windows8)
+if ($is_windows8_or_above)
{
$loaded_title = $original_title;
}
@@ -82,4 +82,4 @@ else
*** Testing setting the process title ***
Successfully set title
Successfully verified title using get-process
-Successfully verified title using get \ No newline at end of file
+Successfully verified title using get
diff --git a/sapi/cli/tests/php_cli_server_004.phpt b/sapi/cli/tests/php_cli_server_004.phpt
index 8b913f6596..5e3bbec18f 100644
--- a/sapi/cli/tests/php_cli_server_004.phpt
+++ b/sapi/cli/tests/php_cli_server_004.phpt
@@ -38,6 +38,7 @@ HEADER
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_005.phpt b/sapi/cli/tests/php_cli_server_005.phpt
index cdd0ae902f..3f9078c8ae 100644
--- a/sapi/cli/tests/php_cli_server_005.phpt
+++ b/sapi/cli/tests/php_cli_server_005.phpt
@@ -50,6 +50,7 @@ HEADER
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_006.phpt b/sapi/cli/tests/php_cli_server_006.phpt
index ad6d6c9598..c68f1e51b0 100644
--- a/sapi/cli/tests/php_cli_server_006.phpt
+++ b/sapi/cli/tests/php_cli_server_006.phpt
@@ -34,6 +34,7 @@ HEADER
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_007.phpt b/sapi/cli/tests/php_cli_server_007.phpt
index 6420ff5a41..b588b9ee2e 100644
--- a/sapi/cli/tests/php_cli_server_007.phpt
+++ b/sapi/cli/tests/php_cli_server_007.phpt
@@ -34,6 +34,7 @@ HEADER
--EXPECTF--
HTTP/1.1 401 Unauthorized
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
WWW-Authenticate: Digest realm="foo",qop="auth",nonce="XXXXX",opaque="acbd18db4cc2f85cedef654fccc4a4d8"
diff --git a/sapi/cli/tests/php_cli_server_008.phpt b/sapi/cli/tests/php_cli_server_008.phpt
index 01f825a746..58b2485db5 100644
--- a/sapi/cli/tests/php_cli_server_008.phpt
+++ b/sapi/cli/tests/php_cli_server_008.phpt
@@ -54,6 +54,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
@@ -61,6 +62,7 @@ Content-type: text/html; charset=UTF-8
string(8) "HTTP/1.1"
HTTP/1.0 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_009.phpt b/sapi/cli/tests/php_cli_server_009.phpt
index 7f3009b9bd..d63c6abf28 100644
--- a/sapi/cli/tests/php_cli_server_009.phpt
+++ b/sapi/cli/tests/php_cli_server_009.phpt
@@ -78,6 +78,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
@@ -85,6 +86,7 @@ Content-type: text/html; charset=UTF-8
string(8) "/foo/bar"
HTTP/1.0 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_010.phpt b/sapi/cli/tests/php_cli_server_010.phpt
index ce3abeb501..fe8f1a98ca 100644
--- a/sapi/cli/tests/php_cli_server_010.phpt
+++ b/sapi/cli/tests/php_cli_server_010.phpt
@@ -55,6 +55,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
@@ -65,6 +66,7 @@ string(8) "/foo/bar"
string(7) "foo=bar"
HTTP/1.0 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_012.phpt b/sapi/cli/tests/php_cli_server_012.phpt
index 302540f7e6..10b9cdbfe9 100644
--- a/sapi/cli/tests/php_cli_server_012.phpt
+++ b/sapi/cli/tests/php_cli_server_012.phpt
@@ -40,6 +40,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_013.phpt b/sapi/cli/tests/php_cli_server_013.phpt
index 3ea3ea9cad..23269580fb 100644
--- a/sapi/cli/tests/php_cli_server_013.phpt
+++ b/sapi/cli/tests/php_cli_server_013.phpt
@@ -83,6 +83,7 @@ fclose($fp);
HTTP/1.1 404 Not Found
Host: %s
+Date: %s
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: %d
@@ -91,6 +92,7 @@ Content-Length: %d
</head><body><h1>Not Found</h1><p>The requested resource <code class="url">/</code> was not found on this server.</p></body></html>
HTTP/1.1 404 Not Found
Host: %s
+Date: %s
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: %d
@@ -99,6 +101,7 @@ Content-Length: %d
</head><body><h1>Not Found</h1><p>The requested resource <code class="url">/main/style.css</code> was not found on this server.</p></body></html>
HTTP/1.1 404 Not Found
Host: %s
+Date: %s
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: %d
diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt
index 4f812e2f63..7c50a5e30a 100644
--- a/sapi/cli/tests/php_cli_server_014.phpt
+++ b/sapi/cli/tests/php_cli_server_014.phpt
@@ -65,6 +65,7 @@ fclose($fp);
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: %s
@@ -72,6 +73,7 @@ Content-type: %s
done
HTTP/1.1 404 Not Found
Host: %s
+Date: %s
Connection: close
Content-Type: %s
Content-Length: %d
diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt
index af0a3f65a8..663268aea6 100644
--- a/sapi/cli/tests/php_cli_server_015.phpt
+++ b/sapi/cli/tests/php_cli_server_015.phpt
@@ -41,6 +41,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_017.phpt b/sapi/cli/tests/php_cli_server_017.phpt
index 34e7d5e289..28876dc52b 100644
--- a/sapi/cli/tests/php_cli_server_017.phpt
+++ b/sapi/cli/tests/php_cli_server_017.phpt
@@ -37,6 +37,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_018.phpt b/sapi/cli/tests/php_cli_server_018.phpt
index 44e1292934..acfb0f2ce3 100644
--- a/sapi/cli/tests/php_cli_server_018.phpt
+++ b/sapi/cli/tests/php_cli_server_018.phpt
@@ -37,6 +37,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/php_cli_server_019.phpt b/sapi/cli/tests/php_cli_server_019.phpt
index aeb7a9f891..7be87a86c9 100644
--- a/sapi/cli/tests/php_cli_server_019.phpt
+++ b/sapi/cli/tests/php_cli_server_019.phpt
@@ -41,6 +41,7 @@ fclose($fp);
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: %s
Bar-Foo: Foo
diff --git a/sapi/cli/tests/php_cli_server_020.phpt b/sapi/cli/tests/php_cli_server_020.phpt
index 4ed673d380..766c666911 100644
--- a/sapi/cli/tests/php_cli_server_020.phpt
+++ b/sapi/cli/tests/php_cli_server_020.phpt
@@ -33,6 +33,7 @@ HEADER
--EXPECTF--
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt
index 313dcd5ac1..21dacb439a 100644
--- a/sapi/cli/tests/upload_2G.phpt
+++ b/sapi/cli/tests/upload_2G.phpt
@@ -21,6 +21,10 @@ if ($f = fopen("/proc/meminfo","r")) {
if (empty($enough_free_ram)) {
die("skip need +3G free RAM");
}
+
+if (getenv('TRAVIS')) {
+ die("skip Fails intermittently on travis");
+}
?>
--FILE--
<?php
@@ -77,6 +81,7 @@ Test
HTTP/1.1 200 OK
Host: %s
+Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-type: text/html; charset=UTF-8
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index 4e50133dd4..18c2027271 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,7 +34,7 @@ const char HARDCODED_INI[] =
"max_input_time=-1\n\0";
#if defined(PHP_WIN32) && defined(ZTS)
-ZEND_TSRMLS_CACHE_DEFINE();
+ZEND_TSRMLS_CACHE_DEFINE()
#endif
static char* php_embed_read_cookies(void)
@@ -177,6 +177,10 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv)
ZEND_TSRMLS_CACHE_UPDATE();
#endif
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
sapi_startup(&php_embed_module);
#ifdef PHP_WIN32
diff --git a/sapi/embed/php_embed.h b/sapi/embed/php_embed.h
index 0884cddabd..92a2f70be7 100644
--- a/sapi/embed/php_embed.h
+++ b/sapi/embed/php_embed.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -45,7 +45,7 @@
#endif
#ifdef ZTS
-ZEND_TSRMLS_CACHE_EXTERN();
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
BEGIN_EXTERN_C()
diff --git a/sapi/fpm/Makefile.frag b/sapi/fpm/Makefile.frag
index e39fbcb1e8..b0b4b34658 100644
--- a/sapi/fpm/Makefile.frag
+++ b/sapi/fpm/Makefile.frag
@@ -19,6 +19,6 @@ install-fpm: $(SAPI_FPM_PATH)
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
@$(INSTALL_DATA) sapi/fpm/php-fpm.8 $(INSTALL_ROOT)$(mandir)/man8/php-fpm$(program_suffix).8
- @echo "Installing PHP FPM status page: $(INSTALL_ROOT)$(datadir)/fpm/"
+ @echo "Installing PHP FPM status page: $(INSTALL_ROOT)$(datadir)/fpm/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(datadir)/fpm
@$(INSTALL_DATA) sapi/fpm/status.html $(INSTALL_ROOT)$(datadir)/fpm/status.html
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index 1c496e5a9d..e6a1a49857 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -712,7 +712,7 @@ if test "$PHP_FPM" != "no"; then
case $host_alias in
*aix*)
- BUILD_FPM="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
+ BUILD_FPM="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FASTCGI_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
;;
*darwin*)
BUILD_FPM="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FASTCGI_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
diff --git a/sapi/fpm/fpm/events/devpoll.c b/sapi/fpm/fpm/events/devpoll.c
index 729af6c486..303978643a 100644
--- a/sapi/fpm/fpm/events/devpoll.c
+++ b/sapi/fpm/fpm/events/devpoll.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/devpoll.h b/sapi/fpm/fpm/events/devpoll.h
index 12a8ea834f..c77c734c9e 100644
--- a/sapi/fpm/fpm/events/devpoll.h
+++ b/sapi/fpm/fpm/events/devpoll.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/epoll.c b/sapi/fpm/fpm/events/epoll.c
index 8a3c5306dc..b45f4f9b43 100644
--- a/sapi/fpm/fpm/events/epoll.c
+++ b/sapi/fpm/fpm/events/epoll.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/epoll.h b/sapi/fpm/fpm/events/epoll.h
index 2ef5e941a5..9ffea786bd 100644
--- a/sapi/fpm/fpm/events/epoll.h
+++ b/sapi/fpm/fpm/events/epoll.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/kqueue.c b/sapi/fpm/fpm/events/kqueue.c
index 1e0999ee81..6397405de5 100644
--- a/sapi/fpm/fpm/events/kqueue.c
+++ b/sapi/fpm/fpm/events/kqueue.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/kqueue.h b/sapi/fpm/fpm/events/kqueue.h
index f9329c4666..d336863260 100644
--- a/sapi/fpm/fpm/events/kqueue.h
+++ b/sapi/fpm/fpm/events/kqueue.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/poll.c b/sapi/fpm/fpm/events/poll.c
index 638513e9d9..484cb8890a 100644
--- a/sapi/fpm/fpm/events/poll.c
+++ b/sapi/fpm/fpm/events/poll.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/poll.h b/sapi/fpm/fpm/events/poll.h
index 4471895aa1..ce33ee5651 100644
--- a/sapi/fpm/fpm/events/poll.h
+++ b/sapi/fpm/fpm/events/poll.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/port.c b/sapi/fpm/fpm/events/port.c
index f60aaeca06..8eb2ace8ec 100644
--- a/sapi/fpm/fpm/events/port.c
+++ b/sapi/fpm/fpm/events/port.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/port.h b/sapi/fpm/fpm/events/port.h
index 3b550757d0..12b6b6b202 100644
--- a/sapi/fpm/fpm/events/port.h
+++ b/sapi/fpm/fpm/events/port.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/select.c b/sapi/fpm/fpm/events/select.c
index 3714454213..b26047ca08 100644
--- a/sapi/fpm/fpm/events/select.c
+++ b/sapi/fpm/fpm/events/select.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/select.h b/sapi/fpm/fpm/events/select.h
index 4562fd9bfd..1de3837956 100644
--- a/sapi/fpm/fpm/events/select.h
+++ b/sapi/fpm/fpm/events/select.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c
index 9a619ce887..2a92fb25a7 100644
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
@@ -1573,7 +1573,7 @@ static void fpm_conf_dump() /* {{{ */
/*
* Please keep the same order as in fpm_conf.h and in php-fpm.conf.in
*/
- zlog(ZLOG_NOTICE, "[General]");
+ zlog(ZLOG_NOTICE, "[global]");
zlog(ZLOG_NOTICE, "\tpid = %s", STR2STR(fpm_global_config.pid_file));
zlog(ZLOG_NOTICE, "\terror_log = %s", STR2STR(fpm_global_config.error_log));
#ifdef HAVE_SYSLOG_H
diff --git a/sapi/fpm/fpm/fpm_events.c b/sapi/fpm/fpm/fpm_events.c
index ca45cb1665..2b8e8cf13a 100644
--- a/sapi/fpm/fpm/fpm_events.c
+++ b/sapi/fpm/fpm/fpm_events.c
@@ -291,7 +291,7 @@ int fpm_event_pre_init(char *machanism) /* {{{ */
}
return -1;
}
-/* }} */
+/* }}} */
const char *fpm_event_machanism_name() /* {{{ */
{
@@ -538,4 +538,3 @@ int fpm_event_del(struct fpm_event_s *ev) /* {{{ */
}
/* }}} */
-/* }}} */
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c
index 86332c4c80..5aad9a08c9 100644
--- a/sapi/fpm/fpm/fpm_log.c
+++ b/sapi/fpm/fpm/fpm_log.c
@@ -448,6 +448,11 @@ int fpm_log_write(char *log_format) /* {{{ */
b += len2;
len += len2;
}
+ if (len >= FPM_LOG_BUFFER) {
+ zlog(ZLOG_NOTICE, "the log buffer is full (%d). The access log request has been truncated.", FPM_LOG_BUFFER);
+ len = FPM_LOG_BUFFER;
+ break;
+ }
continue;
}
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index e836c7a284..5adeb63b7a 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -589,7 +589,6 @@ void cgi_php_import_environment_variables(zval *array_ptr) /* {{{ */
static void sapi_cgi_register_variables(zval *track_vars_array) /* {{{ */
{
- fcgi_request *request = (fcgi_request*) SG(server_context);
size_t php_self_len;
char *php_self;
@@ -601,7 +600,7 @@ static void sapi_cgi_register_variables(zval *track_vars_array) /* {{{ */
if (CGIG(fix_pathinfo)) {
char *script_name = SG(request_info).request_uri;
unsigned int script_name_len = script_name ? strlen(script_name) : 0;
- char *path_info = FCGI_GETENV(request, "PATH_INFO");
+ char *path_info = sapi_cgibin_getenv("PATH_INFO", sizeof("PATH_INFO") - 1);
unsigned int path_info_len = path_info ? strlen(path_info) : 0;
php_self_len = script_name_len + path_info_len;
@@ -1072,11 +1071,14 @@ static void init_request_info(void)
}
#define APACHE_PROXY_FCGI_PREFIX "proxy:fcgi://"
- /* Fix proxy URLs in SCRIPT_FILENAME generated by Apache mod_proxy_fcgi:
+#define APACHE_PROXY_BALANCER_PREFIX "proxy:balancer://"
+ /* Fix proxy URLs in SCRIPT_FILENAME generated by Apache mod_proxy_fcgi and mod_proxy_balancer:
* proxy:fcgi://localhost:9000/some-dir/info.php/test?foo=bar
+ * proxy:balancer://localhost:9000/some-dir/info.php/test?foo=bar
* should be changed to:
* /some-dir/info.php/test
* See: http://bugs.php.net/bug.php?id=54152
+ * http://bugs.php.net/bug.php?id=62172
* https://issues.apache.org/bugzilla/show_bug.cgi?id=50851
*/
if (env_script_filename &&
@@ -1100,6 +1102,27 @@ static void init_request_info(void)
}
}
+ if (env_script_filename &&
+ strncasecmp(env_script_filename, APACHE_PROXY_BALANCER_PREFIX, sizeof(APACHE_PROXY_BALANCER_PREFIX) - 1) == 0) {
+ /* advance to first character of hostname */
+ char *p = env_script_filename + (sizeof(APACHE_PROXY_BALANCER_PREFIX) - 1);
+ while (*p != '\0' && *p != '/') {
+ p++; /* move past hostname and port */
+ }
+ if (*p != '\0') {
+ /* Copy path portion in place to avoid memory leak. Note
+ * that this also affects what script_path_translated points
+ * to. */
+ memmove(env_script_filename, p, strlen(p) + 1);
+ apache_was_here = 1;
+ }
+ /* ignore query string if sent by Apache (RewriteRule) */
+ p = strchr(env_script_filename, '?');
+ if (p) {
+ *p =0;
+ }
+ }
+
if (CGIG(fix_pathinfo)) {
struct stat st;
char *real_path = NULL;
@@ -1589,6 +1612,10 @@ int main(int argc, char *argv[])
tsrm_ls = ts_resource(0);
#endif
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
sapi_startup(&cgi_sapi_module);
cgi_sapi_module.php_ini_path_override = NULL;
cgi_sapi_module.php_ini_ignore_cwd = 1;
@@ -1730,9 +1757,9 @@ int main(int argc, char *argv[])
SG(request_info).no_headers = 1;
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
diff --git a/sapi/fpm/fpm/fpm_signals.c b/sapi/fpm/fpm/fpm_signals.c
index c5d0692f18..a637e69e71 100644
--- a/sapi/fpm/fpm/fpm_signals.c
+++ b/sapi/fpm/fpm/fpm_signals.c
@@ -241,6 +241,10 @@ int fpm_signals_init_child() /* {{{ */
zlog(ZLOG_SYSERROR, "failed to init child signals: sigaction()");
return -1;
}
+
+#ifdef ZEND_SIGNALS
+ zend_signal_init();
+#endif
return 0;
}
/* }}} */
diff --git a/sapi/fpm/php-fpm.8.in b/sapi/fpm/php-fpm.8.in
index 3a697c6a65..cb1224e371 100644
--- a/sapi/fpm/php-fpm.8.in
+++ b/sapi/fpm/php-fpm.8.in
@@ -1,4 +1,4 @@
-.TH PHP-FPM 8 "2009" "The PHP Group" "Scripting Language"
+.TH PHP-FPM 8 "2016" "The PHP Group" "Scripting Language"
.SH NAME
.TP 15
php-fpm \- PHP FastCGI Process Manager 'PHP-FPM'
@@ -213,7 +213,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphp-fpm\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2009 The PHP Group
+Copyright \(co 1997\-2016 The PHP Group
.PD 0
.P
Copyright (c) 2007-2009, Andrei Nigmatulin
diff --git a/sapi/fpm/tests/008.phpt b/sapi/fpm/tests/008.phpt
index 60f1ea6ebd..732a717aad 100644
--- a/sapi/fpm/tests/008.phpt
+++ b/sapi/fpm/tests/008.phpt
@@ -1,7 +1,22 @@
--TEST--
FPM: Test multi pool (dynamic + ondemand + static) (bug #68423)
--SKIPIF--
-<?php include "skipif.inc"; ?>
+<?php
+include "skipif.inc";
+
+$cfg = <<<EOT
+[global]
+[poold_ondemand]
+listen=127.0.0.1:9000
+pm = ondemand
+pm.max_children = 2
+pm.process_idle_timeout = 10
+EOT;
+
+if (test_fpm_conf($cfg, $msg) == false) {
+ die("skip " . $msg);
+}
+?>
--FILE--
<?php
diff --git a/sapi/fpm/tests/010.phpt b/sapi/fpm/tests/010.phpt
index f3b768f319..49e1a07923 100644
--- a/sapi/fpm/tests/010.phpt
+++ b/sapi/fpm/tests/010.phpt
@@ -2,6 +2,12 @@
FPM: Test status page
--SKIPIF--
<?php include "skipif.inc"; ?>
+--XFAIL--
+randomly intermittently failing all the time in CI, with diff:
+017+ active processes: 0
+018+ total processes: 1
+017- active processes: 1
+018- total processes: 2
--FILE--
<?php
diff --git a/sapi/fpm/tests/016.phpt b/sapi/fpm/tests/016.phpt
index 1a9e8e7577..a5084f18f3 100644
--- a/sapi/fpm/tests/016.phpt
+++ b/sapi/fpm/tests/016.phpt
@@ -1,7 +1,22 @@
--TEST--
FPM: Test splited configuration and load order #68391
--SKIPIF--
-<?php include "skipif.inc"; ?>
+<?php
+include "skipif.inc";
+
+$cfg = <<<EOT
+[global]
+[poold_ondemand]
+listen=127.0.0.1:9000
+pm = ondemand
+pm.max_children = 2
+pm.process_idle_timeout = 10
+EOT;
+
+if (test_fpm_conf($cfg, $msg) == false) {
+ die("skip " . $msg);
+}
+?>
--FILE--
<?php
@@ -84,4 +99,4 @@ Done
unlink($name);
}
@rmdir($logdir);
-?> \ No newline at end of file
+?>
diff --git a/sapi/fpm/tests/021-uds-acl.phpt b/sapi/fpm/tests/021-uds-acl.phpt
index f39c526418..f5da086702 100644
--- a/sapi/fpm/tests/021-uds-acl.phpt
+++ b/sapi/fpm/tests/021-uds-acl.phpt
@@ -4,9 +4,16 @@ FPM: Test Unix Domain Socket with Posix ACL
<?php
include "skipif.inc";
if (!(file_exists('/usr/bin/getfacl') && file_exists('/etc/passwd') && file_exists('/etc/group'))) die ("skip missing getfacl command");
+$cfg = <<<EOT
+[global]
+[unconfined]
+listen = 127.0.0.1:9999
+listen.acl_users = nobody
+listen.acl_groups = nobody
+listen.mode = 0600
+EOT;
+if (test_fpm_conf($cfg, $msg) == false) { die("skip " . $msg); }
?>
---XFAIL--
-Mark as XFAIL because --with-fpm-acl is not enabled in default build
--FILE--
<?php
diff --git a/sapi/fpm/tests/include.inc b/sapi/fpm/tests/include.inc
index b195fad507..5cbb08b478 100644
--- a/sapi/fpm/tests/include.inc
+++ b/sapi/fpm/tests/include.inc
@@ -52,6 +52,18 @@ function run_fpm($config, &$out = false, $extra_args = '') /* {{{ */
}
/* }}} */
+function test_fpm_conf($config, &$msg = NULL) { /* {{{ */
+ $cfg = dirname(__FILE__).'/test-fpm-config.tmp';
+ file_put_contents($cfg, $config);
+ exec(get_fpm_path() . ' -t -y ' . $cfg . ' 2>&1', $output, $code);
+ if ($code) {
+ $msg = preg_replace("/\[.+?\]/", "", $output[0]);
+ return false;
+ }
+ return true;
+}
+/* }}} */
+
function run_fpm_till($needle, $config, $max = 10) /* {{{ */
{
$i = 0;
@@ -76,7 +88,7 @@ function run_fpm_till($needle, $config, $max = 10) /* {{{ */
}
/* }}} */
-function fpm_display_log($tail, $n=1, $ignore='systemd') {
+function fpm_display_log($tail, $n=1, $ignore='systemd') { /* {{{ */
while ($n) {
$a = fgets($tail);
if (empty($ignore) || !strpos($a, $ignore)) {
@@ -84,9 +96,9 @@ function fpm_display_log($tail, $n=1, $ignore='systemd') {
$n--;
}
}
-}
+} /* }}} */
-function run_request($host, $port, $uri='/ping', $query='') {
+function run_request($host, $port, $uri='/ping', $query='') { /* {{{ */
require_once 'fcgi.inc';
$client = new Adoy\FastCGI\Client($host, $port);
$params = array(
@@ -109,3 +121,4 @@ function run_request($host, $port, $uri='/ping', $query='') {
);
return $client->request($params, false)."\n";
}
+/* }}} */
diff --git a/sapi/litespeed/Makefile.frag b/sapi/litespeed/Makefile.frag
index 767c2e5eb1..125a3b13da 100644
--- a/sapi/litespeed/Makefile.frag
+++ b/sapi/litespeed/Makefile.frag
@@ -4,6 +4,6 @@ $(SAPI_LITESPEED_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_LITESPEED_OB
$(BUILD_LITESPEED)
install-litespeed: $(SAPI_LITESPEED_PATH)
- @echo "Installing PHP LiteSpeed binary: $(INSTALL_ROOT)$(bindir)/"
+ @echo "Installing PHP LiteSpeed binary: $(INSTALL_ROOT)$(bindir)/"
@$(INSTALL) -m 0755 $(SAPI_LITESPEED_PATH) $(INSTALL_ROOT)$(bindir)/lsphp
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index f5f7d39b44..b0ea105a88 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -173,6 +173,7 @@ static int sapi_lsapi_deactivate(void)
if ( SG(request_info).path_translated )
{
efree( SG(request_info).path_translated );
+ SG(request_info).path_translated = NULL;
}
return SUCCESS;
@@ -417,7 +418,7 @@ static void sapi_lsapi_log_message(char *message)
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
- "LiteSpeed V6.8",
+ "LiteSpeed V6.9",
php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
@@ -601,11 +602,12 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va
else
{
#if PHP_MAJOR_VERSION >= 7
- psKey = zend_string_init(pKey, keyLen, 1);
+ --keyLen;
+ psKey = zend_string_init(pKey, keyLen, 1);
zend_alter_ini_entry_chars(psKey,
(char *)pValue, valLen,
type, PHP_INI_STAGE_ACTIVATE);
- zend_string_release(psKey);
+ zend_string_release(psKey);
#else
zend_alter_ini_entry((char *)pKey, keyLen,
(char *)pValue, valLen,
@@ -769,6 +771,8 @@ static int cli_main( int argc, char * argv[] )
zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */
CG(in_compilation) = 0; /* not initialized but needed for several options */
+ SG(options) |= SAPI_OPTION_NO_CHDIR;
+
#if PHP_MAJOR_VERSION < 7
EG(uninitialized_zval_ptr) = NULL;
#endif
@@ -807,9 +811,9 @@ static int cli_main( int argc, char * argv[] )
case 'v':
if (php_request_startup() != FAILURE) {
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2015 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
#ifdef PHP_OUTPUT_NEWAPI
php_output_end_all();
@@ -1005,6 +1009,10 @@ int main( int argc, char * argv[] )
tsrm_startup(1, 1, 0, NULL);
#endif
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
if (argc > 1 ) {
if ( parse_opt( argc, argv, &climode,
&php_ini_path, &php_bind ) == -1 ) {
@@ -1163,11 +1171,7 @@ zend_module_entry litespeed_module_entry = {
static int add_associate_array( const char * pKey, int keyLen, const char * pValue, int valLen,
void * arg )
{
- add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue
-#if PHP_MAJOR_VERSION < 7
- , 1
-#endif
- );
+ add_assoc_string_ex((zval *)arg, (char *)pKey, keyLen, (char *)pValue);
return 1;
}
@@ -1221,11 +1225,7 @@ PHP_FUNCTION(litespeed_response_headers)
headerBuf[len] = 0;
if ( len ) {
while( isspace(*++p));
- add_assoc_string_ex(return_value, headerBuf, len+1, p
-#if PHP_MAJOR_VERSION < 7
- , 1
-#endif
- );
+ add_assoc_string_ex(return_value, headerBuf, len, p);
}
}
}
@@ -1242,7 +1242,7 @@ PHP_FUNCTION(apache_get_modules)
{
static const char * mod_names[] =
{
- "mod_rewrite", "mod_mime", "mod_headers", "mod_expires", NULL
+ "mod_rewrite", "mod_mime", "mod_headers", "mod_expires", "mod_auth_basic", NULL
};
const char **name = mod_names;
/* TODO: */
diff --git a/sapi/litespeed/lsapidef.h b/sapi/litespeed/lsapidef.h
index 02c5ae42e3..56dfe7a3b8 100644
--- a/sapi/litespeed/lsapidef.h
+++ b/sapi/litespeed/lsapidef.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index d6d1c107a7..41a1715d07 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -128,7 +128,7 @@ static int s_pid_dump_debug_info = 0;
LSAPI_Request g_req = { -1, -1 };
-static char s_pSecret[24];
+static char s_secret[24];
void Flush_RespBuf_r( LSAPI_Request * pReq );
@@ -437,7 +437,7 @@ static int allocateEnvList( struct LSAPI_key_value_pair ** pEnvList,
int *curSize, int newSize )
{
struct LSAPI_key_value_pair * pBuf;
- if ( *curSize >= newSize )
+ if ( *curSize >= newSize )
return 0;
if ( newSize > 8192 )
return -1;
@@ -559,6 +559,40 @@ static void fixHeaderIndexEndian( LSAPI_Request * pReq )
}
}
+
+static int validateHeaders( LSAPI_Request * pReq )
+{
+ int totalLen = pReq->m_pHeader->m_httpHeaderLen;
+ int i;
+ for(i = 0; i < H_TRANSFER_ENCODING; ++i)
+ {
+ if ( pReq->m_pHeaderIndex->m_headerOff[i] )
+ {
+ if (pReq->m_pHeaderIndex->m_headerOff[i] > totalLen
+ || pReq->m_pHeaderIndex->m_headerLen[i]
+ + pReq->m_pHeaderIndex->m_headerOff[i] > totalLen)
+ return -1;
+ }
+ }
+ if (pReq->m_pHeader->m_cntUnknownHeaders > 0)
+ {
+ struct lsapi_header_offset * pCur, *pEnd;
+ pCur = pReq->m_pUnknownHeader;
+ pEnd = pCur + pReq->m_pHeader->m_cntUnknownHeaders;
+ while( pCur < pEnd )
+ {
+ if (pCur->nameOff > totalLen
+ || pCur->nameOff + pCur->nameLen > totalLen
+ || pCur->valueOff > totalLen
+ || pCur->valueOff + pCur->valueLen > totalLen)
+ return -1;
+ ++pCur;
+ }
+ }
+ return 0;
+}
+
+
static uid_t s_uid = 0;
static uid_t s_defaultUid; //web server need set this
static gid_t s_defaultGid;
@@ -670,7 +704,7 @@ static int readSecret( const char * pSecretFile )
close( fd );
return -1;
}
- if ( read( fd, s_pSecret, 16 ) < 16 )
+ if ( read( fd, s_secret, 16 ) < 16 )
{
fprintf( stderr, "LSAPI: failed to read secret from secret file: %s\n", pSecretFile );
close( fd );
@@ -682,7 +716,7 @@ static int readSecret( const char * pSecretFile )
int LSAPI_is_suEXEC_Daemon()
{
- if (( !s_uid )&&( s_pSecret[0] ))
+ if (( !s_uid )&&( s_secret[0] ))
return 1;
else
return 0;
@@ -877,7 +911,7 @@ static int lsapi_suexec_auth( LSAPI_Request *pReq,
if ( len < 32 )
return -1;
memmove( achMD5, pAuth + 16, 16 );
- memmove( pAuth + 16, s_pSecret, 16 );
+ memmove( pAuth + 16, s_secret, 16 );
lsapi_MD5Init( &md5ctx );
lsapi_MD5Update( &md5ctx, (unsigned char *)pAuth, 32 );
lsapi_MD5Update( &md5ctx, (unsigned char *)pUgid, 8 );
@@ -999,7 +1033,18 @@ static int parseRequest( LSAPI_Request * pReq, int totalLen )
if ( parseEnv( pReq->m_pEnvList, pReq->m_pHeader->m_cntEnv,
&pBegin, pEnd ) == -1 )
return -1;
-
+ if (pReq->m_pHeader->m_scriptFileOff < 0
+ || pReq->m_pHeader->m_scriptFileOff >= totalLen
+ || pReq->m_pHeader->m_scriptNameOff < 0
+ || pReq->m_pHeader->m_scriptNameOff >= totalLen
+ || pReq->m_pHeader->m_queryStringOff < 0
+ || pReq->m_pHeader->m_queryStringOff >= totalLen
+ || pReq->m_pHeader->m_requestMethodOff < 0
+ || pReq->m_pHeader->m_requestMethodOff >= totalLen)
+ {
+ fprintf(stderr, "%d: bad request header - ERROR#1\n", getpid());
+ return -1;
+ }
pReq->m_pScriptFile = pReq->m_pReqBuf + pReq->m_pHeader->m_scriptFileOff;
pReq->m_pScriptName = pReq->m_pReqBuf + pReq->m_pHeader->m_scriptNameOff;
pReq->m_pQueryString = pReq->m_pReqBuf + pReq->m_pHeader->m_queryStringOff;
@@ -1025,6 +1070,13 @@ static int parseRequest( LSAPI_Request * pReq, int totalLen )
{
fixHeaderIndexEndian( pReq );
}
+
+ if (validateHeaders(pReq) == -1)
+ {
+ fprintf(stderr, "%d: bad request header - ERROR#2\n", getpid());
+ return -1;
+ }
+
pReq->m_reqBodyLen = pReq->m_pHeader->m_reqBodyLen;
if ( pReq->m_reqBodyLen == -2 )
{
@@ -1170,8 +1222,11 @@ static int readReq( LSAPI_Request * pReq )
pReq->m_reqState = LSAPI_ST_REQ_BODY | LSAPI_ST_RESP_HEADER;
if ( !s_uid )
+ {
if ( lsapi_changeUGid( pReq ) )
return -1;
+ memset(s_secret, 0, sizeof(s_secret));
+ }
pReq->m_bufProcessed = packetLen;
//OPTIMIZATION
@@ -1191,7 +1246,7 @@ int LSAPI_Init(void)
if ( !g_inited )
{
s_uid = geteuid();
- s_pSecret[0] = 0;
+ s_secret[0] = 0;
lsapi_signal(SIGPIPE, lsapi_sigpipe);
lsapi_signal(SIGUSR1, lsapi_siguser1);
@@ -1444,7 +1499,7 @@ int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, in
char * pBufCur = pBuf;
char * pCur;
char * p;
- if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )|| !getLF )
+ if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )||(bufLen < 0 )|| !getLF )
return -1;
*getLF = 0;
while( (left = pBufEnd - pBufCur ) > 0 )
@@ -1488,7 +1543,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen )
ssize_t len;
off_t total;
/* char *pOldBuf = pBuf; */
- if (!pReq || (pReq->m_fd ==-1) || ( !pBuf ))
+ if (!pReq || (pReq->m_fd ==-1) || ( !pBuf )||(bufLen < 0 ))
return -1;
total = pReq->m_reqBodyLen - pReq->m_reqBodyRead;
diff --git a/sapi/litespeed/lsapilib.h b/sapi/litespeed/lsapilib.h
index cd69990314..5b5ca15f2c 100644
--- a/sapi/litespeed/lsapilib.h
+++ b/sapi/litespeed/lsapilib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/Makefile.frag b/sapi/phpdbg/Makefile.frag
index 36c7512d69..e0cdfe25ef 100644
--- a/sapi/phpdbg/Makefile.frag
+++ b/sapi/phpdbg/Makefile.frag
@@ -14,7 +14,7 @@ $(BUILD_BINARY): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS)
$(builddir)/phpdbg_lexer.lo: $(srcdir)/phpdbg_parser.h
$(srcdir)/phpdbg_lexer.c: $(srcdir)/phpdbg_lexer.l
- @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo $(srcdir)/phpdbg_lexer.c $(srcdir)/phpdbg_lexer.l)
+ @(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l)
$(srcdir)/phpdbg_parser.h: $(srcdir)/phpdbg_parser.c
$(srcdir)/phpdbg_parser.c: $(srcdir)/phpdbg_parser.y
diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4
index 87d38ea8c5..9fb4e62984 100644
--- a/sapi/phpdbg/config.m4
+++ b/sapi/phpdbg/config.m4
@@ -3,15 +3,15 @@ dnl $Id$
dnl
PHP_ARG_ENABLE(phpdbg, for phpdbg support,
-[ --enable-phpdbg Build phpdbg], no, no)
+[ --enable-phpdbg Build phpdbg], yes, yes)
PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support,
-[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], yes, yes)
+[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], no)
PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build,
[ --enable-phpdbg-debug Build phpdbg in debug mode], no, no)
-if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then
+if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then
AC_HEADER_TIOCGWINSZ
AC_DEFINE(HAVE_PHPDBG, 1, [ ])
@@ -21,14 +21,7 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then
AC_DEFINE(PHPDBG_DEBUG, 0, [ ])
fi
- if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
- if ! test -d $abs_srcdir/ext/phpdbg_webhelper; then
- ln -s ../sapi/phpdbg $abs_srcdir/ext/phpdbg_webhelper
- fi
- PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
- fi
-
- PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE"
+ PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_PHPDBG_FILES="phpdbg.c phpdbg_parser.c phpdbg_lexer.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c phpdbg_cmd.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_btree.c phpdbg_sigsafe.c phpdbg_wait.c phpdbg_io.c phpdbg_eol.c phpdbg_out.c"
if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
@@ -72,6 +65,10 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then
PHP_SUBST(BUILD_PHPDBG_SHARED)
fi
+if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
+ PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
+fi
+
dnl ## Local Variables:
dnl ## tab-width: 4
dnl ## End:
diff --git a/sapi/phpdbg/config.w32 b/sapi/phpdbg/config.w32
index 8a685d3347..2d907ee697 100644
--- a/sapi/phpdbg/config.w32
+++ b/sapi/phpdbg/config.w32
@@ -9,9 +9,10 @@ PHPDBG_SOURCES='phpdbg.c phpdbg_prompt.c phpdbg_cmd.c phpdbg_info.c phpdbg_help.
'phpdbg_sigio_win32.c phpdbg_eol.c phpdbg_out.c';
PHPDBG_DLL='php' + PHP_VERSION + 'phpdbg.dll';
PHPDBG_EXE='phpdbg.exe';
+PHPDBG_CFLAGS='/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1';
if (PHP_PHPDBG == "yes") {
- SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE);
+ SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE, PHPDBG_CFLAGS);
ADD_FLAG("LIBS_PHPDBG", "ws2_32.lib user32.lib");
ADD_FLAG("CFLAGS_PHPDBG", "/D YY_NO_UNISTD_H");
ADD_FLAG("LDFLAGS_PHPDBG", "/stack:8388608");
diff --git a/sapi/phpdbg/create-test.php b/sapi/phpdbg/create-test.php
new file mode 100644
index 0000000000..0d79fad5dd
--- /dev/null
+++ b/sapi/phpdbg/create-test.php
@@ -0,0 +1,150 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Bob Weinand <bwoebi@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+#####
+## This is just a helper for intercepting stdin/stdout and the file and create a half-finished test.
+## The output still may need adapting to match file names etc.
+#####
+
+error_reporting(-1);
+
+$phpdbg = getenv('TEST_PHPDBG_EXECUTABLE') ?: null;
+$pass_options = ' -qbI -n -d "error_reporting=32767" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0"';
+$file = "";
+$cmdargv = "";
+
+if (isset($argc) && $argc > 1) {
+ $post_ddash = false;
+ for ($i = 1; $i < $argc; $i++) {
+ if ($argv[$i][0] == "-" && !$post_ddash) {
+ switch (substr($argv[$i], 1)) {
+ case "p":
+ $phpdbg = $argv[++$i];
+ break;
+ case "n":
+ $pass_options .= " -n";
+ break;
+ case "d":
+ $pass_options .= " -d ".escapeshellarg($argv[++$i]);
+ $ini[] = $argv[$i];
+ break;
+ case "-":
+ $post_ddash = true;
+ break;
+ }
+ } else {
+ $real_argv[] = $argv[$i];
+ }
+ }
+ if (isset($real_argv[0])) {
+ $file = realpath($real_argv[0]);
+ $cmdargv = implode(" ", array_map("escapeshellarg", array_slice($real_argv, 1)));
+ }
+}
+
+$proc = proc_open("$phpdbg $pass_options $file -- $cmdargv", [["pipe", "r"], ["pipe", "w"], ["pipe", "w"]], $pipes);
+if (!$proc) {
+ die("Couldn't start phpdbg\n");
+}
+
+$input = $output = "";
+
+stream_set_blocking(STDIN, false);
+
+do {
+ $r = [$pipes[1], STDIN];
+ $w = $e = null;
+ $n = @stream_select($r, $w, $e, null);
+
+ if ($n > 0) {
+ if ("" != $in = fread(STDIN, 1024)) {
+ $input .= $in;
+ fwrite($pipes[0], $in);
+ continue;
+ }
+
+ if (feof(STDIN)) {
+ die("stdin closed?!\n");
+ }
+
+ if (feof($pipes[1])) {
+ $n = false;
+ } else {
+ $output .= $c = fgetc($pipes[1]);
+ echo $c;
+ }
+ }
+} while ($n !== false);
+
+stream_set_blocking(STDIN, true);
+
+print "\n";
+if (!isset($name)) {
+ print "Specify the test description: ";
+ $desc = trim(fgets(STDIN));
+}
+while (!isset($testfile)) {
+ print "Specify the test file name (leave empty to write to stderr): ";
+ $testfile = trim(fgets(STDIN));
+ if ($testfile != "" && file_exists($testfile)) {
+ print "That file already exists. Type y or yes to overwrite: ";
+ $y = trim(fgets(STDIN));
+ if ($y !== "y" && $y !== "yes") {
+ unset($testfile);
+ }
+ }
+}
+
+$output = str_replace("string(".strlen($file).") \"$file\"", 'string(%d) "%s"', $output);
+$output = str_replace($file, "%s", $output);
+$input = trim($input);
+
+$testdata = <<<TEST
+--TEST--
+$desc
+--PHPDBG--
+$input
+--EXPECTF--
+$output
+TEST;
+
+if (!empty($ini)) {
+ $testdata .= "\n--INI--\n".implode("\n", $ini);
+}
+if ($cmdargv != "") {
+ $testdata .= "\n--ARGS--\n$cmdargv";
+}
+if ($file != "") {
+ $testdata .= "\n--FILE--\n".file_get_contents($file);
+}
+
+if ($testfile == "") {
+ print "\n";
+} elseif (file_put_contents($testfile, $testdata)) {
+ print "Test saved to $testfile\n";
+} else {
+ print "The test could not be saved to $testfile; outputting on stderr now\n";
+ $testfile = "";
+}
+
+if ($testfile == "") {
+ fwrite(STDERR, $testdata);
+}
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 31dab3f274..68a164c499 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -52,6 +52,10 @@
# include "openssl/applink.c"
#endif
+#if defined(PHP_WIN32) && defined(ZTS)
+ZEND_TSRMLS_CACHE_DEFINE()
+#endif
+
ZEND_DECLARE_MODULE_GLOBALS(phpdbg);
int phpdbg_startup_run = 0;
@@ -72,12 +76,6 @@ PHP_INI_END()
static zend_bool phpdbg_booted = 0;
static zend_bool phpdbg_fully_started = 0;
-#if PHP_VERSION_ID >= 50500
-void (*zend_execute_old)(zend_execute_data *execute_data);
-#else
-void (*zend_execute_old)(zend_op_array *op_array);
-#endif
-
static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
{
pg->prompt[0] = NULL;
@@ -87,6 +85,7 @@ static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
pg->colors[1] = NULL;
pg->colors[2] = NULL;
+ pg->lines = phpdbg_get_terminal_height();
pg->exec = NULL;
pg->exec_len = 0;
pg->buffer = NULL;
@@ -102,6 +101,7 @@ static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
pg->sapi_name_ptr = NULL;
pg->socket_fd = -1;
pg->socket_server_fd = -1;
+ pg->unclean_eval = 0;
pg->req_id = 0;
pg->err_buf.active = 0;
@@ -111,6 +111,8 @@ static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
pg->sigsafe_mem.mem = NULL;
pg->sigsegv_bailout = NULL;
+ pg->oplog_list = NULL;
+
#ifdef PHP_WIN32
pg->sigio_watcher_thread = INVALID_HANDLE_VALUE;
memset(&pg->swd, 0, sizeof(struct win32_sigio_watcher_data));
@@ -124,13 +126,7 @@ static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */
ZEND_INIT_MODULE_GLOBALS(phpdbg, php_phpdbg_globals_ctor, NULL);
REGISTER_INI_ENTRIES();
-#if PHP_VERSION_ID >= 50500
- zend_execute_old = zend_execute_ex;
zend_execute_ex = phpdbg_execute_ex;
-#else
- zend_execute_old = zend_execute;
- zend_execute = phpdbg_execute_ex;
-#endif
REGISTER_STRINGL_CONSTANT("PHPDBG_VERSION", PHPDBG_VERSION, sizeof(PHPDBG_VERSION)-1, CONST_CS|CONST_PERSISTENT);
@@ -149,43 +145,47 @@ static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */
static void php_phpdbg_destroy_bp_file(zval *brake) /* {{{ */
{
zend_hash_destroy(Z_ARRVAL_P(brake));
+ efree(Z_ARRVAL_P(brake));
} /* }}} */
static void php_phpdbg_destroy_bp_symbol(zval *brake) /* {{{ */
{
efree((char *) ((phpdbg_breaksymbol_t *) Z_PTR_P(brake))->symbol);
+ efree(Z_PTR_P(brake));
} /* }}} */
static void php_phpdbg_destroy_bp_opcode(zval *brake) /* {{{ */
{
efree((char *) ((phpdbg_breakop_t *) Z_PTR_P(brake))->name);
+ efree(Z_PTR_P(brake));
} /* }}} */
+static void php_phpdbg_destroy_bp_opline(zval *brake) /* {{{ */
+{
+ efree(Z_PTR_P(brake));
+} /* }}} */
static void php_phpdbg_destroy_bp_methods(zval *brake) /* {{{ */
{
zend_hash_destroy(Z_ARRVAL_P(brake));
+ efree(Z_ARRVAL_P(brake));
} /* }}} */
static void php_phpdbg_destroy_bp_condition(zval *data) /* {{{ */
{
phpdbg_breakcond_t *brake = (phpdbg_breakcond_t *) Z_PTR_P(data);
- if (brake) {
- if (brake->ops) {
-
- destroy_op_array(brake->ops);
- efree(brake->ops);
- }
- efree((char*) brake->code);
+ if (brake->ops) {
+ destroy_op_array(brake->ops);
+ efree(brake->ops);
}
+ efree((char*) brake->code);
+ efree(brake);
} /* }}} */
static void php_phpdbg_destroy_registered(zval *data) /* {{{ */
{
zend_function *function = (zend_function *) Z_PTR_P(data);
-
-
destroy_zend_function(function);
} /* }}} */
@@ -198,7 +198,7 @@ static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_FUNCTION_OPLINE], 8, NULL, php_phpdbg_destroy_bp_methods, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD_OPLINE], 8, NULL, php_phpdbg_destroy_bp_methods, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLINE], 8, NULL, php_phpdbg_destroy_bp_methods, 0);
- zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], 8, NULL, NULL, 0);
+ zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], 8, NULL, php_phpdbg_destroy_bp_opline, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], 8, NULL, php_phpdbg_destroy_bp_opcode, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], 8, NULL, php_phpdbg_destroy_bp_methods, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], 8, NULL, php_phpdbg_destroy_bp_condition, 0);
@@ -213,6 +213,7 @@ static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */
static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
{
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE]);
+ zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_PENDING]);
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM]);
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_FUNCTION_OPLINE]);
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD_OPLINE]);
@@ -222,14 +223,14 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD]);
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]);
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP]);
- zend_hash_destroy(&PHPDBG_G(seek));
zend_hash_destroy(&PHPDBG_G(file_sources));
+ zend_hash_destroy(&PHPDBG_G(seek));
zend_hash_destroy(&PHPDBG_G(registered));
zend_hash_destroy(&PHPDBG_G(watchpoints));
zend_llist_destroy(&PHPDBG_G(watchlist_mem));
if (PHPDBG_G(buffer)) {
- efree(PHPDBG_G(buffer));
+ free(PHPDBG_G(buffer));
PHPDBG_G(buffer) = NULL;
}
@@ -238,16 +239,6 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
PHPDBG_G(exec) = NULL;
}
- if (PHPDBG_G(prompt)[0]) {
- free(PHPDBG_G(prompt)[0]);
- }
- if (PHPDBG_G(prompt)[1]) {
- free(PHPDBG_G(prompt)[1]);
- }
-
- PHPDBG_G(prompt)[0] = NULL;
- PHPDBG_G(prompt)[1] = NULL;
-
if (PHPDBG_G(oplog)) {
fclose(PHPDBG_G(oplog));
PHPDBG_G(oplog) = NULL;
@@ -306,11 +297,11 @@ static PHP_FUNCTION(phpdbg_exec)
ZVAL_TRUE(return_value);
}
} else {
- zend_error(E_WARNING, "Failed to set execution context (%s), not a regular file or symlink", exec);
+ zend_error(E_WARNING, "Failed to set execution context (%s), not a regular file or symlink", ZSTR_VAL(exec));
ZVAL_FALSE(return_value);
}
} else {
- zend_error(E_WARNING, "Failed to set execution context (%s) the file does not exist", exec);
+ zend_error(E_WARNING, "Failed to set execution context (%s) the file does not exist", ZSTR_VAL(exec));
ZVAL_FALSE(return_value);
}
@@ -321,19 +312,25 @@ static PHP_FUNCTION(phpdbg_exec)
instructs phpdbg to insert a breakpoint at the next opcode */
static PHP_FUNCTION(phpdbg_break_next)
{
- if (zend_parse_parameters_none() == FAILURE && EG(current_execute_data)) {
+ zend_execute_data *ex = EG(current_execute_data);
+
+ while (ex && ex->func && !ZEND_USER_CODE(ex->func->type)) {
+ ex = ex->prev_execute_data;
+ }
+
+ if (zend_parse_parameters_none() == FAILURE || !ex) {
return;
}
- phpdbg_set_breakpoint_opline_ex((phpdbg_opline_ptr_t) EG(current_execute_data)->opline + 1);
+ phpdbg_set_breakpoint_opline_ex((phpdbg_opline_ptr_t) ex->opline + 1);
} /* }}} */
/* {{{ proto void phpdbg_break_file(string file, integer line) */
static PHP_FUNCTION(phpdbg_break_file)
{
- char *file = NULL;
- size_t flen = 0;
- long line;
+ char *file;
+ size_t flen;
+ zend_long line;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &file, &flen, &line) == FAILURE) {
return;
@@ -386,9 +383,9 @@ static PHP_FUNCTION(phpdbg_clear)
/* {{{ proto void phpdbg_color(integer element, string color) */
static PHP_FUNCTION(phpdbg_color)
{
- long element = 0L;
- char *color = NULL;
- size_t color_len = 0;
+ zend_long element;
+ char *color;
+ size_t color_len;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &element, &color, &color_len) == FAILURE) {
return;
@@ -441,13 +438,160 @@ static PHP_FUNCTION(phpdbg_start_oplog)
PHPDBG_G(oplog_list)->start = PHPDBG_G(oplog_cur);
}
+static void phpdbg_oplog_fill_executable(zend_op_array *op_array, HashTable *insert_ht, zend_bool by_opcode) {
+ /* ignore RECV_* opcodes */
+ zend_op *cur = op_array->opcodes + op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC);
+ zend_op *end = op_array->opcodes + op_array->last;
+
+ zend_long insert_idx;
+ zval zero;
+ ZVAL_LONG(&zero, 0);
+
+ /* ignore autogenerated return (well, not too precise with finally branches, but that's okay) */
+ if (op_array->last >= 1 && (((end - 1)->opcode == ZEND_RETURN || (end - 1)->opcode == ZEND_RETURN_BY_REF || (end - 1)->opcode == ZEND_GENERATOR_RETURN)
+ && ((op_array->last > 1 && ((end - 2)->opcode == ZEND_RETURN || (end - 2)->opcode == ZEND_RETURN_BY_REF || (end - 2)->opcode == ZEND_GENERATOR_RETURN || (end - 2)->opcode == ZEND_THROW))
+ || op_array->function_name == NULL || (end - 1)->extended_value == -1))) {
+ end--;
+ }
+
+ for (; cur < end; cur++) {
+ if (cur->opcode == ZEND_NOP || cur->opcode == ZEND_OP_DATA || cur->opcode == ZEND_FE_FREE || cur->opcode == ZEND_FREE || cur->opcode == ZEND_ASSERT_CHECK || cur->opcode == ZEND_VERIFY_RETURN_TYPE
+ || cur->opcode == ZEND_DECLARE_CONST || cur->opcode == ZEND_DECLARE_CLASS || cur->opcode == ZEND_DECLARE_INHERITED_CLASS || cur->opcode == ZEND_DECLARE_FUNCTION
+ || cur->opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED || cur->opcode == ZEND_VERIFY_ABSTRACT_CLASS || cur->opcode == ZEND_ADD_TRAIT || cur->opcode == ZEND_BIND_TRAITS
+ || cur->opcode == ZEND_DECLARE_ANON_CLASS || cur->opcode == ZEND_DECLARE_ANON_INHERITED_CLASS || cur->opcode == ZEND_FAST_RET || cur->opcode == ZEND_TICKS
+ || cur->opcode == ZEND_EXT_STMT || cur->opcode == ZEND_EXT_FCALL_BEGIN || cur->opcode == ZEND_EXT_FCALL_END || cur->opcode == ZEND_EXT_NOP || cur->opcode == ZEND_BIND_GLOBAL) {
+ continue;
+ }
+
+ if (by_opcode) {
+ insert_idx = cur - op_array->opcodes;
+ } else {
+ insert_idx = cur->lineno;
+ }
+
+ if (cur->opcode == ZEND_NEW && (cur + 1)->opcode == ZEND_DO_FCALL) {
+ cur++;
+ }
+
+ zend_hash_index_update(insert_ht, insert_idx, &zero);
+ }
+}
+
+static inline HashTable* phpdbg_add_empty_array(HashTable *ht, zend_string *name) {
+ zval *ht_zv = zend_hash_find(ht, name);
+ if (!ht_zv) {
+ zval zv;
+ array_init(&zv);
+ ht_zv = zend_hash_add_new(ht, name, &zv);
+ }
+ return Z_ARR_P(ht_zv);
+}
+
+/* {{{ proto void phpdbg_end_oplog() */
+static PHP_FUNCTION(phpdbg_get_executable)
+{
+ HashTable *options = NULL;
+ zval *option_buffer;
+ zend_bool by_function = 0;
+ zend_bool by_opcode = 0;
+ HashTable *insert_ht;
+
+ zend_function *func;
+ zend_class_entry *ce;
+ zend_string *name;
+ HashTable *files = &PHPDBG_G(file_sources);
+ HashTable files_tmp;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|H", &options) == FAILURE) {
+ return;
+ }
+
+ if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("functions")))) {
+ by_function = zend_is_true(option_buffer);
+ }
+
+ if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("opcodes")))) {
+ if (by_function) {
+ by_opcode = zend_is_true(option_buffer);
+ }
+ }
+
+ if (options && (option_buffer = zend_hash_str_find(options, ZEND_STRL("files")))) {
+ ZVAL_DEREF(option_buffer);
+ if (Z_TYPE_P(option_buffer) == IS_ARRAY && zend_hash_num_elements(Z_ARR_P(option_buffer)) > 0) {
+ zval *filename;
+
+ files = &files_tmp;
+ zend_hash_init(files, 0, NULL, NULL, 0);
+
+ ZEND_HASH_FOREACH_VAL(Z_ARR_P(option_buffer), filename) {
+ zend_hash_add_empty_element(files, zval_get_string(filename));
+ } ZEND_HASH_FOREACH_END();
+ } else {
+ GC_REFCOUNT(files)++;
+ }
+ } else {
+ GC_REFCOUNT(files)++;
+ }
+
+ array_init(return_value);
+
+ ZEND_HASH_FOREACH_STR_KEY_PTR(EG(function_table), name, func) {
+ if (func->type == ZEND_USER_FUNCTION) {
+ if (zend_hash_exists(files, func->op_array.filename)) {
+ insert_ht = phpdbg_add_empty_array(Z_ARR_P(return_value), func->op_array.filename);
+
+ if (by_function) {
+ insert_ht = phpdbg_add_empty_array(insert_ht, name);
+ }
+
+ phpdbg_oplog_fill_executable(&func->op_array, insert_ht, by_opcode);
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+
+ ZEND_HASH_FOREACH_STR_KEY_PTR(EG(class_table), name, ce) {
+ if (ce->type == ZEND_USER_CLASS) {
+ if (zend_hash_exists(files, ce->info.user.filename)) {
+ ZEND_HASH_FOREACH_PTR(&ce->function_table, func) {
+ if (func->type == ZEND_USER_FUNCTION && zend_hash_exists(files, func->op_array.filename)) {
+ insert_ht = phpdbg_add_empty_array(Z_ARR_P(return_value), func->op_array.filename);
+
+ if (by_function) {
+ zend_string *fn_name = strpprintf(ZSTR_LEN(name) + ZSTR_LEN(func->op_array.function_name) + 2, "%.*s::%.*s", (int) ZSTR_LEN(name), ZSTR_VAL(name), (int) ZSTR_LEN(func->op_array.function_name), ZSTR_VAL(func->op_array.function_name));
+ insert_ht = phpdbg_add_empty_array(insert_ht, fn_name);
+ zend_string_release(fn_name);
+ }
+
+ phpdbg_oplog_fill_executable(&func->op_array, insert_ht, by_opcode);
+ }
+ } ZEND_HASH_FOREACH_END();
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+
+ ZEND_HASH_FOREACH_STR_KEY(files, name) {
+ phpdbg_file_source *source = zend_hash_find_ptr(&PHPDBG_G(file_sources), name);
+ if (source) {
+ phpdbg_oplog_fill_executable(
+ &source->op_array,
+ phpdbg_add_empty_array(Z_ARR_P(return_value), source->op_array.filename),
+ by_opcode);
+ }
+ } ZEND_HASH_FOREACH_END();
+
+ if (!--GC_REFCOUNT(files)) {
+ zend_hash_destroy(files);
+ }
+}
+
/* {{{ proto void phpdbg_end_oplog() */
static PHP_FUNCTION(phpdbg_end_oplog)
{
- phpdbg_oplog_entry *cur = PHPDBG_G(oplog_list)->start;
- phpdbg_oplog_list *prev = PHPDBG_G(oplog_list)->prev;
+ phpdbg_oplog_entry *cur;
+ phpdbg_oplog_list *prev;
- HashTable *options;
+ HashTable *options = NULL;
zval *option_buffer;
zend_bool by_function = 0;
zend_bool by_opcode = 0;
@@ -461,6 +605,9 @@ static PHP_FUNCTION(phpdbg_end_oplog)
return;
}
+ cur = PHPDBG_G(oplog_list)->start;
+ prev = PHPDBG_G(oplog_list)->prev;
+
efree(PHPDBG_G(oplog_list));
PHPDBG_G(oplog_list) = prev;
@@ -478,49 +625,44 @@ static PHP_FUNCTION(phpdbg_end_oplog)
{
zend_string *last_file = NULL;
- zval *file_buf;
+ HashTable *file_ht;
zend_string *last_function = (void *)~(uintptr_t)0;
zend_class_entry *last_scope = NULL;
- zval *fn_buf;
HashTable *insert_ht;
zend_long insert_idx;
do {
- zend_op_array *op_array = cur->op_array;
- if (op_array->filename != last_file) {
- last_file = op_array->filename;
- file_buf = zend_hash_find(Z_ARR_P(return_value), last_file);
- if (!file_buf) {
- zval ht;
- array_init(&ht);
- file_buf = zend_hash_add_new(Z_ARR_P(return_value), last_file, &ht);
- }
+ zval zero;
+ ZVAL_LONG(&zero, 0);
+
+ if (cur->filename != last_file) {
+ last_file = cur->filename;
+ file_ht = insert_ht = phpdbg_add_empty_array(Z_ARR_P(return_value), last_file);
}
- insert_ht = Z_ARR_P(file_buf);
if (by_function) {
- if (op_array->function_name != last_function || op_array->scope != last_scope) {
+ if (cur->function_name == NULL) {
+ if (last_function != NULL) {
+ insert_ht = file_ht;
+ }
+ last_function = NULL;
+ } else if (cur->function_name != last_function || cur->scope != last_scope) {
zend_string *fn_name;
- last_function = op_array->function_name;
- last_scope = op_array->scope;
+ last_function = cur->function_name;
+ last_scope = cur->scope;
if (last_scope == NULL) {
fn_name = zend_string_copy(last_function);
} else {
- fn_name = strpprintf(ZSTR_LEN(last_function) + ZSTR_LEN(last_scope->name) + 2, "%.*s::%.*s", ZSTR_LEN(last_function), ZSTR_VAL(last_function), ZSTR_LEN(last_scope->name), ZSTR_VAL(last_scope->name));
- }
- fn_buf = zend_hash_find(Z_ARR_P(return_value), fn_name);
- if (!fn_buf) {
- zval ht;
- array_init(&ht);
- fn_buf = zend_hash_add_new(Z_ARR_P(return_value), fn_name, &ht);
+ fn_name = strpprintf(ZSTR_LEN(last_function) + ZSTR_LEN(last_scope->name) + 2, "%.*s::%.*s", (int) ZSTR_LEN(last_scope->name), ZSTR_VAL(last_scope->name), (int) ZSTR_LEN(last_function), ZSTR_VAL(last_function));
}
+ insert_ht = phpdbg_add_empty_array(Z_ARR_P(return_value), fn_name);
+ zend_string_release(fn_name);
}
- insert_ht = Z_ARR_P(fn_buf);
}
if (by_opcode) {
- insert_idx = cur->op - op_array->opcodes;
+ insert_idx = cur->op - cur->opcodes;
} else {
insert_idx = cur->op->lineno;
}
@@ -528,9 +670,7 @@ static PHP_FUNCTION(phpdbg_end_oplog)
{
zval *num = zend_hash_index_find(insert_ht, insert_idx);
if (!num) {
- zval zv;
- ZVAL_LONG(&zv, 0);
- num = zend_hash_index_add_new(insert_ht, insert_idx, &zv);
+ num = zend_hash_index_add_new(insert_ht, insert_idx, &zero);
}
Z_LVAL_P(num)++;
}
@@ -581,6 +721,11 @@ ZEND_BEGIN_ARG_INFO_EX(phpdbg_start_oplog_arginfo, 0, 0, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(phpdbg_end_oplog_arginfo, 0, 0, 0)
+ ZEND_ARG_INFO(0, options)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(phpdbg_get_executable_arginfo, 0, 0, 0)
+ ZEND_ARG_INFO(0, options)
ZEND_END_ARG_INFO()
zend_function_entry phpdbg_user_functions[] = {
@@ -594,6 +739,7 @@ zend_function_entry phpdbg_user_functions[] = {
PHP_FE(phpdbg_prompt, phpdbg_prompt_arginfo)
PHP_FE(phpdbg_start_oplog, phpdbg_start_oplog_arginfo)
PHP_FE(phpdbg_end_oplog, phpdbg_end_oplog_arginfo)
+ PHP_FE(phpdbg_get_executable, phpdbg_get_executable_arginfo)
#ifdef PHP_FE_END
PHP_FE_END
#else
@@ -652,7 +798,7 @@ static void php_sapi_phpdbg_send_header(sapi_header_struct *sapi_header, void *s
static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
{
/*
- * We must not request TSRM before being boot
+ * We must not request TSRM before being booted
*/
if (phpdbg_booted) {
if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) {
@@ -662,6 +808,10 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
phpdbg_error("php", "msg=\"%s\"", "%s", message);
+ if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) {
+ return;
+ }
+
switch (PG(last_error_type)) {
case E_ERROR:
case E_CORE_ERROR:
@@ -672,7 +822,7 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
const char *file_char = zend_get_executed_filename();
zend_string *file = zend_string_init(file_char, strlen(file_char), 0);
phpdbg_list_file(file, 3, zend_get_executed_lineno() - 1, zend_get_executed_lineno());
- efree(file);
+ zend_string_release(file);
if (!phpdbg_fully_started) {
return;
@@ -697,23 +847,8 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
static int php_sapi_phpdbg_deactivate(void) /* {{{ */
{
- if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) == PHPDBG_IS_CLEANING) {
- zend_phpdbg_globals *pg = PHPDBG_G(backup) = calloc(1, sizeof(zend_phpdbg_globals));
-
- php_phpdbg_globals_ctor(pg);
-
- pg->exec = zend_strndup(PHPDBG_G(exec), PHPDBG_G(exec_len));
- pg->exec_len = PHPDBG_G(exec_len);
- pg->oplog = PHPDBG_G(oplog);
- pg->prompt[0] = PHPDBG_G(prompt)[0];
- pg->prompt[1] = PHPDBG_G(prompt)[1];
- memcpy(pg->colors, PHPDBG_G(colors), sizeof(pg->colors));
- pg->eol = PHPDBG_G(eol);
- pg->flags = PHPDBG_G(flags) & PHPDBG_PRESERVE_FLAGS_MASK;
- }
-
fflush(stdout);
- if(SG(request_info).argv0) {
+ if (SG(request_info).argv0) {
free(SG(request_info).argv0);
SG(request_info).argv0 = NULL;
}
@@ -761,7 +896,7 @@ static inline size_t php_sapi_phpdbg_ub_write(const char *message, size_t length
if (PHPDBG_G(socket_fd) != -1 && !(PHPDBG_G(flags) & PHPDBG_IS_INTERACTIVE)) {
send(PHPDBG_G(socket_fd), message, length, 0);
}
- return phpdbg_script(P_STDOUT, "%.*s", length, message);
+ return phpdbg_script(P_STDOUT, "%.*s", (int) length, message);
} /* }}} */
/* beginning of struct, see main/streams/plain_wrapper.c line 111 */
@@ -785,7 +920,7 @@ static size_t phpdbg_stdiop_write(php_stream *stream, const char *buf, size_t co
return count;
}
if (stat[2].st_dev == stat[1].st_dev && stat[2].st_ino == stat[1].st_ino) {
- phpdbg_script(P_STDERR, "%.*s", (int) count, buf);
+ phpdbg_script_ex(PHPDBG_G(io)[PHPDBG_STDERR].fd, P_STDERR, "%.*s", (int) count, buf);
return count;
}
break;
@@ -794,14 +929,8 @@ static size_t phpdbg_stdiop_write(php_stream *stream, const char *buf, size_t co
return PHPDBG_G(php_stdiop_write)(stream, buf, count);
}
-#if PHP_VERSION_ID >= 50700
-static inline void php_sapi_phpdbg_flush(void *context) /* {{{ */
-{
-#else
static inline void php_sapi_phpdbg_flush(void *context) /* {{{ */
{
-#endif
-
if (!phpdbg_active_sigsafe_mem()) {
fflush(PHPDBG_G(io)[PHPDBG_STDOUT].ptr);
}
@@ -903,6 +1032,7 @@ const opt_struct OPTIONS[] = { /* {{{ */
{'I', 0, "ignore init"},
{'O', 1, "opline log"},
{'r', 0, "run"},
+ {'e', 0, "generate ext_stmt opcodes"},
{'E', 0, "step-through-eval"},
{'S', 1, "sapi-name"},
#ifndef _WIN32
@@ -930,7 +1060,6 @@ const char phpdbg_ini_hardcoded[] =
/* overwriteable ini defaults must be set in phpdbg_ini_defaults() */
#define INI_DEFAULT(name, value) \
ZVAL_STRINGL(&tmp, value, sizeof(value) - 1); \
- Z_SET_REFCOUNT(tmp, 0); \
zend_hash_str_update(configuration_hash, name, sizeof(name) - 1, &tmp);
void phpdbg_ini_defaults(HashTable *configuration_hash) /* {{{ */
@@ -976,17 +1105,21 @@ static inline void phpdbg_sigint_handler(int signo) /* {{{ */
}
} else {
/* set signalled only when not interactive */
- if (!(PHPDBG_G(flags) & PHPDBG_IS_INTERACTIVE)) {
- if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) {
- char mem[PHPDBG_SIGSAFE_MEM_SIZE + 1];
-
- phpdbg_set_sigsafe_mem(mem);
- zend_try {
- phpdbg_force_interruption();
- } zend_end_try()
- phpdbg_clear_sigsafe_mem();
- return;
+ if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) {
+ char mem[PHPDBG_SIGSAFE_MEM_SIZE + 1];
+
+ phpdbg_set_sigsafe_mem(mem);
+ zend_try {
+ phpdbg_force_interruption();
+ } zend_end_try()
+ phpdbg_clear_sigsafe_mem();
+
+ PHPDBG_G(flags) &= ~PHPDBG_IS_SIGNALED;
+
+ if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) {
+ zend_bailout();
}
+ } else {
PHPDBG_G(flags) |= PHPDBG_IS_SIGNALED;
}
}
@@ -1073,9 +1206,13 @@ void phpdbg_sigio_handler(int sig, siginfo_t *info, void *context) /* {{{ */
phpdbg_force_interruption();
} zend_end_try();
phpdbg_clear_sigsafe_mem();
- break;
- }
- if (!(PHPDBG_G(flags) & PHPDBG_IS_INTERACTIVE)) {
+
+ PHPDBG_G(flags) &= ~PHPDBG_IS_SIGNALED;
+
+ if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) {
+ zend_bailout();
+ }
+ } else if (!(PHPDBG_G(flags) & PHPDBG_IS_INTERACTIVE)) {
PHPDBG_G(flags) |= PHPDBG_IS_SIGNALED;
}
break;
@@ -1116,37 +1253,32 @@ void phpdbg_signal_handler(int sig, siginfo_t *info, void *context) /* {{{ */
} /* }}} */
#endif
-static inline zend_mm_heap *phpdbg_mm_get_heap() /* {{{ */
+void phpdbg_sighup_handler(int sig) /* {{{ */
{
- zend_mm_heap *mm_heap;
-
-
- mm_heap = zend_mm_set_heap(NULL);
- zend_mm_set_heap(mm_heap);
-
- return mm_heap;
+ exit(0);
} /* }}} */
-void *phpdbg_malloc_wrapper(size_t size) /* {{{ */
+void *phpdbg_malloc_wrapper(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) /* {{{ */
{
- return zend_mm_alloc(phpdbg_mm_get_heap(), size);
+ return _zend_mm_alloc(zend_mm_get_heap(), size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
} /* }}} */
-void phpdbg_free_wrapper(void *p) /* {{{ */
+void phpdbg_free_wrapper(void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) /* {{{ */
{
- zend_mm_heap *heap = phpdbg_mm_get_heap();
+ zend_mm_heap *heap = zend_mm_get_heap();
if (UNEXPECTED(heap == p)) {
/* TODO: heap maybe allocated by mmap(zend_mm_init) or malloc(USE_ZEND_ALLOC=0)
* let's prevent it from segfault for now
*/
} else {
- zend_mm_free(heap, p);
+ phpdbg_watch_efree(p);
+ return _zend_mm_free(heap, p ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
} /* }}} */
-void *phpdbg_realloc_wrapper(void *ptr, size_t size) /* {{{ */
+void *phpdbg_realloc_wrapper(void *ptr, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) /* {{{ */
{
- return zend_mm_realloc(phpdbg_mm_get_heap(), ptr, size);
+ return _zend_mm_realloc(zend_mm_get_heap(), ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
} /* }}} */
int main(int argc, char **argv) /* {{{ */
@@ -1165,11 +1297,11 @@ int main(int argc, char **argv) /* {{{ */
zend_bool init_file_default;
char *oplog_file;
size_t oplog_file_len;
- zend_ulong flags;
+ uint64_t flags;
char *php_optarg;
int php_optind, opt, show_banner = 1;
long cleaning = -1;
- zend_bool quit_immediately = 0;
+ volatile zend_bool quit_immediately = 0; /* somehow some gcc release builds will play a bit around with order in combination with setjmp..., hence volatile */
zend_bool remote = 0;
zend_phpdbg_globals *settings = NULL;
char *bp_tmp = NULL;
@@ -1179,19 +1311,20 @@ int main(int argc, char **argv) /* {{{ */
int socket = -1;
FILE* stream = NULL;
char *print_opline_func;
-
-#ifdef ZTS
- void ***tsrm_ls;
-#endif
+ zend_bool ext_stmt = 0;
+ zend_bool use_mm_wrappers = 0;
+ zend_bool is_exit;
+ int exit_status;
#ifndef _WIN32
struct sigaction sigio_struct;
struct sigaction signal_struct;
signal_struct.sa_sigaction = phpdbg_signal_handler;
signal_struct.sa_flags = SA_SIGINFO | SA_NODEFER;
+ sigemptyset(&signal_struct.sa_mask);
sigio_struct.sa_sigaction = phpdbg_sigio_handler;
sigio_struct.sa_flags = SA_SIGINFO;
-
+ sigemptyset(&sigio_struct.sa_mask);
address = strdup("127.0.0.1");
#endif
@@ -1205,8 +1338,12 @@ int main(int argc, char **argv) /* {{{ */
#ifdef ZTS
tsrm_startup(1, 1, 0, NULL);
+ (void)ts_resource(0);
+ ZEND_TSRMLS_CACHE_UPDATE();
+#endif
- tsrm_ls = ts_resource(0);
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
#endif
phpdbg_main:
@@ -1222,10 +1359,12 @@ phpdbg_main:
oplog_file = NULL;
oplog_file_len = 0;
flags = PHPDBG_DEFAULT_FLAGS;
+ is_exit = 0;
php_optarg = NULL;
php_optind = 1;
opt = 0;
sapi_name = NULL;
+ exit_status = 0;
if (settings) {
exec = settings->exec;
}
@@ -1319,6 +1458,10 @@ phpdbg_main:
flags &= ~PHPDBG_IS_QUIET;
break;
+ case 'e':
+ ext_stmt = 1;
+ break;
+
case 'E': /* stepping through eval on */
flags |= PHPDBG_IS_STEPONEVAL;
break;
@@ -1362,6 +1505,10 @@ phpdbg_main:
sapi_startup(phpdbg);
phpdbg->startup(phpdbg);
PHPDBG_G(flags) = 0;
+ /* It ain't gonna proceed to real execution anyway,
+ but the correct descriptor is needed already. */
+ PHPDBG_G(io)[PHPDBG_STDOUT].ptr = stdout;
+ PHPDBG_G(io)[PHPDBG_STDOUT].fd = fileno(stdout);
phpdbg_set_prompt(PHPDBG_DEFAULT_PROMPT);
phpdbg_do_help(NULL);
sapi_deactivate();
@@ -1373,7 +1520,7 @@ phpdbg_main:
sapi_startup(phpdbg);
phpdbg->startup(phpdbg);
printf(
- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2015 The PHP Group\n%s",
+ "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
PHPDBG_VERSION,
__DATE__,
__TIME__,
@@ -1390,11 +1537,8 @@ phpdbg_main:
}
/* set exec if present on command line */
- if (!exec && (argc > php_optind) && (strcmp(argv[php_optind-1], "--") != SUCCESS)) {
- if (strlen(argv[php_optind])) {
- if (exec) {
- free(exec);
- }
+ if (argc > php_optind && (strcmp(argv[php_optind-1], "--") != SUCCESS)) {
+ if (!exec && strlen(argv[php_optind])) {
exec = strdup(argv[php_optind]);
}
php_optind++;
@@ -1450,11 +1594,11 @@ phpdbg_main:
phpdbg->ini_entries = ini_entries;
if (phpdbg->startup(phpdbg) == SUCCESS) {
+ zend_mm_heap *mm_heap;
#ifdef _WIN32
EXCEPTION_POINTERS *xp;
__try {
#endif
- zend_mm_heap *mm_heap;
void* (*_malloc)(size_t);
void (*_free)(void*);
void* (*_realloc)(void*, size_t);
@@ -1464,16 +1608,17 @@ phpdbg_main:
if (settings > (zend_phpdbg_globals *) 0x2) {
#ifdef ZTS
- *((zend_phpdbg_globals *) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
+ *((zend_phpdbg_globals *) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
#else
phpdbg_globals = *settings;
#endif
+ free(settings);
}
/* setup remote server if necessary */
if (cleaning <= 0 && listen > 0) {
server = phpdbg_open_socket(address, listen);
- if (-1 > server || phpdbg_remote_init(address, listen, server, &socket, &stream) == FAILURE) {
+ if (-1 > server || phpdbg_remote_init(address, listen, server, &socket, &stream) == FAILURE) {
exit(0);
}
@@ -1483,29 +1628,32 @@ phpdbg_main:
/* set remote flag to stop service shutting down upon quit */
remote = 1;
+#ifndef _WIN32
+ } else {
+
+ signal(SIGHUP, phpdbg_sighup_handler);
+#endif
}
- mm_heap = phpdbg_mm_get_heap();
+ mm_heap = zend_mm_get_heap();
zend_mm_get_custom_handlers(mm_heap, &_malloc, &_free, &_realloc);
- if (!_malloc) {
- _malloc = phpdbg_malloc_wrapper;
- }
- if (!_realloc) {
- _realloc = phpdbg_realloc_wrapper;
- }
- if (!_free) {
- _free = phpdbg_free_wrapper;
- }
-
- zend_activate();
+ use_mm_wrappers = !_malloc && !_realloc && !_free;
phpdbg_init_list();
PHPDBG_G(original_free_function) = _free;
_free = phpdbg_watch_efree;
- zend_mm_set_custom_handlers(mm_heap, _malloc, _free, _realloc);
+ if (use_mm_wrappers) {
+#if ZEND_DEBUG
+ zend_mm_set_custom_debug_handlers(mm_heap, phpdbg_malloc_wrapper, phpdbg_free_wrapper, phpdbg_realloc_wrapper);
+#else
+ zend_mm_set_custom_handlers(mm_heap, phpdbg_malloc_wrapper, phpdbg_free_wrapper, phpdbg_realloc_wrapper);
+#endif
+ } else {
+ zend_mm_set_custom_handlers(mm_heap, _malloc, _free, _realloc);
+ }
phpdbg_setup_watchpoints();
@@ -1525,12 +1673,25 @@ phpdbg_main:
PHPDBG_G(sapi_name_ptr) = sapi_name;
+ if (exec) { /* set execution context */
+ PHPDBG_G(exec) = phpdbg_resolve_path(exec);
+ PHPDBG_G(exec_len) = PHPDBG_G(exec) ? strlen(PHPDBG_G(exec)) : 0;
+
+ free(exec);
+ exec = NULL;
+ }
+
php_output_activate();
php_output_deactivate();
+ if (SG(sapi_headers).mimetype) {
+ efree(SG(sapi_headers).mimetype);
+ SG(sapi_headers).mimetype = NULL;
+ }
+
php_output_activate();
- if (php_request_startup() == SUCCESS) {
+ {
int i;
SG(request_info).argc = argc - php_optind + 1;
@@ -1538,9 +1699,12 @@ phpdbg_main:
for (i = SG(request_info).argc; --i;) {
SG(request_info).argv[i] = estrdup(argv[php_optind - 1 + i]);
}
- SG(request_info).argv[i] = exec ? estrdup(exec) : estrdup("");
+ SG(request_info).argv[0] = PHPDBG_G(exec) ? estrdup(PHPDBG_G(exec)) : estrdup("");
+ }
- php_hash_environment();
+ if (php_request_startup() == FAILURE) {
+ PUTS("Could not startup");
+ return 1;
}
/* do not install sigint handlers for remote consoles */
@@ -1555,20 +1719,13 @@ phpdbg_main:
#endif
#ifndef _WIN32
}
-#endif
-
- PG(modules_activated) = 0;
-#ifndef _WIN32
/* setup io here */
if (remote) {
PHPDBG_G(flags) |= PHPDBG_IS_REMOTE;
signal(SIGPIPE, SIG_IGN);
}
-#endif
-
-#ifndef _WIN32
PHPDBG_G(io)[PHPDBG_STDIN].ptr = stdin;
PHPDBG_G(io)[PHPDBG_STDIN].fd = fileno(stdin);
PHPDBG_G(io)[PHPDBG_STDOUT].ptr = stdout;
@@ -1599,20 +1756,13 @@ phpdbg_main:
php_stream_stdio_ops.write = phpdbg_stdiop_write;
#endif
- if (exec) { /* set execution context */
- PHPDBG_G(exec) = phpdbg_resolve_path(exec);
- PHPDBG_G(exec_len) = PHPDBG_G(exec) ? strlen(PHPDBG_G(exec)) : 0;
-
- free(exec);
- exec = NULL;
- }
-
if (oplog_file) { /* open oplog */
PHPDBG_G(oplog) = fopen(oplog_file, "w+");
if (!PHPDBG_G(oplog)) {
phpdbg_error("oplog", "path=\"%s\"", "Failed to open oplog %s", oplog_file);
}
free(oplog_file);
+ oplog_file = NULL;
}
/* set default colors */
@@ -1626,6 +1776,8 @@ phpdbg_main:
/* Make stdin, stdout and stderr accessible from PHP scripts */
phpdbg_register_file_handles();
+ phpdbg_list_update();
+
if (show_banner && cleaning < 2) {
/* print blurb */
phpdbg_welcome(cleaning == 1);
@@ -1633,6 +1785,10 @@ phpdbg_main:
cleaning = -1;
+ if (ext_stmt) {
+ CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
+ }
+
/* initialize from file */
PHPDBG_G(flags) |= PHPDBG_IS_INITIALIZING;
zend_try {
@@ -1654,7 +1810,7 @@ phpdbg_main:
/* auto compile */
if (PHPDBG_G(exec)) {
- if (settings) {
+ if (settings || phpdbg_startup_run > 0) {
PHPDBG_G(flags) |= PHPDBG_DISCARD_OUTPUT;
}
@@ -1669,32 +1825,42 @@ phpdbg_main:
if (PHPDBG_G(ops)) {
phpdbg_print_opcodes(print_opline_func);
} else {
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("No opcodes could be compiled | No file specified or compilation failed?\n"));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("No opcodes could be compiled | No file specified or compilation failed?\n"));
}
goto phpdbg_out;
}
+ PG(during_request_startup) = 0;
+
phpdbg_fully_started = 1;
/* #ifndef for making compiler shutting up */
#ifndef _WIN32
phpdbg_interact:
#endif
-
/* phpdbg main() */
do {
zend_try {
if (phpdbg_startup_run) {
quit_immediately = phpdbg_startup_run > 1;
phpdbg_startup_run = 0;
- PHPDBG_COMMAND_HANDLER(run)(NULL);
+ if (quit_immediately) {
+ PHPDBG_G(flags) = (PHPDBG_G(flags) & ~PHPDBG_HAS_PAGINATION) | PHPDBG_IS_INTERACTIVE | PHPDBG_PREVENT_INTERACTIVE;
+ } else {
+ PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE;
+ }
+ zend_try {
+ PHPDBG_COMMAND_HANDLER(run)(NULL);
+ } zend_end_try();
if (quit_immediately) {
/* if -r is on the command line more than once just quit */
EG(bailout) = __orig_bailout; /* reset zend_try */
+ exit_status = EG(exit_status);
break;
}
}
+ CG(unclean_shutdown) = 0;
phpdbg_interactive(1);
} zend_catch {
if ((PHPDBG_G(flags) & PHPDBG_IS_CLEANING)) {
@@ -1738,16 +1904,6 @@ phpdbg_interact:
} while (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING));
- if (PHPDBG_G(exec) && (PHPDBG_G(flags) & PHPDBG_IS_CLEANING)) {
- exec = strdup(PHPDBG_G(exec)); /* preserve exec, don't reparse that from cmd */
- }
-
- /* this must be forced */
- CG(unclean_shutdown) = 0;
-
- /* this is just helpful */
- PG(report_memleaks) = 0;
-
#ifndef _WIN32
phpdbg_out:
if ((PHPDBG_G(flags) & PHPDBG_IS_DISCONNECTED)) {
@@ -1771,22 +1927,12 @@ phpdbg_out:
{
int i;
/* free argv */
- for (i = SG(request_info).argc; --i;) {
+ for (i = SG(request_info).argc; i--;) {
efree(SG(request_info).argv[i]);
}
efree(SG(request_info).argv);
}
-#ifndef _WIN32
- /* reset it... else we risk a stack overflow upon next run (when clean'ing) */
- php_stream_stdio_ops.write = PHPDBG_G(php_stdiop_write);
-#endif
-
-#ifndef ZTS
- /* force cleanup of auto and core globals */
- zend_hash_clean(CG(auto_globals));
- memset( &core_globals, 0, sizeof(php_core_globals));
-#endif
if (ini_entries) {
free(ini_entries);
}
@@ -1795,43 +1941,83 @@ phpdbg_out:
free(ini_override);
}
- /* this must be forced */
- CG(unclean_shutdown) = 0;
-
- /* this is just helpful */
- PG(report_memleaks) = 0;
+ /* In case we aborted during script execution, we may not reset CG(unclean_shutdown) */
+ if (!(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) {
+ is_exit = !PHPDBG_G(in_execution);
+ CG(unclean_shutdown) = is_exit || PHPDBG_G(unclean_eval);
+ }
if ((PHPDBG_G(flags) & (PHPDBG_IS_CLEANING | PHPDBG_IS_RUNNING)) == PHPDBG_IS_CLEANING) {
php_free_shutdown_functions();
zend_objects_store_mark_destructed(&EG(objects_store));
}
- /* sapi_module.deactivate is where to backup things, last chance before mm_shutdown... */
+ /* backup globals when cleaning */
+ if ((cleaning > 0 || remote) && !quit_immediately) {
+ settings = calloc(1, sizeof(zend_phpdbg_globals));
+
+ php_phpdbg_globals_ctor(settings);
+
+ if (PHPDBG_G(exec)) {
+ settings->exec = zend_strndup(PHPDBG_G(exec), PHPDBG_G(exec_len));
+ settings->exec_len = PHPDBG_G(exec_len);
+ }
+ settings->oplog = PHPDBG_G(oplog);
+ settings->prompt[0] = PHPDBG_G(prompt)[0];
+ settings->prompt[1] = PHPDBG_G(prompt)[1];
+ memcpy(settings->colors, PHPDBG_G(colors), sizeof(settings->colors));
+ settings->eol = PHPDBG_G(eol);
+ settings->input_buflen = PHPDBG_G(input_buflen);
+ memcpy(settings->input_buffer, PHPDBG_G(input_buffer), settings->input_buflen);
+ settings->flags = PHPDBG_G(flags) & PHPDBG_PRESERVE_FLAGS_MASK;
+ } else {
+ if (PHPDBG_G(prompt)[0]) {
+ free(PHPDBG_G(prompt)[0]);
+ }
+ if (PHPDBG_G(prompt)[1]) {
+ free(PHPDBG_G(prompt)[1]);
+ }
+ }
+ /* hack to restore mm_heap->use_custom_heap in order to receive memory leak info */
+ if (use_mm_wrappers) {
+ /* ASSUMING that mm_heap->use_custom_heap is the first element of the struct ... */
+ *(int *) mm_heap = 0;
+ }
zend_try {
php_request_shutdown(NULL);
} zend_end_try();
- if ((PHPDBG_G(flags) & (PHPDBG_IS_QUITTING | PHPDBG_IS_RUNNING)) == PHPDBG_IS_RUNNING) {
- phpdbg_notice("stop", "type=\"normal\"", "Script ended normally");
- cleaning++;
+ if (exit_status == 0) {
+ exit_status = EG(exit_status);
}
- if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) == PHPDBG_IS_CLEANING) {
- settings = PHPDBG_G(backup);
+ if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
+ if (PHPDBG_G(in_execution) || is_exit) {
+ if (!quit_immediately && !phpdbg_startup_run) {
+ phpdbg_notice("stop", "type=\"normal\"", "Script ended normally");
+ cleaning++;
+ }
+ }
}
-
php_output_deactivate();
zend_try {
php_module_shutdown();
} zend_end_try();
- sapi_shutdown();
+#ifndef _WIN32
+ /* reset it... else we risk a stack overflow upon next run (when clean'ing) */
+ php_stream_stdio_ops.write = PHPDBG_G(php_stdiop_write);
+#endif
+ sapi_shutdown();
}
if ((cleaning > 0 || remote) && !quit_immediately) {
+ /* reset internal php_getopt state */
+ php_getopt(-1, argv, OPTIONS, NULL, &php_optind, 0, 0);
+
goto phpdbg_main;
}
@@ -1850,5 +2036,6 @@ phpdbg_out:
free(PHPDBG_G(sapi_name_ptr));
}
- return 0;
+ /* usually 0; just for -rr */
+ return exit_status;
} /* }}} */
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index 7fb8083793..c77bc1c530 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -100,9 +100,8 @@
/* {{{ strings */
#define PHPDBG_NAME "phpdbg"
#define PHPDBG_AUTHORS "Felipe Pena, Joe Watkins and Bob Weinand" /* Ordered by last name */
-#define PHPDBG_URL "http://phpdbg.com"
-#define PHPDBG_ISSUES "http://github.com/krakjoe/phpdbg/issues"
-#define PHPDBG_VERSION "0.4.0"
+#define PHPDBG_ISSUES "http://bugs.php.net/report.php"
+#define PHPDBG_VERSION "0.5.0"
#define PHPDBG_INIT_FILENAME ".phpdbginit"
#define PHPDBG_DEFAULT_PROMPT "prompt>"
/* }}} */
@@ -114,6 +113,8 @@
#define memcpy(...) memcpy_tmp(__VA_ARGS__)
#endif
+#define quiet_write(...) ZEND_IGNORE_VALUE(write(__VA_ARGS__))
+
#if !defined(PHPDBG_WEBDATA_TRANSFER_H) && !defined(PHPDBG_WEBHELPER_H)
#ifdef ZTS
@@ -182,28 +183,31 @@ int phpdbg_do_parse(phpdbg_param_t *stack, char *input);
#define PHPDBG_IS_INITIALIZING (1ULL<<25)
#define PHPDBG_IS_SIGNALED (1ULL<<26)
#define PHPDBG_IS_INTERACTIVE (1ULL<<27)
-#define PHPDBG_IS_BP_ENABLED (1ULL<<28)
-#define PHPDBG_IS_REMOTE (1ULL<<29)
-#define PHPDBG_IS_DISCONNECTED (1ULL<<30)
-#define PHPDBG_WRITE_XML (1ULL<<31)
+#define PHPDBG_PREVENT_INTERACTIVE (1ULL<<28)
+#define PHPDBG_IS_BP_ENABLED (1ULL<<29)
+#define PHPDBG_IS_REMOTE (1ULL<<30)
+#define PHPDBG_IS_DISCONNECTED (1ULL<<31)
+#define PHPDBG_WRITE_XML (1ULL<<32)
+
+#define PHPDBG_SHOW_REFCOUNTS (1ULL<<33)
-#define PHPDBG_SHOW_REFCOUNTS (1ULL<<32)
+#define PHPDBG_IN_SIGNAL_HANDLER (1ULL<<34)
-#define PHPDBG_IN_SIGNAL_HANDLER (1ULL<<33)
+#define PHPDBG_DISCARD_OUTPUT (1ULL<<35)
-#define PHPDBG_DISCARD_OUTPUT (1ULL<<34)
+#define PHPDBG_HAS_PAGINATION (1ULL<<36)
#define PHPDBG_SEEK_MASK (PHPDBG_IN_UNTIL | PHPDBG_IN_FINISH | PHPDBG_IN_LEAVE)
#define PHPDBG_BP_RESOLVE_MASK (PHPDBG_HAS_FUNCTION_OPLINE_BP | PHPDBG_HAS_METHOD_OPLINE_BP | PHPDBG_HAS_FILE_OPLINE_BP)
#define PHPDBG_BP_MASK (PHPDBG_HAS_FILE_BP | PHPDBG_HAS_SYM_BP | PHPDBG_HAS_METHOD_BP | PHPDBG_HAS_OPLINE_BP | PHPDBG_HAS_COND_BP | PHPDBG_HAS_OPCODE_BP | PHPDBG_HAS_FUNCTION_OPLINE_BP | PHPDBG_HAS_METHOD_OPLINE_BP | PHPDBG_HAS_FILE_OPLINE_BP)
#define PHPDBG_IS_STOPPING (PHPDBG_IS_QUITTING | PHPDBG_IS_CLEANING)
-#define PHPDBG_PRESERVE_FLAGS_MASK (PHPDBG_SHOW_REFCOUNTS | PHPDBG_IS_STEPONEVAL | PHPDBG_IS_BP_ENABLED | PHPDBG_STEP_OPCODE | PHPDBG_IS_QUIET | PHPDBG_IS_COLOURED | PHPDBG_IS_REMOTE | PHPDBG_WRITE_XML | PHPDBG_IS_DISCONNECTED)
+#define PHPDBG_PRESERVE_FLAGS_MASK (PHPDBG_SHOW_REFCOUNTS | PHPDBG_IS_STEPONEVAL | PHPDBG_IS_BP_ENABLED | PHPDBG_STEP_OPCODE | PHPDBG_IS_QUIET | PHPDBG_IS_COLOURED | PHPDBG_IS_REMOTE | PHPDBG_WRITE_XML | PHPDBG_IS_DISCONNECTED | PHPDBG_HAS_PAGINATION)
#ifndef _WIN32
-# define PHPDBG_DEFAULT_FLAGS (PHPDBG_IS_QUIET | PHPDBG_IS_COLOURED | PHPDBG_IS_BP_ENABLED)
+# define PHPDBG_DEFAULT_FLAGS (PHPDBG_IS_QUIET | PHPDBG_IS_COLOURED | PHPDBG_IS_BP_ENABLED | PHPDBG_HAS_PAGINATION)
#else
-# define PHPDBG_DEFAULT_FLAGS (PHPDBG_IS_QUIET | PHPDBG_IS_BP_ENABLED)
+# define PHPDBG_DEFAULT_FLAGS (PHPDBG_IS_QUIET | PHPDBG_IS_BP_ENABLED | PHPDBG_HAS_PAGINATION)
#endif /* }}} */
/* {{{ output descriptors */
@@ -260,8 +264,11 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
int bp_count; /* breakpoint count */
int vmret; /* return from last opcode handler execution */
zend_bool in_execution; /* in execution? */
+ zend_bool unclean_eval; /* do not check for memory leaks when we needed to bail out during eval */
zend_op_array *(*compile_file)(zend_file_handle *file_handle, int type);
+ zend_op_array *(*init_compile_file)(zend_file_handle *file_handle, int type);
+ zend_op_array *(*compile_string)(zval *source_string, char *filename);
HashTable file_sources;
FILE *oplog; /* opline log */
@@ -309,8 +316,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
HANDLE sigio_watcher_thread; /* sigio watcher thread handle */
struct win32_sigio_watcher_data swd;
#endif
-
- struct _zend_phpdbg_globals *backup; /* backup of data to store */
+ long lines; /* max number of lines to display */
ZEND_END_MODULE_GLOBALS(phpdbg) /* }}} */
#endif
diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c
index 1c06646f0e..4cb1dae42c 100644
--- a/sapi/phpdbg/phpdbg_bp.c
+++ b/sapi/phpdbg/phpdbg_bp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,7 +26,7 @@
#include "phpdbg_opcode.h"
#include "zend_globals.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
/* {{{ private api functions */
static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_file(zend_op_array*);
@@ -63,6 +63,7 @@ static void phpdbg_file_breaks_dtor(zval *data) /* {{{ */
phpdbg_breakfile_t *bp = (phpdbg_breakfile_t*) Z_PTR_P(data);
efree((char*)bp->filename);
+ efree(bp);
} /* }}} */
static void phpdbg_class_breaks_dtor(zval *data) /* {{{ */
@@ -71,11 +72,13 @@ static void phpdbg_class_breaks_dtor(zval *data) /* {{{ */
efree((char*)bp->class_name);
efree((char*)bp->func_name);
+ efree(bp);
} /* }}} */
static void phpdbg_opline_class_breaks_dtor(zval *data) /* {{{ */
{
- zend_hash_destroy((HashTable *) Z_PTR_P(data));
+ zend_hash_destroy(Z_ARRVAL_P(data));
+ efree(Z_ARRVAL_P(data));
} /* }}} */
static void phpdbg_opline_breaks_dtor(zval *data) /* {{{ */
@@ -88,6 +91,7 @@ static void phpdbg_opline_breaks_dtor(zval *data) /* {{{ */
if (bp->func_name) {
efree((char*)bp->func_name);
}
+ efree(bp);
} /* }}} */
PHPDBG_API void phpdbg_reset_breakpoints(void) /* {{{ */
@@ -208,6 +212,8 @@ PHPDBG_API void phpdbg_export_breakpoints_to_string(char **str) /* {{{ */
phpdbg_asprintf(&new_str, "%sbreak if %s\n", str, conditional->code);
}
} break;
+
+ default: continue;
}
if ((*str)[0]) {
@@ -230,8 +236,9 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {
char realpath[MAXPATHLEN];
const char *original_path = path;
zend_bool pending = 0;
+ zend_string *path_str;
- HashTable *broken, *file_breaks = &PHPDBG_G(bp)[PHPDBG_BREAK_FILE];
+ HashTable *broken, *file_breaks = &PHPDBG_G(bp)[PHPDBG_BREAK_FILE];
phpdbg_breakfile_t new_break;
size_t path_len = 0L;
@@ -261,11 +268,13 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {
}
}
- if (!(broken = zend_hash_str_find_ptr(file_breaks, path, path_len))) {
+ path_str = zend_string_init(path, path_len, 0);
+
+ if (!(broken = zend_hash_find_ptr(file_breaks, path_str))) {
HashTable breaks;
zend_hash_init(&breaks, 8, NULL, phpdbg_file_breaks_dtor, 0);
- broken = zend_hash_str_add_mem(file_breaks, path, path_len, &breaks, sizeof(HashTable));
+ broken = zend_hash_add_mem(file_breaks, path_str, &breaks, sizeof(HashTable));
}
if (!zend_hash_index_exists(broken, line_num)) {
@@ -278,18 +287,17 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {
PHPDBG_BREAK_MAPPING(new_break.id, broken);
if (pending) {
- zend_string *file, *path_str = zend_string_init(path, path_len, 0);
+ zend_string *file;
ZEND_HASH_FOREACH_STR_KEY(&PHPDBG_G(file_sources), file) {
HashTable *fileht;
phpdbg_debug("Compare against loaded %s\n", file);
if (!(pending = ((fileht = phpdbg_resolve_pending_file_break_ex(ZSTR_VAL(file), ZSTR_LEN(file), path_str, broken)) == NULL))) {
- new_break = *(phpdbg_breakfile_t *) zend_hash_index_find_ptr(broken, line_num);
+ new_break = *(phpdbg_breakfile_t *) zend_hash_index_find_ptr(fileht, line_num);
break;
}
} ZEND_HASH_FOREACH_END();
- zend_string_release(path_str);
}
if (pending) {
@@ -304,13 +312,21 @@ PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num) /* {
} else {
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" file=\"%s\" line=\"%ld\"", "Breakpoint at %s:%ld exists", path, line_num);
}
+
+ zend_string_release(path_str);
} /* }}} */
PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uint filelen, zend_string *cur, HashTable *fileht) /* {{{ */
{
phpdbg_debug("file: %s, filelen: %u, cur: %s, curlen %u, pos: %c, memcmp: %d\n", file, filelen, ZSTR_VAL(cur), ZSTR_LEN(cur), filelen > ZSTR_LEN(cur) ? file[filelen - ZSTR_LEN(cur) - 1] : '?', filelen > ZSTR_LEN(cur) ? memcmp(file + filelen - ZSTR_LEN(cur), ZSTR_VAL(cur), ZSTR_LEN(cur)) : 0);
- if (((ZSTR_LEN(cur) < filelen && file[filelen - ZSTR_LEN(cur) - 1] == '/') || filelen == ZSTR_LEN(cur)) && !memcmp(file + filelen - ZSTR_LEN(cur), ZSTR_VAL(cur), ZSTR_LEN(cur))) {
+#ifdef _WIN32
+# define WIN32_PATH_CHECK file[filelen - ZSTR_LEN(cur) - 1] == '\\'
+#else
+# define WIN32_PATH_CHECK 0
+#endif
+
+ if (((ZSTR_LEN(cur) < filelen && (file[filelen - ZSTR_LEN(cur) - 1] == '/' || WIN32_PATH_CHECK)) || filelen == ZSTR_LEN(cur)) && !memcmp(file + filelen - ZSTR_LEN(cur), ZSTR_VAL(cur), ZSTR_LEN(cur))) {
phpdbg_breakfile_t *brake, new_brake;
HashTable *master;
@@ -327,8 +343,7 @@ PHPDBG_API HashTable *phpdbg_resolve_pending_file_break_ex(const char *file, uin
new_brake.filename = estrndup(file, filelen);
PHPDBG_BREAK_UNMAPPING(brake->id);
- if (master) {
- zend_hash_index_update_mem(master, brake->line, &new_brake, sizeof(phpdbg_breakfile_t));
+ if (zend_hash_index_add_mem(master, brake->line, &new_brake, sizeof(phpdbg_breakfile_t))) {
PHPDBG_BREAK_MAPPING(brake->id, master);
}
} ZEND_HASH_FOREACH_END();
@@ -364,6 +379,15 @@ PHPDBG_API void phpdbg_resolve_pending_file_break(const char *file) /* {{{ */
PHPDBG_API void phpdbg_set_breakpoint_symbol(const char *name, size_t name_len) /* {{{ */
{
+ char *lcname;
+
+ if (*name == '\\') {
+ name++;
+ name_len--;
+ }
+
+ lcname = zend_str_tolower_dup(name, name_len);
+
if (!zend_hash_str_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], name, name_len)) {
phpdbg_breaksymbol_t new_break;
@@ -372,7 +396,7 @@ PHPDBG_API void phpdbg_set_breakpoint_symbol(const char *name, size_t name_len)
PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_SYM);
new_break.symbol = estrndup(name, name_len);
- zend_hash_str_update_mem(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], new_break.symbol, name_len, &new_break, sizeof(phpdbg_breaksymbol_t));
+ zend_hash_str_update_mem(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], lcname, name_len, &new_break, sizeof(phpdbg_breaksymbol_t));
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" function=\"%s\"", "Breakpoint #%d added at %s", new_break.id, new_break.symbol);
@@ -380,6 +404,8 @@ PHPDBG_API void phpdbg_set_breakpoint_symbol(const char *name, size_t name_len)
} else {
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" function=\"%s\"", "Breakpoint exists at %s", name);
}
+
+ efree(lcname);
} /* }}} */
PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char *func_name) /* {{{ */
@@ -387,14 +413,22 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char
HashTable class_breaks, *class_table;
size_t class_len = strlen(class_name);
size_t func_len = strlen(func_name);
- char *lcname = zend_str_tolower_dup(func_name, func_len);
+ char *func_lcname, *class_lcname;
+
+ if (*class_name == '\\') {
+ class_name++;
+ class_len--;
+ }
- if (!(class_table = zend_hash_str_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_name, class_len))) {
+ func_lcname = zend_str_tolower_dup(func_name, func_len);
+ class_lcname = zend_str_tolower_dup(class_name, class_len);
+
+ if (!(class_table = zend_hash_str_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_lcname, class_len))) {
zend_hash_init(&class_breaks, 8, NULL, phpdbg_class_breaks_dtor, 0);
- class_table = zend_hash_str_update_mem(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_name, class_len, &class_breaks, sizeof(HashTable));
+ class_table = zend_hash_str_update_mem(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_lcname, class_len, &class_breaks, sizeof(HashTable));
}
- if (!zend_hash_str_exists(class_table, lcname, func_len)) {
+ if (!zend_hash_str_exists(class_table, func_lcname, func_len)) {
phpdbg_breakmethod_t new_break;
PHPDBG_G(flags) |= PHPDBG_HAS_METHOD_BP;
@@ -405,7 +439,7 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char
new_break.func_name = estrndup(func_name, func_len);
new_break.func_len = func_len;
- zend_hash_str_update_mem(class_table, lcname, func_len, &new_break, sizeof(phpdbg_breakmethod_t));
+ zend_hash_str_update_mem(class_table, func_lcname, func_len, &new_break, sizeof(phpdbg_breakmethod_t));
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" method=\"%s::%s\"", "Breakpoint #%d added at %s::%s", new_break.id, class_name, func_name);
@@ -414,7 +448,8 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char
phpdbg_error("breakpoint", "type=\"exists\" add=\"fail\" method=\"%s::%s\"", "Breakpoint exists at %s::%s", class_name, func_name);
}
- efree(lcname);
+ efree(func_lcname);
+ efree(class_lcname);
} /* }}} */
PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong opline) /* {{{ */
@@ -500,12 +535,12 @@ PHPDBG_API void phpdbg_resolve_op_array_breaks(zend_op_array *op_array) /* {{{ *
opline_break = zend_hash_get_current_data_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE]);
phpdbg_notice("breakpoint", "add=\"success\" id=\"%d\" symbol=\"%s\" num=\"%ld\" opline=\"%#lx\"", "Breakpoint #%d resolved at %s%s%s#%ld (opline %#lx)",
- brake->id,
+ opline_break->id,
brake->class_name ? brake->class_name : "",
brake->class_name && brake->func_name ? "::" : "",
brake->func_name ? brake->func_name : "",
brake->opline_num,
- brake->opline);
+ opline_break->opline);
}
} ZEND_HASH_FOREACH_END();
} /* }}} */
@@ -528,12 +563,14 @@ PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break) /* {
} else {
zend_execute_data *execute_data = EG(current_execute_data);
do {
- zend_op_array *op_array = &execute_data->func->op_array;
- if (op_array->function_name == NULL && op_array->scope == NULL && new_break->class_len == ZSTR_LEN(op_array->filename) && !memcmp(ZSTR_VAL(op_array->filename), new_break->class_name, new_break->class_len)) {
- if (phpdbg_resolve_op_array_break(new_break, op_array) == SUCCESS) {
- return SUCCESS;
- } else {
- return 2;
+ if (ZEND_USER_CODE(execute_data->func->common.type)) {
+ zend_op_array *op_array = &execute_data->func->op_array;
+ if (op_array->function_name == NULL && op_array->scope == NULL && new_break->class_len == ZSTR_LEN(op_array->filename) && !memcmp(ZSTR_VAL(op_array->filename), new_break->class_name, new_break->class_len)) {
+ if (phpdbg_resolve_op_array_break(new_break, op_array) == SUCCESS) {
+ return SUCCESS;
+ } else {
+ return 2;
+ }
}
}
} while ((execute_data = execute_data->prev_execute_data) != NULL);
@@ -573,6 +610,8 @@ PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break) /* {
return SUCCESS;
} /* }}} */
+/* TODO ... method/function oplines need to be normalized (leading backslash, lowercase) and file oplines need to be resolved properly */
+
PHPDBG_API void phpdbg_set_breakpoint_method_opline(const char *class, const char *method, zend_ulong opline) /* {{{ */
{
phpdbg_breakopline_t new_break;
@@ -749,6 +788,7 @@ PHPDBG_API void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t opline) /* {
PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_OPLINE);
new_break.opline = (zend_ulong) opline;
+ new_break.base = NULL;
zend_hash_index_update_mem(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (zend_ulong) opline, &new_break, sizeof(phpdbg_breakline_t));
@@ -873,8 +913,6 @@ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_file(zend_op_array *op_
static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_symbol(zend_function *fbc) /* {{{ */
{
- const char *fname;
- size_t flen;
zend_op_array *ops;
if (fbc->type != ZEND_USER_FUNCTION) {
@@ -889,30 +927,33 @@ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_symbol(zend_function *f
}
if (ops->function_name) {
- fname = ZSTR_VAL(ops->function_name);
- flen = ZSTR_LEN(ops->function_name);
+ phpdbg_breakbase_t *brake;
+ zend_string *fname = zend_string_tolower(ops->function_name);
+
+ brake = zend_hash_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], fname);
+
+ zend_string_release(fname);
+ return brake;
} else {
- fname = "main";
- flen = 4;
+ return zend_hash_str_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], ZEND_STRL("main"));
}
-
- return zend_hash_str_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], fname, flen);
} /* }}} */
static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_method(zend_op_array *ops) /* {{{ */
{
HashTable *class_table;
phpdbg_breakbase_t *brake = NULL;
+ zend_string *class_lcname = zend_string_tolower(ops->scope->name);
- if ((class_table = zend_hash_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], ops->scope->name))) {
- size_t lcname_len = ZSTR_LEN(ops->function_name);
- char *lcname = zend_str_tolower_dup(ZSTR_VAL(ops->function_name), lcname_len);
+ if ((class_table = zend_hash_find_ptr(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_lcname))) {
+ zend_string *lcname = zend_string_tolower(ops->function_name);
- brake = zend_hash_str_find_ptr(class_table, lcname, lcname_len);
+ brake = zend_hash_find_ptr(class_table, lcname);
- efree(lcname);
+ zend_string_release(lcname);
}
+ zend_string_release(class_lcname);
return brake;
} /* }}} */
@@ -929,9 +970,9 @@ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_opline(phpdbg_opline_pt
static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_opcode(zend_uchar opcode) /* {{{ */
{
- const char *opname = phpdbg_decode_opcode(opcode);
+ const char *opname = zend_get_opcode_name(opcode);
- if (memcmp(opname, PHPDBG_STRL("UNKNOWN")) == 0) {
+ if (!opname) {
return NULL;
}
@@ -1038,11 +1079,7 @@ static inline phpdbg_breakbase_t *phpdbg_find_conditional_breakpoint(zend_execut
zend_try {
PHPDBG_G(flags) |= PHPDBG_IN_COND_BP;
zend_execute(bp->ops, &retval);
-#if PHP_VERSION_ID >= 50700
if (zend_is_true(&retval)) {
-#else
- if (zend_is_true(&retval)) {
-#endif
breakpoint = SUCCESS;
}
} zend_end_try();
@@ -1081,8 +1118,9 @@ PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakpoint(zend_execute_data *execute
}
if (PHPDBG_G(flags) & (PHPDBG_HAS_METHOD_BP|PHPDBG_HAS_SYM_BP)) {
- /* check we are at the beginning of the stack */
- if (execute_data->opline == execute_data->func->op_array.opcodes) {
+ zend_op_array *op_array = &execute_data->func->op_array;
+ /* check we are at the beginning of the stack, but after argument RECV */
+ if (execute_data->opline == op_array->opcodes + op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC)) {
if ((base = phpdbg_find_breakpoint_symbol(execute_data->func))) {
goto result;
}
diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h
index 5cf3f5631d..abbcc4d5df 100644
--- a/sapi/phpdbg/phpdbg_bp.h
+++ b/sapi/phpdbg/phpdbg_bp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_break.c b/sapi/phpdbg/phpdbg_break.c
index c0465ff417..0640d96fd8 100644
--- a/sapi/phpdbg/phpdbg_break.c
+++ b/sapi/phpdbg/phpdbg_break.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,7 +26,7 @@
#include "phpdbg_bp.h"
#include "phpdbg_prompt.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define PHPDBG_BREAK_COMMAND_D(f, h, a, m, l, s, flags) \
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[9], flags)
diff --git a/sapi/phpdbg/phpdbg_break.h b/sapi/phpdbg/phpdbg_break.h
index deb5031a12..4a74028c0e 100644
--- a/sapi/phpdbg/phpdbg_break.h
+++ b/sapi/phpdbg/phpdbg_break.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_btree.c b/sapi/phpdbg/phpdbg_btree.c
index 2311f05126..9e7dc86e8e 100644
--- a/sapi/phpdbg/phpdbg_btree.c
+++ b/sapi/phpdbg/phpdbg_btree.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -66,7 +66,6 @@ phpdbg_btree_result *phpdbg_btree_find(phpdbg_btree *tree, zend_ulong idx) {
phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong idx) {
phpdbg_btree_branch *branch = tree->branch;
int i = tree->depth - 1, last_superior_i = -1;
- zend_bool had_alternative_branch = 0;
if (branch == NULL) {
return NULL;
@@ -74,30 +73,33 @@ phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong id
/* find nearest watchpoint */
do {
- /* an impossible branch was found if: */
- if (!had_alternative_branch && (idx >> i) % 2 == 0 && !branch->branches[0]) {
- /* there's no lower branch than idx */
- if (last_superior_i == -1) {
- /* failure */
- return NULL;
- }
- /* reset state */
- branch = tree->branch;
- i = tree->depth - 1;
- /* follow branch according to bits in idx until the last lower branch before the impossible branch */
- do {
- CHOOSE_BRANCH((idx >> i) % 2 == 1 && branch->branches[1]);
- } while (--i > last_superior_i);
- /* use now the lower branch of which we can be sure that it contains only branches lower than idx */
- CHOOSE_BRANCH(0);
- /* and choose the highest possible branch in the branch containing only branches lower than idx */
- while (i--) {
- CHOOSE_BRANCH(branch->branches[1]);
+ if ((idx >> i) % 2 == 0) {
+ if (branch->branches[0]) {
+ CHOOSE_BRANCH(0);
+ /* an impossible branch was found if: */
+ } else {
+ /* there's no lower branch than idx */
+ if (last_superior_i == -1) {
+ /* failure */
+ return NULL;
+ }
+ /* reset state */
+ branch = tree->branch;
+ i = tree->depth - 1;
+ /* follow branch according to bits in idx until the last lower branch before the impossible branch */
+ do {
+ CHOOSE_BRANCH((idx >> i) % 2 == 1 && branch->branches[1]);
+ } while (--i > last_superior_i);
+ /* use now the lower branch of which we can be sure that it contains only branches lower than idx */
+ CHOOSE_BRANCH(0);
+ /* and choose the highest possible branch in the branch containing only branches lower than idx */
+ while (i--) {
+ CHOOSE_BRANCH(branch->branches[1]);
+ }
+ break;
}
- break;
- }
/* follow branch according to bits in idx until having found an impossible branch */
- if (had_alternative_branch || (idx >> i) % 2 == 1) {
+ } else {
if (branch->branches[1]) {
if (branch->branches[0]) {
last_superior_i = i;
@@ -105,10 +107,11 @@ phpdbg_btree_result *phpdbg_btree_find_closest(phpdbg_btree *tree, zend_ulong id
CHOOSE_BRANCH(1);
} else {
CHOOSE_BRANCH(0);
- had_alternative_branch = 1;
+ while (i--) {
+ CHOOSE_BRANCH(branch->branches[1]);
+ }
+ break;
}
- } else {
- CHOOSE_BRANCH(0);
}
} while (i--);
diff --git a/sapi/phpdbg/phpdbg_btree.h b/sapi/phpdbg/phpdbg_btree.h
index 08b645ede4..05fb6b833a 100644
--- a/sapi/phpdbg/phpdbg_btree.h
+++ b/sapi/phpdbg/phpdbg_btree.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c
index 36f1a3f4ab..f89e58a13c 100644
--- a/sapi/phpdbg/phpdbg_cmd.c
+++ b/sapi/phpdbg/phpdbg_cmd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
#include "phpdbg_prompt.h"
#include "phpdbg_io.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
static inline const char *phpdbg_command_name(const phpdbg_command_t *command, char *buffer) {
size_t pos = 0;
@@ -95,35 +95,35 @@ PHPDBG_API char* phpdbg_param_tostring(const phpdbg_param_t *param, char **point
{
switch (param->type) {
case STR_PARAM:
- asprintf(pointer, "%s", param->str);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%s", param->str));
break;
case ADDR_PARAM:
- asprintf(pointer, ZEND_ULONG_FMT, param->addr);
+ ZEND_IGNORE_VALUE(asprintf(pointer, ZEND_ULONG_FMT, param->addr));
break;
case NUMERIC_PARAM:
- asprintf(pointer, "%li", param->num);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%li", param->num));
break;
case METHOD_PARAM:
- asprintf(pointer, "%s::%s", param->method.class, param->method.name);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%s::%s", param->method.class, param->method.name));
break;
case FILE_PARAM:
if (param->num) {
- asprintf(pointer, "%s:%lu#%lu", param->file.name, param->file.line, param->num);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%s:%lu#%lu", param->file.name, param->file.line, param->num));
} else {
- asprintf(pointer, "%s:%lu", param->file.name, param->file.line);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%s:%lu", param->file.name, param->file.line));
}
break;
case NUMERIC_FUNCTION_PARAM:
- asprintf(pointer, "%s#%lu", param->str, param->num);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%s#%lu", param->str, param->num));
break;
case NUMERIC_METHOD_PARAM:
- asprintf(pointer, "%s::%s#%lu", param->method.class, param->method.name, param->num);
+ ZEND_IGNORE_VALUE(asprintf(pointer, "%s::%s#%lu", param->method.class, param->method.name, param->num));
break;
default:
@@ -325,7 +325,7 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg)
if (param && param->type) {
switch (param->type) {
case STR_PARAM:
- fprintf(stderr, "%s STR_PARAM(%s=%lu)\n", msg, param->str, param->len);
+ fprintf(stderr, "%s STR_PARAM(%s=%zu)\n", msg, param->str, param->len);
break;
case ADDR_PARAM:
@@ -357,11 +357,11 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg)
break;
case COND_PARAM:
- fprintf(stderr, "%s COND_PARAM(%s=%lu)\n", msg, param->str, param->len);
+ fprintf(stderr, "%s COND_PARAM(%s=%zu)\n", msg, param->str, param->len);
break;
case OP_PARAM:
- fprintf(stderr, "%s OP_PARAM(%s=%lu)\n", msg, param->str, param->len);
+ fprintf(stderr, "%s OP_PARAM(%s=%zu)\n", msg, param->str, param->len);
break;
default: {
@@ -385,23 +385,31 @@ PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack) {
switch (remove->type) {
case NUMERIC_METHOD_PARAM:
case METHOD_PARAM:
- if (remove->method.class)
- free(remove->method.class);
- if (remove->method.name)
- free(remove->method.name);
+ if (remove->method.class) {
+ efree(remove->method.class);
+ }
+ if (remove->method.name) {
+ efree(remove->method.name);
+ }
break;
case NUMERIC_FUNCTION_PARAM:
case STR_PARAM:
case OP_PARAM:
- if (remove->str)
- free(remove->str);
+ case EVAL_PARAM:
+ case SHELL_PARAM:
+ case COND_PARAM:
+ case RUN_PARAM:
+ if (remove->str) {
+ efree(remove->str);
+ }
break;
case NUMERIC_FILE_PARAM:
case FILE_PARAM:
- if (remove->file.name)
- free(remove->file.name);
+ if (remove->file.name) {
+ efree(remove->file.name);
+ }
break;
default: {
@@ -426,8 +434,9 @@ PHPDBG_API void phpdbg_stack_free(phpdbg_param_t *stack) {
PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param) {
phpdbg_param_t *next = calloc(1, sizeof(phpdbg_param_t));
- if (!next)
+ if (!next) {
return;
+ }
*(next) = *(param);
@@ -446,6 +455,16 @@ PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param)
stack->len++;
} /* }}} */
+/* {{{ */
+PHPDBG_API void phpdbg_stack_separate(phpdbg_param_t *param) {
+ phpdbg_param_t *stack = calloc(1, sizeof(phpdbg_param_t));
+
+ stack->type = STACK_PARAM;
+ stack->next = param->next;
+ param->next = stack;
+ stack->top = param->top;
+} /* }}} */
+
PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param_t **stack) {
if (command) {
char buffer[128] = {0,};
@@ -458,7 +477,7 @@ PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param
/* check for arg spec */
if (!(arg) || !(*arg)) {
- if (!top) {
+ if (!top || top->type == STACK_PARAM) {
return SUCCESS;
}
@@ -498,6 +517,10 @@ PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param
}
while (arg && *arg) {
+ if (top && top->type == STACK_PARAM) {
+ break;
+ }
+
current++;
switch (*arg) {
@@ -520,9 +543,11 @@ PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param
case '*': { /* do nothing */ } break;
}
- if (top ) {
+ if (top) {
top = top->next;
- } else break;
+ } else {
+ break;
+ }
received++;
arg++;
@@ -636,22 +661,9 @@ PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t *
return NULL;
} /* }}} */
-/* {{{ */
-PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe) {
- phpdbg_param_t *top = NULL;
+static int phpdbg_internal_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe) {
const phpdbg_command_t *handler = NULL;
-
- if (stack->type != STACK_PARAM) {
- phpdbg_error("command", "type=\"nostack\"", "The passed argument was not a stack !");
- return FAILURE;
- }
-
- if (!stack->len) {
- phpdbg_error("command", "type=\"emptystack\"", "The stack contains nothing !");
- return FAILURE;
- }
-
- top = (phpdbg_param_t *) stack->next;
+ phpdbg_param_t *top = (phpdbg_param_t *) stack->next;
switch (top->type) {
case EVAL_PARAM:
@@ -701,6 +713,32 @@ PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async
return SUCCESS;
} /* }}} */
+/* {{{ */
+PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe) {
+ phpdbg_param_t *top = stack;
+
+ if (stack->type != STACK_PARAM) {
+ phpdbg_error("command", "type=\"nostack\"", "The passed argument was not a stack !");
+ return FAILURE;
+ }
+
+ if (!stack->len) {
+ phpdbg_error("command", "type=\"emptystack\"", "The stack contains nothing !");
+ return FAILURE;
+ }
+
+ do {
+ if (top->type == STACK_PARAM) {
+ int result;
+ if ((result = phpdbg_internal_stack_execute(top, allow_async_unsafe)) != SUCCESS) {
+ return result;
+ }
+ }
+ } while ((top = top->next));
+
+ return SUCCESS;
+} /* }}} */
+
PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
{
char buf[PHPDBG_MAX_CMD];
@@ -716,8 +754,7 @@ PHPDBG_API char *phpdbg_read_input(char *buffered) /* {{{ */
#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled without readline */
#if USE_LIB_STAR
-readline:
- if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE)
+ if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) || !isatty(PHPDBG_G(io)[PHPDBG_STDIN].fd))
#endif
{
phpdbg_write("prompt", "", "%s", phpdbg_get_prompt());
@@ -727,13 +764,12 @@ readline:
else {
cmd = readline(phpdbg_get_prompt());
PHPDBG_G(last_was_newline) = 1;
- }
- if (!cmd) {
- goto readline;
- }
+ if (!cmd) {
+ PHPDBG_G(flags) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED;
+ zend_bailout();
+ }
- if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {
add_history(cmd);
}
#endif
@@ -744,7 +780,7 @@ readline:
buffer = estrdup(cmd);
#if USE_LIB_STAR
- if (!buffered && cmd && !(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {
+ if (!buffered && cmd && !(PHPDBG_G(flags) & PHPDBG_IS_REMOTE) && isatty(PHPDBG_G(io)[PHPDBG_STDIN].fd)) {
free(cmd);
}
#endif
@@ -762,13 +798,14 @@ readline:
if (buffer && strlen(buffer)) {
if (PHPDBG_G(buffer)) {
- efree(PHPDBG_G(buffer));
+ free(PHPDBG_G(buffer));
}
- PHPDBG_G(buffer) = estrdup(buffer);
- } else {
- if (PHPDBG_G(buffer)) {
- buffer = estrdup(PHPDBG_G(buffer));
+ PHPDBG_G(buffer) = strdup(buffer);
+ } else if (PHPDBG_G(buffer)) {
+ if (buffer) {
+ efree(buffer);
}
+ buffer = estrdup(PHPDBG_G(buffer));
}
return buffer;
diff --git a/sapi/phpdbg/phpdbg_cmd.h b/sapi/phpdbg/phpdbg_cmd.h
index 957297600b..cbf2a8793d 100644
--- a/sapi/phpdbg/phpdbg_cmd.h
+++ b/sapi/phpdbg/phpdbg_cmd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -137,6 +137,7 @@ PHPDBG_API int phpdbg_ask_user_permission(const char *question);
* Stack Management
*/
PHPDBG_API void phpdbg_stack_push(phpdbg_param_t *stack, phpdbg_param_t *param);
+PHPDBG_API void phpdbg_stack_separate(phpdbg_param_t *param);
PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t *commands, const phpdbg_command_t *parent, phpdbg_param_t **top);
PHPDBG_API int phpdbg_stack_verify(const phpdbg_command_t *command, phpdbg_param_t **stack);
PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, zend_bool allow_async_unsafe);
diff --git a/sapi/phpdbg/phpdbg_eol.c b/sapi/phpdbg/phpdbg_eol.c
index 4cc6ef1679..eaf9997fb4 100644
--- a/sapi/phpdbg/phpdbg_eol.c
+++ b/sapi/phpdbg/phpdbg_eol.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
#include "phpdbg.h"
#include "phpdbg_eol.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define EOL_LIST_LEN 4
struct phpdbg_eol_rep phpdbg_eol_list[EOL_LIST_LEN] = {
diff --git a/sapi/phpdbg/phpdbg_eol.h b/sapi/phpdbg/phpdbg_eol.h
index e8dd27c971..29fd74f888 100644
--- a/sapi/phpdbg/phpdbg_eol.h
+++ b/sapi/phpdbg/phpdbg_eol.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c
index 189b3b20fa..f64d18b4bb 100644
--- a/sapi/phpdbg/phpdbg_frame.c
+++ b/sapi/phpdbg/phpdbg_frame.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,7 @@
#include "phpdbg_frame.h"
#include "phpdbg_list.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
void phpdbg_restore_frame(void) /* {{{ */
{
@@ -36,8 +36,6 @@ void phpdbg_restore_frame(void) /* {{{ */
/* move things back */
EG(current_execute_data) = PHPDBG_FRAME(execute_data);
-
- EG(scope) = PHPDBG_EX(func)->op_array.scope;
} /* }}} */
void phpdbg_switch_frame(int frame) /* {{{ */
@@ -78,8 +76,6 @@ void phpdbg_switch_frame(int frame) /* {{{ */
/* backup things and jump back */
PHPDBG_FRAME(execute_data) = EG(current_execute_data);
EG(current_execute_data) = execute_data;
-
- EG(scope) = PHPDBG_EX(func)->op_array.scope;
}
phpdbg_notice("frame", "id=\"%d\"", "Switched to frame #%d", frame);
@@ -164,7 +160,11 @@ static void phpdbg_dump_prototype(zval *tmp) /* {{{ */
}
++j;
- php_printf("%s", phpdbg_short_zval_print(argstmp, 40));
+ {
+ char *arg_print = phpdbg_short_zval_print(argstmp, 40);
+ php_printf("%s", arg_print);
+ efree(arg_print);
+ }
phpdbg_xml("</arg>");
} ZEND_HASH_FOREACH_END();
@@ -214,7 +214,7 @@ void phpdbg_dump_backtrace(size_t num) /* {{{ */
while ((tmp = zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), &position))) {
if (file) { /* userland */
phpdbg_out("frame #%d: ", i);
- phpdbg_xml("<frame %r id=\"%d\" file=\"%s\" line=\"%d\"", i, Z_STRVAL_P(file), Z_LVAL_P(line));
+ phpdbg_xml("<frame %r id=\"%d\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"", i, Z_STRVAL_P(file), Z_LVAL_P(line));
phpdbg_dump_prototype(tmp);
phpdbg_out(" at %s:%ld\n", Z_STRVAL_P(file), Z_LVAL_P(line));
i++;
diff --git a/sapi/phpdbg/phpdbg_frame.h b/sapi/phpdbg/phpdbg_frame.h
index 04d636ba4e..237848c29b 100644
--- a/sapi/phpdbg/phpdbg_frame.h
+++ b/sapi/phpdbg/phpdbg_frame.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c
index c2744b9b68..d01184b102 100644
--- a/sapi/phpdbg/phpdbg_help.c
+++ b/sapi/phpdbg/phpdbg_help.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
#include "phpdbg_eol.h"
#include "zend.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
/* {{{ Commands Table */
#define PHPDBG_COMMAND_HELP_D(name, tip, alias, action) \
@@ -383,7 +383,8 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" **-I** Ignore default .phpdbginit" CR
" **-O** **-O**my.oplog Sets oplog output file" CR
" **-r** Run execution context" CR
-" **-rr** Run execution context and quit after execution" CR
+" **-rr** Run execution context and quit after execution (not respecting breakpoints)" CR
+" **-e** Generate extended information for debugger/profiler" CR
" **-E** Enable step through eval, careful!" CR
" **-S** **-S**cli Override SAPI name, careful!" CR
" **-l** **-l**4000 Setup remote console ports" CR
@@ -808,9 +809,11 @@ phpdbg_help_text_t phpdbg_help_text[] = {
},
{"run",
-"Enter the vm, startinging execution. Execution will then continue until the next breakpoint "
-"or completion of the script. Add parameters you want to use as $argv"
+"Enter the vm, starting execution. Execution will then continue until the next breakpoint "
+"or completion of the script. Add parameters you want to use as $argv" CR CR
+
"**Examples**" CR CR
+
" $P run" CR
" $P r" CR
" Will cause execution of the context, if it is set" CR CR
diff --git a/sapi/phpdbg/phpdbg_help.h b/sapi/phpdbg/phpdbg_help.h
index a2db10880e..7473684d3f 100644
--- a/sapi/phpdbg/phpdbg_help.h
+++ b/sapi/phpdbg/phpdbg_help.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c
index 1f78ac9173..ddd8229c08 100644
--- a/sapi/phpdbg/phpdbg_info.c
+++ b/sapi/phpdbg/phpdbg_info.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,7 +25,7 @@
#include "phpdbg_bp.h"
#include "phpdbg_prompt.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define PHPDBG_INFO_COMMAND_D(f, h, a, m, l, s, flags) \
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[13], flags)
@@ -72,7 +72,7 @@ PHPDBG_INFO(files) /* {{{ */
phpdbg_try_access {
ZEND_HASH_FOREACH_STR_KEY(&EG(included_files), fname) {
- phpdbg_writeln("includedfile", "name=\"%s\"", "File: %s", fname);
+ phpdbg_writeln("includedfile", "name=\"%s\"", "File: %s", ZSTR_VAL(fname));
} ZEND_HASH_FOREACH_END();
} phpdbg_catch_access {
phpdbg_error("signalsegv", "", "Could not fetch file name, invalid data source, aborting included file listing");
@@ -120,12 +120,18 @@ PHPDBG_INFO(constants) /* {{{ */
phpdbg_out("Address Refs Type Constant\n");
ZEND_HASH_FOREACH_PTR(&consts, data) {
-#define VARIABLEINFO(attrs, msg, ...) phpdbg_writeln("constant", "address=\"%p\" refcount=\"%d\" type=\"%s\" name=\"%.*s\" " attrs, "%-18p %-7d %-9s %.*s" msg, &data->value, Z_REFCOUNTED(data->value) ? Z_REFCOUNT(data->value) : 1, zend_zval_type_name(&data->value), ZSTR_LEN(data->name), ZSTR_VAL(data->name), ##__VA_ARGS__)
+#define VARIABLEINFO(attrs, msg, ...) \
+ phpdbg_writeln("constant", \
+ "address=\"%p\" refcount=\"%d\" type=\"%s\" name=\"%.*s\" " attrs, \
+ "%-18p %-7d %-9s %.*s" msg, &data->value, \
+ Z_REFCOUNTED(data->value) ? Z_REFCOUNT(data->value) : 1, \
+ zend_zval_type_name(&data->value), \
+ (int) ZSTR_LEN(data->name), ZSTR_VAL(data->name), ##__VA_ARGS__)
switch (Z_TYPE(data->value)) {
case IS_STRING:
phpdbg_try_access {
- VARIABLEINFO("length=\"%d\" value=\"%.*s\"", "\nstring (%d) \"%.*s%s\"", Z_STRLEN(data->value), Z_STRLEN(data->value) < 255 ? Z_STRLEN(data->value) : 255, Z_STRVAL(data->value), Z_STRLEN(data->value) > 255 ? "..." : "");
+ VARIABLEINFO("length=\"%zd\" value=\"%.*s\"", "\nstring (%zd) \"%.*s%s\"", Z_STRLEN(data->value), Z_STRLEN(data->value) < 255 ? (int) Z_STRLEN(data->value) : 255, Z_STRVAL(data->value), Z_STRLEN(data->value) > 255 ? "..." : "");
} phpdbg_catch_access {
VARIABLEINFO("", "");
} phpdbg_end_try_access();
@@ -153,10 +159,12 @@ PHPDBG_INFO(constants) /* {{{ */
return SUCCESS;
} /* }}} */
-static int phpdbg_arm_auto_global(zend_auto_global *auto_global) {
+static int phpdbg_arm_auto_global(zval *ptrzv) {
+ zend_auto_global *auto_global = Z_PTR_P(ptrzv);
+
if (auto_global->armed) {
if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) {
- phpdbg_notice("variableinfo", "unreachable=\"%.*s\"", "Cannot show information about superglobal variable %.*s", ZSTR_LEN(auto_global->name), ZSTR_VAL(auto_global->name));
+ phpdbg_notice("variableinfo", "unreachable=\"%.*s\"", "Cannot show information about superglobal variable %.*s", (int) ZSTR_LEN(auto_global->name), ZSTR_VAL(auto_global->name));
} else {
auto_global->armed = auto_global->auto_global_callback(auto_global->name);
}
@@ -204,9 +212,9 @@ static int phpdbg_print_symbols(zend_bool show_globals) {
if (ops->function_name) {
if (ops->scope) {
- phpdbg_notice("variableinfo", "method=\"%s::%s\" num=\"%d\"", "Variables in %s::%s() (%d)", ops->scope->name, ops->function_name, zend_hash_num_elements(&vars));
+ phpdbg_notice("variableinfo", "method=\"%s::%s\" num=\"%d\"", "Variables in %s::%s() (%d)", ops->scope->name->val, ops->function_name->val, zend_hash_num_elements(&vars));
} else {
- phpdbg_notice("variableinfo", "function=\"%s\" num=\"%d\"", "Variables in %s() (%d)", ops->function_name, zend_hash_num_elements(&vars));
+ phpdbg_notice("variableinfo", "function=\"%s\" num=\"%d\"", "Variables in %s() (%d)", ZSTR_VAL(ops->function_name), zend_hash_num_elements(&vars));
}
} else {
if (ops->filename) {
@@ -221,8 +229,12 @@ static int phpdbg_print_symbols(zend_bool show_globals) {
phpdbg_out("Address Refs Type Variable\n");
ZEND_HASH_FOREACH_STR_KEY_VAL(&vars, var, data) {
phpdbg_try_access {
-#define VARIABLEINFO(attrs, msg, ...) phpdbg_writeln("variable", "address=\"%p\" refcount=\"%d\" type=\"%s\" refstatus=\"%s\" name=\"%.*s\" " attrs, "%-18p %-7d %-9s %s$%.*s" msg, data, Z_REFCOUNT_P(data), zend_zval_type_name(data), Z_ISREF_P(data) ? "&": "", ZSTR_LEN(var), ZSTR_VAL(var), ##__VA_ARGS__)
-
+ const char *isref = "";
+#define VARIABLEINFO(attrs, msg, ...) \
+ phpdbg_writeln("variable", \
+ "address=\"%p\" refcount=\"%d\" type=\"%s\" refstatus=\"%s\" name=\"%.*s\" " attrs, \
+ "%-18p %-7d %-9s %s$%.*s" msg, data, Z_REFCOUNTED_P(data) ? Z_REFCOUNT_P(data) : 1, zend_zval_type_name(data), isref, (int) ZSTR_LEN(var), ZSTR_VAL(var), ##__VA_ARGS__)
+retry_switch:
switch (Z_TYPE_P(data)) {
case IS_RESOURCE:
phpdbg_try_access {
@@ -234,14 +246,14 @@ static int phpdbg_print_symbols(zend_bool show_globals) {
break;
case IS_OBJECT:
phpdbg_try_access {
- VARIABLEINFO("instanceof=\"%s\"", "\n|-----(instanceof)----> (%s)\n", Z_OBJCE_P(data)->name);
+ VARIABLEINFO("instanceof=\"%s\"", "\n|-----(instanceof)----> (%s)\n", ZSTR_VAL(Z_OBJCE_P(data)->name));
} phpdbg_catch_access {
VARIABLEINFO("instanceof=\"%s\"", "\n|-----(instanceof)----> (unknown)\n");
} phpdbg_end_try_access();
break;
case IS_STRING:
phpdbg_try_access {
- VARIABLEINFO("length=\"%d\" value=\"%.*s\"", "\nstring (%d) \"%.*s%s\"", Z_STRLEN_P(data), Z_STRLEN_P(data) < 255 ? Z_STRLEN_P(data) : 255, Z_STRVAL_P(data), Z_STRLEN_P(data) > 255 ? "..." : "");
+ VARIABLEINFO("length=\"%zd\" value=\"%.*s\"", "\nstring (%zd) \"%.*s%s\"", Z_STRLEN_P(data), Z_STRLEN_P(data) < 255 ? (int) Z_STRLEN_P(data) : 255, Z_STRVAL_P(data), Z_STRLEN_P(data) > 255 ? "..." : "");
} phpdbg_catch_access {
VARIABLEINFO("", "");
} phpdbg_end_try_access();
@@ -258,13 +270,20 @@ static int phpdbg_print_symbols(zend_bool show_globals) {
case IS_DOUBLE:
VARIABLEINFO("value=\"%lf\"", "\ndouble (%lf)", Z_DVAL_P(data));
break;
+ case IS_REFERENCE:
+ isref = "&";
+ data = Z_REFVAL_P(data);
+ goto retry_switch;
+ case IS_INDIRECT:
+ data = Z_INDIRECT_P(data);
+ goto retry_switch;
default:
VARIABLEINFO("", "");
}
#undef VARIABLEINFO
} phpdbg_catch_access {
- phpdbg_writeln("variable", "address=\"%p\" name=\"%s\"", "%p\tn/a\tn/a\t$%s", data, var);
+ phpdbg_writeln("variable", "address=\"%p\" name=\"%s\"", "%p\tn/a\tn/a\t$%s", data, ZSTR_VAL(var));
} phpdbg_end_try_access();
} ZEND_HASH_FOREACH_END();
}
@@ -290,13 +309,13 @@ PHPDBG_INFO(literal) /* {{{ */
zend_bool in_executor = PHPDBG_G(in_execution) && EG(current_execute_data) && EG(current_execute_data)->func;
if (in_executor || PHPDBG_G(ops)) {
zend_op_array *ops = in_executor ? &EG(current_execute_data)->func->op_array : PHPDBG_G(ops);
- int literal = 0, count = ops->last_literal-1;
+ int literal = 0, count = ops->last_literal - 1;
if (ops->function_name) {
if (ops->scope) {
- phpdbg_notice("literalinfo", "method=\"%s::%s\" num=\"%d\"", "Literal Constants in %s::%s() (%d)", ops->scope->name, ops->function_name, count);
+ phpdbg_notice("literalinfo", "method=\"%s::%s\" num=\"%d\"", "Literal Constants in %s::%s() (%d)", ops->scope->name->val, ops->function_name->val, count);
} else {
- phpdbg_notice("literalinfo", "function=\"%s\" num=\"%d\"", "Literal Constants in %s() (%d)", ops->function_name, count);
+ phpdbg_notice("literalinfo", "function=\"%s\" num=\"%d\"", "Literal Constants in %s() (%d)", ops->function_name->val, count);
}
} else {
if (ops->filename) {
@@ -359,7 +378,7 @@ static inline void phpdbg_print_class_name(zend_class_entry *ce) /* {{{ */
const char *visibility = ce->type == ZEND_USER_CLASS ? "User" : "Internal";
const char *type = (ce->ce_flags & ZEND_ACC_INTERFACE) ? "Interface" : (ce->ce_flags & ZEND_ACC_ABSTRACT) ? "Abstract Class" : "Class";
- phpdbg_writeln("class", "type=\"%s\" flags=\"%s\" name=\"%.*s\" methodcount=\"%d\"", "%s %s %.*s (%d)", visibility, type, ZSTR_LEN(ce->name), ZSTR_VAL(ce->name), zend_hash_num_elements(&ce->function_table));
+ phpdbg_writeln("class", "type=\"%s\" flags=\"%s\" name=\"%.*s\" methodcount=\"%d\"", "%s %s %.*s (%d)", visibility, type, (int) ZSTR_LEN(ce->name), ZSTR_VAL(ce->name), zend_hash_num_elements(&ce->function_table));
} /* }}} */
PHPDBG_INFO(classes) /* {{{ */
diff --git a/sapi/phpdbg/phpdbg_info.h b/sapi/phpdbg/phpdbg_info.h
index cc0d624755..3e7d585576 100644
--- a/sapi/phpdbg/phpdbg_info.h
+++ b/sapi/phpdbg/phpdbg_info.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c
index 70709eadc1..b2f4ba7c0d 100644
--- a/sapi/phpdbg/phpdbg_io.c
+++ b/sapi/phpdbg/phpdbg_io.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -45,7 +45,7 @@
#include <poll.h>
#endif
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
/* is easy to generalize ... but not needed for now */
PHPDBG_API int phpdbg_consume_stdin_line(char *buf) {
@@ -90,7 +90,6 @@ PHPDBG_API int phpdbg_consume_stdin_line(char *buf) {
if (bytes <= 0) {
PHPDBG_G(flags) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED;
zend_bailout();
- return 0;
}
return bytes;
@@ -150,7 +149,7 @@ recv_once:
#endif
if (got_now == -1) {
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n"));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n"));
return -1;
}
i -= got_now;
@@ -191,16 +190,51 @@ PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo) {
return ret;
}
+static int phpdbg_output_pager(int sock, const char *ptr, int len) {
+ int count = 0, bytes = 0;
+ const char *p = ptr, *endp = ptr + len;
+
+ while ((p = memchr(p, '\n', endp - p))) {
+ count++;
+ p++;
+
+ if (count % PHPDBG_G(lines) == 0) {
+ bytes += write(sock, ptr + bytes, (p - ptr) - bytes);
+
+ if (memchr(p, '\n', endp - p)) {
+ char buf[PHPDBG_MAX_CMD];
+ write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---"));
+ phpdbg_consume_stdin_line(buf);
+ if (*buf == 'q') {
+ break;
+ }
+ write(sock, "\r", 1);
+ } else break;
+ }
+ }
+ if (bytes && count % PHPDBG_G(lines) != 0) {
+ bytes += write(sock, ptr + bytes, len - bytes);
+ } else if (!bytes) {
+ bytes += write(sock, ptr, len);
+ }
+ return bytes;
+}
PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len) {
if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
return phpdbg_send_bytes(sock, ptr, len);
}
+
+ if ((PHPDBG_G(flags) & PHPDBG_HAS_PAGINATION)
+ && !(PHPDBG_G(flags) & PHPDBG_WRITE_XML)
+ && PHPDBG_G(io)[PHPDBG_STDOUT].fd == sock
+ && PHPDBG_G(lines) > 0) {
+ return phpdbg_output_pager(sock, ptr, len);
+ }
return write(sock, ptr, len);
}
-
PHPDBG_API int phpdbg_open_socket(const char *interface, unsigned short port) {
struct addrinfo res;
int fd = phpdbg_create_listenable_socket(interface, port, &res);
@@ -271,7 +305,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
wrote = snprintf(buf, 128, "Could not translate address '%s'", addr);
buf[wrote] = '\0';
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
return sock;
} else {
@@ -281,7 +315,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
wrote = snprintf(buf, 256, "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc)));
buf[wrote] = '\0';
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
return sock;
#ifndef PHP_WIN32
@@ -296,7 +330,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short
wrote = sprintf(buf, "Unable to create socket");
buf[wrote] = '\0';
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf));
return sock;
}
diff --git a/sapi/phpdbg/phpdbg_io.h b/sapi/phpdbg/phpdbg_io.h
index 3e25fc5eeb..8bafc0c999 100644
--- a/sapi/phpdbg/phpdbg_io.h
+++ b/sapi/phpdbg/phpdbg_io.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,6 +21,11 @@
#include "phpdbg.h"
+/* Older versions of glibc <= 2.3.0 and <= OS X 10.5 do not have this constant defined */
+#ifndef AI_NUMERICSERV
+#define AI_NUMERICSERV 0
+#endif
+
PHPDBG_API int phpdbg_consume_stdin_line(char *buf);
PHPDBG_API int phpdbg_consume_bytes(int sock, char *ptr, int len, int tmo);
diff --git a/sapi/phpdbg/phpdbg_lexer.c b/sapi/phpdbg/phpdbg_lexer.c
index d1474dc252..10af103fb0 100644
--- a/sapi/phpdbg/phpdbg_lexer.c
+++ b/sapi/phpdbg/phpdbg_lexer.c
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.13.5 */
-#line 1 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+/* Generated by re2c 0.14.3 */
+#line 1 "sapi/phpdbg/phpdbg_lexer.l"
/*
* phpdbg_lexer.l
*/
@@ -16,6 +16,7 @@
#define YYGETCONDITION() LEX(state)
#define YYCURSOR LEX(cursor)
#define YYMARKER LEX(marker)
+#define YYCTXMARKER LEX(ctxmarker)
#define yyleng LEX(len)
#define yytext ((char*) LEX(text))
#undef YYDEBUG
@@ -27,7 +28,7 @@
#define RAW 2
#define INITIAL 3
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) {
PHPDBG_G(parser_stack) = stack;
@@ -38,13 +39,32 @@ void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) {
LEX(len) = strlen(input);
}
+static int unescape_string(char *s) {
+ switch (*s) {
+ case '\'':
+ case '\"': {
+ char start = *s;
+ size_t off = 1;
+ do {
+ if (s[off] == '\\') {
+ off++;
+ }
+ *s = s[off];
+ } while ((++s)[off] != start);
+ return off + 1;
+ }
+ }
+
+ return 0;
+}
+
int phpdbg_lex (phpdbg_param_t* yylval) {
restart:
LEX(text) = YYCURSOR;
-#line 49 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 68 "sapi/phpdbg/phpdbg_lexer.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -65,1454 +85,1760 @@ restart:
yyc_INITIAL:
{
static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 192, 96, 0, 0, 192, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 192, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 128, 0, 0, 0, 128, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
};
-
- YYDEBUG(0, *YYCURSOR);
+ YYDEBUG(1, *YYCURSOR);
YYFILL(4);
yych = *YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy4;
- }
- if (yych <= 'E') {
+ if (yych <= '#') {
if (yych <= '\f') {
- if (yych <= 0x00) goto yy7;
- if (yych != '\t') goto yy12;
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy9;
+ goto yy14;
+ } else {
+ if (yych <= '\t') goto yy3;
+ if (yych <= '\n') goto yy9;
+ goto yy14;
+ }
} else {
if (yych <= 0x1F) {
- if (yych >= 0x0E) goto yy12;
+ if (yych >= 0x0E) goto yy14;
} else {
- if (yych <= ' ') goto yy2;
- if (yych <= 'D') goto yy12;
+ if (yych <= ' ') goto yy5;
+ if (yych <= '"') goto yy14;
goto yy8;
}
}
} else {
- if (yych <= 'd') {
- if (yych <= 'Q') goto yy12;
- if (yych <= 'R') goto yy11;
- if (yych <= 'S') goto yy9;
- goto yy12;
+ if (yych <= 'S') {
+ if (yych <= 'E') {
+ if (yych <= 'D') goto yy14;
+ goto yy10;
+ } else {
+ if (yych <= 'Q') goto yy14;
+ if (yych <= 'R') goto yy13;
+ goto yy11;
+ }
} else {
if (yych <= 'q') {
- if (yych <= 'e') goto yy8;
- goto yy12;
+ if (yych == 'e') goto yy10;
+ goto yy14;
} else {
- if (yych <= 'r') goto yy10;
- if (yych <= 's') goto yy9;
- goto yy12;
+ if (yych <= 'r') goto yy12;
+ if (yych <= 's') goto yy11;
+ goto yy14;
}
}
}
-yy2:
- YYDEBUG(2, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) <= '\f') {
- if (yych <= 0x00) goto yy29;
- if (yych <= 0x08) goto yy3;
- if (yych <= '\n') goto yy29;
- } else {
- if (yych <= '\r') goto yy29;
- if (yych == ' ') goto yy29;
- }
yy3:
YYDEBUG(3, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 128) {
+ goto yy5;
+ }
+yy4:
+ YYDEBUG(4, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 176 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 206 "sapi/phpdbg/phpdbg_lexer.l"
{
YYSETCONDITION(NORMAL);
YYCURSOR = LEX(text);
goto restart;
}
-#line 161 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy4:
- YYDEBUG(4, *YYCURSOR);
+#line 181 "sapi/phpdbg/phpdbg_lexer.c"
+yy5:
+ YYDEBUG(5, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(5, *YYCURSOR);
+ YYDEBUG(6, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy28;
+ goto yy5;
}
- if (yych <= 0x00) goto yy27;
- if (yych == '\n') goto yy4;
-yy6:
- YYDEBUG(6, *YYCURSOR);
+ YYDEBUG(7, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 69 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 175 "sapi/phpdbg/phpdbg_lexer.l"
{
- return 0;
+ /* ignore whitespace */
+
+ goto restart;
}
-#line 180 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy7:
- YYDEBUG(7, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy3;
+#line 199 "sapi/phpdbg/phpdbg_lexer.c"
yy8:
YYDEBUG(8, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'V') goto yy23;
- if (yych == 'v') goto yy23;
- goto yy3;
+ yych = *++YYCURSOR;
+ goto yy4;
yy9:
YYDEBUG(9, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'H') goto yy19;
- if (yych == 'h') goto yy19;
- goto yy3;
+ yych = *++YYCURSOR;
+ goto yy4;
yy10:
YYDEBUG(10, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy16;
- }
- if (yych == 'U') goto yy13;
- if (yych == 'u') goto yy13;
- goto yy3;
+ if (yych == 'V') goto yy25;
+ if (yych == 'v') goto yy25;
+ goto yy4;
yy11:
YYDEBUG(11, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'U') goto yy13;
- if (yych == 'u') goto yy13;
- goto yy3;
+ if (yych == 'H') goto yy21;
+ if (yych == 'h') goto yy21;
+ goto yy4;
yy12:
YYDEBUG(12, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy3;
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x1F) {
+ if (yych <= '\t') {
+ if (yych <= 0x08) goto yy4;
+ goto yy18;
+ } else {
+ if (yych == '\r') goto yy18;
+ goto yy4;
+ }
+ } else {
+ if (yych <= 'U') {
+ if (yych <= ' ') goto yy18;
+ if (yych <= 'T') goto yy4;
+ goto yy15;
+ } else {
+ if (yych == 'u') goto yy15;
+ goto yy4;
+ }
+ }
yy13:
YYDEBUG(13, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy15;
- if (yych == 'n') goto yy15;
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'U') goto yy15;
+ if (yych == 'u') goto yy15;
+ goto yy4;
yy14:
YYDEBUG(14, *YYCURSOR);
- YYCURSOR = YYMARKER;
- goto yy3;
+ yych = *++YYCURSOR;
+ goto yy4;
yy15:
YYDEBUG(15, *YYCURSOR);
yych = *++YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy16;
- }
- goto yy14;
+ if (yych == 'N') goto yy17;
+ if (yych == 'n') goto yy17;
yy16:
YYDEBUG(16, *YYCURSOR);
+ YYCURSOR = YYMARKER;
+ goto yy4;
+yy17:
+ YYDEBUG(17, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych <= '\f') {
+ if (yych != '\t') goto yy16;
+ } else {
+ if (yych <= '\r') goto yy18;
+ if (yych != ' ') goto yy16;
+ }
+yy18:
+ YYDEBUG(18, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(17, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy16;
+ YYDEBUG(19, *YYCURSOR);
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy18;
+ } else {
+ if (yych <= '\r') goto yy18;
+ if (yych == ' ') goto yy18;
}
- YYDEBUG(18, *YYCURSOR);
+ YYDEBUG(20, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 163 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 193 "sapi/phpdbg/phpdbg_lexer.l"
{
YYSETCONDITION(PRE_RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_RUN;
}
-#line 253 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy19:
- YYDEBUG(19, *YYCURSOR);
+#line 293 "sapi/phpdbg/phpdbg_lexer.c"
+yy21:
+ YYDEBUG(21, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '\f') {
- if (yych <= 0x08) goto yy14;
- if (yych >= '\v') goto yy14;
+ if (yych != '\t') goto yy16;
} else {
- if (yych <= '\r') goto yy20;
- if (yych != ' ') goto yy14;
+ if (yych <= '\r') goto yy22;
+ if (yych != ' ') goto yy16;
}
-yy20:
- YYDEBUG(20, *YYCURSOR);
+yy22:
+ YYDEBUG(22, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(21, *YYCURSOR);
+ YYDEBUG(23, *YYCURSOR);
if (yych <= '\f') {
- if (yych <= 0x08) goto yy22;
- if (yych <= '\n') goto yy20;
+ if (yych == '\t') goto yy22;
} else {
- if (yych <= '\r') goto yy20;
- if (yych == ' ') goto yy20;
+ if (yych <= '\r') goto yy22;
+ if (yych == ' ') goto yy22;
}
-yy22:
- YYDEBUG(22, *YYCURSOR);
+ YYDEBUG(24, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 158 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 187 "sapi/phpdbg/phpdbg_lexer.l"
{
YYSETCONDITION(PRE_RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_SHELL;
}
-#line 286 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy23:
- YYDEBUG(23, *YYCURSOR);
+#line 323 "sapi/phpdbg/phpdbg_lexer.c"
+yy25:
+ YYDEBUG(25, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '\f') {
- if (yych <= 0x08) goto yy14;
- if (yych >= '\v') goto yy14;
+ if (yych != '\t') goto yy16;
} else {
- if (yych <= '\r') goto yy24;
- if (yych != ' ') goto yy14;
+ if (yych <= '\r') goto yy26;
+ if (yych != ' ') goto yy16;
}
-yy24:
- YYDEBUG(24, *YYCURSOR);
+yy26:
+ YYDEBUG(26, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(25, *YYCURSOR);
+ YYDEBUG(27, *YYCURSOR);
if (yych <= '\f') {
- if (yych <= 0x08) goto yy26;
- if (yych <= '\n') goto yy24;
+ if (yych == '\t') goto yy26;
} else {
- if (yych <= '\r') goto yy24;
- if (yych == ' ') goto yy24;
+ if (yych <= '\r') goto yy26;
+ if (yych == ' ') goto yy26;
}
-yy26:
- YYDEBUG(26, *YYCURSOR);
+ YYDEBUG(28, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 153 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 181 "sapi/phpdbg/phpdbg_lexer.l"
{
YYSETCONDITION(PRE_RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_EVAL;
}
-#line 319 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy27:
- YYDEBUG(27, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy6;
-yy28:
- YYDEBUG(28, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
-yy29:
- YYDEBUG(29, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy28;
- }
- if (yych <= 0x00) goto yy27;
- if (yych == '\n') goto yy4;
- YYDEBUG(30, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 147 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
- {
- /* ignore whitespace */
-
- goto restart;
-}
-#line 344 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 353 "sapi/phpdbg/phpdbg_lexer.c"
}
/* *********************************** */
yyc_NORMAL:
{
static const unsigned char yybm[] = {
- 0, 8, 8, 8, 8, 8, 8, 8,
- 8, 66, 68, 8, 8, 66, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 66, 8, 8, 0, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 24, 8,
- 152, 152, 152, 152, 152, 152, 152, 152,
- 152, 152, 0, 8, 8, 8, 8, 8,
- 8, 168, 168, 168, 168, 168, 168, 40,
- 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 8, 8, 8, 8, 8,
- 8, 168, 168, 168, 168, 168, 168, 40,
- 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
+ /* table 1 .. 8: 0 */
+ 0, 242, 242, 242, 242, 242, 242, 242,
+ 242, 160, 0, 242, 242, 160, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 160, 242, 50, 160, 242, 242, 242, 194,
+ 242, 242, 242, 242, 242, 242, 243, 242,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 160, 242, 242, 242, 242, 242,
+ 242, 254, 254, 254, 254, 254, 254, 246,
+ 246, 246, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 242, 2, 242, 242, 242,
+ 242, 254, 254, 254, 254, 254, 254, 246,
+ 246, 246, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ /* table 9 .. 10: 256 */
+ 0, 128, 128, 128, 128, 128, 128, 128,
+ 128, 64, 0, 128, 128, 64, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 64, 128, 0, 0, 128, 128, 128, 0,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 0, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
};
- YYDEBUG(31, *YYCURSOR);
+ YYDEBUG(29, *YYCURSOR);
YYFILL(11);
yych = *YYCURSOR;
- if (yybm[0+yych] & 2) {
- goto yy33;
+ if (yybm[256+yych] & 64) {
+ goto yy31;
}
- if (yych <= 'N') {
- if (yych <= '0') {
- if (yych <= '#') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy39;
- goto yy43;
- } else {
- if (yych <= '\n') goto yy36;
- if (yych <= '"') goto yy43;
- goto yy58;
- }
- } else {
- if (yych <= '-') {
- if (yych <= ',') goto yy43;
- goto yy40;
- } else {
- if (yych <= '.') goto yy45;
- if (yych <= '/') goto yy43;
- goto yy48;
- }
- }
- } else {
- if (yych <= 'E') {
- if (yych <= ':') {
- if (yych <= '9') goto yy45;
- goto yy60;
- } else {
- if (yych <= 'C') goto yy43;
- if (yych <= 'D') goto yy49;
- goto yy50;
- }
- } else {
- if (yych <= 'H') {
- if (yych <= 'F') goto yy51;
- goto yy43;
- } else {
- if (yych <= 'I') goto yy42;
- if (yych <= 'M') goto yy43;
- goto yy52;
- }
- }
- }
- } else {
- if (yych <= 'f') {
- if (yych <= 'Y') {
- if (yych <= 'S') {
- if (yych <= 'O') goto yy53;
- goto yy43;
- } else {
- if (yych <= 'T') goto yy54;
- if (yych <= 'X') goto yy43;
- goto yy55;
- }
- } else {
- if (yych <= 'c') {
- if (yych <= 'Z') goto yy56;
- goto yy43;
- } else {
- if (yych <= 'd') goto yy49;
- if (yych <= 'e') goto yy50;
- goto yy51;
- }
- }
- } else {
- if (yych <= 'o') {
- if (yych <= 'i') {
- if (yych <= 'h') goto yy43;
- goto yy42;
- } else {
- if (yych <= 'm') goto yy43;
- if (yych <= 'n') goto yy52;
- goto yy53;
- }
- } else {
- if (yych <= 'x') {
- if (yych == 't') goto yy54;
- goto yy43;
- } else {
- if (yych <= 'y') goto yy55;
- if (yych <= 'z') goto yy57;
- goto yy43;
- }
- }
- }
+ YYDEBUG(-1, yych);
+ switch (yych) {
+ case 0x00:
+ case '\t':
+ case '\n': goto yy36;
+ case '"': goto yy44;
+ case '#': goto yy34;
+ case '\'': goto yy46;
+ case '-': goto yy38;
+ case '.':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy47;
+ case '0': goto yy50;
+ case ':': goto yy41;
+ case 'D':
+ case 'd': goto yy51;
+ case 'E':
+ case 'e': goto yy52;
+ case 'F':
+ case 'f': goto yy53;
+ case 'I':
+ case 'i': goto yy40;
+ case 'N':
+ case 'n': goto yy54;
+ case 'O':
+ case 'o': goto yy55;
+ case 'T':
+ case 't': goto yy56;
+ case 'Y':
+ case 'y': goto yy57;
+ case 'Z': goto yy58;
+ case 'z': goto yy59;
+ default: goto yy42;
}
-yy33:
- YYDEBUG(33, *YYCURSOR);
+yy31:
+ YYDEBUG(31, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(34, *YYCURSOR);
- if (yybm[0+yych] & 2) {
- goto yy33;
+ YYDEBUG(32, *YYCURSOR);
+ if (yybm[256+yych] & 64) {
+ goto yy31;
}
- if (yych <= 0x00) goto yy39;
- if (yych == '\n') goto yy36;
- YYDEBUG(35, *YYCURSOR);
+ YYDEBUG(33, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 147 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 175 "sapi/phpdbg/phpdbg_lexer.l"
{
/* ignore whitespace */
goto restart;
}
-#line 493 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 490 "sapi/phpdbg/phpdbg_lexer.c"
+yy34:
+ YYDEBUG(34, *YYCURSOR);
+ YYCTXMARKER = YYCURSOR + 1;
+ yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '.') {
+ if (yych <= ',') goto yy35;
+ if (yych <= '-') goto yy146;
+ goto yy147;
+ } else {
+ if (yych <= '/') goto yy35;
+ if (yych <= '9') goto yy147;
+ }
+yy35:
+ YYDEBUG(35, *YYCURSOR);
+ yyleng = (size_t) YYCURSOR - (size_t) yytext;
+#line 110 "sapi/phpdbg/phpdbg_lexer.l"
+ {
+ YYSETCONDITION(INITIAL);
+ return T_SEPARATOR;
+}
+#line 512 "sapi/phpdbg/phpdbg_lexer.c"
yy36:
YYDEBUG(36, *YYCURSOR);
++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
YYDEBUG(37, *YYCURSOR);
- if (yybm[0+yych] & 2) {
- goto yy33;
- }
- if (yych <= 0x00) goto yy39;
- if (yych == '\n') goto yy36;
-yy38:
- YYDEBUG(38, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 69 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 89 "sapi/phpdbg/phpdbg_lexer.l"
{
return 0;
}
-#line 512 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy39:
- YYDEBUG(39, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy38;
-yy40:
- YYDEBUG(40, *YYCURSOR);
- yyaccept = 0;
+#line 522 "sapi/phpdbg/phpdbg_lexer.c"
+yy38:
+ YYDEBUG(38, *YYCURSOR);
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 16) {
- goto yy45;
+ if (yybm[0+yych] & 1) {
+ goto yy47;
}
- if (yych == 'r') goto yy113;
- goto yy44;
-yy41:
- YYDEBUG(41, *YYCURSOR);
+ if (yych == 'r') goto yy136;
+ goto yy43;
+yy39:
+ YYDEBUG(39, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 133 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 161 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
yylval->len = yyleng;
return T_ID;
}
-#line 536 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 542 "sapi/phpdbg/phpdbg_lexer.c"
+yy40:
+ YYDEBUG(40, *YYCURSOR);
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'F') goto yy132;
+ if (yych == 'f') goto yy132;
+ goto yy43;
+yy41:
+ YYDEBUG(41, *YYCURSOR);
+ YYCTXMARKER = YYCURSOR + 1;
+ yych = *++YYCURSOR;
+ if (yych == ':') goto yy130;
+ if (yych == '\\') goto yy68;
+ goto yy128;
yy42:
YYDEBUG(42, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'F') goto yy109;
- if (yych == 'f') goto yy109;
- goto yy44;
-yy43:
- YYDEBUG(43, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
+yy43:
+ YYDEBUG(43, *YYCURSOR);
+ if (yybm[256+yych] & 128) {
+ goto yy42;
+ }
+ if (yych <= ' ') goto yy39;
+ if (yych == '#') goto yy39;
+ if (yych <= '\'') goto yy62;
+ goto yy61;
yy44:
YYDEBUG(44, *YYCURSOR);
- if (yybm[0+yych] & 8) {
- goto yy43;
- }
- if (yych <= '9') goto yy41;
- goto yy65;
+ yych = *++YYCURSOR;
+ if (yych == '"') goto yy62;
+ goto yy120;
yy45:
YYDEBUG(45, *YYCURSOR);
- yyaccept = 1;
+ YYCURSOR = YYMARKER;
+ if (yyaccept <= 3) {
+ if (yyaccept <= 1) {
+ if (yyaccept == 0) {
+ goto yy35;
+ } else {
+ goto yy39;
+ }
+ } else {
+ if (yyaccept == 2) {
+ goto yy49;
+ } else {
+ goto yy76;
+ }
+ }
+ } else {
+ if (yyaccept <= 5) {
+ if (yyaccept == 4) {
+ goto yy107;
+ } else {
+ goto yy67;
+ }
+ } else {
+ goto yy142;
+ }
+ }
+yy46:
+ YYDEBUG(46, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '\'') goto yy62;
+ goto yy109;
+yy47:
+ YYDEBUG(47, *YYCURSOR);
+ yyaccept = 2;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(46, *YYCURSOR);
- if (yybm[0+yych] & 16) {
- goto yy45;
+ YYDEBUG(48, *YYCURSOR);
+ if (yybm[0+yych] & 1) {
+ goto yy47;
}
- if (yych <= 0x1F) {
+ if (yych <= ' ') {
if (yych <= '\n') {
- if (yych <= 0x00) goto yy47;
- if (yych <= 0x08) goto yy43;
+ if (yych <= 0x00) goto yy49;
+ if (yych <= 0x08) goto yy42;
} else {
- if (yych != '\r') goto yy43;
+ if (yych == '\r') goto yy49;
+ if (yych <= 0x1F) goto yy42;
}
} else {
- if (yych <= '#') {
- if (yych <= ' ') goto yy47;
- if (yych <= '"') goto yy43;
+ if (yych <= '&') {
+ if (yych <= '!') goto yy42;
+ if (yych <= '"') goto yy62;
+ if (yych >= '$') goto yy42;
} else {
- if (yych == ':') goto yy65;
- goto yy43;
+ if (yych <= '\'') goto yy62;
+ if (yych <= '/') goto yy42;
+ if (yych <= ':') goto yy61;
+ goto yy42;
}
}
-yy47:
- YYDEBUG(47, *YYCURSOR);
+yy49:
+ YYDEBUG(49, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 114 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 142 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = atoi(yytext);
return T_DIGITS;
}
-#line 592 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy48:
- YYDEBUG(48, *YYCURSOR);
- yyaccept = 1;
+#line 649 "sapi/phpdbg/phpdbg_lexer.c"
+yy50:
+ YYDEBUG(50, *YYCURSOR);
+ yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 16) {
- goto yy45;
+ if (yybm[0+yych] & 1) {
+ goto yy47;
}
if (yych <= 0x1F) {
if (yych <= '\n') {
- if (yych <= 0x00) goto yy47;
- if (yych <= 0x08) goto yy44;
- goto yy47;
+ if (yych <= 0x00) goto yy49;
+ if (yych <= 0x08) goto yy43;
+ goto yy49;
} else {
- if (yych == '\r') goto yy47;
- goto yy44;
+ if (yych == '\r') goto yy49;
+ goto yy43;
}
} else {
if (yych <= '#') {
- if (yych <= ' ') goto yy47;
- if (yych <= '"') goto yy44;
- goto yy47;
+ if (yych <= ' ') goto yy49;
+ if (yych <= '"') goto yy43;
+ goto yy49;
} else {
- if (yych == 'x') goto yy105;
- goto yy44;
+ if (yych == 'x') goto yy104;
+ goto yy43;
}
}
-yy49:
- YYDEBUG(49, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'I') goto yy99;
- if (yych == 'i') goto yy99;
- goto yy44;
-yy50:
- YYDEBUG(50, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'N') goto yy94;
- if (yych == 'n') goto yy94;
- goto yy44;
yy51:
YYDEBUG(51, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'A') goto yy91;
- if (yych == 'a') goto yy91;
- goto yy44;
+ if (yych == 'I') goto yy98;
+ if (yych == 'i') goto yy98;
+ goto yy43;
yy52:
YYDEBUG(52, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'O') goto yy87;
- if (yych == 'o') goto yy87;
- goto yy44;
+ if (yych == 'N') goto yy93;
+ if (yych == 'n') goto yy93;
+ goto yy43;
yy53:
YYDEBUG(53, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'A') goto yy90;
+ if (yych == 'a') goto yy90;
+ goto yy43;
+yy54:
+ YYDEBUG(54, *YYCURSOR);
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'O') goto yy87;
+ if (yych == 'o') goto yy87;
+ goto yy43;
+yy55:
+ YYDEBUG(55, *YYCURSOR);
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'N') {
if (yych == 'F') goto yy86;
- if (yych <= 'M') goto yy44;
- goto yy80;
+ if (yych <= 'M') goto yy43;
+ goto yy81;
} else {
if (yych <= 'f') {
- if (yych <= 'e') goto yy44;
+ if (yych <= 'e') goto yy43;
goto yy86;
} else {
- if (yych == 'n') goto yy80;
- goto yy44;
+ if (yych == 'n') goto yy81;
+ goto yy43;
}
}
-yy54:
- YYDEBUG(54, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'R') goto yy84;
- if (yych == 'r') goto yy84;
- goto yy44;
-yy55:
- YYDEBUG(55, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy79;
- if (yych == 'e') goto yy79;
- goto yy44;
yy56:
YYDEBUG(56, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy76;
- goto yy44;
+ if (yych == 'R') goto yy84;
+ if (yych == 'r') goto yy84;
+ goto yy43;
yy57:
YYDEBUG(57, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'e') goto yy64;
- goto yy44;
+ if (yych == 'E') goto yy80;
+ if (yych == 'e') goto yy80;
+ goto yy43;
yy58:
YYDEBUG(58, *YYCURSOR);
- ++YYCURSOR;
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'E') goto yy77;
+ goto yy43;
+yy59:
YYDEBUG(59, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 92 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
- {
- return T_POUND;
-}
-#line 699 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy60:
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych != 'e') goto yy43;
YYDEBUG(60, *YYCURSOR);
- ++YYCURSOR;
- if ((yych = *YYCURSOR) == ':') goto yy62;
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'n') goto yy71;
+ goto yy43;
+yy61:
YYDEBUG(61, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 98 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
- {
- return T_COLON;
-}
-#line 710 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy65;
+ if (yych == '\\') goto yy68;
+ goto yy45;
yy62:
YYDEBUG(62, *YYCURSOR);
++YYCURSOR;
+ YYFILL(3);
+ yych = *YYCURSOR;
+yy63:
YYDEBUG(63, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 95 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
- {
- return T_DCOLON;
-}
-#line 720 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+ if (yybm[0+yych] & 2) {
+ goto yy62;
+ }
+ if (yych <= '#') goto yy45;
yy64:
YYDEBUG(64, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'n') goto yy70;
- goto yy44;
+ yych = *++YYCURSOR;
+ if (yych != '/') goto yy45;
yy65:
YYDEBUG(65, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '/') goto yy67;
-yy66:
+ if (yych != '/') goto yy45;
YYDEBUG(66, *YYCURSOR);
- YYCURSOR = YYMARKER;
- if (yyaccept <= 2) {
- if (yyaccept <= 1) {
- if (yyaccept <= 0) {
- goto yy41;
- } else {
- goto yy47;
- }
- } else {
- goto yy75;
- }
- } else {
- if (yyaccept <= 3) {
- goto yy108;
- } else {
- goto yy119;
- }
- }
+ ++YYCURSOR;
yy67:
YYDEBUG(67, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych != '/') goto yy66;
- YYDEBUG(68, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(69, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 86 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 123 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng);
yylval->len = yyleng;
return T_PROTO;
}
-#line 766 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy70:
+#line 788 "sapi/phpdbg/phpdbg_lexer.c"
+yy68:
+ YYDEBUG(68, *YYCURSOR);
+ yyaccept = 1;
+ YYMARKER = ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(69, *YYCURSOR);
+ if (yych <= ' ') {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy39;
+ if (yych <= 0x08) goto yy68;
+ goto yy39;
+ } else {
+ if (yych == '\r') goto yy39;
+ if (yych <= 0x1F) goto yy68;
+ goto yy39;
+ }
+ } else {
+ if (yych <= '&') {
+ if (yych <= '!') goto yy68;
+ if (yych <= '#') goto yy39;
+ goto yy68;
+ } else {
+ if (yych <= '\'') goto yy39;
+ if (yych != ':') goto yy68;
+ }
+ }
YYDEBUG(70, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych != 'd') goto yy44;
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ if (yych == '\\') goto yy68;
+ goto yy45;
+yy71:
YYDEBUG(71, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych != '_') goto yy44;
-yy72:
+ if (yych != 'd') goto yy43;
YYDEBUG(72, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy73;
- }
- goto yy44;
+ if (yych != '_') goto yy43;
yy73:
YYDEBUG(73, *YYCURSOR);
- yyaccept = 2;
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yybm[0+yych] & 4) {
+ goto yy74;
+ }
+ goto yy43;
+yy74:
+ YYDEBUG(74, *YYCURSOR);
+ yyaccept = 3;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(74, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy73;
+ YYDEBUG(75, *YYCURSOR);
+ if (yybm[0+yych] & 4) {
+ goto yy74;
}
- if (yych <= 0x1F) {
+ if (yych <= ' ') {
if (yych <= '\n') {
- if (yych <= 0x00) goto yy75;
- if (yych <= 0x08) goto yy43;
+ if (yych <= 0x00) goto yy76;
+ if (yych <= 0x08) goto yy42;
} else {
- if (yych != '\r') goto yy43;
+ if (yych == '\r') goto yy76;
+ if (yych <= 0x1F) goto yy42;
}
} else {
- if (yych <= '#') {
- if (yych <= ' ') goto yy75;
- if (yych <= '"') goto yy43;
+ if (yych <= '&') {
+ if (yych <= '!') goto yy42;
+ if (yych <= '"') goto yy62;
+ if (yych >= '$') goto yy42;
} else {
- if (yych == ':') goto yy65;
- goto yy43;
+ if (yych <= '\'') goto yy62;
+ if (yych == ':') goto yy61;
+ goto yy42;
}
}
-yy75:
- YYDEBUG(75, *YYCURSOR);
+yy76:
+ YYDEBUG(76, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 126 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 154 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, OP_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng);
yylval->len = yyleng;
return T_OPCODE;
}
-#line 820 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy76:
- YYDEBUG(76, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych != 'N') goto yy44;
+#line 878 "sapi/phpdbg/phpdbg_lexer.c"
+yy77:
YYDEBUG(77, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych != 'D') goto yy44;
+ if (yych != 'N') goto yy43;
YYDEBUG(78, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '_') goto yy72;
- goto yy44;
-yy79:
+ if (yych != 'D') goto yy43;
YYDEBUG(79, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'S') goto yy80;
- if (yych != 's') goto yy44;
+ if (yych == '_') goto yy73;
+ goto yy43;
yy80:
YYDEBUG(80, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy81;
- }
- goto yy44;
+ if (yych == 'S') goto yy81;
+ if (yych != 's') goto yy43;
yy81:
YYDEBUG(81, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(82, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy81;
+ YYCTXMARKER = YYCURSOR + 1;
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy82;
+ if (yych <= 0x08) goto yy43;
+ if (yych >= '\v') goto yy43;
+ } else {
+ if (yych <= '\r') goto yy82;
+ if (yych != ' ') goto yy43;
}
+yy82:
+ YYDEBUG(82, *YYCURSOR);
+ ++YYCURSOR;
YYDEBUG(83, *YYCURSOR);
+ YYCURSOR = YYCTXMARKER;
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 102 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 130 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 1;
return T_TRUTHY;
}
-#line 866 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 924 "sapi/phpdbg/phpdbg_lexer.c"
yy84:
YYDEBUG(84, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych == 'U') goto yy85;
- if (yych != 'u') goto yy44;
+ if (yych != 'u') goto yy43;
yy85:
YYDEBUG(85, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy80;
- if (yych == 'e') goto yy80;
- goto yy44;
+ if (yych == 'E') goto yy81;
+ if (yych == 'e') goto yy81;
+ goto yy43;
yy86:
YYDEBUG(86, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych == 'F') goto yy87;
- if (yych != 'f') goto yy44;
+ if (yych != 'f') goto yy43;
yy87:
YYDEBUG(87, *YYCURSOR);
- yyaccept = 0;
+ YYCTXMARKER = YYCURSOR + 1;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '\f') {
- if (yych <= 0x08) goto yy44;
- if (yych >= '\v') goto yy44;
+ if (yych <= 0x00) goto yy88;
+ if (yych <= 0x08) goto yy43;
+ if (yych >= '\v') goto yy43;
} else {
if (yych <= '\r') goto yy88;
- if (yych != ' ') goto yy44;
+ if (yych != ' ') goto yy43;
}
yy88:
YYDEBUG(88, *YYCURSOR);
++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
YYDEBUG(89, *YYCURSOR);
- if (yych <= '\f') {
- if (yych <= 0x08) goto yy90;
- if (yych <= '\n') goto yy88;
- } else {
- if (yych <= '\r') goto yy88;
- if (yych == ' ') goto yy88;
- }
-yy90:
- YYDEBUG(90, *YYCURSOR);
+ YYCURSOR = YYCTXMARKER;
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 108 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 136 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 0;
return T_FALSY;
}
-#line 919 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 969 "sapi/phpdbg/phpdbg_lexer.c"
+yy90:
+ YYDEBUG(90, *YYCURSOR);
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych == 'L') goto yy91;
+ if (yych != 'l') goto yy43;
yy91:
YYDEBUG(91, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'L') goto yy92;
- if (yych != 'l') goto yy44;
+ if (yych == 'S') goto yy92;
+ if (yych != 's') goto yy43;
yy92:
YYDEBUG(92, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'S') goto yy93;
- if (yych != 's') goto yy44;
+ if (yych == 'E') goto yy87;
+ if (yych == 'e') goto yy87;
+ goto yy43;
yy93:
YYDEBUG(93, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy87;
- if (yych == 'e') goto yy87;
- goto yy44;
+ if (yych == 'A') goto yy94;
+ if (yych != 'a') goto yy43;
yy94:
YYDEBUG(94, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'A') goto yy95;
- if (yych != 'a') goto yy44;
+ if (yych == 'B') goto yy95;
+ if (yych != 'b') goto yy43;
yy95:
YYDEBUG(95, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'B') goto yy96;
- if (yych != 'b') goto yy44;
+ if (yych == 'L') goto yy96;
+ if (yych != 'l') goto yy43;
yy96:
YYDEBUG(96, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'L') goto yy97;
- if (yych != 'l') goto yy44;
+ if (yych == 'E') goto yy97;
+ if (yych != 'e') goto yy43;
yy97:
YYDEBUG(97, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy98;
- if (yych != 'e') goto yy44;
+ if (yych == 'D') goto yy81;
+ if (yych == 'd') goto yy81;
+ goto yy43;
yy98:
YYDEBUG(98, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'D') goto yy80;
- if (yych == 'd') goto yy80;
- goto yy44;
+ if (yych == 'S') goto yy99;
+ if (yych != 's') goto yy43;
yy99:
YYDEBUG(99, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'S') goto yy100;
- if (yych != 's') goto yy44;
+ if (yych == 'A') goto yy100;
+ if (yych != 'a') goto yy43;
yy100:
YYDEBUG(100, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'A') goto yy101;
- if (yych != 'a') goto yy44;
+ if (yych == 'B') goto yy101;
+ if (yych != 'b') goto yy43;
yy101:
YYDEBUG(101, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'B') goto yy102;
- if (yych != 'b') goto yy44;
+ if (yych == 'L') goto yy102;
+ if (yych != 'l') goto yy43;
yy102:
YYDEBUG(102, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'L') goto yy103;
- if (yych != 'l') goto yy44;
+ if (yych == 'E') goto yy103;
+ if (yych != 'e') goto yy43;
yy103:
YYDEBUG(103, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy104;
- if (yych != 'e') goto yy44;
+ if (yych == 'D') goto yy87;
+ if (yych == 'd') goto yy87;
+ goto yy43;
yy104:
YYDEBUG(104, *YYCURSOR);
- yyaccept = 0;
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'D') goto yy87;
- if (yych == 'd') goto yy87;
- goto yy44;
+ if (yybm[0+yych] & 8) {
+ goto yy105;
+ }
+ goto yy43;
yy105:
YYDEBUG(105, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy106;
- }
- goto yy44;
-yy106:
- YYDEBUG(106, *YYCURSOR);
- yyaccept = 3;
+ yyaccept = 4;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(107, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy106;
+ YYDEBUG(106, *YYCURSOR);
+ if (yybm[0+yych] & 8) {
+ goto yy105;
}
- if (yych <= 0x1F) {
+ if (yych <= ' ') {
if (yych <= '\n') {
- if (yych <= 0x00) goto yy108;
- if (yych <= 0x08) goto yy43;
+ if (yych <= 0x00) goto yy107;
+ if (yych <= 0x08) goto yy42;
} else {
- if (yych != '\r') goto yy43;
+ if (yych == '\r') goto yy107;
+ if (yych <= 0x1F) goto yy42;
}
} else {
- if (yych <= '#') {
- if (yych <= ' ') goto yy108;
- if (yych <= '"') goto yy43;
+ if (yych <= '&') {
+ if (yych <= '!') goto yy42;
+ if (yych <= '"') goto yy62;
+ if (yych >= '$') goto yy42;
} else {
- if (yych == ':') goto yy65;
- goto yy43;
+ if (yych <= '\'') goto yy62;
+ if (yych <= '/') goto yy42;
+ if (yych <= ':') goto yy61;
+ goto yy42;
}
}
-yy108:
- YYDEBUG(108, *YYCURSOR);
+yy107:
+ YYDEBUG(107, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 120 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 148 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, ADDR_PARAM);
yylval->addr = strtoul(yytext, 0, 16);
return T_ADDR;
}
-#line 1050 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 1104 "sapi/phpdbg/phpdbg_lexer.c"
+yy108:
+ YYDEBUG(108, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(4);
+ yych = *YYCURSOR;
yy109:
YYDEBUG(109, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\f') {
- if (yych <= 0x08) goto yy44;
- if (yych >= '\v') goto yy44;
+ if (yybm[0+yych] & 16) {
+ goto yy108;
+ }
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy45;
+ if (yych >= '\n') goto yy45;
} else {
- if (yych <= '\r') goto yy110;
- if (yych != ' ') goto yy44;
+ if (yych <= '#') goto yy110;
+ if (yych <= '\'') goto yy118;
+ if (yych <= ':') goto yy112;
+ goto yy113;
}
yy110:
YYDEBUG(110, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
+yy111:
YYDEBUG(111, *YYCURSOR);
- if (yych <= '\f') {
- if (yych <= 0x08) goto yy112;
- if (yych <= '\n') goto yy110;
- } else {
- if (yych <= '\r') goto yy110;
- if (yych == ' ') goto yy110;
+ if (yybm[0+yych] & 32) {
+ goto yy110;
}
+ if (yych <= '\n') goto yy45;
+ if (yych <= '\'') goto yy115;
+ goto yy116;
yy112:
YYDEBUG(112, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy114;
+ goto yy111;
+yy113:
+ YYDEBUG(113, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(3);
+ yych = *YYCURSOR;
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy45;
+ if (yych <= 0x08) goto yy62;
+ if (yych <= '\n') goto yy45;
+ goto yy62;
+ } else {
+ if (yych <= '\r') goto yy45;
+ if (yych == ' ') goto yy45;
+ goto yy62;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= '#') goto yy45;
+ if (yych == '\'') goto yy108;
+ goto yy62;
+ } else {
+ if (yych <= ':') goto yy64;
+ if (yych == '\\') goto yy108;
+ goto yy62;
+ }
+ }
+yy114:
+ YYDEBUG(114, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy117;
+ goto yy111;
+yy115:
+ YYDEBUG(115, *YYCURSOR);
+ yych = *++YYCURSOR;
+ goto yy39;
+yy116:
+ YYDEBUG(116, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ if (yych == '\'') goto yy110;
+ if (yych == '\\') goto yy110;
+ goto yy45;
+yy117:
+ YYDEBUG(117, *YYCURSOR);
+ yyaccept = 5;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x00) goto yy67;
+ if (yych == '\n') goto yy67;
+ goto yy111;
+yy118:
+ YYDEBUG(118, *YYCURSOR);
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\r') {
+ if (yych <= 0x08) {
+ if (yych <= 0x00) goto yy39;
+ goto yy63;
+ } else {
+ if (yych <= '\n') goto yy39;
+ if (yych <= '\f') goto yy63;
+ goto yy39;
+ }
+ } else {
+ if (yych <= ' ') {
+ if (yych <= 0x1F) goto yy63;
+ goto yy39;
+ } else {
+ if (yych == '#') goto yy39;
+ goto yy63;
+ }
+ }
+yy119:
+ YYDEBUG(119, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(4);
+ yych = *YYCURSOR;
+yy120:
+ YYDEBUG(120, *YYCURSOR);
+ if (yybm[0+yych] & 64) {
+ goto yy119;
+ }
+ if (yych <= ' ') {
+ if (yych <= 0x00) goto yy45;
+ if (yych == '\n') goto yy45;
+ } else {
+ if (yych <= '"') goto yy118;
+ if (yych <= '#') goto yy121;
+ if (yych <= ':') goto yy123;
+ goto yy124;
+ }
+yy121:
+ YYDEBUG(121, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+yy122:
+ YYDEBUG(122, *YYCURSOR);
+ if (yybm[0+yych] & 128) {
+ goto yy121;
+ }
+ if (yych <= '\n') goto yy45;
+ if (yych <= '"') goto yy115;
+ goto yy126;
+yy123:
+ YYDEBUG(123, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy125;
+ goto yy122;
+yy124:
+ YYDEBUG(124, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(3);
+ yych = *YYCURSOR;
+ if (yych <= ' ') {
+ if (yych <= '\n') {
+ if (yych <= 0x00) goto yy45;
+ if (yych <= 0x08) goto yy62;
+ goto yy45;
+ } else {
+ if (yych == '\r') goto yy45;
+ if (yych <= 0x1F) goto yy62;
+ goto yy45;
+ }
+ } else {
+ if (yych <= '9') {
+ if (yych <= '!') goto yy62;
+ if (yych <= '"') goto yy119;
+ if (yych <= '#') goto yy45;
+ goto yy62;
+ } else {
+ if (yych <= ':') goto yy64;
+ if (yych == '\\') goto yy119;
+ goto yy62;
+ }
+ }
+yy125:
+ YYDEBUG(125, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '/') goto yy127;
+ goto yy122;
+yy126:
+ YYDEBUG(126, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ if (yych == '"') goto yy121;
+ if (yych == '\\') goto yy121;
+ goto yy45;
+yy127:
+ YYDEBUG(127, *YYCURSOR);
+ yyaccept = 5;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= 0x00) goto yy67;
+ if (yych == '\n') goto yy67;
+ goto yy122;
+yy128:
+ YYDEBUG(128, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(129, *YYCURSOR);
+ YYCURSOR = YYCTXMARKER;
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 80 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 119 "sapi/phpdbg/phpdbg_lexer.l"
+ {
+ return T_COLON;
+}
+#line 1309 "sapi/phpdbg/phpdbg_lexer.c"
+yy130:
+ YYDEBUG(130, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(131, *YYCURSOR);
+ yyleng = (size_t) YYCURSOR - (size_t) yytext;
+#line 115 "sapi/phpdbg/phpdbg_lexer.l"
+ {
+ return T_DCOLON;
+}
+#line 1319 "sapi/phpdbg/phpdbg_lexer.c"
+yy132:
+ YYDEBUG(132, *YYCURSOR);
+ yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ if (yych <= '\f') {
+ if (yych != '\t') goto yy43;
+ } else {
+ if (yych <= '\r') goto yy133;
+ if (yych != ' ') goto yy43;
+ }
+yy133:
+ YYDEBUG(133, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(134, *YYCURSOR);
+ if (yych <= '\f') {
+ if (yych == '\t') goto yy133;
+ } else {
+ if (yych <= '\r') goto yy133;
+ if (yych == ' ') goto yy133;
+ }
+ YYDEBUG(135, *YYCURSOR);
+ yyleng = (size_t) YYCURSOR - (size_t) yytext;
+#line 100 "sapi/phpdbg/phpdbg_lexer.l"
{
YYSETCONDITION(RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_IF;
}
-#line 1084 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy113:
- YYDEBUG(113, *YYCURSOR);
- yyaccept = 0;
+#line 1350 "sapi/phpdbg/phpdbg_lexer.c"
+yy136:
+ YYDEBUG(136, *YYCURSOR);
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych <= 0x08) goto yy44;
- if (yych >= '\v') goto yy44;
+ if (yych != '\t') goto yy43;
} else {
- if (yych <= '\r') goto yy114;
- if (yych <= 0x1F) goto yy44;
+ if (yych <= '\r') goto yy137;
+ if (yych <= 0x1F) goto yy43;
}
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy44;
- if (yych <= '-') goto yy116;
- goto yy117;
+ if (yych <= ',') goto yy43;
+ if (yych <= '-') goto yy139;
+ goto yy140;
} else {
- if (yych <= '/') goto yy44;
- if (yych <= '9') goto yy117;
- goto yy44;
+ if (yych <= '/') goto yy43;
+ if (yych <= '9') goto yy140;
+ goto yy43;
}
}
-yy114:
- YYDEBUG(114, *YYCURSOR);
+yy137:
+ YYDEBUG(137, *YYCURSOR);
++YYCURSOR;
YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(115, *YYCURSOR);
+ YYDEBUG(138, *YYCURSOR);
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych <= 0x08) goto yy66;
- if (yych <= '\n') goto yy114;
- goto yy66;
+ if (yych == '\t') goto yy137;
+ goto yy45;
} else {
- if (yych <= '\r') goto yy114;
- if (yych <= 0x1F) goto yy66;
- goto yy114;
+ if (yych <= '\r') goto yy137;
+ if (yych <= 0x1F) goto yy45;
+ goto yy137;
}
} else {
if (yych <= '.') {
- if (yych <= ',') goto yy66;
- if (yych <= '-') goto yy120;
- goto yy121;
+ if (yych <= ',') goto yy45;
+ if (yych <= '-') goto yy143;
+ goto yy144;
} else {
- if (yych <= '/') goto yy66;
- if (yych <= '9') goto yy121;
- goto yy66;
+ if (yych <= '/') goto yy45;
+ if (yych <= '9') goto yy144;
+ goto yy45;
}
}
-yy116:
- YYDEBUG(116, *YYCURSOR);
- yyaccept = 0;
+yy139:
+ YYDEBUG(139, *YYCURSOR);
+ yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy117;
- if (yych <= '/') goto yy44;
- if (yych >= ':') goto yy44;
-yy117:
- YYDEBUG(117, *YYCURSOR);
- yyaccept = 4;
+ if (yych == '.') goto yy140;
+ if (yych <= '/') goto yy43;
+ if (yych >= ':') goto yy43;
+yy140:
+ YYDEBUG(140, *YYCURSOR);
+ yyaccept = 6;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(118, *YYCURSOR);
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy119;
- if (yych <= 0x08) goto yy43;
+ YYDEBUG(141, *YYCURSOR);
+ if (yych <= '"') {
+ if (yych <= '\f') {
+ if (yych <= 0x00) goto yy142;
+ if (yych <= 0x08) goto yy42;
+ if (yych >= '\v') goto yy42;
} else {
- if (yych == '\r') goto yy119;
- if (yych <= 0x1F) goto yy43;
+ if (yych <= 0x1F) {
+ if (yych >= 0x0E) goto yy42;
+ } else {
+ if (yych <= ' ') goto yy142;
+ if (yych <= '!') goto yy42;
+ goto yy62;
+ }
}
} else {
- if (yych <= '.') {
- if (yych == '#') goto yy119;
- if (yych <= '-') goto yy43;
- goto yy117;
+ if (yych <= '-') {
+ if (yych <= '#') goto yy142;
+ if (yych == '\'') goto yy62;
+ goto yy42;
} else {
- if (yych <= '/') goto yy43;
- if (yych <= '9') goto yy117;
- if (yych <= ':') goto yy65;
- goto yy43;
+ if (yych <= '/') {
+ if (yych <= '.') goto yy140;
+ goto yy42;
+ } else {
+ if (yych <= '9') goto yy140;
+ if (yych <= ':') goto yy61;
+ goto yy42;
+ }
}
}
-yy119:
- YYDEBUG(119, *YYCURSOR);
+yy142:
+ YYDEBUG(142, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 73 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 93 "sapi/phpdbg/phpdbg_lexer.l"
{
char *text = yytext + 2;
while (*++text < '0');
yylval->num = atoi(text);
return T_REQ_ID;
}
-#line 1179 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy120:
- YYDEBUG(120, *YYCURSOR);
+#line 1453 "sapi/phpdbg/phpdbg_lexer.c"
+yy143:
+ YYDEBUG(143, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '.') goto yy121;
- if (yych <= '/') goto yy66;
- if (yych >= ':') goto yy66;
-yy121:
- YYDEBUG(121, *YYCURSOR);
+ if (yych == '.') goto yy144;
+ if (yych <= '/') goto yy45;
+ if (yych >= ':') goto yy45;
+yy144:
+ YYDEBUG(144, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(122, *YYCURSOR);
- if (yych == '.') goto yy121;
- if (yych <= '/') goto yy119;
- if (yych <= '9') goto yy121;
- goto yy119;
+ YYDEBUG(145, *YYCURSOR);
+ if (yych == '.') goto yy144;
+ if (yych <= '/') goto yy142;
+ if (yych <= '9') goto yy144;
+ goto yy142;
+yy146:
+ YYDEBUG(146, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == '.') goto yy147;
+ if (yych <= '/') goto yy45;
+ if (yych >= ':') goto yy45;
+yy147:
+ YYDEBUG(147, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(148, *YYCURSOR);
+ if (yych == '.') goto yy147;
+ if (yych <= '/') goto yy149;
+ if (yych <= '9') goto yy147;
+yy149:
+ YYDEBUG(149, *YYCURSOR);
+ YYCURSOR = YYCTXMARKER;
+ yyleng = (size_t) YYCURSOR - (size_t) yytext;
+#line 106 "sapi/phpdbg/phpdbg_lexer.l"
+ {
+ return T_POUND;
+}
+#line 1493 "sapi/phpdbg/phpdbg_lexer.c"
}
/* *********************************** */
yyc_PRE_RAW:
{
static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 160, 48, 0, 0, 160, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 160, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 64, 0,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 64, 0, 0, 0, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 128, 0,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
};
- YYDEBUG(123, *YYCURSOR);
+ YYDEBUG(150, *YYCURSOR);
YYFILL(2);
yych = *YYCURSOR;
- if (yybm[0+yych] & 16) {
- goto yy127;
- }
if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy130;
- goto yy132;
+ if (yych <= '\t') {
+ if (yych <= 0x00) goto yy158;
+ if (yych <= 0x08) goto yy160;
} else {
- if (yych <= '\t') goto yy125;
- if (yych <= '\f') goto yy132;
+ if (yych <= '\n') goto yy158;
+ if (yych <= '\f') goto yy160;
}
} else {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy132;
+ if (yych <= '"') {
+ if (yych == ' ') goto yy154;
+ goto yy160;
} else {
- if (yych == '-') goto yy131;
- goto yy132;
+ if (yych <= '#') goto yy157;
+ if (yych == '-') goto yy159;
+ goto yy160;
}
}
-yy125:
- YYDEBUG(125, *YYCURSOR);
+ YYDEBUG(152, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) <= '\f') {
- if (yych <= 0x00) goto yy142;
- if (yych <= 0x08) goto yy126;
- if (yych <= '\n') goto yy142;
- } else {
- if (yych <= '\r') goto yy142;
- if (yych == ' ') goto yy142;
+ if (yybm[0+(yych = *YYCURSOR)] & 64) {
+ goto yy154;
}
-yy126:
- YYDEBUG(126, *YYCURSOR);
+yy153:
+ YYDEBUG(153, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 169 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 199 "sapi/phpdbg/phpdbg_lexer.l"
{
YYSETCONDITION(RAW);
YYCURSOR = LEX(text);
goto restart;
}
-#line 1277 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy127:
- YYDEBUG(127, *YYCURSOR);
+#line 1568 "sapi/phpdbg/phpdbg_lexer.c"
+yy154:
+ YYDEBUG(154, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(128, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy141;
+ YYDEBUG(155, *YYCURSOR);
+ if (yybm[0+yych] & 64) {
+ goto yy154;
}
- if (yych <= 0x00) goto yy140;
- if (yych == '\n') goto yy127;
-yy129:
- YYDEBUG(129, *YYCURSOR);
+ YYDEBUG(156, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 69 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 175 "sapi/phpdbg/phpdbg_lexer.l"
{
- return 0;
+ /* ignore whitespace */
+
+ goto restart;
}
-#line 1296 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy130:
- YYDEBUG(130, *YYCURSOR);
+#line 1586 "sapi/phpdbg/phpdbg_lexer.c"
+yy157:
+ YYDEBUG(157, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy126;
-yy131:
- YYDEBUG(131, *YYCURSOR);
+ goto yy153;
+yy158:
+ YYDEBUG(158, *YYCURSOR);
+ yych = *++YYCURSOR;
+ goto yy153;
+yy159:
+ YYDEBUG(159, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'r') goto yy133;
- goto yy126;
-yy132:
- YYDEBUG(132, *YYCURSOR);
+ if (yych == 'r') goto yy161;
+ goto yy153;
+yy160:
+ YYDEBUG(160, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy126;
-yy133:
- YYDEBUG(133, *YYCURSOR);
+ goto yy153;
+yy161:
+ YYDEBUG(161, *YYCURSOR);
++YYCURSOR;
YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(134, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy133;
+ YYDEBUG(162, *YYCURSOR);
+ if (yybm[0+yych] & 128) {
+ goto yy165;
}
- if (yych <= '.') {
- if (yych <= ',') goto yy135;
- if (yych <= '-') goto yy136;
- goto yy137;
+ if (yych <= '\r') {
+ if (yych == '\t') goto yy161;
+ if (yych >= '\r') goto yy161;
} else {
- if (yych <= '/') goto yy135;
- if (yych <= '9') goto yy137;
+ if (yych <= ' ') {
+ if (yych >= ' ') goto yy161;
+ } else {
+ if (yych == '-') goto yy164;
+ }
}
-yy135:
- YYDEBUG(135, *YYCURSOR);
+yy163:
+ YYDEBUG(163, *YYCURSOR);
YYCURSOR = YYMARKER;
- goto yy126;
-yy136:
- YYDEBUG(136, *YYCURSOR);
+ goto yy153;
+yy164:
+ YYDEBUG(164, *YYCURSOR);
yych = *++YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy137;
+ if (yybm[0+yych] & 128) {
+ goto yy165;
}
- goto yy135;
-yy137:
- YYDEBUG(137, *YYCURSOR);
+ goto yy163;
+yy165:
+ YYDEBUG(165, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(138, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy137;
+ YYDEBUG(166, *YYCURSOR);
+ if (yybm[0+yych] & 128) {
+ goto yy165;
}
- YYDEBUG(139, *YYCURSOR);
+ YYDEBUG(167, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 73 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 93 "sapi/phpdbg/phpdbg_lexer.l"
{
char *text = yytext + 2;
while (*++text < '0');
yylval->num = atoi(text);
return T_REQ_ID;
}
-#line 1357 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy140:
- YYDEBUG(140, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy129;
-yy141:
- YYDEBUG(141, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
-yy142:
- YYDEBUG(142, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy141;
- }
- if (yych <= 0x00) goto yy140;
- if (yych == '\n') goto yy127;
- YYDEBUG(143, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 147 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
- {
- /* ignore whitespace */
-
- goto restart;
-}
-#line 1382 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+#line 1653 "sapi/phpdbg/phpdbg_lexer.c"
}
/* *********************************** */
yyc_RAW:
{
static const unsigned char yybm[] = {
- 0, 128, 128, 128, 128, 128, 128, 128,
- 128, 160, 64, 128, 128, 160, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 160, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128,
+ 0, 224, 224, 224, 224, 224, 224, 224,
+ 224, 240, 0, 224, 224, 240, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 240, 224, 64, 192, 224, 224, 224, 128,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 32, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
};
- YYDEBUG(144, *YYCURSOR);
+ YYDEBUG(168, *YYCURSOR);
YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy146;
+ if (yybm[0+yych] & 16) {
+ goto yy170;
}
- if (yych <= 0x00) goto yy152;
- if (yych == '\n') goto yy149;
- goto yy153;
-yy146:
- YYDEBUG(146, *YYCURSOR);
- ++YYCURSOR;
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy175;
+ if (yych <= 0x08) goto yy177;
+ if (yych <= '\n') goto yy175;
+ goto yy177;
+ } else {
+ if (yych <= '#') {
+ if (yych <= '"') goto yy179;
+ goto yy173;
+ } else {
+ if (yych == '\'') goto yy181;
+ goto yy177;
+ }
+ }
+yy170:
+ YYDEBUG(170, *YYCURSOR);
+ yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(147, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy146;
+ YYDEBUG(171, *YYCURSOR);
+ if (yybm[0+yych] & 16) {
+ goto yy170;
}
- if (yych <= 0x00) goto yy152;
- if (yych == '\n') goto yy149;
- goto yy153;
-yy148:
- YYDEBUG(148, *YYCURSOR);
+ if (yych <= '!') {
+ if (yych <= 0x00) goto yy172;
+ if (yych <= 0x08) goto yy177;
+ if (yych >= '\v') goto yy177;
+ } else {
+ if (yych <= '#') {
+ if (yych <= '"') goto yy179;
+ } else {
+ if (yych == '\'') goto yy181;
+ goto yy177;
+ }
+ }
+yy172:
+ YYDEBUG(172, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 140 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 168 "sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
yylval->len = yyleng;
return T_INPUT;
}
-#line 1452 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy149:
- YYDEBUG(149, *YYCURSOR);
+#line 1744 "sapi/phpdbg/phpdbg_lexer.c"
+yy173:
+ YYDEBUG(173, *YYCURSOR);
++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(150, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy149;
- }
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy152;
- if (yych == '\t') goto yy155;
- } else {
- if (yych <= '\r') goto yy155;
- if (yych == ' ') goto yy155;
- }
-yy151:
- YYDEBUG(151, *YYCURSOR);
+ YYDEBUG(174, *YYCURSOR);
+ yyleng = (size_t) YYCURSOR - (size_t) yytext;
+#line 110 "sapi/phpdbg/phpdbg_lexer.l"
+ {
+ YYSETCONDITION(INITIAL);
+ return T_SEPARATOR;
+}
+#line 1755 "sapi/phpdbg/phpdbg_lexer.c"
+yy175:
+ YYDEBUG(175, *YYCURSOR);
+ ++YYCURSOR;
+ YYDEBUG(176, *YYCURSOR);
yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 69 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 89 "sapi/phpdbg/phpdbg_lexer.l"
{
return 0;
}
-#line 1476 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
-yy152:
- YYDEBUG(152, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy151;
-yy153:
- YYDEBUG(153, *YYCURSOR);
+#line 1765 "sapi/phpdbg/phpdbg_lexer.c"
+yy177:
+ YYDEBUG(177, *YYCURSOR);
+ yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(178, *YYCURSOR);
+ if (yybm[0+yych] & 32) {
+ goto yy177;
+ }
+ if (yych <= '\n') goto yy172;
+ if (yych <= '"') goto yy179;
+ if (yych <= '#') goto yy172;
+ goto yy181;
+yy179:
+ YYDEBUG(179, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(154, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy153;
+ goto yy185;
}
- goto yy148;
-yy155:
- YYDEBUG(155, *YYCURSOR);
+ if (yych >= '#') goto yy187;
+yy180:
+ YYDEBUG(180, *YYCURSOR);
+ YYCURSOR = YYMARKER;
+ goto yy172;
+yy181:
+ YYDEBUG(181, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(156, *YYCURSOR);
if (yybm[0+yych] & 64) {
- goto yy149;
+ goto yy182;
}
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy152;
- if (yych == '\t') goto yy155;
- } else {
- if (yych <= '\r') goto yy155;
- if (yych == ' ') goto yy155;
+ if (yych <= '\'') goto yy180;
+ goto yy184;
+yy182:
+ YYDEBUG(182, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(183, *YYCURSOR);
+ if (yybm[0+yych] & 64) {
+ goto yy182;
}
- YYDEBUG(157, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 147 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
- {
- /* ignore whitespace */
-
- goto restart;
-}
-#line 1515 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.c"
+ if (yych <= '\n') goto yy180;
+ if (yych <= '\'') goto yy177;
+yy184:
+ YYDEBUG(184, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ if (yych == '\'') goto yy182;
+ if (yych == '\\') goto yy182;
+ goto yy180;
+yy185:
+ YYDEBUG(185, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(186, *YYCURSOR);
+ if (yybm[0+yych] & 128) {
+ goto yy185;
+ }
+ if (yych <= '\n') goto yy180;
+ if (yych <= '"') goto yy177;
+yy187:
+ YYDEBUG(187, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ if (yych == '"') goto yy185;
+ if (yych == '\\') goto yy185;
+ goto yy180;
}
}
-#line 183 "/Users/Bob/php-src-5.6/sapi/phpdbg/phpdbg_lexer.l"
+#line 213 "sapi/phpdbg/phpdbg_lexer.l"
}
diff --git a/sapi/phpdbg/phpdbg_lexer.h b/sapi/phpdbg/phpdbg_lexer.h
index 89ef7668e5..355ce4ece0 100644
--- a/sapi/phpdbg/phpdbg_lexer.h
+++ b/sapi/phpdbg/phpdbg_lexer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,6 +28,7 @@ typedef struct {
unsigned char *text;
unsigned char *cursor;
unsigned char *marker;
+ unsigned char *ctxmarker;
int state;
} phpdbg_lexer_data;
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l
index b9cdc65d22..21c4569480 100644
--- a/sapi/phpdbg/phpdbg_lexer.l
+++ b/sapi/phpdbg/phpdbg_lexer.l
@@ -14,6 +14,7 @@
#define YYGETCONDITION() LEX(state)
#define YYCURSOR LEX(cursor)
#define YYMARKER LEX(marker)
+#define YYCTXMARKER LEX(ctxmarker)
#define yyleng LEX(len)
#define yytext ((char*) LEX(text))
#undef YYDEBUG
@@ -25,7 +26,7 @@
#define RAW 2
#define INITIAL 3
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) {
PHPDBG_G(parser_stack) = stack;
@@ -36,6 +37,25 @@ void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) {
LEX(len) = strlen(input);
}
+static int unescape_string(char *s) {
+ switch (*s) {
+ case '\'':
+ case '\"': {
+ char start = *s;
+ size_t off = 1;
+ do {
+ if (s[off] == '\\') {
+ off++;
+ }
+ *s = s[off];
+ } while ((++s)[off] != start);
+ return off + 1;
+ }
+ }
+
+ return 0;
+}
+
int phpdbg_lex (phpdbg_param_t* yylval) {
restart:
@@ -56,20 +76,21 @@ T_SHELL 'sh'
T_IF 'if'
T_RUN 'run'
T_RUN_SHORT "r"
-WS [ \r\n\t]+
+WS [ \r\t]+
DIGITS [-]?[0-9\.]+
ID [^ \r\n\t:#\000]+
+GENERIC_ID ([^ \r\n\t:#\000"']|":\\")+|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+[']
ADDR [0][x][a-fA-F0-9]+
OPCODE (ZEND_|zend_)([A-Za-z])+
-INPUT [^\n\000]+
+INPUT ([^\n\000#"']|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+['])+
<!*> := yyleng = (size_t) YYCURSOR - (size_t) yytext;
-<*>{WS}?[\n\000] {
+<*>[\n\000] {
return 0;
}
-<PRE_RAW, NORMAL>[-][r]{WS}?{DIGITS} {
+<PRE_RAW, NORMAL>"-r"{WS}?{DIGITS} {
char *text = yytext + 2;
while (*++text < '0');
yylval->num = atoi(text);
@@ -82,29 +103,37 @@ INPUT [^\n\000]+
return T_IF;
}
-<NORMAL>{ID}[:]{1}[//]{2} {
- phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
- yylval->len = yyleng;
- return T_PROTO;
-}
-<NORMAL>[#]{1} {
+<NORMAL>"#"/{DIGITS} {
return T_POUND;
}
-<NORMAL>[:]{2} {
+
+<*>"#" {
+ YYSETCONDITION(INITIAL);
+ return T_SEPARATOR;
+}
+
+<NORMAL>"::" {
return T_DCOLON;
}
-<NORMAL>[:]{1} {
+
+<NORMAL>":"/[^\\] {
return T_COLON;
}
-<NORMAL>({T_YES}|{T_ON}|{T_ENABLED}|{T_TRUE}){WS} {
+<NORMAL>{ID}"://" {
+ phpdbg_init_param(yylval, STR_PARAM);
+ yylval->str = estrndup(yytext, yyleng);
+ yylval->len = yyleng;
+ return T_PROTO;
+}
+
+<NORMAL>({T_YES}|{T_ON}|{T_ENABLED}|{T_TRUE})/[ \r\t\n\000] {
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 1;
return T_TRUTHY;
}
-<NORMAL>({T_NO}|{T_OFF}|{T_DISABLED}|{T_FALSE}){WS} {
+<NORMAL>({T_NO}|{T_OFF}|{T_DISABLED}|{T_FALSE})/[ \r\t\n\000] {
phpdbg_init_param(yylval, NUMERIC_PARAM);
yylval->num = 0;
return T_FALSY;
@@ -124,21 +153,21 @@ INPUT [^\n\000]+
<NORMAL>{OPCODE} {
phpdbg_init_param(yylval, OP_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng);
yylval->len = yyleng;
return T_OPCODE;
}
-<NORMAL>{ID} {
+<NORMAL>{GENERIC_ID} {
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
yylval->len = yyleng;
return T_ID;
}
<RAW>{INPUT} {
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = zend_strndup(yytext, yyleng);
+ yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
yylval->len = yyleng;
return T_INPUT;
}
@@ -154,25 +183,27 @@ INPUT [^\n\000]+
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_EVAL;
}
+
<INITIAL>{T_SHELL}{WS} {
YYSETCONDITION(PRE_RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_SHELL;
}
+
<INITIAL>({T_RUN}|{T_RUN_SHORT}){WS} {
YYSETCONDITION(PRE_RAW);
phpdbg_init_param(yylval, EMPTY_PARAM);
return T_RUN;
}
-<PRE_RAW>. {
+<PRE_RAW>[^ ] {
YYSETCONDITION(RAW);
YYCURSOR = LEX(text);
goto restart;
}
-<INITIAL>. {
+<INITIAL>[^ ] {
YYSETCONDITION(NORMAL);
YYCURSOR = LEX(text);
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index 38804d551e..ca73209114 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,8 +31,9 @@
#include "phpdbg_utils.h"
#include "phpdbg_prompt.h"
#include "php_streams.h"
+#include "zend_exceptions.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define PHPDBG_LIST_COMMAND_D(f, h, a, m, l, s, flags) \
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[12], flags)
@@ -110,10 +111,10 @@ PHPDBG_LIST(class) /* {{{ */
if (ce->info.user.filename) {
phpdbg_list_file(ce->info.user.filename, ce->info.user.line_end - ce->info.user.line_start + 1, ce->info.user.line_start, 0);
} else {
- phpdbg_error("list", "type=\"nosource\" class=\"%s\"", "The source of the requested class (%s) cannot be found", ce->name);
+ phpdbg_error("list", "type=\"nosource\" class=\"%s\"", "The source of the requested class (%s) cannot be found", ZSTR_VAL(ce->name));
}
} else {
- phpdbg_error("list", "type=\"internalclass\" class=\"%s\"", "The class requested (%s) is not user defined", ce->name);
+ phpdbg_error("list", "type=\"internalclass\" class=\"%s\"", "The class requested (%s) is not user defined", ZSTR_VAL(ce->name));
}
} else {
phpdbg_error("list", "type=\"notfound\" class=\"%s\"", "The requested class (%s) could not be found", param->str);
@@ -151,7 +152,7 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli
lastline = data->lines;
}
- phpdbg_xml("<list %r file=\"%s\">", filename);
+ phpdbg_xml("<list %r file=\"%s\">", ZSTR_VAL(filename));
for (line = offset; line < lastline;) {
uint linestart = data->line[line++];
@@ -199,11 +200,12 @@ void phpdbg_list_function_byname(const char *str, size_t len) /* {{{ */
/* search active scope if begins with period */
if (func_name[0] == '.') {
- if (EG(scope)) {
+ zend_class_entry *scope = zend_get_executed_scope();
+ if (scope) {
func_name++;
func_name_len--;
- func_table = &EG(scope)->function_table;
+ func_table = &scope->function_table;
} else {
phpdbg_error("inactive", "type=\"noclasses\"", "No active class");
return;
@@ -231,36 +233,33 @@ void phpdbg_list_function_byname(const char *str, size_t len) /* {{{ */
efree(func_name);
} /* }}} */
+/* Note: do not free the original file handler, let original compile_file() or caller do that. Caller may rely on its value to check success */
zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
phpdbg_file_source data, *dataptr;
- zend_file_handle fake = {{0}};
+ zend_file_handle fake;
zend_op_array *ret;
char *filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename);
uint line;
char *bufptr, *endptr;
char resolved_path_buf[MAXPATHLEN];
- zend_stream_fixup(file, &data.buf, &data.len);
-
- data.filename = filename;
- data.line[0] = 0;
-
- if (file->handle.stream.mmap.old_closer) {
- /* do not unmap */
- file->handle.stream.closer = file->handle.stream.mmap.old_closer;
+ if (zend_stream_fixup(file, &bufptr, &data.len) == FAILURE) {
+ return PHPDBG_G(compile_file)(file, type);
}
-#if HAVE_MMAP
- if (file->handle.stream.mmap.map) {
- data.map = file->handle.stream.mmap.map;
+ data.buf = emalloc(data.len + ZEND_MMAP_AHEAD + 1);
+ if (data.len > 0) {
+ memcpy(data.buf, bufptr, data.len);
}
-#endif
+ memset(data.buf + data.len, 0, ZEND_MMAP_AHEAD + 1);
+ data.filename = filename;
+ data.line[0] = 0;
+ memset(&fake, 0, sizeof(fake));
fake.type = ZEND_HANDLE_MAPPED;
fake.handle.stream.mmap.buf = data.buf;
fake.handle.stream.mmap.len = data.len;
fake.free_filename = 0;
- fake.opened_path = file->opened_path;
fake.filename = filename;
fake.opened_path = file->opened_path;
@@ -276,34 +275,124 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
}
dataptr->lines = ++line;
dataptr->line[line] = endptr - data.buf;
- dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
+ ret = PHPDBG_G(compile_file)(&fake, type);
+
+ if (ret == NULL) {
+ efree(data.buf);
+ efree(dataptr);
+
+ fake.opened_path = NULL;
+ zend_file_handle_dtor(&fake);
+
+ return NULL;
+ }
+
+ dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
zend_hash_str_add_ptr(&PHPDBG_G(file_sources), filename, strlen(filename), dataptr);
phpdbg_resolve_pending_file_break(filename);
- ret = PHPDBG_G(compile_file)(&fake, type);
-
fake.opened_path = NULL;
zend_file_handle_dtor(&fake);
return ret;
}
-void phpdbg_free_file_source(phpdbg_file_source *data) {
-#if HAVE_MMAP
- if (data->map) {
- munmap(data->map, data->len + ZEND_MMAP_AHEAD);
- } else
-#endif
+zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
+ char *filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename);
+ char resolved_path_buf[MAXPATHLEN];
+ zend_op_array *op_array;
+ phpdbg_file_source *dataptr;
+
+ if (VCWD_REALPATH(filename, resolved_path_buf)) {
+ filename = resolved_path_buf;
+ }
+
+ op_array = PHPDBG_G(init_compile_file)(file, type);
+
+ if (op_array == NULL) {
+ return NULL;
+ }
+
+ dataptr = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), filename, strlen(filename));
+ ZEND_ASSERT(dataptr != NULL);
+
+ dataptr->op_array = *op_array;
+ if (dataptr->op_array.refcount) {
+ ++*dataptr->op_array.refcount;
+ }
+
+ return op_array;
+}
+
+zend_op_array *phpdbg_compile_string(zval *source_string, char *filename) {
+ zend_string *fake_name;
+ zend_op_array *op_array;
+ phpdbg_file_source *dataptr;
+ uint line;
+ char *bufptr, *endptr;
+
+ if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) {
+ return PHPDBG_G(compile_string)(source_string, filename);
+ }
+
+ dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * Z_STRLEN_P(source_string));
+ dataptr->buf = estrndup(Z_STRVAL_P(source_string), Z_STRLEN_P(source_string));
+ dataptr->len = Z_STRLEN_P(source_string);
+ dataptr->line[0] = 0;
+ for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;) {
+ if (*bufptr == '\n') {
+ dataptr->line[++line] = (uint)(bufptr - dataptr->buf) + 1;
+ }
+ }
+ dataptr->lines = ++line;
+ dataptr->line[line] = endptr - dataptr->buf;
+
+ op_array = PHPDBG_G(compile_string)(source_string, filename);
+
+ if (op_array == NULL) {
+ efree(dataptr->buf);
+ efree(dataptr);
+ return NULL;
+ }
+
+ fake_name = strpprintf(0, "%s\0%p", filename, op_array->opcodes);
+
+ dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
+ zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr);
+
+ dataptr->filename = estrndup(ZSTR_VAL(fake_name), ZSTR_LEN(fake_name));
+ zend_string_release(fake_name);
+
+ dataptr->op_array = *op_array;
+ if (dataptr->op_array.refcount) {
+ ++*dataptr->op_array.refcount;
+ }
+
+ return op_array;
+}
+
+void phpdbg_free_file_source(zval *zv) {
+ phpdbg_file_source *data = Z_PTR_P(zv);
+
if (data->buf) {
efree(data->buf);
}
+ destroy_op_array(&data->op_array);
+
efree(data);
}
void phpdbg_init_list(void) {
PHPDBG_G(compile_file) = zend_compile_file;
+ PHPDBG_G(compile_string) = zend_compile_string;
zend_hash_init(&PHPDBG_G(file_sources), 1, NULL, (dtor_func_t) phpdbg_free_file_source, 0);
zend_compile_file = phpdbg_compile_file;
+ zend_compile_string = phpdbg_compile_string;
+}
+
+void phpdbg_list_update(void) {
+ PHPDBG_G(init_compile_file) = zend_compile_file;
+ zend_compile_file = phpdbg_init_compile_file;
}
diff --git a/sapi/phpdbg/phpdbg_list.h b/sapi/phpdbg/phpdbg_list.h
index 3436ddd8fb..c011b9598a 100644
--- a/sapi/phpdbg/phpdbg_list.h
+++ b/sapi/phpdbg/phpdbg_list.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,6 +39,7 @@ void phpdbg_list_file(zend_string *, uint, int, uint);
extern const phpdbg_command_t phpdbg_list_commands[];
void phpdbg_init_list(void);
+void phpdbg_list_update(void);
typedef struct {
char *filename;
@@ -47,6 +48,8 @@ typedef struct {
#if HAVE_MMAP
void *map;
#endif
+ zend_op_array op_array;
+ zend_bool destroy_op_array;
uint lines;
uint line[1];
} phpdbg_file_source;
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c
index 8adbbba36f..44119c9e51 100644
--- a/sapi/phpdbg/phpdbg_opcode.c
+++ b/sapi/phpdbg/phpdbg_opcode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,32 +25,36 @@
#include "phpdbg_utils.h"
#include "ext/standard/php_string.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
-static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, uint32_t type, HashTable *vars) /* {{{ */
+static inline const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */
+{
+ const char *ret = zend_get_opcode_name(opcode);
+ if (ret) {
+ return ret + 5; /* Skip ZEND_ prefix */
+ }
+ return "UNKNOWN";
+} /* }}} */
+
+static inline char *phpdbg_decode_op(
+ zend_op_array *ops, const znode_op *op, uint32_t type) /* {{{ */
{
char *decode = NULL;
- switch (type &~ EXT_TYPE_UNUSED) {
+ switch (type) {
case IS_CV: {
zend_string *var = ops->vars[EX_VAR_TO_NUM(op->var)];
- asprintf(&decode, "$%.*s%c", ZSTR_LEN(var) <= 19 ? (int) ZSTR_LEN(var) : 18, ZSTR_VAL(var), ZSTR_LEN(var) <= 19 ? 0 : '+');
+ spprintf(&decode, 0, "$%.*s%c",
+ ZSTR_LEN(var) <= 19 ? (int) ZSTR_LEN(var) : 18,
+ ZSTR_VAL(var), ZSTR_LEN(var) <= 19 ? 0 : '+');
} break;
case IS_VAR:
- case IS_TMP_VAR: {
- zend_ulong id = 0, *pid = NULL;
- if (vars != NULL) {
- if ((pid = zend_hash_index_find_ptr(vars, (zend_ulong) ops->vars - op->var))) {
- id = *pid;
- } else {
- id = zend_hash_num_elements(vars);
- zend_hash_index_update_mem(vars, (zend_ulong) ops->vars - op->var, &id, sizeof(zend_ulong));
- }
- }
- asprintf(&decode, "@" ZEND_ULONG_FMT, id);
- } break;
-
+ spprintf(&decode, 0, "@%u", EX_VAR_TO_NUM(op->var) - ops->last_var);
+ break;
+ case IS_TMP_VAR:
+ spprintf(&decode, 0, "~%u", EX_VAR_TO_NUM(op->var) - ops->last_var);
+ break;
case IS_CONST: {
zval *literal = RT_CONSTANT(ops, *op);
decode = phpdbg_short_zval_print(literal, 20);
@@ -59,88 +63,80 @@ static inline char *phpdbg_decode_op(zend_op_array *ops, znode_op *op, uint32_t
return decode;
} /* }}} */
-char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars) /*{{{ */
+char *phpdbg_decode_input_op(
+ zend_op_array *ops, const zend_op *opline, znode_op op, zend_uchar op_type,
+ uint32_t flags) {
+ char *result = NULL;
+ if (op_type != IS_UNUSED) {
+ result = phpdbg_decode_op(ops, &op, op_type);
+ } else if (ZEND_VM_OP_JMP_ADDR == (flags & ZEND_VM_OP_MASK)) {
+ spprintf(&result, 0, "J%td", OP_JMP_ADDR(opline, op) - ops->opcodes);
+ } else if (ZEND_VM_OP_NUM == (flags & ZEND_VM_OP_MASK)) {
+ spprintf(&result, 0, "%" PRIu32, op.num);
+ } else if (ZEND_VM_OP_TRY_CATCH == (flags & ZEND_VM_OP_MASK)) {
+ if (op.num != (uint32_t)-1) {
+ spprintf(&result, 0, "try-catch(%" PRIu32 ")", op.num);
+ }
+ } else if (ZEND_VM_OP_LIVE_RANGE == (flags & ZEND_VM_OP_MASK)) {
+ if (opline->extended_value & ZEND_FREE_ON_RETURN) {
+ spprintf(&result, 0, "live-range(%" PRIu32 ")", op.num);
+ }
+ } else if (ZEND_VM_OP_THIS == (flags & ZEND_VM_OP_MASK)) {
+ result = estrdup("THIS");
+ } else if (ZEND_VM_OP_NEXT == (flags & ZEND_VM_OP_MASK)) {
+ result = estrdup("NEXT");
+ } else if (ZEND_VM_OP_CLASS_FETCH == (flags & ZEND_VM_OP_MASK)) {
+ //zend_dump_class_fetch_type(op.num);
+ } else if (ZEND_VM_OP_CONSTRUCTOR == (flags & ZEND_VM_OP_MASK)) {
+ result = estrdup("CONSTRUCTOR");
+ }
+ return result;
+}
+
+char *phpdbg_decode_opline(zend_op_array *ops, zend_op *opline) /*{{{ */
{
- char *decode[4] = {NULL, NULL, NULL, NULL};
+ const char *opcode_name = phpdbg_decode_opcode(opline->opcode);
+ uint32_t flags = zend_get_opcode_flags(opline->opcode);
+ char *result, *decode[4] = {NULL, NULL, NULL, NULL};
/* OP1 */
- switch (op->opcode) {
- case ZEND_JMP:
- case ZEND_GOTO:
- case ZEND_FAST_CALL:
- asprintf(&decode[1], "J%ld", OP_JMP_ADDR(op, op->op1) - ops->opcodes);
- break;
-
- case ZEND_INIT_FCALL:
- case ZEND_RECV:
- case ZEND_RECV_INIT:
- case ZEND_RECV_VARIADIC:
- asprintf(&decode[1], "%" PRIu32, op->op1.num);
- break;
-
- default:
- decode[1] = phpdbg_decode_op(ops, &op->op1, op->op1_type, vars);
- break;
- }
+ decode[1] = phpdbg_decode_input_op(
+ ops, opline, opline->op1, opline->op1_type, ZEND_VM_OP1_FLAGS(flags));
/* OP2 */
- switch (op->opcode) {
- /* TODO: ZEND_FAST_CALL, ZEND_FAST_RET op2 */
- case ZEND_JMPZNZ:
- asprintf(&decode[2], "J%u or J%" PRIu32, op->op2.opline_num, op->extended_value);
- break;
-
- case ZEND_JMPZ:
- case ZEND_JMPNZ:
- case ZEND_JMPZ_EX:
- case ZEND_JMPNZ_EX:
- case ZEND_JMP_SET:
- case ZEND_ASSERT_CHECK:
- asprintf(&decode[2], "J%ld", OP_JMP_ADDR(op, op->op2) - ops->opcodes);
- break;
-
- case ZEND_SEND_VAL:
- case ZEND_SEND_VAL_EX:
- case ZEND_SEND_VAR:
- case ZEND_SEND_VAR_NO_REF:
- case ZEND_SEND_REF:
- case ZEND_SEND_VAR_EX:
- case ZEND_SEND_USER:
- asprintf(&decode[2], "%" PRIu32, op->op2.num);
- break;
-
- default:
- decode[2] = phpdbg_decode_op(ops, &op->op2, op->op2_type, vars);
- break;
- }
+ decode[2] = phpdbg_decode_input_op(
+ ops, opline, opline->op2, opline->op2_type, ZEND_VM_OP2_FLAGS(flags));
/* RESULT */
- switch (op->opcode) {
+ switch (opline->opcode) {
case ZEND_CATCH:
- asprintf(&decode[2], "%" PRIu32, op->result.num);
+ spprintf(&decode[3], 0, "%" PRIu32, opline->result.num);
break;
default:
- decode[3] = phpdbg_decode_op(ops, &op->result, op->result_type, vars);
+ decode[3] = phpdbg_decode_op(ops, &opline->result, opline->result_type);
break;
}
- asprintf(&decode[0],
- "%-20s %-20s %-20s",
+ spprintf(&result, 0,
+ "%-23s %-20s %-20s %-20s",
+ decode[0] ? decode[0] : opcode_name,
decode[1] ? decode[1] : "",
decode[2] ? decode[2] : "",
decode[3] ? decode[3] : "");
+ if (decode[0])
+ efree(decode[0]);
if (decode[1])
- free(decode[1]);
+ efree(decode[1]);
if (decode[2])
- free(decode[2]);
+ efree(decode[2]);
if (decode[3])
- free(decode[3]);
+ efree(decode[3]);
- return decode[0];
+ return result;
} /* }}} */
-void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, zend_bool ignore_flags) /* {{{ */
+void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_flags) /* {{{ */
{
/* force out a line while stepping so the user knows what is happening */
if (ignore_flags ||
@@ -149,36 +145,36 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, ze
(PHPDBG_G(oplog)))) {
zend_op *opline = (zend_op *) execute_data->opline;
- char *decode = phpdbg_decode_opline(&execute_data->func->op_array, opline, vars);
+ char *decode = phpdbg_decode_opline(&execute_data->func->op_array, opline);
if (ignore_flags || (!(PHPDBG_G(flags) & PHPDBG_IS_QUIET) || (PHPDBG_G(flags) & PHPDBG_IS_STEPPING))) {
/* output line info */
- phpdbg_notice("opline", "line=\"%u\" opline=\"%p\" opcode=\"%s\" op=\"%s\" file=\"%s\"", "L%-5u %16p %-30s %s %s",
+ phpdbg_notice("opline", "line=\"%u\" opline=\"%p\" op=\"%s\" file=\"%s\"", "L%-5u %16p %s %s",
opline->lineno,
opline,
- phpdbg_decode_opcode(opline->opcode),
decode,
execute_data->func->op_array.filename ? ZSTR_VAL(execute_data->func->op_array.filename) : "unknown");
}
if (!ignore_flags && PHPDBG_G(oplog)) {
- phpdbg_log_ex(fileno(PHPDBG_G(oplog)), "L%-5u %16p %-30s %s %s",
+ phpdbg_log_ex(fileno(PHPDBG_G(oplog)), "L%-5u %16p %s %s\n",
opline->lineno,
opline,
- phpdbg_decode_opcode(opline->opcode),
decode,
execute_data->func->op_array.filename ? ZSTR_VAL(execute_data->func->op_array.filename) : "unknown");
}
- if (decode) {
- free(decode);
- }
+ efree(decode);
}
if (PHPDBG_G(oplog_list)) {
phpdbg_oplog_entry *cur = zend_arena_alloc(&PHPDBG_G(oplog_arena), sizeof(phpdbg_oplog_entry));
+ zend_op_array *op_array = &execute_data->func->op_array;
cur->op = (zend_op *) execute_data->opline;
- cur->op_array = &execute_data->func->op_array;
+ cur->opcodes = op_array->opcodes;
+ cur->filename = op_array->filename;
+ cur->scope = op_array->scope;
+ cur->function_name = op_array->function_name;
cur->next = NULL;
PHPDBG_G(oplog_cur)->next = cur;
PHPDBG_G(oplog_cur) = cur;
@@ -187,11 +183,5 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, ze
void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags) /* {{{ */
{
- phpdbg_print_opline_ex(execute_data, NULL, ignore_flags);
-} /* }}} */
-
-const char *phpdbg_decode_opcode(zend_uchar opcode) /* {{{ */
-{
- const char *ret = zend_get_opcode_name(opcode);
- return ret?ret:"UNKNOWN";
+ phpdbg_print_opline_ex(execute_data, ignore_flags);
} /* }}} */
diff --git a/sapi/phpdbg/phpdbg_opcode.h b/sapi/phpdbg/phpdbg_opcode.h
index dc9d2d9dd0..2831748236 100644
--- a/sapi/phpdbg/phpdbg_opcode.h
+++ b/sapi/phpdbg/phpdbg_opcode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,15 +23,17 @@
#include "zend_types.h"
-const char *phpdbg_decode_opcode(zend_uchar);
-char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars);
+char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op);
void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags);
-void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, zend_bool ignore_flags);
+void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_flags);
typedef struct _phpdbg_oplog_entry phpdbg_oplog_entry;
struct _phpdbg_oplog_entry {
phpdbg_oplog_entry *next;
- zend_op_array *op_array;
+ zend_string *function_name;
+ zend_class_entry *scope;
+ zend_string *filename;
+ zend_op *opcodes;
zend_op *op;
};
diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c
index cd9a4acaa0..90940ca68c 100644
--- a/sapi/phpdbg/phpdbg_out.c
+++ b/sapi/phpdbg/phpdbg_out.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -30,7 +30,7 @@
# include "win32/time.h"
#endif
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
/* copied from php-src/main/snprintf.c and slightly modified */
/*
@@ -1281,6 +1281,7 @@ PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) {
len = phpdbg_mixed_write(fd, buffer, buflen);
}
+ efree(buffer);
return len;
}
diff --git a/sapi/phpdbg/phpdbg_out.h b/sapi/phpdbg/phpdbg_out.h
index 74bbbad980..a6f28da14d 100644
--- a/sapi/phpdbg/phpdbg_out.h
+++ b/sapi/phpdbg/phpdbg_out.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,20 +34,11 @@ enum {
P_LOG
};
-#ifdef ZTS
-PHPDBG_API int phpdbg_print(int severity, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 6, 7);
-PHPDBG_API int phpdbg_xml_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-PHPDBG_API int phpdbg_rlog_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
-#else
PHPDBG_API int phpdbg_print(int severity, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
PHPDBG_API int phpdbg_xml_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPDBG_API int phpdbg_rlog_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
-#endif
-
#define phpdbg_error(tag, xmlfmt, strfmt, ...) phpdbg_print(P_ERROR , PHPDBG_G(io)[PHPDBG_STDOUT].fd, tag, xmlfmt, strfmt, ##__VA_ARGS__)
#define phpdbg_notice(tag, xmlfmt, strfmt, ...) phpdbg_print(P_NOTICE , PHPDBG_G(io)[PHPDBG_STDOUT].fd, tag, xmlfmt, strfmt, ##__VA_ARGS__)
@@ -63,9 +54,9 @@ PHPDBG_API int phpdbg_rlog_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_
#define phpdbg_writeln_ex(out, tag, xmlfmt, strfmt, ...) phpdbg_print(P_WRITELN, out, tag, xmlfmt, strfmt, ##__VA_ARGS__)
#define phpdbg_write_ex(out, tag, xmlfmt, strfmt, ...) phpdbg_print(P_WRITE , out, tag, xmlfmt, strfmt, ##__VA_ARGS__)
#define phpdbg_script_ex(out, type, fmt, ...) phpdbg_print(type , out, NULL, NULL, fmt, ##__VA_ARGS__)
-#define phpdbg_log_ex(out, fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
-#define phpdbg_xml_ex(out, fmt, ...) phpdbg_xml_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
-#define phpdbg_out_ex(out, fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
+#define phpdbg_log_ex(out, fmt, ...) phpdbg_log_internal(out, fmt, ##__VA_ARGS__)
+#define phpdbg_xml_ex(out, fmt, ...) phpdbg_xml_internal(out, fmt, ##__VA_ARGS__)
+#define phpdbg_out_ex(out, fmt, ...) phpdbg_out_internal(out, fmt, ##__VA_ARGS__)
#define phpdbg_rlog(fd, fmt, ...) phpdbg_rlog_internal(fd, fmt, ##__VA_ARGS__)
diff --git a/sapi/phpdbg/phpdbg_parser.c b/sapi/phpdbg/phpdbg_parser.c
index ed976f0b3f..c5222a0289 100644
--- a/sapi/phpdbg/phpdbg_parser.c
+++ b/sapi/phpdbg/phpdbg_parser.c
@@ -1,21 +1,19 @@
+/* A Bison parser, made by GNU Bison 2.7.12-4996. */
-/* A Bison parser, made by GNU Bison 2.4.1. */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -46,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.7.12-4996"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -60,8 +58,6 @@
/* Pull parsers. */
#define YYPULL 1
-/* Using locations. */
-#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse phpdbg_parse
@@ -72,10 +68,8 @@
#define yydebug phpdbg_debug
#define yynerrs phpdbg_nerrs
-
/* Copy the first part of user declarations. */
-
-/* Line 189 of yacc.c */
+/* Line 371 of yacc.c */
#line 1 "sapi/phpdbg/phpdbg_parser.y"
@@ -100,17 +94,24 @@
#undef yyerror
static int yyerror(const char *msg);
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
+#ifdef _MSC_VER
+#define YYMALLOC malloc
+#define YYFREE free
+#endif
-/* Line 189 of yacc.c */
-#line 109 "sapi/phpdbg/phpdbg_parser.c"
+/* Line 371 of yacc.c */
+#line 107 "sapi/phpdbg/phpdbg_parser.c"
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULL
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULL nullptr
+# else
+# define YY_NULL 0
+# endif
+# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
@@ -120,15 +121,20 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
# define YYERROR_VERBOSE 1
#endif
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
+/* In a future release of Bison, this section will be replaced
+ by #include "phpdbg_parser.h". */
+#ifndef YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
+# define YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int phpdbg_debug;
#endif
-
/* "%code requires" blocks. */
-
-/* Line 209 of yacc.c */
-#line 31 "sapi/phpdbg/phpdbg_parser.y"
+/* Line 387 of yacc.c */
+#line 36 "sapi/phpdbg/phpdbg_parser.y"
#include "phpdbg.h"
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -137,9 +143,8 @@ typedef void* yyscan_t;
#endif
-
-/* Line 209 of yacc.c */
-#line 143 "sapi/phpdbg/phpdbg_parser.c"
+/* Line 387 of yacc.c */
+#line 148 "sapi/phpdbg/phpdbg_parser.c"
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -157,17 +162,39 @@ typedef void* yyscan_t;
T_COLON = 265,
T_DCOLON = 266,
T_POUND = 267,
- T_PROTO = 268,
- T_DIGITS = 269,
- T_LITERAL = 270,
- T_ADDR = 271,
- T_OPCODE = 272,
- T_ID = 273,
- T_INPUT = 274,
- T_UNEXPECTED = 275,
- T_REQ_ID = 276
+ T_SEPARATOR = 268,
+ T_PROTO = 269,
+ T_DIGITS = 270,
+ T_LITERAL = 271,
+ T_ADDR = 272,
+ T_OPCODE = 273,
+ T_ID = 274,
+ T_INPUT = 275,
+ T_UNEXPECTED = 276,
+ T_REQ_ID = 277
};
#endif
+/* Tokens. */
+#define T_EVAL 258
+#define T_RUN 259
+#define T_SHELL 260
+#define T_IF 261
+#define T_TRUTHY 262
+#define T_FALSY 263
+#define T_STRING 264
+#define T_COLON 265
+#define T_DCOLON 266
+#define T_POUND 267
+#define T_SEPARATOR 268
+#define T_PROTO 269
+#define T_DIGITS 270
+#define T_LITERAL 271
+#define T_ADDR 272
+#define T_OPCODE 273
+#define T_ID 274
+#define T_INPUT 275
+#define T_UNEXPECTED 276
+#define T_REQ_ID 277
@@ -179,11 +206,26 @@ typedef int YYSTYPE;
#endif
-/* Copy the second part of user declarations. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int phpdbg_parse (void *YYPARSE_PARAM);
+#else
+int phpdbg_parse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int phpdbg_parse (void);
+#else
+int phpdbg_parse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+#endif /* !YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */
+/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 187 "sapi/phpdbg/phpdbg_parser.c"
+/* Line 390 of yacc.c */
+#line 229 "sapi/phpdbg/phpdbg_parser.c"
#ifdef short
# undef short
@@ -233,27 +275,36 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
-# define YY_(msgid) msgid
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if (! defined __GNUC__ || __GNUC__ < 2 \
+ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
+# define __attribute__(Spec) /* empty */
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
#else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
#endif
+
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
-# define YYID(n) (n)
+# define YYID(N) (N)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
@@ -286,11 +337,12 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -313,24 +365,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
@@ -359,23 +411,7 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
+# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -395,23 +431,43 @@ union yyalloc
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 26
+#define YYFINAL 27
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 48
+#define YYLAST 50
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 22
+#define YYNTOKENS 23
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 6
+#define YYNNTS 7
/* YYNRULES -- Number of rules. */
-#define YYNRULES 28
+#define YYNRULES 30
/* YYNRULES -- Number of states. */
-#define YYNSTATES 43
+#define YYNSTATES 46
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 276
+#define YYMAXUTOK 277
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -446,7 +502,7 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21
+ 15, 16, 17, 18, 19, 20, 21, 22
};
#if YYDEBUG
@@ -454,35 +510,38 @@ static const yytype_uint8 yytranslate[] =
YYRHS. */
static const yytype_uint8 yyprhs[] =
{
- 0, 0, 3, 5, 7, 8, 10, 13, 16, 20,
- 25, 30, 36, 40, 46, 50, 53, 55, 57, 59,
- 61, 63, 65, 67, 69, 70, 74, 78, 81
+ 0, 0, 3, 5, 9, 10, 12, 14, 16, 19,
+ 22, 26, 31, 36, 42, 46, 52, 56, 59, 61,
+ 63, 65, 67, 69, 71, 73, 75, 76, 80, 84,
+ 87
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 23, 0, -1, 24, -1, 27, -1, -1, 25, -1,
- 24, 25, -1, 24, 26, -1, 18, 10, 14, -1,
- 18, 10, 12, 14, -1, 13, 18, 10, 14, -1,
- 13, 18, 10, 12, 14, -1, 18, 11, 18, -1,
- 18, 11, 18, 12, 14, -1, 18, 12, 14, -1,
- 6, 19, -1, 17, -1, 16, -1, 15, -1, 7,
- -1, 8, -1, 14, -1, 18, -1, 21, -1, -1,
- 3, 26, 19, -1, 5, 26, 19, -1, 4, 26,
- -1, 4, 26, 19, -1
+ 24, 0, -1, 25, -1, 24, 13, 25, -1, -1,
+ 26, -1, 29, -1, 27, -1, 26, 27, -1, 26,
+ 28, -1, 19, 10, 15, -1, 19, 10, 12, 15,
+ -1, 14, 19, 10, 15, -1, 14, 19, 10, 12,
+ 15, -1, 19, 11, 19, -1, 19, 11, 19, 12,
+ 15, -1, 19, 12, 15, -1, 6, 20, -1, 18,
+ -1, 17, -1, 16, -1, 7, -1, 8, -1, 15,
+ -1, 19, -1, 22, -1, -1, 3, 28, 20, -1,
+ 5, 28, 20, -1, 4, 28, -1, 4, 28, 20,
+ -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 65, 65, 66, 67, 71, 72, 73, 77, 82,
- 87, 97, 107, 112, 118, 124, 129, 130, 131, 132,
- 133, 134, 135, 139, 140, 144, 149, 154, 158
+ 0, 71, 71, 72, 73, 77, 78, 82, 83, 84,
+ 88, 93, 98, 108, 118, 123, 129, 135, 140, 141,
+ 142, 143, 144, 145, 146, 150, 151, 155, 160, 165,
+ 169
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 1
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
@@ -491,12 +550,13 @@ static const char *const yytname[] =
"\"if (condition)\"", "\"truthy (true, on, yes or enabled)\"",
"\"falsy (false, off, no or disabled)\"",
"\"string (some input, perhaps)\"", "\": (colon)\"",
- "\":: (double colon)\"", "\"# (pound sign)\"", "\"protocol (file://)\"",
- "\"digits (numbers)\"", "\"literal (string)\"", "\"address\"",
- "\"opcode\"", "\"identifier (command or function name)\"",
+ "\":: (double colon)\"", "\"# (pound sign followed by digits)\"",
+ "\"# (pound sign)\"", "\"protocol (file://)\"", "\"digits (numbers)\"",
+ "\"literal (string)\"", "\"address\"", "\"opcode\"",
+ "\"identifier (command or function name)\"",
"\"input (input string or data)\"", "\"input\"",
- "\"request id (-r %d)\"", "$accept", "input", "parameters", "parameter",
- "req_id", "full_expression", 0
+ "\"request id (-r %d)\"", "$accept", "input", "command", "parameters",
+ "parameter", "req_id", "full_expression", YY_NULL
};
#endif
@@ -507,94 +567,103 @@ static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276
+ 275, 276, 277
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 22, 23, 23, 23, 24, 24, 24, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 26, 26, 27, 27, 27, 27
+ 0, 23, 24, 24, 24, 25, 25, 26, 26, 26,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 28, 28, 29, 29, 29,
+ 29
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 1, 1, 0, 1, 2, 2, 3, 4,
- 4, 5, 3, 5, 3, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 3, 3, 2, 3
+ 0, 2, 1, 3, 0, 1, 1, 1, 2, 2,
+ 3, 4, 4, 5, 3, 5, 3, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 3, 3, 2,
+ 3
};
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 4, 24, 24, 24, 0, 19, 20, 0, 21, 18,
- 17, 16, 22, 0, 2, 5, 3, 23, 0, 27,
- 0, 15, 0, 0, 0, 0, 1, 6, 7, 25,
- 28, 26, 0, 0, 8, 12, 14, 0, 10, 9,
- 0, 11, 13
+ 4, 26, 26, 26, 0, 21, 22, 0, 23, 20,
+ 19, 18, 24, 0, 2, 5, 7, 6, 25, 0,
+ 29, 0, 17, 0, 0, 0, 0, 1, 0, 8,
+ 9, 27, 30, 28, 0, 0, 10, 14, 16, 3,
+ 0, 12, 11, 0, 13, 15
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 13, 14, 15, 18, 16
+ -1, 13, 14, 15, 16, 19, 17
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -16
+#define YYPACT_NINF -17
static const yytype_int8 yypact[] =
{
- -3, -15, -15, -15, -10, -16, -16, 3, -16, -16,
- -16, -16, 22, 29, 10, -16, -16, -16, 11, 17,
- 19, -16, 30, 8, 21, 27, -16, -16, -16, -16,
- -16, -16, 23, 28, -16, 31, -16, 32, -16, -16,
- 33, -16, -16
+ -3, -16, -16, -16, -10, -17, -17, 2, -17, -17,
+ -17, -17, 26, 9, -17, 11, -17, -17, -17, 3,
+ 4, 21, -17, 29, 19, 23, 25, -17, -3, -17,
+ -17, -17, -17, -17, 20, 28, -17, 32, -17, -17,
+ 30, -17, -17, 31, -17, -17
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -16, -16, -16, 34, 5, -16
+ -17, -17, 22, -17, 33, 5, -17
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
+ number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 1, 2, 3, 4, 5, 6, 17, 19, 20, 21,
- 7, 8, 9, 10, 11, 12, 4, 5, 6, 28,
- 33, 22, 34, 7, 8, 9, 10, 11, 12, 26,
- 29, 17, 23, 24, 25, 37, 30, 38, 31, 35,
- 32, 36, 39, 40, 0, 0, 41, 42, 27
+ 1, 2, 3, 4, 5, 6, 18, 20, 21, 27,
+ 22, 7, 8, 9, 10, 11, 12, 4, 5, 6,
+ 30, 23, 28, 31, 32, 7, 8, 9, 10, 11,
+ 12, 35, 40, 18, 36, 41, 24, 25, 26, 34,
+ 38, 33, 37, 42, 43, 44, 45, 0, 29, 0,
+ 39
};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-17)))
+
+#define yytable_value_is_error(Yytable_value) \
+ YYID (0)
+
static const yytype_int8 yycheck[] =
{
- 3, 4, 5, 6, 7, 8, 21, 2, 3, 19,
- 13, 14, 15, 16, 17, 18, 6, 7, 8, 14,
- 12, 18, 14, 13, 14, 15, 16, 17, 18, 0,
- 19, 21, 10, 11, 12, 12, 19, 14, 19, 18,
- 10, 14, 14, 12, -1, -1, 14, 14, 14
+ 3, 4, 5, 6, 7, 8, 22, 2, 3, 0,
+ 20, 14, 15, 16, 17, 18, 19, 6, 7, 8,
+ 15, 19, 13, 20, 20, 14, 15, 16, 17, 18,
+ 19, 12, 12, 22, 15, 15, 10, 11, 12, 10,
+ 15, 20, 19, 15, 12, 15, 15, -1, 15, -1,
+ 28
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 3, 4, 5, 6, 7, 8, 13, 14, 15,
- 16, 17, 18, 23, 24, 25, 27, 21, 26, 26,
- 26, 19, 18, 10, 11, 12, 0, 25, 26, 19,
- 19, 19, 10, 12, 14, 18, 14, 12, 14, 14,
- 12, 14, 14
+ 0, 3, 4, 5, 6, 7, 8, 14, 15, 16,
+ 17, 18, 19, 24, 25, 26, 27, 29, 22, 28,
+ 28, 28, 20, 19, 10, 11, 12, 0, 13, 27,
+ 28, 20, 20, 20, 10, 12, 15, 19, 15, 25,
+ 12, 15, 15, 12, 15, 15
};
#define yyerrok (yyerrstatus = 0)
@@ -609,78 +678,50 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
-
+/* Error token number */
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
+/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
-
#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
@@ -730,6 +771,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
YYSTYPE const * const yyvaluep;
#endif
{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
if (!yyvaluep)
return;
# ifdef YYPRINT
@@ -738,11 +781,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
# else
YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}
@@ -868,7 +907,6 @@ int yydebug;
#endif
-
#if YYERROR_VERBOSE
# ifndef yystrlen
@@ -970,116 +1008,146 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULL;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
}
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
@@ -1103,36 +1171,15 @@ yydestruct (yymsg, yytype, yyvaluep)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- switch (yytype)
- {
-
- default:
- break;
- }
+ YYUSE (yytype);
}
-/* Prevent warnings from -Wmissing-prototypes. */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1159,8 +1206,31 @@ yyparse ()
/* The lookahead symbol. */
int yychar;
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+/* Default value used for initialization, for pacifying older GCCs
+ or non-GCC compilers. */
+static YYSTYPE yyval_default;
+# define YY_INITIAL_VALUE(Value) = Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
@@ -1173,7 +1243,7 @@ YYSTYPE yylval;
`yyss': related to states.
`yyvs': related to semantic values.
- Refer to the stacks thru separate pointers, to allow yyoverflow
+ Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
@@ -1191,7 +1261,7 @@ YYSTYPE yylval;
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken;
+ int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -1209,9 +1279,8 @@ YYSTYPE yylval;
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1220,14 +1289,6 @@ YYSTYPE yylval;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -1319,7 +1380,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
@@ -1350,8 +1411,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -1368,7 +1429,9 @@ yybackup:
yychar = YYEMPTY;
yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
@@ -1404,60 +1467,71 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 3:
+ case 2:
+/* Line 1802 of yacc.c */
+#line 71 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
-/* Line 1455 of yacc.c */
-#line 66 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); ;}
+ case 3:
+/* Line 1802 of yacc.c */
+#line 72 "sapi/phpdbg/phpdbg_parser.y"
+ { phpdbg_stack_separate((yyvsp[(1) - (3)]).top); (yyval) = (yyvsp[(3) - (3)]); }
break;
case 5:
-
-/* Line 1455 of yacc.c */
-#line 71 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); ;}
+/* Line 1802 of yacc.c */
+#line 77 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval).top = PHPDBG_G(parser_stack)->top; }
break;
case 6:
-
-/* Line 1455 of yacc.c */
-#line 72 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(2) - (2)])); ;}
+/* Line 1802 of yacc.c */
+#line 78 "sapi/phpdbg/phpdbg_parser.y"
+ { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_stack)->top; }
break;
case 7:
-
-/* Line 1455 of yacc.c */
-#line 73 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (2)]); ;}
+/* Line 1802 of yacc.c */
+#line 82 "sapi/phpdbg/phpdbg_parser.y"
+ { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_stack)->top; }
break;
case 8:
+/* Line 1802 of yacc.c */
+#line 83 "sapi/phpdbg/phpdbg_parser.y"
+ { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(2) - (2)])); (yyval).top = PHPDBG_G(parser_stack)->top; }
+ break;
-/* Line 1455 of yacc.c */
-#line 77 "sapi/phpdbg/phpdbg_parser.y"
+ case 9:
+/* Line 1802 of yacc.c */
+#line 84 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (2)]); }
+ break;
+
+ case 10:
+/* Line 1802 of yacc.c */
+#line 88 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = FILE_PARAM;
(yyval).file.name = (yyvsp[(2) - (3)]).str;
(yyval).file.line = (yyvsp[(3) - (3)]).num;
- ;}
+ }
break;
- case 9:
-
-/* Line 1455 of yacc.c */
-#line 82 "sapi/phpdbg/phpdbg_parser.y"
+ case 11:
+/* Line 1802 of yacc.c */
+#line 93 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = NUMERIC_FILE_PARAM;
(yyval).file.name = (yyvsp[(1) - (4)]).str;
(yyval).file.line = (yyvsp[(4) - (4)]).num;
- ;}
+ }
break;
- case 10:
-
-/* Line 1455 of yacc.c */
-#line 87 "sapi/phpdbg/phpdbg_parser.y"
+ case 12:
+/* Line 1802 of yacc.c */
+#line 98 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = FILE_PARAM;
(yyval).file.name = malloc((yyvsp[(1) - (4)]).len + (yyvsp[(2) - (4)]).len + 1);
@@ -1467,13 +1541,12 @@ yyreduce:
(yyval).file.name[(yyvsp[(1) - (4)]).len + (yyvsp[(2) - (4)]).len] = '\0';
}
(yyval).file.line = (yyvsp[(4) - (4)]).num;
- ;}
+ }
break;
- case 11:
-
-/* Line 1455 of yacc.c */
-#line 97 "sapi/phpdbg/phpdbg_parser.y"
+ case 13:
+/* Line 1802 of yacc.c */
+#line 108 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = NUMERIC_FILE_PARAM;
(yyval).file.name = malloc((yyvsp[(1) - (5)]).len + (yyvsp[(2) - (5)]).len + 1);
@@ -1483,160 +1556,154 @@ yyreduce:
(yyval).file.name[(yyvsp[(1) - (5)]).len + (yyvsp[(2) - (5)]).len] = '\0';
}
(yyval).file.line = (yyvsp[(5) - (5)]).num;
- ;}
+ }
break;
- case 12:
-
-/* Line 1455 of yacc.c */
-#line 107 "sapi/phpdbg/phpdbg_parser.y"
+ case 14:
+/* Line 1802 of yacc.c */
+#line 118 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = METHOD_PARAM;
(yyval).method.class = (yyvsp[(1) - (3)]).str;
(yyval).method.name = (yyvsp[(3) - (3)]).str;
- ;}
+ }
break;
- case 13:
-
-/* Line 1455 of yacc.c */
-#line 112 "sapi/phpdbg/phpdbg_parser.y"
+ case 15:
+/* Line 1802 of yacc.c */
+#line 123 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = NUMERIC_METHOD_PARAM;
(yyval).method.class = (yyvsp[(1) - (5)]).str;
(yyval).method.name = (yyvsp[(3) - (5)]).str;
(yyval).num = (yyvsp[(5) - (5)]).num;
- ;}
+ }
break;
- case 14:
-
-/* Line 1455 of yacc.c */
-#line 118 "sapi/phpdbg/phpdbg_parser.y"
+ case 16:
+/* Line 1802 of yacc.c */
+#line 129 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = NUMERIC_FUNCTION_PARAM;
(yyval).str = (yyvsp[(1) - (3)]).str;
(yyval).len = (yyvsp[(1) - (3)]).len;
(yyval).num = (yyvsp[(3) - (3)]).num;
- ;}
+ }
break;
- case 15:
-
-/* Line 1455 of yacc.c */
-#line 124 "sapi/phpdbg/phpdbg_parser.y"
+ case 17:
+/* Line 1802 of yacc.c */
+#line 135 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = COND_PARAM;
(yyval).str = (yyvsp[(2) - (2)]).str;
(yyval).len = (yyvsp[(2) - (2)]).len;
- ;}
- break;
-
- case 16:
-
-/* Line 1455 of yacc.c */
-#line 129 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
- break;
-
- case 17:
-
-/* Line 1455 of yacc.c */
-#line 130 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
+ }
break;
case 18:
-
-/* Line 1455 of yacc.c */
-#line 131 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
+/* Line 1802 of yacc.c */
+#line 140 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 19:
-
-/* Line 1455 of yacc.c */
-#line 132 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
+/* Line 1802 of yacc.c */
+#line 141 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 20:
-
-/* Line 1455 of yacc.c */
-#line 133 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
+/* Line 1802 of yacc.c */
+#line 142 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 21:
-
-/* Line 1455 of yacc.c */
-#line 134 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
+/* Line 1802 of yacc.c */
+#line 143 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 22:
-
-/* Line 1455 of yacc.c */
-#line 135 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); ;}
+/* Line 1802 of yacc.c */
+#line 144 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 23:
+/* Line 1802 of yacc.c */
+#line 145 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
-/* Line 1455 of yacc.c */
-#line 139 "sapi/phpdbg/phpdbg_parser.y"
- { PHPDBG_G(req_id) = (yyvsp[(1) - (1)]).num; ;}
+ case 24:
+/* Line 1802 of yacc.c */
+#line 146 "sapi/phpdbg/phpdbg_parser.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 25:
+/* Line 1802 of yacc.c */
+#line 150 "sapi/phpdbg/phpdbg_parser.y"
+ { PHPDBG_G(req_id) = (yyvsp[(1) - (1)]).num; }
+ break;
-/* Line 1455 of yacc.c */
-#line 144 "sapi/phpdbg/phpdbg_parser.y"
+ case 27:
+/* Line 1802 of yacc.c */
+#line 155 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = EVAL_PARAM;
(yyval).str = (yyvsp[(3) - (3)]).str;
(yyval).len = (yyvsp[(3) - (3)]).len;
- ;}
+ }
break;
- case 26:
-
-/* Line 1455 of yacc.c */
-#line 149 "sapi/phpdbg/phpdbg_parser.y"
+ case 28:
+/* Line 1802 of yacc.c */
+#line 160 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = SHELL_PARAM;
(yyval).str = (yyvsp[(3) - (3)]).str;
(yyval).len = (yyvsp[(3) - (3)]).len;
- ;}
+ }
break;
- case 27:
-
-/* Line 1455 of yacc.c */
-#line 154 "sapi/phpdbg/phpdbg_parser.y"
+ case 29:
+/* Line 1802 of yacc.c */
+#line 165 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = RUN_PARAM;
(yyval).len = 0;
- ;}
+ }
break;
- case 28:
-
-/* Line 1455 of yacc.c */
-#line 158 "sapi/phpdbg/phpdbg_parser.y"
+ case 30:
+/* Line 1802 of yacc.c */
+#line 169 "sapi/phpdbg/phpdbg_parser.y"
{
(yyval).type = RUN_PARAM;
(yyval).str = (yyvsp[(3) - (3)]).str;
(yyval).len = (yyvsp[(3) - (3)]).len;
- ;}
+ }
break;
-
-/* Line 1455 of yacc.c */
-#line 1638 "sapi/phpdbg/phpdbg_parser.c"
+/* Line 1802 of yacc.c */
+#line 1694 "sapi/phpdbg/phpdbg_parser.c"
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -1664,6 +1731,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
@@ -1671,37 +1742,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
@@ -1760,7 +1830,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
+ if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -1783,7 +1853,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
@@ -1807,7 +1879,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -1819,8 +1891,13 @@ yyexhaustedlab:
yyreturn:
if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
@@ -1844,9 +1921,8 @@ yyreturn:
}
-
-/* Line 1675 of yacc.c */
-#line 165 "sapi/phpdbg/phpdbg_parser.y"
+/* Line 2050 of yacc.c */
+#line 176 "sapi/phpdbg/phpdbg_parser.y"
static int yyerror(const char *msg) {
@@ -1864,8 +1940,11 @@ static int yyerror(const char *msg) {
}
int phpdbg_do_parse(phpdbg_param_t *stack, char *input) {
+ if (!*input) {
+ return 0;
+ }
+
phpdbg_init_lexer(stack, input);
return yyparse();
}
-
diff --git a/sapi/phpdbg/phpdbg_parser.h b/sapi/phpdbg/phpdbg_parser.h
index 0c66b27dc0..38d3ecbf70 100644
--- a/sapi/phpdbg/phpdbg_parser.h
+++ b/sapi/phpdbg/phpdbg_parser.h
@@ -1,21 +1,19 @@
+/* A Bison parser, made by GNU Bison 2.7.12-4996. */
-/* A Bison parser, made by GNU Bison 2.4.1. */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,14 +26,22 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+#ifndef YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
+# define YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int phpdbg_debug;
+#endif
/* "%code requires" blocks. */
-
-/* Line 1676 of yacc.c */
-#line 31 "sapi/phpdbg/phpdbg_parser.y"
+/* Line 2060 of yacc.c */
+#line 36 "/Users/Bob/php-src-X/sapi/phpdbg/phpdbg_parser.y"
#include "phpdbg.h"
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -44,9 +50,8 @@ typedef void* yyscan_t;
#endif
-
-/* Line 1676 of yacc.c */
-#line 50 "sapi/phpdbg/phpdbg_parser.h"
+/* Line 2060 of yacc.c */
+#line 55 "sapi/phpdbg/phpdbg_parser.h"
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -64,17 +69,39 @@ typedef void* yyscan_t;
T_COLON = 265,
T_DCOLON = 266,
T_POUND = 267,
- T_PROTO = 268,
- T_DIGITS = 269,
- T_LITERAL = 270,
- T_ADDR = 271,
- T_OPCODE = 272,
- T_ID = 273,
- T_INPUT = 274,
- T_UNEXPECTED = 275,
- T_REQ_ID = 276
+ T_SEPARATOR = 268,
+ T_PROTO = 269,
+ T_DIGITS = 270,
+ T_LITERAL = 271,
+ T_ADDR = 272,
+ T_OPCODE = 273,
+ T_ID = 274,
+ T_INPUT = 275,
+ T_UNEXPECTED = 276,
+ T_REQ_ID = 277
};
#endif
+/* Tokens. */
+#define T_EVAL 258
+#define T_RUN 259
+#define T_SHELL 260
+#define T_IF 261
+#define T_TRUTHY 262
+#define T_FALSY 263
+#define T_STRING 264
+#define T_COLON 265
+#define T_DCOLON 266
+#define T_POUND 267
+#define T_SEPARATOR 268
+#define T_PROTO 269
+#define T_DIGITS 270
+#define T_LITERAL 271
+#define T_ADDR 272
+#define T_OPCODE 273
+#define T_ID 274
+#define T_INPUT 275
+#define T_UNEXPECTED 276
+#define T_REQ_ID 277
@@ -86,5 +113,18 @@ typedef int YYSTYPE;
#endif
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int phpdbg_parse (void *YYPARSE_PARAM);
+#else
+int phpdbg_parse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int phpdbg_parse (void);
+#else
+int phpdbg_parse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
-
+#endif /* !YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y
index 8b3ab27f85..df9be36eee 100644
--- a/sapi/phpdbg/phpdbg_parser.y
+++ b/sapi/phpdbg/phpdbg_parser.y
@@ -21,7 +21,12 @@
#undef yyerror
static int yyerror(const char *msg);
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
+
+#ifdef _MSC_VER
+#define YYMALLOC malloc
+#define YYFREE free
+#endif
%}
@@ -48,7 +53,8 @@ typedef void* yyscan_t;
%token T_STRING "string (some input, perhaps)"
%token T_COLON ": (colon)"
%token T_DCOLON ":: (double colon)"
-%token T_POUND "# (pound sign)"
+%token T_POUND "# (pound sign followed by digits)"
+%token T_SEPARATOR "# (pound sign)"
%token T_PROTO "protocol (file://)"
%token T_DIGITS "digits (numbers)"
%token T_LITERAL "literal (string)"
@@ -62,14 +68,19 @@ typedef void* yyscan_t;
%% /* Rules */
input
- : parameters
- | full_expression { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); }
+ : command { $$ = $1; }
+ | input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; }
| /* nothing */
;
+command
+ : parameters { $$.top = PHPDBG_G(parser_stack)->top; }
+ | full_expression { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack)->top; }
+ ;
+
parameters
- : parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); }
- | parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); }
+ : parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack)->top; }
+ | parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); $$.top = PHPDBG_G(parser_stack)->top; }
| parameters req_id { $$ = $1; }
;
@@ -179,6 +190,10 @@ static int yyerror(const char *msg) {
}
int phpdbg_do_parse(phpdbg_param_t *stack, char *input) {
+ if (!*input) {
+ return 0;
+ }
+
phpdbg_init_lexer(stack, input);
return yyparse();
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c
index 70b8c2f807..034354a9e7 100644
--- a/sapi/phpdbg/phpdbg_print.c
+++ b/sapi/phpdbg/phpdbg_print.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -24,7 +24,7 @@
#include "phpdbg_opcode.h"
#include "phpdbg_prompt.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define PHPDBG_PRINT_COMMAND_D(f, h, a, m, l, s, flags) \
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[8], flags)
@@ -42,7 +42,7 @@ const phpdbg_command_t phpdbg_print_commands[] = {
PHPDBG_PRINT(opline) /* {{{ */
{
if (PHPDBG_G(in_execution) && EG(current_execute_data)) {
- phpdbg_print_opline(EG(current_execute_data), 1);
+ phpdbg_print_opline(phpdbg_user_execute_data(EG(current_execute_data)), 1);
} else {
phpdbg_error("inactive", "type=\"execution\"", "Not Executing!");
}
@@ -55,7 +55,6 @@ static inline void phpdbg_print_function_helper(zend_function *method) /* {{{ */
switch (method->type) {
case ZEND_USER_FUNCTION: {
zend_op_array* op_array = &(method->op_array);
- HashTable vars;
if (op_array) {
zend_op *opline = &(op_array->opcodes[0]);
@@ -81,22 +80,15 @@ static inline void phpdbg_print_function_helper(zend_function *method) /* {{{ */
op_array->last);
}
- zend_hash_init(&vars, op_array->last, NULL, NULL, 0);
do {
- char *decode = phpdbg_decode_opline(op_array, opline, &vars);
- if (decode != NULL) {
- phpdbg_writeln("print", "line=\"%u\" opnum=\"%u\" opcode=\"%s\" op=\"%s\"", " L%-4u #%-5u %-23s %s",
- opline->lineno,
- opcode,
- phpdbg_decode_opcode(opline->opcode) + 5, /* remove ZEND_ prefix */
- decode);
- free(decode);
- } else {
- phpdbg_error("print", "type=\"decodefailure\" opline=\"%16p\"", "Failed to decode opline %16p", opline);
- }
+ char *decode = phpdbg_decode_opline(op_array, opline);
+ phpdbg_writeln("print", "line=\"%u\" opnum=\"%u\" op=\"%s\"", " L%-4u #%-5u %s",
+ opline->lineno,
+ opcode,
+ decode);
+ efree(decode);
opline++;
} while (opcode++ < end);
- zend_hash_destroy(&vars);
}
} break;
@@ -132,7 +124,7 @@ return SUCCESS;
PHPDBG_PRINT(stack) /* {{{ */
{
if (PHPDBG_G(in_execution) && EG(current_execute_data)) {
- zend_op_array *ops = &EG(current_execute_data)->func->op_array;
+ zend_op_array *ops = &phpdbg_user_execute_data(EG(current_execute_data))->func->op_array;
if (ops->function_name) {
if (ops->scope) {
phpdbg_notice("printinfo", "method=\"%s::%s\" num=\"%d\"", "Stack in %s::%s() (%d ops)", ZSTR_VAL(ops->scope->name), ZSTR_VAL(ops->function_name), ops->last);
@@ -225,11 +217,13 @@ PHPDBG_PRINT(func) /* {{{ */
zend_string *lcname;
/* search active scope if begins with period */
if (func_name[0] == '.') {
- if (EG(scope)) {
+ zend_class_entry *scope = zend_get_executed_scope();
+
+ if (scope) {
func_name++;
func_name_len--;
- func_table = &EG(scope)->function_table;
+ func_table = &scope->function_table;
} else {
phpdbg_error("inactive", "type=\"noclasses\"", "No active class");
return SUCCESS;
@@ -274,23 +268,27 @@ void phpdbg_print_opcodes_function(const char *function, size_t len) {
zend_function *func = zend_hash_str_find_ptr(EG(function_table), function, len);
if (!func) {
+ zend_string *rt_name;
+ ZEND_HASH_FOREACH_STR_KEY_PTR(EG(class_table), rt_name, func) {
+ if (func->type == ZEND_USER_FUNCTION && *rt_name->val == '\0') {
+ if (func->op_array.function_name->len == len && !zend_binary_strcasecmp(function, len, func->op_array.function_name->val, func->op_array.function_name->len)) {
+ phpdbg_print_opcodes_function(rt_name->val, rt_name->len);
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+
return;
}
- phpdbg_out("function name: %.*s\n", (int) len, function);
+ phpdbg_out("function name: %.*s\n", (int) ZSTR_LEN(func->op_array.function_name), ZSTR_VAL(func->op_array.function_name));
phpdbg_print_function_helper(func);
}
-void phpdbg_print_opcodes_method(const char *class, const char *function) {
- zend_class_entry *ce;
+static void phpdbg_print_opcodes_method_ce(zend_class_entry *ce, const char *function) {
zend_function *func;
- if (phpdbg_safe_class_lookup(class, strlen(class), &ce) != SUCCESS) {
- return;
- }
-
if (ce->type != ZEND_USER_CLASS) {
- phpdbg_out("function name: %s::%s (internal)\n", class, function);
+ phpdbg_out("function name: %s::%s (internal)\n", ce->name->val, function);
return;
}
@@ -298,20 +296,34 @@ void phpdbg_print_opcodes_method(const char *class, const char *function) {
return;
}
- phpdbg_out("function name: %s::%s\n", class, function);
+ phpdbg_out("function name: %s::%s\n", ce->name->val, function);
phpdbg_print_function_helper(func);
}
-void phpdbg_print_opcodes_class(const char *class) {
+void phpdbg_print_opcodes_method(const char *class, const char *function) {
zend_class_entry *ce;
- zend_function *method;
- zend_string *method_name;
- zend_bool first = 1;
if (phpdbg_safe_class_lookup(class, strlen(class), &ce) != SUCCESS) {
+ zend_string *rt_name;
+ ZEND_HASH_FOREACH_STR_KEY_PTR(EG(class_table), rt_name, ce) {
+ if (ce->type == ZEND_USER_CLASS && *rt_name->val == '\0') {
+ if (ce->name->len == strlen(class) && !zend_binary_strcasecmp(class, strlen(class), ce->name->val, ce->name->len)) {
+ phpdbg_print_opcodes_method_ce(ce, function);
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+
return;
}
+ phpdbg_print_opcodes_method_ce(ce, function);
+}
+
+static void phpdbg_print_opcodes_ce(zend_class_entry *ce) {
+ zend_function *method;
+ zend_string *method_name;
+ zend_bool first = 1;
+
phpdbg_out("%s %s: %s\n",
(ce->type == ZEND_USER_CLASS) ?
"user" : "internal",
@@ -341,16 +353,32 @@ void phpdbg_print_opcodes_class(const char *class) {
phpdbg_out("\n");
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, method_name, method) {
- phpdbg_out("\nfunction name: %s\n", method_name);
+ phpdbg_out("\nfunction name: %s\n", ZSTR_VAL(method_name));
phpdbg_print_function_helper(method);
} ZEND_HASH_FOREACH_END();
}
+void phpdbg_print_opcodes_class(const char *class) {
+ zend_class_entry *ce;
+
+ if (phpdbg_safe_class_lookup(class, strlen(class), &ce) != SUCCESS) {
+ zend_string *rt_name;
+ ZEND_HASH_FOREACH_STR_KEY_PTR(EG(class_table), rt_name, ce) {
+ if (ce->type == ZEND_USER_CLASS && *rt_name->val == '\0') {
+ if (ce->name->len == strlen(class) && !zend_binary_strcasecmp(class, strlen(class), ce->name->val, ce->name->len)) {
+ phpdbg_print_opcodes_ce(ce);
+ }
+ }
+ } ZEND_HASH_FOREACH_END();
+
+ return;
+ }
+
+ phpdbg_print_opcodes_ce(ce);
+}
+
PHPDBG_API void phpdbg_print_opcodes(char *function)
{
- char *method_name;
- strtok(function, ":");
-
if (function == NULL) {
phpdbg_print_opcodes_main();
} else if (function[0] == '*' && function[1] == 0) {
@@ -368,17 +396,26 @@ PHPDBG_API void phpdbg_print_opcodes(char *function)
}
} ZEND_HASH_FOREACH_END();
- ZEND_HASH_FOREACH_STR_KEY_PTR(EG(class_table), name, ce) {
+ ZEND_HASH_FOREACH_PTR(EG(class_table), ce) {
if (ce->type == ZEND_USER_CLASS) {
phpdbg_out("\n\n");
- phpdbg_print_opcodes_class(ZSTR_VAL(name));
+ phpdbg_print_opcodes_ce(ce);
}
} ZEND_HASH_FOREACH_END();
- } else if ((method_name = strtok(NULL, ":")) == NULL) {
- phpdbg_print_opcodes_function(function, strlen(function));
- } else if ((method_name + 1) == NULL) {
- phpdbg_print_opcodes_class(function);
} else {
- phpdbg_print_opcodes_method(function, method_name);
+ function = zend_str_tolower_dup(function, strlen(function));
+
+ if (strstr(function, "::") == NULL) {
+ phpdbg_print_opcodes_function(function, strlen(function));
+ } else {
+ char *method_name, *class_name = strtok(function, "::");
+ if ((method_name = strtok(NULL, "::")) == NULL) {
+ phpdbg_print_opcodes_class(class_name);
+ } else {
+ phpdbg_print_opcodes_method(class_name, method_name);
+ }
+ }
+
+ efree(function);
}
}
diff --git a/sapi/phpdbg/phpdbg_print.h b/sapi/phpdbg/phpdbg_print.h
index 029c15946f..b8e18fedaf 100644
--- a/sapi/phpdbg/phpdbg_print.h
+++ b/sapi/phpdbg/phpdbg_print.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index db44a2ef32..2ca1368751 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,6 +25,7 @@
#include "zend_exceptions.h"
#include "zend_vm.h"
#include "zend_generators.h"
+#include "zend_interfaces.h"
#include "phpdbg.h"
#include "phpdbg_help.h"
@@ -47,7 +48,7 @@
#error "phpdbg can only be built with CALL zend vm kind"
#endif
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
extern int phpdbg_startup_run;
#ifdef HAVE_LIBDL
@@ -119,8 +120,7 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */
ZVAL_STRINGL(&fci.function_name, lc_name, name->len);
fci.size = sizeof(zend_fcall_info);
- fci.function_table = &PHPDBG_G(registered);
- fci.symbol_table = zend_rebuild_symbol_table();
+ //???fci.symbol_table = zend_rebuild_symbol_table();
fci.object = NULL;
fci.retval = &fretval;
fci.no_separation = 1;
@@ -349,7 +349,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /
char *sys_ini;
int i;
- asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH);
+ ZEND_IGNORE_VALUE(asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH));
phpdbg_try_file_init(sys_ini, strlen(sys_ini), 0);
free(sys_ini);
@@ -368,7 +368,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /
scan_dir[i] = 0;
}
- asprintf(&init_file, "%s/%s", scan_dir, PHPDBG_INIT_FILENAME);
+ ZEND_IGNORE_VALUE(asprintf(&init_file, "%s/%s", scan_dir, PHPDBG_INIT_FILENAME));
phpdbg_try_file_init(init_file, strlen(init_file), 1);
if (i == -1) {
break;
@@ -383,6 +383,20 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /
}
/* }}} */
+void phpdbg_clean(zend_bool full) /* {{{ */
+{
+ /* this is implicitly required */
+ if (PHPDBG_G(ops)) {
+ destroy_op_array(PHPDBG_G(ops));
+ efree(PHPDBG_G(ops));
+ PHPDBG_G(ops) = NULL;
+ }
+
+ if (full) {
+ PHPDBG_G(flags) |= PHPDBG_IS_CLEANING;
+ }
+} /* }}} */
+
PHPDBG_COMMAND(exec) /* {{{ */
{
zend_stat_t sb;
@@ -417,12 +431,13 @@ PHPDBG_COMMAND(exec) /* {{{ */
VCWD_CHDIR_FILE(res);
*SG(request_info).argv = PHPDBG_G(exec);
- php_hash_environment();
+ php_build_argv(NULL, &PG(http_globals)[TRACK_VARS_SERVER]);
phpdbg_notice("exec", "type=\"set\" context=\"%s\"", "Set execution context: %s", PHPDBG_G(exec));
if (PHPDBG_G(in_execution)) {
phpdbg_clean(1);
+ return SUCCESS;
}
phpdbg_compile();
@@ -441,14 +456,36 @@ PHPDBG_COMMAND(exec) /* {{{ */
int phpdbg_compile(void) /* {{{ */
{
zend_file_handle fh;
+ char *buf;
+ size_t len;
if (!PHPDBG_G(exec)) {
phpdbg_error("inactive", "type=\"nocontext\"", "No execution context");
return FAILURE;
}
- if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS) {
+ if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) {
+ /* Skip #! line */
+ if (len >= 3 && buf[0] == '#' && buf[1] == '!') {
+ char *end = buf + len;
+ do {
+ switch (fh.handle.stream.mmap.buf++[0]) {
+ case '\r':
+ if (fh.handle.stream.mmap.buf[0] == '\n') {
+ fh.handle.stream.mmap.buf++;
+ }
+ case '\n':
+ CG(start_lineno) = 2;
+ fh.handle.stream.mmap.len -= fh.handle.stream.mmap.buf - buf;
+ end = fh.handle.stream.mmap.buf;
+ }
+ } while (fh.handle.stream.mmap.buf + 1 < end);
+ }
+
PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE);
+
+ fh.handle.stream.mmap.buf = buf;
+ fh.handle.stream.mmap.len = len;
zend_destroy_file_handle(&fh);
if (EG(exception)) {
zend_exception_error(EG(exception), E_ERROR);
@@ -480,26 +517,24 @@ PHPDBG_COMMAND(continue) /* {{{ */
} /* }}} */
int phpdbg_skip_line_helper() /* {{{ */ {
+ zend_execute_data *ex = phpdbg_user_execute_data(EG(current_execute_data));
+ const zend_op_array *op_array = &ex->func->op_array;
+ const zend_op *opline = op_array->opcodes;
+
PHPDBG_G(flags) |= PHPDBG_IN_UNTIL;
- PHPDBG_G(seek_ex) = EG(current_execute_data);
- {
- const zend_op *opline = EG(current_execute_data)->opline;
- const zend_op_array *op_array = &EG(current_execute_data)->func->op_array;
-
- while (++opline < op_array->opcodes + op_array->last) {
- if (opline->lineno != EG(current_execute_data)->opline->lineno
- || opline->opcode == ZEND_RETURN
- || opline->opcode == ZEND_FAST_RET
- || opline->opcode == ZEND_GENERATOR_RETURN
- || opline->opcode == ZEND_EXIT
- || opline->opcode == ZEND_YIELD
- || opline->opcode == ZEND_YIELD_FROM
- ) {
- zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline);
- break;
- }
+ PHPDBG_G(seek_ex) = ex;
+ do {
+ if (opline->lineno != ex->opline->lineno
+ || opline->opcode == ZEND_RETURN
+ || opline->opcode == ZEND_FAST_RET
+ || opline->opcode == ZEND_GENERATOR_RETURN
+ || opline->opcode == ZEND_EXIT
+ || opline->opcode == ZEND_YIELD
+ || opline->opcode == ZEND_YIELD_FROM
+ ) {
+ zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline);
}
- }
+ } while (++opline < op_array->opcodes + op_array->last);
return PHPDBG_UNTIL;
}
@@ -527,11 +562,12 @@ PHPDBG_COMMAND(next) /* {{{ */
} /* }}} */
static void phpdbg_seek_to_end(void) /* {{{ */ {
- const zend_op *opline = EG(current_execute_data)->opline;
- const zend_op_array *op_array = &EG(current_execute_data)->func->op_array - 1;
+ zend_execute_data *ex = phpdbg_user_execute_data(EG(current_execute_data));
+ const zend_op_array *op_array = &ex->func->op_array;
+ const zend_op *opline = op_array->opcodes;
- PHPDBG_G(seek_ex) = EG(current_execute_data);
- while (++opline < op_array->opcodes + op_array->last) {
+ PHPDBG_G(seek_ex) = ex;
+ do {
switch (opline->opcode) {
case ZEND_RETURN:
case ZEND_FAST_RET:
@@ -540,9 +576,8 @@ static void phpdbg_seek_to_end(void) /* {{{ */ {
case ZEND_YIELD:
case ZEND_YIELD_FROM:
zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline);
- return;
}
- }
+ } while (++opline < op_array->opcodes + op_array->last);
}
/* }}} */
@@ -553,8 +588,12 @@ PHPDBG_COMMAND(finish) /* {{{ */
return SUCCESS;
}
- PHPDBG_G(flags) |= PHPDBG_IN_FINISH;
phpdbg_seek_to_end();
+ if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execute_data))->opline)) {
+ zend_hash_clean(&PHPDBG_G(seek));
+ } else {
+ PHPDBG_G(flags) |= PHPDBG_IN_FINISH;
+ }
return PHPDBG_FINISH;
} /* }}} */
@@ -566,10 +605,15 @@ PHPDBG_COMMAND(leave) /* {{{ */
return SUCCESS;
}
- PHPDBG_G(flags) |= PHPDBG_IN_LEAVE;
phpdbg_seek_to_end();
-
- return PHPDBG_LEAVE;
+ if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execute_data))->opline)) {
+ zend_hash_clean(&PHPDBG_G(seek));
+ phpdbg_notice("leave", "type=\"end\"", "Already at the end of the function");
+ return SUCCESS;
+ } else {
+ PHPDBG_G(flags) |= PHPDBG_IN_LEAVE;
+ return PHPDBG_LEAVE;
+ }
} /* }}} */
PHPDBG_COMMAND(frame) /* {{{ */
@@ -585,47 +629,40 @@ PHPDBG_COMMAND(frame) /* {{{ */
static inline void phpdbg_handle_exception(void) /* {{{ */
{
- zend_fcall_info fci;
- zval trace;
zend_object *ex = EG(exception);
-
- /* get filename and linenumber before unsetting exception */
- /* not really useful??? see blow
- const char *filename = zend_get_executed_filename();
- uint32_t lineno = zend_get_executed_lineno();
- */
+ zend_string *msg, *file;
+ zend_long line;
+ zval zv, rv, tmp;
EG(exception) = NULL;
- /* call __toString */
- ZVAL_STRINGL(&fci.function_name, "__tostring", sizeof("__tostring") - 1);
- fci.size = sizeof(fci);
- fci.function_table = &ex->ce->function_table;
- fci.symbol_table = NULL;
- fci.object = ex;
- fci.retval = &trace;
- fci.param_count = 0;
- fci.params = NULL;
- fci.no_separation = 1;
- if (zend_call_function(&fci, NULL) == SUCCESS) {
- phpdbg_writeln("exception", "name=\"%s\" trace=\"%.*s\"", "Uncaught %s!\n%.*s", ZSTR_VAL(ex->ce->name), Z_STRLEN(trace), Z_STRVAL(trace));
-
- zval_ptr_dtor(&trace);
+ ZVAL_OBJ(&zv, ex);
+ zend_call_method_with_0_params(&zv, ex->ce, NULL, "__tostring", &tmp);
+ file = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("file"), 1, &rv));
+ line = zval_get_long(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("line"), 1, &rv));
+
+ if (EG(exception)) {
+ EG(exception) = NULL;
+ msg = ZSTR_EMPTY_ALLOC();
} else {
- phpdbg_error("exception", "name=\"%s\"", "Uncaught %s!", ZSTR_VAL(ex->ce->name));
+ zend_update_property_string(zend_get_exception_base(&zv), &zv, ZEND_STRL("string"), Z_STRVAL(tmp));
+ zval_ptr_dtor(&tmp);
+ msg = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("string"), 1, &rv));
}
- /* output useful information about address */
-/* not really useful ???
- phpdbg_writeln("exception", "opline=\"%p\" file=\"%s\" line=\"%u\"", "Stack entered at %p in %s on line %u", PHPDBG_G(ops)->opcodes, filename, lineno); */
+ phpdbg_error("exception", "name=\"%s\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"", "Uncaught %s in %s on line " ZEND_LONG_FMT, ZSTR_VAL(ex->ce->name), ZSTR_VAL(file), line);
+ zend_string_release(file);
+ phpdbg_writeln("exceptionmsg", "msg=\"%s\"", "%s", ZSTR_VAL(msg));
+ zend_string_release(msg);
- zval_dtor(&fci.function_name);
if (EG(prev_exception)) {
OBJ_RELEASE(EG(prev_exception));
EG(prev_exception) = 0;
}
OBJ_RELEASE(ex);
EG(opline_before_exception) = NULL;
+
+ EG(exit_status) = 255;
} /* }}} */
PHPDBG_COMMAND(run) /* {{{ */
@@ -650,7 +687,7 @@ PHPDBG_COMMAND(run) /* {{{ */
}
/* clean up from last execution */
- if (ex && ex->symbol_table) {
+ if (ex && (ZEND_CALL_INFO(ex) & ZEND_CALL_HAS_SYMBOL_TABLE)) {
zend_hash_clean(ex->symbol_table);
} else {
zend_rebuild_symbol_table();
@@ -668,6 +705,7 @@ PHPDBG_COMMAND(run) /* {{{ */
char **argv = emalloc(5 * sizeof(char *));
int argc = 0;
int i;
+ /* TODO allow proper escaping with \, "" and '' here */
char *argv_str = strtok(param->str, " ");
while (argv_str) {
@@ -686,7 +724,7 @@ PHPDBG_COMMAND(run) /* {{{ */
SG(request_info).argv = erealloc(argv, ++argc * sizeof(char *));
SG(request_info).argc = argc;
- php_hash_environment();
+ php_build_argv(NULL, &PG(http_globals)[TRACK_VARS_SERVER]);
}
zend_try {
@@ -697,13 +735,10 @@ PHPDBG_COMMAND(run) /* {{{ */
} zend_catch {
PHPDBG_G(in_execution) = 0;
- if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
- zend_bailout();
- }
-
if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) {
- phpdbg_error("stop", "type=\"bailout\"", "Caught exit/error from VM");
restore = 0;
+ } else {
+ zend_bailout();
}
} zend_end_try();
@@ -713,14 +748,26 @@ PHPDBG_COMMAND(run) /* {{{ */
}
if (restore) {
+ zend_exception_restore();
+ zend_try {
+ zend_try_exception_handler();
+ PHPDBG_G(in_execution) = 1;
+ } zend_catch {
+ PHPDBG_G(in_execution) = 0;
+
+ if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) {
+ zend_bailout();
+ }
+ } zend_end_try();
+
if (EG(exception)) {
phpdbg_handle_exception();
}
}
- phpdbg_clean(1);
-
PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING;
+
+ phpdbg_clean(1);
} else {
phpdbg_error("inactive", "type=\"nocontext\"", "Nothing to execute!");
}
@@ -750,8 +797,8 @@ PHPDBG_COMMAND(ev) /* {{{ */
zval retval;
zend_execute_data *original_execute_data = EG(current_execute_data);
- zend_class_entry *original_scope = EG(scope);
zend_vm_stack original_stack = EG(vm_stack);
+ zend_object *ex = NULL;
PHPDBG_OUTPUT_BACKUP();
@@ -776,23 +823,33 @@ PHPDBG_COMMAND(ev) /* {{{ */
PHPDBG_G(flags) |= PHPDBG_IN_EVAL;
zend_try {
if (zend_eval_stringl(param->str, param->len, &retval, "eval()'d code") == SUCCESS) {
- phpdbg_xml("<eval %r>");
- if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) {
- zval *zvp = &retval;
- phpdbg_xml_var_dump(zvp);
+ if (EG(exception)) {
+ ex = EG(exception);
+ zend_exception_error(EG(exception), E_ERROR);
+ } else {
+ phpdbg_xml("<eval %r>");
+ if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) {
+ zval *zvp = &retval;
+ phpdbg_xml_var_dump(zvp);
+ }
+ zend_print_zval_r(&retval, 0);
+ phpdbg_xml("</eval>");
+ phpdbg_out("\n");
+ zval_ptr_dtor(&retval);
}
- zend_print_zval_r(&retval, 0);
- phpdbg_xml("</eval>");
- phpdbg_out("\n");
- zval_ptr_dtor(&retval);
}
} zend_catch {
+ PHPDBG_G(unclean_eval) = 1;
+ if (ex) {
+ OBJ_RELEASE(ex);
+ }
EG(current_execute_data) = original_execute_data;
- EG(scope) = original_scope;
EG(vm_stack_top) = original_stack->top;
EG(vm_stack_end) = original_stack->end;
EG(vm_stack) = original_stack;
+ EG(exit_status) = 0;
} zend_end_try();
+
PHPDBG_G(flags) &= ~PHPDBG_IN_EVAL;
/* switch stepping back on */
@@ -987,7 +1044,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
if (!handle) {
#if PHP_WIN32
char *err = GET_DL_ERROR();
- if (err && *err != "") {
+ if (err && err[0]) {
phpdbg_error("dl", "type=\"unknown\"", "%s", err);
LocalFree(err);
} else {
@@ -1188,14 +1245,10 @@ PHPDBG_COMMAND(register) /* {{{ */
PHPDBG_COMMAND(quit) /* {{{ */
{
- /* don't allow this to loop, ever ... */
- if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) {
- PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
- PHPDBG_G(flags) &= ~(PHPDBG_IS_RUNNING | PHPDBG_IS_CLEANING);
- zend_bailout();
- }
+ PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
+ PHPDBG_G(flags) &= ~PHPDBG_IS_CLEANING;
- return PHPDBG_NEXT;
+ return SUCCESS;
} /* }}} */
PHPDBG_COMMAND(clean) /* {{{ */
@@ -1214,8 +1267,6 @@ PHPDBG_COMMAND(clean) /* {{{ */
phpdbg_writeln("clean", "constants=\"%d\"", "Constants %d", zend_hash_num_elements(EG(zend_constants)));
phpdbg_writeln("clean", "includes=\"%d\"", "Includes %d", zend_hash_num_elements(&EG(included_files)));
- PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING;
-
phpdbg_clean(1);
phpdbg_xml("</cleaninfo>");
@@ -1294,7 +1345,7 @@ int phpdbg_interactive(zend_bool allow_async_unsafe) /* {{{ */
PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE;
while (ret == SUCCESS || ret == FAILURE) {
- if ((PHPDBG_G(flags) & (PHPDBG_IS_STOPPING | PHPDBG_IS_RUNNING)) == PHPDBG_IS_STOPPING) {
+ if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) {
zend_bailout();
}
@@ -1369,25 +1420,15 @@ int phpdbg_interactive(zend_bool allow_async_unsafe) /* {{{ */
return ret;
} /* }}} */
-void phpdbg_clean(zend_bool full) /* {{{ */
-{
- /* this is implicitly required */
- if (PHPDBG_G(ops)) {
- destroy_op_array(PHPDBG_G(ops));
- efree(PHPDBG_G(ops));
- PHPDBG_G(ops) = NULL;
- }
-
- if (full) {
- PHPDBG_G(flags) |= PHPDBG_IS_CLEANING;
-
- zend_bailout();
- }
-} /* }}} */
-
-/* code may behave weirdly if EG(exception) is set */
+/* code may behave weirdly if EG(exception) is set; thus backup it */
#define DO_INTERACTIVE(allow_async_unsafe) do { \
+ const zend_op *backup_opline; \
+ const zend_op *before_ex; \
if (exception) { \
+ if (EG(current_execute_data) && EG(current_execute_data)->func && ZEND_USER_CODE(EG(current_execute_data)->func->common.type)) { \
+ backup_opline = EG(current_execute_data)->opline; \
+ } \
+ before_ex = EG(opline_before_exception); \
++GC_REFCOUNT(exception); \
zend_clear_exception(); \
} \
@@ -1400,27 +1441,30 @@ void phpdbg_clean(zend_bool full) /* {{{ */
\
switch (phpdbg_interactive(allow_async_unsafe)) { \
zval zv; \
- default: \
- if (exception) { \
- Z_OBJ(zv) = exception; \
- zend_throw_exception_internal(&zv); \
- } \
- /* fallthrough */ \
case PHPDBG_LEAVE: \
case PHPDBG_FINISH: \
case PHPDBG_UNTIL: \
- case PHPDBG_NEXT:{ \
+ case PHPDBG_NEXT: \
+ if (exception) { \
+ if (EG(current_execute_data) && EG(current_execute_data)->func && ZEND_USER_CODE(EG(current_execute_data)->func->common.type) \
+ && (backup_opline->opcode == ZEND_HANDLE_EXCEPTION || backup_opline->opcode == ZEND_CATCH)) { \
+ EG(current_execute_data)->opline = backup_opline; \
+ EG(exception) = exception; \
+ } else { \
+ Z_OBJ(zv) = exception; \
+ zend_throw_exception_internal(&zv); \
+ } \
+ EG(opline_before_exception) = before_ex; \
+ } \
+ /* fallthrough */ \
+ default: \
goto next; \
- } \
} \
} while (0)
void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
{
zend_bool original_in_execution = PHPDBG_G(in_execution);
- HashTable vars;
-
- zend_hash_init(&vars, execute_data->func->op_array.last, NULL, NULL, 0);
if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) && !(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) {
zend_bailout();
@@ -1442,11 +1486,16 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
}
#endif
+ if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) {
+ phpdbg_print_opline_ex(execute_data, 0);
+ goto next;
+ }
+
/* check for uncaught exceptions */
- if (exception && PHPDBG_G(handled_exception) != exception) {
+ if (exception && PHPDBG_G(handled_exception) != exception && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
zend_execute_data *prev_ex = execute_data;
zval zv, rv;
- zend_string *file;
+ zend_string *file, *msg;
zend_long line;
do {
@@ -1466,23 +1515,28 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
ZVAL_OBJ(&zv, exception);
file = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("file"), 1, &rv));
line = zval_get_long(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("line"), 1, &rv));
-
- phpdbg_error("exception", "name=\"%s\" file=\"%s\" line=\"%lld\"", "Uncaught exception %s in %s on line %lld", ZSTR_VAL(exception->ce->name), ZSTR_VAL(file), line);
+ msg = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("message"), 1, &rv));
+
+ phpdbg_error("exception",
+ "name=\"%s\" file=\"%s\" line=\"" ZEND_LONG_FMT "\"",
+ "Uncaught %s in %s on line " ZEND_LONG_FMT ": %.*s",
+ ZSTR_VAL(exception->ce->name), ZSTR_VAL(file), line,
+ ZSTR_LEN(msg) < 80 ? (int) ZSTR_LEN(msg) : 80, ZSTR_VAL(msg));
+ zend_string_release(msg);
zend_string_release(file);
+
DO_INTERACTIVE(1);
}
ex_is_caught:
- /* allow conditional breakpoints and
- initialization to access the vm uninterrupted */
- if ((PHPDBG_G(flags) & PHPDBG_IN_COND_BP) ||
- (PHPDBG_G(flags) & PHPDBG_IS_INITIALIZING)) {
+ /* allow conditional breakpoints and initialization to access the vm uninterrupted */
+ if (PHPDBG_G(flags) & (PHPDBG_IN_COND_BP | PHPDBG_IS_INITIALIZING)) {
/* skip possible breakpoints */
goto next;
}
/* perform seek operation */
- if (PHPDBG_G(flags) & PHPDBG_SEEK_MASK) {
+ if ((PHPDBG_G(flags) & PHPDBG_SEEK_MASK) && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
/* current address */
zend_ulong address = (zend_ulong) execute_data->opline;
@@ -1531,7 +1585,7 @@ ex_is_caught:
}
/* not while in conditionals */
- phpdbg_print_opline_ex(execute_data, &vars, 0);
+ phpdbg_print_opline_ex(execute_data, 0);
if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING && (PHPDBG_G(flags) & PHPDBG_STEP_OPCODE || execute_data->opline->lineno != PHPDBG_G(last_line))) {
PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING;
@@ -1576,12 +1630,11 @@ next:
execute_data->call->func->type == ZEND_USER_FUNCTION) {
zend_execute_ex = execute_ex;
}
- PHPDBG_G(vmret) = zend_vm_call_opcode_handler(execute_data);
+ PHPDBG_G(vmret) = zend_vm_call_opcode_handler(execute_data);
zend_execute_ex = phpdbg_execute_ex;
if (PHPDBG_G(vmret) != 0) {
if (PHPDBG_G(vmret) < 0) {
- zend_hash_destroy(&vars);
PHPDBG_G(in_execution) = original_in_execution;
return;
} else {
@@ -1601,7 +1654,13 @@ void phpdbg_force_interruption(void) /* {{{ */ {
if (data) {
if (data->func) {
- phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array.opcodes) / sizeof(data->opline), data->func->op_array.filename, data->opline->lineno);
+ if (ZEND_USER_CODE(data->func->type)) {
+ phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array.opcodes) / sizeof(data->opline), data->func->op_array.filename->val, data->opline->lineno);
+ } else if (data->func->internal_function.function_name) {
+ phpdbg_notice("hardinterrupt", "func=\"%s\"", "Current opline: in internal function %s", data->func->internal_function.function_name->val);
+ } else {
+ phpdbg_notice("hardinterrupt", "", "Current opline: executing internal code");
+ }
} else {
phpdbg_notice("hardinterrupt", "opline=\"%p\"", "Current opline: %p (op_array information unavailable)", data->opline);
}
diff --git a/sapi/phpdbg/phpdbg_prompt.h b/sapi/phpdbg/phpdbg_prompt.h
index 25c0b4f71f..c17e7185ce 100644
--- a/sapi/phpdbg/phpdbg_prompt.h
+++ b/sapi/phpdbg/phpdbg_prompt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -27,7 +27,6 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default);
void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init);
int phpdbg_interactive(zend_bool allow_async_unsafe);
int phpdbg_compile(void);
-void phpdbg_clean(zend_bool full);
void phpdbg_force_interruption(void);
/* }}} */
@@ -64,11 +63,6 @@ PHPDBG_COMMAND(wait); /* }}} */
/* {{{ prompt commands */
extern const phpdbg_command_t phpdbg_prompt_commands[]; /* }}} */
-/* {{{ */
-#if PHP_VERSION_ID >= 50500
void phpdbg_execute_ex(zend_execute_data *execute_data);
-#else
-void phpdbg_execute_ex(zend_op_array *op_array);
-#endif /* }}} */
#endif /* PHPDBG_PROMPT_H */
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c
index 248b8a323e..e0693acbbf 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.c
+++ b/sapi/phpdbg/phpdbg_rinit_hook.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.h b/sapi/phpdbg/phpdbg_rinit_hook.h
index 69d4f61285..2e56df17a9 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.h
+++ b/sapi/phpdbg/phpdbg_rinit_hook.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_set.c b/sapi/phpdbg/phpdbg_set.c
index f91156a452..47ecbd08b6 100644
--- a/sapi/phpdbg/phpdbg_set.c
+++ b/sapi/phpdbg/phpdbg_set.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -25,13 +25,14 @@
#include "phpdbg_bp.h"
#include "phpdbg_prompt.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define PHPDBG_SET_COMMAND_D(f, h, a, m, l, s, flags) \
PHPDBG_COMMAND_D_EXP(f, h, a, m, l, s, &phpdbg_prompt_commands[17], flags)
const phpdbg_command_t phpdbg_set_commands[] = {
PHPDBG_SET_COMMAND_D(prompt, "usage: set prompt [<string>]", 'p', set_prompt, NULL, "|s", 0),
+ PHPDBG_SET_COMMAND_D(pagination, "usage: set pagination [<on|off>]", 'P', set_pagination, NULL, "|b", PHPDBG_ASYNC_SAFE),
#ifndef _WIN32
PHPDBG_SET_COMMAND_D(color, "usage: set color <element> <color>", 'c', set_color, NULL, "ss", PHPDBG_ASYNC_SAFE),
PHPDBG_SET_COMMAND_D(colors, "usage: set colors [<on|off>]", 'C', set_colors, NULL, "|b", PHPDBG_ASYNC_SAFE),
@@ -42,6 +43,7 @@ const phpdbg_command_t phpdbg_set_commands[] = {
PHPDBG_SET_COMMAND_D(quiet, "usage: set quiet [<on|off>]", 'q', set_quiet, NULL, "|b", PHPDBG_ASYNC_SAFE),
PHPDBG_SET_COMMAND_D(stepping, "usage: set stepping [<line|op>]", 's', set_stepping, NULL, "|s", PHPDBG_ASYNC_SAFE),
PHPDBG_SET_COMMAND_D(refcount, "usage: set refcount [<on|off>]", 'r', set_refcount, NULL, "|b", PHPDBG_ASYNC_SAFE),
+ PHPDBG_SET_COMMAND_D(lines, "usage: set lines [<number>]", 'l', set_lines, NULL, "|l", PHPDBG_ASYNC_SAFE),
PHPDBG_END_COMMAND
};
@@ -56,6 +58,42 @@ PHPDBG_SET(prompt) /* {{{ */
return SUCCESS;
} /* }}} */
+PHPDBG_SET(pagination) /* {{{ */
+{
+ if (!param || param->type == EMPTY_PARAM) {
+ phpdbg_writeln("setpagination", "active=\"%s\"", "Pagination %s", PHPDBG_G(flags) & PHPDBG_HAS_PAGINATION ? "on" : "off");
+ } else switch (param->type) {
+ case NUMERIC_PARAM: {
+ if (param->num) {
+ PHPDBG_G(flags) |= PHPDBG_HAS_PAGINATION;
+ } else {
+ PHPDBG_G(flags) &= ~PHPDBG_HAS_PAGINATION;
+ }
+ } break;
+
+ default:
+ phpdbg_error("setpagination", "type=\"wrongargs\"", "set pagination used incorrectly: set pagination <on|off>");
+ }
+
+ return SUCCESS;
+} /* }}} */
+
+PHPDBG_SET(lines) /* {{{ */
+{
+ if (!param || param->type == EMPTY_PARAM) {
+ phpdbg_writeln("setlines", "active=\"%s\"", "Lines %ld", PHPDBG_G(lines));
+ } else switch (param->type) {
+ case NUMERIC_PARAM: {
+ PHPDBG_G(lines) = param->num;
+ } break;
+
+ default:
+ phpdbg_error("setlines", "type=\"wrongargs\"", "set lines used incorrectly: set lines <number>");
+ }
+
+ return SUCCESS;
+} /* }}} */
+
PHPDBG_SET(break) /* {{{ */
{
switch (param->type) {
diff --git a/sapi/phpdbg/phpdbg_set.h b/sapi/phpdbg/phpdbg_set.h
index 9b2e1ce14e..e1c0105e40 100644
--- a/sapi/phpdbg/phpdbg_set.h
+++ b/sapi/phpdbg/phpdbg_set.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -36,6 +36,8 @@ PHPDBG_SET(breaks);
PHPDBG_SET(quiet);
PHPDBG_SET(stepping);
PHPDBG_SET(refcount);
+PHPDBG_SET(pagination);
+PHPDBG_SET(lines);
extern const phpdbg_command_t phpdbg_set_commands[];
diff --git a/sapi/phpdbg/phpdbg_sigio_win32.c b/sapi/phpdbg/phpdbg_sigio_win32.c
index 8dde7c3cad..db334a0dc5 100644
--- a/sapi/phpdbg/phpdbg_sigio_win32.c
+++ b/sapi/phpdbg/phpdbg_sigio_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2014-2015 The PHP Group |
+ | Copyright (c) 2014-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -23,7 +23,7 @@
#include "phpdbg_sigio_win32.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
VOID
diff --git a/sapi/phpdbg/phpdbg_sigio_win32.h b/sapi/phpdbg/phpdbg_sigio_win32.h
index c0b190ba58..83b07d64b7 100644
--- a/sapi/phpdbg/phpdbg_sigio_win32.h
+++ b/sapi/phpdbg/phpdbg_sigio_win32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2014-2015 The PHP Group |
+ | Copyright (c) 2014-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_sigsafe.c b/sapi/phpdbg/phpdbg_sigsafe.c
index 319c9a5e75..2f987b3a15 100644
--- a/sapi/phpdbg/phpdbg_sigsafe.c
+++ b/sapi/phpdbg/phpdbg_sigsafe.c
@@ -1,25 +1,25 @@
#include "phpdbg_sigsafe.h"
#include "phpdbg.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
#define STR(x) #x
#define EXP_STR(x) STR(x)
static void* zend_mm_mem_alloc(zend_mm_storage *storage, size_t size, size_t alignment) {
- if (EXPECTED(size == PHPDBG_SIGSAFE_MEM_SIZE && !PHPDBG_G(sigsafe_mem).allocated)) {
+ if (EXPECTED(size <= PHPDBG_SIGSAFE_MEM_SIZE && !PHPDBG_G(sigsafe_mem).allocated)) {
PHPDBG_G(sigsafe_mem).allocated = 1;
- return PHPDBG_G(sigsafe_mem).mem;
+ return (void *) (((size_t) PHPDBG_G(sigsafe_mem).mem & ~(alignment - 1)) + alignment);
}
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(PHPDBG_SIGSAFE_MEM_SIZE) " bytes from stack memory in signal handler ... bailing out of signal handler\n"));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(PHPDBG_SIGSAFE_MEM_SIZE) " bytes from stack memory in signal handler ... bailing out of signal handler\n"));
if (*EG(bailout)) {
LONGJMP(*EG(bailout), FAILURE);
}
- write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address in signal handler!\n"));
+ quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address in signal handler!\n"));
return NULL;
}
diff --git a/sapi/phpdbg/phpdbg_sigsafe.h b/sapi/phpdbg/phpdbg_sigsafe.h
index e5d0f34b43..ab689a38d8 100644
--- a/sapi/phpdbg/phpdbg_sigsafe.h
+++ b/sapi/phpdbg/phpdbg_sigsafe.h
@@ -1,10 +1,7 @@
#ifndef PHPDBG_SIGSAFE_H
#define PHPDBG_SIGSAFE_H
-//#include "zend_mm_structs.h"
-
-#define PHPDBG_SIGSAFE_MEM_SIZE ZEND_MM_CHUNK_SIZE
-//(1 << 20)
+#define PHPDBG_SIGSAFE_MEM_SIZE (ZEND_MM_CHUNK_SIZE * 2)
#include "zend.h"
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c
index 112f340d6b..6f42665809 100644
--- a/sapi/phpdbg/phpdbg_utils.c
+++ b/sapi/phpdbg/phpdbg_utils.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -26,14 +26,19 @@
#include "phpdbg_utils.h"
#include "ext/standard/php_string.h"
-#if defined(HAVE_SYS_IOCTL_H)
-# include "sys/ioctl.h"
-# ifndef GWINSZ_IN_SYS_IOCTL
-# include <termios.h>
-# endif
+/* FASYNC under Solaris */
+#ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
#endif
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+#ifdef HAVE_SYS_IOCTL_H
+# include "sys/ioctl.h"
+# ifndef GWINSZ_IN_SYS_IOCTL
+# include <termios.h>
+# endif
+#endif
+
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
/* {{{ color structures */
const static phpdbg_color_t colors[] = {
@@ -166,16 +171,20 @@ PHPDBG_API const char *phpdbg_current_file(void) /* {{{ */
PHPDBG_API const zend_function *phpdbg_get_function(const char *fname, const char *cname) /* {{{ */
{
zend_function *func = NULL;
- zend_string *lfname = zend_string_alloc(strlen(fname), 0);
- memcpy(ZSTR_VAL(lfname), zend_str_tolower_dup(fname, ZSTR_LEN(lfname)), ZSTR_LEN(lfname) + 1);
+ zend_string *lfname = zend_string_init(fname, strlen(fname), 0);
+ zend_string *tmp = zend_string_tolower(lfname);
+ zend_string_release(lfname);
+ lfname = tmp;
if (cname) {
zend_class_entry *ce;
- zend_string *lcname = zend_string_alloc(strlen(cname), 0);
- memcpy(ZSTR_VAL(lcname), zend_str_tolower_dup(cname, ZSTR_LEN(lcname)), ZSTR_LEN(lcname) + 1);
+ zend_string *lcname = zend_string_init(cname, strlen(cname), 0);
+ tmp = zend_string_tolower(lcname);
+ zend_string_release(lcname);
+ lcname = tmp;
ce = zend_lookup_class(lcname);
- efree(lcname);
+ zend_string_release(lcname);
if (ce) {
func = zend_hash_find_ptr(&ce->function_table, lfname);
@@ -184,7 +193,7 @@ PHPDBG_API const zend_function *phpdbg_get_function(const char *fname, const cha
func = zend_hash_find_ptr(EG(function_table), lfname);
}
- efree(lfname);
+ zend_string_release(lfname);
return func;
} /* }}} */
@@ -298,16 +307,13 @@ PHPDBG_API const char *phpdbg_get_prompt(void) /* {{{ */
#ifndef HAVE_LIBEDIT
/* TODO: libedit doesn't seems to support coloured prompt */
if ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED)) {
- asprintf(
- &PHPDBG_G(prompt)[1], "\033[%sm%s\033[0m ",
+ ZEND_IGNORE_VALUE(asprintf(&PHPDBG_G(prompt)[1], "\033[%sm%s\033[0m ",
PHPDBG_G(colors)[PHPDBG_COLOR_PROMPT]->code,
- PHPDBG_G(prompt)[0]);
+ PHPDBG_G(prompt)[0]));
} else
#endif
{
- asprintf(
- &PHPDBG_G(prompt)[1], "%s ",
- PHPDBG_G(prompt)[0]);
+ ZEND_IGNORE_VALUE(asprintf(&PHPDBG_G(prompt)[1], "%s ", PHPDBG_G(prompt)[0]));
}
return PHPDBG_G(prompt)[1];
@@ -345,8 +351,26 @@ PHPDBG_API int phpdbg_get_terminal_width(void) /* {{{ */
return columns;
} /* }}} */
+PHPDBG_API int phpdbg_get_terminal_height(void) /* {{{ */
+{
+ int lines;
+#ifdef _WIN32
+ CONSOLE_SCREEN_BUFFER_INFO csbi;
+
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
+ lines = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
+#elif defined(HAVE_SYS_IOCTL_H) && defined(TIOCGWINSZ)
+ struct winsize w;
+
+ lines = ioctl(fileno(stdout), TIOCGWINSZ, &w) == 0 ? w.ws_row : 40;
+#else
+ lines = 40;
+#endif
+ return lines;
+} /* }}} */
+
PHPDBG_API void phpdbg_set_async_io(int fd) {
-#ifndef _WIN32
+#if !defined(_WIN32) && defined(FASYNC)
int flags;
fcntl(STDIN_FILENO, F_SETOWN, getpid());
flags = fcntl(STDIN_FILENO, F_GETFL);
@@ -460,11 +484,11 @@ PHPDBG_API int phpdbg_parse_variable_with_arg(char *input, size_t len, HashTable
key = ZSTR_VAL(strkey);
keylen = ZSTR_LEN(strkey);
} else {
- keylen = spprintf(&key, 0, "%llu", numkey);
+ keylen = spprintf(&key, 0, ZEND_ULONG_FMT, numkey);
}
propkey = phpdbg_get_property_key(key);
name = emalloc(i + keylen + 2);
- namelen = sprintf(name, "%.*s%.*s%s", (int) i, input, keylen - (propkey - key), propkey, input[len - 1] == ']'?"]":"");
+ namelen = sprintf(name, "%.*s%.*s%s", (int) i, input, (int) (keylen - (propkey - key)), propkey, input[len - 1] == ']'?"]":"");
if (!strkey) {
efree(key);
}
@@ -573,7 +597,7 @@ static int phpdbg_xml_array_element_dump(zval *zv, zend_string *key, zend_ulong
phpdbg_try_access {
if (key) { /* string key */
- phpdbg_xml(" name=\"%.*s\"", ZSTR_LEN(key), ZSTR_VAL(key));
+ phpdbg_xml(" name=\"%.*s\"", (int) ZSTR_LEN(key), ZSTR_VAL(key));
} else { /* numeric key */
phpdbg_xml(" name=\"%ld\"", num);
}
@@ -607,7 +631,7 @@ static int phpdbg_xml_object_property_dump(zval *zv, zend_string *key, zend_ulon
phpdbg_xml(" class=\"%s\" protection=\"private\"", class_name);
}
} else {
- phpdbg_xml(" name=\"%.*s\" protection=\"public\"", ZSTR_LEN(key), ZSTR_VAL(key));
+ phpdbg_xml(" name=\"%.*s\" protection=\"public\"", (int) ZSTR_LEN(key), ZSTR_VAL(key));
}
} else { /* numeric key */
phpdbg_xml(" name=\"%ld\" protection=\"public\"", num);
@@ -659,7 +683,7 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) {
phpdbg_xml("<float refstatus=\"%s\" value=\"%.*G\" />", COMMON, (int) EG(precision), Z_DVAL_P(zv));
break;
case IS_STRING:
- phpdbg_xml("<string refstatus=\"%s\" length=\"%d\" value=\"%.*s\" />", COMMON, Z_STRLEN_P(zv), Z_STRLEN_P(zv), Z_STRVAL_P(zv));
+ phpdbg_xml("<string refstatus=\"%s\" length=\"%zd\" value=\"%.*s\" />", COMMON, Z_STRLEN_P(zv), (int) Z_STRLEN_P(zv), Z_STRVAL_P(zv));
break;
case IS_ARRAY:
myht = Z_ARRVAL_P(zv);
@@ -681,7 +705,7 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) {
}
class_name = Z_OBJ_HANDLER_P(zv, get_class_name)(Z_OBJ_P(zv));
- phpdbg_xml("<object refstatus=\"%s\" class=\"%.*s\" id=\"%d\" num=\"%d\">", COMMON, ZSTR_LEN(class_name), ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(zv), myht ? zend_hash_num_elements(myht) : 0);
+ phpdbg_xml("<object refstatus=\"%s\" class=\"%.*s\" id=\"%d\" num=\"%d\">", COMMON, (int) ZSTR_LEN(class_name), ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(zv), myht ? zend_hash_num_elements(myht) : 0);
zend_string_release(class_name);
element_dump_func = phpdbg_xml_object_property_dump;
@@ -705,7 +729,7 @@ head_done:
break;
case IS_RESOURCE: {
const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(zv));
- phpdbg_xml("<resource refstatus=\"%s\" id=\"%pd\" type=\"%ld\" />", COMMON, Z_RES_P(zv)->handle, type_name ? type_name : "unknown");
+ phpdbg_xml("<resource refstatus=\"%s\" id=\"%pd\" type=\"%s\" />", COMMON, Z_RES_P(zv)->handle, type_name ? type_name : "unknown");
break;
}
default:
@@ -728,11 +752,11 @@ PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zen
op_num = op - op_array->opcodes;
- for (i = 0; i < op_array->last_try_catch && op_array->try_catch_array[i].try_op < op_num; i++) {
+ for (i = 0; i < op_array->last_try_catch && op_array->try_catch_array[i].try_op <= op_num; i++) {
uint32_t catch = op_array->try_catch_array[i].catch_op, finally = op_array->try_catch_array[i].finally_op;
if (op_num <= catch || op_num <= finally) {
- if (finally && finally < catch) {
- return 0;
+ if (finally) {
+ return 1;
}
do {
@@ -764,22 +788,34 @@ char *phpdbg_short_zval_print(zval *zv, int maxlen) /* {{{ */
switch (Z_TYPE_P(zv)) {
case IS_UNDEF:
- decode = zend_strndup("", 0);
+ decode = estrdup("");
break;
case IS_NULL:
- decode = zend_strndup(ZEND_STRL("null"));
+ decode = estrdup("null");
break;
case IS_FALSE:
- decode = zend_strndup(ZEND_STRL("false"));
+ decode = estrdup("false");
break;
case IS_TRUE:
- decode = zend_strndup(ZEND_STRL("true"));
+ decode = estrdup("true");
break;
case IS_LONG:
- asprintf(&decode, ZEND_ULONG_FMT, Z_LVAL_P(zv));
+ spprintf(&decode, 0, ZEND_LONG_FMT, Z_LVAL_P(zv));
break;
case IS_DOUBLE:
- asprintf(&decode, "%.*G", 14, Z_DVAL_P(zv));
+ spprintf(&decode, 0, "%.*G", 14, Z_DVAL_P(zv));
+
+ /* Make sure it looks like a float */
+ if (zend_finite(Z_DVAL_P(zv)) && !strchr(decode, '.')) {
+ size_t len = strlen(decode);
+ char *decode2 = emalloc(len + strlen(".0") + 1);
+ memcpy(decode2, decode, len);
+ decode2[len] = '.';
+ decode2[len+1] = '0';
+ decode2[len+2] = '\0';
+ efree(decode);
+ decode = decode2;
+ }
break;
case IS_STRING: {
int i;
@@ -789,28 +825,32 @@ char *phpdbg_short_zval_print(zval *zv, int maxlen) /* {{{ */
ZSTR_VAL(str)[i] = ' ';
}
}
- asprintf(&decode, "\"%.*s\"%c", ZSTR_LEN(str) <= maxlen - 2 ? (int) ZSTR_LEN(str) : (maxlen - 3), ZSTR_VAL(str), ZSTR_LEN(str) <= maxlen - 2 ? 0 : '+');
+ spprintf(&decode, 0, "\"%.*s\"%c",
+ ZSTR_LEN(str) <= maxlen - 2 ? (int) ZSTR_LEN(str) : (maxlen - 3),
+ ZSTR_VAL(str), ZSTR_LEN(str) <= maxlen - 2 ? 0 : '+');
zend_string_release(str);
} break;
case IS_RESOURCE:
- asprintf(&decode, "Rsrc #%d", Z_RES_HANDLE_P(zv));
+ spprintf(&decode, 0, "Rsrc #%d", Z_RES_HANDLE_P(zv));
break;
case IS_ARRAY:
- asprintf(&decode, "array(%d)", zend_hash_num_elements(Z_ARR_P(zv)));
+ spprintf(&decode, 0, "array(%d)", zend_hash_num_elements(Z_ARR_P(zv)));
break;
case IS_OBJECT: {
zend_string *str = Z_OBJCE_P(zv)->name;
- asprintf(&decode, "%.*s%c", ZSTR_LEN(str) <= maxlen ? (int) ZSTR_LEN(str) : maxlen - 1, ZSTR_VAL(str), ZSTR_LEN(str) <= maxlen ? 0 : '+');
+ spprintf(&decode, 0, "%.*s%c",
+ ZSTR_LEN(str) <= maxlen ? (int) ZSTR_LEN(str) : maxlen - 1,
+ ZSTR_VAL(str), ZSTR_LEN(str) <= maxlen ? 0 : '+');
break;
}
case IS_CONSTANT:
- decode = zend_strndup(ZEND_STRL("<constant>"));
+ decode = estrdup("<constant>");
break;
case IS_CONSTANT_AST:
- decode = zend_strndup(ZEND_STRL("<ast>"));
+ decode = estrdup("<ast>");
break;
default:
- asprintf(&decode, "unknown type: %d", Z_TYPE_P(zv));
+ spprintf(&decode, 0, "unknown type: %d", Z_TYPE_P(zv));
break;
}
diff --git a/sapi/phpdbg/phpdbg_utils.h b/sapi/phpdbg/phpdbg_utils.h
index d4fd352cd4..4ba756139b 100644
--- a/sapi/phpdbg/phpdbg_utils.h
+++ b/sapi/phpdbg/phpdbg_utils.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -73,8 +73,9 @@ PHPDBG_API int phpdbg_get_element(const char *name, size_t len); /* }}} */
PHPDBG_API void phpdbg_set_prompt(const char*);
PHPDBG_API const char *phpdbg_get_prompt(void); /* }}} */
-/* {{{ Console Width */
-PHPDBG_API int phpdbg_get_terminal_width(void); /* }}} */
+/* {{{ Console size */
+PHPDBG_API int phpdbg_get_terminal_width(void);
+PHPDBG_API int phpdbg_get_terminal_height(void); /* }}} */
PHPDBG_API void phpdbg_set_async_io(int fd);
@@ -98,6 +99,14 @@ char *phpdbg_short_zval_print(zval *zv, int maxlen);
PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *ex, zend_object *exception);
+static zend_always_inline zend_execute_data *phpdbg_user_execute_data(zend_execute_data *ex) {
+ while (!ex->func || !ZEND_USER_CODE(ex->func->common.type)) {
+ ex = ex->prev_execute_data;
+ ZEND_ASSERT(ex);
+ }
+ return ex;
+}
+
#ifdef ZTS
#define PHPDBG_OUTPUT_BACKUP_DEFINES() \
zend_output_globals *output_globals_ptr; \
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c
index 856f6e2b3e..c7dcd4fbd4 100644
--- a/sapi/phpdbg/phpdbg_wait.c
+++ b/sapi/phpdbg/phpdbg_wait.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#include "ext/standard/php_var.h"
#include "ext/standard/basic_functions.h"
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
static void phpdbg_rebuild_http_globals_array(int type, const char *name) {
zval *zvp;
@@ -50,7 +50,7 @@ typedef struct {
static int phpdbg_array_data_compare(const void *a, const void *b) {
Bucket *f, *s;
- zval result;
+ int result;
zval *first, *second;
f = *((Bucket **) a);
@@ -59,13 +59,11 @@ static int phpdbg_array_data_compare(const void *a, const void *b) {
first = &f->val;
second = &s->val;
- if (string_compare_function(&result, first, second) == FAILURE) {
- return 0;
- }
+ result = string_compare_function(first, second);
- if (Z_LVAL(result) < 0) {
+ if (result < 0) {
return -1;
- } else if (Z_LVAL(result) > 0) {
+ } else if (result > 0) {
return 1;
}
@@ -233,7 +231,7 @@ void phpdbg_webdata_decompress(char *msg, int len) {
} else if (mode > 0) {
// not loaded module
if (!sapi_module.name || strcmp(sapi_module.name, Z_STRVAL_P(module))) {
- phpdbg_notice("wait", "missingmodule=\"%.*s\"", "The module %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/module/%.*s.so", Z_STRLEN_P(module), Z_STRVAL_P(module), Z_STRLEN_P(module), Z_STRVAL_P(module));
+ phpdbg_notice("wait", "missingmodule=\"%.*s\"", "The module %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/module/%.*s.so", (int) Z_STRLEN_P(module), Z_STRVAL_P(module), (int) Z_STRLEN_P(module), Z_STRVAL_P(module));
}
}
} while (module);
@@ -283,18 +281,13 @@ void phpdbg_webdata_decompress(char *msg, int len) {
pefree(elm, zend_extensions.persistent);
zend_extensions.count--;
} else {
-/* zend_hash_get_current_key_zval_ex(Z_ARRVAL_PP(zvpp), &key, &hpos);
- if (Z_TYPE(key) == IS_LONG) {
- zend_hash_index_del(Z_ARRVAL_PP(zvpp), Z_LVAL(key));
- }
-*/
zend_hash_del(Z_ARRVAL_P(zvp), strkey);
}
}
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(zvp), name) {
if (Z_TYPE_P(name) == IS_STRING) {
- phpdbg_notice("wait", "missingextension=\"%.*s\"", "The Zend extension %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/extension.so", Z_STRLEN_P(name), Z_STRVAL_P(name));
+ phpdbg_notice("wait", "missingextension=\"%.*s\"", "The Zend extension %.*s isn't present in " PHPDBG_NAME ", you still can load via dl /path/to/extension.so", (int) Z_STRLEN_P(name), Z_STRVAL_P(name));
}
} ZEND_HASH_FOREACH_END();
}
diff --git a/sapi/phpdbg/phpdbg_wait.h b/sapi/phpdbg/phpdbg_wait.h
index 569e54b5a7..090b10ba61 100644
--- a/sapi/phpdbg/phpdbg_wait.h
+++ b/sapi/phpdbg/phpdbg_wait.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index 7452771cf2..0224ff4fd1 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -80,7 +80,7 @@
# include <sys/mman.h>
#endif
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
+ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
const phpdbg_command_t phpdbg_watch_commands[] = {
PHPDBG_COMMAND_D_EX(array, "create watchpoint on an array", 'a', watch_array, &phpdbg_prompt_commands[24], "s", 0),
@@ -170,7 +170,7 @@ void phpdbg_watch_HashTable_dtor(zval *ptr);
static void phpdbg_free_watch(phpdbg_watchpoint_t *watch) {
zend_string_release(watch->str);
- zend_string_release(watch->name_in_parent);
+ zend_string_release(watch->name_in_parent);
}
static int phpdbg_delete_watchpoint(phpdbg_watchpoint_t *tmp_watch);
@@ -185,7 +185,7 @@ static phpdbg_watchpoint_t *phpdbg_create_refcounted_watchpoint(phpdbg_watchpoin
watch->parent = parent;
watch->str = parent->str;
++GC_REFCOUNT(parent->str);
- phpdbg_create_addr_watchpoint(&ref->refcount, sizeof(uint32_t), watch);
+ phpdbg_create_addr_watchpoint(&GC_REFCOUNT(ref), sizeof(uint32_t), watch);
watch->type = WATCH_ON_REFCOUNTED;
return watch;
@@ -224,7 +224,7 @@ static void phpdbg_add_watch_collision(phpdbg_watchpoint_t *watch) {
if (flags & PHPDBG_WATCH_IMPLICIT) {
zend_hash_del(&cur->implicit_watches, watch->str);
}
-
+
old->flags = watch->flags;
phpdbg_free_watch(watch);
efree(watch);
@@ -322,6 +322,16 @@ static phpdbg_watchpoint_t *phpdbg_get_refcount_watch(phpdbg_watchpoint_t *paren
static phpdbg_watchpoint_t *phpdbg_create_watchpoint(phpdbg_watchpoint_t *watch) {
phpdbg_watchpoint_t *ret = watch;
+ if (watch->type == WATCH_ON_ZVAL) {
+ switch (Z_TYPE_P(watch->addr.zv)) {
+ case IS_NULL:
+ case IS_UNDEF:
+ case IS_TRUE:
+ case IS_FALSE:
+ memset(watch->addr.zv, 0, sizeof(zend_value));
+ }
+ }
+
/* exclude references & refcounted */
if (!watch->parent || watch->parent->type != WATCH_ON_ZVAL || watch->type == WATCH_ON_HASHTABLE) {
phpdbg_watchpoint_t *old_watch = zend_hash_find_ptr(&PHPDBG_G(watchpoints), watch->str);
@@ -332,8 +342,10 @@ static phpdbg_watchpoint_t *phpdbg_create_watchpoint(phpdbg_watchpoint_t *watch)
if (ref) { \
phpdbg_add_watch_collision(ref); \
} \
- phpdbg_free_watch(watch); \
- efree(watch); \
+ if (watch != old_watch) { \
+ phpdbg_free_watch(watch); \
+ efree(watch); \
+ } \
return (x); \
}
if (watch->flags & PHPDBG_WATCH_RECURSIVE) {
@@ -442,12 +454,10 @@ static int phpdbg_create_recursive_ht_watch(phpdbg_watchpoint_t *watch) {
zval *zv;
zend_string *key;
zend_long h;
- size_t str_len;
ZEND_ASSERT(watch->type == WATCH_ON_HASHTABLE);
ZEND_HASH_FOREACH_KEY_VAL(HT_WATCH_HT(watch), h, key, zv) {
- char *str = NULL;
phpdbg_watchpoint_t *new_watch = emalloc(sizeof(phpdbg_watchpoint_t));
new_watch->flags = PHPDBG_WATCH_RECURSIVE;
@@ -458,14 +468,10 @@ static int phpdbg_create_recursive_ht_watch(phpdbg_watchpoint_t *watch) {
new_watch->name_in_parent = key;
++GC_REFCOUNT(key);
} else {
- str_len = spprintf(&str, 0, "%lld", h);
- new_watch->name_in_parent = zend_string_init(str, str_len, 0);
- efree(str);
+ new_watch->name_in_parent = strpprintf(0, ZEND_LONG_FMT, h);
}
- str_len = spprintf(&str, 0, "%.*s%s%s%s", (int) ZSTR_LEN(watch->str) - 2, ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", phpdbg_get_property_key(ZSTR_VAL(new_watch->name_in_parent)), (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
- new_watch->str = zend_string_init(str, str_len, 0);
- efree(str);
+ new_watch->str = strpprintf(0, "%.*s%s%s%s", (int) ZSTR_LEN(watch->str) - 2, ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", phpdbg_get_property_key(ZSTR_VAL(new_watch->name_in_parent)), (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
while (Z_TYPE_P(zv) == IS_INDIRECT) {
zv = Z_INDIRECT_P(zv);
@@ -480,7 +486,6 @@ static int phpdbg_create_recursive_ht_watch(phpdbg_watchpoint_t *watch) {
}
static int phpdbg_create_recursive_zval_watch(phpdbg_watchpoint_t *watch) {
- size_t str_len;
HashTable *ht;
zval *zvp;
@@ -490,7 +495,6 @@ static int phpdbg_create_recursive_zval_watch(phpdbg_watchpoint_t *watch) {
ZVAL_DEREF(zvp);
if ((ht = HT_FROM_ZVP(zvp))) {
- char *str = NULL;
phpdbg_watchpoint_t *new_watch = emalloc(sizeof(phpdbg_watchpoint_t));
new_watch->flags = PHPDBG_WATCH_RECURSIVE;
@@ -498,9 +502,7 @@ static int phpdbg_create_recursive_zval_watch(phpdbg_watchpoint_t *watch) {
new_watch->parent_container = watch->parent_container;
new_watch->name_in_parent = watch->name_in_parent;
++GC_REFCOUNT(new_watch->name_in_parent);
- str_len = spprintf(&str, 0, "%.*s[]", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str));
- new_watch->str = zend_string_init(str, str_len, 0);
- efree(str);
+ new_watch->str = strpprintf(0, "%.*s[]", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str));
if (Z_TYPE_P(zvp) == IS_ARRAY) {
new_watch->flags |= PHPDBG_WATCH_ARRAY;
@@ -513,7 +515,6 @@ static int phpdbg_create_recursive_zval_watch(phpdbg_watchpoint_t *watch) {
phpdbg_create_recursive_ht_watch(new_watch);
phpdbg_create_watchpoint(new_watch);
-
}
return SUCCESS;
@@ -564,24 +565,22 @@ static int phpdbg_delete_watchpoint_recursive(phpdbg_watchpoint_t *watch, zend_b
}
static void phpdbg_delete_ht_watchpoints_recursive(phpdbg_watchpoint_t *watch) {
- zend_string *strkey;
+ zend_string *str, *strkey;
zend_long numkey;
- char *str;
- size_t str_len;
phpdbg_watchpoint_t *watchpoint;
ZEND_HASH_FOREACH_KEY(HT_WATCH_HT(watch), numkey, strkey) {
if (strkey) {
- str_len = spprintf(&str, 0, "%.*s%s%s%s", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", phpdbg_get_property_key(ZSTR_VAL(strkey)), (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
+ str = strpprintf(0, "%.*s%s%s%s", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", phpdbg_get_property_key(ZSTR_VAL(strkey)), (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
} else {
- str_len = spprintf(&str, 0, "%.*s%s" ZEND_LONG_FMT "%s", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", numkey, (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
+ str = strpprintf(0, "%.*s%s" ZEND_LONG_FMT "%s", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_ARRAY) ? "[" : "->", numkey, (watch->flags & PHPDBG_WATCH_ARRAY) ? "]" : "");
}
- if ((watchpoint = zend_hash_str_find_ptr(&PHPDBG_G(watchpoints), str, str_len))) {
+ if ((watchpoint = zend_hash_find_ptr(&PHPDBG_G(watchpoints), str))) {
phpdbg_delete_watchpoint_recursive(watchpoint, 1);
}
- efree(str);
+ zend_string_release(str);
} ZEND_HASH_FOREACH_END();
}
@@ -681,7 +680,9 @@ static int phpdbg_watchpoint_parse_step(char *name, size_t namelen, char *key, s
}
static int phpdbg_watchpoint_parse_symtables(char *input, size_t len, int (*callback)(phpdbg_watchpoint_t *)) {
- if (EG(scope) && len >= 5 && !memcmp("$this", input, 5)) {
+ zend_class_entry *scope = zend_get_executed_scope();
+
+ if (scope && len >= 5 && !memcmp("$this", input, 5)) {
zend_hash_str_add(EG(current_execute_data)->symbol_table, ZEND_STRL("this"), &EG(current_execute_data)->This);
}
@@ -764,12 +765,6 @@ void phpdbg_watch_HashTable_dtor(zval *zv) {
phpdbg_notice("watchdelete", "variable=\"%.*s\" recursive=\"%s\"", "%.*s was removed, removing watchpoint%s", (int) ZSTR_LEN(watch->str), ZSTR_VAL(watch->str), (watch->flags & PHPDBG_WATCH_RECURSIVE) ? " recursively" : "");
}
- if (watch->flags & PHPDBG_WATCH_RECURSIVE) {
- phpdbg_delete_watchpoint_recursive(watch, 0);
- } else {
- zend_hash_del(&PHPDBG_G(watchpoints), watch->str);
- }
-
if ((result = phpdbg_btree_find(&PHPDBG_G(watch_HashTables), (zend_ulong) watch->parent_container))) {
phpdbg_watch_ht_info *hti = result->ptr;
hti->dtor(orig_zv);
@@ -777,11 +772,18 @@ void phpdbg_watch_HashTable_dtor(zval *zv) {
if (zend_hash_num_elements(&hti->watches) == 0) {
watch->parent_container->pDestructor = hti->dtor;
zend_hash_destroy(&hti->watches);
+ phpdbg_btree_delete(&PHPDBG_G(watch_HashTables), (zend_ulong) watch->parent_container);
efree(hti);
}
} else {
zval_ptr_dtor_wrapper(orig_zv);
}
+
+ if (watch->flags & PHPDBG_WATCH_RECURSIVE) {
+ phpdbg_delete_watchpoint_recursive(watch, 0);
+ } else {
+ zend_hash_del(&PHPDBG_G(watchpoints), watch->str);
+ }
}
}
@@ -832,6 +834,7 @@ int phpdbg_watchpoint_segfault_handler(siginfo_t *info, void *context) {
dump = malloc(MEMDUMP_SIZE(size));
dump->page = page;
dump->size = size;
+ dump->reenable_writing = 0;
memcpy(&dump->data, page, size);
@@ -870,6 +873,7 @@ static void phpdbg_watch_dtor(zval *pDest) {
phpdbg_remove_watchpoint(watch);
phpdbg_free_watch(watch);
+ efree(watch);
}
static void phpdbg_watch_mem_dtor(void *llist_data) {
@@ -957,23 +961,35 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) {
}
/* Show to the user what changed and delete watchpoint upon removal */
- if (memcmp(oldPtr, watch->addr.ptr, watch->size) != SUCCESS) {
+ {
zend_bool do_break = 0;
- if (watch->flags & PHPDBG_WATCH_NORMAL) {
- switch (watch->type) {
- case WATCH_ON_ZVAL:
- do_break = memcmp(oldPtr, watch->addr.zv, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */);
- break;
- case WATCH_ON_HASHTABLE:
- do_break = zend_hash_num_elements(HT_PTR_HT(oldPtr)) != zend_hash_num_elements(HT_WATCH_HT(watch));
- break;
- case WATCH_ON_REFCOUNTED:
- if (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS) {
- do_break = memcmp(oldPtr, watch->addr.ref, sizeof(uint32_t) /* no zend_refcounted metadata info */);
- }
- break;
- }
+ switch (watch->type) {
+ case WATCH_ON_ZVAL:
+ do_break = memcmp(oldPtr, watch->addr.zv, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */) != 0;
+ if (!do_break) {
+ goto end;
+ }
+ break;
+ case WATCH_ON_HASHTABLE:
+ do_break = zend_hash_num_elements(HT_PTR_HT(oldPtr)) != zend_hash_num_elements(HT_WATCH_HT(watch));
+ if (!do_break) {
+ goto end;
+ }
+ break;
+ case WATCH_ON_REFCOUNTED:
+ do_break = memcmp(oldPtr, watch->addr.ref, sizeof(uint32_t) /* no zend_refcounted metadata info */) != 0;
+ if (!do_break) {
+ goto end;
+ }
+ if (!(PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS)) {
+ do_break = 0;
+ }
+ break;
+ }
+
+ if (!(watch->flags & PHPDBG_WATCH_NORMAL)) {
+ do_break = 0;
}
if (do_break) {
@@ -985,7 +1001,7 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) {
switch (watch->type) {
case WATCH_ON_ZVAL: {
- int show_value = memcmp(oldPtr, watch->addr.zv, sizeof(zend_value) + sizeof(uint32_t) /* no metadata info */);
+ zend_bool show_value = memcmp(oldPtr, watch->addr.zv, sizeof(zend_value) + sizeof(uint32_t) /* no metadata info */) != 0;
if ((watch->flags & PHPDBG_WATCH_NORMAL) && (removed || show_value)) {
/* TODO: Merge with refcounting watches, store if watched ref value is to be dropped etc. [for example: manually increment refcount transparently for displaying and drop it if it decrements to 1] */
@@ -1033,7 +1049,7 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) {
}
if (Z_REFCOUNTED_P(watch->addr.zv)) {
if ((watch->flags & PHPDBG_WATCH_NORMAL) && (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS)) {
- phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", Z_COUNTED_P(watch->addr.zv)->refcount);
+ phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", Z_REFCOUNT_P(watch->addr.zv));
}
if (watch->flags & PHPDBG_WATCH_RECURSIVE) {
phpdbg_create_recursive_watchpoint(watch);
@@ -1065,8 +1081,8 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) {
break;
case WATCH_ON_REFCOUNTED: {
if ((watch->flags & PHPDBG_WATCH_NORMAL) && (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS)) {
- phpdbg_writeln("watchrefcount", "type=\"old\" refcount=\"%d\"", "Old refcount: %d", ((zend_refcounted *) oldPtr)->refcount);
- phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", watch->addr.ref->refcount);
+ phpdbg_writeln("watchrefcount", "type=\"old\" refcount=\"%d\"", "Old refcount: %d", GC_REFCOUNT((zend_refcounted *) oldPtr));
+ phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", GC_REFCOUNT(watch->addr.ref));
}
break;
}
@@ -1075,7 +1091,7 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) {
if (do_break) {
phpdbg_xml("</watchdata>");
}
- }
+ } end:
dump->reenable_writing = dump->reenable_writing | reenable;
}
@@ -1146,5 +1162,7 @@ void phpdbg_watch_efree(void *ptr) {
}
}
- PHPDBG_G(original_free_function)(ptr);
+ if (PHPDBG_G(original_free_function)) {
+ PHPDBG_G(original_free_function)(ptr);
+ }
}
diff --git a/sapi/phpdbg/phpdbg_watch.h b/sapi/phpdbg/phpdbg_watch.h
index ca56af8c3e..82c925e011 100644
--- a/sapi/phpdbg/phpdbg_watch.h
+++ b/sapi/phpdbg/phpdbg_watch.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_webdata_transfer.c b/sapi/phpdbg/phpdbg_webdata_transfer.c
index ddcf2deec2..1805519a75 100644
--- a/sapi/phpdbg/phpdbg_webdata_transfer.c
+++ b/sapi/phpdbg/phpdbg_webdata_transfer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_webdata_transfer.h b/sapi/phpdbg/phpdbg_webdata_transfer.h
index 28810a2741..df205251a6 100644
--- a/sapi/phpdbg/phpdbg_webdata_transfer.h
+++ b/sapi/phpdbg/phpdbg_webdata_transfer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_win.c b/sapi/phpdbg/phpdbg_win.c
index 132eb05b1e..4b4511b7a6 100644
--- a/sapi/phpdbg/phpdbg_win.c
+++ b/sapi/phpdbg/phpdbg_win.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_win.h b/sapi/phpdbg/phpdbg_win.h
index 9e1501b263..56892bab28 100644
--- a/sapi/phpdbg/phpdbg_win.h
+++ b/sapi/phpdbg/phpdbg_win.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/tests/basic_run.phpt b/sapi/phpdbg/tests/basic_run.phpt
new file mode 100644
index 0000000000..beb19b535a
--- /dev/null
+++ b/sapi/phpdbg/tests/basic_run.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Basic run
+--PHPDBG--
+r
+q
+--EXPECTF--
+prompt> [Nothing to execute!]
+prompt>
diff --git a/sapi/phpdbg/tests/breakpoints_001.phpt b/sapi/phpdbg/tests/breakpoints_001.phpt
new file mode 100644
index 0000000000..17e7c65cbf
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_001.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Fundamental breakpoints functionality
+--PHPDBG--
+b 3
+r
+b 4
+c
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:3]
+prompt> [Breakpoint #0 at %s:3, hits: 1]
+>00003: echo $i++;
+ 00004: echo $i++;
+ 00005: echo $i++;
+prompt> [Breakpoint #1 added at %s:4]
+prompt> 1
+[Breakpoint #1 at %s:4, hits: 1]
+>00004: echo $i++;
+ 00005: echo $i++;
+ 00006: echo $i++;
+prompt> 234
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+$i = 1;
+echo $i++;
+echo $i++;
+echo $i++;
+echo $i++;
+
diff --git a/sapi/phpdbg/tests/breakpoints_002.phpt b/sapi/phpdbg/tests/breakpoints_002.phpt
new file mode 100644
index 0000000000..96c98194b1
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_002.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Preserve breakpoints on restart
+--PHPDBG--
+b breakpoints_002.php:4
+r
+b 3
+r
+y
+c
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:4]
+prompt> 1
+[Breakpoint #0 at %s:4, hits: 1]
+>00004: echo $i++;
+ 00005: echo $i++;
+ 00006: echo $i++;
+prompt> [Breakpoint #1 added at %s:3]
+prompt> Do you really want to restart execution? (type y or n): [Breakpoint #1 at %s:3, hits: 1]
+>00003: echo $i++;
+ 00004: echo $i++;
+ 00005: echo $i++;
+prompt> 1
+[Breakpoint #0 at %s:4, hits: 1]
+>00004: echo $i++;
+ 00005: echo $i++;
+ 00006: echo $i++;
+prompt> 234
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+$i = 1;
+echo $i++;
+echo $i++;
+echo $i++;
+echo $i++;
+
diff --git a/sapi/phpdbg/tests/breakpoints_003.phpt b/sapi/phpdbg/tests/breakpoints_003.phpt
new file mode 100644
index 0000000000..12b2504487
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_003.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Test deleting breakpoints
+--PHPDBG--
+b 4
+b del 0
+b 5
+r
+b del 1
+r
+y
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:4]
+prompt> [Deleted breakpoint #0]
+prompt> [Breakpoint #1 added at %s:5]
+prompt> 12
+[Breakpoint #1 at %s:5, hits: 1]
+>00005: echo $i++;
+ 00006: echo $i++;
+ 00007:
+prompt> [Deleted breakpoint #1]
+prompt> Do you really want to restart execution? (type y or n): 1234
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+$i = 1;
+echo $i++;
+echo $i++;
+echo $i++;
+echo $i++;
+
diff --git a/sapi/phpdbg/tests/breakpoints_004.phpt b/sapi/phpdbg/tests/breakpoints_004.phpt
new file mode 100644
index 0000000000..917e908efb
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_004.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Test opcode breakpoints
+--PHPDBG--
+b ZEND_ECHO
+r
+c
+
+
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at ZEND_ECHO]
+prompt> [Breakpoint #0 in ZEND_ECHO at %s:3, hits: 1]
+>00003: echo $i++;
+ 00004: echo $i++;
+ 00005: echo $i++;
+prompt> 1
+[Breakpoint #0 in ZEND_ECHO at %s:4, hits: 2]
+>00004: echo $i++;
+ 00005: echo $i++;
+ 00006: echo $i++;
+prompt> 2
+[Breakpoint #0 in ZEND_ECHO at %s:5, hits: 3]
+>00005: echo $i++;
+ 00006: echo $i++;
+ 00007:
+prompt> 3
+[Breakpoint #0 in ZEND_ECHO at %s:6, hits: 4]
+>00006: echo $i++;
+ 00007:
+prompt> 4
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+$i = 1;
+echo $i++;
+echo $i++;
+echo $i++;
+echo $i++;
diff --git a/sapi/phpdbg/tests/breakpoints_005.phpt b/sapi/phpdbg/tests/breakpoints_005.phpt
new file mode 100644
index 0000000000..653dab9fcc
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_005.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Test breakpoint into function context
+--PHPDBG--
+b breakpoints_005.php:4
+r
+ev $bar
+c
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:4]
+prompt> [Breakpoint #0 at %s:4, hits: 1]
+>00004: var_dump($bar);
+ 00005: }
+ 00006:
+prompt> test
+prompt> string(4) "test"
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+function foo($bar) {
+ var_dump($bar);
+}
+
+foo("test");
+
diff --git a/sapi/phpdbg/tests/breakpoints_006.phpt b/sapi/phpdbg/tests/breakpoints_006.phpt
new file mode 100644
index 0000000000..fa6f0cdc5b
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_006.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Basic function breakpoints
+--PHPDBG--
+b foo
+r
+c
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at foo]
+prompt> [Breakpoint #0 in foo() at %s:4, hits: 1]
+>00004: var_dump($bar);
+ 00005: }
+ 00006:
+prompt> string(4) "test"
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+function foo($bar) {
+ var_dump($bar);
+}
+
+foo("test");
+
diff --git a/sapi/phpdbg/tests/breakpoints_007.phpt b/sapi/phpdbg/tests/breakpoints_007.phpt
new file mode 100644
index 0000000000..f921c257c5
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_007.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Basic method breakpoints
+--PHPDBG--
+b bar::foo
+r
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at bar::foo]
+prompt> [Breakpoint #0 in bar::foo() at %s:5, hits: 1]
+>00005: var_dump($bar);
+ 00006: }
+ 00007: }
+prompt>
+--FILE--
+<?php
+
+class bar {
+ function foo($bar) {
+ var_dump($bar);
+ }
+}
+
+(new bar)->foo("test");
+
diff --git a/sapi/phpdbg/tests/breakpoints_008.phpt b/sapi/phpdbg/tests/breakpoints_008.phpt
new file mode 100644
index 0000000000..cbe5042c2b
--- /dev/null
+++ b/sapi/phpdbg/tests/breakpoints_008.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test namespaced and non-lowercase breakpoint names
+--PHPDBG--
+b foo\bar::foo
+b \Foo\Bar::Foo
+r
+c
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at foo\bar::foo]
+prompt> [Breakpoint exists at Foo\Bar::Foo]
+prompt> [Breakpoint #0 in foo\bar::foo() at %s:6, hits: 1]
+>00006: var_dump($bar);
+ 00007: }
+ 00008: }
+prompt> string(4) "test"
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+namespace Foo {
+ class Bar {
+ function Foo($bar) {
+ var_dump($bar);
+ }
+ }
+}
+
+namespace {
+ (new \Foo\Bar)->Foo("test");
+}
+
diff --git a/sapi/phpdbg/tests/clean_001.phpt b/sapi/phpdbg/tests/clean_001.phpt
new file mode 100644
index 0000000000..0500850448
--- /dev/null
+++ b/sapi/phpdbg/tests/clean_001.phpt
@@ -0,0 +1,60 @@
+--TEST--
+Cleaning must preserve breakpoints
+--INI--
+opcache.enable_cli=0
+--PHPDBG--
+b 4
+b foo
+r
+c
+clean
+y
+c
+r
+c
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:4]
+prompt> [Breakpoint #1 added at foo]
+prompt> 1
+[Breakpoint #0 at %s:4, hits: 1]
+>00004: echo 2;
+ 00005: echo 3;
+ 00006: foo();
+prompt> 23
+[Breakpoint #1 in foo() at %s:9, hits: 1]
+>00009: echo 4;
+ 00010: }
+ 00011:
+prompt> Do you really want to clean your current environment? (type y or n): Cleaning Execution Environment
+Classes %d
+Functions %d
+Constants %d
+Includes 0
+prompt> [Not running]
+prompt> 1
+[Breakpoint #0 at %s:4, hits: 1]
+>00004: echo 2;
+ 00005: echo 3;
+ 00006: foo();
+prompt> 23
+[Breakpoint #1 in foo() at %s:9, hits: 1]
+>00009: echo 4;
+ 00010: }
+ 00011:
+prompt> 4
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+echo 1;
+echo 2;
+echo 3;
+foo();
+
+function foo() {
+ echo 4;
+}
diff --git a/sapi/phpdbg/tests/clear_001.phpt b/sapi/phpdbg/tests/clear_001.phpt
new file mode 100644
index 0000000000..96d73990eb
--- /dev/null
+++ b/sapi/phpdbg/tests/clear_001.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Test clearing breakpoints
+--INI--
+opcache.enable_cli=0
+--PHPDBG--
+b 4
+b foo
+r
+clear
+c
+i b
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:4]
+prompt> [Breakpoint #1 added at foo]
+prompt> 1
+[Breakpoint #0 at %s:4, hits: 1]
+>00004: echo 2;
+ 00005: echo 3;
+ 00006: foo();
+prompt> Clearing Breakpoints
+File 1
+Functions 1
+Methods 0
+Oplines 0
+File oplines 0
+Function oplines 0
+Method oplines 0
+Conditionals 0
+prompt> 234
+[Script ended normally]
+prompt> prompt>
+--FILE--
+<?php
+
+echo 1;
+echo 2;
+echo 3;
+foo();
+
+function foo() {
+ echo 4;
+}
diff --git a/sapi/phpdbg/tests/commands/0001_basic.test b/sapi/phpdbg/tests/commands/0001_basic.test
deleted file mode 100644
index 08aa9ab664..0000000000
--- a/sapi/phpdbg/tests/commands/0001_basic.test
+++ /dev/null
@@ -1,8 +0,0 @@
-#######################################################
-# name: basic
-# purpose: check basic functionality of phpdbg console
-# expect: TEST::EXACT
-# options: -rr
-#######################################################
-# [Nothing to execute!]
-#######################################################
diff --git a/sapi/phpdbg/tests/commands/0002_set.test b/sapi/phpdbg/tests/commands/0002_set.test
deleted file mode 100644
index 6a14a15adc..0000000000
--- a/sapi/phpdbg/tests/commands/0002_set.test
+++ /dev/null
@@ -1,21 +0,0 @@
-#################################################
-# name: set
-# purpose: tests for set commands
-# expect: TEST::CISTRING
-# options: -rr
-#################################################
-# setting prompt color
-# setting error color
-# setting notice color
-# Failed to find breakpoint #0
-# [Oplog off]
-# opened oplog test.log
-# nothing
-#################################################
-set color prompt none
-set color error none
-set color notice none
-set prompt promot>
-set break 0
-set oplog
-set oplog test.log
diff --git a/sapi/phpdbg/tests/commands/0101_info.test b/sapi/phpdbg/tests/commands/0101_info.test
deleted file mode 100644
index 397a45c992..0000000000
--- a/sapi/phpdbg/tests/commands/0101_info.test
+++ /dev/null
@@ -1,19 +0,0 @@
-#################################################
-# name: info
-# purpose: test info commands
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#[User Classes (%d)]
-#User Class test (3)
-#|---- in phpdbginit code on line %d
-#################################################
-<:
-class test {
- public function testMethod(){}
- private function testPrivateMethod(){}
- protected function testProtectedMethod(){}
-}
-:>
-info classes
-q
diff --git a/sapi/phpdbg/tests/commands/0102_print.test b/sapi/phpdbg/tests/commands/0102_print.test
deleted file mode 100644
index 7078b13ea2..0000000000
--- a/sapi/phpdbg/tests/commands/0102_print.test
+++ /dev/null
@@ -1,27 +0,0 @@
-#################################################
-# name: print
-# purpose: test print commands
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#[User Class: test (3 methods)]
-#L%d-%d test::testMethod() %s - 0x%s + 1 ops
-# L%d #0 RETURN null
-#L%d-%d test::testPrivateMethod() %s - 0x%s + 1 ops
-# L%d #0 RETURN null
-#L%d-%d test::testProtectedMethod() %s - 0x%s + 1 ops
-# L%d #0 RETURN null
-#[User Method testMethod (1 ops)]
-#L%d-%d test::testMethod() %s - 0x%s + 1 ops
-# L%d #0 RETURN null
-#################################################
-<:
-class test {
- public function testMethod(){}
- private function testPrivateMethod(){}
- protected function testProtectedMethod(){}
-}
-:>
-print class test
-print method test::testMethod
-q
diff --git a/sapi/phpdbg/tests/commands/0103_register.test b/sapi/phpdbg/tests/commands/0103_register.test
deleted file mode 100644
index 703a12f771..0000000000
--- a/sapi/phpdbg/tests/commands/0103_register.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#################################################
-# name: register
-# purpose: test registration functions
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#[Registered test_function]
-#array(5) {
-# [0]=>
-# int(1)
-# [1]=>
-# int(2)
-# [2]=>
-# int(3)
-# [3]=>
-# int(4)
-# [4]=>
-# int(5)
-#}
-#################################################
-<:
-function test_function() {
- var_dump(func_get_args());
-}
-:>
-R test_function
-test_function 1 2 3 4 5
-q
diff --git a/sapi/phpdbg/tests/commands/0104_clean.test b/sapi/phpdbg/tests/commands/0104_clean.test
deleted file mode 100644
index 2c7660ad60..0000000000
--- a/sapi/phpdbg/tests/commands/0104_clean.test
+++ /dev/null
@@ -1,14 +0,0 @@
-#################################################
-# name: clean
-# purpose: test cleaning environment
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#Cleaning Execution Environment
-#Classes %d
-#Functions %d
-#Constants %d
-#Includes %d
-#################################################
-clean
-quit
diff --git a/sapi/phpdbg/tests/commands/0105_clear.test b/sapi/phpdbg/tests/commands/0105_clear.test
deleted file mode 100644
index 8ce1002491..0000000000
--- a/sapi/phpdbg/tests/commands/0105_clear.test
+++ /dev/null
@@ -1,18 +0,0 @@
-#################################################
-# name: clear
-# purpose: test clearing breakpoints
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#Clearing Breakpoints
-#File%w%d
-#Functions%w%d
-#Methods%w%d
-#Oplines%w%d
-#File oplines%w%d
-#Function oplines%w%d
-#Method oplines%w%d
-#Conditionals%w%d
-#################################################
-clear
-quit
diff --git a/sapi/phpdbg/tests/commands/0106_compile.test b/sapi/phpdbg/tests/commands/0106_compile.test
deleted file mode 100644
index b4d801670b..0000000000
--- a/sapi/phpdbg/tests/commands/0106_compile.test
+++ /dev/null
@@ -1,18 +0,0 @@
-#################################################
-# name: compile
-# purpose: test compiling code
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#[Successful compilation of %s]
-#Hello World
-#[Script ended normally]
-#################################################
-<:
-define('OUT',
- tempnam(null, "phpdbg"));
-file_put_contents(OUT, "<?php echo \"Hello World\"; ?>");
-phpdbg_exec(OUT);
-:>
-run
-quit
diff --git a/sapi/phpdbg/tests/commands/0107_compile.test b/sapi/phpdbg/tests/commands/0107_compile.test
deleted file mode 100644
index 4842cb74f1..0000000000
--- a/sapi/phpdbg/tests/commands/0107_compile.test
+++ /dev/null
@@ -1,17 +0,0 @@
-#################################################
-# name: compile
-# purpose: test compiling error code
-# expect: TEST::FORMAT
-# options: -rr
-#################################################
-#[PHP Parse error: syntax error, unexpected 'echo' (T_ECHO) in %s on line %s]
-#[Could not find information about included file...]
-#################################################
-<:
-define('OUT',
- tempnam(null, "phpdbg"));
-file_put_contents(OUT, "<?error echo \"Hello World\"; ?>");
-phpdbg_exec(OUT);
-:>
-run
-quit
diff --git a/sapi/phpdbg/tests/delimiter.phpt b/sapi/phpdbg/tests/delimiter.phpt
new file mode 100644
index 0000000000..da5f681783
--- /dev/null
+++ b/sapi/phpdbg/tests/delimiter.phpt
@@ -0,0 +1,7 @@
+--TEST--
+Test # delimiter parsing and execution
+--PHPDBG--
+ev 1 + 3 # ev 2 ** 3#q
+--EXPECTF--
+prompt> 4
+8
diff --git a/sapi/phpdbg/tests/exceptions_001.phpt b/sapi/phpdbg/tests/exceptions_001.phpt
new file mode 100644
index 0000000000..991ea1cc71
--- /dev/null
+++ b/sapi/phpdbg/tests/exceptions_001.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Properly handle exceptions going to be uncaught
+--PHPDBG--
+r
+t
+ev 1 + 2
+c
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> handle first
+[Uncaught Error in %s on line 16: Call to undefined function foo()]
+>00016: foo(); // Error
+ 00017: } catch (\Exception $e) {
+ 00018: var_dump($e);
+prompt> frame #0: {closure}() at %s:16
+frame #1: {main} at %s:20
+prompt> 3
+prompt> [Uncaught Error in %s on line 16]
+Error: Call to undefined function foo() in %s:16
+Stack trace:
+#0 %s(20): {closure}()
+#1 {main}
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+(function() {
+ try {
+ foo(); // Error
+ } catch (\Exception $e) {
+ var_dump($e);
+ } finally {
+ print "handle first\n";
+ return "ok";
+ }
+})();
+
+(function() {
+ try {
+ foo(); // Error
+ } catch (\Exception $e) {
+ var_dump($e);
+ }
+})();
diff --git a/sapi/phpdbg/tests/exceptions_002.phpt b/sapi/phpdbg/tests/exceptions_002.phpt
new file mode 100644
index 0000000000..f304cc25db
--- /dev/null
+++ b/sapi/phpdbg/tests/exceptions_002.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Test exceptions in eval during exception
+--PHPDBG--
+r
+ev next_error()
+c
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> handle first
+[Uncaught Error in %s on line 16: Call to undefined function foo()]
+>00016: foo(); // Error
+ 00017: } catch (\Exception $e) {
+ 00018: var_dump($e);
+prompt>
+Fatal error: Uncaught Error: Call to undefined function next_error() in eval()'d code:1
+Stack trace:
+#0 %s(16): unknown()
+#1 %s(20): {closure}()
+#2 {main}
+ thrown in eval()'d code on line 1
+prompt> [Uncaught Error in %s on line 16]
+Error: Call to undefined function foo() in %s:16
+Stack trace:
+#0 %s(20): {closure}()
+#1 {main}
+[Script ended normally]
+prompt> [The stack contains nothing !]
+prompt>
+--FILE--
+<?php
+
+(function() {
+ try {
+ foo(); // Error
+ } catch (\Exception $e) {
+ var_dump($e);
+ } finally {
+ print "handle first\n";
+ return "ok";
+ }
+})();
+
+(function() {
+ try {
+ foo(); // Error
+ } catch (\Exception $e) {
+ var_dump($e);
+ }
+})();
diff --git a/sapi/phpdbg/tests/exceptions_003.phpt b/sapi/phpdbg/tests/exceptions_003.phpt
new file mode 100644
index 0000000000..2a982bcbe3
--- /dev/null
+++ b/sapi/phpdbg/tests/exceptions_003.phpt
@@ -0,0 +1,54 @@
+--TEST--
+Test breaks on HANDLE_EXCEPTION
+--PHPDBG--
+b 5
+r
+s
+
+s
+
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:5]
+prompt> [Breakpoint #0 at %s:5, hits: 1]
+>00005: x();
+ 00006: } finally {
+ 00007: print "ok\n";
+prompt> [L0 %s HANDLE_EXCEPTION %s]
+>00005: x();
+ 00006: } finally {
+ 00007: print "ok\n";
+prompt> [L7 %s ECHO "ok " %s]
+>00007: print "ok\n";
+ 00008: }
+ 00009: } catch (Error $e) {
+prompt> ok
+[L7 %s FAST_RET ~%d try-catch(0) %s]
+[L9 %s CATCH "Error" $e 1 %s]
+>00005: x();
+ 00006: } finally {
+ 00007: print "ok\n";
+prompt> [L10 %s ECHO "caught " %s]
+>00010: print "caught\n";
+ 00011: }
+ 00012:
+prompt> caught
+[L10 %s RETURN 1 %s]
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+try {
+ try {
+ x();
+ } finally {
+ print "ok\n";
+ }
+} catch (Error $e) {
+ print "caught\n";
+}
+
+?>
diff --git a/sapi/phpdbg/tests/finish_leave_001.phpt b/sapi/phpdbg/tests/finish_leave_001.phpt
new file mode 100644
index 0000000000..774776c05f
--- /dev/null
+++ b/sapi/phpdbg/tests/finish_leave_001.phpt
@@ -0,0 +1,41 @@
+--TEST--
+test finish and leave commands
+--PHPDBG--
+b bar
+b 5
+r
+finish
+leave
+leave
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at bar]
+prompt> [Breakpoint #1 added at %s:5]
+prompt> [Breakpoint #0 in bar() at %s:9, hits: 1]
+>00009: return "world";
+ 00010: }
+ 00011:
+prompt> [Breakpoint #1 at %s:5, hits: 1]
+>00005: return ["hello", $other];
+ 00006: }
+ 00007:
+prompt> [Breaking for leave at %s:5]
+>00005: return ["hello", $other];
+ 00006: }
+ 00007:
+prompt> [Already at the end of the function]
+prompt>
+--FILE--
+<?php
+function foo() {
+ $other = bar();
+
+ return ["hello", $other];
+}
+
+function bar() {
+ return "world";
+}
+
+foo();
diff --git a/sapi/phpdbg/tests/generator_run.phpt b/sapi/phpdbg/tests/generator_run.phpt
new file mode 100644
index 0000000000..798d77051e
--- /dev/null
+++ b/sapi/phpdbg/tests/generator_run.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Ensure proper saving of EX(opline)
+--PHPDBG--
+r
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> caught Generator exception
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+function gen() {
+ try {
+ throw new Exception;
+ } catch(Exception $e) {
+ yield "caught Generator exception";
+ }
+}
+
+foreach (gen() as $v) {
+ print $v;
+}
diff --git a/sapi/phpdbg/tests/info_001.phpt b/sapi/phpdbg/tests/info_001.phpt
new file mode 100644
index 0000000000..b988235757
--- /dev/null
+++ b/sapi/phpdbg/tests/info_001.phpt
@@ -0,0 +1,80 @@
+--TEST--
+Test basic info functionality
+--INI--
+auto_globals_jit=0
+--PHPDBG--
+i classes
+i funcs
+b foo
+r
+i v
+i g
+i b
+i d
+i F
+i e
+i l
+c
+i v
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [User Classes (1)]
+User Class Foo\Bar (2)
+|---- in %s on line 4
+prompt> [User Functions (1)]
+|-------- foo in %s on line 14
+prompt> [Breakpoint #0 added at foo]
+prompt> string(4) "test"
+[Breakpoint #0 in foo() at %s:15, hits: 1]
+>00015: var_dump(strrev($baz));
+ 00016: }
+ 00017:
+prompt> [Variables in foo() (1)]
+Address Refs Type Variable
+%s 1 string $baz
+string (4) "test"
+prompt> [Superglobal variables (8)]
+Address Refs Type Variable
+%s 2 array $_GET
+%s 2 array $_POST
+%s 2 array $_COOKIE
+%s 2 array $_SERVER
+%s 2 array $_ENV
+%s 1 array $_REQUEST
+%s 2 array $_FILES
+%s 1 array &$GLOBALS
+prompt> ------------------------------------------------
+Function Breakpoints:
+#0 foo
+prompt> [User-defined constants (0)]
+prompt> [Included files: 0]
+prompt> [No error found!]
+prompt> [Literal Constants in foo() (2)]
+|-------- C0 -------> [var_dump]
+|-------- C1 -------> [strrev]
+prompt> string(4) "tset"
+[Script ended normally]
+prompt> [No active op array!]
+prompt>
+--FILE--
+<?php
+
+namespace Foo {
+ class Bar {
+ function Foo($bar) {
+ var_dump($bar);
+ }
+
+ function baz() { }
+ }
+}
+
+namespace {
+ function foo($baz) {
+ var_dump(strrev($baz));
+ }
+
+ (new \Foo\Bar)->Foo("test");
+ foo("test");
+}
diff --git a/sapi/phpdbg/tests/info_002.phpt b/sapi/phpdbg/tests/info_002.phpt
new file mode 100644
index 0000000000..faeca0e430
--- /dev/null
+++ b/sapi/phpdbg/tests/info_002.phpt
@@ -0,0 +1,31 @@
+--TEST--
+info constants test
+--PHPDBG--
+b 10
+r
+i d
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:10]
+prompt> [Breakpoint #0 at %s:10, hits: 1]
+>00010: print B;
+ 00011:
+prompt> [User-defined constants (2)]
+Address Refs Type Constant
+%s 1 integer A
+int (10)
+%s 1 integer B
+int (100)
+prompt>
+--FILE--
+<?php
+
+const A = 10;
+const B = C::D * A;
+
+class C {
+ const D = 10;
+}
+
+print B;
diff --git a/sapi/phpdbg/tests/normal_exit.phpt b/sapi/phpdbg/tests/normal_exit.phpt
new file mode 100644
index 0000000000..692614e98f
--- /dev/null
+++ b/sapi/phpdbg/tests/normal_exit.phpt
@@ -0,0 +1,15 @@
+--TEST--
+A script with die() must end "normally"
+--PHPDBG--
+r
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Script ended normally]
+prompt>
+--FILE--
+<?php
+
+(function($argv) {
+ die();
+})($argv);
diff --git a/sapi/phpdbg/tests/phpdbg_break_next.phpt b/sapi/phpdbg/tests/phpdbg_break_next.phpt
new file mode 100644
index 0000000000..37ee2e8282
--- /dev/null
+++ b/sapi/phpdbg/tests/phpdbg_break_next.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Test phpdbg_break_next() function
+--PHPDBG--
+r
+c
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> A
+[Breakpoint #0 added at %s]
+[Breakpoint #0 in %s at %s:5, hits: 1]
+>00005: echo 'B';
+ 00006:
+prompt> B
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+echo 'A';
+phpdbg_break_next();
+echo 'B';
diff --git a/sapi/phpdbg/tests/phpdbg_oplog_001.phpt b/sapi/phpdbg/tests/phpdbg_oplog_001.phpt
new file mode 100644
index 0000000000..e4e558b9fa
--- /dev/null
+++ b/sapi/phpdbg/tests/phpdbg_oplog_001.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Test phpdbg_*_oplog() functions
+--INI--
+opcache.enable_cli=0
+--PHPDBG--
+r
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> halloarray(2) {
+ ["%s"]=>
+ array(5) {
+ [13]=>
+ int(1)
+ [17]=>
+ int(2)
+ [18]=>
+ int(2)
+ [19]=>
+ int(3)
+ [21]=>
+ int(4)
+ }
+ ["A::b"]=>
+ array(3) {
+ [4]=>
+ int(1)
+ [5]=>
+ int(3)
+ [8]=>
+ int(2)
+ }
+}
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+class A {
+ public function b($c = 1) {
+ if ($c == 1) {
+ // comment
+ }
+ }
+}
+
+phpdbg_start_oplog();
+
+echo "hallo";
+
+// fcalls
+
+$a = new A();
+$a->b();
+$a->b('ha');
+
+var_dump(phpdbg_end_oplog(["functions" => true]));
+
diff --git a/sapi/phpdbg/tests/phpdbg_oplog_002.phpt b/sapi/phpdbg/tests/phpdbg_oplog_002.phpt
new file mode 100644
index 0000000000..b9ba905caa
--- /dev/null
+++ b/sapi/phpdbg/tests/phpdbg_oplog_002.phpt
@@ -0,0 +1,16 @@
+--TEST--
+phpdbg_end_oplog() alone must not crash
+--PHPDBG--
+r
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt>
+Warning: Can not end an oplog without starting it in %s on line 3
+NULL
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+var_dump(phpdbg_end_oplog());
diff --git a/sapi/phpdbg/tests/print_001.phpt b/sapi/phpdbg/tests/print_001.phpt
new file mode 100644
index 0000000000..1f7a5ac0b9
--- /dev/null
+++ b/sapi/phpdbg/tests/print_001.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Basic print functionality
+--INI--
+opcache.enable_cli=0
+--PHPDBG--
+p foo
+p class \Foo\bar
+p
+p e
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [User Function foo (8 ops)]
+L14-16 foo() %s - %s + 8 ops
+ L14 #0 RECV 1 $baz
+ L15 #1 INIT_FCALL%s %d %s "var_dump"
+ L15 #2 INIT_FCALL%s %d %s "strrev"
+ L15 #3 SEND_VAR $baz 1
+ L15 #4 DO_%cCALL @0
+ L15 #5 SEND_VAR @0 1
+ L15 #6 DO_%cCALL
+ L16 #7 RETURN null
+prompt> [User Class: Foo\Bar (2 methods)]
+L5-7 Foo\Bar::Foo() %s - %s + 5 ops
+ L5 #0 RECV 1 $bar
+ L6 #1 INIT_NS_FCALL_BY_NAME "Foo\\var_dump"
+ L6 #2 SEND_VAR_EX $bar 1
+ L6 #3 DO_FCALL
+ L7 #4 RETURN null
+L9-9 Foo\Bar::baz() %s - %s + 1 ops
+ L9 #0 RETURN null
+prompt> [Not Executing!]
+prompt> [Context %s (11 ops)]
+L1-19 {main}() %s - %s + 11 ops
+ L4 #0 NOP
+ L14 #1 NOP
+ L18 #2 NEW "Foo\\Bar" @1
+ L18 #3 DO_FCALL
+ L18 #4 INIT_METHOD_CALL @1 "Foo"
+ L18 #5 SEND_VAL_EX "test" 1
+ L18 #6 DO_FCALL
+ L19 #7 INIT_FCALL%s %d %s "foo"
+ L19 #8 SEND_VAL "test" 1
+ L19 #9 DO_FCALL
+ L19 #10 RETURN 1
+prompt>
+--FILE--
+<?php
+
+namespace Foo {
+ class Bar {
+ function Foo($bar) {
+ var_dump($bar);
+ }
+
+ function baz() { }
+ }
+}
+
+namespace {
+ function foo($baz) {
+ var_dump(strrev($baz));
+ }
+
+ (new \Foo\Bar)->Foo("test");
+ foo("test");
+}
diff --git a/sapi/phpdbg/tests/print_002.phpt b/sapi/phpdbg/tests/print_002.phpt
new file mode 100644
index 0000000000..3a824986c1
--- /dev/null
+++ b/sapi/phpdbg/tests/print_002.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Relative print commands
+--INI--
+opcache.enable_cli=0
+--PHPDBG--
+b foo
+r
+p
+p o
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at foo]
+prompt> string(4) "test"
+[Breakpoint #0 in foo() at %s:15, hits: 1]
+>00015: var_dump(strrev($baz));
+ 00016: }
+ 00017:
+prompt> [Stack in foo() (8 ops)]
+L14-16 foo() %s - %s + 8 ops
+ L14 #0 RECV 1 $baz
+ L15 #1 INIT_FCALL%s %d %s "var_dump"
+ L15 #2 INIT_FCALL%s %d %s "strrev"
+ L15 #3 SEND_VAR $baz 1
+ L15 #4 DO_%cCALL @0
+ L15 #5 SEND_VAR @0 1
+ L15 #6 DO_%cCALL
+ L16 #7 RETURN null
+prompt> [L15 %s INIT_FCALL%s %d %s "var_dump" %s]
+prompt>
+--FILE--
+<?php
+
+namespace Foo {
+ class Bar {
+ function Foo($bar) {
+ var_dump($bar);
+ }
+
+ function baz() { }
+ }
+}
+
+namespace {
+ function foo($baz) {
+ var_dump(strrev($baz));
+ }
+
+ (new \Foo\Bar)->Foo("test");
+ foo("test");
+}
diff --git a/sapi/phpdbg/tests/run-tests.php b/sapi/phpdbg/tests/run-tests.php
deleted file mode 100644
index 4afb64561c..0000000000
--- a/sapi/phpdbg/tests/run-tests.php
+++ /dev/null
@@ -1,597 +0,0 @@
-<?php
-namespace phpdbg\testing {
-
- /*
- * Workaround ...
- */
- if (!defined('DIR_SEP'))
- define('DIR_SEP', '\\' . DIRECTORY_SEPARATOR);
-
- /**
- * TestConfigurationExceptions are thrown
- * when the configuration prohibits tests executing
- *
- * @package phpdbg
- * @subpackage testing
- */
- class TestConfigurationException extends \Exception {
-
- /**
- *
- * @param array Tests confguration
- * @param message Exception message
- * @param ... formatting parameters
- */
- public function __construct() {
- $argv = func_get_args();
-
- if (count($argv)) {
-
- $this->config = array_shift($argv);
- $this->message = vsprintf(
- array_shift($argv), $argv);
- }
- }
- }
-
- /**
- *
- * @package phpdbg
- * @subpackage testing
- */
- class TestsConfiguration implements \ArrayAccess {
-
- /**
- *
- * @param array basic configuration
- * @param array argv
- */
- public function __construct($config, $cmd) {
- $this->options = $config;
- while (($key = array_shift($cmd))) {
- switch (substr($key, 0, 1)) {
- case '-': switch(substr($key, 1, 1)) {
- case '-': {
- $arg = substr($key, 2);
- if (($e=strpos($arg, '=')) !== false) {
- $key = substr($arg, 0, $e);
- $value = substr($arg, $e+1);
- } else {
- $key = $arg;
- $value = array_shift($cmd);
- }
-
- if (isset($key) && isset($value)) {
- switch ($key) {
- case 'phpdbg':
- case 'width':
- $this->options[$key] = $value;
- break;
-
- default: {
- if (isset($config[$key])) {
- if (is_array($config[$key])) {
- $this->options[$key][] = $value;
- } else {
- $this->options[$key] = array($config[$key], $value);
- }
- } else {
- $this->options[$key] = $value;
- }
- }
- }
-
- }
- } break;
-
- default:
- $this->flags[] = substr($key, 1);
- } break;
- }
- }
-
- if (!is_executable($this->options['phpdbg'])) {
- throw new TestConfigurationException(
- $this->options, 'phpdbg could not be found at the specified path (%s)', $this->options['phpdbg']);
- } else $this->options['phpdbg'] = realpath($this->options['phpdbg']);
-
- $this->options['width'] = (integer) $this->options['width'];
-
- /* display properly, all the time */
- if ($this->options['width'] < 50) {
- $this->options['width'] = 50;
- }
-
- /* calculate column widths */
- $this->options['lwidth'] = ceil($this->options['width'] / 3);
- $this->options['rwidth'] = ceil($this->options['width'] - $this->options['lwidth']) - 5;
- }
-
- public function hasFlag($flag) {
- return in_array(
- $flag, $this->flags);
- }
-
- public function offsetExists($offset) { return isset($this->options[$offset]); }
- public function offsetGet($offset) { return $this->options[$offset]; }
- public function offsetUnset($offset) { unset($this->options[$offset]); }
- public function offsetSet($offset, $data) { $this->options[$offset] = $data; }
-
- protected $options = array();
- protected $flags = array();
- }
-
- /**
- * Tests is the console programming API for the test suite
- *
- * @package phpdbg
- * @subpackage testing
- */
- class Tests {
-
- /**
- * Construct the console object
- *
- * @param array basic configuration
- * @param array command line
- */
- public function __construct(TestsConfiguration $config) {
- $this->config = $config;
-
- if ($this->config->hasFlag('help') ||
- $this->config->hasFlag('h')) {
- $this->showUsage();
- exit;
- }
- }
-
- /**
- * Find valid paths as specified by configuration
- *
- */
- public function findPaths($in = null) {
- $paths = array();
- $where = ($in != null) ? array($in) : $this->config['path'];
-
- foreach ($where as $path) {
- if ($path) {
- if (is_dir($path)) {
- $paths[] = $path;
- foreach (scandir($path) as $child) {
- if ($child != '.' && $child != '..') {
- $paths = array_merge(
- $paths, $this->findPaths("$path/$child"));
- }
- }
- }
- }
- }
-
- return $paths;
- }
-
- /**
- *
- * @param string the path to log
- */
- public function logPath($path) {
- printf(
- '%s [%s]%s',
- str_repeat(
- '-', $this->config['width'] - strlen($path)),
- $path, PHP_EOL);
- }
-
- /**
- *
- * @param string the path to log
- */
- public function logPathStats($path) {
- if (!isset($this->stats[$path])) {
- return;
- }
-
- $total = array_sum($this->stats[$path]);
-
- if ($total) {
- @$this->totals[true] += $this->stats[$path][true];
- @$this->totals[false] += $this->stats[$path][false];
-
- $stats = @sprintf(
- "%d/%d %%%d",
- $this->stats[$path][true],
- $this->stats[$path][false],
- (100 / $total) * $this->stats[$path][true]);
-
- printf(
- '%s [%s]%s',
- str_repeat(
- ' ', $this->config['width'] - strlen($stats)),
- $stats, PHP_EOL);
-
- printf("%s%s", str_repeat('-', $this->config['width']+3), PHP_EOL);
- printf("%s", PHP_EOL);
- }
- }
-
- /**
- *
- */
- public function logStats() {
- $total = array_sum($this->totals);
- $stats = @sprintf(
- "%d/%d %%%d",
- $this->totals[true],
- $this->totals[false],
- (100 / $total) * $this->totals[true]);
- printf(
- '%s [%s]%s',
- str_repeat(
- ' ', $this->config['width'] - strlen($stats)),
- $stats, PHP_EOL);
-
- }
-
- /**
- *
- */
- protected function showUsage() {
- printf('usage: php %s [flags] [options]%s', $this->config['exec'], PHP_EOL);
- printf('[options]:%s', PHP_EOL);
- printf("\t--path\t\tadd a path to scan outside of tests directory%s", PHP_EOL);
- printf("\t--width\t\tset line width%s", PHP_EOL);
- printf("\t--options\toptions to pass to phpdbg%s", PHP_EOL);
- printf("\t--phpdbg\tpath to phpdbg binary%s", PHP_EOL);
- printf('[flags]:%s', PHP_EOL);
- printf("\t-diff2stdout\t\twrite diff to stdout instead of files%s", PHP_EOL);
- printf("\t-nodiff\t\tdo not write diffs on failure%s", PHP_EOL);
- printf("\t-nolog\t\tdo not write logs on failure%s", PHP_EOL);
- printf('[examples]:%s', PHP_EOL);
- printf("\tphp %s --phpdbg=/usr/local/bin/phpdbg --path=/usr/src/phpdbg/tests --options -n%s",
- $this->config['exec'], PHP_EOL);
-
- }
-
- /**
- * Find valid tests at the specified path (assumed valid)
- *
- * @param string a valid path
- */
- public function findTests($path) {
- $tests = array();
-
- foreach (scandir($path) as $file) {
- if ($file == '.' || $file == '..')
- continue;
-
- $test = sprintf('%s/%s', $path, $file);
-
- if (preg_match('~\.test$~', $test)) {
- $tests[] = new Test($this->config, $test);
- }
- }
-
- return $tests;
- }
-
- /**
- *
- * @param Test the test to log
- */
- public function logTest($path, Test $test) {
- @$this->stats[$path][($result=$test->getResult())]++;
-
- printf(
- "%-{$this->config['lwidth']}s %-{$this->config['rwidth']}s [%s]%s",
- $test->name,
- $test->purpose,
- $result ? "PASS" : "FAIL",
- PHP_EOL);
-
- return $result;
- }
-
- protected $config;
- }
-
- class Test {
- /*
- * Expect exact line for line match
- */
- const EXACT = 0x00000001;
-
- /*
- * Expect strpos() !== false
- */
- const STRING = 0x00000010;
-
- /*
- * Expect stripos() !== false
- */
- const CISTRING = 0x00000100;
-
- /*
- * Formatted output
- */
- const FORMAT = 0x00001000;
-
- /**
- * Format specifiers
- */
- private static $format = array(
- 'search' => array(
- '%e',
- '%s',
- '%S',
- '%a',
- '%A',
- '%w',
- '%i',
- '%d',
- '%x',
- '%f',
- '%c',
- '%t',
- '%T'
- ),
- 'replace' => array(
- DIR_SEP,
- '[^\r\n]+',
- '[^\r\n]*',
- '.+',
- '.*',
- '\s*',
- '[+-]?\d+',
- '\d+',
- '[0-9a-fA-F]+',
- '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?',
- '.',
- '\t',
- '\t+'
- )
- );
-
- /**
- * Constructs a new Test object given a specilized phpdbginit file
- *
- * @param array configuration
- * @param string file
- */
- public function __construct(TestsConfiguration $config, $file) {
- if (($handle = fopen($file, 'r'))) {
- while (($line = fgets($handle))) {
- $trim = trim($line);
-
- switch (substr($trim, 0, 1)) {
- case '#': if (($chunks = array_map('trim', preg_split('~:~', substr($trim, 1), 2)))) {
- if (property_exists($this, $chunks[0])) {
- switch ($chunks[0]) {
- case 'expect': {
- if ($chunks[1]) {
- switch (strtoupper($chunks[1])) {
- case 'TEST::EXACT':
- case 'EXACT': { $this->expect = TEST::EXACT; } break;
-
- case 'TEST::STRING':
- case 'STRING': { $this->expect = TEST::STRING; } break;
-
- case 'TEST::CISTRING':
- case 'CISTRING': { $this->expect = TEST::CISTRING; } break;
-
- case 'TEST::FORMAT':
- case 'FORMAT': { $this->expect = TEST::FORMAT; } break;
-
- default:
- throw new TestConfigurationException(
- $this->config, "unknown type of expectation (%s)", $chunks[1]);
- }
- }
- } break;
-
- default: {
- $this->{$chunks[0]} = $chunks[1];
- }
- }
- } else switch(substr($trim, 1, 1)) {
- case '#': { /* do nothing */ } break;
-
- default: {
- $line = preg_replace(
- "~(\r\n)~", "\n", substr($trim, 1));
-
- $line = trim($line);
-
- switch ($this->expect) {
- case TEST::FORMAT:
- $this->match[] = str_replace(
- self::$format['search'],
- self::$format['replace'], preg_quote($line));
- break;
-
- default: $this->match[] = $line;
- }
- }
- }
- } break;
-
- default:
- break 2;
- }
- }
- fclose($handle);
-
- $this->config = $config;
- $this->file = $file;
- }
- }
-
- /**
- * Obvious!!
- *
- */
- public function getResult() {
- $options = sprintf('-i%s -nqb', $this->file);
-
- if ($this->options) {
- $options = sprintf(
- '%s %s %s',
- $options,
- $this->config['options'],
- $this->options
- );
- } else {
- $options = sprintf(
- '%s %s', $options, $this->config['options']
- );
- }
-
- $result = `{$this->config['phpdbg']} {$options}`;
-
- if ($result) {
- foreach (preg_split('~(\r|\n)~', $result) as $num => $line) {
- if (!$line && !isset($this->match[$num]))
- continue;
-
- switch ($this->expect) {
- case TEST::EXACT: {
- if (strcmp($line, $this->match[$num]) !== 0) {
- $this->diff['wants'][$num] = &$this->match[$num];
- $this->diff['gets'][$num] = $line;
- }
- } continue 2;
-
- case TEST::STRING: {
- if (strpos($line, $this->match[$num]) === false) {
- $this->diff['wants'][$num] = &$this->match[$num];
- $this->diff['gets'][$num] = $line;
- }
- } continue 2;
-
- case TEST::CISTRING: {
- if (stripos($line, $this->match[$num]) === false) {
- $this->diff['wants'][$num] = &$this->match[$num];
- $this->diff['gets'][$num] = $line;
- }
- } continue 2;
-
- case TEST::FORMAT: {
- $line = trim($line);
- if (!preg_match("/^{$this->match[$num]}\$/s", $line)) {
- $this->diff['wants'][$num] = &$this->match[$num];
- $this->diff['gets'][$num] = $line;
- }
- } continue 2;
- }
- }
- }
-
- $this->writeLog($result);
- $this->writeDiff();
-
- return (count($this->diff) == 0);
- }
-
- /**
- * Write diff to disk if configuration allows it
- *
- */
- protected function writeDiff() {
- if (count($this->diff['wants'])) {
- if (!$this->config->hasFlag('nodiff')) {
- if ($this->config->hasFlag('diff2stdout')) {
- $difffile = "php://stdout";
- file_put_contents($difffile, "====DIFF====\n");
- } else {
- $difffile = sprintf(
- '%s/%s.diff',
- dirname($this->file), basename($this->file));
- }
-
- if (($diff = fopen($difffile, 'w+'))) {
-
- foreach ($this->diff['wants'] as $line => $want) {
- $got = $this->diff['gets'][$line];
-
- fprintf(
- $diff, '(%d) -%s%s', $line+1, $want, PHP_EOL);
- fprintf(
- $diff, '(%d) +%s%s', $line+1, $got, PHP_EOL);
- }
-
- fclose($diff);
- }
- }
- } else unlink($diff);
- }
-
- /**
- * Write log to disk if configuration allows it
- *
- */
- protected function writeLog($result = null) {
- $log = sprintf(
- '%s/%s.log',
- dirname($this->file), basename($this->file));
-
- if (count($this->diff) && $result) {
- if (!in_array('nolog', $this->config['flags'])) {
- @file_put_contents(
- $log, $result);
- }
- } else unlink($log);
- }
-
- public $name;
- public $purpose;
- public $file;
- public $options;
- public $expect;
-
- protected $match;
- protected $diff;
- protected $stats;
- protected $totals;
- }
-}
-
-namespace {
- use \phpdbg\Testing\Test;
- use \phpdbg\Testing\Tests;
- use \phpdbg\Testing\TestsConfiguration;
-
- $cwd = dirname(__FILE__);
- $cmd = $_SERVER['argv'];
-
- $retval = 0;
-
- {
- $config = new TestsConfiguration(array(
- 'exec' => realpath(array_shift($cmd)),
- 'phpdbg' => realpath(sprintf(
- '%s/../phpdbg', $cwd
- )),
- 'path' => array(
- realpath(dirname(__FILE__))
- ),
- 'flags' => array(),
- 'width' => 75
- ), $cmd);
-
- $tests = new Tests($config);
-
- foreach ($tests->findPaths() as $path) {
- $tests->logPath($path);
-
- foreach ($tests->findTests($path) as $test) {
- $retval |= !$tests->logTest($path, $test);
- }
-
- $tests->logPathStats($path);
- }
-
- $tests->logStats();
- }
-
- die($retval);
-}
-?>
diff --git a/sapi/phpdbg/tests/run_001.phpt b/sapi/phpdbg/tests/run_001.phpt
new file mode 100644
index 0000000000..30aab1f17a
--- /dev/null
+++ b/sapi/phpdbg/tests/run_001.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Test argv passing
+--PHPDBG--
+r
+r 1 2 3
+r
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> int(5)
+array(5) {
+ [0]=>
+ string(%d) "%s"
+ [1]=>
+ string(2) "--"
+ [2]=>
+ string(1) "1"
+ [3]=>
+ string(1) "2"
+ [4]=>
+ string(1) "3"
+}
+[Script ended normally]
+prompt> int(5)
+array(4) {
+ [0]=>
+ string(%d) "%s"
+ [1]=>
+ string(1) "1"
+ [2]=>
+ string(1) "2"
+ [3]=>
+ string(1) "3"
+}
+[Script ended normally]
+prompt> int(5)
+array(5) {
+ [0]=>
+ string(%d) "%s"
+ [1]=>
+ string(2) "--"
+ [2]=>
+ string(1) "1"
+ [3]=>
+ string(1) "2"
+ [4]=>
+ string(1) "3"
+}
+[Script ended normally]
+prompt>
+--ARGS--
+1 2 3
+--FILE--
+<?php
+
+var_dump($argc, $argv);
diff --git a/sapi/phpdbg/tests/stepping_001.phpt b/sapi/phpdbg/tests/stepping_001.phpt
new file mode 100644
index 0000000000..9366550f56
--- /dev/null
+++ b/sapi/phpdbg/tests/stepping_001.phpt
@@ -0,0 +1,69 @@
+--TEST--
+Stepping with exceptions must not be stuck at CATCH
+--INI--
+opcache.enable=0
+--PHPDBG--
+b ZEND_THROW
+r
+s
+
+
+
+
+
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at ZEND_THROW]
+prompt> [Breakpoint #0 in ZEND_THROW at %s:4, hits: 1]
+>00004: throw new Exception;
+ 00005: }
+ 00006:
+prompt> [L0 %s HANDLE_EXCEPTION %s]
+>00004: throw new Exception;
+ 00005: }
+ 00006:
+prompt> [L0 %s HANDLE_EXCEPTION %s]
+[L9 %s CATCH "Exception" $e 1 %s]
+>00008: foo();
+ 00009: } catch (Exception $e) {
+ 00010: echo "ok";
+prompt> [L10 %s ECHO "ok" %s]
+>00010: echo "ok";
+ 00011: } finally {
+ 00012: echo " ... ok";
+prompt> ok
+[L11 %s FAST_CALL J8 ~%d %s]
+>00011: } finally {
+ 00012: echo " ... ok";
+ 00013: }
+prompt> [L12 %s ECHO " ... ok" %s]
+>00012: echo " ... ok";
+ 00013: }
+ 00014:
+prompt> ... ok
+[L12 %s FAST_RET ~%d %s]
+[L11 %s JMP J10 %s]
+>00011: } finally {
+ 00012: echo " ... ok";
+ 00013: }
+prompt> [L12 %s RETURN 1 %s]
+>00012: echo " ... ok";
+ 00013: }
+ 00014:
+prompt>
+--FILE--
+<?php
+
+function foo() {
+ throw new Exception;
+}
+
+try {
+ foo();
+} catch (Exception $e) {
+ echo "ok";
+} finally {
+ echo " ... ok";
+}
diff --git a/sapi/phpdbg/tests/watch_001.phpt b/sapi/phpdbg/tests/watch_001.phpt
new file mode 100644
index 0000000000..1183bb0e57
--- /dev/null
+++ b/sapi/phpdbg/tests/watch_001.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Test simple recursive watchpoint
+--PHPDBG--
+b 3
+r
+w r $b
+c
+
+
+
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:3]
+prompt> [Breakpoint #0 at %s:3, hits: 1]
+>00003: $a = 1;
+ 00004: $b = [$a];
+ 00005:
+prompt> [Set recursive watchpoint on $b]
+prompt> [Breaking on watchpoint $b]
+Old value:
+New value: Array ([0] => 1)
+>00006: unset($b);
+ 00007: $b = 2;
+ 00008:
+prompt> [Breaking on watchpoint $b]
+Old value inaccessible or destroyed
+New value:
+>00007: $b = 2;
+ 00008:
+prompt> [Breaking on watchpoint $b]
+Old value:
+New value: 2
+>00007: $b = 2;
+ 00008:
+prompt> [$b was removed, removing watchpoint recursively]
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+$a = 1;
+$b = [$a];
+
+unset($b);
+$b = 2;
diff --git a/sapi/phpdbg/zend_mm_structs.h b/sapi/phpdbg/zend_mm_structs.h
deleted file mode 100644
index ca64069e0f..0000000000
--- a/sapi/phpdbg/zend_mm_structs.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef ZEND_MM_STRUCTS_H
-#define ZEND_MM_STRUCTS_H
-
-/* structs and macros defined in Zend/zend_alloc.c
- Needed for realizing watchpoints and sigsafe memory */
-
-#include "zend.h"
-
-#ifndef ZEND_MM_COOKIES
-# define ZEND_MM_COOKIES ZEND_DEBUG
-#endif
-
-#define ZEND_MM_CACHE 1
-#ifndef ZEND_MM_CACHE_STAT
-# define ZEND_MM_CACHE_STAT 0
-#endif
-
-typedef struct _zend_mm_block_info {
-#if ZEND_MM_COOKIES
- size_t _cookie;
-#endif
- size_t _size;
- size_t _prev;
-} zend_mm_block_info;
-
-typedef struct _zend_mm_small_free_block {
- zend_mm_block_info info;
-#if ZEND_DEBUG
- unsigned int magic;
-#ifdef ZTS
- THREAD_T thread_id;
-#endif
-#endif
- struct _zend_mm_free_block *prev_free_block;
- struct _zend_mm_free_block *next_free_block;
-} zend_mm_small_free_block;
-
-typedef struct _zend_mm_free_block {
- zend_mm_block_info info;
-#if ZEND_DEBUG
- unsigned int magic;
-#ifdef ZTS
- THREAD_T thread_id;
-#endif
-#endif
- struct _zend_mm_free_block *prev_free_block;
- struct _zend_mm_free_block *next_free_block;
-
- struct _zend_mm_free_block **parent;
- struct _zend_mm_free_block *child[2];
-} zend_mm_free_block;
-
-#define ZEND_MM_SMALL_FREE_BUCKET(heap, index) \
- (zend_mm_free_block *) ((char *)&heap->free_buckets[index * 2] + \
- sizeof(zend_mm_free_block *) * 2 - \
- sizeof(zend_mm_small_free_block))
-
-#define ZEND_MM_REST_BUCKET(heap) \
- (zend_mm_free_block *)((char *)&heap->rest_buckets[0] + \
- sizeof(zend_mm_free_block *) * 2 - \
- sizeof(zend_mm_small_free_block))
-
-#define ZEND_MM_NUM_BUCKETS (sizeof(size_t) << 3)
-struct _zend_mm_heap {
- int use_zend_alloc;
- void *(*_malloc)(size_t);
- void (*_free)(void *);
- void *(*_realloc)(void *, size_t);
- size_t free_bitmap;
- size_t large_free_bitmap;
- size_t block_size;
- size_t compact_size;
- zend_mm_segment *segments_list;
- zend_mm_storage *storage;
- size_t real_size;
- size_t real_peak;
- size_t limit;
- size_t size;
- size_t peak;
- size_t reserve_size;
- void *reserve;
- int overflow;
- int internal;
-#if ZEND_MM_CACHE
- unsigned int cached;
- zend_mm_free_block *cache[ZEND_MM_NUM_BUCKETS];
-#endif
- zend_mm_free_block *free_buckets[ZEND_MM_NUM_BUCKETS*2];
- zend_mm_free_block *large_free_buckets[ZEND_MM_NUM_BUCKETS];
- zend_mm_free_block *rest_buckets[2];
- int rest_count;
-#if ZEND_MM_CACHE_STAT
- struct {
- int count;
- int max_count;
- int hit;
- int miss;
- } cache_stat[ZEND_MM_NUM_BUCKETS+1];
-#endif
-};
-
-#endif
diff --git a/sapi/tests/bug69487.phpt b/sapi/tests/bug69487.phpt
new file mode 100644
index 0000000000..3ac3796826
--- /dev/null
+++ b/sapi/tests/bug69487.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #69487 (SAPI may truncate POST data)
+--INI--
+allow_url_fopen=1
+sys_temp_dir=/not-supposed-to-exist
+--POST--
+foo=bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar-bar
+--FILE--
+<?php
+var_dump(isset($_POST['foo']));
+var_dump(strlen(file_get_contents('php://input')));
+?>
+--EXPECT--
+Warning: Unknown: Unable to create temporary file, Check permissions in temporary files directory. in Unknown on line 0
+
+Warning: Unknown: POST data can't be buffered; all data discarded in Unknown on line 0
+
+Warning: Cannot modify header information - headers already sent in Unknown on line 0
+bool(false)
+int(0)
diff --git a/scripts/dev/check_parameters.php b/scripts/dev/check_parameters.php
index 658471ef2a..0f157a794c 100644
--- a/scripts/dev/check_parameters.php
+++ b/scripts/dev/check_parameters.php
@@ -20,8 +20,8 @@
/* $Id$ */
-define('REPORT_LEVEL', 2); // 0 reports less false-positives. up to level 5.
-define('VERSION', '5.2'); // minimum is 5.2
+define('REPORT_LEVEL', 1); // 0 reports less false-positives. up to level 5.
+define('VERSION', '7.0'); // minimum is 7.0
define('PHPDIR', realpath(dirname(__FILE__) . '/../..'));
@@ -33,31 +33,25 @@ ini_set('pcre.backtrack_limit', 10000000);
$API_params = array(
- 'a' => array('zval**'), // array as zval*
+ 'a' => array('zval**'), // array
+ 'A' => array('zval**'), // array or object
'b' => array('zend_bool*'), // boolean
- 'C' => array('zend_class_entry**'), // class
'd' => array('double*'), // double
'f' => array('zend_fcall_info*', 'zend_fcall_info_cache*'), // function
'h' => array('HashTable**'), // array as an HashTable*
- 'l' => array('long*'), // long
+ 'H' => array('HashTable**'), // array or HASH_OF(object)
+ 'l' => array('zend_long*'), // long
+ //TODO 'L' => array('zend_long*, '), // long
'o' => array('zval**'), //object
'O' => array('zval**', 'zend_class_entry*'), // object of given type
+ 'P' => array('zend_string**'), // valid path
'r' => array('zval**'), // resource
- 's' => array('char**', 'int*'), // string
+ 'S' => array('zend_string**'), // string
'z' => array('zval**'), // zval*
'Z' => array('zval***') // zval**
+ // 's', 'p', 'C' handled separately
);
-// specific to PHP >= 6
-if (version_compare(VERSION, '6', 'ge')) {
- $API_params['S'] = $API_params['s']; // binary string
- $API_params['t'] = array('zstr*', 'int*', 'zend_uchar*'); // text
- $API_params['T'] = $API_params['t'];
- $API_params['u'] = array('UChar**', 'int*'); // unicode
- $API_params['U'] = $API_params['u'];
-}
-
-
/** reports an error, according to its level */
function error($str, $level = 0)
{
@@ -65,7 +59,7 @@ function error($str, $level = 0)
if ($level <= REPORT_LEVEL) {
if (strpos($current_file,PHPDIR) === 0) {
- $filename = substr($current_file, strlen(PHPDIR)+1);
+ $filename = substr($current_file, strlen(PHPDIR)+1);
} else {
$filename = $current_file;
}
@@ -135,7 +129,7 @@ function get_vars($txt)
/** run diagnostic checks against one var. */
-function check_param($db, $idx, $exp, $optional)
+function check_param($db, $idx, $exp, $optional, $allow_uninit = false)
{
global $error_few_vars_given;
@@ -153,15 +147,14 @@ function check_param($db, $idx, $exp, $optional)
error("{$db[$idx][0]}: expected '$exp' but got '{$db[$idx][1]}' [".($idx+1).']');
}
- if ($optional && !$db[$idx][2]) {
- error("optional var not initialized: {$db[$idx][0]} [".($idx+1).']', 1);
-
- } elseif (!$optional && $db[$idx][2]) {
+ if (!$optional && $db[$idx][2]) {
error("not optional var is initialized: {$db[$idx][0]} [".($idx+1).']', 2);
}
+ if (!$allow_uninit && $optional && !$db[$idx][2]) {
+ error("optional var not initialized: {$db[$idx][0]} [".($idx+1).']', 1);
+ }
}
-
/** fetch params passed to zend_parse_params*() */
function get_params($vars, $str)
{
@@ -200,7 +193,15 @@ function check_function($name, $txt, $offset)
{
global $API_params;
- if (preg_match_all('/zend_parse_parameters(?:_ex\s*\([^,]+,[^,]+|\s*\([^,]+),\s*"([^"]*)"\s*,\s*([^{;]*)/S', $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
+ $regex = '/
+ (?: zend_parse_parameters(?:_throw)? \s*\([^,]+
+ | zend_parse_(?:parameters_ex|method_parameters) \s*\([^,]+,[^,]+
+ | zend_parse_method_parameters_ex \s*\([^,]+,[^,]+,[^,+]
+ )
+ ,\s*"([^"]*)"\s*
+ ,\s*([^{;]*)
+ /Sx';
+ if (preg_match_all($regex, $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
$GLOBALS['current_function'] = $name;
@@ -211,12 +212,14 @@ function check_function($name, $txt, $offset)
$vars = get_vars(substr($txt, 0, $m[0][1])); // limit var search to current location
$params = get_params($vars, $m[2][0]);
$optional = $varargs = false;
- $last_last_char = $last_char = '';
+ $last_char = '';
$j = -1;
- $len = strlen($m[1][0]);
+ $spec = $m[1][0];
+ $len = strlen($spec);
for ($i = 0; $i < $len; ++$i) {
- switch($char = $m[1][0][$i]) {
+ $char = $spec[$i];
+ switch ($char = $spec[$i]) {
// separator for optional parameters
case '|':
if ($optional) {
@@ -231,57 +234,60 @@ function check_function($name, $txt, $offset)
// separate_zval_if_not_ref
case '/':
- if (!in_array($last_char, array('r', 'z'))) {
- error("the '/' specifier cannot be applied to '$last_char'");
+ if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
+ error("the '/' specifier should not be applied to '$last_char'");
}
break;
// nullable arguments
case '!':
- if (!in_array($last_char, array('a', 'C', 'f', 'h', 'o', 'O', 'r', 's', 't', 'z', 'Z'))) {
- error("the '!' specifier cannot be applied to '$last_char'");
+ if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
+ check_param($params, ++$j, 'zend_bool*', $optional);
}
break;
- case '&':
- if (version_compare(VERSION, '6', 'ge')) {
- if ($last_char == 's' || ($last_last_char == 's' && $last_char == '!')) {
- check_param($params, ++$j, 'UConverter*', $optional);
-
- } else {
- error("the '&' specifier cannot be applied to '$last_char'");
- }
+ // variadic arguments
+ case '+':
+ case '*':
+ if ($varargs) {
+ error("A varargs specifier can only be used once. repeated char at column $i");
} else {
- error("unknown char ('&') at column $i");
+ check_param($params, ++$j, 'zval**', $optional);
+ check_param($params, ++$j, 'int*', $optional);
+ $varargs = true;
}
break;
- case '+':
- case '*':
- if (version_compare(VERSION, '6', 'ge')) {
- if ($varargs) {
- error("A varargs specifier can only be used once. repeated char at column $i");
- } else {
- check_param($params, ++$j, 'zval****', $optional);
- check_param($params, ++$j, 'int*', $optional);
- $varargs = true;
- }
- } else {
- error("unknown char ('$char') at column $i");
+ case 's':
+ case 'p':
+ check_param($params, ++$j, 'char**', $optional, $allow_uninit=true);
+ check_param($params, ++$j, 'size_t*', $optional, $allow_uninit=true);
+ if ($optional && !$params[$j-1][2] && !$params[$j][2]
+ && $params[$j-1][0] !== '**dummy**' && $params[$j][0] !== '**dummy**') {
+ error("one of optional vars {$params[$j-1][0]} or {$params[$j][0]} must be initialized", 1);
}
break;
+ case 'C':
+ // C must always be initialized, independently of whether it's optional
+ check_param($params, ++$j, 'zend_class_entry**', false);
+ break;
+
default:
- if (isset($API_params[$char])) {
- foreach($API_params[$char] as $exp) {
- check_param($params, ++$j, $exp, $optional);
- }
- } else {
+ if (!isset($API_params[$char])) {
error("unknown char ('$char') at column $i");
}
+
+ // If an is_null flag is in use, only that flag is required to be
+ // initialized
+ $allow_uninit = $i+1 < $len && $spec[$i+1] === '!'
+ && in_array($char, array('l', 'L', 'd', 'b'));
+
+ foreach ($API_params[$char] as $exp) {
+ check_param($params, ++$j, $exp, $optional, $allow_uninit);
+ }
}
- $last_last_char = $last_char;
$last_char = $char;
}
}
@@ -306,8 +312,10 @@ function recurse($path)
$txt = file_get_contents($file);
// remove comments (but preserve the number of lines)
- $txt = preg_replace(array('@//.*@S', '@/\*.*\*/@SsUe'), array('', 'preg_replace("/[^\r\n]+/S", "", \'$0\')'), $txt);
-
+ $txt = preg_replace('@//.*@S', '', $txt);
+ $txt = preg_replace_callback('@/\*.*\*/@SsU', function($matches) {
+ return preg_replace("/[^\r\n]+/S", "", $matches[0]);
+ }, $txt);
$split = preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S', $txt, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
@@ -352,7 +360,7 @@ HELP;
for ($i = 1; $i < $argc; $i++) {
$dirs[] = $argv[$i];
}
-} else {
+} else {
$dirs[] = PHPDIR;
}
diff --git a/scripts/dev/find_tested.php b/scripts/dev/find_tested.php
index e841e2e959..0881e9ea47 100644
--- a/scripts/dev/find_tested.php
+++ b/scripts/dev/find_tested.php
@@ -68,7 +68,10 @@ get_phpt_files($extension_test_path, $count, $phpt_files);
$extension_method_info = mark_methods_as_tested($extension_method_info, $phpt_files);
-
+/**
+ * The loop to ouput the test coverage info
+ * Should output: Extension, Class Name, Method/Function Name, Test Status, Test Files
+ */
foreach($extension_method_info as $record) {
echo $record[EXTENSION_NAME] . ",";
echo $record[CLASS_NAME] . ",";
@@ -193,11 +196,14 @@ function get_phpt_files($dir, &$phpt_file_count, &$all_phpt)
}
}
-function extract_tests($file) {
+/**
+ * Extract tests from a specified file, returns an array of tested function tokens
+ */
+function extract_tests($file) {
$code = file_get_contents($file);
if (!preg_match('/--FILE--\s*(.*)\s*--(EXPECTF|EXPECTREGEX|EXPECT)?--/is', $code, $r)) {
-// print "Unable to get code in ".$file."\n";
+ //print "Unable to get code in ".$file."\n";
return array();
}
diff --git a/scripts/dev/gen_verify_stub b/scripts/dev/gen_verify_stub
new file mode 100755
index 0000000000..4d07a9dcb8
--- /dev/null
+++ b/scripts/dev/gen_verify_stub
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+if [ "x$1" == "x" ]
+then
+ echo "Usage: $0 <version> [email]"
+ echo "Generate the tarball verification info suitable to put into an announcement."
+ echo
+ echo "Examples"
+ echo " $0 7.0.0beta3"
+ exit 0
+fi
+
+RELEASE_VER=$1
+
+GPG_USER=
+if [ "x$2" != "x" ]
+then
+ GPG_USER=$2
+fi
+
+if test "x$PHPROOT" == "x"; then
+ PHPROOT=.
+fi
+
+for TARBALL in "$PHPROOT/php-$RELEASE_VER.tar.bz2" "$PHPROOT/php-$RELEASE_VER.tar.gz" "$PHPROOT/php-$RELEASE_VER.tar.xz"
+do
+ if ! [ -e $TARBALL ]
+ then
+ echo "$TARBALL doesn't exist"
+ exit 3
+ fi
+
+ if [ -n $GPG_USER ]
+ then
+ gpg --armor --detach-sign $TARBALL
+ else
+ gpg -u $GPG_USER --armor --detach-sign $TARBALL
+ fi
+done
+
+for TARBALL in "$PHPROOT/php-$RELEASE_VER.tar.bz2" "$PHPROOT/php-$RELEASE_VER.tar.gz" "$PHPROOT/php-$RELEASE_VER.tar.xz"
+do
+ basename $TARBALL
+ echo "SHA256 hash: `sha256sum $TARBALL | cut -d' ' -f1`";
+ echo PGP signature:
+ cat $TARBALL.asc
+ echo -e "\n"
+done
+
+exit 0
+
diff --git a/scripts/man1/php-config.1.in b/scripts/man1/php-config.1.in
index ae2ee56bbc..d9fa4b0985 100644
--- a/scripts/man1/php-config.1.in
+++ b/scripts/man1/php-config.1.in
@@ -1,4 +1,4 @@
-.TH @program_prefix@php\-config 1 "2014" "The PHP Group" "Scripting Language"
+.TH @program_prefix@php\-config 1 "2016" "The PHP Group" "Scripting Language"
.SH NAME
@program_prefix@php\-config \- get information about PHP configuration and compile options
.SH SYNOPSIS
@@ -65,7 +65,7 @@ PHP version as integer
.SH VERSION INFORMATION
This manpage describes \fBphp\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2014 The PHP Group
+Copyright \(co 1997\-2016 The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/scripts/man1/phpize.1.in b/scripts/man1/phpize.1.in
index e49adb1b79..66c3c352f0 100644
--- a/scripts/man1/phpize.1.in
+++ b/scripts/man1/phpize.1.in
@@ -1,4 +1,4 @@
-.TH @program_prefix@phpize 1 "2014" "The PHP Group" "Scripting Language"
+.TH @program_prefix@phpize 1 "2016" "The PHP Group" "Scripting Language"
.SH NAME
@program_prefix@phpize \- prepare a PHP extension for compiling
.SH SYNOPSIS
@@ -32,7 +32,7 @@ Prints API version information
.SH VERSION INFORMATION
This manpage describes \fBphp\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2014 The PHP Group
+Copyright \(co 1997\-2016 The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/server-tests.php b/server-tests.php
index 8c2ae8607b..6971d679f1 100755
--- a/server-tests.php
+++ b/server-tests.php
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2010 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -48,14 +48,6 @@ define('PCRE_MISSING_ERROR',
| with --with-pcre-regex or if you have compiled pcre as a |
| shared module load it via php.ini. |
+-----------------------------------------------------------+');
-define('SAFE_MODE_WARNING',
-'+-----------------------------------------------------------+
-| ! WARNING ! |
-| You are running the test-suite with "safe_mode" ENABLED ! |
-| |
-| Chances are high that no test will work at all, |
-| depending on how you configured "safe_mode" ! |
-+-----------------------------------------------------------+');
define('TMP_MISSING',
'+-----------------------------------------------------------+
| ! ERROR ! |
@@ -456,7 +448,6 @@ class testHarness {
'output_handler'=>'',
'zlib.output_compression'=>'Off',
'open_basedir'=>'',
- 'safe_mode'=>'0',
'disable_functions'=>'',
'output_buffering'=>'Off',
'error_reporting'=>'4095',
@@ -736,7 +727,7 @@ class testHarness {
}
function checkRequirements() {
- if (version_compare(phpversion(), "5.0") < 0) {
+ if (version_compare(phpversion(), "5.4") < 0) {
$this->writemsg(REQ_PHP_VERSION);
exit;
}
@@ -753,9 +744,6 @@ class testHarness {
$this->writemsg(PCRE_MISSING_ERROR);
exit;
}
- if (ini_get('safe_mode')) {
- $this->writemsg(SAFE_MODE_WARNING);
- }
}
//
diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt
new file mode 100644
index 0000000000..d0cd72577e
--- /dev/null
+++ b/tests/basic/bug71273.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #71273 A wrong ext directory setup in php.ini leads to crash
+--SKIPIF--
+<?php
+ if ("cli" != php_sapi_name()) {
+ die("skip CLI only");
+ }
+?>
+--FILE--
+<?php
+ /* NOTE this file is required to be encoded in iso-8859-1 */
+
+ $cmd = getenv('TEST_PHP_EXECUTABLE') . " -n -d html_errors=on -d extension_dir=a/é/w -d extension=php_kartoffelbrei.dll -v 2>&1";
+ $out = shell_exec($cmd);
+
+ var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
+?>
+==DONE==
+--EXPECTF--
+int(1)
+==DONE==
diff --git a/tests/basic/header_register_callback.phpt b/tests/basic/header_register_callback.phpt
new file mode 100644
index 0000000000..641ee9e3e7
--- /dev/null
+++ b/tests/basic/header_register_callback.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Test header_register_callback
+--FILE--
+<?php
+header_register_callback(function() { echo "sent";});
+?>
+--EXPECT--
+sent
diff --git a/tests/basic/timeout_config.inc b/tests/basic/timeout_config.inc
index 18a00b2c48..7182080939 100644
--- a/tests/basic/timeout_config.inc
+++ b/tests/basic/timeout_config.inc
@@ -4,8 +4,8 @@ $t = 3;
function busy_wait($how_long)
{
- $until = time() + $how_long;
+ $until = microtime(TRUE) + $how_long;
- while ($until > time());
+ while ($until > microtime(TRUE));
}
diff --git a/tests/basic/timeout_variation_5.phpt b/tests/basic/timeout_variation_5.phpt
index a6836c5a2e..1c28c00ac9 100644
--- a/tests/basic/timeout_variation_5.phpt
+++ b/tests/basic/timeout_variation_5.phpt
@@ -1,5 +1,5 @@
--TEST--
-Timeout within function containing exteption
+Timeout within function containing exception
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
diff --git a/tests/basic/timeout_variation_6.phpt b/tests/basic/timeout_variation_6.phpt
index d3d843ca86..fb3c3a7aca 100644
--- a/tests/basic/timeout_variation_6.phpt
+++ b/tests/basic/timeout_variation_6.phpt
@@ -1,5 +1,5 @@
--TEST--
-Timeout within function trowing exteption before timeout reached
+Timeout within function trowing exception before timeout reached
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
diff --git a/tests/classes/constants_comments_001.phpt b/tests/classes/constants_comments_001.phpt
new file mode 100644
index 0000000000..dbdd67c332
--- /dev/null
+++ b/tests/classes/constants_comments_001.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Class constants and doc comments
+--INI--
+opcache.save_comments=1
+--FILE--
+<?php
+class X {
+ /** comment X1 */
+ const X1 = 1;
+ const X2 = 2;
+ /** comment X3 */
+ const X3 = 3;
+}
+class Y extends X {
+ /** comment Y1 */
+ const Y1 = 1;
+ const Y2 = 2;
+ /** comment Y3 */
+ const Y3 = 3;
+}
+$r = new ReflectionClass('Y');
+foreach ($r->getReflectionConstants() as $rc) {
+ echo $rc->getName() . " : " . $rc->getDocComment() . "\n";
+}
+
+
+?>
+--EXPECT--
+Y1 : /** comment Y1 */
+Y2 :
+Y3 : /** comment Y3 */
+X1 : /** comment X1 */
+X2 :
+X3 : /** comment X3 */
diff --git a/tests/classes/constants_visibility_001.phpt b/tests/classes/constants_visibility_001.phpt
new file mode 100644
index 0000000000..37a0154d92
--- /dev/null
+++ b/tests/classes/constants_visibility_001.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Class public constant visibility
+--FILE--
+<?php
+class A {
+ public const publicConst = 'publicConst';
+ static function staticConstDump() {
+ var_dump(self::publicConst);
+ }
+ function constDump() {
+ var_dump(self::publicConst);
+ }
+}
+
+var_dump(A::publicConst);
+A::staticConstDump();
+(new A())->constDump();
+
+?>
+--EXPECTF--
+string(11) "publicConst"
+string(11) "publicConst"
+string(11) "publicConst"
diff --git a/tests/classes/constants_visibility_002.phpt b/tests/classes/constants_visibility_002.phpt
new file mode 100644
index 0000000000..82bdd6df1f
--- /dev/null
+++ b/tests/classes/constants_visibility_002.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Class protected constant visibility
+--FILE--
+<?php
+class A {
+ protected const protectedConst = 'protectedConst';
+ static function staticConstDump() {
+ var_dump(self::protectedConst);
+ }
+ function constDump() {
+ var_dump(self::protectedConst);
+ }
+}
+
+A::staticConstDump();
+(new A())->constDump();
+constant('A::protectedConst');
+
+?>
+--EXPECTF--
+string(14) "protectedConst"
+string(14) "protectedConst"
+
+Warning: constant(): Couldn't find constant A::protectedConst in %s on line 14
+
+Fatal error: Uncaught Error: Cannot access protected const A::protectedConst in %s:14
+Stack trace:
+#0 %s(14): constant('A::protectedCon...')
+#1 {main}
+ thrown in %s on line 14
diff --git a/tests/classes/constants_visibility_003.phpt b/tests/classes/constants_visibility_003.phpt
new file mode 100644
index 0000000000..7f049abffb
--- /dev/null
+++ b/tests/classes/constants_visibility_003.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Class private constant visibility
+--FILE--
+<?php
+class A {
+ private const privateConst = 'privateConst';
+ static function staticConstDump() {
+ var_dump(self::privateConst);
+ }
+ function constDump() {
+ var_dump(self::privateConst);
+ }
+}
+
+A::staticConstDump();
+(new A())->constDump();
+constant('A::privateConst');
+
+?>
+--EXPECTF--
+string(12) "privateConst"
+string(12) "privateConst"
+
+Warning: constant(): Couldn't find constant A::privateConst in %s on line 14
+
+Fatal error: Uncaught Error: Cannot access private const A::privateConst in %s:14
+Stack trace:
+#0 %s(14): constant('A::privateConst')
+#1 {main}
+ thrown in %s on line 14
diff --git a/tests/classes/constants_visibility_004.phpt b/tests/classes/constants_visibility_004.phpt
new file mode 100644
index 0000000000..93acacf3c9
--- /dev/null
+++ b/tests/classes/constants_visibility_004.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Only public and protected class constants should be inherited
+--FILE--
+<?php
+class A {
+ public const X = 1;
+ protected const Y = 2;
+ private const Z = 3;
+}
+class B extends A {
+ static public function checkConstants() {
+ var_dump(self::X);
+ var_dump(self::Y);
+ var_dump(self::Z);
+ }
+}
+
+B::checkConstants();
+?>
+--EXPECTF--
+int(1)
+int(2)
+
+Fatal error: Uncaught Error: Undefined class constant 'Z' in %s:11
+Stack trace:
+#0 %s(15): B::checkConstants()
+#1 {main}
+ thrown in %s on line 11
diff --git a/tests/classes/constants_visibility_005.phpt b/tests/classes/constants_visibility_005.phpt
new file mode 100644
index 0000000000..813009c675
--- /dev/null
+++ b/tests/classes/constants_visibility_005.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Static constants are not allowed
+--FILE--
+<?php
+class A {
+ static const X = 1;
+}
+?>
+--EXPECTF--
+Fatal error: Cannot use 'static' as constant modifier in %s on line 3
diff --git a/tests/classes/constants_visibility_006.phpt b/tests/classes/constants_visibility_006.phpt
new file mode 100644
index 0000000000..537c8eac0f
--- /dev/null
+++ b/tests/classes/constants_visibility_006.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Abstract constants are not allowed
+--FILE--
+<?php
+class A {
+ abstract const X = 1;
+}
+?>
+--EXPECTF--
+Fatal error: Cannot use 'abstract' as constant modifier in %s on line 3
+
diff --git a/tests/classes/constants_visibility_007.phpt b/tests/classes/constants_visibility_007.phpt
new file mode 100644
index 0000000000..f1b040c5c3
--- /dev/null
+++ b/tests/classes/constants_visibility_007.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Final constants are not allowed
+--FILE--
+<?php
+class A {
+ final const X = 1;
+}
+?>
+--EXPECTF--
+Fatal error: Cannot use 'final' as constant modifier in %s on line 3
diff --git a/tests/classes/constants_visibility_error_001.phpt b/tests/classes/constants_visibility_error_001.phpt
new file mode 100644
index 0000000000..397dd24882
--- /dev/null
+++ b/tests/classes/constants_visibility_error_001.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Class private constant visibility error
+--FILE--
+<?php
+class A {
+ private const privateConst = 'privateConst';
+}
+
+var_dump(A::privateConst);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Cannot access private const A::privateConst in %s:6
+Stack trace:
+#0 {main}
+ thrown in %s on line 6
diff --git a/tests/classes/constants_visibility_error_002.phpt b/tests/classes/constants_visibility_error_002.phpt
new file mode 100644
index 0000000000..2980b52c37
--- /dev/null
+++ b/tests/classes/constants_visibility_error_002.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Class protected constant visibility error
+--FILE--
+<?php
+class A {
+ protected const protectedConst = 'protectedConst';
+}
+
+var_dump(A::protectedConst);
+
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Cannot access protected const A::protectedConst in %s:6
+Stack trace:
+#0 {main}
+ thrown in %s on line 6
diff --git a/tests/classes/constants_visibility_error_003.phpt b/tests/classes/constants_visibility_error_003.phpt
new file mode 100644
index 0000000000..c385bbd300
--- /dev/null
+++ b/tests/classes/constants_visibility_error_003.phpt
@@ -0,0 +1,16 @@
+--TEST--
+A redeclared class constant must have the same or higher visibility
+--FILE--
+<?php
+
+class A {
+ public const publicConst = 0;
+}
+
+class B extends A {
+ protected const publicConst = 1;
+}
+
+
+--EXPECTF--
+Fatal error: Access level to B::publicConst must be public (as in class A) in %s on line 9
diff --git a/tests/classes/constants_visibility_error_004.phpt b/tests/classes/constants_visibility_error_004.phpt
new file mode 100644
index 0000000000..fe37b0691f
--- /dev/null
+++ b/tests/classes/constants_visibility_error_004.phpt
@@ -0,0 +1,16 @@
+--TEST--
+A redeclared class constant must have the same or higher visibility
+--FILE--
+<?php
+
+class A {
+ protected const protectedConst = 0;
+}
+
+class B extends A {
+ private const protectedConst = 1;
+}
+
+
+--EXPECTF--
+Fatal error: Access level to B::protectedConst must be protected (as in class A) or weaker in %s on line 9
diff --git a/tests/classes/interface_constant_inheritance_005.phpt b/tests/classes/interface_constant_inheritance_005.phpt
new file mode 100644
index 0000000000..60bf222e85
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_005.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Ensure a interface can have public constants
+--FILE--
+<?php
+interface IA {
+ public const FOO = 10;
+}
+
+echo "Done\n";
+?>
+--EXPECT--
+Done \ No newline at end of file
diff --git a/tests/classes/interface_constant_inheritance_006.phpt b/tests/classes/interface_constant_inheritance_006.phpt
new file mode 100644
index 0000000000..125326b224
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_006.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Ensure a interface can not have protected constants
+
+--FILE--
+<?php
+interface A {
+ protected const FOO = 10;
+}
+--EXPECTF--
+Fatal error: Access type for interface constant A::FOO must be public in %s on line 3
diff --git a/tests/classes/interface_constant_inheritance_007.phpt b/tests/classes/interface_constant_inheritance_007.phpt
new file mode 100644
index 0000000000..52695343e1
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_007.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Ensure a interface can not have private constants
+
+--FILE--
+<?php
+interface A {
+ private const FOO = 10;
+}
+--EXPECTF--
+Fatal error: Access type for interface constant A::FOO must be public in %s on line 3
diff --git a/tests/classes/tostring_003.phpt b/tests/classes/tostring_003.phpt
index 8815bd9407..096a7502fe 100644
--- a/tests/classes/tostring_003.phpt
+++ b/tests/classes/tostring_003.phpt
@@ -30,4 +30,4 @@ catch(Exception $e)
?>
====DONE====
--EXPECTF--
-Fatal error: Method Test::__toString() must not throw an exception in %stostring_003.php on line %d
+Fatal error: Method Test::__toString() must not throw an exception, caught Exception: Damn! in %stostring_003.php on line %d
diff --git a/tests/classes/type_hinting_004.phpt b/tests/classes/type_hinting_004.phpt
index c5f8d3984b..8883f26336 100644
--- a/tests/classes/type_hinting_004.phpt
+++ b/tests/classes/type_hinting_004.phpt
@@ -149,10 +149,10 @@ Ensure type hints are enforced for functions invoked as callbacks.
?>
--EXPECTF--
---> Type hints with callback function:
-1: Argument 1 passed to f1() must be an instance of A, integer given%s(%d)
+0: Argument 1 passed to f1() must be an instance of A, integer given%s(%d)
in f1;
-1: Argument 1 passed to f2() must be an instance of A, integer given%s(%d)
+0: Argument 1 passed to f2() must be an instance of A, integer given%s(%d)
in f2;
in f2;
@@ -160,10 +160,10 @@ in f2;
---> Type hints with callback static method:
-1: Argument 1 passed to C::f1() must be an instance of A, integer given%s(%d)
+0: Argument 1 passed to C::f1() must be an instance of A, integer given%s(%d)
in C::f1 (static);
-1: Argument 1 passed to C::f2() must be an instance of A, integer given%s(%d)
+0: Argument 1 passed to C::f2() must be an instance of A, integer given%s(%d)
in C::f2 (static);
in C::f2 (static);
@@ -171,10 +171,10 @@ in C::f2 (static);
---> Type hints with callback instance method:
-1: Argument 1 passed to D::f1() must be an instance of A, integer given%s(%d)
+0: Argument 1 passed to D::f1() must be an instance of A, integer given%s(%d)
in C::f1 (instance);
-1: Argument 1 passed to D::f2() must be an instance of A, integer given%s(%d)
+0: Argument 1 passed to D::f2() must be an instance of A, integer given%s(%d)
in C::f2 (instance);
in C::f2 (instance);
diff --git a/tests/lang/030.phpt b/tests/lang/030.phpt
index 9ee40ea5aa..7f94b2eb74 100644
--- a/tests/lang/030.phpt
+++ b/tests/lang/030.phpt
@@ -24,7 +24,8 @@ $bar1->Name = 'outside';
$bar1->echoName();
$List->echoName();
-$bar1 =& foo2(new foo('constructor'));
+$foo = new foo('constructor');
+$bar1 =& foo2($foo);
$bar1->Name = 'outside';
$bar1->echoName();
diff --git a/tests/lang/045.phpt b/tests/lang/045.phpt
index 11598cf035..44fb801410 100644
--- a/tests/lang/045.phpt
+++ b/tests/lang/045.phpt
@@ -3,7 +3,10 @@ Timeout again inside register_shutdown_function
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+if (PHP_ZTS) die("skip hard_timeout works only on no-zts builds");
?>
+--INI--
+hard_timeout=1
--FILE--
<?php
set_time_limit(1);
diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt
index 270584185f..4614efc169 100644
--- a/tests/lang/bug22592.phpt
+++ b/tests/lang/bug22592.phpt
@@ -32,7 +32,8 @@ var_dump($result);
$e = $result[1] = $result[6];
var_dump($result);
var_dump($a, $b, $c, $d, $e);
-$result[-1] = 'a';
+$result[0] = $result[-4] = $result[-1] = 'a';
+var_dump($result);
?>
--EXPECT--
string(5) "* *-*"
@@ -50,4 +51,4 @@ string(1) "s"
string(1) "4"
string(1) "5"
string(1) "5"
-[Illegal string offset: -1]
+string(9) "a54s4a50a"
diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt
index d02889101e..ac3d78d06c 100644
--- a/tests/lang/bug24640.phpt
+++ b/tests/lang/bug24640.phpt
@@ -112,7 +112,7 @@ float(I%s)
I%s
I%s
------
-0
+0.0
float(0)
0
0
@@ -122,7 +122,7 @@ float(I%s)
I%s
I%s
------
-0
+0.0
float(0)
0
0
diff --git a/tests/lang/bug28800.phpt b/tests/lang/bug28800.phpt
index f81ad7fec9..8bd2c306e1 100644
--- a/tests/lang/bug28800.phpt
+++ b/tests/lang/bug28800.phpt
@@ -7,11 +7,23 @@ Bug #28800 (Incorrect string to number conversion for strings starting with 'inf
echo ($v+0)."\n";
}
?>
---EXPECT--
+--EXPECTF--
+
+Warning: A non-numeric value encountered in %s on line %d
0
+
+Warning: A non-numeric value encountered in %s on line %d
0
+
+Warning: A non-numeric value encountered in %s on line %d
0
+
+Warning: A non-numeric value encountered in %s on line %d
0
+
+Warning: A non-numeric value encountered in %s on line %d
0
+
+Warning: A non-numeric value encountered in %s on line %d
0
diff --git a/tests/lang/bug71897.phpt b/tests/lang/bug71897.phpt
new file mode 100644
index 0000000000..bd76921af6
--- /dev/null
+++ b/tests/lang/bug71897.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #71897 (ASCII 0x7F Delete control character permitted in identifiers)
+--FILE--
+<?php
+
+eval("
+ \$a\x7Fb = 3;
+ var_dump(\$a\x7Fb);
+");
+
+?>
+--EXPECTF--
+
+Warning: Unexpected character in input: '%s' (ASCII=127) state=0 in %s(%d) : eval()'d code on line %d
+
+Parse error: syntax error, unexpected 'b' (T_STRING) in %s(%d) : eval()'d code on line %d
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
index 6a44c5d630..0176d90738 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr.phpt
@@ -19,7 +19,7 @@ foreach ($strVals as $strVal) {
echo "--- testing: '$strVal' << '$otherVal' ---\n";
try {
var_dump(strVal<<$otherVal);
- } catch (Exception $e) {
+ } catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
}
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
index d5888d837f..69fd90f1c8 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
@@ -226,17 +226,17 @@ int(984)
--- testing: '123abc' << 'a5.9' ---
int(123)
--- testing: '123e5' << '0' ---
-int(123)
+int(12300000)
--- testing: '123e5' << '65' ---
int(0)
--- testing: '123e5' << '-44' ---
Exception: Bit shift by negative number
--- testing: '123e5' << '1.2' ---
-int(246)
+int(24600000)
--- testing: '123e5' << '-7.7' ---
Exception: Bit shift by negative number
--- testing: '123e5' << 'abc' ---
-int(123)
+int(12300000)
--- testing: '123e5' << '123abc' ---
int(0)
--- testing: '123e5' << '123e5' ---
@@ -250,21 +250,21 @@ int(0)
--- testing: '123e5' << '123abc ' ---
int(0)
--- testing: '123e5' << '3.4a' ---
-int(984)
+int(98400000)
--- testing: '123e5' << 'a5.9' ---
-int(123)
+int(12300000)
--- testing: '123e5xyz' << '0' ---
-int(123)
+int(12300000)
--- testing: '123e5xyz' << '65' ---
int(0)
--- testing: '123e5xyz' << '-44' ---
Exception: Bit shift by negative number
--- testing: '123e5xyz' << '1.2' ---
-int(246)
+int(24600000)
--- testing: '123e5xyz' << '-7.7' ---
Exception: Bit shift by negative number
--- testing: '123e5xyz' << 'abc' ---
-int(123)
+int(12300000)
--- testing: '123e5xyz' << '123abc' ---
int(0)
--- testing: '123e5xyz' << '123e5' ---
@@ -278,9 +278,9 @@ int(0)
--- testing: '123e5xyz' << '123abc ' ---
int(0)
--- testing: '123e5xyz' << '3.4a' ---
-int(984)
+int(98400000)
--- testing: '123e5xyz' << 'a5.9' ---
-int(123)
+int(12300000)
--- testing: ' 123abc' << '0' ---
int(123)
--- testing: ' 123abc' << '65' ---
diff --git a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
index a86d0cfddb..a4c425aab3 100644
--- a/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
+++ b/tests/lang/operators/bitwiseShiftRight_variationStr.phpt
@@ -222,17 +222,17 @@ int(15)
--- testing: '123abc' >> 'a5.9' ---
int(123)
--- testing: '123e5' >> '0' ---
-int(123)
+int(12300000)
--- testing: '123e5' >> '65' ---
int(0)
--- testing: '123e5' >> '-44' ---
Exception: Bit shift by negative number
--- testing: '123e5' >> '1.2' ---
-int(61)
+int(6150000)
--- testing: '123e5' >> '-7.7' ---
Exception: Bit shift by negative number
--- testing: '123e5' >> 'abc' ---
-int(123)
+int(12300000)
--- testing: '123e5' >> '123abc' ---
int(0)
--- testing: '123e5' >> '123e5' ---
@@ -246,21 +246,21 @@ int(0)
--- testing: '123e5' >> '123abc ' ---
int(0)
--- testing: '123e5' >> '3.4a' ---
-int(15)
+int(1537500)
--- testing: '123e5' >> 'a5.9' ---
-int(123)
+int(12300000)
--- testing: '123e5xyz' >> '0' ---
-int(123)
+int(12300000)
--- testing: '123e5xyz' >> '65' ---
int(0)
--- testing: '123e5xyz' >> '-44' ---
Exception: Bit shift by negative number
--- testing: '123e5xyz' >> '1.2' ---
-int(61)
+int(6150000)
--- testing: '123e5xyz' >> '-7.7' ---
Exception: Bit shift by negative number
--- testing: '123e5xyz' >> 'abc' ---
-int(123)
+int(12300000)
--- testing: '123e5xyz' >> '123abc' ---
int(0)
--- testing: '123e5xyz' >> '123e5' ---
@@ -274,9 +274,9 @@ int(0)
--- testing: '123e5xyz' >> '123abc ' ---
int(0)
--- testing: '123e5xyz' >> '3.4a' ---
-int(15)
+int(1537500)
--- testing: '123e5xyz' >> 'a5.9' ---
-int(123)
+int(12300000)
--- testing: ' 123abc' >> '0' ---
int(123)
--- testing: ' 123abc' >> '65' ---
diff --git a/tests/lang/operators/modulus_variationStr.phpt b/tests/lang/operators/modulus_variationStr.phpt
index c647ecd380..4cfd7768ff 100644
--- a/tests/lang/operators/modulus_variationStr.phpt
+++ b/tests/lang/operators/modulus_variationStr.phpt
@@ -208,9 +208,9 @@ Exception: Modulo by zero
--- testing: '123abc' % '123abc' ---
int(0)
--- testing: '123abc' % '123e5' ---
-int(0)
+int(123)
--- testing: '123abc' % '123e5xyz' ---
-int(0)
+int(123)
--- testing: '123abc' % ' 123abc' ---
int(0)
--- testing: '123abc' % '123 abc' ---
@@ -224,13 +224,13 @@ Exception: Modulo by zero
--- testing: '123e5' % '0' ---
Exception: Modulo by zero
--- testing: '123e5' % '65' ---
-int(58)
+int(50)
--- testing: '123e5' % '-44' ---
-int(35)
+int(20)
--- testing: '123e5' % '1.2' ---
int(0)
--- testing: '123e5' % '-7.7' ---
-int(4)
+int(6)
--- testing: '123e5' % 'abc' ---
Exception: Modulo by zero
--- testing: '123e5' % '123abc' ---
@@ -252,13 +252,13 @@ Exception: Modulo by zero
--- testing: '123e5xyz' % '0' ---
Exception: Modulo by zero
--- testing: '123e5xyz' % '65' ---
-int(58)
+int(50)
--- testing: '123e5xyz' % '-44' ---
-int(35)
+int(20)
--- testing: '123e5xyz' % '1.2' ---
int(0)
--- testing: '123e5xyz' % '-7.7' ---
-int(4)
+int(6)
--- testing: '123e5xyz' % 'abc' ---
Exception: Modulo by zero
--- testing: '123e5xyz' % '123abc' ---
@@ -292,9 +292,9 @@ Exception: Modulo by zero
--- testing: ' 123abc' % '123abc' ---
int(0)
--- testing: ' 123abc' % '123e5' ---
-int(0)
+int(123)
--- testing: ' 123abc' % '123e5xyz' ---
-int(0)
+int(123)
--- testing: ' 123abc' % ' 123abc' ---
int(0)
--- testing: ' 123abc' % '123 abc' ---
@@ -320,9 +320,9 @@ Exception: Modulo by zero
--- testing: '123 abc' % '123abc' ---
int(0)
--- testing: '123 abc' % '123e5' ---
-int(0)
+int(123)
--- testing: '123 abc' % '123e5xyz' ---
-int(0)
+int(123)
--- testing: '123 abc' % ' 123abc' ---
int(0)
--- testing: '123 abc' % '123 abc' ---
@@ -348,9 +348,9 @@ Exception: Modulo by zero
--- testing: '123abc ' % '123abc' ---
int(0)
--- testing: '123abc ' % '123e5' ---
-int(0)
+int(123)
--- testing: '123abc ' % '123e5xyz' ---
-int(0)
+int(123)
--- testing: '123abc ' % ' 123abc' ---
int(0)
--- testing: '123abc ' % '123 abc' ---
diff --git a/tests/lang/operators/negate_variationStr.phpt b/tests/lang/operators/negate_variationStr.phpt
index a25bdda7f5..7405d42882 100644
--- a/tests/lang/operators/negate_variationStr.phpt
+++ b/tests/lang/operators/negate_variationStr.phpt
@@ -16,7 +16,7 @@ foreach ($strVals as $strVal) {
?>
===DONE===
---EXPECT--
+--EXPECTF--
--- testing: '0' ---
int(0)
--- testing: '65' ---
@@ -28,21 +28,37 @@ float(-1.2)
--- testing: '-7.7' ---
float(7.7)
--- testing: 'abc' ---
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
--- testing: '123abc' ---
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(-123)
--- testing: '123e5' ---
float(-12300000)
--- testing: '123e5xyz' ---
+
+Notice: A non well formed numeric value encountered in %s on line %d
float(-12300000)
--- testing: ' 123abc' ---
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(-123)
--- testing: '123 abc' ---
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(-123)
--- testing: '123abc ' ---
+
+Notice: A non well formed numeric value encountered in %s on line %d
int(-123)
--- testing: '3.4a' ---
+
+Notice: A non well formed numeric value encountered in %s on line %d
float(-3.4)
--- testing: 'a5.9' ---
+
+Warning: A non-numeric value encountered in %s on line %d
int(0)
===DONE===
diff --git a/tests/lang/type_hints_003.phpt b/tests/lang/type_hints_003.phpt
index 0ef3e3516b..2b536d0185 100644
--- a/tests/lang/type_hints_003.phpt
+++ b/tests/lang/type_hints_003.phpt
@@ -1,5 +1,5 @@
--TEST--
-ZE2 type hinting
+ZE2 type
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
@@ -11,4 +11,4 @@ class T {
?>
--EXPECTF--
-Fatal error: Default value for parameters with a class type hint can only be NULL in %stype_hints_003.php on line 3
+Fatal error: Default value for parameters with a class type can only be NULL in %stype_hints_003.php on line 3
diff --git a/tests/output/bug65593.phpt b/tests/output/bug65593.phpt
index 9ae62a1d72..3375a6bf08 100644
--- a/tests/output/bug65593.phpt
+++ b/tests/output/bug65593.phpt
@@ -6,8 +6,8 @@ echo "Test\n";
ob_start(function(){ob_start();});
?>
-===DONE===
--EXPECTF--
Test
-Catchable fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %sbug65593.php on line %d
+Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %sbug65593.php on line %d
+
diff --git a/tests/output/bug70970.phpt b/tests/output/bug70970.phpt
new file mode 100644
index 0000000000..f87e6f6977
--- /dev/null
+++ b/tests/output/bug70970.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #70970 (Segfault when combining error handler with output buffering)
+--FILE--
+<?php
+function exception_error_handler($severity, $message, $file, $line)
+{
+ throw new Exception($message, 0);
+}
+
+set_error_handler('exception_error_handler');
+
+function obHandler($buffer, $phase = null)
+{
+ try {
+ ob_start();
+ } catch (Exception $e) {
+ return (string) $e;
+ }
+
+ return $buffer;
+}
+
+ob_start('obHandler');
+
+print 'test';
+?>
+--EXPECTF--
+Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %sbug70970.php on line %d
diff --git a/tests/output/ob_010.phpt b/tests/output/ob_010.phpt
index 3e0c1a46e5..24d650c50d 100644
--- a/tests/output/ob_010.phpt
+++ b/tests/output/ob_010.phpt
@@ -10,4 +10,4 @@ ob_start("obh");
echo "foo\n";
?>
--EXPECTF--
-Catchable fatal error: print_r(): Cannot use output buffering in output buffering display handlers in %sob_010.php on line %d
+Fatal error: print_r(): Cannot use output buffering in output buffering display handlers in %sob_010.php on line %d
diff --git a/tests/output/ob_011.phpt b/tests/output/ob_011.phpt
index a411debe17..35b0388339 100644
--- a/tests/output/ob_011.phpt
+++ b/tests/output/ob_011.phpt
@@ -10,4 +10,4 @@ ob_start("obh");
echo "foo\n";
?>
--EXPECTF--
-Catchable fatal error: ob_get_flush(): Cannot use output buffering in output buffering display handlers in %sob_011.php on line %d
+Fatal error: ob_get_flush(): Cannot use output buffering in output buffering display handlers in %sob_011.php on line %d
diff --git a/tests/output/ob_start_error_005.phpt b/tests/output/ob_start_error_005.phpt
index ebe625504b..134f2249b7 100644
--- a/tests/output/ob_start_error_005.phpt
+++ b/tests/output/ob_start_error_005.phpt
@@ -20,4 +20,4 @@ var_dump(ob_start('f'));
echo "done";
?>
--EXPECTF--
-Catchable fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %s on line 9
+Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %s on line 9
diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt
index 1413a198a6..07ad7a659b 100644
--- a/tests/run-test/test005.phpt
+++ b/tests/run-test/test005.phpt
@@ -1,8 +1,8 @@
--TEST--
-Error message handling (without ZendOptimizer)
+Error message handling (with ZendOpcache)
--SKIPIF--
<?php
-!extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is loaded");
+extension_loaded("Zend Opcache") or die("skip Zend Opcache is not loaded");
?>
--FILE--
<?php
@@ -19,7 +19,8 @@ var_dump(ini_get('track_errors'));
ini_set('display_errors', 0);
var_dump(ini_get('display_errors'));
var_dump($php_errormsg);
-ini_set("zend.assertions", -1);
+$zero = 0;
+$error = 1 / $zero;
var_dump($php_errormsg);
?>
--EXPECTF--
@@ -29,4 +30,4 @@ string(1) "0"
string(1) "1"
string(1) "0"
NULL
-string(%d) "%senabled or disabled%s"
+string(%d) "%sivision by zer%s"
diff --git a/tests/run-test/test006.phpt b/tests/run-test/test006.phpt
index 0ab1092a72..4dca66a4f7 100644
--- a/tests/run-test/test006.phpt
+++ b/tests/run-test/test006.phpt
@@ -3,7 +3,7 @@ Error messages are shown
--FILE--
<?php
// If this test fails ask the developers of run-test.php
-ini_set("zend.assertions", -1);
+$error = 1 / 0;
?>
--EXPECTREGEX--
-.*enabled or disabled.*
+.*Division by zero.*
diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt
index 41733d96f7..7d95d8937b 100644
--- a/tests/run-test/test008.phpt
+++ b/tests/run-test/test008.phpt
@@ -1,8 +1,8 @@
--TEST--
-Error message handling (with ZendOptimizer)
+Error message handling (without ZendOpcache)
--SKIPIF--
<?php
-extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is not loaded");
+!extension_loaded("Zend Opcache") or die("skip Zend Opcache is loaded");
?>
--FILE--
<?php
@@ -16,18 +16,15 @@ var_dump(ini_get('display_errors'));
var_dump(ini_get('error_reporting'));
var_dump(ini_get('log_errors'));
var_dump(ini_get('track_errors'));
-ini_set('display_errors', 0);
+ini_set('display_errors', "0");
var_dump(ini_get('display_errors'));
-var_dump($php_errormsg);
$error = 1 / 0;
var_dump($php_errormsg);
?>
--EXPECTF--
-%s: %sivision by zero in %s on line %d
string(1) "1"
-string(4) "8191"
+string(5) "32767"
string(1) "0"
string(1) "1"
string(1) "0"
string(%d) "%sivision by zer%s"
-string(%d) "%sivision by zer%s"
diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt
index 954f899aca..bdd48bebf4 100644
--- a/tests/run-test/test008a.phpt
+++ b/tests/run-test/test008a.phpt
@@ -1,8 +1,8 @@
--TEST--
-Error message handling (without ZendOptimizer)
+Error message handling (with ZendOpcache)
--SKIPIF--
<?php
-if (extension_loaded("Zend Optimizer")) die("skip Zend Optimizer is loaded");
+if (!extension_loaded("Zend Opcache")) die("skip Zend Opcache is loaded");
?>
--FILE--
<?php
@@ -19,7 +19,8 @@ var_dump(ini_get('track_errors'));
ini_set('display_errors', 0);
var_dump(ini_get('display_errors'));
var_dump($php_errormsg);
-ini_set('zend.assertions', -1);
+$zero = 0;
+$error = 1 / $zero;
var_dump($php_errormsg);
?>
--EXPECTF--
@@ -29,4 +30,4 @@ string(1) "0"
string(1) "1"
string(1) "0"
NULL
-string(%d) "%senabled or disabled%s"
+string(%d) "%sivision by zer%s"
diff --git a/travis/compile.sh b/travis/compile.sh
index 5478b885c0..02da5d8794 100755
--- a/travis/compile.sh
+++ b/travis/compile.sh
@@ -10,7 +10,9 @@ else
DEBUG="";
fi
./buildconf --force
-./configure --quiet \
+./configure \
+--prefix=$HOME"/php-install" \
+--quiet \
$DEBUG \
$TS \
--enable-phpdbg \
@@ -21,7 +23,7 @@ $TS \
--with-pdo-pgsql \
--with-pdo-sqlite \
--enable-intl \
---with-pear \
+--without-pear \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
@@ -54,12 +56,9 @@ $TS \
--with-pspell=/usr \
--with-enchant=/usr \
--enable-wddx \
---with-imap \
---with-imap-ssl \
--with-freetype-dir=/usr \
---with-t1lib=/usr \
--with-xpm-dir=/usr \
--with-kerberos \
--enable-sysvmsg
make -j2 --quiet
-sudo make install
+make install
diff --git a/travis/de b/travis/de
deleted file mode 100644
index ae49d969ee..0000000000
--- a/travis/de
+++ /dev/null
@@ -1,2 +0,0 @@
-de_DE.UTF-8 UTF-8
-de_DE ISO-8859-1
diff --git a/travis/ext/curl/setup.sh b/travis/ext/curl/setup.sh
index 74dad16eb3..02e8ce5bb8 100755
--- a/travis/ext/curl/setup.sh
+++ b/travis/ext/curl/setup.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-export PHP_CURL_HTTP_REMOTE_SERVER="http://localhost"
+export PHP_CURL_HTTP_REMOTE_SERVER="http://localhost:8080"
cd ./ext/curl/tests/responder
-sudo php -S localhost:80 &
-cd - \ No newline at end of file
+php -S localhost:8080 &
+cd -
diff --git a/travis/ext/imap/dovecot.conf b/travis/ext/imap/dovecot.conf
deleted file mode 100644
index c321cb0099..0000000000
--- a/travis/ext/imap/dovecot.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-auth_debug = yes
-auth_mechanisms = login
-auth_verbose = yes
-disable_plaintext_auth = no
-auth_mechanisms = plain login cram-md5
-listen = *
-mail_location = maildir:/home/vmail/mail/%d/%n/Maildir
-mbox_write_locks = fcntl
-passdb {
- args = /etc/dovecot/dovecotpass
- driver = passwd-file
-}
-protocols = imap
-service auth {
- user = root
-}
-ssl = no
-userdb {
- args = uid=11459 gid=10002 home=/home/vmail/dovecot/mail/%d/%n
- driver = static
-}
-log_path = /var/log/dovecot.log
diff --git a/travis/ext/imap/dovecotpass b/travis/ext/imap/dovecotpass
deleted file mode 100644
index f68e6c3cae..0000000000
--- a/travis/ext/imap/dovecotpass
+++ /dev/null
@@ -1 +0,0 @@
-webmaster@something.com:{plain}p4ssw0rd
diff --git a/travis/ext/imap/imap.exp b/travis/ext/imap/imap.exp
deleted file mode 100644
index de254bbd8f..0000000000
--- a/travis/ext/imap/imap.exp
+++ /dev/null
@@ -1,29 +0,0 @@
-send_user "IMAP test start..."
-spawn telnet 127.0.0.1 143
-
-expect "Dovecot ready" {
- send_user "OK: $expect_out(0,string)\n"
-} "refused" {
- send_user "connect to POP refused\n"
- exit 1
-} timeout {
- send_user "connect to POP timeout\n"
- exit 1
-}
-
-send "a1 LOGIN webmaster@something.com p4ssw0rd\n"
-
-expect "a1 OK" {
- send_user "OK, imap works\n"
-} "a1 NO*" {
- send_user "auth failed: $expect_out(buffer)\n"
- exit 1
-} "error*" {
- send_user "ERROR: $expect_out(buffer)\n"
-} timeout {
- send_user "connect to POP timeout\n"
- exit 1
-}
-
-exit 0
-
diff --git a/travis/ext/imap/setup.sh b/travis/ext/imap/setup.sh
deleted file mode 100644
index 228fee037b..0000000000
--- a/travis/ext/imap/setup.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-sudo groupadd -g 10002 vmail
-sudo useradd -g 10002 -u 11459 vmail
-sudo apt-get -y install expect dovecot-imapd
-sudo cp ./travis/ext/imap/dovecot.conf ./travis/ext/imap/dovecotpass /etc/dovecot
-sudo mkdir -p /home/vmail/mail/something.com
-sudo chown -R vmail:vmail /home/vmail/mail
-sudo chmod -R u+w /home/vmail/mail
-sudo service dovecot stop
-sudo service dovecot start
-expect ./travis/ext/imap/imap.exp
diff --git a/travis/install.sh b/travis/install.sh
deleted file mode 100755
index 5c6a3c1913..0000000000
--- a/travis/install.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-sudo apt-get install re2c libgmp-dev libicu-dev libmcrypt-dev libtidy-dev
diff --git a/win32/build/Makefile b/win32/build/Makefile
index 09fea55137..06f8ef35d5 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -1,7 +1,7 @@
# +----------------------------------------------------------------------+
# | PHP Version 7 |
# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-2008 The PHP Group |
+# | Copyright (c) 1997-2016 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.01 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
@@ -36,11 +36,13 @@ build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV)
!if $(RE2C) == ""
generated_files: build_dirs Zend\zend_ini_parser.c \
Zend\zend_language_parser.c \
+ sapi\phpdbg\phpdbg_parser.c \
$(PHPDEF) $(MCFILE)
!else
generated_files: build_dirs Zend\zend_ini_parser.c \
Zend\zend_language_parser.c Zend\zend_ini_scanner.c \
Zend\zend_language_scanner.c \
+ sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_lexer.c \
$(PHPDEF) $(MCFILE)
!endif
@@ -53,12 +55,18 @@ Zend\zend_ini_parser.c Zend\zend_ini_parser.h: Zend\zend_ini_parser.y
Zend\zend_language_parser.c Zend\zend_language_parser.h: Zend\zend_language_parser.y
$(BISON) --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y
+sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_parser.h: sapi\phpdbg\phpdbg_parser.y
+ $(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d -p phpdbg_ sapi/phpdbg/phpdbg_parser.y
+
!if $(RE2C) != ""
Zend\zend_ini_scanner.c: Zend\zend_ini_scanner.l
$(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l
Zend\zend_language_scanner.c: Zend\zend_language_scanner.l
$(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l
+
+sapi\phpdbg\phpdbg_lexer.c: sapi\phpdbg\phpdbg_lexer.l
+ $(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l
!endif
!if $(PGOMGR) != ""
@@ -203,9 +211,12 @@ install-sdk: build-devel
really-install:
@if not exist $(PHP_PREFIX) mkdir $(PHP_PREFIX)
+ @if not exist $(PHP_PREFIX)\ext mkdir $(PHP_PREFIX)\ext
@echo Installing files under $(PHP_PREFIX)
@copy $(BUILD_DIR)\*.exe $(PHP_PREFIX) /y >nul
- @copy $(BUILD_DIR)\*.dll $(PHP_PREFIX) /y >nul
+ @copy $(BUILD_DIR)\php_*.dll $(PHP_PREFIX)\ext /y >nul
+ dir /b $(BUILD_DIR)\php_*.dll > $(BUILD_DIR)\extension_dlls.txt
+ @xcopy $(BUILD_DIR)\*.dll /exclude:$(BUILD_DIR)\extension_dlls.txt $(PHP_PREFIX) /y >nul
@echo Registering event source with syslog (requires admin rights)
@echo It's okay for this step to fail:
-$(PHP_PREFIX)\php.exe -n -dextension_dir=$(PHP_PREFIX) win32/build/registersyslog.php $(PHP_PREFIX)\$(PHPDLL)
diff --git a/win32/build/Makefile.phpize b/win32/build/Makefile.phpize
index 1f92f7716c..cd74336039 100644
--- a/win32/build/Makefile.phpize
+++ b/win32/build/Makefile.phpize
@@ -18,11 +18,13 @@ clean-pecl:
clean-all:
@echo Cleaning standard build dirs
+ cd $(BUILD_DIR)
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D
-@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.manifest $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.dbg $(BUILD_DIR)\*.bin $(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe > NUL
clean: clean-pecl
@echo Cleaning distribution build dirs
+ cd $(BUILD_DIR)
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL
-@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip > NUL
diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js
index a3a4f1e9aa..d7975d0139 100644
--- a/win32/build/buildconf.js
+++ b/win32/build/buildconf.js
@@ -244,6 +244,8 @@ for (i = 0; i < calls.length; i++) {
}
C.WriteBlankLines(1);
+C.WriteLine("STDOUT.WriteLine(\"PHP Version: \" + PHP_VERSION_STRING);");
+C.WriteLine("STDOUT.WriteBlankLines(1);");
C.WriteLine("conf_process_args();");
C.WriteBlankLines(1);
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index b7e5e49220..609f5c5d46 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -160,7 +160,8 @@ ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c
ADD_FLAG("CFLAGS_BD_MAIN_STREAMS", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
ADD_SOURCES("win32", "dllmain.c glob.c readdir.c \
- registry.c select.c sendmail.c time.c winutil.c wsyslog.c globals.c getrusage.c");
+ registry.c select.c sendmail.c time.c winutil.c wsyslog.c globals.c \
+ getrusage.c ftok.c");
ADD_FLAG("CFLAGS_BD_WIN32", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index b2ee6f1958..2a8297a144 100644
--- a/win32/build/config.w32.h.in
+++ b/win32/build/config.w32.h.in
@@ -15,22 +15,13 @@
#define PEAR_INSTALLDIR "@PREFIX@\\pear"
#define PHP_BINDIR "@PREFIX@"
#define PHP_DATADIR "@PREFIX@"
-#define PHP_EXTENSION_DIR "@PREFIX@"
+#define PHP_EXTENSION_DIR "@PREFIX@\\ext"
#define PHP_INCLUDE_PATH ".;@PREFIX@\\pear"
#define PHP_LIBDIR "@PREFIX@"
#define PHP_LOCALSTATEDIR "@PREFIX@"
#define PHP_PREFIX "@PREFIX@"
#define PHP_SYSCONFDIR "@PREFIX@"
-/* Enable / Disable crypt() function (default: enabled) */
-#define HAVE_CRYPT 1
-#define PHP_STD_DES_CRYPT 1
-#define PHP_EXT_DES_CRYPT 1
-#define PHP_MD5_CRYPT 1
-#define PHP_BLOWFISH_CRYPT 1
-#define PHP_SHA512_CRYPT 1
-#define PHP_SHA256_CRYPT 1
-
/* PHP Runtime Configuration */
#define PHP_URL_FOPEN 1
#define USE_CONFIG_FILE 1
@@ -183,3 +174,4 @@
#define HAVE_GETRUSAGE
+#define HAVE_FTOK 1
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 3bab5dcb9f..eb3658b68c 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -100,10 +100,10 @@ if (typeof(CWD) == "undefined") {
/* defaults; we pick up the precise versions from configure.in */
var PHP_VERSION = 7;
-var PHP_MINOR_VERSION = 0;
+var PHP_MINOR_VERSION = 1;
var PHP_RELEASE_VERSION = 0;
var PHP_EXTRA_VERSION = "";
-var PHP_VERSION_STRING = "7.0.0";
+var PHP_VERSION_STRING = "7.1.0";
/* Get version numbers and DEFINE as a string */
function get_version_numbers()
@@ -1449,79 +1449,117 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
var sub_build = "$(BUILD_DIR)\\";
- /* if module dir is not a child of the main source dir,
- * we need to tweak it; we should have detected such a
- * case in condense_path and rewritten the path to
- * be relative.
- * This probably breaks for non-sibling dirs, but that
- * is not a problem as buildconf only checks for pecl
- * as either a child or a sibling */
- if (obj_dir == null) {
- var build_dir = dir.replace(new RegExp("^..\\\\"), "");
- var mangle_dir = build_dir.replace(new RegExp("[\\\\/.-]", "g"), "_");
- var bd_flags_name = "CFLAGS_BD_" + mangle_dir.toUpperCase();
- }
- else {
- var build_dir = obj_dir.replace(new RegExp("^..\\\\"), "");
- var mangle_dir = build_dir.replace(new RegExp("[\\\\/.-]", "g"), "_");
- var bd_flags_name = "CFLAGS_BD_" + mangle_dir.toUpperCase();
- }
-
- var dirs = build_dir.split("\\");
- var i, d = "";
- for (i = 0; i < dirs.length; i++) {
- d += dirs[i];
- build_dirs[build_dirs.length] = d;
- d += "\\";
- }
- sub_build += d;
-
-
- DEFINE(bd_flags_name, "/Fp" + sub_build + " /FR" + sub_build + " ");
- if (VS_TOOLSET) {
- ADD_FLAG(bd_flags_name, "/Fd" + sub_build);
- }
+ var srcs_by_dir = {};
+ /* Parse the file list to create an aggregated structure based on the subdirs passed. */
for (i in file_list) {
src = file_list[i];
- obj = src.replace(re, ".obj");
- tv += " " + sub_build + obj;
- resp += " " + sub_build.replace('$(BUILD_DIR)', bd) + obj;
-
- if (!PHP_MP_DISABLED) {
- if (i > 0) {
- objs_line += " " + sub_build + obj;
- srcs_line += " " + dir + "\\" + src;
+
+ var _tmp = src.split("\\");
+
+ var filename = _tmp.pop();
+
+ // build the obj out dir and use it as a key
+ var dirname = _tmp.join("\\");
+
+ //WARNING("dir: " + dir + " dirname: " + dirname + " filename: " + filename);
+
+ /* if module dir is not a child of the main source dir,
+ * we need to tweak it; we should have detected such a
+ * case in condense_path and rewritten the path to
+ * be relative.
+ * This probably breaks for non-sibling dirs, but that
+ * is not a problem as buildconf only checks for pecl
+ * as either a child or a sibling */
+ if (obj_dir == null) {
+ if (MODE_PHPIZE) {
+ /* In the phpize mode, the subdirs are always relative to BUID_DIR.
+ No need to differentiate by extension, only one gets built. */
+ var build_dir = (dirname ? dirname : "").replace(new RegExp("^..\\\\"), "");
} else {
- objs_line = sub_build + obj;
- srcs_line = dir + "\\" + src;
+ var build_dir = (dirname ? (dir + "\\" + dirname) : dir).replace(new RegExp("^..\\\\"), "");
}
- } else {
- MFO.WriteLine(sub_build + obj + ": " + dir + "\\" + src);
+ }
+ else {
+ var build_dir = (dirname ? obj_dir + "\\" + dirname : obj_dir).replace(new RegExp("^..\\\\"), "");
+ }
- if (PHP_ANALYZER == "pvs") {
- MFO.WriteLine("\t@\"$(PVS_STUDIO)\" --cl-params $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " --source-file " + dir + "\\" + src
- + " --cfg PVS-Studio.conf --errors-off \"V122 V117 V111\" ");
- }
- MFO.WriteLine("\t@$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " /Fo" + sub_build + obj);
+ obj = sub_build + build_dir + "\\" + filename.replace(re, ".obj");
+
+ if (i > 0) {
+ srcs_line += " " + dir + "\\" + src;
+ objs_line += " " + obj
+ } else {
+ srcs_line = dir + "\\" + src;
+ objs_line = obj;
}
+
+ resp += " " + obj.replace('$(BUILD_DIR)', bd);
+ tv += " " + obj;
+
+ if (!srcs_by_dir.hasOwnProperty(build_dir)) {
+ srcs_by_dir[build_dir] = [];
+ }
+
+ /* storing the index from the file_list */
+ srcs_by_dir[build_dir].push(i);
}
- if (!PHP_MP_DISABLED) {
- MFO.WriteLine(objs_line + ": " + srcs_line);
- MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) /Fo" + sub_build + " $(" + bd_flags_name + ") /c " + srcs_line);
+ /* Create makefile build targets and dependencies. */
+ MFO.WriteLine(objs_line + ": " + srcs_line);
+
+ /* Create target subdirs if any and produce the compiler calls, /mp is respected if enabled. */
+ for (var k in srcs_by_dir) {
+ var dirs = k.split("\\");
+ var i, d = "";
+ for (i = 0; i < dirs.length; i++) {
+ d += dirs[i];
+ build_dirs[build_dirs.length] = d;
+ d += "\\";
+ }
+
+ var mangle_dir = k.replace(new RegExp("[\\\\/.-]", "g"), "_");
+ var bd_flags_name = "CFLAGS_BD_" + mangle_dir.toUpperCase();
+
+ DEFINE(bd_flags_name, "/Fp" + sub_build + d + " /FR" + sub_build + d + " ");
+ if (VS_TOOLSET) {
+ ADD_FLAG(bd_flags_name, "/Fd" + sub_build + d);
+ }
+
+ if (PHP_MP_DISABLED) {
+ for (var j in srcs_by_dir[k]) {
+ src = file_list[srcs_by_dir[k][j]];
+ if (PHP_ANALYZER == "pvs") {
+ MFO.WriteLine("\t@\"$(PVS_STUDIO)\" --cl-params $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " --source-file " + dir + "\\" + src
+ + " --cfg PVS-Studio.conf --errors-off \"V122 V117 V111\" ");
+ }
+
+ var _tmp = src.split("\\");
+ var filename = _tmp.pop();
+ obj = filename.replace(re, ".obj");
+
+ MFO.WriteLine("\t@$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " /Fo" + sub_build + d + obj);
+ }
+ } else {
+ /* TODO create a response file at least for the source files to work around the cmd line length limit. */
+ var src_line = "";
+ for (var j in srcs_by_dir[k]) {
+ src_line += dir + "\\" + file_list[srcs_by_dir[k][j]] + " ";
+ }
+
+ MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) /Fo" + sub_build + d + " $(" + bd_flags_name + ") /c " + src_line);
+ }
}
DEFINE(sym, tv);
- /* Generate the response file and define it to the Makefile. This can be
- useful when getting the "command line too long" linker errors. */
+ /* Generate the object response file and define it to the Makefile. This can be
+ useful when getting the "command line too long" linker errors.
+ TODO pack this into a function when response files are used for other kinds of info. */
var obj_lst_fh = null;
if (!FSO.FileExists(obj_lst_fn)) {
obj_lst_fh = FSO.CreateTextFile(obj_lst_fn);
- //STDOUT.WriteLine("Creating " + obj_lst_fn);
} else {
- //STDOUT.WriteLine("Appending to " + obj_lst_fn);
obj_lst_fh = FSO.OpenTextFile(obj_lst_fn, 8);
}
@@ -2069,7 +2107,8 @@ function generate_makefile()
var dll = "php_" + extensions_enabled[i][0] + ".dll";
MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib");
MF.WriteLine(" @if not exist $(PHP_PREFIX) mkdir $(PHP_PREFIX) >nul");
- MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)");
+ MF.WriteLine(" @if not exist $(PHP_PREFIX)\\ext mkdir $(PHP_PREFIX)\\ext >nul");
+ MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)\\ext");
}
} else {
MF.WriteBlankLines(1);
@@ -2108,7 +2147,16 @@ function ADD_FLAG(name, flags, target)
if (configure_subst.Exists(name)) {
var curr_flags = configure_subst.Item(name);
- if (curr_flags.indexOf(flags) >= 0) {
+ /* Prefix with a space, thus making sure the
+ current flag is not a substring of some
+ other. It's still not a complete check if
+ some flags with spaces got added.
+
+ TODO rework to use an array, so direct
+ match can be done. This will also
+ help to normalize flags and to not
+ to insert duplicates. */
+ if (curr_flags.indexOf(" " + flags) >= 0 || curr_flags.indexOf(flags + " ") >= 0) {
return;
}
@@ -2641,6 +2689,19 @@ function toolset_setup_common_cflags()
if (PHP_DEBUG == "yes") {
// Set some debug/release specific options
ADD_FLAG('CFLAGS', ' /RTC1 ');
+ } else {
+ if (VCVERS >= 1900) {
+ ADD_FLAG('CFLAGS', "/guard:cf");
+ }
+ if (VCVERS >= 1800) {
+ if (PHP_PGI != "yes" && PHP_PGO != "yes") {
+ ADD_FLAG('CFLAGS', "/Zc:inline");
+ }
+ /* We enable /opt:icf only with the debug pack, so /Gw only makes sense there, too. */
+ if (PHP_DEBUG_PACK == "yes") {
+ ADD_FLAG('CFLAGS', "/Gw");
+ }
+ }
}
} else if (CLANG_TOOLSET) {
@@ -2668,6 +2729,12 @@ function toolset_setup_common_ldlags()
// we want msvcrt in the PHP DLL
ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:libcmt");
+
+ if (VS_TOOLSET) {
+ if (VCVERS >= 1900) {
+ ADD_FLAG('LDFLAGS', "/GUARD:CF");
+ }
+ }
}
function toolset_setup_common_libs()
diff --git a/win32/build/default.manifest b/win32/build/default.manifest
index 77b2a2165a..992f41c738 100644
--- a/win32/build/default.manifest
+++ b/win32/build/default.manifest
@@ -1,6 +1,13 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+ <requestedExecutionLevel level="asInvoker" uiAccess="false" />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
diff --git a/win32/build/deplister.c b/win32/build/deplister.c
index 5b8c60cee9..d1a47e367d 100644
--- a/win32/build/deplister.c
+++ b/win32/build/deplister.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/build/libs_version.txt b/win32/build/libs_version.txt
index 7c86290e75..978367feed 100644
--- a/win32/build/libs_version.txt
+++ b/win32/build/libs_version.txt
@@ -1,16 +1,16 @@
bz2-1.0.6
cclient-2007f
-freetype-2.5.5
-icu-55.1
+freetype-2.6.2
+icu-56.1
jpeglib-9a
-libcurl-7.40.0
+libcurl-7.47.1
libiconv-1.14
libmcrypt-2.5.8
-libmpir-2.6.0
-libpng-1.5.18
-libpq-9.4.1
-libssh2-1.5.0
+libmpir-2.7.2
+libpng-1.6.21
+libpq-9.5.1
+libssh2-1.7.0
libtidy-20090406
libxslt-1.1.28
-libxml-2.9.2
-openssl-1.0.2a
+libxml-2.9.3
+openssl-1.0.2h
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index 7b4c057530..ca99b0dba9 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -498,7 +498,7 @@ if (!$use_pear_template) {
/* grab the bootstrap script */
echo "Downloading go-pear\n";
- copy("http://pear.php.net/go-pear", "$dist_dir/PEAR/go-pear.php");
+ copy("https://pear.php.net/go-pear.phar", "$dist_dir/PEAR/go-pear.php");
/* import the package list -- sets $packages variable */
include "pear/go-pear-list.php";
diff --git a/win32/build/template.rc b/win32/build/template.rc
index b28645822f..83c28934a5 100644
--- a/win32/build/template.rc
+++ b/win32/build/template.rc
@@ -65,7 +65,7 @@ BEGIN
#endif
VALUE "FileVersion", EXT_VERSION
VALUE "InternalName", INTERNAL_NAME
- VALUE "LegalCopyright", "Copyright © 1997-2014 The PHP Group"
+ VALUE "LegalCopyright", "Copyright © 1997-2016 The PHP Group"
VALUE "LegalTrademarks", "PHP"
VALUE "OriginalFilename", FILE_NAME
VALUE "ProductName", "PHP"
diff --git a/win32/dllmain.c b/win32/dllmain.c
index 92773a0b58..a398b2201d 100644
--- a/win32/dllmain.c
+++ b/win32/dllmain.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/ftok.c b/win32/ftok.c
new file mode 100644
index 0000000000..842da78192
--- /dev/null
+++ b/win32/ftok.c
@@ -0,0 +1,52 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Anatol Belski <ab@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#include "ipc.h"
+
+#include <windows.h>
+#include <sys/stat.h>
+
+
+PHPAPI key_t
+ftok(const char *pathname, int proj_id)
+{
+ HANDLE fh;
+ struct stat st;
+ BY_HANDLE_FILE_INFORMATION bhfi;
+ key_t ret;
+
+ if (stat(pathname, &st) < 0) {
+ return (key_t)-1;
+ }
+
+ if ((fh = CreateFile(pathname, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE) {
+ return (key_t)-1;
+ }
+
+ if (!GetFileInformationByHandle(fh, &bhfi)) {
+ CloseHandle(fh);
+ return (key_t)-1;
+ }
+
+ ret = (key_t) ((proj_id & 0xff) << 24 | (st.st_dev & 0xff) << 16 | ((bhfi.nFileIndexLow | (__int64)bhfi.nFileIndexHigh << 32) & 0xffff));
+
+ CloseHandle(fh);
+
+ return ret;
+}
+
diff --git a/win32/getrusage.c b/win32/getrusage.c
index fea9089fe6..d719bcde26 100644
--- a/win32/getrusage.c
+++ b/win32/getrusage.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/getrusage.h b/win32/getrusage.h
index 8a6b9a7510..97327d93fb 100644
--- a/win32/getrusage.h
+++ b/win32/getrusage.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/globals.c b/win32/globals.c
index 37a55bde46..1e5f50fb8f 100644
--- a/win32/globals.c
+++ b/win32/globals.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/grp.h b/win32/grp.h
index 676163c5d9..50b75c500c 100644
--- a/win32/grp.h
+++ b/win32/grp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/inet.c b/win32/inet.c
index c0967f6572..9e0b128515 100644
--- a/win32/inet.c
+++ b/win32/inet.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/inet.h b/win32/inet.h
index f2256427ec..fffc6d5fa4 100644
--- a/win32/inet.h
+++ b/win32/inet.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/install.txt b/win32/install.txt
index d6940b9354..be87921dc0 100644
--- a/win32/install.txt
+++ b/win32/install.txt
@@ -211,9 +211,7 @@ c:\php
|
|-php5activescript.dll
|
- |-php5apache.dll
- |
- |-php5apache2.dll
+ |-php7apache2_4.dll
|
|-..
|
@@ -234,14 +232,7 @@ c:\php
Here is a list of server modules shipped with PHP 5:
- * sapi/php5apache2_2.dll - Apache 2.2.x module.
- * sapi/php5apache.dll (php5apache.dll) - Apache 1.x module
- * sapi/php5apache2.dll (php5apache2.dll) - - Apache 2.0.x module.
- * sapi/php5isapi.dll - ISAPI Module for ISAPI compliant web servers
- like IIS 5.0 or newer. However the FCGI SAPI is recommended with
- IIS
- * sapi/php5nsapi.dll (php5nsapi.dll) - Sun/iPlanet/Netscape server
- module.
+ * php7apache2_4.dll - Apache 2.4.x module.
Server modules provide significantly better performance and additional
functionality compared to the CGI binary. The FastCGI is significantly
diff --git a/win32/ipc.h b/win32/ipc.h
new file mode 100644
index 0000000000..cafcf4f85e
--- /dev/null
+++ b/win32/ipc.h
@@ -0,0 +1,29 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 7 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2016 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Anatol Belski <ab@php.net> |
+ +----------------------------------------------------------------------+
+ */
+
+#ifndef PHP_WIN32_IPC_H
+#define PHP_WIN32_IPC_H 1
+
+#include "php.h"
+
+typedef int key_t;
+
+PHPAPI key_t ftok(const char *path, int id);
+
+
+#endif /* PHP_WIN32_IPC_H */
diff --git a/win32/php_inttypes.h b/win32/php_inttypes.h
index ead903f78e..4130649cf2 100644
--- a/win32/php_inttypes.h
+++ b/win32/php_inttypes.h
@@ -33,6 +33,10 @@
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
+// Starting with vc14, many of the C11 features are now included, so we only
+// need many of these typedefs and defines for older VS suites
+#if _MSC_VER < 1900
+
#ifndef _MSC_INTTYPES_H_ // [
#define _MSC_INTTYPES_H_
@@ -303,3 +307,8 @@ imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
#endif // _MSC_INTTYPES_H_ ]
+
+#else
+#include <inttypes.h>
+#endif
+
diff --git a/win32/php_registry.h b/win32/php_registry.h
index f8a57dbac7..05ceebb351 100644
--- a/win32/php_registry.h
+++ b/win32/php_registry.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/php_win32_globals.h b/win32/php_win32_globals.h
index b22c227eda..9510e64a54 100644
--- a/win32/php_win32_globals.h
+++ b/win32/php_win32_globals.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/readdir.h b/win32/readdir.h
index f1fb3a736f..d9ae477af0 100644
--- a/win32/readdir.h
+++ b/win32/readdir.h
@@ -32,7 +32,7 @@ struct dirent {
/* typedef DIR - not the same as Unix */
typedef struct {
HANDLE handle; /* _findfirst/_findnext handle */
- short offset; /* offset into directory */
+ int offset; /* offset into directory */
short finished; /* 1 if there are not more files */
WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */
diff --git a/win32/registry.c b/win32/registry.c
index be16e1880f..84b19b1978 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/select.c b/win32/select.c
index ec16a03ea4..8ab964fe03 100644
--- a/win32/select.c
+++ b/win32/select.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/select.h b/win32/select.h
index 0ebf7c5c89..b2b1e304c1 100644
--- a/win32/select.h
+++ b/win32/select.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 025c56a208..9195f21503 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -241,25 +241,46 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message,
RPath = estrdup(mailRPath);
} else if (INI_STR("sendmail_from")) {
RPath = estrdup(INI_STR("sendmail_from"));
- } else if ( headers_lc &&
- (pos1 = strstr(headers_lc->val, "from:")) &&
- ((pos1 == headers_lc->val) || (*(pos1-1) == '\n'))
- ) {
- /* Real offset is memaddress from the original headers + difference of
- * string found in the lowercase headrs + 5 characters to jump over
- * the from: */
- pos1 = headers + (pos1 - headers_lc->val) + 5;
- if (NULL == (pos2 = strstr(pos1, "\r\n"))) {
- RPath = estrndup(pos1, strlen(pos1));
- } else {
- RPath = estrndup(pos1, pos2 - pos1);
+ } else if (headers_lc) {
+ int found = 0;
+ char *lookup = headers_lc->val;
+
+ while (lookup) {
+ pos1 = strstr(lookup, "from:");
+
+ if (!pos1) {
+ break;
+ } else if (pos1 != headers_lc->val && *(pos1-1) != '\n') {
+ if (strlen(pos1) >= sizeof("from:")) {
+ lookup = pos1 + sizeof("from:");
+ continue;
+ } else {
+ break;
+ }
+ }
+
+ found = 1;
+
+ /* Real offset is memaddress from the original headers + difference of
+ * string found in the lowercase headrs + 5 characters to jump over
+ * the from: */
+ pos1 = headers + (pos1 - lookup) + 5;
+ if (NULL == (pos2 = strstr(pos1, "\r\n"))) {
+ RPath = estrndup(pos1, strlen(pos1));
+ } else {
+ RPath = estrndup(pos1, pos2 - pos1);
+ }
+
+ break;
}
- } else {
- if (headers_lc) {
- zend_string_free(headers_lc);
+
+ if (!found) {
+ if (headers_lc) {
+ zend_string_free(headers_lc);
+ }
+ *error = W32_SM_SENDMAIL_FROM_NOT_SET;
+ return FAILURE;
}
- *error = W32_SM_SENDMAIL_FROM_NOT_SET;
- return FAILURE;
}
/* attempt to connect with mail host */
@@ -868,7 +889,7 @@ static int Post(LPCSTR msg)
//********************************************************************/
static int Ack(char **server_response)
{
- static char buf[MAIL_BUFFER_SIZE];
+ ZEND_TLS char buf[MAIL_BUFFER_SIZE];
int rlen;
int Index = 0;
int Received = 0;
diff --git a/win32/sockets.c b/win32/sockets.c
index e56836468a..95c4b85b31 100644
--- a/win32/sockets.c
+++ b/win32/sockets.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/sockets.h b/win32/sockets.h
index 77ece1c274..af6b7168cf 100644
--- a/win32/sockets.h
+++ b/win32/sockets.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/syslog.h b/win32/syslog.h
index a4f2763dff..fce046f189 100644
--- a/win32/syslog.h
+++ b/win32/syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/winutil.c b/win32/winutil.c
index 2faa0d9e7d..e59e049775 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/winutil.h b/win32/winutil.h
index 35209d0c7f..bdb0f8702b 100644
--- a/win32/winutil.h
+++ b/win32/winutil.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |